summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
blob: 429e834a934a10f0e7154dea6cb2b4a111b30528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
"""An FTP client class and some helper functions.

Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds

Example:

>>> from ftplib import FTP
>>> ftp = FTP('ftp.python.org') # connect to host, default port
>>> ftp.login() # default, i.e.: user anonymous, passwd user@hostname
'230 Guest login ok, access restrictions apply.'
>>> ftp.retrlines('LIST') # list directory contents
total 9
drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 .
drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 ..
drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 bin
drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 etc
d-wxrwxr-x   2 ftp      wheel        1024 Sep  5 13:43 incoming
drwxr-xr-x   2 root     wheel        1024 Nov 17  1993 lib
drwxr-xr-x   6 1094     wheel        1024 Sep 13 19:07 pub
drwxr-xr-x   3 root     wheel        1024 Jan  3  1994 usr
-rw-r--r--   1 root     root          312 Aug  1  1994 welcome.msg
'226 Transfer complete.'
>>> ftp.quit()
'221 Goodbye.'
>>> 

A nice test that reveals some of the network dialogue would be:
python ftplib.py -d localhost -l -p -l
"""

# 
# Changes and improvements suggested by Steve Majewski.
# Modified by Jack to work on the mac.
# Modified by Siebren to support docstrings and PASV.
#

import os
import sys
import string

# Import SOCKS module if it exists, else standard socket module socket
try:
	import SOCKS; socket = SOCKS; del SOCKS # import SOCKS as socket
	from socket import getfqdn; socket.getfqdn = getfqdn; del getfqdn
except ImportError:
	import socket


# Magic number from <socket.h>
MSG_OOB = 0x1				# Process data out of band


# The standard FTP server control port
FTP_PORT = 21


# Exception raised when an error or invalid response is received
class Error(Exception): pass
class error_reply(Error): pass		# unexpected [123]xx reply
class error_temp(Error): pass		# 4xx errors
class error_perm(Error): pass		# 5xx errors
class error_proto(Error): pass		# response does not begin with [1-5]


# All exceptions (hopefully) that may be raised here and that aren't
# (always) programming errors on our side
all_errors = (Error, socket.error, IOError, EOFError)


# Line terminators (we always output CRLF, but accept any of CRLF, CR, LF)
CRLF = '\r\n'


# The class itself
class FTP:

	'''An FTP client class.

	To create a connection, call the class using these argument:
		host, user, passwd, acct
	These are all strings, and have default value ''.
	Then use self.connect() with optional host and port argument.

	To download a file, use ftp.retrlines('RETR ' + filename),
	or ftp.retrbinary() with slightly different arguments.
	To upload a file, use ftp.storlines() or ftp.storbinary(),
	which have an open file as argument (see their definitions
	below for details).
	The download/upload functions first issue appropriate TYPE
	and PORT or PASV commands.
'''

	# Initialization method (called by class instantiation).
	# Initialize host to localhost, port to standard ftp port
	# Optional arguments are host (for connect()),
	# and user, passwd, acct (for login())
	def __init__(self, host = '', user = '', passwd = '', acct = ''):
		# Initialize the instance to something mostly harmless
		self.debugging = 0
		self.host = ''
		self.port = FTP_PORT
		self.sock = None
		self.file = None
		self.welcome = None
		resp = None
		if host:
			resp = self.connect(host)
			if user: resp = self.login(user, passwd, acct)

	def connect(self, host = '', port = 0):
		'''Connect to host.  Arguments are:
		- host: hostname to connect to (string, default previous host)
		- port: port to connect to (integer, default previous port)'''
		if host: self.host = host
		if port: self.port = port
		self.passiveserver = 0
		self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
		self.sock.connect((self.host, self.port))
		self.file = self.sock.makefile('rb')
		self.welcome = self.getresp()
		return self.welcome

	def getwelcome(self):
		'''Get the welcome message from the server.
		(this is read and squirreled away by connect())'''
		if self.debugging:
			print '*welcome*', self.sanitize(self.welcome)
		return self.welcome

	def set_debuglevel(self, level):
		'''Set the debugging level.
		The required argument level means:
		0: no debugging output (default)
		1: print commands and responses but not body text etc.
		2: also print raw lines read and sent before stripping CR/LF'''
		self.debugging = level
	debug = set_debuglevel

	def set_pasv(self, val):
		'''Use passive or active mode for data transfers.
		With a false argument, use the normal PORT mode,
		With a true argument, use the PASV command.'''
		self.passiveserver = val

	# Internal: "sanitize" a string for printing
	def sanitize(self, s):
		if s[:5] == 'pass ' or s[:5] == 'PASS ':
			i = len(s)
			while i > 5 and s[i-1] in '\r\n':
				i = i-1
			s = s[:5] + '*'*(i-5) + s[i:]
		return `s`

	# Internal: send one line to the server, appending CRLF
	def putline(self, line):
		line = line + CRLF
		if self.debugging > 1: print '*put*', self.sanitize(line)
		self.sock.send(line)

	# Internal: send one command to the server (through putline())
	def putcmd(self, line):
		if self.debugging: print '*cmd*', self.sanitize(line)
		self.putline(line)

	# Internal: return one line from the server, stripping CRLF.
	# Raise EOFError if the connection is closed
	def getline(self):
		line = self.file.readline()
		if self.debugging > 1:
			print '*get*', self.sanitize(line)
		if not line: raise EOFError
		if line[-2:] == CRLF: line = line[:-2]
		elif line[-1:] in CRLF: line = line[:-1]
		return line

	# Internal: get a response from the server, which may possibly
	# consist of multiple lines.  Return a single string with no
	# trailing CRLF.  If the response consists of multiple lines,
	# these are separated by '\n' characters in the string
	def getmultiline(self):
		line = self.getline()
		if line[3:4] == '-':
			code = line[:3]
			while 1:
				nextline = self.getline()
				line = line + ('\n' + nextline)
				if nextline[:3] == code and \
					nextline[3:4] <> '-':
					break
		return line

	# Internal: get a response from the server.
	# Raise various errors if the response indicates an error
	def getresp(self):
		resp = self.getmultiline()
		if self.debugging: print '*resp*', self.sanitize(resp)
		self.lastresp = resp[:3]
		c = resp[:1]
		if c == '4':
			raise error_temp, resp
		if c == '5':
			raise error_perm, resp
		if c not in '123':
			raise error_proto, resp
		return resp

	def voidresp(self):
		"""Expect a response beginning with '2'."""
		resp = self.getresp()
		if resp[0] <> '2':
			raise error_reply, resp
		return resp

	def abort(self):
		'''Abort a file transfer.  Uses out-of-band data.
		This does not follow the procedure from the RFC to send Telnet
		IP and Synch; that doesn't seem to work with the servers I've
		tried.  Instead, just send the ABOR command as OOB data.'''
		line = 'ABOR' + CRLF
		if self.debugging > 1: print '*put urgent*', self.sanitize(line)
		self.sock.send(line, MSG_OOB)
		resp = self.getmultiline()
		if resp[:3] not in ('426', '226'):
			raise error_proto, resp

	def sendcmd(self, cmd):
		'''Send a command and return the response.'''
		self.putcmd(cmd)
		return self.getresp()

	def voidcmd(self, cmd):
		"""Send a command and expect a response beginning with '2'."""
		self.putcmd(cmd)
		return self.voidresp()

	def sendport(self, host, port):
		'''Send a PORT command with the current host and the given
		port number.
		'''
		hbytes = string.splitfields(host, '.')
		pbytes = [`port/256`, `port%256`]
		bytes = hbytes + pbytes
		cmd = 'PORT ' + string.joinfields(bytes, ',')
		return self.voidcmd(cmd)

	def makeport(self):
		'''Create a new socket and send a PORT command for it.'''
		global nextport
		sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
		sock.bind(('', 0))
		sock.listen(1)
		dummyhost, port = sock.getsockname() # Get proper port
		host, dummyport = self.sock.getsockname() # Get proper host
		resp = self.sendport(host, port)
		return sock

	def ntransfercmd(self, cmd, rest=None):
		"""Initiate a transfer over the data connection.

		If the transfer is active, send a port command and the
		transfer command, and accept the connection.  If the server is
		passive, send a pasv command, connect to it, and start the
		transfer command.  Either way, return the socket for the
		connection and the expected size of the transfer.  The
		expected size may be None if it could not be determined.

		Optional `rest' argument can be a string that is sent as the
		argument to a RESTART command.  This is essentially a server
		marker used to tell the server to skip over any data up to the
		given marker.
		"""
		size = None
		if self.passiveserver:
			host, port = parse227(self.sendcmd('PASV'))
			conn=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
			conn.connect((host, port))
			if rest is not None:
				self.sendcmd("REST %s" % rest)
			resp = self.sendcmd(cmd)
			if resp[0] <> '1':
				raise error_reply, resp
		else:
			sock = self.makeport()
			if rest is not None:
				self.sendcmd("REST %s" % rest)
			resp = self.sendcmd(cmd)
			if resp[0] <> '1':
				raise error_reply, resp
			conn, sockaddr = sock.accept()
		if resp[:3] == '150':
			# this is conditional in case we received a 125
			size = parse150(resp)
		return conn, size

	def transfercmd(self, cmd, rest=None):
		"""Like nstransfercmd() but returns only the socket."""
		return self.ntransfercmd(cmd, rest)[0]

	def login(self, user = '', passwd = '', acct = ''):
		'''Login, default anonymous.'''
		if not user: user = 'anonymous'
		if not passwd: passwd = ''
		if not acct: acct = ''
		if user == 'anonymous' and passwd in ('', '-'):
			# get fully qualified domain name of local host
			thishost = socket.getfqdn()
			try:
				if os.environ.has_key('LOGNAME'):
					realuser = os.environ['LOGNAME']
				elif os.environ.has_key('USER'):
					realuser = os.environ['USER']
				else:
					realuser = 'anonymous'
			except AttributeError:
				# Not all systems have os.environ....
				realuser = 'anonymous'
			passwd = passwd + realuser + '@' + thishost
		resp = self.sendcmd('USER ' + user)
		if resp[0] == '3': resp = self.sendcmd('PASS ' + passwd)
		if resp[0] == '3': resp = self.sendcmd('ACCT ' + acct)
		if resp[0] <> '2':
			raise error_reply, resp
		return resp

	def retrbinary(self, cmd, callback, blocksize=8192, rest=None):
		"""Retrieve data in binary mode.
		
		`cmd' is a RETR command.  `callback' is a callback function is
		called for each block.  No more than `blocksize' number of
		bytes will be read from the socket.  Optional `rest' is passed
		to transfercmd().

		A new port is created for you.  Return the response code.
		"""
		self.voidcmd('TYPE I')
		conn = self.transfercmd(cmd, rest)
		while 1:
			data = conn.recv(blocksize)
			if not data:
				break
			callback(data)
		conn.close()
		return self.voidresp()

	def retrlines(self, cmd, callback = None):
		'''Retrieve data in line mode.
		The argument is a RETR or LIST command.
		The callback function (2nd argument) is called for each line,
		with trailing CRLF stripped.  This creates a new port for you.
		print_line() is the default callback.'''
		if not callback: callback = print_line
		resp = self.sendcmd('TYPE A')
		conn = self.transfercmd(cmd)
		fp = conn.makefile('rb')
		while 1:
			line = fp.readline()
			if self.debugging > 2: print '*retr*', `line`
			if not line:
				break
			if line[-2:] == CRLF:
				line = line[:-2]
			elif line[-1:] == '\n':
				line = line[:-1]
			callback(line)
		fp.close()
		conn.close()
		return self.voidresp()

	def storbinary(self, cmd, fp, blocksize):
		'''Store a file in binary mode.'''
		self.voidcmd('TYPE I')
		conn = self.transfercmd(cmd)
		while 1:
			buf = fp.read(blocksize)
			if not buf: break
			conn.send(buf)
		conn.close()
		return self.voidresp()

	def storlines(self, cmd, fp):
		'''Store a file in line mode.'''
		self.voidcmd('TYPE A')
		conn = self.transfercmd(cmd)
		while 1:
			buf = fp.readline()
			if not buf: break
			if buf[-2:] <> CRLF:
				if buf[-1] in CRLF: buf = buf[:-1]
				buf = buf + CRLF
			conn.send(buf)
		conn.close()
		return self.voidresp()

	def acct(self, password):
		'''Send new account name.'''
		cmd = 'ACCT ' + password
		return self.voidcmd(cmd)

	def nlst(self, *args):
		'''Return a list of files in a given directory (default the current).'''
		cmd = 'NLST'
		for arg in args:
			cmd = cmd + (' ' + arg)
		files = []
		self.retrlines(cmd, files.append)
		return files

	def dir(self, *args):
		'''List a directory in long form.
		By default list current directory to stdout.
		Optional last argument is callback function; all
		non-empty arguments before it are concatenated to the
		LIST command.  (This *should* only be used for a pathname.)'''
		cmd = 'LIST' 
		func = None
		if args[-1:] and type(args[-1]) != type(''):
			args, func = args[:-1], args[-1]
		for arg in args:
			if arg:
				cmd = cmd + (' ' + arg) 
		self.retrlines(cmd, func)

	def rename(self, fromname, toname):
		'''Rename a file.'''
		resp = self.sendcmd('RNFR ' + fromname)
		if resp[0] <> '3':
			raise error_reply, resp
		return self.voidcmd('RNTO ' + toname)

	def delete(self, filename):
		'''Delete a file.'''
		resp = self.sendcmd('DELE ' + filename)
		if resp[:3] in ('250', '200'):
			return resp
		elif resp[:1] == '5':
			raise error_perm, resp
		else:
			raise error_reply, resp

	def cwd(self, dirname):
		'''Change to a directory.'''
		if dirname == '..':
			try:
				return self.voidcmd('CDUP')
			except error_perm, msg:
				if msg[:3] != '500':
					raise error_perm, msg
		elif dirname == '':
			dirname = '.'  # does nothing, but could return error
		cmd = 'CWD ' + dirname
		return self.voidcmd(cmd)

	def size(self, filename):
		'''Retrieve the size of a file.'''
		# Note that the RFC doesn't say anything about 'SIZE'
		resp = self.sendcmd('SIZE ' + filename)
		if resp[:3] == '213':
			return string.atoi(string.strip(resp[3:]))

	def mkd(self, dirname):
		'''Make a directory, return its full pathname.'''
		resp = self.sendcmd('MKD ' + dirname)
		return parse257(resp)

	def rmd(self, dirname):
		'''Remove a directory.'''
		return self.voidcmd('RMD ' + dirname)

	def pwd(self):
		'''Return current working directory.'''
		resp = self.sendcmd('PWD')
		return parse257(resp)

	def quit(self):
		'''Quit, and close the connection.'''
		resp = self.voidcmd('QUIT')
		self.close()
		return resp

	def close(self):
		'''Close the connection without assuming anything about it.'''
		self.file.close()
		self.sock.close()
		del self.file, self.sock


_150_re = None

def parse150(resp):
	'''Parse the '150' response for a RETR request.
	Returns the expected transfer size or None; size is not guaranteed to
	be present in the 150 message.
	'''
	if resp[:3] != '150':
		raise error_reply, resp
	global _150_re
	if _150_re is None:
		import re
		_150_re = re.compile("150 .* \((\d+) bytes\)", re.IGNORECASE)
	m = _150_re.match(resp)
	if m:
		return string.atoi(m.group(1))
	return None


def parse227(resp):
	'''Parse the '227' response for a PASV request.
	Raises error_proto if it does not contain '(h1,h2,h3,h4,p1,p2)'
	Return ('host.addr.as.numbers', port#) tuple.'''

	if resp[:3] <> '227':
		raise error_reply, resp
	left = string.find(resp, '(')
	if left < 0: raise error_proto, resp
	right = string.find(resp, ')', left + 1)
	if right < 0:
		raise error_proto, resp	# should contain '(h1,h2,h3,h4,p1,p2)'
	numbers = string.split(resp[left+1:right], ',')
	if len(numbers) <> 6:
		raise error_proto, resp
	host = string.join(numbers[:4], '.')
	port = (string.atoi(numbers[4]) << 8) + string.atoi(numbers[5])
	return host, port


def parse257(resp):
	'''Parse the '257' response for a MKD or PWD request.
	This is a response to a MKD or PWD request: a directory name.
	Returns the directoryname in the 257 reply.'''

	if resp[:3] <> '257':
		raise error_reply, resp
	if resp[3:5] <> ' "':
		return '' # Not compliant to RFC 959, but UNIX ftpd does this
	dirname = ''
	i = 5
	n = len(resp)
	while i < n:
		c = resp[i]
		i = i+1
		if c == '"':
			if i >= n or resp[i] <> '"':
				break
			i = i+1
		dirname = dirname + c
	return dirname


def print_line(line):
	'''Default retrlines callback to print a line.'''
	print line


def ftpcp(source, sourcename, target, targetname = '', type = 'I'):
	'''Copy file from one FTP-instance to another.'''
	if not targetname: targetname = sourcename
	type = 'TYPE ' + type
	source.voidcmd(type)
	target.voidcmd(type)
	sourcehost, sourceport = parse227(source.sendcmd('PASV'))
	target.sendport(sourcehost, sourceport)
	# RFC 959: the user must "listen" [...] BEFORE sending the
	# transfer request.
	# So: STOR before RETR, because here the target is a "user".
	treply = target.sendcmd('STOR ' + targetname)
	if treply[:3] not in ('125', '150'): raise error_proto	# RFC 959
	sreply = source.sendcmd('RETR ' + sourcename)
	if sreply[:3] not in ('125', '150'): raise error_proto	# RFC 959
	source.voidresp()
	target.voidresp()


class Netrc:
	"""Class to parse & provide access to 'netrc' format files.

	See the netrc(4) man page for information on the file format.

	WARNING: This class is obsolete -- use module netrc instead.

	"""
	__defuser = None
	__defpasswd = None
	__defacct = None

	def __init__(self, filename=None):
		if not filename:
			if os.environ.has_key("HOME"):
				filename = os.path.join(os.environ["HOME"],
							".netrc")
			else:
				raise IOError, \
				      "specify file to load or set $HOME"
		self.__hosts = {}
		self.__macros = {}
		fp = open(filename, "r")
		in_macro = 0
		while 1:
			line = fp.readline()
			if not line: break
			if in_macro and string.strip(line):
				macro_lines.append(line)
				continue
			elif in_macro:
				self.__macros[macro_name] = tuple(macro_lines)
				in_macro = 0
			words = string.split(line)
			host = user = passwd = acct = None
			default = 0
			i = 0
			while i < len(words):
				w1 = words[i]
				if i+1 < len(words):
					w2 = words[i + 1]
				else:
					w2 = None
				if w1 == 'default':
					default = 1
				elif w1 == 'machine' and w2:
					host = string.lower(w2)
					i = i + 1
				elif w1 == 'login' and w2:
					user = w2
					i = i + 1
				elif w1 == 'password' and w2:
					passwd = w2
					i = i + 1
				elif w1 == 'account' and w2:
					acct = w2
					i = i + 1
				elif w1 == 'macdef' and w2:
					macro_name = w2
					macro_lines = []
					in_macro = 1
					break
				i = i + 1
			if default:
				self.__defuser = user or self.__defuser
				self.__defpasswd = passwd or self.__defpasswd
				self.__defacct = acct or self.__defacct
			if host:
				if self.__hosts.has_key(host):
					ouser, opasswd, oacct = \
					       self.__hosts[host]
					user = user or ouser
					passwd = passwd or opasswd
					acct = acct or oacct
				self.__hosts[host] = user, passwd, acct
		fp.close()

	def get_hosts(self):
		"""Return a list of hosts mentioned in the .netrc file."""
		return self.__hosts.keys()

	def get_account(self, host):
		"""Returns login information for the named host.

		The return value is a triple containing userid,
		password, and the accounting field.

		"""
		host = string.lower(host)
		user = passwd = acct = None
		if self.__hosts.has_key(host):
			user, passwd, acct = self.__hosts[host]
		user = user or self.__defuser
		passwd = passwd or self.__defpasswd
		acct = acct or self.__defacct
		return user, passwd, acct

	def get_macros(self):
		"""Return a list of all defined macro names."""
		return self.__macros.keys()

	def get_macro(self, macro):
		"""Return a sequence of lines which define a named macro."""
		return self.__macros[macro]



def test():
	'''Test program.
	Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ...'''

	debugging = 0
	rcfile = None
	while sys.argv[1] == '-d':
		debugging = debugging+1
		del sys.argv[1]
	if sys.argv[1][:2] == '-r':
		# get name of alternate ~/.netrc file:
		rcfile = sys.argv[1][2:]
		del sys.argv[1]
	host = sys.argv[1]
	ftp = FTP(host)
	ftp.set_debuglevel(debugging)
	userid = passwd = acct = ''
	try:
		netrc = Netrc(rcfile)
	except IOError:
		if rcfile is not None:
			sys.stderr.write("Could not open account file"
					 " -- using anonymous login.")
	else:
		try:
			userid, passwd, acct = netrc.get_account(host)
		except KeyError:
			# no account for host
			sys.stderr.write(
				"No account -- using anonymous login.")
	ftp.login(userid, passwd, acct)
	for file in sys.argv[2:]:
		if file[:2] == '-l':
			ftp.dir(file[2:])
		elif file[:2] == '-d':
			cmd = 'CWD'
			if file[2:]: cmd = cmd + ' ' + file[2:]
			resp = ftp.sendcmd(cmd)
		elif file == '-p':
			ftp.set_pasv(not ftp.passiveserver)
		else:
			ftp.retrbinary('RETR ' + file, \
				       sys.stdout.write, 1024)
	ftp.quit()


if __name__ == '__main__':
	test()
y\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2841,12 +3436,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2869,9 +3466,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2885,38 +3482,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2928,8 +3522,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2969,39 +3563,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3012,17 +3603,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3033,41 +3624,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3076,24 +3663,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3101,9 +3686,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3127,25 +3713,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3160,17 +3739,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3181,41 +3760,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3224,24 +3799,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3249,9 +3822,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3275,25 +3849,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3308,17 +3875,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3329,41 +3896,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3372,24 +3935,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3397,9 +3958,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3423,25 +3985,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3460,17 +4015,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3481,41 +4036,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3524,24 +4075,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3549,9 +4098,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3575,25 +4125,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3662,17 +4205,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3683,41 +4226,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3726,24 +4265,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3751,9 +4288,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3777,25 +4315,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3852,17 +4383,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3873,41 +4404,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3916,24 +4443,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3941,9 +4466,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3967,25 +4493,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4000,17 +4519,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4021,41 +4540,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4064,24 +4579,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4089,9 +4602,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4115,25 +4629,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4153,18 +4660,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4175,41 +4683,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4218,24 +4722,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4243,9 +4745,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4269,25 +4772,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4307,8 +4804,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4330,39 +4827,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4373,13 +4866,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4411,8 +4904,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4425,56 +4918,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4487,8 +4977,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4501,56 +4991,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4563,8 +5050,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4577,56 +5064,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4637,8 +5121,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4651,56 +5135,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4708,8 +5189,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4722,56 +5203,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4799,9 +5277,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4827,68 +5305,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4897,8 +5367,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 -echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 +echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6; } if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4925,68 +5395,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_attr_get_np -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_attr_get_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np) +#if defined __stub_pthread_attr_get_np || defined __stub___pthread_attr_get_np choke me -#else -char (*f) () = pthread_attr_get_np; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != pthread_attr_get_np; +return pthread_attr_get_np (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pthread_attr_get_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_pthread_attr_get_np=no + ac_cv_func_pthread_attr_get_np=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6; } if test $ac_cv_func_pthread_attr_get_np = yes; then tcl_ok=yes else @@ -4999,8 +5460,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_ATTR_GET_NP 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 -echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 +echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5023,8 +5484,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6; } if test $tcl_cv_grep_pthread_attr_get_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5033,8 +5494,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 -echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 +echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6; } if test "${ac_cv_func_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5061,68 +5522,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_getattr_np -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_getattr_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np) +#if defined __stub_pthread_getattr_np || defined __stub___pthread_getattr_np choke me -#else -char (*f) () = pthread_getattr_np; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != pthread_getattr_np; +return pthread_getattr_np (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pthread_getattr_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_pthread_getattr_np=no + ac_cv_func_pthread_getattr_np=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6; } if test $ac_cv_func_pthread_getattr_np = yes; then tcl_ok=yes else @@ -5135,8 +5587,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_GETATTR_NP 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 -echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 +echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5159,8 +5611,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6; } if test $tcl_cv_grep_pthread_getattr_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5176,9 +5628,9 @@ _ACEOF for ac_func in pthread_get_stacksize_np do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5204,68 +5656,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5280,8 +5724,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5289,15 +5733,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -5309,11 +5753,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -5342,8 +5786,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5370,76 +5814,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5456,46 +5891,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5506,8 +5938,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5524,62 +5956,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5590,41 +6019,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5633,24 +6058,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5658,9 +6081,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5684,25 +6108,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5735,8 +6152,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5763,68 +6180,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5832,8 +6240,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5860,73 +6268,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5939,56 +6338,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6001,8 +6397,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6029,68 +6425,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6098,8 +6485,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6126,73 +6513,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6205,56 +6583,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6267,15 +6642,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6285,12 +6660,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6309,8 +6684,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6323,32 +6698,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6361,27 +6738,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6390,31 +6781,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6424,8 +6815,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6449,40 +6840,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6496,24 +6884,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6540,16 +6928,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6562,56 +6950,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6651,8 +7036,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6665,25 +7050,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6709,8 +7096,8 @@ fi CC=${CC}_r ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6788,12 +7175,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6813,8 +7198,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6827,56 +7212,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6908,8 +7290,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6922,56 +7304,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7032,8 +7411,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7046,56 +7425,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7165,8 +7541,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7179,56 +7555,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7360,8 +7733,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7384,40 +7757,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7514,8 +7884,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7541,8 +7911,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7573,8 +7943,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7600,8 +7970,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7665,8 +8035,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7689,40 +8059,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7731,8 +8098,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7755,40 +8122,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7814,8 +8178,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7838,40 +8202,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7890,8 +8251,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7914,40 +8275,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7974,21 +8332,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8022,35 +8380,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8061,8 +8416,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8078,8 +8433,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8103,42 +8458,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8500,8 +8852,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8524,40 +8876,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8592,13 +8941,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8743,22 +9092,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8768,8 +9117,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -8804,11 +9153,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -8829,8 +9178,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -8852,33 +9201,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8895,37 +9239,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -8957,33 +9298,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9000,37 +9336,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9062,33 +9395,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9105,37 +9433,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9148,17 +9473,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9181,35 +9506,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9231,34 +9552,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9267,20 +9585,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9302,38 +9620,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9342,8 +9656,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9365,38 +9679,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9410,9 +9720,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9438,68 +9748,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9508,8 +9810,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9531,35 +9833,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9570,11 +9868,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9584,8 +9882,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9602,7 +9900,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9611,27 +9910,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9654,40 +9948,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9697,11 +9987,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9712,27 +10002,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -9748,8 +10033,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9757,27 +10044,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9790,13 +10091,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -9825,9 +10129,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9853,68 +10157,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9938,9 +10234,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9966,88 +10262,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10074,68 +10360,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10146,8 +10423,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10174,68 +10451,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10246,8 +10514,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10274,68 +10542,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10346,8 +10605,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10374,68 +10633,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10453,8 +10703,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10481,68 +10731,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10554,8 +10795,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10582,72 +10823,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10675,38 +10907,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10724,8 +10952,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10752,72 +10980,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10848,38 +11067,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -10888,8 +11103,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10920,38 +11135,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -10971,8 +11182,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10999,72 +11210,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11095,38 +11297,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11135,8 +11333,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11167,38 +11365,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11218,8 +11412,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11246,72 +11440,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11342,38 +11527,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11382,8 +11563,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11414,38 +11595,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11465,8 +11642,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11493,72 +11670,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11589,38 +11757,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11629,8 +11793,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11661,38 +11825,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11745,8 +11905,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11773,72 +11933,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11869,38 +12020,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -11909,8 +12056,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11941,38 +12088,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -11981,8 +12124,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12011,38 +12154,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12063,8 +12202,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12091,72 +12230,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12190,38 +12320,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12230,8 +12356,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12265,38 +12391,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12330,18 +12452,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12352,41 +12475,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12395,24 +12514,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12420,9 +12537,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12446,25 +12564,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12476,8 +12588,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12505,13 +12617,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12524,8 +12645,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12549,13 +12672,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12568,8 +12700,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12595,13 +12729,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12614,8 +12757,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12643,13 +12788,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12662,8 +12816,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12690,13 +12846,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12709,8 +12874,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12738,13 +12905,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12757,12 +12933,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12792,8 +12970,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12814,42 +12992,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12872,8 +13046,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -12895,8 +13069,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12912,44 +13086,42 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -12963,18 +13135,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12985,41 +13158,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13028,24 +13197,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13053,9 +13220,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13079,25 +13247,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13109,8 +13271,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13134,38 +13296,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13174,8 +13332,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13200,33 +13358,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13247,40 +13400,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13297,8 +13447,77 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13309,52 +13528,49 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#if !HAVE_DECL_TZNAME +extern char *tzname[]; #endif int main () { -atoi(*tzname); +return tzname[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_var_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -13371,9 +13587,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13399,68 +13615,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13470,8 +13678,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13492,38 +13700,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13532,8 +13736,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13554,38 +13758,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13598,8 +13798,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13622,38 +13822,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13664,8 +13860,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13688,38 +13884,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13735,9 +13927,8 @@ _ACEOF # in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13759,33 +13950,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13803,40 +13989,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -13851,8 +14034,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13879,68 +14062,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -13957,8 +14131,8 @@ fi # data, this checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13977,9 +14151,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -13995,9 +14169,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14005,13 +14179,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14024,17 +14207,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14045,8 +14228,8 @@ esac # {The replacement define is in compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14073,68 +14256,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14158,8 +14332,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14186,68 +14360,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14255,8 +14420,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14275,13 +14440,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14294,11 +14468,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14306,12 +14482,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14325,8 +14499,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14353,68 +14527,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14422,8 +14587,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14443,13 +14608,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14462,11 +14636,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14474,12 +14650,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14492,8 +14666,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14520,68 +14694,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14589,8 +14754,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14610,13 +14775,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14629,11 +14803,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14641,12 +14817,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14661,8 +14835,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14689,68 +14863,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14758,8 +14923,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14795,13 +14960,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14814,18 +14988,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14843,8 +15017,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14855,50 +15029,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -14909,8 +15080,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14921,50 +15092,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -14975,8 +15143,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14987,62 +15155,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15064,8 +15229,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15080,8 +15245,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15107,38 +15272,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15147,8 +15308,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15159,50 +15320,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15212,8 +15370,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15238,40 +15396,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15282,8 +15436,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15294,50 +15448,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15347,8 +15498,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15374,40 +15525,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15426,8 +15573,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15454,68 +15601,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15535,8 +15673,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15562,39 +15700,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15609,8 +15744,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15637,68 +15772,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15706,8 +15832,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15720,56 +15846,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15778,8 +15901,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15792,56 +15915,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -15850,12 +15970,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15872,8 +15990,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15900,68 +16018,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -15970,8 +16079,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15998,68 +16107,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16073,8 +16173,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16097,8 +16197,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16114,8 +16214,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16137,38 +16237,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16176,8 +16272,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16201,38 +16297,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16245,8 +16337,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16281,13 +16373,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16300,11 +16401,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16318,28 +16421,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16350,41 +16453,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16393,24 +16492,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16418,9 +16515,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16444,25 +16542,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16473,8 +16564,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16496,39 +16587,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16537,8 +16624,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16550,9 +16637,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16578,68 +16665,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16650,6 +16729,72 @@ done #-------------------------------------------------------------------- +# Check for support of isnan() function or macro +#-------------------------------------------------------------------- + +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +if test "${tcl_cv_isnan+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ + +isnan(0.0); /* Generates an error if isnan is missing */ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + tcl_cv_isnan=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + tcl_cv_isnan=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } +if test $tcl_cv_isnan = no; then + +cat >>confdefs.h <<\_ACEOF +#define NO_ISNAN 1 +_ACEOF + +fi + +#-------------------------------------------------------------------- # Darwin specific API checks and defines #-------------------------------------------------------------------- @@ -16658,9 +16803,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16686,68 +16831,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16760,18 +16897,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16782,41 +16920,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16825,24 +16959,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16850,9 +16982,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16876,25 +17009,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -16910,9 +17037,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16938,68 +17065,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17013,18 +17132,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17035,41 +17155,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17078,24 +17194,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17103,9 +17217,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17129,25 +17244,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17163,9 +17272,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17191,68 +17300,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17265,9 +17366,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17293,68 +17394,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17388,18 +17481,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17410,41 +17504,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17453,24 +17543,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17478,9 +17566,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17504,25 +17593,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17535,8 +17618,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17567,40 +17650,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17621,8 +17701,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17651,39 +17731,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17704,18 +17781,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17726,41 +17804,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17769,24 +17843,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17794,9 +17866,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17820,25 +17893,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17854,18 +17921,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17876,41 +17944,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17919,24 +17983,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17944,9 +18006,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17970,25 +18033,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18001,8 +18058,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18029,12 +18086,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18047,8 +18104,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18056,27 +18113,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18084,8 +18141,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18093,24 +18150,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18134,8 +18191,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18148,8 +18205,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18157,26 +18214,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18187,41 +18244,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18230,24 +18283,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18255,9 +18306,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18281,25 +18333,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18313,8 +18358,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18330,31 +18375,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18367,15 +18413,15 @@ _ACEOF DTRACE_OBJ="\${DTRACE_OBJ}" fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # Does the C stack grow upwards or downwards? Or cross-compiling? #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5 -echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5 +echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6; } if test "${tcl_cv_stack_grows_up+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18401,13 +18447,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -18420,11 +18475,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_stack_grows_up=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5 -echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5 +echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6; } if test $tcl_cv_stack_grows_up = unknown; then cat >>confdefs.h <<\_ACEOF @@ -18466,15 +18523,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18488,16 +18545,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18509,7 +18566,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18522,7 +18579,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18689,7 +18746,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18709,39 +18766,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18750,52 +18826,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -18824,17 +18884,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -18844,8 +18932,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -18859,18 +18982,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -18878,159 +19002,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19039,7 +19124,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19048,31 +19154,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.5, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19080,30 +19169,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19111,7 +19189,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19125,18 +19203,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.5 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19147,60 +19227,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19216,40 +19278,52 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19260,521 +19334,529 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; - ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/unix/configure.in b/unix/configure.in index 82e68da..320930a 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.180 2008/03/28 17:31:47 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.181 2008/03/30 04:26:20 kennykb Exp $ AC_INIT([tcl],[8.5]) AC_PREREQ(2.59) @@ -492,6 +492,18 @@ SC_ENABLE_LANGINFO AC_CHECK_FUNCS(chflags) #-------------------------------------------------------------------- +# Check for support of isnan() function or macro +#-------------------------------------------------------------------- + +AC_CACHE_CHECK([isnan], tcl_cv_isnan, [ + AC_TRY_LINK([#include ], [ +isnan(0.0); /* Generates an error if isnan is missing */ +], tcl_cv_isnan=yes, tcl_cv_isnan=no)]) +if test $tcl_cv_isnan = no; then + AC_DEFINE(NO_ISNAN, 1, [Do we have a usable 'isnan'?]) +fi + +#-------------------------------------------------------------------- # Darwin specific API checks and defines #-------------------------------------------------------------------- -- cgit v0.12 From 888f03eb9f15b0cad13f35a6e496acd42e3b8e3e Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 30 Mar 2008 04:36:47 +0000 Subject: * generic/tclObj.c: Added missing #include needed to locate isnan() after the above change. --- ChangeLog | 2 ++ generic/tclObj.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 889cc6b..e183ba5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ is found. This change avoids bugs where the test of ((d) != (d)) is optimized away by an overaggressive compiler. [Bug 1783544] + * generic/tclObj.c: Added missing #include needed to + locate isnan() after the above change. * unix/configure: autoconf-2.61 diff --git a/generic/tclObj.c b/generic/tclObj.c index 0b2fddb..f97d236 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,12 +13,13 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.139 2007/12/13 15:23:19 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.140 2008/03/30 04:36:47 kennykb Exp $ */ #include "tclInt.h" #include "tommath.h" #include +#include /* * Table of all object types. -- cgit v0.12 From 25aa410c5ccd0dda1a7130c1eb2518a28d0e7638 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 30 Mar 2008 08:36:39 +0000 Subject: autoconf-2.59 --- unix/configure | 12417 +++++++++++++++++++++++++++---------------------------- 1 file changed, 6202 insertions(+), 6215 deletions(-) diff --git a/unix/configure b/unix/configure index 6a50e86..697cf0d 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.5. +# Generated by GNU Autoconf 2.59 for tcl 8.5. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,175 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -774,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -837,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -902,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -932,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1006,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1068,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1112,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1132,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1171,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1269,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1286,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1352,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.5 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.5, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1459,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1473,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1495,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1505,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1527,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1538,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1552,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1590,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1623,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1671,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1697,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1710,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1739,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1756,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1780,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1816,23 +1357,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } - - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1841,37 +1383,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1894,8 +1435,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1908,34 +1449,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1948,51 +1487,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2005,34 +1529,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2046,7 +1610,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2057,7 +1621,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2075,23 +1638,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2104,38 +1666,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2148,45 +1708,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2199,35 +1743,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2252,77 +1782,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2334,21 +1834,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2367,27 +1865,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2398,8 +1891,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2413,14 +1907,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2440,20 +1934,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2471,12 +1959,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2499,49 +1987,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2557,118 +2046,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2684,12 +2093,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2723,17 +2132,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2748,116 +2152,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +continue fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2890,8 +2444,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2925,22 +2479,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2949,10 +2505,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2962,22 +2517,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2988,7 +2545,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3006,8 +2562,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3030,22 +2586,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3054,10 +2612,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3067,22 +2624,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3093,7 +2652,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3116,170 +2674,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3303,31 +2714,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3383,7 +2798,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3403,27 +2817,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3436,14 +2841,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3466,9 +2869,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3482,35 +2885,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3522,8 +2928,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3563,36 +2969,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3603,17 +3012,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3624,37 +3033,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3663,22 +3076,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3686,10 +3101,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3713,18 +3127,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3739,17 +3160,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3760,37 +3181,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3799,22 +3224,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3822,10 +3249,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3849,18 +3275,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3875,17 +3308,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3896,37 +3329,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3935,22 +3372,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3958,10 +3397,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3985,18 +3423,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4015,17 +3460,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4036,37 +3481,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4075,22 +3524,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4098,10 +3549,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4125,18 +3575,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4205,17 +3662,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4226,37 +3683,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4265,22 +3726,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4288,10 +3751,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4315,18 +3777,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4383,17 +3852,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4404,37 +3873,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4443,22 +3916,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4466,10 +3941,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4493,18 +3967,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4519,17 +4000,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4540,37 +4021,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4579,22 +4064,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4602,10 +4089,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4629,18 +4115,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4660,19 +4153,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4683,37 +4175,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4722,22 +4218,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4745,10 +4243,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4772,19 +4269,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4804,8 +4307,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4827,35 +4330,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4866,13 +4373,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4904,8 +4411,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4918,53 +4425,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4977,8 +4487,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4991,53 +4501,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5050,8 +4563,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5064,53 +4577,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5121,8 +4637,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5135,53 +4651,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5189,8 +4708,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5203,53 +4722,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5277,9 +4799,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5305,60 +4827,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5367,8 +4897,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 -echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 +echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6 if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5395,59 +4925,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_attr_get_np -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_attr_get_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_pthread_attr_get_np || defined __stub___pthread_attr_get_np +#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np) choke me +#else +char (*f) () = pthread_attr_get_np; +#endif +#ifdef __cplusplus +} #endif int main () { -return pthread_attr_get_np (); +return f != pthread_attr_get_np; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_pthread_attr_get_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_pthread_attr_get_np=no +ac_cv_func_pthread_attr_get_np=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6 if test $ac_cv_func_pthread_attr_get_np = yes; then tcl_ok=yes else @@ -5460,8 +4999,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_ATTR_GET_NP 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 -echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 +echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5484,8 +5023,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6 if test $tcl_cv_grep_pthread_attr_get_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5494,8 +5033,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 -echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 +echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6 if test "${ac_cv_func_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5522,59 +5061,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_getattr_np -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_getattr_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_pthread_getattr_np || defined __stub___pthread_getattr_np +#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np) choke me +#else +char (*f) () = pthread_getattr_np; +#endif +#ifdef __cplusplus +} #endif int main () { -return pthread_getattr_np (); +return f != pthread_getattr_np; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_pthread_getattr_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_pthread_getattr_np=no +ac_cv_func_pthread_getattr_np=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6 if test $ac_cv_func_pthread_getattr_np = yes; then tcl_ok=yes else @@ -5587,8 +5135,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_GETATTR_NP 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 -echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 +echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5611,8 +5159,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6 if test $tcl_cv_grep_pthread_getattr_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5628,9 +5176,9 @@ _ACEOF for ac_func in pthread_get_stacksize_np do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5656,60 +5204,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5724,8 +5280,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5733,15 +5289,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5753,11 +5309,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5786,8 +5342,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5814,67 +5370,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5891,43 +5456,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5938,8 +5506,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5956,59 +5524,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6019,37 +5590,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6058,22 +5633,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6081,10 +5658,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6108,18 +5684,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -6152,8 +5735,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6180,59 +5763,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -6240,8 +5832,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6268,64 +5860,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6338,53 +5939,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_socket_setsockopt=yes -else + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_setsockopt=yes +else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6397,8 +6001,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6425,59 +6029,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6485,8 +6098,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6513,64 +6126,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6583,53 +6205,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6642,15 +6267,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6660,12 +6285,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6684,8 +6309,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6698,34 +6323,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6738,41 +6361,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6781,31 +6390,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6815,8 +6424,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6840,37 +6449,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6884,24 +6496,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6928,16 +6540,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6950,53 +6562,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -7036,8 +6651,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7050,27 +6665,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7096,8 +6709,8 @@ fi CC=${CC}_r ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7175,10 +6788,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7198,8 +6813,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7212,53 +6827,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7290,8 +6908,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7304,53 +6922,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7411,8 +7032,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7425,53 +7046,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7541,8 +7165,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7555,53 +7179,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7733,8 +7360,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7757,37 +7384,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7884,8 +7514,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7911,8 +7541,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7943,8 +7573,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7970,8 +7600,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -8035,8 +7665,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8059,37 +7689,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8098,8 +7731,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8122,37 +7755,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8178,8 +7814,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8202,37 +7838,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8251,8 +7890,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8275,37 +7914,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8332,21 +7974,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8380,32 +8022,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8416,8 +8061,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8433,8 +8078,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8458,39 +8103,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8852,8 +8500,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8876,37 +8524,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8941,13 +8592,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9092,22 +8743,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9117,8 +8768,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9153,11 +8804,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9178,8 +8829,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9201,28 +8852,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9239,34 +8895,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9298,28 +8957,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9336,34 +9000,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9395,28 +9062,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9433,34 +9105,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9473,17 +9148,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9506,31 +9181,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9552,31 +9231,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9585,20 +9267,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9620,34 +9302,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9656,8 +9342,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9679,34 +9365,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9720,9 +9410,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9748,60 +9438,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; #endif - -int +#ifdef __cplusplus +} +#endif + +int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9810,8 +9508,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9833,31 +9531,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9868,11 +9570,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -9882,8 +9584,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9900,8 +9602,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -9910,22 +9611,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9948,36 +9654,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9987,11 +9697,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10002,22 +9712,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10033,10 +9748,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10044,41 +9757,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10091,16 +9790,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10129,9 +9825,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10157,60 +9853,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10234,9 +9938,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10262,78 +9966,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10360,59 +10074,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10423,8 +10146,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10451,59 +10174,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10514,8 +10246,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10542,59 +10274,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10605,8 +10346,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10633,59 +10374,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -10703,8 +10453,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10731,59 +10481,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -10795,8 +10554,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10823,63 +10582,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10907,34 +10675,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10952,8 +10724,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10980,63 +10752,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11067,34 +10848,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11103,8 +10888,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11135,34 +10920,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11182,8 +10971,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11210,63 +10999,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11297,34 +11095,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11333,8 +11135,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11365,34 +11167,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11412,8 +11218,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11440,63 +11246,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11527,34 +11342,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11563,8 +11382,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11595,34 +11414,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11642,8 +11465,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11670,63 +11493,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11757,34 +11589,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11793,8 +11629,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11825,34 +11661,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11905,8 +11745,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11933,63 +11773,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12020,34 +11869,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12056,8 +11909,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12088,34 +11941,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12124,8 +11981,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12154,34 +12011,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12202,8 +12063,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12230,63 +12091,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12320,34 +12190,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12356,8 +12230,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12391,34 +12265,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12452,19 +12330,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12475,37 +12352,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12514,22 +12395,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12537,10 +12420,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12564,19 +12446,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12588,8 +12476,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12617,22 +12505,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12645,10 +12524,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12672,22 +12549,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12700,10 +12568,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12729,22 +12595,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12757,10 +12614,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12788,22 +12643,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12816,10 +12662,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12846,22 +12690,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12874,10 +12709,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12905,22 +12738,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12933,14 +12757,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12970,8 +12792,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12992,38 +12814,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13046,8 +12872,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13069,8 +12895,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13086,42 +12912,44 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h +ac_cv_struct_tm=sys/time.h fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13135,19 +12963,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13158,37 +12985,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13197,22 +13028,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13220,10 +13053,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13247,19 +13079,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13271,8 +13109,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13296,34 +13134,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13332,8 +13174,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13358,28 +13200,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13400,37 +13247,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_tm_tm_zone=no +ac_cv_member_struct_tm_tm_zone=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13447,77 +13297,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef tzname - (void) tzname; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF - - -fi - - - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6 if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13528,49 +13309,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif int main () { -return tzname[0][0]; +atoi(*tzname); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_var_tzname=no +ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -13587,9 +13371,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13615,60 +13399,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13678,8 +13470,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13700,34 +13492,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13736,8 +13532,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13758,34 +13554,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13798,8 +13598,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13822,34 +13622,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13860,8 +13664,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13884,34 +13688,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13927,8 +13735,9 @@ _ACEOF # in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } + +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13950,28 +13759,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13989,37 +13803,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14034,8 +13851,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14062,59 +13879,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14131,8 +13957,8 @@ fi # data, this checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14151,9 +13977,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14169,9 +13995,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14179,22 +14005,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14207,17 +14024,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14228,8 +14045,8 @@ esac # {The replacement define is in compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14256,59 +14073,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14332,8 +14158,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14360,59 +14186,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14420,8 +14255,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14440,22 +14275,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14468,13 +14294,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14482,10 +14306,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14499,8 +14325,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14527,59 +14353,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14587,8 +14422,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14608,22 +14443,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14636,13 +14462,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14650,10 +14474,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14666,8 +14492,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14694,59 +14520,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14754,8 +14589,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14775,22 +14610,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14803,13 +14629,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14817,10 +14641,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -14835,8 +14661,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14863,59 +14689,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14923,8 +14758,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14960,22 +14795,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14988,18 +14814,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15017,8 +14843,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15029,47 +14855,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15080,8 +14909,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15092,47 +14921,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15143,8 +14975,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15155,59 +14987,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15229,8 +15064,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15245,8 +15080,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15272,34 +15107,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15308,8 +15147,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15320,47 +15159,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15370,8 +15212,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15396,36 +15238,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15436,8 +15282,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15448,47 +15294,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15498,8 +15347,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15525,36 +15374,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15573,8 +15426,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15601,59 +15454,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15673,8 +15535,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15700,36 +15562,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15744,8 +15609,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15772,59 +15637,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15832,8 +15706,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15846,53 +15720,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15901,8 +15778,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15915,53 +15792,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -15970,10 +15850,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -15990,8 +15872,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16018,59 +15900,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16079,8 +15970,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16107,59 +15998,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16173,8 +16073,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16197,8 +16097,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16214,8 +16114,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16237,34 +16137,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16272,8 +16176,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16297,34 +16201,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16337,8 +16245,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16373,22 +16281,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16401,13 +16300,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16421,28 +16318,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16453,37 +16350,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16492,22 +16393,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16515,10 +16418,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16542,18 +16444,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16564,8 +16473,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16587,35 +16496,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16624,8 +16537,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16637,9 +16550,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16665,60 +16578,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16732,8 +16653,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16756,36 +16677,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16803,9 +16727,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16831,60 +16755,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16897,19 +16829,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16920,37 +16851,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16959,22 +16894,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16982,10 +16919,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17009,19 +16945,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17037,9 +16979,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17065,60 +17007,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17132,19 +17082,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17155,37 +17104,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17194,22 +17147,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17217,10 +17172,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17244,19 +17198,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17272,9 +17232,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17300,60 +17260,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17366,9 +17334,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17394,60 +17362,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17481,19 +17457,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17504,37 +17479,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17543,22 +17522,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17566,10 +17547,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17593,19 +17573,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17618,8 +17604,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17650,37 +17636,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17701,8 +17690,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17731,36 +17720,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17781,19 +17773,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17804,37 +17795,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17843,22 +17838,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17866,10 +17863,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17893,19 +17889,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17921,19 +17923,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17944,37 +17945,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17983,22 +17988,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18006,10 +18013,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18033,19 +18039,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18058,8 +18070,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18086,12 +18098,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18104,8 +18116,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18113,27 +18125,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18141,8 +18153,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18150,24 +18162,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18191,8 +18203,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18205,8 +18217,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18214,26 +18226,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18244,37 +18256,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18283,22 +18299,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18306,10 +18324,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18333,18 +18350,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18358,8 +18382,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18375,32 +18399,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18413,15 +18436,15 @@ _ACEOF DTRACE_OBJ="\${DTRACE_OBJ}" fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # Does the C stack grow upwards or downwards? Or cross-compiling? #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5 -echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5 +echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6 if test "${tcl_cv_stack_grows_up+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18447,22 +18470,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -18475,13 +18489,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_stack_grows_up=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5 -echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5 +echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6 if test $tcl_cv_stack_grows_up = unknown; then cat >>confdefs.h <<\_ACEOF @@ -18523,15 +18535,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18545,16 +18557,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18566,7 +18578,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18579,7 +18591,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18746,7 +18758,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18766,58 +18778,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18826,36 +18819,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -18884,45 +18893,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -18932,43 +18913,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -18982,19 +18928,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19002,120 +18947,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19124,28 +19108,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19154,14 +19117,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.5, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19169,19 +19149,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19189,7 +19180,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19203,20 +19194,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.5 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19227,42 +19216,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19278,52 +19285,40 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19334,476 +19329,368 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - case $ac_mode in - :F) - # - # CONFIG_FILE - # +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19811,52 +19698,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From fc0be09a4c67fde682808e0d83d033499c255e04 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 30 Mar 2008 08:36:58 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 986c721..179f68a 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -289,6 +289,9 @@ /* Do we have getwd() */ #undef NO_GETWD +/* Do we have a usable 'isnan'? */ +#undef NO_ISNAN + /* Do we have ? */ #undef NO_LIMITS_H -- cgit v0.12 From a0ec1a39d88a25470246b6554c5901fde0682bb6 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 1 Apr 2008 16:23:33 +0000 Subject: * README: Bump version number to 8.6a0 * generic/tcl.h: * library/init.tcl: * macosx/Tcl-Common.xcconfig: * macosx/Tcl.pbproj/default.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/README: * win/configure.in: * win/makefile.bc: * win/tcl.m4: * unix/configure: autoconf-2.59 * win/configure: * generic/tclBasic.c: Revised stubs-generation tool and interp * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present * unix/Makefile.in: in libtcl.so, but is present only in libtclstub.a. This tightens up the rules for users of the stubs interfaces. [Bug 1819422] * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclPlatDecls.h: * generic/tclTomMathDecls.h: --- ChangeLog | 31 +++++++++++++++++++++++++++++++ README | 6 +++--- generic/tcl.h | 12 ++++++------ generic/tclBasic.c | 7 +------ generic/tclDecls.h | 6 +++++- generic/tclIntDecls.h | 6 +++++- generic/tclIntPlatDecls.h | 6 +++++- generic/tclPlatDecls.h | 6 +++++- generic/tclTomMathDecls.h | 6 +++++- library/init.tcl | 4 ++-- macosx/Tcl-Common.xcconfig | 4 ++-- macosx/Tcl.pbproj/default.pbxuser | 2 +- macosx/Tcl.pbproj/project.pbxproj | 2 +- tools/genStubs.tcl | 6 +++++- tools/tcl.wse.in | 6 +++--- unix/Makefile.in | 7 +++---- unix/configure | 24 ++++++++++++------------ unix/configure.in | 10 +++++----- unix/tcl.spec | 4 ++-- win/README | 6 +++--- win/configure | 6 +++--- win/configure.in | 8 ++++---- win/makefile.bc | 4 ++-- win/makefile.vc | 4 +++- win/tcl.m4 | 28 ++++++++++++++-------------- 25 files changed, 131 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index e183ba5..967f2ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2008-04-01 Don Porter + + * README: Bump version number to 8.6a0 + * generic/tcl.h: + * library/init.tcl: + * macosx/Tcl-Common.xcconfig: + * macosx/Tcl.pbproj/default.pbxuser: + * macosx/Tcl.pbproj/project.pbxproj: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/README: + * win/configure.in: + * win/makefile.bc: + * win/tcl.m4: + + * unix/configure: autoconf-2.59 + * win/configure: + + * generic/tclBasic.c: Revised stubs-generation tool and interp + * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present + * unix/Makefile.in: in libtcl.so, but is present only in + libtclstub.a. This tightens up the rules for users of the stubs + interfaces. [Bug 1819422] + + * generic/tclDecls.h: make genstubs + * generic/tclIntDecls.h: + * generic/tclIntPlatDecls.h: + * generic/tclPlatDecls.h: + * generic/tclTomMathDecls.h: + 2008-03-30 Kevin Kenny * generic/tclInt.h (TclIsNaN): diff --git a/README b/README index 46f3f89..391ffb9 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tcl - This is the Tcl 8.5.2 source distribution. + This is the Tcl 8.6a0 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.67 2008/02/13 18:00:33 dgp Exp $ +RCS: @(#) $Id: README,v 1.68 2008/04/01 16:23:39 dgp Exp $ Contents -------- @@ -48,7 +48,7 @@ and selling it either in whole or in part. See the file Extensive documentation is available at our website. The home page for this release, including new features, is - http://www.tcl.tk/software/tcltk/8.5.html + http://www.tcl.tk/software/tcltk/8.6.html Detailed release notes can be found at the file distributions page by clicking on the relevant version. diff --git a/generic/tcl.h b/generic/tcl.h index 8f51eb1..1d4b94b 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.254 2008/03/28 17:31:44 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.255 2008/04/01 16:23:39 dgp Exp $ */ #ifndef _TCL @@ -58,12 +58,12 @@ extern "C" { */ #define TCL_MAJOR_VERSION 8 -#define TCL_MINOR_VERSION 5 -#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TCL_RELEASE_SERIAL 2 +#define TCL_MINOR_VERSION 6 +#define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE +#define TCL_RELEASE_SERIAL 0 -#define TCL_VERSION "8.5" -#define TCL_PATCH_LEVEL "8.5.2" +#define TCL_VERSION "8.6" +#define TCL_PATCH_LEVEL "8.6a0" /* * The following definitions set up the proper options for Windows compilers. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 07c2ef7..87b251f 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.295 2008/03/14 19:53:10 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.296 2008/04/01 16:23:40 dgp Exp $ */ #include "tclInt.h" @@ -810,11 +810,6 @@ Tcl_CreateInterp(void) Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs); -#ifdef Tcl_InitStubs -#undef Tcl_InitStubs -#endif - Tcl_InitStubs(interp, TCL_VERSION, 1); - if (TclTommath_Init(interp) != TCL_OK) { Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 865dd6c..db398d7 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.130 2007/12/13 15:23:16 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.131 2008/04/01 16:23:40 dgp Exp $ */ #ifndef _TCLDECLS @@ -4142,6 +4142,8 @@ typedef struct TclStubs { void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ } TclStubs; +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + #ifdef __cplusplus extern "C" { #endif @@ -4150,6 +4152,8 @@ extern TclStubs *tclStubsPtr; } #endif +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) /* diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 0ff03f9..983b39c 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.112 2008/01/23 17:31:42 dgp Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.113 2008/04/01 16:23:41 dgp Exp $ */ #ifndef _TCLINTDECLS @@ -1344,6 +1344,8 @@ typedef struct TclIntStubs { void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ } TclIntStubs; +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + #ifdef __cplusplus extern "C" { #endif @@ -1352,6 +1354,8 @@ extern TclIntStubs *tclIntStubsPtr; } #endif +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) /* diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 38563b1..7b8ab8e 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.32 2007/12/13 15:23:18 dgp Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.33 2008/04/01 16:23:41 dgp Exp $ */ #ifndef _TCLINTPLATDECLS @@ -446,6 +446,8 @@ typedef struct TclIntPlatStubs { #endif /* MACOSX */ } TclIntPlatStubs; +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + #ifdef __cplusplus extern "C" { #endif @@ -454,6 +456,8 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; } #endif +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) /* diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index c581274..1e695eb 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.27 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.28 2008/04/01 16:23:41 dgp Exp $ */ #ifndef _TCLPLATDECLS @@ -94,6 +94,8 @@ typedef struct TclPlatStubs { #endif /* MACOSX */ } TclPlatStubs; +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + #ifdef __cplusplus extern "C" { #endif @@ -102,6 +104,8 @@ extern TclPlatStubs *tclPlatStubsPtr; } #endif +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) /* diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 785c61b..d12f199 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.2 2006/11/15 14:58:27 dgp Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.3 2008/04/01 16:23:42 dgp Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -520,6 +520,8 @@ typedef struct TclTomMathStubs { int (*tclBN_s_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 60 */ } TclTomMathStubs; +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + #ifdef __cplusplus extern "C" { #endif @@ -528,6 +530,8 @@ extern TclTomMathStubs *tclTomMathStubsPtr; } #endif +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) /* diff --git a/library/init.tcl b/library/init.tcl index ef823f1..5bdbff2 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.104 2008/03/28 17:31:44 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.105 2008/04/01 16:23:42 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.5.2 +package require -exact Tcl 8.6a0 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/macosx/Tcl-Common.xcconfig b/macosx/Tcl-Common.xcconfig index 9f89d82..c26b991 100644 --- a/macosx/Tcl-Common.xcconfig +++ b/macosx/Tcl-Common.xcconfig @@ -9,7 +9,7 @@ // See the file "license.terms" for information on usage and redistribution // of this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.10 2008/03/12 22:17:57 das Exp $ +// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.11 2008/04/01 16:23:42 dgp Exp $ // HEADER_SEARCH_PATHS = "$(DERIVED_FILE_DIR)/tcl" $(HEADER_SEARCH_PATHS) @@ -40,4 +40,4 @@ TCL_CONFIGURE_ARGS = --enable-threads --enable-dtrace TCL_LIBRARY = $(LIBDIR)/tcl$(VERSION) TCL_PACKAGE_PATH = "$(LIBDIR)" TCL_DEFS = HAVE_TCL_CONFIG_H -VERSION = 8.5 +VERSION = 8.6 diff --git a/macosx/Tcl.pbproj/default.pbxuser b/macosx/Tcl.pbproj/default.pbxuser index 2472114..2ac716d 100644 --- a/macosx/Tcl.pbproj/default.pbxuser +++ b/macosx/Tcl.pbproj/default.pbxuser @@ -144,7 +144,7 @@ F98F02E608E7EF9A00D0320A = { isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; - path = tclsh8.5; + path = tclsh8.6; refType = 3; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/macosx/Tcl.pbproj/project.pbxproj b/macosx/Tcl.pbproj/project.pbxproj index 8cd58dc..e284063 100644 --- a/macosx/Tcl.pbproj/project.pbxproj +++ b/macosx/Tcl.pbproj/project.pbxproj @@ -331,7 +331,7 @@ F53ACC5C031D9D11016F146B = { isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; - path = tclsh8.5; + path = tclsh8.6; refType = 3; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 5bc3984..eceea00 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.22 2007/12/13 15:28:40 dgp Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.23 2008/04/01 16:23:42 dgp Exp $ package require Tcl 8.4 @@ -972,6 +972,7 @@ proc genStubs::emitMacros {name textVar} { proc genStubs::emitHeader {name} { variable outDir variable hooks + variable libraryName set capName [string toupper [string index $name 0]] append capName [string range $name 1 end] @@ -995,9 +996,12 @@ proc genStubs::emitHeader {name} { append text "} ${capName}Stubs;\n" + set upName [string toupper $libraryName] + append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n" append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n" append text "extern ${capName}Stubs *${name}StubsPtr;\n" append text "#ifdef __cplusplus\n}\n#endif\n" + append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n" emitMacros $name text diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in index a732b25..e5914fc 100644 --- a/tools/tcl.wse.in +++ b/tools/tcl.wse.in @@ -1,7 +1,7 @@ Document Type: WSE item: Global Version=6.01 - Title=Tcl 8.5 for Windows Installation + Title=Tcl 8.6 for Windows Installation Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Japanese Font Name=MS Gothic @@ -12,7 +12,7 @@ item: Global Log Pathname=%MAINDIR%\INSTALL.LOG Message Font=MS Sans Serif Font Size=8 - Disk Label=tcl8.5.2 + Disk Label=tcl8.6a0 Disk Filename=setup Patch Flags=0000000000000001 Patch Threshold=85 @@ -42,7 +42,7 @@ item: End Block end item: Set Variable Variable=VER - Value=8.5 + Value=8.6 end item: Set Variable Variable=PATCHLEVEL diff --git a/unix/Makefile.in b/unix/Makefile.in index de79f1c..cbc5594 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.229 2008/03/12 09:51:39 hobbs Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.230 2008/04/01 16:23:42 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -291,7 +291,7 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclResolve.o tclResult.o tclScan.o tclStringObj.o \ tclStrToD.o tclThread.o \ tclThreadAlloc.o tclThreadJoin.o tclThreadStorage.o tclStubInit.o \ - tclStubLib.o tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o \ + tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o \ tclTomMathInterface.o TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \ @@ -408,7 +408,6 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclResult.c \ $(GENERIC_DIR)/tclScan.c \ $(GENERIC_DIR)/tclStubInit.c \ - $(GENERIC_DIR)/tclStubLib.c \ $(GENERIC_DIR)/tclStringObj.c \ $(GENERIC_DIR)/tclStrToD.c \ $(GENERIC_DIR)/tclTest.c \ @@ -751,7 +750,7 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs else true; \ fi; \ done; - @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5; \ + @for i in opt0.4 http1.0 encoding ../tcl8 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6; \ do \ if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \ echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \ diff --git a/unix/configure b/unix/configure index 697cf0d..65fa543 100755 --- a/unix/configure +++ b/unix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.5. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -267,8 +267,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' -PACKAGE_VERSION='8.5' -PACKAGE_STRING='tcl 8.5' +PACKAGE_VERSION='8.6' +PACKAGE_STRING='tcl 8.6' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -777,7 +777,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tcl 8.5 to adapt to many kinds of systems. +\`configure' configures tcl 8.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -834,7 +834,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tcl 8.5:";; + short | recursive ) echo "Configuration of tcl 8.6:";; esac cat <<\_ACEOF @@ -978,7 +978,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -tcl configure 8.5 +tcl configure 8.6 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -992,7 +992,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tcl $as_me 8.5, which was +It was created by tcl $as_me 8.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1332,10 +1332,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -TCL_VERSION=8.5 +TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 -TCL_MINOR_VERSION=5 -TCL_PATCH_LEVEL=".2" +TCL_MINOR_VERSION=6 +TCL_PATCH_LEVEL="a0" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ @@ -19140,7 +19140,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by tcl $as_me 8.5, which was +This file was extended by tcl $as_me 8.6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19198,7 +19198,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -tcl config.status 8.5 +tcl config.status 8.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/unix/configure.in b/unix/configure.in index 320930a..f59e281 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,9 +3,9 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.181 2008/03/30 04:26:20 kennykb Exp $ +# RCS: @(#) $Id: configure.in,v 1.182 2008/04/01 16:23:44 dgp Exp $ -AC_INIT([tcl],[8.5]) +AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) dnl This is only used when included from macosx/configure.ac @@ -24,10 +24,10 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ #endif /* _TCLCONFIG */]) ]) -TCL_VERSION=8.5 +TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 -TCL_MINOR_VERSION=5 -TCL_PATCH_LEVEL=".2" +TCL_MINOR_VERSION=6 +TCL_PATCH_LEVEL="a0" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/tcl.spec b/unix/tcl.spec index 1799203..39bc504 100644 --- a/unix/tcl.spec +++ b/unix/tcl.spec @@ -1,11 +1,11 @@ -# $Id: tcl.spec,v 1.37 2008/03/28 17:31:48 dgp Exp $ +# $Id: tcl.spec,v 1.38 2008/04/01 16:23:45 dgp Exp $ # This file is the basis for a binary Tcl RPM for Linux. %{!?directory:%define directory /usr/local} Name: tcl Summary: Tcl scripting language development environment -Version: 8.5.2 +Version: 8.6a0 Release: 2 License: BSD Group: Development/Languages diff --git a/win/README b/win/README index a4d6386..e978305 100644 --- a/win/README +++ b/win/README @@ -1,6 +1,6 @@ -Tcl 8.5 for Windows +Tcl 8.6 for Windows -RCS: @(#) $Id: README,v 1.37 2007/12/14 21:02:05 hobbs Exp $ +RCS: @(#) $Id: README,v 1.38 2008/04/01 16:23:45 dgp Exp $ 1. Introduction --------------- @@ -21,7 +21,7 @@ when compiling Tcl extensions that will be dynamically loaded. In order to compile Tcl for Windows, you need the following: - Tcl 8.5 Source Distribution (plus any patches) + Tcl 8.6 Source Distribution (plus any patches) and diff --git a/win/configure b/win/configure index afe600c..e10d319 100755 --- a/win/configure +++ b/win/configure @@ -1269,10 +1269,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # /bin/sh. The bash shell seems to suffer from some strange failures. SHELL=/bin/sh -TCL_VERSION=8.5 +TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 -TCL_MINOR_VERSION=5 -TCL_PATCH_LEVEL=".2" +TCL_MINOR_VERSION=6 +TCL_PATCH_LEVEL="a0" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index 750c1b9..8beb3af 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.104 2008/03/28 17:31:48 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.105 2008/04/01 16:23:45 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -13,10 +13,10 @@ AC_PREREQ(2.59) # /bin/sh. The bash shell seems to suffer from some strange failures. SHELL=/bin/sh -TCL_VERSION=8.5 +TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 -TCL_MINOR_VERSION=5 -TCL_PATCH_LEVEL=".2" +TCL_MINOR_VERSION=6 +TCL_PATCH_LEVEL="a0" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/makefile.bc b/win/makefile.bc index f750555..629768c 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -124,8 +124,8 @@ CFG_ENCODING = \"cp1252\" NAMEPREFIX = tcl STUBPREFIX = $(NAMEPREFIX)stub -DOTVERSION = 8.5 -VERSION = 85 +DOTVERSION = 8.6 +VERSION = 86 DDEVERSION = 13 DDEDOTVERSION = 1.3 diff --git a/win/makefile.vc b/win/makefile.vc index 43cd63e..f969775 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2004 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.175 2007/12/14 02:27:11 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.176 2008/04/01 16:23:45 dgp Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -942,6 +942,8 @@ install-libraries: tclConfig install-msgs install-tzdata $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform" @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5$(NULL)" \ $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5" + @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.6$(NULL)" \ + $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.6" @echo Installing header files @$(CPY) "$(GENERICDIR)\tcl.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tclDecls.h" "$(INCLUDE_INSTALL_DIR)\" diff --git a/win/tcl.m4 b/win/tcl.m4 index 833680f..59b51c9 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -20,15 +20,15 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ AC_MSG_CHECKING([the location of tclConfig.sh]) - if test -d ../../tcl8.5$1/win; then - TCL_BIN_DIR_DEFAULT=../../tcl8.5$1/win - elif test -d ../../tcl8.5/win; then - TCL_BIN_DIR_DEFAULT=../../tcl8.5/win + if test -d ../../tcl8.6$1/win; then + TCL_BIN_DIR_DEFAULT=../../tcl8.6$1/win + elif test -d ../../tcl8.6/win; then + TCL_BIN_DIR_DEFAULT=../../tcl8.6/win else TCL_BIN_DIR_DEFAULT=../../tcl/win fi - AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.5 binaries from DIR], + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.6 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`) if test ! -d $TCL_BIN_DIR; then AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) @@ -60,15 +60,15 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ AC_DEFUN([SC_PATH_TKCONFIG], [ AC_MSG_CHECKING([the location of tkConfig.sh]) - if test -d ../../tk8.5$1/win; then - TK_BIN_DIR_DEFAULT=../../tk8.5$1/win - elif test -d ../../tk8.5/win; then - TK_BIN_DIR_DEFAULT=../../tk8.5/win + if test -d ../../tk8.6$1/win; then + TK_BIN_DIR_DEFAULT=../../tk8.6$1/win + elif test -d ../../tk8.6/win; then + TK_BIN_DIR_DEFAULT=../../tk8.6/win else TK_BIN_DIR_DEFAULT=../../tk/win fi - AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.5 binaries from DIR], + AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.6 binaries from DIR], TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`) if test ! -d $TK_BIN_DIR; then AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist) @@ -796,13 +796,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ #------------------------------------------------------------------------ AC_DEFUN([SC_WITH_TCL], [ - if test -d ../../tcl8.5$1/win; then - TCL_BIN_DEFAULT=../../tcl8.5$1/win + if test -d ../../tcl8.6$1/win; then + TCL_BIN_DEFAULT=../../tcl8.6$1/win else - TCL_BIN_DEFAULT=../../tcl8.5/win + TCL_BIN_DEFAULT=../../tcl8.6/win fi - AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.5 binaries from DIR], + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.6 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) if test ! -d $TCL_BIN_DIR; then AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) -- cgit v0.12 From f8ac84de9aeea3aad16ee2b8e29af4b5b9ad91e0 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 1 Apr 2008 19:22:45 +0000 Subject: * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message. --- ChangeLog | 2 ++ generic/tclStubLib.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 967f2ae..62e93d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-04-01 Don Porter + * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message. + * README: Bump version number to 8.6a0 * generic/tcl.h: * library/init.tcl: diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 3457307..fd7061f 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.21 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.22 2008/04/01 19:22:47 dgp Exp $ */ /* @@ -123,6 +123,8 @@ Tcl_InitStubs( p++; q++; } if (*p) { + /* Construct error message */ + Tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL); return NULL; } } else { -- cgit v0.12 From 00989310d72fd83734600742be9a06dae2ebe48b Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 1 Apr 2008 19:26:35 +0000 Subject: * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message. * generic/tclPkg.c (Tcl_PkgInitStubsCheck): --- ChangeLog | 1 + generic/tclPkg.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 62e93d8..895a5f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-04-01 Don Porter * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message. + * generic/tclPkg.c (Tcl_PkgInitStubsCheck): * README: Bump version number to 8.6a0 * generic/tcl.h: diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 8f9ec50..24f3e62 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.34 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.35 2008/04/01 19:26:36 dgp Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -1868,6 +1868,8 @@ Tcl_PkgInitStubsCheck( } if (count == 1) { if (0 != strncmp(version, actualVersion, strlen(version))) { + /* Construct error message */ + Tcl_PkgPresent(interp, "Tcl", version, 1); return NULL; } } else { -- cgit v0.12 From cd8055c7353838a9624308ed822c450b18d15d4a Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 1 Apr 2008 20:08:20 +0000 Subject: * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp * unix/tcl.m4: rounding setup on solaris x86, native cc), provided by Michael Schlenker. --- ChangeLog | 6 ++++++ generic/tclStrToD.c | 21 ++++++++++++++++++++- unix/tcl.m4 | 23 +++++++++++++++++++++-- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 895a5f6..ae1947d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-01 Andreas Kupries + + * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp + * unix/tcl.m4: rounding setup on solaris x86, native cc), provided + by Michael Schlenker. + 2008-04-01 Don Porter * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message. diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index e5e863b..2b4cde7 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.33 2008/03/13 17:14:19 dgp Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.34 2008/04/01 20:08:22 andreas_kupries Exp $ * *---------------------------------------------------------------------- */ @@ -61,6 +61,13 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); # define ADJUST_FPU_CONTROL_WORD #endif +/* Sun ProC needs sunmath for rounding control on x86 like gcc above. + * + * + */ +#if defined(__sun) && defined(__i386) && !defined(__GNUC__) +#include +#endif /* * HP's PA_RISC architecture uses 7ff4000000000000 to represent a quiet NaN. * Everyone else uses 7ff8000000000000. (Why, HP, why?) @@ -1309,6 +1316,9 @@ MakeLowPrecisionDouble( _FPU_GETCW(oldRoundingMode); _FPU_SETCW(roundTo53Bits); #endif +#if defined(__sun) && defined(__i386) && !defined(__GNUC__) + ieee_flags("set","precision","double",NULL); +#endif /* * Test for the easy cases. @@ -1381,6 +1391,9 @@ MakeLowPrecisionDouble( #if defined(__GNUC__) && defined(__i386) _FPU_SETCW(oldRoundingMode); #endif +#if defined(__sun) && defined(__i386) && !defined(__GNUC__) + ieee_flags("clear","precision",NULL,NULL); +#endif return retval; } @@ -1427,6 +1440,9 @@ MakeHighPrecisionDouble( _FPU_GETCW(oldRoundingMode); _FPU_SETCW(roundTo53Bits); #endif +#if defined(__sun) && defined(__i386) && !defined(__GNUC__) + ieee_flags("set","precision","double",NULL); +#endif /* * Quick checks for over/underflow. @@ -1485,6 +1501,9 @@ MakeHighPrecisionDouble( #if defined(__GNUC__) && defined(__i386) _FPU_SETCW(oldRoundingMode); #endif +#if defined(__sun) && defined(__i386) && !defined(__GNUC__) + ieee_flags("clear","precision",NULL,NULL); +#endif return retval; } diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 0b69ba0..1550ab0 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1931,6 +1931,24 @@ dnl AC_CHECK_TOOL(AR, ar) ], [AC_MSG_WARN([64bit mode not supported for $arch])])]) ]) + #-------------------------------------------------------------------- + # On Solaris 5.x i386 with the sunpro compiler we need to link + # with sunmath to get floating point rounding control + #-------------------------------------------------------------------- + AS_IF([test "$GCC" = yes],[use_sunmath=no],[ + arch=`isainfo` + AC_MSG_CHECKING([whether to use -lsunmath for fp rounding control]) + AS_IF([test "$arch" = "amd64 i386"], [ + AC_MSG_RESULT([yes]) + MATH_LIBS="-lsunmath $MATH_LIBS" + AC_CHECK_HEADER(sunmath.h) + use_sunmath=yes + ], [ + AC_MSG_RESULT([no]) + use_sunmath=no + ]) + ]) + # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. @@ -1952,11 +1970,12 @@ dnl AC_CHECK_TOOL(AR, ar) #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" ]) ], [ + AS_IF([test "$use_sunmath" = yes], [textmode=textoff],[textmode=text]) case $system in SunOS-5.[[1-9]][[0-9]]*) - SHLIB_LD='${CC} -G -z text ${LDFLAGS}';; + SHLIB_LD="${CC} -G -z $textmode \${LDFLAGS}";; *) - SHLIB_LD='/usr/ccs/bin/ld -G -z text';; + SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";; esac CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' -- cgit v0.12 From bc40ffb339946efb1604c99508977df43659a1a6 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 1 Apr 2008 20:12:39 +0000 Subject: Regen'd --- unix/configure | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 177 insertions(+), 2 deletions(-) diff --git a/unix/configure b/unix/configure index 65fa543..acbee49 100755 --- a/unix/configure +++ b/unix/configure @@ -8452,6 +8452,175 @@ fi fi + #-------------------------------------------------------------------- + # On Solaris 5.x i386 with the sunpro compiler we need to link + # with sunmath to get floating point rounding control + #-------------------------------------------------------------------- + if test "$GCC" = yes; then + use_sunmath=no +else + + arch=`isainfo` + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + if test "$arch" = "amd64 i386"; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + MATH_LIBS="-lsunmath $MATH_LIBS" + if test "${ac_cv_header_sunmath_h+set}" = set; then + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +if test "${ac_cv_header_sunmath_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sunmath.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sunmath.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sunmath.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sunmath.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sunmath.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +if test "${ac_cv_header_sunmath_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sunmath_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 + +fi + + + use_sunmath=yes + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + use_sunmath=no + +fi + + +fi + + # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. @@ -8479,11 +8648,17 @@ fi else + if test "$use_sunmath" = yes; then + textmode=textoff +else + textmode=text +fi + case $system in SunOS-5.[1-9][0-9]*) - SHLIB_LD='${CC} -G -z text ${LDFLAGS}';; + SHLIB_LD="${CC} -G -z $textmode \${LDFLAGS}";; *) - SHLIB_LD='/usr/ccs/bin/ld -G -z text';; + SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";; esac CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' -- cgit v0.12 From d8c16dbe9e3c9cf9c149c2a3e75bd7b99a72d8bc Mon Sep 17 00:00:00 2001 From: das Date: Tue, 1 Apr 2008 21:40:24 +0000 Subject: (SunOS-5.1x): quote CC var to allow make-time override sync with tcl/unix/tcl.m4 changes --- unix/tcl.m4 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 1550ab0..6b09a17 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1454,10 +1454,6 @@ dnl AC_CHECK_TOOL(AR, ar) # files in compat/*.c is being linked in. AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"]) - - # XIM peeking works under XFree86. - AC_DEFINE(PEEK_XCLOSEIM, 1, [May we use XIM peeking safely?]) - ;; GNU*) SHLIB_CFLAGS="-fPIC" @@ -1973,7 +1969,7 @@ dnl AC_CHECK_TOOL(AR, ar) AS_IF([test "$use_sunmath" = yes], [textmode=textoff],[textmode=text]) case $system in SunOS-5.[[1-9]][[0-9]]*) - SHLIB_LD="${CC} -G -z $textmode \${LDFLAGS}";; + SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";; *) SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";; esac -- cgit v0.12 From 41c2ec7a6bbddf50aad79b76c7a14854813fb370 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 1 Apr 2008 21:41:25 +0000 Subject: autoconf-2.59 --- unix/configure | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/unix/configure b/unix/configure index acbee49..322ea5b 100755 --- a/unix/configure +++ b/unix/configure @@ -7439,14 +7439,6 @@ fi CFLAGS="$CFLAGS -fno-inline" fi - - # XIM peeking works under XFree86. - -cat >>confdefs.h <<\_ACEOF -#define PEEK_XCLOSEIM 1 -_ACEOF - - ;; GNU*) SHLIB_CFLAGS="-fPIC" @@ -8656,7 +8648,7 @@ fi case $system in SunOS-5.[1-9][0-9]*) - SHLIB_LD="${CC} -G -z $textmode \${LDFLAGS}";; + SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";; *) SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";; esac -- cgit v0.12 From a6b4b354c03294e4796b0b8c9d7b8f8cc7229b4c Mon Sep 17 00:00:00 2001 From: das Date: Tue, 1 Apr 2008 21:41:51 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 179f68a..8848a62 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -340,9 +340,6 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* May we use XIM peeking safely? */ -#undef PEEK_XCLOSEIM - /* Is this a static build? */ #undef STATIC_BUILD -- cgit v0.12 From 4910cd294dec3c7b5faaf00b4ddbea754d14779a Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 2 Apr 2008 03:37:31 +0000 Subject: * generic/tclStubLib.c: Removed needless #ifdef complexity. --- ChangeLog | 2 ++ generic/tclStubLib.c | 13 +------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae1947d..1587082 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ 2008-04-01 Don Porter + * generic/tclStubLib.c: Removed needless #ifdef complexity. + * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message. * generic/tclPkg.c (Tcl_PkgInitStubsCheck): diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index fd7061f..0ba42d5 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.22 2008/04/01 19:22:47 dgp Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.23 2008/04/02 03:37:32 dgp Exp $ */ /* @@ -20,10 +20,7 @@ * including the rest of the stub functions. */ -#ifndef USE_TCL_STUBS #define USE_TCL_STUBS -#endif -#undef USE_TCL_STUB_PROCS #include "tclInt.h" @@ -80,10 +77,6 @@ static int isDigit(const int c) *---------------------------------------------------------------------- */ -#ifdef Tcl_InitStubs -#undef Tcl_InitStubs -#endif - CONST char * Tcl_InitStubs( Tcl_Interp *interp, @@ -166,10 +159,6 @@ Tcl_InitStubs( *---------------------------------------------------------------------- */ -#ifdef TclTomMathInitializeStubs -#undef TclTomMathInitializeStubs -#endif - CONST char* TclTomMathInitializeStubs( Tcl_Interp* interp, /* Tcl interpreter */ -- cgit v0.12 From cea4bab1e44789d1caa0e2edecd71b5bfcdac1df Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 2 Apr 2008 04:25:13 +0000 Subject: * generic/tclBasic.c: Revised stubs-generation tool and interp * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present * unix/Makefile.in: in libtcl.so, but is present only in * win/Makefile.in: libtclstub.a. This tightens up the rules for users of the stubs interfaces. [Bug 1819422] --- ChangeLog | 4 ++-- win/Makefile.in | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1587082..80c04c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,8 +31,8 @@ * generic/tclBasic.c: Revised stubs-generation tool and interp * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present * unix/Makefile.in: in libtcl.so, but is present only in - libtclstub.a. This tightens up the rules for users of the stubs - interfaces. [Bug 1819422] + * win/Makefile.in: libtclstub.a. This tightens up the rules for + users of the stubs interfaces. [Bug 1819422] * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: diff --git a/win/Makefile.in b/win/Makefile.in index f453595..7d71edf 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.124 2008/03/12 09:51:39 hobbs Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.125 2008/04/02 04:25:14 dgp Exp $ VERSION = @TCL_VERSION@ @@ -267,7 +267,6 @@ GENERIC_OBJS = \ tclStringObj.$(OBJEXT) \ tclStrToD.$(OBJEXT) \ tclStubInit.$(OBJEXT) \ - tclStubLib.$(OBJEXT) \ tclThread.$(OBJEXT) \ tclThreadAlloc.$(OBJEXT) \ tclThreadJoin.$(OBJEXT) \ @@ -391,7 +390,7 @@ winhelp: $(ROOT_DIR)/tools/man2help.tcl $(MAN2TCL) $(MAN2TCL): $(ROOT_DIR)/tools/man2tcl.c $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(ROOT_DIR_NATIVE)"/tools/man2tcl.c -$(TCLSH): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) +$(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -- cgit v0.12 From f4e73527836ef586247d16d1d93742e37025284f Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 2 Apr 2008 04:27:24 +0000 Subject: * generic/tclBasic.c: Revised stubs-generation tool and interp * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present * unix/Makefile.in: in libtcl.so, but is present only in * win/Makefile.in: libtclstub.a. This tightens up the rules for * win/makefile.bc: users of the stubs interfaces. [Bug 1819422] * win/makefile.vc: --- ChangeLog | 3 ++- win/makefile.bc | 1 - win/makefile.vc | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80c04c0..03cfb3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,7 +32,8 @@ * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present * unix/Makefile.in: in libtcl.so, but is present only in * win/Makefile.in: libtclstub.a. This tightens up the rules for - users of the stubs interfaces. [Bug 1819422] + * win/makefile.bc: users of the stubs interfaces. [Bug 1819422] + * win/makefile.vc: * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: diff --git a/win/makefile.bc b/win/makefile.bc index 629768c..481ecd3 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -246,7 +246,6 @@ TCLOBJS = \ $(TMPDIR)\tclScan.obj \ $(TMPDIR)\tclStringObj.obj \ $(TMPDIR)\tclStubInit.obj \ - $(TMPDIR)\tclStubLib.obj \ $(TMPDIR)\tclThread.obj \ $(TMPDIR)\tclThreadJoin.obj \ $(TMPDIR)\tclTimer.obj \ diff --git a/win/makefile.vc b/win/makefile.vc index f969775..3a5ada9 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2004 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.176 2008/04/01 16:23:45 dgp Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.177 2008/04/02 04:27:25 dgp Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -298,7 +298,6 @@ TCLOBJS = \ $(TMP_DIR)\tclStringObj.obj \ $(TMP_DIR)\tclStrToD.obj \ $(TMP_DIR)\tclStubInit.obj \ - $(TMP_DIR)\tclStubLib.obj \ $(TMP_DIR)\tclThread.obj \ $(TMP_DIR)\tclThreadAlloc.obj \ $(TMP_DIR)\tclThreadJoin.obj \ -- cgit v0.12 From e1d96cff90ac8c37cb05dbb8d8c46a693024d178 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 2 Apr 2008 20:26:08 +0000 Subject: * generic/tclIO.c (CopyData): Applied patch for the fcopy problem [Bug 780533], with many thanks to Alexandre Ferrieux for tracking it down and providing a solution. Still have to convert his test script into a proper test case. --- ChangeLog | 8 ++++++++ generic/tclIO.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03cfb3a..b546bf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-04-02 Andreas Kupries + + * generic/tclIO.c (CopyData): Applied patch for the fcopy problem + [Bug 780533], with many thanks to Alexandre Ferrieux + for tracking it down and + providing a solution. Still have to convert his test script into + a proper test case. + 2008-04-01 Andreas Kupries * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp diff --git a/generic/tclIO.c b/generic/tclIO.c index 4caa474..c153e0f 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.137 2008/01/20 21:16:15 hobbs Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.138 2008/04/02 20:26:09 andreas_kupries Exp $ */ #include "tclInt.h" @@ -8731,7 +8731,7 @@ CopyData( * don't starve the rest of the system. */ - if (cmdPtr) { + if (cmdPtr && (csPtr->toRead != 0)) { /* * The first time we enter this code, there won't be a channel * handler established yet, so do it here. -- cgit v0.12 From 7d7777702e9483612dda3a16c4ef7ee0f1259093 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 2 Apr 2008 21:27:44 +0000 Subject: * generic/tcl.decls: remove 'export' declarations of symbols now only in libtclstub and no longer in libtcl. --- generic/tcl.decls | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index ecc0415..3616299 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.131 2008/03/19 16:56:13 das Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.132 2008/04/02 21:27:44 das Exp $ library tcl @@ -2149,35 +2149,9 @@ export { void Tcl_Main(int argc, char **argv, Tcl_AppInitProc *appInitProc) } export { - CONST char *Tcl_InitStubs(Tcl_Interp *interp, CONST char *version, - int exact) -} -export { - CONST char *TclTomMathInitializeStubs(Tcl_Interp* interp, - CONST char* version, int epoch, int revision) -} -export { CONST char *Tcl_PkgInitStubsCheck(Tcl_Interp *interp, CONST char *version, int exact) } export { void Tcl_GetMemoryInfo(Tcl_DString *dsPtr) } - -# Global variables that need to be exported from the tcl shared library. - -export { - TclStubs *tclStubsPtr (fool checkstubs) -} -export { - TclPlatStubs *tclPlatStubsPtr (fool checkstubs) -} -export { - TclIntStubs *tclIntStubsPtr (fool checkstubs) -} -export { - TclIntPlatStubs *tclIntPlatStubsPtr (fool checkstubs) -} -export { - TclTomMathStubs* tclTomMathStubsPtr (fool checkstubs) -} -- cgit v0.12 From 039faefdd7231c1ffac3a2f89d3fe4d9ca05049c Mon Sep 17 00:00:00 2001 From: das Date: Wed, 2 Apr 2008 21:29:05 +0000 Subject: * generic/tclStubLib.c: make symbols in libtclstub.a MODULE_SCOPE to * tools/genStubs.tcl: avoid exporting them from libraries that link with -ltclstub; constify tcl*StubsPtr and stub table hook pointers. [Bug 1819422] --- ChangeLog | 28 ++++++++++++++++++++++------ generic/tclStubLib.c | 24 +++++++++++++----------- tools/genStubs.tcl | 12 +++++------- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index b546bf0..074f952 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,32 @@ +2008-04-02 Daniel Steffen + + * generic/tcl.decls: remove 'export' declarations of symbols now + only in libtclstub and no longer in libtcl. + + * generic/tclStubLib.c: make symbols in libtclstub.a MODULE_SCOPE to + * tools/genStubs.tcl: avoid exporting them from libraries that link + with -ltclstub; constify tcl*StubsPtr and stub + table hook pointers. [Bug 1819422] + + * generic/tclDecls.h: make genstubs + * generic/tclIntDecls.h: + * generic/tclIntPlatDecls.h: + * generic/tclPlatDecls.h: + * generic/tclStubInit.c: + * generic/tclTomMathDecls.h: + 2008-04-02 Andreas Kupries - * generic/tclIO.c (CopyData): Applied patch for the fcopy problem - [Bug 780533], with many thanks to Alexandre Ferrieux - for tracking it down and - providing a solution. Still have to convert his test script into - a proper test case. + * generic/tclIO.c (CopyData): Applied patch for fcopy problem + [Bug 780533], with many thanks to Alexandre Ferrieux + for tracking it down and providing a + solution. Still have to convert his test script into a proper test case 2008-04-01 Andreas Kupries * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp * unix/tcl.m4: rounding setup on solaris x86, native cc), provided - by Michael Schlenker. + by Michael Schlenker. 2008-04-01 Don Porter diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 0ba42d5..a724a09 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.23 2008/04/02 03:37:32 dgp Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.24 2008/04/02 21:29:05 das Exp $ */ /* @@ -24,15 +24,17 @@ #include "tclInt.h" -/* - * Tcl_InitStubs and stub table pointers are built as exported symbols. - */ +MODULE_SCOPE const TclStubs *tclStubsPtr; +MODULE_SCOPE const TclPlatStubs *tclPlatStubsPtr; +MODULE_SCOPE const TclIntStubs *tclIntStubsPtr; +MODULE_SCOPE const TclIntPlatStubs *tclIntPlatStubsPtr; +MODULE_SCOPE const TclTomMathStubs* tclTomMathStubsPtr; -TclStubs *tclStubsPtr = NULL; -TclPlatStubs *tclPlatStubsPtr = NULL; -TclIntStubs *tclIntStubsPtr = NULL; -TclIntPlatStubs *tclIntPlatStubsPtr = NULL; -TclTomMathStubs* tclTomMathStubsPtr = NULL; +const TclStubs *tclStubsPtr = NULL; +const TclPlatStubs *tclPlatStubsPtr = NULL; +const TclIntStubs *tclIntStubsPtr = NULL; +const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; +const TclTomMathStubs* tclTomMathStubsPtr = NULL; static TclStubs * HasStubSupport( @@ -77,7 +79,7 @@ static int isDigit(const int c) *---------------------------------------------------------------------- */ -CONST char * +MODULE_SCOPE CONST char * Tcl_InitStubs( Tcl_Interp *interp, CONST char *version, @@ -159,7 +161,7 @@ Tcl_InitStubs( *---------------------------------------------------------------------- */ -CONST char* +MODULE_SCOPE CONST char* TclTomMathInitializeStubs( Tcl_Interp* interp, /* Tcl interpreter */ CONST char* version, /* Tcl version needed */ diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index eceea00..0f69997 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.23 2008/04/01 16:23:42 dgp Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.24 2008/04/02 21:29:05 das Exp $ package require Tcl 8.4 @@ -984,13 +984,13 @@ proc genStubs::emitHeader {name} { foreach hook $hooks($name) { set capHook [string toupper [string index $hook 0]] append capHook [string range $hook 1 end] - append text " struct ${capHook}Stubs *${hook}Stubs;\n" + append text " CONST struct ${capHook}Stubs *${hook}Stubs;\n" } append text "} ${capName}StubHooks;\n" } append text "\ntypedef struct ${capName}Stubs {\n" append text " int magic;\n" - append text " struct ${capName}StubHooks *hooks;\n\n" + append text " CONST struct ${capName}StubHooks *hooks;\n\n" emitSlots $name text @@ -998,9 +998,7 @@ proc genStubs::emitHeader {name} { set upName [string toupper $libraryName] append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n" - append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n" - append text "extern ${capName}Stubs *${name}StubsPtr;\n" - append text "#ifdef __cplusplus\n}\n#endif\n" + append text "EXTERN CONST ${capName}Stubs *${name}StubsPtr;" append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n" emitMacros $name text @@ -1050,7 +1048,7 @@ proc genStubs::emitInit {name textVar} { append capName [string range $name 1 end] if {[info exists hooks($name)]} { - append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n" + append text "\nstatic const ${capName}StubHooks ${name}StubHooks = \{\n" set sep " " foreach sub $hooks($name) { append text $sep "&${sub}Stubs" -- cgit v0.12 From b8976fa1042002dfdf6692b7ae8b215423087d24 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 2 Apr 2008 21:30:03 +0000 Subject: * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclPlatDecls.h: * generic/tclStubInit.c: * generic/tclTomMathDecls.h: --- generic/tclDecls.h | 20 ++++++-------------- generic/tclIntDecls.h | 14 +++----------- generic/tclIntPlatDecls.h | 14 +++----------- generic/tclPlatDecls.h | 14 +++----------- generic/tclStubInit.c | 4 ++-- generic/tclTomMathDecls.h | 14 +++----------- 6 files changed, 20 insertions(+), 60 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index db398d7..0a1d735 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.131 2008/04/01 16:23:40 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.132 2008/04/02 21:30:03 das Exp $ */ #ifndef _TCLDECLS @@ -3503,14 +3503,14 @@ EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, #endif typedef struct TclStubHooks { - struct TclPlatStubs *tclPlatStubs; - struct TclIntStubs *tclIntStubs; - struct TclIntPlatStubs *tclIntPlatStubs; + CONST struct TclPlatStubs *tclPlatStubs; + CONST struct TclIntStubs *tclIntStubs; + CONST struct TclIntPlatStubs *tclIntPlatStubs; } TclStubHooks; typedef struct TclStubs { int magic; - struct TclStubHooks *hooks; + CONST struct TclStubHooks *hooks; int (*tcl_PkgProvideEx) (Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData); /* 0 */ CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 1 */ @@ -4143,15 +4143,7 @@ typedef struct TclStubs { } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -#ifdef __cplusplus -extern "C" { -#endif -extern TclStubs *tclStubsPtr; -#ifdef __cplusplus -} -#endif - +EXTERN CONST TclStubs *tclStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 983b39c..04501dd 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.113 2008/04/01 16:23:41 dgp Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.114 2008/04/02 21:30:04 das Exp $ */ #ifndef _TCLINTDECLS @@ -1079,7 +1079,7 @@ EXTERN void TclBackgroundException (Tcl_Interp * interp, typedef struct TclIntStubs { int magic; - struct TclIntStubHooks *hooks; + CONST struct TclIntStubHooks *hooks; void *reserved0; void *reserved1; @@ -1345,15 +1345,7 @@ typedef struct TclIntStubs { } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -#ifdef __cplusplus -extern "C" { -#endif -extern TclIntStubs *tclIntStubsPtr; -#ifdef __cplusplus -} -#endif - +EXTERN CONST TclIntStubs *tclIntStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 7b8ab8e..8985677 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.33 2008/04/01 16:23:41 dgp Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.34 2008/04/02 21:30:04 das Exp $ */ #ifndef _TCLINTPLATDECLS @@ -372,7 +372,7 @@ EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, typedef struct TclIntPlatStubs { int magic; - struct TclIntPlatStubHooks *hooks; + CONST struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ @@ -447,15 +447,7 @@ typedef struct TclIntPlatStubs { } TclIntPlatStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -#ifdef __cplusplus -extern "C" { -#endif -extern TclIntPlatStubs *tclIntPlatStubsPtr; -#ifdef __cplusplus -} -#endif - +EXTERN CONST TclIntPlatStubs *tclIntPlatStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 1e695eb..028c816 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.28 2008/04/01 16:23:41 dgp Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.29 2008/04/02 21:30:04 das Exp $ */ #ifndef _TCLPLATDECLS @@ -82,7 +82,7 @@ EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( typedef struct TclPlatStubs { int magic; - struct TclPlatStubHooks *hooks; + CONST struct TclPlatStubHooks *hooks; #ifdef __WIN32__ /* WIN */ TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */ @@ -95,15 +95,7 @@ typedef struct TclPlatStubs { } TclPlatStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -#ifdef __cplusplus -extern "C" { -#endif -extern TclPlatStubs *tclPlatStubsPtr; -#ifdef __cplusplus -} -#endif - +EXTERN CONST TclPlatStubs *tclPlatStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f663610..b5f31ab 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.150 2008/01/23 17:31:42 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.151 2008/04/02 21:30:04 das Exp $ */ #include "tclInt.h" @@ -491,7 +491,7 @@ TclTomMathStubs tclTomMathStubs = { TclBN_s_mp_sub, /* 60 */ }; -static TclStubHooks tclStubHooks = { +static const TclStubHooks tclStubHooks = { &tclPlatStubs, &tclIntStubs, &tclIntPlatStubs diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index d12f199..094b1e5 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.3 2008/04/01 16:23:42 dgp Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.4 2008/04/02 21:30:04 das Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -455,7 +455,7 @@ EXTERN int TclBN_s_mp_sub (mp_int* a, mp_int* b, mp_int* c); typedef struct TclTomMathStubs { int magic; - struct TclTomMathStubHooks *hooks; + CONST struct TclTomMathStubHooks *hooks; int (*tclBN_epoch) (void); /* 0 */ int (*tclBN_revision) (void); /* 1 */ @@ -521,15 +521,7 @@ typedef struct TclTomMathStubs { } TclTomMathStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -#ifdef __cplusplus -extern "C" { -#endif -extern TclTomMathStubs *tclTomMathStubsPtr; -#ifdef __cplusplus -} -#endif - +EXTERN CONST TclTomMathStubs *tclTomMathStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -- cgit v0.12 From 691a1239878ea8dece6135548a490b4d36285fe2 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 3 Apr 2008 18:05:59 +0000 Subject: * generic/tclIO.c (CopyData): Applied patch [Bug 1932639] to * tests/io.test: prevent fcopy from calling -command synchronously * tests/chanio.test: the first time. Thanks to Alexandre Ferrieux for report and patch. --- ChangeLog | 7 +++++++ generic/tclIO.c | 38 ++++++++++++++++++++++++-------------- tests/chanio.test | 47 ++++++++++++++++++++++++++++++++++++++++++++++- tests/io.test | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 123 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 074f952..5f8922d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-03 Andreas Kupries + + * generic/tclIO.c (CopyData): Applied patch [Bug 1932639] to + * tests/io.test: prevent fcopy from calling -command synchronously + * tests/chanio.test: the first time. Thanks to Alexandre Ferrieux + for report and patch. + 2008-04-02 Daniel Steffen * generic/tcl.decls: remove 'export' declarations of symbols now diff --git a/generic/tclIO.c b/generic/tclIO.c index c153e0f..b44c1e6 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.138 2008/04/02 20:26:09 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.139 2008/04/03 18:06:01 andreas_kupries Exp $ */ #include "tclInt.h" @@ -8578,23 +8578,33 @@ CopyData( goto writeError; } - /* - * Read up to bufSize bytes. - */ + if (cmdPtr && (mask == 0)) { + /* + * In async mode, we skip reading synchronously and fake an + * underflow instead to prime the readable fileevent. + */ - if ((csPtr->toRead == -1) || (csPtr->toRead > csPtr->bufSize)) { - sizeb = csPtr->bufSize; + size = 0; + underflow = 1; } else { - sizeb = csPtr->toRead; - } + /* + * Read up to bufSize bytes. + */ - if (inBinary || sameEncoding) { - size = DoRead(inStatePtr->topChanPtr, csPtr->buffer, sizeb); - } else { - size = DoReadChars(inStatePtr->topChanPtr, bufObj, sizeb, - 0 /* No append */); + if ((csPtr->toRead == -1) || (csPtr->toRead > csPtr->bufSize)) { + sizeb = csPtr->bufSize; + } else { + sizeb = csPtr->toRead; + } + + if (inBinary || sameEncoding) { + size = DoRead(inStatePtr->topChanPtr, csPtr->buffer, sizeb); + } else { + size = DoReadChars(inStatePtr->topChanPtr, bufObj, sizeb, + 0 /* No append */); + } + underflow = (size >= 0) && (size < sizeb); /* Input underflow */ } - underflow = (size >= 0) && (size < sizeb); /* Input underflow */ if (size < 0) { readError: diff --git a/tests/chanio.test b/tests/chanio.test index 3c56758..4b492d1 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.3 2007/12/13 15:26:04 dgp Exp $ +# RCS: @(#) $Id: chanio.test,v 1.4 2008/04/03 18:06:02 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6887,6 +6887,51 @@ test chan-io-53.7 {CopyData: Flooding chan copy from pipe} {stdio openpipe fcopy # -1=error 0=script error N=number of bytes expr ($fcopyTestDone == 0) ? $fcopyTestCount : -1 } {3450} +test chan-io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { + # copy progress callback. errors out intentionally + proc ::cmd args { + lappend ::RES "CMD $args" + error !STOP + } + # capture callback error here + proc ::bgerror args { + lappend ::RES "bgerror/OK $args" + set ::forever has-been-reached + return + } + # Files we use for our channels + set foo [makeFile ashgdfashdgfasdhgfasdhgf foo] + set bar [makeFile {} bar] + # Channels to copy between + set f [open $foo r] ; fconfigure $f -translation binary + set g [open $bar w] ; fconfigure $g -translation binary -buffering none +} -constraints {stdio openpipe fcopy} -body { + # Record input size, so that result is always defined + lappend ::RES [file size $bar] + # Run the copy. Should not invoke -command now. + chan copy $f $g -size 2 -command ::cmd + # Check that -command was not called synchronously + set sbs [file size bar] + lappend ::RES [expr {($sbs > 0) ? "sync/FAIL" : "sync/OK"}] $sbs + # Now let the async part happen. Should capture the error in cmd + # via bgerror. If not break the event loop via timer. + after 1000 { + lappend ::RES {bgerror/FAIL timeout} + set ::forever has-been-reached + } + vwait ::forever + # Report + set ::RES +} -cleanup { + chan close $f + chan close $g + catch {unset ::RES} + catch {unset ::forever} + rename ::cmd {} + rename ::bgerror {} + removeFile foo + removeFile bar +} -result {0 sync/OK 0 {CMD 2} {bgerror/OK !STOP}} test chan-io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive diff --git a/tests/io.test b/tests/io.test index 3ca2239..6c092cb 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.80 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: io.test,v 1.81 2008/04/03 18:06:01 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6887,6 +6887,51 @@ test io-53.7 {CopyData: Flooding fcopy from pipe} {stdio openpipe fcopy} { # -1=error 0=script error N=number of bytes expr ($fcopyTestDone == 0) ? $fcopyTestCount : -1 } {3450} +test io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { + # copy progress callback. errors out intentionally + proc ::cmd args { + lappend ::RES "CMD $args" + error !STOP + } + # capture callback error here + proc ::bgerror args { + lappend ::RES "bgerror/OK $args" + set ::forever has-been-reached + return + } + # Files we use for our channels + set foo [makeFile ashgdfashdgfasdhgfasdhgf foo] + set bar [makeFile {} bar] + # Channels to copy between + set f [open $foo r] ; fconfigure $f -translation binary + set g [open $bar w] ; fconfigure $g -translation binary -buffering none +} -constraints {stdio openpipe fcopy} -body { + # Record input size, so that result is always defined + lappend ::RES [file size $bar] + # Run the copy. Should not invoke -command now. + fcopy $f $g -size 2 -command ::cmd + # Check that -command was not called synchronously + set sbs [file size bar] + lappend ::RES [expr {($sbs > 0) ? "sync/FAIL" : "sync/OK"}] $sbs + # Now let the async part happen. Should capture the error in cmd + # via bgerror. If not break the event loop via timer. + after 1000 { + lappend ::RES {bgerror/FAIL timeout} + set ::forever has-been-reached + } + vwait ::forever + # Report + set ::RES +} -cleanup { + close $f + close $g + catch {unset ::RES} + catch {unset ::forever} + rename ::cmd {} + rename ::bgerror {} + removeFile foo + removeFile bar +} -result {0 sync/OK 0 {CMD 2} {bgerror/OK !STOP}} test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive -- cgit v0.12 From bd64b428cf44de3abad33cda014cb21a5252ef79 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 4 Apr 2008 16:46:57 +0000 Subject: * generic/tclIORChan.c (ReflectClose): Added missing removal of the now closed channel from the reflection map. Before we could crash the system by invoking 'chan postevent' on a closed reflected channel, dereferencing the dangling pointer in the map. * tests/ioCmd.test (iocmd-31.8): Testcase for the above. --- ChangeLog | 10 ++++++++++ generic/tclIORChan.c | 16 +++++++++++++++- tests/ioCmd.test | 14 +++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f8922d..6031f9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-04-04 Andreas Kupries + + * generic/tclIORChan.c (ReflectClose): Added missing removal of + the now closed channel from the reflection map. Before we could + crash the system by invoking 'chan postevent' on a closed + reflected channel, dereferencing the dangling pointer in the + map. + + * tests/ioCmd.test (iocmd-31.8): Testcase for the above. + 2008-04-03 Andreas Kupries * generic/tclIO.c (CopyData): Applied patch [Bug 1932639] to diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 94950e7..10d0b2e 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.28 2008/02/26 21:50:52 jenglish Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.29 2008/04/04 16:46:57 andreas_kupries Exp $ */ #include @@ -1010,6 +1010,8 @@ ReflectClose( ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; int result; /* Result code for 'close' */ Tcl_Obj *resObj; /* Result data for 'close' */ + ReflectedChannelMap* rcmPtr; /* Map of reflected channels with handlers in this interp */ + Tcl_HashEntry* hPtr; /* Entry in the above map */ if (interp == NULL) { /* @@ -1090,6 +1092,18 @@ ReflectClose( Tcl_DecrRefCount(resObj); /* Remove reference we held from the * invoke */ + + /* + * Remove the channel from the map before releasing the memory, to + * prevent future accesses (like by 'postevent') from finding and + * dereferencing a dangling pointer. + */ + + rcmPtr = GetReflectedChannelMap (interp); + hPtr = Tcl_FindHashEntry (&rcmPtr->map, + Tcl_GetChannelName (rcPtr->chan)); + Tcl_DeleteHashEntry (hPtr); + FreeReflectedChannel(rcPtr); #ifdef TCL_THREADS } diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 2b4877f..fcb0b74 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.36 2008/03/11 22:28:34 das Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.37 2008/04/04 16:46:57 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1795,6 +1795,18 @@ test iocmd-31.7 {chan postevent, posted events do happen} -match glob -body { rename foo {} set res } -result {{watch rc* write} {} TOCK {} {watch rc* {}}} +test iocmd-31.8 {chan postevent after close throws error} -match glob -setup { + proc foo {args} {oninit; onfinal; track; return} + proc dummy args { return } + set c [chan create {r w} foo] + fileevent $c readable dummy +} -body { + close $c + chan postevent $c read +} -cleanup { + rename foo {} + rename dummy {} +} -returnCodes error -result {can not find reflected channel named "rc*"} # ### ### ### ######### ######### ######### ## Same tests as above, but exercising the code forwarding and -- cgit v0.12 From 2d40237679306f4094b26b189d039f1a00c44b32 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 4 Apr 2008 17:18:30 +0000 Subject: * generic/tclIORChan.c (ReflectOutput): Allow zero return from write when input was zero-length anyway. Otherwise keept it an error, and separate the message from 'written too much'. * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed message. --- ChangeLog | 7 +++++++ generic/tclIORChan.c | 15 +++++++++++++-- tests/ioCmd.test | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6031f9e..8cb6958 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-04-04 Andreas Kupries + * generic/tclIORChan.c (ReflectOutput): Allow zero return from + write when input was zero-length anyway. Otherwise keept it an + error, and separate the message from 'written too much'. + + * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed + message. + * generic/tclIORChan.c (ReflectClose): Added missing removal of the now closed channel from the reflection map. Before we could crash the system by invoking 'chan postevent' on a closed diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 10d0b2e..b57d157 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.29 2008/04/04 16:46:57 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.30 2008/04/04 17:18:31 andreas_kupries Exp $ */ #include @@ -434,6 +434,7 @@ static const char *msg_read_unsup = "{read not supported by Tcl driver}"; static const char *msg_read_toomuch = "{read delivered more than requested}"; static const char *msg_write_unsup = "{write not supported by Tcl driver}"; static const char *msg_write_toomuch = "{write wrote more than requested}"; +static const char *msg_write_nothing = "{write wrote nothing}"; static const char *msg_seek_beforestart = "{Tried to seek before origin}"; #ifdef TCL_THREADS static const char *msg_send_originlost = "{Origin thread lost}"; @@ -1290,7 +1291,17 @@ ReflectOutput( Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - if ((written == 0) || (toWrite < written)) { + if ((written == 0) && (toWrite > 0)) { + /* + * The handler claims to have written nothing of what it was + * given. That is bad. + */ + + SetChannelErrorStr(rcPtr->chan, msg_write_nothing); + *errorCodePtr = EINVAL; + return -1; + } + if (toWrite < written) { /* * The handler claims to have written more than it was given. That is * bad. Note that the I/O core would crash if we were to return this diff --git a/tests/ioCmd.test b/tests/ioCmd.test index fcb0b74..e246d2a 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.37 2008/04/04 16:46:57 andreas_kupries Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.38 2008/04/04 17:18:32 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1039,7 +1039,7 @@ test iocmd-24.6 {chan write, bad result, zero-length write} -match glob -body { close $c rename foo {} set res -} -result {{write rc* snarf} 1 {write wrote more than requested}} +} -result {{write rc* snarf} 1 {write wrote nothing}} test iocmd-24.7 {chan write, failed write, error return} -match glob -body { set res {} proc foo {args} {oninit; onfinal; track; return -code error BOOM!} -- cgit v0.12 From 95ec71641ba73286ec715f80983cd5c0b07ad7b9 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 4 Apr 2008 20:14:16 +0000 Subject: * tests/io.test (io-53.9): Added testcase for [Bug 780533], based * tests/chanio.test: on Alexandre's test script. Also fixed problem with timer in preceding test, was not canceled properly in the ok case. --- ChangeLog | 7 +++++++ tests/chanio.test | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++--- tests/io.test | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 109 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8cb6958..c2642b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-04-04 Andreas Kupries + * tests/io.test (io-53.9): Added testcase for [Bug 780533], based + * tests/chanio.test: on Alexandre's test script. Also fixed + problem with timer in preceding test, was not canceled properly + in the ok case. + +2008-04-04 Andreas Kupries + * generic/tclIORChan.c (ReflectOutput): Allow zero return from write when input was zero-length anyway. Otherwise keept it an error, and separate the message from 'written too much'. diff --git a/tests/chanio.test b/tests/chanio.test index 4b492d1..57b115c 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.4 2008/04/03 18:06:02 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.5 2008/04/04 20:14:19 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6915,11 +6915,12 @@ test chan-io-53.8 {CopyData: async callback and error handling, Bug 1932639} -se lappend ::RES [expr {($sbs > 0) ? "sync/FAIL" : "sync/OK"}] $sbs # Now let the async part happen. Should capture the error in cmd # via bgerror. If not break the event loop via timer. - after 1000 { + set token [after 1000 { lappend ::RES {bgerror/FAIL timeout} set ::forever has-been-reached - } + }] vwait ::forever + catch {after cancel $token} # Report set ::RES } -cleanup { @@ -6932,6 +6933,53 @@ test chan-io-53.8 {CopyData: async callback and error handling, Bug 1932639} -se removeFile foo removeFile bar } -result {0 sync/OK 0 {CMD 2} {bgerror/OK !STOP}} +test chan-io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { + set out [makeFile {} out] + set err [makeFile {} err] + set pipe [open "|[info nameofexecutable] 2> $err" r+] + chan configure $pipe -translation binary -buffering line + chan puts $pipe { + chan configure stdout -translation binary -buffering line + chan puts stderr Waiting... + after 1000 + foreach x {a b c} { + chan puts stderr Looping... + chan puts $x + after 500 + } + proc bye args { + if {[chan gets stdin line]<0} { + chan puts stderr "CHILD: EOF detected, exiting" + exit + } else { + chan puts stderr "CHILD: ignoring line: $line" + } + } + chan puts stderr Now-sleeping-forever + chan event stdin readable bye + vwait forever + } + proc ::done args { + set ::forever OK + return + } + set ::forever {} + set out [open $out w] +} -constraints {stdio openpipe fcopy} -body { + chan copy $pipe $out -size 6 -command ::done + set token [after 5000 { + set ::forever {fcopy hangs} + }] + vwait ::forever + catch {after cancel $token} + set ::forever +} -cleanup { + chan close $pipe + rename ::done {} + removeFile out + removeFile err + catch {unset ::forever} +} -result OK test chan-io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive diff --git a/tests/io.test b/tests/io.test index 6c092cb..488f28b 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.81 2008/04/03 18:06:01 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.82 2008/04/04 20:14:17 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6915,11 +6915,12 @@ test io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { lappend ::RES [expr {($sbs > 0) ? "sync/FAIL" : "sync/OK"}] $sbs # Now let the async part happen. Should capture the error in cmd # via bgerror. If not break the event loop via timer. - after 1000 { + set token [after 1000 { lappend ::RES {bgerror/FAIL timeout} set ::forever has-been-reached - } + }] vwait ::forever + catch {after cancel $token} # Report set ::RES } -cleanup { @@ -6932,6 +6933,53 @@ test io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { removeFile foo removeFile bar } -result {0 sync/OK 0 {CMD 2} {bgerror/OK !STOP}} +test io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { + set out [makeFile {} out] + set err [makeFile {} err] + set pipe [open "|[info nameofexecutable] 2> $err" r+] + fconfigure $pipe -translation binary -buffering line + puts $pipe { + fconfigure stdout -translation binary -buffering line + puts stderr Waiting... + after 1000 + foreach x {a b c} { + puts stderr Looping... + puts $x + after 500 + } + proc bye args { + if {[gets stdin line]<0} { + puts stderr "CHILD: EOF detected, exiting" + exit + } else { + puts stderr "CHILD: ignoring line: $line" + } + } + puts stderr Now-sleeping-forever + fileevent stdin readable bye + vwait forever + } + proc ::done args { + set ::forever OK + return + } + set ::forever {} + set out [open $out w] +} -constraints {stdio openpipe fcopy} -body { + fcopy $pipe $out -size 6 -command ::done + set token [after 5000 { + set ::forever {fcopy hangs} + }] + vwait ::forever + catch {after cancel $token} + set ::forever +} -cleanup { + close $pipe + rename ::done {} + removeFile out + removeFile err + catch {unset ::forever} +} -result OK test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive -- cgit v0.12 From c9575348e3505e56d93e7d7f7d64d65272af9c5d Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 5 Apr 2008 23:25:11 +0000 Subject: * win/tclWinFile.c: (WinSymLinkDirectory): Fixed a problem that Tcl was creating an NTFS junction point (IO_REPARSE_TAG_MOUNT_POINT) but filling in the union member for a Vista symbolic link. We had gotten away with this error because the union member (SymbolicLinkReparseBuffer) was misdefined in this file and in the 'winnt.h' in early versions of MinGW. MinGW 3.4.2 has the correct definition of SymbolicLinkReparseBuffer, exposing the mismatch, and making tests cmdAH-19.4.1, fCmd-28.*, and filename-11.* fail. --- ChangeLog | 12 ++++++++++++ win/tclWinFile.c | 34 +++++++++++++++++----------------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2642b5..daf5103 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-04-05 Kevin B. Kenny + + * win/tclWinFile.c: (WinSymLinkDirectory): Fixed a problem that + Tcl was creating an NTFS junction point (IO_REPARSE_TAG_MOUNT_POINT) + but filling in the union member for a Vista symbolic link. + We had gotten away with this error because the union member + (SymbolicLinkReparseBuffer) was misdefined in this file + and in the 'winnt.h' in early versions of MinGW. MinGW 3.4.2 + has the correct definition of SymbolicLinkReparseBuffer, exposing + the mismatch, and making tests cmdAH-19.4.1, fCmd-28.*, and + filename-11.* fail. + 2008-04-04 Andreas Kupries * tests/io.test (io-53.9): Added testcase for [Bug 780533], based diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 66ecdf8..f5f8d5d 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.95 2007/12/13 15:28:44 dgp Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.96 2008/04/05 23:25:15 kennykb Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -123,6 +123,7 @@ typedef struct _REPARSE_DATA_BUFFER { WORD SubstituteNameLength; WORD PrintNameOffset; WORD PrintNameLength; + ULONG Flags; WCHAR PathBuffer[1]; } SymbolicLinkReparseBuffer; struct { @@ -445,18 +446,18 @@ WinSymLinkDirectory( memset(reparseBuffer, 0, sizeof(DUMMY_REPARSE_BUFFER)); reparseBuffer->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; - reparseBuffer->SymbolicLinkReparseBuffer.SubstituteNameLength = + reparseBuffer->MountPointReparseBuffer.SubstituteNameLength = wcslen(nativeTarget) * sizeof(WCHAR); reparseBuffer->Reserved = 0; - reparseBuffer->SymbolicLinkReparseBuffer.PrintNameLength = 0; - reparseBuffer->SymbolicLinkReparseBuffer.PrintNameOffset = - reparseBuffer->SymbolicLinkReparseBuffer.SubstituteNameLength + reparseBuffer->MountPointReparseBuffer.PrintNameLength = 0; + reparseBuffer->MountPointReparseBuffer.PrintNameOffset = + reparseBuffer->MountPointReparseBuffer.SubstituteNameLength + sizeof(WCHAR); - memcpy(reparseBuffer->SymbolicLinkReparseBuffer.PathBuffer, nativeTarget, + memcpy(reparseBuffer->MountPointReparseBuffer.PathBuffer, nativeTarget, sizeof(WCHAR) - + reparseBuffer->SymbolicLinkReparseBuffer.SubstituteNameLength); + + reparseBuffer->MountPointReparseBuffer.SubstituteNameLength); reparseBuffer->ReparseDataLength = - reparseBuffer->SymbolicLinkReparseBuffer.SubstituteNameLength+12; + reparseBuffer->MountPointReparseBuffer.SubstituteNameLength+12; return NativeWriteReparse(linkDirPath, reparseBuffer); } @@ -604,12 +605,12 @@ WinReadLinkDirectory( */ offset = 0; - if (reparseBuffer->SymbolicLinkReparseBuffer.PathBuffer[0] == L'\\') { + if (reparseBuffer->MountPointReparseBuffer.PathBuffer[0] == L'\\') { /* * Check whether this is a mounted volume. */ - if (wcsncmp(reparseBuffer->SymbolicLinkReparseBuffer.PathBuffer, + if (wcsncmp(reparseBuffer->MountPointReparseBuffer.PathBuffer, L"\\??\\Volume{",11) == 0) { char drive; @@ -618,7 +619,7 @@ WinReadLinkDirectory( * to fix here. It doesn't seem very well documented. */ - reparseBuffer->SymbolicLinkReparseBuffer.PathBuffer[1]=L'\\'; + reparseBuffer->MountPointReparseBuffer.PathBuffer[1]=L'\\'; /* * Check if a corresponding drive letter exists, and use that @@ -626,7 +627,7 @@ WinReadLinkDirectory( */ drive = TclWinDriveLetterForVolMountPoint( - reparseBuffer->SymbolicLinkReparseBuffer.PathBuffer); + reparseBuffer->MountPointReparseBuffer.PathBuffer); if (drive != -1) { char driveSpec[3] = { '\0', ':', '\0' @@ -649,14 +650,14 @@ WinReadLinkDirectory( */ goto invalidError; - } else if (wcsncmp(reparseBuffer->SymbolicLinkReparseBuffer + } else if (wcsncmp(reparseBuffer->MountPointReparseBuffer .PathBuffer, L"\\\\?\\",4) == 0) { /* * Strip off the prefix. */ offset = 4; - } else if (wcsncmp(reparseBuffer->SymbolicLinkReparseBuffer + } else if (wcsncmp(reparseBuffer->MountPointReparseBuffer .PathBuffer, L"\\??\\",4) == 0) { /* * Strip off the prefix. @@ -667,8 +668,8 @@ WinReadLinkDirectory( } Tcl_WinTCharToUtf((const char *) - reparseBuffer->SymbolicLinkReparseBuffer.PathBuffer, - (int) reparseBuffer->SymbolicLinkReparseBuffer + reparseBuffer->MountPointReparseBuffer.PathBuffer, + (int) reparseBuffer->MountPointReparseBuffer .SubstituteNameLength, &ds); copy = Tcl_DStringValue(&ds)+offset; @@ -775,7 +776,6 @@ NativeWriteReparse( TclWinConvertError(GetLastError()); return -1; } - hFile = (*tclWinProcs->createFileProc)(linkDirPath, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); -- cgit v0.12 From d4d4d0027f1947f9ad87ec563837df22d21e55b2 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 6 Apr 2008 00:37:19 +0000 Subject: * tests/chanio.test (chan-io-53.9): * tests/io.test (io-53.9): Made test cleanup robust against the possibility of slow process shutdown on Windows. * win/tcl.m4: Added -D_CRT_SECURE_NO_DEPRECATE and -DCRT_NONSTDC_NO_DEPRECATE to the MSVC compilation flags so that the compilation doesn't barf on perfectly reasonable Posix system calls. * win/configure: Manually patched (don't have the right autoconf to hand). --- ChangeLog | 10 ++++++++++ tests/chanio.test | 8 +++++--- tests/io.test | 7 ++++--- win/configure | 3 +++ win/tcl.m4 | 5 ++++- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index daf5103..5287637 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,16 @@ has the correct definition of SymbolicLinkReparseBuffer, exposing the mismatch, and making tests cmdAH-19.4.1, fCmd-28.*, and filename-11.* fail. + * tests/chanio.test (chan-io-53.9): + * tests/io.test (io-53.9): Made test cleanup robust against + the possibility of slow process shutdown on Windows. + + * win/tcl.m4: Added -D_CRT_SECURE_NO_DEPRECATE and + -DCRT_NONSTDC_NO_DEPRECATE to the MSVC compilation flags + so that the compilation doesn't barf on perfectly reasonable + Posix system calls. + * win/configure: Manually patched (don't have the right autoconf + to hand). 2008-04-04 Andreas Kupries diff --git a/tests/chanio.test b/tests/chanio.test index 57b115c..ceb8b8c 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.5 2008/04/04 20:14:19 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.6 2008/04/06 00:37:19 kennykb Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6976,8 +6976,10 @@ test chan-io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { } -cleanup { chan close $pipe rename ::done {} - removeFile out - removeFile err + after 1000; # Allow Windows time to figure out that the + # process is gone + catch {removeFile out} + catch {removeFile err} catch {unset ::forever} } -result OK diff --git a/tests/io.test b/tests/io.test index 488f28b..7489f4f 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.82 2008/04/04 20:14:17 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.83 2008/04/06 00:37:19 kennykb Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6976,8 +6976,9 @@ test io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { } -cleanup { close $pipe rename ::done {} - removeFile out - removeFile err + after 1000; # Give Windows time to kill the process + catch {removeFile out} + catch {removeFile err} catch {unset ::forever} } -result OK diff --git a/win/configure b/win/configure index e10d319..e69a398 100755 --- a/win/configure +++ b/win/configure @@ -4122,6 +4122,9 @@ _ACEOF MAKE_EXE="\${CC} -Fe\$@" LIBPREFIX="" + CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" LDFLAGS_DEBUG="-debug:full" diff --git a/win/tcl.m4 b/win/tcl.m4 index 59b51c9..1a46527 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -622,7 +622,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" - CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" + CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" @@ -747,6 +747,9 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ MAKE_EXE="\${CC} -Fe\[$]@" LIBPREFIX="" + CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" LDFLAGS_DEBUG="-debug:full" -- cgit v0.12 From 50b90140ddeee58a28221cf9fe44c352f2d4b054 Mon Sep 17 00:00:00 2001 From: rmax Date: Mon, 7 Apr 2008 15:23:04 +0000 Subject: * generic/tclStringObj.c (Tcl_AppendFormatToObj): Fix [format {% d}] so that it behaves the same way as in 8.4 and as C's printf(). * tests/format.test: Add a test for '% d' and '%+d'. --- ChangeLog | 7 +++++++ generic/tclStringObj.c | 6 +++--- tests/format.test | 8 +++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5287637..6ff5657 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-07 Reinhard Max + + * generic/tclStringObj.c (Tcl_AppendFormatToObj): + Fix [format {% d}] so that it behaves the same way as in 8.4 and + as C's printf(). + * tests/format.test: Add a test for '% d' and '%+d'. + 2008-04-05 Kevin B. Kenny * win/tclWinFile.c: (WinSymLinkDirectory): Fixed a problem that diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 9664726..16a5bae 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.70 2008/02/28 17:36:49 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.71 2008/04/07 15:23:10 rmax Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2003,8 +2003,8 @@ Tcl_AppendFormatToObj( allocSegment = 1; Tcl_IncrRefCount(segment); - if ((isNegative || gotPlus) && (useBig || (ch == 'd'))) { - Tcl_AppendToObj(segment, (isNegative ? "-" : "+"), 1); + if ((isNegative || gotPlus || gotSpace) && (useBig || (ch == 'd'))) { + Tcl_AppendToObj(segment, (isNegative ? "-" : gotPlus ? "+" : " "), 1); } if (gotHash) { diff --git a/tests/format.test b/tests/format.test index b050fc3..a985eeb 100644 --- a/tests/format.test +++ b/tests/format.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: format.test,v 1.25 2008/01/10 16:09:23 dgp Exp $ +# RCS: @(#) $Id: format.test,v 1.26 2008/04/07 15:23:11 rmax Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -496,6 +496,12 @@ test format-15.3 {testing %0..s 0 padding for chars/strings} { test format-15.4 {testing %0..s 0 padding for chars/strings} { format %05c 61 } {0000=} +test format-15.5 {testing %d space padding for integers} { + format "(% 1d) (% 1d)" 10 -10 +} {( 10) (-10)} +test format-15.6 {testing %d plus padding for integers} { + format "(%+1d) (%+1d)" 10 -10 +} {(+10) (-10)} set a "0123456789" set b "" -- cgit v0.12 From a76dcd048a06f29c220a90dfb622e30f546b7f21 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 7 Apr 2008 15:54:15 +0000 Subject: autoconf-2.59 --- win/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/configure b/win/configure index e69a398..9454976 100755 --- a/win/configure +++ b/win/configure @@ -3984,7 +3984,7 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" - CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" + CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" -- cgit v0.12 From fa20138d013c65c2cfe37314fd60f27952d673ab Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 7 Apr 2008 19:42:59 +0000 Subject: * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, TclCopyChannel): New macro, and the places using it. This change allows for bi-directional fcopy on channels. Thanks to Alexandre Ferrieux for the patch. --- ChangeLog | 7 +++++++ generic/tclIO.c | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ff5657..03ec56f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-07 Andreas Kupries + + * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, + TclCopyChannel): New macro, and the places using it. This change + allows for bi-directional fcopy on channels. Thanks to Alexandre + Ferrieux for the patch. + 2008-04-07 Reinhard Max * generic/tclStringObj.c (Tcl_AppendFormatToObj): diff --git a/generic/tclIO.c b/generic/tclIO.c index b44c1e6..60d60ea 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.139 2008/04/03 18:06:01 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.140 2008/04/07 19:42:59 andreas_kupries Exp $ */ #include "tclInt.h" @@ -221,6 +221,10 @@ static Tcl_ObjType tclChannelType = { #define SET_CHANNELSTATE(objPtr, storePtr) \ ((objPtr)->internalRep.otherValuePtr = (void *) (storePtr)) +#define BUSY_STATE(st,fl) \ + ((st)->csPtr && \ + ( (((fl)&TCL_READABLE)&&((st)->csPtr->readPtr ==(st)->topChanPtr)) || \ + (((fl)&TCL_WRITABLE)&&((st)->csPtr->writePtr==(st)->topChanPtr)))) /* *--------------------------------------------------------------------------- @@ -6698,7 +6702,7 @@ CheckChannelErrors( * retrieving and transforming the data to copy. */ - if ((statePtr->csPtr != NULL) && ((flags & CHANNEL_RAW_MODE) == 0)) { + if (BUSY_STATE(statePtr,flags) && ((flags & CHANNEL_RAW_MODE) == 0)) { Tcl_SetErrno(EBUSY); return -1; } @@ -8429,14 +8433,14 @@ TclCopyChannel( inStatePtr = inPtr->state; outStatePtr = outPtr->state; - if (inStatePtr->csPtr) { + if (BUSY_STATE(inStatePtr,TCL_READABLE)) { if (interp) { Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(inChan), "\" is busy", NULL); } return TCL_ERROR; } - if (outStatePtr->csPtr) { + if (BUSY_STATE(outStatePtr,TCL_WRITABLE)) { if (interp) { Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(outChan), "\" is busy", NULL); -- cgit v0.12 From 2a54793003d2d7f9d4919377bdc9a1fffdeb6c45 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 7 Apr 2008 19:53:19 +0000 Subject: Added forgotten reference to [Bug 1350564] in last entry. --- ChangeLog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03ec56f..2a33943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,9 @@ * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, TclCopyChannel): New macro, and the places using it. This change - allows for bi-directional fcopy on channels. Thanks to Alexandre - Ferrieux for the patch. + allows for bi-directional fcopy on channels. [Bug 1350564]. + Thanks to Alexandre Ferrieux + for the patch. 2008-04-07 Reinhard Max -- cgit v0.12 From 2c13070f5fd97ee4c28c1843f2a551538185b453 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 7 Apr 2008 22:53:07 +0000 Subject: * tests/io.test (io-53.10): Testcase for bi-directionaly fcopy. * tests/chanio.test: * generic/tclIO.c: Additional changes to data structures for fcopy * generic/tclIO.h: and channels to perform proper cleanup in case of a channel having two background copy operations running as is now possible. --- ChangeLog | 7 ++++++ generic/tclIO.c | 66 +++++++++++++++++++++++++++++--------------------- generic/tclIO.h | 5 ++-- tests/chanio.test | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- tests/io.test | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 191 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a33943..5352106 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-04-07 Andreas Kupries + * tests/io.test (io-53.10): Testcase for bi-directionaly fcopy. + * tests/chanio.test: + * generic/tclIO.c: Additional changes to data structures for fcopy + * generic/tclIO.h: and channels to perform proper cleanup in case + of a channel having two background copy operations running as is + now possible. + * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, TclCopyChannel): New macro, and the places using it. This change allows for bi-directional fcopy on channels. [Bug 1350564]. diff --git a/generic/tclIO.c b/generic/tclIO.c index 60d60ea..2b6138c 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.140 2008/04/07 19:42:59 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.141 2008/04/07 22:53:08 andreas_kupries Exp $ */ #include "tclInt.h" @@ -222,9 +222,8 @@ static Tcl_ObjType tclChannelType = { ((objPtr)->internalRep.otherValuePtr = (void *) (storePtr)) #define BUSY_STATE(st,fl) \ - ((st)->csPtr && \ - ( (((fl)&TCL_READABLE)&&((st)->csPtr->readPtr ==(st)->topChanPtr)) || \ - (((fl)&TCL_WRITABLE)&&((st)->csPtr->writePtr==(st)->topChanPtr)))) + ((((st)->csPtrR) && ((fl) & TCL_READABLE)) || \ + (((st)->csPtrW) && ((fl) & TCL_WRITABLE))) /* *--------------------------------------------------------------------------- @@ -1317,7 +1316,8 @@ Tcl_CreateChannel( statePtr->scriptRecordPtr = NULL; statePtr->bufSize = CHANNELBUFFER_DEFAULT_SIZE; statePtr->timer = NULL; - statePtr->csPtr = NULL; + statePtr->csPtrR = NULL; + statePtr->csPtrW = NULL; statePtr->outputStage = NULL; if ((statePtr->encoding != NULL) && (statePtr->flags & TCL_WRITABLE)) { @@ -1478,13 +1478,18 @@ Tcl_StackChannel( */ if ((mask & TCL_WRITABLE) != 0) { - CopyState *csPtr; + CopyState *csPtrR; + CopyState *csPtrW; - csPtr = statePtr->csPtr; - statePtr->csPtr = NULL; + csPtrR = statePtr->csPtrR; + statePtr->csPtrR = NULL; + + csPtrW = statePtr->csPtrW; + statePtr->csPtrW = NULL; if (Tcl_Flush((Tcl_Channel) prevChanPtr) != TCL_OK) { - statePtr->csPtr = csPtr; + statePtr->csPtrR = csPtrR; + statePtr->csPtrW = csPtrW; if (interp) { Tcl_AppendResult(interp, "could not flush channel \"", Tcl_GetChannelName(prevChan), "\"", NULL); @@ -1492,7 +1497,8 @@ Tcl_StackChannel( return NULL; } - statePtr->csPtr = csPtr; + statePtr->csPtrR = csPtrR; + statePtr->csPtrW = csPtrW; } /* @@ -1624,13 +1630,18 @@ Tcl_UnstackChannel( */ if (statePtr->flags & TCL_WRITABLE) { - CopyState *csPtr; + CopyState *csPtrR; + CopyState *csPtrW; + + csPtrR = statePtr->csPtrR; + statePtr->csPtrR = NULL; - csPtr = statePtr->csPtr; - statePtr->csPtr = NULL; + csPtrW = statePtr->csPtrW; + statePtr->csPtrW = NULL; if (Tcl_Flush((Tcl_Channel) chanPtr) != TCL_OK) { - statePtr->csPtr = csPtr; + statePtr->csPtrR = csPtrR; + statePtr->csPtrW = csPtrW; /* * TIP #219, Tcl Channel Reflection API. @@ -1648,7 +1659,8 @@ Tcl_UnstackChannel( return TCL_ERROR; } - statePtr->csPtr = csPtr; + statePtr->csPtrR = csPtrR; + statePtr->csPtrW = csPtrW; } /* @@ -3091,7 +3103,8 @@ Tcl_ClearChannelHandlers( * Cancel any pending copy operation. */ - StopCopy(statePtr->csPtr); + StopCopy(statePtr->csPtrR); + StopCopy(statePtr->csPtrW); /* * Must set the interest mask now to 0, otherwise infinite loops @@ -7096,12 +7109,10 @@ Tcl_GetChannelOption( * If we are in the middle of a background copy, use the saved flags. */ - if (statePtr->csPtr) { - if (chanPtr == statePtr->csPtr->readPtr) { - flags = statePtr->csPtr->readFlags; - } else { - flags = statePtr->csPtr->writeFlags; - } + if (statePtr->csPtrR) { + flags = statePtr->csPtrR->readFlags; + } else if (statePtr->csPtrW) { + flags = statePtr->csPtrW->writeFlags; } else { flags = statePtr->flags; } @@ -7311,7 +7322,7 @@ Tcl_SetChannelOption( * If the channel is in the middle of a background copy, fail. */ - if (statePtr->csPtr) { + if (statePtr->csPtrR || statePtr->csPtrW) { if (interp) { Tcl_AppendResult(interp, "unable to set channel options: " "background copy in progress", NULL); @@ -8498,8 +8509,9 @@ TclCopyChannel( Tcl_IncrRefCount(cmdPtr); } csPtr->cmdPtr = cmdPtr; - inStatePtr->csPtr = csPtr; - outStatePtr->csPtr = csPtr; + + inStatePtr->csPtrR = csPtr; + outStatePtr->csPtrW = csPtr; /* * Start copying data between the channels. @@ -9451,8 +9463,8 @@ StopCopy( } TclDecrRefCount(csPtr->cmdPtr); } - inStatePtr->csPtr = NULL; - outStatePtr->csPtr = NULL; + inStatePtr->csPtrR = NULL; + outStatePtr->csPtrW = NULL; ckfree((char *) csPtr); } diff --git a/generic/tclIO.h b/generic/tclIO.h index 411f48d..662d631 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.11 2007/12/13 15:23:18 dgp Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.12 2008/04/07 22:53:08 andreas_kupries Exp $ */ /* @@ -219,7 +219,8 @@ typedef struct ChannelState { * handlers ("fileevent") on this channel. */ int bufSize; /* What size buffers to allocate? */ Tcl_TimerToken timer; /* Handle to wakeup timer for this channel. */ - CopyState *csPtr; /* State of background copy, or NULL. */ + CopyState *csPtrR; /* State of background copy for which channel is input, or NULL. */ + CopyState *csPtrW; /* State of background copy for which channel is output, or NULL. */ Channel *topChanPtr; /* Refers to topmost channel in a stack. Never * NULL. */ Channel *bottomChanPtr; /* Refers to bottommost channel in a stack. diff --git a/tests/chanio.test b/tests/chanio.test index ceb8b8c..1a4c3b6 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.6 2008/04/06 00:37:19 kennykb Exp $ +# RCS: @(#) $Id: chanio.test,v 1.7 2008/04/07 22:53:09 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6982,6 +6982,76 @@ test chan-io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { catch {removeFile err} catch {unset ::forever} } -result OK +test chan-io-53.10 {Bug 1350564, multi-directional fcopy} -setup { + set err [makeFile {} err] + set pipe [open "|[info nameofexecutable] 2> $err" r+] + chan configure $pipe -translation binary -buffering line + chan puts $pipe { + chan configure stderr -buffering line + # Kill server when pipe closed by invoker. + proc bye args { + if {![chan eof stdin]} { chan gets stdin ; return } + chan puts stderr BYE + exit + } + # Server code. Bi-directional copy between 2 sockets. + proc geof {sok} { + chan puts stderr DONE/$sok + chan close $sok + } + proc new {sok args} { + chan puts stderr NEW/$sok + global l srv + chan configure $sok -translation binary -buffering none + lappend l $sok + if {[llength $l]==2} { + chan close $srv + foreach {a b} $l break + chan copy $a $b -command [list geof $a] + chan copy $b $a -command [list geof $b] + chan puts stderr 2COPY + } + chan puts stderr ... + } + chan puts stderr SRV + set l {} + set srv [socket -server new 9999] + chan puts stderr WAITING + chan event stdin readable bye + chan puts OK + vwait forever + } + # wait for OK from server. + chan gets $pipe + # Now the two clients. + proc ::done {sock} { + if {[chan eof $sock]} { chan close $sock ; return } + lappend ::forever [chan gets $sock] + return + } + set a [socket 127.0.0.1 9999] + set b [socket 127.0.0.1 9999] + chan configure $a -translation binary -buffering none + chan configure $b -translation binary -buffering none + chan event $a readable [list ::done $a] + chan event $b readable [list ::done $b] +} -constraints {stdio openpipe fcopy} -body { + # Now pass data through the server in both directions. + set ::forever {} + chan puts $a AB + vwait ::forever + chan puts $b BA + vwait ::forever + set ::forever +} -cleanup { + catch {chan close $a} + catch {chan close $b} + chan close $pipe + rename ::done {} + after 1000 ;# Give Windows time to kill the process + removeFile err + catch {unset ::forever} +} -result {AB BA} test chan-io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive diff --git a/tests/io.test b/tests/io.test index 7489f4f..d6ea6c4 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.83 2008/04/06 00:37:19 kennykb Exp $ +# RCS: @(#) $Id: io.test,v 1.84 2008/04/07 22:53:09 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6981,6 +6981,76 @@ test io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { catch {removeFile err} catch {unset ::forever} } -result OK +test io-53.10 {Bug 1350564, multi-directional fcopy} -setup { + set err [makeFile {} err] + set pipe [open "|[info nameofexecutable] 2> $err" r+] + fconfigure $pipe -translation binary -buffering line + puts $pipe { + fconfigure stderr -buffering line + # Kill server when pipe closed by invoker. + proc bye args { + if {![eof stdin]} { gets stdin ; return } + puts stderr BYE + exit + } + # Server code. Bi-directional copy between 2 sockets. + proc geof {sok} { + puts stderr DONE/$sok + close $sok + } + proc new {sok args} { + puts stderr NEW/$sok + global l srv + fconfigure $sok -translation binary -buffering none + lappend l $sok + if {[llength $l]==2} { + close $srv + foreach {a b} $l break + fcopy $a $b -command [list geof $a] + fcopy $b $a -command [list geof $b] + puts stderr 2COPY + } + puts stderr ... + } + puts stderr SRV + set l {} + set srv [socket -server new 9999] + puts stderr WAITING + fileevent stdin readable bye + puts OK + vwait forever + } + # wait for OK from server. + gets $pipe + # Now the two clients. + proc ::done {sock} { + if {[eof $sock]} { close $sock ; return } + lappend ::forever [gets $sock] + return + } + set a [socket 127.0.0.1 9999] + set b [socket 127.0.0.1 9999] + fconfigure $a -translation binary -buffering none + fconfigure $b -translation binary -buffering none + fileevent $a readable [list ::done $a] + fileevent $b readable [list ::done $b] +} -constraints {stdio openpipe fcopy} -body { + # Now pass data through the server in both directions. + set ::forever {} + puts $a AB + vwait ::forever + puts $b BA + vwait ::forever + set ::forever +} -cleanup { + catch {close $a} + catch {close $b} + close $pipe + rename ::done {} + after 1000 ;# Give Windows time to kill the process + removeFile err + catch {unset ::forever} +} -result {AB BA} test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive -- cgit v0.12 From 6c606823f1b0924392dfd55c455beb08be96094a Mon Sep 17 00:00:00 2001 From: das Date: Tue, 8 Apr 2008 14:52:43 +0000 Subject: * tools/genStubs.tcl: revert erroneous 2008-04-02 change marking *StubsPtr as EXTERN instead of extern. --- ChangeLog | 43 +++++++++++++++++++++++++++---------------- tools/genStubs.tcl | 4 ++-- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5352106..0adcdde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,28 @@ +2008-04-08 Daniel Steffen + + * tools/genStubs.tcl: revert erroneous 2008-04-02 change marking + *StubsPtr as EXTERN instead of extern. + + * generic/tclDecls.h: make genstubs + * generic/tclIntDecls.h: + * generic/tclIntPlatDecls.h: + * generic/tclPlatDecls.h: + * generic/tclTomMathDecls.h: + 2008-04-07 Andreas Kupries * tests/io.test (io-53.10): Testcase for bi-directionaly fcopy. * tests/chanio.test: * generic/tclIO.c: Additional changes to data structures for fcopy * generic/tclIO.h: and channels to perform proper cleanup in case - of a channel having two background copy operations running as is - now possible. + of a channel having two background copy operations running as is + now possible. * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, - TclCopyChannel): New macro, and the places using it. This change - allows for bi-directional fcopy on channels. [Bug 1350564]. - Thanks to Alexandre Ferrieux - for the patch. + TclCopyChannel): New macro, and the places using it. This change + allows for bi-directional fcopy on channels. [Bug 1350564]. + Thanks to Alexandre Ferrieux + for the patch. 2008-04-07 Reinhard Max @@ -46,23 +57,23 @@ * tests/io.test (io-53.9): Added testcase for [Bug 780533], based * tests/chanio.test: on Alexandre's test script. Also fixed - problem with timer in preceding test, was not canceled properly - in the ok case. + problem with timer in preceding test, was not canceled properly + in the ok case. 2008-04-04 Andreas Kupries * generic/tclIORChan.c (ReflectOutput): Allow zero return from - write when input was zero-length anyway. Otherwise keept it an - error, and separate the message from 'written too much'. + write when input was zero-length anyway. Otherwise keept it an + error, and separate the message from 'written too much'. * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed - message. + message. * generic/tclIORChan.c (ReflectClose): Added missing removal of - the now closed channel from the reflection map. Before we could - crash the system by invoking 'chan postevent' on a closed - reflected channel, dereferencing the dangling pointer in the - map. + the now closed channel from the reflection map. Before we could + crash the system by invoking 'chan postevent' on a closed + reflected channel, dereferencing the dangling pointer in the + map. * tests/ioCmd.test (iocmd-31.8): Testcase for the above. @@ -71,7 +82,7 @@ * generic/tclIO.c (CopyData): Applied patch [Bug 1932639] to * tests/io.test: prevent fcopy from calling -command synchronously * tests/chanio.test: the first time. Thanks to Alexandre Ferrieux - for report and patch. + for report and patch. 2008-04-02 Daniel Steffen diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 0f69997..ab5ebbc 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.24 2008/04/02 21:29:05 das Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.25 2008/04/08 14:52:45 das Exp $ package require Tcl 8.4 @@ -998,7 +998,7 @@ proc genStubs::emitHeader {name} { set upName [string toupper $libraryName] append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n" - append text "EXTERN CONST ${capName}Stubs *${name}StubsPtr;" + append text "extern CONST ${capName}Stubs *${name}StubsPtr;" append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n" emitMacros $name text -- cgit v0.12 From a56109238f30be1857ca8cd42e6b8cc2595bdf34 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 8 Apr 2008 14:54:52 +0000 Subject: * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclPlatDecls.h: * generic/tclTomMathDecls.h: --- generic/tclDecls.h | 4 ++-- generic/tclIntDecls.h | 4 ++-- generic/tclIntPlatDecls.h | 4 ++-- generic/tclPlatDecls.h | 4 ++-- generic/tclTomMathDecls.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 0a1d735..aee0e79 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.132 2008/04/02 21:30:03 das Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.133 2008/04/08 14:54:52 das Exp $ */ #ifndef _TCLDECLS @@ -4143,7 +4143,7 @@ typedef struct TclStubs { } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -EXTERN CONST TclStubs *tclStubsPtr; +extern CONST TclStubs *tclStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 04501dd..c6f8055 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.114 2008/04/02 21:30:04 das Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.115 2008/04/08 14:54:52 das Exp $ */ #ifndef _TCLINTDECLS @@ -1345,7 +1345,7 @@ typedef struct TclIntStubs { } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -EXTERN CONST TclIntStubs *tclIntStubsPtr; +extern CONST TclIntStubs *tclIntStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 8985677..c419da9 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.34 2008/04/02 21:30:04 das Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.35 2008/04/08 14:54:53 das Exp $ */ #ifndef _TCLINTPLATDECLS @@ -447,7 +447,7 @@ typedef struct TclIntPlatStubs { } TclIntPlatStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -EXTERN CONST TclIntPlatStubs *tclIntPlatStubsPtr; +extern CONST TclIntPlatStubs *tclIntPlatStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 028c816..1ba435f 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.29 2008/04/02 21:30:04 das Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.30 2008/04/08 14:54:53 das Exp $ */ #ifndef _TCLPLATDECLS @@ -95,7 +95,7 @@ typedef struct TclPlatStubs { } TclPlatStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -EXTERN CONST TclPlatStubs *tclPlatStubsPtr; +extern CONST TclPlatStubs *tclPlatStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 094b1e5..13b1936 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.4 2008/04/02 21:30:04 das Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.5 2008/04/08 14:54:53 das Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -521,7 +521,7 @@ typedef struct TclTomMathStubs { } TclTomMathStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -EXTERN CONST TclTomMathStubs *tclTomMathStubsPtr; +extern CONST TclTomMathStubs *tclTomMathStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -- cgit v0.12 From cd778f7c442ce23fe562d67ffeb097fbc286365a Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Apr 2008 15:11:27 +0000 Subject: * generic/tclExecute.c: added comments to the alignment macros used in GrowEvaluationStack() and friends. --- ChangeLog | 5 +++++ generic/tclExecute.c | 23 ++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0adcdde..6c30da3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-08 Miguel Sofer + + * generic/tclExecute.c: added comments to the alignment macros + used in GrowEvaluationStack() and friends. + 2008-04-08 Daniel Steffen * tools/genStubs.tcl: revert erroneous 2008-04-02 change marking diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 1677a78..c7e3e08 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.369 2008/03/18 18:52:07 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.370 2008/04/08 15:11:30 msofer Exp $ */ #include "tclInt.h" @@ -851,23 +851,36 @@ TclFinalizeExecution(void) /* * Auxiliary code to insure that GrowEvaluationStack always returns correctly - * aligned memory. This assumes that TCL_ALLOCALIGN is a multiple of the - * wordsize 'sizeof(Tcl_Obj *)'. + * aligned memory. + * + * WALLOCALIGN represents the alignment reqs in words, just as TCL_ALLOCALIGN + * represents the reqs in bytes. This assumes that TCL_ALLOCALIGN is a + * multiple of the wordsize 'sizeof(Tcl_Obj *)'. */ #define WALLOCALIGN \ (TCL_ALLOCALIGN/sizeof(Tcl_Obj *)) +/* + * OFFSET computes how many words have to be skipped until the next aligned + * word. Note that we are only interested in the low order bits of ptr, so + * that any possible information loss in PTR2INT is of no consequence. + */ + static inline int OFFSET( void *ptr) { int mask = TCL_ALLOCALIGN-1; int base = PTR2INT(ptr) & mask; - return (TCL_ALLOCALIGN - base)/sizeof(Tcl_Obj**); + return (TCL_ALLOCALIGN - base)/sizeof(Tcl_Obj *); } -#define MEMSTART(markerPtr) \ +/* + * Given a marker, compute where the following aligned memory starts. + */ + +#define MEMSTART(markerPtr) \ ((markerPtr) + OFFSET(markerPtr)) -- cgit v0.12 From dc2f74c6070596e4d5a19fbf284d1c20d447453a Mon Sep 17 00:00:00 2001 From: das Date: Tue, 8 Apr 2008 23:15:57 +0000 Subject: * tests/chanio.test (chan-io-53.8,53.9,53.10): fix typo & quoting for * tests/io.test (io-53.8,53.9,53.10): spaces in builddir path --- ChangeLog | 23 +++++++++++++---------- tests/chanio.test | 8 ++++---- tests/io.test | 8 ++++---- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c30da3..97cc292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-09 Daniel Steffen + + * tests/chanio.test (chan-io-53.8,53.9,53.10): fix typo & quoting for + * tests/io.test (io-53.8,53.9,53.10): spaces in builddir path + 2008-04-08 Miguel Sofer * generic/tclExecute.c: added comments to the alignment macros @@ -25,15 +30,14 @@ * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, TclCopyChannel): New macro, and the places using it. This change - allows for bi-directional fcopy on channels. [Bug 1350564]. - Thanks to Alexandre Ferrieux - for the patch. + allows for bi-directional fcopy on channels. [Bug 1350564]. Thanks + to Alexandre Ferrieux for the + patch. 2008-04-07 Reinhard Max - * generic/tclStringObj.c (Tcl_AppendFormatToObj): - Fix [format {% d}] so that it behaves the same way as in 8.4 and - as C's printf(). + * generic/tclStringObj.c (Tcl_AppendFormatToObj): Fix [format {% d}] + so that it behaves the same way as in 8.4 and as C's printf(). * tests/format.test: Add a test for '% d' and '%+d'. 2008-04-05 Kevin B. Kenny @@ -62,8 +66,8 @@ * tests/io.test (io-53.9): Added testcase for [Bug 780533], based * tests/chanio.test: on Alexandre's test script. Also fixed - problem with timer in preceding test, was not canceled properly - in the ok case. + problem with timer in preceding test, was not canceled properly in + the ok case. 2008-04-04 Andreas Kupries @@ -77,8 +81,7 @@ * generic/tclIORChan.c (ReflectClose): Added missing removal of the now closed channel from the reflection map. Before we could crash the system by invoking 'chan postevent' on a closed - reflected channel, dereferencing the dangling pointer in the - map. + reflected channel, dereferencing the dangling pointer in the map. * tests/ioCmd.test (iocmd-31.8): Testcase for the above. diff --git a/tests/chanio.test b/tests/chanio.test index 1a4c3b6..885a3cd 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.7 2008/04/07 22:53:09 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.8 2008/04/08 23:15:58 das Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6911,7 +6911,7 @@ test chan-io-53.8 {CopyData: async callback and error handling, Bug 1932639} -se # Run the copy. Should not invoke -command now. chan copy $f $g -size 2 -command ::cmd # Check that -command was not called synchronously - set sbs [file size bar] + set sbs [file size $bar] lappend ::RES [expr {($sbs > 0) ? "sync/FAIL" : "sync/OK"}] $sbs # Now let the async part happen. Should capture the error in cmd # via bgerror. If not break the event loop via timer. @@ -6936,7 +6936,7 @@ test chan-io-53.8 {CopyData: async callback and error handling, Bug 1932639} -se test chan-io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { set out [makeFile {} out] set err [makeFile {} err] - set pipe [open "|[info nameofexecutable] 2> $err" r+] + set pipe [open "|[list [info nameofexecutable] 2> $err]" r+] chan configure $pipe -translation binary -buffering line chan puts $pipe { chan configure stdout -translation binary -buffering line @@ -6984,7 +6984,7 @@ test chan-io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { } -result OK test chan-io-53.10 {Bug 1350564, multi-directional fcopy} -setup { set err [makeFile {} err] - set pipe [open "|[info nameofexecutable] 2> $err" r+] + set pipe [open "|[list [info nameofexecutable] 2> $err]" r+] chan configure $pipe -translation binary -buffering line chan puts $pipe { chan configure stderr -buffering line diff --git a/tests/io.test b/tests/io.test index d6ea6c4..084723a 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.84 2008/04/07 22:53:09 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.85 2008/04/08 23:16:00 das Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6911,7 +6911,7 @@ test io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { # Run the copy. Should not invoke -command now. fcopy $f $g -size 2 -command ::cmd # Check that -command was not called synchronously - set sbs [file size bar] + set sbs [file size $bar] lappend ::RES [expr {($sbs > 0) ? "sync/FAIL" : "sync/OK"}] $sbs # Now let the async part happen. Should capture the error in cmd # via bgerror. If not break the event loop via timer. @@ -6936,7 +6936,7 @@ test io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { test io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { set out [makeFile {} out] set err [makeFile {} err] - set pipe [open "|[info nameofexecutable] 2> $err" r+] + set pipe [open "|[list [info nameofexecutable] 2> $err]" r+] fconfigure $pipe -translation binary -buffering line puts $pipe { fconfigure stdout -translation binary -buffering line @@ -6983,7 +6983,7 @@ test io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { } -result OK test io-53.10 {Bug 1350564, multi-directional fcopy} -setup { set err [makeFile {} err] - set pipe [open "|[info nameofexecutable] 2> $err" r+] + set pipe [open "|[list [info nameofexecutable] 2> $err]" r+] fconfigure $pipe -translation binary -buffering line puts $pipe { fconfigure stderr -buffering line -- cgit v0.12 From 9bb2ff4b525caf08e3d48cadac6631b5693687aa Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 9 Apr 2008 18:37:08 +0000 Subject: * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -size * tests/ioCmd.test (iocmd-15.{13,14}): value to reject negative values, and values overflowing 32-bit signed. [Bug 1557855]. Basic patch by Alexandre Ferrieux , with modifications from me to separate overflow from true negative value. Extended testsuite. --- ChangeLog | 9 +++++++++ generic/tclIOCmd.c | 16 +++++++++++++++- tests/ioCmd.test | 8 +++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 97cc292..6403a6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-04-09 Andreas Kupries + + * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -size + * tests/ioCmd.test (iocmd-15.{13,14}): value to reject negative + values, and values overflowing 32-bit signed. [Bug 1557855]. Basic + patch by Alexandre Ferrieux , with + modifications from me to separate overflow from true negative + value. Extended testsuite. + 2008-04-09 Daniel Steffen * tests/chanio.test (chan-io-53.8,53.9,53.10): fix typo & quoting for diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index c1abee1..04c7c3c 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.51 2007/12/13 15:23:18 dgp Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.52 2008/04/09 18:37:08 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1643,6 +1643,20 @@ Tcl_FcopyObjCmd( if (TclGetIntFromObj(interp, objv[i+1], &toRead) != TCL_OK) { return TCL_ERROR; } + if (toRead<0) { + Tcl_WideInt w; + if (Tcl_GetWideIntFromObj(interp, objv[i+1], &w) != TCL_OK) { + return TCL_ERROR; + } + if (w >= (Tcl_WideInt)0) { + Tcl_AppendResult(interp, + "integer value to large to represent as 32bit signed value", + NULL); + } else { + Tcl_AppendResult(interp, "negative size forbidden", NULL); + } + return TCL_ERROR; + } break; case FcopyCommand: cmdPtr = objv[i+1]; diff --git a/tests/ioCmd.test b/tests/ioCmd.test index e246d2a..d48d1cf 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.38 2008/04/04 17:18:32 andreas_kupries Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.39 2008/04/09 18:37:09 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -606,6 +606,12 @@ test iocmd-15.11 {Tcl_FcopyObjCmd} {fcopy} { test iocmd-15.12 {Tcl_FcopyObjCmd} {fcopy} { list [catch {fcopy $rfile $wfile -command bar -size foo} msg] $msg } {1 {expected integer but got "foo"}} +test iocmd-15.13 {Tcl_FcopyObjCmd} {fcopy} { + list [catch {fcopy $rfile $wfile -command bar -size 3221176172} msg] $msg +} {1 {integer value to large to represent as 32bit signed value}} +test iocmd-15.14 {Tcl_FcopyObjCmd} {fcopy} { + list [catch {fcopy $rfile $wfile -command bar -size -2} msg] $msg +} {1 {negative size forbidden}} close $rfile close $wfile -- cgit v0.12 From 2f4dbc92d9400613c34d96550cda0da27404b84d Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 9 Apr 2008 19:49:07 +0000 Subject: * tests/chanio.test (chan-io-52.5): Removed '-size -1' from test, * tests/io.test (io-52.5): does not seem to have any bearing, and was an illegal value. --- ChangeLog | 6 ++++++ tests/chanio.test | 4 ++-- tests/io.test | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6403a6d..f5ef0ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-04-09 Andreas Kupries + * tests/chanio.test (chan-io-52.5): Removed '-size -1' from test, + * tests/io.test (io-52.5): does not seem to have any bearing, and + was an illegal value. Test case is not affected by the value of + -size, test flag restoration and that evrything was properly + copied. + * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -size * tests/ioCmd.test (iocmd-15.{13,14}): value to reject negative values, and values overflowing 32-bit signed. [Bug 1557855]. Basic diff --git a/tests/chanio.test b/tests/chanio.test index 885a3cd..e5f2852 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.8 2008/04/08 23:15:58 das Exp $ +# RCS: @(#) $Id: chanio.test,v 1.9 2008/04/09 19:49:09 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6547,7 +6547,7 @@ test chan-io-52.5 {TclCopyChannel} {fcopy} { set f2 [open $path(test1) w] chan configure $f1 -translation lf -blocking 0 chan configure $f2 -translation lf -blocking 0 - chan copy $f1 $f2 -size -1 + chan copy $f1 $f2 ;#-size -1 set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]] chan close $f1 chan close $f2 diff --git a/tests/io.test b/tests/io.test index 084723a..908dae2 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.85 2008/04/08 23:16:00 das Exp $ +# RCS: @(#) $Id: io.test,v 1.86 2008/04/09 19:49:08 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6547,7 +6547,7 @@ test io-52.5 {TclCopyChannel} {fcopy} { set f2 [open $path(test1) w] fconfigure $f1 -translation lf -blocking 0 fconfigure $f2 -translation lf -blocking 0 - fcopy $f1 $f2 -size -1 + fcopy $f1 $f2 ;#-size -1 set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]] close $f1 close $f2 -- cgit v0.12 From e838bdf0780956d1a38698d488f40b5262dc457e Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 9 Apr 2008 21:44:57 +0000 Subject: Added 'make html' support for people on Windows, inspired by Pat Thoyts. --- ChangeLog | 152 ++++++++++++++++++++++++++++---------------------------- win/Makefile.in | 18 ++++++- 2 files changed, 93 insertions(+), 77 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5ef0ba..f45ebcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,21 @@ +2008-04-09 Donal K. Fellows + + * win/Makefile.in (html): Added target for doing convenient + documentation builds, mirroring the one from unix/Makefile. + 2008-04-09 Andreas Kupries * tests/chanio.test (chan-io-52.5): Removed '-size -1' from test, - * tests/io.test (io-52.5): does not seem to have any bearing, and - was an illegal value. Test case is not affected by the value of - -size, test flag restoration and that evrything was properly - copied. - - * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -size - * tests/ioCmd.test (iocmd-15.{13,14}): value to reject negative - values, and values overflowing 32-bit signed. [Bug 1557855]. Basic - patch by Alexandre Ferrieux , with - modifications from me to separate overflow from true negative - value. Extended testsuite. + * tests/io.test (io-52.5): does not seem to have any bearing, and was + an illegal value. Test case is not affected by the value of -size, + test flag restoration and that evrything was properly copied. + + * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -size value + * tests/ioCmd.test (iocmd-15.{13,14}): to reject negative values, and + values overflowing 32-bit signed. [Bug 1557855]. Basic patch by + Alexandre Ferrieux , with + modifications from me to separate overflow from true negative value. + Extended testsuite. 2008-04-09 Daniel Steffen @@ -20,9 +24,9 @@ 2008-04-08 Miguel Sofer - * generic/tclExecute.c: added comments to the alignment macros - used in GrowEvaluationStack() and friends. - + * generic/tclExecute.c: added comments to the alignment macros used in + GrowEvaluationStack() and friends. + 2008-04-08 Daniel Steffen * tools/genStubs.tcl: revert erroneous 2008-04-02 change marking @@ -36,18 +40,17 @@ 2008-04-07 Andreas Kupries - * tests/io.test (io-53.10): Testcase for bi-directionaly fcopy. + * tests/io.test (io-53.10): Testcase for bi-directional fcopy. * tests/chanio.test: - * generic/tclIO.c: Additional changes to data structures for fcopy - * generic/tclIO.h: and channels to perform proper cleanup in case - of a channel having two background copy operations running as is - now possible. - - * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, - TclCopyChannel): New macro, and the places using it. This change - allows for bi-directional fcopy on channels. [Bug 1350564]. Thanks - to Alexandre Ferrieux for the - patch. + * generic/tclIO.c: Additional changes to data structures for fcopy and + * generic/tclIO.h: channels to perform proper cleanup in case of a + channel having two background copy operations running as is now + possible. + + * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, TclCopyChannel): + New macro, and the places using it. This change allows for + bi-directional fcopy on channels. [Bug 1350564]. Thanks to Alexandre + Ferrieux for the patch. 2008-04-07 Reinhard Max @@ -56,47 +59,43 @@ * tests/format.test: Add a test for '% d' and '%+d'. 2008-04-05 Kevin B. Kenny - - * win/tclWinFile.c: (WinSymLinkDirectory): Fixed a problem that - Tcl was creating an NTFS junction point (IO_REPARSE_TAG_MOUNT_POINT) - but filling in the union member for a Vista symbolic link. - We had gotten away with this error because the union member - (SymbolicLinkReparseBuffer) was misdefined in this file - and in the 'winnt.h' in early versions of MinGW. MinGW 3.4.2 - has the correct definition of SymbolicLinkReparseBuffer, exposing - the mismatch, and making tests cmdAH-19.4.1, fCmd-28.*, and - filename-11.* fail. + + * win/tclWinFile.c: (WinSymLinkDirectory): Fixed a problem that Tcl + was creating an NTFS junction point (IO_REPARSE_TAG_MOUNT_POINT) but + filling in the union member for a Vista symbolic link. We had gotten + away with this error because the union member + (SymbolicLinkReparseBuffer) was misdefined in this file and in the + 'winnt.h' in early versions of MinGW. MinGW 3.4.2 has the correct + definition of SymbolicLinkReparseBuffer, exposing the mismatch, and + making tests cmdAH-19.4.1, fCmd-28.*, and filename-11.* fail. * tests/chanio.test (chan-io-53.9): - * tests/io.test (io-53.9): Made test cleanup robust against - the possibility of slow process shutdown on Windows. + * tests/io.test (io-53.9): Made test cleanup robust against the + possibility of slow process shutdown on Windows. - * win/tcl.m4: Added -D_CRT_SECURE_NO_DEPRECATE and - -DCRT_NONSTDC_NO_DEPRECATE to the MSVC compilation flags - so that the compilation doesn't barf on perfectly reasonable - Posix system calls. - * win/configure: Manually patched (don't have the right autoconf - to hand). + * win/tcl.m4: Added -D_CRT_SECURE_NO_DEPRECATE and + -DCRT_NONSTDC_NO_DEPRECATE to the MSVC compilation flags so that the + compilation doesn't barf on perfectly reasonable Posix system calls. + * win/configure: Manually patched (don't have the right autoconf to + hand). 2008-04-04 Andreas Kupries * tests/io.test (io-53.9): Added testcase for [Bug 780533], based - * tests/chanio.test: on Alexandre's test script. Also fixed - problem with timer in preceding test, was not canceled properly in - the ok case. + * tests/chanio.test: on Alexandre's test script. Also fixed problem + with timer in preceding test, was not canceled properly in the ok case 2008-04-04 Andreas Kupries - * generic/tclIORChan.c (ReflectOutput): Allow zero return from - write when input was zero-length anyway. Otherwise keept it an - error, and separate the message from 'written too much'. + * generic/tclIORChan.c (ReflectOutput): Allow zero return from write + when input was zero-length anyway. Otherwise keept it an error, and + separate the message from 'written too much'. - * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed - message. + * tests/ioCmd.test (iocmd-24.6): Testcase updated for changed message. - * generic/tclIORChan.c (ReflectClose): Added missing removal of - the now closed channel from the reflection map. Before we could - crash the system by invoking 'chan postevent' on a closed - reflected channel, dereferencing the dangling pointer in the map. + * generic/tclIORChan.c (ReflectClose): Added missing removal of the + now closed channel from the reflection map. Before we could crash the + system by invoking 'chan postevent' on a closed reflected channel, + dereferencing the dangling pointer in the map. * tests/ioCmd.test (iocmd-31.8): Testcase for the above. @@ -111,7 +110,7 @@ * generic/tcl.decls: remove 'export' declarations of symbols now only in libtclstub and no longer in libtcl. - + * generic/tclStubLib.c: make symbols in libtclstub.a MODULE_SCOPE to * tools/genStubs.tcl: avoid exporting them from libraries that link with -ltclstub; constify tcl*StubsPtr and stub @@ -126,16 +125,17 @@ 2008-04-02 Andreas Kupries - * generic/tclIO.c (CopyData): Applied patch for fcopy problem - [Bug 780533], with many thanks to Alexandre Ferrieux + * generic/tclIO.c (CopyData): Applied patch for fcopy problem [Bug + 780533], with many thanks to Alexandre Ferrieux for tracking it down and providing a - solution. Still have to convert his test script into a proper test case + solution. Still have to convert his test script into a proper test + case. 2008-04-01 Andreas Kupries - * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp - * unix/tcl.m4: rounding setup on solaris x86, native cc), provided - by Michael Schlenker. + * generic/tclStrToD.c: Applied patch for [Bug 1839067] (fp rounding + * unix/tcl.m4: setup on solaris x86, native cc), provided by + Michael Schlenker. 2008-04-01 Don Porter @@ -163,7 +163,7 @@ * generic/tclBasic.c: Revised stubs-generation tool and interp * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present - * unix/Makefile.in: in libtcl.so, but is present only in + * unix/Makefile.in: in libtcl.so, but is present only in * win/Makefile.in: libtclstub.a. This tightens up the rules for * win/makefile.bc: users of the stubs interfaces. [Bug 1819422] * win/makefile.vc: @@ -177,20 +177,20 @@ 2008-03-30 Kevin Kenny * generic/tclInt.h (TclIsNaN): - * unix/configure.in: Added code to the configurator to check for - a standard isnan() macro and use it if one - is found. This change avoids bugs where - the test of ((d) != (d)) is optimized away - by an overaggressive compiler. [Bug 1783544] - * generic/tclObj.c: Added missing #include needed to - locate isnan() after the above change. - + * unix/configure.in: Added code to the configurator to check for a + standard isnan() macro and use it if one is + found. This change avoids bugs where the test of + ((d) != (d)) is optimized away by an + overaggressive compiler. [Bug 1783544] + * generic/tclObj.c: Added missing #include needed to locate + isnan() after the above change. + * unix/configure: autoconf-2.61 - - * tests/mathop.test (mathop-25.9, mathop-25.14): Modified tests - to deal with (slightly buggy) math libraries in which pow() - returns an incorrectly rounded result. [Bug 1808174] - + + * tests/mathop.test (mathop-25.9, mathop-25.14): Modified tests to + deal with (slightly buggy) math libraries in which pow() returns an + incorrectly rounded result. [Bug 1808174] + 2008-03-26 Don Porter *** 8.5.2 TAGGED FOR RELEASE *** diff --git a/win/Makefile.in b/win/Makefile.in index 7d71edf..6bd5e39 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.125 2008/04/02 04:25:14 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.126 2008/04/09 21:44:58 dkf Exp $ VERSION = @TCL_VERSION@ @@ -747,3 +747,19 @@ genstubs: "$(GENERIC_DIR_NATIVE)\tcl.decls" \ "$(GENERIC_DIR_NATIVE)\tclInt.decls" \ "$(GENERIC_DIR_NATIVE)\tclTomMath.decls" + +# +# This target creates the HTML folder for Tcl & Tk and places it in +# DISTDIR/html. It uses the tcltk-man2html.tcl tool from the Tcl group's tool +# workspace. It depends on the Tcl & Tk being in directories called tcl8.* & +# tk8.* up two directories from the TOOL_DIR. +# + +TOOL_DIR=$(ROOT_DIR)/tools +HTML_INSTALL_DIR=$(ROOT_DIR)/html +html: + $(MAKE) shell SCRIPT="$(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) --srcdir=$(ROOT_DIR)/.. $(BUILD_HTML_FLAGS)" +html-tcl: $(TCLSH) + $(MAKE) shell SCRIPT="$(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) --srcdir=$(ROOT_DIR)/.. $(BUILD_HTML_FLAGS) --tcl" +html-tk: $(TCLSH) + $(MAKE) shell SCRIPT="$(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) --srcdir=$(ROOT_DIR)/.. $(BUILD_HTML_FLAGS) --tk" -- cgit v0.12 From 5bebcba8118f0caa944c8689eeb6fe0671e88f1b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 10 Apr 2008 00:21:00 +0000 Subject: Test improvements (tcltest2, clarify) --- ChangeLog | 4 + tests/fCmd.test | 38 +- tests/unixFCmd.test | 818 ++++++++++++++++--------------- tests/winFCmd.test | 1333 ++++++++++++++++++++++++++++++--------------------- tests/winFile.test | 90 ++-- 5 files changed, 1280 insertions(+), 1003 deletions(-) diff --git a/ChangeLog b/ChangeLog index f45ebcf..35da79f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-04-09 Donal K. Fellows + * tests/{fCmd,unixFCmd,winFCmd,winFile}.test: Tidying up of the test + suite to make better use of tcltest2 and be clearer about what is + being tested. + * win/Makefile.in (html): Added target for doing convenient documentation builds, mirroring the one from unix/Makefile. diff --git a/tests/fCmd.test b/tests/fCmd.test index ececb2e..3bf6487 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.60 2008/03/28 11:18:48 dkf Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.61 2008/04/10 00:21:02 dkf Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -24,6 +24,7 @@ testConstraint testchmod [llength [info commands testchmod]] testConstraint notNetworkFilesystem 0 testConstraint 95or98 [expr {[testConstraint 95] || [testConstraint 98]}] testConstraint 2000orNewer [expr {![testConstraint 95or98]}] +testConstraint registryPackage [expr {![catch {package require registry}]}] # Find a group that exists on this Unix system, or else skip tests that # require Unix groups. @@ -1116,7 +1117,7 @@ cleanup # old tests -test fCmd-11.1 {TclFileRenameCmd: -- option } -constraints notRoot -setup { +test fCmd-11.1 {TclFileRenameCmd: -- option} -constraints notRoot -setup { catch {file delete -force -- -tfa1} } -body { set s [createfile -tfa1] @@ -1125,7 +1126,7 @@ test fCmd-11.1 {TclFileRenameCmd: -- option } -constraints notRoot -setup { } -cleanup { file delete tfa2 } -result {1 0} -test fCmd-11.2 {TclFileRenameCmd: bad option } -constraints notRoot -setup { +test fCmd-11.2 {TclFileRenameCmd: bad option} -constraints notRoot -setup { catch {file delete -force -- tfa1} } -body { set s [createfile tfa1] @@ -1135,7 +1136,7 @@ test fCmd-11.2 {TclFileRenameCmd: bad option } -constraints notRoot -setup { file delete tfa1 } -result {1 1 0} test fCmd-11.3 {TclFileRenameCmd: bad \# args} { - catch {file rename -- } + catch {file rename --} } {1} test fCmd-11.4 {TclFileRenameCmd: target filename translation failing} -setup { set temp $::env(HOME) @@ -1320,7 +1321,7 @@ test fCmd-13.3 {TclCopyFilesCmd: bad option} -constraints {notRoot} -setup { file delete tfa1 } -result {1 1 0} test fCmd-13.4 {TclCopyFilesCmd: bad \# args} {notRoot} { - catch {file copy -- } + catch {file copy --} } {1} test fCmd-13.5 {TclCopyFilesCmd: target filename translation failing} -setup { set temp $::env(HOME) @@ -1354,8 +1355,8 @@ test fCmd-13.7 {TclCopyFilesCmd: single file into directory} -setup { test fCmd-13.8 {TclCopyFilesCmd: multiple files into directory} -setup { catch {file delete -force -- tfa1 tfa2 tfad} } -constraints {notRoot} -body { - set s1 [createfile tfa1 ] - set s2 [createfile tfa2 ] + set s1 [createfile tfa1] + set s2 [createfile tfa2] file mkdir tfad file copy tfa1 tfa2 tfad list [checkcontent tfad/tfa1 $s1] [checkcontent tfad/tfa2 $s2] \ @@ -1407,7 +1408,7 @@ test fCmd-14.3 {copyfile: stat failing on source} -setup { test fCmd-14.4 {copyfile: error copying file to directory} -setup { catch {file delete -force -- tfa tfad} } -constraints {notRoot} -body { - set s1 [createfile tfa ] + set s1 [createfile tfa] file mkdir tfad file mkdir tfad/tfa list [catch {file copy tfa tfad}] [checkcontent tfa $s1] \ @@ -1472,7 +1473,7 @@ test fCmd-15.1 {TclMakeDirsCmd: target filename translation failing} -setup { # Can Tcl_SplitPath return argc == 0? If so them we need a # test for that code. # -test fCmd-15.2 {TclMakeDirsCmd - one directory } -setup { +test fCmd-15.2 {TclMakeDirsCmd - one directory} -setup { catch {file delete -force -- tfa} } -constraints {notRoot} -body { file mkdir tfa @@ -1658,7 +1659,7 @@ test fCmd-18.1 {TclFileRenameCmd: rename (first form) in the same directory} \ } -constraints {notRoot} -body { file mkdir tfad/dir cd tfad/dir - set s [createfile foo ] + set s [createfile foo] file rename foo bar file rename bar ./foo file rename ./foo bar @@ -1861,7 +1862,7 @@ test fCmd-19.3 {recursive remove} -constraints {notRoot} -setup { # Coverage tests for TraverseUnixTree(), called from TclDeleteFilesCmd # -test fCmd-20.1 {TraverseUnixTree : failure opening a subdirectory directory } -setup { +test fCmd-20.1 {TraverseUnixTree : failure opening a subdirectory directory} -setup { catch {file delete -force -- tfa} } -constraints {unix notRoot} -body { file mkdir tfa @@ -2493,15 +2494,12 @@ removeFile abc.file removeDirectory abc2.dir removeDirectory abc.dir -test fCmd-30.1 {file writable on 'My Documents'} -constraints {win 2000orNewer} -body { - set mydocsname "~/My Documents" - # Would be good to localise this name, since this test will only function - # on english-speaking windows otherwise - if {[file exists $mydocsname]} { - return [file writable $mydocsname] - } - return 1 -} -result {1} +test fCmd-30.1 {file writable on 'My Documents'} -setup { + # Get the localized version of the folder name by looking in the registry. + set mydocsname [registry get {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths} $tcl_platform(user)] +} -constraints {win 2000orNewer registryPackage} -body { + file writable $mydocsname +} -result 1 test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win 2000orNewer knownBug} -body { # Apparently the OS has this file open with exclusive permissions Windows # doesn't provide any way to determine that fact without actually trying diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test index 20afe69..db57b9f 100644 --- a/tests/unixFCmd.test +++ b/tests/unixFCmd.test @@ -1,379 +1,439 @@ -# This file tests the tclUnixFCmd.c file. -# -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. -# -# Copyright (c) 1996 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: unixFCmd.test,v 1.24 2006/03/21 11:12:29 dkf Exp $ - -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest - namespace import -force ::tcltest::* -} - -testConstraint testchmod [llength [info commands testchmod]] - -# These tests really need to be run from a writable directory, which -# it is assumed [temporaryDirectory] is. -set oldcwd [pwd] -cd [temporaryDirectory] - -# Several tests require need to match results against the unix username -set user {} -if {[testConstraint unix]} { - catch {set user [exec whoami]} - if {$user == ""} { - catch {regexp {^[^(]*\(([^)]*)\)} [exec id] dummy user} - } - if {$user == ""} { - set user "root" - } -} - -# Find a group that exists on this system, or else skip tests that require -# groups -testConstraint foundGroup 0 -if {[testConstraint unix]} { - catch { - set groupList [exec groups] - set group [lindex $groupList 0] - testConstraint foundGroup 1 - } -} - -# check whether -readonly attribute is supported -testConstraint readonlyAttr 0 -if {[testConstraint unix]} { - set f [makeFile "whatever" probe] - catch { - file attributes $f -readonly - testConstraint readonlyAttr 1 - } - removeFile probe -} - -proc openup {path} { - testchmod 777 $path - if {[file isdirectory $path]} { - catch { - foreach p [glob -directory $path *] { - openup $p - } - } - } -} - -proc cleanup {args} { - foreach p ". $args" { - set x "" - catch { - set x [glob -directory $p tf* td*] - } - foreach file $x { - if { - [catch {file delete -force -- $file}] - && [testConstraint testchmod] - } then { - openup $file - file delete -force -- $file - } - } - } -} - -test unixFCmd-1.1 {TclpRenameFile: EACCES} {unix notRoot} { - cleanup - file mkdir td1/td2/td3 - file attributes td1/td2 -permissions 0000 - set msg [list [catch {file rename td1/td2/td3 td2} msg] $msg] - file attributes td1/td2 -permissions 0755 - set msg -} {1 {error renaming "td1/td2/td3": permission denied}} -test unixFCmd-1.2 {TclpRenameFile: EEXIST} {unix notRoot} { - cleanup - file mkdir td1/td2 - file mkdir td2 - list [catch {file rename td2 td1} msg] $msg -} {1 {error renaming "td2" to "td1/td2": file already exists}} -test unixFCmd-1.3 {TclpRenameFile: EINVAL} {unix notRoot} { - cleanup - file mkdir td1 - list [catch {file rename td1 td1} msg] $msg -} {1 {error renaming "td1" to "td1/td1": trying to rename a volume or move a directory into itself}} -test unixFCmd-1.4 {TclpRenameFile: EISDIR} {emptyTest unix notRoot} { - # can't make it happen -} {} -test unixFCmd-1.5 {TclpRenameFile: ENOENT} {unix notRoot} { - cleanup - file mkdir td1 - list [catch {file rename td2 td1} msg] $msg -} {1 {error renaming "td2": no such file or directory}} -test unixFCmd-1.6 {TclpRenameFile: ENOTDIR} {emptyTest unix notRoot} { - # can't make it happen -} {} -test unixFCmd-1.7 {TclpRenameFile: EXDEV} {unix notRoot} { - cleanup - file mkdir foo/bar - file attr foo -perm 040555 - set catchResult [catch {file rename foo/bar /tmp} msg] - set msg [lindex [split $msg :] end] - catch {file delete /tmp/bar} - catch {file attr foo -perm 040777} - catch {file delete -force foo} - list $catchResult $msg -} {1 { permission denied}} -test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} { - testalarm - after 2000 - list [testgotsig] [testgotsig] -} {1 0} -test unixFCmd-1.9 {Checking EINTR Bug} {unix notRoot nonPortable} { - cleanup - set f [open tfalarm w] - puts $f { - after 2000 - puts "hello world" - exit 0 - } - close $f - testalarm - set pipe [open "|[info nameofexecutable] tfalarm" r+] - set line [read $pipe 1] - catch {close $pipe} - list $line [testgotsig] -} {h 1} - -test unixFCmd-2.1 {TclpCopyFile: target exists: lstat(dst) == 0} \ - {unix notRoot} { - cleanup - close [open tf1 a] - close [open tf2 a] - file copy -force tf1 tf2 -} {} -test unixFCmd-2.2.1 {TclpCopyFile: src is symlink} {unix notRoot dontCopyLinks} { - # copying links should end up with real files - cleanup - close [open tf1 a] - file link -symbolic tf2 tf1 - file copy tf2 tf3 - file type tf3 -} {file} -test unixFCmd-2.2.2 {TclpCopyFile: src is symlink} {unix notRoot} { - # copying links should end up with the links copied - cleanup - close [open tf1 a] - file link -symbolic tf2 tf1 - file copy tf2 tf3 - file type tf3 -} {link} -test unixFCmd-2.3 {TclpCopyFile: src is block} {unix notRoot} { - cleanup - set null "/dev/null" - while {[file type $null] != "characterSpecial"} { - set null [file join [file dirname $null] [file readlink $null]] - } - # file copy $null tf1 -} {} -test unixFCmd-2.4 {TclpCopyFile: src is fifo} {unix notRoot} { - cleanup - if [catch {exec mknod tf1 p}] { - list 1 - } else { - file copy tf1 tf2 - expr {"[file type tf1]" == "[file type tf2]"} - } -} {1} -test unixFCmd-2.5 {TclpCopyFile: copy attributes} {unix notRoot} { - cleanup - close [open tf1 a] - file attributes tf1 -permissions 0472 - file copy tf1 tf2 - file attributes tf2 -permissions -} 00472 ;# i.e. perms field of [exec ls -l tf2] is -r--rwx-w- - -test unixFCmd-3.1 {CopyFile not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-4.1 {TclpDeleteFile not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-5.1 {TclpCreateDirectory not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-6.1 {TclpCopyDirectory not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-7.1 {TclpRemoveDirectory not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-8.1 {TraverseUnixTree not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-9.1 {TraversalCopy not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-10.1 {TraversalDelete not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-11.1 {CopyFileAttrs not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-12.1 {GetGroupAttribute - file not found} {unix notRoot} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -group} msg] $msg -} {1 {could not read "foo.test": no such file or directory}} -test unixFCmd-12.2 {GetGroupAttribute - file found} {unix notRoot} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attributes foo.test -group}] [file delete -force -- foo.test] -} {0 {}} - -test unixFCmd-13.1 {GetOwnerAttribute - file not found} {unix notRoot} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -group} msg] $msg -} {1 {could not read "foo.test": no such file or directory}} -test unixFCmd-13.2 {GetOwnerAttribute} {unix notRoot} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attributes foo.test -owner} msg] \ - [string compare $msg $user] [file delete -force -- foo.test] -} {0 0 {}} - -test unixFCmd-14.1 {GetPermissionsAttribute - file not found} {unix notRoot} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -permissions} msg] $msg -} {1 {could not read "foo.test": no such file or directory}} -test unixFCmd-14.2 {GetPermissionsAttribute} {unix notRoot} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attribute foo.test -permissions}] \ - [file delete -force -- foo.test] -} {0 {}} - -#groups hard to test -test unixFCmd-15.1 {SetGroupAttribute - invalid group} {unix notRoot} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -group foozzz} msg] \ - $msg [file delete -force -- foo.test] -} {1 {could not set group for file "foo.test": group "foozzz" does not exist} {}} -test unixFCmd-15.2 {SetGroupAttribute - invalid file} \ - {unix notRoot foundGroup} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -group $group} msg] $msg -} {1 {could not set group for file "foo.test": no such file or directory}} - -#changing owners hard to do -test unixFCmd-16.1 {SetOwnerAttribute - current owner} {unix notRoot} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attributes foo.test -owner $user} msg] \ - $msg [string compare [file attributes foo.test -owner] $user] \ - [file delete -force -- foo.test] -} {0 {} 0 {}} -test unixFCmd-16.2 {SetOwnerAttribute - invalid file} {unix notRoot} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -owner $user} msg] $msg -} {1 {could not set owner for file "foo.test": no such file or directory}} -test unixFCmd-16.3 {SetOwnerAttribute - invalid owner} {unix notRoot} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -owner foozzz} msg] $msg -} {1 {could not set owner for file "foo.test": user "foozzz" does not exist}} - - -test unixFCmd-17.1 {SetPermissionsAttribute} {unix notRoot} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attributes foo.test -permissions 0000} msg] \ - $msg [file attributes foo.test -permissions] \ - [file delete -force -- foo.test] -} {0 {} 00000 {}} -test unixFCmd-17.2 {SetPermissionsAttribute} {unix notRoot} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -permissions 0000} msg] $msg -} {1 {could not set permissions for file "foo.test": no such file or directory}} -test unixFCmd-17.3 {SetPermissionsAttribute} {unix notRoot} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attributes foo.test -permissions foo} msg] $msg \ - [file delete -force -- foo.test] -} {1 {unknown permission string format "foo"} {}} -test unixFCmd-17.4 {SetPermissionsAttribute} {unix notRoot} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attributes foo.test -permissions ---rwx} msg] $msg \ - [file delete -force -- foo.test] -} {1 {unknown permission string format "---rwx"} {}} - -close [open foo.test w] -set ::i 4 -proc permcheck {testnum permstr expected} { - test $testnum {SetPermissionsAttribute} {unix notRoot} { - file attributes foo.test -permissions $permstr - file attributes foo.test -permissions - } $expected -} -permcheck unixFCmd-17.5 rwxrwxrwx 00777 -permcheck unixFCmd-17.6 r--r---w- 00442 -permcheck unixFCmd-17.7 0 00000 -permcheck unixFCmd-17.8 u+rwx,g+r 00740 -permcheck unixFCmd-17.9 u-w 00540 -permcheck unixFCmd-17.10 o+rwx 00547 -permcheck unixFCmd-17.11 --x--x--x 00111 -permcheck unixFCmd-17.12 a+rwx 00777 -file delete -force -- foo.test - -test unixFCmd-18.1 {Unix pwd} {nonPortable unix notRoot} { - # This test is nonportable because SunOS generates a weird error - # message when the current directory isn't readable. - set cd [pwd] - set nd $cd/tstdir - file mkdir $nd - cd $nd - file attributes $nd -permissions 0000 - set r [list [catch {pwd} res] [string range $res 0 36]]; - cd $cd; - file attributes $nd -permissions 0755 - file delete $nd - set r -} {1 {error getting working directory name:}} - -test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} {unix notRoot readonlyAttr} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -readonly} msg] $msg -} {1 {could not read "foo.test": no such file or directory}} -test unixFCmd-19.2 {GetReadOnlyAttribute} {unix notRoot readonlyAttr} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attribute foo.test -readonly} msg] $msg \ - [file delete -force -- foo.test] -} {0 0 {}} - -test unixFCmd-20.1 {SetReadOnlyAttribute} {unix notRoot readonlyAttr} { - catch {file delete -force -- foo.test} - close [open foo.test w] - list [catch {file attributes foo.test -readonly 1} msg] $msg \ - [catch {file attribute foo.test -readonly} msg] $msg \ - [catch {file delete -force -- foo.test}] \ - [catch {file attributes foo.test -readonly 0} msg] $msg \ - [catch {file attribute foo.test -readonly} msg] $msg \ - [file delete -force -- foo.test] -} {0 {} 0 1 1 0 {} 0 0 {}} -test unixFCmd-20.2 {SetReadOnlyAttribute} {unix notRoot readonlyAttr} { - catch {file delete -force -- foo.test} - list [catch {file attributes foo.test -readonly 1} msg] $msg -} {1 {could not read "foo.test": no such file or directory}} - -# cleanup -cleanup -cd $oldcwd -::tcltest::cleanupTests -return - -# Local Variables: -# mode: tcl -# End: +# This file tests the tclUnixFCmd.c file. +# +# This file contains a collection of tests for one or more of the Tcl +# built-in commands. Sourcing this file into Tcl runs the tests and +# generates output for errors. No output means no errors were found. +# +# Copyright (c) 1996 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: unixFCmd.test,v 1.25 2008/04/10 00:21:02 dkf Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest 2 + namespace import -force ::tcltest::* +} + +testConstraint testchmod [llength [info commands testchmod]] + +# These tests really need to be run from a writable directory, which +# it is assumed [temporaryDirectory] is. +set oldcwd [pwd] +cd [temporaryDirectory] + +# Several tests require need to match results against the unix username +set user {} +if {[testConstraint unix]} { + catch {set user [exec whoami]} + if {$user == ""} { + catch {regexp {^[^(]*\(([^)]*)\)} [exec id] dummy user} + } + if {$user == ""} { + set user "root" + } +} + +# Find a group that exists on this system, or else skip tests that require +# groups +testConstraint foundGroup 0 +if {[testConstraint unix]} { + catch { + set groupList [exec groups] + set group [lindex $groupList 0] + testConstraint foundGroup 1 + } +} + +# check whether -readonly attribute is supported +testConstraint readonlyAttr 0 +if {[testConstraint unix]} { + set f [makeFile "whatever" probe] + catch { + file attributes $f -readonly + testConstraint readonlyAttr 1 + } + removeFile probe +} + +proc openup {path} { + testchmod 777 $path + if {[file isdirectory $path]} { + catch { + foreach p [glob -directory $path *] { + openup $p + } + } + } +} + +proc cleanup {args} { + foreach p ". $args" { + set x "" + catch { + set x [glob -directory $p tf* td*] + } + foreach file $x { + if { + [catch {file delete -force -- $file}] + && [testConstraint testchmod] + } then { + openup $file + file delete -force -- $file + } + } + } +} + +if {[testConstraint unix] && [testConstraint notRoot]} { + testConstraint execMknod [expr {![catch {exec mknod tf1 p}]}] + cleanup +} + +test unixFCmd-1.1 {TclpRenameFile: EACCES} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1/td2/td3 + file attributes td1/td2 -permissions 0000 + file rename td1/td2/td3 td2 +} -returnCodes error -cleanup { + file attributes td1/td2 -permissions 0755 + cleanup +} -result {error renaming "td1/td2/td3": permission denied} +test unixFCmd-1.2 {TclpRenameFile: EEXIST} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1/td2 + file mkdir td2 + file rename td2 td1 +} -returnCodes error -cleanup { + cleanup +} -result {error renaming "td2" to "td1/td2": file already exists} +test unixFCmd-1.3 {TclpRenameFile: EINVAL} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1 + file rename td1 td1 +} -returnCodes error -cleanup { + cleanup +} -result {error renaming "td1" to "td1/td1": trying to rename a volume or move a directory into itself} +test unixFCmd-1.4 {TclpRenameFile: EISDIR} {emptyTest unix notRoot} { + # can't make it happen +} {} +test unixFCmd-1.5 {TclpRenameFile: ENOENT} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1 + file rename td2 td1 +} -returnCodes error -cleanup { + cleanup +} -result {error renaming "td2": no such file or directory} +test unixFCmd-1.6 {TclpRenameFile: ENOTDIR} {emptyTest unix notRoot} { + # can't make it happen +} {} +test unixFCmd-1.7 {TclpRenameFile: EXDEV} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir foo/bar + file attr foo -perm 040555 + file rename foo/bar /tmp +} -returnCodes error -cleanup { + catch {file delete /tmp/bar} + catch {file attr foo -perm 040777} + catch {file delete -force foo} +} -match glob -result {*: permission denied} +test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} { + testalarm + after 2000 + list [testgotsig] [testgotsig] +} {1 0} +test unixFCmd-1.9 {Checking EINTR Bug} -constraints {unix notRoot nonPortable} -setup { + cleanup + set f [open tfalarm w] + puts $f { + after 2000 + puts "hello world" + exit 0 + } + close $f +} -body { + testalarm + set pipe [open "|[info nameofexecutable] tfalarm" r+] + set line [read $pipe 1] + catch {close $pipe} + list $line [testgotsig] +} -cleanup { + cleanup +} -result {h 1} + +test unixFCmd-2.1 {TclpCopyFile: target exists: lstat(dst) == 0} -setup { + cleanup +} -constraints {unix notRoot} -body { + close [open tf1 a] + close [open tf2 a] + file copy -force tf1 tf2 +} -cleanup { + cleanup +} -result {} +test unixFCmd-2.2.1 {TclpCopyFile: src is symlink} -setup { + cleanup +} -constraints {unix notRoot dontCopyLinks} -body { + # copying links should end up with real files + close [open tf1 a] + file link -symbolic tf2 tf1 + file copy tf2 tf3 + file type tf3 +} -cleanup { + cleanup +} -result file +test unixFCmd-2.2.2 {TclpCopyFile: src is symlink} -setup { + cleanup +} -constraints {unix notRoot} -body { + # copying links should end up with the links copied + close [open tf1 a] + file link -symbolic tf2 tf1 + file copy tf2 tf3 + file type tf3 +} -cleanup { + cleanup +} -result link +test unixFCmd-2.3 {TclpCopyFile: src is block} -setup { + cleanup +} -constraints {unix notRoot} -body { + set null "/dev/null" + while {[file type $null] != "characterSpecial"} { + set null [file join [file dirname $null] [file readlink $null]] + } + # file copy $null tf1 +} -result {} +test unixFCmd-2.4 {TclpCopyFile: src is fifo} -setup { + cleanup +} -constraints {unix notRoot execMknod} -body { + exec mknod tf1 p + file copy tf1 tf2 + list [file type tf1] [file type tf2] +} -cleanup { + cleanup +} -result {fifo fifo} +test unixFCmd-2.5 {TclpCopyFile: copy attributes} -setup { + cleanup +} -constraints {unix notRoot} -body { + close [open tf1 a] + file attributes tf1 -permissions 0472 + file copy tf1 tf2 + file attributes tf2 -permissions +} -cleanup { + cleanup +} -result 00472 ;# i.e. perms field of [exec ls -l tf2] is -r--rwx-w- + +test unixFCmd-3.1 {CopyFile not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-4.1 {TclpDeleteFile not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-5.1 {TclpCreateDirectory not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-6.1 {TclpCopyDirectory not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-7.1 {TclpRemoveDirectory not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-8.1 {TraverseUnixTree not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-9.1 {TraversalCopy not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-10.1 {TraversalDelete not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-11.1 {CopyFileAttrs not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-12.1 {GetGroupAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -group +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-12.2 {GetGroupAttribute - file found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -group +} -cleanup { + file delete -force -- foo.test +} -match glob -result * + +test unixFCmd-13.1 {GetOwnerAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + list [catch {file attributes foo.test -group} msg] $msg +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-13.2 {GetOwnerAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -owner +} -cleanup { + file delete -force -- foo.test +} -result $user + +test unixFCmd-14.1 {GetPermissionsAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -permissions +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-14.2 {GetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attribute foo.test -permissions +} -cleanup { + file delete -force -- foo.test +} -match glob -result * + +#groups hard to test +test unixFCmd-15.1 {SetGroupAttribute - invalid group} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + file attributes foo.test -group foozzz +} -returnCodes error -cleanup { + file delete -force -- foo.test +} -result {could not set group for file "foo.test": group "foozzz" does not exist} +test unixFCmd-15.2 {SetGroupAttribute - invalid file} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot foundGroup} -returnCodes error -body { + file attributes foo.test -group $group +} -result {could not set group for file "foo.test": no such file or directory} + +#changing owners hard to do +test unixFCmd-16.1 {SetOwnerAttribute - current owner} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + list [file attributes foo.test -owner $user] \ + [file attributes foo.test -owner] +} -cleanup { + file delete -force -- foo.test +} -result [list {} $user] +test unixFCmd-16.2 {SetOwnerAttribute - invalid file} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -owner $user +} -result {could not set owner for file "foo.test": no such file or directory} +test unixFCmd-16.3 {SetOwnerAttribute - invalid owner} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -owner foozzz +} -result {could not set owner for file "foo.test": user "foozzz" does not exist} + +test unixFCmd-17.1 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + list [file attributes foo.test -permissions 0000] \ + [file attributes foo.test -permissions] +} -cleanup { + file delete -force -- foo.test +} -result {{} 00000} +test unixFCmd-17.2 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -permissions 0000 +} -result {could not set permissions for file "foo.test": no such file or directory} +test unixFCmd-17.3 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -permissions foo +} -cleanup { + file delete -force -- foo.test +} -returnCodes error -result {unknown permission string format "foo"} +test unixFCmd-17.4 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -permissions ---rwx +} -cleanup { + file delete -force -- foo.test +} -returnCodes error -result {unknown permission string format "---rwx"} + +close [open foo.test w] +set ::i 4 +proc permcheck {testnum permstr expected} { + test $testnum {SetPermissionsAttribute} {unix notRoot} { + file attributes foo.test -permissions $permstr + file attributes foo.test -permissions + } $expected +} +permcheck unixFCmd-17.5 rwxrwxrwx 00777 +permcheck unixFCmd-17.6 r--r---w- 00442 +permcheck unixFCmd-17.7 0 00000 +permcheck unixFCmd-17.8 u+rwx,g+r 00740 +permcheck unixFCmd-17.9 u-w 00540 +permcheck unixFCmd-17.10 o+rwx 00547 +permcheck unixFCmd-17.11 --x--x--x 00111 +permcheck unixFCmd-17.12 a+rwx 00777 +file delete -force -- foo.test + +test unixFCmd-18.1 {Unix pwd} -constraints {unix notRoot nonPortable} -setup { + set cd [pwd] +} -body { + # This test is nonportable because SunOS generates a weird error + # message when the current directory isn't readable. + set nd $cd/tstdir + file mkdir $nd + cd $nd + file attributes $nd -permissions 0000 + pwd +} -returnCodes error -cleanup { + cd $cd + file attributes $nd -permissions 0755 + file delete $nd +} -match glob -result {error getting working directory name:*} + +test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -returnCodes error -body { + file attributes foo.test -readonly +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-19.2 {GetReadOnlyAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -body { + close [open foo.test w] + file attribute foo.test -readonly +} -cleanup { + file delete -force -- foo.test +} -result 0 + +test unixFCmd-20.1 {SetReadOnlyAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -body { + close [open foo.test w] + list [catch {file attributes foo.test -readonly 1} msg] $msg \ + [catch {file attribute foo.test -readonly} msg] $msg \ + [catch {file delete -force -- foo.test}] \ + [catch {file attributes foo.test -readonly 0} msg] $msg \ + [catch {file attribute foo.test -readonly} msg] $msg +} -cleanup { + file delete -force -- foo.test +} -result {0 {} 0 1 1 0 {} 0 0} +test unixFCmd-20.2 {SetReadOnlyAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -returnCodes error -body { + file attributes foo.test -readonly 1 +} -result {could not read "foo.test": no such file or directory} + +# cleanup +cleanup +cd $oldcwd +::tcltest::cleanupTests +return + +# Local Variables: +# mode: tcl +# End: diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 24fbf8e..f434516 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFCmd.test,v 1.42 2007/02/20 15:36:47 patthoyts Exp $ +# RCS: @(#) $Id: winFCmd.test,v 1.43 2008/04/10 00:21:02 dkf Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -67,17 +67,13 @@ if {[testConstraint winOnly]} { # find a CD-ROM so we can test read-only filesystems. proc findfile {dir} { - foreach p [glob -directory $dir *] { - if {[file type $p] == "file"} { - return $p - } + foreach p [glob -nocomplain -type f -directory $dir *] { + return $p } - foreach p [glob -directory $dir *] { - if {[file type $p] == "directory"} { - set f [findfile $p] - if {$f != ""} { - return $f - } + foreach p [glob -nocomplain -type d -directory $dir *] { + set f [findfile $p] + if {$f ne ""} { + return $f } } return "" @@ -85,7 +81,7 @@ proc findfile {dir} { if {[testConstraint testvolumetype]} { foreach p {d e f g h i j k l m n o p q r s t u v w x y z} { - if {![catch {testvolumetype ${p}:} result] && $result eq "CDFS"} { + if {![catch {testvolumetype ${p}:} result] && $result in {CDFS UDF}} { set cdrom ${p}: set cdfile [findfile $cdrom] testConstraint cdrom 1 @@ -97,7 +93,7 @@ if {[testConstraint testvolumetype]} { # NB: filename is chosen to be short but unlikely to clash with other apps if {[file exists c:/] && [file exists d:/]} { catch {file delete d:/TclTmpF.1} - if {[catch {close [open d:/TclTmpF.1 w]}] == 0} { + if {[catch {createfile d:/TclTmpF.1 {}}] == 0} { file delete d:/TclTmpF.1 testConstraint exdev 1 } @@ -126,622 +122,793 @@ append longname $longname # it can be difficult to actually forward "insane" arguments to the # low-level posix emulation layer. -test winFCmd-1.1 {TclpRenameFile: errno: EACCES} {win cdrom testfile} { - list [catch {testfile mv $cdfile $cdrom/dummy~~.fil} msg] $msg -} {1 EACCES} -test winFCmd-1.2 {TclpRenameFile: errno: EEXIST} {win testfile} { +test winFCmd-1.1 {TclpRenameFile: errno: EACCES} -body { + testfile mv $cdfile $cdrom/dummy~~.fil +} -constraints {win cdrom testfile} -returnCodes error -result EACCES +test winFCmd-1.2 {TclpRenameFile: errno: EEXIST} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td2/td3 file mkdir td2 - list [catch {testfile mv td2 td1/td2} msg] $msg -} {1 EEXIST} -test winFCmd-1.3 {TclpRenameFile: errno: EINVAL} {win testfile} { + testfile mv td2 td1/td2 +} -returnCodes error -result EEXIST +test winFCmd-1.3 {TclpRenameFile: errno: EINVAL} -setup { cleanup - list [catch {testfile mv / td1} msg] $msg -} {1 EINVAL} -test winFCmd-1.4 {TclpRenameFile: errno: EINVAL} {win testfile} { +} -constraints {win testfile} -body { + testfile mv / td1 +} -returnCodes error -result EINVAL +test winFCmd-1.4 {TclpRenameFile: errno: EINVAL} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile mv td1 td1/td2} msg] $msg -} {1 EINVAL} -test winFCmd-1.5 {TclpRenameFile: errno: EISDIR} {win testfile} { + testfile mv td1 td1/td2 +} -returnCodes error -result EINVAL +test winFCmd-1.5 {TclpRenameFile: errno: EISDIR} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile tf1 - list [catch {testfile mv tf1 td1} msg] $msg -} {1 EISDIR} -test winFCmd-1.6 {TclpRenameFile: errno: ENOENT} {win testfile} { + testfile mv tf1 td1 +} -returnCodes error -result EISDIR +test winFCmd-1.6 {TclpRenameFile: errno: ENOENT} -setup { cleanup - list [catch {testfile mv tf1 tf2} msg] $msg -} {1 ENOENT} -test winFCmd-1.7 {TclpRenameFile: errno: ENOENT} {win testfile} { +} -constraints {win testfile} -body { + testfile mv tf1 tf2 +} -returnCodes error -result ENOENT +test winFCmd-1.7 {TclpRenameFile: errno: ENOENT} -setup { cleanup - list [catch {testfile mv "" tf2} msg] $msg -} {1 ENOENT} -test winFCmd-1.8 {TclpRenameFile: errno: ENOENT} {win testfile} { +} -constraints {win testfile} -body { + testfile mv "" tf2 +} -returnCodes error -result ENOENT +test winFCmd-1.8 {TclpRenameFile: errno: ENOENT} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 - list [catch {testfile mv tf1 ""} msg] $msg -} {1 ENOENT} -test winFCmd-1.9 {TclpRenameFile: errno: ENOTDIR} {win testfile} { + testfile mv tf1 "" +} -returnCodes error -result ENOENT +test winFCmd-1.9 {TclpRenameFile: errno: ENOTDIR} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile tf1 - list [catch {testfile mv td1 tf1} msg] $msg -} {1 ENOTDIR} -test winFCmd-1.10 {TclpRenameFile: errno: EXDEV} {win exdev testfile} { + testfile mv td1 tf1 +} -returnCodes error -result ENOTDIR +test winFCmd-1.10 {TclpRenameFile: errno: EXDEV} -setup { file delete -force d:/tf1 +} -constraints {win exdev testfile} -body { file mkdir c:/tf1 - set msg [list [catch {testfile mv c:/tf1 d:/tf1} msg] $msg] + testfile mv c:/tf1 d:/tf1 +} -cleanup { file delete -force c:/tf1 - set msg -} {1 EXDEV} -test winFCmd-1.11 {TclpRenameFile: errno: EACCES} {win testfile} { +} -returnCodes error -result EXDEV +test winFCmd-1.11 {TclpRenameFile: errno: EACCES} -setup { cleanup +} -constraints {win testfile} -body { set fd [open tf1 w] - set msg [list [catch {testfile mv tf1 tf2} msg] $msg] - close $fd - set msg -} {1 EACCES} -test winFCmd-1.12 {TclpRenameFile: errno: EACCES} {win testfile} { + testfile mv tf1 tf2 +} -cleanup { + catch {close $fd} +} -returnCodes error -result EACCES +test winFCmd-1.12 {TclpRenameFile: errno: EACCES} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 set fd [open tf2 w] - set msg [list [catch {testfile mv tf1 tf2} msg] $msg] - close $fd - set msg -} {1 EACCES} -test winFCmd-1.13 {TclpRenameFile: errno: EACCES} {win win2000orXP testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 EINVAL} -test winFCmd-1.13.1 {TclpRenameFile: errno: EACCES} {win nt winOlderThan2000 testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 EACCES} -test winFCmd-1.13.2 {TclpRenameFile: errno: ENOENT} {win 95 testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 ENOENT} -test winFCmd-1.14 {TclpRenameFile: errno: EACCES} {win 95 testfile} { - cleanup + testfile mv tf1 tf2 +} -cleanup { + catch {close $fd} +} -returnCodes error -result EACCES +test winFCmd-1.13 {TclpRenameFile: errno: EACCES} -setup { + cleanup +} -constraints {win win2000orXP testfile} -body { + testfile mv nul tf1 +} -returnCodes error -result EINVAL +test winFCmd-1.13.1 {TclpRenameFile: errno: EACCES} -setup { + cleanup +} -constraints {win nt winOlderThan2000 testfile} -body { + testfile mv nul tf1 +} -returnCodes error -result EACCES +test winFCmd-1.13.2 {TclpRenameFile: errno: ENOENT} -setup { + cleanup +} -constraints {win 95 testfile} -body { + testfile mv nul tf1 +} -returnCodes error -result ENOENT +test winFCmd-1.14 {TclpRenameFile: errno: EACCES} -setup { + cleanup +} -constraints {win 95 testfile} -body { createfile tf1 - list [catch {testfile mv tf1 nul} msg] $msg -} {1 EACCES} -test winFCmd-1.15 {TclpRenameFile: errno: EEXIST} {win nt testfile} { + testfile mv tf1 nul +} -returnCodes error -result EACCES +test winFCmd-1.15 {TclpRenameFile: errno: EEXIST} -setup { cleanup +} -constraints {win nt testfile} -body { createfile tf1 - list [catch {testfile mv tf1 nul} msg] $msg -} {1 EEXIST} -test winFCmd-1.16 {TclpRenameFile: MoveFile() != FALSE} {win testfile} { + testfile mv tf1 nul +} -returnCodes error -result EEXIST +test winFCmd-1.16 {TclpRenameFile: MoveFile() != FALSE} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 tf1 testfile mv tf1 tf2 list [file exists tf1] [contents tf2] -} {0 tf1} -test winFCmd-1.17 {TclpRenameFile: MoveFile() == FALSE} {win testfile} { - cleanup - list [catch {testfile mv tf1 tf2} msg] $msg -} {1 ENOENT} -test winFCmd-1.18 {TclpRenameFile: srcAttr == -1} {win testfile} { - cleanup - list [catch {testfile mv tf1 tf2} msg] $msg -} {1 ENOENT} -test winFCmd-1.19 {TclpRenameFile: errno == EACCES} {win win2000orXP testfile} { +} -result {0 tf1} +test winFCmd-1.17 {TclpRenameFile: MoveFile() == FALSE} -setup { cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 EINVAL} -test winFCmd-1.19.1 {TclpRenameFile: errno == EACCES} {win nt winOlderThan2000 testfile} { - cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 EACCES} -test winFCmd-1.19.2 {TclpRenameFile: errno == ENOENT} {win 95 testfile} { +} -constraints {win testfile} -body { + testfile mv tf1 tf2 +} -returnCodes error -result ENOENT +test winFCmd-1.18 {TclpRenameFile: srcAttr == -1} -setup { cleanup - list [catch {testfile mv nul tf1} msg] $msg -} {1 ENOENT} -test winFCmd-1.20 {TclpRenameFile: src is dir} {win nt testfile} { - # under 95, this would actually succeed and move the current dir out from +} -constraints {win testfile} -body { + testfile mv tf1 tf2 +} -returnCodes error -result ENOENT +test winFCmd-1.19 {TclpRenameFile: errno == EACCES} -setup { + cleanup +} -constraints {win win2000orXP testfile} -body { + testfile mv nul tf1 +} -returnCodes error -result EINVAL +test winFCmd-1.19.1 {TclpRenameFile: errno == EACCES} -setup { + cleanup +} -constraints {win nt winOlderThan2000 testfile} -body { + testfile mv nul tf1 +} -returnCodes error -result EACCES +test winFCmd-1.19.2 {TclpRenameFile: errno == ENOENT} -setup { + cleanup +} -constraints {win 95 testfile} -body { + testfile mv nul tf1 +} -returnCodes error -result ENOENT +test winFCmd-1.20 {TclpRenameFile: src is dir} -setup { + cleanup +} -constraints {win nt testfile} -body { + # under 95, this would actually succeed and move the current dir out from # under the current process! - cleanup file delete /tf1 - list [catch {testfile mv [pwd] /tf1} msg] $msg -} {1 EACCES} -test winFCmd-1.21 {TclpRenameFile: long src} {win testfile} { + testfile mv [pwd] /tf1 +} -returnCodes error -result EACCES +test winFCmd-1.21 {TclpRenameFile: long src} -setup { cleanup - list [catch {testfile mv $longname tf1} msg] $msg -} {1 ENAMETOOLONG} -test winFCmd-1.22 {TclpRenameFile: long dst} {win testfile} { +} -constraints {win testfile} -body { + testfile mv $longname tf1 +} -returnCodes error -result ENAMETOOLONG +test winFCmd-1.22 {TclpRenameFile: long dst} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 - list [catch {testfile mv tf1 $longname} msg] $msg -} {1 ENAMETOOLONG} -test winFCmd-1.23 {TclpRenameFile: move dir into self} {win testfile} { + testfile mv tf1 $longname +} -returnCodes error -result ENAMETOOLONG +test winFCmd-1.23 {TclpRenameFile: move dir into self} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile mv [pwd]/td1 td1/td2} msg] $msg -} {1 EINVAL} -test winFCmd-1.24 {TclpRenameFile: move a root dir} {win testfile} { + testfile mv [pwd]/td1 td1/td2 +} -returnCodes error -result EINVAL +test winFCmd-1.24 {TclpRenameFile: move a root dir} -setup { cleanup - list [catch {testfile mv / c:/} msg] $msg -} {1 EINVAL} -test winFCmd-1.25 {TclpRenameFile: cross file systems} {win cdrom testfile} { +} -constraints {win testfile} -body { + testfile mv / c:/ +} -returnCodes error -result EINVAL +test winFCmd-1.25 {TclpRenameFile: cross file systems} -setup { cleanup +} -constraints {win cdrom testfile} -body { file mkdir td1 - list [catch {testfile mv td1 $cdrom/td1} msg] $msg -} {1 EXDEV} -test winFCmd-1.26 {TclpRenameFile: readonly fs} {win cdrom testfile} { + testfile mv td1 $cdrom/td1 +} -returnCodes error -result EXDEV +test winFCmd-1.26 {TclpRenameFile: readonly fs} -setup { cleanup - list [catch {testfile mv $cdfile $cdrom/dummy~~.fil} msg] $msg -} {1 EACCES} -test winFCmd-1.27 {TclpRenameFile: open file} {win testfile} { +} -constraints {win cdrom testfile} -body { + testfile mv $cdfile $cdrom/dummy~~.fil +} -returnCodes error -result EACCES +test winFCmd-1.27 {TclpRenameFile: open file} -setup { cleanup +} -constraints {win testfile} -body { set fd [open tf1 w] - set msg [list [catch {testfile mv tf1 tf2} msg] $msg] - close $fd - set msg -} {1 EACCES} -test winFCmd-1.28 {TclpRenameFile: errno == EEXIST} {win testfile} { + testfile mv tf1 tf2 +} -cleanup { + catch {close $fd} +} -returnCodes error -result EACCES +test winFCmd-1.28 {TclpRenameFile: errno == EEXIST} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 createfile tf2 testfile mv tf1 tf2 list [file exists tf1] [file exists tf2] -} {0 1} -test winFCmd-1.29 {TclpRenameFile: src is dir} {win testfile} { +} -result {0 1} +test winFCmd-1.29 {TclpRenameFile: src is dir} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile tf1 - list [catch {testfile mv td1 tf1} msg] $msg -} {1 ENOTDIR} -test winFCmd-1.30 {TclpRenameFile: dst is dir} {win testfile} { + testfile mv td1 tf1 +} -returnCodes error -result ENOTDIR +test winFCmd-1.30 {TclpRenameFile: dst is dir} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 file mkdir td2/td2 - list [catch {testfile mv td1 td2} msg] $msg -} {1 EEXIST} -test winFCmd-1.31 {TclpRenameFile: TclpRemoveDirectory fails} {win testfile} { + testfile mv td1 td2 +} -returnCodes error -result EEXIST +test winFCmd-1.31 {TclpRenameFile: TclpRemoveDirectory fails} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 file mkdir td2/td2 - list [catch {testfile mv td1 td2} msg] $msg -} {1 EEXIST} -test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} {win testfile} { + testfile mv td1 td2 +} -returnCodes error -result EEXIST +test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td2 file mkdir td2 testfile mv td1 td2 list [file exists td1] [file exists td2] [file exists td2/td2] -} {0 1 1} +} -result {0 1 1} test winFCmd-1.33 {TclpRenameFile: After removing dst dir, MoveFile fails} \ - {win exdev testfile testchmod} { + -constraints {win exdev testfile testchmod} -body { file mkdir d:/td1 testchmod 000 d:/td1 file mkdir c:/tf1 - set msg [list [catch {testfile mv c:/tf1 d:/td1} msg] $msg] - set msg "$msg [file writable d:/td1]" + catch {testfile mv c:/tf1 d:/td1} msg + list $msg [file writable d:/td1] +} -cleanup { file delete d:/td1 file delete -force c:/tf1 - set msg -} {1 EXDEV 0} -test winFCmd-1.34 {TclpRenameFile: src is dir, dst is not} {win testfile} { +} -result {EXDEV 0} +test winFCmd-1.34 {TclpRenameFile: src is dir, dst is not} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile tf1 - list [catch {testfile mv td1 tf1} msg] $msg -} {1 ENOTDIR} -test winFCmd-1.35 {TclpRenameFile: src is not dir, dst is} {win testfile} { + testfile mv td1 tf1 +} -cleanup { + cleanup +} -returnCodes error -result ENOTDIR +test winFCmd-1.35 {TclpRenameFile: src is not dir, dst is} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile tf1 - list [catch {testfile mv tf1 td1} msg] $msg -} {1 EISDIR} -test winFCmd-1.36 {TclpRenameFile: src and dst not dir} {win testfile} { + testfile mv tf1 td1 +} -cleanup { + cleanup +} -returnCodes error -result EISDIR +test winFCmd-1.36 {TclpRenameFile: src and dst not dir} -setup { + cleanup +} -constraints {win testfile} -body { createfile tf1 tf1 createfile tf2 tf2 testfile mv tf1 tf2 contents tf2 -} {tf1} +} -cleanup { + cleanup +} -result {tf1} test winFCmd-1.37 {TclpRenameFile: need to restore temp file} {win emptyTest} { - # Can't figure out how to cause this. + # Can't figure out how to cause this. # Need a file that can't be copied. } {} -test winFCmd-2.1 {TclpCopyFile: errno: EACCES} {win cdrom testfile} { +test winFCmd-2.1 {TclpCopyFile: errno: EACCES} -setup { cleanup - list [catch {testfile cp $cdfile $cdrom/dummy~~.fil} msg] $msg -} {1 EACCES} -test winFCmd-2.2 {TclpCopyFile: errno: EISDIR} {win testfile} { +} -constraints {win cdrom testfile} -body { + testfile cp $cdfile $cdrom/dummy~~.fil +} -returnCodes error -result EACCES +test winFCmd-2.2 {TclpCopyFile: errno: EISDIR} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile cp td1 tf1} msg] $msg -} {1 EISDIR} -test winFCmd-2.3 {TclpCopyFile: errno: EISDIR} {win testfile} { + testfile cp td1 tf1 +} -cleanup { + cleanup +} -returnCodes error -result EISDIR +test winFCmd-2.3 {TclpCopyFile: errno: EISDIR} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 file mkdir td1 - list [catch {testfile cp tf1 td1} msg] $msg -} {1 EISDIR} -test winFCmd-2.4 {TclpCopyFile: errno: ENOENT} {win testfile} { + testfile cp tf1 td1 +} -cleanup { cleanup - list [catch {testfile cp tf1 tf2} msg] $msg -} {1 ENOENT} -test winFCmd-2.5 {TclpCopyFile: errno: ENOENT} {win testfile} { +} -returnCodes error -result EISDIR +test winFCmd-2.4 {TclpCopyFile: errno: ENOENT} -setup { cleanup - list [catch {testfile cp "" tf2} msg] $msg -} {1 ENOENT} -test winFCmd-2.6 {TclpCopyFile: errno: ENOENT} {win testfile} { +} -constraints {win testfile} -body { + testfile cp tf1 tf2 +} -returnCodes error -result ENOENT +test winFCmd-2.5 {TclpCopyFile: errno: ENOENT} -setup { cleanup +} -constraints {win testfile} -body { + testfile cp "" tf2 +} -returnCodes error -result ENOENT +test winFCmd-2.6 {TclpCopyFile: errno: ENOENT} -setup { + cleanup +} -constraints {win testfile} -body { createfile tf1 - list [catch {testfile cp tf1 ""} msg] $msg -} {1 ENOENT} -test winFCmd-2.7 {TclpCopyFile: errno: EACCES} {win 95 testfile} { + testfile cp tf1 "" +} -cleanup { cleanup +} -returnCodes error -result ENOENT +test winFCmd-2.7 {TclpCopyFile: errno: EACCES} -setup { + cleanup +} -constraints {win 95 testfile} -body { createfile tf1 set fd [open tf2 w] - set msg [list [catch {testfile cp tf1 tf2} msg] $msg] + testfile cp tf1 tf2 +} -cleanup { close $fd - set msg -} {1 EACCES} -test winFCmd-2.8 {TclpCopyFile: errno: EACCES} {win win2000orXP testfile} { cleanup - list [catch {testfile cp nul tf1} msg] $msg -} {1 EINVAL} -test winFCmd-2.8.1 {TclpCopyFile: errno: EACCES} {win nt winOlderThan2000 testfile} { +} -returnCodes error -result EACCES +test winFCmd-2.8 {TclpCopyFile: errno: EACCES} -setup { + cleanup +} -constraints {win win2000orXP testfile} -body { + testfile cp nul tf1 +} -returnCodes error -result EINVAL +test winFCmd-2.8.1 {TclpCopyFile: errno: EACCES} -setup { cleanup - list [catch {testfile cp nul tf1} msg] $msg -} {1 EACCES} -test winFCmd-2.9 {TclpCopyFile: errno: ENOENT} {win 95 testfile} { +} -constraints {win nt winOlderThan2000 testfile} -body { + testfile cp nul tf1 +} -returnCodes error -result EACCES +test winFCmd-2.9 {TclpCopyFile: errno: ENOENT} -setup { cleanup - list [catch {testfile cp nul tf1} msg] $msg -} {1 ENOENT} -test winFCmd-2.10 {TclpCopyFile: CopyFile succeeds} {win testfile} { +} -constraints {win 95 testfile} -body { + testfile cp nul tf1 +} -returnCodes error -result ENOENT +test winFCmd-2.10 {TclpCopyFile: CopyFile succeeds} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 tf1 testfile cp tf1 tf2 list [contents tf1] [contents tf2] -} {tf1 tf1} -test winFCmd-2.11 {TclpCopyFile: CopyFile succeeds} {win testfile} { +} -cleanup { + cleanup +} -result {tf1 tf1} +test winFCmd-2.11 {TclpCopyFile: CopyFile succeeds} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 tf1 createfile tf2 tf2 testfile cp tf1 tf2 list [contents tf1] [contents tf2] -} {tf1 tf1} -test winFCmd-2.12 {TclpCopyFile: CopyFile succeeds} {win testfile} { +} -cleanup { + cleanup +} -result {tf1 tf1} +test winFCmd-2.12 {TclpCopyFile: CopyFile succeeds} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 tf1 testchmod 000 tf1 testfile cp tf1 tf2 list [contents tf2] [file writable tf2] -} {tf1 0} -test winFCmd-2.13 {TclpCopyFile: CopyFile fails} {win testfile} { +} -cleanup { + cleanup +} -result {tf1 0} +test winFCmd-2.13 {TclpCopyFile: CopyFile fails} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 file mkdir td1 - list [catch {testfile cp tf1 td1} msg] $msg -} {1 EISDIR} -test winFCmd-2.14 {TclpCopyFile: errno == EACCES} {win testfile} { + testfile cp tf1 td1 +} -cleanup { cleanup +} -returnCodes error -result EISDIR +test winFCmd-2.14 {TclpCopyFile: errno == EACCES} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile cp td1 tf1} msg] $msg -} {1 EISDIR} -test winFCmd-2.15 {TclpCopyFile: src is directory} {win testfile} { + testfile cp td1 tf1 +} -cleanup { cleanup +} -returnCodes error -result EISDIR +test winFCmd-2.15 {TclpCopyFile: src is directory} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile cp td1 tf1} msg] $msg -} {1 EISDIR} -test winFCmd-2.16 {TclpCopyFile: dst is directory} {win testfile} { + testfile cp td1 tf1 +} -cleanup { cleanup +} -returnCodes error -result EISDIR +test winFCmd-2.16 {TclpCopyFile: dst is directory} -setup { + cleanup +} -constraints {win testfile} -body { createfile tf1 file mkdir td1 - list [catch {testfile cp tf1 td1} msg] $msg -} {1 EISDIR} -test winFCmd-2.17 {TclpCopyFile: dst is readonly} {win testfile testchmod} { + testfile cp tf1 td1 +} -cleanup { + cleanup +} -returnCodes error -result EISDIR +test winFCmd-2.17 {TclpCopyFile: dst is readonly} -setup { cleanup +} -constraints {win testfile testchmod} -body { createfile tf1 tf1 createfile tf2 tf2 testchmod 000 tf2 testfile cp tf1 tf2 list [file writable tf2] [contents tf2] -} {1 tf1} -test winFCmd-2.18 {TclpCopyFile: still can't copy onto dst} {win 95 testfile testchmod} { +} -cleanup { + cleanup +} -result {1 tf1} +test winFCmd-2.18 {TclpCopyFile: still can't copy onto dst} -setup { cleanup +} -constraints {win 95 testfile testchmod} -body { createfile tf1 createfile tf2 testchmod 000 tf2 set fd [open tf2] set msg [list [catch {testfile cp tf1 tf2} msg] $msg] close $fd - set msg "$msg [file writable tf2]" -} {1 EACCES 0} + lappend msg [file writable tf2] +} -result {1 EACCES 0} -test winFCmd-3.1 {TclpDeleteFile: errno: EACCES} {win cdrom testfile} { - list [catch {testfile rm $cdfile $cdrom/dummy~~.fil} msg] $msg -} {1 EACCES} -test winFCmd-3.2 {TclpDeleteFile: errno: EISDIR} {win testfile} { +test winFCmd-3.1 {TclpDeleteFile: errno: EACCES} -body { + testfile rm $cdfile $cdrom/dummy~~.fil +} -constraints {win cdrom testfile} -returnCodes error -result EACCES +test winFCmd-3.2 {TclpDeleteFile: errno: EISDIR} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile rm td1} msg] $msg -} {1 EISDIR} -test winFCmd-3.3 {TclpDeleteFile: errno: ENOENT} {win testfile} { + testfile rm td1 +} -cleanup { + cleanup +} -returnCodes error -result EISDIR +test winFCmd-3.3 {TclpDeleteFile: errno: ENOENT} -setup { cleanup - list [catch {testfile rm tf1} msg] $msg -} {1 ENOENT} -test winFCmd-3.4 {TclpDeleteFile: errno: ENOENT} {win testfile} { +} -constraints {win testfile} -body { + testfile rm tf1 +} -returnCodes error -result ENOENT +test winFCmd-3.4 {TclpDeleteFile: errno: ENOENT} -setup { cleanup - list [catch {testfile rm ""} msg] $msg -} {1 ENOENT} -test winFCmd-3.5 {TclpDeleteFile: errno: EACCES} {win testfile} { +} -constraints {win testfile} -body { + testfile rm "" +} -returnCodes error -result ENOENT +test winFCmd-3.5 {TclpDeleteFile: errno: EACCES} -setup { cleanup +} -constraints {win testfile} -body { set fd [open tf1 w] - set msg [list [catch {testfile rm tf1} msg] $msg] + testfile rm tf1 +} -cleanup { close $fd - set msg -} {1 EACCES} -test winFCmd-3.6 {TclpDeleteFile: errno: EACCES} {win testfile} { cleanup - list [catch {testfile rm nul} msg] $msg -} {1 EACCES} -test winFCmd-3.7 {TclpDeleteFile: DeleteFile succeeds} {win testfile} { +} -returnCodes error -result EACCES +test winFCmd-3.6 {TclpDeleteFile: errno: EACCES} -setup { + cleanup +} -constraints {win testfile} -body { + testfile rm nul +} -returnCodes error -result EACCES +test winFCmd-3.7 {TclpDeleteFile: DeleteFile succeeds} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 testfile rm tf1 file exists tf1 -} {0} -test winFCmd-3.8 {TclpDeleteFile: DeleteFile fails} {win testfile} { +} -result {0} +test winFCmd-3.8 {TclpDeleteFile: DeleteFile fails} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile rm td1} msg] $msg -} {1 EISDIR} -test winFCmd-3.9 {TclpDeleteFile: errno == EACCES} {win testfile} { + testfile rm td1 +} -cleanup { + cleanup +} -returnCodes error -result EISDIR +test winFCmd-3.9 {TclpDeleteFile: errno == EACCES} -setup { cleanup +} -constraints {win testfile} -body { set fd [open tf1 w] - set msg [list [catch {testfile rm tf1} msg] $msg] + testfile rm tf1 +} -cleanup { close $fd - set msg -} {1 EACCES} -test winFCmd-3.10 {TclpDeleteFile: path is readonly} {win testfile testchmod} { +} -returnCodes error -result EACCES +test winFCmd-3.10 {TclpDeleteFile: path is readonly} -setup { cleanup +} -constraints {win testfile testchmod} -body { createfile tf1 testchmod 000 tf1 testfile rm tf1 file exists tf1 -} {0} -test winFCmd-3.11 {TclpDeleteFile: still can't remove path} {win testfile testchmod} { +} -result {0} +test winFCmd-3.11 {TclpDeleteFile: still can't remove path} -setup { cleanup +} -constraints {win testfile testchmod} -body { set fd [open tf1 w] testchmod 000 tf1 - set msg [list [catch {testfile rm tf1} msg] $msg] + testfile rm tf1 +} -cleanup { close $fd - set msg -} {1 EACCES} + cleanup +} -returnCodes error -result EACCES -test winFCmd-4.1 {TclpCreateDirectory: errno: EACCES} {win nt cdrom testfile} { - list [catch {testfile mkdir $cdrom/dummy~~.dir} msg] $msg -} {1 EACCES} -test winFCmd-4.2 {TclpCreateDirectory: errno: EACCES} {win 95 cdrom testfile} { - list [catch {testfile mkdir $cdrom/dummy~~.dir} msg] $msg -} {1 ENOSPC} -test winFCmd-4.3 {TclpCreateDirectory: errno: EEXIST} {win testfile} { +test winFCmd-4.1 {TclpCreateDirectory: errno: EACCES} -body { + testfile mkdir $cdrom/dummy~~.dir +} -constraints {win nt cdrom testfile} -returnCodes error -result EACCES +test winFCmd-4.2 {TclpCreateDirectory: errno: EACCES} -body { + testfile mkdir $cdrom/dummy~~.dir +} -constraints {win 95 cdrom testfile} -returnCodes error -result ENOSPC +test winFCmd-4.3 {TclpCreateDirectory: errno: EEXIST} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile mkdir td1} msg] $msg -} {1 EEXIST} -test winFCmd-4.4 {TclpCreateDirectory: errno: ENOENT} {win testfile} { + testfile mkdir td1 +} -cleanup { cleanup - list [catch {testfile mkdir td1/td2} msg] $msg -} {1 ENOENT} -test winFCmd-4.5 {TclpCreateDirectory: CreateDirectory succeeds} {win testfile} { +} -returnCodes error -result EEXIST +test winFCmd-4.4 {TclpCreateDirectory: errno: ENOENT} -setup { cleanup +} -constraints {win testfile} -body { + testfile mkdir td1/td2 +} -returnCodes error -result ENOENT +test winFCmd-4.5 {TclpCreateDirectory: CreateDirectory succeeds} -setup { + cleanup +} -constraints {win testfile} -body { testfile mkdir td1 file type td1 -} {directory} +} -cleanup cleanup -result directory -test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} {win testfile} { +test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 testfile cpdir td1 td2 list [file type td1] [file type td2] -} {directory directory} +} -cleanup { + cleanup +} -result {directory directory} -test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} {win testfile testchmod} { +test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} -setup { cleanup +} -constraints {win testfile testchmod} -body { file mkdir td1 testchmod 000 td1 testfile rmdir td1 file exists td1 -} {0} -test winFCmd-6.2 {TclpRemoveDirectory: errno: EEXIST} {win testfile} { +} -result {0} +# This next test has a very hokey way of matching... +test winFCmd-6.2 {TclpRemoveDirectory: errno: EEXIST} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td2 list [catch {testfile rmdir td1} msg] [file tail $msg] -} {1 {td1 EEXIST}} +} -result {1 {td1 EEXIST}} test winFCmd-6.3 {TclpRemoveDirectory: errno: EACCES} {win emptyTest} { # can't test this w/o removing everything on your hard disk first! # testfile rmdir / } {} -test winFCmd-6.4 {TclpRemoveDirectory: errno: ENOENT} {win testfile} { +# This next test has a very hokey way of matching... +test winFCmd-6.4 {TclpRemoveDirectory: errno: ENOENT} -setup { cleanup +} -constraints {win testfile} -body { list [catch {testfile rmdir td1} msg] [file tail $msg] -} {1 {td1 ENOENT}} -test winFCmd-6.5 {TclpRemoveDirectory: errno: ENOENT} {win testfile} { +} -result {1 {td1 ENOENT}} +test winFCmd-6.5 {TclpRemoveDirectory: errno: ENOENT} -setup { cleanup - list [catch {testfile rmdir ""} msg] $msg -} {1 ENOENT} -test winFCmd-6.6 {TclpRemoveDirectory: errno: ENOTDIR} {win testfile} { +} -constraints {win testfile} -body { + testfile rmdir "" +} -returnCodes error -result ENOENT +# This next test has a very hokey way of matching... +test winFCmd-6.6 {TclpRemoveDirectory: errno: ENOTDIR} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 list [catch {testfile rmdir tf1} msg] [file tail $msg] -} {1 {tf1 ENOTDIR}} -test winFCmd-6.7 {TclpRemoveDirectory: RemoveDirectory succeeds} {win testfile} { +} -result {1 {tf1 ENOTDIR}} +test winFCmd-6.7 {TclpRemoveDirectory: RemoveDirectory succeeds} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 testfile rmdir td1 file exists td1 -} {0} -test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} {win testfile} { +} -result {0} +# This next test has a very hokey way of matching... +test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 list [catch {testfile rmdir tf1} msg] [file tail $msg] -} {1 {tf1 ENOTDIR}} -test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} {win testfile testchmod} { +} -result {1 {tf1 ENOTDIR}} +test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} -setup { cleanup +} -constraints {win testfile testchmod} -body { file mkdir td1 testchmod 000 td1 testfile rmdir td1 file exists td1 -} {0} -test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} {win 95 testfile} { +} -result {0} +test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} -setup { cleanup - list [catch {testfile rmdir nul} msg] $msg -} {1 {nul EACCES}} -test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} {win nt testfile} { +} -constraints {win 95 testfile} -body { + testfile rmdir nul +} -returnCodes error -result {nul EACCES} +test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} -setup { cleanup - set res [list [catch {testfile rmdir /} msg] $msg] +} -constraints {win nt testfile} -body { + testfile rmdir / # WinXP returns EEXIST, WinNT seems to return EACCES. No policy # decision has been made as to which is correct. - regsub {E(ACCES|EXIST)} $res "EACCES or EEXIST" -} [list 1 [list / EACCES or EEXIST]] -test winFCmd-6.12 {TclpRemoveDirectory: errno == EACCES} {win 95 testfile} { +} -returnCodes error -match regexp -result {^/ E(ACCES|EXIST)$} +# This next test has a very hokey way of matching... +test winFCmd-6.12 {TclpRemoveDirectory: errno == EACCES} -setup { cleanup +} -constraints {win 95 testfile} -body { createfile tf1 set res [catch {testfile rmdir tf1} msg] # get rid of path set msg [list [file tail [lindex $msg 0]] [lindex $msg 1]] list $res $msg -} {1 {tf1 ENOTDIR}} -test winFCmd-6.13 {TclpRemoveDirectory: write-protected} {win testfile testchmod} { +} -result {1 {tf1 ENOTDIR}} +test winFCmd-6.13 {TclpRemoveDirectory: write-protected} -setup { cleanup +} -constraints {win testfile testchmod} -body { file mkdir td1 testchmod 000 td1 testfile rmdir td1 file exists td1 -} {0} -test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} {win 95 testfile} { +} -result {0} +# This next test has a very hokey way of matching... +test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} -setup { cleanup +} -constraints {win 95 testfile} -body { file mkdir td1/td2 set res [catch {testfile rmdir td1} msg] # get rid of path set msg [list [file tail [lindex $msg 0]] [lindex $msg 1]] list $res $msg -} {1 {td1 EEXIST}} -test winFCmd-6.15 {TclpRemoveDirectory: !recursive} {win testfile} { +} -result {1 {td1 EEXIST}} +# This next test has a very hokey way of matching... +test winFCmd-6.15 {TclpRemoveDirectory: !recursive} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td2 list [catch {testfile rmdir td1} msg] [file tail $msg] -} {1 {td1 EEXIST}} -test winFCmd-6.16 {TclpRemoveDirectory: recursive, but errno != EEXIST} {win testfile} { +} -result {1 {td1 EEXIST}} +test winFCmd-6.16 {TclpRemoveDirectory: recursive, but errno != EEXIST} -setup { cleanup +} -constraints {win testfile} -body { createfile tf1 - list [catch {testfile rmdir -force tf1} msg] $msg -} {1 {tf1 ENOTDIR}} -test winFCmd-6.17 {TclpRemoveDirectory: calls TraverseWinTree} {win testfile} { + testfile rmdir -force tf1 +} -returnCodes error -result {tf1 ENOTDIR} +test winFCmd-6.17 {TclpRemoveDirectory: calls TraverseWinTree} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td2 testfile rmdir -force td1 file exists td1 -} {0} +} -result {0} -test winFCmd-7.1 {TraverseWinTree: targetPtr == NULL} {win testfile} { +test winFCmd-7.1 {TraverseWinTree: targetPtr == NULL} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td2/td3 testfile rmdir -force td1 file exists td1 -} {0} -test winFCmd-7.2 {TraverseWinTree: targetPtr != NULL} {win testfile} { +} -result {0} +test winFCmd-7.2 {TraverseWinTree: targetPtr != NULL} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td2/td3 testfile cpdir td1 td2 list [file exists td1] [file exists td2] -} {1 1} -test winFCmd-7.3 {TraverseWinTree: sourceAttr == -1} {win testfile} { +} -cleanup { + cleanup +} -result {1 1} +test winFCmd-7.3 {TraverseWinTree: sourceAttr == -1} -setup { cleanup - list [catch {testfile cpdir td1 td2} msg] $msg -} {1 {td1 ENOENT}} -test winFCmd-7.4 {TraverseWinTree: source isn't directory} {win testfile} { +} -constraints {win testfile} -body { + testfile cpdir td1 td2 +} -returnCodes error -result {td1 ENOENT} +test winFCmd-7.4 {TraverseWinTree: source isn't directory} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 tf1 testfile cpdir td1 td2 contents td2/tf1 -} {tf1} -test winFCmd-7.5 {TraverseWinTree: call TraversalCopy: DOTREE_F} {win testfile} { +} -cleanup { cleanup +} -result {tf1} +test winFCmd-7.5 {TraverseWinTree: call TraversalCopy: DOTREE_F} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 tf1 testfile cpdir td1 td2 contents td2/tf1 -} {tf1} -test winFCmd-7.6 {TraverseWinTree: call TraversalDelete: DOTREE_F} {win testfile} { +} -cleanup { cleanup +} -result {tf1} +test winFCmd-7.6 {TraverseWinTree: call TraversalDelete: DOTREE_F} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 tf1 testfile rmdir -force td1 file exists td1 -} {0} -test winFCmd-7.7 {TraverseWinTree: append \ to source if necessary} {win testfile} { +} -result {0} +test winFCmd-7.7 {TraverseWinTree: append \ to source if necessary} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 tf1 testfile cpdir td1 td2 contents td2/tf1 -} {tf1} -test winFCmd-7.8 {TraverseWinTree: append \ to source if necessary} {win 95 cdrom testfile} { +} -cleanup { + cleanup +} -result {tf1} +test winFCmd-7.8 {TraverseWinTree: append \ to source if necessary} -body { # cdrom can return either d:\ or D:/, but we only care about the errcode - list [catch {testfile rmdir $cdrom/} msg] [lindex $msg 1] -} {1 EACCES} ; # was EEXIST, but changed for win98. -test winFCmd-7.9 {TraverseWinTree: append \ to source if necessary} {win nt cdrom testfile} { - list [catch {testfile rmdir $cdrom/} msg] [lindex $msg 1] -} {1 EACCES} + testfile rmdir $cdrom/ +} -constraints {win 95 cdrom testfile} -returnCodes error -match glob \ + -result {* EACCES} ; # was EEXIST, but changed for win98. +test winFCmd-7.9 {TraverseWinTree: append \ to source if necessary} -body { + testfile rmdir $cdrom/ +} -constraints {win nt cdrom testfile} -returnCodes error -match glob \ + -result {* EACCES} test winFCmd-7.10 {TraverseWinTree: can't read directory: handle == INVALID} \ {win emptyTest} { # can't make it happen } {} -test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} {win testfile testchmod} { +test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} -setup { cleanup +} -constraints {win testfile testchmod} -body { file mkdir td1 createfile td1/tf1 tf1 testchmod 000 td1 testfile cpdir td1 td2 list [file exists td2] [file writable td2] -} {1 1} -test winFCmd-7.12 {TraverseWinTree: call TraversalDelete: DOTREE_PRED} {win testfile} { +} -cleanup { + cleanup +} -result {1 1} +test winFCmd-7.12 {TraverseWinTree: call TraversalDelete: DOTREE_PRED} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 tf1 testfile rmdir -force td1 file exists td1 -} {0} -test winFCmd-7.13 {TraverseWinTree: append \ to target if necessary} {win testfile} { +} -result {0} +test winFCmd-7.13 {TraverseWinTree: append \ to target if necessary} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 tf1 testfile cpdir td1 td2 contents td2/tf1 -} {tf1} -test winFCmd-7.14 {TraverseWinTree: append \ to target if necessary} {win 95 testfile} { +} -cleanup { + cleanup +} -result {tf1} +test winFCmd-7.14 {TraverseWinTree: append \ to target if necessary} -setup { cleanup +} -constraints {win 95 testfile} -body { file mkdir td1 - list [catch {testfile cpdir td1 /} msg] $msg -} {1 {/ EEXIST}} -test winFCmd-7.15 {TraverseWinTree: append \ to target if necessary} {win nt testfile} { + testfile cpdir td1 / +} -cleanup { + cleanup +} -returnCodes error -result {/ EEXIST} +test winFCmd-7.15 {TraverseWinTree: append \ to target if necessary} -setup { cleanup +} -constraints {win nt testfile} -body { file mkdir td1 - list [catch {testfile cpdir td1 /} msg] $msg -} {1 {/ EACCES}} -test winFCmd-7.16 {TraverseWinTree: recurse on files: no files} {win testfile} { + testfile cpdir td1 / +} -cleanup { + cleanup +} -returnCodes error -result {/ EACCES} +test winFCmd-7.16 {TraverseWinTree: recurse on files: no files} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 testfile cpdir td1 td2 -} {} -test winFCmd-7.17 {TraverseWinTree: recurse on files: one file} {win testfile} { +} -cleanup { cleanup +} -result {} +test winFCmd-7.17 {TraverseWinTree: recurse on files: one file} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/td2 testfile cpdir td1 td2 glob td2/* -} {td2/td2} -test winFCmd-7.18 {TraverseWinTree: recurse on files: several files and dir} \ - {win testfile} { +} -cleanup { cleanup +} -result {td2/td2} +test winFCmd-7.18 {TraverseWinTree: recurse on files: several files and dir} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 createfile td1/tf2 @@ -750,277 +917,363 @@ test winFCmd-7.18 {TraverseWinTree: recurse on files: several files and dir} \ createfile td1/tf4 testfile cpdir td1 td2 lsort [glob td2/*] -} {td2/td2 td2/tf1 td2/tf2 td2/tf3 td2/tf4} -test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} {win testfile testchmod} { +} -cleanup { + cleanup +} -result {td2/td2 td2/tf1 td2/tf2 td2/tf3 td2/tf4} +test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} -setup { cleanup +} -constraints {win testfile testchmod} -body { file mkdir td1 createfile td1/tf1 tf1 testchmod 000 td1 testfile cpdir td1 td2 list [file exists td2] [file writable td2] -} {1 1} -test winFCmd-7.20 {TraverseWinTree: call TraversalDelete: DOTREE_POSTD} \ - {win testfile} { +} -cleanup { + cleanup +} -result {1 1} +test winFCmd-7.20 {TraverseWinTree: call TraversalDelete: DOTREE_POSTD} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 tf1 testfile rmdir -force td1 file exists td1 -} {0} -test winFCmd-7.21 {TraverseWinTree: fill errorPtr} {win testfile} { +} -result {0} +test winFCmd-7.21 {TraverseWinTree: fill errorPtr} -setup { cleanup - list [catch {testfile cpdir td1 td2} msg] $msg -} {1 {td1 ENOENT}} +} -constraints {win testfile} -body { + testfile cpdir td1 td2 +} -returnCodes error -result {td1 ENOENT} -test winFCmd-8.1 {TraversalCopy: DOTREE_F} {win testfile} { +test winFCmd-8.1 {TraversalCopy: DOTREE_F} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 - list [catch {testfile cpdir td1 td1} msg] $msg -} {1 {td1 EEXIST}} -test winFCmd-8.2 {TraversalCopy: DOTREE_PRED} {win testfile testchmod} { + testfile cpdir td1 td1 +} -returnCodes error -result {td1 EEXIST} +test winFCmd-8.2 {TraversalCopy: DOTREE_PRED} -setup { cleanup +} -constraints {win testfile testchmod} -body { file mkdir td1/td2 testchmod 000 td1 testfile cpdir td1 td2 list [file writable td1] [file writable td1/td2] -} {0 1} -test winFCmd-8.3 {TraversalCopy: DOTREE_POSTD} {win testfile} { +} -cleanup { cleanup +} -result {0 1} +test winFCmd-8.3 {TraversalCopy: DOTREE_POSTD} -setup { + cleanup +} -constraints {win testfile} -body { file mkdir td1 testfile cpdir td1 td2 -} {} +} -cleanup { + cleanup +} -result {} -test winFCmd-9.1 {TraversalDelete: DOTREE_F} {win testfile} { +test winFCmd-9.1 {TraversalDelete: DOTREE_F} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1 createfile td1/tf1 testfile rmdir -force td1 -} {} -test winFCmd-9.2 {TraversalDelete: DOTREE_F} {win 95 testfile} { +} -result {} +test winFCmd-9.2 {TraversalDelete: DOTREE_F} -setup { cleanup +} -constraints {win 95 testfile} -body { file mkdir td1 set fd [open td1/tf1 w] - set msg [list [catch {testfile rmdir -force td1} msg] $msg] + testfile rmdir -force td1 +} -cleanup { close $fd - set msg -} {1 {td1\tf1 EACCES}} -test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} {win testfile testchmod} { +} -returnCodes error -result {td1\tf1 EACCES} +test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} -setup { cleanup +} -constraints {win testfile testchmod} -body { file mkdir td1/td2 testchmod 000 td1 testfile rmdir -force td1 file exists td1 -} {0} -test winFCmd-9.4 {TraversalDelete: DOTREE_POSTD} {win testfile} { +} -result {0} +test winFCmd-9.4 {TraversalDelete: DOTREE_POSTD} -setup { cleanup +} -constraints {win testfile} -body { file mkdir td1/td1/td3/td4/td5 testfile rmdir -force td1 -} {} +} -result {} -test winFCmd-10.1 {AttributesPosixError - get} {win} { +test winFCmd-10.1 {AttributesPosixError - get} -constraints {win} -setup { cleanup - list [catch {file attributes td1 -archive} msg] $msg -} {1 {could not read "td1": no such file or directory}} -test winFCmd-10.2 {AttributesPosixError - set} {win} { +} -body { + file attributes td1 -archive +} -returnCodes error -result {could not read "td1": no such file or directory} +test winFCmd-10.2 {AttributesPosixError - set} -constraints {win} -setup { cleanup - list [catch {file attributes td1 -archive 0} msg] $msg -} {1 {could not read "td1": no such file or directory}} - -test winFCmd-11.1 {GetWinFileAttributes} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -archive} msg] $msg [cleanup] -} {0 1 {}} -test winFCmd-11.2 {GetWinFileAttributes} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -readonly} msg] $msg [cleanup] -} {0 0 {}} -test winFCmd-11.3 {GetWinFileAttributes} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -hidden} msg] $msg [cleanup] -} {0 0 {}} -test winFCmd-11.4 {GetWinFileAttributes} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -system} msg] $msg [cleanup] -} {0 0 {}} -test winFCmd-11.5 {GetWinFileAttributes} {win} { - # attr of relative paths that resolve to root was failing - # don't care about answer, just that test runs. +} -body { + file attributes td1 -archive 0 +} -returnCodes error -result {could not read "td1": no such file or directory} +test winFCmd-11.1 {GetWinFileAttributes} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + file attributes td1 -archive +} -cleanup { + cleanup +} -result 1 +test winFCmd-11.2 {GetWinFileAttributes} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + file attributes td1 -readonly +} -cleanup { + cleanup +} -result 0 +test winFCmd-11.3 {GetWinFileAttributes} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + file attributes td1 -hidden +} -cleanup { + cleanup +} -result 0 +test winFCmd-11.4 {GetWinFileAttributes} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + file attributes td1 -system +} -cleanup { + cleanup +} -result 0 +test winFCmd-11.5 {GetWinFileAttributes} -constraints {win} -setup { set old [pwd] +} -body { + # Attr of relative paths that resolve to root was failing don't care about + # answer, just that test runs. cd c:/ - file attr c: + file attr c: file attr c:. - file attr . + file attr . +} -cleanup { cd $old -} {} -test winFCmd-11.6 {GetWinFileAttributes} {win} { +} -match glob -result * +test winFCmd-11.6 {GetWinFileAttributes} -constraints {win} -body { file attr c:/ -hidden -} {0} +} -result {0} -test winFCmd-12.1 {ConvertFileNameFormat} {win} { +test winFCmd-12.1 {ConvertFileNameFormat} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + string tolower [file attributes td1 -longname] +} -cleanup { cleanup - close [open td1 w] - list [catch {string tolower [file attributes td1 -longname]} msg] $msg [cleanup] -} {0 td1 {}} -test winFCmd-12.2 {ConvertFileNameFormat} {win} { +} -result {td1} +test winFCmd-12.2 {ConvertFileNameFormat} -constraints {win} -setup { cleanup +} -body { file mkdir td1 - close [open td1/td1 w] - list [catch {string tolower [file attributes td1/td1 -longname]} msg] $msg [cleanup] -} {0 td1/td1 {}} -test winFCmd-12.3 {ConvertFileNameFormat} {win} { + createfile td1/td1 {} + string tolower [file attributes td1/td1 -longname] +} -cleanup { cleanup +} -result {td1/td1} +test winFCmd-12.3 {ConvertFileNameFormat} -constraints {win} -setup { + cleanup +} -body { file mkdir td1 file mkdir td1/td2 - close [open td1/td3 w] - list [catch {string tolower [file attributes td1/td2/../td3 -longname]} msg] $msg [cleanup] -} {0 td1/td2/../td3 {}} -test winFCmd-12.4 {ConvertFileNameFormat} {win} { - cleanup - close [open td1 w] - list [catch {string tolower [file attributes ./td1 -longname]} msg] $msg [cleanup] -} {0 ./td1 {}} -test winFCmd-12.5 {ConvertFileNameFormat: absolute path} {win} { + createfile td1/td3 {} + string tolower [file attributes td1/td2/../td3 -longname] +} -cleanup { + cleanup +} -result {td1/td2/../td3} +test winFCmd-12.4 {ConvertFileNameFormat} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + string tolower [file attributes ./td1 -longname] +} -cleanup { + cleanup +} -result {./td1} +test winFCmd-12.5 {ConvertFileNameFormat: absolute path} -body { list [file attributes / -longname] [file attributes \\ -longname] -} {/ /} -test winFCmd-12.6 {ConvertFileNameFormat: absolute path with drive} {win} { +} -constraints {win} -result {/ /} +test winFCmd-12.6 {ConvertFileNameFormat: absolute path with drive} -setup { catch {file delete -force -- c:/td1} - close [open c:/td1 w] - list [catch {string tolower [file attributes c:/td1 -longname]} msg] $msg [file delete -force -- c:/td1] -} {0 c:/td1 {}} -test winFCmd-12.7 {ConvertFileNameFormat} {nonPortable win} { +} -constraints {win} -body { + createfile c:/td1 {} + string tolower [file attributes c:/td1 -longname] +} -cleanup { + file delete -force -- c:/td1 +} -result {c:/td1} +test winFCmd-12.7 {ConvertFileNameFormat} -body { string tolower [file attributes //bisque/tcl/ws -longname] -} {//bisque/tcl/ws} -test winFCmd-12.8 {ConvertFileNameFormat} {win longFileNames} { - cleanup - close [open td1 w] - list [catch {string tolower [file attributes td1 -longname]} msg] $msg [cleanup] -} {0 td1 {}} -test winFCmd-12.10 {ConvertFileNameFormat} {longFileNames win} { - cleanup - close [open td1td1td1 w] - list [catch {file attributes td1td1td1 -shortname}] [cleanup] -} {0 {}} -test winFCmd-12.11 {ConvertFileNameFormat} {longFileNames win} { - cleanup - close [open td1 w] - list [catch {string tolower [file attributes td1 -shortname]} msg] $msg [cleanup] -} {0 td1 {}} +} -constraints {nonPortable win} -result {//bisque/tcl/ws} +test winFCmd-12.8 {ConvertFileNameFormat} -setup { + cleanup +} -constraints {win longFileNames} -body { + createfile td1 {} + string tolower [file attributes td1 -longname] +} -cleanup { + cleanup +} -result {td1} +test winFCmd-12.10 {ConvertFileNameFormat} -setup { + cleanup +} -constraints {longFileNames win} -body { + createfile td1td1td1 {} + file attributes td1td1td1 -shortname +} -cleanup { + cleanup +} -match glob -result * +test winFCmd-12.11 {ConvertFileNameFormat} -setup { + cleanup +} -constraints {longFileNames win} -body { + createfile td1 {} + string tolower [file attributes td1 -shortname] +} -cleanup { + cleanup +} -result {td1} -test winFCmd-13.1 {GetWinFileLongName} {win} { +test winFCmd-13.1 {GetWinFileLongName} -constraints {win} -setup { cleanup - close [open td1 w] - list [catch {string tolower [file attributes td1 -longname]} msg] $msg [cleanup] -} {0 td1 {}} +} -body { + createfile td1 {} + string tolower [file attributes td1 -longname] +} -cleanup { + cleanup +} -result td1 -test winFCmd-14.1 {GetWinFileShortName} {win} { +test winFCmd-14.1 {GetWinFileShortName} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + string tolower [file attributes td1 -shortname] +} -cleanup { cleanup - close [open td1 w] - list [catch {string tolower [file attributes td1 -shortname]} msg] $msg [cleanup] -} {0 td1 {}} +} -result td1 -test winFCmd-15.1 {SetWinFileAttributes} {win} { - cleanup - list [catch {file attributes td1 -archive 0} msg] $msg -} {1 {could not read "td1": no such file or directory}} -test winFCmd-15.2 {SetWinFileAttributes - archive} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -archive 1} msg] $msg [file attributes td1 -archive] [cleanup] -} {0 {} 1 {}} -test winFCmd-15.3 {SetWinFileAttributes - archive} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -archive 0} msg] $msg [file attributes td1 -archive] [cleanup] -} {0 {} 0 {}} -test winFCmd-15.4 {SetWinFileAttributes - hidden} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -hidden 1} msg] $msg [file attributes td1 -hidden] [file attributes td1 -hidden 0] [cleanup] -} {0 {} 1 {} {}} -test winFCmd-15.5 {SetWinFileAttributes - hidden} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -hidden 0} msg] $msg [file attributes td1 -hidden] [cleanup] -} {0 {} 0 {}} -test winFCmd-15.6 {SetWinFileAttributes - readonly} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -readonly 1} msg] $msg [file attributes td1 -readonly] [cleanup] -} {0 {} 1 {}} -test winFCmd-15.7 {SetWinFileAttributes - readonly} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -readonly 0} msg] $msg [file attributes td1 -readonly] [cleanup] -} {0 {} 0 {}} -test winFCmd-15.8 {SetWinFileAttributes - system} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -system 1} msg] $msg [file attributes td1 -system] [cleanup] -} {0 {} 1 {}} -test winFCmd-15.9 {SetWinFileAttributes - system} {win} { - cleanup - close [open td1 w] - list [catch {file attributes td1 -system 0} msg] $msg [file attributes td1 -system] [cleanup] -} {0 {} 0 {}} -test winFCmd-15.10 {SetWinFileAttributes - failing} {win cdrom} { - cleanup - catch {file attributes $cdfile -archive 1} -} {1} -test winFCmd-16.1 {Windows file normalization} {win} { +test winFCmd-15.1 {SetWinFileAttributes} -constraints {win} -setup { + cleanup +} -body { + file attributes td1 -archive 0 +} -returnCodes error -result {could not read "td1": no such file or directory} +test winFCmd-15.2 {SetWinFileAttributes - archive} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + list [file attributes td1 -archive 1] [file attributes td1 -archive] +} -cleanup { + cleanup +} -result {{} 1} +test winFCmd-15.3 {SetWinFileAttributes - archive} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + list [file attributes td1 -archive 0] [file attributes td1 -archive] +} -cleanup { + cleanup +} -result {{} 0} +test winFCmd-15.4 {SetWinFileAttributes - hidden} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + list [file attributes td1 -hidden 1] [file attributes td1 -hidden] \ + [file attributes td1 -hidden 0] +} -cleanup { + cleanup +} -result {{} 1 {}} +test winFCmd-15.5 {SetWinFileAttributes - hidden} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + list [file attributes td1 -hidden 0] [file attributes td1 -hidden] +} -cleanup { + cleanup +} -result {{} 0} +test winFCmd-15.6 {SetWinFileAttributes - readonly} -setup { + cleanup +} -constraints {win} -body { + createfile td1 {} + list [file attributes td1 -readonly 1] [file attributes td1 -readonly] +} -cleanup { + cleanup +} -result {{} 1} +test winFCmd-15.7 {SetWinFileAttributes - readonly} -setup { + cleanup +} -constraints {win} -body { + createfile td1 {} + list [file attributes td1 -readonly 0] [file attributes td1 -readonly] +} -cleanup { + cleanup +} -result {{} 0} +test winFCmd-15.8 {SetWinFileAttributes - system} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + list [file attributes td1 -system 1] [file attributes td1 -system] +} -cleanup { + cleanup +} -result {{} 1} +test winFCmd-15.9 {SetWinFileAttributes - system} -constraints {win} -setup { + cleanup +} -body { + createfile td1 {} + list [file attributes td1 -system 0] [file attributes td1 -system] +} -cleanup { + cleanup +} -result {{} 0} +test winFCmd-15.10 {SetWinFileAttributes - failing} -setup { + cleanup +} -constraints {win cdrom} -body { + file attributes $cdfile -archive 1 +} -returnCodes error -match glob -result * + +test winFCmd-16.1 {Windows file normalization} -constraints {win} -body { list [file normalize c:/] [file normalize C:/] -} {C:/ C:/} -test winFCmd-16.2 {Windows file normalization} {win} { - close [open td1... w] - set res [file tail [file normalize td1]] +} -result {C:/ C:/} +test winFCmd-16.2 {Windows file normalization} -constraints {win} -body { + createfile td1... {} + file tail [file normalize td1] +} -cleanup { file delete td1... - set res -} {td1} - +} -result {td1} set pwd [pwd] set d [string index $pwd 0] - -test winFCmd-16.3 {Windows file normalization} {win} { +test winFCmd-16.3 {Windows file normalization} -constraints {win} -body { file norm ${d}:foo -} [file join $pwd foo] -test winFCmd-16.4 {Windows file normalization} {win} { +} -result [file join $pwd foo] +test winFCmd-16.4 {Windows file normalization} -constraints {win} -body { file norm [string tolower ${d}]:foo -} [file join $pwd foo] -test winFCmd-16.5 {Windows file normalization} {win} { +} -result [file join $pwd foo] +test winFCmd-16.5 {Windows file normalization} -constraints {win} -body { file norm ${d}:foo/bar -} [file join $pwd foo/bar] -test winFCmd-16.6 {Windows file normalization} {win} { +} -result [file join $pwd foo/bar] +test winFCmd-16.6 {Windows file normalization} -constraints {win} -body { file norm ${d}:foo\\bar -} [file join $pwd foo/bar] -test winFCmd-16.7 {Windows file normalization} {win} { +} -result [file join $pwd foo/bar] +test winFCmd-16.7 {Windows file normalization} -constraints {win} -body { file norm /bar -} "${d}:/bar" -test winFCmd-16.8 {Windows file normalization} {win} { +} -result "${d}:/bar" +test winFCmd-16.8 {Windows file normalization} -constraints {win} -body { file norm ///bar -} "${d}:/bar" -test winFCmd-16.9 {Windows file normalization} {win} { +} -result "${d}:/bar" +test winFCmd-16.9 {Windows file normalization} -constraints {win} -body { file norm /bar/foo -} "${d}:/bar/foo" +} -result "${d}:/bar/foo" if {$d eq "C"} { set dd "D" } else { set dd "C" } -test winFCmd-16.10 {Windows file normalization} {win} { +test winFCmd-16.10 {Windows file normalization} -constraints {win} -body { file norm ${dd}:foo -} "${dd}:/foo" -test winFCmd-16.11 {Windows file normalization} -constraints {win cdrom} \ --body { +} -result "${dd}:/foo" +test winFCmd-16.11 {Windows file normalization} -body { cd ${d}: cd $cdrom cd ${d}: cd $cdrom # Must not crash set result "no crash" -} -cleanup { +} -constraints {win cdrom} -cleanup { cd $pwd } -result {no crash} - test winFCmd-16.12 {Windows file normalization - no crash} \ -constraints win -setup { set oldhome "" @@ -1036,43 +1289,30 @@ test winFCmd-16.12 {Windows file normalization - no crash} \ set ::env(HOME) $oldhome cd $pwd } -result {no crash} - -test winFCmd-16.13 {Windows file normalization} -constraints win -setup { +test winFCmd-16.13 {Windows file normalization - absolute HOME} -setup { set oldhome "" catch {set oldhome $::env(HOME)} -} -body { +} -constraints win -body { # Test 'cd' normalization when HOME is absolute - set expectedResult [file normalize ${d}:/] set ::env(HOME) ${d}:/ cd - set result [pwd] - if { [string equal $result $expectedResult] } { - concat ok - } else { - list $result != $expectedResult - } + pwd } -cleanup { set ::env(HOME) $oldhome cd $pwd -} -result ok - -test winFCmd-16.14 {Windows file normalization} -constraints win -setup { +} -result [file normalize ${d}:/] +test winFCmd-16.14 {Windows file normalization - relative HOME} -setup { set oldhome "" catch {set oldhome $::env(HOME)} -} -body { +} -constraints win -body { # Test 'cd' normalization when HOME is relative set ::env(HOME) ${d}: cd - set result [pwd] - if { [string equal $result $pwd] } { - concat ok - } else { - list $result != $pwd - } + pwd } -cleanup { set ::env(HOME) $oldhome cd $pwd -} -result ok +} -result $pwd test winFCmd-17.1 {Windows bad permissions cd} -constraints win -body { set d {} @@ -1080,7 +1320,7 @@ test winFCmd-17.1 {Windows bad permissions cd} -constraints win -body { eval lappend d [glob -nocomplain \ -types hidden -dir $dd "System Volume Information"] } - # Old versions of Tcl gave a misleading error that the + # Old versions of Tcl gave a misleading error that the # directory in question didn't exist. if {[llength $d] && [catch {cd [lindex $d 0]} err]} { regsub ".*: " $err "" err @@ -1098,68 +1338,52 @@ unset d dd pwd test winFCmd-18.1 {Windows reserved path names} -constraints win -body { file pathtype com1 } -result "absolute" - test winFCmd-18.1.2 {Windows reserved path names} -constraints win -body { file pathtype com4 } -result "absolute" - test winFCmd-18.1.3 {Windows reserved path names} -constraints win -body { file pathtype com5 } -result "relative" - test winFCmd-18.1.4 {Windows reserved path names} -constraints win -body { file pathtype lpt3 } -result "absolute" - test winFCmd-18.1.5 {Windows reserved path names} -constraints win -body { file pathtype lpt4 } -result "relative" - test winFCmd-18.1.6 {Windows reserved path names} -constraints win -body { file pathtype nul } -result "absolute" - test winFCmd-18.1.7 {Windows reserved path names} -constraints win -body { file pathtype null } -result "relative" - test winFCmd-18.2 {Windows reserved path names} -constraints win -body { file pathtype com1: } -result "absolute" - test winFCmd-18.3 {Windows reserved path names} -constraints win -body { file pathtype COM1 } -result "absolute" - test winFCmd-18.4 {Windows reserved path names} -constraints win -body { file pathtype CoM1: } -result "absolute" - test winFCmd-18.5 {Windows reserved path names} -constraints win -body { file normalize com1: } -result COM1 - test winFCmd-18.6 {Windows reserved path names} -constraints win -body { file normalize COM1: } -result COM1 - test winFCmd-18.7 {Windows reserved path names} -constraints win -body { file normalize cOm1 } -result COM1 - test winFCmd-18.8 {Windows reserved path names} -constraints win -body { file normalize cOm1: } -result COM1 - test winFCmd-19.1 {Windows extended path names} -constraints nt -body { file normalize //?/c:/windows/win.ini } -result //?/c:/windows/win.ini - test winFCmd-19.2 {Windows extended path names} -constraints nt -body { file normalize //?/c:/windows/../windows/win.ini } -result //?/c:/windows/win.ini - test winFCmd-19.3 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 20].tmp] set tmpfile [file normalize $tmpfile] @@ -1171,7 +1395,6 @@ test winFCmd-19.3 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] - test winFCmd-19.4 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 20].tmp] set tmpfile //?/[file normalize $tmpfile] @@ -1183,7 +1406,6 @@ test winFCmd-19.4 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] - test winFCmd-19.5 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 248].tmp] set tmpfile [file normalize $tmpfile] @@ -1195,7 +1417,6 @@ test winFCmd-19.5 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 1 errormsg] - test winFCmd-19.6 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) tcl[string repeat x 248].tmp] set tmpfile //?/[file normalize $tmpfile] @@ -1207,7 +1428,6 @@ test winFCmd-19.6 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {}] - test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set tmpfile [file normalize $tmpfile] @@ -1219,7 +1439,6 @@ test winFCmd-19.7 {Windows extended path names} -constraints nt -setup { } -cleanup { catch {file delete $tmpfile} } -result [list 0 {} [list tcl[pid].tmp]] - test winFCmd-19.8 {Windows extended path names} -constraints nt -setup { set tmpfile [file join $::env(TEMP) "tcl[pid].tmp "] set tmpfile //?/[file normalize $tmpfile] diff --git a/tests/winFile.test b/tests/winFile.test index 0cefcb5..1c33004 100644 --- a/tests/winFile.test +++ b/tests/winFile.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFile.test,v 1.20 2007/12/14 13:52:55 patthoyts Exp $ +# RCS: @(#) $Id: winFile.test,v 1.21 2008/04/10 00:21:02 dkf Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -29,65 +29,63 @@ if {[testConstraint nt] && $::tcl_platform(osVersion) >= 5.0} { testConstraint win2000 1 } -test winFile-1.1 {TclpGetUserHome} {win} { - list [catch {glob ~nosuchuser} msg] $msg -} {1 {user "nosuchuser" doesn't exist}} -test winFile-1.2 {TclpGetUserHome} {win nt nonPortable} { +test winFile-1.1 {TclpGetUserHome} -constraints {win} -body { + glob ~nosuchuser +} -returnCodes error -result {user "nosuchuser" doesn't exist} +test winFile-1.2 {TclpGetUserHome} -constraints {win nt nonPortable} -body { # The administrator account should always exist. - - catch {glob ~administrator} -} {0} -test winFile-1.3 {TclpGetUserHome} {win 95} { + glob ~administrator +} -match glob -result * +test winFile-1.3 {TclpGetUserHome} -constraints {win 95} -body { # Find some user in system.ini and then see if they have a home. set f [open $::env(windir)/system.ini] - set x 0 - while {![eof $f]} { - set line [gets $f] - if {$line == "\[Password Lists]"} { - gets $f - set name [lindex [split [gets $f] =] 0] - if {$name != ""} { - set x [catch {glob ~$name}] - break - } + while {[gets $f line] >= 0} { + if {$line ne {[Password Lists]}} { + continue + } + gets $f + set name [lindex [split [gets $f] =] 0] + if {$name ne ""} { + return [catch {glob ~$name}] } } - close $f - set x -} {0} + return 0 ;# didn't find anything... +} -cleanup { + catch {close $f} +} -result {0} test winFile-1.4 {TclpGetUserHome} {win nt nonPortable} { catch {glob ~stanton@workgroup} } {0} -test winFile-2.1 {TclpMatchFiles: case sensitivity} {win} { +test winFile-2.1 {TclpMatchFiles: case sensitivity} -constraints {win} -body { makeFile {} GlobCapS - set result [list [glob -nocomplain GlobC*] [glob -nocomplain globc*]] + list [glob -nocomplain GlobC*] [glob -nocomplain globc*] +} -cleanup { removeFile GlobCapS - set result -} {GlobCapS GlobCapS} -test winFile-2.2 {TclpMatchFiles: case sensitivity} {win} { +} -result {GlobCapS GlobCapS} +test winFile-2.2 {TclpMatchFiles: case sensitivity} -constraints {win} -body { makeFile {} globlower - set result [list [glob -nocomplain globl*] [glob -nocomplain gLOBl*]] + list [glob -nocomplain globl*] [glob -nocomplain gLOBl*] +} -cleanup { removeFile globlower - set result -} {globlower globlower} +} -result {globlower globlower} -test winFile-3.1 {file system} {win testvolumetype} { - set res "volume types ok" +test winFile-3.1 {file system} -constraints {win testvolumetype} -setup { + set res "" +} -body { foreach vol [file volumes] { # Have to catch in case there is a removable drive (CDROM, floppy) # with nothing in it. catch { - if {![string equal [lindex [file system $vol] 1] [testvolumetype $vol]]} { - set res "For $vol, we found [file system $vol]\ - and [testvolumetype $vol] are different" - break + if {[lindex [file system $vol] 1] ne [testvolumetype $vol]} { + append res "For $vol, we found [file system $vol]\ + and [testvolumetype $vol] are different\n" } } } set res -} {volume types ok} +} -result {} proc cacls {fname args} { string trim [eval [list exec cacls [file nativename $fname]] $args < Date: Thu, 10 Apr 2008 20:58:58 +0000 Subject: * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Keeping check for negative values, changed to not be an error, but behave like the special value -1 (copy all, default). * tests/iocmd.test (iocmd-15.{12,13}): Removed. * tests/io.test (io-52.5{,a,b}): Reverted last change, added * tests/chanio.test (chan-io-52.5{,a,b}): comment regarding the meaning of -1, added two more testcases for other negative values, and input wrapped to negative. --- ChangeLog | 13 +++++++++++++ generic/tclIOCmd.c | 21 ++++++++------------- tests/chanio.test | 40 +++++++++++++++++++++++++++++++++++++--- tests/io.test | 40 +++++++++++++++++++++++++++++++++++++--- tests/ioCmd.test | 8 +------- 5 files changed, 96 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35da79f..8490e85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-04-10 Andreas Kupries + + * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Keeping check for negative + values, changed to not be an error, but behave like the special + value -1 (copy all, default). + + * tests/iocmd.test (iocmd-15.{12,13}): Removed. + + * tests/io.test (io-52.5{,a,b}): Reverted last change, added + * tests/chanio.test (chan-io-52.5{,a,b}): comment regarding the + meaning of -1, added two more testcases for other negative values, + and input wrapped to negative. + 2008-04-09 Donal K. Fellows * tests/{fCmd,unixFCmd,winFCmd,winFile}.test: Tidying up of the test diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 04c7c3c..be34dc1 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.52 2008/04/09 18:37:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.53 2008/04/10 20:58:59 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1644,18 +1644,13 @@ Tcl_FcopyObjCmd( return TCL_ERROR; } if (toRead<0) { - Tcl_WideInt w; - if (Tcl_GetWideIntFromObj(interp, objv[i+1], &w) != TCL_OK) { - return TCL_ERROR; - } - if (w >= (Tcl_WideInt)0) { - Tcl_AppendResult(interp, - "integer value to large to represent as 32bit signed value", - NULL); - } else { - Tcl_AppendResult(interp, "negative size forbidden", NULL); - } - return TCL_ERROR; + /* + * Handle all negative sizes like -1, meaning 'copy all'. By + * resetting toRead we avoid changes in the core copying + * functions (which explicitly check for -1 and crash on any + * other negative value). + */ + toRead = -1; } break; case FcopyCommand: diff --git a/tests/chanio.test b/tests/chanio.test index e5f2852..6ac7dbb 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.9 2008/04/09 19:49:09 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.10 2008/04/10 20:58:59 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6541,13 +6541,47 @@ test chan-io-52.4 {TclCopyChannel} {fcopy} { chan close $f2 lappend result [file size $path(test1)] } {0 0 40} -test chan-io-52.5 {TclCopyChannel} {fcopy} { +test chan-io-52.5 {TclCopyChannel, all} {fcopy} { file delete $path(test1) set f1 [open $thisScript] set f2 [open $path(test1) w] chan configure $f1 -translation lf -blocking 0 chan configure $f2 -translation lf -blocking 0 - chan copy $f1 $f2 ;#-size -1 + chan copy $f1 $f2 -size -1 ;# -1 means 'copy all', same as if no -size specified. + set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]] + chan close $f1 + chan close $f2 + set s1 [file size $thisScript] + set s2 [file size $path(test1)] + if {"$s1" == "$s2"} { + lappend result ok + } + set result +} {0 0 ok} +test chan-io-52.5a {TclCopyChannel, all, other negative value} {fcopy} { + file delete $path(test1) + set f1 [open $thisScript] + set f2 [open $path(test1) w] + chan configure $f1 -translation lf -blocking 0 + chan configure $f2 -translation lf -blocking 0 + chan copy $f1 $f2 -size -2 ;# < 0 behaves like -1, copy all + set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]] + chan close $f1 + chan close $f2 + set s1 [file size $thisScript] + set s2 [file size $path(test1)] + if {"$s1" == "$s2"} { + lappend result ok + } + set result +} {0 0 ok} +test chan-io-52.5b {TclCopyChannel, all, wrap to negative value} {fcopy} { + file delete $path(test1) + set f1 [open $thisScript] + set f2 [open $path(test1) w] + chan configure $f1 -translation lf -blocking 0 + chan configure $f2 -translation lf -blocking 0 + chan copy $f1 $f2 -size 3221176172 ;# Wrapped to < 0, behaves like -1, copy all set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]] chan close $f1 chan close $f2 diff --git a/tests/io.test b/tests/io.test index 908dae2..3dd5bbf 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.86 2008/04/09 19:49:08 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.87 2008/04/10 20:58:59 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6541,13 +6541,47 @@ test io-52.4 {TclCopyChannel} {fcopy} { close $f2 lappend result [file size $path(test1)] } {0 0 40} -test io-52.5 {TclCopyChannel} {fcopy} { +test io-52.5 {TclCopyChannel, all} {fcopy} { file delete $path(test1) set f1 [open $thisScript] set f2 [open $path(test1) w] fconfigure $f1 -translation lf -blocking 0 fconfigure $f2 -translation lf -blocking 0 - fcopy $f1 $f2 ;#-size -1 + fcopy $f1 $f2 -size -1 ;# -1 means 'copy all', same as if no -size specified. + set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]] + close $f1 + close $f2 + set s1 [file size $thisScript] + set s2 [file size $path(test1)] + if {"$s1" == "$s2"} { + lappend result ok + } + set result +} {0 0 ok} +test io-52.5a {TclCopyChannel, all, other negative value} {fcopy} { + file delete $path(test1) + set f1 [open $thisScript] + set f2 [open $path(test1) w] + fconfigure $f1 -translation lf -blocking 0 + fconfigure $f2 -translation lf -blocking 0 + fcopy $f1 $f2 -size -2 ;# < 0 behaves like -1, copy all + set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]] + close $f1 + close $f2 + set s1 [file size $thisScript] + set s2 [file size $path(test1)] + if {"$s1" == "$s2"} { + lappend result ok + } + set result +} {0 0 ok} +test io-52.5b {TclCopyChannel, all, wrap to negative value} {fcopy} { + file delete $path(test1) + set f1 [open $thisScript] + set f2 [open $path(test1) w] + fconfigure $f1 -translation lf -blocking 0 + fconfigure $f2 -translation lf -blocking 0 + fcopy $f1 $f2 -size 3221176172 ;# Wrapped to < 0, behaves like -1, copy all set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]] close $f1 close $f2 diff --git a/tests/ioCmd.test b/tests/ioCmd.test index d48d1cf..c3bde34 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.39 2008/04/09 18:37:09 andreas_kupries Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.40 2008/04/10 20:58:59 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -606,12 +606,6 @@ test iocmd-15.11 {Tcl_FcopyObjCmd} {fcopy} { test iocmd-15.12 {Tcl_FcopyObjCmd} {fcopy} { list [catch {fcopy $rfile $wfile -command bar -size foo} msg] $msg } {1 {expected integer but got "foo"}} -test iocmd-15.13 {Tcl_FcopyObjCmd} {fcopy} { - list [catch {fcopy $rfile $wfile -command bar -size 3221176172} msg] $msg -} {1 {integer value to large to represent as 32bit signed value}} -test iocmd-15.14 {Tcl_FcopyObjCmd} {fcopy} { - list [catch {fcopy $rfile $wfile -command bar -size -2} msg] $msg -} {1 {negative size forbidden}} close $rfile close $wfile -- cgit v0.12 From de429a1d50b9a60609af0c268099cd77f24675e2 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 11 Apr 2008 14:55:10 +0000 Subject: fix one broken test, and restore unix line endings --- tests/unixFCmd.test | 878 ++++++++++++++++++++++++++-------------------------- 1 file changed, 439 insertions(+), 439 deletions(-) diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test index db57b9f..43dcf1a 100644 --- a/tests/unixFCmd.test +++ b/tests/unixFCmd.test @@ -1,439 +1,439 @@ -# This file tests the tclUnixFCmd.c file. -# -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. -# -# Copyright (c) 1996 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: unixFCmd.test,v 1.25 2008/04/10 00:21:02 dkf Exp $ - -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest 2 - namespace import -force ::tcltest::* -} - -testConstraint testchmod [llength [info commands testchmod]] - -# These tests really need to be run from a writable directory, which -# it is assumed [temporaryDirectory] is. -set oldcwd [pwd] -cd [temporaryDirectory] - -# Several tests require need to match results against the unix username -set user {} -if {[testConstraint unix]} { - catch {set user [exec whoami]} - if {$user == ""} { - catch {regexp {^[^(]*\(([^)]*)\)} [exec id] dummy user} - } - if {$user == ""} { - set user "root" - } -} - -# Find a group that exists on this system, or else skip tests that require -# groups -testConstraint foundGroup 0 -if {[testConstraint unix]} { - catch { - set groupList [exec groups] - set group [lindex $groupList 0] - testConstraint foundGroup 1 - } -} - -# check whether -readonly attribute is supported -testConstraint readonlyAttr 0 -if {[testConstraint unix]} { - set f [makeFile "whatever" probe] - catch { - file attributes $f -readonly - testConstraint readonlyAttr 1 - } - removeFile probe -} - -proc openup {path} { - testchmod 777 $path - if {[file isdirectory $path]} { - catch { - foreach p [glob -directory $path *] { - openup $p - } - } - } -} - -proc cleanup {args} { - foreach p ". $args" { - set x "" - catch { - set x [glob -directory $p tf* td*] - } - foreach file $x { - if { - [catch {file delete -force -- $file}] - && [testConstraint testchmod] - } then { - openup $file - file delete -force -- $file - } - } - } -} - -if {[testConstraint unix] && [testConstraint notRoot]} { - testConstraint execMknod [expr {![catch {exec mknod tf1 p}]}] - cleanup -} - -test unixFCmd-1.1 {TclpRenameFile: EACCES} -setup { - cleanup -} -constraints {unix notRoot} -body { - file mkdir td1/td2/td3 - file attributes td1/td2 -permissions 0000 - file rename td1/td2/td3 td2 -} -returnCodes error -cleanup { - file attributes td1/td2 -permissions 0755 - cleanup -} -result {error renaming "td1/td2/td3": permission denied} -test unixFCmd-1.2 {TclpRenameFile: EEXIST} -setup { - cleanup -} -constraints {unix notRoot} -body { - file mkdir td1/td2 - file mkdir td2 - file rename td2 td1 -} -returnCodes error -cleanup { - cleanup -} -result {error renaming "td2" to "td1/td2": file already exists} -test unixFCmd-1.3 {TclpRenameFile: EINVAL} -setup { - cleanup -} -constraints {unix notRoot} -body { - file mkdir td1 - file rename td1 td1 -} -returnCodes error -cleanup { - cleanup -} -result {error renaming "td1" to "td1/td1": trying to rename a volume or move a directory into itself} -test unixFCmd-1.4 {TclpRenameFile: EISDIR} {emptyTest unix notRoot} { - # can't make it happen -} {} -test unixFCmd-1.5 {TclpRenameFile: ENOENT} -setup { - cleanup -} -constraints {unix notRoot} -body { - file mkdir td1 - file rename td2 td1 -} -returnCodes error -cleanup { - cleanup -} -result {error renaming "td2": no such file or directory} -test unixFCmd-1.6 {TclpRenameFile: ENOTDIR} {emptyTest unix notRoot} { - # can't make it happen -} {} -test unixFCmd-1.7 {TclpRenameFile: EXDEV} -setup { - cleanup -} -constraints {unix notRoot} -body { - file mkdir foo/bar - file attr foo -perm 040555 - file rename foo/bar /tmp -} -returnCodes error -cleanup { - catch {file delete /tmp/bar} - catch {file attr foo -perm 040777} - catch {file delete -force foo} -} -match glob -result {*: permission denied} -test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} { - testalarm - after 2000 - list [testgotsig] [testgotsig] -} {1 0} -test unixFCmd-1.9 {Checking EINTR Bug} -constraints {unix notRoot nonPortable} -setup { - cleanup - set f [open tfalarm w] - puts $f { - after 2000 - puts "hello world" - exit 0 - } - close $f -} -body { - testalarm - set pipe [open "|[info nameofexecutable] tfalarm" r+] - set line [read $pipe 1] - catch {close $pipe} - list $line [testgotsig] -} -cleanup { - cleanup -} -result {h 1} - -test unixFCmd-2.1 {TclpCopyFile: target exists: lstat(dst) == 0} -setup { - cleanup -} -constraints {unix notRoot} -body { - close [open tf1 a] - close [open tf2 a] - file copy -force tf1 tf2 -} -cleanup { - cleanup -} -result {} -test unixFCmd-2.2.1 {TclpCopyFile: src is symlink} -setup { - cleanup -} -constraints {unix notRoot dontCopyLinks} -body { - # copying links should end up with real files - close [open tf1 a] - file link -symbolic tf2 tf1 - file copy tf2 tf3 - file type tf3 -} -cleanup { - cleanup -} -result file -test unixFCmd-2.2.2 {TclpCopyFile: src is symlink} -setup { - cleanup -} -constraints {unix notRoot} -body { - # copying links should end up with the links copied - close [open tf1 a] - file link -symbolic tf2 tf1 - file copy tf2 tf3 - file type tf3 -} -cleanup { - cleanup -} -result link -test unixFCmd-2.3 {TclpCopyFile: src is block} -setup { - cleanup -} -constraints {unix notRoot} -body { - set null "/dev/null" - while {[file type $null] != "characterSpecial"} { - set null [file join [file dirname $null] [file readlink $null]] - } - # file copy $null tf1 -} -result {} -test unixFCmd-2.4 {TclpCopyFile: src is fifo} -setup { - cleanup -} -constraints {unix notRoot execMknod} -body { - exec mknod tf1 p - file copy tf1 tf2 - list [file type tf1] [file type tf2] -} -cleanup { - cleanup -} -result {fifo fifo} -test unixFCmd-2.5 {TclpCopyFile: copy attributes} -setup { - cleanup -} -constraints {unix notRoot} -body { - close [open tf1 a] - file attributes tf1 -permissions 0472 - file copy tf1 tf2 - file attributes tf2 -permissions -} -cleanup { - cleanup -} -result 00472 ;# i.e. perms field of [exec ls -l tf2] is -r--rwx-w- - -test unixFCmd-3.1 {CopyFile not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-4.1 {TclpDeleteFile not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-5.1 {TclpCreateDirectory not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-6.1 {TclpCopyDirectory not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-7.1 {TclpRemoveDirectory not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-8.1 {TraverseUnixTree not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-9.1 {TraversalCopy not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-10.1 {TraversalDelete not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-11.1 {CopyFileAttrs not done} {emptyTest unix notRoot} { -} {} - -test unixFCmd-12.1 {GetGroupAttribute - file not found} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -returnCodes error -body { - file attributes foo.test -group -} -result {could not read "foo.test": no such file or directory} -test unixFCmd-12.2 {GetGroupAttribute - file found} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - close [open foo.test w] - file attributes foo.test -group -} -cleanup { - file delete -force -- foo.test -} -match glob -result * - -test unixFCmd-13.1 {GetOwnerAttribute - file not found} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -returnCodes error -body { - list [catch {file attributes foo.test -group} msg] $msg -} -result {could not read "foo.test": no such file or directory} -test unixFCmd-13.2 {GetOwnerAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - close [open foo.test w] - file attributes foo.test -owner -} -cleanup { - file delete -force -- foo.test -} -result $user - -test unixFCmd-14.1 {GetPermissionsAttribute - file not found} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -returnCodes error -body { - file attributes foo.test -permissions -} -result {could not read "foo.test": no such file or directory} -test unixFCmd-14.2 {GetPermissionsAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - close [open foo.test w] - file attribute foo.test -permissions -} -cleanup { - file delete -force -- foo.test -} -match glob -result * - -#groups hard to test -test unixFCmd-15.1 {SetGroupAttribute - invalid group} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - file attributes foo.test -group foozzz -} -returnCodes error -cleanup { - file delete -force -- foo.test -} -result {could not set group for file "foo.test": group "foozzz" does not exist} -test unixFCmd-15.2 {SetGroupAttribute - invalid file} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot foundGroup} -returnCodes error -body { - file attributes foo.test -group $group -} -result {could not set group for file "foo.test": no such file or directory} - -#changing owners hard to do -test unixFCmd-16.1 {SetOwnerAttribute - current owner} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - close [open foo.test w] - list [file attributes foo.test -owner $user] \ - [file attributes foo.test -owner] -} -cleanup { - file delete -force -- foo.test -} -result [list {} $user] -test unixFCmd-16.2 {SetOwnerAttribute - invalid file} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -returnCodes error -body { - file attributes foo.test -owner $user -} -result {could not set owner for file "foo.test": no such file or directory} -test unixFCmd-16.3 {SetOwnerAttribute - invalid owner} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -returnCodes error -body { - file attributes foo.test -owner foozzz -} -result {could not set owner for file "foo.test": user "foozzz" does not exist} - -test unixFCmd-17.1 {SetPermissionsAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - close [open foo.test w] - list [file attributes foo.test -permissions 0000] \ - [file attributes foo.test -permissions] -} -cleanup { - file delete -force -- foo.test -} -result {{} 00000} -test unixFCmd-17.2 {SetPermissionsAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -returnCodes error -body { - file attributes foo.test -permissions 0000 -} -result {could not set permissions for file "foo.test": no such file or directory} -test unixFCmd-17.3 {SetPermissionsAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - close [open foo.test w] - file attributes foo.test -permissions foo -} -cleanup { - file delete -force -- foo.test -} -returnCodes error -result {unknown permission string format "foo"} -test unixFCmd-17.4 {SetPermissionsAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot} -body { - close [open foo.test w] - file attributes foo.test -permissions ---rwx -} -cleanup { - file delete -force -- foo.test -} -returnCodes error -result {unknown permission string format "---rwx"} - -close [open foo.test w] -set ::i 4 -proc permcheck {testnum permstr expected} { - test $testnum {SetPermissionsAttribute} {unix notRoot} { - file attributes foo.test -permissions $permstr - file attributes foo.test -permissions - } $expected -} -permcheck unixFCmd-17.5 rwxrwxrwx 00777 -permcheck unixFCmd-17.6 r--r---w- 00442 -permcheck unixFCmd-17.7 0 00000 -permcheck unixFCmd-17.8 u+rwx,g+r 00740 -permcheck unixFCmd-17.9 u-w 00540 -permcheck unixFCmd-17.10 o+rwx 00547 -permcheck unixFCmd-17.11 --x--x--x 00111 -permcheck unixFCmd-17.12 a+rwx 00777 -file delete -force -- foo.test - -test unixFCmd-18.1 {Unix pwd} -constraints {unix notRoot nonPortable} -setup { - set cd [pwd] -} -body { - # This test is nonportable because SunOS generates a weird error - # message when the current directory isn't readable. - set nd $cd/tstdir - file mkdir $nd - cd $nd - file attributes $nd -permissions 0000 - pwd -} -returnCodes error -cleanup { - cd $cd - file attributes $nd -permissions 0755 - file delete $nd -} -match glob -result {error getting working directory name:*} - -test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot readonlyAttr} -returnCodes error -body { - file attributes foo.test -readonly -} -result {could not read "foo.test": no such file or directory} -test unixFCmd-19.2 {GetReadOnlyAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot readonlyAttr} -body { - close [open foo.test w] - file attribute foo.test -readonly -} -cleanup { - file delete -force -- foo.test -} -result 0 - -test unixFCmd-20.1 {SetReadOnlyAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot readonlyAttr} -body { - close [open foo.test w] - list [catch {file attributes foo.test -readonly 1} msg] $msg \ - [catch {file attribute foo.test -readonly} msg] $msg \ - [catch {file delete -force -- foo.test}] \ - [catch {file attributes foo.test -readonly 0} msg] $msg \ - [catch {file attribute foo.test -readonly} msg] $msg -} -cleanup { - file delete -force -- foo.test -} -result {0 {} 0 1 1 0 {} 0 0} -test unixFCmd-20.2 {SetReadOnlyAttribute} -setup { - catch {file delete -force -- foo.test} -} -constraints {unix notRoot readonlyAttr} -returnCodes error -body { - file attributes foo.test -readonly 1 -} -result {could not read "foo.test": no such file or directory} - -# cleanup -cleanup -cd $oldcwd -::tcltest::cleanupTests -return - -# Local Variables: -# mode: tcl -# End: +# This file tests the tclUnixFCmd.c file. +# +# This file contains a collection of tests for one or more of the Tcl +# built-in commands. Sourcing this file into Tcl runs the tests and +# generates output for errors. No output means no errors were found. +# +# Copyright (c) 1996 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: unixFCmd.test,v 1.26 2008/04/11 14:55:10 dgp Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest 2 + namespace import -force ::tcltest::* +} + +testConstraint testchmod [llength [info commands testchmod]] + +# These tests really need to be run from a writable directory, which +# it is assumed [temporaryDirectory] is. +set oldcwd [pwd] +cd [temporaryDirectory] + +# Several tests require need to match results against the unix username +set user {} +if {[testConstraint unix]} { + catch {set user [exec whoami]} + if {$user == ""} { + catch {regexp {^[^(]*\(([^)]*)\)} [exec id] dummy user} + } + if {$user == ""} { + set user "root" + } +} + +# Find a group that exists on this system, or else skip tests that require +# groups +testConstraint foundGroup 0 +if {[testConstraint unix]} { + catch { + set groupList [exec groups] + set group [lindex $groupList 0] + testConstraint foundGroup 1 + } +} + +# check whether -readonly attribute is supported +testConstraint readonlyAttr 0 +if {[testConstraint unix]} { + set f [makeFile "whatever" probe] + catch { + file attributes $f -readonly + testConstraint readonlyAttr 1 + } + removeFile probe +} + +proc openup {path} { + testchmod 777 $path + if {[file isdirectory $path]} { + catch { + foreach p [glob -directory $path *] { + openup $p + } + } + } +} + +proc cleanup {args} { + foreach p ". $args" { + set x "" + catch { + set x [glob -directory $p tf* td*] + } + foreach file $x { + if { + [catch {file delete -force -- $file}] + && [testConstraint testchmod] + } then { + openup $file + file delete -force -- $file + } + } + } +} + +if {[testConstraint unix] && [testConstraint notRoot]} { + testConstraint execMknod [expr {![catch {exec mknod tf1 p}]}] + cleanup +} + +test unixFCmd-1.1 {TclpRenameFile: EACCES} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1/td2/td3 + file attributes td1/td2 -permissions 0000 + file rename td1/td2/td3 td2 +} -returnCodes error -cleanup { + file attributes td1/td2 -permissions 0755 + cleanup +} -result {error renaming "td1/td2/td3": permission denied} +test unixFCmd-1.2 {TclpRenameFile: EEXIST} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1/td2 + file mkdir td2 + file rename td2 td1 +} -returnCodes error -cleanup { + cleanup +} -result {error renaming "td2" to "td1/td2": file already exists} +test unixFCmd-1.3 {TclpRenameFile: EINVAL} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1 + file rename td1 td1 +} -returnCodes error -cleanup { + cleanup +} -result {error renaming "td1" to "td1/td1": trying to rename a volume or move a directory into itself} +test unixFCmd-1.4 {TclpRenameFile: EISDIR} {emptyTest unix notRoot} { + # can't make it happen +} {} +test unixFCmd-1.5 {TclpRenameFile: ENOENT} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir td1 + file rename td2 td1 +} -returnCodes error -cleanup { + cleanup +} -result {error renaming "td2": no such file or directory} +test unixFCmd-1.6 {TclpRenameFile: ENOTDIR} {emptyTest unix notRoot} { + # can't make it happen +} {} +test unixFCmd-1.7 {TclpRenameFile: EXDEV} -setup { + cleanup +} -constraints {unix notRoot} -body { + file mkdir foo/bar + file attr foo -perm 040555 + file rename foo/bar /tmp +} -returnCodes error -cleanup { + catch {file delete /tmp/bar} + catch {file attr foo -perm 040777} + catch {file delete -force foo} +} -match glob -result {*: permission denied} +test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} { + testalarm + after 2000 + list [testgotsig] [testgotsig] +} {1 0} +test unixFCmd-1.9 {Checking EINTR Bug} -constraints {unix notRoot nonPortable} -setup { + cleanup + set f [open tfalarm w] + puts $f { + after 2000 + puts "hello world" + exit 0 + } + close $f +} -body { + testalarm + set pipe [open "|[info nameofexecutable] tfalarm" r+] + set line [read $pipe 1] + catch {close $pipe} + list $line [testgotsig] +} -cleanup { + cleanup +} -result {h 1} + +test unixFCmd-2.1 {TclpCopyFile: target exists: lstat(dst) == 0} -setup { + cleanup +} -constraints {unix notRoot} -body { + close [open tf1 a] + close [open tf2 a] + file copy -force tf1 tf2 +} -cleanup { + cleanup +} -result {} +test unixFCmd-2.2.1 {TclpCopyFile: src is symlink} -setup { + cleanup +} -constraints {unix notRoot dontCopyLinks} -body { + # copying links should end up with real files + close [open tf1 a] + file link -symbolic tf2 tf1 + file copy tf2 tf3 + file type tf3 +} -cleanup { + cleanup +} -result file +test unixFCmd-2.2.2 {TclpCopyFile: src is symlink} -setup { + cleanup +} -constraints {unix notRoot} -body { + # copying links should end up with the links copied + close [open tf1 a] + file link -symbolic tf2 tf1 + file copy tf2 tf3 + file type tf3 +} -cleanup { + cleanup +} -result link +test unixFCmd-2.3 {TclpCopyFile: src is block} -setup { + cleanup +} -constraints {unix notRoot} -body { + set null "/dev/null" + while {[file type $null] != "characterSpecial"} { + set null [file join [file dirname $null] [file readlink $null]] + } + # file copy $null tf1 +} -result {} +test unixFCmd-2.4 {TclpCopyFile: src is fifo} -setup { + cleanup +} -constraints {unix notRoot execMknod} -body { + exec mknod tf1 p + file copy tf1 tf2 + list [file type tf1] [file type tf2] +} -cleanup { + cleanup +} -result {fifo fifo} +test unixFCmd-2.5 {TclpCopyFile: copy attributes} -setup { + cleanup +} -constraints {unix notRoot} -body { + close [open tf1 a] + file attributes tf1 -permissions 0472 + file copy tf1 tf2 + file attributes tf2 -permissions +} -cleanup { + cleanup +} -result 00472 ;# i.e. perms field of [exec ls -l tf2] is -r--rwx-w- + +test unixFCmd-3.1 {CopyFile not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-4.1 {TclpDeleteFile not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-5.1 {TclpCreateDirectory not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-6.1 {TclpCopyDirectory not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-7.1 {TclpRemoveDirectory not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-8.1 {TraverseUnixTree not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-9.1 {TraversalCopy not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-10.1 {TraversalDelete not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-11.1 {CopyFileAttrs not done} {emptyTest unix notRoot} { +} {} + +test unixFCmd-12.1 {GetGroupAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -group +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-12.2 {GetGroupAttribute - file found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -group +} -cleanup { + file delete -force -- foo.test +} -match glob -result * + +test unixFCmd-13.1 {GetOwnerAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -group +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-13.2 {GetOwnerAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -owner +} -cleanup { + file delete -force -- foo.test +} -result $user + +test unixFCmd-14.1 {GetPermissionsAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -permissions +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-14.2 {GetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attribute foo.test -permissions +} -cleanup { + file delete -force -- foo.test +} -match glob -result * + +#groups hard to test +test unixFCmd-15.1 {SetGroupAttribute - invalid group} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + file attributes foo.test -group foozzz +} -returnCodes error -cleanup { + file delete -force -- foo.test +} -result {could not set group for file "foo.test": group "foozzz" does not exist} +test unixFCmd-15.2 {SetGroupAttribute - invalid file} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot foundGroup} -returnCodes error -body { + file attributes foo.test -group $group +} -result {could not set group for file "foo.test": no such file or directory} + +#changing owners hard to do +test unixFCmd-16.1 {SetOwnerAttribute - current owner} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + list [file attributes foo.test -owner $user] \ + [file attributes foo.test -owner] +} -cleanup { + file delete -force -- foo.test +} -result [list {} $user] +test unixFCmd-16.2 {SetOwnerAttribute - invalid file} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -owner $user +} -result {could not set owner for file "foo.test": no such file or directory} +test unixFCmd-16.3 {SetOwnerAttribute - invalid owner} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -owner foozzz +} -result {could not set owner for file "foo.test": user "foozzz" does not exist} + +test unixFCmd-17.1 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + list [file attributes foo.test -permissions 0000] \ + [file attributes foo.test -permissions] +} -cleanup { + file delete -force -- foo.test +} -result {{} 00000} +test unixFCmd-17.2 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -returnCodes error -body { + file attributes foo.test -permissions 0000 +} -result {could not set permissions for file "foo.test": no such file or directory} +test unixFCmd-17.3 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -permissions foo +} -cleanup { + file delete -force -- foo.test +} -returnCodes error -result {unknown permission string format "foo"} +test unixFCmd-17.4 {SetPermissionsAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot} -body { + close [open foo.test w] + file attributes foo.test -permissions ---rwx +} -cleanup { + file delete -force -- foo.test +} -returnCodes error -result {unknown permission string format "---rwx"} + +close [open foo.test w] +set ::i 4 +proc permcheck {testnum permstr expected} { + test $testnum {SetPermissionsAttribute} {unix notRoot} { + file attributes foo.test -permissions $permstr + file attributes foo.test -permissions + } $expected +} +permcheck unixFCmd-17.5 rwxrwxrwx 00777 +permcheck unixFCmd-17.6 r--r---w- 00442 +permcheck unixFCmd-17.7 0 00000 +permcheck unixFCmd-17.8 u+rwx,g+r 00740 +permcheck unixFCmd-17.9 u-w 00540 +permcheck unixFCmd-17.10 o+rwx 00547 +permcheck unixFCmd-17.11 --x--x--x 00111 +permcheck unixFCmd-17.12 a+rwx 00777 +file delete -force -- foo.test + +test unixFCmd-18.1 {Unix pwd} -constraints {unix notRoot nonPortable} -setup { + set cd [pwd] +} -body { + # This test is nonportable because SunOS generates a weird error + # message when the current directory isn't readable. + set nd $cd/tstdir + file mkdir $nd + cd $nd + file attributes $nd -permissions 0000 + pwd +} -returnCodes error -cleanup { + cd $cd + file attributes $nd -permissions 0755 + file delete $nd +} -match glob -result {error getting working directory name:*} + +test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -returnCodes error -body { + file attributes foo.test -readonly +} -result {could not read "foo.test": no such file or directory} +test unixFCmd-19.2 {GetReadOnlyAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -body { + close [open foo.test w] + file attribute foo.test -readonly +} -cleanup { + file delete -force -- foo.test +} -result 0 + +test unixFCmd-20.1 {SetReadOnlyAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -body { + close [open foo.test w] + list [catch {file attributes foo.test -readonly 1} msg] $msg \ + [catch {file attribute foo.test -readonly} msg] $msg \ + [catch {file delete -force -- foo.test}] \ + [catch {file attributes foo.test -readonly 0} msg] $msg \ + [catch {file attribute foo.test -readonly} msg] $msg +} -cleanup { + file delete -force -- foo.test +} -result {0 {} 0 1 1 0 {} 0 0} +test unixFCmd-20.2 {SetReadOnlyAttribute} -setup { + catch {file delete -force -- foo.test} +} -constraints {unix notRoot readonlyAttr} -returnCodes error -body { + file attributes foo.test -readonly 1 +} -result {could not read "foo.test": no such file or directory} + +# cleanup +cleanup +cd $oldcwd +::tcltest::cleanupTests +return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 341d48cddf65091ad525bc922760bd5fd87e86d7 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 14 Apr 2008 17:54:57 +0000 Subject: * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use of 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197]. --- ChangeLog | 5 +++++ unix/tclUnixTime.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8490e85..8d75713 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-14 Kevin B. Kenny + + * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use of + 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197]. + 2008-04-10 Andreas Kupries * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Keeping check for negative diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index fc19d6d..780098f 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTime.c,v 1.33 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclUnixTime.c,v 1.34 2008/04/14 17:54:57 kennykb Exp $ */ #include "tclInt.h" @@ -603,9 +603,8 @@ NativeGetTime( ClientData clientData) { struct timeval tv; - struct timezone tz; - (void) gettimeofday(&tv, &tz); + (void) gettimeofday(&tv, NULL); timePtr->sec = tv.tv_sec; timePtr->usec = tv.tv_usec; } -- cgit v0.12 From 1be77f417e95d3afb2fe656716045099bca44351 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 14 Apr 2008 18:00:52 +0000 Subject: * tests/clock.test (clock-33.5, clock-33.5a, clock-33.8, clock-33.8a): Added comments to the test that it can fail on a heavily loaded system. --- ChangeLog | 3 +++ tests/clock.test | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8d75713..3882953 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use of 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197]. + * tests/clock.test (clock-33.5, clock-33.5a, clock-33.8, clock-33.8a): + Added comments to the test that it can fail on a heavily loaded + system. 2008-04-10 Andreas Kupries diff --git a/tests/clock.test b/tests/clock.test index c36f5fe..15e71eb 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.83 2008/02/27 02:08:27 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.84 2008/04/14 18:01:01 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35464,6 +35464,8 @@ test clock-33.4a {clock milliseconds} { concat {} } {} test clock-33.5 {clock clicks tests, millisecond timing test} { + # This test can fail on a system that is so heavily loaded that + # the test takes >60 ms to run. set start [clock clicks -milli] after 10 set end [clock clicks -milli] @@ -35474,6 +35476,8 @@ test clock-33.5 {clock clicks tests, millisecond timing test} { "test should have taken 0-60 ms, actually took [expr $end - $start]"} } {ok} test clock-33.5a {clock tests, millisecond timing test} { + # This test can fail on a system that is so heavily loaded that + # the test takes >60 ms to run. set start [clock milliseconds] after 10 set end [clock milliseconds] @@ -35491,12 +35495,16 @@ test clock-33.7 {clock clicks, milli with too much abbreviation} { } {1 {ambiguous option "-": must be -milliseconds or -microseconds}} test clock-33.8 {clock clicks test, microsecond timing test} { + # This test can fail on a system that is so heavily loaded that + # the test takes >60 ms to run. set start [clock clicks -micro] after 10 set end [clock clicks -micro] expr {($end > $start) && (($end - $start) <= 60000)} } {1} test clock-33.8a {clock test, microsecond timing test} { + # This test can fail on a system that is so heavily loaded that + # the test takes >60 ms to run. set start [clock microseconds] after 10 set end [clock microseconds] -- cgit v0.12 From d8b21102ffefe834f5aaacd2b5187b2130147610 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 15 Apr 2008 10:10:42 +0000 Subject: * unix/Makefile.in: adjust tclDTrace.h dependencies for removal of tclStubLib.o from TCL_OBJS. [Bug 1942795] --- ChangeLog | 6 ++++++ unix/Makefile.in | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3882953..819a25e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ +2008-04-15 Daniel Steffen + + * unix/Makefile.in: adjust tclDTrace.h dependencies for removal + of tclStubLib.o from TCL_OBJS. [Bug 1942795] + 2008-04-14 Kevin B. Kenny * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use of 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197]. + * tests/clock.test (clock-33.5, clock-33.5a, clock-33.8, clock-33.8a): Added comments to the test that it can fail on a heavily loaded system. diff --git a/unix/Makefile.in b/unix/Makefile.in index cbc5594..bfeccb7 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.230 2008/04/01 16:23:42 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.231 2008/04/15 10:10:43 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1448,7 +1448,7 @@ tclMacOSXNotify.o: $(MAC_OSX_DIR)/tclMacOSXNotify.c # DTrace support -$(TCL_OBJS): @DTRACE_HDR@ +$(TCL_OBJS) $(STUB_LIB_OBJS): @DTRACE_HDR@ $(DTRACE_HDR): $(DTRACE_SRC) $(DTRACE) -h $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) -- cgit v0.12 From 8c81a86813da48f3a4d88fd1543b559e9d691ec5 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 15 Apr 2008 10:55:30 +0000 Subject: sync with Tcl.xcodeproj --- macosx/Tcl.xcode/project.pbxproj | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/macosx/Tcl.xcode/project.pbxproj b/macosx/Tcl.xcode/project.pbxproj index 576c213..0e00120 100644 --- a/macosx/Tcl.xcode/project.pbxproj +++ b/macosx/Tcl.xcode/project.pbxproj @@ -931,7 +931,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.10 2007/12/13 15:26:03 dgp Exp $\n"; + comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.11 2008/04/15 10:55:30 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1950,12 +1950,14 @@ files = ( ); inputPaths = ( + "${TARGET_TEMP_DIR}/.none", ); outputPaths = ( + "${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "if [ -e \"${BUILT_PRODUCTS_DIR}/tclsh\" ]; then\n mv -f \"${BUILT_PRODUCTS_DIR}/tclsh\" \"${BUILT_PRODUCTS_DIR}/tclsh${VERSION}\"\nfi\ngnumake -C \"${TCL_SRCROOT}/macosx\" -j \"$(sysctl -n hw.activecpu)\" \"$(echo \"${ACTION}\" | sed -e s/build// -e s/clean/distclean/ -e s/..\\*/\\&-/)${MAKE_TARGET}\" CFLAGS_WARNING=\"${WARNING_CFLAGS}\" SYMROOT=\"${BUILT_PRODUCTS_DIR}\" OBJ_DIR=\"${OBJECT_FILE_DIR}\" INSTALL_ROOT=\"${DSTROOT}\" PREFIX=\"${PREFIX}\" BINDIR=\"${BINDIR}\" LIBDIR=\"${FRAMEWORK_INSTALL_PATH}\" MANDIR=\"${MANDIR}\" EXTRA_CONFIGURE_ARGS=\"${CONFIGURE_ARGS}\" ${EXTRA_MAKE_FLAGS}\nresult=$?\nif [ -e \"${BUILT_PRODUCTS_DIR}/tclsh${VERSION}\" ]; then\n mv -f \"${BUILT_PRODUCTS_DIR}/tclsh${VERSION}\" \"${BUILT_PRODUCTS_DIR}/tclsh\"\nfi\nif [ -e \"${BUILT_PRODUCTS_DIR}/tcltest\" ]; then\n\trm -f \"${BUILT_PRODUCTS_DIR}/tcltest\"\nfi\necho \"Done\"\nexit ${result}\n"; + shellScript = "if [ -e \"${TARGET_BUILD_DIR}/tclsh\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh\" \"${TARGET_BUILD_DIR}/tclsh${VERSION}\"\nfi\ngnumake -C \"${TCL_SRCROOT}/macosx\" -j \"$(sysctl -n hw.activecpu)\" \"$(echo \"${ACTION}\" | sed -e s/build// -e s/clean/distclean/ -e s/..\\*/\\&-/)${MAKE_TARGET}\" CFLAGS_WARNING=\"${WARNING_CFLAGS}\" CFLAGS_OPTIMIZE=\"-O${GCC_OPTIMIZATION_LEVEL}\" SYMROOT=\"${BUILT_PRODUCTS_DIR}\" OBJ_DIR=\"${OBJECT_FILE_DIR}\" INSTALL_ROOT=\"${DSTROOT}\" PREFIX=\"${PREFIX}\" BINDIR=\"${BINDIR}\" LIBDIR=\"${FRAMEWORK_INSTALL_PATH}\" MANDIR=\"${MANDIR}\" EXTRA_CONFIGURE_ARGS=\"${CONFIGURE_ARGS}\" ${EXTRA_MAKE_FLAGS}\nresult=$?\nif [ -e \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" \"${TARGET_BUILD_DIR}/tclsh\"\nfi\nif [ -e \"${BUILT_PRODUCTS_DIR}/tcltest\" ]; then\n\trm -f \"${BUILT_PRODUCTS_DIR}/tcltest\"\nfi\necho \"Done\"\nrm -f \"${SCRIPT_INPUT_FILE_0}\"\nexit ${result}\n"; }; F9A5C5F508F651A2008AE941 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2156,6 +2158,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = ReleaseUniversal; }; @@ -2190,6 +2193,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = DebugMemCompile; }; @@ -2224,6 +2228,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = Debug; }; @@ -2231,6 +2236,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = Release; }; @@ -2238,6 +2244,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = DebugNoFixZL; }; @@ -2372,6 +2379,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = Debug64bit; }; @@ -2408,6 +2416,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = DebugUnthreaded; }; @@ -2415,6 +2424,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = DebugLeaks; }; @@ -2479,6 +2489,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = ReleaseUniversal10.4uSDK; }; @@ -2516,6 +2527,7 @@ buildSettings = { LDFLAGS = "-force_cpusubtype_ALL $(LDFLAGS)"; PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = ReleasePPC10.3.9SDK; }; @@ -2543,6 +2555,7 @@ isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; }; name = ReleasePPC10.2.8SDK; }; -- cgit v0.12 From 792972c9a4f2ab1f7a38cc284392f8df4b8301dd Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 15 Apr 2008 18:34:47 +0000 Subject: * generic/tclIO.c (CopyData): Applied another patch by Alexandre * io.test (io-53.8a): Ferrieux , * chanio.test (chan-io-53.8a): to shift EOF handling to the async part of the command if a callback is specified, should the channel be at EOF already when fcopy is called. Testcase by myself. --- ChangeLog | 8 ++++++++ generic/tclIO.c | 14 ++++++++------ tests/chanio.test | 42 +++++++++++++++++++++++++++++++++++++++++- tests/io.test | 42 +++++++++++++++++++++++++++++++++++++++++- 4 files changed, 98 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 819a25e..57dbc3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-04-15 Andreas Kupries + + * generic/tclIO.c (CopyData): Applied another patch by Alexandre + * io.test (io-53.8a): Ferrieux , + * chanio.test (chan-io-53.8a): to shift EOF handling to the async + part of the command if a callback is specified, should the channel + be at EOF already when fcopy is called. Testcase by myself. + 2008-04-15 Daniel Steffen * unix/Makefile.in: adjust tclDTrace.h dependencies for removal diff --git a/generic/tclIO.c b/generic/tclIO.c index 2b6138c..1d917ba 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.141 2008/04/07 22:53:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.142 2008/04/15 18:34:47 andreas_kupries Exp $ */ #include "tclInt.h" @@ -8641,15 +8641,17 @@ CopyData( break; } else if (underflow) { /* - * We had an underflow on the read side. If we are at EOF, then - * the copying is done, otherwise set up a channel handler to - * detect when the channel becomes readable again. + * We had an underflow on the read side. If we are at EOF, and not + * in the synchronous part of an asynchronous fcopy, then the + * copying is done, otherwise set up a channel handler to detect + * when the channel becomes readable again. */ - if ((size == 0) && Tcl_Eof(inChan)) { + if ((size == 0) && Tcl_Eof(inChan) && !(cmdPtr && (mask == 0))) { break; } - if (! Tcl_Eof(inChan) && !(mask & TCL_READABLE)) { + if (((!Tcl_Eof(inChan)) || (cmdPtr && (mask == 0))) && + !(mask & TCL_READABLE)) { if (mask & TCL_WRITABLE) { Tcl_DeleteChannelHandler(outChan, CopyEventProc, csPtr); } diff --git a/tests/chanio.test b/tests/chanio.test index 6ac7dbb..e79cb97 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.10 2008/04/10 20:58:59 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.11 2008/04/15 18:34:48 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6967,6 +6967,46 @@ test chan-io-53.8 {CopyData: async callback and error handling, Bug 1932639} -se removeFile foo removeFile bar } -result {0 sync/OK 0 {CMD 2} {bgerror/OK !STOP}} +test chan-io-53.8a {CopyData: async callback and error handling, Bug 1932639, at eof} -setup { + # copy progress callback. errors out intentionally + proc ::cmd args { + lappend ::RES "CMD $args" + set ::forever has-been-reached + return + } + # Files we use for our channels + set foo [makeFile ashgdfashdgfasdhgfasdhgf foo] + set bar [makeFile {} bar] + # Channels to copy between + set f [open $foo r] ; chan configure $f -translation binary + set g [open $bar w] ; chan configure $g -translation binary -buffering none +} -constraints {stdio openpipe fcopy} -body { + # Initialize and force eof on the input. + chan seek $f 0 end ; chan read $f 1 + set ::RES [chan eof $f] + # Run the copy. Should not invoke -command now. + chan copy $f $g -size 2 -command ::cmd + # Check that -command was not called synchronously + lappend ::RES [expr {([llength $::RES] > 1) ? "sync/FAIL" : "sync/OK"}] + # Now let the async part happen. Should capture the eof in cmd + # If not break the event loop via timer. + set token [after 1000 { + lappend ::RES {cmd/FAIL timeout} + set ::forever has-been-reached + }] + vwait ::forever + catch {after cancel $token} + # Report + set ::RES +} -cleanup { + chan close $f + chan close $g + catch {unset ::RES} + catch {unset ::forever} + rename ::cmd {} + removeFile foo + removeFile bar +} -result {1 sync/OK {CMD 0}} test chan-io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { set out [makeFile {} out] set err [makeFile {} err] diff --git a/tests/io.test b/tests/io.test index 3dd5bbf..e03fa8a 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.87 2008/04/10 20:58:59 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.88 2008/04/15 18:34:48 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -6967,6 +6967,46 @@ test io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { removeFile foo removeFile bar } -result {0 sync/OK 0 {CMD 2} {bgerror/OK !STOP}} +test io-53.8a {CopyData: async callback and error handling, Bug 1932639, at eof} -setup { + # copy progress callback. errors out intentionally + proc ::cmd args { + lappend ::RES "CMD $args" + set ::forever has-been-reached + return + } + # Files we use for our channels + set foo [makeFile ashgdfashdgfasdhgfasdhgf foo] + set bar [makeFile {} bar] + # Channels to copy between + set f [open $foo r] ; fconfigure $f -translation binary + set g [open $bar w] ; fconfigure $g -translation binary -buffering none +} -constraints {stdio openpipe fcopy} -body { + # Initialize and force eof on the input. + seek $f 0 end ; read $f 1 + set ::RES [eof $f] + # Run the copy. Should not invoke -command now. + fcopy $f $g -size 2 -command ::cmd + # Check that -command was not called synchronously + lappend ::RES [expr {([llength $::RES] > 1) ? "sync/FAIL" : "sync/OK"}] + # Now let the async part happen. Should capture the eof in cmd + # If not break the event loop via timer. + set token [after 1000 { + lappend ::RES {cmd/FAIL timeout} + set ::forever has-been-reached + }] + vwait ::forever + catch {after cancel $token} + # Report + set ::RES +} -cleanup { + close $f + close $g + catch {unset ::RES} + catch {unset ::forever} + rename ::cmd {} + removeFile foo + removeFile bar +} -result {1 sync/OK {CMD 0}} test io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { set out [makeFile {} out] set err [makeFile {} err] -- cgit v0.12 From f2cc98583dc54f92e54639280c862772682ad3ab Mon Sep 17 00:00:00 2001 From: das Date: Wed, 16 Apr 2008 14:29:23 +0000 Subject: * generic/tclInt.h: revise Tcl_SetNotifier() to use a * generic/tclNotify.c: module-scope hooks table instead of * generic/tclStubInit.c: runtime stubs-table modification; * macosx/tclMacOSXNotify.c: ensure all hookable notifier functions * win/tclWinNotify.c: check for hooks; remove hook checks in * unix/tclUnixNotfy.c: notifier API callers. [Patch 1938497] --- ChangeLog | 15 +- generic/tclInt.h | 4 +- generic/tclNotify.c | 41 +-- generic/tclStubInit.c | 25 +- macosx/tclMacOSXNotify.c | 796 ++++++++++++++++++++++++----------------------- unix/tclUnixNotfy.c | 679 ++++++++++++++++++++-------------------- win/tclWinNotify.c | 442 +++++++++++++------------- 7 files changed, 1014 insertions(+), 988 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57dbc3d..9b2270f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,17 @@ +2008-04-16 Daniel Steffen + + * generic/tclInt.h: revise Tcl_SetNotifier() to use a + * generic/tclNotify.c: module-scope hooks table instead of + * generic/tclStubInit.c: runtime stubs-table modification; + * macosx/tclMacOSXNotify.c: ensure all hookable notifier functions + * win/tclWinNotify.c: check for hooks; remove hook checks in + * unix/tclUnixNotfy.c: notifier API callers. [Patch 1938497] + 2008-04-15 Andreas Kupries - * generic/tclIO.c (CopyData): Applied another patch by Alexandre - * io.test (io-53.8a): Ferrieux , - * chanio.test (chan-io-53.8a): to shift EOF handling to the async + * generic/tclIO.c (CopyData): Applied another patch by Alexandre + * io.test (io-53.8a): Ferrieux , + * chanio.test (chan-io-53.8a): to shift EOF handling to the async part of the command if a callback is specified, should the channel be at EOF already when fcopy is called. Testcase by myself. diff --git a/generic/tclInt.h b/generic/tclInt.h index e513663..7af390d 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.363 2008/03/30 04:26:16 kennykb Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.364 2008/04/16 14:29:25 das Exp $ */ #ifndef _TCLINT @@ -2357,7 +2357,7 @@ MODULE_SCOPE char * tclNativeExecutableName; MODULE_SCOPE int tclFindExecutableSearchDone; MODULE_SCOPE char * tclMemDumpFileName; MODULE_SCOPE TclPlatformType tclPlatform; -MODULE_SCOPE Tcl_NotifierProcs tclOriginalNotifier; +MODULE_SCOPE Tcl_NotifierProcs tclNotifierHooks; /* * TIP #233 (Virtualized Time) diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 06781d9..805845b 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -14,12 +14,19 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNotify.c,v 1.25 2006/09/25 15:02:54 dkf Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.26 2008/04/16 14:29:26 das Exp $ */ #include "tclInt.h" -extern TclStubs tclStubs; +/* + * Module-scope struct of notifier hooks that are checked in the default + * notifier functions (for overriding via Tcl_SetNotifier). + */ + +Tcl_NotifierProcs tclNotifierHooks = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +}; /* * For each event source (created with Tcl_CreateEventSource) there is a @@ -128,7 +135,7 @@ TclInitNotifier(void) tsdPtr = TCL_TSD_INIT(&dataKey); tsdPtr->threadId = threadId; - tsdPtr->clientData = tclStubs.tcl_InitNotifier(); + tsdPtr->clientData = Tcl_InitNotifier(); tsdPtr->initialized = 1; tsdPtr->nextPtr = firstNotifierPtr; firstNotifierPtr = tsdPtr; @@ -184,9 +191,7 @@ TclFinalizeNotifier(void) Tcl_MutexLock(&listLock); - if (tclStubs.tcl_FinalizeNotifier) { - tclStubs.tcl_FinalizeNotifier(tsdPtr->clientData); - } + Tcl_FinalizeNotifier(tsdPtr->clientData); Tcl_MutexFinalize(&(tsdPtr->queueMutex)); for (prevPtrPtr = &firstNotifierPtr; *prevPtrPtr != NULL; prevPtrPtr = &((*prevPtrPtr)->nextPtr)) { @@ -213,9 +218,8 @@ TclFinalizeNotifier(void) * None. * * Side effects: - * Overstomps part of the stub vector. This relies on hooks added to the - * default functions in case those are called directly (i.e., not through - * the stub table.) + * Set the tclNotifierHooks global, which is checked in the default + * notifier functions. * *---------------------------------------------------------------------- */ @@ -224,16 +228,7 @@ void Tcl_SetNotifier( Tcl_NotifierProcs *notifierProcPtr) { -#if !defined(__WIN32__) /* UNIX */ - tclStubs.tcl_CreateFileHandler = notifierProcPtr->createFileHandlerProc; - tclStubs.tcl_DeleteFileHandler = notifierProcPtr->deleteFileHandlerProc; -#endif - tclStubs.tcl_SetTimer = notifierProcPtr->setTimerProc; - tclStubs.tcl_WaitForEvent = notifierProcPtr->waitForEventProc; - tclStubs.tcl_InitNotifier = notifierProcPtr->initNotifierProc; - tclStubs.tcl_FinalizeNotifier = notifierProcPtr->finalizeNotifierProc; - tclStubs.tcl_AlertNotifier = notifierProcPtr->alertNotifierProc; - tclStubs.tcl_ServiceModeHook = notifierProcPtr->serviceModeHookProc; + tclNotifierHooks = *notifierProcPtr; } /* @@ -774,9 +769,7 @@ Tcl_SetServiceMode( oldMode = tsdPtr->serviceMode; tsdPtr->serviceMode = mode; - if (tclStubs.tcl_ServiceModeHook) { - tclStubs.tcl_ServiceModeHook(mode); - } + Tcl_ServiceModeHook(mode); return oldMode; } @@ -1136,9 +1129,7 @@ Tcl_ThreadAlert( Tcl_MutexLock(&listLock); for (tsdPtr = firstNotifierPtr; tsdPtr; tsdPtr = tsdPtr->nextPtr) { if (tsdPtr->threadId == threadId) { - if (tclStubs.tcl_AlertNotifier) { - tclStubs.tcl_AlertNotifier(tsdPtr->clientData); - } + Tcl_AlertNotifier(tsdPtr->clientData); break; } } diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index b5f31ab..f3b87e1 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.151 2008/04/02 21:30:04 das Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.152 2008/04/16 14:29:26 das Exp $ */ #include "tclInt.h" @@ -34,29 +34,6 @@ #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry -/* - * Keep a record of the original Notifier procedures, created in the - * same compilation unit as the stub tables so we can later do reliable, - * portable comparisons to see whether a Tcl_SetNotifier() call swapped - * new routines into the stub table. - */ - -Tcl_NotifierProcs tclOriginalNotifier = { - Tcl_SetTimer, - Tcl_WaitForEvent, -#if !defined(__WIN32__) /* UNIX */ - Tcl_CreateFileHandler, - Tcl_DeleteFileHandler, -#else - NULL, - NULL, -#endif - NULL, - NULL, - NULL, - NULL -}; - MODULE_SCOPE TclIntStubs tclIntStubs; MODULE_SCOPE TclIntPlatStubs tclIntPlatStubs; MODULE_SCOPE TclPlatStubs tclPlatStubs; diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 0cd8eac..419cc48 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.18 2008/03/11 22:24:17 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.19 2008/04/16 14:29:25 das Exp $ */ #include "tclInt.h" @@ -21,9 +21,6 @@ #include #include -extern TclStubs tclStubs; -extern Tcl_NotifierProcs tclOriginalNotifier; - /* * This structure is used to keep track of the notifier info for a registered * file. @@ -351,105 +348,113 @@ MODULE_SCOPE long tclMacOSXDarwinRelease; ClientData Tcl_InitNotifier(void) { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + if (tclNotifierHooks.initNotifierProc) { + return tclNotifierHooks.initNotifierProc(); + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - tsdPtr->eventReady = 0; + tsdPtr->eventReady = 0; #ifdef WEAK_IMPORT_SPINLOCKLOCK - /* - * Initialize support for weakly imported spinlock API. - */ - if (pthread_once(&spinLockLockInitControl, SpinLockLockInit)) { - Tcl_Panic("Tcl_InitNotifier: pthread_once failed"); - } + /* + * Initialize support for weakly imported spinlock API. + */ + if (pthread_once(&spinLockLockInitControl, SpinLockLockInit)) { + Tcl_Panic("Tcl_InitNotifier: pthread_once failed"); + } #endif #ifndef __CONSTANT_CFSTRINGS__ - if (!tclEventsOnlyRunLoopMode) { - tclEventsOnlyRunLoopMode = CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE); - } + if (!tclEventsOnlyRunLoopMode) { + tclEventsOnlyRunLoopMode = CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE); + } #endif - /* - * Initialize CFRunLoopSource and add it to CFRunLoop of this thread. - */ - - if (!tsdPtr->runLoop) { - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - CFRunLoopSourceRef runLoopSource; - CFRunLoopSourceContext runLoopSourceContext; + /* + * Initialize CFRunLoopSource and add it to CFRunLoop of this thread. + */ - bzero(&runLoopSourceContext, sizeof(CFRunLoopSourceContext)); - runLoopSourceContext.info = tsdPtr; - runLoopSource = CFRunLoopSourceCreate(NULL, 0, &runLoopSourceContext); - if (!runLoopSource) { - Tcl_Panic("Tcl_InitNotifier: could not create CFRunLoopSource"); + if (!tsdPtr->runLoop) { + CFRunLoopRef runLoop = CFRunLoopGetCurrent(); + CFRunLoopSourceRef runLoopSource; + CFRunLoopSourceContext runLoopSourceContext; + + bzero(&runLoopSourceContext, sizeof(CFRunLoopSourceContext)); + runLoopSourceContext.info = tsdPtr; + runLoopSource = CFRunLoopSourceCreate(NULL, 0, + &runLoopSourceContext); + if (!runLoopSource) { + Tcl_Panic("Tcl_InitNotifier: could not create CFRunLoopSource"); + } + CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopCommonModes); + CFRunLoopAddSource(runLoop, runLoopSource, + tclEventsOnlyRunLoopMode); + tsdPtr->runLoopSource = runLoopSource; + tsdPtr->runLoop = runLoop; } - CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopCommonModes); - CFRunLoopAddSource(runLoop, runLoopSource, tclEventsOnlyRunLoopMode); - tsdPtr->runLoopSource = runLoopSource; - tsdPtr->runLoop = runLoop; - } - LOCK_NOTIFIER_INIT; + LOCK_NOTIFIER_INIT; #ifdef HAVE_PTHREAD_ATFORK - /* - * Install pthread_atfork handlers to reinitialize the notifier in the - * child of a fork. - */ + /* + * Install pthread_atfork handlers to reinitialize the notifier in the + * child of a fork. + */ - if ( + if ( #ifdef WEAK_IMPORT_PTHREAD_ATFORK - pthread_atfork != NULL && + pthread_atfork != NULL && #endif - !atForkInit) { - int result = pthread_atfork(AtForkPrepare, AtForkParent, AtForkChild); - if (result) { - Tcl_Panic("Tcl_InitNotifier: pthread_atfork failed"); + !atForkInit) { + int result = pthread_atfork(AtForkPrepare, AtForkParent, + AtForkChild); + + if (result) { + Tcl_Panic("Tcl_InitNotifier: pthread_atfork failed"); + } + atForkInit = 1; } - atForkInit = 1; - } #endif - if (notifierCount == 0) { - int fds[2], status; + if (notifierCount == 0) { + int fds[2], status; - /* - * Initialize trigger pipe. - */ + /* + * Initialize trigger pipe. + */ - if (pipe(fds) != 0) { - Tcl_Panic("Tcl_InitNotifier: could not create trigger pipe"); - } + if (pipe(fds) != 0) { + Tcl_Panic("Tcl_InitNotifier: could not create trigger pipe"); + } - status = fcntl(fds[0], F_GETFL); - status |= O_NONBLOCK; - if (fcntl(fds[0], F_SETFL, status) < 0) { - Tcl_Panic("Tcl_InitNotifier: could not make receive pipe non blocking"); - } - status = fcntl(fds[1], F_GETFL); - status |= O_NONBLOCK; - if (fcntl(fds[1], F_SETFL, status) < 0) { - Tcl_Panic("Tcl_InitNotifier: could not make trigger pipe non blocking"); - } + status = fcntl(fds[0], F_GETFL); + status |= O_NONBLOCK; + if (fcntl(fds[0], F_SETFL, status) < 0) { + Tcl_Panic("Tcl_InitNotifier: could not make receive pipe non blocking"); + } + status = fcntl(fds[1], F_GETFL); + status |= O_NONBLOCK; + if (fcntl(fds[1], F_SETFL, status) < 0) { + Tcl_Panic("Tcl_InitNotifier: could not make trigger pipe non blocking"); + } - receivePipe = fds[0]; - triggerPipe = fds[1]; + receivePipe = fds[0]; + triggerPipe = fds[1]; - /* - * Create notifier thread lazily in Tcl_WaitForEvent() to avoid - * interfering with fork() followed immediately by execve() - * (cannot execve() when more than one thread is present). - */ + /* + * Create notifier thread lazily in Tcl_WaitForEvent() to avoid + * interfering with fork() followed immediately by execve() + * (cannot execve() when more than one thread is present). + */ - notifierThread = 0; + notifierThread = 0; #ifdef TCL_MAC_DEBUG_NOTIFIER - OPEN_NOTIFIER_LOG; + OPEN_NOTIFIER_LOG; #endif - } - notifierCount++; - UNLOCK_NOTIFIER_INIT; + } + notifierCount++; + UNLOCK_NOTIFIER_INIT; - return (ClientData) tsdPtr; + return (ClientData) tsdPtr; + } } /* @@ -474,66 +479,71 @@ void Tcl_FinalizeNotifier( ClientData clientData) /* Not used. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + if (tclNotifierHooks.finalizeNotifierProc) { + tclNotifierHooks.finalizeNotifierProc(clientData); + return; + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - LOCK_NOTIFIER_INIT; - notifierCount--; + LOCK_NOTIFIER_INIT; + notifierCount--; - /* - * If this is the last thread to use the notifier, close the notifier pipe - * and wait for the background thread to terminate. - */ + /* + * If this is the last thread to use the notifier, close the notifier + * pipe and wait for the background thread to terminate. + */ - if (notifierCount == 0) { - int result; + if (notifierCount == 0) { + int result; - if (triggerPipe < 0) { - Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); - } + if (triggerPipe < 0) { + Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); + } - /* - * Send "q" message to the notifier thread so that it will terminate. - * The notifier will return from its call to select() and notice that - * a "q" message has arrived, it will then close its side of the pipe - * and terminate its thread. Note the we can not just close the pipe - * and check for EOF in the notifier thread because if a background - * child process was created with exec, select() would not register - * the EOF on the pipe until the child processes had terminated. [Bug: - * 4139] [Bug: 1222872] - */ + /* + * Send "q" message to the notifier thread so that it will + * terminate. The notifier will return from its call to select() + * and notice that a "q" message has arrived, it will then close + * its side of the pipe and terminate its thread. Note the we can + * not just close the pipe and check for EOF in the notifier thread + * because if a background child process was created with exec, + * select() would not register the EOF on the pipe until the child + * processes had terminated. [Bug: 4139] [Bug: 1222872] + */ - write(triggerPipe, "q", 1); - close(triggerPipe); + write(triggerPipe, "q", 1); + close(triggerPipe); - if (notifierThread) { - result = pthread_join(notifierThread, NULL); - if (result) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); + if (notifierThread) { + result = pthread_join(notifierThread, NULL); + if (result) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); + } + notifierThread = 0; } - notifierThread = 0; - } - close(receivePipe); - triggerPipe = -1; + close(receivePipe); + triggerPipe = -1; #ifdef TCL_MAC_DEBUG_NOTIFIER - CLOSE_NOTIFIER_LOG; + CLOSE_NOTIFIER_LOG; #endif - } - UNLOCK_NOTIFIER_INIT; + } + UNLOCK_NOTIFIER_INIT; - LOCK_NOTIFIER; /* for concurrency with Tcl_AlertNotifier */ - if (tsdPtr->runLoop) { - tsdPtr->runLoop = NULL; + LOCK_NOTIFIER; /* for concurrency with Tcl_AlertNotifier */ + if (tsdPtr->runLoop) { + tsdPtr->runLoop = NULL; - /* - * Remove runLoopSource from all CFRunLoops and release it. - */ + /* + * Remove runLoopSource from all CFRunLoops and release it. + */ - CFRunLoopSourceInvalidate(tsdPtr->runLoopSource); - CFRelease(tsdPtr->runLoopSource); - tsdPtr->runLoopSource = NULL; + CFRunLoopSourceInvalidate(tsdPtr->runLoopSource); + CFRelease(tsdPtr->runLoopSource); + tsdPtr->runLoopSource = NULL; + } + UNLOCK_NOTIFIER; } - UNLOCK_NOTIFIER; } /* @@ -559,15 +569,20 @@ void Tcl_AlertNotifier( ClientData clientData) { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; + if (tclNotifierHooks.alertNotifierProc) { + tclNotifierHooks.alertNotifierProc(clientData); + return; + } else { + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; - LOCK_NOTIFIER; - if (tsdPtr->runLoop) { - tsdPtr->eventReady = 1; - CFRunLoopSourceSignal(tsdPtr->runLoopSource); - CFRunLoopWakeUp(tsdPtr->runLoop); + LOCK_NOTIFIER; + if (tsdPtr->runLoop) { + tsdPtr->eventReady = 1; + CFRunLoopSourceSignal(tsdPtr->runLoopSource); + CFRunLoopWakeUp(tsdPtr->runLoop); + } + UNLOCK_NOTIFIER; } - UNLOCK_NOTIFIER; } /* @@ -592,14 +607,15 @@ void Tcl_SetTimer( Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { - /* - * The interval timer doesn't do anything in this implementation, because - * the only event loop is via Tcl_DoOneEvent, which passes timeout values - * to Tcl_WaitForEvent. - */ - - if (tclStubs.tcl_SetTimer != tclOriginalNotifier.setTimerProc) { - tclStubs.tcl_SetTimer(timePtr); + if (tclNotifierHooks.setTimerProc) { + tclNotifierHooks.setTimerProc(timePtr); + return; + } else { + /* + * The interval timer doesn't do anything in this implementation, + * because the only event loop is via Tcl_DoOneEvent, which passes + * timeout values to Tcl_WaitForEvent. + */ } } @@ -624,6 +640,12 @@ Tcl_ServiceModeHook( int mode) /* Either TCL_SERVICE_ALL, or * TCL_SERVICE_NONE. */ { + if (tclNotifierHooks.serviceModeHookProc) { + tclNotifierHooks.serviceModeHookProc(mode); + return; + } else { + /* Does nothing in this implementation. */ + } } /* @@ -653,53 +675,52 @@ Tcl_CreateFileHandler( * event. */ ClientData clientData) /* Arbitrary data to pass to proc. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - FileHandler *filePtr; - - if (tclStubs.tcl_CreateFileHandler != - tclOriginalNotifier.createFileHandlerProc) { - tclStubs.tcl_CreateFileHandler(fd, mask, proc, clientData); + if (tclNotifierHooks.createFileHandlerProc) { + tclNotifierHooks.createFileHandlerProc(fd, mask, proc, clientData); return; - } + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + FileHandler *filePtr; - for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; - filePtr = filePtr->nextPtr) { - if (filePtr->fd == fd) { - break; + for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; + filePtr = filePtr->nextPtr) { + if (filePtr->fd == fd) { + break; + } } - } - if (filePtr == NULL) { - filePtr = (FileHandler*) ckalloc(sizeof(FileHandler)); - filePtr->fd = fd; - filePtr->readyMask = 0; - filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; - tsdPtr->firstFileHandlerPtr = filePtr; - } - filePtr->proc = proc; - filePtr->clientData = clientData; - filePtr->mask = mask; + if (filePtr == NULL) { + filePtr = (FileHandler*) ckalloc(sizeof(FileHandler)); + filePtr->fd = fd; + filePtr->readyMask = 0; + filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; + tsdPtr->firstFileHandlerPtr = filePtr; + } + filePtr->proc = proc; + filePtr->clientData = clientData; + filePtr->mask = mask; - /* - * Update the check masks for this file. - */ + /* + * Update the check masks for this file. + */ - if (mask & TCL_READABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.readable)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); - } - if (mask & TCL_WRITABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.writable)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); - } - if (mask & TCL_EXCEPTION) { - FD_SET(fd, &(tsdPtr->checkMasks.exceptional)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); - } - if (tsdPtr->numFdBits <= fd) { - tsdPtr->numFdBits = fd+1; + if (mask & TCL_READABLE) { + FD_SET(fd, &(tsdPtr->checkMasks.readable)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + } + if (mask & TCL_WRITABLE) { + FD_SET(fd, &(tsdPtr->checkMasks.writable)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + } + if (mask & TCL_EXCEPTION) { + FD_SET(fd, &(tsdPtr->checkMasks.exceptional)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + } + if (tsdPtr->numFdBits <= fd) { + tsdPtr->numFdBits = fd+1; + } } } @@ -724,70 +745,69 @@ Tcl_DeleteFileHandler( int fd) /* Stream id for which to remove callback * function. */ { - FileHandler *filePtr, *prevPtr; - int i; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - - if (tclStubs.tcl_DeleteFileHandler != - tclOriginalNotifier.deleteFileHandlerProc) { - tclStubs.tcl_DeleteFileHandler(fd); + if (tclNotifierHooks.deleteFileHandlerProc) { + tclNotifierHooks.deleteFileHandlerProc(fd); return; - } + } else { + FileHandler *filePtr, *prevPtr; + int i; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - /* - * Find the entry for the given file (and return if there isn't one). - */ + /* + * Find the entry for the given file (and return if there isn't one). + */ - for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; - prevPtr = filePtr, filePtr = filePtr->nextPtr) { - if (filePtr == NULL) { - return; - } - if (filePtr->fd == fd) { - break; + for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; + prevPtr = filePtr, filePtr = filePtr->nextPtr) { + if (filePtr == NULL) { + return; + } + if (filePtr->fd == fd) { + break; + } } - } - /* - * Update the check masks for this file. - */ + /* + * Update the check masks for this file. + */ - if (filePtr->mask & TCL_READABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); - } - if (filePtr->mask & TCL_WRITABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); - } - if (filePtr->mask & TCL_EXCEPTION) { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); - } + if (filePtr->mask & TCL_READABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + } + if (filePtr->mask & TCL_WRITABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + } + if (filePtr->mask & TCL_EXCEPTION) { + FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + } - /* - * Find current max fd. - */ + /* + * Find current max fd. + */ - if (fd+1 == tsdPtr->numFdBits) { - tsdPtr->numFdBits = 0; - for (i = fd-1; i >= 0; i--) { - if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { - tsdPtr->numFdBits = i+1; - break; + if (fd+1 == tsdPtr->numFdBits) { + tsdPtr->numFdBits = 0; + for (i = fd-1; i >= 0; i--) { + if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { + tsdPtr->numFdBits = i+1; + break; + } } } - } - /* - * Clean up information in the callback record. - */ + /* + * Clean up information in the callback record. + */ - if (prevPtr == NULL) { - tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; - } else { - prevPtr->nextPtr = filePtr->nextPtr; + if (prevPtr == NULL) { + tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; + } else { + prevPtr->nextPtr = filePtr->nextPtr; + } + ckfree((char *) filePtr); } - ckfree((char *) filePtr); } /* @@ -885,195 +905,203 @@ int Tcl_WaitForEvent( Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { - FileHandler *filePtr; - FileHandlerEvent *fileEvPtr; - int mask; - Tcl_Time myTime; - int waitForFiles; - Tcl_Time *myTimePtr; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - - if (tclStubs.tcl_WaitForEvent != tclOriginalNotifier.waitForEventProc) { - return tclStubs.tcl_WaitForEvent(timePtr); - } + if (tclNotifierHooks.waitForEventProc) { + return tclNotifierHooks.waitForEventProc(timePtr); + } else { + FileHandler *filePtr; + FileHandlerEvent *fileEvPtr; + int mask; + Tcl_Time myTime; + int waitForFiles; + Tcl_Time *myTimePtr; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - if (timePtr != NULL) { /* - * TIP #233 (Virtualized Time). Is virtual time in effect? And do we - * actually have something to scale? If yes to both then we call the - * handler to do this scaling. + * Set up the timeout structure. Note that if there are no events to + * check for, we return with a negative result rather than blocking + * forever. */ - myTime.sec = timePtr->sec; - myTime.usec = timePtr->usec; - - if (myTime.sec != 0 || myTime.usec != 0) { - (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); - } + if (timePtr != NULL) { + /* + * TIP #233 (Virtualized Time). Is virtual time in effect? And do + * we actually have something to scale? If yes to both then we call + * the handler to do this scaling. + */ - myTimePtr = &myTime; - } else { - myTimePtr = NULL; - } + myTime.sec = timePtr->sec; + myTime.usec = timePtr->usec; - /* - * Start notifier thread if necessary. - */ + if (myTime.sec != 0 || myTime.usec != 0) { + (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); + } - LOCK_NOTIFIER_INIT; - if (!notifierCount) { - Tcl_Panic("Tcl_WaitForEvent: notifier not initialized"); - } - if (!notifierThread) { - int result; - pthread_attr_t attr; - - pthread_attr_init(&attr); - pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); - pthread_attr_setstacksize(&attr, 60 * 1024); - result = pthread_create(¬ifierThread, &attr, - (void * (*)(void *))NotifierThreadProc, NULL); - pthread_attr_destroy(&attr); - if (result || !notifierThread) { - Tcl_Panic("Tcl_WaitForEvent: unable to start notifier thread"); + myTimePtr = &myTime; + } else { + myTimePtr = NULL; } - } - UNLOCK_NOTIFIER_INIT; - /* - * Place this thread on the list of interested threads, signal the - * notifier thread, and wait for a response or a timeout. - */ - - LOCK_NOTIFIER; - if (!tsdPtr->runLoop) { - Tcl_Panic("Tcl_WaitForEvent: CFRunLoop not initialized"); - } - waitForFiles = (tsdPtr->numFdBits > 0); - if (myTimePtr != NULL && myTimePtr->sec == 0 && myTimePtr->usec == 0) { /* - * Cannot emulate a polling select with a polling condition variable. - * Instead, pretend to wait for files and tell the notifier thread - * what we are doing. The notifier thread makes sure it goes through - * select with its select mask in the same state as ours currently is. - * We block until that happens. + * Start notifier thread if necessary. */ - waitForFiles = 1; - tsdPtr->pollState = POLL_WANT; - myTimePtr = NULL; - } else { - tsdPtr->pollState = 0; - } + LOCK_NOTIFIER_INIT; + if (!notifierCount) { + Tcl_Panic("Tcl_WaitForEvent: notifier not initialized"); + } + if (!notifierThread) { + int result; + pthread_attr_t attr; + + pthread_attr_init(&attr); + pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); + pthread_attr_setstacksize(&attr, 60 * 1024); + result = pthread_create(¬ifierThread, &attr, + (void * (*)(void *))NotifierThreadProc, NULL); + pthread_attr_destroy(&attr); + if (result || !notifierThread) { + Tcl_Panic("Tcl_WaitForEvent: unable to start notifier thread"); + } + } + UNLOCK_NOTIFIER_INIT; - if (waitForFiles) { /* - * Add the ThreadSpecificData structure of this thread to the list of - * ThreadSpecificData structures of all threads that are waiting on - * file events. + * Place this thread on the list of interested threads, signal the + * notifier thread, and wait for a response or a timeout. */ - tsdPtr->nextPtr = waitingListPtr; - if (waitingListPtr) { - waitingListPtr->prevPtr = tsdPtr; + LOCK_NOTIFIER; + if (!tsdPtr->runLoop) { + Tcl_Panic("Tcl_WaitForEvent: CFRunLoop not initialized"); } - tsdPtr->prevPtr = 0; - waitingListPtr = tsdPtr; - tsdPtr->onList = 1; - - write(triggerPipe, "", 1); - } - - FD_ZERO(&(tsdPtr->readyMasks.readable)); - FD_ZERO(&(tsdPtr->readyMasks.writable)); - FD_ZERO(&(tsdPtr->readyMasks.exceptional)); - - if (!tsdPtr->eventReady) { - CFTimeInterval waitTime; - CFStringRef runLoopMode; + waitForFiles = (tsdPtr->numFdBits > 0); + if (myTimePtr != NULL && myTimePtr->sec == 0 && myTimePtr->usec == 0) { + /* + * Cannot emulate a polling select with a polling condition + * variable. Instead, pretend to wait for files and tell the + * notifier thread what we are doing. The notifier thread makes + * sure it goes through select with its select mask in the same + * state as ours currently is. We block until that happens. + */ - if (myTimePtr == NULL) { - waitTime = 1.0e10; /* Wait forever, as per CFRunLoop.c */ - } else { - waitTime = myTimePtr->sec + 1.0e-6 * myTimePtr->usec; - } - /* - * If the run loop is already running (e.g. if Tcl_WaitForEvent was - * called recursively), re-run it in a custom run loop mode containing - * only the source for the notifier thread, otherwise wakeups from other - * sources added to the common run loop modes might get lost. - */ - if ((runLoopMode = CFRunLoopCopyCurrentMode(tsdPtr->runLoop))) { - CFRelease(runLoopMode); - runLoopMode = tclEventsOnlyRunLoopMode; + waitForFiles = 1; + tsdPtr->pollState = POLL_WANT; + myTimePtr = NULL; } else { - runLoopMode = kCFRunLoopDefaultMode; + tsdPtr->pollState = 0; } - UNLOCK_NOTIFIER; - CFRunLoopRunInMode(runLoopMode, waitTime, TRUE); - LOCK_NOTIFIER; - } - tsdPtr->eventReady = 0; - if (waitForFiles && tsdPtr->onList) { - /* - * Remove the ThreadSpecificData structure of this thread from the - * waiting list. Alert the notifier thread to recompute its select - * masks - skipping this caused a hang when trying to close a pipe - * which the notifier thread was still doing a select on. - */ + if (waitForFiles) { + /* + * Add the ThreadSpecificData structure of this thread to the list + * of ThreadSpecificData structures of all threads that are waiting + * on file events. + */ - if (tsdPtr->prevPtr) { - tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; - } else { - waitingListPtr = tsdPtr->nextPtr; - } - if (tsdPtr->nextPtr) { - tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; + tsdPtr->nextPtr = waitingListPtr; + if (waitingListPtr) { + waitingListPtr->prevPtr = tsdPtr; + } + tsdPtr->prevPtr = 0; + waitingListPtr = tsdPtr; + tsdPtr->onList = 1; + + write(triggerPipe, "", 1); } - tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; - tsdPtr->onList = 0; - write(triggerPipe, "", 1); - } - /* - * Queue all detected file events before returning. - */ + FD_ZERO(&(tsdPtr->readyMasks.readable)); + FD_ZERO(&(tsdPtr->readyMasks.writable)); + FD_ZERO(&(tsdPtr->readyMasks.exceptional)); - for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); - filePtr = filePtr->nextPtr) { + if (!tsdPtr->eventReady) { + CFTimeInterval waitTime; + CFStringRef runLoopMode; - mask = 0; - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.readable))) { - mask |= TCL_READABLE; - } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.writable))) { - mask |= TCL_WRITABLE; - } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.exceptional))) { - mask |= TCL_EXCEPTION; + if (myTimePtr == NULL) { + waitTime = 1.0e10; /* Wait forever, as per CFRunLoop.c */ + } else { + waitTime = myTimePtr->sec + 1.0e-6 * myTimePtr->usec; + } + /* + * If the run loop is already running (e.g. if Tcl_WaitForEvent was + * called recursively), re-run it in a custom run loop mode + * containing only the source for the notifier thread, otherwise + * wakeups from other sources added to the common run loop modes + * might get lost. + */ + if ((runLoopMode = CFRunLoopCopyCurrentMode(tsdPtr->runLoop))) { + CFRelease(runLoopMode); + runLoopMode = tclEventsOnlyRunLoopMode; + } else { + runLoopMode = kCFRunLoopDefaultMode; + } + UNLOCK_NOTIFIER; + CFRunLoopRunInMode(runLoopMode, waitTime, TRUE); + LOCK_NOTIFIER; } + tsdPtr->eventReady = 0; - if (!mask) { - continue; + if (waitForFiles && tsdPtr->onList) { + /* + * Remove the ThreadSpecificData structure of this thread from the + * waiting list. Alert the notifier thread to recompute its select + * masks - skipping this caused a hang when trying to close a pipe + * which the notifier thread was still doing a select on. + */ + + if (tsdPtr->prevPtr) { + tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; + } else { + waitingListPtr = tsdPtr->nextPtr; + } + if (tsdPtr->nextPtr) { + tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; + } + tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; + tsdPtr->onList = 0; + write(triggerPipe, "", 1); } /* - * Don't bother to queue an event if the mask was previously non-zero - * since an event must still be on the queue. + * Queue all detected file events before returning. */ - if (filePtr->readyMask == 0) { - fileEvPtr = (FileHandlerEvent *) ckalloc(sizeof(FileHandlerEvent)); - fileEvPtr->header.proc = FileHandlerEventProc; - fileEvPtr->fd = filePtr->fd; - Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); + for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); + filePtr = filePtr->nextPtr) { + + mask = 0; + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.readable))) { + mask |= TCL_READABLE; + } + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.writable))) { + mask |= TCL_WRITABLE; + } + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.exceptional))) { + mask |= TCL_EXCEPTION; + } + + if (!mask) { + continue; + } + + /* + * Don't bother to queue an event if the mask was previously + * non-zero since an event must still be on the queue. + */ + + if (filePtr->readyMask == 0) { + fileEvPtr = (FileHandlerEvent *) + ckalloc(sizeof(FileHandlerEvent)); + fileEvPtr->header.proc = FileHandlerEventProc; + fileEvPtr->fd = filePtr->fd; + Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); + } + filePtr->readyMask = mask; } - filePtr->readyMask = mask; + UNLOCK_NOTIFIER; + return 0; } - UNLOCK_NOTIFIER; - return 0; } /* diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index a78cabd..a763b1d 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.34 2008/03/11 22:23:50 das Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.35 2008/04/16 14:29:26 das Exp $ */ #include "tclInt.h" @@ -19,14 +19,6 @@ #include /* - * This code does deep stub magic to allow replacement of the notifier at - * runtime. - */ - -extern TclStubs tclStubs; -extern Tcl_NotifierProcs tclOriginalNotifier; - -/* * This structure is used to keep track of the notifier info for a registered * file. */ @@ -199,7 +191,7 @@ static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); * Initializes the platform specific notifier state. * * Results: - * Returns a handle to the notifier state for this thread.. + * Returns a handle to the notifier state for this thread. * * Side effects: * None. @@ -210,35 +202,38 @@ static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); ClientData Tcl_InitNotifier(void) { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - + if (tclNotifierHooks.initNotifierProc) { + return tclNotifierHooks.initNotifierProc(); + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); #ifdef TCL_THREADS - tsdPtr->eventReady = 0; + tsdPtr->eventReady = 0; - /* - * Start the Notifier thread if necessary. - */ + /* + * Start the Notifier thread if necessary. + */ - Tcl_MutexLock(¬ifierMutex); - if (notifierCount == 0) { - if (TclpThreadCreate(¬ifierThread, NotifierThreadProc, NULL, - TCL_THREAD_STACK_DEFAULT, TCL_THREAD_JOINABLE) != TCL_OK) { - Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread"); + Tcl_MutexLock(¬ifierMutex); + if (notifierCount == 0) { + if (TclpThreadCreate(¬ifierThread, NotifierThreadProc, NULL, + TCL_THREAD_STACK_DEFAULT, TCL_THREAD_JOINABLE) != TCL_OK) { + Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread"); + } } - } - notifierCount++; + notifierCount++; - /* - * Wait for the notifier pipe to be created. - */ + /* + * Wait for the notifier pipe to be created. + */ - while (triggerPipe < 0) { - Tcl_ConditionWait(¬ifierCV, ¬ifierMutex, NULL); - } + while (triggerPipe < 0) { + Tcl_ConditionWait(¬ifierCV, ¬ifierMutex, NULL); + } - Tcl_MutexUnlock(¬ifierMutex); + Tcl_MutexUnlock(¬ifierMutex); #endif - return (ClientData) tsdPtr; + return (ClientData) tsdPtr; + } } /* @@ -263,55 +258,60 @@ void Tcl_FinalizeNotifier( ClientData clientData) /* Not used. */ { + if (tclNotifierHooks.finalizeNotifierProc) { + tclNotifierHooks.finalizeNotifierProc(clientData); + return; + } else { #ifdef TCL_THREADS - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - Tcl_MutexLock(¬ifierMutex); - notifierCount--; + Tcl_MutexLock(¬ifierMutex); + notifierCount--; - /* - * If this is the last thread to use the notifier, close the notifier pipe - * and wait for the background thread to terminate. - */ + /* + * If this is the last thread to use the notifier, close the notifier + * pipe and wait for the background thread to terminate. + */ - if (notifierCount == 0) { - int result; + if (notifierCount == 0) { + int result; - if (triggerPipe < 0) { - Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); - } + if (triggerPipe < 0) { + Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); + } - /* - * Send "q" message to the notifier thread so that it will terminate. - * The notifier will return from its call to select() and notice that - * a "q" message has arrived, it will then close its side of the pipe - * and terminate its thread. Note the we can not just close the pipe - * and check for EOF in the notifier thread because if a background - * child process was created with exec, select() would not register - * the EOF on the pipe until the child processes had terminated. [Bug: - * 4139] [Bug: 1222872] - */ + /* + * Send "q" message to the notifier thread so that it will + * terminate. The notifier will return from its call to select() + * and notice that a "q" message has arrived, it will then close + * its side of the pipe and terminate its thread. Note the we can + * not just close the pipe and check for EOF in the notifier thread + * because if a background child process was created with exec, + * select() would not register the EOF on the pipe until the child + * processes had terminated. [Bug: 4139] [Bug: 1222872] + */ - write(triggerPipe, "q", 1); - close(triggerPipe); - while(triggerPipe >= 0) { - Tcl_ConditionWait(¬ifierCV, ¬ifierMutex, NULL); - } + write(triggerPipe, "q", 1); + close(triggerPipe); + while(triggerPipe >= 0) { + Tcl_ConditionWait(¬ifierCV, ¬ifierMutex, NULL); + } - result = Tcl_JoinThread(notifierThread, NULL); - if (result) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); + result = Tcl_JoinThread(notifierThread, NULL); + if (result) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); + } } - } - /* - * Clean up any synchronization objects in the thread local storage. - */ + /* + * Clean up any synchronization objects in the thread local storage. + */ - Tcl_ConditionFinalize(&(tsdPtr->waitCV)); + Tcl_ConditionFinalize(&(tsdPtr->waitCV)); - Tcl_MutexUnlock(¬ifierMutex); + Tcl_MutexUnlock(¬ifierMutex); #endif + } } /* @@ -337,13 +337,18 @@ void Tcl_AlertNotifier( ClientData clientData) { + if (tclNotifierHooks.alertNotifierProc) { + tclNotifierHooks.alertNotifierProc(clientData); + return; + } else { #ifdef TCL_THREADS - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; - Tcl_MutexLock(¬ifierMutex); - tsdPtr->eventReady = 1; - Tcl_ConditionNotify(&tsdPtr->waitCV); - Tcl_MutexUnlock(¬ifierMutex); + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; + Tcl_MutexLock(¬ifierMutex); + tsdPtr->eventReady = 1; + Tcl_ConditionNotify(&tsdPtr->waitCV); + Tcl_MutexUnlock(¬ifierMutex); #endif + } } /* @@ -368,14 +373,15 @@ void Tcl_SetTimer( Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { - /* - * The interval timer doesn't do anything in this implementation, because - * the only event loop is via Tcl_DoOneEvent, which passes timeout values - * to Tcl_WaitForEvent. - */ - - if (tclStubs.tcl_SetTimer != tclOriginalNotifier.setTimerProc) { - tclStubs.tcl_SetTimer(timePtr); + if (tclNotifierHooks.setTimerProc) { + tclNotifierHooks.setTimerProc(timePtr); + return; + } else { + /* + * The interval timer doesn't do anything in this implementation, + * because the only event loop is via Tcl_DoOneEvent, which passes + * timeout values to Tcl_WaitForEvent. + */ } } @@ -400,6 +406,12 @@ Tcl_ServiceModeHook( int mode) /* Either TCL_SERVICE_ALL, or * TCL_SERVICE_NONE. */ { + if (tclNotifierHooks.serviceModeHookProc) { + tclNotifierHooks.serviceModeHookProc(mode); + return; + } else { + /* Does nothing in this implementation. */ + } } /* @@ -429,53 +441,52 @@ Tcl_CreateFileHandler( * event. */ ClientData clientData) /* Arbitrary data to pass to proc. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - FileHandler *filePtr; - - if (tclStubs.tcl_CreateFileHandler != - tclOriginalNotifier.createFileHandlerProc) { - tclStubs.tcl_CreateFileHandler(fd, mask, proc, clientData); + if (tclNotifierHooks.createFileHandlerProc) { + tclNotifierHooks.createFileHandlerProc(fd, mask, proc, clientData); return; - } + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + FileHandler *filePtr; - for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; - filePtr = filePtr->nextPtr) { - if (filePtr->fd == fd) { - break; + for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; + filePtr = filePtr->nextPtr) { + if (filePtr->fd == fd) { + break; + } } - } - if (filePtr == NULL) { - filePtr = (FileHandler*) ckalloc(sizeof(FileHandler)); - filePtr->fd = fd; - filePtr->readyMask = 0; - filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; - tsdPtr->firstFileHandlerPtr = filePtr; - } - filePtr->proc = proc; - filePtr->clientData = clientData; - filePtr->mask = mask; + if (filePtr == NULL) { + filePtr = (FileHandler*) ckalloc(sizeof(FileHandler)); + filePtr->fd = fd; + filePtr->readyMask = 0; + filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; + tsdPtr->firstFileHandlerPtr = filePtr; + } + filePtr->proc = proc; + filePtr->clientData = clientData; + filePtr->mask = mask; - /* - * Update the check masks for this file. - */ + /* + * Update the check masks for this file. + */ - if (mask & TCL_READABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.readable)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); - } - if (mask & TCL_WRITABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.writable)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); - } - if (mask & TCL_EXCEPTION) { - FD_SET(fd, &(tsdPtr->checkMasks.exceptional)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); - } - if (tsdPtr->numFdBits <= fd) { - tsdPtr->numFdBits = fd+1; + if (mask & TCL_READABLE) { + FD_SET(fd, &(tsdPtr->checkMasks.readable)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + } + if (mask & TCL_WRITABLE) { + FD_SET(fd, &(tsdPtr->checkMasks.writable)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + } + if (mask & TCL_EXCEPTION) { + FD_SET(fd, &(tsdPtr->checkMasks.exceptional)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + } + if (tsdPtr->numFdBits <= fd) { + tsdPtr->numFdBits = fd+1; + } } } @@ -500,70 +511,69 @@ Tcl_DeleteFileHandler( int fd) /* Stream id for which to remove callback * function. */ { - FileHandler *filePtr, *prevPtr; - int i; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - - if (tclStubs.tcl_DeleteFileHandler != - tclOriginalNotifier.deleteFileHandlerProc) { - tclStubs.tcl_DeleteFileHandler(fd); + if (tclNotifierHooks.deleteFileHandlerProc) { + tclNotifierHooks.deleteFileHandlerProc(fd); return; - } + } else { + FileHandler *filePtr, *prevPtr; + int i; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - /* - * Find the entry for the given file (and return if there isn't one). - */ + /* + * Find the entry for the given file (and return if there isn't one). + */ - for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; - prevPtr = filePtr, filePtr = filePtr->nextPtr) { - if (filePtr == NULL) { - return; - } - if (filePtr->fd == fd) { - break; + for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; + prevPtr = filePtr, filePtr = filePtr->nextPtr) { + if (filePtr == NULL) { + return; + } + if (filePtr->fd == fd) { + break; + } } - } - /* - * Update the check masks for this file. - */ + /* + * Update the check masks for this file. + */ - if (filePtr->mask & TCL_READABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); - } - if (filePtr->mask & TCL_WRITABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); - } - if (filePtr->mask & TCL_EXCEPTION) { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); - } + if (filePtr->mask & TCL_READABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + } + if (filePtr->mask & TCL_WRITABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + } + if (filePtr->mask & TCL_EXCEPTION) { + FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + } - /* - * Find current max fd. - */ + /* + * Find current max fd. + */ - if (fd+1 == tsdPtr->numFdBits) { - tsdPtr->numFdBits = 0; - for (i = fd-1; i >= 0; i--) { - if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { - tsdPtr->numFdBits = i+1; - break; + if (fd+1 == tsdPtr->numFdBits) { + tsdPtr->numFdBits = 0; + for (i = fd-1; i >= 0; i--) { + if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { + tsdPtr->numFdBits = i+1; + break; + } } } - } - /* - * Clean up information in the callback record. - */ + /* + * Clean up information in the callback record. + */ - if (prevPtr == NULL) { - tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; - } else { - prevPtr->nextPtr = filePtr->nextPtr; + if (prevPtr == NULL) { + tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; + } else { + prevPtr->nextPtr = filePtr->nextPtr; + } + ckfree((char *) filePtr); } - ckfree((char *) filePtr); } /* @@ -661,216 +671,219 @@ int Tcl_WaitForEvent( Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { - FileHandler *filePtr; - FileHandlerEvent *fileEvPtr; - int mask; - Tcl_Time myTime; + if (tclNotifierHooks.waitForEventProc) { + return tclNotifierHooks.waitForEventProc(timePtr); + } else { + FileHandler *filePtr; + FileHandlerEvent *fileEvPtr; + int mask; + Tcl_Time myTime; #ifdef TCL_THREADS - int waitForFiles; - Tcl_Time *myTimePtr; + int waitForFiles; + Tcl_Time *myTimePtr; #else - /* - * Impl. notes: timeout & timeoutPtr are used if, and only if threads are - * not enabled. They are the arguments for the regular select() used when - * the core is not thread-enabled. - */ + /* + * Impl. notes: timeout & timeoutPtr are used if, and only if threads + * are not enabled. They are the arguments for the regular select() + * used when the core is not thread-enabled. + */ - struct timeval timeout, *timeoutPtr; - int numFound; + struct timeval timeout, *timeoutPtr; + int numFound; #endif /* TCL_THREADS */ - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - - if (tclStubs.tcl_WaitForEvent != tclOriginalNotifier.waitForEventProc) { - return tclStubs.tcl_WaitForEvent(timePtr); - } - - /* - * Set up the timeout structure. Note that if there are no events to check - * for, we return with a negative result rather than blocking forever. - */ + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - if (timePtr != NULL) { /* - * TIP #233 (Virtualized Time). Is virtual time in effect? And do we - * actually have something to scale? If yes to both then we call the - * handler to do this scaling. + * Set up the timeout structure. Note that if there are no events to + * check for, we return with a negative result rather than blocking + * forever. */ - myTime.sec = timePtr->sec; - myTime.usec = timePtr->usec; + if (timePtr != NULL) { + /* + * TIP #233 (Virtualized Time). Is virtual time in effect? And do + * we actually have something to scale? If yes to both then we call + * the handler to do this scaling. + */ + + myTime.sec = timePtr->sec; + myTime.usec = timePtr->usec; - if (myTime.sec != 0 || myTime.usec != 0) { - (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); - } + if (myTime.sec != 0 || myTime.usec != 0) { + (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); + } #ifdef TCL_THREADS - myTimePtr = &myTime; + myTimePtr = &myTime; #else - timeout.tv_sec = myTime.sec; - timeout.tv_usec = myTime.usec; - timeoutPtr = &timeout; + timeout.tv_sec = myTime.sec; + timeout.tv_usec = myTime.usec; + timeoutPtr = &timeout; #endif /* TCL_THREADS */ #ifndef TCL_THREADS - } else if (tsdPtr->numFdBits == 0) { - /* - * If there are no threads, no timeout, and no fds registered, then - * there are no events possible and we must avoid deadlock. Note that - * this is not entirely correct because there might be a signal that - * could interrupt the select call, but we don't handle that case if - * we aren't using threads. - */ + } else if (tsdPtr->numFdBits == 0) { + /* + * If there are no threads, no timeout, and no fds registered, then + * there are no events possible and we must avoid deadlock. Note + * that this is not entirely correct because there might be a + * signal that could interrupt the select call, but we don't handle + * that case if we aren't using threads. + */ - return -1; + return -1; #endif /* !TCL_THREADS */ - } else { + } else { #ifdef TCL_THREADS - myTimePtr = NULL; + myTimePtr = NULL; #else - timeoutPtr = NULL; + timeoutPtr = NULL; #endif /* TCL_THREADS */ - } + } #ifdef TCL_THREADS - /* - * Place this thread on the list of interested threads, signal the - * notifier thread, and wait for a response or a timeout. - */ + /* + * Place this thread on the list of interested threads, signal the + * notifier thread, and wait for a response or a timeout. + */ - Tcl_MutexLock(¬ifierMutex); + Tcl_MutexLock(¬ifierMutex); - waitForFiles = (tsdPtr->numFdBits > 0); - if (myTimePtr != NULL && myTimePtr->sec == 0 && (myTimePtr->usec == 0 + waitForFiles = (tsdPtr->numFdBits > 0); + if (myTimePtr != NULL && myTimePtr->sec == 0 && (myTimePtr->usec == 0 #if defined(__APPLE__) && defined(__LP64__) + /* + * On 64-bit Darwin, pthread_cond_timedwait() appears to have a + * bug that causes it to wait forever when passed an absolute + * time which has already been exceeded by the system time; as + * a workaround, when given a very brief timeout, just do a + * poll. [Bug 1457797] + */ + || myTimePtr->usec < 10 +#endif + )) { /* - * On 64-bit Darwin, pthread_cond_timedwait() appears to have a bug - * that causes it to wait forever when passed an absolute time which - * has already been exceeded by the system time; as a workaround, - * when given a very brief timeout, just do a poll. [Bug 1457797] + * Cannot emulate a polling select with a polling condition + * variable. Instead, pretend to wait for files and tell the + * notifier thread what we are doing. The notifier thread makes + * sure it goes through select with its select mask in the same + * state as ours currently is. We block until that happens. */ - || myTimePtr->usec < 10 -#endif - )) { - /* - * Cannot emulate a polling select with a polling condition variable. - * Instead, pretend to wait for files and tell the notifier thread - * what we are doing. The notifier thread makes sure it goes through - * select with its select mask in the same state as ours currently is. - * We block until that happens. - */ - waitForFiles = 1; - tsdPtr->pollState = POLL_WANT; - myTimePtr = NULL; - } else { - tsdPtr->pollState = 0; - } - - if (waitForFiles) { - /* - * Add the ThreadSpecificData structure of this thread to the list of - * ThreadSpecificData structures of all threads that are waiting on - * file events. - */ - - tsdPtr->nextPtr = waitingListPtr; - if (waitingListPtr) { - waitingListPtr->prevPtr = tsdPtr; + waitForFiles = 1; + tsdPtr->pollState = POLL_WANT; + myTimePtr = NULL; + } else { + tsdPtr->pollState = 0; } - tsdPtr->prevPtr = 0; - waitingListPtr = tsdPtr; - tsdPtr->onList = 1; - - write(triggerPipe, "", 1); - } - - FD_ZERO(&(tsdPtr->readyMasks.readable)); - FD_ZERO(&(tsdPtr->readyMasks.writable)); - FD_ZERO(&(tsdPtr->readyMasks.exceptional)); - if (!tsdPtr->eventReady) { - Tcl_ConditionWait(&tsdPtr->waitCV, ¬ifierMutex, myTimePtr); - } - tsdPtr->eventReady = 0; + if (waitForFiles) { + /* + * Add the ThreadSpecificData structure of this thread to the list + * of ThreadSpecificData structures of all threads that are waiting + * on file events. + */ - if (waitForFiles && tsdPtr->onList) { - /* - * Remove the ThreadSpecificData structure of this thread from the - * waiting list. Alert the notifier thread to recompute its select - * masks - skipping this caused a hang when trying to close a pipe - * which the notifier thread was still doing a select on. - */ + tsdPtr->nextPtr = waitingListPtr; + if (waitingListPtr) { + waitingListPtr->prevPtr = tsdPtr; + } + tsdPtr->prevPtr = 0; + waitingListPtr = tsdPtr; + tsdPtr->onList = 1; - if (tsdPtr->prevPtr) { - tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; - } else { - waitingListPtr = tsdPtr->nextPtr; + write(triggerPipe, "", 1); } - if (tsdPtr->nextPtr) { - tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; - } - tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; - tsdPtr->onList = 0; - write(triggerPipe, "", 1); - } - -#else - tsdPtr->readyMasks = tsdPtr->checkMasks; - numFound = select(tsdPtr->numFdBits, &(tsdPtr->readyMasks.readable), - &(tsdPtr->readyMasks.writable), &(tsdPtr->readyMasks.exceptional), - timeoutPtr); - - /* - * Some systems don't clear the masks after an error, so we have to do it - * here. - */ - if (numFound == -1) { FD_ZERO(&(tsdPtr->readyMasks.readable)); FD_ZERO(&(tsdPtr->readyMasks.writable)); FD_ZERO(&(tsdPtr->readyMasks.exceptional)); - } -#endif /* TCL_THREADS */ - /* - * Queue all detected file events before returning. - */ + if (!tsdPtr->eventReady) { + Tcl_ConditionWait(&tsdPtr->waitCV, ¬ifierMutex, myTimePtr); + } + tsdPtr->eventReady = 0; - for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); - filePtr = filePtr->nextPtr) { + if (waitForFiles && tsdPtr->onList) { + /* + * Remove the ThreadSpecificData structure of this thread from the + * waiting list. Alert the notifier thread to recompute its select + * masks - skipping this caused a hang when trying to close a pipe + * which the notifier thread was still doing a select on. + */ - mask = 0; - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.readable))) { - mask |= TCL_READABLE; - } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.writable))) { - mask |= TCL_WRITABLE; - } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.exceptional))) { - mask |= TCL_EXCEPTION; + if (tsdPtr->prevPtr) { + tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; + } else { + waitingListPtr = tsdPtr->nextPtr; + } + if (tsdPtr->nextPtr) { + tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; + } + tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; + tsdPtr->onList = 0; + write(triggerPipe, "", 1); } - if (!mask) { - continue; +#else + tsdPtr->readyMasks = tsdPtr->checkMasks; + numFound = select(tsdPtr->numFdBits, &(tsdPtr->readyMasks.readable), + &(tsdPtr->readyMasks.writable), + &(tsdPtr->readyMasks.exceptional), timeoutPtr); + + /* + * Some systems don't clear the masks after an error, so we have to do + * it here. + */ + + if (numFound == -1) { + FD_ZERO(&(tsdPtr->readyMasks.readable)); + FD_ZERO(&(tsdPtr->readyMasks.writable)); + FD_ZERO(&(tsdPtr->readyMasks.exceptional)); } +#endif /* TCL_THREADS */ /* - * Don't bother to queue an event if the mask was previously non-zero - * since an event must still be on the queue. + * Queue all detected file events before returning. */ - if (filePtr->readyMask == 0) { - fileEvPtr = (FileHandlerEvent *) ckalloc(sizeof(FileHandlerEvent)); - fileEvPtr->header.proc = FileHandlerEventProc; - fileEvPtr->fd = filePtr->fd; - Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); + for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); + filePtr = filePtr->nextPtr) { + + mask = 0; + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.readable))) { + mask |= TCL_READABLE; + } + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.writable))) { + mask |= TCL_WRITABLE; + } + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.exceptional))) { + mask |= TCL_EXCEPTION; + } + + if (!mask) { + continue; + } + + /* + * Don't bother to queue an event if the mask was previously + * non-zero since an event must still be on the queue. + */ + + if (filePtr->readyMask == 0) { + fileEvPtr = (FileHandlerEvent *) + ckalloc(sizeof(FileHandlerEvent)); + fileEvPtr->header.proc = FileHandlerEventProc; + fileEvPtr->fd = filePtr->fd; + Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); + } + filePtr->readyMask = mask; } - filePtr->readyMask = mask; - } #ifdef TCL_THREADS - Tcl_MutexUnlock(¬ifierMutex); + Tcl_MutexUnlock(¬ifierMutex); #endif /* TCL_THREADS */ - return 0; + return 0; + } } #ifdef TCL_THREADS diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index d1cbf74..5f2365d 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.21 2005/11/04 00:06:50 dkf Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.22 2008/04/16 14:29:26 das Exp $ */ #include "tclInt.h" @@ -44,9 +44,6 @@ typedef struct ThreadSpecificData { static Tcl_ThreadDataKey dataKey; -extern TclStubs tclStubs; -extern Tcl_NotifierProcs tclOriginalNotifier; - /* * The following static indicates the number of threads that have initialized * notifiers. It controls the lifetime of the TclNotifier window class. @@ -83,45 +80,49 @@ static LRESULT CALLBACK NotifierProc(HWND hwnd, UINT message, ClientData Tcl_InitNotifier(void) { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - WNDCLASS class; + if (tclNotifierHooks.initNotifierProc) { + return tclNotifierHooks.initNotifierProc(); + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + WNDCLASS class; - /* - * Register Notifier window class if this is the first thread to use this - * module. - */ + /* + * Register Notifier window class if this is the first thread to use + * this module. + */ - Tcl_MutexLock(¬ifierMutex); - if (notifierCount == 0) { - class.style = 0; - class.cbClsExtra = 0; - class.cbWndExtra = 0; - class.hInstance = TclWinGetTclInstance(); - class.hbrBackground = NULL; - class.lpszMenuName = NULL; - class.lpszClassName = "TclNotifier"; - class.lpfnWndProc = NotifierProc; - class.hIcon = NULL; - class.hCursor = NULL; - - if (!RegisterClassA(&class)) { - Tcl_Panic("Unable to register TclNotifier window class"); + Tcl_MutexLock(¬ifierMutex); + if (notifierCount == 0) { + class.style = 0; + class.cbClsExtra = 0; + class.cbWndExtra = 0; + class.hInstance = TclWinGetTclInstance(); + class.hbrBackground = NULL; + class.lpszMenuName = NULL; + class.lpszClassName = "TclNotifier"; + class.lpfnWndProc = NotifierProc; + class.hIcon = NULL; + class.hCursor = NULL; + + if (!RegisterClassA(&class)) { + Tcl_Panic("Unable to register TclNotifier window class"); + } } - } - notifierCount++; - Tcl_MutexUnlock(¬ifierMutex); + notifierCount++; + Tcl_MutexUnlock(¬ifierMutex); - tsdPtr->pending = 0; - tsdPtr->timerActive = 0; + tsdPtr->pending = 0; + tsdPtr->timerActive = 0; - InitializeCriticalSection(&tsdPtr->crit); + InitializeCriticalSection(&tsdPtr->crit); - tsdPtr->hwnd = NULL; - tsdPtr->thread = GetCurrentThreadId(); - tsdPtr->event = CreateEvent(NULL, TRUE /* manual */, - FALSE /* !signaled */, NULL); + tsdPtr->hwnd = NULL; + tsdPtr->thread = GetCurrentThreadId(); + tsdPtr->event = CreateEvent(NULL, TRUE /* manual */, + FALSE /* !signaled */, NULL); - return (ClientData) tsdPtr; + return (ClientData) tsdPtr; + } } /* @@ -145,46 +146,51 @@ void Tcl_FinalizeNotifier( ClientData clientData) /* Pointer to notifier data. */ { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; + if (tclNotifierHooks.finalizeNotifierProc) { + tclNotifierHooks.finalizeNotifierProc(clientData); + return; + } else { + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; - /* - * Only finalize the notifier if a notifier was installed in the current - * thread; there is a route in which this is not guaranteed to be true - * (when tclWin32Dll.c:DllMain() is called with the flag - * DLL_PROCESS_DETACH by the OS, which could be doing so from a thread - * that's never previously been involved with Tcl, e.g. the task manager) - * so this check is important. - * - * Fixes Bug #217982 reported by Hugh Vu and Gene Leache. - */ + /* + * Only finalize the notifier if a notifier was installed in the + * current thread; there is a route in which this is not guaranteed to + * be true (when tclWin32Dll.c:DllMain() is called with the flag + * DLL_PROCESS_DETACH by the OS, which could be doing so from a thread + * that's never previously been involved with Tcl, e.g. the task + * manager) so this check is important. + * + * Fixes Bug #217982 reported by Hugh Vu and Gene Leache. + */ - if (tsdPtr == NULL) { - return; - } + if (tsdPtr == NULL) { + return; + } - DeleteCriticalSection(&tsdPtr->crit); - CloseHandle(tsdPtr->event); + DeleteCriticalSection(&tsdPtr->crit); + CloseHandle(tsdPtr->event); - /* - * Clean up the timer and messaging window for this thread. - */ + /* + * Clean up the timer and messaging window for this thread. + */ - if (tsdPtr->hwnd) { - KillTimer(tsdPtr->hwnd, INTERVAL_TIMER); - DestroyWindow(tsdPtr->hwnd); - } + if (tsdPtr->hwnd) { + KillTimer(tsdPtr->hwnd, INTERVAL_TIMER); + DestroyWindow(tsdPtr->hwnd); + } - /* - * If this is the last thread to use the notifier, unregister the notifier - * window class. - */ + /* + * If this is the last thread to use the notifier, unregister the + * notifier window class. + */ - Tcl_MutexLock(¬ifierMutex); - notifierCount--; - if (notifierCount == 0) { - UnregisterClassA("TclNotifier", TclWinGetTclInstance()); + Tcl_MutexLock(¬ifierMutex); + notifierCount--; + if (notifierCount == 0) { + UnregisterClassA("TclNotifier", TclWinGetTclInstance()); + } + Tcl_MutexUnlock(¬ifierMutex); } - Tcl_MutexUnlock(¬ifierMutex); } /* @@ -213,27 +219,32 @@ void Tcl_AlertNotifier( ClientData clientData) /* Pointer to thread data. */ { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; - - /* - * Note that we do not need to lock around access to the hwnd because the - * race condition has no effect since any race condition implies that the - * notifier thread is already awake. - */ + if (tclNotifierHooks.alertNotifierProc) { + tclNotifierHooks.alertNotifierProc(clientData); + return; + } else { + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; - if (tsdPtr->hwnd) { /* - * We do need to lock around access to the pending flag. + * Note that we do not need to lock around access to the hwnd because + * the race condition has no effect since any race condition implies + * that the notifier thread is already awake. */ - EnterCriticalSection(&tsdPtr->crit); - if (!tsdPtr->pending) { - PostMessage(tsdPtr->hwnd, WM_WAKEUP, 0, 0); + if (tsdPtr->hwnd) { + /* + * We do need to lock around access to the pending flag. + */ + + EnterCriticalSection(&tsdPtr->crit); + if (!tsdPtr->pending) { + PostMessage(tsdPtr->hwnd, WM_WAKEUP, 0, 0); + } + tsdPtr->pending = 1; + LeaveCriticalSection(&tsdPtr->crit); + } else { + SetEvent(tsdPtr->event); } - tsdPtr->pending = 1; - LeaveCriticalSection(&tsdPtr->crit); - } else { - SetEvent(tsdPtr->event); } } @@ -259,50 +270,45 @@ void Tcl_SetTimer( Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - UINT timeout; - - /* - * Allow the notifier to be hooked. This may not make sense on Windows, - * but mirrors the UNIX hook. - */ - - if (tclStubs.tcl_SetTimer != tclOriginalNotifier.setTimerProc) { - tclStubs.tcl_SetTimer(timePtr); - return; - } - - /* - * We only need to set up an interval timer if we're being called from an - * external event loop. If we don't have a window handle then we just - * return immediately and let Tcl_WaitForEvent handle timeouts. - */ - - if (!tsdPtr->hwnd) { + if (tclNotifierHooks.setTimerProc) { + tclNotifierHooks.setTimerProc(timePtr); return; - } - - if (!timePtr) { - timeout = 0; } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + UINT timeout; + /* - * Make sure we pass a non-zero value into the timeout argument. - * Windows seems to get confused by zero length timers. + * We only need to set up an interval timer if we're being called from + * an external event loop. If we don't have a window handle then we + * just return immediately and let Tcl_WaitForEvent handle timeouts. */ - timeout = timePtr->sec * 1000 + timePtr->usec / 1000; - if (timeout == 0) { - timeout = 1; + if (!tsdPtr->hwnd) { + return; + } + + if (!timePtr) { + timeout = 0; + } else { + /* + * Make sure we pass a non-zero value into the timeout argument. + * Windows seems to get confused by zero length timers. + */ + + timeout = timePtr->sec * 1000 + timePtr->usec / 1000; + if (timeout == 0) { + timeout = 1; + } + } + tsdPtr->timeout = timeout; + if (timeout != 0) { + tsdPtr->timerActive = 1; + SetTimer(tsdPtr->hwnd, INTERVAL_TIMER, + (unsigned long) tsdPtr->timeout, NULL); + } else { + tsdPtr->timerActive = 0; + KillTimer(tsdPtr->hwnd, INTERVAL_TIMER); } - } - tsdPtr->timeout = timeout; - if (timeout != 0) { - tsdPtr->timerActive = 1; - SetTimer(tsdPtr->hwnd, INTERVAL_TIMER, (unsigned long) tsdPtr->timeout, - NULL); - } else { - tsdPtr->timerActive = 0; - KillTimer(tsdPtr->hwnd, INTERVAL_TIMER); } } @@ -328,29 +334,36 @@ Tcl_ServiceModeHook( int mode) /* Either TCL_SERVICE_ALL, or * TCL_SERVICE_NONE. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - - /* - * If this is the first time that the notifier has been used from a modal - * loop, then create a communication window. Note that after this point, - * the application needs to service events in a timely fashion or Windows - * will hang waiting for the window to respond to synchronous system - * messages. At some point, we may want to consider destroying the window - * if we leave the modal loop, but for now we'll leave it around. - */ - - if (mode == TCL_SERVICE_ALL && !tsdPtr->hwnd) { - tsdPtr->hwnd = CreateWindowA("TclNotifier", "TclNotifier", WS_TILED, - 0, 0, 0, 0, NULL, NULL, TclWinGetTclInstance(), NULL); + if (tclNotifierHooks.serviceModeHookProc) { + tclNotifierHooks.serviceModeHookProc(mode); + return; + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); /* - * Send an initial message to the window to ensure that we wake up the - * notifier once we get into the modal loop. This will force the - * notifier to recompute the timeout value and schedule a timer if one - * is needed. + * If this is the first time that the notifier has been used from a + * modal loop, then create a communication window. Note that after this + * point, the application needs to service events in a timely fashion + * or Windows will hang waiting for the window to respond to + * synchronous system messages. At some point, we may want to consider + * destroying the window if we leave the modal loop, but for now we'll + * leave it around. */ - Tcl_AlertNotifier((ClientData)tsdPtr); + if (mode == TCL_SERVICE_ALL && !tsdPtr->hwnd) { + tsdPtr->hwnd = CreateWindowA("TclNotifier", "TclNotifier", + WS_TILED, 0, 0, 0, 0, NULL, NULL, TclWinGetTclInstance(), + NULL); + + /* + * Send an initial message to the window to ensure that we wake up + * the notifier once we get into the modal loop. This will force + * the notifier to recompute the timeout value and schedule a timer + * if one is needed. + */ + + Tcl_AlertNotifier((ClientData)tsdPtr); + } } } @@ -420,105 +433,100 @@ int Tcl_WaitForEvent( Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - MSG msg; - DWORD timeout, result; - int status; - - /* - * Allow the notifier to be hooked. This may not make sense on windows, - * but mirrors the UNIX hook. - */ - - if (tclStubs.tcl_WaitForEvent != tclOriginalNotifier.waitForEventProc) { - return tclStubs.tcl_WaitForEvent(timePtr); - } - - /* - * Compute the timeout in milliseconds. - */ + if (tclNotifierHooks.waitForEventProc) { + return tclNotifierHooks.waitForEventProc(timePtr); + } else { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + MSG msg; + DWORD timeout, result; + int status; - if (timePtr) { /* - * TIP #233 (Virtualized Time). Convert virtual domain delay to - * real-time. + * Compute the timeout in milliseconds. */ - Tcl_Time myTime; + if (timePtr) { + /* + * TIP #233 (Virtualized Time). Convert virtual domain delay to + * real-time. + */ - myTime.sec = timePtr->sec; - myTime.usec = timePtr->usec; + Tcl_Time myTime; - if (myTime.sec != 0 || myTime.usec != 0) { - (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); - } + myTime.sec = timePtr->sec; + myTime.usec = timePtr->usec; - timeout = myTime.sec * 1000 + myTime.usec / 1000; - } else { - timeout = INFINITE; - } + if (myTime.sec != 0 || myTime.usec != 0) { + (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); + } - /* - * Check to see if there are any messages in the queue before waiting - * because MsgWaitForMultipleObjects will not wake up if there are events - * currently sitting in the queue. - */ + timeout = myTime.sec * 1000 + myTime.usec / 1000; + } else { + timeout = INFINITE; + } - if (!PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { /* - * Wait for something to happen (a signal from another thread, a - * message, or timeout) or loop servicing asynchronous procedure calls - * queued to this thread. + * Check to see if there are any messages in the queue before waiting + * because MsgWaitForMultipleObjects will not wake up if there are + * events currently sitting in the queue. */ - again: - result = MsgWaitForMultipleObjectsEx(1, &tsdPtr->event, timeout, - QS_ALLINPUT, MWMO_ALERTABLE); - if (result == WAIT_IO_COMPLETION) { - goto again; - } else if (result == WAIT_FAILED) { - status = -1; - goto end; - } - } + if (!PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { + /* + * Wait for something to happen (a signal from another thread, a + * message, or timeout) or loop servicing asynchronous procedure + * calls queued to this thread. + */ - /* - * Check to see if there are any messages to process. - */ + again: + result = MsgWaitForMultipleObjectsEx(1, &tsdPtr->event, timeout, + QS_ALLINPUT, MWMO_ALERTABLE); + if (result == WAIT_IO_COMPLETION) { + goto again; + } else if (result == WAIT_FAILED) { + status = -1; + goto end; + } + } - if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { /* - * Retrieve and dispatch the first message. + * Check to see if there are any messages to process. */ - result = GetMessage(&msg, NULL, 0, 0); - if (result == 0) { - /* - * We received a request to exit this thread (WM_QUIT), so - * propagate the quit message and start unwinding. - */ - - PostQuitMessage((int) msg.wParam); - status = -1; - } else if (result == -1) { + if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { /* - * We got an error from the system. I have no idea why this would - * happen, so we'll just unwind. + * Retrieve and dispatch the first message. */ - status = -1; + result = GetMessage(&msg, NULL, 0, 0); + if (result == 0) { + /* + * We received a request to exit this thread (WM_QUIT), so + * propagate the quit message and start unwinding. + */ + + PostQuitMessage((int) msg.wParam); + status = -1; + } else if (result == -1) { + /* + * We got an error from the system. I have no idea why this + * would happen, so we'll just unwind. + */ + + status = -1; + } else { + TranslateMessage(&msg); + DispatchMessage(&msg); + status = 1; + } } else { - TranslateMessage(&msg); - DispatchMessage(&msg); - status = 1; + status = 0; } - } else { - status = 0; - } - end: - ResetEvent(tsdPtr->event); - return status; + end: + ResetEvent(tsdPtr->event); + return status; + } } /* -- cgit v0.12 From afd0f9b3f6990bb1d44b22b117df3fbb4a535a85 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 16 Apr 2008 14:49:28 +0000 Subject: * generic/tclInt.h: make stubs tables 'static const' and * generic/tclStubInit.c: export only module-scope pointers to * generic/tclStubLib.c: the main stubs tables (for package * tools/genStubs.tcl: initialization). [Patch 1938497] * generic/tclBasic.c (Tcl_CreateInterp): * generic/tclTomMathInterface.c (TclTommath_Init): --- ChangeLog | 7 +++++++ generic/tclBasic.c | 9 +++++---- generic/tclInt.h | 5 +++-- generic/tclStubInit.c | 29 +++++++++++++++++------------ generic/tclStubLib.c | 4 ++-- generic/tclTomMathInterface.c | 6 +++--- tools/genStubs.tcl | 4 ++-- 7 files changed, 39 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b2270f..baf04cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-04-16 Daniel Steffen + * generic/tclInt.h: make stubs tables 'static const' and + * generic/tclStubInit.c: export only module-scope pointers to + * generic/tclStubLib.c: the main stubs tables (for package + * tools/genStubs.tcl: initialization). [Patch 1938497] + * generic/tclBasic.c (Tcl_CreateInterp): + * generic/tclTomMathInterface.c (TclTommath_Init): + * generic/tclInt.h: revise Tcl_SetNotifier() to use a * generic/tclNotify.c: module-scope hooks table instead of * generic/tclStubInit.c: runtime stubs-table modification; diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 87b251f..8e46a77 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.296 2008/04/01 16:23:40 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.297 2008/04/16 14:49:28 das Exp $ */ #include "tclInt.h" @@ -98,7 +98,7 @@ static int DTraceObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); #endif -extern TclStubs tclStubs; +MODULE_SCOPE const TclStubs * const tclConstStubsPtr; /* * The following structure define the commands in the Tcl core. @@ -582,7 +582,7 @@ Tcl_CreateInterp(void) * Initialise the stub table pointer. */ - iPtr->stubTable = &tclStubs; + iPtr->stubTable = tclConstStubsPtr; /* * Initialize the ensemble error message rewriting support. @@ -808,7 +808,8 @@ Tcl_CreateInterp(void) * TIP #268: Full patchlevel instead of just major.minor */ - Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs); + Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, + (ClientData) tclConstStubsPtr); if (TclTommath_Init(interp) != TCL_OK) { Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); diff --git a/generic/tclInt.h b/generic/tclInt.h index 7af390d..f2a125b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.364 2008/04/16 14:29:25 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.365 2008/04/16 14:49:29 das Exp $ */ #ifndef _TCLINT @@ -1605,7 +1605,8 @@ typedef struct Interp { int errorLine; /* When TCL_ERROR is returned, this gives the * line number in the command where the error * occurred (1 means first line). */ - struct TclStubs *stubTable; /* Pointer to the exported Tcl stub table. On + const struct TclStubs *stubTable; + /* Pointer to the exported Tcl stub table. On * previous versions of Tcl this is a pointer * to the objResultPtr or a pointer to a * buckets array in a hash table. We therefore diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f3b87e1..463eb55 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.152 2008/04/16 14:29:26 das Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.153 2008/04/16 14:49:29 das Exp $ */ #include "tclInt.h" @@ -34,12 +34,6 @@ #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry -MODULE_SCOPE TclIntStubs tclIntStubs; -MODULE_SCOPE TclIntPlatStubs tclIntPlatStubs; -MODULE_SCOPE TclPlatStubs tclPlatStubs; -MODULE_SCOPE TclStubs tclStubs; -MODULE_SCOPE TclTomMathStubs tclTomMathStubs; - /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations @@ -48,7 +42,7 @@ MODULE_SCOPE TclTomMathStubs tclTomMathStubs; /* !BEGIN!: Do not edit below this line. */ -TclIntStubs tclIntStubs = { +static const TclIntStubs tclIntStubs = { TCL_STUB_MAGIC, NULL, NULL, /* 0 */ @@ -314,7 +308,7 @@ TclIntStubs tclIntStubs = { TclBackgroundException, /* 236 */ }; -TclIntPlatStubs tclIntPlatStubs = { +static const TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ @@ -389,7 +383,7 @@ TclIntPlatStubs tclIntPlatStubs = { #endif /* MACOSX */ }; -TclPlatStubs tclPlatStubs = { +static const TclPlatStubs tclPlatStubs = { TCL_STUB_MAGIC, NULL, #ifdef __WIN32__ /* WIN */ @@ -402,7 +396,7 @@ TclPlatStubs tclPlatStubs = { #endif /* MACOSX */ }; -TclTomMathStubs tclTomMathStubs = { +static const TclTomMathStubs tclTomMathStubs = { TCL_STUB_MAGIC, NULL, TclBN_epoch, /* 0 */ @@ -474,7 +468,7 @@ static const TclStubHooks tclStubHooks = { &tclIntPlatStubs }; -TclStubs tclStubs = { +static const TclStubs tclStubs = { TCL_STUB_MAGIC, &tclStubHooks, Tcl_PkgProvideEx, /* 0 */ @@ -1108,3 +1102,14 @@ TclStubs tclStubs = { }; /* !END!: Do not edit above this line. */ + +/* + * Module-scope pointers to the main static stubs tables, used for package + * initialization via Tcl_PkgProvideEx(). + */ + +MODULE_SCOPE const TclStubs * const tclConstStubsPtr; +MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; + +const TclStubs * const tclConstStubsPtr = &tclStubs; +const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index a724a09..81e82d7 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.24 2008/04/02 21:29:05 das Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.25 2008/04/16 14:49:29 das Exp $ */ /* @@ -36,7 +36,7 @@ const TclIntStubs *tclIntStubsPtr = NULL; const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; const TclTomMathStubs* tclTomMathStubsPtr = NULL; -static TclStubs * +static const TclStubs * HasStubSupport( Tcl_Interp *interp) { diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index 6e52245..ddd5908 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -11,14 +11,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathInterface.c,v 1.10 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclTomMathInterface.c,v 1.11 2008/04/16 14:49:29 das Exp $ */ #include "tclInt.h" #include "tommath.h" #include -extern TclTomMathStubs tclTomMathStubs; +MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; /* *---------------------------------------------------------------------- @@ -45,7 +45,7 @@ TclTommath_Init( /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvideEx(interp, "tcl::tommath", TCL_PATCH_LEVEL, - (ClientData)&tclTomMathStubs) != TCL_OK) { + (ClientData) tclTomMathConstStubsPtr) != TCL_OK) { return TCL_ERROR; } return TCL_OK; diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index ab5ebbc..ec70115 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.25 2008/04/08 14:52:45 das Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.26 2008/04/16 14:49:29 das Exp $ package require Tcl 8.4 @@ -1056,7 +1056,7 @@ proc genStubs::emitInit {name textVar} { } append text "\n\};\n" } - append text "\n${capName}Stubs ${name}Stubs = \{\n" + append text "\nstatic const ${capName}Stubs ${name}Stubs = \{\n" append text " TCL_STUB_MAGIC,\n" if {[info exists hooks($name)]} { append text " &${name}StubHooks,\n" -- cgit v0.12 From 16b1064d1e130344d2de6f3a3d4ff9152fa97407 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 18 Apr 2008 14:21:34 +0000 Subject: Fix typo spotted by Steve Havelka --- doc/Namespace.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Namespace.3 b/doc/Namespace.3 index 7bc77f4..a82248e 100644 --- a/doc/Namespace.3 +++ b/doc/Namespace.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Namespace.3,v 1.8 2006/02/01 18:27:43 dgp Exp $ +'\" RCS: @(#) $Id: Namespace.3,v 1.9 2008/04/18 14:21:34 dkf Exp $ '\" '\" Note that some of these functions do not seem to belong, but they '\" were all introduced with the same TIP (#139) @@ -13,7 +13,7 @@ .TH Tcl_Namespace 3 8.5 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_AppendExportList, Tcl_CreateNamespace, Tcl_DeleteNamespace, Tcl_Export, Tcl_FindCommand, Tcl_FindNamespace, Tcl_ForgetImport, Tcl_GetCurrentNamespace, Tcl_GetGloblaNamespace, Tcl_GetNamespaceUnknownHandler, Tcl_Import, Tcl_SetNamespaceUnknownHandler \- manipulate namespaces +Tcl_AppendExportList, Tcl_CreateNamespace, Tcl_DeleteNamespace, Tcl_Export, Tcl_FindCommand, Tcl_FindNamespace, Tcl_ForgetImport, Tcl_GetCurrentNamespace, Tcl_GetGlobalNamespace, Tcl_GetNamespaceUnknownHandler, Tcl_Import, Tcl_SetNamespaceUnknownHandler \- manipulate namespaces .SH SYNOPSIS .nf \fB#include \fR -- cgit v0.12 From 6cc4448de75c882ff2f8c5eb1c28e4bb54e3cc13 Mon Sep 17 00:00:00 2001 From: mdejong Date: Sat, 19 Apr 2008 02:04:34 +0000 Subject: note that cygwin is not supported --- win/README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/win/README b/win/README index e978305..56ab134 100644 --- a/win/README +++ b/win/README @@ -1,6 +1,6 @@ Tcl 8.6 for Windows -RCS: @(#) $Id: README,v 1.38 2008/04/01 16:23:45 dgp Exp $ +RCS: @(#) $Id: README,v 1.39 2008/04/19 02:04:34 mdejong Exp $ 1. Introduction --------------- @@ -41,6 +41,9 @@ In order to compile Tcl for Windows, you need the following: the msys shell, you then run the configure script in the tcl/win directory. + Please note that building under Cygwin is NOT supported, + do not file a bug report about building under Cygwin. + In practice, this release is built with Visual C++ 6.0 and the TEA Makefile. -- cgit v0.12 From 1829cc0665068c6129b9bd0bfbc1f7a3b53c1ab0 Mon Sep 17 00:00:00 2001 From: georgeps Date: Sun, 20 Apr 2008 02:52:28 +0000 Subject: doc/Ensemble.3: Fix a typo: s/defiend/defined/ Thanks to hat0 for spotting this. --- ChangeLog | 6 ++++++ doc/Ensemble.3 | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index baf04cb..aeb57e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-19 George Peter Staplin + + * doc/Ensemble.3: Fix a typo: s/defiend/defined/ + Thanks to hat0 for spotting this. + + 2008-04-16 Daniel Steffen * generic/tclInt.h: make stubs tables 'static const' and diff --git a/doc/Ensemble.3 b/doc/Ensemble.3 index eb7c54a..5fbdea1 100644 --- a/doc/Ensemble.3 +++ b/doc/Ensemble.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Ensemble.3,v 1.5 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Ensemble.3,v 1.6 2008/04/20 02:52:29 georgeps Exp $ '\" '\" This documents the C API introduced in TIP#235 '\" @@ -92,7 +92,7 @@ A list value to use for the defined list of subcommands in the dictionary or the unknown subcommmand handler command prefix. May be NULL if the subcommand list or unknown handler are to be removed. .AP Tcl_Obj **listObjPtr out -Pointer to a variable into which to write the current defiend list of +Pointer to a variable into which to write the current defined list of subcommands or the current unknown handler prefix. .AP Tcl_Namespace **namespacePtrPtr out Pointer to a variable into which to write the handle of the namespace -- cgit v0.12 From 7346f5c47fd9b46f12a26714b5dde16148a5b932 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 21 Apr 2008 16:26:36 +0000 Subject: * generic/tclIOUtil.c: Removed all code delimited by * generic/tclTest.c: USE_OBSOLETE_FS_HOOKS, completing * tests/ioCmd.test: the deprecation path for these * tests/ioUtil.test (removed): obsolete interfaces. (Code was active in Tcl 8.4, present but enabled only by customized compile switch in Tcl 8.5, and now completely gone for Tcl 8.6). Also removed all tests relevant only to the removed interfaces. --- ChangeLog | 11 +- generic/tclIOUtil.c | 492 +---------------------------------------------- generic/tclTest.c | 536 +--------------------------------------------------- tests/ioCmd.test | 23 ++- tests/ioUtil.test | 333 -------------------------------- 5 files changed, 34 insertions(+), 1361 deletions(-) delete mode 100644 tests/ioUtil.test diff --git a/ChangeLog b/ChangeLog index aeb57e6..cc7b769 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,18 @@ +2008-04-21 Don Porter + + * generic/tclIOUtil.c: Removed all code delimited by + * generic/tclTest.c: USE_OBSOLETE_FS_HOOKS, completing + * tests/ioCmd.test: the deprecation path for these + * tests/ioUtil.test (removed): obsolete interfaces. (Code was active + in Tcl 8.4, present but enabled only by customized compile switch in + Tcl 8.5, and now completely gone for Tcl 8.6). Also removed all tests + relevant only to the removed interfaces. + 2008-04-19 George Peter Staplin * doc/Ensemble.3: Fix a typo: s/defiend/defined/ Thanks to hat0 for spotting this. - 2008-04-16 Daniel Steffen * generic/tclInt.h: make stubs tables 'static const' and diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 745ba6b..778eaa6 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.151 2008/02/27 03:35:49 jenglish Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.152 2008/04/21 16:26:37 dgp Exp $ */ #include "tclInt.h" @@ -245,56 +245,7 @@ Tcl_EvalFile( * support, I suggest all these hooks are removed. */ -#undef USE_OBSOLETE_FS_HOOKS -#ifdef USE_OBSOLETE_FS_HOOKS - -/* - * The following typedef declarations allow for hooking into the chain of - * functions maintained for 'Tcl_Stat(...)', 'Tcl_Access(...)' & - * 'Tcl_OpenFileChannel(...)'. Basically for each hookable function a linked - * list is defined. - */ - -typedef struct StatProc { - TclStatProc_ *proc; /* Function to process a 'stat()' call */ - struct StatProc *nextPtr; /* The next 'stat()' function to call */ -} StatProc; - -typedef struct AccessProc { - TclAccessProc_ *proc; /* Function to process a 'access()' call */ - struct AccessProc *nextPtr; /* The next 'access()' function to call */ -} AccessProc; - -typedef struct OpenFileChannelProc { - TclOpenFileChannelProc_ *proc; - /* Function to process a - * 'Tcl_OpenFileChannel()' call */ - struct OpenFileChannelProc *nextPtr; - /* The next 'Tcl_OpenFileChannel()' function - * to call */ -} OpenFileChannelProc; - -/* - * For each type of (obsolete) hookable function, a static node is declared to - * hold the function pointer for the "built-in" routine (e.g. 'TclpStat(...)') - * and the respective list is initialized as a pointer to that node. - * - * The "delete" functions (e.g. 'TclStatDeleteProc(...)') ensure that these - * statically declared list entry cannot be inadvertently removed. - * - * This method avoids the need to call any sort of "initialization" function. - * - * All three lists are protected by a global obsoleteFsHookMutex. - */ - -static StatProc *statProcList = NULL; -static AccessProc *accessProcList = NULL; -static OpenFileChannelProc *openFileChannelProcList = NULL; - -TCL_DECLARE_MUTEX(obsoleteFsHookMutex) - -#endif /* USE_OBSOLETE_FS_HOOKS */ /* * Declare the native filesystem support. These functions should be considered @@ -814,11 +765,6 @@ TclFinalizeFilesystem(void) * filesystem is likely to fail. */ -#ifdef USE_OBSOLETE_FS_HOOKS - statProcList = NULL; - accessProcList = NULL; - openFileChannelProcList = NULL; -#endif #ifdef __WIN32__ TclWinEncodingsCleanup(); #endif @@ -1959,62 +1905,6 @@ Tcl_FSStat( Tcl_StatBuf *buf) /* Filled with results of stat call. */ { const Tcl_Filesystem *fsPtr; -#ifdef USE_OBSOLETE_FS_HOOKS - struct stat oldStyleStatBuffer; - int retVal = -1; - - /* - * Call each of the "stat" function in succession. A non-return value of - * -1 indicates the particular function has succeeded. - */ - - Tcl_MutexLock(&obsoleteFsHookMutex); - - if (statProcList != NULL) { - StatProc *statProcPtr; - char *path; - Tcl_Obj *transPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr); - if (transPtr == NULL) { - path = NULL; - } else { - path = Tcl_GetString(transPtr); - } - - statProcPtr = statProcList; - while ((retVal == -1) && (statProcPtr != NULL)) { - retVal = (*statProcPtr->proc)(path, &oldStyleStatBuffer); - statProcPtr = statProcPtr->nextPtr; - } - if (transPtr != NULL) { - Tcl_DecrRefCount(transPtr); - } - } - - Tcl_MutexUnlock(&obsoleteFsHookMutex); - if (retVal != -1) { - /* - * Note that EOVERFLOW is not a problem here, and these assignments - * should all be widening (if not identity.) - */ - - buf->st_mode = oldStyleStatBuffer.st_mode; - buf->st_ino = oldStyleStatBuffer.st_ino; - buf->st_dev = oldStyleStatBuffer.st_dev; - buf->st_rdev = oldStyleStatBuffer.st_rdev; - buf->st_nlink = oldStyleStatBuffer.st_nlink; - buf->st_uid = oldStyleStatBuffer.st_uid; - buf->st_gid = oldStyleStatBuffer.st_gid; - buf->st_size = Tcl_LongAsWide(oldStyleStatBuffer.st_size); - buf->st_atime = oldStyleStatBuffer.st_atime; - buf->st_mtime = oldStyleStatBuffer.st_mtime; - buf->st_ctime = oldStyleStatBuffer.st_ctime; -#ifdef HAVE_ST_BLOCKS - buf->st_blksize = oldStyleStatBuffer.st_blksize; - buf->st_blocks = Tcl_LongAsWide(oldStyleStatBuffer.st_blocks); -#endif - return retVal; - } -#endif /* USE_OBSOLETE_FS_HOOKS */ fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); if (fsPtr != NULL) { @@ -2090,41 +1980,6 @@ Tcl_FSAccess( int mode) /* Permission setting. */ { const Tcl_Filesystem *fsPtr; -#ifdef USE_OBSOLETE_FS_HOOKS - int retVal = -1; - - /* - * Call each of the "access" function in succession. A non-return value of - * -1 indicates the particular function has succeeded. - */ - - Tcl_MutexLock(&obsoleteFsHookMutex); - - if (accessProcList != NULL) { - AccessProc *accessProcPtr; - char *path; - Tcl_Obj *transPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr); - if (transPtr == NULL) { - path = NULL; - } else { - path = Tcl_GetString(transPtr); - } - - accessProcPtr = accessProcList; - while ((retVal == -1) && (accessProcPtr != NULL)) { - retVal = (*accessProcPtr->proc)(path, mode); - accessProcPtr = accessProcPtr->nextPtr; - } - if (transPtr != NULL) { - Tcl_DecrRefCount(transPtr); - } - } - - Tcl_MutexUnlock(&obsoleteFsHookMutex); - if (retVal != -1) { - return retVal; - } -#endif /* USE_OBSOLETE_FS_HOOKS */ fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); if (fsPtr != NULL) { @@ -2169,40 +2024,6 @@ Tcl_FSOpenFileChannel( const Tcl_Filesystem *fsPtr; Tcl_Channel retVal = NULL; -#ifdef USE_OBSOLETE_FS_HOOKS - /* - * Call each of the "Tcl_OpenFileChannel" functions in succession. A - * non-NULL return value indicates the particular function has succeeded. - */ - - Tcl_MutexLock(&obsoleteFsHookMutex); - if (openFileChannelProcList != NULL) { - OpenFileChannelProc *openFileChannelProcPtr; - char *path; - Tcl_Obj *transPtr = Tcl_FSGetTranslatedPath(interp, pathPtr); - - if (transPtr == NULL) { - path = NULL; - } else { - path = Tcl_GetString(transPtr); - } - - openFileChannelProcPtr = openFileChannelProcList; - - while ((retVal == NULL) && (openFileChannelProcPtr != NULL)) { - retVal = (*openFileChannelProcPtr->proc)(interp, path, - modeString, permissions); - openFileChannelProcPtr = openFileChannelProcPtr->nextPtr; - } - if (transPtr != NULL) { - Tcl_DecrRefCount(transPtr); - } - } - Tcl_MutexUnlock(&obsoleteFsHookMutex); - if (retVal != NULL) { - return retVal; - } -#endif /* USE_OBSOLETE_FS_HOOKS */ /* * We need this just to ensure we return the correct error messages under @@ -4623,317 +4444,6 @@ NativeFilesystemSeparator( return Tcl_NewStringObj(separator,1); } -/* Everything from here on is contained in this obsolete ifdef */ -#ifdef USE_OBSOLETE_FS_HOOKS - -/* - *---------------------------------------------------------------------- - * - * TclStatInsertProc -- - * - * Insert the passed function pointer at the head of the list of - * functions which are used during a call to 'TclStat(...)'. The passed - * function should behave exactly like 'TclStat' when called during that - * time (see 'TclStat(...)' for more information). The function will be - * added even if it already in the list. - * - * Results: - * Normally TCL_OK; TCL_ERROR if memory for a new node in the list could - * not be allocated. - * - * Side effects: - * Memory allocated and modifies the link list for 'TclStat' functions. - * - *---------------------------------------------------------------------- - */ - -int -TclStatInsertProc( - TclStatProc_ *proc) -{ - int retVal = TCL_ERROR; - - if (proc != NULL) { - StatProc *newStatProcPtr; - - newStatProcPtr = (StatProc *)ckalloc(sizeof(StatProc)); - - if (newStatProcPtr != NULL) { - newStatProcPtr->proc = proc; - Tcl_MutexLock(&obsoleteFsHookMutex); - newStatProcPtr->nextPtr = statProcList; - statProcList = newStatProcPtr; - Tcl_MutexUnlock(&obsoleteFsHookMutex); - - retVal = TCL_OK; - } - } - - return retVal; -} - -/* - *---------------------------------------------------------------------- - * - * TclStatDeleteProc -- - * - * Removed the passed function pointer from the list of 'TclStat' - * functions. Ensures that the built-in stat function is not removable. - * - * Results: - * TCL_OK if the function pointer was successfully removed, TCL_ERROR - * otherwise. - * - * Side effects: - * Memory is deallocated and the respective list updated. - * - *---------------------------------------------------------------------- - */ - -int -TclStatDeleteProc( - TclStatProc_ *proc) -{ - int retVal = TCL_ERROR; - StatProc *tmpStatProcPtr; - StatProc *prevStatProcPtr = NULL; - - Tcl_MutexLock(&obsoleteFsHookMutex); - tmpStatProcPtr = statProcList; - - /* - * Traverse the 'statProcList' looking for the particular node whose - * 'proc' member matches 'proc' and remove that one from the list. Ensure - * that the "default" node cannot be removed. - */ - - while ((retVal == TCL_ERROR) && (tmpStatProcPtr != NULL)) { - if (tmpStatProcPtr->proc == proc) { - if (prevStatProcPtr == NULL) { - statProcList = tmpStatProcPtr->nextPtr; - } else { - prevStatProcPtr->nextPtr = tmpStatProcPtr->nextPtr; - } - - ckfree((char *)tmpStatProcPtr); - - retVal = TCL_OK; - } else { - prevStatProcPtr = tmpStatProcPtr; - tmpStatProcPtr = tmpStatProcPtr->nextPtr; - } - } - - Tcl_MutexUnlock(&obsoleteFsHookMutex); - - return retVal; -} - -/* - *---------------------------------------------------------------------- - * - * TclAccessInsertProc -- - * - * Insert the passed function pointer at the head of the list of - * functions which are used during a call to 'TclAccess(...)'. The passed - * function should behave exactly like 'TclAccess' when called during - * that time (see 'TclAccess(...)' for more information). The function - * will be added even if it already in the list. - * - * Results: - * Normally TCL_OK; TCL_ERROR if memory for a new node in the list could - * not be allocated. - * - * Side effects: - * Memory allocated and modifies the link list for 'TclAccess' functions. - * - *---------------------------------------------------------------------- - */ - -int -TclAccessInsertProc( - TclAccessProc_ *proc) -{ - int retVal = TCL_ERROR; - - if (proc != NULL) { - AccessProc *newAccessProcPtr; - - newAccessProcPtr = (AccessProc *)ckalloc(sizeof(AccessProc)); - - if (newAccessProcPtr != NULL) { - newAccessProcPtr->proc = proc; - Tcl_MutexLock(&obsoleteFsHookMutex); - newAccessProcPtr->nextPtr = accessProcList; - accessProcList = newAccessProcPtr; - Tcl_MutexUnlock(&obsoleteFsHookMutex); - - retVal = TCL_OK; - } - } - - return retVal; -} - -/* - *---------------------------------------------------------------------- - * - * TclAccessDeleteProc -- - * - * Removed the passed function pointer from the list of 'TclAccess' - * functions. Ensures that the built-in access function is not removable. - * - * Results: - * TCL_OK if the function pointer was successfully removed, TCL_ERROR - * otherwise. - * - * Side effects: - * Memory is deallocated and the respective list updated. - * - *---------------------------------------------------------------------- - */ - -int -TclAccessDeleteProc( - TclAccessProc_ *proc) -{ - int retVal = TCL_ERROR; - AccessProc *tmpAccessProcPtr; - AccessProc *prevAccessProcPtr = NULL; - - /* - * Traverse the 'accessProcList' looking for the particular node whose - * 'proc' member matches 'proc' and remove that one from the list. Ensure - * that the "default" node cannot be removed. - */ - - Tcl_MutexLock(&obsoleteFsHookMutex); - tmpAccessProcPtr = accessProcList; - while ((retVal == TCL_ERROR) && (tmpAccessProcPtr != NULL)) { - if (tmpAccessProcPtr->proc == proc) { - if (prevAccessProcPtr == NULL) { - accessProcList = tmpAccessProcPtr->nextPtr; - } else { - prevAccessProcPtr->nextPtr = tmpAccessProcPtr->nextPtr; - } - - ckfree((char *)tmpAccessProcPtr); - - retVal = TCL_OK; - } else { - prevAccessProcPtr = tmpAccessProcPtr; - tmpAccessProcPtr = tmpAccessProcPtr->nextPtr; - } - } - Tcl_MutexUnlock(&obsoleteFsHookMutex); - - return retVal; -} - -/* - *---------------------------------------------------------------------- - * - * TclOpenFileChannelInsertProc -- - * - * Insert the passed function pointer at the head of the list of - * functions which are used during a call to 'Tcl_OpenFileChannel(...)'. - * The passed function should behave exactly like 'Tcl_OpenFileChannel' - * when called during that time (see 'Tcl_OpenFileChannel(...)' for more - * information). The function will be added even if it already in the - * list. - * - * Results: - * Normally TCL_OK; TCL_ERROR if memory for a new node in the list could - * not be allocated. - * - * Side effects: - * Memory allocated and modifies the link list for 'Tcl_OpenFileChannel' - * functions. - * - *---------------------------------------------------------------------- - */ - -int -TclOpenFileChannelInsertProc( - TclOpenFileChannelProc_ *proc) -{ - int retVal = TCL_ERROR; - - if (proc != NULL) { - OpenFileChannelProc *newOpenFileChannelProcPtr; - - newOpenFileChannelProcPtr = (OpenFileChannelProc *) - ckalloc(sizeof(OpenFileChannelProc)); - - newOpenFileChannelProcPtr->proc = proc; - Tcl_MutexLock(&obsoleteFsHookMutex); - newOpenFileChannelProcPtr->nextPtr = openFileChannelProcList; - openFileChannelProcList = newOpenFileChannelProcPtr; - Tcl_MutexUnlock(&obsoleteFsHookMutex); - - retVal = TCL_OK; - } - - return retVal; -} - -/* - *---------------------------------------------------------------------- - * - * TclOpenFileChannelDeleteProc -- - * - * Removed the passed function pointer from the list of - * 'Tcl_OpenFileChannel' functions. Ensures that the built-in open file - * channel function is not removable. - * - * Results: - * TCL_OK if the function pointer was successfully removed, TCL_ERROR - * otherwise. - * - * Side effects: - * Memory is deallocated and the respective list updated. - * - *---------------------------------------------------------------------- - */ - -int -TclOpenFileChannelDeleteProc( - TclOpenFileChannelProc_ *proc) -{ - int retVal = TCL_ERROR; - OpenFileChannelProc *tmpOpenFileChannelProcPtr = openFileChannelProcList; - OpenFileChannelProc *prevOpenFileChannelProcPtr = NULL; - - /* - * Traverse the 'openFileChannelProcList' looking for the particular node - * whose 'proc' member matches 'proc' and remove that one from the list. - */ - - Tcl_MutexLock(&obsoleteFsHookMutex); - tmpOpenFileChannelProcPtr = openFileChannelProcList; - while ((retVal == TCL_ERROR) && - (tmpOpenFileChannelProcPtr != NULL)) { - if (tmpOpenFileChannelProcPtr->proc == proc) { - if (prevOpenFileChannelProcPtr == NULL) { - openFileChannelProcList = tmpOpenFileChannelProcPtr->nextPtr; - } else { - prevOpenFileChannelProcPtr->nextPtr = - tmpOpenFileChannelProcPtr->nextPtr; - } - - ckfree((char *) tmpOpenFileChannelProcPtr); - - retVal = TCL_OK; - } else { - prevOpenFileChannelProcPtr = tmpOpenFileChannelProcPtr; - tmpOpenFileChannelProcPtr = tmpOpenFileChannelProcPtr->nextPtr; - } - } - Tcl_MutexUnlock(&obsoleteFsHookMutex); - - return retVal; -} -#endif /* USE_OBSOLETE_FS_HOOKS */ /* * Local Variables: diff --git a/generic/tclTest.c b/generic/tclTest.c index 7f48903..a810a55 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.114 2008/03/14 16:32:52 rmax Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.115 2008/04/21 16:26:38 dgp Exp $ */ #define TCL_TEST @@ -202,36 +202,6 @@ static void ObjTraceDeleteProc(ClientData clientData); static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr); static void SpecialFree(char *blockPtr); static int StaticInitProc(Tcl_Interp *interp); -#undef USE_OBSOLETE_FS_HOOKS -#ifdef USE_OBSOLETE_FS_HOOKS -static int TestaccessprocCmd(ClientData dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int TestopenfilechannelprocCmd( - ClientData dummy, Tcl_Interp *interp, int argc, - const char **argv); -static int TeststatprocCmd(ClientData dummy, - Tcl_Interp *interp, int argc, const char **argv); -static int PretendTclpAccess(const char *path, int mode); -static int TestAccessProc1(const char *path, int mode); -static int TestAccessProc2(const char *path, int mode); -static int TestAccessProc3(const char *path, int mode); -static Tcl_Channel PretendTclpOpenFileChannel( - Tcl_Interp *interp, const char *fileName, - const char *modeString, int permissions); -static Tcl_Channel TestOpenFileChannelProc1( - Tcl_Interp *interp, const char *fileName, - const char *modeString, int permissions); -static Tcl_Channel TestOpenFileChannelProc2( - Tcl_Interp *interp, const char *fileName, - const char *modeString, int permissions); -static Tcl_Channel TestOpenFileChannelProc3( - Tcl_Interp *interp, const char *fileName, - const char *modeString, int permissions); -static int PretendTclpStat(const char *path, struct stat *buf); -static int TestStatProc1(const char *path, struct stat *buf); -static int TestStatProc2(const char *path, struct stat *buf); -static int TestStatProc3(const char *path, struct stat *buf); -#endif static int TestasyncCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestcmdinfoCmd(ClientData dummy, @@ -578,14 +548,6 @@ Tcltest_Init( (ClientData) 0, NULL); Tcl_CreateObjCommand(interp, "testgetindexfromobjstruct", TestGetIndexFromObjStructObjCmd, (ClientData) 0, NULL); -#ifdef USE_OBSOLETE_FS_HOOKS - Tcl_CreateCommand(interp, "testaccessproc", TestaccessprocCmd, (ClientData) 0, - NULL); - Tcl_CreateCommand(interp, "testopenfilechannelproc", - TestopenfilechannelprocCmd, (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "teststatproc", TeststatprocCmd, (ClientData) 0, - NULL); -#endif Tcl_CreateCommand(interp, "testasync", TestasyncCmd, (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testchannel", TestChannelCmd, (ClientData) 0, NULL); @@ -4981,199 +4943,6 @@ TestsaveresultFree( { freeCount++; } -#ifdef USE_OBSOLETE_FS_HOOKS - -/* - *---------------------------------------------------------------------- - * - * TeststatprocCmd -- - * - * Implements the "testTclStatProc" cmd that is used to test the - * 'TclStatInsertProc' & 'TclStatDeleteProc' C Apis. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -TeststatprocCmd( - ClientData dummy, /* Not used. */ - register Tcl_Interp *interp,/* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ -{ - TclStatProc_ *proc; - int retVal; - - if (argc != 3) { - Tcl_AppendResult(interp, "wrong # args: should be \"", - argv[0], " option arg\"", NULL); - return TCL_ERROR; - } - - if (strcmp(argv[2], "TclpStat") == 0) { - proc = PretendTclpStat; - } else if (strcmp(argv[2], "TestStatProc1") == 0) { - proc = TestStatProc1; - } else if (strcmp(argv[2], "TestStatProc2") == 0) { - proc = TestStatProc2; - } else if (strcmp(argv[2], "TestStatProc3") == 0) { - proc = TestStatProc3; - } else { - Tcl_AppendResult(interp, "bad arg \"", argv[1], "\": " - "must be TclpStat, " - "TestStatProc1, TestStatProc2, or TestStatProc3", NULL); - return TCL_ERROR; - } - - if (strcmp(argv[1], "insert") == 0) { - if (proc == PretendTclpStat) { - Tcl_AppendResult(interp, "bad arg \"", argv[1], "\": " - "must be " - "TestStatProc1, TestStatProc2, or TestStatProc3", NULL); - return TCL_ERROR; - } - retVal = TclStatInsertProc(proc); - } else if (strcmp(argv[1], "delete") == 0) { - retVal = TclStatDeleteProc(proc); - } else { - Tcl_AppendResult(interp, "bad option \"", argv[1], "\": " - "must be insert or delete", NULL); - return TCL_ERROR; - } - - if (retVal == TCL_ERROR) { - Tcl_AppendResult(interp, "\"", argv[2], "\": " - "could not be ", argv[1], "ed", NULL); - } - - return retVal; -} - -static int -PretendTclpStat( - const char *path, - struct stat *buf) -{ - int ret; - Tcl_Obj *pathPtr = Tcl_NewStringObj(path, -1); -#ifdef TCL_WIDE_INT_IS_LONG - Tcl_IncrRefCount(pathPtr); - ret = TclpObjStat(pathPtr, buf); - Tcl_DecrRefCount(pathPtr); - return ret; -#else /* TCL_WIDE_INT_IS_LONG */ - Tcl_StatBuf realBuf; - Tcl_IncrRefCount(pathPtr); - ret = TclpObjStat(pathPtr, &realBuf); - Tcl_DecrRefCount(pathPtr); - if (ret != -1) { -# define OUT_OF_RANGE(x) \ - (((Tcl_WideInt)(x)) < Tcl_LongAsWide(LONG_MIN) || \ - ((Tcl_WideInt)(x)) > Tcl_LongAsWide(LONG_MAX)) -#if defined(__GNUC__) && __GNUC__ >= 2 -/* - * Workaround gcc warning of "comparison is always false due to limited range of - * data type" in this macro by checking max type size, and when necessary ANDing - * with the complement of ULONG_MAX instead of the comparison: - */ -# define OUT_OF_URANGE(x) \ - ((((Tcl_WideUInt)(~ (__typeof__(x)) 0)) > (Tcl_WideUInt)ULONG_MAX) && \ - (((Tcl_WideUInt)(x)) & ~(Tcl_WideUInt)ULONG_MAX)) -#else -# define OUT_OF_URANGE(x) \ - (((Tcl_WideUInt)(x)) > (Tcl_WideUInt)ULONG_MAX) -#endif - - /* - * Perform the result-buffer overflow check manually. - * - * Note that ino_t/ino64_t is unsigned... - */ - - if (OUT_OF_URANGE(realBuf.st_ino) || OUT_OF_RANGE(realBuf.st_size) -# ifdef HAVE_ST_BLOCKS - || OUT_OF_RANGE(realBuf.st_blocks) -# endif - ) { -# ifdef EOVERFLOW - errno = EOVERFLOW; -# else -# ifdef EFBIG - errno = EFBIG; -# else -# error "what error should be returned for a value out of range?" -# endif -# endif - return -1; - } - -# undef OUT_OF_RANGE -# undef OUT_OF_URANGE - - /* - * Copy across all supported fields, with possible type coercions on - * those fields that change between the normal and lf64 versions of - * the stat structure (on Solaris at least.) This is slow when the - * structure sizes coincide, but that's what you get for mixing - * interfaces... - */ - - buf->st_mode = realBuf.st_mode; - buf->st_ino = (ino_t) realBuf.st_ino; - buf->st_dev = realBuf.st_dev; - buf->st_rdev = realBuf.st_rdev; - buf->st_nlink = realBuf.st_nlink; - buf->st_uid = realBuf.st_uid; - buf->st_gid = realBuf.st_gid; - buf->st_size = (off_t) realBuf.st_size; - buf->st_atime = realBuf.st_atime; - buf->st_mtime = realBuf.st_mtime; - buf->st_ctime = realBuf.st_ctime; -# ifdef HAVE_ST_BLOCKS - buf->st_blksize = realBuf.st_blksize; - buf->st_blocks = (blkcnt_t) realBuf.st_blocks; -# endif - } - return ret; -#endif /* TCL_WIDE_INT_IS_LONG */ -} - -static int -TestStatProc1( - const char *path, - struct stat *buf) -{ - memset(buf, 0, sizeof(struct stat)); - buf->st_size = 1234; - return ((strstr(path, "testStat1%.fil") == NULL) ? -1 : 0); -} - -static int -TestStatProc2( - const char *path, - struct stat *buf) -{ - memset(buf, 0, sizeof(struct stat)); - buf->st_size = 2345; - return ((strstr(path, "testStat2%.fil") == NULL) ? -1 : 0); -} - -static int -TestStatProc3( - const char *path, - struct stat *buf) -{ - memset(buf, 0, sizeof(struct stat)); - buf->st_size = 3456; - return ((strstr(path, "testStat3%.fil") == NULL) ? -1 : 0); -} -#endif /* *---------------------------------------------------------------------- @@ -5291,309 +5060,6 @@ TestexitmainloopCmd( exitMainLoop = 1; return TCL_OK; } -#ifdef USE_OBSOLETE_FS_HOOKS - -/* - *---------------------------------------------------------------------- - * - * TestaccessprocCmd -- - * - * Implements the "testTclAccessProc" cmd that is used to test the - * 'TclAccessInsertProc' & 'TclAccessDeleteProc' C Apis. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -TestaccessprocCmd( - ClientData dummy, /* Not used. */ - register Tcl_Interp *interp,/* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ -{ - TclAccessProc_ *proc; - int retVal; - - if (argc != 3) { - Tcl_AppendResult(interp, "wrong # args: should be \"", - argv[0], " option arg\"", NULL); - return TCL_ERROR; - } - - if (strcmp(argv[2], "TclpAccess") == 0) { - proc = PretendTclpAccess; - } else if (strcmp(argv[2], "TestAccessProc1") == 0) { - proc = TestAccessProc1; - } else if (strcmp(argv[2], "TestAccessProc2") == 0) { - proc = TestAccessProc2; - } else if (strcmp(argv[2], "TestAccessProc3") == 0) { - proc = TestAccessProc3; - } else { - Tcl_AppendResult(interp, "bad arg \"", argv[1], "\": " - "must be TclpAccess, " - "TestAccessProc1, TestAccessProc2, or TestAccessProc3", NULL); - return TCL_ERROR; - } - - if (strcmp(argv[1], "insert") == 0) { - if (proc == PretendTclpAccess) { - Tcl_AppendResult(interp, "bad arg \"", argv[1], "\": must be " - "TestAccessProc1, TestAccessProc2, or TestAccessProc3" - NULL); - return TCL_ERROR; - } - retVal = TclAccessInsertProc(proc); - } else if (strcmp(argv[1], "delete") == 0) { - retVal = TclAccessDeleteProc(proc); - } else { - Tcl_AppendResult(interp, "bad option \"", argv[1], "\": " - "must be insert or delete", NULL); - return TCL_ERROR; - } - - if (retVal == TCL_ERROR) { - Tcl_AppendResult(interp, "\"", argv[2], "\": " - "could not be ", argv[1], "ed", NULL); - } - - return retVal; -} - -static int -PretendTclpAccess( - const char *path, - int mode) -{ - int ret; - Tcl_Obj *pathPtr = Tcl_NewStringObj(path, -1); - Tcl_IncrRefCount(pathPtr); - ret = TclpObjAccess(pathPtr, mode); - Tcl_DecrRefCount(pathPtr); - return ret; -} - -static int -TestAccessProc1( - const char *path, - int mode) -{ - return ((strstr(path, "testAccess1%.fil") == NULL) ? -1 : 0); -} - -static int -TestAccessProc2( - const char *path, - int mode) -{ - return ((strstr(path, "testAccess2%.fil") == NULL) ? -1 : 0); -} - -static int -TestAccessProc3( - const char *path, - int mode) -{ - return ((strstr(path, "testAccess3%.fil") == NULL) ? -1 : 0); -} - -/* - *---------------------------------------------------------------------- - * - * TestopenfilechannelprocCmd -- - * - * Implements the "testTclOpenFileChannelProc" cmd that is used to test - * the 'TclOpenFileChannelInsertProc' & 'TclOpenFileChannelDeleteProc' C - * Apis. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -TestopenfilechannelprocCmd( - ClientData dummy, /* Not used. */ - register Tcl_Interp *interp,/* Current interpreter. */ - int argc, /* Number of arguments. */ - const char **argv) /* Argument strings. */ -{ - TclOpenFileChannelProc_ *proc; - int retVal; - - if (argc != 3) { - Tcl_AppendResult(interp, "wrong # args: should be \"", - argv[0], " option arg\"", NULL); - return TCL_ERROR; - } - - if (strcmp(argv[2], "TclpOpenFileChannel") == 0) { - proc = PretendTclpOpenFileChannel; - } else if (strcmp(argv[2], "TestOpenFileChannelProc1") == 0) { - proc = TestOpenFileChannelProc1; - } else if (strcmp(argv[2], "TestOpenFileChannelProc2") == 0) { - proc = TestOpenFileChannelProc2; - } else if (strcmp(argv[2], "TestOpenFileChannelProc3") == 0) { - proc = TestOpenFileChannelProc3; - } else { - Tcl_AppendResult(interp, "bad arg \"", argv[1], "\": " - "must be TclpOpenFileChannel, " - "TestOpenFileChannelProc1, TestOpenFileChannelProc2, or " - "TestOpenFileChannelProc3", NULL); - return TCL_ERROR; - } - - if (strcmp(argv[1], "insert") == 0) { - if (proc == PretendTclpOpenFileChannel) { - Tcl_AppendResult(interp, "bad arg \"", argv[1], "\": " - "must be " - "TestOpenFileChannelProc1, TestOpenFileChannelProc2, or " - "TestOpenFileChannelProc3", NULL); - return TCL_ERROR; - } - retVal = TclOpenFileChannelInsertProc(proc); - } else if (strcmp(argv[1], "delete") == 0) { - retVal = TclOpenFileChannelDeleteProc(proc); - } else { - Tcl_AppendResult(interp, "bad option \"", argv[1], "\": " - "must be insert or delete", NULL); - return TCL_ERROR; - } - - if (retVal == TCL_ERROR) { - Tcl_AppendResult(interp, "\"", argv[2], "\": " - "could not be ", argv[1], "ed", NULL); - } - - return retVal; -} - -static Tcl_Channel -PretendTclpOpenFileChannel( - Tcl_Interp *interp, /* Interpreter for error reporting; can be - * NULL. */ - const char *fileName, /* Name of file to open. */ - const char *modeString, /* A list of POSIX open modes or - * a string such as "rw". */ - int permissions) /* If the open involves creating a file, with - * what modes to create it? */ -{ - Tcl_Channel ret; - int mode, seekFlag; - Tcl_Obj *pathPtr; - mode = TclGetOpenMode(interp, modeString, &seekFlag); - if (mode == -1) { - return NULL; - } - pathPtr = Tcl_NewStringObj(fileName, -1); - Tcl_IncrRefCount(pathPtr); - ret = TclpOpenFileChannel(interp, pathPtr, mode, permissions); - Tcl_DecrRefCount(pathPtr); - if (ret != NULL) { - if (seekFlag) { - if (Tcl_Seek(ret, (Tcl_WideInt)0, SEEK_END) < (Tcl_WideInt)0) { - if (interp != NULL) { - Tcl_AppendResult(interp, - "could not seek to end of file while opening \"", - fileName, "\": ", Tcl_PosixError(interp), NULL); - } - Tcl_Close(NULL, ret); - return NULL; - } - } - } - return ret; -} - -static Tcl_Channel -TestOpenFileChannelProc1( - Tcl_Interp *interp, /* Interpreter for error reporting; can be - * NULL. */ - const char *fileName, /* Name of file to open. */ - const char *modeString, /* A list of POSIX open modes or - * a string such as "rw". */ - int permissions) /* If the open involves creating a file, with - * what modes to create it? */ -{ - const char *expectname = "testOpenFileChannel1%.fil"; - Tcl_DString ds; - - Tcl_DStringInit(&ds); - Tcl_JoinPath(1, &expectname, &ds); - - if (!strcmp(Tcl_DStringValue(&ds), fileName)) { - Tcl_DStringFree(&ds); - return (PretendTclpOpenFileChannel(interp, - "__testOpenFileChannel1%__.fil", - modeString, permissions)); - } else { - Tcl_DStringFree(&ds); - return NULL; - } -} - -static Tcl_Channel -TestOpenFileChannelProc2( - Tcl_Interp *interp, /* Interpreter for error reporting; can be - * NULL. */ - const char *fileName, /* Name of file to open. */ - const char *modeString, /* A list of POSIX open modes or - * a string such as "rw". */ - int permissions) /* If the open involves creating a file, with - * what modes to create it? */ -{ - const char *expectname = "testOpenFileChannel2%.fil"; - Tcl_DString ds; - - Tcl_DStringInit(&ds); - Tcl_JoinPath(1, &expectname, &ds); - - if (!strcmp(Tcl_DStringValue(&ds), fileName)) { - Tcl_DStringFree(&ds); - return (PretendTclpOpenFileChannel(interp, - "__testOpenFileChannel2%__.fil", - modeString, permissions)); - } else { - Tcl_DStringFree(&ds); - return (NULL); - } -} - -static Tcl_Channel -TestOpenFileChannelProc3( - Tcl_Interp *interp, /* Interpreter for error reporting; can be - * NULL. */ - const char *fileName, /* Name of file to open. */ - const char *modeString, /* A list of POSIX open modes or a string such - * as "rw". */ - int permissions) /* If the open involves creating a file, with - * what modes to create it? */ -{ - const char *expectname = "testOpenFileChannel3%.fil"; - Tcl_DString ds; - - Tcl_DStringInit(&ds); - Tcl_JoinPath(1, &expectname, &ds); - - if (!strcmp(Tcl_DStringValue(&ds), fileName)) { - Tcl_DStringFree(&ds); - return (PretendTclpOpenFileChannel(interp, "__testOpenFileChannel3%__.fil", - modeString, permissions)); - } else { - Tcl_DStringFree(&ds); - return (NULL); - } -} -#endif /* *---------------------------------------------------------------------- diff --git a/tests/ioCmd.test b/tests/ioCmd.test index c3bde34..5a0d1ba 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.40 2008/04/10 20:58:59 andreas_kupries Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.41 2008/04/21 16:26:39 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -526,6 +526,27 @@ test iocmd-13.10.2 {open for append, O_APPEND} -setup { # Ensure that channels are gone, even if body failed to do so foreach ch $chans {catch {close $ch}} } -result {0 1 2 3 4 5 6 7 8 9} +test ioCmd-13.11 {open ... a+ must not use O_APPEND: Bug 1773127} -setup { + set f [makeFile {} ioutil41.tmp] + set fid [open $f wb] + puts -nonewline $fid 123 + close $fid +} -body { + set fid [open $f ab+] + puts -nonewline $fid 456 + seek $fid 2 + set d [read $fid 2] + seek $fid 4 + puts -nonewline $fid x + close $fid + set fid [open $f rb] + append d [read $fid] + close $fid + return $d +} -cleanup { + removeFile $f +} -result 341234x6 + test iocmd-14.1 {file id parsing errors} { list [catch {eof gorp} msg] $msg $::errorCode diff --git a/tests/ioUtil.test b/tests/ioUtil.test deleted file mode 100644 index 0f0d2fc..0000000 --- a/tests/ioUtil.test +++ /dev/null @@ -1,333 +0,0 @@ -# This file (ioUtil.test) tests the hookable TclStat(), TclAccess(), -# and Tcl_OpenFileChannel, routines in the file generic/tclIOUtils.c. -# Sourcing this file into Tcl runs the tests and generates output for -# errors. No output means no errors were found. -# -# Copyright (c) 1998-1999 by Scriptics Corporation. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: ioUtil.test,v 1.19 2007/12/13 15:26:06 dgp Exp $ - -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest 2 - namespace import -force ::tcltest::* -} - -testConstraint testopenfilechannelproc \ - [llength [info commands testopenfilechannelproc]] -testConstraint testaccessproc [llength [info commands testaccessproc]] -testConstraint teststatproc [llength [info commands teststatproc]] - -set unsetScript { - catch {unset testStat1(size)} - catch {unset testStat2(size)} - catch {unset testStat3(size)} -} - -test ioUtil-1.1 {TclStat: Check that none of the test procs are there.} {} { - catch {file stat testStat1%.fil testStat1} err1 - catch {file stat testStat2%.fil testStat2} err2 - catch {file stat testStat3%.fil testStat3} err3 - list $err1 $err2 $err3 -} {{could not read "testStat1%.fil": no such file or directory} {could not read "testStat2%.fil": no such file or directory} {could not read "testStat3%.fil": no such file or directory}} - -test ioUtil-1.2 {TclStatInsertProc: Insert the 3 test TclStat_ procedures.} {teststatproc} { - catch {teststatproc insert TclpStat} err1 - teststatproc insert TestStatProc1 - teststatproc insert TestStatProc2 - teststatproc insert TestStatProc3 - set err1 -} {bad arg "insert": must be TestStatProc1, TestStatProc2, or TestStatProc3} - -test ioUtil-1.3 {TclStat: Use "file stat ?" to invoke each procedure.} {teststatproc} { - file stat testStat2%.fil testStat2 - file stat testStat1%.fil testStat1 - file stat testStat3%.fil testStat3 - - list $testStat2(size) $testStat1(size) $testStat3(size) -} {2345 1234 3456} - -eval $unsetScript - -test ioUtil-1.4 {TclStatDeleteProc: "TclpStat" function should not be deletable.} {teststatproc} { - catch {teststatproc delete TclpStat} err2 - set err2 -} {"TclpStat": could not be deleteed} - -test ioUtil-1.5 {TclStatDeleteProc: Delete the 2nd TclStat procedure.} {teststatproc} { - # Delete the 2nd procedure and test that it longer exists but that - # the others do actually return a result. - - teststatproc delete TestStatProc2 - file stat testStat1%.fil testStat1 - catch {file stat testStat2%.fil testStat2} err3 - file stat testStat3%.fil testStat3 - - list $testStat1(size) $err3 $testStat3(size) -} {1234 {could not read "testStat2%.fil": no such file or directory} 3456} - -eval $unsetScript - -test ioUtil-1.6 {TclStatDeleteProc: Delete the 1st TclStat procedure.} {teststatproc} { - # Next delete the 1st procedure and test that only the 3rd procedure - # is the only one that exists. - - teststatproc delete TestStatProc1 - catch {file stat testStat1%.fil testStat1} err4 - catch {file stat testStat2%.fil testStat2} err5 - file stat testStat3%.fil testStat3 - - list $err4 $err5 $testStat3(size) -} {{could not read "testStat1%.fil": no such file or directory} {could not read "testStat2%.fil": no such file or directory} 3456} - -eval $unsetScript - -test ioUtil-1.7 {TclStatDeleteProc: Delete the 3rd procedure & verify all are gone.} {teststatproc} { - # Finally delete the 3rd procedure and check that none of the - # procedures exist. - - teststatproc delete TestStatProc3 - catch {file stat testStat1%.fil testStat1} err6 - catch {file stat testStat2%.fil testStat2} err7 - catch {file stat testStat3%.fil testStat3} err8 - - list $err6 $err7 $err8 -} {{could not read "testStat1%.fil": no such file or directory} {could not read "testStat2%.fil": no such file or directory} {could not read "testStat3%.fil": no such file or directory}} - -eval $unsetScript - -test ioUtil-1.8 {TclStatDeleteProc: Verify that all procs have been deleted.} {teststatproc} { - # Attempt to delete all the Stat procs. again to ensure they no longer - # exist and an error is returned. - - catch {teststatproc delete TestStatProc1} err9 - catch {teststatproc delete TestStatProc2} err10 - catch {teststatproc delete TestStatProc3} err11 - - list $err9 $err10 $err11 -} {{"TestStatProc1": could not be deleteed} {"TestStatProc2": could not be deleteed} {"TestStatProc3": could not be deleteed}} - -eval $unsetScript - -test ioUtil-1.9 {TclAccess: Check that none of the test procs are there.} { - catch {file exists testAccess1%.fil} err1 - catch {file exists testAccess2%.fil} err2 - catch {file exists testAccess3%.fil} err3 - list $err1 $err2 $err3 -} {0 0 0} - -test ioUtil-1.10 {TclAccessInsertProc: Insert the 3 test TclAccess_ procedures.} {testaccessproc} { - catch {testaccessproc insert TclpAccess} err1 - testaccessproc insert TestAccessProc1 - testaccessproc insert TestAccessProc2 - testaccessproc insert TestAccessProc3 - set err1 -} {bad arg "insert": must be TestAccessProc1, TestAccessProc2, or TestAccessProc3} - -test ioUtil-2.3 {TclAccess: Use "file access ?" to invoke each procedure.} {testaccessproc} { - list [file exists testAccess2%.fil] \ - [file exists testAccess1%.fil] \ - [file exists testAccess3%.fil] -} {1 1 1} - -test ioUtil-2.4 {TclAccessDeleteProc: "TclpAccess" function should not be deletable.} {testaccessproc} { - catch {testaccessproc delete TclpAccess} err2 - set err2 -} {"TclpAccess": could not be deleteed} - -test ioUtil-2.5 {TclAccessDeleteProc: Delete the 2nd TclAccess procedure.} {testaccessproc} { - # Delete the 2nd procedure and test that it longer exists but that - # the others do actually return a result. - - testaccessproc delete TestAccessProc2 - set res1 [file exists testAccess1%.fil] - catch {file exists testAccess2%.fil} err3 - set res2 [file exists testAccess3%.fil] - - list $res1 $err3 $res2 -} {1 0 1} - -test ioUtil-2.6 {TclAccessDeleteProc: Delete the 1st TclAccess procedure.} {testaccessproc} { - # Next delete the 1st procedure and test that only the 3rd procedure - # is the only one that exists. - - testaccessproc delete TestAccessProc1 - catch {file exists testAccess1%.fil} err4 - catch {file exists testAccess2%.fil} err5 - set res3 [file exists testAccess3%.fil] - - list $err4 $err5 $res3 -} {0 0 1} - -test ioUtil-2.7 {TclAccessDeleteProc: Delete the 3rd procedure & verify all are gone.} {testaccessproc} { - # Finally delete the 3rd procedure and check that none of the - # procedures exist. - - testaccessproc delete TestAccessProc3 - catch {file exists testAccess1%.fil} err6 - catch {file exists testAccess2%.fil} err7 - catch {file exists testAccess3%.fil} err8 - - list $err6 $err7 $err8 -} {0 0 0} - -test ioUtil-2.8 {TclAccessDeleteProc: Verify that all procs have been deleted.} {testaccessproc} { - # Attempt to delete all the Access procs. again to ensure they no longer - # exist and an error is returned. - - catch {testaccessproc delete TestAccessProc1} err9 - catch {testaccessproc delete TestAccessProc2} err10 - catch {testaccessproc delete TestAccessProc3} err11 - - list $err9 $err10 $err11 -} {{"TestAccessProc1": could not be deleteed} {"TestAccessProc2": could not be deleteed} {"TestAccessProc3": could not be deleteed}} - -# Some of the following tests require a writable current directory -set oldpwd [pwd] -cd [temporaryDirectory] - -test ioUtil-3.1 {TclOpenFileChannel: Check that none of the test procs are there.} {testopenfilechannelproc} { - catch {file delete -force {*}[glob *testOpenFileChannel*]} - catch {file exists testOpenFileChannel1%.fil} err1 - catch {file exists testOpenFileChannel2%.fil} err2 - catch {file exists testOpenFileChannel3%.fil} err3 - catch {file exists __testOpenFileChannel1%__.fil} err4 - catch {file exists __testOpenFileChannel2%__.fil} err5 - catch {file exists __testOpenFileChannel3%__.fil} err6 - list $err1 $err2 $err3 $err4 $err5 $err6 -} {0 0 0 0 0 0} - -test ioUtil-3.2 {TclOpenFileChannelInsertProc: Insert the 3 test TclOpenFileChannel_ procedures.} {testopenfilechannelproc} { - catch {testopenfilechannelproc insert TclpOpenFileChannel} err1 - testopenfilechannelproc insert TestOpenFileChannelProc1 - testopenfilechannelproc insert TestOpenFileChannelProc2 - testopenfilechannelproc insert TestOpenFileChannelProc3 - set err1 -} {bad arg "insert": must be TestOpenFileChannelProc1, TestOpenFileChannelProc2, or TestOpenFileChannelProc3} - -test ioUtil-3.3 {TclOpenFileChannel: Use "file openfilechannel ?" to invoke each procedure.} {testopenfilechannelproc} { - close [open __testOpenFileChannel1%__.fil w] - close [open __testOpenFileChannel2%__.fil w] - close [open __testOpenFileChannel3%__.fil w] - - catch { - close [open testOpenFileChannel1%.fil r] - close [open testOpenFileChannel2%.fil r] - close [open testOpenFileChannel3%.fil r] - } err - - file delete __testOpenFileChannel1%__.fil - file delete __testOpenFileChannel2%__.fil - file delete __testOpenFileChannel3%__.fil - - set err -} {} - -test ioUtil-3.4 {TclOpenFileChannelDeleteProc: "TclpOpenFileChannel" function should not be deletable.} {testopenfilechannelproc} { - catch {testopenfilechannelproc delete TclpOpenFileChannel} err2 - set err2 -} {"TclpOpenFileChannel": could not be deleteed} - -test ioUtil-3.5 {TclOpenFileChannelDeleteProc: Delete the 2nd TclOpenFileChannel procedure.} {testopenfilechannelproc} { - # Delete the 2nd procedure and test that it longer exists but that - # the others do actually return a result. - - testopenfilechannelproc delete TestOpenFileChannelProc2 - - close [open __testOpenFileChannel1%__.fil w] - close [open __testOpenFileChannel3%__.fil w] - - catch { - close [open testOpenFileChannel1%.fil r] - catch {close [open testOpenFileChannel2%.fil r]} msg1 - close [open testOpenFileChannel3%.fil r] - } err3 - - file delete __testOpenFileChannel1%__.fil - file delete __testOpenFileChannel3%__.fil - - list $err3 $msg1 -} {{} {couldn't open "testOpenFileChannel2%.fil": no such file or directory}} - -test ioUtil-3.6 {TclOpenFileChannelDeleteProc: Delete the 1st TclOpenFileChannel procedure.} {testopenfilechannelproc} { - # Next delete the 1st procedure and test that only the 3rd procedure - # is the only one that exists. - - testopenfilechannelproc delete TestOpenFileChannelProc1 - - close [open __testOpenFileChannel3%__.fil w] - - catch { - catch {close [open testOpenFileChannel1%.fil r]} msg2 - catch {close [open testOpenFileChannel2%.fil r]} msg3 - close [open testOpenFileChannel3%.fil r] - } err4 - - file delete __testOpenFileChannel3%__.fil - - list $err4 $msg2 $msg3 -} [list {} \ - {couldn't open "testOpenFileChannel1%.fil": no such file or directory}\ - {couldn't open "testOpenFileChannel2%.fil": no such file or directory}] - -test ioUtil-3.7 {TclOpenFileChannelDeleteProc: Delete the 3rd procedure & verify all are gone.} {testopenfilechannelproc} { - # Finally delete the 3rd procedure and check that none of the - # procedures exist. - - testopenfilechannelproc delete TestOpenFileChannelProc3 - catch { - catch {close [open testOpenFileChannel1%.fil r]} msg4 - catch {close [open testOpenFileChannel2%.fil r]} msg5 - catch {close [open testOpenFileChannel3%.fil r]} msg6 - } err5 - - list $err5 $msg4 $msg5 $msg6 -} [list 1 \ - {couldn't open "testOpenFileChannel1%.fil": no such file or directory}\ - {couldn't open "testOpenFileChannel2%.fil": no such file or directory}\ - {couldn't open "testOpenFileChannel3%.fil": no such file or directory}] - -test ioUtil-3.8 {TclOpenFileChannelDeleteProc: Verify that all procs have been deleted.} {testopenfilechannelproc} { - - # Attempt to delete all the OpenFileChannel procs. again to ensure they no - # longer exist and an error is returned. - - catch {testopenfilechannelproc delete TestOpenFileChannelProc1} err9 - catch {testopenfilechannelproc delete TestOpenFileChannelProc2} err10 - catch {testopenfilechannelproc delete TestOpenFileChannelProc3} err11 - - list $err9 $err10 $err11 -} {{"TestOpenFileChannelProc1": could not be deleteed} {"TestOpenFileChannelProc2": could not be deleteed} {"TestOpenFileChannelProc3": could not be deleteed}} - -test ioUtil-4.1 {open ... a+ must not use O_APPEND: Bug 1773127} -setup { - set f [tcltest::makeFile {} ioutil41.tmp] - set fid [open $f wb] - puts -nonewline $fid 123 - close $fid -} -body { - set fid [open $f ab+] - puts -nonewline $fid 456 - seek $fid 2 - set d [read $fid 2] - seek $fid 4 - puts -nonewline $fid x - close $fid - set fid [open $f rb] - append d [read $fid] - close $fid - return $d -} -cleanup { - tcltest::removeFile $f -} -result 341234x6 - -cd $oldpwd - -# cleanup -::tcltest::cleanupTests -return - -# Local Variables: -# mode: tcl -# End: -- cgit v0.12 From 2806530fd57fcf8fdf0f65ef7b2778bcadfaa8ed Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 23 Apr 2008 15:44:37 +0000 Subject: Assorted improvements to make better use of tcltest2 --- tests/chanio.test | 95 +++++++++-------- tests/cmdAH.test | 252 ++++++++++++++++++++++---------------------- tests/result.test | 8 +- tests/subst.test | 95 +++++++++-------- tests/timer.test | 308 +++++++++++++++++++++++++++++------------------------- tests/unload.test | 44 ++++---- 6 files changed, 417 insertions(+), 385 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index e79cb97..6e8fb44 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.11 2008/04/15 18:34:48 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.12 2008/04/23 15:44:37 dkf Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -182,8 +182,6 @@ test chan-io-1.9 {Tcl_WriteChars: WriteChars} { chan puts -nonewline $f $data chan close $f lappend sizes [file size $path(test2)] - - set sizes } {19 19 19 19 19} test chan-io-2.1 {WriteBytes} { @@ -1700,40 +1698,44 @@ file1 } {file2 }} catch {interp delete z} -test chan-io-14.5 {Tcl_GetChannel: stdio name translation} { +test chan-io-14.5 {Tcl_GetChannel: stdio name translation} -setup { interp create z +} -body { chan eof stdin catch {z eval chan flush stdin} msg1 catch {z eval chan close stdin} msg2 catch {z eval chan flush stdin} msg3 - set result [list $msg1 $msg2 $msg3] + list $msg1 $msg2 $msg3 +} -cleanup { interp delete z - set result -} {{channel "stdin" wasn't opened for writing} {} {can not find channel named "stdin"}} -test chan-io-14.6 {Tcl_GetChannel: stdio name translation} { +} -result {{channel "stdin" wasn't opened for writing} {} {can not find channel named "stdin"}} +test chan-io-14.6 {Tcl_GetChannel: stdio name translation} -setup { interp create z +} -body { chan eof stdout catch {z eval chan flush stdout} msg1 catch {z eval chan close stdout} msg2 catch {z eval chan flush stdout} msg3 - set result [list $msg1 $msg2 $msg3] + list $msg1 $msg2 $msg3 +} -cleanup { interp delete z - set result -} {{} {} {can not find channel named "stdout"}} -test chan-io-14.7 {Tcl_GetChannel: stdio name translation} { +} -result {{} {} {can not find channel named "stdout"}} +test chan-io-14.7 {Tcl_GetChannel: stdio name translation} -setup { interp create z +} -body { chan eof stderr catch {z eval chan flush stderr} msg1 catch {z eval chan close stderr} msg2 catch {z eval chan flush stderr} msg3 - set result [list $msg1 $msg2 $msg3] + list $msg1 $msg2 $msg3 +} -cleanup { interp delete z - set result -} {{} {} {can not find channel named "stderr"}} +} -result {{} {} {can not find channel named "stderr"}} set path(script) [makeFile {} script] -test chan-io-14.8 {reuse of stdio special channels} {stdio openpipe} { +test chan-io-14.8 {reuse of stdio special channels} -setup { file delete $path(script) file delete $path(test1) +} -constraints {stdio openpipe} -body { set f [open $path(script) w] chan puts -nonewline $f { chan close stderr @@ -1752,10 +1754,11 @@ test chan-io-14.8 {reuse of stdio special channels} {stdio openpipe} { set c [chan gets $f] chan close $f set c -} hello -test chan-io-14.9 {reuse of stdio special channels} {stdio openpipe fileevent} { +} -result hello +test chan-io-14.9 {reuse of stdio special channels} -setup { file delete $path(script) file delete $path(test1) +} -constraints {stdio openpipe fileevent} -body { set f [open $path(script) w] chan puts $f { array set path [lindex $argv 0] @@ -1770,14 +1773,15 @@ test chan-io-14.9 {reuse of stdio special channels} {stdio openpipe fileevent} { set f [open "|[list [interpreter] $path(script) [array get path]]" r] set c [chan gets $f] chan close $f + set c +} -cleanup { # Added delay to give Windows time to stop the spawned process and clean # up its grip on the file test1. Added delete as proper test cleanup. # The failing tests were 18.1 and 18.2 as first re-users of file "test1". after 10000 file delete $path(script) file delete $path(test1) - set c -} hello +} -result hello test chan-io-15.1 {Tcl_CreateChan CloseHandler} emptyTest { } {} @@ -1802,7 +1806,6 @@ test chan-io-17.1 {GetChannelTable, DeleteChannelTable on std handles} {testchan lappend l [expr [testchannel refcount stdin] - $l1] interp delete x lappend l [expr [testchannel refcount stdin] - $l1] - set l } {0 1 0} test chan-io-17.2 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} { set l1 [testchannel refcount stdout] @@ -1814,7 +1817,6 @@ test chan-io-17.2 {GetChannelTable, DeleteChannelTable on std handles} {testchan lappend l [expr [testchannel refcount stdout] - $l1] interp delete x lappend l [expr [testchannel refcount stdout] - $l1] - set l } {0 1 0} test chan-io-17.3 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} { set l1 [testchannel refcount stderr] @@ -1826,12 +1828,12 @@ test chan-io-17.3 {GetChannelTable, DeleteChannelTable on std handles} {testchan lappend l [expr [testchannel refcount stderr] - $l1] interp delete x lappend l [expr [testchannel refcount stderr] - $l1] - set l } {0 1 0} -test chan-io-18.1 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} { +test chan-io-18.1 {Tcl_RegisterChannel, Tcl_UnregisterChannel} -setup { file delete -force $path(test1) set l "" +} -constraints {testchannel} -body { set f [open $path(test1) w] lappend l [lindex [testchannel info $f] 15] chan close $f @@ -1840,12 +1842,13 @@ test chan-io-18.1 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} { } else { lappend l "very broken: $f found after being chan closed" } - string compare [string tolower $l] \ - [list 1 [format "can not find channel named \"%s\"" $f]] -} 0 -test chan-io-18.2 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} { + string equal [string tolower $l] \ + [list 1 "can not find channel named \"$f\""] +} -result 1 +test chan-io-18.2 {Tcl_RegisterChannel, Tcl_UnregisterChannel} -setup { file delete -force $path(test1) set l "" +} -constraints {testchannel} -body { set f [open $path(test1) w] lappend l [lindex [testchannel info $f] 15] interp create x @@ -1861,12 +1864,13 @@ test chan-io-18.2 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} { } else { lappend l "very broken: $f found after being chan closed" } - string compare [string tolower $l] \ - [list 1 2 1 1 [format "can not find channel named \"%s\"" $f]] -} 0 -test chan-io-18.3 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} { + string equal [string tolower $l] \ + [list 1 2 1 1 "can not find channel named \"$f\""] +} -result 1 +test chan-io-18.3 {Tcl_RegisterChannel, Tcl_UnregisterChannel} -setup { file delete $path(test1) set l "" +} -constraints {testchannel} -body { set f [open $path(test1) w] lappend l [lindex [testchannel info $f] 15] interp create x @@ -1880,9 +1884,9 @@ test chan-io-18.3 {Tcl_RegisterChannel, Tcl_UnregisterChannel} {testchannel} { } else { lappend l "very broken: $f found after being chan closed" } - string compare [string tolower $l] \ - [list 1 2 1 [format "can not find channel named \"%s\"" $f]] -} 0 + string equal [string tolower $l] \ + [list 1 2 1 "can not find channel named \"$f\""] +} -result 1 test chan-io-19.1 {Tcl_GetChannel->Tcl_GetStdChannel, standard handles} { chan eof stdin @@ -1894,13 +1898,14 @@ test chan-io-19.2 {testing Tcl_GetChannel, user opened handle} { chan close $f set x } 0 -test chan-io-19.3 {Tcl_GetChannel, channel not found} { - list [catch {chan eof file34} msg] $msg -} {1 {can not find channel named "file34"}} -test chan-io-19.4 {Tcl_CreateChannel, insertion into channel table} {testchannel} { +test chan-io-19.3 {Tcl_GetChannel, channel not found} -body { + chan eof file34 +} -returnCodes error -result {can not find channel named "file34"} +test chan-io-19.4 {Tcl_CreateChannel, insertion into channel table} -setup { file delete $path(test1) - set f [open $path(test1) w] set l "" +} -constraints {testchannel} -body { + set f [open $path(test1) w] lappend l [chan eof $f] chan close $f if {[catch {lindex [testchannel info $f] 15} msg]} { @@ -1908,19 +1913,19 @@ test chan-io-19.4 {Tcl_CreateChannel, insertion into channel table} {testchannel } else { lappend l "very broken: $f found after being chan closed" } - string compare [string tolower $l] \ - [list 0 [format "can not find channel named \"%s\"" $f]] -} 0 + string equal [string tolower $l] \ + [list 0 "can not find channel named \"$f\""] +} -result 1 test chan-io-20.1 {Tcl_CreateChannel: initial settings} { - set a [open $path(test2) w] + set a [open $path(test2) w] set old [encoding system] encoding system ascii set f [open $path(test1) w] set x [chan configure $f -encoding] chan close $f encoding system $old - chan close $a + chan close $a set x } {ascii} test chan-io-20.2 {Tcl_CreateChannel: initial settings} {win} { diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 44316c5..79d7b4f 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.57 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.58 2008/04/23 15:44:37 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -30,75 +30,89 @@ global env set cmdAHwd [pwd] catch {set platform [testgetplatform]} -test cmdAH-0.1 {Tcl_BreakObjCmd, errors} { - list [catch {break foo} msg] $msg -} {1 {wrong # args: should be "break"}} +test cmdAH-0.1 {Tcl_BreakObjCmd, errors} -body { + break foo +} -returnCodes error -result {wrong # args: should be "break"} test cmdAH-0.2 {Tcl_BreakObjCmd, success} { list [catch {break} msg] $msg } {3 {}} # Tcl_CaseObjCmd is tested in case.test -test cmdAH-1.1 {Tcl_CatchObjCmd, errors} { - list [catch {catch} msg] $msg -} {1 {wrong # args: should be "catch script ?resultVarName? ?optionVarName?"}} +test cmdAH-1.1 {Tcl_CatchObjCmd, errors} -returnCodes error -body { + catch +} -result {wrong # args: should be "catch script ?resultVarName? ?optionVarName?"} test cmdAH-1.2 {Tcl_CatchObjCmd, errors} { list [catch {catch foo bar baz} msg] $msg } {0 1} -test cmdAH-1.3 {Tcl_CatchObjCmd, errors} { - list [catch {catch foo bar baz spaz} msg] $msg -} {1 {wrong # args: should be "catch script ?resultVarName? ?optionVarName?"}} +test cmdAH-1.3 {Tcl_CatchObjCmd, errors} -returnCodes error -body { + catch foo bar baz spaz +} -result {wrong # args: should be "catch script ?resultVarName? ?optionVarName?"} -test cmdAH-2.1 {Tcl_CdObjCmd} { - list [catch {cd foo bar} msg] $msg -} {1 {wrong # args: should be "cd ?dirName?"}} +test cmdAH-2.1 {Tcl_CdObjCmd} -returnCodes error -body { + cd foo bar +} -result {wrong # args: should be "cd ?dirName?"} set foodir [file join [temporaryDirectory] foo] -test cmdAH-2.2 {Tcl_CdObjCmd} { +test cmdAH-2.2 {Tcl_CdObjCmd} -setup { file delete -force $foodir + set oldpwd [pwd] +} -body { file mkdir $foodir cd $foodir - set result [file tail [pwd]] - cd .. + file tail [pwd] +} -cleanup { + cd $oldpwd file delete $foodir - set result -} foo -test cmdAH-2.3 {Tcl_CdObjCmd} { +} -result foo +test cmdAH-2.3 {Tcl_CdObjCmd} -setup { global env set oldpwd [pwd] set temp $env(HOME) - set env(HOME) $oldpwd file delete -force $foodir +} -body { + set env(HOME) $oldpwd file mkdir $foodir cd $foodir cd ~ - set result [string equal [pwd] $oldpwd] + string equal [pwd] $oldpwd +} -cleanup { + cd $oldpwd file delete $foodir set env(HOME) $temp - set result -} 1 -test cmdAH-2.4 {Tcl_CdObjCmd} { +} -result 1 +test cmdAH-2.4 {Tcl_CdObjCmd} -setup { global env set oldpwd [pwd] set temp $env(HOME) - set env(HOME) $oldpwd file delete -force $foodir +} -body { + set env(HOME) $oldpwd file mkdir $foodir cd $foodir cd - set result [string equal [pwd] $oldpwd] + string equal [pwd] $oldpwd +} -cleanup { + cd $oldpwd file delete $foodir set env(HOME) $temp - set result -} 1 -test cmdAH-2.5 {Tcl_CdObjCmd} { - list [catch {cd ~~} msg] $msg -} {1 {user "~" doesn't exist}} -test cmdAH-2.6 {Tcl_CdObjCmd} { - list [catch {cd _foobar} msg] $msg -} {1 {couldn't change working directory to "_foobar": no such file or directory}} -test cmdAH-2.6.1 {Tcl_CdObjCmd} { - list [catch {cd ""} msg] $msg -} {1 {couldn't change working directory to "": no such file or directory}} +} -result 1 +test cmdAH-2.5 {Tcl_CdObjCmd} -returnCodes error -body { + cd ~~ +} -result {user "~" doesn't exist} +test cmdAH-2.6 {Tcl_CdObjCmd} -returnCodes error -body { + cd _foobar +} -result {couldn't change working directory to "_foobar": no such file or directory} +test cmdAH-2.6.1 {Tcl_CdObjCmd} -returnCodes error -body { + cd "" +} -result {couldn't change working directory to "": no such file or directory} +test cmdAH-2.7 {cd} -constraints {unix nonPortable} -setup { + set dir [pwd] +} -body { + cd / + pwd +} -cleanup { + cd $dir +} -result {/} test cmdAH-2.7 {Tcl_ConcatObjCmd} { concat @@ -110,99 +124,98 @@ test cmdAH-2.9 {Tcl_ConcatObjCmd} { concat a {b c} } {a b c} -test cmdAH-3.1 {Tcl_ContinueObjCmd, errors} { - list [catch {continue foo} msg] $msg -} {1 {wrong # args: should be "continue"}} +test cmdAH-3.1 {Tcl_ContinueObjCmd, errors} -returnCodes error -body { + continue foo +} -result {wrong # args: should be "continue"} test cmdAH-3.2 {Tcl_ContinueObjCmd, success} { list [catch {continue} msg] $msg } {4 {}} -test cmdAH-4.1 {Tcl_EncodingObjCmd} { - list [catch {encoding} msg] $msg -} {1 {wrong # args: should be "encoding option ?arg ...?"}} -test cmdAH-4.2 {Tcl_EncodingObjCmd} { - list [catch {encoding foo} msg] $msg -} {1 {bad option "foo": must be convertfrom, convertto, dirs, names, or system}} -test cmdAH-4.3 {Tcl_EncodingObjCmd} { - list [catch {encoding convertto} msg] $msg -} {1 {wrong # args: should be "encoding convertto ?encoding? data"}} -test cmdAH-4.4 {Tcl_EncodingObjCmd} { - list [catch {encoding convertto foo bar} msg] $msg -} {1 {unknown encoding "foo"}} -test cmdAH-4.5 {Tcl_EncodingObjCmd} { +test cmdAH-4.1 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding +} -result {wrong # args: should be "encoding option ?arg ...?"} +test cmdAH-4.2 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding foo +} -result {bad option "foo": must be convertfrom, convertto, dirs, names, or system} +test cmdAH-4.3 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding convertto +} -result {wrong # args: should be "encoding convertto ?encoding? data"} +test cmdAH-4.4 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding convertto foo bar +} -result {unknown encoding "foo"} +test cmdAH-4.5 {Tcl_EncodingObjCmd} -setup { set system [encoding system] +} -body { encoding system jis0208 - set x [encoding convertto \u4e4e] + encoding convertto \u4e4e +} -cleanup { encoding system $system - set x -} 8C -test cmdAH-4.6 {Tcl_EncodingObjCmd} { +} -result 8C +test cmdAH-4.6 {Tcl_EncodingObjCmd} -setup { set system [encoding system] +} -body { encoding system identity - set x [encoding convertto jis0208 \u4e4e] + encoding convertto jis0208 \u4e4e +} -cleanup { encoding system $system - set x -} 8C -test cmdAH-4.7 {Tcl_EncodingObjCmd} { - list [catch {encoding convertfrom} msg] $msg -} {1 {wrong # args: should be "encoding convertfrom ?encoding? data"}} -test cmdAH-4.8 {Tcl_EncodingObjCmd} { - list [catch {encoding convertfrom foo bar} msg] $msg -} {1 {unknown encoding "foo"}} -test cmdAH-4.9 {Tcl_EncodingObjCmd} { +} -result 8C +test cmdAH-4.7 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding convertfrom +} -result {wrong # args: should be "encoding convertfrom ?encoding? data"} +test cmdAH-4.8 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding convertfrom foo bar +} -result {unknown encoding "foo"} +test cmdAH-4.9 {Tcl_EncodingObjCmd} -setup { set system [encoding system] +} -body { encoding system jis0208 - set x [encoding convertfrom 8C] + encoding convertfrom 8C +} -cleanup { encoding system $system - set x -} \u4e4e -test cmdAH-4.10 {Tcl_EncodingObjCmd} { +} -result \u4e4e +test cmdAH-4.10 {Tcl_EncodingObjCmd} -setup { set system [encoding system] +} -body { encoding system identity - set x [encoding convertfrom jis0208 8C] + encoding convertfrom jis0208 8C +} -cleanup { encoding system $system - set x -} \u4e4e -test cmdAH-4.11 {Tcl_EncodingObjCmd} { - list [catch {encoding names foo} msg] $msg -} {1 {wrong # args: should be "encoding names"}} -test cmdAH-4.12 {Tcl_EncodingObjCmd} { - list [catch {encoding system foo bar} msg] $msg -} {1 {wrong # args: should be "encoding system ?encoding?"}} -test cmdAH-4.13 {Tcl_EncodingObjCmd} { +} -result \u4e4e +test cmdAH-4.11 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding names foo +} -result {wrong # args: should be "encoding names"} +test cmdAH-4.12 {Tcl_EncodingObjCmd} -returnCodes error -body { + encoding system foo bar +} -result {wrong # args: should be "encoding system ?encoding?"} +test cmdAH-4.13 {Tcl_EncodingObjCmd} -setup { set system [encoding system] +} -body { encoding system identity - set x [encoding system] + encoding system +} -cleanup { encoding system $system - set x -} identity - -test cmdAH-5.1 {Tcl_FileObjCmd} { - list [catch file msg] $msg -} {1 {wrong # args: should be "file option ?arg ...?"}} -test cmdAH-5.2 {Tcl_FileObjCmd} { - list [catch {file x} msg] $msg -} {1 {bad option "x": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-5.3 {Tcl_FileObjCmd} { - list [catch {file exists} msg] $msg -} {1 {wrong # args: should be "file exists name"}} +} -result identity + +test cmdAH-5.1 {Tcl_FileObjCmd} -returnCodes error -body { + file +} -result {wrong # args: should be "file option ?arg ...?"} +test cmdAH-5.2 {Tcl_FileObjCmd} -returnCodes error -body { + file x +} -result {bad option "x": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable} +test cmdAH-5.3 {Tcl_FileObjCmd} -returnCodes error -body { + file exists +} -result {wrong # args: should be "file exists name"} test cmdAH-5.4 {Tcl_FileObjCmd} { - list [catch {file exists ""} msg] $msg -} {0 0} - -#volume - -test cmdAH-6.1 {Tcl_FileObjCmd: volumes} { - list [catch {file volumes x} msg] $msg -} {1 {wrong # args: should be "file volumes"}} -test cmdAH-6.2 {Tcl_FileObjCmd: volumes} { - set volumeList [file volumes] - if { [llength $volumeList] == 0 } { - set result 0 - } else { - set result 1 - } -} {1} + file exists "" +} 0 + +# volume +test cmdAH-6.1 {Tcl_FileObjCmd: volumes} -returnCodes error -body { + file volumes x +} -result {wrong # args: should be "file volumes"} +test cmdAH-6.2 {Tcl_FileObjCmd: volumes} -body { + lindex [file volumes] 0 +} -match glob -result ?* test cmdAH-6.3 {Tcl_FileObjCmd: volumes} {unix} { set volumeList [file volumes] catch [list glob -nocomplain [lindex $volumeList 0]*] @@ -212,28 +225,19 @@ test cmdAH-6.4 {Tcl_FileObjCmd: volumes} win { list [catch {lsearch $volumeList "c:/"} element] [expr $element != -1] [catch {list glob -nocomplain [lindex $volumeList $element]*}] } {0 1 0} -test cmdAH-6.5 {cd} {unix nonPortable} { - set dir [pwd] - cd / - set res [pwd] - cd $dir - set res -} {/} - # attributes - -test cmdAH-7.1 {Tcl_FileObjCmd - file attrs} { +test cmdAH-7.1 {Tcl_FileObjCmd - file attrs} -setup { set foofile [makeFile abcde foo.file] catch {file delete -force $foofile} +} -body { close [open $foofile w] - set res [catch {file attributes $foofile}] + catch {file attributes $foofile} +} -cleanup { # We used [makeFile] so we undo with [removeFile] removeFile $foofile - set res -} {0} +} -result {0} # dirname - test cmdAH-8.1 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix list [catch {file dirname a b} msg] $msg diff --git a/tests/result.test b/tests/result.test index cefcaed..95407b9 100644 --- a/tests/result.test +++ b/tests/result.test @@ -49,7 +49,6 @@ test result-1.8 {Tcl_SaveInterpResult} {testsaveresult} { testsaveresult object {set x 42} 1 } {42 different} - # Tcl_RestoreInterpResult is mostly tested by the previous tests except # for the following case @@ -60,9 +59,9 @@ test result-2.1 {Tcl_RestoreInterpResult} {testsaveresult} { # Tcl_DiscardInterpResult is mostly tested by the previous tests except # for the following cases -test result-3.1 {Tcl_DiscardInterpResult} {testsaveresult} { - list [catch {testsaveresult append {cd _foobar} 1} msg] $msg -} {1 {couldn't change working directory to "_foobar": no such file or directory}} +test result-3.1 {Tcl_DiscardInterpResult} -constraints testsaveresult -body { + testsaveresult append {cd _foobar} 1 +} -returnCodes error -result {couldn't change working directory to "_foobar": no such file or directory} test result-3.2 {Tcl_DiscardInterpResult} {testsaveresult} { testsaveresult free {set x 42} 1 } {42} @@ -133,7 +132,6 @@ test result-6.2 {Bug 1649062} -setup { rename foo {} } -result {foo {} {}} - # cleanup cleanupTests return diff --git a/tests/subst.test b/tests/subst.test index a336c1b..a7d6feb 100644 --- a/tests/subst.test +++ b/tests/subst.test @@ -11,19 +11,19 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: subst.test,v 1.18 2004/10/26 21:52:41 dgp Exp $ +# RCS: @(#) $Id: subst.test,v 1.19 2008/04/23 15:44:38 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 namespace import -force ::tcltest::* } -test subst-1.1 {basics} { - list [catch {subst} msg] $msg -} {1 {wrong # args: should be "subst ?-nobackslashes? ?-nocommands? ?-novariables? string"}} -test subst-1.2 {basics} { - list [catch {subst a b c} msg] $msg -} {1 {bad switch "a": must be -nobackslashes, -nocommands, or -novariables}} +test subst-1.1 {basics} -returnCodes error -body { + subst +} -result {wrong # args: should be "subst ?-nobackslashes? ?-nocommands? ?-novariables? string"} +test subst-1.2 {basics} -returnCodes error -body { + subst a b c +} -result {bad switch "a": must be -nobackslashes, -nocommands, or -novariables} test subst-2.1 {simple strings} { subst {} @@ -56,12 +56,13 @@ test subst-4.2 {variable substitutions} { set a 44 subst {x$a.y{$a}.z} } {x44.y{44}.z} -test subst-4.3 {variable substitutions} { +test subst-4.3 {variable substitutions} -setup { catch {unset a} +} -body { set a(13) 82 set i 13 subst {x.$a($i)} -} {x.82} +} -result {x.82} catch {unset a} set long {This is a very long string, intentionally made so long that it will overflow the static character size for dstrings, so that @@ -70,9 +71,9 @@ set long {This is a very long string, intentionally made so long that it an error, there will be memory that isn't freed (this will be detected when the tests are run under a checking memory allocator such as Purify).} -test subst-4.4 {variable substitutions} { - list [catch {subst {$long $a}} msg] $msg -} {1 {can't read "a": no such variable}} +test subst-4.4 {variable substitutions} -returnCodes error -body { + subst {$long $a} +} -result {can't read "a": no such variable} test subst-5.1 {command substitutions} { subst {[concat {}]} @@ -113,20 +114,20 @@ test subst-5.10 {command substitutions} { list [catch {exec [info nameofexecutable] << $script} msg] $msg } {1 {missing close-bracket}} -test subst-6.1 {clear the result after command substitution} { +test subst-6.1 {clear the result after command substitution} -body { catch {unset a} - list [catch {subst {[concat foo] $a}} msg] $msg -} {1 {can't read "a": no such variable}} + subst {[concat foo] $a} +} -returnCodes error -result {can't read "a": no such variable} -test subst-7.1 {switches} { - list [catch {subst foo bar} msg] $msg -} {1 {bad switch "foo": must be -nobackslashes, -nocommands, or -novariables}} -test subst-7.2 {switches} { - list [catch {subst -no bar} msg] $msg -} {1 {ambiguous switch "-no": must be -nobackslashes, -nocommands, or -novariables}} -test subst-7.3 {switches} { - list [catch {subst -bogus bar} msg] $msg -} {1 {bad switch "-bogus": must be -nobackslashes, -nocommands, or -novariables}} +test subst-7.1 {switches} -returnCodes error -body { + subst foo bar +} -result {bad switch "foo": must be -nobackslashes, -nocommands, or -novariables} +test subst-7.2 {switches} -returnCodes error -body { + subst -no bar +} -result {ambiguous switch "-no": must be -nobackslashes, -nocommands, or -novariables} +test subst-7.3 {switches} -returnCodes error -body { + subst -bogus bar +} -result {bad switch "-bogus": must be -nobackslashes, -nocommands, or -novariables} test subst-7.4 {switches} { set x 123 subst -nobackslashes {abc $x [expr 1+2] \\\x41} @@ -159,28 +160,30 @@ test subst-8.4 {return in a subst} { test subst-8.5 {return in a subst} { subst {foo [return {]}; bogus code] bar} } {foo ] bar} -test subst-8.6 {return in a subst} { - list [catch {subst {foo [return {x}; bogus code bar}} msg] $msg -} {1 {missing close-bracket}} +test subst-8.6 {return in a subst} -returnCodes error -body { + subst "foo \[return {x}; bogus code bar" +} -result {missing close-bracket} test subst-8.7 {return in a subst, parse error} -body { - subst {foo [return {x} ; set a {}" ; stuff] bar} + subst {foo [return {x} ; set a {}"" ; stuff] bar} } -returnCodes error -result {extra characters after close-brace} test subst-8.8 {return in a subst, parse error} -body { - subst {foo [return {x} ; set bar baz ; set a {}" ; stuff] bar} + subst {foo [return {x} ; set bar baz ; set a {}"" ; stuff] bar} } -returnCodes error -result {extra characters after close-brace} test subst-8.9 {return in a variable subst} { subst {foo $var([return {x}]) bar} } {foo x bar} -test subst-9.1 {error in a subst} { - list [catch {subst {[error foo; bogus code]bar}} msg] $msg -} {1 foo} -test subst-9.2 {error in a subst} { - list [catch {subst {[if 1 { error foo; bogus code}]bar}} msg] $msg -} {1 foo} -test subst-9.3 {error in a variable subst} { - list [catch {subst {foo $var([error foo]) bar}} msg] $msg -} {1 foo} +test subst-9.1 {error in a subst} -body { + subst {[error foo; bogus code]bar} +} -returnCodes error -result foo +test subst-9.2 {error in a subst} -body { + subst {[if 1 { error foo; bogus code}]bar} +} -returnCodes error -result foo +test subst-9.3 {error in a variable subst} -setup { + catch {unset var} +} -body { + subst {foo $var([error foo]) bar} +} -returnCodes error -result foo test subst-10.1 {break in a subst} { subst {foo [break; bogus code] bar} @@ -225,14 +228,14 @@ test subst-12.1 {nasty case, Bug 1036649} { set res [list [catch {subst "\[subst {};"} msg] $msg] if {$msg ne "missing close-bracket"} break } - set res + return $res } {1 {missing close-bracket}} test subst-12.2 {nasty case, Bug 1036649} { for {set i 0} {$i < 10} {incr i} { set res [list [catch {subst "\[subst {}; "} msg] $msg] if {$msg ne "missing close-bracket"} break } - set res + return $res } {1 {missing close-bracket}} test subst-12.3 {nasty case, Bug 1036649} { set x 0 @@ -240,24 +243,24 @@ test subst-12.3 {nasty case, Bug 1036649} { set res [list [catch {subst "\[incr x;"} msg] $msg] if {$msg ne "missing close-bracket"} break } - list $res $x -} {{1 {missing close-bracket}} 10} + lappend res $x +} {1 {missing close-bracket} 10} test subst-12.4 {nasty case, Bug 1036649} { set x 0 for {set i 0} {$i < 10} {incr i} { set res [list [catch {subst "\[incr x; "} msg] $msg] if {$msg ne "missing close-bracket"} break } - list $res $x -} {{1 {missing close-bracket}} 10} + lappend res $x +} {1 {missing close-bracket} 10} test subst-12.5 {nasty case, Bug 1036649} { set x 0 for {set i 0} {$i < 10} {incr i} { set res [list [catch {subst "\[incr x"} msg] $msg] if {$msg ne "missing close-bracket"} break } - list $res $x -} {{1 {missing close-bracket}} 0} + lappend res $x +} {1 {missing close-bracket} 0} # cleanup ::tcltest::cleanupTests diff --git a/tests/timer.test b/tests/timer.test index 6eecb7c..16eff33 100644 --- a/tests/timer.test +++ b/tests/timer.test @@ -13,30 +13,36 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: timer.test,v 1.12 2005/11/09 21:28:36 kennykb Exp $ +# RCS: @(#) $Id: timer.test,v 1.13 2008/04/23 15:44:38 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest + package require tcltest 2 namespace import -force ::tcltest::* } -test timer-1.1 {Tcl_CreateTimerHandler procedure} { +test timer-1.1 {Tcl_CreateTimerHandler procedure} -setup { foreach i [after info] { after cancel $i } +} -body { set x "" foreach i {100 200 1000 50 150} { after $i lappend x $i } after 200 set done 1 vwait done - set x -} {50 100 150 200} + return $x +} -cleanup { + foreach i [after info] { + after cancel $i + } +} -result {50 100 150 200} -test timer-2.1 {Tcl_DeleteTimerHandler procedure} { +test timer-2.1 {Tcl_DeleteTimerHandler procedure} -setup { foreach i [after info] { after cancel $i } +} -body { set x "" foreach i {100 200 1000 50 150} { after $i lappend x $i @@ -45,8 +51,8 @@ test timer-2.1 {Tcl_DeleteTimerHandler procedure} { after cancel lappend x 50 after 200 set done 1 vwait done - set x -} {100 200} + return $x +} -result {100 200} # No tests for Tcl_ServiceTimer or ResetTimer, since it is already tested # above. @@ -60,10 +66,11 @@ test timer-3.1 {TimerHandlerEventProc procedure: event masks} { update lappend result $x } {start fired} -test timer-3.2 {TimerHandlerEventProc procedure: multiple timers} { +test timer-3.2 {TimerHandlerEventProc procedure: multiple timers} -setup { foreach i [after info] { after cancel $i } +} -body { foreach i {200 600 1000} { after $i lappend x $i } @@ -78,45 +85,49 @@ test timer-3.2 {TimerHandlerEventProc procedure: multiple timers} { after 400 update lappend result $x -} {200 {200 600} {200 600 1000}} -test timer-3.3 {TimerHandlerEventProc procedure: reentrant timer deletion} { +} -result {200 {200 600} {200 600 1000}} +test timer-3.3 {TimerHandlerEventProc procedure: reentrant timer deletion} -setup { foreach i [after info] { after cancel $i } +} -body { set x {} after 100 lappend x 100 set i [after 300 lappend x 300] after 200 after cancel $i after 400 update - set x -} 100 -test timer-3.4 {TimerHandlerEventProc procedure: all expired timers fire} { + return $x +} -result 100 +test timer-3.4 {TimerHandlerEventProc procedure: all expired timers fire} -setup { foreach i [after info] { after cancel $i } +} -body { set x {} after 100 lappend x a after 200 lappend x b after 300 lappend x c after 300 vwait x - set x -} {a b c} -test timer-3.5 {TimerHandlerEventProc procedure: reentrantly added timers don't fire} { + return $x +} -result {a b c} +test timer-3.5 {TimerHandlerEventProc procedure: reentrantly added timers don't fire} -setup { foreach i [after info] { after cancel $i } +} -body { set x {} after 100 {lappend x a; after 0 lappend x b} after 100 vwait x - set x -} a -test timer-3.6 {TimerHandlerEventProc procedure: reentrantly added timers don't fire} { + return $x +} -result a +test timer-3.6 {TimerHandlerEventProc procedure: reentrantly added timers don't fire} -setup { foreach i [after info] { after cancel $i } +} -body { set x {} after 100 {lappend x a; after 100 lappend x b; after 100} after 100 @@ -124,15 +135,16 @@ test timer-3.6 {TimerHandlerEventProc procedure: reentrantly added timers don't set result $x vwait x lappend result $x -} {a {a b}} +} -result {a {a b}} # No tests for Tcl_DoWhenIdle: it's already tested by other tests # below. -test timer-4.1 {Tcl_CancelIdleCall procedure} { +test timer-4.1 {Tcl_CancelIdleCall procedure} -setup { foreach i [after info] { after cancel $i } +} -body { set x before set y before set z before @@ -141,12 +153,13 @@ test timer-4.1 {Tcl_CancelIdleCall procedure} { after idle set z after3 after cancel set y after2 update idletasks - concat $x $y $z -} {after1 before after3} -test timer-4.2 {Tcl_CancelIdleCall procedure} { + list $x $y $z +} -result {after1 before after3} +test timer-4.2 {Tcl_CancelIdleCall procedure} -setup { foreach i [after info] { after cancel $i } +} -body { set x before set y before set z before @@ -155,13 +168,14 @@ test timer-4.2 {Tcl_CancelIdleCall procedure} { after idle set z after3 after cancel set x after1 update idletasks - concat $x $y $z -} {before after2 after3} + list $x $y $z +} -result {before after2 after3} -test timer-5.1 {Tcl_ServiceIdle, self-rescheduling handlers} { +test timer-5.1 {Tcl_ServiceIdle, self-rescheduling handlers} -setup { foreach i [after info] { after cancel $i } +} -body { set x 1 set y 23 after idle {incr x; after idle {incr x; after idle {incr x}}} @@ -170,17 +184,17 @@ test timer-5.1 {Tcl_ServiceIdle, self-rescheduling handlers} { set result "$x $y" update idletasks lappend result $x -} {2 24 4} +} -result {2 24 4} -test timer-6.1 {Tcl_AfterCmd procedure, basics} { - list [catch {after} msg] $msg -} {1 {wrong # args: should be "after option ?arg arg ...?"}} -test timer-6.2 {Tcl_AfterCmd procedure, basics} { - list [catch {after 2x} msg] $msg -} {1 {bad argument "2x": must be cancel, idle, info, or an integer}} -test timer-6.3 {Tcl_AfterCmd procedure, basics} { - list [catch {after gorp} msg] $msg -} {1 {bad argument "gorp": must be cancel, idle, info, or an integer}} +test timer-6.1 {Tcl_AfterCmd procedure, basics} -returnCodes error -body { + after +} -result {wrong # args: should be "after option ?arg arg ...?"} +test timer-6.2 {Tcl_AfterCmd procedure, basics} -returnCodes error -body { + after 2x +} -result {bad argument "2x": must be cancel, idle, info, or an integer} +test timer-6.3 {Tcl_AfterCmd procedure, basics} -returnCodes error -body { + after gorp +} -result {bad argument "gorp": must be cancel, idle, info, or an integer} test timer-6.4 {Tcl_AfterCmd procedure, ms argument} { set x before after 400 {set x after} @@ -201,41 +215,44 @@ test timer-6.5 {Tcl_AfterCmd procedure, ms argument} { update list $y $x } {before after} -test timer-6.6 {Tcl_AfterCmd procedure, cancel option} { - list [catch {after cancel} msg] $msg -} {1 {wrong # args: should be "after cancel id|command"}} +test timer-6.6 {Tcl_AfterCmd procedure, cancel option} -body { + after cancel +} -returnCodes error -result {wrong # args: should be "after cancel id|command"} test timer-6.7 {Tcl_AfterCmd procedure, cancel option} { after cancel after#1 } {} test timer-6.8 {Tcl_AfterCmd procedure, cancel option} { after cancel {foo bar} } {} -test timer-6.9 {Tcl_AfterCmd procedure, cancel option} { +test timer-6.9 {Tcl_AfterCmd procedure, cancel option} -setup { foreach i [after info] { after cancel $i } +} -body { set x before set y [after 100 set x after] after cancel $y after 200 update - set x -} {before} -test timer-6.10 {Tcl_AfterCmd procedure, cancel option} { + return $x +} -result {before} +test timer-6.10 {Tcl_AfterCmd procedure, cancel option} -setup { foreach i [after info] { after cancel $i } +} -body { set x before after 100 set x after after cancel {set x after} after 200 update - set x -} {before} -test timer-6.11 {Tcl_AfterCmd procedure, cancel option} { + return $x +} -result {before} +test timer-6.11 {Tcl_AfterCmd procedure, cancel option} -setup { foreach i [after info] { after cancel $i } +} -body { set x before after 100 set x after set id [after 300 set x after] @@ -247,11 +264,12 @@ test timer-6.11 {Tcl_AfterCmd procedure, cancel option} { after 200 update list $y $x -} {after cleared} -test timer-6.12 {Tcl_AfterCmd procedure, cancel option} { +} -result {after cleared} +test timer-6.12 {Tcl_AfterCmd procedure, cancel option} -setup { foreach i [after info] { after cancel $i } +} -body { set x first after idle lappend x second after idle lappend x third @@ -259,12 +277,13 @@ test timer-6.12 {Tcl_AfterCmd procedure, cancel option} { after cancel {lappend x second} after cancel $i update idletasks - set x -} {first third} -test timer-6.13 {Tcl_AfterCmd procedure, cancel option, multiple arguments for command} { + return $x +} -result {first third} +test timer-6.13 {Tcl_AfterCmd procedure, cancel option, multiple arguments for command} -setup { foreach i [after info] { after cancel $i } +} -body { set x first after idle lappend x second after idle lappend x third @@ -272,12 +291,13 @@ test timer-6.13 {Tcl_AfterCmd procedure, cancel option, multiple arguments for c after cancel lappend x second after cancel $i update idletasks - set x -} {first third} -test timer-6.14 {Tcl_AfterCmd procedure, cancel option, cancel during handler, used to dump core} { + return $x +} -result {first third} +test timer-6.14 {Tcl_AfterCmd procedure, cancel option, cancel during handler, used to dump core} -setup { foreach i [after info] { after cancel $i } +} -body { set id [ after 100 { set x done @@ -285,11 +305,12 @@ test timer-6.14 {Tcl_AfterCmd procedure, cancel option, cancel during handler, u } ] vwait x -} {} -test timer-6.15 {Tcl_AfterCmd procedure, cancel option, multiple interps} { +} -result {} +test timer-6.15 {Tcl_AfterCmd procedure, cancel option, multiple interps} -setup { foreach i [after info] { after cancel $i } +} -body { interp create x x eval {set a before; set b before; after idle {set a a-after}; after idle {set b b-after}} @@ -301,12 +322,12 @@ test timer-6.15 {Tcl_AfterCmd procedure, cancel option, multiple interps} { x eval {after cancel set a a-after} update idletasks lappend result $a $b [x eval {list $a $b}] +} -cleanup { interp delete x - set result -} {2 0 aaa bbb {before b-after}} -test timer-6.16 {Tcl_AfterCmd procedure, idle option} { - list [catch {after idle} msg] $msg -} {1 {wrong # args: should be "after idle script script ..."}} +} -result {2 0 aaa bbb {before b-after}} +test timer-6.16 {Tcl_AfterCmd procedure, idle option} -body { + after idle +} -returnCodes error -result {wrong # args: should be "after idle script script ..."} test timer-6.17 {Tcl_AfterCmd procedure, idle option} { set x before after idle {set x after} @@ -321,6 +342,7 @@ test timer-6.18 {Tcl_AfterCmd procedure, idle option} { update idletasks list $y $x } {before after} + set event1 [after idle event 1] set event2 [after 1000 event 2] interp create x @@ -328,120 +350,125 @@ set childEvent [x eval {after idle event in child}] test timer-6.19 {Tcl_AfterCmd, info option} { lsort [after info] } [lsort "$event1 $event2"] -test timer-6.20 {Tcl_AfterCmd, info option} { - list [catch {after info a b} msg] $msg -} {1 {wrong # args: should be "after info ?id?"}} -test timer-6.21 {Tcl_AfterCmd, info option} { - list [catch {after info $childEvent} msg] $msg -} "1 {event \"$childEvent\" doesn't exist}" +test timer-6.20 {Tcl_AfterCmd, info option} -returnCodes error -body { + after info a b +} -result {wrong # args: should be "after info ?id?"} +test timer-6.21 {Tcl_AfterCmd, info option} -returnCodes error -body { + after info $childEvent +} -result "event \"$childEvent\" doesn't exist" test timer-6.22 {Tcl_AfterCmd, info option} { list [after info $event1] [after info $event2] } {{{event 1} idle} {{event 2} timer}} - after cancel $event1 after cancel $event2 interp delete x -test timer-6.23 {Tcl_AfterCmd procedure, no option, script with NULL} { +test timer-6.23 {Tcl_AfterCmd procedure, no option, script with NUL} -setup { foreach i [after info] { after cancel $i } +} -body { set x "hello world" after 1 "set x ab\0cd" after 10 update string length $x -} {5} -test timer-6.24 {Tcl_AfterCmd procedure, no option, script with NULL} { +} -result {5} +test timer-6.24 {Tcl_AfterCmd procedure, no option, script with NUL} -setup { foreach i [after info] { after cancel $i } +} -body { set x "hello world" after 1 set x ab\0cd after 10 update string length $x -} {5} -test timer-6.25 {Tcl_AfterCmd procedure, cancel option, script with NULL} { +} -result {5} +test timer-6.25 {Tcl_AfterCmd procedure, cancel option, script with NUL} -setup { foreach i [after info] { after cancel $i } +} -body { set x "hello world" after 1 set x ab\0cd after cancel "set x ab\0ef" - set x [llength [after info]] + llength [after info] +} -cleanup { foreach i [after info] { after cancel $i } - set x -} {1} -test timer-6.26 {Tcl_AfterCmd procedure, cancel option, script with NULL} { +} -result {1} +test timer-6.26 {Tcl_AfterCmd procedure, cancel option, script with NUL} -setup { foreach i [after info] { after cancel $i } +} -body { set x "hello world" after 1 set x ab\0cd after cancel set x ab\0ef - set y [llength [after info]] + llength [after info] +} -cleanup { foreach i [after info] { after cancel $i } - set y -} {1} -test timer-6.27 {Tcl_AfterCmd procedure, idle option, script with NULL} { +} -result {1} +test timer-6.27 {Tcl_AfterCmd procedure, idle option, script with NUL} -setup { foreach i [after info] { after cancel $i } +} -body { set x "hello world" after idle "set x ab\0cd" update string length $x -} {5} -test timer-6.28 {Tcl_AfterCmd procedure, idle option, script with NULL} { +} -result {5} +test timer-6.28 {Tcl_AfterCmd procedure, idle option, script with NUL} -setup { foreach i [after info] { after cancel $i } +} -body { set x "hello world" after idle set x ab\0cd update string length $x -} {5} -test timer-6.29 {Tcl_AfterCmd procedure, info option, script with NULL} { +} -result {5} +test timer-6.29 {Tcl_AfterCmd procedure, info option, script with NUL} -setup { foreach i [after info] { after cancel $i } +} -body { set x "hello world" set id junk set id [after 10 set x ab\0cd] update - set y [string length [lindex [lindex [after info $id] 0] 2]] + string length [lindex [lindex [after info $id] 0] 2] +} -cleanup { foreach i [after info] { after cancel $i } - set y -} {5} +} -result 5 set event [after idle foo bar] -scan $event after#%d id - -test timer-7.1 {GetAfterEvent procedure} { - list [catch {after info xfter#$id} msg] $msg -} "1 {event \"xfter#$id\" doesn't exist}" -test timer-7.2 {GetAfterEvent procedure} { - list [catch {after info afterx$id} msg] $msg -} "1 {event \"afterx$id\" doesn't exist}" -test timer-7.3 {GetAfterEvent procedure} { - list [catch {after info after#ab} msg] $msg -} {1 {event "after#ab" doesn't exist}} -test timer-7.4 {GetAfterEvent procedure} { - list [catch {after info after#} msg] $msg -} {1 {event "after#" doesn't exist}} -test timer-7.5 {GetAfterEvent procedure} { - list [catch {after info after#${id}x} msg] $msg -} "1 {event \"after#${id}x\" doesn't exist}" -test timer-7.6 {GetAfterEvent procedure} { - list [catch {after info afterx[expr $id+1]} msg] $msg -} "1 {event \"afterx[expr $id+1]\" doesn't exist}" +scan $event after#%d lastId +test timer-7.1 {GetAfterEvent procedure} -returnCodes error -body { + after info xfter#$lastId +} -result "event \"xfter#$lastId\" doesn't exist" +test timer-7.2 {GetAfterEvent procedure} -returnCodes error -body { + after info afterx$lastId +} -result "event \"afterx$lastId\" doesn't exist" +test timer-7.3 {GetAfterEvent procedure} -returnCodes error -body { + after info after#ab +} -result {event "after#ab" doesn't exist} +test timer-7.4 {GetAfterEvent procedure} -returnCodes error -body { + after info after# +} -result {event "after#" doesn't exist} +test timer-7.5 {GetAfterEvent procedure} -returnCodes error -body { + after info after#${lastId}x +} -result "event \"after#${lastId}x\" doesn't exist" +test timer-7.6 {GetAfterEvent procedure} -returnCodes error -body { + after info afterx[expr {$lastId+1}] +} -result "event \"afterx[expr {$lastId+1}]\" doesn't exist" after cancel $event test timer-8.1 {AfterProc procedure} { @@ -474,10 +501,11 @@ test timer-8.2 {AfterProc procedure} -setup { while executing "error "After error"" ("after" script)}}} -test timer-8.3 {AfterProc procedure, deleting handler from itself} { +test timer-8.3 {AfterProc procedure, deleting handler from itself} -setup { foreach i [after info] { after cancel $i } +} -body { proc foo {} { global x set x {} @@ -489,12 +517,13 @@ test timer-8.3 {AfterProc procedure, deleting handler from itself} { after idle foo after 1000 {error "I shouldn't ever have executed"} update idletasks - set x -} {{{error "I shouldn't ever have executed"} timer}} -test timer-8.4 {AfterProc procedure, deleting handler from itself} { + return $x +} -result {{{error "I shouldn't ever have executed"} timer}} +test timer-8.4 {AfterProc procedure, deleting handler from itself} -setup { foreach i [after info] { after cancel $i } +} -body { proc foo {} { global x set x {} @@ -506,8 +535,8 @@ test timer-8.4 {AfterProc procedure, deleting handler from itself} { after 1000 {error "I shouldn't ever have executed"} after idle foo update idletasks - set x -} {{{error "I shouldn't ever have executed"} timer}} + return $x +} -result {{{error "I shouldn't ever have executed"} timer}} foreach i [after info] { after cancel $i @@ -515,9 +544,9 @@ foreach i [after info] { # No test for FreeAfterPtr, since it is already tested above. - -test timer-9.1 {AfterCleanupProc procedure} { +test timer-9.1 {AfterCleanupProc procedure} -setup { catch {interp delete x} +} -body { interp create x x eval {after 200 { lappend x after @@ -537,8 +566,8 @@ test timer-9.1 {AfterCleanupProc procedure} { set x before after 300 update - set x -} {before after2 after4} + return $x +} -result {before after2 after4} test timer-10.1 {Bug 1016167: [after] overwrites imports} -setup { interp create slave @@ -552,29 +581,22 @@ test timer-10.1 {Bug 1016167: [after] overwrites imports} -setup { interp delete slave } -result ::after -test timer-11.1 {Bug 1350291: [after] overflowing 32-bit field} \ - -body { - set b ok - set a [after 0x100000001 {set b "after fired early"}] - after 100 set done 1 - vwait done - set b - } \ - -cleanup { - catch {after cancel $a} - } \ - -result ok - -test timer-11.2 {Bug 1350293: [after] negative argument} \ - -body { - set l {} - after 100 {lappend l 100; set done 1} - after -1 {lappend l -1} - vwait done - set l - } \ - -result {-1 100} - +test timer-11.1 {Bug 1350291: [after] overflowing 32-bit field} -body { + set b ok + set a [after 0x100000001 {set b "after fired early"}] + after 100 set done 1 + vwait done + return $b +} -cleanup { + catch {after cancel $a} +} -result ok +test timer-11.2 {Bug 1350293: [after] negative argument} -body { + set l {} + after 100 {lappend l 100; set done 1} + after -1 {lappend l -1} + vwait done + return $l +} -result {-1 100} # cleanup ::tcltest::cleanupTests diff --git a/tests/unload.test b/tests/unload.test index d26f012..761f05c 100644 --- a/tests/unload.test +++ b/tests/unload.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unload.test,v 1.6 2006/12/17 03:47:08 das Exp $ +# RCS: @(#) $Id: unload.test,v 1.7 2008/04/23 15:44:38 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -41,27 +41,27 @@ set alreadyTotalLoaded [info loaded] testConstraint teststaticpkg [llength [info commands teststaticpkg]] # Basic tests: parameter testing... -test unload-1.1 {basic errors} {} { - list [catch {unload} msg] $msg -} "1 {wrong \# args: should be \"unload ?switches? fileName ?packageName? ?interp?\"}" -test unload-1.2 {basic errors} {} { - list [catch {unload a b c d} msg] $msg -} "1 {wrong \# args: should be \"unload ?switches? fileName ?packageName? ?interp?\"}" -test unload-1.3 {basic errors} {} { - list [catch {unload a b foobar} msg] $msg -} {1 {could not find interpreter "foobar"}} -test unload-1.4 {basic errors} {} { - list [catch {unload {}} msg] $msg -} {1 {must specify either file name or package name}} -test unload-1.5 {basic errors} {} { - list [catch {unload {} {}} msg] $msg -} {1 {must specify either file name or package name}} -test unload-1.6 {basic errors} {} { - list [catch {unload {} Unknown} msg] $msg -} {1 {package "Unknown" is loaded statically and cannot be unloaded}} -test unload-1.7 {-nocomplain switch} {} { - list [unload -nocomplain {} Unknown] -} {{}} +test unload-1.1 {basic errors} -returnCodes error -body { + unload +} -result {wrong # args: should be "unload ?switches? fileName ?packageName? ?interp?"} +test unload-1.2 {basic errors} -returnCodes error -body { + unload a b c d +} -result {wrong # args: should be "unload ?switches? fileName ?packageName? ?interp?"} +test unload-1.3 {basic errors} -returnCodes error -body { + unload a b foobar +} -result {could not find interpreter "foobar"} +test unload-1.4 {basic errors} -returnCodes error -body { + unload {} +} -result {must specify either file name or package name} +test unload-1.5 {basic errors} -returnCodes error -body { + unload {} {} +} -result {must specify either file name or package name} +test unload-1.6 {basic errors} -returnCodes error -body { + unload {} Unknown +} -result {package "Unknown" is loaded statically and cannot be unloaded} +test unload-1.7 {-nocomplain switch} { + unload -nocomplain {} Unknown +} {} set pkgua_loaded {} set pkgua_detached {} -- cgit v0.12 From 140933e5aa1698253bb1afadc0add0e4e068bfc9 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 24 Apr 2008 18:51:00 +0000 Subject: * tests/ioCmd.test: Extended testsuite for reflected channel implementation. Added test cases about how it handles if the rug is pulled out from under a channel (= killing threads, interpreters containing the tcl command for a channel, and channel sitting in a different interpreter/thread.) * generic/tclIORChan.c: Fixed the bugs exposed by the new testcases, redone most of the cleanup and exit handling. --- ChangeLog | 11 ++ generic/tclIORChan.c | 382 ++++++++++++++++++++++++++++++++++++++++++++------- tests/ioCmd.test | 179 +++++++++++++++++++++++- 3 files changed, 523 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc7b769..d1f6a7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-04-24 Andreas Kupries + + * tests/ioCmd.test: Extended testsuite for reflected channel + implementation. Added test cases about how it handles if the rug + is pulled out from under a channel (= killing threads, + interpreters containing the tcl command for a channel, and channel + sitting in a different interpreter/thread.) + + * generic/tclIORChan.c: Fixed the bugs exposed by the new + testcases, redone most of the cleanup and exit handling. + 2008-04-21 Don Porter * generic/tclIOUtil.c: Removed all code delimited by diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index b57d157..0c9c96b 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.30 2008/04/04 17:18:31 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.31 2008/04/24 18:51:01 andreas_kupries Exp $ */ #include @@ -85,7 +85,11 @@ typedef struct { Tcl_Channel chan; /* Back reference to generic channel * structure. */ Tcl_Interp *interp; /* Reference to the interpreter containing the - * Tcl level part of the channel. */ + * Tcl level part of the channel. NULL here + * signals the channel is dead because the + * interpreter/thread containing its Tcl + * command is gone. + */ #ifdef TCL_THREADS Tcl_ThreadId thread; /* Thread the 'interp' belongs to. */ #endif @@ -338,6 +342,13 @@ typedef struct ForwardingEvent { struct ForwardingResult { Tcl_ThreadId src; /* Originating thread. */ Tcl_ThreadId dst; /* Thread the op was forwarded to. */ + Tcl_Interp* dsti; /* Interpreter in the thread the op was forwarded to. */ + /* + * Note regarding 'dsti' above: Its information is also available via the + * chain evPtr->rcPtr->interp, however, as can be seen, two more + * indirections are needed to retrieve it. And the evPtr may be gone, + * breaking the chain. + */ Tcl_Condition done; /* Condition variable the forwarder blocks * on. */ int result; /* TCL_OK or TCL_ERROR */ @@ -347,6 +358,17 @@ struct ForwardingResult { * results. */ }; +typedef struct ThreadSpecificData { + /* + * Table of all reflected channels owned by this thread. This is the + * per-thread version of the per-interpreter map. + */ + + ReflectedChannelMap* rcmPtr; +} ThreadSpecificData; + +static Tcl_ThreadDataKey dataKey; + /* * List of forwarded operations which have not completed yet, plus the mutex * to protect the access to this process global list. @@ -361,16 +383,15 @@ TCL_DECLARE_MUTEX(rcForwardMutex) * the event function executed by the thread receiving a forwarding event * (which executes the appropriate function and collects the result, if any). * - * The two ExitProcs are handlers so that things do not deadlock when either - * thread involved in the forwarding exits. They also clean things up so that - * we don't leak resources when threads go away. + * The ExitProc ensures that things do not deadlock when the sending thread + * involved in the forwarding exits. It also clean things up so that we don't + * leak resources when threads go away. */ static void ForwardOpToOwnerThread(ReflectedChannel *rcPtr, ForwardedOperation op, const VOID *param); static int ForwardProc(Tcl_Event *evPtr, int mask); static void SrcExitProc(ClientData clientData); -static void DstExitProc(ClientData clientData); #define FreeReceivedError(p) \ if ((p)->base.mustFree) { \ @@ -395,6 +416,10 @@ static void DstExitProc(ClientData clientData); (p)->base.msgStr = (char *) (emsg) static void ForwardSetObjError(ForwardParam *p, Tcl_Obj *objPtr); + +static ReflectedChannelMap * GetThreadReflectedChannelMap(void); +static void DeleteThreadReflectedChannelMap(ClientData clientData); + #endif /* TCL_THREADS */ #define SetChannelErrorStr(c,msgStr) \ @@ -437,9 +462,10 @@ static const char *msg_write_toomuch = "{write wrote more than requested}"; static const char *msg_write_nothing = "{write wrote nothing}"; static const char *msg_seek_beforestart = "{Tried to seek before origin}"; #ifdef TCL_THREADS -static const char *msg_send_originlost = "{Origin thread lost}"; -static const char *msg_send_dstlost = "{Destination thread lost}"; +static const char *msg_send_originlost = "{Channel thread lost}"; +static const char *msg_send_dstlost = "{Owner lost}"; #endif /* TCL_THREADS */ +static const char *msg_dstlost = "-code 1 -level 0 -errorcode NONE -errorinfo {} -errorline 1 {Owner lost}"; /* * Main methods to plug into the 'chan' ensemble'. ================== @@ -696,6 +722,12 @@ TclChanCreateObjCmd( } } Tcl_SetHashValue(hPtr, chan); +#ifdef TCL_THREADS + rcmPtr = GetThreadReflectedChannelMap(); + hPtr = Tcl_CreateHashEntry(&rcmPtr->map, + chanPtr->state->channelName, &isNew); + Tcl_SetHashValue(hPtr, chan); +#endif /* * Return handle as result of command. @@ -1026,8 +1058,8 @@ ReflectClose( /* * THREADED => Forward this to the origin thread * - * Note: Have a thread delete handler for the origin thread. Use this - * to clean up the structure! + * Note: DeleteThreadReflectedChannelMap() is the thread exit handler for the origin + * thread. Use this to clean up the structure? Except if lost? */ #ifdef TCL_THREADS @@ -1098,12 +1130,26 @@ ReflectClose( * Remove the channel from the map before releasing the memory, to * prevent future accesses (like by 'postevent') from finding and * dereferencing a dangling pointer. + * + * NOTE: The channel may not be in the map. This is ok, that happens + * when the channel was created in a different interpreter and/or + * thread and then was moved here. */ rcmPtr = GetReflectedChannelMap (interp); hPtr = Tcl_FindHashEntry (&rcmPtr->map, Tcl_GetChannelName (rcPtr->chan)); - Tcl_DeleteHashEntry (hPtr); + if (hPtr) { + Tcl_DeleteHashEntry (hPtr); + } +#ifdef TCL_THREADS + rcmPtr = GetThreadReflectedChannelMap(); + hPtr = Tcl_FindHashEntry (&rcmPtr->map, + Tcl_GetChannelName (rcPtr->chan)); + if (hPtr) { + Tcl_DeleteHashEntry (hPtr); + } +#endif FreeReflectedChannel(rcPtr); #ifdef TCL_THREADS @@ -1169,6 +1215,7 @@ ReflectInput( if (p.base.code != TCL_OK) { PassReceivedError(rcPtr->chan, &p); *errorCodePtr = EINVAL; + p.input.toRead = -1; } else { *errorCodePtr = EOK; } @@ -1263,6 +1310,7 @@ ReflectOutput( if (p.base.code != TCL_OK) { PassReceivedError(rcPtr->chan, &p); *errorCodePtr = EINVAL; + p.output.toWrite = -1; } else { *errorCodePtr = EOK; } @@ -1361,6 +1409,7 @@ ReflectSeekWide( if (p.base.code != TCL_OK) { PassReceivedError(rcPtr->chan, &p); *errorCodePtr = EINVAL; + p.seek.offset = -1; } else { *errorCodePtr = EOK; } @@ -2066,9 +2115,24 @@ InvokeTclMethod( int result; /* Result code of method invokation */ Tcl_Obj *resObj = NULL; /* Result of method invokation. */ + if (!rcPtr->interp) { + /* + * The channel is marked as dead. Bail out immediately, with an + * appropriate error. + */ + + if (resultObjPtr != NULL) { + resObj = Tcl_NewStringObj(msg_dstlost,-1); + *resultObjPtr = resObj; + Tcl_IncrRefCount(resObj); + } + return TCL_ERROR; + } + /* * NOTE (5): Decide impl. issue: Cache objects with method names? Needs * TSD data as reflections can be created in many different threads. + * NO: Caching of command resolutions means storage per channel. */ /* @@ -2242,11 +2306,25 @@ DeleteReflectedChannelMap( ReflectedChannelMap* rcmPtr; /* The map */ Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ + ReflectedChannel* rcPtr; + Tcl_Channel chan; + +#ifdef TCL_THREADS + ForwardingResult *resultPtr; + ForwardingEvent *evPtr; + ForwardParam *paramPtr; +#endif /* - * Delete all entries. The channels may have been closed alreay, or will + * Delete all entries. The channels may have been closed already, or will * be closed later, by the standard IO finalization of an interpreter - * under destruction. + * under destruction. Except for the channels which were moved to a + * different interpreter and/or thread. They do not exist from the IO + * systems point of view and will not get closed. Therefore mark all as + * dead so that any future access will cause a proper error. For channels + * in a different thread we actually do the same as + * DeleteThreadReflectedChannelMap(), just restricted to the channels of + * this interp. */ rcmPtr = clientData; @@ -2254,13 +2332,208 @@ DeleteReflectedChannelMap( hPtr != NULL; hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { + chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); + rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); + + rcPtr->interp = NULL; + Tcl_DeleteHashEntry(hPtr); } Tcl_DeleteHashTable(&rcmPtr->map); ckfree((char *) &rcmPtr->map); + +#ifdef TCL_THREADS + /* + * The origin interpreter for one or more reflected channels is gone. + */ + + /* + * Go through the list of pending results and cancel all whose events were + * destined for this interpreter. While this is in progress we block any + * other access to the list of pending results. + */ + + Tcl_MutexLock(&rcForwardMutex); + + for (resultPtr = forwardList; + resultPtr != NULL; + resultPtr = resultPtr->nextPtr) { + if (resultPtr->dsti != interp) { + /* Ignore results/events for other interpreters. */ + continue; + } + + /* + * The receiver for the event exited, before processing the event. We + * detach the result now, wake the originator up and signal failure. + */ + + evPtr = resultPtr->evPtr; + paramPtr = evPtr->param; + + evPtr->resultPtr = NULL; + resultPtr->evPtr = NULL; + resultPtr->result = TCL_ERROR; + + ForwardSetStaticError(paramPtr, msg_send_dstlost); + + Tcl_ConditionNotify(&resultPtr->done); + } + + /* + * Get the map of all channels handled by the current thread. This is a + * ReflectedChannelMap, but on a per-thread basis, not per-interp. Go + * through the channels and remove all which were handled by this + * interpreter. They have already been marked as dead. + */ + + rcmPtr = GetThreadReflectedChannelMap(); + for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&hSearch)) { + + chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); + rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); + + if (rcPtr->interp != interp) { + /* Ignore entries for other interpreters */ + continue; + } + + Tcl_DeleteHashEntry(hPtr); + } + + Tcl_MutexUnlock(&rcForwardMutex); +#endif } #ifdef TCL_THREADS +/* + *---------------------------------------------------------------------- + * + * GetThreadReflectedChannelMap -- + * + * Gets and potentially initializes the reflected channel map for a + * thread. + * + * Results: + * A pointer to the map created, for use by the caller. + * + * Side effects: + * Initializes the reflected channel map for a thread. + * + *---------------------------------------------------------------------- + */ + +static ReflectedChannelMap * +GetThreadReflectedChannelMap() +{ + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + + if (!tsdPtr->rcmPtr) { + tsdPtr->rcmPtr = (ReflectedChannelMap *) ckalloc(sizeof(ReflectedChannelMap)); + Tcl_InitHashTable(&tsdPtr->rcmPtr->map, TCL_STRING_KEYS); + Tcl_CreateThreadExitHandler(DeleteThreadReflectedChannelMap, NULL); + } + + return tsdPtr->rcmPtr; +} + +/* + *---------------------------------------------------------------------- + * + * DeleteThreadReflectedChannelMap -- + * + * Deletes the channel table for a thread. This procedure is invoked when + * a thread is deleted. The channels have already been marked as dead, in + * DeleteReflectedChannelMap(). + * + * Results: + * None. + * + * Side effects: + * Deletes the hash table of channels. + * + *---------------------------------------------------------------------- + */ + +static void +DeleteThreadReflectedChannelMap( + ClientData clientData) /* The per-thread data structure. */ +{ + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + Tcl_HashSearch hSearch; /* Search variable. */ + Tcl_HashEntry *hPtr; /* Search variable. */ + Tcl_ThreadId self = Tcl_GetCurrentThread(); + + ReflectedChannelMap* rcmPtr; /* The map */ + Tcl_Channel chan; + ReflectedChannel* rcPtr; + ForwardingResult *resultPtr; + ForwardingEvent *evPtr; + ForwardParam *paramPtr; + + /* + * The origin thread for one or more reflected channels is gone. + * NOTE: If this function is called due to a thread getting killed the + * per-interp DeleteReflectedChannelMap is apparently not called. + */ + + /* + * Go through the list of pending results and cancel all whose events were + * destined for this thread. While this is in progress we block any + * other access to the list of pending results. + */ + + Tcl_MutexLock(&rcForwardMutex); + + for (resultPtr = forwardList; + resultPtr != NULL; + resultPtr = resultPtr->nextPtr) { + if (resultPtr->dst != self) { + /* Ignore results/events for other threads. */ + continue; + } + + /* + * The receiver for the event exited, before processing the event. We + * detach the result now, wake the originator up and signal failure. + */ + + evPtr = resultPtr->evPtr; + paramPtr = evPtr->param; + + evPtr->resultPtr = NULL; + resultPtr->evPtr = NULL; + resultPtr->result = TCL_ERROR; + + ForwardSetStaticError(paramPtr, msg_send_dstlost); + + Tcl_ConditionNotify(&resultPtr->done); + } + + /* + * Get the map of all channels handled by the current thread. This is a + * ReflectedChannelMap, but on a per-thread basis, not per-interp. Go + * through the channels, remove all, mark them as dead. + */ + + rcmPtr = GetThreadReflectedChannelMap(); + for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); + hPtr != NULL; + hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { + + chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); + rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); + + rcPtr->interp = NULL; + + Tcl_DeleteHashEntry(hPtr); + } + + Tcl_MutexUnlock(&rcForwardMutex); +} + static void ForwardOpToOwnerThread( ReflectedChannel *rcPtr, /* Channel instance */ @@ -2273,6 +2546,24 @@ ForwardOpToOwnerThread( int result; /* + * We gather the lock early. This allows us to check the liveness of the + * channel without interference from DeleteThreadReflectedChannelMap(). + */ + + Tcl_MutexLock(&rcForwardMutex); + + if (rcPtr->interp == NULL) { + /* + * The channel is marked as dead. Bail out immediately, with an + * appropriate error. Do not forget to unlock the mutex on this path. + */ + + ForwardSetStaticError((ForwardParam *)param, msg_send_dstlost); + Tcl_MutexUnlock(&rcForwardMutex); + return; + } + + /* * Create and initialize the event and data structures. */ @@ -2285,8 +2576,9 @@ ForwardOpToOwnerThread( evPtr->rcPtr = rcPtr; evPtr->param = (ForwardParam *) param; - resultPtr->src = Tcl_GetCurrentThread(); - resultPtr->dst = dst; + resultPtr->src = Tcl_GetCurrentThread(); + resultPtr->dst = dst; + resultPtr->dsti = rcPtr->interp; resultPtr->done = NULL; resultPtr->result = -1; resultPtr->evPtr = evPtr; @@ -2295,16 +2587,18 @@ ForwardOpToOwnerThread( * Now execute the forward. */ - Tcl_MutexLock(&rcForwardMutex); TclSpliceIn(resultPtr, forwardList); + /* Do not unlock here. That is done by the ConditionWait */ /* - * Ensure cleanup of the event if any of the two involved threads exits - * while this event is pending or in progress. + * Ensure cleanup of the event if the origin thread exits while this event + * is pending or in progress. Exitus of the destination thread is handled + * by DeleteThreadReflectionChannelMap(), this is set up by + * GetThreadReflectedChannelMap(). This is what we use the 'forwardList' + * (see above) for. */ Tcl_CreateThreadExitHandler(SrcExitProc, (ClientData) evPtr); - Tcl_CreateThreadExitHandler(DstExitProc, (ClientData) evPtr); /* * Queue the event and poke the other thread's notifier. @@ -2323,6 +2617,9 @@ ForwardOpToOwnerThread( * NOTE (1): Is it possible that the current thread goes away while * waiting here? IOW Is it possible that "SrcExitProc" is called while * we are here? See complementary note (2) in "SrcExitProc" + * + * The ConditionWait unlocks the mutex during the wait and relocks it + * immediately after. */ Tcl_ConditionWait(&resultPtr->done, &rcForwardMutex, NULL); @@ -2330,6 +2627,7 @@ ForwardOpToOwnerThread( /* * Unlink result from the forwarder list. + * No need to lock. Either still locked, or locked by the ConditionWait */ TclSpliceOut(resultPtr, forwardList); @@ -2341,14 +2639,13 @@ ForwardOpToOwnerThread( Tcl_ConditionFinalize(&resultPtr->done); /* - * Kill the cleanup handlers now, and the result structure as well, before + * Kill the cleanup handler now, and the result structure as well, before * returning the success code. * * Note: The event structure has already been deleted. */ Tcl_DeleteThreadExitHandler(SrcExitProc, (ClientData) evPtr); - Tcl_DeleteThreadExitHandler(DstExitProc, (ClientData) evPtr); result = resultPtr->result; ckfree((char*) resultPtr); @@ -2378,6 +2675,8 @@ ForwardProc( Tcl_Interp *interp = rcPtr->interp; ForwardParam *paramPtr = evPtr->param; Tcl_Obj *resObj = NULL; /* Interp result of InvokeTclMethod */ + ReflectedChannelMap* rcmPtr; /* Map of reflected channels with handlers in this interp */ + Tcl_HashEntry* hPtr; /* Entry in the above map */ /* * Ignore the event if no one is waiting for its result anymore. @@ -2411,8 +2710,22 @@ ForwardProc( * Freeing is done here, in the origin thread, because the argv[] * objects belong to this thread. Deallocating them in a different * thread is not allowed + * + * We remove the channel from both interpreter and thread maps before + * releasing the memory, to prevent future accesses (like by + * 'postevent') from finding and dereferencing a dangling pointer. */ + rcmPtr = GetReflectedChannelMap (interp); + hPtr = Tcl_FindHashEntry (&rcmPtr->map, + Tcl_GetChannelName (rcPtr->chan)); + Tcl_DeleteHashEntry (hPtr); + + rcmPtr = GetThreadReflectedChannelMap(); + hPtr = Tcl_FindHashEntry (&rcmPtr->map, + Tcl_GetChannelName (rcPtr->chan)); + Tcl_DeleteHashEntry (hPtr); + FreeReflectedChannel(rcPtr); break; @@ -2674,33 +2987,6 @@ SrcExitProc( } static void -DstExitProc( - ClientData clientData) -{ - ForwardingEvent *evPtr = (ForwardingEvent *) clientData; - ForwardingResult *resultPtr = evPtr->resultPtr; - ForwardParam *paramPtr = evPtr->param; - - /* - * NOTE (3): It is not clear if the event still exists when this handler - * is called. We might have to use 'resultPtr' as our clientData instead. - */ - - /* - * The receiver for the event exited, before processing the event. We - * detach the result now, wake the originator up and signal failure. - */ - - evPtr->resultPtr = NULL; - resultPtr->evPtr = NULL; - resultPtr->result = TCL_ERROR; - - ForwardSetStaticError(paramPtr, msg_send_dstlost); - - Tcl_ConditionNotify(&resultPtr->done); -} - -static void ForwardSetObjError( ForwardParam *paramPtr, Tcl_Obj *obj) diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 5a0d1ba..82c9645 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.41 2008/04/21 16:26:39 dgp Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.42 2008/04/24 18:51:01 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -779,6 +779,11 @@ test iocmd-21.19 {chan create, init failure -> no channel, no finalize} -match g # --- --- --- --------- --------- --------- # Helper commands to record the arguments to handler methods. +# Stored in a script so that the threads and interpreters needing this +# code do not need their own copy but can access this variable. + +set helperscript { + proc note {item} {global res; lappend res $item; return} proc track {} {upvar args item; note $item; return} proc notes {items} {foreach i $items {note $i}} @@ -806,6 +811,10 @@ proc onfinal {} { if {[lindex $hargs 0] ne "finalize"} {return} return -code return "" } +} + +# Set everything up in the main thread. +eval $helperscript # --- --- --- --------- --------- --------- # method finalize @@ -1829,6 +1838,90 @@ test iocmd-31.8 {chan postevent after close throws error} -match glob -setup { rename dummy {} } -returnCodes error -result {can not find reflected channel named "rc*"} +# --- === *** ########################### +# 'Pull the rug' tests. Create channel in a interpreter A, move to +# other interpreter B, destroy the origin interpreter (A) before or +# during access from B. Must not crash, must return proper errors. + +test iocmd-32.0 {origin interpreter of moved channel gone} -match glob -body { + + set ida [interp create];#puts <<$ida>> + set idb [interp create];#puts <<$idb>> + + # Magic to get the test* commands in the slaves + load {} Tcltest $ida + load {} Tcltest $idb + + # Set up channel in interpreter + interp eval $ida $helperscript + set chan [interp eval $ida { + proc foo {args} {oninit seek; onfinal; track; return} + set chan [chan create {r w} foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd interpreter. + interp eval $ida [list testchannel cut $chan] + interp eval $idb [list testchannel splice $chan] + + # Kill origin interpreter, then access channel from 2nd interpreter. + interp delete $ida + + set res {} + lappend res [catch {interp eval $idb [list puts $chan shoo]} msg] $msg + lappend res [catch {interp eval $idb [list tell $chan]} msg] $msg + lappend res [catch {interp eval $idb [list seek $chan 1]} msg] $msg + lappend res [catch {interp eval $idb [list gets $chan]} msg] $msg + lappend res [catch {interp eval $idb [list close $chan]} msg] $msg + set res + +} -constraints {testchannel} \ + -result {1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} + +test iocmd-32.1 {origin interpreter of moved channel destroyed during access} -match glob -body { + + set ida [interp create];#puts <<$ida>> + set idb [interp create];#puts <<$idb>> + + # Magic to get the test* commands in the slaves + load {} Tcltest $ida + load {} Tcltest $idb + + # Set up channel in thread + set chan [interp eval $ida $helperscript] + set chan [interp eval $ida { + proc foo {args} { + oninit; onfinal; track; + # destroy interpreter during channel access + # Actually not possible for an interp to destory itself. + interp delete {} + return} + set chan [chan create {r w} foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd thread. + interp eval $ida [list testchannel cut $chan] + interp eval $idb [list testchannel splice $chan] + + # Run access from interpreter B, this will give us a synchronous + # response. + + interp eval $idb [list set chan $chan] + interp eval $idb [list set mid $tcltest::mainThread] + set res [interp eval $idb { + # wait a bit, give the main thread the time to start its event + # loop to wait for the response from B + after 2000 + catch { puts $chan shoo } res + set res + }] + set res +} -constraints {testchannel impossible} \ + -result {Owner lost} + # ### ### ### ######### ######### ######### ## Same tests as above, but exercising the code forwarding and ## receiving driver operations to the originator thread. @@ -3217,6 +3310,90 @@ test iocmd.tf-31.8 {chan postevent, bad input} -match glob -body { } -constraints {testchannel testthread} \ -result {{can not find reflected channel named "rc*"}} +# --- === *** ########################### +# 'Pull the rug' tests. Create channel in a thread A, move to other +# thread B, destroy the origin thread (A) before or during access from +# B. Must not crash, must return proper errors. + +test iocmd.tf-32.0 {origin thread of moved channel gone} -match glob -body { + + #puts <<$tcltest::mainThread>>main + set tida [testthread create];#puts <<$tida>> + set tidb [testthread create];#puts <<$tidb>> + + # Set up channel in thread + testthread send $tida $helperscript + set chan [testthread send $tida { + proc foo {args} {oninit seek; onfinal; track; return} + set chan [chan create {r w} foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd thread. + testthread send $tida [list testchannel cut $chan] + testthread send $tidb [list testchannel splice $chan] + + # Kill origin thread, then access channel from 2nd thread. + testthread send -async $tida {testthread exit} + after 100 + + set res {} + lappend res [catch {testthread send $tidb [list puts $chan shoo]} msg] $msg + + lappend res [catch {testthread send $tidb [list tell $chan]} msg] $msg + lappend res [catch {testthread send $tidb [list seek $chan 1]} msg] $msg + lappend res [catch {testthread send $tidb [list gets $chan]} msg] $msg + lappend res [catch {testthread send $tidb [list close $chan]} msg] $msg + tcltest::threadReap + set res + +} -constraints {testchannel testthread} \ + -result {1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} + +test iocmd.tf-32.1 {origin thread of moved channel destroyed during access} -match glob -body { + + #puts <<$tcltest::mainThread>>main + set tida [testthread create];#puts <<$tida>> + set tidb [testthread create];#puts <<$tidb>> + + # Set up channel in thread + set chan [testthread send $tida $helperscript] + set chan [testthread send $tida { + proc foo {args} { + oninit; onfinal; track; + # destroy thread during channel access + testthread exit + return} + set chan [chan create {r w} foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd thread. + testthread send $tida [list testchannel cut $chan] + testthread send $tidb [list testchannel splice $chan] + + # Run access from thread B, wait for response from A (A is not + # using event loop at this point, so the event pile up in the + # queue. + + testthread send $tidb [list set chan $chan] + testthread send $tidb [list set mid $tcltest::mainThread] + testthread send -async $tidb { + # wait a bit, give the main thread the time to start its event + # loop to wait for the response from B + after 2000 + catch { puts $chan shoo } res + testthread send -async $mid [list set ::res $res] + } + vwait ::res + + tcltest::threadReap + set res +} -constraints {testchannel testthread} \ + -result {Owner lost} + # ### ### ### ######### ######### ######### # ### ### ### ######### ######### ######### -- cgit v0.12 From 9cd73daf723396e0a13996ec11b0b8781888af28 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 24 Apr 2008 21:11:57 +0000 Subject: define DLLEXPORT as __attribute__ ((visibility("default"))) for gcc >= 4.0. This allows extensions to be compiled with -fvisiblity=hidden and still all symbols decorated with EXPORT. See: --- generic/tcl.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index 1d4b94b..10ef922 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.255 2008/04/01 16:23:39 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.256 2008/04/24 21:11:57 nijtmans Exp $ */ #ifndef _TCL @@ -172,26 +172,27 @@ extern "C" { #if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec)))) # define HAVE_DECLSPEC 1 -#endif - -#ifdef STATIC_BUILD -# define DLLIMPORT -# define DLLEXPORT -# if HAVE_DECLSPEC && defined(_DLL) -# define CRTIMPORT __declspec(dllimport) +# ifdef STATIC_BUILD +# define DLLIMPORT +# define DLLEXPORT +# ifdef _DLL +# define CRTIMPORT __declspec(dllimport) +# else +# define CRTIMPORT +# endif # else -# define CRTIMPORT +# define DLLIMPORT __declspec(dllimport) +# define DLLEXPORT __declspec(dllexport) +# define CRTIMPORT __declspec(dllimport) # endif #else -# if HAVE_DECLSPEC -# define DLLIMPORT __declspec(dllimport) -# define DLLEXPORT __declspec(dllexport) -# define CRTIMPORT __declspec(dllimport) +# define DLLIMPORT +# if defined(__GNUC__) && __GNUC__ > 3 +# define DLLEXPORT __attribute__ ((visibility("default"))) # else -# define DLLIMPORT -# define DLLEXPORT -# define CRTIMPORT +# define DLLEXPORT # endif +# define CRTIMPORT #endif /* -- cgit v0.12 From afd3852ca75b63c65cc82fa602970e763f47290e Mon Sep 17 00:00:00 2001 From: das Date: Fri, 25 Apr 2008 21:27:09 +0000 Subject: fix warning --- generic/tclIORChan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 0c9c96b..b64a32e 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.31 2008/04/24 18:51:01 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.32 2008/04/25 21:27:09 das Exp $ */ #include @@ -2461,7 +2461,6 @@ static void DeleteThreadReflectedChannelMap( ClientData clientData) /* The per-thread data structure. */ { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ Tcl_ThreadId self = Tcl_GetCurrentThread(); -- cgit v0.12 From 73658e4d1b3f4b4ffc846c711a9d55c64d16b61b Mon Sep 17 00:00:00 2001 From: das Date: Fri, 25 Apr 2008 21:28:13 +0000 Subject: remove ioUtil.test, llvm-gcc fix --- macosx/Tcl.xcodeproj/project.pbxproj | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 36d7bf1..f0cea1f 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -703,7 +703,6 @@ F96D437B08F272B6004A47F5 /* io.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = io.test; sourceTree = ""; }; F96D437C08F272B6004A47F5 /* ioCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ioCmd.test; sourceTree = ""; }; F96D437D08F272B6004A47F5 /* iogt.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = iogt.test; sourceTree = ""; }; - F96D437E08F272B6004A47F5 /* ioUtil.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ioUtil.test; sourceTree = ""; }; F96D437F08F272B6004A47F5 /* join.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = join.test; sourceTree = ""; }; F96D438008F272B6004A47F5 /* lindex.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lindex.test; sourceTree = ""; }; F96D438108F272B6004A47F5 /* link.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = link.test; sourceTree = ""; }; @@ -933,7 +932,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.32 2008/03/28 14:35:44 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.33 2008/04/25 21:28:13 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1603,7 +1602,6 @@ F96D437B08F272B6004A47F5 /* io.test */, F96D437C08F272B6004A47F5 /* ioCmd.test */, F96D437D08F272B6004A47F5 /* iogt.test */, - F96D437E08F272B6004A47F5 /* ioUtil.test */, F96D437F08F272B6004A47F5 /* join.test */, F96D438008F272B6004A47F5 /* lindex.test */, F96D438108F272B6004A47F5 /* link.test */, @@ -2578,9 +2576,8 @@ ARCHS = ( ppc, i386, - x86_64, ); - CFLAGS = "-arch ppc -arch i386 -arch x86_64 $(CFLAGS)"; + CFLAGS = "-arch ppc -arch i386 $(CFLAGS)"; DEBUG_INFORMATION_FORMAT = dwarf; GCC = "$(DEVELOPER_DIR)/usr/bin/llvm-gcc"; GCC_OPTIMIZATION_LEVEL = 4; -- cgit v0.12 From 99a92c56e27cbad54bae820d66f83a04065da5e6 Mon Sep 17 00:00:00 2001 From: vasiljevic Date: Sat, 26 Apr 2008 11:53:23 +0000 Subject: generic/tclAsync.c: Tcl_AsyncDelete(): panic if attempt to locate handler token fails. Happens when some other thread attempts to delete somebody else's token. --- ChangeLog | 6 ++++++ generic/tclAsync.c | 44 ++++++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1f6a7b..f799bf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-26 Zoran Vasiljevic + + * generic/tclAsync.c: Tcl_AsyncDelete(): panic if attempt + to locate handler token fails. Happens when some other + thread attempts to delete somebody else's token. + 2008-04-24 Andreas Kupries * tests/ioCmd.test: Extended testsuite for reflected channel diff --git a/generic/tclAsync.c b/generic/tclAsync.c index c088ce5..2fd4347 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAsync.c,v 1.13 2007/12/13 15:23:14 dgp Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.14 2008/04/26 11:53:24 vasiljevic Exp $ */ #include "tclInt.h" @@ -259,6 +259,13 @@ Tcl_AsyncInvoke( * Side effects: * The state associated with the handler is deleted. * + * Failure to locate the handler in current thread private list + * of async handlers will result in panic; exception: the list + * is already empty (potential trouble?). + * Consequently, threads should create and delete handlers + * themselves. I.e. a handler created by one should not be + * deleted by some other thread. + * *---------------------------------------------------------------------- */ @@ -268,31 +275,32 @@ Tcl_AsyncDelete( { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); AsyncHandler *asyncPtr = (AsyncHandler *) async; - AsyncHandler *prevPtr; + AsyncHandler *prevPtr, *thisPtr; /* - * Conservatively check the existence of the linked list of - * registered handlers, as we may come at this point even - * when the TSD's for the current thread have been already - * garbage-collected. + * If we come to this point when TSD's for the current + * thread have already been garbage-collected, we are + * in the _serious_ trouble. OTOH, we tolerate calling + * with already cleaned-up handler list (should we?). */ Tcl_MutexLock(&tsdPtr->asyncMutex); - if (tsdPtr->firstHandler != NULL ) { - if (tsdPtr->firstHandler == asyncPtr) { + if (tsdPtr->firstHandler != NULL) { + prevPtr = thisPtr = tsdPtr->firstHandler; + while (thisPtr != NULL && thisPtr != asyncPtr) { + prevPtr = thisPtr; + thisPtr = thisPtr->nextPtr; + } + if (thisPtr == NULL) { + panic("Tcl_AsyncDelete: cannot find async handler"); + } + if (asyncPtr == tsdPtr->firstHandler) { tsdPtr->firstHandler = asyncPtr->nextPtr; - if (tsdPtr->firstHandler == NULL) { - tsdPtr->lastHandler = NULL; - } } else { - prevPtr = tsdPtr->firstHandler; - while (prevPtr->nextPtr != asyncPtr) { - prevPtr = prevPtr->nextPtr; - } prevPtr->nextPtr = asyncPtr->nextPtr; - if (tsdPtr->lastHandler == asyncPtr) { - tsdPtr->lastHandler = prevPtr; - } + } + if (asyncPtr == tsdPtr->lastHandler) { + tsdPtr->lastHandler = prevPtr; } } Tcl_MutexUnlock(&tsdPtr->asyncMutex); -- cgit v0.12 From a85067c3276c504baded33ddeaab0f61f8dad6f1 Mon Sep 17 00:00:00 2001 From: vasiljevic Date: Sun, 27 Apr 2008 08:36:20 +0000 Subject: Also, panic early if we find out the wrong thread attempting to delete the async handler (common trap). As, only the one that created the handler is allowed to delete it. --- ChangeLog | 4 ++++ generic/tclAsync.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f799bf0..e9e38f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ to locate handler token fails. Happens when some other thread attempts to delete somebody else's token. + Also, panic early if we find out the wrong thread attempting + to delete the async handler (common trap). As, only the one + that created the handler is allowed to delete it. + 2008-04-24 Andreas Kupries * tests/ioCmd.test: Extended testsuite for reflected channel diff --git a/generic/tclAsync.c b/generic/tclAsync.c index 2fd4347..f57c456 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAsync.c,v 1.14 2008/04/26 11:53:24 vasiljevic Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.15 2008/04/27 08:36:20 vasiljevic Exp $ */ #include "tclInt.h" @@ -262,7 +262,7 @@ Tcl_AsyncInvoke( * Failure to locate the handler in current thread private list * of async handlers will result in panic; exception: the list * is already empty (potential trouble?). - * Consequently, threads should create and delete handlers + * Consequently, threads should create and delete handlers * themselves. I.e. a handler created by one should not be * deleted by some other thread. * @@ -278,6 +278,14 @@ Tcl_AsyncDelete( AsyncHandler *prevPtr, *thisPtr; /* + * Assure early handling of the constraint + */ + + if (asyncPtr->originThrdId != Tcl_GetCurrentThread()) { + panic("Tcl_AsyncDelete: async handler deleted by the wrong thread"); + } + + /* * If we come to this point when TSD's for the current * thread have already been garbage-collected, we are * in the _serious_ trouble. OTOH, we tolerate calling -- cgit v0.12 From 60e86b2a4795ded3f41e7361470071827477f5b0 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sun, 27 Apr 2008 10:59:26 +0000 Subject: Added a htmlhelp target to replace winhelp --- win/makefile.vc | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 3a5ada9..af07425 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -1,4 +1,4 @@ -#------------------------------------------------------------------------------ +#------------------------------------------------------------- -*- makefile -*- # makefile.vc -- # # Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+) @@ -12,7 +12,7 @@ # Copyright (c) 2001-2004 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.177 2008/04/02 04:27:25 dgp Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.178 2008/04/27 10:59:26 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -61,8 +61,14 @@ the build instructions. # makefile. Helpful to avoid problems when the sources are # refreshed and you rebuild, but can "overbuild" when common # headers like tclInt.h just get small changes. -# winhelp -- Builds the windows .hlp file for Tcl from the troff man -# files found in $(ROOT)\doc . +# htmlhtml -- Builds a Windows .chm help file for Tcl and Tk from the +# troff manual pages found in $(ROOT)\doc. You need to +# have installed the HTML Help Compiler package from Microsoft +# to produce the .chm file. +# winhelp -- (deprecated) Builds the windows .hlp file for Tcl from +# the troff man files found in $(ROOT)\doc. This type of +# help file is deprecated by Microsoft in favour of html +# help files (.chm) # # 4) Macros usable on the commandline: # INSTALLDIR= @@ -524,7 +530,7 @@ test: setup $(TCLTEST) dlls $(CAT32) runtest: setup $(TCLTEST) dlls $(CAT32) set TCL_LIBRARY=$(ROOT)/library - $(TCLTEST) + $(DEBUGGER) $(TCLTEST) setup: @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR) @@ -628,9 +634,48 @@ gentommath_h: !endif #--------------------------------------------------------------------- -# Build the windows help file. +# Build the Windows HTML help file. #--------------------------------------------------------------------- +!ifndef HHC +HHC="C:\Program Files\HTML Help Workshop\hhc.exe" +!endif +HTMLDIR=$(ROOT)\html +HTMLBASE=TclTk$(VERSION) +HHPFILE=$(HTMLDIR)\$(HTMLBASE).hhp +CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm + +htmlhelp: chmsetup $(HHPFILE) + $(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl + $(HHC) $(HHPFILE) >NUL + +chmsetup: + @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR) + +$(HHPFILE): + type << > $@ +[OPTIONS] +Compatibility=1.1 or later +Compiled file=$(HTMLBASE).chm +Display compile progress=no +Error log file=$(HTMLBASE).log +Language=0x809 English (United Kingdom) +Title=Tcl/Tk $(DOT_VERSION) Help +[FILES] +contents.htm +docs.css +Keywords +TclCmd +TclLib +TkCmd +TkLib +UserCmd +<< + +#------------------------------------------------------------------------- +# Build the old-style Windows .hlp file +#------------------------------------------------------------------------- + TCLHLPBASE = $(PROJECT)$(VERSION) HELPFILE = $(OUT_DIR)\$(TCLHLPBASE).hlp HELPCNT = $(OUT_DIR)\$(TCLHLPBASE).cnt @@ -688,11 +733,18 @@ $(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX) $(DOCDIR)\* $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(VERSION) $(DOCDIR:\=/) install-docs: +!if exist($(CHMFILE)) + @echo Installing compiled html help + @$(CPY) "$(CHMFILE)" "$(DOC_INSTALL_DIR)\" +!else !if exist($(HELPFILE)) + @echo Installing Windows help @$(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\" @$(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\" !endif +!endif +#" #--------------------------------------------------------------------- # Build tclConfig.sh for the TEA build system. #--------------------------------------------------------------------- -- cgit v0.12 From 26c09b8c918f8223a38fc764aa9a39fb8ce45991 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 27 Apr 2008 22:21:26 +0000 Subject: Get rid of pre-C89-isms (esp. CONST vs const). --- ChangeLog | 44 ++++--- compat/memcmp.c | 12 +- compat/strncasecmp.c | 14 +- compat/strtod.c | 8 +- compat/strtol.c | 6 +- compat/strtoul.c | 6 +- generic/regc_color.c | 28 ++-- generic/regc_cvec.c | 6 +- generic/regc_lex.c | 12 +- generic/regc_nfa.c | 66 +++++----- generic/rege_dfa.c | 2 +- generic/regexec.c | 20 +-- generic/regfronts.c | 6 +- generic/tclBinary.c | 4 +- generic/tclCkalloc.c | 46 +++---- generic/tclCmdAH.c | 48 +++---- generic/tclCmdIL.c | 122 ++++++++--------- generic/tclCmdMZ.c | 44 +++---- generic/tclConfig.c | 33 +++-- generic/tclEncoding.c | 124 ++++++++--------- generic/tclEvent.c | 16 +-- generic/tclExecute.c | 6 +- generic/tclFCmd.c | 32 ++--- generic/tclGet.c | 10 +- generic/tclHash.c | 40 +++--- generic/tclHistory.c | 4 +- generic/tclIORChan.c | 197 ++++++++++++++------------- generic/tclIOUtil.c | 4 +- generic/tclLink.c | 37 +++--- generic/tclListObj.c | 22 ++-- generic/tclLoadNone.c | 6 +- generic/tclMain.c | 24 ++-- generic/tclObj.c | 81 ++++++------ generic/tclPanic.c | 29 ++-- generic/tclParse.c | 4 +- generic/tclPathObj.c | 4 +- generic/tclPipe.c | 30 ++--- generic/tclPosixStr.c | 10 +- generic/tclProc.c | 46 +++---- generic/tclResolve.c | 17 +-- generic/tclResult.c | 22 ++-- generic/tclScan.c | 10 +- generic/tclStubLib.c | 42 +++--- generic/tclTestObj.c | 10 +- generic/tclTestProcBodyObj.c | 14 +- generic/tclTimer.c | 6 +- generic/tclUtf.c | 80 +++++------ generic/tclUtil.c | 107 +++++++-------- macosx/tclMacOSXBundle.c | 8 +- macosx/tclMacOSXFCmd.c | 12 +- unix/tclAppInit.c | 10 +- unix/tclLoadDl.c | 12 +- unix/tclLoadDyld.c | 8 +- unix/tclLoadNext.c | 8 +- unix/tclLoadOSF.c | 8 +- unix/tclLoadShl.c | 8 +- unix/tclUnixFCmd.c | 93 +++++++------ unix/tclUnixFile.c | 307 ++++++++++++++++++++++--------------------- unix/tclUnixInit.c | 32 ++--- unix/tclUnixSock.c | 12 +- unix/tclUnixTest.c | 40 +++--- unix/tclUnixTime.c | 14 +- unix/tclXtTest.c | 6 +- win/tclAppInit.c | 6 +- win/tclWin32Dll.c | 219 +++++++++++++++--------------- win/tclWinChan.c | 39 +++--- win/tclWinConsole.c | 8 +- win/tclWinDde.c | 14 +- win/tclWinFCmd.c | 66 +++++----- win/tclWinInit.c | 26 ++-- win/tclWinLoad.c | 8 +- win/tclWinReg.c | 76 +++++------ win/tclWinSerial.c | 24 ++-- win/tclWinThrd.c | 4 +- win/tclWinTime.c | 9 +- 75 files changed, 1330 insertions(+), 1308 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9e38f1..d662043 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,32 +1,40 @@ +2008-04-27 Donal K. Fellows + + * */*.c: A large tranche of getting rid of pre-C89-isms; if your + compiler doesn't support things like proper function declarations, + 'void' and 'const', borrow a proper one when building Tcl. (The header + files allow building things that link against Tcl with really ancient + compilers still; the requirement is just when building Tcl itself.) + 2008-04-26 Zoran Vasiljevic - * generic/tclAsync.c: Tcl_AsyncDelete(): panic if attempt - to locate handler token fails. Happens when some other - thread attempts to delete somebody else's token. + * generic/tclAsync.c: Tcl_AsyncDelete(): panic if attempt to locate + handler token fails. Happens when some other thread attempts to delete + somebody else's token. - Also, panic early if we find out the wrong thread attempting - to delete the async handler (common trap). As, only the one - that created the handler is allowed to delete it. + Also, panic early if we find out the wrong thread attempting to delete + the async handler (common trap). As, only the one that created the + handler is allowed to delete it. 2008-04-24 Andreas Kupries * tests/ioCmd.test: Extended testsuite for reflected channel - implementation. Added test cases about how it handles if the rug - is pulled out from under a channel (= killing threads, - interpreters containing the tcl command for a channel, and channel - sitting in a different interpreter/thread.) + implementation. Added test cases about how it handles if the rug is + pulled out from under a channel (= killing threads, interpreters + containing the tcl command for a channel, and channel sitting in a + different interpreter/thread.) - * generic/tclIORChan.c: Fixed the bugs exposed by the new - testcases, redone most of the cleanup and exit handling. + * generic/tclIORChan.c: Fixed the bugs exposed by the new testcases, + redone most of the cleanup and exit handling. 2008-04-21 Don Porter * generic/tclIOUtil.c: Removed all code delimited by * generic/tclTest.c: USE_OBSOLETE_FS_HOOKS, completing * tests/ioCmd.test: the deprecation path for these - * tests/ioUtil.test (removed): obsolete interfaces. (Code was active + * tests/ioUtil.test (removed): obsolete interfaces. (Code was active in Tcl 8.4, present but enabled only by customized compile switch in - Tcl 8.5, and now completely gone for Tcl 8.6). Also removed all tests + Tcl 8.5, and now completely gone for Tcl 8.6). Also removed all tests relevant only to the removed interfaces. 2008-04-19 George Peter Staplin @@ -55,8 +63,8 @@ * generic/tclIO.c (CopyData): Applied another patch by Alexandre * io.test (io-53.8a): Ferrieux , * chanio.test (chan-io-53.8a): to shift EOF handling to the async - part of the command if a callback is specified, should the channel - be at EOF already when fcopy is called. Testcase by myself. + part of the command if a callback is specified, should the channel be + at EOF already when fcopy is called. Testcase by myself. 2008-04-15 Daniel Steffen @@ -75,8 +83,8 @@ 2008-04-10 Andreas Kupries * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Keeping check for negative - values, changed to not be an error, but behave like the special - value -1 (copy all, default). + values, changed to not be an error, but behave like the special value + -1 (copy all, default). * tests/iocmd.test (iocmd-15.{12,13}): Removed. diff --git a/compat/memcmp.c b/compat/memcmp.c index 43202a5..a0666f3 100644 --- a/compat/memcmp.c +++ b/compat/memcmp.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: memcmp.c,v 1.4 2007/01/22 09:15:50 dkf Exp $ + * RCS: @(#) $Id: memcmp.c,v 1.5 2008/04/27 22:21:27 dkf Exp $ */ #include "tclPort.h" @@ -17,7 +17,7 @@ * Here is the prototype just in case it is not included in tclPort.h. */ -int memcmp(CONST VOID *s1, CONST VOID *s2, size_t n); +int memcmp(const void *s1, const void *s2, size_t n); /* *---------------------------------------------------------------------- @@ -40,12 +40,12 @@ int memcmp(CONST VOID *s1, CONST VOID *s2, size_t n); int memcmp( - CONST VOID *s1, /* First string. */ - CONST VOID *s2, /* Second string. */ + const void *s1, /* First string. */ + const void *s2, /* Second string. */ size_t n) /* Length to compare. */ { - CONST unsigned char *ptr1 = (CONST unsigned char *) s1; - CONST unsigned char *ptr2 = (CONST unsigned char *) s2; + const unsigned char *ptr1 = (const unsigned char *) s1; + const unsigned char *ptr2 = (const unsigned char *) s2; for ( ; n-- ; ptr1++, ptr2++) { unsigned char u1 = *ptr1, u2 = *ptr2; diff --git a/compat/strncasecmp.c b/compat/strncasecmp.c index d752ba8..f944aaa 100644 --- a/compat/strncasecmp.c +++ b/compat/strncasecmp.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strncasecmp.c,v 1.3 2007/04/16 13:36:34 dkf Exp $ + * RCS: @(#) $Id: strncasecmp.c,v 1.4 2008/04/27 22:21:28 dkf Exp $ */ #include "tclPort.h" @@ -59,8 +59,8 @@ static unsigned char charmap[] = { * Here are the prototypes just in case they are not included in tclPort.h. */ -int strncasecmp(CONST char *s1, CONST char *s2, size_t n); -int strcasecmp(CONST char *s1, CONST char *s2); +int strncasecmp(const char *s1, const char *s2, size_t n); +int strcasecmp(const char *s1, const char *s2); /* *---------------------------------------------------------------------- @@ -81,8 +81,8 @@ int strcasecmp(CONST char *s1, CONST char *s2); int strcasecmp( - CONST char *s1, /* First string. */ - CONST char *s2) /* Second string. */ + const char *s1, /* First string. */ + const char *s2) /* Second string. */ { unsigned char u1, u2; @@ -116,8 +116,8 @@ strcasecmp( int strncasecmp( - CONST char *s1, /* First string. */ - CONST char *s2, /* Second string. */ + const char *s1, /* First string. */ + const char *s2, /* Second string. */ size_t length) /* Maximum number of characters to compare * (stop earlier if the end of either string * is reached). */ diff --git a/compat/strtod.c b/compat/strtod.c index 9e494b1..aa73ab0 100644 --- a/compat/strtod.c +++ b/compat/strtod.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtod.c,v 1.8 2007/04/16 13:36:34 dkf Exp $ + * RCS: @(#) $Id: strtod.c,v 1.9 2008/04/27 22:21:28 dkf Exp $ */ #include "tclInt.h" @@ -63,7 +63,7 @@ static double powersOf10[] = { /* Table giving binary powers of 10. Entry */ double strtod( - CONST char *string, /* A decimal ASCII floating-point number, + const char *string, /* A decimal ASCII floating-point number, * optionally preceded by white space. Must * have form "-I.FE-X", where I is the integer * part of the mantissa, F is the fractional @@ -79,7 +79,7 @@ strtod( { int sign, expSign = FALSE; double fraction, dblExp, *d; - register CONST char *p; + register const char *p; register int c; int exp = 0; /* Exponent read from "EX" field. */ int fracExp = 0; /* Exponent that derives from the fractional @@ -94,7 +94,7 @@ strtod( int mantSize; /* Number of digits in mantissa. */ int decPt; /* Number of mantissa digits BEFORE decimal * point. */ - CONST char *pExp; /* Temporarily holds location of exponent in + const char *pExp; /* Temporarily holds location of exponent in * string. */ /* diff --git a/compat/strtol.c b/compat/strtol.c index 3779597..85c2520 100644 --- a/compat/strtol.c +++ b/compat/strtol.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtol.c,v 1.6 2007/04/16 13:36:34 dkf Exp $ + * RCS: @(#) $Id: strtol.c,v 1.7 2008/04/27 22:21:28 dkf Exp $ */ #include @@ -36,7 +36,7 @@ long int strtol( - CONST char *string, /* String of ASCII digits, possibly preceded + const char *string, /* String of ASCII digits, possibly preceded * by white space. For bases greater than 10, * either lower- or upper-case digits may be * used. */ @@ -48,7 +48,7 @@ strtol( * hex, "0" means octal, anything else means * decimal. */ { - register CONST char *p; + register const char *p; long result; /* diff --git a/compat/strtoul.c b/compat/strtoul.c index 64f95a6..21ee445 100644 --- a/compat/strtoul.c +++ b/compat/strtoul.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtoul.c,v 1.7 2007/04/16 13:36:34 dkf Exp $ + * RCS: @(#) $Id: strtoul.c,v 1.8 2008/04/27 22:21:28 dkf Exp $ */ #include "tclInt.h" @@ -52,7 +52,7 @@ static char cvtIn[] = { unsigned long int strtoul( - CONST char *string, /* String of ASCII digits, possibly preceded + const char *string, /* String of ASCII digits, possibly preceded * by white space. For bases greater than 10, * either lower- or upper-case digits may be * used. */ @@ -64,7 +64,7 @@ strtoul( * hex, "0" means octal, anything else means * decimal. */ { - register CONST char *p; + register const char *p; register unsigned long int result = 0; register unsigned digit; int anyDigits = 0; diff --git a/generic/regc_color.c b/generic/regc_color.c index ba1f668..7a98dcb 100644 --- a/generic/regc_color.c +++ b/generic/regc_color.c @@ -37,7 +37,7 @@ /* - initcm - set up new colormap - ^ static VOID initcm(struct vars *, struct colormap *); + ^ static void initcm(struct vars *, struct colormap *); */ static void initcm( @@ -88,7 +88,7 @@ initcm( /* - freecm - free dynamically-allocated things in a colormap - ^ static VOID freecm(struct colormap *); + ^ static void freecm(struct colormap *); */ static void freecm( @@ -116,7 +116,7 @@ freecm( /* - cmtreefree - free a non-terminal part of a colormap tree - ^ static VOID cmtreefree(struct colormap *, union tree *, int); + ^ static void cmtreefree(struct colormap *, union tree *, int); */ static void cmtreefree( @@ -287,7 +287,7 @@ newcolor( /* - freecolor - free a color (must have no arcs or subcolor) - ^ static VOID freecolor(struct colormap *, pcolor); + ^ static void freecolor(struct colormap *, pcolor); */ static void freecolor( @@ -422,7 +422,7 @@ newsub( /* - subrange - allocate new subcolors to this range of chrs, fill in arcs - ^ static VOID subrange(struct vars *, pchr, pchr, struct state *, + ^ static void subrange(struct vars *, pchr, pchr, struct state *, ^ struct state *); */ static void @@ -470,7 +470,7 @@ subrange( /* - subblock - allocate new subcolors for one tree block of chrs, fill in arcs - ^ static VOID subblock(struct vars *, pchr, struct state *, struct state *); + ^ static void subblock(struct vars *, pchr, struct state *, struct state *); */ static void subblock( @@ -575,7 +575,7 @@ subblock( /* - okcolors - promote subcolors to full colors - ^ static VOID okcolors(struct nfa *, struct colormap *); + ^ static void okcolors(struct nfa *, struct colormap *); */ static void okcolors( @@ -636,7 +636,7 @@ okcolors( /* - colorchain - add this arc to the color chain of its color - ^ static VOID colorchain(struct colormap *, struct arc *); + ^ static void colorchain(struct colormap *, struct arc *); */ static void colorchain( @@ -655,7 +655,7 @@ colorchain( /* - uncolorchain - delete this arc from the color chain of its color - ^ static VOID uncolorchain(struct colormap *, struct arc *); + ^ static void uncolorchain(struct colormap *, struct arc *); */ static void uncolorchain( @@ -681,7 +681,7 @@ uncolorchain( /* - rainbow - add arcs of all full colors (but one) between specified states - ^ static VOID rainbow(struct nfa *, struct colormap *, int, pcolor, + ^ static void rainbow(struct nfa *, struct colormap *, int, pcolor, ^ struct state *, struct state *); */ static void @@ -708,7 +708,7 @@ rainbow( /* - colorcomplement - add arcs of complementary colors * The calling sequence ought to be reconciled with cloneouts(). - ^ static VOID colorcomplement(struct nfa *, struct colormap *, int, + ^ static void colorcomplement(struct nfa *, struct colormap *, int, ^ struct state *, struct state *, struct state *); */ static void @@ -741,7 +741,7 @@ colorcomplement( /* - dumpcolors - debugging output - ^ static VOID dumpcolors(struct colormap *, FILE *); + ^ static void dumpcolors(struct colormap *, FILE *); */ static void dumpcolors( @@ -789,7 +789,7 @@ dumpcolors( /* - fillcheck - check proper filling of a tree - ^ static VOID fillcheck(struct colormap *, union tree *, int, FILE *); + ^ static void fillcheck(struct colormap *, union tree *, int, FILE *); */ static void fillcheck( @@ -818,7 +818,7 @@ fillcheck( /* - dumpchr - print a chr * Kind of char-centric but works well enough for debug use. - ^ static VOID dumpchr(pchr, FILE *); + ^ static void dumpchr(pchr, FILE *); */ static void dumpchr( diff --git a/generic/regc_cvec.c b/generic/regc_cvec.c index 64f34cd..0247521 100644 --- a/generic/regc_cvec.c +++ b/generic/regc_cvec.c @@ -74,7 +74,7 @@ clearcvec( /* - addchr - add a chr to a cvec - ^ static VOID addchr(struct cvec *, pchr); + ^ static void addchr(struct cvec *, pchr); */ static void addchr( @@ -86,7 +86,7 @@ addchr( /* - addrange - add a range to a cvec - ^ static VOID addrange(struct cvec *, pchr, pchr); + ^ static void addrange(struct cvec *, pchr, pchr); */ static void addrange( @@ -128,7 +128,7 @@ getcvec( /* - freecvec - free a cvec - ^ static VOID freecvec(struct cvec *); + ^ static void freecvec(struct cvec *); */ static void freecvec( diff --git a/generic/regc_lex.c b/generic/regc_lex.c index bc61e14..4be02c6 100644 --- a/generic/regc_lex.c +++ b/generic/regc_lex.c @@ -63,7 +63,7 @@ /* - lexstart - set up lexical stuff, scan leading options - ^ static VOID lexstart(struct vars *); + ^ static void lexstart(struct vars *); */ static void lexstart( @@ -89,7 +89,7 @@ lexstart( /* - prefixes - implement various special prefixes - ^ static VOID prefixes(struct vars *); + ^ static void prefixes(struct vars *); */ static void prefixes( @@ -207,7 +207,7 @@ prefixes( - lexnest - "call a subroutine", interpolating string at the lexical level * Note, this is not a very general facility. There are a number of * implicit assumptions about what sorts of strings can be subroutines. - ^ static VOID lexnest(struct vars *, const chr *, const chr *); + ^ static void lexnest(struct vars *, const chr *, const chr *); */ static void lexnest( @@ -275,7 +275,7 @@ static const chr brbackw[] = { /* \w within brackets */ /* - lexword - interpolate a bracket expression for word characters * Possibly ought to inquire whether there is a "word" character class. - ^ static VOID lexword(struct vars *); + ^ static void lexword(struct vars *); */ static void lexword( @@ -922,7 +922,7 @@ lexdigits( int len; chr c; int d; - CONST uchr ub = (uchr) base; + const uchr ub = (uchr) base; n = 0; for (len = 0; len < maxlen && !ATEOS(); len++) { @@ -1080,7 +1080,7 @@ brenext( /* - skip - skip white space and comments in expanded form - ^ static VOID skip(struct vars *); + ^ static void skip(struct vars *); */ static void skip( diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index 19dbe63..d8cbd82 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -142,7 +142,7 @@ DecrementSize( /* - freenfa - free an entire NFA - ^ static VOID freenfa(struct nfa *); + ^ static void freenfa(struct nfa *); */ static void freenfa( @@ -242,7 +242,7 @@ newfstate( /* - dropstate - delete a state's inarcs and outarcs and free it - ^ static VOID dropstate(struct nfa *, struct state *); + ^ static void dropstate(struct nfa *, struct state *); */ static void dropstate( @@ -262,7 +262,7 @@ dropstate( /* - freestate - free a state, which has no in-arcs or out-arcs - ^ static VOID freestate(struct nfa *, struct state *); + ^ static void freestate(struct nfa *, struct state *); */ static void freestate( @@ -294,7 +294,7 @@ freestate( /* - destroystate - really get rid of an already-freed state - ^ static VOID destroystate(struct nfa *, struct state *); + ^ static void destroystate(struct nfa *, struct state *); */ static void destroystate( @@ -317,7 +317,7 @@ destroystate( /* - newarc - set up a new arc within an NFA - ^ static VOID newarc(struct nfa *, int, pcolor, struct state *, + ^ static void newarc(struct nfa *, int, pcolor, struct state *, ^ struct state *); */ static void @@ -426,7 +426,7 @@ allocarc( /* - freearc - free an arc - ^ static VOID freearc(struct nfa *, struct arc *); + ^ static void freearc(struct nfa *, struct arc *); */ static void freearc( @@ -519,7 +519,7 @@ findarc( /* - cparc - allocate a new arc within an NFA, copying details from old one - ^ static VOID cparc(struct nfa *, struct arc *, struct state *, + ^ static void cparc(struct nfa *, struct arc *, struct state *, ^ struct state *); */ static void @@ -538,7 +538,7 @@ cparc( * existing arcs, and you would be right if it weren't for the desire * for duplicate suppression, which makes it easier to just make new * ones to exploit the suppression built into newarc. - ^ static VOID moveins(struct nfa *, struct state *, struct state *); + ^ static void moveins(struct nfa *, struct state *, struct state *); */ static void moveins( @@ -560,7 +560,7 @@ moveins( /* - copyins - copy all in arcs of a state to another state - ^ static VOID copyins(struct nfa *, struct state *, struct state *); + ^ static void copyins(struct nfa *, struct state *, struct state *); */ static void copyins( @@ -579,7 +579,7 @@ copyins( /* - moveouts - move all out arcs of a state to another state - ^ static VOID moveouts(struct nfa *, struct state *, struct state *); + ^ static void moveouts(struct nfa *, struct state *, struct state *); */ static void moveouts( @@ -599,7 +599,7 @@ moveouts( /* - copyouts - copy all out arcs of a state to another state - ^ static VOID copyouts(struct nfa *, struct state *, struct state *); + ^ static void copyouts(struct nfa *, struct state *, struct state *); */ static void copyouts( @@ -618,7 +618,7 @@ copyouts( /* - cloneouts - copy out arcs of a state to another state pair, modifying type - ^ static VOID cloneouts(struct nfa *, struct state *, struct state *, + ^ static void cloneouts(struct nfa *, struct state *, struct state *, ^ struct state *, int); */ static void @@ -642,7 +642,7 @@ cloneouts( - delsub - delete a sub-NFA, updating subre pointers if necessary * This uses a recursive traversal of the sub-NFA, marking already-seen * states using their tmp pointer. - ^ static VOID delsub(struct nfa *, struct state *, struct state *); + ^ static void delsub(struct nfa *, struct state *, struct state *); */ static void delsub( @@ -665,7 +665,7 @@ delsub( /* - deltraverse - the recursive heart of delsub * This routine's basic job is to destroy all out-arcs of the state. - ^ static VOID deltraverse(struct nfa *, struct state *, struct state *); + ^ static void deltraverse(struct nfa *, struct state *, struct state *); */ static void deltraverse( @@ -708,7 +708,7 @@ deltraverse( * Another recursive traversal, this time using tmp to point to duplicates as * well as mark already-seen states. (You knew there was a reason why it's a * state pointer, didn't you? :-)) - ^ static VOID dupnfa(struct nfa *, struct state *, struct state *, + ^ static void dupnfa(struct nfa *, struct state *, struct state *, ^ struct state *, struct state *); */ static void @@ -734,7 +734,7 @@ dupnfa( /* - duptraverse - recursive heart of dupnfa - ^ static VOID duptraverse(struct nfa *, struct state *, struct state *); + ^ static void duptraverse(struct nfa *, struct state *, struct state *); */ static void duptraverse( @@ -766,7 +766,7 @@ duptraverse( /* - cleartraverse - recursive cleanup for algorithms that leave tmp ptrs set - ^ static VOID cleartraverse(struct nfa *, struct state *); + ^ static void cleartraverse(struct nfa *, struct state *); */ static void cleartraverse( @@ -787,7 +787,7 @@ cleartraverse( /* - specialcolors - fill in special colors for an NFA - ^ static VOID specialcolors(struct nfa *); + ^ static void specialcolors(struct nfa *); */ static void specialcolors( @@ -850,7 +850,7 @@ optimize( /* - pullback - pull back constraints backward to (with luck) eliminate them - ^ static VOID pullback(struct nfa *, FILE *); + ^ static void pullback(struct nfa *, FILE *); */ static void pullback( @@ -1007,7 +1007,7 @@ pull( /* - pushfwd - push forward constraints forward to (with luck) eliminate them - ^ static VOID pushfwd(struct nfa *, FILE *); + ^ static void pushfwd(struct nfa *, FILE *); */ static void pushfwd( @@ -1226,7 +1226,7 @@ combine( /* - fixempties - get rid of EMPTY arcs - ^ static VOID fixempties(struct nfa *, FILE *); + ^ static void fixempties(struct nfa *, FILE *); */ static void fixempties( @@ -1332,7 +1332,7 @@ unempty( /* - cleanup - clean up NFA after optimizations - ^ static VOID cleanup(struct nfa *); + ^ static void cleanup(struct nfa *); */ static void cleanup( @@ -1373,7 +1373,7 @@ cleanup( /* - markreachable - recursive marking of reachable states - ^ static VOID markreachable(struct nfa *, struct state *, struct state *, + ^ static void markreachable(struct nfa *, struct state *, struct state *, ^ struct state *); */ static void @@ -1397,7 +1397,7 @@ markreachable( /* - markcanreach - recursive marking of states which can reach here - ^ static VOID markcanreach(struct nfa *, struct state *, struct state *, + ^ static void markcanreach(struct nfa *, struct state *, struct state *, ^ struct state *); */ static void @@ -1445,7 +1445,7 @@ analyze( /* - compact - compact an NFA - ^ static VOID compact(struct nfa *, struct cnfa *); + ^ static void compact(struct nfa *, struct cnfa *); */ static void compact( @@ -1539,7 +1539,7 @@ compact( - carcsort - sort compacted-NFA arcs by color * Really dumb algorithm, but if the list is long enough for that to matter, * you're in real trouble anyway. - ^ static VOID carcsort(struct carc *, struct carc *); + ^ static void carcsort(struct carc *, struct carc *); */ static void carcsort( @@ -1568,7 +1568,7 @@ carcsort( /* - freecnfa - free a compacted NFA - ^ static VOID freecnfa(struct cnfa *); + ^ static void freecnfa(struct cnfa *); */ static void freecnfa( @@ -1582,7 +1582,7 @@ freecnfa( /* - dumpnfa - dump an NFA in human-readable form - ^ static VOID dumpnfa(struct nfa *, FILE *); + ^ static void dumpnfa(struct nfa *, FILE *); */ static void dumpnfa( @@ -1623,7 +1623,7 @@ dumpnfa( /* - dumpstate - dump an NFA state in human-readable form - ^ static VOID dumpstate(struct state *, FILE *); + ^ static void dumpstate(struct state *, FILE *); */ static void dumpstate( @@ -1653,7 +1653,7 @@ dumpstate( /* - dumparcs - dump out-arcs in human-readable form - ^ static VOID dumparcs(struct state *, FILE *); + ^ static void dumparcs(struct state *, FILE *); */ static void dumparcs( @@ -1696,7 +1696,7 @@ dumprarcs( /* - dumparc - dump one outarc in readable form, including prefixing tab - ^ static VOID dumparc(struct arc *, struct state *, FILE *); + ^ static void dumparc(struct arc *, struct state *, FILE *); */ static void dumparc( @@ -1770,7 +1770,7 @@ dumparc( /* - dumpcnfa - dump a compacted NFA in human-readable form - ^ static VOID dumpcnfa(struct cnfa *, FILE *); + ^ static void dumpcnfa(struct cnfa *, FILE *); */ static void dumpcnfa( @@ -1811,7 +1811,7 @@ dumpcnfa( /* - dumpcstate - dump a compacted-NFA state in human-readable form - ^ static VOID dumpcstate(int, struct carc *, struct cnfa *, FILE *); + ^ static void dumpcstate(int, struct carc *, struct cnfa *, FILE *); */ static void dumpcstate( diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c index c80996a..fbeae20 100644 --- a/generic/rege_dfa.c +++ b/generic/rege_dfa.c @@ -388,7 +388,7 @@ newdfa( /* - freedfa - free a DFA - ^ static VOID freedfa(struct dfa *); + ^ static void freedfa(struct dfa *); */ static void freedfa( diff --git a/generic/regexec.c b/generic/regexec.c index d39685c..24edb41 100644 --- a/generic/regexec.c +++ b/generic/regexec.c @@ -125,13 +125,13 @@ struct vars { /* =====^!^===== begin forwards =====^!^===== */ /* automatically gathered by fwd; do not hand-edit */ /* === regexec.c === */ -int exec(regex_t *, CONST chr *, size_t, rm_detail_t *, size_t, regmatch_t [], int); +int exec(regex_t *, const chr *, size_t, rm_detail_t *, size_t, regmatch_t [], int); static int find(struct vars *, struct cnfa *, struct colormap *); static int cfind(struct vars *, struct cnfa *, struct colormap *); static int cfindloop(struct vars *, struct cnfa *, struct colormap *, struct dfa *, struct dfa *, chr **); -static VOID zapsubs(regmatch_t *, size_t); -static VOID zapmem(struct vars *, struct subre *); -static VOID subset(struct vars *, struct subre *, chr *, chr *); +static void zapsubs(regmatch_t *, size_t); +static void zapmem(struct vars *, struct subre *); +static void subset(struct vars *, struct subre *, chr *, chr *); static int dissect(struct vars *, struct subre *, chr *, chr *); static int condissect(struct vars *, struct subre *, chr *, chr *); static int altdissect(struct vars *, struct subre *, chr *, chr *); @@ -145,7 +145,7 @@ static chr *longest(struct vars *, struct dfa *, chr *, chr *, int *); static chr *shortest(struct vars *, struct dfa *, chr *, chr *, chr *, chr **, int *); static chr *lastcold(struct vars *, struct dfa *); static struct dfa *newdfa(struct vars *, struct cnfa *, struct colormap *, struct smalldfa *); -static VOID freedfa(struct dfa *); +static void freedfa(struct dfa *); static unsigned hash(unsigned *, int); static struct sset *initialize(struct vars *, struct dfa *, chr *); static struct sset *miss(struct vars *, struct dfa *, struct sset *, pcolor, chr *, chr *); @@ -157,13 +157,13 @@ static struct sset *pickss(struct vars *, struct dfa *, chr *, chr *); /* - exec - match regular expression - ^ int exec(regex_t *, CONST chr *, size_t, rm_detail_t *, + ^ int exec(regex_t *, const chr *, size_t, rm_detail_t *, ^ size_t, regmatch_t [], int); */ int exec( regex_t *re, - CONST chr *string, + const chr *string, size_t len, rm_detail_t *details, size_t nmatch, @@ -539,7 +539,7 @@ cfindloop( /* - zapsubs - initialize the subexpression matches to "no match" - ^ static VOID zapsubs(regmatch_t *, size_t); + ^ static void zapsubs(regmatch_t *, size_t); */ static void zapsubs( @@ -556,7 +556,7 @@ zapsubs( /* - zapmem - initialize the retry memory of a subtree to zeros - ^ static VOID zapmem(struct vars *, struct subre *); + ^ static void zapmem(struct vars *, struct subre *); */ static void zapmem( @@ -585,7 +585,7 @@ zapmem( /* - subset - set any subexpression relevant to a successful subre - ^ static VOID subset(struct vars *, struct subre *, chr *, chr *); + ^ static void subset(struct vars *, struct subre *, chr *, chr *); */ static void subset( diff --git a/generic/regfronts.c b/generic/regfronts.c index 5003297..088a640 100644 --- a/generic/regfronts.c +++ b/generic/regfronts.c @@ -39,7 +39,7 @@ int regcomp( regex_t *re, - CONST char *str, + const char *str, int flags) { size_t len; @@ -61,12 +61,12 @@ regcomp( int regexec( regex_t *re, - CONST char *str, + const char *str, size_t nmatch, regmatch_t pmatch[], int flags) { - CONST char *start; + const char *start; size_t len; int f = flags; diff --git a/generic/tclBinary.c b/generic/tclBinary.c index baea4ba..3796ac1 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.41 2008/03/24 03:10:06 patthoyts Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.42 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" @@ -128,7 +128,7 @@ typedef struct ByteArray { #define GET_BYTEARRAY(objPtr) \ ((ByteArray *) (objPtr)->internalRep.otherValuePtr) #define SET_BYTEARRAY(objPtr, baPtr) \ - (objPtr)->internalRep.otherValuePtr = (VOID *) (baPtr) + (objPtr)->internalRep.otherValuePtr = (void *) (baPtr) /* diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index ee259d4..fd1b2ab 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -14,7 +14,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.32 2007/04/23 20:33:56 das Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.33 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" @@ -54,7 +54,7 @@ struct mem_header { struct mem_header *blink; MemTag *tagPtr; /* Tag from "memory tag" command; may be * NULL. */ - CONST char *file; + const char *file; long length; int line; unsigned char low_guard[LOW_GUARD_SIZE]; @@ -128,11 +128,11 @@ static int ckallocInit = 0; */ static int CheckmemCmd(ClientData clientData, Tcl_Interp *interp, - int argc, CONST char *argv[]); + int argc, const char *argv[]); static int MemoryCmd(ClientData clientData, Tcl_Interp *interp, - int argc, CONST char *argv[]); + int argc, const char *argv[]); static void ValidateMemory(struct mem_header *memHeaderP, - CONST char *file, int line, int nukeGuards); + const char *file, int line, int nukeGuards); /* *---------------------------------------------------------------------- @@ -204,7 +204,7 @@ static void ValidateMemory( struct mem_header *memHeaderP, /* Memory chunk to validate */ - CONST char *file, /* File containing the call to + const char *file, /* File containing the call to * Tcl_ValidateAllMemory */ int line, /* Line number of call to * Tcl_ValidateAllMemory */ @@ -285,7 +285,7 @@ ValidateMemory( void Tcl_ValidateAllMemory( - CONST char *file, /* File from which Tcl_ValidateAllMemory was + const char *file, /* File from which Tcl_ValidateAllMemory was * called. */ int line) /* Line number of call to * Tcl_ValidateAllMemory */ @@ -319,7 +319,7 @@ Tcl_ValidateAllMemory( int Tcl_DumpActiveMemory( - CONST char *fileName) /* Name of the file to write info to */ + const char *fileName) /* Name of the file to write info to */ { FILE *fileP; struct mem_header *memScanP; @@ -373,7 +373,7 @@ Tcl_DumpActiveMemory( char * Tcl_DbCkalloc( unsigned int size, - CONST char *file, + const char *file, int line) { struct mem_header *result; @@ -464,7 +464,7 @@ Tcl_DbCkalloc( char * Tcl_AttemptDbCkalloc( unsigned int size, - CONST char *file, + const char *file, int line) { struct mem_header *result; @@ -572,7 +572,7 @@ Tcl_AttemptDbCkalloc( int Tcl_DbCkfree( char *ptr, - CONST char *file, + const char *file, int line) { struct mem_header *memp; @@ -653,7 +653,7 @@ char * Tcl_DbCkrealloc( char *ptr, unsigned int size, - CONST char *file, + const char *file, int line) { char *newPtr; @@ -684,7 +684,7 @@ char * Tcl_AttemptDbCkrealloc( char *ptr, unsigned int size, - CONST char *file, + const char *file, int line) { char *newPtr; @@ -802,9 +802,9 @@ MemoryCmd( ClientData clientData, Tcl_Interp *interp, int argc, - CONST char *argv[]) + const char *argv[]) { - CONST char *fileName; + const char *fileName; Tcl_DString buffer; int result; @@ -951,7 +951,7 @@ CheckmemCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Interpreter for evaluation. */ int argc, /* Number of arguments. */ - CONST char *argv[]) /* String values of arguments. */ + const char *argv[]) /* String values of arguments. */ { if (argc != 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -1037,7 +1037,7 @@ Tcl_Alloc( char * Tcl_DbCkalloc( unsigned int size, - CONST char *file, + const char *file, int line) { char *result; @@ -1075,7 +1075,7 @@ Tcl_AttemptAlloc( char * Tcl_AttemptDbCkalloc( unsigned int size, - CONST char *file, + const char *file, int line) { char *result; @@ -1114,7 +1114,7 @@ char * Tcl_DbCkrealloc( char *ptr, unsigned int size, - CONST char *file, + const char *file, int line) { char *result; @@ -1154,7 +1154,7 @@ char * Tcl_AttemptDbCkrealloc( char *ptr, unsigned int size, - CONST char *file, + const char *file, int line) { char *result; @@ -1185,7 +1185,7 @@ Tcl_Free( int Tcl_DbCkfree( char *ptr, - CONST char *file, + const char *file, int line) { TclpFree(ptr); @@ -1211,14 +1211,14 @@ Tcl_InitMemory( int Tcl_DumpActiveMemory( - CONST char *fileName) + const char *fileName) { return TCL_OK; } void Tcl_ValidateAllMemory( - CONST char *file, + const char *file, int line) { } diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index e054c29..1ac8764 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.93 2008/03/14 16:07:23 dgp Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.94 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" @@ -24,7 +24,7 @@ static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode); static int EncodingDirsObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_FSStatProc *statProc, Tcl_StatBuf *statPtr); static char * GetTypeFromMode(int mode); @@ -58,7 +58,7 @@ Tcl_BreakObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -91,12 +91,12 @@ Tcl_CaseObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register int i; int body, result, caseObjc; char *stringPtr, *arg; - Tcl_Obj *CONST *caseObjv; + Tcl_Obj *const *caseObjv; Tcl_Obj *armPtr; if (objc < 3) { @@ -131,7 +131,7 @@ Tcl_CaseObjCmd( for (i = 0; i < caseObjc; i += 2) { int patObjc, j; - CONST char **patObjv; + const char **patObjv; char *pat; unsigned char *p; @@ -226,7 +226,7 @@ Tcl_CatchObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *varNamePtr = NULL; Tcl_Obj *optionVarNamePtr = NULL; @@ -310,7 +310,7 @@ Tcl_CdObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *dir; int result; @@ -365,7 +365,7 @@ Tcl_ConcatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc >= 2) { Tcl_SetObjResult(interp, Tcl_ConcatObj(objc-1, objv+1)); @@ -400,7 +400,7 @@ Tcl_ContinueObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -430,11 +430,11 @@ Tcl_EncodingObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int index; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "convertfrom", "convertto", "dirs", "names", "system", NULL }; @@ -551,7 +551,7 @@ EncodingDirsObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?dirList?"); @@ -593,7 +593,7 @@ Tcl_ErrorObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *options, *optName; @@ -643,7 +643,7 @@ Tcl_EvalObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result; register Tcl_Obj *objPtr; @@ -706,7 +706,7 @@ Tcl_ExitObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int value; @@ -755,7 +755,7 @@ Tcl_ExprObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *resultPtr; int result; @@ -808,7 +808,7 @@ Tcl_FileObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int index, value; Tcl_StatBuf buf; @@ -818,7 +818,7 @@ Tcl_FileObjCmd( * This list of constants should match the fileOption string array below. */ - static CONST char *fileOptions[] = { + static const char *fileOptions[] = { "atime", "attributes", "channels", "copy", "delete", "dirname", "executable", "exists", "extension", @@ -1035,7 +1035,7 @@ Tcl_FileObjCmd( * We have a '-linktype' argument. */ - static CONST char *linkTypes[] = { + static const char *linkTypes[] = { "-symbolic", "-hard", NULL }; if (Tcl_GetIndexFromObj(interp, objv[2], linkTypes, "switch", @@ -1179,7 +1179,7 @@ Tcl_FileObjCmd( } return TclFileMakeDirsCmd(interp, objc, objv); case FCMD_NATIVENAME: { - CONST char *fileName; + const char *fileName; Tcl_DString ds; if (objc != 3) { @@ -1600,7 +1600,7 @@ Tcl_ForObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result, value; Interp *iPtr = (Interp *) interp; @@ -1696,7 +1696,7 @@ Tcl_ForeachObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result = TCL_OK; int i; /* i selects a value list */ @@ -1870,7 +1870,7 @@ Tcl_FormatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *resultPtr; /* Where result is stored finally. */ diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index d76b49f..b740531 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.137 2008/03/14 19:46:17 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.138 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" @@ -105,43 +105,43 @@ typedef struct SortInfo { static int DictionaryCompare(char *left, char *right); static int InfoArgsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoBodyCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoCmdCountCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoCommandsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoCompleteCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoDefaultCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); /* TIP #280 - New 'info' subcommand 'frame' */ static int InfoFrameCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoFunctionsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoHostnameCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoLevelCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoLibraryCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoLoadedCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoNameOfExecutableCmd(ClientData dummy, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int InfoPatchLevelCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoProcsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoScriptCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoSharedlibCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoTclVersionCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static SortElement * MergeLists(SortElement *leftPtr, SortElement *rightPtr, SortInfo *infoPtr); static int SortCompare(SortElement *firstPtr, SortElement *second, @@ -206,7 +206,7 @@ Tcl_IfObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int thenScriptIndex = 0; /* "then" script to be evaled after syntax * check. */ @@ -336,7 +336,7 @@ Tcl_IncrObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *newValuePtr, *incrPtr; @@ -417,7 +417,7 @@ InfoArgsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; char *name; @@ -478,7 +478,7 @@ InfoBodyCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; char *name; @@ -547,7 +547,7 @@ InfoCmdCountCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; @@ -589,10 +589,10 @@ InfoCommandsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *cmdName, *pattern; - CONST char *simplePattern; + const char *simplePattern; register Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Namespace *nsPtr; @@ -866,7 +866,7 @@ InfoCompleteCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "command"); @@ -903,7 +903,7 @@ InfoDefaultCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; char *procName, *argName, *varName; @@ -985,7 +985,7 @@ TclInfoExistsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *varName; Var *varPtr; @@ -1030,7 +1030,7 @@ InfoFrameCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; int level; @@ -1121,7 +1121,7 @@ TclInfoFrame( * This array is indexed by the TCL_LOCATION_... values, except * for _LAST. */ - static CONST char *typeString[TCL_LOCATION_LAST] = { + static const char *typeString[TCL_LOCATION_LAST] = { "eval", "eval", "eval", "precompiled", "source", "proc" }; Tcl_Obj *tmpObj; @@ -1331,7 +1331,7 @@ InfoFunctionsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *pattern; @@ -1373,9 +1373,9 @@ InfoHostnameCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *name; + const char *name; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1416,7 +1416,7 @@ InfoLevelCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; @@ -1488,9 +1488,9 @@ InfoLibraryCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *libDirName; + const char *libDirName; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1532,7 +1532,7 @@ InfoLoadedCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *interpName; int result; @@ -1577,7 +1577,7 @@ InfoNameOfExecutableCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1613,9 +1613,9 @@ InfoPatchLevelCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *patchlevel; + const char *patchlevel; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1660,10 +1660,10 @@ InfoProcsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *cmdName, *pattern; - CONST char *simplePattern; + const char *simplePattern; Namespace *nsPtr; #ifdef INFO_PROCS_SEARCH_GLOBAL_NS Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp); @@ -1848,7 +1848,7 @@ InfoScriptCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; if ((objc != 1) && (objc != 2)) { @@ -1895,7 +1895,7 @@ InfoSharedlibCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1933,7 +1933,7 @@ InfoTclVersionCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *version; @@ -1973,7 +1973,7 @@ Tcl_JoinObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* The argument objects. */ + Tcl_Obj *const objv[]) /* The argument objects. */ { int listLen, i; Tcl_Obj *resObjPtr, *joinObjPtr, **elemPtrs; @@ -2030,7 +2030,7 @@ Tcl_LassignObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listCopyPtr; Tcl_Obj **listObjv; /* The contents of the list. */ @@ -2102,7 +2102,7 @@ Tcl_LindexObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *elemPtr; /* Pointer to the element being extracted. */ @@ -2161,7 +2161,7 @@ Tcl_LinsertObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ register int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listPtr; int index, len, result; @@ -2240,7 +2240,7 @@ Tcl_ListObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ register int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* The argument objects. */ { /* @@ -2276,7 +2276,7 @@ Tcl_LlengthObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, result; @@ -2322,7 +2322,7 @@ Tcl_LrangeObjCmd( ClientData notUsed, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listPtr, **elemPtrs; @@ -2395,7 +2395,7 @@ Tcl_LrepeatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ register int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* The argument objects. */ { int elementCount, i, result; @@ -2489,7 +2489,7 @@ Tcl_LreplaceObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Tcl_Obj *listPtr; int first, last, listLen, numToDelete, result; @@ -2596,7 +2596,7 @@ Tcl_LreverseObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { Tcl_Obj **elemv; int elemc, i, j; @@ -2684,7 +2684,7 @@ Tcl_LsearchObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { char *bytes, *patternBytes; int i, match, mode, index, result, listc, length, elemLen; @@ -2695,7 +2695,7 @@ Tcl_LsearchObjCmd( Tcl_Obj *patObj, **listv, *listPtr, *startPtr, *itemPtr; SortStrCmpFn_t strCmpFn = strcmp; Tcl_RegExp regexp = NULL; - static CONST char *options[] = { + static const char *options[] = { "-all", "-ascii", "-decreasing", "-dictionary", "-exact", "-glob", "-increasing", "-index", "-inline", "-integer", "-nocase", "-not", @@ -3348,7 +3348,7 @@ Tcl_LsetObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { Tcl_Obj *listPtr; /* Pointer to the list being altered. */ Tcl_Obj *finalValuePtr; /* Value finally assigned to the variable. */ @@ -3433,14 +3433,14 @@ Tcl_LsortObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { int i, j, index, unique, indices, length, nocase = 0, sortMode, indexc; Tcl_Obj *resultPtr, *cmdPtr, **listObjPtrs, *listObj, *indexPtr; SortElement *elementArray, *elementPtr; SortInfo sortInfo; /* Information about this sort that needs to * be passed to the comparison function. */ - static CONST char *switches[] = { + static const char *switches[] = { "-ascii", "-command", "-decreasing", "-dictionary", "-increasing", "-index", "-indices", "-integer", "-nocase", "-real", "-unique", NULL }; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index de8740d..6c0a419 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.163 2007/12/13 15:23:15 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.164 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" @@ -45,7 +45,7 @@ Tcl_PwdObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *retVal; @@ -85,14 +85,14 @@ Tcl_RegexpObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int i, indices, match, about, offset, all, doinline, numMatchesSaved; int cflags, eflags, stringLength; Tcl_RegExp regExpr; Tcl_Obj *objPtr, *startIndex = NULL, *resultPtr = NULL; Tcl_RegExpInfo info; - static CONST char *options[] = { + static const char *options[] = { "-all", "-about", "-indices", "-inline", "-expanded", "-line", "-linestop", "-lineanchor", "-nocase", "-start", "--", NULL @@ -435,7 +435,7 @@ Tcl_RegsubObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int idx, result, cflags, all, wlen, wsublen, numMatches, offset; int start, end, subStart, subEnd, match; @@ -444,7 +444,7 @@ Tcl_RegsubObjCmd( Tcl_Obj *resultPtr, *subPtr, *objPtr, *startIndex = NULL; Tcl_UniChar ch, *wsrc, *wfirstChar, *wstring, *wsubspec, *wend; - static CONST char *options[] = { + static const char *options[] = { "-all", "-nocase", "-expanded", "-line", "-linestop", "-lineanchor", "-start", "--", NULL @@ -545,7 +545,7 @@ Tcl_RegsubObjCmd( */ int slen, nocase; - int (*strCmpFn)(CONST Tcl_UniChar*,CONST Tcl_UniChar*,unsigned long); + int (*strCmpFn)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long); Tcl_UniChar *p, wsrclc; numMatches = 0; @@ -844,7 +844,7 @@ Tcl_RenameObjCmd( ClientData dummy, /* Arbitrary value passed to the command. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *oldName, *newName; @@ -880,7 +880,7 @@ Tcl_ReturnObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int code, level; Tcl_Obj *returnOpts; @@ -927,9 +927,9 @@ Tcl_SourceObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *encodingName = NULL; + const char *encodingName = NULL; Tcl_Obj *fileName; if (objc != 2 && objc !=4) { @@ -940,7 +940,7 @@ Tcl_SourceObjCmd( fileName = objv[objc-1]; if (objc == 4) { - static CONST char *options[] = { + static const char *options[] = { "-encoding", NULL }; int index; @@ -977,7 +977,7 @@ Tcl_SplitObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_UniChar ch; int len; @@ -3352,9 +3352,9 @@ Tcl_SubstObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - static CONST char *substOptions[] = { + static const char *substOptions[] = { "-nobackslashes", "-nocommands", "-novariables", NULL }; enum substOptions { @@ -3430,13 +3430,13 @@ Tcl_SwitchObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int i,j, index, mode, foundmode, result, splitObjs, numMatchesSaved; int noCase, patternLength; char *pattern; Tcl_Obj *stringObj, *indexVarObj, *matchVarObj; - Tcl_Obj *CONST *savedObjv = objv; + Tcl_Obj *const *savedObjv = objv; Tcl_RegExp regExpr = NULL; Interp *iPtr = (Interp *) interp; int pc = 0; @@ -3450,7 +3450,7 @@ Tcl_SwitchObjCmd( * -glob, you *must* fix TclCompileSwitchCmd's option parser as well. */ - static CONST char *options[] = { + static const char *options[] = { "-exact", "-glob", "-indexvar", "-matchvar", "-nocase", "-regexp", "--", NULL }; @@ -3910,7 +3910,7 @@ Tcl_TimeObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Tcl_Obj *objPtr; Tcl_Obj *objs[4]; @@ -4006,7 +4006,7 @@ Tcl_WhileObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result, value; Interp *iPtr = (Interp *) interp; @@ -4062,7 +4062,7 @@ Tcl_WhileObjCmd( void TclListLines( - CONST char *listStr, /* Pointer to string with list structure. + const char *listStr, /* Pointer to string with list structure. * Assumed to be valid. Assumed to contain n * elements. */ int line, /* Line the list as a whole starts on. */ @@ -4070,7 +4070,7 @@ TclListLines( int *lines) /* Array of line numbers, to fill. */ { int i, length = strlen(listStr); - CONST char *element = NULL, *next = NULL; + const char *element = NULL, *next = NULL; for (i = 0; i < n; i++) { TclFindElement(NULL, listStr, length, &element, &next, NULL, NULL); diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 074afc3..69306c3 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.19 2007/12/13 15:23:16 dgp Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.20 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" @@ -44,7 +44,7 @@ typedef struct QCCD { static int QueryConfigObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - struct Tcl_Obj *CONST *objv); + struct Tcl_Obj *const *objv); static void QueryConfigDelete(ClientData clientData); static Tcl_Obj * GetConfigDict(Tcl_Interp *interp); static void ConfigDictDeleteProc(ClientData clientData, @@ -70,18 +70,17 @@ void Tcl_RegisterConfig( Tcl_Interp *interp, /* Interpreter the configuration command is * registered in. */ - CONST char *pkgName, /* Name of the package registering the + const char *pkgName, /* Name of the package registering the * embedded configuration. ASCII, thus in * UTF-8 too. */ Tcl_Config *configuration, /* Embedded configuration. */ - CONST char *valEncoding) /* Name of the encoding used to store the + const char *valEncoding) /* Name of the encoding used to store the * configuration values, ASCII, thus UTF-8. */ { - Tcl_Obj *pDB, *pkgDict; Tcl_DString cmdName; Tcl_Config *cfg; Tcl_Encoding venc = Tcl_GetEncoding(NULL, valEncoding); - QCCD *cdPtr = (QCCD *)ckalloc(sizeof(QCCD)); + QCCD *cdPtr = (QCCD *) ckalloc(sizeof(QCCD)); cdPtr->interp = interp; cdPtr->pkg = Tcl_NewStringObj(pkgName, -1); @@ -107,14 +106,14 @@ Tcl_RegisterConfig( */ if (venc != NULL) { + Tcl_Obj *pkgDict, *pDB = GetConfigDict(interp); + /* * Retrieve package specific configuration... */ - pDB = GetConfigDict(interp); - if (Tcl_DictObjGet(interp, pDB, cdPtr->pkg, &pkgDict) != TCL_OK - || (pkgDict == NULL)) { + || (pkgDict == NULL)) { pkgDict = Tcl_NewDictObj(); } else if (Tcl_IsShared(pkgDict)) { pkgDict = Tcl_DuplicateObj(pkgDict); @@ -126,8 +125,8 @@ Tcl_RegisterConfig( for (cfg=configuration ; cfg->key!=NULL && cfg->key[0]!='\0' ; cfg++) { Tcl_DString conv; - CONST char *convValue = - Tcl_ExternalToUtfDString(venc, cfg->value, -1, &conv); + const char *convValue = + Tcl_ExternalToUtfDString(venc, cfg->value, -1, &conv); /* * We know that the keys are in ASCII/UTF-8, so for them is no @@ -135,7 +134,7 @@ Tcl_RegisterConfig( */ Tcl_DictObjPut(interp, pkgDict, Tcl_NewStringObj(cfg->key, -1), - Tcl_NewStringObj(convValue, -1)); + Tcl_NewStringObj(convValue, -1)); Tcl_DStringFree(&conv); } @@ -179,7 +178,7 @@ Tcl_RegisterConfig( Tcl_DStringAppend(&cmdName, "::pkgconfig", -1); if (Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdName), - QueryConfigObjCmd, (ClientData) cdPtr, QueryConfigDelete) == NULL) { + QueryConfigObjCmd, cdPtr, QueryConfigDelete) == NULL) { Tcl_Panic("%s: %s", "Tcl_RegisterConfig", "Unable to create query command for package configuration"); } @@ -209,13 +208,13 @@ QueryConfigObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, - struct Tcl_Obj *CONST *objv) + struct Tcl_Obj *const *objv) { - QCCD *cdPtr = (QCCD *) clientData; + QCCD *cdPtr = clientData; Tcl_Obj *pkgName = cdPtr->pkg; Tcl_Obj *pDB, *pkgDict, *val, *listPtr; int n, index; - static CONST char *subcmdStrings[] = { + static const char *subcmdStrings[] = { "get", "list", NULL }; enum subcmds { @@ -386,7 +385,7 @@ ConfigDictDeleteProc( ClientData clientData, /* Pointer to Tcl_Obj. */ Tcl_Interp *interp) /* Interpreter being deleted. */ { - Tcl_Obj *pDB = (Tcl_Obj *) clientData; + Tcl_Obj *pDB = clientData; Tcl_DecrRefCount(pDB); } diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 95f89a4..ff73502 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,12 +8,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.59 2008/03/11 22:25:12 das Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.60 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" -typedef size_t (LengthProc)(CONST char *src); +typedef size_t (LengthProc)(const char *src); /* * The following data structure represents an encoding, which describes how to @@ -197,19 +197,19 @@ static unsigned short emptyPage[256]; */ static int BinaryProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static void DupEncodingIntRep(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); static void EscapeFreeProc(ClientData clientData); static int EscapeFromUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int EscapeToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); @@ -218,55 +218,55 @@ static void FreeEncoding(Tcl_Encoding encoding); static void FreeEncodingIntRep(Tcl_Obj *objPtr); static Encoding * GetTableEncoding(EscapeEncodingData *dataPtr, int state); -static Tcl_Encoding LoadEncodingFile(Tcl_Interp *interp, CONST char *name); -static Tcl_Encoding LoadTableEncoding(CONST char *name, int type, +static Tcl_Encoding LoadEncodingFile(Tcl_Interp *interp, const char *name); +static Tcl_Encoding LoadTableEncoding(const char *name, int type, Tcl_Channel chan); -static Tcl_Encoding LoadEscapeEncoding(CONST char *name, Tcl_Channel chan); +static Tcl_Encoding LoadEscapeEncoding(const char *name, Tcl_Channel chan); static Tcl_Channel OpenEncodingFileChannel(Tcl_Interp *interp, - CONST char *name); + const char *name); static void TableFreeProc(ClientData clientData); static int TableFromUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); -static int TableToUtfProc(ClientData clientData, CONST char *src, +static int TableToUtfProc(ClientData clientData, const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); -static size_t unilen(CONST char *src); +static size_t unilen(const char *src); static int UnicodeToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int UtfToUnicodeProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int UtfToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr, int pureNullMode); static int UtfIntToUtfExtProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int UtfExtToUtfIntProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int Iso88591FromUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int Iso88591ToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); @@ -306,7 +306,7 @@ Tcl_GetEncodingFromObj( Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr) { - CONST char *name = Tcl_GetString(objPtr); + const char *name = Tcl_GetString(objPtr); if (objPtr->typePtr != &encodingType) { Tcl_Encoding encoding = Tcl_GetEncoding(interp, name); @@ -314,7 +314,7 @@ Tcl_GetEncodingFromObj( return TCL_ERROR; } TclFreeIntRep(objPtr); - objPtr->internalRep.otherValuePtr = (VOID *) encoding; + objPtr->internalRep.otherValuePtr = (void *) encoding; objPtr->typePtr = &encodingType; } *encodingPtr = Tcl_GetEncoding(NULL, name); @@ -353,7 +353,7 @@ DupEncodingIntRep( Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) { - dupPtr->internalRep.otherValuePtr = (VOID *) + dupPtr->internalRep.otherValuePtr = (void *) Tcl_GetEncoding(NULL, srcPtr->bytes); } @@ -693,7 +693,7 @@ TclFinalizeEncodingSubsystem(void) *------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_GetDefaultEncodingDir(void) { int numDirs; @@ -727,7 +727,7 @@ Tcl_GetDefaultEncodingDir(void) void Tcl_SetDefaultEncodingDir( - CONST char *path) + const char *path) { Tcl_Obj *searchPath = Tcl_GetEncodingSearchPath(); Tcl_Obj *directory = Tcl_NewStringObj(path, -1); @@ -765,7 +765,7 @@ Tcl_SetDefaultEncodingDir( Tcl_Encoding Tcl_GetEncoding( Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */ - CONST char *name) /* The name of the desired encoding. */ + const char *name) /* The name of the desired encoding. */ { Tcl_HashEntry *hPtr; Encoding *encodingPtr; @@ -875,7 +875,7 @@ FreeEncoding( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_GetEncodingName( Tcl_Encoding encoding) /* The encoding whose name to fetch. */ { @@ -982,7 +982,7 @@ Tcl_GetEncodingNames( int Tcl_SetSystemEncoding( Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */ - CONST char *name) /* The name of the desired encoding, or NULL + const char *name) /* The name of the desired encoding, or NULL * to reset to default encoding. */ { Tcl_Encoding encoding; @@ -1105,7 +1105,7 @@ char * Tcl_ExternalToUtfDString( Tcl_Encoding encoding, /* The encoding for the source string, or NULL * for the default system encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes, or < 0 for * encoding-specific string length. */ Tcl_DString *dstPtr) /* Uninitialized or free DString in which the @@ -1179,7 +1179,7 @@ Tcl_ExternalToUtf( Tcl_Interp *interp, /* Interp for error return, if not NULL. */ Tcl_Encoding encoding, /* The encoding for the source string, or NULL * for the default system encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes, or < 0 for * encoding-specific string length. */ int flags, /* Conversion control flags. */ @@ -1272,7 +1272,7 @@ char * Tcl_UtfToExternalDString( Tcl_Encoding encoding, /* The encoding for the converted string, or * NULL for the default system encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes, or < 0 for * strlen(). */ Tcl_DString *dstPtr) /* Uninitialized or free DString in which the @@ -1347,7 +1347,7 @@ Tcl_UtfToExternal( Tcl_Interp *interp, /* Interp for error return, if not NULL. */ Tcl_Encoding encoding, /* The encoding for the converted string, or * NULL for the default system encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes, or < 0 for * strlen(). */ int flags, /* Conversion control flags. */ @@ -1432,7 +1432,7 @@ Tcl_UtfToExternal( void Tcl_FindExecutable( - CONST char *argv0) /* The value of the application's argv[0] + const char *argv0) /* The value of the application's argv[0] * (native). */ { TclInitSubsystems(); @@ -1462,7 +1462,7 @@ Tcl_FindExecutable( static Tcl_Channel OpenEncodingFileChannel( Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */ - CONST char *name) /* The name of the encoding file on disk and + const char *name) /* The name of the encoding file on disk and * also the name for new encoding. */ { Tcl_Obj *nameObj = Tcl_NewStringObj(name, -1); @@ -1492,7 +1492,7 @@ OpenEncodingFileChannel( } } if (!verified) { - CONST char *dirString = Tcl_GetString(directory); + const char *dirString = Tcl_GetString(directory); for (i=0; i= 0; Tcl_DStringSetLength(&lineString, 0)) { - unsigned char* p; + unsigned char *p; int to, from; if (len < 5) { continue; } - p = (unsigned char*) Tcl_DStringValue(&lineString); + p = (unsigned char *) Tcl_DStringValue(&lineString); to = (staticHex[p[0]] << 12) + (staticHex[p[1]] << 8) + (staticHex[p[2]] << 4) + staticHex[p[3]]; if (to == 0) { @@ -1933,7 +1933,7 @@ LoadTableEncoding( static Tcl_Encoding LoadEscapeEncoding( - CONST char *name, /* Name for new encoding. */ + const char *name, /* Name for new encoding. */ Tcl_Channel chan) /* File containing new encoding. */ { int i; @@ -1949,7 +1949,7 @@ LoadEscapeEncoding( while (1) { int argc; - CONST char **argv; + const char **argv; char *line; Tcl_DString lineString; @@ -2054,7 +2054,7 @@ LoadEscapeEncoding( static int BinaryProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string (unknown encoding). */ + const char *src, /* Source string (unknown encoding). */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2115,7 +2115,7 @@ BinaryProc( static int UtfIntToUtfExtProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2163,7 +2163,7 @@ UtfIntToUtfExtProc( static int UtfExtToUtfIntProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2212,7 +2212,7 @@ UtfExtToUtfIntProc( static int UtfToUtfProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2239,7 +2239,7 @@ UtfToUtfProc( * representation to real null-bytes or vice * versa. */ { - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd; int result, numChars; Tcl_UniChar ch; @@ -2326,7 +2326,7 @@ UtfToUtfProc( static int UnicodeToUtfProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in Unicode. */ + const char *src, /* Source string in Unicode. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2350,7 +2350,7 @@ UnicodeToUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstEnd, *dstStart; int result, numChars; Tcl_UniChar ch; @@ -2412,7 +2412,7 @@ static int UtfToUnicodeProc( ClientData clientData, /* TableEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2436,7 +2436,7 @@ UtfToUnicodeProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd; + const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd; int result, numChars; Tcl_UniChar ch; @@ -2506,7 +2506,7 @@ static int TableToUtfProc( ClientData clientData, /* TableEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2530,7 +2530,7 @@ TableToUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstEnd, *dstStart, *prefixBytes; int result, byte, numChars; Tcl_UniChar ch; @@ -2615,7 +2615,7 @@ static int TableFromUtfProc( ClientData clientData, /* TableEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2639,7 +2639,7 @@ TableFromUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd, *prefixBytes; Tcl_UniChar ch; int result, len, word, numChars; @@ -2737,7 +2737,7 @@ TableFromUtfProc( static int Iso88591ToUtfProc( ClientData clientData, /* Ignored. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2761,7 +2761,7 @@ Iso88591ToUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstEnd, *dstStart; int result, numChars; @@ -2816,7 +2816,7 @@ Iso88591ToUtfProc( static int Iso88591FromUtfProc( ClientData clientData, /* Ignored. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2840,7 +2840,7 @@ Iso88591FromUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd; int result, numChars; @@ -2957,7 +2957,7 @@ static int EscapeToUtfProc( ClientData clientData, /* EscapeEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2986,7 +2986,7 @@ EscapeToUtfProc( unsigned short **tableToUnicode; Encoding *encodingPtr; int state, result, numChars; - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstStart, *dstEnd; result = TCL_OK; @@ -3171,7 +3171,7 @@ static int EscapeFromUtfProc( ClientData clientData, /* EscapeEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -3197,7 +3197,7 @@ EscapeFromUtfProc( { EscapeEncodingData *dataPtr; Encoding *encodingPtr; - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd; int state, result, numChars; TableEncodingData *tableDataPtr; @@ -3465,7 +3465,7 @@ GetTableEncoding( static size_t unilen( - CONST char *src) + const char *src) { unsigned short *p; diff --git a/generic/tclEvent.c b/generic/tclEvent.c index dc9705d..7a7dbd8 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.80 2008/03/10 17:54:47 dgp Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.81 2008/04/27 22:21:29 dkf Exp $ */ #include "tclInt.h" @@ -115,7 +115,7 @@ static void BgErrorDeleteProc(ClientData clientData, Tcl_Interp *interp); static void HandleBgErrors(ClientData clientData); static char * VwaitVarProc(ClientData clientData, Tcl_Interp *interp, - CONST char *name1, CONST char *name2, int flags); + const char *name1, const char *name2, int flags); /* *---------------------------------------------------------------------- @@ -305,7 +305,7 @@ TclDefaultBgErrorHandlerObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *keyPtr, *valuePtr; Tcl_Obj *tempObjv[2]; @@ -1227,7 +1227,7 @@ Tcl_VwaitObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int done, foundEvent; char *nameString; @@ -1277,8 +1277,8 @@ static char * VwaitVarProc( ClientData clientData, /* Pointer to integer to set to 1. */ Tcl_Interp *interp, /* Interpreter containing variable. */ - CONST char *name1, /* Name of variable. */ - CONST char *name2, /* Second part of variable name. */ + const char *name1, /* Name of variable. */ + const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { int *donePtr = (int *) clientData; @@ -1310,11 +1310,11 @@ Tcl_UpdateObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int optionIndex; int flags = 0; /* Initialized to avoid compiler warning. */ - static CONST char *updateOptions[] = {"idletasks", NULL}; + static const char *updateOptions[] = {"idletasks", NULL}; enum updateOptions {REGEXP_IDLETASKS}; if (objc == 1) { diff --git a/generic/tclExecute.c b/generic/tclExecute.c index c7e3e08..89c2066 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.370 2008/04/08 15:11:30 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.371 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -2182,8 +2182,8 @@ TclExecuteByteCode( Tcl_Obj *objPtr; TclNewObj(objPtr); - objPtr->internalRep.twoPtrValue.ptr1 = (VOID *) CURR_DEPTH; - objPtr->internalRep.twoPtrValue.ptr2 = (VOID *) expandNestList; + objPtr->internalRep.twoPtrValue.ptr1 = (void *) CURR_DEPTH; + objPtr->internalRep.twoPtrValue.ptr2 = (void *) expandNestList; expandNestList = objPtr; NEXT_INST_F(1, 0, 0); } diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 64782c8..c811f1a 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.43 2007/12/13 15:23:17 dgp Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.44 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -23,9 +23,9 @@ static int CopyRenameOneFile(Tcl_Interp *interp, int copyFlag, int force); static Tcl_Obj * FileBasename(Tcl_Interp *interp, Tcl_Obj *pathPtr); static int FileCopyRename(Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[], int copyFlag); + int objc, Tcl_Obj *const objv[], int copyFlag); static int FileForceOption(Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[], int *forcePtr); + int objc, Tcl_Obj *const objv[], int *forcePtr); /* *--------------------------------------------------------------------------- @@ -51,7 +51,7 @@ TclFileRenameCmd( Tcl_Interp *interp, /* Interp for error reporting or recursive * calls in the case of a tricky rename. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument strings passed to Tcl_FileCmd. */ + Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */ { return FileCopyRename(interp, objc, objv, 0); } @@ -79,7 +79,7 @@ TclFileCopyCmd( Tcl_Interp *interp, /* Used for error reporting or recursive calls * in the case of a tricky copy. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument strings passed to Tcl_FileCmd. */ + Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */ { return FileCopyRename(interp, objc, objv, 1); } @@ -105,7 +105,7 @@ static int FileCopyRename( Tcl_Interp *interp, /* Used for error reporting. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[], /* Argument strings passed to Tcl_FileCmd. */ + Tcl_Obj *const objv[], /* Argument strings passed to Tcl_FileCmd. */ int copyFlag) /* If non-zero, copy source(s). Otherwise, * rename them. */ { @@ -220,7 +220,7 @@ int TclFileMakeDirsCmd( Tcl_Interp *interp, /* Used for error reporting. */ int objc, /* Number of arguments */ - Tcl_Obj *CONST objv[]) /* Argument strings passed to Tcl_FileCmd. */ + Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */ { Tcl_Obj *errfile; int result, i, j, pobjc; @@ -340,7 +340,7 @@ int TclFileDeleteCmd( Tcl_Interp *interp, /* Used for error reporting */ int objc, /* Number of arguments */ - Tcl_Obj *CONST objv[]) /* Argument strings passed to Tcl_FileCmd. */ + Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */ { int i, force, result; Tcl_Obj *errfile; @@ -819,7 +819,7 @@ static int FileForceOption( Tcl_Interp *interp, /* Interp, for error return. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[], /* Argument strings. First command line + Tcl_Obj *const objv[], /* Argument strings. First command line * option, if it exists, begins at 0. */ int *forcePtr) /* If the "-force" was specified, *forcePtr is * filled with 1, otherwise with 0. */ @@ -920,13 +920,13 @@ FileBasename( * Tcl_Interp *interp; The interp to report errors with. Since * this is an object-based API, the object * form of the result should be used. - * CONST char *fileName; This is extracted using + * const char *fileName; This is extracted using * Tcl_TranslateFileName. * TclObj **attrObjPtrPtr; A new object to hold the attribute is * allocated and put here. * The first two parameters of the callback used to write out the * attributes are the same. The third parameter is: - * CONST *attrObjPtr; A pointer to the object that has the new + * const *attrObjPtr; A pointer to the object that has the new * attribute. * They both return standard TCL errors; if the routine to get an * attribute fails, no object is allocated and *attrObjPtrPtr is @@ -945,11 +945,11 @@ int TclFileAttrsCmd( Tcl_Interp *interp, /* The interpreter for error reporting. */ int objc, /* Number of command line arguments. */ - Tcl_Obj *CONST objv[]) /* The command line objects. */ + Tcl_Obj *const objv[]) /* The command line objects. */ { int result; - CONST char ** attributeStrings; - Tcl_Obj* objStrings = NULL; + const char ** attributeStrings; + Tcl_Obj *objStrings = NULL; int numObjStrings = -1; Tcl_Obj *filePtr; @@ -1001,8 +1001,8 @@ TclFileAttrsCmd( if (Tcl_ListObjLength(interp, objStrings, &numObjStrings) != TCL_OK) { goto end; } - attributeStrings = (CONST char **) TclStackAlloc(interp, - (1+numObjStrings) * sizeof(char*)); + attributeStrings = (const char **) + TclStackAlloc(interp, (1+numObjStrings) * sizeof(char *)); for (index = 0; index < numObjStrings; index++) { Tcl_ListObjIndex(interp, objStrings, index, &objPtr); attributeStrings[index] = TclGetString(objPtr); diff --git a/generic/tclGet.c b/generic/tclGet.c index ca93466..3dfe905 100644 --- a/generic/tclGet.c +++ b/generic/tclGet.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGet.c,v 1.20 2007/12/13 15:23:17 dgp Exp $ + * RCS: @(#) $Id: tclGet.c,v 1.21 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -38,7 +38,7 @@ int Tcl_GetInt( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ - CONST char *src, /* String containing a (possibly signed) + const char *src, /* String containing a (possibly signed) * integer in a form acceptable to strtoul. */ int *intPtr) /* Place to store converted result. */ { @@ -82,7 +82,7 @@ int TclGetLong( Tcl_Interp *interp, /* Interpreter used for error reporting if not * NULL. */ - CONST char *src, /* String containing a (possibly signed) long + const char *src, /* String containing a (possibly signed) long * integer in a form acceptable to strtoul. */ long *longPtr) /* Place to store converted long result. */ { @@ -124,7 +124,7 @@ TclGetLong( int Tcl_GetDouble( Tcl_Interp *interp, /* Interpreter used for error reporting. */ - CONST char *src, /* String containing a floating-point number + const char *src, /* String containing a floating-point number * in a form acceptable to strtod. */ double *doublePtr) /* Place to store converted result. */ { @@ -166,7 +166,7 @@ Tcl_GetDouble( int Tcl_GetBoolean( Tcl_Interp *interp, /* Interpreter used for error reporting. */ - CONST char *src, /* String containing a boolean number + const char *src, /* String containing a boolean number * specified either as 1/0 or true/false or * yes/no. */ int *boolPtr) /* Place to store converted result, which will diff --git a/generic/tclHash.c b/generic/tclHash.c index 4285c9b..b4dd67d 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.33 2007/12/13 15:23:17 dgp Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.34 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -43,9 +43,9 @@ * Prototypes for the array hash key methods. */ -static Tcl_HashEntry * AllocArrayEntry(Tcl_HashTable *tablePtr, VOID *keyPtr); -static int CompareArrayKeys(VOID *keyPtr, Tcl_HashEntry *hPtr); -static unsigned int HashArrayKey(Tcl_HashTable *tablePtr, VOID *keyPtr); +static Tcl_HashEntry * AllocArrayEntry(Tcl_HashTable *tablePtr, void *keyPtr); +static int CompareArrayKeys(void *keyPtr, Tcl_HashEntry *hPtr); +static unsigned int HashArrayKey(Tcl_HashTable *tablePtr, void *keyPtr); /* * Prototypes for the one word hash key methods. @@ -53,9 +53,9 @@ static unsigned int HashArrayKey(Tcl_HashTable *tablePtr, VOID *keyPtr); #if 0 static Tcl_HashEntry * AllocOneWordEntry(Tcl_HashTable *tablePtr, - VOID *keyPtr); -static int CompareOneWordKeys(VOID *keyPtr, Tcl_HashEntry *hPtr); -static unsigned int HashOneWordKey(Tcl_HashTable *tablePtr, VOID *keyPtr); + void *keyPtr); +static int CompareOneWordKeys(void *keyPtr, Tcl_HashEntry *hPtr); +static unsigned int HashOneWordKey(Tcl_HashTable *tablePtr, void *keyPtr); #endif /* @@ -63,9 +63,9 @@ static unsigned int HashOneWordKey(Tcl_HashTable *tablePtr, VOID *keyPtr); */ static Tcl_HashEntry * AllocStringEntry(Tcl_HashTable *tablePtr, - VOID *keyPtr); -static int CompareStringKeys(VOID *keyPtr, Tcl_HashEntry *hPtr); -static unsigned int HashStringKey(Tcl_HashTable *tablePtr, VOID *keyPtr); + void *keyPtr); +static int CompareStringKeys(void *keyPtr, Tcl_HashEntry *hPtr); +static unsigned int HashStringKey(Tcl_HashTable *tablePtr, void *keyPtr); /* * Function prototypes for static functions in this file: @@ -281,7 +281,7 @@ Tcl_CreateHashEntry( } if (typePtr->hashKeyProc) { - hash = typePtr->hashKeyProc(tablePtr, (VOID *) key); + hash = typePtr->hashKeyProc(tablePtr, (void *) key); if (typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { index = RANDOM_INDEX (tablePtr, hash); } else { @@ -305,7 +305,7 @@ Tcl_CreateHashEntry( continue; } #endif - if (compareKeysProc((VOID *) key, hPtr)) { + if (compareKeysProc((void *) key, hPtr)) { if (newPtr) { *newPtr = 0; } @@ -339,7 +339,7 @@ Tcl_CreateHashEntry( *newPtr = 1; if (typePtr->allocEntryProc) { - hPtr = typePtr->allocEntryProc(tablePtr, (VOID *) key); + hPtr = typePtr->allocEntryProc(tablePtr, (void *) key); } else { hPtr = (Tcl_HashEntry *) ckalloc((unsigned) sizeof(Tcl_HashEntry)); hPtr->key.oneWordValue = (char *) key; @@ -704,7 +704,7 @@ Tcl_HashStats( static Tcl_HashEntry * AllocArrayEntry( Tcl_HashTable *tablePtr, /* Hash table. */ - VOID *keyPtr) /* Key to store in the hash table entry. */ + void *keyPtr) /* Key to store in the hash table entry. */ { int *array = (int *) keyPtr; register int *iPtr1, *iPtr2; @@ -748,7 +748,7 @@ AllocArrayEntry( static int CompareArrayKeys( - VOID *keyPtr, /* New key to compare. */ + void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { register const int *iPtr1 = (const int *) keyPtr; @@ -788,7 +788,7 @@ CompareArrayKeys( static unsigned int HashArrayKey( Tcl_HashTable *tablePtr, /* Hash table. */ - VOID *keyPtr) /* Key from which to compute hash value. */ + void *keyPtr) /* Key from which to compute hash value. */ { register const int *array = (const int *) keyPtr; register unsigned int result; @@ -820,7 +820,7 @@ HashArrayKey( static Tcl_HashEntry * AllocStringEntry( Tcl_HashTable *tablePtr, /* Hash table. */ - VOID *keyPtr) /* Key to store in the hash table entry. */ + void *keyPtr) /* Key to store in the hash table entry. */ { const char *string = (const char *) keyPtr; Tcl_HashEntry *hPtr; @@ -855,7 +855,7 @@ AllocStringEntry( static int CompareStringKeys( - VOID *keyPtr, /* New key to compare. */ + void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { register const char *p1 = (const char *) keyPtr; @@ -884,7 +884,7 @@ CompareStringKeys( static unsigned int HashStringKey( Tcl_HashTable *tablePtr, /* Hash table. */ - VOID *keyPtr) /* Key from which to compute hash value. */ + void *keyPtr) /* Key from which to compute hash value. */ { register const char *string = (const char *) keyPtr; register unsigned int result; @@ -1052,7 +1052,7 @@ RebuildTable( hPtr->nextPtr = tablePtr->buckets[index]; tablePtr->buckets[index] = hPtr; #else - VOID *key = (VOID *) Tcl_GetHashKey(tablePtr, hPtr); + void *key = Tcl_GetHashKey(tablePtr, hPtr); if (typePtr->hashKeyProc) { unsigned int hash; diff --git a/generic/tclHistory.c b/generic/tclHistory.c index 87e6c52..0a01019 100644 --- a/generic/tclHistory.c +++ b/generic/tclHistory.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHistory.c,v 1.10 2007/04/10 14:47:15 dkf Exp $ + * RCS: @(#) $Id: tclHistory.c,v 1.11 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -39,7 +39,7 @@ int Tcl_RecordAndEval( Tcl_Interp *interp, /* Token for interpreter in which command will * be executed. */ - CONST char *cmd, /* Command to record. */ + const char *cmd, /* Command to record. */ int flags) /* Additional flags. TCL_NO_EVAL means only * record: don't execute command. * TCL_EVAL_GLOBAL means use Tcl_GlobalEval diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index b64a32e..ac19b45 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.32 2008/04/25 21:27:09 das Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.33 2008/04/27 22:21:30 dkf Exp $ */ #include @@ -63,16 +63,16 @@ static Tcl_ChannelType tclRChannelType = { ReflectClose, /* Close channel, clean instance data */ ReflectInput, /* Handle read request */ ReflectOutput, /* Handle write request */ - ReflectSeek, /* Move location of access point. NULL'able */ - ReflectSetOption, /* Set options. NULL'able */ - ReflectGetOption, /* Get options. NULL'able */ + ReflectSeek, /* Move location of access point. NULL'able */ + ReflectSetOption, /* Set options. NULL'able */ + ReflectGetOption, /* Get options. NULL'able */ ReflectWatch, /* Initialize notifier */ - NULL, /* Get OS handle from the channel. NULL'able */ - NULL, /* No close2 support. NULL'able */ - ReflectBlock, /* Set blocking/nonblocking. NULL'able */ - NULL, /* Flush channel. Not used by core. NULL'able */ - NULL, /* Handle events. NULL'able */ - ReflectSeekWide, /* Move access point (64 bit). NULL'able */ + NULL, /* Get OS handle from the channel. NULL'able */ + NULL, /* No close2 support. NULL'able */ + ReflectBlock, /* Set blocking/nonblocking. NULL'able */ + NULL, /* Flush channel. Not used by core. NULL'able */ + NULL, /* Handle events. NULL'able */ + ReflectSeekWide, /* Move access point (64 bit). NULL'able */ NULL, /* thread action */ NULL, /* truncate */ }; @@ -342,7 +342,8 @@ typedef struct ForwardingEvent { struct ForwardingResult { Tcl_ThreadId src; /* Originating thread. */ Tcl_ThreadId dst; /* Thread the op was forwarded to. */ - Tcl_Interp* dsti; /* Interpreter in the thread the op was forwarded to. */ + Tcl_Interp *dsti; /* Interpreter in the thread the op was + * forwarded to. */ /* * Note regarding 'dsti' above: Its information is also available via the * chain evPtr->rcPtr->interp, however, as can be seen, two more @@ -364,7 +365,7 @@ typedef struct ThreadSpecificData { * per-thread version of the per-interpreter map. */ - ReflectedChannelMap* rcmPtr; + ReflectedChannelMap *rcmPtr; } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; @@ -389,7 +390,7 @@ TCL_DECLARE_MUTEX(rcForwardMutex) */ static void ForwardOpToOwnerThread(ReflectedChannel *rcPtr, - ForwardedOperation op, const VOID *param); + ForwardedOperation op, const void *param); static int ForwardProc(Tcl_Event *evPtr, int mask); static void SrcExitProc(ClientData clientData); @@ -512,9 +513,11 @@ TclChanCreateObjCmd( int methods; /* Bitmask for supported methods. */ Channel *chanPtr; /* 'chan' resolved to internal struct. */ Tcl_Obj *err; /* Error message */ - ReflectedChannelMap* rcmPtr; /* Map of reflected channels with handlers in this interp */ - Tcl_HashEntry* hPtr; /* Entry in the above map */ - int isNew; /* Placeholder. */ + ReflectedChannelMap *rcmPtr; + /* Map of reflected channels with handlers in + * this interp. */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ + int isNew; /* Placeholder. */ /* * Syntax: chan create MODE CMDPREFIX @@ -714,18 +717,16 @@ TclChanCreateObjCmd( Tcl_RegisterChannel(interp, chan); rcmPtr = GetReflectedChannelMap (interp); - hPtr = Tcl_CreateHashEntry(&rcmPtr->map, - chanPtr->state->channelName, &isNew); - if (!isNew) { - if (chanPtr != Tcl_GetHashValue(hPtr)) { - Tcl_Panic("TclChanCreateObjCmd: duplicate channel names"); - } + hPtr = Tcl_CreateHashEntry(&rcmPtr->map, chanPtr->state->channelName, + &isNew); + if (!isNew && chanPtr != Tcl_GetHashValue(hPtr)) { + Tcl_Panic("TclChanCreateObjCmd: duplicate channel names"); } Tcl_SetHashValue(hPtr, chan); #ifdef TCL_THREADS rcmPtr = GetThreadReflectedChannelMap(); - hPtr = Tcl_CreateHashEntry(&rcmPtr->map, - chanPtr->state->channelName, &isNew); + hPtr = Tcl_CreateHashEntry(&rcmPtr->map, chanPtr->state->channelName, + &isNew); Tcl_SetHashValue(hPtr, chan); #endif @@ -736,7 +737,7 @@ TclChanCreateObjCmd( Tcl_SetObjResult(interp, rcId); return TCL_OK; - error: + error: /* * Signal to ReflectClose to not call 'finalize'. */ @@ -793,8 +794,9 @@ TclChanPostEventObjCmd( /* Its associated driver structure */ ReflectedChannel *rcPtr; /* Associated instance data */ int events; /* Mask of events to post */ - ReflectedChannelMap* rcmPtr; /* Map of reflected channels with handlers in this interp */ - Tcl_HashEntry* hPtr; /* Entry in the above map */ + ReflectedChannelMap *rcmPtr;/* Map of reflected channels with handlers in + * this interp. */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ /* * Number of arguments... @@ -900,7 +902,7 @@ TclChanPostEventObjCmd( * Channel error message marshalling utilities. */ -static Tcl_Obj* +static Tcl_Obj * MarshallError( Tcl_Interp *interp) { @@ -1043,8 +1045,9 @@ ReflectClose( ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; int result; /* Result code for 'close' */ Tcl_Obj *resObj; /* Result data for 'close' */ - ReflectedChannelMap* rcmPtr; /* Map of reflected channels with handlers in this interp */ - Tcl_HashEntry* hPtr; /* Entry in the above map */ + ReflectedChannelMap *rcmPtr;/* Map of reflected channels with handlers in + * this interp */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ if (interp == NULL) { /* @@ -1136,18 +1139,18 @@ ReflectClose( * thread and then was moved here. */ - rcmPtr = GetReflectedChannelMap (interp); - hPtr = Tcl_FindHashEntry (&rcmPtr->map, - Tcl_GetChannelName (rcPtr->chan)); + rcmPtr = GetReflectedChannelMap(interp); + hPtr = Tcl_FindHashEntry(&rcmPtr->map, + Tcl_GetChannelName(rcPtr->chan)); if (hPtr) { - Tcl_DeleteHashEntry (hPtr); + Tcl_DeleteHashEntry(hPtr); } #ifdef TCL_THREADS rcmPtr = GetThreadReflectedChannelMap(); - hPtr = Tcl_FindHashEntry (&rcmPtr->map, - Tcl_GetChannelName (rcPtr->chan)); + hPtr = Tcl_FindHashEntry(&rcmPtr->map, + Tcl_GetChannelName(rcPtr->chan)); if (hPtr) { - Tcl_DeleteHashEntry (hPtr); + Tcl_DeleteHashEntry(hPtr); } #endif @@ -1690,7 +1693,7 @@ ReflectGetOption( * The bypass functions are not required. */ - ReflectedChannel *rcPtr = (ReflectedChannel*) clientData; + ReflectedChannel *rcPtr = clientData; Tcl_Obj *optionObj; Tcl_Obj *resObj; /* Result data for 'configure' */ int listc; @@ -2064,7 +2067,7 @@ FreeReflectedChannel( * Delete a cloned ChannelType structure. */ - ckfree((char*) chanPtr->typePtr); + ckfree((char *) chanPtr->typePtr); } n = rcPtr->argc - 2; @@ -2078,8 +2081,8 @@ FreeReflectedChannel( Tcl_DecrRefCount(rcPtr->argv[n+1]); - ckfree((char*) rcPtr->argv); - ckfree((char*) rcPtr); + ckfree((char *) rcPtr->argv); + ckfree((char *) rcPtr); } /* @@ -2267,7 +2270,7 @@ static ReflectedChannelMap * GetReflectedChannelMap( Tcl_Interp *interp) { - ReflectedChannelMap* rcmPtr = Tcl_GetAssocData(interp, RCMKEY, NULL); + ReflectedChannelMap *rcmPtr = Tcl_GetAssocData(interp, RCMKEY, NULL); if (rcmPtr == NULL) { rcmPtr = (ReflectedChannelMap *) ckalloc(sizeof(ReflectedChannelMap)); @@ -2303,10 +2306,10 @@ DeleteReflectedChannelMap( ClientData clientData, /* The per-interpreter data structure. */ Tcl_Interp *interp) /* The interpreter being deleted. */ { - ReflectedChannelMap* rcmPtr; /* The map */ + ReflectedChannelMap *rcmPtr; /* The map */ Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ - ReflectedChannel* rcPtr; + ReflectedChannel *rcPtr; Tcl_Channel chan; #ifdef TCL_THREADS @@ -2318,7 +2321,7 @@ DeleteReflectedChannelMap( /* * Delete all entries. The channels may have been closed already, or will * be closed later, by the standard IO finalization of an interpreter - * under destruction. Except for the channels which were moved to a + * under destruction. Except for the channels which were moved to a * different interpreter and/or thread. They do not exist from the IO * systems point of view and will not get closed. Therefore mark all as * dead so that any future access will cause a proper error. For channels @@ -2329,14 +2332,12 @@ DeleteReflectedChannelMap( rcmPtr = clientData; for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); - hPtr != NULL; - hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { - - chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); + hPtr != NULL; + hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { + chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); rcPtr->interp = NULL; - Tcl_DeleteHashEntry(hPtr); } Tcl_DeleteHashTable(&rcmPtr->map); @@ -2356,10 +2357,13 @@ DeleteReflectedChannelMap( Tcl_MutexLock(&rcForwardMutex); for (resultPtr = forwardList; - resultPtr != NULL; - resultPtr = resultPtr->nextPtr) { + resultPtr != NULL; + resultPtr = resultPtr->nextPtr) { if (resultPtr->dsti != interp) { - /* Ignore results/events for other interpreters. */ + /* + * Ignore results/events for other interpreters. + */ + continue; } @@ -2389,14 +2393,16 @@ DeleteReflectedChannelMap( rcmPtr = GetThreadReflectedChannelMap(); for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); - hPtr != NULL; - hPtr = Tcl_NextHashEntry(&hSearch)) { - - chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&hSearch)) { + chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); if (rcPtr->interp != interp) { - /* Ignore entries for other interpreters */ + /* + * Ignore entries for other interpreters. + */ + continue; } @@ -2426,12 +2432,13 @@ DeleteReflectedChannelMap( */ static ReflectedChannelMap * -GetThreadReflectedChannelMap() +GetThreadReflectedChannelMap(void) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); if (!tsdPtr->rcmPtr) { - tsdPtr->rcmPtr = (ReflectedChannelMap *) ckalloc(sizeof(ReflectedChannelMap)); + tsdPtr->rcmPtr = (ReflectedChannelMap *) + ckalloc(sizeof(ReflectedChannelMap)); Tcl_InitHashTable(&tsdPtr->rcmPtr->map, TCL_STRING_KEYS); Tcl_CreateThreadExitHandler(DeleteThreadReflectedChannelMap, NULL); } @@ -2464,13 +2471,8 @@ DeleteThreadReflectedChannelMap( Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ Tcl_ThreadId self = Tcl_GetCurrentThread(); - - ReflectedChannelMap* rcmPtr; /* The map */ - Tcl_Channel chan; - ReflectedChannel* rcPtr; + ReflectedChannelMap *rcmPtr; /* The map */ ForwardingResult *resultPtr; - ForwardingEvent *evPtr; - ForwardParam *paramPtr; /* * The origin thread for one or more reflected channels is gone. @@ -2487,10 +2489,16 @@ DeleteThreadReflectedChannelMap( Tcl_MutexLock(&rcForwardMutex); for (resultPtr = forwardList; - resultPtr != NULL; - resultPtr = resultPtr->nextPtr) { + resultPtr != NULL; + resultPtr = resultPtr->nextPtr) { + ForwardingEvent *evPtr; + ForwardParam *paramPtr; + if (resultPtr->dst != self) { - /* Ignore results/events for other threads. */ + /* + * Ignore results/events for other threads. + */ + continue; } @@ -2519,14 +2527,13 @@ DeleteThreadReflectedChannelMap( rcmPtr = GetThreadReflectedChannelMap(); for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); - hPtr != NULL; - hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { - - chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); - rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); + hPtr != NULL; + hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { + Tcl_Channel chan = (Tcl_Channel) Tcl_GetHashValue(hPtr); + ReflectedChannel *rcPtr = (ReflectedChannel *) + Tcl_GetChannelInstanceData(chan); rcPtr->interp = NULL; - Tcl_DeleteHashEntry(hPtr); } @@ -2537,7 +2544,7 @@ static void ForwardOpToOwnerThread( ReflectedChannel *rcPtr, /* Channel instance */ ForwardedOperation op, /* Forwarded driver operation */ - const VOID *param) /* Arguments */ + const void *param) /* Arguments */ { Tcl_ThreadId dst = rcPtr->thread; ForwardingEvent *evPtr; @@ -2557,7 +2564,7 @@ ForwardOpToOwnerThread( * appropriate error. Do not forget to unlock the mutex on this path. */ - ForwardSetStaticError((ForwardParam *)param, msg_send_dstlost); + ForwardSetStaticError((ForwardParam *) param, msg_send_dstlost); Tcl_MutexUnlock(&rcForwardMutex); return; } @@ -2575,8 +2582,8 @@ ForwardOpToOwnerThread( evPtr->rcPtr = rcPtr; evPtr->param = (ForwardParam *) param; - resultPtr->src = Tcl_GetCurrentThread(); - resultPtr->dst = dst; + resultPtr->src = Tcl_GetCurrentThread(); + resultPtr->dst = dst; resultPtr->dsti = rcPtr->interp; resultPtr->done = NULL; resultPtr->result = -1; @@ -2591,9 +2598,9 @@ ForwardOpToOwnerThread( /* * Ensure cleanup of the event if the origin thread exits while this event - * is pending or in progress. Exitus of the destination thread is handled - * by DeleteThreadReflectionChannelMap(), this is set up by - * GetThreadReflectedChannelMap(). This is what we use the 'forwardList' + * is pending or in progress. Exit of the destination thread is handled by + * DeleteThreadReflectionChannelMap(), this is set up by + * GetThreadReflectedChannelMap(). This is what we use the 'forwardList' * (see above) for. */ @@ -2625,8 +2632,8 @@ ForwardOpToOwnerThread( } /* - * Unlink result from the forwarder list. - * No need to lock. Either still locked, or locked by the ConditionWait + * Unlink result from the forwarder list. No need to lock. Either still + * locked, or locked by the ConditionWait */ TclSpliceOut(resultPtr, forwardList); @@ -2647,7 +2654,7 @@ ForwardOpToOwnerThread( Tcl_DeleteThreadExitHandler(SrcExitProc, (ClientData) evPtr); result = resultPtr->result; - ckfree((char*) resultPtr); + ckfree((char *) resultPtr); } static int @@ -2674,8 +2681,10 @@ ForwardProc( Tcl_Interp *interp = rcPtr->interp; ForwardParam *paramPtr = evPtr->param; Tcl_Obj *resObj = NULL; /* Interp result of InvokeTclMethod */ - ReflectedChannelMap* rcmPtr; /* Map of reflected channels with handlers in this interp */ - Tcl_HashEntry* hPtr; /* Entry in the above map */ + ReflectedChannelMap *rcmPtr; + /* Map of reflected channels with handlers in + * this interp. */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ /* * Ignore the event if no one is waiting for its result anymore. @@ -2715,15 +2724,15 @@ ForwardProc( * 'postevent') from finding and dereferencing a dangling pointer. */ - rcmPtr = GetReflectedChannelMap (interp); - hPtr = Tcl_FindHashEntry (&rcmPtr->map, - Tcl_GetChannelName (rcPtr->chan)); - Tcl_DeleteHashEntry (hPtr); + rcmPtr = GetReflectedChannelMap(interp); + hPtr = Tcl_FindHashEntry(&rcmPtr->map, + Tcl_GetChannelName(rcPtr->chan)); + Tcl_DeleteHashEntry(hPtr); rcmPtr = GetThreadReflectedChannelMap(); - hPtr = Tcl_FindHashEntry (&rcmPtr->map, - Tcl_GetChannelName (rcPtr->chan)); - Tcl_DeleteHashEntry (hPtr); + hPtr = Tcl_FindHashEntry(&rcmPtr->map, + Tcl_GetChannelName(rcPtr->chan)); + Tcl_DeleteHashEntry(hPtr); FreeReflectedChannel(rcPtr); break; diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 778eaa6..420ea6f 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.152 2008/04/21 16:26:37 dgp Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.153 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -3229,7 +3229,7 @@ TclpLoadFile( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Obj *pathPtr, /* Name of the file containing the desired * code (UTF-8). */ - const char *sym1, CONST char *sym2, + const char *sym1, const char *sym2, /* Names of two functions to look up in the * file's symbol table. */ Tcl_PackageInitProc **proc1Ptr, Tcl_PackageInitProc **proc2Ptr, diff --git a/generic/tclLink.c b/generic/tclLink.c index 77dc509..d4a7f38 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLink.c,v 1.24 2007/12/13 15:23:18 dgp Exp $ + * RCS: @(#) $Id: tclLink.c,v 1.25 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -67,7 +67,7 @@ typedef struct Link { */ static char * LinkTraceProc(ClientData clientData,Tcl_Interp *interp, - CONST char *name1, CONST char *name2, int flags); + const char *name1, const char *name2, int flags); static Tcl_Obj * ObjValue(Link *linkPtr); /* @@ -104,7 +104,7 @@ static Tcl_Obj * ObjValue(Link *linkPtr); int Tcl_LinkVar( Tcl_Interp *interp, /* Interpreter in which varName exists. */ - CONST char *varName, /* Name of a global variable in interp. */ + const char *varName, /* Name of a global variable in interp. */ char *addr, /* Address of a C variable to be linked to * varName. */ int type) /* Type of C variable: TCL_LINK_INT, etc. Also @@ -133,8 +133,7 @@ Tcl_LinkVar( return TCL_ERROR; } code = Tcl_TraceVar(interp, varName, TCL_GLOBAL_ONLY|TCL_TRACE_READS - |TCL_TRACE_WRITES|TCL_TRACE_UNSETS, LinkTraceProc, - (ClientData) linkPtr); + |TCL_TRACE_WRITES|TCL_TRACE_UNSETS, LinkTraceProc, linkPtr); if (code != TCL_OK) { Tcl_DecrRefCount(linkPtr->varName); ckfree((char *) linkPtr); @@ -163,18 +162,17 @@ Tcl_LinkVar( void Tcl_UnlinkVar( Tcl_Interp *interp, /* Interpreter containing variable to unlink */ - CONST char *varName) /* Global variable in interp to unlink. */ + const char *varName) /* Global variable in interp to unlink. */ { - Link *linkPtr; + Link *linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, + TCL_GLOBAL_ONLY, LinkTraceProc, NULL); - linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, TCL_GLOBAL_ONLY, - LinkTraceProc, (ClientData) NULL); if (linkPtr == NULL) { return; } Tcl_UntraceVar(interp, varName, TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - LinkTraceProc, (ClientData) linkPtr); + LinkTraceProc, linkPtr); Tcl_DecrRefCount(linkPtr->varName); ckfree((char *) linkPtr); } @@ -201,13 +199,12 @@ Tcl_UnlinkVar( void Tcl_UpdateLinkedVar( Tcl_Interp *interp, /* Interpreter containing variable. */ - CONST char *varName) /* Name of global variable that is linked. */ + const char *varName) /* Name of global variable that is linked. */ { - Link *linkPtr; + Link *linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, + TCL_GLOBAL_ONLY, LinkTraceProc, NULL); int savedFlag; - linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, TCL_GLOBAL_ONLY, - LinkTraceProc, (ClientData) NULL); if (linkPtr == NULL) { return; } @@ -219,7 +216,7 @@ Tcl_UpdateLinkedVar( * Callback may have unlinked the variable. [Bug 1740631] */ linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, TCL_GLOBAL_ONLY, - LinkTraceProc, (ClientData) NULL); + LinkTraceProc, NULL); if (linkPtr != NULL) { linkPtr->flags = (linkPtr->flags & ~LINK_BEING_UPDATED) | savedFlag; } @@ -250,13 +247,13 @@ static char * LinkTraceProc( ClientData clientData, /* Contains information about the link. */ Tcl_Interp *interp, /* Interpreter containing Tcl variable. */ - CONST char *name1, /* First part of variable name. */ - CONST char *name2, /* Second part of variable name. */ + const char *name1, /* First part of variable name. */ + const char *name2, /* Second part of variable name. */ int flags) /* Miscellaneous additional information. */ { - Link *linkPtr = (Link *) clientData; + Link *linkPtr = clientData; int changed, valueLength; - CONST char *value; + const char *value; char **pp; Tcl_Obj *valueObj; int valueInt; @@ -277,7 +274,7 @@ LinkTraceProc( TCL_GLOBAL_ONLY); Tcl_TraceVar(interp, Tcl_GetString(linkPtr->varName), TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES - |TCL_TRACE_UNSETS, LinkTraceProc, (ClientData) linkPtr); + |TCL_TRACE_UNSETS, LinkTraceProc, linkPtr); } return NULL; } diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 556a41d..d04fb45 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.49 2007/12/13 15:23:18 dgp Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.50 2008/04/27 22:21:30 dkf Exp $ */ #include "tclInt.h" @@ -19,7 +19,7 @@ * Prototypes for functions defined later in this file: */ -static List * NewListIntRep(int objc, Tcl_Obj *CONST objv[]); +static List * NewListIntRep(int objc, Tcl_Obj *const objv[]); static void DupListInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static void FreeListInternalRep(Tcl_Obj *listPtr); static int SetListFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); @@ -72,7 +72,7 @@ Tcl_ObjType tclListType = { static List * NewListIntRep( int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *const objv[]) { List *listRepPtr; @@ -149,7 +149,7 @@ NewListIntRep( Tcl_Obj * Tcl_NewListObj( int objc, /* Count of objects referenced by objv. */ - Tcl_Obj *CONST objv[]) /* An array of pointers to Tcl objects. */ + Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */ { return Tcl_DbNewListObj(objc, objv, "unknown", 0); } @@ -159,7 +159,7 @@ Tcl_NewListObj( Tcl_Obj * Tcl_NewListObj( int objc, /* Count of objects referenced by objv. */ - Tcl_Obj *CONST objv[]) /* An array of pointers to Tcl objects. */ + Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */ { List *listRepPtr; Tcl_Obj *listPtr; @@ -227,8 +227,8 @@ Tcl_NewListObj( Tcl_Obj * Tcl_DbNewListObj( int objc, /* Count of objects referenced by objv. */ - Tcl_Obj *CONST objv[], /* An array of pointers to Tcl objects. */ - CONST char *file, /* The name of the source file calling this + Tcl_Obj *const objv[], /* An array of pointers to Tcl objects. */ + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -269,8 +269,8 @@ Tcl_DbNewListObj( Tcl_Obj * Tcl_DbNewListObj( int objc, /* Count of objects referenced by objv. */ - Tcl_Obj *CONST objv[], /* An array of pointers to Tcl objects. */ - CONST char *file, /* The name of the source file calling this + Tcl_Obj *const objv[], /* An array of pointers to Tcl objects. */ + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -305,7 +305,7 @@ void Tcl_SetListObj( Tcl_Obj *objPtr, /* Object whose internal rep to init. */ int objc, /* Count of objects referenced by objv. */ - Tcl_Obj *CONST objv[]) /* An array of pointers to Tcl objects. */ + Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */ { List *listRepPtr; @@ -774,7 +774,7 @@ Tcl_ListObjReplace( int first, /* Index of first element to replace. */ int count, /* Number of elements to replace. */ int objc, /* Number of objects to insert. */ - Tcl_Obj *CONST objv[]) /* An array of objc pointers to Tcl objects to + Tcl_Obj *const objv[]) /* An array of objc pointers to Tcl objects to * insert. */ { List *listRepPtr; diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c index 364b031..27484ca 100644 --- a/generic/tclLoadNone.c +++ b/generic/tclLoadNone.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadNone.c,v 1.12 2005/11/11 23:46:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadNone.c,v 1.13 2008/04/27 22:21:31 dkf Exp $ */ #include "tclInt.h" @@ -74,7 +74,7 @@ Tcl_PackageInitProc * TclpFindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, - CONST char *symbol) + const char *symbol) { return NULL; } @@ -101,7 +101,7 @@ TclpFindSymbol( int TclGuessPackageName( - CONST char *fileName, /* Name of file containing package (already + const char *fileName, /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ diff --git a/generic/tclMain.c b/generic/tclMain.c index 11e6ccb..726c28e 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMain.c,v 1.44 2007/12/13 15:23:19 dgp Exp $ + * RCS: @(#) $Id: tclMain.c,v 1.45 2008/04/27 22:21:31 dkf Exp $ */ #include "tclInt.h" @@ -87,7 +87,7 @@ static void StdinProc(ClientData clientData, int mask); void Tcl_SetStartupScript( Tcl_Obj *path, /* Filesystem path of startup script file */ - CONST char *encoding) /* Encoding of the data in that file */ + const char *encoding) /* Encoding of the data in that file */ { Tcl_Obj *newEncoding = NULL; if (encoding != NULL) { @@ -123,7 +123,7 @@ Tcl_SetStartupScript( * The path of the startup script; NULL if none has been set. * * Side effects: - * If encodingPtr is not NULL, stores a (CONST char *) in it pointing to + * If encodingPtr is not NULL, stores a (const char *) in it pointing to * the encoding name registered for the startup script. Tcl retains * ownership of the string, and may free it. Caller should make a copy * for long-term use. @@ -133,8 +133,8 @@ Tcl_SetStartupScript( Tcl_Obj * Tcl_GetStartupScript( - CONST char **encodingPtr) /* When not NULL, points to storage for the - * (CONST char *) that points to the + const char **encodingPtr) /* When not NULL, points to storage for the + * (const char *) that points to the * registered encoding name for the startup * script */ { @@ -216,7 +216,7 @@ TclGetStartupScriptPath(void) void TclSetStartupScriptFileName( - CONST char *fileName) + const char *fileName) { Tcl_Obj *path = Tcl_NewStringObj(fileName,-1); Tcl_SetStartupScript(path, NULL); @@ -239,7 +239,7 @@ TclSetStartupScriptFileName( *---------------------------------------------------------------------- */ -CONST char * +const char * TclGetStartupScriptFileName(void) { Tcl_Obj *path = Tcl_GetStartupScript(NULL); @@ -272,13 +272,13 @@ Tcl_SourceRCFile( Tcl_Interp *interp) /* Interpreter to source rc file into. */ { Tcl_DString temp; - CONST char *fileName; + const char *fileName; Tcl_Channel errChannel; fileName = Tcl_GetVar(interp, "tcl_rcFileName", TCL_GLOBAL_ONLY); if (fileName != NULL) { Tcl_Channel c; - CONST char *fullName; + const char *fullName; Tcl_DStringInit(&temp); fullName = Tcl_TranslateFileName(interp, fileName, &temp); @@ -337,7 +337,7 @@ Tcl_Main( * but before starting to execute commands. */ { Tcl_Obj *path, *resultPtr, *argvPtr, *commandPtr = NULL; - CONST char *encodingName = NULL; + const char *encodingName = NULL; PromptType prompt = PROMPT_START; int code, length, tty, exitCode = 0; Tcl_Channel inChannel, outChannel, errChannel; @@ -380,7 +380,8 @@ Tcl_Main( if (path == NULL) { Tcl_ExternalToUtfDString(NULL, argv[0], -1, &appName); } else { - CONST char *pathName = Tcl_GetStringFromObj(path, &length); + const char *pathName = Tcl_GetStringFromObj(path, &length); + Tcl_ExternalToUtfDString(NULL, pathName, length, &appName); path = Tcl_NewStringObj(Tcl_DStringValue(&appName), -1); Tcl_SetStartupScript(path, encodingName); @@ -395,6 +396,7 @@ Tcl_Main( argvPtr = Tcl_NewListObj(0, NULL); while (argc--) { Tcl_DString ds; + Tcl_ExternalToUtfDString(NULL, *argv++, -1, &ds); Tcl_ListObjAppendElement(NULL, argvPtr, Tcl_NewStringObj( Tcl_DStringValue(&ds), Tcl_DStringLength(&ds))); diff --git a/generic/tclObj.c b/generic/tclObj.c index f97d236..12c31f9 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.140 2008/03/30 04:36:47 kennykb Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.141 2008/04/27 22:21:31 dkf Exp $ */ #include "tclInt.h" @@ -126,11 +126,11 @@ typedef struct PendingObjData { #ifndef TCL_THREADS static PendingObjData pendingObjData; #define ObjInitDeletionContext(contextPtr) \ - PendingObjData *CONST contextPtr = &pendingObjData + PendingObjData *const contextPtr = &pendingObjData #else static Tcl_ThreadDataKey pendingObjDataKey; #define ObjInitDeletionContext(contextPtr) \ - PendingObjData *CONST contextPtr = (PendingObjData *) \ + PendingObjData *const contextPtr = (PendingObjData *) \ Tcl_GetThreadData(&pendingObjDataKey, sizeof(PendingObjData)) #endif @@ -142,13 +142,13 @@ static Tcl_ThreadDataKey pendingObjDataKey; if ((bignum).used > 0x7fff) { \ mp_int *temp = (void *) ckalloc((unsigned) sizeof(mp_int)); \ *temp = bignum; \ - (objPtr)->internalRep.ptrAndLongRep.ptr = (void*) temp; \ + (objPtr)->internalRep.ptrAndLongRep.ptr = temp; \ (objPtr)->internalRep.ptrAndLongRep.value = (unsigned long)(-1); \ } else { \ if ((bignum).alloc > 0x7fff) { \ mp_shrink(&(bignum)); \ } \ - (objPtr)->internalRep.ptrAndLongRep.ptr = (void*) (bignum).dp; \ + (objPtr)->internalRep.ptrAndLongRep.ptr = (void *) (bignum).dp; \ (objPtr)->internalRep.ptrAndLongRep.value = ( ((bignum).sign << 30) \ | ((bignum).alloc << 15) | ((bignum).used)); \ } @@ -157,7 +157,7 @@ static Tcl_ThreadDataKey pendingObjDataKey; if ((objPtr)->internalRep.ptrAndLongRep.value == (unsigned long)(-1)) { \ (bignum) = *((mp_int *) ((objPtr)->internalRep.ptrAndLongRep.ptr)); \ } else { \ - (bignum).dp = (mp_digit*) (objPtr)->internalRep.ptrAndLongRep.ptr; \ + (bignum).dp = (objPtr)->internalRep.ptrAndLongRep.ptr; \ (bignum).sign = (objPtr)->internalRep.ptrAndLongRep.value >> 30; \ (bignum).alloc = \ ((objPtr)->internalRep.ptrAndLongRep.value >> 15) & 0x7fff; \ @@ -529,7 +529,7 @@ Tcl_AppendAllObjTypes( Tcl_ObjType * Tcl_GetObjType( - CONST char *typeName) /* Name of Tcl object type to look up. */ + const char *typeName) /* Name of Tcl object type to look up. */ { register Tcl_HashEntry *hPtr; Tcl_ObjType *typePtr = NULL; @@ -724,7 +724,7 @@ Tcl_NewObj(void) Tcl_Obj * Tcl_DbNewObj( - register CONST char *file, /* The name of the source file calling this + register const char *file, /* The name of the source file calling this * function; used for debugging. */ register int line) /* Line number in the source file; used for * debugging. */ @@ -742,7 +742,7 @@ Tcl_DbNewObj( Tcl_Obj * Tcl_DbNewObj( - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -796,7 +796,7 @@ TclAllocateFreeObjects(void) prevPtr = NULL; objPtr = (Tcl_Obj *) basePtr; for (i = 0; i < OBJS_TO_ALLOC_EACH_TIME; i++) { - objPtr->internalRep.otherValuePtr = (void *) prevPtr; + objPtr->internalRep.otherValuePtr = prevPtr; prevPtr = objPtr; objPtr++; } @@ -1217,7 +1217,7 @@ Tcl_NewBooleanObj( Tcl_Obj * Tcl_DbNewBooleanObj( register int boolValue, /* Boolean used to initialize new object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -1237,7 +1237,7 @@ Tcl_DbNewBooleanObj( Tcl_Obj * Tcl_DbNewBooleanObj( register int boolValue, /* Boolean used to initialize new object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -1602,7 +1602,7 @@ Tcl_NewDoubleObj( Tcl_Obj * Tcl_DbNewDoubleObj( register double dblValue, /* Double used to initialize the object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -1622,7 +1622,7 @@ Tcl_DbNewDoubleObj( Tcl_Obj * Tcl_DbNewDoubleObj( register double dblValue, /* Double used to initialize the object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -1909,7 +1909,7 @@ Tcl_GetIntFromObj( } if ((ULONG_MAX > UINT_MAX) && ((l > UINT_MAX) || (l < -(long)UINT_MAX))) { if (interp != NULL) { - CONST char *s = + const char *s = "integer value too large to represent as non-long integer"; Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1)); Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL); @@ -2072,7 +2072,7 @@ Tcl_Obj * Tcl_DbNewLongObj( register long longValue, /* Long integer used to initialize the new * object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -2093,7 +2093,7 @@ Tcl_Obj * Tcl_DbNewLongObj( register long longValue, /* Long integer used to initialize the new * object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -2375,7 +2375,7 @@ Tcl_DbNewWideIntObj( register Tcl_WideInt wideValue, /* Wide integer used to initialize the new * object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -2394,7 +2394,7 @@ Tcl_DbNewWideIntObj( register Tcl_WideInt wideValue, /* Long integer used to initialize the new * object. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -2527,7 +2527,7 @@ Tcl_GetWideIntFromObj( } if (interp != NULL) { char *s = "integer value too large to represent"; - Tcl_Obj* msg = Tcl_NewStringObj(s, -1); + Tcl_Obj *msg = Tcl_NewStringObj(s, -1); Tcl_SetObjResult(interp, msg); Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL); @@ -2588,7 +2588,7 @@ FreeBignum( UNPACK_BIGNUM(objPtr, toFree); mp_clear(&toFree); if ((long)(objPtr->internalRep.ptrAndLongRep.value) < 0) { - ckfree((char *)objPtr->internalRep.ptrAndLongRep.ptr); + ckfree((char *) objPtr->internalRep.ptrAndLongRep.ptr); } } @@ -2651,7 +2651,7 @@ UpdateStringOfBignum( mp_int bignumVal; int size; int status; - char* stringVal; + char *stringVal; UNPACK_BIGNUM(objPtr, bignumVal); status = mp_radix_size(&bignumVal, 10, &size); @@ -2711,7 +2711,7 @@ Tcl_Obj * Tcl_NewBignumObj( mp_int *bignumValue) { - Tcl_Obj* objPtr; + Tcl_Obj *objPtr; TclNewObj(objPtr); Tcl_SetBignumObj(objPtr, bignumValue); @@ -2741,7 +2741,7 @@ Tcl_NewBignumObj( Tcl_Obj * Tcl_DbNewBignumObj( mp_int *bignumValue, - CONST char *file, + const char *file, int line) { Tcl_Obj *objPtr; @@ -2754,7 +2754,7 @@ Tcl_DbNewBignumObj( Tcl_Obj * Tcl_DbNewBignumObj( mp_int *bignumValue, - CONST char *file, + const char *file, int line) { return Tcl_NewBignumObj(bignumValue); @@ -3079,7 +3079,7 @@ void Tcl_DbIncrRefCount( register Tcl_Obj *objPtr, /* The object we are registering a reference * to. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -3144,7 +3144,7 @@ void Tcl_DbDecrRefCount( register Tcl_Obj *objPtr, /* The object we are releasing a reference * to. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -3215,7 +3215,7 @@ Tcl_DbDecrRefCount( int Tcl_DbIsShared( register Tcl_Obj *objPtr, /* The object to test for being shared. */ - CONST char *file, /* The name of the source file calling this + const char *file, /* The name of the source file calling this * function; used for debugging. */ int line) /* Line number in the source file; used for * debugging. */ @@ -3351,7 +3351,7 @@ TclCompareObjKeys( { Tcl_Obj *objPtr1 = (Tcl_Obj *) keyPtr; Tcl_Obj *objPtr2 = (Tcl_Obj *) hPtr->key.oneWordValue; - register CONST char *p1, *p2; + register const char *p1, *p2; register int l1, l2; /* @@ -3440,7 +3440,7 @@ TclHashObjKey( void *keyPtr) /* Key from which to compute hash value. */ { Tcl_Obj *objPtr = (Tcl_Obj *) keyPtr; - CONST char *string = TclGetString(objPtr); + const char *string = TclGetString(objPtr); int length = objPtr->length; unsigned int result = 0; int i; @@ -3520,7 +3520,7 @@ Tcl_GetCommandFromObj( * to discard the old rep and create a new one. */ - resPtr = (ResolvedCmdName *) objPtr->internalRep.twoPtrValue.ptr1; + resPtr = objPtr->internalRep.twoPtrValue.ptr1; if ((objPtr->typePtr != &tclCmdNameType) || (resPtr == NULL) || (cmdPtr = resPtr->cmdPtr, cmdPtr->cmdEpoch != resPtr->cmdEpoch) @@ -3535,7 +3535,7 @@ Tcl_GetCommandFromObj( result = tclCmdNameType.setFromAnyProc(interp, objPtr); - resPtr = (ResolvedCmdName *) objPtr->internalRep.twoPtrValue.ptr1; + resPtr = objPtr->internalRep.twoPtrValue.ptr1; if ((result == TCL_OK) && resPtr) { cmdPtr = resPtr->cmdPtr; } else { @@ -3611,7 +3611,7 @@ TclSetCmdNameObj( } TclFreeIntRep(objPtr); - objPtr->internalRep.twoPtrValue.ptr1 = (void *) resPtr; + objPtr->internalRep.twoPtrValue.ptr1 = resPtr; objPtr->internalRep.twoPtrValue.ptr2 = NULL; objPtr->typePtr = &tclCmdNameType; } @@ -3642,8 +3642,7 @@ FreeCmdNameInternalRep( register Tcl_Obj *objPtr) /* CmdName object with internal * representation to free. */ { - register ResolvedCmdName *resPtr = - (ResolvedCmdName *) objPtr->internalRep.twoPtrValue.ptr1; + register ResolvedCmdName *resPtr = objPtr->internalRep.twoPtrValue.ptr1; if (resPtr != NULL) { /* @@ -3660,6 +3659,7 @@ FreeCmdNameInternalRep( */ Command *cmdPtr = resPtr->cmdPtr; + TclCleanupCommandMacro(cmdPtr); ckfree((char *) resPtr); } @@ -3691,10 +3691,9 @@ DupCmdNameInternalRep( Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ register Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { - register ResolvedCmdName *resPtr = (ResolvedCmdName *) - srcPtr->internalRep.twoPtrValue.ptr1; + register ResolvedCmdName *resPtr = srcPtr->internalRep.twoPtrValue.ptr1; - copyPtr->internalRep.twoPtrValue.ptr1 = (void *) resPtr; + copyPtr->internalRep.twoPtrValue.ptr1 = resPtr; copyPtr->internalRep.twoPtrValue.ptr2 = NULL; if (resPtr != NULL) { resPtr->refCount++; @@ -3743,7 +3742,8 @@ SetCmdNameFromAny( */ name = TclGetString(objPtr); - cmdPtr = (Command *) Tcl_FindCommand(interp, name, /*ns*/ NULL, /*flags*/ 0); + cmdPtr = (Command *) + Tcl_FindCommand(interp, name, /*ns*/ NULL, /*flags*/ 0); /* * Free the old internalRep before setting the new one. Do this after @@ -3761,6 +3761,7 @@ SetCmdNameFromAny( */ Command *oldCmdPtr = resPtr->cmdPtr; + if (--oldCmdPtr->refCount == 0) { TclCleanupCommandMacro(oldCmdPtr); } @@ -3768,7 +3769,7 @@ SetCmdNameFromAny( TclFreeIntRep(objPtr); resPtr = (ResolvedCmdName *) ckalloc(sizeof(ResolvedCmdName)); resPtr->refCount = 1; - objPtr->internalRep.twoPtrValue.ptr1 = (void *) resPtr; + objPtr->internalRep.twoPtrValue.ptr1 = resPtr; objPtr->internalRep.twoPtrValue.ptr2 = NULL; objPtr->typePtr = &tclCmdNameType; } diff --git a/generic/tclPanic.c b/generic/tclPanic.c index e47f9b6..dec5ed4 100644 --- a/generic/tclPanic.c +++ b/generic/tclPanic.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPanic.c,v 1.10 2006/03/09 23:13:25 dgp Exp $ + * RCS: @(#) $Id: tclPanic.c,v 1.11 2008/04/27 22:21:31 dkf Exp $ */ #include "tclInt.h" @@ -29,7 +29,7 @@ static Tcl_PanicProc *panicProc = NULL; * panic procedure, if any. (TclpPanic may be NULL via a macro.) */ -static Tcl_PanicProc *CONST platformPanicProc = TclpPanic; +static Tcl_PanicProc *const platformPanicProc = TclpPanic; /* *---------------------------------------------------------------------- @@ -72,13 +72,13 @@ Tcl_SetPanicProc( void Tcl_PanicVA( - CONST char *format, /* Format string, suitable for passing to + const char *format, /* Format string, suitable for passing to * fprintf. */ va_list argList) /* Variable argument list. */ { - char *arg1, *arg2, *arg3, *arg4; /* Additional arguments (variable in - * number) to pass to fprintf. */ - char *arg5, *arg6, *arg7, *arg8; + char *arg1, *arg2, *arg3; /* Additional arguments (variable in number) + * to pass to fprintf. */ + char *arg4, *arg5, *arg6, *arg7, *arg8; arg1 = va_arg(argList, char *); arg2 = va_arg(argList, char *); @@ -90,16 +90,15 @@ Tcl_PanicVA( arg8 = va_arg(argList, char *); if (panicProc != NULL) { - (void) (*panicProc)(format, arg1, arg2, arg3, arg4, - arg5, arg6, arg7, arg8); + (*panicProc)(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); } else if (platformPanicProc != NULL) { - (void) (*platformPanicProc)(format, arg1, arg2, arg3, arg4, - arg5, arg6, arg7, arg8); + (*platformPanicProc)(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + arg8); } else { - (void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6, - arg7, arg8); - (void) fprintf(stderr, "\n"); - (void) fflush(stderr); + fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + arg8); + fprintf(stderr, "\n"); + fflush(stderr); abort(); } } @@ -123,7 +122,7 @@ Tcl_PanicVA( /* ARGSUSED */ void Tcl_Panic( - CONST char *format, + const char *format, ...) { va_list argList; diff --git a/generic/tclParse.c b/generic/tclParse.c index b639f09..b4b872d 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.62 2008/01/23 21:58:36 dgp Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.63 2008/04/27 22:21:31 dkf Exp $ */ #include "tclInt.h" @@ -1871,7 +1871,7 @@ Tcl_SubstObj( int length, tokensLeft, code; Tcl_Token *endTokenPtr; Tcl_Obj *result, *errMsg = NULL; - CONST char *p = TclGetStringFromObj(objPtr, &length); + const char *p = TclGetStringFromObj(objPtr, &length); Tcl_Parse *parsePtr = (Tcl_Parse *) TclStackAlloc(interp, sizeof(Tcl_Parse)); diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index a29e86c..80b511e 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.66 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.67 2008/04/27 22:21:31 dkf Exp $ */ #include "tclInt.h" @@ -111,7 +111,7 @@ typedef struct FsPath { #define PATHOBJ(pathPtr) ((FsPath *) (pathPtr)->internalRep.otherValuePtr) #define SETPATHOBJ(pathPtr,fsPathPtr) \ - ((pathPtr)->internalRep.otherValuePtr = (VOID *) (fsPathPtr)) + ((pathPtr)->internalRep.otherValuePtr = (void *) (fsPathPtr)) #define PATHFLAGS(pathPtr) (PATHOBJ(pathPtr)->flags) /* diff --git a/generic/tclPipe.c b/generic/tclPipe.c index 561d390..be64e0b 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPipe.c,v 1.19 2007/04/20 06:10:58 kennykb Exp $ + * RCS: @(#) $Id: tclPipe.c,v 1.20 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -34,8 +34,8 @@ TCL_DECLARE_MUTEX(pipeMutex) /* Guard access to detList. */ * Declarations for local functions defined in this file: */ -static TclFile FileForRedirect(Tcl_Interp *interp, CONST char *spec, - int atOk, CONST char *arg, CONST char *nextArg, +static TclFile FileForRedirect(Tcl_Interp *interp, const char *spec, + int atOk, const char *arg, const char *nextArg, int flags, int *skipPtr, int *closePtr, int *releasePtr); @@ -63,14 +63,14 @@ static TclFile FileForRedirect(Tcl_Interp *interp, CONST char *spec, static TclFile FileForRedirect( Tcl_Interp *interp, /* Intepreter to use for error reporting. */ - CONST char *spec, /* Points to character just after redirection + const char *spec, /* Points to character just after redirection * character. */ int atOK, /* Non-zero means that '@' notation can be * used to specify a channel, zero means that * it isn't. */ - CONST char *arg, /* Pointer to entire argument containing spec: + const char *arg, /* Pointer to entire argument containing spec: * used for error reporting. */ - CONST char *nextArg, /* Next argument in argc/argv array, if needed + const char *nextArg, /* Next argument in argc/argv array, if needed * for file name or channel name. May be * NULL. */ int flags, /* Flags to use for opening file or to specify @@ -117,7 +117,7 @@ FileForRedirect( Tcl_Flush(chan); } } else { - CONST char *name; + const char *name; Tcl_DString nameString; if (*spec == '\0') { @@ -269,7 +269,7 @@ TclCleanupChildren( int i, abnormalExit, anyErrorInfo; Tcl_Pid pid; WAIT_STATUS_TYPE waitStatus; - CONST char *msg; + const char *msg; unsigned long resolvedPid; abnormalExit = 0; @@ -322,7 +322,7 @@ TclCleanupChildren( } abnormalExit = 1; } else if (interp != NULL) { - CONST char *p; + const char *p; if (WIFSIGNALED(waitStatus)) { p = Tcl_SignalMsg((int) (WTERMSIG(waitStatus))); @@ -424,7 +424,7 @@ int TclCreatePipeline( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ int argc, /* Number of entries in argv. */ - CONST char **argv, /* Array of strings describing commands in + const char **argv, /* Array of strings describing commands in * pipeline plus I/O redirection with <, <<, * >, etc. Argv[argc] must be NULL. */ Tcl_Pid **pidArrayPtr, /* Word at *pidArrayPtr gets filled in with @@ -460,7 +460,7 @@ TclCreatePipeline( * *pidPtr right now. */ int cmdCount; /* Count of number of distinct commands found * in argc/argv. */ - CONST char *inputLiteral = NULL; + const char *inputLiteral = NULL; /* If non-null, then this points to a string * containing input data (specified via <<) to * be piped to the first process in the @@ -483,8 +483,8 @@ TclCreatePipeline( int errorClose = 0; /* If non-zero, then errorFile should be * closed when cleaning up. */ int errorRelease = 0; - CONST char *p; - CONST char *nextArg; + const char *p; + const char *nextArg; int skip, lastBar, lastArg, i, j, atOK, flags, needCmd, errorToOutput = 0; Tcl_DString execBuffer; TclFile pipeIn; @@ -836,7 +836,7 @@ TclCreatePipeline( for (i = 0; i < argc; i = lastArg + 1) { int result, joinThisError; Tcl_Pid pid; - CONST char *oldName; + const char *oldName; /* * Convert the program name into native form. @@ -1025,7 +1025,7 @@ Tcl_OpenCommandChannel( Tcl_Interp *interp, /* Interpreter for error reporting. Can NOT be * NULL. */ int argc, /* How many arguments. */ - CONST char **argv, /* Array of arguments for command pipe. */ + const char **argv, /* Array of arguments for command pipe. */ int flags) /* Or'ed combination of TCL_STDIN, TCL_STDOUT, * TCL_STDERR, and TCL_ENFORCE_MODE. */ { diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index a48c2dd..f1f72db 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPosixStr.c,v 1.12 2005/11/07 15:16:03 dkf Exp $ + * RCS: @(#) $Id: tclPosixStr.c,v 1.13 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -33,7 +33,7 @@ *---------------------------------------------------------------------- */ -CONST char * +const char * Tcl_ErrnoId(void) { switch (errno) { @@ -479,7 +479,7 @@ Tcl_ErrnoId(void) *---------------------------------------------------------------------- */ -CONST char * +const char * Tcl_ErrnoMsg( int err) /* Error number (such as in errno variable). */ { @@ -929,7 +929,7 @@ Tcl_ErrnoMsg( *---------------------------------------------------------------------- */ -CONST char * +const char * Tcl_SignalId( int sig) /* Number of signal. */ { @@ -1060,7 +1060,7 @@ Tcl_SignalId( *---------------------------------------------------------------------- */ -CONST char * +const char * Tcl_SignalMsg( int sig) /* Number of signal. */ { diff --git a/generic/tclProc.c b/generic/tclProc.c index ce85c7a..8aa8779 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.139 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.140 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -33,7 +33,7 @@ static void InitResolvedLocals(Tcl_Interp *interp, static void InitLocalCache(Proc *procPtr); static int PushProcCallFrame(ClientData clientData, register Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[], int isLambda); + Tcl_Obj *const objv[], int isLambda); static void ProcBodyDup(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); static void ProcBodyFree(Tcl_Obj *objPtr); static int ProcWrongNumArgs(Tcl_Interp *interp, int skip); @@ -44,7 +44,7 @@ static void MakeLambdaError(Tcl_Interp *interp, static int SetLambdaFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static int ProcCompileProc(Tcl_Interp *interp, Proc *procPtr, Tcl_Obj *bodyPtr, Namespace *nsPtr, - CONST char *description, CONST char *procName, + const char *description, const char *procName, Proc **procPtrPtr); /* @@ -116,12 +116,12 @@ Tcl_ProcObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; Proc *procPtr; char *fullName; - CONST char *procName, *procArgs, *procBody; + const char *procName, *procArgs, *procBody; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_Command cmd; Tcl_DString ds; @@ -362,17 +362,17 @@ int TclCreateProc( Tcl_Interp *interp, /* Interpreter containing proc. */ Namespace *nsPtr, /* Namespace containing this proc. */ - CONST char *procName, /* Unqualified name of this proc. */ + const char *procName, /* Unqualified name of this proc. */ Tcl_Obj *argsPtr, /* Description of arguments. */ Tcl_Obj *bodyPtr, /* Command body. */ Proc **procPtrPtr) /* Returns: pointer to proc data. */ { Interp *iPtr = (Interp *) interp; - CONST char **argArray = NULL; + const char **argArray = NULL; register Proc *procPtr; int i, length, result, numArgs; - CONST char *args, *bytes, *p; + const char *args, *bytes, *p; register CompiledLocal *localPtr = NULL; Tcl_Obj *defPtr; int precompiled = 0; @@ -464,7 +464,7 @@ TclCreateProc( for (i = 0; i < numArgs; i++) { int fieldCount, nameLength, valueLength; - CONST char **fieldValues; + const char **fieldValues; /* * Now divide the specifier up into name and default. @@ -502,7 +502,7 @@ TclCreateProc( p = fieldValues[0]; while (*p != '\0') { if (*p == '(') { - CONST char *q = p; + const char *q = p; do { q++; } while (*q != '\0'); @@ -672,7 +672,7 @@ TclCreateProc( int TclGetFrame( Tcl_Interp *interp, /* Interpreter in which to find frame. */ - CONST char *name, /* String describing frame. */ + const char *name, /* String describing frame. */ CallFrame **framePtrPtr) /* Store pointer to frame here (or NULL if * global frame indicated). */ { @@ -758,7 +758,7 @@ TclObjGetFrame( register Interp *iPtr = (Interp *) interp; int curLevel, level, result; CallFrame *framePtr; - CONST char *name = TclGetString(objPtr); + const char *name = TclGetString(objPtr); /* * Parse object to figure out which level number to go to. @@ -870,7 +870,7 @@ Tcl_UplevelObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; int result; @@ -960,7 +960,7 @@ Tcl_UplevelObjCmd( Proc * TclFindProc( Interp *iPtr, /* Interpreter in which to look. */ - CONST char *procName) /* Name of desired procedure. */ + const char *procName) /* Name of desired procedure. */ { Tcl_Command cmd; Tcl_Command origCmd; @@ -1380,7 +1380,7 @@ InitArgsAndLocals( * parameters. */ - varPtr = (Var*) TclStackAlloc(interp, (int)(localCt*sizeof(Var))); + varPtr = (Var *) TclStackAlloc(interp, (int)(localCt * sizeof(Var))); framePtr->compiledLocals = varPtr; framePtr->numCompiledLocals = localCt; @@ -1511,7 +1511,7 @@ PushProcCallFrame( * invoked. */ int objc, /* Count of number of arguments to this * procedure. */ - Tcl_Obj *CONST objv[], /* Argument value objects. */ + Tcl_Obj *const objv[], /* Argument value objects. */ int isLambda) /* 1 if this is a call by ApplyObjCmd: it * needs special rules for error msg */ { @@ -1606,7 +1606,7 @@ TclObjInterpProc( * invoked. */ int objc, /* Count of number of arguments to this * procedure. */ - Tcl_Obj *CONST objv[]) /* Argument value objects. */ + Tcl_Obj *const objv[]) /* Argument value objects. */ { int result; @@ -1841,8 +1841,8 @@ TclProcCompileProc( * but could be any code fragment compiled in * the context of this procedure.) */ Namespace *nsPtr, /* Namespace containing procedure. */ - CONST char *description, /* string describing this body of code. */ - CONST char *procName) /* Name of this procedure. */ + const char *description, /* string describing this body of code. */ + const char *procName) /* Name of this procedure. */ { return ProcCompileProc(interp, procPtr, bodyPtr, nsPtr, description, procName, NULL); @@ -1856,8 +1856,8 @@ ProcCompileProc( * but could be any code fragment compiled in * the context of this procedure.) */ Namespace *nsPtr, /* Namespace containing procedure. */ - CONST char *description, /* string describing this body of code. */ - CONST char *procName, /* Name of this procedure. */ + const char *description, /* string describing this body of code. */ + const char *procName, /* Name of this procedure. */ Proc **procPtrPtr) /* Points to storage where a replacement * (Proc *) value may be written. */ { @@ -2587,7 +2587,7 @@ Tcl_ApplyObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; Proc *procPtr = NULL; @@ -2748,7 +2748,7 @@ Tcl_DisassembleObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { static const char *types[] = { "lambda", "proc", "script", NULL diff --git a/generic/tclResolve.c b/generic/tclResolve.c index dde271e..af7d4cb 100644 --- a/generic/tclResolve.c +++ b/generic/tclResolve.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResolve.c,v 1.9 2007/04/05 13:20:49 dkf Exp $ + * RCS: @(#) $Id: tclResolve.c,v 1.10 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -57,7 +57,7 @@ void Tcl_AddInterpResolvers( Tcl_Interp *interp, /* Interpreter whose name resolution rules are * being modified. */ - CONST char *name, /* Name of this resolution scheme. */ + const char *name, /* Name of this resolution scheme. */ Tcl_ResolveCmdProc *cmdProc,/* New function for command resolution. */ Tcl_ResolveVarProc *varProc,/* Function for variable resolution at * runtime. */ @@ -136,7 +136,7 @@ int Tcl_GetInterpResolvers( Tcl_Interp *interp, /* Interpreter whose name resolution rules are * being queried. */ - CONST char *name, /* Look for a scheme with this name. */ + const char *name, /* Look for a scheme with this name. */ Tcl_ResolverInfo *resInfoPtr) /* Returns pointers to the functions, if * found */ @@ -188,7 +188,7 @@ int Tcl_RemoveInterpResolvers( Tcl_Interp *interp, /* Interpreter whose name resolution rules are * being modified. */ - CONST char *name) /* Name of the scheme to be removed. */ + const char *name) /* Name of the scheme to be removed. */ { Interp *iPtr = (Interp *) interp; ResolverScheme **prevPtrPtr, *resPtr; @@ -264,7 +264,8 @@ BumpCmdRefEpochs( for (entry = Tcl_FirstHashEntry(&nsPtr->childTable, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { - Namespace *childNsPtr = (Namespace *) Tcl_GetHashValue(entry); + Namespace *childNsPtr = Tcl_GetHashValue(entry); + BumpCmdRefEpochs(childNsPtr); } TclInvalidateNsPath(nsPtr); @@ -283,7 +284,7 @@ BumpCmdRefEpochs( * Command resolution is handled by a function of the following type: * * typedef int (*Tcl_ResolveCmdProc)(Tcl_Interp *interp, - * CONST char *name, Tcl_Namespace *context, + * const char *name, Tcl_Namespace *context, * int flags, Tcl_Command *rPtr); * * Whenever a command is executed or Tcl_FindCommand is invoked within @@ -298,7 +299,7 @@ BumpCmdRefEpochs( * whenever a variable needs to be resolved at compile time: * * typedef int (*Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp, - * CONST char *name, Tcl_Namespace *context, + * const char *name, Tcl_Namespace *context, * Tcl_ResolvedVarInfo *rPtr); * * If this function is able to resolve the name, it should return the @@ -314,7 +315,7 @@ BumpCmdRefEpochs( * has the following type: * * typedef int (*Tcl_ResolveVarProc)(Tcl_Interp *interp, - * CONST char *name, Tcl_Namespace *context, + * const char *name, Tcl_Namespace *context, * int flags, Tcl_Var *rPtr); * * This function is quite similar to the compile-time version. It returns diff --git a/generic/tclResult.c b/generic/tclResult.c index 054ba9d..ea62946 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.47 2008/03/07 22:42:49 andreas_kupries Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.48 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -462,7 +462,7 @@ Tcl_SetResult( *---------------------------------------------------------------------- */ -CONST char * +const char * Tcl_GetStringResult( register Tcl_Interp *interp)/* Interpreter whose result to return. */ { @@ -699,7 +699,7 @@ void Tcl_AppendElement( Tcl_Interp *interp, /* Interpreter whose result is to be * extended. */ - CONST char *element) /* String to convert to list element and add + const char *element) /* String to convert to list element and add * to result. */ { Interp *iPtr = (Interp *) interp; @@ -1269,16 +1269,16 @@ int TclMergeReturnOptions( Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[], /* Argument objects. */ + Tcl_Obj *const objv[], /* Argument objects. */ Tcl_Obj **optionsPtrPtr, /* If not NULL, points to space for a (Tcl_Obj * *) where the pointer to the merged return - * options dictionary should be written */ + * options dictionary should be written. */ int *codePtr, /* If not NULL, points to space where the - * -code value should be written */ + * -code value should be written. */ int *levelPtr) /* If not NULL, points to space where the - * -level value should be written */ + * -level value should be written. */ { - int code=TCL_OK; + int code = TCL_OK; int level = 1; Tcl_Obj *valuePtr; Tcl_Obj *returnOpts = Tcl_NewObj(); @@ -1286,9 +1286,9 @@ TclMergeReturnOptions( for (; objc > 1; objv += 2, objc -= 2) { int optLen; - CONST char *opt = TclGetStringFromObj(objv[0], &optLen); + const char *opt = TclGetStringFromObj(objv[0], &optLen); int compareLen; - CONST char *compare = + const char *compare = TclGetStringFromObj(keys[KEY_OPTIONS], &compareLen); if ((optLen == compareLen) && (strcmp(opt, compare) == 0)) { @@ -1335,7 +1335,7 @@ TclMergeReturnOptions( Tcl_DictObjGet(NULL, returnOpts, keys[KEY_CODE], &valuePtr); if ((valuePtr != NULL) && (TCL_ERROR == TclGetIntFromObj(NULL, valuePtr, &code))) { - static CONST char *returnCodes[] = { + static const char *returnCodes[] = { "ok", "error", "return", "break", "continue", NULL }; diff --git a/generic/tclScan.c b/generic/tclScan.c index 25ef913..ee59260 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.27 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.28 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -556,13 +556,13 @@ Tcl_ScanObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *format; int numVars, nconversions, totalVars = -1; int objIndex, offset, i, result, code; long value; - CONST char *string, *end, *baseString; + const char *string, *end, *baseString; char op = 0; int width, underflow = 0; Tcl_WideInt wideValue; @@ -595,7 +595,7 @@ Tcl_ScanObjCmd( */ if (totalVars > 0) { - objs = (Tcl_Obj **) ckalloc(sizeof(Tcl_Obj*) * totalVars); + objs = (Tcl_Obj **) ckalloc(sizeof(Tcl_Obj *) * totalVars); for (i = 0; i < totalVars; i++) { objs[i] = NULL; } @@ -1017,7 +1017,7 @@ Tcl_ScanObjCmd( } } if (objs != NULL) { - ckfree((char*) objs); + ckfree((char *) objs); } if (code == TCL_OK) { if (underflow && (nconversions == 0)) { diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 81e82d7..168676f 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.25 2008/04/16 14:49:29 das Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.26 2008/04/27 22:21:32 dkf Exp $ */ /* @@ -28,13 +28,13 @@ MODULE_SCOPE const TclStubs *tclStubsPtr; MODULE_SCOPE const TclPlatStubs *tclPlatStubsPtr; MODULE_SCOPE const TclIntStubs *tclIntStubsPtr; MODULE_SCOPE const TclIntPlatStubs *tclIntPlatStubsPtr; -MODULE_SCOPE const TclTomMathStubs* tclTomMathStubsPtr; +MODULE_SCOPE const TclTomMathStubs *tclTomMathStubsPtr; const TclStubs *tclStubsPtr = NULL; const TclPlatStubs *tclPlatStubsPtr = NULL; const TclIntStubs *tclIntStubsPtr = NULL; const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; -const TclTomMathStubs* tclTomMathStubsPtr = NULL; +const TclTomMathStubs *tclTomMathStubsPtr = NULL; static const TclStubs * HasStubSupport( @@ -79,13 +79,13 @@ static int isDigit(const int c) *---------------------------------------------------------------------- */ -MODULE_SCOPE CONST char * +MODULE_SCOPE const char * Tcl_InitStubs( Tcl_Interp *interp, - CONST char *version, + const char *version, int exact) { - CONST char *actualVersion = NULL; + const char *actualVersion = NULL; ClientData pkgData = NULL; /* @@ -104,14 +104,14 @@ Tcl_InitStubs( return NULL; } if (exact) { - CONST char *p = version; + const char *p = version; int count = 0; while (*p) { count += !isDigit(*p++); } if (count == 1) { - CONST char *q = actualVersion; + const char *q = actualVersion; p = version; while (*p && (*p == *q)) { @@ -129,7 +129,7 @@ Tcl_InitStubs( } } } - tclStubsPtr = (TclStubs*)pkgData; + tclStubsPtr = (TclStubs *) pkgData; if (tclStubsPtr->hooks) { tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs; @@ -161,21 +161,22 @@ Tcl_InitStubs( *---------------------------------------------------------------------- */ -MODULE_SCOPE CONST char* +MODULE_SCOPE const char * TclTomMathInitializeStubs( - Tcl_Interp* interp, /* Tcl interpreter */ - CONST char* version, /* Tcl version needed */ + Tcl_Interp *interp, /* Tcl interpreter */ + const char *version, /* Tcl version needed */ int epoch, /* Stubs table epoch from the header files */ - int revision /* Stubs table revision number from the + int revision) /* Stubs table revision number from the * header files */ -) { +{ int exact = 0; - const char* packageName = "tcl::tommath"; - const char* errMsg = NULL; + const char *packageName = "tcl::tommath"; + const char *errMsg = NULL; ClientData pkgClientData = NULL; - const char* actualVersion = + const char *actualVersion = Tcl_PkgRequireEx(interp, packageName, version, exact, &pkgClientData); - TclTomMathStubs* stubsPtr = (TclTomMathStubs*) pkgClientData; + TclTomMathStubs *stubsPtr = pkgClientData; + if (actualVersion == NULL) { return NULL; } @@ -191,8 +192,7 @@ TclTomMathInitializeStubs( } Tcl_ResetResult(interp); Tcl_AppendResult(interp, "error loading ", packageName, - " (requested version ", version, - ", actual version ", actualVersion, - "): ", errMsg, NULL); + " (requested version ", version, ", actual version ", + actualVersion, "): ", errMsg, NULL); return NULL; } diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 3fb9794..2aca3ca 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.21 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.22 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -501,7 +501,7 @@ TestindexobjCmd( * Keep this structure declaration in sync with tclIndexObj.c */ struct IndexRep { - VOID *tablePtr; /* Pointer to the table of strings */ + void *tablePtr; /* Pointer to the table of strings */ int offset; /* Offset between table entries */ int index; /* Selected index into table. */ }; @@ -555,10 +555,10 @@ TestindexobjCmd( * object, clear out the object's cached state. */ - if ( objv[3]->typePtr != NULL - && !strcmp( "index", objv[3]->typePtr->name ) ) { + if (objv[3]->typePtr != NULL + && !strcmp("index", objv[3]->typePtr->name)) { indexRep = (struct IndexRep *) objv[3]->internalRep.otherValuePtr; - if (indexRep->tablePtr == (VOID *) argv) { + if (indexRep->tablePtr == (void *) argv) { objv[3]->typePtr->freeIntRepProc(objv[3]); objv[3]->typePtr = NULL; } diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index 43361c5..db390a1 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.5 2007/04/16 13:36:35 dkf Exp $ + * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.6 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -45,10 +45,10 @@ typedef struct CmdTable */ static int ProcBodyTestProcObjCmd(ClientData dummy, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe); static int RegisterCommand(Tcl_Interp* interp, - char *namespace, CONST CmdTable *cmdTablePtr); + char *namespace, const CmdTable *cmdTablePtr); int Procbodytest_Init(Tcl_Interp * interp); int Procbodytest_SafeInit(Tcl_Interp * interp); @@ -57,12 +57,12 @@ int Procbodytest_SafeInit(Tcl_Interp * interp); * declarations of the enable command procedure. */ -static CONST CmdTable commands[] = { +static const CmdTable commands[] = { { procCommand, ProcBodyTestProcObjCmd, 1 }, { 0, 0, 0 } }; -static CONST CmdTable safeCommands[] = { +static const CmdTable safeCommands[] = { { procCommand, ProcBodyTestProcObjCmd, 1 }, { 0, 0, 0 } }; @@ -136,7 +136,7 @@ static int RegisterCommand(interp, namespace, cmdTablePtr) * is performed */ char *namespace; /* the namespace in which the command is * registered */ - CONST CmdTable *cmdTablePtr;/* the command to register */ + const CmdTable *cmdTablePtr;/* the command to register */ { char buf[128]; @@ -176,7 +176,7 @@ ProcBodyTestInitInternal( * is initialized */ int isSafe) /* 1 if this is a safe interpreter */ { - CONST CmdTable *cmdTablePtr; + const CmdTable *cmdTablePtr; cmdTablePtr = (isSafe) ? &safeCommands[0] : &commands[0]; for ( ; cmdTablePtr->cmdName ; cmdTablePtr++) { diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 6df614e..f7da3c4 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.31 2008/01/22 20:52:10 dgp Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.32 2008/04/27 22:21:32 dkf Exp $ */ #include "tclInt.h" @@ -769,7 +769,7 @@ Tcl_AfterObjCmd( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_WideInt ms; /* Number of milliseconds to wait */ Tcl_Time wakeup; @@ -778,7 +778,7 @@ Tcl_AfterObjCmd( int length; int index; char buf[16 + TCL_INTEGER_SPACE]; - static CONST char *afterSubCmds[] = { + static const char *afterSubCmds[] = { "cancel", "idle", "info", NULL }; enum afterSubCmds {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO}; diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 3c86e1b..aed3ff7 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtf.c,v 1.37 2005/10/31 15:59:41 dkf Exp $ + * RCS: @(#) $Id: tclUtf.c,v 1.38 2008/04/27 22:21:33 dkf Exp $ */ #include "tclInt.h" @@ -62,7 +62,7 @@ * UTF-8. */ -static CONST unsigned char totalBytes[256] = { +static const unsigned char totalBytes[256] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -234,13 +234,13 @@ Tcl_UniCharToUtf( char * Tcl_UniCharToUtfDString( - CONST Tcl_UniChar *uniStr, /* Unicode string to convert to UTF-8. */ + const Tcl_UniChar *uniStr, /* Unicode string to convert to UTF-8. */ int uniLength, /* Length of Unicode string in Tcl_UniChars * (must be >= 0). */ Tcl_DString *dsPtr) /* UTF-8 representation of string is appended * to this previously initialized DString. */ { - CONST Tcl_UniChar *w, *wEnd; + const Tcl_UniChar *w, *wEnd; char *p, *string; int oldLength; @@ -292,7 +292,7 @@ Tcl_UniCharToUtfDString( int Tcl_UtfToUniChar( - register CONST char *src, /* The UTF-8 string. */ + register const char *src, /* The UTF-8 string. */ register Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by * the UTF-8 string. */ { @@ -396,7 +396,7 @@ Tcl_UtfToUniChar( Tcl_UniChar * Tcl_UtfToUniCharDString( - CONST char *src, /* UTF-8 string to convert to Unicode. */ + const char *src, /* UTF-8 string to convert to Unicode. */ int length, /* Length of UTF-8 string in bytes, or -1 for * strlen(). */ Tcl_DString *dsPtr) /* Unicode representation of string is @@ -404,7 +404,7 @@ Tcl_UtfToUniCharDString( * DString. */ { Tcl_UniChar *w, *wString; - CONST char *p, *end; + const char *p, *end; int oldLength; if (length < 0) { @@ -455,7 +455,7 @@ Tcl_UtfToUniCharDString( int Tcl_UtfCharComplete( - CONST char *src, /* String to check if first few bytes contain + const char *src, /* String to check if first few bytes contain * a complete UTF-8 character. */ int length) /* Length of above string in bytes. */ { @@ -485,7 +485,7 @@ Tcl_UtfCharComplete( int Tcl_NumUtfChars( - register CONST char *src, /* The UTF-8 string to measure. */ + register const char *src, /* The UTF-8 string to measure. */ int length) /* The length of the string in bytes, or -1 * for strlen(string). */ { @@ -543,9 +543,9 @@ Tcl_NumUtfChars( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfFindFirst( - CONST char *src, /* The UTF-8 string to be searched. */ + const char *src, /* The UTF-8 string to be searched. */ int ch) /* The Tcl_UniChar to search for. */ { int len; @@ -582,14 +582,14 @@ Tcl_UtfFindFirst( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfFindLast( - CONST char *src, /* The UTF-8 string to be searched. */ + const char *src, /* The UTF-8 string to be searched. */ int ch) /* The Tcl_UniChar to search for. */ { int len; Tcl_UniChar find; - CONST char *last; + const char *last; last = NULL; while (1) { @@ -624,9 +624,9 @@ Tcl_UtfFindLast( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfNext( - CONST char *src) /* The current location in the string. */ + const char *src) /* The current location in the string. */ { Tcl_UniChar ch; @@ -654,13 +654,13 @@ Tcl_UtfNext( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfPrev( - CONST char *src, /* The current location in the string. */ - CONST char *start) /* Pointer to the beginning of the string, to + const char *src, /* The current location in the string. */ + const char *start) /* Pointer to the beginning of the string, to * avoid going backwards too far. */ { - CONST char *look; + const char *look; int i, byte; src--; @@ -703,7 +703,7 @@ Tcl_UtfPrev( Tcl_UniChar Tcl_UniCharAtIndex( - register CONST char *src, /* The UTF-8 string to dereference. */ + register const char *src, /* The UTF-8 string to dereference. */ register int index) /* The position of the desired character. */ { Tcl_UniChar ch; @@ -732,9 +732,9 @@ Tcl_UniCharAtIndex( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_UtfAtIndex( - register CONST char *src, /* The UTF-8 string. */ + register const char *src, /* The UTF-8 string. */ register int index) /* The position of the desired character. */ { Tcl_UniChar ch; @@ -774,7 +774,7 @@ Tcl_UtfAtIndex( int Tcl_UtfBackslash( - CONST char *src, /* Points to the backslash character of a + const char *src, /* Points to the backslash character of a * backslash sequence. */ int *readPtr, /* Fill in with number of characters read from * src, unless NULL. */ @@ -986,8 +986,8 @@ Tcl_UtfToTitle( int TclpUtfNcmp2( - CONST char *cs, /* UTF string to compare to ct. */ - CONST char *ct, /* UTF string cs is compared to. */ + const char *cs, /* UTF string to compare to ct. */ + const char *ct, /* UTF string cs is compared to. */ unsigned long numBytes) /* Number of *bytes* to compare. */ { /* @@ -1033,8 +1033,8 @@ TclpUtfNcmp2( int Tcl_UtfNcmp( - CONST char *cs, /* UTF string to compare to ct. */ - CONST char *ct, /* UTF string cs is compared to. */ + const char *cs, /* UTF string to compare to ct. */ + const char *ct, /* UTF string cs is compared to. */ unsigned long numChars) /* Number of UTF chars to compare. */ { Tcl_UniChar ch1, ch2; @@ -1081,8 +1081,8 @@ Tcl_UtfNcmp( int Tcl_UtfNcasecmp( - CONST char *cs, /* UTF string to compare to ct. */ - CONST char *ct, /* UTF string cs is compared to. */ + const char *cs, /* UTF string to compare to ct. */ + const char *ct, /* UTF string cs is compared to. */ unsigned long numChars) /* Number of UTF chars to compare. */ { Tcl_UniChar ch1, ch2; @@ -1218,7 +1218,7 @@ Tcl_UniCharToTitle( int Tcl_UniCharLen( - CONST Tcl_UniChar *uniStr) /* Unicode string to find length of. */ + const Tcl_UniChar *uniStr) /* Unicode string to find length of. */ { int len = 0; @@ -1248,8 +1248,8 @@ Tcl_UniCharLen( int Tcl_UniCharNcmp( - CONST Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ - CONST Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ + const Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ + const Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ unsigned long numChars) /* Number of unichars to compare. */ { #ifdef WORDS_BIGENDIAN @@ -1293,8 +1293,8 @@ Tcl_UniCharNcmp( int Tcl_UniCharNcasecmp( - CONST Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ - CONST Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ + const Tcl_UniChar *ucs, /* Unicode string to compare to uct. */ + const Tcl_UniChar *uct, /* Unicode string ucs is compared to. */ unsigned long numChars) /* Number of unichars to compare. */ { for ( ; numChars != 0; numChars--, ucs++, uct++) { @@ -1608,8 +1608,8 @@ Tcl_UniCharIsWordChar( int Tcl_UniCharCaseMatch( - CONST Tcl_UniChar *uniStr, /* Unicode String. */ - CONST Tcl_UniChar *uniPattern, + const Tcl_UniChar *uniStr, /* Unicode String. */ + const Tcl_UniChar *uniPattern, /* Pattern, which may contain special * characters. */ int nocase) /* 0 for case sensitive, 1 for insensitive */ @@ -1796,14 +1796,14 @@ Tcl_UniCharCaseMatch( int TclUniCharMatch( - CONST Tcl_UniChar *string, /* Unicode String. */ + const Tcl_UniChar *string, /* Unicode String. */ int strLen, /* Length of String */ - CONST Tcl_UniChar *pattern, /* Pattern, which may contain special + const Tcl_UniChar *pattern, /* Pattern, which may contain special * characters. */ int ptnLen, /* Length of Pattern */ int nocase) /* 0 for case sensitive, 1 for insensitive */ { - CONST Tcl_UniChar *stringEnd, *patternEnd; + const Tcl_UniChar *stringEnd, *patternEnd; Tcl_UniChar p; stringEnd = string + strLen; diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 07fbc87..480196c 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.97 2008/02/26 20:18:14 hobbs Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.98 2008/04/27 22:21:33 dkf Exp $ */ #include "tclInt.h" @@ -127,13 +127,13 @@ TclFindElement( Tcl_Interp *interp, /* Interpreter to use for error reporting. If * NULL, then no error message is left after * errors. */ - CONST char *list, /* Points to the first byte of a string + const char *list, /* Points to the first byte of a string * containing a Tcl list with zero or more * elements (possibly in braces). */ int listLength, /* Number of bytes in the list's string. */ - CONST char **elementPtr, /* Where to put address of first significant + const char **elementPtr, /* Where to put address of first significant * character in first element of list. */ - CONST char **nextPtr, /* Fill in with location of character just + const char **nextPtr, /* Fill in with location of character just * after all white space following end of * argument (next arg or end of list). */ int *sizePtr, /* If non-zero, fill in with size of @@ -141,14 +141,14 @@ TclFindElement( int *bracePtr) /* If non-zero, fill in with non-zero/zero to * indicate that arg was/wasn't in braces. */ { - CONST char *p = list; - CONST char *elemStart; /* Points to first byte of first element. */ - CONST char *limit; /* Points just after list's last byte. */ + const char *p = list; + const char *elemStart; /* Points to first byte of first element. */ + const char *limit; /* Points just after list's last byte. */ int openBraces = 0; /* Brace nesting level during parse. */ int inQuotes = 0; int size = 0; /* lint. */ int numChars; - CONST char *p2; + const char *p2; /* * Skim off leading white space and check for an opening brace or quote. @@ -347,7 +347,7 @@ TclFindElement( int TclCopyAndCollapse( int count, /* Number of characters to copy from src. */ - CONST char *src, /* Copy from here... */ + const char *src, /* Copy from here... */ char *dst) /* ... to here. */ { register char c; @@ -404,13 +404,13 @@ int Tcl_SplitList( Tcl_Interp *interp, /* Interpreter to use for error reporting. If * NULL, no error message is left. */ - CONST char *list, /* Pointer to string with list structure. */ + const char *list, /* Pointer to string with list structure. */ int *argcPtr, /* Pointer to location to fill in with the * number of elements in the list. */ - CONST char ***argvPtr) /* Pointer to place to store pointer to array + const char ***argvPtr) /* Pointer to place to store pointer to array * of pointers to list elements. */ { - CONST char **argv, *l, *element; + const char **argv, *l, *element; char *p; int length, size, i, result, elSize, brace; @@ -444,11 +444,11 @@ Tcl_SplitList( } } length = l - list; - argv = (CONST char **) ckalloc((unsigned) + argv = (const char **) ckalloc((unsigned) ((size * sizeof(char *)) + length + 1)); for (i = 0, p = ((char *) argv) + size*sizeof(char *); *list != 0; i++) { - CONST char *prevList = list; + const char *prevList = list; result = TclFindElement(interp, list, length, &element, &list, &elSize, &brace); @@ -518,16 +518,16 @@ int TclMarkList( Tcl_Interp *interp, /* Interpreter to use for error reporting. If * NULL, no error message is left. */ - CONST char *list, /* Pointer to string with list structure. */ - CONST char *end, /* Pointer to first char after the list. */ + const char *list, /* Pointer to string with list structure. */ + const char *end, /* Pointer to first char after the list. */ int *argcPtr, /* Pointer to location to fill in with the * number of elements in the list. */ - CONST int **argszPtr, /* Pointer to place to store length of list + const int **argszPtr, /* Pointer to place to store length of list * elements. */ - CONST char ***argvPtr) /* Pointer to place to store pointer to array + const char ***argvPtr) /* Pointer to place to store pointer to array * of pointers to list elements. */ { - CONST char **argv, *l, *element; + const char **argv, *l, *element; int *argn, length, size, i, result, elSize, brace; /* @@ -559,11 +559,11 @@ TclMarkList( } } length = l - list; - argv = (CONST char **) ckalloc((unsigned) size * sizeof(char *)); + argv = (const char **) ckalloc((unsigned) size * sizeof(char *)); argn = (int *) ckalloc((unsigned) size * sizeof(int *)); for (i = 0; list != end; i++) { - CONST char *prevList = list; + const char *prevList = list; result = TclFindElement(interp, list, length, &element, &list, &elSize, &brace); @@ -620,7 +620,7 @@ TclMarkList( int Tcl_ScanElement( - register CONST char *string,/* String to convert to list element. */ + register const char *string,/* String to convert to list element. */ register int *flagPtr) /* Where to store information to guide * Tcl_ConvertCountedElement. */ { @@ -652,13 +652,13 @@ Tcl_ScanElement( int Tcl_ScanCountedElement( - CONST char *string, /* String to convert to Tcl list element. */ + const char *string, /* String to convert to Tcl list element. */ int length, /* Number of bytes in string, or -1. */ int *flagPtr) /* Where to store information to guide * Tcl_ConvertElement. */ { int flags, nestingLevel; - register CONST char *p, *lastChar; + register const char *p, *lastChar; /* * This function and Tcl_ConvertElement together do two things: @@ -785,7 +785,7 @@ Tcl_ScanCountedElement( int Tcl_ConvertElement( - register CONST char *src, /* Source information for list element. */ + register const char *src, /* Source information for list element. */ register char *dst, /* Place to put list-ified element. */ register int flags) /* Flags produced by Tcl_ScanElement. */ { @@ -815,13 +815,13 @@ Tcl_ConvertElement( int Tcl_ConvertCountedElement( - register CONST char *src, /* Source information for list element. */ + register const char *src, /* Source information for list element. */ int length, /* Number of bytes in src, or -1. */ char *dst, /* Place to put list-ified element. */ int flags) /* Flags produced by Tcl_ScanElement. */ { register char *p = dst; - register CONST char *lastChar; + register const char *lastChar; /* * See the comment block at the beginning of the Tcl_ScanElement code for @@ -964,7 +964,7 @@ Tcl_ConvertCountedElement( char * Tcl_Merge( int argc, /* How many strings to merge. */ - CONST char * CONST *argv) /* Array of string values. */ + const char *const *argv) /* Array of string values. */ { # define LOCAL_SIZE 20 int localFlags[LOCAL_SIZE], *flagPtr; @@ -1033,7 +1033,7 @@ Tcl_Merge( char Tcl_Backslash( - CONST char *src, /* Points to the backslash character of a + const char *src, /* Points to the backslash character of a * backslash sequence. */ int *readPtr) /* Fill in with number of characters read from * src, unless NULL. */ @@ -1068,7 +1068,7 @@ Tcl_Backslash( char * Tcl_Concat( int argc, /* Number of strings to concatenate. */ - CONST char * CONST *argv) /* Array of strings to concatenate. */ + const char *const *argv) /* Array of strings to concatenate. */ { int totalSize, i; char *p; @@ -1083,7 +1083,7 @@ Tcl_Concat( return result; } for (p = result, i = 0; i < argc; i++) { - CONST char *element; + const char *element; int length; /* @@ -1139,7 +1139,7 @@ Tcl_Concat( Tcl_Obj * Tcl_ConcatObj( int objc, /* Number of objects to concatenate. */ - Tcl_Obj *CONST objv[]) /* Array of objects to concatenate. */ + Tcl_Obj *const objv[]) /* Array of objects to concatenate. */ { int allocSize, finalSize, length, elemLength, i; char *p; @@ -1311,8 +1311,8 @@ Tcl_ConcatObj( int Tcl_StringMatch( - CONST char *str, /* String. */ - CONST char *pattern) /* Pattern, which may contain special + const char *str, /* String. */ + const char *pattern) /* Pattern, which may contain special * characters. */ { return Tcl_StringCaseMatch(str, pattern, 0); @@ -1339,13 +1339,13 @@ Tcl_StringMatch( int Tcl_StringCaseMatch( - CONST char *str, /* String. */ - CONST char *pattern, /* Pattern, which may contain special + const char *str, /* String. */ + const char *pattern, /* Pattern, which may contain special * characters. */ int nocase) /* 0 for case sensitive, 1 for insensitive */ { int p, charLen; - CONST char *pstart = pattern; + const char *pstart = pattern; Tcl_UniChar ch1, ch2; while (1) { @@ -1572,11 +1572,12 @@ Tcl_StringCaseMatch( int TclByteArrayMatch( - const unsigned char *string, /* String. */ - int strLen, /* Length of String */ - const unsigned char *pattern, /* Pattern, which may contain special - * characters. */ - int ptnLen, /* Length of Pattern */ + const unsigned char *string,/* String. */ + int strLen, /* Length of String */ + const unsigned char *pattern, + /* Pattern, which may contain special + * characters. */ + int ptnLen, /* Length of Pattern */ int flags) { const unsigned char *stringEnd, *patternEnd; @@ -1828,7 +1829,7 @@ Tcl_DStringInit( char * Tcl_DStringAppend( Tcl_DString *dsPtr, /* Structure describing dynamic string. */ - CONST char *bytes, /* String to append. If length is -1 then this + const char *bytes, /* String to append. If length is -1 then this * must be null-terminated. */ int length) /* Number of bytes from "bytes" to append. If * < 0, then append all of bytes, up to null @@ -1836,7 +1837,7 @@ Tcl_DStringAppend( { int newSize; char *dst; - CONST char *end; + const char *end; if (length < 0) { length = strlen(bytes); @@ -1896,7 +1897,7 @@ Tcl_DStringAppend( char * Tcl_DStringAppendElement( Tcl_DString *dsPtr, /* Structure describing dynamic string. */ - CONST char *element) /* String to append. Must be + const char *element) /* String to append. Must be * null-terminated. */ { int newSize, flags, strSize; @@ -2384,8 +2385,8 @@ char * TclPrecTraceProc( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Interpreter containing variable. */ - CONST char *name1, /* Name of variable. */ - CONST char *name2, /* Second part of variable name. */ + const char *name1, /* Name of variable. */ + const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { Tcl_Obj* value; @@ -2456,8 +2457,8 @@ TclPrecTraceProc( int TclNeedSpace( - CONST char *start, /* First character in string. */ - CONST char *end) /* End of string (place where space will be + const char *start, /* First character in string. */ + const char *end) /* End of string (place where space will be * added, if appropriate). */ { /* @@ -2797,9 +2798,9 @@ TclCheckBadOctal( Tcl_Interp *interp, /* Interpreter to use for error reporting. If * NULL, then no error message is left after * errors. */ - CONST char *value) /* String to check. */ + const char *value) /* String to check. */ { - register CONST char *p = value; + register const char *p = value; /* * A frequent mistake is invalid octal values due to an unwanted leading @@ -2970,7 +2971,7 @@ TclSetProcessGlobalValue( Tcl_Obj *newValue, Tcl_Encoding encoding) { - CONST char *bytes; + const char *bytes; Tcl_HashTable *cacheMap; Tcl_HashEntry *hPtr; int dummy; @@ -3181,7 +3182,7 @@ TclGetObjNameOfExecutable(void) *---------------------------------------------------------------------- */ -CONST char * +const char * Tcl_GetNameOfExecutable(void) { int numBytes; diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 469d2f1..6b0b6f7 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -48,7 +48,7 @@ * permission to use and distribute the software in accordance with the * terms specified in this license. * - * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.11 2007/04/23 20:46:13 das Exp $ + * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.12 2008/04/27 22:21:33 dkf Exp $ */ #include "tclPort.h" @@ -81,7 +81,7 @@ int Tcl_MacOSXOpenBundleResources( Tcl_Interp *interp, - CONST char *bundleName, + const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath) @@ -114,8 +114,8 @@ Tcl_MacOSXOpenBundleResources( int Tcl_MacOSXOpenVersionedBundleResources( Tcl_Interp *interp, - CONST char *bundleName, - CONST char *bundleVersion, + const char *bundleName, + const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath) diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 885a450..d230f4a 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.12 2007/04/23 20:46:14 das Exp $ + * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.13 2008/04/27 22:21:33 dkf Exp $ */ #include "tclInt.h" @@ -382,9 +382,9 @@ TclMacOSXSetFileAttribute( int TclMacOSXCopyFileAttributes( - CONST char *src, /* Path name of source file (native). */ - CONST char *dst, /* Path name of target file (native). */ - CONST Tcl_StatBuf *statBufPtr) + const char *src, /* Path name of source file (native). */ + const char *dst, /* Path name of target file (native). */ + const Tcl_StatBuf *statBufPtr) /* Stat info for source file */ { #ifdef WEAK_IMPORT_COPYFILE @@ -489,8 +489,8 @@ TclMacOSXCopyFileAttributes( int TclMacOSXMatchType( Tcl_Interp *interp, /* Interpreter to receive errors. */ - CONST char *pathName, /* Native path to check. */ - CONST char *fileName, /* Native filename to check. */ + const char *pathName, /* Native path to check. */ + const char *fileName, /* Native filename to check. */ Tcl_StatBuf *statBufPtr, /* Stat info for file to check */ Tcl_GlobTypeData *types) /* Type description to match against. */ { diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index a5058d8..4183c7c 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.17 2007/04/16 13:36:35 dkf Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.18 2008/04/27 22:21:33 dkf Exp $ */ #include "tcl.h" @@ -28,8 +28,8 @@ extern Tcl_PackageInitProc Tcltest_Init; #endif /* TCL_TEST */ #ifdef TCL_XT_TEST -extern void XtToolkitInitialize _ANSI_ARGS_((void)); -extern int Tclxttest_Init _ANSI_ARGS_((Tcl_Interp *interp)); +extern void XtToolkitInitialize(void); +extern int Tclxttest_Init(Tcl_Interp *interp); #endif /* @@ -64,7 +64,7 @@ main( #ifndef TCL_LOCAL_APPINIT #define TCL_LOCAL_APPINIT Tcl_AppInit #endif - extern int TCL_LOCAL_APPINIT _ANSI_ARGS_((Tcl_Interp *interp)); + extern int TCL_LOCAL_APPINIT(Tcl_Interp *interp); /* * The following #if block allows you to change how Tcl finds the startup @@ -73,7 +73,7 @@ main( */ #ifdef TCL_LOCAL_MAIN_HOOK - extern int TCL_LOCAL_MAIN_HOOK _ANSI_ARGS_((int *argc, char ***argv)); + extern int TCL_LOCAL_MAIN_HOOK(int *argc, char ***argv); #endif #ifdef TCL_XT_TEST diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index d92dc04..7bb1da3 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.16 2006/06/13 22:10:19 dkf Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.17 2008/04/27 22:21:33 dkf Exp $ */ #include "tclInt.h" @@ -66,7 +66,7 @@ TclpDlopen( * file. */ { void *handle; - CONST char *native; + const char *native; /* * First try the full path the user gave us. This is particularly @@ -129,11 +129,11 @@ Tcl_PackageInitProc * TclpFindSymbol( Tcl_Interp *interp, /* Place to put error messages. */ Tcl_LoadHandle loadHandle, /* Value from TcpDlopen(). */ - CONST char *symbol) /* Symbol to look up. */ + const char *symbol) /* Symbol to look up. */ { - CONST char *native; + const char *native; Tcl_DString newName, ds; - VOID *handle = (VOID*)loadHandle; + void *handle = (void *) loadHandle; Tcl_PackageInitProc *proc; /* @@ -210,7 +210,7 @@ TclpUnloadFile( int TclGuessPackageName( - CONST char *fileName, /* Name of file containing package (already + const char *fileName, /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index dd09749..93d29ab 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.29 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.30 2008/04/27 22:21:34 dkf Exp $ */ #include "tclInt.h" @@ -112,7 +112,7 @@ MODULE_SCOPE long tclMacOSXDarwinRelease; *---------------------------------------------------------------------- */ -static CONST char* +static const char* DyldOFIErrorMsg( int err) { @@ -346,7 +346,7 @@ MODULE_SCOPE Tcl_PackageInitProc * TclpFindSymbol( Tcl_Interp *interp, /* For error reporting. */ Tcl_LoadHandle loadHandle, /* Handle from TclpDlopen. */ - CONST char *symbol) /* Symbol name to look up. */ + const char *symbol) /* Symbol name to look up. */ { Tcl_DyldLoadHandle *dyldLoadHandle = (Tcl_DyldLoadHandle *) loadHandle; Tcl_PackageInitProc *proc = NULL; @@ -528,7 +528,7 @@ TclpUnloadFile( int TclGuessPackageName( - CONST char *fileName, /* Name of file containing package (already + const char *fileName, /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c index 48c7c98..4168ebb 100644 --- a/unix/tclLoadNext.c +++ b/unix/tclLoadNext.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadNext.c,v 1.13 2005/11/11 23:46:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadNext.c,v 1.14 2008/04/27 22:21:34 dkf Exp $ */ #include "tclInt.h" @@ -50,7 +50,7 @@ TclpDlopen( struct mach_header *header; char *fileName; char *files[2]; - CONST char *native; + const char *native; int result = 1; NXStream *errorStream = NXOpenMemory(0,0,NX_READWRITE); @@ -121,7 +121,7 @@ Tcl_PackageInitProc * TclpFindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, - CONST char *symbol) + const char *symbol) { Tcl_PackageInitProc *proc = NULL; if (symbol) { @@ -183,7 +183,7 @@ TclpUnloadFile( int TclGuessPackageName( - CONST char *fileName, /* Name of file containing package (already + const char *fileName, /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c index c0f67eb..8a63035 100644 --- a/unix/tclLoadOSF.c +++ b/unix/tclLoadOSF.c @@ -31,7 +31,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadOSF.c,v 1.13 2005/11/11 23:46:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadOSF.c,v 1.14 2008/04/27 22:21:34 dkf Exp $ */ #include "tclInt.h" @@ -72,7 +72,7 @@ TclpDlopen( ldr_module_t lm; char *pkg; char *fileName = Tcl_GetString(pathPtr); - CONST char *native; + const char *native; /* * First try the full path the user gave us. This is particularly @@ -144,7 +144,7 @@ Tcl_PackageInitProc * TclpFindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, - CONST char *symbol) + const char *symbol) { return ldr_lookup_package((char *)loadHandle, symbol); } @@ -197,7 +197,7 @@ TclpUnloadFile( int TclGuessPackageName( - CONST char *fileName, /* Name of file containing package (already + const char *fileName, /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c index 80ef7b5..a3a3fc5 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadShl.c,v 1.16 2005/11/11 23:46:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadShl.c,v 1.17 2008/04/27 22:21:34 dkf Exp $ */ #include @@ -57,7 +57,7 @@ TclpDlopen( * file. */ { shl_t handle; - CONST char *native; + const char *native; char *fileName = Tcl_GetString(pathPtr); /* @@ -122,7 +122,7 @@ Tcl_PackageInitProc * TclpFindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, - CONST char *symbol) + const char *symbol) { Tcl_DString newName; Tcl_PackageInitProc *proc = NULL; @@ -199,7 +199,7 @@ TclpUnloadFile( int TclGuessPackageName( - CONST char *fileName, /* Name of file containing package (already + const char *fileName, /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 41b1003..1f1cf89 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.65 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.66 2008/04/27 22:21:34 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -99,7 +99,7 @@ static int SetReadOnlyAttribute(Tcl_Interp *interp, int objIndex, */ typedef int (TraversalProc)(Tcl_DString *srcPtr, Tcl_DString *dstPtr, - CONST Tcl_StatBuf *statBufPtr, int type, Tcl_DString *errorPtr); + const Tcl_StatBuf *statBufPtr, int type, Tcl_DString *errorPtr); /* * Constants and variables necessary for file attributes subcommand. @@ -131,8 +131,8 @@ enum { UNIX_INVALID_ATTRIBUTE /* lint - last enum value needs no trailing , */ }; -MODULE_SCOPE CONST char *tclpFileAttrStrings[]; -CONST char *tclpFileAttrStrings[] = { +MODULE_SCOPE const char *tclpFileAttrStrings[]; +const char *tclpFileAttrStrings[] = { "-group", "-owner", "-permissions", #if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) "-readonly", @@ -143,8 +143,8 @@ CONST char *tclpFileAttrStrings[] = { NULL }; -MODULE_SCOPE CONST TclFileAttrProcs tclpFileAttrProcs[]; -CONST TclFileAttrProcs tclpFileAttrProcs[] = { +MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; +const TclFileAttrProcs tclpFileAttrProcs[] = { {GetGroupAttribute, SetGroupAttribute}, {GetOwnerAttribute, SetOwnerAttribute}, {GetPermissionsAttribute, SetPermissionsAttribute}, @@ -179,19 +179,19 @@ CONST TclFileAttrProcs tclpFileAttrProcs[] = { * Declarations for local procedures defined in this file: */ -static int CopyFileAtts(CONST char *src, - CONST char *dst, CONST Tcl_StatBuf *statBufPtr); -static int DoCopyFile(CONST char *srcPtr, CONST char *dstPtr, - CONST Tcl_StatBuf *statBufPtr); -static int DoCreateDirectory(CONST char *pathPtr); +static int CopyFileAtts(const char *src, + const char *dst, const Tcl_StatBuf *statBufPtr); +static int DoCopyFile(const char *srcPtr, const char *dstPtr, + const Tcl_StatBuf *statBufPtr); +static int DoCreateDirectory(const char *pathPtr); static int DoRemoveDirectory(Tcl_DString *pathPtr, int recursive, Tcl_DString *errorPtr); -static int DoRenameFile(CONST char *src, CONST char *dst); +static int DoRenameFile(const char *src, const char *dst); static int TraversalCopy(Tcl_DString *srcPtr, - Tcl_DString *dstPtr, CONST Tcl_StatBuf *statBufPtr, + Tcl_DString *dstPtr, const Tcl_StatBuf *statBufPtr, int type, Tcl_DString *errorPtr); static int TraversalDelete(Tcl_DString *srcPtr, - Tcl_DString *dstPtr, CONST Tcl_StatBuf *statBufPtr, + Tcl_DString *dstPtr, const Tcl_StatBuf *statBufPtr, int type, Tcl_DString *errorPtr); static int TraverseUnixTree(TraversalProc *traversalProc, Tcl_DString *sourcePtr, Tcl_DString *destPtr, @@ -205,11 +205,11 @@ static int TraverseUnixTree(TraversalProc *traversalProc, * passing the standard MAXPATHLEN size resolved arg. */ -static char * Realpath(CONST char *path, char *resolved); +static char * Realpath(const char *path, char *resolved); char * Realpath( - CONST char *path, + const char *path, char *resolved) { memset(resolved, 0, MAXPATHLEN); @@ -301,9 +301,9 @@ TclpObjRenameFile( static int DoRenameFile( - CONST char *src, /* Pathname of file or dir to be renamed + const char *src, /* Pathname of file or dir to be renamed * (native). */ - CONST char *dst) /* New pathname of file or directory + const char *dst) /* New pathname of file or directory * (native). */ { if (rename(src, dst) == 0) { /* INTL: Native. */ @@ -411,7 +411,7 @@ TclpObjCopyFile( Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr) { - CONST char *src = Tcl_FSGetNativePath(srcPathPtr); + const char *src = Tcl_FSGetNativePath(srcPathPtr); Tcl_StatBuf srcStatBuf; if (TclOSlstat(src, &srcStatBuf) != 0) { /* INTL: Native. */ @@ -423,9 +423,9 @@ TclpObjCopyFile( static int DoCopyFile( - CONST char *src, /* Pathname of file to be copied (native). */ - CONST char *dst, /* Pathname of file to copy to (native). */ - CONST Tcl_StatBuf *statBufPtr) + const char *src, /* Pathname of file to be copied (native). */ + const char *dst, /* Pathname of file to copy to (native). */ + const Tcl_StatBuf *statBufPtr) /* Used to determine filetype. */ { Tcl_StatBuf dstStatBuf; @@ -509,10 +509,10 @@ DoCopyFile( int TclUnixCopyFile( - CONST char *src, /* Pathname of file to copy (native). */ - CONST char *dst, /* Pathname of file to create/overwrite + const char *src, /* Pathname of file to copy (native). */ + const char *dst, /* Pathname of file to create/overwrite * (native). */ - CONST Tcl_StatBuf *statBufPtr, + const Tcl_StatBuf *statBufPtr, /* Used to determine mode and blocksize. */ int dontCopyAtts) /* If flag set, don't copy attributes. */ { @@ -631,7 +631,7 @@ TclpObjDeleteFile( int TclpDeleteFile( - CONST char *path) /* Pathname of file to be removed (native). */ + const char *path) /* Pathname of file to be removed (native). */ { if (unlink(path) != 0) { /* INTL: Native. */ return TCL_ERROR; @@ -674,7 +674,7 @@ TclpObjCreateDirectory( static int DoCreateDirectory( - CONST char *path) /* Pathname of directory to create (native). */ + const char *path) /* Pathname of directory to create (native). */ { mode_t mode; @@ -821,7 +821,7 @@ DoRemoveDirectory( * filled with UTF-8 name of file causing * error. */ { - CONST char *path; + const char *path; mode_t oldPerm = 0; int result; @@ -919,7 +919,7 @@ TraverseUnixTree( * files. */ { Tcl_StatBuf statBuf; - CONST char *source, *errfile; + const char *source, *errfile; int result, sourceLen; int targetLen; #ifndef HAVE_FTS @@ -927,7 +927,7 @@ TraverseUnixTree( Tcl_DirEntry *dirEntPtr; DIR *dirPtr; #else - CONST char *paths[2] = {NULL, NULL}; + const char *paths[2] = {NULL, NULL}; FTS *fts = NULL; FTSENT *ent; #endif @@ -1137,7 +1137,7 @@ static int TraversalCopy( Tcl_DString *srcPtr, /* Source pathname to copy (native). */ Tcl_DString *dstPtr, /* Destination pathname of copy (native). */ - CONST Tcl_StatBuf *statBufPtr, + const Tcl_StatBuf *statBufPtr, /* Stat info for file specified by srcPtr. */ int type, /* Reason for call - see TraverseUnixTree(). */ Tcl_DString *errorPtr) /* If non-NULL, uninitialized or free DString @@ -1201,7 +1201,7 @@ static int TraversalDelete( Tcl_DString *srcPtr, /* Source pathname (native). */ Tcl_DString *ignore, /* Destination pathname (not used). */ - CONST Tcl_StatBuf *statBufPtr, + const Tcl_StatBuf *statBufPtr, /* Stat info for file specified by srcPtr. */ int type, /* Reason for call - see TraverseUnixTree(). */ Tcl_DString *errorPtr) /* If non-NULL, uninitialized or free DString @@ -1249,9 +1249,9 @@ TraversalDelete( static int CopyFileAtts( - CONST char *src, /* Path name of source file (native). */ - CONST char *dst, /* Path name of target file (native). */ - CONST Tcl_StatBuf *statBufPtr) + const char *src, /* Path name of source file (native). */ + const char *dst, /* Path name of target file (native). */ + const Tcl_StatBuf *statBufPtr) /* Stat info for source file */ { struct utimbuf tval; @@ -1332,7 +1332,7 @@ GetGroupAttribute( *attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_gid); } else { Tcl_DString ds; - CONST char *utf; + const char *utf; utf = Tcl_ExternalToUtfDString(NULL, groupPtr->gr_name, -1, &ds); *attributePtrPtr = Tcl_NewStringObj(utf, -1); @@ -1387,7 +1387,7 @@ GetOwnerAttribute( *attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_uid); } else { Tcl_DString ds; - CONST char *utf; + const char *utf; utf = Tcl_ExternalToUtfDString(NULL, pwPtr->pw_name, -1, &ds); *attributePtrPtr = Tcl_NewStringObj(utf, Tcl_DStringLength(&ds)); @@ -1465,12 +1465,12 @@ SetGroupAttribute( { long gid; int result; - CONST char *native; + const char *native; if (Tcl_GetLongFromObj(NULL, attributePtr, &gid) != TCL_OK) { Tcl_DString ds; struct group *groupPtr = NULL; - CONST char *string; + const char *string; int length; string = Tcl_GetStringFromObj(attributePtr, &length); @@ -1531,12 +1531,12 @@ SetOwnerAttribute( { long uid; int result; - CONST char *native; + const char *native; if (Tcl_GetLongFromObj(NULL, attributePtr, &uid) != TCL_OK) { Tcl_DString ds; struct passwd *pwPtr = NULL; - CONST char *string; + const char *string; int length; string = Tcl_GetStringFromObj(attributePtr, &length); @@ -1596,7 +1596,7 @@ SetPermissionsAttribute( long mode; mode_t newMode; int result = TCL_ERROR; - CONST char *native; + const char *native; char *modeStringPtr = TclGetString(attributePtr); int scanned = TclParseAllWhiteSpace(modeStringPtr, -1); @@ -1909,7 +1909,7 @@ TclpObjNormalizePath( #ifndef NO_REALPATH char normPath[MAXPATHLEN]; Tcl_DString ds; - CONST char *nativePath; + const char *nativePath; #endif /* @@ -1962,7 +1962,7 @@ TclpObjNormalizePath( */ Tcl_DString ds; - CONST char *nativePath; + const char *nativePath; int accessOk; nativePath = Tcl_UtfToExternalDString(NULL, path, @@ -2156,9 +2156,8 @@ SetReadOnlyAttribute( Tcl_Obj *attributePtr) /* The attribute to set. */ { Tcl_StatBuf statBuf; - int result; - int readonly; - CONST char *native; + int result, readonly; + const char *native; if (Tcl_GetBooleanFromObj(interp, attributePtr, &readonly) != TCL_OK) { return TCL_ERROR; diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index d11b43c..a24966c 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,14 +9,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFile.c,v 1.52 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.53 2008/04/27 22:21:34 dkf Exp $ */ #include "tclInt.h" #include "tclFileSystem.h" -static int NativeMatchType(Tcl_Interp *interp, CONST char* nativeEntry, - CONST char* nativeName, Tcl_GlobTypeData *types); +static int NativeMatchType(Tcl_Interp *interp, const char* nativeEntry, + const char* nativeName, Tcl_GlobTypeData *types); /* *--------------------------------------------------------------------------- @@ -37,10 +37,10 @@ static int NativeMatchType(Tcl_Interp *interp, CONST char* nativeEntry, void TclpFindExecutable( - CONST char *argv0) /* The value of the application's argv[0] + const char *argv0) /* The value of the application's argv[0] * (native). */ { - CONST char *name, *p; + const char *name, *p; Tcl_StatBuf statBuf; Tcl_DString buffer, nameString, cwd, utfName; Tcl_Encoding encoding; @@ -202,12 +202,12 @@ TclpMatchInDirectory( Tcl_Interp *interp, /* Interpreter to receive errors. */ Tcl_Obj *resultPtr, /* List object to lappend results. */ Tcl_Obj *pathPtr, /* Contains path to directory to search. */ - CONST char *pattern, /* Pattern to match against. */ + const char *pattern, /* Pattern to match against. */ Tcl_GlobTypeData *types) /* Object containing list of acceptable types. * May be NULL. In particular the directory * flag is very important. */ { - CONST char *native; + const char *native; Tcl_Obj *fileNamePtr; int matchResult = 0; @@ -228,12 +228,13 @@ TclpMatchInDirectory( /* * Match a file directly. */ + Tcl_Obj *tailPtr; - CONST char *nativeTail; + const char *nativeTail; - native = (CONST char*) Tcl_FSGetNativePath(pathPtr); + native = (const char *) Tcl_FSGetNativePath(pathPtr); tailPtr = TclPathPart(interp, pathPtr, TCL_PATH_TAIL); - nativeTail = (CONST char*) Tcl_FSGetNativePath(tailPtr); + nativeTail = (const char *) Tcl_FSGetNativePath(tailPtr); matchResult = NativeMatchType(interp, native, nativeTail, types); if (matchResult == 1) { Tcl_ListObjAppendElement(interp, resultPtr, pathPtr); @@ -243,10 +244,9 @@ TclpMatchInDirectory( } else { DIR *d; Tcl_DirEntry *entryPtr; - CONST char *dirName; - int dirLength; + const char *dirName; + int dirLength, nativeDirLen; int matchHidden, matchHiddenPat; - int nativeDirLen; Tcl_StatBuf statBuf; Tcl_DString ds; /* native encoding of dir */ Tcl_DString dsOrig; /* utf-8 encoding of dir */ @@ -257,7 +257,7 @@ TclpMatchInDirectory( /* * Make sure that the directory part of the name really is a - * directory. If the directory name is "", use the name "." instead, + * directory. If the directory name is "", use the name "." instead, * because some UNIX systems don't treat "" like "." automatically. * Keep the "" for use in generating file names, otherwise "glob * foo.c" would return "./foo.c". @@ -299,7 +299,7 @@ TclpMatchInDirectory( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "couldn't read directory \"", Tcl_DStringValue(&dsOrig), "\": ", - Tcl_PosixError(interp), (char *) NULL); + Tcl_PosixError(interp), NULL); } Tcl_DStringFree(&dsOrig); Tcl_DecrRefCount(fileNamePtr); @@ -318,7 +318,7 @@ TclpMatchInDirectory( || (types && (types->perm & TCL_GLOB_PERM_HIDDEN)); while ((entryPtr = TclOSreaddir(d)) != NULL) { /* INTL: Native. */ Tcl_DString utfDs; - CONST char *utfname; + const char *utfname; /* * Skip this file if it doesn't agree with the hidden parameters @@ -326,13 +326,19 @@ TclpMatchInDirectory( */ if (*entryPtr->d_name == '.') { - if (!matchHidden) continue; + if (!matchHidden) { + continue; + } } else { #ifdef MAC_OSX_TCL - if (matchHiddenPat) continue; + if (matchHiddenPat) { + continue; + } /* Also need to check HFS hidden flag in TclMacOSXMatchType. */ #else - if (matchHidden) continue; + if (matchHidden) { + continue; + } #endif } @@ -372,9 +378,8 @@ TclpMatchInDirectory( } if (matchResult < 0) { return TCL_ERROR; - } else { - return TCL_OK; } + return TCL_OK; } /* @@ -382,13 +387,13 @@ TclpMatchInDirectory( * * NativeMatchType -- * - * This routine is used by the globbing code to check if a file - * matches a given type description. + * This routine is used by the globbing code to check if a file matches a + * given type description. * * Results: - * The return value is 1, 0 or -1 indicating whether the file - * matches the given criteria, does not match them, or an error - * occurred (in wich case an error is left in interp). + * The return value is 1, 0 or -1 indicating whether the file matches the + * given criteria, does not match them, or an error occurred (in which + * case an error is left in interp). * * Side effects: * None. @@ -399,11 +404,12 @@ TclpMatchInDirectory( static int NativeMatchType( Tcl_Interp *interp, /* Interpreter to receive errors. */ - CONST char *nativeEntry, /* Native path to check. */ - CONST char *nativeName, /* Native filename to check. */ + const char *nativeEntry, /* Native path to check. */ + const char *nativeName, /* Native filename to check. */ Tcl_GlobTypeData *types) /* Type description to match against. */ { Tcl_StatBuf buf; + if (types == NULL) { /* * Simply check for the file's existence, but do it with lstat, in @@ -414,124 +420,130 @@ NativeMatchType( if (TclOSlstat(nativeEntry, &buf) != 0) { return 0; } - } else { - if (types->perm != 0) { - if (TclOSstat(nativeEntry, &buf) != 0) { - /* - * Either the file has disappeared between the 'readdir' call - * and the 'stat' call, or the file is a link to a file which - * doesn't exist (which we could ascertain with lstat), or - * there is some other strange problem. In all these cases, we - * define this to mean the file does not match any defined - * permission, and therefore it is not added to the list of - * files to return. - */ - - return 0; - } + return 1; + } + if (types->perm != 0) { + if (TclOSstat(nativeEntry, &buf) != 0) { /* - * readonly means that there are NO write permissions (even for - * user), but execute is OK for anybody OR that the user immutable - * flag is set (where supported). + * Either the file has disappeared between the 'readdir' call and + * the 'stat' call, or the file is a link to a file which doesn't + * exist (which we could ascertain with lstat), or there is some + * other strange problem. In all these cases, we define this to + * mean the file does not match any defined permission, and + * therefore it is not added to the list of files to return. */ - if (((types->perm & TCL_GLOB_PERM_RONLY) && + return 0; + } + + /* + * readonly means that there are NO write permissions (even for user), + * but execute is OK for anybody OR that the user immutable flag is + * set (where supported). + */ + + if (((types->perm & TCL_GLOB_PERM_RONLY) && #if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) - !(buf.st_flags & UF_IMMUTABLE) && + !(buf.st_flags & UF_IMMUTABLE) && #endif - (buf.st_mode & (S_IWOTH|S_IWGRP|S_IWUSR))) || - ((types->perm & TCL_GLOB_PERM_R) && - (access(nativeEntry, R_OK) != 0)) || - ((types->perm & TCL_GLOB_PERM_W) && - (access(nativeEntry, W_OK) != 0)) || - ((types->perm & TCL_GLOB_PERM_X) && - (access(nativeEntry, X_OK) != 0)) + (buf.st_mode & (S_IWOTH|S_IWGRP|S_IWUSR))) || + ((types->perm & TCL_GLOB_PERM_R) && + (access(nativeEntry, R_OK) != 0)) || + ((types->perm & TCL_GLOB_PERM_W) && + (access(nativeEntry, W_OK) != 0)) || + ((types->perm & TCL_GLOB_PERM_X) && + (access(nativeEntry, X_OK) != 0)) #ifndef MAC_OSX_TCL - || ((types->perm & TCL_GLOB_PERM_HIDDEN) && - (*nativeName != '.')) + || ((types->perm & TCL_GLOB_PERM_HIDDEN) && + (*nativeName != '.')) #endif ) { - return 0; - } + return 0; } - if (types->type != 0) { - if (types->perm == 0) { + } + if (types->type != 0) { + if (types->perm == 0) { + /* + * We haven't yet done a stat on the file. + */ + + if (TclOSstat(nativeEntry, &buf) != 0) { /* - * We haven't yet done a stat on the file. + * Posix error occurred. The only ok case is if this is a link + * to a nonexistent file, and the user did 'glob -l'. So we + * check that here: */ - if (TclOSstat(nativeEntry, &buf) != 0) { - /* - * Posix error occurred. The only ok case is if this is a - * link to a nonexistent file, and the user did 'glob -l'. - * So we check that here: - */ - - if (types->type & TCL_GLOB_TYPE_LINK) { - if (TclOSlstat(nativeEntry, &buf) == 0) { - if (S_ISLNK(buf.st_mode)) { - return 1; - } + if (types->type & TCL_GLOB_TYPE_LINK) { + if (TclOSlstat(nativeEntry, &buf) == 0) { + if (S_ISLNK(buf.st_mode)) { + return 1; } } - return 0; } + return 0; } + } - /* - * In order bcdpfls as in 'find -t' - */ + /* + * In order bcdpsfl as in 'find -t' + */ - if (((types->type & TCL_GLOB_TYPE_BLOCK)&& S_ISBLK(buf.st_mode)) || + if ( ((types->type & TCL_GLOB_TYPE_BLOCK)&& S_ISBLK(buf.st_mode)) || ((types->type & TCL_GLOB_TYPE_CHAR) && S_ISCHR(buf.st_mode)) || ((types->type & TCL_GLOB_TYPE_DIR) && S_ISDIR(buf.st_mode)) || ((types->type & TCL_GLOB_TYPE_PIPE) && S_ISFIFO(buf.st_mode))|| - ((types->type & TCL_GLOB_TYPE_FILE) && S_ISREG(buf.st_mode)) #ifdef S_ISSOCK - ||((types->type & TCL_GLOB_TYPE_SOCK) && S_ISSOCK(buf.st_mode)) + ((types->type & TCL_GLOB_TYPE_SOCK) && S_ISSOCK(buf.st_mode))|| #endif /* S_ISSOCK */ - ) { - /* - * Do nothing - this file is ok. - */ - } else { + ((types->type & TCL_GLOB_TYPE_FILE) && S_ISREG(buf.st_mode))) { + /* + * Do nothing - this file is ok. + */ + } else { #ifdef S_ISLNK - if (types->type & TCL_GLOB_TYPE_LINK) { - if (TclOSlstat(nativeEntry, &buf) == 0) { - if (S_ISLNK(buf.st_mode)) { - goto filetypeOK; - } + if (types->type & TCL_GLOB_TYPE_LINK) { + if (TclOSlstat(nativeEntry, &buf) == 0) { + if (S_ISLNK(buf.st_mode)) { + goto filetypeOK; } } -#endif /* S_ISLNK */ - return 0; } +#endif /* S_ISLNK */ + return 0; } - filetypeOK: ; + } + filetypeOK: + + /* + * If we're on OSX, we also have to worry about matching the file creator + * code (if specified). Do that now. + */ + #ifdef MAC_OSX_TCL - if (types->macType != NULL || types->macCreator != NULL || - (types->perm & TCL_GLOB_PERM_HIDDEN)) { - int matchResult; + if (types->macType != NULL || types->macCreator != NULL || + (types->perm & TCL_GLOB_PERM_HIDDEN)) { + int matchResult; - if (types->perm == 0 && types->type == 0) { - /* - * We haven't yet done a stat on the file. - */ + if (types->perm == 0 && types->type == 0) { + /* + * We haven't yet done a stat on the file. + */ - if (TclOSstat(nativeEntry, &buf) != 0) { - return 0; - } + if (TclOSstat(nativeEntry, &buf) != 0) { + return 0; } + } - matchResult = TclMacOSXMatchType(interp, nativeEntry, nativeName, - &buf, types); - if (matchResult != 1) { - return matchResult; - } + matchResult = TclMacOSXMatchType(interp, nativeEntry, nativeName, + &buf, types); + if (matchResult != 1) { + return matchResult; } -#endif } +#endif /* MAC_OSX_TCL */ + return 1; } @@ -558,15 +570,14 @@ NativeMatchType( char * TclpGetUserHome( - CONST char *name, /* User name for desired home directory. */ + const char *name, /* User name for desired home directory. */ Tcl_DString *bufferPtr) /* Uninitialized or free DString filled with * name of user's home directory. */ { struct passwd *pwPtr; Tcl_DString ds; - CONST char *native; + const char *native = Tcl_UtfToExternalDString(NULL, name, -1, &ds); - native = Tcl_UtfToExternalDString(NULL, name, -1, &ds); pwPtr = getpwnam(native); /* INTL: Native. */ Tcl_DStringFree(&ds); @@ -600,12 +611,12 @@ TclpObjAccess( Tcl_Obj *pathPtr, /* Path of file to access */ int mode) /* Permission setting. */ { - CONST char *path = Tcl_FSGetNativePath(pathPtr); + const char *path = Tcl_FSGetNativePath(pathPtr); + if (path == NULL) { return -1; - } else { - return access(path, mode); } + return access(path, mode); } /* @@ -628,12 +639,12 @@ int TclpObjChdir( Tcl_Obj *pathPtr) /* Path to new working directory */ { - CONST char *path = Tcl_FSGetNativePath(pathPtr); + const char *path = Tcl_FSGetNativePath(pathPtr); + if (path == NULL) { return -1; - } else { - return chdir(path); } + return chdir(path); } /* @@ -688,24 +699,27 @@ TclpGetNativeCwd( char buffer[MAXPATHLEN+1]; #ifdef USEGETWD - if (getwd(buffer) == NULL) /* INTL: Native. */ + if (getwd(buffer) == NULL) { /* INTL: Native. */ + return NULL; + } #else - if (getcwd(buffer, MAXPATHLEN+1) == NULL) /* INTL: Native. */ -#endif - { + if (getcwd(buffer, MAXPATHLEN+1) == NULL) { /* INTL: Native. */ return NULL; } - if ((clientData != NULL) && strcmp(buffer, (CONST char*)clientData) == 0) { - /* - * No change to pwd. - */ +#endif + + if ((clientData == NULL) || strcmp(buffer, (const char*)clientData)) { + char *newCd = ckalloc((unsigned) strlen(buffer) + 1); - return clientData; - } else { - char *newCd = (char *) ckalloc((unsigned) (strlen(buffer) + 1)); strcpy(newCd, buffer); return (ClientData) newCd; } + + /* + * No change to pwd. + */ + + return clientData; } /* @@ -730,7 +744,7 @@ TclpGetNativeCwd( *---------------------------------------------------------------------- */ -CONST char * +const char * TclpGetCwd( Tcl_Interp *interp, /* If non-NULL, used for error reporting. */ Tcl_DString *bufferPtr) /* Uninitialized or free DString filled with @@ -776,14 +790,14 @@ TclpGetCwd( char * TclpReadlink( - CONST char *path, /* Path of file to readlink (UTF-8). */ + const char *path, /* Path of file to readlink (UTF-8). */ Tcl_DString *linkPtr) /* Uninitialized or free DString filled with * contents of link (UTF-8). */ { #ifndef DJGPP char link[MAXPATHLEN]; int length; - CONST char *native; + const char *native; Tcl_DString ds; native = Tcl_UtfToExternalDString(NULL, path, -1, &ds); @@ -822,12 +836,12 @@ TclpObjStat( Tcl_Obj *pathPtr, /* Path of file to stat */ Tcl_StatBuf *bufPtr) /* Filled with results of stat call. */ { - CONST char *path = Tcl_FSGetNativePath(pathPtr); + const char *path = Tcl_FSGetNativePath(pathPtr); + if (path == NULL) { return -1; - } else { - return TclOSstat(path, bufPtr); } + return TclOSstat(path, bufPtr); } #ifdef S_IFLNK @@ -839,8 +853,8 @@ TclpObjLink( int linkAction) { if (toPtr != NULL) { - CONST char *src = Tcl_FSGetNativePath(pathPtr); - CONST char *target = NULL; + const char *src = Tcl_FSGetNativePath(pathPtr); + const char *target = NULL; if (src == NULL) { return NULL; @@ -1034,8 +1048,8 @@ TclpNativeToNormalized( Tcl_Obj *objPtr; int len; - CONST char *copy; - Tcl_ExternalToUtfDString(NULL, (CONST char*)clientData, -1, &ds); + const char *copy; + Tcl_ExternalToUtfDString(NULL, (const char*)clientData, -1, &ds); copy = Tcl_DStringValue(&ds); len = Tcl_DStringLength(&ds); @@ -1066,11 +1080,10 @@ ClientData TclNativeCreateNativeRep( Tcl_Obj *pathPtr) { - char *nativePathPtr; + char *nativePathPtr, *str; Tcl_DString ds; Tcl_Obj *validPathPtr; int len; - char *str; if (TclFSCwdIsNative()) { /* @@ -1100,7 +1113,7 @@ TclNativeCreateNativeRep( len = Tcl_DStringLength(&ds) + sizeof(char); Tcl_DecrRefCount(validPathPtr); nativePathPtr = ckalloc((unsigned) len); - memcpy((void*)nativePathPtr, (void*)Tcl_DStringValue(&ds), (size_t) len); + memcpy(nativePathPtr, Tcl_DStringValue(&ds), (size_t) len); Tcl_DStringFree(&ds); return (ClientData)nativePathPtr; @@ -1138,11 +1151,11 @@ TclNativeDupInternalRep( * ASCII representation when running on Unix. */ - len = sizeof(char) + (strlen((CONST char*) clientData) * sizeof(char)); + len = (strlen((const char*) clientData) + 1) * sizeof(char); - copy = (char *) ckalloc(len); - memcpy((void *) copy, (void *) clientData, len); - return (ClientData)copy; + copy = ckalloc(len); + memcpy(copy, clientData, len); + return (ClientData) copy; } /* diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index a9309c3..4c8427d 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUnixInit.c,v 1.82 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclUnixInit.c,v 1.83 2008/04/27 22:21:35 dkf Exp $ */ #include "tclInt.h" @@ -128,8 +128,8 @@ static char pkgPath[sizeof(TCL_PACKAGE_PATH)+200] = TCL_PACKAGE_PATH; */ typedef struct LocaleTable { - CONST char *lang; - CONST char *encoding; + const char *lang; + const char *encoding; } LocaleTable; /* @@ -142,7 +142,7 @@ typedef struct LocaleTable { * among existing platforms. */ -static CONST LocaleTable localeTable[] = { +static const LocaleTable localeTable[] = { {"", "iso8859-1"}, {"ansi-1251", "cp1251"}, {"ansi_x3.4-1968", "iso8859-1"}, @@ -480,7 +480,7 @@ TclpInitLibraryPath( { #define LIBRARY_SIZE 32 Tcl_Obj *pathPtr, *objPtr; - CONST char *str; + const char *str; Tcl_DString buffer; pathPtr = Tcl_NewObj(); @@ -499,7 +499,7 @@ TclpInitLibraryPath( if ((str != NULL) && (str[0] != '\0')) { Tcl_DString ds; int pathc; - CONST char **pathv; + const char **pathv; char installLib[LIBRARY_SIZE]; Tcl_DStringInit(&ds); @@ -612,9 +612,9 @@ TclpSetInterfaces(void) /* do nothing */ } -static CONST char * +static const char * SearchKnownEncodings( - CONST char *encoding) + const char *encoding) { int left = 0; int right = sizeof(localeTable)/sizeof(LocaleTable); @@ -635,12 +635,12 @@ SearchKnownEncodings( return NULL; } -CONST char * +const char * Tcl_GetEncodingNameFromEnvironment( Tcl_DString *bufPtr) { - CONST char *encoding; - CONST char *knownEncoding; + const char *encoding; + const char *knownEncoding; Tcl_DStringInit(bufPtr); @@ -696,7 +696,7 @@ Tcl_GetEncodingNameFromEnvironment( } if (encoding != NULL) { - CONST char *p; + const char *p; Tcl_DString ds; Tcl_DStringInit(&ds); @@ -800,7 +800,7 @@ TclpSetVariables( #endif /* MAC_OS_X_VERSION_MAX_ALLOWED > 1020 */ if (MacOSXGetLibraryPath(interp, MAXPATHLEN, tclLibPath) == TCL_OK) { - CONST char *str; + const char *str; CFBundleRef bundleRef; Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY); @@ -876,7 +876,7 @@ TclpSetVariables( unameOK = 0; #ifndef NO_UNAME if (uname(&name) >= 0) { - CONST char *native; + const char *native; unameOK = 1; @@ -973,7 +973,7 @@ TclpSetVariables( int TclpFindVariable( - CONST char *name, /* Name of desired environment variable + const char *name, /* Name of desired environment variable * (native). */ int *lengthPtr) /* Used to return length of name (for * successful searches) or number of non-NULL @@ -981,7 +981,7 @@ TclpFindVariable( * searches). */ { int i, result = -1; - register CONST char *env, *p1, *p2; + register const char *env, *p1, *p2; Tcl_DString envString; Tcl_DStringInit(&envString); diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 973fd18..cbfe546 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixSock.c,v 1.20 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.21 2008/04/27 22:21:35 dkf Exp $ */ #include "tclInt.h" @@ -42,7 +42,7 @@ InitializeHostName( int *lengthPtr, Tcl_Encoding *encodingPtr) { - CONST char *native = NULL; + const char *native = NULL; #ifndef NO_UNAME struct utsname u; @@ -94,7 +94,7 @@ InitializeHostName( * Fix suggested by Viktor Dukhovni (viktor@esm.com) */ -# if defined(SYS_NMLN) && SYS_NMLEN >= 256 +# if defined(SYS_NMLN) && (SYS_NMLEN >= 256) char buffer[SYS_NMLEN]; # else char buffer[256]; @@ -107,8 +107,8 @@ InitializeHostName( *encodingPtr = Tcl_GetEncoding(NULL, NULL); *lengthPtr = strlen(native); - *valuePtr = ckalloc((unsigned int) (*lengthPtr)+1); - memcpy(*valuePtr, (void *) native, (size_t)(*lengthPtr)+1); + *valuePtr = ckalloc((unsigned) (*lengthPtr) + 1); + memcpy(*valuePtr, native, (size_t)(*lengthPtr)+1); } /* @@ -129,7 +129,7 @@ InitializeHostName( *---------------------------------------------------------------------- */ -CONST char * +const char * Tcl_GetHostName(void) { return Tcl_GetString(TclGetProcessGlobalValue(&hostName)); diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index a894d4d..b3bf457 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.26 2007/04/20 06:11:00 kennykb Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.27 2008/04/27 22:21:35 dkf Exp $ */ #include "tclInt.h" @@ -63,25 +63,25 @@ static char *gotsig = "0"; static void TestFileHandlerProc(ClientData clientData, int mask); static int TestfilehandlerCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); static int TestfilewaitCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); static int TestfindexecutableCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); static int TestgetopenfileCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); static int TestgetdefencdirCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); static int TestsetdefencdirCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); int TclplatformtestInit(Tcl_Interp *interp); static int TestalarmCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); static int TestgotsigCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); static void AlarmHandler(int signum); static int TestchmodCmd(ClientData dummy, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); /* *---------------------------------------------------------------------- @@ -147,7 +147,7 @@ TestfilehandlerCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { Pipe *pipePtr; int i, mask, timeout; @@ -369,7 +369,7 @@ TestfilewaitCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { int mask, result, timeout; Tcl_Channel channel; @@ -438,7 +438,7 @@ TestfindexecutableCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { Tcl_Obj *saveName; @@ -481,7 +481,7 @@ TestgetopenfileCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { ClientData filePtr; @@ -524,7 +524,7 @@ TestsetdefencdirCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { if (argc != 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], @@ -558,7 +558,7 @@ TestgetdefencdirCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { if (argc != 1) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], NULL); @@ -592,7 +592,7 @@ TestalarmCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { #ifdef SA_RESTART unsigned int sec; @@ -671,7 +671,7 @@ TestgotsigCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { Tcl_AppendResult(interp, gotsig, NULL); gotsig = "0"; @@ -702,7 +702,7 @@ TestchmodCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { int i, mode; char *rest; @@ -721,7 +721,7 @@ TestchmodCmd( for (i = 2; i < argc; i++) { Tcl_DString buffer; - CONST char *translated; + const char *translated; translated = Tcl_TranslateFileName(interp, argv[i], &buffer); if (translated == NULL) { diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index 780098f..4f40980 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTime.c,v 1.34 2008/04/14 17:54:57 kennykb Exp $ + * RCS: @(#) $Id: tclUnixTime.c,v 1.35 2008/04/27 22:21:35 dkf Exp $ */ #include "tclInt.h" @@ -386,7 +386,7 @@ Tcl_GetTime( struct tm * TclpGetDate( - CONST time_t *time, + const time_t *time, int useGMT) { if (useGMT) { @@ -414,7 +414,7 @@ TclpGetDate( struct tm * TclpGmtime( - CONST time_t *timePtr) /* Pointer to the number of seconds since the + const time_t *timePtr) /* Pointer to the number of seconds since the * local system's epoch */ { /* @@ -440,7 +440,7 @@ TclpGmtime( struct tm * TclpGmtime_unix( - CONST time_t *timePtr) + const time_t *timePtr) { return TclpGmtime(timePtr); } @@ -464,7 +464,7 @@ TclpGmtime_unix( struct tm * TclpLocaltime( - CONST time_t *timePtr) /* Pointer to the number of seconds since the + const time_t *timePtr) /* Pointer to the number of seconds since the * local system's epoch */ { /* @@ -489,7 +489,7 @@ TclpLocaltime( */ struct tm* TclpLocaltime_unix( - CONST time_t *timePtr) + const time_t *timePtr) { return TclpLocaltime(timePtr); } @@ -630,7 +630,7 @@ NativeGetTime( static void SetTZIfNecessary(void) { - CONST char *newTZ = getenv("TZ"); + const char *newTZ = getenv("TZ"); Tcl_MutexLock(&tmMutex); if (newTZ == NULL) { diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index 425726d..1150fee 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -8,14 +8,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtTest.c,v 1.6 2005/11/02 23:26:50 dkf Exp $ + * RCS: @(#) $Id: tclXtTest.c,v 1.7 2008/04/27 22:21:35 dkf Exp $ */ #include #include "tcl.h" static int TesteventloopCmd(ClientData clientData, - Tcl_Interp *interp, int argc, CONST char **argv); + Tcl_Interp *interp, int argc, const char **argv); extern void InitNotifier(void); /* @@ -74,7 +74,7 @@ TesteventloopCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int argc, /* Number of arguments. */ - CONST char **argv) /* Argument strings. */ + const char **argv) /* Argument strings. */ { static int *framePtr = NULL;/* Pointer to integer on stack frame of * innermost invocation of the "wait" diff --git a/win/tclAppInit.c b/win/tclAppInit.c index c4ee1c4..05263d1 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.25 2007/04/16 13:36:36 dkf Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.26 2008/04/27 22:21:35 dkf Exp $ */ #include "tcl.h" @@ -61,7 +61,7 @@ main( #ifndef TCL_LOCAL_APPINIT #define TCL_LOCAL_APPINIT Tcl_AppInit #endif - extern int TCL_LOCAL_APPINIT _ANSI_ARGS_((Tcl_Interp *interp)); + extern int TCL_LOCAL_APPINIT(Tcl_Interp *interp); /* * The following #if block allows you to change how Tcl finds the startup @@ -70,7 +70,7 @@ main( */ #ifdef TCL_LOCAL_MAIN_HOOK - extern int TCL_LOCAL_MAIN_HOOK _ANSI_ARGS_((int *argc, char ***argv)); + extern int TCL_LOCAL_MAIN_HOOK(int *argc, char ***argv); #endif char *p; diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 9e6a0f0..9ef5f6e 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.54 2007/12/13 15:28:43 dgp Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.55 2008/04/27 22:21:36 dkf Exp $ */ #include "tclWinInt.h" @@ -20,7 +20,7 @@ * The following functions implement stack depth checking */ typedef struct ThreadSpecificData { - int *stackBound; /* The current stack boundary */ + int *stackBound; /* The current stack boundary. */ } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; #endif /* TCL_NO_STACK_CHECK */ @@ -37,7 +37,7 @@ typedef BOOL (WINAPI UTREGISTER)(HANDLE hModule, LPCSTR SixteenBitDLL, LPCSTR InitName, LPCSTR ProcName, UT32PROC **ThirtyTwoBitThunk, FARPROC UT32Callback, LPVOID Buff); -typedef VOID (WINAPI UTUNREGISTER)(HANDLE hModule); +typedef void (WINAPI UTUNREGISTER)(HANDLE hModule); /* * The following variables keep track of information about this DLL on a @@ -82,38 +82,38 @@ typedef struct EXCEPTION_REGISTRATION { static TclWinProcs asciiProcs = { 0, - (BOOL (WINAPI *)(CONST TCHAR *, LPDCB)) BuildCommDCBA, + (BOOL (WINAPI *)(const TCHAR *, LPDCB)) BuildCommDCBA, (TCHAR *(WINAPI *)(TCHAR *)) CharLowerA, - (BOOL (WINAPI *)(CONST TCHAR *, CONST TCHAR *, BOOL)) CopyFileA, - (BOOL (WINAPI *)(CONST TCHAR *, LPSECURITY_ATTRIBUTES)) CreateDirectoryA, - (HANDLE (WINAPI *)(CONST TCHAR *, DWORD, DWORD, SECURITY_ATTRIBUTES *, + (BOOL (WINAPI *)(const TCHAR *, const TCHAR *, BOOL)) CopyFileA, + (BOOL (WINAPI *)(const TCHAR *, LPSECURITY_ATTRIBUTES)) CreateDirectoryA, + (HANDLE (WINAPI *)(const TCHAR *, DWORD, DWORD, SECURITY_ATTRIBUTES *, DWORD, DWORD, HANDLE)) CreateFileA, - (BOOL (WINAPI *)(CONST TCHAR *, TCHAR *, LPSECURITY_ATTRIBUTES, - LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, CONST TCHAR *, + (BOOL (WINAPI *)(const TCHAR *, TCHAR *, LPSECURITY_ATTRIBUTES, + LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, const TCHAR *, LPSTARTUPINFOA, LPPROCESS_INFORMATION)) CreateProcessA, - (BOOL (WINAPI *)(CONST TCHAR *)) DeleteFileA, - (HANDLE (WINAPI *)(CONST TCHAR *, WIN32_FIND_DATAT *)) FindFirstFileA, + (BOOL (WINAPI *)(const TCHAR *)) DeleteFileA, + (HANDLE (WINAPI *)(const TCHAR *, WIN32_FIND_DATAT *)) FindFirstFileA, (BOOL (WINAPI *)(HANDLE, WIN32_FIND_DATAT *)) FindNextFileA, (BOOL (WINAPI *)(WCHAR *, LPDWORD)) GetComputerNameA, (DWORD (WINAPI *)(DWORD, WCHAR *)) GetCurrentDirectoryA, - (DWORD (WINAPI *)(CONST TCHAR *)) GetFileAttributesA, - (DWORD (WINAPI *)(CONST TCHAR *, DWORD nBufferLength, WCHAR *, + (DWORD (WINAPI *)(const TCHAR *)) GetFileAttributesA, + (DWORD (WINAPI *)(const TCHAR *, DWORD nBufferLength, WCHAR *, TCHAR **)) GetFullPathNameA, (DWORD (WINAPI *)(HMODULE, WCHAR *, int)) GetModuleFileNameA, - (DWORD (WINAPI *)(CONST TCHAR *, WCHAR *, DWORD)) GetShortPathNameA, - (UINT (WINAPI *)(CONST TCHAR *, CONST TCHAR *, UINT uUnique, + (DWORD (WINAPI *)(const TCHAR *, WCHAR *, DWORD)) GetShortPathNameA, + (UINT (WINAPI *)(const TCHAR *, const TCHAR *, UINT uUnique, WCHAR *)) GetTempFileNameA, (DWORD (WINAPI *)(DWORD, WCHAR *)) GetTempPathA, - (BOOL (WINAPI *)(CONST TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, + (BOOL (WINAPI *)(const TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, WCHAR *, DWORD)) GetVolumeInformationA, - (HINSTANCE (WINAPI *)(CONST TCHAR *)) LoadLibraryA, - (TCHAR (WINAPI *)(WCHAR *, CONST TCHAR *)) lstrcpyA, - (BOOL (WINAPI *)(CONST TCHAR *, CONST TCHAR *)) MoveFileA, - (BOOL (WINAPI *)(CONST TCHAR *)) RemoveDirectoryA, - (DWORD (WINAPI *)(CONST TCHAR *, CONST TCHAR *, CONST TCHAR *, DWORD, + (HINSTANCE (WINAPI *)(const TCHAR *)) LoadLibraryA, + (TCHAR (WINAPI *)(WCHAR *, const TCHAR *)) lstrcpyA, + (BOOL (WINAPI *)(const TCHAR *, const TCHAR *)) MoveFileA, + (BOOL (WINAPI *)(const TCHAR *)) RemoveDirectoryA, + (DWORD (WINAPI *)(const TCHAR *, const TCHAR *, const TCHAR *, DWORD, WCHAR *, TCHAR **)) SearchPathA, - (BOOL (WINAPI *)(CONST TCHAR *)) SetCurrentDirectoryA, - (BOOL (WINAPI *)(CONST TCHAR *, DWORD)) SetFileAttributesA, + (BOOL (WINAPI *)(const TCHAR *)) SetCurrentDirectoryA, + (BOOL (WINAPI *)(const TCHAR *, DWORD)) SetFileAttributesA, /* * The three NULL function pointers will only be set when @@ -125,7 +125,7 @@ static TclWinProcs asciiProcs = { NULL, NULL, - /* deleted (int (__cdecl*)(CONST TCHAR *, struct _utimbuf *)) _utime, */ + /* deleted (int (__cdecl*)(const TCHAR *, struct _utimbuf *)) _utime, */ NULL, NULL, /* getLongPathNameProc */ @@ -134,44 +134,44 @@ static TclWinProcs asciiProcs = { NULL, NULL, NULL, NULL, NULL, NULL, /* ReadConsole and WriteConsole */ (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsoleA, - (BOOL (WINAPI *)(HANDLE, const VOID*, DWORD, LPDWORD, LPVOID)) WriteConsoleA + (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleA }; static TclWinProcs unicodeProcs = { 1, - (BOOL (WINAPI *)(CONST TCHAR *, LPDCB)) BuildCommDCBW, + (BOOL (WINAPI *)(const TCHAR *, LPDCB)) BuildCommDCBW, (TCHAR *(WINAPI *)(TCHAR *)) CharLowerW, - (BOOL (WINAPI *)(CONST TCHAR *, CONST TCHAR *, BOOL)) CopyFileW, - (BOOL (WINAPI *)(CONST TCHAR *, LPSECURITY_ATTRIBUTES)) CreateDirectoryW, - (HANDLE (WINAPI *)(CONST TCHAR *, DWORD, DWORD, SECURITY_ATTRIBUTES *, + (BOOL (WINAPI *)(const TCHAR *, const TCHAR *, BOOL)) CopyFileW, + (BOOL (WINAPI *)(const TCHAR *, LPSECURITY_ATTRIBUTES)) CreateDirectoryW, + (HANDLE (WINAPI *)(const TCHAR *, DWORD, DWORD, SECURITY_ATTRIBUTES *, DWORD, DWORD, HANDLE)) CreateFileW, - (BOOL (WINAPI *)(CONST TCHAR *, TCHAR *, LPSECURITY_ATTRIBUTES, - LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, CONST TCHAR *, + (BOOL (WINAPI *)(const TCHAR *, TCHAR *, LPSECURITY_ATTRIBUTES, + LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, const TCHAR *, LPSTARTUPINFOA, LPPROCESS_INFORMATION)) CreateProcessW, - (BOOL (WINAPI *)(CONST TCHAR *)) DeleteFileW, - (HANDLE (WINAPI *)(CONST TCHAR *, WIN32_FIND_DATAT *)) FindFirstFileW, + (BOOL (WINAPI *)(const TCHAR *)) DeleteFileW, + (HANDLE (WINAPI *)(const TCHAR *, WIN32_FIND_DATAT *)) FindFirstFileW, (BOOL (WINAPI *)(HANDLE, WIN32_FIND_DATAT *)) FindNextFileW, (BOOL (WINAPI *)(WCHAR *, LPDWORD)) GetComputerNameW, (DWORD (WINAPI *)(DWORD, WCHAR *)) GetCurrentDirectoryW, - (DWORD (WINAPI *)(CONST TCHAR *)) GetFileAttributesW, - (DWORD (WINAPI *)(CONST TCHAR *, DWORD nBufferLength, WCHAR *, + (DWORD (WINAPI *)(const TCHAR *)) GetFileAttributesW, + (DWORD (WINAPI *)(const TCHAR *, DWORD nBufferLength, WCHAR *, TCHAR **)) GetFullPathNameW, (DWORD (WINAPI *)(HMODULE, WCHAR *, int)) GetModuleFileNameW, - (DWORD (WINAPI *)(CONST TCHAR *, WCHAR *, DWORD)) GetShortPathNameW, - (UINT (WINAPI *)(CONST TCHAR *, CONST TCHAR *, UINT uUnique, + (DWORD (WINAPI *)(const TCHAR *, WCHAR *, DWORD)) GetShortPathNameW, + (UINT (WINAPI *)(const TCHAR *, const TCHAR *, UINT uUnique, WCHAR *)) GetTempFileNameW, (DWORD (WINAPI *)(DWORD, WCHAR *)) GetTempPathW, - (BOOL (WINAPI *)(CONST TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, + (BOOL (WINAPI *)(const TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, WCHAR *, DWORD)) GetVolumeInformationW, - (HINSTANCE (WINAPI *)(CONST TCHAR *)) LoadLibraryW, - (TCHAR (WINAPI *)(WCHAR *, CONST TCHAR *)) lstrcpyW, - (BOOL (WINAPI *)(CONST TCHAR *, CONST TCHAR *)) MoveFileW, - (BOOL (WINAPI *)(CONST TCHAR *)) RemoveDirectoryW, - (DWORD (WINAPI *)(CONST TCHAR *, CONST TCHAR *, CONST TCHAR *, DWORD, + (HINSTANCE (WINAPI *)(const TCHAR *)) LoadLibraryW, + (TCHAR (WINAPI *)(WCHAR *, const TCHAR *)) lstrcpyW, + (BOOL (WINAPI *)(const TCHAR *, const TCHAR *)) MoveFileW, + (BOOL (WINAPI *)(const TCHAR *)) RemoveDirectoryW, + (DWORD (WINAPI *)(const TCHAR *, const TCHAR *, const TCHAR *, DWORD, WCHAR *, TCHAR **)) SearchPathW, - (BOOL (WINAPI *)(CONST TCHAR *)) SetCurrentDirectoryW, - (BOOL (WINAPI *)(CONST TCHAR *, DWORD)) SetFileAttributesW, + (BOOL (WINAPI *)(const TCHAR *)) SetCurrentDirectoryW, + (BOOL (WINAPI *)(const TCHAR *, DWORD)) SetFileAttributesW, /* * The three NULL function pointers will only be set when @@ -183,7 +183,7 @@ static TclWinProcs unicodeProcs = { NULL, NULL, - /* deleted (int (__cdecl*)(CONST TCHAR *, struct _utimbuf *)) _wutime, */ + /* deleted (int (__cdecl*)(const TCHAR *, struct _utimbuf *)) _wutime, */ NULL, NULL, /* getLongPathNameProc */ @@ -192,7 +192,7 @@ static TclWinProcs unicodeProcs = { NULL, NULL, NULL, NULL, NULL, NULL, /* ReadConsole and WriteConsole */ (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsoleW, - (BOOL (WINAPI *)(HANDLE, const VOID*, DWORD, LPDWORD, LPVOID)) WriteConsoleW + (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleW }; TclWinProcs *tclWinProcs; @@ -223,7 +223,7 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, */ typedef struct MountPointMap { - CONST WCHAR *volumeName; /* Native wide string volume name. */ + const WCHAR *volumeName; /* Native wide string volume name. */ char driveLetter; /* Drive letter corresponding to the volume * name. */ struct MountPointMap *nextPtr; @@ -526,11 +526,11 @@ TclWinNoBackslash( * * TclpGetStackParams -- * - * Determine the stack params for the current thread: in which - * direction does the stack grow, and what is the stack lower (resp. - * upper) bound for safe invocation of a new command? This is used to - * cache the values needed for an efficient computation of - * TclpCheckStackSpace() when the interp is known. + * Determine the stack params for the current thread: in which direction + * does the stack grow, and what is the stack lower (resp. upper) bound + * for safe invocation of a new command? This is used to cache the values + * needed for an efficient computation of TclpCheckStackSpace() when the + * interp is known. * * Results: * Returns 1 if the stack grows down, in which case a stack lower bound @@ -547,56 +547,51 @@ TclpGetCStackParams( int **stackBoundPtr) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - SYSTEM_INFO si; /* The system information, used to - * determine the page size */ + SYSTEM_INFO si; /* The system information, used to determine + * the page size. */ MEMORY_BASIC_INFORMATION mbi; - /* The information about the memory - * area in which the stack resides */ + /* The information about the memory area in + * which the stack resides. */ if (!tsdPtr->stackBound - || ((UINT_PTR)&tsdPtr < (UINT_PTR)tsdPtr->stackBound)) { - + || ((UINT_PTR)&tsdPtr < (UINT_PTR)tsdPtr->stackBound)) { /* - * Either we haven't determined the stack bound in this thread, - * or else we've overflowed the bound that we previously - * determined. We need to find a new stack bound from - * Windows. + * Either we haven't determined the stack bound in this thread, or + * else we've overflowed the bound that we previously determined. We + * need to find a new stack bound from Windows. */ GetSystemInfo(&si); if (VirtualQuery((LPCVOID) &tsdPtr, &mbi, sizeof(mbi)) == 0) { - - /* For some reason, the system didn't let us query the - * stack size. Nevertheless, we got here and haven't - * blown up yet. Don't update the calculated stack bound. - * If there is no calculated stack bound yet, set it to - * the base of the current page of stack. */ + /* + * For some reason, the system didn't let us query the stack size. + * Nevertheless, we got here and haven't blown up yet. Don't + * update the calculated stack bound. If there is no calculated + * stack bound yet, set it to the base of the current page of + * stack. + */ if (!tsdPtr->stackBound) { - tsdPtr->stackBound = - (int*) ((UINT_PTR)(&tsdPtr) - & ~ (UINT_PTR)(si.dwPageSize - 1)); + tsdPtr->stackBound = (int *) + ((UINT_PTR)(&tsdPtr) & ~ (UINT_PTR)(si.dwPageSize-1)); } - } else { - - /* The allocation base of the stack segment has to be advanced - * by one page (to allow for the guard page maintained in the - * C runtime) and then by TCL_WIN_STACK_THRESHOLD (to allow - * for the amount of stack that Tcl needs). + /* + * The allocation base of the stack segment has to be advanced by + * one page (to allow for the guard page maintained in the C + * runtime) and then by TCL_WIN_STACK_THRESHOLD (to allow for the + * amount of stack that Tcl needs). */ - tsdPtr->stackBound = - (int*) ((UINT_PTR)(mbi.AllocationBase) - + (UINT_PTR)(si.dwPageSize) - + TCL_WIN_STACK_THRESHOLD); + tsdPtr->stackBound = (int *) + ((UINT_PTR)(mbi.AllocationBase) + + (UINT_PTR)(si.dwPageSize) + TCL_WIN_STACK_THRESHOLD); } } *stackBoundPtr = tsdPtr->stackBound; return 1; } #endif - /* *--------------------------------------------------------------------------- @@ -633,25 +628,26 @@ TclWinSetInterfaces( tclWinTCharEncoding = Tcl_GetEncoding(NULL, "unicode"); if (tclWinProcs->getFileAttributesExProc == NULL) { HINSTANCE hInstance = LoadLibraryA("kernel32"); + if (hInstance != NULL) { tclWinProcs->getFileAttributesExProc = - (BOOL (WINAPI *)(CONST TCHAR *, GET_FILEEX_INFO_LEVELS, + (BOOL (WINAPI *)(const TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID)) GetProcAddress(hInstance, "GetFileAttributesExW"); tclWinProcs->createHardLinkProc = - (BOOL (WINAPI *)(CONST TCHAR *, CONST TCHAR*, + (BOOL (WINAPI *)(const TCHAR *, const TCHAR*, LPSECURITY_ATTRIBUTES)) GetProcAddress(hInstance, "CreateHardLinkW"); tclWinProcs->findFirstFileExProc = - (HANDLE (WINAPI *)(CONST TCHAR*, UINT, LPVOID, UINT, + (HANDLE (WINAPI *)(const TCHAR*, UINT, LPVOID, UINT, LPVOID, DWORD)) GetProcAddress(hInstance, "FindFirstFileExW"); tclWinProcs->getVolumeNameForVMPProc = - (BOOL (WINAPI *)(CONST TCHAR*, TCHAR*, + (BOOL (WINAPI *)(const TCHAR*, TCHAR*, DWORD)) GetProcAddress(hInstance, "GetVolumeNameForVolumeMountPointW"); tclWinProcs->getLongPathNameProc = - (DWORD (WINAPI *)(CONST TCHAR*, TCHAR*, + (DWORD (WINAPI *)(const TCHAR*, TCHAR*, DWORD)) GetProcAddress(hInstance, "GetLongPathNameW"); FreeLibrary(hInstance); } @@ -672,7 +668,7 @@ TclWinSetInterfaces( GetProcAddress(hInstance, "OpenThreadToken"); tclWinProcs->revertToSelfProc = (BOOL (WINAPI *) (void)) GetProcAddress(hInstance, "RevertToSelf"); - tclWinProcs->mapGenericMaskProc = (VOID (WINAPI *) ( + tclWinProcs->mapGenericMaskProc = (void (WINAPI *) ( PDWORD AccessMask, PGENERIC_MAPPING GenericMapping)) GetProcAddress(hInstance, "MapGenericMask"); tclWinProcs->accessCheckProc = (BOOL (WINAPI *)( @@ -693,11 +689,11 @@ TclWinSetInterfaces( HINSTANCE hInstance = LoadLibraryA("kernel32"); if (hInstance != NULL) { tclWinProcs->getFileAttributesExProc = - (BOOL (WINAPI *)(CONST TCHAR *, GET_FILEEX_INFO_LEVELS, + (BOOL (WINAPI *)(const TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID)) GetProcAddress(hInstance, "GetFileAttributesExA"); tclWinProcs->createHardLinkProc = - (BOOL (WINAPI *)(CONST TCHAR *, CONST TCHAR*, + (BOOL (WINAPI *)(const TCHAR *, const TCHAR*, LPSECURITY_ATTRIBUTES)) GetProcAddress(hInstance, "CreateHardLinkA"); tclWinProcs->findFirstFileExProc = NULL; @@ -709,12 +705,12 @@ TclWinSetInterfaces( * code will fall back on a slower approach using the normal * findFirstFileProc. * - * (HANDLE (WINAPI *)(CONST TCHAR*, UINT, + * (HANDLE (WINAPI *)(const TCHAR*, UINT, * LPVOID, UINT, LPVOID, DWORD)) GetProcAddress(hInstance, * "FindFirstFileExA"); */ tclWinProcs->getVolumeNameForVMPProc = - (BOOL (WINAPI *)(CONST TCHAR*, TCHAR*, + (BOOL (WINAPI *)(const TCHAR*, TCHAR*, DWORD)) GetProcAddress(hInstance, "GetVolumeNameForVolumeMountPointA"); FreeLibrary(hInstance); @@ -749,6 +745,7 @@ void TclWinResetInterfaceEncodings(void) { MountPointMap *dlIter, *dlIter2; + if (tclWinTCharEncoding != NULL) { Tcl_FreeEncoding(tclWinTCharEncoding); tclWinTCharEncoding = NULL; @@ -762,8 +759,8 @@ TclWinResetInterfaceEncodings(void) dlIter = driveLetterLookup; while (dlIter != NULL) { dlIter2 = dlIter->nextPtr; - ckfree((char*)dlIter->volumeName); - ckfree((char*)dlIter); + ckfree((char *) dlIter->volumeName); + ckfree((char *) dlIter); dlIter = dlIter2; } Tcl_MutexUnlock(&mountPointMap); @@ -816,7 +813,7 @@ TclWinResetInterfaces(void) char TclWinDriveLetterForVolMountPoint( - CONST WCHAR *mountPoint) + const WCHAR *mountPoint) { MountPointMap *dlIter, *dlPtr2; WCHAR Target[55]; /* Target of mount at mount point */ @@ -844,9 +841,9 @@ TclWinDriveLetterForVolMountPoint( * Try to read the volume mount point and see where it points. */ - if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR*)drive, - (TCHAR*)Target, 55) != 0) { - if (wcscmp((WCHAR*)dlIter->volumeName, Target) == 0) { + if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR *) drive, + (TCHAR *) Target, 55) != 0) { + if (wcscmp((WCHAR *) dlIter->volumeName, Target) == 0) { /* * Nothing has changed. */ @@ -879,8 +876,8 @@ TclWinDriveLetterForVolMountPoint( * Now dlPtr2 points to the structure to free. */ - ckfree((char*)dlPtr2->volumeName); - ckfree((char*)dlPtr2); + ckfree((char *) dlPtr2->volumeName); + ckfree((char *) dlPtr2); /* * Restart the loop - we could try to be clever and continue half @@ -903,13 +900,13 @@ TclWinDriveLetterForVolMountPoint( * Try to read the volume mount point and see where it points. */ - if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR*)drive, - (TCHAR*)Target, 55) != 0) { + if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR *) drive, + (TCHAR *) Target, 55) != 0) { int alreadyStored = 0; for (dlIter = driveLetterLookup; dlIter != NULL; dlIter = dlIter->nextPtr) { - if (wcscmp((WCHAR*)dlIter->volumeName, Target) == 0) { + if (wcscmp((WCHAR *) dlIter->volumeName, Target) == 0) { alreadyStored = 1; break; } @@ -919,7 +916,7 @@ TclWinDriveLetterForVolMountPoint( dlPtr2->volumeName = TclNativeDupInternalRep(Target); dlPtr2->driveLetter = 'A' + (drive[0] - L'A'); dlPtr2->nextPtr = driveLetterLookup; - driveLetterLookup = dlPtr2; + driveLetterLookup = dlPtr2; } } } @@ -941,11 +938,11 @@ TclWinDriveLetterForVolMountPoint( * that fact and store '-1' so we don't have to look it up each time. */ - dlPtr2 = (MountPointMap*) ckalloc(sizeof(MountPointMap)); - dlPtr2->volumeName = TclNativeDupInternalRep((ClientData)mountPoint); + dlPtr2 = (MountPointMap *) ckalloc(sizeof(MountPointMap)); + dlPtr2->volumeName = TclNativeDupInternalRep((ClientData) mountPoint); dlPtr2->driveLetter = -1; dlPtr2->nextPtr = driveLetterLookup; - driveLetterLookup = dlPtr2; + driveLetterLookup = dlPtr2; Tcl_MutexUnlock(&mountPointMap); return -1; } @@ -1002,7 +999,7 @@ TclWinDriveLetterForVolMountPoint( TCHAR * Tcl_WinUtfToTChar( - CONST char *string, /* Source string in UTF-8. */ + const char *string, /* Source string in UTF-8. */ int len, /* Source string length in bytes, or < 0 for * strlen(). */ Tcl_DString *dsPtr) /* Uninitialized or free DString in which the @@ -1014,7 +1011,7 @@ Tcl_WinUtfToTChar( char * Tcl_WinTCharToUtf( - CONST TCHAR *string, /* Source string in Unicode when running NT, + const TCHAR *string, /* Source string in Unicode when running NT, * ANSI when running 95. */ int len, /* Source string length in bytes, or < 0 for * platform-specific string length. */ @@ -1022,7 +1019,7 @@ Tcl_WinTCharToUtf( * converted string is stored. */ { return Tcl_ExternalToUtfDString(tclWinTCharEncoding, - (CONST char *) string, len, dsPtr); + (const char *) string, len, dsPtr); } /* diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 6c74b6c..98a529a 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.49 2007/04/16 13:36:36 dkf Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.50 2008/04/27 22:21:36 dkf Exp $ */ #include "tclWinInt.h" @@ -85,7 +85,7 @@ static ThreadSpecificData *FileInit(void); static int FileInputProc(ClientData instanceData, char *buf, int toRead, int *errorCode); static int FileOutputProc(ClientData instanceData, - CONST char *buf, int toWrite, int *errorCode); + const char *buf, int toWrite, int *errorCode); static int FileSeekProc(ClientData instanceData, long offset, int mode, int *errorCode); static Tcl_WideInt FileWideSeekProc(ClientData instanceData, @@ -130,11 +130,11 @@ static Tcl_ChannelType fileChannelType = { */ typedef struct EXCEPTION_REGISTRATION { - struct EXCEPTION_REGISTRATION* link; + struct EXCEPTION_REGISTRATION *link; EXCEPTION_DISPOSITION (*handler)( struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*); - void* ebp; - void* esp; + void *ebp; + void *esp; int status; } EXCEPTION_REGISTRATION; #endif @@ -359,7 +359,7 @@ FileBlockProc( int mode) /* TCL_MODE_BLOCKING or * TCL_MODE_NONBLOCKING. */ { - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; /* * Files on Windows can not be switched between blocking and nonblocking, @@ -397,7 +397,7 @@ FileCloseProc( ClientData instanceData, /* Pointer to FileInfo structure. */ Tcl_Interp *interp) /* Not used. */ { - FileInfo *fileInfoPtr = (FileInfo *) instanceData; + FileInfo *fileInfoPtr = instanceData; FileInfo *infoPtr; ThreadSpecificData *tsdPtr; int errorCode = 0; @@ -472,7 +472,7 @@ FileSeekProc( int mode, /* Relative to where should we seek? */ int *errorCodePtr) /* To store error code. */ { - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; LONG newPos, newPosHigh, oldPos, oldPosHigh; DWORD moveMethod; @@ -550,7 +550,7 @@ FileWideSeekProc( int mode, /* Relative to where should we seek? */ int *errorCodePtr) /* To store error code. */ { - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; DWORD moveMethod; LONG newPos, newPosHigh; @@ -599,7 +599,7 @@ FileTruncateProc( ClientData instanceData, /* File state. */ Tcl_WideInt length) /* Length to truncate at. */ { - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; LONG newPos, newPosHigh, oldPos, oldPosHigh; /* @@ -675,11 +675,10 @@ FileInputProc( int bufSize, /* Num bytes available in buffer. */ int *errorCode) /* Where to store error code. */ { - FileInfo *infoPtr; + FileInfo *infoPtr = instanceData; DWORD bytesRead; *errorCode = 0; - infoPtr = (FileInfo *) instanceData; /* * Note that we will block on reads from a console buffer until a full @@ -723,11 +722,11 @@ FileInputProc( static int FileOutputProc( ClientData instanceData, /* File state. */ - CONST char *buf, /* The data buffer. */ + const char *buf, /* The data buffer. */ int toWrite, /* How many bytes to write? */ int *errorCode) /* Where to store error code. */ { - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; DWORD bytesWritten; *errorCode = 0; @@ -774,7 +773,7 @@ FileWatchProc( * of TCL_READABLE, TCL_WRITABLE and * TCL_EXCEPTION. */ { - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; Tcl_Time blockTime = { 0, 0 }; /* @@ -812,7 +811,7 @@ FileGetHandleProc( int direction, /* TCL_READABLE or TCL_WRITABLE */ ClientData *handlePtr) /* Where to store the handle. */ { - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; if (direction & infoPtr->validMask) { *handlePtr = (ClientData) infoPtr->handle; @@ -852,12 +851,12 @@ TclpOpenFileChannel( Tcl_Channel channel = 0; int channelPermissions = 0; DWORD accessMode = 0, createMode, shareMode, flags; - CONST TCHAR *nativeName; + const TCHAR *nativeName; HANDLE handle; char channelName[16 + TCL_INTEGER_SPACE]; TclFile readFile = NULL, writeFile = NULL; - nativeName = (TCHAR*) Tcl_FSGetNativePath(pathPtr); + nativeName = (TCHAR *) Tcl_FSGetNativePath(pathPtr); if (nativeName == NULL) { return NULL; } @@ -1339,7 +1338,7 @@ TclWinOpenFileChannel( wsprintfA(channelName, "file%lx", (int) infoPtr); infoPtr->channel = Tcl_CreateChannel(&fileChannelType, channelName, - (ClientData) infoPtr, permissions); + infoPtr, permissions); /* * Files have default translation of AUTO and ^Z eof char, which means @@ -1413,7 +1412,7 @@ FileThreadActionProc( int action) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - FileInfo *infoPtr = (FileInfo *) instanceData; + FileInfo *infoPtr = instanceData; if (action == TCL_CHANNEL_THREAD_INSERT) { infoPtr->nextPtr = tsdPtr->firstFilePtr; diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 1480199..d88b285 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinConsole.c,v 1.19 2006/03/27 18:08:51 andreas_kupries Exp $ + * RCS: @(#) $Id: tclWinConsole.c,v 1.20 2008/04/27 22:21:36 dkf Exp $ */ #include "tclWinInt.h" @@ -148,7 +148,7 @@ static void ConsoleInit(void); static int ConsoleInputProc(ClientData instanceData, char *buf, int toRead, int *errorCode); static int ConsoleOutputProc(ClientData instanceData, - CONST char *buf, int toWrite, int *errorCode); + const char *buf, int toWrite, int *errorCode); static DWORD WINAPI ConsoleReaderThread(LPVOID arg); static void ConsoleSetupProc(ClientData clientData, int flags); static void ConsoleWatchProc(ClientData instanceData, int mask); @@ -211,7 +211,7 @@ readConsoleBytes( static BOOL writeConsoleBytes( HANDLE hConsole, - const VOID *lpBuffer, + const void *lpBuffer, DWORD nbytes, LPDWORD nbyteswritten) { @@ -772,7 +772,7 @@ ConsoleInputProc( static int ConsoleOutputProc( ClientData instanceData, /* Console state. */ - CONST char *buf, /* The data buffer. */ + const char *buf, /* The data buffer. */ int toWrite, /* How many bytes to write? */ int *errorCode) /* Where to store error code. */ { diff --git a/win/tclWinDde.c b/win/tclWinDde.c index bcd086e..1622686 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.31 2006/09/26 00:05:03 patthoyts Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.32 2008/04/27 22:21:36 dkf Exp $ */ #include "tclInt.h" @@ -113,7 +113,7 @@ static void SetDdeError(Tcl_Interp *interp); int Tcl_DdeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); EXTERN int Dde_Init(Tcl_Interp *interp); EXTERN int Dde_SafeInit(Tcl_Interp *interp); @@ -1141,9 +1141,9 @@ Tcl_DdeObjCmd( ClientData clientData, /* Used only for deletion */ Tcl_Interp *interp, /* The interp we are sending from */ int objc, /* Number of arguments */ - Tcl_Obj *CONST * objv) /* The arguments */ + Tcl_Obj *const * objv) /* The arguments */ { - static CONST char *ddeCommands[] = { + static const char *ddeCommands[] = { "servername", "execute", "poke", "request", "services", "eval", (char *) NULL }; @@ -1151,16 +1151,16 @@ Tcl_DdeObjCmd( DDE_SERVERNAME, DDE_EXECUTE, DDE_POKE, DDE_REQUEST, DDE_SERVICES, DDE_EVAL }; - static CONST char *ddeSrvOptions[] = { + static const char *ddeSrvOptions[] = { "-force", "-handler", "--", NULL }; enum DdeSrvOptions { DDE_SERVERNAME_EXACT, DDE_SERVERNAME_HANDLER, DDE_SERVERNAME_LAST, }; - static CONST char *ddeExecOptions[] = { + static const char *ddeExecOptions[] = { "-async", NULL }; - static CONST char *ddeReqOptions[] = { + static const char *ddeReqOptions[] = { "-binary", NULL }; diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index c940620..73fb8a1 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.52 2006/08/29 00:36:57 coldstore Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.53 2008/04/27 22:21:36 dkf Exp $ */ #include "tclWinInt.h" @@ -56,12 +56,12 @@ static int attributeArray[] = {FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN, 0, FILE_ATTRIBUTE_READONLY, 0, FILE_ATTRIBUTE_SYSTEM}; -CONST char *tclpFileAttrStrings[] = { +const char *tclpFileAttrStrings[] = { "-archive", "-hidden", "-longname", "-readonly", "-shortname", "-system", (char *) NULL }; -CONST TclFileAttrProcs tclpFileAttrProcs[] = { +const TclFileAttrProcs tclpFileAttrProcs[] = { {GetWinFileAttributes, SetWinFileAttributes}, {GetWinFileAttributes, SetWinFileAttributes}, {GetWinFileLongName, CannotSetAttribute}, @@ -92,7 +92,7 @@ typedef struct EXCEPTION_REGISTRATION { * Prototype for the TraverseWinTree callback function. */ -typedef int (TraversalProc)(CONST TCHAR *srcPtr, CONST TCHAR *dstPtr, +typedef int (TraversalProc)(const TCHAR *srcPtr, const TCHAR *dstPtr, int type, Tcl_DString *errorPtr); /* @@ -103,18 +103,18 @@ static void StatError(Tcl_Interp *interp, Tcl_Obj *fileName); static int ConvertFileNameFormat(Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, int longShort, Tcl_Obj **attributePtrPtr); -static int DoCopyFile(CONST TCHAR *srcPtr, CONST TCHAR *dstPtr); -static int DoCreateDirectory(CONST TCHAR *pathPtr); -static int DoRemoveJustDirectory(CONST TCHAR *nativeSrc, +static int DoCopyFile(const TCHAR *srcPtr, const TCHAR *dstPtr); +static int DoCreateDirectory(const TCHAR *pathPtr); +static int DoRemoveJustDirectory(const TCHAR *nativeSrc, int ignoreError, Tcl_DString *errorPtr); static int DoRemoveDirectory(Tcl_DString *pathPtr, int recursive, Tcl_DString *errorPtr); -static int DoRenameFile(CONST TCHAR *nativeSrc, - CONST TCHAR *dstPtr); -static int TraversalCopy(CONST TCHAR *srcPtr, CONST TCHAR *dstPtr, +static int DoRenameFile(const TCHAR *nativeSrc, + const TCHAR *dstPtr); +static int TraversalCopy(const TCHAR *srcPtr, const TCHAR *dstPtr, int type, Tcl_DString *errorPtr); -static int TraversalDelete(CONST TCHAR *srcPtr, - CONST TCHAR *dstPtr, int type, +static int TraversalDelete(const TCHAR *srcPtr, + const TCHAR *dstPtr, int type, Tcl_DString *errorPtr); static int TraverseWinTree(TraversalProc *traverseProc, Tcl_DString *sourcePtr, Tcl_DString *dstPtr, @@ -172,9 +172,9 @@ TclpObjRenameFile( static int DoRenameFile( - CONST TCHAR *nativeSrc, /* Pathname of file or dir to be renamed + const TCHAR *nativeSrc, /* Pathname of file or dir to be renamed * (native). */ - CONST TCHAR *nativeDst) /* New pathname for file or directory + const TCHAR *nativeDst) /* New pathname for file or directory * (native). */ { #ifdef HAVE_NO_SEH @@ -326,12 +326,12 @@ DoRenameFile( decode: if (srcAttr & FILE_ATTRIBUTE_DIRECTORY) { TCHAR *nativeSrcRest, *nativeDstRest; - CONST char **srcArgv, **dstArgv; + const char **srcArgv, **dstArgv; int size, srcArgc, dstArgc; WCHAR nativeSrcPath[MAX_PATH]; WCHAR nativeDstPath[MAX_PATH]; Tcl_DString srcString, dstString; - CONST char *src, *dst; + const char *src, *dst; size = (*tclWinProcs->getFullPathNameProc)(nativeSrc, MAX_PATH, nativeSrcPath, &nativeSrcRest); @@ -563,8 +563,8 @@ TclpObjCopyFile( static int DoCopyFile( - CONST TCHAR *nativeSrc, /* Pathname of file to be copied (native). */ - CONST TCHAR *nativeDst) /* Pathname of file to copy to (native). */ + const TCHAR *nativeSrc, /* Pathname of file to be copied (native). */ + const TCHAR *nativeDst) /* Pathname of file to copy to (native). */ { #ifdef HAVE_NO_SEH EXCEPTION_REGISTRATION registration; @@ -766,7 +766,7 @@ TclpObjDeleteFile( int TclpDeleteFile( - CONST TCHAR *nativePath) /* Pathname of file to be removed (native). */ + const TCHAR *nativePath) /* Pathname of file to be removed (native). */ { DWORD attr; @@ -878,7 +878,7 @@ TclpObjCreateDirectory( static int DoCreateDirectory( - CONST TCHAR *nativePath) /* Pathname of directory to create (native). */ + const TCHAR *nativePath) /* Pathname of directory to create (native). */ { DWORD error; if ((*tclWinProcs->createDirectoryProc)(nativePath, NULL) == 0) { @@ -1029,7 +1029,7 @@ TclpObjRemoveDirectory( static int DoRemoveJustDirectory( - CONST TCHAR *nativePath, /* Pathname of directory to be removed + const TCHAR *nativePath, /* Pathname of directory to be removed * (native). */ int ignoreError, /* If non-zero, don't initialize the errorPtr * under some circumstances on return. */ @@ -1114,13 +1114,13 @@ DoRemoveJustDirectory( */ if (TclWinGetPlatformId() != VER_PLATFORM_WIN32_NT) { - CONST char *path, *find; + const char *path, *find; HANDLE handle; WIN32_FIND_DATAA data; Tcl_DString buffer; int len; - path = (CONST char *) nativePath; + path = (const char *) nativePath; Tcl_DStringInit(&buffer); len = strlen(path); @@ -1436,8 +1436,8 @@ TraverseWinTree( static int TraversalCopy( - CONST TCHAR *nativeSrc, /* Source pathname to copy. */ - CONST TCHAR *nativeDst, /* Destination pathname of copy. */ + const TCHAR *nativeSrc, /* Source pathname to copy. */ + const TCHAR *nativeDst, /* Destination pathname of copy. */ int type, /* Reason for call - see TraverseWinTree() */ Tcl_DString *errorPtr) /* If non-NULL, initialized DString filled * with UTF-8 name of file causing error. */ @@ -1502,8 +1502,8 @@ TraversalCopy( static int TraversalDelete( - CONST TCHAR *nativeSrc, /* Source pathname to delete. */ - CONST TCHAR *dstPtr, /* Not used. */ + const TCHAR *nativeSrc, /* Source pathname to delete. */ + const TCHAR *dstPtr, /* Not used. */ int type, /* Reason for call - see TraverseWinTree() */ Tcl_DString *errorPtr) /* If non-NULL, initialized DString filled * with UTF-8 name of file causing error. */ @@ -1589,7 +1589,7 @@ GetWinFileAttributes( Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */ { DWORD result; - CONST TCHAR *nativeName; + const TCHAR *nativeName; int attr; nativeName = Tcl_FSGetNativePath(fileName); @@ -1928,9 +1928,8 @@ SetWinFileAttributes( Tcl_Obj *attributePtr) /* The new value of the attribute. */ { DWORD fileAttributes; - int yesNo; - int result; - CONST TCHAR *nativeName; + int yesNo, result; + const TCHAR *nativeName; nativeName = Tcl_FSGetNativePath(fileName); fileAttributes = (*tclWinProcs->getFileAttributesProc)(nativeName); @@ -1984,8 +1983,7 @@ CannotSetAttribute( { Tcl_AppendResult(interp, "cannot set attribute \"", tclpFileAttrStrings[objIndex], "\" for file \"", - Tcl_GetString(fileName), "\": attribute is readonly", - (char *) NULL); + Tcl_GetString(fileName), "\": attribute is readonly", NULL); return TCL_ERROR; } @@ -2006,7 +2004,7 @@ CannotSetAttribute( *--------------------------------------------------------------------------- */ -Tcl_Obj* +Tcl_Obj * TclpObjListVolumes(void) { Tcl_Obj *resultPtr, *elemPtr; diff --git a/win/tclWinInit.c b/win/tclWinInit.c index f0c2a9e..4d25ec8 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.75 2007/12/13 15:28:44 dgp Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.76 2008/04/27 22:21:36 dkf Exp $ */ #include "tclWinInt.h" @@ -85,12 +85,12 @@ typedef struct { #define NUMPLATFORMS 4 -static char* platforms[NUMPLATFORMS] = { +static char *platforms[NUMPLATFORMS] = { "Win32s", "Windows 95", "Windows NT", "Windows CE" }; #define NUMPROCESSORS 11 -static char* processors[NUMPROCESSORS] = { +static char *processors[NUMPROCESSORS] = { "intel", "mips", "alpha", "ppc", "shx", "arm", "ia64", "alpha64", "msil", "amd64", "ia32_on_win64" }; @@ -103,8 +103,8 @@ static TclInitProcessGlobalValueProc InitializeDefaultLibraryDir; static ProcessGlobalValue defaultLibraryDir = {0, 0, NULL, NULL, InitializeDefaultLibraryDir, NULL, NULL}; -static void AppendEnvironment(Tcl_Obj *listPtr, CONST char *lib); -static int ToUtf(CONST WCHAR *wSrc, char *dst); +static void AppendEnvironment(Tcl_Obj *listPtr, const char *lib); +static int ToUtf(const WCHAR *wSrc, char *dst); /* *--------------------------------------------------------------------------- @@ -237,14 +237,14 @@ TclpInitLibraryPath( static void AppendEnvironment( Tcl_Obj *pathPtr, - CONST char *lib) + const char *lib) { int pathc; WCHAR wBuf[MAX_PATH]; char buf[MAX_PATH * TCL_UTF_MAX]; Tcl_Obj *objPtr; Tcl_DString ds; - CONST char **pathv; + const char **pathv; char *shortlib; /* @@ -290,7 +290,7 @@ AppendEnvironment( */ if ((pathc > 0) && (lstrcmpiA(shortlib, pathv[pathc - 1]) != 0)) { - CONST char *str; + const char *str; /* * TCL_LIBRARY is set but refers to a different tcl installation @@ -380,7 +380,7 @@ InitializeDefaultLibraryDir( static int ToUtf( - CONST WCHAR *wSrc, + const WCHAR *wSrc, char *dst) { char *start; @@ -465,7 +465,7 @@ TclpSetInterfaces(void) TclWinSetInterfaces(useWide); } -CONST char * +const char * Tcl_GetEncodingNameFromEnvironment( Tcl_DString *bufPtr) { @@ -497,7 +497,7 @@ void TclpSetVariables( Tcl_Interp *interp) /* Interp to initialize. */ { - CONST char *ptr; + const char *ptr; char buffer[TCL_INTEGER_SPACE * 2]; SYSTEM_INFO sysInfo, *sysInfoPtr = &sysInfo; OemId *oemId; @@ -608,7 +608,7 @@ TclpSetVariables( int TclpFindVariable( - CONST char *name, /* Name of desired environment variable + const char *name, /* Name of desired environment variable * (UTF-8). */ int *lengthPtr) /* Used to return length of name (for * successful searches) or number of non-NULL @@ -616,7 +616,7 @@ TclpFindVariable( * searches). */ { int i, length, result = -1; - register CONST char *env, *p1, *p2; + register const char *env, *p1, *p2; char *envUpper, *nameUpper; Tcl_DString envString; diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 30bc750..33233bb 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.20 2007/04/20 06:11:00 kennykb Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.21 2008/04/27 22:21:36 dkf Exp $ */ #include "tclWinInt.h" @@ -48,7 +48,7 @@ TclpDlopen( * file. */ { HINSTANCE handle; - CONST TCHAR *nativeName; + const TCHAR *nativeName; /* * First try the full path the user gave us. This is particularly @@ -155,7 +155,7 @@ Tcl_PackageInitProc * TclpFindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, - CONST char *symbol) + const char *symbol) { Tcl_PackageInitProc *proc = NULL; HINSTANCE handle = (HINSTANCE)loadHandle; @@ -230,7 +230,7 @@ TclpUnloadFile( int TclGuessPackageName( - CONST char *fileName, /* Name of file containing package (already + const char *fileName, /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr) /* Initialized empty dstring. Append package * name to this if possible. */ diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 05dbd7d..d5205a4 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.40 2007/05/15 16:12:53 dgp Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.41 2008/04/27 22:21:36 dkf Exp $ */ #include "tclInt.h" @@ -48,7 +48,7 @@ * system predefined keys. */ -static CONST char *rootKeyNames[] = { +static const char *rootKeyNames[] = { "HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CLASSES_ROOT", "HKEY_CURRENT_USER", "HKEY_CURRENT_CONFIG", "HKEY_PERFORMANCE_DATA", "HKEY_DYN_DATA", NULL @@ -59,7 +59,7 @@ static HKEY rootKeys[] = { HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, HKEY_DYN_DATA }; -static CONST char REGISTRY_ASSOC_KEY[] = "registry::command"; +static const char REGISTRY_ASSOC_KEY[] = "registry::command"; /* * The following table maps from registry types to strings. Note that the @@ -67,7 +67,7 @@ static CONST char REGISTRY_ASSOC_KEY[] = "registry::command"; * types so we don't need a separate table to hold the mapping. */ -static CONST char *typeNames[] = { +static const char *typeNames[] = { "none", "sz", "expand_sz", "binary", "dword", "dword_big_endian", "link", "multi_sz", "resource_list", NULL }; @@ -84,25 +84,25 @@ static DWORD lastType = REG_RESOURCE_LIST; typedef struct RegWinProcs { int useWide; - LONG (WINAPI *regConnectRegistryProc)(CONST TCHAR *, HKEY, PHKEY); - LONG (WINAPI *regCreateKeyExProc)(HKEY, CONST TCHAR *, DWORD, TCHAR *, + LONG (WINAPI *regConnectRegistryProc)(const TCHAR *, HKEY, PHKEY); + LONG (WINAPI *regCreateKeyExProc)(HKEY, const TCHAR *, DWORD, TCHAR *, DWORD, REGSAM, SECURITY_ATTRIBUTES *, HKEY *, DWORD *); - LONG (WINAPI *regDeleteKeyProc)(HKEY, CONST TCHAR *); - LONG (WINAPI *regDeleteValueProc)(HKEY, CONST TCHAR *); + LONG (WINAPI *regDeleteKeyProc)(HKEY, const TCHAR *); + LONG (WINAPI *regDeleteValueProc)(HKEY, const TCHAR *); LONG (WINAPI *regEnumKeyProc)(HKEY, DWORD, TCHAR *, DWORD); LONG (WINAPI *regEnumKeyExProc)(HKEY, DWORD, TCHAR *, DWORD *, DWORD *, TCHAR *, DWORD *, FILETIME *); LONG (WINAPI *regEnumValueProc)(HKEY, DWORD, TCHAR *, DWORD *, DWORD *, DWORD *, BYTE *, DWORD *); - LONG (WINAPI *regOpenKeyExProc)(HKEY, CONST TCHAR *, DWORD, REGSAM, + LONG (WINAPI *regOpenKeyExProc)(HKEY, const TCHAR *, DWORD, REGSAM, HKEY *); LONG (WINAPI *regQueryInfoKeyProc)(HKEY, TCHAR *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, FILETIME *); - LONG (WINAPI *regQueryValueExProc)(HKEY, CONST TCHAR *, DWORD *, DWORD *, + LONG (WINAPI *regQueryValueExProc)(HKEY, const TCHAR *, DWORD *, DWORD *, BYTE *, DWORD *); - LONG (WINAPI *regSetValueExProc)(HKEY, CONST TCHAR *, DWORD, DWORD, - CONST BYTE*, DWORD); + LONG (WINAPI *regSetValueExProc)(HKEY, const TCHAR *, DWORD, DWORD, + const BYTE*, DWORD); } RegWinProcs; static RegWinProcs *regWinProcs; @@ -110,51 +110,51 @@ static RegWinProcs *regWinProcs; static RegWinProcs asciiProcs = { 0, - (LONG (WINAPI *)(CONST TCHAR *, HKEY, PHKEY)) RegConnectRegistryA, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD, TCHAR *, + (LONG (WINAPI *)(const TCHAR *, HKEY, PHKEY)) RegConnectRegistryA, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD, TCHAR *, DWORD, REGSAM, SECURITY_ATTRIBUTES *, HKEY *, DWORD *)) RegCreateKeyExA, - (LONG (WINAPI *)(HKEY, CONST TCHAR *)) RegDeleteKeyA, - (LONG (WINAPI *)(HKEY, CONST TCHAR *)) RegDeleteValueA, + (LONG (WINAPI *)(HKEY, const TCHAR *)) RegDeleteKeyA, + (LONG (WINAPI *)(HKEY, const TCHAR *)) RegDeleteValueA, (LONG (WINAPI *)(HKEY, DWORD, TCHAR *, DWORD)) RegEnumKeyA, (LONG (WINAPI *)(HKEY, DWORD, TCHAR *, DWORD *, DWORD *, TCHAR *, DWORD *, FILETIME *)) RegEnumKeyExA, (LONG (WINAPI *)(HKEY, DWORD, TCHAR *, DWORD *, DWORD *, DWORD *, BYTE *, DWORD *)) RegEnumValueA, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD, REGSAM, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD, REGSAM, HKEY *)) RegOpenKeyExA, (LONG (WINAPI *)(HKEY, TCHAR *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, FILETIME *)) RegQueryInfoKeyA, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD *, DWORD *, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD *, DWORD *, BYTE *, DWORD *)) RegQueryValueExA, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD, DWORD, - CONST BYTE*, DWORD)) RegSetValueExA, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD, DWORD, + const BYTE*, DWORD)) RegSetValueExA, }; static RegWinProcs unicodeProcs = { 1, - (LONG (WINAPI *)(CONST TCHAR *, HKEY, PHKEY)) RegConnectRegistryW, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD, TCHAR *, + (LONG (WINAPI *)(const TCHAR *, HKEY, PHKEY)) RegConnectRegistryW, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD, TCHAR *, DWORD, REGSAM, SECURITY_ATTRIBUTES *, HKEY *, DWORD *)) RegCreateKeyExW, - (LONG (WINAPI *)(HKEY, CONST TCHAR *)) RegDeleteKeyW, - (LONG (WINAPI *)(HKEY, CONST TCHAR *)) RegDeleteValueW, + (LONG (WINAPI *)(HKEY, const TCHAR *)) RegDeleteKeyW, + (LONG (WINAPI *)(HKEY, const TCHAR *)) RegDeleteValueW, (LONG (WINAPI *)(HKEY, DWORD, TCHAR *, DWORD)) RegEnumKeyW, (LONG (WINAPI *)(HKEY, DWORD, TCHAR *, DWORD *, DWORD *, TCHAR *, DWORD *, FILETIME *)) RegEnumKeyExW, (LONG (WINAPI *)(HKEY, DWORD, TCHAR *, DWORD *, DWORD *, DWORD *, BYTE *, DWORD *)) RegEnumValueW, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD, REGSAM, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD, REGSAM, HKEY *)) RegOpenKeyExW, (LONG (WINAPI *)(HKEY, TCHAR *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, DWORD *, FILETIME *)) RegQueryInfoKeyW, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD *, DWORD *, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD *, DWORD *, BYTE *, DWORD *)) RegQueryValueExW, - (LONG (WINAPI *)(HKEY, CONST TCHAR *, DWORD, DWORD, - CONST BYTE*, DWORD)) RegSetValueExW, + (LONG (WINAPI *)(HKEY, const TCHAR *, DWORD, DWORD, + const BYTE*, DWORD)) RegSetValueExW, }; @@ -164,7 +164,7 @@ static RegWinProcs unicodeProcs = { static void AppendSystemError(Tcl_Interp *interp, DWORD error); static int BroadcastValue(Tcl_Interp *interp, int objc, - Tcl_Obj * CONST objv[]); + Tcl_Obj *const objv[]); static DWORD ConvertDWORD(DWORD type, DWORD value); static void DeleteCmd(ClientData clientData); static int DeleteKey(Tcl_Interp *interp, Tcl_Obj *keyNameObj); @@ -187,10 +187,10 @@ static int ParseKeyName(Tcl_Interp *interp, char *name, char **hostNamePtr, HKEY *rootKeyPtr, char **keyNamePtr); static DWORD RecursiveDeleteKey(HKEY hStartKey, - CONST TCHAR * pKeyName); + const TCHAR * pKeyName); static int RegistryObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj * CONST objv[]); + Tcl_Obj *const objv[]); static int SetValue(Tcl_Interp *interp, Tcl_Obj *keyNameObj, Tcl_Obj *valueNameObj, Tcl_Obj *dataObj, Tcl_Obj *typeObj); @@ -332,12 +332,12 @@ RegistryObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj * CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { int index; char *errString = NULL; - static CONST char *subcommands[] = { + static const char *subcommands[] = { "broadcast", "delete", "get", "keys", "set", "type", "values", NULL }; enum SubCmdIdx { @@ -440,7 +440,7 @@ DeleteKey( Tcl_Obj *keyNameObj) /* Name of key to delete. */ { char *tail, *buffer, *hostName, *keyName; - CONST char *nativeTail; + const char *nativeTail; HKEY rootKey, subkey; DWORD result; int length; @@ -708,7 +708,7 @@ GetType( DWORD type; Tcl_DString ds; char *valueName; - CONST char *nativeValue; + const char *nativeValue; int length; /* @@ -777,7 +777,7 @@ GetValue( { HKEY key; char *valueName; - CONST char *nativeValue; + const char *nativeValue; DWORD result, length, type; Tcl_DString data, buf; int nameLen; @@ -1223,7 +1223,7 @@ ParseKeyName( static DWORD RecursiveDeleteKey( HKEY startKey, /* Parent of key to be deleted. */ - CONST char *keyName) /* Name of key to be deleted in external + const char *keyName) /* Name of key to be deleted in external * encoding, not UTF. */ { DWORD result, size, maxSize; @@ -1436,7 +1436,7 @@ static int BroadcastValue( Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { LRESULT result, sendResult; UINT timeout = 3000; diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 39c7e05..16a07af 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.36 2008/01/14 00:11:44 hobbs Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.37 2008/04/27 22:21:37 dkf Exp $ */ #include "tclWinInt.h" @@ -179,16 +179,16 @@ static ThreadSpecificData *SerialInit(void); static int SerialInputProc(ClientData instanceData, char *buf, int toRead, int *errorCode); static int SerialOutputProc(ClientData instanceData, - CONST char *buf, int toWrite, int *errorCode); + const char *buf, int toWrite, int *errorCode); static void SerialSetupProc(ClientData clientData, int flags); static void SerialWatchProc(ClientData instanceData, int mask); static void ProcExitHandler(ClientData clientData); static int SerialGetOptionProc(ClientData instanceData, - Tcl_Interp *interp, CONST char *optionName, + Tcl_Interp *interp, const char *optionName, Tcl_DString *dsPtr); static int SerialSetOptionProc(ClientData instanceData, - Tcl_Interp *interp, CONST char *optionName, - CONST char *value); + Tcl_Interp *interp, const char *optionName, + const char *value); static DWORD WINAPI SerialWriterThread(LPVOID arg); static void SerialThreadActionProc(ClientData instanceData, int action); @@ -1002,7 +1002,7 @@ SerialInputProc( static int SerialOutputProc( ClientData instanceData, /* Serial state. */ - CONST char *buf, /* The data buffer. */ + const char *buf, /* The data buffer. */ int toWrite, /* How many bytes to write? */ int *errorCode) /* Where to store error code. */ { @@ -1434,7 +1434,7 @@ SerialWriterThread( HANDLE TclWinSerialReopen( HANDLE handle, - CONST TCHAR *name, + const TCHAR *name, DWORD access) { ThreadSpecificData *tsdPtr; @@ -1651,17 +1651,17 @@ static int SerialSetOptionProc( ClientData instanceData, /* File state. */ Tcl_Interp *interp, /* For error reporting - can be NULL. */ - CONST char *optionName, /* Which option to set? */ - CONST char *value) /* New value for option. */ + const char *optionName, /* Which option to set? */ + const char *value) /* New value for option. */ { SerialInfo *infoPtr; DCB dcb; BOOL result, flag; size_t len, vlen; Tcl_DString ds; - CONST TCHAR *native; + const TCHAR *native; int argc; - CONST char **argv; + const char **argv; infoPtr = (SerialInfo *) instanceData; @@ -2031,7 +2031,7 @@ static int SerialGetOptionProc( ClientData instanceData, /* File state. */ Tcl_Interp *interp, /* For error reporting - can be NULL. */ - CONST char *optionName, /* Option to get. */ + const char *optionName, /* Option to get. */ Tcl_DString *dsPtr) /* Where to store value(s). */ { SerialInfo *infoPtr; diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 650e523..11dcd1a 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.43 2007/03/24 09:33:02 vasiljevic Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.44 2008/04/27 22:21:37 dkf Exp $ */ #include "tclWinInt.h" @@ -889,7 +889,7 @@ TclpFreeAllocMutex( void * TclpGetAllocCache(void) { - VOID *result; + void *result; if (!once) { /* diff --git a/win/tclWinTime.c b/win/tclWinTime.c index c1e2b6e..c185c4c 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.33 2005/11/04 00:06:51 dkf Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.34 2008/04/27 22:21:37 dkf Exp $ */ #include "tclInt.h" @@ -624,7 +624,7 @@ TclpGetTZName( struct tm * TclpGetDate( - CONST time_t *t, + const time_t *t, int useGMT) { struct tm *tmPtr; @@ -1170,7 +1170,7 @@ AccumulateSample( struct tm * TclpGmtime( - CONST time_t *timePtr) /* Pointer to the number of seconds since the + const time_t *timePtr) /* Pointer to the number of seconds since the * local system's epoch */ { /* @@ -1201,9 +1201,8 @@ TclpGmtime( struct tm * TclpLocaltime( - CONST time_t *timePtr) /* Pointer to the number of seconds since the + const time_t *timePtr) /* Pointer to the number of seconds since the * local system's epoch */ - { /* * The MS implementation of localtime is thread safe because it returns -- cgit v0.12 From 1c67385eb956a4983ba5a685b4d6a7594a3cb9b3 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 27 Apr 2008 22:41:47 +0000 Subject: Get rid of pre-C89-isms (esp. CONST vs const). --- unix/dltest/pkga.c | 12 ++++++------ unix/dltest/pkgb.c | 10 +++++----- unix/dltest/pkgc.c | 10 +++++----- unix/dltest/pkgd.c | 10 +++++----- unix/dltest/pkgua.c | 12 ++++++------ 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index 273270a..b76ca02 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkga.c,v 1.12 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: pkga.c,v 1.13 2008/04/27 22:41:47 dkf Exp $ */ #include "tcl.h" @@ -19,9 +19,9 @@ */ static int Pkga_EqObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int Pkga_QuoteObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- @@ -46,10 +46,10 @@ Pkga_EqObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result; - CONST char *str1, *str2; + const char *str1, *str2; int len1, len2; if (objc != 3) { @@ -90,7 +90,7 @@ Pkga_QuoteObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument strings. */ + Tcl_Obj *const objv[]) /* Argument strings. */ { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 084d785..49162ec 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgb.c,v 1.9 2007/12/13 15:28:42 dgp Exp $ + * RCS: @(#) $Id: pkgb.c,v 1.10 2008/04/27 22:41:47 dkf Exp $ */ #include "tcl.h" @@ -20,9 +20,9 @@ */ static int Pkgb_SubObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int Pkgb_UnsafeObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- @@ -46,7 +46,7 @@ Pkgb_SubObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int first, second; @@ -84,7 +84,7 @@ Pkgb_UnsafeObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_SetObjResult(interp, Tcl_NewStringObj("unsafe command invoked", -1)); return TCL_OK; diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index 484396e..a11e524 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgc.c,v 1.9 2007/12/13 15:28:43 dgp Exp $ + * RCS: @(#) $Id: pkgc.c,v 1.10 2008/04/27 22:41:47 dkf Exp $ */ #include "tcl.h" @@ -20,9 +20,9 @@ */ static int Pkgc_SubObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int Pkgc_UnsafeObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- @@ -46,7 +46,7 @@ Pkgc_SubObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int first, second; @@ -84,7 +84,7 @@ Pkgc_UnsafeObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_SetObjResult(interp, Tcl_NewStringObj("unsafe command invoked", -1)); return TCL_OK; diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index be2219b..46f159a 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgd.c,v 1.8 2007/12/13 15:28:43 dgp Exp $ + * RCS: @(#) $Id: pkgd.c,v 1.9 2008/04/27 22:41:47 dkf Exp $ */ #include "tcl.h" @@ -20,9 +20,9 @@ */ static int Pkgd_SubObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int Pkgd_UnsafeObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- @@ -46,7 +46,7 @@ Pkgd_SubObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int first, second; @@ -84,7 +84,7 @@ Pkgd_UnsafeObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_SetObjResult(interp, Tcl_NewStringObj("unsafe command invoked", -1)); return TCL_OK; diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index 71af826..592641a 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgua.c,v 1.7 2007/12/13 15:28:43 dgp Exp $ + * RCS: @(#) $Id: pkgua.c,v 1.8 2008/04/27 22:41:47 dkf Exp $ */ #include "tcl.h" @@ -20,9 +20,9 @@ */ static int PkguaEqObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int PkguaQuoteObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* * In the following hash table we are going to store a struct that holds all @@ -122,10 +122,10 @@ PkguaEqObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result; - CONST char *str1, *str2; + const char *str1, *str2; int len1, len2; if (objc != 3) { @@ -166,7 +166,7 @@ PkguaQuoteObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument strings. */ + Tcl_Obj *const objv[]) /* Argument strings. */ { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); -- cgit v0.12 From d5fc5663024f3eb25cbb19839bad08087fea9b4a Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 2 May 2008 10:27:04 +0000 Subject: More elimination of pre-C89-isms. --- compat/stdlib.h | 52 ++-- compat/string.h | 74 +++-- compat/unistd.h | 109 ++++---- generic/regex.h | 4 +- generic/tclCompile.h | 26 +- generic/tclFileName.c | 147 ++++++++-- generic/tclFileSystem.h | 6 +- generic/tclIO.h | 4 +- generic/tclIOUtil.c | 717 ++++++++++++++++++++++++------------------------ generic/tclInt.h | 8 +- generic/tclRegexp.h | 4 +- unix/tclUnixPort.h | 6 +- win/tclWinInt.h | 70 ++--- 13 files changed, 653 insertions(+), 574 deletions(-) diff --git a/compat/stdlib.h b/compat/stdlib.h index 6edeeae..1fe0a76 100644 --- a/compat/stdlib.h +++ b/compat/stdlib.h @@ -1,45 +1,41 @@ /* * stdlib.h -- * - * Declares facilities exported by the "stdlib" portion of - * the C library. This file isn't complete in the ANSI-C - * sense; it only declares things that are needed by Tcl. - * This file is needed even on many systems with their own - * stdlib.h (e.g. SunOS) because not all stdlib.h files - * declare all the procedures needed here (such as strtod). + * Declares facilities exported by the "stdlib" portion of the C library. + * This file isn't complete in the ANSI-C sense; it only declares things + * that are needed by Tcl. This file is needed even on many systems with + * their own stdlib.h (e.g. SunOS) because not all stdlib.h files declare + * all the procedures needed here (such as strtod). * * Copyright (c) 1991 The Regents of the University of California. * Copyright (c) 1994-1998 Sun Microsystems, Inc. * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: stdlib.h,v 1.3 1999/04/16 00:46:30 stanton Exp $ + * RCS: @(#) $Id: stdlib.h,v 1.4 2008/05/02 10:27:04 dkf Exp $ */ #ifndef _STDLIB #define _STDLIB #include +/* TODO: Do we need tcl.h any more? */ -extern void abort _ANSI_ARGS_((void)); -extern double atof _ANSI_ARGS_((CONST char *string)); -extern int atoi _ANSI_ARGS_((CONST char *string)); -extern long atol _ANSI_ARGS_((CONST char *string)); -extern char * calloc _ANSI_ARGS_((unsigned int numElements, - unsigned int size)); -extern void exit _ANSI_ARGS_((int status)); -extern int free _ANSI_ARGS_((char *blockPtr)); -extern char * getenv _ANSI_ARGS_((CONST char *name)); -extern char * malloc _ANSI_ARGS_((unsigned int numBytes)); -extern void qsort _ANSI_ARGS_((VOID *base, int n, int size, - int (*compar)(CONST VOID *element1, CONST VOID - *element2))); -extern char * realloc _ANSI_ARGS_((char *ptr, unsigned int numBytes)); -extern double strtod _ANSI_ARGS_((CONST char *string, char **endPtr)); -extern long strtol _ANSI_ARGS_((CONST char *string, char **endPtr, - int base)); -extern unsigned long strtoul _ANSI_ARGS_((CONST char *string, - char **endPtr, int base)); +extern void abort(void); +extern double atof(const char *string); +extern int atoi(const char *string); +extern long atol(const char *string); +extern char * calloc(unsigned int numElements, unsigned int size); +extern void exit(int status); +extern int free(char *blockPtr); +extern char * getenv(const char *name); +extern char * malloc(unsigned int numBytes); +extern void qsort(void *base, int n, int size, int (*compar)( + const void *element1, const void *element2)); +extern char * realloc(char *ptr, unsigned int numBytes); +extern double strtod(const char *string, char **endPtr); +extern long strtol(const char *string, char **endPtr, int base); +extern unsigned long strtoul(const char *string, char **endPtr, int base); #endif /* _STDLIB */ diff --git a/compat/string.h b/compat/string.h index 128b458..e452183 100644 --- a/compat/string.h +++ b/compat/string.h @@ -6,10 +6,10 @@ * Copyright (c) 1991-1993 The Regents of the University of California. * Copyright (c) 1994-1996 Sun Microsystems, Inc. * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: string.h,v 1.7 2005/05/10 18:33:53 kennykb Exp $ + * RCS: @(#) $Id: string.h,v 1.8 2008/05/02 10:27:04 dkf Exp $ */ #ifndef _STRING @@ -18,56 +18,44 @@ #include /* - * The following #include is needed to define size_t. (This used to - * include sys/stdtypes.h but that doesn't exist on older versions - * of SunOS, e.g. 4.0.2, so I'm trying sys/types.h now.... hopefully - * it exists everywhere) + * The following #include is needed to define size_t. (This used to include + * sys/stdtypes.h but that doesn't exist on older versions of SunOS, e.g. + * 4.0.2, so I'm trying sys/types.h now.... hopefully it exists everywhere) */ #include #ifdef __APPLE__ -extern VOID * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n)); +extern void * memchr(const void *s, int c, size_t n); #else -extern char * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n)); +extern char * memchr(const void *s, int c, size_t n); #endif -extern int memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2, - size_t n)); -extern char * memcpy _ANSI_ARGS_((VOID *t, CONST VOID *f, size_t n)); +extern int memcmp(const void *s1, const void *s2, size_t n); +extern char * memcpy(void *t, const void *f, size_t n); #ifdef NO_MEMMOVE -#define memmove(d, s, n) bcopy ((s), (d), (n)) +#define memmove(d,s,n) (bcopy((s), (d), (n))) #else -extern char * memmove _ANSI_ARGS_((VOID *t, CONST VOID *f, - size_t n)); +extern char * memmove(void *t, const void *f, size_t n); #endif -extern char * memset _ANSI_ARGS_((VOID *s, int c, size_t n)); +extern char * memset(void *s, int c, size_t n); -extern int strcasecmp _ANSI_ARGS_((CONST char *s1, - CONST char *s2)); -extern char * strcat _ANSI_ARGS_((char *dst, CONST char *src)); -extern char * strchr _ANSI_ARGS_((CONST char *string, int c)); -extern int strcmp _ANSI_ARGS_((CONST char *s1, CONST char *s2)); -extern char * strcpy _ANSI_ARGS_((char *dst, CONST char *src)); -extern size_t strcspn _ANSI_ARGS_((CONST char *string, - CONST char *chars)); -extern char * strdup _ANSI_ARGS_((CONST char *string)); -extern char * strerror _ANSI_ARGS_((int error)); -extern size_t strlen _ANSI_ARGS_((CONST char *string)); -extern int strncasecmp _ANSI_ARGS_((CONST char *s1, - CONST char *s2, size_t n)); -extern char * strncat _ANSI_ARGS_((char *dst, CONST char *src, - size_t numChars)); -extern int strncmp _ANSI_ARGS_((CONST char *s1, CONST char *s2, - size_t nChars)); -extern char * strncpy _ANSI_ARGS_((char *dst, CONST char *src, - size_t numChars)); -extern char * strpbrk _ANSI_ARGS_((CONST char *string, - CONST char *chars)); -extern char * strrchr _ANSI_ARGS_((CONST char *string, int c)); -extern size_t strspn _ANSI_ARGS_((CONST char *string, - CONST char *chars)); -extern char * strstr _ANSI_ARGS_((CONST char *string, - CONST char *substring)); -extern char * strtok _ANSI_ARGS_((char *s, CONST char *delim)); +extern int strcasecmp(const char *s1, const char *s2); +extern char * strcat(char *dst, const char *src); +extern char * strchr(const char *string, int c); +extern int strcmp(const char *s1, const char *s2); +extern char * strcpy(char *dst, const char *src); +extern size_t strcspn(const char *string, const char *chars); +extern char * strdup(const char *string); +extern char * strerror(int error); +extern size_t strlen(const char *string); +extern int strncasecmp(const char *s1, const char *s2, size_t n); +extern char * strncat(char *dst, const char *src, size_t numChars); +extern int strncmp(const char *s1, const char *s2,size_t nChars); +extern char * strncpy(char *dst, const char *src, size_t numChars); +extern char * strpbrk(const char *string, const char *chars); +extern char * strrchr(const char *string, int c); +extern size_t strspn(const char *string, const char *chars); +extern char * strstr(const char *string, const char *substring); +extern char * strtok(char *s, const char *delim); #endif /* _STRING */ diff --git a/compat/unistd.h b/compat/unistd.h index 0b791e0..443e319 100644 --- a/compat/unistd.h +++ b/compat/unistd.h @@ -3,16 +3,14 @@ * * Macros, CONSTants and prototypes for Posix conformance. * - * Copyright 1989 Regents of the University of California - * Permission to use, copy, modify, and distribute this - * software and its documentation for any purpose and without - * fee is hereby granted, provided that the above copyright - * notice appear in all copies. The University of California - * makes no representations about the suitability of this - * software for any purpose. It is provided "as is" without - * express or implied warranty. + * Copyright 1989 Regents of the University of California Permission to use, + * copy, modify, and distribute this software and its documentation for any + * purpose and without fee is hereby granted, provided that the above + * copyright notice appear in all copies. The University of California makes + * no representations about the suitability of this software for any purpose. + * It is provided "as is" without express or implied warranty. * - * RCS: @(#) $Id: unistd.h,v 1.2 1998/09/14 18:39:45 stanton Exp $ + * RCS: @(#) $Id: unistd.h,v 1.3 2008/05/02 10:27:04 dkf Exp $ */ #ifndef _UNISTD @@ -28,57 +26,56 @@ #endif /* - * Strict POSIX stuff goes here. Extensions go down below, in the - * ifndef _POSIX_SOURCE section. + * Strict POSIX stuff goes here. Extensions go down below, in the ifndef + * _POSIX_SOURCE section. */ -extern void _exit _ANSI_ARGS_((int status)); -extern int access _ANSI_ARGS_((CONST char *path, int mode)); -extern int chdir _ANSI_ARGS_((CONST char *path)); -extern int chown _ANSI_ARGS_((CONST char *path, uid_t owner, gid_t group)); -extern int close _ANSI_ARGS_((int fd)); -extern int dup _ANSI_ARGS_((int oldfd)); -extern int dup2 _ANSI_ARGS_((int oldfd, int newfd)); -extern int execl _ANSI_ARGS_((CONST char *path, ...)); -extern int execle _ANSI_ARGS_((CONST char *path, ...)); -extern int execlp _ANSI_ARGS_((CONST char *file, ...)); -extern int execv _ANSI_ARGS_((CONST char *path, char **argv)); -extern int execve _ANSI_ARGS_((CONST char *path, char **argv, char **envp)); -extern int execvp _ANSI_ARGS_((CONST char *file, char **argv)); -extern pid_t fork _ANSI_ARGS_((void)); -extern char *getcwd _ANSI_ARGS_((char *buf, size_t size)); -extern gid_t getegid _ANSI_ARGS_((void)); -extern uid_t geteuid _ANSI_ARGS_((void)); -extern gid_t getgid _ANSI_ARGS_((void)); -extern int getgroups _ANSI_ARGS_((int bufSize, int *buffer)); -extern pid_t getpid _ANSI_ARGS_((void)); -extern uid_t getuid _ANSI_ARGS_((void)); -extern int isatty _ANSI_ARGS_((int fd)); -extern long lseek _ANSI_ARGS_((int fd, long offset, int whence)); -extern int pipe _ANSI_ARGS_((int *fildes)); -extern int read _ANSI_ARGS_((int fd, char *buf, size_t size)); -extern int setgid _ANSI_ARGS_((gid_t group)); -extern int setuid _ANSI_ARGS_((uid_t user)); -extern unsigned sleep _ANSI_ARGS_ ((unsigned seconds)); -extern char *ttyname _ANSI_ARGS_((int fd)); -extern int unlink _ANSI_ARGS_((CONST char *path)); -extern int write _ANSI_ARGS_((int fd, CONST char *buf, size_t size)); +extern void _exit(int status); +extern int access(const char *path, int mode); +extern int chdir(const char *path); +extern int chown(const char *path, uid_t owner, gid_t group); +extern int close(int fd); +extern int dup(int oldfd); +extern int dup2(int oldfd, int newfd); +extern int execl(const char *path, ...); +extern int execle(const char *path, ...); +extern int execlp(const char *file, ...); +extern int execv(const char *path, char **argv); +extern int execve(const char *path, char **argv, char **envp); +extern int execvpw(const char *file, char **argv); +extern pid_t fork(void); +extern char * getcwd(char *buf, size_t size); +extern gid_t getegid(void); +extern uid_t geteuid(void); +extern gid_t getgid(void); +extern int getgroups(int bufSize, int *buffer); +extern pid_t getpid(void); +extern uid_t getuid(void); +extern int isatty(int fd); +extern long lseek(int fd, long offset, int whence); +extern int pipe(int *fildes); +extern int read(int fd, char *buf, size_t size); +extern int setgid(gid_t group); +extern int setuid(uid_t user); +extern unsigned sleep(unsigned seconds); +extern char * ttyname(int fd); +extern int unlink(const char *path); +extern int write(int fd, const char *buf, size_t size); #ifndef _POSIX_SOURCE -extern char *crypt _ANSI_ARGS_((CONST char *, CONST char *)); -extern int fchown _ANSI_ARGS_((int fd, uid_t owner, gid_t group)); -extern int flock _ANSI_ARGS_((int fd, int operation)); -extern int ftruncate _ANSI_ARGS_((int fd, unsigned long length)); -extern int ioctl _ANSI_ARGS_((int fd, int request, ...)); -extern int readlink _ANSI_ARGS_((CONST char *path, char *buf, int bufsize)); -extern int setegid _ANSI_ARGS_((gid_t group)); -extern int seteuid _ANSI_ARGS_((uid_t user)); -extern int setreuid _ANSI_ARGS_((int ruid, int euid)); -extern int symlink _ANSI_ARGS_((CONST char *, CONST char *)); -extern int ttyslot _ANSI_ARGS_((void)); -extern int truncate _ANSI_ARGS_((CONST char *path, unsigned long length)); -extern int vfork _ANSI_ARGS_((void)); +extern char * crypt(const char *, const char *); +extern int fchown(int fd, uid_t owner, gid_t group); +extern int flock(int fd, int operation); +extern int ftruncate(int fd, unsigned long length); +extern int ioctl(int fd, int request, ...); +extern int readlink(const char *path, char *buf, int bufsize); +extern int setegid(gid_t group); +extern int seteuidw(uid_t user); +extern int setreuid(int ruid, int euid); +extern int symlink(const char *, const char *); +extern int ttyslot(void); +extern int truncate(const char *path, unsigned long length); +extern int vfork(void); #endif /* _POSIX_SOURCE */ #endif /* _UNISTD */ - diff --git a/generic/regex.h b/generic/regex.h index fa86092..f6d4eb4 100644 --- a/generic/regex.h +++ b/generic/regex.h @@ -104,8 +104,8 @@ extern "C" { /* interface types */ #define __REG_WIDE_T Tcl_UniChar #define __REG_REGOFF_T long /* not really right, but good enough... */ -#define __REG_VOID_T VOID -#define __REG_CONST CONST +#define __REG_VOID_T void +#define __REG_CONST const /* names and declarations */ #define __REG_WIDE_COMPILE TclReComp #define __REG_WIDE_EXEC TclReExec diff --git a/generic/tclCompile.h b/generic/tclCompile.h index eee0da9..06447df 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.90 2008/02/26 20:28:59 jenglish Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.91 2008/05/02 10:27:05 dkf Exp $ */ #ifndef _TCLCOMPILATION @@ -833,7 +833,7 @@ typedef struct { MODULE_SCOPE int TclEvalObjvInternal(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], - CONST char *command, int length, int flags); + const char *command, int length, int flags); /* *---------------------------------------------------------------- * Procedures exported by the engine to be used by tclBasic.c @@ -854,13 +854,13 @@ MODULE_SCOPE void TclCleanupByteCode(ByteCode *codePtr); MODULE_SCOPE void TclCompileCmdWord(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, CompileEnv *envPtr); -MODULE_SCOPE void TclCompileExpr(Tcl_Interp *interp, CONST char *script, +MODULE_SCOPE void TclCompileExpr(Tcl_Interp *interp, const char *script, int numBytes, CompileEnv *envPtr, int optimize); MODULE_SCOPE void TclCompileExprWords(Tcl_Interp *interp, Tcl_Token *tokenPtr, int numWords, CompileEnv *envPtr); MODULE_SCOPE void TclCompileScript(Tcl_Interp *interp, - CONST char *script, int numBytes, + const char *script, int numBytes, CompileEnv *envPtr); MODULE_SCOPE void TclCompileSyntaxError(Tcl_Interp *interp, CompileEnv *envPtr); @@ -887,7 +887,7 @@ MODULE_SCOPE void TclExpandJumpFixupArray(JumpFixupArray *fixupArrayPtr); MODULE_SCOPE int TclExecuteByteCode(Tcl_Interp *interp, ByteCode *codePtr); MODULE_SCOPE void TclFinalizeAuxDataTypeTable(void); -MODULE_SCOPE int TclFindCompiledLocal(CONST char *name, int nameChars, +MODULE_SCOPE int TclFindCompiledLocal(const char *name, int nameChars, int create, Proc *procPtr); MODULE_SCOPE LiteralEntry * TclLookupLiteralEntry(Tcl_Interp *interp, Tcl_Obj *objPtr); @@ -902,7 +902,7 @@ MODULE_SCOPE void TclInitByteCodeObj(Tcl_Obj *objPtr, MODULE_SCOPE void TclInitCompilation(void); MODULE_SCOPE void TclInitCompileEnv(Tcl_Interp *interp, CompileEnv *envPtr, const char *string, - int numBytes, CONST CmdFrame* invoker, int word); + int numBytes, const CmdFrame* invoker, int word); MODULE_SCOPE void TclInitJumpFixupArray(JumpFixupArray *fixupArrayPtr); MODULE_SCOPE void TclInitLiteralTable(LiteralTable *tablePtr); #ifdef TCL_COMPILE_STATS @@ -918,23 +918,23 @@ MODULE_SCOPE int TclPrintInstruction(ByteCode* codePtr, MODULE_SCOPE void TclPrintObject(FILE *outFile, Tcl_Obj *objPtr, int maxChars); MODULE_SCOPE void TclPrintSource(FILE *outFile, - CONST char *string, int maxChars); + const char *string, int maxChars); MODULE_SCOPE void TclRegisterAuxDataType(AuxDataType *typePtr); MODULE_SCOPE int TclRegisterLiteral(CompileEnv *envPtr, char *bytes, int length, int flags); MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr); MODULE_SCOPE int TclSingleOpCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int TclSortingOpCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int TclVariadicOpCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); MODULE_SCOPE int TclNoIdentOpCmd(ClientData clientData, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); #ifdef TCL_COMPILE_DEBUG MODULE_SCOPE void TclVerifyGlobalLiteralTable(Interp *iPtr); MODULE_SCOPE void TclVerifyLocalLiteralTable(CompileEnv *envPtr); @@ -954,7 +954,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, /* * Form of TclRegisterLiteral with onHeap == 0. In that case, it is safe to - * cast away CONSTness, and it is cleanest to do that here, all in one place. + * cast away constness, and it is cleanest to do that here, all in one place. * * int TclRegisterNewLiteral(CompileEnv *envPtr, const char *bytes, * int length); @@ -965,7 +965,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, /* * Form of TclRegisterNSLiteral with onHeap == 0. In that case, it is safe to - * cast away CONSTness, and it is cleanest to do that here, all in one place. + * cast away constness, and it is cleanest to do that here, all in one place. * * int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes, * int length); diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 80391f7..5c58052 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.86 2007/12/13 15:23:17 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.87 2008/05/02 10:27:05 dkf Exp $ */ #include "tclInt.h" @@ -34,8 +34,8 @@ static const char * ExtractWinRoot(const char *path, Tcl_DString *resultPtr, int offset, Tcl_PathType *typePtr); static int SkipToChar(char **stringPtr, int match); -static Tcl_Obj* SplitWinPath(const char *path); -static Tcl_Obj* SplitUnixPath(const char *path); +static Tcl_Obj * SplitWinPath(const char *path); +static Tcl_Obj * SplitUnixPath(const char *path); static int DoGlob(Tcl_Interp *interp, Tcl_Obj *resultPtr, const char *separators, Tcl_Obj *pathPtr, int flags, char *pattern, Tcl_GlobTypeData *types); @@ -201,7 +201,7 @@ ExtractWinRoot( Tcl_DStringAppend(resultPtr, path, 2); return &path[2]; } else { - char *tail = (char*)&path[3]; + char *tail = (char *) &path[3]; /* * Skip separators. @@ -1412,8 +1412,8 @@ Tcl_GlobObjCmd( */ Tcl_ListObjLength(interp, typePtr, &length); - globTypes = (Tcl_GlobTypeData*) - TclStackAlloc(interp,sizeof(Tcl_GlobTypeData)); + globTypes = (Tcl_GlobTypeData *) + TclStackAlloc(interp, sizeof(Tcl_GlobTypeData)); globTypes->type = 0; globTypes->perm = 0; globTypes->macType = NULL; @@ -1477,7 +1477,7 @@ Tcl_GlobObjCmd( Tcl_IncrRefCount(look); } else { - Tcl_Obj* item; + Tcl_Obj *item; if ((Tcl_ListObjLength(NULL, look, &len) == TCL_OK) && (len == 3)) { @@ -1882,27 +1882,29 @@ TclGlob( if (*tail == '\0' && pathPrefix != NULL) { /* - * An empty pattern. This means 'pathPrefix' is actually - * a full path of a file/directory we want to simply check - * for existence and type. + * An empty pattern. This means 'pathPrefix' is actually a full path + * of a file/directory we want to simply check for existence and type. */ + if (types == NULL) { /* - * We just want to check for existence. In this case we - * make it easy on Tcl_FSMatchInDirectory and its - * sub-implementations by not bothering them (even though - * they should support this situation) and we just use the - * simple existence check with Tcl_FSAccess. + * We just want to check for existence. In this case we make it + * easy on Tcl_FSMatchInDirectory and its sub-implementations by + * not bothering them (even though they should support this + * situation) and we just use the simple existence check with + * Tcl_FSAccess. */ + if (Tcl_FSAccess(pathPrefix, F_OK) == 0) { Tcl_ListObjAppendElement(interp, filenamesObj, pathPrefix); } result = TCL_OK; } else { /* - * We want to check for the correct type. Tcl_FSMatchInDirectory + * We want to check for the correct type. Tcl_FSMatchInDirectory * is documented to do this for us, if we give it a NULL pattern. */ + result = Tcl_FSMatchInDirectory(interp, filenamesObj, pathPrefix, NULL, types); } @@ -1968,7 +1970,7 @@ TclGlob( for (i = 0; i< objc; i++) { int len; char *oldStr = Tcl_GetStringFromObj(objv[i], &len); - Tcl_Obj* elems[1]; + Tcl_Obj *elems[1]; if (len == prefixLen) { if ((pattern[0] == '\0') @@ -2095,7 +2097,7 @@ DoGlob( * resulting filenames. Caller allocates and * deallocates; DoGlob must not touch the * refCount of this object. */ - const char *separators, /* String containing separator characters that + const char *separators, /* String containing separator characters that * should be used to identify globbing * boundaries. */ Tcl_Obj *pathPtr, /* Completely expanded prefix. */ @@ -2327,7 +2329,7 @@ DoGlob( TCL_GLOB_TYPE_DIR, 0, NULL, NULL }; char save = *p; - Tcl_Obj* subdirsPtr; + Tcl_Obj *subdirsPtr; if (*p == '\0') { return Tcl_FSMatchInDirectory(interp, matchesObj, pathPtr, @@ -2521,6 +2523,113 @@ Tcl_AllocStatBuf(void) } /* + *--------------------------------------------------------------------------- + * + * Tcl_Get*FromStat -- + * + * These functions provide portable read-only access to a Tcl_StatBuf. + * + * Results: + * The contents of the relevant field. + * + * Side effects: + * None. + * + *--------------------------------------------------------------------------- + */ + +unsigned +Tcl_GetFSDeviceFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_dev; +} + +unsigned +Tcl_GetFSInodeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_ino; +} + +unsigned +Tcl_GetModeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_mode; +} + +int +Tcl_GetLinkCountFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_nlink; +} + +int +Tcl_GetUserIdFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_uid; +} + +int +Tcl_GetGroupIdFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_gid; +} + +int +Tcl_GetDeviceTypeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_rdev; +} + +Tcl_WideInt +Tcl_GetAccessTimeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_atime; +} + +Tcl_WideInt +Tcl_GetModificationTimeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_mtime; +} + +Tcl_WideInt +Tcl_GetChangeTimeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_ctime; +} + +Tcl_WideUInt +Tcl_GetSizeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return (Tcl_WideUInt) statBufPtr->st_size; +} + +Tcl_WideUInt +Tcl_GetBlocksFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_blocks; +} + +unsigned +Tcl_GetBlockSizeFromStat( + Tcl_StatBuf *statBufPtr) +{ + return statBufPtr->st_blksize; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclFileSystem.h b/generic/tclFileSystem.h index cff0942..fee4d6e 100644 --- a/generic/tclFileSystem.h +++ b/generic/tclFileSystem.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileSystem.h,v 1.11 2005/10/13 00:07:17 dkf Exp $ + * RCS: @(#) $Id: tclFileSystem.h,v 1.12 2008/05/02 10:27:07 dkf Exp $ */ #ifndef _TCLFILESYSTEM @@ -98,7 +98,7 @@ MODULE_SCOPE Tcl_ThreadDataKey tclFsDataKey; MODULE_SCOPE Tcl_PathType TclFSGetPathType(Tcl_Obj *pathPtr, Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr); -MODULE_SCOPE Tcl_PathType TclFSNonnativePathType(CONST char *pathPtr, +MODULE_SCOPE Tcl_PathType TclFSNonnativePathType(const char *pathPtr, int pathLen, Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr, Tcl_Obj **driveNameRef); MODULE_SCOPE Tcl_PathType TclGetPathType(Tcl_Obj *pathPtr, @@ -107,7 +107,7 @@ MODULE_SCOPE Tcl_PathType TclGetPathType(Tcl_Obj *pathPtr, MODULE_SCOPE int TclFSEpochOk(int filesystemEpoch); MODULE_SCOPE int TclFSCwdIsNative(void); MODULE_SCOPE Tcl_Obj * TclWinVolumeRelativeNormalize(Tcl_Interp *interp, - CONST char *path, Tcl_Obj **useThisCwdPtr); + const char *path, Tcl_Obj **useThisCwdPtr); MODULE_SCOPE Tcl_FSPathInFilesystemProc TclNativePathInFilesystem; MODULE_SCOPE Tcl_FSCreateInternalRepProc TclNativeCreateNativeRep; diff --git a/generic/tclIO.h b/generic/tclIO.h index 662d631..23e64a0 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.12 2008/04/07 22:53:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.13 2008/05/02 10:27:07 dkf Exp $ */ /* @@ -158,7 +158,7 @@ typedef struct Channel { */ typedef struct ChannelState { - CONST char *channelName; /* The name of the channel instance in Tcl + const char *channelName; /* The name of the channel instance in Tcl * commands. Storage is owned by the generic * IO code, is dynamically allocated. */ int flags; /* ORed combination of the flags defined diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 420ea6f..89465a0 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.153 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.154 2008/05/02 10:27:07 dkf Exp $ */ #include "tclInt.h" @@ -67,7 +67,6 @@ Tcl_Stat( int ret; Tcl_StatBuf buf; Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); - #ifndef TCL_WIDE_INT_IS_LONG Tcl_WideInt tmp1, tmp2; #ifdef HAVE_ST_BLOCKS @@ -91,8 +90,9 @@ Tcl_Stat( * * Note that ino_t/ino64_t is unsigned... * - * Workaround gcc warning of "comparison is always false due to limited range of - * data type" by assigning to tmp var of type Tcl_WideInt. + * Workaround gcc warning of "comparison is always false due to + * limited range of data type" by assigning to tmp var of type + * Tcl_WideInt. */ tmp1 = (Tcl_WideInt) buf.st_ino; @@ -205,16 +205,15 @@ Tcl_GetCwd( Tcl_Interp *interp, Tcl_DString *cwdPtr) { - Tcl_Obj *cwd; - cwd = Tcl_FSGetCwd(interp); + Tcl_Obj *cwd = Tcl_FSGetCwd(interp); + if (cwd == NULL) { return NULL; - } else { - Tcl_DStringInit(cwdPtr); - Tcl_DStringAppend(cwdPtr, Tcl_GetString(cwd), -1); - Tcl_DecrRefCount(cwd); - return Tcl_DStringValue(cwdPtr); } + Tcl_DStringInit(cwdPtr); + Tcl_DStringAppend(cwdPtr, Tcl_GetString(cwd), -1); + Tcl_DecrRefCount(cwd); + return Tcl_DStringValue(cwdPtr); } /* Obsolete */ @@ -226,6 +225,7 @@ Tcl_EvalFile( { int ret; Tcl_Obj *pathPtr = Tcl_NewStringObj(fileName,-1); + Tcl_IncrRefCount(pathPtr); ret = Tcl_FSEvalFile(interp, pathPtr); Tcl_DecrRefCount(pathPtr); @@ -379,7 +379,7 @@ TCL_DECLARE_MUTEX(filesystemMutex) * Used to implement Tcl_FSGetCwd in a file-system independent way. */ -static Tcl_Obj* cwdPathPtr = NULL; +static Tcl_Obj *cwdPathPtr = NULL; static int cwdPathEpoch = 0; static ClientData cwdClientData = NULL; TCL_DECLARE_MUTEX(cwdMutex) @@ -417,7 +417,7 @@ static void FsThrExitProc( ClientData cd) { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) cd; + ThreadSpecificData *tsdPtr = cd; FilesystemRecord *fsRecPtr = NULL, *tmpFsRecPtr = NULL; /* @@ -440,7 +440,7 @@ FsThrExitProc( while (fsRecPtr != NULL) { tmpFsRecPtr = fsRecPtr->nextPtr; if (--fsRecPtr->fileRefCount <= 0) { - ckfree((char *)fsRecPtr); + ckfree((char *) fsRecPtr); } fsRecPtr = tmpFsRecPtr; } @@ -482,7 +482,7 @@ TclFSCwdIsNative(void) int TclFSCwdPointerEquals( - Tcl_Obj** pathPtrPtr) + Tcl_Obj **pathPtrPtr) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey); @@ -511,7 +511,7 @@ TclFSCwdPointerEquals( Tcl_MutexUnlock(&cwdMutex); if (tsdPtr->initialized == 0) { - Tcl_CreateThreadExitHandler(FsThrExitProc, (ClientData) tsdPtr); + Tcl_CreateThreadExitHandler(FsThrExitProc, tsdPtr); tsdPtr->initialized = 1; } @@ -558,7 +558,7 @@ FsRecacheFilesystemList(void) while (fsRecPtr != NULL) { tmpFsRecPtr = fsRecPtr->nextPtr; if (--fsRecPtr->fileRefCount <= 0) { - ckfree((char *)fsRecPtr); + ckfree((char *) fsRecPtr); } fsRecPtr = tmpFsRecPtr; } @@ -599,7 +599,7 @@ FsRecacheFilesystemList(void) */ if (tsdPtr->initialized == 0) { - Tcl_CreateThreadExitHandler(FsThrExitProc, (ClientData) tsdPtr); + Tcl_CreateThreadExitHandler(FsThrExitProc, tsdPtr); tsdPtr->initialized = 1; } } @@ -610,6 +610,7 @@ FsGetFirstFilesystem(void) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey); FilesystemRecord *fsRecPtr; + #ifndef TCL_THREADS tsdPtr->filesystemEpoch = theFilesystemEpoch; fsRecPtr = filesystemList; @@ -747,13 +748,14 @@ TclFinalizeFilesystem(void) fsRecPtr = filesystemList; while (fsRecPtr != NULL) { FilesystemRecord *tmpFsRecPtr = fsRecPtr->nextPtr; + if (fsRecPtr->fileRefCount <= 0) { /* * The native filesystem is static, so we don't free it. */ if (fsRecPtr->fsPtr != &tclNativeFilesystem) { - ckfree((char *)fsRecPtr); + ckfree((char *) fsRecPtr); } } fsRecPtr = tmpFsRecPtr; @@ -955,7 +957,7 @@ Tcl_FSUnregister( fsRecPtr->fileRefCount--; if (fsRecPtr->fileRefCount <= 0) { - ckfree((char *)fsRecPtr); + ckfree((char *) fsRecPtr); } retVal = TCL_OK; @@ -1024,7 +1026,7 @@ Tcl_FSMatchInDirectory( Tcl_Obj *cwd, *tmpResultPtr, **elemsPtr; int resLength, i, ret = -1; - if (types != NULL && types->type & TCL_GLOB_TYPE_MOUNT) { + if (types != NULL && (types->type & TCL_GLOB_TYPE_MOUNT)) { /* * We don't currently allow querying of mounts by external code (a * valuable future step), so since we're the only function that @@ -1382,37 +1384,42 @@ TclFSNormalizeToUniquePath( firstFsRecPtr = FsGetFirstFilesystem(); - fsRecPtr = firstFsRecPtr; - while (fsRecPtr != NULL) { - if (fsRecPtr->fsPtr == &tclNativeFilesystem) { - Tcl_FSNormalizePathProc *proc = fsRecPtr->fsPtr->normalizePathProc; - if (proc != NULL) { - startAt = (*proc)(interp, pathPtr, startAt); - } - break; + for (fsRecPtr=firstFsRecPtr; fsRecPtr!=NULL; fsRecPtr=fsRecPtr->nextPtr) { + if (fsRecPtr->fsPtr != &tclNativeFilesystem) { + continue; } - fsRecPtr = fsRecPtr->nextPtr; + + /* + * TODO: Assume that we always find the native file system; it should + * always be there... + */ + + if (fsRecPtr->fsPtr->normalizePathProc != NULL) { + startAt = fsRecPtr->fsPtr->normalizePathProc(interp, pathPtr, + startAt); + } + break; } - fsRecPtr = firstFsRecPtr; - while (fsRecPtr != NULL) { + for (fsRecPtr=firstFsRecPtr; fsRecPtr!=NULL; fsRecPtr=fsRecPtr->nextPtr) { /* * Skip the native system next time through. */ - if (fsRecPtr->fsPtr != &tclNativeFilesystem) { - Tcl_FSNormalizePathProc *proc = fsRecPtr->fsPtr->normalizePathProc; - if (proc != NULL) { - startAt = (*proc)(interp, pathPtr, startAt); - } + if (fsRecPtr->fsPtr == &tclNativeFilesystem) { + continue; + } - /* - * We could add an efficiency check like this: - * if (retVal == length-of(pathPtr)) {break;} - * but there's not much benefit. - */ + if (fsRecPtr->fsPtr->normalizePathProc != NULL) { + startAt = fsRecPtr->fsPtr->normalizePathProc(interp, pathPtr, + startAt); } - fsRecPtr = fsRecPtr->nextPtr; + + /* + * We could add an efficiency check like this: + * if (retVal == length-of(pathPtr)) {break;} + * but there's not much benefit. + */ } return startAt; @@ -1715,7 +1722,7 @@ Tcl_FSEvalFileEx( return result; } chan = Tcl_FSOpenFileChannel(interp, pathPtr, "r", 0644); - if (chan == (Tcl_Channel) NULL) { + if (chan == NULL) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "couldn't read file \"", Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL); @@ -1760,8 +1767,11 @@ Tcl_FSEvalFileEx( iPtr->scriptFile = pathPtr; Tcl_IncrRefCount(iPtr->scriptFile); string = Tcl_GetStringFromObj(objPtr, &length); - /* TIP #280 Force the evaluator to open a frame for a sourced - * file. */ + + /* + * TIP #280 Force the evaluator to open a frame for a sourced file. + */ + iPtr->evalFlags |= TCL_EVAL_FILE; result = Tcl_EvalEx(interp, string, length, 0); @@ -1820,6 +1830,11 @@ Tcl_FSEvalFileEx( int Tcl_GetErrno(void) { + /* + * On some platforms, errno is really a thread local (implemented by the C + * library). + */ + return errno; } @@ -1843,6 +1858,11 @@ void Tcl_SetErrno( int err) /* The new value. */ { + /* + * On some platforms, errno is really a thread local (implemented by the C + * library). + */ + errno = err; } @@ -1904,14 +1924,10 @@ Tcl_FSStat( Tcl_Obj *pathPtr, /* Path of file to stat (in current CP). */ Tcl_StatBuf *buf) /* Filled with results of stat call. */ { - const Tcl_Filesystem *fsPtr; + const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSStatProc *proc = fsPtr->statProc; - if (proc != NULL) { - return (*proc)(pathPtr, buf); - } + if (fsPtr != NULL && fsPtr->statProc != NULL) { + return fsPtr->statProc(pathPtr, buf); } Tcl_SetErrno(ENOENT); return -1; @@ -1942,15 +1958,13 @@ Tcl_FSLstat( Tcl_StatBuf *buf) /* Filled with results of stat call. */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); + if (fsPtr != NULL) { - Tcl_FSLstatProc *proc = fsPtr->lstatProc; - if (proc != NULL) { - return (*proc)(pathPtr, buf); - } else { - Tcl_FSStatProc *sproc = fsPtr->statProc; - if (sproc != NULL) { - return (*sproc)(pathPtr, buf); - } + if (fsPtr->lstatProc != NULL) { + return fsPtr->lstatProc(pathPtr, buf); + } + if (fsPtr->statProc != NULL) { + return fsPtr->statProc(pathPtr, buf); } } Tcl_SetErrno(ENOENT); @@ -1979,16 +1993,11 @@ Tcl_FSAccess( Tcl_Obj *pathPtr, /* Path of file to access (in current CP). */ int mode) /* Permission setting. */ { - const Tcl_Filesystem *fsPtr; + const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSAccessProc *proc = fsPtr->accessProc; - if (proc != NULL) { - return (*proc)(pathPtr, mode); - } + if (fsPtr != NULL && fsPtr->accessProc != NULL) { + return fsPtr->accessProc(pathPtr, mode); } - Tcl_SetErrno(ENOENT); return -1; } @@ -2024,7 +2033,6 @@ Tcl_FSOpenFileChannel( const Tcl_Filesystem *fsPtr; Tcl_Channel retVal = NULL; - /* * We need this just to ensure we return the correct error messages under * some circumstances. @@ -2035,49 +2043,47 @@ Tcl_FSOpenFileChannel( } fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSOpenFileChannelProc *proc = fsPtr->openFileChannelProc; - if (proc != NULL) { - int mode, seekFlag, binary; + if (fsPtr != NULL && fsPtr->openFileChannelProc != NULL) { + int mode, seekFlag, binary; - /* - * Parse the mode, picking up whether we want to seek to start - * with and/or set the channel automatically into binary mode. - */ + /* + * Parse the mode, picking up whether we want to seek to start with + * and/or set the channel automatically into binary mode. + */ - mode = TclGetOpenModeEx(interp, modeString, &seekFlag, &binary); - if (mode == -1) { - return NULL; - } + mode = TclGetOpenModeEx(interp, modeString, &seekFlag, &binary); + if (mode == -1) { + return NULL; + } - /* - * Do the actual open() call. - */ + /* + * Do the actual open() call. + */ - retVal = (*proc)(interp, pathPtr, mode, permissions); - if (retVal == NULL) { - return NULL; - } + retVal = fsPtr->openFileChannelProc(interp, pathPtr, mode, + permissions); + if (retVal == NULL) { + return NULL; + } - /* - * Apply appropriate flags parsed out above. - */ + /* + * Apply appropriate flags parsed out above. + */ - if (seekFlag && Tcl_Seek(retVal, (Tcl_WideInt)0, - SEEK_END) < (Tcl_WideInt)0) { - if (interp != NULL) { - Tcl_AppendResult(interp, "could not seek to end " - "of file while opening \"", Tcl_GetString(pathPtr), - "\": ", Tcl_PosixError(interp), NULL); - } - Tcl_Close(NULL, retVal); - return NULL; - } - if (binary) { - Tcl_SetChannelOption(interp, retVal, "-translation", "binary"); + if (seekFlag && Tcl_Seek(retVal, (Tcl_WideInt) 0, SEEK_END) + < (Tcl_WideInt) 0) { + if (interp != NULL) { + Tcl_AppendResult(interp, "could not seek to end of file " + "while opening \"", Tcl_GetString(pathPtr), "\": ", + Tcl_PosixError(interp), NULL); } - return retVal; + Tcl_Close(NULL, retVal); + return NULL; + } + if (binary) { + Tcl_SetChannelOption(interp, retVal, "-translation", "binary"); } + return retVal; } /* @@ -2116,12 +2122,11 @@ Tcl_FSUtime( * times to use. Should not be modified. */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSUtimeProc *proc = fsPtr->utimeProc; - if (proc != NULL) { - return (*proc)(pathPtr, tval); - } + + if (fsPtr != NULL && fsPtr->utimeProc != NULL) { + return fsPtr->utimeProc(pathPtr, tval); } + /* TODO: set errno here? Tcl_SetErrno(ENOENT); */ return -1; } @@ -2246,11 +2251,8 @@ Tcl_FSFileAttrStrings( { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSFileAttrStringsProc *proc = fsPtr->fileAttrStringsProc; - if (proc != NULL) { - return (*proc)(pathPtr, objPtrRef); - } + if (fsPtr != NULL && fsPtr->fileAttrStringsProc != NULL) { + return fsPtr->fileAttrStringsProc(pathPtr, objPtrRef); } Tcl_SetErrno(ENOENT); return NULL; @@ -2363,11 +2365,8 @@ Tcl_FSFileAttrsGet( { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSFileAttrsGetProc *proc = fsPtr->fileAttrsGetProc; - if (proc != NULL) { - return (*proc)(interp, index, pathPtr, objPtrRef); - } + if (fsPtr != NULL && fsPtr->fileAttrsGetProc != NULL) { + return fsPtr->fileAttrsGetProc(interp, index, pathPtr, objPtrRef); } Tcl_SetErrno(ENOENT); return -1; @@ -2400,11 +2399,8 @@ Tcl_FSFileAttrsSet( { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSFileAttrsSetProc *proc = fsPtr->fileAttrsSetProc; - if (proc != NULL) { - return (*proc)(interp, index, pathPtr, objPtr); - } + if (fsPtr != NULL && fsPtr->fileAttrsSetProc != NULL) { + return fsPtr->fileAttrsSetProc(interp, index, pathPtr, objPtr); } Tcl_SetErrno(ENOENT); return -1; @@ -2465,55 +2461,55 @@ Tcl_FSGetCwd( * indicates the particular function has succeeded. */ - fsRecPtr = FsGetFirstFilesystem(); - while ((retVal == NULL) && (fsRecPtr != NULL)) { - Tcl_FSGetCwdProc *proc = fsRecPtr->fsPtr->getCwdProc; - if (proc != NULL) { - if (fsRecPtr->fsPtr->version != TCL_FILESYSTEM_VERSION_1) { - ClientData retCd; - TclFSGetCwdProc2 *proc2 = (TclFSGetCwdProc2*)proc; - - retCd = (*proc2)(NULL); - if (retCd != NULL) { - Tcl_Obj *norm; - /* Looks like a new current directory */ - retVal = (*fsRecPtr->fsPtr->internalToNormalizedProc)( - retCd); - Tcl_IncrRefCount(retVal); - norm = TclFSNormalizeAbsolutePath(interp,retVal,NULL); - if (norm != NULL) { - /* - * We found a cwd, which is now in our global - * storage. We must make a copy. Norm already has - * a refCount of 1. - * - * Threading issue: note that multiple threads at - * system startup could in principle call this - * function simultaneously. They will therefore - * each set the cwdPathPtr independently. That - * behaviour is a bit peculiar, but should be - * fine. Once we have a cwd, we'll always be in - * the 'else' branch below which is simpler. - */ - - FsUpdateCwd(norm, retCd); - Tcl_DecrRefCount(norm); - } else { - (*fsRecPtr->fsPtr->freeInternalRepProc)(retCd); - } - Tcl_DecrRefCount(retVal); - retVal = NULL; - goto cdDidNotChange; - } else if (interp != NULL) { - Tcl_AppendResult(interp, - "error getting working directory name: ", - Tcl_PosixError(interp), NULL); - } + for (fsRecPtr = FsGetFirstFilesystem(); + (retVal == NULL) && (fsRecPtr != NULL); + fsRecPtr = fsRecPtr->nextPtr) { + ClientData retCd; + TclFSGetCwdProc2 *proc2; + if (fsRecPtr->fsPtr->getCwdProc == NULL) { + continue; + } + + if (fsRecPtr->fsPtr->version == TCL_FILESYSTEM_VERSION_1) { + retVal = fsRecPtr->fsPtr->getCwdProc(interp); + continue; + } + + proc2 = (TclFSGetCwdProc2 *) fsRecPtr->fsPtr->getCwdProc; + retCd = proc2(NULL); + if (retCd != NULL) { + Tcl_Obj *norm; + + /* Looks like a new current directory */ + retVal = (*fsRecPtr->fsPtr->internalToNormalizedProc)(retCd); + Tcl_IncrRefCount(retVal); + norm = TclFSNormalizeAbsolutePath(interp,retVal,NULL); + if (norm != NULL) { + /* + * We found a cwd, which is now in our global storage. We + * must make a copy. Norm already has a refCount of 1. + * + * Threading issue: note that multiple threads at system + * startup could in principle call this function + * simultaneously. They will therefore each set the + * cwdPathPtr independently. That behaviour is a bit + * peculiar, but should be fine. Once we have a cwd, we'll + * always be in the 'else' branch below which is simpler. + */ + + FsUpdateCwd(norm, retCd); + Tcl_DecrRefCount(norm); } else { - retVal = (*proc)(interp); + (*fsRecPtr->fsPtr->freeInternalRepProc)(retCd); } + Tcl_DecrRefCount(retVal); + retVal = NULL; + goto cdDidNotChange; + } else if (interp != NULL) { + Tcl_AppendResult(interp, + "error getting working directory name: ", + Tcl_PosixError(interp), NULL); } - fsRecPtr = fsRecPtr->nextPtr; } /* @@ -2527,6 +2523,7 @@ Tcl_FSGetCwd( if (retVal != NULL) { Tcl_Obj *norm = TclFSNormalizeAbsolutePath(interp, retVal, NULL); + if (norm != NULL) { /* * We found a cwd, which is now in our global storage. We must @@ -2541,6 +2538,7 @@ Tcl_FSGetCwd( */ ClientData cd = (ClientData) Tcl_FSGetNativePath(norm); + FsUpdateCwd(norm, TclNativeDupInternalRep(cd)); Tcl_DecrRefCount(norm); } @@ -2554,7 +2552,10 @@ Tcl_FSGetCwd( * the permissions on that directory have changed. */ - const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(tsdPtr->cwdPathPtr); + const Tcl_Filesystem *fsPtr = + Tcl_FSGetFileSystemForPath(tsdPtr->cwdPathPtr); + ClientData retCd = NULL; + Tcl_Obj *retVal, *norm; /* * If the filesystem couldn't be found, or if no cwd function exists @@ -2565,94 +2566,98 @@ Tcl_FSGetCwd( * (This is tested for in the test suite on unix). */ - if (fsPtr != NULL) { - Tcl_FSGetCwdProc *proc = fsPtr->getCwdProc; - ClientData retCd = NULL; - if (proc != NULL) { - Tcl_Obj *retVal; - if (fsPtr->version != TCL_FILESYSTEM_VERSION_1) { - TclFSGetCwdProc2 *proc2 = (TclFSGetCwdProc2*)proc; - - retCd = (*proc2)(tsdPtr->cwdClientData); - if (retCd == NULL && interp != NULL) { - Tcl_AppendResult(interp, - "error getting working directory name: ", - Tcl_PosixError(interp), NULL); - } + if (fsPtr == NULL || fsPtr->getCwdProc == NULL) { + goto cdDidNotChange; + } - if (retCd == tsdPtr->cwdClientData) { - goto cdDidNotChange; - } + if (fsPtr->version == TCL_FILESYSTEM_VERSION_1) { + retVal = fsPtr->getCwdProc(interp); + } else { + /* + * New API. + */ - /* - * Looks like a new current directory. - */ + TclFSGetCwdProc2 *proc2 = (TclFSGetCwdProc2 *) fsPtr->getCwdProc; - retVal = (*fsPtr->internalToNormalizedProc)(retCd); - Tcl_IncrRefCount(retVal); - } else { - retVal = (*proc)(interp); - } - if (retVal != NULL) { - Tcl_Obj *norm = TclFSNormalizeAbsolutePath(interp, - retVal, NULL); + retCd = proc2(tsdPtr->cwdClientData); + if (retCd == NULL && interp != NULL) { + Tcl_AppendResult(interp, + "error getting working directory name: ", + Tcl_PosixError(interp), NULL); + } - /* - * Check whether cwd has changed from the value previously - * stored in cwdPathPtr. Really 'norm' shouldn't be NULL, - * but we are careful. - */ + if (retCd == tsdPtr->cwdClientData) { + goto cdDidNotChange; + } - if (norm == NULL) { - /* Do nothing */ - if (retCd != NULL) { - (*fsPtr->freeInternalRepProc)(retCd); - } - } else if (norm == tsdPtr->cwdPathPtr) { - goto cdEqual; - } else { - /* - * Note that both 'norm' and 'tsdPtr->cwdPathPtr' are - * normalized paths. Therefore we can be more - * efficient than calling 'Tcl_FSEqualPaths', and in - * addition avoid a nasty infinite loop bug when - * trying to normalize tsdPtr->cwdPathPtr. - */ + /* + * Looks like a new current directory. + */ - int len1, len2; - char *str1, *str2; - - str1 = Tcl_GetStringFromObj(tsdPtr->cwdPathPtr, &len1); - str2 = Tcl_GetStringFromObj(norm, &len2); - if ((len1 == len2) && (strcmp(str1, str2) == 0)) { - /* - * If the paths were equal, we can be more - * efficient and retain the old path object which - * will probably already be shared. In this case - * we can simply free the normalized path we just - * calculated. - */ - - cdEqual: - Tcl_DecrRefCount(norm); - if (retCd != NULL) { - (*fsPtr->freeInternalRepProc)(retCd); - } - } else { - FsUpdateCwd(norm, retCd); - Tcl_DecrRefCount(norm); - } - } - Tcl_DecrRefCount(retVal); - } else { - /* - * The 'cwd' function returned an error; reset the cwd. - */ + retVal = fsPtr->internalToNormalizedProc(retCd); + Tcl_IncrRefCount(retVal); + } - FsUpdateCwd(NULL, NULL); + /* + * Check if the 'cwd' function returned an error; if so, reset the + * cwd. + */ + + if (retVal == NULL) { + FsUpdateCwd(NULL, NULL); + goto cdDidNotChange; + } + + /* + * Normalize the path. + */ + + norm = TclFSNormalizeAbsolutePath(interp, retVal, NULL); + + /* + * Check whether cwd has changed from the value previously stored in + * cwdPathPtr. Really 'norm' shouldn't be NULL, but we are careful. + */ + + if (norm == NULL) { + /* Do nothing */ + if (retCd != NULL) { + fsPtr->freeInternalRepProc(retCd); + } + } else if (norm == tsdPtr->cwdPathPtr) { + goto cdEqual; + } else { + /* + * Note that both 'norm' and 'tsdPtr->cwdPathPtr' are normalized + * paths. Therefore we can be more efficient than calling + * 'Tcl_FSEqualPaths', and in addition avoid a nasty infinite loop + * bug when trying to normalize tsdPtr->cwdPathPtr. + */ + + int len1, len2; + char *str1, *str2; + + str1 = Tcl_GetStringFromObj(tsdPtr->cwdPathPtr, &len1); + str2 = Tcl_GetStringFromObj(norm, &len2); + if ((len1 == len2) && (strcmp(str1, str2) == 0)) { + /* + * If the paths were equal, we can be more efficient and + * retain the old path object which will probably already be + * shared. In this case we can simply free the normalized path + * we just calculated. + */ + + cdEqual: + Tcl_DecrRefCount(norm); + if (retCd != NULL) { + fsPtr->freeInternalRepProc(retCd); } + } else { + FsUpdateCwd(norm, retCd); + Tcl_DecrRefCount(norm); } } + Tcl_DecrRefCount(retVal); } cdDidNotChange: @@ -2697,14 +2702,13 @@ Tcl_FSChdir( fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); if (fsPtr != NULL) { - Tcl_FSChdirProc *proc = fsPtr->chdirProc; - if (proc != NULL) { + if (fsPtr->chdirProc != NULL) { /* * If this fails, an appropriate errno will have been stored using * 'Tcl_SetErrno()'. */ - retVal = (*proc)(pathPtr); + retVal = fsPtr->chdirProc(pathPtr); } else { /* * Fallback on stat-based implementation. @@ -2738,9 +2742,7 @@ Tcl_FSChdir( * was no error we must assume that the cwd was actually changed to the * normalized value we calculated above, and we must therefore cache that * information. - */ - - /* + * * If the filesystem in question has a getCwdProc, then the correct logic * which performs the part below is already part of the Tcl_FSGetCwd() * call, so no need to replicate it again. This will have a side effect @@ -2800,8 +2802,9 @@ Tcl_FSChdir( * Assumption we are using a filesystem version 2. */ - TclFSGetCwdProc2 *proc2 = (TclFSGetCwdProc2*)fsPtr->getCwdProc; - cd = (*proc2)(oldcd); + TclFSGetCwdProc2 *proc2 = (TclFSGetCwdProc2 *) fsPtr->getCwdProc; + + cd = proc2(oldcd); if (cd != oldcd) { FsUpdateCwd(normDirName, cd); } @@ -2892,7 +2895,7 @@ Tcl_FSLoadFile( * Tcl_FSLoadFileProc are both misleading. */ - *handlePtr = (Tcl_LoadHandle) clientData; + *handlePtr = clientData; return res; } @@ -2954,7 +2957,6 @@ TclLoadFile( * file. */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - Tcl_FSLoadFileProc *proc; Tcl_Filesystem *copyFsPtr; Tcl_Obj *copyToPtr; Tcl_LoadHandle newLoadHandle = NULL; @@ -2968,9 +2970,10 @@ TclLoadFile( return TCL_ERROR; } - proc = fsPtr->loadFileProc; - if (proc != NULL) { - int retVal = (*proc)(interp, pathPtr, handlePtr, unloadProcPtr); + if (fsPtr->loadFileProc != NULL) { + int retVal = fsPtr->loadFileProc(interp, pathPtr, handlePtr, + unloadProcPtr); + if (retVal == TCL_OK) { if (*handlePtr == NULL) { return TCL_ERROR; @@ -2980,7 +2983,7 @@ TclLoadFile( * Copy this across, since both are equal for the native fs. */ - *clientDataPtr = (ClientData)*handlePtr; + *clientDataPtr = *handlePtr; Tcl_ResetResult(interp); goto resolveSymbols; } @@ -3042,7 +3045,7 @@ TclLoadFile( ret = TclpLoadMemory(interp, buffer, size, ret, handlePtr, unloadProcPtr); if (ret == TCL_OK && *handlePtr != NULL) { - *clientDataPtr = (ClientData) *handlePtr; + *clientDataPtr = *handlePtr; goto resolveSymbols; } } @@ -3143,9 +3146,9 @@ TclLoadFile( * handle and unload proc ptr. */ - (*handlePtr) = newLoadHandle; - (*clientDataPtr) = newClientData; - (*unloadProcPtr) = newUnloadProcPtr; + *handlePtr = newLoadHandle; + *clientDataPtr = newClientData; + *unloadProcPtr = newUnloadProcPtr; Tcl_ResetResult(interp); return TCL_OK; } @@ -3200,9 +3203,9 @@ TclLoadFile( } copyToPtr = NULL; - (*handlePtr) = newLoadHandle; - (*clientDataPtr) = (ClientData) tvdlPtr; - (*unloadProcPtr) = &FSUnloadTempFile; + *handlePtr = newLoadHandle; + *clientDataPtr = tvdlPtr; + *unloadProcPtr = &FSUnloadTempFile; Tcl_ResetResult(interp); return retVal; @@ -3256,7 +3259,7 @@ TclpLoadFile( return TCL_ERROR; } - *clientDataPtr = (ClientData) handle; + *clientDataPtr = handle; *proc1Ptr = TclpFindSymbol(interp, handle, sym1); *proc2Ptr = TclpFindSymbol(interp, handle, sym2); @@ -3319,7 +3322,6 @@ FSUnloadTempFile( TclpDeleteFile(tvdlPtr->divertedFileNativeRep); NativeFreeInternalRep(tvdlPtr->divertedFileNativeRep); - } else { /* * Remove the temporary file we created. Note, we may crash here @@ -3354,7 +3356,7 @@ FSUnloadTempFile( Tcl_DecrRefCount(tvdlPtr->divertedFile); } - ckfree((char*)tvdlPtr); + ckfree((char *) tvdlPtr); } /* @@ -3398,12 +3400,8 @@ Tcl_FSLink( { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSLinkProc *proc = fsPtr->linkProc; - - if (proc != NULL) { - return (*proc)(pathPtr, toPtr, linkAction); - } + if (fsPtr != NULL && fsPtr->linkProc != NULL) { + return fsPtr->linkProc(pathPtr, toPtr, linkAction); } /* @@ -3415,7 +3413,7 @@ Tcl_FSLink( */ #ifndef S_IFLNK - errno = EINVAL; + errno = EINVAL; /* TODO: Change to Tcl_SetErrno()? */ #else Tcl_SetErrno(ENOENT); #endif /* S_IFLNK */ @@ -3447,7 +3445,7 @@ Tcl_FSLink( *--------------------------------------------------------------------------- */ -Tcl_Obj* +Tcl_Obj * Tcl_FSListVolumes(void) { FilesystemRecord *fsRecPtr; @@ -3462,9 +3460,9 @@ Tcl_FSListVolumes(void) fsRecPtr = FsGetFirstFilesystem(); while (fsRecPtr != NULL) { - Tcl_FSListVolumesProc *proc = fsRecPtr->fsPtr->listVolumesProc; - if (proc != NULL) { - Tcl_Obj *thisFsVolumes = (*proc)(); + if (fsRecPtr->fsPtr->listVolumesProc != NULL) { + Tcl_Obj *thisFsVolumes = fsRecPtr->fsPtr->listVolumesProc(); + if (thisFsVolumes != NULL) { Tcl_ListObjAppendList(NULL, resultPtr, thisFsVolumes); Tcl_DecrRefCount(thisFsVolumes); @@ -3512,15 +3510,13 @@ FsListMounts( fsRecPtr = FsGetFirstFilesystem(); while (fsRecPtr != NULL) { - if (fsRecPtr->fsPtr != &tclNativeFilesystem) { - Tcl_FSMatchInDirectoryProc *proc = - fsRecPtr->fsPtr->matchInDirectoryProc; - if (proc != NULL) { - if (resultPtr == NULL) { - resultPtr = Tcl_NewObj(); - } - (*proc)(NULL, resultPtr, pathPtr, pattern, &mountsOnly); + if (fsRecPtr->fsPtr != &tclNativeFilesystem && + fsRecPtr->fsPtr->matchInDirectoryProc != NULL) { + if (resultPtr == NULL) { + resultPtr = Tcl_NewObj(); } + fsRecPtr->fsPtr->matchInDirectoryProc(NULL, resultPtr, pathPtr, + pattern, &mountsOnly); } fsRecPtr = fsRecPtr->nextPtr; } @@ -3578,6 +3574,7 @@ Tcl_FSSplitPath( if (fsPtr->filesystemSeparatorProc != NULL) { Tcl_Obj *sep = (*fsPtr->filesystemSeparatorProc)(pathPtr); + if (sep != NULL) { Tcl_IncrRefCount(sep); separator = Tcl_GetString(sep)[0]; @@ -3604,12 +3601,14 @@ Tcl_FSSplitPath( for (;;) { char *elementStart = p; int length; + while ((*p != '\0') && (*p != separator)) { p++; } length = p - elementStart; if (length > 0) { Tcl_Obj *nextElt; + if (elementStart[0] == '~') { TclNewLiteralStringObj(nextElt, "./"); Tcl_AppendToObj(nextElt, elementStart, length); @@ -3650,12 +3649,11 @@ TclFSInternalToNormalized( fsRecPtr = fsRecPtr->nextPtr; } - if ((fsRecPtr != NULL) - && (fromFilesystem->internalToNormalizedProc != NULL)) { - return (*fromFilesystem->internalToNormalizedProc)(clientData); - } else { + if ((fsRecPtr == NULL) + || (fromFilesystem->internalToNormalizedProc == NULL)) { return NULL; } + return (*fromFilesystem->internalToNormalizedProc)(clientData); } /* @@ -3694,11 +3692,9 @@ TclGetPathType( * caller. */ { int pathLen; - char *path; + char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); Tcl_PathType type; - path = Tcl_GetStringFromObj(pathPtr, &pathLen); - type = TclFSNonnativePathType(path, pathLen, filesystemPtrPtr, driveNameLengthPtr, driveNameRef); @@ -3762,17 +3758,15 @@ TclFSNonnativePathType( fsRecPtr = FsGetFirstFilesystem(); while (fsRecPtr != NULL) { - Tcl_FSListVolumesProc *proc = fsRecPtr->fsPtr->listVolumesProc; - /* * We want to skip the native filesystem in this loop because * otherwise we won't necessarily pass all the Tcl testsuite -- this * is because some of the tests artificially change the current * platform (between win, unix) but the list of volumes we get by - * calling (*proc) will reflect the current (real) platform only and - * this may cause some tests to fail. In particular, on unix '/' will - * match the beginning of certain absolute Windows paths starting '//' - * and those tests will go wrong. + * calling fsRecPtr->fsPtr->listVolumesProc will reflect the current + * (real) platform only and this may cause some tests to fail. In + * particular, on Unix '/' will match the beginning of certain + * absolute Windows paths starting '//' and those tests will go wrong. * * Besides these test-suite issues, there is one other reason to skip * the native filesystem --- since the tclFilename.c code has nice @@ -3783,18 +3777,19 @@ TclFSNonnativePathType( * better. */ - if ((fsRecPtr->fsPtr != &tclNativeFilesystem) && (proc != NULL)) { + if ((fsRecPtr->fsPtr != &tclNativeFilesystem) + && (fsRecPtr->fsPtr->listVolumesProc != NULL)) { int numVolumes; - Tcl_Obj *thisFsVolumes = (*proc)(); + Tcl_Obj *thisFsVolumes = fsRecPtr->fsPtr->listVolumesProc(); if (thisFsVolumes != NULL) { if (Tcl_ListObjLength(NULL, thisFsVolumes, &numVolumes) != TCL_OK) { /* - * This is VERY bad; the Tcl_FSListVolumesProc didn't - * return a valid list. Set numVolumes to -1 so that we - * skip the while loop below and just return with the - * current value of 'type'. + * This is VERY bad; the listVolumesProc didn't return a + * valid list. Set numVolumes to -1 so that we skip the + * while loop below and just return with the current value + * of 'type'. * * It would be better if we could signal an error here * (but Tcl_Panic seems a bit excessive). @@ -3833,6 +3828,7 @@ TclFSNonnativePathType( /* * We don't need to examine any more filesystems. */ + break; } } @@ -3862,21 +3858,20 @@ TclFSNonnativePathType( int Tcl_FSRenameFile( - Tcl_Obj* srcPathPtr, /* Pathname of file or dir to be renamed + Tcl_Obj *srcPathPtr, /* Pathname of file or dir to be renamed * (UTF-8). */ Tcl_Obj *destPathPtr) /* New pathname of file or directory * (UTF-8). */ { int retVal = -1; const Tcl_Filesystem *fsPtr, *fsPtr2; + fsPtr = Tcl_FSGetFileSystemForPath(srcPathPtr); fsPtr2 = Tcl_FSGetFileSystemForPath(destPathPtr); - if ((fsPtr == fsPtr2) && (fsPtr != NULL)) { - Tcl_FSRenameFileProc *proc = fsPtr->renameFileProc; - if (proc != NULL) { - retVal = (*proc)(srcPathPtr, destPathPtr); - } + if ((fsPtr == fsPtr2) && (fsPtr != NULL) + && (fsPtr->renameFileProc != NULL)) { + retVal = fsPtr->renameFileProc(srcPathPtr, destPathPtr); } if (retVal == -1) { Tcl_SetErrno(EXDEV); @@ -3913,14 +3908,12 @@ Tcl_FSCopyFile( { int retVal = -1; const Tcl_Filesystem *fsPtr, *fsPtr2; + fsPtr = Tcl_FSGetFileSystemForPath(srcPathPtr); fsPtr2 = Tcl_FSGetFileSystemForPath(destPathPtr); - if (fsPtr == fsPtr2 && fsPtr != NULL) { - Tcl_FSCopyFileProc *proc = fsPtr->copyFileProc; - if (proc != NULL) { - retVal = (*proc)(srcPathPtr, destPathPtr); - } + if (fsPtr == fsPtr2 && fsPtr != NULL && fsPtr->copyFileProc != NULL) { + retVal = fsPtr->copyFileProc(srcPathPtr, destPathPtr); } if (retVal == -1) { Tcl_SetErrno(EXDEV); @@ -3945,6 +3938,7 @@ Tcl_FSCopyFile( * *--------------------------------------------------------------------------- */ + int TclCrossFilesystemCopy( Tcl_Interp *interp, /* For error messages */ @@ -4027,11 +4021,9 @@ Tcl_FSDeleteFile( Tcl_Obj *pathPtr) /* Pathname of file to be removed (UTF-8). */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSDeleteFileProc *proc = fsPtr->deleteFileProc; - if (proc != NULL) { - return (*proc)(pathPtr); - } + + if (fsPtr != NULL && fsPtr->deleteFileProc != NULL) { + return fsPtr->deleteFileProc(pathPtr); } Tcl_SetErrno(ENOENT); return -1; @@ -4059,11 +4051,9 @@ Tcl_FSCreateDirectory( Tcl_Obj *pathPtr) /* Pathname of directory to create (UTF-8). */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL) { - Tcl_FSCreateDirectoryProc *proc = fsPtr->createDirectoryProc; - if (proc != NULL) { - return (*proc)(pathPtr); - } + + if (fsPtr != NULL && fsPtr->createDirectoryProc != NULL) { + return fsPtr->createDirectoryProc(pathPtr); } Tcl_SetErrno(ENOENT); return -1; @@ -4089,7 +4079,7 @@ Tcl_FSCreateDirectory( int Tcl_FSCopyDirectory( - Tcl_Obj* srcPathPtr, /* Pathname of directory to be copied + Tcl_Obj *srcPathPtr, /* Pathname of directory to be copied * (UTF-8). */ Tcl_Obj *destPathPtr, /* Pathname of target directory (UTF-8). */ Tcl_Obj **errorPtr) /* If non-NULL, then will be set to a new @@ -4098,14 +4088,12 @@ Tcl_FSCopyDirectory( { int retVal = -1; const Tcl_Filesystem *fsPtr, *fsPtr2; + fsPtr = Tcl_FSGetFileSystemForPath(srcPathPtr); fsPtr2 = Tcl_FSGetFileSystemForPath(destPathPtr); - if (fsPtr == fsPtr2 && fsPtr != NULL) { - Tcl_FSCopyDirectoryProc *proc = fsPtr->copyDirectoryProc; - if (proc != NULL) { - retVal = (*proc)(srcPathPtr, destPathPtr, errorPtr); - } + if (fsPtr == fsPtr2 && fsPtr != NULL && fsPtr->copyDirectoryProc != NULL){ + retVal = fsPtr->copyDirectoryProc(srcPathPtr, destPathPtr, errorPtr); } if (retVal == -1) { Tcl_SetErrno(EXDEV); @@ -4142,8 +4130,8 @@ Tcl_FSRemoveDirectory( * error, with refCount 1. */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); + if (fsPtr != NULL && fsPtr->removeDirectoryProc != NULL) { - Tcl_FSRemoveDirectoryProc *proc = fsPtr->removeDirectoryProc; if (recursive) { /* * We check whether the cwd lies inside this directory and move it @@ -4177,7 +4165,7 @@ Tcl_FSRemoveDirectory( Tcl_DecrRefCount(cwdPtr); } } - return (*proc)(pathPtr, recursive, errorPtr); + return fsPtr->removeDirectoryProc(pathPtr, recursive, errorPtr); } Tcl_SetErrno(ENOENT); return -1; @@ -4204,10 +4192,10 @@ Tcl_FSRemoveDirectory( Tcl_Filesystem * Tcl_FSGetFileSystemForPath( - Tcl_Obj* pathPtr) + Tcl_Obj *pathPtr) { FilesystemRecord *fsRecPtr; - Tcl_Filesystem* retVal = NULL; + Tcl_Filesystem *retVal = NULL; if (pathPtr == NULL) { Tcl_Panic("Tcl_FSGetFileSystemForPath called with NULL object"); @@ -4233,9 +4221,11 @@ Tcl_FSGetFileSystemForPath( */ fsRecPtr = FsGetFirstFilesystem(); - if (TclFSEnsureEpochOk(pathPtr, &retVal) != TCL_OK) { return NULL; + } else if (retVal != NULL) { + /* TODO: Can this happen? */ + return retVal; } /* @@ -4243,26 +4233,25 @@ Tcl_FSGetFileSystemForPath( * non-return value of -1 indicates the particular function has succeeded. */ - while ((retVal == NULL) && (fsRecPtr != NULL)) { - Tcl_FSPathInFilesystemProc *proc = - fsRecPtr->fsPtr->pathInFilesystemProc; + for (; fsRecPtr!=NULL ; fsRecPtr=fsRecPtr->nextPtr) { + ClientData clientData = NULL; - if (proc != NULL) { - ClientData clientData = NULL; - if ((*proc)(pathPtr, &clientData) != -1) { - /* - * We assume the type of pathPtr hasn't been changed by the - * above call to the pathInFilesystemProc. - */ + if (fsRecPtr->fsPtr->pathInFilesystemProc == NULL) { + continue; + } - TclFSSetPathDetails(pathPtr, fsRecPtr, clientData); - retVal = fsRecPtr->fsPtr; - } + if (fsRecPtr->fsPtr->pathInFilesystemProc(pathPtr, &clientData)!=-1) { + /* + * We assume the type of pathPtr hasn't been changed by the above + * call to the pathInFilesystemProc. + */ + + TclFSSetPathDetails(pathPtr, fsRecPtr, clientData); + return fsRecPtr->fsPtr; } - fsRecPtr = fsRecPtr->nextPtr; } - return retVal; + return NULL; } /* @@ -4347,7 +4336,6 @@ Tcl_FSFileSystemInfo( Tcl_Obj *pathPtr) { Tcl_Obj *resPtr; - Tcl_FSFilesystemPathTypeProc *proc; const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); if (fsPtr == NULL) { @@ -4355,11 +4343,12 @@ Tcl_FSFileSystemInfo( } resPtr = Tcl_NewListObj(0, NULL); - Tcl_ListObjAppendElement(NULL,resPtr,Tcl_NewStringObj(fsPtr->typeName,-1)); + Tcl_ListObjAppendElement(NULL, resPtr, + Tcl_NewStringObj(fsPtr->typeName, -1)); + + if (fsPtr->filesystemPathTypeProc != NULL) { + Tcl_Obj *typePtr = fsPtr->filesystemPathTypeProc(pathPtr); - proc = fsPtr->filesystemPathTypeProc; - if (proc != NULL) { - Tcl_Obj *typePtr = (*proc)(pathPtr); if (typePtr != NULL) { Tcl_ListObjAppendElement(NULL, resPtr, typePtr); } diff --git a/generic/tclInt.h b/generic/tclInt.h index f2a125b..2c50d21 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.365 2008/04/16 14:49:29 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.366 2008/05/02 10:27:07 dkf Exp $ */ #ifndef _TCLINT @@ -2269,10 +2269,10 @@ typedef enum Tcl_PathPart { *---------------------------------------------------------------- */ -typedef int (TclStatProc_) (CONST char *path, struct stat *buf); -typedef int (TclAccessProc_) (CONST char *path, int mode); +typedef int (TclStatProc_) (const char *path, struct stat *buf); +typedef int (TclAccessProc_) (const char *path, int mode); typedef Tcl_Channel (TclOpenFileChannelProc_) (Tcl_Interp *interp, - CONST char *fileName, CONST char *modeString, int permissions); + const char *fileName, const char *modeString, int permissions); /* *---------------------------------------------------------------- diff --git a/generic/tclRegexp.h b/generic/tclRegexp.h index af5a9ae..bd26b85 100644 --- a/generic/tclRegexp.h +++ b/generic/tclRegexp.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.h,v 1.15 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclRegexp.h,v 1.16 2008/05/02 10:27:08 dkf Exp $ */ #ifndef _TCLREGEXP @@ -30,7 +30,7 @@ typedef struct TclRegexp { int flags; /* Regexp compile flags. */ regex_t re; /* Compiled re, includes number of * subexpressions. */ - CONST char *string; /* Last string passed to Tcl_RegExpExec. */ + const char *string; /* Last string passed to Tcl_RegExpExec. */ Tcl_Obj *objPtr; /* Last object passed to Tcl_RegExpExecObj. */ Tcl_Obj *globObjPtr; /* Glob pattern rep of RE or NULL if none. */ regmatch_t *matches; /* Array of indices into the Tcl_UniChar diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 2da95b5..f925b49 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.65 2008/03/11 22:26:27 das Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.66 2008/05/02 10:27:04 dkf Exp $ */ #ifndef _TCLUNIXPORT @@ -595,8 +595,8 @@ typedef int socklen_t; #define TclpExit exit #ifdef TCL_THREADS -EXTERN struct tm * TclpLocaltime(CONST time_t *); -EXTERN struct tm * TclpGmtime(CONST time_t *); +EXTERN struct tm * TclpLocaltime(const time_t *); +EXTERN struct tm * TclpGmtime(const time_t *); EXTERN char * TclpInetNtoa(struct in_addr); /* #define localtime(x) TclpLocaltime(x) * #define gmtime(x) TclpGmtime(x) */ diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 40aa67c..0843bf1 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInt.h,v 1.29 2005/11/03 01:16:07 patthoyts Exp $ + * RCS: @(#) $Id: tclWinInt.h,v 1.30 2008/05/02 10:27:08 dkf Exp $ */ #ifndef _TCLWININT @@ -51,38 +51,38 @@ typedef union { typedef struct TclWinProcs { int useWide; - BOOL (WINAPI *buildCommDCBProc)(CONST TCHAR *, LPDCB); + BOOL (WINAPI *buildCommDCBProc)(const TCHAR *, LPDCB); TCHAR *(WINAPI *charLowerProc)(TCHAR *); - BOOL (WINAPI *copyFileProc)(CONST TCHAR *, CONST TCHAR *, BOOL); - BOOL (WINAPI *createDirectoryProc)(CONST TCHAR *, LPSECURITY_ATTRIBUTES); - HANDLE (WINAPI *createFileProc)(CONST TCHAR *, DWORD, DWORD, + BOOL (WINAPI *copyFileProc)(const TCHAR *, const TCHAR *, BOOL); + BOOL (WINAPI *createDirectoryProc)(const TCHAR *, LPSECURITY_ATTRIBUTES); + HANDLE (WINAPI *createFileProc)(const TCHAR *, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE); - BOOL (WINAPI *createProcessProc)(CONST TCHAR *, TCHAR *, + BOOL (WINAPI *createProcessProc)(const TCHAR *, TCHAR *, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, - LPVOID, CONST TCHAR *, LPSTARTUPINFOA, LPPROCESS_INFORMATION); - BOOL (WINAPI *deleteFileProc)(CONST TCHAR *); - HANDLE (WINAPI *findFirstFileProc)(CONST TCHAR *, WIN32_FIND_DATAT *); + LPVOID, const TCHAR *, LPSTARTUPINFOA, LPPROCESS_INFORMATION); + BOOL (WINAPI *deleteFileProc)(const TCHAR *); + HANDLE (WINAPI *findFirstFileProc)(const TCHAR *, WIN32_FIND_DATAT *); BOOL (WINAPI *findNextFileProc)(HANDLE, WIN32_FIND_DATAT *); BOOL (WINAPI *getComputerNameProc)(WCHAR *, LPDWORD); DWORD (WINAPI *getCurrentDirectoryProc)(DWORD, WCHAR *); - DWORD (WINAPI *getFileAttributesProc)(CONST TCHAR *); - DWORD (WINAPI *getFullPathNameProc)(CONST TCHAR *, DWORD nBufferLength, + DWORD (WINAPI *getFileAttributesProc)(const TCHAR *); + DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD nBufferLength, WCHAR *, TCHAR **); DWORD (WINAPI *getModuleFileNameProc)(HMODULE, WCHAR *, int); - DWORD (WINAPI *getShortPathNameProc)(CONST TCHAR *, WCHAR *, DWORD); - UINT (WINAPI *getTempFileNameProc)(CONST TCHAR *, CONST TCHAR *, UINT, + DWORD (WINAPI *getShortPathNameProc)(const TCHAR *, WCHAR *, DWORD); + UINT (WINAPI *getTempFileNameProc)(const TCHAR *, const TCHAR *, UINT, WCHAR *); DWORD (WINAPI *getTempPathProc)(DWORD, WCHAR *); - BOOL (WINAPI *getVolumeInformationProc)(CONST TCHAR *, WCHAR *, DWORD, + BOOL (WINAPI *getVolumeInformationProc)(const TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, WCHAR *, DWORD); - HINSTANCE (WINAPI *loadLibraryProc)(CONST TCHAR *); - TCHAR (WINAPI *lstrcpyProc)(WCHAR *, CONST TCHAR *); - BOOL (WINAPI *moveFileProc)(CONST TCHAR *, CONST TCHAR *); - BOOL (WINAPI *removeDirectoryProc)(CONST TCHAR *); - DWORD (WINAPI *searchPathProc)(CONST TCHAR *, CONST TCHAR *, - CONST TCHAR *, DWORD, WCHAR *, TCHAR **); - BOOL (WINAPI *setCurrentDirectoryProc)(CONST TCHAR *); - BOOL (WINAPI *setFileAttributesProc)(CONST TCHAR *, DWORD); + HINSTANCE (WINAPI *loadLibraryProc)(const TCHAR *); + TCHAR (WINAPI *lstrcpyProc)(WCHAR *, const TCHAR *); + BOOL (WINAPI *moveFileProc)(const TCHAR *, const TCHAR *); + BOOL (WINAPI *removeDirectoryProc)(const TCHAR *); + DWORD (WINAPI *searchPathProc)(const TCHAR *, const TCHAR *, + const TCHAR *, DWORD, WCHAR *, TCHAR **); + BOOL (WINAPI *setCurrentDirectoryProc)(const TCHAR *); + BOOL (WINAPI *setFileAttributesProc)(const TCHAR *, DWORD); /* * These two function pointers will only be set when * Tcl_FindExecutable is called. If you don't ever call that @@ -90,18 +90,18 @@ typedef struct TclWinProcs { * functions through these null pointers. That is not a bug in Tcl * -- Tcl_FindExecutable is obligatory in recent Tcl releases. */ - BOOL (WINAPI *getFileAttributesExProc)(CONST TCHAR *, + BOOL (WINAPI *getFileAttributesExProc)(const TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID); - BOOL (WINAPI *createHardLinkProc)(CONST TCHAR*, CONST TCHAR*, + BOOL (WINAPI *createHardLinkProc)(const TCHAR*, const TCHAR*, LPSECURITY_ATTRIBUTES); - /* deleted INT (__cdecl *utimeProc)(CONST TCHAR*, struct _utimbuf *); */ + /* deleted INT (__cdecl *utimeProc)(const TCHAR*, struct _utimbuf *); */ /* These two are also NULL at start; see comment above */ - HANDLE (WINAPI *findFirstFileExProc)(CONST TCHAR*, UINT, + HANDLE (WINAPI *findFirstFileExProc)(const TCHAR*, UINT, LPVOID, UINT, LPVOID, DWORD); - BOOL (WINAPI *getVolumeNameForVMPProc)(CONST TCHAR*, TCHAR*, DWORD); - DWORD (WINAPI *getLongPathNameProc)(CONST TCHAR*, TCHAR*, DWORD); + BOOL (WINAPI *getVolumeNameForVMPProc)(const TCHAR*, TCHAR*, DWORD); + DWORD (WINAPI *getLongPathNameProc)(const TCHAR*, TCHAR*, DWORD); /* * These six are for the security sdk to get correct file * permissions on NT, 2000, XP, etc. On 95,98,ME they are @@ -118,7 +118,7 @@ typedef struct TclWinProcs { DWORD DesiredAccess, BOOL OpenAsSelf, PHANDLE TokenHandle); BOOL (WINAPI *revertToSelfProc) (void); - VOID (WINAPI *mapGenericMaskProc) (PDWORD AccessMask, + void (WINAPI *mapGenericMaskProc) (PDWORD AccessMask, PGENERIC_MAPPING GenericMapping); BOOL (WINAPI *accessCheckProc)(PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, @@ -139,7 +139,7 @@ typedef struct TclWinProcs { ); BOOL (WINAPI *writeConsoleProc)( HANDLE hConsoleOutput, - const VOID* lpBuffer, + const void* lpBuffer, DWORD nNumberOfCharsToWrite, LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved @@ -154,7 +154,7 @@ MODULE_SCOPE TclWinProcs *tclWinProcs; */ MODULE_SCOPE char TclWinDriveLetterForVolMountPoint( - CONST WCHAR *mountPoint); + const WCHAR *mountPoint); MODULE_SCOPE void TclWinEncodingsCleanup(); MODULE_SCOPE void TclWinInit(HINSTANCE hInst); MODULE_SCOPE TclFile TclWinMakeFile(HANDLE handle); @@ -165,11 +165,11 @@ MODULE_SCOPE Tcl_Channel TclWinOpenFileChannel(HANDLE handle, char *channelName, MODULE_SCOPE Tcl_Channel TclWinOpenSerialChannel(HANDLE handle, char *channelName, int permissions); MODULE_SCOPE void TclWinResetInterfaceEncodings(); -MODULE_SCOPE HANDLE TclWinSerialReopen(HANDLE handle, CONST TCHAR *name, +MODULE_SCOPE HANDLE TclWinSerialReopen(HANDLE handle, const TCHAR *name, DWORD access); -MODULE_SCOPE int TclWinSymLinkCopyDirectory(CONST TCHAR* LinkOriginal, - CONST TCHAR* LinkCopy); -MODULE_SCOPE int TclWinSymLinkDelete(CONST TCHAR* LinkOriginal, +MODULE_SCOPE int TclWinSymLinkCopyDirectory(const TCHAR* LinkOriginal, + const TCHAR* LinkCopy); +MODULE_SCOPE int TclWinSymLinkDelete(const TCHAR* LinkOriginal, int linkOnly); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) MODULE_SCOPE void TclWinFreeAllocCache(void); -- cgit v0.12 From cf23acaf691cce2fe2edb70428580c9cee877f2c Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 2 May 2008 19:32:30 +0000 Subject: Record tclvfs base --- win/coffbase.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win/coffbase.txt b/win/coffbase.txt index ad2822e..a7ef3f9 100644 --- a/win/coffbase.txt +++ b/win/coffbase.txt @@ -12,7 +12,7 @@ ; they're mutually exclusive. This info is placed in the DLL's PE header by the ; linker with the `-base:@$(TCLDIR)\win\coffbase.txt,` option. ; -; RCS: @(#) $Id: coffbase.txt,v 1.11 2007/12/13 15:28:43 dgp Exp $ +; RCS: @(#) $Id: coffbase.txt,v 1.12 2008/05/02 19:32:30 patthoyts Exp $ tcl 0x10000000 0x00200000 tcldde 0x10200000 0x00010000 @@ -29,7 +29,9 @@ winico 0x10880000 0x00010000 tile 0x10900000 0x00080000 memchan 0x109D0000 0x00010000 tdom 0x109E0000 0x00080000 +tclvfs 0x10A70000 0x00010000 tkvideo 0x10B00000 0x00010000 +tclsdl 0x10B20000 0x00080000 snack 0x1E000000 0x00400000 sound 0x1E400000 0x00400000 snackogg 0x1E800000 0x00200000 -- cgit v0.12 From 650e24f8fcb8f1ae4346ffe2110c471bb7637b01 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 2 May 2008 20:02:35 +0000 Subject: Reverted dkf's accidental commit of the TIP 316 APIs as part of a code cleanup --- ChangeLog | 4 ++ generic/tclFileName.c | 109 +------------------------------------------------- 2 files changed, 5 insertions(+), 108 deletions(-) diff --git a/ChangeLog b/ChangeLog index d662043..71cea17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-05-02 Pat Thoyts + + * generic/tclFileName.c: Reverted accidental commit of TIP 316 APIs. + 2008-04-27 Donal K. Fellows * */*.c: A large tranche of getting rid of pre-C89-isms; if your diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 5c58052..723b993 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.87 2008/05/02 10:27:05 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.88 2008/05/02 20:02:39 patthoyts Exp $ */ #include "tclInt.h" @@ -2523,113 +2523,6 @@ Tcl_AllocStatBuf(void) } /* - *--------------------------------------------------------------------------- - * - * Tcl_Get*FromStat -- - * - * These functions provide portable read-only access to a Tcl_StatBuf. - * - * Results: - * The contents of the relevant field. - * - * Side effects: - * None. - * - *--------------------------------------------------------------------------- - */ - -unsigned -Tcl_GetFSDeviceFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_dev; -} - -unsigned -Tcl_GetFSInodeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_ino; -} - -unsigned -Tcl_GetModeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_mode; -} - -int -Tcl_GetLinkCountFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_nlink; -} - -int -Tcl_GetUserIdFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_uid; -} - -int -Tcl_GetGroupIdFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_gid; -} - -int -Tcl_GetDeviceTypeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_rdev; -} - -Tcl_WideInt -Tcl_GetAccessTimeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_atime; -} - -Tcl_WideInt -Tcl_GetModificationTimeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_mtime; -} - -Tcl_WideInt -Tcl_GetChangeTimeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_ctime; -} - -Tcl_WideUInt -Tcl_GetSizeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return (Tcl_WideUInt) statBufPtr->st_size; -} - -Tcl_WideUInt -Tcl_GetBlocksFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_blocks; -} - -unsigned -Tcl_GetBlockSizeFromStat( - Tcl_StatBuf *statBufPtr) -{ - return statBufPtr->st_blksize; -} - -/* * Local Variables: * mode: c * c-basic-offset: 4 -- cgit v0.12 From ab1dfd493e75af34d7e730e26a189adf49e9ec5d Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 2 May 2008 20:08:50 +0000 Subject: Converted the [binary] command into an ensemble. --- ChangeLog | 5 + generic/tclBasic.c | 10 +- generic/tclBinary.c | 375 ++++++++++++++++++++++++++++++++-------------------- generic/tclInt.h | 6 +- tests/binary.test | 8 +- 5 files changed, 244 insertions(+), 160 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71cea17..679d0cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-05-02 Pat Thoyts + * generic/tclBasic.c: Converted the [binary] command into an + * generic/tclBinary.c: ensemble. + * generic/tclInt.h: + * test/binary.test: Updated the error tests for ensemble errors. + * generic/tclFileName.c: Reverted accidental commit of TIP 316 APIs. 2008-04-27 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8e46a77..4b7593a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.297 2008/04/16 14:49:28 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.298 2008/05/02 20:08:51 patthoyts Exp $ */ #include "tclInt.h" @@ -125,7 +125,6 @@ static const CmdInfo builtInCmds[] = { {"append", Tcl_AppendObjCmd, TclCompileAppendCmd, 1}, {"apply", Tcl_ApplyObjCmd, NULL, 1}, {"array", Tcl_ArrayObjCmd, NULL, 1}, - {"binary", Tcl_BinaryObjCmd, NULL, 1}, {"break", Tcl_BreakObjCmd, TclCompileBreakCmd, 1}, #ifndef EXCLUDE_OBSOLETE_COMMANDS {"case", Tcl_CaseObjCmd, NULL, 1}, @@ -660,11 +659,12 @@ Tcl_CreateInterp(void) } /* - * Create the "chan", "dict", "info" and "string" ensembles. Note that all - * these commands (and their subcommands that are not present in the - * global namespace) are wholly safe. + * Create the "binary", "chan", "dict", "info" and "string" ensembles. + * Note that all these commands (and their subcommands that are not + * present in the global namespace) are wholly safe. */ + TclInitBinaryCmd(interp); TclInitChanCmd(interp); TclInitDictCmd(interp); TclInitInfoCmd(interp); diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 3796ac1..8adf524 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.42 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.43 2008/05/02 20:08:52 patthoyts Exp $ */ #include "tclInt.h" @@ -72,6 +72,21 @@ static void DeleteScanNumberCache(Tcl_HashTable *numberCachePtr); static int NeedReversing(int format); static void CopyNumber(const void *from, void *to, unsigned int length, int type); +/* Binary ensemble commands */ +static int BinaryFormatCmd(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static int BinaryScanCmd(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); + +/* + * Default description of the "binary" ensemble + */ + +static const EnsembleImplMap defaultBinaryMap[] = { + { "format", BinaryFormatCmd, NULL}, + { "scan", BinaryScanCmd, NULL}, + { NULL, NULL, NULL } +}; /* * The following object type represents an array of bytes. An array of bytes @@ -542,9 +557,32 @@ UpdateStringOfByteArray( /* *---------------------------------------------------------------------- * - * Tcl_BinaryObjCmd -- + * TclInitBinaryCmd -- + * + * This function is called to create the "binary" Tcl command. See the user + * documentation for details on what it does. + * + * Results: + * A command token for the new command. + * + * Side effects: + * Creates a new binary command as a mapped ensemble. + * + *---------------------------------------------------------------------- + */ + +Tcl_Command +TclInitBinaryCmd(Tcl_Interp *interp) +{ + return TclMakeEnsemble(interp, "binary", defaultBinaryMap); +} + +/* + *---------------------------------------------------------------------- + * + * BinaryFormatCmd -- * - * This procedure implements the "binary" Tcl command. + * This procedure implements the "binary format" Tcl command. * * Results: * A standard Tcl result. @@ -555,8 +593,8 @@ UpdateStringOfByteArray( *---------------------------------------------------------------------- */ -int -Tcl_BinaryObjCmd( +static int +BinaryFormatCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -578,48 +616,30 @@ Tcl_BinaryObjCmd( * cursor has visited.*/ const char *errorString; char *errorValue, *str; - int offset, size, length, index; - static const char *options[] = { - "format", "scan", NULL - }; - enum options { - BINARY_FORMAT, BINARY_SCAN - }; + int offset, size, length; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "formatString ?arg arg ...?"); return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, - &index) != TCL_OK) { - return TCL_ERROR; - } - - switch ((enum options) index) { - case BINARY_FORMAT: - if (objc < 3) { - Tcl_WrongNumArgs(interp, 2, objv, "formatString ?arg arg ...?"); - return TCL_ERROR; + /* + * To avoid copying the data, we format the string in two passes. The + * first pass computes the size of the output buffer. The second pass + * places the formatted data into the buffer. + */ + + format = TclGetString(objv[1]); + arg = 2; + offset = 0; + length = 0; + while (*format != '\0') { + str = format; + flags = 0; + if (!GetFormatSpec(&format, &cmd, &count, &flags)) { + break; } - - /* - * To avoid copying the data, we format the string in two passes. The - * first pass computes the size of the output buffer. The second pass - * places the formatted data into the buffer. - */ - - format = TclGetString(objv[2]); - arg = 3; - offset = 0; - length = 0; - while (*format != '\0') { - str = format; - flags = 0; - if (!GetFormatSpec(&format, &cmd, &count, &flags)) { - break; - } - switch (cmd) { + switch (cmd) { case 'a': case 'A': case 'b': @@ -630,7 +650,7 @@ Tcl_BinaryObjCmd( * For string-type specifiers, the count corresponds to the * number of bytes in a single argument. */ - + if (arg >= objc) { goto badIndex; } @@ -694,7 +714,7 @@ Tcl_BinaryObjCmd( } else { int listc; Tcl_Obj **listv; - + /* The macro evals its args more than once: avoid arg++ */ if (TclListObjGetElements(interp, objv[arg], &listc, &listv) != TCL_OK) { @@ -706,19 +726,19 @@ Tcl_BinaryObjCmd( count = listc; } else if (count > listc) { Tcl_AppendResult(interp, - "number of elements in list does not match count", - NULL); + "number of elements in list does not match count", + NULL); return TCL_ERROR; } } offset += count*size; break; - + case 'x': if (count == BINARY_ALL) { Tcl_AppendResult(interp, - "cannot use \"*\" in format string with \"x\"", - NULL); + "cannot use \"*\" in format string with \"x\"", + NULL); return TCL_ERROR; } else if (count == BINARY_NOCOUNT) { count = 1; @@ -752,53 +772,53 @@ Tcl_BinaryObjCmd( default: errorString = str; goto badField; - } - } - if (offset > length) { - length = offset; } - if (length == 0) { - return TCL_OK; - } - - /* - * Prepare the result object by preallocating the caclulated number of - * bytes and filling with nulls. - */ - - resultPtr = Tcl_NewObj(); - buffer = Tcl_SetByteArrayLength(resultPtr, length); - memset(buffer, 0, (size_t) length); - - /* - * Pack the data into the result object. Note that we can skip the - * error checking during this pass, since we have already parsed the - * string once. - */ + } + if (offset > length) { + length = offset; + } + if (length == 0) { + return TCL_OK; + } + + /* + * Prepare the result object by preallocating the caclulated number of + * bytes and filling with nulls. + */ + + resultPtr = Tcl_NewObj(); + buffer = Tcl_SetByteArrayLength(resultPtr, length); + memset(buffer, 0, (size_t) length); + + /* + * Pack the data into the result object. Note that we can skip the + * error checking during this pass, since we have already parsed the + * string once. + */ - arg = 3; - format = TclGetString(objv[2]); - cursor = buffer; - maxPos = cursor; - while (*format != 0) { - flags = 0; - if (!GetFormatSpec(&format, &cmd, &count, &flags)) { - break; - } - if ((count == 0) && (cmd != '@')) { - if (cmd != 'x') { - arg++; - } - continue; + arg = 2; + format = TclGetString(objv[1]); + cursor = buffer; + maxPos = cursor; + while (*format != 0) { + flags = 0; + if (!GetFormatSpec(&format, &cmd, &count, &flags)) { + break; + } + if ((count == 0) && (cmd != '@')) { + if (cmd != 'x') { + arg++; } - switch (cmd) { + continue; + } + switch (cmd) { case 'a': case 'A': { char pad = (char) (cmd == 'a' ? '\0' : ' '); unsigned char *bytes; - + bytes = Tcl_GetByteArrayFromObj(objv[arg++], &length); - + if (count == BINARY_ALL) { count = length; } else if (count == BINARY_NOCOUNT) { @@ -816,7 +836,7 @@ Tcl_BinaryObjCmd( case 'b': case 'B': { unsigned char *last; - + str = TclGetStringFromObj(objv[arg], &length); arg++; if (count == BINARY_ALL) { @@ -878,7 +898,7 @@ Tcl_BinaryObjCmd( case 'H': { unsigned char *last; int c; - + str = TclGetStringFromObj(objv[arg], &length); arg++; if (count == BINARY_ALL) { @@ -1024,39 +1044,108 @@ Tcl_BinaryObjCmd( cursor = buffer + count; } break; - } } - Tcl_SetObjResult(interp, resultPtr); - break; - case BINARY_SCAN: { - int i; - Tcl_Obj *valuePtr, *elementPtr; - Tcl_HashTable numberCacheHash; - Tcl_HashTable *numberCachePtr; - - if (objc < 4) { - Tcl_WrongNumArgs(interp, 2, objv, - "value formatString ?varName varName ...?"); - return TCL_ERROR; + } + Tcl_SetObjResult(interp, resultPtr); + return TCL_OK; + + badValue: + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "expected ", errorString, + " string but got \"", errorValue, "\" instead", NULL); + return TCL_ERROR; + + badCount: + errorString = "missing count for \"@\" field specifier"; + goto error; + + badIndex: + errorString = "not enough arguments for all format specifiers"; + goto error; + + badField: + { + Tcl_UniChar ch; + char buf[TCL_UTF_MAX + 1]; + + Tcl_UtfToUniChar(errorString, &ch); + buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; + Tcl_AppendResult(interp, "bad field specifier \"", buf, "\"", NULL); + return TCL_ERROR; + } + + error: + Tcl_AppendResult(interp, errorString, NULL); + return TCL_ERROR; +} + +/* + *---------------------------------------------------------------------- + * + * BinaryScanCmd -- + * + * This procedure implements the "binary scan" Tcl command. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +int +BinaryScanCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int arg; /* Index of next argument to consume. */ + int value = 0; /* Current integer value to be packed. + * Initialized to avoid compiler warning. */ + char cmd; /* Current format character. */ + int count; /* Count associated with current format + * character. */ + int flags; /* Format field flags */ + char *format; /* Pointer to current position in format + * string. */ + Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */ + unsigned char *buffer; /* Start of result buffer. */ + unsigned char *cursor; /* Current position within result buffer. */ + const char *errorString; + char *str; + int offset, size, length; + + int i; + Tcl_Obj *valuePtr, *elementPtr; + Tcl_HashTable numberCacheHash; + Tcl_HashTable *numberCachePtr; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, + "value formatString ?varName varName ...?"); + return TCL_ERROR; + } + numberCachePtr = &numberCacheHash; + Tcl_InitHashTable(numberCachePtr, TCL_ONE_WORD_KEYS); + buffer = Tcl_GetByteArrayFromObj(objv[1], &length); + format = TclGetString(objv[2]); + cursor = buffer; + arg = 3; + offset = 0; + while (*format != '\0') { + str = format; + flags = 0; + if (!GetFormatSpec(&format, &cmd, &count, &flags)) { + goto done; } - numberCachePtr = &numberCacheHash; - Tcl_InitHashTable(numberCachePtr, TCL_ONE_WORD_KEYS); - buffer = Tcl_GetByteArrayFromObj(objv[2], &length); - format = TclGetString(objv[3]); - cursor = buffer; - arg = 4; - offset = 0; - while (*format != '\0') { - str = format; - flags = 0; - if (!GetFormatSpec(&format, &cmd, &count, &flags)) { - goto done; - } - switch (cmd) { + switch (cmd) { case 'a': case 'A': { unsigned char *src; - + if (arg >= objc) { DeleteScanNumberCache(numberCachePtr); goto badIndex; @@ -1071,14 +1160,14 @@ Tcl_BinaryObjCmd( goto done; } } - + src = buffer + offset; size = count; - + /* * Trim trailing nulls and spaces, if necessary. */ - + if (cmd == 'A') { while (size > 0) { if (src[size-1] != '\0' && src[size-1] != ' ') { @@ -1087,7 +1176,7 @@ Tcl_BinaryObjCmd( size--; } } - + /* * Have to do this #ifdef-fery because (as part of defining * Tcl_NewByteArrayObj) we removed the #def that hides this @@ -1326,47 +1415,39 @@ Tcl_BinaryObjCmd( DeleteScanNumberCache(numberCachePtr); errorString = str; goto badField; - } } - - /* - * Set the result to the last position of the cursor. - */ - - done: - Tcl_SetObjResult(interp, Tcl_NewLongObj(arg - 4)); - DeleteScanNumberCache(numberCachePtr); - break; - } } + + /* + * Set the result to the last position of the cursor. + */ + + done: + Tcl_SetObjResult(interp, Tcl_NewLongObj(arg - 3)); + DeleteScanNumberCache(numberCachePtr); + return TCL_OK; - - badValue: - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "expected ", errorString, - " string but got \"", errorValue, "\" instead", NULL); - return TCL_ERROR; - - badCount: + + badCount: errorString = "missing count for \"@\" field specifier"; goto error; - - badIndex: + + badIndex: errorString = "not enough arguments for all format specifiers"; goto error; - - badField: + + badField: { Tcl_UniChar ch; char buf[TCL_UTF_MAX + 1]; - + Tcl_UtfToUniChar(errorString, &ch); buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; Tcl_AppendResult(interp, "bad field specifier \"", buf, "\"", NULL); return TCL_ERROR; } - - error: + + error: Tcl_AppendResult(interp, errorString, NULL); return TCL_ERROR; } diff --git a/generic/tclInt.h b/generic/tclInt.h index 2c50d21..93adf2a 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.366 2008/05/02 10:27:07 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.367 2008/05/02 20:08:52 patthoyts Exp $ */ #ifndef _TCLINT @@ -2702,9 +2702,7 @@ MODULE_SCOPE int Tcl_ApplyObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_ArrayObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -MODULE_SCOPE int Tcl_BinaryObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +MODULE_SCOPE Tcl_Command TclInitBinaryCmd(Tcl_Interp *interp); MODULE_SCOPE int Tcl_BreakObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/tests/binary.test b/tests/binary.test index 71acaf3..28e9c78 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.32 2008/03/24 03:10:46 patthoyts Exp $ +# RCS: @(#) $Id: binary.test,v 1.33 2008/05/02 20:08:53 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -31,10 +31,10 @@ test binary-0.1 {DupByteArrayInternalRep} { test binary-1.1 {Tcl_BinaryObjCmd: bad args} { list [catch {binary} msg] $msg -} {1 {wrong # args: should be "binary option ?arg arg ...?"}} +} {1 {wrong # args: should be "binary subcommand ?argument ...?"}} test binary-1.2 {Tcl_BinaryObjCmd: bad args} { list [catch {binary foo} msg] $msg -} {1 {bad option "foo": must be format or scan}} +} {1 {unknown or ambiguous subcommand "foo": must be format, or scan}} test binary-1.3 {Tcl_BinaryObjCmd: format error} { list [catch {binary f} msg] $msg @@ -1541,7 +1541,7 @@ test binary-41.8 {ScanNumber: word alignment} littleEndian { test binary-42.1 {Tcl_BinaryObjCmd: bad arguments} {} { catch {binary ?} result set result -} {bad option "?": must be format or scan} +} {unknown or ambiguous subcommand "?": must be format, or scan} # Wide int (guaranteed at least 64-bit) handling test binary-43.1 {Tcl_BinaryObjCmd: format wide int} {} { -- cgit v0.12 From 631d521b31502f1734b9d599aa2d5fa7c92af8d9 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 3 May 2008 19:31:07 +0000 Subject: use Tcl_Panic() instead of panic() --- generic/tclAsync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclAsync.c b/generic/tclAsync.c index f57c456..1e5733e 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAsync.c,v 1.15 2008/04/27 08:36:20 vasiljevic Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.16 2008/05/03 19:31:07 das Exp $ */ #include "tclInt.h" @@ -282,7 +282,7 @@ Tcl_AsyncDelete( */ if (asyncPtr->originThrdId != Tcl_GetCurrentThread()) { - panic("Tcl_AsyncDelete: async handler deleted by the wrong thread"); + Tcl_Panic("Tcl_AsyncDelete: async handler deleted by the wrong thread"); } /* @@ -300,7 +300,7 @@ Tcl_AsyncDelete( thisPtr = thisPtr->nextPtr; } if (thisPtr == NULL) { - panic("Tcl_AsyncDelete: cannot find async handler"); + Tcl_Panic("Tcl_AsyncDelete: cannot find async handler"); } if (asyncPtr == tsdPtr->firstHandler) { tsdPtr->firstHandler = asyncPtr->nextPtr; -- cgit v0.12 From 47a766393e63ffe597df226edf2012eae4231ab2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 4 May 2008 07:28:46 +0000 Subject: CONST -> const --- compat/unistd.h | 4 ++-- generic/tclDate.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compat/unistd.h b/compat/unistd.h index 443e319..838e7ab 100644 --- a/compat/unistd.h +++ b/compat/unistd.h @@ -1,7 +1,7 @@ /* * unistd.h -- * - * Macros, CONSTants and prototypes for Posix conformance. + * Macros, constants and prototypes for Posix conformance. * * Copyright 1989 Regents of the University of California Permission to use, * copy, modify, and distribute this software and its documentation for any @@ -10,7 +10,7 @@ * no representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * - * RCS: @(#) $Id: unistd.h,v 1.3 2008/05/02 10:27:04 dkf Exp $ + * RCS: @(#) $Id: unistd.h,v 1.4 2008/05/04 07:28:47 nijtmans Exp $ */ #ifndef _UNISTD diff --git a/generic/tclDate.c b/generic/tclDate.c index 0bd48c8..2b0636b 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2679,7 +2679,7 @@ TclClockOldscanObjCmd( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ - Tcl_Obj *CONST *objv) /* Parameters */ + Tcl_Obj *const *objv) /* Parameters */ { Tcl_Obj *result, *resultElement; int yr, mo, da; -- cgit v0.12 From 15ea311f9c6ca61c783cb383a9579b63e56aac83 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 6 May 2008 16:33:07 +0000 Subject: fix Makefile dependency --- macosx/GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile index 2b3b8bb..0bf1d04 100644 --- a/macosx/GNUmakefile +++ b/macosx/GNUmakefile @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: GNUmakefile,v 1.9 2008/03/11 22:28:34 das Exp $ +# RCS: @(#) $Id: GNUmakefile,v 1.10 2008/05/06 16:33:07 das Exp $ # ######################################################################################################## @@ -76,7 +76,7 @@ OBJ_DIR = ${OBJROOT}/${BUILD_STYLE} empty := space := ${empty} ${empty} -objdir := $(subst ${space},\ ,${OBJ_DIR}) +objdir = $(subst ${space},\ ,${OBJ_DIR}) develop_make_args := BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install-strip \ -- cgit v0.12 From 0c71b8fc46224d3797677aa37fcffe642bc13b72 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 May 2008 09:07:06 +0000 Subject: Fix off-by-one error that caused crashes. D'oh! --- ChangeLog | 7 +++++++ generic/tclCompCmds.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 679d0cd..411943c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-07 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileDictAppendCmd): Fix silly + off-by one error that caused a crash every time a compiled 'dict + append' with more than one argument was used. Found by Colin + McCormack. + 2008-05-02 Pat Thoyts * generic/tclBasic.c: Converted the [binary] command into an diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 9fa3bf6..87cb891 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.143 2008/03/16 17:00:43 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.144 2008/05/07 09:07:11 dkf Exp $ */ #include "tclInt.h" @@ -1215,7 +1215,7 @@ TclCompileDictAppendCmd( tokenPtr = TokenAfter(tokenPtr); } if (parsePtr->numWords > 4) { - TclEmitInstInt1(INST_CONCAT1, parsePtr->numWords-2, envPtr); + TclEmitInstInt1(INST_CONCAT1, parsePtr->numWords-3, envPtr); } /* -- cgit v0.12 From 19ad9a684ba90939b3e87ee3765331f7ae005e3d Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 May 2008 09:23:39 +0000 Subject: Detect problem case and prove that it's fixed. --- tests/dict.test | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/dict.test b/tests/dict.test index ce51633..e9848ae 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.24 2008/03/16 17:00:44 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.25 2008/05/07 09:23:39 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -414,6 +414,14 @@ test dict-13.9 {dict append command: write failure} { catch {unset dictVar} set result } {1 {can't set "dictVar": variable is array}} +test dict-13.10 {compiled dict append: crash case} { + apply {{} { + dict for {k v} {fred 1} { + dict append margs body fred \n + } + return ok + }} +} ok test dict-14.1 {dict for command: syntax} { list [catch {dict for} msg] $msg -- cgit v0.12 From 8b0e387a55e642922694c0255aa470e88f29569e Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 7 May 2008 10:25:22 +0000 Subject: Return type of Tcl_AppendPrintfToObj is void. (spotted by Torsten Berg) --- doc/StringObj.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/StringObj.3 b/doc/StringObj.3 index ce946b3..3db8b1e 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StringObj.3,v 1.26 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: StringObj.3,v 1.27 2008/05/07 10:25:22 patthoyts Exp $ '\" .so man.macros .TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures" @@ -76,7 +76,7 @@ int Tcl_Obj * \fBTcl_ObjPrintf\fR(\fIformat, ...\fR) .sp -int +void \fBTcl_AppendPrintfToObj\fR(\fIobjPtr, format, ...\fR) .VE 8.5 .sp -- cgit v0.12 From b86d1ef0c225885f9d5a8d5bb43a961c26ebb9c2 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 May 2008 10:42:14 +0000 Subject: Simplify test --- tests/dict.test | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/dict.test b/tests/dict.test index e9848ae..fd33ab0 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.25 2008/05/07 09:23:39 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.26 2008/05/07 10:42:14 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -415,13 +415,8 @@ test dict-13.9 {dict append command: write failure} { set result } {1 {can't set "dictVar": variable is array}} test dict-13.10 {compiled dict append: crash case} { - apply {{} { - dict for {k v} {fred 1} { - dict append margs body fred \n - } - return ok - }} -} ok + apply {{} {dict append dictVar a o k}} +} {a ok} test dict-14.1 {dict for command: syntax} { list [catch {dict for} msg] $msg -- cgit v0.12 From ed3ea321aeec1cc4ff0a5d148894afbd79fb7281 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 May 2008 13:17:49 +0000 Subject: Cleaning up --- tests/dict.test | 749 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 369 insertions(+), 380 deletions(-) diff --git a/tests/dict.test b/tests/dict.test index fd33ab0..3917404 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.26 2008/05/07 10:42:14 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.27 2008/05/07 13:17:49 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -33,12 +33,12 @@ proc getOrder {dictVal args} { return $result } -test dict-1.1 {dict command basic syntax} { - list [catch {dict} msg] $msg -} {1 {wrong # args: should be "dict subcommand ?argument ...?"}} -test dict-1.2 {dict command basic syntax} { - list [catch {dict ?} msg] $msg -} {1 {unknown or ambiguous subcommand "?": must be append, create, exists, filter, for, get, incr, info, keys, lappend, merge, remove, replace, set, size, unset, update, values, or with}} +test dict-1.1 {dict command basic syntax} -returnCodes error -body { + dict +} -result {wrong # args: should be "dict subcommand ?argument ...?"} +test dict-1.2 {dict command basic syntax} -returnCodes error -body { + dict ? +} -match glob -result {unknown or ambiguous subcommand "?": must be *} test dict-2.1 {dict create command} { dict create @@ -59,12 +59,12 @@ test dict-2.3 {dict create command} { } set result } {b d} -test dict-2.4 {dict create command} { - list [catch {dict create a} msg] $msg -} {1 {wrong # args: should be "dict create ?key value ...?"}} -test dict-2.5 {dict create command} { - list [catch {dict create a b c} msg] $msg -} {1 {wrong # args: should be "dict create ?key value ...?"}} +test dict-2.4 {dict create command} -returnCodes error -body { + dict create a +} -result {wrong # args: should be "dict create ?key value ...?"} +test dict-2.5 {dict create command} -returnCodes error -body { + dict create a b c +} -result {wrong # args: should be "dict create ?key value ...?"} test dict-2.6 {dict create command - initialse refcount field!} { # Bug 715751 will show up in memory debuggers like purify for {set i 0} {$i<10} {incr i} { @@ -83,23 +83,23 @@ test dict-2.8 {dict create command - #-quoting in string rep} -body { test dict-3.1 {dict get command} {dict get {a b} a} b test dict-3.2 {dict get command} {dict get {a b c d} a} b test dict-3.3 {dict get command} {dict get {a b c d} c} d -test dict-3.4 {dict get command} { - list [catch {dict get {a b c d} b} msg] $msg -} {1 {key "b" not known in dictionary}} +test dict-3.4 {dict get command} -returnCodes error -body { + dict get {a b c d} b +} -result {key "b" not known in dictionary} test dict-3.5 {dict get command} {dict get {a {p q r s} b {u v x y}} a p} q test dict-3.6 {dict get command} {dict get {a {p q r s} b {u v x y}} a r} s test dict-3.7 {dict get command} {dict get {a {p q r s} b {u v x y}} b u} v test dict-3.8 {dict get command} {dict get {a {p q r s} b {u v x y}} b x} y -test dict-3.9 {dict get command} { - list [catch {dict get {a {p q r s} b {u v x y}} a z} msg] $msg -} {1 {key "z" not known in dictionary}} -test dict-3.10 {dict get command} { - list [catch {dict get {a {p q r s} b {u v x y}} c z} msg] $msg -} {1 {key "c" not known in dictionary}} +test dict-3.9 {dict get command} -returnCodes error -body { + dict get {a {p q r s} b {u v x y}} a z +} -result {key "z" not known in dictionary} +test dict-3.10 {dict get command} -returnCodes error -body { + dict get {a {p q r s} b {u v x y}} c z +} -result {key "c" not known in dictionary} test dict-3.11 {dict get command} {dict get [dict create a b c d] a} b -test dict-3.12 {dict get command} { - list [catch {dict get} msg] $msg -} {1 {wrong # args: should be "dict get dictionary ?key key ...?"}} +test dict-3.12 {dict get command} -returnCodes error -body { + dict get +} -result {wrong # args: should be "dict get dictionary ?key key ...?"} test dict-3.13 {dict get command} { set dict [dict get {a b c d}] if {$dict eq "a b c d"} { @@ -110,9 +110,9 @@ test dict-3.13 {dict get command} { set dict } } OK -test dict-3.14 {dict get command} { - list [catch {dict get {a b c d} a c} msg] $msg -} {1 {missing value to go with key}} +test dict-3.14 {dict get command} -returnCodes error -body { + dict get {a b c d} a c +} -result {missing value to go with key} test dict-4.1 {dict replace command} { getOrder [dict replace {a b c d}] a c @@ -126,18 +126,18 @@ test dict-4.3 {dict replace command} { test dict-4.4 {dict replace command} { getOrder [dict replace {a b c d} c x a y] a c } {a y c x 2} -test dict-4.5 {dict replace command} { - list [catch {dict replace} msg] $msg -} {1 {wrong # args: should be "dict replace dictionary ?key value ...?"}} -test dict-4.6 {dict replace command} { - list [catch {dict replace {a a} a} msg] $msg -} {1 {wrong # args: should be "dict replace dictionary ?key value ...?"}} -test dict-4.7 {dict replace command} { - list [catch {dict replace {a a a} a b} msg] $msg -} {1 {missing value to go with key}} -test dict-4.8 {dict replace command} { - list [catch {dict replace [list a a a] a b} msg] $msg -} {1 {missing value to go with key}} +test dict-4.5 {dict replace command} -returnCodes error -body { + dict replace +} -result {wrong # args: should be "dict replace dictionary ?key value ...?"} +test dict-4.6 {dict replace command} -returnCodes error -body { + dict replace {a a} a +} -result {wrong # args: should be "dict replace dictionary ?key value ...?"} +test dict-4.7 {dict replace command} -returnCodes error -body { + dict replace {a a a} a b +} -result {missing value to go with key} +test dict-4.8 {dict replace command} -returnCodes error -body { + dict replace [list a a a] a b +} -result {missing value to go with key} test dict-4.9 {dict replace command} {dict replace [list a a] a b} {a b} test dict-4.10 {dict replace command} {dict replace [list a a] a b a c} {a c} @@ -149,9 +149,9 @@ test dict-5.5 {dict remove command} { getOrder [dict remove {a b c d}] a c } {a b c d 2} test dict-5.6 {dict remove command} {dict remove {a b} c} {a b} -test dict-5.7 {dict remove command} { - list [catch {dict remove} msg] $msg -} {1 {wrong # args: should be "dict remove dictionary ?key ...?"}} +test dict-5.7 {dict remove command} -returnCodes error -body { + dict remove +} -result {wrong # args: should be "dict remove dictionary ?key ...?"} test dict-6.1 {dict keys command} {dict keys {a b}} a test dict-6.2 {dict keys command} {dict keys {c d}} c @@ -160,15 +160,15 @@ test dict-6.4 {dict keys command} {dict keys {a b c d} a} a test dict-6.5 {dict keys command} {dict keys {a b c d} c} c test dict-6.6 {dict keys command} {dict keys {a b c d} e} {} test dict-6.7 {dict keys command} {lsort [dict keys {a b c d ca da} c*]} {c ca} -test dict-6.8 {dict keys command} { - list [catch {dict keys} msg] $msg -} {1 {wrong # args: should be "dict keys dictionary ?pattern?"}} -test dict-6.9 {dict keys command} { - list [catch {dict keys {} a b} msg] $msg -} {1 {wrong # args: should be "dict keys dictionary ?pattern?"}} -test dict-6.10 {dict keys command} { - list [catch {dict keys a} msg] $msg -} {1 {missing value to go with key}} +test dict-6.8 {dict keys command} -returnCodes error -body { + dict keys +} -result {wrong # args: should be "dict keys dictionary ?pattern?"} +test dict-6.9 {dict keys command} -returnCodes error -body { + dict keys {} a b +} -result {wrong # args: should be "dict keys dictionary ?pattern?"} +test dict-6.10 {dict keys command} -returnCodes error -body { + dict keys a +} -result {missing value to go with key} test dict-7.1 {dict values command} {dict values {a b}} b test dict-7.2 {dict values command} {dict values {c d}} d @@ -177,59 +177,58 @@ test dict-7.4 {dict values command} {dict values {a b c d} b} b test dict-7.5 {dict values command} {dict values {a b c d} d} d test dict-7.6 {dict values command} {dict values {a b c d} e} {} test dict-7.7 {dict values command} {lsort [dict values {a b c d ca da} d*]} {d da} -test dict-7.8 {dict values command} { - list [catch {dict values} msg] $msg -} {1 {wrong # args: should be "dict values dictionary ?pattern?"}} -test dict-7.9 {dict values command} { - list [catch {dict values {} a b} msg] $msg -} {1 {wrong # args: should be "dict values dictionary ?pattern?"}} -test dict-7.10 {dict values command} { - list [catch {dict values a} msg] $msg -} {1 {missing value to go with key}} +test dict-7.8 {dict values command} -returnCodes error -body { + dict values +} -result {wrong # args: should be "dict values dictionary ?pattern?"} +test dict-7.9 {dict values command} -returnCodes error -body { + dict values {} a b +} -result {wrong # args: should be "dict values dictionary ?pattern?"} +test dict-7.10 {dict values command} -returnCodes error -body { + dict values a +} -result {missing value to go with key} test dict-8.1 {dict size command} {dict size {}} 0 test dict-8.2 {dict size command} {dict size {a b}} 1 test dict-8.3 {dict size command} {dict size {a b c d}} 2 -test dict-8.4 {dict size command} { - list [catch {dict size} msg] $msg -} {1 {wrong # args: should be "dict size dictionary"}} -test dict-8.5 {dict size command} { - list [catch {dict size a b} msg] $msg -} {1 {wrong # args: should be "dict size dictionary"}} -test dict-8.6 {dict size command} { - list [catch {dict size a} msg] $msg -} {1 {missing value to go with key}} +test dict-8.4 {dict size command} -returnCodes error -body { + dict size +} -result {wrong # args: should be "dict size dictionary"} +test dict-8.5 {dict size command} -returnCodes error -body { + dict size a b +} -result {wrong # args: should be "dict size dictionary"} +test dict-8.6 {dict size command} -returnCodes error -body { + dict size a +} -result {missing value to go with key} test dict-9.1 {dict exists command} {dict exists {a b} a} 1 test dict-9.2 {dict exists command} {dict exists {a b} b} 0 test dict-9.3 {dict exists command} {dict exists {a {b c}} a b} 1 test dict-9.4 {dict exists command} {dict exists {a {b c}} a c} 0 test dict-9.5 {dict exists command} {dict exists {a {b c}} b c} 0 -test dict-9.6 {dict exists command} { - list [catch {dict exists {a {b c d}} a c} msg] $msg -} {1 {missing value to go with key}} -test dict-9.7 {dict exists command} { - list [catch {dict exists} msg] $msg -} {1 {wrong # args: should be "dict exists dictionary key ?key ...?"}} -test dict-9.8 {dict exists command} { - list [catch {dict exists {}} msg] $msg -} {1 {wrong # args: should be "dict exists dictionary key ?key ...?"}} +test dict-9.6 {dict exists command} -returnCodes error -body { + dict exists {a {b c d}} a c +} -result {missing value to go with key} +test dict-9.7 {dict exists command} -returnCodes error -body { + dict exists +} -result {wrong # args: should be "dict exists dictionary key ?key ...?"} +test dict-9.8 {dict exists command} -returnCodes error -body { + dict exists {} +} -result {wrong # args: should be "dict exists dictionary key ?key ...?"} -test dict-10.1 {dict info command} { +test dict-10.1 {dict info command} -body { # Actual string returned by this command is undefined; it is # intended for human consumption and not for use by scripts. dict info {} - subst {} -} {} -test dict-10.2 {dict info command} { - list [catch {dict info} msg] $msg -} {1 {wrong # args: should be "dict info dictionary"}} -test dict-10.3 {dict info command} { - list [catch {dict info {} x} msg] $msg -} {1 {wrong # args: should be "dict info dictionary"}} -test dict-10.4 {dict info command} { - list [catch {dict info x} msg] $msg -} {1 {missing value to go with key}} +} -match glob -result * +test dict-10.2 {dict info command} -returnCodes error -body { + dict info +} -result {wrong # args: should be "dict info dictionary"} +test dict-10.3 {dict info command} -returnCodes error -body { + dict info {} x +} -result {wrong # args: should be "dict info dictionary"} +test dict-10.4 {dict info command} -returnCodes error -body { + dict info x +} -result {missing value to go with key} test dict-11.1 {dict incr command: unshared value} { set dictv [dict create \ @@ -275,54 +274,54 @@ test dict-11.8 {dict incr command} { set dictv {a 1} dict incr dictv a 2 } {a 3} -test dict-11.9 {dict incr command} { +test dict-11.9 {dict incr command} -returnCodes error -body { set dictv {a dummy} - list [catch {dict incr dictv a} msg] $msg -} {1 {expected integer but got "dummy"}} -test dict-11.10 {dict incr command} { + dict incr dictv a +} -result {expected integer but got "dummy"} +test dict-11.10 {dict incr command} -returnCodes error -body { set dictv {a 1} - list [catch {dict incr dictv a dummy} msg] $msg -} {1 {expected integer but got "dummy"}} -test dict-11.11 {dict incr command} { + dict incr dictv a dummy +} -result {expected integer but got "dummy"} +test dict-11.11 {dict incr command} -setup { catch {unset dictv} +} -body { dict incr dictv a -} {a 1} -test dict-11.12 {dict incr command} { +} -result {a 1} +test dict-11.12 {dict incr command} -returnCodes error -body { set dictv a - list [catch {dict incr dictv a} msg] $msg -} {1 {missing value to go with key}} -test dict-11.13 {dict incr command} { + dict incr dictv a +} -result {missing value to go with key} +test dict-11.13 {dict incr command} -returnCodes error -body { set dictv a - list [catch {dict incr dictv a a a} msg] $msg -} {1 {wrong # args: should be "dict incr varName key ?increment?"}} -test dict-11.14 {dict incr command} { + dict incr dictv a a a +} -result {wrong # args: should be "dict incr varName key ?increment?"} +test dict-11.14 {dict incr command} -returnCodes error -body { set dictv a - list [catch {dict incr dictv} msg] $msg -} {1 {wrong # args: should be "dict incr varName key ?increment?"}} -test dict-11.15 {dict incr command: write failure} { + dict incr dictv +} -result {wrong # args: should be "dict incr varName key ?increment?"} +test dict-11.15 {dict incr command: write failure} -setup { catch {unset dictVar} +} -body { set dictVar(block) {} - set result [list [catch {dict incr dictVar a} msg] $msg] + dict incr dictVar a +} -returnCodes error -cleanup { catch {unset dictVar} - set result -} {1 {can't set "dictVar": variable is array}} +} -result {can't set "dictVar": variable is array} test dict-11.16 {dict incr command: compilation} { - proc dicttest {} { + apply {{} { set v {a 0 b 0 c 0} dict incr v a dict incr v b 1 dict incr v c 2 dict incr v d 3 list [dict get $v a] [dict get $v b] [dict get $v c] [dict get $v d] - } - dicttest + }} } {1 1 2 3} test dict-11.17 {dict incr command: compilation} { - proc dicttest {} { + apply {{} { set dictv {a 1} dict incr dictv a 2 - } - dicttest + }} } {a 3} test dict-12.1 {dict lappend command} { @@ -350,27 +349,28 @@ test dict-12.5 {dict lappend command} { catch {unset dictv} dict lappend dictv a b } {a b} -test dict-12.6 {dict lappend command} { +test dict-12.6 {dict lappend command} -returnCodes error -body { set dictv a - list [catch {dict lappend dictv a a} msg] $msg -} {1 {missing value to go with key}} -test dict-12.7 {dict lappend command} { - list [catch {dict lappend} msg] $msg -} {1 {wrong # args: should be "dict lappend varName key ?value ...?"}} -test dict-12.8 {dict lappend command} { - list [catch {dict lappend dictv} msg] $msg -} {1 {wrong # args: should be "dict lappend varName key ?value ...?"}} -test dict-12.9 {dict lappend command} { + dict lappend dictv a a +} -result {missing value to go with key} +test dict-12.7 {dict lappend command} -returnCodes error -body { + dict lappend +} -result {wrong # args: should be "dict lappend varName key ?value ...?"} +test dict-12.8 {dict lappend command} -returnCodes error -body { + dict lappend dictv +} -result {wrong # args: should be "dict lappend varName key ?value ...?"} +test dict-12.9 {dict lappend command} -returnCodes error -body { set dictv [dict create a "\{"] - list [catch {dict lappend dictv a a} msg] $msg -} {1 {unmatched open brace in list}} -test dict-12.10 {dict lappend command: write failure} { + dict lappend dictv a a +} -result {unmatched open brace in list} +test dict-12.10 {dict lappend command: write failure} -setup { catch {unset dictVar} +} -body { set dictVar(block) {} - set result [list [catch {dict lappend dictVar a x} msg] $msg] + dict lappend dictVar a x +} -returnCodes error -cleanup { catch {unset dictVar} - set result -} {1 {can't set "dictVar": variable is array}} +} -result {can't set "dictVar": variable is array} test dict-13.1 {dict append command} { set dictv {a a} @@ -397,48 +397,49 @@ test dict-13.5 {dict append command} { catch {unset dictv} dict append dictv a b } {a b} -test dict-13.6 {dict append command} { +test dict-13.6 {dict append command} -returnCodes error -body { set dictv a - list [catch {dict append dictv a a} msg] $msg -} {1 {missing value to go with key}} -test dict-13.7 {dict append command} { - list [catch {dict append} msg] $msg -} {1 {wrong # args: should be "dict append varName key ?value ...?"}} -test dict-13.8 {dict append command} { - list [catch {dict append dictv} msg] $msg -} {1 {wrong # args: should be "dict append varName key ?value ...?"}} -test dict-13.9 {dict append command: write failure} { + dict append dictv a a +} -result {missing value to go with key} +test dict-13.7 {dict append command} -returnCodes error -body { + dict append +} -result {wrong # args: should be "dict append varName key ?value ...?"} +test dict-13.8 {dict append command} -returnCodes error -body { + dict append dictv +} -result {wrong # args: should be "dict append varName key ?value ...?"} +test dict-13.9 {dict append command: write failure} -setup { catch {unset dictVar} +} -body { set dictVar(block) {} - set result [list [catch {dict append dictVar a x} msg] $msg] + dict append dictVar a x +} -returnCodes error -cleanup { catch {unset dictVar} - set result -} {1 {can't set "dictVar": variable is array}} +} -result {can't set "dictVar": variable is array} test dict-13.10 {compiled dict append: crash case} { apply {{} {dict append dictVar a o k}} } {a ok} -test dict-14.1 {dict for command: syntax} { - list [catch {dict for} msg] $msg -} {1 {wrong # args: should be "dict for {keyVar valueVar} dictionary script"}} -test dict-14.2 {dict for command: syntax} { - list [catch {dict for x} msg] $msg -} {1 {wrong # args: should be "dict for {keyVar valueVar} dictionary script"}} -test dict-14.3 {dict for command: syntax} { - list [catch {dict for x x} msg] $msg -} {1 {wrong # args: should be "dict for {keyVar valueVar} dictionary script"}} -test dict-14.4 {dict for command: syntax} { - list [catch {dict for x x x x} msg] $msg -} {1 {wrong # args: should be "dict for {keyVar valueVar} dictionary script"}} -test dict-14.5 {dict for command: syntax} { - list [catch {dict for x x x} msg] $msg -} {1 {must have exactly two variable names}} -test dict-14.6 {dict for command: syntax} { - list [catch {dict for {x x x} x x} msg] $msg -} {1 {must have exactly two variable names}} -test dict-14.7 {dict for command: syntax} { - list [catch {dict for "\{x" x x} msg] $msg -} {1 {unmatched open brace in list}} +test dict-14.1 {dict for command: syntax} -returnCodes error -body { + dict for +} -result {wrong # args: should be "dict for {keyVar valueVar} dictionary script"} +test dict-14.2 {dict for command: syntax} -returnCodes error -body { + dict for x +} -result {wrong # args: should be "dict for {keyVar valueVar} dictionary script"} +test dict-14.3 {dict for command: syntax} -returnCodes error -body { + dict for x x +} -result {wrong # args: should be "dict for {keyVar valueVar} dictionary script"} +test dict-14.4 {dict for command: syntax} -returnCodes error -body { + dict for x x x x +} -result {wrong # args: should be "dict for {keyVar valueVar} dictionary script"} +test dict-14.5 {dict for command: syntax} -returnCodes error -body { + dict for x x x +} -result {must have exactly two variable names} +test dict-14.6 {dict for command: syntax} -returnCodes error -body { + dict for {x x x} x x +} -result {must have exactly two variable names} +test dict-14.7 {dict for command: syntax} -returnCodes error -body { + dict for "\{x" x x +} -result {unmatched open brace in list} test dict-14.8 {dict for command} { # This test confirms that [dict keys], [dict values] and [dict for] # all traverse a dictionary in the same order. @@ -466,7 +467,7 @@ test dict-14.10 {dict for command: script results} { continue error "shouldn't get here" } - set times + return $times } 2 test dict-14.11 {dict for command: script results} { set times 0 @@ -475,7 +476,7 @@ test dict-14.11 {dict for command: script results} { break error "shouldn't get here" } - set times + return $times } 1 test dict-14.12 {dict for command: script results} { set times 0 @@ -495,15 +496,13 @@ test dict-14.12 {dict for command: script results} { error test }"}} test dict-14.13 {dict for command: script results} { - proc dicttest {} { - rename dicttest {} + apply {{} { dict for {k v} {a b} { return ok,$k,$v error "skipped return completely" } error "return didn't go far enough" - } - dicttest + }} } ok,a,b test dict-14.14 {dict for command: handle representation loss} { set dictVar {a b c d e f g h} @@ -533,44 +532,40 @@ test dict-14.15 {dict for command: keys are unique and iterated over once only} set result } {a1 a2 b1 b2 bar foo : a, b, c, d, foo, bar,} test dict-14.16 {dict for command in compilation context} { - proc dicttest {} { + apply {{} { set res {x x x x x x} dict for {k v} {a 0 b 1 c 2 d 3 e 4 f 5} { lset res $v $k continue } return $res - } - dicttest + }} } {a b c d e f} test dict-14.17 {dict for command in compilation context} { # Bug 1379349 - proc dicttest {} { + apply {{} { set d [dict create a 1] ;# Dict must be unshared! dict for {k v} $d { dict set d $k 0 ;# Any modification will do } return $d - } - dicttest + }} } {a 0} test dict-14.18 {dict for command in compilation context} { # Bug 1382528 - proc dicttest {} { + apply {{} { dict for {k v} {} {} ;# Note empty dict catch { error foo } ;# Note compiled [catch] - } - dicttest + }} } 1 test dict-14.19 {dict for and invalid dicts: bug 1531184} -body { di[list]ct for {k v} x {} } -returnCodes 1 -result {missing value to go with key} test dict-14.20 {dict for stack space compilation: bug 1903325} { - proc dicttest {x y args} { + apply {{x y args} { dict for {a b} $x {} concat "c=$y,$args" - } - dicttest {} 1 2 3 + }} {} 1 2 3 } {c=1,2 3} # There's probably a lot more tests to add here. Really ought to use a # coverage tool for this job... @@ -608,26 +603,27 @@ test dict-15.8 {dict set command: creates variables} { dict set dictVar a x set dictVar } {a x} -test dict-15.9 {dict set command: write failure} { +test dict-15.9 {dict set command: write failure} -setup { catch {unset dictVar} +} -body { set dictVar(block) {} - set result [list [catch {dict set dictVar a x} msg] $msg] + dict set dictVar a x +} -returnCodes error -cleanup { catch {unset dictVar} - set result -} {1 {can't set "dictVar": variable is array}} -test dict-15.10 {dict set command: syntax} { - list [catch {dict set} msg] $msg -} {1 {wrong # args: should be "dict set varName key ?key ...? value"}} -test dict-15.11 {dict set command: syntax} { - list [catch {dict set a} msg] $msg -} {1 {wrong # args: should be "dict set varName key ?key ...? value"}} -test dict-15.12 {dict set command: syntax} { - list [catch {dict set a a} msg] $msg -} {1 {wrong # args: should be "dict set varName key ?key ...? value"}} -test dict-15.13 {dict set command} { +} -result {can't set "dictVar": variable is array} +test dict-15.10 {dict set command: syntax} -returnCodes error -body { + dict set +} -result {wrong # args: should be "dict set varName key ?key ...? value"} +test dict-15.11 {dict set command: syntax} -returnCodes error -body { + dict set a +} -result {wrong # args: should be "dict set varName key ?key ...? value"} +test dict-15.12 {dict set command: syntax} -returnCodes error -body { + dict set a a +} -result {wrong # args: should be "dict set varName key ?key ...? value"} +test dict-15.13 {dict set command} -returnCodes error -body { set dictVar a - list [catch {dict set dictVar b c} msg] $msg -} {1 {missing value to go with key}} + dict set dictVar b c +} -result {missing value to go with key} test dict-16.1 {dict unset command} { set dictVar {a b c d} @@ -645,28 +641,30 @@ test dict-16.4 {dict unset command} { set dictVar {a {b c d e}} dict unset dictVar a b } {a {d e}} -test dict-16.5 {dict unset command} { +test dict-16.5 {dict unset command} -returnCodes error -body { set dictVar a - list [catch {dict unset dictVar a} msg] $msg -} {1 {missing value to go with key}} -test dict-16.6 {dict unset command} { + dict unset dictVar a +} -result {missing value to go with key} +test dict-16.6 {dict unset command} -returnCodes error -body { set dictVar {a b} - list [catch {dict unset dictVar c d} msg] $msg -} {1 {key "c" not known in dictionary}} -test dict-16.7 {dict unset command} { + dict unset dictVar c d +} -result {key "c" not known in dictionary} +test dict-16.7 {dict unset command} -setup { catch {unset dictVar} +} -body { list [info exists dictVar] [dict unset dictVar a] [info exists dictVar] -} {0 {} 1} -test dict-16.8 {dict unset command} { - list [catch {dict unset dictVar} msg] $msg -} {1 {wrong # args: should be "dict unset varName key ?key ...?"}} -test dict-16.9 {dict unset command: write failure} { +} -result {0 {} 1} +test dict-16.8 {dict unset command} -returnCodes error -body { + dict unset dictVar +} -result {wrong # args: should be "dict unset varName key ?key ...?"} +test dict-16.9 {dict unset command: write failure} -setup { catch {unset dictVar} +} -body { set dictVar(block) {} - set result [list [catch {dict unset dictVar a} msg] $msg] + dict unset dictVar a +} -returnCodes error -cleanup { catch {unset dictVar} - set result -} {1 {can't set "dictVar": variable is array}} +} -result {can't set "dictVar": variable is array} test dict-17.1 {dict filter command: key} { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} @@ -680,12 +678,12 @@ test dict-17.3 {dict filter command: key} { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} getOrder [dict filter $dictVar key ???] bar foo } {bar foo foo bar 2} -test dict-17.4 {dict filter command: key} { - list [catch {dict filter {} key} msg] $msg -} {1 {wrong # args: should be "dict filter dictionary key globPattern"}} -test dict-17.5 {dict filter command: key} { - list [catch {dict filter {} key a a} msg] $msg -} {1 {wrong # args: should be "dict filter dictionary key globPattern"}} +test dict-17.4 {dict filter command: key} -returnCodes error -body { + dict filter {} key +} -result {wrong # args: should be "dict filter dictionary key globPattern"} +test dict-17.5 {dict filter command: key} -returnCodes error -body { + dict filter {} key a a +} -result {wrong # args: should be "dict filter dictionary key globPattern"} test dict-17.6 {dict filter command: value} { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} dict filter $dictVar value c @@ -698,12 +696,12 @@ test dict-17.8 {dict filter command: value} { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} getOrder [dict filter $dictVar value ???] bar foo } {bar foo foo bar 2} -test dict-17.9 {dict filter command: value} { - list [catch {dict filter {} value} msg] $msg -} {1 {wrong # args: should be "dict filter dictionary value globPattern"}} -test dict-17.10 {dict filter command: value} { - list [catch {dict filter {} value a a} msg] $msg -} {1 {wrong # args: should be "dict filter dictionary value globPattern"}} +test dict-17.9 {dict filter command: value} -returnCodes error -body { + dict filter {} value +} -result {wrong # args: should be "dict filter dictionary value globPattern"} +test dict-17.10 {dict filter command: value} -returnCodes error -body { + dict filter {} value a a +} -result {wrong # args: should be "dict filter dictionary value globPattern"} test dict-17.11 {dict filter command: script} { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} set n 0 @@ -712,9 +710,11 @@ test dict-17.11 {dict filter command: script} { expr {[string length $k] == [string length $v]} }] bar foo] $n } {{bar foo foo bar 2} 6} -test dict-17.12 {dict filter command: script} { - list [catch {dict filter {a b} script {k v} {concat $k $v}} msg] $msg -} {1 {expected boolean value but got "a b"}} +test dict-17.12 {dict filter command: script} -returnCodes error -body { + dict filter {a b} script {k v} { + concat $k $v + } +} -result {expected boolean value but got "a b"} test dict-17.13 {dict filter command: script} { list [catch {dict filter {a b} script {k v} {error x}} msg] $msg \ $::errorInfo @@ -741,38 +741,36 @@ test dict-17.15 {dict filter command: script} { }] $n } {{} 2} test dict-17.16 {dict filter command: script} { - proc dicttest {} { - rename dicttest {} + apply {{} { dict filter {a b} script {k v} { return ok,$k,$v error "skipped return completely" } error "return didn't go far enough" - } - dicttest + }} } ok,a,b test dict-17.17 {dict filter command: script} { dict filter {a b} script {k k} {continue} set k } b -test dict-17.18 {dict filter command: script} { - list [catch {dict filter {a b} script {k k}} msg] $msg -} {1 {wrong # args: should be "dict filter dictionary script {keyVar valueVar} filterScript"}} -test dict-17.19 {dict filter command: script} { - list [catch {dict filter {a b} script k {continue}} msg] $msg -} {1 {must have exactly two variable names}} -test dict-17.20 {dict filter command: script} { - list [catch {dict filter {a b} script "\{k v" {continue}} msg] $msg -} {1 {unmatched open brace in list}} -test dict-17.21 {dict filter command} { - list [catch {dict filter {a b}} msg] $msg -} {1 {wrong # args: should be "dict filter dictionary filterType ..."}} -test dict-17.22 {dict filter command} { - list [catch {dict filter {a b} JUNK} msg] $msg -} {1 {bad filterType "JUNK": must be key, script, or value}} -test dict-17.23 {dict filter command} { - list [catch {dict filter a key *} msg] $msg -} {1 {missing value to go with key}} +test dict-17.18 {dict filter command: script} -returnCodes error -body { + dict filter {a b} script {k k} +} -result {wrong # args: should be "dict filter dictionary script {keyVar valueVar} filterScript"} +test dict-17.19 {dict filter command: script} -returnCodes error -body { + dict filter {a b} script k {continue} +} -result {must have exactly two variable names} +test dict-17.20 {dict filter command: script} -returnCodes error -body { + dict filter {a b} script "\{k v" {continue} +} -result {unmatched open brace in list} +test dict-17.21 {dict filter command} -returnCodes error -body { + dict filter {a b} +} -result {wrong # args: should be "dict filter dictionary filterType ..."} +test dict-17.22 {dict filter command} -returnCodes error -body { + dict filter {a b} JUNK +} -result {bad filterType "JUNK": must be key, script, or value} +test dict-17.23 {dict filter command} -returnCodes error -body { + dict filter a key * +} -result {missing value to go with key} test dict-18.1 {dict-list relationship} { -body { @@ -801,129 +799,124 @@ test dict-18.2 {dict-list relationship} { # This is a test for a specific bug. # It shows a bad ref counter when running with memdebug on. -test dict-19.1 {memory bug} -setup { - proc xxx {} { +test dict-19.1 {memory bug} { + apply {{} { set successors [dict create x {c d}] dict set successors x a b dict get $successors x - } -} -body { - xxx -} -cleanup { - rename xxx {} -} -result [dict create c d a b] + }} +} [dict create c d a b] test dict-19.2 {dict: testing for leaks} -setup { proc getbytes {} { set lines [split [memory info] "\n"] lindex [lindex $lines 3] 3 } +} -constraints memory -body { # This test is made to stress object reference management - proc stress {} { - # A shared invalid dictinary - set apa {a {}b c d} - set bepa $apa - catch {dict replace $apa e f} - catch {dict remove $apa c d} - catch {dict incr apa a 5} - catch {dict lappend apa a 5} - catch {dict append apa a 5} - catch {dict set apa a 5} - catch {dict unset apa a} + set end [getbytes] + for {set i 0} {$i < 5} {incr i} { + apply {{} { + # A shared invalid dictinary + set apa {a {}b c d} + set bepa $apa + catch {dict replace $apa e f} + catch {dict remove $apa c d} + catch {dict incr apa a 5} + catch {dict lappend apa a 5} + catch {dict append apa a 5} + catch {dict set apa a 5} + catch {dict unset apa a} - # A shared valid dictionary, invalid incr - set apa {a b c d} - set bepa $apa - catch {dict incr bepa a 5} + # A shared valid dictionary, invalid incr + set apa {a b c d} + set bepa $apa + catch {dict incr bepa a 5} - # An error during write to an unshared object, incr - set apa {a 1 b 2} - set bepa [lrange $apa 0 end] - trace add variable bepa write {error hej} - catch {dict incr bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to an unshared object, incr + set apa {a 1 b 2} + set bepa [lrange $apa 0 end] + trace add variable bepa write {error hej} + catch {dict incr bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to a shared object, incr - set apa {a 1 b 2} - set bepa $apa - trace add variable bepa write {error hej} - catch {dict incr bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to a shared object, incr + set apa {a 1 b 2} + set bepa $apa + trace add variable bepa write {error hej} + catch {dict incr bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # A shared valid dictionary, invalid lappend - set apa [list a {{}b} c d] - set bepa $apa - catch {dict lappend bepa a 5} + # A shared valid dictionary, invalid lappend + set apa [list a {{}b} c d] + set bepa $apa + catch {dict lappend bepa a 5} - # An error during write to an unshared object, lappend - set apa {a 1 b 2} - set bepa [lrange $apa 0 end] - trace add variable bepa write {error hej} - catch {dict lappend bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to an unshared object, lappend + set apa {a 1 b 2} + set bepa [lrange $apa 0 end] + trace add variable bepa write {error hej} + catch {dict lappend bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to a shared object, lappend - set apa {a 1 b 2} - set bepa $apa - trace add variable bepa write {error hej} - catch {dict lappend bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to a shared object, lappend + set apa {a 1 b 2} + set bepa $apa + trace add variable bepa write {error hej} + catch {dict lappend bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to an unshared object, append - set apa {a 1 b 2} - set bepa [lrange $apa 0 end] - trace add variable bepa write {error hej} - catch {dict append bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to an unshared object, append + set apa {a 1 b 2} + set bepa [lrange $apa 0 end] + trace add variable bepa write {error hej} + catch {dict append bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to a shared object, append - set apa {a 1 b 2} - set bepa $apa - trace add variable bepa write {error hej} - catch {dict append bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to a shared object, append + set apa {a 1 b 2} + set bepa $apa + trace add variable bepa write {error hej} + catch {dict append bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to an unshared object, set - set apa {a 1 b 2} - set bepa [lrange $apa 0 end] - trace add variable bepa write {error hej} - catch {dict set bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to an unshared object, set + set apa {a 1 b 2} + set bepa [lrange $apa 0 end] + trace add variable bepa write {error hej} + catch {dict set bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to a shared object, set - set apa {a 1 b 2} - set bepa $apa - trace add variable bepa write {error hej} - catch {dict set bepa a 5} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to a shared object, set + set apa {a 1 b 2} + set bepa $apa + trace add variable bepa write {error hej} + catch {dict set bepa a 5} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to an unshared object, unset - set apa {a 1 b 2} - set bepa [lrange $apa 0 end] - trace add variable bepa write {error hej} - catch {dict unset bepa a} - trace remove variable bepa write {error hej} - unset bepa + # An error during write to an unshared object, unset + set apa {a 1 b 2} + set bepa [lrange $apa 0 end] + trace add variable bepa write {error hej} + catch {dict unset bepa a} + trace remove variable bepa write {error hej} + unset bepa - # An error during write to a shared object, unset - set apa {a 1 b 2} - set bepa $apa - trace add variable bepa write {error hej} - catch {dict unset bepa a} - trace remove variable bepa write {error hej} - unset bepa - } -} -constraints memory -body { - set end [getbytes] - for {set i 0} {$i < 5} {incr i} { - stress + # An error during write to a shared object, unset + set apa {a 1 b 2} + set bepa $apa + trace add variable bepa write {error hej} + catch {dict unset bepa a} + trace remove variable bepa write {error hej} + unset bepa + }} set tmp $end set end [getbytes] } @@ -942,16 +935,16 @@ test dict-20.2 {dict merge command} { } {a b c d e f 3} test dict-20.3 {dict merge command} -body { dict merge {a b c d e} -} -result {missing value to go with key} -returnCodes 1 +} -result {missing value to go with key} -returnCodes error test dict-20.4 {dict merge command} { getOrder [dict merge {a b c d} {e f g h}] a c e g } {a b c d e f g h 4} test dict-20.5 {dict merge command} -body { dict merge {a b c d e} {e f g h} -} -result {missing value to go with key} -returnCodes 1 +} -result {missing value to go with key} -returnCodes error test dict-20.6 {dict merge command} -body { dict merge {a b c d} {e f g h i} -} -result {missing value to go with key} -returnCodes 1 +} -result {missing value to go with key} -returnCodes error test dict-20.7 {dict merge command} { getOrder [dict merge {a b c d e f} {e x g h}] a c e g } {a b c d e x g h 4} @@ -965,18 +958,18 @@ test dict-20.10 {dict merge command} { getOrder [dict merge {a b c d e f} {a x 1 2 3 4} {a - 1 -}] a c e 1 3 } {a - c d e f 1 - 3 4 5} -test dict-21.1 {dict update command} -body { +test dict-21.1 {dict update command} -returnCodes 1 -body { dict update -} -returnCodes 1 -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} -test dict-21.2 {dict update command} -body { +} -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} +test dict-21.2 {dict update command} -returnCodes 1 -body { dict update v -} -returnCodes 1 -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} -test dict-21.3 {dict update command} -body { +} -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} +test dict-21.3 {dict update command} -returnCodes 1 -body { dict update v k -} -returnCodes 1 -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} -test dict-21.4 {dict update command} -body { +} -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} +test dict-21.4 {dict update command} -returnCodes 1 -body { dict update v k v -} -returnCodes 1 -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} +} -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} test dict-21.5 {dict update command} { set a {b c} set result {} @@ -1040,7 +1033,7 @@ test dict-21.12 {dict update command} { getOrder $a b d f } {b c d e f g 3} test dict-21.13 {dict update command: compilation} { - proc dicttest {d} { + apply {d { while 1 { dict update d a alpha b beta { set beta $alpha @@ -1048,25 +1041,22 @@ test dict-21.13 {dict update command: compilation} { break } } - return $d - } - getOrder [dicttest {a 1 c 2}] b c + return [getOrder $d b c] + }} {a 1 c 2} } {b 1 c 2 2} test dict-21.14 {dict update command: compilation} { - proc dicttest x { + apply {x { set indices {2 3} trace add variable aa write "string length \$indices ;#" dict update x k aa l bb {} - } - dicttest {k 1 l 2} + }} {k 1 l 2} } {} test dict-21.15 {dict update command: compilation} { - proc dicttest x { + apply {x { set indices {2 3} trace add variable aa read "string length \$indices ;#" dict update x k aa l bb {} - } - dicttest {k 1 l 2} + }} {k 1 l 2} } {} test dict-21.16 {dict update command: no recursive structures [Bug 1786481]} { set foo {a {b {c {d {e 1}}}}} @@ -1082,7 +1072,7 @@ test dict-21.16 {dict update command: no recursive structures [Bug 1786481]} { string range [append foo OK] end-1 end } OK test dict-21.17 {dict update command: no recursive structures [Bug 1786481]} { - proc dicttest {} { + apply {{} { set foo {a {b {c {d {e 1}}}}} dict update foo a t { dict update t b t { @@ -1093,8 +1083,7 @@ test dict-21.17 {dict update command: no recursive structures [Bug 1786481]} { } } } - } - dicttest + }} string range [append foo OK] end-1 end } OK -- cgit v0.12 From d7e8121f06c97858ffc59cd2582190e33f7438ca Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 9 May 2008 03:44:23 +0000 Subject: * Makefile: Restored compilability of 'stitcher.exe' on vc2k5. * cameraparams.h: * compressor.cpp: * imageDirectory.h: * stitchEngine.h: * stitcher.cpp: Added computation of Brenner gradient and median of several images to allow for computation of white balance on the fly. Replaced a lot of 'unsigned' quantities with 'int' to avoid surprises on overflow. Turned the images to run in X-major order again. This requires a 64-bit machine for the larger images, but is considerably more cache-friendly, and reduces stitch times of the smaller images by nearly half. --- ChangeLog | 7 +++++++ tests/dict.test | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 411943c..75991e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-09 Kevin B. Kenny + + * tests/dict.test (dict-19.2): Corrected a bug where + the test was changed to use [apply] instead of a temporary + proc, but the cleanup script still attempted to delete + the temporary proc. + 2008-05-07 Donal K. Fellows * generic/tclCompCmds.c (TclCompileDictAppendCmd): Fix silly diff --git a/tests/dict.test b/tests/dict.test index 3917404..a9fee8c 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.27 2008/05/07 13:17:49 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.28 2008/05/09 03:44:23 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -924,7 +924,7 @@ test dict-19.2 {dict: testing for leaks} -setup { } -cleanup { unset -nocomplain end i tmp rename getbytes {} - rename stress {} +# rename stress {} } -result 0 test dict-20.1 {dict merge command} { -- cgit v0.12 From 78fea2db721429cce261b5621f85f6f7390ece78 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 9 May 2008 03:51:33 +0000 Subject: * tests/dict.test (dict-19.2): Corrected a bug where the test was changed to use [apply] instead of a temporary proc, but the cleanup script still attempted to delete the temporary proc. --- tests/dict.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dict.test b/tests/dict.test index a9fee8c..d3373e2 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.28 2008/05/09 03:44:23 kennykb Exp $ +# RCS: @(#) $Id: dict.test,v 1.29 2008/05/09 03:51:33 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 -- cgit v0.12 From e782414ad0af468115d69e437d0d70c5895287ff Mon Sep 17 00:00:00 2001 From: georgeps Date: Fri, 9 May 2008 04:58:52 +0000 Subject: * generic/tcl.h: Make Tcl_ThreadDataKey a void *. * generic/tclInt.h: Change around some function names and add some new per-platform declarations for thread-specific data functions. * generic/tclThread.c: Make use of of the new function names that no longer have a Tclp prefix. * generic/tclThreadStorage.c: Replace the core thread-specific data (TSD) mechanism with an array offset solution that eliminates the hash tables, and only uses one slot of native TSD. Many thanks to Kevin B. Kenny for his help with this. * unix/tclUnixThrd.c: Add platform-specific TSD functions for use by tclThreadStorage.c. * win/tclWinThrd.c: Add platform-specific TSD functions for use by tclThreadStorage.c. --- ChangeLog | 18 ++ generic/tcl.h | 5 +- generic/tclInt.h | 13 +- generic/tclThread.c | 33 +-- generic/tclThreadStorage.c | 585 ++++++++++++--------------------------------- unix/tclUnixThrd.c | 45 +++- win/tclWinThrd.c | 45 +++- 7 files changed, 284 insertions(+), 460 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75991e3..df677d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-05-09 George Peter Staplin + + * generic/tcl.h: Make Tcl_ThreadDataKey a void *. + * generic/tclInt.h: Change around some function names and + add some new per-platform declarations for thread-specific data + functions. + * generic/tclThread.c: Make use of of the new function names + that no longer have a Tclp prefix. + * generic/tclThreadStorage.c: Replace the core thread-specific data + (TSD) mechanism with an array offset solution that eliminates the + hash tables, and only uses one slot of native TSD. + Many thanks to Kevin B. Kenny for his help with this. + + * unix/tclUnixThrd.c: Add platform-specific TSD functions for use + by tclThreadStorage.c. + * win/tclWinThrd.c: Add platform-specific TSD functions for use + by tclThreadStorage.c. + 2008-05-09 Kevin B. Kenny * tests/dict.test (dict-19.2): Corrected a bug where diff --git a/generic/tcl.h b/generic/tcl.h index 10ef922..a1a61d6 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.256 2008/04/24 21:11:57 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.257 2008/05/09 04:58:53 georgeps Exp $ */ #ifndef _TCL @@ -477,12 +477,13 @@ typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle; typedef struct Tcl_Mutex_ *Tcl_Mutex; typedef struct Tcl_Pid_ *Tcl_Pid; typedef struct Tcl_RegExp_ *Tcl_RegExp; -typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey; typedef struct Tcl_ThreadId_ *Tcl_ThreadId; typedef struct Tcl_TimerToken_ *Tcl_TimerToken; typedef struct Tcl_Trace_ *Tcl_Trace; typedef struct Tcl_Var_ *Tcl_Var; +typedef void *Tcl_ThreadDataKey; + /* * Definition of the interface to functions implementing threads. A function * following this definition is given to each call of 'Tcl_CreateThread' and diff --git a/generic/tclInt.h b/generic/tclInt.h index 93adf2a..eab070c 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.367 2008/05/02 20:08:52 patthoyts Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.368 2008/05/09 04:58:54 georgeps Exp $ */ #ifndef _TCLINT @@ -2630,8 +2630,8 @@ MODULE_SCOPE void TclpReleaseFile(TclFile file); MODULE_SCOPE void TclpSetInterfaces(void); MODULE_SCOPE void TclpSetVariables(Tcl_Interp *interp); MODULE_SCOPE void TclpUnloadFile(Tcl_LoadHandle loadHandle); -MODULE_SCOPE void * TclpThreadDataKeyGet(Tcl_ThreadDataKey *keyPtr); -MODULE_SCOPE void TclpThreadDataKeySet(Tcl_ThreadDataKey *keyPtr, +MODULE_SCOPE void * TclThreadStorageKeyGet(Tcl_ThreadDataKey *keyPtr); +MODULE_SCOPE void TclThreadStorageKeySet(Tcl_ThreadDataKey *keyPtr, void *data); MODULE_SCOPE void TclpThreadExit(int status); MODULE_SCOPE size_t TclpThreadGetStackSize(void); @@ -2676,7 +2676,7 @@ MODULE_SCOPE int TclpLoadMemory(Tcl_Interp *interp, void *buffer, Tcl_FSUnloadFileProc **unloadProcPtr); #endif MODULE_SCOPE void TclInitThreadStorage(void); -MODULE_SCOPE void TclpFinalizeThreadDataThread(void); +MODULE_SCOPE void TclFinalizeThreadDataThread(void); MODULE_SCOPE void TclFinalizeThreadStorage(void); #ifdef TCL_WIDE_CLICKS MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void); @@ -2684,6 +2684,11 @@ MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks); #endif MODULE_SCOPE Tcl_Obj * TclDisassembleByteCodeObj(Tcl_Obj *objPtr); +MODULE_SCOPE void * TclpThreadCreateKey(void); +MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); +MODULE_SCOPE void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr); +MODULE_SCOPE void * TclpThreadGetMasterTSD(void *tsdKeyPtr); + /* *---------------------------------------------------------------- * Command procedures in the generic core: diff --git a/generic/tclThread.c b/generic/tclThread.c index 1ab4bc9..1a544e3 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -5,11 +5,12 @@ * the real work is done in the platform dependent files. * * Copyright (c) 1998 by Sun Microsystems, Inc. + * Copyright (c) 2008 by George Peter Staplin * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThread.c,v 1.19 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclThread.c,v 1.20 2008/05/09 04:58:54 georgeps Exp $ */ #include "tclInt.h" @@ -84,21 +85,22 @@ Tcl_GetThreadData( /* * Initialize the key for this thread. */ - result = TclpThreadDataKeyGet(keyPtr); + result = TclThreadStorageKeyGet(keyPtr); if (result == NULL) { - result = ckalloc((size_t) size); - memset(result, 0, (size_t) size); - TclpThreadDataKeySet(keyPtr, result); + result = ckalloc((size_t)size); + memset(result, 0, (size_t)size); + TclThreadStorageKeySet(keyPtr, result); } #else /* TCL_THREADS */ if (*keyPtr == NULL) { - result = ckalloc((size_t) size); - memset(result, 0, (size_t) size); - *keyPtr = (Tcl_ThreadDataKey)result; + result = ckalloc((size_t)size); + memset(result, 0, (size_t)size); + *keyPtr = result; RememberSyncObject((char *) keyPtr, &keyRecord); + } else { + result = *keyPtr; } - result = * (void **) keyPtr; #endif /* TCL_THREADS */ return result; } @@ -122,14 +124,13 @@ Tcl_GetThreadData( void * TclThreadDataKeyGet( - Tcl_ThreadDataKey *keyPtr) /* Identifier for the data chunk, really - * (pthread_key_t **) */ + Tcl_ThreadDataKey *keyPtr) /* Identifier for the data chunk. */ + { #ifdef TCL_THREADS - return TclpThreadDataKeyGet(keyPtr); + return TclThreadStorageKeyGet(keyPtr); #else /* TCL_THREADS */ - char *result = *(char **) keyPtr; - return result; + return *keyPtr; #endif /* TCL_THREADS */ } @@ -355,7 +356,7 @@ Tcl_ConditionFinalize( void TclFinalizeThreadData(void) { - TclpFinalizeThreadDataThread(); + TclFinalizeThreadDataThread(); } /* @@ -396,7 +397,7 @@ TclFinalizeSynchronization(void) if (keyRecord.list != NULL) { for (i=0 ; i 0. 0 is for the initialized Tcl_ThreadDataKey. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadStorage.c,v 1.15 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclThreadStorage.c,v 1.16 2008/05/09 04:58:54 georgeps Exp $ */ #include "tclInt.h" +#include #if defined(TCL_THREADS) -/* - * This is the thread storage cache array and it's accompanying mutex. The - * elements are pairs of thread Id and an associated hash table pointer; the - * hash table being pointed to contains the thread storage for it's associated - * thread. The purpose of this cache is to minimize the number of hash table - * lookups in the master thread storage hash table. - */ - -static Tcl_Mutex threadStorageLock; - -/* - * This is the struct used for a thread storage cache slot. It contains the - * owning thread Id and the associated hash table pointer. - */ - -typedef struct ThreadStorage { - Tcl_ThreadId id; /* the owning thread id */ - Tcl_HashTable *hashTablePtr;/* the hash table for the thread */ -} ThreadStorage; - -/* - * These are the prototypes for the custom hash table allocation functions - * used by the thread storage subsystem. - */ - -static Tcl_HashEntry * AllocThreadStorageEntry(Tcl_HashTable *tablePtr, - void *keyPtr); -static void FreeThreadStorageEntry(Tcl_HashEntry *hPtr); -static Tcl_HashTable * ThreadStorageGetHashTable(Tcl_ThreadId id); - -/* - * This is the hash key type for thread storage. We MUST use this in - * combination with the new hash key type flag TCL_HASH_KEY_SYSTEM_HASH - * because these hash tables MAY be used by the threaded memory allocator. - */ - -static Tcl_HashKeyType tclThreadStorageHashKeyType = { - TCL_HASH_KEY_TYPE_VERSION, /* version */ - TCL_HASH_KEY_SYSTEM_HASH | TCL_HASH_KEY_RANDOMIZE_HASH, - /* flags */ - NULL, /* hashKeyProc */ - NULL, /* compareKeysProc */ - AllocThreadStorageEntry, /* allocEntryProc */ - FreeThreadStorageEntry /* freeEntryProc */ -}; - -/* - * This is an invalid thread value. - */ - -#define STORAGE_INVALID_THREAD (Tcl_ThreadId)0 +static void *tclTsdKey = NULL; +static Tcl_Mutex tclTsdMutex; +static sig_atomic_t tclTsdCounter = 0; -/* - * This is the value for an invalid thread storage key. - */ - -#define STORAGE_INVALID_KEY 0 - -/* - * This is the first valid key for use by external callers. All the values - * below this are RESERVED for future use. - */ +typedef struct TSDTable { + sig_atomic_t allocated; + void **table; +} TSDTable; -#define STORAGE_FIRST_KEY 1 +typedef union { + void *ptr; + volatile sig_atomic_t offset; +} TSDUnion; -/* - * This is the default number of thread storage cache slots. This define may - * need to be fine tuned for maximum performance. - */ - -#define STORAGE_CACHE_SLOTS 97 - -/* - * This is the master thread storage hash table. It is keyed on thread Id and - * contains values that are hash tables for each thread. The thread specific - * hash tables contain the actual thread storage. - */ +static TSDTable *TSDTableCreate(void); +static void TSDTableDelete(TSDTable *t); +static void TSDTableGrow(TSDTable *t, sig_atomic_t atLeast); -static Tcl_HashTable threadStorageHashTable; - -/* - * This is the next thread data key value to use. We increment this everytime - * we "allocate" one. It is initially set to 1 in TclInitThreadStorage. - */ + +static TSDTable * +TSDTableCreate(void) { + TSDTable *t; + sig_atomic_t i; + + t = TclpSysAlloc(sizeof *t, 0); + if (NULL == t) { + Tcl_Panic("unable to allocate TSDTable"); + } -static int nextThreadStorageKey = STORAGE_INVALID_KEY; + t->allocated = 8; + t->table = TclpSysAlloc(sizeof (*(t->table)) * t->allocated, 0); + if (NULL == t->table) { + Tcl_Panic("unable to allocate TSDTable"); + } -/* - * This is the master thread storage cache. Per Kevin Kenny's idea, this - * prevents unnecessary lookups for threads that use a lot of thread storage. - */ + for (i = 0; i < t->allocated; ++i) { + t->table[i] = NULL; + } -static volatile ThreadStorage threadStorageCache[STORAGE_CACHE_SLOTS]; + return t; +} + +static void +TSDTableDelete(TSDTable *t) { + TclpSysFree(t->table); + TclpSysFree(t); +} /* *---------------------------------------------------------------------- * - * AllocThreadStorageEntry -- - * - * Allocate space for a Tcl_HashEntry using TclpSysAlloc (not ckalloc). - * We do this because the threaded memory allocator MAY use the thread - * storage hash tables. + * TSDTableGrow -- * - * Results: - * The return value is a pointer to the created entry. + * This procedure makes the passed TSDTable grow to fit the atLeast value. * - * Side effects: - * None. + * Side effects: The table is enlarged. * *---------------------------------------------------------------------- */ +static void +TSDTableGrow(TSDTable *t, sig_atomic_t atLeast) { + sig_atomic_t newAllocated = t->allocated * 2; + void **newTablePtr; + sig_atomic_t i; -static Tcl_HashEntry * -AllocThreadStorageEntry( - Tcl_HashTable *tablePtr, /* Hash table. */ - void *keyPtr) /* Key to store in the hash table entry. */ -{ - Tcl_HashEntry *hPtr; + if (newAllocated <= atLeast) { + newAllocated = atLeast + 10; + } + + newTablePtr = TclpSysRealloc(t->table, sizeof (*newTablePtr) * newAllocated); - hPtr = (Tcl_HashEntry *) TclpSysAlloc(sizeof(Tcl_HashEntry), 0); - hPtr->key.oneWordValue = keyPtr; - hPtr->clientData = NULL; + if (NULL == newTablePtr) { + Tcl_Panic("unable to reallocate TSDTable"); + } + + for (i = t->allocated; i < newAllocated; ++i) { + newTablePtr[i] = NULL; + } - return hPtr; + t->allocated = newAllocated; + t->table = newTablePtr; } /* *---------------------------------------------------------------------- * - * FreeThreadStorageEntry -- + * TclThreadStorageKeyGet -- * - * Frees space for a Tcl_HashEntry using TclpSysFree (not ckfree). We do - * this because the threaded memory allocator MAY use the thread storage - * hash tables. + * This procedure gets the value associated with the passed key. * - * Results: - * None. - * - * Side effects: - * None. + * Results: A pointer value associated with the Tcl_ThreadDataKey or NULL. * *---------------------------------------------------------------------- */ +void * +TclThreadStorageKeyGet(Tcl_ThreadDataKey *dataKeyPtr) { + TSDTable *t = TclpThreadGetMasterTSD(tclTsdKey); + void *resultPtr = NULL; + TSDUnion *keyPtr = (TSDUnion *)dataKeyPtr; + sig_atomic_t offset = keyPtr->offset; + + if (t == NULL) { + return NULL; + } -static void -FreeThreadStorageEntry( - Tcl_HashEntry *hPtr) /* Hash entry to free. */ -{ - TclpSysFree((char *) hPtr); + if (offset && offset > 0 && offset < t->allocated) { + resultPtr = t->table[offset]; + } + + return resultPtr; } /* *---------------------------------------------------------------------- * - * ThreadStorageGetHashTable -- - * - * This procedure returns a hash table pointer to be used for thread - * storage for the specified thread. This assumes that thread storage - * lock is held. + * TclThreadStorageKeySet -- * - * Results: - * A hash table pointer for the specified thread, or NULL if the hash - * table has not been created yet. - * - * Side effects: - * May change an entry in the master thread storage cache to point to the - * specified thread and it's associated hash table. + * This procedure set an association of value with the key passed. + * The associated value may be retrieved with TclThreadDataKeyGet(). + * + * Side effects: The thread-specific table may be created or reallocated. * *---------------------------------------------------------------------- */ -static Tcl_HashTable * -ThreadStorageGetHashTable( - Tcl_ThreadId id) /* Id of thread to get hash table for */ -{ - int index = PTR2UINT(id) % STORAGE_CACHE_SLOTS; - Tcl_HashEntry *hPtr; - int isNew; - - /* - * It's important that we pick up the hash table pointer BEFORE comparing - * thread Id in case another thread is in the critical region changing - * things out from under you. - */ +void +TclThreadStorageKeySet(Tcl_ThreadDataKey *dataKeyPtr, void *value) { + TSDTable *t = TclpThreadGetMasterTSD(tclTsdKey); + TSDUnion *keyPtr = (TSDUnion *)dataKeyPtr; - Tcl_HashTable *hashTablePtr = threadStorageCache[index].hashTablePtr; + if (NULL == t) { + t = TSDTableCreate(); + TclpThreadSetMasterTSD(tclTsdKey, t); + } - if (threadStorageCache[index].id != id) { - Tcl_MutexLock(&threadStorageLock); + Tcl_MutexLock(&tclTsdMutex); - /* - * It's not in the cache, so we look it up... + if (0 == keyPtr->offset) { + /* + * The Tcl_ThreadDataKey hasn't been used yet. */ + ++tclTsdCounter; - hPtr = Tcl_FindHashEntry(&threadStorageHashTable, (char *) id); - - if (hPtr != NULL) { - /* - * We found it, extract the hash table pointer. - */ - - hashTablePtr = Tcl_GetHashValue(hPtr); - } else { - /* - * The thread specific hash table is not found. - */ - - hashTablePtr = NULL; + if (tclTsdCounter >= t->allocated) { + TSDTableGrow(t, tclTsdCounter); } - if (hashTablePtr == NULL) { - hashTablePtr = (Tcl_HashTable *) - TclpSysAlloc(sizeof(Tcl_HashTable), 0); + keyPtr->offset = tclTsdCounter; - if (hashTablePtr == NULL) { - Tcl_Panic("could not allocate thread specific hash table, " - "TclpSysAlloc failed from ThreadStorageGetHashTable!"); - } - Tcl_InitCustomHashTable(hashTablePtr, TCL_CUSTOM_TYPE_KEYS, - &tclThreadStorageHashKeyType); + t->table[tclTsdCounter] = value; + } else { + if (keyPtr->offset >= t->allocated) { /* - * Add new thread storage hash table to the master hash table. + * This is the first time this Tcl_ThreadDataKey has been + * used with the current thread. */ - - hPtr = Tcl_CreateHashEntry(&threadStorageHashTable, (char *) id, - &isNew); - - if (hPtr == NULL) { - Tcl_Panic("Tcl_CreateHashEntry failed from " - "ThreadStorageGetHashTable!"); - } - Tcl_SetHashValue(hPtr, hashTablePtr); + TSDTableGrow(t, keyPtr->offset); } - /* - * Now, we put it in the cache since it is highly likely it will be - * needed again shortly. - */ - - threadStorageCache[index].id = id; - threadStorageCache[index].hashTablePtr = hashTablePtr; - - Tcl_MutexUnlock(&threadStorageLock); + t->table[keyPtr->offset] = value; } - return hashTablePtr; + Tcl_MutexUnlock(&tclTsdMutex); } /* *---------------------------------------------------------------------- * - * TclInitThreadStorage -- + * TclFinalizeThreadDataThread -- * - * Initializes the thread storage allocator. - * - * Results: - * None. - * - * Side effects: - * This procedure initializes the master hash table that maps thread ID - * onto the individual index tables that map thread data key to thread - * data. It also creates a cache that enables fast lookup of the thread - * data block array for a recently executing thread without using - * spinlocks. - * - * This procedure is called from an extremely early point in Tcl's - * initialization. In particular, it may not use ckalloc/ckfree because they - * may depend on thread-local storage (it uses TclpSysAlloc and TclpSysFree - * instead). It may not depend on synchronization primitives - but no threads - * other than the master thread have yet been launched. - * - *---------------------------------------------------------------------- - */ - -void -TclInitThreadStorage(void) -{ - Tcl_InitCustomHashTable(&threadStorageHashTable, TCL_CUSTOM_TYPE_KEYS, - &tclThreadStorageHashKeyType); - - /* - * We also initialize the cache. - */ - - memset((void*) &threadStorageCache, 0, - sizeof(ThreadStorage) * STORAGE_CACHE_SLOTS); - - /* - * Now, we set the first value to be used for a thread data key. - */ - - nextThreadStorageKey = STORAGE_FIRST_KEY; -} - -/* - *---------------------------------------------------------------------- - * - * TclpThreadDataKeyGet -- - * - * This procedure returns a pointer to a block of thread local storage. - * - * Results: - * A thread-specific pointer to the data structure, or NULL if the memory - * has not been assigned to this key for this thread. - * - * Side effects: - * None. + * This procedure finalizes the data for a single thread. + * * + * Side effects: The TSDTable is deleted/freed. *---------------------------------------------------------------------- */ +void +TclFinalizeThreadDataThread(void) { + TSDTable *t = TclpThreadGetMasterTSD(tclTsdKey); -void * -TclpThreadDataKeyGet( - Tcl_ThreadDataKey *keyPtr) /* Identifier for the data chunk, really - * (int**) */ -{ - Tcl_HashTable *hashTablePtr = - ThreadStorageGetHashTable(Tcl_GetCurrentThread()); - Tcl_HashEntry *hPtr = Tcl_FindHashEntry(hashTablePtr, (char *) keyPtr); - - if (hPtr == NULL) { - return NULL; + if (NULL == t) { + return; } - return Tcl_GetHashValue(hPtr); -} - -/* - *---------------------------------------------------------------------- - * - * TclpThreadDataKeySet -- - * - * This procedure sets the pointer to a block of thread local storage. - * - * Results: - * None. - * - * Side effects: - * Sets up the thread so future calls to TclpThreadDataKeyGet with this - * key will return the data pointer. - * - *---------------------------------------------------------------------- - */ -void -TclpThreadDataKeySet( - Tcl_ThreadDataKey *keyPtr, /* Identifier for the data chunk, really - * (pthread_key_t **) */ - void *data) /* Thread local storage */ -{ - Tcl_HashTable *hashTablePtr; - Tcl_HashEntry *hPtr; - int dummy; - - hashTablePtr = ThreadStorageGetHashTable(Tcl_GetCurrentThread()); - hPtr = Tcl_CreateHashEntry(hashTablePtr, (char *)keyPtr, &dummy); - - Tcl_SetHashValue(hPtr, data); + TSDTableDelete(t); + + TclpThreadSetMasterTSD(tclTsdKey, NULL); } /* *---------------------------------------------------------------------- * - * TclpFinalizeThreadDataThread -- + * TclInitializeThreadStorage -- * - * This procedure cleans up the thread storage hash table for the - * current thread. - * - * Results: - * None. - * - * Side effects: - * Frees all associated thread storage, all hash table entries for - * the thread's thread storage, and the hash table itself. + * This procedure initializes the TSD subsystem with per-platform + * code. This should be called before any Tcl threads are created. * *---------------------------------------------------------------------- */ - void -TclpFinalizeThreadDataThread(void) -{ - Tcl_ThreadId id = Tcl_GetCurrentThread(); - /* Id of the thread to finalize. */ - int index = PTR2UINT(id) % STORAGE_CACHE_SLOTS; - Tcl_HashEntry *hPtr; /* Hash entry for current thread in master - * table. */ - Tcl_HashTable* hashTablePtr;/* Pointer to the hash table holding TSD - * blocks for the current thread*/ - Tcl_HashSearch search; /* Search object to walk the TSD blocks in the - * designated thread */ - Tcl_HashEntry *hPtr2; /* Hash entry for a TSD block in the - * designated thread. */ - - Tcl_MutexLock(&threadStorageLock); - hPtr = Tcl_FindHashEntry(&threadStorageHashTable, (char*)id); - if (hPtr == NULL) { - hashTablePtr = NULL; - } else { - /* - * We found it, extract the hash table pointer. - */ - - hashTablePtr = Tcl_GetHashValue(hPtr); - Tcl_DeleteHashEntry(hPtr); - - /* - * Make sure cache entry for this thread is NULL. - */ - - if (threadStorageCache[index].id == id) { - /* - * We do not step on another thread's cache entry. This is - * especially important if we are creating and exiting a lot of - * threads. - */ - - threadStorageCache[index].id = STORAGE_INVALID_THREAD; - threadStorageCache[index].hashTablePtr = NULL; - } - } - Tcl_MutexUnlock(&threadStorageLock); - - /* - * The thread's hash table has been extracted and removed from the master - * hash table. Now clean up the thread. - */ - - if (hashTablePtr != NULL) { - /* - * Free all TSD - */ - - for (hPtr2 = Tcl_FirstHashEntry(hashTablePtr, &search); hPtr2 != NULL; - hPtr2 = Tcl_NextHashEntry(&search)) { - void *blockPtr = Tcl_GetHashValue(hPtr2); - - if (blockPtr != NULL) { - /* - * The block itself was allocated in Tcl_GetThreadData using - * ckalloc; use ckfree to dispose of it. - */ - - ckfree(blockPtr); - } - } - - /* - * Delete thread specific hash table and free the struct. - */ - - Tcl_DeleteHashTable(hashTablePtr); - TclpSysFree((char *) hashTablePtr); - } +TclInitThreadStorage(void) { + tclTsdKey = TclpThreadCreateKey(); } /* @@ -475,72 +237,23 @@ TclpFinalizeThreadDataThread(void) * * TclFinalizeThreadStorage -- * - * This procedure cleans up the master thread storage hash table, all - * thread specific hash tables, and the thread storage cache. + * This procedure cleans up the thread storage data key for all + * threads. + * + * IMPORTANT: All Tcl threads must be finalized before calling this! * * Results: - * None. + * None. * * Side effects: - * The master thread storage hash table and thread storage cache are - * reset to their initial (empty) state. + * Releases the thread data key. * *---------------------------------------------------------------------- */ - void -TclFinalizeThreadStorage(void) -{ - Tcl_HashSearch search; /* We need to hit every thread with this - * search. */ - Tcl_HashEntry *hPtr; /* Hash entry for current thread in master - * table. */ - Tcl_MutexLock(&threadStorageLock); - - /* - * We are going to delete the hash table for every thread now. This hash - * table should be empty at this point, except for one entry for the - * current thread. - */ - - for (hPtr = Tcl_FirstHashEntry(&threadStorageHashTable, &search); - hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { - Tcl_HashTable *hashTablePtr = Tcl_GetHashValue(hPtr); - - if (hashTablePtr != NULL) { - /* - * Delete thread specific hash table for the thread in question - * and free the struct. - */ - - Tcl_DeleteHashTable(hashTablePtr); - TclpSysFree((char *)hashTablePtr); - } - - /* - * Delete thread specific entry from master hash table. - */ - - Tcl_SetHashValue(hPtr, NULL); - } - - Tcl_DeleteHashTable(&threadStorageHashTable); - - /* - * Clear out the thread storage cache as well. - */ - - memset((void*) &threadStorageCache, 0, - sizeof(ThreadStorage) * STORAGE_CACHE_SLOTS); - - /* - * Reset this to zero, it will be set to STORAGE_FIRST_KEY if the thread - * storage subsystem gets reinitialized - */ - - nextThreadStorageKey = STORAGE_INVALID_KEY; - - Tcl_MutexUnlock(&threadStorageLock); +TclFinalizeThreadStorage(void) { + TclpThreadDeleteKey(tclTsdKey); + tclTsdKey = NULL; } #else /* !defined(TCL_THREADS) */ @@ -555,7 +268,7 @@ TclInitThreadStorage(void) } void -TclpFinalizeThreadDataThread(void) +TclFinalizeThreadDataThread(void) { } diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 0cb4b5d..63e8733 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -5,11 +5,12 @@ * * Copyright (c) 1991-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright (c) 2008 by George Peter Staplin * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixThrd.c,v 1.57 2008/01/11 11:53:02 msofer Exp $ + * RCS: @(#) $Id: tclUnixThrd.c,v 1.58 2008/05/09 04:58:54 georgeps Exp $ */ #include "tclInt.h" @@ -851,6 +852,48 @@ TclpSetAllocCache( pthread_setspecific(key, arg); } #endif /* USE_THREAD_ALLOC */ + + + +void *TclpThreadCreateKey(void) { + pthread_key_t *key; + + key = TclpSysAlloc(sizeof *key, 0); + if (NULL == key) { + Tcl_Panic("unable to allocate thread key!"); + } + + if (pthread_key_create(key, NULL)) { + Tcl_Panic("unable to create pthread key!"); + } + + return key; +} + +void TclpThreadDeleteKey(void *keyPtr) { + pthread_key_t *key = keyPtr; + + if (pthread_key_delete(*key)) { + Tcl_Panic("unable to delete key!"); + } + + TclpSysFree(keyPtr); +} + +void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) { + pthread_key_t *key = tsdKeyPtr; + + if (pthread_setspecific(*key, ptr)) { + Tcl_Panic("unable to set master TSD value"); + } +} + +void *TclpThreadGetMasterTSD(void *tsdKeyPtr) { + pthread_key_t *key = tsdKeyPtr; + + return pthread_getspecific(*key); +} + #endif /* TCL_THREADS */ /* diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 11dcd1a..f6732b8 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -5,11 +5,12 @@ * * Copyright (c) 1998 by Sun Microsystems, Inc. * Copyright (c) 1999 by Scriptics Corporation + * Copyright (c) 2008 by George Peter Staplin * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.44 2008/04/27 22:21:37 dkf Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.45 2008/05/09 04:58:55 georgeps Exp $ */ #include "tclWinInt.h" @@ -854,6 +855,9 @@ TclpFinalizeCondition( } } + + + /* * Additions by AOL for specialized thread memory allocator. */ @@ -954,6 +958,45 @@ TclpFreeAllocCache( } #endif /* USE_THREAD_ALLOC */ + + +void *TclpThreadCreateKey (void) { + DWORD *key; + + key = TclpSysAlloc(sizeof *key, 0); + if (key == NULL) { + Tcl_Panic("unable to allocate thread key!"); + } + + *key = TlsAlloc(); + + return key; +} + +void TclpThreadDeleteKey(void *keyPtr) { + DWORD *key = keyPtr; + + if (!TlsFree(*key)) { + Tcl_Panic("unable to delete key"); + } + + TclpSysFree(keyPtr); +} + +void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) { + DWORD *key = tsdKeyPtr; + + if (!TlsSetValue(*key, ptr)) { + Tcl_Panic("unable to set master TSD value"); + } +} + +void *TclpThreadGetMasterTSD(void *tsdKeyPtr) { + DWORD *key = tsdKeyPtr; + + return TlsGetValue(*key); +} + #endif /* TCL_THREADS */ /* -- cgit v0.12 From 8c6b0215a7ccebe49708b68c096c93ae84113fb6 Mon Sep 17 00:00:00 2001 From: georgeps Date: Fri, 9 May 2008 05:07:37 +0000 Subject: * tools/tsdPerf.c A loadable Tcl extension for testing TSD performance. * tools/tsdPerf.tcl A simplistic tool that uses the thread extension and tsdPerf.so to get some performance metrics by, simulating, simple TSD contention. --- ChangeLog | 8 ++++++++ tools/tsdPerf.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/tsdPerf.tcl | 24 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 tools/tsdPerf.c create mode 100644 tools/tsdPerf.tcl diff --git a/ChangeLog b/ChangeLog index df677d6..8233bda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ 2008-05-09 George Peter Staplin + * tools/tsdPerf.c A loadable Tcl extension for testing TSD + performance. + * tools/tsdPerf.tcl A simplistic tool that uses the thread + extension and tsdPerf.so to get some performance metrics by, + simulating, simple TSD contention. + + +2008-05-09 George Peter Staplin * generic/tcl.h: Make Tcl_ThreadDataKey a void *. * generic/tclInt.h: Change around some function names and diff --git a/tools/tsdPerf.c b/tools/tsdPerf.c new file mode 100644 index 0000000..a6a84df --- /dev/null +++ b/tools/tsdPerf.c @@ -0,0 +1,61 @@ +#include + +static Tcl_ThreadDataKey key; + +typedef struct { + int value; +} TsdPerf; + + +int +tsdPerfSetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { + TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf)); + int i; + + if (2 != objc) { + Tcl_WrongNumArgs(interp, 1, objv, "value"); + return TCL_ERROR; + } + + if (TCL_OK != Tcl_GetIntFromObj(interp, objv[1], &i)) { + return TCL_ERROR; + } + + perf->value = i; + + return TCL_OK; +} + +int tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { + TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf)); + + + Tcl_SetObjResult(interp, Tcl_NewIntObj(perf->value)); + + return TCL_OK; +} + + +int +Tsdperf_Init (Tcl_Interp *interp) { + if (NULL == Tcl_InitStubs(interp, TCL_VERSION, 0)) { + return TCL_ERROR; + } + + + Tcl_CreateObjCommand(interp, "tsdPerfSet", tsdPerfSetObjCmd, (ClientData)NULL, + (Tcl_CmdDeleteProc *)NULL); + Tcl_CreateObjCommand(interp, "tsdPerfGet", tsdPerfGetObjCmd, (ClientData)NULL, + (Tcl_CmdDeleteProc *)NULL); + + + return TCL_OK; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/tools/tsdPerf.tcl b/tools/tsdPerf.tcl new file mode 100644 index 0000000..c2d74c9 --- /dev/null +++ b/tools/tsdPerf.tcl @@ -0,0 +1,24 @@ + +package require Thread + +set ::tids [list] +for {set i 0} {$i < 4} {incr i} { + lappend ::tids [thread::create [string map [list IVALUE $i] { + set curdir [file dirname [info script]] + load [file join $curdir tsdPerf.so] + + while 1 { + tsdPerfSet IVALUE + } + }]] +} + +puts TIDS:$::tids + +set curdir [file dirname [info script]] +load [file join $curdir tsdPerf.so] + +tsdPerfSet 1234 +while 1 { + puts "TIME:[time {set value [tsdPerfGet]} 1000] VALUE:$value" +} -- cgit v0.12 From 5e16c3823829638c614e311586d3e0c9ca0fa32a Mon Sep 17 00:00:00 2001 From: patthoyts Date: Thu, 15 May 2008 00:04:08 +0000 Subject: We should use the thread allocator for threaded builds. Added 'tclalloc' option to disable. --- ChangeLog | 5 +++++ win/makefile.vc | 9 ++++++--- win/nmakehlp.c | 6 +++--- win/rules.vc | 7 +++++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8233bda..a8a5da6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-15 Pat Thoyts + + * win/makefile.vc: We should use the thread allocator for threaded + * win/rules.vc: builds. Added 'tclalloc' option to disable. + 2008-05-09 George Peter Staplin * tools/tsdPerf.c A loadable Tcl extension for testing TSD performance. diff --git a/win/makefile.vc b/win/makefile.vc index af07425..ef914ac 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -10,9 +10,10 @@ # Copyright (c) 1998-2000 Ajuba Solutions. # Copyright (c) 2001-2005 ActiveState Corporation. # Copyright (c) 2001-2004 David Gravereaux. +# Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.178 2008/04/27 10:59:26 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.179 2008/05/15 00:04:10 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -90,7 +91,9 @@ the build instructions. # tclshXX.exe to have the dde and reg extension linked # inside it. # threads = Turns on full multithreading support. -# thrdalloc = Use the thread allocator (shared global free pool). +# thrdalloc = Use the thread allocator (shared global free pool) +# This is the default on threaded builds. +# tclalloc = Use the old non-thread allocator # thrdstorage = Use the generic thread storage support. # symbols = Adds symbols for step debugging. # profile = Adds profiling hooks. Map file is assumed. @@ -413,7 +416,7 @@ WINDIR = $(ROOT)\win ### This cranks the optimization level to maximize speed cdebug = -O2 $(OPTIMIZATIONS) !else -cdebug = +cdebug = !endif !else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64" ### Warnings are too many, can't support warnings into errors. diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 21dc36b..65777aa 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * ---------------------------------------------------------------------------- - * RCS: @(#) $Id: nmakehlp.c,v 1.21 2007/12/14 02:27:11 patthoyts Exp $ + * RCS: @(#) $Id: nmakehlp.c,v 1.22 2008/05/15 00:04:10 patthoyts Exp $ * ---------------------------------------------------------------------------- */ @@ -23,10 +23,10 @@ #include /* - * This library is required for x64 builds with _some_ versions + * This library is required for x64 builds with _some_ versions of MSVC */ #if defined(_M_IA64) || defined(_M_AMD64) -#if _MSC_FULL_VER > 140000000 && _MSC_FULL_VER <= 140040310 +#if _MSC_VER >= 1400 && _MSC_VER < 1500 #pragma comment(lib, "bufferoverflowU") #endif #endif diff --git a/win/rules.vc b/win/rules.vc index 83a82b9..5b5bc71 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.35 2007/12/13 15:28:43 dgp Exp $ +# RCS: @(#) $Id: rules.vc,v 1.36 2008/05/15 00:04:11 patthoyts Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -242,6 +242,7 @@ TCL_USE_STATIC_PACKAGES = 0 !if [nmakehlp -f $(OPTS) "threads"] !message *** Doing threads TCL_THREADS = 1 +USE_THREAD_ALLOC= 1 !else TCL_THREADS = 0 !endif @@ -266,7 +267,9 @@ LOIMPACT = 0 !if [nmakehlp -f $(OPTS) "thrdalloc"] !message *** Doing thrdalloc USE_THREAD_ALLOC = 1 -!else +!endif +!if [nmakehlp -f $(OPTS) "tclalloc"] +!message *** Doing thrdalloc USE_THREAD_ALLOC = 0 !endif !if [nmakehlp -f $(OPTS) "unchecked"] -- cgit v0.12 From ecf4164c6f084705cf96b0610c3bfc82c44a094f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 16 May 2008 14:13:32 +0000 Subject: * generic/tclCompile.c: fix crash with tcl_traceExec. Found and fixed by Alexander Pasadyn [Bug 1964803]. --- ChangeLog | 5 +++++ generic/tclCompile.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8a5da6..ecbc97f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-16 Miguel Sofer + + * generic/tclCompile.c: fix crash with tcl_traceExec. Found and + fixed by Alexander Pasadyn [Bug 1964803]. + 2008-05-15 Pat Thoyts * win/makefile.vc: We should use the thread allocator for threaded diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 4b68c40..ec94d6b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.146 2008/01/23 21:21:30 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.147 2008/05/16 14:13:33 msofer Exp $ */ #include "tclInt.h" @@ -3342,7 +3342,7 @@ TclPrintSource( TclNewObj(bufferObj); PrintSourceToObj(bufferObj, stringPtr, maxChars); - fprintf(outFile, TclGetString(bufferObj)); + fprintf(outFile, "%s", TclGetString(bufferObj)); Tcl_DecrRefCount(bufferObj); } #endif /* TCL_COMPILE_DEBUG */ -- cgit v0.12 From a1ca307c098bd1b12e73b18eb500707296e084ca Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 20 May 2008 22:22:14 +0000 Subject: Correct logic for handling error cases when setting the namespace unknown handler. --- ChangeLog | 54 ++++++++++++++++++++++++---------------------- generic/tclNamesp.c | 61 +++++++++++++++++++++++++++++++--------------------- tests/namespace.test | 13 +++++++++-- 3 files changed, 76 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecbc97f..7820292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ +2008-05-20 Donal K. Fellows + + * generic/tclNamesp.c (Tcl_SetNamespaceUnknownHandler): Corrected odd + logic for handling installation of namespace unknown handlers which + could lead too very strange things happening in the error case. + 2008-05-16 Miguel Sofer - * generic/tclCompile.c: fix crash with tcl_traceExec. Found and - fixed by Alexander Pasadyn [Bug 1964803]. + * generic/tclCompile.c: fix crash with tcl_traceExec. Found and fixed + by Alexander Pasadyn. [Bug 1964803] 2008-05-15 Pat Thoyts @@ -15,38 +21,34 @@ extension and tsdPerf.so to get some performance metrics by, simulating, simple TSD contention. - 2008-05-09 George Peter Staplin * generic/tcl.h: Make Tcl_ThreadDataKey a void *. - * generic/tclInt.h: Change around some function names and - add some new per-platform declarations for thread-specific data - functions. - * generic/tclThread.c: Make use of of the new function names - that no longer have a Tclp prefix. - * generic/tclThreadStorage.c: Replace the core thread-specific data - (TSD) mechanism with an array offset solution that eliminates the - hash tables, and only uses one slot of native TSD. - Many thanks to Kevin B. Kenny for his help with this. - - * unix/tclUnixThrd.c: Add platform-specific TSD functions for use - by tclThreadStorage.c. - * win/tclWinThrd.c: Add platform-specific TSD functions for use - by tclThreadStorage.c. + * generic/tclInt.h: Change around some function names and add some + new per-platform declarations for thread-specific data functions. + * generic/tclThread.c: Make use of of the new function names that no + longer have a Tclp prefix. + * generic/tclThreadStorage.c: Replace the core thread-specific data + (TSD) mechanism with an array offset solution that eliminates the hash + tables, and only uses one slot of native TSD. Many thanks to Kevin B. + Kenny for his help with this. + + * unix/tclUnixThrd.c: Add platform-specific TSD functions for use by + tclThreadStorage.c. + * win/tclWinThrd.c: Add platform-specific TSD functions for use by + tclThreadStorage.c. 2008-05-09 Kevin B. Kenny - * tests/dict.test (dict-19.2): Corrected a bug where - the test was changed to use [apply] instead of a temporary - proc, but the cleanup script still attempted to delete - the temporary proc. - + * tests/dict.test (dict-19.2): Corrected a bug where the test was + changed to use [apply] instead of a temporary proc, but the cleanup + script still attempted to delete the temporary proc. + 2008-05-07 Donal K. Fellows - * generic/tclCompCmds.c (TclCompileDictAppendCmd): Fix silly - off-by one error that caused a crash every time a compiled 'dict - append' with more than one argument was used. Found by Colin - McCormack. + * generic/tclCompCmds.c (TclCompileDictAppendCmd): Fix silly off-by + one error that caused a crash every time a compiled 'dict append' with + more than one argument was used. Found by Colin McCormack. 2008-05-02 Pat Thoyts diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index f7fa9c1..691c62f 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.162 2008/03/02 18:46:39 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.163 2008/05/20 22:22:16 dkf Exp $ */ #include "tclInt.h" @@ -4296,45 +4296,58 @@ Tcl_SetNamespaceUnknownHandler( Tcl_Namespace *nsPtr, /* Namespace which is being updated. */ Tcl_Obj *handlerPtr) /* The new handler, or NULL to reset. */ { - int lstlen; + int lstlen = 0; Namespace *currNsPtr = (Namespace *)nsPtr; - if (currNsPtr->unknownHandlerPtr != NULL) { - /* - * Remove old handler first. - */ + /* + * Ensure that we check for errors *first* before we change anything. + */ - Tcl_DecrRefCount(currNsPtr->unknownHandlerPtr); - currNsPtr->unknownHandlerPtr = NULL; + if (handlerPtr != NULL) { + if (TclListObjLength(interp, handlerPtr, &lstlen) != TCL_OK) { + /* + * Not a list. + */ + + return TCL_ERROR; + } + if (lstlen > 0) { + /* + * We are going to be saving this handler. Increment the reference + * count before decrementing the refcount on the previous handler, + * so that nothing strange can happen if we are told to set the + * handler to the previous value. + */ + + Tcl_IncrRefCount(handlerPtr); + } } /* - * If NULL or an empty list is passed, then reset to the default - * handler. + * Remove old handler next. */ - if (handlerPtr == NULL) { - currNsPtr->unknownHandlerPtr = NULL; - } else if (TclListObjLength(interp, handlerPtr, &lstlen) != TCL_OK) { - /* - * Not a list. - */ + if (currNsPtr->unknownHandlerPtr != NULL) { + Tcl_DecrRefCount(currNsPtr->unknownHandlerPtr); + } - return TCL_ERROR; - } else if (lstlen == 0) { + /* + * Install the new handler. + */ + + if (lstlen > 0) { /* - * Empty list - reset to default. + * Just store the handler. It already has the correct reference count. */ - currNsPtr->unknownHandlerPtr = NULL; + currNsPtr->unknownHandlerPtr = handlerPtr; } else { /* - * Increment ref count and store. The reference count is decremented - * either in the code above, or when the namespace is deleted. + * If NULL or an empty list is passed, this resets to the default + * handler. */ - Tcl_IncrRefCount(handlerPtr); - currNsPtr->unknownHandlerPtr = handlerPtr; + currNsPtr->unknownHandlerPtr = NULL; } return TCL_OK; } diff --git a/tests/namespace.test b/tests/namespace.test index e445189..9fb2d9a 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.70 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: namespace.test,v 1.71 2008/05/20 22:22:17 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -2619,7 +2619,16 @@ test namespace-52.11 {unknown: with TCL_EVAL_INVOKE} -setup { rename unknown.save ::unknown namespace eval :: [list namespace unknown $handler] } -result SUCCESS - +test namespace-52.12 {unknown: error case must not reset handler} -body { + namespace eval foo { + namespace unknown ok + catch {namespace unknown {{}{}{}}} + namespace unknown + } +} -cleanup { + namespace delete foo +} -result ok + # cleanup catch {rename cmd1 {}} catch {unset l} -- cgit v0.12 From f2de8e1838fd8e298098915a1fc9292b01af59a5 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 21 May 2008 20:28:12 +0000 Subject: * generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace() * tests/parse.test (parse-15.60): routine has no mechanism to return the "incomplete" status of "\\\n" so calling this routine anywhere that can be reached within a Tcl_ParseCommand() call is a mistake. In particular, ParseComment() must not use it. [Bug 1968882]. --- ChangeLog | 8 ++++++++ generic/tclParse.c | 11 +++++++---- tests/parse.test | 6 +++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7820292..a8da0e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-21 Don Porter + + * generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace() + * tests/parse.test (parse-15.60): routine has no mechanism to + return the "incomplete" status of "\\\n" so calling this routine + anywhere that can be reached within a Tcl_ParseCommand() call is a + mistake. In particular, ParseComment() must not use it. [Bug 1968882]. + 2008-05-20 Donal K. Fellows * generic/tclNamesp.c (Tcl_SetNamespaceUnknownHandler): Corrected odd diff --git a/generic/tclParse.c b/generic/tclParse.c index b4b872d..620f54e 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.63 2008/04/27 22:21:31 dkf Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.64 2008/05/21 20:28:14 dgp Exp $ */ #include "tclInt.h" @@ -954,9 +954,12 @@ ParseComment( char type; int scanned; - scanned = TclParseAllWhiteSpace(p, numBytes); - p += scanned; - numBytes -= scanned; + do { + scanned = ParseWhiteSpace(p, numBytes, + &parsePtr->incomplete, &type); + p += scanned; + numBytes -= scanned; + } while (numBytes && (*p == '\n') && (p++,numBytes--)); if ((numBytes == 0) || (*p != '#')) { break; diff --git a/tests/parse.test b/tests/parse.test index 5becb4c..e978907 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.30 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: parse.test,v 1.31 2008/05/21 20:28:15 dgp Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -884,6 +884,10 @@ test parse-15.59 {CommandComplete procedure} { # Test for Tcl Bug 684744 info complete [encoding convertfrom identity "\x00;if 1 \{"] } 0 +test parse-15.60 {CommandComplete procedure} { + # Test for Tcl Bug 1968882 + info complete \\\n +} 0 test parse-16.1 {Tcl_EvalEx, check termOffset is set correctly for non TCL_OK cases, bug 2535} { subst {[eval {return foo}]bar} -- cgit v0.12 From 0cc498df8a623e2490e79096ec68eb60a01a2c2b Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 22 May 2008 15:22:05 +0000 Subject: * generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to handle the argument value length = -1. Thanks to Chris Darroch for discovering the bug and providing the fix. [Bug 1968245]. --- ChangeLog | 6 ++++++ generic/tclNamesp.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a8da0e6..82b5e4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-22 Don Porter + + * generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to + handle the argument value length = -1. Thanks to Chris Darroch for + discovering the bug and providing the fix. [Bug 1968245]. + 2008-05-21 Don Porter * generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace() diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 691c62f..cf39f90 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.163 2008/05/20 22:22:16 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.164 2008/05/22 15:22:07 dgp Exp $ */ #include "tclInt.h" @@ -6952,6 +6952,9 @@ Tcl_LogCommandInfo( } } + if (length < 0) { + length = strlen(command); + } overflow = (length > limit); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n %s\n\"%.*s%s\"", ((iPtr->errorInfo == NULL) -- cgit v0.12 From 330add62d15d66049d37d4e23a769b78074d15ab Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 23 May 2008 21:00:42 +0000 Subject: * win/tclWinChan.c (FileWideSeekProc): Accepted a patch by Alexandre Ferrieux to fix the [Bug 1965787]. 'tell' now works for locations > 2 GB as well instead of going negative. * generic/tclIO.c (Tcl_SetChannelBufferSize): Accepted a patch by * tests/io.test: Alexandre Ferrieux * tests/chanio.test: to fix the [Bug 1969953]. Buffersize outside of the supported range are now clipped to nearest boundary instead of ignored. --- ChangeLog | 13 +++++++++++++ generic/tclIO.c | 13 ++++++++----- generic/tclVar.c | 15 ++++++++++++--- tests/chanio.test | 12 ++++++------ tests/io.test | 12 ++++++------ tools/genStubs.tcl | 5 ++++- unix/Makefile.in | 8 ++++---- win/Makefile.in | 7 ++++--- win/tclWinChan.c | 4 ++-- 9 files changed, 59 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82b5e4e..b295620 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-05-23 Andreas Kupries + + * win/tclWinChan.c (FileWideSeekProc): Accepted a patch by + Alexandre Ferrieux to fix the + [Bug 1965787]. 'tell' now works for locations > 2 GB as well + instead of going negative. + + * generic/tclIO.c (Tcl_SetChannelBufferSize): Accepted a patch by + * tests/io.test: Alexandre Ferrieux + * tests/chanio.test: to fix the [Bug 1969953]. Buffersize outside + of the supported range are now clipped to nearest boundary instead + of ignored. + 2008-05-22 Don Porter * generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to diff --git a/generic/tclIO.c b/generic/tclIO.c index 1d917ba..08d73ec 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.142 2008/04/15 18:34:47 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.143 2008/05/23 21:00:44 andreas_kupries Exp $ */ #include "tclInt.h" @@ -224,6 +224,8 @@ static Tcl_ObjType tclChannelType = { #define BUSY_STATE(st,fl) \ ((((st)->csPtrR) && ((fl) & TCL_READABLE)) || \ (((st)->csPtrW) && ((fl) & TCL_WRITABLE))) + +#define MAX_CHANNEL_BUFFER_SIZE (1024*1024) /* *--------------------------------------------------------------------------- @@ -6937,12 +6939,13 @@ Tcl_SetChannelBufferSize( ChannelState *statePtr; /* State of real channel structure. */ /* - * If the buffer size is smaller than 1 byte or larger than one MByte, do - * not accept the requested size and leave the current buffer size. + * Clip the buffer size to force it into the [1,1M] range */ - if (sz < 1 || sz > 1024*1024) { - return; + if (sz < 1) { + sz = 1; + } else if (sz > MAX_CHANNEL_BUFFER_SIZE) { + sz = MAX_CHANNEL_BUFFER_SIZE; } statePtr = ((Channel *) chan)->state; diff --git a/generic/tclVar.c b/generic/tclVar.c index 3bcc527..a88f15c 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.160 2008/03/11 17:23:56 msofer Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.161 2008/05/23 21:00:45 andreas_kupries Exp $ */ #include "tclInt.h" @@ -67,10 +67,19 @@ VarHashCreateVar( #define VarHashFindVar(tablePtr, key) \ VarHashCreateVar((tablePtr), (key), NULL) - +#ifdef _AIX +/* Work around AIX cc problem causing crash in TclDeleteVars. Possible + * optimizer bug. Do _NOT_ inline this function, this re-activates the + * problem. + */ +static void +VarHashInvalidateEntry(Var* varPtr) { + varPtr->flags |= VAR_DEAD_HASH; +} +#else #define VarHashInvalidateEntry(varPtr) \ ((varPtr)->flags |= VAR_DEAD_HASH) - +#endif #define VarHashDeleteEntry(varPtr) \ Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry)) diff --git a/tests/chanio.test b/tests/chanio.test index 6e8fb44..6e44c38 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.12 2008/04/23 15:44:37 dkf Exp $ +# RCS: @(#) $Id: chanio.test,v 1.13 2008/05/23 21:00:45 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -4863,7 +4863,7 @@ test chan-io-38.2 {Tcl_SetChannelBufferSize, Tcl_GetChannelBufferSize} { lappend l [chan configure $f -buffersize] chan close $f set l -} {4096 10000 1 1 1 100000 100000} +} {4096 10000 1 1 1 100000 1048576} test chan-io-38.3 {Tcl_SetChannelBufferSize, changing buffersize between reads} { # This test crashes the interp if Bug #427196 is not fixed @@ -5024,22 +5024,22 @@ test chan-io-39.10 {Tcl_SetChannelOption, blocking mode} {stdio openpipe} { chan close $f1 set x } {0 {} 1 {} 1 {} 1 1 hi 0 0 {} 1} -test chan-io-39.11 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} { +test chan-io-39.11 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size clipped to lower bound} { file delete $path(test1) set f [open $path(test1) w] chan configure $f -buffersize -10 set x [chan configure $f -buffersize] chan close $f set x -} 4096 -test chan-io-39.12 {Tcl_SetChannelOption, Tcl_GetChannelOption buffer size} { +} 1 +test chan-io-39.12 {Tcl_SetChannelOption, Tcl_GetChannelOption buffer size clipped to upper bound} { file delete $path(test1) set f [open $path(test1) w] chan configure $f -buffersize 10000000 set x [chan configure $f -buffersize] chan close $f set x -} 4096 +} 1048576 test chan-io-39.13 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} { file delete $path(test1) set f [open $path(test1) w] diff --git a/tests/io.test b/tests/io.test index e03fa8a..10115c1 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.88 2008/04/15 18:34:48 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.89 2008/05/23 21:00:45 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -4858,7 +4858,7 @@ test io-38.2 {Tcl_SetChannelBufferSize, Tcl_GetChannelBufferSize} { lappend l [fconfigure $f -buffersize] close $f set l -} {4096 10000 1 1 1 100000 100000} +} {4096 10000 1 1 1 100000 1048576} test io-38.3 {Tcl_SetChannelBufferSize, changing buffersize between reads} { # This test crashes the interp if Bug #427196 is not fixed @@ -5019,22 +5019,22 @@ test io-39.10 {Tcl_SetChannelOption, blocking mode} {stdio openpipe} { close $f1 set x } {0 {} 1 {} 1 {} 1 1 hi 0 0 {} 1} -test io-39.11 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} { +test io-39.11 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size clipped to lower bound} { file delete $path(test1) set f [open $path(test1) w] fconfigure $f -buffersize -10 set x [fconfigure $f -buffersize] close $f set x -} 4096 -test io-39.12 {Tcl_SetChannelOption, Tcl_GetChannelOption buffer size} { +} 1 +test io-39.12 {Tcl_SetChannelOption, Tcl_GetChannelOption buffer size clipped to upper bound} { file delete $path(test1) set f [open $path(test1) w] fconfigure $f -buffersize 10000000 set x [fconfigure $f -buffersize] close $f set x -} 4096 +} 1048576 test io-39.13 {Tcl_SetChannelOption, Tcl_GetChannelOption, buffer size} { file delete $path(test1) set f [open $path(test1) w] diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index ec70115..69f4a84 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.26 2008/04/16 14:49:29 das Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.27 2008/05/23 21:00:46 andreas_kupries Exp $ package require Tcl 8.4 @@ -208,6 +208,9 @@ proc genStubs::rewriteFile {file text} { set in [open ${file} r] set out [open ${file}.new w] + # Hardwire the genstubs output to Unix eol. + fconfigure $out -translation lf + while {![eof $in]} { set line [gets $in] if {[string match "*!BEGIN!*" $line]} { diff --git a/unix/Makefile.in b/unix/Makefile.in index bfeccb7..c930e11 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.231 2008/04/15 10:10:43 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.232 2008/05/23 21:00:46 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -875,8 +875,8 @@ install-private-headers: libraries $(INSTALL_DATA) tclConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ fi; -Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in - $(SHELL) config.status +#Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in +# $(SHELL) config.status #tclConfig.h: $(UNIX_DIR)/tclConfig.h.in # $(SHELL) config.status @@ -1843,4 +1843,4 @@ package-generate: pkgtrans -s . $(PACKAGE).`arch` $(PACKAGE) rm -rf $(PACKAGE) -# DO NOT DELETE THIS LINE -- make depend depends on it. +# DO NOT DELETE THIS LINE -- make depend depends on it. \ No newline at end of file diff --git a/win/Makefile.in b/win/Makefile.in index 6bd5e39..58a3505 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.126 2008/04/09 21:44:58 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.127 2008/05/23 21:00:47 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -716,8 +716,8 @@ gdb: binaries depend: -Makefile: $(SRC_DIR)/Makefile.in - ./config.status +#Makefile: $(SRC_DIR)/Makefile.in +# ./config.status cleanhelp: $(RM) *.hlp *.cnt *.GID *.rtf man2tcl.exe @@ -763,3 +763,4 @@ html-tcl: $(TCLSH) $(MAKE) shell SCRIPT="$(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) --srcdir=$(ROOT_DIR)/.. $(BUILD_HTML_FLAGS) --tcl" html-tk: $(TCLSH) $(MAKE) shell SCRIPT="$(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) --srcdir=$(ROOT_DIR)/.. $(BUILD_HTML_FLAGS) --tk" + diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 98a529a..5d2a774 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.50 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.51 2008/05/23 21:00:47 andreas_kupries Exp $ */ #include "tclWinInt.h" @@ -575,7 +575,7 @@ FileWideSeekProc( return -1; } } - return (Tcl_LongAsWide(newPos) | (Tcl_LongAsWide(newPosHigh) << 32)); + return (((Tcl_WideInt)((unsigned)newPos)) | (Tcl_LongAsWide(newPosHigh) << 32)); } /* -- cgit v0.12 From 6a332b702f97a6c06d57c5e7fc40604cefe40e08 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 23 May 2008 21:05:13 +0000 Subject: Oops. Undo commit of the local tweaks. --- generic/tclVar.c | 13 +------------ tools/genStubs.tcl | 5 +---- unix/Makefile.in | 8 ++++---- win/Makefile.in | 6 +++--- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/generic/tclVar.c b/generic/tclVar.c index a88f15c..b7bdcaf 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.161 2008/05/23 21:00:45 andreas_kupries Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.162 2008/05/23 21:05:13 andreas_kupries Exp $ */ #include "tclInt.h" @@ -67,19 +67,8 @@ VarHashCreateVar( #define VarHashFindVar(tablePtr, key) \ VarHashCreateVar((tablePtr), (key), NULL) -#ifdef _AIX -/* Work around AIX cc problem causing crash in TclDeleteVars. Possible - * optimizer bug. Do _NOT_ inline this function, this re-activates the - * problem. - */ -static void -VarHashInvalidateEntry(Var* varPtr) { - varPtr->flags |= VAR_DEAD_HASH; -} -#else #define VarHashInvalidateEntry(varPtr) \ ((varPtr)->flags |= VAR_DEAD_HASH) -#endif #define VarHashDeleteEntry(varPtr) \ Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry)) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 69f4a84..5172a73 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.27 2008/05/23 21:00:46 andreas_kupries Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.28 2008/05/23 21:05:13 andreas_kupries Exp $ package require Tcl 8.4 @@ -208,9 +208,6 @@ proc genStubs::rewriteFile {file text} { set in [open ${file} r] set out [open ${file}.new w] - # Hardwire the genstubs output to Unix eol. - fconfigure $out -translation lf - while {![eof $in]} { set line [gets $in] if {[string match "*!BEGIN!*" $line]} { diff --git a/unix/Makefile.in b/unix/Makefile.in index c930e11..12db7c0 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.232 2008/05/23 21:00:46 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.233 2008/05/23 21:05:13 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -875,8 +875,8 @@ install-private-headers: libraries $(INSTALL_DATA) tclConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ fi; -#Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in -# $(SHELL) config.status +Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in + $(SHELL) config.status #tclConfig.h: $(UNIX_DIR)/tclConfig.h.in # $(SHELL) config.status @@ -1843,4 +1843,4 @@ package-generate: pkgtrans -s . $(PACKAGE).`arch` $(PACKAGE) rm -rf $(PACKAGE) -# DO NOT DELETE THIS LINE -- make depend depends on it. \ No newline at end of file +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/win/Makefile.in b/win/Makefile.in index 58a3505..75c0d4f 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.127 2008/05/23 21:00:47 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.128 2008/05/23 21:05:14 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -716,8 +716,8 @@ gdb: binaries depend: -#Makefile: $(SRC_DIR)/Makefile.in -# ./config.status +Makefile: $(SRC_DIR)/Makefile.in + ./config.status cleanhelp: $(RM) *.hlp *.cnt *.GID *.rtf man2tcl.exe -- cgit v0.12 From 25e82c0f007886e271604f3a777ebb26dd9e7b4b Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 26 May 2008 10:02:00 +0000 Subject: Remove obsolete winhelp targets. They weren't supported and didn't work. --- ChangeLog | 25 ++++++++++++-------- win/makefile.bc | 24 ------------------- win/makefile.vc | 72 +-------------------------------------------------------- 3 files changed, 16 insertions(+), 105 deletions(-) diff --git a/ChangeLog b/ChangeLog index b295620..c41cc16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,21 +1,26 @@ +2008-05-26 Donal K. Fellows + + * win/makefile.bc: Remove deprecated winhelp target. It didn't work + * win/makefile.vc: correctly anyway. + 2008-05-23 Andreas Kupries - * win/tclWinChan.c (FileWideSeekProc): Accepted a patch by - Alexandre Ferrieux to fix the - [Bug 1965787]. 'tell' now works for locations > 2 GB as well - instead of going negative. + * win/tclWinChan.c (FileWideSeekProc): Accepted a patch by Alexandre + Ferrieux to fix the [Bug 1965787]. + 'tell' now works for locations > 2 GB as well instead of going + negative. * generic/tclIO.c (Tcl_SetChannelBufferSize): Accepted a patch by * tests/io.test: Alexandre Ferrieux - * tests/chanio.test: to fix the [Bug 1969953]. Buffersize outside - of the supported range are now clipped to nearest boundary instead - of ignored. + * tests/chanio.test: to fix the [Bug 1969953]. Buffersize outside of + the supported range are now clipped to nearest boundary instead of + ignored. 2008-05-22 Don Porter * generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to - handle the argument value length = -1. Thanks to Chris Darroch for - discovering the bug and providing the fix. [Bug 1968245]. + handle the argument value length = -1. Thanks to Chris Darroch for + discovering the bug and providing the fix. [Bug 1968245] 2008-05-21 Don Porter @@ -23,7 +28,7 @@ * tests/parse.test (parse-15.60): routine has no mechanism to return the "incomplete" status of "\\\n" so calling this routine anywhere that can be reached within a Tcl_ParseCommand() call is a - mistake. In particular, ParseComment() must not use it. [Bug 1968882]. + mistake. In particular, ParseComment() must not use it. [Bug 1968882] 2008-05-20 Donal K. Fellows diff --git a/win/makefile.bc b/win/makefile.bc index 481ecd3..59a0232 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -50,7 +50,6 @@ # # Not yet modified: # - The 'plug-in-DLL' and the associated shell. -# - The programs to create the windows help files. # # Suggestions and / or improvements are always welcome. # @@ -473,29 +472,6 @@ genstubs: $(GENERICDIR)\tcl.decls $(GENERICDIR)\tclInt.decls # -# Regenerate the windows help files. -# - -TCLTOOLS = $(ROOT)/tools -MAN2TCL = $(TCLTOOLS)/man2tcl -TCLRTF = $(TCLTOOLS)/tcl.rtf -TCLHPJ = $(TCLTOOLS)/tcl.hpj -MAN2HELP = $(TCLTOOLS)/man2help.tcl -HCRTF = $(TOOLS32)/bin/hcrtf.exe - -winhelp: $(TCLRTF) - cd $(TCLTOOLS) - start /wait $(HCRTF) -xn $(TCLHPJ) - -$(MAN2TCL).exe: $(MAN2TCL).obj - cd $(TCLTOOLS) - $(cc32) /nologo /G4 /ML /O2 $(MAN2TCL).c - -$(TCLRTF): $(MAN2TCL).exe $(TCLSH) - cd $(TCLTOOLS) - ..\win\$(TCLSH) $(MAN2HELP) $(NAMEPREFIX) $(VERSION) $(ROOT)/doc ../../tk$(DOTVERSION)/doc - -# # Special case object file targets # $(TMPDIR)\tclWinInit.obj: $(WINDIR)\tclWinInit.c diff --git a/win/makefile.vc b/win/makefile.vc index ef914ac..b6fd03f 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.179 2008/05/15 00:04:10 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.180 2008/05/26 10:02:00 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -66,10 +66,6 @@ the build instructions. # troff manual pages found in $(ROOT)\doc. You need to # have installed the HTML Help Compiler package from Microsoft # to produce the .chm file. -# winhelp -- (deprecated) Builds the windows .hlp file for Tcl from -# the troff man files found in $(ROOT)\doc. This type of -# help file is deprecated by Microsoft in favour of html -# help files (.chm) # # 4) Macros usable on the commandline: # INSTALLDIR= @@ -675,76 +671,10 @@ TkLib UserCmd << -#------------------------------------------------------------------------- -# Build the old-style Windows .hlp file -#------------------------------------------------------------------------- - -TCLHLPBASE = $(PROJECT)$(VERSION) -HELPFILE = $(OUT_DIR)\$(TCLHLPBASE).hlp -HELPCNT = $(OUT_DIR)\$(TCLHLPBASE).cnt -DOCTMP_DIR = $(OUT_DIR)\$(PROJECT)_docs -HELPRTF = $(DOCTMP_DIR)\$(PROJECT).rtf -MAN2HELP = $(DOCTMP_DIR)\man2help.tcl -MAN2HELP2 = $(DOCTMP_DIR)\man2help2.tcl -INDEX = $(DOCTMP_DIR)\index.tcl -BMP = $(DOCTMP_DIR)\feather.bmp -BMP_NOPATH = feather.bmp -MAN2TCL = $(DOCTMP_DIR)\man2tcl.exe - -winhelp: docsetup $(HELPFILE) - -docsetup: - @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR) - -$(MAN2HELP) $(MAN2HELP2) $(INDEX) $(BMP): $(TOOLSDIR)\$$(@F) - @$(CPY) $(TOOLSDIR)\$(@F) $(@D) - -$(HELPFILE): $(HELPRTF) $(BMP) - cd $(DOCTMP_DIR) - start /wait hcrtf.exe -x <<$(PROJECT).hpj -[OPTIONS] -COMPRESS=12 Hall Zeck -LCID=0x409 0x0 0x0 ; English (United States) -TITLE=Tcl/Tk Reference Manual -BMROOT=. -CNT=$(@B).cnt -HLP=$(@B).hlp - -[FILES] -$(PROJECT).rtf - -[WINDOWS] -main="Tcl/Tk Reference Manual",,27648,(r15263976),(r65535) - -[CONFIG] -BrowseButtons() -CreateButton(1, "Web", ExecFile("http://www.tcl.tk")) -CreateButton(2, "SF", ExecFile("http://sf.net/projects/tcl")) -CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk")) -CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/")) -<< - cd $(MAKEDIR) - @$(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)" - @$(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)" - -$(MAN2TCL): $(TOOLSDIR)\$$(@B).c - $(cc32) $(TCL_CFLAGS) -Fo$(@D)\ $(TOOLSDIR)\$(@B).c - $(link32) $(conlflags) -out:$@ -stack:16384 $(@D)\man2tcl.obj - $(_VC_MANIFEST_EMBED_EXE) - -$(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX) $(DOCDIR)\* - $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(VERSION) $(DOCDIR:\=/) - install-docs: !if exist($(CHMFILE)) @echo Installing compiled html help @$(CPY) "$(CHMFILE)" "$(DOC_INSTALL_DIR)\" -!else -!if exist($(HELPFILE)) - @echo Installing Windows help - @$(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\" - @$(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\" -!endif !endif #" -- cgit v0.12 From fef66b3a8ba130ec832bd025733edb25751851a6 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 26 May 2008 10:04:52 +0000 Subject: Missed one! --- ChangeLog | 4 ++-- win/Makefile.in | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c41cc16..6ab13c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2008-05-26 Donal K. Fellows - * win/makefile.bc: Remove deprecated winhelp target. It didn't work - * win/makefile.vc: correctly anyway. + * win/makefile.bc: Remove deprecated winhelp target. + * win/Makefile.in, win/makefile.vc: It didn't work correctly anyway. 2008-05-23 Andreas Kupries diff --git a/win/Makefile.in b/win/Makefile.in index 75c0d4f..c3e1e19 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.128 2008/05/23 21:05:14 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.129 2008/05/26 10:04:53 dkf Exp $ VERSION = @TCL_VERSION@ @@ -382,14 +382,6 @@ libraries: doc: -winhelp: $(ROOT_DIR)/tools/man2help.tcl $(MAN2TCL) - TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \ - ./$(TCLSH) "$(ROOT_DIR_NATIVE)"/tools/man2help.tcl tcl "$(VER)" $(TCL_DOCS) - hcw /c /e tcl.hpj - -$(MAN2TCL): $(ROOT_DIR)/tools/man2tcl.c - $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(ROOT_DIR_NATIVE)"/tools/man2tcl.c - $(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -- cgit v0.12 From 0c84b3ac801dc1a49920b6d330a5f912975ffc14 Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 26 May 2008 18:28:47 +0000 Subject: (io-53.9): need to close chan before removing file --- ChangeLog | 4 ++++ tests/io.test | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6ab13c3..aadcf78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-05-26 Jeff Hobbs + + * tests/io.test (io-53.9): need to close chan before removing file. + 2008-05-26 Donal K. Fellows * win/makefile.bc: Remove deprecated winhelp target. diff --git a/tests/io.test b/tests/io.test index 10115c1..274c736 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.89 2008/05/23 21:00:45 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.90 2008/05/26 18:28:47 hobbs Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7051,6 +7051,7 @@ test io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { close $pipe rename ::done {} after 1000; # Give Windows time to kill the process + catch {close $out} catch {removeFile out} catch {removeFile err} catch {unset ::forever} -- cgit v0.12 From c95dff3c4e222c9da6666a3b97ca0d7e92d89c10 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 27 May 2008 23:13:34 +0000 Subject: Fixed line endings --- win/.cvsignore | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/win/.cvsignore b/win/.cvsignore index 72c5007..df45023 100644 --- a/win/.cvsignore +++ b/win/.cvsignore @@ -1,18 +1,18 @@ -Debug -Release -*.opt -*.ncb -*.plg -*.00? -*.o -*.obj -*.i -*.asm -*.dll -*.exe -Makefile -tcl.hpj -tclConfig.sh -.#* -tcl.sln -tcl.suo +Debug +Release +*.opt +*.ncb +*.plg +*.00? +*.o +*.obj +*.i +*.asm +*.dll +*.exe +Makefile +tcl.hpj +tclConfig.sh +.#* +tcl.sln +tcl.suo -- cgit v0.12 From 032cdb06a8056b84ec16eaace0fc84044c95899a Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 May 2008 22:54:27 +0000 Subject: Small clarifications that code a bit nicer to read. --- generic/tclCmdAH.c | 4 +- generic/tclCmdIL.c | 16 ++-- generic/tclCmdMZ.c | 6 +- generic/tclCompile.c | 37 ++++---- generic/tclDictObj.c | 6 +- generic/tclInterp.c | 20 ++-- generic/tclLoad.c | 80 +++++++--------- generic/tclTrace.c | 259 ++++++++++++++++++++++++--------------------------- 8 files changed, 206 insertions(+), 222 deletions(-) diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 1ac8764..d6127b0 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.94 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.95 2008/05/30 22:54:27 dkf Exp $ */ #include "tclInt.h" @@ -273,6 +273,7 @@ Tcl_CatchObjCmd( } if (objc == 4) { Tcl_Obj *options = Tcl_GetReturnOptions(interp, result); + if (NULL == Tcl_ObjSetVar2(interp, optionVarNamePtr, NULL, options, 0)) { Tcl_ResetResult(interp); @@ -769,6 +770,7 @@ Tcl_ExprObjCmd( result = Tcl_ExprObj(interp, objv[1], &resultPtr); } else { Tcl_Obj *objPtr = Tcl_ConcatObj(objc-1, objv+1); + Tcl_IncrRefCount(objPtr); result = Tcl_ExprObj(interp, objPtr, &resultPtr); Tcl_DecrRefCount(objPtr); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index b740531..f18a14a 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.138 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.139 2008/05/30 22:54:27 dkf Exp $ */ #include "tclInt.h" @@ -31,7 +31,7 @@ typedef struct SortElement { union { char *strValuePtr; - long intValue; + long intValue; double doubleValue; Tcl_Obj *objValuePtr; } index; @@ -513,7 +513,7 @@ InfoBodyCmd( * run before. [Bug #545644] */ - (void) TclGetString(bodyPtr); + TclGetString(bodyPtr); } resultPtr = Tcl_NewStringObj(bodyPtr->bytes, bodyPtr->length); @@ -661,7 +661,7 @@ InfoCommandsCmd( entryPtr = Tcl_FindHashEntry(&nsPtr->cmdTable, simplePattern); if (entryPtr != NULL) { if (specificNsInPattern) { - cmd = (Tcl_Command) Tcl_GetHashValue(entryPtr); + cmd = Tcl_GetHashValue(entryPtr); elemObjPtr = Tcl_NewObj(); Tcl_GetCommandFullName(interp, cmd, elemObjPtr); } else { @@ -712,7 +712,7 @@ InfoCommandsCmd( if ((simplePattern == NULL) || Tcl_StringMatch(cmdName, simplePattern)) { if (specificNsInPattern) { - cmd = (Tcl_Command) Tcl_GetHashValue(entryPtr); + cmd = Tcl_GetHashValue(entryPtr); elemObjPtr = Tcl_NewObj(); Tcl_GetCommandFullName(interp, cmd, elemObjPtr); } else { @@ -1724,7 +1724,7 @@ InfoProcsCmd( if (simplePattern != NULL && TclMatchIsTrivial(simplePattern)) { entryPtr = Tcl_FindHashEntry(&nsPtr->cmdTable, simplePattern); if (entryPtr != NULL) { - cmdPtr = (Command *) Tcl_GetHashValue(entryPtr); + cmdPtr = Tcl_GetHashValue(entryPtr); if (!TclIsProc(cmdPtr)) { realCmdPtr = (Command *) @@ -1752,7 +1752,7 @@ InfoProcsCmd( cmdName = Tcl_GetHashKey(&nsPtr->cmdTable, entryPtr); if ((simplePattern == NULL) || Tcl_StringMatch(cmdName, simplePattern)) { - cmdPtr = (Command *) Tcl_GetHashValue(entryPtr); + cmdPtr = Tcl_GetHashValue(entryPtr); if (!TclIsProc(cmdPtr)) { realCmdPtr = (Command *) @@ -1799,7 +1799,7 @@ InfoProcsCmd( if ((simplePattern == NULL) || Tcl_StringMatch(cmdName, simplePattern)) { if (Tcl_FindHashEntry(&nsPtr->cmdTable,cmdName) == NULL) { - cmdPtr = (Command *) Tcl_GetHashValue(entryPtr); + cmdPtr = Tcl_GetHashValue(entryPtr); realCmdPtr = (Command *) TclGetOriginalCommand( (Tcl_Command) cmdPtr); diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 6c0a419..c5a1cb6 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.164 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.165 2008/05/30 22:54:27 dkf Exp $ */ #include "tclInt.h" @@ -1871,8 +1871,8 @@ StringMapCmd( * case. */ - mapStrings = (Tcl_UniChar **) TclStackAlloc(interp, - mapElemc * 2 * sizeof(Tcl_UniChar *)); + mapStrings = (Tcl_UniChar **) + TclStackAlloc(interp, mapElemc * 2 * sizeof(Tcl_UniChar *)); mapLens = (int *) TclStackAlloc(interp, mapElemc * 2 * sizeof(int)); if (nocase) { u2lc = (Tcl_UniChar *) TclStackAlloc(interp, diff --git a/generic/tclCompile.c b/generic/tclCompile.c index ec94d6b..fd6f25e 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.147 2008/05/16 14:13:33 msofer Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.148 2008/05/30 22:54:28 dkf Exp $ */ #include "tclInt.h" @@ -521,7 +521,7 @@ TclSetByteCodeFromAny( */ if (hookProc) { - result = (*hookProc)(interp, &compEnv, clientData); + result = hookProc(interp, &compEnv, clientData); } /* @@ -597,7 +597,7 @@ SetByteCodeFromAny( * compiled. Must not be NULL. */ Tcl_Obj *objPtr) /* The object to make a ByteCode object. */ { - (void) TclSetByteCodeFromAny(interp, objPtr, NULL, (ClientData) NULL); + TclSetByteCodeFromAny(interp, objPtr, NULL, NULL); return TCL_OK; } @@ -652,8 +652,7 @@ static void FreeByteCodeInternalRep( register Tcl_Obj *objPtr) /* Object whose internal rep to free. */ { - register ByteCode *codePtr = (ByteCode *) - objPtr->internalRep.otherValuePtr; + register ByteCode *codePtr = objPtr->internalRep.otherValuePtr; codePtr->refCount--; if (codePtr->refCount <= 0) { @@ -783,7 +782,7 @@ TclCleanupByteCode( auxDataPtr = codePtr->auxDataArrayPtr; for (i = 0; i < numAuxDataItems; i++) { if (auxDataPtr->type->freeProc != NULL) { - (auxDataPtr->type->freeProc)(auxDataPtr->clientData); + auxDataPtr->type->freeProc(auxDataPtr->clientData); } auxDataPtr++; } @@ -1884,7 +1883,7 @@ TclCompileNoOp( int savedStackDepth = envPtr->currStackDepth; tokenPtr = parsePtr->tokenPtr; - for(i = 1; i < parsePtr->numWords; i++) { + for (i = 1; i < parsePtr->numWords; i++) { tokenPtr = tokenPtr + tokenPtr->numComponents + 1; envPtr->currStackDepth = savedStackDepth; @@ -1946,10 +1945,10 @@ TclInitByteCodeObj( iPtr = envPtr->iPtr; - codeBytes = (envPtr->codeNext - envPtr->codeStart); - objArrayBytes = (envPtr->literalArrayNext * sizeof(Tcl_Obj *)); - exceptArrayBytes = (envPtr->exceptArrayNext * sizeof(ExceptionRange)); - auxDataArrayBytes = (envPtr->auxDataArrayNext * sizeof(AuxData)); + codeBytes = envPtr->codeNext - envPtr->codeStart; + objArrayBytes = envPtr->literalArrayNext * sizeof(Tcl_Obj *); + exceptArrayBytes = envPtr->exceptArrayNext * sizeof(ExceptionRange); + auxDataArrayBytes = envPtr->auxDataArrayNext * sizeof(AuxData); cmdLocBytes = GetCmdLocEncodingSize(envPtr); /* @@ -2049,7 +2048,7 @@ TclInitByteCodeObj( */ TclFreeIntRep(objPtr); - objPtr->internalRep.otherValuePtr = (void *) codePtr; + objPtr->internalRep.otherValuePtr = codePtr; objPtr->typePtr = &tclByteCodeType; /* @@ -2184,7 +2183,7 @@ TclExpandCodeArray( void *envArgPtr) /* Points to the CompileEnv whose code array * must be enlarged. */ { - CompileEnv *envPtr = (CompileEnv *) envArgPtr; + CompileEnv *envPtr = envArgPtr; /* The CompileEnv containing the code array to * be doubled in size. */ @@ -2194,25 +2193,27 @@ TclExpandCodeArray( * [inclusive]. */ - size_t currBytes = (envPtr->codeNext - envPtr->codeStart); + size_t currBytes = envPtr->codeNext - envPtr->codeStart; size_t newBytes = 2*(envPtr->codeEnd - envPtr->codeStart); if (envPtr->mallocedCodeArray) { envPtr->codeStart = (unsigned char *) - ckrealloc((char *)envPtr->codeStart, newBytes); + ckrealloc((char *) envPtr->codeStart, newBytes); } else { /* * envPtr->codeStart isn't a ckalloc'd pointer, so we must * code a ckrealloc equivalent for ourselves. */ - unsigned char *newPtr = (unsigned char *) ckalloc((unsigned) newBytes); + unsigned char *newPtr = (unsigned char *) + ckalloc((unsigned) newBytes); + memcpy(newPtr, envPtr->codeStart, currBytes); envPtr->codeStart = newPtr; envPtr->mallocedCodeArray = 1; } - envPtr->codeNext = (envPtr->codeStart + currBytes); - envPtr->codeEnd = (envPtr->codeStart + newBytes); + envPtr->codeNext = envPtr->codeStart + currBytes; + envPtr->codeEnd = envPtr->codeStart + newBytes; } /* diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index a33802d..d3d30d3 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.56 2007/12/13 15:23:16 dgp Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.57 2008/05/30 22:54:29 dkf Exp $ */ #include "tclInt.h" @@ -354,7 +354,7 @@ DupDictInternalRep( * Fill in the contents. */ - Tcl_SetHashValue(hPtr, (ClientData) valuePtr); + Tcl_SetHashValue(hPtr, valuePtr); Tcl_IncrRefCount(valuePtr); } @@ -840,7 +840,7 @@ TclTraceDictPath( TclDecrRefCount(tmpObj); tmpObj = Tcl_DuplicateObj(tmpObj); Tcl_IncrRefCount(tmpObj); - Tcl_SetHashValue(hPtr, (ClientData) tmpObj); + Tcl_SetHashValue(hPtr, tmpObj); dict->epoch++; newDict = tmpObj->internalRep.otherValuePtr; } diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 1f2921a..8de5983 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.83 2008/01/30 10:45:55 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.84 2008/05/30 22:54:29 dkf Exp $ */ #include "tclInt.h" @@ -1305,7 +1305,7 @@ TclPreventAliasLoop( * chain then we have a loop. */ - aliasPtr = (Alias *) cmdPtr->objClientData; + aliasPtr = cmdPtr->objClientData; nextAliasPtr = aliasPtr; while (1) { Tcl_Obj *cmdNamePtr; @@ -1351,7 +1351,7 @@ TclPreventAliasLoop( if (aliasCmdPtr->objProc != AliasObjCmd) { return TCL_OK; } - nextAliasPtr = (Alias *) aliasCmdPtr->objClientData; + nextAliasPtr = aliasCmdPtr->objClientData; } /* NOTREACHED */ @@ -2717,7 +2717,7 @@ SlaveInvokeHidden( | TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail); if (result == TCL_OK) { result = TclObjInvokeNamespace(slaveInterp, objc, objv, - (Tcl_Namespace *)nsPtr, TCL_INVOKE_HIDDEN); + (Tcl_Namespace *) nsPtr, TCL_INVOKE_HIDDEN); } } @@ -3071,7 +3071,7 @@ RunLimitHandlers( */ handlerPtr->flags |= LIMIT_HANDLER_ACTIVE; - (handlerPtr->handlerProc)(handlerPtr->clientData, interp); + handlerPtr->handlerProc(handlerPtr->clientData, interp); handlerPtr->flags &= ~LIMIT_HANDLER_ACTIVE; /* @@ -3092,7 +3092,7 @@ RunLimitHandlers( if (handlerPtr->flags & LIMIT_HANDLER_DELETED) { if (handlerPtr->deleteProc != NULL) { - (handlerPtr->deleteProc)(handlerPtr->clientData); + handlerPtr->deleteProc(handlerPtr->clientData); } ckfree((char *) handlerPtr); } @@ -3258,7 +3258,7 @@ Tcl_LimitRemoveHandler( if (!(handlerPtr->flags & LIMIT_HANDLER_ACTIVE)) { if (handlerPtr->deleteProc != NULL) { - (handlerPtr->deleteProc)(handlerPtr->clientData); + handlerPtr->deleteProc(handlerPtr->clientData); } ckfree((char *) handlerPtr); } @@ -3318,7 +3318,7 @@ TclLimitRemoveAllHandlers( if (!(handlerPtr->flags & LIMIT_HANDLER_ACTIVE)) { if (handlerPtr->deleteProc != NULL) { - (handlerPtr->deleteProc)(handlerPtr->clientData); + handlerPtr->deleteProc(handlerPtr->clientData); } ckfree((char *) handlerPtr); } @@ -3351,7 +3351,7 @@ TclLimitRemoveAllHandlers( if (!(handlerPtr->flags & LIMIT_HANDLER_ACTIVE)) { if (handlerPtr->deleteProc != NULL) { - (handlerPtr->deleteProc)(handlerPtr->clientData); + handlerPtr->deleteProc(handlerPtr->clientData); } ckfree((char *) handlerPtr); } @@ -3602,7 +3602,7 @@ TimeLimitCallback( int code; Tcl_Preserve(interp); - ((Interp *)interp)->limit.timeEvent = NULL; + ((Interp *) interp)->limit.timeEvent = NULL; code = Tcl_LimitCheck(interp); if (code != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (while waiting for event)"); diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 29e2d01..7ed2ee7 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.16 2007/02/20 23:24:03 nijtmans Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.17 2008/05/30 22:54:29 dkf Exp $ */ #include "tclInt.h" @@ -252,8 +252,7 @@ Tcl_LoadObjCmd( */ if (pkgPtr != NULL) { - ipFirstPtr = (InterpPackage *) Tcl_GetAssocData(target, - "tclLoad", NULL); + ipFirstPtr = Tcl_GetAssocData(target, "tclLoad", NULL); for (ipPtr = ipFirstPtr; ipPtr != NULL; ipPtr = ipPtr->nextPtr) { if (ipPtr->pkgPtr == pkgPtr) { code = TCL_OK; @@ -372,7 +371,7 @@ Tcl_LoadObjCmd( code = TclLoadFile(interp, objv[1], 4, symbols, procPtrs, &loadHandle, &clientData, &unLoadProcPtr); Tcl_MutexUnlock(&packageMutex); - loadHandle = (Tcl_LoadHandle) clientData; + loadHandle = clientData; if (code != TCL_OK) { goto done; } @@ -381,7 +380,7 @@ Tcl_LoadObjCmd( Tcl_AppendResult(interp, "couldn't find procedure ", Tcl_DStringValue(&initName), NULL); if (unLoadProcPtr != NULL) { - (*unLoadProcPtr)(loadHandle); + unLoadProcPtr(loadHandle); } code = TCL_ERROR; goto done; @@ -392,18 +391,18 @@ Tcl_LoadObjCmd( */ pkgPtr = (LoadedPackage *) ckalloc(sizeof(LoadedPackage)); - pkgPtr->fileName = (char *) ckalloc((unsigned) - (strlen(fullFileName) + 1)); + pkgPtr->fileName = + ckalloc((unsigned) (strlen(fullFileName) + 1)); strcpy(pkgPtr->fileName, fullFileName); - pkgPtr->packageName = (char *) ckalloc((unsigned) - (Tcl_DStringLength(&pkgName) + 1)); + pkgPtr->packageName = + ckalloc((unsigned) (Tcl_DStringLength(&pkgName) + 1)); strcpy(pkgPtr->packageName, Tcl_DStringValue(&pkgName)); pkgPtr->loadHandle = loadHandle; pkgPtr->unLoadProcPtr = unLoadProcPtr; pkgPtr->initProc = *procPtrs[0]; pkgPtr->safeInitProc = *procPtrs[1]; - pkgPtr->unloadProc = (Tcl_PackageUnloadProc*) *procPtrs[2]; - pkgPtr->safeUnloadProc = (Tcl_PackageUnloadProc*) *procPtrs[3]; + pkgPtr->unloadProc = (Tcl_PackageUnloadProc *) *procPtrs[2]; + pkgPtr->safeUnloadProc = (Tcl_PackageUnloadProc *) *procPtrs[3]; pkgPtr->interpRefCount = 0; pkgPtr->safeInterpRefCount = 0; @@ -420,7 +419,7 @@ Tcl_LoadObjCmd( if (Tcl_IsSafe(target)) { if (pkgPtr->safeInitProc != NULL) { - code = (*pkgPtr->safeInitProc)(target); + code = pkgPtr->safeInitProc(target); } else { Tcl_AppendResult(interp, "can't use package in a safe interpreter: no ", @@ -429,7 +428,7 @@ Tcl_LoadObjCmd( goto done; } } else { - code = (*pkgPtr->initProc)(target); + code = pkgPtr->initProc(target); } /* @@ -455,13 +454,11 @@ Tcl_LoadObjCmd( * additional static packages at the head of the linked list! */ - ipFirstPtr = (InterpPackage *) Tcl_GetAssocData(target, - "tclLoad", NULL); + ipFirstPtr = Tcl_GetAssocData(target, "tclLoad", NULL); ipPtr = (InterpPackage *) ckalloc(sizeof(InterpPackage)); ipPtr->pkgPtr = pkgPtr; ipPtr->nextPtr = ipFirstPtr; - Tcl_SetAssocData(target, "tclLoad", LoadCleanupProc, - (ClientData) ipPtr); + Tcl_SetAssocData(target, "tclLoad", LoadCleanupProc, ipPtr); } else { TclTransferResult(target, code, interp); } @@ -584,8 +581,8 @@ Tcl_UnloadObjCmd( target = interp; if (objc - i == 3) { - char *slaveIntName; - slaveIntName = Tcl_GetString(objv[i+2]); + char *slaveIntName = Tcl_GetString(objv[i + 2]); + target = Tcl_GetSlave(interp, slaveIntName); if (target == NULL) { return TCL_ERROR; @@ -667,8 +664,7 @@ Tcl_UnloadObjCmd( code = TCL_ERROR; if (pkgPtr != NULL) { - ipFirstPtr = (InterpPackage *) Tcl_GetAssocData(target, - "tclLoad", NULL); + ipFirstPtr = Tcl_GetAssocData(target, "tclLoad", NULL); for (ipPtr = ipFirstPtr; ipPtr != NULL; ipPtr = ipPtr->nextPtr) { if (ipPtr->pkgPtr == pkgPtr) { code = TCL_OK; @@ -738,7 +734,7 @@ Tcl_UnloadObjCmd( code = TCL_UNLOAD_DETACH_FROM_PROCESS; } } - code = (*unloadProc)(target, code); + code = unloadProc(target, code); if (code != TCL_OK) { TclTransferResult(target, code, interp); goto done; @@ -795,7 +791,7 @@ Tcl_UnloadObjCmd( if (unLoadProcPtr != NULL) { Tcl_MutexLock(&packageMutex); - (*unLoadProcPtr)(pkgPtr->loadHandle); + unLoadProcPtr(pkgPtr->loadHandle); /* * Remove this library from the loaded library cache. @@ -818,8 +814,7 @@ Tcl_UnloadObjCmd( * Remove this library from the interpreter's library cache. */ - ipFirstPtr = (InterpPackage *) Tcl_GetAssocData(target, - "tclLoad", NULL); + ipFirstPtr = Tcl_GetAssocData(target, "tclLoad", NULL); ipPtr = ipFirstPtr; if (ipPtr->pkgPtr == defaultPtr) { ipFirstPtr = ipFirstPtr->nextPtr; @@ -835,7 +830,7 @@ Tcl_UnloadObjCmd( } } Tcl_SetAssocData(target, "tclLoad", LoadCleanupProc, - (ClientData) ipFirstPtr); + ipFirstPtr); ckfree(defaultPtr->fileName); ckfree(defaultPtr->packageName); ckfree((char *) defaultPtr); @@ -955,12 +950,11 @@ Tcl_StaticPackage( * to the list now. */ - if ( pkgPtr == NULL ) { + if (pkgPtr == NULL) { pkgPtr = (LoadedPackage *) ckalloc(sizeof(LoadedPackage)); - pkgPtr->fileName = (char *) ckalloc((unsigned) 1); + pkgPtr->fileName = ckalloc((unsigned) 1); pkgPtr->fileName[0] = 0; - pkgPtr->packageName = (char *) - ckalloc((unsigned) (strlen(pkgName) + 1)); + pkgPtr->packageName = ckalloc((unsigned) (strlen(pkgName) + 1)); strcpy(pkgPtr->packageName, pkgName); pkgPtr->loadHandle = NULL; pkgPtr->initProc = initProc; @@ -978,10 +972,9 @@ Tcl_StaticPackage( * it's already loaded. */ - ipFirstPtr = (InterpPackage *) Tcl_GetAssocData(interp, - "tclLoad", NULL); - for ( ipPtr = ipFirstPtr; ipPtr != NULL; ipPtr = ipPtr->nextPtr ) { - if ( ipPtr->pkgPtr == pkgPtr ) { + ipFirstPtr = Tcl_GetAssocData(interp, "tclLoad", NULL); + for (ipPtr = ipFirstPtr; ipPtr != NULL; ipPtr = ipPtr->nextPtr) { + if (ipPtr->pkgPtr == pkgPtr) { return; } } @@ -994,8 +987,7 @@ Tcl_StaticPackage( ipPtr = (InterpPackage *) ckalloc(sizeof(InterpPackage)); ipPtr->pkgPtr = pkgPtr; ipPtr->nextPtr = ipFirstPtr; - Tcl_SetAssocData(interp, "tclLoad", LoadCleanupProc, - (ClientData) ipPtr); + Tcl_SetAssocData(interp, "tclLoad", LoadCleanupProc, ipPtr); } } @@ -1029,6 +1021,7 @@ TclGetLoadedPackages( * otherwise, just return info about this * interpreter. */ { + /* TODO: Use Tcl_Obj APIs to generate this info for cleanliness. */ Tcl_Interp *target; LoadedPackage *pkgPtr; InterpPackage *ipPtr; @@ -1062,9 +1055,9 @@ TclGetLoadedPackages( if (target == NULL) { return TCL_ERROR; } - ipPtr = (InterpPackage *) Tcl_GetAssocData(target, "tclLoad", NULL); + ipPtr = Tcl_GetAssocData(target, "tclLoad", NULL); prefix = "{"; - for ( ; ipPtr != NULL; ipPtr = ipPtr->nextPtr) { + for (; ipPtr != NULL; ipPtr = ipPtr->nextPtr) { pkgPtr = ipPtr->pkgPtr; Tcl_AppendResult(interp, prefix, NULL); Tcl_AppendElement(interp, pkgPtr->fileName); @@ -1101,7 +1094,7 @@ LoadCleanupProc( { InterpPackage *ipPtr, *nextPtr; - ipPtr = (InterpPackage *) clientData; + ipPtr = clientData; while (ipPtr != NULL) { nextPtr = ipPtr->nextPtr; ckfree((char *) ipPtr); @@ -1134,8 +1127,8 @@ TclFinalizeLoad(void) /* * No synchronization here because there should just be one thread alive * at this point. Logically, packageMutex should be grabbed at this point, - * but the Mutexes get finalized before the call to this routine. The - * only subsystem left alive at this point is the memory allocator. + * but the Mutexes get finalized before the call to this routine. The only + * subsystem left alive at this point is the memory allocator. */ while (firstPackagePtr != NULL) { @@ -1151,9 +1144,8 @@ TclFinalizeLoad(void) */ if (pkgPtr->fileName[0] != '\0') { - Tcl_FSUnloadFileProc *unLoadProcPtr = pkgPtr->unLoadProcPtr; - if (unLoadProcPtr != NULL) { - (*unLoadProcPtr)(pkgPtr->loadHandle); + if (pkgPtr->unLoadProcPtr != NULL) { + pkgPtr->unLoadProcPtr(pkgPtr->loadHandle); } } #endif diff --git a/generic/tclTrace.c b/generic/tclTrace.c index dfcac43..c7aa4d2 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.47 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.48 2008/05/30 22:54:29 dkf Exp $ */ #include "tclInt.h" @@ -149,6 +149,21 @@ typedef struct StringTraceData { ClientData clientData; /* Client data from Tcl_CreateTrace */ Tcl_CmdTraceProc *proc; /* Trace function from Tcl_CreateTrace */ } StringTraceData; + +/* + * Convenience macros for iterating over the list of traces. Note that each of + * these *must* be treated as a command, and *must* have a block following it. + */ + +#define FOREACH_VAR_TRACE(interp, name, clientData) \ + (clientData) = NULL; \ + while (((clientData) = Tcl_VarTraceInfo((interp), (name), 0, \ + TraceVarProc, (clientData))) != NULL) + +#define FOREACH_COMMAND_TRACE(interp, name, clientData) \ + (clientData) = NULL; \ + while ((clientData = Tcl_CommandTraceInfo(interp, name, 0, \ + TraceCommandProc, clientData)) != NULL) /* *---------------------------------------------------------------------- @@ -200,8 +215,8 @@ Tcl_TraceObjCmd( return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[1], traceOptions, - "option", 0, &optionIndex) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[1], traceOptions, "option", 0, + &optionIndex) != TCL_OK) { return TCL_ERROR; } switch ((enum traceOptions) optionIndex) { @@ -307,12 +322,9 @@ Tcl_TraceObjCmd( return TCL_ERROR; } resultListPtr = Tcl_NewObj(); - clientData = 0; name = Tcl_GetString(objv[2]); - while ((clientData = Tcl_VarTraceInfo(interp, name, 0, - TraceVarProc, clientData)) != 0) { - - TraceVarInfo *tvarPtr = (TraceVarInfo *) clientData; + FOREACH_VAR_TRACE(interp, name, clientData) { + TraceVarInfo *tvarPtr = clientData; pairObjPtr = Tcl_NewListObj(0, NULL); p = ops; @@ -450,11 +462,10 @@ TraceExecutionObjCmd( command = Tcl_GetStringFromObj(objv[5], &commandLength); length = (size_t) commandLength; if ((enum traceOptions) optionIndex == TRACE_ADD) { - TraceCommandInfo *tcmdPtr; + TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) + ckalloc((unsigned) (sizeof(TraceCommandInfo) + - sizeof(tcmdPtr->command) + length + 1)); - tcmdPtr = (TraceCommandInfo *) ckalloc((unsigned) - (sizeof(TraceCommandInfo) - sizeof(tcmdPtr->command) - + length + 1)); tcmdPtr->flags = flags; tcmdPtr->stepTrace = NULL; tcmdPtr->startLevel = 0; @@ -469,7 +480,7 @@ TraceExecutionObjCmd( strcpy(tcmdPtr->command, command); name = Tcl_GetString(objv[3]); if (Tcl_TraceCommand(interp, name, flags, TraceCommandProc, - (ClientData) tcmdPtr) != TCL_OK) { + tcmdPtr) != TCL_OK) { ckfree((char *) tcmdPtr); return TCL_ERROR; } @@ -480,21 +491,19 @@ TraceExecutionObjCmd( * first one that matches. */ - TraceCommandInfo *tcmdPtr; - ClientData clientData = NULL; - name = Tcl_GetString(objv[3]); + ClientData clientData; /* * First ensure the name given is valid. */ + name = Tcl_GetString(objv[3]); if (Tcl_FindCommand(interp,name,NULL,TCL_LEAVE_ERR_MSG) == NULL) { return TCL_ERROR; } - while ((clientData = Tcl_CommandTraceInfo(interp, name, 0, - TraceCommandProc, clientData)) != NULL) { - tcmdPtr = (TraceCommandInfo *) clientData; + FOREACH_COMMAND_TRACE(interp, name, clientData) { + TraceCommandInfo *tcmdPtr = clientData; /* * In checking the 'flags' field we must remove any extraneous @@ -544,14 +553,13 @@ TraceExecutionObjCmd( } case TRACE_INFO: { ClientData clientData; - Tcl_Obj *resultListPtr, *eachTraceObjPtr, *elemObjPtr; + Tcl_Obj *resultListPtr; if (objc != 4) { Tcl_WrongNumArgs(interp, 3, objv, "name"); return TCL_ERROR; } - clientData = NULL; name = Tcl_GetString(objv[3]); /* @@ -563,11 +571,10 @@ TraceExecutionObjCmd( } resultListPtr = Tcl_NewListObj(0, NULL); - while ((clientData = Tcl_CommandTraceInfo(interp, name, 0, - TraceCommandProc, clientData)) != NULL) { + FOREACH_COMMAND_TRACE(interp, name, clientData) { int numOps = 0; - Tcl_Obj *opObj; - TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) clientData; + Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr; + TraceCommandInfo *tcmdPtr = clientData; /* * Build a list with the ops list as the first obj element and the @@ -692,11 +699,10 @@ TraceCommandObjCmd( command = Tcl_GetStringFromObj(objv[5], &commandLength); length = (size_t) commandLength; if ((enum traceOptions) optionIndex == TRACE_ADD) { - TraceCommandInfo *tcmdPtr; + TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) + ckalloc((unsigned) (sizeof(TraceCommandInfo) + - sizeof(tcmdPtr->command) + length + 1)); - tcmdPtr = (TraceCommandInfo *) ckalloc((unsigned) - (sizeof(TraceCommandInfo) - sizeof(tcmdPtr->command) - + length + 1)); tcmdPtr->flags = flags; tcmdPtr->stepTrace = NULL; tcmdPtr->startLevel = 0; @@ -707,7 +713,7 @@ TraceCommandObjCmd( strcpy(tcmdPtr->command, command); name = Tcl_GetString(objv[3]); if (Tcl_TraceCommand(interp, name, flags, TraceCommandProc, - (ClientData) tcmdPtr) != TCL_OK) { + tcmdPtr) != TCL_OK) { ckfree((char *) tcmdPtr); return TCL_ERROR; } @@ -718,23 +724,21 @@ TraceCommandObjCmd( * first one that matches. */ - TraceCommandInfo *tcmdPtr; - ClientData clientData = NULL; - name = Tcl_GetString(objv[3]); + ClientData clientData; /* * First ensure the name given is valid. */ + name = Tcl_GetString(objv[3]); if (Tcl_FindCommand(interp,name,NULL,TCL_LEAVE_ERR_MSG) == NULL) { return TCL_ERROR; } - while ((clientData = Tcl_CommandTraceInfo(interp, name, 0, - TraceCommandProc, clientData)) != NULL) { - tcmdPtr = (TraceCommandInfo *) clientData; - if ((tcmdPtr->length == length) - && (tcmdPtr->flags == flags) + FOREACH_COMMAND_TRACE(interp, name, clientData) { + TraceCommandInfo *tcmdPtr = clientData; + + if ((tcmdPtr->length == length) && (tcmdPtr->flags == flags) && (strncmp(command, tcmdPtr->command, (size_t) length) == 0)) { Tcl_UntraceCommand(interp, name, flags | TCL_TRACE_DELETE, @@ -751,30 +755,27 @@ TraceCommandObjCmd( } case TRACE_INFO: { ClientData clientData; - Tcl_Obj *resultListPtr, *eachTraceObjPtr, *elemObjPtr; + Tcl_Obj *resultListPtr; if (objc != 4) { Tcl_WrongNumArgs(interp, 3, objv, "name"); return TCL_ERROR; } - clientData = NULL; - name = Tcl_GetString(objv[3]); - /* * First ensure the name given is valid. */ + name = Tcl_GetString(objv[3]); if (Tcl_FindCommand(interp, name, NULL, TCL_LEAVE_ERR_MSG) == NULL) { return TCL_ERROR; } resultListPtr = Tcl_NewListObj(0, NULL); - while ((clientData = Tcl_CommandTraceInfo(interp, name, 0, - TraceCommandProc, clientData)) != NULL) { + FOREACH_COMMAND_TRACE(interp, name, clientData) { int numOps = 0; - Tcl_Obj *opObj; - TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) clientData; + Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr; + TraceCommandInfo *tcmdPtr = clientData; /* * Build a list with the ops list as the first obj element and the @@ -898,11 +899,9 @@ TraceVariableObjCmd( command = Tcl_GetStringFromObj(objv[5], &commandLength); length = (size_t) commandLength; if ((enum traceOptions) optionIndex == TRACE_ADD) { - CombinedTraceVarInfo *ctvarPtr; - - ctvarPtr = (CombinedTraceVarInfo *) ckalloc((unsigned) - (sizeof(CombinedTraceVarInfo) + length + 1 - - sizeof(ctvarPtr->traceCmdInfo.command))); + CombinedTraceVarInfo *ctvarPtr = (CombinedTraceVarInfo *) + ckalloc((unsigned) (sizeof(CombinedTraceVarInfo) + + length + 1 - sizeof(ctvarPtr->traceCmdInfo.command))); ctvarPtr->traceCmdInfo.flags = flags; if (objv[0] == NULL) { ctvarPtr->traceCmdInfo.flags |= TCL_TRACE_OLD_STYLE; @@ -911,11 +910,11 @@ TraceVariableObjCmd( flags |= TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT; strcpy(ctvarPtr->traceCmdInfo.command, command); ctvarPtr->traceInfo.traceProc = TraceVarProc; - ctvarPtr->traceInfo.clientData = (ClientData) - &ctvarPtr->traceCmdInfo; + ctvarPtr->traceInfo.clientData = &ctvarPtr->traceCmdInfo; ctvarPtr->traceInfo.flags = flags; name = Tcl_GetString(objv[3]); - if (TraceVarEx(interp,name,NULL,(VarTrace*)ctvarPtr) != TCL_OK) { + if (TraceVarEx(interp, name, NULL, (VarTrace *) ctvarPtr) + != TCL_OK) { ckfree((char *) ctvarPtr); return TCL_ERROR; } @@ -926,12 +925,12 @@ TraceVariableObjCmd( * first one that matches. */ - TraceVarInfo *tvarPtr; - ClientData clientData = 0; + ClientData clientData; + name = Tcl_GetString(objv[3]); - while ((clientData = Tcl_VarTraceInfo(interp, name, 0, - TraceVarProc, clientData)) != 0) { - tvarPtr = (TraceVarInfo *) clientData; + FOREACH_VAR_TRACE(interp, name, clientData) { + TraceVarInfo *tvarPtr = clientData; + if ((tvarPtr->length == length) && ((tvarPtr->flags & ~TCL_TRACE_OLD_STYLE)==flags) && (strncmp(command, tvarPtr->command, @@ -947,7 +946,7 @@ TraceVariableObjCmd( } case TRACE_INFO: { ClientData clientData; - Tcl_Obj *resultListPtr, *eachTraceObjPtr, *elemObjPtr; + Tcl_Obj *resultListPtr; if (objc != 4) { Tcl_WrongNumArgs(interp, 3, objv, "name"); @@ -955,12 +954,10 @@ TraceVariableObjCmd( } resultListPtr = Tcl_NewObj(); - clientData = 0; name = Tcl_GetString(objv[3]); - while ((clientData = Tcl_VarTraceInfo(interp, name, 0, TraceVarProc, - clientData)) != 0) { - Tcl_Obj *opObj; - TraceVarInfo *tvarPtr = (TraceVarInfo *) clientData; + FOREACH_VAR_TRACE(interp, name, clientData) { + Tcl_Obj *opObjPtr, *eachTraceObjPtr, *elemObjPtr; + TraceVarInfo *tvarPtr = clientData; /* * Build a list with the ops list as the first obj element and the @@ -970,20 +967,20 @@ TraceVariableObjCmd( elemObjPtr = Tcl_NewListObj(0, NULL); if (tvarPtr->flags & TCL_TRACE_ARRAY) { - TclNewLiteralStringObj(opObj, "array"); - Tcl_ListObjAppendElement(NULL, elemObjPtr, opObj); + TclNewLiteralStringObj(opObjPtr, "array"); + Tcl_ListObjAppendElement(NULL, elemObjPtr, opObjPtr); } if (tvarPtr->flags & TCL_TRACE_READS) { - TclNewLiteralStringObj(opObj, "read"); - Tcl_ListObjAppendElement(NULL, elemObjPtr, opObj); + TclNewLiteralStringObj(opObjPtr, "read"); + Tcl_ListObjAppendElement(NULL, elemObjPtr, opObjPtr); } if (tvarPtr->flags & TCL_TRACE_WRITES) { - TclNewLiteralStringObj(opObj, "write"); - Tcl_ListObjAppendElement(NULL, elemObjPtr, opObj); + TclNewLiteralStringObj(opObjPtr, "write"); + Tcl_ListObjAppendElement(NULL, elemObjPtr, opObjPtr); } if (tvarPtr->flags & TCL_TRACE_UNSETS) { - TclNewLiteralStringObj(opObj, "unset"); - Tcl_ListObjAppendElement(NULL, elemObjPtr, opObj); + TclNewLiteralStringObj(opObjPtr, "unset"); + Tcl_ListObjAppendElement(NULL, elemObjPtr, opObjPtr); } eachTraceObjPtr = Tcl_NewListObj(0, NULL); Tcl_ListObjAppendElement(NULL, eachTraceObjPtr, elemObjPtr); @@ -1261,7 +1258,7 @@ TraceCommandProc( int flags) /* OR-ed bits giving operation and other * information. */ { - TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) clientData; + TraceCommandInfo *tcmdPtr = clientData; int code; Tcl_DString cmd; @@ -1357,7 +1354,7 @@ TraceCommandProc( state = Tcl_SaveInterpState(interp, TCL_OK); Tcl_UntraceCommand(interp, oldName, untraceFlags, TraceCommandProc, clientData); - (void) Tcl_RestoreInterpState(interp, state); + Tcl_RestoreInterpState(interp, state); tcmdPtr->refCount--; } if ((--tcmdPtr->refCount) <= 0) { @@ -1441,8 +1438,7 @@ TclCheckExecutionTraces( active.nextTracePtr = tracePtr->nextPtr; } if (tracePtr->traceProc == TraceCommandProc) { - TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) - tracePtr->clientData; + TraceCommandInfo *tcmdPtr = tracePtr->clientData; if (tcmdPtr->flags != 0) { tcmdPtr->curFlags = traceFlags | TCL_TRACE_EXEC_DIRECT; @@ -1451,8 +1447,8 @@ TclCheckExecutionTraces( if (state == NULL) { state = Tcl_SaveInterpState(interp, code); } - traceCode = TraceExecutionProc((ClientData) tcmdPtr, interp, - curLevel, command, (Tcl_Command) cmdPtr, objc, objv); + traceCode = TraceExecutionProc(tcmdPtr, interp, curLevel, + command, (Tcl_Command) cmdPtr, objc, objv); if ((--tcmdPtr->refCount) <= 0) { ckfree((char *) tcmdPtr); } @@ -1464,10 +1460,10 @@ TclCheckExecutionTraces( } iPtr->activeCmdTracePtr = active.nextPtr; if (state) { - (void) Tcl_RestoreInterpState(interp, state); + Tcl_RestoreInterpState(interp, state); } - return(traceCode); + return traceCode; } /* @@ -1565,7 +1561,7 @@ TclCheckInterpTraces( * it. */ - Tcl_Preserve((ClientData) tracePtr); + Tcl_Preserve(tracePtr); tracePtr->flags |= TCL_TRACE_EXEC_IN_PROGRESS; if (state == NULL) { state = Tcl_SaveInterpState(interp, code); @@ -1579,8 +1575,7 @@ TclCheckInterpTraces( if (tracePtr->flags & traceFlags) { if (tracePtr->proc == TraceExecutionProc) { - TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) - tracePtr->clientData; + TraceCommandInfo *tcmdPtr = tracePtr->clientData; tcmdPtr->curFlags = traceFlags; tcmdPtr->curCode = code; @@ -1605,19 +1600,19 @@ TclCheckInterpTraces( } } tracePtr->flags &= ~TCL_TRACE_EXEC_IN_PROGRESS; - Tcl_Release((ClientData) tracePtr); + Tcl_Release(tracePtr); } } iPtr->activeInterpTracePtr = active.nextPtr; if (state) { if (traceCode == TCL_OK) { - (void) Tcl_RestoreInterpState(interp, state); + Tcl_RestoreInterpState(interp, state); } else { Tcl_DiscardInterpState(state); } } - return(traceCode); + return traceCode; } /* @@ -1659,7 +1654,7 @@ CallTraceFunction( * Copy the command characters into a new string. */ - commandCopy = TclStackAlloc(interp, (unsigned) (numChars + 1)); + commandCopy = TclStackAlloc(interp, (unsigned) numChars + 1); memcpy(commandCopy, command, (size_t) numChars); commandCopy[numChars] = '\0'; @@ -1667,7 +1662,7 @@ CallTraceFunction( * Call the trace function then free allocated storage. */ - traceCode = (tracePtr->proc)(tracePtr->clientData, (Tcl_Interp *) iPtr, + traceCode = tracePtr->proc(tracePtr->clientData, (Tcl_Interp *) iPtr, iPtr->numLevels, commandCopy, (Tcl_Command) cmdPtr, objc, objv); TclStackFree(interp, commandCopy); @@ -1695,7 +1690,7 @@ static void CommandObjTraceDeleted( ClientData clientData) { - TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) clientData; + TraceCommandInfo *tcmdPtr = clientData; if ((--tcmdPtr->refCount) <= 0) { ckfree((char *) tcmdPtr); @@ -1739,7 +1734,7 @@ TraceExecutionProc( { int call = 0; Interp *iPtr = (Interp *) interp; - TraceCommandInfo *tcmdPtr = (TraceCommandInfo *) clientData; + TraceCommandInfo *tcmdPtr = clientData; int flags = tcmdPtr->curFlags; int code = tcmdPtr->curCode; int traceCode = TCL_OK; @@ -1790,8 +1785,7 @@ TraceExecutionProc( */ if (call) { - Tcl_DString cmd; - Tcl_DString sub; + Tcl_DString cmd, sub; int i, saveInterpFlags; Tcl_DStringInit(&cmd); @@ -1900,8 +1894,7 @@ TraceExecutionProc( tcmdPtr->refCount++; tcmdPtr->stepTrace = Tcl_CreateObjTrace(interp, 0, (tcmdPtr->flags & TCL_TRACE_ANY_EXEC) >> 2, - TraceExecutionProc, (ClientData)tcmdPtr, - CommandObjTraceDeleted); + TraceExecutionProc, tcmdPtr, CommandObjTraceDeleted); } } if (flags & TCL_TRACE_DESTROYED) { @@ -1950,7 +1943,7 @@ TraceVarProc( int flags) /* OR-ed bits giving operation and other * information. */ { - TraceVarInfo *tvarPtr = (TraceVarInfo *) clientData; + TraceVarInfo *tvarPtr = clientData; char *result; int code, destroy = 0; Tcl_DString cmd; @@ -2197,7 +2190,7 @@ Tcl_CreateTrace( data->clientData = clientData; data->proc = proc; return Tcl_CreateObjTrace(interp, level, 0, StringTraceProc, - (ClientData) data, StringTraceDeleteProc); + data, StringTraceDeleteProc); } /* @@ -2226,7 +2219,7 @@ StringTraceProc( int objc, Tcl_Obj *const *objv) { - StringTraceData *data = (StringTraceData *) clientData; + StringTraceData *data = clientData; Command *cmdPtr = (Command *) commandInfo; const char **argv; /* Args to pass to string trace proc */ int i; @@ -2249,7 +2242,7 @@ StringTraceProc( * either command or argv. */ - (data->proc)(data->clientData, interp, level, (char *) command, + data->proc(data->clientData, interp, level, (char *) command, cmdPtr->proc, cmdPtr->clientData, objc, argv); TclStackFree(interp, (void *) argv); @@ -2392,8 +2385,7 @@ TclVarTraceExists( Tcl_Interp *interp, /* The interpreter */ const char *varName) /* The variable name */ { - Var *varPtr; - Var *arrayPtr; + Var *varPtr, *arrayPtr; /* * The choice of "create" flag values is delicate here, and matches the @@ -2413,7 +2405,7 @@ TclVarTraceExists( if ((varPtr->flags & VAR_TRACED_READ) || (arrayPtr && (arrayPtr->flags & VAR_TRACED_READ))) { - TclCallVarTraces((Interp *)interp, arrayPtr, varPtr, varName, NULL, + TclCallVarTraces((Interp *) interp, arrayPtr, varPtr, varName, NULL, TCL_TRACE_READS, /* leaveErrMsg */ 0); } @@ -2576,25 +2568,25 @@ TclCallVarTraces( result = NULL; active.nextPtr = iPtr->activeVarTracePtr; iPtr->activeVarTracePtr = &active; - Tcl_Preserve((ClientData) iPtr); + Tcl_Preserve(iPtr); if (arrayPtr && !TclIsVarTraceActive(arrayPtr) && (arrayPtr->flags & traceflags)) { hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) arrayPtr); active.varPtr = arrayPtr; - for (tracePtr = (VarTrace *) Tcl_GetHashValue(hPtr); - tracePtr != NULL; tracePtr = active.nextTracePtr) { + for (tracePtr = Tcl_GetHashValue(hPtr); + tracePtr != NULL; tracePtr = active.nextTracePtr) { active.nextTracePtr = tracePtr->nextPtr; if (!(tracePtr->flags & flags)) { continue; } - Tcl_Preserve((ClientData) tracePtr); + Tcl_Preserve(tracePtr); if (state == NULL) { - state = Tcl_SaveInterpState((Tcl_Interp *)iPtr, code); + state = Tcl_SaveInterpState((Tcl_Interp *) iPtr, code); } - if (Tcl_InterpDeleted((Tcl_Interp *)iPtr)) { + if (Tcl_InterpDeleted((Tcl_Interp *) iPtr)) { flags |= TCL_INTERP_DESTROYED; } - result = (*tracePtr->traceProc)(tracePtr->clientData, + result = tracePtr->traceProc(tracePtr->clientData, (Tcl_Interp *) iPtr, part1, part2, flags); if (result != NULL) { if (flags & TCL_TRACE_UNSETS) { @@ -2608,7 +2600,7 @@ TclCallVarTraces( code = TCL_ERROR; } } - Tcl_Release((ClientData) tracePtr); + Tcl_Release(tracePtr); if (code == TCL_ERROR) { goto done; } @@ -2625,20 +2617,20 @@ TclCallVarTraces( active.varPtr = varPtr; if (varPtr->flags & traceflags) { hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); - for (tracePtr = (VarTrace *) Tcl_GetHashValue(hPtr); - tracePtr != NULL; tracePtr = active.nextTracePtr) { + for (tracePtr = Tcl_GetHashValue(hPtr); + tracePtr != NULL; tracePtr = active.nextTracePtr) { active.nextTracePtr = tracePtr->nextPtr; if (!(tracePtr->flags & flags)) { continue; } - Tcl_Preserve((ClientData) tracePtr); + Tcl_Preserve(tracePtr); if (state == NULL) { - state = Tcl_SaveInterpState((Tcl_Interp *)iPtr, code); + state = Tcl_SaveInterpState((Tcl_Interp *) iPtr, code); } - if (Tcl_InterpDeleted((Tcl_Interp *)iPtr)) { + if (Tcl_InterpDeleted((Tcl_Interp *) iPtr)) { flags |= TCL_INTERP_DESTROYED; } - result = (*tracePtr->traceProc)(tracePtr->clientData, + result = tracePtr->traceProc(tracePtr->clientData, (Tcl_Interp *) iPtr, part1, part2, flags); if (result != NULL) { if (flags & TCL_TRACE_UNSETS) { @@ -2652,7 +2644,7 @@ TclCallVarTraces( code = TCL_ERROR; } } - Tcl_Release((ClientData) tracePtr); + Tcl_Release(tracePtr); if (code == TCL_ERROR) { goto done; } @@ -2713,16 +2705,16 @@ TclCallVarTraces( Tcl_DictObjPut(NULL, options, errorInfoKey, errorInfo); Tcl_DecrRefCount(errorInfoKey); Tcl_DecrRefCount(errorInfo); - code = Tcl_SetReturnOptions((Tcl_Interp *)iPtr, options); + code = Tcl_SetReturnOptions((Tcl_Interp *) iPtr, options); iPtr->flags &= ~(ERR_ALREADY_LOGGED); Tcl_DiscardInterpState(state); } else { - (void) Tcl_RestoreInterpState((Tcl_Interp *)iPtr, state); + Tcl_RestoreInterpState((Tcl_Interp *) iPtr, state); } DisposeTraceResult(disposeFlags,result); } else if (state) { if (code == TCL_OK) { - code = Tcl_RestoreInterpState((Tcl_Interp *)iPtr, state); + code = Tcl_RestoreInterpState((Tcl_Interp *) iPtr, state); } else { Tcl_DiscardInterpState(state); } @@ -2739,7 +2731,7 @@ TclCallVarTraces( VarHashRefCount(varPtr)--; } iPtr->activeVarTracePtr = active.nextPtr; - Tcl_Release((ClientData) iPtr); + Tcl_Release(iPtr); return code; } @@ -2870,9 +2862,8 @@ Tcl_UntraceVar2( #endif flags &= flagMask; - hPtr = Tcl_FindHashEntry(&iPtr->varTraces, - (char *) varPtr); - for (tracePtr = (VarTrace *) Tcl_GetHashValue(hPtr), prevPtr = NULL; ; + hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); + for (tracePtr = Tcl_GetHashValue(hPtr), prevPtr = NULL; ; prevPtr = tracePtr, tracePtr = tracePtr->nextPtr) { if (tracePtr == NULL) { goto updateFlags; @@ -2906,7 +2897,7 @@ Tcl_UntraceVar2( } else { prevPtr->nextPtr = nextPtr; } - Tcl_EventuallyFree((ClientData) tracePtr, TCL_DYNAMIC); + Tcl_EventuallyFree(tracePtr, TCL_DYNAMIC); for (tracePtr = nextPtr; tracePtr != NULL; tracePtr = tracePtr->nextPtr) { @@ -3000,7 +2991,6 @@ Tcl_VarTraceInfo2( * call will return the first trace. */ { Interp *iPtr = (Interp *) interp; - register VarTrace *tracePtr; Var *varPtr, *arrayPtr; Tcl_HashEntry *hPtr; @@ -3015,14 +3005,13 @@ Tcl_VarTraceInfo2( * Find the relevant trace, if any, and return its clientData. */ - hPtr = Tcl_FindHashEntry(&iPtr->varTraces, - (char *) varPtr); + hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); if (hPtr) { - tracePtr = Tcl_GetHashValue(hPtr); + register VarTrace *tracePtr = Tcl_GetHashValue(hPtr); if (prevClientData != NULL) { - for ( ; tracePtr != NULL; tracePtr = tracePtr->nextPtr) { + for (; tracePtr != NULL; tracePtr = tracePtr->nextPtr) { if ((tracePtr->clientData == prevClientData) && (tracePtr->traceProc == proc)) { tracePtr = tracePtr->nextPtr; @@ -3030,7 +3019,7 @@ Tcl_VarTraceInfo2( } } } - for (; tracePtr!=NULL ; tracePtr=tracePtr->nextPtr) { + for (; tracePtr != NULL ; tracePtr = tracePtr->nextPtr) { if (tracePtr->traceProc == proc) { return tracePtr->clientData; } @@ -3191,8 +3180,8 @@ TraceVarEx( * because there should be no code path that ever sets both flags. */ - if ((tracePtr->flags&TCL_TRACE_RESULT_DYNAMIC) - && (tracePtr->flags&TCL_TRACE_RESULT_OBJECT)) { + if ((tracePtr->flags & TCL_TRACE_RESULT_DYNAMIC) + && (tracePtr->flags & TCL_TRACE_RESULT_OBJECT)) { Tcl_Panic("bad result flag combination"); } @@ -3211,9 +3200,9 @@ TraceVarEx( if (isNew) { tracePtr->nextPtr = NULL; } else { - tracePtr->nextPtr = (VarTrace *) Tcl_GetHashValue(hPtr); + tracePtr->nextPtr = Tcl_GetHashValue(hPtr); } - Tcl_SetHashValue(hPtr, (char *) tracePtr); + Tcl_SetHashValue(hPtr, tracePtr); /* * Mark the variable as traced so we know to call them. -- cgit v0.12 From 5b6e0993e188fd16bbb2ec7f54b8b0c7be873629 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 31 May 2008 11:41:59 +0000 Subject: Implementation of TIP #257. Incomplete due to missing Win build support. --- ChangeLog | 8 + doc/Class.3 | 231 +++++ doc/Method.3 | 249 ++++++ doc/class.n | 126 +++ doc/copy.n | 54 ++ doc/define.n | 269 ++++++ doc/info.n | 220 ++++- doc/my.n | 56 ++ doc/next.n | 195 ++++ doc/object.n | 101 +++ doc/self.n | 111 +++ generic/tclBasic.c | 6 +- generic/tclInt.h | 19 +- generic/tclOO.c | 2179 +++++++++++++++++++++++++++++++++++++++++++++ generic/tclOO.decls | 190 ++++ generic/tclOO.h | 128 +++ generic/tclOOBasic.c | 925 +++++++++++++++++++ generic/tclOOCall.c | 1211 +++++++++++++++++++++++++ generic/tclOODecls.h | 282 ++++++ generic/tclOODefineCmds.c | 1831 +++++++++++++++++++++++++++++++++++++ generic/tclOOInfo.c | 1271 ++++++++++++++++++++++++++ generic/tclOOInt.h | 579 ++++++++++++ generic/tclOOIntDecls.h | 209 +++++ generic/tclOOMethod.c | 1425 +++++++++++++++++++++++++++++ generic/tclOOStubInit.c | 79 ++ generic/tclOOStubLib.c | 82 ++ tests/info.test | 10 +- tests/interp.test | 15 +- tests/oo.test | 1769 ++++++++++++++++++++++++++++++++++++ unix/Makefile.in | 52 +- unix/tclConfig.h.in | 6 +- 31 files changed, 13866 insertions(+), 22 deletions(-) create mode 100644 doc/Class.3 create mode 100644 doc/Method.3 create mode 100644 doc/class.n create mode 100644 doc/copy.n create mode 100644 doc/define.n create mode 100644 doc/my.n create mode 100644 doc/next.n create mode 100644 doc/object.n create mode 100644 doc/self.n create mode 100644 generic/tclOO.c create mode 100644 generic/tclOO.decls create mode 100644 generic/tclOO.h create mode 100644 generic/tclOOBasic.c create mode 100644 generic/tclOOCall.c create mode 100644 generic/tclOODecls.h create mode 100644 generic/tclOODefineCmds.c create mode 100644 generic/tclOOInfo.c create mode 100644 generic/tclOOInt.h create mode 100644 generic/tclOOIntDecls.h create mode 100644 generic/tclOOMethod.c create mode 100644 generic/tclOOStubInit.c create mode 100644 generic/tclOOStubLib.c create mode 100644 tests/oo.test diff --git a/ChangeLog b/ChangeLog index aadcf78..1255ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-31 Donal K. Fellows + + TIP#257 IMPLEMENTATION + + * generic/tclOO*, doc/*, tests/oo.test: Port of implementation of + TclOO to sit directly inside Tcl. Note that this is incomplete (e.g. + no build support yet for Windows). + 2008-05-26 Jeff Hobbs * tests/io.test (io-53.9): need to close chan before removing file. diff --git a/doc/Class.3 b/doc/Class.3 new file mode 100644 index 0000000..8954ab7 --- /dev/null +++ b/doc/Class.3 @@ -0,0 +1,231 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: Class.3,v 1.1 2008/05/31 11:42:06 dkf Exp $ +'\" +.so man.macros +.TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +Tcl_ClassGetMetadata, Tcl_ClassSetMetadata, Tcl_CopyObjectInstance, Tcl_GetClassAsObject, Tcl_GetObjectAsClass, Tcl_GetObjectCommand, Tcl_GetObjectNamespace, Tcl_NewObjectInstance, Tcl_ObjectDeleted, Tcl_ObjectGetMetadata, Tcl_ObjectGetMethodNameMapper, Tcl_ObjectSetMetadata, Tcl_ObjectSetMethodNameMapper \- manipulate objects and classes +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +Tcl_Object +\fBTcl_GetObjectFromObj\fR(\fIinterp, objPtr\fR) +.sp +Tcl_Object +\fBTcl_GetClassAsObject\fR(\fIclass\fR) +.sp +Tcl_Class +\fBTcl_GetObjectAsClass\fR(\fIobject\fR) +.sp +Tcl_Command +\fBTcl_GetObjectCommand\fR(\fIobject\fR) +.sp +Tcl_Namespace * +\fBTcl_GetObjectNamespace\fR(\fIobject\fR) +.sp +Tcl_Object +\fBTcl_NewObjectInstance\fR(\fIinterp, class, name, nsName, objc, objv, skip\fR) +.sp +Tcl_Object +\fBTcl_CopyObjectInstance\fR(\fIinterp, object, name, nsName\fR) +.sp +int +\fBTcl_ObjectDeleted\fR(\fIobject\fR) +.sp +ClientData +\fBTcl_ObjectGetMetadata\fR(\fIobject, metaTypePtr\fR) +.sp +\fBTcl_ObjectSetMetadata\fR(\fIobject, metaTypePtr, metadata\fR) +.sp +ClientData +\fBTcl_ClassGetMetadata\fR(\fIclass, metaTypePtr\fR) +.sp +\fBTcl_ClassSetMetadata\fR(\fIclass, metaTypePtr, metadata\fR) +.sp +Tcl_ObjectMapMethodNameProc +\fBTcl_ObjectGetMethodNameMapper\fR(\fIobject\fR) +.sp +\fBTcl_ObjectSetMethodNameMapper\fR(\fIobject\fR, \fImethodNameMapper\fR) +.SH ARGUMENTS +.AS ClientData metadata in/out +.AP Tcl_Interp *interp in/out +Interpreter providing the context for looking up or creating an object, and +into whose result error messages will be written on failure. +.AP Tcl_Obj *objPtr in +The name of the object to look up. +.AP Tcl_Object object in +Reference to the object to operate upon. +.AP Tcl_Class class in +Reference to the class to operate upon. +.AP "const char" *name in +The name of the object to create, or NULL if a new unused name is to be +automatically selected. +.AP "const char" *nsName in +The name of the namespace to create for the object's private use, or NULL if a +new unused name is to be automatically selected. +.AP int objc in +The number of elements in the \fIobjv\fR array. +.AP "Tcl_Obj *const" *objv in +The arguments to the command to create the instance of the class. +.AP int skip in +The number of arguments at the start of the argument array, \fIobjv\fR, that +are not arguments to any constructors. +.AP Tcl_ObjectMetadataType *metaTypePtr in +The type of \fImetadata\fR being set with \fBTcl_ClassSetMetadata\fR or +retrieved with \fBTcl_ClassGetMetadata\fR. +.AP ClientData metadata in +An item of metadata to attach to the class, or NULL to remove the metadata +associated with a particular \fImetaTypePtr\fR. +.AP "Tcl_ObjectMapMethodNameProc" "methodNameMapper" in +A pointer to a function to call to adjust the mapping of objects and method +names to implementations, or NULL when no such mapping is required. +.BE +.SH DESCRIPTION +.PP +Objects are typed entities that have a set of operations ("methods") +associated with them. Classes are objects that can manufacture objects. Each +class can be viewed as an object itself; the object view can be retrieved +using \fBTcl_GetClassAsObject\fR which always returns the object when applied +to a non-destroyed class, and an object can be viewed as a class with the aid +of the \fBTcl_GetObjectAsClass\fR (which either returns the class, or NULL if +the object is not a class). An object may be looked up using the +\fBTcl_GetObjectFromObj\fR function, which either returns an object or NULL +(with an error message in the interpreter result) if the object cannot be +found. The correct way to look up a class by name is to look up the object +with that name, and then to use \fBTcl_GetObjectAsClass\fR. +.PP +Every object has its own command and namespace associated with it. The command +may be retrieved using the \fBTcl_GetObjectCommand\fR function, and the +namespace may be retrieved using the \fBTcl_GetObjectNamespace\fR function. +.PP +Instances of classes are created using \fBTcl_NewObjectInstance\fR, which +takes creates an object from any class (and which is internally called by both +the \fBcreate\fR and \fBnew\fR methods of the \fBoo::class\fR class). It takes +parameters that optionally give the name of the object and namespace to +create, and which describe the arguments to pass to to the class's constructor +(if any). The result of the function will be either a reference to the newly +created object, or NULL if the creation failed (when an error message will be +left in the interpreter result). In addition, objects may be copied by using +\fBTcl_CopyObjectInstance\fR which creates a copy of an object without running +any constructors. +.SH "OBJECT AND CLASS METADATA" +.PP +Every object and every class may have arbitrary amounts of metadata attached +to it, which the object or class attaches no meaning to beyond what is +described in a Tcl_ObjectMetadataType structure instance. Metadata to be +attached is described by the the type of the metadata (given in the +\fImetaTypePtr\fR argument) and an arbitrary pointer (the \fImetadata\fR +argument) that are given to \fBTcl_ObjectSetMetadata\fR and +\fBTcl_ClassSetMetadata\fR, and a particular piece of metadata can be +retrieved given its type using \fBTcl_ObjectGetMetadata\fR and +\fBTcl_ClassGetMetadata\fR. If the \fImetadata\fR parameter to either +\fBTcl_ObjectSetMetadata\fR or \fBTcl_ClassSetMetadata\fR is NULL, the +metadata is removed if it was attached, and the results of +\fBTcl_ObjectGetMetadata\fR and \fBTcl_ClassGetMetadata\fR are NULL if the +given type of metadata was not attached. It is not an error to request or +remove a piece of metadata that was not attached. +.SS "TCL_OBJECTMETADATATYPE STRUCTURE" +.PP +The contents of the Tcl_ObjectMetadataType structure are as follows: +.PP +.CS + typedef const struct { + int \fIversion\fR; + const char *\fIname\fR; + Tcl_ObjectMetadataDeleteProc \fIdeleteProc\fR; + Tcl_CloneProc \fIcloneProc\fR; + } \fBTcl_ObjectMetadataType\fR; +.CE +.PP +The \fIversion\fR field allows for future expansion of the structure, and +should always be declared equal to TCL_OO_METADATA_VERSION_CURRENT. The +\fIname\fR field provides a human-readable name for the type, and is reserved +for debugging. +.PP +The \fIdeleteProc\fR field gives a function of type +Tcl_ObjectMetadataDeleteProc that is used to delete a particular piece of +metadata, and is called when the attached metadata is replaced or removed; the +field must not be NULL. +.PP +The \fIcloneProc\fR field gives a function that is used to copy a piece of +metadata (used when a copy of an object is created using +\fBTcl_CopyObjectInstance\fR); if NULL, the metadata will be just directly +copied. +.SS "TCL_OBJECTMETADATADELETEPROC FUNCTION SIGNATURE" +.PP +Functions matching this signature are used to delete metadata associated with +a class or object. +.PP +.CS + typedef void (*\fBTcl_ObjectMetadataDeleteProc\fR) ( + ClientData \fImetadata\fR); +.CE +.PP +The \fImetadata\fR argument gives the address of the metadata to be +deleted. +.SS "TCL_CLONEPROC FUNCTION SIGNATURE" +.PP +Functions matching this signature are used to create copies of metadata +associated with a class or object. +.PP +.CS + typedef int (*\fBTcl_CloneProc\fR) ( + Tcl_Interp *\fIinterp\fR, + ClientData \fIsrcMetadata\fR, + ClientData *\fIdstMetadataPtr\fR); +.CE +.PP +The \fIinterp\fR argument gives a place to write an error message when the +attempt to clone the object is to fail, in which case the clone procedure must +also return TCL_ERROR; it should return TCL_OK otherwise. +The \fIsrcMetadata\fR argument gives the address of the metadata to be cloned, +and the cloned metadata should be written into the variable pointed to by +\fIdstMetadataPtr\fR; a NULL should be written if the metadata is to not be +cloned but the overall object copy operation is still to succeed. +.SH "OBJECT METHOD NAME MAPPING" +It is possible to control, on a per-object basis, what methods are invoked +when a particular method is invoked. Normally this is done by looking up the +method name in the object and then in the class hierarchy, but fine control of +exactly what the value used to perform the look up is afforded through the +ability to set a method name mapper callback via +\fBTcl_ObjectSetMethodNameMapper\fR (and its introspection counterpart, +\fBTcl_ObjectGetMethodNameMapper\fR, which returns the current mapper). The +current mapper (if any) is invoked immediately before looking up what chain of +method implementations is to be used. +.SS "TCL_OBJECTMAPMETHODNAMEPROC FUNCTION SIGNATURE" +The \fITcl_ObjectMapMethodNameProc\fR callback is defined as follows: +.PP +.CS + typedef int (*\fBTcl_ObjectMapMethodNameProc\fR)( + Tcl_Interp *\fIinterp\fR, + Tcl_Object \fIobject\fR, + Tcl_Class *\fIstartClsPtr\fR, + Tcl_Obj *\fImethodNameObj\fR); +.CE +.PP +The \fIinterp\fR parameter (and the integer result) follow normal Tcl result +rules for error reporting. The \fIobject\fR parameter says which object is +being processed. The \fIstartClsPtr\fR parameter points to a variable that +contains the first class to provide a definition in the method chain to +process, or NULL if the whole chain is to be processed (the argument itself is +never NULL); this variable may be updated by the callback. The +\fImethodNameObj\fR parameter gives an unshared object containing the name of +the method being invoked, as provided by the user; this object may be updated +by the callback. +.SH "SEE ALSO" +Method(3), oo::class(n), oo::copy(n), oo::define(n), oo::object(n) +.SH KEYWORDS +class, constructor, object + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/Method.3 b/doc/Method.3 new file mode 100644 index 0000000..341dcac --- /dev/null +++ b/doc/Method.3 @@ -0,0 +1,249 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: Method.3,v 1.1 2008/05/31 11:42:06 dkf Exp $ +'\" +.so man.macros +.TH Tcl_Method 3 0.1 TclOO "TclOO Library Functions" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +Tcl_ClassSetConstructor, Tcl_ClassSetDestructor, Tcl_MethodDeclarerClass, Tcl_MethodDeclarerObject, Tcl_MethodIsPublic, Tcl_MethodIsType, Tcl_MethodName, Tcl_NewInstanceMethod, Tcl_NewMethod, Tcl_ObjectContextIsFiltering, Tcl_ObjectContextMethod, Tcl_ObjectContextObject, Tcl_ObjectContextSkippedArgs \- manipulate methods and method-call contexts +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +Tcl_Method +\fBTcl_NewMethod\fR(\fIinterp, class, nameObj, isPublic, + methodTypePtr, clientData\fR) +.sp +Tcl_Method +\fBTcl_NewInstanceMethod\fR(\fIinterp, object, nameObj, isPublic, + methodTypePtr, clientData\fR) +.sp +\fBTcl_ClassSetConstructor\fR(\fIclass, method\fR) +.sp +\fBTcl_ClassSetDestructor\fR(\fIclass, method\fR) +.sp +Tcl_Class +\fBTcl_MethodDeclarerClass\fR(\fImethod\fR) +.sp +Tcl_Object +\fBTcl_MethodDeclarerObject\fR(\fImethod\fR) +.sp +Tcl_Obj * +\fBTcl_MethodName\fR(\fImethod\fR) +.sp +int +\fBTcl_MethodIsPublic\fR(\fImethod\fR) +.sp +int +\fBTcl_MethodIsType\fR(\fImethod, methodTypePtr, clientDataPtr\fR) +.sp +int +\fBTcl_ObjectContextInvokeNext\fR(\fIinterp, context, objc, objv, skip\fR) +.sp +int +\fBTcl_ObjectContextIsFiltering\fR(\fIcontext\fR) +.sp +Tcl_Method +\fBTcl_ObjectContextMethod\fR(\fIcontext\fR) +.sp +Tcl_Object +\fBTcl_ObjectContextObject\fR(\fIcontext\fR) +.sp +int +\fBTcl_ObjectContextSkippedArgs\fR(\fIcontext\fR) +.SH ARGUMENTS +.AS ClientData clientData in +.AP Tcl_Interp *interp in/out +The interpreter holding the object or class to create or update a method in. +.AP Tcl_Object object in +The object to create the method in. +.AP Tcl_Class class in +The class to create the method in. +.AP Tcl_Obj *nameObj in +The name of the method to create. Should not be NULL unless creating +constructors or destructors. +.AP int isPublic in +A boolean flag saying whether the method is to be exported. +.AP Tcl_MethodType *methodTypePtr in +A description of the type of the method to create, or the type of method to +compare against. +.AP ClientData clientData in +A piece of data that is passed to the implementation of the method without +interpretation. +.AP ClientData *clientDataPtr out +A pointer to a variable in which to write the \fIclientData\fR value supplied +when the method was created. If NULL, the \fIclientData\fR value will not be +retrieved. +.AP Tcl_Method method in +A reference to a method to query. +.AP Tcl_ObjectContext context in +A reference to a method-call context. Note that client code \fImust not\fR +retain a reference to a context. +.AP int objc in +The number of arguments to pass to the method implementation. +.AP "Tcl_Obj *const" *objv in +An array of arguments to pass to the method implementation. +.AP int skip in +The number of arguments passed to the method implementation that do not +represent "real" arguments. +.BE +.SH DESCRIPTION +.PP +A method is an operation carried out on an object that is associated with the +object. Every method must be attached to either an object or a class; methods +attached to a class are associated with all instances (direct and indirect) of +that class. +.PP +Given a method, the entity that declared it can be found using +\fBTcl_MethodDeclarerClass\fR which returns the class that the method is +attached to (or NULL if the method is not attached to any class) and +\fBTcl_MethodDeclarerObject\fR which returns the object that the method is +attached to (or NULL if the method is not attached to an object). The name of +the method can be retrieved with \fBTcl_MethodName\fR and whether the method +is exported is retrieved with \fBTcl_MethodIsPublic\fR. The type of the method +can also be introspected upon to a limited degree; the function +\fBTcl_MethodIsType\fR returns whether a method is of a particular type, +assigning the per-method \fIclientData\fR to the variable pointed to by +\fIclientDataPtr\fR if (that is non-NULL) if the type is matched. +.SS "METHOD CREATION" +.PP +Methods are created by \fBTcl_NewMethod\fR and \fBTcl_NewClassMethod\fR, which +create a method attached to an object or a class respectively. In both cases, +the \fInameObj\fR argument gives the name of the method to create, the +\fIisPublic\fR argument states whether the method should be exported +initially, the \fImethodTypePtr\fR argument describes the implementation of +the method (see the \fBMETHOD TYPES\fR section below) and the \fIclientData\fR +argument gives some implementation-specific data that is passed on to the +implementation of the method when it is called. +.PP +When the \fInameObj\fR argument to \fBTcl_NewClassMethod\fR is NULL, an +unnamed method is created, which is used for constructors and destructors. +Constructors should be installed into their class using the +\fBTcl_ClassSetConstructor\fR function, and destructors (which must not +require any arguments) should be installed into their class using the +\fBTcl_ClassSetDestructor\fR function. Unnamed methods should not be used for +any other purpose, and named methods should not be used as either constructors +or destructors. Also note that a NULL \fImethodTypePtr\fR is used to provide +internal signalling, and should not be used in client code. +.SS "METHOD CALL CONTEXTS" +.PP +When a method is called, a method-call context reference is passed in as one +of the arguments to the implementation function. This context can be inspected +to provide information about the caller, but should not be retained beyond the +moment when the method call terminates. +.PP +The method that is being called can be retrieved from the context by using +\fBTcl_ObjectContextMethod\fR, and the object that caused the method to be +invoked can be retrieved with \fBTcl_ObjectContextObject\fR. The number of +arguments that are to be skipped (e.g. the object name and method name in a +normal method call) is read with \fBTcl_ObjectContextSkippedArgs\fR, and the +context can also report whether it is working as a filter for another method +through \fBTcl_ObjectContextIsFiltering\fR. +.PP +During the execution of a method, the method implementation may choose to +invoke the stages of the method call chain that come after the current method +implementation. This (the core of the \fBnext\fR command) is done using +\fBTcl_ObjectContextInvokeNext\fR. Note that this function does not manipulate +the call-frame stack, unlike the \fBnext\fR command; if the method +implementation has pushed one or more extra frames on the stack as part of its +implementation, it is also responsible for temporarily popping those frames +from the stack while the \fBTcl_ObjectContextInvokeNext\fR function is +executing. Note also that the method-call context is \fInever\fR deleted +during the execution of this function. +.SH "METHOD TYPES" +.PP +The types of methods are described by a pointer to a Tcl_MethodType structure, +which is defined as: +.PP +.CS + typedef const struct { + int \fIversion\fR; + const char *\fIname\fR; + Tcl_MethodCallProc \fIcallProc\fR; + Tcl_MethodDeleteProc \fIdeleteProc\fR; + Tcl_CloneProc \fIcloneProc\fR; + } \fBTcl_MethodType\fR; +.CE +.PP +The \fIversion\fR field allows for future expansion of the structure, and +should always be declared equal to TCL_OO_METHOD_VERSION_CURRENT. The +\fIname\fR field provides a human-readable name for the type, and is reserved +for debugging. +.PP +The \fIcallProc\fR field gives a function that is called when the method is +invoked; it must never be NULL. +.PP +The \fIdeleteProc\fR field gives a function that is used to delete a +particular method, and is called when the method is replaced or removed; if +the field is NULL, it is assumed that the method's \fIclientData\fR needs no +special action to delete. +.PP +The \fIcloneProc\fR field is either a function that is used to copy a method's +\fIclientData\fR (as part of \fBTcl_CopyObjectInstance\fR) or NULL to indicate +that the \fIclientData\fR can just be copied directly. +.SS "TCL_METHODCALLPROC FUNCTION SIGNATURE" +.PP +Functions matching this signature are called when the method is invoked. +.PP +.CS + typedef int (*\fBTcl_MethodCallProc\fR) ( + ClientData \fIclientData\fR, + Tcl_Interp *\fIinterp\fR, + Tcl_ObjectContext \fIobjectContext\fR, + int \fIobjc\fR, + Tcl_Obj *const *\fIobjv\fR); +.CE +.PP +The \fIclientData\fR argument to a Tcl_MethodCallProc is the value that was +given when the method was created, the \fIinterp\fR is a place in which to +execute scripts and access variables as well as being where to put the result +of the method, and the \fIobjc\fR and \fIobjv\fR fields give the parameter +objects to the method. The calling context of the method can be discovered +through the \fIobjectContext\fR argument, and the return value from a +Tcl_MethodCallProc is any Tcl return code (e.g. TCL_OK, TCL_ERROR). +.SS "TCL_METHODDELETEPROC FUNCTION SIGNATURE" +.PP +Functions matching this signature are used when a method is deleted, whether +through a new method being created or because the object or class is deleted. +.PP +.CS + typedef void (*\fBTcl_MethodDeleteProc\fR) ( + ClientData \fIclientData\fR); +.CE +.PP +The \fIclientData\fR argument to a Tcl_MethodDeleteProc will be the same as +the value passed to the \fIclientData\fR argument to \fBTcl_NewMethod\fR or +\fBTcl_NewClassMethod\fR when the method was created. +.SS "TCL_CLONEPROC FUNCTION SIGNATURE" +.PP +Functions matching this signature are used to copy a method when the object or +class is copied using \fBTcl_CopyObjectInstance\fR (or \fBoo::copy\fR). +.PP +.CS + typedef int (*\fBTcl_CloneProc\fR) ( + Tcl_Interp *\fIinterp\fR, + ClientData \fIoldClientData\fR, + ClientData *\fInewClientDataPtr\fR); +.CE +.PP +The \fIinterp\fR argument gives a place to write an error message when the +attempt to clone the object is to fail, in which case the clone procedure must +also return TCL_ERROR; it should return TCL_OK otherwise. +The \fIoldClientData\fR field to a Tcl_CloneProc gives the value from the +method being copied from, and the \fInewClientDataPtr\fR field will point to +a variable in which to write the value for the method being copied to. +.SH "SEE ALSO" +Class(3), oo::class(n), oo::define(n), oo::object(n) +.SH KEYWORDS +constructor, method, object + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/class.n b/doc/class.n new file mode 100644 index 0000000..02dfc46 --- /dev/null +++ b/doc/class.n @@ -0,0 +1,126 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: class.n,v 1.1 2008/05/31 11:42:06 dkf Exp $ +'\" +.so man.macros +.TH class n 0.1 TclOO "TclOO Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +oo::class \- class of all classes +.SH SYNOPSIS +.nf +package require TclOO + +\fBoo::class\fI method \fR?\fIarg ...\fR? +.fi +.SH "CLASS HIERARCHY" +.nf +\fBoo::object\fR + \(-> \fBoo::class\fR +.fi +.BE + +.SH DESCRIPTION +The \fBoo::class\fR class is the class of all classes; every class is an +instance of this class, which is consequently an instance of itself. This +class is a subclass of \fBoo::object\fR, so every class is also an object. +Additional metaclasses (i.e. classes of classes) can be defined if necessary +by subclassing \fBoo::class\fR. Note that the \fBoo::class\fR object hides the +\fBnew\fR method on itself, so new classes should always be made using the +\fBcreate\fR method. +.SS CONSTRUCTOR +The constructor of the \fBoo::class\fR class takes an optional argument which, +if present, is sent to the \fBoo::define\fR command (along with the name of +the newly-created class) to allow the class to be conveniently configured at +creation time. +.SS DESTRUCTOR +The \fBoo::class\fR class does not define an explicit destructor. However, +when a class is destroyed, all its subclasses and instances are also +destroyed, along with all objects that it has been mixed into. +.SS "EXPORTED METHODS" +.TP +\fIcls \fBcreate \fIname \fR?\fIarg ...\fR? +. +This creates a new instance of the class \fIcls\fR called \fIname\fR (which is +resolved within the calling context's namespace if not fully qualified), +passing the arguments, \fIarg ...\fR, to the constructor, and (if that returns +a successful result) returning the fully qualified name of the created object +(the result of the constructor is ignored). If the constructor fails (i.e. +returns a non-OK result) then the object is destroyed and the error message is +the result of this method call. +.TP +\fIcls \fBnew \fR?\fIarg ...\fR? +. +This creates a new instance of the class \fIcls\fR with a new unique name, +passing the arguments, \fIarg ...\fR, to the constructor, and (if that returns +a successful result) returning the fully qualified name of the created object +(the result of the constructor is ignored). If the constructor fails (i.e. +returns a non-OK result) then the object is destroyed and the error message is +the result of this method call. Note that this method is not exported by the +\fBoo::class\fR object itself, so classes should not be created using this +method. +.SS "NON-EXPORTED METHODS" +The \fBoo::class\fR class supports the following non-exported methods: +.TP +\fIobj \fBcreateWithNamespace\fI name nsName\fR ?\fIarg ...\fR? +. +This creates a new instance of the class \fIcls\fR called \fIname\fR (which is +resolved within the calling context's namespace if not fully qualified), +passing the arguments, \fIarg ...\fR, to the constructor, and (if that returns +a successful result) returning the fully qualified name of the created object +(the result of the constructor is ignored). The name of the instance's +internal namespace will be \fInsName\fR unless that namespace already exists +(when an arbitrary name will be chosen instead). If the constructor fails +(i.e. returns a non-OK result) then the object is destroyed and the error +message is the result of this method call. +.SH EXAMPLES +This example defines a simple class hierarchy and creates a new instance of +it. It then invokes a method of the object before destroying the hierarchy and +showing that the destruction is transitive. +.CS +\fBoo::class create\fR fruit { + method eat {} { + puts "yummy!" + } +} +\fBoo::class create\fR banana { + superclass fruit + constructor {} { + my variable peeled + set peeled 0 + } + method peel {} { + my variable peeled + set peeled 1 + puts "skin now off" + } + method edible? {} { + my variable peeled + return $peeled + } + method eat {} { + if {![my edible?]} { + my peel + } + next + } +} +set b [banana \fBnew\fR] +$b eat \fI\(-> prints "skin now off" and "yummy!"\fR +fruit destroy +$b eat \fI\(-> error "unknown command"\fR +.CE +.SH "SEE ALSO" +oo::define(n), oo::object(n) +.SH KEYWORDS +class, metaclass, object + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/copy.n b/doc/copy.n new file mode 100644 index 0000000..291d2fc --- /dev/null +++ b/doc/copy.n @@ -0,0 +1,54 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: copy.n,v 1.1 2008/05/31 11:42:12 dkf Exp $ +'\" +.so man.macros +.TH copy n 0.1 TclOO "TclOO Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +oo::copy \- create copies of objects and classes +.SH SYNOPSIS +.nf +package require TclOO + +\fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? +.fi +.BE + +.SH DESCRIPTION +The \fBoo::copy\fR command creates a copy of an object or class. It takes the +name of the object or class to be copied, \fIsourceObject\fR, and optionally +the name of the object or class to create, \fItargetObject\fR, which will be +resolved relative to the current namespace if not an absolute qualified name. +If \fItargetObject\fR is omitted, a new name is chosen. The copied object will +be of the same class as the source object, and will have all its per-object +methods copied. If it is a class, it will also have all the class methods in +the class copied, but it will not have any of its instances copied. The +contents of the source object's private namespace \fIwill not\fR be copied; it +is up to the caller to do this. The result of this command will be the +fully-qualified name of the new object or class. +.SH EXAMPLES +This example creates an object, copies it, modifies the source object, and +then demonstrates that the copied object is indeed a copy. +.CS +oo::object create src +oo::define src method msg {} {puts foo} +\fBoo::copy\fR src dst +oo::define src method msg {} {puts bar} +src msg \fI\(-> prints "bar"\fR +dst msg \fI\(-> prints "foo"\fR +.CE +.SH "SEE ALSO" +oo::class(n), oo::define(n), oo::object(n) +.SH KEYWORDS +clone, copy, duplication, object + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/define.n b/doc/define.n new file mode 100644 index 0000000..a1a92bf --- /dev/null +++ b/doc/define.n @@ -0,0 +1,269 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: define.n,v 1.1 2008/05/31 11:42:12 dkf Exp $ +'\" +.so man.macros +.TH define n 0.3 TclOO "TclOO Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +oo::define, oo::objdefine \- define and configure classes and objects +.SH SYNOPSIS +.nf +package require TclOO + +\fBoo::define\fI class defScript\fR +\fBoo::define\fI class subcommand arg\fR ?\fIarg ...\fR? +\fBoo::objdefine\fI object defScript\fR +\fBoo::objdefine\fI object subcommand arg\fR ?\fIarg ...\fR? +.fi +.BE + +.SH DESCRIPTION +The \fBoo::define\fR command is used to control the configuration of classes, +and the \fBoo::objdefine\fR command is used to control the configuration of +objects (including classes as instance objects), with the configuration being +applied to the entity named in the \fIclass\fR or the \fIobject\fR argument. +Configuring a class also updates the +configuration of all subclasses of the class and all objects that are +instances of that class or which mix it in (as modified by any per-instance +configuration). The way in which the configuration is done is controlled by +either the \fIdefScript\fR argument or by the \fIsubcommand\fR and following +\fIarg\fR arguments; when the second is present, it is exactly as if all the +arguments from \fIsubcommand\fR onwards are made into a list and that list is +used as the \fIdefScript\fR argument. +.SS "CONFIGURING CLASSES" +.PP +The following commands are supported in the \fIdefScript\fR for +\fBoo::define\fR, each of which may also be used in the \fIsubcommand\fR form: +.TP +\fBconstructor\fI argList bodyScript\fR +. +This creates or updates the constructor for a class. The formal arguments to +the constructor (defined using the same format as for the Tcl \fBproc\fR +command) will be \fIargList\fR, and the body of the constructor will be +\fIbodyScript\fR. When the body of the constructor is evaluated, the current +namespace of the constructor will be a namespace that is unique to the object +being constructed. Within the constructor, the \fBnext\fR command should be +used to call the superclasses' constructors. If \fIbodyScript\fR is the empty +string, the constructor will be deleted. +.TP +\fBdeletemethod\fI name\fR ?\fIname ...\fR +. +This deletes each of the methods called \fIname\fR from a class. The methods +must have previously existed in that class. Does not affect the superclasses +of the class, nor does it affect the subclasses or instances of the class +(except when they have a call chain through the class being modified). +.TP +\fBdestructor\fI bodyScript\fR +. +This creates or updates the destructor for a class. Destructors take no +arguments, and the body of the destructor will be \fIbodyScript\fR. The +destructor is called when objects of the class are deleted, and when called +will have the object's unique namespace as the current namespace. Destructors +should use the \fBnext\fR command to call the superclasses' destructors. Note +that destructors are not called in all situations (e.g. if the interpreter is +destroyed). If \fIbodyScript\fR is the empty string, the destructor will be +deleted. +.RS +Note that errors during the evaluation of a destructor \fIare not returned\fR +to the code that causes the destruction of an object. Instead, they are passed +to the currently-defined \fBbgerror\fR handler. +.RE +.TP +\fBexport\fI name \fR?\fIname ...\fR? +. +This arranges for each of the named methods, \fIname\fR, to be exported +(i.e. usable outside an instance through the instance object's command) by the +class being defined. Note that the methods themselves may be actually defined +by a superclass; subclass exports override superclass visibility, and may in +turn be overridden by instances. +.TP +\fBfilter\fR ?\fImethodName ...\fR? +. +This sets or updates the list of method names that are used to guard whether a +method call to instances of the class may be called and what the method's +results are. Each \fImethodName\fR names a single filtering method (which may +be exposed or not exposed); it is not an error for a non-existent method to be +named since they may be defined by subclasses. If no \fImethodName\fR +arguments are present, the list of filter names is set to empty. +.TP +\fBforward\fI name cmdName \fR?\fIarg ...\fR? +. +This creates or updates a forwarded method called \fIname\fR. The method +is defined be forwarded to the command called \fIcmdName\fR, with additional +arguments, \fIarg\fR etc., added before those arguments specified by the +caller of the method. Forwarded methods should be deleted using the +\fBmethod\fR subcommand. The method will be exported if \fIname\fR starts with +a lower-case letter, and non-exported otherwise. +.TP +\fBmethod\fI name argList bodyScript\fR +. +This creates, updates or deletes a method. The name of the method is +\fIname\fR, the formal arguments to the method (defined using the same format +as for the Tcl \fBproc\fR command) will be \fIargList\fR, and the body of the +method will be \fIbodyScript\fR. When the body of the method is evaluated, the +current namespace of the method will be a namespace that is unique to the +current object. The method will be exported if \fIname\fR starts with a +lower-case letter, and non-exported otherwise; this behavior can be overridden +via \fBexport\fR and \fBunexport\fR. +.TP +\fBmixin\fR ?\fIclassName ...\fR? +. +This sets or updates the list of additional classes that are to be mixed into +all the instances of the class being defined. Each \fIclassName\fR argument +names a single class that is to be mixed in; if no classes are present, the +list of mixed-in classes is set to be empty. +.TP +\fBrenamemethod\fI fromName toName\fR +. +This renames the method called \fIfromName\fR in a class to \fItoName\fR. The +method must have previously existed in the class, and \fItoName\fR must not +previously refer to a method in that class. Does not affect the superclasses +of the class, nor does it affect the subclasses or instances of the class +(except when they have a call chain through the class being modified). Does +not change the export status of the method; if it was exported before, it will +be afterwards. +.TP +\fBself\fI subcommand arg ...\fR +.TP +\fBself\fI script\fR +. +This command is equivalent to calling \fBoo::objdefine\fR on the class being +defined (see \fBCONFIGURING OBJECTS\fR below for a description of the +supported values of \fIsubcommand\fR). It follows the same general pattern of +argument handling as the \fBoo::define\fR and \fBoo::objdefine\fR commands, +and +.QW "\fBoo::define \fIcls \fBself \fIsubcommand ...\fR" +operates identically to +.QW "\fBoo::objdefine \fIcls subcommand ...\fR" . +.TP +\fBsuperclass\fI className \fR?\fIclassName ...\fR? +. +This allows the alteration of the superclasses of the class being defined. +Each \fIclassName\fR argument names one class that is to be a superclass of +the defined class. Note that objects must not be changed from being classes to +being non-classes or vice-versa. +.TP +\fBunexport\fI name \fR?\fIname ...\fR? +. +This arranges for each of the named methods, \fIname\fR, to be not exported +(i.e. not usable outside the instance through the instance object's command, +but instead just through the \fBmy\fR command visible in each object's +context) by the class being defined. Note that the methods themselves may be +actually defined by a superclass; subclass unexports override superclass +visibility, and may be overridden by instance unexports. +.SS "CONFIGURING OBJECTS" +.PP +The following commands are supported in the \fIdefScript\fR for +\fBoo::objdefine\fR, each of which may also be used in the \fIsubcommand\fR +form: +.TP +\fBclass\fI className\fR +. +This allows the class of an object to be changed after creation. Note that the +class's constructors are not called when this is done, and so the object may +well be in an inconsistent state unless additional configuration work is done. +.TP +\fBdeletemethod\fI name\fR ?\fIname ...\fR +. +This deletes each of the methods called \fIname\fR from an object. The methods +must have previously existed in that object. Does not affect the classes that +the object is an instance of. +.TP +\fBexport\fI name \fR?\fIname ...\fR? +. +This arranges for each of the named methods, \fIname\fR, to be exported +(i.e. usable outside the object through the object's command) by the object +being defined. Note that the methods themselves may be actually defined by a +class or superclass; object exports override class visibility. +.TP +\fBfilter\fR ?\fImethodName ...\fR? +. +This sets or updates the list of method names that are used to guard whether a +method call to the object may be called and what the method's results are. +Each \fImethodName\fR names a single filtering method (which may be exposed or +not exposed); it is not an error for a non-existent method to be named. If no +\fImethodName\fR arguments are present, the list of filter names is set to +empty. Note that the actual list of filters also depends on the filters set +upon any classes that the object is an instance of. +.TP +\fBforward\fI name cmdName \fR?\fIarg ...\fR? +. +This creates or updates a forwarded object method called \fIname\fR. The +method is defined be forwarded to the command called \fIcmdName\fR, with +additional arguments, \fIarg\fR etc., added before those arguments specified +by the caller of the method. Forwarded methods should be deleted using the +\fBmethod\fR subcommand. The method will be exported if \fIname\fR starts with +a lower-case letter, and non-exported otherwise. +.TP +\fBmethod\fI name argList bodyScript\fR +. +This creates, updates or deletes an object method. The name of the method is +\fIname\fR, the formal arguments to the method (defined using the same format +as for the Tcl \fBproc\fR command) will be \fIargList\fR, and the body of the +method will be \fIbodyScript\fR. When the body of the method is evaluated, the +current namespace of the method will be a namespace that is unique to the +object. The method will be exported if \fIname\fR starts with a lower-case +letter, and non-exported otherwise. +.TP +\fBmixin\fR ?\fIclassName ...\fR? +. +This sets or updates a per-object list of additional classes that are to be +mixed into the object. Each argument, \fIclassName\fR, names a single class +that is to be mixed in; if no classes are present, the list of mixed-in +classes is set to be empty. +.TP +\fBrenamemethod\fI fromName toName\fR +. +This renames the method called \fIfromName\fR in an object to \fItoName\fR. +The method must have previously existed in the object, and \fItoName\fR must +not previously refer to a method in that object. Does not affect the classes +that the object is an instance of. Does not change the export status of the +method; if it was exported before, it will be afterwards. +.TP +\fBunexport\fI name \fR?\fIname ...\fR? +. +This arranges for each of the named methods, \fIname\fR, to be not exported +(i.e. not usable outside the object through the object's command, but instead +just through the \fBmy\fR command visible in the object's context) by the +object being defined. Note that the methods themselves may be actually defined +by a class; instance unexports override class visibility. +.SH EXAMPLES +This example demonstrates how to use both forms of the \fBoo::define\fR and +\fBoo::objdefine\fR commands (they work in the same way), as well as +illustrating four of the subcommands of them. +.PP +.CS +oo::class create c +c create o +\fBoo::define\fR c \fBmethod\fR foo {} { + puts "world" +} +\fBoo::objdefine\fR o { + \fBmethod\fR bar {} { + my Foo "hello " + my foo + } + \fBforward\fR Foo ::puts -nonewline + \fBunexport\fR foo +} +o bar \fI\(-> prints "hello world"\fR +o foo \fI\(-> error "unknown method foo"\fR +o Foo Bar \fI\(-> error "unknown method Foo"\fR +\fBoo::objdefine\fR o \fBrenamemethod\fR bar lollipop +o lollipop \fI\(-> prints "hello world"\fR +.CE +.SH "SEE ALSO" +next(n), oo::class(n), oo::object(n) +.SH KEYWORDS +class, definition, method, object + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/info.n b/doc/info.n index 2fb697f..3072d13 100644 --- a/doc/info.n +++ b/doc/info.n @@ -3,11 +3,12 @@ '\" Copyright (c) 1994-1997 Sun Microsystems, Inc. '\" Copyright (c) 1993-1997 Bell Labs Innovations for Lucent Technologies '\" Copyright (c) 1998-2000 Ajuba Solutions +'\" Copyright (c) 2007-2008 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.25 2008/03/12 20:16:13 andreas_kupries Exp $ +'\" RCS: @(#) $Id: info.n,v 1.26 2008/05/31 11:42:12 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -34,6 +35,11 @@ Tcl command procedure. Returns the body of procedure \fIprocname\fR. \fIProcname\fR must be the name of a Tcl command procedure. .TP +\fBinfo class\fI subcommand class\fR ?\fIarg ...\fR +. +Returns information about the class, \fIclass\fR. The \fIsubcommand\fRs are +described in \fBCLASS INTROSPECTION\fR below. +.TP \fBinfo cmdcount\fR Returns a count of the total number of commands that have been invoked in this interpreter. @@ -263,6 +269,11 @@ Returns the full path name of the binary file from which the application was invoked. If Tcl was unable to identify the file, then an empty string is returned. .TP +\fBinfo object\fI subcommand object\fR ?\fIarg ...\fR +. +Returns information about the object, \fIobject\fR. The \fIsubcommand\fRs are +described in \fBOBJECT INTROSPECTION\fR below. +.TP \fBinfo patchlevel\fR Returns the value of the global variable \fBtcl_patchLevel\fR; see the \fBtclvars\fR manual entry for more information. @@ -321,7 +332,174 @@ Note that a currently-visible variable may not yet .QW exist if it has not been set (e.g. a variable declared but not set by \fBvariable\fR). -.SH EXAMPLE +.SS "CLASS INTROSPECTION" +.PP +The following \fIsubcommand\fR values are supported by \fBinfo class\fR: +.TP +\fBinfo class constructor\fI class\fR +. +This subcommand returns a description of the definition of the constructor of +class \fIclass\fR. The defintion is described as a two element list; the first +element is the list of arguments to the constructor in a form suitable for +passing to another call to \fBproc\fR or a method defintion, and the second +element is the body of the constructor. If no constructor is present, this +returns the empty list. +.TP +\fBinfo class definition\fI class method\fR +. +This subcommand returns a description of the definition of the method named +\fImethod\fR of class \fIclass\fR. The defintion is described as a two element +list; the first element is the list of arguments to the method in a form +suitable for passing to another call to \fBproc\fR or a method defintion, and +the second element is the body of the method. +.TP +\fBinfo class destructor\fI class\fR +. +This subcommand returns the body of the destructor of class \fIclass\fR. If no +destructor is present, this returns the empty string. +.TP +\fBinfo class filters\fI class\fR +. +This subcommand returns the list of filter methods set on the class. +.TP +\fBinfo class forward\fI class method\fR +. +This subcommand returns the argument list for the method forwarding called +\fImethod\fR that is set on the class called \fIclass\fR. +.TP +\fBinfo class instances\fI class\fR ?\fIpattern\fR? +. +This subcommand returns a list of instances of class \fIclass\fR. If the +optional \fIpattern\fR argument is present, it constrains the list of returned +instances to those that match it according to the rules of \fBstring match\fR. +.TP +\fBinfo class methods\fI class\fR ?\fIoptions...\fR? +. +This subcommand returns a list of all public (i.e. exported) methods of the +class called \fIclass\fR. Any of the following \fIoption\fRs may be +specified, controlling exactly which method names are returned: +.RS +.TP +\fB\-all\fR +. +If the \fB\-all\fR flag is given, the list of methods will include those +methods defined not just by the class, but also by the class's superclasses +and mixins. +.TP +\fB\-private\fR +. +If the \fB\-private\fR flag is given, the list of methods will also include +the private (i.e. non-exported) methods of the class (and superclasses and +mixins, if \fB\-all\fR is also given). +.RE +.TP +\fBinfo class mixins\fI class\fR +. +This subcommand returns a list of all classes that have been mixed into the +class named \fIclass\fR. +.TP +\fBinfo class subclasses\fI class\fR ?\fIpattern\fR? +. +This subcommand returns a list of direct subclasses of class \fIclass\fR. If +the optional \fIpattern\fR argument is present, it constrains the list of +returned classes to those that match it according to the rules of \fBstring +match\fR. +.TP +\fBinfo class superclasses\fI class\fR +. +This subcommand returns a list of direct superclasses of class \fIclass\fR in +inheritance precedence order. +.SS "OBJECT INTROSPECTION" +.PP +The following \fIsubcommand\fR values are supported by \fBinfo object\fR: +.TP +\fBinfo object class\fI object\fR ?\fIclassName\fR? +. +If \fIclassName\fR is unspecified, this subcommand returns class of the +\fIobject\fR object. If \fIclassName\fR is present, this subcommand returns a +boolean value indicating whether the \fIobject\fR is of that class. +.TP +\fBinfo object definition\fI object method\fR +. +This subcommand returns a description of the definition of the method named +\fImethod\fR of object \fIobject\fR. The defintion is described as a two +element list; the first element is the list of arguments to the method in a +form suitable for passing to another call to \fBproc\fR or a method defintion, +and the second element is the body of the method. +.TP +\fBinfo object filters\fI object\fR +. +This subcommand returns the list of filter methods set on the object. +.TP +\fBinfo object forward\fI object method\fR +. +This subcommand returns the argument list for the method forwarding called +\fImethod\fR that is set on the object called \fIobject\fR. +.TP +\fBinfo object isa\fI category object\fR ?\fIarg\fR? +. +This subcommand tests whether an object belongs to a particular category, +returning a boolean value that indicates whether the \fIobject\fR argument +meets the criteria for the category. The supported categories are: +.RS +.TP +\fBinfo object isa class\fI object\fR +. +This returns whether \fIobject\fR is a class (i.e. an instance of +\fBoo::class\fR or one of its subclasses). +.TP +\fBinfo object isa metaclass\fI object\fR +. +This returns whether \fIobject\fR is a class that can manufacture classes +(i.e. is \fBoo::class\fR or a subclass of it). +.TP +\fBinfo object isa mixin\fI object class\fR +. +This returns whether \fIclass\fR is directly mixed into \fIobject\fR. +.TP +\fBinfo object isa object\fI object\fR +. +This returns whether \fIobject\fR really is an object. +.TP +\fBinfo object isa typeof\fI object class\fR +. +This returns whether \fIclass\fR is the type of \fIobject\fR (i.e. whether +\fIobject\fR is an instance of \fIclass\fR or one of its subclasses, whether +direct or indirect). +.RE +.TP +\fBinfo object methods\fI object\fR ?\fIoption...\fR? +. +This subcommand returns a list of all public (i.e. exported) methods of the +object called \fIobject\fR. Any of the following \fIoption\fRs may be +specified, controlling exactly which method names are returned: +.RS +.TP +\fB\-all\fR +. +If the \fB\-all\fR flag is given, the list of methods will include those +methods defined not just by the object, but also by the object's class and +mixins, plus the superclasses of those classes. +.TP +\fB\-private\fR +. +If the \fB\-private\fR flag is given, the list of methods will also include +the private (i.e. non-exported) methods of the object (and classes, if +\fB\-all\fR is also given). +.RE +.TP +\fBinfo object mixins\fI object\fR +. +This subcommand returns a list of all classes that have been mixed into the +object named \fIobject\fR. +.TP +\fBinfo object vars\fI object\fR ?\fIpattern\fR? +. +This subcommand returns a list of all variables in the private namespace of +the object named \fIobject\fR. If the optional \fIpattern\fR argument is +given, it is a filter (in the syntax of a \fBstring match\fR glob pattern) +that constrains the list of variables returned. +.SH EXAMPLES This command prints out a procedure suitable for saving in a Tcl script: .PP @@ -341,10 +519,44 @@ proc printProc {procName} { puts [lappend result $formals [\fBinfo body\fR $procName]] } .CE +.SS "EXAMPLES WITH OBJECTS" +.PP +Every object necessarily knows what its class is; this information is +trivially extractable through introspection: +.CS +oo::class create c +c create o +puts [\fBinfo object class\fR o] + \fI\(-> prints "::c"\fR +puts [\fBinfo object class\fR c] + \fI\(-> prints "::oo::class"\fR +.CE +.PP +The introspection capabilities can be used to discover what class implements a +method and get how it is defined. This procedure illustrates how: +.CS +proc getDef {obj method} { + if {$method in [\fBinfo object methods\fR $obj]} { + # Assume no forwards + return [\fBinfo object definition\fR $obj $method] + } + set cls [\fBinfo object class\fR $obj] + while {$method ni [\fBinfo class methods\fR $cls]} { + # Assume the simple case + set cls [lindex [\fBinfo class superclass\fR $cls] 0] + if {$cls eq {}} { + error "no definition for $method" + } + } + # Assume no forwards + return [\fBinfo class definition\fR $cls $method] +} +.CE .SH "SEE ALSO" -global(n), proc(n) +global(n), oo::class(n), oo::object(n), proc(n), self(n) .SH KEYWORDS -command, information, interpreter, level, namespace, procedure, variable +command, information, interpreter, introspection, level, namespace, object, +procedure, variable .\" Local Variables: .\" mode: nroff .\" End: diff --git a/doc/my.n b/doc/my.n new file mode 100644 index 0000000..75d7bac --- /dev/null +++ b/doc/my.n @@ -0,0 +1,56 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: my.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" +.so man.macros +.TH my n 0.1 TclOO "TclOO Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +my \- invoke any method of current object +.SH SYNOPSIS +.nf +package require TclOO + +\fBmy\fI methodName\fR ?\fIarg ...\fR? +.fi +.BE + +.SH DESCRIPTION +The \fBmy\fR command is used to allow methods of objects to invoke any method +of the object (or its class). In particular, the set of valid values for +\fImethodName\fR is the set of all methods supported by an object and its +superclasses, including those that are not exported. The object upon which the +method is invoked is always the one that is the current context of the method +(i.e. the object that is returned by \fBself object\fR) from which the +\fBmy\fR command is invoked. +.PP +Each object has its own \fBmy\fR command, contained in its unique namespace. +.SH EXAMPLES +This example shows basic use of \fBmy\fR to use the \fBvariables\fR method of +the \fBoo::object\fR class, which is not publically visible by default: +.CS +oo::class create c { + method count {} { + \fBmy\fR variable counter + print [incr counter] + } +} +c create o +o count \fI\(-> prints "1"\fR +o count \fI\(-> prints "2"\fR +o count \fI\(-> prints "3"\fR +.CE +.SH "SEE ALSO" +next(n), oo::object(n), self(n) +.SH KEYWORDS +method, method visibility, object, private method, public method + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/next.n b/doc/next.n new file mode 100644 index 0000000..a312764 --- /dev/null +++ b/doc/next.n @@ -0,0 +1,195 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: next.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" +.so man.macros +.TH next n 0.1 TclOO "TclOO Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +next \- invoke superclass method implementations +.SH SYNOPSIS +.nf +package require TclOO + +\fBnext\fR ?\fIarg ...\fR? +.fi +.BE + +.SH DESCRIPTION +.PP +The \fBnext\fR command is used to call implementations of a method by a class, +superclass or mixin that are overridden by the current method. It can only be +used from within a method. It is also used within filters to indicate the +point where a filter calls the actual implementation (the filter may decide to +not go along the chain, and may process the results of going along the chain +of methods as it chooses). The result of the \fBnext\fR command is the result +of the next method in the method chain; if there are no further methods in the +method chain, the result of \fBnext\fR is the empty string. The arguments, +\fIarg\fR, to \fBnext\fR are the arguments to pass to the next method in the +chain. +.SH "THE METHOD CHAIN" +.PP +When a method of an object is invoked, things happen in several stages: +.IP [1] +The structure of the object, its class, superclasses, filters, and mixins, are +examined to build a \fImethod chain\fR, which contains a list of method +implementations to invoke. +.IP [2] +The first method implementation on the chain is invoked. +.IP [3] +If that method implementation invokes the \fBnext\fR command, the next method +implementation is invoked (with its arguments being those that were passed to +\fBnext\fR). +.IP [4] +The result from the overall method call is the result from the outermost +method implementation; inner method implementations return their results +through \fBnext\fR. +.IP [5] +The method chain is cached for future use. +.SS "METHOD SEARCH ORDER" +.PP +When constructing the method chain, method implementations are searched for in +the following order: +.IP [1] +In the object. +.IP [2] +In the classes mixed into the object, in class traversal order. The list of +mixins is checked in natural order. +.IP [3] +In the classes mixed into the classes of the object, with sources of mixing in +being searched in class traversal order. Within each class, the list of mixins +is processed in natural order. +.IP [4] +In the object's class. +.IP [5] +In the superclasses of the class, following each superclass in a depth-first +fashion in the natural order of the superclass list. +.PP +Any particular method implementation always comes as \fIlate\fR in the +resulting list of implementations as possible. +.SS FILTERS +.PP +When an object has a list of filter names set upon it, or is an instance of a +class (or has mixed in a class) that has a list of filter names set upon it, +before every invokation of any method the filters are processed. Filter +implementations are found in class traversal order, as are the lists of filter +names (each of which is traversed in natural list order). Explicitly invoking +a method used as a filter will cause that method to be invoked twice, once as +a filter and once as a normal method. +.PP +Each filter should decide for itself whether to permit the execution to go +forward to the proper implementation of the method (which it does by invoking +the \fBnext\fR command as filters are inserted into the front of the method +call chain) and is responsible for returning the result of \fBnext\fR. +.PP +Filters are not invoked when processing an invokation of the \fBunknown\fR +method because of a failure to locate a method implementation, or when +invoking either constructors or destructors. +.SH EXAMPLES +.PP +This example demonstrates how to use the \fBnext\fR command to call the +(super)class's implementation of a method. The script: +.CS +oo::class create theSuperclass { + method example {args} { + puts "in the superclass, args = $args" + } +} +oo::class create theSubclass { + superclass theSuperclass + method example {args} { + puts "before chaining from subclass, args = $args" + \fBnext\fR a {*}$args b + \fBnext\fR pureSynthesis + puts "after chaining from subclass" + } +} +theSubclass create obj +oo::define obj method example args { + puts "per-object method, args = $args" + \fBnext\fR x {*}$args y + \fBnext\fR +} +obj example 1 2 3 +.CE +prints the following: +.CS +per-object method, args = 1 2 3 +before chaining from subclass, args = x 1 2 3 y +in the superclass, args = a x 1 2 3 y b +in the superclass, args = pureSynthesis +after chaining from subclass +before chaining from subclass, args = +in the superclass, args = a b +in the superclassm args = pureSynthesis +after chaining from subclass +.CE +.PP +This example demonstrates how to build a simple cache class that applies +memoization to all the method calls of the objects it is mixed into, and shows +how it can make a difference to computation times: +.PP +.CS +oo::class create cache { + filter Memoize + method Memoize args { + \fI# Do not filter the core method implementations\fR + if {[lindex [self target] 0] eq "::oo::object"} { + return [\fBnext\fR {*}$args] + } + + \fI# Check if the value is already in the cache\fR + my variable ValueCache + set key [self target],$args + if {[info exist ValueCache($key)]} { + return $ValueCache($key) + } + + \fI# Compute value, insert into cache, and return it\fR + return [set ValueCache($key) [\fBnext\fR {*}$args]] + } + method flushCache {} { + my variable ValueCache + unset ValueCache + \fI# Skip the cacheing\fR + return -level 2 "" + } +} + +oo::object create demo +oo::define demo { + mixin cache + method compute {a b c} { + after 3000 \fI;# Simulate deep thought\fR + return [expr {$a + $b * $c}] + } + method compute2 {a b c} { + after 3000 \fI;# Simulate deep thought\fR + return [expr {$a * $b + $c}] + } +} + +puts [demo compute 1 2 3] \fI\(-> prints "7" after delay\fR +puts [demo compute2 4 5 6] \fI\(-> prints "26" after delay\fR +puts [demo compute 1 2 3] \fI\(-> prints "7" instantly\fR +puts [demo compute2 4 5 6] \fI\(-> prints "26" instantly\fR +puts [demo compute 4 5 6] \fI\(-> prints "34" after delay\fR +puts [demo compute 4 5 6] \fI\(-> prints "34" instantly\fR +puts [demo compute 1 2 3] \fI\(-> prints "7" instantly\fR +demo flushCache +puts [demo compute 1 2 3] \fI\(-> prints "7" after delay\fR +.CE +.SH "SEE ALSO" +oo::class(n), oo::define(n), oo::object(n), self(n) +.SH KEYWORDS +call, method, method chain + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/object.n b/doc/object.n new file mode 100644 index 0000000..79038db --- /dev/null +++ b/doc/object.n @@ -0,0 +1,101 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: object.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" +.so man.macros +.TH object n 0.1 TclOO "TclOO Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +oo::object \- root class of the class hierarchy +.SH SYNOPSIS +.nf +package require TclOO + +\fBoo::object\fI method \fR?\fIarg ...\fR? +.fi +.SH "CLASS HIERARCHY" +.nf +\fBoo::object\fR +.fi +.BE + +.SH DESCRIPTION +The \fBoo::object\fR class is the root class of the object hierarchy; every +object (and hence every class) is an instance of this class. Objects are +always referred to by their name, and may be \fBrename\fRd while maintaining +their identity. Each object has a unique namespace associated with it. +Instances of objects may be made with either the \fBcreate\fR or \fBnew\fR +methods of the \fBoo::object\fR object itself, or by invoking those methods on +any of the subclass objects; see \fBoo::class\fR for more details. +.SS CONSTRUCTOR +The \fBoo::object\fR class does not define an explicit constructor. +.SS DESTRUCTOR +The \fBoo::object\fR class does not define an explicit destructor. +.SS "EXPORTED METHODS" +The \fBoo::object\fR class supports the following exported methods: +.TP +\fIobj \fBdestroy\fR +. +This method destroys the object, \fIobj\fR, that it is invoked upon, invoking +any destructors on the object's class in the process. It is equivalent to +using \fBrename\fR to delete the object command. The result of this method is +always the empty string. +.SS "NON-EXPORTED METHODS" +The \fBoo::object\fR class supports the following non-exported methods: +.TP +\fIobj \fBeval\fR ?\fIarg ...\fR? +. +This method concatenates the arguments, \fIarg\fR, as if with \fBconcat\fR, +and then evaluates the resulting script in the namespace that is uniquely +associated with \fIobj\fR, returning the result of the evaluation. +.TP +\fIobj \fBunknown \fImethodName\fR ?\fIarg ...\fR? +. +This method is called when an attempt to invoke the method \fImethodName\fR on +object \fIobj\fR fails. The arguments that the user supplied to the method are +given as \fIarg\fR argments. The default implementation (i.e. the one defined +by the \fBoo::object\fR class) generates a suitable error, detailing what +methods the object supports given whether the object was invoked by its public +name or through the \fBmy\fR command. +.TP +\fIobj \fBvariable \fIvarName \fR?\fIvarName ...\fR? +. +This method arranges for each variable called \fIvarName\fR to be linked from +the object \fIobj\fR's unique namespace into the caller's context. Thus, if it +is invoked from inside a procedure then the namespace variable in the object +is linked to the local variable in the procedure. Each \fIvarName\fR argument +must not have any namespace separators in it. The result is the empty string. +.TP +\fIobj \fBvarname \fIvarName\fR +. +This method returns the globally qualified name of the variable \fIvarName\fR +in the unique namespace for the object \fIobj\fR. +.SH EXAMPLES +This example demonstrates basic use of an object. +.CS +set obj [\fBoo::object\fR new] +$obj foo \fI\(-> error "unknown method foo"\fR +oo::define $obj method foo {} { + my \fBvariable\fR count + puts "bar[incr count]" +} +$obj foo \fI\(-> prints "bar1"\fR +$obj foo \fI\(-> prints "bar2"\fR +$obj variable count \fI\(-> error "unknown method variable"\fR +$obj \fBdestroy\fR +$obj foo \fI\(-> error "unknown command obj"\fR +.CE +.SH "SEE ALSO" +my(n), oo::class(n) +.SH KEYWORDS +base class, class, object, root class + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/self.n b/doc/self.n new file mode 100644 index 0000000..2c66edb --- /dev/null +++ b/doc/self.n @@ -0,0 +1,111 @@ +'\" +'\" Copyright (c) 2007 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: self.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" +.so man.macros +.TH self n 0.1 TclOO "TclOO Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +self \- method call internal introspection +.SH SYNOPSIS +.nf +package require TclOO + +\fBself\fR ?\fIsubcommand\fR? +.fi +.BE + +.SH DESCRIPTION +The \fBself\fR command, which should only be used from within the context of a +call to a method (i.e. inside a method, constructor or destructor body) is +used to allow the method to discover information about how it was called. It +takes an argument, \fIsubcommand\fR, that tells it what sort of information is +actually desired; if omitted the result will be the same as if \fBself +object\fR was invoked. The supported subcommands are: +.TP +\fBself caller\fR +. +When the method was invoked from inside another object method, this subcommand +returns a three element list describing the containing object and method. The +first element describes the declaring object or class of the method, the +second element is the name of the object on which the containing method was +invoked, and the third element is the name of the method (with the strings +\fB\fR and \fB\fR indicating constructors and +destructors respectively). +.TP +\fBself class\fR +. +This returns the name of the class or object that the current method was +defined within. Note that this will change as the chain of method +implementations is traversed with \fBnext\fR. +.TP +\fBself filter\fR +. +When invoked inside a filter, this subcommand returns a three element list +describing the filter. The first element gives the name of the object or class +that declared the filter (note that this may be different from the object or +class that provided the implementation of the filter), the second element is +either \fBobject\fR or \fBclass\fR depending on whether the declaring entity +was an object or class, and the third element is the name of the filter. +.TP +\fBself method\fR +. +This returns the name of the current method (with the strings +\fB\fR and \fB\fR indicating constructors and +destructors respectively). +.TP +\fBself namespace\fR +. +This returns the name of the unique namespace of the object that the method +was invoked upon. +.TP +\fBself next\fR +. +When invoked from a method that is not at the end of a call chain (i.e. where +the \fBnext\fR command will invoke an actual method implementation), this +subcommand returns a two element list describing the next element in the +method call chain; the first element is the name of the class or object that +declares the next part of the call chain, and the second element is the name +of the method (with the strings \fB\fR and \fB\fR +indicating constructors and destructors respectively). If invoked from a +method that is at the end of a call chain, this subcommand returns the emtpy +string. +.TP +\fBself object\fR +. +This returns the name of the object that the method was invoked upon. +.TP +\fBself target\fR +. +When invoked inside a filter implementation, this subcommand returns a two +element list describing the method being filtered. The first element will be +the name of the declarer of the method, and the second element will be the +actual name of the method. +.SH EXAMPLES +This example shows basic use of \fBself\fR to provide information about the +current object: +.CS +oo::class create c { + method foo {} { + puts "this is the [\fBself\fR] object" + } +} +c create a +c create b +a foo \fI\(-> prints "this is the ::a object"\fR +b foo \fI\(-> prints "this is the ::b object"\fR +.CE +.SH "SEE ALSO" +info(n), next(n) +.SH KEYWORDS +call, introspection, object + +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 4b7593a..0a45567 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.298 2008/05/02 20:08:51 patthoyts Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.299 2008/05/31 11:42:13 dkf Exp $ */ #include "tclInt.h" @@ -815,6 +815,10 @@ Tcl_CreateInterp(void) Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); } + if (TclOOInit(interp) != TCL_OK) { + Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); + } + return interp; } diff --git a/generic/tclInt.h b/generic/tclInt.h index eab070c..3ec57b4 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.368 2008/05/09 04:58:54 georgeps Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.369 2008/05/31 11:42:14 dkf Exp $ */ #ifndef _TCLINT @@ -1058,6 +1058,14 @@ typedef struct CallFrame { #define FRAME_IS_PROC 0x1 #define FRAME_IS_LAMBDA 0x2 +#define FRAME_IS_METHOD 0x4 /* The frame is a method body, and the frame's + * clientData field contains a CallContext + * reference. Part of TIP#257. */ +#define FRAME_IS_OO_DEFINE 0x8 /* The frame is part of the inside workings of + * the [oo::define] command; the clientData + * field contains an Object reference that has + * been confirmed to refer to a class. Part of + * TIP#257. */ /* * TIP #280 @@ -1878,6 +1886,15 @@ typedef struct Interp { * TclpCheckStackSpace in the platform's * directory. */ + /* + * The pointer to the object system root ekeko. c.f. TIP #257. + */ + + void *objectFoundation; /* Pointer to the Foundation structure of the + * object system, which contains things like + * references to key namespaces. See + * tclOOInt.h and tclOO.c for real definition + * and setup. */ #ifdef TCL_COMPILE_STATS /* diff --git a/generic/tclOO.c b/generic/tclOO.c new file mode 100644 index 0000000..de0b36b --- /dev/null +++ b/generic/tclOO.c @@ -0,0 +1,2179 @@ +/* + * tclOO.c -- + * + * This file contains the object-system core (NB: not Tcl_Obj, but ::oo) + * + * Copyright (c) 2005-2008 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOO.c,v 1.4 2008/05/31 11:42:16 dkf Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclInt.h" +#include "tclOOInt.h" + +/* + * Commands in oo::define. + */ + +static const struct { + const char *name; + Tcl_ObjCmdProc *objProc; + int flag; +} defineCmds[] = { + {"constructor", TclOODefineConstructorObjCmd, 0}, + {"deletemethod", TclOODefineDeleteMethodObjCmd, 0}, + {"destructor", TclOODefineDestructorObjCmd, 0}, + {"export", TclOODefineExportObjCmd, 0}, + {"filter", TclOODefineFilterObjCmd, 0}, + {"forward", TclOODefineForwardObjCmd, 0}, + {"method", TclOODefineMethodObjCmd, 0}, + {"mixin", TclOODefineMixinObjCmd, 0}, + {"renamemethod", TclOODefineRenameMethodObjCmd, 0}, + {"self", TclOODefineSelfObjCmd, 0}, + {"superclass", TclOODefineSuperclassObjCmd, 0}, + {"unexport", TclOODefineUnexportObjCmd, 0}, + {NULL, NULL, 0} +}, objdefCmds[] = { + {"class", TclOODefineClassObjCmd, 1}, + {"deletemethod", TclOODefineDeleteMethodObjCmd, 1}, + {"export", TclOODefineExportObjCmd, 1}, + {"filter", TclOODefineFilterObjCmd, 1}, + {"forward", TclOODefineForwardObjCmd, 1}, + {"method", TclOODefineMethodObjCmd, 1}, + {"mixin", TclOODefineMixinObjCmd, 1}, + {"renamemethod", TclOODefineRenameMethodObjCmd, 1}, + {"unexport", TclOODefineUnexportObjCmd, 1}, + {NULL, NULL, 0} +}; + +/* + * What sort of size of things we like to allocate. + */ + +#define ALLOC_CHUNK 8 + +/* + * Function declarations for things defined in this file. + */ + +static Class * AllocClass(Tcl_Interp *interp, Object *useThisObj); +static Object * AllocObject(Tcl_Interp *interp, const char *nameStr, + const char *nsNameStr); +static int CloneClassMethod(Tcl_Interp *interp, Class *clsPtr, + Method *mPtr, Tcl_Obj *namePtr, + Method **newMPtrPtr); +static int CloneObjectMethod(Tcl_Interp *interp, Object *oPtr, + Method *mPtr, Tcl_Obj *namePtr); +static void InitFoundation(Tcl_Interp *interp); +static void KillFoundation(ClientData clientData, + Tcl_Interp *interp); +static void ObjectNamespaceDeleted(ClientData clientData); +static void ObjectRenamedTrace(ClientData clientData, + Tcl_Interp *interp, const char *oldName, + const char *newName, int flags); +static void ReleaseClassContents(Tcl_Interp *interp,Object *oPtr); + +static int PublicObjectCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +static int PrivateObjectCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); + +/* + * Methods in the oo::object and oo::class classes. First, we define a helper + * macro that makes building the method type declaration structure a lot + * easier. No point in making life harder than it has to be! + * + * Note that the core methods don't need clone or free proc callbacks. + */ + +#define DCM(name,visibility,proc) \ + {name,visibility,\ + {TCL_OO_METHOD_VERSION_CURRENT,"core method: "#name,proc,NULL,NULL}} + +static const DeclaredClassMethod objMethods[] = { + DCM("destroy", 1, TclOO_Object_Destroy), + DCM("eval", 0, TclOO_Object_Eval), + DCM("unknown", 0, TclOO_Object_Unknown), + DCM("variable", 0, TclOO_Object_LinkVar), + DCM("varname", 0, TclOO_Object_VarName), + {NULL} +}, clsMethods[] = { + DCM("create", 1, TclOO_Class_Create), + DCM("new", 1, TclOO_Class_New), + DCM("createWithNamespace", 0, TclOO_Class_CreateNs), + {NULL} +}; + +static char initScript[] = + "namespace eval ::oo { variable version " TCLOO_VERSION " };" + "namespace eval ::oo { variable patchlevel " TCLOO_PATCHLEVEL " };"; +/* "tcl_findLibrary tcloo $oo::version $oo::version" */ +/* " tcloo.tcl OO_LIBRARY oo::library;"; */ + +extern struct TclOOStubAPI tclOOStubAPI; + +/* + * Convenience macro for getting the foundation from an interpreter. + */ + +#define GetFoundation(interp) \ + ((Foundation *)((Interp *)(interp))->objectFoundation) + +/* + * ---------------------------------------------------------------------- + * + * TclOOInit -- + * + * Called to initialise the OO system within an interpreter. + * + * Result: + * TCL_OK if the setup succeeded. Currently assumed to always work. + * + * Side effects: + * Creates namespaces, commands, several classes and a number of + * callbacks. Upon return, the OO system is ready for use. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOInit( + Tcl_Interp *interp) /* The interpreter to install into. */ +{ + /* + * Build the core of the OO system. + */ + + InitFoundation(interp); + + /* + * Run our initialization script and, if that works, declare the package + * to be fully provided. + */ + + if (Tcl_Eval(interp, initScript) != TCL_OK) { + return TCL_ERROR; + } + + return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION, &tclOOStubAPI); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOGetFoundation -- + * + * Get a reference to the OO core class system. + * + * ---------------------------------------------------------------------- + */ + +Foundation * +TclOOGetFoundation( + Tcl_Interp *interp) +{ + return GetFoundation(interp); +} + +/* + * ---------------------------------------------------------------------- + * + * InitFoundation -- + * + * Set up the core of the OO core class system. This is a structure + * holding references to the magical bits that need to be known about in + * other places, plus the oo::object and oo::class classes. + * + * ---------------------------------------------------------------------- + */ + +static void +InitFoundation( + Tcl_Interp *interp) +{ + static Tcl_ThreadDataKey tsdKey; + ThreadLocalData *tsdPtr = + Tcl_GetThreadData(&tsdKey, sizeof(ThreadLocalData)); + Foundation *fPtr = (Foundation *) ckalloc(sizeof(Foundation)); + Tcl_Obj *namePtr, *argsPtr, *bodyPtr; + Tcl_DString buffer; + int i; + + /* + * Initialize the structure that holds the OO system core. This is + * attached to the interpreter via an assocData entry; not very efficient, + * but the best we can do without hacking the core more. + */ + + memset(fPtr, 0, sizeof(Foundation)); + ((Interp *) interp)->objectFoundation = fPtr; + fPtr->interp = interp; + fPtr->ooNs = Tcl_CreateNamespace(interp, "::oo", fPtr, NULL); + Tcl_Export(interp, fPtr->ooNs, "[a-z]*", 1); + fPtr->defineNs = Tcl_CreateNamespace(interp, "::oo::define", NULL, NULL); + fPtr->objdefNs = Tcl_CreateNamespace(interp, "::oo::objdefine", NULL, + NULL); + fPtr->helpersNs = Tcl_CreateNamespace(interp, "::oo::Helpers", NULL, + NULL); + fPtr->epoch = 0; + fPtr->tsdPtr = tsdPtr; + fPtr->unknownMethodNameObj = Tcl_NewStringObj("unknown", -1); + fPtr->constructorName = Tcl_NewStringObj("", -1); + fPtr->destructorName = Tcl_NewStringObj("", -1); + Tcl_IncrRefCount(fPtr->unknownMethodNameObj); + Tcl_IncrRefCount(fPtr->constructorName); + Tcl_IncrRefCount(fPtr->destructorName); + Tcl_CreateObjCommand(interp, "::oo::UnknownDefinition", + TclOOUnknownDefinition, NULL, NULL); + namePtr = Tcl_NewStringObj("::oo::UnknownDefinition", -1); + Tcl_SetNamespaceUnknownHandler(interp, fPtr->defineNs, namePtr); + Tcl_SetNamespaceUnknownHandler(interp, fPtr->objdefNs, namePtr); + + /* + * Create the subcommands in the oo::define and oo::objdefine spaces. + */ + + Tcl_DStringInit(&buffer); + for (i=0 ; defineCmds[i].name ; i++) { + Tcl_DStringAppend(&buffer, "::oo::define::", 14); + Tcl_DStringAppend(&buffer, defineCmds[i].name, -1); + Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer), + defineCmds[i].objProc, (void *) defineCmds[i].flag, NULL); + Tcl_DStringFree(&buffer); + } + for (i=0 ; objdefCmds[i].name ; i++) { + Tcl_DStringAppend(&buffer, "::oo::objdefine::", 17); + Tcl_DStringAppend(&buffer, objdefCmds[i].name, -1); + Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer), + objdefCmds[i].objProc, (void *) objdefCmds[i].flag, NULL); + Tcl_DStringFree(&buffer); + } + + Tcl_CallWhenDeleted(interp, KillFoundation, NULL); + + /* + * Create the objects at the core of the object system. These need to be + * spliced manually. + */ + + fPtr->objectCls = AllocClass(interp, + AllocObject(interp, "::oo::object", NULL)); + fPtr->classCls = AllocClass(interp, + AllocObject(interp, "::oo::class", NULL)); + fPtr->objectCls->thisPtr->selfCls = fPtr->classCls; + fPtr->objectCls->thisPtr->flags |= ROOT_OBJECT; + fPtr->objectCls->superclasses.num = 0; + ckfree((char *) fPtr->objectCls->superclasses.list); + fPtr->objectCls->superclasses.list = NULL; + fPtr->classCls->thisPtr->selfCls = fPtr->classCls; + TclOOAddToInstances(fPtr->objectCls->thisPtr, fPtr->classCls); + TclOOAddToInstances(fPtr->classCls->thisPtr, fPtr->classCls); + + /* + * Basic method declarations for the core classes. + */ + + for (i=0 ; objMethods[i].name ; i++) { + TclOONewBasicMethod(interp, fPtr->objectCls, &objMethods[i]); + } + for (i=0 ; clsMethods[i].name ; i++) { + TclOONewBasicMethod(interp, fPtr->classCls, &clsMethods[i]); + } + + /* + * Finish setting up the class of classes by marking the 'new' method as + * private; classes, unlike general objects, must have explicit names. We + * also need to create the constructor for classes. + */ + + namePtr = Tcl_NewStringObj("new", -1); + Tcl_NewInstanceMethod(interp, (Tcl_Object) fPtr->classCls->thisPtr, + namePtr /* keeps ref */, 0 /* ==private */, NULL, NULL); + + argsPtr = Tcl_NewStringObj("{definitionScript {}}", -1); + bodyPtr = Tcl_NewStringObj( + "if {[catch {define [self] $definitionScript} msg opt]} {\n" + "set ei [split [dict get $opt -errorinfo] \\n]\n" + "dict set opt -errorinfo [join [lrange $ei 0 end-2] \\n]\n" + "dict set opt -errorline 0xdeadbeef\n" + "}\n" + "return -options $opt $msg", -1); + fPtr->classCls->constructorPtr = TclOONewProcMethod(interp, + fPtr->classCls, 0, NULL, argsPtr, bodyPtr, NULL); + + /* + * Create non-object commands and plug ourselves into the Tcl [info] + * ensemble. + */ + + Tcl_CreateObjCommand(interp, "::oo::Helpers::next", TclOONextObjCmd, NULL, + NULL); + Tcl_CreateObjCommand(interp, "::oo::Helpers::self", TclOOSelfObjCmd, NULL, + NULL); + Tcl_CreateObjCommand(interp, "::oo::define", TclOODefineObjCmd, NULL, + NULL); + Tcl_CreateObjCommand(interp, "::oo::objdefine", TclOOObjDefObjCmd, NULL, + NULL); + Tcl_CreateObjCommand(interp, "::oo::copy", TclOOCopyObjectCmd, NULL,NULL); + TclOOInitInfo(interp); +} + +/* + * ---------------------------------------------------------------------- + * + * KillFoundation -- + * + * Delete those parts of the OO core that are not deleted automatically + * when the objects and classes themselves are destroyed. + * + * ---------------------------------------------------------------------- + */ + +static void +KillFoundation( + ClientData clientData, /* Pointer to the OO system foundation + * structure. */ + Tcl_Interp *interp) /* The interpreter containing the OO system + * foundation. */ +{ + Foundation *fPtr = GetFoundation(interp); + + Tcl_DecrRefCount(fPtr->unknownMethodNameObj); + Tcl_DecrRefCount(fPtr->constructorName); + Tcl_DecrRefCount(fPtr->destructorName); + ckfree((char *) fPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * AllocObject -- + * + * Allocate an object of basic type. Does not splice the object into its + * class's instance list. + * + * ---------------------------------------------------------------------- + */ + +static Object * +AllocObject( + Tcl_Interp *interp, /* Interpreter within which to create the + * object. */ + const char *nameStr, /* The name of the object to create, or NULL + * if the OO system should pick the object + * name itself (equal to the namespace + * name). */ + const char *nsNameStr) /* The name of the namespace to create, or + * NULL if the OO system should pick a unique + * name itself. If this is non-NULL but names + * a namespace that already exists, the effect + * will be the same as if this was NULL. */ +{ + Foundation *fPtr = GetFoundation(interp); + Tcl_DString buffer; + Object *oPtr; + int creationEpoch; + + oPtr = (Object *) ckalloc(sizeof(Object)); + memset(oPtr, 0, sizeof(Object)); + + /* + * Every object has a namespace; make one. Note that this also normally + * computes the creation epoch value for the object, a sequence number + * that is unique to the object (and which allows us to manage method + * caching without comparing pointers). + * + * When creating a namespace, we first check to see if the caller + * specified the name for the namespace. If not, we generate namespace + * names using the epoch until such time as a new namespace is actually + * created. + */ + + if (nsNameStr != NULL) { + oPtr->namespacePtr = Tcl_CreateNamespace(interp, nsNameStr, oPtr, + ObjectNamespaceDeleted); + if (oPtr->namespacePtr != NULL) { + creationEpoch = ++fPtr->tsdPtr->nsCount; + goto configNamespace; + } + Tcl_ResetResult(interp); + } + + while (1) { + char objName[10 + TCL_INTEGER_SPACE]; + + sprintf(objName, "::oo::Obj%d", ++fPtr->tsdPtr->nsCount); + oPtr->namespacePtr = Tcl_CreateNamespace(interp, objName, oPtr, + ObjectNamespaceDeleted); + if (oPtr->namespacePtr != NULL) { + creationEpoch = fPtr->tsdPtr->nsCount; + break; + } + + /* + * Could not make that namespace, so we make another. But first we + * have to get rid of the error message from Tcl_CreateNamespace, + * since that's something that should not be exposed to the user. + */ + + Tcl_ResetResult(interp); + } + + /* + * Make the namespace know about the helper commands. This grants access + * to the [self] and [next] commands. + */ + + configNamespace: + TclSetNsPath((Namespace *) oPtr->namespacePtr, 1, &fPtr->helpersNs); + + /* + * Fill in the rest of the non-zero/NULL parts of the structure. + */ + + oPtr->fPtr = fPtr; + oPtr->selfCls = fPtr->objectCls; + oPtr->creationEpoch = creationEpoch; + oPtr->refCount = 1; + oPtr->flags = USE_CLASS_CACHE; + + /* + * Finally, create the object commands and initialize the trace on the + * public command (so that the object structures are deleted when the + * command is deleted). + */ + + if (nameStr) { + if (nameStr[0] != ':' || nameStr[1] != ':') { + Tcl_DStringInit(&buffer); + Tcl_DStringAppend(&buffer, + Tcl_GetCurrentNamespace(interp)->fullName, -1); + Tcl_DStringAppend(&buffer, "::", 2); + Tcl_DStringAppend(&buffer, nameStr, -1); + oPtr->command = Tcl_CreateObjCommand(interp, + Tcl_DStringValue(&buffer), PublicObjectCmd, oPtr, NULL); + Tcl_DStringFree(&buffer); + } else { + oPtr->command = Tcl_CreateObjCommand(interp, nameStr, + PublicObjectCmd, oPtr, NULL); + } + } else { + oPtr->command = Tcl_CreateObjCommand(interp, + oPtr->namespacePtr->fullName, PublicObjectCmd, oPtr, NULL); + } + + /* + * Access the namespace command table directly when creating "my" to avoid + * a bottleneck in string manipulation. + */ + + { + register Command *cmdPtr = (Command *) ckalloc(sizeof(Command)); + + memset(cmdPtr, 0, sizeof(Command)); + cmdPtr->nsPtr = (Namespace *) oPtr->namespacePtr; + cmdPtr->hPtr = Tcl_CreateHashEntry(&cmdPtr->nsPtr->cmdTable, "my", + &creationEpoch /*ignored*/ ); + cmdPtr->refCount = 1; + cmdPtr->objProc = PrivateObjectCmd; + cmdPtr->objClientData = oPtr; + cmdPtr->proc = TclInvokeObjectCommand; + cmdPtr->clientData = cmdPtr; + Tcl_SetHashValue(cmdPtr->hPtr, cmdPtr); + } + + Tcl_TraceCommand(interp, TclGetString(TclOOObjectName(interp, oPtr)), + TCL_TRACE_RENAME|TCL_TRACE_DELETE, ObjectRenamedTrace, oPtr); + + return oPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * ObjectRenamedTrace -- + * + * This callback is triggered when the object is deleted by any + * mechanism. It runs the destructors and arranges for the actual cleanup + * of the object's namespace, which in turn triggers cleansing of the + * object data structures. + * + * ---------------------------------------------------------------------- + */ + +static void +ObjectRenamedTrace( + ClientData clientData, /* The object being deleted. */ + Tcl_Interp *interp, /* The interpreter containing the object. */ + const char *oldName, /* What the object was (last) called. */ + const char *newName, /* Always NULL. */ + int flags) /* Why was the object deleted? */ +{ + Object *oPtr = clientData; + Class *clsPtr; + + /* + * If this is a rename and not a delete of the object, we just flush the + * cache of the object name. + */ + + if (flags & TCL_TRACE_RENAME) { + if (oPtr->cachedNameObj) { + Tcl_DecrRefCount(oPtr->cachedNameObj); + oPtr->cachedNameObj = NULL; + } + return; + } + + /* + * Oh dear, the object really is being deleted. Handle this by running the + * destructors and deleting the object's namespace, which in turn causes + * the real object structures to be deleted. + */ + + AddRef(oPtr); + oPtr->flags |= OBJECT_DELETED; + if (!Tcl_InterpDeleted(interp)) { + CallContext *contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); + + if (contextPtr != NULL) { + int result; + Tcl_InterpState state; + + contextPtr->callPtr->flags |= DESTRUCTOR; + contextPtr->skip = 0; + state = Tcl_SaveInterpState(interp, TCL_OK); + result = TclOOInvokeContext(interp, contextPtr, 0, NULL); + if (result != TCL_OK) { + Tcl_BackgroundError(interp); + } + Tcl_RestoreInterpState(interp, state); + TclOODeleteContext(contextPtr); + } + } + + /* + * OK, the destructor's been run. Time to splat the class data (if any) + * and nuke the namespace (which triggers the final crushing of the object + * structure itself). + */ + + clsPtr = oPtr->classPtr; + if (clsPtr != NULL) { + AddRef(clsPtr); + ReleaseClassContents(interp, oPtr); + } + Tcl_DeleteNamespace(oPtr->namespacePtr); + if (clsPtr) { + DelRef(clsPtr); + } + DelRef(oPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * ReleaseClassContents -- + * + * Tear down the special class data structure, including deleting all + * dependent classes and objects. + * + * ---------------------------------------------------------------------- + */ + +static void +ReleaseClassContents( + Tcl_Interp *interp, /* The interpreter containing the class. */ + Object *oPtr) /* The object representing the class. */ +{ + int i, n; + Class *clsPtr = oPtr->classPtr, **list; + Object **insts; + + /* + * Must empty list before processing the members of the list so that + * things happen in the correct order even if something tries to play + * fast-and-loose. + */ + + list = clsPtr->mixinSubs.list; + n = clsPtr->mixinSubs.num; + clsPtr->mixinSubs.list = NULL; + clsPtr->mixinSubs.num = 0; + clsPtr->mixinSubs.size = 0; + for (i=0 ; iflags & OBJECT_DELETED) && interp != NULL) { + Tcl_DeleteCommandFromToken(interp, list[i]->thisPtr->command); + } + DelRef(list[i]); + } + if (list != NULL) { + ckfree((char *) list); + } + + list = clsPtr->subclasses.list; + n = clsPtr->subclasses.num; + clsPtr->subclasses.list = NULL; + clsPtr->subclasses.num = 0; + clsPtr->subclasses.size = 0; + for (i=0 ; iflags & OBJECT_DELETED) && interp != NULL) { + Tcl_DeleteCommandFromToken(interp, list[i]->thisPtr->command); + } + DelRef(list[i]); + } + if (list != NULL) { + ckfree((char *) list); + } + + insts = clsPtr->instances.list; + n = clsPtr->instances.num; + clsPtr->instances.list = NULL; + clsPtr->instances.num = 0; + clsPtr->instances.size = 0; + for (i=0 ; iflags & OBJECT_DELETED) && interp != NULL) { + Tcl_DeleteCommandFromToken(interp, insts[i]->command); + } + DelRef(insts[i]); + } + if (insts != NULL) { + ckfree((char *) insts); + } + + if (clsPtr->constructorChainPtr) { + TclOODeleteChain(clsPtr->constructorChainPtr); + } + if (clsPtr->destructorChainPtr) { + TclOODeleteChain(clsPtr->destructorChainPtr); + } + if (clsPtr->classChainCache) { + FOREACH_HASH_DECLS; + CallChain *callPtr; + + FOREACH_HASH_VALUE(callPtr, clsPtr->classChainCache) { + TclOODeleteChain(callPtr); + } + Tcl_DeleteHashTable(clsPtr->classChainCache); + ckfree((char *) clsPtr->classChainCache); + } + + if (clsPtr->filters.num) { + Tcl_Obj *filterObj; + + FOREACH(filterObj, clsPtr->filters) { + Tcl_DecrRefCount(filterObj); + } + ckfree((char *) clsPtr->filters.list); + clsPtr->filters.num = 0; + } + + + if (clsPtr->metadataPtr != NULL) { + FOREACH_HASH_DECLS; + Tcl_ObjectMetadataType *metadataTypePtr; + ClientData value; + + FOREACH_HASH(metadataTypePtr, value, clsPtr->metadataPtr) { + metadataTypePtr->deleteProc(value); + } + Tcl_DeleteHashTable(clsPtr->metadataPtr); + ckfree((char *) clsPtr->metadataPtr); + clsPtr->metadataPtr = NULL; + } +} + +/* + * ---------------------------------------------------------------------- + * + * ObjectNamespaceDeleted -- + * + * Callback when the object's namespace is deleted. Used to clean up the + * data structures associated with the object. The complicated bit is + * that this can sometimes happen before the object's command is deleted + * (interpreter teardown is complex!) + * + * ---------------------------------------------------------------------- + */ + +static void +ObjectNamespaceDeleted( + ClientData clientData) /* Pointer to the class whose namespace is + * being deleted. */ +{ + Object *oPtr = clientData; + FOREACH_HASH_DECLS; + Class *clsPtr = oPtr->classPtr, *mixinPtr; + Method *mPtr; + Tcl_Obj *filterObj; + int i, preserved = !(oPtr->flags & OBJECT_DELETED); + + /* + * Instruct everyone to no longer use any allocated fields of the object. + */ + + if (preserved) { + AddRef(oPtr); + if (clsPtr != NULL) { + AddRef(clsPtr); + ReleaseClassContents(NULL, oPtr); + } + } + oPtr->flags |= OBJECT_DELETED; + + /* + * Splice the object out of its context. After this, we must *not* call + * methods on the object. + */ + + if (!(oPtr->flags & ROOT_OBJECT)) { + TclOORemoveFromInstances(oPtr, oPtr->selfCls); + } + + FOREACH(mixinPtr, oPtr->mixins) { + TclOORemoveFromInstances(oPtr, mixinPtr); + } + if (i) { + ckfree((char *) oPtr->mixins.list); + } + + FOREACH(filterObj, oPtr->filters) { + Tcl_DecrRefCount(filterObj); + } + if (i) { + ckfree((char *) oPtr->filters.list); + } + + if (oPtr->methodsPtr) { + FOREACH_HASH_VALUE(mPtr, oPtr->methodsPtr) { + TclOODelMethodRef(mPtr); + } + Tcl_DeleteHashTable(oPtr->methodsPtr); + ckfree((char *) oPtr->methodsPtr); + } + + if (oPtr->chainCache) { + TclOODeleteChainCache(oPtr->chainCache); + } + + if (oPtr->cachedNameObj) { + Tcl_DecrRefCount(oPtr->cachedNameObj); + oPtr->cachedNameObj = NULL; + } + + if (oPtr->metadataPtr != NULL) { + Tcl_ObjectMetadataType *metadataTypePtr; + ClientData value; + + FOREACH_HASH(metadataTypePtr, value, oPtr->metadataPtr) { + metadataTypePtr->deleteProc(value); + } + Tcl_DeleteHashTable(oPtr->metadataPtr); + ckfree((char *) oPtr->metadataPtr); + oPtr->metadataPtr = NULL; + } + + if (clsPtr != NULL && !(oPtr->flags & ROOT_OBJECT)) { + Class *superPtr, *mixinPtr; + + if (clsPtr->metadataPtr != NULL) { + FOREACH_HASH_DECLS; + Tcl_ObjectMetadataType *metadataTypePtr; + ClientData value; + + FOREACH_HASH(metadataTypePtr, value, clsPtr->metadataPtr) { + metadataTypePtr->deleteProc(value); + } + Tcl_DeleteHashTable(clsPtr->metadataPtr); + ckfree((char *) clsPtr->metadataPtr); + clsPtr->metadataPtr = NULL; + } + + clsPtr->flags |= OBJECT_DELETED; + FOREACH(filterObj, clsPtr->filters) { + Tcl_DecrRefCount(filterObj); + } + if (i) { + ckfree((char *) clsPtr->filters.list); + clsPtr->filters.num = 0; + } + FOREACH(mixinPtr, clsPtr->mixins) { + if (!(mixinPtr->flags & OBJECT_DELETED)) { + TclOORemoveFromMixinSubs(clsPtr, mixinPtr); + } + } + if (i) { + ckfree((char *) clsPtr->mixins.list); + clsPtr->mixins.num = 0; + } + FOREACH(superPtr, clsPtr->superclasses) { + if (!(superPtr->flags & OBJECT_DELETED)) { + TclOORemoveFromSubclasses(clsPtr, superPtr); + } + } + if (i) { + ckfree((char *) clsPtr->superclasses.list); + clsPtr->superclasses.num = 0; + } + if (clsPtr->subclasses.list) { + ckfree((char *) clsPtr->subclasses.list); + clsPtr->subclasses.num = 0; + } + if (clsPtr->instances.list) { + ckfree((char *) clsPtr->instances.list); + clsPtr->instances.num = 0; + } + if (clsPtr->mixinSubs.list) { + ckfree((char *) clsPtr->mixinSubs.list); + clsPtr->mixinSubs.num = 0; + } + + FOREACH_HASH_VALUE(mPtr, &clsPtr->classMethods) { + TclOODelMethodRef(mPtr); + } + Tcl_DeleteHashTable(&clsPtr->classMethods); + TclOODelMethodRef(clsPtr->constructorPtr); + TclOODelMethodRef(clsPtr->destructorPtr); + DelRef(clsPtr); + } + + /* + * Delete the object structure itself. + */ + + DelRef(oPtr); + if (preserved) { + if (clsPtr) { + DelRef(clsPtr); + } + DelRef(oPtr); + } +} + +/* + * ---------------------------------------------------------------------- + * + * TclOORemoveFromInstances -- + * + * Utility function to remove an object from the list of instances within + * a class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOORemoveFromInstances( + Object *oPtr, /* The instance to remove. */ + Class *clsPtr) /* The class (possibly) containing the + * reference to the instance. */ +{ + int i; + Object *instPtr; + + FOREACH(instPtr, clsPtr->instances) { + if (oPtr == instPtr) { + goto removeInstance; + } + } + return; + + removeInstance: + clsPtr->instances.num--; + if (i < clsPtr->instances.num) { + clsPtr->instances.list[i] = + clsPtr->instances.list[clsPtr->instances.num]; + } + clsPtr->instances.list[clsPtr->instances.num] = NULL; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOAddToInstances -- + * + * Utility function to add an object to the list of instances within a + * class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOAddToInstances( + Object *oPtr, /* The instance to add. */ + Class *clsPtr) /* The class to add the instance to. It is + * assumed that the class is not already + * present as an instance in the class. */ +{ + if (clsPtr->instances.num >= clsPtr->instances.size) { + clsPtr->instances.size += ALLOC_CHUNK; + if (clsPtr->instances.size == ALLOC_CHUNK) { + clsPtr->instances.list = (Object **) + ckalloc(sizeof(Object *) * ALLOC_CHUNK); + } else { + clsPtr->instances.list = (Object **) + ckrealloc((char *) clsPtr->instances.list, + sizeof(Object *) * clsPtr->instances.size); + } + } + clsPtr->instances.list[clsPtr->instances.num++] = oPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOORemoveFromSubclasses -- + * + * Utility function to remove a class from the list of subclasses within + * another class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOORemoveFromSubclasses( + Class *subPtr, /* The subclass to remove. */ + Class *superPtr) /* The superclass to (possibly) remove the + * subclass reference from. */ +{ + int i; + Class *subclsPtr; + + FOREACH(subclsPtr, superPtr->subclasses) { + if (subPtr == subclsPtr) { + goto removeSubclass; + } + } + return; + + removeSubclass: + superPtr->subclasses.num--; + if (i < superPtr->subclasses.num) { + superPtr->subclasses.list[i] = + superPtr->subclasses.list[superPtr->subclasses.num]; + } + superPtr->subclasses.list[superPtr->subclasses.num] = NULL; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOAddToSubclasses -- + * + * Utility function to add a class to the list of subclasses within + * another class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOAddToSubclasses( + Class *subPtr, /* The subclass to add. */ + Class *superPtr) /* The superclass to add the subclass to. It + * is assumed that the class is not already + * present as a subclass in the superclass. */ +{ + if (superPtr->subclasses.num >= superPtr->subclasses.size) { + superPtr->subclasses.size += ALLOC_CHUNK; + if (superPtr->subclasses.size == ALLOC_CHUNK) { + superPtr->subclasses.list = (Class **) + ckalloc(sizeof(Class *) * ALLOC_CHUNK); + } else { + superPtr->subclasses.list = (Class **) + ckrealloc((char *) superPtr->subclasses.list, + sizeof(Class *) * superPtr->subclasses.size); + } + } + superPtr->subclasses.list[superPtr->subclasses.num++] = subPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOORemoveFromMixinSubs -- + * + * Utility function to remove a class from the list of mixinSubs within + * another class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOORemoveFromMixinSubs( + Class *subPtr, /* The subclass to remove. */ + Class *superPtr) /* The superclass to (possibly) remove the + * subclass reference from. */ +{ + int i; + Class *subclsPtr; + + FOREACH(subclsPtr, superPtr->mixinSubs) { + if (subPtr == subclsPtr) { + goto removeSubclass; + } + } + return; + + removeSubclass: + superPtr->mixinSubs.num--; + if (i < superPtr->mixinSubs.num) { + superPtr->mixinSubs.list[i] = + superPtr->mixinSubs.list[superPtr->mixinSubs.num]; + } + superPtr->mixinSubs.list[superPtr->mixinSubs.num] = NULL; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOAddToMixinSubs -- + * + * Utility function to add a class to the list of mixinSubs within + * another class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOAddToMixinSubs( + Class *subPtr, /* The subclass to add. */ + Class *superPtr) /* The superclass to add the subclass to. It + * is assumed that the class is not already + * present as a subclass in the superclass. */ +{ + if (superPtr->mixinSubs.num >= superPtr->mixinSubs.size) { + superPtr->mixinSubs.size += ALLOC_CHUNK; + if (superPtr->mixinSubs.size == ALLOC_CHUNK) { + superPtr->mixinSubs.list = (Class **) + ckalloc(sizeof(Class *) * ALLOC_CHUNK); + } else { + superPtr->mixinSubs.list = (Class **) + ckrealloc((char *) superPtr->mixinSubs.list, + sizeof(Class *) * superPtr->mixinSubs.size); + } + } + superPtr->mixinSubs.list[superPtr->mixinSubs.num++] = subPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * AllocClass -- + * + * Allocate a basic class. Does not splice the class object into its + * class's instance list. + * + * ---------------------------------------------------------------------- + */ + +static Class * +AllocClass( + Tcl_Interp *interp, /* Interpreter within which to allocate the + * class. */ + Object *useThisObj) /* Object that is to act as the class + * representation, or NULL if a new object + * (with automatic name) is to be used. */ +{ + Foundation *fPtr = GetFoundation(interp); + Class *clsPtr = (Class *) ckalloc(sizeof(Class)); + Tcl_Namespace *path[2]; + + /* + * Make an object if we haven't been given one. + */ + + memset(clsPtr, 0, sizeof(Class)); + if (useThisObj == NULL) { + clsPtr->thisPtr = AllocObject(interp, NULL, NULL); + } else { + clsPtr->thisPtr = useThisObj; + } + + /* + * Configure the namespace path for the class's object. + */ + + path[0] = fPtr->helpersNs; + path[1] = fPtr->ooNs; + TclSetNsPath((Namespace *) clsPtr->thisPtr->namespacePtr, 2, path); + + /* + * Class objects inherit from the class of classes unless they inherit + * from some subclass of it. Enforce this right now. + */ + + clsPtr->thisPtr->selfCls = fPtr->classCls; + + /* + * Classes are subclasses of oo::object, i.e. the objects they create are + * objects. + */ + + clsPtr->superclasses.num = 1; + clsPtr->superclasses.list = (Class **) ckalloc(sizeof(Class *)); + clsPtr->superclasses.list[0] = fPtr->objectCls; + + /* + * Finish connecting the class structure to the object structure. + */ + + clsPtr->thisPtr->classPtr = clsPtr; + + /* + * That's the complicated bit. Now fill in the rest of the non-zero/NULL + * fields. + */ + + clsPtr->refCount = 1; + Tcl_InitObjHashTable(&clsPtr->classMethods); + return clsPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * Tcl_NewObjectInstance -- + * + * Allocate a new instance of an object. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Object +Tcl_NewObjectInstance( + Tcl_Interp *interp, /* Interpreter context. */ + Tcl_Class cls, /* Class to create an instance of. */ + const char *nameStr, /* Name of object to create, or NULL to ask + * the code to pick its own unique name. */ + const char *nsNameStr, /* Name of namespace to create inside object, + * or NULL to ask the code to pick its own + * unique name. */ + int objc, /* Number of arguments. Negative value means + * do not call constructor. */ + Tcl_Obj *const *objv, /* Argument list. */ + int skip) /* Number of arguments to _not_ pass to the + * constructor. */ +{ + register Class *classPtr = (Class *) cls; + Foundation *fPtr = GetFoundation(interp); + Object *oPtr; + + /* + * Check if we're going to create an object over an existing command; + * that's not allowed. + */ + + if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, 0)) { + Tcl_AppendResult(interp, "can't create object \"", nameStr, + "\": command already exists with that name", NULL); + return NULL; + } + + /* + * Create the object. + */ + + oPtr = AllocObject(interp, nameStr, nsNameStr); + oPtr->selfCls = classPtr; + TclOOAddToInstances(oPtr, classPtr); + + /* + * Check to see if we're really creating a class. If so, allocate the + * class structure as well. + */ + + if (TclOOIsReachable(fPtr->classCls, classPtr)) { + /* + * Is a class, so attach a class structure. Note that the AllocClass + * function splices the structure into the object, so we don't have + * to. Once that's done, we need to repatch the object to have the + * right class since AllocClass interferes with that. + */ + + AllocClass(interp, oPtr); + oPtr->selfCls = classPtr; + TclOOAddToSubclasses(oPtr->classPtr, fPtr->objectCls); + } + + /* + * Run constructors, except when objc < 0 (a special flag case used for + * object cloning only). + */ + + if (objc >= 0) { + CallContext *contextPtr = TclOOGetCallContext(oPtr,NULL,CONSTRUCTOR); + + if (contextPtr != NULL) { + int result; + Tcl_InterpState state; + + AddRef(oPtr); + state = Tcl_SaveInterpState(interp, TCL_OK); + contextPtr->callPtr->flags |= CONSTRUCTOR; + contextPtr->skip = skip; + result = TclOOInvokeContext(interp, contextPtr, objc, objv); + TclOODeleteContext(contextPtr); + DelRef(oPtr); + if (result != TCL_OK) { + Tcl_DiscardInterpState(state); + Tcl_DeleteCommandFromToken(interp, oPtr->command); + return NULL; + } + Tcl_RestoreInterpState(interp, state); + } + } + + return (Tcl_Object) oPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * Tcl_CopyObjectInstance -- + * + * Creates a copy of an object. Does not copy the backing namespace, + * since the correct way to do that (e.g., shallow/deep) depends on the + * object/class's own policies. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Object +Tcl_CopyObjectInstance( + Tcl_Interp *interp, + Tcl_Object sourceObject, + const char *targetName, + const char *targetNamespaceName) +{ + Object *oPtr = (Object *) sourceObject, *o2Ptr; + FOREACH_HASH_DECLS; + Method *mPtr; + Class *mixinPtr; + Tcl_Obj *keyPtr, *filterObj; + int i; + + /* + * Sanity checks. + */ + + if (targetName == NULL && oPtr->classPtr != NULL) { + Tcl_AppendResult(interp, "must supply a name when copying a class", + NULL); + return NULL; + } + if (oPtr->classPtr == GetFoundation(interp)->classCls) { + Tcl_AppendResult(interp, "may not clone the class of classes", NULL); + return NULL; + } + + /* + * Build the instance. Note that this does not run any constructors. + */ + + o2Ptr = (Object *) Tcl_NewObjectInstance(interp, + (Tcl_Class) oPtr->selfCls, targetName, targetNamespaceName, -1, + NULL, -1); + if (o2Ptr == NULL) { + return NULL; + } + + /* + * Copy the object-local methods to the new object. + */ + + if (oPtr->methodsPtr) { + FOREACH_HASH(keyPtr, mPtr, oPtr->methodsPtr) { + if (CloneObjectMethod(interp, o2Ptr, mPtr, keyPtr) != TCL_OK) { + Tcl_DeleteCommandFromToken(interp, o2Ptr->command); + return NULL; + } + } + } + + /* + * Copy the object's mixin references to the new object. + */ + + FOREACH(mixinPtr, o2Ptr->mixins) { + if (mixinPtr != o2Ptr->selfCls) { + TclOORemoveFromInstances(o2Ptr, mixinPtr); + } + } + DUPLICATE(o2Ptr->mixins, oPtr->mixins, Class *); + FOREACH(mixinPtr, o2Ptr->mixins) { + if (mixinPtr != o2Ptr->selfCls) { + TclOOAddToInstances(o2Ptr, mixinPtr); + } + } + + /* + * Copy the object's filter list to the new object. + */ + + DUPLICATE(o2Ptr->filters, oPtr->filters, Tcl_Obj *); + FOREACH(filterObj, o2Ptr->filters) { + Tcl_IncrRefCount(filterObj); + } + + /* + * Copy the object's flags to the new object, clearing those that must be + * kept object-local. The duplicate is never deleted at this point, nor is + * it the root of the object system or in the midst of processing a filter + * call. + */ + + o2Ptr->flags = oPtr->flags & ~( + OBJECT_DELETED | ROOT_OBJECT | FILTER_HANDLING); + + /* + * Copy the object's metadata. + */ + + if (oPtr->metadataPtr != NULL) { + Tcl_ObjectMetadataType *metadataTypePtr; + ClientData value, duplicate; + + FOREACH_HASH(metadataTypePtr, value, oPtr->metadataPtr) { + if (metadataTypePtr->cloneProc == NULL) { + duplicate = value; + } else { + if (metadataTypePtr->cloneProc(interp, value, + &duplicate) != TCL_OK) { + Tcl_DeleteCommandFromToken(interp, o2Ptr->command); + return NULL; + } + } + if (duplicate != NULL) { + Tcl_ObjectSetMetadata((Tcl_Object) o2Ptr, metadataTypePtr, + duplicate); + } + } + } + + /* + * Copy the class, if present. Note that if there is a class present in + * the source object, there must also be one in the copy. + */ + + if (oPtr->classPtr != NULL) { + Class *clsPtr = oPtr->classPtr; + Class *cls2Ptr = o2Ptr->classPtr; + Class *superPtr; + + /* + * Copy the class flags across. + */ + + cls2Ptr->flags = clsPtr->flags; + + /* + * Ensure that the new class's superclass structure is the same as the + * old class's. + */ + + FOREACH(superPtr, cls2Ptr->superclasses) { + TclOORemoveFromSubclasses(cls2Ptr, superPtr); + } + if (cls2Ptr->superclasses.num) { + cls2Ptr->superclasses.list = (Class **) + ckrealloc((char *) cls2Ptr->superclasses.list, + sizeof(Class *) * clsPtr->superclasses.num); + } else { + cls2Ptr->superclasses.list = (Class **) + ckalloc(sizeof(Class *) * clsPtr->superclasses.num); + } + memcpy(cls2Ptr->superclasses.list, clsPtr->superclasses.list, + sizeof(Class *) * clsPtr->superclasses.num); + cls2Ptr->superclasses.num = clsPtr->superclasses.num; + FOREACH(superPtr, cls2Ptr->superclasses) { + TclOOAddToSubclasses(cls2Ptr, superPtr); + } + + /* + * Duplicate the source class's filters. + */ + + DUPLICATE(cls2Ptr->filters, clsPtr->filters, Tcl_Obj *); + FOREACH(filterObj, cls2Ptr->filters) { + Tcl_IncrRefCount(filterObj); + } + + /* + * Duplicate the source class's mixins (which cannot be circular + * references to the duplicate). + */ + + FOREACH(mixinPtr, cls2Ptr->mixins) { + TclOORemoveFromMixinSubs(cls2Ptr, mixinPtr); + } + if (cls2Ptr->mixins.num != 0) { + ckfree((char *) clsPtr->mixins.list); + } + DUPLICATE(cls2Ptr->mixins, clsPtr->mixins, Class *); + FOREACH(mixinPtr, cls2Ptr->mixins) { + TclOOAddToMixinSubs(cls2Ptr, mixinPtr); + } + + /* + * Duplicate the source class's methods, constructor and destructor. + */ + + FOREACH_HASH(keyPtr, mPtr, &clsPtr->classMethods) { + if (CloneClassMethod(interp, cls2Ptr, mPtr, keyPtr, + NULL) != TCL_OK) { + Tcl_DeleteCommandFromToken(interp, o2Ptr->command); + return NULL; + } + } + if (clsPtr->constructorPtr) { + if (CloneClassMethod(interp, cls2Ptr, clsPtr->constructorPtr, + NULL, &cls2Ptr->constructorPtr) != TCL_OK) { + Tcl_DeleteCommandFromToken(interp, o2Ptr->command); + return NULL; + } + } + if (clsPtr->destructorPtr) { + if (CloneClassMethod(interp, cls2Ptr, clsPtr->destructorPtr, NULL, + &cls2Ptr->destructorPtr) != TCL_OK) { + Tcl_DeleteCommandFromToken(interp, o2Ptr->command); + return NULL; + } + } + + /* + * Duplicate the class's metadata. + */ + + if (clsPtr->metadataPtr != NULL) { + Tcl_ObjectMetadataType *metadataTypePtr; + ClientData value, duplicate; + + FOREACH_HASH(metadataTypePtr, value, clsPtr->metadataPtr) { + if (metadataTypePtr->cloneProc == NULL) { + duplicate = value; + } else { + if (metadataTypePtr->cloneProc(interp, value, + &duplicate) != TCL_OK) { + Tcl_DeleteCommandFromToken(interp, o2Ptr->command); + return NULL; + } + } + if (duplicate != NULL) { + Tcl_ClassSetMetadata((Tcl_Class) cls2Ptr, metadataTypePtr, + duplicate); + } + } + } + } + + return (Tcl_Object) o2Ptr; +} + +/* + * ---------------------------------------------------------------------- + * + * CloneObjectMethod, CloneClassMethod -- + * + * Helper functions used for cloning methods. They work identically to + * each other, except for the difference between them in how they + * register the cloned method on a successful clone. + * + * ---------------------------------------------------------------------- + */ + +static int +CloneObjectMethod( + Tcl_Interp *interp, + Object *oPtr, + Method *mPtr, + Tcl_Obj *namePtr) +{ + if (mPtr->typePtr == NULL) { + Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr, + mPtr->flags & PUBLIC_METHOD, NULL, NULL); + } else if (mPtr->typePtr->cloneProc) { + ClientData newClientData; + + if (mPtr->typePtr->cloneProc(interp, mPtr->clientData, + &newClientData) != TCL_OK) { + return TCL_ERROR; + } + Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr, + mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, newClientData); + } else { + Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr, + mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, mPtr->clientData); + } + return TCL_OK; +} + +static int +CloneClassMethod( + Tcl_Interp *interp, + Class *clsPtr, + Method *mPtr, + Tcl_Obj *namePtr, + Method **m2PtrPtr) +{ + Method *m2Ptr; + + if (mPtr->typePtr == NULL) { + m2Ptr = (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr, + namePtr, mPtr->flags & PUBLIC_METHOD, NULL, NULL); + } else if (mPtr->typePtr->cloneProc) { + ClientData newClientData; + + if (mPtr->typePtr->cloneProc(interp, mPtr->clientData, + &newClientData) != TCL_OK) { + return TCL_ERROR; + } + m2Ptr = (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr, + namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, + newClientData); + } else { + m2Ptr = (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr, + namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, + mPtr->clientData); + } + if (m2PtrPtr != NULL) { + *m2PtrPtr = m2Ptr; + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * Tcl_ClassGetMetadata, Tcl_ClassSetMetadata, Tcl_ObjectGetMetadata, + * Tcl_ObjectSetMetadata -- + * + * Metadata management API. The metadata system allows code in extensions + * to attach arbitrary non-NULL pointers to objects and classes without + * the different things that might be interested being able to interfere + * with each other. Apart from non-NULL-ness, these routines attach no + * interpretation to the meaning of the metadata pointers. + * + * The Tcl_*GetMetadata routines get the metadata pointer attached that + * has been related with a particular type, or NULL if no metadata + * associated with the given type has been attached. + * + * The Tcl_*SetMetadata routines set or delete the metadata pointer that + * is related to a particular type. The value associated with the type is + * deleted (if present; no-op otherwise) if the value is NULL, and + * attached (replacing the previous value, which is deleted if present) + * otherwise. This means it is impossible to attach a NULL value for any + * metadata type. + * + * ---------------------------------------------------------------------- + */ + +ClientData +Tcl_ClassGetMetadata( + Tcl_Class clazz, + const Tcl_ObjectMetadataType *typePtr) +{ + Class *clsPtr = (Class *) clazz; + Tcl_HashEntry *hPtr; + + /* + * If there's no metadata store attached, the type in question has + * definitely not been attached either! + */ + + if (clsPtr->metadataPtr == NULL) { + return NULL; + } + + /* + * There is a metadata store, so look in it for the given type. + */ + + hPtr = Tcl_FindHashEntry(clsPtr->metadataPtr, (char *) typePtr); + + /* + * Return the metadata value if we found it, otherwise NULL. + */ + + if (hPtr == NULL) { + return NULL; + } + return Tcl_GetHashValue(hPtr); +} + +void +Tcl_ClassSetMetadata( + Tcl_Class clazz, + const Tcl_ObjectMetadataType *typePtr, + ClientData metadata) +{ + Class *clsPtr = (Class *) clazz; + Tcl_HashEntry *hPtr; + int isNew; + + /* + * Attach the metadata store if not done already. + */ + + if (clsPtr->metadataPtr == NULL) { + if (metadata == NULL) { + return; + } + clsPtr->metadataPtr = (Tcl_HashTable*) ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitHashTable(clsPtr->metadataPtr, TCL_ONE_WORD_KEYS); + } + + /* + * If the metadata is NULL, we're deleting the metadata for the type. + */ + + if (metadata == NULL) { + hPtr = Tcl_FindHashEntry(clsPtr->metadataPtr, (char *) typePtr); + if (hPtr != NULL) { + typePtr->deleteProc(Tcl_GetHashValue(hPtr)); + Tcl_DeleteHashEntry(hPtr); + } + return; + } + + /* + * Otherwise we're attaching the metadata. Note that if there was already + * some metadata attached of this type, we delete that first. + */ + + hPtr = Tcl_CreateHashEntry(clsPtr->metadataPtr, (char *) typePtr, &isNew); + if (!isNew) { + typePtr->deleteProc(Tcl_GetHashValue(hPtr)); + } + Tcl_SetHashValue(hPtr, metadata); +} + +ClientData +Tcl_ObjectGetMetadata( + Tcl_Object object, + const Tcl_ObjectMetadataType *typePtr) +{ + Object *oPtr = (Object *) object; + Tcl_HashEntry *hPtr; + + /* + * If there's no metadata store attached, the type in question has + * definitely not been attached either! + */ + + if (oPtr->metadataPtr == NULL) { + return NULL; + } + + /* + * There is a metadata store, so look in it for the given type. + */ + + hPtr = Tcl_FindHashEntry(oPtr->metadataPtr, (char *) typePtr); + + /* + * Return the metadata value if we found it, otherwise NULL. + */ + + if (hPtr == NULL) { + return NULL; + } + return Tcl_GetHashValue(hPtr); +} + +void +Tcl_ObjectSetMetadata( + Tcl_Object object, + const Tcl_ObjectMetadataType *typePtr, + ClientData metadata) +{ + Object *oPtr = (Object *) object; + Tcl_HashEntry *hPtr; + int isNew; + + /* + * Attach the metadata store if not done already. + */ + + if (oPtr->metadataPtr == NULL) { + if (metadata == NULL) { + return; + } + oPtr->metadataPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitHashTable(oPtr->metadataPtr, TCL_ONE_WORD_KEYS); + } + + /* + * If the metadata is NULL, we're deleting the metadata for the type. + */ + + if (metadata == NULL) { + hPtr = Tcl_FindHashEntry(oPtr->metadataPtr, (char *) typePtr); + if (hPtr != NULL) { + typePtr->deleteProc(Tcl_GetHashValue(hPtr)); + Tcl_DeleteHashEntry(hPtr); + } + return; + } + + /* + * Otherwise we're attaching the metadata. Note that if there was already + * some metadata attached of this type, we delete that first. + */ + + hPtr = Tcl_CreateHashEntry(oPtr->metadataPtr, (char *) typePtr, &isNew); + if (!isNew) { + typePtr->deleteProc(Tcl_GetHashValue(hPtr)); + } + Tcl_SetHashValue(hPtr, metadata); +} + +/* + * ---------------------------------------------------------------------- + * + * PublicObjectCmd, PrivateObjectCmd, TclOOInvokeObject, TclOOObjectCmdCore -- + * + * Main entry point for object invokations. The Public* and Private* + * wrapper functions are just thin wrappers round the main + * TclOOObjectCmdCore function that does call chain creation, management + * and invokation. + * + * ---------------------------------------------------------------------- + */ + +static int +PublicObjectCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + return TclOOObjectCmdCore(clientData, interp, objc, objv, PUBLIC_METHOD, + NULL); +} + +static int +PrivateObjectCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + return TclOOObjectCmdCore(clientData, interp, objc, objv, 0, NULL); +} + +int +TclOOInvokeObject( + Tcl_Interp *interp, /* Interpreter for commands, variables, + * results, error reporting, etc. */ + Tcl_Object object, /* The object to invoke. */ + Tcl_Class startCls, /* Where in the class chain to start the + * invoke from, or NULL to traverse the whole + * chain including filters. */ + int publicPrivate, /* Whether this is an invoke from a public + * context (PUBLIC_METHOD), a private context + * (PRIVATE_METHOD), or a *really* private + * context (any other value; conventionally + * 0). */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* Array of argument objects. It is assumed + * that the name of the method to invoke will + * be at index 1. */ +{ + switch (publicPrivate) { + case PUBLIC_METHOD: + return TclOOObjectCmdCore((Object *) object, interp, objc, objv, + PUBLIC_METHOD, (Class *) startCls); + case PRIVATE_METHOD: + return TclOOObjectCmdCore((Object *) object, interp, objc, objv, + PRIVATE_METHOD, (Class *) startCls); + default: + return TclOOObjectCmdCore((Object *) object, interp, objc, objv, 0, + (Class *) startCls); + } +} + +int +TclOOObjectCmdCore( + Object *oPtr, /* The object being invoked. */ + Tcl_Interp *interp, /* The interpreter containing the object. */ + int objc, /* How many arguments are being passed in. */ + Tcl_Obj *const *objv, /* The array of arguments. */ + int flags, /* Whether this is an invokation through the + * public or the private command interface. */ + Class *startCls) /* Where to start in the call chain, or NULL + * if we are to start at the front with + * filters and the object's methods (which is + * the normal case). */ +{ + CallContext *contextPtr; + Tcl_Obj *methodNamePtr; + int result; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "method ?arg ...?"); + return TCL_ERROR; + } + + /* + * Give plugged in code a chance to remap the method name. + */ + + methodNamePtr = objv[1]; + if (oPtr->mapMethodNameProc != NULL) { + register Class **startClsPtr = &startCls; + + methodNamePtr = Tcl_DuplicateObj(methodNamePtr); + result = oPtr->mapMethodNameProc(interp, (Tcl_Object) oPtr, + (Tcl_Class *) startClsPtr, methodNamePtr); + if (result != TCL_OK) { + if (result == TCL_ERROR) { + Tcl_AddErrorInfo(interp, "\n (while mapping method name)"); + } + Tcl_DecrRefCount(methodNamePtr); + return result; + } + } + Tcl_IncrRefCount(methodNamePtr); + + /* + * Get the call chain. + */ + + contextPtr = TclOOGetCallContext(oPtr, methodNamePtr, + flags | (oPtr->flags & FILTER_HANDLING)); + if (contextPtr == NULL) { + Tcl_AppendResult(interp, "impossible to invoke method \"", + TclGetString(methodNamePtr), + "\": no defined method or unknown method", NULL); + Tcl_DecrRefCount(methodNamePtr); + return TCL_ERROR; + } + Tcl_DecrRefCount(methodNamePtr); + + /* + * Check to see if we need to apply magical tricks to start part way + * through the call chain. + */ + + if (startCls != NULL) { + while (contextPtr->index < contextPtr->callPtr->numChain) { + register struct MInvoke *miPtr = + &contextPtr->callPtr->chain[contextPtr->index]; + + if (miPtr->isFilter || miPtr->mPtr->declaringClassPtr!=startCls) { + contextPtr->index++; + } else { + break; + } + } + if (contextPtr->index >= contextPtr->callPtr->numChain) { + result = TCL_ERROR; + Tcl_SetResult(interp, "no valid method implementation", + TCL_STATIC); + AddRef(oPtr); /* Just to balance. */ + goto disposeChain; + } + } + + /* + * Invoke the call chain, locking the object structure against deletion + * for the duration. + */ + + AddRef(oPtr); + result = TclOOInvokeContext(interp, contextPtr, objc, objv); + + /* + * Dispose of the call chain and drop the lock on the object's structure. + */ + + disposeChain: + TclOODeleteContext(contextPtr); + DelRef(oPtr); + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * Tcl_ObjectContextInvokeNext -- + * + * Invokes the next stage of the call chain described in an object + * context. This is the core of the implementation of the [next] command. + * Does not do management of the call-frame stack. + * + * ---------------------------------------------------------------------- + */ + +int +Tcl_ObjectContextInvokeNext( + Tcl_Interp *interp, + Tcl_ObjectContext context, + int objc, + Tcl_Obj *const *objv, + int skip) +{ + CallContext *contextPtr = (CallContext *) context; + int savedIndex = contextPtr->index; + int savedSkip = contextPtr->skip; + int result; + + if (contextPtr->index+1 >= contextPtr->callPtr->numChain) { + /* + * We're at the end of the chain; return the empty string (the most + * useful thing we can do, since it turns out that it's not always + * trivial to detect in source code whether there is a parent + * implementation, what with multiple-inheritance...) + */ + + return TCL_OK; + } + + /* + * Advance to the next method implementation in the chain in the method + * call context while we process the body. However, need to adjust the + * argument-skip control because we're guaranteed to have a single prefix + * arg (i.e., 'next') and not the variable amount that can happen because + * method invokations (i.e., '$obj meth' and 'my meth'), constructors + * (i.e., '$cls new' and '$cls create obj') and destructors (no args at + * all) come through the same code. + */ + + contextPtr->index++; + contextPtr->skip = skip; + + /* + * Invoke the (advanced) method call context in the caller context. + */ + + result = TclOOInvokeContext(interp, contextPtr, objc, objv); + + /* + * Restore the call chain context index as we've finished the inner invoke + * and want to operate in the outer context again. + */ + + contextPtr->index = savedIndex; + contextPtr->skip = savedSkip; + + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * Tcl_GetObjectFromObj -- + * + * Utility function to get an object from a Tcl_Obj containing its name. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Object +Tcl_GetObjectFromObj( + Tcl_Interp *interp, /* Interpreter in which to locate the object. + * Will have an error message placed in it if + * the name does not refer to an object. */ + Tcl_Obj *objPtr) /* The name of the object to look up, which is + * exactly the name of its public command. */ +{ + Command *cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objPtr); + + if (cmdPtr == NULL) { + goto notAnObject; + } + if (cmdPtr->objProc != PublicObjectCmd) { + cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr); + if (cmdPtr == NULL || cmdPtr->objProc != PublicObjectCmd) { + goto notAnObject; + } + } + return cmdPtr->objClientData; + + notAnObject: + Tcl_AppendResult(interp, TclGetString(objPtr), + " does not refer to an object", NULL); + return NULL; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOIsReachable -- + * + * Utility function that tests whether a class is a subclass (whether + * directly or indirectly) of another class. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOIsReachable( + Class *targetPtr, + Class *startPtr) +{ + int i; + Class *superPtr; + + tailRecurse: + if (startPtr == targetPtr) { + return 1; + } + if (startPtr->superclasses.num == 1 && startPtr->mixins.num == 0) { + startPtr = startPtr->superclasses.list[0]; + goto tailRecurse; + } + FOREACH(superPtr, startPtr->superclasses) { + if (TclOOIsReachable(targetPtr, superPtr)) { + return 1; + } + } + FOREACH(superPtr, startPtr->mixins) { + if (TclOOIsReachable(targetPtr, superPtr)) { + return 1; + } + } + return 0; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOObjectName -- + * + * Utility function that returns the name of the object. Note that this + * simplifies cache management by keeping the code to do it in one place + * and not sprayed all over. The value returned always has a reference + * count of at least one. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Obj * +TclOOObjectName( + Tcl_Interp *interp, + Object *oPtr) +{ + Tcl_Obj *namePtr; + + if (oPtr->cachedNameObj) { + return oPtr->cachedNameObj; + } + namePtr = Tcl_NewObj(); + Tcl_GetCommandFullName(interp, oPtr->command, namePtr); + Tcl_IncrRefCount(namePtr); + oPtr->cachedNameObj = namePtr; + return namePtr; +} + +/* + * ---------------------------------------------------------------------- + * + * assorted trivial 'getter' functions + * + * ---------------------------------------------------------------------- + */ + +Tcl_Method +Tcl_ObjectContextMethod( + Tcl_ObjectContext context) +{ + CallContext *contextPtr = (CallContext *) context; + return (Tcl_Method) contextPtr->callPtr->chain[contextPtr->index].mPtr; +} + +int +Tcl_ObjectContextIsFiltering( + Tcl_ObjectContext context) +{ + CallContext *contextPtr = (CallContext *) context; + return contextPtr->callPtr->chain[contextPtr->index].isFilter; +} + +Tcl_Object +Tcl_ObjectContextObject( + Tcl_ObjectContext context) +{ + return (Tcl_Object) ((CallContext *)context)->oPtr; +} + +int +Tcl_ObjectContextSkippedArgs( + Tcl_ObjectContext context) +{ + return ((CallContext *)context)->skip; +} + +Tcl_Namespace * +Tcl_GetObjectNamespace( + Tcl_Object object) +{ + return ((Object *)object)->namespacePtr; +} + +Tcl_Command +Tcl_GetObjectCommand( + Tcl_Object object) +{ + return ((Object *)object)->command; +} + +Tcl_Class +Tcl_GetObjectAsClass( + Tcl_Object object) +{ + return (Tcl_Class) ((Object *)object)->classPtr; +} + +int +Tcl_ObjectDeleted( + Tcl_Object object) +{ + return (((Object *)object)->flags & OBJECT_DELETED) ? 1 : 0; +} + +Tcl_Object +Tcl_GetClassAsObject( + Tcl_Class clazz) +{ + return (Tcl_Object) ((Class *)clazz)->thisPtr; +} + +Tcl_ObjectMapMethodNameProc +Tcl_ObjectGetMethodNameMapper( + Tcl_Object object) +{ + return ((Object *) object)->mapMethodNameProc; +} + +void +Tcl_ObjectSetMethodNameMapper( + Tcl_Object object, + Tcl_ObjectMapMethodNameProc mapMethodNameProc) +{ + ((Object *) object)->mapMethodNameProc = mapMethodNameProc; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOO.decls b/generic/tclOO.decls new file mode 100644 index 0000000..0fdbe47 --- /dev/null +++ b/generic/tclOO.decls @@ -0,0 +1,190 @@ +# -*- tcl -*- +# $Id: tclOO.decls,v 1.1 2008/05/31 11:42:17 dkf Exp $ + +# public API +library tclOO +interface tclOO +epoch 0 +scspec TCLOOAPI + +declare 0 current { + Tcl_Object Tcl_CopyObjectInstance(Tcl_Interp *interp, + Tcl_Object sourceObject, const char *targetName, + const char *targetNamespaceName) +} +declare 1 current { + Tcl_Object Tcl_GetClassAsObject(Tcl_Class clazz) +} +declare 2 current { + Tcl_Class Tcl_GetObjectAsClass(Tcl_Object object) +} +declare 3 current { + Tcl_Command Tcl_GetObjectCommand(Tcl_Object object) +} +declare 4 current { + Tcl_Object Tcl_GetObjectFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr) +} +declare 5 current { + Tcl_Namespace *Tcl_GetObjectNamespace(Tcl_Object object) +} +declare 6 current { + Tcl_Class Tcl_MethodDeclarerClass(Tcl_Method method) +} +declare 7 current { + Tcl_Object Tcl_MethodDeclarerObject(Tcl_Method method) +} +declare 8 current { + int Tcl_MethodIsPublic(Tcl_Method method) +} +declare 9 current { + int Tcl_MethodIsType(Tcl_Method method, const Tcl_MethodType *typePtr, + ClientData *clientDataPtr) +} +declare 10 current { + Tcl_Obj *Tcl_MethodName(Tcl_Method method) +} +declare 11 current { + Tcl_Method Tcl_NewInstanceMethod(Tcl_Interp *interp, Tcl_Object object, + Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, + ClientData clientData) +} +declare 12 current { + Tcl_Method Tcl_NewMethod(Tcl_Interp *interp, Tcl_Class cls, + Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, + ClientData clientData) +} +declare 13 current { + Tcl_Object Tcl_NewObjectInstance(Tcl_Interp *interp, Tcl_Class cls, + const char *nameStr, const char *nsNameStr, int objc, + Tcl_Obj *const *objv, int skip) +} +declare 14 current { + int Tcl_ObjectDeleted(Tcl_Object object) +} +declare 15 current { + int Tcl_ObjectContextIsFiltering(Tcl_ObjectContext context) +} +declare 16 current { + Tcl_Method Tcl_ObjectContextMethod(Tcl_ObjectContext context) +} +declare 17 current { + Tcl_Object Tcl_ObjectContextObject(Tcl_ObjectContext context) +} +declare 18 current { + int Tcl_ObjectContextSkippedArgs(Tcl_ObjectContext context) +} +declare 19 current { + ClientData Tcl_ClassGetMetadata(Tcl_Class clazz, + const Tcl_ObjectMetadataType *typePtr) +} +declare 20 current { + void Tcl_ClassSetMetadata(Tcl_Class clazz, + const Tcl_ObjectMetadataType *typePtr, ClientData metadata) +} +declare 21 current { + ClientData Tcl_ObjectGetMetadata(Tcl_Object object, + const Tcl_ObjectMetadataType *typePtr) +} +declare 22 current { + void Tcl_ObjectSetMetadata(Tcl_Object object, + const Tcl_ObjectMetadataType *typePtr, ClientData metadata) +} +declare 23 current { + int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp, + Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, + int skip) +} +declare 24 current { + Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper( + Tcl_Object object) +} +declare 25 current { + void Tcl_ObjectSetMethodNameMapper(Tcl_Object object, + Tcl_ObjectMapMethodNameProc mapMethodNameProc) +} +declare 26 current { + void Tcl_ClassSetConstructor(Tcl_Interp *interp, Tcl_Class clazz, + Tcl_Method method) +} +declare 27 current { + void Tcl_ClassSetDestructor(Tcl_Interp *interp, Tcl_Class clazz, + Tcl_Method method) +} + +# private API, exposed to support advanced OO systems that plug in on top +interface tclOOInt +declare 0 current { + Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp) +} +declare 1 current { + Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp, Object *oPtr, + int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + const Tcl_MethodType *typePtr, ClientData clientData, + Proc **procPtrPtr) +} +declare 2 current { + Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp, Class *clsPtr, + int flags, Tcl_Obj *nameObj, const char *namePtr, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, + ClientData clientData, Proc **procPtrPtr) +} +declare 3 current { + Method *TclOONewProcInstanceMethod(Tcl_Interp *interp, Object *oPtr, + int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + ProcedureMethod **pmPtrPtr) +} +declare 4 current { + Method *TclOONewProcMethod(Tcl_Interp *interp, Class *clsPtr, + int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + ProcedureMethod **pmPtrPtr) +} +declare 5 current { + int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv, int publicOnly, Class *startCls) +} +declare 6 current { + int TclOOIsReachable(Class *targetPtr, Class *startPtr) +} +declare 7 current { + Method *TclOONewForwardMethod(Tcl_Interp *interp, Class *clsPtr, + int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj) +} +declare 8 current { + Method *TclOONewForwardInstanceMethod(Tcl_Interp *interp, Object *oPtr, + int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj) +} +declare 9 current { + Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, + Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, + ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, + Tcl_Obj *bodyObj, int flags, void **internalTokenPtr) +} +declare 10 current { + Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp, Tcl_Class clsPtr, + TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, Tcl_Obj *nameObj, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, + void **internalTokenPtr) +} +declare 11 current { + int TclOOInvokeObject(Tcl_Interp *interp, Tcl_Object object, + Tcl_Class startCls, int publicPrivate, int objc, + Tcl_Obj *const *objv) +} +declare 12 current { + void TclOOObjectSetFilters(Object *oPtr, int numFilters, + Tcl_Obj *const *filters) +} +declare 13 current { + void TclOOClassSetFilters(Tcl_Interp *interp, Class *classPtr, + int numFilters, Tcl_Obj *const *filters) +} +declare 14 current { + void TclOOObjectSetMixins(Object *oPtr, int numMixins, + Class *const *mixins) +} +declare 15 current { + void TclOOClassSetMixins(Tcl_Interp *interp, Class *classPtr, + int numMixins, Class *const *mixins) +} diff --git a/generic/tclOO.h b/generic/tclOO.h new file mode 100644 index 0000000..f3fd73c --- /dev/null +++ b/generic/tclOO.h @@ -0,0 +1,128 @@ +/* + * tclOO.h -- + * + * This file contains the public API definitions and some of the function + * declarations for the object-system (NB: not Tcl_Obj, but ::oo). + * + * Copyright (c) 2006-2008 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOO.h,v 1.4 2008/05/31 11:42:17 dkf Exp $ + */ + +#ifndef TCLOO_H_INCLUDED +#define TCLOO_H_INCLUDED +#include "tcl.h" + +#if defined(BUILD_tcloo) +# define TCLOOAPI DLLEXPORT +# undef USE_TCLOO_STUBS +#else +# define TCLOOAPI DLLIMPORT +#endif + +/* + * Must match version at top of ../configure.in + */ + +#define TCLOO_VERSION "0.4" +#define TCLOO_PATCHLEVEL TCLOO_VERSION + +/* + * These are opaque types. + */ + +typedef struct Tcl_Class_ *Tcl_Class; +typedef struct Tcl_Method_ *Tcl_Method; +typedef struct Tcl_Object_ *Tcl_Object; +typedef struct Tcl_ObjectContext_ *Tcl_ObjectContext; + +/* + * Public datatypes for callbacks and structures used in the TIP#257 (OO) + * implementation. These are used to implement custom types of method calls + * and to allow the attachment of arbitrary data to objects and classes. + */ + +typedef int (*Tcl_MethodCallProc)(ClientData clientData, Tcl_Interp *interp, + Tcl_ObjectContext objectContext, int objc, Tcl_Obj *const *objv); +typedef void (*Tcl_MethodDeleteProc)(ClientData clientData); +typedef int (*Tcl_CloneProc)(Tcl_Interp *interp, ClientData oldClientData, + ClientData *newClientData); +typedef void (*Tcl_ObjectMetadataDeleteProc)(ClientData clientData); +typedef int (*Tcl_ObjectMapMethodNameProc)(Tcl_Interp *interp, + Tcl_Object object, Tcl_Class *startClsPtr, Tcl_Obj *methodNameObj); + +/* + * The type of a method implementation. This describes how to call the method + * implementation, how to delete it (when the object or class is deleted) and + * how to create a clone of it (when the object or class is copied). + */ + +typedef struct { + int version; /* Structure version field. Always to be equal + * to TCL_OO_METHOD_VERSION_CURRENT in + * declarations. */ + const char *name; /* Name of this type of method, mostly for + * debugging purposes. */ + Tcl_MethodCallProc callProc;/* How to invoke this method. */ + Tcl_MethodDeleteProc deleteProc; + /* How to delete this method's type-specific + * data, or NULL if the type-specific data + * does not need deleting. */ + Tcl_CloneProc cloneProc; /* How to copy this method's type-specific + * data, or NULL if the type-specific data can + * be copied directly. */ +} Tcl_MethodType; + +/* + * The correct value for the version field of the Tcl_MethodType structure. + * This allows new versions of the structure to be introduced without breaking + * binary compatability. + */ + +#define TCL_OO_METHOD_VERSION_CURRENT 1 + +/* + * The type of some object (or class) metadata. This describes how to delete + * the metadata (when the object or class is deleted) and how to create a + * clone of it (when the object or class is copied). + */ + +typedef struct { + int version; /* Structure version field. Always to be equal + * to TCL_OO_METADATA_VERSION_CURRENT in + * declarations. */ + const char *name; + Tcl_ObjectMetadataDeleteProc deleteProc; + /* How to delete the metadata. This must not + * be NULL. */ + Tcl_CloneProc cloneProc; /* How to copy the metadata, or NULL if the + * type-specific data can be copied + * directly. */ +} Tcl_ObjectMetadataType; + +/* + * The correct value for the version field of the Tcl_ObjectMetadataType + * structure. This allows new versions of the structure to be introduced + * without breaking binary compatability. + */ + +#define TCL_OO_METADATA_VERSION_CURRENT 1 + +/* + * Include all the public API, generated from tclOO.decls. + */ + +#include "tclOODecls.h" + +#endif + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c new file mode 100644 index 0000000..1cd07df --- /dev/null +++ b/generic/tclOOBasic.c @@ -0,0 +1,925 @@ +/* + * tclOOBasic.c -- + * + * This file contains implementations of the "simple" commands and + * methods from the object-system core. + * + * Copyright (c) 2005-2008 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOOBasic.c,v 1.1 2008/05/31 11:42:17 dkf Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclInt.h" +#include "tclOOInt.h" + +/* + * ---------------------------------------------------------------------- + * + * TclOO_Class_Create -- + * + * Implementation for oo::class->create method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Class_Create( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + Object *oPtr = (Object *) Tcl_ObjectContextObject(context); + Tcl_Object newObject; + const char *objName; + int len; + + /* + * Sanity check; should not be possible to invoke this method on a + * non-class. + */ + + if (oPtr->classPtr == NULL) { + Tcl_Obj *cmdnameObj = TclOOObjectName(interp, oPtr); + + Tcl_AppendResult(interp, "object \"", TclGetString(cmdnameObj), + "\" is not a class", NULL); + return TCL_ERROR; + } + + /* + * Check we have the right number of (sensible) arguments. + */ + + if (objc - Tcl_ObjectContextSkippedArgs(context) < 1) { + Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, + "objectName ?arg ...?"); + return TCL_ERROR; + } + objName = Tcl_GetStringFromObj( + objv[Tcl_ObjectContextSkippedArgs(context)], &len); + if (len == 0) { + Tcl_AppendResult(interp, "object name must not be empty", NULL); + return TCL_ERROR; + } + + /* + * Make the object and return its name. + */ + + newObject = Tcl_NewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, + objName, NULL, objc, objv, + Tcl_ObjectContextSkippedArgs(context)+1); + if (newObject == NULL) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) newObject)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOO_Class_CreateNs -- + * + * Implementation for oo::class->createWithNamespace method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Class_CreateNs( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + Object *oPtr = (Object *) Tcl_ObjectContextObject(context); + Tcl_Object newObject; + const char *objName, *nsName; + int len; + + /* + * Sanity check; should not be possible to invoke this method on a + * non-class. + */ + + if (oPtr->classPtr == NULL) { + Tcl_Obj *cmdnameObj = TclOOObjectName(interp, oPtr); + + Tcl_AppendResult(interp, "object \"", TclGetString(cmdnameObj), + "\" is not a class", NULL); + return TCL_ERROR; + } + + /* + * Check we have the right number of (sensible) arguments. + */ + + if (objc - Tcl_ObjectContextSkippedArgs(context) < 2) { + Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, + "objectName namespaceName ?arg ...?"); + return TCL_ERROR; + } + objName = Tcl_GetStringFromObj( + objv[Tcl_ObjectContextSkippedArgs(context)], &len); + if (len == 0) { + Tcl_AppendResult(interp, "object name must not be empty", NULL); + return TCL_ERROR; + } + nsName = Tcl_GetStringFromObj( + objv[Tcl_ObjectContextSkippedArgs(context)+1], &len); + if (len == 0) { + Tcl_AppendResult(interp, "namespace name must not be empty", NULL); + return TCL_ERROR; + } + + /* + * Make the object and return its name. + */ + + newObject = Tcl_NewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, + objName, nsName, objc, objv, + Tcl_ObjectContextSkippedArgs(context)+2); + if (newObject == NULL) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) newObject)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOO_Class_New -- + * + * Implementation for oo::class->new method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Class_New( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + Object *oPtr = (Object *) Tcl_ObjectContextObject(context); + Tcl_Object newObject; + + /* + * Sanity check; should not be possible to invoke this method on a + * non-class. + */ + + if (oPtr->classPtr == NULL) { + Tcl_Obj *cmdnameObj = TclOOObjectName(interp, oPtr); + + Tcl_AppendResult(interp, "object \"", TclGetString(cmdnameObj), + "\" is not a class", NULL); + return TCL_ERROR; + } + + /* + * Make the object and return its name. + */ + + newObject = Tcl_NewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, + NULL, NULL, objc, objv, Tcl_ObjectContextSkippedArgs(context)); + if (newObject == NULL) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) newObject)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOO_Object_Destroy -- + * + * Implementation for oo::object->destroy method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Object_Destroy( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + if (objc != Tcl_ObjectContextSkippedArgs(context)) { + Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, + NULL); + return TCL_ERROR; + } + Tcl_DeleteCommandFromToken(interp, + Tcl_GetObjectCommand(Tcl_ObjectContextObject(context))); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOO_Object_Eval -- + * + * Implementation for oo::object->eval method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Object_Eval( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + CallContext *contextPtr = (CallContext *) context; + Tcl_Object object = Tcl_ObjectContextObject(context); + CallFrame *framePtr, **framePtrPtr; + Tcl_Obj *objnameObj; + int result; + + if (objc-1 < Tcl_ObjectContextSkippedArgs(context)) { + Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, + "arg ?arg ...?"); + return TCL_ERROR; + } + + /* + * Make the object's namespace the current namespace and evaluate the + * command(s). + */ + + /* This is needed to satisfy GCC 3.3's strict aliasing rules */ + framePtrPtr = &framePtr; + result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, + Tcl_GetObjectNamespace(object), 0); + if (result != TCL_OK) { + return TCL_ERROR; + } + framePtr->objc = objc; + framePtr->objv = objv; /* Reference counts do not need to be + * incremented here. */ + + if (contextPtr->callPtr->flags & PUBLIC_METHOD) { + objnameObj = TclOOObjectName(interp, (Object *) object); + } else { + objnameObj = Tcl_NewStringObj("my", 2); + } + Tcl_IncrRefCount(objnameObj); + + if (objc == Tcl_ObjectContextSkippedArgs(context)+1) { + result = Tcl_EvalObjEx(interp, + objv[Tcl_ObjectContextSkippedArgs(context)], 0); + } else { + Tcl_Obj *objPtr; + + /* + * More than one argument: concatenate them together with spaces + * between, then evaluate the result. Tcl_EvalObjEx will delete the + * object when it decrements its refcount after eval'ing it. + */ + + objPtr = Tcl_ConcatObj(objc-Tcl_ObjectContextSkippedArgs(context), + objv+Tcl_ObjectContextSkippedArgs(context)); + result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT); + } + + if (result == TCL_ERROR) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in \"%s eval\" script line %d)", + TclGetString(objnameObj), interp->errorLine)); + } + + /* + * Restore the previous "current" namespace. + */ + + TclPopStackFrame(interp); + Tcl_DecrRefCount(objnameObj); + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOO_Object_Unknown -- + * + * Default unknown method handler method (defined in oo::object). This + * just creates a suitable error message. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Object_Unknown( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + CallContext *contextPtr = (CallContext *) context; + Object *oPtr = contextPtr->oPtr; + const char **methodNames; + int numMethodNames, i, skip = Tcl_ObjectContextSkippedArgs(context); + + if (objc < skip+1) { + Tcl_WrongNumArgs(interp, skip, objv, "methodName ?arg ...?"); + return TCL_ERROR; + } + + /* + * Get the list of methods that we want to know about. + */ + + numMethodNames = TclOOGetSortedMethodList(oPtr, + contextPtr->callPtr->flags & PUBLIC_METHOD, &methodNames); + + /* + * Special message when there are no visible methods at all. + */ + + if (numMethodNames == 0) { + Tcl_Obj *tmpBuf = TclOOObjectName(interp, oPtr); + + Tcl_AppendResult(interp, "object \"", TclGetString(tmpBuf), NULL); + if (contextPtr->callPtr->flags & PUBLIC_METHOD) { + Tcl_AppendResult(interp, "\" has no visible methods", NULL); + } else { + Tcl_AppendResult(interp, "\" has no methods", NULL); + } + return TCL_ERROR; + } + + Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[skip]), + "\": must be ", NULL); + for (i=0 ; ivariable method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Object_LinkVar( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + Interp *iPtr = (Interp *) interp; + Tcl_Object object = Tcl_ObjectContextObject(context); + Namespace *savedNsPtr; + int i; + + if (objc-Tcl_ObjectContextSkippedArgs(context) < 1) { + Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, + "varName ?varName ...?"); + return TCL_ERROR; + } + + /* + * Do nothing if we are not called from the body of a method. In this + * respect, we are like the [global] command. + */ + + if (iPtr->varFramePtr == NULL || + !(iPtr->varFramePtr->isProcCallFrame & FRAME_IS_METHOD)) { + return TCL_OK; + } + + for (i=Tcl_ObjectContextSkippedArgs(context) ; ivarFramePtr->nsPtr; + iPtr->varFramePtr->nsPtr = (Namespace *) + Tcl_GetObjectNamespace(object); + varPtr = TclObjLookupVar(interp, objv[i], NULL, TCL_NAMESPACE_ONLY, + "define", 1, 0, &aryPtr); + iPtr->varFramePtr->nsPtr = savedNsPtr; + + if (varPtr == NULL || aryPtr != NULL) { + /* + * Variable cannot be an element in an array. If aryPtr is not + * NULL, it is an element, so throw up an error and return. + */ + + TclVarErrMsg(interp, varName, NULL, "define", + "name refers to an element in an array"); + return TCL_ERROR; + } + + /* + * Arrange for the lifetime of the variable to be correctly managed. + * This is copied out of Tcl_VariableObjCmd... + */ + + if (!TclIsVarNamespaceVar(varPtr)) { + TclSetVarNamespaceVar(varPtr); + } + + if (TclPtrMakeUpvar(interp, varPtr, varName, 0, -1) != TCL_OK) { + return TCL_ERROR; + } + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOO_Object_VarName -- + * + * Implementation of the oo::object->varname method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOO_Object_VarName( + ClientData clientData, /* Ignored. */ + Tcl_Interp *interp, /* Interpreter in which to create the object; + * also used for error reporting. */ + Tcl_ObjectContext context, /* The object/call context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* The actual arguments. */ +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *aryVar; + Tcl_Obj *varNamePtr; + + if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) { + Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, + "varName"); + return TCL_ERROR; + } + + /* + * Switch to the object's namespace for the duration of this call. Like + * this, the variable is looked up in the namespace of the object, and not + * in the namespace of the caller. Otherwise this would only work if the + * caller was a method of the object itself, which might not be true if + * the method was exported. This is a bit of a hack, but the simplest way + * to do this (pushing a stack frame would be horribly expensive by + * comparison, and is only done when we'd otherwise interfere with the + * global namespace). + */ + + if (iPtr->varFramePtr == NULL) { + Tcl_CallFrame *dummyFrame; + + TclPushStackFrame(interp, &dummyFrame, + Tcl_GetObjectNamespace(Tcl_ObjectContextObject(context)),0); + varPtr = TclObjLookupVar(interp, objv[objc-1], NULL, + TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG, "refer to",1,1,&aryVar); + TclPopStackFrame(interp); + } else { + Namespace *savedNsPtr; + + savedNsPtr = iPtr->varFramePtr->nsPtr; + iPtr->varFramePtr->nsPtr = (Namespace *) + Tcl_GetObjectNamespace(Tcl_ObjectContextObject(context)); + varPtr = TclObjLookupVar(interp, objv[objc-1], NULL, + TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG, "refer to",1,1,&aryVar); + iPtr->varFramePtr->nsPtr = savedNsPtr; + } + + if (varPtr == NULL) { + return TCL_ERROR; + } + + varNamePtr = Tcl_NewObj(); + Tcl_GetVariableFullName(interp, (Tcl_Var) varPtr, varNamePtr); + Tcl_SetObjResult(interp, varNamePtr); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOONextObjCmd -- + * + * Implementation of the [next] command. Note that this command is only + * ever to be used inside the body of a procedure-like method. + * + * ---------------------------------------------------------------------- + */ + +int +TclOONextObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Interp *iPtr = (Interp *) interp; + CallFrame *framePtr = iPtr->varFramePtr; + Tcl_ObjectContext context; + int result; + + /* + * Start with sanity checks on the calling context to make sure that we + * are invoked from a suitable method context. If so, we can safely + * retrieve the handle to the object call context. + */ + + if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) { + Tcl_AppendResult(interp, TclGetString(objv[0]), + " may only be called from inside a method", NULL); + return TCL_ERROR; + } + context = framePtr->clientData; + + /* + * Invoke the (advanced) method call context in the caller context. Note + * that this is like [uplevel 1] and not [eval]. + */ + + iPtr->varFramePtr = framePtr->callerVarPtr; + result = Tcl_ObjectContextInvokeNext(interp, context, objc, objv, 1); + iPtr->varFramePtr = framePtr; + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOSelfObjCmd -- + * + * Implementation of the [self] command, which provides introspection of + * the call context. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOSelfObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + static const char *subcmds[] = { + "caller", "class", "filter", "method", "namespace", "next", "object", + "target", NULL + }; + enum SelfCmds { + SELF_CALLER, SELF_CLASS, SELF_FILTER, SELF_METHOD, SELF_NS, SELF_NEXT, + SELF_OBJECT, SELF_TARGET + }; + Interp *iPtr = (Interp *) interp; + CallFrame *framePtr = iPtr->varFramePtr; + CallContext *contextPtr; + int index; + +#define CurrentlyInvoked(contextPtr) \ + ((contextPtr)->callPtr->chain[(contextPtr)->index]) + + /* + * Start with sanity checks on the calling context and the method context. + */ + + if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) { + Tcl_AppendResult(interp, TclGetString(objv[0]), + " may only be called from inside a method", NULL); + return TCL_ERROR; + } + + contextPtr = framePtr->clientData; + + /* + * Now we do "conventional" argument parsing for a while. Note that no + * subcommand takes arguments. + */ + + if (objc > 2) { + Tcl_WrongNumArgs(interp, 1, objv, "subcommand"); + return TCL_ERROR; + } else if (objc == 1) { + index = SELF_OBJECT; + } else if (Tcl_GetIndexFromObj(interp, objv[1], subcmds, "subcommand", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + + switch ((enum SelfCmds) index) { + case SELF_OBJECT: + Tcl_SetObjResult(interp, TclOOObjectName(interp, contextPtr->oPtr)); + return TCL_OK; + case SELF_NS: + Tcl_SetObjResult(interp, Tcl_NewStringObj( + contextPtr->oPtr->namespacePtr->fullName,-1)); + return TCL_OK; + case SELF_CLASS: { + Method *mPtr = CurrentlyInvoked(contextPtr).mPtr; + Object *declarerPtr; + + if (mPtr->declaringClassPtr != NULL) { + declarerPtr = mPtr->declaringClassPtr->thisPtr; + } else if (mPtr->declaringObjectPtr != NULL) { + declarerPtr = mPtr->declaringObjectPtr; + } else { + /* + * This should be unreachable code. + */ + + Tcl_AppendResult(interp, "method without declarer!", NULL); + return TCL_ERROR; + } + + Tcl_SetObjResult(interp, TclOOObjectName(interp, declarerPtr)); + return TCL_OK; + } + case SELF_METHOD: + if (contextPtr->callPtr->flags & CONSTRUCTOR) { + Tcl_AppendResult(interp, "", NULL); + } else if (contextPtr->callPtr->flags & DESTRUCTOR) { + Tcl_AppendResult(interp, "", NULL); + } else { + Tcl_SetObjResult(interp, + CurrentlyInvoked(contextPtr).mPtr->namePtr); + } + return TCL_OK; + case SELF_FILTER: + if (!CurrentlyInvoked(contextPtr).isFilter) { + Tcl_AppendResult(interp, "not inside a filtering context", NULL); + return TCL_ERROR; + } else { + register struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); + Tcl_Obj *result[3]; + Object *oPtr; + const char *type; + + if (miPtr->filterDeclarer != NULL) { + oPtr = miPtr->filterDeclarer->thisPtr; + type = "class"; + } else { + oPtr = contextPtr->oPtr; + type = "object"; + } + + result[0] = TclOOObjectName(interp, oPtr); + result[1] = Tcl_NewStringObj(type, -1); + result[2] = miPtr->mPtr->namePtr; + Tcl_SetObjResult(interp, Tcl_NewListObj(3, result)); + return TCL_OK; + } + case SELF_CALLER: + if ((framePtr->callerVarPtr != NULL) && + (framePtr->callerVarPtr->isProcCallFrame & FRAME_IS_METHOD)) { + CallContext *callerPtr = framePtr->callerVarPtr->clientData; + Method *mPtr = callerPtr->callPtr->chain[callerPtr->index].mPtr; + Object *declarerPtr; + + if (mPtr->declaringClassPtr != NULL) { + declarerPtr = mPtr->declaringClassPtr->thisPtr; + } else if (mPtr->declaringObjectPtr != NULL) { + declarerPtr = mPtr->declaringObjectPtr; + } else { + /* + * This should be unreachable code. + */ + + Tcl_AppendResult(interp, "method without declarer!", NULL); + return TCL_ERROR; + } + + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + TclOOObjectName(interp, declarerPtr)); + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + TclOOObjectName(interp, callerPtr->oPtr)); + if (callerPtr->callPtr->flags & CONSTRUCTOR) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj("", -1)); + } else if (callerPtr->callPtr->flags & DESTRUCTOR) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj("", -1)); + } else { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + mPtr->namePtr); + } + return TCL_OK; + } else { + Tcl_AppendResult(interp, "caller is not an object", NULL); + return TCL_ERROR; + } + case SELF_NEXT: + if (contextPtr->index < contextPtr->callPtr->numChain-1) { + Method *mPtr = + contextPtr->callPtr->chain[contextPtr->index+1].mPtr; + Object *declarerPtr; + + if (mPtr->declaringClassPtr != NULL) { + declarerPtr = mPtr->declaringClassPtr->thisPtr; + } else if (mPtr->declaringObjectPtr != NULL) { + declarerPtr = mPtr->declaringObjectPtr; + } else { + /* + * This should be unreachable code. + */ + + Tcl_AppendResult(interp, "method without declarer!", NULL); + return TCL_ERROR; + } + + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + TclOOObjectName(interp, declarerPtr)); + if (contextPtr->callPtr->flags & CONSTRUCTOR) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj("", -1)); + } else if (contextPtr->callPtr->flags & DESTRUCTOR) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj("", -1)); + } else { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + mPtr->namePtr); + } + } + return TCL_OK; + case SELF_TARGET: + if (!CurrentlyInvoked(contextPtr).isFilter) { + Tcl_AppendResult(interp, "not inside a filtering context", NULL); + return TCL_ERROR; + } else { + Method *mPtr; + Object *declarerPtr; + int i; + + for (i=contextPtr->index ; icallPtr->numChain ; i++){ + if (!contextPtr->callPtr->chain[i].isFilter) { + break; + } + } + if (i == contextPtr->callPtr->numChain) { + Tcl_Panic("filtering call chain without terminal non-filter"); + } + mPtr = contextPtr->callPtr->chain[i].mPtr; + if (mPtr->declaringClassPtr != NULL) { + declarerPtr = mPtr->declaringClassPtr->thisPtr; + } else if (mPtr->declaringObjectPtr != NULL) { + declarerPtr = mPtr->declaringObjectPtr; + } else { + /* + * This should be unreachable code. + */ + + Tcl_AppendResult(interp, "method without declarer!", NULL); + return TCL_ERROR; + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + TclOOObjectName(interp, declarerPtr)); + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + mPtr->namePtr); + return TCL_OK; + } + } + return TCL_ERROR; +} + +/* + * ---------------------------------------------------------------------- + * + * CopyObjectCmd -- + * + * Implementation of the [oo::copy] command, which clones an object (but + * not its namespace). Note that no constructors are called during this + * process. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOCopyObjectCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Tcl_Object oPtr, o2Ptr; + + if (objc < 2 || objc > 3) { + Tcl_WrongNumArgs(interp, 1, objv, "sourceName ?targetName?"); + return TCL_ERROR; + } + + oPtr = Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + /* + * Create a cloned object of the correct class. Note that constructors are + * not called. Also note that we must resolve the object name ourselves + * because we do not want to create the object in the current namespace, + * but rather in the context of the namespace of the caller of the overall + * [oo::define] command. + */ + + if (objc == 2) { + o2Ptr = Tcl_CopyObjectInstance(interp, oPtr, NULL, NULL); + } else { + char *name; + Tcl_DString buffer; + + name = TclGetString(objv[2]); + Tcl_DStringInit(&buffer); + if (name[0]!=':' || name[1]!=':') { + Interp *iPtr = (Interp *) interp; + + if (iPtr->varFramePtr != NULL) { + Tcl_DStringAppend(&buffer, + iPtr->varFramePtr->nsPtr->fullName, -1); + } + Tcl_DStringAppend(&buffer, "::", 2); + Tcl_DStringAppend(&buffer, name, -1); + name = Tcl_DStringValue(&buffer); + } + o2Ptr = Tcl_CopyObjectInstance(interp, oPtr, name, NULL); + Tcl_DStringFree(&buffer); + } + + if (o2Ptr == NULL) { + return TCL_ERROR; + } + + /* + * Return the name of the cloned object. + */ + + Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) o2Ptr)); + return TCL_OK; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c new file mode 100644 index 0000000..551a3fd --- /dev/null +++ b/generic/tclOOCall.c @@ -0,0 +1,1211 @@ +/* + * tclOOCall.c -- + * + * This file contains the method call chain management code for the + * object-system core. + * + * Copyright (c) 2005-2008 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOOCall.c,v 1.4 2008/05/31 11:42:17 dkf Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclInt.h" +#include "tclOOInt.h" + +/* + * Structure containing a CallContext and any other values needed only during + * the construction of the CallContext. + */ + +struct ChainBuilder { + CallChain *callChainPtr; /* The call chain being built. */ + int filterLength; /* Number of entries in the call chain that + * are due to processing filters and not the + * main call chain. */ + Object *oPtr; /* The object that we are building the chain + * for. */ +}; + +/* + * Extra flags used for call chain management. + */ + +#define DEFINITE_PROTECTED 0x100000 +#define DEFINITE_PUBLIC 0x200000 +#define KNOWN_STATE (DEFINITE_PROTECTED | DEFINITE_PUBLIC) +#define SPECIAL (CONSTRUCTOR | DESTRUCTOR) + +/* + * Function declarations for things defined in this file. + */ + +static void AddClassFiltersToCallContext(Object *const oPtr, + Class *clsPtr, struct ChainBuilder *const cbPtr, + Tcl_HashTable *const doneFilters); +static void AddClassMethodNames(Class *clsPtr, const int flags, + Tcl_HashTable *const namesPtr); +static inline void AddMethodToCallChain(Method *const mPtr, + struct ChainBuilder *const cbPtr, + Tcl_HashTable *const doneFilters, + Class *const filterDecl); +static inline void AddSimpleChainToCallContext(Object *const oPtr, + Tcl_Obj *const methodNameObj, + struct ChainBuilder *const cbPtr, + Tcl_HashTable *const doneFilters, int flags, + Class *const filterDecl); +static void AddSimpleClassChainToCallContext(Class *classPtr, + Tcl_Obj *const methodNameObj, + struct ChainBuilder *const cbPtr, + Tcl_HashTable *const doneFilters, int flags, + Class *const filterDecl); +static int CmpStr(const void *ptr1, const void *ptr2); +static void DupMethodNameRep(Tcl_Obj *srcPtr, Tcl_Obj *dstPtr); +static void FreeMethodNameRep(Tcl_Obj *objPtr); +static inline int IsStillValid(CallChain *callPtr, Object *oPtr, + int flags, int reuseMask); +static inline void StashCallChain(Tcl_Obj *objPtr, CallChain *callPtr); + +/* + * Object type used to manage type caches attached to method names. + */ + +static Tcl_ObjType methodNameType = { + "TclOO method name", + FreeMethodNameRep, + DupMethodNameRep, + NULL, + NULL +}; + +/* + * ---------------------------------------------------------------------- + * + * TclOODeleteContext -- + * + * Destroys a method call-chain context, which should not be in use. + * + * ---------------------------------------------------------------------- + */ + +void +TclOODeleteContext( + CallContext *contextPtr) +{ + TclOODeleteChain(contextPtr->callPtr); + TclStackFree(contextPtr->oPtr->fPtr->interp, contextPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODeleteChainCache -- + * + * Destroy the cache of method call-chains. + * + * ---------------------------------------------------------------------- + */ + +void +TclOODeleteChainCache( + Tcl_HashTable *tablePtr) +{ + FOREACH_HASH_DECLS; + CallChain *callPtr; + + FOREACH_HASH_VALUE(callPtr, tablePtr) { + if (callPtr) { + TclOODeleteChain(callPtr); + } + } + Tcl_DeleteHashTable(tablePtr); + ckfree((char *) tablePtr); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODeleteChain -- + * + * Destroys a method call-chain. + * + * ---------------------------------------------------------------------- + */ + +void +TclOODeleteChain( + CallChain *callPtr) +{ + if (--callPtr->refCount >= 1) { + return; + } + if (callPtr->chain != callPtr->staticChain) { + ckfree((char *) callPtr->chain); + } + ckfree((char *) callPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOStashContext -- + * + * Saves a reference to a method call context in a Tcl_Obj's internal + * representation. + * + * ---------------------------------------------------------------------- + */ + +static inline void +StashCallChain( + Tcl_Obj *objPtr, + CallChain *callPtr) +{ + callPtr->refCount++; + if (objPtr->typePtr && objPtr->typePtr->freeIntRepProc) { + objPtr->typePtr->freeIntRepProc(objPtr); + } + objPtr->typePtr = &methodNameType; + objPtr->internalRep.otherValuePtr = callPtr; +} + +void +TclOOStashContext( + Tcl_Obj *objPtr, + CallContext *contextPtr) +{ + StashCallChain(objPtr, contextPtr->callPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * DupMethodNameRep, FreeMethodNameRep -- + * + * Functions to implement the required parts of the Tcl_Obj guts needed + * for caching of method contexts in Tcl_Objs. + * + * ---------------------------------------------------------------------- + */ + +static void +DupMethodNameRep( + Tcl_Obj *srcPtr, + Tcl_Obj *dstPtr) +{ + register CallChain *callPtr = srcPtr->internalRep.otherValuePtr; + + dstPtr->typePtr = &methodNameType; + dstPtr->internalRep.otherValuePtr = callPtr; + callPtr->refCount++; +} + +static void +FreeMethodNameRep( + Tcl_Obj *objPtr) +{ + register CallChain *callPtr = objPtr->internalRep.otherValuePtr; + + TclOODeleteChain(callPtr); + objPtr->internalRep.otherValuePtr = NULL; + objPtr->typePtr = NULL; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOInvokeContext -- + * + * Invokes a single step along a method call-chain context. Note that the + * invokation of a step along the chain can cause further steps along the + * chain to be invoked. Note that this function is written to be as light + * in stack usage as possible. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOInvokeContext( + Tcl_Interp *const interp, /* Interpreter for error reporting, and many + * other sorts of context handling (e.g., + * commands, variables) depending on method + * implementation. */ + CallContext *const contextPtr, + /* The method call context. */ + const int objc, /* The number of arguments. */ + Tcl_Obj *const *const objv) /* The arguments as actually seen. */ +{ + Method *const mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; + const int isFirst = (contextPtr->index == 0); + const int isFilter = + contextPtr->callPtr->chain[contextPtr->index].isFilter; + int result, wasFilter; + + /* + * If this is the first step along the chain, we preserve the method + * entries in the chain so that they do not get deleted out from under our + * feet. + */ + + if (isFirst) { + int i; + + for (i=0 ; icallPtr->numChain ; i++) { + AddRef(contextPtr->callPtr->chain[i].mPtr); + } + + /* + * Ensure that the method name itself is part of the arguments when + * we're doing unknown processing. + */ + + if (contextPtr->callPtr->flags & OO_UNKNOWN_METHOD) { + contextPtr->skip--; + } + } + + /* + * Save whether we were in a filter and set up whether we are now. + */ + + wasFilter = contextPtr->oPtr->flags & FILTER_HANDLING; + if (isFilter || contextPtr->callPtr->flags & FILTER_HANDLING) { + contextPtr->oPtr->flags |= FILTER_HANDLING; + } else { + contextPtr->oPtr->flags &= ~FILTER_HANDLING; + } + + /* + * Run the method implementation. + */ + + result = mPtr->typePtr->callProc(mPtr->clientData, interp, + (Tcl_ObjectContext) contextPtr, objc, objv); + + /* + * Restore the old filter-ness, release any locks on method + * implementations, and return the result code. + */ + + if (wasFilter) { + contextPtr->oPtr->flags |= FILTER_HANDLING; + } else { + contextPtr->oPtr->flags &= ~FILTER_HANDLING; + } + if (isFirst) { + int i; + + for (i=0 ; icallPtr->numChain ; i++) { + TclOODelMethodRef(contextPtr->callPtr->chain[i].mPtr); + } + } + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOGetSortedMethodList, TclOOGetSortedClassMethodList -- + * + * Discovers the list of method names supported by an object or class. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOGetSortedMethodList( + Object *oPtr, /* The object to get the method names for. */ + int flags, /* Whether we just want the public method + * names. */ + const char ***stringsPtr) /* Where to write a pointer to the array of + * strings to. */ +{ + Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list" + * mapping. */ + FOREACH_HASH_DECLS; + int i; + Class *mixinPtr; + Tcl_Obj *namePtr; + Method *mPtr; + int isWantedIn; + void *isWanted; + + Tcl_InitObjHashTable(&names); + + /* + * Name the bits used in the names table values. + */ +#define IN_LIST 1 +#define NO_IMPLEMENTATION 2 + + /* + * Process method names due to the object. + */ + + if (oPtr->methodsPtr) { + FOREACH_HASH(namePtr, mPtr, oPtr->methodsPtr) { + int isNew; + + if ((mPtr->flags & PRIVATE_METHOD) && !(flags & PRIVATE_METHOD)) { + continue; + } + hPtr = Tcl_CreateHashEntry(&names, (char *) namePtr, &isNew); + if (isNew) { + isWantedIn = ((!(flags & PUBLIC_METHOD) + || mPtr->flags & PUBLIC_METHOD) ? IN_LIST : 0); + isWantedIn |= (mPtr->typePtr == NULL ? NO_IMPLEMENTATION : 0); + Tcl_SetHashValue(hPtr, (void *) isWantedIn); + } + } + } + + /* + * Process method names due to private methods on the object's class. + */ + + if (flags & PRIVATE_METHOD) { + FOREACH_HASH(namePtr, mPtr, &oPtr->selfCls->classMethods) { + if (mPtr->flags & PRIVATE_METHOD) { + int isNew; + + hPtr = Tcl_CreateHashEntry(&names, (char *) namePtr, &isNew); + if (isNew) { + isWantedIn = IN_LIST; + if (mPtr->typePtr == NULL) { + isWantedIn |= NO_IMPLEMENTATION; + } + Tcl_SetHashValue(hPtr, (void *) isWantedIn); + } else if (mPtr->typePtr != NULL) { + isWantedIn = (int) Tcl_GetHashValue(hPtr); + if (isWantedIn & NO_IMPLEMENTATION) { + isWantedIn &= ~NO_IMPLEMENTATION; + Tcl_SetHashValue(hPtr, (void *) isWantedIn); + } + } + } + } + } + + /* + * Process (normal) method names from the class hierarchy and the mixin + * hierarchy. + */ + + AddClassMethodNames(oPtr->selfCls, flags, &names); + FOREACH(mixinPtr, oPtr->mixins) { + AddClassMethodNames(mixinPtr, flags, &names); + } + + /* + * See how many (visible) method names there are. If none, we do not (and + * should not) try to sort the list of them. + */ + + i = 0; + if (names.numEntries != 0) { + const char **strings; + + /* + * We need to build the list of methods to sort. We will be using + * qsort() for this, because it is very unlikely that the list will be + * heavily sorted when it is long enough to matter. + */ + + strings = (const char **) ckalloc(sizeof(char *) * names.numEntries); + FOREACH_HASH(namePtr, isWanted, &names) { + if (!(flags & PUBLIC_METHOD) || (((int)isWanted) & IN_LIST)) { + if (((int)isWanted) & NO_IMPLEMENTATION) { + continue; + } + strings[i++] = TclGetString(namePtr); + } + } + + /* + * Note that 'i' may well be less than names.numEntries when we are + * dealing with public method names. + */ + + qsort((void *) strings, (unsigned) i, sizeof(char *), CmpStr); + *stringsPtr = strings; + } + + Tcl_DeleteHashTable(&names); + return i; +} + +int +TclOOGetSortedClassMethodList( + Class *clsPtr, /* The class to get the method names for. */ + int flags, /* Whether we just want the public method + * names. */ + const char ***stringsPtr) /* Where to write a pointer to the array of + * strings to. */ +{ + Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list" + * mapping. */ + FOREACH_HASH_DECLS; + int i; + Tcl_Obj *namePtr; + void *isWanted; + + Tcl_InitObjHashTable(&names); + + /* + * Process method names from the class hierarchy and the mixin hierarchy. + */ + + AddClassMethodNames(clsPtr, flags, &names); + + /* + * See how many (visible) method names there are. If none, we do not (and + * should not) try to sort the list of them. + */ + + i = 0; + if (names.numEntries != 0) { + const char **strings; + + /* + * We need to build the list of methods to sort. We will be using + * qsort() for this, because it is very unlikely that the list will be + * heavily sorted when it is long enough to matter. + */ + + strings = (const char **) ckalloc(sizeof(char *) * names.numEntries); + FOREACH_HASH(namePtr, isWanted, &names) { + if (!(flags & PUBLIC_METHOD) || (((int)isWanted) & IN_LIST)) { + if (((int)isWanted) & NO_IMPLEMENTATION) { + continue; + } + strings[i++] = TclGetString(namePtr); + } + } + + /* + * Note that 'i' may well be less than names.numEntries when we are + * dealing with public method names. + */ + + qsort((void *) strings, (unsigned) i, sizeof(char *), CmpStr); + *stringsPtr = strings; + } + + Tcl_DeleteHashTable(&names); + return i; +} + +/* Comparator for GetSortedMethodList */ +static int +CmpStr( + const void *ptr1, + const void *ptr2) +{ + const char **strPtr1 = (const char **) ptr1; + const char **strPtr2 = (const char **) ptr2; + + return TclpUtfNcmp2(*strPtr1, *strPtr2, strlen(*strPtr1)+1); +} + +/* + * ---------------------------------------------------------------------- + * + * AddClassMethodNames -- + * + * Adds the method names defined by a class (or its superclasses) to the + * collection being built. The collection is built in a hash table to + * ensure that duplicates are excluded. Helper for GetSortedMethodList(). + * + * ---------------------------------------------------------------------- + */ + +static void +AddClassMethodNames( + Class *clsPtr, /* Class to get method names from. */ + const int flags, /* Whether we are interested in just the + * public method names. */ + Tcl_HashTable *const namesPtr) + /* Reference to the hash table to put the + * information in. The hash table maps the + * Tcl_Obj * method name to an integral value + * describing whether the method is wanted. + * This ensures that public/private override + * semantics are handled correctly.*/ +{ + /* + * Scope all declarations so that the compiler can stand a good chance of + * making the recursive step highly efficient. We also hand-implement the + * tail-recursive case using a while loop; C compilers typically cannot do + * tail-recursion optimization usefully. + */ + + if (clsPtr->mixins.num != 0) { + Class *mixinPtr; + int i; + + /* TODO: Beware of infinite loops! */ + FOREACH(mixinPtr, clsPtr->mixins) { + AddClassMethodNames(mixinPtr, flags, namesPtr); + } + } + + while (1) { + FOREACH_HASH_DECLS; + Tcl_Obj *namePtr; + Method *mPtr; + + FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) { + int isNew; + + hPtr = Tcl_CreateHashEntry(namesPtr, (char *) namePtr, &isNew); + if (isNew) { + int isWanted = (!(flags & PUBLIC_METHOD) + || (mPtr->flags & PUBLIC_METHOD)) ? IN_LIST : 0; + + Tcl_SetHashValue(hPtr, (void *) isWanted); + } else if ((((int)Tcl_GetHashValue(hPtr)) & NO_IMPLEMENTATION) + && mPtr->typePtr != NULL) { + int isWanted = (int) Tcl_GetHashValue(hPtr); + + isWanted &= ~NO_IMPLEMENTATION; + Tcl_SetHashValue(hPtr, (void *) isWanted); + } + } + + if (clsPtr->superclasses.num != 1) { + break; + } + clsPtr = clsPtr->superclasses.list[0]; + } + if (clsPtr->superclasses.num != 0) { + Class *superPtr; + int i; + + FOREACH(superPtr, clsPtr->superclasses) { + AddClassMethodNames(superPtr, flags, namesPtr); + } + } +} + +/* + * ---------------------------------------------------------------------- + * + * AddSimpleChainToCallContext -- + * + * The core of the call-chain construction engine, this handles calling a + * particular method on a particular object. Note that filters and + * unknown handling are already handled by the logic that uses this + * function. + * + * ---------------------------------------------------------------------- + */ + +static inline void +AddSimpleChainToCallContext( + Object *const oPtr, /* Object to add call chain entries for. */ + Tcl_Obj *const methodNameObj, + /* Name of method to add the call chain + * entries for. */ + struct ChainBuilder *const cbPtr, + /* Where to add the call chain entries. */ + Tcl_HashTable *const doneFilters, + /* Where to record what call chain entries + * have been processed. */ + int flags, /* What sort of call chain are we building. */ + Class *const filterDecl) /* The class that declared the filter. If + * NULL, either the filter was declared by the + * object or this isn't a filter. */ +{ + int i; + + if (!(flags & (KNOWN_STATE | SPECIAL)) && oPtr->methodsPtr) { + Tcl_HashEntry *hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, + (char *) methodNameObj); + + if (hPtr != NULL) { + Method *mPtr = Tcl_GetHashValue(hPtr); + + if (flags & PUBLIC_METHOD) { + if (!(mPtr->flags & PUBLIC_METHOD)) { + return; + } else { + flags |= DEFINITE_PUBLIC; + } + } else { + flags |= DEFINITE_PROTECTED; + } + } + } + if (!(flags & SPECIAL)) { + Tcl_HashEntry *hPtr; + Class *mixinPtr; + + FOREACH(mixinPtr, oPtr->mixins) { + AddSimpleClassChainToCallContext(mixinPtr, methodNameObj, cbPtr, + doneFilters, flags, filterDecl); + } + if (oPtr->methodsPtr) { + hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char*) methodNameObj); + if (hPtr != NULL) { + AddMethodToCallChain(Tcl_GetHashValue(hPtr), cbPtr, + doneFilters, filterDecl); + } + } + } + AddSimpleClassChainToCallContext(oPtr->selfCls, methodNameObj, cbPtr, + doneFilters, flags, filterDecl); +} + +/* + * ---------------------------------------------------------------------- + * + * AddMethodToCallChain -- + * + * Utility method that manages the adding of a particular method + * implementation to a call-chain. + * + * ---------------------------------------------------------------------- + */ + +static inline void +AddMethodToCallChain( + Method *const mPtr, /* Actual method implementation to add to call + * chain (or NULL, a no-op). */ + struct ChainBuilder *const cbPtr, + /* The call chain to add the method + * implementation to. */ + Tcl_HashTable *const doneFilters, + /* Where to record what filters have been + * processed. If NULL, not processing filters. + * Note that this function does not update + * this hashtable. */ + Class *const filterDecl) /* The class that declared the filter. If + * NULL, either the filter was declared by the + * object or this isn't a filter. */ +{ + register CallChain *callPtr = cbPtr->callChainPtr; + int i; + + /* + * Return if this is just an entry used to record whether this is a public + * method. If so, there's nothing real to call and so nothing to add to + * the call chain. + */ + + if (mPtr == NULL || mPtr->typePtr == NULL) { + return; + } + + /* + * Enforce real private method handling here. We will skip adding this + * method IF + * 1) we are not allowing private methods, AND + * 2) this is a private method, AND + * 3) this is a class method, AND + * 4) this method was not declared by the class of the current object. + * + * This does mean that only classes really handle private methods. This + * should be sufficient for [incr Tcl] support though. + */ + + if (!(callPtr->flags & PRIVATE_METHOD) + && (mPtr->flags & PRIVATE_METHOD) + && (mPtr->declaringClassPtr != NULL) + && (mPtr->declaringClassPtr != cbPtr->oPtr->selfCls)) { + return; + } + + /* + * First test whether the method is already in the call chain. Skip over + * any leading filters. + */ + + for (i=cbPtr->filterLength ; inumChain ; i++) { + if (callPtr->chain[i].mPtr == mPtr && + callPtr->chain[i].isFilter == (doneFilters != NULL)) { + /* + * Call chain semantics states that methods come as *late* in the + * call chain as possible. This is done by copying down the + * following methods. Note that this does not change the number of + * method invokations in the call chain; it just rearranges them. + */ + + Class *declCls = callPtr->chain[i].filterDeclarer; + + for (; i+1numChain ; i++) { + callPtr->chain[i] = callPtr->chain[i+1]; + } + callPtr->chain[i].mPtr = mPtr; + callPtr->chain[i].isFilter = (doneFilters != NULL); + callPtr->chain[i].filterDeclarer = declCls; + return; + } + } + + /* + * Need to really add the method. This is made a bit more complex by the + * fact that we are using some "static" space initially, and only start + * realloc-ing if the chain gets long. + */ + + if (callPtr->numChain == CALL_CHAIN_STATIC_SIZE) { + callPtr->chain = (struct MInvoke *) + ckalloc(sizeof(struct MInvoke)*(callPtr->numChain+1)); + memcpy(callPtr->chain, callPtr->staticChain, + sizeof(struct MInvoke) * callPtr->numChain); + } else if (callPtr->numChain > CALL_CHAIN_STATIC_SIZE) { + callPtr->chain = (struct MInvoke *) ckrealloc((char *) callPtr->chain, + sizeof(struct MInvoke) * (callPtr->numChain + 1)); + } + callPtr->chain[i].mPtr = mPtr; + callPtr->chain[i].isFilter = (doneFilters != NULL); + callPtr->chain[i].filterDeclarer = filterDecl; + callPtr->numChain++; +} + +/* + * ---------------------------------------------------------------------- + * + * InitCallChain -- + * Encoding of the policy of how to set up a call chain. Doesn't populate + * the chain with the method implementation data. + * + * ---------------------------------------------------------------------- + */ + +static inline void +InitCallChain( + CallChain *callPtr, + Object *oPtr, + int flags) +{ + if (oPtr->flags & USE_CLASS_CACHE) { + oPtr = oPtr->selfCls->thisPtr; + } + callPtr->epoch = oPtr->fPtr->epoch; + callPtr->objectCreationEpoch = oPtr->creationEpoch; + callPtr->objectEpoch = oPtr->epoch; + callPtr->flags = flags & + (PUBLIC_METHOD | PRIVATE_METHOD | SPECIAL | FILTER_HANDLING); + callPtr->refCount = 1; + callPtr->numChain = 0; + callPtr->chain = callPtr->staticChain; +} + +/* + * ---------------------------------------------------------------------- + * + * IsStillValid -- + * Calculates whether the given call chain can be used for executing a + * method for the given object. The condition on a chain from a cached + * location being reusable is: + * - Refers to the same object (same creation epoch), and + * - Still across the same class structure (same global epoch), and + * - Still across the same object strucutre (same local epoch), and + * - No public/private/filter magic leakage (same flags, modulo the fact + * that a public chain will satisfy a non-public call). + * + * ---------------------------------------------------------------------- + */ + +static inline int +IsStillValid( + CallChain *callPtr, + Object *oPtr, + int flags, + int mask) +{ + if ((oPtr->flags & USE_CLASS_CACHE)) { + register Object *coPtr = oPtr->selfCls->thisPtr; + + return ((callPtr->objectCreationEpoch == coPtr->creationEpoch) + && (callPtr->epoch == coPtr->fPtr->epoch) + && (callPtr->objectEpoch == coPtr->epoch) + && ((callPtr->flags & mask) == (flags & mask))); + } + return ((callPtr->objectCreationEpoch == oPtr->creationEpoch) + && (callPtr->epoch == oPtr->fPtr->epoch) + && (callPtr->objectEpoch == oPtr->epoch) + && ((callPtr->flags & mask) == (flags & mask))); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOGetCallContext -- + * + * Responsible for constructing the call context, an ordered list of all + * method implementations to be called as part of a method invokation. + * This method is central to the whole operation of the OO system. + * + * ---------------------------------------------------------------------- + */ + +CallContext * +TclOOGetCallContext( + Object *oPtr, /* The object to get the context for. */ + Tcl_Obj *methodNameObj, /* The name of the method to get the context + * for. NULL when getting a constructor or + * destructor chain. */ + int flags) /* What sort of context are we looking for. + * Only the bits PUBLIC_METHOD, CONSTRUCTOR, + * PRIVATE_METHOD, DESTRUCTOR and + * FILTER_HANDLING are useful. */ +{ + CallContext *contextPtr; + CallChain *callPtr; + struct ChainBuilder cb; + int i, count, doFilters; + Tcl_HashEntry *hPtr; + Tcl_HashTable doneFilters; + + if (flags&(SPECIAL|FILTER_HANDLING) || (oPtr->flags&FILTER_HANDLING)) { + hPtr = NULL; + doFilters = 0; + + /* + * Check if we have a cached valid constructor or destructor. + */ + + if (flags & CONSTRUCTOR) { + callPtr = oPtr->selfCls->constructorChainPtr; + if ((callPtr != NULL) + && (callPtr->objectEpoch == oPtr->selfCls->thisPtr->epoch) + && (callPtr->epoch == oPtr->fPtr->epoch)) { + callPtr->refCount++; + goto returnContext; + } + } else if (flags & DESTRUCTOR) { + callPtr = oPtr->selfCls->destructorChainPtr; + if ((oPtr->mixins.num == 0) && (callPtr != NULL) + && (callPtr->objectEpoch == oPtr->selfCls->thisPtr->epoch) + && (callPtr->epoch == oPtr->fPtr->epoch)) { + callPtr->refCount++; + goto returnContext; + } + } + } else { + /* + * Check if we can get the chain out of the Tcl_Obj method name or out + * of the cache. This is made a bit more complex by the fact that + * there are multiple different layers of cache (in the Tcl_Obj, in + * the object, and in the class). + */ + + const int reuseMask = ((flags & PUBLIC_METHOD) ? ~0 : ~PUBLIC_METHOD); + + if (methodNameObj->typePtr == &methodNameType) { + callPtr = methodNameObj->internalRep.otherValuePtr; + if (IsStillValid(callPtr, oPtr, flags, reuseMask)) { + callPtr->refCount++; + goto returnContext; + } + methodNameObj->typePtr->freeIntRepProc(methodNameObj); + } + + if (oPtr->flags & USE_CLASS_CACHE) { + if (oPtr->selfCls->classChainCache != NULL) { + hPtr = Tcl_FindHashEntry(oPtr->selfCls->classChainCache, + (char *) methodNameObj); + } else { + hPtr = NULL; + } + } else { + if (oPtr->chainCache != NULL) { + hPtr = Tcl_FindHashEntry(oPtr->chainCache, + (char *) methodNameObj); + } else { + hPtr = NULL; + } + } + + if (hPtr != NULL && Tcl_GetHashValue(hPtr) != NULL) { + callPtr = Tcl_GetHashValue(hPtr); + if (IsStillValid(callPtr, oPtr, flags, reuseMask)) { + callPtr->refCount++; + goto returnContext; + } + Tcl_SetHashValue(hPtr, NULL); + TclOODeleteChain(callPtr); + } + + doFilters = 1; + } + + callPtr = (CallChain *) ckalloc(sizeof(CallChain)); + InitCallChain(callPtr, oPtr, flags); + + cb.callChainPtr = callPtr; + cb.filterLength = 0; + cb.oPtr = oPtr; + + /* + * Add all defined filters (if any, and if we're going to be processing + * them; they're not processed for constructors, destructors or when we're + * in the middle of processing a filter). + */ + + if (doFilters) { + Tcl_Obj *filterObj; + Class *mixinPtr; + + doFilters = 1; + Tcl_InitObjHashTable(&doneFilters); + FOREACH(mixinPtr, oPtr->mixins) { + AddClassFiltersToCallContext(oPtr, mixinPtr, &cb, &doneFilters); + } + FOREACH(filterObj, oPtr->filters) { + AddSimpleChainToCallContext(oPtr, filterObj, &cb, &doneFilters, 0, + NULL); + } + AddClassFiltersToCallContext(oPtr, oPtr->selfCls, &cb, &doneFilters); + Tcl_DeleteHashTable(&doneFilters); + } + count = cb.filterLength = callPtr->numChain; + + /* + * Add the actual method implementations. + */ + + AddSimpleChainToCallContext(oPtr, methodNameObj, &cb, NULL, flags, NULL); + + /* + * Check to see if the method has no implementation. If so, we probably + * need to add in a call to the unknown method. Otherwise, set up the + * cacheing of the method implementation (if relevant). + */ + + if (count == callPtr->numChain) { + /* + * Method does not actually exist. If we're dealing with constructors + * or destructors, this isn't a problem. + */ + + if (flags & SPECIAL) { + TclOODeleteChain(callPtr); + return NULL; + } + AddSimpleChainToCallContext(oPtr, oPtr->fPtr->unknownMethodNameObj, + &cb, NULL, 0, NULL); + callPtr->flags |= OO_UNKNOWN_METHOD; + callPtr->epoch = -1; + if (count == callPtr->numChain) { + TclOODeleteChain(callPtr); + return NULL; + } + } else if (doFilters) { + if (hPtr == NULL) { + if (oPtr->flags & USE_CLASS_CACHE) { + if (oPtr->selfCls->classChainCache == NULL) { + oPtr->selfCls->classChainCache = (Tcl_HashTable *) + ckalloc(sizeof(Tcl_HashTable)); + + Tcl_InitObjHashTable(oPtr->selfCls->classChainCache); + } + hPtr = Tcl_CreateHashEntry(oPtr->selfCls->classChainCache, + (char *) methodNameObj, &i); + } else { + if (oPtr->chainCache == NULL) { + oPtr->chainCache = (Tcl_HashTable *) + ckalloc(sizeof(Tcl_HashTable)); + + Tcl_InitObjHashTable(oPtr->chainCache); + } + hPtr = Tcl_CreateHashEntry(oPtr->chainCache, + (char *) methodNameObj, &i); + } + } + callPtr->refCount++; + Tcl_SetHashValue(hPtr, callPtr); + StashCallChain(methodNameObj, callPtr); + } else if (flags & CONSTRUCTOR) { + if (oPtr->selfCls->constructorChainPtr) { + TclOODeleteChain(oPtr->selfCls->constructorChainPtr); + } + oPtr->selfCls->constructorChainPtr = callPtr; + callPtr->refCount++; + } else if ((flags & DESTRUCTOR) && oPtr->mixins.num == 0) { + if (oPtr->selfCls->destructorChainPtr) { + TclOODeleteChain(oPtr->selfCls->destructorChainPtr); + } + oPtr->selfCls->destructorChainPtr = callPtr; + callPtr->refCount++; + } + + returnContext: + contextPtr = TclStackAlloc(oPtr->fPtr->interp, sizeof(CallContext)); + contextPtr->oPtr = oPtr; + contextPtr->callPtr = callPtr; + contextPtr->skip = 2; + contextPtr->index = 0; + return contextPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * AddClassFiltersToCallContext -- + * + * Logic to make extracting all the filters from the class context much + * easier. + * + * ---------------------------------------------------------------------- + */ + +static void +AddClassFiltersToCallContext( + Object *const oPtr, /* Object that the filters operate on. */ + Class *clsPtr, /* Class to get the filters from. */ + struct ChainBuilder *const cbPtr, + /* Context to fill with call chain entries. */ + Tcl_HashTable *const doneFilters) + /* Where to record what filters have been + * processed. Keys are objects, values are + * ignored. */ +{ + int i; + Class *superPtr, *mixinPtr; + Tcl_Obj *filterObj; + + tailRecurse: + if (clsPtr == NULL) { + return; + } + + /* + * Add all the filters defined by classes mixed into the main class + * hierarchy. + */ + + FOREACH(mixinPtr, clsPtr->mixins) { + AddClassFiltersToCallContext(oPtr, mixinPtr, cbPtr, doneFilters); + } + + /* + * Add all the class filters from the current class. Note that the filters + * are added starting at the object root, as this allows the object to + * override how filters work to extend their behaviour. + */ + + FOREACH(filterObj, clsPtr->filters) { + int isNew; + + (void) Tcl_CreateHashEntry(doneFilters, (char *) filterObj, &isNew); + if (isNew) { + AddSimpleChainToCallContext(oPtr, filterObj, cbPtr, doneFilters, + 0, clsPtr); + } + } + + /* + * Now process the recursive case. Notice the tail-call optimization. + */ + + switch (clsPtr->superclasses.num) { + case 1: + clsPtr = clsPtr->superclasses.list[0]; + goto tailRecurse; + default: + FOREACH(superPtr, clsPtr->superclasses) { + AddClassFiltersToCallContext(oPtr, superPtr, cbPtr, doneFilters); + } + case 0: + return; + } +} + +/* + * ---------------------------------------------------------------------- + * + * AddSimpleClassChainToCallContext -- + * + * Construct a call-chain from a class hierarchy. + * + * ---------------------------------------------------------------------- + */ + +static void +AddSimpleClassChainToCallContext( + Class *classPtr, /* Class to add the call chain entries for. */ + Tcl_Obj *const methodNameObj, + /* Name of method to add the call chain + * entries for. */ + struct ChainBuilder *const cbPtr, + /* Where to add the call chain entries. */ + Tcl_HashTable *const doneFilters, + /* Where to record what call chain entries + * have been processed. */ + int flags, /* What sort of call chain are we building. */ + Class *const filterDecl) /* The class that declared the filter. If + * NULL, either the filter was declared by the + * object or this isn't a filter. */ +{ + int i; + Class *superPtr; + + /* + * We hard-code the tail-recursive form. It's by far the most common case + * *and* it is much more gentle on the stack. + */ + + tailRecurse: + if (flags & CONSTRUCTOR) { + AddMethodToCallChain(classPtr->constructorPtr, cbPtr, doneFilters, + filterDecl); + + } else if (flags & DESTRUCTOR) { + AddMethodToCallChain(classPtr->destructorPtr, cbPtr, doneFilters, + filterDecl); + } else { + Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&classPtr->classMethods, + (char *) methodNameObj); + + if (hPtr != NULL) { + register Method *mPtr = Tcl_GetHashValue(hPtr); + + if (!(flags & KNOWN_STATE)) { + if (flags & PUBLIC_METHOD) { + if (mPtr->flags & PUBLIC_METHOD) { + flags |= DEFINITE_PUBLIC; + } else { + return; + } + } else { + flags |= DEFINITE_PROTECTED; + } + } + AddMethodToCallChain(mPtr, cbPtr, doneFilters, filterDecl); + } + } + + FOREACH(superPtr, classPtr->mixins) { + AddSimpleClassChainToCallContext(superPtr, methodNameObj, cbPtr, + doneFilters, flags, filterDecl); + } + + switch (classPtr->superclasses.num) { + case 1: + classPtr = classPtr->superclasses.list[0]; + goto tailRecurse; + default: + FOREACH(superPtr, classPtr->superclasses) { + AddSimpleClassChainToCallContext(superPtr, methodNameObj, cbPtr, + doneFilters, flags, filterDecl); + } + case 0: + return; + } +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h new file mode 100644 index 0000000..d67333b --- /dev/null +++ b/generic/tclOODecls.h @@ -0,0 +1,282 @@ +/* + * $Id: tclOODecls.h,v 1.1 2008/05/31 11:42:18 dkf Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + */ + + +#if defined(USE_TCLOO_STUBS) +extern const char *TclOOInitializeStubs( + Tcl_Interp *, const char *version, int epoch, int revision); +#define Tcl_OOInitStubs(interp) TclOOInitializeStubs( \ + interp, TCLOO_VERSION, TCLOO_STUBS_EPOCH, TCLOO_STUBS_REVISION) +#else +#define Tcl_OOInitStubs(interp) Tcl_PkgRequire(interp, "TclOO", TCLOO_VERSION) +#endif + + +/* !BEGIN!: Do not edit below this line. */ + +#define TCLOO_STUBS_EPOCH 0 +#define TCLOO_STUBS_REVISION 44 + +#if !defined(USE_TCLOO_STUBS) + +/* + * Exported function declarations: + */ + +/* 0 */ +TCLOOAPI Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, + Tcl_Object sourceObject, + const char * targetName, + const char * targetNamespaceName); +/* 1 */ +TCLOOAPI Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); +/* 2 */ +TCLOOAPI Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); +/* 3 */ +TCLOOAPI Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); +/* 4 */ +TCLOOAPI Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +/* 5 */ +TCLOOAPI Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); +/* 6 */ +TCLOOAPI Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); +/* 7 */ +TCLOOAPI Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); +/* 8 */ +TCLOOAPI int Tcl_MethodIsPublic (Tcl_Method method); +/* 9 */ +TCLOOAPI int Tcl_MethodIsType (Tcl_Method method, + const Tcl_MethodType * typePtr, + ClientData * clientDataPtr); +/* 10 */ +TCLOOAPI Tcl_Obj * Tcl_MethodName (Tcl_Method method); +/* 11 */ +TCLOOAPI Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, + Tcl_Object object, Tcl_Obj * nameObj, + int isPublic, const Tcl_MethodType * typePtr, + ClientData clientData); +/* 12 */ +TCLOOAPI Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, + Tcl_Obj * nameObj, int isPublic, + const Tcl_MethodType * typePtr, + ClientData clientData); +/* 13 */ +TCLOOAPI Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, + Tcl_Class cls, const char * nameStr, + const char * nsNameStr, int objc, + Tcl_Obj *const * objv, int skip); +/* 14 */ +TCLOOAPI int Tcl_ObjectDeleted (Tcl_Object object); +/* 15 */ +TCLOOAPI int Tcl_ObjectContextIsFiltering ( + Tcl_ObjectContext context); +/* 16 */ +TCLOOAPI Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); +/* 17 */ +TCLOOAPI Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); +/* 18 */ +TCLOOAPI int Tcl_ObjectContextSkippedArgs ( + Tcl_ObjectContext context); +/* 19 */ +TCLOOAPI ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, + const Tcl_ObjectMetadataType * typePtr); +/* 20 */ +TCLOOAPI void Tcl_ClassSetMetadata (Tcl_Class clazz, + const Tcl_ObjectMetadataType * typePtr, + ClientData metadata); +/* 21 */ +TCLOOAPI ClientData Tcl_ObjectGetMetadata (Tcl_Object object, + const Tcl_ObjectMetadataType * typePtr); +/* 22 */ +TCLOOAPI void Tcl_ObjectSetMetadata (Tcl_Object object, + const Tcl_ObjectMetadataType * typePtr, + ClientData metadata); +/* 23 */ +TCLOOAPI int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, + Tcl_ObjectContext context, int objc, + Tcl_Obj *const * objv, int skip); +/* 24 */ +TCLOOAPI Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( + Tcl_Object object); +/* 25 */ +TCLOOAPI void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, + Tcl_ObjectMapMethodNameProc mapMethodNameProc); +/* 26 */ +TCLOOAPI void Tcl_ClassSetConstructor (Tcl_Interp * interp, + Tcl_Class clazz, Tcl_Method method); +/* 27 */ +TCLOOAPI void Tcl_ClassSetDestructor (Tcl_Interp * interp, + Tcl_Class clazz, Tcl_Method method); + +#endif /* !defined(USE_TCLOO_STUBS) */ + +typedef struct TclOOStubs { + int magic; + int epoch; + int revision; + struct TclOOStubHooks *hooks; + + Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ + Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ + Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ + Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ + Tcl_Object (*tcl_GetObjectFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 4 */ + Tcl_Namespace * (*tcl_GetObjectNamespace) (Tcl_Object object); /* 5 */ + Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ + Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ + int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ + int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ + Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ + Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ + Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ + Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ + int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ + int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ + Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ + Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ + int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ + ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ + void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ + ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ + void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ + int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ + Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ + void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ + void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ + void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ +} TclOOStubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern const TclOOStubs *tclOOStubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TCLOO_STUBS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_CopyObjectInstance +#define Tcl_CopyObjectInstance \ + (tclOOStubsPtr->tcl_CopyObjectInstance) /* 0 */ +#endif +#ifndef Tcl_GetClassAsObject +#define Tcl_GetClassAsObject \ + (tclOOStubsPtr->tcl_GetClassAsObject) /* 1 */ +#endif +#ifndef Tcl_GetObjectAsClass +#define Tcl_GetObjectAsClass \ + (tclOOStubsPtr->tcl_GetObjectAsClass) /* 2 */ +#endif +#ifndef Tcl_GetObjectCommand +#define Tcl_GetObjectCommand \ + (tclOOStubsPtr->tcl_GetObjectCommand) /* 3 */ +#endif +#ifndef Tcl_GetObjectFromObj +#define Tcl_GetObjectFromObj \ + (tclOOStubsPtr->tcl_GetObjectFromObj) /* 4 */ +#endif +#ifndef Tcl_GetObjectNamespace +#define Tcl_GetObjectNamespace \ + (tclOOStubsPtr->tcl_GetObjectNamespace) /* 5 */ +#endif +#ifndef Tcl_MethodDeclarerClass +#define Tcl_MethodDeclarerClass \ + (tclOOStubsPtr->tcl_MethodDeclarerClass) /* 6 */ +#endif +#ifndef Tcl_MethodDeclarerObject +#define Tcl_MethodDeclarerObject \ + (tclOOStubsPtr->tcl_MethodDeclarerObject) /* 7 */ +#endif +#ifndef Tcl_MethodIsPublic +#define Tcl_MethodIsPublic \ + (tclOOStubsPtr->tcl_MethodIsPublic) /* 8 */ +#endif +#ifndef Tcl_MethodIsType +#define Tcl_MethodIsType \ + (tclOOStubsPtr->tcl_MethodIsType) /* 9 */ +#endif +#ifndef Tcl_MethodName +#define Tcl_MethodName \ + (tclOOStubsPtr->tcl_MethodName) /* 10 */ +#endif +#ifndef Tcl_NewInstanceMethod +#define Tcl_NewInstanceMethod \ + (tclOOStubsPtr->tcl_NewInstanceMethod) /* 11 */ +#endif +#ifndef Tcl_NewMethod +#define Tcl_NewMethod \ + (tclOOStubsPtr->tcl_NewMethod) /* 12 */ +#endif +#ifndef Tcl_NewObjectInstance +#define Tcl_NewObjectInstance \ + (tclOOStubsPtr->tcl_NewObjectInstance) /* 13 */ +#endif +#ifndef Tcl_ObjectDeleted +#define Tcl_ObjectDeleted \ + (tclOOStubsPtr->tcl_ObjectDeleted) /* 14 */ +#endif +#ifndef Tcl_ObjectContextIsFiltering +#define Tcl_ObjectContextIsFiltering \ + (tclOOStubsPtr->tcl_ObjectContextIsFiltering) /* 15 */ +#endif +#ifndef Tcl_ObjectContextMethod +#define Tcl_ObjectContextMethod \ + (tclOOStubsPtr->tcl_ObjectContextMethod) /* 16 */ +#endif +#ifndef Tcl_ObjectContextObject +#define Tcl_ObjectContextObject \ + (tclOOStubsPtr->tcl_ObjectContextObject) /* 17 */ +#endif +#ifndef Tcl_ObjectContextSkippedArgs +#define Tcl_ObjectContextSkippedArgs \ + (tclOOStubsPtr->tcl_ObjectContextSkippedArgs) /* 18 */ +#endif +#ifndef Tcl_ClassGetMetadata +#define Tcl_ClassGetMetadata \ + (tclOOStubsPtr->tcl_ClassGetMetadata) /* 19 */ +#endif +#ifndef Tcl_ClassSetMetadata +#define Tcl_ClassSetMetadata \ + (tclOOStubsPtr->tcl_ClassSetMetadata) /* 20 */ +#endif +#ifndef Tcl_ObjectGetMetadata +#define Tcl_ObjectGetMetadata \ + (tclOOStubsPtr->tcl_ObjectGetMetadata) /* 21 */ +#endif +#ifndef Tcl_ObjectSetMetadata +#define Tcl_ObjectSetMetadata \ + (tclOOStubsPtr->tcl_ObjectSetMetadata) /* 22 */ +#endif +#ifndef Tcl_ObjectContextInvokeNext +#define Tcl_ObjectContextInvokeNext \ + (tclOOStubsPtr->tcl_ObjectContextInvokeNext) /* 23 */ +#endif +#ifndef Tcl_ObjectGetMethodNameMapper +#define Tcl_ObjectGetMethodNameMapper \ + (tclOOStubsPtr->tcl_ObjectGetMethodNameMapper) /* 24 */ +#endif +#ifndef Tcl_ObjectSetMethodNameMapper +#define Tcl_ObjectSetMethodNameMapper \ + (tclOOStubsPtr->tcl_ObjectSetMethodNameMapper) /* 25 */ +#endif +#ifndef Tcl_ClassSetConstructor +#define Tcl_ClassSetConstructor \ + (tclOOStubsPtr->tcl_ClassSetConstructor) /* 26 */ +#endif +#ifndef Tcl_ClassSetDestructor +#define Tcl_ClassSetDestructor \ + (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ +#endif + +#endif /* defined(USE_TCLOO_STUBS) */ + +/* !END!: Do not edit above this line. */ diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c new file mode 100644 index 0000000..77f9970 --- /dev/null +++ b/generic/tclOODefineCmds.c @@ -0,0 +1,1831 @@ +/* + * tclOODefineCmds.c -- + * + * This file contains the implementation of the ::oo::define command, + * part of the object-system core (NB: not Tcl_Obj, but ::oo). + * + * Copyright (c) 2006-2008 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.4 2008/05/31 11:42:18 dkf Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclInt.h" +#include "tclOOInt.h" + +/* + * Forward declarations. + */ + +static inline void BumpGlobalEpoch(Tcl_Interp *interp, Class *classPtr); +static Tcl_Command FindCommand(Tcl_Interp *interp, Tcl_Obj *stringObj, + Tcl_Namespace *const namespacePtr); +static inline int InitDefineContext(Tcl_Interp *interp, + Tcl_Namespace *namespacePtr, Object *oPtr, + int objc, Tcl_Obj *const objv[]); +static inline void RecomputeClassCacheFlag(Object *oPtr); +static int RenameDeleteMethod(Tcl_Interp *interp, Object *oPtr, + int useClass, Tcl_Obj *const fromPtr, + Tcl_Obj *const toPtr); + +/* + * ---------------------------------------------------------------------- + * + * BumpGlobalEpoch -- + * Utility that ensures that call chains that are invalid will get thrown + * away at an appropriate time. Note that exactly which epoch gets + * advanced will depend on exactly what the class is tangled up in; in + * the worst case, the simplest option is to advance the global epoch, + * causing *everything* to be thrown away on next usage. + * + * ---------------------------------------------------------------------- + */ + +static inline void +BumpGlobalEpoch( + Tcl_Interp *interp, + Class *classPtr) +{ + if (classPtr != NULL + && classPtr->subclasses.num == 0 + && classPtr->instances.num == 0 + && classPtr->mixinSubs.num == 0) { + /* + * If a class has no subclasses or instances, and is not mixed into + * anything, a change to its structure does not require us to + * invalidate any call chains. Note that we still bump our object's + * epoch if it has any mixins; the relation between a class and its + * representative object is special. But it won't hurt. + */ + + if (classPtr->thisPtr->mixins.num > 0) { + classPtr->thisPtr->epoch++; + } + return; + } + + /* + * Either there's no class (?!) or we're reconfiguring something that is + * in use. Force regeneration of call chains. + */ + + TclOOGetFoundation(interp)->epoch++; +} + +/* + * ---------------------------------------------------------------------- + * + * RecomputeClassCacheFlag -- + * Determine whether the object is prototypical of its class, and hence + * able to use the class's method chain cache. + * + * ---------------------------------------------------------------------- + */ + +static inline void +RecomputeClassCacheFlag( + Object *oPtr) +{ + if ((oPtr->methodsPtr == NULL || oPtr->methodsPtr->numEntries == 0) + && (oPtr->mixins.num == 0) && (oPtr->filters.num == 0)) { + oPtr->flags |= USE_CLASS_CACHE; + } else { + oPtr->flags &= ~USE_CLASS_CACHE; + } +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOObjectSetFilters -- + * Install a list of filter method names into an object. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOObjectSetFilters( + Object *oPtr, + int numFilters, + Tcl_Obj *const *filters) +{ + int i; + + if (oPtr->filters.num) { + Tcl_Obj *filterObj; + + FOREACH(filterObj, oPtr->filters) { + Tcl_DecrRefCount(filterObj); + } + } + + if (numFilters == 0) { + /* + * No list of filters was supplied, so we're deleting filters. + */ + + ckfree((char *) oPtr->filters.list); + oPtr->filters.list = NULL; + oPtr->filters.num = 0; + RecomputeClassCacheFlag(oPtr); + } else { + /* + * We've got a list of filters, so we're creating filters. + */ + + Tcl_Obj **filtersList; + int size = sizeof(Tcl_Obj *) * numFilters; /* should be size_t */ + + if (oPtr->filters.num == 0) { + filtersList = (Tcl_Obj **) ckalloc(size); + } else { + filtersList = (Tcl_Obj **) + ckrealloc((char *) oPtr->filters.list, size); + } + for (i=0 ; ifilters.list = filtersList; + oPtr->filters.num = numFilters; + oPtr->flags &= ~USE_CLASS_CACHE; + } + oPtr->epoch++; /* Only this object can be affected. */ +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOClassSetFilters -- + * Install a list of filter method names into a class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOClassSetFilters( + Tcl_Interp *interp, + Class *classPtr, + int numFilters, + Tcl_Obj *const *filters) +{ + int i; + + if (classPtr->filters.num) { + Tcl_Obj *filterObj; + + FOREACH(filterObj, classPtr->filters) { + Tcl_DecrRefCount(filterObj); + } + } + + if (numFilters == 0) { + /* + * No list of filters was supplied, so we're deleting filters. + */ + + ckfree((char *) classPtr->filters.list); + classPtr->filters.list = NULL; + classPtr->filters.num = 0; + } else { + /* + * We've got a list of filters, so we're creating filters. + */ + + Tcl_Obj **filtersList; + int size = sizeof(Tcl_Obj *) * numFilters; /* should be size_t */ + + if (classPtr->filters.num == 0) { + filtersList = (Tcl_Obj **) ckalloc(size); + } else { + filtersList = (Tcl_Obj **) + ckrealloc((char *) classPtr->filters.list, size); + } + for (i=0 ; ifilters.list = filtersList; + classPtr->filters.num = numFilters; + } + + /* + * There may be many objects affected, so bump the global epoch. + */ + + BumpGlobalEpoch(interp, classPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOObjectSetMixins -- + * Install a list of mixin classes into an object. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOObjectSetMixins( + Object *oPtr, + int numMixins, + Class *const *mixins) +{ + Class *mixinPtr; + int i; + + if (numMixins == 0) { + if (oPtr->mixins.num != 0) { + FOREACH(mixinPtr, oPtr->mixins) { + TclOORemoveFromInstances(oPtr, mixinPtr); + } + ckfree((char *) oPtr->mixins.list); + oPtr->mixins.num = 0; + } + RecomputeClassCacheFlag(oPtr); + } else { + if (oPtr->mixins.num != 0) { + FOREACH(mixinPtr, oPtr->mixins) { + if (mixinPtr != oPtr->selfCls) { + TclOORemoveFromInstances(oPtr, mixinPtr); + } + } + oPtr->mixins.list = (Class **) + ckrealloc((char *) oPtr->mixins.list, + sizeof(Class *) * numMixins); + } else { + oPtr->mixins.list = (Class **) + ckalloc(sizeof(Class *) * numMixins); + oPtr->flags &= ~USE_CLASS_CACHE; + } + oPtr->mixins.num = numMixins; + memcpy(oPtr->mixins.list, mixins, sizeof(Class *) * numMixins); + FOREACH(mixinPtr, oPtr->mixins) { + if (mixinPtr != oPtr->selfCls) { + TclOOAddToInstances(oPtr, mixinPtr); + } + } + } + oPtr->epoch++; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOClassSetMixins -- + * Install a list of mixin classes into a class. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOClassSetMixins( + Tcl_Interp *interp, + Class *classPtr, + int numMixins, + Class *const *mixins) +{ + Class *mixinPtr; + int i; + + if (numMixins == 0) { + if (classPtr->mixins.num != 0) { + FOREACH(mixinPtr, classPtr->mixins) { + TclOORemoveFromMixinSubs(classPtr, mixinPtr); + } + ckfree((char *) classPtr->mixins.list); + classPtr->mixins.num = 0; + } + } else { + if (classPtr->mixins.num != 0) { + FOREACH(mixinPtr, classPtr->mixins) { + TclOORemoveFromMixinSubs(classPtr, mixinPtr); + } + classPtr->mixins.list = (Class **) + ckrealloc((char *) classPtr->mixins.list, + sizeof(Class *) * numMixins); + } else { + classPtr->mixins.list = (Class **) + ckalloc(sizeof(Class *) * numMixins); + } + classPtr->mixins.num = numMixins; + memcpy(classPtr->mixins.list, mixins, sizeof(Class *) * numMixins); + FOREACH(mixinPtr, classPtr->mixins) { + TclOOAddToMixinSubs(classPtr, mixinPtr); + } + } + BumpGlobalEpoch(interp, classPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * RenameDeleteMethod -- + * Core of the code to rename and delete methods. + * + * ---------------------------------------------------------------------- + */ + +static int +RenameDeleteMethod( + Tcl_Interp *interp, + Object *oPtr, + int useClass, + Tcl_Obj *const fromPtr, + Tcl_Obj *const toPtr) +{ + Tcl_HashEntry *hPtr, *newHPtr = NULL; + Method *mPtr; + int isNew; + + if (!useClass) { + if (!oPtr->methodsPtr) { + noSuchMethod: + Tcl_AppendResult(interp, "method ", TclGetString(fromPtr), + " does not exist", NULL); + return TCL_ERROR; + } + hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) fromPtr); + if (hPtr == NULL) { + goto noSuchMethod; + } + if (toPtr) { + newHPtr = Tcl_CreateHashEntry(oPtr->methodsPtr, (char *) toPtr, + &isNew); + if (hPtr == newHPtr) { + renameToSelf: + Tcl_AppendResult(interp, "cannot rename method to itself", + NULL); + return TCL_ERROR; + } else if (!isNew) { + renameToExisting: + Tcl_AppendResult(interp, "method called ", + TclGetString(toPtr), " already exists", NULL); + return TCL_ERROR; + } + } + } else { + hPtr = Tcl_FindHashEntry(&oPtr->classPtr->classMethods, + (char *) fromPtr); + if (hPtr == NULL) { + goto noSuchMethod; + } + if (toPtr) { + newHPtr = Tcl_CreateHashEntry(&oPtr->classPtr->classMethods, + (char *) toPtr, &isNew); + if (hPtr == newHPtr) { + goto renameToSelf; + } else if (!isNew) { + goto renameToExisting; + } + } + } + + /* + * Complete the splicing by changing the method's name. + */ + + mPtr = Tcl_GetHashValue(hPtr); + if (toPtr) { + Tcl_IncrRefCount(toPtr); + Tcl_DecrRefCount(mPtr->namePtr); + mPtr->namePtr = toPtr; + Tcl_SetHashValue(newHPtr, mPtr); + } else { + if (!useClass) { + RecomputeClassCacheFlag(oPtr); + } + TclOODelMethodRef(mPtr); + } + Tcl_DeleteHashEntry(hPtr); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOUnknownDefinition -- + * Handles what happens when an unknown command is encountered during the + * processing of a definition script. Works by finding a command in the + * operating definition namespace that the requested command is a unique + * prefix of. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOUnknownDefinition( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Namespace *nsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp); + Tcl_HashSearch search; + Tcl_HashEntry *hPtr; + int soughtLen; + const char *soughtStr, *matchedStr = NULL; + + if (objc < 2) { + Tcl_AppendResult(interp, "bad call of unknown handler", NULL); + return TCL_ERROR; + } + if (TclOOGetDefineCmdContext(interp) == NULL) { + return TCL_ERROR; + } + + soughtStr = Tcl_GetStringFromObj(objv[1], &soughtLen); + if (soughtLen == 0) { + goto noMatch; + } + hPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); + while (hPtr != NULL) { + const char *nameStr = Tcl_GetHashKey(&nsPtr->cmdTable, hPtr); + + if (strncmp(soughtStr, nameStr, soughtLen) == 0) { + if (matchedStr != NULL) { + goto noMatch; + } + matchedStr = nameStr; + } + hPtr = Tcl_NextHashEntry(&search); + } + + if (matchedStr != NULL) { + /* + * Got one match, and only one match! + */ + + Tcl_Obj **newObjv = TclStackAlloc(interp, sizeof(Tcl_Obj*)*(objc-1)); + int result; + + newObjv[0] = Tcl_NewStringObj(matchedStr, -1); + Tcl_IncrRefCount(newObjv[0]); + if (objc > 2) { + memcpy(newObjv+1, objv+2, sizeof(Tcl_Obj *) * (objc-2)); + } + result = Tcl_EvalObjv(interp, objc-1, newObjv, 0); + Tcl_DecrRefCount(newObjv[0]); + TclStackFree(interp, newObjv); + return result; + } + + noMatch: + Tcl_AppendResult(interp, "invalid command name \"",soughtStr,"\"", NULL); + return TCL_ERROR; +} + +/* + * ---------------------------------------------------------------------- + * + * FindCommand -- + * Specialized version of Tcl_FindCommand that handles command prefixes + * and disallows namespace magic. + * + * ---------------------------------------------------------------------- + */ + +static Tcl_Command +FindCommand( + Tcl_Interp *interp, + Tcl_Obj *stringObj, + Tcl_Namespace *const namespacePtr) +{ + int length; + const char *nameStr, *string = Tcl_GetStringFromObj(stringObj, &length); + register Namespace *const nsPtr = (Namespace *) namespacePtr; + FOREACH_HASH_DECLS; + Tcl_Command cmd, cmd2; + + /* + * If someone is playing games, we stop playing right now. + */ + + if (string[0] == '\0' || strstr(string, "::") != NULL) { + return NULL; + } + + /* + * Do the exact lookup first. + */ + + cmd = Tcl_FindCommand(interp, string, namespacePtr, TCL_NAMESPACE_ONLY); + if (cmd != NULL) { + return cmd; + } + + /* + * Bother, need to perform an approximate match. Iterate across the hash + * table of commands in the namespace. + */ + + FOREACH_HASH(nameStr, cmd2, &nsPtr->cmdTable) { + if (strncmp(string, nameStr, length) == 0) { + if (cmd != NULL) { + return NULL; + } + cmd = cmd2; + } + } + + /* + * Either we found one thing or we found nothing. Either way, return it. + */ + + return cmd; +} + +/* + * ---------------------------------------------------------------------- + * + * InitDefineContext -- + * Does the magic incantations necessary to push the special stack frame + * used when processing object definitions. It is up to the caller to + * dispose of the frame (with TclPopStackFrame) when finished. + * + * ---------------------------------------------------------------------- + */ + +static inline int +InitDefineContext( + Tcl_Interp *interp, + Tcl_Namespace *namespacePtr, + Object *oPtr, + int objc, + Tcl_Obj *const objv[]) +{ + CallFrame *framePtr, **framePtrPtr = &framePtr; + int result; + + /* framePtrPtr is needed to satisfy GCC 3.3's strict aliasing rules */ + + result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, + namespacePtr, FRAME_IS_OO_DEFINE); + if (result != TCL_OK) { + return TCL_ERROR; + } + framePtr->clientData = oPtr; + framePtr->objc = objc; + framePtr->objv = objv; /* Reference counts do not need to be + * incremented here. */ + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOGetDefineCmdContext -- + * Extracts the magic token from the current stack frame, or returns NULL + * (and leaves an error message) otherwise. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Object +TclOOGetDefineCmdContext( + Tcl_Interp *interp) +{ + Interp *iPtr = (Interp *) interp; + + if ((iPtr->framePtr == NULL) + || (iPtr->framePtr->isProcCallFrame != FRAME_IS_OO_DEFINE)) { + Tcl_AppendResult(interp, "this command may only be called from within" + " the context of an ::oo::define or ::oo::objdefine command", + NULL); + return NULL; + } + return (Tcl_Object) iPtr->framePtr->clientData; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineObjCmd -- + * Implementation of the "oo::define" command. Works by effectively doing + * the same as 'namespace eval', but with extra magic applied so that the + * object to be modified is known to the commands in the target + * namespace. Also does ensemble-like tricks with dispatch so that error + * messages are clearer. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Foundation *fPtr = TclOOGetFoundation(interp); + int result; + Object *oPtr; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "className arg ?arg ...?"); + return TCL_ERROR; + } + + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, TclGetString(objv[1]), + " does not refer to a class", NULL); + return TCL_ERROR; + } + + /* + * Make the oo::define namespace the current namespace and evaluate the + * command(s). + */ + + if (InitDefineContext(interp, fPtr->defineNs, oPtr, objc,objv) != TCL_OK){ + return TCL_ERROR; + } + + AddRef(oPtr); + if (objc == 3) { + result = TclEvalObjEx(interp, objv[2], 0, + ((Interp *)interp)->cmdFramePtr, 2); + + if (result == TCL_ERROR) { + int length; + const char *objName = Tcl_GetStringFromObj(objv[1], &length); + int limit = 60; + int overflow = (length > limit); + + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in definition script for object \"%.*s%s\" line %d)", + (overflow ? limit : length), objName, + (overflow ? "..." : ""), interp->errorLine)); + } + } else { + Tcl_Obj *objPtr, *obj2Ptr, **objs; + Interp *iPtr = (Interp *) interp; + Tcl_Command cmd; + int dummy; + + /* + * More than one argument: fire them through the ensemble processing + * engine so that everything appears to be good and proper in error + * messages. Note that we cannot just concatenate and send through + * Tcl_EvalObjEx, as that doesn't do ensemble processing, and we + * cannot go through Tcl_EvalObjv without the extra work to pre-find + * the command, as that finds command names in the wrong namespace at + * the moment. Ugly! + */ + + if (iPtr->ensembleRewrite.sourceObjs == NULL) { + iPtr->ensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = 3; + iPtr->ensembleRewrite.numInsertedObjs = 1; + } else { + int ni = iPtr->ensembleRewrite.numInsertedObjs; + if (ni < 3) { + iPtr->ensembleRewrite.numRemovedObjs += 3 - ni; + } else { + iPtr->ensembleRewrite.numInsertedObjs -= 2; + } + } + + /* + * Build the list of arguments using a Tcl_Obj as a workspace. See + * comments above for why these contortions are necessary. + */ + + objPtr = Tcl_NewObj(); + obj2Ptr = Tcl_NewObj(); + cmd = FindCommand(interp, objv[2], fPtr->defineNs); + if (cmd == NULL) { + /* punt this case! */ + Tcl_AppendObjToObj(obj2Ptr, objv[2]); + } else { + Tcl_GetCommandFullName(interp, cmd, obj2Ptr); + } + Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr); + Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-3, objv+3); + Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs); + + result = Tcl_EvalObjv(interp, objc-2, objs, TCL_EVAL_INVOKE); + Tcl_DecrRefCount(objPtr); + } + DelRef(oPtr); + + /* + * Restore the previous "current" namespace. + */ + + TclPopStackFrame(interp); + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOObjDefObjCmd -- + * Implementation of the "oo::objdefine" command. Works by effectively + * doing the same as 'namespace eval', but with extra magic applied so + * that the object to be modified is known to the commands in the target + * namespace. Also does ensemble-like tricks with dispatch so that error + * messages are clearer. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOObjDefObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Foundation *fPtr = TclOOGetFoundation(interp); + int result; + Object *oPtr; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "objectName arg ?arg ...?"); + return TCL_ERROR; + } + + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + /* + * Make the oo::objdefine namespace the current namespace and evaluate the + * command(s). + */ + + if (InitDefineContext(interp, fPtr->objdefNs, oPtr, objc,objv) != TCL_OK){ + return TCL_ERROR; + } + + AddRef(oPtr); + if (objc == 3) { + result = TclEvalObjEx(interp, objv[2], 0, + ((Interp *)interp)->cmdFramePtr, 2); + + if (result == TCL_ERROR) { + int length; + const char *objName = Tcl_GetStringFromObj(objv[1], &length); + int limit = 60; + int overflow = (length > limit); + + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in definition script for object \"%.*s%s\" line %d)", + (overflow ? limit : length), objName, + (overflow ? "..." : ""), interp->errorLine)); + } + } else { + Tcl_Obj *objPtr, *obj2Ptr, **objs; + Interp *iPtr = (Interp *) interp; + Tcl_Command cmd; + int dummy; + + /* + * More than one argument: fire them through the ensemble processing + * engine so that everything appears to be good and proper in error + * messages. Note that we cannot just concatenate and send through + * Tcl_EvalObjEx, as that doesn't do ensemble processing, and we + * cannot go through Tcl_EvalObjv without the extra work to pre-find + * the command, as that finds command names in the wrong namespace at + * the moment. Ugly! + */ + + if (iPtr->ensembleRewrite.sourceObjs == NULL) { + iPtr->ensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = 3; + iPtr->ensembleRewrite.numInsertedObjs = 1; + } else { + int ni = iPtr->ensembleRewrite.numInsertedObjs; + if (ni < 3) { + iPtr->ensembleRewrite.numRemovedObjs += 3 - ni; + } else { + iPtr->ensembleRewrite.numInsertedObjs -= 2; + } + } + + /* + * Build the list of arguments using a Tcl_Obj as a workspace. See + * comments above for why these contortions are necessary. + */ + + objPtr = Tcl_NewObj(); + obj2Ptr = Tcl_NewObj(); + cmd = FindCommand(interp, objv[2], fPtr->objdefNs); + if (cmd == NULL) { + /* punt this case! */ + Tcl_AppendObjToObj(obj2Ptr, objv[2]); + } else { + Tcl_GetCommandFullName(interp, cmd, obj2Ptr); + } + Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr); + Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-3, objv+3); + Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs); + + result = Tcl_EvalObjv(interp, objc-2, objs, TCL_EVAL_INVOKE); + Tcl_DecrRefCount(objPtr); + } + DelRef(oPtr); + + /* + * Restore the previous "current" namespace. + */ + + TclPopStackFrame(interp); + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineSelfObjCmd -- + * Implementation of the "self" subcommand of the "oo::define" command. + * Works by effectively doing the same as 'namespace eval', but with + * extra magic applied so that the object to be modified is known to the + * commands in the target namespace. Also does ensemble-like tricks with + * dispatch so that error messages are clearer. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineSelfObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Foundation *fPtr = TclOOGetFoundation(interp); + int result; + Object *oPtr; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + + /* + * Make the oo::objdefine namespace the current namespace and evaluate the + * command(s). + */ + + if (InitDefineContext(interp, fPtr->objdefNs, oPtr, objc,objv) != TCL_OK){ + return TCL_ERROR; + } + + AddRef(oPtr); + if (objc == 2) { + result = TclEvalObjEx(interp, objv[1], 0, + ((Interp *)interp)->cmdFramePtr, 2); + + if (result == TCL_ERROR) { + int length; + const char *objName = Tcl_GetStringFromObj( + TclOOObjectName(interp, oPtr), &length); + int limit = 60; + int overflow = (length > limit); + + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in definition script for object \"%.*s%s\" line %d)", + (overflow ? limit : length), objName, + (overflow ? "..." : ""), interp->errorLine)); + } + } else { + Tcl_Obj *objPtr, *obj2Ptr, **objs; + Interp *iPtr = (Interp *) interp; + Tcl_Command cmd; + int dummy; + + /* + * More than one argument: fire them through the ensemble processing + * engine so that everything appears to be good and proper in error + * messages. Note that we cannot just concatenate and send through + * Tcl_EvalObjEx, as that doesn't do ensemble processing, and we + * cannot go through Tcl_EvalObjv without the extra work to pre-find + * the command, as that finds command names in the wrong namespace at + * the moment. Ugly! + */ + + if (iPtr->ensembleRewrite.sourceObjs == NULL) { + iPtr->ensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = 2; + iPtr->ensembleRewrite.numInsertedObjs = 1; + } else { + int ni = iPtr->ensembleRewrite.numInsertedObjs; + if (ni < 2) { + iPtr->ensembleRewrite.numRemovedObjs += 2 - ni; + } else { + iPtr->ensembleRewrite.numInsertedObjs -= 1; + } + } + + /* + * Build the list of arguments using a Tcl_Obj as a workspace. See + * comments above for why these contortions are necessary. + */ + + objPtr = Tcl_NewObj(); + obj2Ptr = Tcl_NewObj(); + cmd = FindCommand(interp, objv[1], fPtr->objdefNs); + if (cmd == NULL) { + /* punt this case! */ + Tcl_AppendObjToObj(obj2Ptr, objv[1]); + } else { + Tcl_GetCommandFullName(interp, cmd, obj2Ptr); + } + Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr); + Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-2, objv+2); + Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs); + + result = Tcl_EvalObjv(interp, objc-1, objs, TCL_EVAL_INVOKE); + Tcl_DecrRefCount(objPtr); + } + DelRef(oPtr); + + /* + * Restore the previous "current" namespace. + */ + + TclPopStackFrame(interp); + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineClassObjCmd -- + * Implementation of the "class" subcommand of the "oo::objdefine" + * command. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineClassObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Object *oPtr, *o2Ptr; + Foundation *fPtr = TclOOGetFoundation(interp); + + /* + * Parse the context to get the object to operate on. + */ + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr == fPtr->objectCls->thisPtr) { + Tcl_AppendResult(interp, + "may not modify the class of the root object", NULL); + return TCL_ERROR; + } + if (oPtr == fPtr->classCls->thisPtr) { + Tcl_AppendResult(interp, + "may not modify the class of the class of classes", NULL); + return TCL_ERROR; + } + + /* + * Parse the argument to get the class to set the object's class to. + */ + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className"); + return TCL_ERROR; + } + o2Ptr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (o2Ptr == NULL) { + return TCL_ERROR; + } + if (o2Ptr->classPtr == NULL) { + Tcl_AppendResult(interp, "the class of an object must be a class", + NULL); + return TCL_ERROR; + } + + /* + * Apply semantic checks. In particular, classes and non-classes are not + * interchangable (too complicated to do the conversion!) so we must + * produce an error if any attempt is made to swap from one to the other. + */ + + if ((oPtr->classPtr == NULL) == TclOOIsReachable(fPtr->classCls, + o2Ptr->classPtr)) { + Tcl_AppendResult(interp, "may not change a ", + (oPtr->classPtr==NULL ? "non-" : ""), "class object into a ", + (oPtr->classPtr==NULL ? "" : "non-"), "class object", NULL); + return TCL_ERROR; + } + + /* + * Set the object's class. + */ + + if (oPtr->selfCls != o2Ptr->classPtr) { + TclOORemoveFromInstances(oPtr, oPtr->selfCls); + oPtr->selfCls = o2Ptr->classPtr; + TclOOAddToInstances(oPtr, oPtr->selfCls); + if (oPtr->classPtr != NULL) { + BumpGlobalEpoch(interp, oPtr->classPtr); + } else { + oPtr->epoch++; + } + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineConstructorObjCmd -- + * Implementation of the "constructor" subcommand of the "oo::define" + * command. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineConstructorObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Object *oPtr; + Class *clsPtr; + Tcl_Method method; + int bodyLength; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "arguments body"); + return TCL_ERROR; + } + + /* + * Extract and validate the context, which is the class that we wish to + * modify. + */ + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + Tcl_GetStringFromObj(objv[2], &bodyLength); + if (bodyLength > 0) { + /* + * Create the method structure. + */ + + method = (Tcl_Method) TclOONewProcMethod(interp, clsPtr, + PUBLIC_METHOD, NULL, objv[1], objv[2], NULL); + if (method == NULL) { + return TCL_ERROR; + } + } else { + /* + * Delete the constructor method record and set the field in the + * class record to NULL. + */ + + method = NULL; + } + + /* + * Place the method structure in the class record. Note that we might not + * immediately delete the constructor as this might be being done during + * execution of the constructor itself. + */ + + Tcl_ClassSetConstructor(interp, (Tcl_Class) clsPtr, method); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineDeleteMethodObjCmd -- + * Implementation of the "deletemethod" subcommand of the "oo::define" + * and "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineDeleteMethodObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceDeleteMethod = (clientData != NULL); + Object *oPtr; + int i; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (!isInstanceDeleteMethod && !oPtr->classPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + + for (i=1 ; iepoch++; + } else { + BumpGlobalEpoch(interp, oPtr->classPtr); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineDestructorObjCmd -- + * Implementation of the "destructor" subcommand of the "oo::define" + * command. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineDestructorObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Object *oPtr; + Class *clsPtr; + Tcl_Method method; + int bodyLength; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "body"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + Tcl_GetStringFromObj(objv[1], &bodyLength); + if (bodyLength > 0) { + /* + * Create the method structure. + */ + + method = (Tcl_Method) TclOONewProcMethod(interp, clsPtr, + PUBLIC_METHOD, NULL, NULL, objv[1], NULL); + if (method == NULL) { + return TCL_ERROR; + } + } else { + /* + * Delete the destructor method record and set the field in the class + * record to NULL. + */ + + method = NULL; + } + + /* + * Place the method structure in the class record. Note that we might not + * immediately delete the destructor as this might be being done during + * execution of the destructor itself. Also note that setting a + * destructor during a destructor is fairly dumb anyway. + */ + + Tcl_ClassSetDestructor(interp, (Tcl_Class) clsPtr, method); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineExportObjCmd -- + * Implementation of the "export" subcommand of the "oo::define" and + * "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineExportObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceExport = (clientData != NULL); + Object *oPtr; + Method *mPtr; + Tcl_HashEntry *hPtr; + Class *clsPtr; + int i, isNew, changed = 0; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + if (!isInstanceExport && !clsPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + + for (i=1 ; imethodsPtr) { + oPtr->methodsPtr = (Tcl_HashTable *) + ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitObjHashTable(oPtr->methodsPtr); + oPtr->flags &= ~USE_CLASS_CACHE; + } + hPtr = Tcl_CreateHashEntry(oPtr->methodsPtr, (char *) objv[i], + &isNew); + } else { + hPtr = Tcl_CreateHashEntry(&clsPtr->classMethods, (char*) objv[i], + &isNew); + } + + if (isNew) { + mPtr = (Method *) ckalloc(sizeof(Method)); + memset(mPtr, 0, sizeof(Method)); + Tcl_SetHashValue(hPtr, mPtr); + } else { + mPtr = Tcl_GetHashValue(hPtr); + } + if (isNew || !(mPtr->flags & PUBLIC_METHOD)) { + mPtr->flags |= PUBLIC_METHOD; + changed = 1; + } + } + + /* + * Bump the right epoch if we actually changed anything. + */ + + if (changed) { + if (isInstanceExport) { + oPtr->epoch++; + } else { + BumpGlobalEpoch(interp, clsPtr); + } + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineFilterObjCmd -- + * Implementation of the "filter" subcommand of the "oo::define" and + * "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineFilterObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceFilter = (clientData != NULL); + Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp); + + if (oPtr == NULL) { + return TCL_ERROR; + } + if (!isInstanceFilter && !oPtr->classPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + + if (!isInstanceFilter) { + TclOOClassSetFilters(interp, oPtr->classPtr, objc-1, objv+1); + } else { + TclOOObjectSetFilters(oPtr, objc-1, objv+1); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineForwardObjCmd -- + * Implementation of the "forward" subcommand of the "oo::define" and + * "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineForwardObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceForward = (clientData != NULL); + Object *oPtr; + Method *mPtr; + int isPublic; + Tcl_Obj *prefixObj; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "name cmdName ?arg ...?"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (!isInstanceForward && !oPtr->classPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + isPublic = Tcl_StringMatch(TclGetString(objv[1]), "[a-z]*") + ? PUBLIC_METHOD : 0; + + /* + * Create the method structure. + */ + + prefixObj = Tcl_NewListObj(objc-2, objv+2); + if (isInstanceForward) { + mPtr = TclOONewForwardInstanceMethod(interp, oPtr, isPublic, objv[1], + prefixObj); + } else { + mPtr = TclOONewForwardMethod(interp, oPtr->classPtr, isPublic, + objv[1], prefixObj); + } + if (mPtr == NULL) { + Tcl_DecrRefCount(prefixObj); + return TCL_ERROR; + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineMethodObjCmd -- + * Implementation of the "method" subcommand of the "oo::define" and + * "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineMethodObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceMethod = (clientData != NULL); + Object *oPtr; + int isPublic; + + if (objc != 4) { + Tcl_WrongNumArgs(interp, 1, objv, "name args body"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (!isInstanceMethod && !oPtr->classPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + isPublic = Tcl_StringMatch(TclGetString(objv[1]), "[a-z]*") + ? PUBLIC_METHOD : 0; + + /* + * Create the method by using the right back-end API. + */ + + if (isInstanceMethod) { + if (TclOONewProcInstanceMethod(interp, oPtr, isPublic, objv[1], + objv[2], objv[3], NULL) == NULL) { + return TCL_ERROR; + } + } else { + if (TclOONewProcMethod(interp, oPtr->classPtr, isPublic, objv[1], + objv[2], objv[3], NULL) == NULL) { + return TCL_ERROR; + } + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineMixinObjCmd -- + * Implementation of the "mixin" subcommand of the "oo::define" and + * "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineMixinObjCmd( + ClientData clientData, + Tcl_Interp *interp, + const int objc, + Tcl_Obj *const *objv) +{ + int isInstanceMixin = (clientData != NULL); + Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp); + Class **mixins; + int i; + + if (oPtr == NULL) { + return TCL_ERROR; + } + if (!isInstanceMixin && !oPtr->classPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + mixins = TclStackAlloc(interp, sizeof(Class *) * (objc-1)); + + for (i=1 ; iclassPtr == NULL) { + Tcl_AppendResult(interp, "may only mix in classes; \"", + TclGetString(objv[i]), "\" is not a class", NULL); + goto freeAndError; + } + if (!isInstanceMixin && + TclOOIsReachable(oPtr->classPtr,o2Ptr->classPtr)){ + Tcl_AppendResult(interp, "may not mix a class into itself", NULL); + goto freeAndError; + } + mixins[i-1] = o2Ptr->classPtr; + } + + if (isInstanceMixin) { + TclOOObjectSetMixins(oPtr, objc-1, mixins); + } else { + TclOOClassSetMixins(interp, oPtr->classPtr, objc-1, mixins); + } + + TclStackFree(interp, mixins); + return TCL_OK; + + freeAndError: + TclStackFree(interp, mixins); + return TCL_ERROR; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineRenameMethodObjCmd -- + * Implementation of the "renamemethod" subcommand of the "oo::define" + * and "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineRenameMethodObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceRenameMethod = (clientData != NULL); + Object *oPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "oldName newName"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (!isInstanceRenameMethod && !oPtr->classPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + + /* + * Delete the method entry from the appropriate hash table, and transfer + * the thing it points to to its new entry. To do this, we first need to + * get the entries from the appropriate hash tables (this can generate a + * range of errors...) + */ + + if (RenameDeleteMethod(interp, oPtr, !isInstanceRenameMethod, + objv[1], objv[2]) != TCL_OK) { + return TCL_ERROR; + } + + if (isInstanceRenameMethod) { + oPtr->epoch++; + } else { + BumpGlobalEpoch(interp, oPtr->classPtr); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineSuperclassObjCmd -- + * Implementation of the "superclass" subcommand of the "oo::define" + * command. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineSuperclassObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + Object *oPtr, *o2Ptr; + Foundation *fPtr = TclOOGetFoundation(interp); + Class **superclasses, *superPtr; + int i, j; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className ?className ...?"); + return TCL_ERROR; + } + + /* + * Get the class to operate on. + */ + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "only classes may have superclasses defined", + NULL); + return TCL_ERROR; + } + if (oPtr == fPtr->objectCls->thisPtr) { + Tcl_AppendResult(interp, + "may not modify the superclass of the root object", NULL); + return TCL_ERROR; + } + + /* + * Allocate some working space. + */ + + superclasses = (Class **) ckalloc(sizeof(Class *) * (objc-1)); + + /* + * Parse the arguments to get the class to use as superclasses. + */ + + for (i=0 ; iclassPtr == NULL) { + Tcl_AppendResult(interp, "only a class can be a superclass",NULL); + goto failedAfterAlloc; + } + for (j=0 ; jclassPtr) { + Tcl_AppendResult(interp, + "class should only be a direct superclass once",NULL); + goto failedAfterAlloc; + } + } + if (TclOOIsReachable(oPtr->classPtr, o2Ptr->classPtr)) { + Tcl_AppendResult(interp, + "attempt to form circular dependency graph", NULL); + failedAfterAlloc: + ckfree((char *) superclasses); + return TCL_ERROR; + } + superclasses[i] = o2Ptr->classPtr; + } + + /* + * Install the list of superclasses into the class. Note that this also + * involves splicing the class out of the superclasses' subclass list that + * it used to be a member of and splicing it into the new superclasses' + * subclass list. + */ + + if (oPtr->classPtr->superclasses.num != 0) { + FOREACH(superPtr, oPtr->classPtr->superclasses) { + TclOORemoveFromSubclasses(oPtr->classPtr, superPtr); + } + ckfree((char *) oPtr->classPtr->superclasses.list); + } + oPtr->classPtr->superclasses.list = superclasses; + oPtr->classPtr->superclasses.num = objc-1; + FOREACH(superPtr, oPtr->classPtr->superclasses) { + TclOOAddToSubclasses(oPtr->classPtr, superPtr); + } + BumpGlobalEpoch(interp, oPtr->classPtr); + + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODefineUnexportObjCmd -- + * Implementation of the "unexport" subcommand of the "oo::define" and + * "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineUnexportObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceUnexport = (clientData != NULL); + Object *oPtr; + Method *mPtr; + Tcl_HashEntry *hPtr; + Class *clsPtr; + int i, isNew, changed = 0; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?"); + return TCL_ERROR; + } + + oPtr = (Object *) TclOOGetDefineCmdContext(interp); + if (oPtr == NULL) { + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + if (!isInstanceUnexport && !clsPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + + for (i=1 ; imethodsPtr) { + oPtr->methodsPtr = (Tcl_HashTable *) + ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitObjHashTable(oPtr->methodsPtr); + oPtr->flags &= ~USE_CLASS_CACHE; + } + hPtr = Tcl_CreateHashEntry(oPtr->methodsPtr, (char *) objv[i], + &isNew); + } else { + hPtr = Tcl_CreateHashEntry(&clsPtr->classMethods, (char*) objv[i], + &isNew); + } + + if (isNew) { + mPtr = (Method *) ckalloc(sizeof(Method)); + memset(mPtr, 0, sizeof(Method)); + Tcl_SetHashValue(hPtr, mPtr); + } else { + mPtr = Tcl_GetHashValue(hPtr); + } + if (isNew || mPtr->flags & PUBLIC_METHOD) { + mPtr->flags &= ~PUBLIC_METHOD; + changed = 1; + } + } + + /* + * Bump the right epoch if we actually changed anything. + */ + + if (changed) { + if (isInstanceUnexport) { + oPtr->epoch++; + } else { + BumpGlobalEpoch(interp, clsPtr); + } + } + return TCL_OK; +} + +void +Tcl_ClassSetConstructor( + Tcl_Interp *interp, + Tcl_Class clazz, + Tcl_Method method) +{ + Class *clsPtr = (Class *) clazz; + + if (method != (Tcl_Method) clsPtr->constructorPtr) { + TclOODelMethodRef(clsPtr->constructorPtr); + clsPtr->constructorPtr = (Method *) method; + BumpGlobalEpoch(interp, clsPtr); + } +} + +void +Tcl_ClassSetDestructor( + Tcl_Interp *interp, + Tcl_Class clazz, + Tcl_Method method) +{ + Class *clsPtr = (Class *) clazz; + + if (method != (Tcl_Method) clsPtr->destructorPtr) { + TclOODelMethodRef(clsPtr->destructorPtr); + clsPtr->destructorPtr = (Method *) method; + BumpGlobalEpoch(interp, clsPtr); + } +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c new file mode 100644 index 0000000..bded40c --- /dev/null +++ b/generic/tclOOInfo.c @@ -0,0 +1,1271 @@ +/* + * tclOODefineCmds.c -- + * + * This file contains the implementation of the ::oo-related [info] + * subcommands. + * + * Copyright (c) 2006-2008 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOOInfo.c,v 1.4 2008/05/31 11:42:18 dkf Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclInt.h" +#include "tclOOInt.h" + +static Tcl_ObjCmdProc InfoObjectClassCmd; +static Tcl_ObjCmdProc InfoObjectDefnCmd; +static Tcl_ObjCmdProc InfoObjectFiltersCmd; +static Tcl_ObjCmdProc InfoObjectForwardCmd; +static Tcl_ObjCmdProc InfoObjectIsACmd; +static Tcl_ObjCmdProc InfoObjectMethodsCmd; +static Tcl_ObjCmdProc InfoObjectMixinsCmd; +static Tcl_ObjCmdProc InfoObjectVarsCmd; +static Tcl_ObjCmdProc InfoClassConstrCmd; +static Tcl_ObjCmdProc InfoClassDefnCmd; +static Tcl_ObjCmdProc InfoClassDestrCmd; +static Tcl_ObjCmdProc InfoClassFiltersCmd; +static Tcl_ObjCmdProc InfoClassForwardCmd; +static Tcl_ObjCmdProc InfoClassInstancesCmd; +static Tcl_ObjCmdProc InfoClassMethodsCmd; +static Tcl_ObjCmdProc InfoClassMixinsCmd; +static Tcl_ObjCmdProc InfoClassSubsCmd; +static Tcl_ObjCmdProc InfoClassSupersCmd; + +struct NameProcMap { const char *name; Tcl_ObjCmdProc *proc; }; + +/* + * List of commands that are used to implement the [info object] subcommands. + */ + +static const struct NameProcMap infoObjectCmds[] = { + {"::oo::InfoObject::class", InfoObjectClassCmd}, + {"::oo::InfoObject::definition", InfoObjectDefnCmd}, + {"::oo::InfoObject::filters", InfoObjectFiltersCmd}, + {"::oo::InfoObject::forward", InfoObjectForwardCmd}, + {"::oo::InfoObject::isa", InfoObjectIsACmd}, + {"::oo::InfoObject::methods", InfoObjectMethodsCmd}, + {"::oo::InfoObject::mixins", InfoObjectMixinsCmd}, + {"::oo::InfoObject::vars", InfoObjectVarsCmd}, + {NULL, NULL} +}; + +/* + * List of commands that are used to implement the [info class] subcommands. + */ + +static const struct NameProcMap infoClassCmds[] = { + {"::oo::InfoClass::constructor", InfoClassConstrCmd}, + {"::oo::InfoClass::definition", InfoClassDefnCmd}, + {"::oo::InfoClass::destructor", InfoClassDestrCmd}, + {"::oo::InfoClass::filters", InfoClassFiltersCmd}, + {"::oo::InfoClass::forward", InfoClassForwardCmd}, + {"::oo::InfoClass::instances", InfoClassInstancesCmd}, + {"::oo::InfoClass::methods", InfoClassMethodsCmd}, + {"::oo::InfoClass::mixins", InfoClassMixinsCmd}, + {"::oo::InfoClass::subclasses", InfoClassSubsCmd}, + {"::oo::InfoClass::superclasses", InfoClassSupersCmd}, + {NULL, NULL} +}; + +/* + * ---------------------------------------------------------------------- + * + * TclOOInitInfo -- + * + * Adjusts the Tcl core [info] command to contain subcommands ("object" + * and "class") for introspection of objects and classes. + * + * ---------------------------------------------------------------------- + */ + +void +TclOOInitInfo( + Tcl_Interp *interp) +{ + Tcl_Namespace *nsPtr; + Tcl_Command infoCmd; + int i; + + /* + * Build the ensemble used to implement [info object]. + */ + + nsPtr = Tcl_CreateNamespace(interp, "::oo::InfoObject", NULL, NULL); + Tcl_CreateEnsemble(interp, nsPtr->fullName, nsPtr, TCL_ENSEMBLE_PREFIX); + Tcl_Export(interp, nsPtr, "[a-z]*", 1); + for (i=0 ; infoObjectCmds[i].name!=NULL ; i++) { + Tcl_CreateObjCommand(interp, infoObjectCmds[i].name, + infoObjectCmds[i].proc, NULL, NULL); + } + + /* + * Build the ensemble used to implement [info class]. + */ + + nsPtr = Tcl_CreateNamespace(interp, "::oo::InfoClass", NULL, NULL); + Tcl_CreateEnsemble(interp, nsPtr->fullName, nsPtr, TCL_ENSEMBLE_PREFIX); + Tcl_Export(interp, nsPtr, "[a-z]*", 1); + for (i=0 ; infoClassCmds[i].name!=NULL ; i++) { + Tcl_CreateObjCommand(interp, infoClassCmds[i].name, + infoClassCmds[i].proc, NULL, NULL); + } + + /* + * Install into the master [info] ensemble. + */ + + infoCmd = Tcl_FindCommand(interp, "info", NULL, TCL_GLOBAL_ONLY); + if (infoCmd != NULL && Tcl_IsEnsemble(infoCmd)) { + Tcl_Obj *mapDict, *objectObj, *classObj; + + Tcl_GetEnsembleMappingDict(NULL, infoCmd, &mapDict); + if (mapDict != NULL) { + objectObj = Tcl_NewStringObj("object", -1); + classObj = Tcl_NewStringObj("class", -1); + + Tcl_IncrRefCount(objectObj); + Tcl_IncrRefCount(classObj); + Tcl_DictObjPut(NULL, mapDict, objectObj, + Tcl_NewStringObj("::oo::InfoObject", -1)); + Tcl_DictObjPut(NULL, mapDict, classObj, + Tcl_NewStringObj("::oo::InfoClass", -1)); + Tcl_DecrRefCount(objectObj); + Tcl_DecrRefCount(classObj); + Tcl_SetEnsembleMappingDict(interp, infoCmd, mapDict); + } + } +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectClassCmd -- + * + * Implements [info object class $objName ?$className?] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectClassCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + + if (objc != 2 && objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "objName ?className?"); + return TCL_ERROR; + } + + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + if (objc == 2) { + Tcl_SetObjResult(interp, + TclOOObjectName(interp, oPtr->selfCls->thisPtr)); + return TCL_OK; + } else { + Object *o2Ptr; + Class *mixinPtr; + int i; + + o2Ptr = (Object *) Tcl_GetObjectFromObj(interp, objv[2]); + if (o2Ptr == NULL) { + return TCL_ERROR; + } + if (o2Ptr->classPtr == NULL) { + Tcl_AppendResult(interp, "object \"", TclGetString(objv[2]), + "\" is not a class", NULL); + return TCL_ERROR; + } + + FOREACH(mixinPtr, oPtr->mixins) { + if (TclOOIsReachable(o2Ptr->classPtr, mixinPtr)) { + Tcl_SetObjResult(interp, Tcl_NewIntObj(1)); + return TCL_OK; + } + } + Tcl_SetObjResult(interp, Tcl_NewIntObj( + TclOOIsReachable(o2Ptr->classPtr, oPtr->selfCls))); + return TCL_OK; + } +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectDefnCmd -- + * + * Implements [info object definition $objName $methodName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectDefnCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Tcl_HashEntry *hPtr; + Proc *procPtr; + CompiledLocal *localPtr; + Tcl_Obj *argsObj; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 3, objv, "objName methodName"); + return TCL_ERROR; + } + + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + if (!oPtr->methodsPtr) { + goto unknownMethod; + } + hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[2]); + if (hPtr == NULL) { + unknownMethod: + Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), + "\"", NULL); + return TCL_ERROR; + } + procPtr = TclOOGetProcFromMethod(Tcl_GetHashValue(hPtr)); + if (procPtr == NULL) { + Tcl_AppendResult(interp, + "definition not available for this kind of method", NULL); + return TCL_ERROR; + } + + argsObj = Tcl_NewObj(); + for (localPtr=procPtr->firstLocalPtr; localPtr!=NULL; + localPtr=localPtr->nextPtr) { + if (TclIsVarArgument(localPtr)) { + Tcl_Obj *argObj; + + argObj = Tcl_NewObj(); + Tcl_ListObjAppendElement(NULL, argObj, + Tcl_NewStringObj(localPtr->name, -1)); + if (localPtr->defValuePtr != NULL) { + Tcl_ListObjAppendElement(NULL, argObj, localPtr->defValuePtr); + } + Tcl_ListObjAppendElement(NULL, argsObj, argObj); + } + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); + + /* + * This is copied from the [info body] implementation. See the comments + * there for why this copy has to be done here. + */ + + if (procPtr->bodyPtr->bytes == NULL) { + (void) Tcl_GetString(procPtr->bodyPtr); + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj(procPtr->bodyPtr->bytes, + procPtr->bodyPtr->length)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectFiltersCmd -- + * + * Implements [info object filters $objName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectFiltersCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + int i; + Tcl_Obj *filterObj; + Object *oPtr; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "objName"); + return TCL_ERROR; + } + + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + FOREACH(filterObj, oPtr->filters) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), filterObj); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectForwardCmd -- + * + * Implements [info object forward $objName $methodName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectForwardCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Tcl_HashEntry *hPtr; + Tcl_Obj *prefixObj; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); + return TCL_ERROR; + } + + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + if (!oPtr->methodsPtr) { + goto unknownMethod; + } + hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[2]); + if (hPtr == NULL) { + unknownMethod: + Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), + "\"", NULL); + return TCL_ERROR; + } + prefixObj = TclOOGetFwdFromMethod(Tcl_GetHashValue(hPtr)); + if (prefixObj == NULL) { + Tcl_AppendResult(interp, + "prefix argument list not available for this kind of method", + NULL); + return TCL_ERROR; + } + + Tcl_SetObjResult(interp, prefixObj); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectIsACmd -- + * + * Implements [info object isa $category $objName ...] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectIsACmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + static const char *categories[] = { + "class", "metaclass", "mixin", "object", "typeof", NULL + }; + enum IsACats { + IsClass, IsMetaclass, IsMixin, IsObject, IsType + }; + Object *oPtr, *o2Ptr; + int idx, i; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "category objName ?arg ...?"); + return TCL_ERROR; + } + if (Tcl_GetIndexFromObj(interp, objv[1], categories, "category", 0, + &idx) != TCL_OK) { + return TCL_ERROR; + } + + if (idx == IsObject) { + int ok = (Tcl_GetObjectFromObj(interp, objv[2]) != NULL); + + if (!ok) { + Tcl_ResetResult(interp); + } + Tcl_SetObjResult(interp, Tcl_NewIntObj(ok ? 1 : 0)); + return TCL_OK; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[2]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + switch ((enum IsACats) idx) { + case IsClass: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "objName"); + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_NewIntObj(oPtr->classPtr ? 1 : 0)); + return TCL_OK; + case IsMetaclass: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "objName"); + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); + } else { + Class *classCls = TclOOGetFoundation(interp)->classCls; + + Tcl_SetObjResult(interp, Tcl_NewIntObj( + TclOOIsReachable(classCls, oPtr->classPtr) ? 1 : 0)); + } + return TCL_OK; + case IsMixin: + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "objName className"); + return TCL_ERROR; + } + o2Ptr = (Object *) Tcl_GetObjectFromObj(interp, objv[3]); + if (o2Ptr == NULL) { + return TCL_ERROR; + } + if (o2Ptr->classPtr == NULL) { + Tcl_AppendResult(interp, "non-classes cannot be mixins", NULL); + return TCL_ERROR; + } else { + Class *mixinPtr; + + FOREACH(mixinPtr, oPtr->mixins) { + if (mixinPtr == o2Ptr->classPtr) { + Tcl_SetObjResult(interp, Tcl_NewIntObj(1)); + return TCL_OK; + } + } + } + Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); + return TCL_OK; + case IsType: + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "objName className"); + return TCL_ERROR; + } + o2Ptr = (Object *) Tcl_GetObjectFromObj(interp, objv[3]); + if (o2Ptr == NULL) { + return TCL_ERROR; + } + if (o2Ptr->classPtr == NULL) { + Tcl_AppendResult(interp, "non-classes cannot be types", NULL); + return TCL_ERROR; + } + if (TclOOIsReachable(o2Ptr->classPtr, oPtr->selfCls)) { + Tcl_SetObjResult(interp, Tcl_NewIntObj(1)); + } else { + Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); + } + return TCL_OK; + case IsObject: + Tcl_Panic("unexpected fallthrough"); + } + return TCL_ERROR; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectMethodsCmd -- + * + * Implements [info object methods $objName ?$option ...?] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectMethodsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + int flag = PUBLIC_METHOD, recurse = 0; + FOREACH_HASH_DECLS; + Tcl_Obj *namePtr; + Method *mPtr; + static const char *options[] = { + "-all", "-localprivate", "-private", NULL + }; + enum Options { + OPT_ALL, OPT_LOCALPRIVATE, OPT_PRIVATE + }; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "objName ?options...?"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (objc != 2) { + int i, idx; + + for (i=2 ; imethodsPtr) { + FOREACH_HASH(namePtr, mPtr, oPtr->methodsPtr) { + if (mPtr->typePtr != NULL && (mPtr->flags & flag) == flag) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + namePtr); + } + } + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectMixinsCmd -- + * + * Implements [info object mixins $objName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectMixinsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Class *mixinPtr; + Object *oPtr; + int i; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 3, objv, "objName"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + FOREACH(mixinPtr, oPtr->mixins) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + TclOOObjectName(interp, mixinPtr->thisPtr)); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoObjectVarsCmd -- + * + * Implements [info object vars $objName ?$pattern?] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectVarsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + const char *pattern = NULL; + FOREACH_HASH_DECLS; + VarInHash *vihPtr; + Tcl_Obj *nameObj, *resultObj; + + if (objc != 2 && objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "objName ?pattern?"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (objc == 3) { + pattern = TclGetString(objv[2]); + } + resultObj = Tcl_NewObj(); + + /* + * Extract the information we need from the object's namespace's table of + * variables. Note that this involves horrific knowledge of the guts of + * tclVar.c, so we can't leverage our hash-iteration macros properly. + */ + + FOREACH_HASH_VALUE(vihPtr, + &((Namespace *) oPtr->namespacePtr)->varTable.table) { + nameObj = vihPtr->entry.key.objPtr; + + if (TclIsVarUndefined(&vihPtr->var) + || !TclIsVarNamespaceVar(&vihPtr->var)) { + continue; + } + if (pattern != NULL + && !Tcl_StringMatch(TclGetString(nameObj), pattern)) { + continue; + } + Tcl_ListObjAppendElement(NULL, resultObj, nameObj); + } + + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassConstrCmd -- + * + * Implements [info class constructor $clsName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassConstrCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Proc *procPtr; + CompiledLocal *localPtr; + Tcl_Obj *argsObj; + Object *oPtr; + Class *clsPtr; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + if (clsPtr->constructorPtr == NULL) { + return TCL_OK; + } + procPtr = TclOOGetProcFromMethod(clsPtr->constructorPtr); + if (procPtr == NULL) { + Tcl_AppendResult(interp, + "definition not available for this kind of method", NULL); + return TCL_ERROR; + } + + argsObj = Tcl_NewObj(); + for (localPtr=procPtr->firstLocalPtr; localPtr!=NULL; + localPtr=localPtr->nextPtr) { + if (TclIsVarArgument(localPtr)) { + Tcl_Obj *argObj; + + argObj = Tcl_NewObj(); + Tcl_ListObjAppendElement(NULL, argObj, + Tcl_NewStringObj(localPtr->name, -1)); + if (localPtr->defValuePtr != NULL) { + Tcl_ListObjAppendElement(NULL, argObj, localPtr->defValuePtr); + } + Tcl_ListObjAppendElement(NULL, argsObj, argObj); + } + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); + if (procPtr->bodyPtr->bytes == NULL) { + (void) Tcl_GetString(procPtr->bodyPtr); + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj(procPtr->bodyPtr->bytes, + procPtr->bodyPtr->length)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassDefnCmd -- + * + * Implements [info class definition $clsName $methodName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassDefnCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Tcl_HashEntry *hPtr; + Proc *procPtr; + CompiledLocal *localPtr; + Tcl_Obj *argsObj; + Object *oPtr; + Class *clsPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); + if (hPtr == NULL) { + Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), + "\"", NULL); + return TCL_ERROR; + } + procPtr = TclOOGetProcFromMethod(Tcl_GetHashValue(hPtr)); + if (procPtr == NULL) { + Tcl_AppendResult(interp, + "definition not available for this kind of method", NULL); + return TCL_ERROR; + } + + argsObj = Tcl_NewObj(); + for (localPtr=procPtr->firstLocalPtr; localPtr!=NULL; + localPtr=localPtr->nextPtr) { + if (TclIsVarArgument(localPtr)) { + Tcl_Obj *argObj; + + argObj = Tcl_NewObj(); + Tcl_ListObjAppendElement(NULL, argObj, + Tcl_NewStringObj(localPtr->name, -1)); + if (localPtr->defValuePtr != NULL) { + Tcl_ListObjAppendElement(NULL, argObj, localPtr->defValuePtr); + } + Tcl_ListObjAppendElement(NULL, argsObj, argObj); + } + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); + if (procPtr->bodyPtr->bytes == NULL) { + (void) Tcl_GetString(procPtr->bodyPtr); + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj(procPtr->bodyPtr->bytes, + procPtr->bodyPtr->length)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassDestrCmd -- + * + * Implements [info class destructor $clsName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassDestrCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Proc *procPtr; + Object *oPtr; + Class *clsPtr; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + if (clsPtr->destructorPtr == NULL) { + return TCL_OK; + } + procPtr = TclOOGetProcFromMethod(clsPtr->destructorPtr); + if (procPtr == NULL) { + Tcl_AppendResult(interp, + "definition not available for this kind of method", NULL); + return TCL_ERROR; + } + + if (procPtr->bodyPtr->bytes == NULL) { + (void) Tcl_GetString(procPtr->bodyPtr); + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_NewStringObj(procPtr->bodyPtr->bytes, + procPtr->bodyPtr->length)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassFiltersCmd -- + * + * Implements [info class filters $clsName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassFiltersCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + int i; + Tcl_Obj *filterObj; + Object *oPtr; + Class *clsPtr; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + FOREACH(filterObj, clsPtr->filters) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), filterObj); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassForwardCmd -- + * + * Implements [info class forward $clsName $methodName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassForwardCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Tcl_HashEntry *hPtr; + Tcl_Obj *prefixObj; + Object *oPtr; + Class *clsPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); + if (hPtr == NULL) { + Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), + "\"", NULL); + return TCL_ERROR; + } + prefixObj = TclOOGetFwdFromMethod(Tcl_GetHashValue(hPtr)); + if (prefixObj == NULL) { + Tcl_AppendResult(interp, + "prefix argument list not available for this kind of method", + NULL); + return TCL_ERROR; + } + + Tcl_SetObjResult(interp, prefixObj); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassInstancesCmd -- + * + * Implements [info class instances $clsName ?$pattern?] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassInstancesCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Class *clsPtr; + int i; + const char *pattern = NULL; + + if (objc != 2 && objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "className ?pattern?"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + if (objc == 3) { + pattern = TclGetString(objv[2]); + } + + FOREACH(oPtr, clsPtr->instances) { + Tcl_Obj *tmpObj = TclOOObjectName(interp, oPtr); + + if (pattern && !Tcl_StringMatch(TclGetString(tmpObj), pattern)) { + continue; + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), tmpObj); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassMethodsCmd -- + * + * Implements [info class methods $clsName ?-private?] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassMethodsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + int flag = PUBLIC_METHOD, recurse = 0; + FOREACH_HASH_DECLS; + Tcl_Obj *namePtr; + Method *mPtr; + Object *oPtr; + Class *clsPtr; + static const char *options[] = { + "-all", "-localprivate", "-private", NULL + }; + enum Options { + OPT_ALL, OPT_LOCALPRIVATE, OPT_PRIVATE + }; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className ?options...?"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + if (objc != 2) { + int i, idx; + + for (i=2 ; iclassMethods) { + if (mPtr->typePtr != NULL && (mPtr->flags & flag) == flag) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), namePtr); + } + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassMixinsCmd -- + * + * Implements [info class mixins $clsName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassMixinsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Class *clsPtr, *mixinPtr; + int i; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + FOREACH(mixinPtr, clsPtr->mixins) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + TclOOObjectName(interp, mixinPtr->thisPtr)); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassSubsCmd -- + * + * Implements [info class subclasses $clsName ?$pattern?] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassSubsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Class *clsPtr, *subclassPtr; + int i; + const char *pattern = NULL; + + if (objc != 2 && objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "className ?pattern?"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + if (objc == 3) { + pattern = TclGetString(objv[2]); + } + + FOREACH(subclassPtr, clsPtr->subclasses) { + Tcl_Obj *tmpObj = TclOOObjectName(interp, subclassPtr->thisPtr); + + if (pattern && !Tcl_StringMatch(TclGetString(tmpObj), pattern)) { + continue; + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), tmpObj); + } + FOREACH(subclassPtr, clsPtr->mixinSubs) { + Tcl_Obj *tmpObj = TclOOObjectName(interp, subclassPtr->thisPtr); + + if (pattern && !Tcl_StringMatch(TclGetString(tmpObj), pattern)) { + continue; + } + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), tmpObj); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * InfoClassSupersCmd -- + * + * Implements [info class superclasses $clsName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassSupersCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Class *clsPtr, *superPtr; + int i; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + FOREACH(superPtr, clsPtr->superclasses) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + TclOOObjectName(interp, superPtr->thisPtr)); + } + return TCL_OK; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h new file mode 100644 index 0000000..7c0b6a7 --- /dev/null +++ b/generic/tclOOInt.h @@ -0,0 +1,579 @@ +/* + * tclOOInt.h -- + * + * This file contains the structure definitions and some of the function + * declarations for the object-system (NB: not Tcl_Obj, but ::oo). + * + * Copyright (c) 2006 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOOInt.h,v 1.1 2008/05/31 11:42:18 dkf Exp $ + */ + +#include +#include "tclOO.h" + +/* + * Forward declarations. + */ + +struct CallChain; +struct Class; +struct Foundation; +struct Object; + +/* + * The data that needs to be stored per method. This record is used to collect + * information about all sorts of methods, including forwards, constructors + * and destructors. + */ + +typedef struct Method { + const Tcl_MethodType *typePtr; + /* The type of method. If NULL, this is a + * special flag record which is just used for + * the setting of the flags field. */ + int refCount; + ClientData clientData; /* Type-specific data. */ + Tcl_Obj *namePtr; /* Name of the method. */ + struct Object *declaringObjectPtr; + /* The object that declares this method, or + * NULL if it was declared by a class. */ + struct Class *declaringClassPtr; + /* The class that declares this method, or + * NULL if it was declared directly on an + * object. */ + int flags; /* Assorted flags. Includes whether this + * method is public/exported or not. */ +} Method; + +/* + * Pre- and post-call callbacks, to allow procedure-like methods to be fine + * tuned in their behaviour. + */ + +typedef int (*TclOO_PreCallProc)(ClientData clientData, Tcl_Interp *interp, + Tcl_ObjectContext context, Tcl_CallFrame *framePtr, int *isFinished); +typedef int (*TclOO_PostCallProc)(ClientData clientData, Tcl_Interp *interp, + Tcl_ObjectContext context, Tcl_Namespace *namespacePtr, int result); +typedef void (*TclOO_PmCDDeleteProc)(ClientData clientData); +typedef ClientData (*TclOO_PmCDCloneProc)(ClientData clientData); + +/* + * Procedure-like methods have the following extra information. + */ + +typedef struct ProcedureMethod { + int version; /* Version of this structure. Currently must + * be 0. */ + Proc *procPtr; /* Core of the implementation of the method; + * includes the argument definition and the + * body bytecodes. */ + int flags; /* Flags to control features. */ + int refCount; + ClientData clientData; + TclOO_PmCDDeleteProc deleteClientdataProc; + TclOO_PmCDCloneProc cloneClientdataProc; + ProcErrorProc errProc; /* Replacement error handler. */ + TclOO_PreCallProc preCallProc; + /* Callback to allow for additional setup + * before the method executes. */ + TclOO_PostCallProc postCallProc; + /* Callback to allow for additional cleanup + * after the method executes. */ + GetFrameInfoValueProc gfivProc; + /* Callback to allow for fine tuning of how + * the method reports itself. */ +} ProcedureMethod; + +#define TCLOO_PROCEDURE_METHOD_VERSION 0 + +/* + * Flags for use in a ProcedureMethod. + * + * When the USE_DECLARER_NS flag is set, the method will use the namespace of + * the object or class that declared it (or the clone of it, if it was from + * such that the implementation of the method came to the particular use) + * instead of the namespace of the object on which the method was invoked. + * This flag must be distinct from all others that are associated with + * methods. + */ + +#define USE_DECLARER_NS 0x80 + +/* + * Forwarded methods have the following extra information. It is a + * single-field structure because this allows for future expansion without + * changing vast amounts of code. + */ + +typedef struct ForwardMethod { + Tcl_Obj *prefixObj; +} ForwardMethod; + +/* + * Helper definitions that declare a "list" array. The two varieties are + * either optimized for simplicity (in the case that the whole array is + * typically assigned at once) or efficiency (in the case that the array is + * expected to be expanded over time). These lists are designed to be iterated + * over with the help of the FOREACH macro (see later in this file). + * + * The "num" field always counts the number of listType_t elements used in the + * "list" field. When a "size" field exists, it describes how many elements + * are present in the list; when absent, exactly "num" elements are present. + */ + +#define LIST_STATIC(listType_t) \ + struct { int num; listType_t *list; } +#define LIST_DYNAMIC(listType_t) \ + struct { int num, size; listType_t *list; } + +/* + * Now, the definition of what an object actually is. + */ + +typedef struct Object { + struct Foundation *fPtr; /* The basis for the object system. Putting + * this here allows the avoidance of quite a + * lot of hash lookups on the critical path + * for object invokation and creation. */ + Tcl_Namespace *namespacePtr;/* This object's tame namespace. */ + Tcl_Command command; /* Reference to this object's public + * command. */ + Tcl_Command myCommand; /* Reference to this object's internal + * command. */ + struct Class *selfCls; /* This object's class. */ + Tcl_HashTable *methodsPtr; /* Object-local Tcl_Obj (method name) to + * Method* mapping. */ + LIST_STATIC(struct Class *) mixins; + /* Classes mixed into this object. */ + LIST_STATIC(Tcl_Obj *) filters; + /* List of filter names. */ + struct Class *classPtr; /* All classes have this non-NULL; it points + * to the class structure. Everything else has + * this NULL. */ + int refCount; /* Number of strong references to this object. + * Note that there may be many more weak + * references; this mechanism is there to + * avoid Tcl_Preserve. */ + int flags; + int creationEpoch; /* Unique value to make comparisons of objects + * easier. */ + int epoch; /* Per-object epoch, incremented when the way + * an object should resolve call chains is + * changed. */ + Tcl_HashTable *metadataPtr; /* Mapping from pointers to metadata type to + * the ClientData values that are the values + * of each piece of attached metadata. This + * field starts out as NULL and is only + * allocated if metadata is attached. */ + Tcl_Obj *cachedNameObj; /* Cache of the name of the object. */ + Tcl_HashTable *chainCache; /* Place to keep unused contexts. This table + * is indexed by method name as Tcl_Obj. */ + Tcl_ObjectMapMethodNameProc mapMethodNameProc; + /* Function to allow remapping of method + * names. For itcl-ng. */ +} Object; + +#define OBJECT_DELETED 1 /* Flag to say that an object has been + * destroyed. */ +#define ROOT_OBJECT 0x1000 /* Flag to say that this object is the root of + * the class hierarchy and should be treated + * specially during teardown. */ +#define FILTER_HANDLING 0x2000 /* Flag set when the object is processing a + * filter; when set, filters are *not* + * processed on the object, preventing nasty + * recursive filtering problems. */ +#define USE_CLASS_CACHE 0x4000 /* Flag set to say that the object is a pure + * instance of the class, and has had nothing + * added that changes the dispatch chain (i.e. + * no methods, mixins, or filters. */ + +/* + * And the definition of a class. Note that every class also has an associated + * object, through which it is manipulated. + */ + +typedef struct Class { + Object *thisPtr; /* Reference to the object associated with + * this class. */ + int refCount; /* Number of strong references to this class. + * Weak references are not counted; the + * purpose of this is to avoid Tcl_Preserve as + * that is quite slow. */ + int flags; /* Assorted flags. */ + LIST_STATIC(struct Class *) superclasses; + /* List of superclasses, used for generation + * of method call chains. */ + LIST_DYNAMIC(struct Class *) subclasses; + /* List of subclasses, used to ensure deletion + * of dependent entities happens properly when + * the class itself is deleted. */ + LIST_DYNAMIC(Object *) instances; + /* List of instances, used to ensure deletion + * of dependent entities happens properly when + * the class itself is deleted. */ + LIST_STATIC(Tcl_Obj *) filters; + /* List of filter names, used for generation + * of method call chains. */ + LIST_STATIC(struct Class *) mixins; + /* List of mixin classes, used for generation + * of method call chains. */ + LIST_DYNAMIC(struct Class *) mixinSubs; + /* List of classes that this class is mixed + * into, used to ensure deletion of dependent + * entities happens properly when the class + * itself is deleted. */ + Tcl_HashTable classMethods; /* Hash table of all methods. Hash maps from + * the (Tcl_Obj*) method name to the (Method*) + * method record. */ + Method *constructorPtr; /* Method record of the class constructor (if + * any). */ + Method *destructorPtr; /* Method record of the class destructor (if + * any). */ + Tcl_HashTable *metadataPtr; /* Mapping from pointers to metadata type to + * the ClientData values that are the values + * of each piece of attached metadata. This + * field starts out as NULL and is only + * allocated if metadata is attached. */ + struct CallChain *constructorChainPtr; + struct CallChain *destructorChainPtr; + Tcl_HashTable *classChainCache; + /* Places where call chains are stored. For + * constructors, the class chain is always + * used. For destructors and ordinary methods, + * the class chain is only used when the + * object doesn't override with its own mixins + * (and filters and method implementations for + * when getting method chains). */ +} Class; + +/* + * The foundation of the object system within an interpreter contains + * references to the key classes and namespaces, together with a few other + * useful bits and pieces. Probably ought to eventually go in the Interp + * structure itself. + */ + +typedef struct ThreadLocalData { + int nsCount; /* Master epoch counter is used for keeping + * the values used in Tcl_Obj internal + * representations sane. Must be thread-local + * because Tcl_Objs can cross interpreter + * boundaries within a thread (objects don't + * generally cross threads). */ +} ThreadLocalData; + +typedef struct Foundation { + Tcl_Interp *interp; + Class *objectCls; /* The root of the object system. */ + Class *classCls; /* The class of all classes. */ + Tcl_Namespace *ooNs; /* Master ::oo namespace. */ + Tcl_Namespace *defineNs; /* Namespace containing special commands for + * manipulating objects and classes. The + * "oo::define" command acts as a special kind + * of ensemble for this namespace. */ + Tcl_Namespace *objdefNs; /* Namespace containing special commands for + * manipulating objects and classes. The + * "oo::objdefine" command acts as a special + * kind of ensemble for this namespace. */ + Tcl_Namespace *helpersNs; /* Namespace containing the commands that are + * only valid when executing inside a + * procedural method. */ + int epoch; /* Used to invalidate method chains when the + * class structure changes. */ + ThreadLocalData *tsdPtr; /* Counter so we can allocate a unique + * namespace to each object. */ + Tcl_Obj *unknownMethodNameObj; + /* Shared object containing the name of the + * unknown method handler method. */ + Tcl_Obj *constructorName; /* Shared object containing the "name" of a + * constructor. */ + Tcl_Obj *destructorName; /* Shared object containing the "name" of a + * destructor. */ +} Foundation; + +/* + * A call context structure is built when a method is called. They contain the + * chain of method implementations that are to be invoked by a particular + * call, and the process of calling walks the chain, with the [next] command + * proceeding to the next entry in the chain. + */ + +#define CALL_CHAIN_STATIC_SIZE 4 + +struct MInvoke { + Method *mPtr; /* Reference to the method implementation + * record. */ + int isFilter; /* Whether this is a filter invokation. */ + Class *filterDeclarer; /* What class decided to add the filter; if + * NULL, it was added by the object. */ +}; + +typedef struct CallChain { + int objectCreationEpoch; /* The object's creation epoch. Note that the + * object reference is not stored in the call + * chain; it is in the call context. */ + int objectEpoch; /* Local (object structure) epoch counter + * snapshot. */ + int epoch; /* Global (class structure) epoch counter + * snapshot. */ + int flags; /* Assorted flags, see below. */ + int refCount; /* Reference count. */ + int numChain; /* Size of the call chain. */ + struct MInvoke *chain; /* Array of call chain entries. May point to + * staticChain if the number of entries is + * small. */ + struct MInvoke staticChain[CALL_CHAIN_STATIC_SIZE]; +} CallChain; + +typedef struct CallContext { + Object *oPtr; /* The object associated with this call. */ + int index; /* Index into the call chain of the currently + * executing method implementation. */ + int skip; /* Current number of arguments to skip; can + * vary depending on whether it is a direct + * method call or a continuation via the + * [next] command. */ + CallChain *callPtr; /* The actual call chain. */ +} CallContext; + +/* + * Bits for the 'flags' field of the call context. + */ + +#define PUBLIC_METHOD 0x01 /* This is a public (exported) method. */ +#define PRIVATE_METHOD 0x02 /* This is a private (class's direct instances + * only) method. */ +#define OO_UNKNOWN_METHOD 0x04 /* This is an unknown method. */ +#define CONSTRUCTOR 0x08 /* This is a constructor. */ +#define DESTRUCTOR 0x10 /* This is a destructor. */ + +/* + * Assorted flags for call frames. Note that bits 1 and 2 are already taken by + * Tcl itself. + */ + +#if 0 +#define FRAME_IS_METHOD 0x4 /* The frame is a method body, and the frame's + * clientData field contains a CallContext + * reference. */ +#define FRAME_IS_OO_DEFINE 0x8 /* The frame is part of the inside workings of + * the [oo::define] command; the clientData + * field contains an Object reference that has + * been confirmed to refer to a class. */ +#endif + +/* + * Structure containing definition information about basic class methods. + */ + +typedef struct { + const char *name; /* Name of the method in question. */ + int isPublic; /* Whether the method is public by default. */ + Tcl_MethodType definition; /* How to call the method. */ +} DeclaredClassMethod; + +/* + *---------------------------------------------------------------- + * Commands relating to OO support. + *---------------------------------------------------------------- + */ + +MODULE_SCOPE int TclOOInit(Tcl_Interp *interp); +MODULE_SCOPE int TclOODefineObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOOObjDefObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineConstructorObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineDeleteMethodObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineDestructorObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineExportObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineFilterObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineForwardObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineMethodObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineMixinObjCmd(ClientData clientData, + Tcl_Interp *interp, const int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineRenameMethodObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineSuperclassObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineUnexportObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineClassObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineSelfObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOOUnknownDefinition(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOOCopyObjectCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOONextObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE int TclOOSelfObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); + +/* + * Method implementations (in tclOOBasic.c). + */ + +MODULE_SCOPE int TclOO_Class_Create(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOO_Class_CreateNs(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOO_Class_New(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOO_Object_Destroy(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOO_Object_Eval(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOO_Object_LinkVar(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOO_Object_Unknown(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOO_Object_VarName(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); + +/* + * Private definitions, some of which perhaps ought to be exposed properly or + * maybe just put in the internal stubs table. + */ + +MODULE_SCOPE void TclOOAddToInstances(Object *oPtr, Class *clsPtr); +MODULE_SCOPE void TclOOAddToMixinSubs(Class *subPtr, Class *mixinPtr); +MODULE_SCOPE void TclOOAddToSubclasses(Class *subPtr, Class *superPtr); +MODULE_SCOPE void TclOODeleteChain(CallChain *callPtr); +MODULE_SCOPE void TclOODeleteChainCache(Tcl_HashTable *tablePtr); +MODULE_SCOPE void TclOODeleteContext(CallContext *contextPtr); +MODULE_SCOPE void TclOODelMethodRef(Method *method); +MODULE_SCOPE CallContext *TclOOGetCallContext(Object *oPtr, + Tcl_Obj *methodNameObj, int flags); +MODULE_SCOPE Foundation *TclOOGetFoundation(Tcl_Interp *interp); +MODULE_SCOPE Tcl_Obj * TclOOGetFwdFromMethod(Method *mPtr); +MODULE_SCOPE Proc * TclOOGetProcFromMethod(Method *mPtr); +MODULE_SCOPE int TclOOGetSortedClassMethodList(Class *clsPtr, + int flags, const char ***stringsPtr); +MODULE_SCOPE int TclOOGetSortedMethodList(Object *oPtr, int flags, + const char ***stringsPtr); +MODULE_SCOPE int TclOOInit(Tcl_Interp *interp); +MODULE_SCOPE void TclOOInitInfo(Tcl_Interp *interp); +MODULE_SCOPE int TclOOInvokeContext(Tcl_Interp *interp, + CallContext *contextPtr, int objc, + Tcl_Obj *const *objv); +MODULE_SCOPE void TclOONewBasicMethod(Tcl_Interp *interp, Class *clsPtr, + const DeclaredClassMethod *dcm); +MODULE_SCOPE Tcl_Obj * TclOOObjectName(Tcl_Interp *interp, Object *oPtr); +MODULE_SCOPE void TclOORemoveFromInstances(Object *oPtr, Class *clsPtr); +MODULE_SCOPE void TclOORemoveFromMixinSubs(Class *subPtr, + Class *mixinPtr); +MODULE_SCOPE void TclOORemoveFromSubclasses(Class *subPtr, + Class *superPtr); +MODULE_SCOPE void TclOOStashContext(Tcl_Obj *objPtr, + CallContext *contextPtr); + +/* + * Include all the private API, generated from tclOO.decls. + */ + +#include "tclOOIntDecls.h" + +/* + * A convenience macro for iterating through the lists used in the internal + * memory management of objects. This is a bit gnarly because we want to do + * the assignment of the picked-out value only when the body test succeeds, + * but we cannot rely on the assigned value being useful, forcing us to do + * some nasty stuff with the comma operator. The compiler's optimizer should + * be able to sort it all out! + * + * REQUIRES DECLARATION: int i; + */ + +#define FOREACH(var,ary) \ + for(i=0 ; (i<(ary).num?((var=(ary).list[i]),1):0) ; i++) + +/* + * Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS + * sets up the declarations needed for the main macro, FOREACH_HASH, which + * does the actual iteration. FOREACH_HASH_VALUE is a restricted version that + * only iterates over values. + */ + +#define FOREACH_HASH_DECLS \ + Tcl_HashEntry *hPtr;Tcl_HashSearch search +#define FOREACH_HASH(key,val,tablePtr) \ + for(hPtr=Tcl_FirstHashEntry((tablePtr),&search); hPtr!=NULL ? \ + ((key)=(void *)Tcl_GetHashKey((tablePtr),hPtr),\ + (val)=Tcl_GetHashValue(hPtr),1):0; hPtr=Tcl_NextHashEntry(&search)) +#define FOREACH_HASH_VALUE(val,tablePtr) \ + for(hPtr=Tcl_FirstHashEntry((tablePtr),&search); hPtr!=NULL ? \ + ((val)=Tcl_GetHashValue(hPtr),1):0;hPtr=Tcl_NextHashEntry(&search)) + +/* + * Convenience macro for duplicating a list. Needs no external declaration, + * but all arguments are used multiple times and so must have no side effects. + */ + +#define DUPLICATE(target,source,type) \ + do { \ + register unsigned len = sizeof(type) * ((target).num=(source).num);\ + if (len != 0) { \ + memcpy(((target).list=(type*)ckalloc(len)), (source).list, len); \ + } else { \ + (target).list = NULL; \ + } \ + } while(0) + +/* + * Alternatives to Tcl_Preserve/Tcl_EventuallyFree/Tcl_Release. + */ + +#define AddRef(ptr) ((ptr)->refCount++) +#define DelRef(ptr) do { \ + if (--(ptr)->refCount < 1) { \ + ckfree((char *) (ptr)); \ + } \ + } while(0) + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h new file mode 100644 index 0000000..e39b457 --- /dev/null +++ b/generic/tclOOIntDecls.h @@ -0,0 +1,209 @@ +/* + * $Id: tclOOIntDecls.h,v 1.1 2008/05/31 11:42:18 dkf Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + */ + +/* !BEGIN!: Do not edit below this line. */ + +#define TCLOOINT_STUBS_EPOCH 0 +#define TCLOOINT_STUBS_REVISION 44 + +#if !defined(USE_TCLOO_STUBS) + +/* + * Exported function declarations: + */ + +/* 0 */ +TCLOOAPI Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); +/* 1 */ +TCLOOAPI Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, + ClientData clientData, Proc ** procPtrPtr); +/* 2 */ +TCLOOAPI Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + const char * namePtr, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, + ClientData clientData, Proc ** procPtrPtr); +/* 3 */ +TCLOOAPI Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + ProcedureMethod ** pmPtrPtr); +/* 4 */ +TCLOOAPI Method * TclOONewProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + ProcedureMethod ** pmPtrPtr); +/* 5 */ +TCLOOAPI int TclOOObjectCmdCore (Object * oPtr, + Tcl_Interp * interp, int objc, + Tcl_Obj *const * objv, int publicOnly, + Class * startCls); +/* 6 */ +TCLOOAPI int TclOOIsReachable (Class * targetPtr, + Class * startPtr); +/* 7 */ +TCLOOAPI Method * TclOONewForwardMethod (Tcl_Interp * interp, + Class * clsPtr, int isPublic, + Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +/* 8 */ +TCLOOAPI Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int isPublic, + Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +/* 9 */ +TCLOOAPI Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, + Tcl_Object oPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, + void ** internalTokenPtr); +/* 10 */ +TCLOOAPI Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, + Tcl_Class clsPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, + void ** internalTokenPtr); +/* 11 */ +TCLOOAPI int TclOOInvokeObject (Tcl_Interp * interp, + Tcl_Object object, Tcl_Class startCls, + int publicPrivate, int objc, + Tcl_Obj *const * objv); +/* 12 */ +TCLOOAPI void TclOOObjectSetFilters (Object * oPtr, int numFilters, + Tcl_Obj *const * filters); +/* 13 */ +TCLOOAPI void TclOOClassSetFilters (Tcl_Interp * interp, + Class * classPtr, int numFilters, + Tcl_Obj *const * filters); +/* 14 */ +TCLOOAPI void TclOOObjectSetMixins (Object * oPtr, int numMixins, + Class *const * mixins); +/* 15 */ +TCLOOAPI void TclOOClassSetMixins (Tcl_Interp * interp, + Class * classPtr, int numMixins, + Class *const * mixins); + +#endif /* !defined(USE_TCLOO_STUBS) */ + +typedef struct TclOOIntStubs { + int magic; + int epoch; + int revision; + struct TclOOIntStubHooks *hooks; + + Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ + Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ + Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ + Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ + Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ + int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ + int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ + Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ + Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ + Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ + Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ + int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ + void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ + void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ + void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ + void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ +} TclOOIntStubs; + +#ifdef __cplusplus +extern "C" { +#endif +extern const TclOOIntStubs *tclOOIntStubsPtr; +#ifdef __cplusplus +} +#endif + +#if defined(USE_TCLOO_STUBS) + +/* + * Inline function declarations: + */ + +#ifndef TclOOGetDefineCmdContext +#define TclOOGetDefineCmdContext \ + (tclOOIntStubsPtr->tclOOGetDefineCmdContext) /* 0 */ +#endif +#ifndef TclOOMakeProcInstanceMethod +#define TclOOMakeProcInstanceMethod \ + (tclOOIntStubsPtr->tclOOMakeProcInstanceMethod) /* 1 */ +#endif +#ifndef TclOOMakeProcMethod +#define TclOOMakeProcMethod \ + (tclOOIntStubsPtr->tclOOMakeProcMethod) /* 2 */ +#endif +#ifndef TclOONewProcInstanceMethod +#define TclOONewProcInstanceMethod \ + (tclOOIntStubsPtr->tclOONewProcInstanceMethod) /* 3 */ +#endif +#ifndef TclOONewProcMethod +#define TclOONewProcMethod \ + (tclOOIntStubsPtr->tclOONewProcMethod) /* 4 */ +#endif +#ifndef TclOOObjectCmdCore +#define TclOOObjectCmdCore \ + (tclOOIntStubsPtr->tclOOObjectCmdCore) /* 5 */ +#endif +#ifndef TclOOIsReachable +#define TclOOIsReachable \ + (tclOOIntStubsPtr->tclOOIsReachable) /* 6 */ +#endif +#ifndef TclOONewForwardMethod +#define TclOONewForwardMethod \ + (tclOOIntStubsPtr->tclOONewForwardMethod) /* 7 */ +#endif +#ifndef TclOONewForwardInstanceMethod +#define TclOONewForwardInstanceMethod \ + (tclOOIntStubsPtr->tclOONewForwardInstanceMethod) /* 8 */ +#endif +#ifndef TclOONewProcInstanceMethodEx +#define TclOONewProcInstanceMethodEx \ + (tclOOIntStubsPtr->tclOONewProcInstanceMethodEx) /* 9 */ +#endif +#ifndef TclOONewProcMethodEx +#define TclOONewProcMethodEx \ + (tclOOIntStubsPtr->tclOONewProcMethodEx) /* 10 */ +#endif +#ifndef TclOOInvokeObject +#define TclOOInvokeObject \ + (tclOOIntStubsPtr->tclOOInvokeObject) /* 11 */ +#endif +#ifndef TclOOObjectSetFilters +#define TclOOObjectSetFilters \ + (tclOOIntStubsPtr->tclOOObjectSetFilters) /* 12 */ +#endif +#ifndef TclOOClassSetFilters +#define TclOOClassSetFilters \ + (tclOOIntStubsPtr->tclOOClassSetFilters) /* 13 */ +#endif +#ifndef TclOOObjectSetMixins +#define TclOOObjectSetMixins \ + (tclOOIntStubsPtr->tclOOObjectSetMixins) /* 14 */ +#endif +#ifndef TclOOClassSetMixins +#define TclOOClassSetMixins \ + (tclOOIntStubsPtr->tclOOClassSetMixins) /* 15 */ +#endif + +#endif /* defined(USE_TCLOO_STUBS) */ + +/* !END!: Do not edit above this line. */ + +struct TclOOStubAPI { + TclOOStubs *stubsPtr; + TclOOIntStubs *intStubsPtr; +}; diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c new file mode 100644 index 0000000..f190533 --- /dev/null +++ b/generic/tclOOMethod.c @@ -0,0 +1,1425 @@ +/* + * tclOOMethod.c -- + * + * This file contains code to create and manage methods. + * + * Copyright (c) 2005-2008 by Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclOOMethod.c,v 1.1 2008/05/31 11:42:19 dkf Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclInt.h" +#include "tclOOInt.h" + +/* + * Structure used to help delay computing names of objects or classes for + * [info frame] until needed, making invokation faster in the normal case. + */ + +struct PNI { + Tcl_Interp *interp; /* Interpreter in which to compute the name of + * a method. */ + Tcl_Method method; /* Method to compute the name of. */ +}; + +/* + * Structure used to contain all the information needed about a call frame + * used in a procedure-like method. + */ + +typedef struct { + CallFrame *framePtr; /* Reference to the call frame itself (it's + * actually allocated on the Tcl stack). */ + ProcErrorProc errProc; /* The error handler for the body. */ + Tcl_Obj *nameObj; /* The "name" of the command. */ + Command cmd; /* The command structure. Mostly bogus. */ + ExtraFrameInfo efi; /* Extra information used for [info frame]. */ + struct PNI pni; /* Specialist information used in the efi + * field for this type of call. */ +} PMFrameData; + +/* + * Function declarations for things defined in this file. + */ + +static Tcl_Obj ** InitEnsembleRewrite(Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv, int toRewrite, + int rewriteLength, Tcl_Obj *const *rewriteObjs, + int *lengthPtr); +static int InvokeProcedureMethod(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +static int PushMethodCallFrame(Tcl_Interp *interp, + CallContext *contextPtr, ProcedureMethod *pmPtr, + int objc, Tcl_Obj *const *objv, + PMFrameData *fdPtr); +static void DeleteProcedureMethodRecord(ProcedureMethod *pmPtr); +static void DeleteProcedureMethod(ClientData clientData); +static int CloneProcedureMethod(Tcl_Interp *interp, + ClientData clientData, ClientData *newClientData); +static void MethodErrorHandler(Tcl_Interp *interp, + Tcl_Obj *procNameObj); +static void ConstructorErrorHandler(Tcl_Interp *interp, + Tcl_Obj *procNameObj); +static void DestructorErrorHandler(Tcl_Interp *interp, + Tcl_Obj *procNameObj); +static Tcl_Obj * RenderDeclarerName(ClientData clientData); +static int InvokeForwardMethod(ClientData clientData, + Tcl_Interp *interp, Tcl_ObjectContext context, + int objc, Tcl_Obj *const *objv); +static void DeleteForwardMethod(ClientData clientData); +static int CloneForwardMethod(Tcl_Interp *interp, + ClientData clientData, ClientData *newClientData); + +/* + * The types of methods defined by the core OO system. + */ + +static const Tcl_MethodType procMethodType = { + TCL_OO_METHOD_VERSION_CURRENT, "procedural method", + InvokeProcedureMethod, DeleteProcedureMethod, CloneProcedureMethod +}; +static const Tcl_MethodType fwdMethodType = { + TCL_OO_METHOD_VERSION_CURRENT, "forward", + InvokeForwardMethod, DeleteForwardMethod, CloneForwardMethod +}; + +/* + * ---------------------------------------------------------------------- + * + * Tcl_NewInstanceMethod -- + * + * Attach a method to an object instance. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Method +Tcl_NewInstanceMethod( + Tcl_Interp *interp, /* Unused? */ + Tcl_Object object, /* The object that has the method attached to + * it. */ + Tcl_Obj *nameObj, /* The name of the method. May be NULL; if so, + * up to caller to manage storage (e.g., when + * it is a constructor or destructor). */ + int flags, /* Whether this is a public method. */ + const Tcl_MethodType *typePtr, + /* The type of method this is, which defines + * how to invoke, delete and clone the + * method. */ + ClientData clientData) /* Some data associated with the particular + * method to be created. */ +{ + register Object *oPtr = (Object *) object; + register Method *mPtr; + Tcl_HashEntry *hPtr; + int isNew; + + if (nameObj == NULL) { + mPtr = (Method *) ckalloc(sizeof(Method)); + mPtr->namePtr = NULL; + goto populate; + } + if (!oPtr->methodsPtr) { + oPtr->methodsPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitObjHashTable(oPtr->methodsPtr); + oPtr->flags &= ~USE_CLASS_CACHE; + } + hPtr = Tcl_CreateHashEntry(oPtr->methodsPtr, (char *) nameObj, &isNew); + if (isNew) { + mPtr = (Method *) ckalloc(sizeof(Method)); + mPtr->namePtr = nameObj; + Tcl_IncrRefCount(nameObj); + Tcl_SetHashValue(hPtr, mPtr); + } else { + mPtr = Tcl_GetHashValue(hPtr); + if (mPtr->typePtr != NULL && mPtr->typePtr->deleteProc != NULL) { + mPtr->typePtr->deleteProc(mPtr->clientData); + } + } + + populate: + mPtr->typePtr = typePtr; + mPtr->clientData = clientData; + mPtr->refCount = 1; + mPtr->flags = 0; + mPtr->declaringObjectPtr = oPtr; + mPtr->declaringClassPtr = NULL; + if (flags) { + mPtr->flags |= flags & (PUBLIC_METHOD | PRIVATE_METHOD); + } + oPtr->epoch++; + return (Tcl_Method) mPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * Tcl_NewMethod -- + * + * Attach a method to a class. + * + * ---------------------------------------------------------------------- + */ + +Tcl_Method +Tcl_NewMethod( + Tcl_Interp *interp, /* The interpreter containing the class. */ + Tcl_Class cls, /* The class to attach the method to. */ + Tcl_Obj *nameObj, /* The name of the object. May be NULL (e.g., + * for constructors or destructors); if so, up + * to caller to manage storage. */ + int flags, /* Whether this is a public method. */ + const Tcl_MethodType *typePtr, + /* The type of method this is, which defines + * how to invoke, delete and clone the + * method. */ + ClientData clientData) /* Some data associated with the particular + * method to be created. */ +{ + register Class *clsPtr = (Class *) cls; + register Method *mPtr; + Tcl_HashEntry *hPtr; + int isNew; + + if (nameObj == NULL) { + mPtr = (Method *) ckalloc(sizeof(Method)); + mPtr->namePtr = NULL; + goto populate; + } + hPtr = Tcl_CreateHashEntry(&clsPtr->classMethods, (char *)nameObj,&isNew); + if (isNew) { + mPtr = (Method *) ckalloc(sizeof(Method)); + mPtr->namePtr = nameObj; + Tcl_IncrRefCount(nameObj); + Tcl_SetHashValue(hPtr, mPtr); + } else { + mPtr = Tcl_GetHashValue(hPtr); + if (mPtr->typePtr != NULL && mPtr->typePtr->deleteProc != NULL) { + mPtr->typePtr->deleteProc(mPtr->clientData); + } + } + + populate: + clsPtr->thisPtr->fPtr->epoch++; + mPtr->typePtr = typePtr; + mPtr->clientData = clientData; + mPtr->refCount = 1; + mPtr->flags = 0; + mPtr->declaringObjectPtr = NULL; + mPtr->declaringClassPtr = clsPtr; + if (flags) { + mPtr->flags |= flags & (PUBLIC_METHOD | PRIVATE_METHOD); + } + + return (Tcl_Method) mPtr; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOODelMethodRef -- + * + * How to delete a method. + * + * ---------------------------------------------------------------------- + */ + +void +TclOODelMethodRef( + Method *mPtr) +{ + if ((mPtr != NULL) && (--mPtr->refCount < 0)) { + if (mPtr->typePtr != NULL && mPtr->typePtr->deleteProc != NULL) { + mPtr->typePtr->deleteProc(mPtr->clientData); + } + if (mPtr->namePtr != NULL) { + Tcl_DecrRefCount(mPtr->namePtr); + } + + ckfree((char *) mPtr); + } +} + +/* + * ---------------------------------------------------------------------- + * + * TclOONewBasicMethod -- + * + * Helper that makes it cleaner to create very simple methods during + * basic system initialization. Not suitable for general use. + * + * ---------------------------------------------------------------------- + */ + +void +TclOONewBasicMethod( + Tcl_Interp *interp, + Class *clsPtr, /* Class to attach the method to. */ + const DeclaredClassMethod *dcm) + /* Name of the method, whether it is public, + * and the function to implement it. */ +{ + Tcl_Obj *namePtr = Tcl_NewStringObj(dcm->name, -1); + + Tcl_IncrRefCount(namePtr); + Tcl_NewMethod(interp, (Tcl_Class) clsPtr, namePtr, + (dcm->isPublic ? PUBLIC_METHOD : 0), &dcm->definition, NULL); + Tcl_DecrRefCount(namePtr); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOONewProcInstanceMethod -- + * + * Create a new procedure-like method for an object. + * + * ---------------------------------------------------------------------- + */ + +Method * +TclOONewProcInstanceMethod( + Tcl_Interp *interp, /* The interpreter containing the object. */ + Object *oPtr, /* The object to modify. */ + int flags, /* Whether this is a public method. */ + Tcl_Obj *nameObj, /* The name of the method, which must not be + * NULL. */ + Tcl_Obj *argsObj, /* The formal argument list for the method, + * which must not be NULL. */ + Tcl_Obj *bodyObj, /* The body of the method, which must not be + * NULL. */ + ProcedureMethod **pmPtrPtr) /* Place to write pointer to procedure method + * structure to allow for deeper tuning of the + * structure's contents. NULL if caller is not + * interested. */ +{ + int argsLen; + register ProcedureMethod *pmPtr; + Tcl_Method method; + + if (Tcl_ListObjLength(interp, argsObj, &argsLen) != TCL_OK) { + return NULL; + } + pmPtr = (ProcedureMethod *) ckalloc(sizeof(ProcedureMethod)); + memset(pmPtr, 0, sizeof(ProcedureMethod)); + pmPtr->version = TCLOO_PROCEDURE_METHOD_VERSION; + pmPtr->flags = flags & USE_DECLARER_NS; + pmPtr->refCount = 1; + method = TclOOMakeProcInstanceMethod(interp, oPtr, flags, nameObj, + argsObj, bodyObj, &procMethodType, pmPtr, &pmPtr->procPtr); + if (method == NULL) { + ckfree((char *) pmPtr); + } else if (pmPtrPtr != NULL) { + *pmPtrPtr = pmPtr; + } + return (Method *) method; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOONewProcMethod -- + * + * Create a new procedure-like method for a class. + * + * ---------------------------------------------------------------------- + */ + +Method * +TclOONewProcMethod( + Tcl_Interp *interp, /* The interpreter containing the class. */ + Class *clsPtr, /* The class to modify. */ + int flags, /* Whether this is a public method. */ + Tcl_Obj *nameObj, /* The name of the method, which may be NULL; + * if so, up to caller to manage storage + * (e.g., because it is a constructor or + * destructor). */ + Tcl_Obj *argsObj, /* The formal argument list for the method, + * which may be NULL; if so, it is equivalent + * to an empty list. */ + Tcl_Obj *bodyObj, /* The body of the method, which must not be + * NULL. */ + ProcedureMethod **pmPtrPtr) /* Place to write pointer to procedure method + * structure to allow for deeper tuning of the + * structure's contents. NULL if caller is not + * interested. */ +{ + int argsLen; /* -1 => delete argsObj before exit */ + register ProcedureMethod *pmPtr; + const char *procName; + Tcl_Method method; + + if (argsObj == NULL) { + argsLen = -1; + argsObj = Tcl_NewObj(); + Tcl_IncrRefCount(argsObj); + procName = ""; + } else if (Tcl_ListObjLength(interp, argsObj, &argsLen) != TCL_OK) { + return NULL; + } else { + procName = (nameObj==NULL ? "" : TclGetString(nameObj)); + } + + pmPtr = (ProcedureMethod *) ckalloc(sizeof(ProcedureMethod)); + memset(pmPtr, 0, sizeof(ProcedureMethod)); + pmPtr->version = TCLOO_PROCEDURE_METHOD_VERSION; + pmPtr->flags = flags & USE_DECLARER_NS; + pmPtr->refCount = 1; + + method = TclOOMakeProcMethod(interp, clsPtr, flags, nameObj, + procName, argsObj, bodyObj, &procMethodType, pmPtr, + &pmPtr->procPtr); + + if (argsLen == -1) { + Tcl_DecrRefCount(argsObj); + } + if (method == NULL) { + ckfree((char *) pmPtr); + } else if (pmPtrPtr != NULL) { + *pmPtrPtr = pmPtr; + } + + return (Method *) method; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOMakeProcInstanceMethod -- + * + * The guts of the code to make a procedure-like method for an object. + * Split apart so that it is easier for other extensions to reuse (in + * particular, it frees them from having to pry so deeply into Tcl's + * guts). + * + * ---------------------------------------------------------------------- + */ + +Tcl_Method +TclOOMakeProcInstanceMethod( + Tcl_Interp *interp, /* The interpreter containing the object. */ + Object *oPtr, /* The object to modify. */ + int flags, /* Whether this is a public method. */ + Tcl_Obj *nameObj, /* The name of the method, which _must not_ be + * NULL. */ + Tcl_Obj *argsObj, /* The formal argument list for the method, + * which _must not_ be NULL. */ + Tcl_Obj *bodyObj, /* The body of the method, which _must not_ be + * NULL. */ + const Tcl_MethodType *typePtr, + /* The type of the method to create. */ + ClientData clientData, /* The per-method type-specific data. */ + Proc **procPtrPtr) /* A pointer to the variable in which to write + * the procedure record reference. Presumably + * inside the structure indicated by the + * pointer in clientData. */ +{ + Interp *iPtr = (Interp *) interp; + Proc *procPtr; + + if (TclCreateProc(interp, NULL, TclGetString(nameObj), argsObj, bodyObj, + procPtrPtr) != TCL_OK) { + return NULL; + } + procPtr = *procPtrPtr; + procPtr->cmdPtr = NULL; + + if (iPtr->cmdFramePtr) { + CmdFrame context = *iPtr->cmdFramePtr; + + if (context.type == TCL_LOCATION_BC) { + /* + * Retrieve source information from the bytecode, if possible. If + * the information is retrieved successfully, context.type will be + * TCL_LOCATION_SOURCE and the reference held by + * context.data.eval.path will be counted. + */ + + TclGetSrcInfoForPc(&context); + } else if (context.type == TCL_LOCATION_SOURCE) { + /* + * The copy into 'context' up above has created another reference + * to 'context.data.eval.path'; account for it. + */ + + Tcl_IncrRefCount(context.data.eval.path); + } + + if (context.type == TCL_LOCATION_SOURCE) { + /* + * We can account for source location within a proc only if the + * proc body was not created by substitution. + * (FIXME: check that this is sane and correct!) + */ + + if (context.line + && (context.nline >= 4) && (context.line[3] >= 0)) { + int isNew; + CmdFrame *cfPtr = (CmdFrame *) ckalloc(sizeof(CmdFrame)); + Tcl_HashEntry *hPtr; + + cfPtr->level = -1; + cfPtr->type = context.type; + cfPtr->line = (int *) ckalloc(sizeof(int)); + cfPtr->line[0] = context.line[3]; + cfPtr->nline = 1; + cfPtr->framePtr = NULL; + cfPtr->nextPtr = NULL; + + cfPtr->data.eval.path = context.data.eval.path; + Tcl_IncrRefCount(cfPtr->data.eval.path); + + cfPtr->cmd.str.cmd = NULL; + cfPtr->cmd.str.len = 0; + + hPtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr, + (char *) procPtr, &isNew); + Tcl_SetHashValue(hPtr, cfPtr); + } + + /* + * 'context' is going out of scope; account for the reference that + * it's holding to the path name. + */ + + Tcl_DecrRefCount(context.data.eval.path); + context.data.eval.path = NULL; + } + } + + return Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, nameObj, flags, + typePtr, clientData); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOMakeProcMethod -- + * + * The guts of the code to make a procedure-like method for a class. + * Split apart so that it is easier for other extensions to reuse (in + * particular, it frees them from having to pry so deeply into Tcl's + * guts). + * + * ---------------------------------------------------------------------- + */ + +Tcl_Method +TclOOMakeProcMethod( + Tcl_Interp *interp, /* The interpreter containing the class. */ + Class *clsPtr, /* The class to modify. */ + int flags, /* Whether this is a public method. */ + Tcl_Obj *nameObj, /* The name of the method, which may be NULL; + * if so, up to caller to manage storage + * (e.g., because it is a constructor or + * destructor). */ + const char *namePtr, /* The name of the method as a string, which + * _must not_ be NULL. */ + Tcl_Obj *argsObj, /* The formal argument list for the method, + * which _must not_ be NULL. */ + Tcl_Obj *bodyObj, /* The body of the method, which _must not_ be + * NULL. */ + const Tcl_MethodType *typePtr, + /* The type of the method to create. */ + ClientData clientData, /* The per-method type-specific data. */ + Proc **procPtrPtr) /* A pointer to the variable in which to write + * the procedure record reference. Presumably + * inside the structure indicated by the + * pointer in clientData. */ +{ + Interp *iPtr = (Interp *) interp; + Proc *procPtr; + + if (TclCreateProc(interp, NULL, namePtr, argsObj, bodyObj, + procPtrPtr) != TCL_OK) { + return NULL; + } + procPtr = *procPtrPtr; + procPtr->cmdPtr = NULL; + + if (iPtr->cmdFramePtr) { + CmdFrame context = *iPtr->cmdFramePtr; + + if (context.type == TCL_LOCATION_BC) { + /* + * Retrieve source information from the bytecode, if possible. If + * the information is retrieved successfully, context.type will be + * TCL_LOCATION_SOURCE and the reference held by + * context.data.eval.path will be counted. + */ + + TclGetSrcInfoForPc(&context); + } else if (context.type == TCL_LOCATION_SOURCE) { + /* + * The copy into 'context' up above has created another reference + * to 'context.data.eval.path'; account for it. + */ + + Tcl_IncrRefCount(context.data.eval.path); + } + + if (context.type == TCL_LOCATION_SOURCE) { + /* + * We can account for source location within a proc only if the + * proc body was not created by substitution. + * (FIXME: check that this is sane and correct!) + */ + + if (context.line + && (context.nline >= 4) && (context.line[3] >= 0)) { + int isNew; + CmdFrame *cfPtr = (CmdFrame *) ckalloc(sizeof(CmdFrame)); + Tcl_HashEntry *hPtr; + + cfPtr->level = -1; + cfPtr->type = context.type; + cfPtr->line = (int *) ckalloc(sizeof(int)); + cfPtr->line[0] = context.line[3]; + cfPtr->nline = 1; + cfPtr->framePtr = NULL; + cfPtr->nextPtr = NULL; + + cfPtr->data.eval.path = context.data.eval.path; + Tcl_IncrRefCount(cfPtr->data.eval.path); + + cfPtr->cmd.str.cmd = NULL; + cfPtr->cmd.str.len = 0; + + hPtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr, + (char *) procPtr, &isNew); + Tcl_SetHashValue(hPtr, cfPtr); + } + + /* + * 'context' is going out of scope; account for the reference that + * it's holding to the path name. + */ + + Tcl_DecrRefCount(context.data.eval.path); + context.data.eval.path = NULL; + } + } + + return Tcl_NewMethod(interp, (Tcl_Class) clsPtr, nameObj, flags, typePtr, + clientData); +} + +/* + * ---------------------------------------------------------------------- + * + * InvokeProcedureMethod, PushMethodCallFrame -- + * + * How to invoke a procedure-like method. + * + * ---------------------------------------------------------------------- + */ + +static int +InvokeProcedureMethod( + ClientData clientData, /* Pointer to some per-method context. */ + Tcl_Interp *interp, + Tcl_ObjectContext context, /* The method calling context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* Arguments as actually seen. */ +{ + ProcedureMethod *pmPtr = clientData; + int result; + register int skip; + PMFrameData *fdPtr; /* Important data that has to have a lifetime + * matched by this function (or rather, by the + * call frame's lifetime). */ + + /* + * Allocate the special frame data. + */ + + fdPtr = (PMFrameData *) TclStackAlloc(interp, sizeof(PMFrameData)); + pmPtr->refCount++; + + /* + * Create a call frame for this method. + */ + + result = PushMethodCallFrame(interp, (CallContext *) context, pmPtr, + objc, objv, fdPtr); + if (result != TCL_OK) { + goto done; + } + + /* + * Give the pre-call callback a chance to do some setup and, possibly, + * veto the call. + */ + + if (pmPtr->preCallProc != NULL) { + int isFinished; + + result = pmPtr->preCallProc(pmPtr->clientData, interp, context, + (Tcl_CallFrame *) fdPtr->framePtr, &isFinished); + if (isFinished || result != TCL_OK) { + Tcl_PopCallFrame(interp); + TclStackFree(interp, fdPtr->framePtr); + goto done; + } + } + + /* + * Now invoke the body of the method. Note that we need to take special + * action when doing unknown processing to ensure that the missing method + * name is passed as an argument. + */ + + skip = Tcl_ObjectContextSkippedArgs(context); + result = TclObjInterpProcCore(interp, fdPtr->nameObj, skip, + fdPtr->errProc); + + /* + * Give the post-call callback a chance to do some cleanup. Note that at + * this point the call frame itself is invalid; it's already been popped. + */ + + if (pmPtr->postCallProc) { + result = pmPtr->postCallProc(pmPtr->clientData, interp, context, + Tcl_GetObjectNamespace(Tcl_ObjectContextObject(context)), + result); + } + + /* + * Scrap the special frame data now that we're done with it. Note that we + * are inlining DeleteProcedureMethod() here; this location is highly + * sensitive when it comes to performance! + */ + + done: + if (--pmPtr->refCount < 1) { + DeleteProcedureMethodRecord(pmPtr); + } + TclStackFree(interp, fdPtr); + return result; +} + +static int +PushMethodCallFrame( + Tcl_Interp *interp, /* Current interpreter. */ + CallContext *contextPtr, /* Current method call context. */ + ProcedureMethod *pmPtr, /* Information about this procedure-like + * method. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv, /* Array of arguments. */ + PMFrameData *fdPtr) /* Place to store information about the call + * frame. */ +{ + Tcl_Namespace *nsPtr = contextPtr->oPtr->namespacePtr; + register int result; + const char *namePtr; + CallFrame **framePtrPtr = &fdPtr->framePtr; + static Tcl_ObjType *byteCodeTypePtr = NULL; /* HACK! */ + + /* + * Compute basic information on the basis of the type of method it is. + */ + + if (contextPtr->callPtr->flags & CONSTRUCTOR) { + namePtr = ""; + fdPtr->nameObj = contextPtr->oPtr->fPtr->constructorName; + fdPtr->errProc = ConstructorErrorHandler; + } else if (contextPtr->callPtr->flags & DESTRUCTOR) { + namePtr = ""; + fdPtr->nameObj = contextPtr->oPtr->fPtr->destructorName; + fdPtr->errProc = DestructorErrorHandler; + } else { + fdPtr->nameObj = Tcl_MethodName( + Tcl_ObjectContextMethod((Tcl_ObjectContext) contextPtr)); + namePtr = TclGetString(fdPtr->nameObj); + fdPtr->errProc = MethodErrorHandler; + } + if (pmPtr->errProc != NULL) { + fdPtr->errProc = pmPtr->errProc; + } + + /* + * Magic to enable things like [incr Tcl], which wants methods to run in + * their class's namespace. + */ + + if (pmPtr->flags & USE_DECLARER_NS) { + register Method *mPtr = + contextPtr->callPtr->chain[contextPtr->index].mPtr; + + if (mPtr->declaringClassPtr != NULL) { + nsPtr = mPtr->declaringClassPtr->thisPtr->namespacePtr; + } else { + nsPtr = mPtr->declaringObjectPtr->namespacePtr; + } + } + + /* + * Compile the body. This operation may fail. + */ + + fdPtr->efi.length = 2; + memset(&fdPtr->cmd, 0, sizeof(Command)); + fdPtr->cmd.nsPtr = (Namespace *) nsPtr; + fdPtr->cmd.clientData = &fdPtr->efi; + pmPtr->procPtr->cmdPtr = &fdPtr->cmd; + + /* Should be a reference to tclByteCodeType, but that's MODULE_SCOPE */ + if (byteCodeTypePtr == NULL || + pmPtr->procPtr->bodyPtr->typePtr != byteCodeTypePtr) { + result = TclProcCompileProc(interp, pmPtr->procPtr, + pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, + "body of method", namePtr); + if (result != TCL_OK) { + return result; + } + if (byteCodeTypePtr == NULL) { + byteCodeTypePtr = pmPtr->procPtr->bodyPtr->typePtr; + } + } + + /* + * Make the stack frame and fill it out with information about this call. + * This operation may fail. + */ + + result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, nsPtr, + FRAME_IS_PROC|FRAME_IS_METHOD); + if (result != TCL_OK) { + return result; + } + + fdPtr->framePtr->clientData = contextPtr; + fdPtr->framePtr->objc = objc; + fdPtr->framePtr->objv = objv; + fdPtr->framePtr->procPtr = pmPtr->procPtr; + + /* + * Finish filling out the extra frame info so that [info frame] works. + */ + + fdPtr->efi.fields[0].name = "method"; + fdPtr->efi.fields[0].proc = NULL; + fdPtr->efi.fields[0].clientData = fdPtr->nameObj; + if (pmPtr->gfivProc != NULL) { + fdPtr->efi.fields[1].proc = pmPtr->gfivProc; + fdPtr->efi.fields[1].clientData = pmPtr; + } else { + register Tcl_Method method = + Tcl_ObjectContextMethod((Tcl_ObjectContext) contextPtr); + + if (Tcl_MethodDeclarerObject(method) != NULL) { + fdPtr->efi.fields[1].name = "object"; + } else { + fdPtr->efi.fields[1].name = "class"; + } + fdPtr->efi.fields[1].proc = RenderDeclarerName; + fdPtr->efi.fields[1].clientData = &fdPtr->pni; + fdPtr->pni.interp = interp; + fdPtr->pni.method = method; + } + + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * RenderDeclarerName -- + * + * Returns the name of the entity (object or class) which declared a + * method. Used for producing information for [info frame] in such a way + * that the expensive part of this (generating the object or class name + * itself) isn't done until it is needed. + * + * ---------------------------------------------------------------------- + */ + +static Tcl_Obj * +RenderDeclarerName( + ClientData clientData) +{ + struct PNI *pni = clientData; + Tcl_Object object = Tcl_MethodDeclarerObject(pni->method); + + if (object == NULL) { + object = Tcl_GetClassAsObject(Tcl_MethodDeclarerClass(pni->method)); + } + return TclOOObjectName(pni->interp, (Object *) object); +} + +/* + * ---------------------------------------------------------------------- + * + * MethodErrorHandler, ConstructorErrorHandler, DestructorErrorHandler -- + * + * How to fill in the stack trace correctly upon error in various forms + * of procedure-like methods. LIMIT is how long the inserted strings in + * the error traces should get before being converted to have ellipses, + * and ELLIPSIFY is a macro to do the conversion (with the help of a + * %.*s%s format field). Note that ELLIPSIFY is only safe for use in + * suitable formatting contexts. + * + * ---------------------------------------------------------------------- + */ + +#define LIMIT 60 +#define ELLIPSIFY(str,len) \ + ((len) > LIMIT ? LIMIT : (len)), (str), ((len) > LIMIT ? "..." : "") + +static void +MethodErrorHandler( + Tcl_Interp *interp, + Tcl_Obj *methodNameObj) +{ + int nameLen, objectNameLen; + CallContext *contextPtr = ((Interp *) interp)->varFramePtr->clientData; + Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; + const char *objectName, *kindName, *methodName = + Tcl_GetStringFromObj(mPtr->namePtr, &nameLen); + Object *declarerPtr; + + if (mPtr->declaringObjectPtr != NULL) { + declarerPtr = mPtr->declaringObjectPtr; + kindName = "object"; + } else { + if (mPtr->declaringClassPtr == NULL) { + Tcl_Panic("method not declared in class or object"); + } + declarerPtr = mPtr->declaringClassPtr->thisPtr; + kindName = "class"; + } + + objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr), + &objectNameLen); + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (%s \"%.*s%s\" method \"%.*s%s\" line %d)", + kindName, ELLIPSIFY(objectName, objectNameLen), + ELLIPSIFY(methodName, nameLen), interp->errorLine)); +} + +static void +ConstructorErrorHandler( + Tcl_Interp *interp, + Tcl_Obj *methodNameObj) +{ + CallContext *contextPtr = ((Interp *) interp)->varFramePtr->clientData; + Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; + Object *declarerPtr; + const char *objectName, *kindName; + int objectNameLen; + + if (interp->errorLine == 0xDEADBEEF) { + /* + * Horrible hack to deal with certain constructors that must not add + * information to the error trace. + */ + + return; + } + + if (mPtr->declaringObjectPtr != NULL) { + declarerPtr = mPtr->declaringObjectPtr; + kindName = "object"; + } else { + if (mPtr->declaringClassPtr == NULL) { + Tcl_Panic("method not declared in class or object"); + } + declarerPtr = mPtr->declaringClassPtr->thisPtr; + kindName = "class"; + } + + objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr), + &objectNameLen); + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (%s \"%.*s%s\" constructor line %d)", kindName, + ELLIPSIFY(objectName, objectNameLen), interp->errorLine)); +} + +static void +DestructorErrorHandler( + Tcl_Interp *interp, + Tcl_Obj *methodNameObj) +{ + CallContext *contextPtr = ((Interp *) interp)->varFramePtr->clientData; + Method *mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; + Object *declarerPtr; + const char *objectName, *kindName; + int objectNameLen; + + if (mPtr->declaringObjectPtr != NULL) { + declarerPtr = mPtr->declaringObjectPtr; + kindName = "object"; + } else { + if (mPtr->declaringClassPtr == NULL) { + Tcl_Panic("method not declared in class or object"); + } + declarerPtr = mPtr->declaringClassPtr->thisPtr; + kindName = "class"; + } + + objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr), + &objectNameLen); + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (%s \"%.*s%s\" destructor line %d)", kindName, + ELLIPSIFY(objectName, objectNameLen), interp->errorLine)); +} + +/* + * ---------------------------------------------------------------------- + * + * DeleteProcedureMethod, CloneProcedureMethod -- + * + * How to delete and clone procedure-like methods. + * + * ---------------------------------------------------------------------- + */ + +static void +DeleteProcedureMethodRecord( + ProcedureMethod *pmPtr) +{ + TclProcDeleteProc(pmPtr->procPtr); + if (pmPtr->deleteClientdataProc) { + pmPtr->deleteClientdataProc(pmPtr->clientData); + } + ckfree((char *) pmPtr); +} + +static void +DeleteProcedureMethod( + ClientData clientData) +{ + register ProcedureMethod *pmPtr = clientData; + + if (--pmPtr->refCount < 1) { + DeleteProcedureMethodRecord(pmPtr); + } +} + +static int +CloneProcedureMethod( + Tcl_Interp *interp, + ClientData clientData, + ClientData *newClientData) +{ + ProcedureMethod *pmPtr = clientData; + ProcedureMethod *pm2Ptr = (ProcedureMethod *) + ckalloc(sizeof(ProcedureMethod)); + + memcpy(pm2Ptr, pmPtr, sizeof(ProcedureMethod)); + pm2Ptr->refCount = 1; + pm2Ptr->procPtr->refCount++; + if (pmPtr->cloneClientdataProc) { + pm2Ptr->clientData = pmPtr->cloneClientdataProc(pmPtr->clientData); + } + *newClientData = pm2Ptr; + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOONewForwardMethod -- + * + * Create a forwarded method for an object. + * + * ---------------------------------------------------------------------- + */ + +Method * +TclOONewForwardInstanceMethod( + Tcl_Interp *interp, /* Interpreter for error reporting. */ + Object *oPtr, /* The object to attach the method to. */ + int flags, /* Whether the method is public or not. */ + Tcl_Obj *nameObj, /* The name of the method. */ + Tcl_Obj *prefixObj) /* List of arguments that form the command + * prefix to forward to. */ +{ + int prefixLen; + register ForwardMethod *fmPtr; + + if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { + return NULL; + } + if (prefixLen < 1) { + Tcl_AppendResult(interp, "method forward prefix must be non-empty", + NULL); + return NULL; + } + + fmPtr = (ForwardMethod *) ckalloc(sizeof(ForwardMethod)); + fmPtr->prefixObj = prefixObj; + Tcl_IncrRefCount(prefixObj); + return (Method *) Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, + nameObj, flags, &fwdMethodType, fmPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * TclOONewForwardMethod -- + * + * Create a new forwarded method for a class. + * + * ---------------------------------------------------------------------- + */ + +Method * +TclOONewForwardMethod( + Tcl_Interp *interp, /* Interpreter for error reporting. */ + Class *clsPtr, /* The class to attach the method to. */ + int flags, /* Whether the method is public or not. */ + Tcl_Obj *nameObj, /* The name of the method. */ + Tcl_Obj *prefixObj) /* List of arguments that form the command + * prefix to forward to. */ +{ + int prefixLen; + register ForwardMethod *fmPtr; + + if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { + return NULL; + } + if (prefixLen < 1) { + Tcl_AppendResult(interp, "method forward prefix must be non-empty", + NULL); + return NULL; + } + + fmPtr = (ForwardMethod *) ckalloc(sizeof(ForwardMethod)); + fmPtr->prefixObj = prefixObj; + Tcl_IncrRefCount(prefixObj); + return (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr, nameObj, + flags, &fwdMethodType, fmPtr); +} + +/* + * ---------------------------------------------------------------------- + * + * InvokeForwardMethod -- + * + * How to invoke a forwarded method. Works by doing some ensemble-like + * command rearranging and then invokes some other Tcl command. + * + * ---------------------------------------------------------------------- + */ + +static int +InvokeForwardMethod( + ClientData clientData, /* Pointer to some per-method context. */ + Tcl_Interp *interp, + Tcl_ObjectContext context, /* The method calling context. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const *objv) /* Arguments as actually seen. */ +{ + CallContext *contextPtr = (CallContext *) context; + ForwardMethod *fmPtr = clientData; + Tcl_Obj **argObjs, **prefixObjs; + int numPrefixes, result, len, skip = contextPtr->skip; + + /* + * Build the real list of arguments to use. Note that we know that the + * prefixObj field of the ForwardMethod structure holds a reference to a + * non-empty list, so there's a whole class of failures ("not a list") we + * can ignore here. + */ + + Tcl_ListObjGetElements(NULL, fmPtr->prefixObj, &numPrefixes, &prefixObjs); + argObjs = InitEnsembleRewrite(interp, objc, objv, skip, + numPrefixes, prefixObjs, &len); + + result = Tcl_EvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); + TclStackFree(interp, argObjs); + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * DeleteForwardMethod, CloneForwardMethod -- + * + * How to delete and clone forwarded methods. + * + * ---------------------------------------------------------------------- + */ + +static void +DeleteForwardMethod( + ClientData clientData) +{ + ForwardMethod *fmPtr = clientData; + + Tcl_DecrRefCount(fmPtr->prefixObj); + ckfree((char *) fmPtr); +} + +static int +CloneForwardMethod( + Tcl_Interp *interp, + ClientData clientData, + ClientData *newClientData) +{ + ForwardMethod *fmPtr = clientData; + ForwardMethod *fm2Ptr = (ForwardMethod *) ckalloc(sizeof(ForwardMethod)); + + fm2Ptr->prefixObj = fmPtr->prefixObj; + Tcl_IncrRefCount(fm2Ptr->prefixObj); + *newClientData = fm2Ptr; + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * + * TclOOGetProcFromMethod, TclOOGetFwdFromMethod -- + * + * Utility functions used for procedure-like and forwarding method + * introspection. + * + * ---------------------------------------------------------------------- + */ + +Proc * +TclOOGetProcFromMethod( + Method *mPtr) +{ + if (mPtr->typePtr == &procMethodType) { + ProcedureMethod *pmPtr = mPtr->clientData; + + return pmPtr->procPtr; + } + return NULL; +} + +Tcl_Obj * +TclOOGetFwdFromMethod( + Method *mPtr) +{ + if (mPtr->typePtr == &fwdMethodType) { + ForwardMethod *fwPtr = mPtr->clientData; + + return fwPtr->prefixObj; + } + return NULL; +} + +/* + * ---------------------------------------------------------------------- + * + * InitEnsembleRewrite -- + * + * Utility function that wraps up a lot of the complexity involved in + * doing ensemble-like command forwarding. Here is a picture of memory + * management plan: + * + * <-----------------objc----------------------> + * objv: |=============|===============================| + * <-toRewrite-> | + * \ + * <-rewriteLength-> \ + * rewriteObjs: |=================| \ + * | | + * V V + * argObjs: |=================|===============================| + * <------------------*lengthPtr-------------------> + * + * ---------------------------------------------------------------------- + */ + +static Tcl_Obj ** +InitEnsembleRewrite( + Tcl_Interp *interp, /* Place to log the rewrite info. */ + int objc, /* Number of real arguments. */ + Tcl_Obj *const *objv, /* The real arguments. */ + int toRewrite, /* Number of real arguments to replace. */ + int rewriteLength, /* Number of arguments to insert instead. */ + Tcl_Obj *const *rewriteObjs,/* Arguments to insert instead. */ + int *lengthPtr) /* Where to write the resulting length of the + * array of rewritten arguments. */ +{ + Interp *iPtr = (Interp *) interp; + int isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); + Tcl_Obj **argObjs; + unsigned len = rewriteLength + objc - toRewrite; + + argObjs = TclStackAlloc(interp, sizeof(Tcl_Obj *) * len); + memcpy(argObjs, rewriteObjs, rewriteLength * sizeof(Tcl_Obj *)); + memcpy(argObjs + rewriteLength, objv + toRewrite, + sizeof(Tcl_Obj *) * (objc - toRewrite)); + + /* + * Now plumb this into the core ensemble rewrite logging system so that + * Tcl_WrongNumArgs() can rewrite its result appropriately. The rules for + * how to store the rewrite rules get complex solely because of the case + * where an ensemble rewrites itself out of the picture; when that + * happens, the quality of the error message rewrite falls drastically + * (and unavoidably). + */ + + if (isRootEnsemble) { + iPtr->ensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = toRewrite; + iPtr->ensembleRewrite.numInsertedObjs = rewriteLength; + } else { + int numIns = iPtr->ensembleRewrite.numInsertedObjs; + + if (numIns < toRewrite) { + iPtr->ensembleRewrite.numRemovedObjs += toRewrite - numIns; + iPtr->ensembleRewrite.numInsertedObjs += rewriteLength - 1; + } else { + iPtr->ensembleRewrite.numInsertedObjs += + rewriteLength - toRewrite; + } + } + + *lengthPtr = len; + return argObjs; +} + +/* + * ---------------------------------------------------------------------- + * + * assorted trivial 'getter' functions + * + * ---------------------------------------------------------------------- + */ + +Tcl_Object +Tcl_MethodDeclarerObject( + Tcl_Method method) +{ + return (Tcl_Object) ((Method *) method)->declaringObjectPtr; +} + +Tcl_Class +Tcl_MethodDeclarerClass( + Tcl_Method method) +{ + return (Tcl_Class) ((Method *) method)->declaringClassPtr; +} + +Tcl_Obj * +Tcl_MethodName( + Tcl_Method method) +{ + return ((Method *) method)->namePtr; +} + +int +Tcl_MethodIsType( + Tcl_Method method, + const Tcl_MethodType *typePtr, + ClientData *clientDataPtr) +{ + Method *mPtr = (Method *) method; + + if (mPtr->typePtr == typePtr) { + if (clientDataPtr != NULL) { + *clientDataPtr = mPtr->clientData; + } + return 1; + } + return 0; +} + +int +Tcl_MethodIsPublic( + Tcl_Method method) +{ + return (((Method *)method)->flags & PUBLIC_METHOD) ? 1 : 0; +} + +/* + * Extended method construction for itcl-ng. + */ + +Tcl_Method +TclOONewProcInstanceMethodEx( + Tcl_Interp *interp, /* The interpreter containing the object. */ + Tcl_Object oPtr, /* The object to modify. */ + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, + ClientData clientData, + Tcl_Obj *nameObj, /* The name of the method, which must not be + * NULL. */ + Tcl_Obj *argsObj, /* The formal argument list for the method, + * which must not be NULL. */ + Tcl_Obj *bodyObj, /* The body of the method, which must not be + * NULL. */ + int flags, /* Whether this is a public method. */ + void **internalTokenPtr) /* If non-NULL, points to a variable that gets + * the reference to the ProcedureMethod + * structure. */ +{ + ProcedureMethod *pmPtr; + Tcl_Method method = (Tcl_Method) TclOONewProcInstanceMethod(interp, + (Object *) oPtr, flags, nameObj, argsObj, bodyObj, &pmPtr); + + if (method == NULL) { + return NULL; + } + pmPtr->flags = flags & USE_DECLARER_NS; + pmPtr->preCallProc = preCallPtr; + pmPtr->postCallProc = postCallPtr; + pmPtr->errProc = errProc; + pmPtr->clientData = clientData; + if (internalTokenPtr != NULL) { + *internalTokenPtr = pmPtr; + } + return method; +} + +Tcl_Method +TclOONewProcMethodEx( + Tcl_Interp *interp, /* The interpreter containing the class. */ + Tcl_Class clsPtr, /* The class to modify. */ + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, + ClientData clientData, + Tcl_Obj *nameObj, /* The name of the method, which may be NULL; + * if so, up to caller to manage storage + * (e.g., because it is a constructor or + * destructor). */ + Tcl_Obj *argsObj, /* The formal argument list for the method, + * which may be NULL; if so, it is equivalent + * to an empty list. */ + Tcl_Obj *bodyObj, /* The body of the method, which must not be + * NULL. */ + int flags, /* Whether this is a public method. */ + void **internalTokenPtr) /* If non-NULL, points to a variable that gets + * the reference to the ProcedureMethod + * structure. */ +{ + ProcedureMethod *pmPtr; + Tcl_Method method = (Tcl_Method) TclOONewProcMethod(interp, + (Class *) clsPtr, flags, nameObj, argsObj, bodyObj, &pmPtr); + + if (method == NULL) { + return NULL; + } + pmPtr->flags = flags & USE_DECLARER_NS; + pmPtr->preCallProc = preCallPtr; + pmPtr->postCallProc = postCallPtr; + pmPtr->errProc = errProc; + pmPtr->clientData = clientData; + if (internalTokenPtr != NULL) { + *internalTokenPtr = pmPtr; + } + return method; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c new file mode 100644 index 0000000..b49dc12 --- /dev/null +++ b/generic/tclOOStubInit.c @@ -0,0 +1,79 @@ +/* + * $Id: tclOOStubInit.c,v 1.1 2008/05/31 11:42:19 dkf Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + * It is compiled and linked in with the tclOO package proper. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclOO.h" +#include "tclOOInt.h" + +/* !BEGIN!: Do not edit below this line. */ + +TclOOStubs tclOOStubs = { + TCL_STUB_MAGIC, + TCLOO_STUBS_EPOCH, + TCLOO_STUBS_REVISION, + 0, + Tcl_CopyObjectInstance, /* 0 */ + Tcl_GetClassAsObject, /* 1 */ + Tcl_GetObjectAsClass, /* 2 */ + Tcl_GetObjectCommand, /* 3 */ + Tcl_GetObjectFromObj, /* 4 */ + Tcl_GetObjectNamespace, /* 5 */ + Tcl_MethodDeclarerClass, /* 6 */ + Tcl_MethodDeclarerObject, /* 7 */ + Tcl_MethodIsPublic, /* 8 */ + Tcl_MethodIsType, /* 9 */ + Tcl_MethodName, /* 10 */ + Tcl_NewInstanceMethod, /* 11 */ + Tcl_NewMethod, /* 12 */ + Tcl_NewObjectInstance, /* 13 */ + Tcl_ObjectDeleted, /* 14 */ + Tcl_ObjectContextIsFiltering, /* 15 */ + Tcl_ObjectContextMethod, /* 16 */ + Tcl_ObjectContextObject, /* 17 */ + Tcl_ObjectContextSkippedArgs, /* 18 */ + Tcl_ClassGetMetadata, /* 19 */ + Tcl_ClassSetMetadata, /* 20 */ + Tcl_ObjectGetMetadata, /* 21 */ + Tcl_ObjectSetMetadata, /* 22 */ + Tcl_ObjectContextInvokeNext, /* 23 */ + Tcl_ObjectGetMethodNameMapper, /* 24 */ + Tcl_ObjectSetMethodNameMapper, /* 25 */ + Tcl_ClassSetConstructor, /* 26 */ + Tcl_ClassSetDestructor, /* 27 */ +}; + +TclOOIntStubs tclOOIntStubs = { + TCL_STUB_MAGIC, + TCLOOINT_STUBS_EPOCH, + TCLOOINT_STUBS_REVISION, + 0, + TclOOGetDefineCmdContext, /* 0 */ + TclOOMakeProcInstanceMethod, /* 1 */ + TclOOMakeProcMethod, /* 2 */ + TclOONewProcInstanceMethod, /* 3 */ + TclOONewProcMethod, /* 4 */ + TclOOObjectCmdCore, /* 5 */ + TclOOIsReachable, /* 6 */ + TclOONewForwardMethod, /* 7 */ + TclOONewForwardInstanceMethod, /* 8 */ + TclOONewProcInstanceMethodEx, /* 9 */ + TclOONewProcMethodEx, /* 10 */ + TclOOInvokeObject, /* 11 */ + TclOOObjectSetFilters, /* 12 */ + TclOOClassSetFilters, /* 13 */ + TclOOObjectSetMixins, /* 14 */ + TclOOClassSetMixins, /* 15 */ +}; + +/* !END!: Do not edit above this line. */ + +struct TclOOStubAPI tclOOStubAPI = { + &tclOOStubs, + &tclOOIntStubs +}; diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c new file mode 100644 index 0000000..6988638 --- /dev/null +++ b/generic/tclOOStubLib.c @@ -0,0 +1,82 @@ +/* + * $Id: tclOOStubLib.c,v 1.1 2008/05/31 11:42:19 dkf Exp $ + * ORIGINAL SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tcl.h" + +#define USE_TCLOO_STUBS 1 +#include "tclOO.h" +#include "tclOOInt.h" + +const TclOOStubs *tclOOStubsPtr; +const TclOOIntStubs *tclOOIntStubsPtr; + +/* + *---------------------------------------------------------------------- + * + * TclOOInitializeStubs -- + * Load the tclOO package, initialize stub table pointer. Do not call + * this function directly, use Tcl_OOInitStubs() macro instead. + * + * Results: + * The actual version of the package that satisfies the request, or NULL + * to indicate that an error occurred. + * + * Side effects: + * Sets the stub table pointer. + * + */ + +const char *TclOOInitializeStubs( + Tcl_Interp *interp, const char *version, int epoch, int revision) +{ + int exact = 0; + const char *packageName = "TclOO"; + const char *errMsg = NULL; + ClientData clientData = NULL; + const char *actualVersion = + Tcl_PkgRequireEx(interp, packageName,version, exact, &clientData); + struct TclOOStubAPI *stubsAPIPtr = clientData; + + if (stubsAPIPtr == NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "Error loading ", packageName, " package; ", + "package not present or incomplete", NULL); + return NULL; + } else { + TclOOStubs *stubsPtr = stubsAPIPtr->stubsPtr; + TclOOIntStubs *intStubsPtr = stubsAPIPtr->intStubsPtr; + + if (!actualVersion) { + return NULL; + } + + if (!stubsPtr || !intStubsPtr) { + errMsg = "missing stub table pointer"; + goto error; + } + if (stubsPtr->epoch != epoch || intStubsPtr->epoch != epoch) { + errMsg = "epoch number mismatch"; + goto error; + } + if (stubsPtr->revisionrevisionconstruct" + } + method bar {} { + global result + lappend result "[self]->bar" + } + } + set result {} + [testClass create foo] bar + testClass destroy + return $result +} {::foo->construct ::foo->bar} + +test oo-3.1 {basic test of OO functionality: destructor} -setup { + # This is a bit complex because it needs to run in a sub-interp as + # we're modifying the root object class's constructor + interp create subinterp + initInterpreter subinterp + subinterp eval { + package require TclOO + } +} -body { + subinterp eval { + oo::define oo::object destructor { + lappend ::result died + } + lappend result 1 [oo::object create foo] + lappend result 2 [rename foo {}] + oo::define oo::object destructor {} + return $result + } +} -cleanup { + interp delete subinterp +} -result {1 ::foo died 2 {}} +test oo-3.2 {basic test of OO functionality: destructor} -setup { + # This is a bit complex because it needs to run in a sub-interp as + # we're modifying the root object class's constructor + interp create subinterp + initInterpreter subinterp + subinterp eval { + package require TclOO + } +} -body { + subinterp eval { + oo::define oo::object destructor { + lappend ::result died + } + lappend result 1 [oo::object create foo] + lappend result 2 [rename foo {}] + } +} -cleanup { + interp delete subinterp +} -result {1 ::foo died 2 {}} + +test oo-4.1 {basic test of OO functionality: export} { + set o [oo::object new] + set result {} + oo::objdefine $o method Foo {} {lappend ::result Foo; return} + lappend result [catch {$o Foo} msg] $msg + oo::objdefine $o export Foo + lappend result [$o Foo] [$o destroy] +} {1 {unknown method "Foo": must be destroy} Foo {} {}} +test oo-4.2 {basic test of OO functionality: unexport} { + set o [oo::object new] + set result {} + oo::objdefine $o method foo {} {lappend ::result foo; return} + lappend result [$o foo] + oo::objdefine $o unexport foo + lappend result [catch {$o foo} msg] $msg [$o destroy] +} {foo {} 1 {unknown method "foo": must be destroy} {}} +test oo-4.3 {exporting and error messages, Bug 1824958} -setup { + oo::class create testClass +} -cleanup { + testClass destroy +} -body { + oo::define testClass self export Bad + testClass Bad +} -returnCodes 1 -result {unknown method "Bad": must be create, destroy or new} +test oo-4.4 {exporting a class method from an object} -setup { + oo::class create testClass + testClass create testObject +} -cleanup { + testClass destroy +} -body { + oo::define testClass method Good {} { return ok } + oo::objdefine testObject export Good + testObject Good +} -result ok + +test oo-5.1 {OO: manipulation of classes as objects} -setup { + set obj [oo::object new] +} -body { + oo::objdefine oo::object method foo {} { return "in object" } + catch {$obj foo} result + list [catch {$obj foo} result] $result [oo::object foo] +} -cleanup { + oo::objdefine oo::object deletemethod foo + $obj destroy +} -result {1 {unknown method "foo": must be destroy} {in object}} +test oo-5.2 {OO: manipulation of classes as objects} -setup { + set obj [oo::object new] +} -body { + oo::define oo::object self method foo {} { return "in object" } + catch {$obj foo} result + list [catch {$obj foo} result] $result [oo::object foo] +} -cleanup { + oo::objdefine oo::object deletemethod foo + $obj destroy +} -result {1 {unknown method "foo": must be destroy} {in object}} +test oo-5.3 {OO: manipulation of classes as objects} -setup { + set obj [oo::object new] +} -body { + oo::objdefine oo::object { + method foo {} { return "in object" } + } + catch {$obj foo} result + list [catch {$obj foo} result] $result [oo::object foo] +} -cleanup { + oo::objdefine oo::object deletemethod foo + $obj destroy +} -result {1 {unknown method "foo": must be destroy} {in object}} +test oo-5.4 {OO: manipulation of classes as objects} -setup { + set obj [oo::object new] +} -body { + oo::define oo::object { + self method foo {} { return "in object" } + } + catch {$obj foo} result + list [catch {$obj foo} result] $result [oo::object foo] +} -cleanup { + oo::objdefine oo::object deletemethod foo + $obj destroy +} -result {1 {unknown method "foo": must be destroy} {in object}} +test oo-5.5 {OO: manipulation of classes as objects} -setup { + set obj [oo::object new] +} -body { + oo::define oo::object { + self { + method foo {} { return "in object" } + } + } + catch {$obj foo} result + list [catch {$obj foo} result] $result [oo::object foo] +} -cleanup { + oo::objdefine oo::object deletemethod foo + $obj destroy +} -result {1 {unknown method "foo": must be destroy} {in object}} + +test oo-6.1 {OO: forward} { + oo::object create foo + oo::objdefine foo { + forward a lappend + forward b lappend result + } + set result {} + foo a result 1 + foo b 2 + foo destroy + return $result +} {1 2} + +test oo-7.1 {OO: inheritance 101} -setup { + oo::class create superClass + oo::class create subClass + subClass create instance +} -body { + oo::define superClass method doit x {lappend ::result $x} + oo::define subClass superclass superClass + set result [list [catch {subClass doit bad} msg] $msg] + instance doit ok + return $result +} -cleanup { + subClass destroy + superClass destroy +} -result {1 {unknown method "doit": must be create, destroy or new} ok} +test oo-7.2 {OO: inheritance 101} -setup { + oo::class create superClass + oo::class create subClass + subClass create instance +} -body { + oo::define superClass method doit x { + lappend ::result |$x| + } + oo::define subClass superclass superClass + oo::objdefine instance method doit x { + lappend ::result =$x= + next [incr x] + } + set result {} + instance doit 1 + return $result +} -cleanup { + subClass destroy + superClass destroy +} -result {=1= |2|} +test oo-7.3 {OO: inheritance 101} -setup { + oo::class create superClass + oo::class create subClass + subClass create instance +} -body { + oo::define superClass method doit x { + lappend ::result |$x| + } + oo::define subClass { + superclass superClass + method doit x {lappend ::result -$x-; next [incr x]} + } + oo::objdefine instance method doit x { + lappend ::result =$x=; + next [incr x] + } + set result {} + instance doit 1 + return $result +} -cleanup { + subClass destroy + superClass destroy +} -result {=1= -2- |3|} +test oo-7.4 {OO: inheritance from oo::class} -body { + oo::class create meta { + superclass oo::class + self { + unexport create new + method make {x {definitions {}}} { + if {![string match ::* $x]} { + set ns [uplevel 1 {::namespace current}] + set x ${ns}::$x + } + set o [my create $x] + lappend ::result "made $o" + oo::define $o $definitions + return $o + } + } + } + set result [list [catch {meta create foo} msg] $msg] + lappend result [meta make classinstance { + lappend ::result "in definition script in [namespace current]" + }] + lappend result [classinstance create instance] +} -cleanup { + catch {classinstance destroy} + catch {meta destroy} +} -result {1 {unknown method "create": must be destroy or make} {made ::classinstance} {in definition script in ::oo::define} ::classinstance ::instance} +test oo-7.5 {OO: inheritance from oo::class in the secondary chain} -body { + oo::class create other + oo::class create meta { + superclass other oo::class + self { + unexport create new + method make {x {definitions {}}} { + if {![string match ::* $x]} { + set ns [uplevel 1 {::namespace current}] + set x ${ns}::$x + } + set o [my create $x] + lappend ::result "made $o" + oo::define $o $definitions + return $o + } + } + } + set result [list [catch {meta create foo} msg] $msg] + lappend result [meta make classinstance { + lappend ::result "in definition script in [namespace current]" + }] + lappend result [classinstance create instance] +} -cleanup { + catch {classinstance destroy} + catch {meta destroy} + catch {other destroy} +} -result {1 {unknown method "create": must be destroy or make} {made ::classinstance} {in definition script in ::oo::define} ::classinstance ::instance} +test oo-7.6 {OO: inheritance 101 - overridden methods should be oblivious} -setup { + oo::class create Aclass + oo::class create Bclass + Bclass create Binstance +} -body { + oo::define Aclass { + method incr {var step} { + upvar 1 $var v + ::incr v $step + } + } + oo::define Bclass { + superclass Aclass + method incr {var {step 1}} { + global result + lappend result $var $step + set r [next $var $step] + lappend result returning:$r + return $r + } + } + set result {} + set x 10 + lappend result x=$x + lappend result [Binstance incr x] + lappend result x=$x +} -result {x=10 x 1 returning:11 11 x=11} -cleanup { + Aclass destroy +} +test oo-7.7 {OO: inheritance and errorInfo} -setup { + oo::class create A + oo::class create B + B create c +} -body { + oo::define A method foo {} {error foo!} + oo::define B { + superclass A + method foo {} { next } + } + oo::objdefine c method foo {} { next } + catch {c ?} msg + set result [list $msg] + catch {c foo} msg + lappend result $msg $errorInfo +} -cleanup { + A destroy +} -result {{unknown method "?": must be destroy or foo} foo! {foo! + while executing +"error foo!" + (class "::A" method "foo" line 1) + invoked from within +"next " + (class "::B" method "foo" line 1) + invoked from within +"next " + (object "::c" method "foo" line 1) + invoked from within +"c foo"}} +test oo-7.8 {OO: next at the end of the method chain} { + oo::class create foo { + method bar {} {lappend ::result [next] foo} + } + oo::class create foo2 { + superclass foo + method bar {} {lappend ::result [next] foo2} + } + set o [foo2 new] + set ::result "" + catch {$o bar} + foo destroy + return $result +} {{} foo {{} foo} foo2} + +test oo-8.1 {OO: global must work in methods} { + oo::object create foo + oo::objdefine foo method bar x {global result; lappend result $x} + set result {} + foo bar this + foo bar is + lappend result a + foo bar test + foo destroy + return $result +} {this is a test} + +test oo-9.1 {OO: multiple inheritance} -setup { + oo::class create A + oo::class create B + oo::class create C + oo::class create D + D create foo +} -body { + oo::define A method test {} {lappend ::result A; return ok} + oo::define B { + superclass A + method test {} {lappend ::result B; next} + } + oo::define C { + superclass A + method test {} {lappend ::result C; next} + } + oo::define D { + superclass B C + method test {} {lappend ::result D; next} + } + set result {} + lappend result [foo test] +} -cleanup { + D destroy + C destroy + B destroy + A destroy +} -result {D B C A ok} +test oo-9.2 {OO: multiple inheritance} -setup { + oo::class create A + oo::class create B + oo::class create C + oo::class create D + D create foo +} -body { + oo::define A method test {} {lappend ::result A; return ok} + oo::define B { + superclass A + method test {} {lappend ::result B; next} + } + oo::define C { + superclass A + method test {} {lappend ::result C; next} + } + oo::define D { + superclass B C + method test {} {lappend ::result D; next} + } + set result {} + lappend result [foo test] +} -cleanup { + A destroy +} -result {D B C A ok} + +test oo-10.1 {OO: recursive invoke and modify} -setup { + [oo::class create C] create O +} -cleanup { + C destroy +} -body { + oo::define C method foo x { + lappend ::result $x + if {$x} { + [self object] foo [incr x -1] + } + } + oo::objdefine O method foo x { + lappend ::result -$x- + if {$x == 1} { + oo::objdefine O deletemethod foo + } + next $x + } + set result {} + O foo 2 + return $result +} -result {-2- 2 -1- 1 0} +test oo-10.2 {OO: recursive invoke and modify} -setup { + oo::object create O +} -cleanup { + O destroy +} -body { + oo::objdefine O method foo {} { + oo::objdefine [self] method foo {} { + error "not called" + } + return [format %s%s call ed] + } + O foo +} -result called +test oo-10.3 {OO: invoke and modify} -setup { + oo::class create A { + method a {} {return A.a} + method b {} {return A.b} + method c {} {return A.c} + } + oo::class create B { + superclass A + method a {} {return [next],B.a} + method b {} {return [next],B.b} + method c {} {return [next],B.c} + } + B create C + set result {} +} -cleanup { + A destroy +} -body { + lappend result [C a] [C b] [C c] - + oo::define B deletemethod b + lappend result [C a] [C b] [C c] - + oo::define B renamemethod a b + lappend result [C a] [C b] [C c] - + oo::define B deletemethod b c + lappend result [C a] [C b] [C c] +} -result {A.a,B.a A.b,B.b A.c,B.c - A.a,B.a A.b A.c,B.c - A.a A.b,B.a A.c,B.c - A.a A.b A.c} + +test oo-11.1 {OO: cleanup} { + oo::object create foo + set result [list [catch {oo::object create foo} msg] $msg] + lappend result [foo destroy] [oo::object create foo] [foo destroy] +} {1 {can't create object "foo": command already exists with that name} {} ::foo {}} +test oo-11.2 {OO: cleanup} { + oo::class create bar + bar create foo + set result [list [catch {bar create foo} msg] $msg] + lappend result [bar destroy] [oo::object create foo] [foo destroy] +} {1 {can't create object "foo": command already exists with that name} {} ::foo {}} +test oo-11.3 {OO: cleanup} { + oo::class create bar0 + oo::class create bar + oo::define bar superclass bar0 + bar create foo + set result [list [catch {bar create foo} msg] $msg] + lappend result [bar0 destroy] [oo::object create foo] [foo destroy] +} {1 {can't create object "foo": command already exists with that name} {} ::foo {}} +test oo-11.4 {OO: cleanup} { + oo::class create bar0 + oo::class create bar1 + oo::define bar1 superclass bar0 + oo::class create bar2 + oo::define bar2 { + superclass bar0 + destructor {lappend ::result destroyed} + } + oo::class create bar + oo::define bar superclass bar1 bar2 + bar create foo + set result [list [catch {bar create foo} msg] $msg] + lappend result [bar0 destroy] [oo::object create foo] [foo destroy] \ + [oo::object create bar2] [bar2 destroy] +} {1 {can't create object "foo": command already exists with that name} destroyed {} ::foo {} ::bar2 {}} + +test oo-12.1 {OO: filters} { + oo::class create Aclass + Aclass create Aobject + oo::define Aclass { + method concatenate args { + global result + lappend result {*}$args + join $args {} + } + method logFilter args { + global result + lappend result "calling [self object]->[self method] $args" + set r [next {*}$args] + lappend result "result=$r" + return $r + } + } + oo::objdefine Aobject filter logFilter + set result {} + lappend result [Aobject concatenate 1 2 3 4 5] + Aclass destroy + return $result +} {{calling ::Aobject->logFilter 1 2 3 4 5} 1 2 3 4 5 result=12345 12345} +test oo-12.2 {OO: filters} -setup { + oo::class create Aclass + Aclass create Aobject +} -body { + oo::define Aclass { + method concatenate args { + global result + lappend result {*}$args + join $args {} + } + method logFilter args { + global result + lappend result "calling [self object]->[self method] $args" + set r [next {*}$args] + lappend result "result=$r" + return $r + } + } + oo::objdefine Aobject filter logFilter + set result {} + lappend result [Aobject concatenate 1 2 3 4 5] [Aobject destroy] +} -cleanup { + Aclass destroy +} -result {{calling ::Aobject->logFilter 1 2 3 4 5} 1 2 3 4 5 result=12345 {calling ::Aobject->logFilter } result= 12345 {}} +test oo-12.3 {OO: filters} -setup { + oo::class create Aclass + Aclass create Aobject +} -body { + oo::define Aclass { + method concatenate args { + global result + lappend result {*}$args + join $args {} + } + method logFilter args { + global result + lappend result "calling [self object]->[self method] $args" + set r [next {*}$args] + lappend result "result=$r" + return $r + } + filter logFilter + } + set result {} + lappend result [Aobject concatenate 1 2 3 4 5] [Aobject destroy] +} -cleanup { + Aclass destroy +} -result {{calling ::Aobject->logFilter 1 2 3 4 5} 1 2 3 4 5 result=12345 {calling ::Aobject->logFilter } result= 12345 {}} +test oo-12.4 {OO: filters} -setup { + oo::class create Aclass + Aclass create Aobject +} -body { + oo::define Aclass { + method foo {} { return foo } + method Bar {} { return 1 } + method boo {} { if {[my Bar]} { next } { error forbidden } } + filter boo + } + Aobject foo +} -cleanup { + Aclass destroy +} -result foo +test oo-12.5 {OO: filters} -setup { + oo::class create Aclass + Aclass create Aobject +} -body { + oo::define Aclass { + method foo {} { return foo } + method Bar {} { return [my Bar2] } + method Bar2 {} { return 1 } + method boo {} { if {[my Bar]} { next } { error forbidden } } + filter boo + } + Aobject foo +} -cleanup { + Aclass destroy +} -result foo +test oo-12.6 {OO: filters} -setup { + oo::class create Aclass + Aclass create Aobject +} -body { + oo::define Aclass { + method foo {} { return foo } + method Bar {} { return [my Bar2] } + method Bar2 {} { return [my Bar3] } + method Bar3 {} { return 1 } + method boo {} { if {[my Bar]} { next } { error forbidden } } + filter boo + } + Aobject foo +} -cleanup { + Aclass destroy +} -result foo +test oo-12.7 {OO: filters} -setup { + oo::class create Aclass + Aclass create Aobject +} -body { + oo::define Aclass { + method outerfoo {} { return [my InnerFoo] } + method InnerFoo {} { return foo } + method Bar {} { return [my Bar2] } + method Bar2 {} { return [my Bar3] } + method Bar3 {} { return 1 } + method boo {} { + lappend ::log [self target] + if {[my Bar]} { next } else { error forbidden } + } + filter boo + } + set log {} + list [Aobject outerfoo] $log +} -cleanup { + Aclass destroy +} -result {foo {{::Aclass outerfoo} {::Aclass InnerFoo}}} + +test oo-13.1 {OO: changing an object's class} { + oo::class create Aclass + oo::define Aclass {method bar {} {lappend ::result "in A [self object]"}} + oo::class create Bclass + oo::define Bclass {method bar {} {lappend ::result "in B [self object]"}} + set result [Aclass create foo] + foo bar + oo::objdefine foo class Bclass + foo bar + Aclass destroy + lappend result [info command foo] + Bclass destroy + return $result +} {::foo {in A ::foo} {in B ::foo} foo} +test oo-13.2 {OO: changing an object's class} -body { + oo::object create foo + oo::objdefine foo class oo::class +} -cleanup { + foo destroy +} -returnCodes 1 -result {may not change a non-class object into a class object} +test oo-13.3 {OO: changing an object's class} -body { + oo::class create foo + oo::objdefine foo class oo::object +} -cleanup { + foo destroy +} -returnCodes 1 -result {may not change a class object into a non-class object} +# todo: changing a class subtype (metaclass) to another class subtype + +test oo-14.1 {OO: mixins} { + oo::class create Aclass + oo::define Aclass method bar {} {lappend ::result "[self object] in bar"} + oo::class create Bclass + oo::define Bclass method boo {} {lappend ::result "[self object] in boo"} + oo::objdefine [Aclass create fooTest] mixin Bclass + oo::objdefine [Aclass create fooTest2] mixin Bclass + set result [list [catch {fooTest ?} msg] $msg] + fooTest bar + fooTest boo + fooTest2 bar + fooTest2 boo + oo::objdefine fooTest2 mixin + lappend result [Bclass destroy] [info command fooTest*] [Aclass destroy] +} {1 {unknown method "?": must be bar, boo or destroy} {::fooTest in bar} {::fooTest in boo} {::fooTest2 in bar} {::fooTest2 in boo} {} fooTest2 {}} +test oo-14.2 {OO: mixins} { + oo::class create Aclass { + method bar {} {return "[self object] in bar"} + } + oo::class create Bclass { + method boo {} {return "[self object] in boo"} + } + oo::define Aclass mixin Bclass + Aclass create fooTest + set result [list [catch {fooTest ?} msg] $msg] + lappend result [catch {fooTest bar} msg] $msg + lappend result [catch {fooTest boo} msg] $msg + lappend result [Bclass destroy] [info commands Aclass] +} {1 {unknown method "?": must be bar, boo or destroy} 0 {::fooTest in bar} 0 {::fooTest in boo} {} {}} +test oo-14.3 {OO and mixins and filters - advanced case} -setup { + oo::class create mix + oo::class create c { + mixin mix + } + c create i +} -body { + oo::define mix { + method foo {} {return >>[next]<<} + filter foo + } + oo::objdefine i method bar {} {return foobar} + i bar +} -cleanup { + mix destroy + if {[info object isa object i]} { + error "mixin deletion failed to destroy dependent instance" + } +} -result >>foobar<< +test oo-14.4 {OO: mixin error case} -setup { + oo::class create c +} -body { + oo::define c mixin c +} -returnCodes error -cleanup { + c destroy +} -result {may not mix a class into itself} +test oo-14.5 {OO and mixins and filters - advanced case} -setup { + oo::class create mix + oo::class create c { + mixin mix + } + c create i +} -body { + oo::define mix { + method foo {} {return >>[next]<<} + filter foo + } + oo::objdefine i method bar {} {return foobar} + i bar +} -cleanup { + c destroy + mix destroy +} -result >>foobar<< +test oo-14.6 {OO and mixins of mixins - Bug 1960703} -setup { + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create A { + superclass master + method egg {} { + return chicken + } + } + oo::class create B { + superclass master + mixin A + method bar {} { + # mixin from A + my egg + } + } + oo::class create C { + superclass master + mixin B + method foo {} { + # mixin from B + my bar + } + } + [C new] foo +} -result chicken +test oo-14.7 {OO and filters from mixins of mixins} -setup { + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create A { + superclass master + method egg {} { + return chicken + } + filter f + method f args { + set m [lindex [self target] 1] + return "($m) [next {*}$args] ($m)" + } + } + oo::class create B { + superclass master + mixin A + filter f + method bar {} { + # mixin from A + my egg + } + } + oo::class create C { + superclass master + mixin B + filter f + method foo {} { + # mixin from B + my bar + } + } + [C new] foo +} -result {(foo) (bar) (egg) chicken (egg) (bar) (foo)} + +test oo-15.1 {OO: object cloning} { + oo::class create Aclass + oo::define Aclass method test {} {lappend ::result [self object]->test} + Aclass create Ainstance + set result {} + Ainstance test + oo::copy Ainstance Binstance + Binstance test + Ainstance test + Ainstance destroy + namespace eval foo { + oo::copy Binstance Cinstance + Cinstance test + } + Aclass destroy + namespace delete foo + lappend result [info commands Binstance] +} {::Ainstance->test ::Binstance->test ::Ainstance->test ::foo::Cinstance->test {}} +test oo-15.2 {OO: object cloning} { + oo::object create foo + oo::objdefine foo { + method m x {lappend ::result [self object] >$x<} + forward f ::lappend ::result fwd + } + set result {} + foo m 1 + foo f 2 + lappend result [oo::copy foo bar] + foo m 3 + foo f 4 + bar m 5 + bar f 6 + lappend result [foo destroy] + bar m 7 + bar f 8 + lappend result [bar destroy] +} {::foo >1< fwd 2 ::bar ::foo >3< fwd 4 ::bar >5< fwd 6 {} ::bar >7< fwd 8 {}} +catch {foo destroy} +catch {bar destroy} +test oo-15.3 {OO: class cloning} { + oo::class create foo { + method testme {} {lappend ::result [self class]->[self object]} + } + set result {} + foo create baseline + baseline testme + oo::copy foo bar + baseline testme + bar create tester + tester testme + foo destroy + tester testme + bar destroy + return $result +} {::foo->::baseline ::foo->::baseline ::bar->::tester ::bar->::tester} + +test oo-16.1 {OO: object introspection} -body { + info object +} -returnCodes 1 -result "wrong \# args: should be \"info object subcommand ?argument ...?\"" +test oo-16.2 {OO: object introspection} -body { + info object class NOTANOBJECT +} -returnCodes 1 -result {NOTANOBJECT does not refer to an object} +test oo-16.3 {OO: object introspection} -body { + info object gorp oo::object +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, or vars} +test oo-16.4 {OO: object introspection} -setup { + oo::class create meta { superclass oo::class } + [meta create instance1] create instance2 +} -body { + list [list [info object class oo::object] \ + [info object class oo::class] \ + [info object class meta] \ + [info object class instance1] \ + [info object class instance2]] \ + [list [info object isa class oo::object] \ + [info object isa class meta] \ + [info object isa class instance1] \ + [info object isa class instance2]] \ + [list [info object isa metaclass oo::object] \ + [info object isa metaclass oo::class] \ + [info object isa metaclass meta] \ + [info object isa metaclass instance1] \ + [info object isa metaclass instance2]] \ + [list [info object isa object oo::object] \ + [info object isa object oo::class] \ + [info object isa object meta] \ + [info object isa object instance1] \ + [info object isa object instance2] \ + [info object isa object oo::define] \ + [info object isa object NOTANOBJECT]] +} -cleanup { + meta destroy +} -result {{::oo::class ::oo::class ::oo::class ::meta ::instance1} {1 1 1 0} {0 1 1 0 0} {1 1 1 1 1 0 0}} +test oo-16.5 {OO: object introspection} {info object methods oo::object} {} +test oo-16.6 {OO: object introspection} { + oo::object create foo + set result [list [info object methods foo]] + oo::objdefine foo method bar {} {...} + lappend result [info object methods foo] [foo destroy] +} {{} bar {}} +test oo-16.7 {OO: object introspection} -setup { + oo::object create foo +} -body { + oo::objdefine foo method bar {a {b c} args} {the body} + set result [info object methods foo] + lappend result [info object definition foo bar] +} -cleanup { + foo destroy +} -result {bar {{a {b c} args} {the body}}} +test oo-16.8 {OO: object introspection} { + oo::object create foo + oo::class create bar + oo::objdefine foo mixin bar + set result [list [info object mixins foo] \ + [info object isa mixin foo bar] \ + [info object isa mixin foo oo::class]] + foo destroy + bar destroy + return $result +} {::bar 1 0} +test oo-16.9 {OO: object introspection} -body { + oo::class create Ac + oo::class create Bc; oo::define Bc superclass Ac + oo::class create Cc; oo::define Cc superclass Bc + oo::class create Dc; oo::define Dc mixin Cc + Cc create E + Dc create F + list [info object isa typeof E oo::class] \ + [info object isa typeof E Ac] \ + [info object isa typeof F Bc] \ + [info object isa typeof F Cc] +} -cleanup { + catch {Ac destroy} +} -result {0 1 1 1} +test oo-16.10 {OO: object introspection} -setup { + oo::object create foo +} -body { + oo::objdefine foo export eval + foo eval {variable c 3 a 1 b 2 ddd 4 e} + lsort [info object vars foo ?] +} -cleanup { + foo destroy +} -result {a b c} +test oo-16.11 {OO: object introspection} -setup { + oo::class create foo + foo create bar +} -body { + oo::define foo method spong {} {...} + oo::objdefine bar method boo {a {b c} args} {the body} + list [info object methods bar -all] [info object methods bar -all -private] +} -cleanup { + foo destroy +} -result {{boo destroy spong} {boo destroy eval spong unknown variable varname}} + +test oo-17.1 {OO: class introspection} -body { + info class +} -returnCodes 1 -result "wrong \# args: should be \"info class subcommand ?argument ...?\"" +test oo-17.2 {OO: class introspection} -body { + info class superclass NOTANOBJECT +} -returnCodes 1 -result {NOTANOBJECT does not refer to an object} +test oo-17.3 {OO: class introspection} -setup { + oo::object create foo +} -body { + info class superclass foo +} -returnCodes 1 -cleanup { + foo destroy +} -result {"foo" is not a class} +test oo-17.4 {OO: class introspection} -body { + info class gorp oo::object +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be constructor, definition, destructor, filters, forward, instances, methods, mixins, subclasses, or superclasses} +test oo-17.5 {OO: class introspection} -setup { + oo::class create testClass +} -body { + testClass create foo + testClass create bar + testClass create spong + lsort [info class instances testClass] +} -cleanup { + testClass destroy +} -result {::bar ::foo ::spong} +test oo-17.6 {OO: class introspection} -setup { + oo::class create foo +} -body { + oo::define foo method bar {a {b c} args} {the body} + set result [info class methods foo] + lappend result [info class definition foo bar] +} -cleanup { + foo destroy +} -result {bar {{a {b c} args} {the body}}} +test oo-17.7 {OO: class introspection} { + info class superclasses oo::class +} ::oo::object +test oo-17.8 {OO: class introspection} -setup { + oo::class create testClass + oo::class create superClass1 + oo::class create superClass2 +} -body { + oo::define testClass superclass superClass1 superClass2 + list [info class superclasses testClass] \ + [lsort [info class subclass oo::object ::superClass?]] +} -cleanup { + testClass destroy + superClass1 destroy + superClass2 destroy +} -result {{::superClass1 ::superClass2} {::superClass1 ::superClass2}} +test oo-17.9 {OO: class introspection} -setup { + oo::class create foo + oo::class create subfoo {superclass foo} +} -body { + oo::define foo { + method bar {a {b c} args} {the body} + self { + method bad {} {...} + } + } + oo::define subfoo method boo {a {b c} args} {the body} + list [info class methods subfoo -all] \ + [info class methods subfoo -all -private] +} -cleanup { + foo destroy +} -result {{bar boo destroy} {bar boo destroy eval unknown variable varname}} + +test oo-18.1 {OO: define command support} { + list [catch {oo::define oo::object {error foo}} msg] $msg $errorInfo +} {1 foo {foo + while executing +"error foo" + (in definition script for object "oo::object" line 1) + invoked from within +"oo::define oo::object {error foo}"}} +test oo-18.2 {OO: define command support} { + list [catch {oo::define oo::object error foo} msg] $msg $errorInfo +} {1 foo {foo + while executing +"oo::define oo::object error foo"}} +test oo-18.3 {OO: define command support} { + list [catch {oo::class create foo {error bar}} msg] $msg $errorInfo +} {1 bar {bar + while executing +"error bar" + (in definition script for object "::foo" line 1) + invoked from within +"oo::class create foo {error bar}"}} +test oo-18.4 {OO: more error traces from the guts} -setup { + oo::object create obj +} -body { + oo::objdefine obj method bar {} {my eval {error foo}} + list [catch {obj bar} msg] $msg $errorInfo +} -cleanup { + obj destroy +} -result {1 foo {foo + while executing +"error foo" + (in "my eval" script line 1) + invoked from within +"my eval {error foo}" + (object "::obj" method "bar" line 1) + invoked from within +"obj bar"}} +test oo-18.5 {OO: more error traces from the guts} -setup { + [oo::class create cls] create obj + set errorInfo {} +} -body { + oo::define cls { + method eval script {next $script} + export eval + } + oo::objdefine obj method bar {} {my eval {error foo}} + set result {} + lappend result [catch {obj bar} msg] $msg $errorInfo + lappend result [catch {obj eval {error bar}} msg] $msg $errorInfo +} -cleanup { + cls destroy +} -result {1 foo {foo + while executing +"error foo" + (in "my eval" script line 1) + invoked from within +"next $script" + (class "::cls" method "eval" line 1) + invoked from within +"my eval {error foo}" + (object "::obj" method "bar" line 1) + invoked from within +"obj bar"} 1 bar {bar + while executing +"error bar" + (in "::obj eval" script line 1) + invoked from within +"next $script" + (class "::cls" method "eval" line 1) + invoked from within +"obj eval {error bar}"}} + +test oo-19.1 {OO: varname method} -setup { + oo::object create inst + oo::objdefine inst export eval + set result {} +} -body { + inst eval {trace add variable x write foo} + set ns [inst eval namespace current] + proc foo args { + global ns result + set context [uplevel 1 namespace current] + lappend result $args [expr { + $ns eq $context ? "ok" : [list $ns ne $context] + }] [expr { + "${ns}::x" eq [uplevel 1 my varname x] ? "ok" : [list ${ns}::x ne [uplevel 1 my varname x]] + }] + } + lappend result [inst eval set x 0] +} -cleanup { + inst destroy + rename foo {} +} -result {{x {} write} ok ok 0} + +test oo-20.1 {OO: variable method} -body { + oo::class create testClass { + constructor {} { + my variable ok + set ok {} + } + } + lsort [info object vars [testClass new]] +} -cleanup { + catch {testClass destroy} +} -result ok +test oo-20.2 {OO: variable method} -body { + oo::class create testClass { + constructor {} { + my variable a b c + set a [set b [set c {}]] + } + } + lsort [info object vars [testClass new]] +} -cleanup { + catch {testClass destroy} +} -result {a b c} +test oo-20.3 {OO: variable method} -body { + oo::class create testClass { + export varname + method bar {} { + my variable a(b) + } + } + testClass create foo + array set [foo varname a] {b c} + foo bar +} -returnCodes 1 -cleanup { + catch {testClass destroy} +} -result {can't define "a(b)": name refers to an element in an array} +test oo-20.4 {OO: variable method} -body { + oo::class create testClass { + export varname + method bar {} { + my variable a(b) + } + } + testClass create foo + set [foo varname a] b + foo bar +} -returnCodes 1 -cleanup { + catch {testClass destroy} +} -result {can't define "a(b)": name refers to an element in an array} +test oo-20.5 {OO: variable method} -body { + oo::class create testClass { + method bar {} { + my variable a::b + } + } + testClass create foo + foo bar +} -returnCodes 1 -cleanup { + catch {testClass destroy} +} -result {variable name "a::b" illegal: must not contain namespace separator} +test oo-20.6 {OO: variable method} -setup { + oo::class create testClass { + export varname + self export eval + } +} -body { + testClass eval variable a 0 + oo::objdefine [testClass create foo] method bar {other} { + $other variable a + set a 3 + } + oo::objdefine [testClass create boo] export variable + set [foo varname a] 1 + set [boo varname a] 2 + foo bar boo + list [testClass eval set a] [set [foo varname a]] [set [boo varname a]] +} -cleanup { + testClass destroy +} -result {0 1 3} +test oo-20.7 {OO: variable method} -setup { + oo::class create cls +} -body { + oo::define cls { + method a {} { + my variable d b + lappend b $d + } + method e {} { + my variable b d + return [list $b $d] + } + method f {x y} { + my variable b d + set b $x + set d $y + } + } + cls create obj + obj f p q + obj a + obj a + obj e +} -cleanup { + cls destroy +} -result {{p q q} q} +# oo-20.8 tested explicitly for functionality removed due to [Bug 1959457] +test oo-20.9 {OO: variable method} -setup { + oo::object create obj +} -body { + oo::objdefine obj { + method a {} { + my variable ::b + } + } + obj a +} -returnCodes 1 -cleanup { + obj destroy +} -result {variable name "::b" illegal: must not contain namespace separator} +test oo-20.10 {OO: variable and varname methods refer to same things} -setup { + oo::object create obj +} -body { + oo::objdefine obj { + method a {} { + my variable b + set b [self] + return [my varname b] + } + } + list [set [obj a]] [namespace tail [obj a]] +} -cleanup { + obj destroy +} -result {::obj b} +test oo-20.11 {OO: variable mustn't crash when recursing} -body { + oo::class create A { + constructor {name} { + my variable np_name + set np_name $name + } + method copy {nm} { + set cpy [[info object class [self]] new $nm] + foreach var [info object vars [self]] { + my variable $var + set val [set $var] + if {[string match o_* $var]} { + set objs {} + foreach ref $val { + # call to "copy" crashes + lappend objs [$ref copy {}] + } + $cpy prop $var $objs + } else { + $cpy prop $var $val + } + } + return $cpy + } + method prop {name val} { + my variable $name + set $name $val + } + } + set o1 [A new {}] + set o2 [A new {}] + $o1 prop o_object $o2 + $o1 copy aa +} -cleanup { + catch {A destroy} +} -match glob -result * + +test oo-21.1 {OO: inheritance ordering} -setup { + oo::class create A +} -body { + oo::define A method m {} {lappend ::result A} + oo::class create B { + superclass A + method m {} {lappend ::result B;next} + } + oo::class create C { + superclass A + method m {} {lappend ::result C;next} + } + oo::class create D { + superclass B C + method m {} {lappend ::result D;next} + } + D create o + oo::objdefine o method m {} {lappend ::result o;next} + set result {} + o m + return $result +} -cleanup { + A destroy +} -result {o D B C A} +test oo-21.2 {OO: inheritance ordering} -setup { + oo::class create A +} -body { + oo::define A method m {} {lappend ::result A} + oo::class create B { + superclass A + method m {} {lappend ::result B;next} + } + oo::class create C { + superclass A + method m {} {lappend ::result C;next} + } + oo::class create D { + superclass B C + method m {} {lappend ::result D;next} + } + oo::class create Emix { + superclass C + method m {} {lappend ::result Emix;next} + } + oo::class create Fmix { + superclass Emix + method m {} {lappend ::result Fmix;next} + } + D create o + oo::objdefine o { + method m {} {lappend ::result o;next} + mixin Fmix + } + set result {} + o m + return $result +} -cleanup { + A destroy +} -result {Fmix Emix o D B C A} +test oo-21.3 {OO: inheritance ordering} -setup { + oo::class create A +} -body { + oo::define A method m {} {lappend ::result A} + oo::class create B { + superclass A + method m {} {lappend ::result B;next} + method f {} {lappend ::result B-filt;next} + } + oo::class create C { + superclass A + method m {} {lappend ::result C;next} + } + oo::class create D { + superclass B C + method m {} {lappend ::result D;next} + } + oo::class create Emix { + superclass C + method m {} {lappend ::result Emix;next} + method f {} {lappend ::result Emix-filt;next} + } + oo::class create Fmix { + superclass Emix + method m {} {lappend ::result Fmix;next} + } + D create o + oo::objdefine o { + method m {} {lappend ::result o;next} + mixin Fmix + filter f + } + set result {} + o m + return $result +} -cleanup { + A destroy +} -result {Emix-filt B-filt Fmix Emix o D B C A} +test oo-21.4 {OO: inheritance ordering} -setup { + oo::class create A +} -body { + oo::define A method m {} {lappend ::result A} + oo::class create B { + superclass A + method m {} {lappend ::result B;next} + method f {} {lappend ::result B-filt;next} + method g {} {lappend ::result B-cfilt;next} + } + oo::class create C { + superclass A + method m {} {lappend ::result C;next} + } + oo::class create D { + superclass B C + method m {} {lappend ::result D;next} + method g {} {lappend ::result D-cfilt;next} + filter g + } + oo::class create Emix { + superclass C + method m {} {lappend ::result Emix;next} + method f {} {lappend ::result Emix-filt;next} + } + oo::class create Fmix { + superclass Emix + method m {} {lappend ::result Fmix;next} + } + D create o + oo::objdefine o { + method m {} {lappend ::result o;next} + mixin Fmix + filter f + } + set result {} + o m + return $result +} -cleanup { + A destroy +} -result {Emix-filt B-filt D-cfilt B-cfilt Fmix Emix o D B C A} + +test oo-22.1 {OO and info frame} -setup { + oo::class create c + c create i +} -body { + oo::define c self method frame {} { + info frame 0 + } + oo::define c { + method frames {} { + info frame 0 + } + method level {} { + info frame + } + } + oo::objdefine i { + method frames {} { + list [next] [info frame 0] + } + method level {} { + expr {[next] - [info frame]} + } + } + list [i level] [i frames] [dict get [c frame] object] +} -cleanup { + c destroy +} -result {1 {{type proc line 2 cmd {info frame 0} method frames class ::c level 0} {type proc line 2 cmd {info frame 0} method frames object ::i level 0}} ::c} + +# Prove that the issue in [Bug 1865054] isn't an issue any more +test oo-23.1 {Self-like derivation; complex case!} -setup { + oo::class create SELF { + superclass oo::class + unexport create new + # Next is just a convenience + method method args {oo::define [self] method {*}$args} + method derive {name} { + set o [my new [list superclass [self]]] + oo::objdefine $o mixin $o + uplevel 1 [list rename $o $name]\;[list namespace which $name] + } + self mixin SELF + } + set result {} +} -body { + [SELF derive foo1] method bar1 {} {return 1} + lappend result [foo1 bar1] + [foo1 derive foo2] method bar2 {} {return [my bar1],2} + lappend result [foo2 bar2] + [foo2 derive foo3] method bar3 {} {return [my bar2],3} + lappend result [foo3 bar3] + [foo3 derive foo4] method bar4 {} {return [my bar3],4} + lappend result [foo4 bar4] + foo2 method bar2 {} {return [my bar1],x} + lappend result [foo4 bar4] +} -cleanup { + SELF destroy +} -result {1 1,2 1,2,3 1,2,3,4 1,x,3,4} + +test oo-24.1 {unknown method method - Bug 1965063} -setup { + oo::class create cls +} -cleanup { + cls destroy +} -returnCodes error -body { + oo::define cls { + method dummy {} {} + method unknown args {next {*}$args} + } + [cls new] foo bar +} -result {unknown method "foo": must be destroy, dummy or unknown} +test oo-24.2 {unknown method method - Bug 1965063} -setup { + oo::class create cls +} -cleanup { + cls destroy +} -returnCodes error -body { + oo::define cls { + method dummy {} {} + method unknown args {next {*}$args} + } + cls create obj + oo::objdefine obj { + method dummy2 {} {} + method unknown args {next {*}$args} + } + obj foo bar +} -result {unknown method "foo": must be destroy, dummy, dummy2 or unknown} + +# Probably need a better set of tests, but this is quite difficult to devise +test oo-25.1 {call chain caching} -setup { + oo::class create cls { + method ab {} {return ok} + } + set result {} +} -cleanup { + cls destroy +} -body { + cls create foo + cls create bar + set m1 ab + set m2 a; append m2 b ;# different object! + lappend result [foo $m1] [foo $m1] [bar $m1] [foo $m1] + lappend result [foo $m2] [bar $m2] + oo::objdefine foo method ab {} {return good} + lappend result [foo $m1] [bar $m2] +} -result {ok ok ok ok ok ok good ok} + +cleanupTests +return + +# Local Variables: +# mode: tcl +# End: diff --git a/unix/Makefile.in b/unix/Makefile.in index 12db7c0..25a067c 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.233 2008/05/23 21:05:13 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.234 2008/05/31 11:42:21 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -294,6 +294,9 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o \ tclTomMathInterface.o +OO_OBJS = tclOO.o tclOOBasic.o tclOOCall.o tclOODefineCmds.o tclOOInfo.o \ + tclOOMethod.o tclOOStubInit.o + TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \ bn_fast_s_mp_sqr.o bn_mp_add.o bn_mp_and.o \ bn_mp_add_d.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o \ @@ -328,13 +331,14 @@ MAC_OSX_OBJS = tclMacOSXBundle.o tclMacOSXFCmd.o tclMacOSXNotify.o DTRACE_OBJ = tclDTrace.o TCL_OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} \ - @DL_OBJS@ @PLAT_OBJS@ + ${OO_OBJS} @DL_OBJS@ @PLAT_OBJS@ OBJS = ${TCL_OBJS} ${TOMMATH_OBJS} @DTRACE_OBJ@ TCL_DECLS = \ $(GENERIC_DIR)/tcl.decls \ $(GENERIC_DIR)/tclInt.decls \ + $(GENERIC_DIR)/tclOO.decls \ $(GENERIC_DIR)/tclTomMath.decls GENERIC_HDRS = \ @@ -345,6 +349,10 @@ GENERIC_HDRS = \ $(GENERIC_DIR)/tclIntPlatDecls.h \ $(GENERIC_DIR)/tclTomMath.h \ $(GENERIC_DIR)/tclTomMathDecls.h \ + $(GENERIC_DIR)/tclOO.h \ + $(GENERIC_DIR)/tclOODecls.h \ + $(GENERIC_DIR)/tclOOInt.h \ + $(GENERIC_DIR)/tclOOIntDecls.h \ $(GENERIC_DIR)/tclPatch.h \ $(GENERIC_DIR)/tclPlatDecls.h \ $(GENERIC_DIR)/tclPort.h \ @@ -422,6 +430,15 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclUtil.c \ $(GENERIC_DIR)/tclVar.c +OO_SRCS = \ + $(GENERIC_DIR)/tclOO.c \ + $(GENERIC_DIR)/tclOOBasic.c \ + $(GENERIC_DIR)/tclOOCall.c \ + $(GENERIC_DIR)/tclOODefineCmds.c \ + $(GENERIC_DIR)/tclOOInfo.c \ + $(GENERIC_DIR)/tclOOMethod.c \ + $(GENERIC_DIR)/tclOOStubInit.c + STUB_SRCS = \ $(GENERIC_DIR)/tclStubLib.c @@ -1104,6 +1121,27 @@ tclNamesp.o: $(GENERIC_DIR)/tclNamesp.c tclNotify.o: $(GENERIC_DIR)/tclNotify.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclNotify.c +tclOO.o: $(GENERIC_DIR)/tclOO.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOO.c + +tclOOBasic.o: $(GENERIC_DIR)/tclOOBasic.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOOBasic.c + +tclOOCall.o: $(GENERIC_DIR)/tclOOCall.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOOCall.c + +tclOODefineCmds.o: $(GENERIC_DIR)/tclOODefineCmds.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOODefineCmds.c + +tclOOInfo.o: $(GENERIC_DIR)/tclOOInfo.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOOInfo.c + +tclOOMethod.o: $(GENERIC_DIR)/tclOOMethod.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOOMethod.c + +tclOOStubInit.o: $(GENERIC_DIR)/tclOOStubInit.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclOOStubInit.c + tclParse.o: $(GENERIC_DIR)/tclParse.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclParse.c @@ -1512,6 +1550,9 @@ waitpid.o: $(COMPAT_DIR)/waitpid.c tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubLib.c +tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclOOStubLib.c + .c.o: $(CC) -c $(CC_SWITCHES) $< @@ -1525,10 +1566,15 @@ $(GENERIC_DIR)/tclStubInit.c: $(GENERIC_DIR)/tcl.decls \ @echo "Developers may want to run \"make genstubs\" to regenerate." @echo "This warning can be safely ignored, do not report as a bug!" +$(GENERIC_DIR)/tclOOStubInit.c: $(GENERIC_DIR)/tclOO.decls + @echo "Warning: tclOOStubInit.c may be out of date." + @echo "Developers may want to run \"make genstubs\" to regenerate." + @echo "This warning can be safely ignored, do not report as a bug!" + genstubs: $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ $(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls \ - $(GENERIC_DIR)/tclTomMath.decls + $(GENERIC_DIR)/tclTomMath.decls $(GENERIC_DIR)/tclOO.decls # # Target to check that all exported functions have an entry in the stubs diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 8848a62..527c116 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -31,6 +31,10 @@ /* Do we have access to Darwin CoreFoundation.framework? */ #undef HAVE_COREFOUNDATION +/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. + */ +#undef HAVE_DECL_TZNAME + /* Do we have fts functions? */ #undef HAVE_FTS @@ -493,7 +497,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* Define as int if socklen_t is not available */ -- cgit v0.12 From d4816fa0c5eb1cea8d0e924c3187887e2c96cd11 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 31 May 2008 19:56:03 +0000 Subject: Make things build (cleanly) on Win32. Thanks to Joe Mistachkin. [Patch 1980861] --- ChangeLog | 4 ++++ generic/tclBasic.c | 3 ++- generic/tclOOInt.h | 8 ++++---- win/Makefile.in | 15 ++++++++++++--- win/makefile.bc | 13 +++++++++++-- win/makefile.vc | 15 ++++++++++++--- 6 files changed, 45 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1255ad6..0b12e37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ TIP#257 IMPLEMENTATION + * generic/tclBasic.c, generic/tclOOInt.h: Correct declarations. + * win/Makefile.in, win/makefile.bc, win/makefile.vc: Build support + for Win32, from Joe Mistachkin. [Patch 1980861] + * generic/tclOO*, doc/*, tests/oo.test: Port of implementation of TclOO to sit directly inside Tcl. Note that this is incomplete (e.g. no build support yet for Windows). diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0a45567..57fefe2 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,10 +14,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.299 2008/05/31 11:42:13 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.300 2008/05/31 19:56:06 dkf Exp $ */ #include "tclInt.h" +#include "tclOOInt.h" #include "tclCompile.h" #include #include diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 7c0b6a7..580ea13 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.1 2008/05/31 11:42:18 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.2 2008/05/31 19:56:07 dkf Exp $ */ #include @@ -493,9 +493,9 @@ MODULE_SCOPE int TclOOGetSortedMethodList(Object *oPtr, int flags, const char ***stringsPtr); MODULE_SCOPE int TclOOInit(Tcl_Interp *interp); MODULE_SCOPE void TclOOInitInfo(Tcl_Interp *interp); -MODULE_SCOPE int TclOOInvokeContext(Tcl_Interp *interp, - CallContext *contextPtr, int objc, - Tcl_Obj *const *objv); +MODULE_SCOPE int TclOOInvokeContext(Tcl_Interp *const interp, + CallContext *const contextPtr, int const objc, + Tcl_Obj *const *const objv); MODULE_SCOPE void TclOONewBasicMethod(Tcl_Interp *interp, Class *clsPtr, const DeclaredClassMethod *dcm); MODULE_SCOPE Tcl_Obj * TclOOObjectName(Tcl_Interp *interp, Object *oPtr); diff --git a/win/Makefile.in b/win/Makefile.in index c3e1e19..85965de 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.129 2008/05/26 10:04:53 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.130 2008/05/31 19:56:07 dkf Exp $ VERSION = @TCL_VERSION@ @@ -250,6 +250,13 @@ GENERIC_OBJS = \ tclMain.$(OBJEXT) \ tclNamesp.$(OBJEXT) \ tclNotify.$(OBJEXT) \ + tclOO.$(OBJEXT) \ + tclOOBasic.$(OBJEXT) \ + tclOOCall.$(OBJEXT) \ + tclOODefineCmds.$(OBJEXT) \ + tclOOInfo.$(OBJEXT) \ + tclOOMethod.$(OBJEXT) \ + tclOOStubInit.$(OBJEXT) \ tclObj.$(OBJEXT) \ tclPanic.$(OBJEXT) \ tclParse.$(OBJEXT) \ @@ -364,7 +371,9 @@ DDE_OBJS = tclWinDde.$(OBJEXT) REG_OBJS = tclWinReg.$(OBJEXT) -STUB_OBJS = tclStubLib.$(OBJEXT) +STUB_OBJS = \ + tclStubLib.$(OBJEXT) \ + tclOOStubLib.$(OBJEXT) TCLSH_OBJS = tclAppInit.$(OBJEXT) @@ -508,7 +517,7 @@ tclStubLib.${OBJEXT}: tclStubLib.c # Implicit rule for all object files that will end up in the Tcl library .c.${OBJEXT}: - $(CC) -c $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME) + $(CC) -c $(CC_SWITCHES) -DBUILD_tcl -DBUILD_tcloo @DEPARG@ $(CC_OBJNAME) .rc.$(RES): $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(WIN_DIR_NATIVE)" @DEPARG@ diff --git a/win/makefile.bc b/win/makefile.bc index 59a0232..2989b67 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -230,6 +230,13 @@ TCLOBJS = \ $(TMPDIR)\tclMain.obj \ $(TMPDIR)\tclNamesp.obj \ $(TMPDIR)\tclNotify.obj \ + $(TMPDIR)\tclOO.obj \ + $(TMPDIR)\tclOOBasic.obj \ + $(TMPDIR)\tclOOCall.obj \ + $(TMPDIR)\tclOODefineCmds.obj \ + $(TMPDIR)\tclOOInfo.obj \ + $(TMPDIR)\tclOOMethod.obj \ + $(TMPDIR)\tclOOStubInit.obj \ $(TMPDIR)\tclObj.obj \ $(TMPDIR)\tclPanic.obj \ $(TMPDIR)\tclParse.obj \ @@ -267,7 +274,9 @@ TCLOBJS = \ $(TMPDIR)\tclWinThrd.obj \ $(TMPDIR)\tclWinTime.obj -TCLSTUBOBJS = $(TMPDIR)\tclStubLib.obj +TCLSTUBOBJS = \ + $(TMPDIR)\tclStubLib.obj \ + $(TMPDIR)\tclOOStubLib.obj WINDIR = $(ROOT)\win GENERICDIR = $(ROOT)\generic @@ -550,7 +559,7 @@ $(GENERICDIR)\regguts.h: $(GENERICDIR)\regcustom.h $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< {$(GENERICDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< + $(cc32) -DBUILD_tcl -DBUILD_tcloo $(TCL_CFLAGS) -o$@ $< {$(ROOT)\compat}.c{$(TMPDIR)}.obj: $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< diff --git a/win/makefile.vc b/win/makefile.vc index b6fd03f..f09356c 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.180 2008/05/26 10:02:00 dkf Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.181 2008/05/31 19:56:07 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -286,6 +286,13 @@ TCLOBJS = \ $(TMP_DIR)\tclMain.obj \ $(TMP_DIR)\tclNamesp.obj \ $(TMP_DIR)\tclNotify.obj \ + $(TMP_DIR)\tclOO.obj \ + $(TMP_DIR)\tclOOBasic.obj \ + $(TMP_DIR)\tclOOCall.obj \ + $(TMP_DIR)\tclOODefineCmds.obj \ + $(TMP_DIR)\tclOOInfo.obj \ + $(TMP_DIR)\tclOOMethod.obj \ + $(TMP_DIR)\tclOOStubInit.obj \ $(TMP_DIR)\tclObj.obj \ $(TMP_DIR)\tclPanic.obj \ $(TMP_DIR)\tclParse.obj \ @@ -392,7 +399,9 @@ TCLOBJS = \ $(TMP_DIR)\tcl.res !endif -TCLSTUBOBJS = $(TMP_DIR)\tclStubLib.obj +TCLSTUBOBJS = \ + $(TMP_DIR)\tclStubLib.obj \ + $(TMP_DIR)\tclOOStubLib.obj ### The following paths CANNOT have spaces in them. COMPATDIR = $(ROOT)\compat @@ -867,7 +876,7 @@ $< << {$(GENERICDIR)}.c{$(TMP_DIR)}.obj:: - $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<< + $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -DBUILD_tcloo -Fo$(TMP_DIR)\ @<< $< << -- cgit v0.12 From d21830d6102251026eb770706ba3319f1cc24755 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 31 May 2008 22:29:45 +0000 Subject: Plug method-related memory leaks pointed out by Miguel. --- ChangeLog | 11 +++++++++-- generic/tclOO.c | 31 +++++++++++++++++++++---------- generic/tclOOMethod.c | 4 ++-- tests/oo.test | 9 ++++++++- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b12e37..0395762 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,17 @@ 2008-05-31 Donal K. Fellows + * generic/tclOO.c (InitFoundation): Correct reference counting for + strings used when creating the constructor for classes. + * generic/tclOOMethod.c (TclOODelMethodRef): Correct fencepost error + in reference counting of method implementation structures. + * tests/oo.test (oo-0.5): Added a test to detect a memory leak problem + relating to disposal of the core object system. + TIP#257 IMPLEMENTATION * generic/tclBasic.c, generic/tclOOInt.h: Correct declarations. - * win/Makefile.in, win/makefile.bc, win/makefile.vc: Build support - for Win32, from Joe Mistachkin. [Patch 1980861] + * win/Makefile.in, win/makefile.bc, win/makefile.vc: Build support for + Win32, from Joe Mistachkin. [Patch 1980861] * generic/tclOO*, doc/*, tests/oo.test: Port of implementation of TclOO to sit directly inside Tcl. Note that this is incomplete (e.g. diff --git a/generic/tclOO.c b/generic/tclOO.c index de0b36b..73b1034 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.4 2008/05/31 11:42:16 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.5 2008/05/31 22:29:45 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -276,6 +276,8 @@ InitFoundation( fPtr->classCls->thisPtr->selfCls = fPtr->classCls; TclOOAddToInstances(fPtr->objectCls->thisPtr, fPtr->classCls); TclOOAddToInstances(fPtr->classCls->thisPtr, fPtr->classCls); + AddRef(fPtr->objectCls->thisPtr); + AddRef(fPtr->objectCls); /* * Basic method declarations for the core classes. @@ -299,6 +301,7 @@ InitFoundation( namePtr /* keeps ref */, 0 /* ==private */, NULL, NULL); argsPtr = Tcl_NewStringObj("{definitionScript {}}", -1); + Tcl_IncrRefCount(argsPtr); bodyPtr = Tcl_NewStringObj( "if {[catch {define [self] $definitionScript} msg opt]} {\n" "set ei [split [dict get $opt -errorinfo] \\n]\n" @@ -308,6 +311,7 @@ InitFoundation( "return -options $opt $msg", -1); fPtr->classCls->constructorPtr = TclOONewProcMethod(interp, fPtr->classCls, 0, NULL, argsPtr, bodyPtr, NULL); + Tcl_DecrRefCount(argsPtr); /* * Create non-object commands and plug ourselves into the Tcl [info] @@ -346,6 +350,8 @@ KillFoundation( { Foundation *fPtr = GetFoundation(interp); + DelRef(fPtr->objectCls->thisPtr); + DelRef(fPtr->objectCls); Tcl_DecrRefCount(fPtr->unknownMethodNameObj); Tcl_DecrRefCount(fPtr->constructorName); Tcl_DecrRefCount(fPtr->destructorName); @@ -472,7 +478,7 @@ AllocObject( /* * Access the namespace command table directly when creating "my" to avoid - * a bottleneck in string manipulation. + * a bottleneck in string manipulation. */ { @@ -541,7 +547,7 @@ ObjectRenamedTrace( AddRef(oPtr); oPtr->flags |= OBJECT_DELETED; - if (!Tcl_InterpDeleted(interp)) { + if (!(flags & TCL_INTERP_DESTROYED)) { CallContext *contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); if (contextPtr != NULL) { @@ -613,7 +619,8 @@ ReleaseClassContents( AddRef(list[i]); } for (i=0 ; iflags & OBJECT_DELETED) && interp != NULL) { + if (!(list[i]->thisPtr->flags & OBJECT_DELETED)) { + list[i]->thisPtr->flags |= OBJECT_DELETED; Tcl_DeleteCommandFromToken(interp, list[i]->thisPtr->command); } DelRef(list[i]); @@ -631,7 +638,8 @@ ReleaseClassContents( AddRef(list[i]); } for (i=0 ; iflags & OBJECT_DELETED) && interp != NULL) { + if (!(list[i]->thisPtr->flags & OBJECT_DELETED)) { + list[i]->thisPtr->flags |= OBJECT_DELETED; Tcl_DeleteCommandFromToken(interp, list[i]->thisPtr->command); } DelRef(list[i]); @@ -649,7 +657,8 @@ ReleaseClassContents( AddRef(insts[i]); } for (i=0 ; iflags & OBJECT_DELETED) && interp != NULL) { + if (!(insts[i]->flags & OBJECT_DELETED)) { + insts[i]->flags |= OBJECT_DELETED; Tcl_DeleteCommandFromToken(interp, insts[i]->command); } DelRef(insts[i]); @@ -660,9 +669,11 @@ ReleaseClassContents( if (clsPtr->constructorChainPtr) { TclOODeleteChain(clsPtr->constructorChainPtr); + clsPtr->constructorChainPtr = NULL; } if (clsPtr->destructorChainPtr) { TclOODeleteChain(clsPtr->destructorChainPtr); + clsPtr->destructorChainPtr = NULL; } if (clsPtr->classChainCache) { FOREACH_HASH_DECLS; @@ -673,6 +684,7 @@ ReleaseClassContents( } Tcl_DeleteHashTable(clsPtr->classChainCache); ckfree((char *) clsPtr->classChainCache); + clsPtr->classChainCache = NULL; } if (clsPtr->filters.num) { @@ -790,7 +802,7 @@ ObjectNamespaceDeleted( oPtr->metadataPtr = NULL; } - if (clsPtr != NULL && !(oPtr->flags & ROOT_OBJECT)) { + if (clsPtr != NULL) { Class *superPtr, *mixinPtr; if (clsPtr->metadataPtr != NULL) { @@ -806,7 +818,6 @@ ObjectNamespaceDeleted( clsPtr->metadataPtr = NULL; } - clsPtr->flags |= OBJECT_DELETED; FOREACH(filterObj, clsPtr->filters) { Tcl_DecrRefCount(filterObj); } @@ -815,7 +826,7 @@ ObjectNamespaceDeleted( clsPtr->filters.num = 0; } FOREACH(mixinPtr, clsPtr->mixins) { - if (!(mixinPtr->flags & OBJECT_DELETED)) { + if (!(mixinPtr->thisPtr->flags & OBJECT_DELETED)) { TclOORemoveFromMixinSubs(clsPtr, mixinPtr); } } @@ -824,7 +835,7 @@ ObjectNamespaceDeleted( clsPtr->mixins.num = 0; } FOREACH(superPtr, clsPtr->superclasses) { - if (!(superPtr->flags & OBJECT_DELETED)) { + if (!(superPtr->thisPtr->flags & OBJECT_DELETED)) { TclOORemoveFromSubclasses(clsPtr, superPtr); } } diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index f190533..21e0869 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.1 2008/05/31 11:42:19 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.2 2008/05/31 22:29:46 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -235,7 +235,7 @@ void TclOODelMethodRef( Method *mPtr) { - if ((mPtr != NULL) && (--mPtr->refCount < 0)) { + if ((mPtr != NULL) && (--mPtr->refCount <= 0)) { if (mPtr->typePtr != NULL && mPtr->typePtr->deleteProc != NULL) { mPtr->typePtr->deleteProc(mPtr->clientData); } diff --git a/tests/oo.test b/tests/oo.test index 087e786..a569b77 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.4 2008/05/31 11:42:20 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.5 2008/05/31 22:29:46 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -65,6 +65,13 @@ test oo-0.4 {basic test of OO's ability to clean up its initial state} -body { foo destroy } } -constraints memory -result 0 +test oo-0.5 {testing literal leak on interp delete} memory { + leaktest { + interp create foo + foo eval {oo::object new} + interp delete foo + } +} 0 test oo-1.1 {basic test of OO functionality: no classes} { set result {} -- cgit v0.12 From b560c785de029eb8db617c6f106f3e094f43ad6a Mon Sep 17 00:00:00 2001 From: das Date: Sat, 31 May 2008 23:33:51 +0000 Subject: * macosx/Tcl.xcodeproj/project.pbxproj: add new tclOO files; add debug * macosx/README: targets with corefoundation disabled and with gcov; update to Xcode 3.1. --- macosx/README | 4 +- macosx/Tcl.xcodeproj/project.pbxproj | 205 +++++++++++++++++++++++++++++++++-- 2 files changed, 200 insertions(+), 9 deletions(-) diff --git a/macosx/README b/macosx/README index 0f164ff..1c1d790 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ Tcl Mac OS X README ------------------- -RCS: @(#) $Id: README,v 1.16 2007/12/13 15:26:03 dgp Exp $ +RCS: @(#) $Id: README,v 1.17 2008/05/31 23:33:51 das Exp $ This is the README file for the Mac OS X/Darwin version of Tcl. @@ -111,7 +111,7 @@ take care to only use the project matching your DevTools and OS version: 'ReleasePPC10.2.8SDK': builds for PowerPC with gcc-3.3 against the 10.2.8 SDK, useful to verify on Tiger that building on Jaguar would succeed. - * Tcl.xcodeproj for Xcode 3.0 on 10.5 and later, which has the following + * Tcl.xcodeproj for Xcode 3.1 on 10.5 and later, which has the following additional build configuration: 'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds against the 10.5 SDK on Leopard (with 10.5 deployment target). diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index f0cea1f..98d8e2c 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -3,11 +3,19 @@ archiveVersion = 1; classes = { }; - objectVersion = 42; + objectVersion = 45; objects = { /* Begin PBXBuildFile section */ F90509300913A72400327603 /* tclAppInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445508F272B9004A47F5 /* tclAppInit.c */; settings = {COMPILER_FLAGS = "-DTCL_TEST -DTCL_BUILDTIME_LIBRARY=\\\"$(TCL_SRCROOT)/library\\\""; }; }; + F93599B30DF1F75400E04F67 /* tclOO.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B20DF1F75400E04F67 /* tclOO.c */; }; + F93599B70DF1F76100E04F67 /* tclOOBasic.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B60DF1F76100E04F67 /* tclOOBasic.c */; }; + F93599B90DF1F76600E04F67 /* tclOOCall.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B80DF1F76600E04F67 /* tclOOCall.c */; }; + F93599BC0DF1F77000E04F67 /* tclOODefineCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */; }; + F93599BE0DF1F77400E04F67 /* tclOOInfo.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BD0DF1F77400E04F67 /* tclOOInfo.c */; }; + F93599C20DF1F78300E04F67 /* tclOOMethod.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C10DF1F78300E04F67 /* tclOOMethod.c */; }; + F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C30DF1F78800E04F67 /* tclOOStubInit.c */; }; + F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */; }; F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07408F2820D005CB29B /* CoreFoundation.framework */; }; F96D456F08F272BB004A47F5 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED008F272A7004A47F5 /* regcomp.c */; }; F96D457208F272BB004A47F5 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED308F272A7004A47F5 /* regerror.c */; }; @@ -177,6 +185,31 @@ /* Begin PBXFileReference section */ 8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; + F92D7F100DE777240033A13A /* tsdPerf.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tsdPerf.tcl; sourceTree = ""; }; + F92D7F140DE777670033A13A /* tsdPerf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsdPerf.c; sourceTree = ""; }; + F93599B20DF1F75400E04F67 /* tclOO.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOO.c; sourceTree = ""; }; + F93599B40DF1F75900E04F67 /* tclOO.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclOO.decls; sourceTree = ""; }; + F93599B50DF1F75D00E04F67 /* tclOO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOO.h; sourceTree = ""; }; + F93599B60DF1F76100E04F67 /* tclOOBasic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOBasic.c; sourceTree = ""; }; + F93599B80DF1F76600E04F67 /* tclOOCall.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOCall.c; sourceTree = ""; }; + F93599BA0DF1F76A00E04F67 /* tclOODecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOODecls.h; sourceTree = ""; }; + F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOODefineCmds.c; sourceTree = ""; }; + F93599BD0DF1F77400E04F67 /* tclOOInfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOInfo.c; sourceTree = ""; }; + F93599BF0DF1F77900E04F67 /* tclOOInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOOInt.h; sourceTree = ""; }; + F93599C00DF1F77D00E04F67 /* tclOOIntDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOOIntDecls.h; sourceTree = ""; }; + F93599C10DF1F78300E04F67 /* tclOOMethod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOMethod.c; sourceTree = ""; }; + F93599C30DF1F78800E04F67 /* tclOOStubInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOStubInit.c; sourceTree = ""; }; + F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOStubLib.c; sourceTree = ""; }; + F93599C80DF1F81900E04F67 /* oo.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = oo.test; sourceTree = ""; }; + F93599CF0DF1F87F00E04F67 /* Class.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Class.3; sourceTree = ""; }; + F93599D00DF1F89E00E04F67 /* class.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = class.n; sourceTree = ""; }; + F93599D20DF1F8DF00E04F67 /* copy.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = copy.n; sourceTree = ""; }; + F93599D30DF1F8F500E04F67 /* define.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = define.n; sourceTree = ""; }; + F93599D40DF1F91900E04F67 /* Method.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Method.3; sourceTree = ""; }; + F93599D50DF1F93700E04F67 /* my.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = my.n; sourceTree = ""; }; + F93599D60DF1F95000E04F67 /* next.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = next.n; sourceTree = ""; }; + F93599D70DF1F96800E04F67 /* object.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = object.n; sourceTree = ""; }; + F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = ""; }; F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; F96D3DFA08F272A4004A47F5 /* ChangeLog */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = ChangeLog; sourceTree = ""; }; @@ -932,7 +965,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.33 2008/04/25 21:28:13 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.34 2008/05/31 23:33:51 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1002,12 +1035,15 @@ F96D3E1108F272A5004A47F5 /* cd.n */, F96D3E1208F272A5004A47F5 /* chan.n */, F96D3E1308F272A5004A47F5 /* ChnlStack.3 */, + F93599CF0DF1F87F00E04F67 /* Class.3 */, + F93599D00DF1F89E00E04F67 /* class.n */, F96D3E1408F272A5004A47F5 /* clock.n */, F96D3E1508F272A5004A47F5 /* close.n */, F96D3E1608F272A5004A47F5 /* CmdCmplt.3 */, F96D3E1708F272A5004A47F5 /* Concat.3 */, F96D3E1808F272A5004A47F5 /* concat.n */, F96D3E1908F272A5004A47F5 /* continue.n */, + F93599D20DF1F8DF00E04F67 /* copy.n */, F96D3E1A08F272A5004A47F5 /* CrtChannel.3 */, F96D3E1B08F272A5004A47F5 /* CrtChnlHdlr.3 */, F96D3E1C08F272A5004A47F5 /* CrtCloseHdlr.3 */, @@ -1020,6 +1056,7 @@ F96D3E2308F272A5004A47F5 /* CrtTimerHdlr.3 */, F96D3E2408F272A5004A47F5 /* CrtTrace.3 */, F96D3E2508F272A5004A47F5 /* dde.n */, + F93599D30DF1F8F500E04F67 /* define.n */, F96D3E2608F272A5004A47F5 /* DetachPids.3 */, F96D3E2708F272A5004A47F5 /* dict.n */, F96D3E2808F272A5004A47F5 /* DictObj.3 */, @@ -1097,11 +1134,15 @@ F96D3E7008F272A6004A47F5 /* man.macros */, F96D3E7108F272A6004A47F5 /* mathfunc.n */, F96D3E7208F272A6004A47F5 /* memory.n */, + F93599D40DF1F91900E04F67 /* Method.3 */, F96D3E7308F272A6004A47F5 /* msgcat.n */, + F93599D50DF1F93700E04F67 /* my.n */, F96D3E7408F272A6004A47F5 /* Namespace.3 */, F96D3E7508F272A6004A47F5 /* namespace.n */, + F93599D60DF1F95000E04F67 /* next.n */, F96D3E7608F272A6004A47F5 /* Notifier.3 */, F96D3E7708F272A6004A47F5 /* Object.3 */, + F93599D70DF1F96800E04F67 /* object.n */, F96D3E7808F272A6004A47F5 /* ObjectType.3 */, F96D3E7908F272A6004A47F5 /* open.n */, F96D3E7A08F272A6004A47F5 /* OpenFileChnl.3 */, @@ -1135,6 +1176,7 @@ F96D3E9408F272A6004A47F5 /* SaveResult.3 */, F96D3E9508F272A6004A47F5 /* scan.n */, F96D3E9608F272A6004A47F5 /* seek.n */, + F93599D80DF1F98300E04F67 /* self.n */, F96D3E9708F272A6004A47F5 /* set.n */, F96D3E9808F272A6004A47F5 /* SetChanErr.3 */, F96D3E9908F272A6004A47F5 /* SetErrno.3 */, @@ -1261,6 +1303,19 @@ F96D3F0B08F272A7004A47F5 /* tclNamesp.c */, F96D3F0C08F272A7004A47F5 /* tclNotify.c */, F96D3F0D08F272A7004A47F5 /* tclObj.c */, + F93599B20DF1F75400E04F67 /* tclOO.c */, + F93599B40DF1F75900E04F67 /* tclOO.decls */, + F93599B50DF1F75D00E04F67 /* tclOO.h */, + F93599B60DF1F76100E04F67 /* tclOOBasic.c */, + F93599B80DF1F76600E04F67 /* tclOOCall.c */, + F93599BA0DF1F76A00E04F67 /* tclOODecls.h */, + F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */, + F93599BD0DF1F77400E04F67 /* tclOOInfo.c */, + F93599BF0DF1F77900E04F67 /* tclOOInt.h */, + F93599C00DF1F77D00E04F67 /* tclOOIntDecls.h */, + F93599C10DF1F78300E04F67 /* tclOOMethod.c */, + F93599C30DF1F78800E04F67 /* tclOOStubInit.c */, + F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */, F96D3F0E08F272A7004A47F5 /* tclPanic.c */, F96D3F0F08F272A7004A47F5 /* tclParse.c */, F96D3F1108F272A7004A47F5 /* tclPathObj.c */, @@ -1626,6 +1681,7 @@ F96D439208F272B7004A47F5 /* namespace.test */, F96D439308F272B7004A47F5 /* notify.test */, F96D439408F272B7004A47F5 /* obj.test */, + F93599C80DF1F81900E04F67 /* oo.test */, F96D439508F272B7004A47F5 /* opt.test */, F96D439608F272B7004A47F5 /* package.test */, F96D439708F272B7004A47F5 /* parse.test */, @@ -1717,6 +1773,8 @@ F96D443708F272B9004A47F5 /* tclmin.wse */, F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */, F96D443A08F272B9004A47F5 /* tclZIC.tcl */, + F92D7F140DE777670033A13A /* tsdPerf.c */, + F92D7F100DE777240033A13A /* tsdPerf.tcl */, F96D443B08F272B9004A47F5 /* uniClass.tcl */, F96D443C08F272B9004A47F5 /* uniParse.tcl */, ); @@ -1900,7 +1958,7 @@ BuildIndependentTargetsInParallel = NO; }; buildConfigurationList = F95CC8B509158F3100EA5ACE /* Build configuration list for PBXProject "Tcl" */; - compatibilityVersion = "Xcode 2.4"; + compatibilityVersion = "Xcode 3.1"; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* Tcl */; projectDirPath = ""; @@ -2040,6 +2098,14 @@ F96D45AA08F272BC004A47F5 /* tclNamesp.c in Sources */, F96D45AB08F272BC004A47F5 /* tclNotify.c in Sources */, F96D45AC08F272BC004A47F5 /* tclObj.c in Sources */, + F93599B30DF1F75400E04F67 /* tclOO.c in Sources */, + F93599B70DF1F76100E04F67 /* tclOOBasic.c in Sources */, + F93599B90DF1F76600E04F67 /* tclOOCall.c in Sources */, + F93599BC0DF1F77000E04F67 /* tclOODefineCmds.c in Sources */, + F93599BE0DF1F77400E04F67 /* tclOOInfo.c in Sources */, + F93599C20DF1F78300E04F67 /* tclOOMethod.c in Sources */, + F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */, + F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */, F96D45AD08F272BC004A47F5 /* tclPanic.c in Sources */, F96D45AE08F272BC004A47F5 /* tclParse.c in Sources */, F96D45B008F272BC004A47F5 /* tclPathObj.c in Sources */, @@ -2235,6 +2301,47 @@ }; name = DebugMemCompile; }; + F9359B250DF212DA00E04F67 /* DebugGConv */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + OTHER_LDFLAGS = ( + "$(OTHER_LDFLAGS)", + "-lgcov", + ); + PREBINDING = NO; + }; + name = DebugGConv; + }; + F9359B260DF212DA00E04F67 /* DebugGConv */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = DebugGConv; + }; + F9359B270DF212DA00E04F67 /* DebugGConv */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = DebugGConv; + }; + F9359B280DF212DA00E04F67 /* DebugGConv */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = DebugGConv; + }; F95CC8AC09158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2431,6 +2538,78 @@ }; name = Debug64bit; }; + F987512F0DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-corefoundation"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + }; + name = DebugNoCF; + }; + F98751300DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = DebugNoCF; + }; + F98751310DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = DebugNoCF; + }; + F98751320DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = DebugNoCF; + }; + F98751330DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-threads --disable-corefoundation"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + }; + name = DebugNoCFUnthreaded; + }; + F98751340DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = DebugNoCFUnthreaded; + }; + F98751350DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = DebugNoCFUnthreaded; + }; + F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = DebugNoCFUnthreaded; + }; F9988AB10D814C6500B6B03B /* Debug gcc42 */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; @@ -2727,7 +2906,7 @@ "$(OTHER_LDFLAGS)", ); PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT = macosx10.4; }; name = ReleaseUniversal10.4uSDK; }; @@ -2756,7 +2935,7 @@ CPPFLAGS = "-arch ppc -isysroot $(SDKROOT) $(CPPFLAGS)"; MACOSX_DEPLOYMENT_TARGET = 10.3; PREBINDING = YES; - SDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; }; name = ReleasePPC10.3.9SDK; }; @@ -2788,7 +2967,7 @@ LDFLAGS = "-L$(SDKROOT)/usr/lib/gcc/darwin/$(GCC_VERSION) -Wl,-syslibroot,$(SDKROOT)"; MACOSX_DEPLOYMENT_TARGET = 10.2; PREBINDING = YES; - SDKROOT = /Developer/SDKs/MacOSX10.2.8.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.2.8.sdk"; WARNING_CFLAGS = ( "$(WARNING_CFLAGS_GCC3)", "-Wno-long-double", @@ -2836,7 +3015,7 @@ CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; MACOSX_DEPLOYMENT_TARGET = 10.5; PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + SDKROOT = macosx10.5; }; name = ReleaseUniversal10.5SDK; }; @@ -2851,8 +3030,11 @@ F9988AB60D814C7500B6B03B /* Debug llvmgcc42 */, F95CC8AE09158F3100EA5ACE /* DebugNoFixZL */, F99EE73B0BE835310060D4AF /* DebugUnthreaded */, + F98751300DE7B57E00B1C9EC /* DebugNoCF */, + F98751340DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084370BB93D2800CD0B9E /* DebugMemCompile */, F99EE73C0BE835310060D4AF /* DebugLeaks */, + F9359B260DF212DA00E04F67 /* DebugGConv */, F97AED1B0B660B2100310EA2 /* Debug64bit */, F95CC8AD09158F3100EA5ACE /* Release */, F91BCC4F093152310042A6BF /* ReleaseUniversal */, @@ -2874,8 +3056,11 @@ F9988AB70D814C7500B6B03B /* Debug llvmgcc42 */, F95CC8B309158F3100EA5ACE /* DebugNoFixZL */, F99EE73D0BE835310060D4AF /* DebugUnthreaded */, + F98751310DE7B57E00B1C9EC /* DebugNoCF */, + F98751350DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084380BB93D2800CD0B9E /* DebugMemCompile */, F99EE73E0BE835310060D4AF /* DebugLeaks */, + F9359B270DF212DA00E04F67 /* DebugGConv */, F97AED1C0B660B2100310EA2 /* Debug64bit */, F95CC8B209158F3100EA5ACE /* Release */, F91BCC50093152310042A6BF /* ReleaseUniversal */, @@ -2897,8 +3082,11 @@ F9988AB50D814C7500B6B03B /* Debug llvmgcc42 */, F95CC8B809158F3100EA5ACE /* DebugNoFixZL */, F99EE7410BE835310060D4AF /* DebugUnthreaded */, + F987512F0DE7B57E00B1C9EC /* DebugNoCF */, + F98751330DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F930843A0BB93D2800CD0B9E /* DebugMemCompile */, F99EE7420BE835310060D4AF /* DebugLeaks */, + F9359B250DF212DA00E04F67 /* DebugGConv */, F97AED1E0B660B2100310EA2 /* Debug64bit */, F95CC8B709158F3100EA5ACE /* Release */, F91BCC51093152310042A6BF /* ReleaseUniversal */, @@ -2920,8 +3108,11 @@ F9988AB80D814C7500B6B03B /* Debug llvmgcc42 */, F97258AB0A86873D00096C78 /* DebugNoFixZL */, F99EE73F0BE835310060D4AF /* DebugUnthreaded */, + F98751320DE7B57E00B1C9EC /* DebugNoCF */, + F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084390BB93D2800CD0B9E /* DebugMemCompile */, F99EE7400BE835310060D4AF /* DebugLeaks */, + F9359B280DF212DA00E04F67 /* DebugGConv */, F97AED1D0B660B2100310EA2 /* Debug64bit */, F97258AA0A86873D00096C78 /* Release */, F97258AC0A86873D00096C78 /* ReleaseUniversal */, -- cgit v0.12 From 329d98c01605762fe0361928f2c8aa8c3182fb05 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 31 May 2008 23:34:09 +0000 Subject: * unix/tclConfig.h.in: autoheader-2.59 --- unix/tclConfig.h.in | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 527c116..8848a62 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -31,10 +31,6 @@ /* Do we have access to Darwin CoreFoundation.framework? */ #undef HAVE_COREFOUNDATION -/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. - */ -#undef HAVE_DECL_TZNAME - /* Do we have fts functions? */ #undef HAVE_FTS @@ -497,7 +493,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned int' if does not define. */ +/* Define to `unsigned' if does not define. */ #undef size_t /* Define as int if socklen_t is not available */ -- cgit v0.12 From 76e147ef8ba7c5d960b32b63c14f384ac23e9e8d Mon Sep 17 00:00:00 2001 From: das Date: Sat, 31 May 2008 23:34:30 +0000 Subject: * tools/tsdPerf.tcl: use [info sharedlibextension] --- tools/tsdPerf.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tsdPerf.tcl b/tools/tsdPerf.tcl index c2d74c9..f2cc6d6 100644 --- a/tools/tsdPerf.tcl +++ b/tools/tsdPerf.tcl @@ -5,7 +5,7 @@ set ::tids [list] for {set i 0} {$i < 4} {incr i} { lappend ::tids [thread::create [string map [list IVALUE $i] { set curdir [file dirname [info script]] - load [file join $curdir tsdPerf.so] + load [file join $curdir tsdPerf[info sharedlibextension]] while 1 { tsdPerfSet IVALUE @@ -16,7 +16,7 @@ for {set i 0} {$i < 4} {incr i} { puts TIDS:$::tids set curdir [file dirname [info script]] -load [file join $curdir tsdPerf.so] +load [file join $curdir tsdPerf[info sharedlibextension]] tsdPerfSet 1234 while 1 { -- cgit v0.12 From cb040a93eb1479ce0896588e2e4cad823dab7b55 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 31 May 2008 23:34:46 +0000 Subject: * tests/msgcat.test: fix for ::tcl::mac::locale with @modifier. --- tests/msgcat.test | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/msgcat.test b/tests/msgcat.test index 6152097..70dc384 100644 --- a/tests/msgcat.test +++ b/tests/msgcat.test @@ -12,7 +12,7 @@ # Note that after running these tests, entries will be left behind in the # message catalogs for locales foo, foo_BAR, and foo_BAR_baz. # -# RCS: @(#) $Id: msgcat.test,v 1.20 2006/09/11 15:58:01 andreas_kupries Exp $ +# RCS: @(#) $Id: msgcat.test,v 1.21 2008/05/31 23:34:46 das Exp $ package require Tcl 8.2 if {[catch {package require tcltest 2}]} { @@ -55,7 +55,8 @@ namespace eval ::msgcat::test { set result [string tolower [lindex $setVars 0]] if {[string length $result] == 0} { if {[info exists ::tcl::mac::locale]} { - set result [string tolower $::tcl::mac::locale] + set result [string tolower \ + [msgcat::ConvertLocale $::tcl::mac::locale]] } else { set result c } -- cgit v0.12 From c15ddd7ee91e72940a679b63fe643f1a21b4b006 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 31 May 2008 23:35:27 +0000 Subject: * generic/tclOOStubLib.c: ensure use of tcl stubs; include in * unix/Makefile.in: stub lib; disable broken tclOO genstubs * generic/tclOO.c: make tclOO stubs tables 'static const' * generic/tclOODecls.h: and stub table pointers MODULE_SCOPE * generic/tclOOIntDecls.h: (change generated files manually * generic/tclOOStubInit.c: pending genstubs support for tclOO). * generic/tclOOStubLib.c: * generic/tclOO.c: fix warnings for 'int<->ptr conversion' * generic/tclOOCall.c: and 'signed vs unsigned comparison'. * generic/tclOOMethod.c: --- ChangeLog | 26 ++++++++++++++++++++++++++ generic/tclOO.c | 11 ++++++----- generic/tclOOCall.c | 26 +++++++++++++------------- generic/tclOODecls.h | 12 +++--------- generic/tclOOIntDecls.h | 16 +++++----------- generic/tclOOMethod.c | 4 ++-- generic/tclOOStubInit.c | 12 ++++++++---- generic/tclOOStubLib.c | 25 +++++++++++++++++++------ unix/Makefile.in | 8 +++++--- 9 files changed, 87 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0395762..011864d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2008-06-01 Daniel Steffen + + * generic/tclOOStubLib.c: ensure use of tcl stubs; include in + * unix/Makefile.in: stub lib; disable broken tclOO genstubs + + * generic/tclOO.c: make tclOO stubs tables 'static const' + * generic/tclOODecls.h: and stub table pointers MODULE_SCOPE + * generic/tclOOIntDecls.h: (change generated files manually + * generic/tclOOStubInit.c: pending genstubs support for tclOO). + * generic/tclOOStubLib.c: + + * generic/tclOO.c: fix warnings for 'int<->ptr conversion' + * generic/tclOOCall.c: and 'signed vs unsigned comparison'. + * generic/tclOOMethod.c: + + * tests/msgcat.test: fix for ::tcl::mac::locale with @modifier. + + * tools/tsdPerf.tcl: use [info sharedlibextension] + + * unix/tclConfig.h.in: autoheader-2.59 + + * macosx/Tcl.xcodeproj/project.pbxproj: add new tclOO files; add debug + * macosx/README: targets with corefoundation + disabled and with gcov; update + to Xcode 3.1. + 2008-05-31 Donal K. Fellows * generic/tclOO.c (InitFoundation): Correct reference counting for diff --git a/generic/tclOO.c b/generic/tclOO.c index 73b1034..ef939e8 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.5 2008/05/31 22:29:45 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.6 2008/05/31 23:35:27 das Exp $ */ #ifdef HAVE_CONFIG_H @@ -118,7 +118,7 @@ static char initScript[] = /* "tcl_findLibrary tcloo $oo::version $oo::version" */ /* " tcloo.tcl OO_LIBRARY oo::library;"; */ -extern struct TclOOStubAPI tclOOStubAPI; +MODULE_SCOPE const struct TclOOStubAPI * const tclOOStubAPIPtr; /* * Convenience macro for getting the foundation from an interpreter. @@ -163,7 +163,8 @@ TclOOInit( return TCL_ERROR; } - return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION, &tclOOStubAPI); + return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION, + (ClientData) tclOOStubAPIPtr); } /* @@ -246,14 +247,14 @@ InitFoundation( Tcl_DStringAppend(&buffer, "::oo::define::", 14); Tcl_DStringAppend(&buffer, defineCmds[i].name, -1); Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer), - defineCmds[i].objProc, (void *) defineCmds[i].flag, NULL); + defineCmds[i].objProc, INT2PTR(defineCmds[i].flag), NULL); Tcl_DStringFree(&buffer); } for (i=0 ; objdefCmds[i].name ; i++) { Tcl_DStringAppend(&buffer, "::oo::objdefine::", 17); Tcl_DStringAppend(&buffer, objdefCmds[i].name, -1); Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer), - objdefCmds[i].objProc, (void *) objdefCmds[i].flag, NULL); + objdefCmds[i].objProc, INT2PTR(objdefCmds[i].flag), NULL); Tcl_DStringFree(&buffer); } diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index 551a3fd..8a4024d 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.4 2008/05/31 11:42:17 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.5 2008/05/31 23:35:27 das Exp $ */ #ifdef HAVE_CONFIG_H @@ -359,7 +359,7 @@ TclOOGetSortedMethodList( isWantedIn = ((!(flags & PUBLIC_METHOD) || mPtr->flags & PUBLIC_METHOD) ? IN_LIST : 0); isWantedIn |= (mPtr->typePtr == NULL ? NO_IMPLEMENTATION : 0); - Tcl_SetHashValue(hPtr, (void *) isWantedIn); + Tcl_SetHashValue(hPtr, INT2PTR(isWantedIn)); } } } @@ -379,12 +379,12 @@ TclOOGetSortedMethodList( if (mPtr->typePtr == NULL) { isWantedIn |= NO_IMPLEMENTATION; } - Tcl_SetHashValue(hPtr, (void *) isWantedIn); + Tcl_SetHashValue(hPtr, INT2PTR(isWantedIn)); } else if (mPtr->typePtr != NULL) { - isWantedIn = (int) Tcl_GetHashValue(hPtr); + isWantedIn = PTR2INT(Tcl_GetHashValue(hPtr)); if (isWantedIn & NO_IMPLEMENTATION) { isWantedIn &= ~NO_IMPLEMENTATION; - Tcl_SetHashValue(hPtr, (void *) isWantedIn); + Tcl_SetHashValue(hPtr, INT2PTR(isWantedIn)); } } } @@ -418,8 +418,8 @@ TclOOGetSortedMethodList( strings = (const char **) ckalloc(sizeof(char *) * names.numEntries); FOREACH_HASH(namePtr, isWanted, &names) { - if (!(flags & PUBLIC_METHOD) || (((int)isWanted) & IN_LIST)) { - if (((int)isWanted) & NO_IMPLEMENTATION) { + if (!(flags & PUBLIC_METHOD) || (PTR2INT(isWanted) & IN_LIST)) { + if (PTR2INT(isWanted) & NO_IMPLEMENTATION) { continue; } strings[i++] = TclGetString(namePtr); @@ -479,8 +479,8 @@ TclOOGetSortedClassMethodList( strings = (const char **) ckalloc(sizeof(char *) * names.numEntries); FOREACH_HASH(namePtr, isWanted, &names) { - if (!(flags & PUBLIC_METHOD) || (((int)isWanted) & IN_LIST)) { - if (((int)isWanted) & NO_IMPLEMENTATION) { + if (!(flags & PUBLIC_METHOD) || (PTR2INT(isWanted) & IN_LIST)) { + if (PTR2INT(isWanted) & NO_IMPLEMENTATION) { continue; } strings[i++] = TclGetString(namePtr); @@ -567,13 +567,13 @@ AddClassMethodNames( int isWanted = (!(flags & PUBLIC_METHOD) || (mPtr->flags & PUBLIC_METHOD)) ? IN_LIST : 0; - Tcl_SetHashValue(hPtr, (void *) isWanted); - } else if ((((int)Tcl_GetHashValue(hPtr)) & NO_IMPLEMENTATION) + Tcl_SetHashValue(hPtr, INT2PTR(isWanted)); + } else if ((PTR2INT(Tcl_GetHashValue(hPtr)) & NO_IMPLEMENTATION) && mPtr->typePtr != NULL) { - int isWanted = (int) Tcl_GetHashValue(hPtr); + int isWanted = PTR2INT(Tcl_GetHashValue(hPtr)); isWanted &= ~NO_IMPLEMENTATION; - Tcl_SetHashValue(hPtr, (void *) isWanted); + Tcl_SetHashValue(hPtr, INT2PTR(isWanted)); } } diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index d67333b..17e140c 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.1 2008/05/31 11:42:18 dkf Exp $ + * $Id: tclOODecls.h,v 1.2 2008/05/31 23:35:27 das Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -118,7 +118,7 @@ typedef struct TclOOStubs { int magic; int epoch; int revision; - struct TclOOStubHooks *hooks; + CONST struct TclOOStubHooks *hooks; Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ @@ -150,13 +150,7 @@ typedef struct TclOOStubs { void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ } TclOOStubs; -#ifdef __cplusplus -extern "C" { -#endif -extern const TclOOStubs *tclOOStubsPtr; -#ifdef __cplusplus -} -#endif +extern CONST TclOOStubs *tclOOStubsPtr; #if defined(USE_TCLOO_STUBS) diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index e39b457..f0a94dc 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.1 2008/05/31 11:42:18 dkf Exp $ + * $Id: tclOOIntDecls.h,v 1.2 2008/05/31 23:35:27 das Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -100,7 +100,7 @@ typedef struct TclOOIntStubs { int magic; int epoch; int revision; - struct TclOOIntStubHooks *hooks; + CONST struct TclOOIntStubHooks *hooks; Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ @@ -120,13 +120,7 @@ typedef struct TclOOIntStubs { void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ } TclOOIntStubs; -#ifdef __cplusplus -extern "C" { -#endif -extern const TclOOIntStubs *tclOOIntStubsPtr; -#ifdef __cplusplus -} -#endif +extern CONST TclOOIntStubs *tclOOIntStubsPtr; #if defined(USE_TCLOO_STUBS) @@ -204,6 +198,6 @@ extern const TclOOIntStubs *tclOOIntStubsPtr; /* !END!: Do not edit above this line. */ struct TclOOStubAPI { - TclOOStubs *stubsPtr; - TclOOIntStubs *intStubsPtr; + CONST TclOOStubs *stubsPtr; + CONST TclOOIntStubs *intStubsPtr; }; diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 21e0869..9d53d6a 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.2 2008/05/31 22:29:46 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.3 2008/05/31 23:35:27 das Exp $ */ #ifdef HAVE_CONFIG_H @@ -915,7 +915,7 @@ ConstructorErrorHandler( const char *objectName, *kindName; int objectNameLen; - if (interp->errorLine == 0xDEADBEEF) { + if (interp->errorLine == (int) 0xDEADBEEF) { /* * Horrible hack to deal with certain constructors that must not add * information to the error trace. diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index b49dc12..7c7a3cc 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubInit.c,v 1.1 2008/05/31 11:42:19 dkf Exp $ + * $Id: tclOOStubInit.c,v 1.2 2008/05/31 23:35:27 das Exp $ * * This file is (mostly) automatically generated from tclOO.decls. * It is compiled and linked in with the tclOO package proper. @@ -13,7 +13,7 @@ /* !BEGIN!: Do not edit below this line. */ -TclOOStubs tclOOStubs = { +static const TclOOStubs tclOOStubs = { TCL_STUB_MAGIC, TCLOO_STUBS_EPOCH, TCLOO_STUBS_REVISION, @@ -48,7 +48,7 @@ TclOOStubs tclOOStubs = { Tcl_ClassSetDestructor, /* 27 */ }; -TclOOIntStubs tclOOIntStubs = { +static const TclOOIntStubs tclOOIntStubs = { TCL_STUB_MAGIC, TCLOOINT_STUBS_EPOCH, TCLOOINT_STUBS_REVISION, @@ -73,7 +73,11 @@ TclOOIntStubs tclOOIntStubs = { /* !END!: Do not edit above this line. */ -struct TclOOStubAPI tclOOStubAPI = { +static const struct TclOOStubAPI tclOOStubAPI = { &tclOOStubs, &tclOOIntStubs }; + +MODULE_SCOPE const struct TclOOStubAPI * const tclOOStubAPIPtr; +const struct TclOOStubAPI * const tclOOStubAPIPtr = &tclOOStubAPI; + diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c index 6988638..fe3b6be 100644 --- a/generic/tclOOStubLib.c +++ b/generic/tclOOStubLib.c @@ -1,8 +1,16 @@ /* - * $Id: tclOOStubLib.c,v 1.1 2008/05/31 11:42:19 dkf Exp $ + * $Id: tclOOStubLib.c,v 1.2 2008/05/31 23:35:28 das Exp $ * ORIGINAL SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ +/* + * We need to ensure that we use the tcl stub macros so that this file + * contains no references to any of the tcl stub functions. + */ + +#undef USE_TCL_STUBS +#define USE_TCL_STUBS + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -12,8 +20,11 @@ #include "tclOO.h" #include "tclOOInt.h" -const TclOOStubs *tclOOStubsPtr; -const TclOOIntStubs *tclOOIntStubsPtr; +MODULE_SCOPE const TclOOStubs *tclOOStubsPtr; +MODULE_SCOPE const TclOOIntStubs *tclOOIntStubsPtr; + +const TclOOStubs *tclOOStubsPtr = NULL; +const TclOOIntStubs *tclOOIntStubsPtr = NULL; /* *---------------------------------------------------------------------- @@ -29,9 +40,11 @@ const TclOOIntStubs *tclOOIntStubsPtr; * Side effects: * Sets the stub table pointer. * + *---------------------------------------------------------------------- */ -const char *TclOOInitializeStubs( +MODULE_SCOPE const char * +TclOOInitializeStubs( Tcl_Interp *interp, const char *version, int epoch, int revision) { int exact = 0; @@ -48,8 +61,8 @@ const char *TclOOInitializeStubs( "package not present or incomplete", NULL); return NULL; } else { - TclOOStubs *stubsPtr = stubsAPIPtr->stubsPtr; - TclOOIntStubs *intStubsPtr = stubsAPIPtr->intStubsPtr; + const TclOOStubs * const stubsPtr = stubsAPIPtr->stubsPtr; + const TclOOIntStubs * const intStubsPtr = stubsAPIPtr->intStubsPtr; if (!actualVersion) { return NULL; diff --git a/unix/Makefile.in b/unix/Makefile.in index 25a067c..1db3616 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.234 2008/05/31 11:42:21 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.235 2008/05/31 23:35:28 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -317,7 +317,7 @@ TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \ bn_mp_unsigned_bin_size.o bn_mp_xor.o bn_mp_zero.o bn_s_mp_add.o \ bn_s_mp_mul_digs.o bn_s_mp_sqr.o bn_s_mp_sub.o -STUB_LIB_OBJS = tclStubLib.o ${COMPAT_OBJS} +STUB_LIB_OBJS = tclStubLib.o tclOOStubLib.o ${COMPAT_OBJS} UNIX_OBJS = tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o \ tclUnixFile.o tclUnixPipe.o tclUnixSock.o \ @@ -1574,7 +1574,9 @@ $(GENERIC_DIR)/tclOOStubInit.c: $(GENERIC_DIR)/tclOO.decls genstubs: $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ $(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls \ - $(GENERIC_DIR)/tclTomMath.decls $(GENERIC_DIR)/tclOO.decls + $(GENERIC_DIR)/tclTomMath.decls +# disabled awaiting genStubs.tcl support: +#$(GENERIC_DIR)/tclOO.decls # # Target to check that all exported functions have an entry in the stubs -- cgit v0.12 From 5ee669f689871a7582541e27df3e9368a3ab5a55 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 1 Jun 2008 00:02:04 +0000 Subject: Fix generation of stubs for the OO API. --- ChangeLog | 5 +++ generic/tclOO.decls | 93 ++++++++++++++++++++++++++--------------------------- unix/Makefile.in | 6 ++-- 3 files changed, 54 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 011864d..4decb4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-01 Donal K. Fellows + + * generic/tclOO.decls, unix/Makefile.in (genstubs): Make generation of + stub tables correct. + 2008-06-01 Daniel Steffen * generic/tclOOStubLib.c: ensure use of tcl stubs; include in diff --git a/generic/tclOO.decls b/generic/tclOO.decls index 0fdbe47..bb30e20 100644 --- a/generic/tclOO.decls +++ b/generic/tclOO.decls @@ -1,190 +1,189 @@ # -*- tcl -*- -# $Id: tclOO.decls,v 1.1 2008/05/31 11:42:17 dkf Exp $ +# $Id: tclOO.decls,v 1.2 2008/06/01 00:02:05 dkf Exp $ # public API library tclOO interface tclOO -epoch 0 -scspec TCLOOAPI +hooks tclOOInt -declare 0 current { +declare 0 generic { Tcl_Object Tcl_CopyObjectInstance(Tcl_Interp *interp, Tcl_Object sourceObject, const char *targetName, const char *targetNamespaceName) } -declare 1 current { +declare 1 generic { Tcl_Object Tcl_GetClassAsObject(Tcl_Class clazz) } -declare 2 current { +declare 2 generic { Tcl_Class Tcl_GetObjectAsClass(Tcl_Object object) } -declare 3 current { +declare 3 generic { Tcl_Command Tcl_GetObjectCommand(Tcl_Object object) } -declare 4 current { +declare 4 generic { Tcl_Object Tcl_GetObjectFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr) } -declare 5 current { +declare 5 generic { Tcl_Namespace *Tcl_GetObjectNamespace(Tcl_Object object) } -declare 6 current { +declare 6 generic { Tcl_Class Tcl_MethodDeclarerClass(Tcl_Method method) } -declare 7 current { +declare 7 generic { Tcl_Object Tcl_MethodDeclarerObject(Tcl_Method method) } -declare 8 current { +declare 8 generic { int Tcl_MethodIsPublic(Tcl_Method method) } -declare 9 current { +declare 9 generic { int Tcl_MethodIsType(Tcl_Method method, const Tcl_MethodType *typePtr, ClientData *clientDataPtr) } -declare 10 current { +declare 10 generic { Tcl_Obj *Tcl_MethodName(Tcl_Method method) } -declare 11 current { +declare 11 generic { Tcl_Method Tcl_NewInstanceMethod(Tcl_Interp *interp, Tcl_Object object, Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, ClientData clientData) } -declare 12 current { +declare 12 generic { Tcl_Method Tcl_NewMethod(Tcl_Interp *interp, Tcl_Class cls, Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, ClientData clientData) } -declare 13 current { +declare 13 generic { Tcl_Object Tcl_NewObjectInstance(Tcl_Interp *interp, Tcl_Class cls, const char *nameStr, const char *nsNameStr, int objc, Tcl_Obj *const *objv, int skip) } -declare 14 current { +declare 14 generic { int Tcl_ObjectDeleted(Tcl_Object object) } -declare 15 current { +declare 15 generic { int Tcl_ObjectContextIsFiltering(Tcl_ObjectContext context) } -declare 16 current { +declare 16 generic { Tcl_Method Tcl_ObjectContextMethod(Tcl_ObjectContext context) } -declare 17 current { +declare 17 generic { Tcl_Object Tcl_ObjectContextObject(Tcl_ObjectContext context) } -declare 18 current { +declare 18 generic { int Tcl_ObjectContextSkippedArgs(Tcl_ObjectContext context) } -declare 19 current { +declare 19 generic { ClientData Tcl_ClassGetMetadata(Tcl_Class clazz, const Tcl_ObjectMetadataType *typePtr) } -declare 20 current { +declare 20 generic { void Tcl_ClassSetMetadata(Tcl_Class clazz, const Tcl_ObjectMetadataType *typePtr, ClientData metadata) } -declare 21 current { +declare 21 generic { ClientData Tcl_ObjectGetMetadata(Tcl_Object object, const Tcl_ObjectMetadataType *typePtr) } -declare 22 current { +declare 22 generic { void Tcl_ObjectSetMetadata(Tcl_Object object, const Tcl_ObjectMetadataType *typePtr, ClientData metadata) } -declare 23 current { +declare 23 generic { int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, int skip) } -declare 24 current { +declare 24 generic { Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper( Tcl_Object object) } -declare 25 current { +declare 25 generic { void Tcl_ObjectSetMethodNameMapper(Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc) } -declare 26 current { +declare 26 generic { void Tcl_ClassSetConstructor(Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method) } -declare 27 current { +declare 27 generic { void Tcl_ClassSetDestructor(Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method) } # private API, exposed to support advanced OO systems that plug in on top interface tclOOInt -declare 0 current { +declare 0 generic { Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp) } -declare 1 current { +declare 1 generic { Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr) } -declare 2 current { +declare 2 generic { Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, const char *namePtr, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr) } -declare 3 current { +declare 3 generic { Method *TclOONewProcInstanceMethod(Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr) } -declare 4 current { +declare 4 generic { Method *TclOONewProcMethod(Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr) } -declare 5 current { +declare 5 generic { int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, int publicOnly, Class *startCls) } -declare 6 current { +declare 6 generic { int TclOOIsReachable(Class *targetPtr, Class *startPtr) } -declare 7 current { +declare 7 generic { Method *TclOONewForwardMethod(Tcl_Interp *interp, Class *clsPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj) } -declare 8 current { +declare 8 generic { Method *TclOONewForwardInstanceMethod(Tcl_Interp *interp, Object *oPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj) } -declare 9 current { +declare 9 generic { Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr) } -declare 10 current { +declare 10 generic { Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr) } -declare 11 current { +declare 11 generic { int TclOOInvokeObject(Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const *objv) } -declare 12 current { +declare 12 generic { void TclOOObjectSetFilters(Object *oPtr, int numFilters, Tcl_Obj *const *filters) } -declare 13 current { +declare 13 generic { void TclOOClassSetFilters(Tcl_Interp *interp, Class *classPtr, int numFilters, Tcl_Obj *const *filters) } -declare 14 current { +declare 14 generic { void TclOOObjectSetMixins(Object *oPtr, int numMixins, Class *const *mixins) } -declare 15 current { +declare 15 generic { void TclOOClassSetMixins(Tcl_Interp *interp, Class *classPtr, int numMixins, Class *const *mixins) } diff --git a/unix/Makefile.in b/unix/Makefile.in index 1db3616..d7d6f82 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.235 2008/05/31 23:35:28 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.236 2008/06/01 00:02:05 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1575,8 +1575,8 @@ genstubs: $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ $(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls \ $(GENERIC_DIR)/tclTomMath.decls -# disabled awaiting genStubs.tcl support: -#$(GENERIC_DIR)/tclOO.decls + $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ + $(GENERIC_DIR)/tclOO.decls # # Target to check that all exported functions have an entry in the stubs -- cgit v0.12 From a568d47b81aa993e06a0ec33188cee794192056c Mon Sep 17 00:00:00 2001 From: das Date: Sun, 1 Jun 2008 00:29:09 +0000 Subject: typo, skip crashing http.test for gcov --- macosx/Tcl.xcodeproj/project.pbxproj | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 98d8e2c..4c3a88d 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -965,7 +965,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.34 2008/05/31 23:33:51 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.35 2008/06/01 00:29:09 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -2301,7 +2301,7 @@ }; name = DebugMemCompile; }; - F9359B250DF212DA00E04F67 /* DebugGConv */ = { + F9359B250DF212DA00E04F67 /* DebugGCov */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { @@ -2314,33 +2314,33 @@ ); PREBINDING = NO; }; - name = DebugGConv; + name = DebugGCov; }; - F9359B260DF212DA00E04F67 /* DebugGConv */ = { + F9359B260DF212DA00E04F67 /* DebugGCov */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = DebugGConv; + name = DebugGCov; }; - F9359B270DF212DA00E04F67 /* DebugGConv */ = { + F9359B270DF212DA00E04F67 /* DebugGCov */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tcltest; }; - name = DebugGConv; + name = DebugGCov; }; - F9359B280DF212DA00E04F67 /* DebugGConv */ = { + F9359B280DF212DA00E04F67 /* DebugGCov */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; - TCLTEST_OPTIONS = ""; + TCLTEST_OPTIONS = "-notfile http.test"; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = DebugGConv; + name = DebugGCov; }; F95CC8AC09158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; @@ -3034,7 +3034,7 @@ F98751340DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084370BB93D2800CD0B9E /* DebugMemCompile */, F99EE73C0BE835310060D4AF /* DebugLeaks */, - F9359B260DF212DA00E04F67 /* DebugGConv */, + F9359B260DF212DA00E04F67 /* DebugGCov */, F97AED1B0B660B2100310EA2 /* Debug64bit */, F95CC8AD09158F3100EA5ACE /* Release */, F91BCC4F093152310042A6BF /* ReleaseUniversal */, @@ -3060,7 +3060,7 @@ F98751350DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084380BB93D2800CD0B9E /* DebugMemCompile */, F99EE73E0BE835310060D4AF /* DebugLeaks */, - F9359B270DF212DA00E04F67 /* DebugGConv */, + F9359B270DF212DA00E04F67 /* DebugGCov */, F97AED1C0B660B2100310EA2 /* Debug64bit */, F95CC8B209158F3100EA5ACE /* Release */, F91BCC50093152310042A6BF /* ReleaseUniversal */, @@ -3086,7 +3086,7 @@ F98751330DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F930843A0BB93D2800CD0B9E /* DebugMemCompile */, F99EE7420BE835310060D4AF /* DebugLeaks */, - F9359B250DF212DA00E04F67 /* DebugGConv */, + F9359B250DF212DA00E04F67 /* DebugGCov */, F97AED1E0B660B2100310EA2 /* Debug64bit */, F95CC8B709158F3100EA5ACE /* Release */, F91BCC51093152310042A6BF /* ReleaseUniversal */, @@ -3112,7 +3112,7 @@ F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084390BB93D2800CD0B9E /* DebugMemCompile */, F99EE7400BE835310060D4AF /* DebugLeaks */, - F9359B280DF212DA00E04F67 /* DebugGConv */, + F9359B280DF212DA00E04F67 /* DebugGCov */, F97AED1D0B660B2100310EA2 /* Debug64bit */, F97258AA0A86873D00096C78 /* Release */, F97258AC0A86873D00096C78 /* ReleaseUniversal */, -- cgit v0.12 From 1c1a6d7dbef7006050c0ff8351a29d7daf390efc Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 1 Jun 2008 00:33:04 +0000 Subject: More patches to make stub generation work. --- ChangeLog | 3 + generic/tclOODecls.h | 167 +++++++++++++++++++++++++++++++++++------------- generic/tclOOIntDecls.h | 97 ++++++++++++++++++++-------- generic/tclOOStubInit.c | 54 ++++++++-------- generic/tclOOStubLib.c | 12 +--- 5 files changed, 224 insertions(+), 109 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4decb4d..fc8f1aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ * generic/tclOO.decls, unix/Makefile.in (genstubs): Make generation of stub tables correct. + * generic/tclOO{Decls.h,IntDecls.h,StubInit.c,StubLib.c}: Fixes to + make the generation work correctly, removing subtle differences + between output of different versions of stub generator. 2008-06-01 Daniel Steffen diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 17e140c..d697245 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,123 +1,200 @@ /* - * $Id: tclOODecls.h,v 1.2 2008/05/31 23:35:27 das Exp $ + * $Id: tclOODecls.h,v 1.3 2008/06/01 00:33:05 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ #if defined(USE_TCLOO_STUBS) -extern const char *TclOOInitializeStubs( - Tcl_Interp *, const char *version, int epoch, int revision); -#define Tcl_OOInitStubs(interp) TclOOInitializeStubs( \ - interp, TCLOO_VERSION, TCLOO_STUBS_EPOCH, TCLOO_STUBS_REVISION) +extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); +#define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp),TCLOO_VERSION) #else -#define Tcl_OOInitStubs(interp) Tcl_PkgRequire(interp, "TclOO", TCLOO_VERSION) +#define Tcl_OOInitStubs(interp) Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION) #endif /* !BEGIN!: Do not edit below this line. */ -#define TCLOO_STUBS_EPOCH 0 -#define TCLOO_STUBS_REVISION 44 - -#if !defined(USE_TCLOO_STUBS) - /* * Exported function declarations: */ +#ifndef Tcl_CopyObjectInstance_TCL_DECLARED +#define Tcl_CopyObjectInstance_TCL_DECLARED /* 0 */ -TCLOOAPI Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, +EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); +#endif +#ifndef Tcl_GetClassAsObject_TCL_DECLARED +#define Tcl_GetClassAsObject_TCL_DECLARED /* 1 */ -TCLOOAPI Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); +EXTERN Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); +#endif +#ifndef Tcl_GetObjectAsClass_TCL_DECLARED +#define Tcl_GetObjectAsClass_TCL_DECLARED /* 2 */ -TCLOOAPI Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); +EXTERN Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); +#endif +#ifndef Tcl_GetObjectCommand_TCL_DECLARED +#define Tcl_GetObjectCommand_TCL_DECLARED /* 3 */ -TCLOOAPI Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); +EXTERN Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); +#endif +#ifndef Tcl_GetObjectFromObj_TCL_DECLARED +#define Tcl_GetObjectFromObj_TCL_DECLARED /* 4 */ -TCLOOAPI Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, +EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetObjectNamespace_TCL_DECLARED +#define Tcl_GetObjectNamespace_TCL_DECLARED /* 5 */ -TCLOOAPI Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); +EXTERN Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); +#endif +#ifndef Tcl_MethodDeclarerClass_TCL_DECLARED +#define Tcl_MethodDeclarerClass_TCL_DECLARED /* 6 */ -TCLOOAPI Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); +EXTERN Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); +#endif +#ifndef Tcl_MethodDeclarerObject_TCL_DECLARED +#define Tcl_MethodDeclarerObject_TCL_DECLARED /* 7 */ -TCLOOAPI Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); +EXTERN Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); +#endif +#ifndef Tcl_MethodIsPublic_TCL_DECLARED +#define Tcl_MethodIsPublic_TCL_DECLARED /* 8 */ -TCLOOAPI int Tcl_MethodIsPublic (Tcl_Method method); +EXTERN int Tcl_MethodIsPublic (Tcl_Method method); +#endif +#ifndef Tcl_MethodIsType_TCL_DECLARED +#define Tcl_MethodIsType_TCL_DECLARED /* 9 */ -TCLOOAPI int Tcl_MethodIsType (Tcl_Method method, +EXTERN int Tcl_MethodIsType (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); +#endif +#ifndef Tcl_MethodName_TCL_DECLARED +#define Tcl_MethodName_TCL_DECLARED /* 10 */ -TCLOOAPI Tcl_Obj * Tcl_MethodName (Tcl_Method method); +EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); +#endif +#ifndef Tcl_NewInstanceMethod_TCL_DECLARED +#define Tcl_NewInstanceMethod_TCL_DECLARED /* 11 */ -TCLOOAPI Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, +EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); +#endif +#ifndef Tcl_NewMethod_TCL_DECLARED +#define Tcl_NewMethod_TCL_DECLARED /* 12 */ -TCLOOAPI Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, +EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); +#endif +#ifndef Tcl_NewObjectInstance_TCL_DECLARED +#define Tcl_NewObjectInstance_TCL_DECLARED /* 13 */ -TCLOOAPI Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, +EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); +#endif +#ifndef Tcl_ObjectDeleted_TCL_DECLARED +#define Tcl_ObjectDeleted_TCL_DECLARED /* 14 */ -TCLOOAPI int Tcl_ObjectDeleted (Tcl_Object object); +EXTERN int Tcl_ObjectDeleted (Tcl_Object object); +#endif +#ifndef Tcl_ObjectContextIsFiltering_TCL_DECLARED +#define Tcl_ObjectContextIsFiltering_TCL_DECLARED /* 15 */ -TCLOOAPI int Tcl_ObjectContextIsFiltering ( +EXTERN int Tcl_ObjectContextIsFiltering ( Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextMethod_TCL_DECLARED +#define Tcl_ObjectContextMethod_TCL_DECLARED /* 16 */ -TCLOOAPI Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); +EXTERN Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextObject_TCL_DECLARED +#define Tcl_ObjectContextObject_TCL_DECLARED /* 17 */ -TCLOOAPI Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); +EXTERN Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextSkippedArgs_TCL_DECLARED +#define Tcl_ObjectContextSkippedArgs_TCL_DECLARED /* 18 */ -TCLOOAPI int Tcl_ObjectContextSkippedArgs ( +EXTERN int Tcl_ObjectContextSkippedArgs ( Tcl_ObjectContext context); +#endif +#ifndef Tcl_ClassGetMetadata_TCL_DECLARED +#define Tcl_ClassGetMetadata_TCL_DECLARED /* 19 */ -TCLOOAPI ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, +EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); +#endif +#ifndef Tcl_ClassSetMetadata_TCL_DECLARED +#define Tcl_ClassSetMetadata_TCL_DECLARED /* 20 */ -TCLOOAPI void Tcl_ClassSetMetadata (Tcl_Class clazz, +EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); +#endif +#ifndef Tcl_ObjectGetMetadata_TCL_DECLARED +#define Tcl_ObjectGetMetadata_TCL_DECLARED /* 21 */ -TCLOOAPI ClientData Tcl_ObjectGetMetadata (Tcl_Object object, +EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); +#endif +#ifndef Tcl_ObjectSetMetadata_TCL_DECLARED +#define Tcl_ObjectSetMetadata_TCL_DECLARED /* 22 */ -TCLOOAPI void Tcl_ObjectSetMetadata (Tcl_Object object, +EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); +#endif +#ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED +#define Tcl_ObjectContextInvokeNext_TCL_DECLARED /* 23 */ -TCLOOAPI int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, +EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); +#endif +#ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED +#define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED /* 24 */ -TCLOOAPI Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( +EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( Tcl_Object object); +#endif +#ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED +#define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED /* 25 */ -TCLOOAPI void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, +EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); +#endif +#ifndef Tcl_ClassSetConstructor_TCL_DECLARED +#define Tcl_ClassSetConstructor_TCL_DECLARED /* 26 */ -TCLOOAPI void Tcl_ClassSetConstructor (Tcl_Interp * interp, +EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); +#endif +#ifndef Tcl_ClassSetDestructor_TCL_DECLARED +#define Tcl_ClassSetDestructor_TCL_DECLARED /* 27 */ -TCLOOAPI void Tcl_ClassSetDestructor (Tcl_Interp * interp, +EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); +#endif -#endif /* !defined(USE_TCLOO_STUBS) */ +typedef struct TclOOStubHooks { + CONST struct TclOOIntStubs *tclOOIntStubs; +} TclOOStubHooks; typedef struct TclOOStubs { int magic; - int epoch; - int revision; CONST struct TclOOStubHooks *hooks; Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ @@ -150,9 +227,11 @@ typedef struct TclOOStubs { void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ } TclOOStubs; +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) extern CONST TclOOStubs *tclOOStubsPtr; +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ -#if defined(USE_TCLOO_STUBS) +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) /* * Inline function declarations: @@ -271,6 +350,6 @@ extern CONST TclOOStubs *tclOOStubsPtr; (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ #endif -#endif /* defined(USE_TCLOO_STUBS) */ +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ /* !END!: Do not edit above this line. */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index f0a94dc..4ee8b8d 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,63 +1,87 @@ /* - * $Id: tclOOIntDecls.h,v 1.2 2008/05/31 23:35:27 das Exp $ + * $Id: tclOOIntDecls.h,v 1.3 2008/06/01 00:33:05 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ /* !BEGIN!: Do not edit below this line. */ -#define TCLOOINT_STUBS_EPOCH 0 -#define TCLOOINT_STUBS_REVISION 44 - -#if !defined(USE_TCLOO_STUBS) - /* * Exported function declarations: */ +#ifndef TclOOGetDefineCmdContext_TCL_DECLARED +#define TclOOGetDefineCmdContext_TCL_DECLARED /* 0 */ -TCLOOAPI Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); +EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); +#endif +#ifndef TclOOMakeProcInstanceMethod_TCL_DECLARED +#define TclOOMakeProcInstanceMethod_TCL_DECLARED /* 1 */ -TCLOOAPI Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, +EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); +#endif +#ifndef TclOOMakeProcMethod_TCL_DECLARED +#define TclOOMakeProcMethod_TCL_DECLARED /* 2 */ -TCLOOAPI Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, +EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); +#endif +#ifndef TclOONewProcInstanceMethod_TCL_DECLARED +#define TclOONewProcInstanceMethod_TCL_DECLARED /* 3 */ -TCLOOAPI Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, +EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); +#endif +#ifndef TclOONewProcMethod_TCL_DECLARED +#define TclOONewProcMethod_TCL_DECLARED /* 4 */ -TCLOOAPI Method * TclOONewProcMethod (Tcl_Interp * interp, +EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); +#endif +#ifndef TclOOObjectCmdCore_TCL_DECLARED +#define TclOOObjectCmdCore_TCL_DECLARED /* 5 */ -TCLOOAPI int TclOOObjectCmdCore (Object * oPtr, +EXTERN int TclOOObjectCmdCore (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); +#endif +#ifndef TclOOIsReachable_TCL_DECLARED +#define TclOOIsReachable_TCL_DECLARED /* 6 */ -TCLOOAPI int TclOOIsReachable (Class * targetPtr, +EXTERN int TclOOIsReachable (Class * targetPtr, Class * startPtr); +#endif +#ifndef TclOONewForwardMethod_TCL_DECLARED +#define TclOONewForwardMethod_TCL_DECLARED /* 7 */ -TCLOOAPI Method * TclOONewForwardMethod (Tcl_Interp * interp, +EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +#endif +#ifndef TclOONewForwardInstanceMethod_TCL_DECLARED +#define TclOONewForwardInstanceMethod_TCL_DECLARED /* 8 */ -TCLOOAPI Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, +EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +#endif +#ifndef TclOONewProcInstanceMethodEx_TCL_DECLARED +#define TclOONewProcInstanceMethodEx_TCL_DECLARED /* 9 */ -TCLOOAPI Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, +EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, @@ -65,8 +89,11 @@ TCLOOAPI Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); +#endif +#ifndef TclOONewProcMethodEx_TCL_DECLARED +#define TclOONewProcMethodEx_TCL_DECLARED /* 10 */ -TCLOOAPI Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, +EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, @@ -74,32 +101,44 @@ TCLOOAPI Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); +#endif +#ifndef TclOOInvokeObject_TCL_DECLARED +#define TclOOInvokeObject_TCL_DECLARED /* 11 */ -TCLOOAPI int TclOOInvokeObject (Tcl_Interp * interp, +EXTERN int TclOOInvokeObject (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); +#endif +#ifndef TclOOObjectSetFilters_TCL_DECLARED +#define TclOOObjectSetFilters_TCL_DECLARED /* 12 */ -TCLOOAPI void TclOOObjectSetFilters (Object * oPtr, int numFilters, +EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, Tcl_Obj *const * filters); +#endif +#ifndef TclOOClassSetFilters_TCL_DECLARED +#define TclOOClassSetFilters_TCL_DECLARED /* 13 */ -TCLOOAPI void TclOOClassSetFilters (Tcl_Interp * interp, +EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); +#endif +#ifndef TclOOObjectSetMixins_TCL_DECLARED +#define TclOOObjectSetMixins_TCL_DECLARED /* 14 */ -TCLOOAPI void TclOOObjectSetMixins (Object * oPtr, int numMixins, +EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, Class *const * mixins); +#endif +#ifndef TclOOClassSetMixins_TCL_DECLARED +#define TclOOClassSetMixins_TCL_DECLARED /* 15 */ -TCLOOAPI void TclOOClassSetMixins (Tcl_Interp * interp, +EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); - -#endif /* !defined(USE_TCLOO_STUBS) */ +#endif typedef struct TclOOIntStubs { int magic; - int epoch; - int revision; CONST struct TclOOIntStubHooks *hooks; Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ @@ -120,9 +159,11 @@ typedef struct TclOOIntStubs { void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ } TclOOIntStubs; +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) extern CONST TclOOIntStubs *tclOOIntStubsPtr; +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ -#if defined(USE_TCLOO_STUBS) +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) /* * Inline function declarations: @@ -193,7 +234,7 @@ extern CONST TclOOIntStubs *tclOOIntStubsPtr; (tclOOIntStubsPtr->tclOOClassSetMixins) /* 15 */ #endif -#endif /* defined(USE_TCLOO_STUBS) */ +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ /* !END!: Do not edit above this line. */ diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index 7c7a3cc..522fa6b 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubInit.c,v 1.2 2008/05/31 23:35:27 das Exp $ + * $Id: tclOOStubInit.c,v 1.3 2008/06/01 00:33:05 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. * It is compiled and linked in with the tclOO package proper. @@ -13,11 +13,34 @@ /* !BEGIN!: Do not edit below this line. */ +static const TclOOIntStubs tclOOIntStubs = { + TCL_STUB_MAGIC, + NULL, + TclOOGetDefineCmdContext, /* 0 */ + TclOOMakeProcInstanceMethod, /* 1 */ + TclOOMakeProcMethod, /* 2 */ + TclOONewProcInstanceMethod, /* 3 */ + TclOONewProcMethod, /* 4 */ + TclOOObjectCmdCore, /* 5 */ + TclOOIsReachable, /* 6 */ + TclOONewForwardMethod, /* 7 */ + TclOONewForwardInstanceMethod, /* 8 */ + TclOONewProcInstanceMethodEx, /* 9 */ + TclOONewProcMethodEx, /* 10 */ + TclOOInvokeObject, /* 11 */ + TclOOObjectSetFilters, /* 12 */ + TclOOClassSetFilters, /* 13 */ + TclOOObjectSetMixins, /* 14 */ + TclOOClassSetMixins, /* 15 */ +}; + +static const TclOOStubHooks tclOOStubHooks = { + &tclOOIntStubs +}; + static const TclOOStubs tclOOStubs = { TCL_STUB_MAGIC, - TCLOO_STUBS_EPOCH, - TCLOO_STUBS_REVISION, - 0, + &tclOOStubHooks, Tcl_CopyObjectInstance, /* 0 */ Tcl_GetClassAsObject, /* 1 */ Tcl_GetObjectAsClass, /* 2 */ @@ -48,29 +71,6 @@ static const TclOOStubs tclOOStubs = { Tcl_ClassSetDestructor, /* 27 */ }; -static const TclOOIntStubs tclOOIntStubs = { - TCL_STUB_MAGIC, - TCLOOINT_STUBS_EPOCH, - TCLOOINT_STUBS_REVISION, - 0, - TclOOGetDefineCmdContext, /* 0 */ - TclOOMakeProcInstanceMethod, /* 1 */ - TclOOMakeProcMethod, /* 2 */ - TclOONewProcInstanceMethod, /* 3 */ - TclOONewProcMethod, /* 4 */ - TclOOObjectCmdCore, /* 5 */ - TclOOIsReachable, /* 6 */ - TclOONewForwardMethod, /* 7 */ - TclOONewForwardInstanceMethod, /* 8 */ - TclOONewProcInstanceMethodEx, /* 9 */ - TclOONewProcMethodEx, /* 10 */ - TclOOInvokeObject, /* 11 */ - TclOOObjectSetFilters, /* 12 */ - TclOOClassSetFilters, /* 13 */ - TclOOObjectSetMixins, /* 14 */ - TclOOClassSetMixins, /* 15 */ -}; - /* !END!: Do not edit above this line. */ static const struct TclOOStubAPI tclOOStubAPI = { diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c index fe3b6be..280854b 100644 --- a/generic/tclOOStubLib.c +++ b/generic/tclOOStubLib.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubLib.c,v 1.2 2008/05/31 23:35:28 das Exp $ + * $Id: tclOOStubLib.c,v 1.3 2008/06/01 00:33:05 dkf Exp $ * ORIGINAL SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ @@ -45,7 +45,7 @@ const TclOOIntStubs *tclOOIntStubsPtr = NULL; MODULE_SCOPE const char * TclOOInitializeStubs( - Tcl_Interp *interp, const char *version, int epoch, int revision) + Tcl_Interp *interp, const char *version) { int exact = 0; const char *packageName = "TclOO"; @@ -72,14 +72,6 @@ TclOOInitializeStubs( errMsg = "missing stub table pointer"; goto error; } - if (stubsPtr->epoch != epoch || intStubsPtr->epoch != epoch) { - errMsg = "epoch number mismatch"; - goto error; - } - if (stubsPtr->revisionrevision Date: Sun, 1 Jun 2008 02:02:48 +0000 Subject: * generic/tclOODecls.h: Added the swizzling of DLLEXPORT and * generic/tclOOIntDecls.h: DLLIMPORT needed to make EXTERN work. --- ChangeLog | 5 +++++ generic/tclOODecls.h | 29 ++++++++++++++++++++++++++++- generic/tclOOIntDecls.h | 27 ++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc8f1aa..ce12066 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-01 Kevin B. Kenny + + * generic/tclOODecls.h: Added the swizzling of DLLEXPORT and + * generic/tclOOIntDecls.h: DLLIMPORT needed to make EXTERN work. + 2008-06-01 Donal K. Fellows * generic/tclOO.decls, unix/Makefile.in (genstubs): Make generation of diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index d697245..375abf3 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,10 +1,32 @@ /* - * $Id: tclOODecls.h,v 1.3 2008/06/01 00:33:05 dkf Exp $ + * $Id: tclOODecls.h,v 1.4 2008/06/01 02:02:48 kennykb Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ +#ifndef _TCLOODECLS +#define _TCLOODECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. + */ + + + #if defined(USE_TCLOO_STUBS) extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); #define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp),TCLOO_VERSION) @@ -353,3 +375,8 @@ extern CONST TclOOStubs *tclOOStubsPtr; #endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ /* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLOODECLS */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index 4ee8b8d..bc6c2d3 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,9 +1,29 @@ /* - * $Id: tclOOIntDecls.h,v 1.3 2008/06/01 00:33:05 dkf Exp $ + * $Id: tclOOIntDecls.h,v 1.4 2008/06/01 02:02:49 kennykb Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ +#ifndef _TCLOOINTDECLS +#define _TCLOOINTDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. + */ + /* !BEGIN!: Do not edit below this line. */ /* @@ -242,3 +262,8 @@ struct TclOOStubAPI { CONST TclOOStubs *stubsPtr; CONST TclOOIntStubs *intStubsPtr; }; + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLOODECLS */ -- cgit v0.12 From a2a2c49718f8fdda26f4c14905b28cc2e814044c Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 1 Jun 2008 02:42:19 +0000 Subject: * generic/tclDictObj.c: Added missing initializers to the ensemble map to silence a compiler warning. Thanks to George Peter Staplin for the report. --- ChangeLog | 5 +++++ generic/tclDictObj.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce12066..00133f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ * generic/tclOODecls.h: Added the swizzling of DLLEXPORT and * generic/tclOOIntDecls.h: DLLIMPORT needed to make EXTERN work. + + * generic/tclDictObj.c: Added missing initializers to the ensemble + map to silence a compiler warning. + Thanks to George Peter Staplin for the + report. 2008-06-01 Donal K. Fellows diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index d3d30d3..5a617bc 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.57 2008/05/30 22:54:29 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.58 2008/06/01 02:42:20 kennykb Exp $ */ #include "tclInt.h" @@ -99,7 +99,7 @@ static const EnsembleImplMap implementationMap[] = { {"update", DictUpdateCmd, TclCompileDictUpdateCmd }, {"values", DictValuesCmd, NULL }, {"with", DictWithCmd, NULL }, - {NULL} + {NULL, NULL, NULL } }; /* -- cgit v0.12 From 8a1ba857d507f08ae03699c6116c31efd569e5de Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Sun, 1 Jun 2008 02:44:53 +0000 Subject: Add tclOO genstubs to Windows makefiles --- ChangeLog | 7 ++++++- win/Makefile.in | 7 +++++-- win/makefile.vc | 7 ++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00133f7..2fa25e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-01 Joe Mistachkin + + * win/Makefile.in: Add tclOO genstubs to Windows makefiles and remove + * win/makefile.vc: -DBUILD_tcloo because it is no longer required. + 2008-06-01 Kevin B. Kenny * generic/tclOODecls.h: Added the swizzling of DLLEXPORT and @@ -7,7 +12,7 @@ map to silence a compiler warning. Thanks to George Peter Staplin for the report. - + 2008-06-01 Donal K. Fellows * generic/tclOO.decls, unix/Makefile.in (genstubs): Make generation of diff --git a/win/Makefile.in b/win/Makefile.in index 85965de..13d3109 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.130 2008/05/31 19:56:07 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.131 2008/06/01 02:44:54 mistachkin Exp $ VERSION = @TCL_VERSION@ @@ -517,7 +517,7 @@ tclStubLib.${OBJEXT}: tclStubLib.c # Implicit rule for all object files that will end up in the Tcl library .c.${OBJEXT}: - $(CC) -c $(CC_SWITCHES) -DBUILD_tcl -DBUILD_tcloo @DEPARG@ $(CC_OBJNAME) + $(CC) -c $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME) .rc.$(RES): $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(WIN_DIR_NATIVE)" @DEPARG@ @@ -748,6 +748,9 @@ genstubs: "$(GENERIC_DIR_NATIVE)\tcl.decls" \ "$(GENERIC_DIR_NATIVE)\tclInt.decls" \ "$(GENERIC_DIR_NATIVE)\tclTomMath.decls" + $(TCL_EXE) "$(ROOT_DIR_NATIVE)\tools\genStubs.tcl" \ + "$(GENERIC_DIR_NATIVE)" \ + "$(GENERIC_DIR_NATIVE)\tclOO.decls" # # This target creates the HTML folder for Tcl & Tk and places it in diff --git a/win/makefile.vc b/win/makefile.vc index f09356c..b33da87 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.181 2008/05/31 19:56:07 dkf Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.182 2008/06/01 02:44:54 mistachkin Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -90,7 +90,6 @@ the build instructions. # thrdalloc = Use the thread allocator (shared global free pool) # This is the default on threaded builds. # tclalloc = Use the old non-thread allocator -# thrdstorage = Use the generic thread storage support. # symbols = Adds symbols for step debugging. # profile = Adds profiling hooks. Map file is assumed. # loimpact = Adds a flag for how NT treats the heap to keep memory @@ -623,6 +622,8 @@ genstubs: $(TCLSH) $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \ $(GENERICDIR:\=/)/tcl.decls $(GENERICDIR:\=/)/tclInt.decls \ $(GENERICDIR:\=/)/tclTomMath.decls + $(TCLSH) $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \ + $(GENERICDIR:\=/)/tclOO.decls !endif @@ -876,7 +877,7 @@ $< << {$(GENERICDIR)}.c{$(TMP_DIR)}.obj:: - $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -DBUILD_tcloo -Fo$(TMP_DIR)\ @<< + $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<< $< << -- cgit v0.12 From 64aa67bd929d210bd1d764bd73312496dee8002d Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 1 Jun 2008 05:09:35 +0000 Subject: * generic/tclOOMethod.c: Fix a bug where the refcount of a method was reset if the method was redefined while there was an active invocation. [Bug #1981001] --- ChangeLog | 5 +++++ generic/tclOOMethod.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2fa25e0..45510b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,11 @@ Thanks to George Peter Staplin for the report. + * generic/tclOOMethod.c: Fix a bug where the refcount of a method + was reset if the method was redefined while + there was an active invocation. + [Bug #1981001] + 2008-06-01 Donal K. Fellows * generic/tclOO.decls, unix/Makefile.in (genstubs): Make generation of diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 9d53d6a..678334e 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.3 2008/05/31 23:35:27 das Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.4 2008/06/01 05:09:36 kennykb Exp $ */ #ifdef HAVE_CONFIG_H @@ -135,6 +135,7 @@ Tcl_NewInstanceMethod( if (isNew) { mPtr = (Method *) ckalloc(sizeof(Method)); mPtr->namePtr = nameObj; + mPtr->refCount = 1; Tcl_IncrRefCount(nameObj); Tcl_SetHashValue(hPtr, mPtr); } else { @@ -147,7 +148,6 @@ Tcl_NewInstanceMethod( populate: mPtr->typePtr = typePtr; mPtr->clientData = clientData; - mPtr->refCount = 1; mPtr->flags = 0; mPtr->declaringObjectPtr = oPtr; mPtr->declaringClassPtr = NULL; -- cgit v0.12 From fe88072b187128153a10f1860ef4312d08254b9f Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 1 Jun 2008 08:11:06 +0000 Subject: Complete fix of [Bug 1981001] --- ChangeLog | 6 ++++++ generic/tclOOMethod.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45510b9..bd674eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-01 Donal K. Fellows + + * generic/tclOOMethod.c (Tcl_NewMethod): Complete the fix of [Bug + 1981001], previous fix was incomplete though helpful in telling me + where to look. + 2008-06-01 Joe Mistachkin * win/Makefile.in: Add tclOO genstubs to Windows makefiles and remove diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 678334e..053336e 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.4 2008/06/01 05:09:36 kennykb Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.5 2008/06/01 08:11:07 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -124,6 +124,7 @@ Tcl_NewInstanceMethod( if (nameObj == NULL) { mPtr = (Method *) ckalloc(sizeof(Method)); mPtr->namePtr = NULL; + mPtr->refCount = 1; goto populate; } if (!oPtr->methodsPtr) { @@ -191,11 +192,13 @@ Tcl_NewMethod( if (nameObj == NULL) { mPtr = (Method *) ckalloc(sizeof(Method)); mPtr->namePtr = NULL; + mPtr->refCount = 1; goto populate; } hPtr = Tcl_CreateHashEntry(&clsPtr->classMethods, (char *)nameObj,&isNew); if (isNew) { mPtr = (Method *) ckalloc(sizeof(Method)); + mPtr->refCount = 1; mPtr->namePtr = nameObj; Tcl_IncrRefCount(nameObj); Tcl_SetHashValue(hPtr, mPtr); @@ -210,7 +213,6 @@ Tcl_NewMethod( clsPtr->thisPtr->fPtr->epoch++; mPtr->typePtr = typePtr; mPtr->clientData = clientData; - mPtr->refCount = 1; mPtr->flags = 0; mPtr->declaringObjectPtr = NULL; mPtr->declaringClassPtr = clsPtr; -- cgit v0.12 From 50928f540511857885e1a13fb17a9d0441346c98 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 2 Jun 2008 02:19:40 +0000 Subject: * generic/tclOO.c (ReleaseClassContents): Fix the one remaining valgrind complaint about oo.test, caused by failing to protect the Object as well as the Class corresponding to a subclass being deleted and hence getting a freed-memory read when attempting to delete the class command. [Bug 1981001] --- ChangeLog | 8 ++++++++ generic/tclOO.c | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bd674eb..bc2e6d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-02 Kevin B. Kenny + + * generic/tclOO.c (ReleaseClassContents): Fix the one remaining + valgrind complaint about oo.test, caused by failing to protect + the Object as well as the Class corresponding to a subclass being + deleted and hence getting a freed-memory read when attempting to + delete the class command. [Bug 1981001] + 2008-06-01 Donal K. Fellows * generic/tclOOMethod.c (Tcl_NewMethod): Complete the fix of [Bug diff --git a/generic/tclOO.c b/generic/tclOO.c index ef939e8..f374876 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.6 2008/05/31 23:35:27 das Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.7 2008/06/02 02:19:41 kennykb Exp $ */ #ifdef HAVE_CONFIG_H @@ -618,12 +618,14 @@ ReleaseClassContents( clsPtr->mixinSubs.size = 0; for (i=0 ; ithisPtr); } for (i=0 ; ithisPtr->flags & OBJECT_DELETED)) { list[i]->thisPtr->flags |= OBJECT_DELETED; Tcl_DeleteCommandFromToken(interp, list[i]->thisPtr->command); } + DelRef(list[i]->thisPtr); DelRef(list[i]); } if (list != NULL) { @@ -637,12 +639,14 @@ ReleaseClassContents( clsPtr->subclasses.size = 0; for (i=0 ; ithisPtr); } for (i=0 ; ithisPtr->flags & OBJECT_DELETED)) { list[i]->thisPtr->flags |= OBJECT_DELETED; Tcl_DeleteCommandFromToken(interp, list[i]->thisPtr->command); } + DelRef(list[i]->thisPtr); DelRef(list[i]); } if (list != NULL) { -- cgit v0.12 From 1a839b1be043687bb3a01f6055a1d96fd3c251d2 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 3 Jun 2008 23:52:50 +0000 Subject: TIP #317 implementation --- ChangeLog | 5 + generic/tclBinary.c | 574 +++++++++++++++++++++++++++++++++++++++++++++++++++- tests/binary.test | 324 +++++++++++++++++++++++++++-- 3 files changed, 879 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc2e6d4..a84cd49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-04 Pat Thoyts + + * generic/tclBinary.c: TIP #317 implementation + * tests/binary.test: + 2008-06-02 Kevin B. Kenny * generic/tclOO.c (ReleaseClassContents): Fix the one remaining diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 8adf524..6d626d5 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.43 2008/05/02 20:08:52 patthoyts Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.44 2008/06/03 23:52:51 patthoyts Exp $ */ #include "tclInt.h" @@ -77,15 +77,66 @@ static int BinaryFormatCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int BinaryScanCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +/* Binary encoding sub-ensemble commands */ +static int BinaryEncodeHex(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static int BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static int BinaryEncode64(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static int BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static int BinaryDecode64(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); + +#if defined(DEBUG) || defined(_DEBUG) +#define TRACE LocalTrace +#else +#define TRACE 1 ? ((void)0) : LocalTrace +#endif +static void +LocalTrace(const char *format, ...) +{ + va_list args; + static char buffer[1024]; + + va_start(args, format); + _vsnprintf(buffer, 1023, format, args); + OutputDebugString(buffer); + va_end(args); +} /* - * Default description of the "binary" ensemble + * The following tables are used by the binary encoders */ -static const EnsembleImplMap defaultBinaryMap[] = { - { "format", BinaryFormatCmd, NULL}, - { "scan", BinaryScanCmd, NULL}, - { NULL, NULL, NULL } +static const char HexDigits[16] = { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' +}; + +static const char UueDigits[65] = { + '`', '!', '"', '#', '$', '%', '&', '\'', + '(', ')', '*', '+', ',', '-', '.', '/', + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', ';', '<', '=', '>', '?', + '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', '[', '\\',']', '^', '_', + '`' +}; + +static const char B64Digits[65] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', '/', + '=' }; /* @@ -574,7 +625,89 @@ UpdateStringOfByteArray( Tcl_Command TclInitBinaryCmd(Tcl_Interp *interp) { - return TclMakeEnsemble(interp, "binary", defaultBinaryMap); + Tcl_Namespace *nsTclPtr, *nsBinPtr, *nsEncPtr, *nsDecPtr; + Tcl_Command binEnsemble, encEnsemble, decEnsemble; + Tcl_Obj *binDict, *encDict, *decDict; + + /* + * FIX ME: I so ugly - please make me pretty ... + */ + + nsTclPtr = Tcl_FindNamespace(interp, "::tcl", + NULL, TCL_CREATE_NS_IF_UNKNOWN); + if (nsTclPtr == NULL) { + Tcl_Panic("unable to find or create ::tcl namespace!"); + } + nsBinPtr = Tcl_FindNamespace(interp, "::tcl::binary", + NULL, TCL_CREATE_NS_IF_UNKNOWN); + if (nsBinPtr == NULL) { + Tcl_Panic("unable to find or create ::tcl::binary namespace!"); + } + binEnsemble = Tcl_CreateEnsemble(interp, "::binary", + nsBinPtr, TCL_ENSEMBLE_PREFIX); + + nsEncPtr = Tcl_FindNamespace(interp, "::tcl::binary::encode", + NULL, TCL_CREATE_NS_IF_UNKNOWN); + if (nsEncPtr == NULL) { + Tcl_Panic("unable to find or create ::tcl::binary::encode namespace!"); + } + encEnsemble = Tcl_CreateEnsemble(interp, "encode", + nsBinPtr, 0); + + nsDecPtr = Tcl_FindNamespace(interp, "::tcl::binary::decode", + NULL, TCL_CREATE_NS_IF_UNKNOWN); + if (nsDecPtr == NULL) { + Tcl_Panic("unable to find or create ::tcl::binary::decode namespace!"); + } + decEnsemble = Tcl_CreateEnsemble(interp, "decode", + nsBinPtr, 0); + + TclNewObj(binDict); + Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("format",-1), + Tcl_NewStringObj("::tcl::binary::format",-1)); + Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("scan",-1), + Tcl_NewStringObj("::tcl::binary::scan",-1)); + Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("encode",-1), + Tcl_NewStringObj("::tcl::binary::encode",-1)); + Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("decode",-1), + Tcl_NewStringObj("::tcl::binary::decode",-1)); + Tcl_CreateObjCommand(interp, "::tcl::binary::format", + BinaryFormatCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "::tcl::binary::scan", + BinaryScanCmd, NULL, NULL); + Tcl_SetEnsembleMappingDict(interp, binEnsemble, binDict); + + TclNewObj(encDict); + Tcl_DictObjPut(NULL, encDict, Tcl_NewStringObj("hex",-1), + Tcl_NewStringObj("::tcl::binary::encode::hex",-1)); + Tcl_DictObjPut(NULL, encDict, Tcl_NewStringObj("uuencode",-1), + Tcl_NewStringObj("::tcl::binary::encode::uuencode",-1)); + Tcl_DictObjPut(NULL, encDict, Tcl_NewStringObj("base64",-1), + Tcl_NewStringObj("::tcl::binary::encode::base64",-1)); + Tcl_CreateObjCommand(interp, "::tcl::binary::encode::hex", + BinaryEncodeHex, (ClientData)HexDigits, NULL); + Tcl_CreateObjCommand(interp, "::tcl::binary::encode::uuencode", + BinaryEncode64, (ClientData)UueDigits, NULL); + Tcl_CreateObjCommand(interp, "::tcl::binary::encode::base64", + BinaryEncode64, (ClientData)B64Digits, NULL); + Tcl_SetEnsembleMappingDict(interp, encEnsemble, encDict); + + TclNewObj(decDict); + Tcl_DictObjPut(NULL, decDict, Tcl_NewStringObj("hex",-1), + Tcl_NewStringObj("::tcl::binary::decode::hex",-1)); + Tcl_DictObjPut(NULL, decDict, Tcl_NewStringObj("uuencode",-1), + Tcl_NewStringObj("::tcl::binary::decode::uuencode",-1)); + Tcl_DictObjPut(NULL, decDict, Tcl_NewStringObj("base64",-1), + Tcl_NewStringObj("::tcl::binary::decode::base64",-1)); + Tcl_CreateObjCommand(interp, "::tcl::binary::decode::hex", + BinaryDecodeHex, (ClientData)NULL, NULL); + Tcl_CreateObjCommand(interp, "::tcl::binary::decode::uuencode", + BinaryDecodeUu, (ClientData)NULL, NULL); + Tcl_CreateObjCommand(interp, "::tcl::binary::decode::base64", + BinaryDecode64, (ClientData)NULL, NULL); + Tcl_SetEnsembleMappingDict(interp, decEnsemble, decDict); + + return binEnsemble; } /* @@ -2121,6 +2254,433 @@ DeleteScanNumberCache( } /* + * ---------------------------------------------------------------------- + * + * NOTES -- + * + * Some measurements show that it is faster to use a table to + * to perform uuencode and base64 value encoding than to calculate + * the output (at least on intel P4 arch). + * + * Conversely using a lookup table for the decoding is slower than + * just calculating the values. We therefore use the fastest of + * each method. + * + * Presumably this has to do with the size of the tables. The + * base64 decode table is 255 bytes while the encode table is only + * 65 bytes. The choice likely depends on CPU memory cache sizes. + */ + +/* + *---------------------------------------------------------------------- + * + * BinaryEncodeHex -- + * + * Implement the [binary encode hex] binary encoding. + * clientData must be a table to convert values to hexadecimal digits. + * + * Results: + * Interp result set to an encoded byte array object + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +static int +BinaryEncodeHex(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]) +{ + Tcl_Obj *resultObj = NULL; + unsigned char *data = NULL; + unsigned char *cursor = NULL; + const char *digits = clientData; + int offset = 0, count = 0; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "data"); + return TCL_ERROR; + } + + TclNewObj(resultObj); + data = Tcl_GetByteArrayFromObj(objv[1], &count); + cursor = Tcl_SetByteArrayLength(resultObj, count * 2); + for (offset = 0; offset < count; ++offset) { + *cursor++ = digits[((data[offset] >> 4) & 0x0f)]; + *cursor++ = digits[( data[offset] & 0x0f)]; + } + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * BinaryDecodeHex -- + * + * Implement the [binary decode hex] binary encoding. + * + * Results: + * Interp result set to an decoded byte array object + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +static int +BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]) +{ + Tcl_Obj *resultObj = NULL; + unsigned char *data, *datastart, *dataend; + unsigned char *begin, *cursor; + int i, index, value, size, count = 0, cut = 0, strict = 0; + enum {OPT_STRICT }; + static const char *optStrings[] = { "-strict", NULL }; + + if (objc < 2 || objc > 3) { + Tcl_WrongNumArgs(interp, 1, objv, "data"); + return TCL_ERROR; + } + for (i = 1; i < objc-1; ++i) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, + "option", TCL_EXACT, &index) != TCL_OK) { + return TCL_ERROR; + } + switch (index) { + case OPT_STRICT: + strict = 1; + break; + } + } + + TclNewObj(resultObj); + datastart = data = TclGetStringFromObj(objv[objc-1], &count); + dataend = data + count; + size = (count + 1) / 2; + begin = cursor = Tcl_SetByteArrayLength(resultObj, size); + while (data < dataend) { + value = 0; + i = 0; + while (i < 2) { + if (data < dataend) { + unsigned char c = *data++; + if (!isxdigit((char)c)) { + if (strict) { + char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; + sz[0] = c; + sprintf(pos, "%d", data - datastart - 1); + TclDecrRefCount(resultObj); + Tcl_AppendResult(interp, "invalid hexadecimal digit \"", + sz, "\" at position ", pos, NULL); + return TCL_ERROR; + } + continue; + } + value <<= 4; + c -= '0'; + if (c > 9) { + c += ('0' - 'A') + 10; + } + if (c > 16) { + c += ('A' - 'a'); + } + value |= (c & 0xf); + } else { + value <<= 4; + ++cut; + } + ++i; + } + *cursor++ = (unsigned char) value; + value = 0; + } + Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * BinaryEncode64 -- + * + * This implements a generic 6 bit binary encoding. Input is broken + * into 6 bit chunks and a lookup table passed in via clientData is + * used to turn these values into output characters. This is used + * to implement base64 and uuencode binary encodings. + * + * Results: + * Interp result set to an encoded byte array object + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +#define OUTPUT(c) \ + *cursor++ = (c); \ + ++outindex; \ + if (maxlen > 0 && cursor != limit) { \ + if (outindex == maxlen) { \ + memcpy(cursor, wrapchar, wrapcharlen); \ + cursor += wrapcharlen; \ + outindex = 0; \ + } \ + } \ + if (cursor > limit) Tcl_Panic("limit hit\n"); + +static int +BinaryEncode64(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]) +{ + Tcl_Obj *resultObj; + unsigned char *data, *cursor, *limit; + const char *digits = clientData; + int maxlen = 0; + const char *wrapchar = "\n"; + int wrapcharlen = 1; + int offset, i, index, size, outindex = 0, count = 0; + enum {OPT_MAXLEN, OPT_WRAPCHAR }; + static const char *optStrings[] = { "-maxlen", "-wrapchar", NULL }; + + if (objc < 2 || objc%2 != 0) { + Tcl_WrongNumArgs(interp, 1, objv, + "?-maxlen len? ?-wrapchar char? data"); + return TCL_ERROR; + } + for (i = 1; i < objc-1; i += 2) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, + "option", TCL_EXACT, &index) != TCL_OK) { + return TCL_ERROR; + } + switch (index) { + case OPT_MAXLEN: + if (Tcl_GetIntFromObj(interp, objv[i+1], &maxlen) != TCL_OK) + return TCL_ERROR; + break; + case OPT_WRAPCHAR: + wrapchar = Tcl_GetStringFromObj(objv[i+1], NULL); + wrapcharlen = strlen(wrapchar); + if (wrapcharlen == 0) maxlen = 0; + break; + } + } + + resultObj = Tcl_NewObj(); + data = Tcl_GetByteArrayFromObj(objv[objc-1], &count); + if (count > 0) { + size = (((count * 4) / 3) + 3) & ~3; /* ensure 4 byte chunks */ + if (maxlen > 0 && size > maxlen) { + int adjusted = size + (wrapcharlen * (size / maxlen)); + if (size % maxlen == 0) adjusted -= wrapcharlen; + size = adjusted; + } + cursor = Tcl_SetByteArrayLength(resultObj, size); + limit = cursor + size; + for (offset = 0; offset < count; offset+=3) { + unsigned char d[3] = {0, 0, 0}; + for (i = 0; i < 3 && offset+i < count; ++i) + d[i] = data[offset + i]; + OUTPUT(digits[ d[0] >> 2]); + OUTPUT(digits[((d[0] & 0x03) << 4) | (d[1] >> 4)]); + if (offset+1 < count) { + OUTPUT(digits[((d[1] & 0x0f) << 2) | (d[2] >> 6)]); + } else { + OUTPUT(digits[64]); + } + if (offset+2 < count) { + OUTPUT(digits[ d[2] & 0x3f]); + } else { + OUTPUT(digits[64]); + } + } + } + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; +} +#undef OUTPUT + +/* + *---------------------------------------------------------------------- + * + * BinaryDecodeUu -- + * + * Decode a uuencoded string. + * + * Results: + * Interp result set to an byte array object + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +static int +BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]) +{ + Tcl_Obj *resultObj = NULL; + unsigned char *data, *datastart, *dataend; + unsigned char *begin, *cursor; + int i, index, size, count = 0, cut = 0, strict = 0; + enum {OPT_STRICT }; + static const char *optStrings[] = { "-strict", NULL }; + + if (objc < 2 || objc > 3) { + Tcl_WrongNumArgs(interp, 1, objv, "data"); + return TCL_ERROR; + } + for (i = 1; i < objc-1; ++i) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, + "option", TCL_EXACT, &index) != TCL_OK) { + return TCL_ERROR; + } + switch (index) { + case OPT_STRICT: + strict = 1; + break; + } + } + + TclNewObj(resultObj); + datastart = data = TclGetStringFromObj(objv[objc-1], &count); + dataend = data + count; + size = ((count + 3) & ~3) * 3 / 4; + begin = cursor = Tcl_SetByteArrayLength(resultObj, size); + while (data < dataend) { + char d[4] = {0, 0, 0, 0}; + i = 0; + while (i < 4) { + if (data < dataend) { + d[i] = *data++; + if (d[i] < 33 || d[i] > 96) { + if (strict) { + char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; + sz[0] = d[i]; + sprintf(pos, "%d", data - datastart - 1); + TclDecrRefCount(resultObj); + Tcl_AppendResult(interp, "invalid uuencode character \"", + sz, "\" at position ", pos, NULL); + return TCL_ERROR; + } + continue; + } + } else { + ++cut; + } + ++i; + } + *cursor++ = (((d[0] - 0x20) & 0x3f) << 2) | (((d[1] - 0x20) & 0x3f) >> 4); + *cursor++ = (((d[1] - 0x20) & 0x3f) << 4) | (((d[2] - 0x20) & 0x3f) >> 2); + *cursor++ = (((d[2] - 0x20) & 0x3f) << 6) | (((d[3] - 0x20) & 0x3f) ); + } + Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * BinaryDecode64 -- + * + * Decode a base64 encoded string. + * + * Results: + * Interp result set to an byte array object + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +static int +BinaryDecode64(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]) +{ + Tcl_Obj *resultObj = NULL; + unsigned char *data, *datastart, *dataend; + unsigned char *begin = NULL; + unsigned char *cursor = NULL; + int strict = 0; + int i, index, size, cut = 0, count = 0; + enum {OPT_STRICT }; + static const char *optStrings[] = { "-strict", NULL }; + + if (objc < 2 || objc > 3) { + Tcl_WrongNumArgs(interp, 1, objv, "data"); + return TCL_ERROR; + } + for (i = 1; i < objc-1; ++i) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, + "option", TCL_EXACT, &index) != TCL_OK) { + return TCL_ERROR; + } + switch (index) { + case OPT_STRICT: + strict = 1; + break; + } + } + + TclNewObj(resultObj); + datastart = data = TclGetStringFromObj(objv[objc-1], &count); + dataend = data + count; + size = ((count + 3) & ~3) * 3 / 4; + begin = cursor = Tcl_SetByteArrayLength(resultObj, size); + while (data < dataend) { + int i = 0; + unsigned long value = 0; + while (i < 4) { + if (data < dataend) { + unsigned char c = *data++; + if (c >= 'A' && c <= 'Z') { + value = (value << 6) | ((c - 'A') & 0x3f); + } else if (c >= 'a' && c <= 'z') { + value = (value << 6) | ((c - 'a' + 26) & 0x3f); + } else if (c >= '0' && c <= '9') { + value = (value << 6) | ((c - '0' + 52) & 0x3f); + } else if (c == '+') { + value = (value << 6) | 0x3e; + } else if (c == '/') { + value = (value << 6) | 0x3f; + } else if (c == '=') { + value <<= 6; + if (cut < 2) ++cut; + } else { + if (strict) { + char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; + sz[0] = c; + sprintf(pos, "%d", data - datastart - 1); + TclDecrRefCount(resultObj); + Tcl_AppendResult(interp, "invalid base64 character \"", + sz, "\" at position ", pos, NULL); + return TCL_ERROR; + } + continue; + } + } else { + value <<= 6; + ++cut; + } + ++i; + } + *cursor++ = (unsigned char)((value >> 16) & 0xff); + *cursor++ = (unsigned char)((value >> 8) & 0xff); + *cursor++ = (unsigned char)(value & 0xff); + } + Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; +} +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/tests/binary.test b/tests/binary.test index 28e9c78..77306b4 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.33 2008/05/02 20:08:53 patthoyts Exp $ +# RCS: @(#) $Id: binary.test,v 1.34 2008/06/03 23:52:51 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -29,19 +29,20 @@ test binary-0.1 {DupByteArrayInternalRep} { string length $data } 11 -test binary-1.1 {Tcl_BinaryObjCmd: bad args} { - list [catch {binary} msg] $msg -} {1 {wrong # args: should be "binary subcommand ?argument ...?"}} -test binary-1.2 {Tcl_BinaryObjCmd: bad args} { - list [catch {binary foo} msg] $msg -} {1 {unknown or ambiguous subcommand "foo": must be format, or scan}} - -test binary-1.3 {Tcl_BinaryObjCmd: format error} { - list [catch {binary f} msg] $msg -} {1 {wrong # args: should be "binary format formatString ?arg arg ...?"}} -test binary-1.4 {Tcl_BinaryObjCmd: format} { +test binary-1.1 {Tcl_BinaryObjCmd: bad args} -body { + binary +} -returnCodes error -match glob -result {wrong # args: *} +test binary-1.2 {Tcl_BinaryObjCmd: bad args} -body { + binary foo +} -returnCodes error -match glob -result {unknown or ambiguous subcommand "foo": *} + +test binary-1.3 {Tcl_BinaryObjCmd: format error} -body { + binary f +} -returnCodes error \ + -result {wrong # args: should be "binary format formatString ?arg arg ...?"} +test binary-1.4 {Tcl_BinaryObjCmd: format} -body { binary format "" -} {} +} -result {} test binary-2.1 {Tcl_BinaryObjCmd: format} { @@ -1538,10 +1539,9 @@ test binary-41.8 {ScanNumber: word alignment} littleEndian { list [binary scan \x01\x9a\x99\x99\x99\x99\x99\xf9\x3f c1d1 arg1 arg2] $arg1 $arg2 } {2 1 1.6} -test binary-42.1 {Tcl_BinaryObjCmd: bad arguments} {} { - catch {binary ?} result - set result -} {unknown or ambiguous subcommand "?": must be format, or scan} +test binary-42.1 {Tcl_BinaryObjCmd: bad arguments} -constraints {} -body { + binary ? +} -returnCodes error -match glob -result {unknown or ambiguous subcommand "?": *} # Wide int (guaranteed at least 64-bit) handling test binary-43.1 {Tcl_BinaryObjCmd: format wide int} {} { @@ -2410,6 +2410,296 @@ test binary-65.9 {largest significand} ieeeFloatingPoint { set d } 18014398509481988.0 +test binary-70.1 {binary encode hex} -body { + binary encode hex +} -returnCodes error -match glob -result "wrong # args: *" +test binary-70.2 {binary encode hex} -body { + binary encode hex a +} -result {61} +test binary-70.3 {binary encode hex} -body { + binary encode hex {} +} -result {} +test binary-70.4 {binary encode hex} -body { + binary encode hex [string repeat a 20] +} -result [string repeat 61 20] +test binary-70.5 {binary encode hex} -body { + binary encode hex \0\1\2\3\4\0\1\2\3\4 +} -result {00010203040001020304} + +test binary-71.1 {binary decode hex} -body { + binary decode hex +} -returnCodes error -match glob -result "wrong # args: *" +test binary-71.2 {binary decode hex} -body { + binary decode hex 61 +} -result {a} +test binary-71.3 {binary decode hex} -body { + binary decode hex {} +} -result {} +test binary-71.4 {binary decode hex} -body { + binary decode hex [string repeat 61 20] +} -result [string repeat a 20] +test binary-71.5 {binary decode hex} -body { + binary decode hex 00010203040001020304 +} -result "\0\1\2\3\4\0\1\2\3\4" +test binary-71.6 {binary decode hex} -body { + binary decode hex "61 61" +} -result {aa} +test binary-71.7 {binary decode hex} -body { + binary decode hex "61\n\n\n61" +} -result {aa} +test binary-71.8 {binary decode hex} -body { + binary decode hex -strict "61 61" +} -returnCodes error -result {invalid hexadecimal digit " " at position 2} +test binary-71.9 {binary decode hex} -body { + set r [binary decode hex "6"] + list [string length $r] $r +} -result {0 {}} + +test binary-72.1 {binary encode base64} -body { + binary encode base64 +} -returnCodes error -match glob -result "wrong # args: *" +test binary-72.2 {binary encode base64} -body { + binary encode base64 abc +} -result {YWJj} +test binary-72.3 {binary encode base64} -body { + binary encode base64 {} +} -result {} +test binary-72.4 {binary encode base64} -body { + binary encode base64 [string repeat abc 20] +} -result [string repeat YWJj 20] +test binary-72.5 {binary encode base64} -body { + binary encode base64 \0\1\2\3\4\0\1\2\3 +} -result {AAECAwQAAQID} +test binary-72.6 {binary encode base64} -body { + binary encode base64 \0 +} -result {AA==} +test binary-72.7 {binary encode base64} -body { + binary encode base64 \0\0 +} -result {AAA=} +test binary-72.8 {binary encode base64} -body { + binary encode base64 \0\0\0 +} -result {AAAA} +test binary-72.9 {binary encode base64} -body { + binary encode base64 \0\0\0\0 +} -result {AAAAAA==} +test binary-72.10 {binary encode base64} -body { + binary encode base64 -maxlen 0 -wrapchar : abcabcabc +} -result {YWJjYWJjYWJj} +test binary-72.11 {binary encode base64} -body { + binary encode base64 -maxlen 1 -wrapchar : abcabcabc +} -result {Y:W:J:j:Y:W:J:j:Y:W:J:j} +test binary-72.12 {binary encode base64} -body { + binary encode base64 -maxlen 2 -wrapchar : abcabcabc +} -result {YW:Jj:YW:Jj:YW:Jj} +test binary-72.13 {binary encode base64} -body { + binary encode base64 -maxlen 3 -wrapchar : abcabcabc +} -result {YWJ:jYW:JjY:WJj} +test binary-72.14 {binary encode base64} -body { + binary encode base64 -maxlen 4 -wrapchar : abcabcabc +} -result {YWJj:YWJj:YWJj} +test binary-72.15 {binary encode base64} -body { + binary encode base64 -maxlen 5 -wrapchar : abcabcabc +} -result {YWJjY:WJjYW:Jj} +test binary-72.16 {binary encode base64} -body { + binary encode base64 -maxlen 6 -wrapchar : abcabcabc +} -result {YWJjYW:JjYWJj} +test binary-72.17 {binary encode base64} -body { + binary encode base64 -maxlen 7 -wrapchar : abcabcabc +} -result {YWJjYWJ:jYWJj} +test binary-72.18 {binary encode base64} -body { + binary encode base64 -maxlen 8 -wrapchar : abcabcabc +} -result {YWJjYWJj:YWJj} +test binary-72.19 {binary encode base64} -body { + binary encode base64 -maxlen 9 -wrapchar : abcabcabc +} -result {YWJjYWJjY:WJj} +test binary-72.20 {binary encode base64} -body { + binary encode base64 -maxlen 10 -wrapchar : abcabcabc +} -result {YWJjYWJjYW:Jj} +test binary-72.21 {binary encode base64} -body { + binary encode base64 -maxlen 11 -wrapchar : abcabcabc +} -result {YWJjYWJjYWJ:j} +test binary-72.22 {binary encode base64} -body { + binary encode base64 -maxlen 12 -wrapchar : abcabcabc +} -result {YWJjYWJjYWJj} +test binary-72.23 {binary encode base64} -body { + binary encode base64 -maxlen 13 -wrapchar : abcabcabc +} -result {YWJjYWJjYWJj} +test binary-72.24 {binary encode base64} -body { + binary encode base64 -maxlen 60 -wrapchar : abcabcabc +} -result {YWJjYWJjYWJj} +test binary-72.25 {binary encode base64} -body { + binary encode base64 -maxlen 2 -wrapchar * abcabcabc +} -result {YW*Jj*YW*Jj*YW*Jj} +test binary-72.26 {binary encode base64} -body { + binary encode base64 -maxlen 6 -wrapchar -*- abcabcabc +} -result {YWJjYW-*-JjYWJj} +test binary-72.27 {binary encode base64} -body { + binary encode base64 -maxlen 4 -wrapchar -*- abcabcabc +} -result {YWJj-*-YWJj-*-YWJj} +test binary-72.28 {binary encode base64} -body { + binary encode base64 -maxlen 6 -wrapchar 0123456789 abcabcabc +} -result {YWJjYW0123456789JjYWJj} + +test binary-73.1 {binary decode base64} -body { + binary decode base64 +} -returnCodes error -match glob -result "wrong # args: *" +test binary-73.2 {binary decode base64} -body { + binary decode base64 YWJj +} -result {abc} +test binary-73.3 {binary decode base64} -body { + binary decode base64 {} +} -result {} +test binary-73.4 {binary decode base64} -body { + binary decode base64 [string repeat YWJj 20] +} -result [string repeat abc 20] +test binary-73.5 {binary encode base64} -body { + binary decode base64 AAECAwQAAQID +} -result "\0\1\2\3\4\0\1\2\3" +test binary-73.6 {binary encode base64} -body { + binary decode base64 AA== +} -result "\0" +test binary-73.7 {binary encode base64} -body { + binary decode base64 AAA= +} -result "\0\0" +test binary-73.8 {binary encode base64} -body { + binary decode base64 AAAA +} -result "\0\0\0" +test binary-73.9 {binary encode base64} -body { + binary decode base64 AAAAAA== +} -result "\0\0\0\0" +test binary-73.10 {binary decode base64} -body { + set s "[string repeat YWJj 10]\n[string repeat YWJj 10]" + binary decode base64 $s +} -result [string repeat abc 20] +test binary-73.11 {binary decode base64} -body { + set s "[string repeat YWJj 10]\n [string repeat YWJj 10]" + binary decode base64 $s +} -result [string repeat abc 20] +test binary-73.12 {binary decode base64} -body { + binary decode base64 -strict ":YWJj" +} -returnCodes error -match glob -result {invalid base64 character ":" at position 0} +test binary-73.13 {binary decode base64} -body { + set s "[string repeat YWJj 10]:[string repeat YWJj 10]" + binary decode base64 -strict $s +} -returnCodes error -match glob -result {invalid base64 character ":" at position 40} +test binary-73.14 {binary decode base64} -body { + set s "[string repeat YWJj 10]\n [string repeat YWJj 10]" + binary decode base64 -strict $s +} -returnCodes error -match glob -result {invalid base64 character *} +test binary-73.20 {binary decode base64} -body { + set r [binary decode base64 Y] + list [string length $r] $r +} -result {0 {}} +test binary-73.21 {binary decode base64} -body { + set r [binary decode base64 YW] + list [string length $r] $r +} -result {1 a} +test binary-73.22 {binary decode base64} -body { + set r [binary decode base64 YWJ] + list [string length $r] $r +} -result {2 ab} +test binary-73.23 {binary decode base64} -body { + set r [binary decode base64 YWJj] + list [string length $r] $r +} -result {3 abc} + +test binary-74.1 {binary encode uuencode} -body { + binary encode uuencode +} -returnCodes error -match glob -result "wrong # args: *" +test binary-74.2 {binary encode uuencode} -body { + binary encode uuencode abc +} -result {86)C} +test binary-74.3 {binary encode uuencode} -body { + binary encode uuencode {} +} -result {} +test binary-74.4 {binary encode uuencode} -body { + binary encode uuencode [string repeat abc 20] +} -result [string repeat 86)C 20] +test binary-74.5 {binary encode uuencode} -body { + binary encode uuencode \0\1\2\3\4\0\1\2\3 +} -result "``\$\"`P0``0(#" +test binary-74.6 {binary encode uuencode} -body { + binary encode uuencode \0 +} -result {````} +test binary-74.7 {binary encode uuencode} -body { + binary encode uuencode \0\0 +} -result {````} +test binary-74.8 {binary encode uuencode} -body { + binary encode uuencode \0\0\0 +} -result {````} +test binary-74.9 {binary encode uuencode} -body { + binary encode uuencode \0\0\0\0 +} -result {````````} +test binary-74.10 {binary encode uuencode} -body { + binary encode uuencode -maxlen 0 -wrapchar | abcabcabc +} -result {86)C86)C86)C} +test binary-74.11 {binary encode uuencode} -body { + binary encode uuencode -maxlen 1 -wrapchar | abcabcabc +} -result {8|6|)|C|8|6|)|C|8|6|)|C} + +test binary-75.1 {binary decode uuencode} -body { + binary decode uuencode +} -returnCodes error -match glob -result "wrong # args: *" +test binary-75.2 {binary decode uuencode} -body { + binary decode uuencode 86)C +} -result {abc} +test binary-75.3 {binary decode uuencode} -body { + binary decode uuencode {} +} -result {} +test binary-75.4 {binary decode uuencode} -body { + binary decode uuencode [string repeat "86)C" 20] +} -result [string repeat abc 20] +test binary-75.5 {binary encode uuencode} -body { + binary decode uuencode "``\$\"`P0``0(#" +} -result "\0\1\2\3\4\0\1\2\3" +test binary-75.6 {binary encode uuencode} -body { + string length [binary decode uuencode {`}] +} -result 0 +test binary-75.7 {binary encode uuencode} -body { + string length [binary decode uuencode {``}] +} -result 1 +test binary-75.8 {binary encode uuencode} -body { + string length [binary decode uuencode {```}] +} -result 2 +test binary-75.9 {binary encode uuencode} -body { + string length [binary decode uuencode {````}] +} -result 3 +test binary-75.10 {binary decode uuencode} -body { + set s "[string repeat 86)C 10]\n[string repeat 86)C 10]" + binary decode uuencode $s +} -result [string repeat abc 20] +test binary-75.11 {binary decode uuencode} -body { + set s "[string repeat 86)C 10]\n [string repeat 86)C 10]" + binary decode uuencode $s +} -result [string repeat abc 20] +test binary-75.12 {binary decode uuencode} -body { + binary decode uuencode -strict "|86)C" +} -returnCodes error -match glob -result {invalid uuencode character "|" at position 0} +test binary-75.13 {binary decode uuencode} -body { + set s "[string repeat 86)C 10]|[string repeat 86)C 10]" + binary decode uuencode -strict $s +} -returnCodes error -match glob -result {invalid uuencode character "|" at position 40} +test binary-75.14 {binary decode uuencode} -body { + set s "[string repeat 86)C 10]\n [string repeat 86)C 10]" + binary decode uuencode -strict $s +} -returnCodes error -match glob -result {invalid uuencode character *} +test binary-75.20 {binary decode uuencode} -body { + set r [binary decode uuencode 8] + list [string length $r] $r +} -result {0 {}} +test binary-75.21 {binary decode uuencode} -body { + set r [binary decode uuencode 86] + list [string length $r] $r +} -result {1 a} +test binary-75.22 {binary decode uuencode} -body { + set r [binary decode uuencode 86)] + list [string length $r] $r +} -result {2 ab} +test binary-75.23 {binary decode uuencode} -body { + set r [binary decode uuencode 86)C] + list [string length $r] $r +} -result {3 abc} + # cleanup ::tcltest::cleanupTests return -- cgit v0.12 From a916d8993dbe62acec6ca7baf3bcf33ce5778a7f Mon Sep 17 00:00:00 2001 From: das Date: Thu, 5 Jun 2008 00:02:38 +0000 Subject: fix warnings, remove unused debug code that causes build failure --- generic/tclBinary.c | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 6d626d5..7a3473d 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.44 2008/06/03 23:52:51 patthoyts Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.45 2008/06/05 00:02:38 das Exp $ */ #include "tclInt.h" @@ -89,23 +89,6 @@ static int BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, static int BinaryDecode64(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -#if defined(DEBUG) || defined(_DEBUG) -#define TRACE LocalTrace -#else -#define TRACE 1 ? ((void)0) : LocalTrace -#endif -static void -LocalTrace(const char *format, ...) -{ - va_list args; - static char buffer[1024]; - - va_start(args, format); - _vsnprintf(buffer, 1023, format, args); - OutputDebugString(buffer); - va_end(args); -} - /* * The following tables are used by the binary encoders */ @@ -2358,7 +2341,8 @@ BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, } TclNewObj(resultObj); - datastart = data = TclGetStringFromObj(objv[objc-1], &count); + datastart = data = (unsigned char *) TclGetStringFromObj(objv[objc-1], + &count); dataend = data + count; size = (count + 1) / 2; begin = cursor = Tcl_SetByteArrayLength(resultObj, size); @@ -2372,7 +2356,7 @@ BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, if (strict) { char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; sz[0] = c; - sprintf(pos, "%d", data - datastart - 1); + sprintf(pos, "%d", (int)(data - datastart - 1)); TclDecrRefCount(resultObj); Tcl_AppendResult(interp, "invalid hexadecimal digit \"", sz, "\" at position ", pos, NULL); @@ -2549,7 +2533,8 @@ BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, } TclNewObj(resultObj); - datastart = data = TclGetStringFromObj(objv[objc-1], &count); + datastart = data = (unsigned char *) TclGetStringFromObj(objv[objc-1], + &count); dataend = data + count; size = ((count + 3) & ~3) * 3 / 4; begin = cursor = Tcl_SetByteArrayLength(resultObj, size); @@ -2563,7 +2548,7 @@ BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, if (strict) { char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; sz[0] = d[i]; - sprintf(pos, "%d", data - datastart - 1); + sprintf(pos, "%d", (int)(data - datastart - 1)); TclDecrRefCount(resultObj); Tcl_AppendResult(interp, "invalid uuencode character \"", sz, "\" at position ", pos, NULL); @@ -2631,7 +2616,8 @@ BinaryDecode64(ClientData clientData, Tcl_Interp *interp, } TclNewObj(resultObj); - datastart = data = TclGetStringFromObj(objv[objc-1], &count); + datastart = data = (unsigned char *) TclGetStringFromObj(objv[objc-1], + &count); dataend = data + count; size = ((count + 3) & ~3) * 3 / 4; begin = cursor = Tcl_SetByteArrayLength(resultObj, size); @@ -2658,7 +2644,7 @@ BinaryDecode64(ClientData clientData, Tcl_Interp *interp, if (strict) { char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; sz[0] = c; - sprintf(pos, "%d", data - datastart - 1); + sprintf(pos, "%d", (int)(data - datastart - 1)); TclDecrRefCount(resultObj); Tcl_AppendResult(interp, "invalid base64 character \"", sz, "\" at position ", pos, NULL); -- cgit v0.12 From 17aeda99fb77f6fa2cd10e1dbc86bc85e57fe242 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 6 Jun 2008 19:46:35 +0000 Subject: TIP #230 IMPLEMENTATION * generic/tclIOCmd.c: Integration of transform commands into 'chan' ensemble. * generic/tclInt.h: Definitions of the transform commands. * generic/tclIORTrans.c: Implementation of the reflection transforms. * tests/chan.test: Tests updated for new sub-commands of 'chan'. * tests/ioCmd.test: Tests updated for new sub-commands of 'chan'. * tests/ioTrans.test: Whole new set of tests for the reflection transform. * unix/Makefile.in: Integration of new files into build rules. * win/Makefile.in: Integration of new files into build rules. * win/makefile.vc: Integration of new files into build rules. NOTE: The file 'tclIORTrans.c' has a lot of code in common with the file 'tclIORChan.c', as that made it much easier to develop the reference implementation as a separate module. Now that the transforms have been committed the one thing left to do is to go over both modules and see which of the common parts we can factor out and share. --- ChangeLog | 21 + generic/tclIOCmd.c | 4 +- generic/tclIORTrans.c | 3345 +++++++++++++++++++++++++++++++++++++++++++++++++ generic/tclInt.h | 6 +- generic/tclVar.c | 4 +- tests/chan.test | 4 +- tests/ioCmd.test | 6 +- tests/ioTrans.test | 1463 +++++++++++++++++++++ unix/Makefile.in | 8 +- win/Makefile.in | 3 +- win/makefile.vc | 3 +- 11 files changed, 4855 insertions(+), 12 deletions(-) create mode 100644 generic/tclIORTrans.c create mode 100644 tests/ioTrans.test diff --git a/ChangeLog b/ChangeLog index a84cd49..cb4114c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2008-06-06 Andreas Kupries + + TIP #230 IMPLEMENTATION + + * generic/tclIOCmd.c: Integration of transform commands into 'chan' ensemble. + * generic/tclInt.h: Definitions of the transform commands. + * generic/tclIORTrans.c: Implementation of the reflection transforms. + * tests/chan.test: Tests updated for new sub-commands of 'chan'. + * tests/ioCmd.test: Tests updated for new sub-commands of 'chan'. + * tests/ioTrans.test: Whole new set of tests for the reflection transform. + * unix/Makefile.in: Integration of new files into build rules. + * win/Makefile.in: Integration of new files into build rules. + * win/makefile.vc: Integration of new files into build rules. + + NOTE: The file 'tclIORTrans.c' has a lot of code in common with + the file 'tclIORChan.c', as that made it much easier to + develop the reference implementation as a separate + module. Now that the transforms have been committed the one + thing left to do is to go over both modules and see which of + the common parts we can factor out and share. + 2008-06-04 Pat Thoyts * generic/tclBinary.c: TIP #317 implementation diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index be34dc1..131b905 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.53 2008/04/10 20:58:59 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.54 2008/06/06 19:46:36 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1838,7 +1838,9 @@ TclInitChanCmd( {"flush", Tcl_FlushObjCmd}, {"gets", Tcl_GetsObjCmd}, {"pending", ChanPendingObjCmd}, /* TIP #287 */ + {"pop", TclChanPopObjCmd}, /* TIP #230 */ {"postevent", TclChanPostEventObjCmd}, /* TIP #219 */ + {"push", TclChanPushObjCmd}, /* TIP #230 */ {"puts", Tcl_PutsObjCmd}, {"read", Tcl_ReadObjCmd}, {"seek", Tcl_SeekObjCmd}, diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c new file mode 100644 index 0000000..908c480 --- /dev/null +++ b/generic/tclIORTrans.c @@ -0,0 +1,3345 @@ +/* + * tclIORTrans.c -- + * + * This file contains the implementation of Tcl's generic transformation + * reflection code, which allows the implementation of Tcl channel + * transformations in Tcl code. + * + * Parts of this file are based on code contributed by Jean-Claude + * Wippler. + * + * See TIP #230 for the specification of this functionality. + * + * Copyright (c) 2007-2008 ActiveState. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclIORTrans.c,v 1.1 2008/06/06 19:46:37 andreas_kupries Exp $ + */ + +#include +#include +#include + +#ifndef EINVAL +#define EINVAL 9 +#endif +#ifndef EOK +#define EOK 0 +#endif + +/* DUPLICATE of HaveVersion() in tclIO.c // TODO - MODULE_SCOPE */ +static int HaveVersion(const Tcl_ChannelType *typePtr, + Tcl_ChannelTypeVersion minimumVersion); + +/* + * Signatures of all functions used in the C layer of the reflection. + */ + +static int ReflectClose(ClientData clientData, + Tcl_Interp *interp); +static int ReflectInput(ClientData clientData, char *buf, + int toRead, int *errorCodePtr); +static int ReflectOutput(ClientData clientData, const char *buf, + int toWrite, int *errorCodePtr); +static void ReflectWatch(ClientData clientData, int mask); +static int ReflectBlock(ClientData clientData, int mode); +static Tcl_WideInt ReflectSeekWide(ClientData clientData, + Tcl_WideInt offset, int mode, int *errorCodePtr); +static int ReflectSeek(ClientData clientData, long offset, + int mode, int *errorCodePtr); +static int ReflectGetOption(ClientData clientData, + Tcl_Interp *interp, const char *optionName, + Tcl_DString *dsPtr); +static int ReflectSetOption(ClientData clientData, + Tcl_Interp *interp, const char *optionName, + const char *newValue); +static int ReflectHandle(ClientData clientData, int direction, + ClientData* handle); +static int ReflectNotify(ClientData clientData, int mask); + +/* + * The C layer channel type/driver definition used by the reflection. This is + * a version 3 structure. + */ + +static Tcl_ChannelType tclRTransformType = { + "tclrtransform", /* Type name. */ + TCL_CHANNEL_VERSION_5, /* v5 channel */ + ReflectClose, /* Close channel, clean instance data */ + ReflectInput, /* Handle read request */ + ReflectOutput, /* Handle write request */ + ReflectSeek, /* Move location of access point. */ + ReflectSetOption, /* Set options. */ + ReflectGetOption, /* Get options. */ + ReflectWatch, /* Initialize notifier */ + ReflectHandle, /* Get OS handle from the channel. */ + NULL, /* No close2 support. NULL'able */ + ReflectBlock, /* Set blocking/nonblocking. */ + NULL, /* Flush channel. Not used by core. NULL'able */ + ReflectNotify, /* Handle events. */ + ReflectSeekWide, /* Move access point (64 bit). */ + NULL, /* thread action */ + NULL, /* truncate */ +}; + +/* + * Structure of the buffer to hold transform results to be consumed by higher + * layers upon reading from the channel, plus the functions to manage such. + */ + +typedef struct _ResultBuffer_ { + unsigned char* buf; /* Reference to the buffer area */ + int allocated; /* Allocated size of the buffer area */ + int used; /* Number of bytes in the buffer, <= allocated */ +} ResultBuffer; + +#define ResultLength(r) ((r)->used) +/* static int ResultLength (ResultBuffer* r); */ + +static void ResultClear (ResultBuffer* r); +static void ResultInit (ResultBuffer* r); +static void ResultAdd (ResultBuffer* r, unsigned char* buf, int toWrite); +static int ResultCopy (ResultBuffer* r, unsigned char* buf, int toRead); + +#define RB_INCREMENT (512) + +/* + * Instance data for a reflected transformation. =========================== + */ + +typedef struct { + Tcl_Channel chan; /* Back reference to the channel of the + * transformation itself. */ + Tcl_Channel parent; /* Reference to the channel the transformation + * was pushed on. */ + Tcl_Interp *interp; /* Reference to the interpreter containing the + * Tcl level part of the channel. */ + Tcl_Obj *handle; /* Reference to transform handle. Also stored + * in the argv, see below. The separate field + * gives us direct access, needed when working + * with the reflection maps. + */ +#ifdef TCL_THREADS + Tcl_ThreadId thread; /* Thread the 'interp' belongs to. */ +#endif + + Tcl_TimerToken timer; + + /* See [==] as well. + * Storage for the command prefix and the additional words required for + * the invocation of methods in the command handler. + * + * argv [0] ... [.] | [argc-2] [argc-1] | [argc] [argc+2] + * cmd ... pfx | method chan | detail1 detail2 + * ~~~~ CT ~~~ ~~ CT ~~ + * + * CT = Belongs to the 'Command handler Thread'. + */ + + int argc; /* Number of preallocated words - 2 */ + Tcl_Obj **argv; /* Preallocated array for calling the handler. + * args[0] is placeholder for cmd word. + * Followed by the arguments in the prefix, + * plus 4 placeholders for method, channel, + * and at most two varying (method specific) + * words. */ + int methods; /* Bitmask of supported methods */ + + /* + * NOTE (9): Should we have predefined shared literals for the method + * names? + */ + + int mode; /* Mask of R/W mode */ + int nonblocking; /* Flag: Channel is blocking or not */ + int readIsDrained; /* Flag: Read buffers are flushed*/ + + ResultBuffer result; + +} ReflectedTransform; + +/* + * Structure of the table mapping from transform handles to reflected + * transform (channels). Each interpreter which has the handler command for + * one or more reflected transforms records them in such a table, so that we + * are able to find them during interpreter/thread cleanup even if the actual + * channel they belong to was moved to a different interpreter and/or thread. + * + * The table is reachable via the standard interpreter AssocData, the key is + * defined below. + */ + +typedef struct { + Tcl_HashTable map; +} ReflectedTransformMap; + +#define RTMKEY "ReflectedTransformMap" + +/* + * Method literals. ================================================== + */ + +static const char *methodNames[] = { + "clear", /* OPT */ + "drain", /* OPT, drain => read */ + "finalize", /* */ + "flush", /* OPT, flush => write */ + "initialize", /* */ + "limit?", /* OPT */ + "read", /* OPT */ + "write", /* OPT */ + NULL +}; +typedef enum { + METH_CLEAR, + METH_DRAIN, + METH_FINAL, + METH_FLUSH, + METH_INIT, + METH_LIMIT, + METH_READ, + METH_WRITE +} MethodName; + +#define FLAG(m) (1 << (m)) +#define REQUIRED_METHODS \ + (FLAG(METH_INIT) | FLAG(METH_FINAL)) +#define RANDW \ + (TCL_READABLE | TCL_WRITABLE) + +#define IMPLIES(a,b) ((!(a)) || (b)) +#define NEGIMPL(a,b) +#define HAS(x,f) (x & FLAG(f)) + +#ifdef TCL_THREADS +/* + * Thread specific types and structures. + * + * We are here essentially creating a very specific implementation of 'thread + * send'. + */ + +/* + * Enumeration of all operations which can be forwarded. + */ + +typedef enum { + ForwardedClear, + ForwardedClose, + ForwardedDrain, + ForwardedFlush, + ForwardedInput, + ForwardedLimit, + ForwardedOutput +} ForwardedOperation; + +/* + * Event used to forward driver invocations to the thread actually managing + * the channel. We cannot construct the command to execute and forward + * that. Because then it will contain a mixture of Tcl_Obj's belonging to both + * the command handler thread (CT), and the thread managing the channel (MT), + * executed in CT. Tcl_Obj's are not allowed to cross thread boundaries. So we + * forward an operation code, the argument details, and reference to results. + * The command is assembled in the CT and belongs fully to that thread. No + * sharing problems. + */ + +typedef struct ForwardParamBase { + int code; /* O: Ok/Fail of the cmd handler */ + char *msgStr; /* O: Error message for handler failure */ + int mustFree; /* O: True if msgStr is allocated, false if + * otherwise (static). */ +} ForwardParamBase; + +/* + * Operation specific parameter/result structures. (These are "subtypes" of + * ForwardParamBase. Where an operation does not need any special types, it + * has no "subtype" and just uses ForwardParamBase, as listed above.) + */ + +struct ForwardParamTransform { + ForwardParamBase base; /* "Supertype". MUST COME FIRST. */ + char *buf; /* I: Bytes to transform, + * O: Bytes in transform result */ + int size; /* I: #bytes to transform, + * O: #bytes in the transform result */ +}; +struct ForwardParamLimit { + ForwardParamBase base; /* "Supertype". MUST COME FIRST. */ + int max; /* O: Character read limit */ +}; + +/* + * Now join all these together in a single union for convenience. + */ + +typedef union ForwardParam { + ForwardParamBase base; + struct ForwardParamTransform transform; + struct ForwardParamLimit limit; +} ForwardParam; + +/* + * Forward declaration. + */ + +typedef struct ForwardingResult ForwardingResult; + +/* + * General event structure, with reference to operation specific data. + */ + +typedef struct ForwardingEvent { + Tcl_Event event; /* Basic event data, has to be first item */ + ForwardingResult *resultPtr; + ForwardedOperation op; /* Forwarded driver operation */ + ReflectedTransform *rtPtr; /* Channel instance */ + ForwardParam *param; /* Packaged arguments and return values, a + * ForwardParam pointer. */ +} ForwardingEvent; + +/* + * Structure to manage the result of the forwarding. This is not the result of + * the operation itself, but about the success of the forward event itself. + * The event can be successful, even if the operation which was forwarded + * failed. It is also there to manage the synchronization between the involved + * threads. + */ + +struct ForwardingResult { + Tcl_ThreadId src; /* Originating thread. */ + Tcl_ThreadId dst; /* Thread the op was forwarded to. */ + Tcl_Interp *dsti; /* Interpreter in the thread the op was + * forwarded to. */ + Tcl_Condition done; /* Condition variable the forwarder blocks + * on. */ + int result; /* TCL_OK or TCL_ERROR */ + ForwardingEvent *evPtr; /* Event the result belongs to. */ + ForwardingResult *prevPtr, *nextPtr; + /* Links into the list of pending forwarded + * results. */ +}; + +typedef struct ThreadSpecificData { + /* + * Table of all reflected transformations owned by this thread. + */ + + ReflectedTransformMap* rtmPtr; +} ThreadSpecificData; + +static Tcl_ThreadDataKey dataKey; + +/* + * List of forwarded operations which have not completed yet, plus the mutex + * to protect the access to this process global list. + */ + +static ForwardingResult *forwardList = NULL; +TCL_DECLARE_MUTEX(rtForwardMutex) + +/* + * Function containing the generic code executing a forward, and wrapper + * macros for the actual operations we wish to forward. Uses ForwardProc as + * the event function executed by the thread receiving a forwarding event + * (which executes the appropriate function and collects the result, if any). + * + * The two ExitProcs are handlers so that things do not deadlock when either + * thread involved in the forwarding exits. They also clean things up so that + * we don't leak resources when threads go away. + */ + +static void ForwardOpToOwnerThread(ReflectedTransform *rtPtr, + ForwardedOperation op, const VOID *param); +static int ForwardProc(Tcl_Event *evPtr, int mask); +static void SrcExitProc(ClientData clientData); + +#define FreeReceivedError(p) \ + if ((p)->base.mustFree) { \ + ckfree((p)->base.msgStr); \ + } +#define PassReceivedErrorInterp(i,p) \ + if ((i) != NULL) { \ + Tcl_SetChannelErrorInterp((i), \ + Tcl_NewStringObj((p)->base.msgStr, -1)); \ + } \ + FreeReceivedError(p) +#define PassReceivedError(c,p) \ + Tcl_SetChannelError((c), Tcl_NewStringObj((p)->base.msgStr, -1)); \ + FreeReceivedError(p) +#define ForwardSetStaticError(p,emsg) \ + (p)->base.code = TCL_ERROR; \ + (p)->base.mustFree = 0; \ + (p)->base.msgStr = (char *) (emsg) +#define ForwardSetDynamicError(p,emsg) \ + (p)->base.code = TCL_ERROR; \ + (p)->base.mustFree = 1; \ + (p)->base.msgStr = (char *) (emsg) + +static void ForwardSetObjError(ForwardParam *p, + Tcl_Obj *objPtr); + +static ReflectedTransformMap * GetThreadReflectedTransformMap(void); +static void DeleteThreadReflectedTransformMap(ClientData clientData); + +#endif /* TCL_THREADS */ + +#define SetChannelErrorStr(c,msgStr) \ + Tcl_SetChannelError((c), Tcl_NewStringObj((msgStr), -1)) + +static Tcl_Obj * MarshallError(Tcl_Interp *interp); +static void UnmarshallErrorResult(Tcl_Interp *interp, + Tcl_Obj *msgObj); + +/* + * Static functions for this file: + */ + +static Tcl_Obj * DecodeEventMask(int mask); +static ReflectedTransform * NewReflectedTransform(Tcl_Interp *interp, + Tcl_Obj *cmdpfxObj, int mode, Tcl_Obj *handleObj, + Tcl_Channel parentChan); +static Tcl_Obj * NextHandle(void); +static void FreeReflectedTransform(ReflectedTransform *rtPtr); +static int InvokeTclMethod(ReflectedTransform *rtPtr, + const char *method, Tcl_Obj *argOneObj, + Tcl_Obj *argTwoObj, Tcl_Obj **resultObjPtr); + +static ReflectedTransformMap * GetReflectedTransformMap(Tcl_Interp *interp); +static void DeleteReflectedTransformMap(ClientData clientData, + Tcl_Interp *interp); + +/* + * Global constant strings (messages). ================== + * These string are used directly as bypass errors, thus they have to be valid + * Tcl lists where the last element is the message itself. Hence the + * list-quoting to keep the words of the message together. See also [x]. + */ + +static const char *msg_read_badlimit = "{Tcl driver returned bad read limit '0'}"; +static const char *msg_read_unsup = "{read not supported by Tcl driver}"; +static const char *msg_write_unsup = "{write not supported by Tcl driver}"; +#ifdef TCL_THREADS +static const char *msg_send_originlost = "{Channel thread lost}"; +static const char *msg_send_dstlost = "{Owner lost}"; +#endif /* TCL_THREADS */ +static const char *msg_dstlost = "-code 1 -level 0 -errorcode NONE -errorinfo {} -errorline 1 {Owner lost}"; + +/* + * Timer management (flushing out buffered data via artificial events). + */ + +/* + * Number of milliseconds to wait before firing an event to try to + * flush out information waiting in buffers (fileevent support). + */ + +#define FLUSH_DELAY (5) + +static void TimerKill (ReflectedTransform* rtPtr); +static void TimerSetup (ReflectedTransform* rtPtr); +static void TimerRun (ClientData clientData); + +/* + * Helper functions encapsulating some of the thread forwarding to make the + * control flow in callers easier. + */ + +static int TransformRead (ReflectedTransform* rtPtr, int* errorCodePtr, unsigned char* buf, int toRead); +static int TransformWrite (ReflectedTransform* rtPtr, int* errorCodePtr, unsigned char* buf, int toWrite); +static int TransformDrain (ReflectedTransform* rtPtr, int* errorCodePtr); +static int TransformFlush (ReflectedTransform* rtPtr, int* errorCodePtr, int op); +static void TransformClear (ReflectedTransform* rtPtr); +static int TransformLimit (ReflectedTransform* rtPtr, int* errorCodePtr, int* maxPtr); + +/* op'codes for TransformFlush */ +#define FLUSH_WRITE 1 +#define FLUSH_DISCARD 0 + +/* + * Main methods to plug into the 'chan' ensemble'. ================== + */ + +/* + *---------------------------------------------------------------------- + * + * TclChanPushObjCmd -- + * + * This function is invoked to process the "chan push" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. The handle of the new channel is placed in the + * interp result. + * + * Side effects: + * Creates a new channel. + * + *---------------------------------------------------------------------- + */ + +int +TclChanPushObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + ReflectedTransform *rtPtr; /* Instance data of the new (transform) channel */ + Tcl_Obj* chanObj; /* Handle of parent channel */ + Tcl_Channel parentChan; /* Token of parent channel */ + int mode; /* R/W mode of parent, later the new + * channel. Has to match the abilities of the + * handler commands */ + Tcl_Obj *cmdObj; /* Command prefix, list of words */ + Tcl_Obj *cmdNameObj; /* Command name */ + Tcl_Obj *rtId; /* Handle of the new transform (channel) */ + Tcl_Obj *modeObj; /* mode in obj form for method call */ + + int listc; /* Result of 'initialize', and of */ + Tcl_Obj **listv; /* its sublist in the 2nd element */ + int methIndex; /* Encoded method name */ + int result; /* Result code for 'initialize' */ + Tcl_Obj *resObj; /* Result data for 'initialize' */ + int methods; /* Bitmask for supported methods. */ + Tcl_Obj *err; /* Error message */ + ReflectedTransformMap *rtmPtr; + /* Map of reflected transforms with handlers in + * this interp. */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ + int isNew; /* Placeholder. */ + + /* + * Syntax: chan push CHANNEL CMDPREFIX + * [0] [1] [2] [3] + * + * Actually: rPush CHANNEL CMDPREFIX + * [0] [1] [2] + */ + +#define CHAN (1) +#define CMD (2) + + /* + * Number of arguments... + */ + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "channel cmdprefix"); + return TCL_ERROR; + } + + /* + * First argument is a channel handle. + */ + + chanObj = objv[CHAN]; + parentChan = Tcl_GetChannel (interp, Tcl_GetString (chanObj), &mode); + if (parentChan == NULL) { + return TCL_ERROR; + } + parentChan = Tcl_GetTopChannel (parentChan); + + /* + * Second argument is command prefix, i.e. list of words, first word is + * name of handler command, other words are fixed arguments. Run + * 'initialize' method to get the list of supported methods. Validate + * this. + */ + + cmdObj = objv[CMD]; + + /* + * Basic check that the command prefix truly is a list. + */ + + if (Tcl_ListObjIndex(interp, cmdObj, 0, &cmdNameObj) != TCL_OK) { + return TCL_ERROR; + } + + /* + * Now create the transformation (channel). + */ + + rtId = NextHandle(); + rtPtr = NewReflectedTransform(interp, cmdObj, mode, rtId, parentChan); + + /* + * Invoke 'initialize' and validate that the handler is present and ok. + * Squash the transformation if not. + */ + + modeObj = DecodeEventMask(mode); + result = InvokeTclMethod(rtPtr, "initialize", modeObj, NULL, &resObj); + Tcl_DecrRefCount(modeObj); + if (result != TCL_OK) { + UnmarshallErrorResult(interp, resObj); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + goto error; + } + + /* + * Verify the result. + * - List, of method names. Convert to mask. + * Check for non-optionals through the mask. + * Compare open mode against optional r/w. + */ + + if (Tcl_ListObjGetElements(NULL, resObj, &listc, &listv) != TCL_OK) { + TclNewLiteralStringObj(err, "chan handler \""); + Tcl_AppendObjToObj(err, cmdObj); + Tcl_AppendToObj(err, " initialize\" returned non-list: ", -1); + Tcl_AppendObjToObj(err, resObj); + Tcl_SetObjResult(interp, err); + Tcl_DecrRefCount(resObj); + goto error; + } + + methods = 0; + while (listc > 0) { + if (Tcl_GetIndexFromObj(interp, listv[listc-1], methodNames, + "method", TCL_EXACT, &methIndex) != TCL_OK) { + TclNewLiteralStringObj(err, "chan handler \""); + Tcl_AppendObjToObj(err, cmdObj); + Tcl_AppendToObj(err, " initialize\" returned ", -1); + Tcl_AppendObjToObj(err, Tcl_GetObjResult(interp)); + Tcl_SetObjResult(interp, err); + Tcl_DecrRefCount(resObj); + goto error; + } + + methods |= FLAG(methIndex); + listc--; + } + Tcl_DecrRefCount(resObj); + + if ((REQUIRED_METHODS & methods) != REQUIRED_METHODS) { + TclNewLiteralStringObj(err, "chan handler \""); + Tcl_AppendObjToObj(err, cmdObj); + Tcl_AppendToObj(err, "\" does not support all required methods", -1); + Tcl_SetObjResult(interp, err); + goto error; + } + + /* + * Mode tell us what the parent channel supports. The methods tell us what + * the handler supports. We remove the non-supported bits from the mode + * and check that the channel is not completely inacessible. Afterward the + * mode tells us which methods are still required, and these methods will + * also be supported by the handler, by design of the check. + */ + + if (!HAS(methods, METH_READ)) { mode &= ~TCL_READABLE; } + if (!HAS(methods, METH_WRITE)) { mode &= ~TCL_WRITABLE; } + + if (!mode) { + TclNewLiteralStringObj(err, "chan handler \""); + Tcl_AppendObjToObj(err, cmdObj); + Tcl_AppendToObj(err, "\" makes the channel inacessible", -1); + Tcl_SetObjResult(interp, err); + goto error; + } + + /* + * The mode and support for it is ok, now check the internal constraints. + */ + + if (!IMPLIES(HAS(methods, METH_DRAIN), HAS(methods, METH_READ))) { + TclNewLiteralStringObj(err, "chan handler \""); + Tcl_AppendObjToObj(err, cmdObj); + Tcl_AppendToObj(err, "\" supports \"drain\" but not \"read\"", -1); + Tcl_SetObjResult(interp, err); + goto error; + } + + if (!IMPLIES(HAS(methods, METH_FLUSH), HAS(methods, METH_WRITE))) { + TclNewLiteralStringObj(err, "chan handler \""); + Tcl_AppendObjToObj(err, cmdObj); + Tcl_AppendToObj(err, "\" supports \"flush\" but not \"write\"", -1); + Tcl_SetObjResult(interp, err); + goto error; + } + + Tcl_ResetResult(interp); + + /* + * Everything is fine now. + */ + + rtPtr->methods = methods; + rtPtr->mode = mode; + rtPtr->chan = Tcl_StackChannel (interp, &tclRTransformType, + (ClientData) rtPtr, mode, + rtPtr->parent); + + /* + * Register the transform in our our map for proper handling of deleted + * interpreters and/or threads. + */ + + rtmPtr = GetReflectedTransformMap (interp); + hPtr = Tcl_CreateHashEntry(&rtmPtr->map, Tcl_GetString(rtId), + &isNew); + if (!isNew && rtPtr != Tcl_GetHashValue(hPtr)) { + Tcl_Panic("TclChanPushObjCmd: duplicate transformation handle"); + } + Tcl_SetHashValue(hPtr, rtPtr); +#ifdef TCL_THREADS + rtmPtr = GetThreadReflectedTransformMap(); + hPtr = Tcl_CreateHashEntry(&rtmPtr->map, Tcl_GetString(rtId), + &isNew); + Tcl_SetHashValue(hPtr, rtPtr); +#endif + + /* + * Return the channel as the result of the command. + */ + + Tcl_AppendResult (interp, Tcl_GetChannelName (rtPtr->chan), + (char*) NULL); + return TCL_OK; + + error: + /* + * We are not going through ReflectClose as we never had a channel + * structure. + */ + + FreeReflectedTransform(rtPtr); + return TCL_ERROR; + +#undef CHAN +#undef CMD +} + +/* + *---------------------------------------------------------------------- + * + * TclChanPopObjCmd -- + * + * This function is invoked to process the "chan pop" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * Posts events to a reflected channel, invokes event handlers. The + * latter implies that arbitrary side effects are possible. + * + *---------------------------------------------------------------------- + */ + +int +TclChanPopObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + /* + * Syntax: chan pop CHANNEL + * [0] [1] [2] + * + * Actually: rPop CHANNEL + * [0] [1] + */ + +#define CHAN (1) + + const char *chanId; /* Tcl level channel handle */ + Tcl_Channel chan; /* Channel associated to the handle */ + int mode; /* Channel r/w mode */ + + /* + * Number of arguments... + */ + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "channel"); + return TCL_ERROR; + } + + /* + * First argument is a channel, which may have a (reflected) + * transformation. + */ + + chanId = TclGetString(objv[CHAN]); + chan = Tcl_GetChannel(interp, chanId, &mode); + + if (chan == NULL) { + return TCL_ERROR; + } + + /* Removing transformations is generic, and not restricted to reflected + * transformations. + */ + + Tcl_UnstackChannel(interp, chan); + return TCL_OK; + +#undef CHAN +} + +/* + * Channel error message marshalling utilities. + */ + +static Tcl_Obj* +MarshallError( + Tcl_Interp *interp) +{ + /* + * Capture the result status of the interpreter into a string. => List of + * options and values, followed by the error message. The result has + * refCount 0. + */ + + Tcl_Obj *returnOpt = Tcl_GetReturnOptions(interp, TCL_ERROR); + + /* + * => returnOpt.refCount == 0. We can append directly. + */ + + Tcl_ListObjAppendElement(NULL, returnOpt, Tcl_GetObjResult(interp)); + return returnOpt; +} + +static void +UnmarshallErrorResult( + Tcl_Interp *interp, + Tcl_Obj *msgObj) +{ + int lc; + Tcl_Obj **lv; + int explicitResult; + int numOptions; + + /* + * Process the caught message. + * + * Syntax = (option value)... ?message? + * + * Bad syntax causes a panic. This is OK because the other side uses + * Tcl_GetReturnOptions and list construction functions to marshall the + * information; if we panic here, something has gone badly wrong already. + */ + + if (Tcl_ListObjGetElements(interp, msgObj, &lc, &lv) != TCL_OK) { + Tcl_Panic("TclChanCaughtErrorBypass: Bad syntax of caught result"); + } + if (interp == NULL) { + return; + } + + explicitResult = lc & 1; /* Odd number of values? */ + numOptions = lc - explicitResult; + + if (explicitResult) { + Tcl_SetObjResult(interp, lv[lc-1]); + } + + (void) Tcl_SetReturnOptions(interp, Tcl_NewListObj(numOptions, lv)); + ((Interp *)interp)->flags &= ~ERR_ALREADY_LOGGED; +} + +/* + * Driver functions. ================================================ + */ + +/* + *---------------------------------------------------------------------- + * + * ReflectClose -- + * + * This function is invoked when the channel is closed, to delete the + * driver specific instance data. + * + * Results: + * A posix error. + * + * Side effects: + * Releases memory. Arbitrary, as it calls upon a script. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectClose( + ClientData clientData, + Tcl_Interp *interp) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + int result; /* Result code for 'close' */ + Tcl_Obj *resObj; /* Result data for 'close' */ + ReflectedTransformMap *rtmPtr;/* Map of reflected transforms with handlers in + * this interp */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ + + if (interp == NULL) { + /* + * This call comes from TclFinalizeIOSystem. There are no + * interpreters, and therefore we cannot call upon the handler command + * anymore. Threading is irrelevant as well. We simply clean up all + * our C level data structures and leave the Tcl level to the other + * finalization functions. + */ + + /* + * THREADED => Forward this to the origin thread + * + * Note: DeleteThreadReflectedTransformMap() is the thread exit handler + * for the origin thread. Use this to clean up the structure? Except + * if lost? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + ForwardOpToOwnerThread(rtPtr, ForwardedClose, &p); + result = p.base.code; + + /* + * FreeReflectedTransform is done in the forwarded operation!, in + * the other thread. rtPtr here is gone! + */ + + if (result != TCL_OK) { + FreeReceivedError(&p); + } + return EOK; + } +#endif + + FreeReflectedTransform(rtPtr); + return EOK; + } + + /* + * In the reflected channel implementation a cleaned method mask here + * implies that the channel creation was aborted, and "finalize" must not + * be called. for transformations however we are not going through here on + * such an abort, but directly through FreeReflectedTransform. So for us + * that check is not necessary. We always go through 'finalize'. + */ + + if (HAS(rtPtr->methods, METH_DRAIN) && (!rtPtr->readIsDrained)) { + int errorCode; + if (!TransformDrain (rtPtr, &errorCode)) { + return errorCode; + } + } + + if (HAS(rtPtr->methods, METH_FLUSH)) { + int errorCode; + if (!TransformFlush (rtPtr, &errorCode, FLUSH_WRITE)) { + return errorCode; + } + } + + /* + * Are we in the correct thread? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + ForwardOpToOwnerThread(rtPtr, ForwardedClose, &p); + result = p.base.code; + + /* + * FreeReflectedTransform is done in the forwarded operation!, in the + * other thread. rtPtr here is gone! + */ + + if (result != TCL_OK) { + PassReceivedErrorInterp(interp, &p); + } + } else { +#endif + result = InvokeTclMethod(rtPtr, "finalize", NULL, NULL, &resObj); + if ((result != TCL_OK) && (interp != NULL)) { + Tcl_SetChannelErrorInterp(interp, resObj); + } + + Tcl_DecrRefCount(resObj); /* Remove reference we held from the + * invoke */ + + /* + * Remove the transform from the map before releasing the memory, to + * prevent future accesses from finding and dereferencing a dangling + * pointer. + * + * NOTE: The transform may not be in the map. This is ok, that happens + * when the transform was created in a different interpreter and/or + * thread and then was moved here. + */ + + rtmPtr = GetReflectedTransformMap(interp); + hPtr = Tcl_FindHashEntry (&rtmPtr->map, + Tcl_GetString(rtPtr->handle)); + if (hPtr) { + Tcl_DeleteHashEntry (hPtr); + } +#ifdef TCL_THREADS + /* + * In a threaded interpreter we manage a per-thread map as well, to + * allow us to survive if the script level pulls the rug out under a + * channel by deleting the owning thread. + */ + + rtmPtr = GetThreadReflectedTransformMap(); + hPtr = Tcl_FindHashEntry (&rtmPtr->map, + Tcl_GetString(rtPtr->handle)); + if (hPtr) { + Tcl_DeleteHashEntry (hPtr); + } +#endif + + FreeReflectedTransform(rtPtr); +#ifdef TCL_THREADS + } +#endif + return (result == TCL_OK) ? EOK : EINVAL; +} + +/* + *---------------------------------------------------------------------- + * + * ReflectInput -- + * + * This function is invoked when more data is requested from the channel. + * + * Results: + * The number of bytes read. + * + * Side effects: + * Allocates memory. Arbitrary, as it calls upon a script. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectInput( + ClientData clientData, + char *buf, + int toRead, + int *errorCodePtr) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + int gotBytes, copied, read; + + /* + * The following check can be done before thread redirection, because we + * are reading from an item which is readonly, i.e. will never change + * during the lifetime of the channel. + */ + + if (!(rtPtr->methods & FLAG(METH_READ))) { + SetChannelErrorStr(rtPtr->chan, msg_read_unsup); + *errorCodePtr = EINVAL; + return -1; + } + + gotBytes = 0; + + while (toRead > 0) { + /* Loop until the request is satisfied (or no data available from + * below, possibly EOF). + */ + + copied = ResultCopy (&rtPtr->result, (unsigned char*) buf, toRead); + toRead -= copied; + buf += copied; + gotBytes += copied; + + if (toRead == 0) { + return gotBytes; + } + + /* + * The buffer is exhausted, but the caller wants even more. We now + * have to go to the underlying channel, get more bytes and then + * transform them for delivery. We may not get that we want (full EOF + * or temporary out of data). + */ + + /* + * Length (rtPtr->result) == 0, toRead > 0 here. Use 'buf'! as target + * to store the intermediary information read from the parent channel. + * + * Ask the transform how much data it allows us to read from the + * underlying channel. This feature allows the transform to signal EOF + * upstream although there is none downstream. Useful to control an + * unbounded 'fcopy' for example, either through counting bytes, or by + * pattern matching. + */ + + if ((rtPtr->methods & FLAG(METH_LIMIT))) { + int maxRead = -1; + if (!TransformLimit (rtPtr, errorCodePtr, &maxRead)) { + return -1; + } + if (maxRead == 0) { + SetChannelErrorStr(rtPtr->chan, msg_read_badlimit); + return -1; + } else if (maxRead > 0) { + if (maxRead < toRead) { + toRead = maxRead; + } + } /* else: 'maxRead < 0' == Accept the current value of toRead */ + } + + if (toRead <= 0) { + return gotBytes; + } + + read = Tcl_ReadRaw (rtPtr->parent, buf, toRead); + if (read < 0) { + /* Report errors to caller. + * The state of the seek system is unchanged! + */ + + if ((Tcl_GetErrno () == EAGAIN) && (gotBytes > 0)) { + /* EAGAIN is a special situation. If we had some data + * before we report that instead of the request to re-try. + */ + + return gotBytes; + } + + *errorCodePtr = Tcl_GetErrno (); + return -1; + } + + if (read == 0) { + /* + * Check wether we hit on EOF in 'parent' or not. If not + * differentiate between blocking and non-blocking modes. In + * non-blocking mode we ran temporarily out of data. Signal this + * to the caller via EWOULDBLOCK and error return (-1). In the + * other cases we simply return what we got and let the caller + * wait for more. On the other hand, if we got an EOF we have to + * convert and flush all waiting partial data. + */ + + if (!Tcl_Eof (rtPtr->parent)) { + /* The state of the seek system is unchanged! */ + + if ((gotBytes == 0) && rtPtr->nonblocking) { + *errorCodePtr = EWOULDBLOCK; + return -1; + } else { + return gotBytes; + } + } else { + /* Eof in parent */ + if (rtPtr->readIsDrained) { + return gotBytes; + } + + /* + * Now this is a bit different. The partial data waiting is + * converted and returned. + */ + + if (HAS(rtPtr->methods, METH_DRAIN)) { + if(!TransformDrain (rtPtr, errorCodePtr)) { + return -1; + } + } + + if (ResultLength (&rtPtr->result) == 0) { + /* The drain delivered nothing */ + return gotBytes; + } + continue; /* at: while (toRead > 0) */ + } + } /* read == 0 */ + + /* + * Transform the read chunk, which was not empty. Anything we got back + * is a transformation result is put into our buffers, and the next + * iteration will put it into the result. + */ + + if (!TransformRead (rtPtr, errorCodePtr, buf, read)) { + return -1; + } + } /* while toRead > 0 */ + + return gotBytes; + +} + +/* + *---------------------------------------------------------------------- + * + * ReflectOutput -- + * + * This function is invoked when data is writen to the channel. + * + * Results: + * The number of bytes actually written. + * + * Side effects: + * Allocates memory. Arbitrary, as it calls upon a script. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectOutput( + ClientData clientData, + const char *buf, + int toWrite, + int *errorCodePtr) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + + /* + * The following check can be done before thread redirection, because we + * are reading from an item which is readonly, i.e. will never change + * during the lifetime of the channel. + */ + + if (!(rtPtr->methods & FLAG(METH_WRITE))) { + SetChannelErrorStr(rtPtr->chan, msg_write_unsup); + *errorCodePtr = EINVAL; + return -1; + } + + if (toWrite == 0) { + /* Nothing came in to write, ignore the call + */ + return 0; + } + + /* + * Discard partial data in the input buffers, i.e. on the read side. Like + * we do when explicitly seeking as well. + */ + + if ((rtPtr->methods & FLAG(METH_CLEAR))) { + TransformClear (rtPtr); + } + + /* + * Hand the data to the transformation itself. Anything it deigned to + * return to us is a (partial) transformation result and written to the + * parent channel for further processing. + */ + + if (!TransformWrite (rtPtr, errorCodePtr, (unsigned char*) buf, toWrite)) { + return -1; + } + + *errorCodePtr = EOK; + return toWrite; +} + +/* + *---------------------------------------------------------------------- + * + * ReflectSeekWide / ReflectSeek -- + * + * This function is invoked when the user wishes to seek on the channel. + * + * Results: + * The new location of the access point. + * + * Side effects: + * Allocates memory. Arbitrary, per the parent channel, and the called scripts. + * + *---------------------------------------------------------------------- + */ + +static Tcl_WideInt +ReflectSeekWide( + ClientData clientData, + Tcl_WideInt offset, + int seekMode, + int *errorCodePtr) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + Channel* parent = (Channel*) rtPtr->parent; + Tcl_WideInt curPos; /* Position on the device. */ + + Tcl_DriverSeekProc *seekProc = + Tcl_ChannelSeekProc(Tcl_GetChannelType (rtPtr->parent)); + + /* + * Fail if the parent channel is not seekable. + */ + + if (seekProc == NULL) { + Tcl_SetErrno(EINVAL); + return Tcl_LongAsWide(-1); + } + + /* + * Check if we can leave out involving the Tcl level, i.e. transformation + * handler. This is true for tell requests, and transformations which + * support neither flush, nor drain. For these cases we can pass the + * request down and the result back up unchanged. + */ + + if ( + ((seekMode != SEEK_CUR) || (offset != 0)) && + (HAS(rtPtr->methods, METH_CLEAR) || + HAS(rtPtr->methods, METH_FLUSH)) + ) { + /* + * Neither a tell request, nor clear/flush both not supported. We + * have to go through the Tcl level to clear and/or flush the + * transformation. + */ + + if ((rtPtr->methods & FLAG(METH_CLEAR))) { + TransformClear (rtPtr); + } + + /* + * When flushing the transform for seeking the generated results are + * irrelevant. We cannot put them into the channel, this would move + * the location, throwing it off with regard to where we are and are + * seeking to. + */ + + if (HAS(rtPtr->methods, METH_FLUSH)) { + if (!TransformFlush (rtPtr, errorCodePtr, FLUSH_DISCARD)) { + return -1; + } + } + } + + /* + * Now seek to the new position in the channel as requested by the + * caller. Note that we prefer the wideSeekProc if that is available and + * non-NULL... + */ + + if (HaveVersion(parent->typePtr, TCL_CHANNEL_VERSION_3) && + parent->typePtr->wideSeekProc != NULL) { + curPos = (parent->typePtr->wideSeekProc) (parent->instanceData, + offset, seekMode, errorCodePtr); + } else if (offset < Tcl_LongAsWide(LONG_MIN) || + offset > Tcl_LongAsWide(LONG_MAX)) { + *errorCodePtr = EOVERFLOW; + curPos = Tcl_LongAsWide(-1); + } else { + curPos = Tcl_LongAsWide((parent->typePtr->seekProc) ( + parent->instanceData, Tcl_WideAsLong(offset), seekMode, + errorCodePtr)); + } + if (curPos == Tcl_LongAsWide(-1)) { + Tcl_SetErrno(*errorCodePtr); + } + + *errorCodePtr = EOK; + return curPos; +} + +static int +ReflectSeek( + ClientData clientData, + long offset, + int seekMode, + int *errorCodePtr) +{ + /* + * This function can be invoked from a transformation which is based on + * standard seeking, i.e. non-wide. Because of this we have to implement + * it, a dummy is not enough. We simply delegate the call to the wide + * routine. + */ + + return (int) ReflectSeekWide(clientData, Tcl_LongAsWide(offset), seekMode, + errorCodePtr); +} + +/* + *---------------------------------------------------------------------- + * + * ReflectWatch -- + * + * This function is invoked to tell the channel what events the I/O + * system is interested in. + * + * Results: + * None. + * + * Side effects: + * Allocates memory. Arbitrary, as it calls upon a script. + * + *---------------------------------------------------------------------- + */ + +static void +ReflectWatch( + ClientData clientData, + int mask) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + Tcl_DriverWatchProc* watchProc; + + watchProc = Tcl_ChannelWatchProc (Tcl_GetChannelType (rtPtr->parent)); + (*watchProc) (Tcl_GetChannelInstanceData(rtPtr->parent), + mask); + + /* + * Management of the internal timer. + */ + + if (!(mask & TCL_READABLE) || (ResultLength(&rtPtr->result) == 0)) { + /* + * A pending timer may exist, but either is there no (more) interest + * in the events it generates or nothing is available for + * reading. Remove it, if existing. + */ + + TimerKill (rtPtr); + } else { + /* + * There might be no pending timer, but there is interest in readable + * events and we actually have data waiting, so generate a timer to + * flush that if it does not exist. + */ + + TimerSetup (rtPtr); + } +} + +/* + *---------------------------------------------------------------------- + * + * ReflectBlock -- + * + * This function is invoked to tell the channel which blocking behaviour + * is required of it. + * + * Results: + * A posix error number. + * + * Side effects: + * Allocates memory. Arbitrary, as it calls upon a script. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectBlock( + ClientData clientData, + int nonblocking) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + + /* + * Transformations simply record the blocking mode in their C level + * structure for use by --> ReflectInput. The Tcl level doesn't see this + * information or change. As such thread forwarding is not required. + */ + + rtPtr->nonblocking = nonblocking; + return EOK; +} + +/* + *---------------------------------------------------------------------- + * + * ReflectSetOption -- + * + * This function is invoked to configure a channel option. + * + * Results: + * A standard Tcl result code. + * + * Side effects: + * Arbitrary, per the parent channel. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectSetOption( + ClientData clientData, /* Channel to query */ + Tcl_Interp *interp, /* Interpreter to leave error messages in */ + const char *optionName, /* Name of requested option */ + const char *newValue) /* The new value */ +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + + /* + * Transformations have no options. Thus the call is passed down unchanged + * to the parent channel for processing. Its results are passed back + * unchanged as well. This all happens in the thread we are in. As the Tcl + * level is not involved there is no need for thread forwarding. + */ + + Tcl_DriverSetOptionProc *setOptionProc = + Tcl_ChannelSetOptionProc (Tcl_GetChannelType (rtPtr->parent)); + + if (setOptionProc != NULL) { + return (*setOptionProc) (Tcl_GetChannelInstanceData (rtPtr->parent), + interp, optionName, newValue); + } else { + return TCL_ERROR; + } +} + +/* + *---------------------------------------------------------------------- + * + * ReflectGetOption -- + * + * This function is invoked to retrieve all or a channel options. + * + * Results: + * A standard Tcl result code. + * + * Side effects: + * Arbitrary, per the parent channel. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectGetOption( + ClientData clientData, /* Channel to query */ + Tcl_Interp *interp, /* Interpreter to leave error messages in */ + const char *optionName, /* Name of reuqested option */ + Tcl_DString *dsPtr) /* String to place the result into */ +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + + /* + * Transformations have no options. Thus the call is passed down unchanged + * to the parent channel for processing. Its results are passed back + * unchanged as well. This all happens in the thread we are in. As the Tcl + * level is not involved there is no need for thread forwarding. + * + * Note that the parent not having a driver for option retrieval is not an + * immediate error. A query for all options is ok. Only a request for a + * specific option has to fail. + */ + + Tcl_DriverGetOptionProc *getOptionProc = + Tcl_ChannelGetOptionProc (Tcl_GetChannelType (rtPtr->parent)); + + if (getOptionProc != NULL) { + return (*getOptionProc) (Tcl_GetChannelInstanceData (rtPtr->parent), + interp, optionName, dsPtr); + } else if (optionName == (char*) NULL) { + return TCL_OK; + } else { + return TCL_ERROR; + } +} + +/* + *---------------------------------------------------------------------- + * + * ReflectHandle -- + * + * This function is invoked to retrieve the associated file handle. + * + * Results: + * A standard Tcl result code. + * + * Side effects: + * Arbitrary, per the parent channel. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectHandle( + ClientData clientData, + int direction, + ClientData* handlePtr) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + + /* + * Transformations have no handle of their own. As such we simply query + * the parent channel for it. This way the qery will ripple down through + * all transformations until reaches the base channel. Which then returns + * its handle, or fails. The former will then ripple up the stack. + * + * This all happens in the thread we are in. As the Tcl level is not + * involved no forwarding is required. + */ + + return Tcl_GetChannelHandle (rtPtr->parent, direction, handlePtr); +} +/* + *---------------------------------------------------------------------- + * + * ReflectNotify -- + * + * This function is invoked to reported incoming events. + * + * Results: + * A standard Tcl result code. + * + * Side effects: + * Arbitrary, per the parent channel. + * + *---------------------------------------------------------------------- + */ + +static int +ReflectNotify( + ClientData clientData, + int mask) +{ + ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + + /* + * An event occured in the underlying channel. + * + * We delete our timer. It was not fired, yet we are here, so the channel + * below generated such an event and we don't have to. The renewal of the + * interest after the execution of channel handlers will eventually cause + * us to recreate the timer (in ReflectWatch). + */ + + TimerKill (rtPtr); + + /* + * Pass to higher layers. + */ + + return mask; +} + +/* + * Helpers. ========================================================= + */ + + +/* + *---------------------------------------------------------------------- + * + * DecodeEventMask -- + * + * This function takes an internal bitmask of events and constructs the + * equivalent list of event items. + * + * Results: + * A Tcl_Obj reference. The object will have a refCount of one. The user + * has to decrement it to release the object. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + * DUPLICATE of 'DecodeEventMask' in tclIORChan.c + */ + +static Tcl_Obj * +DecodeEventMask( + int mask) +{ + register const char *eventStr; + Tcl_Obj *evObj; + + switch (mask & RANDW) { + case RANDW: + eventStr = "read write"; + break; + case TCL_READABLE: + eventStr = "read"; + break; + case TCL_WRITABLE: + eventStr = "write"; + break; + default: + eventStr = ""; + break; + } + + evObj = Tcl_NewStringObj(eventStr, -1); + Tcl_IncrRefCount(evObj); + return evObj; +} + +/* + *---------------------------------------------------------------------- + * + * NewReflectedTransform -- + * + * This function is invoked to allocate and initialize the instance data + * of a new reflected channel. + * + * Results: + * A heap-allocated channel instance. + * + * Side effects: + * Allocates memory. + * + *---------------------------------------------------------------------- + */ + +static ReflectedTransform * +NewReflectedTransform( + Tcl_Interp *interp, + Tcl_Obj *cmdpfxObj, + int mode, + Tcl_Obj *handleObj, + Tcl_Channel parentChan) +{ + ReflectedTransform *rtPtr; + int listc; + Tcl_Obj **listv; + int i; + + rtPtr = (ReflectedTransform *) ckalloc(sizeof(ReflectedTransform)); + + /* rtPtr->chan: Assigned by caller. Dummy data here. */ + /* rtPtr->methods: Assigned by caller. Dummy data here. */ + + rtPtr->chan = NULL; + rtPtr->methods = 0; +#ifdef TCL_THREADS + rtPtr->thread = Tcl_GetCurrentThread(); +#endif + rtPtr->parent = parentChan; + rtPtr->interp = interp; + rtPtr->handle = handleObj; + Tcl_IncrRefCount(handleObj); + rtPtr->timer = (Tcl_TimerToken) NULL; + rtPtr->mode = 0; + rtPtr->readIsDrained = 0; + rtPtr->nonblocking = + (((Channel*) parentChan)->state->flags & CHANNEL_NONBLOCKING); + /* Query parent for current blocking mode. */ + + ResultInit (&rtPtr->result); + + /* + * Method placeholder. + */ + + /* ASSERT: cmdpfxObj is a Tcl List */ + + Tcl_ListObjGetElements(interp, cmdpfxObj, &listc, &listv); + + /* + * See [==] as well. + * Storage for the command prefix and the additional words required for + * the invocation of methods in the command handler. + * + * listv [0] [listc-1] | [listc] [listc+1] | + * argv [0] ... [.] | [argc-2] [argc-1] | [argc] [argc+2] + * cmd ... pfx | method chan | detail1 detail2 + */ + + rtPtr->argc = listc + 2; + rtPtr->argv = (Tcl_Obj**) ckalloc(sizeof(Tcl_Obj*) * (listc+4)); + + /* + * Duplicate object references. + */ + + for (i=0; iargv[i] = listv[i]; + Tcl_IncrRefCount(word); + } + + i++; /* Skip placeholder for method */ + + /* + * See [x] in FreeReflectedTransform for release + */ + rtPtr->argv[i] = handleObj; + Tcl_IncrRefCount(handleObj); + + /* + * The next two objects are kept empty, varying arguments. + */ + + /* + * Initialization complete. + */ + + return rtPtr; +} + +/* + *---------------------------------------------------------------------- + * + * NextHandle -- + * + * This function is invoked to generate a channel handle for a new + * reflected channel. + * + * Results: + * A Tcl_Obj containing the string of the new channel handle. The + * refcount of the returned object is -- zero --. + * + * Side effects: + * May allocate memory. Mutex protected critical section locks out other + * threads for a short time. + * + *---------------------------------------------------------------------- + */ + +static Tcl_Obj * +NextHandle(void) +{ + /* + * Count number of generated reflected channels. Used for id generation. + * Ids are never reclaimed and there is no dealing with wrap around. On + * the other hand, "unsigned long" should be big enough except for + * absolute longrunners (generate a 100 ids per second => overflow will + * occur in 1 1/3 years). + */ + + TCL_DECLARE_MUTEX(rtCounterMutex) + static unsigned long rtCounter = 0; + Tcl_Obj *resObj; + + Tcl_MutexLock(&rtCounterMutex); + resObj = Tcl_ObjPrintf("rt%lu", rtCounter); + rtCounter++; + Tcl_MutexUnlock(&rtCounterMutex); + + return resObj; +} + +static void +FreeReflectedTransform( + ReflectedTransform *rtPtr) +{ + int i, n; + + TimerKill (rtPtr); + ResultClear (&rtPtr->result); + + Tcl_DecrRefCount(rtPtr->handle); + rtPtr->handle = NULL; + + n = rtPtr->argc - 2; + for (i=0; iargv[i]); + } + + /* + * See [x] in NewReflectedTransform for lock + * n+1 = argc-1. + */ + Tcl_DecrRefCount(rtPtr->argv[n+1]); + + ckfree((char*) rtPtr->argv); + ckfree((char*) rtPtr); +} + +/* + *---------------------------------------------------------------------- + * + * InvokeTclMethod -- + * + * This function is used to invoke the Tcl level of a reflected channel. + * It handles all the command assembly, invokation, and generic state and + * result mgmt. It does *not* handle thread redirection; that is the + * responsibility of clients of this function. + * + * Results: + * Result code and data as returned by the method. + * + * Side effects: + * Arbitrary, as it calls upon a Tcl script. + * + *---------------------------------------------------------------------- + * Semi-DUPLICATE of 'InvokeTclMethod' in tclIORChan.c + * - Semi because different structures are used. + * - Still possible to factor out the commonalities into a separate structure. + */ + +static int +InvokeTclMethod( + ReflectedTransform *rtPtr, + const char *method, + Tcl_Obj *argOneObj, /* NULL'able */ + Tcl_Obj *argTwoObj, /* NULL'able */ + Tcl_Obj **resultObjPtr) /* NULL'able */ +{ + int cmdc; /* #words in constructed command */ + Tcl_Obj *methObj = NULL; /* Method name in object form */ + Tcl_InterpState sr; /* State of handler interp */ + int result; /* Result code of method invokation */ + Tcl_Obj *resObj = NULL; /* Result of method invokation. */ + + if (!rtPtr->interp) { + /* + * The transform is marked as dead. Bail out immediately, with an + * appropriate error. + */ + + if (resultObjPtr != NULL) { + resObj = Tcl_NewStringObj(msg_dstlost,-1); + *resultObjPtr = resObj; + Tcl_IncrRefCount(resObj); + } + return TCL_ERROR; + } + + /* + * NOTE (5): Decide impl. issue: Cache objects with method names? + * Requires TSD data as reflections can be created in many different + * threads. + * NO: Caching of command resolutions means storage per channel. + */ + + /* + * Insert method into the pre-allocated area, after the command prefix, + * before the channel id. + */ + + methObj = Tcl_NewStringObj(method, -1); + Tcl_IncrRefCount(methObj); + rtPtr->argv[rtPtr->argc - 2] = methObj; + + /* + * Append the additional argument containing method specific details + * behind the channel id. If specified. + */ + + cmdc = rtPtr->argc; + if (argOneObj) { + Tcl_IncrRefCount(argOneObj); + rtPtr->argv[cmdc] = argOneObj; + cmdc++; + if (argTwoObj) { + Tcl_IncrRefCount(argTwoObj); + rtPtr->argv[cmdc] = argTwoObj; + cmdc++; + } + } + + /* + * And run the handler... This is done in auch a manner which leaves any + * existing state intact. + */ + + sr = Tcl_SaveInterpState(rtPtr->interp, 0 /* Dummy */); + Tcl_Preserve(rtPtr->interp); + result = Tcl_EvalObjv(rtPtr->interp, cmdc, rtPtr->argv, TCL_EVAL_GLOBAL); + + /* + * We do not try to extract the result information if the caller has no + * interest in it. I.e. there is no need to put effort into creating + * something which is discarded immediately after. + */ + + if (resultObjPtr) { + if (result == TCL_OK) { + /* + * Ok result taken as is, also if the caller requests that there + * is no capture. + */ + + resObj = Tcl_GetObjResult(rtPtr->interp); + } else { + /* + * Non-ok result is always treated as an error. We have to capture + * the full state of the result, including additional options. + * + * This is complex and ugly, and would be completely unnecessary + * if we only added support for a TCL_FORBID_EXCEPTIONS flag. + */ + if (result != TCL_ERROR) { + Tcl_Obj *cmd = Tcl_NewListObj(cmdc, rtPtr->argv); + int cmdLen; + const char *cmdString = Tcl_GetStringFromObj(cmd, &cmdLen); + + Tcl_IncrRefCount(cmd); + Tcl_ResetResult(rtPtr->interp); + Tcl_SetObjResult(rtPtr->interp, Tcl_ObjPrintf( + "chan handler returned bad code: %d", result)); + Tcl_LogCommandInfo(rtPtr->interp, cmdString, cmdString, cmdLen); + Tcl_DecrRefCount(cmd); + result = TCL_ERROR; + } + Tcl_AppendObjToErrorInfo(rtPtr->interp, Tcl_ObjPrintf( + "\n (chan handler subcommand \"%s\")", method)); + resObj = MarshallError(rtPtr->interp); + } + Tcl_IncrRefCount(resObj); + } + Tcl_RestoreInterpState(rtPtr->interp, sr); + Tcl_Release(rtPtr->interp); + + /* + * Cleanup of the dynamic parts of the command. + */ + + Tcl_DecrRefCount(methObj); + if (argOneObj) { + Tcl_DecrRefCount(argOneObj); + if (argTwoObj) { + Tcl_DecrRefCount(argTwoObj); + } + } + + /* + * The resObj has a ref count of 1 at this location. This means that the + * caller of InvokeTclMethod has to dispose of it (but only if it was + * returned to it). + */ + + if (resultObjPtr != NULL) { + *resultObjPtr = resObj; + } + + /* + * There no need to handle the case where nothing is returned, because for + * that case resObj was not set anyway. + */ + + return result; +} + +/* + *---------------------------------------------------------------------- + * + * GetReflectedTransformMap -- + * + * Gets and potentially initializes the reflected channel map for an + * interpreter. + * + * Results: + * A pointer to the map created, for use by the caller. + * + * Side effects: + * Initializes the reflected channel map for an interpreter. + * + *---------------------------------------------------------------------- + */ + +static ReflectedTransformMap * +GetReflectedTransformMap( + Tcl_Interp *interp) +{ + ReflectedTransformMap *rtmPtr = Tcl_GetAssocData(interp, RTMKEY, NULL); + + if (rtmPtr == NULL) { + rtmPtr = (ReflectedTransformMap *) ckalloc(sizeof(ReflectedTransformMap)); + Tcl_InitHashTable(&rtmPtr->map, TCL_STRING_KEYS); + Tcl_SetAssocData(interp, RTMKEY, + (Tcl_InterpDeleteProc *) DeleteReflectedTransformMap, rtmPtr); + } + return rtmPtr; +} + +/* + *---------------------------------------------------------------------- + * + * DeleteReflectedTransformMap -- + * + * Deletes the channel table for an interpreter, closing any open + * channels whose refcount reaches zero. This procedure is invoked when + * an interpreter is deleted, via the AssocData cleanup mechanism. + * + * Results: + * None. + * + * Side effects: + * Deletes the hash table of channels. May close channels. May flush + * output on closed channels. Removes any channeEvent handlers that were + * registered in this interpreter. + * + *---------------------------------------------------------------------- + */ + +static void +DeleteReflectedTransformMap( + ClientData clientData, /* The per-interpreter data structure. */ + Tcl_Interp *interp) /* The interpreter being deleted. */ +{ + ReflectedTransformMap *rtmPtr; /* The map */ + Tcl_HashSearch hSearch; /* Search variable. */ + Tcl_HashEntry *hPtr; /* Search variable. */ + ReflectedTransform *rtPtr; + +#ifdef TCL_THREADS + ForwardingResult *resultPtr; + ForwardingEvent *evPtr; + ForwardParam *paramPtr; +#endif + + /* + * Delete all entries. The channels may have been closed already, or will + * be closed later, by the standard IO finalization of an interpreter + * under destruction. Except for the channels which were moved to a + * different interpreter and/or thread. They do not exist from the IO + * systems point of view and will not get closed. Therefore mark all as + * dead so that any future access will cause a proper error. For channels + * in a different thread we actually do the same as + * DeleteThreadReflectedTransformMap(), just restricted to the channels of + * this interp. + */ + + rtmPtr = clientData; + for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch); + hPtr != NULL; + hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch)) { + rtPtr = (ReflectedTransform *) Tcl_GetHashValue (hPtr); + + //fprintf(stdout,"[%ld] dd t-rcm %p /h %p /rt %p\n", (long)Tcl_GetCurrentThread(),rtmPtr,hPtr,rtPtr);fflush(stdout); + + + rtPtr->interp = NULL; + Tcl_DeleteHashEntry(hPtr); + } + Tcl_DeleteHashTable(&rtmPtr->map); + ckfree((char *) &rtmPtr->map); + +#ifdef TCL_THREADS + /* + * The origin interpreter for one or more reflected channels is gone. + */ + + /* + * Go through the list of pending results and cancel all whose events were + * destined for this interpreter. While this is in progress we block any + * other access to the list of pending results. + */ + + Tcl_MutexLock(&rtForwardMutex); + + for (resultPtr = forwardList; + resultPtr != NULL; + resultPtr = resultPtr->nextPtr) { + if (resultPtr->dsti != interp) { + /* + * Ignore results/events for other interpreters. + */ + + continue; + } + + /* + * The receiver for the event exited, before processing the event. We + * detach the result now, wake the originator up and signal failure. + */ + + evPtr = resultPtr->evPtr; + paramPtr = evPtr->param; + + evPtr->resultPtr = NULL; + resultPtr->evPtr = NULL; + resultPtr->result = TCL_ERROR; + + ForwardSetStaticError(paramPtr, msg_send_dstlost); + + Tcl_ConditionNotify(&resultPtr->done); + } + + /* + * Get the map of all channels handled by the current thread. This is a + * ReflectedTransformMap, but on a per-thread basis, not per-interp. Go + * through the channels and remove all which were handled by this + * interpreter. They have already been marked as dead. + */ + + rtmPtr = GetThreadReflectedTransformMap(); + for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch); + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&hSearch)) { + rtPtr = (ReflectedTransform *) Tcl_GetHashValue (hPtr); + + if (rtPtr->interp != interp) { + /* + * Ignore entries for other interpreters. + */ + + continue; + } + + Tcl_DeleteHashEntry(hPtr); + } + + Tcl_MutexUnlock(&rtForwardMutex); +#endif +} + +#ifdef TCL_THREADS +/* + *---------------------------------------------------------------------- + * + * GetThreadReflectedTransformMap -- + * + * Gets and potentially initializes the reflected channel map for a + * thread. + * + * Results: + * A pointer to the map created, for use by the caller. + * + * Side effects: + * Initializes the reflected channel map for a thread. + * + *---------------------------------------------------------------------- + */ + +static ReflectedTransformMap * +GetThreadReflectedTransformMap(void) +{ + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + + if (!tsdPtr->rtmPtr) { + tsdPtr->rtmPtr = (ReflectedTransformMap *) + ckalloc(sizeof(ReflectedTransformMap)); + Tcl_InitHashTable(&tsdPtr->rtmPtr->map, TCL_STRING_KEYS); + Tcl_CreateThreadExitHandler(DeleteThreadReflectedTransformMap, NULL); + } + + return tsdPtr->rtmPtr; +} + +/* + *---------------------------------------------------------------------- + * + * DeleteThreadReflectedTransformMap -- + * + * Deletes the channel table for a thread. This procedure is invoked when + * a thread is deleted. The channels have already been marked as dead, in + * DeleteReflectedTransformMap(). + * + * Results: + * None. + * + * Side effects: + * Deletes the hash table of channels. + * + *---------------------------------------------------------------------- + */ + +static void +DeleteThreadReflectedTransformMap( + ClientData clientData) /* The per-thread data structure. */ +{ + Tcl_HashSearch hSearch; /* Search variable. */ + Tcl_HashEntry *hPtr; /* Search variable. */ + Tcl_ThreadId self = Tcl_GetCurrentThread(); + ReflectedTransformMap *rtmPtr; /* The map */ + ForwardingResult *resultPtr; + + /* + * The origin thread for one or more reflected channels is gone. + * NOTE: If this function is called due to a thread getting killed the + * per-interp DeleteReflectedTransformMap is apparently not called. + */ + + /* + * Go through the list of pending results and cancel all whose events were + * destined for this thread. While this is in progress we block any + * other access to the list of pending results. + */ + + Tcl_MutexLock(&rtForwardMutex); + + for (resultPtr = forwardList; + resultPtr != NULL; + resultPtr = resultPtr->nextPtr) { + ForwardingEvent *evPtr; + ForwardParam *paramPtr; + + if (resultPtr->dst != self) { + /* + * Ignore results/events for other threads. + */ + + continue; + } + + /* + * The receiver for the event exited, before processing the event. We + * detach the result now, wake the originator up and signal failure. + */ + + evPtr = resultPtr->evPtr; + paramPtr = evPtr->param; + + evPtr->resultPtr = NULL; + resultPtr->evPtr = NULL; + resultPtr->result = TCL_ERROR; + + ForwardSetStaticError(paramPtr, msg_send_dstlost); + + Tcl_ConditionNotify(&resultPtr->done); + } + + /* + * Get the map of all channels handled by the current thread. This is a + * ReflectedTransformMap, but on a per-thread basis, not per-interp. Go + * through the channels, remove all, mark them as dead. + */ + + rtmPtr = GetThreadReflectedTransformMap(); + for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch); + hPtr != NULL; + hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch)) { + ReflectedTransform *rtPtr = (ReflectedTransform *) Tcl_GetHashValue(hPtr); + + rtPtr->interp = NULL; + Tcl_DeleteHashEntry(hPtr); + } + + Tcl_MutexUnlock(&rtForwardMutex); +} + +static void +ForwardOpToOwnerThread( + ReflectedTransform *rtPtr, /* Channel instance */ + ForwardedOperation op, /* Forwarded driver operation */ + const VOID *param) /* Arguments */ +{ + Tcl_ThreadId dst = rtPtr->thread; + ForwardingEvent *evPtr; + ForwardingResult *resultPtr; + int result; + + /* + * We gather the lock early. This allows us to check the liveness of the + * channel without interference from DeleteThreadReflectedTransformMap(). + */ + + Tcl_MutexLock(&rtForwardMutex); + + if (rtPtr->interp == NULL) { + /* + * The channel is marked as dead. Bail out immediately, with an + * appropriate error. Do not forget to unlock the mutex on this path. + */ + + ForwardSetStaticError((ForwardParam *) param, msg_send_dstlost); + Tcl_MutexUnlock(&rtForwardMutex); + return; + } + + /* + * Create and initialize the event and data structures. + */ + + evPtr = (ForwardingEvent *) ckalloc(sizeof(ForwardingEvent)); + resultPtr = (ForwardingResult *) ckalloc(sizeof(ForwardingResult)); + + evPtr->event.proc = ForwardProc; + evPtr->resultPtr = resultPtr; + evPtr->op = op; + evPtr->rtPtr = rtPtr; + evPtr->param = (ForwardParam *) param; + + resultPtr->src = Tcl_GetCurrentThread(); + resultPtr->dst = dst; + resultPtr->done = NULL; + resultPtr->result = -1; + resultPtr->evPtr = evPtr; + + /* + * Now execute the forward. + */ + + TclSpliceIn(resultPtr, forwardList); + /* Do not unlock here. That is done by the ConditionWait */ + + /* + * Ensure cleanup of the event if the origin thread exits while this event + * is pending or in progress. Exit of the destination thread is handled by + * DeleteThreadReflectionChannelMap(), this is set up by + * GetThreadReflectedTransformMap(). This is what we use the 'forwardList' + * (see above) for. + */ + + Tcl_CreateThreadExitHandler(SrcExitProc, (ClientData) evPtr); + + /* + * Queue the event and poke the other thread's notifier. + */ + + Tcl_ThreadQueueEvent(dst, (Tcl_Event *)evPtr, TCL_QUEUE_TAIL); + Tcl_ThreadAlert(dst); + + /* + * (*) Block until the other thread has either processed the transfer or + * rejected it. + */ + + while (resultPtr->result < 0) { + /* + * NOTE (1): Is it possible that the current thread goes away while + * waiting here? IOW Is it possible that "SrcExitProc" is called + * while we are here? See complementary note (2) in "SrcExitProc" + * + * The ConditionWait unlocks the mutex during the wait and relocks it + * immediately after. + */ + + Tcl_ConditionWait(&resultPtr->done, &rtForwardMutex, NULL); + } + + /* + * Unlink result from the forwarder list. No need to lock. Either still + * locked, or locked by the ConditionWait + */ + + TclSpliceOut(resultPtr, forwardList); + + resultPtr->nextPtr = NULL; + resultPtr->prevPtr = NULL; + + Tcl_MutexUnlock(&rtForwardMutex); + Tcl_ConditionFinalize(&resultPtr->done); + + /* + * Kill the cleanup handler now, and the result structure as well, before + * returning the success code. + * + * Note: The event structure has already been deleted by the destination + * notifier, after it serviced the event. + */ + + Tcl_DeleteThreadExitHandler(SrcExitProc, (ClientData) evPtr); + + result = resultPtr->result; + ckfree((char*) resultPtr); +} + +static int +ForwardProc( + Tcl_Event *evGPtr, + int mask) +{ + /* + * Notes regarding access to the referenced data. + * + * In principle the data belongs to the originating thread (see + * evPtr->src), however this thread is currently blocked at (*), i.e. + * quiescent. Because of this we can treat the data as belonging to us, + * without fear of race conditions. I.e. we can read and write as we like. + * + * The only thing we cannot be sure of is the resultPtr. This can be be + * NULLed if the originating thread went away while the event is handled + * here now. + */ + + ForwardingEvent *evPtr = (ForwardingEvent *) evGPtr; + ForwardingResult *resultPtr = evPtr->resultPtr; + ReflectedTransform *rtPtr = evPtr->rtPtr; + Tcl_Interp *interp = rtPtr->interp; + ForwardParam *paramPtr = evPtr->param; + Tcl_Obj *resObj = NULL; /* Interp result of InvokeTclMethod */ + ReflectedTransformMap* rtmPtr; /* Map of reflected channels with handlers in this interp */ + Tcl_HashEntry* hPtr; /* Entry in the above map */ + + /* + * Ignore the event if no one is waiting for its result anymore. + */ + + if (!resultPtr) { + return 1; + } + + paramPtr->base.code = TCL_OK; + paramPtr->base.msgStr = NULL; + paramPtr->base.mustFree = 0; + + switch (evPtr->op) { + /* + * The destination thread for the following operations is + * rtPtr->thread, which contains rtPtr->interp, the interp we have to + * call upon for the driver. + */ + + case ForwardedClose: + /* + * No parameters/results. + */ + + if (InvokeTclMethod(rtPtr, "finalize", NULL, NULL, &resObj) != TCL_OK) { + ForwardSetObjError(paramPtr, resObj); + } + + /* + * Freeing is done here, in the origin thread, because the argv[] + * objects belong to this thread. Deallocating them in a different + * thread is not allowed + */ + + /* + * Remove the channel from the map before releasing the memory, to + * prevent future accesses (like by 'postevent') from finding and + * dereferencing a dangling pointer. + */ + + rtmPtr = GetReflectedTransformMap (interp); + hPtr = Tcl_FindHashEntry (&rtmPtr->map, + Tcl_GetString(rtPtr->handle)); + Tcl_DeleteHashEntry (hPtr); + + /* + * In a threaded interpreter we manage a per-thread map as well, to + * allow us to survive if the script level pulls the rug out under a + * channel by deleting the owning thread. + */ + + rtmPtr = GetThreadReflectedTransformMap(); + hPtr = Tcl_FindHashEntry (&rtmPtr->map, + Tcl_GetString(rtPtr->handle)); + Tcl_DeleteHashEntry (hPtr); + FreeReflectedTransform(rtPtr); + break; + + case ForwardedInput: { + Tcl_Obj *bufObj = Tcl_NewByteArrayObj((unsigned char *) paramPtr->transform.buf, + paramPtr->transform.size); + + if (InvokeTclMethod(rtPtr, "read", bufObj, NULL, &resObj) != TCL_OK) { + ForwardSetObjError(paramPtr, resObj); + paramPtr->transform.size = -1; + } else { + /* + * Process a regular return. Contains the transformation result. + * Sent it back to the request originator. + */ + + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + + paramPtr->transform.size = bytec; + + if (bytec > 0) { + paramPtr->transform.buf = ckalloc (bytec); + memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); + } else { + paramPtr->transform.buf = NULL; + } + } + break; + } + + case ForwardedOutput: { + Tcl_Obj *bufObj = Tcl_NewByteArrayObj((unsigned char *) paramPtr->transform.buf, + paramPtr->transform.size); + + if (InvokeTclMethod(rtPtr, "write", bufObj, NULL, &resObj) != TCL_OK) { + ForwardSetObjError(paramPtr, resObj); + paramPtr->transform.size = -1; + } else { + /* + * Process a regular return. Contains the transformation result. + * Sent it back to the request originator. + */ + + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + + paramPtr->transform.size = bytec; + + if (bytec > 0) { + paramPtr->transform.buf = ckalloc (bytec); + memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); + } else { + paramPtr->transform.buf = NULL; + } + } + break; + } + + case ForwardedDrain: { + if (InvokeTclMethod(rtPtr, "drain", NULL, NULL, &resObj) != TCL_OK) { + ForwardSetObjError(paramPtr, resObj); + paramPtr->transform.size = -1; + } else { + /* + * Process a regular return. Contains the transformation result. + * Sent it back to the request originator. + */ + + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + + paramPtr->transform.size = bytec; + + if (bytec > 0) { + paramPtr->transform.buf = ckalloc (bytec); + memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); + } else { + paramPtr->transform.buf = NULL; + } + } + break; + } + + case ForwardedFlush: { + if (InvokeTclMethod(rtPtr, "flush", NULL, NULL, &resObj) != TCL_OK) { + ForwardSetObjError(paramPtr, resObj); + paramPtr->transform.size = -1; + } else { + /* + * Process a regular return. Contains the transformation result. + * Sent it back to the request originator. + */ + + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + + paramPtr->transform.size = bytec; + + if (bytec > 0) { + paramPtr->transform.buf = ckalloc (bytec); + memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); + } else { + paramPtr->transform.buf = NULL; + } + } + break; + } + + case ForwardedClear: { + (void) InvokeTclMethod(rtPtr, "clear", NULL, NULL, NULL); + break; + } + + case ForwardedLimit: { + Tcl_Obj* resObj; + + if (InvokeTclMethod(rtPtr, "limit?", NULL, NULL, &resObj) != TCL_OK) { + ForwardSetObjError(paramPtr, resObj); + paramPtr->limit.max = -1; + } else if (Tcl_GetIntFromObj(interp, resObj, ¶mPtr->limit.max) != TCL_OK) { + ForwardSetObjError(paramPtr, MarshallError(interp)); + paramPtr->limit.max = -1; + } + + Tcl_DecrRefCount(resObj); + break; + } + + default: + /* + * Bad operation code. + */ + Tcl_Panic("Bad operation code in ForwardProc"); + break; + } + + /* + * Remove the reference we held on the result of the invoke, if we had + * such. + */ + + if (resObj != NULL) { + Tcl_DecrRefCount(resObj); + } + + if (resultPtr) { + /* + * Report the forwarding result synchronously to the waiting caller. + * This unblocks (*) as well. This is wrapped into a conditional + * because the caller may have exited in the mean time. + */ + + Tcl_MutexLock(&rtForwardMutex); + resultPtr->result = TCL_OK; + Tcl_ConditionNotify(&resultPtr->done); + Tcl_MutexUnlock(&rtForwardMutex); + } + + return 1; +} + +static void +SrcExitProc( + ClientData clientData) +{ + ForwardingEvent *evPtr = (ForwardingEvent *) clientData; + ForwardingResult *resultPtr; + ForwardParam *paramPtr; + + /* + * NOTE (2): Can this handler be called with the originator blocked? + */ + + /* + * The originator for the event exited. It is not sure if this can happen, + * as the originator should be blocked at (*) while the event is in + * transit/pending. + * + * We make sure that the event cannot refer to the result anymore, remove + * it from the list of pending results and free the structure. Locking the + * access ensures that we cannot get in conflict with "ForwardProc", + * should it already execute the event. + */ + + Tcl_MutexLock(&rtForwardMutex); + + resultPtr = evPtr->resultPtr; + paramPtr = evPtr->param; + + evPtr->resultPtr = NULL; + resultPtr->evPtr = NULL; + resultPtr->result = TCL_ERROR; + + ForwardSetStaticError(paramPtr, msg_send_originlost); + + /* + * See below: TclSpliceOut(resultPtr, forwardList); + */ + + Tcl_MutexUnlock(&rtForwardMutex); + + /* + * This unlocks (*). The structure will be spliced out and freed by + * "ForwardProc". Maybe. + */ + + Tcl_ConditionNotify(&resultPtr->done); +} + +static void +ForwardSetObjError( + ForwardParam *paramPtr, + Tcl_Obj *obj) +{ + int len; + const char *msgStr = Tcl_GetStringFromObj(obj, &len); + + len++; + ForwardSetDynamicError(paramPtr, ckalloc((unsigned) len)); + memcpy(paramPtr->base.msgStr, msgStr, (unsigned) len); +} +#endif + +/* + *---------------------------------------------------------------------- + * + * TimerKill -- + * + * Timer management. Removes the internal timer + * if it exists. + * + * Sideeffects: + * See above. + * + * Result: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +TimerKill (ReflectedTransform* rtPtr) +{ + if (rtPtr->timer == (Tcl_TimerToken) NULL) return; + + /* Delete an existing flush-out timer, prevent it from firing on a + * removed/dead channel. + */ + + Tcl_DeleteTimerHandler (rtPtr->timer); + rtPtr->timer = (Tcl_TimerToken) NULL; +} + +/* + *---------------------------------------------------------------------- + * + * TimerSetup -- + * + * Timer management. Creates the internal timer + * if it does not exist. + * + * Sideeffects: + * See above. + * + * Result: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +TimerSetup (ReflectedTransform* rtPtr) +{ + if (rtPtr->timer != (Tcl_TimerToken) NULL) return; + + rtPtr->timer = Tcl_CreateTimerHandler (FLUSH_DELAY, TimerRun, + (ClientData) rtPtr); +} + +/* + *---------------------------------------------------------------------- + * + * TimerRun -- + * + * Called by the notifier (-> timer) to flush out + * information waiting in channel buffers. + * + * Sideeffects: + * As of 'Tcl_NotifyChannel'. + * + * Result: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +TimerRun (ClientData clientData) +{ + ReflectedTransform* rtPtr = (ReflectedTransform*) clientData; + + rtPtr->timer = (Tcl_TimerToken) NULL; + Tcl_NotifyChannel (rtPtr->chan, TCL_READABLE); +} + + +/* + *---------------------------------------------------------------------- + * + * ResultInit -- + * + * Initializes the specified buffer structure. The + * structure will contain valid information for an + * emtpy buffer. + * + * Sideeffects: + * See above. + * + * Result: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +ResultInit (ResultBuffer* r) /* Reference to the structure to initialize */ +{ + r->used = 0; + r->allocated = 0; + r->buf = (unsigned char*) NULL; +} +/* + *---------------------------------------------------------------------- + * + * ResultClear -- + * + * Deallocates any memory allocated by 'ResultAdd'. + * + * Sideeffects: + * See above. + * + * Result: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +ResultClear (ResultBuffer* r) /* Reference to the buffer to clear out */ +{ + r->used = 0; + + if (!r->allocated) return; + + Tcl_Free ((char*) r->buf); + r->buf = (unsigned char*) NULL; + r->allocated = 0; +} + +/* + *---------------------------------------------------------------------- + * + * ResultAdd -- + * + * Adds the bytes in the specified array to the + * buffer, by appending it. + * + * Sideeffects: + * See above. + * + * Result: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +ResultAdd (r, buf, toWrite) + ResultBuffer* r; /* The buffer to extend */ + unsigned char* buf; /* The buffer to read from */ + int toWrite; /* The number of bytes in 'buf' */ +{ + if ((r->used + toWrite + 1) > r->allocated) { + /* Extension of the internal buffer is required. + * NOTE: Currently linear. Should be doubling to amortize. + */ + + if (r->allocated == 0) { + r->allocated = toWrite + RB_INCREMENT; + r->buf = (unsigned char*) Tcl_Alloc (r->allocated); + } else { + r->allocated += toWrite + RB_INCREMENT; + r->buf = (unsigned char*) Tcl_Realloc((char*) r->buf, + r->allocated); + } + } + + /* now copy data */ + memcpy (r->buf + r->used, buf, toWrite); + r->used += toWrite; +} + +/* + *---------------------------------------------------------------------- + * + * ResultCopy -- + * + * Copies the requested number of bytes from the + * buffer into the specified array and removes them + * from the buffer afterward. Copies less if there + * is not enough data in the buffer. + * + * Sideeffects: + * See above. + * + * Result: + * The number of actually copied bytes, + * possibly less than 'toRead'. + * + *---------------------------------------------------------------------- + */ + +static int +ResultCopy (ResultBuffer* r, /* The buffer to read from */ + unsigned char* buf, /* The buffer to copy into */ + int toRead) /* Number of requested bytes */ +{ + int copied; + + if (r->used == 0) { + /* Nothing to copy in the case of an empty buffer. + */ + + copied = 0; + goto done; + } + + if (r->used == toRead) { + /* We have just enough. Copy everything to the caller. + */ + + memcpy ((VOID*) buf, (VOID*) r->buf, toRead); + r->used = 0; + copied = toRead; + goto done; + } + + if (r->used > toRead) { + /* The internal buffer contains more than requested. + * Copy the requested subset to the caller, and shift + * the remaining bytes down. + */ + + memcpy ((VOID*) buf, (VOID*) r->buf, toRead); + memmove ((VOID*) r->buf, (VOID*) (r->buf + toRead), r->used - toRead); + + r->used -= toRead; + copied = toRead; + goto done; + } + + /* There is not enough in the buffer to satisfy the caller, so + * take everything. + */ + + memcpy ((VOID*) buf, (VOID*) r->buf, r->used); + toRead = r->used; + r->used = 0; + copied = toRead; + + /* -- common postwork code ------- */ + + done: + return copied; +} + + +static int +TransformRead ( + ReflectedTransform* rtPtr, + int* errorCodePtr, + unsigned char* buf, + int toRead) +{ + Tcl_Obj* bufObj; + Tcl_Obj* resObj; + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + + /* + * Are we in the correct thread? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + p.transform.buf = buf; + p.transform.size = toRead; + + ForwardOpToOwnerThread(rtPtr, ForwardedInput, &p); + + if (p.base.code != TCL_OK) { + PassReceivedError(rtPtr->chan, &p); + *errorCodePtr = EINVAL; + return 0; + } else { + *errorCodePtr = EOK; + } + + ResultAdd (&rtPtr->result, p.transform.buf, p.transform.size); + ckfree (p.transform.buf); + } else { +#endif + /* ASSERT: rtPtr->method & FLAG(METH_READ) */ + /* ASSERT: rtPtr->mode & TCL_READABLE */ + + bufObj = Tcl_NewByteArrayObj((unsigned char *) buf, toRead); + if (InvokeTclMethod(rtPtr, "read", bufObj, NULL, &resObj) != TCL_OK) { + Tcl_SetChannelError(rtPtr->chan, resObj); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + *errorCodePtr = EINVAL; + return 0; + } + + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + ResultAdd (&rtPtr->result, bytev, bytec); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ +#ifdef TCL_THREADS + } +#endif + + return 1; +} + +static int +TransformWrite ( + ReflectedTransform* rtPtr, + int* errorCodePtr, + unsigned char* buf, + int toWrite) +{ + Tcl_Obj *bufObj; + Tcl_Obj *resObj; + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + int res; + + /* + * Are we in the correct thread? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + p.transform.buf = buf; + p.transform.size = toWrite; + + ForwardOpToOwnerThread(rtPtr, ForwardedOutput, &p); + + if (p.base.code != TCL_OK) { + PassReceivedError(rtPtr->chan, &p); + *errorCodePtr = EINVAL; + return 0; + } else { + *errorCodePtr = EOK; + } + + res = Tcl_WriteRaw (rtPtr->parent, + (char*) p.transform.buf, p.transform.size); + ckfree (p.transform.buf); + } else { +#endif + /* ASSERT: rtPtr->method & FLAG(METH_WRITE) */ + /* ASSERT: rtPtr->mode & TCL_WRITABLE */ + + bufObj = Tcl_NewByteArrayObj((unsigned char *) buf, toWrite); + if (InvokeTclMethod(rtPtr, "write", bufObj, NULL, &resObj) != TCL_OK) { + *errorCodePtr = EINVAL; + Tcl_SetChannelError(rtPtr->chan, resObj); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + return 0; + } + + *errorCodePtr = EOK; + + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + res = Tcl_WriteRaw (rtPtr->parent, (char*) bytev, bytec); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ +#ifdef TCL_THREADS + } +#endif + + if (res < 0) { + *errorCodePtr = EINVAL; + return 0; + } + + return 1; +} + + + +static int +TransformDrain( + ReflectedTransform* rtPtr, + int* errorCodePtr) +{ + Tcl_Obj* resObj; + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + + /* + * Are we in the correct thread? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + ForwardOpToOwnerThread(rtPtr, ForwardedDrain, &p); + + if (p.base.code != TCL_OK) { + PassReceivedError(rtPtr->chan, &p); + *errorCodePtr = EINVAL; + return 0; + } else { + *errorCodePtr = EOK; + } + + ResultAdd (&rtPtr->result, p.transform.buf, p.transform.size); + ckfree (p.transform.buf); + } else { +#endif + if (InvokeTclMethod(rtPtr, "drain", NULL, NULL, &resObj)!=TCL_OK) { + Tcl_SetChannelError(rtPtr->chan, resObj); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + *errorCodePtr = EINVAL; + return 0; + } + + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + ResultAdd (&rtPtr->result, bytev, bytec); + + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + +#ifdef TCL_THREADS + } +#endif + + rtPtr->readIsDrained = 1; + return 1; +} + + +static int +TransformFlush( + ReflectedTransform* rtPtr, + int* errorCodePtr, + int op) +{ + Tcl_Obj* resObj; + int bytec; /* Number of returned bytes */ + unsigned char *bytev; /* Array of returned bytes */ + int res; + + /* + * Are we in the correct thread? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + ForwardOpToOwnerThread(rtPtr, ForwardedFlush, &p); + + if (p.base.code != TCL_OK) { + PassReceivedError(rtPtr->chan, &p); + *errorCodePtr = EINVAL; + return 0; + } else { + *errorCodePtr = EOK; + } + + if (op == FLUSH_WRITE) { + res = Tcl_WriteRaw (rtPtr->parent, + (char*) p.transform.buf, p.transform.size); + } else { + res = 0; + } + ckfree(p.transform.buf); + } else { +#endif + if (InvokeTclMethod(rtPtr, "flush", NULL, NULL, &resObj)!=TCL_OK) { + Tcl_SetChannelError(rtPtr->chan, resObj); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + *errorCodePtr = EINVAL; + return 0; + } + + if (op == FLUSH_WRITE) { + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + res = Tcl_WriteRaw (rtPtr->parent, (char*) bytev, bytec); + } else { + res = 0; + } + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + +#ifdef TCL_THREADS + } +#endif + if (res < 0) { + *errorCodePtr = EINVAL; + return 0; + } + + return 1; +} + +static void +TransformClear ( + ReflectedTransform* rtPtr) +{ + /* + * Are we in the correct thread? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + ForwardOpToOwnerThread(rtPtr, ForwardedClear, &p); + return; + } else { +#endif + /* ASSERT: rtPtr->method & FLAG(METH_READ) */ + /* ASSERT: rtPtr->mode & TCL_READABLE */ + + (void) InvokeTclMethod(rtPtr, "clear", NULL, NULL, NULL); + +#ifdef TCL_THREADS + } +#endif + + rtPtr->readIsDrained = 0; + ResultClear (&rtPtr->result); +} + +static int +TransformLimit ( + ReflectedTransform* rtPtr, + int* errorCodePtr, + int* maxPtr) +{ + Tcl_Obj* resObj; + Tcl_InterpState sr; /* State of handler interp */ + + /* + * Are we in the correct thread? + */ + +#ifdef TCL_THREADS + if (rtPtr->thread != Tcl_GetCurrentThread()) { + ForwardParam p; + + ForwardOpToOwnerThread(rtPtr, ForwardedLimit, &p); + + if (p.base.code != TCL_OK) { + PassReceivedError(rtPtr->chan, &p); + *errorCodePtr = EINVAL; + return 0; + } else { + *errorCodePtr = EOK; + *maxPtr = p.limit.max; + return 1; + } + } +#endif + + /* ASSERT: rtPtr->method & FLAG(METH_WRITE) */ + /* ASSERT: rtPtr->mode & TCL_WRITABLE */ + + if (InvokeTclMethod(rtPtr, "limit?", NULL, NULL, &resObj) != TCL_OK) { + Tcl_SetChannelError(rtPtr->chan, resObj); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + *errorCodePtr = EINVAL; + return 0; + } + + sr = Tcl_SaveInterpState(rtPtr->interp, 0 /* Dummy */); + + if (Tcl_GetIntFromObj(rtPtr->interp, resObj, maxPtr) != TCL_OK) { + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_SetChannelError(rtPtr->chan, MarshallError(rtPtr->interp)); + *errorCodePtr = EINVAL; + + Tcl_RestoreInterpState(rtPtr->interp, sr); + return 0; + } + + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_RestoreInterpState(rtPtr->interp, sr); + return 1; +} + +/* DUPLICATE of HaveVersion() in tclIO.c + *---------------------------------------------------------------------- + * + * HaveVersion -- + * + * Return whether a channel type is (at least) of a given version. + * + * Results: + * True if the minimum version is exceeded by the version actually + * present. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +HaveVersion( + const Tcl_ChannelType *chanTypePtr, + Tcl_ChannelTypeVersion minimumVersion) +{ + Tcl_ChannelTypeVersion actualVersion = Tcl_ChannelVersion(chanTypePtr); + + return (PTR2INT(actualVersion)) >= (PTR2INT(minimumVersion)); +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclInt.h b/generic/tclInt.h index 3ec57b4..3fe993d 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.369 2008/05/31 11:42:14 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.370 2008/06/06 19:46:37 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -2744,6 +2744,10 @@ MODULE_SCOPE int TclChanCreateObjCmd(ClientData clientData, MODULE_SCOPE int TclChanPostEventObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int TclChanPopObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int TclChanPushObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE void TclClockInit(Tcl_Interp *interp); MODULE_SCOPE int TclClockOldscanObjCmd( ClientData clientData, Tcl_Interp *interp, diff --git a/generic/tclVar.c b/generic/tclVar.c index b7bdcaf..6279064 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.162 2008/05/23 21:05:13 andreas_kupries Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.163 2008/06/06 19:46:37 andreas_kupries Exp $ */ #include "tclInt.h" @@ -67,8 +67,10 @@ VarHashCreateVar( #define VarHashFindVar(tablePtr, key) \ VarHashCreateVar((tablePtr), (key), NULL) + #define VarHashInvalidateEntry(varPtr) \ ((varPtr)->flags |= VAR_DEAD_HASH) + #define VarHashDeleteEntry(varPtr) \ Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry)) diff --git a/tests/chan.test b/tests/chan.test index eb09fd7..72eccbb 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chan.test,v 1.11 2007/12/13 15:26:04 dgp Exp $ +# RCS: @(#) $Id: chan.test,v 1.12 2008/06/06 19:46:38 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -24,7 +24,7 @@ test chan-1.1 {chan command general syntax} -body { } -returnCodes error -result "wrong # args: should be \"chan subcommand ?argument ...?\"" test chan-1.2 {chan command general syntax} -body { chan FOOBAR -} -returnCodes error -result "unknown or ambiguous subcommand \"FOOBAR\": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, postevent, puts, read, seek, tell, or truncate" +} -returnCodes error -result "unknown or ambiguous subcommand \"FOOBAR\": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, pop, postevent, push, puts, read, seek, tell, or truncate" test chan-2.1 {chan command: blocked subcommand} -body { chan blocked foo bar diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 82c9645..06116d3 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.42 2008/04/24 18:51:01 andreas_kupries Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.43 2008/06/06 19:46:38 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -641,7 +641,7 @@ test iocmd-20.0 {chan, wrong#args} { test iocmd-20.1 {chan, unknown method} { catch {chan foo} msg set msg -} {unknown or ambiguous subcommand "foo": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, postevent, puts, read, seek, tell, or truncate} +} {unknown or ambiguous subcommand "foo": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, pop, postevent, push, puts, read, seek, tell, or truncate} # --- --- --- --------- --------- --------- # chan create, and method "initalize" @@ -1894,7 +1894,7 @@ test iocmd-32.1 {origin interpreter of moved channel destroyed during access} -m proc foo {args} { oninit; onfinal; track; # destroy interpreter during channel access - # Actually not possible for an interp to destory itself. + # Actually not possible for an interp to destroy itself. interp delete {} return} set chan [chan create {r w} foo] diff --git a/tests/ioTrans.test b/tests/ioTrans.test new file mode 100644 index 0000000..070aab1 --- /dev/null +++ b/tests/ioTrans.test @@ -0,0 +1,1463 @@ +# -*- tcl -*- +# Functionality covered: operation of the reflected transformation +# +# This file contains a collection of tests for one or more of the Tcl +# built-in commands. Sourcing this file into Tcl runs the tests and +# generates output for errors. No output means no errors were found. +# +# Copyright (c) 2007 Andreas Kupries +# +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: ioTrans.test,v 1.1 2008/06/06 19:46:42 andreas_kupries Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest 2 + namespace import -force ::tcltest::* +} + +# Custom constraints used in this file +testConstraint testchannel [llength [info commands testchannel]] +testConstraint testthread [llength [info commands testthread]] + +# testchannel cut|splice Both needed to test the reflection in threads. +# testthread send + +#---------------------------------------------------------------------- + +# ### ### ### ######### ######### ######### +## Testing the reflected transformation. + +# Helper commands to record the arguments to handler methods. Stored +# in a script so that the tests needing this code do not need their +# own copy but can access this variable. + +set helperscript { + if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest 2 + namespace import -force ::tcltest::* + } + + proc note {item} {global res; lappend res $item; return} + proc track {} {upvar args item; note $item; return} + proc notes {items} {foreach i $items {note $i}} + + # Use to prevent *'s in pattern to match beyond the expected end + # of the recording. + proc endnote {} {note |} + + # This forces the return options to be in the order that the test + # expects! + proc noteOpts opts {global res; lappend res [dict merge { + -code !?! -level !?! -errorcode !?! -errorline !?! -errorinfo !?! + } $opts]; return} + + # Helper command, canned result for 'initialize' method. Gets the + # optional methods as arguments. Use return features to post the + # result higher up. + + proc init {args} { + lappend args initialize finalize read write + return -code return $args + } + proc oninit {args} { + upvar args hargs + if {[lindex $hargs 0] ne "initialize"} {return} + lappend args initialize finalize read write + return -code return $args + } + proc onfinal {} { + upvar args hargs + if {[lindex $hargs 0] ne "finalize"} {return} + return -code return "" + } + proc onread {} { + upvar args hargs + if {[lindex $hargs 0] ne "read"} {return} + return -code return "@" + } + proc ondrain {} { + upvar args hargs + if {[lindex $hargs 0] ne "drain"} {return} + return -code return "<>" + } + proc onclear {} { + upvar args hargs + if {[lindex $hargs 0] ne "clear"} {return} + return -code return "" + } + + proc tempchan {{mode r+}} { + global tempchan + set tempchan [open [makeFile {test data} tempchanfile] $mode] + return $tempchan + } + + proc tempdone {} { + global tempchan + catch {close $tempchan} + removeFile tempchanfile + return + } + + proc tempview {} { viewFile tempchanfile } +} + +# Set everything up in the main thread. +eval $helperscript + +#puts <<[file channels]>> + +# ### ### ### ######### ######### ######### + +test iortrans-1.0 {chan, wrong#args} { + catch {chan} msg + set msg +} {wrong # args: should be "chan subcommand ?argument ...?"} +test iortrans-1.1 {chan, unknown method} { + catch {chan foo} msg + set msg +} {unknown or ambiguous subcommand "foo": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, pop, postevent, push, puts, read, seek, tell, or truncate} + +# --- --- --- --------- --------- --------- +# chan push, and method "initalize" + +test iortrans-2.0 {chan push, wrong#args, not enough} { + catch {chan push} msg + set msg +} {wrong # args: should be "chan push channel cmdprefix"} +test iortrans-2.1 {chan push, wrong#args, too many} { + catch {chan push a b c} msg + set msg +} {wrong # args: should be "chan push channel cmdprefix"} +test iortrans-2.2 {chan push, invalid channel} { + proc foo {} {} + catch {chan push {} foo} msg + rename foo {} + set msg +} {can not find channel named ""} +test iortrans-2.3 {chan push, bad handler, not a list} { + catch {chan push [tempchan] "foo \{"} msg + tempdone + set msg +} {unmatched open brace in list} +test iortrans-2.4 {chan push, bad handler, not a command} { + catch {chan push [tempchan] foo} msg + tempdone + set msg +} {invalid command name "foo"} +test iortrans-2.5 {chan push, initialize failed, bad signature} { + proc foo {} {} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} {wrong # args: should be "foo"} +test iortrans-2.6 {chan push, initialize failed, bad signature} { + proc foo {} {} + catch {chan push [tempchan] ::foo} msg + tempdone + rename foo {} + set msg +} {wrong # args: should be "::foo"} +test iortrans-2.7 {chan push, initialize failed, bad result, not a list} -body { + proc foo {args} {return "\{"} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set ::errorInfo +} -match glob -result {chan handler "foo initialize" returned non-list: *} +test iortrans-2.8 {chan push, initialize failed, bad result, not a list} -body { + proc foo {args} {return \{\{\}} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {chan handler "foo initialize" returned non-list: *} +test iortrans-2.9 {chan push, initialize failed, bad result, empty list} -body { + proc foo {args} {} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*all required methods*} +test iortrans-2.10 {chan push, initialize failed, bad result, bogus method name} -body { + proc foo {args} {return 1} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*bad method "1": must be *} +test iortrans-2.11 {chan push, initialize failed, bad result, bogus method name} -body { + proc foo {args} {return {a b c}} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*bad method "c": must be *} +test iortrans-2.12 {chan push, initialize failed, bad result, required methods missing} -body { + # Required: initialize, and finalize. + proc foo {args} {return {initialize}} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*all required methods*} +test iortrans-2.13 {chan push, initialize failed, bad result, illegal method name} -body { + proc foo {args} {return {initialize finalize BOGUS}} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*returned bad method "BOGUS": must be clear, drain, finalize, flush, initialize, limit?, read, or write} +test iortrans-2.14 {chan push, initialize failed, bad result, mode/handler mismatch} -body { + proc foo {args} {return {initialize finalize}} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*makes the channel inacessible} +# iortrans-2.15 event/watch methods elimimated, removed these tests. +# iortrans-2.16 +test iortrans-2.17 {chan push, initialize failed, bad result, drain/read mismatch} -body { + proc foo {args} {return {initialize finalize drain write}} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*supports "drain" but not "read"} +test iortrans-2.18 {chan push, initialize failed, bad result, flush/write mismatch} -body { + proc foo {args} {return {initialize finalize flush read}} + catch {chan push [tempchan] foo} msg + tempdone + rename foo {} + set msg +} -match glob -result {*supports "flush" but not "write"} +test iortrans-2.19 {chan push, initialize ok, creates channel} -match glob -body { + proc foo {args} { + global res + lappend res $args + if {[lindex $args 0] ne "initialize"} {return} + return {initialize finalize drain flush read write} + } + set res {} + lappend res [file channel rt*] + lappend res [chan push [tempchan] foo] + lappend res [close [lindex $res end]] + lappend res [file channel rt*] + tempdone + rename foo {} + set res +} -result {{} {initialize rt* {read write}} file* {drain rt*} {flush rt*} {finalize rt*} {} {}} +test iortrans-2.20 {chan push, init failure -> no channel, no finalize} -match glob -body { + proc foo {args} { + global res + lappend res $args + return {} + } + set res {} + lappend res [file channel rt*] + lappend res [catch {chan push [tempchan] foo} msg] + lappend res $msg + lappend res [file channel rt*] + tempdone + rename foo {} + set res +} -result {{} {initialize rt* {read write}} 1 {*all required methods*} {}} + +# --- --- --- --------- --------- --------- +# method finalize (via close) + +# General note: file channels rt* finds the transform channel, however +# the name reported will be that of the underlying base driver, fileXX +# here. This actually allows us to see if the whole channel is gone, +# or only the transformation, but not the base. + +test iortrans-3.1 {chan finalize, handler destruction has no effect on channel} -match glob -body { + set res {} + proc foo {args} {track; oninit; return} + note [set c [chan push [tempchan] foo]] + rename foo {} + note [file channels file*] + note [file channels rt*] + note [catch {close $c} msg]; note $msg + note [file channels file*] + note [file channels rt*] + set res +} -result {{initialize rt* {read write}} file* file* {} 1 {invalid command name "foo"} {} {}} +test iortrans-3.2 {chan finalize, for close} -match glob -body { + set res {} + proc foo {args} {track; oninit; return {}} + note [set c [chan push [tempchan] foo]] + close $c + # Close deleted the channel. + note [file channels rt*] + # Channel destruction does not kill handler command! + note [info command foo] + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} {} foo} +test iortrans-3.3 {chan finalize, for close, error, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code error 5} + note [set c [chan push [tempchan] foo]] + note [catch {close $c} msg]; note $msg + # Channel is gone despite error. + note [file channels rt*] + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 5 {}} +test iortrans-3.4 {chan finalize, for close, error, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; error FOO} + note [set c [chan push [tempchan] foo]] + note [catch {close $c} msg]; note $msg; note $::errorInfo + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 FOO {FOO +*"close $c"}} +test iortrans-3.5 {chan finalize, for close, arbitrary result, ignored} -match glob -body { + set res {} + proc foo {args} {track; oninit; return SOMETHING} + note [set c [chan push [tempchan] foo]] + note [catch {close $c} msg]; note $msg + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 0 {}} +test iortrans-3.6 {chan finalize, for close, break, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code 3} + note [set c [chan push [tempchan] foo]] + note [catch {close $c} msg]; note $msg + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*} +test iortrans-3.7 {chan finalize, for close, continue, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code 4} + note [set c [chan push [tempchan] foo]] + note [catch {close $c} msg]; note $msg + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*} +test iortrans-3.8 {chan finalize, for close, custom code, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code 777 BANG} + note [set c [chan push [tempchan] foo]] + note [catch {close $c} msg]; note $msg + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*} +test iortrans-3.9 {chan finalize, for close, ignore level, close error} -match glob -setup { + set res {} +} -body { + proc foo {args} {track; oninit; return -level 5 -code 777 BANG} + note [set c [chan push [tempchan] foo]] + note [catch {close $c} msg opt]; note $msg; noteOpts $opt + return $res +} -cleanup { + rename foo {} +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "finalize"*}} + +# --- === *** ########################### +# method read (via read) + +test iortrans-4.1 {chan read, transform call and return} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return snarf + } + set c [chan push [tempchan] foo] + note [read $c 10] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} snarf} +test iortrans-4.2 {chan read, for non-readable channel} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track; note MUST_NOT_HAPPEN + } + set c [chan push [tempchan w] foo] + note [catch {read $c 2} msg]; note $msg + tempdone + rename foo {} + set res +} -result {1 {channel "file*" wasn't opened for reading}} +test iortrans-4.3 {chan read, error return} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code error BOOM! + } + set c [chan push [tempchan] foo] + note [catch {read $c 2} msg]; note $msg + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 BOOM!} +test iortrans-4.4 {chan read, break return is error} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code break BOOM! + } + set c [chan push [tempchan] foo] + note [catch {read $c 2} msg]; note $msg + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code*} +test iortrans-4.5 {chan read, continue return is error} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code continue BOOM! + } + set c [chan push [tempchan] foo] + note [catch {read $c 2} msg]; note $msg + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code*} +test iortrans-4.6 {chan read, custom return is error} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code 777 BOOM! + } + set c [chan push [tempchan] foo] + note [catch {read $c 2} msg]; note $msg + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code*} +test iortrans-4.7 {chan read, level is squashed} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -level 55 -code 777 BOOM! + } + set c [chan push [tempchan] foo] + note [catch {read $c 2} msg opt]; note $msg; noteOpts $opt + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "read"*}} + + +# --- === *** ########################### +# method write (via puts) + +test iortrans-5.1 {chan write, regular write} -match glob -body { + set res {} + proc foo {args} { oninit; onfinal; track ; return transformresult } + set c [chan push [tempchan] foo] + puts -nonewline $c snarf; flush $c + close $c + note [tempview] + tempdone + rename foo {} + set res +} -result {{write rt* snarf} transformresult} +test iortrans-5.2 {chan write, no write is ok, no change to file} -match glob -body { + set res {} + proc foo {args} { oninit; onfinal; track ; return {} } + set c [chan push [tempchan] foo] + puts -nonewline $c snarfsnarfsnarf; flush $c + close $c + note [tempview];# This has to show the original data, as nothing was written + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} {test data}} +test iortrans-5.3 {chan write, failed write} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code error FAIL!} + set c [chan push [tempchan] foo] + puts -nonewline $c snarfsnarfsnarf + note [catch {flush $c} msg] ; note $msg + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 FAIL!} +test iortrans-5.4 {chan write, non-writable channel} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; note MUST_NOT_HAPPEN; return} + set c [chan push [tempchan r] foo] + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg]; note $msg + close $c + tempdone + rename foo {} + set res +} -result {1 {channel "file*" wasn't opened for writing}} +test iortrans-5.5 {chan write, failed write, error return} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code error BOOM!} + set c [chan push [tempchan] foo] + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 BOOM!} +test iortrans-5.6 {chan write, failed write, error return} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; error BOOM!} + set c [chan push [tempchan] foo] + notes [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 BOOM!} +test iortrans-5.7 {chan write, failed write, break return is error} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code break BOOM!} + set c [chan push [tempchan] foo] + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code*} +test iortrans-5.8 {chan write, failed write, continue return is error} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code continue BOOM!} + set c [chan push [tempchan] foo] + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code*} +test iortrans-5.9 {chan write, failed write, custom return is error} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code 777 BOOM!} + set c [chan push [tempchan] foo] + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code*} +test iortrans-5.10 {chan write, failed write, level is ignored} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -level 55 -code 777 BOOM!} + set c [chan push [tempchan] foo] + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg opt] + note $msg + noteOpts $opt + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "write"*}} + +# --- === *** ########################### +# method limit?, drain (via read) + +test iortrans-6.1 {chan read, read limits} -match glob -body { + set res {} + proc foo {args} { + oninit limit?; onfinal; track ; onread + return 6 + } + set c [chan push [tempchan] foo] + note [read $c 10] + tempdone + rename foo {} + set res +} -result {{limit? rt*} {read rt* {test d}} {limit? rt*} {read rt* {ata +}} {limit? rt*} @@} +test iortrans-6.2 {chan read, read transform drain on eof} -match glob -body { + set res {} + proc foo {args} { + oninit drain; onfinal; track ; onread ; ondrain + return + } + set c [chan push [tempchan] foo] + note [read $c] + note [close $c] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} {drain rt*} @<> {}} + +# --- === *** ########################### +# method clear (via puts, seek) + +test iortrans-7.1 {chan write, write clears read buffers} -match glob -body { + set res {} + proc foo {args} { + oninit clear; onfinal; track ; onclear + return transformresult + } + set c [chan push [tempchan] foo] + puts -nonewline $c snarf; flush $c + tempdone + rename foo {} + set res +} -result {{clear rt*} {write rt* snarf}} +test iortrans-7.2 {seek clears read buffers} -match glob -body { + set res {} + proc foo {args} { + oninit clear; onfinal; track + return + } + set c [chan push [tempchan] foo] + seek $c 2 + tempdone + rename foo {} + set res +} -result {{clear rt*}} +test iortrans-7.3 {clear, any result is ignored} -match glob -body { + set res {} + proc foo {args} { + oninit clear; onfinal; track + return -code error "X" + } + set c [chan push [tempchan] foo] + seek $c 2 + tempdone + rename foo {} + set res +} -result {{clear rt*}} + +# --- === *** ########################### +# method flush (via seek, close) + +test iortrans-8.1 {seek flushes write buffers, ignores data} -match glob -body { + set res {} + proc foo {args} { + oninit flush; onfinal; track + return X + } + set c [chan push [tempchan] foo] + # Flush, no writing + seek $c 2 + # The close flushes again, this modifies the file! + note | ; note [close $c] ; note | + note [tempview] + tempdone + rename foo {} + set res +} -result {{flush rt*} | {flush rt*} {} | {teXt data}} + +test iortrans-8.2 {close flushes write buffers, writes data} -match glob -body { + set res {} + proc foo {args} { + oninit flush; track ; onfinal + return .flushed. + } + set c [chan push [tempchan] foo] + close $c + note [tempview] + tempdone + rename foo {} + set res +} -result {{flush rt*} {finalize rt*} .flushed.} + + +# --- === *** ########################### +# method watch - removed from TIP (rev 1.12+) + +# --- === *** ########################### +# method event - removed from TIP (rev 1.12+) + +# --- === *** ########################### +# 'Pull the rug' tests. Create channel in a interpreter A, move to +# other interpreter B, destroy the origin interpreter (A) before or +# during access from B. Must not crash, must return proper errors. + +test iortrans-11.0 {origin interpreter of moved transform gone} -match glob -body { + + set ida [interp create];#puts <<$ida>> + set idb [interp create];#puts <<$idb>> + + # Magic to get the test* commands in the slaves + load {} Tcltest $ida + load {} Tcltest $idb + + # Set up channel and transform in interpreter + interp eval $ida $helperscript + set chan [interp eval $ida { + proc foo {args} {oninit clear drain flush limit? read write; onfinal; track; return} + set chan [chan push [tempchan] foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd interpreter, transform goes with it. + interp eval $ida [list testchannel cut $chan] + interp eval $idb [list testchannel splice $chan] + + # Kill origin interpreter, then access channel from 2nd interpreter. + interp delete $ida + + set res {} + lappend res [catch {interp eval $idb [list puts $chan shoo]} msg] $msg + lappend res [catch {interp eval $idb [list tell $chan]} msg] $msg + lappend res [catch {interp eval $idb [list seek $chan 1]} msg] $msg + lappend res [catch {interp eval $idb [list gets $chan]} msg] $msg + lappend res [catch {interp eval $idb [list close $chan]} msg] $msg + #lappend res [interp eval $ida {set res}] + # actions: clear|write|clear|write|clear|flush|limit?|drain|flush + set res + # The 'tell' is ok, as it passed through the transform to the base + # channel without invoking the transform handler. +} -constraints {testchannel} \ + -result {1 {Owner lost} 0 0 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} + +test iortrans-11.1 {origin interpreter of moved transform destroyed during access} -match glob -body { + + set ida [interp create];#puts <<$ida>> + set idb [interp create];#puts <<$idb>> + + # Magic to get the test* commands in the slaves + load {} Tcltest $ida + load {} Tcltest $idb + + # Set up channel in thread + set chan [interp eval $ida $helperscript] + set chan [interp eval $ida { + proc foo {args} { + oninit clear drain flush limit? read write; onfinal; track; + # destroy interpreter during channel access + # Actually not possible for an interp to destroy itself. + interp delete {} + return} + set chan [chan push [tempchan] foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd thread, transform goes with it. + interp eval $ida [list testchannel cut $chan] + interp eval $idb [list testchannel splice $chan] + + # Run access from interpreter B, this will give us a synchronous + # response. + + interp eval $idb [list set chan $chan] + interp eval $idb [list set mid $tcltest::mainThread] + set res [interp eval $idb { + # wait a bit, give the main thread the time to start its event + # loop to wait for the response from B + after 2000 + catch { puts $chan shoo } res + set res + }] + set res +} -constraints {testchannel impossible} \ + -result {Owner lost} + +# ### ### ### ######### ######### ######### +## Same tests as above, but exercising the code forwarding and +## receiving driver operations to the originator thread. + +# -*- tcl -*- +# ### ### ### ######### ######### ######### +## Testing the reflected channel (Thread forwarding). +# +## The id numbers refer to the original test without thread +## forwarding, and gaps due to tests not applicable to forwarding are +## left to keep this association. + +# Duplicate of code in "thread.test", and "ioCmd.test". Find a better +# way of doing this without duplication. Maybe placement into a proc +# which transforms to nop after the first call, and placement of its +# defintion in a central location. + +if {[testConstraint testthread]} { + testthread errorproc ThreadError + + proc ThreadError {id info} { + global threadError + set threadError $info + } + proc ThreadNullError {id info} { + # ignore + } +} + +# ### ### ### ######### ######### ######### +## Helper command. Runs a script in a separate thread and returns the +## result. A channel is transfered into the thread as well, and a list +## of configuation variables + +proc inthread {chan script args} { + # Test thread. + + set tid [testthread create] + + # Init thread configuration. + # - Listed variables + # - Id of main thread + # - A number of helper commands + + foreach v $args { + upvar 1 $v x + testthread send $tid [list set $v $x] + } + testthread send $tid [list set mid $tcltest::mainThread] + testthread send $tid { + proc note {item} {global notes; lappend notes $item} + proc notes {} {global notes; return $notes} + proc noteOpts opts {global notes; lappend notes [dict merge { + -code !?! -level !?! -errorcode !?! -errorline !?! -errorinfo !?! + } $opts]} + } + testthread send $tid [list proc s {} [list uplevel 1 $script]]; # (*) + + # Transfer channel (cut/splice aka detach/attach) + + testchannel cut $chan + testthread send $tid [list testchannel splice $chan] + + # Run test script, also run local event loop! + # The local event loop waits for the result to come back. + # It is also necessary for the execution of forwarded channel + # operations. + + set ::tres "" + testthread send -async $tid { + after 500 + catch {s} res; # This runs the script, 's' was defined at (*) + testthread send -async $mid [list set ::tres $res] + } + vwait ::tres + # Remove test thread, and return the captured result. + + tcltest::threadReap + return $::tres +} + +# ### ### ### ######### ######### ######### + +# ### ### ### ######### ######### ######### + +test iortrans.tf-3.2 {chan finalize, for close} -match glob -body { + set res {} + proc foo {args} {track; oninit; return {}} + note [set c [chan push [tempchan] foo]] + note [inthread $c { + close $c + # Close the deleted the channel. + file channels rt* + } c] + # Channel destruction does not kill handler command! + note [info command foo] + rename foo {} + set res +} -constraints {testchannel testthread} \ + -result {{initialize rt* {read write}} file* {finalize rt*} {} foo} +test iortrans.tf-3.3 {chan finalize, for close, error, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code error 5} + note [set c [chan push [tempchan] foo]] + notes [inthread $c { + note [catch {close $c} msg]; note $msg + # Channel is gone despite error. + note [file channels rt*] + notes + } c] + rename foo {} + set res +} -constraints {testchannel testthread} \ + -result {{initialize rt* {read write}} file* {finalize rt*} 1 5 {}} +test iortrans.tf-3.4 {chan finalize, for close, error, close errror} -match glob -body { + set res {} + proc foo {args} {track; oninit; error FOO} + note [set c [chan push [tempchan] foo]] + notes [inthread $c { + note [catch {close $c} msg]; note $msg + notes + } c] + rename foo {} + set res +} -constraints {testchannel testthread} \ + -result {{initialize rt* {read write}} file* {finalize rt*} 1 FOO} +test iortrans.tf-3.5 {chan finalize, for close, arbitrary result} -match glob -body { + set res {} + proc foo {args} {track; oninit; return SOMETHING} + note [set c [chan push [tempchan] foo]] + notes [inthread $c { + note [catch {close $c} msg]; note $msg + notes + } c] + rename foo {} + set res +} -constraints {testchannel testthread} \ + -result {{initialize rt* {read write}} file* {finalize rt*} 0 {}} +test iortrans.tf-3.6 {chan finalize, for close, break, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code 3} + note [set c [chan push [tempchan] foo]] + notes [inthread $c { + note [catch {close $c} msg]; note $msg + notes + } c] + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*} \ + -constraints {testchannel testthread} + + +test iortrans.tf-3.7 {chan finalize, for close, continue, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code 4} + note [set c [chan push [tempchan] foo]] + notes [inthread $c { + note [catch {close $c} msg]; note $msg + notes + } c] + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*} \ + -constraints {testchannel testthread} +test iortrans.tf-3.8 {chan finalize, for close, custom code, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -code 777 BANG} + note [set c [chan push [tempchan] foo]] + notes [inthread $c { + note [catch {close $c} msg]; note $msg + notes + } c] + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*} \ + -constraints {testchannel testthread} +test iortrans.tf-3.9 {chan finalize, for close, ignore level, close error} -match glob -body { + set res {} + proc foo {args} {track; oninit; return -level 5 -code 777 BANG} + note [set c [chan push [tempchan] foo]] + notes [inthread $c { + note [catch {close $c} msg opt]; note $msg; noteOpts $opt + notes + } c] + rename foo {} + set res +} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "finalize"*}} \ + -constraints {testchannel testthread} + +# --- === *** ########################### +# method read + +test iortrans.tf-4.1 {chan read, transform call and return} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return snarf + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [read $c 10] + close $c + notes + } c] + tempdone + rename foo {} + set res +} -constraints {testchannel testthread} -result {{read rt* {test data +}} snarf} + +test iortrans.tf-4.2 {chan read, for non-readable channel} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track; note MUST_NOT_HAPPEN + } + set c [chan push [tempchan w] foo] + notes [inthread $c { + note [catch {[read $c 2]} msg]; note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -constraints {testchannel testthread} -result {1 {channel "file*" wasn't opened for reading}} +test iortrans.tf-4.3 {chan read, error return} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code error BOOM! + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {read $c 2} msg]; note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 BOOM!} \ + -constraints {testchannel testthread} +test iortrans.tf-4.4 {chan read, break return is error} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code break BOOM! + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {read $c 2} msg]; note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code*} \ + -constraints {testchannel testthread} +test iortrans.tf-4.5 {chan read, continue return is error} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code continue BOOM! + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {read $c 2} msg]; note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code*} \ + -constraints {testchannel testthread} +test iortrans.tf-4.6 {chan read, custom return is error} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -code 777 BOOM! + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {read $c 2} msg]; note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code*} \ + -constraints {testchannel testthread} + +test iortrans.tf-4.7 {chan read, level is squashed} -match glob -body { + set res {} + proc foo {args} { + oninit; onfinal; track + return -level 55 -code 777 BOOM! + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {read $c 2} msg opt]; note $msg; noteOpts $opt + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "read"*}} \ + -constraints {testchannel testthread} + +# --- === *** ########################### +# method write + +test iortrans.tf-5.1 {chan write, regular write} -match glob -body { + set res {} + proc foo {args} { oninit; onfinal; track ; return transformresult } + set c [chan push [tempchan] foo] + inthread $c { + puts -nonewline $c snarf; flush $c + close $c + } c + note [tempview] + tempdone + rename foo {} + set res +} -constraints {testchannel testthread} -result {{write rt* snarf} transformresult} +test iortrans.tf-5.2 {chan write, no write is ok, no change to file} -match glob -body { + set res {} + proc foo {args} { oninit; onfinal; track ; return {} } + set c [chan push [tempchan] foo] + inthread $c { + puts -nonewline $c snarfsnarfsnarf; flush $c + close $c + } c + note [tempview];# This has to show the original data, as nothing was written + tempdone + rename foo {} + set res +} -constraints {testchannel testthread} \ + -result {{write rt* snarfsnarfsnarf} {test data}} +test iortrans.tf-5.3 {chan write, failed write} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code error FAIL!} + set c [chan push [tempchan] foo] + notes [inthread $c { + puts -nonewline $c snarfsnarfsnarf + note [catch {flush $c} msg] + note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -constraints {testchannel testthread} \ + -result {{write rt* snarfsnarfsnarf} 1 FAIL!} +test iortrans.tf-5.4 {chan write, non-writable channel} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; note MUST_NOT_HAPPEN; return} + set c [chan push [tempchan r] foo] + notes [inthread $c { + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -constraints {testchannel testthread} \ + -result {1 {channel "file*" wasn't opened for writing}} +test iortrans.tf-5.5 {chan write, failed write, error return} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code error BOOM!} + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 BOOM!} \ + -constraints {testchannel testthread} +test iortrans.tf-5.6 {chan write, failed write, error return} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; error BOOM!} + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 BOOM!} \ + -constraints {testchannel testthread} + + +test iortrans.tf-5.7 {chan write, failed write, break return is error} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code break BOOM!} + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code*} \ + -constraints {testchannel testthread} +test iortrans.tf-5.8 {chan write, failed write, continue return is error} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code continue BOOM!} + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + close $c + notes + } c] + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code*} \ + -constraints {testchannel testthread} +test iortrans.tf-5.9 {chan write, failed write, custom return is error} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -code 777 BOOM!} + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg] + note $msg + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code*} \ + -constraints {testchannel testthread} +test iortrans.tf-5.10 {chan write, failed write, level is ignored} -match glob -body { + set res {} + proc foo {args} {oninit; onfinal; track; return -level 55 -code 777 BOOM!} + set c [chan push [tempchan] foo] + notes [inthread $c { + note [catch {puts -nonewline $c snarfsnarfsnarf; flush $c} msg opt] + note $msg + noteOpts $opt + close $c + notes + } c] + tempdone + rename foo {} + set res +} -result {{write rt* snarfsnarfsnarf} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "write"*}} \ + -constraints {testchannel testthread} + + +# --- === *** ########################### +# method limit?, drain (via read) + +test iortrans.tf-6.1 {chan read, read limits} -match glob -body { + set res {} + proc foo {args} { + oninit limit?; onfinal; track ; onread + return 6 + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [read $c 10] + } c] + tempdone + rename foo {} + set res +} -result {{limit? rt*} {read rt* {test d}} {limit? rt*} {read rt* {ata +}} {limit? rt*} @@} -constraints {testchannel testthread} +test iortrans.tf-6.2 {chan read, read transform drain on eof} -match glob -body { + set res {} + proc foo {args} { + oninit drain; onfinal; track ; onread ; ondrain + return + } + set c [chan push [tempchan] foo] + notes [inthread $c { + note [read $c] + note [close $c] + } c] + tempdone + rename foo {} + set res +} -result {{read rt* {test data +}} {drain rt*} @<> {}} -constraints {testchannel testthread} + +# --- === *** ########################### +# method clear (via puts, seek) + +test iortrans.tf-7.1 {chan write, write clears read buffers} -match glob -body { + set res {} + proc foo {args} { + oninit clear; onfinal; track ; onclear + return transformresult + } + set c [chan push [tempchan] foo] + inthread $c { + puts -nonewline $c snarf; flush $c + close $c + } c + tempdone + rename foo {} + set res +} -result {{clear rt*} {write rt* snarf}} -constraints {testchannel testthread} +test iortrans.tf-7.2 {seek clears read buffers} -match glob -body { + set res {} + proc foo {args} { + oninit clear; onfinal; track + return + } + set c [chan push [tempchan] foo] + inthread $c { + seek $c 2 + close $c + } c + tempdone + rename foo {} + set res +} -result {{clear rt*}} -constraints {testchannel testthread} +test iortrans.tf-7.3 {clear, any result is ignored} -match glob -body { + set res {} + proc foo {args} { + oninit clear; onfinal; track + return -code error "X" + } + set c [chan push [tempchan] foo] + inthread $c { + seek $c 2 + close $c + } c + tempdone + rename foo {} + set res +} -result {{clear rt*}} -constraints {testchannel testthread} + +# --- === *** ########################### +# method flush (via seek, close) + +test iortrans-8.1 {seek flushes write buffers, ignores data} -match glob -body { + set res {} + proc foo {args} { + oninit flush; onfinal; track + return X + } + set c [chan push [tempchan] foo] + notes [inthread $c { + # Flush, no writing + seek $c 2 + # The close flushes again, this modifies the file! + note | ; note [close $c] ; note | + # NOTE: The flush generated by the close is recorded + # immediately, the other note's here are defered until after + # the thread is done. This changes the order of the result a + # bit from the non-threaded case (The first | moves one to the + # right). This is an artifact of the 'inthread' framework, not + # of the transformation itself. + notes + } c] + note [tempview] + tempdone + rename foo {} + set res +} -result {{flush rt*} {flush rt*} | {} | {teXt data}} -constraints {testchannel testthread} + +test iortrans-8.2 {close flushes write buffers, writes data} -match glob -body { + set res {} + proc foo {args} { + oninit flush; track ; onfinal + return .flushed. + } + set c [chan push [tempchan] foo] + inthread $c { + close $c + } c + note [tempview] + tempdone + rename foo {} + set res +} -result {{flush rt*} {finalize rt*} .flushed.} -constraints {testchannel testthread} + + +# --- === *** ########################### +# method watch - removed from TIP (rev 1.12+) + +# --- === *** ########################### +# method event - removed from TIP (rev 1.12+) + +# --- === *** ########################### +# 'Pull the rug' tests. Create channel in a thread A, move to other +# thread B, destroy the origin thread (A) before or during access from +# B. Must not crash, must return proper errors. + +test iortrans.tf-11.0 {origin thread of moved transform gone} -match glob -body { + + #puts <<$tcltest::mainThread>>main + set tida [testthread create];#puts <<$tida>> + set tidb [testthread create];#puts <<$tidb>> + + # Set up channel in thread + testthread send $tida $helperscript + set chan [testthread send $tida { + proc foo {args} {oninit clear drain flush limit? read write; onfinal; track; return} + set chan [chan push [tempchan] foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd thread, transform goes with it. + testthread send $tida [list testchannel cut $chan] + testthread send $tidb [list testchannel splice $chan] + + # Kill origin thread, then access channel from 2nd thread. + testthread send -async $tida {testthread exit} + after 100 + + set res {} + lappend res [catch {testthread send $tidb [list puts $chan shoo]} msg] $msg + lappend res [catch {testthread send $tidb [list tell $chan]} msg] $msg + lappend res [catch {testthread send $tidb [list seek $chan 1]} msg] $msg + lappend res [catch {testthread send $tidb [list gets $chan]} msg] $msg + lappend res [catch {testthread send $tidb [list close $chan]} msg] $msg + tcltest::threadReap + set res + # The 'tell' is ok, as it passed through the transform to the base + # channel without invoking the transform handler. + +} -constraints {testchannel testthread} \ + -result {1 {Owner lost} 0 0 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} + +test iortrans.tf-11.1 {origin thread of moved transform destroyed during access} -match glob -body { + + #puts <<$tcltest::mainThread>>main + set tida [testthread create];#puts <<$tida>> + set tidb [testthread create];#puts <<$tidb>> + + # Set up channel in thread + set chan [testthread send $tida $helperscript] + set chan [testthread send $tida { + proc foo {args} { + oninit clear drain flush limit? read write; onfinal; track; + # destroy thread during channel access + testthread exit + return} + set chan [chan push [tempchan] foo] + fconfigure $chan -buffering none + set chan + }] + + # Move channel to 2nd thread, transform goes with it. + testthread send $tida [list testchannel cut $chan] + testthread send $tidb [list testchannel splice $chan] + + # Run access from thread B, wait for response from A (A is not + # using event loop at this point, so the event pile up in the + # queue. + + testthread send $tidb [list set chan $chan] + testthread send $tidb [list set mid $tcltest::mainThread] + testthread send -async $tidb { + # wait a bit, give the main thread the time to start its event + # loop to wait for the response from B + after 2000 + catch { puts $chan shoo } res + testthread send -async $mid [list set ::res $res] + } + vwait ::res + + tcltest::threadReap + set res +} -constraints {testchannel testthread} \ + -result {Owner lost} + +# ### ### ### ######### ######### ######### + +# ### ### ### ######### ######### ######### + +rename track {} +cleanupTests +return diff --git a/unix/Makefile.in b/unix/Makefile.in index d7d6f82..bf35876 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.236 2008/06/01 00:02:05 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.237 2008/06/06 19:46:42 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -283,7 +283,7 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclCompile.o tclConfig.o tclDate.o tclDictObj.o tclEncoding.o \ tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o \ tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o \ - tclIORChan.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclListObj.o \ + tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclListObj.o \ tclLiteral.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o \ tclObj.o tclPanic.o tclParse.o tclPathObj.o tclPipe.o \ tclPkg.o tclPkgConfig.o tclPosixStr.o \ @@ -395,6 +395,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclIOSock.c \ $(GENERIC_DIR)/tclIOUtil.c \ $(GENERIC_DIR)/tclIORChan.c \ + $(GENERIC_DIR)/tclIORTrans.c \ $(GENERIC_DIR)/tclLink.c \ $(GENERIC_DIR)/tclListObj.c \ $(GENERIC_DIR)/tclLiteral.c \ @@ -1073,6 +1074,9 @@ tclIOUtil.o: $(GENERIC_DIR)/tclIOUtil.c $(FSHDR) tclIORChan.o: $(GENERIC_DIR)/tclIORChan.c $(IOHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIORChan.c +tclIORTrans.o: $(GENERIC_DIR)/tclIORTrans.c $(IOHDR) + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIORTrans.c + tclLink.o: $(GENERIC_DIR)/tclLink.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclLink.c diff --git a/win/Makefile.in b/win/Makefile.in index 13d3109..5e32d59 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.131 2008/06/01 02:44:54 mistachkin Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.132 2008/06/06 19:46:42 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -241,6 +241,7 @@ GENERIC_OBJS = \ tclIOCmd.$(OBJEXT) \ tclIOGT.$(OBJEXT) \ tclIORChan.$(OBJEXT) \ + tclIORTrans.$(OBJEXT) \ tclIOSock.$(OBJEXT) \ tclIOUtil.$(OBJEXT) \ tclLink.$(OBJEXT) \ diff --git a/win/makefile.vc b/win/makefile.vc index b33da87..27dc974 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.182 2008/06/01 02:44:54 mistachkin Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.183 2008/06/06 19:46:42 andreas_kupries Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -278,6 +278,7 @@ TCLOBJS = \ $(TMP_DIR)\tclIOSock.obj \ $(TMP_DIR)\tclIOUtil.obj \ $(TMP_DIR)\tclIORChan.obj \ + $(TMP_DIR)\tclIORTrans.obj \ $(TMP_DIR)\tclLink.obj \ $(TMP_DIR)\tclListObj.obj \ $(TMP_DIR)\tclLiteral.obj \ -- cgit v0.12 From 4819a5befc336eb974ac83e7b8cd60cb3b4b695b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 8 Jun 2008 03:21:30 +0000 Subject: * generic/tclBasic.c: Compilation of uplevel scripts, allow * generic/tclCompCmds.c: non-body compiled scripts to access the * generic/tclCompile.c: LVT (but not to extend it) and enable the * generic/tclCompile.h: canonical list opt to sidestep the * generic/tclExecute.c: compiler. This is [Patch 1973096] * generic/tclProc.c: * tests/uplevel.test: --- ChangeLog | 10 ++++ generic/tclBasic.c | 148 +++++++++++++++++++++++++------------------------- generic/tclCompCmds.c | 128 +++++++++++++++++++++++++++---------------- generic/tclCompile.c | 37 +++++++++++-- generic/tclCompile.h | 4 +- generic/tclExecute.c | 21 ++++++- generic/tclProc.c | 4 +- tests/uplevel.test | 69 ++++++++++++++++++++++- 8 files changed, 287 insertions(+), 134 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb4114c..0df1673 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-06-08 Miguel Sofer + * generic/tclBasic.c: Compilation of uplevel scripts, allow + * generic/tclCompCmds.c: non-body compiled scripts to access the + * generic/tclCompile.c: LVT (but not to extend it) and enable the + * generic/tclCompile.h: canonical list opt to sidestep the + * generic/tclExecute.c: compiler. This is [Patch 1973096] + * generic/tclProc.c: + * tests/uplevel.test: + + 2008-06-06 Andreas Kupries TIP #230 IMPLEMENTATION diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 57fefe2..9210fd7 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.300 2008/05/31 19:56:06 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.301 2008/06/08 03:21:31 msofer Exp $ */ #include "tclInt.h" @@ -4578,85 +4578,85 @@ TclEvalObjEx( Tcl_IncrRefCount(objPtr); + /* + * Pure List Optimization (no string representation). In this case, we + * can safely use Tcl_EvalObjv instead and get an appreciable + * improvement in execution speed. This is because it allows us to + * avoid a setFromAny step that would just pack everything into a + * string and back out again. + * + * This restriction has been relaxed a bit by storing in lists whether + * they are "canonical" or not (a canonical list being one that is + * either pure or that has its string rep derived by + * UpdateStringOfList from the internal rep). + */ + + if (objPtr->typePtr == &tclListType) { /* is a list... */ + List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; + + if (objPtr->bytes == NULL || /* ...without a string rep */ + listRepPtr->canonicalFlag) {/* ...or that is canonical */ + /* + * TIP #280 Structures for tracking lines. As we know that + * this is dynamic execution we ignore the invoker, even if + * known. + */ + + int line, i; + char *w; + Tcl_Obj **elements, *copyPtr = TclListObjCopy(NULL, objPtr); + CmdFrame *eoFramePtr = (CmdFrame *) + TclStackAlloc(interp, sizeof(CmdFrame)); + + eoFramePtr->type = TCL_LOCATION_EVAL_LIST; + eoFramePtr->level = (iPtr->cmdFramePtr == NULL? + 1 : iPtr->cmdFramePtr->level + 1); + eoFramePtr->framePtr = iPtr->framePtr; + eoFramePtr->nextPtr = iPtr->cmdFramePtr; + + Tcl_ListObjGetElements(NULL, copyPtr, + &(eoFramePtr->nline), &elements); + eoFramePtr->line = (int *) + ckalloc(eoFramePtr->nline * sizeof(int)); + + eoFramePtr->cmd.listPtr = objPtr; + Tcl_IncrRefCount(eoFramePtr->cmd.listPtr); + eoFramePtr->data.eval.path = NULL; + + /* + * TIP #280 Computes all the line numbers for the words in the + * command. + */ + + line = 1; + for (i=0; i < eoFramePtr->nline; i++) { + eoFramePtr->line[i] = line; + w = TclGetString(elements[i]); + TclAdvanceLines(&line, w, w + strlen(w)); + } + + iPtr->cmdFramePtr = eoFramePtr; + result = Tcl_EvalObjv(interp, eoFramePtr->nline, elements, + flags); + + Tcl_DecrRefCount(copyPtr); + iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; + Tcl_DecrRefCount(eoFramePtr->cmd.listPtr); + ckfree((char *) eoFramePtr->line); + eoFramePtr->line = NULL; + eoFramePtr->nline = 0; + TclStackFree(interp, eoFramePtr); + + goto done; + } + } + if (flags & TCL_EVAL_DIRECT) { /* * We're not supposed to use the compiler or byte-code interpreter. * Let Tcl_EvalEx evaluate the command directly (and probably more * slowly). * - * Pure List Optimization (no string representation). In this case, we - * can safely use Tcl_EvalObjv instead and get an appreciable - * improvement in execution speed. This is because it allows us to - * avoid a setFromAny step that would just pack everything into a - * string and back out again. - * - * This restriction has been relaxed a bit by storing in lists whether - * they are "canonical" or not (a canonical list being one that is - * either pure or that has its string rep derived by - * UpdateStringOfList from the internal rep). - */ - - if (objPtr->typePtr == &tclListType) { /* is a list... */ - List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; - - if (objPtr->bytes == NULL || /* ...without a string rep */ - listRepPtr->canonicalFlag) {/* ...or that is canonical */ - /* - * TIP #280 Structures for tracking lines. As we know that - * this is dynamic execution we ignore the invoker, even if - * known. - */ - - int line, i; - char *w; - Tcl_Obj **elements, *copyPtr = TclListObjCopy(NULL, objPtr); - CmdFrame *eoFramePtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); - - eoFramePtr->type = TCL_LOCATION_EVAL_LIST; - eoFramePtr->level = (iPtr->cmdFramePtr == NULL? - 1 : iPtr->cmdFramePtr->level + 1); - eoFramePtr->framePtr = iPtr->framePtr; - eoFramePtr->nextPtr = iPtr->cmdFramePtr; - - Tcl_ListObjGetElements(NULL, copyPtr, - &(eoFramePtr->nline), &elements); - eoFramePtr->line = (int *) - ckalloc(eoFramePtr->nline * sizeof(int)); - - eoFramePtr->cmd.listPtr = objPtr; - Tcl_IncrRefCount(eoFramePtr->cmd.listPtr); - eoFramePtr->data.eval.path = NULL; - - /* - * TIP #280 Computes all the line numbers for the words in the - * command. - */ - - line = 1; - for (i=0; i < eoFramePtr->nline; i++) { - eoFramePtr->line[i] = line; - w = TclGetString(elements[i]); - TclAdvanceLines(&line, w, w + strlen(w)); - } - - iPtr->cmdFramePtr = eoFramePtr; - result = Tcl_EvalObjv(interp, eoFramePtr->nline, elements, - flags); - - Tcl_DecrRefCount(copyPtr); - iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; - Tcl_DecrRefCount(eoFramePtr->cmd.listPtr); - ckfree((char *) eoFramePtr->line); - eoFramePtr->line = NULL; - eoFramePtr->nline = 0; - TclStackFree(interp, eoFramePtr); - - goto done; - } - } - - /* * TIP #280. Propagate context as much as we can. Especially if the * script to evaluate is a single literal it makes sense to look if * our context is one with absolute line numbers we can then track diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 87cb891..ac0b2c2 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.144 2008/05/07 09:07:11 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.145 2008/06/08 03:21:32 msofer Exp $ */ #include "tclInt.h" @@ -131,6 +131,14 @@ ((envPtr)->exceptArrayPtr[(index)].targetType = CurrentOffset(envPtr)) /* + * Check if there is an LVT for compiled locals + */ + +#define EnvHasLVT(envPtr) \ + (envPtr->procPtr || envPtr->iPtr->varFramePtr->localCachePtr) + + +/* * Prototypes for procedures defined later in this file: */ @@ -173,8 +181,7 @@ static void CompileReturnInternal(CompileEnv *envPtr, * Flags bits used by PushVarName. */ -#define TCL_CREATE_VAR 1 /* Create a compiled local if none is found */ -#define TCL_NO_LARGE_INDEX 2 /* Do not return localIndex value > 255 */ +#define TCL_NO_LARGE_INDEX 1 /* Do not return localIndex value > 255 */ /* * The structures below define the AuxData types defined in this file. @@ -259,7 +266,7 @@ TclCompileAppendCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, TCL_CREATE_VAR, + PushVarName(interp, varTokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); @@ -390,7 +397,7 @@ TclCompileCatchCmd( * (not in a procedure), don't compile it inline: the payoff is too small. */ - if ((parsePtr->numWords >= 3) && (envPtr->procPtr == NULL)) { + if ((parsePtr->numWords >= 3) && !EnvHasLVT(envPtr)) { return TCL_ERROR; } @@ -414,8 +421,11 @@ TclCompileCatchCmd( return TCL_ERROR; } resultIndex = TclFindCompiledLocal(resultNameTokenPtr[1].start, - resultNameTokenPtr[1].size, /*create*/ 1, envPtr->procPtr); - + resultNameTokenPtr[1].size, /*create*/ 1, envPtr); + if (resultIndex < 0) { + return TCL_ERROR; + } + /* DKF */ if (parsePtr->numWords == 4) { optsNameTokenPtr = TokenAfter(resultNameTokenPtr); @@ -428,7 +438,10 @@ TclCompileCatchCmd( return TCL_ERROR; } optsIndex = TclFindCompiledLocal(optsNameTokenPtr[1].start, - optsNameTokenPtr[1].size, /*create*/ 1, envPtr->procPtr); + optsNameTokenPtr[1].size, /*create*/ 1, envPtr); + if (optsIndex < 0) { + return TCL_ERROR; + } } } @@ -633,7 +646,6 @@ TclCompileDictSetCmd( { Tcl_Token *tokenPtr; int numWords, i; - Proc *procPtr = envPtr->procPtr; DefineLineInformation; /* TIP #280 */ Tcl_Token *varTokenPtr; int dictVarIndex, nameChars; @@ -643,7 +655,7 @@ TclCompileDictSetCmd( * There must be at least one argument after the command. */ - if (parsePtr->numWords < 4 || procPtr == NULL) { + if (parsePtr->numWords < 4) { return TCL_ERROR; } @@ -662,7 +674,10 @@ TclCompileDictSetCmd( if (!TclIsLocalScalar(name, nameChars)) { return TCL_ERROR; } - dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, procPtr); + dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, envPtr); + if (dictVarIndex < 0) { + return TCL_ERROR; + } /* * Remaining words (key path and value to set) can be handled normally. @@ -693,7 +708,6 @@ TclCompileDictIncrCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { - Proc *procPtr = envPtr->procPtr; DefineLineInformation; /* TIP #280 */ Tcl_Token *varTokenPtr, *keyTokenPtr; int dictVarIndex, nameChars, incrAmount; @@ -703,7 +717,7 @@ TclCompileDictIncrCmd( * There must be at least two arguments after the command. */ - if (parsePtr->numWords < 3 || parsePtr->numWords > 4 || procPtr == NULL) { + if (parsePtr->numWords < 3 || parsePtr->numWords > 4) { return TCL_ERROR; } varTokenPtr = TokenAfter(parsePtr->tokenPtr); @@ -751,7 +765,10 @@ TclCompileDictIncrCmd( if (!TclIsLocalScalar(name, nameChars)) { return TCL_ERROR; } - dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, procPtr); + dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, envPtr); + if (dictVarIndex < 0) { + return TCL_ERROR; + } /* * Emit the key and the code to actually do the increment. @@ -808,7 +825,6 @@ TclCompileDictForCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { - Proc *procPtr = envPtr->procPtr; DefineLineInformation; /* TIP #280 */ Tcl_Token *varsTokenPtr, *dictTokenPtr, *bodyTokenPtr; int keyVarIndex, valueVarIndex, nameChars, loopRange, catchRange; @@ -824,7 +840,7 @@ TclCompileDictForCmd( * There must be at least three argument after the command. */ - if (parsePtr->numWords != 4 || procPtr == NULL) { + if (parsePtr->numWords != 4) { return TCL_ERROR; } @@ -859,16 +875,20 @@ TclCompileDictForCmd( ckfree((char *) argv); return TCL_ERROR; } - keyVarIndex = TclFindCompiledLocal(argv[0], nameChars, 1, procPtr); + keyVarIndex = TclFindCompiledLocal(argv[0], nameChars, 1, envPtr); nameChars = strlen(argv[1]); if (!TclIsLocalScalar(argv[1], nameChars)) { ckfree((char *) argv); return TCL_ERROR; } - valueVarIndex = TclFindCompiledLocal(argv[1], nameChars, 1, procPtr); + valueVarIndex = TclFindCompiledLocal(argv[1], nameChars, 1, envPtr); ckfree((char *) argv); + if ((keyVarIndex < 0) || (valueVarIndex < 0)) { + return TCL_ERROR; + } + /* * Allocate a temporary variable to store the iterator reference. The * variable will contain a Tcl_DictSearch reference which will be @@ -876,7 +896,10 @@ TclCompileDictForCmd( * (at which point it should also have been finished with). */ - infoIndex = TclFindCompiledLocal(NULL, 0, 1, procPtr); + infoIndex = TclFindCompiledLocal(NULL, 0, 1, envPtr); + if (infoIndex < 0) { + return TCL_ERROR; + } /* * Preparation complete; issue instructions. Note that this code issues @@ -1007,7 +1030,6 @@ TclCompileDictUpdateCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { - Proc *procPtr = envPtr->procPtr; DefineLineInformation; /* TIP #280 */ const char *name; int i, nameChars, dictIndex, numVars, range, infoIndex; @@ -1019,7 +1041,7 @@ TclCompileDictUpdateCmd( * There must be at least one argument after the command. */ - if (parsePtr->numWords < 5 || procPtr == NULL) { + if (parsePtr->numWords < 5) { return TCL_ERROR; } @@ -1048,7 +1070,10 @@ TclCompileDictUpdateCmd( if (!TclIsLocalScalar(name, nameChars)) { return TCL_ERROR; } - dictIndex = TclFindCompiledLocal(name, nameChars, 1, procPtr); + dictIndex = TclFindCompiledLocal(name, nameChars, 1, envPtr); + if (dictIndex < 0) { + return TCL_ERROR; + } /* * Assemble the instruction metadata. This is complex enough that it is @@ -1093,7 +1118,12 @@ TclCompileDictUpdateCmd( */ duiPtr->varIndices[i] = - TclFindCompiledLocal(name, nameChars, 1, procPtr); + TclFindCompiledLocal(name, nameChars, 1, envPtr); + if (duiPtr->varIndices[i] < 0) { + ckfree((char *) duiPtr); + TclStackFree(interp, keyTokenPtrs); + return TCL_ERROR; + } tokenPtr = TokenAfter(tokenPtr); } if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { @@ -1173,7 +1203,6 @@ TclCompileDictAppendCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { - Proc *procPtr = envPtr->procPtr; DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; int i, dictVarIndex; @@ -1184,7 +1213,7 @@ TclCompileDictAppendCmd( * speed quite so much. ;-) */ - if (parsePtr->numWords<4 || parsePtr->numWords>100 || procPtr==NULL) { + if (parsePtr->numWords<4 || parsePtr->numWords>100) { return TCL_ERROR; } @@ -1202,7 +1231,10 @@ TclCompileDictAppendCmd( if (!TclIsLocalScalar(name, nameChars)) { return TCL_ERROR; } - dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, procPtr); + dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, envPtr); + if (dictVarIndex < 0) { + return TCL_ERROR; + } } /* @@ -1235,7 +1267,6 @@ TclCompileDictLappendCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { - Proc *procPtr = envPtr->procPtr; DefineLineInformation; /* TIP #280 */ Tcl_Token *varTokenPtr, *keyTokenPtr, *valueTokenPtr; int dictVarIndex, nameChars; @@ -1245,7 +1276,7 @@ TclCompileDictLappendCmd( * There must be three arguments after the command. */ - if (parsePtr->numWords != 4 || procPtr == NULL) { + if (parsePtr->numWords != 4) { return TCL_ERROR; } @@ -1260,7 +1291,10 @@ TclCompileDictLappendCmd( if (!TclIsLocalScalar(name, nameChars)) { return TCL_ERROR; } - dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, procPtr); + dictVarIndex = TclFindCompiledLocal(name, nameChars, 1, envPtr); + if (dictVarIndex < 0) { + return TCL_ERROR; + } CompileWord(envPtr, keyTokenPtr, interp, 3); CompileWord(envPtr, valueTokenPtr, interp, 4); TclEmitInstInt4( INST_DICT_LAPPEND, dictVarIndex, envPtr); @@ -1702,13 +1736,13 @@ TclCompileForeachCmd( firstValueTemp = -1; for (loopIndex = 0; loopIndex < numLists; loopIndex++) { tempVar = TclFindCompiledLocal(NULL, /*nameChars*/ 0, - /*create*/ 1, procPtr); + /*create*/ 1, envPtr); if (loopIndex == 0) { firstValueTemp = tempVar; } } loopCtTemp = TclFindCompiledLocal(NULL, /*nameChars*/ 0, - /*create*/ 1, procPtr); + /*create*/ 1, envPtr); /* * Create and initialize the ForeachInfo and ForeachVarList data @@ -1732,7 +1766,7 @@ TclCompileForeachCmd( int nameChars = strlen(varName); varListPtr->varIndexes[j] = TclFindCompiledLocal(varName, - nameChars, /*create*/ 1, procPtr); + nameChars, /*create*/ 1, envPtr); } infoPtr->varLists[loopIndex] = varListPtr; } @@ -2356,7 +2390,7 @@ TclCompileIncrCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, TCL_NO_LARGE_INDEX|TCL_CREATE_VAR, + PushVarName(interp, varTokenPtr, envPtr, TCL_NO_LARGE_INDEX, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); @@ -2499,7 +2533,7 @@ TclCompileLappendCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, TCL_CREATE_VAR, + PushVarName(interp, varTokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); @@ -2606,7 +2640,7 @@ TclCompileLassignCmd( * Generate the next variable name. */ - PushVarName(interp, tokenPtr, envPtr, TCL_CREATE_VAR, &localIndex, + PushVarName(interp, tokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[idx+2]); /* @@ -2943,7 +2977,7 @@ TclCompileLsetCmd( */ varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, TCL_CREATE_VAR, + PushVarName(interp, varTokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); @@ -3445,7 +3479,7 @@ TclCompileSetCmd( */ varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, TCL_CREATE_VAR, + PushVarName(interp, varTokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); @@ -4873,7 +4907,7 @@ PushVarName( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Token *varTokenPtr, /* Points to a variable token. */ CompileEnv *envPtr, /* Holds resulting instructions. */ - int flags, /* TCL_CREATE_VAR or TCL_NO_LARGE_INDEX. */ + int flags, /* TCL_NO_LARGE_INDEX. */ int *localIndexPtr, /* Must not be NULL. */ int *simpleVarNamePtr, /* Must not be NULL. */ int *isScalarPtr, /* Must not be NULL. */ @@ -5038,10 +5072,9 @@ PushVarName( * push its name and look it up at runtime. */ - if ((envPtr->procPtr != NULL) && !hasNsQualifiers) { + if (!hasNsQualifiers) { localIndex = TclFindCompiledLocal(name, nameChars, - /*create*/ flags & TCL_CREATE_VAR, - envPtr->procPtr); + 1, envPtr); if ((flags & TCL_NO_LARGE_INDEX) && (localIndex > 255)) { /* * We'll push the name. @@ -5255,7 +5288,7 @@ CompileComparisonOpCmd( return TCL_ERROR; } else { - int tmpIndex = TclFindCompiledLocal(NULL, 0, 1, envPtr->procPtr); + int tmpIndex = TclFindCompiledLocal(NULL, 0, 1, envPtr); int words; tokenPtr = TokenAfter(parsePtr->tokenPtr); @@ -5701,7 +5734,7 @@ IndexTailVarIfKnown( * only one. */ - if (envPtr->procPtr == NULL) { + if (!EnvHasLVT(envPtr)) { return -1; } @@ -5752,8 +5785,7 @@ IndexTailVarIfKnown( } localIndex = TclFindCompiledLocal(tailName, len, - /*create*/ TCL_CREATE_VAR, - envPtr->procPtr); + 1, envPtr); Tcl_DecrRefCount(tailPtr); return localIndex; } @@ -5849,7 +5881,7 @@ TclCompileUpvarCmd( localTokenPtr = TokenAfter(otherTokenPtr); CompileWord(envPtr, otherTokenPtr, interp, 1); - PushVarName(interp, localTokenPtr, envPtr, TCL_CREATE_VAR, + PushVarName(interp, localTokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); @@ -5942,7 +5974,7 @@ TclCompileNamespaceCmd( localTokenPtr = TokenAfter(otherTokenPtr); CompileWord(envPtr, otherTokenPtr, interp, 1); - PushVarName(interp, localTokenPtr, envPtr, TCL_CREATE_VAR, + PushVarName(interp, localTokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); @@ -6444,7 +6476,7 @@ TclCompileInfoExistsCmd( */ tokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, tokenPtr, envPtr, TCL_CREATE_VAR, &localIndex, + PushVarName(interp, tokenPtr, envPtr, 0, &localIndex, &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); /* diff --git a/generic/tclCompile.c b/generic/tclCompile.c index fd6f25e..187d81e 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.148 2008/05/30 22:54:28 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.149 2008/06/08 03:21:33 msofer Exp $ */ #include "tclInt.h" @@ -1657,7 +1657,7 @@ TclCompileTokens( localVar = -1; if (localVarName != -1) { localVar = TclFindCompiledLocal(name, nameBytes, localVarName, - envPtr->procPtr); + envPtr); } if (localVar < 0) { TclEmitPush(TclRegisterNewLiteral(envPtr, name, nameBytes), @@ -2096,18 +2096,47 @@ TclFindCompiledLocal( int nameBytes, /* Number of bytes in the name. */ int create, /* If 1, allocate a local frame entry for the * variable if it is new. */ - register Proc *procPtr) /* Points to structure describing procedure - * containing the variable reference. */ + CompileEnv *envPtr) /* Points to the current compile environment*/ { register CompiledLocal *localPtr; int localVar = -1; register int i; + Proc *procPtr; /* * If not creating a temporary, does a local variable of the specified * name already exist? */ + procPtr = envPtr->procPtr; + + if (procPtr == NULL) { + /* + * Compiling a non-body script: give it read access to the LVT in the + * current localCache + */ + + LocalCache *cachePtr = envPtr->iPtr->varFramePtr->localCachePtr; + char *localName; + Tcl_Obj **varNamePtr; + int len; + + if (!cachePtr || !name) { + return -1; + } + + varNamePtr = &cachePtr->varName0; + for (i=0; i < cachePtr->numVars; varNamePtr++, i++) { + if (*varNamePtr) { + localName = Tcl_GetStringFromObj(*varNamePtr, &len); + if ((len == nameBytes) && !strncmp(name, localName, len)) { + return i; + } + } + } + return -1; + } + if (name != NULL) { int localCt = procPtr->numCompiledLocals; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 06447df..7e6ff50 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.91 2008/05/02 10:27:05 dkf Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.92 2008/06/08 03:21:33 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -888,7 +888,7 @@ MODULE_SCOPE int TclExecuteByteCode(Tcl_Interp *interp, ByteCode *codePtr); MODULE_SCOPE void TclFinalizeAuxDataTypeTable(void); MODULE_SCOPE int TclFindCompiledLocal(const char *name, int nameChars, - int create, Proc *procPtr); + int create, CompileEnv *envPtr); MODULE_SCOPE LiteralEntry * TclLookupLiteralEntry(Tcl_Interp *interp, Tcl_Obj *objPtr); MODULE_SCOPE int TclFixupForwardJump(CompileEnv *envPtr, diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 89c2066..5bbc366 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.371 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.372 2008/06/08 03:21:33 msofer Exp $ */ #include "tclInt.h" @@ -1463,7 +1463,18 @@ TclCompEvalObj( } } - /* + if (codePtr->procPtr == NULL) { + /* + * Check that any compiled locals do refer to the current proc + * environment! If not, recompile. + */ + + if (codePtr->localCachePtr != iPtr->varFramePtr->localCachePtr) { + goto recompileObj; + } + } + + /* * Increment the code's ref count while it is being executed. If * afterwards no references to it remain, free the code. */ @@ -1493,7 +1504,11 @@ TclCompEvalObj( tclByteCodeType.setFromAnyProc(interp, objPtr); iPtr->invokeCmdFramePtr = NULL; codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr; - goto runCompiledObj; + if (iPtr->varFramePtr->localCachePtr) { + codePtr->localCachePtr = iPtr->varFramePtr->localCachePtr; + codePtr->localCachePtr->refCount++; + } + goto runCompiledObj; done: iPtr->numLevels--; diff --git a/generic/tclProc.c b/generic/tclProc.c index 8aa8779..85f49f9 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.140 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.141 2008/06/08 03:21:33 msofer Exp $ */ #include "tclInt.h" @@ -908,7 +908,7 @@ Tcl_UplevelObjCmd( */ if (objc == 1) { - result = Tcl_EvalObjEx(interp, objv[0], TCL_EVAL_DIRECT); + result = Tcl_EvalObjEx(interp, objv[0], 0); } else { /* * More than one argument: concatenate them together with spaces diff --git a/tests/uplevel.test b/tests/uplevel.test index b8bbbb7..f676290 100644 --- a/tests/uplevel.test +++ b/tests/uplevel.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: uplevel.test,v 1.8 2004/05/19 10:47:28 dkf Exp $ +# RCS: @(#) $Id: uplevel.test,v 1.9 2008/06/08 03:21:33 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -126,6 +126,73 @@ test uplevel-6.1 {uplevel and shadowed cmds} { lappend res [namespace eval ns1 a2] } {::ns1 :: ::ns1 ::} +# +# These tests verify that upleveled scripts run in the correct level and access +# the proper variables. +# + +test uplevel-7.1 {var access, no LVT in either level} -setup { + set x 1 + unset -nocomplain y z +} -body { + namespace eval foo { + set x 2 + set y 2 + uplevel 1 { + set x 3 + set y 3 + set z 3 + } + } + list $x $y $z +} -cleanup { + namespace delete foo + unset -nocomplain x y z +} -result {3 3 3} + +test uplevel-7.2 {var access, no LVT in upper level} -setup { + set x 1 + unset -nocomplain y z +} -body { + proc foo {} { + set x 2 + set y 2 + uplevel 1 { + set x 3 + set y 3 + set z 3 + } + } + foo + list $x $y $z +} -cleanup { + rename foo {} + unset -nocomplain x y z +} -result {3 3 3} + +test uplevel-7.3 {var access, LVT in upper level} -setup { + proc moo {} { + set x 1; #var in LVT + unset -nocomplain y z + foo + list $x $y $z + } +} -body { + proc foo {} { + set x 2 + set y 2 + uplevel 1 { + set x 3 + set y 3 + set z 3 + } + } + foo + moo +} -cleanup { + rename foo {} + rename moo {} +} -result {3 3 3} # cleanup ::tcltest::cleanupTests -- cgit v0.12 From 903ca7048a4ab89a4962196a979014681d5db909 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 8 Jun 2008 23:13:08 +0000 Subject: Plug leak. [Bug 1987817] --- ChangeLog | 40 +++++++++++++++++++++++----------------- generic/tclOOCall.c | 22 +++++++++++++++++----- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0df1673..0af84d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-09 Donal K. Fellows + + * generic/tclOOCall.c (TclOOGetSortedMethodList): Plug memory leak + that occurred when all methods were hidden. [Bug 1987817] + 2008-06-08 Miguel Sofer * generic/tclBasic.c: Compilation of uplevel scripts, allow * generic/tclCompCmds.c: non-body compiled scripts to access the @@ -6,41 +11,42 @@ * generic/tclExecute.c: compiler. This is [Patch 1973096] * generic/tclProc.c: * tests/uplevel.test: - 2008-06-06 Andreas Kupries TIP #230 IMPLEMENTATION - * generic/tclIOCmd.c: Integration of transform commands into 'chan' ensemble. + * generic/tclIOCmd.c: Integration of transform commands into 'chan' + ensemble. * generic/tclInt.h: Definitions of the transform commands. * generic/tclIORTrans.c: Implementation of the reflection transforms. - * tests/chan.test: Tests updated for new sub-commands of 'chan'. + * tests/chan.test: Tests updated for new sub-commands of 'chan'. * tests/ioCmd.test: Tests updated for new sub-commands of 'chan'. - * tests/ioTrans.test: Whole new set of tests for the reflection transform. + * tests/ioTrans.test: Whole new set of tests for the reflection + transform. * unix/Makefile.in: Integration of new files into build rules. - * win/Makefile.in: Integration of new files into build rules. - * win/makefile.vc: Integration of new files into build rules. + * win/Makefile.in: Integration of new files into build rules. + * win/makefile.vc: Integration of new files into build rules. - NOTE: The file 'tclIORTrans.c' has a lot of code in common with - the file 'tclIORChan.c', as that made it much easier to - develop the reference implementation as a separate - module. Now that the transforms have been committed the one - thing left to do is to go over both modules and see which of - the common parts we can factor out and share. + NOTE: The file 'tclIORTrans.c' has a lot of code in common with the + file 'tclIORChan.c', as that made it much easier to develop the + reference implementation as a separate module. Now that the + transforms have been committed the one thing left to do is to go + over both modules and see which of the common parts we can + factor out and share. 2008-06-04 Pat Thoyts * generic/tclBinary.c: TIP #317 implementation - * tests/binary.test: + * tests/binary.test: 2008-06-02 Kevin B. Kenny * generic/tclOO.c (ReleaseClassContents): Fix the one remaining - valgrind complaint about oo.test, caused by failing to protect - the Object as well as the Class corresponding to a subclass being - deleted and hence getting a freed-memory read when attempting to - delete the class command. [Bug 1981001] + valgrind complaint about oo.test, caused by failing to protect the + Object as well as the Class corresponding to a subclass being deleted + and hence getting a freed-memory read when attempting to delete the + class command. [Bug 1981001] 2008-06-01 Donal K. Fellows diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index 8a4024d..c5c9418 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.5 2008/05/31 23:35:27 das Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.6 2008/06/08 23:13:09 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -431,8 +431,14 @@ TclOOGetSortedMethodList( * dealing with public method names. */ - qsort((void *) strings, (unsigned) i, sizeof(char *), CmpStr); - *stringsPtr = strings; + if (i > 0) { + if (i > 1) { + qsort((void *) strings, (unsigned) i, sizeof(char *), CmpStr); + } + *stringsPtr = strings; + } else { + ckfree((char *) strings); + } } Tcl_DeleteHashTable(&names); @@ -492,8 +498,14 @@ TclOOGetSortedClassMethodList( * dealing with public method names. */ - qsort((void *) strings, (unsigned) i, sizeof(char *), CmpStr); - *stringsPtr = strings; + if (i > 0) { + if (i > 1) { + qsort((void *) strings, (unsigned) i, sizeof(char *), CmpStr); + } + *stringsPtr = strings; + } else { + ckfree((char *) strings); + } } Tcl_DeleteHashTable(&names); -- cgit v0.12 From f572d15108ea68aef3ff8e2c3de3899f8a50f25f Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 10 Jun 2008 03:35:15 +0000 Subject: * generic/tclIORTrans.c (ReflectInput): Fixed a bug triggered by Pat Thoyts . Reset the EOF flag after draining the Tcl level into the result buffer, to make sure that the result buffer will be drained as well by repeated calls to ReflectInput should it contain more than one buffer-full of data. Without that reset the higher I/O system will not call on ReflectInput anymore due to the assumed EOF, thus losing the data which did not fit in the buffer of the call which caused the eof and drain. --- ChangeLog | 12 ++++++++++++ generic/tclIORTrans.c | 9 ++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0af84d6..dce1163 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-06-09 Andreas Kupries + + * generic/tclIORTrans.c (ReflectInput): Fixed a bug triggered by + Pat Thoyts . Reset the EOF flag + after draining the Tcl level into the result buffer, to make sure + that the result buffer will be drained as well by repeated calls + to ReflectInput should it contain more than one buffer-full of + data. Without that reset the higher I/O system will not call on + ReflectInput anymore due to the assumed EOF, thus losing the data + which did not fit in the buffer of the call which caused the eof + and drain. + 2008-06-09 Donal K. Fellows * generic/tclOOCall.c (TclOOGetSortedMethodList): Plug memory leak diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 908c480..c309afc 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.1 2008/06/06 19:46:37 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.2 2008/06/10 03:35:16 andreas_kupries Exp $ */ #include @@ -1065,8 +1065,8 @@ ReflectInput( /* * The buffer is exhausted, but the caller wants even more. We now * have to go to the underlying channel, get more bytes and then - * transform them for delivery. We may not get that we want (full EOF - * or temporary out of data). + * transform them for delivery. We may not get what we want (full EOF + * or temporarily out of data). */ /* @@ -1158,6 +1158,9 @@ ReflectInput( /* The drain delivered nothing */ return gotBytes; } + + /* Reset eof, force caller to drain result buffer */ + ((Channel*) rtPtr->parent)->state->flags &= ~CHANNEL_EOF; continue; /* at: while (toRead > 0) */ } } /* read == 0 */ -- cgit v0.12 From 27cef4c3985bd16df029f37ca9023ed02409ac9b Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 10 Jun 2008 18:06:36 +0000 Subject: * tests/ioTrans.test (iortrans.tf-6.1): Fixed the [Bug 1988552], reported by Kevin. Have to close the channel before removal of the file. Fixed same bug in test 'iortrans.tf-11.0', after fixing missing cleanup of the file in 'iortrans.tf-11.*'. Lastly fixed the names of the threaded tests 'iortrans-8.*' to the correct 'iortrans.tf-8.*'. --- ChangeLog | 11 ++++++++++- tests/ioTrans.test | 11 ++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index dce1163..8b7d532 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,13 @@ -2008-06-09 Andreas Kupries +2008-06-10 Andreas Kupries + + * tests/ioTrans.test (iortrans.tf-6.1): Fixed the [Bug 1988552], + reported by Kevin. Have to close the channel before removal of + the file. Fixed same bug in test 'iortrans.tf-11.0', after + fixing missing cleanup of the file in 'iortrans.tf-11.*'. Lastly + fixed the names of the threaded tests 'iortrans-8.*' to the + correct 'iortrans.tf-8.*'. + +2008-06-09 Andreas Kupries * generic/tclIORTrans.c (ReflectInput): Fixed a bug triggered by Pat Thoyts . Reset the EOF flag diff --git a/tests/ioTrans.test b/tests/ioTrans.test index 070aab1..3bee19e 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioTrans.test,v 1.1 2008/06/06 19:46:42 andreas_kupries Exp $ +# RCS: @(#) $Id: ioTrans.test,v 1.2 2008/06/10 18:06:39 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1245,6 +1245,8 @@ test iortrans.tf-6.1 {chan read, read limits} -match glob -body { set c [chan push [tempchan] foo] notes [inthread $c { note [read $c 10] + close $c + set notes } c] tempdone rename foo {} @@ -1320,7 +1322,7 @@ test iortrans.tf-7.3 {clear, any result is ignored} -match glob -body { # --- === *** ########################### # method flush (via seek, close) -test iortrans-8.1 {seek flushes write buffers, ignores data} -match glob -body { +test iortrans.tf-8.1 {seek flushes write buffers, ignores data} -match glob -body { set res {} proc foo {args} { oninit flush; onfinal; track @@ -1346,7 +1348,7 @@ test iortrans-8.1 {seek flushes write buffers, ignores data} -match glob -body { set res } -result {{flush rt*} {flush rt*} | {} | {teXt data}} -constraints {testchannel testthread} -test iortrans-8.2 {close flushes write buffers, writes data} -match glob -body { +test iortrans.tf-8.2 {close flushes write buffers, writes data} -match glob -body { set res {} proc foo {args} { oninit flush; track ; onfinal @@ -1404,6 +1406,7 @@ test iortrans.tf-11.0 {origin thread of moved transform gone} -match glob -body lappend res [catch {testthread send $tidb [list gets $chan]} msg] $msg lappend res [catch {testthread send $tidb [list close $chan]} msg] $msg tcltest::threadReap + tempdone set res # The 'tell' is ok, as it passed through the transform to the base # channel without invoking the transform handler. @@ -1445,11 +1448,13 @@ test iortrans.tf-11.1 {origin thread of moved transform destroyed during access} # loop to wait for the response from B after 2000 catch { puts $chan shoo } res + catch { close $chan } testthread send -async $mid [list set ::res $res] } vwait ::res tcltest::threadReap + tempdone set res } -constraints {testchannel testthread} \ -result {Owner lost} -- cgit v0.12 From 22ce20b0712b45f83d2781416637d4f220de4478 Mon Sep 17 00:00:00 2001 From: jenglish Date: Wed, 11 Jun 2008 01:30:10 +0000 Subject: UtfToUtfProc: Avoid unwanted sign extension when converting incomplete UTF-8 sequences. See [Bug 1908443] for details. --- ChangeLog | 6 ++++++ generic/tclEncoding.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b7d532..56c825e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-10 Joe English + + * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension + when converting incomplete UTF-8 sequences. See [Bug 1908443] + for details. + 2008-06-10 Andreas Kupries * tests/ioTrans.test (iortrans.tf-6.1): Fixed the [Bug 1988552], diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index ff73502..456c8a4 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.60 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.61 2008/06/11 01:30:11 jenglish Exp $ */ #include "tclInt.h" @@ -2292,7 +2292,7 @@ UtfToUtfProc( * incomplete char its byts are made to represent themselves. */ - ch = (Tcl_UniChar) *src; + ch = (unsigned char) *src; src += 1; dst += Tcl_UniCharToUtf(ch, dst); } else { -- cgit v0.12 From 7af70926531a35ea560300e245d6682f84014b16 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:26:58 +0000 Subject: * macosx/Tcl.xcodeproj/project.pbxproj: add tclIORTrans.c; updates and cleanup for Xcode 3.1/Leopard. * macosx/Tcl.xcode/project.pbxproj: sync Tcl.xcodeproj changes. * macosx/README: document new build configs. --- macosx/README | 24 +++-- macosx/Tcl.xcode/project.pbxproj | 196 ++++++++++++++++++++++++++++++++++- macosx/Tcl.xcodeproj/project.pbxproj | 79 +++++--------- 3 files changed, 234 insertions(+), 65 deletions(-) diff --git a/macosx/README b/macosx/README index 1c1d790..ebe2bdf 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ Tcl Mac OS X README ------------------- -RCS: @(#) $Id: README,v 1.17 2008/05/31 23:33:51 das Exp $ +RCS: @(#) $Id: README,v 1.18 2008/06/12 06:26:58 das Exp $ This is the README file for the Mac OS X/Darwin version of Tcl. @@ -91,14 +91,17 @@ take care to only use the project matching your DevTools and OS version: * Tcl.pbproj for Xcode or ProjectBuilder on 10.3 and earlier, this has a 'Tcl' target that simply calls through to the tcl/macosx/GNUMakefile. * Tcl.xcode for Xcode 2.4 on 10.4 and Xcode 2.5 on 10.4 and later, which - additionally has a native 'tcltest' target useful for debugging, this - target's 'Debug' build configuration has ZeroLink and Fix&Continue - enabled, use the 'DebugNoFixZL' build configuration if you need a debug - build without these features. The following additional build - configurations are available for the 'Tcl' and 'tcltest' targets: + additionally has native 'tcltest' and 'tests' targets for debugging and + running the testsuite, these targets' 'Debug' build configuration has + ZeroLink and Fix&Continue enabled, use the 'DebugNoFixZL' build + configuration if you need a debug build without these features. The + following build configurations are available: 'DebugUnthreaded': debug build with threading turned off. + 'DebugNoCF': debug build with corefoundation turned off. + 'DebugNoCFUnthreaded': debug build with corefoundation & threading off. 'DebugMemCompile': debug build with memory and bytecode debugging on. 'DebugLeaks': debug build with PURIFY defined. + 'DebugGCov': debug build with generation of gcov data files enabled. 'Debug64bit': builds the targets as 64bit with debugging enabled, requires a 64bit capable processor (i.e. G5 or Core2/Xeon). 'ReleaseUniversal': builds the targets as universal binaries for the @@ -112,9 +115,16 @@ take care to only use the project matching your DevTools and OS version: 10.2.8 SDK, useful to verify on Tiger that building on Jaguar would succeed. * Tcl.xcodeproj for Xcode 3.1 on 10.5 and later, which has the following - additional build configuration: + additional build configurations: 'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds against the 10.5 SDK on Leopard (with 10.5 deployment target). + 'Debug gcc42': same as 'Debug' but builds with gcc 4.2. + 'Debug llvmgcc42': same as 'Debug' but builds with llvm-gcc 4.2. + 'ReleaseUniversal gcc42': same as 'ReleaseUniversal' but builds with + gcc 4.2. + 'ReleaseUniversal llvmgcc42': same as 'ReleaseUniversal' but builds + with llvm-gcc 4.2. + Note that all non-SDK configurations have 10.5 deployment target. Notes about the native targets of the Xcode projects: * the Xcode projects refer to the toplevel tcl source directory through the diff --git a/macosx/Tcl.xcode/project.pbxproj b/macosx/Tcl.xcode/project.pbxproj index 0e00120..1df37f2 100644 --- a/macosx/Tcl.xcode/project.pbxproj +++ b/macosx/Tcl.xcode/project.pbxproj @@ -8,6 +8,15 @@ /* Begin PBXBuildFile section */ F90509300913A72400327603 /* tclAppInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445508F272B9004A47F5 /* tclAppInit.c */; settings = {COMPILER_FLAGS = "-DTCL_TEST -DTCL_BUILDTIME_LIBRARY=\\\"$(TCL_SRCROOT)/library\\\""; }; }; + F93599B30DF1F75400E04F67 /* tclOO.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B20DF1F75400E04F67 /* tclOO.c */; }; + F93599B70DF1F76100E04F67 /* tclOOBasic.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B60DF1F76100E04F67 /* tclOOBasic.c */; }; + F93599B90DF1F76600E04F67 /* tclOOCall.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599B80DF1F76600E04F67 /* tclOOCall.c */; }; + F93599BC0DF1F77000E04F67 /* tclOODefineCmds.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */; }; + F93599BE0DF1F77400E04F67 /* tclOOInfo.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599BD0DF1F77400E04F67 /* tclOOInfo.c */; }; + F93599C20DF1F78300E04F67 /* tclOOMethod.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C10DF1F78300E04F67 /* tclOOMethod.c */; }; + F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C30DF1F78800E04F67 /* tclOOStubInit.c */; }; + F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */; }; + F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */; }; F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07408F2820D005CB29B /* CoreFoundation.framework */; }; F96D456F08F272BB004A47F5 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED008F272A7004A47F5 /* regcomp.c */; }; F96D457208F272BB004A47F5 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED308F272A7004A47F5 /* regerror.c */; }; @@ -176,6 +185,32 @@ /* Begin PBXFileReference section */ 8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; + F92D7F100DE777240033A13A /* tsdPerf.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tsdPerf.tcl; sourceTree = ""; }; + F92D7F140DE777670033A13A /* tsdPerf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsdPerf.c; sourceTree = ""; }; + F93599B20DF1F75400E04F67 /* tclOO.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOO.c; sourceTree = ""; }; + F93599B40DF1F75900E04F67 /* tclOO.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclOO.decls; sourceTree = ""; }; + F93599B50DF1F75D00E04F67 /* tclOO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOO.h; sourceTree = ""; }; + F93599B60DF1F76100E04F67 /* tclOOBasic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOBasic.c; sourceTree = ""; }; + F93599B80DF1F76600E04F67 /* tclOOCall.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOCall.c; sourceTree = ""; }; + F93599BA0DF1F76A00E04F67 /* tclOODecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOODecls.h; sourceTree = ""; }; + F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOODefineCmds.c; sourceTree = ""; }; + F93599BD0DF1F77400E04F67 /* tclOOInfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOInfo.c; sourceTree = ""; }; + F93599BF0DF1F77900E04F67 /* tclOOInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOOInt.h; sourceTree = ""; }; + F93599C00DF1F77D00E04F67 /* tclOOIntDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOOIntDecls.h; sourceTree = ""; }; + F93599C10DF1F78300E04F67 /* tclOOMethod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOMethod.c; sourceTree = ""; }; + F93599C30DF1F78800E04F67 /* tclOOStubInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOStubInit.c; sourceTree = ""; }; + F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOOStubLib.c; sourceTree = ""; }; + F93599C80DF1F81900E04F67 /* oo.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = oo.test; sourceTree = ""; }; + F93599CF0DF1F87F00E04F67 /* Class.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Class.3; sourceTree = ""; }; + F93599D00DF1F89E00E04F67 /* class.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = class.n; sourceTree = ""; }; + F93599D20DF1F8DF00E04F67 /* copy.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = copy.n; sourceTree = ""; }; + F93599D30DF1F8F500E04F67 /* define.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = define.n; sourceTree = ""; }; + F93599D40DF1F91900E04F67 /* Method.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = Method.3; sourceTree = ""; }; + F93599D50DF1F93700E04F67 /* my.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = my.n; sourceTree = ""; }; + F93599D60DF1F95000E04F67 /* next.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = next.n; sourceTree = ""; }; + F93599D70DF1F96800E04F67 /* object.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = object.n; sourceTree = ""; }; + F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = ""; }; + F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORTrans.c; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = ""; }; F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; F96D3DFA08F272A4004A47F5 /* ChangeLog */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = ChangeLog; sourceTree = ""; }; @@ -702,7 +737,6 @@ F96D437B08F272B6004A47F5 /* io.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = io.test; sourceTree = ""; }; F96D437C08F272B6004A47F5 /* ioCmd.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ioCmd.test; sourceTree = ""; }; F96D437D08F272B6004A47F5 /* iogt.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = iogt.test; sourceTree = ""; }; - F96D437E08F272B6004A47F5 /* ioUtil.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = ioUtil.test; sourceTree = ""; }; F96D437F08F272B6004A47F5 /* join.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = join.test; sourceTree = ""; }; F96D438008F272B6004A47F5 /* lindex.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = lindex.test; sourceTree = ""; }; F96D438108F272B6004A47F5 /* link.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = link.test; sourceTree = ""; }; @@ -931,7 +965,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.11 2008/04/15 10:55:30 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.12 2008/06/12 06:26:58 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1001,12 +1035,15 @@ F96D3E1108F272A5004A47F5 /* cd.n */, F96D3E1208F272A5004A47F5 /* chan.n */, F96D3E1308F272A5004A47F5 /* ChnlStack.3 */, + F93599CF0DF1F87F00E04F67 /* Class.3 */, + F93599D00DF1F89E00E04F67 /* class.n */, F96D3E1408F272A5004A47F5 /* clock.n */, F96D3E1508F272A5004A47F5 /* close.n */, F96D3E1608F272A5004A47F5 /* CmdCmplt.3 */, F96D3E1708F272A5004A47F5 /* Concat.3 */, F96D3E1808F272A5004A47F5 /* concat.n */, F96D3E1908F272A5004A47F5 /* continue.n */, + F93599D20DF1F8DF00E04F67 /* copy.n */, F96D3E1A08F272A5004A47F5 /* CrtChannel.3 */, F96D3E1B08F272A5004A47F5 /* CrtChnlHdlr.3 */, F96D3E1C08F272A5004A47F5 /* CrtCloseHdlr.3 */, @@ -1019,6 +1056,7 @@ F96D3E2308F272A5004A47F5 /* CrtTimerHdlr.3 */, F96D3E2408F272A5004A47F5 /* CrtTrace.3 */, F96D3E2508F272A5004A47F5 /* dde.n */, + F93599D30DF1F8F500E04F67 /* define.n */, F96D3E2608F272A5004A47F5 /* DetachPids.3 */, F96D3E2708F272A5004A47F5 /* dict.n */, F96D3E2808F272A5004A47F5 /* DictObj.3 */, @@ -1096,11 +1134,15 @@ F96D3E7008F272A6004A47F5 /* man.macros */, F96D3E7108F272A6004A47F5 /* mathfunc.n */, F96D3E7208F272A6004A47F5 /* memory.n */, + F93599D40DF1F91900E04F67 /* Method.3 */, F96D3E7308F272A6004A47F5 /* msgcat.n */, + F93599D50DF1F93700E04F67 /* my.n */, F96D3E7408F272A6004A47F5 /* Namespace.3 */, F96D3E7508F272A6004A47F5 /* namespace.n */, + F93599D60DF1F95000E04F67 /* next.n */, F96D3E7608F272A6004A47F5 /* Notifier.3 */, F96D3E7708F272A6004A47F5 /* Object.3 */, + F93599D70DF1F96800E04F67 /* object.n */, F96D3E7808F272A6004A47F5 /* ObjectType.3 */, F96D3E7908F272A6004A47F5 /* open.n */, F96D3E7A08F272A6004A47F5 /* OpenFileChnl.3 */, @@ -1134,6 +1176,7 @@ F96D3E9408F272A6004A47F5 /* SaveResult.3 */, F96D3E9508F272A6004A47F5 /* scan.n */, F96D3E9608F272A6004A47F5 /* seek.n */, + F93599D80DF1F98300E04F67 /* self.n */, F96D3E9708F272A6004A47F5 /* set.n */, F96D3E9808F272A6004A47F5 /* SetChanErr.3 */, F96D3E9908F272A6004A47F5 /* SetErrno.3 */, @@ -1248,6 +1291,7 @@ F96D3F0008F272A7004A47F5 /* tclIOCmd.c */, F96D3F0108F272A7004A47F5 /* tclIOGT.c */, F96D3F0208F272A7004A47F5 /* tclIORChan.c */, + F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */, F96D3F0308F272A7004A47F5 /* tclIOSock.c */, F96D3F0408F272A7004A47F5 /* tclIOUtil.c */, F96D3F0508F272A7004A47F5 /* tclLink.c */, @@ -1259,6 +1303,19 @@ F96D3F0B08F272A7004A47F5 /* tclNamesp.c */, F96D3F0C08F272A7004A47F5 /* tclNotify.c */, F96D3F0D08F272A7004A47F5 /* tclObj.c */, + F93599B20DF1F75400E04F67 /* tclOO.c */, + F93599B40DF1F75900E04F67 /* tclOO.decls */, + F93599B50DF1F75D00E04F67 /* tclOO.h */, + F93599B60DF1F76100E04F67 /* tclOOBasic.c */, + F93599B80DF1F76600E04F67 /* tclOOCall.c */, + F93599BA0DF1F76A00E04F67 /* tclOODecls.h */, + F93599BB0DF1F77000E04F67 /* tclOODefineCmds.c */, + F93599BD0DF1F77400E04F67 /* tclOOInfo.c */, + F93599BF0DF1F77900E04F67 /* tclOOInt.h */, + F93599C00DF1F77D00E04F67 /* tclOOIntDecls.h */, + F93599C10DF1F78300E04F67 /* tclOOMethod.c */, + F93599C30DF1F78800E04F67 /* tclOOStubInit.c */, + F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */, F96D3F0E08F272A7004A47F5 /* tclPanic.c */, F96D3F0F08F272A7004A47F5 /* tclParse.c */, F96D3F1108F272A7004A47F5 /* tclPathObj.c */, @@ -1600,7 +1657,6 @@ F96D437B08F272B6004A47F5 /* io.test */, F96D437C08F272B6004A47F5 /* ioCmd.test */, F96D437D08F272B6004A47F5 /* iogt.test */, - F96D437E08F272B6004A47F5 /* ioUtil.test */, F96D437F08F272B6004A47F5 /* join.test */, F96D438008F272B6004A47F5 /* lindex.test */, F96D438108F272B6004A47F5 /* link.test */, @@ -1625,6 +1681,7 @@ F96D439208F272B7004A47F5 /* namespace.test */, F96D439308F272B7004A47F5 /* notify.test */, F96D439408F272B7004A47F5 /* obj.test */, + F93599C80DF1F81900E04F67 /* oo.test */, F96D439508F272B7004A47F5 /* opt.test */, F96D439608F272B7004A47F5 /* package.test */, F96D439708F272B7004A47F5 /* parse.test */, @@ -1716,6 +1773,8 @@ F96D443708F272B9004A47F5 /* tclmin.wse */, F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */, F96D443A08F272B9004A47F5 /* tclZIC.tcl */, + F92D7F140DE777670033A13A /* tsdPerf.c */, + F92D7F100DE777240033A13A /* tsdPerf.tcl */, F96D443B08F272B9004A47F5 /* uniClass.tcl */, F96D443C08F272B9004A47F5 /* uniParse.tcl */, ); @@ -2021,6 +2080,7 @@ F96D459F08F272BC004A47F5 /* tclIOCmd.c in Sources */, F96D45A008F272BC004A47F5 /* tclIOGT.c in Sources */, F96D45A108F272BC004A47F5 /* tclIORChan.c in Sources */, + F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */, F96D45A208F272BC004A47F5 /* tclIOSock.c in Sources */, F96D45A308F272BC004A47F5 /* tclIOUtil.c in Sources */, F96D45A408F272BC004A47F5 /* tclLink.c in Sources */, @@ -2031,6 +2091,14 @@ F96D45AA08F272BC004A47F5 /* tclNamesp.c in Sources */, F96D45AB08F272BC004A47F5 /* tclNotify.c in Sources */, F96D45AC08F272BC004A47F5 /* tclObj.c in Sources */, + F93599B30DF1F75400E04F67 /* tclOO.c in Sources */, + F93599B70DF1F76100E04F67 /* tclOOBasic.c in Sources */, + F93599B90DF1F76600E04F67 /* tclOOCall.c in Sources */, + F93599BC0DF1F77000E04F67 /* tclOODefineCmds.c in Sources */, + F93599BE0DF1F77400E04F67 /* tclOOInfo.c in Sources */, + F93599C20DF1F78300E04F67 /* tclOOMethod.c in Sources */, + F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */, + F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */, F96D45AD08F272BC004A47F5 /* tclPanic.c in Sources */, F96D45AE08F272BC004A47F5 /* tclParse.c in Sources */, F96D45B008F272BC004A47F5 /* tclPathObj.c in Sources */, @@ -2224,6 +2292,46 @@ }; name = DebugMemCompile; }; + F9359B250DF212DA00E04F67 /* DebugGCov */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; + MACOSX_DEPLOYMENT_TARGET = 10.2; + OTHER_LDFLAGS = ( + "$(OTHER_LDFLAGS)", + "-lgcov", + ); + PREBINDING = NO; + }; + name = DebugGCov; + }; + F9359B260DF212DA00E04F67 /* DebugGCov */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = DebugGCov; + }; + F9359B270DF212DA00E04F67 /* DebugGCov */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = DebugGCov; + }; + F9359B280DF212DA00E04F67 /* DebugGCov */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = "-notfile http.test"; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = DebugGCov; + }; F95CC8AC09158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2412,6 +2520,76 @@ }; name = Debug64bit; }; + F987512F0DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-corefoundation"; + MACOSX_DEPLOYMENT_TARGET = 10.2; + PREBINDING = NO; + }; + name = DebugNoCF; + }; + F98751300DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = DebugNoCF; + }; + F98751310DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = DebugNoCF; + }; + F98751320DE7B57E00B1C9EC /* DebugNoCF */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = DebugNoCF; + }; + F98751330DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-threads --disable-corefoundation"; + MACOSX_DEPLOYMENT_TARGET = 10.2; + PREBINDING = NO; + }; + name = DebugNoCFUnthreaded; + }; + F98751340DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = DebugNoCFUnthreaded; + }; + F98751350DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = DebugNoCFUnthreaded; + }; + F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = DebugNoCFUnthreaded; + }; F99EE73B0BE835310060D4AF /* DebugUnthreaded */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2596,8 +2774,11 @@ F95CC8AC09158F3100EA5ACE /* Debug */, F95CC8AE09158F3100EA5ACE /* DebugNoFixZL */, F99EE73B0BE835310060D4AF /* DebugUnthreaded */, + F98751300DE7B57E00B1C9EC /* DebugNoCF */, + F98751340DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084370BB93D2800CD0B9E /* DebugMemCompile */, F99EE73C0BE835310060D4AF /* DebugLeaks */, + F9359B260DF212DA00E04F67 /* DebugGCov */, F97AED1B0B660B2100310EA2 /* Debug64bit */, F95CC8AD09158F3100EA5ACE /* Release */, F91BCC4F093152310042A6BF /* ReleaseUniversal */, @@ -2614,8 +2795,11 @@ F95CC8B109158F3100EA5ACE /* Debug */, F95CC8B309158F3100EA5ACE /* DebugNoFixZL */, F99EE73D0BE835310060D4AF /* DebugUnthreaded */, + F98751310DE7B57E00B1C9EC /* DebugNoCF */, + F98751350DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084380BB93D2800CD0B9E /* DebugMemCompile */, F99EE73E0BE835310060D4AF /* DebugLeaks */, + F9359B270DF212DA00E04F67 /* DebugGCov */, F97AED1C0B660B2100310EA2 /* Debug64bit */, F95CC8B209158F3100EA5ACE /* Release */, F91BCC50093152310042A6BF /* ReleaseUniversal */, @@ -2632,8 +2816,11 @@ F95CC8B609158F3100EA5ACE /* Debug */, F95CC8B809158F3100EA5ACE /* DebugNoFixZL */, F99EE7410BE835310060D4AF /* DebugUnthreaded */, + F987512F0DE7B57E00B1C9EC /* DebugNoCF */, + F98751330DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F930843A0BB93D2800CD0B9E /* DebugMemCompile */, F99EE7420BE835310060D4AF /* DebugLeaks */, + F9359B250DF212DA00E04F67 /* DebugGCov */, F97AED1E0B660B2100310EA2 /* Debug64bit */, F95CC8B709158F3100EA5ACE /* Release */, F91BCC51093152310042A6BF /* ReleaseUniversal */, @@ -2650,8 +2837,11 @@ F97258A90A86873D00096C78 /* Debug */, F97258AB0A86873D00096C78 /* DebugNoFixZL */, F99EE73F0BE835310060D4AF /* DebugUnthreaded */, + F98751320DE7B57E00B1C9EC /* DebugNoCF */, + F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, F93084390BB93D2800CD0B9E /* DebugMemCompile */, F99EE7400BE835310060D4AF /* DebugLeaks */, + F9359B280DF212DA00E04F67 /* DebugGCov */, F97AED1D0B660B2100310EA2 /* Debug64bit */, F97258AA0A86873D00096C78 /* Release */, F97258AC0A86873D00096C78 /* ReleaseUniversal */, diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 4c3a88d..f2880b2 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ F93599C20DF1F78300E04F67 /* tclOOMethod.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C10DF1F78300E04F67 /* tclOOMethod.c */; }; F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C30DF1F78800E04F67 /* tclOOStubInit.c */; }; F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */; }; + F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */; }; F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07408F2820D005CB29B /* CoreFoundation.framework */; }; F96D456F08F272BB004A47F5 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED008F272A7004A47F5 /* regcomp.c */; }; F96D457208F272BB004A47F5 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED308F272A7004A47F5 /* regerror.c */; }; @@ -210,6 +211,7 @@ F93599D60DF1F95000E04F67 /* next.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = next.n; sourceTree = ""; }; F93599D70DF1F96800E04F67 /* object.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = object.n; sourceTree = ""; }; F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = ""; }; + F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORTrans.c; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = ""; }; F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; F96D3DFA08F272A4004A47F5 /* ChangeLog */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = ChangeLog; sourceTree = ""; }; @@ -965,7 +967,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.35 2008/06/01 00:29:09 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.36 2008/06/12 06:26:58 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1292,6 +1294,7 @@ F96D3F0008F272A7004A47F5 /* tclIOCmd.c */, F96D3F0108F272A7004A47F5 /* tclIOGT.c */, F96D3F0208F272A7004A47F5 /* tclIORChan.c */, + F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */, F96D3F0308F272A7004A47F5 /* tclIOSock.c */, F96D3F0408F272A7004A47F5 /* tclIOUtil.c */, F96D3F0508F272A7004A47F5 /* tclLink.c */, @@ -1955,7 +1958,7 @@ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - BuildIndependentTargetsInParallel = NO; + BuildIndependentTargetsInParallel = YES; }; buildConfigurationList = F95CC8B509158F3100EA5ACE /* Build configuration list for PBXProject "Tcl" */; compatibilityVersion = "Xcode 3.1"; @@ -2088,6 +2091,7 @@ F96D459F08F272BC004A47F5 /* tclIOCmd.c in Sources */, F96D45A008F272BC004A47F5 /* tclIOGT.c in Sources */, F96D45A108F272BC004A47F5 /* tclIORChan.c in Sources */, + F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */, F96D45A208F272BC004A47F5 /* tclIOSock.c in Sources */, F96D45A308F272BC004A47F5 /* tclIOUtil.c in Sources */, F96D45A408F272BC004A47F5 /* tclLink.c in Sources */, @@ -2249,18 +2253,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ( - ppc, - ppc64, - i386, - x86_64, - ); - CFLAGS = "-arch ppc -arch ppc64 -arch i386 -arch x86_64 $(CFLAGS)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_LDFLAGS = ( - "-Wl,-no_arch_warnings", - "$(OTHER_LDFLAGS)", - ); PREBINDING = NO; }; name = ReleaseUniversal; @@ -2378,7 +2373,6 @@ ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = tcltest; - ZERO_LINK = YES; }; name = Debug; }; @@ -2410,7 +2404,7 @@ baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { MACOSX_DEPLOYMENT_TARGET = 10.5; - PREBINDING = YES; + PREBINDING = NO; }; name = Release; }; @@ -2640,7 +2634,6 @@ ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = tcltest; - ZERO_LINK = YES; }; name = "Debug gcc42"; }; @@ -2659,8 +2652,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - GCC = "$(DEVELOPER_DIR)/usr/bin/llvm-gcc"; - GCC_VERSION = 4.2; + CC = "$(DEVELOPER_DIR)/usr/bin/llvm-gcc-4.2"; + GCC_VERSION = com.apple.compilers.llvmgcc42; MACOSX_DEPLOYMENT_TARGET = 10.5; PREBINDING = NO; }; @@ -2686,7 +2679,6 @@ ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = tcltest; - ZERO_LINK = YES; }; name = "Debug llvmgcc42"; }; @@ -2705,19 +2697,10 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ( - ppc, - ppc64, - i386, - x86_64, - ); - CFLAGS = "-arch ppc -arch ppc64 -arch i386 -arch x86_64 $(CFLAGS)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; GCC_VERSION = 4.2; MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_LDFLAGS = ( - "-Wl,-no_arch_warnings", - "$(OTHER_LDFLAGS)", - ); PREBINDING = NO; }; name = "ReleaseUniversal gcc42"; @@ -2752,20 +2735,16 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ( - ppc, - i386, - ); - CFLAGS = "-arch ppc -arch i386 $(CFLAGS)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CC = "$(DEVELOPER_DIR)/usr/bin/llvm-gcc-4.2"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; DEBUG_INFORMATION_FORMAT = dwarf; - GCC = "$(DEVELOPER_DIR)/usr/bin/llvm-gcc"; GCC_OPTIMIZATION_LEVEL = 4; - GCC_VERSION = 4.2; + GCC_VERSION = com.apple.compilers.llvmgcc42; MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = "-emit-llvm"; - OTHER_LDFLAGS = ( - "-Wl,-no_arch_warnings", - "$(OTHER_LDFLAGS)", + OTHER_CFLAGS = ( + "$(OTHER_CFLAGS)", + "-emit-llvm", ); PREBINDING = NO; TCL_CONFIGURE_ARGS = "$(TCL_CONFIGURE_ARGS) --disable-dtrace"; @@ -2892,13 +2871,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ( - ppc, - ppc64, - i386, - x86_64, - ); - CFLAGS = "-arch ppc -arch ppc64 -arch i386 -arch x86_64 $(CFLAGS)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; MACOSX_DEPLOYMENT_TARGET = 10.4; OTHER_LDFLAGS = ( @@ -3005,13 +2979,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ( - ppc, - ppc64, - i386, - x86_64, - ); - CFLAGS = "-arch ppc -arch ppc64 -arch i386 -arch x86_64 $(CFLAGS)"; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; MACOSX_DEPLOYMENT_TARGET = 10.5; PREBINDING = NO; -- cgit v0.12 From 723feae3b17d7cacc75afd5d54f798af90b02eec Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:27:13 +0000 Subject: * unix/Makefile.in: clean generated tclDTrace.h file. --- unix/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index bf35876..a8e7397 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.237 2008/06/06 19:46:42 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.238 2008/06/12 06:27:13 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -900,7 +900,7 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in clean: rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ - errors tclsh tcltest lib.exp Tcl + errors tclsh tcltest lib.exp Tcl @DTRACE_HDR@ cd dltest ; $(MAKE) clean distclean: clean -- cgit v0.12 From c03da332a842e384685d4205c7aef09ac9070fa7 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:27:30 +0000 Subject: * unix/configure.in: fix static DTrace-enabled build on Solaris. --- unix/configure.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/unix/configure.in b/unix/configure.in index f59e281..f49c43c 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.182 2008/04/01 16:23:44 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.183 2008/06/12 06:27:30 das Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -663,6 +663,15 @@ if test $tcl_ok = yes; then DTRACE_HDR="\${DTRACE_HDR}" if test "`uname -s`" != "Darwin" ; then DTRACE_OBJ="\${DTRACE_OBJ}" + if test "`uname -s`" = "SunOS" -a "$SHARED_BUILD" = "0" ; then + # Need to create an intermediate object file to ensure tclDTrace.o + # gets included when linking against the static tcl library. + STLIB_LD='stlib_ld () { /usr/ccs/bin/ld -r -o $${1%.a}.o "$${@:2}" && '"${STLIB_LD}"' $${1} $${1%.a}.o ; } && stlib_ld' + # Force use of Sun ar and ranlib, the GNU versions choke on + # tclDTrace.o and the combined object file above. + AR='/usr/ccs/bin/ar' + RANLIB='/usr/ccs/bin/ranlib' + fi fi fi AC_MSG_RESULT([$tcl_ok]) -- cgit v0.12 From f91264888ac768083cbb5140345dcd51fda9d511 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:27:47 +0000 Subject: * unix/tcl.m4 (SunOS-5.11): fix 64bit amd64 support with gcc & Sun cc. --- unix/tcl.m4 | 61 +++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6b09a17..1659a12 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1918,33 +1918,46 @@ dnl AC_CHECK_TOOL(AR, ar) ]) ], [AS_IF([test "$arch" = "amd64 i386"], [ AS_IF([test "$GCC" = yes], [ - AC_MSG_WARN([64bit mode not supported with GCC on $system]) + case $system in + SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) + do64bit_ok=yes + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + AC_MSG_WARN([64bit mode not supported with GCC on $system]);; + esac ], [ do64bit_ok=yes - CFLAGS="$CFLAGS -xarch=amd64" - LDFLAGS="$LDFLAGS -xarch=amd64" + case $system in + SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + CFLAGS="$CFLAGS -xarch=amd64" + LDFLAGS="$LDFLAGS -xarch=amd64";; + esac ]) ], [AC_MSG_WARN([64bit mode not supported for $arch])])]) ]) - + #-------------------------------------------------------------------- # On Solaris 5.x i386 with the sunpro compiler we need to link - # with sunmath to get floating point rounding control - #-------------------------------------------------------------------- - AS_IF([test "$GCC" = yes],[use_sunmath=no],[ + # with sunmath to get floating point rounding control + #-------------------------------------------------------------------- + AS_IF([test "$GCC" = yes],[use_sunmath=no],[ arch=`isainfo` - AC_MSG_CHECKING([whether to use -lsunmath for fp rounding control]) + AC_MSG_CHECKING([whether to use -lsunmath for fp rounding control]) AS_IF([test "$arch" = "amd64 i386"], [ - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) MATH_LIBS="-lsunmath $MATH_LIBS" - AC_CHECK_HEADER(sunmath.h) + AC_CHECK_HEADER(sunmath.h) use_sunmath=yes - ], [ + ], [ AC_MSG_RESULT([no]) use_sunmath=no - ]) - ]) - + ]) + ]) + # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. @@ -1957,16 +1970,20 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} AS_IF([test "$do64bit_ok" = yes], [ - # We need to specify -static-libgcc or we need to - # add the path to the sparv9 libgcc. - SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" - # for finding sparcv9 libgcc, get the regular libgcc - # path, remove so name and append 'sparcv9' - #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." - #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + AS_IF([test "$arch" = "sparcv9 sparc"], [ + # We need to specify -static-libgcc or we need to + # add the path to the sparv9 libgcc. + SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" + # for finding sparcv9 libgcc, get the regular libgcc + # path, remove so name and append 'sparcv9' + #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." + #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + ], [AS_IF([test "$arch" = "amd64 i386"], [ + SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" + ])]) ]) ], [ - AS_IF([test "$use_sunmath" = yes], [textmode=textoff],[textmode=text]) + AS_IF([test "$use_sunmath" = yes], [textmode=textoff],[textmode=text]) case $system in SunOS-5.[[1-9]][[0-9]]*) SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";; -- cgit v0.12 From d67a92968053629d59019b80b051236cca5ea630 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:28:05 +0000 Subject: * unix/configure: autoconf-2.59 --- unix/configure | 70 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/unix/configure b/unix/configure index 322ea5b..ac88b41 100755 --- a/unix/configure +++ b/unix/configure @@ -8421,14 +8421,27 @@ else if test "$GCC" = yes; then - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 -echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + case $system in + SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) + do64bit_ok=yes + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 +echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; + esac else do64bit_ok=yes - CFLAGS="$CFLAGS -xarch=amd64" - LDFLAGS="$LDFLAGS -xarch=amd64" + case $system in + SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + CFLAGS="$CFLAGS -xarch=amd64" + LDFLAGS="$LDFLAGS -xarch=amd64";; + esac fi @@ -8446,21 +8459,21 @@ fi #-------------------------------------------------------------------- # On Solaris 5.x i386 with the sunpro compiler we need to link - # with sunmath to get floating point rounding control - #-------------------------------------------------------------------- - if test "$GCC" = yes; then + # with sunmath to get floating point rounding control + #-------------------------------------------------------------------- + if test "$GCC" = yes; then use_sunmath=no else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" - if test "${ac_cv_header_sunmath_h+set}" = set; then + if test "${ac_cv_header_sunmath_h+set}" = set; then echo "$as_me:$LINENO: checking for sunmath.h" >&5 echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then @@ -8627,20 +8640,32 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "$do64bit_ok" = yes; then - # We need to specify -static-libgcc or we need to - # add the path to the sparv9 libgcc. - SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" - # for finding sparcv9 libgcc, get the regular libgcc - # path, remove so name and append 'sparcv9' - #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." - #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + if test "$arch" = "sparcv9 sparc"; then + + # We need to specify -static-libgcc or we need to + # add the path to the sparv9 libgcc. + SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" + # for finding sparcv9 libgcc, get the regular libgcc + # path, remove so name and append 'sparcv9' + #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." + #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + +else + if test "$arch" = "amd64 i386"; then + + SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" + +fi + +fi + fi else - if test "$use_sunmath" = yes; then + if test "$use_sunmath" = yes; then textmode=textoff else textmode=text @@ -18601,6 +18626,15 @@ _ACEOF DTRACE_HDR="\${DTRACE_HDR}" if test "`uname -s`" != "Darwin" ; then DTRACE_OBJ="\${DTRACE_OBJ}" + if test "`uname -s`" = "SunOS" -a "$SHARED_BUILD" = "0" ; then + # Need to create an intermediate object file to ensure tclDTrace.o + # gets included when linking against the static tcl library. + STLIB_LD='stlib_ld () { /usr/ccs/bin/ld -r -o $${1%.a}.o "$${@:2}" && '"${STLIB_LD}"' $${1} $${1%.a}.o ; } && stlib_ld' + # Force use of Sun ar and ranlib, the GNU versions choke on + # tclDTrace.o and the combined object file above. + AR='/usr/ccs/bin/ar' + RANLIB='/usr/ccs/bin/ranlib' + fi fi fi echo "$as_me:$LINENO: result: $tcl_ok" >&5 -- cgit v0.12 From 478314cd955802ff15753a226ac6a1e7ee7d73d8 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:28:41 +0000 Subject: * generic/tclIORTrans.c: fix signed <-> unsigned cast warnings. --- generic/tclIORTrans.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index c309afc..89af0d5 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.2 2008/06/10 03:35:16 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.3 2008/06/12 06:28:41 das Exp $ */ #include @@ -106,6 +106,12 @@ static int ResultCopy (ResultBuffer* r, unsigned char* buf, int toRe #define RB_INCREMENT (512) /* + * Convenience macro to make some casts easier to use. + */ + +#define UCHARP(x) ((unsigned char *) (x)) + +/* * Instance data for a reflected transformation. =========================== */ @@ -1053,7 +1059,7 @@ ReflectInput( * below, possibly EOF). */ - copied = ResultCopy (&rtPtr->result, (unsigned char*) buf, toRead); + copied = ResultCopy (&rtPtr->result, UCHARP(buf), toRead); toRead -= copied; buf += copied; gotBytes += copied; @@ -1171,7 +1177,7 @@ ReflectInput( * iteration will put it into the result. */ - if (!TransformRead (rtPtr, errorCodePtr, buf, read)) { + if (!TransformRead (rtPtr, errorCodePtr, UCHARP(buf), read)) { return -1; } } /* while toRead > 0 */ @@ -1238,7 +1244,7 @@ ReflectOutput( * parent channel for further processing. */ - if (!TransformWrite (rtPtr, errorCodePtr, (unsigned char*) buf, toWrite)) { + if (!TransformWrite (rtPtr, errorCodePtr, UCHARP(buf), toWrite)) { return -1; } @@ -1337,8 +1343,8 @@ ReflectSeekWide( curPos = Tcl_LongAsWide(-1); } else { curPos = Tcl_LongAsWide((parent->typePtr->seekProc) ( - parent->instanceData, Tcl_WideAsLong(offset), seekMode, - errorCodePtr)); + parent->instanceData, Tcl_WideAsLong(offset), seekMode, + errorCodePtr)); } if (curPos == Tcl_LongAsWide(-1)) { Tcl_SetErrno(*errorCodePtr); @@ -2835,7 +2841,7 @@ ResultInit (ResultBuffer* r) /* Reference to the structure to initialize */ { r->used = 0; r->allocated = 0; - r->buf = (unsigned char*) NULL; + r->buf = NULL; } /* *---------------------------------------------------------------------- @@ -2861,7 +2867,7 @@ ResultClear (ResultBuffer* r) /* Reference to the buffer to clear out */ if (!r->allocated) return; Tcl_Free ((char*) r->buf); - r->buf = (unsigned char*) NULL; + r->buf = NULL; r->allocated = 0; } @@ -2895,11 +2901,10 @@ ResultAdd (r, buf, toWrite) if (r->allocated == 0) { r->allocated = toWrite + RB_INCREMENT; - r->buf = (unsigned char*) Tcl_Alloc (r->allocated); + r->buf = UCHARP(Tcl_Alloc (r->allocated)); } else { r->allocated += toWrite + RB_INCREMENT; - r->buf = (unsigned char*) Tcl_Realloc((char*) r->buf, - r->allocated); + r->buf = UCHARP(Tcl_Realloc((char*) r->buf, r->allocated)); } } @@ -3003,7 +3008,7 @@ TransformRead ( if (rtPtr->thread != Tcl_GetCurrentThread()) { ForwardParam p; - p.transform.buf = buf; + p.transform.buf = (char*) buf; p.transform.size = toRead; ForwardOpToOwnerThread(rtPtr, ForwardedInput, &p); @@ -3016,7 +3021,7 @@ TransformRead ( *errorCodePtr = EOK; } - ResultAdd (&rtPtr->result, p.transform.buf, p.transform.size); + ResultAdd (&rtPtr->result, UCHARP(p.transform.buf), p.transform.size); ckfree (p.transform.buf); } else { #endif @@ -3062,7 +3067,7 @@ TransformWrite ( if (rtPtr->thread != Tcl_GetCurrentThread()) { ForwardParam p; - p.transform.buf = buf; + p.transform.buf = (char*) buf; p.transform.size = toWrite; ForwardOpToOwnerThread(rtPtr, ForwardedOutput, &p); @@ -3137,7 +3142,7 @@ TransformDrain( *errorCodePtr = EOK; } - ResultAdd (&rtPtr->result, p.transform.buf, p.transform.size); + ResultAdd (&rtPtr->result, UCHARP(p.transform.buf), p.transform.size); ckfree (p.transform.buf); } else { #endif -- cgit v0.12 From 3e497c1f548a8cbba7c7211b72f9b476f4093355 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:29:14 +0000 Subject: * generic/tclOO.c: use TclOOStubs hooks field to retrieve * generic/tclOODecls.h: TclOOIntStubs pointer. [Bug 1980953] * generic/tclOOIntDecls.h: * generic/tclOOStubInit.c: * generic/tclOOStubLib.c: --- ChangeLog | 65 +++++++++++++++++++++++++++++++------------------ generic/tclOO.c | 6 ++--- generic/tclOODecls.h | 4 +-- generic/tclOOIntDecls.h | 11 +++------ generic/tclOOStubInit.c | 11 +++------ generic/tclOOStubLib.c | 10 ++++---- 6 files changed, 57 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56c825e..ddd5f0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2008-06-12 Daniel Steffen + + * generic/tclOO.c: use TclOOStubs hooks field to retrieve + * generic/tclOODecls.h: TclOOIntStubs pointer. [Bug 1980953] + * generic/tclOOIntDecls.h: + * generic/tclOOStubInit.c: + * generic/tclOOStubLib.c: + + * generic/tclIORTrans.c: fix signed <-> unsigned cast warnings. + + * unix/Makefile.in: clean generated tclDTrace.h file. + * unix/configure.in: fix static DTrace-enabled build on Solaris. + + * unix/tcl.m4 (SunOS-5.11): fix 64bit amd64 support with gcc & Sun cc. + * unix/configure: autoconf-2.59 + + * macosx/Tcl.xcodeproj/project.pbxproj: add tclIORTrans.c; updates and + cleanup for Xcode 3.1/Leopard. + * macosx/Tcl.xcode/project.pbxproj: sync Tcl.xcodeproj changes. + * macosx/README: document new build configs. + 2008-06-10 Joe English * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension @@ -7,23 +28,21 @@ 2008-06-10 Andreas Kupries * tests/ioTrans.test (iortrans.tf-6.1): Fixed the [Bug 1988552], - reported by Kevin. Have to close the channel before removal of - the file. Fixed same bug in test 'iortrans.tf-11.0', after - fixing missing cleanup of the file in 'iortrans.tf-11.*'. Lastly - fixed the names of the threaded tests 'iortrans-8.*' to the - correct 'iortrans.tf-8.*'. + reported by Kevin. Have to close the channel before removal of the + file. Fixed same bug in test 'iortrans.tf-11.0', after fixing missing + cleanup of the file in 'iortrans.tf-11.*'. Lastly fixed the names of + the threaded tests 'iortrans-8.*' to the correct 'iortrans.tf-8.*'. 2008-06-09 Andreas Kupries - * generic/tclIORTrans.c (ReflectInput): Fixed a bug triggered by - Pat Thoyts . Reset the EOF flag - after draining the Tcl level into the result buffer, to make sure - that the result buffer will be drained as well by repeated calls - to ReflectInput should it contain more than one buffer-full of - data. Without that reset the higher I/O system will not call on - ReflectInput anymore due to the assumed EOF, thus losing the data - which did not fit in the buffer of the call which caused the eof - and drain. + * generic/tclIORTrans.c (ReflectInput): Fixed a bug triggered by Pat + Thoyts . Reset the EOF flag after + draining the Tcl level into the result buffer, to make sure that the + result buffer will be drained as well by repeated calls to + ReflectInput should it contain more than one buffer-full of data. + Without that reset the higher I/O system will not call on ReflectInput + anymore due to the assumed EOF, thus losing the data which did not fit + in the buffer of the call which caused the eof and drain. 2008-06-09 Donal K. Fellows @@ -31,6 +50,7 @@ that occurred when all methods were hidden. [Bug 1987817] 2008-06-08 Miguel Sofer + * generic/tclBasic.c: Compilation of uplevel scripts, allow * generic/tclCompCmds.c: non-body compiled scripts to access the * generic/tclCompile.c: LVT (but not to extend it) and enable the @@ -92,14 +112,13 @@ * generic/tclOOIntDecls.h: DLLIMPORT needed to make EXTERN work. * generic/tclDictObj.c: Added missing initializers to the ensemble - map to silence a compiler warning. - Thanks to George Peter Staplin for the - report. + map to silence a compiler warning. Thanks + to George Peter Staplin for the report. * generic/tclOOMethod.c: Fix a bug where the refcount of a method - was reset if the method was redefined while - there was an active invocation. - [Bug #1981001] + was reset if the method was redefined while + there was an active invocation. + [Bug 1981001] 2008-06-01 Donal K. Fellows @@ -131,7 +150,7 @@ * unix/tclConfig.h.in: autoheader-2.59 * macosx/Tcl.xcodeproj/project.pbxproj: add new tclOO files; add debug - * macosx/README: targets with corefoundation + * macosx/README: configs with corefoundation disabled and with gcov; update to Xcode 3.1. @@ -226,9 +245,7 @@ Kenny for his help with this. * unix/tclUnixThrd.c: Add platform-specific TSD functions for use by - tclThreadStorage.c. - * win/tclWinThrd.c: Add platform-specific TSD functions for use by - tclThreadStorage.c. + * win/tclWinThrd.c: tclThreadStorage.c. 2008-05-09 Kevin B. Kenny diff --git a/generic/tclOO.c b/generic/tclOO.c index f374876..667210b 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.7 2008/06/02 02:19:41 kennykb Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.8 2008/06/12 06:29:17 das Exp $ */ #ifdef HAVE_CONFIG_H @@ -118,7 +118,7 @@ static char initScript[] = /* "tcl_findLibrary tcloo $oo::version $oo::version" */ /* " tcloo.tcl OO_LIBRARY oo::library;"; */ -MODULE_SCOPE const struct TclOOStubAPI * const tclOOStubAPIPtr; +MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; /* * Convenience macro for getting the foundation from an interpreter. @@ -164,7 +164,7 @@ TclOOInit( } return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION, - (ClientData) tclOOStubAPIPtr); + (ClientData) tclOOConstStubPtr); } /* diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 375abf3..969cd5d 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.4 2008/06/01 02:02:48 kennykb Exp $ + * $Id: tclOODecls.h,v 1.5 2008/06/12 06:29:18 das Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -22,7 +22,7 @@ /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made - * in the generic/tcl.decls script. + * in the generic/tclOO.decls script. */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index bc6c2d3..de761a7 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.4 2008/06/01 02:02:49 kennykb Exp $ + * $Id: tclOOIntDecls.h,v 1.5 2008/06/12 06:29:18 das Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -21,7 +21,7 @@ /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made - * in the generic/tcl.decls script. + * in the generic/tclOO.decls script. */ /* !BEGIN!: Do not edit below this line. */ @@ -258,12 +258,7 @@ extern CONST TclOOIntStubs *tclOOIntStubsPtr; /* !END!: Do not edit above this line. */ -struct TclOOStubAPI { - CONST TclOOStubs *stubsPtr; - CONST TclOOIntStubs *intStubsPtr; -}; - #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -#endif /* _TCLOODECLS */ +#endif /* _TCLOOINTDECLS */ diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index 522fa6b..06e22d0 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubInit.c,v 1.3 2008/06/01 00:33:05 dkf Exp $ + * $Id: tclOOStubInit.c,v 1.4 2008/06/12 06:29:18 das Exp $ * * This file is (mostly) automatically generated from tclOO.decls. * It is compiled and linked in with the tclOO package proper. @@ -73,11 +73,6 @@ static const TclOOStubs tclOOStubs = { /* !END!: Do not edit above this line. */ -static const struct TclOOStubAPI tclOOStubAPI = { - &tclOOStubs, - &tclOOIntStubs -}; - -MODULE_SCOPE const struct TclOOStubAPI * const tclOOStubAPIPtr; -const struct TclOOStubAPI * const tclOOStubAPIPtr = &tclOOStubAPI; +MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; +const TclOOStubs * const tclOOConstStubPtr = &tclOOStubs; diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c index 280854b..0414ae4 100644 --- a/generic/tclOOStubLib.c +++ b/generic/tclOOStubLib.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubLib.c,v 1.3 2008/06/01 00:33:05 dkf Exp $ + * $Id: tclOOStubLib.c,v 1.4 2008/06/12 06:29:18 das Exp $ * ORIGINAL SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ @@ -53,16 +53,16 @@ TclOOInitializeStubs( ClientData clientData = NULL; const char *actualVersion = Tcl_PkgRequireEx(interp, packageName,version, exact, &clientData); - struct TclOOStubAPI *stubsAPIPtr = clientData; - if (stubsAPIPtr == NULL) { + if (clientData == NULL) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "Error loading ", packageName, " package; ", "package not present or incomplete", NULL); return NULL; } else { - const TclOOStubs * const stubsPtr = stubsAPIPtr->stubsPtr; - const TclOOIntStubs * const intStubsPtr = stubsAPIPtr->intStubsPtr; + const TclOOStubs * const stubsPtr = clientData; + const TclOOIntStubs * const intStubsPtr = stubsPtr->hooks ? + stubsPtr->hooks->tclOOIntStubs : NULL; if (!actualVersion) { return NULL; -- cgit v0.12 From 3d19400488d879abbac6dcb86335f0f6abb6f8aa Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 06:49:05 +0000 Subject: s/target/config/ --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddd5f0f..d9d6697 100644 --- a/ChangeLog +++ b/ChangeLog @@ -755,7 +755,7 @@ Darwin 9 even when TclpCreateProcess() uses vfork(). * macosx/Tcl.xcodeproj/project.pbxproj: Add support for Xcode 3.1 and - * macosx/Tcl.xcodeproj/default.pbxuser: targets for building with + * macosx/Tcl.xcodeproj/default.pbxuser: configs for building with * macosx/Tcl-Common.xcconfig: gcc-4.2 and llvm-gcc-4.2. * unix/tclUnixPort.h: Workaround vfork() problems @@ -3507,7 +3507,7 @@ * generic/tclInt.h: fix warning when building threaded with -DPURIFY. * macosx/Tcl.xcodeproj/project.pbxproj: add 'DebugUnthreaded' & - * macosx/Tcl.xcodeproj/default.pbxuser: 'DebugLeaks' targets and env + * macosx/Tcl.xcodeproj/default.pbxuser: 'DebugLeaks' configs and env var settings needed to run the 'leaks' tool. 2007-05-07 Don Porter -- cgit v0.12 From 8e70eee26cbb5098f9435c899f6c0948a6b776d9 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 09:46:52 +0000 Subject: sync with 2008-05-26 io-53.9 change --- tests/chanio.test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/chanio.test b/tests/chanio.test index 6e44c38..14a1554 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.13 2008/05/23 21:00:45 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.14 2008/06/12 09:46:52 das Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7057,6 +7057,7 @@ test chan-io-53.9 {CopyData: -size and event interaction, Bug 780533} -setup { rename ::done {} after 1000; # Allow Windows time to figure out that the # process is gone + catch {close $out} catch {removeFile out} catch {removeFile err} catch {unset ::forever} -- cgit v0.12 From 9c5b16baabde8f28eb258e1b9be4727afa812830 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 12 Jun 2008 20:08:57 +0000 Subject: * unix/Makefile.in: add complete deps on tclDTrace.h. --- ChangeLog | 6 ++++-- unix/Makefile.in | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9d6697..42e44a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-06-12 Daniel Steffen + * unix/Makefile.in: add complete deps on tclDTrace.h. + * generic/tclOO.c: use TclOOStubs hooks field to retrieve * generic/tclOODecls.h: TclOOIntStubs pointer. [Bug 1980953] * generic/tclOOIntDecls.h: @@ -8,8 +10,8 @@ * generic/tclIORTrans.c: fix signed <-> unsigned cast warnings. - * unix/Makefile.in: clean generated tclDTrace.h file. - * unix/configure.in: fix static DTrace-enabled build on Solaris. + * unix/Makefile.in: clean generated tclDTrace.h file. + * unix/configure.in (SunOS): fix static DTrace-enabled build. * unix/tcl.m4 (SunOS-5.11): fix 64bit amd64 support with gcc & Sun cc. * unix/configure: autoconf-2.59 diff --git a/unix/Makefile.in b/unix/Makefile.in index a8e7397..7657c1b 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.238 2008/06/12 06:27:13 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.239 2008/06/12 20:08:58 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1490,7 +1490,7 @@ tclMacOSXNotify.o: $(MAC_OSX_DIR)/tclMacOSXNotify.c # DTrace support -$(TCL_OBJS) $(STUB_LIB_OBJS): @DTRACE_HDR@ +$(TCL_OBJS) $(STUB_LIB_OBJS) $(TCLSH_OBJS) $(TCLTEST_OBJS) $(XTTEST_OBJS): @DTRACE_HDR@ $(DTRACE_HDR): $(DTRACE_SRC) $(DTRACE) -h $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) -- cgit v0.12 From f7c3c0f0809266035acb3cdeaa624f903a3b0cf0 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Fri, 13 Jun 2008 05:45:01 +0000 Subject: TIP 285 Implementation --- ChangeLog | 64 +++ doc/Eval.3 | 52 ++- doc/after.n | 6 +- doc/interp.n | 23 +- generic/tcl.decls | 11 +- generic/tcl.h | 8 +- generic/tclBasic.c | 450 +++++++++++++++++- generic/tclDecls.h | 24 +- generic/tclEvent.c | 35 +- generic/tclExecute.c | 43 +- generic/tclInt.decls | 7 +- generic/tclInt.h | 26 +- generic/tclIntDecls.h | 12 +- generic/tclInterp.c | 91 +++- generic/tclNotify.c | 4 +- generic/tclParse.c | 7 +- generic/tclProc.c | 4 +- generic/tclStubInit.c | 5 +- generic/tclThreadTest.c | 169 ++++++- generic/tclTimer.c | 34 +- tests/cmdAH.test | 4 +- tests/interp.test | 10 +- tests/thread.test | 1194 ++++++++++++++++++++++++++++++++++++++++++++++- tools/man2help2.tcl | 4 +- tools/man2tcl.c | 12 +- win/makefile.vc | 80 +++- win/rules.vc | 8 +- win/tcl.hpj.in | 4 +- win/tclWinNotify.c | 4 +- win/tclWinThrd.c | 4 +- 30 files changed, 2308 insertions(+), 91 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42e44a3..13abc3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,67 @@ +2008-06-13 Joe Mistachkin + + TIP #285 IMPLEMENTATION + + * doc/Eval.3: Added documentation for the Tcl_CancelEval and Tcl_Canceled + functions and the TCL_CANCEL_UNWIND flag bit. + * doc/after.n: Corrected the spelling of 'canceled' in the documentation. + * doc/interp.n: Added documentation for [interp cancel]. + * generic/tcl.decls: Added the Tcl_CancelEval and Tcl_Canceled functions + to the stubs table. + * generic/tcl.h: Added the TCL_CANCEL_UNWIND flag bit. + * generic/tclBasic.c: The bulk of the script cancellation functionality + is defined here. Added code to initialize and manage the script + cancellation hash table in a thread-safe manner. Reset script + cancellation flags prior to increasing the nesting level (if the nesting + level is currently zero) and always cooperatively check for script + cancellation near the start of TclEvalObjvInternal and after invoking + async handlers. + * generic/tclDecls.h: Regenerated. + * generic/tclEvent.c: Call TclFinalizeEvaluation during finalization to + cleanup the script cancellation hash table. During [vwait], always + cooperatively check for script cancellation. Corrected the spelling of + 'canceled' in comments to be consistent with the documentation. + * generic/tclExecute.c: Reset script cancellation flags prior to + increasing the nesting level (if the nesting level is currently zero) and + always cooperatively check for script cancellation after invoking async + handlers. Prevent [catch] from catching script cancellation when the + TCL_CANCEL_UNWIND flag is set (similar to the manner used by TIP 143 when + a limit has been exceeded). + * generic/tclInt.decls: Added TclResetCancellation to the internal stubs + table. + * generic/tclInt.h: Added asyncCancel and asyncCancelMsg fields to the + private Interp structure. Added private interp flag value CANCELED to + help control script cancellation. + * generic/tclIntDecls.h: Regenerated. + * generic/tclInterp.c (Tcl_InterpObjCmd): Added [interp cancel] + subcommand. + * generic/tclNotify.c (Tcl_DeleteEventSource): Corrected the spelling of + 'canceled' in comments to be consistent with the documentation. + * generic/tclParse.c: Reset script cancellation flags prior to increasing + * generic/tclProc.c: the nesting level (if the nesting level is currently + zero) and cooperatively check for script cancellation prior to evaluating + commands. + * generic/tclStubInit.c: Regenerated. + * generic/tclThreadTest.c (Tcl_ThreadObjCmd): Added script cancellation + support ([testthread cancel]). + Modified [testthread id] to allow querying of the 'main' thread ID. + Corrected comments to reflect the actual command syntax. Made [testthread + wait] cooperatively check for script cancellation. Added [testthread + event] to allow for processing one pending event without blocking. + * generic/tclTimer.c: Delay for a maximum of 500 milliseconds prior + to checking for async handlers and script cancellation. + * tests/cmdAH.test: Changed [interp c] to [interp create]. + * tests/interp.test: Added and fixed tests for [interp cancel]. + * tests/thread.test: Added tests for script cancellation via [testthread + cancel]. + * tools/man2help2.tcl: Fixed problems with WinHelp target (see + * tools/man2tcl.c: [Bug 1934200], [Bug 1934265], and [Bug 1934272]). + * win/makefile.vc: Added 'pdbs' option for Windows build rules to allow + * win/rules.vc: for non-debug builds with full symbols. + * win/tcl.hpj.in: Corrected version for WinHelp target. + * win/tclWinNotify.c: Used SleepEx and WaitForSingleObjectEx on + * win/tclWinThrd.c: Windows because they are alertable. + 2008-06-12 Daniel Steffen * unix/Makefile.in: add complete deps on tclDTrace.h. diff --git a/doc/Eval.3 b/doc/Eval.3 index 79392fc..313406c 100644 --- a/doc/Eval.3 +++ b/doc/Eval.3 @@ -2,17 +2,18 @@ '\" Copyright (c) 1989-1993 The Regents of the University of California. '\" Copyright (c) 1994-1997 Sun Microsystems, Inc. '\" Copyright (c) 2000 Scriptics Corporation. +'\" Copyright (c) 2006-2008 Joe Mistachkin. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Eval.3,v 1.27 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Eval.3,v 1.28 2008/06/13 05:45:07 mistachkin Exp $ '\" .so man.macros -.TH Tcl_Eval 3 8.1 Tcl "Tcl Library Procedures" +.TH Tcl_Eval 3 8.6 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA \- execute Tcl scripts +Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA, Tcl_CancelEval, Tcl_Canceled \- execute and cancel Tcl scripts .SH SYNOPSIS .nf \fB#include \fR @@ -43,16 +44,25 @@ int .sp int \fBTcl_VarEvalVA\fR(\fIinterp, argList\fR) +.sp +int +\fBTcl_CancelEval\fR(\fIinterp, clientData, flags\fR) +.sp +int +\fBTcl_Canceled\fR(\fIinterp, flags\fR) .SH ARGUMENTS .AS Tcl_Interp **termPtr .AP Tcl_Interp *interp in -Interpreter in which to execute the script. The interpreter's result is -modified to hold the result or error message from the script. +Interpreter in which to execute or cancel the script. The interpreter's +result is modified to hold the result or error message from the script. .AP Tcl_Obj *objPtr in A Tcl object containing the script to execute. .AP int flags in ORed combination of flag bits that specify additional options. \fBTCL_EVAL_GLOBAL\fR and \fBTCL_EVAL_DIRECT\fR are currently supported. +For \fBTcl_CancelEval\fR, only \fBTCL_CANCEL_UNWIND\fR is currently +supported. For \fBTcl_Canceled\fR, only \fBTCL_LEAVE_ERR_MSG\fR and +\fBTCL_CANCEL_UNWIND\fR are currently supported. .AP "const char" *fileName in Name of a file containing a Tcl script. .AP int objc in @@ -72,6 +82,9 @@ String forming part of a Tcl script. .AP va_list argList in An argument list which must have been initialized using \fBva_start\fR, and cleared using \fBva_end\fR. +.AP ClientData clientData in +Currently, reserved for future use. +It should be set to NULL. .BE .SH DESCRIPTION @@ -159,6 +172,17 @@ of arguments. \fBTcl_VarEval\fR is now deprecated. \fBTcl_VarEvalVA\fR is the same as \fBTcl_VarEval\fR except that instead of taking a variable number of arguments it takes an argument list. Like \fBTcl_VarEval\fR, \fBTcl_VarEvalVA\fR is deprecated. +.PP +\fBTcl_CancelEval\fR cancels or unwinds the script in progress soon after +the next invocation of asynchronous handlers, causing \fBTCL_ERROR\fR to be +the return code for that script. This function is thread-safe and may be +called from any thread in the process. +.PP +\fBTcl_Canceled\fR checks if the script in progress has been canceled and +returns \fBTCL_ERROR\fR if it has. Otherwise, \fBTCL_OK\fR is returned. +Extensions can use this function to check to see if they should abort a long +running command. This function is thread sensitive and may only be called +from the thread the interpreter was created in. .SH "FLAG BITS" Any ORed combination of the following values may be used for the @@ -179,6 +203,22 @@ If this flag is set, the script is processed at global level. This means that it is evaluated in the global namespace and its variable context consists of global variables only (it ignores any Tcl procedures at are active). +.TP 23 +\fBTCL_CANCEL_UNWIND\fR +This flag is only used by \fBTcl_CancelEval\fR and \fBTcl_Canceled\fR; +it is ignored by other procedures. For \fBTcl_CancelEval\fR, if this +flag is set, the script in progress is canceled and the evaluation +stack for the interpreter is unwound. For \fBTcl_Canceled\fR, if this +flag is set, the script in progress is considered to be canceled only +if the evaluation stack for the interpreter is being unwound. +.TP 23 +\fBTCL_LEAVE_ERR_MSG\fR +This flag is only used by \fBTcl_Canceled\fR; it is ignored by +other procedures. If an error is returned and this bit is set in +\fIflags\fR, then an error message will be left in the interpreter's +result, where it can be retrieved with \fBTcl_GetObjResult\fR or +\fBTcl_GetStringResult\fR. If this flag bit is not set then no error +message is left and the interpreter's result will not be modified. .SH "MISCELLANEOUS DETAILS" .PP @@ -207,4 +247,4 @@ This means that top-level applications should never see a return code from \fBTcl_EvalObjEx\fR other then \fBTCL_OK\fR or \fBTCL_ERROR\fR. .SH KEYWORDS -execute, file, global, object, result, script +cancel, execute, file, global, object, result, script, unwind diff --git a/doc/after.n b/doc/after.n index e79cbb9..4e5dfdd 100644 --- a/doc/after.n +++ b/doc/after.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: after.n,v 1.10 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: after.n,v 1.11 2008/06/13 05:45:07 mistachkin Exp $ '\" .so man.macros .TH after n 7.5 Tcl "Tcl Built-In Commands" @@ -67,7 +67,7 @@ This command also cancels the execution of a delayed command. The \fIscript\fR arguments are concatenated together with space separators (just as in the \fBconcat\fR command). If there is a pending command that matches the string, it is -cancelled and will never be executed; if no such command is +canceled and will never be executed; if no such command is currently pending then the \fBafter cancel\fR command has no effect. .TP \fBafter idle \fIscript \fR?\fIscript script ...\fR? @@ -90,7 +90,7 @@ event handlers created by the \fBafter\fR command for this interpreter. If \fIid\fR is supplied, it specifies an existing handler; \fIid\fR must have been the return value from some previous call -to \fBafter\fR and it must not have triggered yet or been cancelled. +to \fBafter\fR and it must not have triggered yet or been canceled. In this case the command returns a list with two elements. The first element of the list is the script associated with \fIid\fR, and the second element is either diff --git a/doc/interp.n b/doc/interp.n index 5612226..f89594c 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -1,14 +1,15 @@ '\" '\" Copyright (c) 1995-1996 Sun Microsystems, Inc. '\" Copyright (c) 2004 Donal K. Fellows +'\" Copyright (c) 2006-2008 Joe Mistachkin. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: interp.n,v 1.38 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: interp.n,v 1.39 2008/06/13 05:45:07 mistachkin Exp $ '\" .so man.macros -.TH interp n 7.6 Tcl "Tcl Built-In Commands" +.TH interp n 8.6 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME @@ -144,6 +145,22 @@ what to set the interpreter's background error to. See the \fBBACKGROUND ERROR HANDLING\fR section for more details. .VE 8.5 .TP +\fBinterp\fR \fBcancel \fR?\fB\-unwind\fR? ?\fB\-\|\-\fR? ?\fIpath\fR? ?\fIresult\fR? +.VS 8.6 +Cancels the script being evaluated in the interpreter identified by +\fIpath\fR. Without the \fB\-unwind\fR switch the evaluation stack for +the interpreter is unwound until an enclosing catch command is found or +there are no further invocations of the interpreter left on the call +stack. With the \fB\-unwind\fR switch the evaluation stack for the +interpreter is unwound without regard to any intervening catch command +until there are no further invocations of the interpreter left on the +call stack. The \fB\-\|\-\fR switch can be used to mark the end of +switches; it may be needed if \fIpath\fR is an unusual value such +as \fB\-safe\fR. If \fIresult\fR is present, it will be used as the +error message string; otherwise, a default error message string will be +used. +.VE 8.6 +.TP \fBinterp\fR \fBcreate \fR?\fB\-safe\fR? ?\fB\-\|\-\fR? ?\fIpath\fR? Creates a slave interpreter identified by \fIpath\fR and a new command, called a \fIslave command\fR. The name of the slave command is the last @@ -811,6 +828,6 @@ set i [\fBinterp create\fR] .CE .VE 8.5 .SH "SEE ALSO" -bgerror(n), load(n), safe(n), Tcl_CreateSlave(3) +bgerror(n), load(n), safe(n), Tcl_CreateSlave(3), Tcl_Eval(3) .SH KEYWORDS alias, master interpreter, safe interpreter, slave interpreter diff --git a/generic/tcl.decls b/generic/tcl.decls index 3616299..6c9b09a 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.132 2008/04/02 21:27:44 das Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.133 2008/06/13 05:45:07 mistachkin Exp $ library tcl @@ -2099,6 +2099,15 @@ declare 579 generic { void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, CONST char *format, ...) } +# TIP #285: Script cancellation support. +declare 580 generic { + int Tcl_CancelEval(Tcl_Interp *interp, Tcl_Obj *resultObjPtr, + ClientData clientData, int flags) +} +declare 581 generic { + int Tcl_Canceled(Tcl_Interp *interp, int flags) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are diff --git a/generic/tcl.h b/generic/tcl.h index a1a61d6..dbf4c52 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.257 2008/05/09 04:58:53 georgeps Exp $ + * RCS: @(#) $Id: tcl.h,v 1.258 2008/06/13 05:45:07 mistachkin Exp $ */ #ifndef _TCL @@ -983,11 +983,15 @@ typedef struct Tcl_DString { * o Cut out of error traces * o Don't reset the flags controlling ensemble * error message rewriting. + * TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the + * stack for the script in progress to be + * completely unwound. */ #define TCL_NO_EVAL 0x10000 #define TCL_EVAL_GLOBAL 0x20000 #define TCL_EVAL_DIRECT 0x40000 #define TCL_EVAL_INVOKE 0x80000 +#define TCL_CANCEL_UNWIND 0x100000 /* * Special freeProc values that may be passed to Tcl_SetResult (see the man @@ -1000,6 +1004,8 @@ typedef struct Tcl_DString { /* * Flag values passed to variable-related functions. + * WARNING: these bit choices must not conflict with the bit choice for + * TCL_CANCEL_UNWIND, above. */ #define TCL_GLOBAL_ONLY 1 diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9210fd7..d0aa8e2 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -10,11 +10,12 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved. * Copyright (c) 2007 Daniel A. Steffen + * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.301 2008/06/08 03:21:31 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.302 2008/06/13 05:45:08 mistachkin Exp $ */ #include "tclInt.h" @@ -53,6 +54,8 @@ typedef struct OldMathFuncData { static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr, const char *oldName, const char *newName, int flags); +static int CancelEvalProc(ClientData clientData, + Tcl_Interp *interp, int code); static int CheckDoubleResult(Tcl_Interp *interp, double dResult); static void DeleteInterpProc(Tcl_Interp *interp); static void DeleteOpCmdClientData(ClientData clientData); @@ -362,6 +365,56 @@ static int stackGrowsDown = 1; #endif /* TCL_NO_STACK_CHECK/TCL_CROSS_COMPILE */ /* + * This is the script cancellation struct and hash table. The hash table + * is used to keep track of the information necessary to process script + * cancellation requests, including the original interp, asynchronous handler + * tokens (created by Tcl_AsyncCreate), and the clientData and flags arguments + * passed to Tcl_CancelEval on a per-interp basis. The cancelLock mutex is + * used for protecting calls to Tcl_CancelEval as well as protecting access + * to the hash table below. + */ +typedef struct { + Tcl_Interp *interp; /* Interp this struct belongs to */ + Tcl_AsyncHandler async; /* Async handler token for script + * cancellation */ + char *result; /* The script cancellation result or + * NULL for a default result */ + int length; /* Length of the above error message */ + ClientData clientData; /* Ignored */ + int flags; /* Additional flags */ +} CancelInfo; +static Tcl_HashTable cancelTable; +static int cancelTableInitialized = 0; /* 0 means not yet initialized. */ +TCL_DECLARE_MUTEX(cancelLock) + +/* + *---------------------------------------------------------------------- + * + * TclFinalizeEvaluation -- + * + * Finalizes the script cancellation hash table. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void +TclFinalizeEvaluation(void) +{ + Tcl_MutexLock(&cancelLock); + if (cancelTableInitialized == 1) { + Tcl_DeleteHashTable(&cancelTable); + cancelTableInitialized = 0; + } + Tcl_MutexUnlock(&cancelLock); +} + +/* *---------------------------------------------------------------------- * * Tcl_CreateInterp -- @@ -389,6 +442,9 @@ Tcl_CreateInterp(void) const OpCmdInfo *opcmdInfoPtr; const CmdInfo *cmdInfoPtr; Tcl_Namespace *mathfuncNSPtr, *mathopNSPtr; + Tcl_HashEntry *hPtr; + int isNew; + CancelInfo *cancelInfo; union { char c[sizeof(short)]; short s; @@ -412,6 +468,15 @@ Tcl_CreateInterp(void) Tcl_Panic("Tcl_CallFrame and CallFrame are not the same size"); } + if (cancelTableInitialized == 0) { + Tcl_MutexLock(&cancelLock); + if (cancelTableInitialized == 0) { + Tcl_InitHashTable(&cancelTable, TCL_ONE_WORD_KEYS); + cancelTableInitialized = 1; + } + Tcl_MutexUnlock(&cancelLock); + } + /* * Initialize support for namespaces and create the global namespace * (whose name is ""; an alias is "::"). This also initializes the Tcl @@ -546,6 +611,25 @@ Tcl_CreateInterp(void) iPtr->chanMsg = NULL; /* + * TIP #285, Script cancellation support. + */ + + iPtr->asyncCancelMsg = Tcl_NewObj(); + + cancelInfo = (CancelInfo *) ckalloc(sizeof(CancelInfo)); + cancelInfo->interp = interp; + + iPtr->asyncCancel = Tcl_AsyncCreate(CancelEvalProc, cancelInfo); + cancelInfo->async = iPtr->asyncCancel; + cancelInfo->result = NULL; + cancelInfo->length = 0; + + Tcl_MutexLock(&cancelLock); + hPtr = Tcl_CreateHashEntry(&cancelTable, (char *) iPtr, &isNew); + Tcl_SetHashValue(hPtr, cancelInfo); + Tcl_MutexUnlock(&cancelLock); + + /* * Initialize the compilation and execution statistics kept for this * interpreter. */ @@ -629,9 +713,6 @@ Tcl_CreateInterp(void) */ for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) { - int isNew; - Tcl_HashEntry *hPtr; - if ((cmdInfoPtr->objProc == NULL) && (cmdInfoPtr->compileProc == NULL)) { Tcl_Panic("builtin command with NULL object command proc and a NULL compile proc"); @@ -1202,6 +1283,7 @@ DeleteInterpProc( Tcl_HashSearch search; Tcl_HashTable *hTablePtr; ResolverScheme *resPtr, *nextResPtr; + CancelInfo *cancelInfo; /* * Punt if there is an error in the Tcl_Release/Tcl_Preserve matchup. @@ -1230,6 +1312,39 @@ DeleteInterpProc( } /* + * TIP #285, Script cancellation support. Delete this interp from the + * global hash table of CancelInfo structs. + */ + + Tcl_MutexLock(&cancelLock); + hPtr = Tcl_FindHashEntry(&cancelTable, (char *) iPtr); + if (hPtr != NULL) { + cancelInfo = (CancelInfo *) Tcl_GetHashValue(hPtr); + + if (cancelInfo != NULL) { + if (cancelInfo->result != NULL) { + ckfree((char *) cancelInfo->result); + cancelInfo->result = NULL; + } + ckfree((char *) cancelInfo); + cancelInfo = NULL; + } + + Tcl_DeleteHashEntry(hPtr); + } + + if (iPtr->asyncCancel != NULL) { + Tcl_AsyncDelete(iPtr->asyncCancel); + iPtr->asyncCancel = NULL; + } + + if (iPtr->asyncCancelMsg != NULL) { + Tcl_DecrRefCount(iPtr->asyncCancelMsg); + iPtr->asyncCancelMsg = NULL; + } + Tcl_MutexUnlock(&cancelLock); + + /* * Shut down all limit handler callback scripts that call back into this * interpreter. Then eliminate all limit handlers for this interpreter. */ @@ -2948,6 +3063,59 @@ CallCommandTraces( return result; } +static int +CancelEvalProc(clientData, interp, code) + ClientData clientData; /* Interp to cancel the script in progress. */ + Tcl_Interp *interp; /* Ignored */ + int code; /* Current return code from command. */ +{ + CancelInfo *cancelInfo = (CancelInfo *) clientData; + Interp *iPtr; + + if (cancelInfo != NULL) { + Tcl_MutexLock(&cancelLock); + iPtr = (Interp *) cancelInfo->interp; + + if (iPtr != NULL) { + /* + * Setting this flag will cause the script in progress to be + * canceled as soon as possible. The core honors this flag + * at all the necessary places to ensure script cancellation + * is responsive. Extensions can check for this flag by + * calling Tcl_Canceled and checking if TCL_ERROR is returned + * or they can choose to ignore the script cancellation + * flag and the associated functionality altogether. + */ + iPtr->flags |= CANCELED; + + /* + * Currently, we only care about the TCL_CANCEL_UNWIND flag + * from Tcl_CancelEval. We do not want to simply combine all + * the flags from original Tcl_CancelEval call with the interp + * flags here just in case the caller passed flags that might + * cause behaviour unrelated to script cancellation. + */ + if (cancelInfo->flags & TCL_CANCEL_UNWIND) { + iPtr->flags |= TCL_CANCEL_UNWIND; + } + + /* + * Create the result object now so that Tcl_Canceled can avoid + * locking the cancelLock mutex. + */ + if (cancelInfo->result != NULL) { + Tcl_SetStringObj(iPtr->asyncCancelMsg, cancelInfo->result, + cancelInfo->length); + } else { + Tcl_SetObjLength(iPtr->asyncCancelMsg, 0); + } + } + Tcl_MutexUnlock(&cancelLock); + } + + return code; +} + /* *---------------------------------------------------------------------- * @@ -3418,7 +3586,7 @@ TclInterpReady( */ if (iPtr->flags & DELETED) { - Tcl_ResetResult(interp); + /* JJM - Superfluous Tcl_ResetResult call removed. */ Tcl_AppendResult(interp, "attempt to call eval in deleted interpreter", NULL); Tcl_SetErrorCode(interp, "TCL", "IDELETE", @@ -3449,6 +3617,260 @@ TclInterpReady( /* *---------------------------------------------------------------------- * + * TclResetCancellation -- + * + * Reset the script cancellation flags if the nesting level + * (iPtr->numLevels) for the interp is zero or argument force is + * non-zero. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * The script cancellation flags for the interp may be reset. + * + *---------------------------------------------------------------------- + */ + +int +TclResetCancellation( + Tcl_Interp *interp, int force) +{ + register Interp *iPtr = (Interp *) interp; + + if (iPtr != NULL) { + if (force || (iPtr->numLevels == 0)) { + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); + } + + return TCL_OK; + } else { + return TCL_ERROR; + } +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_Canceled -- + * + * Check if the script in progress has been canceled, i.e., + * Tcl_CancelEval was called for this interpreter or any of its + * master interpreters. + * + * Results: + * The return value is TCL_OK if the script evaluation has not been + * canceled, TCL_ERROR otherwise. + * + * If "flags" contains TCL_LEAVE_ERR_MSG, an error message is returned + * in the interpreter's result object. Otherwise, the interpreter's + * result object is left unchanged. If "flags" contains + * TCL_CANCEL_UNWIND, TCL_ERROR will only be returned if the script + * evaluation is being completely unwound. + * + * Side effects: + * The CANCELED flag for the interp will be reset if it is set. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_Canceled( + Tcl_Interp *interp, + int flags) +{ + register Interp *iPtr = (Interp *) interp; + const char *id, *message; + int length; + + /* + * Traverse up the to the top-level interp, checking for the + * CANCELED flag along the way. If any of the intervening + * interps have the CANCELED flag set, the current script in + * progress is considered to be canceled and we stop checking. + * Otherwise, if any interp has the DELETED flag set we stop + * checking. + */ + for (; iPtr != NULL; iPtr = (Interp *) Tcl_GetMaster((Tcl_Interp *)iPtr)) { + /* + * Has the current script in progress for this interpreter been + * canceled or is the stack being unwound due to the previous + * script cancellation? + */ + if ((iPtr->flags & CANCELED) || (iPtr->flags & TCL_CANCEL_UNWIND)) { + /* + * The CANCELED flag is a one-shot flag that is reset immediately + * upon being detected; however, if the TCL_CANCEL_UNWIND flag is + * set we will continue to report that the script in progress has + * been canceled thereby allowing the evaluation stack for the + * interp to be fully unwound. + */ + iPtr->flags &= ~CANCELED; + + /* + * The CANCELED flag was detected and reset; however, if the caller + * specified the TCL_CANCEL_UNWIND flag, we only return TCL_ERROR + * (indicating that the script in progress has been canceled) if the + * evaluation stack for the interp is being fully unwound. + */ + if (!(flags & TCL_CANCEL_UNWIND) || (iPtr->flags & TCL_CANCEL_UNWIND)) { + /* + * If the TCL_LEAVE_ERR_MSG flags bit is set, place an error in the + * interp's result; otherwise, we leave it alone. + */ + if (flags & TCL_LEAVE_ERR_MSG) { + /* + * Setup errorCode variables so that we can differentiate between + * being canceled and unwound. + */ + if (iPtr->asyncCancelMsg != NULL) { + message = Tcl_GetStringFromObj(iPtr->asyncCancelMsg, &length); + } else { + length = 0; + } + + if (iPtr->flags & TCL_CANCEL_UNWIND) { + id = "IUNWIND"; + if (length == 0) { + message = "eval unwound"; + } + } else { + id = "ICANCEL"; + if (length == 0) { + message = "eval canceled"; + } + } + + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, message, NULL); + Tcl_SetErrorCode(interp, "TCL", id, message, NULL); + } + + /* + * Return TCL_ERROR to the caller (not necessarily just the Tcl core + * itself) that indicates further processing of the script or command + * in progress should halt gracefully and as soon as possible. + */ + return TCL_ERROR; + } + } else { + /* + * FIXME: If this interpreter is being deleted we cannot continue to + * traverse up the interp chain due to an issue with + * Tcl_GetMaster (really the slave interp bookkeeping) that + * causes us to run off into a freed interp struct. Ideally, + * this check would not be necessary because Tcl_GetMaster + * would return NULL instead of a pointer to invalid (freed) + * memory. + */ + if (iPtr->flags & DELETED) { + break; + } + } + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_CancelEval -- + * + * This function schedules the cancellation of the current script in + * the given interpreter. + * + * Results: + * The return value is a standard Tcl completion code such as TCL_OK or + * TCL_ERROR. Since the interp may belong to a different thread, no + * error message can be left in the interp's result. + * + * Side effects: + * The script in progress in the specified interpreter will be + * canceled with TCL_ERROR after asynchronous handlers are invoked at + * the next Tcl_Canceled check. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_CancelEval( + Tcl_Interp *interp, /* Interpreter in which to cancel the + * script. */ + Tcl_Obj *resultObjPtr, /* The script cancellation error message + * or NULL for a default error message. */ + ClientData clientData, /* Passed to CancelEvalProc. */ + int flags) /* Collection of OR-ed bits that control + * the cancellation of the script. Only + * TCL_CANCEL_UNWIND is currently + * supported. */ +{ + Tcl_HashEntry *hPtr; + CancelInfo *cancelInfo; + int code; + const char *result; + + Tcl_MutexLock(&cancelLock); + if (cancelTableInitialized == 1) { + if (interp != NULL) { + hPtr = Tcl_FindHashEntry(&cancelTable, (char *) interp); + + if (hPtr != NULL) { + cancelInfo = (CancelInfo *) Tcl_GetHashValue(hPtr); + + if (cancelInfo != NULL) { + /* + * Populate information needed by the interpreter thread + * to fulfill the cancellation request. Currently, + * clientData is ignored. If the TCL_CANCEL_UNWIND flags + * bit is set, the script in progress is not allowed to + * catch the script cancellation because the evaluation + * stack for the interp is completely unwound. + */ + if (resultObjPtr != NULL) { + result = Tcl_GetStringFromObj(resultObjPtr, &cancelInfo->length); + cancelInfo->result = ckrealloc(cancelInfo->result, + cancelInfo->length); + memcpy((void *) cancelInfo->result, (void *) result, + (size_t) cancelInfo->length); + Tcl_DecrRefCount(resultObjPtr); /* discard their result object. */ + } else { + cancelInfo->result = NULL; + cancelInfo->length = 0; + } + + cancelInfo->clientData = clientData; + cancelInfo->flags = flags; + + Tcl_AsyncMark(cancelInfo->async); + code = TCL_OK; + } else { + /* the CancelInfo for this interp is invalid */ + code = TCL_ERROR; + } + } else { + /* no CancelInfo for this interp */ + code = TCL_ERROR; + } + } else { + /* a valid interp must be supplied */ + code = TCL_ERROR; + } + } else { + /* + * No CancelInfo hash table (Tcl_CreateInterp + * has never been called?) + */ + code = TCL_ERROR; + } + Tcl_MutexUnlock(&cancelLock); + + return code; +} + +/* + *---------------------------------------------------------------------- + * * TclEvalObjvInternal * * This function evaluates a Tcl command that has already been parsed @@ -3509,6 +3931,10 @@ TclEvalObjvInternal( return TCL_ERROR; } + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + return TCL_ERROR; + } + if (objc == 0) { return TCL_OK; } @@ -3656,6 +4082,9 @@ TclEvalObjvInternal( if (TclAsyncReady(iPtr)) { code = Tcl_AsyncInvoke(interp, code); } + if (code == TCL_OK && Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + code = TCL_ERROR; + } if (code == TCL_OK && TclLimitReady(iPtr->limit)) { code = Tcl_LimitCheck(interp); } @@ -3786,6 +4215,8 @@ TclEvalObjvInternal( TclGetString(objv[0]), "\"", NULL); code = TCL_ERROR; } else { + TclResetCancellation(interp, 0); + iPtr->numLevels++; code = TclEvalObjvInternal(interp, newObjc, newObjv, command, length, 0); @@ -3841,6 +4272,8 @@ Tcl_EvalObjv( Interp *iPtr = (Interp *) interp; int code = TCL_OK; + TclResetCancellation(interp, 0); + iPtr->numLevels++; code = TclEvalObjvInternal(interp, objc, objv, NULL, 0, flags); iPtr->numLevels--; @@ -4293,6 +4726,9 @@ TclEvalEx( eeFramePtr->line = lines; iPtr->cmdFramePtr = eeFramePtr; + + TclResetCancellation(interp, 0); + iPtr->numLevels++; code = TclEvalObjvInternal(interp, objectsUsed, objv, parsePtr->commandStart, parsePtr->commandSize, 0); @@ -5165,6 +5601,10 @@ TclObjInvoke( return TCL_ERROR; } + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + return TCL_ERROR; + } + cmdName = TclGetString(objv[0]); hTblPtr = iPtr->hiddenCmdTablePtr; if (hTblPtr != NULL) { diff --git a/generic/tclDecls.h b/generic/tclDecls.h index aee0e79..a09429a 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.133 2008/04/08 14:54:52 das Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.134 2008/06/13 05:45:09 mistachkin Exp $ */ #ifndef _TCLDECLS @@ -3501,6 +3501,18 @@ EXTERN Tcl_Obj * Tcl_ObjPrintf (CONST char * format, ...); EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, CONST char * format, ...); #endif +#ifndef Tcl_CancelEval_TCL_DECLARED +#define Tcl_CancelEval_TCL_DECLARED +/* 580 */ +EXTERN int Tcl_CancelEval (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr, + ClientData clientData, int flags); +#endif +#ifndef Tcl_Canceled_TCL_DECLARED +#define Tcl_Canceled_TCL_DECLARED +/* 581 */ +EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); +#endif typedef struct TclStubHooks { CONST struct TclPlatStubs *tclPlatStubs; @@ -4140,6 +4152,8 @@ typedef struct TclStubs { int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 577 */ Tcl_Obj * (*tcl_ObjPrintf) (CONST char * format, ...); /* 578 */ void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ + int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ + int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6532,6 +6546,14 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_AppendPrintfToObj \ (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ #endif +#ifndef Tcl_CancelEval +#define Tcl_CancelEval \ + (tclStubsPtr->tcl_CancelEval) /* 580 */ +#endif +#ifndef Tcl_Canceled +#define Tcl_Canceled \ + (tclStubsPtr->tcl_Canceled) /* 581 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 7a7dbd8..836d958 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.81 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.82 2008/06/13 05:45:10 mistachkin Exp $ */ #include "tclInt.h" @@ -571,7 +571,7 @@ TclGetBgErrorHandler( * * Side effects: * Background error information is freed: if there were any pending error - * reports, they are cancelled. + * reports, they are canceled. * *---------------------------------------------------------------------- */ @@ -643,7 +643,7 @@ Tcl_CreateExitHandler( * * Side effects: * If there is an exit handler corresponding to proc and clientData then - * it is cancelled; if no such handler exists then nothing happens. + * it is canceled; if no such handler exists then nothing happens. * *---------------------------------------------------------------------- */ @@ -719,7 +719,7 @@ Tcl_CreateThreadExitHandler( * * Side effects: * If there is an exit handler corresponding to proc and clientData then - * it is cancelled; if no such handler exists then nothing happens. + * it is canceled; if no such handler exists then nothing happens. * *---------------------------------------------------------------------- */ @@ -980,6 +980,7 @@ Tcl_Finalize(void) * after the exit handlers, because there are order dependencies. */ + TclFinalizeEvaluation(); TclFinalizeExecution(); TclFinalizeEnvironment(); @@ -1246,7 +1247,12 @@ Tcl_VwaitObjCmd( foundEvent = 1; while (!done && foundEvent) { foundEvent = Tcl_DoOneEvent(TCL_ALL_EVENTS); + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + break; + } if (Tcl_LimitExceeded(interp)) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "limit exceeded", NULL); break; } } @@ -1254,20 +1260,24 @@ Tcl_VwaitObjCmd( TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, VwaitVarProc, (ClientData) &done); - /* - * Clear out the interpreter's result, since it may have been set by event - * handlers. - */ - - Tcl_ResetResult(interp); if (!foundEvent) { + Tcl_ResetResult(interp); Tcl_AppendResult(interp, "can't wait for variable \"", nameString, "\": would wait forever", NULL); return TCL_ERROR; } if (!done) { - Tcl_AppendResult(interp, "limit exceeded", NULL); + /* + * The interpreter's result was already set to the right error + * message prior to exiting the loop above. + */ return TCL_ERROR; + } else { + /* + * Clear out the interpreter's result, since it may have been + * set by event handlers. + */ + Tcl_ResetResult(interp); } return TCL_OK; } @@ -1337,6 +1347,9 @@ Tcl_UpdateObjCmd( } while (Tcl_DoOneEvent(flags) != 0) { + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + return TCL_ERROR; + } if (Tcl_LimitExceeded(interp)) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "limit exceeded", NULL); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5bbc366..6e0d0d3 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -9,11 +9,12 @@ * Copyright (c) 2002-2005 by Miguel Sofer. * Copyright (c) 2005-2007 by Donal K. Fellows. * Copyright (c) 2007 Daniel A. Steffen + * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.372 2008/06/08 03:21:33 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.373 2008/06/13 05:45:10 mistachkin Exp $ */ #include "tclInt.h" @@ -1411,12 +1412,19 @@ TclCompEvalObj( * performance is noticeable. */ + TclResetCancellation(interp, 0); + iPtr->numLevels++; if (TclInterpReady(interp) == TCL_ERROR) { result = TCL_ERROR; goto done; } + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + result = TCL_ERROR; + goto done; + } + namespacePtr = iPtr->varFramePtr->nsPtr; /* @@ -1880,10 +1888,9 @@ TclExecuteByteCode( * Check for asynchronous handlers [Bug 746722]; we do the check every * ASYNC_CHECK_COUNT_MASK instruction, of the form (2**n-<1). */ - - if (TclAsyncReady(iPtr)) { int localResult; + if (TclAsyncReady(iPtr)) { DECACHE_STACK_INFO(); localResult = Tcl_AsyncInvoke(interp, result); CACHE_STACK_INFO(); @@ -1892,10 +1899,18 @@ TclExecuteByteCode( goto checkForCatch; } } - if (TclLimitReady(iPtr->limit)) { - int localResult; DECACHE_STACK_INFO(); + localResult = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); + CACHE_STACK_INFO(); + + if (localResult == TCL_ERROR) { + result = TCL_ERROR; + goto checkForCatch; + } + + if (TclLimitReady(iPtr->limit)) { + DECACHE_STACK_INFO(); localResult = Tcl_LimitCheck(interp); CACHE_STACK_INFO(); if (localResult == TCL_ERROR) { @@ -7302,6 +7317,24 @@ TclExecuteByteCode( } /* + * We must not catch if the script in progress has been canceled with + * the TCL_CANCEL_UNWIND flag. Instead, it blows outwards until we + * either hit another interpreter (presumably where the script in + * progress has not been canceled) or we get to the top-level. We + * do NOT modify the interpreter result here because we know it will + * already be set prior to vectoring down to this point in the code. + */ + if (Tcl_Canceled(interp, 0) == TCL_ERROR) { +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " ... cancel with unwind, returning %s\n", + StringForResultCode(result)); + } +#endif + goto abnormalReturn; + } + + /* * We must not catch an exceeded limit. Instead, it blows outwards * until we either hit another interpreter (presumably where the limit * is not exceeded) or we get to the top-level. diff --git a/generic/tclInt.decls b/generic/tclInt.decls index ccc568f..95354ac 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.121 2008/01/23 17:31:42 dgp Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.122 2008/06/13 05:45:12 mistachkin Exp $ library tcl @@ -934,6 +934,11 @@ declare 236 generic { void TclBackgroundException(Tcl_Interp *interp, int code) } +# TIP #285: Script cancellation support. +declare 237 generic { + int TclResetCancellation(Tcl_Interp *interp, int force) +} + ############################################################################## # Define the platform specific internal Tcl interface. These functions are diff --git a/generic/tclInt.h b/generic/tclInt.h index 3fe993d..112421d 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -9,11 +9,12 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved. * Copyright (c) 2007 Daniel A. Steffen + * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.370 2008/06/06 19:46:37 andreas_kupries Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.371 2008/06/13 05:45:12 mistachkin Exp $ */ #ifndef _TCLINT @@ -1827,6 +1828,18 @@ typedef struct Interp { * NULL), takes precedence over a POSIX error * code returned by a channel operation. */ + /* + * TIP #285, Script cancellation support. + */ + + Tcl_AsyncHandler asyncCancel; /* Async handler token for Tcl_CancelEval. */ + Tcl_Obj* asyncCancelMsg; /* Error message set by async cancel handler + * for the propagation of arbitrary Tcl + * errors. This information, if present + * (asyncCancelMsg not NULL), takes precedence + * over the default error messages returned by + * a script cancellation operation. */ + /* TIP #280 */ CmdFrame *cmdFramePtr; /* Points to the command frame containing * the location information for the current @@ -1993,6 +2006,15 @@ typedef struct InterpList { * of the wrong-num-args string in Tcl_WrongNumArgs. * Makes it append instead of replacing and uses * different intermediate text. + * CANCELED: Non-zero means that the script in progress should be + * canceled as soon as possible. This can be checked by + * extensions (and the core itself) by calling + * Tcl_Canceled and checking if TCL_ERROR is returned. + * This is a one-shot flag that is reset immediately upon + * being detected; however, if the TCL_CANCEL_UNWIND flag + * is set Tcl_Canceled will continue to report that the + * script in progress has been canceled thereby allowing + * the evaluation stack for the interp to be fully unwound. * * WARNING: For the sake of some extensions that have made use of former * internal values, do not re-use the flag values 2 (formerly ERR_IN_PROGRESS) @@ -2007,6 +2029,7 @@ typedef struct InterpList { #define INTERP_TRACE_IN_PROGRESS 0x200 #define INTERP_ALTERNATE_WRONG_ARGS 0x400 #define ERR_LEGACY_COPY 0x800 +#define CANCELED 0x1000 /* * Maximum number of levels of nesting permitted in Tcl commands (used to @@ -2480,6 +2503,7 @@ MODULE_SCOPE void TclFinalizeAsync(void); MODULE_SCOPE void TclFinalizeDoubleConversion(void); MODULE_SCOPE void TclFinalizeEncodingSubsystem(void); MODULE_SCOPE void TclFinalizeEnvironment(void); +MODULE_SCOPE void TclFinalizeEvaluation(void); MODULE_SCOPE void TclFinalizeExecution(void); MODULE_SCOPE void TclFinalizeIOSubsystem(void); MODULE_SCOPE void TclFinalizeFilesystem(void); diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index c6f8055..c8f788c 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.115 2008/04/08 14:54:52 das Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.116 2008/06/13 05:45:13 mistachkin Exp $ */ #ifndef _TCLINTDECLS @@ -1076,6 +1076,11 @@ EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, EXTERN void TclBackgroundException (Tcl_Interp * interp, int code); #endif +#ifndef TclResetCancellation_TCL_DECLARED +#define TclResetCancellation_TCL_DECLARED +/* 237 */ +EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); +#endif typedef struct TclIntStubs { int magic; @@ -1342,6 +1347,7 @@ typedef struct TclIntStubs { Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ + int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -2086,6 +2092,10 @@ extern CONST TclIntStubs *tclIntStubsPtr; #define TclBackgroundException \ (tclIntStubsPtr->tclBackgroundException) /* 236 */ #endif +#ifndef TclResetCancellation +#define TclResetCancellation \ + (tclIntStubsPtr->tclResetCancellation) /* 237 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 8de5983..05a2609 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.84 2008/05/30 22:54:29 dkf Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.85 2008/06/13 05:45:13 mistachkin Exp $ */ #include "tclInt.h" @@ -557,19 +557,19 @@ Tcl_InterpObjCmd( { int index; static const char *options[] = { - "alias", "aliases", "bgerror", "create", - "delete", "eval", "exists", "expose", - "hide", "hidden", "issafe", "invokehidden", - "limit", "marktrusted", "recursionlimit","slaves", - "share", "target", "transfer", + "alias", "aliases", "bgerror", "cancel", + "create", "delete", "eval", "exists", + "expose", "hide", "hidden", "issafe", + "invokehidden", "limit", "marktrusted", "recursionlimit", + "slaves", "share", "target", "transfer", NULL }; enum option { - OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_CREATE, - OPT_DELETE, OPT_EVAL, OPT_EXISTS, OPT_EXPOSE, - OPT_HIDE, OPT_HIDDEN, OPT_ISSAFE, OPT_INVOKEHID, - OPT_LIMIT, OPT_MARKTRUSTED,OPT_RECLIMIT, OPT_SLAVES, - OPT_SHARE, OPT_TARGET, OPT_TRANSFER + OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_CANCEL, + OPT_CREATE, OPT_DELETE, OPT_EVAL, OPT_EXISTS, + OPT_EXPOSE, OPT_HIDE, OPT_HIDDEN, OPT_ISSAFE, + OPT_INVOKEHID, OPT_LIMIT, OPT_MARKTRUSTED,OPT_RECLIMIT, + OPT_SLAVES, OPT_SHARE, OPT_TARGET, OPT_TRANSFER }; if (objc < 2) { @@ -638,6 +638,75 @@ Tcl_InterpObjCmd( } return SlaveBgerror(interp, slaveInterp, objc - 3, objv + 3); } + case OPT_CANCEL: { + int i, flags; + Tcl_Interp *slaveInterp; + Tcl_Obj *resultObjPtr; + static CONST char *options[] = { + "-unwind", "--", NULL + }; + enum option { + OPT_UNWIND, OPT_LAST + }; + + if (objc > 6) { + Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); + return TCL_ERROR; + } + + flags = 0; + + for (i = 2; i < objc; i++) { + if (TclGetString(objv[i])[0] != '-') { + break; + } + if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + + switch ((enum option) index) { + case OPT_UNWIND: + /* + * The evaluation stack in the target interp is to be + * unwound. + */ + flags |= TCL_CANCEL_UNWIND; + break; + case OPT_LAST: + i++; + goto endOfForLoop; + } + } + + endOfForLoop: + + /* + * Did they specify a slave interp to cancel the script in + * progress in? If not, use the current interp. + */ + + if (i < objc) { + slaveInterp = GetInterp(interp, objv[i]); + i++; + } else { + slaveInterp = interp; + } + + if (slaveInterp != NULL) { + if (i < objc) { + resultObjPtr = objv[i]; + Tcl_IncrRefCount(resultObjPtr); /* Tcl_CancelEval removes this ref. */ + i++; + } else { + resultObjPtr = NULL; + } + + return Tcl_CancelEval(slaveInterp, resultObjPtr, 0, flags); + } else { + return TCL_ERROR; + } + } case OPT_CREATE: { int i, last, safe; Tcl_Obj *slavePtr; diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 805845b..0e13379 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNotify.c,v 1.26 2008/04/16 14:29:26 das Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.27 2008/06/13 05:45:14 mistachkin Exp $ */ #include "tclInt.h" @@ -299,7 +299,7 @@ Tcl_CreateEventSource( * None. * * Side effects: - * The given event source is cancelled, so its function will never again + * The given event source is canceled, so its function will never again * be called. If no such source exists, nothing happens. * *---------------------------------------------------------------------- diff --git a/generic/tclParse.c b/generic/tclParse.c index 620f54e..126ea4f 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.64 2008/05/21 20:28:14 dgp Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.65 2008/06/13 05:45:14 mistachkin Exp $ */ #include "tclInt.h" @@ -2167,9 +2167,14 @@ TclSubstTokens( case TCL_TOKEN_COMMAND: { Interp *iPtr = (Interp *) interp; + TclResetCancellation(interp, 0); + iPtr->numLevels++; code = TclInterpReady(interp); if (code == TCL_OK) { + code = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); + } + if (code == TCL_OK) { /* TIP #280: Transfer line information to nested command */ code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, 0, line); diff --git a/generic/tclProc.c b/generic/tclProc.c index 85f49f9..42f65ba 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.141 2008/06/08 03:21:33 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.142 2008/06/13 05:45:14 mistachkin Exp $ */ #include "tclInt.h" @@ -1700,6 +1700,8 @@ TclObjInterpProcCore( * Invoke the commands in the procedure's body. */ + TclResetCancellation(interp, 0); + procPtr->refCount++; iPtr->numLevels++; diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 463eb55..2765182 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.153 2008/04/16 14:49:29 das Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.154 2008/06/13 05:45:14 mistachkin Exp $ */ #include "tclInt.h" @@ -306,6 +306,7 @@ static const TclIntStubs tclIntStubs = { TclVarHashCreateVar, /* 234 */ TclInitVarHashTable, /* 235 */ TclBackgroundException, /* 236 */ + TclResetCancellation, /* 237 */ }; static const TclIntPlatStubs tclIntPlatStubs = { @@ -1099,6 +1100,8 @@ static const TclStubs tclStubs = { Tcl_AppendFormatToObj, /* 577 */ Tcl_ObjPrintf, /* 578 */ Tcl_AppendPrintfToObj, /* 579 */ + Tcl_CancelEval, /* 580 */ + Tcl_Canceled, /* 581 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index e8363da..cbc48de 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -7,11 +7,12 @@ * Conservation Through Innovation, Limited, with their permission. * * Copyright (c) 1998 by Sun Microsystems, Inc. + * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.24 2006/09/22 14:45:48 dkf Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.25 2008/06/13 05:45:14 mistachkin Exp $ */ #include "tclInt.h" @@ -50,7 +51,7 @@ static struct ThreadSpecificData *threadList; * The following bit-values are legal for the "flags" field of the * ThreadSpecificData structure. */ -#define TP_Dying 0x001 /* This thread is being cancelled */ +#define TP_Dying 0x001 /* This thread is being canceled */ /* * An instance of the following structure contains all information that is @@ -105,6 +106,7 @@ static ThreadEventResult *resultList; * This is for simple error handling when a thread script exits badly. */ +static Tcl_ThreadId mainThreadId; static Tcl_ThreadId errorThreadId; static char *errorProcString; @@ -127,6 +129,8 @@ EXTERN int TclCreateThread(Tcl_Interp *interp, char *script, EXTERN int TclThreadList(Tcl_Interp *interp); EXTERN int TclThreadSend(Tcl_Interp *interp, Tcl_ThreadId id, char *script, int wait); +EXTERN int TclThreadCancel(Tcl_Interp *interp, Tcl_ThreadId id, + char *result, int flags); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT @@ -161,6 +165,15 @@ int TclThread_Init( Tcl_Interp *interp) /* The current Tcl interpreter */ { + /* + * If the main thread Id has not been set, do it now. + */ + + Tcl_MutexLock(&threadMutex); + if ((long) mainThreadId == 0) { + mainThreadId = Tcl_GetCurrentThread(); + } + Tcl_MutexUnlock(&threadMutex); Tcl_CreateObjCommand(interp, "testthread", Tcl_ThreadObjCmd, (ClientData) NULL, NULL); @@ -176,10 +189,12 @@ TclThread_Init( * This procedure is invoked to process the "testthread" Tcl command. See * the user documentation for details on what it does. * + * thread cancel ?-unwind? id ?result? * thread create ?-joinable? ?script? - * thread send id ?-async? script + * thread send ?-async? id script + * thread event * thread exit - * thread info id + * thread id ?-main? * thread names * thread wait * thread errorproc proc @@ -205,12 +220,14 @@ Tcl_ThreadObjCmd( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); int option; static const char *threadOptions[] = { - "create", "exit", "id", "join", "names", - "send", "wait", "errorproc", NULL + "cancel", "create", "event", "exit", "id", + "join", "names", "send", "wait", "errorproc", + NULL }; enum options { - THREAD_CREATE, THREAD_EXIT, THREAD_ID, THREAD_JOIN, THREAD_NAMES, - THREAD_SEND, THREAD_WAIT, THREAD_ERRORPROC + THREAD_CANCEL, THREAD_CREATE, THREAD_EVENT, THREAD_EXIT, + THREAD_ID, THREAD_JOIN, THREAD_NAMES, THREAD_SEND, + THREAD_WAIT, THREAD_ERRORPROC }; if (objc < 2) { @@ -235,6 +252,34 @@ Tcl_ThreadObjCmd( } switch ((enum options)option) { + case THREAD_CANCEL: { + long id; + char *result; + int flags, arg; + + if ((objc < 3) || (objc > 5)) { + Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? id ?result?"); + return TCL_ERROR; + } + flags = 0; + arg = 2; + if ((objc == 4) || (objc == 5)) { + if (strcmp("-unwind", Tcl_GetString(objv[arg])) == 0) { + flags = TCL_CANCEL_UNWIND; + arg++; + } + } + if (Tcl_GetLongFromObj(interp, objv[arg], &id) != TCL_OK) { + return TCL_ERROR; + } + arg++; + if (arg < objc) { + result = Tcl_GetString(objv[arg]); + } else { + result = NULL; + } + return TclThreadCancel(interp, (Tcl_ThreadId) id, result, flags); + } case THREAD_CREATE: { char *script; int joinable, len; @@ -293,8 +338,25 @@ Tcl_ThreadObjCmd( Tcl_ExitThread(0); return TCL_OK; case THREAD_ID: + if (objc == 2 || objc == 3) { + Tcl_Obj *idObj; + + /* + * Check if they want the main thread id or the current thread id. + */ + if (objc == 2) { - Tcl_Obj *idObj = Tcl_NewLongObj((long) Tcl_GetCurrentThread()); + idObj = Tcl_NewLongObj((long) Tcl_GetCurrentThread()); + } else { + if (objc == 3 && strcmp("-main", Tcl_GetString(objv[2])) == 0) { + Tcl_MutexLock(&threadMutex); + idObj = Tcl_NewLongObj((long) mainThreadId); + Tcl_MutexUnlock(&threadMutex); + } else { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + } Tcl_SetObjResult(interp, idObj); return TCL_OK; @@ -358,6 +420,14 @@ Tcl_ThreadObjCmd( script = Tcl_GetString(objv[arg]); return TclThreadSend(interp, (Tcl_ThreadId) id, script, wait); } + case THREAD_EVENT: { + if (objc > 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_NewIntObj(Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT))); + return TCL_OK; + } case THREAD_ERRORPROC: { /* * Arrange for this proc to handle thread death errors. @@ -381,9 +451,35 @@ Tcl_ThreadObjCmd( return TCL_OK; } case THREAD_WAIT: + if (objc > 2) { + Tcl_WrongNumArgs(interp, 2, objv, ""); + return TCL_ERROR; + } while (1) { + + /* + * If the script has been unwound, bail out immediately. This + * does not follow the recommended guidelines for how extensions + * should handle the script cancellation functionality because + * this is not a "normal" extension. Most extensions do not have + * a command that simply enters an infinite Tcl event loop. + * Normal extensions should not specify the TCL_CANCEL_UNWIND when + * calling Tcl_Canceled to check if the command has been canceled. + */ + + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG | TCL_CANCEL_UNWIND) == TCL_ERROR) { + break; + } (void) Tcl_DoOneEvent(TCL_ALL_EVENTS); } + + /* + * If we get to this point, we have been canceled by another thread, + * which is considered to be an "error". + */ + + ThreadErrorProc(interp); + return TCL_OK; } return TCL_OK; } @@ -845,6 +941,61 @@ TclThreadSend( /* *------------------------------------------------------------------------ * + * TclThreadCancel -- + * + * Cancels a script in another thread. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * None. + * + *------------------------------------------------------------------------ + */ + +int +TclThreadCancel( + Tcl_Interp *interp, /* The current interpreter. */ + Tcl_ThreadId id, /* Thread Id of other interpreter. */ + char *result, /* The result or NULL for default. */ + int flags) /* Flags for Tcl_CancelEval. */ +{ + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + int found; + Tcl_ThreadId threadId = (Tcl_ThreadId) id; + + /* + * Verify the thread exists. + */ + + Tcl_MutexLock(&threadMutex); + found = 0; + for (tsdPtr = threadList ; tsdPtr ; tsdPtr = tsdPtr->nextPtr) { + if (tsdPtr->threadId == threadId) { + found = 1; + break; + } + } + if (!found) { + Tcl_MutexUnlock(&threadMutex); + Tcl_AppendResult(interp, "invalid thread id", NULL); + return TCL_ERROR; + } + + /* + * Since Tcl_CancelEval can be safely called from any thread, + * we do it now. + */ + + Tcl_MutexUnlock(&threadMutex); + Tcl_ResetResult(interp); + return Tcl_CancelEval(tsdPtr->interp, Tcl_NewStringObj(result, -1), 0, flags); +} + +/* + *------------------------------------------------------------------------ + * * ThreadEventProc -- * * Handle the event in the target thread. diff --git a/generic/tclTimer.c b/generic/tclTimer.c index f7da3c4..db9f6a8 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.32 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.33 2008/06/13 05:45:14 mistachkin Exp $ */ #include "tclInt.h" @@ -130,6 +130,14 @@ static Tcl_ThreadDataKey dataKey; ((long)(t1).usec - (long)(t2).usec)/1000) /* + * The maximum number of milliseconds for each Tcl_Sleep call in AfterDelay. + * This is used to limit the maximum lag between interp limit and script + * cancellation checks. + */ + +#define TCL_TIME_MAXIMUM_SLICE 500 + +/* * Prototypes for functions referenced only in this file: */ @@ -980,7 +988,7 @@ Tcl_AfterObjCmd( * * Results: * Standard Tcl result code (with error set if an error occurred due to a - * time limit being exceeded). + * time limit being exceeded or being canceled). * * Side effects: * May adjust the time limit granularity marker. @@ -1008,6 +1016,14 @@ AfterDelay( do { Tcl_GetTime(&now); + if (Tcl_AsyncReady()) { + if (Tcl_AsyncInvoke(interp, TCL_OK) != TCL_OK) { + return TCL_ERROR; + } + } + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + return TCL_ERROR; + } if (iPtr->limit.timeEvent != NULL && TCL_TIME_BEFORE(iPtr->limit.time, now)) { iPtr->limit.granularityTicker = 0; @@ -1023,6 +1039,9 @@ AfterDelay( diff = LONG_MAX; } #endif + if (diff > TCL_TIME_MAXIMUM_SLICE) { + diff = TCL_TIME_MAXIMUM_SLICE; + } if (diff > 0) { Tcl_Sleep((long)diff); } @@ -1033,9 +1052,20 @@ AfterDelay( diff = LONG_MAX; } #endif + if (diff > TCL_TIME_MAXIMUM_SLICE) { + diff = TCL_TIME_MAXIMUM_SLICE; + } if (diff > 0) { Tcl_Sleep((long)diff); } + if (Tcl_AsyncReady()) { + if (Tcl_AsyncInvoke(interp, TCL_OK) != TCL_OK) { + return TCL_ERROR; + } + } + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + return TCL_ERROR; + } if (Tcl_LimitCheck(interp) != TCL_OK) { return TCL_ERROR; } diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 79d7b4f..98b09e9 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.58 2008/04/23 15:44:37 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.59 2008/06/13 05:45:14 mistachkin Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1472,7 +1472,7 @@ test cmdAH-30.8 {Tcl_FileObjCmd: error conditions} { interp create simpleInterp interp create -safe safeInterp -interp c +interp create safeInterp expose file file test cmdAH-31.1 {Tcl_FileObjCmd: channels, too many args} { diff --git a/tests/interp.test b/tests/interp.test index 2bbd7a3..57a2020 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.55 2008/05/31 11:42:20 dkf Exp $ +# RCS: @(#) $Id: interp.test,v 1.56 2008/06/13 05:45:15 mistachkin Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -31,7 +31,7 @@ test interp-1.1 {options for interp command} { } {1 {wrong # args: should be "interp cmd ?arg ...?"}} test interp-1.2 {options for interp command} { list [catch {interp frobox} msg] $msg -} {1 {bad option "frobox": must be alias, aliases, bgerror, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} +} {1 {bad option "frobox": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.3 {options for interp command} { interp delete } "" @@ -49,13 +49,13 @@ test interp-1.6 {options for interp command} { } {1 {wrong # args: should be "interp slaves ?path?"}} test interp-1.7 {options for interp command} { list [catch {interp hello} msg] $msg -} {1 {bad option "hello": must be alias, aliases, bgerror, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} +} {1 {bad option "hello": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.8 {options for interp command} { list [catch {interp -froboz} msg] $msg -} {1 {bad option "-froboz": must be alias, aliases, bgerror, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} +} {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.9 {options for interp command} { list [catch {interp -froboz -safe} msg] $msg -} {1 {bad option "-froboz": must be alias, aliases, bgerror, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} +} {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.10 {options for interp command} { list [catch {interp target} msg] $msg } {1 {wrong # args: should be "interp target path alias"}} diff --git a/tests/thread.test b/tests/thread.test index 9f5562e..97de497 100644 --- a/tests/thread.test +++ b/tests/thread.test @@ -6,11 +6,12 @@ # # Copyright (c) 1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. +# Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: thread.test,v 1.18 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: thread.test,v 1.19 2008/06/13 05:45:15 mistachkin Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -25,7 +26,8 @@ if {[testConstraint testthread]} { testthread errorproc ThreadError proc ThreadError {id info} { - global threadError + global threadId threadError + set threadId $id set threadError $info } @@ -40,7 +42,7 @@ test thread-1.1 {Tcl_ThreadObjCmd: no args} {testthread} { } {1 {wrong # args: should be "testthread option ?args?"}} test thread-1.2 {Tcl_ThreadObjCmd: bad option} {testthread} { list [catch {testthread foo} msg] $msg -} {1 {bad option "foo": must be create, exit, id, join, names, send, wait, or errorproc}} +} {1 {bad option "foo": must be cancel, create, event, exit, id, join, names, send, wait, or errorproc}} test thread-1.3 {Tcl_ThreadObjCmd: initial thread list} {testthread} { list [threadReap] [llength [testthread names]] } {1 1} @@ -253,6 +255,1192 @@ test thread-6.1 {freeing very large object trees in a thread} testthread { set res } {0} +# TIP #285: Script cancellation support +test thread-7.1 {cancel: args} {testthread} { + set x [catch {testthread cancel} msg] + list $x $msg +} {1 {wrong # args: should be "testthread cancel ?-unwind? id ?result?"}} +test thread-7.2 {cancel: nonint} {testthread} { + set x [catch {testthread cancel abc} msg] + list $x $msg +} {1 {expected integer but got "abc"}} +test thread-7.3 {cancel: bad id} {testthread} { + set tid [expr $::tcltest::mainThread + 10] + set x [catch {testthread cancel $tid} msg] + list $x $msg +} {1 {invalid thread id}} +test thread-7.4 {cancel: pure bytecode loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.5 {cancel: pure inside-command loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + set while while + $while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.6 {cancel: pure bytecode loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.7 {cancel: pure inside-command loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + set while while + $while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.8 {cancel: pure bytecode loop custom result} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread "the eval was canceled"] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {the eval was canceled}} +test thread-7.9 {cancel: pure inside-command loop custom result} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + set while while + $while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread "the eval was canceled"] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {the eval was canceled}} +test thread-7.10 {cancel: pure bytecode loop custom result -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread "the eval was unwound"] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {the eval was unwound}} +test thread-7.11 {cancel: pure inside-command loop custom result -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + set while while + $while {1} { + # No bytecode at all here... + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread "the eval was unwound"] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {the eval was unwound}} +test thread-7.12 {cancel: after} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + after 30000 + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.13 {cancel: after -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + after 30000 + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.14 {cancel: vwait} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + vwait forever + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.15 {cancel: vwait -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + vwait forever + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.16 {cancel: expr} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + expr {[while {1} {incr x}]} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.17 {cancel: expr -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + expr {[while {1} {incr x}]} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.18 {cancel: expr bignum} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + # + # TODO: This will not cancel because libtommath + # does not check Tcl_Canceled. + # + expr {2**99999} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.19 {cancel: expr bignum -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + # + # TODO: This will not cancel because libtommath + # does not check Tcl_Canceled. + # + expr {2**99999} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.20 {cancel: subst} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + subst {[while {1} {incr x}]} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.21 {cancel: subst -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + subst {[while {1} {incr x}]} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.22 {cancel: slave interp} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + while {1} {} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.23 {cancel: slave interp -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + set i [interp create] + interp alias $i testthread {} testthread + $i eval { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + set while while; $while {1} {} + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.24 {cancel: nested catch inside pure bytecode loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + catch { + while {1} { + catch { + while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + after 1000; # wait for ThreadErrorProc to be called. + while {[testthread event]} {}; # force events to service + catch {testthread send $serverthread {testthread exit}} + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.25 {cancel: nested catch inside pure inside-command loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + set catch catch + set while while + $while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + $catch { + $while {1} { + $catch { + $while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel $serverthread] + after 1000; # wait for ThreadErrorProc to be called. + while {[testthread event]} {}; # force events to service + catch {testthread send $serverthread {testthread exit}} + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.26 {cancel: send async cancel bad interp path} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + update + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + catch {testthread send $serverthread {interp cancel -- bad}} msg + threadReap + list [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + $msg +} {1 {could not find interpreter "bad"}} +test thread-7.27 {cancel: send async cancel -- switch} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + interp create -- -unwind + interp alias -unwind testthread {} testthread + interp eval -unwind { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + update + } + } + foobar + } + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {interp cancel -- -unwind}] + after 1000; # wait for ThreadErrorProc to be called. + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval canceled}} +test thread-7.28 {cancel: send async cancel nested catch inside pure bytecode loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + catch { + while {1} { + catch { + while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {interp cancel}] + after 1000; # wait for ThreadErrorProc to be called. + while {[testthread event]} {}; # force events to service + catch {testthread send $serverthread {testthread exit}} + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.29 {cancel: send async cancel nested catch pure inside-command loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + set catch catch + set while while + $while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + $catch { + $while {1} { + $catch { + $while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {interp cancel}] + after 1000; # wait for ThreadErrorProc to be called. + while {[testthread event]} {}; # force events to service + catch {testthread send $serverthread {testthread exit}} + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.30 {cancel: send async testthread cancel nested catch inside pure bytecode loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + catch { + while {1} { + catch { + while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {testthread cancel [testthread id]}] + after 1000; # wait for ThreadErrorProc to be called. + while {[testthread event]} {}; # force events to service + catch {testthread send $serverthread {testthread exit}} + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.31 {cancel: send async testthread cancel nested catch pure inside-command loop} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + set catch catch + set while while + $while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + $catch { + $while {1} { + $catch { + $while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {testthread cancel [testthread id]}] + after 1000; # wait for ThreadErrorProc to be called. + while {[testthread event]} {}; # force events to service + catch {testthread send $serverthread {testthread exit}} + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 0 {}} +test thread-7.32 {cancel: nested catch inside pure bytecode loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + catch { + while {1} { + catch { + while {1} { + # No bytecode at all here... + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.33 {cancel: nested catch inside pure inside-command loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + set catch catch + set while while + $while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + $catch { + $while {1} { + $catch { + $while {1} { + # No bytecode at all here... + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread cancel -unwind $serverthread] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.34 {cancel: send async cancel nested catch inside pure bytecode loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + catch { + while {1} { + catch { + while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {interp cancel -unwind}] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.35 {cancel: send async cancel nested catch inside pure inside-command loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + set catch catch + set while while + $while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + $catch { + $while {1} { + $catch { + $while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {interp cancel -unwind}] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.36 {cancel: send async testthread cancel nested catch inside pure bytecode loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + catch { + while {1} { + catch { + while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {testthread cancel -unwind [testthread id]}] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} +test thread-7.37 {cancel: send async testthread cancel nested catch inside pure inside-command loop -unwind} {testthread} { + threadReap + unset -nocomplain ::threadError ::threadId ::threadIdStarted + set serverthread [testthread create -joinable { + proc foobar {} { + set catch catch + set while while + $while {1} { + if {![info exists foo]} then { + # signal the primary thread that we are ready + # to be canceled now (we are running). + testthread send [testthread id -main] \ + [list set ::threadIdStarted [testthread id]] + set foo 1 + } + $catch { + $while {1} { + $catch { + $while {1} { + # we must call update here because otherwise + # the thread cannot even be forced to exit. + update + } + } + } + } + } + } + foobar + }] + # wait for other thread to signal "ready to cancel" + vwait ::threadIdStarted; after 1000 + set res [testthread send -async $serverthread {testthread cancel -unwind [testthread id]}] + testthread join $serverthread + while {[testthread event]} {}; # force events to service + threadReap + list $res [expr {[info exists ::threadIdStarted] ? \ + $::threadIdStarted == $serverthread : 0}] \ + [expr {[info exists ::threadId] ? \ + $::threadId == $serverthread : 0}] \ + [expr {[info exists ::threadError] ? \ + [lindex [split $::threadError \n] 0] : "" }] +} {{} 1 1 {eval unwound}} + # cleanup ::tcltest::cleanupTests return diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl index ff8a520..7791add 100644 --- a/tools/man2help2.tcl +++ b/tools/man2help2.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: man2help2.tcl,v 1.17 2007/12/13 15:28:40 dgp Exp $ +# RCS: @(#) $Id: man2help2.tcl,v 1.18 2008/06/13 05:45:15 mistachkin Exp $ # # Global variables used by these scripts: @@ -985,7 +985,7 @@ proc getTwips {arg} { } default { puts stderr "bad units in distance \"$arg\"" - continue + return 0 } } return $distance diff --git a/tools/man2tcl.c b/tools/man2tcl.c index 5743a73..6622a5b 100644 --- a/tools/man2tcl.c +++ b/tools/man2tcl.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: man2tcl.c,v 1.13 2007/12/13 15:28:40 dgp Exp $ + * RCS: @(#) $Id: man2tcl.c,v 1.14 2008/06/13 05:45:15 mistachkin Exp $ */ static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08"; @@ -197,6 +197,7 @@ DoMacro( * invocation. */ { char *p, *end; + int quote; /* * If there is no macro name, then just skip the whole line. @@ -234,8 +235,11 @@ DoMacro( } QuoteText(p+1, (end-(p+1))); } else { - for (end = p+1; (*end != 0) && !isspace(*end); end++) { - /* Empty loop body. */ + quote = 0; + for (end = p+1; (*end != 0) && (quote || !isspace(*end)); end++) { + if (*end == '\'') { + quote = !quote; + } } QuoteText(p, end-p); } @@ -346,7 +350,7 @@ DoText( p += 2; sscanf(p,"%d",&ch); - PRINT(("text \\u%04x", ch)); + PRINT(("text \\u%04x\n", ch)); while(*p&&*p!='\'') p++; } else if (*p != 0) { PRINT(("char {\\%c}\n", *p)); diff --git a/win/makefile.vc b/win/makefile.vc index 27dc974..2ed2e8b 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.183 2008/06/06 19:46:42 andreas_kupries Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.184 2008/06/13 05:45:15 mistachkin Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -62,10 +62,14 @@ the build instructions. # makefile. Helpful to avoid problems when the sources are # refreshed and you rebuild, but can "overbuild" when common # headers like tclInt.h just get small changes. -# htmlhtml -- Builds a Windows .chm help file for Tcl and Tk from the +# htmlhelp -- Builds a Windows .chm help file for Tcl and Tk from the # troff manual pages found in $(ROOT)\doc. You need to # have installed the HTML Help Compiler package from Microsoft # to produce the .chm file. +# winhelp -- (deprecated) Builds the windows .hlp file for Tcl from +# the troff man files found in $(ROOT)\doc. This type of +# help file is deprecated by Microsoft in favour of html +# help files (.chm) # # 4) Macros usable on the commandline: # INSTALLDIR= @@ -423,6 +427,9 @@ cdebug = -O2 $(OPTIMIZATIONS) !else cdebug = !endif +!if $(SYMBOLS) +cdebug = $(cdebug) -Zi +!endif !else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64" ### Warnings are too many, can't support warnings into errors. cdebug = -Zi -Od $(DEBUGFLAGS) @@ -464,6 +471,9 @@ STUB_CFLAGS = $(cflags) $(cdebug) $(OPTDEFINES) ldebug = -debug:full -debugtype:cv !else ldebug = -release -opt:ref -opt:icf,3 +!if $(SYMBOLS) +ldebug = $(ldebug) -debug:full -debugtype:cv +!endif !endif ### Declarations common to all linker options @@ -682,10 +692,76 @@ TkLib UserCmd << +#------------------------------------------------------------------------- +# Build the old-style Windows .hlp file +#------------------------------------------------------------------------- + +TCLHLPBASE = $(PROJECT)$(VERSION) +HELPFILE = $(OUT_DIR)\$(TCLHLPBASE).hlp +HELPCNT = $(OUT_DIR)\$(TCLHLPBASE).cnt +DOCTMP_DIR = $(OUT_DIR)\$(PROJECT)_docs +HELPRTF = $(DOCTMP_DIR)\$(PROJECT).rtf +MAN2HELP = $(DOCTMP_DIR)\man2help.tcl +MAN2HELP2 = $(DOCTMP_DIR)\man2help2.tcl +INDEX = $(DOCTMP_DIR)\index.tcl +BMP = $(DOCTMP_DIR)\feather.bmp +BMP_NOPATH = feather.bmp +MAN2TCL = $(DOCTMP_DIR)\man2tcl.exe + +winhelp: docsetup $(HELPFILE) + +docsetup: + @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR) + +$(MAN2HELP) $(MAN2HELP2) $(INDEX) $(BMP): $(TOOLSDIR)\$$(@F) + @$(CPY) $(TOOLSDIR)\$(@F) $(@D) + +$(HELPFILE): $(HELPRTF) $(BMP) + cd $(DOCTMP_DIR) + start /wait hcrtf.exe -x <<$(PROJECT).hpj +[OPTIONS] +COMPRESS=12 Hall Zeck +LCID=0x409 0x0 0x0 ; English (United States) +TITLE=Tcl/Tk Reference Manual +BMROOT=. +CNT=$(@B).cnt +HLP=$(@B).hlp + +[FILES] +$(PROJECT).rtf + +[WINDOWS] +main="Tcl/Tk Reference Manual",,27648,(r15263976),(r65535) + +[CONFIG] +BrowseButtons() +CreateButton(1, "Web", ExecFile("http://www.tcl.tk")) +CreateButton(2, "SF", ExecFile("http://sf.net/projects/tcl")) +CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk")) +CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/")) +<< + cd $(MAKEDIR) + @$(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)" + @$(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)" + +$(MAN2TCL): $(TOOLSDIR)\$$(@B).c + $(cc32) $(TCL_CFLAGS) -Fo$(@D)\ $(TOOLSDIR)\$(@B).c + $(link32) $(conlflags) -out:$@ -stack:16384 $(@D)\man2tcl.obj + $(_VC_MANIFEST_EMBED_EXE) + +$(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX) $(DOCDIR)\* + $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(VERSION) $(DOCDIR:\=/) + install-docs: !if exist($(CHMFILE)) @echo Installing compiled html help @$(CPY) "$(CHMFILE)" "$(DOC_INSTALL_DIR)\" +!else +!if exist($(HELPFILE)) + @echo Installing Windows help + @$(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\" + @$(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\" +!endif !endif #" diff --git a/win/rules.vc b/win/rules.vc index 5b5bc71..7017793 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.36 2008/05/15 00:04:11 patthoyts Exp $ +# RCS: @(#) $Id: rules.vc,v 1.37 2008/06/13 05:45:15 mistachkin Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -252,6 +252,12 @@ DEBUG = 1 !else DEBUG = 0 !endif +!if [nmakehlp -f $(OPTS) "pdbs"] +!message *** Doing pdbs +SYMBOLS = 1 +!else +SYMBOLS = 0 +!endif !if [nmakehlp -f $(OPTS) "profile"] !message *** Doing profile PROFILE = 1 diff --git a/win/tcl.hpj.in b/win/tcl.hpj.in index 2a8c94a..3bdccbe 100644 --- a/win/tcl.hpj.in +++ b/win/tcl.hpj.in @@ -5,9 +5,9 @@ HCW=0 LCID=0x409 0x0 0x0 ;English (United States) REPORT=Yes TITLE=Tcl/Tk Reference Manual -CNT=tcl84.cnt +CNT=tcl86.cnt COPYRIGHT=Copyright © 2000 Ajuba Solutions -HLP=tcl84.hlp +HLP=tcl86.hlp [FILES] tcl.rtf diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 5f2365d..8d19ba2 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.22 2008/04/16 14:29:26 das Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.23 2008/06/13 05:45:15 mistachkin Exp $ */ #include "tclInt.h" @@ -584,7 +584,7 @@ Tcl_Sleep( sleepTime = vdelay.sec * 1000 + vdelay.usec / 1000; for (;;) { - Sleep(sleepTime); + SleepEx(sleepTime, TRUE); Tcl_GetTime(&now); if (now.sec > desired.sec) { break; diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index f6732b8..6ee0a5e 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.45 2008/05/09 04:58:55 georgeps Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.46 2008/06/13 05:45:15 mistachkin Exp $ */ #include "tclWinInt.h" @@ -691,7 +691,7 @@ Tcl_ConditionWait( while (!timeout && (tsdPtr->flags & WIN_THREAD_BLOCKED)) { ResetEvent(tsdPtr->condEvent); LeaveCriticalSection(&winCondPtr->condLock); - if (WaitForSingleObject(tsdPtr->condEvent, wtime) == WAIT_TIMEOUT) { + if (WaitForSingleObjectEx(tsdPtr->condEvent, wtime, TRUE) == WAIT_TIMEOUT) { timeout = 1; } EnterCriticalSection(&winCondPtr->condLock); -- cgit v0.12 From 0902ec32fa7d4a63956c1fca776c54c828621ac7 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 13 Jun 2008 12:14:32 +0000 Subject: fix warning --- generic/tclBasic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d0aa8e2..6ce696a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.302 2008/06/13 05:45:08 mistachkin Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.303 2008/06/13 12:14:32 das Exp $ */ #include "tclInt.h" @@ -3680,7 +3680,7 @@ Tcl_Canceled( int flags) { register Interp *iPtr = (Interp *) interp; - const char *id, *message; + const char *id, *message = NULL; int length; /* -- cgit v0.12 From d7503c2a0ba6cb585b9104047e94d9bb882909e4 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Fri, 13 Jun 2008 19:58:36 +0000 Subject: no message --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 13abc3b..ea0f6e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-13 David Gravereaux + + * win/rules.vc: SYMBOLS macro now being set to zero when $(OPTS) + is not available. + 2008-06-13 Joe Mistachkin TIP #285 IMPLEMENTATION -- cgit v0.12 From 916ab1d6c6fc833e424a316adb46716bc8ffaff2 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Fri, 13 Jun 2008 19:59:27 +0000 Subject: 2008-06-13 David Gravereaux * win/rules.vc: SYMBOLS macro now being set to zero when $(OPTS) is not available. --- win/rules.vc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win/rules.vc b/win/rules.vc index 7017793..215b286 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.37 2008/06/13 05:45:15 mistachkin Exp $ +# RCS: @(#) $Id: rules.vc,v 1.38 2008/06/13 19:59:27 davygrvy Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -214,6 +214,7 @@ _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -ou STATIC_BUILD = 0 TCL_THREADS = 0 DEBUG = 0 +SYMBOLS = 0 PROFILE = 0 MSVCRT = 0 LOIMPACT = 0 -- cgit v0.12 From 1a59e0bb027af6869bd742b0e8f56a958f885ca9 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Sat, 14 Jun 2008 02:07:44 +0000 Subject: The Stubs source files (tclStubLib.c and tclOOStubLib.c) should not be compiled with the -GL flag. --- win/makefile.vc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 2ed2e8b..f35a8bc 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.184 2008/06/13 05:45:15 mistachkin Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.185 2008/06/14 02:07:44 davygrvy Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -460,7 +460,8 @@ TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 -Di BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES) CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES) -STUB_CFLAGS = $(cflags) $(cdebug) $(OPTDEFINES) +### Stubs files should not be compiled with -GL +STUB_CFLAGS = $(cflags) $(cdebug:-GL=) $(OPTDEFINES) #--------------------------------------------------------------------- @@ -904,6 +905,9 @@ $(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c $(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? + +$(TMP_DIR)\tclOOStubLib.obj: $(GENERICDIR)\tclOOStubLib.c + $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? #--------------------------------------------------------------------- # Generate the source dependencies. Having dependency rules will -- cgit v0.12 From 3442c49b0d59b2c46d98ba1ddcf6dc68769b6738 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Sat, 14 Jun 2008 02:25:25 +0000 Subject: no message --- ChangeLog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ea0f6e6..79f0916 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ 2008-06-13 David Gravereaux - * win/rules.vc: SYMBOLS macro now being set to zero when $(OPTS) + * win/rules.vc: SYMBOLS macro is now being set to zero when $(OPTS) is not available. + * win/makefile.vc: The Stubs source files (tclStubLib.c and + tclOOStubLib.c) should not be compiled with the -GL flag. 2008-06-13 Joe Mistachkin -- cgit v0.12 From 52a5824083b50f66194e6987b001cc68bc04cb10 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 16 Jun 2008 18:38:41 +0000 Subject: * tests/ioTrans.test (iortrans-11.*): Fixed same issue as for iortrans.tf-11.*, cleanup of temp file, making this a followup to the entry on 2008-06-10 by myself. --- ChangeLog | 6 ++++++ tests/ioTrans.test | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 79f0916..ec79e0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-16 Andreas Kupries + + * tests/ioTrans.test (iortrans-11.*): Fixed same issue as for + iortrans.tf-11.*, cleanup of temp file, making this a followup to + the entry on 2008-06-10 by myself. + 2008-06-13 David Gravereaux * win/rules.vc: SYMBOLS macro is now being set to zero when $(OPTS) diff --git a/tests/ioTrans.test b/tests/ioTrans.test index 3bee19e..b607885 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioTrans.test,v 1.2 2008/06/10 18:06:39 andreas_kupries Exp $ +# RCS: @(#) $Id: ioTrans.test,v 1.3 2008/06/16 18:38:42 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -712,6 +712,7 @@ test iortrans-11.0 {origin interpreter of moved transform gone} -match glob -bod lappend res [catch {interp eval $idb [list close $chan]} msg] $msg #lappend res [interp eval $ida {set res}] # actions: clear|write|clear|write|clear|flush|limit?|drain|flush + tempdone set res # The 'tell' is ok, as it passed through the transform to the base # channel without invoking the transform handler. @@ -757,6 +758,7 @@ test iortrans-11.1 {origin interpreter of moved transform destroyed during acces catch { puts $chan shoo } res set res }] + tempdone set res } -constraints {testchannel impossible} \ -result {Owner lost} -- cgit v0.12 From ec43fe476600ee215c4012baea54bdb62f394cd2 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 16 Jun 2008 19:59:03 +0000 Subject: * generic/tclCmdIL.c (TclInfoFrame): Moved the code looking up the * tests/info.test: information for key 'proc' out of the TCL_LOCATION_BC branch to after the switch, this is common to all frame types. Updated the testsuite to match. This was exposed by the 2008-06-08 commit (Miguel), switching uplevel from direct eval to compilation. Fixes [Bug 1987851]. --- ChangeLog | 9 ++++++ generic/tclCmdIL.c | 88 +++++++++++++++++++++++++++++------------------------- tests/info.test | 16 +++++----- 3 files changed, 64 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec79e0b..417e7ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2008-06-16 Andreas Kupries + * generic/tclCmdIL.c (TclInfoFrame): Moved the code looking up the + * tests/info.test: information for key 'proc' out of the + TCL_LOCATION_BC branch to after the switch, this is common to all + frame types. Updated the testsuite to match. This was exposed by + the 2008-06-08 commit (Miguel), switching uplevel from direct eval + to compilation. Fixes [Bug 1987851]. + +2008-06-16 Andreas Kupries + * tests/ioTrans.test (iortrans-11.*): Fixed same issue as for iortrans.tf-11.*, cleanup of temp file, making this a followup to the entry on 2008-06-10 by myself. diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index f18a14a..296c3f4 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.139 2008/05/30 22:54:27 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.140 2008/06/16 19:59:03 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1126,6 +1126,9 @@ TclInfoFrame( }; Tcl_Obj *tmpObj; + Proc *procPtr = + framePtr->framePtr ? framePtr->framePtr->procPtr : NULL; + /* * Pull the information and construct the dictionary to return, as list. * Regarding use of the CmdFrame fields see tclInt.h, and its definition. @@ -1181,8 +1184,6 @@ TclInfoFrame( * Execution of bytecode. Talk to the BC engine to fill out the frame. */ - Proc *procPtr = - framePtr->framePtr ? framePtr->framePtr->procPtr : NULL; CmdFrame *fPtr; fPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); @@ -1216,44 +1217,6 @@ TclInfoFrame( ADD_PAIR("cmd", Tcl_NewStringObj(fPtr->cmd.str.cmd, fPtr->cmd.str.len)); - - if (procPtr != NULL) { - Tcl_HashEntry *namePtr = procPtr->cmdPtr->hPtr; - - if (namePtr) { - /* - * This is a regular command. - */ - - char *procName = Tcl_GetHashKey(namePtr->tablePtr, namePtr); - char *nsName = procPtr->cmdPtr->nsPtr->fullName; - - ADD_PAIR("proc", Tcl_NewStringObj(nsName, -1)); - - if (strcmp(nsName, "::") != 0) { - Tcl_AppendToObj(lv[lc-1], "::", -1); - } - Tcl_AppendToObj(lv[lc-1], procName, -1); - } else if (procPtr->cmdPtr->clientData) { - ExtraFrameInfo *efiPtr = procPtr->cmdPtr->clientData; - int i; - - /* - * This is a non-standard command. Luckily, it's told us how - * to render extra information about its frame. - */ - - for (i=0 ; ilength ; i++) { - lv[lc++] = Tcl_NewStringObj(efiPtr->fields[i].name, -1); - if (efiPtr->fields[i].proc) { - lv[lc++] = efiPtr->fields[i].proc( - efiPtr->fields[i].clientData); - } else { - lv[lc++] = efiPtr->fields[i].clientData; - } - } - } - } TclStackFree(interp, fPtr); break; } @@ -1282,6 +1245,49 @@ TclInfoFrame( } /* + * 'proc'. Common to all frame types. Conditional on having an associated + * Procedure CallFrame. + */ + + if (procPtr != NULL) { + Tcl_HashEntry *namePtr = procPtr->cmdPtr->hPtr; + + if (namePtr) { + /* + * This is a regular command. + */ + + char *procName = Tcl_GetHashKey(namePtr->tablePtr, namePtr); + char *nsName = procPtr->cmdPtr->nsPtr->fullName; + + ADD_PAIR("proc", Tcl_NewStringObj(nsName, -1)); + + if (strcmp(nsName, "::") != 0) { + Tcl_AppendToObj(lv[lc-1], "::", -1); + } + Tcl_AppendToObj(lv[lc-1], procName, -1); + } else if (procPtr->cmdPtr->clientData) { + ExtraFrameInfo *efiPtr = procPtr->cmdPtr->clientData; + int i; + + /* + * This is a non-standard command. Luckily, it's told us how to + * render extra information about its frame. + */ + + for (i=0 ; ilength ; i++) { + lv[lc++] = Tcl_NewStringObj(efiPtr->fields[i].name, -1); + if (efiPtr->fields[i].proc) { + lv[lc++] = + efiPtr->fields[i].proc(efiPtr->fields[i].clientData); + } else { + lv[lc++] = efiPtr->fields[i].clientData; + } + } + } + } + + /* * 'level'. Common to all frame types. Conditional on having an associated * _visible_ CallFrame. */ diff --git a/tests/info.test b/tests/info.test index b6b708c..54a548a 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.48 2008/05/31 11:42:20 dkf Exp $ +# RCS: @(#) $Id: info.test,v 1.49 2008/06/16 19:59:04 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -748,13 +748,13 @@ test info-22.2 {info frame, bad level absolute} {!singleTestInterp} { } {bad level "9"} test info-22.3 {info frame, current, relative} { info frame 0 -} {type eval line 2 cmd {info frame 0}} +} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} test info-22.4 {info frame, current, relative, nested} { set res [info frame 0] -} {type eval line 2 cmd {info frame 0}} +} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} test info-22.5 {info frame, current, absolute} {!singleTestInterp} { reduce [info frame 7] -} {type eval line 2 cmd {info frame 7}} +} {type eval line 2 cmd {info frame 7} proc ::tcltest::RunTest} test info-22.6 {info frame, global, relative} {!singleTestInterp} { reduce [info frame -6] } {type source line 758 file info.test cmd test\ info-22.6\ \{info\ frame,\ global,\ relative\}\ \{!singleTestInter level 0} @@ -787,14 +787,14 @@ test info-23.3 {eval'd info frame, literal} { eval { info frame 0 } -} {type eval line 2 cmd {info frame 0}} +} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} test info-23.4 {eval'd info frame, semi-dynamic} { eval info frame 0 -} {type eval line 1 cmd {info frame 0}} +} {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} test info-23.5 {eval'd info frame, dynamic} { set script {info frame 0} eval $script -} {type eval line 1 cmd {info frame 0}} +} {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} test info-23.6 {eval'd info frame, trace} {knownBug !singleTestInterp} { set script {etrace} join [eval $script] \n @@ -982,7 +982,7 @@ test info-31.5 {for, script in variable} { test info-31.6 {eval, script in variable} { eval $body set res -} {type eval line 3 cmd {info frame 0}} +} {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} # ------------------------------------------------------------------------- -- cgit v0.12 From 81826540aab2845b6b171f38dd9051e923e6031b Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 17 Jun 2008 02:16:06 +0000 Subject: 2006-06-17 Kevin Kenny * generic/tclClock.c (ConvertLocalToUTC): * tests/clock.test (clock-63.1): Fixed a bug where the internal ConvertLocalToUTC command segfaulted if passed a dictionary without the 'localSeconds' key. To the best of my knowledge, the bug was not observable in the [clock] command itself. --- ChangeLog | 9 +++++++++ generic/tclClock.c | 22 +++++++++++++++------- tests/clock.test | 10 +++++++++- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 417e7ad..42476df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-06-17 Kevin Kenny + + * generic/tclClock.c (ConvertLocalToUTC): + * tests/clock.test (clock-63.1): Fixed a bug where the + internal ConvertLocalToUTC command segfaulted if passed a + dictionary without the 'localSeconds' key. To the best of + my knowledge, the bug was not observable in the [clock] + command itself. + 2008-06-16 Andreas Kupries * generic/tclCmdIL.c (TclInfoFrame): Moved the code looking up the diff --git a/generic/tclClock.c b/generic/tclClock.c index 12c2e64..a27deb6 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.66 2008/02/27 02:08:27 kennykb Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.67 2008/06/17 02:16:06 kennykb Exp $ */ #include "tclInt.h" @@ -333,12 +333,20 @@ ClockConvertlocaltoutcObjCmd( return TCL_ERROR; } dict = objv[1]; - if ((Tcl_DictObjGet(interp, dict, literals[LIT_LOCALSECONDS], - &secondsObj) != TCL_OK) - || (Tcl_GetWideIntFromObj(interp, secondsObj, - &(fields.localSeconds)) != TCL_OK) - || (TclGetIntFromObj(interp, objv[3], &changeover) != TCL_OK) - || ConvertLocalToUTC(interp, &fields, objv[2], changeover)) { + if (Tcl_DictObjGet(interp, dict, literals[LIT_LOCALSECONDS], + &secondsObj)!= TCL_OK) { + fprintf(stderr, "fell out here\n"); fflush(stderr); + return TCL_ERROR; + } + if (secondsObj == NULL) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("key \"localseconds\" not " + "found in dictionary", -1)); + return TCL_ERROR; + } + if ((Tcl_GetWideIntFromObj(interp, secondsObj, + &(fields.localSeconds)) != TCL_OK) + || (TclGetIntFromObj(interp, objv[3], &changeover) != TCL_OK) + || ConvertLocalToUTC(interp, &fields, objv[2], changeover)) { return TCL_ERROR; } diff --git a/tests/clock.test b/tests/clock.test index 15e71eb..3d0f62d 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.84 2008/04/14 18:01:01 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.85 2008/06/17 02:16:07 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36636,6 +36636,14 @@ test clock-62.1 {Bug 1902423} {*}{ -result ok } +test clock-63.1 {Incorrect use of internal ConvertLocalToUTC command} {*}{ + -body { + ::tcl::clock::ConvertLocalToUTC {immaterial stuff} {} 12345 + } + -returnCodes error + -result {key "localseconds" not found in dictionary} +} + # cleanup namespace delete ::testClock -- cgit v0.12 From 4621092d03172ab7829795e577419472d8b1d390 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 17 Jun 2008 16:44:46 +0000 Subject: * doc/tm.n: Followup to changelog entry 2008-03-18 regarding ::tcl::tm::Defaults. Updated the documentation to not only mention the new (underscored) form of environment variable names, but make it the encouraged form as well. See [Bug 1914604]. --- ChangeLog | 7 +++++++ doc/tm.n | 23 +++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42476df..ad0517d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-17 Andreas Kupries + + * doc/tm.n: Followup to changelog entry 2008-03-18 regarding + ::tcl::tm::Defaults. Updated the documentation to not only mention + the new (underscored) form of environment variable names, but make + it the encouraged form as well. See [Bug 1914604]. + 2006-06-17 Kevin Kenny * generic/tclClock.c (ConvertLocalToUTC): diff --git a/doc/tm.n b/doc/tm.n index 4956012..6750f4d 100644 --- a/doc/tm.n +++ b/doc/tm.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tm.n,v 1.14 2008/01/18 15:59:22 dkf Exp $ +'\" RCS: @(#) $Id: tm.n,v 1.15 2008/06/17 16:44:47 andreas_kupries Exp $ '\" .so man.macros .TH tm n 8.5 Tcl "Tcl Built-In Commands" @@ -256,13 +256,20 @@ Note that this is always a single entry because \fIX\fR is always a specific value (the current major version of Tcl). .SS "USER SPECIFIC PATHS" .TP -\fB$::env(TCL\fIX\fB.\fIy\fB_TM_PATH)\fR +\fB$::env(TCL\fIX\fB_\fIy\fB_TM_PATH)\fR . A list of paths, separated by either \fB:\fR (Unix) or \fB;\fR (Windows). This is user and site specific as this environment variable can be set not only by the user's profile, but by system configuration scripts as well. -.RS +.TP +\fB$::env(TCL\fIX\fB.\fIy\fB_TM_PATH)\fR +. +Same meaning and content as the previous variable. However the use of +dot '.' to separate major and minor version number makes this name +less to non-portable and its use is discouraged. Support of this +variable has been kept only for backward compatibility with the +original specification, i.e. TIP 189. .PP These paths are seen and therefore shared by all Tcl shells in the \fB$::env(PATH)\fR of the user. @@ -271,11 +278,11 @@ Note that \fIX\fR and \fIy\fR follow the general rules set out above. In other words, Tcl 8.4, for example, will look at these 5 environment variables: .CS -\fB$::env(TCL8.4_TM_PATH)\fR -\fB$::env(TCL8.3_TM_PATH)\fR -\fB$::env(TCL8.2_TM_PATH)\fR -\fB$::env(TCL8.1_TM_PATH)\fR -\fB$::env(TCL8.0_TM_PATH)\fR +\fB$::env(TCL8.4_TM_PATH)\fR \fB$::env(TCL8_4_TM_PATH)\fR +\fB$::env(TCL8.3_TM_PATH)\fR \fB$::env(TCL8_3_TM_PATH)\fR +\fB$::env(TCL8.2_TM_PATH)\fR \fB$::env(TCL8_2_TM_PATH)\fR +\fB$::env(TCL8.1_TM_PATH)\fR \fB$::env(TCL8_1_TM_PATH)\fR +\fB$::env(TCL8.0_TM_PATH)\fR \fB$::env(TCL8_0_TM_PATH)\fR .CE .RE .SH "SEE ALSO" -- cgit v0.12 From c5aa556512c602fe31bf8e6d1b3c6f8e20aa119d Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 17 Jun 2008 17:22:48 +0000 Subject: * generic/tclClock.c (ClockConvertlocaltoutcObjCmd): Removed left over debug output. --- ChangeLog | 5 +++++ generic/tclClock.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad0517d..75812bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-06-17 Andreas Kupries + * generic/tclClock.c (ClockConvertlocaltoutcObjCmd): Removed left + over debug output. + +2008-06-17 Andreas Kupries + * doc/tm.n: Followup to changelog entry 2008-03-18 regarding ::tcl::tm::Defaults. Updated the documentation to not only mention the new (underscored) form of environment variable names, but make diff --git a/generic/tclClock.c b/generic/tclClock.c index a27deb6..abf70ef 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.67 2008/06/17 02:16:06 kennykb Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.68 2008/06/17 17:22:48 andreas_kupries Exp $ */ #include "tclInt.h" @@ -335,7 +335,6 @@ ClockConvertlocaltoutcObjCmd( dict = objv[1]; if (Tcl_DictObjGet(interp, dict, literals[LIT_LOCALSECONDS], &secondsObj)!= TCL_OK) { - fprintf(stderr, "fell out here\n"); fflush(stderr); return TCL_ERROR; } if (secondsObj == NULL) { -- cgit v0.12 From cb45bcc4efcca9015cae5f27ba010ad0f2ed39ff Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 19 Jun 2008 15:36:59 +0000 Subject: * README: Bump version number to 8.6a1 * generic/tcl.h: * library/init.tcl: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/configure.in: * unix/configure: autoconf-2.59 * win/configure: --- ChangeLog | 13 +++++++++++++ README | 4 ++-- generic/tcl.h | 6 +++--- library/init.tcl | 4 ++-- tools/tcl.wse.in | 2 +- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tcl.spec | 4 ++-- win/configure | 2 +- win/configure.in | 4 ++-- 10 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75812bd..e04f24d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-06-19 Don Porter + + * README: Bump version number to 8.6a1 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + 2008-06-17 Andreas Kupries * generic/tclClock.c (ClockConvertlocaltoutcObjCmd): Removed left diff --git a/README b/README index 391ffb9..766ac68 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tcl - This is the Tcl 8.6a0 source distribution. + This is the Tcl 8.6a1 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.68 2008/04/01 16:23:39 dgp Exp $ +RCS: @(#) $Id: README,v 1.69 2008/06/19 15:37:02 dgp Exp $ Contents -------- diff --git a/generic/tcl.h b/generic/tcl.h index dbf4c52..65c9eec 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.258 2008/06/13 05:45:07 mistachkin Exp $ + * RCS: @(#) $Id: tcl.h,v 1.259 2008/06/19 15:37:03 dgp Exp $ */ #ifndef _TCL @@ -60,10 +60,10 @@ extern "C" { #define TCL_MAJOR_VERSION 8 #define TCL_MINOR_VERSION 6 #define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TCL_RELEASE_SERIAL 0 +#define TCL_RELEASE_SERIAL 1 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6a0" +#define TCL_PATCH_LEVEL "8.6a1" /* * The following definitions set up the proper options for Windows compilers. diff --git a/library/init.tcl b/library/init.tcl index 5bdbff2..83981ae 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.105 2008/04/01 16:23:42 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.106 2008/06/19 15:37:04 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6a0 +package require -exact Tcl 8.6a1 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in index e5914fc..a1f7813 100644 --- a/tools/tcl.wse.in +++ b/tools/tcl.wse.in @@ -12,7 +12,7 @@ item: Global Log Pathname=%MAINDIR%\INSTALL.LOG Message Font=MS Sans Serif Font Size=8 - Disk Label=tcl8.6a0 + Disk Label=tcl8.6a1 Disk Filename=setup Patch Flags=0000000000000001 Patch Threshold=85 diff --git a/unix/configure b/unix/configure index ac88b41..6a59f08 100755 --- a/unix/configure +++ b/unix/configure @@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a0" +TCL_PATCH_LEVEL="a1" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/configure.in b/unix/configure.in index f49c43c..9da98b9 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.183 2008/06/12 06:27:30 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.184 2008/06/19 15:37:11 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -27,7 +27,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a0" +TCL_PATCH_LEVEL="a1" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/tcl.spec b/unix/tcl.spec index 39bc504..da3757d 100644 --- a/unix/tcl.spec +++ b/unix/tcl.spec @@ -1,11 +1,11 @@ -# $Id: tcl.spec,v 1.38 2008/04/01 16:23:45 dgp Exp $ +# $Id: tcl.spec,v 1.39 2008/06/19 15:37:11 dgp Exp $ # This file is the basis for a binary Tcl RPM for Linux. %{!?directory:%define directory /usr/local} Name: tcl Summary: Tcl scripting language development environment -Version: 8.6a0 +Version: 8.6a1 Release: 2 License: BSD Group: Development/Languages diff --git a/win/configure b/win/configure index 9454976..b9e9705 100755 --- a/win/configure +++ b/win/configure @@ -1272,7 +1272,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a0" +TCL_PATCH_LEVEL="a1" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index 8beb3af..af989ff 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.105 2008/04/01 16:23:45 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.106 2008/06/19 15:37:13 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -16,7 +16,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a0" +TCL_PATCH_LEVEL="a1" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 -- cgit v0.12 From eb2dd5ab54c55e83b8ef85ecdc4c1cfc04a3b9c7 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 19 Jun 2008 19:27:49 +0000 Subject: * changes: Updates for 8.6a1 release. --- ChangeLog | 2 ++ changes | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e04f24d..a09f486 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-06-19 Don Porter + * changes: Updates for 8.6a1 release. + * README: Bump version number to 8.6a1 * generic/tcl.h: * library/init.tcl: diff --git a/changes b/changes index 22a2a95..ac24e2d 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.136 2008/03/28 16:45:36 dgp Exp $ +RCS: @(#) $Id: changes,v 1.137 2008/06/19 19:27:51 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7190,3 +7190,42 @@ variables without "." added to customization hooks (kupries) 2008-03-27 clock tzdata updated to Olson's tzdata2008b (kenny) --- Released 8.5.2, March 28, 2008 --- See ChangeLog for details --- + +2008-03-30 (bug fix)[1783544] more robust TclIsNaN() (kenny,teterin) + +2008-04-01 (interface)[1819422] tclStubsPtr no longer in libtcl (porter) + *** POTENTIAL INCOMPATIBILITY *** + +2008-04-01 (bug fix)[1839067] FP round fix for Solaris/x86 (kupries,schlenker) + +2008-04-02 (bug fix)[780533,1932639] [fcopy] callbacks unreliable (ferrieux) + +2008-04-04 (bug fix) [chan postevent] crash (kupries) + +2008-04-07 (bug fix) Fix broken [format {% d}] (max) + +2008-04-07 (bug fix)[1350564] Bi-directional [fcopy] now supported (ferrieux) + +2008-04-16 (interface)[1938497] make stubs tables 'static const' (steffen) + +2008-05-02 (new feature) [binary] is now a [namespace ensemble] (thoyts) + +2008-05-07 (bug fix) [dict append] crash (mccormack,fellows) + +2008-05-21 (bug fix)[1968882] [info complete "\\\n"] => 0 (porter) + +2008-05-22 (bug fix)[1968245] Tcl_LogCommandInfo() accept length=-1 (darroch) + +2008-05-23 (bug fix)[1965787] 32-bit overflow in [tell] result (ferrieux) + +2008-05-31 (new feature)[TIP 257] [oo::*] commands from TclOO (fellows) + +2008-06-04 (new feature)[TIP 317] [binary encode]; [binary decode] (thoyts) + +2008-06-06 (new feature)[TIP 230] [chan push]; [chan pop] (kupries) + +2008-06-08 (enhancement)[1973096] bytecompiled [uplevel] scripts (sofer) + +2008-06-13 (new feature)[TIP 285] [interp cancel]; Tcl_CancelEval() (mistachkin) + +--- Released 8.6a1, June ??, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 013ca8a95da3cc8a9bcdf37f9627d9676527fc76 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Jun 2008 20:57:22 +0000 Subject: Fix [Bug 1998221] --- ChangeLog | 111 ++++++++++++++++++++++++++++------------------------ generic/tclOOCall.c | 15 ++++--- tests/oo.test | 19 ++++++++- 3 files changed, 86 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index a09f486..9f2639d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-19 Donal K. Fellows + + * generic/tclOOCall.c (AddSimpleClassChainToCallContext): Make sure + * tests/oo.test (oo-14.8): that class mixins are processed in the + documented order. + 2008-06-19 Don Porter * changes: Updates for 8.6a1 release. @@ -21,38 +27,37 @@ 2008-06-17 Andreas Kupries * doc/tm.n: Followup to changelog entry 2008-03-18 regarding - ::tcl::tm::Defaults. Updated the documentation to not only mention - the new (underscored) form of environment variable names, but make - it the encouraged form as well. See [Bug 1914604]. - + ::tcl::tm::Defaults. Updated the documentation to not only mention the + new (underscored) form of environment variable names, but make it the + encouraged form as well. [Bug 1914604] + 2006-06-17 Kevin Kenny * generic/tclClock.c (ConvertLocalToUTC): - * tests/clock.test (clock-63.1): Fixed a bug where the - internal ConvertLocalToUTC command segfaulted if passed a - dictionary without the 'localSeconds' key. To the best of - my knowledge, the bug was not observable in the [clock] - command itself. - + * tests/clock.test (clock-63.1): Fixed a bug where the internal + ConvertLocalToUTC command segfaulted if passed a dictionary without + the 'localSeconds' key. To the best of my knowledge, the bug was not + observable in the [clock] command itself. + 2008-06-16 Andreas Kupries * generic/tclCmdIL.c (TclInfoFrame): Moved the code looking up the * tests/info.test: information for key 'proc' out of the TCL_LOCATION_BC branch to after the switch, this is common to all - frame types. Updated the testsuite to match. This was exposed by - the 2008-06-08 commit (Miguel), switching uplevel from direct eval - to compilation. Fixes [Bug 1987851]. + frame types. Updated the testsuite to match. This was exposed by the + 2008-06-08 commit (Miguel), switching uplevel from direct eval to + compilation. [Bug 1987851] 2008-06-16 Andreas Kupries * tests/ioTrans.test (iortrans-11.*): Fixed same issue as for - iortrans.tf-11.*, cleanup of temp file, making this a followup to - the entry on 2008-06-10 by myself. + iortrans.tf-11.*, cleanup of temp file, making this a followup to the + entry on 2008-06-10 by myself. 2008-06-13 David Gravereaux - * win/rules.vc: SYMBOLS macro is now being set to zero when $(OPTS) - is not available. + * win/rules.vc: SYMBOLS macro is now being set to zero when $(OPTS) is + not available. * win/makefile.vc: The Stubs source files (tclStubLib.c and tclOOStubLib.c) should not be compiled with the -GL flag. @@ -60,58 +65,60 @@ TIP #285 IMPLEMENTATION - * doc/Eval.3: Added documentation for the Tcl_CancelEval and Tcl_Canceled - functions and the TCL_CANCEL_UNWIND flag bit. - * doc/after.n: Corrected the spelling of 'canceled' in the documentation. + * doc/Eval.3: Added documentation for the Tcl_CancelEval and + Tcl_Canceled functions and the TCL_CANCEL_UNWIND flag bit. + * doc/after.n: Corrected the spelling of 'canceled' in the + documentation. * doc/interp.n: Added documentation for [interp cancel]. - * generic/tcl.decls: Added the Tcl_CancelEval and Tcl_Canceled functions - to the stubs table. + * generic/tcl.decls: Added the Tcl_CancelEval and Tcl_Canceled + functions to the stubs table. * generic/tcl.h: Added the TCL_CANCEL_UNWIND flag bit. - * generic/tclBasic.c: The bulk of the script cancellation functionality - is defined here. Added code to initialize and manage the script - cancellation hash table in a thread-safe manner. Reset script - cancellation flags prior to increasing the nesting level (if the nesting - level is currently zero) and always cooperatively check for script - cancellation near the start of TclEvalObjvInternal and after invoking - async handlers. + * generic/tclBasic.c: The bulk of the script cancellation + functionality is defined here. Added code to initialize and manage the + script cancellation hash table in a thread-safe manner. Reset script + cancellation flags prior to increasing the nesting level (if the + nesting level is currently zero) and always cooperatively check for + script cancellation near the start of TclEvalObjvInternal and after + invoking async handlers. * generic/tclDecls.h: Regenerated. * generic/tclEvent.c: Call TclFinalizeEvaluation during finalization to cleanup the script cancellation hash table. During [vwait], always cooperatively check for script cancellation. Corrected the spelling of 'canceled' in comments to be consistent with the documentation. * generic/tclExecute.c: Reset script cancellation flags prior to - increasing the nesting level (if the nesting level is currently zero) and - always cooperatively check for script cancellation after invoking async - handlers. Prevent [catch] from catching script cancellation when the - TCL_CANCEL_UNWIND flag is set (similar to the manner used by TIP 143 when - a limit has been exceeded). - * generic/tclInt.decls: Added TclResetCancellation to the internal stubs - table. + increasing the nesting level (if the nesting level is currently zero) + and always cooperatively check for script cancellation after invoking + async handlers. Prevent [catch] from catching script cancellation when + the TCL_CANCEL_UNWIND flag is set (similar to the manner used by TIP + 143 when a limit has been exceeded). + * generic/tclInt.decls: Added TclResetCancellation to the internal + stubs table. * generic/tclInt.h: Added asyncCancel and asyncCancelMsg fields to the private Interp structure. Added private interp flag value CANCELED to help control script cancellation. * generic/tclIntDecls.h: Regenerated. * generic/tclInterp.c (Tcl_InterpObjCmd): Added [interp cancel] subcommand. - * generic/tclNotify.c (Tcl_DeleteEventSource): Corrected the spelling of - 'canceled' in comments to be consistent with the documentation. - * generic/tclParse.c: Reset script cancellation flags prior to increasing - * generic/tclProc.c: the nesting level (if the nesting level is currently - zero) and cooperatively check for script cancellation prior to evaluating - commands. + * generic/tclNotify.c (Tcl_DeleteEventSource): Corrected the spelling + of 'canceled' in comments to be consistent with the documentation. + * generic/tclParse.c: Reset script cancellation flags prior to + * generic/tclProc.c: increasing the nesting level (if the nesting + level is currently zero) and cooperatively check for script + cancellation prior to evaluating commands. * generic/tclStubInit.c: Regenerated. * generic/tclThreadTest.c (Tcl_ThreadObjCmd): Added script cancellation support ([testthread cancel]). Modified [testthread id] to allow querying of the 'main' thread ID. - Corrected comments to reflect the actual command syntax. Made [testthread - wait] cooperatively check for script cancellation. Added [testthread - event] to allow for processing one pending event without blocking. - * generic/tclTimer.c: Delay for a maximum of 500 milliseconds prior - to checking for async handlers and script cancellation. + Corrected comments to reflect the actual command syntax. Made + [testthread wait] cooperatively check for script cancellation. Added + [testthread event] to allow for processing one pending event without + blocking. + * generic/tclTimer.c: Delay for a maximum of 500 milliseconds prior to + checking for async handlers and script cancellation. * tests/cmdAH.test: Changed [interp c] to [interp create]. * tests/interp.test: Added and fixed tests for [interp cancel]. - * tests/thread.test: Added tests for script cancellation via [testthread - cancel]. + * tests/thread.test: Added tests for script cancellation via + [testthread cancel]. * tools/man2help2.tcl: Fixed problems with WinHelp target (see * tools/man2tcl.c: [Bug 1934200], [Bug 1934265], and [Bug 1934272]). * win/makefile.vc: Added 'pdbs' option for Windows build rules to allow @@ -145,9 +152,9 @@ 2008-06-10 Joe English - * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension - when converting incomplete UTF-8 sequences. See [Bug 1908443] - for details. + * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension + when converting incomplete UTF-8 sequences. See [Bug 1908443] for + details. 2008-06-10 Andreas Kupries diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index c5c9418..bc90d09 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.6 2008/06/08 23:13:09 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.7 2008/06/19 20:57:23 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1163,9 +1163,17 @@ AddSimpleClassChainToCallContext( /* * We hard-code the tail-recursive form. It's by far the most common case * *and* it is much more gentle on the stack. + * + * Note that mixins must be processed before the main class hierarchy. + * [Bug 1998221] */ tailRecurse: + FOREACH(superPtr, classPtr->mixins) { + AddSimpleClassChainToCallContext(superPtr, methodNameObj, cbPtr, + doneFilters, flags, filterDecl); + } + if (flags & CONSTRUCTOR) { AddMethodToCallChain(classPtr->constructorPtr, cbPtr, doneFilters, filterDecl); @@ -1195,11 +1203,6 @@ AddSimpleClassChainToCallContext( } } - FOREACH(superPtr, classPtr->mixins) { - AddSimpleClassChainToCallContext(superPtr, methodNameObj, cbPtr, - doneFilters, flags, filterDecl); - } - switch (classPtr->superclasses.num) { case 1: classPtr = classPtr->superclasses.list[0]; diff --git a/tests/oo.test b/tests/oo.test index a569b77..0362647 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.5 2008/05/31 22:29:46 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.6 2008/06/19 20:57:23 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1039,6 +1039,23 @@ test oo-14.7 {OO and filters from mixins of mixins} -setup { } [C new] foo } -result {(foo) (bar) (egg) chicken (egg) (bar) (foo)} +test oo-14.8 {OO: class mixin order - Bug 1998221} -setup { + set ::result {} + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create mix { + superclass master + method test {} {lappend ::result mix; next; return $::result} + } + oo::class create cls { + superclass master + mixin mix + method test {} {lappend ::result cls; next; return $::result} + } + [cls new] test +} -result {mix cls} test oo-15.1 {OO: object cloning} { oo::class create Aclass -- cgit v0.12 From 107e7f1dfc29d890846a46317dca00e49594393c Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Jun 2008 21:03:00 +0000 Subject: Forgot the bug number --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9f2639d..82b3192 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,7 @@ * generic/tclOOCall.c (AddSimpleClassChainToCallContext): Make sure * tests/oo.test (oo-14.8): that class mixins are processed in the - documented order. + documented order. [Bug 1998221] 2008-06-19 Don Porter -- cgit v0.12 From 48bde53d60eb4631746456df0bd1e879c6a15628 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Jun 2008 21:29:02 +0000 Subject: Make [next] work as described in TIP. [Bug 1998244] --- ChangeLog | 4 ++++ doc/next.n | 4 ++-- generic/tclOO.c | 21 +++++++++++++++------ tests/oo.test | 24 +++++++++++++----------- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82b3192..1f23d2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-06-19 Donal K. Fellows + * generic/tclOO.c (Tcl_ObjectContextInvokeNext): Corrected 'next' (at + * tests/oo.test (oo-7.8): end of a call chain) to make it + * doc/next.n: consistent with the TIP. [Bug 1998244] + * generic/tclOOCall.c (AddSimpleClassChainToCallContext): Make sure * tests/oo.test (oo-14.8): that class mixins are processed in the documented order. [Bug 1998221] diff --git a/doc/next.n b/doc/next.n index a312764..898b79b 100644 --- a/doc/next.n +++ b/doc/next.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: next.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" RCS: @(#) $Id: next.n,v 1.2 2008/06/19 21:29:03 dkf Exp $ '\" .so man.macros .TH next n 0.1 TclOO "TclOO Commands" @@ -29,7 +29,7 @@ point where a filter calls the actual implementation (the filter may decide to not go along the chain, and may process the results of going along the chain of methods as it chooses). The result of the \fBnext\fR command is the result of the next method in the method chain; if there are no further methods in the -method chain, the result of \fBnext\fR is the empty string. The arguments, +method chain, the result of \fBnext\fR will be an error. The arguments, \fIarg\fR, to \fBnext\fR are the arguments to pass to the next method in the chain. .SH "THE METHOD CHAIN" diff --git a/generic/tclOO.c b/generic/tclOO.c index 667210b..2b892af 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.8 2008/06/12 06:29:17 das Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.9 2008/06/19 21:29:03 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1952,13 +1952,22 @@ Tcl_ObjectContextInvokeNext( if (contextPtr->index+1 >= contextPtr->callPtr->numChain) { /* - * We're at the end of the chain; return the empty string (the most - * useful thing we can do, since it turns out that it's not always - * trivial to detect in source code whether there is a parent - * implementation, what with multiple-inheritance...) + * We're at the end of the chain; generate an error message. */ - return TCL_OK; + const char *methodType; + + if (contextPtr->callPtr->flags & CONSTRUCTOR) { + methodType = "constructor"; + } else if (contextPtr->callPtr->flags & DESTRUCTOR) { + methodType = "destructor"; + } else { + methodType = "method"; + } + + Tcl_AppendResult(interp, "no next ", methodType, " implementation", + NULL); + return TCL_ERROR; } /* diff --git a/tests/oo.test b/tests/oo.test index 0362647..3f9fa94 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.6 2008/06/19 20:57:23 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.7 2008/06/19 21:29:04 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -558,20 +558,20 @@ test oo-7.7 {OO: inheritance and errorInfo} -setup { (object "::c" method "foo" line 1) invoked from within "c foo"}} -test oo-7.8 {OO: next at the end of the method chain} { +test oo-7.8 {OO: next at the end of the method chain} -setup { + set ::result "" +} -cleanup { + foo destroy +} -body { oo::class create foo { - method bar {} {lappend ::result [next] foo} + method bar {} {lappend ::result foo; lappend ::result [next] foo} } oo::class create foo2 { superclass foo - method bar {} {lappend ::result [next] foo2} + method bar {} {lappend ::result foo2; lappend ::result [next] foo2} } - set o [foo2 new] - set ::result "" - catch {$o bar} - foo destroy - return $result -} {{} foo {{} foo} foo2} + lappend result [catch {[foo2 new] bar} msg] $msg +} -result {foo2 foo 1 {no next method implementation}} test oo-8.1 {OO: global must work in methods} { oo::object create foo @@ -1041,7 +1041,9 @@ test oo-14.7 {OO and filters from mixins of mixins} -setup { } -result {(foo) (bar) (egg) chicken (egg) (bar) (foo)} test oo-14.8 {OO: class mixin order - Bug 1998221} -setup { set ::result {} - oo::class create master + oo::class create master { + method test {} {} + } } -cleanup { master destroy } -body { -- cgit v0.12 From b2feda81522b5e104e93fa64c501aa99ef6a2c4e Mon Sep 17 00:00:00 2001 From: das Date: Fri, 20 Jun 2008 13:51:26 +0000 Subject: Solaris, stubs changes for 8.6a1 --- changes | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/changes b/changes index ac24e2d..ecb0d47 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.137 2008/06/19 19:27:51 dgp Exp $ +RCS: @(#) $Id: changes,v 1.138 2008/06/20 13:51:26 das Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7200,12 +7200,16 @@ variables without "." added to customization hooks (kupries) 2008-04-02 (bug fix)[780533,1932639] [fcopy] callbacks unreliable (ferrieux) +2008-04-02 (interface)[1819422] libtclstub symbols MODULE_SCOPE (steffen) + 2008-04-04 (bug fix) [chan postevent] crash (kupries) 2008-04-07 (bug fix) Fix broken [format {% d}] (max) 2008-04-07 (bug fix)[1350564] Bi-directional [fcopy] now supported (ferrieux) +2008-04-16 (bug fix)[1938497] Tcl_SetNotifier() fixes (steffen) + 2008-04-16 (interface)[1938497] make stubs tables 'static const' (steffen) 2008-05-02 (new feature) [binary] is now a [namespace ensemble] (thoyts) @@ -7226,6 +7230,10 @@ variables without "." added to customization hooks (kupries) 2008-06-08 (enhancement)[1973096] bytecompiled [uplevel] scripts (sofer) +2008-06-12 (platform support) Solaris static build with DTrace (steffen) + +2008-06-12 (platform support) Solaris/amd64 gcc 64bit support (steffen) + 2008-06-13 (new feature)[TIP 285] [interp cancel]; Tcl_CancelEval() (mistachkin) --- Released 8.6a1, June ??, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 64ade57c455847b103bb0bfb4545beede557043f Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 20 Jun 2008 16:18:07 +0000 Subject: * tests/encoding.test: Make failing tests pass again. --- ChangeLog | 4 ++++ tests/encoding.test | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1f23d2c..718adad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-06-20 Don Porter + + * tests/encoding.test: Make failing tests pass again. + 2008-06-19 Donal K. Fellows * generic/tclOO.c (Tcl_ObjectContextInvokeNext): Corrected 'next' (at diff --git a/tests/encoding.test b/tests/encoding.test index a11f5cd..0aa49d3 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: encoding.test,v 1.27 2007/05/04 14:59:06 kennykb Exp $ +# RCS: @(#) $Id: encoding.test,v 1.28 2008/06/20 16:18:13 dgp Exp $ package require tcltest 2 @@ -69,6 +69,7 @@ test encoding-2.2 {Tcl_FreeEncoding: refcount != 0} {testencoding} { encoding dirs [list [pwd]] set x [encoding convertto shiftjis \u4e4e] ;# old one found encoding system identity + llength shiftjis ;# Shimmer away any cache of Tcl_Encoding lappend x [catch {encoding convertto shiftjis \u4e4e} msg] $msg encoding system identity encoding dirs $path @@ -222,6 +223,7 @@ test encoding-11.1 {LoadEncodingFile: unknown encoding} {testencoding} { set path [encoding dirs] encoding system iso8859-1 encoding dirs {} + llength jis0208 ;# Shimmer any cached Tcl_Encoding in shared literal set x [list [catch {encoding convertto jis0208 \u4e4e} msg] $msg] encoding dirs $path encoding system $system -- cgit v0.12 From 8f8c4fc92943cd0497881b0185ec142142698b4b Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 20 Jun 2008 20:48:47 +0000 Subject: * changes: Updates for 8.6a1 release. * generic/tclInterp.c: Fixed completely boneheaded mistake that * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] would always act like [interp bgerror {}]. [Bug 1999035]. * tests/chanio.test: Corrected flawed tests revealed by a -debug 1 * tests/cmdAH.test: -singleproc 1 test suite run. * tests/event.test: * tests/interp.test: * tests/io.test: * tests/ioTrans.test: * tests/namespace.test: --- ChangeLog | 16 +++++++++++++++- changes | 4 +++- generic/tclInterp.c | 6 +++--- tests/chanio.test | 6 +++--- tests/cmdAH.test | 4 ++-- tests/event.test | 4 ++-- tests/interp.test | 33 +++++++++++++++++++++++++++++---- tests/io.test | 6 +++--- tests/ioTrans.test | 7 +++++-- tests/namespace.test | 18 ++++++++++++------ 10 files changed, 77 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 718adad..b4ad340 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,20 @@ 2008-06-20 Don Porter - * tests/encoding.test: Make failing tests pass again. + * changes: Updates for 8.6a1 release. + + * generic/tclInterp.c: Fixed completely boneheaded mistake that + * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] + would always act like [interp bgerror {}]. [Bug 1999035]. + + * tests/chanio.test: Corrected flawed tests revealed by a -debug 1 + * tests/cmdAH.test: -singleproc 1 test suite run. + * tests/event.test: + * tests/interp.test: + * tests/io.test: + * tests/ioTrans.test: + * tests/namespace.test: + + * tests/encoding.test: Make failing tests pass again. [Bug 1972867] 2008-06-19 Donal K. Fellows diff --git a/changes b/changes index ecb0d47..ed5a9da 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.138 2008/06/20 13:51:26 das Exp $ +RCS: @(#) $Id: changes,v 1.139 2008/06/20 20:48:47 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7236,4 +7236,6 @@ variables without "." added to customization hooks (kupries) 2008-06-13 (new feature)[TIP 285] [interp cancel]; Tcl_CancelEval() (mistachkin) +2008-06-20 (bug fix)[1999035] make [interp bgerror $i] act in $i (porter) + --- Released 8.6a1, June ??, 2008 --- See ChangeLog for details --- diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 05a2609..c681da5 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.85 2008/06/13 05:45:13 mistachkin Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.86 2008/06/20 20:48:47 dgp Exp $ */ #include "tclInt.h" @@ -2130,9 +2130,9 @@ SlaveBgerror( NULL); return TCL_ERROR; } - TclSetBgErrorHandler(interp, objv[0]); + TclSetBgErrorHandler(slaveInterp, objv[0]); } - Tcl_SetObjResult(interp, TclGetBgErrorHandler(interp)); + Tcl_SetObjResult(interp, TclGetBgErrorHandler(slaveInterp)); return TCL_OK; } diff --git a/tests/chanio.test b/tests/chanio.test index 14a1554..7e53f77 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.14 2008/06/12 09:46:52 das Exp $ +# RCS: @(#) $Id: chanio.test,v 1.15 2008/06/20 20:48:48 dgp Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7704,8 +7704,8 @@ test chan-io-73.1 {channel Tcl_Obj SetChannelFromAny} {} { # ### ### ### ######### ######### ######### # cleanup -foreach file [list fooBar longfile script output test1 pipe my_script foo \ - bar test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] { +foreach file [list fooBar longfile script output test1 pipe my_script \ + test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] { removeFile $file } cleanupTests diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 98b09e9..be7cccf 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.59 2008/06/13 05:45:14 mistachkin Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.60 2008/06/20 20:48:49 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -105,7 +105,7 @@ test cmdAH-2.6 {Tcl_CdObjCmd} -returnCodes error -body { test cmdAH-2.6.1 {Tcl_CdObjCmd} -returnCodes error -body { cd "" } -result {couldn't change working directory to "": no such file or directory} -test cmdAH-2.7 {cd} -constraints {unix nonPortable} -setup { +test cmdAH-2.6.2 {cd} -constraints {unix nonPortable} -setup { set dir [pwd] } -body { cd / diff --git a/tests/event.test b/tests/event.test index bdfad16..8beda80 100644 --- a/tests/event.test +++ b/tests/event.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: event.test,v 1.27 2008/03/10 17:54:47 dgp Exp $ +# RCS: @(#) $Id: event.test,v 1.28 2008/06/20 20:48:49 dgp Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -205,7 +205,7 @@ test event-5.3 {HandleBgErrors: [Bug 1670155]} -setup { rename demo {} rename trial {} } -result {} -test event-5.3 {Default [interp bgerror] handler} -body { +test event-5.3.1 {Default [interp bgerror] handler} -body { ::tcl::Bgerror } -returnCodes error -match glob -result {*msg options*} test event-5.4 {Default [interp bgerror] handler} -body { diff --git a/tests/interp.test b/tests/interp.test index 57a2020..7af5856 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.56 2008/06/13 05:45:15 mistachkin Exp $ +# RCS: @(#) $Id: interp.test,v 1.57 2008/06/20 20:48:49 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -2343,9 +2343,10 @@ test interp-27.4 {interp aliases & namespaces} { #} {1 {invalid hidden command name "foo"}} -test interp-28.1 {getting fooled by slave's namespace ?} { +test interp-28.1 {getting fooled by slave's namespace ?} -setup { set i [interp create -safe]; proc master {interp args} {interp hide $interp list} +} -body { $i alias master master $i; set r [interp eval $i { namespace eval foo { @@ -2356,9 +2357,10 @@ test interp-28.1 {getting fooled by slave's namespace ?} { } info commands list }] +} -cleanup { + rename master {} interp delete $i; - set r -} {} +} -result {} test interp-28.2 {master's nsName cache should not cross} -setup { set i [interp create] @@ -3447,6 +3449,29 @@ test interp-36.6 {SlaveBgerror returns handler} -setup { interp delete slave } -result {foo bar soom} +test interp-36.7 {SlaveBgerror sets error handler of slave [1999035]} -setup { + interp create slave + slave alias handler handler + slave bgerror handler + variable result {untouched} + proc handler {args} { + variable result + set result [lindex $args 0] + } +} -body { + slave eval { + variable done {} + after 0 error foo + after 10 [list ::set [namespace which -variable done] {}] + vwait [namespace which -variable done] + } + set result +} -cleanup { + variable result {} + unset result + interp delete slave +} -result foo + # cleanup foreach i [interp slaves] { interp delete $i diff --git a/tests/io.test b/tests/io.test index 274c736..d6ed830 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.90 2008/05/26 18:28:47 hobbs Exp $ +# RCS: @(#) $Id: io.test,v 1.91 2008/06/20 20:48:49 dgp Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7698,8 +7698,8 @@ test io-73.1 {channel Tcl_Obj SetChannelFromAny} {} { # ### ### ### ######### ######### ######### # cleanup -foreach file [list fooBar longfile script output test1 pipe my_script foo \ - bar test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] { +foreach file [list fooBar longfile script output test1 pipe my_script \ + test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] { removeFile $file } cleanupTests diff --git a/tests/ioTrans.test b/tests/ioTrans.test index b607885..6298af0 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioTrans.test,v 1.3 2008/06/16 18:38:42 andreas_kupries Exp $ +# RCS: @(#) $Id: ioTrans.test,v 1.4 2008/06/20 20:48:49 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -690,9 +690,12 @@ test iortrans-11.0 {origin interpreter of moved transform gone} -match glob -bod # Set up channel and transform in interpreter interp eval $ida $helperscript + interp eval $ida [list ::variable tempchan [tempchan]] + interp transfer {} $::tempchan $ida set chan [interp eval $ida { + variable tempchan proc foo {args} {oninit clear drain flush limit? read write; onfinal; track; return} - set chan [chan push [tempchan] foo] + set chan [chan push $tempchan foo] fconfigure $chan -buffering none set chan }] diff --git a/tests/namespace.test b/tests/namespace.test index 9fb2d9a..f88e93c 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.71 2008/05/20 22:22:17 dkf Exp $ +# RCS: @(#) $Id: namespace.test,v 1.72 2008/06/20 20:48:49 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -715,14 +715,16 @@ test namespace-16.8 {Tcl_FindCommand, relative name found} { cmd a b c } } {::test_ns_1::cmd: a b c} -test namespace-16.9 {Tcl_FindCommand, relative name found} { - catch {rename cmd2 {}} +test namespace-16.9 {Tcl_FindCommand, relative name found} -body { proc cmd2 {args} {return "[namespace current]::cmd2: $args"} namespace eval test_ns_1 { cmd2 a b c } -} {::::cmd2: a b c} -test namespace-16.10 {Tcl_FindCommand, relative name found, only look in current then global ns} { +} -cleanup { + catch {rename cmd2 {}} +} -result {::::cmd2: a b c} +test namespace-16.10 {Tcl_FindCommand, relative name found, only look in current then global ns} -body { + proc cmd2 {args} {return "[namespace current]::cmd2: $args"} namespace eval test_ns_1 { proc cmd2 {args} { return "[namespace current]::cmd2 in test_ns_1: $args" @@ -731,7 +733,9 @@ test namespace-16.10 {Tcl_FindCommand, relative name found, only look in current cmd2 a b c } } -} {::::cmd2: a b c} +} -cleanup { + catch {rename cmd2 {}} +} -result {::::cmd2: a b c} test namespace-16.11 {Tcl_FindCommand, relative name not found} { namespace eval test_ns_1 { list [catch {cmd3 a b c} msg] $msg @@ -2058,6 +2062,7 @@ test namespace-50.3 {chained ensembles affect error messages} -body { a b d } -returnCodes error -result "wrong # args: should be \"a b d f\"" -cleanup { rename a {} + rename c {} } test namespace-50.4 {chained ensembles affect error messages} -body { namespace ens cre -command a -map {b {c d}} @@ -2066,6 +2071,7 @@ test namespace-50.4 {chained ensembles affect error messages} -body { a b d } -returnCodes error -result "wrong # args: should be \"a b\"" -cleanup { rename a {} + rename c {} } test namespace-51.1 {name resolution path control} -body { -- cgit v0.12 From a646385d673df42529a9c5a97493876e9c671d33 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 23 Jun 2008 04:18:33 +0000 Subject: * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when operating on the "Special path" variant of the "path" Tcl_ObjType intrep. A full normalization was getting done, in particular, coercing relative paths to absolute, contrary to what the function of producing the "translated path" is supposed to do. [Bug 1972879]. --- ChangeLog | 8 ++++++++ generic/tclPathObj.c | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4ad340..37cfee2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-23 Don Porter + + * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when + operating on the "Special path" variant of the "path" Tcl_ObjType + intrep. A full normalization was getting done, in particular, coercing + relative paths to absolute, contrary to what the function of + producing the "translated path" is supposed to do. [Bug 1972879]. + 2008-06-20 Don Porter * changes: Updates for 8.6a1 release. diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 80b511e..89fb210 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.67 2008/04/27 22:21:31 dkf Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.68 2008/06/23 04:18:34 dgp Exp $ */ #include "tclInt.h" @@ -1596,7 +1596,14 @@ Tcl_FSGetTranslatedPath( srcFsPathPtr = PATHOBJ(pathPtr); if (srcFsPathPtr->translatedPathPtr == NULL) { if (PATHFLAGS(pathPtr) != 0) { - retObj = Tcl_FSGetNormalizedPath(interp, pathPtr); + int numBytes; + const char *bytes = Tcl_GetStringFromObj(pathPtr, &numBytes); + Tcl_Obj *copy = Tcl_NewStringObj(bytes, numBytes); + Tcl_IncrRefCount(copy); + retObj = Tcl_FSGetTranslatedPath(interp, copy); + srcFsPathPtr->translatedPathPtr = retObj; + Tcl_IncrRefCount(retObj); + Tcl_DecrRefCount(copy); } else { /* * It is a pure absolute, normalized path object. This is -- cgit v0.12 From ed6a7e090c4d40ac85fd33572d92347eb5a9e327 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 23 Jun 2008 15:34:15 +0000 Subject: * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when operating on the "Special path" variant of the "path" Tcl_ObjType intrep. A full normalization was getting done, in particular, coercing relative paths to absolute, contrary to what the function of producing the "translated path" is supposed to do. [Bug 1972879]. --- generic/tclPathObj.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 89fb210..f292c8a 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.68 2008/06/23 04:18:34 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.69 2008/06/23 15:34:15 dgp Exp $ */ #include "tclInt.h" @@ -1596,14 +1596,16 @@ Tcl_FSGetTranslatedPath( srcFsPathPtr = PATHOBJ(pathPtr); if (srcFsPathPtr->translatedPathPtr == NULL) { if (PATHFLAGS(pathPtr) != 0) { - int numBytes; - const char *bytes = Tcl_GetStringFromObj(pathPtr, &numBytes); - Tcl_Obj *copy = Tcl_NewStringObj(bytes, numBytes); - Tcl_IncrRefCount(copy); - retObj = Tcl_FSGetTranslatedPath(interp, copy); + /* + * We lack a translated path result, but we have a directory + * (cwdPtr) and a tail (normPathPtr), and if we join the + * translated version of cwdPtr to normPathPtr, we'll get the + * translated result we need, and can store it for future use. + */ + retObj = Tcl_FSJoinToPath(Tcl_FSGetTranslatedPath(interp, + srcFsPathPtr->cwdPtr), 1, &(srcFsPathPtr->normPathPtr)); srcFsPathPtr->translatedPathPtr = retObj; Tcl_IncrRefCount(retObj); - Tcl_DecrRefCount(copy); } else { /* * It is a pure absolute, normalized path object. This is -- cgit v0.12 From d71d99fe46ff7df438501ced7d8e53a3bcd4dca3 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 24 Jun 2008 14:42:48 +0000 Subject: bug #1995063 fix examples and comment on eof use. --- ChangeLog | 4 ++++ doc/fileevent.n | 38 +++++++++++++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37cfee2..f90c797 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-06-24 Pat Thoyts + + * doc/fileevent.n: bug #1995063 fix examples and comment on eof use. + 2008-06-23 Don Porter * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when diff --git a/doc/fileevent.n b/doc/fileevent.n index cf5231e..ba35bdf 100644 --- a/doc/fileevent.n +++ b/doc/fileevent.n @@ -1,11 +1,12 @@ '\" '\" Copyright (c) 1994 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. +'\" Copyright (c) 2008 Pat Thoyts '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fileevent.n,v 1.13 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: fileevent.n,v 1.14 2008/06/24 14:42:51 patthoyts Exp $ '\" .so man.macros .TH fileevent n 7.5 Tcl "Tcl Built-In Commands" @@ -92,6 +93,11 @@ In nonblocking mode \fBputs\fR, \fBread\fR, and \fBgets\fR never block. See the documentation for the individual commands for information on how they handle blocking and nonblocking channels. .PP +Testing for the end of file condition should be done after any attempts +read the channel data. The eof flag is set once an attempt to read the +end of data has occurred and testing before this read will require an +additional event to be fired. +.PP The script for a file event is executed at global level (outside the context of any Tcl procedure) in the interpreter in which the \fBfileevent\fR command was invoked. @@ -102,15 +108,37 @@ an error; this is done in order to prevent infinite loops due to buggy handlers. .SH EXAMPLE In this setup \fBGetData\fR will be called with the channel as an -argument whenever $chan becomes readable. +argument whenever $chan becomes readable. The \fBread\fR call will +read whatever binary data is currently available without blocking. +Here the channel has the fileevent removed when an end of file +occurs to avoid being continually called (see above). Alternatively +the channel may be closed on this condition. +.CS +proc GetData {chan} { + set data [read $chan] + puts "[string length $data] $data" + if {[eof $chan]} { + fileevent $chan readable {} + } +} + +fconfigure $chan -blocking 0 -encoding binary +fileevent $chan readable [list GetData $chan] +.CE +The next example demonstrates use of \fBgets\fR to read line-oriented +data. .CS proc GetData {chan} { - if {![eof $chan]} { - puts [gets $chan] + if {[gets $chan line] >= 0} { + puts $line + } + if {[eof $chan]} { + close $chan } } -\fBfileevent\fR $chan readable [list GetData $chan] +fconfigure $chan -blocking 0 -buffering line -translation crlf +fileevent $chan readable [list GetData $chan] .CE .SH CREDITS -- cgit v0.12 From 19248ae9508b2b39a265b8107590fe628cbbae7f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 24 Jun 2008 20:02:25 +0000 Subject: * generic/tclPathObj.c: Fixed some internals management in the "path" Tcl_ObjType for the empty string value. Problem led to a crash in the command [glob -dir {} a]. [Bug 1999176]. --- ChangeLog | 6 ++++++ generic/tclPathObj.c | 27 +++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f90c797..6b9dbbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-24 Don Porter + + * generic/tclPathObj.c: Fixed some internals management in the "path" + Tcl_ObjType for the empty string value. Problem led to a crash in + the command [glob -dir {} a]. [Bug 1999176]. + 2008-06-24 Pat Thoyts * doc/fileevent.n: bug #1995063 fix examples and comment on eof use. diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index f292c8a..c41aafc 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.69 2008/06/23 15:34:15 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.70 2008/06/24 20:02:31 dgp Exp $ */ #include "tclInt.h" @@ -1768,6 +1768,16 @@ Tcl_FSGetNormalizedPath( if (pathType == TCL_PATH_RELATIVE) { Tcl_Obj *origDir = fsPathPtr->cwdPtr; + + /* + * NOTE: here we are (dangerously?) assuming that origDir points + * to a Tcl_Obj with Tcl_ObjType == &tclFsPathType . The + * pathType = Tcl_FSGetPathType(fsPathPtr->cwdPtr); + * above that set the pathType value should have established + * that, but it's far less clear on what basis we know there's + * been no shimmering since then. + */ + FsPath *origDirFsPathPtr = PATHOBJ(origDir); fsPathPtr->cwdPtr = origDirFsPathPtr->cwdPtr; @@ -1881,7 +1891,20 @@ Tcl_FSGetNormalizedPath( * might loop back through here. */ - if (path[0] != '\0') { + if (path[0] == '\0') { + /* + * Special handling for the empty string value. This one is + * very weird with [file normalize {}] => {}. (The reasoning + * supporting this is unknown to DGP, but he fears changing it.) + * Attempt here to keep the expectations of other parts of + * Tcl_Filesystem code about state of the FsPath fields satisfied. + * + * In particular, capture the cwd value and save so it can be + * stored in the cwdPtr field below. + */ + useThisCwd = Tcl_FSGetCwd(interp); + + } else { /* * We don't ask for the type of 'pathPtr' here, because that is * not correct for our purposes when we have a path like '~'. Tcl -- cgit v0.12 From 45df3072f0a77f5c7e90a5e6862db6740008e3ed Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 25 Jun 2008 10:25:06 +0000 Subject: fix versions of dde and registry dlls fix problem building with staticpkg option --- ChangeLog | 5 +++++ win/makefile.vc | 16 ++++++++++++---- win/rules.vc | 16 +++++++++++----- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b9dbbc..64834a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-25 Pat Thoyts + + * win/rules.vc: fix versions of dde and registry dlls + * win/makefile.vc: fix problem building with staticpkg option + 2008-06-24 Don Porter * generic/tclPathObj.c: Fixed some internals management in the "path" diff --git a/win/makefile.vc b/win/makefile.vc index f35a8bc..73b8410 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.185 2008/06/14 02:07:44 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.186 2008/06/25 10:25:12 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -590,7 +590,9 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c $(_VC_MANIFEST_EMBED_DLL) !if $(STATIC_BUILD) -!if !$(TCL_USE_STATIC_PACKAGES) +!if $(TCL_USE_STATIC_PACKAGES) +$(TCLDDELIB): +!else $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinDde.obj !endif @@ -604,7 +606,9 @@ $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) !endif !if $(STATIC_BUILD) -!if !$(TCL_USE_STATIC_PACKAGES) +!if $(TCL_USE_STATIC_PACKAGES) +$(TCLREGLIB): +!else $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinReg.obj !endif @@ -905,7 +909,7 @@ $(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c $(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? - + $(TMP_DIR)\tclOOStubLib.obj: $(GENERICDIR)\tclOOStubLib.c $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? @@ -1062,7 +1066,9 @@ install-libraries: tclConfig install-msgs install-tzdata "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform\shell-$(PKG_SHELL_VER).tm" @echo Installing $(TCLDDELIBNAME) !if $(STATIC_BUILD) +!if !$(TCL_USE_STATIC_PACKAGES) @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\" +!endif !else @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\" @$(CPY) "$(ROOT)\library\dde\pkgIndex.tcl" \ @@ -1070,7 +1076,9 @@ install-libraries: tclConfig install-msgs install-tzdata !endif @echo Installing $(TCLREGLIBNAME) !if $(STATIC_BUILD) +!if !$(TCL_USE_STATIC_PACKAGES) @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\" +!endif !else @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\reg$(REGDOTVERSION)\" @$(CPY) "$(ROOT)\library\reg\pkgIndex.tcl" \ diff --git a/win/rules.vc b/win/rules.vc index 215b286..1e42e6d 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.38 2008/06/13 19:59:27 davygrvy Exp $ +# RCS: @(#) $Id: rules.vc,v 1.39 2008/06/25 10:25:12 patthoyts Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -533,6 +533,12 @@ Failed to find tcl.h. The TCLDIR macro does not appear correct. !if [echo PKG_SHELL_VER = \>> versions.vc] \ && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform::shell" >> versions.vc] !endif +!if [echo PKG_DDE_VER = \>> versions.vc] \ + && [nmakehlp -V ..\library\dde\pkgIndex.tcl "dde " >> versions.vc] +!endif +!if [echo PKG_REG_VER =\>> versions.vc] \ + && [nmakehlp -V ..\library\reg\pkgIndex.tcl registry >> versions.vc] +!endif !endif !include versions.vc @@ -559,8 +565,8 @@ TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe" TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib" TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib" TCL_LIBRARY = $(_TCLDIR)\lib -TCLREGLIB = "$(_TCLDIR)\lib\tclreg11$(SUFX:t=).lib" -TCLDDELIB = "$(_TCLDIR)\lib\tcldde12$(SUFX:t=).lib" +TCLREGLIB = "$(_TCLDIR)\lib\tclreg12$(SUFX:t=).lib" +TCLDDELIB = "$(_TCLDIR)\lib\tcldde13$(SUFX:t=).lib" COFFBASE = \must\have\tcl\sources\to\build\this\target TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target TCL_INCLUDES = -I"$(_TCLDIR)\include" @@ -572,8 +578,8 @@ TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX).exe" TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib" TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib" TCL_LIBRARY = $(_TCLDIR)\library -TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg11$(SUFX:t=).lib" -TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde12$(SUFX:t=).lib" +TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg12$(SUFX:t=).lib" +TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde13$(SUFX:t=).lib" COFFBASE = "$(_TCLDIR)\win\coffbase.txt" TCLTOOLSDIR = $(_TCLDIR)\tools TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win" -- cgit v0.12 From fbaaddabb7cc63723d7724a1d568c9b917dc7a5f Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 25 Jun 2008 14:35:38 +0000 Subject: * changes: Updates for 8.6a1 release. * generic/tclOO.h: Bump to TclOO 0.5. --- ChangeLog | 8 ++++++++ changes | 8 ++++++-- generic/tclOO.h | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 64834a0..cdc4f83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-25 Don Porter + + *** 8.6a1 TAGGED FOR RELEASE *** + + * changes: Updates for 8.6a1 release. + + * generic/tclOO.h: Bump to TclOO 0.5. + 2008-06-25 Pat Thoyts * win/rules.vc: fix versions of dde and registry dlls diff --git a/changes b/changes index ed5a9da..94e6b85 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.139 2008/06/20 20:48:47 dgp Exp $ +RCS: @(#) $Id: changes,v 1.140 2008/06/25 14:35:38 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7238,4 +7238,8 @@ variables without "." added to customization hooks (kupries) 2008-06-20 (bug fix)[1999035] make [interp bgerror $i] act in $i (porter) ---- Released 8.6a1, June ??, 2008 --- See ChangeLog for details --- +2008-06-23 (bug fix)[1972879] bad path intrep caching (porter) + +2008-06-24 (bug fix)[1999176] crash in [glob -dir {} a] (porter) + +--- Released 8.6a1, June 25, 2008 --- See ChangeLog for details --- diff --git a/generic/tclOO.h b/generic/tclOO.h index f3fd73c..cc5c8ce 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.h,v 1.4 2008/05/31 11:42:17 dkf Exp $ + * RCS: @(#) $Id: tclOO.h,v 1.5 2008/06/25 14:35:39 dgp Exp $ */ #ifndef TCLOO_H_INCLUDED @@ -27,7 +27,7 @@ * Must match version at top of ../configure.in */ -#define TCLOO_VERSION "0.4" +#define TCLOO_VERSION "0.5" #define TCLOO_PATCHLEVEL TCLOO_VERSION /* -- cgit v0.12 From b07cd69442347c48d45759b7ca2b772857dcf49f Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 25 Jun 2008 17:40:01 +0000 Subject: * library/tm.tcl: Modified the handling of Tcl Modules and of the * library/safe.tcl: Safe Base to interact nicely with each other, * library/init.tcl: enabling requiring Tcl Modules in safe * tests/safe.test: interpreters. Fixes [Bug 1999119]. --- ChangeLog | 7 +++ library/init.tcl | 4 +- library/safe.tcl | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- library/tm.tcl | 14 ++++-- tests/safe.test | 18 +++---- 5 files changed, 160 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdc4f83..0bdc9e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-25 Andreas Kupries + + * library/tm.tcl: Modified the handling of Tcl Modules and of the + * library/safe.tcl: Safe Base to interact nicely with each other, + * library/init.tcl: enabling requiring Tcl Modules in safe + * tests/safe.test: interpreters. Fixes [Bug 1999119]. + 2008-06-25 Don Porter *** 8.6a1 TAGGED FOR RELEASE *** diff --git a/library/init.tcl b/library/init.tcl index 83981ae..3a3b105 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.106 2008/06/19 15:37:04 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.107 2008/06/25 17:40:03 andreas_kupries Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -156,7 +156,7 @@ if {(![interp issafe]) && ($tcl_platform(platform) eq "windows")} { if {[interp issafe]} { - package unknown ::tclPkgUnknown + package unknown {::tcl::tm::UnknownHandler ::tclPkgUnknown} } else { # Set up search for Tcl Modules (TIP #189). # and setup platform specific unknown package handlers diff --git a/library/safe.tcl b/library/safe.tcl index 186c2e7..afdf639 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.16 2006/11/03 00:34:52 hobbs Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.17 2008/06/25 17:40:03 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions @@ -369,9 +369,21 @@ namespace eval ::safe { lappend slave_auto_path "\$[PathToken $i]" incr i } + # Extend the access list with the paths used to look for Tcl + # Modules. We safe the virtual form separately as well, as + # syncing it with the slave has to be defered until the + # necessary commands are present for setup. + foreach dir [::tcl::tm::list] { + lappend access_path $dir + Set [PathToken $i $slave] $dir + lappend slave_auto_path "\$[PathToken $i]" + lappend slave_tm_path "\$[PathToken $i]" + incr i + } Set $nname $i Set [PathListName $slave] $access_path Set [VirtualPathListName $slave] $slave_auto_path + Set [TmPathListName $slave] $slave_tm_path Set [StaticsOkName $slave] $staticsok Set [NestedOkName $slave] $nestedok @@ -448,6 +460,10 @@ proc ::safe::interpAddToAccessPath {slave path} { ::interp alias $slave encoding {} [namespace current]::AliasEncoding \ $slave + # Handling Tcl Modules, we need a restricted form of Glob. + ::interp alias $slave glob {} [namespace current]::AliasGlob \ + $slave + # This alias lets the slave have access to a subset of the 'file' # command functionality. @@ -463,8 +479,8 @@ proc ::safe::interpAddToAccessPath {slave path} { # by Tcl_MakeSafe(3) - # Source init.tcl into the slave, to get auto_load and other - # procedures defined: + # Source init.tcl and tm.tcl into the slave, to get auto_load + # and other procedures defined: if {[catch {::interp eval $slave\ {source [file join $tcl_library init.tcl]}} msg]} { @@ -472,6 +488,16 @@ proc ::safe::interpAddToAccessPath {slave path} { error "can't source init.tcl into slave $slave ($msg)" } + if {[catch {::interp eval $slave \ + {source [file join $tcl_library tm.tcl]}} msg]} { + Log $slave "can't source tm.tcl ($msg)" + error "can't source tm.tcl into slave $slave ($msg)" + } + + # Sync the paths used to search for Tcl modules. This can be + # done only now, after tm.tcl was loaded. + ::interp eval $slave [list ::tcl::tm::add {*}[Set [TmPathListName $slave]]] + return $slave } @@ -610,6 +636,10 @@ proc ::safe::setLogCmd {args} { proc VirtualPathListName {slave} { return "[InterpStateName $slave](access_path_slave)" } + # returns the variable name of the complete tm path list + proc TmPathListName {slave} { + return "[InterpStateName $slave](tm_path_slave)" + } # returns the variable name of the number of items proc PathNumberName {slave} { return "[InterpStateName $slave](access_path,n)" @@ -707,19 +737,96 @@ proc ::safe::setLogCmd {args} { } } + # AliasGlob is the target of the "glob" alias in safe interpreters. + + proc AliasGlob {slave args} { + Log $slave "GLOB ! $args" NOTICE + set cmd {} + set at 0 + + set dir {} + set virtualdir {} + + while {$at < [llength $args]} { + switch -glob -- [set opt [lindex $args $at]] { + -nocomplain - + -join { lappend cmd $opt ; incr at } + -directory { + lappend cmd $opt ; incr at + set virtualdir [lindex $args $at] + + # get the real path from the virtual one. + if {[catch {set dir [TranslatePath $slave $virtualdir]} msg]} { + Log $slave $msg + return -code error "permission denied" + } + # check that the path is in the access path of that slave + if {[catch {DirInAccessPath $slave $dir} msg]} { + Log $slave $msg + return -code error "permission denied" + } + lappend cmd $dir ; incr at + } + pkgIndex.tcl { + # Oops, this is globbing a subdirectory in regular + # package search. That is not wanted. Abort, + # handler does catch already (because glob was not + # defined before). See package.tcl, lines 484ff in + # tclPkgUnknown. + error "unknown command glob" + } + -* { + Log $slave "Safe base rejecting glob option '$opt'" + error "Safe base rejecting glob option '$opt'" + } + default { + lappend cmd $opt ; incr at + } + } + } + + Log $slave "GLOB = $cmd" NOTICE + + if {[catch {::interp invokehidden $slave glob {*}$cmd} msg]} { + Log $slave $msg + return -code error "script error" + } + + Log $slave "GLOB @ $msg" NOTICE + + # Translate path back to what the slave should see. + set res {} + foreach p $msg { + regsub -- ^$dir $p $virtualdir p + lappend res $p + } + + Log $slave "GLOB @ $res" NOTICE + return $res + } # AliasSource is the target of the "source" alias in safe interpreters. proc AliasSource {slave args} { set argc [llength $args] - # Allow only "source filename" + # Extended for handling of Tcl Modules to allow not only + # "source filename", but "source -encoding E filename" as + # well. + if {[lindex $args 0] eq "-encoding"} { + incr argc -2 + set encoding [lrange $args 0 1] + set at 2 + } else { + set at 0 + set encoding {} + } if {$argc != 1} { - set msg "wrong # args: should be \"source fileName\"" + set msg "wrong # args: should be \"source ?-encoding E? fileName\"" Log $slave "$msg ($args)" return -code error $msg } - set file [lindex $args 0] + set file [lindex $args $at] # get the real path from the virtual one. if {[catch {set file [TranslatePath $slave $file]} msg]} { @@ -740,7 +847,7 @@ proc ::safe::setLogCmd {args} { } # passed all the tests , lets source it: - if {[catch {::interp invokehidden $slave source $file} msg]} { + if {[catch {::interp invokehidden $slave source {*}$encoding $file} msg]} { Log $slave $msg return -code error "script error" } @@ -840,6 +947,25 @@ proc ::safe::setLogCmd {args} { } } + proc DirInAccessPath {slave dir} { + set access_path [GetAccessPath $slave] + + if {[file isfile $dir]} { + error "\"$dir\": is a file" + } + + # Normalize paths for comparison since lsearch knows nothing of + # potential pathname anomalies. + set norm_dir [file normalize $dir] + foreach path $access_path { + lappend norm_access_path [file normalize $path] + } + + if {[lsearch -exact $norm_access_path $norm_dir] == -1} { + error "\"$dir\": not in access_path" + } + } + # This procedure enables access from a safe interpreter to only a subset of # the subcommands of a command: diff --git a/library/tm.tcl b/library/tm.tcl index aee74f5..f6ffe5d 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -214,11 +214,11 @@ proc ::tcl::tm::UnknownHandler {original name args} { set satisfied 0 foreach path $paths { - if {![file exists $path]} { + if {![interp issafe] && ![file exists $path]} { continue } set currentsearchpath [file join $path $pkgroot] - if {![file exists $currentsearchpath]} { + if {![interp issafe] && ![file exists $currentsearchpath]} { continue } set strip [llength [file split $path]] @@ -352,9 +352,13 @@ proc ::tcl::tm::roots {paths} { foreach pa $paths { set p [file join $pa tcl$major] for {set n $minor} {$n >= 0} {incr n -1} { - path add [file normalize [file join $p ${major}.${n}]] + set px [file join $p ${major}.${n}] + if {![interp issafe]} { set px [file normalize $px] } + path add $px } - path add [file normalize [file join $p site-tcl]] + set px [file join $p site-tcl] + if {![interp issafe]} { set px [file normalize $px] } + path add $px } return } @@ -362,4 +366,4 @@ proc ::tcl::tm::roots {paths} { # Initialization. Set up the default paths, then insert the new # handler into the chain. -::tcl::tm::Defaults +if {![interp issafe]} { ::tcl::tm::Defaults } diff --git a/tests/safe.test b/tests/safe.test index e1b4a36..fb66f8c 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.22 2006/12/05 18:45:51 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.test,v 1.23 2008/06/25 17:40:05 andreas_kupries Exp $ package require Tcl 8.5 @@ -89,7 +89,7 @@ test safe-3.2 {calling safe::interpCreate on trusted interp} { set l [lsort [a aliases]] safe::interpDelete a set l -} {clock encoding exit file load source} +} {clock encoding exit file glob load source} test safe-3.3 {calling safe::interpCreate on trusted interp} { catch {safe::interpDelete a} safe::interpCreate a @@ -201,7 +201,7 @@ test safe-7.1 {tests that everything works at high level} { safe::interpDelete $i set v } 1.0 -test safe-7.2 {tests specific path and interpFind/AddToAccessPath} { +test safe-7.2 {tests specific path and interpFind/AddToAccessPath} -body { set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]; # should not add anything (p0) set token1 [safe::interpAddToAccessPath $i [info library]] @@ -213,7 +213,7 @@ test safe-7.2 {tests specific path and interpFind/AddToAccessPath} { [catch {interp eval $i {package require http 1}} msg] $msg \ [safe::interpConfigure $i]\ [safe::interpDelete $i] -} "{\$p(:0:)} {\$p(:1:)} 1 {can't find package http 1} {-accessPath {[list $tcl_library /dummy/unixlike/test/path]} -statics 0 -nested 1 -deleteHook {}} {}" +} -match glob -result "{\$p(:0:)} {\$p(:17:)} 1 {can't find package http 1} {-accessPath {[list $tcl_library * /dummy/unixlike/test/path]} -statics 0 -nested 1 -deleteHook {}} {}" # test source control on file name @@ -224,7 +224,7 @@ test safe-8.1 {safe source control on file} { list [catch {$i eval {source}} msg] \ $msg \ [safe::interpDelete $i] ; -} {1 {wrong # args: should be "source fileName"} {}} +} {1 {wrong # args: should be "source ?-encoding E? fileName"} {}} test safe-8.2 {safe source control on file} { set i "a"; catch {safe::interpDelete $i} @@ -232,7 +232,7 @@ test safe-8.2 {safe source control on file} { list [catch {$i eval {source}} msg] \ $msg \ [safe::interpDelete $i] ; -} {1 {wrong # args: should be "source fileName"} {}} +} {1 {wrong # args: should be "source ?-encoding E? fileName"} {}} test safe-8.3 {safe source control on file} { set i "a"; catch {safe::interpDelete $i} @@ -315,7 +315,7 @@ test safe-8.8 {safe source forbids -rsrc} { list [catch {$i eval {source -rsrc Init}} msg] \ $msg \ [safe::interpDelete $i] ; -} {1 {wrong # args: should be "source fileName"} {}} +} {1 {wrong # args: should be "source ?-encoding E? fileName"} {}} test safe-9.1 {safe interps' deleteHook} { set i "a"; @@ -364,7 +364,7 @@ test safe-9.5 {dual specification of nested} { list [catch {safe::interpCreate -nested 0 -nestedload} msg] $msg } {1 {conflicting values given for -nested and -nestedLoadOk}} -test safe-9.6 {interpConfigure widget like behaviour} { +test safe-9.6 {interpConfigure widget like behaviour} -body { # this test shall work, don't try to "fix it" unless # you *really* know what you are doing (ie you are me :p) -- dl list [set i [safe::interpCreate \ @@ -381,7 +381,7 @@ test safe-9.6 {interpConfigure widget like behaviour} { safe::interpConfigure $i]\ [safe::interpConfigure $i -deleteHook toto -nosta -nested 0; safe::interpConfigure $i] -} {{-accessPath /foo/bar -statics 0 -nested 1 -deleteHook {foo bar}} {-accessPath /foo/bar} {-nested 1} {-statics 0} {-deleteHook {foo bar}} {-accessPath /blah -statics 1 -nested 1 -deleteHook {foo bar}} {-accessPath /blah -statics 0 -nested 0 -deleteHook toto}} +} -match glob -result {{-accessPath * -statics 0 -nested 1 -deleteHook {foo bar}} {-accessPath *} {-nested 1} {-statics 0} {-deleteHook {foo bar}} {-accessPath * -statics 1 -nested 1 -deleteHook {foo bar}} {-accessPath * -statics 0 -nested 0 -deleteHook toto}} # testing that nested and statics do what is advertised # (we use a static package : Tcltest) -- cgit v0.12 From dfbb94dcbfedf333200a07da4849f5af06427e6f Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 25 Jun 2008 17:44:05 +0000 Subject: Advance 8.6a1 release tag --- ChangeLog | 14 +++++++------- changes | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bdc9e5..f1396c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,3 @@ -2008-06-25 Andreas Kupries - - * library/tm.tcl: Modified the handling of Tcl Modules and of the - * library/safe.tcl: Safe Base to interact nicely with each other, - * library/init.tcl: enabling requiring Tcl Modules in safe - * tests/safe.test: interpreters. Fixes [Bug 1999119]. - 2008-06-25 Don Porter *** 8.6a1 TAGGED FOR RELEASE *** @@ -13,6 +6,13 @@ * generic/tclOO.h: Bump to TclOO 0.5. +2008-06-25 Andreas Kupries + + * library/tm.tcl: Modified the handling of Tcl Modules and of the + * library/safe.tcl: Safe Base to interact nicely with each other, + * library/init.tcl: enabling requiring Tcl Modules in safe + * tests/safe.test: interpreters. Fixes [Bug 1999119]. + 2008-06-25 Pat Thoyts * win/rules.vc: fix versions of dde and registry dlls diff --git a/changes b/changes index 94e6b85..723094b 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.140 2008/06/25 14:35:38 dgp Exp $ +RCS: @(#) $Id: changes,v 1.141 2008/06/25 17:44:05 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7242,4 +7242,6 @@ variables without "." added to customization hooks (kupries) 2008-06-24 (bug fix)[1999176] crash in [glob -dir {} a] (porter) +2008-06-25 (bug fix)[1999119] Support TM packages in Sage Base (kupries) + --- Released 8.6a1, June 25, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 11160f8a61ece89e66145b22896f7914b0c6fb75 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 25 Jun 2008 18:18:37 +0000 Subject: remove stray .RE --- doc/tm.n | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/tm.n b/doc/tm.n index 6750f4d..883eb4c 100644 --- a/doc/tm.n +++ b/doc/tm.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tm.n,v 1.15 2008/06/17 16:44:47 andreas_kupries Exp $ +'\" RCS: @(#) $Id: tm.n,v 1.16 2008/06/25 18:18:37 dgp Exp $ '\" .so man.macros .TH tm n 8.5 Tcl "Tcl Built-In Commands" @@ -284,7 +284,6 @@ environment variables: \fB$::env(TCL8.1_TM_PATH)\fR \fB$::env(TCL8_1_TM_PATH)\fR \fB$::env(TCL8.0_TM_PATH)\fR \fB$::env(TCL8_0_TM_PATH)\fR .CE -.RE .SH "SEE ALSO" package(n), Tcl Improvement Proposal #189 .QW "\fITcl Modules\fR" -- cgit v0.12 From bb0486b2b82906125cbe7ef326bb4a2766beb96e Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 26 Jun 2008 22:12:50 +0000 Subject: * unix/Makefile.in: Followup to my change of 2008-06-25, make code generated by the Makefile and put into the installed tm.tcl conditional on interpreter safeness as well. Thanks to Daniel Steffen for reminding me of that code. --- ChangeLog | 7 +++++++ unix/Makefile.in | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1396c8..2da833f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-26 Andreas Kupries + + * unix/Makefile.in: Followup to my change of 2008-06-25, make code + generated by the Makefile and put into the installed tm.tcl + conditional on interpreter safeness as well. Thanks to Daniel + Steffen for reminding me of that code. + 2008-06-25 Don Porter *** 8.6a1 TAGGED FOR RELEASE *** diff --git a/unix/Makefile.in b/unix/Makefile.in index 7657c1b..b351ebe 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.239 2008/06/12 20:08:58 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.240 2008/06/26 22:12:51 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -822,7 +822,7 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs done; @if [ -n "$(TCL_MODULE_PATH)" -a -f $(TOP_DIR)/library/tm.tcl ]; then \ echo "Customizing tcl module path"; \ - echo "::tcl::tm::roots {$(TCL_MODULE_PATH)}" >> \ + echo "if {![interp issafe]} { ::tcl::tm::roots {$(TCL_MODULE_PATH)} }" >> \ "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \ fi -- cgit v0.12 From a9acc2a95910f4ca271460899a772e47160ccd3e Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 27 Jun 2008 19:55:46 +0000 Subject: typos --- doc/IntObj.3 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/IntObj.3 b/doc/IntObj.3 index 617e180..48caf5d 100644 --- a/doc/IntObj.3 +++ b/doc/IntObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: IntObj.3,v 1.14 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: IntObj.3,v 1.15 2008/06/27 19:55:46 dgp Exp $ '\" .so man.macros .TH Tcl_IntObj 3 8.5 Tcl "Tcl Library Procedures" @@ -137,15 +137,15 @@ then \fBTCL_ERROR\fR is returned, and if \fIinterp\fR is non-NULL, an error message is left in \fIinterp\fR. The \fBTcl_ObjType\fR of \fIobjPtr\fR may be changed to make subsequent calls to the same routine more efficient. Unlike the other functions, -\fBTcl_TakeGetBignumFromObj\fR may set the content of the Tcl object +\fBTcl_TakeBignumFromObj\fR may set the content of the Tcl object \fIobjPtr\fR to an empty string in the process of retrieving the multiple-precision integer value. .PP The choice between \fBTcl_GetBignumFromObj\fR and -\fBTcl_TakeGetBignumFromObj\fR is governed by how the caller will +\fBTcl_TakeBignumFromObj\fR is governed by how the caller will continue to use \fIobjPtr\fR. If after the \fBmp_int\fR value is retrieved from \fIobjPtr\fR, the caller will make no more -use of \fIobjPtr\fR, then using \fBTcl_TakeGetBignumFromObj\fR +use of \fIobjPtr\fR, then using \fBTcl_TakeBignumFromObj\fR permits Tcl to detect when an unshared \fIobjPtr\fR permits the value to be moved instead of copied, which should be more efficient. If anything later in the caller requires -- cgit v0.12 From d66d8e00acf2a70834e5505a54c02ff54408534e Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 27 Jun 2008 21:46:19 +0000 Subject: Tcl defines more than 7 Tcl_ObjTypes now, and we don't want to maintain this claim in the docs. Also revise false claim that a custom Tcl_ObjType requires calling Tcl_RegisterObjType(). --- doc/Object.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Object.3 b/doc/Object.3 index 6639559..b0f718b 100644 --- a/doc/Object.3 +++ b/doc/Object.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Object.3,v 1.18 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Object.3,v 1.19 2008/06/27 21:46:19 dgp Exp $ '\" .so man.macros .TH Tcl_Obj 3 8.5 Tcl "Tcl Library Procedures" @@ -102,10 +102,10 @@ reclaim an object's storage. .PP Tcl objects are typed. An object's internal representation is controlled by its type. -Seven types are predefined in the Tcl core +Several types are predefined in the Tcl core including integer, double, list, and bytecode. Extension writers can extend the set of types -by using the procedure \fBTcl_RegisterObjType\fR . +by defining their own \fBTcl_ObjType\fR structs. .SH "THE TCL_OBJ STRUCTURE" .PP Each Tcl object is represented by a \fBTcl_Obj\fR structure -- cgit v0.12 From dccac44164436d0d0cb0ca2765837a813ccd4d0c Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 28 Jun 2008 04:22:59 +0000 Subject: * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanks Rolf Ade for detecting and Dan Steffen for the fix [Bug 2004654]. --- ChangeLog | 5 +++++ generic/tclPathObj.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2da833f..2e88ec7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-28 Don Porter + + * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanks + Rolf Ade for detecting and Dan Steffen for the fix [Bug 2004654]. + 2008-06-26 Andreas Kupries * unix/Makefile.in: Followup to my change of 2008-06-25, make code diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index c41aafc..b52e0b0 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.70 2008/06/24 20:02:31 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.71 2008/06/28 04:23:00 dgp Exp $ */ #include "tclInt.h" @@ -1602,10 +1602,14 @@ Tcl_FSGetTranslatedPath( * translated version of cwdPtr to normPathPtr, we'll get the * translated result we need, and can store it for future use. */ - retObj = Tcl_FSJoinToPath(Tcl_FSGetTranslatedPath(interp, - srcFsPathPtr->cwdPtr), 1, &(srcFsPathPtr->normPathPtr)); + + Tcl_Obj *translatedCwdPtr = Tcl_FSGetTranslatedPath(interp, + srcFsPathPtr->cwdPtr); + retObj = Tcl_FSJoinToPath(translatedCwdPtr, 1, + &(srcFsPathPtr->normPathPtr)); srcFsPathPtr->translatedPathPtr = retObj; Tcl_IncrRefCount(retObj); + Tcl_DecrRefCount(translatedCwdPtr); } else { /* * It is a pure absolute, normalized path object. This is -- cgit v0.12 From b7039216edc04a41ff927d0a7db948edeb2a29a3 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 28 Jun 2008 23:43:45 +0000 Subject: Fix [Bug 2004480] --- ChangeLog | 37 +++++++++++++++++++++---------------- doc/object.n | 6 +++--- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e88ec7..3540c93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,19 @@ +2008-06-29 Donal K. Fellows + + * doc/object.n (EXAMPLES): Fix incorrect usage of oo::define to be + done with oo::objdefine instead. [Bug 2004480] + 2008-06-28 Don Porter - * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanks - Rolf Ade for detecting and Dan Steffen for the fix [Bug 2004654]. + * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanks + to Rolf Ade for detecting and Dan Steffen for the fix. [Bug 2004654] 2008-06-26 Andreas Kupries * unix/Makefile.in: Followup to my change of 2008-06-25, make code generated by the Makefile and put into the installed tm.tcl - conditional on interpreter safeness as well. Thanks to Daniel - Steffen for reminding me of that code. + conditional on interpreter safeness as well. Thanks to Daniel Steffen + for reminding me of that code. 2008-06-25 Don Porter @@ -20,10 +25,10 @@ 2008-06-25 Andreas Kupries - * library/tm.tcl: Modified the handling of Tcl Modules and of the + * library/tm.tcl: Modified the handling of Tcl Modules and of the * library/safe.tcl: Safe Base to interact nicely with each other, * library/init.tcl: enabling requiring Tcl Modules in safe - * tests/safe.test: interpreters. Fixes [Bug 1999119]. + * tests/safe.test: interpreters. [Bug 1999119] 2008-06-25 Pat Thoyts @@ -32,21 +37,21 @@ 2008-06-24 Don Porter - * generic/tclPathObj.c: Fixed some internals management in the "path" - Tcl_ObjType for the empty string value. Problem led to a crash in - the command [glob -dir {} a]. [Bug 1999176]. + * generic/tclPathObj.c: Fixed some internals management in the "path" + Tcl_ObjType for the empty string value. Problem led to a crash in the + command [glob -dir {} a]. [Bug 1999176]. 2008-06-24 Pat Thoyts - * doc/fileevent.n: bug #1995063 fix examples and comment on eof use. + * doc/fileevent.n: Fix examples and comment on eof use. [Bug 1995063] 2008-06-23 Don Porter - * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when + * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when operating on the "Special path" variant of the "path" Tcl_ObjType - intrep. A full normalization was getting done, in particular, coercing - relative paths to absolute, contrary to what the function of - producing the "translated path" is supposed to do. [Bug 1972879]. + intrep. A full normalization was getting done, in particular, coercing + relative paths to absolute, contrary to what the function of producing + the "translated path" is supposed to do. [Bug 1972879] 2008-06-20 Don Porter @@ -54,7 +59,7 @@ * generic/tclInterp.c: Fixed completely boneheaded mistake that * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] - would always act like [interp bgerror {}]. [Bug 1999035]. + would always act like [interp bgerror {}]. [Bug 1999035] * tests/chanio.test: Corrected flawed tests revealed by a -debug 1 * tests/cmdAH.test: -singleproc 1 test suite run. @@ -64,7 +69,7 @@ * tests/ioTrans.test: * tests/namespace.test: - * tests/encoding.test: Make failing tests pass again. [Bug 1972867] + * tests/encoding.test: Make failing tests pass again. [Bug 1972867] 2008-06-19 Donal K. Fellows diff --git a/doc/object.n b/doc/object.n index 79038db..eec3219 100644 --- a/doc/object.n +++ b/doc/object.n @@ -1,10 +1,10 @@ '\" -'\" Copyright (c) 2007 Donal K. Fellows +'\" Copyright (c) 2007-2008 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: object.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" RCS: @(#) $Id: object.n,v 1.2 2008/06/28 23:43:45 dkf Exp $ '\" .so man.macros .TH object n 0.1 TclOO "TclOO Commands" @@ -80,7 +80,7 @@ This example demonstrates basic use of an object. .CS set obj [\fBoo::object\fR new] $obj foo \fI\(-> error "unknown method foo"\fR -oo::define $obj method foo {} { +oo::objdefine $obj method foo {} { my \fBvariable\fR count puts "bar[incr count]" } -- cgit v0.12 From c6c29d28443648a0ed28f4773d2e7b127564c7e6 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 29 Jun 2008 13:50:48 +0000 Subject: Fix [Bug 2004256] --- ChangeLog | 3 +++ doc/interp.n | 80 +++++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 52 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3540c93..5b8c4bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-06-29 Donal K. Fellows + * doc/interp.n: Corrected order of subcommands. [Bug 2004256] + Removed obsolete (i.e. 8.5) .VS/.VE pairs. + * doc/object.n (EXAMPLES): Fix incorrect usage of oo::define to be done with oo::objdefine instead. [Bug 2004480] diff --git a/doc/interp.n b/doc/interp.n index f89594c..bd7b276 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: interp.n,v 1.39 2008/06/13 05:45:07 mistachkin Exp $ +'\" RCS: @(#) $Id: interp.n,v 1.40 2008/06/29 13:50:49 dkf Exp $ '\" .so man.macros .TH interp n 8.6 Tcl "Tcl Built-In Commands" @@ -36,10 +36,7 @@ command to be invoked in its master interpreter or in another slave interpreter. The only other connections between interpreters are through environment variables (the \fBenv\fR variable), which are normally shared among all interpreters in the application, -.VS 8.5 -and by resource limit exceeded callbacks. -.VE 8.5 -Note that the +and by resource limit exceeded callbacks. Note that the name space for files (such as the names returned by the \fBopen\fR command) is no longer shared between interpreters. Explicit commands are provided to share files and to transfer references to open files from one interpreter @@ -86,6 +83,7 @@ channels between interpreters. It can have any of several forms, depending on the \fIsubcommand\fR argument: .TP \fBinterp\fR \fBalias\fR \fIsrcPath\fR \fIsrcToken\fR +. Returns a Tcl list whose elements are the \fItargetCmd\fR and \fIarg\fRs associated with the alias represented by \fIsrcToken\fR (this is the value returned when the alias was @@ -93,6 +91,7 @@ created; it is possible that the name of the source command in the slave is different from \fIsrcToken\fR). .TP \fBinterp\fR \fBalias\fR \fIsrcPath\fR \fIsrcToken\fR \fB{}\fR +. Deletes the alias for \fIsrcToken\fR in the slave interpreter identified by \fIsrcPath\fR. \fIsrcToken\fR refers to the value returned when the alias @@ -100,6 +99,7 @@ was created; if the source command has been renamed, the renamed command will be deleted. .TP \fBinterp\fR \fBalias\fR \fIsrcPath\fR \fIsrcCmd\fR \fItargetPath\fR \fItargetCmd \fR?\fIarg arg ...\fR? +. This command creates an alias between one slave and another (see the \fBalias\fR slave command below for creating aliases between a slave and its master). In this command, either of the slave interpreters @@ -129,6 +129,7 @@ The command returns a token that uniquely identifies the command created does not have to be equal to \fIsrcCmd\fR. .TP \fBinterp\fR \fBaliases \fR?\fIpath\fR? +. This command returns a Tcl list of the tokens of all the source commands for aliases defined in the interpreter identified by \fIpath\fR. The tokens correspond to the values returned when @@ -136,14 +137,13 @@ the aliases were created (which may not be the same as the current names of the commands). .TP \fBinterp bgerror \fIpath\fR ?\fIcmdPrefix\fR? -.VS 8.5 +. This command either gets or sets the current background error handler for the interpreter identified by \fIpath\fR. If \fIcmdPrefix\fR is absent, the current background error handler is returned, and if it is present, it is a list of words (of minimum length one) that describes what to set the interpreter's background error to. See the \fBBACKGROUND ERROR HANDLING\fR section for more details. -.VE 8.5 .TP \fBinterp\fR \fBcancel \fR?\fB\-unwind\fR? ?\fB\-\|\-\fR? ?\fIpath\fR? ?\fIresult\fR? .VS 8.6 @@ -162,6 +162,7 @@ used. .VE 8.6 .TP \fBinterp\fR \fBcreate \fR?\fB\-safe\fR? ?\fB\-\|\-\fR? ?\fIpath\fR? +. Creates a slave interpreter identified by \fIpath\fR and a new command, called a \fIslave command\fR. The name of the slave command is the last component of \fIpath\fR. The new slave interpreter and the slave command @@ -186,6 +187,7 @@ The initial recursion limit of the slave interpreter is set to the current recursion limit of its parent interpreter. .TP \fBinterp\fR \fBdelete \fR?\fIpath ...?\fR +. Deletes zero or more interpreters given by the optional \fIpath\fR arguments, and for each interpreter, it also deletes its slaves. The command also deletes the slave command for each interpreter deleted. @@ -193,6 +195,7 @@ For each \fIpath\fR argument, if no interpreter by that name exists, the command raises an error. .TP \fBinterp\fR \fBeval\fR \fIpath arg \fR?\fIarg ...\fR? +. This command concatenates all of the \fIarg\fR arguments in the same fashion as the \fBconcat\fR command, then evaluates the resulting string as a Tcl script in the slave interpreter identified by \fIpath\fR. The result @@ -206,11 +209,13 @@ the slave that find out information about the slave's current state and stack frame. .TP \fBinterp exists \fIpath\fR +. Returns \fB1\fR if a slave interpreter by the specified \fIpath\fR exists in this master, \fB0\fR otherwise. If \fIpath\fR is omitted, the invoking interpreter is used. .TP \fBinterp expose \fIpath\fR \fIhiddenName\fR ?\fIexposedCmdName\fR? +. Makes the hidden command \fIhiddenName\fR exposed, eventually bringing it back under a new \fIexposedCmdName\fR name (this name is currently accepted only if it is a valid global name space name without any ::), @@ -221,6 +226,7 @@ fails. Hidden commands are explained in more detail in \fBHIDDEN COMMANDS\fR, below. .TP \fBinterp\fR \fBhide\fR \fIpath\fR \fIexposedCmdName\fR ?\fIhiddenCmdName\fR? +. Makes the exposed command \fIexposedCmdName\fR hidden, renaming it to the hidden command \fIhiddenCmdName\fR, or keeping the same name if \fIhiddenCmdName\fR is not given, in the interpreter denoted @@ -236,10 +242,12 @@ command, by making the current namespace be different from the global one. Hidden commands are explained in more detail in \fBHIDDEN COMMANDS\fR, below. .TP \fBinterp\fR \fBhidden\fR \fIpath\fR +. Returns a list of the names of all hidden commands in the interpreter identified by \fIpath\fR. .TP \fBinterp\fR \fBinvokehidden\fR \fIpath\fR ?\fI\-option ...\fR? \fIhiddenCmdName\fR ?\fIarg ...\fR? +. Invokes the hidden command \fIhiddenCmdName\fR with the arguments supplied in the interpreter denoted by \fIpath\fR. No substitutions or evaluation are applied to the arguments. Three \fI\-option\fRs are supported, all @@ -260,8 +268,13 @@ Note that the hidden command will be executed (by default) in the current context stack frame of the \fIpath\fR interpreter. Hidden commands are explained in more detail in \fBHIDDEN COMMANDS\fR, below. .TP +\fBinterp issafe\fR ?\fIpath\fR? +. +Returns \fB1\fR if the interpreter identified by the specified \fIpath\fR +is safe, \fB0\fR otherwise. +.TP \fBinterp\fR \fBlimit\fR \fIpath\fR \fIlimitType\fR ?\fI\-option\fR? ?\fIvalue\fR \fI...\fR? -.VS 8.5 +. Sets up, manipulates and queries the configuration of the resource limit \fIlimitType\fR for the interpreter denoted by \fIpath\fR. If no \fI\-option\fR is specified, return the current configuration of the @@ -269,13 +282,9 @@ limit. If \fI\-option\fR is the sole argument, return the value of that option. Otherwise, a list of \fI\-option\fR/\fIvalue\fR argument pairs must supplied. See \fBRESOURCE LIMITS\fR below for a more detailed explanation of what limits and options are supported. -.VE 8.5 -.TP -\fBinterp issafe\fR ?\fIpath\fR? -Returns \fB1\fR if the interpreter identified by the specified \fIpath\fR -is safe, \fB0\fR otherwise. .TP \fBinterp marktrusted\fR \fIpath\fR +. Marks the interpreter identified by \fIpath\fR as trusted. Does not expose the hidden commands. This command can only be invoked from a trusted interpreter. @@ -283,6 +292,7 @@ The command has no effect if the interpreter identified by \fIpath\fR is already trusted. .TP \fBinterp\fR \fBrecursionlimit\fR \fIpath\fR ?\fInewlimit\fR? +. Returns the maximum allowable nesting depth for the interpreter specified by \fIpath\fR. If \fInewlimit\fR is specified, the interpreter recursion limit will be set so that nesting @@ -302,6 +312,7 @@ the maximum size of the C stack. .RE .TP \fBinterp\fR \fBshare\fR \fIsrcPath channelId destPath\fR +. Causes the IO channel identified by \fIchannelId\fR to become shared between the interpreter identified by \fIsrcPath\fR and the interpreter identified by \fIdestPath\fR. Both interpreters have the same permissions @@ -311,11 +322,13 @@ channels accessible in an interpreter are automatically closed when an interpreter is destroyed. .TP \fBinterp\fR \fBslaves\fR ?\fIpath\fR? +. Returns a Tcl list of the names of all the slave interpreters associated with the interpreter identified by \fIpath\fR. If \fIpath\fR is omitted, the invoking interpreter is used. .TP \fBinterp\fR \fBtarget\fR \fIpath alias\fR +. Returns a Tcl list describing the target interpreter for an alias. The alias is specified with an interpreter path and source command name, just as in \fBinterp alias\fR above. The name of the target interpreter is @@ -326,6 +339,7 @@ invoking interpreter or one of its descendants then an error is generated. The target command does not have to be defined at the time of this invocation. .TP \fBinterp\fR \fBtransfer\fR \fIsrcPath channelId destPath\fR +. Causes the IO channel identified by \fIchannelId\fR to become available in the interpreter identified by \fIdestPath\fR and unavailable in the interpreter identified by \fIsrcPath\fR. @@ -344,12 +358,14 @@ and the \fIarg\fRs determine the exact behavior of the command. The valid forms of this command are: .TP \fIslave \fBaliases\fR +. Returns a Tcl list whose elements are the tokens of all the aliases in \fIslave\fR. The tokens correspond to the values returned when the aliases were created (which may not be the same as the current names of the commands). .TP \fIslave \fBalias \fIsrcToken\fR +. Returns a Tcl list whose elements are the \fItargetCmd\fR and \fIarg\fRs associated with the alias represented by \fIsrcToken\fR (this is the value returned when the alias was @@ -357,12 +373,14 @@ created; it is possible that the actual source command in the slave is different from \fIsrcToken\fR). .TP \fIslave \fBalias \fIsrcToken \fB{}\fR +. Deletes the alias for \fIsrcToken\fR in the slave interpreter. \fIsrcToken\fR refers to the value returned when the alias was created; if the source command has been renamed, the renamed command will be deleted. .TP \fIslave \fBalias \fIsrcCmd targetCmd \fR?\fIarg ..\fR? +. Creates an alias such that whenever \fIsrcCmd\fR is invoked in \fIslave\fR, \fItargetCmd\fR is invoked in the master. The \fIarg\fR arguments will be passed to \fItargetCmd\fR as additional @@ -374,16 +392,16 @@ The command returns a token that uniquely identifies the command created does not have to be equal to \fIsrcCmd\fR. .TP \fIslave \fBbgerror\fR ?\fIcmdPrefix\fR? -.VS 8.5 +. This command either gets or sets the current background error handler for the \fIslave\fR interpreter. If \fIcmdPrefix\fR is absent, the current background error handler is returned, and if it is present, it is a list of words (of minimum length one) that describes what to set the interpreter's background error to. See the \fBBACKGROUND ERROR HANDLING\fR section for more details. -.VE 8.5 .TP \fIslave \fBeval \fIarg \fR?\fIarg ..\fR? +. This command concatenates all of the \fIarg\fR arguments in the same fashion as the \fBconcat\fR command, then evaluates the resulting string as a Tcl script in \fIslave\fR. @@ -397,6 +415,7 @@ the slave that find out information about the slave's current state and stack frame. .TP \fIslave \fBexpose \fIhiddenName \fR?\fIexposedCmdName\fR? +. This command exposes the hidden command \fIhiddenName\fR, eventually bringing it back under a new \fIexposedCmdName\fR name (this name is currently accepted only if it is a valid global name space name without any ::), @@ -406,6 +425,7 @@ fails. For more details on hidden commands, see \fBHIDDEN COMMANDS\fR, below. .TP \fIslave \fBhide \fIexposedCmdName\fR ?\fIhiddenCmdName\fR? +. This command hides the exposed command \fIexposedCmdName\fR, renaming it to the hidden command \fIhiddenCmdName\fR, or keeping the same name if the argument is not given, in the \fIslave\fR interpreter. @@ -420,9 +440,11 @@ command, by making the current namespace be different from the global one. For more details on hidden commands, see \fBHIDDEN COMMANDS\fR, below. .TP \fIslave \fBhidden\fR +. Returns a list of the names of all hidden commands in \fIslave\fR. .TP \fIslave \fBinvokehidden\fR ?\fI\-option ...\fR? \fIhiddenName \fR?\fIarg ..\fR? +. This command invokes the hidden command \fIhiddenName\fR with the supplied arguments, in \fIslave\fR. No substitutions or evaluations are applied to the arguments. Three \fI\-option\fRs are supported, all @@ -444,10 +466,11 @@ For more details on hidden commands, see \fBHIDDEN COMMANDS\fR, below. .TP \fIslave \fBissafe\fR +. Returns \fB1\fR if the slave interpreter is safe, \fB0\fR otherwise. .TP \fIslave \fBlimit\fR \fIlimitType\fR ?\fI\-option\fR? ?\fIvalue\fR \fI...\fR? -.VS 8.5 +. Sets up, manipulates and queries the configuration of the resource limit \fIlimitType\fR for the slave interpreter. If no \fI\-option\fR is specified, return the current configuration of the limit. If @@ -455,15 +478,16 @@ is specified, return the current configuration of the limit. If Otherwise, a list of \fI\-option\fR/\fIvalue\fR argument pairs must supplied. See \fBRESOURCE LIMITS\fR below for a more detailed explanation of what limits and options are supported. -.VE 8.5 .TP \fIslave \fBmarktrusted\fR +. Marks the slave interpreter as trusted. Can only be invoked by a trusted interpreter. This command does not expose any hidden commands in the slave interpreter. The command has no effect if the slave is already trusted. .TP \fIslave\fR \fBrecursionlimit\fR ?\fInewlimit\fR? +. Returns the maximum allowable nesting depth for the \fIslave\fR interpreter. If \fInewlimit\fR is specified, the recursion limit in \fIslave\fR will be set so that nesting of more than \fInewlimit\fR calls to \fBTcl_Eval()\fR @@ -691,7 +715,6 @@ namespace even if the current namespace is not the global one. This prevents slaves from fooling a master interpreter into hiding the wrong command, by making the current namespace be different from the global one. .SH "RESOURCE LIMITS" -.VS 8.5 .PP Every interpreter has two kinds of resource limits that may be imposed by any master interpreter upon its slaves. Command limits (of type \fBcommand\fR) @@ -716,10 +739,9 @@ catch and handle. Every limit has a number of options associated with it, some of which are common across all kinds of limits, and others of which are particular to the kind of limit. -.VE 8.5 .TP \fB\-command\fR -.VS 8.5 +. This option (common for all limit types) specifies (if non-empty) a Tcl script to be executed in the global namespace of the interpreter reading and writing the option when the particular limit in the limited interpreter is exceeded. @@ -729,37 +751,33 @@ reported through the background error mechanism (see \fBBACKGROUND ERROR HANDLING\fR). Note that the callbacks defined by one interpreter are completely isolated from the callbacks defined by another, and that the order in which those callbacks are called is undefined. -.VE 8.5 .TP \fB\-granularity\fR -.VS 8.5 +. This option (common for all limit types) specifies how frequently (out of the points when the Tcl interpreter is in a consistent state where limit checking is possible) that the limit is actually checked. This allows the tuning of how frequently a limit is checked, and hence how often the limit-checking overhead (which may be substantial in the case of time limits) is incurred. -.VE 8.5 .TP \fB\-milliseconds\fR -.VS 8.5 +. This option specifies the number of milliseconds after the moment defined in the \fB\-seconds\fR option that the time limit will fire. It should only ever be specified in conjunction with the \fB\-seconds\fR option (whether it was set previously or is being set this invocation.) -.VE 8.5 .TP \fB\-seconds\fR -.VS 8.5 +. This option specifies the number of seconds after the epoch (see \fBclock seconds\fR) that the time limit for the interpreter will be triggered. The limit will be triggered at the start of the second unless specified at a sub-second level using the \fB\-milliseconds\fR option. This option may be the empty string, which indicates that a time limit is not set for the interpreter. -.VE 8.5 .TP \fB\-value\fR -.VS 8.5 +. This option specifies the number of commands that the interpreter may execute before triggering the command limit. This option may be the empty string, which indicates that a command limit is not set for the interpreter. @@ -789,7 +807,6 @@ is also the sort of information that can be obtained by trapping a normal error using \fBcatch\fR of course.) The resulting list will then be executed in the interpreter's global namespace without further substitutions being performed. -.VE 8.5 .SH CREDITS The safe interpreter mechanism is based on the Safe-Tcl prototype implemented by Nathaniel Borenstein and Marshall Rose. @@ -813,7 +830,6 @@ proc loggedLappend {i args} { \fBinterp eval\fR $i $someUntrustedScript .CE .PP -.VS 8.5 Setting a resource limit on an interpreter so that an infinite loop terminates. .CS @@ -826,8 +842,10 @@ set i [\fBinterp create\fR] } } .CE -.VE 8.5 .SH "SEE ALSO" bgerror(n), load(n), safe(n), Tcl_CreateSlave(3), Tcl_Eval(3) .SH KEYWORDS alias, master interpreter, safe interpreter, slave interpreter +'\"Local Variables: +'\"mode: nroff +'\"End: -- cgit v0.12 From 7b7bac281c6cba5b97c0962a4032cc39dcc6308f Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 29 Jun 2008 19:09:27 +0000 Subject: * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanks to Rolf Ade for detecting. --- ChangeLog | 5 +++++ generic/tclPathObj.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b8c4bb..154c15e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-29 Don Porter + + * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanks + to Rolf Ade for detecting. + 2008-06-29 Donal K. Fellows * doc/interp.n: Corrected order of subcommands. [Bug 2004256] diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index b52e0b0..475bf7f 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.71 2008/06/28 04:23:00 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.72 2008/06/29 19:09:28 dgp Exp $ */ #include "tclInt.h" @@ -1878,6 +1878,7 @@ Tcl_FSGetNormalizedPath( if (fsPathPtr->normPathPtr == NULL) { ClientData clientData = NULL; Tcl_Obj *useThisCwd = NULL; + int pureNormalized = 1; /* * Since normPathPtr is NULL, but this is a valid path object, we know @@ -1926,6 +1927,7 @@ Tcl_FSGetNormalizedPath( return NULL; } + pureNormalized = 0; Tcl_DecrRefCount(absolutePath); absolutePath = Tcl_FSJoinToPath(useThisCwd, 1, &absolutePath); Tcl_IncrRefCount(absolutePath); @@ -1945,6 +1947,7 @@ Tcl_FSGetNormalizedPath( if (absolutePath == NULL) { return NULL; } + pureNormalized = 0; #endif /* __WIN32__ */ } } @@ -1966,7 +1969,7 @@ Tcl_FSGetNormalizedPath( * is an absolute path). */ - if (useThisCwd == NULL) { + if (pureNormalized) { if (!strcmp(TclGetString(fsPathPtr->normPathPtr), TclGetString(pathPtr))) { /* @@ -1982,7 +1985,8 @@ Tcl_FSGetNormalizedPath( fsPathPtr->normPathPtr = pathPtr; } - } else { + } + if (useThisCwd != NULL) { /* * We just need to free an object we allocated above for relative * paths (this was returned by Tcl_FSJoinToPath above), and then -- cgit v0.12 From 131a59f68c8b1673c1fcd9b035bb7791eea72bc9 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 29 Jun 2008 22:28:20 +0000 Subject: Prepare Tcl's docs for life as 8.6 (remove out of date change bars, fix typedefs, add a few missing bits) --- ChangeLog | 6 +++ doc/AddErrInfo.3 | 12 +---- doc/AssocData.3 | 4 +- doc/Async.3 | 4 +- doc/CallDel.3 | 4 +- doc/Class.3 | 36 +++++++------- doc/CrtChannel.3 | 110 ++++++++++++++++++------------------------ doc/CrtChnlHdlr.3 | 7 +-- doc/CrtCloseHdlr.3 | 7 +-- doc/CrtCommand.3 | 16 +++---- doc/CrtFileHdlr.3 | 8 ++-- doc/CrtMathFnc.3 | 17 +++---- doc/CrtObjCmd.3 | 9 ++-- doc/CrtTimerHdlr.3 | 7 ++- doc/CrtTrace.3 | 6 +-- doc/DoWhenIdle.3 | 7 ++- doc/Encoding.3 | 40 ++++------------ doc/Exit.3 | 15 ++---- doc/FileSystem.3 | 115 +++++++++++++++++++++----------------------- doc/GetTime.3 | 44 ++++++++++------- doc/Hash.3 | 15 +++--- doc/IntObj.3 | 11 +---- doc/Interp.3 | 16 +++---- doc/Limit.3 | 8 ++-- doc/LinkVar.3 | 17 +------ doc/Method.3 | 40 ++++++++-------- doc/Namespace.3 | 13 +++-- doc/Notifier.3 | 30 +++++------- doc/Object.3 | 41 ++++++++-------- doc/OpenFileChnl.3 | 34 +------------ doc/OpenTcp.3 | 19 +++----- doc/Panic.3 | 9 +--- doc/ParseCmd.3 | 46 +++++++++--------- doc/Preserve.3 | 8 ++-- doc/PrintDbl.3 | 6 +-- doc/RegConfig.3 | 9 ++-- doc/RegExp.3 | 16 +++---- doc/SaveResult.3 | 6 +-- doc/SetResult.3 | 5 +- doc/SplitList.3 | 6 +-- doc/StaticPkg.3 | 7 ++- doc/StringObj.3 | 13 ++--- doc/Tcl.n | 7 +-- doc/Tcl_Main.3 | 14 +++--- doc/Thread.3 | 5 +- doc/TraceCmd.3 | 4 +- doc/TraceVar.3 | 4 +- doc/Utf.3 | 4 +- doc/bgerror.n | 9 ++-- doc/binary.n | 32 ++----------- doc/catch.n | 20 ++++---- doc/encoding.n | 12 ++--- doc/eval.n | 9 +--- doc/exec.n | 31 ++++++++---- doc/expr.n | 36 +++++++------- doc/incr.n | 8 +--- doc/info.n | 138 +++++++++++++++++++++++++++++++++++++++-------------- doc/lindex.n | 8 +--- doc/linsert.n | 10 +--- doc/list.n | 8 +--- doc/load.n | 11 ++--- doc/lrange.n | 9 +--- doc/lreplace.n | 7 +-- doc/lsearch.n | 33 +++++++++---- doc/lset.n | 9 +--- doc/lsort.n | 24 +++++----- doc/mathfunc.n | 37 ++++++++++++-- doc/msgcat.n | 16 ++++--- doc/namespace.n | 41 +++++++++++----- doc/open.n | 43 +++++++++++++++-- doc/regexp.n | 25 +++++----- doc/regsub.n | 15 ++++-- doc/return.n | 23 ++++----- doc/scan.n | 22 ++++++--- doc/source.n | 8 ++-- doc/string.n | 35 +++++++++----- doc/switch.n | 18 ++++--- doc/tclsh.1 | 19 +++----- doc/tclvars.n | 57 +++++++++++++++++----- doc/unload.n | 7 ++- 80 files changed, 831 insertions(+), 836 deletions(-) diff --git a/ChangeLog b/ChangeLog index 154c15e..5c943d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-29 Donal K. Fellows + + * doc/*.1, doc/*.3, doc/*.n: Many small updates, purging out of date + change bars and cleaning up the formatting of typedefs. Added a few + missing bits of documentation in the process. + 2008-06-29 Don Porter * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanks diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index cef07c8..161de0c 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.20 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.21 2008/06/29 22:28:21 dkf Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.5 Tcl "Tcl Library Procedures" @@ -15,20 +15,16 @@ Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErr .SH SYNOPSIS .nf \fB#include \fR -.VS 8.5 .sp Tcl_Obj * \fBTcl_GetReturnOptions\fR(\fIinterp, code\fR) .sp int \fBTcl_SetReturnOptions\fR(\fIinterp, options\fR) -.VE 8.5 .sp \fBTcl_AddErrorInfo\fR(\fIinterp, message\fR) -.VS 8.5 .sp \fBTcl_AppendObjToErrorInfo\fR(\fIinterp, objPtr\fR) -.VE 8.5 .sp \fBTcl_AddObjErrorInfo\fR(\fIinterp, message, length\fR) .sp @@ -59,11 +55,9 @@ this points to the first byte of an array of \fIlength\fR bytes containing a string to append to the \fB\-errorinfo\fR return option. This byte array may contain embedded null bytes unless \fIlength\fR is negative. -.VS 8.5 .AP Tcl_Obj *objPtr in A message to be appended to the \fB\-errorinfo\fR return option in the form of a Tcl_Obj value. -.VE 8.5 .AP int length in The number of bytes to copy from \fImessage\fR when appending to the \fB\-errorinfo\fR return option. @@ -86,7 +80,6 @@ Number of bytes in command; -1 means use all bytes up to first null byte .SH DESCRIPTION .PP -.VS 8.5 The \fBTcl_SetReturnOptions\fR and \fBTcl_GetReturnOptions\fR routines expose the same capabilities as the \fBreturn\fR and \fBcatch\fR commands, respectively, in the form of a C interface. @@ -163,7 +156,6 @@ notably the \fB\-errorinfo\fR and \fB\-errorcode\fR return options should be set properly when the command procedure of a command returns \fBTCL_ERROR\fR. Tcl provides several simpler interfaces to more directly set these return options. -.VE 8.5 .PP The \fB\-errorinfo\fR option holds a stack trace of the operations that were in progress when an error occurred, @@ -209,12 +201,10 @@ The value of the \fB\-errorline\fR return option (retrieved via a call to \fBTcl_GetReturnOptions\fR) often makes up a useful part of the \fImessage\fR passed to \fBTcl_AddErrorInfo\fR. .PP -.VS 8.5 \fBTcl_AppendObjToErrorInfo\fR is an alternative interface to the same functionality as \fBTcl_AddErrorInfo\fR. \fBTcl_AppendObjToErrorInfo\fR is called when the string value to be appended to the \fB\-errorinfo\fR option is available as a \fBTcl_Obj\fR instead of as a \fBchar\fR array. -.VE 8.5 .PP \fBTcl_AddObjErrorInfo\fR is nearly identical to \fBTcl_AddErrorInfo\fR, except that it has an additional \fIlength\fR diff --git a/doc/AssocData.3 b/doc/AssocData.3 index 6fb16ed..2b85137 100644 --- a/doc/AssocData.3 +++ b/doc/AssocData.3 @@ -5,7 +5,7 @@ '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" -'\" RCS: @(#) $Id: AssocData.3,v 1.7 2004/10/07 15:15:35 dkf Exp $ +'\" RCS: @(#) $Id: AssocData.3,v 1.8 2008/06/29 22:28:23 dkf Exp $ .so man.macros .TH Tcl_SetAssocData 3 7.5 Tcl "Tcl Library Procedures" .BS @@ -64,7 +64,7 @@ procedure to invoke if the interpreter is deleted before the association is deleted. \fIDeleteProc\fR should have arguments and result that match the type \fBTcl_InterpDeleteProc\fR: .CS -typedef void Tcl_InterpDeleteProc( +typedef void \fBTcl_InterpDeleteProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR); .CE diff --git a/doc/Async.3 b/doc/Async.3 index afcfcd3..346a26c 100644 --- a/doc/Async.3 +++ b/doc/Async.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Async.3,v 1.12 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: Async.3,v 1.13 2008/06/29 22:28:23 dkf Exp $ '\" .so man.macros .TH Tcl_AsyncCreate 3 7.0 Tcl "Tcl Library Procedures" @@ -84,7 +84,7 @@ the actions associated with the asynchronous event. \fIProc\fR should have arguments and result that match the type \fBTcl_AsyncProc\fR: .CS -typedef int Tcl_AsyncProc( +typedef int \fBTcl_AsyncProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, int \fIcode\fR); diff --git a/doc/CallDel.3 b/doc/CallDel.3 index e2abc8c..9c225e0 100644 --- a/doc/CallDel.3 +++ b/doc/CallDel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CallDel.3,v 1.6 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CallDel.3,v 1.7 2008/06/29 22:28:23 dkf Exp $ '\" .so man.macros .TH Tcl_CallWhenDeleted 3 7.0 Tcl "Tcl Library Procedures" @@ -39,7 +39,7 @@ time of the call. \fIProc\fR should have arguments and result that match the type \fBTcl_InterpDeleteProc\fR: .CS -typedef void Tcl_InterpDeleteProc( +typedef void \fBTcl_InterpDeleteProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR); .CE diff --git a/doc/Class.3 b/doc/Class.3 index 8954ab7..b7e17db 100644 --- a/doc/Class.3 +++ b/doc/Class.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Class.3,v 1.1 2008/05/31 11:42:06 dkf Exp $ +'\" RCS: @(#) $Id: Class.3,v 1.2 2008/06/29 22:28:23 dkf Exp $ '\" .so man.macros .TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions" @@ -137,12 +137,12 @@ remove a piece of metadata that was not attached. The contents of the Tcl_ObjectMetadataType structure are as follows: .PP .CS - typedef const struct { - int \fIversion\fR; - const char *\fIname\fR; - Tcl_ObjectMetadataDeleteProc \fIdeleteProc\fR; - Tcl_CloneProc \fIcloneProc\fR; - } \fBTcl_ObjectMetadataType\fR; +typedef const struct { + int \fIversion\fR; + const char *\fIname\fR; + Tcl_ObjectMetadataDeleteProc \fIdeleteProc\fR; + Tcl_CloneProc \fIcloneProc\fR; +} \fBTcl_ObjectMetadataType\fR; .CE .PP The \fIversion\fR field allows for future expansion of the structure, and @@ -165,8 +165,8 @@ Functions matching this signature are used to delete metadata associated with a class or object. .PP .CS - typedef void (*\fBTcl_ObjectMetadataDeleteProc\fR) ( - ClientData \fImetadata\fR); +typedef void \fBTcl_ObjectMetadataDeleteProc\fR( + ClientData \fImetadata\fR); .CE .PP The \fImetadata\fR argument gives the address of the metadata to be @@ -177,10 +177,10 @@ Functions matching this signature are used to create copies of metadata associated with a class or object. .PP .CS - typedef int (*\fBTcl_CloneProc\fR) ( - Tcl_Interp *\fIinterp\fR, - ClientData \fIsrcMetadata\fR, - ClientData *\fIdstMetadataPtr\fR); +typedef int \fBTcl_CloneProc\fR( + Tcl_Interp *\fIinterp\fR, + ClientData \fIsrcMetadata\fR, + ClientData *\fIdstMetadataPtr\fR); .CE .PP The \fIinterp\fR argument gives a place to write an error message when the @@ -204,11 +204,11 @@ method implementations is to be used. The \fITcl_ObjectMapMethodNameProc\fR callback is defined as follows: .PP .CS - typedef int (*\fBTcl_ObjectMapMethodNameProc\fR)( - Tcl_Interp *\fIinterp\fR, - Tcl_Object \fIobject\fR, - Tcl_Class *\fIstartClsPtr\fR, - Tcl_Obj *\fImethodNameObj\fR); +typedef int \fBTcl_ObjectMapMethodNameProc\fR( + Tcl_Interp *\fIinterp\fR, + Tcl_Object \fIobject\fR, + Tcl_Class *\fIstartClsPtr\fR, + Tcl_Obj *\fImethodNameObj\fR); .CE .PP The \fIinterp\fR parameter (and the integer result) follow normal Tcl result diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index 613ed90..a4a6c4c 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChannel.3,v 1.40 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CrtChannel.3,v 1.41 2008/06/29 22:28:23 dkf Exp $ .so man.macros .TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -98,10 +98,8 @@ Tcl_DriverWideSeekProc * Tcl_DriverThreadActionProc * \fBTcl_ChannelThreadActionProc\fR(\fItypePtr\fR) .sp -.VS 8.5 Tcl_DriverTruncateProc * \fBTcl_ChannelTruncateProc\fR(\fItypePtr\fR) -.VE 8.5 .sp Tcl_DriverSetOptionProc * \fBTcl_ChannelSetOptionProc\fR(\fItypePtr\fR) @@ -159,9 +157,7 @@ Specific options list (space separated words, without .QW \- ) to append to the standard generic options list. Can be NULL for generic options error message only. - .BE - .SH DESCRIPTION .PP Tcl uses a two-layered channel architecture. It provides a generic upper @@ -290,20 +286,16 @@ name is registered in the (thread)-global list of all channels (result (thread)global list of all channels (of the current thread). Application to a channel still registered in some interpreter is not allowed. -.VS 8.5 Also notifies the driver if the \fBTcl_ChannelType\fR version is \fBTCL_CHANNEL_VERSION_4\fR (or higher), and \fBTcl_DriverThreadActionProc\fR is defined for it. -.VE 8.5 .PP \fBTcl_SpliceChannel\fR adds the specified \fIchannel\fR to the (thread)global list of all channels (of the current thread). Application to a channel registered in some interpreter is not allowed. -.VS 8.5 Also notifies the driver if the \fBTcl_ChannelType\fR version is \fBTCL_CHANNEL_VERSION_4\fR (or higher), and \fBTcl_DriverThreadActionProc\fR is defined for it. -.VE 8.5 .PP \fBTcl_ClearChannelHandlers\fR removes all channelhandlers and event scripts associated with the specified \fIchannel\fR, thus shutting @@ -336,10 +328,8 @@ typedef struct Tcl_ChannelType { Tcl_DriverHandlerProc *\fIhandlerProc\fR; Tcl_DriverWideSeekProc *\fIwideSeekProc\fR; Tcl_DriverThreadActionProc *\fIthreadActionProc\fR; -.VS 8.5 Tcl_DriverTruncateProc *\fItruncateProc\fR; -.VE 8.5 -} Tcl_ChannelType; +} \fBTcl_ChannelType\fR; .CE .PP It is not necessary to provide implementations for all channel @@ -360,9 +350,7 @@ structure, the following functions should be used to obtain the values: \fBTcl_ChannelClose2Proc\fR, \fBTcl_ChannelInputProc\fR, \fBTcl_ChannelOutputProc\fR, \fBTcl_ChannelSeekProc\fR, \fBTcl_ChannelWideSeekProc\fR, \fBTcl_ChannelThreadActionProc\fR, -.VS 8.5 \fBTcl_ChannelTruncateProc\fR, -.VE 8.5 \fBTcl_ChannelSetOptionProc\fR, \fBTcl_ChannelGetOptionProc\fR, \fBTcl_ChannelWatchProc\fR, \fBTcl_ChannelGetHandleProc\fR, \fBTcl_ChannelFlushProc\fR, or \fBTcl_ChannelHandlerProc\fR. @@ -387,11 +375,9 @@ that you require. \fBTCL_CHANNEL_VERSION_2\fR is the minimum recommended. \fBTCL_CHANNEL_VERSION_3\fR must be set to specifiy the \fIwideSeekProc\fR member. \fBTCL_CHANNEL_VERSION_4\fR must be set to specifiy the \fIthreadActionProc\fR member (includes \fIwideSeekProc\fR). -.VS 8.5 \fBTCL_CHANNEL_VERSION_5\fR must be set to specifiy the \fItruncateProc\fR members (includes \fIwideSeekProc\fR and \fIthreadActionProc\fR). -.VE 8.5 If it is not set to any of these, then this \fBTcl_ChannelType\fR is assumed to have the original structure. See \fBOLD CHANNEL TYPES\fR for more details. While Tcl will recognize @@ -400,9 +386,7 @@ least \fBTCL_CHANNEL_VERSION_2\fR to function correctly. .PP This value can be retrieved with \fBTcl_ChannelVersion\fR, which returns one of -.VS 8.5 \fBTCL_CHANNEL_VERSION_5\fR, -.VE 8.5 \fBTCL_CHANNEL_VERSION_4\fR, \fBTCL_CHANNEL_VERSION_3\fR, \fBTCL_CHANNEL_VERSION_2\fR or \fBTCL_CHANNEL_VERSION_1\fR. @@ -413,7 +397,7 @@ the generic layer to set blocking and nonblocking mode on the device. \fIBlockModeProc\fR should match the following prototype: .PP .CS -typedef int Tcl_DriverBlockModeProc( +typedef int \fBTcl_DriverBlockModeProc\fR( ClientData \fIinstanceData\fR, int \fImode\fR); .CE @@ -448,7 +432,7 @@ generic layer to clean up driver-related information when the channel is closed. \fICloseProc\fR must match the following prototype: .PP .CS -typedef int Tcl_DriverCloseProc( +typedef int \fBTcl_DriverCloseProc\fR( ClientData \fIinstanceData\fR, Tcl_Interp *\fIinterp\fR); .CE @@ -470,7 +454,7 @@ independently may set \fIcloseProc\fR to \fBTCL_CLOSE2PROC\fR and set following prototype: .PP .CS -typedef int Tcl_DriverClose2Proc( +typedef int \fBTcl_DriverClose2Proc\fR( ClientData \fIinstanceData\fR, Tcl_Interp *\fIinterp\fR, int \fIflags\fR); @@ -501,7 +485,7 @@ generic layer to read data from the file or device and store it in an internal buffer. \fIInputProc\fR must match the following prototype: .PP .CS -typedef int Tcl_DriverInputProc( +typedef int \fBTcl_DriverInputProc\fR( ClientData \fIinstanceData\fR, char *\fIbuf\fR, int \fIbufSize\fR, @@ -545,7 +529,7 @@ generic layer to transfer data from an internal buffer to the output device. \fIOutputProc\fR must match the following prototype: .PP .CS -typedef int Tcl_DriverOutputProc( +typedef int \fBTcl_DriverOutputProc\fR( ClientData \fIinstanceData\fR, const char *\fIbuf\fR, int \fItoWrite\fR, @@ -584,7 +568,7 @@ operations will be applied. \fISeekProc\fR must match the following prototype: .PP .CS -typedef int Tcl_DriverSeekProc( +typedef int \fBTcl_DriverSeekProc\fR( ClientData \fIinstanceData\fR, long \fIoffset\fR, int \fIseekMode\fR, @@ -614,7 +598,7 @@ in preference to the \fIseekProc\fR, but both must be defined if the following prototype: .PP .CS -typedef Tcl_WideInt Tcl_DriverWideSeekProc( +typedef Tcl_WideInt \fBTcl_DriverWideSeekProc\fR( ClientData \fIinstanceData\fR, Tcl_WideInt \fIoffset\fR, int \fIseekMode\fR, @@ -636,7 +620,7 @@ the generic layer to set a channel type specific option on a channel. \fIsetOptionProc\fR must match the following prototype: .PP .CS -typedef int Tcl_DriverSetOptionProc( +typedef int \fBTcl_DriverSetOptionProc\fR( ClientData \fIinstanceData\fR, Tcl_Interp *\fIinterp\fR, const char *\fIoptionName\fR, @@ -677,7 +661,7 @@ the generic layer to get the value of a channel type specific option on a channel. \fIgetOptionProc\fR must match the following prototype: .PP .CS -typedef int Tcl_DriverGetOptionProc( +typedef int \fBTcl_DriverGetOptionProc\fR( ClientData \fIinstanceData\fR, Tcl_Interp *\fIinterp\fR, const char *\fIoptionName\fR, @@ -715,7 +699,7 @@ notice events of interest on this channel. \fIWatchProc\fR should match the following prototype: .PP .CS -typedef void Tcl_DriverWatchProc( +typedef void \fBTcl_DriverWatchProc\fR( ClientData \fIinstanceData\fR, int \fImask\fR); .CE @@ -746,7 +730,7 @@ the generic layer to retrieve a device-specific handle from the channel. \fIGetHandleProc\fR should match the following prototype: .PP .CS -typedef int Tcl_DriverGetHandleProc( +typedef int \fBTcl_DriverGetHandleProc\fR( ClientData \fIinstanceData\fR, int \fIdirection\fR, ClientData *\fIhandlePtr\fR); @@ -775,7 +759,7 @@ It should be set to NULL. \fIFlushProc\fR should match the following prototype: .PP .CS -typedef int Tcl_DriverFlushProc( +typedef int \fBTcl_DriverFlushProc\fR( ClientData \fIinstanceData\fR); .CE .PP @@ -790,7 +774,7 @@ that occur on the underlying (stacked) channel. \fIHandlerProc\fR should match the following prototype: .PP .CS -typedef int Tcl_DriverHandlerProc( +typedef int \fBTcl_DriverHandlerProc\fR( ClientData \fIinstanceData\fR, int \fIinterestMask\fR); .CE @@ -819,9 +803,9 @@ might be maintaining using the calling thread as the associate. See \fBTcl_CutChannel\fR and \fBTcl_SpliceChannel\fR for more detail. .PP .CS -typedef void Tcl_DriverThreadActionProc( +typedef void \fBTcl_DriverThreadActionProc\fR( ClientData \fIinstanceData\fR, - int \fIaction\fR); + int \fIaction\fR); .CE .PP \fIInstanceData\fR is the same as the value passed to @@ -836,7 +820,7 @@ called by the generic layer when a channel is truncated to some length. It can be NULL. .PP .CS -typedef int Tcl_DriverTruncateProc( +typedef int \fBTcl_DriverTruncateProc\fR( ClientData \fIinstanceData\fR, Tcl_WideInt \fIlength\fR); .CE @@ -891,18 +875,18 @@ the following fields: .PP .CS typedef struct Tcl_ChannelType { - char *\fItypeName\fR; - Tcl_DriverBlockModeProc *\fIblockModeProc\fR; - Tcl_DriverCloseProc *\fIcloseProc\fR; - Tcl_DriverInputProc *\fIinputProc\fR; - Tcl_DriverOutputProc *\fIoutputProc\fR; - Tcl_DriverSeekProc *\fIseekProc\fR; - Tcl_DriverSetOptionProc *\fIsetOptionProc\fR; - Tcl_DriverGetOptionProc *\fIgetOptionProc\fR; - Tcl_DriverWatchProc *\fIwatchProc\fR; - Tcl_DriverGetHandleProc *\fIgetHandleProc\fR; - Tcl_DriverClose2Proc *\fIclose2Proc\fR; -} Tcl_ChannelType; + char *\fItypeName\fR; + Tcl_DriverBlockModeProc *\fIblockModeProc\fR; + Tcl_DriverCloseProc *\fIcloseProc\fR; + Tcl_DriverInputProc *\fIinputProc\fR; + Tcl_DriverOutputProc *\fIoutputProc\fR; + Tcl_DriverSeekProc *\fIseekProc\fR; + Tcl_DriverSetOptionProc *\fIsetOptionProc\fR; + Tcl_DriverGetOptionProc *\fIgetOptionProc\fR; + Tcl_DriverWatchProc *\fIwatchProc\fR; + Tcl_DriverGetHandleProc *\fIgetHandleProc\fR; + Tcl_DriverClose2Proc *\fIclose2Proc\fR; +} \fBTcl_ChannelType\fR; .CE .PP It is still possible to create channel with the above structure. The @@ -917,29 +901,27 @@ contained the following fields: .PP .CS typedef struct Tcl_ChannelType { - char *\fItypeName\fR; - Tcl_ChannelTypeVersion \fIversion\fR; - Tcl_DriverCloseProc *\fIcloseProc\fR; - Tcl_DriverInputProc *\fIinputProc\fR; - Tcl_DriverOutputProc *\fIoutputProc\fR; - Tcl_DriverSeekProc *\fIseekProc\fR; - Tcl_DriverSetOptionProc *\fIsetOptionProc\fR; - Tcl_DriverGetOptionProc *\fIgetOptionProc\fR; - Tcl_DriverWatchProc *\fIwatchProc\fR; - Tcl_DriverGetHandleProc *\fIgetHandleProc\fR; - Tcl_DriverClose2Proc *\fIclose2Proc\fR; - Tcl_DriverBlockModeProc *\fIblockModeProc\fR; - Tcl_DriverFlushProc *\fIflushProc\fR; - Tcl_DriverHandlerProc *\fIhandlerProc\fR; - Tcl_DriverTruncateProc *\fItruncateProc\fR; -} Tcl_ChannelType; + char *\fItypeName\fR; + Tcl_ChannelTypeVersion \fIversion\fR; + Tcl_DriverCloseProc *\fIcloseProc\fR; + Tcl_DriverInputProc *\fIinputProc\fR; + Tcl_DriverOutputProc *\fIoutputProc\fR; + Tcl_DriverSeekProc *\fIseekProc\fR; + Tcl_DriverSetOptionProc *\fIsetOptionProc\fR; + Tcl_DriverGetOptionProc *\fIgetOptionProc\fR; + Tcl_DriverWatchProc *\fIwatchProc\fR; + Tcl_DriverGetHandleProc *\fIgetHandleProc\fR; + Tcl_DriverClose2Proc *\fIclose2Proc\fR; + Tcl_DriverBlockModeProc *\fIblockModeProc\fR; + Tcl_DriverFlushProc *\fIflushProc\fR; + Tcl_DriverHandlerProc *\fIhandlerProc\fR; + Tcl_DriverTruncateProc *\fItruncateProc\fR; +} \fBTcl_ChannelType\fR; .CE .PP When the above structure is registered as a channel type, the \fIversion\fR field should always be \fBTCL_CHANNEL_VERSION_2\fR. - .SH "SEE ALSO" Tcl_Close(3), Tcl_OpenFileChannel(3), Tcl_SetErrno(3), Tcl_QueueEvent(3), Tcl_StackChannel(3), Tcl_GetStdChannel(3) - .SH KEYWORDS blocking, channel driver, channel registration, channel type, nonblocking diff --git a/doc/CrtChnlHdlr.3 b/doc/CrtChnlHdlr.3 index 790dcd3..5cb6b0c 100644 --- a/doc/CrtChnlHdlr.3 +++ b/doc/CrtChnlHdlr.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChnlHdlr.3,v 1.6 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CrtChnlHdlr.3,v 1.7 2008/06/29 22:28:23 dkf Exp $ .so man.macros .TH Tcl_CreateChannelHandler 3 7.5 Tcl "Tcl Library Procedures" .BS @@ -36,7 +36,6 @@ the conditions specified by \fImask\fR. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE - .SH DESCRIPTION .PP \fBTcl_CreateChannelHandler\fR arranges for \fIproc\fR to be called in the @@ -48,7 +47,7 @@ See the manual entry for \fBfileevent\fR for a precise description of what it means for a channel to be readable or writable. \fIProc\fR must conform to the following prototype: .CS -typedef void Tcl_ChannelProc( +typedef void \fBTcl_ChannelProc\fR( ClientData \fIclientData\fR, int \fImask\fR); .CE @@ -84,9 +83,7 @@ so that the channel is no longer readable when the second handler is invoked. For this reason it may be useful to use nonblocking I/O on channels for which there are event handlers. - .SH "SEE ALSO" Notifier(3), Tcl_CreateChannel(3), Tcl_OpenFileChannel(3), vwait(n). - .SH KEYWORDS blocking, callback, channel, events, handler, nonblocking. diff --git a/doc/CrtCloseHdlr.3 b/doc/CrtCloseHdlr.3 index 6d55d9d..4fe6c5c 100644 --- a/doc/CrtCloseHdlr.3 +++ b/doc/CrtCloseHdlr.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtCloseHdlr.3,v 1.3 2004/10/07 14:44:31 dkf Exp $ +'\" RCS: @(#) $Id: CrtCloseHdlr.3,v 1.4 2008/06/29 22:28:23 dkf Exp $ .so man.macros .TH Tcl_CreateCloseHandler 3 7.5 Tcl "Tcl Library Procedures" .BS @@ -30,7 +30,6 @@ The procedure to call as the callback. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE - .SH DESCRIPTION .PP \fBTcl_CreateCloseHandler\fR arranges for \fIproc\fR to be called when @@ -39,7 +38,7 @@ Arbitrary one-word value to pass to \fIproc\fR. \fIProc\fR should match the following prototype: .PP .CS -typedef void Tcl_CloseProc( +typedef void \fBTcl_CloseProc\fR( ClientData \fIclientData\fR); .CE .PP @@ -51,9 +50,7 @@ The \fIproc\fR and \fIclientData\fR identify which close callback to remove; \fBTcl_DeleteCloseHandler\fR does nothing if its \fIproc\fR and \fIclientData\fR arguments do not match the \fIproc\fR and \fIclientData\fR for a close handler for \fIchannel\fR. - .SH "SEE ALSO" close(n), Tcl_Close(3), Tcl_UnregisterChannel(3) - .SH KEYWORDS callback, channel closing diff --git a/doc/CrtCommand.3 b/doc/CrtCommand.3 index 17938af..d9aab23 100644 --- a/doc/CrtCommand.3 +++ b/doc/CrtCommand.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtCommand.3,v 1.14 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CrtCommand.3,v 1.15 2008/06/29 22:28:23 dkf Exp $ '\" .so man.macros .TH Tcl_CreateCommand 3 "" Tcl "Tcl Library Procedures" @@ -34,7 +34,6 @@ Procedure to call before \fIcmdName\fR is deleted from the interpreter; allows for command-specific cleanup. If NULL, then no procedure is called before the command is deleted. .BE - .SH DESCRIPTION .PP \fBTcl_CreateCommand\fR defines a new command in \fIinterp\fR and associates @@ -78,7 +77,7 @@ and it returns NULL. \fIProc\fR should have arguments and result that match the type \fBTcl_CmdProc\fR: .CS -typedef int Tcl_CmdProc( +typedef int \fBTcl_CmdProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, int \fIargc\fR, @@ -124,22 +123,21 @@ anywhere within the \fIargv\fR values. Call \fBTcl_SetResult\fR with status \fBTCL_VOLATILE\fR if you want to return something from the \fIargv\fR array. .PP -\fIDeleteProc\fR will be invoked when (if) \fIcmdName\fR is deleted. -This can occur through a call to \fBTcl_DeleteCommand\fR or \fBTcl_DeleteInterp\fR, +\fIDeleteProc\fR will be invoked when (if) \fIcmdName\fR is deleted. This can +occur through a call to \fBTcl_DeleteCommand\fR or \fBTcl_DeleteInterp\fR, or by replacing \fIcmdName\fR in another call to \fBTcl_CreateCommand\fR. \fIDeleteProc\fR is invoked before the command is deleted, and gives the application an opportunity to release any structures associated with the command. \fIDeleteProc\fR should have arguments and result that match the type \fBTcl_CmdDeleteProc\fR: .CS -typedef void Tcl_CmdDeleteProc( +typedef void \fBTcl_CmdDeleteProc\fR( ClientData \fIclientData\fR); .CE The \fIclientData\fR argument will be the same as the \fIclientData\fR argument passed to \fBTcl_CreateCommand\fR. - .SH "SEE ALSO" -Tcl_CreateObjCommand, Tcl_DeleteCommand, Tcl_GetCommandInfo, Tcl_SetCommandInfo, Tcl_GetCommandName, Tcl_SetObjResult - +Tcl_CreateObjCommand, Tcl_DeleteCommand, Tcl_GetCommandInfo, +Tcl_SetCommandInfo, Tcl_GetCommandName, Tcl_SetObjResult .SH KEYWORDS bind, command, create, delete, interpreter, namespace diff --git a/doc/CrtFileHdlr.3 b/doc/CrtFileHdlr.3 index e463c7c..4b352ba 100644 --- a/doc/CrtFileHdlr.3 +++ b/doc/CrtFileHdlr.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtFileHdlr.3,v 1.8 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CrtFileHdlr.3,v 1.9 2008/06/29 22:28:23 dkf Exp $ '\" .so man.macros .TH Tcl_CreateFileHandler 3 8.0 Tcl "Tcl Library Procedures" @@ -34,7 +34,6 @@ by \fIfile\fR meets the conditions specified by \fImask\fR. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE - .SH DESCRIPTION .PP \fBTcl_CreateFileHandler\fR arranges for \fIproc\fR to be @@ -52,7 +51,7 @@ as \fBvwait\fR. \fIProc\fR should have arguments and result that match the type \fBTcl_FileProc\fR: .CS -typedef void Tcl_FileProc( +typedef void \fBTcl_FileProc\fR( ClientData \fIclientData\fR, int \fImask\fR); .CE @@ -86,7 +85,6 @@ complete the application will not be able to service other events. Use blocking or nonblocking mode as required. .PP Note that these interfaces are only supported by the Unix -implementation of the Tcl notifier. - +implementation of the Tcl notifier. .SH KEYWORDS callback, file, handler diff --git a/doc/CrtMathFnc.3 b/doc/CrtMathFnc.3 index e238e50..3ad4a00 100644 --- a/doc/CrtMathFnc.3 +++ b/doc/CrtMathFnc.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.17 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.18 2008/06/29 22:28:23 dkf Exp $ '\" .so man.macros .TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures" @@ -59,7 +59,6 @@ created if the function is not implemented directly in bytecode. Pattern to match against function names so as to filter them (by passing to \fITcl_StringMatch\fR), or NULL to not apply any filter. .BE - .SH DESCRIPTION .PP Tcl allows a number of mathematical functions to be used in @@ -88,7 +87,7 @@ Whenever the function is invoked in an expression Tcl will invoke \fIproc\fR. \fIProc\fR should have arguments and result that match the type \fBTcl_MathProc\fR: .CS -typedef int Tcl_MathProc( +typedef int \fBTcl_MathProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, Tcl_Value *\fIargs\fR, @@ -101,11 +100,11 @@ arguments will be the same as those passed to \fBTcl_CreateMathFunc\fR. which describe the actual arguments to the function: .CS typedef struct Tcl_Value { - Tcl_ValueType \fItype\fR; - long \fIintValue\fR; - double \fIdoubleValue\fR; - Tcl_WideInt \fIwideValue\fR; -} Tcl_Value; + Tcl_ValueType \fItype\fR; + long \fIintValue\fR; + double \fIdoubleValue\fR; + Tcl_WideInt \fIwideValue\fR; +} \fBTcl_Value\fR; .CE .PP The \fItype\fR field indicates the type of the argument and is @@ -150,9 +149,7 @@ pointed to by \fIargTypesPointer\fR. \fBTcl_ListMathFuncs\fR returns a Tcl object containing a list of all the math functions defined in the interpreter whose name matches \fIpattern\fR. The returned object has a reference count of zero. - .SH "SEE ALSO" expr(n), info(n), Tcl_CreateObjCommand(3), Tcl_Free(3), Tcl_NewListObj(3) - .SH KEYWORDS expression, mathematical function diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3 index a32c410..2e30de9 100644 --- a/doc/CrtObjCmd.3 +++ b/doc/CrtObjCmd.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.17 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.18 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures" @@ -91,7 +91,7 @@ and it returns NULL. \fIproc\fR should have arguments and result that match the type \fBTcl_ObjCmdProc\fR: .CS -typedef int Tcl_ObjCmdProc( +typedef int \fBTcl_ObjCmdProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, int \fIobjc\fR, @@ -162,7 +162,7 @@ application an opportunity to release any structures associated with the command. \fIDeleteProc\fR should have arguments and result that match the type \fBTcl_CmdDeleteProc\fR: .CS -typedef void Tcl_CmdDeleteProc( +typedef void \fBTcl_CmdDeleteProc\fR( ClientData \fIclientData\fR); .CE The \fIclientData\fR argument will be the same as the \fIclientData\fR @@ -209,7 +209,7 @@ typedef struct Tcl_CmdInfo { Tcl_CmdDeleteProc *\fIdeleteProc\fR; ClientData \fIdeleteData\fR; Tcl_Namespace *\fInamespacePtr\fR; -} Tcl_CmdInfo; +} \fBTcl_CmdInfo\fR; .CE The \fIisNativeObjectProc\fR field has the value 1 if \fBTcl_CreateObjCommand\fR was called to register the command; @@ -294,6 +294,5 @@ The command name is resolved relative to the current namespace. Returns NULL if the command is not found. .SH "SEE ALSO" Tcl_CreateCommand, Tcl_ResetResult, Tcl_SetObjResult - .SH KEYWORDS bind, command, create, delete, namespace, object diff --git a/doc/CrtTimerHdlr.3 b/doc/CrtTimerHdlr.3 index 0559112..7e0368f 100644 --- a/doc/CrtTimerHdlr.3 +++ b/doc/CrtTimerHdlr.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtTimerHdlr.3,v 1.6 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: CrtTimerHdlr.3,v 1.7 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_CreateTimerHandler 3 7.5 Tcl "Tcl Library Procedures" @@ -32,7 +32,6 @@ Arbitrary one-word value to pass to \fIproc\fR. Token for previously created timer handler (the return value from some previous call to \fBTcl_CreateTimerHandler\fR). .BE - .SH DESCRIPTION .PP \fBTcl_CreateTimerHandler\fR arranges for \fIproc\fR to be @@ -52,7 +51,8 @@ are other pending events to process before the call to \fIProc\fR should have arguments and return value that match the type \fBTcl_TimerProc\fR: .CS -typedef void Tcl_TimerProc(ClientData \fIclientData\fR); +typedef void \fBTcl_TimerProc\fR( + ClientData \fIclientData\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to @@ -70,6 +70,5 @@ has been invoked then \fBTcl_DeleteTimerHandler\fR does nothing. The tokens returned by \fBTcl_CreateTimerHandler\fR never have a value of NULL, so if NULL is passed to \fBTcl_DeleteTimerHandler\fR then the procedure does nothing. - .SH KEYWORDS callback, clock, handler, timer diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3 index b1cadf6..1248619 100644 --- a/doc/CrtTrace.3 +++ b/doc/CrtTrace.3 @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtTrace.3,v 1.14 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: CrtTrace.3,v 1.15 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_CreateTrace 3 "" Tcl "Tcl Library Procedures" @@ -73,7 +73,7 @@ typedef int \fBTcl_CmdObjTraceProc\fR( const char *\fIcommand\fR, \fBTcl_Command\fR \fIcommandToken\fR, int \fIobjc\fR, - \fBTcl_Obj\fR *const \fIobjv\fR[] ); + \fBTcl_Obj\fR *const \fIobjv\fR[]); .CE The \fIclientData\fR and \fIinterp\fR parameters are copies of the corresponding arguments given to \fBTcl_CreateTrace\fR. @@ -156,7 +156,7 @@ Tcl interpreter. It is similar to \fBTcl_CreateObjTrace\fR, except that its \fIproc\fR parameter should have arguments and result that match the type \fBTcl_CmdTraceProc\fR: .CS -typedef void Tcl_CmdTraceProc( +typedef void \fBTcl_CmdTraceProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, int \fIlevel\fR, diff --git a/doc/DoWhenIdle.3 b/doc/DoWhenIdle.3 index e69316e..b75de55 100644 --- a/doc/DoWhenIdle.3 +++ b/doc/DoWhenIdle.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: DoWhenIdle.3,v 1.5 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: DoWhenIdle.3,v 1.6 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_DoWhenIdle 3 7.5 Tcl "Tcl Library Procedures" @@ -26,7 +26,6 @@ Procedure to invoke. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE - .SH DESCRIPTION .PP \fBTcl_DoWhenIdle\fR arranges for \fIproc\fR to be invoked @@ -44,7 +43,8 @@ use \fBTcl_DoOneEvent\fR to dispatch events. \fIProc\fR should have arguments and result that match the type \fBTcl_IdleProc\fR: .CS -typedef void Tcl_IdleProc(ClientData \fIclientData\fR); +typedef void \fBTcl_IdleProc\fR( + ClientData \fIclientData\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTcl_DoWhenIdle\fR. Typically, \fIclientData\fR @@ -81,6 +81,5 @@ continuously. This will interact badly with certain features of Tk that attempt to wait for all idle callbacks to complete. If you would like for an idle callback to reschedule itself continuously, it is better to use a timer handler with a zero timeout period. - .SH KEYWORDS callback, defer, idle callback diff --git a/doc/Encoding.3 b/doc/Encoding.3 index 51ef92f..a824b2f 100644 --- a/doc/Encoding.3 +++ b/doc/Encoding.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Encoding.3,v 1.29 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Encoding.3,v 1.30 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures" @@ -21,10 +21,8 @@ Tcl_Encoding void \fBTcl_FreeEncoding\fR(\fIencoding\fR) .sp -.VS 8.5 int \fBTcl_GetEncodingFromObj\fR(\fIinterp, objPtr, encodingPtr\fR) -.VE 8.5 .sp char * \fBTcl_ExternalToUtfDString\fR(\fIencoding, src, srcLen, dstPtr\fR) @@ -52,10 +50,8 @@ const char * int \fBTcl_SetSystemEncoding\fR(\fIinterp, name\fR) .sp -.VS 8.5 const char * \fBTcl_GetEncodingNameFromEnvironment\fR(\fIbufPtr\fR) -.VE 8.5 .sp void \fBTcl_GetEncodingNames\fR(\fIinterp\fR) @@ -63,13 +59,11 @@ void Tcl_Encoding \fBTcl_CreateEncoding\fR(\fItypePtr\fR) .sp -.VS 8.5 Tcl_Obj * \fBTcl_GetEncodingSearchPath\fR() .sp int \fBTcl_SetEncodingSearchPath\fR(\fIsearchPath\fR) -.VE 8.5 .sp const char * \fBTcl_GetDefaultEncodingDir\fR(\fIvoid\fR) @@ -87,13 +81,9 @@ Name of encoding to load. The encoding to query, free, or use for converting text. If \fIencoding\fR is NULL, the current system encoding is used. .AP Tcl_Obj *objPtr in -.VS 8.5 Name of encoding to get token for. -.VE 8.5 .AP Tcl_Encoding *encodingPtr out -.VS 8.5 Points to storage where encoding token is to be written. -.VE 8.5 .AP "const char" *src in For the \fBTcl_ExternalToUtf\fR functions, an array of bytes in the specified encoding that are to be converted to UTF-8. For the @@ -147,15 +137,11 @@ buffer as a result of the conversion. May be NULL. Filled with the number of characters that correspond to the number of bytes stored in the output buffer. May be NULL. .AP Tcl_DString *bufPtr out -.VS 8.5 Storage for the prescribed system encoding name. -.VE 8.5 .AP "const Tcl_EncodingType" *typePtr in Structure that defines a new type of encoding. .AP Tcl_Obj *searchPath in -.VS 8.5 List of filesystem directories in which to search for encoding data files. -.VE 8.5 .AP "const char" *path in A path to the location of the encoding file. .BE @@ -204,7 +190,6 @@ anywhere (i.e., it has been freed as many times as it has been gotten) \fBTcl_FreeEncoding\fR will release all storage the encoding was using and delete it from the database. .PP -.VS 8.5 \fBTcl_GetEncodingFromObj\fR treats the string representation of \fIobjPtr\fR as an encoding name, and finds an encoding with that name, just as \fBTcl_GetEncoding\fR does. When an encoding is found, @@ -216,7 +201,6 @@ writing to \fB*\fR\fIencodingPtr\fR takes place. Just as with \fBTcl_GetEncoding\fR, the caller should call \fBTcl_FreeEncoding\fR on the resulting encoding token when that token will no longer be used. -.VE 8.5 .PP \fBTcl_ExternalToUtfDString\fR converts a source buffer \fIsrc\fR from the specified \fIencoding\fR into UTF-8. The converted bytes are stored in @@ -331,14 +315,12 @@ procedure increments the reference count of the new system encoding, decrements the reference count of the old system encoding, and returns \fBTCL_OK\fR. .PP -.VS 8.5 \fBTcl_GetEncodingNameFromEnvironment\fR provides a means for the Tcl library to report the encoding name it believes to be the correct one to use as the system encoding, based on system calls and examination of the environment suitable for the platform. It accepts \fIbufPtr\fR, a pointer to an uninitialized or freed \fBTcl_DString\fR and writes the encoding name to it. The \fBTcl_DStringValue\fR is returned. -.VE 8.5 .PP \fBTcl_GetEncodingNames\fR sets the \fIinterp\fR result to a list consisting of the names of all the encodings that are currently defined @@ -366,13 +348,13 @@ convert between this encoding and UTF-8. It is defined as follows: .PP .CS typedef struct Tcl_EncodingType { - const char *\fIencodingName\fR; - Tcl_EncodingConvertProc *\fItoUtfProc\fR; - Tcl_EncodingConvertProc *\fIfromUtfProc\fR; - Tcl_EncodingFreeProc *\fIfreeProc\fR; - ClientData \fIclientData\fR; - int \fInullSize\fR; -} Tcl_EncodingType; + const char *\fIencodingName\fR; + Tcl_EncodingConvertProc *\fItoUtfProc\fR; + Tcl_EncodingConvertProc *\fIfromUtfProc\fR; + Tcl_EncodingFreeProc *\fIfreeProc\fR; + ClientData \fIclientData\fR; + int \fInullSize\fR; +} \fBTcl_EncodingType\fR; .CE .PP The \fIencodingName\fR provides a string name for the encoding, by @@ -400,7 +382,7 @@ The callback procedures \fItoUtfProc\fR and \fIfromUtfProc\fR should match the type \fBTcl_EncodingConvertProc\fR: .PP .CS -typedef int Tcl_EncodingConvertProc( +typedef int \fBTcl_EncodingConvertProc\fR( ClientData \fIclientData\fR, const char *\fIsrc\fR, int \fIsrcLen\fR, @@ -431,7 +413,7 @@ procedure will be a non-NULL location. The callback procedure \fIfreeProc\fR, if non-NULL, should match the type \fBTcl_EncodingFreeProc\fR: .CS -typedef void Tcl_EncodingFreeProc( +typedef void \fBTcl_EncodingFreeProc\fR( ClientData \fIclientData\fR); .CE .PP @@ -439,7 +421,6 @@ This \fIfreeProc\fR function is called when the encoding is deleted. The \fIclientData\fR parameter is the same as the \fIclientData\fR field specified to \fBTcl_CreateEncoding\fR when the encoding was created. .PP -.VS 8.5 \fBTcl_GetEncodingSearchPath\fR and \fBTcl_SetEncodingSearchPath\fR are called to access and set the list of filesystem directories searched for encoding data files. @@ -467,7 +448,6 @@ list. Since Tcl searches \fIsearchPath\fR for encoding data files in list order, these routines establish the .QW default directory in which to find encoding data files. -.VE 8.5 .SH "ENCODING FILES" Space would prohibit precompiling into Tcl every possible encoding algorithm, so many encodings are stored on disk as dynamically-loadable diff --git a/doc/Exit.3 b/doc/Exit.3 index a821ad1..082802c 100644 --- a/doc/Exit.3 +++ b/doc/Exit.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Exit.3,v 1.6 2003/09/29 21:47:38 dkf Exp $ +'\" RCS: @(#) $Id: Exit.3,v 1.7 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Exit 3 8.5 Tcl "Tcl Library Procedures" @@ -31,10 +31,8 @@ Tcl_Exit, Tcl_Finalize, Tcl_CreateExitHandler, Tcl_DeleteExitHandler, Tcl_ExitTh .sp \fBTcl_DeleteThreadExitHandler\fR(\fIproc, clientData\fR) .sp -.VS 8.5 Tcl_ExitProc * \fBTcl_SetExitProc\fR(\fIproc\fR) -.VE 8.5 .SH ARGUMENTS .AS Tcl_ExitProc clientData .AP int status in @@ -66,12 +64,10 @@ otherwise causes the application to terminate without calling \fBTcl_Exit\fR, the exit handlers will not be run. \fBTcl_Exit\fR internally invokes the \fBexit\fR system call, thus it never returns control to its caller. -.VS 8.5 If an application exit handler has been installed (see \fBTcl_SetExitProc\fR), that handler is invoked with an argument consisting of the exit status (cast to ClientData); the application exit handler should not return control to Tcl. -.VE 8.5 .PP \fBTcl_Finalize\fR is similar to \fBTcl_Exit\fR except that it does not exit from the current process. @@ -101,7 +97,8 @@ This provides a hook for cleanup operations such as flushing buffers and freeing global memory. \fIProc\fR should match the type \fBTcl_ExitProc\fR: .CS -typedef void Tcl_ExitProc(ClientData \fIclientData\fR); +typedef void \fBTcl_ExitProc\fR( + ClientData \fIclientData\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to @@ -118,7 +115,6 @@ indicated by \fIproc\fR and \fIclientData\fR so that no call to \fIproc\fR will be made. If no such handler exists then \fBTcl_DeleteExitHandler\fR or \fBTcl_DeleteThreadExitHandler\fR does nothing. .PP -.PP \fBTcl_Finalize\fR and \fBTcl_Exit\fR execute all registered exit handlers, in reverse order from the order in which they were registered. This matches the natural order in which extensions are loaded and unloaded; @@ -134,7 +130,6 @@ the process-wide exit handlers. This is because thread finalization shuts down the I/O channel system, so any attempt at I/O by the global exit handlers will vanish into the bitbucket. .PP -.VS 8.5 \fBTcl_SetExitProc\fR installs an application exit handler, returning the previously-installed application exit handler or NULL if no application handler was installed. If an application exit handler is @@ -143,7 +138,7 @@ finalization of Tcl's subsystems via \fBTcl_Finalize\fR at an appropriate time. The argument passed to \fIproc\fR when it is invoked will be the exit status code (as passed to \fBTcl_Exit\fR) cast to a ClientData value. -.VE 8.5 - +.SH "SEE ALSO" +exit(n) .SH KEYWORDS callback, cleanup, dynamic loading, end application, exit, unloading, thread diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index d97266d..bf38dc2 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.62 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.63 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -27,7 +27,7 @@ ClientData void \fBTcl_FSMountsChanged\fR(\fIfsPtr\fR) .sp -Tcl_Filesystem* +Tcl_Filesystem * \fBTcl_FSGetFileSystemForPath\fR(\fIpathPtr\fR) .sp Tcl_PathType @@ -51,13 +51,11 @@ int int \fBTcl_FSRenameFile\fR(\fIsrcPathPtr, destPathPtr\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSListVolumes\fR(\fIvoid\fR) .sp -.VS 8.5 int \fBTcl_FSEvalFileEx\fR(\fIinterp, pathPtr, encodingName\fR) -.VE 8.5 .sp int \fBTcl_FSEvalFile\fR(\fIinterp, pathPtr\fR) @@ -69,7 +67,7 @@ int int \fBTcl_FSMatchInDirectory\fR(\fIinterp, resultPtr, pathPtr, pattern, types\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSLink\fR(\fIlinkNamePtr, toPtr, linkAction\fR) .sp int @@ -84,7 +82,7 @@ int int \fBTcl_FSFileAttrsSet\fR(\fIinterp, int index, pathPtr, Tcl_Obj *objPtr\fR) .sp -const char** +const char ** \fBTcl_FSFileAttrStrings\fR(\fIpathPtr, objPtrRef\fR) .sp int @@ -96,28 +94,28 @@ int Tcl_Channel \fBTcl_FSOpenFileChannel\fR(\fIinterp, pathPtr, modeString, permissions\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSGetCwd\fR(\fIinterp\fR) .sp int \fBTcl_FSChdir\fR(\fIpathPtr\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSPathSeparator\fR(\fIpathPtr\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSJoinPath\fR(\fIlistObj, elements\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSSplitPath\fR(\fIpathPtr, lenPtr\fR) .sp int \fBTcl_FSEqualPaths\fR(\fIfirstPtr, secondPtr\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSGetNormalizedPath\fR(\fIinterp, pathPtr\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSJoinToPath\fR(\fIbasePtr, objc, objv\fR) .sp int @@ -132,16 +130,16 @@ Tcl_Obj * const char * \fBTcl_FSGetTranslatedStringPath\fR(\fIinterp, pathPtr\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSNewNativePath\fR(\fIfsPtr, clientData\fR) .sp const char * \fBTcl_FSGetNativePath\fR(\fIpathPtr\fR) .sp -Tcl_Obj* +Tcl_Obj * \fBTcl_FSFileSystemInfo\fR(\fIpathPtr\fR) .sp -Tcl_StatBuf* +Tcl_StatBuf * \fBTcl_AllocStatBuf\fR() .SH ARGUMENTS .AS Tcl_FSUnloadFileProc **unloadProcPtr out @@ -242,7 +240,6 @@ are \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR. When both flags are set and the underlying filesystem can do either, symbolic links are preferred. .BE - .SH DESCRIPTION .PP There are several reasons for calling the \fBTcl_FS\fR API functions @@ -368,7 +365,6 @@ function and asks them to return their list of root volumes. It accumulates the return values in a list which is returned to the caller (with a reference count of 0). .PP -.VS 8.5 \fBTcl_FSEvalFileEx\fR reads the file given by \fIpathPtr\fR using the encoding identified by \fIencodingName\fR and evaluates its contents as a Tcl script. It returns the same information as @@ -391,7 +387,6 @@ which will be safely substituted by the Tcl interpreter into \fBTcl_FSEvalFile\fR is a simpler version of \fBTcl_FSEvalFileEx\fR that always uses the system encoding when reading the file. -.VE 8.5 .PP \fBTcl_FSLoadFile\fR dynamically loads a binary code file into memory and returns the addresses of two procedures within that file, if they are @@ -801,7 +796,7 @@ typedef struct Tcl_Filesystem { Tcl_FSLoadFileProc *\fIloadFileProc\fR; Tcl_FSGetCwdProc *\fIgetCwdProc\fR; Tcl_FSChdirProc *\fIchdirProc\fR; -} Tcl_Filesystem; +} \fBTcl_Filesystem\fR; .CE .PP Except for the first three fields in this structure which contain @@ -930,7 +925,7 @@ are invalidated when filesystem structures are added or removed from Tcl's internal list of known filesystems. .PP .CS -typedef int Tcl_FSPathInFilesystemProc( +typedef int \fBTcl_FSPathInFilesystemProc\fR( Tcl_Obj *\fIpathPtr\fR, ClientData *\fIclientDataPtr\fR); .CE @@ -942,7 +937,7 @@ simply not copy the internal representation, which may then need to be regenerated later. .PP .CS -typedef ClientData Tcl_FSDupInternalRepProc( +typedef ClientData \fBTcl_FSDupInternalRepProc\fR( ClientData \fIclientData\fR); .CE .SS FREEINTERNALREPPROC @@ -951,7 +946,7 @@ representations need freeing (i.e. if some memory is allocated when an internal representation is generated), but may otherwise be NULL. .PP .CS -typedef void Tcl_FSFreeInternalRepProc( +typedef void \fBTcl_FSFreeInternalRepProc\fR( ClientData \fIclientData\fR); .CE .SS INTERNALTONORMALIZEDPROC @@ -962,7 +957,7 @@ representation. The return value is a Tcl object whose string representation is the normalized path. .PP .CS -typedef Tcl_Obj* Tcl_FSInternalToNormalizedProc( +typedef Tcl_Obj *\fBTcl_FSInternalToNormalizedProc\fR( ClientData \fIclientData\fR); .CE .SS CREATEINTERNALREPPROC @@ -974,7 +969,7 @@ the \fITcl_FSPathInFilesystemProc\fR for this filesystem always immediately creates an internal representation for paths it accepts. .PP .CS -typedef ClientData Tcl_FSCreateInternalRepProc( +typedef ClientData \fBTcl_FSCreateInternalRepProc\fR( Tcl_Obj *\fIpathPtr\fR); .CE .SS NORMALIZEPATHPROC @@ -1006,7 +1001,7 @@ the three valid cases, the implementation can assume that the path up to and including the file separator is known and normalized. .PP .CS -typedef int Tcl_FSNormalizePathProc( +typedef int \fBTcl_FSNormalizePathProc\fR( Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIpathPtr\fR, int \fInextCheckpoint\fR); @@ -1041,7 +1036,7 @@ increment the refCount of that object if it wishes to retain a reference to it. .PP .CS -typedef Tcl_Obj* Tcl_FSFilesystemPathTypeProc( +typedef Tcl_Obj *\fBTcl_FSFilesystemPathTypeProc\fR( Tcl_Obj *\fIpathPtr\fR); .CE .SS FILESYSTEMSEPARATORPROC @@ -1055,7 +1050,7 @@ uses, it is returned by the \fBfile separator\fR command. The return value should be an object with refCount of zero. .PP .CS -typedef Tcl_Obj* Tcl_FSFilesystemSeparatorProc( +typedef Tcl_Obj *\fBTcl_FSFilesystemSeparatorProc\fR( Tcl_Obj *\fIpathPtr\fR); .CE .SS STATPROC @@ -1066,7 +1061,7 @@ upon it (e.g. \fBfile atime\fR, \fBfile isdirectory\fR, \fBfile size\fR, \fBglob\fR). .PP .CS -typedef int Tcl_FSStatProc( +typedef int \fBTcl_FSStatProc\fR( Tcl_Obj *\fIpathPtr\fR, Tcl_StatBuf *\fIstatPtr\fR); .CE @@ -1091,7 +1086,7 @@ any reasonable filesystem, since many Tcl level commands depend crucially upon it (e.g. \fBfile exists\fR, \fBfile readable\fR). .PP .CS -typedef int Tcl_FSAccessProc( +typedef int \fBTcl_FSAccessProc\fR( Tcl_Obj *\fIpathPtr\fR, int \fImode\fR); .CE @@ -1113,7 +1108,7 @@ which require open or accessing a file's contents will use it (e.g. \fBopen\fR, \fBencoding\fR, and many Tk commands). .PP .CS -typedef Tcl_Channel Tcl_FSOpenFileChannelProc( +typedef Tcl_Channel \fBTcl_FSOpenFileChannelProc\fR( Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIpathPtr\fR, int \fImode\fR, @@ -1146,8 +1141,8 @@ in the filesystem (and this may impact commands like \fBencoding names\fR which use glob functionality internally). .PP .CS -typedef int Tcl_FSMatchInDirectoryProc( - Tcl_Interp* \fIinterp\fR, +typedef int \fBTcl_FSMatchInDirectoryProc\fR( + Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIresultPtr\fR, Tcl_Obj *\fIpathPtr\fR, const char *\fIpattern\fR, @@ -1182,15 +1177,15 @@ The \fBTcl_GlobTypeData\fR structure passed in the \fItypes\fR parameter contains the following fields: .CS typedef struct Tcl_GlobTypeData { - /* Corresponds to bcdpfls as in 'find -t' */ - int \fItype\fR; - /* Corresponds to file permissions */ - int \fIperm\fR; - /* Acceptable mac type */ - Tcl_Obj *\fImacType\fR; - /* Acceptable mac creator */ - Tcl_Obj *\fImacCreator\fR; -} Tcl_GlobTypeData; + /* Corresponds to bcdpfls as in 'find -t' */ + int \fItype\fR; + /* Corresponds to file permissions */ + int \fIperm\fR; + /* Acceptable mac type */ + Tcl_Obj *\fImacType\fR; + /* Acceptable mac creator */ + Tcl_Obj *\fImacCreator\fR; +} \fBTcl_GlobTypeData\fR; .CE .PP There are two specific cases which it is important to handle correctly, @@ -1212,7 +1207,7 @@ Function to process a \fBTcl_FSUtime\fR call. Required to allow setting open-r/open-w/fcopy implementation of \fBfile copy\fR. .PP .CS -typedef int Tcl_FSUtimeProc( +typedef int \fBTcl_FSUtimeProc\fR( Tcl_Obj *\fIpathPtr\fR, struct utimbuf *\fItval\fR); .CE @@ -1228,7 +1223,7 @@ Function to process a \fBTcl_FSLink\fR call. Should be implemented only if the filesystem supports links, and may otherwise be NULL. .PP .CS -typedef Tcl_Obj* Tcl_FSLinkProc( +typedef Tcl_Obj *\fBTcl_FSLinkProc\fR( Tcl_Obj *\fIlinkNamePtr\fR, Tcl_Obj *\fItoPtr\fR, int \fIlinkAction\fR); @@ -1253,7 +1248,7 @@ Should be implemented only if the filesystem adds volumes at the head of the filesystem, so that they can be returned by \fBfile volumes\fR. .PP .CS -typedef Tcl_Obj* Tcl_FSListVolumesProc(void); +typedef Tcl_Obj *\fBTcl_FSListVolumesProc\fR(void); .CE .PP The result should be a list of volumes added by this filesystem, or @@ -1281,9 +1276,9 @@ not implemented, there is no need to implement the \fBget\fR and \fBset\fR methods. .PP .CS -typedef const char** Tcl_FSFileAttrStringsProc( +typedef const char **\fBTcl_FSFileAttrStringsProc\fR( Tcl_Obj *\fIpathPtr\fR, - Tcl_Obj** \fIobjPtrRef\fR); + Tcl_Obj **\fIobjPtrRef\fR); .CE .PP The called function may either return an array of strings, or may @@ -1300,7 +1295,7 @@ Function to process a \fBTcl_FSFileAttrsGet\fR call, used by \fBfile attributes\fR. .PP .CS -typedef int Tcl_FSFileAttrsGetProc( +typedef int \fBTcl_FSFileAttrsGetProc\fR( Tcl_Interp *\fIinterp\fR, int \fIindex\fR, Tcl_Obj *\fIpathPtr\fR, @@ -1320,7 +1315,7 @@ attributes\fR. If the filesystem is read-only, there is no need to implement this. .PP .CS -typedef int Tcl_FSFileAttrsSetProc( +typedef int \fBTcl_FSFileAttrsSetProc\fR( Tcl_Interp *\fIinterp\fR, int \fIindex\fR, Tcl_Obj *\fIpathPtr\fR, @@ -1335,7 +1330,7 @@ Function to process a \fBTcl_FSCreateDirectory\fR call. Should be implemented unless the FS is read-only. .PP .CS -typedef int Tcl_FSCreateDirectoryProc( +typedef int \fBTcl_FSCreateDirectoryProc\fR( Tcl_Obj *\fIpathPtr\fR); .CE .PP @@ -1349,7 +1344,7 @@ Function to process a \fBTcl_FSRemoveDirectory\fR call. Should be implemented unless the FS is read-only. .PP .CS -typedef int Tcl_FSRemoveDirectoryProc( +typedef int \fBTcl_FSRemoveDirectoryProc\fR( Tcl_Obj *\fIpathPtr\fR, int \fIrecursive\fR, Tcl_Obj **\fIerrorPtr\fR); @@ -1371,7 +1366,7 @@ Function to process a \fBTcl_FSDeleteFile\fR call. Should be implemented unless the FS is read-only. .PP .CS -typedef int Tcl_FSDeleteFileProc( +typedef int \fBTcl_FSDeleteFileProc\fR( Tcl_Obj *\fIpathPtr\fR); .CE .PP @@ -1394,7 +1389,7 @@ it need only be implemented if a filesystem can differentiate between \fBstat\fR and \fBlstat\fR calls. .PP .CS -typedef int Tcl_FSLstatProc( +typedef int \fBTcl_FSLstatProc\fR( Tcl_Obj *\fIpathPtr\fR, Tcl_StatBuf *\fIstatPtr\fR); .CE @@ -1412,7 +1407,7 @@ Therefore it need only be implemented if the filesystem can perform that action more efficiently. .PP .CS -typedef int Tcl_FSCopyFileProc( +typedef int \fBTcl_FSCopyFileProc\fR( Tcl_Obj *\fIsrcPathPtr\fR, Tcl_Obj *\fIdestPathPtr\fR); .CE @@ -1437,7 +1432,7 @@ only be implemented if the filesystem can perform that action more efficiently. .PP .CS -typedef int Tcl_FSRenameFileProc( +typedef int \fBTcl_FSRenameFileProc\fR( Tcl_Obj *\fIsrcPathPtr\fR, Tcl_Obj *\fIdestPathPtr\fR); .CE @@ -1455,7 +1450,7 @@ mechanism. Therefore it need only be implemented if the filesystem can perform that action more efficiently. .PP .CS -typedef int Tcl_FSCopyDirectoryProc( +typedef int \fBTcl_FSCopyDirectoryProc\fR( Tcl_Obj *\fIsrcPathPtr\fR, Tcl_Obj *\fIdestPathPtr\fR, Tcl_Obj **\fIerrorPtr\fR); @@ -1482,7 +1477,7 @@ return \fBTCL_ERROR\fR to disable load functionality in this filesystem entirely. .PP .CS -typedef int Tcl_FSLoadFileProc( +typedef int \fBTcl_FSLoadFileProc\fR( Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIpathPtr\fR, Tcl_LoadHandle *\fIhandlePtr\fR, @@ -1510,7 +1505,7 @@ implemented, then this should also be implemented, if there is any cleanup action required. .PP .CS -typedef void Tcl_FSUnloadFileProc( +typedef void \fBTcl_FSUnloadFileProc\fR( Tcl_LoadHandle \fIloadHandle\fR); .CE .SS GETCWDPROC @@ -1520,7 +1515,7 @@ implement this. It will usually only be called once, if \fBgetcwd\fR is called before \fBchdir\fR. May be NULL. .PP .CS -typedef Tcl_Obj* Tcl_FSGetCwdProc( +typedef Tcl_Obj *\fBTcl_FSGetCwdProc\fR( Tcl_Interp *\fIinterp\fR); .CE .PP @@ -1543,7 +1538,7 @@ Real filesystems should carry out the correct action (i.e. call the correct system \fBchdir\fR API). .PP .CS -typedef int Tcl_FSChdirProc( +typedef int \fBTcl_FSChdirProc\fR( Tcl_Obj *\fIpathPtr\fR); .CE .PP diff --git a/doc/GetTime.3 b/doc/GetTime.3 index d932e47..c3f7134 100644 --- a/doc/GetTime.3 +++ b/doc/GetTime.3 @@ -21,27 +21,21 @@ Tcl_GetTime, Tcl_SetTimeProc, Tcl_QueryTimeProc \- get date and time .sp \fBTcl_QueryTimeProc\fR(\fIgetProcPtr, scaleProcPtr, clientDataPtr\fR) .SH ARGUMENTS -.AS "Tcl_Time *" timePtr out -.AP "Tcl_Time *" timePtr out +.AS Tcl_GetTimeProc *getProc in +.AP Tcl_Time *timePtr out Points to memory in which to store the date and time information. -.AS "Tcl_GetTimeProc *" getProc in -.AP "Tcl_GetTimeProc *" getProc in +.AP Tcl_GetTimeProc getProc in Pointer to handler function replacing \fBTcl_GetTime\fR's access to the OS. -.AS "Tcl_ScaleTimeProc *" scaleProc in -.AP "Tcl_ScaleTimeProc *" scaleProc in +.AP Tcl_ScaleTimeProc scaleProc in Pointer to handler function for the conversion of time delays in the virtual domain to real-time. -.AS "ClientData *" clientData in -.AP "ClientData *" clientData in +.AP ClientData clientData in Value passed through to the two handler functions. -.AS "Tcl_GetTimeProc **" getProcPtr inout -.AP "Tcl_GetTimeProc **" getProcPtr inout +.AP Tcl_GetTimeProc *getProcPtr out Pointer to place the currently registered get handler function into. -.AS "Tcl_ScaleTimeProc **" scaleProcPtr inout -.AP "Tcl_ScaleTimeProc **" scaleProcPtr inout +.AP Tcl_ScaleTimeProc *scaleProcPtr out Pointer to place the currently registered scale handler function into. -.AS "ClientData **" clientDataPtr inout -.AP "ClientData **" clientDataPtr inout +.AP ClientData *clientDataPtr out Pointer to place the currently registered pass-through value into. .BE .SH DESCRIPTION @@ -53,7 +47,7 @@ structure has the following definition: typedef struct Tcl_Time { long sec; long usec; -} Tcl_Time; +} \fBTcl_Time\fR; .CE .PP On return, the \fIsec\fR member of the structure is filled in with the @@ -70,20 +64,34 @@ computer system. On multiprocessor variants of Windows, this number may be limited to the 10- or 20-ms granularity of the system clock. (On single-processor Windows systems, the \fIusec\fR field is derived from a performance counter and is highly precise.) +.SS "VIRTUALIZED TIME" .PP -The \fBTcl_SetTime\fR function registers two related handler functions +The \fBTcl_SetTimeProc\fR function registers two related handler functions with the core. The first handler function is a replacement for \fBTcl_GetTime\fR, or rather the OS access made by \fBTcl_GetTime\fR. The other handler function is used by the Tcl notifier to convert wait/block times from the virtual domain into real time. .PP -The \fBTcl_QueryTime\fR function returns the currently registered +The \fBTcl_QueryTimeProc\fR function returns the currently registered handler functions. If no external handlers were set then this will return the standard handlers accessing and processing the native time of the OS. The arguments to the function are allowed to be NULL; and any argument which is NULL is ignored and not set. .PP +The signatures of the handler functions are as follows: +.CS +typedef void \fBTcl_GetTimeProc\fR( + Tcl_Time *\fItimebuf\fR, + ClientData \fIclientData\fR); +typedef void \fBTcl_ScaleTimeProc\fR( + Tcl_Time *\fItimebuf\fR, + ClientData \fIclientData\fR); +.CE +The \fItimebuf\fR fields contain the time to manipulate, and the +\fIclientData\fR fields contain a pointer supplied at the time the +handler functions were registered. +.PP Any handler pair specified has to return data which is consistent between them. In other words, setting one handler of the pair to something assuming a 10-times slowdown, and the other handler of the @@ -97,6 +105,6 @@ time one way or other. Note that the insertion of the hooks will not change the behaviour of the Tcl core with regard to this situation, i.e. the existing behaviour is retained. .SH "SEE ALSO" -clock +clock(n) .SH KEYWORDS date, time diff --git a/doc/Hash.3 b/doc/Hash.3 index 0bd3315..10d0d63 100644 --- a/doc/Hash.3 +++ b/doc/Hash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Hash.3,v 1.26 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Hash.3,v 1.27 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures" @@ -255,7 +255,7 @@ typedef struct Tcl_HashKeyType { Tcl_CompareHashKeysProc *\fIcompareKeysProc\fR; Tcl_AllocHashEntryProc *\fIallocEntryProc\fR; Tcl_FreeHashEntryProc *\fIfreeEntryProc\fR; -} Tcl_HashKeyType; +} \fBTcl_HashKeyType\fR; .CE .PP The \fIversion\fR member is the version of the table. If this structure is @@ -270,7 +270,6 @@ they do not use the lower bits. If this flag is set then the hash table will attempt to rectify this by randomizing the bits and then using the upper N bits as the index into the table. .IP \fBTCL_HASH_KEY_SYSTEM_HASH\fR 25 -.VS 8.5 This flag forces Tcl to use the memory allocation procedures provided by the operating system when allocating and freeing memory used to store the hash table data structures, and not any of Tcl's own customized memory allocation @@ -278,12 +277,11 @@ routines. This is important if the hash table is to be used in the implementation of a custom set of allocation routines, or something that a custom set of allocation routines might depend on, in order to avoid any circular dependency. -.VE 8.5 .PP The \fIhashKeyProc\fR member contains the address of a function called to calculate a hash value for the key. .CS -typedef unsigned int (Tcl_HashKeyProc) ( +typedef unsigned int \fBTcl_HashKeyProc\fR( Tcl_HashTable *\fItablePtr\fR, void *\fIkeyPtr\fR); .CE @@ -293,7 +291,7 @@ If this is NULL then \fIkeyPtr\fR is used and The \fIcompareKeysProc\fR member contains the address of a function called to compare two keys. .CS -typedef int (Tcl_CompareHashKeysProc) ( +typedef int \fBTcl_CompareHashKeysProc\fR( void *\fIkeyPtr\fR, Tcl_HashEntry *\fIhPtr\fR); .CE @@ -303,7 +301,7 @@ not match then the function returns 0, otherwise it returns 1. The \fIallocEntryProc\fR member contains the address of a function called to allocate space for an entry and initialize the key and clientData. .CS -typedef Tcl_HashEntry *(Tcl_AllocHashEntryProc) ( +typedef Tcl_HashEntry *\fBTcl_AllocHashEntryProc\fR( Tcl_HashTable *\fItablePtr\fR, void *\fIkeyPtr\fR); .CE @@ -319,7 +317,8 @@ object. The \fIfreeEntryProc\fR member contains the address of a function called to free space for an entry. .CS -typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *\fIhPtr\fR); +typedef void \fBTcl_FreeHashEntryProc\fR( + Tcl_HashEntry *\fIhPtr\fR); .CE If this is NULL then Tcl_Free is used to free the space for the entry. Tcl_Obj* keys use this function to decrement the reference count on the diff --git a/doc/IntObj.3 b/doc/IntObj.3 index 48caf5d..bad5dd0 100644 --- a/doc/IntObj.3 +++ b/doc/IntObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: IntObj.3,v 1.15 2008/06/27 19:55:46 dgp Exp $ +'\" RCS: @(#) $Id: IntObj.3,v 1.16 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_IntObj 3 8.5 Tcl "Tcl Library Procedures" @@ -40,7 +40,6 @@ int \fBTcl_GetWideIntFromObj\fR(\fIinterp, objPtr, widePtr\fR) .sp .sp -.VS 8.5 \fB#include \fR .sp Tcl_Obj * @@ -56,7 +55,6 @@ int .sp int \fBTcl_InitBignumFromDouble\fR(\fIinterp, doubleValue, bigValue\fR) -.VE 8.5 .SH ARGUMENTS .AS Tcl_WideInt doubleValue in/out .AP int intValue in @@ -82,20 +80,14 @@ Points to place to store the long integer value retrieved from \fIobjPtr\fR. .AP Tcl_WideInt *widePtr out Points to place to store the wide integer value retrieved from \fIobjPtr\fR. .AP mp_int *bigValue in/out -.VS 8.5 Points to a multi-precision integer structure declared by the LibTomMath library. -.VE 8.5 .AP double doubleValue in -.VS 8.5 Double value from which the integer part is determined and used to initialize a multi-precision integer value. -.VE 8.5 .BE - .SH DESCRIPTION .PP -.VS 8.5 These procedures are used to create, modify, and read Tcl objects that hold integral values. .PP @@ -155,7 +147,6 @@ If anything later in the caller requires The \fBTcl_InitBignumFromDouble\fR routine is a utility procedure that extracts the integer part of \fIdoubleValue\fR and stores that integer value in the \fBmp_int\fR value \fIbigValue\fR. -.VE 8.5 .SH "SEE ALSO" Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult .SH KEYWORDS diff --git a/doc/Interp.3 b/doc/Interp.3 index 362c80b..29c2c65 100644 --- a/doc/Interp.3 +++ b/doc/Interp.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Interp.3,v 1.13 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Interp.3,v 1.14 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Interp 3 7.5 Tcl "Tcl Library Procedures" @@ -17,14 +17,14 @@ Tcl_Interp \- client-visible fields of interpreter structures \fB#include \fR .sp typedef struct { - char *\fIresult\fR; - Tcl_FreeProc *\fIfreeProc\fR; - int \fIerrorLine\fR; -} Tcl_Interp; + char *\fIresult\fR; + Tcl_FreeProc *\fIfreeProc\fR; + int \fIerrorLine\fR; +} \fBTcl_Interp\fR; -typedef void Tcl_FreeProc(char *\fIblockPtr\fR); +typedef void \fBTcl_FreeProc\fR( + char *\fIblockPtr\fR); .BE - .SH DESCRIPTION .PP The \fBTcl_CreateInterp\fR procedure returns a pointer to a Tcl_Interp @@ -34,11 +34,9 @@ on the interpreter. Interpreter structures contain many fields that are used by Tcl, but only three that may be accessed by clients: \fIresult\fR, \fIfreeProc\fR, and \fIerrorLine\fR. .PP -.VS 8.5 \fBNote that access to all three fields, \fIresult\fB, \fIfreeProc\fB and \fIerrorLine\fB is deprecated.\fR Use \fBTcl_SetResult\fR, \fBTcl_GetResult\fR, and \fBTcl_GetReturnOptions\fR instead. -.VE 8.5 .PP The \fIresult\fR and \fIfreeProc\fR fields are used to return results or error messages from commands. diff --git a/doc/Limit.3 b/doc/Limit.3 index 002b422..425e41f 100644 --- a/doc/Limit.3 +++ b/doc/Limit.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Limit.3,v 1.7 2004/11/12 09:01:25 das Exp $ +'\" RCS: @(#) $Id: Limit.3,v 1.8 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_LimitCheck 3 8.5 Tcl "Tcl Library Procedures" @@ -92,7 +92,6 @@ Arbitrary pointer-sized word used to pass some context to the Function to call whenever a handler is deleted. May be NULL if the \fIclientData\fR requires no deletion. .BE - .SH DESCRIPTION .PP Tcl's interpreter resource limit subsystem allows for close control @@ -164,7 +163,7 @@ the function that will actually be called; it should have the following prototype: .PP .CS -typedef void Tcl_LimitHandlerProc( +typedef void \fBTcl_LimitHandlerProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR); .CE @@ -181,7 +180,7 @@ function to call to delete the \fIclientData\fR value. It may be following prototype: .PP .CS -typedef void Tcl_LimitHandlerDeleteProc( +typedef void \fBTcl_LimitHandlerDeleteProc\fR( ClientData \fIclientData\fR); .CE .PP @@ -191,6 +190,5 @@ with \fBTcl_LimitAddHandler\fR) with exactly matching \fItype\fR, \fIhandlerProc\fR and \fIclientData\fR arguments. This function always invokes the \fIdeleteProc\fR on the \fIclientData\fR (unless the \fIdeleteProc\fR was NULL or \fBTCL_STATIC\fR). - .SH KEYWORDS interpreter, resource, limit, commands, time, callback diff --git a/doc/LinkVar.3 b/doc/LinkVar.3 index 6f183f8..ad6d5f6 100644 --- a/doc/LinkVar.3 +++ b/doc/LinkVar.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: LinkVar.3,v 1.16 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: LinkVar.3,v 1.17 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures" @@ -33,20 +33,14 @@ Name of global variable. Address of C variable that is to be linked to \fIvarName\fR. .AP int type in Type of C variable. Must be one of \fBTCL_LINK_INT\fR, -.VS 8.5 \fBTCL_LINK_UINT\fR, \fBTCL_LINK_CHAR\fR, \fBTCL_LINK_UCHAR\fR, \fBTCL_LINK_SHORT\fR, \fBTCL_LINK_USHORT\fR, \fBTCL_LINK_LONG\fR, -\fBTCL_LINK_ULONG\fR, -.VE 8.5 -\fBTCL_LINK_WIDE_INT\fR, -.VS 8.5 +\fBTCL_LINK_ULONG\fR, \fBTCL_LINK_WIDE_INT\fR, \fBTCL_LINK_WIDE_UINT\fR, \fBTCL_LINK_FLOAT\fR, -.VE 8.5 \fBTCL_LINK_DOUBLE\fR, \fBTCL_LINK_BOOLEAN\fR, or \fBTCL_LINK_STRING\fR, optionally OR'ed with \fBTCL_LINK_READ_ONLY\fR to make Tcl variable read-only. .BE - .SH DESCRIPTION .PP \fBTcl_LinkVar\fR uses variable traces to keep the Tcl variable @@ -70,7 +64,6 @@ Any value written into the Tcl variable must have a proper integer form acceptable to \fBTcl_GetIntFromObj\fR; attempts to write non-integer values into \fIvarName\fR will be rejected with Tcl errors. -.VS 8.5 .TP \fBTCL_LINK_UINT\fR The C variable is of type \fBunsigned int\fR. @@ -124,7 +117,6 @@ integer form acceptable to \fBTcl_GetWideIntFromObj\fR and in the platform's defined range for the \fBunsigned long\fR type; attempts to write non-integer values (or values outside the range) into \fIvarName\fR will be rejected with Tcl errors. -.VE 8.5 .TP \fBTCL_LINK_DOUBLE\fR The C variable is of type \fBdouble\fR. @@ -132,7 +124,6 @@ Any value written into the Tcl variable must have a proper real form acceptable to \fBTcl_GetDoubleFromObj\fR; attempts to write non-real values into \fIvarName\fR will be rejected with Tcl errors. -.VS 8.5 .TP \fBTCL_LINK_FLOAT\fR The C variable is of type \fBfloat\fR. @@ -141,7 +132,6 @@ form acceptable to \fBTcl_GetDoubleFromObj\fR and must be within the range acceptable for a \fBfloat\fR; attempts to write non-real values (or values outside the range) into \fIvarName\fR will be rejected with Tcl errors. -.VE 8.5 .TP \fBTCL_LINK_WIDE_INT\fR The C variable is of type \fBTcl_WideInt\fR (which is an integer type @@ -150,7 +140,6 @@ Any value written into the Tcl variable must have a proper integer form acceptable to \fBTcl_GetWideIntFromObj\fR; attempts to write non-integer values into \fIvarName\fR will be rejected with Tcl errors. -.VS 8.5 .TP \fBTCL_LINK_WIDE_UINT\fR The C variable is of type \fBTcl_WideUInt\fR (which is an unsigned @@ -162,7 +151,6 @@ cast to unsigned); .\" FIXME! Use bignums instead. attempts to write non-integer values into \fIvarName\fR will be rejected with Tcl errors. -.VE 8.5 .TP \fBTCL_LINK_BOOLEAN\fR The C variable is of type \fBint\fR. @@ -206,6 +194,5 @@ Tk widget that wishes to display the value of the variable), the trace will not trigger when the C variable has changed. \fBTcl_UpdateLinkedVar\fR ensures that any traces on the Tcl variable are invoked. - .SH KEYWORDS boolean, integer, link, read-only, real, string, traces, variable diff --git a/doc/Method.3 b/doc/Method.3 index 341dcac..a3a1af1 100644 --- a/doc/Method.3 +++ b/doc/Method.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Method.3,v 1.1 2008/05/31 11:42:06 dkf Exp $ +'\" RCS: @(#) $Id: Method.3,v 1.2 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Method 3 0.1 TclOO "TclOO Library Functions" @@ -162,13 +162,13 @@ The types of methods are described by a pointer to a Tcl_MethodType structure, which is defined as: .PP .CS - typedef const struct { - int \fIversion\fR; - const char *\fIname\fR; - Tcl_MethodCallProc \fIcallProc\fR; - Tcl_MethodDeleteProc \fIdeleteProc\fR; - Tcl_CloneProc \fIcloneProc\fR; - } \fBTcl_MethodType\fR; +typedef const struct { + int \fIversion\fR; + const char *\fIname\fR; + Tcl_MethodCallProc \fIcallProc\fR; + Tcl_MethodDeleteProc \fIdeleteProc\fR; + Tcl_CloneProc \fIcloneProc\fR; +} \fBTcl_MethodType\fR; .CE .PP The \fIversion\fR field allows for future expansion of the structure, and @@ -192,12 +192,12 @@ that the \fIclientData\fR can just be copied directly. Functions matching this signature are called when the method is invoked. .PP .CS - typedef int (*\fBTcl_MethodCallProc\fR) ( - ClientData \fIclientData\fR, - Tcl_Interp *\fIinterp\fR, - Tcl_ObjectContext \fIobjectContext\fR, - int \fIobjc\fR, - Tcl_Obj *const *\fIobjv\fR); +typedef int \fBTcl_MethodCallProc\fR( + ClientData \fIclientData\fR, + Tcl_Interp *\fIinterp\fR, + Tcl_ObjectContext \fIobjectContext\fR, + int \fIobjc\fR, + Tcl_Obj *const *\fIobjv\fR); .CE .PP The \fIclientData\fR argument to a Tcl_MethodCallProc is the value that was @@ -213,8 +213,8 @@ Functions matching this signature are used when a method is deleted, whether through a new method being created or because the object or class is deleted. .PP .CS - typedef void (*\fBTcl_MethodDeleteProc\fR) ( - ClientData \fIclientData\fR); +typedef void \fBTcl_MethodDeleteProc\fR( + ClientData \fIclientData\fR); .CE .PP The \fIclientData\fR argument to a Tcl_MethodDeleteProc will be the same as @@ -226,10 +226,10 @@ Functions matching this signature are used to copy a method when the object or class is copied using \fBTcl_CopyObjectInstance\fR (or \fBoo::copy\fR). .PP .CS - typedef int (*\fBTcl_CloneProc\fR) ( - Tcl_Interp *\fIinterp\fR, - ClientData \fIoldClientData\fR, - ClientData *\fInewClientDataPtr\fR); +typedef int \fBTcl_CloneProc\fR( + Tcl_Interp *\fIinterp\fR, + ClientData \fIoldClientData\fR, + ClientData *\fInewClientDataPtr\fR); .CE .PP The \fIinterp\fR argument gives a place to write an error message when the diff --git a/doc/Namespace.3 b/doc/Namespace.3 index a82248e..9f78b83 100644 --- a/doc/Namespace.3 +++ b/doc/Namespace.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Namespace.3,v 1.9 2008/04/18 14:21:34 dkf Exp $ +'\" RCS: @(#) $Id: Namespace.3,v 1.10 2008/06/29 22:28:24 dkf Exp $ '\" '\" Note that some of these functions do not seem to belong, but they '\" were all introduced with the same TIP (#139) @@ -97,7 +97,6 @@ message should be left in the interpreter if the search fails.) A script fragment to be installed as the unknown command handler for the namespace, or NULL to reset the handler to its default. .BE - .SH DESCRIPTION .PP Namespaces are hierarchic naming contexts that can contain commands @@ -118,10 +117,12 @@ the global namespace.) \fBTcl_CreateNamespace\fR creates a new namespace. The \fIdeleteProc\fR will have the following type signature: .CS -typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData); +typedef void \fBTcl_NamespaceDeleteProc\fR( + ClientData \fIclientData\fR); .CE .PP -\fBTcl_DeleteNamespace\fR deletes a namespace. +\fBTcl_DeleteNamespace\fR deletes a namespace, calling the +\fIdeleteProc\fR defined for the namespace (if any). .PP \fBTcl_AppendExportList\fR retrieves the export patterns for a namespace given namespace and appends them (as list items) to @@ -159,9 +160,7 @@ for the namespace, or NULL if none is set. \fBTcl_SetNamespaceUnknownHandler\fR sets the unknown command handler for the namespace. If \fIhandlerPtr\fR is NULL, then the handler is reset to its default. - .SH "SEE ALSO" -Tcl_CreateCommand, Tcl_ListObjAppendElements, Tcl_SetVar - +Tcl_CreateCommand(3), Tcl_ListObjAppendElements(3), Tcl_SetVar(3) .SH KEYWORDS namespace, command diff --git a/doc/Notifier.3 b/doc/Notifier.3 index 5b7d964..b9d3495 100644 --- a/doc/Notifier.3 +++ b/doc/Notifier.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Notifier.3,v 1.21 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Notifier.3,v 1.22 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Notifier 3 8.1 Tcl "Tcl Library Procedures" @@ -110,7 +110,6 @@ Structure of function pointers describing notifier procedures that are to replace the ones installed in the executable. See \fBREPLACING THE NOTIFIER\fR for details. .BE - .SH INTRODUCTION .PP The interfaces described here are used to customize the Tcl event @@ -217,7 +216,6 @@ return. .IP [7] Either return 0 to indicate that no events were ready, or go back to step [2] if blocking was requested by the caller. - .SH "CREATING A NEW EVENT SOURCE" .PP An event source consists of three procedures invoked by the notifier, @@ -232,7 +230,7 @@ Its arguments specify the setup procedure and check procedure for the event source. \fISetupProc\fR should match the following prototype: .CS -typedef void Tcl_EventSetupProc( +typedef void \fBTcl_EventSetupProc\fR( ClientData \fIclientData\fR, int \fIflags\fR); .CE @@ -272,9 +270,9 @@ a structure that describes a time interval in seconds and microseconds: .CS typedef struct Tcl_Time { - long \fIsec\fR; - long \fIusec\fR; -} Tcl_Time; + long \fIsec\fR; + long \fIusec\fR; +} \fBTcl_Time\fR; .CE The \fIusec\fR field should be less than 1000000. .PP @@ -306,7 +304,7 @@ procedure, indicated by the \fIcheckProc\fR argument to \fBTcl_CreateEventSource\fR. \fICheckProc\fR must match the following prototype: .CS -typedef void Tcl_EventCheckProc( +typedef void \fBTcl_EventCheckProc\fR( ClientData \fIclientData\fR, int \fIflags\fR); .CE @@ -332,7 +330,7 @@ rest of the notifier. A \fBTcl_Event\fR has the following definition: typedef struct { Tcl_EventProc *\fIproc\fR; struct Tcl_Event *\fInextPtr\fR; -} Tcl_Event; +} \fBTcl_Event\fR; .CE The event source must fill in the \fIproc\fR field of the event before calling \fBTcl_QueueEvent\fR. @@ -362,7 +360,7 @@ above) \fBTcl_ServiceEvent\fR will invoke the \fIproc\fR specified in the first queued \fBTcl_Event\fR structure. \fIProc\fR must match the following prototype: .CS -typedef int Tcl_EventProc( +typedef int \fBTcl_EventProc\fR( Tcl_Event *\fIevPtr\fR, int \fIflags\fR); .CE @@ -419,7 +417,7 @@ for each event in the queue, deleting those for with the procedure returns 1. Events for which the procedure returns 0 are left in the queue. \fIProc\fR should match the following prototype: .CS -typedef int Tcl_EventDeleteProc( +typedef int \fBTcl_EventDeleteProc\fR( Tcl_Event *\fIevPtr\fR, ClientData \fIclientData\fR); .CE @@ -432,7 +430,6 @@ point to the next event in the queue. \fIcheckProc\fR, and \fIclientData\fR arguments must exactly match those provided to the \fBTcl_CreateEventSource\fR for the event source to be deleted. If no such source exists, \fBTcl_DeleteEventSource\fR has no effect. - .SH "CREATING A NEW NOTIFIER" .PP The notifier consists of all the procedures described in this manual @@ -528,7 +525,6 @@ in their respective manual pages. The easiest way to create a new notifier is to look at the code for an existing notifier, such as the files \fBunix/tclUnixNotfy.c\fR or \fBwin/tclWinNotify.c\fR in the Tcl source distribution. - .SH "REPLACING THE NOTIFIER" .PP A notifier that has been written according to the conventions above @@ -551,7 +547,7 @@ typedef struct Tcl_NotifierProcs { Tcl_FinalizeNotifierProc *finalizeNotifierProc; Tcl_AlertNotifierProc *alertNotifierProc; Tcl_ServiceModeHookProc *serviceModeHookProc; -} Tcl_NotifierProcs; +} \fBTcl_NotifierProcs\fR; .CE Following the call to \fBTcl_SetNotifier\fR, the pointers given in the \fBTcl_NotifierProcs\fR structure replace whatever notifier had @@ -560,7 +556,6 @@ been installed in the process. It is extraordinarily unwise to replace a running notifier. Normally, \fBTcl_SetNotifier\fR should be called at process initialization time before the first call to \fBTcl_InitNotifier\fR. - .SH "EXTERNAL EVENT LOOPS" .PP The notifier interfaces are designed so that Tcl can be embedded into @@ -621,9 +616,8 @@ then calls to \fBTcl_ServiceAll\fR will behave normally. mode, which should be restored when the recursive loop exits. \fBTcl_GetServiceMode\fR returns the current value of the service mode. - .SH "SEE ALSO" -\fBTcl_CreateFileHandler\fR, \fBTcl_DeleteFileHandler\fR, \fBTcl_Sleep\fR, -\fBTcl_DoOneEvent\fR, \fBThread(3)\fR +Tcl_CreateFileHandler(3), Tcl_DeleteFileHandler(3), Tcl_Sleep(3), +Tcl_DoOneEvent(3), Thread(3) .SH KEYWORDS event, notifier, event queue, event sources, file events, timer, idle, service mode, threads diff --git a/doc/Object.3 b/doc/Object.3 index b0f718b..6951f10 100644 --- a/doc/Object.3 +++ b/doc/Object.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Object.3,v 1.19 2008/06/27 21:46:19 dgp Exp $ +'\" RCS: @(#) $Id: Object.3,v 1.20 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Obj 3 8.5 Tcl "Tcl Library Procedures" @@ -35,7 +35,6 @@ int Points to an object; must have been the result of a previous call to \fBTcl_NewObj\fR. .BE - .SH INTRODUCTION .PP This man page presents an overview of Tcl objects and how they are used. @@ -112,25 +111,25 @@ Each Tcl object is represented by a \fBTcl_Obj\fR structure which is defined as follows. .CS typedef struct Tcl_Obj { - int \fIrefCount\fR; - char *\fIbytes\fR; - int \fIlength\fR; - Tcl_ObjType *\fItypePtr\fR; - union { - long \fIlongValue\fR; - double \fIdoubleValue\fR; - void *\fIotherValuePtr\fR; - Tcl_WideInt \fIwideValue\fR; - struct { - void *\fIptr1\fR; - void *\fIptr2\fR; - } \fItwoPtrValue\fR; - struct { - void *\fIptr\fR; - unsigned long \fIvalue\fR; - } \fIptrAndLongRep\fR; - } \fIinternalRep\fR; -} Tcl_Obj; + int \fIrefCount\fR; + char *\fIbytes\fR; + int \fIlength\fR; + Tcl_ObjType *\fItypePtr\fR; + union { + long \fIlongValue\fR; + double \fIdoubleValue\fR; + void *\fIotherValuePtr\fR; + Tcl_WideInt \fIwideValue\fR; + struct { + void *\fIptr1\fR; + void *\fIptr2\fR; + } \fItwoPtrValue\fR; + struct { + void *\fIptr\fR; + unsigned long \fIvalue\fR; + } \fIptrAndLongRep\fR; + } \fIinternalRep\fR; +} \fBTcl_Obj\fR; .CE The \fIbytes\fR and the \fIlength\fR members together hold an object's UTF-8 string representation, diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3 index 59dfeaf..e9d1137 100644 --- a/doc/OpenFileChnl.3 +++ b/doc/OpenFileChnl.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.36 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.37 2008/06/29 22:28:24 dkf Exp $ .so man.macros .TH Tcl_OpenFileChannel 3 8.3 Tcl "Tcl Library Procedures" .BS @@ -99,10 +99,8 @@ Tcl_WideInt Tcl_WideInt \fBTcl_Tell\fR(\fIchannel\fR) .sp -.VS 8.5 int \fBTcl_TruncateChannel\fR(\fIchannel, length\fR) -.VE 8.5 .sp int \fBTcl_GetChannelOption\fR(\fIinterp, channel, optionName, optionValue\fR) @@ -212,7 +210,6 @@ values. Must have been initialized by the caller. .AP "const char" *newValue in New value for the option given by \fIoptionName\fR. .BE - .SH DESCRIPTION .PP The Tcl channel mechanism provides a device-independent and @@ -230,7 +227,6 @@ The procedures described in this manual entry comprise the C APIs of the generic layer of the channel architecture. For a description of the channel driver architecture and how to implement channel drivers for new types of channels, see the manual entry for \fBTcl_CreateChannel\fR. - .SH TCL_OPENFILECHANNEL .PP \fBTcl_OpenFileChannel\fR opens a file specified by \fIfileName\fR and @@ -252,7 +248,6 @@ register it, use \fBTcl_RegisterChannel\fR, described below. If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. - .SH TCL_OPENCOMMANDCHANNEL .PP \fBTcl_OpenCommandChannel\fR provides a C-level interface to the @@ -290,7 +285,6 @@ register it, use \fBTcl_RegisterChannel\fR, described below. If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. - .SH TCL_MAKEFILECHANNEL .PP \fBTcl_MakeFileChannel\fR makes a \fBTcl_Channel\fR from an existing, @@ -300,7 +294,6 @@ register it, use \fBTcl_RegisterChannel\fR, described below. If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. - .SH TCL_GETCHANNEL .PP \fBTcl_GetChannel\fR returns a channel given the \fIchannelName\fR used to @@ -318,7 +311,6 @@ according to the \fIpattern\fR. If \fIpattern\fR is NULL, then it will not do any filtering. The return value is \fBTCL_OK\fR if no errors occurred writing to the result, otherwise it is \fBTCL_ERROR\fR, and the error message is left in the interpreter's result. - .SH TCL_REGISTERCHANNEL .PP \fBTcl_RegisterChannel\fR adds a channel to the set of channels accessible @@ -343,7 +335,6 @@ call to \fBTcl_RegisterChannel\fR, they will get initialized by that call. See \fBTcl_StandardChannels\fR for a general treatise about standard channels and the behaviour of the Tcl library with regard to them. - .SH TCL_UNREGISTERCHANNEL .PP \fBTcl_UnregisterChannel\fR removes a channel from the set of channels @@ -358,7 +349,6 @@ that it no longer holds a reference to that channel. If this is the last reference to the channel, it will now be closed. \fBTcl_UnregisterChannel\fR is very similar to \fBTcl_DetachChannel\fR except that it will also close the channel if no further references to it exist. - .SH TCL_DETACHCHANNEL .PP \fBTcl_DetachChannel\fR removes a channel from the set of channels @@ -373,7 +363,6 @@ Code not associated with a Tcl interpreter can call that it no longer holds a reference to that channel. If this is the last reference to the channel, unlike \fBTcl_UnregisterChannel\fR, it will not be closed. - .SH TCL_ISSTANDARDCHANNEL .PP \fBTcl_IsStandardChannel\fR tests whether a channel is one of the @@ -382,7 +371,6 @@ three standard channels, stdin, stdout or stderr. If so, it returns .PP No attempt is made to check whether the given channel or the standard channels are initialized or otherwise valid. - .SH TCL_CLOSE .PP \fBTcl_Close\fR destroys the channel \fIchannel\fR, which must denote a @@ -412,7 +400,6 @@ been given as the \fBchan\fR argument in a call to \fBTcl_UnregisterChannel\fR, which will internally call \fBTcl_Close\fR when all calls to \fBTcl_RegisterChannel\fR have been matched by corresponding calls to \fBTcl_UnregisterChannel\fR. - .SH "TCL_READCHARS AND TCL_READ" .PP \fBTcl_ReadChars\fR consumes bytes from \fIchannel\fR, converting the bytes @@ -473,7 +460,6 @@ stack the supplied channel is part of, \fBTcl_ReadRaw\fR does not. Thus this function is \fBonly\fR usable for transformational channel drivers, i.e. drivers used in the middle of a stack of channels, to move data from the channel below into the transformation. - .SH "TCL_GETSOBJ AND TCL_GETS" .PP \fBTcl_GetsObj\fR consumes bytes from \fIchannel\fR, converting the bytes to @@ -500,7 +486,6 @@ of input unavailability. \fBTcl_Gets\fR is the same as \fBTcl_GetsObj\fR except the resulting characters are appended to the dynamic string given by \fIlineRead\fR rather than a Tcl object. - .SH "TCL_UNGETS" .PP \fBTcl_Ungets\fR is used to add data to the input queue of a channel, @@ -513,7 +498,6 @@ head of the queue. If \fIchannel\fR has a EOF set, no data will be added to the input queue. \fBTcl_Ungets\fR returns \fIinputLen\fR or \-1 if an error occurs. - .SH "TCL_WRITECHARS, TCL_WRITEOBJ, AND TCL_WRITE" .PP \fBTcl_WriteChars\fR accepts \fIbytesToWrite\fR bytes of character data at @@ -568,7 +552,6 @@ not. Thus this function is \fBonly\fR usable for transformational channel drivers, i.e. drivers used in the middle of a stack of channels, to move data from the transformation into the channel below it. - .SH TCL_FLUSH .PP \fBTcl_Flush\fR causes all of the buffered output data for \fIchannel\fR @@ -582,7 +565,6 @@ eventually, as fast as the channel is able to absorb it. The return value is normally \fBTCL_OK\fR. If an error occurs, \fBTcl_Flush\fR returns \fBTCL_ERROR\fR and records a POSIX error code that can be retrieved with \fBTcl_GetErrno\fR. - .SH TCL_SEEK .PP \fBTcl_Seek\fR moves the access point in \fIchannel\fR where subsequent @@ -593,20 +575,15 @@ buffered input is discarded, prior to the seek operation. If an error occurs, \fBTcl_Seek\fR returns \-1 and records a POSIX error code that can be retrieved with \fBTcl_GetErrno\fR. After an error, the access point may or may not have been moved. - .SH TCL_TELL .PP \fBTcl_Tell\fR returns the current access point for a channel. The returned value is \-1 if the channel does not support seeking. - .SH TCL_TRUNCATECHANNEL .PP -.VS 8.5 \fBTcl_TruncateChannel\fR truncates the file underlying \fIchannel\fR to a given \fIlength\fR of bytes. It returns \fBTCL_OK\fR if the operation succeeded, and \fBTCL_ERROR\fR otherwise. -.VE 8.5 - .SH TCL_GETCHANNELOPTION .PP \fBTcl_GetChannelOption\fR retrieves, in \fIoptionValue\fR, the value of one of @@ -628,7 +605,6 @@ for the Tcl \fBsocket\fR command. The procedure normally returns \fBTCL_OK\fR. If an error occurs, it returns \fBTCL_ERROR\fR and calls \fBTcl_SetErrno\fR to store an appropriate POSIX error code. - .SH TCL_SETCHANNELOPTION .PP \fBTcl_SetChannelOption\fR sets a new value \fInewValue\fR @@ -636,30 +612,26 @@ for an option \fIoptionName\fR on \fIchannel\fR. The procedure normally returns \fBTCL_OK\fR. If an error occurs, it returns \fBTCL_ERROR\fR; in addition, if \fIinterp\fR is non-NULL, \fBTcl_SetChannelOption\fR leaves an error message in the interpreter's result. - .SH TCL_EOF .PP \fBTcl_Eof\fR returns a nonzero value if \fIchannel\fR encountered an end of file during the last input operation. - .SH TCL_INPUTBLOCKED .PP \fBTcl_InputBlocked\fR returns a nonzero value if \fIchannel\fR is in nonblocking mode and the last input operation returned less data than requested because there was insufficient data available. The call always returns zero if the channel is in blocking mode. - .SH TCL_INPUTBUFFERED .PP \fBTcl_InputBuffered\fR returns the number of bytes of input currently buffered in the internal buffers for a channel. If the channel is not open for reading, this function always returns zero. - .SH TCL_OUTPUTBUFFERED +.PP \fBTcl_OutputBuffered\fR returns the number of bytes of output currently buffered in the internal buffers for a channel. If the channel is not open for writing, this function always returns zero. - .SH "PLATFORM ISSUES" .PP The handles returned from \fBTcl_GetChannelHandle\fR depend on the @@ -670,10 +642,8 @@ the channel was created with \fBTcl_OpenFileChannel\fR, \fBTcl_OpenCommandChannel\fR, or \fBTcl_MakeFileChannel\fR. Other channel types may return a different type of handle on Windows platforms. - .SH "SEE ALSO" DString(3), fconfigure(n), filename(n), fopen(3), Tcl_CreateChannel(3) - .SH KEYWORDS access point, blocking, buffered I/O, channel, channel driver, end of file, flush, input, nonblocking, output, read, seek, write diff --git a/doc/OpenTcp.3 b/doc/OpenTcp.3 index 70b80fa..6dd78f6 100644 --- a/doc/OpenTcp.3 +++ b/doc/OpenTcp.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenTcp.3,v 1.11 2006/11/15 09:23:01 dkf Exp $ +'\" RCS: @(#) $Id: OpenTcp.3,v 1.12 2008/06/29 22:28:24 dkf Exp $ .so man.macros .TH Tcl_OpenTcpClient 3 8.0 Tcl "Tcl Library Procedures" .BS @@ -50,15 +50,13 @@ accepted via the socket. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE - .SH DESCRIPTION .PP These functions are convenience procedures for creating channels that communicate over TCP sockets. The operations on a channel are described in the manual entry for \fBTcl_OpenFileChannel\fR. - -.SH TCL_OPENTCPCLIENT +.SS TCL_OPENTCPCLIENT .PP \fBTcl_OpenTcpClient\fR opens a client TCP socket connected to a \fIport\fR on a specific \fIhost\fR, and returns a channel that can be used to @@ -98,8 +96,7 @@ register it, use \fBTcl_RegisterChannel\fR. If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. - -.SH TCL_MAKETCPCLIENTCHANNEL +.SS TCL_MAKETCPCLIENTCHANNEL .PP \fBTcl_MakeTcpClientChannel\fR creates a \fBTcl_Channel\fR around an existing, platform specific, handle for a client TCP socket. @@ -109,8 +106,7 @@ register it, use \fBTcl_RegisterChannel\fR. If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. - -.SH TCL_OPENTCPSERVER +.SS TCL_OPENTCPSERVER .PP \fBTcl_OpenTcpServer\fR opens a TCP socket on the local host on a specified \fIport\fR and uses the Tcl event mechanism to accept requests from clients @@ -121,7 +117,7 @@ Each time a client connects to this socket, Tcl creates a channel for the new connection and invokes \fIproc\fR with information about the channel. \fIProc\fR must match the following prototype: .CS -typedef void Tcl_TcpAcceptProc( +typedef void \fBTcl_TcpAcceptProc\fR( ClientData \fIclientData\fR, Tcl_Channel \fIchannel\fR, char *\fIhostName\fR, @@ -162,15 +158,12 @@ register it, use \fBTcl_RegisterChannel\fR. If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. - .SH "PLATFORM ISSUES" .PP On Unix platforms, the socket handle is a Unix file descriptor as returned by the \fBsocket\fR system call. On the Windows platform, the socket handle is a \fBSOCKET\fR as defined in the WinSock API. - .SH "SEE ALSO" Tcl_OpenFileChannel(3), Tcl_RegisterChannel(3), vwait(n) - .SH KEYWORDS -client, server, TCP +channel, client, server, socket, TCP diff --git a/doc/Panic.3 b/doc/Panic.3 index 0b2ec03..00187ff 100644 --- a/doc/Panic.3 +++ b/doc/Panic.3 @@ -2,7 +2,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Panic.3,v 1.8 2005/09/13 21:23:51 dgp Exp $ +'\" RCS: @(#) $Id: Panic.3,v 1.9 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Panic 3 8.4 Tcl "Tcl Library Procedures" @@ -35,9 +35,7 @@ Must have been initialized using \fBva_start\fR, and cleared using \fBva_end\fR. .AP Tcl_PanicProc *panicProc in Procedure to report fatal error message and abort. - .BE - .SH DESCRIPTION .PP When the Tcl library detects that its internal data structures are in an @@ -60,7 +58,7 @@ return. type \fBTcl_PanicProc\fR: .PP .CS -typedef void Tcl_PanicProc( +typedef void \fBTcl_PanicProc\fR( const char *\fBformat\fR, \fBarg\fR, \fBarg\fR,...); .CE @@ -89,10 +87,7 @@ will be displayed. .PP \fBTcl_PanicVA\fR is the same as \fBTcl_Panic\fR except that instead of taking a variable number of arguments it takes an argument list. - .SH "SEE ALSO" abort(3), printf(3), exec(n), format(n) - .SH KEYWORDS abort, fatal, error - diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3 index 466f5c0..a75262e 100644 --- a/doc/ParseCmd.3 +++ b/doc/ParseCmd.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ParseCmd.3,v 1.27 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: ParseCmd.3,v 1.28 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_ParseCommand 3 8.3 Tcl "Tcl Library Procedures" @@ -82,7 +82,6 @@ if the parse was successful. Points to structure that was filled in by a previous call to \fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseVarName\fR, etc. .BE - .SH DESCRIPTION .PP These procedures parse Tcl commands or portions of Tcl commands such as @@ -204,7 +203,6 @@ If an error or other exception occurs while evaluating the tokens (such as a reference to a non-existent variable) then the return value is NULL and an error message is left in \fIinterp\fR's result. The use of \fBTcl_EvalTokens\fR is deprecated. - .SH "TCL_PARSE STRUCTURE" .PP \fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR, @@ -212,22 +210,22 @@ of \fBTcl_EvalTokens\fR is deprecated. return parse information in two data structures, Tcl_Parse and Tcl_Token: .CS typedef struct Tcl_Parse { - const char *\fIcommentStart\fR; - int \fIcommentSize\fR; - const char *\fIcommandStart\fR; - int \fIcommandSize\fR; - int \fInumWords\fR; - Tcl_Token *\fItokenPtr\fR; - int \fInumTokens\fR; - ... -} Tcl_Parse; + const char *\fIcommentStart\fR; + int \fIcommentSize\fR; + const char *\fIcommandStart\fR; + int \fIcommandSize\fR; + int \fInumWords\fR; + Tcl_Token *\fItokenPtr\fR; + int \fInumTokens\fR; + ... +} \fBTcl_Parse\fR; typedef struct Tcl_Token { - int \fItype\fR; - const char *\fIstart\fR; - int \fIsize\fR; - int \fInumComponents\fR; -} Tcl_Token; + int \fItype\fR; + const char *\fIstart\fR; + int \fIsize\fR; + int \fInumComponents\fR; +} \fBTcl_Token\fR; .CE .PP The first five fields of a Tcl_Parse structure @@ -269,6 +267,7 @@ the \fInumComponents\fR field describes how many of these there are. The \fItype\fR field has one of the following values: .TP 20 \fBTCL_TOKEN_WORD\fR +. This token ordinarily describes one word of a command but it may also describe a quoted or braced string in an expression. The token describes a component of the script that is @@ -283,29 +282,32 @@ number of sub-tokens that make up the word, including sub-tokens of \fBTCL_TOKEN_VARIABLE\fR and \fBTCL_TOKEN_BS\fR tokens. .TP \fBTCL_TOKEN_SIMPLE_WORD\fR +. This token has the same meaning as \fBTCL_TOKEN_WORD\fR, except that the word is guaranteed to consist of a single \fBTCL_TOKEN_TEXT\fR sub-token. The \fInumComponents\fR field is always 1. .TP \fBTCL_TOKEN_EXPAND_WORD\fR -.VS 8.5 +. This token has the same meaning as \fBTCL_TOKEN_WORD\fR, except that the command parser notes this word began with the expansion prefix \fB{*}\fR, indicating that after substitution, the list value of this word should be expanded to form multiple arguments in command evaluation. This token type can only be created by Tcl_ParseCommand. -.VE 8.5 .TP \fBTCL_TOKEN_TEXT\fR +. The token describes a range of literal text that is part of a word. The \fInumComponents\fR field is always 0. .TP \fBTCL_TOKEN_BS\fR +. The token describes a backslash sequence such as \fB\en\fR or \fB\e0xa3\fR. The \fInumComponents\fR field is always 0. .TP \fBTCL_TOKEN_COMMAND\fR +. The token describes a command whose result must be substituted into the word. The token includes the square brackets that surround the command. The \fInumComponents\fR field is always 0 (the nested command @@ -313,6 +315,7 @@ is not parsed; call \fBTcl_ParseCommand\fR recursively if you want to see its tokens). .TP \fBTCL_TOKEN_VARIABLE\fR +. The token describes a variable substitution, including the \fB$\fR, variable name, and array index (if there is one) up through the close parenthesis that terminates the index. This token is followed @@ -328,6 +331,7 @@ array index. The \fInumComponents\fR field includes nested sub-tokens that are part of \fBTCL_TOKEN_VARIABLE\fR tokens in the array index. .TP \fBTCL_TOKEN_SUB_EXPR\fR +. The token describes one subexpression of an expression (or an entire expression). A subexpression may consist of a value @@ -354,6 +358,7 @@ counts the total number of sub-tokens that make up the subexpression; this includes the sub-tokens for any nested \fBTCL_TOKEN_SUB_EXPR\fR tokens. .TP \fBTCL_TOKEN_OPERATOR\fR +. The token describes one operator of an expression such as \fB&&\fR or \fBhypot\fR. A \fBTCL_TOKEN_OPERATOR\fR token is always preceded by a @@ -385,7 +390,6 @@ is always 0. After \fBTcl_ParseCommand\fR returns, the first token pointed to by the \fItokenPtr\fR field of the Tcl_Parse structure always has type \fBTCL_TOKEN_WORD\fR or -.VS 8.5 \fBTCL_TOKEN_SIMPLE_WORD\fR or \fBTCL_TOKEN_EXPAND_WORD\fR. It is followed by the sub-tokens that must be concatenated to produce the value of that word. @@ -394,7 +398,6 @@ of \fBTCL_TOKEN_EXPAND_WORD\fR token for the second word, followed by sub-tokens for that word, and so on until all \fInumWords\fR have been accounted for. -.VE 8.5 .PP After \fBTcl_ParseExpr\fR returns, the first token pointed to by the \fItokenPtr\fR field of the @@ -461,6 +464,5 @@ There are additional fields in the Tcl_Parse structure after the \fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR, \fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR; they should not be referenced by code outside of these procedures. - .SH KEYWORDS backslash substitution, braces, command, expression, parse, token, variable substitution diff --git a/doc/Preserve.3 b/doc/Preserve.3 index 5c860aa..e4ae2dc 100644 --- a/doc/Preserve.3 +++ b/doc/Preserve.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Preserve.3,v 1.6 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: Preserve.3,v 1.7 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Preserve 3 7.5 Tcl "Tcl Library Procedures" @@ -29,7 +29,6 @@ to memory for structure. .AP Tcl_FreeProc *freeProc in Procedure to invoke to free \fIclientData\fR. .BE - .SH DESCRIPTION .PP These three procedures help implement a simple reference count mechanism @@ -81,7 +80,8 @@ All the work of freeing the object is carried out by \fIfreeProc\fR. \fIFreeProc\fR must have arguments and result that match the type \fBTcl_FreeProc\fR: .CS -typedef void Tcl_FreeProc(char *\fIblockPtr\fR); +typedef void \fBTcl_FreeProc\fR( + char *\fIblockPtr\fR); .CE The \fIblockPtr\fR argument to \fIfreeProc\fR will be the same as the \fIclientData\fR argument to \fBTcl_EventuallyFree\fR. @@ -104,9 +104,7 @@ mechanism for long-term reference counts. The implementation does not depend in any way on the internal structure of the objects being freed; it keeps the reference counts in a separate structure. - .SH "SEE ALSO" Tcl_Interp, Tcl_Alloc - .SH KEYWORDS free, reference count, storage diff --git a/doc/PrintDbl.3 b/doc/PrintDbl.3 index 25ea85c..d0d2307 100644 --- a/doc/PrintDbl.3 +++ b/doc/PrintDbl.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: PrintDbl.3,v 1.11 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: PrintDbl.3,v 1.12 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures" @@ -30,7 +30,6 @@ Floating-point value to be converted. Where to store the string representing \fIvalue\fR. Must have at least \fBTCL_DOUBLE_SPACE\fR characters of storage. .BE - .SH DESCRIPTION .PP \fBTcl_PrintDouble\fR generates a string that represents the value @@ -43,7 +42,6 @@ or an so that it does not look like an integer. Where \fB%g\fR would generate an integer with no decimal point, \fBTcl_PrintDouble\fR adds .QW .0 . -.VS 8.5 .PP If the \fBtcl_precision\fR value is non-zero, the result will have precisely that many digits of significance. If the value is zero @@ -51,7 +49,5 @@ precisely that many digits of significance. If the value is zero represent the number in such a way that \fBTcl_NewDoubleObj\fR will generate the same number when presented with the given string. IEEE semantics of rounding to even apply to the conversion. -.VE - .SH KEYWORDS conversion, double-precision, floating-point, string diff --git a/doc/RegConfig.3 b/doc/RegConfig.3 index 8e4cecf..83cc59c 100644 --- a/doc/RegConfig.3 +++ b/doc/RegConfig.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: RegConfig.3,v 1.8 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: RegConfig.3,v 1.9 2008/06/29 22:28:24 dkf Exp $ .so man.macros .TH Tcl_RegisterConfig 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -37,7 +37,6 @@ Contains the name of the encoding used to store the configuration values as ASCII string. This means that this information is in UTF-8 too. Must not be NULL. .BE - .SH DESCRIPTION .PP The function described here has its base in TIP 59 and provides @@ -103,9 +102,9 @@ The \fBTcl_Config\fR structure contains the following fields: .PP .CS typedef struct Tcl_Config { - const char* key; - const char* value; -} Tcl_Config; + const char *\fIkey\fR; + const char *\fIvalue\fR; +} \fBTcl_Config\fR; .CE .\" No cross references yet. .\" .SH "SEE ALSO" diff --git a/doc/RegExp.3 b/doc/RegExp.3 index 4383d98..2c999ea 100644 --- a/doc/RegExp.3 +++ b/doc/RegExp.3 @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: RegExp.3,v 1.28 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: RegExp.3,v 1.29 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures" @@ -339,10 +339,10 @@ defined as follows: .PP .CS typedef struct Tcl_RegExpInfo { - int \fInsubs\fR; - Tcl_RegExpIndices *\fImatches\fR; - long \fIextendStart\fR; -} Tcl_RegExpInfo; + int \fInsubs\fR; + Tcl_RegExpIndices *\fImatches\fR; + long \fIextendStart\fR; +} \fBTcl_RegExpInfo\fR; .CE .PP The \fInsubs\fR field contains a count of the number of parenthesized @@ -357,9 +357,9 @@ follows: .PP .CS typedef struct Tcl_RegExpIndices { - long \fIstart\fR; - long \fIend\fR; -} Tcl_RegExpIndices; + long \fIstart\fR; + long \fIend\fR; +} \fBTcl_RegExpIndices\fR; .CE .PP The \fIstart\fR and \fIend\fR values are Unicode character indices diff --git a/doc/SaveResult.3 b/doc/SaveResult.3 index d893bce..f2ed536 100644 --- a/doc/SaveResult.3 +++ b/doc/SaveResult.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SaveResult.3,v 1.9 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: SaveResult.3,v 1.10 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_SaveResult 3 8.1 Tcl "Tcl Library Procedures" @@ -40,10 +40,8 @@ Saved state token to be restored or discarded. .AP Tcl_SavedResult *savedPtr in Pointer to location where interpreter result should be saved or restored. .BE - .SH DESCRIPTION .PP -.VS 8.5 These routines allows a C procedure to take a snapshot of the current state of an interpreter so that it can be restored after a call to \fBTcl_Eval\fR or some other routine that modifies the interpreter @@ -99,7 +97,6 @@ must eventually be passed to either \fBTcl_RestoreInterpState\fR or \fBTcl_DiscardInterpState\fR to avoid a memory leak. Once the \fBTcl_InterpState\fR token is passed to one of them, the token is no longer valid and should not be used anymore. -.VE 8.5 .PP \fBTcl_SaveResult\fR moves the string and object results of \fIinterp\fR into the location specified by \fIstatePtr\fR. @@ -121,6 +118,5 @@ Once \fBTcl_SaveResult\fR is called to save the interpreter result, either \fBTcl_RestoreResult\fR or \fBTcl_DiscardResult\fR must be called to properly clean up the memory associated with the saved state. - .SH KEYWORDS result, state, interp diff --git a/doc/SetResult.3 b/doc/SetResult.3 index 3e3e56a..0c7f1ec 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.18 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.19 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" @@ -216,7 +216,8 @@ When Tcl no longer needs the storage for the string, it will call \fIfreeProc\fR. \fIFreeProc\fR should have arguments and result that match the type \fBTcl_FreeProc\fR: .CS -typedef void Tcl_FreeProc(char *\fIblockPtr\fR); +typedef void \fBTcl_FreeProc\fR( + char *\fIblockPtr\fR); .CE When \fIfreeProc\fR is called, its \fIblockPtr\fR will be set to the value of \fIresult\fR passed to \fBTcl_SetResult\fR. diff --git a/doc/SplitList.3 b/doc/SplitList.3 index 046cbdf..04986d5 100644 --- a/doc/SplitList.3 +++ b/doc/SplitList.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SplitList.3,v 1.13 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: SplitList.3,v 1.14 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures" @@ -67,7 +67,6 @@ Information about \fIsrc\fR. Must be value returned by previous call to \fBTcl_ScanElement\fR, possibly OR-ed with \fBTCL_DONT_USE_BRACES\fR. .BE - .SH DESCRIPTION .PP These procedures may be used to disassemble and reassemble Tcl lists. @@ -166,7 +165,6 @@ used to generate a portion of an argument for a Tcl command. In this case, surrounding \fIsrc\fR with curly braces would cause the command not to be parsed correctly. .PP -.VS 8.5 By default, \fBTcl_ConvertElement\fR will use quoting in its output to be sure the first character of an element is not the hash character @@ -178,12 +176,10 @@ is not necessary. When the caller can be sure that the element is not the first element of a list, it can disable quoting of the leading hash character by OR-ing the flag value returned by \fBTcl_ScanElement\fR with \fBTCL_DONT_QUOTE_HASH\fR. -.VE 8.5 .PP \fBTcl_ScanCountedElement\fR and \fBTcl_ConvertCountedElement\fR are the same as \fBTcl_ScanElement\fR and \fBTcl_ConvertElement\fR, except the length of string \fIsrc\fR is specified by the \fIlength\fR argument, and the string may contain embedded nulls. - .SH KEYWORDS backslash, convert, element, list, merge, split, strings diff --git a/doc/StaticPkg.3 b/doc/StaticPkg.3 index 2e76fa5..ad50fa6 100644 --- a/doc/StaticPkg.3 +++ b/doc/StaticPkg.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StaticPkg.3,v 1.9 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: StaticPkg.3,v 1.10 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_StaticPackage 3 7.5 Tcl "Tcl Library Procedures" @@ -34,7 +34,6 @@ Procedure to call to incorporate this package into a safe interpreter (one that will execute untrusted scripts). NULL means the package cannot be used in safe interpreters. .BE - .SH DESCRIPTION .PP This procedure may be invoked to announce that a package has been @@ -55,7 +54,8 @@ or not. \fIinitProc\fR and \fIsafeInitProc\fR must both match the following prototype: .CS -typedef int Tcl_PackageInitProc(Tcl_Interp *\fIinterp\fR); +typedef int \fBTcl_PackageInitProc\fR( + Tcl_Interp *\fIinterp\fR); .CE The \fIinterp\fR argument identifies the interpreter in which the package is to be loaded. The initialization procedure must return \fBTCL_OK\fR or @@ -64,6 +64,5 @@ the event of an error it should set the interpreter's result to point to an error message. The result or error from the initialization procedure will be returned as the result of the \fBload\fR command that caused the initialization procedure to be invoked. - .SH KEYWORDS initialization procedure, package, static linking diff --git a/doc/StringObj.3 b/doc/StringObj.3 index 3db8b1e..99bfdfb 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StringObj.3,v 1.27 2008/05/07 10:25:22 patthoyts Exp $ +'\" RCS: @(#) $Id: StringObj.3,v 1.28 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures" @@ -62,7 +62,6 @@ void .sp void \fBTcl_AppendStringsToObjVA\fR(\fIobjPtr, argList\fR) -.VS 8.5 .sp void \fBTcl_AppendLimitedToObj\fR(\fIobjPtr, bytes, length, limit, ellipsis\fR) @@ -78,7 +77,6 @@ Tcl_Obj * .sp void \fBTcl_AppendPrintfToObj\fR(\fIobjPtr, format, ...\fR) -.VE 8.5 .sp void \fBTcl_SetObjLength\fR(\fIobjPtr, newLength\fR) @@ -135,7 +133,9 @@ An argument list which must have been initialised using Maximum number of bytes to be appended. .AP "const char" *ellipsis in Suffix to append when the limit leads to string truncation. -If NULL is passed then the suffix "..." is used. +If NULL is passed then the suffix +.QW "..." +is used. .AP "const char" *format in Format control string including % conversion specifiers. .AP int objc in @@ -146,7 +146,6 @@ The array of objects to format or concatenate. New length for the string value of \fIobjPtr\fR, not including the final null character. .BE - .SH DESCRIPTION .PP The procedures described in this manual entry allow Tcl objects to @@ -253,7 +252,6 @@ must be a NULL pointer to indicate the end of the list. except that instead of taking a variable number of arguments it takes an argument list. .PP -.VS 8.5 \fBTcl_AppendLimitedToObj\fR is similar to \fBTcl_AppendToObj\fR except that it imposes a limit on how many bytes are appended. This can be handy when the string to be appended might be @@ -333,7 +331,6 @@ Tcl_AppendObjToObj(objPtr, Tcl_ObjPrintf(format, ...)); .CE but with greater convenience and efficiency when the appending functionality is needed. -.VE 8.5 .PP The \fBTcl_SetObjLength\fR procedure changes the length of the string value of its \fIobjPtr\fR argument. If the \fInewLength\fR @@ -369,10 +366,8 @@ white space, then that object is ignored entirely. This white-space removal was added to make the output of the \fBconcat\fR command cleaner-looking. \fBTcl_ConcatObj\fR returns a pointer to a newly-created object whose ref count is zero. - .SH "SEE ALSO" Tcl_NewObj, Tcl_IncrRefCount, Tcl_DecrRefCount, format, sprintf - .SH KEYWORDS append, internal representation, object, object type, string object, string type, string representation, concat, concatenate, unicode diff --git a/doc/Tcl.n b/doc/Tcl.n index 06a99d0..b62a6e9 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl.n,v 1.18 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: Tcl.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl n "8.5" Tcl "Tcl Built-In Commands" @@ -50,7 +50,6 @@ as ordinary characters and included in the word. Command substitution, variable substitution, and backslash substitution are performed on the characters between the quotes as described below. The double-quotes are not retained as part of the word. -.VS 8.5 br .IP "[5] \fBArgument expansion.\fR" If a word starts with the string .QW {*} @@ -64,7 +63,6 @@ substituted. For instance, .QW "cmd a {*}{b c} d {*}{e f}" is equivalent to .QW "cmd a b c d e f" . -.VE 8.5 .IP "[6] \fBBraces.\fR" If the first character of a word is an open brace .PQ { @@ -107,11 +105,13 @@ Variable substitution may take any of the following forms: .RS .TP 15 \fB$\fIname\fR +. \fIName\fR is the name of a scalar variable; the name is a sequence of one or more characters that are a letter, digit, underscore, or namespace separators (two or more colons). .TP 15 \fB$\fIname\fB(\fIindex\fB)\fR +. \fIName\fR gives the name of an array variable and \fIindex\fR gives the name of an element within that array. \fIName\fR must contain only letters, digits, underscores, and @@ -120,6 +120,7 @@ Command substitutions, variable substitutions, and backslash substitutions are performed on the characters of \fIindex\fR. .TP 15 \fB${\fIname\fB}\fR +. \fIName\fR is the name of a scalar variable. It may contain any characters whatsoever except for close braces. .LP diff --git a/doc/Tcl_Main.3 b/doc/Tcl_Main.3 index b055e08..edbe115 100644 --- a/doc/Tcl_Main.3 +++ b/doc/Tcl_Main.3 @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl_Main.3,v 1.16 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: Tcl_Main.3,v 1.17 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_Main 3 8.4 Tcl "Tcl Library Procedures" @@ -32,7 +32,6 @@ The value for this argument is usually \fBTcl_AppInit\fR. .AP Tcl_MainLoopProc *mainLoopProc in Address of an application-specific event loop procedure. .BE - .SH DESCRIPTION .PP \fBTcl_Main\fR can serve as the main program for Tcl-based shell @@ -48,7 +47,7 @@ library and interactive shell operation. Other styles of embedding Tcl in an application are not supported by \fBTcl_Main\fR. Those must be achieved by calling lower level functions in the Tcl library directly. - +.PP The \fBTcl_Main\fR function has been offered by the Tcl library since release Tcl 7.4. In older releases of Tcl, the Tcl library itself defined a function \fBmain\fR, but that lacks flexibility @@ -100,9 +99,10 @@ created by \fBTcl_Main\fR, such as defining application-specific commands. The procedure must have an interface that matches the type \fBTcl_AppInitProc\fR: .CS -typedef int Tcl_AppInitProc(Tcl_Interp *\fIinterp\fR); +typedef int \fBTcl_AppInitProc\fR( + Tcl_Interp *\fIinterp\fR); .CE - +.PP \fIAppInitProc\fR is almost always a pointer to \fBTcl_AppInit\fR; for more details on this procedure, see the documentation for \fBTcl_AppInit\fR. .PP @@ -132,7 +132,7 @@ will continue. The main loop procedure must have an interface that matches the type \fBTcl_MainLoopProc\fR: .CS -typedef void Tcl_MainLoopProc(void); +typedef void \fBTcl_MainLoopProc\fR(void); .CE .PP \fBTcl_Main\fR does not return. Normally a program based on @@ -144,10 +144,8 @@ procedure (if any) returns. In non-interactive mode, after \fBTcl_Main\fR evaluates the startup script, and the main loop procedure (if any) returns, \fBTcl_Main\fR will also evaluate the \fBexit\fR command. - .SH "SEE ALSO" tclsh(1), Tcl_GetStdChannel(3), Tcl_StandardChannels(3), Tcl_AppInit(3), exit(n) - .SH KEYWORDS application-specific initialization, command-line arguments, main program diff --git a/doc/Thread.3 b/doc/Thread.3 index 0abcfd2..73ba742 100644 --- a/doc/Thread.3 +++ b/doc/Thread.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Thread.3,v 1.28 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: Thread.3,v 1.29 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Threads 3 "8.1" Tcl "Tcl Library Procedures" @@ -182,13 +182,12 @@ explicitly by calls to \fBTcl_MutexFinalize\fR or \fBTcl_ConditionFinalize\fR. Thread local storage is reclaimed during \fBTcl_FinalizeThread\fR. .SH "SCRIPT-LEVEL ACCESS TO THREADS" -.VS 8.5 +.PP Tcl provides no built-in commands for scripts to use to create, manage, or join threads, nor any script-level access to mutex or condition variables. It provides such facilities only via C interfaces, and leaves it up to packages to expose these matters to the script level. One such package is the \fBThread\fR package. -.VE 8.5 .SH "SEE ALSO" Tcl_GetCurrentThread(3), Tcl_ThreadQueueEvent(3), Tcl_ThreadAlert(3), Tcl_ExitThread(3), Tcl_FinalizeThread(3), Tcl_CreateThreadExitHandler(3), diff --git a/doc/TraceCmd.3 b/doc/TraceCmd.3 index ed85403..813f6a1 100644 --- a/doc/TraceCmd.3 +++ b/doc/TraceCmd.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" CVS: @(#) $Id: TraceCmd.3,v 1.11 2007/12/13 15:22:32 dgp Exp $ +'\" CVS: @(#) $Id: TraceCmd.3,v 1.12 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_TraceCommand 3 7.4 Tcl "Tcl Library Procedures" @@ -65,7 +65,7 @@ Whenever one of the specified operations occurs to the command, \fIproc\fR will be invoked. It should have arguments and result that match the type \fBTcl_CommandTraceProc\fR: .CS -typedef void Tcl_CommandTraceProc( +typedef void \fBTcl_CommandTraceProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, const char *\fIoldName\fR, diff --git a/doc/TraceVar.3 b/doc/TraceVar.3 index 022ef40..02e4c0d 100644 --- a/doc/TraceVar.3 +++ b/doc/TraceVar.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TraceVar.3,v 1.19 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: TraceVar.3,v 1.20 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Tcl_TraceVar 3 7.4 Tcl "Tcl Library Procedures" @@ -124,7 +124,7 @@ Whenever one of the specified operations occurs on the variable, It should have arguments and result that match the type \fBTcl_VarTraceProc\fR: .CS -typedef char *Tcl_VarTraceProc( +typedef char *\fBTcl_VarTraceProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, char *\fIname1\fR, diff --git a/doc/Utf.3 b/doc/Utf.3 index 14b979c..848a997 100644 --- a/doc/Utf.3 +++ b/doc/Utf.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Utf.3,v 1.25 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: Utf.3,v 1.26 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH Utf 3 "8.1" Tcl "Tcl Library Procedures" @@ -15,7 +15,7 @@ Tcl_UniChar, Tcl_UniCharCaseMatch, Tcl_UniCharNcasecmp, Tcl_UniCharToUtf, Tcl_Ut .nf \fB#include \fR .sp -typedef ... Tcl_UniChar; +typedef ... \fBTcl_UniChar\fR; .sp int \fBTcl_UniCharToUtf\fR(\fIch, buf\fR) diff --git a/doc/bgerror.n b/doc/bgerror.n index be6af02..5f09133 100644 --- a/doc/bgerror.n +++ b/doc/bgerror.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bgerror.n,v 1.13 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: bgerror.n,v 1.14 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH bgerror n 7.5 Tcl "Tcl Built-In Commands" @@ -16,9 +16,8 @@ bgerror \- Command invoked to process background errors .SH SYNOPSIS \fBbgerror \fImessage\fR .BE - .SH DESCRIPTION -.VS 8.5 +.PP Release 8.5 of Tcl supports the \fBinterp bgerror\fR command, which allows applications to register in an interpreter the command that will handle background errors in that interpreter. In older @@ -30,7 +29,6 @@ describes the interface requirements of the \fBbgerror\fR command an application might define to retain compatibility with pre-8.5 releases of Tcl. Applications intending to support only Tcl releases 8.5 and later should simply make use of \fBinterp bgerror\fR. -.VE 8.5 .PP The \fBbgerror\fR command does not exist as built-in part of Tcl. Instead, individual applications or users can define a \fBbgerror\fR @@ -77,6 +75,7 @@ The reason for this is that the application programmer may also want to define a \fBbgerror\fR, or use other code that does and thus will have trouble integrating your code. .SH "EXAMPLE" +.PP This \fBbgerror\fR procedure appends errors to a file, with a timestamp. .CS proc bgerror {message} { @@ -86,9 +85,7 @@ proc bgerror {message} { close $fl } .CE - .SH "SEE ALSO" after(n), interp(n), tclvars(n) - .SH KEYWORDS background error, reporting diff --git a/doc/binary.n b/doc/binary.n index 16f7533..95373fb 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: binary.n,v 1.38 2008/01/02 21:21:37 dkf Exp $ +'\" RCS: @(#) $Id: binary.n,v 1.39 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH binary n 8.0 Tcl "Tcl Built-In Commands" @@ -212,13 +212,11 @@ will return a string equivalent to \fB\ex00\ex03\exff\exfd\ex01\ex02\fR. .RE .IP \fBt\fR 5 -.VS 8.5 This form (mnemonically \fItiny\fR) is the same as \fBs\fR and \fBS\fR except that it stores the 16-bit integers in the output string in the native byte order of the machine where the Tcl script is running. To determine what the native byte order of the machine is, refer to the \fBbyteOrder\fR element of the \fBtcl_platform\fR array. -.VE 8.5 .IP \fBi\fR 5 This form is the same as \fBc\fR except that it stores one or more 32-bit integers in little-endian byte order in the output string. The @@ -244,14 +242,12 @@ will return a string equivalent to \fB\ex00\ex00\ex00\ex03\exff\exff\exff\exfd\ex00\ex01\ex00\ex00\fR .RE .IP \fBn\fR 5 -.VS 8.5 This form (mnemonically \fInumber\fR or \fInormal\fR) is the same as \fBi\fR and \fBI\fR except that it stores the 32-bit integers in the output string in the native byte order of the machine where the Tcl script is running. To determine what the native byte order of the machine is, refer to the \fBbyteOrder\fR element of the \fBtcl_platform\fR array. -.VE 8.5 .IP \fBw\fR 5 This form is the same as \fBc\fR except that it stores one or more 64-bit integers in little-endian byte order in the output string. The @@ -275,14 +271,12 @@ For example, will return the string \fBBigEndian\fR .RE .IP \fBm\fR 5 -.VS 8.5 This form (mnemonically the mirror of \fBw\fR) is the same as \fBw\fR and \fBW\fR except that it stores the 64-bit integers in the output string in the native byte order of the machine where the Tcl script is running. To determine what the native byte order of the machine is, refer to the \fBbyteOrder\fR element of the \fBtcl_platform\fR array. -.VE 8.5 .IP \fBf\fR 5 This form is the same as \fBc\fR except that it stores one or more one or more single-precision floating point numbers in the machine's native @@ -304,18 +298,14 @@ will return a string equivalent to \fB\excd\excc\excc\ex3f\ex9a\ex99\ex59\ex40\fR. .RE .IP \fBr\fR 5 -.VS 8.5 This form (mnemonically \fIreal\fR) is the same as \fBf\fR except that it stores the single-precision floating point numbers in little-endian order. This conversion only produces meaningful output when used on machines which use the IEEE floating point representation (very common, but not universal.) -.VE 8.5 .IP \fBR\fR 5 -.VS 8.5 This form is the same as \fBr\fR except that it stores the single-precision floating point numbers in big-endian order. -.VE 8.5 .IP \fBd\fR 5 This form is the same as \fBf\fR except that it stores one or more one or more double-precision floating point numbers in the machine's native @@ -329,18 +319,14 @@ will return a string equivalent to \fB\ex9a\ex99\ex99\ex99\ex99\ex99\exf9\ex3f\fR. .RE .IP \fBq\fR 5 -.VS 8.5 This form (mnemonically the mirror of \fBd\fR) is the same as \fBd\fR except that it stores the double-precision floating point numbers in little-endian order. This conversion only produces meaningful output when used on machines which use the IEEE floating point representation (very common, but not universal.) -.VE 8.5 .IP \fBQ\fR 5 -.VS 8.5 This form is the same as \fBq\fR except that it stores the double-precision floating point numbers in big-endian order. -.VE 8.5 .IP \fBx\fR 5 Stores \fIcount\fR null bytes in the output string. If \fIcount\fR is not specified, stores one null byte. If \fIcount\fR is \fB*\fR, @@ -597,13 +583,11 @@ will return \fB2\fR with \fB5 7\fR stored in \fIvar1\fR and \fB\-16\fR stored in \fIvar2\fR. .RE .IP \fBt\fR 5 -.VS 8.5 The data is interpreted as \fIcount\fR 16-bit signed integers represented in the native byte order of the machine running the Tcl script. It is otherwise identical to \fBs\fR and \fBS\fR. To determine what the native byte order of the machine is, refer to the \fBbyteOrder\fR element of the \fBtcl_platform\fR array. -.VE 8.5 .IP \fBi\fR 5 The data is interpreted as \fIcount\fR 32-bit signed integers represented in little-endian byte order. The integers are stored in @@ -637,13 +621,11 @@ will return \fB2\fR with \fB5 7\fR stored in \fIvar1\fR and \fB\-16\fR stored in \fIvar2\fR. .RE .IP \fBn\fR 5 -.VS 8.5 The data is interpreted as \fIcount\fR 32-bit signed integers represented in the native byte order of the machine running the Tcl script. It is otherwise identical to \fBi\fR and \fBI\fR. To determine what the native byte order of the machine is, refer to the \fBbyteOrder\fR element of the \fBtcl_platform\fR array. -.VE 8.5 .IP \fBw\fR 5 The data is interpreted as \fIcount\fR 64-bit signed integers represented in little-endian byte order. The integers are stored in @@ -673,13 +655,11 @@ will return \fB2\fR with \fB21474836487\fR stored in \fIvar1\fR and \fB\-16\fR stored in \fIvar2\fR. .RE .IP \fBm\fR 5 -.VS 8.5 The data is interpreted as \fIcount\fR 64-bit signed integers represented in the native byte order of the machine running the Tcl script. It is otherwise identical to \fBw\fR and \fBW\fR. To determine what the native byte order of the machine is, refer to the \fBbyteOrder\fR element of the \fBtcl_platform\fR array. -.VE 8.5 .IP \fBf\fR 5 The data is interpreted as \fIcount\fR single-precision floating point numbers in the machine's native representation. The floating point @@ -700,19 +680,15 @@ will return \fB1\fR with \fB1.6000000238418579\fR stored in \fIvar1\fR. .RE .IP \fBr\fR 5 -.VS 8.5 This form is the same as \fBf\fR except that the data is interpreted as \fIcount\fR single-precision floating point number in little-endian order. This conversion is not portable to the minority of systems not using IEEE floating point representations. -.VE 8.5 .IP \fBR\fR 5 -.VS 8.5 This form is the same as \fBf\fR except that the data is interpreted as \fIcount\fR single-precision floating point number in big-endian order. This conversion is not portable to the minority of systems not using IEEE floating point representations. -.VE 8.5 .IP \fBd\fR 5 This form is the same as \fBf\fR except that the data is interpreted as \fIcount\fR double-precision floating point numbers in the @@ -726,19 +702,15 @@ will return \fB1\fR with \fB1.6000000000000001\fR stored in \fIvar1\fR. .RE .IP \fBq\fR 5 -.VS 8.5 This form is the same as \fBd\fR except that the data is interpreted as \fIcount\fR double-precision floating point number in little-endian order. This conversion is not portable to the minority of systems not using IEEE floating point representations. -.VE 8.5 .IP \fBQ\fR 5 -.VS 8.5 This form is the same as \fBd\fR except that the data is interpreted as \fIcount\fR double-precision floating point number in big-endian order. This conversion is not portable to the minority of systems not using IEEE floating point representations. -.VE 8.5 .IP \fBx\fR 5 Moves the cursor forward \fIcount\fR bytes in \fIstring\fR. If \fIcount\fR is \fB*\fR or is larger than the number of bytes after the @@ -780,6 +752,7 @@ will return \fB2\fR with \fB1 2\fR stored in \fIvar1\fR and \fB020304\fR stored in \fIvar2\fR. .RE .SH "PORTABILITY ISSUES" +.PP The \fBr\fR, \fBR\fR, \fBq\fR and \fBQ\fR conversions will only work reliably for transferring data between computers which are all using IEEE floating point representations. This is very common, but not @@ -787,6 +760,7 @@ universal. To transfer floating-point numbers portably between all architectures, use their textual representation (as produced by \fBformat\fR) instead. .SH EXAMPLES +.PP This is a procedure to write a Tcl string to a binary-encoded channel as UTF-8 data preceded by a length word: .CS diff --git a/doc/catch.n b/doc/catch.n index 8ab44af..b108565 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.18 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -17,12 +17,11 @@ catch \- Evaluate script and trap exceptional returns .SH SYNOPSIS \fBcatch\fI script \fR?\fIresultVarName\fR? ?\fIoptionsVarName\fR? .BE - .SH DESCRIPTION .PP The \fBcatch\fR command may be used to prevent errors from aborting command -interpretation. The \fBcatch\fR command calls the Tcl interpreter recursively to -execute \fIscript\fR, and always returns without raising an error, +interpretation. The \fBcatch\fR command calls the Tcl interpreter recursively +to execute \fIscript\fR, and always returns without raising an error, regardless of any errors that might occur while executing \fIscript\fR. .PP If \fIscript\fR raises an error, \fBcatch\fR will return a non-zero integer @@ -39,12 +38,11 @@ and scripts that make use of the \fBreturn -code\fR command can also have return codes other than the five defined by Tcl. .PP If the \fIresultVarName\fR argument is given, then the variable it names is -set to the result of the script evaluation. When the return code from -the script is 1 (\fBTCL_ERROR\fR), the value stored in \fIresultVarName\fR is an error -message. When the return code from the script is 0 (\fBTCL_OK\fR), the value -stored in \fIresultVarName\fR is the value returned from \fIscript\fR. +set to the result of the script evaluation. When the return code from the +script is 1 (\fBTCL_ERROR\fR), the value stored in \fIresultVarName\fR is an +error message. When the return code from the script is 0 (\fBTCL_OK\fR), the +value stored in \fIresultVarName\fR is the value returned from \fIscript\fR. .PP -.VS 8.5 If the \fIoptionsVarName\fR argument is given, then the variable it names is set to a dictionary of return options returned by evaluation of \fIscript\fR. Tcl specifies two entries that are always @@ -77,8 +75,8 @@ Tcl packages may provide commands that set other entries in the dictionary of return options, and the \fBreturn\fR command may be used by scripts to set return options in addition to those defined above. -.VE 8.5 .SH EXAMPLES +.PP The \fBcatch\fR command may be used in an \fBif\fR to branch based on the success of a script. .CS @@ -90,9 +88,7 @@ if { [\fBcatch\fR {open $someFile w} fid] } { .PP There are more complex examples of \fBcatch\fR usage in the documentation for the \fBreturn\fR command. - .SH "SEE ALSO" break(n), continue(n), dict(n), error(n), return(n), tclvars(n) - .SH KEYWORDS catch, error diff --git a/doc/encoding.n b/doc/encoding.n index 554a977..1a6983d 100644 --- a/doc/encoding.n +++ b/doc/encoding.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: encoding.n,v 1.15 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: encoding.n,v 1.16 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH encoding n "8.1" Tcl "Tcl Built-In Commands" @@ -14,7 +14,6 @@ encoding \- Manipulate encodings .SH SYNOPSIS \fBencoding \fIoption\fR ?\fIarg arg ...\fR? .BE - .SH INTRODUCTION .PP Strings in Tcl are encoded using 16-bit Unicode characters. Different @@ -27,6 +26,7 @@ Performs one of several encoding related operations, depending on \fIoption\fR. The legal \fIoption\fRs are: .TP \fBencoding convertfrom\fR ?\fIencoding\fR? \fIdata\fR +. Convert \fIdata\fR to Unicode from the specified \fIencoding\fR. The characters in \fIdata\fR are treated as binary data where the lower 8-bits of each character is taken as a single byte. The resulting @@ -35,6 +35,7 @@ sequence of bytes is treated as a string in the specified system encoding is used. .TP \fBencoding convertto\fR ?\fIencoding\fR? \fIstring\fR +. Convert \fIstring\fR from Unicode to the specified \fIencoding\fR. The result is a sequence of bytes that represents the converted string. Each byte is stored in the lower 8-bits of a Unicode @@ -42,7 +43,7 @@ character. If \fIencoding\fR is not specified, the current system encoding is used. .TP \fBencoding dirs\fR ?\fIdirectoryList\fR? -.VS 8.5 +. Tcl can load encoding data files from the file system that describe additional encodings for it to work with. This command sets the search path for \fB*.enc\fR encoding data files to the list of directories @@ -52,13 +53,14 @@ search path. It is an error for \fIdirectoryList\fR to not be a valid list. If, when a search for an encoding data file is happening, an element in \fIdirectoryList\fR does not refer to a readable, searchable directory, that element is ignored. -.VE 8.5 .TP \fBencoding names\fR +. Returns a list containing the names of all of the encodings that are currently available. .TP \fBencoding system\fR ?\fIencoding\fR? +. Set the system encoding to \fIencoding\fR. If \fIencoding\fR is omitted then the command returns the current system encoding. The system encoding is used whenever Tcl passes strings to system calls. @@ -87,9 +89,7 @@ set s [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"] would return the Unicode string .QW "\eu306F" , which is the Hiragana letter HA. - .SH "SEE ALSO" Tcl_GetEncoding(3) - .SH KEYWORDS encoding diff --git a/doc/eval.n b/doc/eval.n index 6c73545..5156360 100644 --- a/doc/eval.n +++ b/doc/eval.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: eval.n,v 1.10 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: eval.n,v 1.11 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH eval n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ eval \- Evaluate a Tcl script .SH SYNOPSIS \fBeval \fIarg \fR?\fIarg ...\fR? .BE - .SH DESCRIPTION .PP \fBEval\fR takes one or more arguments, which together comprise a Tcl @@ -50,13 +49,11 @@ for {set i 0} {$i<10} {incr i} { } .CE .PP -.VS 8.5 Note that in the most common case (where the script fragment is actually just a list of words forming a command prefix), it is better to use \fB{*}$script\fR when doing this sort of invocation pattern. It is less general than the \fBeval\fR command, and hence easier to make robust in practice. -.VE 8.5 The following procedure acts in a way that is analogous to the \fBlappend\fR command, except it inserts the argument values at the start of the list in the variable: @@ -69,16 +66,12 @@ proc lprepend {varName args} { set var [\fBeval\fR [list linsert $var 0] $args] } .CE -.VS 8.5 However, the last line would now normally be written without \fBeval\fR, like this: .CS set var [linsert $var 0 {*}$args] .CE -.VE 8.5 - .SH "SEE ALSO" catch(n), concat(n), error(n), interp(n), list(n), namespace(n), subst(n), tclvars(n), uplevel(n) - .SH KEYWORDS concatenate, evaluate, script diff --git a/doc/exec.n b/doc/exec.n index 6d3db77..6626835 100644 --- a/doc/exec.n +++ b/doc/exec.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: exec.n,v 1.23 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: exec.n,v 1.24 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH exec n 8.5 Tcl "Tcl Built-In Commands" @@ -17,7 +17,6 @@ exec \- Invoke subprocesses .SH SYNOPSIS \fBexec \fR?\fIswitches\fR? \fIarg \fR?\fIarg ...\fR? .BE - .SH DESCRIPTION .PP This command treats its arguments as the specification @@ -32,16 +31,17 @@ of the pipeline specification. The following switches are currently supported: .TP 13 \fB\-ignorestderr\fR -.VS 8.5 +. Stops the \fBexec\fR command from treating the output of messages to the pipeline's standard error channel as an error case. -.VE 8.5 .TP 13 \fB\-keepnewline\fR +. Retains a trailing newline in the pipeline's output. Normally a trailing newline will be deleted. .TP 13 \fB\-\|\-\fR +. Marks the end of switches. The argument following this one will be treated as the first \fIarg\fR even if it starts with a \fB\-\fR. .PP @@ -57,64 +57,77 @@ or in the same argument with no intervening space (i.e. .QW \fB<\fIfileName\fR ). .TP 15 \fB|\fR +. Separates distinct commands in the pipeline. The standard output of the preceding command will be piped into the standard input of the next command. .TP 15 \fB|&\fR +. Separates distinct commands in the pipeline. Both standard output and standard error of the preceding command will be piped into the standard input of the next command. This form of redirection overrides forms such as 2> and >&. .TP 15 \fB<\0\fIfileName\fR +. The file named by \fIfileName\fR is opened and used as the standard input for the first command in the pipeline. .TP 15 \fB<@\0\fIfileId\fR +. \fIFileId\fR must be the identifier for an open file, such as the return value from a previous call to \fBopen\fR. It is used as the standard input for the first command in the pipeline. \fIFileId\fR must have been opened for reading. .TP 15 \fB<<\0\fIvalue\fR +. \fIValue\fR is passed to the first command as its standard input. .TP 15 \fB>\0\fIfileName\fR +. Standard output from the last command is redirected to the file named \fIfileName\fR, overwriting its previous contents. .TP 15 \fB2>\0\fIfileName\fR +. Standard error from all commands in the pipeline is redirected to the file named \fIfileName\fR, overwriting its previous contents. .TP 15 \fB>&\0\fIfileName\fR +. Both standard output from the last command and standard error from all commands are redirected to the file named \fIfileName\fR, overwriting its previous contents. .TP 15 \fB>>\0\fIfileName\fR +. Standard output from the last command is redirected to the file named \fIfileName\fR, appending to it rather than overwriting it. .TP 15 \fB2>>\0\fIfileName\fR +. Standard error from all commands in the pipeline is redirected to the file named \fIfileName\fR, appending to it rather than overwriting it. .TP 15 \fB>>&\0\fIfileName\fR +. Both standard output from the last command and standard error from all commands are redirected to the file named \fIfileName\fR, appending to it rather than overwriting it. .TP 15 \fB>@\0\fIfileId\fR +. \fIFileId\fR must be the identifier for an open file, such as the return value from a previous call to \fBopen\fR. Standard output from the last command is redirected to \fIfileId\fR's file, which must have been opened for writing. .TP 15 \fB2>@\0\fIfileId\fR +. \fIFileId\fR must be the identifier for an open file, such as the return value from a previous call to \fBopen\fR. Standard error from all commands in the pipeline is @@ -122,11 +135,13 @@ redirected to \fIfileId\fR's file. The file must have been opened for writing. .TP 15 \fB2>@1\0\fR +. Standard error from all commands in the pipeline is redirected to the command result. This operator is only valid at the end of the command pipeline. .TP 15 \fB>&@\0\fIfileId\fR +. \fIFileId\fR must be the identifier for an open file, such as the return value from a previous call to \fBopen\fR. Both standard output from the last command and standard error from @@ -135,12 +150,9 @@ The file must have been opened for writing. .PP If standard output has not been redirected then the \fBexec\fR command returns the standard output from the last command -in the pipeline, -.VS 8.5 -unless +in the pipeline, unless .QW 2>@1 was specified, in which case standard error is included as well. -.VE 8.5 If any of the commands in the pipeline exit abnormally or are killed or suspended, then \fBexec\fR will return an error and the error message will include the pipeline's output followed by @@ -149,9 +161,7 @@ error messages describing the abnormal terminations; the about the last abnormal termination encountered. If any of the commands writes to its standard error file and that standard error is not redirected -.VS 8.5 and \fB\-ignorestderr\fR is not specified, -.VE 8.5 then \fBexec\fR will return an error; the error message will include the pipeline's standard output, followed by messages about abnormal terminations (if any), followed by the standard error @@ -353,6 +363,7 @@ console window is not available to them. .RE .TP \fBUnix\fR\0\0\0\0\0\0\0 +. The \fBexec\fR command is fully functional and works as described. .SH "UNIX EXAMPLES" Here are some examples of the use of the \fBexec\fR command on Unix. diff --git a/doc/expr.n b/doc/expr.n index 9032835..613a3bc 100644 --- a/doc/expr.n +++ b/doc/expr.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: expr.n,v 1.34 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: expr.n,v 1.35 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH expr n 8.5 Tcl "Tcl Built-In Commands" @@ -43,7 +43,6 @@ and parentheses. White space may be used between the operands and operators and parentheses; it is ignored by the expression's instructions. Where possible, operands are interpreted as integer values. -.VS 8.5 Integer values may be specified in decimal (the normal case), in binary (if the first two characters of the operand are \fB0b\fR), in octal (if the first two characters of the operand are \fB0o\fR), or in hexadecimal @@ -60,7 +59,6 @@ the sign characters \fB+\fR or \fB\-\fR. For example, all of the following are valid floating-point numbers: 2.1, 3., 6e4, 7.91e+16. Also recognized as floating point values are the strings \fBInf\fR and \fBNaN\fR making use of any case for each character. -.VE 8.5 If no numeric interpretation is possible (note that all literal operands that are not numeric or boolean must be quoted with either braces or with double quotes), then an operand is left as a string @@ -91,7 +89,7 @@ the operand. As a mathematical function whose arguments have any of the above forms for operands, such as \fBsin($x)\fR. See \fBMATH FUNCTIONS\fR below for a discussion of how mathematical functions are handled. -.LP +.PP Where the above substitutions occur (e.g. inside quoted strings), they are performed by the expression's instructions. However, the command parser may already have performed one round of @@ -119,16 +117,17 @@ the \fBtcl::mathop\fR namespace; see the \fBmathop\fR(n) manual page for details) are listed below, grouped in decreasing order of precedence: .TP 20 \fB\-\0\0+\0\0~\0\0!\fR +. Unary minus, unary plus, bit-wise NOT, logical NOT. None of these operators may be applied to string operands, and bit-wise NOT may be applied only to integers. .TP 20 \fB**\fR -.VS 8.5 +. Exponentiation. Valid for any numeric operands. -.VE 8.5 .TP 20 \fB*\0\0/\0\0%\fR +. Multiply, divide, remainder. None of these operators may be applied to string operands, and remainder may be applied only to integers. @@ -136,66 +135,74 @@ The remainder will always have the same sign as the divisor and an absolute value smaller than the divisor. .TP 20 \fB+\0\0\-\fR +. Add and subtract. Valid for any numeric operands. .TP 20 \fB<<\0\0>>\fR +. Left and right shift. Valid for integer operands only. A right shift always propagates the sign bit. .TP 20 \fB<\0\0>\0\0<=\0\0>=\fR +. Boolean less, greater, less than or equal, and greater than or equal. Each operator produces 1 if the condition is true, 0 otherwise. These operators may be applied to strings as well as numeric operands, in which case string comparison is used. .TP 20 \fB==\0\0!=\fR +. Boolean equal and not equal. Each operator produces a zero/one result. Valid for all operand types. .TP 20 \fBeq\0\0ne\fR +. Boolean string equal and string not equal. Each operator produces a zero/one result. The operand types are interpreted only as strings. .TP 20 \fBin\0\0ni\fR -.VS 8.5 +. List containment and negated list containment. Each operator produces a zero/one result and treats its first argument as a string and its second argument as a Tcl list. The \fBin\fR operator indicates whether the first argument is a member of the second argument list; the \fBni\fR operator inverts the sense of the result. -.VE 8.5 .TP 20 \fB&\fR +. Bit-wise AND. Valid for integer operands only. .TP 20 \fB^\fR +. Bit-wise exclusive OR. Valid for integer operands only. .TP 20 \fB|\fR +. Bit-wise OR. Valid for integer operands only. .TP 20 \fB&&\fR +. Logical AND. Produces a 1 result if both operands are non-zero, 0 otherwise. Valid for boolean and numeric (integers or floating-point) operands only. .TP 20 \fB||\fR +. Logical OR. Produces a 0 result if both operands are zero, 1 otherwise. Valid for boolean and numeric (integers or floating-point) operands only. .TP 20 \fIx\fB?\fIy\fB:\fIz\fR +. If-then-else, as in C. If \fIx\fR evaluates to non-zero, then the result is the value of \fIy\fR. Otherwise the result is the value of \fIz\fR. The \fIx\fR operand must have a boolean or numeric value. -.LP +.PP See the C manual for more details on the results produced by each operator. -.VS 8.5 The exponentiation operator promotes types like the multiply and divide operators, and produces a result that is the same as the output of the \fBpow\fR function (after any type conversions.) -.VE 8.5 All of the binary operators group left-to-right within the same precedence level. For example, the command .CS @@ -224,7 +231,6 @@ and before invoking the \fBexpr\fR command. .SS "MATH FUNCTIONS" .PP -.VS 8.5 When the expression parser encounters a mathematical function such as \fBsin($x)\fR, it replaces it with a call to an ordinary Tcl function in the \fBtcl::mathfunc\fR namespace. The processing @@ -249,10 +255,8 @@ may as well (depending on the current \fBnamespace path\fR setting). .PP See the \fBmathfunc\fR(n) manual page for the math functions that are available by default. -.VE 8.5 .SS "TYPES, OVERFLOW, AND PRECISION" .PP -.VS 8.5 All internal computations involving integers are done calling on the LibTomMath multiple precision integer library as required so that all integer calculations are performed exactly. Note that in Tcl releases @@ -262,7 +266,6 @@ in those calculations where values overflowed the range of those types. Any code that relied on these implicit truncations will need to explicitly add \fBint()\fR or \fBwide()\fR function calls to expressions at the points where such truncation is required to take place. -.VE 8.5 .PP All internal computations involving floating-point are done with the C type \fIdouble\fR. @@ -351,12 +354,11 @@ The most expensive code is required for unbraced expressions that contain command substitutions. These expressions must be implemented by generating new code each time the expression is executed. -.VS 8.5 When the expression is unbraced to allow the substitution of a function or operator, consider using the commands documented in the \fBmathfunc\fR(n) or \fBmathop\fR(n) manual pages directly instead. -.VE 8.5 .SH EXAMPLES +.PP Define a procedure that computes an .QW interesting mathematical function: diff --git a/doc/incr.n b/doc/incr.n index 90fdb2e..e7587a6 100644 --- a/doc/incr.n +++ b/doc/incr.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: incr.n,v 1.6 2006/02/09 17:34:41 dgp Exp $ +'\" RCS: @(#) $Id: incr.n,v 1.7 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH incr n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ incr \- Increment the value of a variable .SH SYNOPSIS \fBincr \fIvarName \fR?\fIincrement\fR? .BE - .SH DESCRIPTION .PP Increments the value stored in the variable whose name is \fIvarName\fR. @@ -27,12 +26,11 @@ integer) is added to the value of variable \fIvarName\fR; otherwise The new value is stored as a decimal string in variable \fIvarName\fR and also returned as result. .PP -.VS 8.5 Starting with the Tcl 8.5 release, the variable \fIvarName\fR passed to \fBincr\fR may be unset, and in that case, it will be set to the value \fIincrement\fR or to the default increment value of \fB1\fR. -.VE 8.5 .SH EXAMPLES +.PP Add one to the contents of the variable \fIx\fR: .CS \fBincr\fR x @@ -55,9 +53,7 @@ an error if it is not): .CS \fBincr\fR x 0 .CE - .SH "SEE ALSO" expr(n) - .SH KEYWORDS add, increment, variable, value diff --git a/doc/info.n b/doc/info.n index 3072d13..0a53823 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.26 2008/05/31 11:42:12 dkf Exp $ +'\" RCS: @(#) $Id: info.n,v 1.27 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -19,7 +19,6 @@ info \- Return information about the state of the Tcl interpreter .SH SYNOPSIS \fBinfo \fIoption \fR?\fIarg arg ...\fR? .BE - .SH DESCRIPTION .PP This command provides information about various internals of the Tcl @@ -27,27 +26,30 @@ interpreter. The legal \fIoption\fRs (which may be abbreviated) are: .TP \fBinfo args \fIprocname\fR +. Returns a list containing the names of the arguments to procedure \fIprocname\fR, in order. \fIProcname\fR must be the name of a Tcl command procedure. .TP \fBinfo body \fIprocname\fR +. Returns the body of procedure \fIprocname\fR. \fIProcname\fR must be the name of a Tcl command procedure. .TP \fBinfo class\fI subcommand class\fR ?\fIarg ...\fR -. +.VS 8.6 Returns information about the class, \fIclass\fR. The \fIsubcommand\fRs are described in \fBCLASS INTROSPECTION\fR below. +.VE 8.6 .TP \fBinfo cmdcount\fR +. Returns a count of the total number of commands that have been invoked in this interpreter. .TP \fBinfo commands \fR?\fIpattern\fR? +. If \fIpattern\fR is not specified, -.\" Do not move this .VS above the .TP -.VS 8.5 returns a list of names of all the Tcl commands visible (i.e. executable without using a qualified name) to the current namespace, including both the built-in commands written in C and @@ -66,9 +68,9 @@ of the specified namespace, and only the commands defined in the named namespace are returned. .\" Technically, most of this hasn't changed; that's mostly just the .\" way it always worked. Hardly anyone knew that though. -.VE 8.5 .TP \fBinfo complete \fIcommand\fR +. Returns 1 if \fIcommand\fR is a complete Tcl command in the sense of having no unclosed quotes, braces, brackets or array element names. If the command does not appear to be complete then 0 is returned. @@ -78,6 +80,7 @@ command is not complete, the script can delay evaluating it until additional lines have been typed to complete the command. .TP \fBinfo default \fIprocname arg varname\fR +. \fIProcname\fR must be the name of a Tcl command procedure and \fIarg\fR must be the name of an argument to that procedure. If \fIarg\fR does not have a default value then the command returns \fB0\fR. @@ -85,11 +88,13 @@ Otherwise it returns \fB1\fR and places the default value of \fIarg\fR into variable \fIvarname\fR. .TP \fBinfo exists \fIvarName\fR +. Returns \fB1\fR if the variable named \fIvarName\fR exists in the current context (either as a global or local variable) and has been defined by being given a value, returns \fB0\fR otherwise. .TP \fBinfo frame\fR ?\fInumber\fR? +. This command provides access to all frames on the stack, even those hidden from \fBinfo level\fR. If \fInumber\fR is not specified, this command returns a number giving the frame level of the command. This @@ -120,28 +125,34 @@ The result dictionary may contain the keys listed below, with the specified meanings for their values: .TP \fBtype\fR +. This entry is always present and describes the nature of the location for the command. The recognized values are \fBsource\fR, \fBproc\fR, \fBeval\fR, and \fBprecompiled\fR. .RS .TP \fBsource\fR\0\0\0\0\0\0\0\0 +. means that the command is found in a script loaded by the \fBsource\fR command. .TP \fBproc\fR\0\0\0\0\0\0\0\0 +. means that the command is found in dynamically created procedure body. .TP \fBeval\fR\0\0\0\0\0\0\0\0 +. means that the command is executed by \fBeval\fR or \fBuplevel\fR. .TP \fBprecompiled\fR\0\0\0\0\0\0\0\0 +. means that the command is found in a precompiled script (loadable by the package \fBtbcload\fR), and no further information will be available. .RE .TP \fBline\fR +. This entry provides the number of the line the command is at inside of the script it is a part of. This information is not present for type \fBprecompiled\fR. For type \fBsource\fR this information is counted @@ -149,10 +160,12 @@ relative to the beginning of the file, whereas for the last two types the line is counted relative to the start of the script. .TP \fBfile\fR +. This entry is present only for type \fBsource\fR. It provides the normalized path of the file the command is in. .TP \fBcmd\fR +. This entry provides the string representation of the command. This is usually the unsubstituted form, however for commands which are a pure list executed by eval it is the substituted form as they have no other @@ -160,15 +173,18 @@ string representation. Care is taken that the pure-List property of the latter is not spoiled. .TP \fBproc\fR +. This entry is present only if the command is found in the body of a regular Tcl procedure. It then provides the name of that procedure. .TP \fBlambda\fR +. This entry is present only if the command is found in the body of an anonymous Tcl procedure, i.e. a lambda. It then provides the entire definition of the lambda in question. .TP \fBlevel\fR +. This entry is present only if the queried frame has a corresponding frame returned by \fBinfo level\fR. It provides the index of this frame, relative to the current level (0 and negative numbers). @@ -199,6 +215,7 @@ counted relative to the start of each word (smallest scope) .RE .TP \fBinfo functions \fR?\fIpattern\fR? +. If \fIpattern\fR is not specified, returns a list of all the math functions currently defined. If \fIpattern\fR is specified, only those functions whose name matches @@ -206,6 +223,7 @@ If \fIpattern\fR is specified, only those functions whose name matches rules as for \fBstring match\fR. .TP \fBinfo globals \fR?\fIpattern\fR? +. If \fIpattern\fR is not specified, returns a list of all the names of currently-defined global variables. Global variables are variables in the global namespace. @@ -214,6 +232,7 @@ are returned. Matching is determined using the same rules as for \fBstring match\fR. .TP \fBinfo hostname\fR +. Returns the name of the computer on which this invocation is being executed. Note that this name is not guaranteed to be the fully qualified domain @@ -223,6 +242,7 @@ installed,) it is the name that is suitable for TCP/IP networking that is returned. .TP \fBinfo level\fR ?\fInumber\fR? +. If \fInumber\fR is not specified, this command returns a number giving the stack level of the invoking procedure, or 0 if the command is invoked at top-level. If \fInumber\fR is specified, @@ -236,6 +256,7 @@ See the \fBuplevel\fR command for more information on what stack levels mean. .TP \fBinfo library\fR +. Returns the name of the library directory in which standard Tcl scripts are stored. This is actually the value of the \fBtcl_library\fR @@ -243,6 +264,7 @@ variable and may be changed by setting \fBtcl_library\fR. See the \fBtclvars\fR manual entry for more information. .TP \fBinfo loaded \fR?\fIinterp\fR? +. Returns a list describing all of the packages that have been loaded into \fIinterp\fR with the \fBload\fR command. Each list element is a sub-list with two elements consisting of the @@ -255,6 +277,7 @@ To get a list of just the packages in the current interpreter, specify an empty string for the \fIinterp\fR argument. .TP \fBinfo locals \fR?\fIpattern\fR? +. If \fIpattern\fR is not specified, returns a list of all the names of currently-defined local variables, including arguments to the current procedure, if any. @@ -265,20 +288,24 @@ are returned. Matching is determined using the same rules as for \fBstring match\fR. .TP \fBinfo nameofexecutable\fR +. Returns the full path name of the binary file from which the application was invoked. If Tcl was unable to identify the file, then an empty string is returned. .TP \fBinfo object\fI subcommand object\fR ?\fIarg ...\fR -. +.VS 8.6 Returns information about the object, \fIobject\fR. The \fIsubcommand\fRs are described in \fBOBJECT INTROSPECTION\fR below. +.VE 8.6 .TP \fBinfo patchlevel\fR +. Returns the value of the global variable \fBtcl_patchLevel\fR; see the \fBtclvars\fR manual entry for more information. .TP \fBinfo procs \fR?\fIpattern\fR? +. If \fIpattern\fR is not specified, returns a list of all the names of Tcl command procedures in the current namespace. If \fIpattern\fR is specified, @@ -293,6 +320,7 @@ within; the matching pattern is taken to be the part after the last namespace separator. .TP \fBinfo script\fR ?\fIfilename\fR? +. If a Tcl script file is currently being evaluated (i.e. there is a call to \fBTcl_EvalFile\fR active or there is an active invocation of the \fBsource\fR command), then this command returns the name @@ -303,16 +331,19 @@ useful in virtual file system applications. Otherwise the command returns an empty string. .TP \fBinfo sharedlibextension\fR +. Returns the extension used on this platform for the names of files containing shared libraries (for example, \fB.so\fR under Solaris). If shared libraries are not supported on this platform then an empty string is returned. .TP \fBinfo tclversion\fR +. Returns the value of the global variable \fBtcl_version\fR; see the \fBtclvars\fR manual entry for more information. .TP \fBinfo vars\fR ?\fIpattern\fR? +. If \fIpattern\fR is not specified, returns a list of all the names of currently-visible variables. This includes locals and currently-visible globals. @@ -333,173 +364,203 @@ Note that a currently-visible variable may not yet if it has not been set (e.g. a variable declared but not set by \fBvariable\fR). .SS "CLASS INTROSPECTION" +.VS 8.6 .PP The following \fIsubcommand\fR values are supported by \fBinfo class\fR: +.VE 8.6 .TP \fBinfo class constructor\fI class\fR -. +.VS 8.6 This subcommand returns a description of the definition of the constructor of class \fIclass\fR. The defintion is described as a two element list; the first element is the list of arguments to the constructor in a form suitable for passing to another call to \fBproc\fR or a method defintion, and the second element is the body of the constructor. If no constructor is present, this returns the empty list. +.VE 8.6 .TP \fBinfo class definition\fI class method\fR -. +.VS 8.6 This subcommand returns a description of the definition of the method named \fImethod\fR of class \fIclass\fR. The defintion is described as a two element list; the first element is the list of arguments to the method in a form suitable for passing to another call to \fBproc\fR or a method defintion, and the second element is the body of the method. +.VE 8.6 .TP \fBinfo class destructor\fI class\fR -. +.VS 8.6 This subcommand returns the body of the destructor of class \fIclass\fR. If no destructor is present, this returns the empty string. +.VE 8.6 .TP \fBinfo class filters\fI class\fR -. +.VS 8.6 This subcommand returns the list of filter methods set on the class. +.VE 8.6 .TP \fBinfo class forward\fI class method\fR -. +.VS 8.6 This subcommand returns the argument list for the method forwarding called \fImethod\fR that is set on the class called \fIclass\fR. +.VE 8.6 .TP \fBinfo class instances\fI class\fR ?\fIpattern\fR? -. +.VS 8.6 This subcommand returns a list of instances of class \fIclass\fR. If the optional \fIpattern\fR argument is present, it constrains the list of returned instances to those that match it according to the rules of \fBstring match\fR. +.VE 8.6 .TP \fBinfo class methods\fI class\fR ?\fIoptions...\fR? -. +.VS 8.6 This subcommand returns a list of all public (i.e. exported) methods of the class called \fIclass\fR. Any of the following \fIoption\fRs may be specified, controlling exactly which method names are returned: .RS +.VE 8.6 .TP \fB\-all\fR -. +.VS 8.6 If the \fB\-all\fR flag is given, the list of methods will include those methods defined not just by the class, but also by the class's superclasses and mixins. +.VE 8.6 .TP \fB\-private\fR -. +.VS 8.6 If the \fB\-private\fR flag is given, the list of methods will also include the private (i.e. non-exported) methods of the class (and superclasses and mixins, if \fB\-all\fR is also given). .RE +.VE 8.6 .TP \fBinfo class mixins\fI class\fR -. +.VS 8.6 This subcommand returns a list of all classes that have been mixed into the class named \fIclass\fR. +.VE 8.6 .TP \fBinfo class subclasses\fI class\fR ?\fIpattern\fR? -. +.VS 8.6 This subcommand returns a list of direct subclasses of class \fIclass\fR. If the optional \fIpattern\fR argument is present, it constrains the list of returned classes to those that match it according to the rules of \fBstring match\fR. +.VE 8.6 .TP \fBinfo class superclasses\fI class\fR -. +.VS 8.6 This subcommand returns a list of direct superclasses of class \fIclass\fR in inheritance precedence order. .SS "OBJECT INTROSPECTION" .PP The following \fIsubcommand\fR values are supported by \fBinfo object\fR: +.VE 8.6 .TP \fBinfo object class\fI object\fR ?\fIclassName\fR? -. +.VS 8.6 If \fIclassName\fR is unspecified, this subcommand returns class of the \fIobject\fR object. If \fIclassName\fR is present, this subcommand returns a boolean value indicating whether the \fIobject\fR is of that class. +.VE 8.6 .TP \fBinfo object definition\fI object method\fR -. +.VS 8.6 This subcommand returns a description of the definition of the method named \fImethod\fR of object \fIobject\fR. The defintion is described as a two element list; the first element is the list of arguments to the method in a form suitable for passing to another call to \fBproc\fR or a method defintion, and the second element is the body of the method. +.VE 8.6 .TP \fBinfo object filters\fI object\fR -. +.VS 8.6 This subcommand returns the list of filter methods set on the object. +.VE 8.6 .TP \fBinfo object forward\fI object method\fR -. +.VS 8.6 This subcommand returns the argument list for the method forwarding called \fImethod\fR that is set on the object called \fIobject\fR. +.VE 8.6 .TP \fBinfo object isa\fI category object\fR ?\fIarg\fR? -. +.VS 8.6 This subcommand tests whether an object belongs to a particular category, returning a boolean value that indicates whether the \fIobject\fR argument meets the criteria for the category. The supported categories are: +.VE 8.6 .RS .TP \fBinfo object isa class\fI object\fR -. +.VS 8.6 This returns whether \fIobject\fR is a class (i.e. an instance of \fBoo::class\fR or one of its subclasses). +.VE 8.6 .TP \fBinfo object isa metaclass\fI object\fR -. +.VS 8.6 This returns whether \fIobject\fR is a class that can manufacture classes (i.e. is \fBoo::class\fR or a subclass of it). +.VE 8.6 .TP \fBinfo object isa mixin\fI object class\fR -. +.VS 8.6 This returns whether \fIclass\fR is directly mixed into \fIobject\fR. +.VE 8.6 .TP \fBinfo object isa object\fI object\fR -. +.VS 8.6 This returns whether \fIobject\fR really is an object. +.VE 8.6 .TP \fBinfo object isa typeof\fI object class\fR -. +.VS 8.6 This returns whether \fIclass\fR is the type of \fIobject\fR (i.e. whether \fIobject\fR is an instance of \fIclass\fR or one of its subclasses, whether direct or indirect). .RE +.VE 8.6 .TP \fBinfo object methods\fI object\fR ?\fIoption...\fR? -. +.VS 8.6 This subcommand returns a list of all public (i.e. exported) methods of the object called \fIobject\fR. Any of the following \fIoption\fRs may be specified, controlling exactly which method names are returned: .RS +.VE 8.6 .TP \fB\-all\fR -. +.VS 8.6 If the \fB\-all\fR flag is given, the list of methods will include those methods defined not just by the object, but also by the object's class and mixins, plus the superclasses of those classes. +.VE 8.6 .TP \fB\-private\fR -. +.VS 8.6 If the \fB\-private\fR flag is given, the list of methods will also include the private (i.e. non-exported) methods of the object (and classes, if \fB\-all\fR is also given). .RE +.VE 8.6 .TP \fBinfo object mixins\fI object\fR -. +.VS 8.6 This subcommand returns a list of all classes that have been mixed into the object named \fIobject\fR. +.VE 8.6 .TP \fBinfo object vars\fI object\fR ?\fIpattern\fR? -. +.VS 8.6 This subcommand returns a list of all variables in the private namespace of the object named \fIobject\fR. If the optional \fIpattern\fR argument is given, it is a filter (in the syntax of a \fBstring match\fR glob pattern) that constrains the list of variables returned. +.VE 8.6 .SH EXAMPLES +.PP This command prints out a procedure suitable for saving in a Tcl script: .PP @@ -520,6 +581,7 @@ proc printProc {procName} { } .CE .SS "EXAMPLES WITH OBJECTS" +.VS 8.6 .PP Every object necessarily knows what its class is; this information is trivially extractable through introspection: @@ -552,10 +614,16 @@ proc getDef {obj method} { return [\fBinfo class definition\fR $cls $method] } .CE +.VE 8.6 .SH "SEE ALSO" +.VS 8.6 global(n), oo::class(n), oo::object(n), proc(n), self(n) +.VE 8.6 .SH KEYWORDS -command, information, interpreter, introspection, level, namespace, object, +command, information, interpreter, introspection, level, namespace, +.VS 8.6 +object, +.VE 8.6 procedure, variable .\" Local Variables: .\" mode: nroff diff --git a/doc/lindex.n b/doc/lindex.n index d13924b..ac17d25 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lindex.n,v 1.17 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: lindex.n,v 1.18 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH lindex n 8.4 Tcl "Tcl Built-In Commands" @@ -46,11 +46,9 @@ substitution and command substitution do not occur. If \fIindex\fR is negative or greater than or equal to the number of elements in \fIvalue\fR, then an empty string is returned. -.VS 8.5 The interpretation of each simple \fIindex\fR value is the same as for the command \fBstring index\fR, supporting simple index arithmetic and indices relative to the end of the list. -.VE 8.5 .PP If additional \fIindex\fR arguments are supplied, then each argument is used in turn to select an element from the previous indexing operation, @@ -67,6 +65,7 @@ is synonymous with lindex [lindex [lindex $a 1] 2] 3 .CE .SH EXAMPLES +.PP .CS \fBlindex\fR {a b c} \fI\(-> a b c\fR @@ -92,9 +91,6 @@ lindex [lindex [lindex $a 1] 2] 3 .SH "SEE ALSO" list(n), lappend(n), linsert(n), llength(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n), -.VS 8.5 string(n) -.VE - .SH KEYWORDS element, index, list diff --git a/doc/linsert.n b/doc/linsert.n index 5930a90..79ec3ff 100644 --- a/doc/linsert.n +++ b/doc/linsert.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: linsert.n,v 1.14 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: linsert.n,v 1.15 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH linsert n 8.2 Tcl "Tcl Built-In Commands" @@ -17,7 +17,6 @@ linsert \- Insert elements into a list .SH SYNOPSIS \fBlinsert \fIlist index element \fR?\fIelement element ...\fR? .BE - .SH DESCRIPTION .PP This command produces a new list from \fIlist\fR by inserting all of the @@ -25,12 +24,11 @@ This command produces a new list from \fIlist\fR by inserting all of the \fIlist\fR. Each \fIelement\fR argument will become a separate element of the new list. If \fIindex\fR is less than or equal to zero, then the new elements are inserted at the beginning of the list. -.VS 8.5 The interpretation of the \fIindex\fR value is the same as for the command \fBstring index\fR, supporting simple index arithmetic and indices relative to the end of the list. -.VE .SH EXAMPLE +.PP Putting some values into a list, first indexing from the start and then indexing from the end, and then chaining them together: .CS @@ -40,13 +38,9 @@ set newList [\fBlinsert\fR $midList end-1 lazy] # The old lists still exist though... set newerList [\fBlinsert\fR [\fBlinsert\fR $oldList end-1 quick] 1 lazy] .CE - .SH "SEE ALSO" list(n), lappend(n), lindex(n), llength(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n), -.VS 8.5 string(n) -.VE - .SH KEYWORDS element, insert, list diff --git a/doc/list.n b/doc/list.n index 8413834..87cdcd6 100644 --- a/doc/list.n +++ b/doc/list.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: list.n,v 1.11 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: list.n,v 1.12 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH list n "" Tcl "Tcl Built-In Commands" @@ -17,7 +17,6 @@ list \- Create a list .SH SYNOPSIS \fBlist \fR?\fIarg arg ...\fR? .BE - .SH DESCRIPTION .PP This command returns a list comprised of all the \fIarg\fRs, @@ -30,6 +29,7 @@ its arguments. \fBList\fR produces slightly different results than \fBconcat\fR: \fBconcat\fR removes one level of grouping before forming the list, while \fBlist\fR works directly from the original arguments. .SH EXAMPLE +.PP The command .CS \fBlist\fR a b "c d e " " f {g h}" @@ -42,13 +42,9 @@ while \fBconcat\fR with the same arguments will return .CS \fBa b c d e f {g h}\fR .CE - .SH "SEE ALSO" lappend(n), lindex(n), linsert(n), llength(n), lrange(n), -.VS 8.5 lrepeat(n), -.VE 8.5 lreplace(n), lsearch(n), lset(n), lsort(n) - .SH KEYWORDS element, list diff --git a/doc/load.n b/doc/load.n index b35f320..4982c96 100644 --- a/doc/load.n +++ b/doc/load.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: load.n,v 1.22 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: load.n,v 1.23 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH load n 7.5 Tcl "Tcl Built-In Commands" @@ -19,7 +19,6 @@ load \- Load machine code and initialize new commands .br \fBload \fIfileName packageName interp\fR .BE - .SH DESCRIPTION .PP This command loads binary code from a file into the @@ -59,7 +58,8 @@ on Safe\-Tcl, see the \fBsafe\fR manual entry. .PP The initialization procedure must match the following prototype: .CS -typedef int Tcl_PackageInitProc(Tcl_Interp *\fIinterp\fR); +typedef int \fBTcl_PackageInitProc\fR( + Tcl_Interp *\fIinterp\fR); .CE The \fIinterp\fR argument identifies the interpreter in which the package is to be loaded. The initialization procedure must return @@ -73,12 +73,10 @@ in an application. If a given \fIfileName\fR is loaded into multiple interpreters, then the first \fBload\fR will load the code and call the initialization procedure; subsequent \fBload\fRs will call the initialization procedure without loading the code again. -.VS 8.5 For Tcl versions lower than 8.5, it is not possible to unload or reload a package. From version 8.5 however, the \fBunload\fR command allows the unloading of libraries loaded with \fBload\fR, for libraries that are aware of the Tcl's unloading mechanism. -.VE 8.5 .PP The \fBload\fR command also supports packages that are statically linked with the application, if those packages have been registered @@ -131,6 +129,7 @@ be loaded into the process's address space multiple times. The behavior of this varies from system to system (some systems may detect the redundant loads, others may not). .SH EXAMPLE +.PP The following is a minimal extension: .PP .CS @@ -169,9 +168,7 @@ switch $tcl_platform(platform) { # Now execute the command defined by the extension foo .CE - .SH "SEE ALSO" info sharedlibextension, Tcl_StaticPackage(3), safe(n) - .SH KEYWORDS binary code, loading, safe interpreter, shared library diff --git a/doc/lrange.n b/doc/lrange.n index 290e37f..830d7fa 100644 --- a/doc/lrange.n +++ b/doc/lrange.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lrange.n,v 1.17 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: lrange.n,v 1.18 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH lrange n 7.4 Tcl "Tcl Built-In Commands" @@ -17,18 +17,15 @@ lrange \- Return one or more adjacent elements from a list .SH SYNOPSIS \fBlrange \fIlist first last\fR .BE - .SH DESCRIPTION .PP \fIList\fR must be a valid Tcl list. This command will return a new list consisting of elements \fIfirst\fR through \fIlast\fR, inclusive. -.VS 8.5 The index values \fIfirst\fR and \fIlast\fR are interpreted the same as index values for the command \fBstring index\fR, supporting simple index arithmetic and indices relative to the end of the list. -.VE If \fIfirst\fR is less than zero, it is treated as if it were zero. If \fIlast\fR is greater than or equal to the number of elements in the list, then it is treated as if it were \fBend\fR. @@ -70,13 +67,9 @@ elements to % \fBlrange\fR $var 1 1 {elements to} .CE - .SH "SEE ALSO" list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lset(n), lreplace(n), lsort(n), -.VS 8.5 string(n) -.VE - .SH KEYWORDS element, list, range, sublist diff --git a/doc/lreplace.n b/doc/lreplace.n index deda8d9..605e46f 100644 --- a/doc/lreplace.n +++ b/doc/lreplace.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lreplace.n,v 1.19 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: lreplace.n,v 1.20 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH lreplace n 7.4 Tcl "Tcl Built-In Commands" @@ -21,7 +21,6 @@ lreplace \- Replace elements in a list with new elements .PP \fBlreplace\fR returns a new list formed by replacing one or more elements of \fIlist\fR with the \fIelement\fR arguments. -.VS 8.5 \fIfirst\fR and \fIlast\fR are index values specifying the first and last elements of the range to replace. The index values \fIfirst\fR and \fIlast\fR are interpreted @@ -31,7 +30,6 @@ end of the list. 0 refers to the first element of the list, and \fBend\fR refers to the last element of the list. If \fIlist\fR is empty, then \fIfirst\fR and \fIlast\fR are ignored. -.VE .PP If \fIfirst\fR is less than zero, it is considered to refer to before the first element of the list. For non-empty lists, the element indicated @@ -49,6 +47,7 @@ the list. If no \fIelement\fR arguments are specified, then the elements between \fIfirst\fR and \fIlast\fR are simply deleted. If \fIlist\fR is empty, any \fIelement\fR arguments are added to the end of the list. .SH EXAMPLES +.PP Replacing an element of a list with another: .CS % \fBlreplace\fR {a b c d e} 1 1 foo @@ -80,8 +79,6 @@ proc lremove {listVariable value} { .SH "SEE ALSO" list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lset(n), lrange(n), lsort(n), -.VS 8.5 string(n) -.VE .SH KEYWORDS element, list, replace diff --git a/doc/lsearch.n b/doc/lsearch.n index 3457237..b5f950d 100644 --- a/doc/lsearch.n +++ b/doc/lsearch.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsearch.n,v 1.34 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: lsearch.n,v 1.35 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH lsearch n 8.5 Tcl "Tcl Built-In Commands" @@ -18,7 +18,6 @@ lsearch \- See if a list contains a particular element .SH SYNOPSIS \fBlsearch \fR?\fIoptions\fR? \fIlist pattern\fR .BE - .SH DESCRIPTION .PP This command searches the elements of \fIlist\fR to see if one @@ -29,24 +28,29 @@ If not, the command returns \fB\-1\fR. The \fIoption\fR arguments indicates how the elements of the list are to be matched against \fIpattern\fR and must have one of the values below: .SS "MATCHING STYLE OPTIONS" +.PP If all matching style options are omitted, the default matching style is \fB\-glob\fR. If more than one matching style is specified, the last matching style given takes precedence. .TP \fB\-exact\fR +. \fIPattern\fR is a literal string that is compared for exact equality against each list element. .TP \fB\-glob\fR +. \fIPattern\fR is a glob-style pattern which is matched against each list element using the same rules as the \fBstring match\fR command. .TP \fB\-regexp\fR +. \fIPattern\fR is treated as a regular expression and matched against each list element using the rules described in the \fBre_syntax\fR reference page. .TP \fB\-sorted\fR +. The list elements are in sorted order. If this option is specified, \fBlsearch\fR will use a more efficient searching algorithm to search \fIlist\fR. If no other options are specified, \fIlist\fR is assumed @@ -55,6 +59,7 @@ option is mutually exclusive with \fB\-glob\fR and \fB\-regexp\fR, and is treated exactly like \fB\-exact\fR when either \fB\-all\fR or \fB\-not\fR are specified. .SS "GENERAL MODIFIER OPTIONS" +.PP These options may be given with all matching styles. .TP \fB\-all\fR @@ -65,32 +70,36 @@ indices will be in numeric order. If values are returned, the order of the values will be the order of those values within the input \fIlist\fR. .TP \fB\-inline\fR +. The matching value is returned instead of its index (or an empty string if no value matches.) If \fB\-all\fR is also specified, then the result of the command is the list of all values that matched. .TP \fB\-not\fR +. This negates the sense of the match, returning the index of the first non-matching value in the list. .TP \fB\-start\fR\0\fIindex\fR +. The list is searched starting at position \fIindex\fR. -.VS 8.5 The interpretation of the \fIindex\fR value is the same as for the command \fBstring index\fR, supporting simple index arithmetic and indices relative to the end of the list. -.VE 8.5 .SS "CONTENTS DESCRIPTION OPTIONS" +.PP These options describe how to interpret the items in the list being searched. They are only meaningful when used with the \fB\-exact\fR and \fB\-sorted\fR options. If more than one is specified, the last one takes precedence. The default is \fB\-ascii\fR. .TP \fB\-ascii\fR +. The list elements are to be examined as Unicode strings (the name is for backward-compatibility reasons.) .TP \fB\-dictionary\fR +. The list elements are to be compared using dictionary-style comparisons (see \fBlsort\fR for a fuller description). Note that this only makes a meaningful difference from the \fB\-ascii\fR option when @@ -98,48 +107,54 @@ the \fB\-sorted\fR option is given, because values are only dictionary-equal when exactly equal. .TP \fB\-integer\fR +. The list elements are to be compared as integers. -.VS 8.5 .TP \fB\-nocase\fR +. Causes comparisons to be handled in a case-insensitive manner. Has no effect if combined with the \fB\-dictionary\fR, \fB\-integer\fR, or \fB\-real\fR options. -.VE 8.5 .TP \fB\-real\fR +. The list elements are to be compared as floating-point values. .SS "SORTED LIST OPTIONS" +.PP These options (only meaningful with the \fB\-sorted\fR option) specify how the list is sorted. If more than one is given, the last one takes precedence. The default option is \fB\-increasing\fR. .TP \fB\-decreasing\fR +. The list elements are sorted in decreasing order. This option is only meaningful when used with \fB\-sorted\fR. .TP \fB\-increasing\fR +. The list elements are sorted in increasing order. This option is only meaningful when used with \fB\-sorted\fR. .SS "NESTED LIST OPTIONS" -.VS 8.5 +.PP These options are used to search lists of lists. They may be used with any other options. .TP \fB\-index\fR\0\fIindexList\fR +. This option is designed for use when searching within nested lists. The \fIindexList\fR argument gives a path of indices (much as might be used with the \fBlindex\fR or \fBlset\fR commands) within each element to allow the location of the term being matched against. .TP \fB\-subindices\fR +. If this option is given, the index result from this command (or every index result when \fB\-all\fR is also specified) will be a complete path (suitable for use with \fBlindex\fR or \fBlset\fR) within the overall list to the term found. This option has no effect unless the \fI\-index\fR is also specified, and is just a convenience short-cut. -.VE 8.5 .SH EXAMPLES +.PP Basic searching: .CS \fBlsearch\fR {a b c d e} c @@ -182,9 +197,7 @@ It is also possible to search inside elements: .SH "SEE ALSO" foreach(n), list(n), lappend(n), lindex(n), linsert(n), llength(n), lset(n), lsort(n), lrange(n), lreplace(n), -.VS 8.5 string(n) -.VE .SH KEYWORDS list, match, pattern, regular expression, search, string '\" Local Variables: diff --git a/doc/lset.n b/doc/lset.n index 8ccfe64..b13f2b1 100755 --- a/doc/lset.n +++ b/doc/lset.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lset.n,v 1.15 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: lset.n,v 1.16 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH lset n 8.4 Tcl "Tcl Built-In Commands" @@ -52,11 +52,9 @@ command. If \fIindex\fR is negative or greater than or equal to the number of elements in \fI$varName\fR, then an error occurs. .PP -.VS 8.5 The interpretation of each simple \fIindex\fR value is the same as for the command \fBstring index\fR, supporting simple index arithmetic and indices relative to the end of the list. -.VE 8.5 .PP If additional \fIindex\fR arguments are supplied, then each argument is used in turn to address an element within a sublist designated @@ -77,6 +75,7 @@ argument must be strictly less than the length of the corresponding list. In other words, the \fBlset\fR command cannot change the size of a list. If an index is outside the permitted range, an error is reported. .SH EXAMPLES +.PP In each of these examples, the initial value of \fIx\fR is: .CS set x [list [list a b c] [list d e f] [list g h i]] @@ -121,10 +120,6 @@ The indicated return value also becomes the new value of \fIx\fR. .SH "SEE ALSO" list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lsort(n), lrange(n), lreplace(n), -.VS 8.5 string(n) -.VE - - .SH KEYWORDS element, index, list, replace, set diff --git a/doc/lsort.n b/doc/lsort.n index e2f4c15..ec80885 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsort.n,v 1.29 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: lsort.n,v 1.30 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH lsort n 8.5 Tcl "Tcl Built-In Commands" @@ -18,7 +18,6 @@ lsort \- Sort the elements of a list .SH SYNOPSIS \fBlsort \fR?\fIoptions\fR? \fIlist\fR .BE - .SH DESCRIPTION .PP This command sorts the elements of \fIlist\fR, returning a new @@ -32,10 +31,12 @@ specified before \fIlist\fR to control the sorting process (unique abbreviations are accepted): .TP 20 \fB\-ascii\fR +. Use string comparison with Unicode code-point collation order (the name is for backward-compatibility reasons.) This is the default. .TP 20 \fB\-dictionary\fR +. Use dictionary-style comparison. This is the same as \fB\-ascii\fR except (a) case is ignored except as a tie-breaker and (b) if two strings contain embedded numbers, the numbers compare as integers, @@ -44,12 +45,15 @@ sorts between \fBbigbang\fR and \fBbigboy\fR, and \fBx10y\fR sorts between \fBx9y\fR and \fBx11y\fR. .TP 20 \fB\-integer\fR +. Convert list elements to integers and use integer comparison. .TP 20 \fB\-real\fR +. Convert list elements to floating-point values and use floating comparison. .TP 20 \fB\-command\0\fIcommand\fR +. Use \fIcommand\fR as a comparison command. To compare two elements, evaluate a Tcl script consisting of \fIcommand\fR with the two elements appended as additional @@ -59,29 +63,29 @@ be considered less than, equal to, or greater than the second, respectively. .TP 20 \fB\-increasing\fR +. Sort the list in increasing order .PQ smallest "items first" . This is the default. .TP 20 \fB\-decreasing\fR +. Sort the list in decreasing order .PQ largest "items first" . .TP 20 \fB\-indices\fR -.VS "8.5 (TIP#217)" +. Return a list of indices into \fIlist\fR in sorted order instead of the values themselves. -.VE "8.5 (TIP#217)" .TP 20 \fB\-index\0\fIindexList\fR +. If this option is specified, each of the elements of \fIlist\fR must itself be a proper Tcl sublist. Instead of sorting based on whole sublists, \fBlsort\fR will extract the \fIindexList\fR'th element from each sublist -.VS 8.5 (as if the overall element and the \fIindexList\fR were passed to \fBlindex\fR) and sort based on the given element. -.VE 8.5 For example, .RS .CS @@ -97,7 +101,6 @@ lsort -index end-1 \e {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}} .CE returns \fB{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}\fR, -.VS 8.5 and .CS lsort -index {0 1} { @@ -108,19 +111,18 @@ lsort -index {0 1} { .CE returns \fB{{d e m o} 34512} {{b i g} 12345} {{c o d e} 54321}\fR (because \fBe\fR sorts before \fBi\fR which sorts before \fBo\fR.) -.VE 8.5 This option is much more efficient than using \fB\-command\fR to achieve the same effect. .RE -.VS 8.5 .TP 20 \fB\-nocase\fR +. Causes comparisons to be handled in a case-insensitive manner. Has no effect if combined with the \fB\-dictionary\fR, \fB\-integer\fR, or \fB\-real\fR options. -.VE 8.5 .TP 20 \fB\-unique\fR +. If this option is specified, then only the last set of duplicate elements found in the list will be retained. Note that duplicates are determined relative to the comparison used in the sort. Thus if @@ -200,10 +202,8 @@ More complex sorting using a comparison function: {{3 apple} {0x2 carrot} {1 dingo} {2 banana}} {1 dingo} {2 banana} {0x2 carrot} {3 apple} .CE - .SH "SEE ALSO" list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lset(n), lrange(n), lreplace(n) - .SH KEYWORDS element, list, order, sort diff --git a/doc/mathfunc.n b/doc/mathfunc.n index a84c095..dd89a4c 100644 --- a/doc/mathfunc.n +++ b/doc/mathfunc.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: mathfunc.n,v 1.21 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: mathfunc.n,v 1.22 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH mathfunc n 8.5 Tcl "Tcl Mathematical Functions" @@ -37,10 +37,8 @@ package require \fBTcl 8.5\fR .br \fB::tcl::mathfunc::double\fR \fIarg\fR .br -.VS 8.5 \fB::tcl::mathfunc::entier\fR \fIarg\fR .br -.VE 8.5 \fB::tcl::mathfunc::exp\fR \fIarg\fR .br \fB::tcl::mathfunc::floor\fR \fIarg\fR @@ -117,28 +115,34 @@ for new implementations. .SS "DETAILED DEFINITIONS" .TP \fBabs \fIarg\fR +. Returns the absolute value of \fIarg\fR. \fIArg\fR may be either integer or floating-point, and the result is returned in the same form. .TP \fBacos \fIarg\fR +. Returns the arc cosine of \fIarg\fR, in the range [\fI0\fR,\fIpi\fR] radians. \fIArg\fR should be in the range [\fI\-1\fR,\fI1\fR]. .TP \fBasin \fIarg\fR +. Returns the arc sine of \fIarg\fR, in the range [\fI\-pi/2\fR,\fIpi/2\fR] radians. \fIArg\fR should be in the range [\fI\-1\fR,\fI1\fR]. .TP \fBatan \fIarg\fR +. Returns the arc tangent of \fIarg\fR, in the range [\fI\-pi/2\fR,\fIpi/2\fR] radians. .TP \fBatan2 \fIy x\fR +. Returns the arc tangent of \fIy\fR/\fIx\fR, in the range [\fI\-pi\fR,\fIpi\fR] radians. \fIx\fR and \fIy\fR cannot both be 0. If \fIx\fR is greater than \fI0\fR, this is equivalent to .QW "\fBatan \fR[\fBexpr\fR {\fIy\fB/\fIx\fR}]" . .TP \fBbool \fIarg\fR +. Accepts any numeric value, or any string acceptable to \fBstring is boolean\fR, and returns the corresponding boolean value \fB0\fR or \fB1\fR. Non-zero numbers are true. @@ -146,18 +150,22 @@ Other numbers are false. Non-numeric strings produce boolean value in agreement with \fBstring is true\fR and \fBstring is false\fR. .TP \fBceil \fIarg\fR +. Returns the smallest integral floating-point value (i.e. with a zero fractional part) not less than \fIarg\fR. The argument may be any numeric value. .TP \fBcos \fIarg\fR +. Returns the cosine of \fIarg\fR, measured in radians. .TP \fBcosh \fIarg\fR +. Returns the hyperbolic cosine of \fIarg\fR. If the result would cause an overflow, an error is returned. .TP \fBdouble \fIarg\fR +. The argument may be any numeric value, If \fIarg\fR is a floating-point value, returns \fIarg\fR, otherwise converts \fIarg\fR to floating-point and returns the converted value. May return @@ -165,31 +173,35 @@ If \fIarg\fR is a floating-point value, returns \fIarg\fR, otherwise converts the floating-point range. .TP \fBentier \fIarg\fR -.VS 8.5 +. The argument may be any numeric value. The integer part of \fIarg\fR is determined and returned. The integer range returned by this function is unlimited, unlike \fBint\fR and \fBwide\fR which truncate their range to fit in particular storage widths. -.VE 8.5 .TP \fBexp \fIarg\fR +. Returns the exponential of \fIarg\fR, defined as \fIe\fR**\fIarg\fR. If the result would cause an overflow, an error is returned. .TP \fBfloor \fIarg\fR +. Returns the largest integral floating-point value (i.e. with a zero fractional part) not greater than \fIarg\fR. The argument may be any numeric value. .TP \fBfmod \fIx y\fR +. Returns the floating-point remainder of the division of \fIx\fR by \fIy\fR. If \fIy\fR is 0, an error is returned. .TP \fBhypot \fIx y\fR +. Computes the length of the hypotenuse of a right-angled triangle .QW "\fBsqrt\fR [\fBexpr\fR {\fIx\fB*\fIx\fB+\fIy\fB*\fIy\fR}]". .TP \fBint \fIarg\fR +. The argument may be any numeric value. The integer part of \fIarg\fR is determined, and then the low order bits of that integer value up to the machine word size are returned as an integer value. For reference, @@ -197,32 +209,39 @@ the number of bytes in the machine word are stored in \fBtcl_platform(wordSize)\fR. .TP \fBisqrt \fIarg\fR +. Computes the integer part of the square root of \fIarg\fR. \fIArg\fR must be a positive value, either an integer or a floating point number. Unlike \fBsqrt\fR, which is limited to the precision of a floating point number, \fIisqrt\fR will return a result of arbitrary precision. .TP \fBlog \fIarg\fR +. Returns the natural logarithm of \fIarg\fR. \fIArg\fR must be a positive value. .TP \fBlog10 \fIarg\fR +. Returns the base 10 logarithm of \fIarg\fR. \fIArg\fR must be a positive value. .TP \fBmax \fIarg\fB \fI...\fR +. Accepts one or more numeric arguments. Returns the one argument with the greatest value. .TP \fBmin \fIarg\fB \fI...\fR +. Accepts one or more numeric arguments. Returns the one argument with the least value. .TP \fBpow \fIx y\fR +. Computes the value of \fIx\fR raised to the power \fIy\fR. If \fIx\fR is negative, \fIy\fR must be an integer value. .TP \fBrand\fR +. Returns a pseudo-random floating-point value in the range (\fI0\fR,\fI1\fR). The generator algorithm is a simple linear congruential generator that is not cryptographically secure. Each result from \fBrand\fR completely @@ -232,34 +251,42 @@ one-time passwords. The seed of the generator is initialized from the internal clock of the machine or may be set with the \fBsrand\fR function. .TP \fBround \fIarg\fR +. If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise converts \fIarg\fR to integer by rounding and returns the converted value. .TP \fBsin \fIarg\fR +. Returns the sine of \fIarg\fR, measured in radians. .TP \fBsinh \fIarg\fR +. Returns the hyperbolic sine of \fIarg\fR. If the result would cause an overflow, an error is returned. .TP \fBsqrt \fIarg\fR +. The argument may be any non-negative numeric value. Returns a floating-point value that is the square root of \fIarg\fR. May return \fBInf\fR when the argument is a numeric value that exceeds the square of the maximum value of the floating-point range. .TP \fBsrand \fIarg\fR +. The \fIarg\fR, which must be an integer, is used to reset the seed for the random number generator of \fBrand\fR. Returns the first random number (see \fBrand\fR) from that seed. Each interpreter has its own seed. .TP \fBtan \fIarg\fR +. Returns the tangent of \fIarg\fR, measured in radians. .TP \fBtanh \fIarg\fR +. Returns the hyperbolic tangent of \fIarg\fR. .TP \fBwide \fIarg\fR +. The argument may be any numeric value. The integer part of \fIarg\fR is determined, and then the low order 64 bits of that integer value are returned as an integer value. diff --git a/doc/msgcat.n b/doc/msgcat.n index ce8ef6e..4ed83eb 100644 --- a/doc/msgcat.n +++ b/doc/msgcat.n @@ -51,6 +51,7 @@ wishes to be enabled for multi-lingual applications. .SH COMMANDS .TP \fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR? +. Returns a translation of \fIsrc-string\fR according to the user's current locale. If additional arguments past \fIsrc-string\fR are given, the \fBformat\fR command is used to substitute the @@ -73,12 +74,14 @@ later simply by defining new message catalog entries. .RE .TP \fB::msgcat::mcmax ?\fIsrc-string src-string ...\fR? +. Given several source strings, \fB::msgcat::mcmax\fR returns the length of the longest translated string. This is useful when designing localized GUIs, which may require that all buttons, for example, be a fixed width (which will be the width of the widest button). .TP -\fB::msgcat::mclocale \fR?\fInewLocale\fR? +\fB::msgcat::mclocale \fR?\fInewLocale\fR? +. This function sets the locale to \fInewLocale\fR. If \fInewLocale\fR is omitted, the current locale is returned, otherwise the current locale is set to \fInewLocale\fR. msgcat stores and compares the locale in a @@ -88,6 +91,7 @@ the user's environment. See \fBLOCALE SPECIFICATION\fR below for a description of the locale string format. .TP \fB::msgcat::mcpreferences\fR +. Returns an ordered list of the locales preferred by the user, based on the user's language specification. The list is ordered from most specific to least @@ -95,11 +99,10 @@ preference. The list is derived from the current locale set in msgcat by \fB::msgcat::mclocale\fR, and cannot be set independently. For example, if the current locale is en_US_funky, then \fB::msgcat::mcpreferences\fR -.VS 1.4 returns \fB{en_US_funky en_US en {}}\fR. -.VE 1.4 .TP \fB::msgcat::mcload \fIdirname\fR +. Searches the specified directory for files that match the language specifications returned by \fB::msgcat::mcpreferences\fR (note that these are all lowercase), extended by the file extension @@ -113,12 +116,14 @@ evaluation. The number of message files which matched the specification and were loaded is returned. .TP \fB::msgcat::mcset \fIlocale src-string \fR?\fItranslate-string\fR? +. Sets the translation for \fIsrc-string\fR to \fItranslate-string\fR in the specified \fIlocale\fR and the current namespace. If \fItranslate-string\fR is not specified, \fIsrc-string\fR is used for both. The function returns \fItranslate-string\fR. .TP \fB::msgcat::mcmset \fIlocale src-trans-list\fR +. Sets the translation for multiple source strings in \fIsrc-trans-list\fR in the specified \fIlocale\fR and the current namespace. @@ -129,6 +134,7 @@ faster than multiple invocations of \fB::msgcat::mcset\fR. The function returns the number of translations set. .TP \fB::msgcat::mcunknown \fIlocale src-string\fR +. This routine is called by \fB::msgcat::mc\fR in the case when a translation for \fIsrc-string\fR is not defined in the current locale. The default action is to return @@ -178,7 +184,6 @@ When a locale is specified by the user, a .QW "best match" search is performed during string translation. For example, if a user specifies -.VS 1.4 en_GB_Funky, the locales .QW en_GB_Funky , .QW en_GB , @@ -186,7 +191,6 @@ en_GB_Funky, the locales and .MT (the empty string) -.VE 1.4 are searched in order until a matching translation string is found. If no translation string is available, then \fB::msgcat::mcunknown\fR is called. @@ -260,7 +264,6 @@ For example: es.msg \(em spanish en_gb.msg \(em United Kingdom English .CE -.VS 1.4 \fIException:\fR The message file for the root locale .MT is called @@ -269,7 +272,6 @@ This exception is made so as not to cause peculiar behavior, such as marking the message file as .QW hidden on Unix file systems. -.VE 1.4 .IP [3] The file contains a series of calls to \fBmcset\fR and \fBmcmset\fR, setting the necessary translation strings diff --git a/doc/namespace.n b/doc/namespace.n index e4d3d6d..4a31500 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.30 2008/03/06 22:08:26 dkf Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.31 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -28,6 +28,7 @@ The legal values of \fIsubcommand\fR are listed below. Note that you can abbreviate the \fIsubcommand\fRs. .TP \fBnamespace children \fR?\fInamespace\fR? ?\fIpattern\fR? +. Returns a list of all child namespaces that belong to the namespace \fInamespace\fR. If \fInamespace\fR is not specified, @@ -43,6 +44,7 @@ otherwise the namespace \fInamespace\fR is prepended onto the pattern. .TP \fBnamespace code \fIscript\fR +. Captures the current namespace context for later execution of the script \fIscript\fR. It returns a new script in which \fIscript\fR has been wrapped @@ -70,6 +72,7 @@ See the section \fBSCOPED SCRIPTS\fR for some examples of how this is used to create callback scripts. .TP \fBnamespace current\fR +. Returns the fully-qualified name for the current namespace. The actual name of the global namespace is .MT @@ -78,6 +81,7 @@ but this command returns \fB::\fR for the global namespace as a convenience to programmers. .TP \fBnamespace delete \fR?\fInamespace namespace ...\fR? +. Each namespace \fInamespace\fR is deleted and all variables, procedures, and child namespaces contained in the namespace are deleted. @@ -89,13 +93,13 @@ If a namespace does not exist, this command returns an error. If no namespace names are given, this command does nothing. .TP \fBnamespace ensemble\fR \fIsubcommand\fR ?\fIarg ...\fR? -.VS 8.5 +. Creates and manipulates a command that is formed out of an ensemble of subcommands. See the section \fBENSEMBLES\fR below for further details. -.VE 8.5 .TP \fBnamespace eval\fR \fInamespace arg\fR ?\fIarg ...\fR? +. Activates a namespace called \fInamespace\fR and evaluates some code in that context. If the namespace does not already exist, it is created. @@ -111,10 +115,12 @@ they are automatically created. .RE .TP \fBnamespace exists\fR \fInamespace\fR +. Returns \fB1\fR if \fInamespace\fR is a valid namespace in the current context, returns \fB0\fR otherwise. .TP \fBnamespace export \fR?\-\fBclear\fR? ?\fIpattern pattern ...\fR? +. Specifies which commands are exported from a namespace. The exported commands are those that can be later imported into another namespace using a \fBnamespace import\fR command. @@ -135,6 +141,7 @@ If no \fIpattern\fRs are given and the \fB\-clear\fR flag is not given, this command returns the namespace's current export list. .TP \fBnamespace forget \fR?\fIpattern pattern ...\fR? +. Removes previously imported commands from a namespace. Each \fIpattern\fR is a simple or qualified name such as \fBx\fR, \fBfoo::x\fR or \fBa::b::p*\fR. @@ -159,7 +166,7 @@ If so, this command deletes the corresponding imported commands. In effect, this un-does the action of a \fBnamespace import\fR command. .TP \fBnamespace import \fR?\fB\-force\fR? ?\fIpattern\fR \fIpattern ...\fR? -.VS 8.5 +. Imports commands into a namespace, or queries the set of imported commands in a namespace. When no arguments are present, \fBnamespace import\fR returns the list of commands in @@ -168,7 +175,6 @@ namespaces. The commands in the returned list are in the format of simple names, with no namespace qualifiers at all. This format is suitable for composition with \fBnamespace forget\fR (see \fBEXAMPLES\fR below). -.VE 8.5 When \fIpattern\fR arguments are present, each \fIpattern\fR is a qualified name like \fBfoo::x\fR or \fBa::p*\fR. @@ -195,6 +201,7 @@ If another command is defined and exported in this namespace later on, it will not be imported. .TP \fBnamespace inscope\fR \fInamespace\fR \fIscript\fR ?\fIarg ...\fR? +. Executes a script in the context of the specified \fInamespace\fR. This command is not expected to be used directly by programmers; calls to it are generated implicitly when applications @@ -218,6 +225,7 @@ as is the case with \fBnamespace eval\fR. .RE .TP \fBnamespace origin \fIcommand\fR +. Returns the fully-qualified name of the original command to which the imported command \fIcommand\fR refers. When a command is imported into a namespace, @@ -232,23 +240,23 @@ If \fIcommand\fR does not refer to an imported command, the command's own fully-qualified name is returned. .TP \fBnamespace parent\fR ?\fInamespace\fR? +. Returns the fully-qualified name of the parent namespace for namespace \fInamespace\fR. If \fInamespace\fR is not specified, the fully-qualified name of the current namespace's parent is returned. .TP \fBnamespace path\fR ?\fInamespaceList\fR? -.\" Should really have the .TP inside the .VS, but that triggers a groff bug -.VS 8.5 +. Returns the command resolution path of the current namespace. If \fInamespaceList\fR is specified as a list of named namespaces, the current namespace's command resolution path is set to those namespaces and returns the empty list. The default command resolution path is always empty. See the section \fBNAME RESOLUTION\fR below for an explanation of the rules regarding name resolution. -.VE 8.5 .TP \fBnamespace qualifiers\fR \fIstring\fR +. Returns any leading namespace qualifiers for \fIstring\fR. Qualifiers are namespace names separated by double colons (\fB::\fR). For the \fIstring\fR \fB::foo::bar::x\fR, @@ -260,6 +268,7 @@ namespace names are, in fact, the names of currently defined namespaces. .TP \fBnamespace tail\fR \fIstring\fR +. Returns the simple name at the end of a qualified string. Qualifiers are namespace names separated by double colons (\fB::\fR). For the \fIstring\fR \fB::foo::bar::x\fR, @@ -270,6 +279,7 @@ It does not check whether the namespace names are, in fact, the names of currently defined namespaces. .TP \fBnamespace upvar\fR \fInamespace\fR \fIotherVar myVar \fR?\fIotherVar myVar \fR... +. This command arranges for one or more local variables in the current procedure to refer to variables in \fInamespace\fR. The namespace name is resolved as described in section \fBNAME RESOLUTION\fR. @@ -280,6 +290,7 @@ used for qualified namespace or variable names. \fBnamespace upvar\fR returns an empty string. .TP \fBnamespace unknown\fR ?\fIscript\fR? +. Sets or returns the unknown command handler for the current namespace. The handler is invoked when a command called from within the namespace cannot be found (in either the current namespace or the global namespace). @@ -291,6 +302,7 @@ default handler for all namespaces is \fB::unknown\fR. If no argument is given, it returns the handler for the current namespace. .TP \fBnamespace which\fR ?\-\fBcommand\fR? ?\-\fBvariable\fR? \fIname\fR +. Looks up \fIname\fR as either a command or variable and returns its fully-qualified name. For example, if \fIname\fR does not exist in the current namespace @@ -445,14 +457,12 @@ Tcl follows basic rules for looking it up: Variable names are always resolved by looking first in the current namespace, and then in the global namespace. -.VS 8.5 Command names are also always resolved by looking in the current namespace first. If not found there, they are searched for in every namespace on the current namespace's command path (which is empty by default). If not found there, command names are looked up in the global namespace (or, failing that, are processed by the \fBunknown\fR command.) -.VE 8.5 Namespace names, on the other hand, are always resolved by looking in only the current namespace. .PP @@ -656,7 +666,6 @@ the value of a::b has changed to c .CE .SH ENSEMBLES .PP -.VS 8.5 The \fBnamespace ensemble\fR is used to create and manipulate ensemble commands, which are commands formed by grouping subcommands together. The commands typically come from the current namespace when the @@ -670,6 +679,7 @@ namespace is maintained however the ensemble is renamed. Three subcommands of the \fBnamespace ensemble\fR command are defined: .TP \fBnamespace ensemble create\fR ?\fIoption value ...\fR? +. Creates a new ensemble command linked to the current namespace, returning the fully qualified name of the command created. The arguments to \fBnamespace ensemble create\fR allow the configuration @@ -680,12 +690,14 @@ namespace. See the section \fBENSEMBLE OPTIONS\fR below for a full list of options supported and their effects. .TP \fBnamespace ensemble configure \fIcommand\fR ?\fIoption\fR? ?\fIvalue ...\fR? +. Retrieves the value of an option associated with the ensemble command named \fIcommand\fR, or updates some options associated with that ensemble command. See the section \fBENSEMBLE OPTIONS\fR below for a full list of options supported and their effects. .TP \fBnamespace ensemble exists\fR \fIcommand\fR +. Returns a boolean value that describes whether the command \fIcommand\fR exists and is an ensemble command. This command only ever returns an error if the number of arguments to the command is @@ -708,6 +720,7 @@ create\fR and \fBnamespace ensemble configure\fR commands, control how an ensemble command behaves: .TP \fB\-map\fR +. When non-empty, this option supplies a dictionary that provides a mapping from subcommand names to a list of prefix words to substitute in place of the ensemble command and subcommand words (in a manner @@ -719,12 +732,14 @@ name. Note that when this option is non-empty and the will be exactly those words that have mappings in the dictionary. .TP \fB\-prefixes\fR +. This option (which is enabled by default) controls whether the ensemble command recognizes unambiguous prefixes of its subcommands. When turned off, the ensemble command requires exact matching of subcommand names. .TP \fB\-subcommands\fR +. When non-empty, this option lists exactly what subcommands are in the ensemble. The mapping for each of those commands will be either whatever is defined in the \fB\-map\fR option, or to the command with the same @@ -735,6 +750,7 @@ of the linked namespace at the time of the invocation of the ensemble command. .TP \fB\-unknown\fR +. When non-empty, this option provides a partial command (to which all the words that are arguments to the ensemble command, including the fully-qualified name of the ensemble, are appended) to handle the case @@ -748,6 +764,7 @@ The following extra option is allowed by \fBnamespace ensemble create\fR: .TP \fB\-command\fR +. This write-only option allows the name of the ensemble created by \fBnamespace ensemble create\fR to be anything in any existing namespace. The default value for this option is the fully-qualified @@ -758,6 +775,7 @@ The following extra option is allowed by \fBnamespace ensemble configure\fR: .TP \fB\-namespace\fR +. This read-only option allows the retrieval of the fully-qualified name of the namespace which the ensemble was created within. .SS "UNKNOWN HANDLER BEHAVIOUR" @@ -809,7 +827,6 @@ error message from \fBTcl_GetIndexFromObj\fR). This is the error that will be thrown when the subcommand is still not recognized during reparsing. It is also an error for an \fB\-unknown\fR handler to delete its namespace. -.VE 8.5 .SH EXAMPLES Create a namespace containing a variable and an exported command: .CS diff --git a/doc/open.n b/doc/open.n index 5e1030c..3b26d21 100644 --- a/doc/open.n +++ b/doc/open.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: open.n,v 1.34 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: open.n,v 1.35 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH open n 8.3 Tcl "Tcl Built-In Commands" @@ -36,73 +36,84 @@ The \fIaccess\fR argument, if present, indicates the way in which the file In the first form \fIaccess\fR may have any of the following values: .TP 15 \fBr\fR +. Open the file for reading only; the file must already exist. This is the default value if \fIaccess\fR is not specified. .TP 15 \fBr+\fR +. Open the file for both reading and writing; the file must already exist. .TP 15 \fBw\fR +. Open the file for writing only. Truncate it if it exists. If it does not exist, create a new file. .TP 15 \fBw+\fR +. Open the file for reading and writing. Truncate it if it exists. If it does not exist, create a new file. .TP 15 \fBa\fR +. Open the file for writing only. If the file does not exist, create a new empty file. Set the file pointer to the end of the file prior to each write. .TP 15 \fBa+\fR +. Open the file for reading and writing. If the file does not exist, create a new empty file. Set the initial access position to the end of the file. -.VS 8.5 .PP All of the legal \fIaccess\fR values above may have the character \fBb\fR added as the second or third character in the value to indicate that the opened channel should be configured with the \fB\-translation binary\fR option, making the channel suitable for reading or writing of binary data. -.VE 8.5 .PP In the second form, \fIaccess\fR consists of a list of any of the following flags, all of which have the standard POSIX meanings. One of the flags must be either \fBRDONLY\fR, \fBWRONLY\fR or \fBRDWR\fR. .TP 15 \fBRDONLY\fR +. Open the file for reading only. .TP 15 \fBWRONLY\fR +. Open the file for writing only. .TP 15 \fBRDWR\fR +. Open the file for both reading and writing. .TP 15 \fBAPPEND\fR +. Set the file pointer to the end of the file prior to each write. -.VS 8.5 .TP 15 \fBBINARY\fR +. Configure the opened channel with the \fB\-translation binary\fR option. -.VE 8.5 .TP 15 \fBCREAT\fR +. Create the file if it does not already exist (without this flag it is an error for the file not to exist). .TP 15 \fBEXCL\fR +. If \fBCREAT\fR is also specified, an error is returned if the file already exists. .TP 15 \fBNOCTTY\fR +. If the file is a terminal device, this flag prevents the file from becoming the controlling terminal of the process. .TP 15 \fBNONBLOCK\fR +. Prevents the process from blocking while opening the file, and possibly in subsequent I/O operations. The exact behavior of this flag is system- and device-dependent; its use is discouraged @@ -112,6 +123,7 @@ For details refer to your system documentation on the \fBopen\fR system call's \fBO_NONBLOCK\fR flag. .TP 15 \fBTRUNC\fR +. If the file exists it is truncated to zero length. .PP If a new file is created as part of opening it, \fIpermissions\fR @@ -158,6 +170,7 @@ The \fBfconfigure\fR command can be used to query and set additional configuration options specific to serial ports (where supported): .TP \fB\-mode\fR \fIbaud\fB,\fIparity\fB,\fIdata\fB,\fIstop\fR +. This option is a set of 4 comma-separated values: the baud rate, parity, number of data bits, and number of stop bits for this serial port. The \fIbaud\fR rate is a simple integer that specifies the connection speed. @@ -174,6 +187,7 @@ data bits and should be an integer from 5 to 8, while \fIstop\fR is the number of stop bits and should be the integer 1 or 2. .TP \fB\-handshake\fR \fItype\fR +. (Windows and Unix). This option is used to setup automatic handshake control. Note that not all handshake types maybe supported by your operating system. The \fItype\fR parameter is case-independent. @@ -191,11 +205,13 @@ The \fB\-handshake\fR option cannot be queried. .RE .TP \fB\-queue\fR +. (Windows and Unix). The \fB\-queue\fR option can only be queried. It returns a list of two integers representing the current number of bytes in the input and output queue respectively. .TP \fB\-timeout\fR \fImsec\fR +. (Windows and Unix). This option is used to set the timeout for blocking read operations. It specifies the maximum interval between the reception of two bytes in milliseconds. @@ -205,6 +221,7 @@ nonblocking reads. This option cannot be queried. .TP \fB\-ttycontrol\fR \fI{signal boolean signal boolean ...}\fR +. (Windows and Unix). This option is used to setup the handshake output lines (see below) permanently or to send a BREAK over the serial line. The \fIsignal\fR names are case-independent. @@ -217,6 +234,7 @@ The result is unpredictable. The \fB\-ttycontrol\fR option cannot be queried. .TP \fB\-ttystatus\fR +. (Windows and Unix). The \fB\-ttystatus\fR option can only be queried. It returns the current modem status and handshake input signals (see below). @@ -225,12 +243,14 @@ e.g. \fB{CTS 1 DSR 0 RING 1 DCD 0}\fR. The \fIsignal\fR names are returned upper case. .TP \fB\-xchar\fR \fI{xonChar xoffChar}\fR +. (Windows and Unix). This option is used to query or change the software handshake characters. Normally the operating system default should be DC1 (0x11) and DC3 (0x13) representing the ASCII standard XON and XOFF characters. .TP \fB\-pollinterval\fR \fImsec\fR +. (Windows only). This option is used to set the maximum time between polling for fileevents. This affects the time interval between checking for events throughout the Tcl @@ -241,6 +261,7 @@ you want to poll the serial port more or less often than 10 msec \fB\-sysbuffer\fR \fIinSize\fR .TP \fB\-sysbuffer\fR \fI{inSize outSize}\fR +. (Windows only). This option is used to change the size of Windows system buffers for a serial channel. Especially at higher communication rates the default input buffer size of 4096 bytes can overrun @@ -248,6 +269,7 @@ for latent systems. The first form specifies the input buffer size, in the second form both input and output buffers are defined. .TP \fB\-lasterror\fR +. (Windows only). This option is query only. In case of a serial communication error, \fBread\fR or \fBputs\fR returns a general Tcl file I/O error. @@ -305,35 +327,42 @@ general file I/O error. Then \fBfconfigure -lasterror\fR may help to locate the problem. The following error codes may be returned. .TP 10 \fBRXOVER\fR +. Windows input buffer overrun. The data comes faster than your scripts reads it or your system is overloaded. Use \fBfconfigure -sysbuffer\fR to avoid a temporary bottleneck and/or make your script faster. .TP 10 \fBTXFULL\fR +. Windows output buffer overrun. Complement to RXOVER. This error should practically not happen, because Tcl cares about the output buffer status. .TP 10 \fBOVERRUN\fR +. UART buffer overrun (hardware) with data lost. The data comes faster than the system driver receives it. Check your advanced serial port settings to enable the FIFO (16550) buffer and/or setup a lower(1) interrupt threshold value. .TP 10 \fBRXPARITY\fR +. A parity error has been detected by your UART. Wrong parity settings with \fBfconfigure -mode\fR or a noisy data line (RXD) may cause this error. .TP 10 \fBFRAME\fR +. A stop-bit error has been detected by your UART. Wrong mode settings with \fBfconfigure -mode\fR or a noisy data line (RXD) may cause this error. .TP 10 \fBBREAK\fR +. A BREAK condition has been detected by your UART (see above). .SH "PORTABILITY ISSUES" .TP \fBWindows \fR(all versions) +. Valid values for \fIfileName\fR to open a serial port are of the form \fBcom\fIX\fB:\fR, where \fIX\fR is a number, generally from 1 to 4. This notation only works for serial ports from 1 to 9, if the system @@ -344,6 +373,7 @@ where X is any number that corresponds to a serial port; please note that this method is considerably slower on Windows 95 and Windows 98. .TP \fBWindows NT\fR +. When running Tcl interactively, there may be some strange interactions between the real console, if one is present, and a command pipeline that uses standard input or output. If a command pipeline is opened for reading, some @@ -359,6 +389,7 @@ standard input or output, but is redirected from or to a file, then the above problems do not occur. .TP \fBWindows 95\fR +. A command pipeline that executes a 16-bit DOS application cannot be opened for both reading and writing, since 16-bit DOS applications that receive standard input from a pipe and send standard output to a pipe run @@ -390,6 +421,7 @@ applications are run synchronously, as described above. .RE .TP \fBUnix\fR\0\0\0\0\0\0\0 +. Valid values for \fIfileName\fR to open a serial port are generally of the form \fB/dev/tty\fIX\fR, where \fIX\fR is \fBa\fR or \fBb\fR, but the name of any pseudo-file that maps to a serial port may be used. @@ -412,6 +444,7 @@ See the \fBPORTABILITY ISSUES\fR section of the \fBexec\fR command for additional information not specific to command pipelines about executing applications on the various platforms .SH "EXAMPLE" +.PP Open a command pipeline and catch any errors: .CS set fl [\fBopen\fR "| ls this_file_does_not_exist"] diff --git a/doc/regexp.n b/doc/regexp.n index ad3a46f..1e31131 100644 --- a/doc/regexp.n +++ b/doc/regexp.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regexp.n,v 1.28 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: regexp.n,v 1.29 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH regexp n 8.3 Tcl "Tcl Built-In Commands" @@ -12,11 +12,9 @@ '\" Note: do not modify the .SH NAME line immediately below! .SH NAME regexp \- Match a regular expression against a string - .SH SYNOPSIS \fBregexp \fR?\fIswitches\fR? \fIexp string \fR?\fImatchVar\fR? ?\fIsubMatchVar subMatchVar ...\fR? .BE - .SH DESCRIPTION .PP Determines whether the regular expression \fIexp\fR matches part or @@ -24,7 +22,7 @@ all of \fIstring\fR and returns 1 if it does, 0 if it does not, unless \fB\-inline\fR is specified (see below). (Regular expression matching is described in the \fBre_syntax\fR reference page.) -.LP +.PP If additional arguments are specified after \fIstring\fR then they are treated as the names of variables in which to return information about which part(s) of \fIstring\fR matched \fIexp\fR. @@ -40,6 +38,7 @@ they are treated as switches. The following switches are currently supported: .TP 15 \fB\-about\fR +. Instead of attempting to match the regular expression, returns a list containing information about the regular expression. The first element of the list is a subexpression count. The second element is a @@ -47,11 +46,13 @@ list of property names that describe various attributes of the regular expression. This switch is primarily intended for debugging purposes. .TP 15 \fB\-expanded\fR +. Enables use of the expanded regular expression syntax where whitespace and comments are ignored. This is the same as specifying the \fB(?x)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 15 \fB\-indices\fR +. Changes what is stored in the \fIsubMatchVar\fRs. Instead of storing the matching characters from \fIstring\fR, each variable @@ -60,6 +61,7 @@ in \fIstring\fR of the first and last characters in the matching range of characters. .TP 15 \fB\-line\fR +. Enables newline-sensitive matching. By default, newline is a completely ordinary character with no special meaning. With this flag, @@ -77,6 +79,7 @@ specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the \fB(?n)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 15 \fB\-linestop\fR +. Changes the behavior of .QW [^ bracket expressions and @@ -86,6 +89,7 @@ stop at newlines. This is the same as specifying the \fB(?p)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 15 \fB\-lineanchor\fR +. Changes the behavior of .QW ^ and @@ -98,16 +102,19 @@ specifying the \fB(?w)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 15 \fB\-nocase\fR +. Causes upper-case characters in \fIstring\fR to be treated as lower case during the matching process. .TP 15 \fB\-all\fR +. Causes the regular expression to be matched as many times as possible in the string, returning the total number of matches found. If this is specified with match variables, they will contain information for the last match only. .TP 15 \fB\-inline\fR +. Causes the command to return, as a list, the data that would otherwise be placed in match variables. When using \fB\-inline\fR, match variables may not be specified. If used with \fB\-all\fR, the @@ -123,12 +130,11 @@ regular expression. Examples are: .CE .TP 15 \fB\-start\fR \fIindex\fR +. Specifies a character index offset into the string to start matching the regular expression at. -.VS 8.5 The \fIindex\fR value is interpreted in the same manner as the \fIindex\fR argument to \fBstring index\fR. -.VE 8.5 When using this switch, .QW ^ will not match the beginning of the line, and \eA will still @@ -138,6 +144,7 @@ absolute beginning of the input string. \fIindex\fR will be constrained to the bounds of the input string. .TP 15 \fB\-\|\-\fR +. Marks the end of switches. The argument following this one will be treated as \fIexp\fR even if it starts with a \fB\-\fR. .PP @@ -149,6 +156,7 @@ portion of the expression that was not matched), then the corresponding .QW "\fB\-1 \-1\fR" if \fB\-indices\fR has been specified or to an empty string otherwise. .SH EXAMPLES +.PP Find the first occurrence of a word starting with \fBfoo\fR in a string that is not actually an instance of \fBfoobar\fR, and get the letters following it up to the end of the word into a variable: @@ -175,13 +183,8 @@ characters) in a string: .CS \fBregexp\fR \-all \-inline {\eS+} $string .CE - .SH "SEE ALSO" re_syntax(n), regsub(n), -.VS 8.5 string(n) -.VE - - .SH KEYWORDS match, regular expression, string diff --git a/doc/regsub.n b/doc/regsub.n index ca16aa8..cc5994f 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.22 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.23 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -58,6 +58,7 @@ they are treated as switches. The following switches are currently supported: .TP 10 \fB\-all\fR +. All ranges in \fIstring\fR that match \fIexp\fR are found and substitution is performed for each of these ranges. Without this switch only the first @@ -70,11 +71,13 @@ sequences are handled for each substitution using the information from the corresponding match. .TP 15 \fB\-expanded\fR +. Enables use of the expanded regular expression syntax where whitespace and comments are ignored. This is the same as specifying the \fB(?x)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 15 \fB\-line\fR +. Enables newline-sensitive matching. By default, newline is a completely ordinary character with no special meaning. With this flag, .QW [^ @@ -91,6 +94,7 @@ specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the \fB(?n)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 15 \fB\-linestop\fR +. Changes the behavior of .QW [^ bracket expressions and @@ -100,6 +104,7 @@ stop at newlines. This is the same as specifying the \fB(?p)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 15 \fB\-lineanchor\fR +. Changes the behavior of .QW ^ and @@ -112,17 +117,17 @@ specifying the \fB(?w)\fR embedded option (see the \fBre_syntax\fR manual page). .TP 10 \fB\-nocase\fR +. Upper-case characters in \fIstring\fR will be converted to lower-case before matching against \fIexp\fR; however, substitutions specified by \fIsubSpec\fR use the original unconverted form of \fIstring\fR. .TP 10 \fB\-start\fR \fIindex\fR +. Specifies a character index offset into the string to start matching the regular expression at. -.VS 8.5 The \fIindex\fR value is interpreted in the same manner as the \fIindex\fR argument to \fBstring index\fR. -.VE 8.5 When using this switch, .QW ^ will not match the beginning of the line, and \eA will still @@ -130,6 +135,7 @@ match the start of the string at \fIindex\fR. \fIindex\fR will be constrained to the bounds of the input string. .TP 10 \fB\-\|\-\fR +. Marks the end of switches. The argument following this one will be treated as \fIexp\fR even if it starts with a \fB\-\fR. .PP @@ -139,6 +145,7 @@ string after replacement is returned. See the manual entry for \fBregexp\fR for details on the interpretation of regular expressions. .SH EXAMPLES +.PP Replace (in the string in variable \fIstring\fR) every instance of \fBfoo\fR which is a word by itself with \fBbar\fR: .CS @@ -166,8 +173,6 @@ set quoted [subst [\fBregsub\fR -all $RE $string $substitution]] .CE .SH "SEE ALSO" regexp(n), re_syntax(n), subst(n), -.VS 8.5 string(n) -.VE .SH KEYWORDS match, pattern, regular expression, substitute diff --git a/doc/return.n b/doc/return.n index 9df81a4..7432491 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.19 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: return.n,v 1.20 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -48,31 +48,37 @@ exceptional return from the procedure. \fICode\fR may have any of the following values: .TP 13 \fBok (or 0)\fR +. Normal return: same as if the option is omitted. The return code of the procedure is 0 (\fBTCL_OK\fR). .TP 13 \fBerror (1)\fR +. Error return: the return code of the procedure is 1 (\fBTCL_ERROR\fR). The procedure command behaves in its calling context as if it were the command \fBerror \fIresult\fR. See below for additional options. .TP 13 \fBreturn (2)\fR +. The return code of the procedure is 2 (\fBTCL_RETURN\fR). The procedure command behaves in its calling context as if it were the command \fBreturn\fR (with no arguments). .TP 13 \fBbreak (3)\fR +. The return code of the procedure is 3 (\fBTCL_BREAK\fR). The procedure command behaves in its calling context as if it were the command \fBbreak\fR. .TP 13 \fBcontinue (4)\fR +. The return code of the procedure is 4 (\fBTCL_CONTINUE\fR). The procedure command behaves in its calling context as if it were the command \fBcontinue\fR. .TP 13 \fIvalue\fR +. \fIValue\fR must be an integer; it will be returned as the return code for the current procedure. .LP @@ -89,7 +95,6 @@ an invocation of the \fBreturn \-code \fIcode\fR command will cause the return code of \fBsource\fR to be \fIcode\fR. .SH "RETURN OPTIONS" .PP -.VS 8.5 In addition to a result and a return code, evaluation of a command in Tcl also produces a dictionary of return options. In general usage, all \fIoption value\fR pairs given as arguments to \fBreturn\fR @@ -98,13 +103,13 @@ are acceptable except as noted below. The \fBcatch\fR command may be used to capture all of this information \(em the return code, the result, and the return options dictionary \(em that arise from evaluation of a script. -.VE 8.5 .PP As documented above, the \fB\-code\fR entry in the return options dictionary receives special treatment by Tcl. There are other return options also recognized and treated specially by Tcl. They are: .TP \fB\-errorcode \fIlist\fR +. The \fB\-errorcode\fR option receives special treatment only when the value of the \fB\-code\fR option is \fBTCL_ERROR\fR. Then the \fIlist\fR value is meant to be additional information about the error, @@ -116,6 +121,7 @@ to the default value of \fBNONE\fR. The \fB\-errorcode\fR return option will also be stored in the global variable \fBerrorCode\fR. .TP \fB\-errorinfo \fIinfo\fR +. The \fB\-errorinfo\fR option receives special treatment only when the value of the \fB\-code\fR option is \fBTCL_ERROR\fR. Then \fIinfo\fR is the initial stack trace, meant to provide to a human reader additional information @@ -133,7 +139,7 @@ by the \fBcatch\fR command (or from the copy of that information stored in the global variable \fBerrorInfo\fR). .TP \fB\-level \fIlevel\fR -.VS 8.5 +. The \fB\-level\fR and \fB\-code\fR options work together to set the return code to be returned by one of the commands currently being evaluated. The \fIlevel\fR value must be a non-negative integer representing a number @@ -143,14 +149,12 @@ be \fIcode\fR. If no \fB\-level\fR option is provided, the default value of \fIlevel\fR is 1, so that \fBreturn\fR sets the return code that the current procedure returns to its caller, 1 level up the call stack. The mechanism by which these options work is described in more detail below. -.VE 8.5 .TP \fB\-options \fIoptions\fR -.VS 8.5 +. The value \fIoptions\fR must be a valid dictionary. The entries of that dictionary are treated as additional \fIoption value\fR pairs for the \fBreturn\fR command. -.VE 8.5 .SH "RETURN CODE HANDLING MECHANISMS" .PP Return codes are used in Tcl to control program flow. A Tcl script @@ -176,7 +180,6 @@ of \fBTCL_BREAK\fR or \fBTCL_CONTINUE\fR, the loop command can react in such a way as to give the \fBbreak\fR and \fBcontinue\fR commands their documented interpretation in loops. .PP -.VS 8.5 Procedure invocation also involves evaluation of a script, the body of the procedure. Procedure invocation provides special treatment when evaluation of the procedure body returns the return code @@ -204,8 +207,8 @@ of the \fB\-code\fR option (or \fBTCL_OK\fR by default). Any other value for the \fB\-level\fR option (including the default value of 1) will cause the return code of the \fBreturn\fR command itself to be \fBTCL_RETURN\fR, triggering a return from the enclosing procedure. -.VE 8.5 .SH EXAMPLES +.PP First, a simple example of using \fBreturn\fR to return from a procedure, interrupting the procedure body. .CS @@ -256,7 +259,6 @@ proc myBreak {} { } .CE .PP -.VS 8.5 With the \fB\-level 0\fR option, \fBreturn\fR itself can serve as a replacement for \fBbreak\fR. .CS @@ -291,7 +293,6 @@ proc myReturn {args} { \fBreturn\fR -options $options $result } .CE -.VE 8.5 .SH "SEE ALSO" break(n), catch(n), continue(n), dict(n), error(n), proc(n), source(n), tclvars(n) .SH KEYWORDS diff --git a/doc/scan.n b/doc/scan.n index 366318a..621e919 100644 --- a/doc/scan.n +++ b/doc/scan.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scan.n,v 1.24 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: scan.n,v 1.25 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH scan n 8.4 Tcl "Tcl Built-In Commands" @@ -69,7 +69,6 @@ list must correspond to exactly one conversion specifier or an error is generated, or in the inline case, any position can be specified at most once and the empty positions will be filled in with empty strings. .PP -.VS 8.5 The size modifier field is used only when scanning a substring into one of Tcl's integer values. The size modifier field dictates the integer range acceptable to be stored in a variable, or, for the inline @@ -84,26 +83,29 @@ modifier. Either one indicates the integer range to be stored is limited to the same range produced by the \fBwide()\fR function of the \fBexpr\fR command. The \fBll\fR size modifier indicates that the integer range to be stored is unlimited. -.VE 8.5 .PP The following conversion characters are supported: .TP 10 \fBd\fR +. The input substring must be a decimal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. .TP 10 \fBo\fR +. The input substring must be an octal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. .TP 10 \fBx\fR +. The input substring must be a hexadecimal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. .TP 10 \fBu\fR +. The input substring must be a decimal integer. The integer value is truncated as required by the size modifier value, and the corresponding unsigned value for that truncated @@ -112,23 +114,27 @@ The conversion makes no sense without reference to a truncation range, so the size modifier \fBll\fR is not permitted in combination with conversion character \fBu\fR. .TP 10 -\fBi\fR +\fBi\fR +. The input substring must be an integer. The base (i.e. decimal, binary, octal, or hexadecimal) is determined in the same fashion as described in \fBexpr\fR. The integer value is stored in the variable, truncated as required by the size modifier value. .TP 10 \fBc\fR +. A single character is read in and its Unicode value is stored in the variable as an integer value. Initial white space is not skipped in this case, so the input substring may be a white-space character. .TP 10 \fBs\fR +. The input substring consists of all the characters up to the next white-space character; the characters are copied to the variable. .TP 10 \fBe\fR or \fBf\fR or \fBg\fR +. The input substring must be a floating-point number consisting of an optional sign, a string of decimal digits possibly containing a decimal point, and an optional exponent consisting @@ -137,6 +143,7 @@ decimal digits. It is read in and stored in the variable as a floating-point value. .TP 10 \fB[\fIchars\fB]\fR +. The input substring consists of one or more characters in \fIchars\fR. The matching string is stored in the variable. If the first character between the brackets is a \fB]\fR then @@ -149,6 +156,7 @@ If the first or last character between the brackets is a \fB\-\fR, then it is treated as part of \fIchars\fR rather than indicating a range. .TP 10 \fB[^\fIchars\fB]\fR +. The input substring consists of one or more characters not in \fIchars\fR. The matching string is stored in the variable. If the character immediately following the \fB^\fR is a \fB]\fR then it is @@ -162,9 +170,10 @@ If the first or last character between the brackets is a \fB\-\fR, then it is treated as part of \fIchars\fR rather than indicating a range value. .TP 10 \fBn\fR +. No input is consumed from the input string. Instead, the total number of characters scanned from the input string so far is stored in the variable. -.LP +.PP The number of characters read from the input for a conversion is the largest number that makes sense for that particular conversion (e.g. as many decimal digits as possible for \fB%d\fR, as @@ -194,6 +203,7 @@ modifier has no \fBsscanf\fR counterpart. If the end of the input string is reached before any conversions have been performed and no variables are given, an empty string is returned. .SH EXAMPLES +.PP Convert a UNICODE character to its numeric value: .CS set char "x" @@ -249,7 +259,6 @@ if { puts "X=$x, Y=$y" .CE .PP -.VS 8.5 An interactive session demonstrating the truncation of integer values determined by size modifiers: .CS @@ -262,7 +271,6 @@ values determined by size modifiers: % scan 20000000000000000000 %lld 20000000000000000000 .CE -.VE 8.5 .SH "SEE ALSO" format(n), sscanf(3) .SH KEYWORDS diff --git a/doc/source.n b/doc/source.n index a0f5466..6428d80 100644 --- a/doc/source.n +++ b/doc/source.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: source.n,v 1.18 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: source.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH source n "" Tcl "Tcl Built-In Commands" @@ -17,9 +17,7 @@ source \- Evaluate a file or resource as a Tcl script .SH SYNOPSIS \fBsource \fIfileName\fR .sp -.VS 8.5 \fBsource\fR \fB\-encoding \fIencodingName fileName\fR -.VE 8.5 .BE .SH DESCRIPTION .PP @@ -47,18 +45,18 @@ or which will be safely substituted by the Tcl interpreter into .QW ^Z . .PP -.VS 8.5 The \fB\-encoding\fR option is used to specify the encoding of the data stored in \fIfileName\fR. When the \fB\-encoding\fR option is omitted, the system encoding is assumed. -.VE 8.5 .SH EXAMPLE +.PP Run the script in the file \fBfoo.tcl\fR and then the script in the file \fBbar.tcl\fR: .CS \fBsource\fR foo.tcl \fBsource\fR bar.tcl .CE +.PP Alternatively: .CS foreach scriptFile {foo.tcl bar.tcl} { diff --git a/doc/string.n b/doc/string.n index 1d342a0..d0cb8d8 100644 --- a/doc/string.n +++ b/doc/string.n @@ -5,7 +5,7 @@ .\" See the file "license.terms" for information on usage and redistribution .\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. .\" -.\" RCS: @(#) $Id: string.n,v 1.43 2007/12/13 15:22:33 dgp Exp $ +.\" RCS: @(#) $Id: string.n,v 1.44 2008/06/29 22:28:24 dkf Exp $ .\" .so man.macros .TH string n 8.1 Tcl "Tcl Built-In Commands" @@ -16,13 +16,13 @@ string \- Manipulate strings .SH SYNOPSIS \fBstring \fIoption arg \fR?\fIarg ...?\fR .BE - .SH DESCRIPTION .PP Performs one of several string operations, depending on \fIoption\fR. The legal \fIoption\fRs (which may be abbreviated) are: .TP \fBstring bytelength \fIstring\fR +. Returns a decimal string giving the number of bytes used to represent \fIstring\fR in memory. Because UTF\-8 uses one to three bytes to represent Unicode characters, the byte length will not be the same as @@ -33,6 +33,7 @@ Tcl ByteArray object). Refer to the \fBTcl_NumUtfChars\fR manual entry for more details on the UTF\-8 representation. .TP \fBstring compare\fR ?\fB\-nocase\fR? ?\fB\-length int\fR? \fIstring1 string2\fR +. Perform a character-by-character comparison of strings \fIstring1\fR and \fIstring2\fR. Returns \-1, 0, or 1, depending on whether \fIstring1\fR is lexicographically less than, equal to, or greater @@ -42,6 +43,7 @@ first \fIlength\fR characters are used in the comparison. If specified, then the strings are compared in a case-insensitive manner. .TP \fBstring equal\fR ?\fB\-nocase\fR? ?\fB\-length int\fR? \fIstring1 string2\fR +. Perform a character-by-character comparison of strings \fIstring1\fR and \fIstring2\fR. Returns 1 if \fIstring1\fR and \fIstring2\fR are identical, or 0 when not. If \fB\-length\fR is specified, then only @@ -50,6 +52,7 @@ the first \fIlength\fR characters are used in the comparison. If specified, then the strings are compared in a case-insensitive manner. .TP \fBstring first \fIneedleString haystackString\fR ?\fIstartIndex\fR? +. Search \fIhaystackString\fR for a sequence of characters that exactly match the characters in \fIneedleString\fR. If found, return the index of the first character in the first such match within \fIhaystackString\fR. If not @@ -69,10 +72,10 @@ will return \fB\-1\fR. .RE .TP \fBstring index \fIstring charIndex\fR +. Returns the \fIcharIndex\fR'th character of the \fIstring\fR argument. A \fIcharIndex\fR of 0 corresponds to the first character of the string. \fIcharIndex\fR may be specified as follows: -.VS 8.5 .RS .IP \fIinteger\fR 10 For any index value that passes \fBstring is integer -strict\fR, @@ -121,9 +124,9 @@ leading whitespace. If \fIcharIndex\fR is less than 0 or greater than or equal to the length of the string then this command returns an empty string. .RE -.VE .TP \fBstring is \fIclass\fR ?\fB\-strict\fR? ?\fB\-failindex \fIvarname\fR? \fIstring\fR +. Returns 1 if \fIstring\fR is a valid member of the specified character class, otherwise returns 0. If \fB\-strict\fR is specified, then an empty string returns 0, otherwise an empty string will return 1 on @@ -179,12 +182,10 @@ Any of the forms allowed to \fBTcl_GetBoolean\fR where the value is true. .IP \fBupper\fR 12 Any upper case alphabet character in the Unicode character set. -.VS 8.5 .IP \fBwideinteger\fR 12 Any of the valid forms for a wide integer in Tcl, with optional surrounding whitespace. In case of under/overflow in the value, 0 is returned and the \fIvarname\fR will contain \-1. -.VE 8.5 .IP \fBwordchar\fR 12 Any Unicode word character. That is any alphanumeric character, and any Unicode connector punctuation characters (e.g. underscore). @@ -197,6 +198,7 @@ function will return 0, then the \fIvarname\fR will always be set to .RE .TP \fBstring last \fIneedleString haystackString\fR ?\fIlastIndex\fR? +. Search \fIhaystackString\fR for a sequence of characters that exactly match the characters in \fIneedleString\fR. If found, return the index of the first character in the last such match within \fIhaystackString\fR. If there @@ -216,6 +218,7 @@ will return \fB1\fR. .RE .TP \fBstring length \fIstring\fR +. Returns a decimal string giving the number of characters in \fIstring\fR. Note that this is not necessarily the same as the number of bytes used to store the string. If the object is a @@ -223,6 +226,7 @@ ByteArray object (such as those returned from reading a binary encoded channel), then this will return the actual byte length of the object. .TP \fBstring map\fR ?\fB\-nocase\fR? \fImapping string\fR +. Replaces substrings in \fIstring\fR based on the key-value pairs in \fImapping\fR. \fImapping\fR is a list of \fIkey value key value ...\fR as in the form returned by \fBarray get\fR. Each instance of a @@ -249,6 +253,7 @@ it will return the string \fB02c322c222c\fR. .RE .TP \fBstring match\fR ?\fB\-nocase\fR? \fIpattern\fR \fIstring\fR +. See if \fIpattern\fR matches \fIstring\fR; return 1 if it does, 0 if it does not. If \fB\-nocase\fR is specified, then the pattern attempts to match against the string in a case insensitive manner. For the two @@ -282,6 +287,7 @@ the special interpretation of the characters \fB*?[]\e\fR in .RE .TP \fBstring range \fIstring first last\fR +. Returns a range of consecutive characters from \fIstring\fR, starting with the character whose index is \fIfirst\fR and ending with the character whose index is \fIlast\fR. An index of 0 refers to the first @@ -293,9 +299,11 @@ equal to the length of the string then it is treated as if it were string is returned. .TP \fBstring repeat \fIstring count\fR +. Returns \fIstring\fR repeated \fIcount\fR number of times. .TP \fBstring replace \fIstring first last\fR ?\fInewstring\fR? +. Removes a range of consecutive characters from \fIstring\fR, starting with the character whose index is \fIfirst\fR and ending with the character whose index is \fIlast\fR. An index of 0 refers to the @@ -307,14 +315,14 @@ and if \fIlast\fR is greater than or equal to the length of the string then it is treated as if it were \fBend\fR. If \fIfirst\fR is greater than \fIlast\fR or the length of the initial string, or \fIlast\fR is less than 0, then the initial string is returned untouched. -.VS 8.5 .TP \fBstring reverse \fIstring\fR +. Returns a string that is the same length as \fIstring\fR but with its characters in the reverse order. -.VE 8.5 .TP \fBstring tolower \fIstring\fR ?\fIfirst\fR? ?\fIlast\fR? +. Returns a value equal to \fIstring\fR except that all upper (or title) case letters have been converted to lower case. If \fIfirst\fR is specified, it refers to the first char index in the string to start @@ -323,6 +331,7 @@ the string to stop at (inclusive). \fIfirst\fR and \fIlast\fR may be specified as for the \fBindex\fR method. .TP \fBstring totitle \fIstring\fR ?\fIfirst\fR? ?\fIlast\fR? +. Returns a value equal to \fIstring\fR except that the first character in \fIstring\fR is converted to its Unicode title case variant (or upper case if there is no title case variant) and the rest of the @@ -333,6 +342,7 @@ stop at (inclusive). \fIfirst\fR and \fIlast\fR may be specified as for the \fBindex\fR method. .TP \fBstring toupper \fIstring\fR ?\fIfirst\fR? ?\fIlast\fR? +. Returns a value equal to \fIstring\fR except that all lower (or title) case letters have been converted to upper case. If \fIfirst\fR is specified, it refers to the first char index in the string to start @@ -341,24 +351,28 @@ the string to stop at (inclusive). \fIfirst\fR and \fIlast\fR may be specified as for the \fBindex\fR method. .TP \fBstring trim \fIstring\fR ?\fIchars\fR? +. Returns a value equal to \fIstring\fR except that any leading or trailing characters present in the string given by \fIchars\fR are removed. If \fIchars\fR is not specified then white space is removed (spaces, tabs, newlines, and carriage returns). .TP \fBstring trimleft \fIstring\fR ?\fIchars\fR? +. Returns a value equal to \fIstring\fR except that any leading characters present in the string given by \fIchars\fR are removed. If \fIchars\fR is not specified then white space is removed (spaces, tabs, newlines, and carriage returns). .TP \fBstring trimright \fIstring\fR ?\fIchars\fR? +. Returns a value equal to \fIstring\fR except that any trailing characters present in the string given by \fIchars\fR are removed. If \fIchars\fR is not specified then white space is removed (spaces, tabs, newlines, and carriage returns). .TP \fBstring wordend \fIstring charIndex\fR +. Returns the index of the character just after the last one in the word containing character \fIcharIndex\fR of \fIstring\fR. \fIcharIndex\fR may be specified as for the \fBindex\fR method. A word is @@ -367,6 +381,7 @@ or decimal digits) or underscore (Unicode connector punctuation) characters, or any single character other than these. .TP \fBstring wordstart \fIstring charIndex\fR +. Returns the index of the first character in the word containing character \fIcharIndex\fR of \fIstring\fR. \fIcharIndex\fR may be specified as for the \fBindex\fR method. A word is considered to be any @@ -374,6 +389,7 @@ contiguous range of alphanumeric (Unicode letters or decimal digits) or underscore (Unicode connector punctuation) characters, or any single character other than these. .SH EXAMPLE +.PP Test if the string in the variable \fIstring\fR is a proper non-empty prefix of the string \fBfoobar\fR. .CS @@ -384,14 +400,11 @@ if {$length == 0} { set isPrefix [\fBstring equal\fR -length $length $string "foobar"] } .CE - .SH "SEE ALSO" expr(n), list(n) - .SH KEYWORDS case conversion, compare, index, match, pattern, string, word, equal, ctype, character, reverse - .\" Local Variables: .\" mode: nroff .\" End: diff --git a/doc/switch.n b/doc/switch.n index 13edde8..21ecfc2 100644 --- a/doc/switch.n +++ b/doc/switch.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: switch.n,v 1.18 2008/03/21 19:22:31 dkf Exp $ +'\" RCS: @(#) $Id: switch.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH switch n 8.5 Tcl "Tcl Built-In Commands" @@ -33,32 +33,33 @@ command returns an empty string. .PP If the initial arguments to \fBswitch\fR start with \fB\-\fR then they are treated as options -.VS 8.5 unless there are exactly two arguments to \fBswitch\fR (in which case the first must the \fIstring\fR and the second must be the \fIpattern\fR/\fIbody\fR list). -.VE 8.5 The following options are currently supported: .TP 10 \fB\-exact\fR +. Use exact matching when comparing \fIstring\fR to a pattern. This is the default. .TP 10 \fB\-glob\fR +. When matching \fIstring\fR to the patterns, use glob-style matching (i.e. the same as implemented by the \fBstring match\fR command). .TP 10 \fB\-regexp\fR +. When matching \fIstring\fR to the patterns, use regular expression matching (as described in the \fBre_syntax\fR reference page). -'\" Options defined by TIP#75 -.VS 8.5 .TP 10 \fB\-nocase\fR +. Causes comparisons to be handled in a case-insensitive manner. .TP 10 \fB\-matchvar\fR \fIvarName\fR +. This option (only legal when \fB\-regexp\fR is also specified) specifies the name of a variable into which the list of matches found by the regular expression engine will be written. The first @@ -71,6 +72,7 @@ empty list written to it. This option may be specified at the same time as the \fB\-indexvar\fR option. .TP 10 \fB\-indexvar\fR \fIvarName\fR +. This option (only legal when \fB\-regexp\fR is also specified) specifies the name of a variable into which the list of indices referring to matching substrings @@ -85,15 +87,13 @@ capturing parenthesis in the regular expression that matched, and so on. When a \fBdefault\fR branch is taken, the variable will have the empty list written to it. This option may be specified at the same time as the \fB\-matchvar\fR option. -.VE 8.5 .TP 10 \fB\-\|\-\fR +. Marks the end of options. The argument following this one will be treated as \fIstring\fR even if it starts with a \fB\-\fR. -.VS 8.5 This is not required when the matching patterns and bodies are grouped together in a single argument. -.VE 8.5 .PP Two syntaxes are provided for the \fIpattern\fR and \fIbody\fR arguments. The first uses a separate argument for each of the patterns and commands; @@ -161,7 +161,6 @@ last) is taken. This example has a result of \fI3\fR: } .CE .PP -.VS 8.5 When matching against regular expressions, information about what exactly matched is easily obtained using the \fB\-matchvar\fR option: .CS @@ -175,7 +174,6 @@ exactly matched is easily obtained using the \fB\-matchvar\fR option: } } .CE -.VE 8.5 .SH "SEE ALSO" for(n), if(n), regexp(n) .SH KEYWORDS diff --git a/doc/tclsh.1 b/doc/tclsh.1 index dde112d..71932e1 100644 --- a/doc/tclsh.1 +++ b/doc/tclsh.1 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclsh.1,v 1.14 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: tclsh.1,v 1.15 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH tclsh 1 "" Tcl "Tcl Applications" @@ -16,7 +16,6 @@ tclsh \- Simple shell containing Tcl interpreter .SH SYNOPSIS \fBtclsh\fR ?-encoding \fIname\fR? ?\fIfileName arg arg ...\fR? .BE - .SH DESCRIPTION .PP \fBTclsh\fR is a shell-like application that reads Tcl commands @@ -30,15 +29,11 @@ If there exists a file \fB.tclshrc\fR (or \fBtclshrc.tcl\fR on the Windows platforms) in the home directory of the user, interactive \fBtclsh\fR evaluates the file as a Tcl script just before reading the first command from standard input. - .SH "SCRIPT FILES" .PP -.VS 8.5 If \fBtclsh\fR is invoked with arguments then the first few arguments specify the name of a script file, and, optionally, the encoding of -the text data stored in that script file. -.VE 8.5 -Any additional arguments +the text data stored in that script file. Any additional arguments are made available to the script as variables (see below). Instead of reading commands from standard input \fBtclsh\fR will read Tcl commands from the named file; \fBtclsh\fR will exit @@ -79,6 +74,7 @@ following three lines: # the next line restarts using tclsh \e exec tclsh "$0" "$@"\fR .CE +.PP This approach has three advantages over the approach in the previous paragraph. First, the location of the \fBtclsh\fR binary does not have to be hard-wired into the script: it can be anywhere in your shell @@ -103,28 +99,30 @@ its version number as part of the name. This has the advantage of allowing multiple versions of Tcl to exist on the same system at once, but also the disadvantage of making it harder to write scripts that start up uniformly across different versions of Tcl. - .SH "VARIABLES" .PP \fBTclsh\fR sets the following Tcl variables: .TP 15 \fBargc\fR +. Contains a count of the number of \fIarg\fR arguments (0 if none), not including the name of the script file. .TP 15 \fBargv\fR +. Contains a Tcl list whose elements are the \fIarg\fR arguments, in order, or an empty string if there are no \fIarg\fR arguments. .TP 15 \fBargv0\fR +. Contains \fIfileName\fR if it was specified. Otherwise, contains the name by which \fBtclsh\fR was invoked. .TP 15 \fBtcl_interactive\fR +. Contains 1 if \fBtclsh\fR is running interactively (no \fIfileName\fR was specified and standard input is a terminal-like device), 0 otherwise. - .SH PROMPTS .PP When \fBtclsh\fR is invoked interactively it normally prompts for each @@ -139,13 +137,10 @@ The variable \fBtcl_prompt2\fR is used in a similar way when a newline is typed but the current command is not yet complete; if \fBtcl_prompt2\fR is not set then no prompt is output for incomplete commands. - .SH "STANDARD CHANNELS" .PP See \fBTcl_StandardChannels\fR for more explanations. - .SH "SEE ALSO" encoding(n), fconfigure(n), tclvars(n) - .SH KEYWORDS argument, interpreter, prompt, script file, shell diff --git a/doc/tclvars.n b/doc/tclvars.n index cd5cc15..5d51f89 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.35 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.36 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" @@ -21,6 +21,7 @@ by the Tcl library. Except where noted below, these variables should normally be treated as read-only by application-specific code and by users. .TP \fBenv\fR +. This variable is maintained by Tcl as an array whose elements are the environment variables for the process. Reading an element will return the value of the corresponding @@ -52,6 +53,7 @@ will not work on Windows and is discouraged for cross-platform usage. .RE .TP \fBerrorCode\fR +. This variable holds the value of the \fB\-errorcode\fR return option set by the most recent error that occurred in this interpreter. This list value represents additional information about the error @@ -81,6 +83,7 @@ and system libraries. .RE .TP \fBCHILDKILLED\fI pid sigName msg\fR +. This format is used when a child process has been killed because of a signal. The \fIpid\fR element will be the process's identifier (in decimal). The \fIsigName\fR element will be the symbolic name of the signal that caused @@ -92,12 +95,14 @@ describing the signal, such as for \fBSIGPIPE\fR. .TP \fBCHILDSTATUS\fI pid code\fR +. This format is used when a child process has exited with a non-zero exit status. The \fIpid\fR element will be the process's identifier (in decimal) and the \fIcode\fR element will be the exit code returned by the process (also in decimal). .TP \fBCHILDSUSP\fI pid sigName msg\fR +. This format is used when a child process has been suspended because of a signal. The \fIpid\fR element will be the process's identifier, in decimal. @@ -110,6 +115,7 @@ describing the signal, such as for \fBSIGTTIN\fR. .TP \fBNONE\fR +. This format is used for errors where no additional information is available for an error besides the message returned with the error. In these cases the \fB\-errorcode\fR return option @@ -117,6 +123,7 @@ will consist of a list containing a single element whose contents are \fBNONE\fR. .TP \fBPOSIX \fIerrName msg\fR +. If the first element is \fBPOSIX\fR, then the error occurred during a POSIX kernel call. The \fIerrName\fR element will contain the symbolic name @@ -135,13 +142,14 @@ If none of these methods for setting the error code has been used, the Tcl interpreter will reset the variable to \fBNONE\fR after the next error. .RE -.\" .TP -.\" \fBTCL\fR ... -.\" . -.\" Indicates some sort of problem generated in relation to Tcl itself, -.\" e.g. a failure to look up a channel or variable. +.TP +\fBTCL\fR ... +. +Indicates some sort of problem generated in relation to Tcl itself, e.g. a +failure to look up a channel or variable. .TP \fBerrorInfo\fR +. This variable holds the value of the \fB\-errorinfo\fR return option set by the most recent error that occurred in this interpreter. This string value will contain one or more lines @@ -151,6 +159,7 @@ Its contents take the form of a stack trace showing the various nested Tcl commands that had been invoked at the time of the error. .TP \fBtcl_library\fR +. This variable holds the name of a directory containing the system library of Tcl scripts, such as those used for auto-loading. The value of this variable is returned by the \fBinfo library\fR command. @@ -181,6 +190,7 @@ The value of this variable is returned by the \fBinfo patchlevel\fR command. .TP \fBtcl_pkgPath\fR +. This variable holds a list of directories indicating where packages are normally installed. It is not used on Windows. It typically contains either one or two entries; if it contains two entries, the first is @@ -198,6 +208,7 @@ directories for packages you should add the names of those directories to \fBauto_path\fR, not \fBtcl_pkgPath\fR. .TP \fBtcl_platform\fR +. This is an associative array whose elements contain information about the platform on which the application is running, such as the name of the operating system, its current release number, and the machine's @@ -209,10 +220,12 @@ predefined elements are: .RS .TP \fBbyteOrder\fR +. The native byte order of this machine: either \fBlittleEndian\fR or \fBbigEndian\fR. .TP \fBdebug\fR +. If this variable exists, then the interpreter was compiled with and linked to a debug-enabled C run-time. This variable will only exist on Windows, so extension writers can specify which package to load depending on the @@ -220,11 +233,13 @@ C run-time library that is in use. This is not an indication that this core contains symbols. .TP \fBmachine\fR +. The instruction set executed by this machine, such as \fBintel\fR, \fBPPC\fR, \fB68k\fR, or \fBsun4m\fR. On UNIX machines, this is the value returned by \fBuname -m\fR. .TP -\fBos\fR +\fBos\fR +. The name of the operating system running on this machine, such as \fBWindows 95\fR, \fBWindows NT\fR, or \fBSunOS\fR. On UNIX machines, this is the value returned by \fBuname -s\fR. @@ -233,38 +248,44 @@ On Windows 95 and Windows 98, the value returned will be \fBWindows distinguish between the two, check the \fBosVersion\fR. .TP \fBosVersion\fR +. The version number for the operating system running on this machine. On UNIX machines, this is the value returned by \fBuname -r\fR. On Windows 95, the version will be 4.0; on Windows 98, the version will be 4.10. .TP \fBplatform\fR +. Either \fBwindows\fR, or \fBunix\fR. This identifies the general operating environment of the machine. .TP +\fBpointerSize\fR +. +This gives the size of the native-machine pointer in bytes (strictly, it +is same as the result of evaluating \fIsizeof(void*)\fR in C.) +.TP \fBthreaded\fR +. If this variable exists, then the interpreter was compiled with threads enabled. .TP \fBuser\fR +. This identifies the current user based on the login information available on the platform. This comes from the USER or LOGNAME environment variable on Unix, and the value from GetUserName on Windows. .TP \fBwordSize\fR +. This gives the size of the native-machine word in bytes (strictly, it is same as the result of evaluating \fIsizeof(long)\fR in C.) -.TP -\fBpointerSize\fR -This gives the size of the native-machine pointer in bytes (strictly, it -is same as the result of evaluating \fIsizeof(void*)\fR in C.) .RE .TP \fBtcl_precision\fR +. This variable controls the number of digits to generate when converting floating-point values to strings. It defaults -.VS 8.5 to 0. \fIApplications should not change this value;\fR it is provided for compatibility with legacy code. .PP @@ -278,7 +299,6 @@ will convert as \fI1.4\fR rather than \fI1.3999999999999999\fR even though the latter is nearer to the exact value of the binary number. .RE -.VE 8.5 .PP .RS 17 digits is @@ -299,6 +319,7 @@ variable. .RE .TP \fBtcl_rcFileName\fR +. This variable is used during initialization to indicate the name of a user-specific startup file. If it is set by application-specific initialization, then the Tcl startup code will check for the existence @@ -307,6 +328,7 @@ the variable is set to \fB~/.wishrc\fR for Unix and \fB~/wishrc.tcl\fR for Windows. .TP \fBtcl_traceCompile\fR +. The value of this variable can be set to control how much tracing information is displayed during bytecode compilation. @@ -324,6 +346,7 @@ This variable and functionality only exist if .RE .TP \fBtcl_traceExec\fR +. The value of this variable can be set to control how much tracing information is displayed during bytecode execution. @@ -349,6 +372,7 @@ This variable and functionality only exist if .RE .TP \fBtcl_wordchars\fR +. The value of this variable is a regular expression that can be set to control what are considered .QW word @@ -359,6 +383,7 @@ but a Unicode space character. Otherwise it defaults to \fB\ew\fR, which is any Unicode word character (number, letter, or underscore). .TP \fBtcl_nonwordchars\fR +. The value of this variable is a regular expression that can be set to control what are considered .QW non-word @@ -369,6 +394,7 @@ character. Otherwise it defaults to \fB\eW\fR, which is anything but a Unicode word character (number, letter, or underscore). .TP \fBtcl_version\fR +. When an interpreter is created Tcl initializes this variable to hold the version number for this version of Tcl in the form \fIx.y\fR. Changes to \fIx\fR represent major changes with probable @@ -382,17 +408,21 @@ and \fBwish\fR executables; the Tcl library does not define them itself but many Tcl environments do. .TP 6 \fBargc\fR +. The number of arguments to \fBtclsh\fR or \fBwish\fR. .TP 6 \fBargv\fR +. Tcl list of arguments to \fBtclsh\fR or \fBwish\fR. .TP 6 \fBargv0\fR +. The script that \fBtclsh\fR or \fBwish\fR started executing (if it was specified) or otherwise the name by which \fBtclsh\fR or \fBwish\fR was invoked. .TP 6 \fBtcl_interactive\fR +. Contains 1 if \fBtclsh\fR or \fBwish\fR is running interactively (no script was specified and standard input is a terminal-like device), 0 otherwise. @@ -401,6 +431,7 @@ The \fBwish\fR executable additionally specifies the following global variable: .TP 6 \fBgeometry\fR +. If set, contains the user-supplied geometry specification to use for the main Tk window. .SH "SEE ALSO" diff --git a/doc/unload.n b/doc/unload.n index b587bd6..b02c124 100644 --- a/doc/unload.n +++ b/doc/unload.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: unload.n,v 1.11 2008/03/26 14:51:42 dkf Exp $ +'\" RCS: @(#) $Id: unload.n,v 1.12 2008/06/29 22:28:24 dkf Exp $ '\" .so man.macros .TH unload n 8.5 Tcl "Tcl Built-In Commands" @@ -91,7 +91,9 @@ detached from the process. .PP The unload procedure must match the following prototype: .CS -typedef int Tcl_PackageUnloadProc(Tcl_Interp *\fIinterp\fR, int \fIflags\fR); +typedef int \fBTcl_PackageUnloadProc\fR( + Tcl_Interp *\fIinterp\fR, + int \fIflags\fR); .CE .PP The \fIinterp\fR argument identifies the interpreter from which the @@ -144,6 +146,7 @@ library is still loaded), it may be dangerous to use \fBunload\fR on such a library (as the library will be completely detached from the application while some interpreters will continue to use it). .SH EXAMPLE +.PP If an unloadable module in the file \fBfoobar.dll\fR had been loaded using the \fBload\fR command like this (on Windows): .CS -- cgit v0.12 From 6806d5f10cc77778fd3bac70f636b1e1210d6ced Mon Sep 17 00:00:00 2001 From: ferrieux Date: Sun, 29 Jun 2008 23:05:56 +0000 Subject: Avoid useless String conversion for CONCAT1 of pure byte arrays [Patch 1953758]. --- ChangeLog | 5 +++++ generic/tclExecute.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5c943d3..3df5ede 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-30 Alexandre Ferrieux + + * generic/tclExecute.c: Avoid useless String conversion for + CONCAT1 of pure byte arrays [Patch 1953758]. + 2008-06-29 Donal K. Fellows * doc/*.1, doc/*.3, doc/*.n: Many small updates, purging out of date diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 6e0d0d3..f00b01a 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.373 2008/06/13 05:45:10 mistachkin Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.374 2008/06/29 23:05:56 ferrieux Exp $ */ #include "tclInt.h" @@ -2122,19 +2122,42 @@ TclExecuteByteCode( int opnd, length, appendLen = 0; char *bytes, *p; Tcl_Obj **currPtr; + int onlyb ; opnd = TclGetUInt1AtPtr(pc+1); /* + * Detect only-bytearray-or-null case + */ + onlyb = 1; + for (currPtr=&OBJ_AT_DEPTH(opnd-1); currPtr<=&OBJ_AT_TOS; currPtr++) { + if (((*currPtr)->typePtr != &tclByteArrayType) + &&((*currPtr)->bytes != tclEmptyStringRep)) + {onlyb=0;break;} + } + + /* * Compute the length to be appended. */ + if (onlyb) + { + for (currPtr=&OBJ_AT_DEPTH(opnd-2); currPtr<=&OBJ_AT_TOS; currPtr++) { + if ((*currPtr)->bytes == tclEmptyStringRep) + continue; /* don't shimmer nulls */ + Tcl_GetByteArrayFromObj(*currPtr, &length); + appendLen += length; + } + } + else + { for (currPtr=&OBJ_AT_DEPTH(opnd-2); currPtr<=&OBJ_AT_TOS; currPtr++) { bytes = TclGetStringFromObj(*currPtr, &length); if (bytes != NULL) { appendLen += length; } } + } /* * If nothing is to be appended, just return the first object by @@ -2158,6 +2181,8 @@ TclExecuteByteCode( */ objResultPtr = OBJ_AT_DEPTH(opnd-1); + if (!onlyb) + { bytes = TclGetStringFromObj(objResultPtr, &length); #if !TCL_COMPILE_DEBUG if (bytes != tclEmptyStringRep && !Tcl_IsShared(objResultPtr)) { @@ -2191,6 +2216,37 @@ TclExecuteByteCode( } *p = '\0'; + } else { + + bytes = (char *) Tcl_GetByteArrayFromObj(objResultPtr, &length); +#if !TCL_COMPILE_DEBUG + if (!Tcl_IsShared(objResultPtr)) { + bytes = (char *) Tcl_SetByteArrayLength(objResultPtr,length+appendLen); + p = bytes + length; + currPtr = &OBJ_AT_DEPTH(opnd - 2); + } else { +#endif + TclNewObj(objResultPtr); + bytes = (char *) Tcl_SetByteArrayLength(objResultPtr,length+appendLen); + p = bytes; + currPtr = &OBJ_AT_DEPTH(opnd - 1); +#if !TCL_COMPILE_DEBUG + } +#endif + + /* + * Append the remaining characters. + */ + + for (; currPtr <= &OBJ_AT_TOS; currPtr++) { + if ((*currPtr)->bytes == tclEmptyStringRep) + continue; /* don't shimmer nulls */ + bytes = (char *) Tcl_GetByteArrayFromObj(*currPtr, &length); + memcpy(p, bytes, (size_t) length); + p += length; + } + } + TRACE_WITH_OBJ(("%u => ", opnd), objResultPtr); NEXT_INST_V(2, opnd, 1); } -- cgit v0.12 From f843ecd2f7b202e1c63288e271d352785ad601df Mon Sep 17 00:00:00 2001 From: ferrieux Date: Sun, 29 Jun 2008 23:12:58 +0000 Subject: Lrange cleanup and in-place optimization [Patch 1890831] --- ChangeLog | 5 ++++ generic/tclCmdIL.c | 84 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 53 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3df5ede..093ad74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-06-30 Alexandre Ferrieux + * generic/tclCmdIL.c: Lrange cleanup and in-place optimization + [Patch 1890831] + +2008-06-30 Alexandre Ferrieux + * generic/tclExecute.c: Avoid useless String conversion for CONCAT1 of pure byte arrays [Patch 1953758]. diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 296c3f4..5a43d91 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.140 2008/06/16 19:59:03 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.141 2008/06/29 23:12:59 ferrieux Exp $ */ #include "tclInt.h" @@ -2331,52 +2331,64 @@ Tcl_LrangeObjCmd( register Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_Obj *listPtr, **elemPtrs; - int listLen, first, result; + Tcl_Obj **elemPtrs; + int listLen, first, last, result; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "list first last"); return TCL_ERROR; } - - /* - * Make sure the list argument is a list object and get its length and a - * pointer to its array of element pointers. - */ - - listPtr = TclListObjCopy(interp, objv[1]); - if (listPtr == NULL) { - return TCL_ERROR; + + result = TclListObjLength(interp, objv[1], &listLen); + if (result != TCL_OK) { + return result; } - TclListObjGetElements(NULL, listPtr, &listLen, &elemPtrs); - + result = TclGetIntForIndexM(interp, objv[2], /*endValue*/ listLen - 1, - &first); - if (result == TCL_OK) { - int last; - - if (first < 0) { - first = 0; - } - - result = TclGetIntForIndexM(interp, objv[3], /*endValue*/ listLen - 1, - &last); - if (result == TCL_OK) { - if (last >= listLen) { - last = (listLen - 1); - } + &first); + if (result != TCL_OK) { + return result; + } + if (first < 0) { + first = 0; + } + + result = TclGetIntForIndexM(interp, objv[3], /*endValue*/ listLen - 1, + &last); + if (result != TCL_OK) { + return result; + } + if (last >= listLen) { + last = (listLen - 1); + } - if (first <= last) { - int numElems = (last - first + 1); + if (first>last) { + /* returning an empty list is easy */ + return TCL_OK; + } - Tcl_SetObjResult(interp, - Tcl_NewListObj(numElems, &(elemPtrs[first]))); - } - } + result=TclListObjGetElements(interp, objv[1], &listLen, &elemPtrs); + if (result != TCL_OK) { + return result; } + + if (Tcl_IsShared(objv[1])||(((List *) objv[1]->internalRep.twoPtrValue.ptr1)->refCount > 1)) + { + Tcl_SetObjResult(interp, + Tcl_NewListObj(last - first + 1, &(elemPtrs[first]))); + } + else + { + /* in-place is possible */ + if (last<(listLen-1)) + Tcl_ListObjReplace(interp,objv[1], last+1, listLen-1-last, 0, NULL); + /* this one is not conditioned on (first>0) in order to + * preserve the string-canonizing effect of [lrange 0 end] */ + Tcl_ListObjReplace(interp,objv[1], 0, first, 0, NULL); + Tcl_SetObjResult(interp,objv[1]); + } - Tcl_DecrRefCount(listPtr); - return result; + return TCL_OK; } /* -- cgit v0.12 From cbaf6674f8bc12e306ec3cd5754b8127692f84e7 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 30 Jun 2008 01:10:46 +0000 Subject: formatting, whitespace --- generic/tclCmdIL.c | 88 ++++++++++++++++-------------- generic/tclExecute.c | 148 +++++++++++++++++++++++++-------------------------- 2 files changed, 122 insertions(+), 114 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 5a43d91..c73f41f 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.141 2008/06/29 23:12:59 ferrieux Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.142 2008/06/30 01:10:46 das Exp $ */ #include "tclInt.h" @@ -1278,7 +1278,7 @@ TclInfoFrame( for (i=0 ; ilength ; i++) { lv[lc++] = Tcl_NewStringObj(efiPtr->fields[i].name, -1); if (efiPtr->fields[i].proc) { - lv[lc++] = + lv[lc++] = efiPtr->fields[i].proc(efiPtr->fields[i].clientData); } else { lv[lc++] = efiPtr->fields[i].clientData; @@ -2338,12 +2338,12 @@ Tcl_LrangeObjCmd( Tcl_WrongNumArgs(interp, 1, objv, "list first last"); return TCL_ERROR; } - + result = TclListObjLength(interp, objv[1], &listLen); if (result != TCL_OK) { return result; } - + result = TclGetIntForIndexM(interp, objv[2], /*endValue*/ listLen - 1, &first); if (result != TCL_OK) { @@ -2352,7 +2352,7 @@ Tcl_LrangeObjCmd( if (first < 0) { first = 0; } - + result = TclGetIntForIndexM(interp, objv[3], /*endValue*/ listLen - 1, &last); if (result != TCL_OK) { @@ -2362,32 +2362,42 @@ Tcl_LrangeObjCmd( last = (listLen - 1); } - if (first>last) { - /* returning an empty list is easy */ + if (first > last) { + /* + * Returning an empty list is easy. + */ + return TCL_OK; } - result=TclListObjGetElements(interp, objv[1], &listLen, &elemPtrs); + result = TclListObjGetElements(interp, objv[1], &listLen, &elemPtrs); if (result != TCL_OK) { return result; } - - if (Tcl_IsShared(objv[1])||(((List *) objv[1]->internalRep.twoPtrValue.ptr1)->refCount > 1)) - { - Tcl_SetObjResult(interp, - Tcl_NewListObj(last - first + 1, &(elemPtrs[first]))); - } - else - { - /* in-place is possible */ - if (last<(listLen-1)) - Tcl_ListObjReplace(interp,objv[1], last+1, listLen-1-last, 0, NULL); - /* this one is not conditioned on (first>0) in order to - * preserve the string-canonizing effect of [lrange 0 end] */ - Tcl_ListObjReplace(interp,objv[1], 0, first, 0, NULL); - Tcl_SetObjResult(interp,objv[1]); + + if (Tcl_IsShared(objv[1]) || + (((List *) objv[1]->internalRep.twoPtrValue.ptr1)->refCount > 1)) { + Tcl_SetObjResult(interp, Tcl_NewListObj(last - first + 1, + &(elemPtrs[first]))); + } else { + /* + * In-place is possible. + */ + + if (last < (listLen - 1)) { + Tcl_ListObjReplace(interp, objv[1], last + 1, listLen - 1 - last, + 0, NULL); } + /* + * This one is not conditioned on (first>0) in order to + * preserve the string-canonizing effect of [lrange 0 end]. + */ + + Tcl_ListObjReplace(interp, objv[1], 0, first, 0, NULL); + Tcl_SetObjResult(interp, objv[1]); + } + return TCL_OK; } @@ -3174,7 +3184,7 @@ Tcl_LsearchObjCmd( } for (i = offset; i < listc; i++) { match = 0; - if (sortInfo.indexc != 0) { + if (sortInfo.indexc != 0) { itemPtr = SelectObjFromSublist(listv[i], &sortInfo); if (sortInfo.resultCode != TCL_OK) { if (listPtr != NULL) { @@ -3188,7 +3198,7 @@ Tcl_LsearchObjCmd( } else { itemPtr = listv[i]; } - + switch ((enum modes) mode) { case SORTED: case EXACT: @@ -3490,7 +3500,7 @@ Tcl_LsortObjCmd( sortInfo.indexc = 0; sortInfo.unique = 0; sortInfo.interp = interp; - sortInfo.resultCode = TCL_OK; + sortInfo.resultCode = TCL_OK; cmdPtr = NULL; unique = 0; indices = 0; @@ -3649,7 +3659,7 @@ Tcl_LsortObjCmd( goto done; } sortInfo.numElements = length; - + indexc = sortInfo.indexc; sortMode = sortInfo.sortMode; if ((sortMode == SORTMODE_ASCII_NC) @@ -3657,7 +3667,7 @@ Tcl_LsortObjCmd( /* * For this function's purpose all string-based modes are equivalent */ - + sortMode = SORTMODE_ASCII; } @@ -3666,7 +3676,7 @@ Tcl_LsortObjCmd( * contain a sorted sublist of length 2**i. Use one extra subList at the * end, always at NULL, to indicate the end of the lists. */ - + for (j=0 ; j<=NUM_LISTS ; j++) { subList[j] = NULL; } @@ -3694,7 +3704,7 @@ Tcl_LsortObjCmd( /* * Determine the "value" of this object for sorting purposes */ - + if (sortMode == SORTMODE_ASCII) { elementArray[i].index.strValuePtr = TclGetString(indexPtr); } else if (sortMode == SORTMODE_INTEGER) { @@ -3719,14 +3729,14 @@ Tcl_LsortObjCmd( * Determine the representation of this element in the result: either * the objPtr itself, or its index in the original list. */ - + elementArray[i].objPtr = (indices ? INT2PTR(i) : listObjPtrs[i]); /* * Merge this element in the pre-existing sublists (and merge together * sublists when we have two of the same size). */ - + elementArray[i].nextPtr = NULL; elementPtr = &elementArray[i]; for (j=0 ; subList[j] ; j++) { @@ -3742,7 +3752,7 @@ Tcl_LsortObjCmd( /* * Merge all sublists */ - + elementPtr = subList[0]; for (j=1 ; jinternalRep.twoPtrValue.ptr1; newArray = &listRepPtr->elements; @@ -3807,7 +3817,7 @@ Tcl_LsortObjCmd( * Side effects: * If infoPtr->unique is set then infoPtr->numElements may be updated. * Possibly others, if a user-defined comparison command does something - * weird. + * weird. * * Note: * If infoPtr->unique is set, the merge assumes that there are no @@ -3819,7 +3829,7 @@ Tcl_LsortObjCmd( * eliminate all repeats in the general case where they are already * present in either the left or right list. A general code would need to * skip adjacent initial repeats in the left and right lists before - * comparing their initial elements, at each step. + * comparing their initial elements, at each step. *---------------------------------------------------------------------- */ @@ -3951,14 +3961,14 @@ SortCompare( * Once an error has occurred, skip any future comparisons so as * to preserve the error message in sortInterp->result. */ - + return 0; } objPtr1 = elemPtr1->index.objValuePtr; objPtr2 = elemPtr2->index.objValuePtr; - + paramObjv[0] = objPtr1; paramObjv[1] = objPtr2; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f00b01a..5587b48 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.374 2008/06/29 23:05:56 ferrieux Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.375 2008/06/30 01:10:46 das Exp $ */ #include "tclInt.h" @@ -1888,7 +1888,7 @@ TclExecuteByteCode( * Check for asynchronous handlers [Bug 746722]; we do the check every * ASYNC_CHECK_COUNT_MASK instruction, of the form (2**n-<1). */ - int localResult; + int localResult; if (TclAsyncReady(iPtr)) { DECACHE_STACK_INFO(); @@ -1900,13 +1900,13 @@ TclExecuteByteCode( } } - DECACHE_STACK_INFO(); + DECACHE_STACK_INFO(); localResult = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); CACHE_STACK_INFO(); if (localResult == TCL_ERROR) { - result = TCL_ERROR; - goto checkForCatch; + result = TCL_ERROR; + goto checkForCatch; } if (TclLimitReady(iPtr->limit)) { @@ -2122,42 +2122,43 @@ TclExecuteByteCode( int opnd, length, appendLen = 0; char *bytes, *p; Tcl_Obj **currPtr; - int onlyb ; + int onlyb = 1; opnd = TclGetUInt1AtPtr(pc+1); /* * Detect only-bytearray-or-null case */ - onlyb = 1; + for (currPtr=&OBJ_AT_DEPTH(opnd-1); currPtr<=&OBJ_AT_TOS; currPtr++) { if (((*currPtr)->typePtr != &tclByteArrayType) - &&((*currPtr)->bytes != tclEmptyStringRep)) - {onlyb=0;break;} + && ((*currPtr)->bytes != tclEmptyStringRep)) { + onlyb = 0; + break; + } } /* * Compute the length to be appended. */ - if (onlyb) - { - for (currPtr=&OBJ_AT_DEPTH(opnd-2); currPtr<=&OBJ_AT_TOS; currPtr++) { - if ((*currPtr)->bytes == tclEmptyStringRep) - continue; /* don't shimmer nulls */ + if (onlyb) { + for (currPtr = &OBJ_AT_DEPTH(opnd-2); currPtr <= &OBJ_AT_TOS; + currPtr++) { + if ((*currPtr)->bytes != tclEmptyStringRep) { Tcl_GetByteArrayFromObj(*currPtr, &length); appendLen += length; } } - else - { - for (currPtr=&OBJ_AT_DEPTH(opnd-2); currPtr<=&OBJ_AT_TOS; currPtr++) { - bytes = TclGetStringFromObj(*currPtr, &length); - if (bytes != NULL) { - appendLen += length; + } else { + for (currPtr = &OBJ_AT_DEPTH(opnd-2); currPtr <= &OBJ_AT_TOS; + currPtr++) { + bytes = TclGetStringFromObj(*currPtr, &length); + if (bytes != NULL) { + appendLen += length; + } } } - } /* * If nothing is to be appended, just return the first object by @@ -2181,71 +2182,68 @@ TclExecuteByteCode( */ objResultPtr = OBJ_AT_DEPTH(opnd-1); - if (!onlyb) - { - bytes = TclGetStringFromObj(objResultPtr, &length); + if (!onlyb) { + bytes = TclGetStringFromObj(objResultPtr, &length); #if !TCL_COMPILE_DEBUG - if (bytes != tclEmptyStringRep && !Tcl_IsShared(objResultPtr)) { - TclFreeIntRep(objResultPtr); - objResultPtr->typePtr = NULL; - objResultPtr->bytes = ckrealloc(bytes, (length + appendLen + 1)); - objResultPtr->length = length + appendLen; - p = TclGetString(objResultPtr) + length; - currPtr = &OBJ_AT_DEPTH(opnd - 2); - } else { + if (bytes != tclEmptyStringRep && !Tcl_IsShared(objResultPtr)) { + TclFreeIntRep(objResultPtr); + objResultPtr->typePtr = NULL; + objResultPtr->bytes = ckrealloc(bytes, (length + appendLen+1)); + objResultPtr->length = length + appendLen; + p = TclGetString(objResultPtr) + length; + currPtr = &OBJ_AT_DEPTH(opnd - 2); + } else #endif - p = (char *) ckalloc((unsigned) (length + appendLen + 1)); - TclNewObj(objResultPtr); - objResultPtr->bytes = p; - objResultPtr->length = length + appendLen; - currPtr = &OBJ_AT_DEPTH(opnd - 1); -#if !TCL_COMPILE_DEBUG - } -#endif - - /* - * Append the remaining characters. - */ - - for (; currPtr <= &OBJ_AT_TOS; currPtr++) { - bytes = TclGetStringFromObj(*currPtr, &length); - if (bytes != NULL) { - memcpy(p, bytes, (size_t) length); - p += length; + { + p = (char *) ckalloc((unsigned) (length + appendLen + 1)); + TclNewObj(objResultPtr); + objResultPtr->bytes = p; + objResultPtr->length = length + appendLen; + currPtr = &OBJ_AT_DEPTH(opnd - 1); } - } - *p = '\0'; - } else { + /* + * Append the remaining characters. + */ + for (; currPtr <= &OBJ_AT_TOS; currPtr++) { + bytes = TclGetStringFromObj(*currPtr, &length); + if (bytes != NULL) { + memcpy(p, bytes, (size_t) length); + p += length; + } + } + *p = '\0'; + } else { bytes = (char *) Tcl_GetByteArrayFromObj(objResultPtr, &length); #if !TCL_COMPILE_DEBUG - if (!Tcl_IsShared(objResultPtr)) { - bytes = (char *) Tcl_SetByteArrayLength(objResultPtr,length+appendLen); - p = bytes + length; - currPtr = &OBJ_AT_DEPTH(opnd - 2); - } else { -#endif - TclNewObj(objResultPtr); - bytes = (char *) Tcl_SetByteArrayLength(objResultPtr,length+appendLen); - p = bytes; - currPtr = &OBJ_AT_DEPTH(opnd - 1); -#if !TCL_COMPILE_DEBUG - } + if (!Tcl_IsShared(objResultPtr)) { + bytes = (char *) Tcl_SetByteArrayLength(objResultPtr, + length + appendLen); + p = bytes + length; + currPtr = &OBJ_AT_DEPTH(opnd - 2); + } else #endif - - /* - * Append the remaining characters. - */ - - for (; currPtr <= &OBJ_AT_TOS; currPtr++) { - if ((*currPtr)->bytes == tclEmptyStringRep) - continue; /* don't shimmer nulls */ - bytes = (char *) Tcl_GetByteArrayFromObj(*currPtr, &length); + { + TclNewObj(objResultPtr); + bytes = (char *) Tcl_SetByteArrayLength(objResultPtr, + length + appendLen); + p = bytes; + currPtr = &OBJ_AT_DEPTH(opnd - 1); + } + + /* + * Append the remaining characters. + */ + + for (; currPtr <= &OBJ_AT_TOS; currPtr++) { + if ((*currPtr)->bytes != tclEmptyStringRep) { + bytes = (char *) Tcl_GetByteArrayFromObj(*currPtr,&length); memcpy(p, bytes, (size_t) length); p += length; } - } + } + } TRACE_WITH_OBJ(("%u => ", opnd), objResultPtr); NEXT_INST_V(2, opnd, 1); -- cgit v0.12 From 9cc467decc5f8803e44823d56aa24c72bf491981 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 30 Jun 2008 14:01:33 +0000 Subject: * doc/ObjectType.3: Updated documentation of the Tcl_ObjType struct to match expectations of Tcl 8.5 [Bug 1917650]. --- ChangeLog | 5 +++ doc/ObjectType.3 | 110 +++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 79 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 093ad74..4a6c463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-30 Don Porter + + * doc/ObjectType.3: Updated documentation of the Tcl_ObjType + struct to match expectations of Tcl 8.5 [Bug 1917650]. + 2008-06-30 Alexandre Ferrieux * generic/tclCmdIL.c: Lrange cleanup and in-place optimization diff --git a/doc/ObjectType.3 b/doc/ObjectType.3 index f7bdb9f..a24f9c6 100644 --- a/doc/ObjectType.3 +++ b/doc/ObjectType.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ObjectType.3,v 1.16 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: ObjectType.3,v 1.17 2008/06/30 14:01:34 dgp Exp $ '\" .so man.macros .TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures" @@ -49,7 +49,10 @@ They are used to register new object types, look up types, and force conversions from one type to another. .PP \fBTcl_RegisterObjType\fR registers a new Tcl object type -in the table of all object types supported by Tcl. +in the table of all object types that \fBTcl_GetObjType\fR +can look up by name. There are other object types supported by Tcl +as well, which Tcl chooses not to register. Extensions can likewise +choose to register the object types they create or not. The argument \fItypePtr\fR points to a Tcl_ObjType structure that describes the new type by giving its name and by supplying pointers to four procedures @@ -60,11 +63,11 @@ it is replaced with the new type. The Tcl_ObjType structure is described in the section \fBTHE TCL_OBJTYPE STRUCTURE\fR below. .PP -\fBTcl_GetObjType\fR returns a pointer to the Tcl_ObjType +\fBTcl_GetObjType\fR returns a pointer to the registered Tcl_ObjType with name \fItypeName\fR. It returns NULL if no type with that name is registered. .PP -\fBTcl_AppendAllObjTypes\fR appends the name of each object type +\fBTcl_AppendAllObjTypes\fR appends the name of each registered object type as a list element onto the Tcl object referenced by \fIobjPtr\fR. The return value is \fBTCL_OK\fR unless there was an error converting \fIobjPtr\fR to a list object; @@ -74,7 +77,8 @@ in that case \fBTCL_ERROR\fR is returned. if possible. It creates a new internal representation for \fIobjPtr\fR appropriate for the target type \fItypePtr\fR -and sets its \fItypePtr\fR member to that type. +and sets its \fItypePtr\fR member as determined by calling the +\fItypePtr->setFromAnyProc\fR routine. Any internal representation for \fIobjPtr\fR's old type is freed. If an error occurs during conversion, it returns \fBTCL_ERROR\fR and leaves an error message in the result object for \fIinterp\fR @@ -82,12 +86,23 @@ unless \fIinterp\fR is NULL. Otherwise, it returns \fBTCL_OK\fR. Passing a NULL \fIinterp\fR allows this procedure to be used as a test whether the conversion can be done (and in fact was done). +.VS 8.5 +.PP +In many cases, the \fItypePtt->setFromAnyProc\fR routine will +set \fIobjPtr->typePtr\fR to the argument value \fItypePtr\fR, +but that is no longer guaranteed. The \fIsetFromAnyProc\fR is +free to set the internal representation for \fIobjPtr\fR to make +use of another related Tcl_ObjType, if it sees fit. +.VE 8.5 .SH "THE TCL_OBJTYPE STRUCTURE" .PP Extension writers can define new object types by defining four -procedures, -initializing a Tcl_ObjType structure to describe the type, -and calling \fBTcl_RegisterObjType\fR. +procedures and +initializing a Tcl_ObjType structure to describe the type. +Extension writers may also pass a pointer to their Tcl_ObjType +structire to \fBTcl_RegisterObjType\fR if they wish to permit +other extensions to look up their Tcl_ObjType by name with +the \fBTcl_GetObjType\fR routine. The \fBTcl_ObjType\fR structure is defined as follows: .PP .CS @@ -102,8 +117,9 @@ typedef struct Tcl_ObjType { .SS "THE NAME FIELD" .PP The \fIname\fR member describes the name of the type, e.g. \fBint\fR. -Extension writers can look up an object type using its name -with the \fBTcl_GetObjType\fR procedure. +When a type is registered, this is the name used by callers +of \fBTcl_GetObjType\fR to lookup the type. For unregistered +types, the \fIname\fR field is primarily of value for debugging. The remaining four members are pointers to procedures called by the generic Tcl object code: .SS "THE SETFROMANYPROC FIELD" @@ -124,22 +140,32 @@ unless \fIinterp\fR is NULL. If \fIsetFromAnyProc\fR is successful, it stores the new internal representation, sets \fIobjPtr\fR's \fItypePtr\fR member to point to -\fIsetFromAnyProc\fR's \fBTcl_ObjType\fR, and returns \fBTCL_OK\fR. +the \fBTcl_ObjType\fR struct corresponding to the new +internal representation, and returns \fBTCL_OK\fR. Before setting the new internal representation, the \fIsetFromAnyProc\fR must free any internal representation of \fIobjPtr\fR's old type; it does this by calling the old type's \fIfreeIntRepProc\fR if it is not NULL. -As an example, the \fIsetFromAnyProc\fR for the built-in Tcl integer type +.PP +As an example, the \fIsetFromAnyProc\fR for the built-in Tcl list type gets an up-to-date string representation for \fIobjPtr\fR by calling \fBTcl_GetStringFromObj\fR. -It parses the string to obtain an integer and, -if this succeeds, -stores the integer in \fIobjPtr\fR's internal representation -and sets \fIobjPtr\fR's \fItypePtr\fR member to point to the integer type's +It parses the string to verify it is in a valid list format and +to obtain each element value in the list, and, if this succeeds, +stores the list elements in \fIobjPtr\fR's internal representation +and sets \fIobjPtr\fR's \fItypePtr\fR member to point to the list type's Tcl_ObjType structure. +.PP Do not release \fIobjPtr\fR's old internal representation unless you replace it with a new one or reset the \fItypePtr\fR member to NULL. +.PP +The \fIsetFromAnyProc\fR member may be set to NULL, if the routines +making use of the internal representation have no need to derive that +internal representation from an arbitrary string value. However, in +this case, passing a pointer to the type to Tcl_ConvertToType() will +lead to a panic, so to avoid this possibility, the type +should \fInot\fR be registered. .SS "THE UPDATESTRINGPROC FIELD" .PP The \fIupdateStringProc\fR member contains the address of a function @@ -153,17 +179,27 @@ typedef void (Tcl_UpdateStringProc) (Tcl_Obj *\fIobjPtr\fR); \fIobjPtr\fR's \fIbytes\fR member is always NULL when it is called. It must always set \fIbytes\fR non-NULL before returning. We require the string representation's byte array -to have a null after the last byte, at offset \fIlength\fR; -this allows string representations that do not contain null bytes +to have a null after the last byte, at offset \fIlength\fR, +and to have no null bytes before that; this allows string representations to be treated as conventional null character-terminated C strings. +These restrictions are easily met by using Tcl's internal UTF encoding +for the string representation, same as one would do for other +Tcl routines accepting string values as arguments. Storage for the byte array must be allocated in the heap by \fBTcl_Alloc\fR or \fBckalloc\fR. Note that \fIupdateStringProc\fRs must allocate enough storage for the string's bytes and the terminating null byte. -The \fIupdateStringProc\fR for Tcl's built-in list type, for example, -builds an array of strings for each element object -and then calls \fBTcl_Merge\fR -to construct a string with proper Tcl list structure. -It stores this string as the list object's string representation. +.PP +The \fIupdateStringProc\fR for Tcl's built-in double type, for example, +calls Tcl_PrintDouble to write to a buffer of size TCL_DOUBLE_SPACE, +then allocates and copies the string representation to just enough +space to hold it. A pointer to the allocated space is stored in +the \fIbytes\fR member. +.PP +The \fIupdateStringProc\fR member may be set to NULL, if the routines +making use of the internal representation are written so that the +string representation is never invalidated. Failure to meet this +obligation will lead to panics or crashes when \fBTcl_GetStringFromObj\fR +or other similar routines ask for the string representation. .SS "THE DUPINTREPPROC FIELD" .PP The \fIdupIntRepProc\fR member contains the address of a function @@ -180,12 +216,12 @@ Before the call, \fIsrcPtr\fR's internal representation is valid and \fIdupPtr\fR's is not. \fIsrcPtr\fR's object type determines what copying its internal representation means. +.PP For example, the \fIdupIntRepProc\fR for the Tcl integer type simply copies an integer. -The built-in list type's \fIdupIntRepProc\fR -allocates a new array that points at the original element objects; -the elements are shared between the two lists -(and their reference counts are incremented to reflect the new references). +The built-in list type's \fIdupIntRepProc\fR uses a far more +sophisticated scheme to continue sharing storage as much as it +reasonably can. .SS "THE FREEINTREPPROC FIELD" .PP The \fIfreeIntRepProc\fR member contains the address of a function @@ -198,17 +234,19 @@ typedef void (Tcl_FreeInternalRepProc) (Tcl_Obj *\fIobjPtr\fR); The \fIfreeIntRepProc\fR function can deallocate the storage for the object's internal representation and do other type-specific processing necessary when an object is freed. -For example, Tcl list objects have an \fIinternalRep.otherValuePtr\fR -that points to an array of pointers to each element in the list. -The list type's \fIfreeIntRepProc\fR decrements -the reference count for each element object -(since the list will no longer refer to those objects), -then deallocates the storage for the array of pointers. +.PP +For example, the list type's \fIfreeIntRepProc\fR respects +the storage sharing scheme established by the \fIdupIntRepProc\fR +so that it only frees storage when the last object sharing it +is being freed. +.PP The \fIfreeIntRepProc\fR member can be set to NULL to indicate that the internal representation does not require freeing. -The \fIfreeIntRepProc\fR implementation should not access the -\fIbytes\fR member of the object, as this may potentially have already -been deleted. +The \fIfreeIntRepProc\fR implementation must not access the +\fIbytes\fR member of the object, since Tcl makes its own internal +uses of that field during object deletion. The defined tasks for +the \fIfreeIntRepProc\fR have no need to consult the \fIbytes\fR +member. .SH "SEE ALSO" Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount .SH KEYWORDS -- cgit v0.12 From 84eaf9679cf2e1abfc1eb837807d2ae4139fd3af Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 30 Jun 2008 15:24:04 +0000 Subject: Clean up typedef formatting --- ChangeLog | 16 +++++++++------- doc/ObjectType.3 | 18 +++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a6c463..2563779 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,19 @@ +2008-06-30 Donal K. Fellows + + * doc/ObjectType.3: Clean up typedef formatting. + 2008-06-30 Don Porter * doc/ObjectType.3: Updated documentation of the Tcl_ObjType - struct to match expectations of Tcl 8.5 [Bug 1917650]. + struct to match expectations of Tcl 8.5. [Bug 1917650] 2008-06-30 Alexandre Ferrieux - * generic/tclCmdIL.c: Lrange cleanup and in-place optimization - [Patch 1890831] - -2008-06-30 Alexandre Ferrieux + * generic/tclCmdIL.c: Lrange cleanup and in-place optimization. [Patch + 1890831] - * generic/tclExecute.c: Avoid useless String conversion for - CONCAT1 of pure byte arrays [Patch 1953758]. + * generic/tclExecute.c: Avoid useless String conversion for CONCAT1 of + pure byte arrays. [Patch 1953758] 2008-06-29 Donal K. Fellows diff --git a/doc/ObjectType.3 b/doc/ObjectType.3 index a24f9c6..49db696 100644 --- a/doc/ObjectType.3 +++ b/doc/ObjectType.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ObjectType.3,v 1.17 2008/06/30 14:01:34 dgp Exp $ +'\" RCS: @(#) $Id: ObjectType.3,v 1.18 2008/06/30 15:24:05 dkf Exp $ '\" .so man.macros .TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures" @@ -112,7 +112,7 @@ typedef struct Tcl_ObjType { Tcl_DupInternalRepProc *\fIdupIntRepProc\fR; Tcl_UpdateStringProc *\fIupdateStringProc\fR; Tcl_SetFromAnyProc *\fIsetFromAnyProc\fR; -} Tcl_ObjType; +} \fBTcl_ObjType\fR; .CE .SS "THE NAME FIELD" .PP @@ -129,7 +129,8 @@ called to create a valid internal representation from an object's string representation. .PP .CS -typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *\fIinterp\fR, +typedef int \fBTcl_SetFromAnyProc\fR( + Tcl_Interp *\fIinterp\fR, Tcl_Obj *\fIobjPtr\fR); .CE .PP @@ -173,7 +174,8 @@ called to create a valid string representation from an object's internal representation. .PP .CS -typedef void (Tcl_UpdateStringProc) (Tcl_Obj *\fIobjPtr\fR); +typedef void \fBTcl_UpdateStringProc\fR( + Tcl_Obj *\fIobjPtr\fR); .CE .PP \fIobjPtr\fR's \fIbytes\fR member is always NULL when it is called. @@ -206,7 +208,8 @@ The \fIdupIntRepProc\fR member contains the address of a function called to copy an internal representation from one object to another. .PP .CS -typedef void (Tcl_DupInternalRepProc) (Tcl_Obj *\fIsrcPtr\fR, +typedef void \fBTcl_DupInternalRepProc\fR( + Tcl_Obj *\fIsrcPtr\fR, Tcl_Obj *\fIdupPtr\fR); .CE .PP @@ -228,7 +231,8 @@ The \fIfreeIntRepProc\fR member contains the address of a function that is called when an object is freed. .PP .CS -typedef void (Tcl_FreeInternalRepProc) (Tcl_Obj *\fIobjPtr\fR); +typedef void \fBTcl_FreeInternalRepProc\fR( + Tcl_Obj *\fIobjPtr\fR); .CE .PP The \fIfreeIntRepProc\fR function can deallocate the storage @@ -248,6 +252,6 @@ uses of that field during object deletion. The defined tasks for the \fIfreeIntRepProc\fR have no need to consult the \fIbytes\fR member. .SH "SEE ALSO" -Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount +Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3) .SH KEYWORDS internal representation, object, object type, string representation, type conversion -- cgit v0.12 From 710f9b9f5fdf203a35d8cfbdcf37a90ee0eeb3f7 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 30 Jun 2008 15:58:06 +0000 Subject: typo --- doc/ObjectType.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ObjectType.3 b/doc/ObjectType.3 index 49db696..902c8da 100644 --- a/doc/ObjectType.3 +++ b/doc/ObjectType.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ObjectType.3,v 1.18 2008/06/30 15:24:05 dkf Exp $ +'\" RCS: @(#) $Id: ObjectType.3,v 1.19 2008/06/30 15:58:06 dgp Exp $ '\" .so man.macros .TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures" @@ -88,7 +88,7 @@ Passing a NULL \fIinterp\fR allows this procedure to be used as a test whether the conversion can be done (and in fact was done). .VS 8.5 .PP -In many cases, the \fItypePtt->setFromAnyProc\fR routine will +In many cases, the \fItypePtr->setFromAnyProc\fR routine will set \fIobjPtr->typePtr\fR to the argument value \fItypePtr\fR, but that is no longer guaranteed. The \fIsetFromAnyProc\fR is free to set the internal representation for \fIobjPtr\fR to make -- cgit v0.12 From f35ac41c5ad6fb2efa6d0833f0299549c69a6329 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 1 Jul 2008 13:24:06 +0000 Subject: Fix [2006884] --- ChangeLog | 5 +++++ tests/string.test | 18 ++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2563779..666974e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-01 Donal K. Fellows + + * tests/string.test: Eliminate non-ASCII characters from the actual + test script. [Bug 2006884] + 2008-06-30 Donal K. Fellows * doc/ObjectType.3: Clean up typedef formatting. diff --git a/tests/string.test b/tests/string.test index 85ca3f1..b42db45 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.71 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: string.test,v 1.72 2008/07/01 13:24:08 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -337,9 +337,7 @@ test string-6.12 {string is alnum, true} { test string-6.13 {string is alnum, false} { list [string is alnum -failindex var abc1.23] $var } {0 4} -test string-6.14 {string is alnum, unicode} { - string is alnum abcü -} 1 +test string-6.14 {string is alnum, unicode} "string is alnum abc\xfc" 1 test string-6.15 {string is alpha, true} { string is alpha abc } 1 @@ -371,7 +369,7 @@ test string-6.24 {string is digit, true} { string is digit 0123456789 } 1 test string-6.25 {string is digit, false} { - list [string is digit -fail var 0123Ü567] $var + list [string is digit -fail var 0123\u00dc567] $var } {0 4} test string-6.26 {string is digit, false} { list [string is digit -fail var +123567] $var @@ -492,7 +490,7 @@ test string-6.60 {string is lower, true} { string is lower abc } 1 test string-6.61 {string is lower, unicode true} { - string is lower abcüue + string is lower abc\u00fcue } 1 test string-6.62 {string is lower, false} { list [string is lower -fail var aBc] $var @@ -501,7 +499,7 @@ test string-6.63 {string is lower, false} { list [string is lower -fail var abc1] $var } {0 3} test string-6.64 {string is lower, unicode false} { - list [string is lower -fail var abÜUE] $var + list [string is lower -fail var ab\u00dcUE] $var } {0 2} test string-6.65 {string is space, true} { string is space " \t\n\v\f" @@ -539,7 +537,7 @@ test string-6.75 {string is upper, true} { string is upper ABC } 1 test string-6.76 {string is upper, unicode true} { - string is upper ABCÜUE + string is upper ABC\u00dcUE } 1 test string-6.77 {string is upper, false} { list [string is upper -fail var AbC] $var @@ -548,13 +546,13 @@ test string-6.78 {string is upper, false} { list [string is upper -fail var AB2C] $var } {0 2} test string-6.79 {string is upper, unicode false} { - list [string is upper -fail var ABCüue] $var + list [string is upper -fail var ABC\u00fcue] $var } {0 3} test string-6.80 {string is wordchar, true} { string is wordchar abc_123 } 1 test string-6.81 {string is wordchar, unicode true} { - string is wordchar abcüabÜAB\u5001 + string is wordchar abc\u00fcab\u00dcAB\u5001 } 1 test string-6.82 {string is wordchar, false} { list [string is wordchar -fail var abcd.ef] $var -- cgit v0.12 From 349fc26e6c278e0d1de00458c76a113ae8425f88 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 1 Jul 2008 14:29:11 +0000 Subject: Add focussed stack limiting to the RE compiler. Tuning might not yet be right but it passes everything normally checked in the test suite. [Bug 1905562] --- ChangeLog | 7 ++++++- generic/regc_nfa.c | 17 ++++++++++++++--- generic/regcomp.c | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 666974e..3767add 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2008-07-01 Donal K. Fellows +2008-07-01 Donal K. Fellows + + * generic/regc_nfa.c (duptraverse): Impose a maximum stack depth on + the single most recursive part of the RE engine. The actual maximum + may need tuning, but that needs a system with a small stack to carry + out. [Bug 1905562] * tests/string.test: Eliminate non-ASCII characters from the actual test script. [Bug 2006884] diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index d8cbd82..4fb3ea6 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -725,7 +725,7 @@ dupnfa( } stop->tmp = to; - duptraverse(nfa, start, from); + duptraverse(nfa, start, from, 0); /* done, except for clearing out the tmp pointers */ stop->tmp = NULL; @@ -740,7 +740,8 @@ static void duptraverse( struct nfa *nfa, struct state *s, - struct state *stmp) /* s's duplicate, or NULL */ + struct state *stmp, /* s's duplicate, or NULL */ + int depth) { struct arc *a; @@ -754,8 +755,18 @@ duptraverse( return; } + /* + * Arbitrary depth limit. Needs tuning, but this value is sufficient to + * make all normal tests (not reg-33.14) pass. + */ +#define DUPTRAVERSE_MAX_DEPTH 500 + + if (depth++ > DUPTRAVERSE_MAX_DEPTH) { + NERR(REG_ESPACE); + } + for (a=s->outs ; a!=NULL && !NISERR() ; a=a->outchain) { - duptraverse(nfa, a->to, NULL); + duptraverse(nfa, a->to, NULL, depth); if (NISERR()) { break; } diff --git a/generic/regcomp.c b/generic/regcomp.c index afe1b1b..8ff77ad 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -131,7 +131,7 @@ static void cloneouts(struct nfa *, struct state *, struct state *, struct state static void delsub(struct nfa *, struct state *, struct state *); static void deltraverse(struct nfa *, struct state *, struct state *); static void dupnfa(struct nfa *, struct state *, struct state *, struct state *, struct state *); -static void duptraverse(struct nfa *, struct state *, struct state *); +static void duptraverse(struct nfa *, struct state *, struct state *, int); static void cleartraverse(struct nfa *, struct state *); static void specialcolors(struct nfa *); static long optimize(struct nfa *, FILE *); -- cgit v0.12 From cd7cb1f61d5ef41720805bb2fdb479a6e05e1ea4 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 3 Jul 2008 17:28:44 +0000 Subject: * library/package.tcl: Removed [file readable] testing from [tclPkgUnknown] and friends. We find out soon enough whether a file is readable when we try to [source] it, and not testing before allows us to workaround the bugs on some common filesystems where [file readable] lies to us. [Patch 1969717] --- ChangeLog | 8 ++++++++ library/package.tcl | 40 +++++++++++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3767add..585305b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-03 Don Porter + + * library/package.tcl: Removed [file readable] testing from + [tclPkgUnknown] and friends. We find out soon enough whether a + file is readable when we try to [source] it, and not testing + before allows us to workaround the bugs on some common filesystems + where [file readable] lies to us. [Patch 1969717] + 2008-07-01 Donal K. Fellows * generic/regc_nfa.c (duptraverse): Impose a maximum stack depth on diff --git a/library/package.tcl b/library/package.tcl index 64197f7..56dccd0 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl which can be loaded on demand # for package management. # -# RCS: @(#) $Id: package.tcl,v 1.35 2006/11/03 00:34:52 hobbs Exp $ +# RCS: @(#) $Id: package.tcl,v 1.36 2008/07/03 17:28:46 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -485,8 +485,15 @@ proc tclPkgUnknown {name args} { foreach file [glob -directory $dir -join -nocomplain \ * pkgIndex.tcl] { set dir [file dirname $file] - if {![info exists procdDirs($dir)] && [file readable $file]} { - if {[catch {source $file} msg]} { + if {![info exists procdDirs($dir)]} { + set code [catch {source $file} msg opt] + if {$code == 1 && + [lindex [dict get $opt -errorcode] 0] eq "POSIX" && + [lindex [dict get $opt -errorcode] 1] eq "EACCES"} { + # $file was not readable; silently ignore + continue + } + if {$code} { tclLog "error reading package index file $file: $msg" } else { set procdDirs($dir) 1 @@ -497,10 +504,16 @@ proc tclPkgUnknown {name args} { set dir [lindex $use_path end] if {![info exists procdDirs($dir)]} { set file [file join $dir pkgIndex.tcl] - # safe interps usually don't have "file readable", - # nor stderr channel - if {([interp issafe] || [file readable $file])} { - if {[catch {source $file} msg] && ![interp issafe]} { + # safe interps usually don't have "file exists", + if {([interp issafe] || [file exists $file])} { + set code [catch {source $file} msg opt] + if {$code == 1 && + [lindex [dict get $opt -errorcode] 0] eq "POSIX" && + [lindex [dict get $opt -errorcode] 1] eq "EACCES"} { + # $file was not readable; silently ignore + continue + } + if {$code} { tclLog "error reading package index file $file: $msg" } else { set procdDirs($dir) 1 @@ -546,8 +559,6 @@ proc tclPkgUnknown {name args} { # This procedure extends the "package unknown" function for MacOSX. # It scans the Resources/Scripts directories of the immediate children # of the auto_path directories for pkgIndex files. -# Only installed in interps that are not safe so we don't check -# for [interp issafe] as in tclPkgUnknown. # # Arguments: # original - original [package unknown] procedure @@ -583,8 +594,15 @@ proc tcl::MacOSXPkgUnknown {original name args} { foreach file [glob -directory $dir -join -nocomplain \ * Resources Scripts pkgIndex.tcl] { set dir [file dirname $file] - if {![info exists procdDirs($dir)] && [file readable $file]} { - if {[catch {source $file} msg]} { + if {![info exists procdDirs($dir)]} { + set code [catch {source $file} msg opt] + if {$code == 1 && + [lindex [dict get $opt -errorcode] 0] eq "POSIX" && + [lindex [dict get $opt -errorcode] 1] eq "EACCES"} { + # $file was not readable; silently ignore + continue + } + if {$code} { tclLog "error reading package index file $file: $msg" } else { set procdDirs($dir) 1 -- cgit v0.12 From 941f69e59411a1e30db7f56ce9994bbd56f479e1 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 3 Jul 2008 17:38:32 +0000 Subject: * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak reported in [Bug 1987821]. Thanks to Miguel for the rpeort and Don Porter for tracking the cause down. --- ChangeLog | 6 ++++++ generic/tclIORChan.c | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 585305b..0420a29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-07-03 Andreas Kupries + + * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak + reported in [Bug 1987821]. Thanks to Miguel for the rpeort and + Don Porter for tracking the cause down. + 2008-07-03 Don Porter * library/package.tcl: Removed [file readable] testing from diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index ac19b45..a30469b 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.33 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.34 2008/07/03 17:38:38 andreas_kupries Exp $ */ #include @@ -2129,6 +2129,18 @@ InvokeTclMethod( *resultObjPtr = resObj; Tcl_IncrRefCount(resObj); } + + /* + * Cleanup of the dynamic parts of the command. + */ + + if (argOneObj) { + Tcl_DecrRefCount(argOneObj); + if (argTwoObj) { + Tcl_DecrRefCount(argTwoObj); + } + } + return TCL_ERROR; } -- cgit v0.12 From 8e8991e0652bcd5740d636df2dd001e91eca2803 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 6 Jul 2008 09:42:56 +0000 Subject: Improve [lindex] examples. --- ChangeLog | 4 ++++ doc/lindex.n | 29 ++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0420a29..b8a5222 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-06 Donal K. Fellows + + * doc/lindex.n: Improve examples. + 2008-07-03 Andreas Kupries * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak diff --git a/doc/lindex.n b/doc/lindex.n index ac17d25..39682d9 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lindex.n,v 1.18 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: lindex.n,v 1.19 2008/07/06 09:42:58 dkf Exp $ '\" .so man.macros .TH lindex n 8.4 Tcl "Tcl Built-In Commands" @@ -66,11 +66,9 @@ lindex [lindex [lindex $a 1] 2] 3 .CE .SH EXAMPLES .PP +Lists can be indexed into from either end: +.PP .CS -\fBlindex\fR {a b c} - \fI\(-> a b c\fR -\fBlindex\fR {a b c} {} - \fI\(-> a b c\fR \fBlindex\fR {a b c} 0 \fI\(-> a\fR \fBlindex\fR {a b c} 2 @@ -79,6 +77,15 @@ lindex [lindex [lindex $a 1] 2] 3 \fI\(-> c\fR \fBlindex\fR {a b c} end-1 \fI\(-> b\fR +.CE +.PP +Lists or sequences of indices allow selection into lists of lists: +.PP +.CS +\fBlindex\fR {a b c} + \fI\(-> a b c\fR +\fBlindex\fR {a b c} {} + \fI\(-> a b c\fR \fBlindex\fR {{a b c} {d e f} {g h i}} 2 1 \fI\(-> h\fR \fBlindex\fR {{a b c} {d e f} {g h i}} {2 1} @@ -88,6 +95,18 @@ lindex [lindex [lindex $a 1] 2] 3 \fBlindex\fR {{{a b} {c d}} {{e f} {g h}}} {1 1 0} \fI\(-> g\fR .CE +.PP +List indices may also perform limited computation, adding or subtracting fixed +amounts from other indices: +.PP +.CS +set idx 1 +\fBlindex\fR {a b c d e f} $idx+2 + \fI\(-> d\fR +set idx 3 +\fBlindex\fR {a b c d e f} $idx+2 + \fI\(-> f\fR +.CE .SH "SEE ALSO" list(n), lappend(n), linsert(n), llength(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n), -- cgit v0.12 From 0e2831f23ba00afda87689a61956361bd7195b25 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 7 Jul 2008 08:29:11 +0000 Subject: Correct examples. [Bug 1982642] --- ChangeLog | 4 ++++ doc/regexp.n | 28 ++++++++++++++++++---------- doc/regsub.n | 20 +++++++++++++------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8a5222..e99c5aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-07 Donal K. Fellows + + * doc/regexp.n, doc/regsub.n: Correct examples. [Bug 1982642] + 2008-07-06 Donal K. Fellows * doc/lindex.n: Improve examples. diff --git a/doc/regexp.n b/doc/regexp.n index 1e31131..e40b9c4 100644 --- a/doc/regexp.n +++ b/doc/regexp.n @@ -1,10 +1,11 @@ +'\" -*- nroff -*- '\" '\" Copyright (c) 1998 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: regexp.n,v 1.29 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: regexp.n,v 1.30 2008/07/07 08:29:14 dkf Exp $ '\" .so man.macros .TH regexp n 8.3 Tcl "Tcl Built-In Commands" @@ -161,30 +162,37 @@ Find the first occurrence of a word starting with \fBfoo\fR in a string that is not actually an instance of \fBfoobar\fR, and get the letters following it up to the end of the word into a variable: .CS -\fBregexp\fR {\e)(\ew*)} $string \-> restOfWord +\fBregexp\fR {\emfoo(?!bar\eM)(\ew*)} $string \-> restOfWord .CE Note that the whole matched substring has been placed in the variable -\fB\->\fR which is a name chosen to look nice given that we are not +.QW \fB\->\fR , +which is a name chosen to look nice given that we are not actually interested in its contents. .PP Find the index of the word \fBbadger\fR (in any case) within a string and store that in the variable \fBlocation\fR: .CS -\fBregexp\fR \-indices {(?i)\e} $string location +\fBregexp\fR \-indices {(?i)\embadger\eM} $string location +.CE +This could also be written as a \fIbasic\fR regular expression (as opposed +to using the default syntax of \fIadvanced\fR regular expressions) match by +prefixing the expression with a suitable flag: +.CS +\fBregexp\fR \-indices {(?ib)\e} $string location .CE .PP -Count the number of octal digits in a string: +This counts the number of octal digits in a string: .CS \fBregexp\fR \-all {[0\-7]} $string .CE .PP -List all words (consisting of all sequences of non-whitespace -characters) in a string: +This lists all words (consisting of all sequences of non-whitespace +characters) in a string, and is useful as a more powerful version of the +\fBsplit\fR command: .CS \fBregexp\fR \-all \-inline {\eS+} $string .CE .SH "SEE ALSO" -re_syntax(n), regsub(n), -string(n) +re_syntax(n), regsub(n), string(n) .SH KEYWORDS -match, regular expression, string +match, parsing, pattern, regular expression, splitting, string diff --git a/doc/regsub.n b/doc/regsub.n index cc5994f..5686c1d 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -1,3 +1,4 @@ +'\" -*- nroff -*- '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -6,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.23 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.24 2008/07/07 08:29:14 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -149,20 +150,26 @@ of regular expressions. Replace (in the string in variable \fIstring\fR) every instance of \fBfoo\fR which is a word by itself with \fBbar\fR: .CS -\fBregsub\fR -all {\e} $string bar string +\fBregsub\fR -all {\emfoo\eM} $string bar string +.CE +or (using the +.QW "basic regular expression" +syntax): +.CS +\fBregsub\fR -all {(?b)\e} $string bar string .CE .PP Insert double-quotes around the first instance of the word \fBinteresting\fR, however it is capitalized. .CS -\fBregsub\fR -nocase {\e} $string {"&"} string +\fBregsub\fR -nocase {\eyinteresting\ey} $string {"&"} string .CE .PP Convert all non-ASCII and Tcl-significant characters into \eu escape sequences by using \fBregsub\fR and \fBsubst\fR in combination: .CS # This RE is just a character class for everything "bad" -set RE {[][{};#\e\e\e$\es\eu0100-\euffff]} +set RE {[][{};#\e\e\e$\es\eu0080-\euffff]} # We will substitute with a fragment of Tcl script in brackets set substitution {[format \e\e\e\eu%04x [scan "\e\e&" %c]]} @@ -172,7 +179,6 @@ set substitution {[format \e\e\e\eu%04x [scan "\e\e&" %c]]} set quoted [subst [\fBregsub\fR -all $RE $string $substitution]] .CE .SH "SEE ALSO" -regexp(n), re_syntax(n), subst(n), -string(n) +regexp(n), re_syntax(n), subst(n), string(n) .SH KEYWORDS -match, pattern, regular expression, substitute +match, pattern, quoting, regular expression, substitute -- cgit v0.12 From 20168c3b159cde2d92308cb17dd6c8cf8a2e56bf Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 7 Jul 2008 14:06:21 +0000 Subject: typo --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e99c5aa..7bc062f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,7 +9,7 @@ 2008-07-03 Andreas Kupries * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak - reported in [Bug 1987821]. Thanks to Miguel for the rpeort and + reported in [Bug 1987821]. Thanks to Miguel for the report and Don Porter for tracking the cause down. 2008-07-03 Don Porter -- cgit v0.12 From e20bdb2a97b3bb74093fc5a2219a6cff091c9c2d Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 7 Jul 2008 21:40:18 +0000 Subject: * generic/tclCmdIL.c (InfoFrameCmd): Fixed unsafe idiom of setting the interp result found by Don Porter. --- ChangeLog | 5 +++++ generic/tclCmdIL.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7bc062f..c7c2c31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-07 Andreas Kupries + + * generic/tclCmdIL.c (InfoFrameCmd): Fixed unsafe idiom of setting + the interp result found by Don Porter. + 2008-07-07 Donal K. Fellows * doc/regexp.n, doc/regsub.n: Correct examples. [Bug 1982642] diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index c73f41f..4eef275 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.142 2008/06/30 01:10:46 das Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.143 2008/07/07 21:40:18 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1044,7 +1044,7 @@ InfoFrameCmd( int levels = (iPtr->cmdFramePtr == NULL ? 0 : iPtr->cmdFramePtr->level); - Tcl_SetIntObj(Tcl_GetObjResult(interp), levels); + Tcl_SetObjResult(interp, Tcl_NewIntObj (levels)); return TCL_OK; } else if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?number?"); -- cgit v0.12 From fb746d8a585695e0450cea45765c7d1626d0ae79 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 8 Jul 2008 12:34:56 +0000 Subject: Tighten up language. --- ChangeLog | 5 +++++ doc/CrtInterp.3 | 31 ++++++++++++++++--------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7c2c31..a8d50aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-08 Donal K. Fellows + + * doc/CrtInterp.3: Tighten up the descriptions of behaviour to make + this page easier to read for a "Tcl 8.6" audience. + 2008-07-07 Andreas Kupries * generic/tclCmdIL.c (InfoFrameCmd): Fixed unsafe idiom of setting diff --git a/doc/CrtInterp.3 b/doc/CrtInterp.3 index b0dfc50..14679a6 100644 --- a/doc/CrtInterp.3 +++ b/doc/CrtInterp.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtInterp.3,v 1.7 2002/06/26 11:50:52 msofer Exp $ +'\" RCS: @(#) $Id: CrtInterp.3,v 1.8 2008/07/08 12:34:58 dkf Exp $ '\" .so man.macros .TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures" @@ -28,25 +28,24 @@ int .AP Tcl_Interp *interp in Token for interpreter to be destroyed. .BE - .SH DESCRIPTION .PP \fBTcl_CreateInterp\fR creates a new interpreter structure and returns -a token for it. The token is required in calls to most other Tcl +a token for it. The token is required in calls to most other Tcl procedures, such as \fBTcl_CreateCommand\fR, \fBTcl_Eval\fR, and \fBTcl_DeleteInterp\fR. Clients are only allowed to access a few of the fields of -Tcl_Interp structures; see the \fBTcl_Interp\fR +Tcl_Interp structures; see the \fBTcl_Interp\fR and \fBTcl_CreateCommand\fR man pages for details. The new interpreter is initialized with the built-in Tcl commands -and with the variables documented in tclvars(n). To bind in +and with the variables documented in tclvars(n). To bind in additional commands, call \fBTcl_CreateCommand\fR. .PP \fBTcl_DeleteInterp\fR marks an interpreter as deleted; the interpreter will eventually be deleted when all calls to \fBTcl_Preserve\fR for it have been matched by calls to \fBTcl_Release\fR. At that time, all of the resources associated with it, including variables, procedures, and -application-specific command bindings, will be deleted. After +application-specific command bindings, will be deleted. After \fBTcl_DeleteInterp\fR returns any attempt to use \fBTcl_Eval\fR on the interpreter will fail and return \fBTCL_ERROR\fR. After the call to \fBTcl_DeleteInterp\fR it is safe to examine the interpreter's result, @@ -66,7 +65,6 @@ between when only the memory the callback is responsible for is being deleted and when the whole interpreter is being deleted. In the former case the callback may recreate the data being deleted, but this would lead to an infinite loop if the interpreter were being deleted. - .SH "INTERPRETERS AND MEMORY MANAGEMENT" .PP \fBTcl_DeleteInterp\fR can be called at any time on an interpreter that may @@ -86,14 +84,16 @@ the last call to \fBTcl_Preserve\fR is matched by a call to The rules for when the user of an interpreter must call \fBTcl_Preserve\fR and \fBTcl_Release\fR are simple: .TP -Interpreters Passed As Arguments +\fBInterpreters Passed As Arguments\fR +. Functions that are passed an interpreter as an argument can safely use the interpreter without any special protection. Thus, when you write an extension consisting of new Tcl commands, no special code is needed to protect interpreters received as arguments. This covers the majority of all uses. .TP -Interpreter Creation And Deletion +\fBInterpreter Creation And Deletion\fR +. When a new interpreter is created and used in a call to \fBTcl_Eval\fR, \fBTcl_VarEval\fR, \fBTcl_GlobalEval\fR, \fBTcl_SetVar\fR, or \fBTcl_GetVar\fR, a pair of calls to \fBTcl_Preserve\fR and @@ -104,13 +104,16 @@ it is no longer needed, call \fBTcl_InterpDeleted\fR to test if some other code already called \fBTcl_DeleteInterp\fR; if not, call \fBTcl_DeleteInterp\fR before calling \fBTcl_Release\fR in your own code. .TP -Retrieving An Interpreter From A Data Structure +\fBRetrieving An Interpreter From A Data Structure\fR +. When an interpreter is retrieved from a data structure (e.g. the client -data of a callback) for use in \fBTcl_Eval\fR, \fBTcl_VarEval\fR, -\fBTcl_GlobalEval\fR, \fBTcl_SetVar\fR, or \fBTcl_GetVar\fR, a pair of +data of a callback) for use in one of the evaluation functions +(\fBTcl_Eval\fR, \fBTcl_VarEval\fR, \fBTcl_GlobalEval\fR, \fBTcl_EvalObjv\fR, +etc.) or variable access functions (\fBTcl_SetVar\fR, \fBTcl_GetVar\fR, +\fBTcl_SetVar2Ex\fR, etc.), a pair of calls to \fBTcl_Preserve\fR and \fBTcl_Release\fR should be wrapped around all uses of the interpreter; it is unsafe to reuse the interpreter once -\fBTcl_Release\fR has been called. If an interpreter is stored inside a +\fBTcl_Release\fR has been called. If an interpreter is stored inside a callback data structure, an appropriate deletion cleanup mechanism should be set up by the code that creates the data structure so that the interpreter is removed from the data structure (e.g. by setting the field @@ -121,9 +124,7 @@ reused. All uses of interpreters in Tcl and Tk have already been protected. Extension writers should ensure that their code also properly protects any additional interpreters used, as described above. - .SH "SEE ALSO" Tcl_Preserve(3), Tcl_Release(3) - .SH KEYWORDS command, create, delete, interpreter -- cgit v0.12 From 202c0ad200e4c9baabff9d3861777c1a47606158 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 8 Jul 2008 17:52:14 +0000 Subject: * generic/tclGet.c: Corrected out of date comments and removed * generic/tclInt.decls: internal routine TclGetLong() that's no longer used. If an extension is using this from the internal stubs table, it can shift to the public routine Tcl_GetLongFromObj() or can request addition of a public Tcl_GetLong(). ***POTENTIAL INCOMPATIBILITY*** * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: --- ChangeLog | 12 +++++++++++ generic/tclGet.c | 57 +++++++-------------------------------------------- generic/tclInt.decls | 9 ++++---- generic/tclIntDecls.h | 16 ++++----------- generic/tclStubInit.c | 4 ++-- 5 files changed, 30 insertions(+), 68 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8d50aa..d4a36e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-07-08 Don Porter + + * generic/tclGet.c: Corrected out of date comments and removed + * generic/tclInt.decls: internal routine TclGetLong() that's no longer + used. If an extension is using this from the internal stubs table, + it can shift to the public routine Tcl_GetLongFromObj() or can + request addition of a public Tcl_GetLong(). + ***POTENTIAL INCOMPATIBILITY*** + + * generic/tclIntDecls.h: make genstubs + * generic/tclStubInit.c: + 2008-07-08 Donal K. Fellows * doc/CrtInterp.3: Tighten up the descriptions of behaviour to make diff --git a/generic/tclGet.c b/generic/tclGet.c index 3dfe905..2ff203b 100644 --- a/generic/tclGet.c +++ b/generic/tclGet.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGet.c,v 1.21 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclGet.c,v 1.22 2008/07/08 17:52:15 dgp Exp $ */ #include "tclInt.h" @@ -39,7 +39,8 @@ int Tcl_GetInt( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ const char *src, /* String containing a (possibly signed) - * integer in a form acceptable to strtoul. */ + * integer in a form acceptable to + * Tcl_GetIntFromObj(). */ int *intPtr) /* Place to store converted result. */ { Tcl_Obj obj; @@ -60,50 +61,6 @@ Tcl_GetInt( /* *---------------------------------------------------------------------- * - * TclGetLong -- - * - * Given a string, produce the corresponding long integer value. This - * routine is a version of Tcl_GetInt but returns a "long" instead of an - * "int" (a difference that matters on 64-bit architectures). - * - * Results: - * The return value is normally TCL_OK; in this case *longPtr will be set - * to the long integer value equivalent to src. If src is improperly - * formed then TCL_ERROR is returned and an error message will be left in - * the interp's result if interp is non-NULL. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -int -TclGetLong( - Tcl_Interp *interp, /* Interpreter used for error reporting if not - * NULL. */ - const char *src, /* String containing a (possibly signed) long - * integer in a form acceptable to strtoul. */ - long *longPtr) /* Place to store converted long result. */ -{ - Tcl_Obj obj; - int code; - - obj.refCount = 1; - obj.bytes = (char *) src; - obj.length = strlen(src); - obj.typePtr = NULL; - - code = Tcl_GetLongFromObj(interp, &obj, longPtr); - if (obj.refCount > 1) { - Tcl_Panic("invalid sharing of Tcl_Obj on C stack"); - } - return code; -} - -/* - *---------------------------------------------------------------------- - * * Tcl_GetDouble -- * * Given a string, produce the corresponding double-precision @@ -125,7 +82,8 @@ int Tcl_GetDouble( Tcl_Interp *interp, /* Interpreter used for error reporting. */ const char *src, /* String containing a floating-point number - * in a form acceptable to strtod. */ + * in a form acceptable to + * Tcl_GetDoubleFromObj(). */ double *doublePtr) /* Place to store converted result. */ { Tcl_Obj obj; @@ -166,9 +124,8 @@ Tcl_GetDouble( int Tcl_GetBoolean( Tcl_Interp *interp, /* Interpreter used for error reporting. */ - const char *src, /* String containing a boolean number - * specified either as 1/0 or true/false or - * yes/no. */ + const char *src, /* String containing one of the boolean values + * 1, 0, true, false, yes, no, on, off. */ int *boolPtr) /* Place to store converted result, which will * be 0 or 1. */ { diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 95354ac..e05298a 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.122 2008/06/13 05:45:12 mistachkin Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.123 2008/07/08 17:52:17 dgp Exp $ library tcl @@ -163,9 +163,10 @@ declare 34 generic { # Tcl_Obj *TclGetIndexedScalar(Tcl_Interp *interp, int localIndex, # int flags) #} -declare 36 generic { - int TclGetLong(Tcl_Interp *interp, CONST char *str, long *longPtr) -} +# Removed in 8.6a2 +#declare 36 generic { +# int TclGetLong(Tcl_Interp *interp, CONST char *str, long *longPtr) +#} declare 37 generic { int TclGetLoadedPackages(Tcl_Interp *interp, char *targetName) } diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index c8f788c..d21bd4d 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.116 2008/06/13 05:45:13 mistachkin Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.117 2008/07/08 17:52:17 dgp Exp $ */ #ifndef _TCLINTDECLS @@ -209,12 +209,7 @@ EXTERN int TclGetIntForIndex (Tcl_Interp * interp, int * indexPtr); #endif /* Slot 35 is reserved */ -#ifndef TclGetLong_TCL_DECLARED -#define TclGetLong_TCL_DECLARED -/* 36 */ -EXTERN int TclGetLong (Tcl_Interp * interp, CONST char * str, - long * longPtr); -#endif +/* Slot 36 is reserved */ #ifndef TclGetLoadedPackages_TCL_DECLARED #define TclGetLoadedPackages_TCL_DECLARED /* 37 */ @@ -1138,7 +1133,7 @@ typedef struct TclIntStubs { void *reserved33; int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ void *reserved35; - int (*tclGetLong) (Tcl_Interp * interp, CONST char * str, long * longPtr); /* 36 */ + void *reserved36; int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */ int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr); /* 38 */ TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ @@ -1478,10 +1473,7 @@ extern CONST TclIntStubs *tclIntStubsPtr; (tclIntStubsPtr->tclGetIntForIndex) /* 34 */ #endif /* Slot 35 is reserved */ -#ifndef TclGetLong -#define TclGetLong \ - (tclIntStubsPtr->tclGetLong) /* 36 */ -#endif +/* Slot 36 is reserved */ #ifndef TclGetLoadedPackages #define TclGetLoadedPackages \ (tclIntStubsPtr->tclGetLoadedPackages) /* 37 */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 2765182..b02c4d0 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.154 2008/06/13 05:45:14 mistachkin Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.155 2008/07/08 17:52:17 dgp Exp $ */ #include "tclInt.h" @@ -97,7 +97,7 @@ static const TclIntStubs tclIntStubs = { NULL, /* 33 */ TclGetIntForIndex, /* 34 */ NULL, /* 35 */ - TclGetLong, /* 36 */ + NULL, /* 36 */ TclGetLoadedPackages, /* 37 */ TclGetNamespaceForQualName, /* 38 */ TclGetObjInterpProc, /* 39 */ -- cgit v0.12 From 30299bcc38a3f95653ff4de766eae25b1b8cd5e6 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 9 Jul 2008 14:41:07 +0000 Subject: add a vqtcl entry --- win/coffbase.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win/coffbase.txt b/win/coffbase.txt index a7ef3f9..cf0dca5 100644 --- a/win/coffbase.txt +++ b/win/coffbase.txt @@ -12,7 +12,7 @@ ; they're mutually exclusive. This info is placed in the DLL's PE header by the ; linker with the `-base:@$(TCLDIR)\win\coffbase.txt,` option. ; -; RCS: @(#) $Id: coffbase.txt,v 1.12 2008/05/02 19:32:30 patthoyts Exp $ +; RCS: @(#) $Id: coffbase.txt,v 1.13 2008/07/09 14:41:07 patthoyts Exp $ tcl 0x10000000 0x00200000 tcldde 0x10200000 0x00010000 @@ -32,6 +32,7 @@ tdom 0x109E0000 0x00080000 tclvfs 0x10A70000 0x00010000 tkvideo 0x10B00000 0x00010000 tclsdl 0x10B20000 0x00080000 +vqtcl 0x10C00000 0x00010000 snack 0x1E000000 0x00400000 sound 0x1E400000 0x00400000 snackogg 0x1E800000 0x00200000 -- cgit v0.12 From 2603994d5d3ad503d97298c7fd1dc8f528694a19 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 11 Jul 2008 14:41:00 +0000 Subject: Minor updates for better readability. --- ChangeLog | 188 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 96 insertions(+), 92 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4a36e6..9258edc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,9 +2,9 @@ * generic/tclGet.c: Corrected out of date comments and removed * generic/tclInt.decls: internal routine TclGetLong() that's no longer - used. If an extension is using this from the internal stubs table, - it can shift to the public routine Tcl_GetLongFromObj() or can - request addition of a public Tcl_GetLong(). + used. If an extension is using this from the internal stubs table, it + can shift to the public routine Tcl_GetLongFromObj() or can request + addition of a public Tcl_GetLong(). ***POTENTIAL INCOMPATIBILITY*** * generic/tclIntDecls.h: make genstubs @@ -31,16 +31,16 @@ 2008-07-03 Andreas Kupries * generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak - reported in [Bug 1987821]. Thanks to Miguel for the report and - Don Porter for tracking the cause down. + reported in [Bug 1987821]. Thanks to Miguel for the report and Don + Porter for tracking the cause down. 2008-07-03 Don Porter * library/package.tcl: Removed [file readable] testing from - [tclPkgUnknown] and friends. We find out soon enough whether a - file is readable when we try to [source] it, and not testing - before allows us to workaround the bugs on some common filesystems - where [file readable] lies to us. [Patch 1969717] + [tclPkgUnknown] and friends. We find out soon enough whether a file is + readable when we try to [source] it, and not testing before allows us + to workaround the bugs on some common filesystems where [file + readable] lies to us. [Patch 1969717] 2008-07-01 Donal K. Fellows @@ -243,8 +243,8 @@ script cancellation near the start of TclEvalObjvInternal and after invoking async handlers. * generic/tclDecls.h: Regenerated. - * generic/tclEvent.c: Call TclFinalizeEvaluation during finalization to - cleanup the script cancellation hash table. During [vwait], always + * generic/tclEvent.c: Call TclFinalizeEvaluation during finalization + to cleanup the script cancellation hash table. During [vwait], always cooperatively check for script cancellation. Corrected the spelling of 'canceled' in comments to be consistent with the documentation. * generic/tclExecute.c: Reset script cancellation flags prior to @@ -268,8 +268,8 @@ level is currently zero) and cooperatively check for script cancellation prior to evaluating commands. * generic/tclStubInit.c: Regenerated. - * generic/tclThreadTest.c (Tcl_ThreadObjCmd): Added script cancellation - support ([testthread cancel]). + * generic/tclThreadTest.c (Tcl_ThreadObjCmd): Added script + cancellation support ([testthread cancel]). Modified [testthread id] to allow querying of the 'main' thread ID. Corrected comments to reflect the actual command syntax. Made [testthread wait] cooperatively check for script cancellation. Added @@ -283,8 +283,8 @@ [testthread cancel]. * tools/man2help2.tcl: Fixed problems with WinHelp target (see * tools/man2tcl.c: [Bug 1934200], [Bug 1934265], and [Bug 1934272]). - * win/makefile.vc: Added 'pdbs' option for Windows build rules to allow - * win/rules.vc: for non-debug builds with full symbols. + * win/makefile.vc: Added 'pdbs' option for Windows build rules to + * win/rules.vc: allow for non-debug builds with full symbols. * win/tcl.hpj.in: Corrected version for WinHelp target. * win/tclWinNotify.c: Used SleepEx and WaitForSingleObjectEx on * win/tclWinThrd.c: Windows because they are alertable. @@ -424,17 +424,18 @@ 2008-06-01 Daniel Steffen * generic/tclOOStubLib.c: ensure use of tcl stubs; include in - * unix/Makefile.in: stub lib; disable broken tclOO genstubs + * unix/Makefile.in: stub lib; disable broken tclOO + genstubs * generic/tclOO.c: make tclOO stubs tables 'static const' * generic/tclOODecls.h: and stub table pointers MODULE_SCOPE * generic/tclOOIntDecls.h: (change generated files manually * generic/tclOOStubInit.c: pending genstubs support for tclOO). * generic/tclOOStubLib.c: - - * generic/tclOO.c: fix warnings for 'int<->ptr conversion' - * generic/tclOOCall.c: and 'signed vs unsigned comparison'. - * generic/tclOOMethod.c: + + * generic/tclOO.c: fix warnings for 'int<->ptr + * generic/tclOOCall.c: conversion' and 'signed vs unsigned + * generic/tclOOMethod.c: comparison'. * tests/msgcat.test: fix for ::tcl::mac::locale with @modifier. @@ -496,7 +497,7 @@ 2008-05-21 Don Porter - * generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace() + * generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace * tests/parse.test (parse-15.60): routine has no mechanism to return the "incomplete" status of "\\\n" so calling this routine anywhere that can be reached within a Tcl_ParseCommand() call is a @@ -681,8 +682,8 @@ 2008-04-09 Daniel Steffen - * tests/chanio.test (chan-io-53.8,53.9,53.10): fix typo & quoting for - * tests/io.test (io-53.8,53.9,53.10): spaces in builddir path + * tests/chanio.test (chan-io-53.8,53.9,53.10): fix typo & quoting for + * tests/io.test (io-53.8,53.9,53.10): spaces in builddir path 2008-04-08 Miguel Sofer @@ -694,7 +695,7 @@ * tools/genStubs.tcl: revert erroneous 2008-04-02 change marking *StubsPtr as EXTERN instead of extern. - * generic/tclDecls.h: make genstubs + * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclPlatDecls.h: @@ -778,7 +779,7 @@ with -ltclstub; constify tcl*StubsPtr and stub table hook pointers. [Bug 1819422] - * generic/tclDecls.h: make genstubs + * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclPlatDecls.h: @@ -830,7 +831,7 @@ * win/makefile.bc: users of the stubs interfaces. [Bug 1819422] * win/makefile.vc: - * generic/tclDecls.h: make genstubs + * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclIntPlatDecls.h: * generic/tclPlatDecls.h: @@ -902,7 +903,7 @@ * library/tzdata/Asia/Saigon: * library/tzdata/Pacific/Easter: Changes up to and including Olson's tzdata2008b. - + 2008-03-27 Daniel Steffen * unix/tcl.m4 (SunOS-5.1x): fix 64bit support for Sun cc. [Bug 1921166] @@ -994,9 +995,9 @@ 2008-03-13 Daniel Steffen - * unix/configure.in: Use backslash-quoting instead of double-quoting - * unix/tcl.m4: for lib paths in tclConfig.sh. [Bug 1913622] - * unix/configure: autoconf-2.59 + * unix/configure.in: Use backslash-quoting instead of double-quoting + * unix/tcl.m4: for lib paths in tclConfig.sh. [Bug 1913622] + * unix/configure: autoconf-2.59 2008-03-13 Don Porter @@ -1051,16 +1052,16 @@ * macosx/Tcl.xcodeproj/default.pbxuser: configs for building with * macosx/Tcl-Common.xcconfig: gcc-4.2 and llvm-gcc-4.2. - * unix/tclUnixPort.h: Workaround vfork() problems - in llvm-gcc-4.2.1 -O4 build. + * unix/tclUnixPort.h: Workaround vfork() problems in + llvm-gcc-4.2.1 -O4 build. - * unix/tclUnixPort.h: Move MODULE_SCOPE compat define - to top [Bug 1911102]. + * unix/tclUnixPort.h: Move MODULE_SCOPE compat + define to top. [Bug 1911102] - * macosx/GNUmakefile: Fix quoting to allow paths to - * macosx/Tcl-Common.xcconfig: ${builddir} and ${INSTALL_ROOT} - * unix/Makefile.in: to contain spaces. - * unix/configure.in: + * macosx/GNUmakefile: Fix quoting to allow paths + * macosx/Tcl-Common.xcconfig: to ${builddir} and + * unix/Makefile.in: ${INSTALL_ROOT} to contain + * unix/configure.in: spaces. * unix/install-sh: * unix/tcl.m4: * tests/ioCmd.test: @@ -1314,8 +1315,8 @@ 2008-02-02 Daniel Steffen - * unix/configure.in (Darwin): Correct Info.plist year substitution in - non-framework builds. + * unix/configure.in (Darwin): Correct Info.plist year substitution + in non-framework builds. * unix/configure: autoconf-2.59 @@ -1369,7 +1370,7 @@ 2008-01-22 Miguel Sofer - * generic/tclCmdIl.c (Tcl_LreverseObjCmd): + * generic/tclCmdIl.c (Tcl_LreverseObjCmd): * tests/cmdIL.test (cmdIL-7.7): Fix crash on reversing an empty list. [Bug 1876793] @@ -1388,26 +1389,25 @@ 2008-01-15 Miguel Sofer - * generic/tclCompExpr.c: Add an 'optimize' argument to + * generic/tclCompExpr.c: Add an 'optimize' argument to * generic/tclCompile.c: TclCompileExpr() to profit from better * generic/tclCompile.h: literal management according to usage. * generic/tclExecute.c: - * generic/tclCompExpr.c: Fix literal leak in exprs [Bug 1869989] (dgp) * generic/tclExecute.c: * tests/compExpr.test: - + * doc/proc.n: Changed wording for access to non-local variables; added mention to [namespace upvar]. Lame attempt at dealing with documentation. [Bug 1872708] - + 2008-01-15 Miguel Sofer * generic/tclBasic.c: Replacing 'operator' by 'op' in the def of * generic/tclCompExpr.c: struct TclOpCmdClientData to accommodate C++ * generic/tclCompile.h: compilers. [Bug 1855644] - + 2008-01-13 Jeff Hobbs * win/tclWinSerial.c (SerialCloseProc, TclWinOpenSerialChannel): Use @@ -1759,9 +1759,10 @@ hostname] value from the system encoding to Tcl's internal encoding. * doc/chan.n: "Fix" the limitation on channel -eofchar - * doc/fconfigure.n: values to single byte characters by documenting - * generic/tclIO.c: it and making it fail loudly. Thanks to Stuart - * tests/chan.test: Cassoff for contributing the fix. [Bug 800753] + * doc/fconfigure.n: values to single byte characters by + * generic/tclIO.c: documenting it and making it fail loudly. + * tests/chan.test: Thanks to Stuart Cassoff for contributing the + fix. [Bug 800753] 2007-11-26 Miguel Sofer @@ -1925,8 +1926,8 @@ 2007-11-15 Pat Thoyts - * win/tclWin32Dll.c: Prefer UINT_PTR to DWORD_PTR when casting pointers - to integer types for greater portability. [Bug 1831253] + * win/tclWin32Dll.c: Prefer UINT_PTR to DWORD_PTR when casting + pointers to integer types for greater portability. [Bug 1831253] 2007-11-15 Daniel Steffen @@ -1935,14 +1936,14 @@ 2007-11-14 Donal K. Fellows - * generic/tclCompile.c (TclCompileScript): Ensure that we get our count - in our INST_START_CMD calls right, even when there's a failure to - compile a command directly. + * generic/tclCompile.c (TclCompileScript): Ensure that we get our + count in our INST_START_CMD calls right, even when there's a failure + to compile a command directly. * generic/tclNamesp.c (Tcl_SetEnsembleSubcommandList) (Tcl_SetEnsembleMappingDict): Special code to make sure that - * generic/tclCmdIL.c (TclInitInfoCmd): [info exists] is compiled right - while not allowing changes to the ensemble to cause havok. + * generic/tclCmdIL.c (TclInitInfoCmd): [info exists] is compiled + right while not allowing changes to the ensemble to cause havok. * generic/tclCompCmds.c (TclCompileInfoCmd): Simple compiler for the [info] command that only handles [info exists]. @@ -2010,30 +2011,32 @@ 2007-11-13 Donal K. Fellows * unix/tclUnixChan.c (CreateSocketAddress): Rewrote to use the - thread-safe version of gethostbyname() by forward-porting the code used - in 8.4, and added rudimentary support for getaddrinfo() (not enabled by - default, as no autoconf-ery written). Part of fix for [Bug 1618235]. + thread-safe version of gethostbyname() by forward-porting the code + used in 8.4, and added rudimentary support for getaddrinfo() (not + enabled by default, as no autoconf-ery written). Part of fix for [Bug + 1618235]. 2007-11-12 Jeff Hobbs * generic/tclGet.c (Tcl_Get, Tcl_GetInt): revert use of TclGet* macros due to compiler warning. These cases won't save time either. - * generic/tclUtil.c (TclReToGlob): add more comments, set interp result - if specified on error. + * generic/tclUtil.c (TclReToGlob): add more comments, set interp + result if specified on error. 2007-11-12 Miguel Sofer - * generic/tclBasic.c: New macro TclResetResult, new iPtr flag - * generic/tclExecute.c: bit INTERP_RESULT_UNCLEAN: shortcut for - * generic/tclInt.h: Tcl_ResetResult for the "normal" case: - * generic/tclProc.c: TCL_OK, no return options, no errorCode - * generic/tclResult.c: nor errorInfo, return at normal level. - * generic/tclStubLib.c: [Patch 1830184] - * generic/tclUtil.c: + * generic/tclBasic.c: New macro TclResetResult, new iPtr + * generic/tclExecute.c: flag bit INTERP_RESULT_UNCLEAN: + * generic/tclInt.h: shortcut for Tcl_ResetResult for the + * generic/tclProc.c: "normal" case: TCL_OK, no return + * generic/tclResult.c: options, no errorCode nor errorInfo, + * generic/tclStubLib.c: return at normal level. [Patch + * generic/tclUtil.c: 1830184] THIS PATCH WAS REVERTED: initial (mis)measurements overstated the - perfomance wins, which turn out to be tiny. Not worth the complication. + perfomance wins, which turn out to be tiny. Not worth the + complication. 2007-11-11 Jeff Hobbs @@ -2060,9 +2063,9 @@ * generic/tclCompile.c: 'int'; it may be worthwhile to extend * generic/tclDictObj.c: their functionality to other cases. * generic/tclExecute.c: - * generic/tclGet.c: As this patch touches many files it has - * generic/tclIO.c: been recorded as [Patch 1830038] in - * generic/tclIOCmd.c: order to facilitate reviewing. + * generic/tclGet.c: As this patch touches many files it + * generic/tclIO.c: has been recorded as [Patch 1830038] + * generic/tclIOCmd.c: in order to facilitate reviewing. * generic/tclIOGT.c: * generic/tclIndexObj.c: * generic/tclInt.h: @@ -2093,8 +2096,8 @@ 2007-11-10 Miguel Sofer - * generic/tclExecute.c: Fast path for INST_LIST_INDEX when the index is - not a list. + * generic/tclExecute.c: Fast path for INST_LIST_INDEX when the index + is not a list. * generic/tclBasic.c: * unix/configure.in: @@ -2108,8 +2111,8 @@ * tests/interp.test: * unix/tclUnixInit.c: * win/tclWin32Dll.c: Restore simpler behaviour for stack checking, not - adaptive to stack size changes after a thread is launched. Consensus is - that "nobody does that", and so it is not worth the cost. Improved + adaptive to stack size changes after a thread is launched. Consensus + is that "nobody does that", and so it is not worth the cost. Improved failure comments (mistachkin). 2007-11-10 Kevin Kenny @@ -2118,10 +2121,10 @@ use information from VirtualQuery to determine the bound of the stack. This change fixes a bug where the guard page of the stack was never restored after an overflow. It also eliminates a nasty piece of - assembly code for structured exception handling on mingw. It introduces - an assumption that the stack is a single memory arena returned from - VirtualAlloc, but the code in MSVCRT makes the same assumption, so it - should be fairly safe. + assembly code for structured exception handling on mingw. It + introduces an assumption that the stack is a single memory arena + returned from VirtualAlloc, but the code in MSVCRT makes the same + assumption, so it should be fairly safe. 2007-11-10 Miguel Sofer @@ -2131,9 +2134,9 @@ * unix/tclUnixPort.h: * win/tclWin32Dll.c: Modify the stack checking algorithm to recheck in case of failure. The working assumptions are now that (a) a thread's - stack is never moved, and (b) a thread's stack can grow but not shrink. - Port to windows - could be more efficient, but is already cheaper than - it was. + stack is never moved, and (b) a thread's stack can grow but not + shrink. Port to windows - could be more efficient, but is already + cheaper than it was. 2007-11-09 Miguel Sofer @@ -2146,7 +2149,7 @@ * generic/tclUnixInit.c: * generic/tclUnixPort.h: New fields in interp (ekeko!) to cache TSD data that is accessed at each command invocation, access macros to - replace Tcl_AsyncReady and TclpCheckStackSpace by much faster variants. + replace Tcl_AsyncReady and TclpCheckStackSpace by much faster variants [Patch 1829248] 2007-11-09 Jeff Hobbs @@ -2161,12 +2164,12 @@ 2007-11-07 Jeff Hobbs - * generic/tclStubInit.c: Added TclByteArrayMatch - * generic/tclInt.decls: for efficient glob - * generic/tclIntDecls.h: matching of ByteArray - * generic/tclUtil.c (TclByteArrayMatch): Tcl_Objs, used in - * generic/tclExecute.c (TclExecuteByteCode): INST_STR_MATCH. [Bug - 1827996] + * generic/tclStubInit.c: Added TclByteArrayMatch + * generic/tclInt.decls: for efficient glob + * generic/tclIntDecls.h: matching of ByteArray + * generic/tclUtil.c (TclByteArrayMatch): Tcl_Objs, used in + * generic/tclExecute.c (TclExecuteByteCode): INST_STR_MATCH. [Bug + 1827996] * generic/tclIO.c (TclGetsObjBinary): Add an efficient binary path for [gets]. @@ -2190,8 +2193,9 @@ * unix/tclUnixChan.c (TtyGetOptionProc): Accepted [Patch 1823576] provided by Stuart Cassof . The patch adds - the necessary utf/external conversions to the handling of the arguments - of option -xchar which will allow the use of \0 and similar characters. + the necessary utf/external conversions to the handling of the + arguments of option -xchar which will allow the use of \0 and similar + characters. 2007-11-03 Miguel Sofer -- cgit v0.12 From cbd9b876ccfb24791ac9576e49be51c579fa7a23 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Jul 2008 09:03:31 +0000 Subject: NRE implementation [Patch 2017110] --- ChangeLog | 39 + generic/tcl.decls | 35 +- generic/tcl.h | 14 +- generic/tclBasic.c | 1890 +++++-- generic/tclCmdAH.c | 5 +- generic/tclCompile.h | 4 +- generic/tclDecls.h | 76 +- generic/tclExecute.c | 762 ++- generic/tclHistory.c | 4 +- generic/tclInt.decls | 26 +- generic/tclInt.h | 67 +- generic/tclIntDecls.h | 64 +- generic/tclInterp.c | 90 +- generic/tclNamesp.c | 213 +- generic/tclProc.c | 321 +- generic/tclStubInit.c | 14 +- generic/tclTestProcBodyObj.c | 6 +- tests/interp.test | 12 +- tests/parse.test | 6 +- tests/stack.test | 6 +- unix/Makefile.in | 11 +- unix/configure | 12557 ++++++++++++++++++++--------------------- unix/configure.in | 24 +- unix/tclConfig.h.in | 3 - unix/tclUnixInit.c | 259 +- unix/tclUnixTest.c | 66 +- win/tclWin32Dll.c | 84 +- 27 files changed, 8978 insertions(+), 7680 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9258edc..2cd3ae8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,42 @@ +2008-07-13 Miguel Sofer + + NRE implementation [Patch 2017110] + + * generic/tcl.decls: The NRE infrastructure + * generic/tcl.h: + * generic/tclBasic.c: + * generic/tclCmdAH.c: + * generic/tclCompile.h: + * generic/tclDecls.h: + * generic/tclExecute.c: + * generic/tclHistory.c: + * generic/tclInt.decls: + * generic/tclInt.h: + * generic/tclIntDecls.h: + * generic/tclNRE.h: + * generic/tclStubInit.c: + * unix/Makefile.in: + + * generic/tclInterp.c: NRE-enabling: procs, lambdas, uplevel, + * generic/tclNamesp.c: same-interp aliases, ensembles, imports + * generic/tclProc.c: and namespace_eval. + + * generic/tclTestProcBodyObj.c: New NRE specific tests (few, but + * tests/NRE.test: note that the thing is actually + tested by the whole testsuite. + + * tests/interp.test: Fixed numLevel counting. + * tests/parse.test: + * tests/stack.test: + + * unix/configure: Removing support for the hacky nonportable stack + * unix/configure.in: check: it is not needed anymore, Tcl is very + * unix/tclConfig.h.in: thrifty on the C stack. + * unix/tclUnixInit.c: + * unix/tclUnixTest.c: + * win/tclWin32Dll.c: + + 2008-07-08 Don Porter * generic/tclGet.c: Corrected out of date comments and removed diff --git a/generic/tcl.decls b/generic/tcl.decls index 6c9b09a..460d6dc 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.133 2008/06/13 05:45:07 mistachkin Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.134 2008/07/13 09:03:32 msofer Exp $ library tcl @@ -2108,6 +2108,39 @@ declare 581 generic { int Tcl_Canceled(Tcl_Interp *interp, int flags) } +# NRE public interface +declare 582 generic { + Tcl_Command TclNR_CreateCommand(Tcl_Interp *interp, + CONST char *cmdName, Tcl_ObjCmdProc *proc, + Tcl_ObjCmdProc *nreProc, ClientData clientData, + Tcl_CmdDeleteProc *deleteProc) +} +declare 583 generic { + int TclNR_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) +} +declare 584 generic { + int TclNR_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], + int flags) +} +declare 585 generic { + int TclNR_ObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, + ClientData clientData) +} +declare 586 generic { + void TclNR_AddCallback(Tcl_Interp *interp, TclNR_PostProc *postProcPtr, + ClientData data0, ClientData data1, + ClientData data2, ClientData data3) +} + +# For use by NR extenders, to have a simple way to also provide a (required!) +# classic objProc +declare 587 generic { + int TclNR_CallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, + ClientData clientData, int objc, + Tcl_Obj *const objv[]) +} + + ############################################################################## # Define the platform specific public Tcl interface. These functions are diff --git a/generic/tcl.h b/generic/tcl.h index 65c9eec..50bd3c1 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.259 2008/06/19 15:37:03 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.260 2008/07/13 09:03:32 msofer Exp $ */ #ifndef _TCL @@ -986,12 +986,15 @@ typedef struct Tcl_DString { * TCL_CANCEL_UNWIND: Magical Tcl_CancelEval mode that causes the * stack for the script in progress to be * completely unwound. + * TCL_EVAL_NOERR: Do no exception reporting at all, just return + * as the caller will report. */ #define TCL_NO_EVAL 0x10000 #define TCL_EVAL_GLOBAL 0x20000 #define TCL_EVAL_DIRECT 0x40000 #define TCL_EVAL_INVOKE 0x80000 #define TCL_CANCEL_UNWIND 0x100000 +#define TCL_EVAL_NOERR 0x200000 /* * Special freeProc values that may be passed to Tcl_SetResult (see the man @@ -2247,6 +2250,14 @@ EXTERN CONST char * Tcl_PkgInitStubsCheck _ANSI_ARGS_((Tcl_Interp *interp, EXTERN void Tcl_GetMemoryInfo _ANSI_ARGS_((Tcl_DString *dsPtr)); #endif + +/* + * Single public declaration for NRE + */ + +typedef int (TclNR_PostProc) (ClientData data[], Tcl_Interp *interp, + int result); + /* * Include the public function declarations that are accessible via the stubs * table. @@ -2426,6 +2437,7 @@ EXTERN void Tcl_GetMemoryInfo _ANSI_ARGS_((Tcl_DString *dsPtr)); # define panicVA Tcl_PanicVA #endif + /* * Convenience declaration of Tcl_AppInit for backwards compatibility. This * function is not *implemented* by the tcl library, so the storage class is diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 6ce696a..cf4bbe4 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -11,11 +11,12 @@ * Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved. * Copyright (c) 2007 Daniel A. Steffen * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. + * Copyright (c) 2008 Miguel Sofer * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.303 2008/06/13 12:14:32 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.304 2008/07/13 09:03:33 msofer Exp $ */ #include "tclInt.h" @@ -25,6 +26,7 @@ #include #include #include "tommath.h" +#include "tclNRE.h" /* * Determine whether we're using IEEE floating point @@ -59,8 +61,8 @@ static int CancelEvalProc(ClientData clientData, static int CheckDoubleResult(Tcl_Interp *interp, double dResult); static void DeleteInterpProc(Tcl_Interp *interp); static void DeleteOpCmdClientData(ClientData clientData); -static Tcl_Obj *GetCommandSource(Interp *iPtr, const char *command, - int numChars, int objc, Tcl_Obj *const objv[]); +static Tcl_Obj *GetCommandSource(Interp *iPtr, int objc, + Tcl_Obj *const objv[], int lookup); static void ProcessUnexpectedResult(Tcl_Interp *interp, int returnCode); static int OldMathFuncProc(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj *const *objv); @@ -104,6 +106,37 @@ static int DTraceObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, MODULE_SCOPE const TclStubs * const tclConstStubsPtr; + +/* + * Block for Tcl_EvalObjv helpers + */ + +static void TEOV_SwitchVarFrame(Tcl_Interp *interp); + +static void TEOV_PushExceptionHandlers(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[], int flags); + +static inline Command * + TEOV_LookupCmdFromObj(Tcl_Interp *interp, Tcl_Obj *namePtr, + Namespace *lookupNsPtr); + +static int TEOV_NotFound(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[], Namespace *lookupNsPtr); + +static int TEOV_RunEnterTraces(Tcl_Interp *interp, Command **cmdPtrPtr, + int objc, Tcl_Obj *const objv[], Namespace *lookupNsPtr); + +static TclNR_PostProc TEOV_RestoreVarFrame; +static TclNR_PostProc TEOV_RunLeaveTraces; +static TclNR_PostProc TEOV_Exception; +static TclNR_PostProc TEOV_Error; +static TclNR_PostProc TEOEx_ListCallback; +static TclNR_PostProc TEOEx_ByteCodeCallback; + +static int NRPostProcess(Tcl_Interp *interp, int result, int objc, + Tcl_Obj *const objv[]); + + /* * The following structure define the commands in the Tcl core. */ @@ -112,6 +145,7 @@ typedef struct { const char *name; /* Name of object-based command. */ Tcl_ObjCmdProc *objProc; /* Object-based function for command. */ CompileProc *compileProc; /* Function called to compile command. */ + Tcl_ObjCmdProc *nreProc; /* NR-based function for command */ int isSafe; /* If non-zero, command will be present in * safe interpreter. Otherwise it will be * hidden. */ @@ -126,92 +160,92 @@ static const CmdInfo builtInCmds[] = { * Commands in the generic core. */ - {"append", Tcl_AppendObjCmd, TclCompileAppendCmd, 1}, - {"apply", Tcl_ApplyObjCmd, NULL, 1}, - {"array", Tcl_ArrayObjCmd, NULL, 1}, - {"break", Tcl_BreakObjCmd, TclCompileBreakCmd, 1}, + {"append", Tcl_AppendObjCmd, TclCompileAppendCmd, NULL, 1}, + {"apply", Tcl_ApplyObjCmd, NULL, TclNRApplyObjCmd, 1}, + {"array", Tcl_ArrayObjCmd, NULL, NULL, 1}, + {"break", Tcl_BreakObjCmd, TclCompileBreakCmd, NULL, 1}, #ifndef EXCLUDE_OBSOLETE_COMMANDS - {"case", Tcl_CaseObjCmd, NULL, 1}, + {"case", Tcl_CaseObjCmd, NULL, NULL, 1}, #endif - {"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, 1}, - {"concat", Tcl_ConcatObjCmd, NULL, 1}, - {"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, 1}, - {"error", Tcl_ErrorObjCmd, NULL, 1}, - {"eval", Tcl_EvalObjCmd, NULL, 1}, - {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, 1}, - {"for", Tcl_ForObjCmd, TclCompileForCmd, 1}, - {"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, 1}, - {"format", Tcl_FormatObjCmd, NULL, 1}, - {"global", Tcl_GlobalObjCmd, TclCompileGlobalCmd, 1}, - {"if", Tcl_IfObjCmd, TclCompileIfCmd, 1}, - {"incr", Tcl_IncrObjCmd, TclCompileIncrCmd, 1}, - {"join", Tcl_JoinObjCmd, NULL, 1}, - {"lappend", Tcl_LappendObjCmd, TclCompileLappendCmd, 1}, - {"lassign", Tcl_LassignObjCmd, TclCompileLassignCmd, 1}, - {"lindex", Tcl_LindexObjCmd, TclCompileLindexCmd, 1}, - {"linsert", Tcl_LinsertObjCmd, NULL, 1}, - {"list", Tcl_ListObjCmd, TclCompileListCmd, 1}, - {"llength", Tcl_LlengthObjCmd, TclCompileLlengthCmd, 1}, - {"lrange", Tcl_LrangeObjCmd, NULL, 1}, - {"lrepeat", Tcl_LrepeatObjCmd, NULL, 1}, - {"lreplace", Tcl_LreplaceObjCmd, NULL, 1}, - {"lreverse", Tcl_LreverseObjCmd, NULL, 1}, - {"lsearch", Tcl_LsearchObjCmd, NULL, 1}, - {"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, 1}, - {"lsort", Tcl_LsortObjCmd, NULL, 1}, - {"namespace", Tcl_NamespaceObjCmd, TclCompileNamespaceCmd, 1}, - {"package", Tcl_PackageObjCmd, NULL, 1}, - {"proc", Tcl_ProcObjCmd, NULL, 1}, - {"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, 1}, - {"regsub", Tcl_RegsubObjCmd, NULL, 1}, - {"rename", Tcl_RenameObjCmd, NULL, 1}, - {"return", Tcl_ReturnObjCmd, TclCompileReturnCmd, 1}, - {"scan", Tcl_ScanObjCmd, NULL, 1}, - {"set", Tcl_SetObjCmd, TclCompileSetCmd, 1}, - {"split", Tcl_SplitObjCmd, NULL, 1}, - {"subst", Tcl_SubstObjCmd, NULL, 1}, - {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, 1}, - {"trace", Tcl_TraceObjCmd, NULL, 1}, - {"unset", Tcl_UnsetObjCmd, NULL, 1}, - {"uplevel", Tcl_UplevelObjCmd, NULL, 1}, - {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, 1}, - {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, 1}, - {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, 1}, + {"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, NULL, 1}, + {"concat", Tcl_ConcatObjCmd, NULL, NULL, 1}, + {"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, NULL, 1}, + {"error", Tcl_ErrorObjCmd, NULL, NULL, 1}, + {"eval", Tcl_EvalObjCmd, NULL, NULL, 1}, + {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, NULL, 1}, + {"for", Tcl_ForObjCmd, TclCompileForCmd, NULL, 1}, + {"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, NULL, 1}, + {"format", Tcl_FormatObjCmd, NULL, NULL, 1}, + {"global", Tcl_GlobalObjCmd, TclCompileGlobalCmd, NULL, 1}, + {"if", Tcl_IfObjCmd, TclCompileIfCmd, NULL, 1}, + {"incr", Tcl_IncrObjCmd, TclCompileIncrCmd, NULL, 1}, + {"join", Tcl_JoinObjCmd, NULL, NULL, 1}, + {"lappend", Tcl_LappendObjCmd, TclCompileLappendCmd, NULL, 1}, + {"lassign", Tcl_LassignObjCmd, TclCompileLassignCmd, NULL, 1}, + {"lindex", Tcl_LindexObjCmd, TclCompileLindexCmd, NULL, 1}, + {"linsert", Tcl_LinsertObjCmd, NULL, NULL, 1}, + {"list", Tcl_ListObjCmd, TclCompileListCmd, NULL, 1}, + {"llength", Tcl_LlengthObjCmd, TclCompileLlengthCmd, NULL, 1}, + {"lrange", Tcl_LrangeObjCmd, NULL, NULL, 1}, + {"lrepeat", Tcl_LrepeatObjCmd, NULL, NULL, 1}, + {"lreplace", Tcl_LreplaceObjCmd, NULL, NULL, 1}, + {"lreverse", Tcl_LreverseObjCmd, NULL, NULL, 1}, + {"lsearch", Tcl_LsearchObjCmd, NULL, NULL, 1}, + {"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, NULL, 1}, + {"lsort", Tcl_LsortObjCmd, NULL, NULL, 1}, + {"namespace", Tcl_NamespaceObjCmd, TclCompileNamespaceCmd, TclNRNamespaceObjCmd, 1}, + {"package", Tcl_PackageObjCmd, NULL, NULL, 1}, + {"proc", Tcl_ProcObjCmd, NULL, NULL, 1}, + {"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, NULL, 1}, + {"regsub", Tcl_RegsubObjCmd, NULL, NULL, 1}, + {"rename", Tcl_RenameObjCmd, NULL, NULL, 1}, + {"return", Tcl_ReturnObjCmd, TclCompileReturnCmd, NULL, 1}, + {"scan", Tcl_ScanObjCmd, NULL, NULL, 1}, + {"set", Tcl_SetObjCmd, TclCompileSetCmd, NULL, 1}, + {"split", Tcl_SplitObjCmd, NULL, NULL, 1}, + {"subst", Tcl_SubstObjCmd, NULL, NULL, 1}, + {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, NULL, 1}, + {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, + {"unset", Tcl_UnsetObjCmd, NULL, NULL, 1}, + {"uplevel", Tcl_UplevelObjCmd, NULL, TclNRUplevelObjCmd, 1}, + {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, + {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1}, + {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, NULL, 1}, /* * Commands in the OS-interface. Note that many of these are unsafe. */ - {"after", Tcl_AfterObjCmd, NULL, 1}, - {"cd", Tcl_CdObjCmd, NULL, 0}, - {"close", Tcl_CloseObjCmd, NULL, 1}, - {"eof", Tcl_EofObjCmd, NULL, 1}, - {"encoding", Tcl_EncodingObjCmd, NULL, 0}, - {"exec", Tcl_ExecObjCmd, NULL, 0}, - {"exit", Tcl_ExitObjCmd, NULL, 0}, - {"fblocked", Tcl_FblockedObjCmd, NULL, 1}, - {"fconfigure", Tcl_FconfigureObjCmd, NULL, 0}, - {"fcopy", Tcl_FcopyObjCmd, NULL, 1}, - {"file", Tcl_FileObjCmd, NULL, 0}, - {"fileevent", Tcl_FileEventObjCmd, NULL, 1}, - {"flush", Tcl_FlushObjCmd, NULL, 1}, - {"gets", Tcl_GetsObjCmd, NULL, 1}, - {"glob", Tcl_GlobObjCmd, NULL, 0}, - {"load", Tcl_LoadObjCmd, NULL, 0}, - {"open", Tcl_OpenObjCmd, NULL, 0}, - {"pid", Tcl_PidObjCmd, NULL, 1}, - {"puts", Tcl_PutsObjCmd, NULL, 1}, - {"pwd", Tcl_PwdObjCmd, NULL, 0}, - {"read", Tcl_ReadObjCmd, NULL, 1}, - {"seek", Tcl_SeekObjCmd, NULL, 1}, - {"socket", Tcl_SocketObjCmd, NULL, 0}, - {"source", Tcl_SourceObjCmd, NULL, 0}, - {"tell", Tcl_TellObjCmd, NULL, 1}, - {"time", Tcl_TimeObjCmd, NULL, 1}, - {"unload", Tcl_UnloadObjCmd, NULL, 0}, - {"update", Tcl_UpdateObjCmd, NULL, 1}, - {"vwait", Tcl_VwaitObjCmd, NULL, 1}, - {NULL, NULL, NULL, 0} + {"after", Tcl_AfterObjCmd, NULL, NULL, 1}, + {"cd", Tcl_CdObjCmd, NULL, NULL, 0}, + {"close", Tcl_CloseObjCmd, NULL, NULL, 1}, + {"eof", Tcl_EofObjCmd, NULL, NULL, 1}, + {"encoding", Tcl_EncodingObjCmd, NULL, NULL, 0}, + {"exec", Tcl_ExecObjCmd, NULL, NULL, 0}, + {"exit", Tcl_ExitObjCmd, NULL, NULL, 0}, + {"fblocked", Tcl_FblockedObjCmd, NULL, NULL, 1}, + {"fconfigure", Tcl_FconfigureObjCmd, NULL, NULL, 0}, + {"fcopy", Tcl_FcopyObjCmd, NULL, NULL, 1}, + {"file", Tcl_FileObjCmd, NULL, NULL, 0}, + {"fileevent", Tcl_FileEventObjCmd, NULL, NULL, 1}, + {"flush", Tcl_FlushObjCmd, NULL, NULL, 1}, + {"gets", Tcl_GetsObjCmd, NULL, NULL, 1}, + {"glob", Tcl_GlobObjCmd, NULL, NULL, 0}, + {"load", Tcl_LoadObjCmd, NULL, NULL, 0}, + {"open", Tcl_OpenObjCmd, NULL, NULL, 0}, + {"pid", Tcl_PidObjCmd, NULL, NULL, 1}, + {"puts", Tcl_PutsObjCmd, NULL, NULL, 1}, + {"pwd", Tcl_PwdObjCmd, NULL, NULL, 0}, + {"read", Tcl_ReadObjCmd, NULL, NULL, 1}, + {"seek", Tcl_SeekObjCmd, NULL, NULL, 1}, + {"socket", Tcl_SocketObjCmd, NULL, NULL, 0}, + {"source", Tcl_SourceObjCmd, NULL, NULL, 0}, + {"tell", Tcl_TellObjCmd, NULL, NULL, 1}, + {"time", Tcl_TimeObjCmd, NULL, NULL, 1}, + {"unload", Tcl_UnloadObjCmd, NULL, NULL, 0}, + {"update", Tcl_UpdateObjCmd, NULL, NULL, 1}, + {"vwait", Tcl_VwaitObjCmd, NULL, NULL, 1}, + {NULL, NULL, NULL, NULL, 0} }; /* @@ -323,46 +357,6 @@ static const OpCmdInfo mathOpCmds[] = { {0}, NULL} }; -/* - * Macros for stack checks. The goal of these macros is to allow the size of - * the stack to be checked (so preventing overflow) in a *cheap* way. Note - * that the check needs to be (amortized) cheap since it is on the critical - * path for recursion. - */ - -#if defined(TCL_NO_STACK_CHECK) -/* - * Stack check disabled: make them noops. - */ - -# define CheckCStack(interp, localIntPtr) 1 -# define GetCStackParams(iPtr) /* do nothing */ -#elif defined(TCL_CROSS_COMPILE) - -/* - * This variable is static and only set *once*, during library initialization. - * It therefore needs no thread guards. - */ - -static int stackGrowsDown = 1; -# define GetCStackParams(iPtr) \ - stackGrowsDown = TclpGetCStackParams(&((iPtr)->stackBound)) -# define CheckCStack(iPtr, localIntPtr) \ - (stackGrowsDown \ - ? ((localIntPtr) > (iPtr)->stackBound) \ - : ((localIntPtr) < (iPtr)->stackBound) \ - ) -#else /* !TCL_NO_STACK_CHECK && !TCL_CROSS_COMPILE */ -# define GetCStackParams(iPtr) \ - TclpGetCStackParams(&((iPtr)->stackBound)) -# ifdef TCL_STACK_GROWS_UP -# define CheckCStack(iPtr, localIntPtr) \ - (!(iPtr)->stackBound || (localIntPtr) < (iPtr)->stackBound) -# else /* TCL_STACK_GROWS_UP */ -# define CheckCStack(iPtr, localIntPtr) \ - ((localIntPtr) > (iPtr)->stackBound) -# endif /* TCL_STACK_GROWS_UP */ -#endif /* TCL_NO_STACK_CHECK/TCL_CROSS_COMPILE */ /* * This is the script cancellation struct and hash table. The hash table @@ -695,13 +689,6 @@ Tcl_CreateInterp(void) iPtr->asyncReadyPtr = TclGetAsyncReadyPtr(); /* - * Insure that the stack checking mechanism for this interp is - * initialized. - */ - - GetCStackParams(iPtr); - - /* * Create the core commands. Do it here, rather than calling * Tcl_CreateCommand, because it's faster (there's no need to check for a * pre-existing command by the same name). If a command has a Tcl_CmdProc @@ -736,6 +723,7 @@ Tcl_CreateInterp(void) cmdPtr->flags = 0; cmdPtr->importRefPtr = NULL; cmdPtr->tracePtr = NULL; + cmdPtr->nreProc = cmdInfoPtr->nreProc; Tcl_SetHashValue(hPtr, cmdPtr); } } @@ -779,6 +767,13 @@ Tcl_CreateInterp(void) Tcl_CreateObjCommand(interp, "::tcl::unsupported::disassemble", Tcl_DisassembleObjCmd, NULL, NULL); + /* + * Create an unsupported command for tailcalls + */ + + TclNR_CreateCommand(interp, "::tcl::unsupported::tailcall", + /*objProc*/ NULL, TclTailcallObjCmd, NULL, NULL); + #ifdef USE_DTRACE /* * Register the tcl::dtrace command. @@ -901,6 +896,7 @@ Tcl_CreateInterp(void) Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); } + TOP_RECORD(iPtr) = NULL; return interp; } @@ -1978,6 +1974,7 @@ Tcl_CreateCommand( cmdPtr->flags = 0; cmdPtr->importRefPtr = NULL; cmdPtr->tracePtr = NULL; + cmdPtr->nreProc = NULL; /* * Plug in any existing import references found above. Be sure to update @@ -2149,6 +2146,7 @@ Tcl_CreateObjCommand( cmdPtr->flags = 0; cmdPtr->importRefPtr = NULL; cmdPtr->tracePtr = NULL; + cmdPtr->nreProc = NULL; /* * Plug in any existing import references found above. Be sure to update @@ -2557,8 +2555,12 @@ Tcl_SetCommandInfoFromToken( if (infoPtr->objProc == NULL) { cmdPtr->objProc = TclInvokeStringCommand; cmdPtr->objClientData = cmdPtr; + cmdPtr->nreProc = NULL; } else { - cmdPtr->objProc = infoPtr->objProc; + if (infoPtr->objProc != cmdPtr->objProc) { + cmdPtr->nreProc = NULL; + cmdPtr->objProc = infoPtr->objProc; + } cmdPtr->objClientData = infoPtr->objClientData; } cmdPtr->deleteProc = infoPtr->deleteProc; @@ -3123,7 +3125,7 @@ CancelEvalProc(clientData, interp, code) * * This function returns a Tcl_Obj with the full source string for the * command. This insures that traces get a correct NUL-terminated command - * string. + * string. The Tcl_Obj has refCount==1. * *---------------------------------------------------------------------- */ @@ -3131,18 +3133,41 @@ CancelEvalProc(clientData, interp, code) static Tcl_Obj * GetCommandSource( Interp *iPtr, - const char *command, - int numChars, int objc, - Tcl_Obj *const objv[]) + Tcl_Obj *const objv[], + int lookup) { - if (!command) { - return Tcl_NewListObj(objc, objv); - } - if (command == (char *) -1) { - command = TclGetSrcInfoForCmd(iPtr, &numChars); + Tcl_Obj *objPtr, *obj2Ptr; + CmdFrame *cfPtr = iPtr->cmdFramePtr; + const char *command = NULL; + int numChars; + + objPtr = Tcl_NewListObj(objc, objv); + if (lookup && cfPtr) { + switch (cfPtr->type) { + case TCL_LOCATION_EVAL: + case TCL_LOCATION_SOURCE: + command = cfPtr->cmd.str.cmd; + numChars = cfPtr->cmd.str.len; + break; + case TCL_LOCATION_BC: + case TCL_LOCATION_PREBC: + command = TclGetSrcInfoForCmd(iPtr, &numChars); + break; + case TCL_LOCATION_EVAL_LIST: + /* Got it already */ + break; + } + if (command) { + obj2Ptr = Tcl_NewStringObj(command, numChars); + objPtr->bytes = obj2Ptr->bytes; + objPtr->length = numChars; + obj2Ptr->bytes = NULL; + Tcl_DecrRefCount(obj2Ptr); + } } - return Tcl_NewStringObj(command, numChars); + Tcl_IncrRefCount(objPtr); + return objPtr; } /* @@ -3294,8 +3319,7 @@ OldMathFuncProc( * We have a non-numeric argument. */ - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "argument to math function didn't have numeric value",-1)); + Tcl_SetResult(interp, "argument to math function didn't have numeric value", TCL_STATIC); TclCheckBadOctal(interp, Tcl_GetString(valuePtr)); ckfree((char *)args); return TCL_ERROR; @@ -3571,7 +3595,6 @@ int TclInterpReady( Tcl_Interp *interp) { - int localInt; /* used for checking the stack */ register Interp *iPtr = (Interp *) interp; /* @@ -3599,18 +3622,12 @@ TclInterpReady( * probably because of an infinite loop somewhere. */ - if (((iPtr->numLevels) <= iPtr->maxNestingDepth) - && CheckCStack(iPtr, &localInt)) { + if (((iPtr->numLevels) <= iPtr->maxNestingDepth)) { return TCL_OK; } - if (!CheckCStack(iPtr, &localInt)) { - Tcl_AppendResult(interp, - "out of stack space (infinite loop?)", NULL); - } else { - Tcl_AppendResult(interp, - "too many nested evaluations (infinite loop?)", NULL); - } + Tcl_AppendResult(interp, + "too many nested evaluations (infinite loop?)", NULL); return TCL_ERROR; } @@ -3871,20 +3888,14 @@ Tcl_CancelEval( /* *---------------------------------------------------------------------- * - * TclEvalObjvInternal + * Tcl_EvalObjv -- * * This function evaluates a Tcl command that has already been parsed - * into words, with one Tcl_Obj holding each word. The caller is - * responsible for managing the iPtr->numLevels. - * - * TclEvalObjvInternal is the backend for Tcl_EvalObjv, the bytecode - * engine also calls it directly. + * into words, with one Tcl_Obj holding each word. * * Results: * The return value is a standard Tcl completion code such as TCL_OK or - * TCL_ERROR. A result or error message is left in interp's result. If an - * error occurs, this function does NOT add any information to the - * errorInfo variable. + * TCL_ERROR. A result or error message is left in interp's result. * * Side effects: * Depends on the command. @@ -3893,96 +3904,78 @@ Tcl_CancelEval( */ int -TclEvalObjvInternal( +Tcl_EvalObjv( Tcl_Interp *interp, /* Interpreter in which to evaluate the * command. Also used for error reporting. */ int objc, /* Number of words in command. */ Tcl_Obj *const objv[], /* An array of pointers to objects that are * the words that make up the command. */ - const char *command, /* Points to the beginning of the string - * representation of the command; this is used - * for traces. NULL if the string - * representation of the command is unknown is - * to be generated from (objc,objv), -1 if it - * is to be generated from bytecode - * source. This is only needed the traces. */ - int length, /* Number of bytes in command; if -1, all - * characters up to the first null byte are - * used. */ int flags) /* Collection of OR-ed bits that control the * evaluation of the script. Only - * TCL_EVAL_GLOBAL and TCL_EVAL_INVOKE are - * currently supported. */ + * TCL_EVAL_GLOBAL, TCL_EVAL_INVOKE and + * TCL_EVAL_NOERR are currently supported. */ { Command *cmdPtr; Interp *iPtr = (Interp *) interp; - Tcl_Obj **newObjv; - int i; - CallFrame *savedVarFramePtr = NULL; - CallFrame *varFramePtr = iPtr->varFramePtr; - int code = TCL_OK; - int traceCode = TCL_OK; - int checkTraces = 1, traced; - Namespace *savedNsPtr = NULL; - Namespace *lookupNsPtr = iPtr->lookupNsPtr; - Tcl_Obj *commandPtr = NULL; + int result; + Namespace *lookupNsPtr; - if (TclInterpReady(interp) == TCL_ERROR) { - return TCL_ERROR; - } + TEOV_record *rootPtr = TOP_RECORD(iPtr); + TEOV_record *recordPtr; + + Tcl_ObjCmdProc *objProc; + ClientData objClientData; + int tebcCall = TEBC_CALL(iPtr); - if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { - return TCL_ERROR; + TEBC_CALL(iPtr) = 0; + + restartAtTop: + iPtr->numLevels++; + result = TclInterpReady(interp); + + if (result == TCL_OK) { + result = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); } - if (objc == 0) { - return TCL_OK; + if ((result != TCL_OK) || (objc == 0)) { + iPtr->lookupNsPtr = NULL; + iPtr->numLevels--; + goto done; } /* - * If any execution traces rename or delete the current command, we may - * need (at most) two passes here. + * Always push a record for the command (avoid queuing callbacks for an + * older command!) */ - reparseBecauseOfTraces: - + PUSH_RECORD(interp, recordPtr); + /* - * Configure evaluation context to match the requested flags. + * Push records for task to be done on return, in INVERSE order. First, if + * needed, the exception handlers (as they should happen last). */ - - if (flags) { - if (flags & TCL_EVAL_INVOKE) { - savedNsPtr = varFramePtr->nsPtr; - if (lookupNsPtr) { - varFramePtr->nsPtr = lookupNsPtr; - iPtr->lookupNsPtr = NULL; - } else { - varFramePtr->nsPtr = iPtr->globalNsPtr; - } - } else if ((flags & TCL_EVAL_GLOBAL) - && (varFramePtr != iPtr->rootFramePtr) && !savedVarFramePtr) { - varFramePtr = iPtr->rootFramePtr; - savedVarFramePtr = iPtr->varFramePtr; - iPtr->varFramePtr = varFramePtr; - } + + if (!(flags & TCL_EVAL_NOERR)) { + TEOV_PushExceptionHandlers(interp, objc, objv, flags); } /* - * Find the function to execute this command. If there isn't one, then see - * if there is an unknown command handler registered for this namespace. - * If so, create a new word array with the handler as the first words and - * the original command words as arguments. Then call ourselves - * recursively to execute it. + * Configure evaluation context to match the requested flags. */ - cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objv[0]); - if (!cmdPtr) { - goto notFound; - } + lookupNsPtr = iPtr->lookupNsPtr; + if ((flags & TCL_EVAL_INVOKE) || lookupNsPtr) { + if (!lookupNsPtr) { + lookupNsPtr = iPtr->globalNsPtr; + } else { + iPtr->lookupNsPtr = NULL; + } + } else { + if (flags & TCL_EVAL_GLOBAL) { + TEOV_SwitchVarFrame(interp); + lookupNsPtr = iPtr->globalNsPtr; + } - if (savedNsPtr) { - varFramePtr->nsPtr = savedNsPtr; - } else if (iPtr->ensembleRewrite.sourceObjs) { /* * TCL_EVAL_INVOKE was not set: clear rewrite rules */ @@ -3990,57 +3983,38 @@ TclEvalObjvInternal( iPtr->ensembleRewrite.sourceObjs = NULL; } + /* - * Call trace functions if needed. + * Lookup the command */ + + cmdPtr = TEOV_LookupCmdFromObj(interp, objv[0], lookupNsPtr); + if (!cmdPtr) { + notFound: + result = TEOV_NotFound(interp, objc, objv, lookupNsPtr); + iPtr->numLevels--; + goto done; + } - traced = (iPtr->tracePtr || (cmdPtr->flags & CMD_HAS_EXEC_TRACES)); - if (traced && checkTraces) { - int cmdEpoch = cmdPtr->cmdEpoch; - int newEpoch; - - /* - * Insure that we have a correct nul-terminated command string for the - * trace code. - */ - - commandPtr = GetCommandSource(iPtr, command, length, objc, objv); - command = TclGetStringFromObj(commandPtr, &length); - + if (iPtr->tracePtr || (cmdPtr->flags & CMD_HAS_EXEC_TRACES)) { /* - * Execute any command or execution traces. Note that we bump up the - * command's reference count for the duration of the calling of the - * traces so that the structure doesn't go away underneath our feet. + * Call enter traces. They will schedule a call to the leave traces if + * necessary. */ - cmdPtr->refCount++; - if (iPtr->tracePtr && (traceCode == TCL_OK)) { - traceCode = TclCheckInterpTraces(interp, command, length, - cmdPtr, code, TCL_TRACE_ENTER_EXEC, objc, objv); - } - if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && (traceCode == TCL_OK)) { - traceCode = TclCheckExecutionTraces(interp, command, length, - cmdPtr, code, TCL_TRACE_ENTER_EXEC, objc, objv); + result = TEOV_RunEnterTraces(interp, &cmdPtr, objc, objv, lookupNsPtr); + if (!cmdPtr) { + goto notFound; } - newEpoch = cmdPtr->cmdEpoch; - TclCleanupCommandMacro(cmdPtr); - - /* - * If the traces modified/deleted the command or any existing traces, - * they will update the command's epoch. When that happens, set - * checkTraces is set to 0 to prevent the re-calling of traces (and - * any possible infinite loop) and we go back to re-find the command - * implementation. - */ - - if (cmdEpoch != newEpoch) { - checkTraces = 0; - if (commandPtr) { - Tcl_DecrRefCount(commandPtr); - } - goto reparseBecauseOfTraces; + if (result != TCL_OK) { + iPtr->numLevels--; + goto done; } } + + /* + * Found a command! The real work begins now ... + */ if (TCL_DTRACE_CMD_ARGS_ENABLED()) { char *a[10]; @@ -4063,260 +4037,608 @@ TclEvalObjvInternal( /* * Finally, invoke the command's Tcl_ObjCmdProc. + * + * Do the NR dance right here: + * - for non-NR enabled commands, just sigh and call the objProc + * - for NR-enabled commands call the part1, decide what to do with + * the continuation: + * . if it is a bytecode AND we were called by TEBC, pass it + * back. Otherwise just call a new TEBC on it. Don't register + * the callback, TEBC handles those. + * . if it is a command and it has a callback, push the callback + * into the TODO list, set the params as needed and restart at + * the top. + * + * Note that I removed the DTRACE thing: I have not really thought + * about where it really belongs, and do not really know what it does + * either. */ - cmdPtr->refCount++; iPtr->cmdCount++; - if (code == TCL_OK && traceCode == TCL_OK - && !TclLimitExceeded(iPtr->limit)) { - if (TCL_DTRACE_CMD_ENTRY_ENABLED()) { - TCL_DTRACE_CMD_ENTRY(TclGetString(objv[0]), objc - 1, - (Tcl_Obj **)(objv + 1)); - } - code = (*cmdPtr->objProc)(cmdPtr->objClientData, interp, objc, objv); - if (TCL_DTRACE_CMD_RETURN_ENABLED()) { - TCL_DTRACE_CMD_RETURN(TclGetString(objv[0]), code); - } + if (TclLimitExceeded(iPtr->limit)) { + result = TCL_ERROR; + iPtr->numLevels--; + goto done; } - if (TclAsyncReady(iPtr)) { - code = Tcl_AsyncInvoke(interp, code); - } - if (code == TCL_OK && Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { - code = TCL_ERROR; - } - if (code == TCL_OK && TclLimitReady(iPtr->limit)) { - code = Tcl_LimitCheck(interp); + objProc = cmdPtr->nreProc; + if (!objProc) { + objProc = cmdPtr->objProc; } - + objClientData = cmdPtr->objClientData; + + COMPLETE_RECORD(recordPtr); + cmdPtr->refCount++; + + objProcReentryPoint: /* - * Call 'leave' command traces + * If this is an NR-enabled command, find the real objProc. */ - if (traced) { - if (!(cmdPtr->flags & CMD_IS_DELETED)) { - if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && traceCode == TCL_OK){ - traceCode = TclCheckExecutionTraces(interp, command, length, - cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv); + result = (*objProc)(objClientData, interp, objc, objv); + if ((result != TCL_OK) || !VALID_NEW_REQUEST(recordPtr)) { +#if 0 + TclStackPurge(interp, recordPtr->tosPtr); +#endif + goto done; + } + + /* + * We got a valid callback request: let us complete the corresponding + * record and proceed with the next call. + */ + + switch(recordPtr->type) { + case TCL_NR_NO_TYPE: { + break; + } + case TCL_NR_BC_TYPE: { + tcl_nr_bc_type: + if (USE_NR_TEBC && tebcCall) { + /* + * We were called by TEBC, and we need a bytecode to be + * executed: just ask our caller to do that. + * TEBC_CALL(iPtr) = TEBC_DO_EXEC = 0 is not really needed, as + * it is already 0==TEBC_DO_EXEC + */ + + TEBC_CALL(iPtr) = TEBC_DO_EXEC; + TEBC_DATA(iPtr) = recordPtr->data.codePtr; + return TCL_OK; + } + + /* + * No TEBC atop - we'll just have to instantiate a new one and + * do the callback on return. + */ + + result = TclExecuteByteCode(interp, recordPtr->data.codePtr); + goto done; + } + case TCL_NR_TAILCALL_TYPE: { + /* + * Got to save this record, free the stack (ie, perform all + * pending callbacks) and restore the record. + */ + + Tcl_Obj *tailObjPtr = recordPtr->data.obj.objPtr; + + result = TclEvalObjv_NR2(interp, result, rootPtr); + + if (result != TCL_OK) { + goto done; } - if (iPtr->tracePtr != NULL && traceCode == TCL_OK) { - traceCode = TclCheckInterpTraces(interp, command, length, - cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv); + if (USE_NR_TEBC && tebcCall) { + /* + * We were called by TEBC, and we need it to drop a frame: let + * him know. + */ + + TEBC_CALL(iPtr) = TEBC_DO_TAILCALL; + TEBC_DATA(iPtr) = tailObjPtr; + return TCL_OK; } + + /* + * ONLY supported if called from TEBC. Could do an 'uplevel 1'? + * Run from here (as hinted below)? Mmhhh ... FIXME. Maybe + * tailcalls SHOULD actually be bytecompiled (we know how to more + * or less fake it when falling off TEBC)? + */ + + Tcl_Panic("tailcall called from a non-compiled command?"); + /* FALL THROUGH */ } + case TCL_NR_CMD_TYPE: { + /* + * We got an unshared canonical list to eval , do it from here. + */ - /* - * If one of the trace invocation resulted in error, then change the - * result code accordingly. Note, that the interp->result should - * already be set correctly by the call to TraceExecutionProc. - */ + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + Tcl_Obj **elemPtr; - if (traceCode != TCL_OK) { - code = traceCode; + flags = recordPtr->data.obj.flags; + Tcl_ListObjGetElements(NULL, objPtr, &objc, &elemPtr); + objv = elemPtr; + if (objc == 0) { + goto done; + } + goto restartAtTop; + } + case TCL_NR_SCRIPT_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + + flags = recordPtr->data.obj.flags; + if (USE_NR_TEBC && tebcCall) { + result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); + if (result == TCL_OK) { + switch (recordPtr->type) { + case TCL_NR_BC_TYPE: + goto tcl_nr_bc_type; + case TCL_NR_NO_TYPE: + goto done; + default: + Tcl_Panic("TEOEx called from TEOV returns unexpected record type"); + } + } + goto done; + } else { + result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); + goto done; + } } - if (commandPtr) { - Tcl_DecrRefCount(commandPtr); + case TCL_NR_OBJPROC_TYPE: { + /* This is a rewrite like ns-import does, without a new + * cmdPtr or new reentrant call. FIXME: add the possibility of a + * new callback (TclNR_ObjProc has that), and maybe also edition + * of objc/objv? */ + + objProc = recordPtr->data.objProc.objProc; + objClientData = recordPtr->data.objProc.clientData; + recordPtr->type = TCL_NR_NO_TYPE; + goto objProcReentryPoint; + } + default: { + Tcl_Panic("TEOV: unknown NR-request type %i!", recordPtr->type); } } + done: + return TclEvalObjv_NR2(interp, result, rootPtr); +} - /* - * Decrement the reference count of cmdPtr and deallocate it if it has - * dropped to zero. - */ - - TclCleanupCommandMacro(cmdPtr); +int TclEvalObjv_NR2( + Tcl_Interp *interp, + int result, + struct TEOV_record *rootPtr) +{ + Interp *iPtr = (Interp *) interp; + TEOV_record *recordPtr; /* * If the interpreter has a non-empty string result, the result object is * either empty or stale because some function set interp->result * directly. If so, move the string result to the result object, then * reset the string result. + * + * This only needs to be done for the first item in the list: all other + * are for NR function calls, and those are Tcl_Obj based. */ if (*(iPtr->result) != 0) { (void) Tcl_GetObjResult(interp); } - if (TCL_DTRACE_CMD_RESULT_ENABLED()) { - Tcl_Obj *r; - - r = Tcl_GetObjResult(interp); - TCL_DTRACE_CMD_RESULT(TclGetString(objv[0]), code, TclGetString(r),r); - } + TclResetCancellation(interp, 0); - done: - if (savedVarFramePtr) { - iPtr->varFramePtr = savedVarFramePtr; - } - return code; + while (TOP_RECORD(iPtr) != rootPtr) { + POP_RECORD(iPtr, recordPtr); - notFound: - { - Namespace *currNsPtr = NULL; /* Used to check for and invoke any - * registered unknown command handler - * for the current namespace (TIP - * 181). */ - int newObjc, handlerObjc; - Tcl_Obj **handlerObjv; - - currNsPtr = varFramePtr->nsPtr; - if ((currNsPtr == NULL) || (currNsPtr->unknownHandlerPtr == NULL)) { - currNsPtr = iPtr->globalNsPtr; - if (currNsPtr == NULL) { - Tcl_Panic("TclEvalObjvInternal: NULL global namespace pointer"); - } + while (recordPtr->callbackPtr) {// + TEOV_callback *callbackPtr = recordPtr->callbackPtr; + result = (*callbackPtr->procPtr)(&callbackPtr->data0, + interp, result); + callbackPtr = callbackPtr->nextPtr; + TclSmallFree(recordPtr->callbackPtr); + recordPtr->callbackPtr = callbackPtr; } - /* - * Check to see if the resolution namespace has lost its unknown - * handler. If so, reset it to "::unknown". - */ - - if (currNsPtr->unknownHandlerPtr == NULL) { - TclNewLiteralStringObj(currNsPtr->unknownHandlerPtr, "::unknown"); - Tcl_IncrRefCount(currNsPtr->unknownHandlerPtr); + if (!CHECK_EXTRA(iPtr, recordPtr)) { + Tcl_Panic("TclEvalObjv_NR2: wrong tosPtr?"); + /* TclStackPurge(interp, recordPtr->tosPtr); */ } /* - * Get the list of words for the unknown handler and allocate enough - * space to hold both the handler prefix and all words of the command - * invokation itself. - */ - - Tcl_ListObjGetElements(NULL, currNsPtr->unknownHandlerPtr, - &handlerObjc, &handlerObjv); - newObjc = objc + handlerObjc; - newObjv = (Tcl_Obj **) TclStackAlloc(interp, - (int) sizeof(Tcl_Obj *) * newObjc); - - /* - * Copy command prefix from unknown handler and add on the real - * command's full argument list. Note that we only use memcpy() once - * because we have to increment the reference count of all the handler - * arguments anyway. + * Decrement the reference count of cmdPtr and deallocate it if it has + * dropped to zero. The level only needs fixing for records that + * pushed a cmdPtr. */ - for (i = 0; i < handlerObjc; ++i) { - newObjv[i] = handlerObjv[i]; - Tcl_IncrRefCount(newObjv[i]); + if (recordPtr->cmdPtr) { + TclCleanupCommandMacro(recordPtr->cmdPtr); + iPtr->numLevels--; } - memcpy(newObjv+handlerObjc, objv, sizeof(Tcl_Obj *) * (unsigned)objc); - - /* - * Look up and invoke the handler (by recursive call to this - * function). If there is no handler at all, instead of doing the - * recursive call we just generate a generic error message; it would - * be an infinite-recursion nightmare otherwise. - */ - - cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, newObjv[0]); - if (cmdPtr == NULL) { - Tcl_AppendResult(interp, "invalid command name \"", - TclGetString(objv[0]), "\"", NULL); - code = TCL_ERROR; - } else { - TclResetCancellation(interp, 0); - iPtr->numLevels++; - code = TclEvalObjvInternal(interp, newObjc, newObjv, command, - length, 0); - iPtr->numLevels--; + if (TCL_DTRACE_CMD_RETURN_ENABLED()) { + TCL_DTRACE_CMD_RETURN(TclGetString(objv[0]), result); } - /* - * Release any resources we locked and allocated during the handler - * call. - */ + FREE_RECORD(iPtr, recordPtr); + } - for (i = 0; i < handlerObjc; ++i) { - Tcl_DecrRefCount(newObjv[i]); - } - TclStackFree(interp, newObjv); - if (savedNsPtr) { - varFramePtr->nsPtr = savedNsPtr; - } - goto done; + /* + * Do not interrupt a series of cleanups with async or limit checks: just + * check at the end. + */ + + if (TclAsyncReady(iPtr)) { + result = Tcl_AsyncInvoke(interp, result); } + + if (result == TCL_OK) { + result = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); + } + + if (result == TCL_OK && TclLimitReady(iPtr->limit)) { + result = Tcl_LimitCheck(interp); + } + + return result; } /* *---------------------------------------------------------------------- * - * Tcl_EvalObjv -- - * - * This function evaluates a Tcl command that has already been parsed - * into words, with one Tcl_Obj holding each word. - * - * Results: - * The return value is a standard Tcl completion code such as TCL_OK or - * TCL_ERROR. A result or error message is left in interp's result. + * TEOV_Exception - + * TEOV_LookupCmdFromObj - + * TEOV_RunEnterTraces - + * TEOV_RunLeaveTraces - + * TEOV_NotFound - * - * Side effects: - * Depends on the command. + * These are helper functions for Tcl_EvalObjv. * *---------------------------------------------------------------------- */ -int -Tcl_EvalObjv( - Tcl_Interp *interp, /* Interpreter in which to evaluate the - * command. Also used for error reporting. */ - int objc, /* Number of words in command. */ - Tcl_Obj *const objv[], /* An array of pointers to objects that are - * the words that make up the command. */ - int flags) /* Collection of OR-ed bits that control the - * evaluation of the script. Only - * TCL_EVAL_GLOBAL and TCL_EVAL_INVOKE are - * currently supported. */ +static void +TEOV_PushExceptionHandlers( + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[], + int flags) { Interp *iPtr = (Interp *) interp; - int code = TCL_OK; - - TclResetCancellation(interp, 0); - - iPtr->numLevels++; - code = TclEvalObjvInternal(interp, objc, objv, NULL, 0, flags); - iPtr->numLevels--; - - if (code == TCL_OK) { - return code; - } else { - int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); + + /* + * If any error processing is necessary, push the appropriate + * records. Note that we have to push them in the inverse order: first + * the one that has to run last. + */ + if (!(flags & TCL_EVAL_INVOKE)) { /* - * If we are again at the top level, process any unusual return code - * returned by the evaluated code. + * Error messages */ + + TclNR_AddCallback(interp, TEOV_Error, INT2PTR(objc), (ClientData) objv, + NULL, NULL); + } + + if (iPtr->numLevels == 1) { + /* + * No CONTINUE or BREAK at level 0, manage RETURN + */ + + TclNR_AddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL); + } +} - if (iPtr->numLevels == 0) { - if (code == TCL_RETURN) { - code = TclUpdateReturnInfo(iPtr); - } - if ((code != TCL_ERROR) && !allowExceptions) { - ProcessUnexpectedResult(interp, code); - code = TCL_ERROR; - } +static void +TEOV_SwitchVarFrame( + Tcl_Interp *interp) +{ + Interp *iPtr = (Interp *) interp; + + /* + * Change the varFrame to be the rootVarFrame, and push a record + * to restore things at the end. + */ + + TclNR_AddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, NULL, NULL); + iPtr->varFramePtr = iPtr->rootFramePtr; +} + +static int +TEOV_RestoreVarFrame( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + ((Interp *) interp)->varFramePtr = data[0]; + return result; +} + +static int +TEOV_Exception( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); + + if (result != TCL_OK) { + if (result == TCL_RETURN) { + result = TclUpdateReturnInfo(iPtr); + } + if ((result != TCL_ERROR) && !allowExceptions) { + ProcessUnexpectedResult(interp, result); + result = TCL_ERROR; } + } + return result; +} - if ((code == TCL_ERROR) && !(flags & TCL_EVAL_INVOKE)) { - /* - * If there was an error, a command string will be needed for the - * error log: generate it now. Do not worry too much about doing - * it expensively. - */ +static int +TEOV_Error( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_Obj *listPtr; + char *cmdString; + int cmdLen; + int objc = PTR2INT(data[0]); + Tcl_Obj **objv = data[1]; + + if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)){ + /* + * If there was an error, a command string will be needed for the + * error log: get it out of the itemPtr. The details depend on the + * type + */ + + listPtr = Tcl_NewListObj(objc, objv); + cmdString = Tcl_GetStringFromObj(listPtr, &cmdLen); + Tcl_LogCommandInfo(interp, cmdString, cmdString, cmdLen); + Tcl_DecrRefCount(listPtr); + } + iPtr->flags &= ~ERR_ALREADY_LOGGED; + return result; +} + +static int +TEOV_NotFound( + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[], + Namespace *lookupNsPtr) +{ + Command * cmdPtr; + Interp *iPtr = (Interp *) interp; + Tcl_Obj **newObjv; + int i; + CallFrame *varFramePtr = iPtr->varFramePtr; + int result = TCL_OK; + Namespace *currNsPtr = NULL; /* Used to check for and invoke any + * registered unknown command handler + * for the current namespace (TIP + * 181). */ + int newObjc, handlerObjc; + Tcl_Obj **handlerObjv; + Namespace *savedNsPtr = NULL; + + currNsPtr = varFramePtr->nsPtr; + if ((currNsPtr == NULL) || (currNsPtr->unknownHandlerPtr == NULL)) { + currNsPtr = iPtr->globalNsPtr; + if (currNsPtr == NULL) { + Tcl_Panic("Tcl_EvalObjv: NULL global namespace pointer"); + } + } + + /* + * Check to see if the resolution namespace has lost its unknown + * handler. If so, reset it to "::unknown". + */ + + if (currNsPtr->unknownHandlerPtr == NULL) { + TclNewLiteralStringObj(currNsPtr->unknownHandlerPtr, "::unknown"); + Tcl_IncrRefCount(currNsPtr->unknownHandlerPtr); + } + + /* + * Get the list of words for the unknown handler and allocate enough + * space to hold both the handler prefix and all words of the command + * invokation itself. + */ + + Tcl_ListObjGetElements(NULL, currNsPtr->unknownHandlerPtr, + &handlerObjc, &handlerObjv); + newObjc = objc + handlerObjc; + newObjv = (Tcl_Obj **) TclStackAlloc(interp, + (int) sizeof(Tcl_Obj *) * newObjc); + + /* + * Copy command prefix from unknown handler and add on the real + * command's full argument list. Note that we only use memcpy() once + * because we have to increment the reference count of all the handler + * arguments anyway. + */ + + for (i = 0; i < handlerObjc; ++i) { + newObjv[i] = handlerObjv[i]; + Tcl_IncrRefCount(newObjv[i]); + } + memcpy(newObjv+handlerObjc, objv, sizeof(Tcl_Obj *) * (unsigned)objc); + + /* + * Look up and invoke the handler (by recursive call to this + * function). If there is no handler at all, instead of doing the + * recursive call we just generate a generic error message; it would + * be an infinite-recursion nightmare otherwise. + * + * In this case we worry a bit less about recursion for now, and call + * the "blocking" interface. + */ + + cmdPtr = TEOV_LookupCmdFromObj(interp, newObjv[0], lookupNsPtr); + if (cmdPtr == NULL) { + Tcl_AppendResult(interp, "invalid command name \"", + TclGetString(objv[0]), "\"", NULL); + result = TCL_ERROR; + } else { + if (lookupNsPtr) { + savedNsPtr = varFramePtr->nsPtr; + varFramePtr->nsPtr = lookupNsPtr; + } + result = Tcl_EvalObjv(interp, newObjc, newObjv, TCL_EVAL_NOERR); + if (savedNsPtr) { + varFramePtr->nsPtr = savedNsPtr; + } + } + + /* + * Release any resources we locked and allocated during the handler + * call. + */ + + for (i = 0; i < handlerObjc; ++i) { + Tcl_DecrRefCount(newObjv[i]); + } + TclStackFree(interp, newObjv); + return result; +} + +static int +TEOV_RunEnterTraces( + Tcl_Interp *interp, + Command **cmdPtrPtr, + int objc, + Tcl_Obj *const objv[], + Namespace *lookupNsPtr) +{ + Interp *iPtr = (Interp *) interp; + Command *cmdPtr = *cmdPtrPtr; + int traceCode = TCL_OK; + int cmdEpoch = cmdPtr->cmdEpoch; + int newEpoch; + char *command; + int length; + Tcl_Obj *commandPtr; + + commandPtr = GetCommandSource(iPtr, objc, objv, 1); + command = Tcl_GetStringFromObj(commandPtr, &length); + + /* + * Call trace functions + * Execute any command or execution traces. Note that we bump up the + * command's reference count for the duration of the calling of the + * traces so that the structure doesn't go away underneath our feet. + */ + + cmdPtr->refCount++; + if (iPtr->tracePtr) { + traceCode = TclCheckInterpTraces(interp, command, length, + cmdPtr, TCL_OK, TCL_TRACE_ENTER_EXEC, objc, objv); + } + if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && (traceCode == TCL_OK)) { + traceCode = TclCheckExecutionTraces(interp, command, length, + cmdPtr, TCL_OK, TCL_TRACE_ENTER_EXEC, objc, objv); + } + newEpoch = cmdPtr->cmdEpoch; + TclCleanupCommandMacro(cmdPtr); + + /* + * If the traces modified/deleted the command or any existing traces, + * they will update the command's epoch. We need to lookup again, but do + * not run enter traces on the newly found cmdPtr. + */ + + if (cmdEpoch != newEpoch) { + cmdPtr = TEOV_LookupCmdFromObj(interp, objv[0], lookupNsPtr); + *cmdPtrPtr = cmdPtr; + } + + if (cmdPtr) { + /* + * Command was found: push a record to schedule + * the leave traces. + */ + + TclNR_AddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode), + commandPtr, cmdPtr, NULL); + cmdPtr->refCount++; + } else { + Tcl_DecrRefCount(commandPtr); + } + return traceCode; +} + +static int +TEOV_RunLeaveTraces( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; - Tcl_Obj *listPtr; - char *cmdString; - int cmdLen; + TclResetCancellation(interp, 0); + char *command; + int length, objc; + Tcl_Obj **objv; + int traceCode = PTR2INT(data[0]); + Tcl_Obj *commandPtr = data[1]; + Command *cmdPtr = data[2]; + + command = Tcl_GetStringFromObj(commandPtr, &length); + if (TCL_OK != Tcl_ListObjGetElements(interp, commandPtr, &objc, &objv)) { + Tcl_Panic("Who messed with commandPtr?"); + } - listPtr = Tcl_NewListObj(objc, objv); - cmdString = Tcl_GetStringFromObj(listPtr, &cmdLen); - Tcl_LogCommandInfo(interp, cmdString, cmdString, cmdLen); - Tcl_DecrRefCount(listPtr); + if (!(cmdPtr->flags & CMD_IS_DELETED)) { + if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && traceCode == TCL_OK){ + traceCode = TclCheckExecutionTraces(interp, command, length, + cmdPtr, result, TCL_TRACE_LEAVE_EXEC, objc, objv); + } + if (iPtr->tracePtr != NULL && traceCode == TCL_OK) { + traceCode = TclCheckInterpTraces(interp, command, length, + cmdPtr, result, TCL_TRACE_LEAVE_EXEC, objc, objv); } + } + Tcl_DecrRefCount(commandPtr); + + /* + * As cmdPtr is set, TclEvalObjv_NR2 is about to reduce the + * numlevels. Prevent that by resetting the cmdPtr field and dealing right + * here with cmdPtr->refCount. + */ + + TclCleanupCommandMacro(cmdPtr); + + if (traceCode != TCL_OK) { + return traceCode; + } else { + return result; + } +} - return code; +static inline Command * +TEOV_LookupCmdFromObj( + Tcl_Interp *interp, + Tcl_Obj *namePtr, + Namespace *lookupNsPtr) +{ + Interp *iPtr = (Interp *) interp; + Command *cmdPtr; + Namespace *savedNsPtr = iPtr->varFramePtr->nsPtr; + + if (lookupNsPtr) { + iPtr->varFramePtr->nsPtr = lookupNsPtr; + iPtr->lookupNsPtr = NULL; } + cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, namePtr); + iPtr->varFramePtr->nsPtr = savedNsPtr; + return cmdPtr; } /* @@ -4729,10 +5051,7 @@ TclEvalEx( TclResetCancellation(interp, 0); - iPtr->numLevels++; - code = TclEvalObjvInternal(interp, objectsUsed, objv, - parsePtr->commandStart, parsePtr->commandSize, 0); - iPtr->numLevels--; + code = Tcl_EvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; eeFramePtr->line = NULL; @@ -5004,12 +5323,36 @@ TclEvalObjEx( const CmdFrame *invoker, /* Frame of the command doing the eval. */ int word) /* Index of the word which is in objPtr. */ { + int result = TCL_OK; + TEOV_record *recordPtr; + + /* + * Push an empty record. If this is an NR call, it will modify it + * accordingly. + */ + + PUSH_RECORD(interp, recordPtr); + result = TclNREvalObjEx(interp, objPtr, flags, invoker, word); + assert((TOP_RECORD(interp) == recordPtr)); + return NRPostProcess(interp, result, 0, NULL); +} + +int +TclNREvalObjEx( + Tcl_Interp *interp, /* Token for command interpreter (returned by + * a previous call to Tcl_CreateInterp). */ + register Tcl_Obj *objPtr, /* Pointer to object containing commands to + * execute. */ + int flags, /* Collection of OR-ed bits that control the + * evaluation of the script. Supported values + * are TCL_EVAL_GLOBAL and TCL_EVAL_DIRECT. */ + const CmdFrame *invoker, /* Frame of the command doing the eval. */ + int word) /* Index of the word which is in objPtr. */ +{ register Interp *iPtr = (Interp *) interp; char *script; int numSrcBytes; int result; - CallFrame *savedVarFramePtr;/* Saves old copy of iPtr->varFramePtr in case - * TCL_EVAL_GLOBAL was set. */ int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); Tcl_IncrRefCount(objPtr); @@ -5056,7 +5399,6 @@ TclEvalObjEx( ckalloc(eoFramePtr->nline * sizeof(int)); eoFramePtr->cmd.listPtr = objPtr; - Tcl_IncrRefCount(eoFramePtr->cmd.listPtr); eoFramePtr->data.eval.path = NULL; /* @@ -5072,155 +5414,201 @@ TclEvalObjEx( } iPtr->cmdFramePtr = eoFramePtr; - result = Tcl_EvalObjv(interp, eoFramePtr->nline, elements, - flags); - - Tcl_DecrRefCount(copyPtr); - iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; - Tcl_DecrRefCount(eoFramePtr->cmd.listPtr); - ckfree((char *) eoFramePtr->line); - eoFramePtr->line = NULL; - eoFramePtr->nline = 0; - TclStackFree(interp, eoFramePtr); - - goto done; + + TclNR_AddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, + copyPtr, NULL); + return TclNR_EvalObj(interp, objPtr, flags); } } - if (flags & TCL_EVAL_DIRECT) { + if (!(flags & TCL_EVAL_DIRECT)) { /* - * We're not supposed to use the compiler or byte-code interpreter. - * Let Tcl_EvalEx evaluate the command directly (and probably more - * slowly). - * - * TIP #280. Propagate context as much as we can. Especially if the - * script to evaluate is a single literal it makes sense to look if - * our context is one with absolute line numbers we can then track - * into the literal itself too. + * Let the compiler/engine subsystem do the evaluation. * - * See also tclCompile.c, TclInitCompileEnv, for the equivalent code - * in the bytecode compiler. + * TIP #280 The invoker provides us with the context for the script. + * We transfer this to the byte code compiler. */ - if (invoker == NULL) { + ByteCode *newCodePtr; + CallFrame *savedVarFramePtr = NULL; + /* Saves old copy of iPtr->varFramePtr in + * case TCL_EVAL_GLOBAL was set. */ + + if (flags & TCL_EVAL_GLOBAL) { + savedVarFramePtr = iPtr->varFramePtr; + iPtr->varFramePtr = iPtr->rootFramePtr; + } + TclNR_AddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, + objPtr, INT2PTR(allowExceptions), NULL); + + newCodePtr = TclCompileObj(interp, objPtr, invoker, word); + if (newCodePtr) { + TEOV_record *recordPtr = TOP_RECORD(interp); + + recordPtr->type = TCL_NR_BC_TYPE; + recordPtr->data.codePtr = newCodePtr; + return TCL_OK; + } else { + return TCL_ERROR; + } + } + + /* + * We're not supposed to use the compiler or byte-code interpreter. + * Let Tcl_EvalEx evaluate the command directly (and probably more + * slowly). + * + * TIP #280. Propagate context as much as we can. Especially if the + * script to evaluate is a single literal it makes sense to look if + * our context is one with absolute line numbers we can then track + * into the literal itself too. + * + * See also tclCompile.c, TclInitCompileEnv, for the equivalent code + * in the bytecode compiler. + */ + + if (invoker == NULL) { + /* + * No context, force opening of our own. + */ + + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); + result = Tcl_EvalEx(interp, script, numSrcBytes, flags); + } else { + /* + * We have an invoker, describing the command asking for the + * evaluation of a subordinate script. This script may originate + * in a literal word, or from a variable, etc. Using the line + * array we now check if we have good line information for the + * relevant word. The type of context is relevant as well. In a + * non-'source' context we don't have to try tracking lines. + * + * First see if the word exists and is a literal. If not we go + * through the easy dynamic branch. No need to perform more + * complex invokations. + */ + + if ((invoker->nline <= word) || (invoker->line[word] < 0)) { /* - * No context, force opening of our own. + * Dynamic script, or dynamic context, force our own + * context. */ - + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = Tcl_EvalEx(interp, script, numSrcBytes, flags); + } else { /* - * We have an invoker, describing the command asking for the - * evaluation of a subordinate script. This script may originate - * in a literal word, or from a variable, etc. Using the line - * array we now check if we have good line information for the - * relevant word. The type of context is relevant as well. In a - * non-'source' context we don't have to try tracking lines. - * - * First see if the word exists and is a literal. If not we go - * through the easy dynamic branch. No need to perform more - * complex invokations. + * Try to get an absolute context for the evaluation. */ - - if ((invoker->nline <= word) || (invoker->line[word] < 0)) { + + int pc = 0; + CmdFrame *ctxPtr = (CmdFrame *) + TclStackAlloc(interp, sizeof(CmdFrame)); + + *ctxPtr = *invoker; + if (invoker->type == TCL_LOCATION_BC) { /* - * Dynamic script, or dynamic context, force our own - * context. + * Note: Type BC => ctxPtr->data.eval.path is not used. + * ctxPtr->data.tebc.codePtr is used instead. */ - - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - result = Tcl_EvalEx(interp, script, numSrcBytes, flags); - - } else { + + TclGetSrcInfoForPc(ctxPtr); + pc = 1; + } + + if (ctxPtr->type == TCL_LOCATION_SOURCE) { /* - * Try to get an absolute context for the evaluation. + * Absolute context to reuse. */ - - int pc = 0; - CmdFrame *ctxPtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); - - *ctxPtr = *invoker; - if (invoker->type == TCL_LOCATION_BC) { - /* - * Note: Type BC => ctxPtr->data.eval.path is not used. - * ctxPtr->data.tebc.codePtr is used instead. - */ - - TclGetSrcInfoForPc(ctxPtr); - pc = 1; - } - - if (ctxPtr->type == TCL_LOCATION_SOURCE) { - /* - * Absolute context to reuse. - */ - - iPtr->invokeCmdFramePtr = ctxPtr; - iPtr->evalFlags |= TCL_EVAL_CTX; - - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - result = TclEvalEx(interp, script, numSrcBytes, flags, - ctxPtr->line[word]); - - if (pc) { - /* - * Death of SrcInfo reference. - */ - - Tcl_DecrRefCount(ctxPtr->data.eval.path); - } - } else { + + iPtr->invokeCmdFramePtr = ctxPtr; + iPtr->evalFlags |= TCL_EVAL_CTX; + + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); + result = TclEvalEx(interp, script, numSrcBytes, flags, + ctxPtr->line[word]); + + if (pc) { /* - * Dynamic context or script, easier to make our own as - * well. + * Death of SrcInfo reference. */ - - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - result = Tcl_EvalEx(interp, script, numSrcBytes, flags); + + Tcl_DecrRefCount(ctxPtr->data.eval.path); } - - TclStackFree(interp, ctxPtr); + } else { + /* + * Dynamic context or script, easier to make our own as + * well. + */ + + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); + result = Tcl_EvalEx(interp, script, numSrcBytes, flags); } + + TclStackFree(interp, ctxPtr); } - } else { - /* - * Let the compiler/engine subsystem do the evaluation. - * - * TIP #280 The invoker provides us with the context for the script. - * We transfer this to the byte code compiler. - */ + } + TclDecrRefCount(objPtr); + return result; +} - savedVarFramePtr = iPtr->varFramePtr; - if (flags & TCL_EVAL_GLOBAL) { - iPtr->varFramePtr = iPtr->rootFramePtr; +static int +TEOEx_ByteCodeCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + CallFrame *savedVarFramePtr = data[0]; + Tcl_Obj *objPtr = data[1]; + int allowExceptions = PTR2INT(data[2]); + char *script; + int numSrcBytes; + + if (iPtr->numLevels == 0) { + if (result == TCL_RETURN) { + result = TclUpdateReturnInfo(iPtr); } - - result = TclCompEvalObj(interp, objPtr, invoker, word); - - /* - * If we are again at the top level, process any unusual return code - * returned by the evaluated code. - */ - - if (iPtr->numLevels == 0) { - if (result == TCL_RETURN) { - result = TclUpdateReturnInfo(iPtr); - } - if ((result != TCL_OK) && (result != TCL_ERROR) - && !allowExceptions) { - ProcessUnexpectedResult(interp, result); - result = TCL_ERROR; - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - Tcl_LogCommandInfo(interp, script, script, numSrcBytes); - } + if ((result != TCL_OK) && (result != TCL_ERROR) + && !allowExceptions) { + ProcessUnexpectedResult(interp, result); + result = TCL_ERROR; + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); + Tcl_LogCommandInfo(interp, script, script, numSrcBytes); } - iPtr->evalFlags = 0; + } + iPtr->evalFlags = 0; + + /* Restore the callFrame if this was a TCL_EVAL_GLOBAL */ + + if (savedVarFramePtr) { iPtr->varFramePtr = savedVarFramePtr; } + + TclDecrRefCount(objPtr); + return result; +} - done: +static int +TEOEx_ListCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_Obj *objPtr = data[0]; + CmdFrame *eoFramePtr = data[1]; + Tcl_Obj *copyPtr = data[2]; + + /* Remove the cmdFrame if it was added */ + Tcl_DecrRefCount(copyPtr); + iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; + ckfree((char *) eoFramePtr->line); + eoFramePtr->line = NULL; + eoFramePtr->nline = 0; + TclStackFree(interp, eoFramePtr); + TclDecrRefCount(objPtr); return result; } @@ -6230,8 +6618,7 @@ ExprIsqrtFunc( return TCL_OK; negarg: - Tcl_SetObjResult(interp, - Tcl_NewStringObj("square root of negative argument", -1)); + Tcl_SetResult(interp, "square root of negative argument", TCL_STATIC); return TCL_ERROR; } @@ -6991,6 +7378,347 @@ TclDTraceInfo( #endif /* USE_DTRACE */ /* + *---------------------------------------------------------------------- + * + * TclNR_CallObjProc -- + * + * This function calls an objProc directly while managing things properly + * if it happens to be an NR objProc. It is meant to be used by extenders + * that provide an NR implementation of a command, as this function + * permits a trivial coding of the non-NR objProc. + * + * Results: + * The return value is a standard Tcl completion code such as TCL_OK or + * TCL_ERROR. A result or error message is left in interp's result. + * + * Side effects: + * Depends on the objProc. + * + *---------------------------------------------------------------------- + */ + +int +TclNR_CallObjProc( + Tcl_Interp *interp, + Tcl_ObjCmdProc *objProc, + ClientData clientData, + int objc, + Tcl_Obj *const objv[]) +{ + int result = TCL_OK; + TEOV_record *recordPtr; + + /* + * Push an empty record. If this is an NR call, it will modify it + * accordingly. + */ + + PUSH_RECORD(interp, recordPtr); + result = (*objProc)(clientData, interp, objc, objv); + return NRPostProcess(interp, result, objc, objv); +} + +static int +NRPostProcess( + Tcl_Interp *interp, + int result, + int objc, + Tcl_Obj *const objv[]) +{ + TEOV_record *recordPtr = TOP_RECORD(interp); + + if ((result == TCL_OK) && VALID_NEW_REQUEST(recordPtr)) { + switch(recordPtr->type) { + case TCL_NR_BC_TYPE: { + result = TclExecuteByteCode(interp, recordPtr->data.codePtr); + break; + } + case TCL_NR_CMD_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + int flags = recordPtr->data.obj.flags; + Tcl_Obj **objv; + int objc; + + Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); + result = Tcl_EvalObjv(interp, objc, objv, flags); + break; + } + case TCL_NR_SCRIPT_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + int flags = recordPtr->data.obj.flags; + + result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); + break; + } + case TCL_NR_OBJPROC_TYPE: { + Tcl_ObjCmdProc *objProc = recordPtr->data.objProc.objProc; + ClientData clientData = recordPtr->data.objProc.clientData; + + if (!objc) { + Tcl_Panic("NRPostProcess: something is very wrong!"); + } + result = (*objProc)(clientData, interp, objc, objv); + break; + } + default: + Tcl_Panic("NRPostProcess: invalid record type"); + } + } + + assert((TOP_RECORD(interp) == recordPtr)); + return TclEvalObjv_NR2(interp, result, recordPtr->nextPtr); +} + +/* + *---------------------------------------------------------------------- + * + * TclNR_CreateCommand -- + * + * Define a new NRE-enabled object-based command in a command table. + * + * Results: + * The return value is a token for the command, which can be used in + * future calls to Tcl_GetCommandName. + * + * Side effects: + * If no command named "cmdName" already exists for interp, one is + * created. Otherwise, if a command does exist, then if the object-based + * Tcl_ObjCmdProc is TclInvokeStringCommand, we assume Tcl_CreateCommand + * was called previously for the same command and just set its + * Tcl_ObjCmdProc to the argument "proc"; otherwise, we delete the old + * command. + * + * In the future, during bytecode evaluation when "cmdName" is seen as + * the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based + * Tcl_ObjCmdProc proc will be called. When the command is deleted from + * the table, deleteProc will be called. See the manual entry for details + * on the calling sequence. + * + *---------------------------------------------------------------------- + */ + +Tcl_Command +TclNR_CreateCommand( + Tcl_Interp *interp, /* Token for command interpreter (returned by + * previous call to Tcl_CreateInterp). */ + const char *cmdName, /* Name of command. If it contains namespace + * qualifiers, the new command is put in the + * specified namespace; otherwise it is put in + * the global namespace. */ + Tcl_ObjCmdProc *proc, /* Object-based function to associate with + * name, provides direct access for direct calls */ + Tcl_ObjCmdProc *nreProc, /* Object-based function to associate with + * name, provides NR implementation */ + ClientData clientData, /* Arbitrary value to pass to object + * function. */ + Tcl_CmdDeleteProc *deleteProc) + /* If not NULL, gives a function to call when + * this command is deleted. */ +{ + + Command *cmdPtr; + + cmdPtr = (Command *) Tcl_CreateObjCommand(interp, cmdName, proc, clientData, + deleteProc); + cmdPtr->nreProc = nreProc; + return (Tcl_Command) cmdPtr; +} + +/* + * These are the previous contents of tclNRE.c, part of the NRE api. + * + */ + + +/* + * TclNREvalCmd should only be called as an optimisation: when objPtr is known + * to be a canonical list that is not (and will not!) be shared + */ + +int +TclNREvalCmd( + Tcl_Interp * interp, + Tcl_Obj * objPtr, + int flags) +{ + TEOV_record *recordPtr = TOP_RECORD(interp); + + Tcl_IncrRefCount(objPtr); + recordPtr->type = TCL_NR_CMD_TYPE; + recordPtr->data.obj.objPtr = objPtr; + recordPtr->data.obj.flags = flags; + return TCL_OK; +} + +/***************************************************************************** + * Stuff for the public api + *****************************************************************************/ + +int +TclNR_EvalObjv( + Tcl_Interp *interp, /* Interpreter in which to evaluate the + * command. Also used for error reporting. */ + int objc, /* Number of words in command. */ + Tcl_Obj *const objv[], /* An array of pointers to objects that are + * the words that make up the command. */ + int flags) /* Collection of OR-ed bits that control the + * evaluation of the script. Only + * TCL_EVAL_GLOBAL, TCL_EVAL_INVOKE and + * TCL_EVAL_NOERR are currently supported. */ +{ + Tcl_Obj *listPtr = Tcl_NewListObj(objc, objv); + + return TclNREvalCmd(interp, listPtr, flags); +} + +int +TclNR_EvalObj( + Tcl_Interp * interp, + Tcl_Obj * objPtr, + int flags) +{ + TEOV_record *recordPtr = TOP_RECORD(interp); + List *listRep = objPtr->internalRep.twoPtrValue.ptr1; + + Tcl_IncrRefCount(objPtr); + if ((objPtr->typePtr == &tclListType) + && (!objPtr->bytes || listRep->canonicalFlag)) { + /* + * Shimmer protection! Always pass an unshared obj. The caller could + * incr the refCount of objPtr AFTER calling us! To be completely safe + * we always make a copy. + */ + + Tcl_Obj *origPtr = objPtr; + + objPtr = TclListObjCopy(NULL, origPtr); + Tcl_IncrRefCount(objPtr); + TclDecrRefCount(origPtr); + + recordPtr->type = TCL_NR_CMD_TYPE; + } else { + recordPtr->type = TCL_NR_SCRIPT_TYPE; + } + recordPtr->data.obj.objPtr = objPtr; + recordPtr->data.obj.flags = flags; + return TCL_OK; +} + +int +TclNR_ObjProc( + Tcl_Interp * interp, + Tcl_ObjCmdProc *objProc, + ClientData clientData) +{ + TEOV_record *recordPtr = TOP_RECORD(interp); + + recordPtr->type = TCL_NR_OBJPROC_TYPE; + recordPtr->data.objProc.objProc = objProc; + recordPtr->data.objProc.clientData = clientData; + return TCL_OK; +} + +/***************************************************************************** + * Stuff for tailcalls + *****************************************************************************/ + +/* + * Just to show that IT CAN BE DONE! The precise semantics are not simple, + * require more thought. Possibly need a new Tcl return code to do it right? + * Questions include: + * (1) How is the objc/objv tailcall to be run? My current thinking is that + * it should essentially be + * [tailcall a b c] <=> [uplevel 1 [list a b c]] + * with two caveats + * (a) the current frame is dropped first, after running all + * pending cleanup tasks and saving its namespace + * (b) 'a' is looked up in the returning frame's namespace, but the + * command is run in the context to which we are returning + * Current implementation does this if [tailcall] is called from within + * a proc, panics otherwise- + * (2) Should a tailcall bypass [catch] in the returning frame? Current + * implementation does not - it causes an error. + * + * FIXME! + */ + +int +TclTailcallObjCmd( + ClientData clientData, + Tcl_Interp * interp, + int objc, + Tcl_Obj *const objv[] ) +{ + Interp *iPtr = (Interp *) interp; + TEOV_record *recordPtr = TOP_RECORD(interp); + Tcl_Obj *listPtr; + + /* + * Do NOT allow tailcall to be called from a non-proc/lambda: tough to + * manage the proper semantics, especially for [uplevel $x tailcall foo] + */ + + if (!iPtr->varFramePtr->isProcCallFrame) { + Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); + return TCL_ERROR; + } + + listPtr = Tcl_NewListObj(objc-1, objv+1); + TclNR_EvalObj(interp, listPtr, 0); + recordPtr->type = TCL_NR_TAILCALL_TYPE; + return TCL_OK; +} + +void TclNR_AddCallback( + Tcl_Interp *interp, + TclNR_PostProc *postProcPtr, + ClientData data0, + ClientData data1, + ClientData data2, + ClientData data3) +{ + TEOV_record *recordPtr; + TEOV_callback *callbackPtr; + + if (!postProcPtr) { + Tcl_Panic("Adding a callback without and objProc?!"); + } + + recordPtr = TOP_RECORD(interp); + TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); + + callbackPtr->procPtr = postProcPtr; + callbackPtr->data0 = data0; + callbackPtr->data1 = data1; + callbackPtr->data2 = data2; + callbackPtr->data3 = data3; + + callbackPtr->nextPtr = recordPtr->callbackPtr; + recordPtr->callbackPtr = callbackPtr; +} + +TEOV_record * +TclNRPushRecord( + Tcl_Interp *interp) +{ + TEOV_record *recordPtr; + + PUSH_RECORD(interp, recordPtr); + return recordPtr; +} + +void +TclNRPopAndFreeRecord ( + Tcl_Interp * interp) +{ + TEOV_record *recordPtr; + + POP_RECORD(interp, recordPtr); + FREE_RECORD(interp, recordPtr); +} + + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index d6127b0..1b90331 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.95 2008/05/30 22:54:27 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.96 2008/07/13 09:03:33 msofer Exp $ */ #include "tclInt.h" @@ -660,8 +660,7 @@ Tcl_EvalObjCmd( * TIP #280. Make invoking context available to eval'd script. */ - result = TclEvalObjEx(interp, objv[1], TCL_EVAL_DIRECT, - iPtr->cmdFramePtr, 1); + result = TclEvalObjEx(interp, objv[1], TCL_EVAL_DIRECT, iPtr->cmdFramePtr, 1); } else { /* * More than one argument: concatenate them together with spaces diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 7e6ff50..21ff9cc 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.92 2008/06/08 03:21:33 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.93 2008/07/13 09:03:33 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -840,7 +840,7 @@ MODULE_SCOPE int TclEvalObjvInternal(Tcl_Interp *interp, *---------------------------------------------------------------- */ -MODULE_SCOPE int TclCompEvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, +MODULE_SCOPE ByteCode * TclCompileObj(Tcl_Interp *interp, Tcl_Obj *objPtr, const CmdFrame *invoker, int word); /* diff --git a/generic/tclDecls.h b/generic/tclDecls.h index a09429a..5198401 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.134 2008/06/13 05:45:09 mistachkin Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.135 2008/07/13 09:03:33 msofer Exp $ */ #ifndef _TCLDECLS @@ -3513,6 +3513,50 @@ EXTERN int Tcl_CancelEval (Tcl_Interp * interp, /* 581 */ EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); #endif +#ifndef TclNR_CreateCommand_TCL_DECLARED +#define TclNR_CreateCommand_TCL_DECLARED +/* 582 */ +EXTERN Tcl_Command TclNR_CreateCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_ObjCmdProc * proc, + Tcl_ObjCmdProc * nreProc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef TclNR_EvalObj_TCL_DECLARED +#define TclNR_EvalObj_TCL_DECLARED +/* 583 */ +EXTERN int TclNR_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef TclNR_EvalObjv_TCL_DECLARED +#define TclNR_EvalObjv_TCL_DECLARED +/* 584 */ +EXTERN int TclNR_EvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +#ifndef TclNR_ObjProc_TCL_DECLARED +#define TclNR_ObjProc_TCL_DECLARED +/* 585 */ +EXTERN int TclNR_ObjProc (Tcl_Interp * interp, + Tcl_ObjCmdProc * objProc, + ClientData clientData); +#endif +#ifndef TclNR_AddCallback_TCL_DECLARED +#define TclNR_AddCallback_TCL_DECLARED +/* 586 */ +EXTERN void TclNR_AddCallback (Tcl_Interp * interp, + TclNR_PostProc * postProcPtr, + ClientData data0, ClientData data1, + ClientData data2, ClientData data3); +#endif +#ifndef TclNR_CallObjProc_TCL_DECLARED +#define TclNR_CallObjProc_TCL_DECLARED +/* 587 */ +EXTERN int TclNR_CallObjProc (Tcl_Interp * interp, + Tcl_ObjCmdProc * objProc, + ClientData clientData, int objc, + Tcl_Obj *const objv[]); +#endif typedef struct TclStubHooks { CONST struct TclPlatStubs *tclPlatStubs; @@ -4154,6 +4198,12 @@ typedef struct TclStubs { void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ + Tcl_Command (*tclNR_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ + int (*tclNR_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ + int (*tclNR_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ + int (*tclNR_ObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData); /* 585 */ + void (*tclNR_AddCallback) (Tcl_Interp * interp, TclNR_PostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ + int (*tclNR_CallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6554,6 +6604,30 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_Canceled \ (tclStubsPtr->tcl_Canceled) /* 581 */ #endif +#ifndef TclNR_CreateCommand +#define TclNR_CreateCommand \ + (tclStubsPtr->tclNR_CreateCommand) /* 582 */ +#endif +#ifndef TclNR_EvalObj +#define TclNR_EvalObj \ + (tclStubsPtr->tclNR_EvalObj) /* 583 */ +#endif +#ifndef TclNR_EvalObjv +#define TclNR_EvalObjv \ + (tclStubsPtr->tclNR_EvalObjv) /* 584 */ +#endif +#ifndef TclNR_ObjProc +#define TclNR_ObjProc \ + (tclStubsPtr->tclNR_ObjProc) /* 585 */ +#endif +#ifndef TclNR_AddCallback +#define TclNR_AddCallback \ + (tclStubsPtr->tclNR_AddCallback) /* 586 */ +#endif +#ifndef TclNR_CallObjProc +#define TclNR_CallObjProc \ + (tclStubsPtr->tclNR_CallObjProc) /* 587 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5587b48..690d190 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -6,7 +6,7 @@ * Copyright (c) 1996-1997 Sun Microsystems, Inc. * Copyright (c) 1998-2000 by Scriptics Corporation. * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved. - * Copyright (c) 2002-2005 by Miguel Sofer. + * Copyright (c) 2002-2008 by Miguel Sofer. * Copyright (c) 2005-2007 by Donal K. Fellows. * Copyright (c) 2007 Daniel A. Steffen * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. @@ -14,16 +14,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.375 2008/06/30 01:10:46 das Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.376 2008/07/13 09:03:33 msofer Exp $ */ #include "tclInt.h" #include "tclCompile.h" #include "tommath.h" +#include "tclNRE.h" #include #include +static TclNR_PostProc TailcallFromTebc; + + /* * Hack to determine whether we may expect IEEE floating point. The hack is * formally incorrect in that non-IEEE platforms might have the same precision @@ -163,6 +167,58 @@ static BuiltinFunc tclBuiltinFuncTable[] = { #endif /* + * NR_TEBC + * Helpers for NR - non-recursive calls to TEBC + */ + +typedef struct BottomData { +#if USE_NR_TEBC + struct BottomData *prevBottomPtr; + TEOV_record *recordPtr; /* Top record on TEOVI's cleanup stack when + * this level was entered. */ + ByteCode *codePtr; /* The following data is used on return */ + unsigned char *pc; /* TO this level: they record the state when */ + ptrdiff_t *catchTop; /* a new codePtr was received for NR */ + int cleanup; /* execution. */ + Tcl_Obj *auxObjList; +#endif +} BottomData; + +#if USE_NR_TEBC + +#define NR_DATA_INIT() \ + bottomPtr->prevBottomPtr = oldBottomPtr; \ + bottomPtr->recordPtr = TOP_RECORD(iPtr); \ + bottomPtr->codePtr = codePtr + +#define NR_DATA_BURY() \ + bottomPtr->pc = pc; \ + bottomPtr->catchTop = catchTop; \ + bottomPtr->cleanup = cleanup; \ + bottomPtr->auxObjList = auxObjList; \ + oldBottomPtr = bottomPtr + +#define NR_DATA_DIG() \ + pc = bottomPtr->pc; \ + codePtr = bottomPtr->codePtr; \ + catchTop = bottomPtr->catchTop; \ + cleanup = bottomPtr->cleanup; \ + auxObjList = bottomPtr->auxObjList; \ + iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr +#endif + +#define PUSH_AUX_OBJ(objPtr) \ + objPtr->internalRep.twoPtrValue.ptr2 = auxObjList; \ + auxObjList = objPtr + +#define POP_AUX_OBJ() \ + { \ + Tcl_Obj *tmpPtr = auxObjList; \ + auxObjList = (Tcl_Obj *) tmpPtr->internalRep.twoPtrValue.ptr2; \ + Tcl_DecrRefCount(tmpPtr); \ + } + +/* * These variable-access macros have to coincide with those in tclVar.c */ @@ -746,6 +802,8 @@ TclCreateExecEnv( Tcl_IncrRefCount(eePtr->constants[0]); TclNewBooleanObj(eePtr->constants[1], 1); Tcl_IncrRefCount(eePtr->constants[1]); + eePtr->recordPtr = NULL; + eePtr->tebcCall = 0; esPtr->prevPtr = NULL; esPtr->nextPtr = NULL; @@ -820,6 +878,9 @@ TclDeleteExecEnv( TclDecrRefCount(eePtr->constants[0]); TclDecrRefCount(eePtr->constants[1]); + if (eePtr->recordPtr) { + Tcl_Panic("Deleting execEnv with pending TEOV callbacks!"); + } ckfree((char *) eePtr); } @@ -1079,6 +1140,25 @@ StackReallocWords( } void +TclStackPurge( + Tcl_Interp *interp, + Tcl_Obj **tosPtr) +{ + Tcl_Obj **newTosPtr = GET_TOSPTR(interp); + + if (!tosPtr) { + Tcl_Panic("TclStackPurge: cannot purge to NULL"); + } + while (newTosPtr && (newTosPtr != tosPtr)) { + TclStackFree(interp, NULL); + newTosPtr = GET_TOSPTR(interp); + } + if (newTosPtr != tosPtr) { + Tcl_Panic("TclStackPurge: requested tosPtr not here"); + } +} + +void TclStackFree( Tcl_Interp *interp, void *freePtr) @@ -1103,7 +1183,7 @@ TclStackFree( esPtr = eePtr->execStackPtr; markerPtr = esPtr->markerPtr; - if (MEMSTART(markerPtr) != (Tcl_Obj **)freePtr) { + if ((freePtr != NULL) && (MEMSTART(markerPtr) != (Tcl_Obj **)freePtr)) { Tcl_Panic("TclStackFree: incorrect freePtr. Call out of sequence?"); } @@ -1195,14 +1275,11 @@ TclStackRealloc( *-------------------------------------------------------------- */ -int -Tcl_ExprObj( - Tcl_Interp *interp, /* Context in which to evaluate the - * expression. */ - register Tcl_Obj *objPtr, /* Points to Tcl object containing expression - * to evaluate. */ - Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression - * result is stored if no errors occur. */ + +static ByteCode * +CompileExprObj( + Tcl_Interp *interp, + Tcl_Obj *objPtr) { Interp *iPtr = (Interp *) interp; CompileEnv compEnv; /* Compilation environment structure allocated @@ -1210,14 +1287,6 @@ Tcl_ExprObj( register ByteCode *codePtr = NULL; /* Tcl Internal type of bytecode. Initialized * to avoid compiler warning. */ - int result; - - /* - * Execute the expression after first saving the interpreter's result. - */ - - Tcl_Obj *saveObjPtr = Tcl_GetObjResult(interp); - Tcl_IncrRefCount(saveObjPtr); /* * Get the expression ByteCode from the object. If it exists, make sure it @@ -1274,6 +1343,31 @@ Tcl_ExprObj( } #endif /* TCL_COMPILE_DEBUG */ } + return codePtr; +} + +int +Tcl_ExprObj( + Tcl_Interp *interp, /* Context in which to evaluate the + * expression. */ + register Tcl_Obj *objPtr, /* Points to Tcl object containing expression + * to evaluate. */ + Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression + * result is stored if no errors occur. */ +{ + Interp *iPtr = (Interp *) interp; + int result; + ByteCode *codePtr; + + /* + * Execute the expression after first saving the interpreter's result. + */ + + Tcl_Obj *saveObjPtr = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(saveObjPtr); + + codePtr = CompileExprObj(interp, objPtr); + Tcl_ResetResult(interp); @@ -1377,24 +1471,21 @@ FreeExprCodeInternalRep( /* *---------------------------------------------------------------------- * - * TclCompEvalObj -- + * TclCompileObj -- * - * This procedure evaluates the script contained in a Tcl_Obj by first - * compiling it and then passing it to TclExecuteByteCode. + * This procedure compiles the script contained in a Tcl_Obj * * Results: - * The return value is one of the return codes defined in tcl.h (such as - * TCL_OK), and interp->objResultPtr refers to a Tcl object that either - * contains the result of executing the code or an error message. + * A pointer to the corresponding ByteCode * * Side effects: - * Almost certainly, depending on the ByteCode's instructions. + * The object is shimmered to bytecode type * *---------------------------------------------------------------------- */ -int -TclCompEvalObj( +ByteCode * +TclCompileObj( Tcl_Interp *interp, Tcl_Obj *objPtr, const CmdFrame *invoker, @@ -1402,7 +1493,6 @@ TclCompEvalObj( { register Interp *iPtr = (Interp *) interp; register ByteCode *codePtr; /* Tcl Internal type of bytecode. */ - int result; Namespace *namespacePtr; /* @@ -1414,15 +1504,12 @@ TclCompEvalObj( TclResetCancellation(interp, 0); - iPtr->numLevels++; if (TclInterpReady(interp) == TCL_ERROR) { - result = TCL_ERROR; - goto done; + return NULL; } if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { - result = TCL_ERROR; - goto done; + return NULL; } namespacePtr = iPtr->varFramePtr->nsPtr; @@ -1488,13 +1575,7 @@ TclCompEvalObj( */ runCompiledObj: - codePtr->refCount++; - result = TclExecuteByteCode(interp, codePtr); - codePtr->refCount--; - if (codePtr->refCount <= 0) { - TclCleanupByteCode(codePtr); - } - goto done; + return codePtr; } recompileObj: @@ -1516,11 +1597,7 @@ TclCompEvalObj( codePtr->localCachePtr = iPtr->varFramePtr->localCachePtr; codePtr->localCachePtr->refCount++; } - goto runCompiledObj; - - done: - iPtr->numLevels--; - return result; + goto runCompiledObj; } /* @@ -1687,6 +1764,23 @@ TclExecuteByteCode( #define WriteTraced(varPtr) ((varPtr)->flags & VAR_TRACED_WRITE) /* + * Bottom of allocated stack holds the NR data + */ + + int initLevel; + + /* NR_TEBC */ + + BottomData *bottomPtr; +#if USE_NR_TEBC + BottomData *oldBottomPtr = NULL; + + /* for tailcall support */ + Namespace *lookupNsPtr = NULL; + Tcl_Obj *tailObjPtr = NULL; +#endif + + /* * Constants: variables that do not change during the execution, used * sporadically. */ @@ -1706,11 +1800,11 @@ TclExecuteByteCode( ptrdiff_t *catchTop; register Tcl_Obj **tosPtr; /* Cached pointer to top of evaluation * stack. */ - register unsigned char *pc = codePtr->codeStart; - /* The current program counter. */ + register unsigned char *pc; /* The current program counter. */ int instructionCount = 0; /* Counter that is used to work out when to * call Tcl_AsyncReady() */ - Tcl_Obj *expandNestList = NULL; + Tcl_Obj *auxObjList; /* Linked list of aux data, used for {*} and + * for same-level NR calls. */ int checkInterp = 0; /* Indicates when a check of interp readyness * is necessary. Set by CACHE_STACK_INFO() */ @@ -1739,11 +1833,11 @@ TclExecuteByteCode( int traceInstructions = (tclTraceExec == 3); char cmdNameBuf[21]; #endif - char *curInstName = NULL; - + char *curInstName; + /* - * The execution uses a unified stack: first the catch stack, immediately - * above it a CmdFrame, then the execution stack. + * The execution uses a unified stack: first a BottomData, immediately + * above it a CmdFrame, then the catch stack, then the execution stack. * * Make sure the catch stack is large enough to hold the maximum number of * catch commands that could ever be executing at the same time (this will @@ -1751,30 +1845,115 @@ TclExecuteByteCode( * execution stack is large enough to execute this ByteCode. */ - catchTop = initCatchTop = (ptrdiff_t *) ( - GrowEvaluationStack(iPtr->execEnvPtr, - codePtr->maxExceptDepth + sizeof(CmdFrame) + - codePtr->maxStackDepth, 0) - 1); - bcFramePtr = (CmdFrame *) (initCatchTop + codePtr->maxExceptDepth + 1); - tosPtr = initTosPtr = ((Tcl_Obj **) (bcFramePtr + 1)) - 1; - esPtr = iPtr->execEnvPtr->execStackPtr; - /* - * TIP #280: Initialize the frame. Do not push it yet. + * NR_TEBC */ + +#if USE_NR_TEBC + nonRecursiveCallStart: +#endif + codePtr->refCount++; + bottomPtr = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, + sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) + + codePtr->maxStackDepth, 0); + curInstName = NULL; + auxObjList = NULL; + initLevel = 1; + +#if USE_NR_TEBC + NR_DATA_INIT(); /* record this level's data */ + + nonRecursiveCallReturn: +#endif + bcFramePtr = (CmdFrame *) (bottomPtr + 1); + initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; + initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); + esPtr = iPtr->execEnvPtr->execStackPtr; - bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) - ? TCL_LOCATION_PREBC : TCL_LOCATION_BC); - bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1); - bcFramePtr->framePtr = iPtr->framePtr; - bcFramePtr->nextPtr = iPtr->cmdFramePtr; - bcFramePtr->nline = 0; - bcFramePtr->line = NULL; + namespacePtr = iPtr->varFramePtr->nsPtr; + compiledLocals = iPtr->varFramePtr->compiledLocals; - bcFramePtr->data.tebc.codePtr = codePtr; - bcFramePtr->data.tebc.pc = NULL; - bcFramePtr->cmd.str.cmd = NULL; - bcFramePtr->cmd.str.len = 0; + if (initLevel) { + initLevel = 0; + pc = codePtr->codeStart; + catchTop = initCatchTop; + tosPtr = initTosPtr; + + /* + * TIP #280: Initialize the frame. Do not push it yet. + */ + + bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) + ? TCL_LOCATION_PREBC : TCL_LOCATION_BC); + bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1); + bcFramePtr->framePtr = iPtr->framePtr; + bcFramePtr->nextPtr = iPtr->cmdFramePtr; + bcFramePtr->nline = 0; + bcFramePtr->line = NULL; + + bcFramePtr->data.tebc.codePtr = codePtr; + bcFramePtr->data.tebc.pc = NULL; + bcFramePtr->cmd.str.cmd = NULL; + bcFramePtr->cmd.str.len = 0; +#if USE_NR_TEBC + } else if (tailObjPtr) { + /* + * A request to perform a tailcall; a frame has already been dropped, + * so we just have to ... + * (Note that we already have a refcount for tailObjPtr!) + */ + + *++tosPtr = tailObjPtr; + tailObjPtr = NULL; + iPtr->lookupNsPtr = lookupNsPtr; + lookupNsPtr = NULL; + + /* + * Fake pc, INST_EVAL STK will fix this and resume properly + */ + pc--; + goto tailCallEntryPoint; +#endif + } else { + /* + * Returning from a non-recursive call. State is already completely + * reset, now process the return. + */ + + if (result == TCL_OK) { + /* + * Reset the interp's result to avoid possible duplications of + * large objects [Bug 781585]. We do not call Tcl_ResetResult + * to avoid any side effects caused by the resetting of + * errorInfo and errorCode [Bug 804681], which are not needed + * here. We chose instead to manipulate the interp's object + * result directly. + * + * Note that the result object is now in objResultPtr, it + * keeps the refCount it had in its role of + * iPtr->objResultPtr. + */ + +#ifndef TCL_COMPILE_DEBUG + if (*pc == INST_POP) { + pc++; + } else { +#endif + objResultPtr = Tcl_GetObjResult(interp); + *(++tosPtr) = objResultPtr; + + TclNewObj(objResultPtr); + Tcl_IncrRefCount(objResultPtr); + iPtr->objResultPtr = objResultPtr; +#ifndef TCL_COMPILE_DEBUG + } +#endif + } else { + cleanup = 0; /* already cleaned up */ + pc--; /* was pointing to next instruction */ + goto processExceptionReturn; + } + } #ifdef TCL_COMPILE_DEBUG if (tclTraceExec >= 2) { @@ -1788,9 +1967,6 @@ TclExecuteByteCode( iPtr->stats.numExecutions++; #endif - namespacePtr = iPtr->varFramePtr->nsPtr; - compiledLocals = iPtr->varFramePtr->compiledLocals; - /* * Loop executing instructions until a "done" instruction, a TCL_RETURN, * or some error. @@ -1866,7 +2042,7 @@ TclExecuteByteCode( */ ValidatePcAndStackTop(codePtr, pc, CURR_DEPTH, 0, - /*checkStack*/ expandNestList == NULL); + /*checkStack*/ auxObjList == NULL); if (traceInstructions) { fprintf(stdout, "%2d: %2d ", iPtr->numLevels, (int) CURR_DEPTH); TclPrintInstruction(codePtr, pc); @@ -1920,7 +2096,7 @@ TclExecuteByteCode( } } - TCL_DTRACE_INST_NEXT(); + TCL_DTRACE_INST_NEXT(); /* * These two instructions account for 26% of all instructions (according @@ -2251,7 +2427,7 @@ TclExecuteByteCode( case INST_EXPAND_START: { /* - * Push an element to the expandNestList. This records the current + * Push an element to the auxObjList. This records the current * stack depth - i.e., the point in the stack where the expanded * command starts. * @@ -2267,8 +2443,7 @@ TclExecuteByteCode( TclNewObj(objPtr); objPtr->internalRep.twoPtrValue.ptr1 = (void *) CURR_DEPTH; - objPtr->internalRep.twoPtrValue.ptr2 = (void *) expandNestList; - expandNestList = objPtr; + PUSH_AUX_OBJ(objPtr); NEXT_INST_F(1, 0, 0); } @@ -2301,14 +2476,15 @@ TclExecuteByteCode( length = objc + (codePtr->maxStackDepth - TclGetInt4AtPtr(pc+1)); DECACHE_STACK_INFO(); - moved = (GrowEvaluationStack(iPtr->execEnvPtr, length, 1) - 1) - - (Tcl_Obj **) initCatchTop; + moved = GrowEvaluationStack(iPtr->execEnvPtr, length, 1) + - (Tcl_Obj **) bottomPtr; if (moved) { /* * Change the global data to point to the new stack. */ + bottomPtr = (BottomData *) (((Tcl_Obj **)bottomPtr) + moved); initCatchTop += moved; catchTop += moved; initTosPtr += moved; @@ -2335,15 +2511,134 @@ TclExecuteByteCode( */ int objc, pcAdjustment; + Tcl_Obj **objv; + + case INST_EXPR_STK: { + /* + * Moved here to support transforming the eval of an expression to + * a non-recursive TEBC call. + */ + +#if (USE_NR_TEBC) + + pcAdjustment = 1; + cleanup = 1; + bcFramePtr->data.tebc.pc = (char *) pc; + iPtr->cmdFramePtr = bcFramePtr; + DECACHE_STACK_INFO(); + TEBC_DATA(iPtr) = CompileExprObj(interp, OBJ_AT_TOS); + CACHE_STACK_INFO(); + goto tebc_do_exec; +#else + Tcl_Obj *objPtr, *valuePtr; + + objPtr = OBJ_AT_TOS; + + DECACHE_STACK_INFO(); + /*Tcl_ResetResult(interp);*/ + result = Tcl_ExprObj(interp, objPtr, &valuePtr); + CACHE_STACK_INFO(); + if (result == TCL_OK) { + objResultPtr = valuePtr; + TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(objPtr)), valuePtr); + NEXT_INST_F(1, 1, -1); /* Already has right refct. */ + } else { + TRACE_WITH_OBJ(("\"%.30s\" => ERROR: ", O2S(objPtr)), + Tcl_GetObjResult(interp)); + cleanup = 1; + goto checkForCatch; + } +#endif + } + + + tailCallEntryPoint: + case INST_EVAL_STK: { + /* + * Moved here to support transforming the eval of objects to a + * simple command invocation (for canonical lists) or a + * non-recursive TEBC call (compiled scripts). + */ + + Tcl_Obj *objPtr = OBJ_AT_TOS; + ByteCode *newCodePtr; + + pcAdjustment = 1; + cleanup = 1; + + if (objPtr->typePtr == &tclListType) { /* is a list... */ + List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; + + if (objPtr->bytes == NULL || /* ...without a string rep */ + listRepPtr->canonicalFlag) {/* ...or that is canonical */ + objc = listRepPtr->elemCount; + objv = &listRepPtr->elements; + goto doInvocationFromEval; + } + } + + /* + * TIP #280: The invoking context is left NULL for a dynamically + * constructed command. We cannot match its lines to the outer + * context. + */ + + DECACHE_STACK_INFO(); + newCodePtr = TclCompileObj(interp, objPtr, NULL, 0); + if (newCodePtr) { + /* + * Run the bytecode in this same TEBC instance! + */ +#if (USE_NR_TEBC) + bcFramePtr->data.tebc.pc = (char *) pc; + iPtr->cmdFramePtr = bcFramePtr; + TEBC_DATA(iPtr) = newCodePtr; + goto tebc_do_exec; +#else + result = TclExecuteByteCode(interp, newCodePtr); + CACHE_STACK_INFO(); + + if (result == TCL_OK) { + /* + * Normal return; push the eval's object result. + */ + + objResultPtr = Tcl_GetObjResult(interp); + TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(objPtr)), + Tcl_GetObjResult(interp)); + + /* + * Reset the interp's result to avoid possible duplications of + * large objects [Bug 781585]. We do not call Tcl_ResetResult to + * avoid any side effects caused by the resetting of errorInfo and + * errorCode [Bug 804681], which are not needed here. We chose + * instead to manipulate the interp's object result directly. + * + * Note that the result object is now in objResultPtr, it keeps + * the refCount it had in its role of iPtr->objResultPtr. + */ + + TclNewObj(objPtr); + Tcl_IncrRefCount(objPtr); + iPtr->objResultPtr = objPtr; + NEXT_INST_F(1, 1, -1); + } +#endif + } + + /* + * Compilation failed, error + */ + + result = TCL_ERROR; + goto processExceptionReturn; + } case INST_INVOKE_EXPANDED: { - Tcl_Obj *objPtr = expandNestList; - - expandNestList = (Tcl_Obj *) objPtr->internalRep.twoPtrValue.ptr2; objc = CURR_DEPTH - - (ptrdiff_t) objPtr->internalRep.twoPtrValue.ptr1; - TclDecrRefCount(objPtr); + - (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1; + POP_AUX_OBJ(); } if (objc) { @@ -2369,7 +2664,9 @@ TclExecuteByteCode( doInvocation: { - Tcl_Obj **objv = &OBJ_AT_DEPTH(objc-1); + objv = &OBJ_AT_DEPTH(objc-1); + cleanup = objc; + doInvocationFromEval: #ifdef TCL_COMPILE_DEBUG if (tclTraceExec >= 2) { @@ -2392,14 +2689,7 @@ TclExecuteByteCode( #endif /*TCL_COMPILE_DEBUG*/ /* - * Reset the instructionCount variable, since we're about to check - * for async stuff anyway while processing TclEvalObjvInternal. - */ - - instructionCount = 1; - - /* - * Finally, let TclEvalObjvInternal handle the command. + * Finally, let Tcl_EvalObjv handle the command. * * TIP #280: Record the last piece of info needed by * 'TclGetSrcInfoForPc', and push the frame. @@ -2407,10 +2697,62 @@ TclExecuteByteCode( bcFramePtr->data.tebc.pc = (char *) pc; iPtr->cmdFramePtr = bcFramePtr; + + /* + * Reset the instructionCount variable, since we're about to check + * for async stuff anyway while processing Tcl_EvalObjv + */ + + instructionCount = 1; + DECACHE_STACK_INFO(); - result = TclEvalObjvInternal(interp, objc, objv, - /* call from TEBC */(char *) -1, -1, 0); + + TEBC_CALL(iPtr) = 1; + result = Tcl_EvalObjv(interp, objc, objv, TCL_EVAL_NOERR); CACHE_STACK_INFO(); +#if (USE_NR_TEBC) + switch (TEBC_CALL(iPtr)) { + case TEBC_DO_EXEC: { + tebc_do_exec: + /* + * A request to execute a bytecode came back. We save + * the current state and restart at the top. + */ + assert((result == TCL_OK)); + TEBC_CALL(iPtr) = 0; + pc += pcAdjustment; + NR_DATA_BURY(); /* this level's state variables */ + codePtr = TEBC_DATA(iPtr); + result = TCL_OK; + goto nonRecursiveCallStart; + } + case TEBC_DO_TAILCALL: { + /* + * A request to perform a tailcall: save the current + * namespace, drop a frame and eval the passed listObj + * in the previous frame while looking up the command + * in the current namespace. Read it again. + * + * We take over tailObjPtr's refcount! + */ + + assert((result == TCL_OK)); + TEBC_CALL(iPtr) = 0; + tailObjPtr = TEBC_DATA(iPtr); + if (catchTop != initCatchTop) { + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + Tcl_DecrRefCount(tailObjPtr); + tailObjPtr = NULL; + goto checkForCatch; + } + lookupNsPtr = iPtr->varFramePtr->nsPtr; + result = TCL_OK; + goto abnormalReturn; /* drop a level */ + } + } +#endif iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; if (result == TCL_OK) { @@ -2418,7 +2760,7 @@ TclExecuteByteCode( #ifndef TCL_COMPILE_DEBUG if (*(pc+pcAdjustment) == INST_POP) { - NEXT_INST_V((pcAdjustment+1), objc, 0); + NEXT_INST_V((pcAdjustment+1), cleanup, 0); } #endif /* @@ -2447,9 +2789,8 @@ TclExecuteByteCode( TclNewObj(objPtr); Tcl_IncrRefCount(objPtr); iPtr->objResultPtr = objPtr; - NEXT_INST_V(pcAdjustment, objc, -1); + NEXT_INST_V(pcAdjustment, cleanup, -1); } else { - cleanup = objc; goto processExceptionReturn; } } @@ -2548,74 +2889,6 @@ TclExecuteByteCode( #endif } - case INST_EVAL_STK: { - /* - * Note to maintainers: it is important that INST_EVAL_STK pop its - * argument from the stack before jumping to checkForCatch! DO NOT - * OPTIMISE! - */ - - Tcl_Obj *objPtr = OBJ_AT_TOS; - - DECACHE_STACK_INFO(); - - /* - * TIP #280: The invoking context is left NULL for a dynamically - * constructed command. We cannot match its lines to the outer - * context. - */ - - result = TclCompEvalObj(interp, objPtr, NULL, 0); - CACHE_STACK_INFO(); - if (result == TCL_OK) { - /* - * Normal return; push the eval's object result. - */ - - objResultPtr = Tcl_GetObjResult(interp); - TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(objPtr)), - Tcl_GetObjResult(interp)); - - /* - * Reset the interp's result to avoid possible duplications of - * large objects [Bug 781585]. We do not call Tcl_ResetResult to - * avoid any side effects caused by the resetting of errorInfo and - * errorCode [Bug 804681], which are not needed here. We chose - * instead to manipulate the interp's object result directly. - * - * Note that the result object is now in objResultPtr, it keeps - * the refCount it had in its role of iPtr->objResultPtr. - */ - - TclNewObj(objPtr); - Tcl_IncrRefCount(objPtr); - iPtr->objResultPtr = objPtr; - NEXT_INST_F(1, 1, -1); - } else { - cleanup = 1; - goto processExceptionReturn; - } - } - - case INST_EXPR_STK: { - Tcl_Obj *objPtr, *valuePtr; - - objPtr = OBJ_AT_TOS; - DECACHE_STACK_INFO(); - /*Tcl_ResetResult(interp);*/ - result = Tcl_ExprObj(interp, objPtr, &valuePtr); - CACHE_STACK_INFO(); - if (result == TCL_OK) { - objResultPtr = valuePtr; - TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(objPtr)), valuePtr); - NEXT_INST_F(1, 1, -1); /* Already has right refct. */ - } else { - TRACE_WITH_OBJ(("\"%.30s\" => ERROR: ", O2S(objPtr)), - Tcl_GetObjResult(interp)); - goto checkForCatch; - } - } - /* * --------------------------------------------------------- * Start of INST_LOAD instructions. @@ -5043,8 +5316,7 @@ TclExecuteByteCode( invalid = 0; } if (invalid) { - Tcl_SetObjResult(interp, - Tcl_NewStringObj("negative shift argument", -1)); + Tcl_SetResult(interp, "negative shift argument", TCL_STATIC); result = TCL_ERROR; goto checkForCatch; } @@ -5078,8 +5350,7 @@ TclExecuteByteCode( * place to draw the line. */ - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "integer value too large to represent", -1)); + Tcl_SetResult(interp, "integer value too large to represent", TCL_STATIC); result = TCL_ERROR; goto checkForCatch; } @@ -5771,8 +6042,7 @@ TclExecuteByteCode( } } if (type2 == TCL_NUMBER_BIG) { - Tcl_SetObjResult(interp, - Tcl_NewStringObj("exponent too large", -1)); + Tcl_SetResult(interp, "exponent too large", TCL_STATIC); result = TCL_ERROR; goto checkForCatch; } @@ -6207,8 +6477,7 @@ TclExecuteByteCode( break; case INST_EXPON: if (big2.used > 1) { - Tcl_SetObjResult(interp, - Tcl_NewStringObj("exponent too large", -1)); + Tcl_SetResult(interp, "exponent too large", TCL_STATIC); mp_clear(&big1); mp_clear(&big2); mp_clear(&bigResult); @@ -7222,7 +7491,7 @@ TclExecuteByteCode( */ divideByZero: - Tcl_SetObjResult(interp, Tcl_NewStringObj("divide by zero", -1)); + Tcl_SetResult(interp, "divide by zero", TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", NULL); result = TCL_ERROR; @@ -7234,8 +7503,7 @@ TclExecuteByteCode( */ exponOfZero: - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "exponentiation of zero by negative power", -1)); + Tcl_SetResult(interp, "exponentiation of zero by negative power", TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", "exponentiation of zero by negative power", NULL); result = TCL_ERROR; @@ -7361,13 +7629,13 @@ TclExecuteByteCode( * INST_BEGIN_CATCH. */ - while ((expandNestList != NULL) && ((catchTop == initCatchTop) || - (*catchTop <= - (ptrdiff_t) expandNestList->internalRep.twoPtrValue.ptr1))) { - Tcl_Obj *objPtr = expandNestList->internalRep.twoPtrValue.ptr2; - - TclDecrRefCount(expandNestList); - expandNestList = objPtr; + while (auxObjList) { + if ((catchTop != initCatchTop) && + (*catchTop > + (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1)) { + break; + } + POP_AUX_OBJ(); } /* @@ -7417,7 +7685,7 @@ TclExecuteByteCode( /* * This is only possible when compiling a [catch] that sends its * script to INST_EVAL. Cannot correct the compiler without - * breakingcompat with previous .tbc compiled scripts. + * breaking compat with previous .tbc compiled scripts. */ #ifdef TCL_COMPILE_DEBUG @@ -7465,22 +7733,22 @@ TclExecuteByteCode( abnormalReturn: TCL_DTRACE_INST_LAST(); + /* + * Clear all expansions and same-level NR calls. + * + * Note that expansion markers have a NULL type; avoid removing other + * markers. + */ + + while (auxObjList) { + POP_AUX_OBJ(); + } while (tosPtr > initTosPtr) { Tcl_Obj *objPtr = POP_OBJECT(); Tcl_DecrRefCount(objPtr); } - /* - * Clear all expansions. - */ - - while (expandNestList) { - Tcl_Obj *objPtr = expandNestList->internalRep.twoPtrValue.ptr2; - - TclDecrRefCount(expandNestList); - expandNestList = objPtr; - } if (tosPtr < initTosPtr) { fprintf(stderr, "\nTclExecuteByteCode: abnormal return at pc %u: " @@ -7491,14 +7759,104 @@ TclExecuteByteCode( } } +#if USE_NR_TEBC + oldBottomPtr = bottomPtr->prevBottomPtr; +#endif + TclStackFree(interp, bottomPtr); /* free my stack */ + + if (--codePtr->refCount <= 0) { + TclCleanupByteCode(codePtr); + } + +#if USE_NR_TEBC + if (oldBottomPtr) { + /* + * Restore the state to what it was previous to this bytecode. + * + * NR_TEBC + */ + + bottomPtr = oldBottomPtr; /* back to old bc */ + + /* Please free anything that might still be on my new stack */ + result = TclEvalObjv_NR2(interp, result, bottomPtr->recordPtr); + assert((TOP_RECORD(iPtr) == bottomPtr->recordPtr)); + + /* restore state variables */ + NR_DATA_DIG(); + esPtr = iPtr->execEnvPtr->execStackPtr; + tosPtr = esPtr->tosPtr; + while (cleanup--) { + Tcl_Obj *objPtr = POP_OBJECT(); + Tcl_DecrRefCount(objPtr); + } + CACHE_STACK_INFO(); + goto nonRecursiveCallReturn; + } + + if (tailObjPtr && result == TCL_OK) { + /* + * The best we can do here is to add the tailcall at the FRONT of the + * callback list. This will be a real tailcall if we're lucky to have + * been called from TEOV (or similar), and not-quite-but-almost if + * called from eg TclOO (I think). + * The simplest way to add to the front is: + * (a) push a new record + * (b) add the tailcall as callback to the newly-created 2nd record + * (c) swap the two top records: old top is still top, newly created + * record is second + */ + + TEOV_record *rootPtr, *recordPtr; + + rootPtr = TOP_RECORD(iPtr); + PUSH_RECORD(iPtr, recordPtr); + TclNR_AddCallback(interp, TailcallFromTebc, tailObjPtr, lookupNsPtr, NULL, NULL); + + /* Now swap them! */ + recordPtr->nextPtr = rootPtr->nextPtr; + rootPtr->nextPtr = recordPtr; + TOP_RECORD(iPtr) = rootPtr; + } +#endif + return result; +} + +static int +TailcallFromTebc( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj *tailObjPtr = data[0]; + Namespace *lookupNsPtr = data[1]; + int objc; + Tcl_Obj **objv; + + Tcl_IncrRefCount(tailObjPtr); /* unshared per construction! */ + if (result != TCL_OK) { + goto done; + } + result = Tcl_ListObjGetElements(NULL, tailObjPtr, &objc, &objv); + if (result != TCL_OK) { + /* shouldn't happen */ + goto done; + } + /* - * Restore the stack to the state it had previous to this bytecode. + * Note that by this time the proc's frame SHOULD BE ALREADY POPPED! We do + * as if it was (don't know what happens with eg TclOO), ie, assume that + * are already in [uplevel 1] from the proc's callFrame.. */ - TclStackFree(interp, initCatchTop+1); + iPtr->lookupNsPtr = lookupNsPtr; + result = Tcl_EvalObjv(interp, objc, objv, TCL_EVAL_INVOKE); + + done: + Tcl_DecrRefCount(tailObjPtr); return result; -#undef iPtr } +#undef iPtr #ifdef TCL_COMPILE_DEBUG /* diff --git a/generic/tclHistory.c b/generic/tclHistory.c index 0a01019..ea1a8ff 100644 --- a/generic/tclHistory.c +++ b/generic/tclHistory.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHistory.c,v 1.11 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclHistory.c,v 1.12 2008/07/13 09:03:33 msofer Exp $ */ #include "tclInt.h" @@ -123,7 +123,7 @@ Tcl_RecordAndEvalObj( result = Tcl_GetCommandInfo(interp, "history", &info); - if (result && (info.objProc == TclObjInterpProc)) { + if (result && (info.deleteProc == TclProcDeleteProc)) { Proc *procPtr = (Proc *)(info.objClientData); call = (procPtr->cmdPtr->compileProc != TclCompileNoOp); } diff --git a/generic/tclInt.decls b/generic/tclInt.decls index e05298a..f5be70a 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.123 2008/07/08 17:52:17 dgp Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.124 2008/07/13 09:03:33 msofer Exp $ library tcl @@ -940,6 +940,30 @@ declare 237 generic { int TclResetCancellation(Tcl_Interp *interp, int force) } +# NRE functions for "rogue" extensions to exploit NRE; they will need to +# include NRE.h too. +declare 238 generic { + int TclEvalObjv_NR2(Tcl_Interp *interp, int result, + struct TEOV_record *rootPtr) +} +declare 239 generic { + Tcl_ObjCmdProc TclNRInterpProc +} +declare 240 generic { + int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj, + int skip, ProcErrorProc errorProc) +} +declare 241 generic { + struct TEOV_record * TclNRPushRecord(Tcl_Interp *interp) +} +declare 242 generic { + void TclNRPopAndFreeRecord(Tcl_Interp *interp) +} + +declare 243 generic { + int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, + const CmdFrame *invoker, int word) +} ############################################################################## # Define the platform specific internal Tcl interface. These functions are diff --git a/generic/tclInt.h b/generic/tclInt.h index 112421d..9e0f6ce 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.371 2008/06/13 05:45:12 mistachkin Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.372 2008/07/13 09:03:34 msofer Exp $ */ #ifndef _TCLINT @@ -1308,10 +1308,20 @@ typedef struct ExecStack { * currently active execution stack. */ +struct TEOV_record; + typedef struct ExecEnv { - ExecStack *execStackPtr; /* Points to the first item in the evaluation - * stack on the heap. */ - Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" objs. */ + ExecStack *execStackPtr; /* Points to the first item in the + * evaluation stack on the heap. */ + Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" + * objs. */ + struct TEOV_record *recordPtr; /* Top record in TEOV's stack */ + int tebcCall; /* used to distinguish tebc calls from + * other calls to TEOV, and other comms + * between TEBC and TEOV */ + ClientData tebcData; /* used by TEOV to pass data to its + * calling TEBC */ + } ExecEnv; /* @@ -1502,6 +1512,7 @@ typedef struct Command { * command. */ CommandTrace *tracePtr; /* First in list of all traces set for this * command. */ + Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */ } Command; /* @@ -1525,9 +1536,9 @@ typedef struct Command { * (these last two flags are defined in tcl.h) */ -#define CMD_IS_DELETED 0x1 -#define CMD_TRACE_ACTIVE 0x2 -#define CMD_HAS_EXEC_TRACES 0x4 +#define CMD_IS_DELETED 0x1 +#define CMD_TRACE_ACTIVE 0x2 +#define CMD_HAS_EXEC_TRACES 0x4 /* *---------------------------------------------------------------- @@ -2469,6 +2480,10 @@ MODULE_SCOPE char tclEmptyString; *---------------------------------------------------------------- */ +MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; +MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); + MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); MODULE_SCOPE int TclArraySet(Tcl_Interp *interp, @@ -2481,6 +2496,8 @@ MODULE_SCOPE double TclCeil(mp_int *a); MODULE_SCOPE int TclCheckBadOctal(Tcl_Interp *interp,const char *value); MODULE_SCOPE int TclChanCaughtErrorBypass(Tcl_Interp *interp, Tcl_Channel chan); +MODULE_SCOPE int TclClearRootEnsemble(ClientData data[], + Tcl_Interp *interp, int result); MODULE_SCOPE void TclCleanupLiteralTable(Tcl_Interp *interp, LiteralTable *tablePtr); MODULE_SCOPE int TclDoubleDigits(char *buf, double value, int *signum); @@ -2614,9 +2631,6 @@ MODULE_SCOPE void TclParseInit(Tcl_Interp *interp, const char *string, MODULE_SCOPE int TclParseAllWhiteSpace(const char *src, int numBytes); MODULE_SCOPE int TclProcessReturn(Tcl_Interp *interp, int code, int level, Tcl_Obj *returnOpts); -#ifndef TCL_NO_STACK_CHECK -MODULE_SCOPE int TclpGetCStackParams(int **stackBoundPtr); -#endif MODULE_SCOPE int TclpObjLstat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf); MODULE_SCOPE Tcl_Obj * TclpTempFileName(void); MODULE_SCOPE Tcl_Obj * TclNewFSPathObj(Tcl_Obj *dirPtr, const char *addStrRep, @@ -3886,6 +3900,39 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, ? 1 : 0))) +/* + *---------------------------------------------------------------- + * Allocator for small structs (<=sizeof(Tcl_Obj)) using the Tcl_Obj + * pool. Only checked at compile time. + * + * ONLY USE FOR CONSTANT nBytes: if you do and nBytes is too large, the + * compiler will error out with "duplicate case value" (thanks dkf!). If the + * size is dynamic, a panic will be compiled in for the wrong case. + * + * DO NOT LET THEM CROSS THREAD BOUNDARIES + */ + +#define TclSmallAlloc(nbytes, memPtr) \ + { \ + Tcl_Obj *objPtr; \ + switch ((nbytes)>sizeof(Tcl_Obj)) { \ + case (2 +((nbytes)>sizeof(Tcl_Obj))): \ + case 3: \ + case 1: \ + Tcl_Panic("TclSmallAlloc: nBytes too large!"); \ + case 0: (void)0; \ + } \ + TclIncrObjsAllocated(); \ + TclAllocObjStorage(objPtr); \ + memPtr = (ClientData) objPtr; \ + } + +#define TclSmallFree(memPtr) \ + TclFreeObjStorage((Tcl_Obj *) memPtr); \ + TclIncrObjsFreed() + + + #include "tclPort.h" #include "tclIntDecls.h" #include "tclIntPlatDecls.h" diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index d21bd4d..6dc36c0 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.117 2008/07/08 17:52:17 dgp Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.118 2008/07/13 09:03:35 msofer Exp $ */ #ifndef _TCLINTDECLS @@ -1076,6 +1076,38 @@ EXTERN void TclBackgroundException (Tcl_Interp * interp, /* 237 */ EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); #endif +#ifndef TclEvalObjv_NR2_TCL_DECLARED +#define TclEvalObjv_NR2_TCL_DECLARED +/* 238 */ +EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, + struct TEOV_record * rootPtr); +#endif +/* 239 */ +EXTERN Tcl_ObjCmdProc TclNRInterpProc; +#ifndef TclNRInterpProcCore_TCL_DECLARED +#define TclNRInterpProcCore_TCL_DECLARED +/* 240 */ +EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, + Tcl_Obj * procNameObj, int skip, + ProcErrorProc errorProc); +#endif +#ifndef TclNRPushRecord_TCL_DECLARED +#define TclNRPushRecord_TCL_DECLARED +/* 241 */ +EXTERN struct TEOV_record * TclNRPushRecord (Tcl_Interp * interp); +#endif +#ifndef TclNRPopAndFreeRecord_TCL_DECLARED +#define TclNRPopAndFreeRecord_TCL_DECLARED +/* 242 */ +EXTERN void TclNRPopAndFreeRecord (Tcl_Interp * interp); +#endif +#ifndef TclNREvalObjEx_TCL_DECLARED +#define TclNREvalObjEx_TCL_DECLARED +/* 243 */ +EXTERN int TclNREvalObjEx (Tcl_Interp * interp, + Tcl_Obj * objPtr, int flags, + const CmdFrame * invoker, int word); +#endif typedef struct TclIntStubs { int magic; @@ -1343,6 +1375,12 @@ typedef struct TclIntStubs { void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ + int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ + Tcl_ObjCmdProc *tclNRInterpProc; /* 239 */ + int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ + struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ + void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ + int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 243 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -2088,6 +2126,30 @@ extern CONST TclIntStubs *tclIntStubsPtr; #define TclResetCancellation \ (tclIntStubsPtr->tclResetCancellation) /* 237 */ #endif +#ifndef TclEvalObjv_NR2 +#define TclEvalObjv_NR2 \ + (tclIntStubsPtr->tclEvalObjv_NR2) /* 238 */ +#endif +#ifndef TclNRInterpProc +#define TclNRInterpProc \ + (*tclIntStubsPtr->tclNRInterpProc) /* 239 */ +#endif +#ifndef TclNRInterpProcCore +#define TclNRInterpProcCore \ + (tclIntStubsPtr->tclNRInterpProcCore) /* 240 */ +#endif +#ifndef TclNRPushRecord +#define TclNRPushRecord \ + (tclIntStubsPtr->tclNRPushRecord) /* 241 */ +#endif +#ifndef TclNRPopAndFreeRecord +#define TclNRPopAndFreeRecord \ + (tclIntStubsPtr->tclNRPopAndFreeRecord) /* 242 */ +#endif +#ifndef TclNREvalObjEx +#define TclNREvalObjEx \ + (tclIntStubsPtr->tclNREvalObjEx) /* 243 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index c681da5..c4f8515 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.86 2008/06/20 20:48:47 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.87 2008/07/13 09:03:35 msofer Exp $ */ #include "tclInt.h" @@ -196,6 +196,9 @@ static int AliasList(Tcl_Interp *interp, Tcl_Interp *slaveInterp); static int AliasObjCmd(ClientData dummy, Tcl_Interp *currentInterp, int objc, Tcl_Obj *const objv[]); +static int AliasNRCmd(ClientData dummy, + Tcl_Interp *currentInterp, int objc, + Tcl_Obj *const objv[]); static void AliasObjCmdDeleteProc(ClientData clientData); static Tcl_Interp * GetInterp(Tcl_Interp *interp, Tcl_Obj *pathPtr); static Tcl_Interp * GetInterp2(Tcl_Interp *interp, int objc, @@ -1482,9 +1485,15 @@ AliasCreate( Tcl_Preserve(slaveInterp); Tcl_Preserve(masterInterp); + if (slaveInterp == masterInterp) { + aliasPtr->slaveCmd = TclNR_CreateCommand(slaveInterp, + TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, + AliasObjCmdDeleteProc); + } else { aliasPtr->slaveCmd = Tcl_CreateObjCommand(slaveInterp, TclGetString(namePtr), AliasObjCmd, aliasPtr, AliasObjCmdDeleteProc); + } if (TclPreventAliasLoop(interp, slaveInterp, aliasPtr->slaveCmd) != TCL_OK) { @@ -1739,6 +1748,69 @@ AliasList( */ static int +AliasNRCmd( + ClientData clientData, /* Alias record. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument vector. */ +{ + Interp *iPtr = (Interp *) interp; + Alias *aliasPtr = clientData; + int prefc, cmdc, i; + Tcl_Obj **prefv, **cmdv; + int isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); + Tcl_Obj *listPtr; + List *listRep; + int flags = TCL_EVAL_INVOKE; + + /* + * Append the arguments to the command prefix and invoke the command in + * the target interp's global namespace. + */ + + prefc = aliasPtr->objc; + prefv = &aliasPtr->objPtr; + cmdc = prefc + objc - 1; + + listPtr = Tcl_NewListObj(cmdc, NULL); + listRep = listPtr->internalRep.twoPtrValue.ptr1; + listRep->elemCount = cmdc; + cmdv = &listRep->elements; + + prefv = &aliasPtr->objPtr; + memcpy(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *))); + memcpy(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *))); + + for (i=0; iensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = 1; + iPtr->ensembleRewrite.numInsertedObjs = prefc; + } else { + iPtr->ensembleRewrite.numInsertedObjs += prefc - 1; + } + + /* + * We are sending a 0-refCount obj, do not need a callback: it will be + * cleaned up automatically. But we may need to clear the rootEnsemble + * stuff ... + */ + + if (isRootEnsemble) { + TclNR_AddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); + } + return TclNREvalCmd(interp, listPtr, flags); +} + +static int AliasObjCmd( ClientData clientData, /* Alias record. */ Tcl_Interp *interp, /* Current interpreter. */ @@ -2542,10 +2614,24 @@ SlaveEval( if (objc == 1) { /* * TIP #280: Make invoker available to eval'd script. + * + * Do not let any intReps accross, with the exception of + * bytecodes. The intrep spoiling is due to happen anyway when + * compiling. */ Interp *iPtr = (Interp *) interp; - result = TclEvalObjEx(slaveInterp, objv[0], 0, iPtr->cmdFramePtr, 0); + + objPtr = objv[0]; + if (objPtr->typePtr + && (objPtr->typePtr != &tclByteCodeType) + && objPtr->typePtr->freeIntRepProc) { + (void) TclGetString(objPtr); + TclFreeIntRep(objPtr); + objPtr->typePtr = NULL; + } + + result = TclEvalObjEx(slaveInterp, objPtr, 0, iPtr->cmdFramePtr, 0); } else { objPtr = Tcl_ConcatObj(objc, objv); Tcl_IncrRefCount(objPtr); diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index cf39f90..a0a651b 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.164 2008/05/22 15:22:07 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.165 2008/07/13 09:03:35 msofer Exp $ */ #include "tclInt.h" @@ -169,6 +169,8 @@ static int GetNamespaceFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr); static int InvokeImportedCmd(ClientData clientData, Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); +static int InvokeImportedNRCmd(ClientData clientData, + Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); static int NamespaceChildrenCmd(ClientData dummy, Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); static int NamespaceCodeCmd(ClientData dummy, Tcl_Interp *interp, @@ -212,6 +214,8 @@ static int NamespaceWhichCmd(ClientData dummy, Tcl_Interp *interp, static int SetNsNameFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static int NsEnsembleImplementationCmd(ClientData clientData, Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); +static int NsEnsembleImplementationCmdNR(ClientData clientData, + Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); static void BuildEnsembleConfig(EnsembleConfig *ensemblePtr); static int NsEnsembleStringOrder(const void *strPtr1, const void *strPtr2); @@ -224,6 +228,8 @@ static void DupEnsembleCmdRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); static void StringOfEnsembleCmdRep(Tcl_Obj *objPtr); static void UnlinkNsPath(Namespace *nsPtr); +static TclNR_PostProc NsEval_Callback; + /* * This structure defines a Tcl object type that contains a namespace * reference. It is used in commands that take the name of a namespace as an @@ -1638,8 +1644,8 @@ DoImport( } dataPtr = (ImportedCmdData *) ckalloc(sizeof(ImportedCmdData)); - importedCmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&ds), - InvokeImportedCmd, dataPtr, DeleteImportedCmd); + importedCmd = TclNR_CreateCommand(interp, Tcl_DStringValue(&ds), + InvokeImportedCmd, InvokeImportedNRCmd, dataPtr, DeleteImportedCmd); dataPtr->realCmdPtr = cmdPtr; dataPtr->selfPtr = (Command *) importedCmd; dataPtr->selfPtr->compileProc = cmdPtr->compileProc; @@ -1876,6 +1882,25 @@ TclGetOriginalCommand( */ static int +InvokeImportedNRCmd( + ClientData clientData, /* Points to the imported command's + * ImportedCmdData structure. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* The argument objects. */ +{ + register ImportedCmdData *dataPtr = clientData; + register Command *realCmdPtr = dataPtr->realCmdPtr; + + if (!realCmdPtr->nreProc) { + return (*realCmdPtr->objProc)(realCmdPtr->objClientData, interp, + objc, objv); + } + return (*realCmdPtr->nreProc)(realCmdPtr->objClientData, interp, + objc, objv); +} + +static int InvokeImportedCmd( ClientData clientData, /* Points to the imported command's * ImportedCmdData structure. */ @@ -2772,6 +2797,16 @@ Tcl_NamespaceObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + return TclNR_CallObjProc(interp, TclNRNamespaceObjCmd, clientData, objc, objv); +} + +int +TclNRNamespaceObjCmd( + ClientData clientData, /* Arbitrary value passed to cmd. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ static const char *subCmds[] = { "children", "code", "current", "delete", "ensemble", "eval", "exists", "export", "forget", "import", @@ -3225,12 +3260,42 @@ NamespaceDeleteCmd( */ static int +NsEval_Callback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Namespace *namespacePtr = data[0]; + + if (result == TCL_ERROR) { + int length = strlen(namespacePtr->fullName); + int limit = 200; + int overflow = (length > limit); + char *cmd = data[1]; + + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in namespace %s \"%.*s%s\" script line %d)", + cmd, + (overflow ? limit : length), namespacePtr->fullName, + (overflow ? "..." : ""), interp->errorLine)); + } + + /* + * Restore the previous "current" namespace. + */ + + TclPopStackFrame(interp); + return result; +} + +static int NamespaceEvalCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + Interp *iPtr = (Interp *) interp; Tcl_Namespace *namespacePtr; CallFrame *framePtr, **framePtrPtr; Tcl_Obj *objPtr; @@ -3278,13 +3343,7 @@ NamespaceEvalCmd( framePtr->objv = objv; if (objc == 4) { - /* - * TIP #280: Make invoker available to eval'd script. - */ - - Interp *iPtr = (Interp *) interp; - - result = TclEvalObjEx(interp, objv[3], 0, iPtr->cmdFramePtr, 3); + objPtr = objv[3]; } else { /* * More than one argument: concatenate them together with spaces @@ -3293,31 +3352,14 @@ NamespaceEvalCmd( */ objPtr = Tcl_ConcatObj(objc-3, objv+3); - - /* - * TIP #280: Make invoking context available to eval'd script. - */ - - result = TclEvalObjEx(interp, objPtr, TCL_EVAL_DIRECT, NULL, 0); } - - if (result == TCL_ERROR) { - int length = strlen(namespacePtr->fullName); - int limit = 200; - int overflow = (length > limit); - - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (in namespace eval \"%.*s%s\" script line %d)", - (overflow ? limit : length), namespacePtr->fullName, - (overflow ? "..." : ""), interp->errorLine)); - } - + /* - * Restore the previous "current" namespace. + * TIP #280: Make invoking context available to eval'd script. */ - - TclPopStackFrame(interp); - return result; + + TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "eval", NULL, NULL); + return TclNREvalObjEx(interp, objPtr, 0, iPtr->cmdFramePtr, 3); } /* @@ -3675,6 +3717,7 @@ NamespaceInscopeCmd( Tcl_Namespace *namespacePtr; CallFrame *framePtr, **framePtrPtr; int i, result; + Tcl_Obj *cmdObjPtr; if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv, "name arg ?arg...?"); @@ -3712,10 +3755,10 @@ NamespaceInscopeCmd( */ if (objc == 4) { - result = Tcl_EvalObjEx(interp, objv[3], 0); + cmdObjPtr = objv[3]; } else { Tcl_Obj *concatObjv[2]; - register Tcl_Obj *listPtr, *cmdObjPtr; + register Tcl_Obj *listPtr; listPtr = Tcl_NewListObj(0, NULL); for (i = 4; i < objc; i++) { @@ -3728,27 +3771,11 @@ NamespaceInscopeCmd( concatObjv[0] = objv[3]; concatObjv[1] = listPtr; cmdObjPtr = Tcl_ConcatObj(2, concatObjv); - result = Tcl_EvalObjEx(interp, cmdObjPtr, TCL_EVAL_DIRECT); Tcl_DecrRefCount(listPtr); /* We're done with the list object. */ } - if (result == TCL_ERROR) { - int length = strlen(namespacePtr->fullName); - int limit = 200; - int overflow = (length > limit); - - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (in namespace inscope \"%.*s%s\" script line %d)", - (overflow ? limit : length), namespacePtr->fullName, - (overflow ? "..." : ""), interp->errorLine)); - } - - /* - * Restore the previous "current" namespace. - */ - - TclPopStackFrame(interp); - return result; + TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "inscope", NULL, NULL); + return TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); } /* @@ -5293,8 +5320,9 @@ Tcl_CreateEnsemble( ensemblePtr->subcommandDict = NULL; ensemblePtr->flags = flags; ensemblePtr->unknownHandler = NULL; - ensemblePtr->token = Tcl_CreateObjCommand(interp, name, - NsEnsembleImplementationCmd, ensemblePtr, DeleteEnsembleConfig); + ensemblePtr->token = TclNR_CreateCommand(interp, name, + NsEnsembleImplementationCmd, NsEnsembleImplementationCmdNR, + ensemblePtr, DeleteEnsembleConfig); ensemblePtr->next = (EnsembleConfig *) nsPtr->ensembles; nsPtr->ensembles = (Tcl_Ensemble *) ensemblePtr; @@ -6013,6 +6041,32 @@ NsEnsembleImplementationCmd( int objc, Tcl_Obj *const objv[]) { + return TclNR_CallObjProc(interp, NsEnsembleImplementationCmdNR, + clientData, objc, objv); +} + +int +TclClearRootEnsemble( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + + iPtr->ensembleRewrite.sourceObjs = NULL; + iPtr->ensembleRewrite.numRemovedObjs = 0; + iPtr->ensembleRewrite.numInsertedObjs = 0; + + return result; +} + +static int +NsEnsembleImplementationCmdNR( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ EnsembleConfig *ensemblePtr = clientData; /* The ensemble itself. */ Tcl_Obj **tempObjv; /* Space used to construct the list of @@ -6179,8 +6233,9 @@ NsEnsembleImplementationCmd( { Interp *iPtr = (Interp *) interp; - int isRootEnsemble; - Tcl_Obj *copyObj; + int isRootEnsemble, i, tempObjc; + Tcl_Obj *copyPtr; + List *listRepPtr; /* * Get the prefix that we're rewriting to. To do this we need to @@ -6189,8 +6244,23 @@ NsEnsembleImplementationCmd( * elements in the list. */ - copyObj = TclListObjCopy(NULL, prefixObj); - TclListObjGetElements(NULL, copyObj, &prefixObjc, &prefixObjv); + TclListObjGetElements(NULL, prefixObj, &prefixObjc, &prefixObjv); + + tempObjc = objc - 2 + prefixObjc; + copyPtr = Tcl_NewListObj(tempObjc, NULL); + if (tempObjc > 0) { + listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; + listRepPtr->elemCount = tempObjc; + tempObjv = &listRepPtr->elements; + + memcpy(tempObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); + memcpy(tempObjv+prefixObjc, objv+2, sizeof(Tcl_Obj *) * (objc-2)); + + for (i=0; i < tempObjc; i++) { + Tcl_IncrRefCount(tempObjv[i]); + } + } + Tcl_DecrRefCount(prefixObj); /* * Record what arguments the script sent in so that things like @@ -6214,36 +6284,15 @@ NsEnsembleImplementationCmd( } /* - * Allocate a workspace and build the list of arguments to pass to the - * target command in it. - */ - - tempObjv = (Tcl_Obj **) TclStackAlloc(interp, - (int) sizeof(Tcl_Obj *) * (objc - 2 + prefixObjc)); - memcpy(tempObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); - memcpy(tempObjv+prefixObjc, objv+2, sizeof(Tcl_Obj *) * (objc-2)); - - /* * Hand off to the target command. */ - result = Tcl_EvalObjv(interp, objc-2+prefixObjc, tempObjv, - TCL_EVAL_INVOKE); - - /* - * Clean up. - */ - - TclStackFree(interp, tempObjv); - Tcl_DecrRefCount(copyObj); if (isRootEnsemble) { - iPtr->ensembleRewrite.sourceObjs = NULL; - iPtr->ensembleRewrite.numRemovedObjs = 0; - iPtr->ensembleRewrite.numInsertedObjs = 0; + TclNR_AddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } + + return TclNREvalCmd(interp, copyPtr, TCL_EVAL_INVOKE); } - Tcl_DecrRefCount(prefixObj); - return result; unknownOrAmbiguousSubcommand: /* diff --git a/generic/tclProc.c b/generic/tclProc.c index 42f65ba..90cac16 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,11 +12,21 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.142 2008/06/13 05:45:14 mistachkin Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.143 2008/07/13 09:03:35 msofer Exp $ */ #include "tclInt.h" #include "tclCompile.h" +#include "tclNRE.h" + +typedef struct { + int isRootEnsemble; + Command cmd; + ExtraFrameInfo efi; +} ApplyExtraData; + +static TclNR_PostProc ApplyNR2; +static TclNR_PostProc InterpProcNR2; /* * Prototypes for static functions in this file @@ -47,6 +57,8 @@ static int ProcCompileProc(Tcl_Interp *interp, Proc *procPtr, const char *description, const char *procName, Proc **procPtrPtr); +static TclNR_PostProc Uplevel_Callback; + /* * The ProcBodyObjType type */ @@ -185,9 +197,8 @@ Tcl_ProcObjCmd( } Tcl_DStringAppend(&ds, procName, -1); - cmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&ds), - TclObjInterpProc, (ClientData) procPtr, TclProcDeleteProc); - + cmd = TclNR_CreateCommand(interp, Tcl_DStringValue(&ds), TclObjInterpProc, + TclNRInterpProc, (ClientData) procPtr, TclProcDeleteProc); Tcl_DStringFree(&ds); /* @@ -864,6 +875,27 @@ TclObjGetFrame( *---------------------------------------------------------------------- */ +static int +Uplevel_Callback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CallFrame *savedVarFramePtr = data[0]; + + if (result == TCL_ERROR) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"uplevel\" body line %d)", interp->errorLine)); + } + + /* + * Restore the variable frame, and return. + */ + + ((Interp *)interp)->varFramePtr = savedVarFramePtr; + return result; +} + /* ARGSUSED */ int Tcl_UplevelObjCmd( @@ -872,9 +904,21 @@ Tcl_UplevelObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + return TclNR_CallObjProc(interp, TclNRUplevelObjCmd, dummy, objc, objv); +} + +int +TclNRUplevelObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + register Interp *iPtr = (Interp *) interp; int result; CallFrame *savedVarFramePtr, *framePtr; + Tcl_Obj *objPtr; if (objc < 2) { uplevelSyntax: @@ -908,7 +952,7 @@ Tcl_UplevelObjCmd( */ if (objc == 1) { - result = Tcl_EvalObjEx(interp, objv[0], 0); + objPtr = objv[0]; } else { /* * More than one argument: concatenate them together with spaces @@ -916,22 +960,11 @@ Tcl_UplevelObjCmd( * object when it decrements its refcount after eval'ing it. */ - Tcl_Obj *objPtr; - objPtr = Tcl_ConcatObj(objc, objv); - result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT); - } - if (result == TCL_ERROR) { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"uplevel\" body line %d)", interp->errorLine)); } - /* - * Restore the variable frame, and return. - */ - - iPtr->varFramePtr = savedVarFramePtr; - return result; + TclNR_AddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, NULL); + return TclNREvalObjEx(interp, objPtr, 0, NULL, 0); } /* @@ -963,7 +996,6 @@ TclFindProc( const char *procName) /* Name of desired procedure. */ { Tcl_Command cmd; - Tcl_Command origCmd; Command *cmdPtr; cmd = Tcl_FindCommand((Tcl_Interp *) iPtr, procName, NULL, /*flags*/ 0); @@ -972,14 +1004,7 @@ TclFindProc( } cmdPtr = (Command *) cmd; - origCmd = TclGetOriginalCommand(cmd); - if (origCmd != NULL) { - cmdPtr = (Command *) origCmd; - } - if (cmdPtr->objProc != TclObjInterpProc) { - return NULL; - } - return (Proc *) cmdPtr->objClientData; + return TclIsProc(cmdPtr); } /* @@ -1010,7 +1035,7 @@ TclIsProc( if (origCmd != NULL) { cmdPtr = (Command *) origCmd; } - if (cmdPtr->objProc == TclObjInterpProc) { + if (cmdPtr->deleteProc == TclProcDeleteProc) { return (Proc *) cmdPtr->objClientData; } return (Proc *) 0; @@ -1581,6 +1606,23 @@ PushProcCallFrame( return TCL_OK; } + +static int +TclNR_BC( + Tcl_Interp * interp, + ByteCode *codePtr, + TclNR_PostProc *postProcPtr, + Tcl_Obj *procNameObj, + ProcErrorProc errorProc) +{ + TEOV_record *recordPtr = TOP_RECORD(interp); + + recordPtr->type = TCL_NR_BC_TYPE; + recordPtr->data.codePtr = codePtr; + TclNR_AddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, NULL); + return TCL_OK; +} + /* *---------------------------------------------------------------------- * @@ -1610,6 +1652,10 @@ TclObjInterpProc( { int result; + /* + * Not used in the core; external interface for iTcl and XOTcl + */ + result = PushProcCallFrame(clientData, interp, objc, objv, /*isLambda*/ 0); if (result == TCL_OK) { return TclObjInterpProcCore(interp, objv[0], 1, &MakeProcError); @@ -1617,6 +1663,26 @@ TclObjInterpProc( return TCL_ERROR; } } + +int +TclNRInterpProc( + ClientData clientData, /* Record describing procedure to be + * interpreted. */ + register Tcl_Interp *interp,/* Interpreter in which procedure was + * invoked. */ + int objc, /* Count of number of arguments to this + * procedure. */ + Tcl_Obj *CONST objv[]) /* Argument value objects. */ +{ + int result; + + result = PushProcCallFrame(clientData, interp, objc, objv, /*isLambda*/ 0); + if (result == TCL_OK) { + return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError); + } else { + return TCL_ERROR; + } +} /* *---------------------------------------------------------------------- @@ -1646,14 +1712,59 @@ TclObjInterpProcCore( ProcErrorProc errorProc) /* How to convert results from the script into * results of the overall procedure. */ { + /* + * Not used in the core; external interface for TclOO + */ + + Interp *iPtr = (Interp *) interp; + TEOV_record record, *rootPtr; + int result; + + /* + * Put a top record NOT ON THE TCL STACK! Note that TclNRInterpProcCore + * assumes it can free the CallFrame in the error case, there cannot be + * anything else on top of that. We use a C-stack record, it could also be + * ckalloc'ed or anything else, just NOT TclStackAlloc. + */ + + rootPtr = TOP_RECORD(iPtr); + TOP_RECORD(iPtr) = &record; + result = TclNRInterpProcCore(interp, procNameObj, skip, errorProc); + TOP_RECORD(iPtr) = rootPtr; + + if (result == TCL_OK) { + result = TclExecuteByteCode(interp, record.data.codePtr); + result = TclEvalObjv_NR2(interp, result, rootPtr); + result = InterpProcNR2(&record.callbackPtr->data0, interp, result); + TclSmallFree(record.callbackPtr); + } + return result; +} + +int +TclNRInterpProcCore( + register Tcl_Interp *interp,/* Interpreter in which procedure was + * invoked. */ + Tcl_Obj *procNameObj, /* Procedure name for error reporting. */ + int skip, /* Number of initial arguments to be skipped, + * i.e., words in the "command name". */ + ProcErrorProc errorProc) /* How to convert results from the script into + * results of the overall procedure. */ +{ Interp *iPtr = (Interp *) interp; register Proc *procPtr = iPtr->varFramePtr->procPtr; int result; CallFrame *freePtr; + ByteCode *codePtr; result = InitArgsAndLocals(interp, procNameObj, skip); if (result != TCL_OK) { - goto procDone; + freePtr = iPtr->framePtr; + Tcl_PopCallFrame(interp); /* Pop but do not free. */ + TclStackFree(interp, freePtr->compiledLocals); + /* Free compiledLocals. */ + TclStackFree(interp, freePtr); /* Free CallFrame. */ + return TCL_ERROR; } #if defined(TCL_COMPILE_DEBUG) @@ -1703,36 +1814,37 @@ TclObjInterpProcCore( TclResetCancellation(interp, 0); procPtr->refCount++; - iPtr->numLevels++; + codePtr = procPtr->bodyPtr->internalRep.otherValuePtr; + if (TCL_DTRACE_PROC_ENTRY_ENABLED()) { + int l; + + l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 2 : 1; + TCL_DTRACE_PROC_ENTRY(TclGetString(procNameObj), + iPtr->varFramePtr->objc - l, + (Tcl_Obj **)(iPtr->varFramePtr->objv + l)); + } - if (TclInterpReady(interp) == TCL_ERROR) { - result = TCL_ERROR; - } else { - register ByteCode *codePtr = - procPtr->bodyPtr->internalRep.otherValuePtr; + TclNR_BC(interp, codePtr, InterpProcNR2, procNameObj, errorProc); + + return TCL_OK; +} - codePtr->refCount++; - if (TCL_DTRACE_PROC_ENTRY_ENABLED()) { - int l; - - l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 2 : 1; - TCL_DTRACE_PROC_ENTRY(TclGetString(procNameObj), - iPtr->varFramePtr->objc - l, - (Tcl_Obj **)(iPtr->varFramePtr->objv + l)); - } - result = TclExecuteByteCode(interp, codePtr); - if (TCL_DTRACE_PROC_RETURN_ENABLED()) { - TCL_DTRACE_PROC_RETURN(TclGetString(procNameObj), result); - } - codePtr->refCount--; - if (codePtr->refCount <= 0) { - TclCleanupByteCode(codePtr); - } +static int +InterpProcNR2( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Proc *procPtr = iPtr->varFramePtr->procPtr; + CallFrame *freePtr; + Tcl_Obj *procNameObj = data[0]; + ProcErrorProc errorProc = data[1]; + + if (TCL_DTRACE_PROC_RETURN_ENABLED()) { + TCL_DTRACE_PROC_RETURN(TclGetString(procNameObj), result); } - - iPtr->numLevels--; - procPtr->refCount--; - if (procPtr->refCount <= 0) { + if (--procPtr->refCount <= 0) { TclProcCleanupProc(procPtr); } @@ -1798,7 +1910,6 @@ TclObjInterpProcCore( TclGetString(r), r); } - procDone: /* * Free the stack-allocated compiled locals and CallFrame. It is important * to pop the call frame without freeing it first: the compiledLocals @@ -1812,6 +1923,7 @@ TclObjInterpProcCore( TclStackFree(interp, freePtr->compiledLocals); /* Free compiledLocals. */ TclStackFree(interp, freePtr); /* Free CallFrame. */ + return result; } @@ -2591,13 +2703,23 @@ Tcl_ApplyObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + return TclNR_CallObjProc(interp, TclNRApplyObjCmd, dummy, objc, objv); +} + + +int +TclNRApplyObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *CONST objv[]) /* Argument objects. */ +{ Interp *iPtr = (Interp *) interp; Proc *procPtr = NULL; Tcl_Obj *lambdaPtr, *nsObjPtr; int result, isRootEnsemble; - Command cmd; Tcl_Namespace *nsPtr; - ExtraFrameInfo efi; + ApplyExtraData *extraPtr; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "lambdaExpr ?arg1 arg2 ...?"); @@ -2615,6 +2737,12 @@ Tcl_ApplyObjCmd( } #define JOE_EXTENSION 0 +/* + * Note: this code is NOT FUNCTIONAL due to the NR implementation; DO NOT + * ENABLE! Leaving here as reminder to (a) TIP the suggestion, and (b) adapt + * the code. (MS) + */ + #if JOE_EXTENSION else { /* @@ -2641,8 +2769,21 @@ Tcl_ApplyObjCmd( procPtr = lambdaPtr->internalRep.twoPtrValue.ptr1; } - memset(&cmd, 0, sizeof(Command)); - procPtr->cmdPtr = &cmd; + /* + * Find the namespace where this lambda should run, and push a call frame + * for that namespace. Note that TclObjInterpProc() will pop it. + */ + + nsObjPtr = lambdaPtr->internalRep.twoPtrValue.ptr2; + result = TclGetNamespaceFromObj(interp, nsObjPtr, &nsPtr); + if (result != TCL_OK) { + return TCL_ERROR; + } + + extraPtr = TclStackAlloc(interp, sizeof(ApplyExtraData)); + memset(&extraPtr->cmd, 0, sizeof(Command)); + procPtr->cmdPtr = &extraPtr->cmd; + extraPtr->cmd.nsPtr = (Namespace *) nsPtr; /* * TIP#280 (semi-)HACK! @@ -2654,24 +2795,11 @@ Tcl_ApplyObjCmd( * 'hPtr', and lambda's never. */ - efi.length = 1; - efi.fields[0].name = "lambda"; - efi.fields[0].proc = NULL; - efi.fields[0].clientData = lambdaPtr; - cmd.clientData = &efi; - - /* - * Find the namespace where this lambda should run, and push a call frame - * for that namespace. Note that TclObjInterpProc() will pop it. - */ - - nsObjPtr = lambdaPtr->internalRep.twoPtrValue.ptr2; - result = TclGetNamespaceFromObj(interp, nsObjPtr, &nsPtr); - if (result != TCL_OK) { - return result; - } - - cmd.nsPtr = (Namespace *) nsPtr; + extraPtr->efi.length = 1; + extraPtr->efi.fields[0].name = "lambda"; + extraPtr->efi.fields[0].proc = NULL; + extraPtr->efi.fields[0].clientData = lambdaPtr; + extraPtr->cmd.clientData = &extraPtr->efi; isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); if (isRootEnsemble) { @@ -2681,18 +2809,43 @@ Tcl_ApplyObjCmd( } else { iPtr->ensembleRewrite.numInsertedObjs -= 1; } + extraPtr->isRootEnsemble = isRootEnsemble; result = PushProcCallFrame((ClientData) procPtr, interp, objc, objv, 1); if (result == TCL_OK) { - result = TclObjInterpProcCore(interp, objv[1], 2, &MakeLambdaError); + result = TclNRInterpProcCore(interp, objv[1], 2, &MakeLambdaError); + if (result == TCL_OK) { + /* Fix the recordPtr! */ + + TEOV_record *recordPtr = TOP_RECORD(iPtr); + recordPtr->callbackPtr->procPtr = ApplyNR2; + recordPtr->callbackPtr->data2 = extraPtr; + } } + if (result != TCL_OK) { + if (isRootEnsemble) { + iPtr->ensembleRewrite.sourceObjs = NULL; + } + TclStackFree(interp, extraPtr); + } + return result; +} - if (isRootEnsemble) { - iPtr->ensembleRewrite.sourceObjs = NULL; - iPtr->ensembleRewrite.numRemovedObjs = 0; - iPtr->ensembleRewrite.numInsertedObjs = 0; +static int +ApplyNR2( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + ApplyExtraData *extraPtr = data[2]; + + result = InterpProcNR2(data, interp, result); + + if (extraPtr->isRootEnsemble) { + ((Interp *) interp)->ensembleRewrite.sourceObjs = NULL; } + TclStackFree(interp, extraPtr); return result; } diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index b02c4d0..61e8ad1 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.155 2008/07/08 17:52:17 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.156 2008/07/13 09:03:35 msofer Exp $ */ #include "tclInt.h" @@ -307,6 +307,12 @@ static const TclIntStubs tclIntStubs = { TclInitVarHashTable, /* 235 */ TclBackgroundException, /* 236 */ TclResetCancellation, /* 237 */ + TclEvalObjv_NR2, /* 238 */ + &TclNRInterpProc, /* 239 */ + TclNRInterpProcCore, /* 240 */ + TclNRPushRecord, /* 241 */ + TclNRPopAndFreeRecord, /* 242 */ + TclNREvalObjEx, /* 243 */ }; static const TclIntPlatStubs tclIntPlatStubs = { @@ -1102,6 +1108,12 @@ static const TclStubs tclStubs = { Tcl_AppendPrintfToObj, /* 579 */ Tcl_CancelEval, /* 580 */ Tcl_Canceled, /* 581 */ + TclNR_CreateCommand, /* 582 */ + TclNR_EvalObj, /* 583 */ + TclNR_EvalObjv, /* 584 */ + TclNR_ObjProc, /* 585 */ + TclNR_AddCallback, /* 586 */ + TclNR_CallObjProc, /* 587 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index db390a1..d346d59 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.6 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.7 2008/07/13 09:03:35 msofer Exp $ */ #include "tclInt.h" @@ -255,10 +255,10 @@ ProcBodyTestProcObjCmd( /* * check that this is a procedure and not a builtin command: - * If a procedure, cmdPtr->objProc is TclObjInterpProc. + * If a procedure, cmdPtr->objClientData is TclIsProc(cmdPtr). */ - if (cmdPtr->objProc != TclGetObjInterpProc()) { + if (cmdPtr->objClientData != TclIsProc(cmdPtr)) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "command \"", fullName, "\" is not a Tcl procedure", NULL); return TCL_ERROR; diff --git a/tests/interp.test b/tests/interp.test index 7af5856..a9c9e8d 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.57 2008/06/20 20:48:49 dgp Exp $ +# RCS: @(#) $Id: interp.test,v 1.58 2008/07/13 09:03:35 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -2534,7 +2534,7 @@ test interp-29.3.1 {recursion limit} { }] interp delete $i set r -} {1 {too many nested evaluations (infinite loop?)} 48} +} {1 {too many nested evaluations (infinite loop?)} 49} test interp-29.3.2 {recursion limit} { set i [interp create] @@ -2546,7 +2546,7 @@ test interp-29.3.2 {recursion limit} { }] interp delete $i set r -} {1 {too many nested evaluations (infinite loop?)} 48} +} {1 {too many nested evaluations (infinite loop?)} 49} test interp-29.3.3 {recursion limit} { set i [interp create] @@ -2558,7 +2558,7 @@ test interp-29.3.3 {recursion limit} { }] interp delete $i set r -} {1 {too many nested evaluations (infinite loop?)} 48} +} {1 {too many nested evaluations (infinite loop?)} 49} test interp-29.3.4 {recursion limit error reporting} { interp create slave @@ -2769,7 +2769,7 @@ test interp-29.4.1 {recursion limit inheritance} { }] interp delete $i set r -} 49 +} 50 test interp-29.4.2 {recursion limit inheritance} { set i [interp create] @@ -2783,7 +2783,7 @@ test interp-29.4.2 {recursion limit inheritance} { }] interp delete $i set r -} 49 +} 50 test interp-29.5.1 {does slave recursion limit affect master?} { set before [interp recursionlimit {}] diff --git a/tests/parse.test b/tests/parse.test index e978907..edf37d6 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.31 2008/05/21 20:28:15 dgp Exp $ +# RCS: @(#) $Id: parse.test,v 1.32 2008/07/13 09:03:35 msofer Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -1025,7 +1025,7 @@ test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { interp create i load {} Tcltest i i eval {proc {} args {}} - interp recursionlimit i 3 + interp recursionlimit i 2 } -body { i eval {testevalex {[[]]}} } -cleanup { @@ -1045,7 +1045,7 @@ test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { interp create i i eval {proc {} args {}} - interp recursionlimit i 3 + interp recursionlimit i 2 } -body { i eval {subst {[[]]}} } -cleanup { diff --git a/tests/stack.test b/tests/stack.test index 2281c00..4a349fa 100644 --- a/tests/stack.test +++ b/tests/stack.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stack.test,v 1.22 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: stack.test,v 1.23 2008/07/13 09:03:36 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -25,8 +25,8 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint minStack2400 1 if {[testConstraint unix]} { - set stackSize [exec /bin/sh -c "ulimit -s"] - if {[string is integer $stackSize] && ($stackSize < 2400)} { + set stackSize [teststacklimit] + if {($stackSize > -1) && ($stackSize < 2400)} { puts stderr "WARNING: the default application stacksize of $stackSize\ may cause Tcl to\ncrash due to stack overflow before the\ recursion limit is reached.\nA minimum stacksize of 2400\ diff --git a/unix/Makefile.in b/unix/Makefile.in index b351ebe..a9d2211 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.240 2008/06/26 22:12:51 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.241 2008/07/13 09:03:37 msofer Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -957,6 +957,7 @@ COMPILEHDR=$(GENERIC_DIR)/tclCompile.h FSHDR=$(GENERIC_DIR)/tclFileSystem.h IOHDR=$(GENERIC_DIR)/tclIO.h MATHHDRS=$(GENERIC_DIR)/tommath.h $(GENERIC_DIR)/tclTomMath.h +NREHDR=$(GENERIC_DIR)/tclNRE.h regcomp.o: $(REGHDRS) $(GENERIC_DIR)/regcomp.c $(GENERIC_DIR)/regc_lex.c \ $(GENERIC_DIR)/regc_color.c $(GENERIC_DIR)/regc_locale.c \ @@ -984,7 +985,7 @@ tclAlloc.o: $(GENERIC_DIR)/tclAlloc.c tclAsync.o: $(GENERIC_DIR)/tclAsync.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclAsync.c -tclBasic.o: $(GENERIC_DIR)/tclBasic.c $(COMPILEHDR) $(MATHHDRS) +tclBasic.o: $(GENERIC_DIR)/tclBasic.c $(COMPILEHDR) $(MATHHDRS) $(NREHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclBasic.c tclBinary.o: $(GENERIC_DIR)/tclBinary.c @@ -1032,7 +1033,7 @@ tclEnv.o: $(GENERIC_DIR)/tclEnv.c tclEvent.o: $(GENERIC_DIR)/tclEvent.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclEvent.c -tclExecute.o: $(GENERIC_DIR)/tclExecute.c $(COMPILEHDR) $(MATHHDRS) +tclExecute.o: $(GENERIC_DIR)/tclExecute.c $(COMPILEHDR) $(MATHHDRS) $(NREHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclExecute.c tclFCmd.o: $(GENERIC_DIR)/tclFCmd.c @@ -1119,7 +1120,7 @@ tclLoadShl.o: $(UNIX_DIR)/tclLoadShl.c tclMain.o: $(GENERIC_DIR)/tclMain.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclMain.c -tclNamesp.o: $(GENERIC_DIR)/tclNamesp.c +tclNamesp.o: $(GENERIC_DIR)/tclNamesp.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclNamesp.c tclNotify.o: $(GENERIC_DIR)/tclNotify.c @@ -1191,7 +1192,7 @@ tclPosixStr.o: $(GENERIC_DIR)/tclPosixStr.c tclPreserve.o: $(GENERIC_DIR)/tclPreserve.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPreserve.c -tclProc.o: $(GENERIC_DIR)/tclProc.c $(COMPILEHDR) +tclProc.o: $(GENERIC_DIR)/tclProc.c $(COMPILEHDR) $(NREHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclProc.c tclRegexp.o: $(GENERIC_DIR)/tclRegexp.c $(TCLREHDRS) diff --git a/unix/configure b/unix/configure index 6a59f08..499a397 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,175 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +774,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +837,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +902,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +932,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1006,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1068,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1112,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1132,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1171,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1269,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1286,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1352,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1459,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1473,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1495,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1505,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1527,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1538,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1552,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1590,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1623,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1671,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1697,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1710,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1739,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1756,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1780,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1357,24 +1816,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1383,36 +1841,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1435,8 +1894,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1449,32 +1908,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1487,36 +1948,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1529,74 +2005,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1610,7 +2046,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1621,6 +2057,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1638,22 +2075,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1666,36 +2104,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1708,29 +2148,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1743,21 +2199,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1782,47 +2252,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1834,19 +2334,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1865,22 +2367,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1891,9 +2398,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1907,14 +2413,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1934,14 +2440,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1959,12 +2471,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1987,50 +2499,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2046,38 +2557,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2093,12 +2684,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2132,12 +2723,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2152,266 +2748,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2444,8 +2890,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2479,24 +2925,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2505,9 +2949,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2517,24 +2962,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2545,6 +2988,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2562,8 +3006,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2586,24 +3030,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2612,9 +3054,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2624,24 +3067,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2652,6 +3093,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2674,23 +3116,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2714,35 +3303,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2798,6 +3383,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2817,18 +3403,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2841,12 +3436,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2869,9 +3466,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2885,38 +3482,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2928,8 +3522,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2969,39 +3563,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3012,17 +3603,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3033,41 +3624,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3076,24 +3663,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3101,9 +3686,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3127,25 +3713,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3160,17 +3739,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3181,41 +3760,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3224,24 +3799,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3249,9 +3822,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3275,25 +3849,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3308,17 +3875,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3329,41 +3896,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3372,24 +3935,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3397,9 +3958,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3423,25 +3985,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3460,17 +4015,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3481,41 +4036,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3524,24 +4075,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3549,9 +4098,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3575,25 +4125,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3662,17 +4205,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3683,41 +4226,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3726,24 +4265,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3751,9 +4288,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3777,25 +4315,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3852,17 +4383,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3873,41 +4404,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3916,24 +4443,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3941,9 +4466,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3967,25 +4493,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4000,17 +4519,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4021,41 +4540,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4064,24 +4579,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4089,9 +4602,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4115,25 +4629,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4153,18 +4660,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4175,41 +4683,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4218,24 +4722,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4243,9 +4745,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4269,25 +4772,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4307,8 +4804,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4330,39 +4827,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4373,13 +4866,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4411,8 +4904,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4425,56 +4918,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4487,8 +4977,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4501,56 +4991,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4563,8 +5050,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4577,56 +5064,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4637,8 +5121,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4651,56 +5135,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4708,8 +5189,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4722,56 +5203,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4799,9 +5277,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4827,68 +5305,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4897,8 +5367,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 -echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 +echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6; } if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4925,68 +5395,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_attr_get_np -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_attr_get_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np) +#if defined __stub_pthread_attr_get_np || defined __stub___pthread_attr_get_np choke me -#else -char (*f) () = pthread_attr_get_np; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != pthread_attr_get_np; +return pthread_attr_get_np (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pthread_attr_get_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_pthread_attr_get_np=no + ac_cv_func_pthread_attr_get_np=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6; } if test $ac_cv_func_pthread_attr_get_np = yes; then tcl_ok=yes else @@ -4999,8 +5460,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_ATTR_GET_NP 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 -echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 +echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5023,8 +5484,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6; } if test $tcl_cv_grep_pthread_attr_get_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5033,8 +5494,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 -echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 +echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6; } if test "${ac_cv_func_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5061,68 +5522,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_getattr_np -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_getattr_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np) +#if defined __stub_pthread_getattr_np || defined __stub___pthread_getattr_np choke me -#else -char (*f) () = pthread_getattr_np; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != pthread_getattr_np; +return pthread_getattr_np (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pthread_getattr_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_pthread_getattr_np=no + ac_cv_func_pthread_getattr_np=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6; } if test $ac_cv_func_pthread_getattr_np = yes; then tcl_ok=yes else @@ -5135,8 +5587,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_GETATTR_NP 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 -echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 +echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5159,8 +5611,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6; } if test $tcl_cv_grep_pthread_getattr_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5176,9 +5628,9 @@ _ACEOF for ac_func in pthread_get_stacksize_np do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5204,68 +5656,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5280,8 +5724,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5289,15 +5733,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -5309,11 +5753,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -5342,8 +5786,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5370,76 +5814,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5456,46 +5891,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5506,8 +5938,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5524,62 +5956,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5590,41 +6019,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5633,24 +6058,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5658,9 +6081,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5684,25 +6108,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5735,8 +6152,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5763,68 +6180,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5832,8 +6240,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5860,73 +6268,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5939,56 +6338,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6001,8 +6397,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6029,68 +6425,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6098,8 +6485,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6126,73 +6513,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6205,56 +6583,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6267,15 +6642,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6285,12 +6660,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6309,8 +6684,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6323,32 +6698,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6361,27 +6738,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6390,31 +6781,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6424,8 +6815,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6449,40 +6840,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6496,24 +6884,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6540,16 +6928,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6562,56 +6950,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6651,8 +7036,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6665,25 +7050,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6709,8 +7096,8 @@ fi CC=${CC}_r ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6788,12 +7175,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6813,8 +7198,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6827,56 +7212,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6908,8 +7290,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6922,56 +7304,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7032,8 +7411,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7046,56 +7425,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7165,8 +7541,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7179,56 +7555,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7360,8 +7733,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7384,40 +7757,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7506,8 +7876,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7533,8 +7903,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7565,8 +7935,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7592,8 +7962,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7657,8 +8027,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7681,40 +8051,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7723,8 +8090,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7747,40 +8114,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7806,8 +8170,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7830,40 +8194,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7882,8 +8243,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7906,40 +8267,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7966,21 +8324,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8014,35 +8372,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8053,8 +8408,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8070,8 +8425,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8095,42 +8450,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8466,25 +8818,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8495,41 +8847,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8538,24 +8886,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8563,9 +8909,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8589,25 +8936,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8616,8 +8956,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8692,8 +9032,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8716,40 +9056,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8784,13 +9121,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8935,22 +9272,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8960,8 +9297,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -8996,11 +9333,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -9021,8 +9358,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9044,33 +9381,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9087,37 +9419,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9149,33 +9478,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9192,37 +9516,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9254,33 +9575,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9297,37 +9613,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9340,17 +9653,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9373,35 +9686,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9423,34 +9732,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9459,20 +9765,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9494,38 +9800,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9534,8 +9836,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9557,38 +9859,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9602,9 +9900,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9630,68 +9928,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9700,8 +9990,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9723,35 +10013,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9762,11 +10048,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9776,8 +10062,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9794,7 +10080,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9803,27 +10090,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9846,40 +10128,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9889,11 +10167,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9904,27 +10182,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -9940,8 +10213,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9949,27 +10224,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9982,13 +10271,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -10017,9 +10309,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10045,68 +10337,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10130,9 +10414,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10158,88 +10442,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10266,68 +10540,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10338,8 +10603,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10366,68 +10631,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10438,8 +10694,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10466,68 +10722,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10538,8 +10785,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10566,68 +10813,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10645,8 +10883,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10673,68 +10911,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10746,8 +10975,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10774,72 +11003,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10867,38 +11087,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10916,8 +11132,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10944,72 +11160,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11040,38 +11247,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11080,8 +11283,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11112,38 +11315,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11163,8 +11362,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11191,72 +11390,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11287,38 +11477,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11327,8 +11513,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11359,38 +11545,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11410,8 +11592,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11438,72 +11620,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11534,38 +11707,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11574,8 +11743,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11606,38 +11775,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11657,8 +11822,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11685,72 +11850,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11781,38 +11937,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11821,8 +11973,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11853,38 +12005,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11937,8 +12085,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11965,72 +12113,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12061,38 +12200,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12101,8 +12236,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12133,38 +12268,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12173,8 +12304,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12203,38 +12334,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12255,8 +12382,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12283,72 +12410,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12382,38 +12500,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12422,8 +12536,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12457,38 +12571,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12522,18 +12632,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12544,41 +12655,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12587,24 +12694,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12612,9 +12717,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12638,25 +12744,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12668,8 +12768,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12697,13 +12797,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12716,8 +12825,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12741,13 +12852,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12760,8 +12880,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12787,13 +12909,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12806,8 +12937,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12835,13 +12968,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12854,8 +12996,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12882,13 +13026,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12901,8 +13054,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12930,13 +13085,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12949,12 +13113,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12984,8 +13150,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13006,42 +13172,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13064,8 +13226,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13087,8 +13249,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13104,44 +13266,42 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13155,18 +13315,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13177,41 +13338,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13220,24 +13377,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13245,9 +13400,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13271,25 +13427,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13301,8 +13451,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13326,38 +13476,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13366,8 +13512,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13392,33 +13538,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13439,40 +13580,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13489,8 +13627,77 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13501,52 +13708,49 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#if !HAVE_DECL_TZNAME +extern char *tzname[]; #endif int main () { -atoi(*tzname); +return tzname[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_var_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -13563,9 +13767,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13591,68 +13795,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13662,8 +13858,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13684,38 +13880,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13724,8 +13916,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13746,38 +13938,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13790,8 +13978,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13814,38 +14002,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13856,8 +14040,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13880,38 +14064,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13927,9 +14107,8 @@ _ACEOF # in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13951,33 +14130,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13995,40 +14169,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14043,8 +14214,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14071,68 +14242,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -14149,8 +14311,8 @@ fi # data, this checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14169,9 +14331,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14187,9 +14349,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14197,13 +14359,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14216,17 +14387,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14237,8 +14408,8 @@ esac # {The replacement define is in compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14265,68 +14436,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14350,8 +14512,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14378,68 +14540,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14447,8 +14600,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14467,13 +14620,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14486,11 +14648,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14498,12 +14662,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14517,8 +14679,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14545,68 +14707,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14614,8 +14767,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14635,13 +14788,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14654,11 +14816,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14666,12 +14830,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14684,8 +14846,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14712,68 +14874,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14781,8 +14934,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14802,13 +14955,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14821,11 +14983,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14833,12 +14997,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14853,8 +15015,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14881,68 +15043,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14950,8 +15103,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14987,13 +15140,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15006,18 +15168,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15035,8 +15197,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15047,50 +15209,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -15101,8 +15260,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15113,50 +15272,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -15167,8 +15323,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15179,62 +15335,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15256,8 +15409,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15272,8 +15425,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15299,38 +15452,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15339,8 +15488,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15351,50 +15500,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15404,8 +15550,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15430,40 +15576,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15474,8 +15616,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15486,50 +15628,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15539,8 +15678,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15566,40 +15705,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15618,8 +15753,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15646,68 +15781,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15727,8 +15853,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15754,39 +15880,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15801,8 +15924,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15829,68 +15952,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15898,8 +16012,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15912,56 +16026,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15970,8 +16081,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15984,56 +16095,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16042,12 +16150,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -16064,8 +16170,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16092,68 +16198,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16162,8 +16259,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16190,68 +16287,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16265,8 +16353,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16289,8 +16377,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16306,8 +16394,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16329,38 +16417,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16368,8 +16452,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16393,38 +16477,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16437,8 +16517,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16473,13 +16553,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16492,11 +16581,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16510,28 +16601,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16542,41 +16633,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16585,24 +16672,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16610,9 +16695,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16636,25 +16722,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16665,8 +16744,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16688,39 +16767,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16729,8 +16804,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16742,9 +16817,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16770,68 +16845,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16845,8 +16912,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16869,39 +16936,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16919,9 +16983,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16947,68 +17011,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17021,18 +17077,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17043,41 +17100,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17086,24 +17139,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17111,9 +17162,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17137,25 +17189,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17171,9 +17217,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17199,68 +17245,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17274,18 +17312,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17296,41 +17335,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17339,24 +17374,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17364,9 +17397,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17390,25 +17424,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17424,9 +17452,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17452,68 +17480,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17526,9 +17546,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17554,68 +17574,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17649,18 +17661,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17671,41 +17684,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17714,24 +17723,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17739,9 +17746,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17765,25 +17773,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17796,8 +17798,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17828,40 +17830,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17882,8 +17881,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17912,39 +17911,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17965,18 +17961,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17987,41 +17984,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18030,24 +18023,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18055,9 +18046,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18081,25 +18073,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18115,18 +18101,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18137,41 +18124,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18180,24 +18163,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18205,9 +18186,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18231,25 +18213,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18262,8 +18238,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18290,12 +18266,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18308,8 +18284,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18317,27 +18293,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18345,8 +18321,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18354,24 +18330,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18395,8 +18371,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18409,8 +18385,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18418,26 +18394,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18448,41 +18424,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18491,24 +18463,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18516,9 +18486,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18542,25 +18513,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18574,8 +18538,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18591,31 +18555,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18637,77 +18602,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 - -#-------------------------------------------------------------------- -# Does the C stack grow upwards or downwards? Or cross-compiling? -#-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5 -echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6 -if test "${tcl_cv_stack_grows_up+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test "$cross_compiling" = yes; then - tcl_cv_stack_grows_up=unknown -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - int StackGrowsUp(int *parent) { - int here; - return (&here < parent); - } - int main (int argc, char *argv[]) { - int foo; - return StackGrowsUp(&foo); - } - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_stack_grows_up=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_stack_grows_up=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5 -echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6 -if test $tcl_cv_stack_grows_up = unknown; then - -cat >>confdefs.h <<\_ACEOF -#define TCL_CROSS_COMPILE 1 -_ACEOF - -elif test $tcl_cv_stack_grows_up = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TCL_STACK_GROWS_UP 1 -_ACEOF - -fi +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18736,15 +18632,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18758,16 +18654,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18779,7 +18675,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18792,7 +18688,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18959,7 +18855,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18979,39 +18875,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -19020,52 +18935,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -19094,17 +18993,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19114,8 +19041,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -19129,18 +19091,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19148,159 +19111,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19309,7 +19233,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19318,31 +19263,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19350,30 +19278,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19381,7 +19298,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19395,18 +19312,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19417,60 +19336,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19486,40 +19387,52 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19530,368 +19443,476 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19899,152 +19920,52 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/unix/configure.in b/unix/configure.in index 9da98b9..097ca7f 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.184 2008/06/19 15:37:11 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.185 2008/07/13 09:03:41 msofer Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -677,28 +677,6 @@ fi AC_MSG_RESULT([$tcl_ok]) #-------------------------------------------------------------------- -# Does the C stack grow upwards or downwards? Or cross-compiling? -#-------------------------------------------------------------------- - -AC_CACHE_CHECK([if the C stack grows upwards in memory], tcl_cv_stack_grows_up, [ - AC_TRY_RUN([ - int StackGrowsUp(int *parent) { - int here; - return (&here < parent); - } - int main (int argc, char *argv[]) { - int foo; - return StackGrowsUp(&foo); - } - ], tcl_cv_stack_grows_up=yes, tcl_cv_stack_grows_up=no, - tcl_cv_stack_grows_up=unknown)]) -if test $tcl_cv_stack_grows_up = unknown; then - AC_DEFINE(TCL_CROSS_COMPILE, 1, [Are we cross-compiling?]) -elif test $tcl_cv_stack_grows_up = yes; then - AC_DEFINE(TCL_STACK_GROWS_UP, 1, [The C stack grows upwards in memory.]) -fi - -#-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtcl as a shared library instead of a static library. #-------------------------------------------------------------------- diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 8848a62..1f78999 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -364,9 +364,6 @@ /* Are bytecode statistics enabled? */ #undef TCL_COMPILE_STATS -/* Are we cross-compiling? */ -#undef TCL_CROSS_COMPILE - /* Are we to override what our default encoding is? */ #undef TCL_DEFAULT_ENCODING diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 4c8427d..0b3cdc9 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUnixInit.c,v 1.83 2008/04/27 22:21:35 dkf Exp $ + * RCS: @(#) $Id: tclUnixInit.c,v 1.84 2008/07/13 09:03:41 msofer Exp $ */ #include "tclInt.h" @@ -38,64 +38,6 @@ #endif /* - * Define TCL_NO_STACK_CHECK in the compiler options if you want to revert to - * the old behavior of never checking the stack. - */ - -/* - * Define this if you want to see a lot of output regarding stack checking. - */ - -#undef TCL_DEBUG_STACK_CHECK - -/* - * Values used to compute how much space is really available for Tcl's use for - * the stack. - * - * The getrlimit() function is documented to return the maximum stack size in - * bytes. However, with threads enabled, the pthread library on some platforms - * does bad things to the stack size limits. First, the limits cannot be - * changed. Second, they appear to be sometimes reported incorrectly. - * - * The defines below may need to be adjusted if more platforms have this - * broken behavior with threads enabled. - */ - -#ifndef TCL_MAGIC_STACK_DIVISOR -#define TCL_MAGIC_STACK_DIVISOR 1 -#endif -#ifndef TCL_RESERVED_STACK_PAGES -#define TCL_RESERVED_STACK_PAGES 8 -#endif - -/* - * Thread specific data for stack checking. - */ - -#ifndef TCL_NO_STACK_CHECK -typedef struct ThreadSpecificData { - int *outerVarPtr; /* The "outermost" stack frame pointer for - * this thread. */ - int *stackBound; /* The current stack boundary */ -} ThreadSpecificData; -static Tcl_ThreadDataKey dataKey; -#ifdef TCL_CROSS_COMPILE -static int stackGrowsDown = -1; -static int StackGrowsDown(int *parent); -#elif defined(TCL_STACK_GROWS_UP) -#define stackGrowsDown 0 -#else -#define stackGrowsDown 1 -#endif -#endif /* TCL_NO_STACK_CHECK */ - -#ifdef TCL_DEBUG_STACK_CHECK -#define STACK_DEBUG(args) printf args -#else -#define STACK_DEBUG(args) (void)0 -#endif /* TCL_DEBUG_STACK_CHECK */ - -/* * Tcl tries to use standard and homebrew methods to guess the right encoding * on the platform. However, there is always a final fallback, and this value * is it. Make sure it is a real Tcl encoding. @@ -327,9 +269,6 @@ static const LocaleTable localeTable[] = { {"zh_tw.big5", "big5"}, }; -#ifndef TCL_NO_STACK_CHECK -static int GetStackSize(size_t *stackSizePtr); -#endif /* TCL_NO_STACK_CHECK */ #ifdef HAVE_COREFOUNDATION static int MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tclLibPath); @@ -1008,202 +947,6 @@ TclpFindVariable( return result; } -#ifndef TCL_NO_STACK_CHECK -/* - *---------------------------------------------------------------------- - * - * TclpGetCStackParams -- - * - * Determine the stack params for the current thread: in which - * direction does the stack grow, and what is the stack lower (resp. - * upper) bound for safe invocation of a new command? This is used to - * cache the values needed for an efficient computation of - * TclpCheckStackSpace() when the interp is known. - * - * Results: - * Returns 1 if the stack grows down, in which case a stack lower bound - * is stored at stackBoundPtr. If the stack grows up, 0 is returned and - * an upper bound is stored at stackBoundPtr. If a bound cannot be - * determined NULL is stored at stackBoundPtr. - * - *---------------------------------------------------------------------- - */ - -int -TclpGetCStackParams( - int **stackBoundPtr) -{ - int result = TCL_OK; - size_t stackSize = 0; /* The size of the current stack. */ - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - /* Most variables are actually in a - * thread-specific data block to minimise the - * impact on the stack. */ -#ifdef TCL_CROSS_COMPILE - if (stackGrowsDown == -1) { - /* - * Not initialised! - */ - - stackGrowsDown = StackGrowsDown(&result); - } -#endif - - /* - * The first time through in a thread: record the "outermost" stack - * frame and inquire with the OS about the stack size. - */ - - if (tsdPtr->outerVarPtr == NULL) { - tsdPtr->outerVarPtr = &result; - result = GetStackSize(&stackSize); - if (result != TCL_OK) { - /* Can't check, assume it always succeeds */ -#ifdef TCL_CROSS_COMPILE - stackGrowsDown = 1; -#endif - tsdPtr->stackBound = NULL; - goto done; - } - } - - if (stackSize || (tsdPtr->stackBound && - ((stackGrowsDown && (&result < tsdPtr->stackBound)) || - (!stackGrowsDown && (&result > tsdPtr->stackBound))))) { - /* - * Either the thread's first pass or stack failure: set the params - */ - - if (!stackSize) { - /* - * Stack failure: if we didn't already blow up, we are within the - * safety area. Recheck with the OS in case the stack was grown. - */ - result = GetStackSize(&stackSize); - if (result != TCL_OK) { - /* Can't check, assume it always succeeds */ -#ifdef TCL_CROSS_COMPILE - stackGrowsDown = 1; -#endif - tsdPtr->stackBound = NULL; - goto done; - } - } - - if (stackGrowsDown) { - tsdPtr->stackBound = (int *) ((char *)tsdPtr->outerVarPtr - - stackSize); - } else { - tsdPtr->stackBound = (int *) ((char *)tsdPtr->outerVarPtr + - stackSize); - } - } - - done: - *stackBoundPtr = tsdPtr->stackBound; - return stackGrowsDown; -} - -#ifdef TCL_CROSS_COMPILE -int -StackGrowsDown( - int *parent) -{ - int here; - return (&here < parent); -} -#endif - -/* - *---------------------------------------------------------------------- - * - * GetStackSize -- - * - * Discover what the stack size for the current thread/process actually - * is. Expects to only ever be called once per thread and then only at a - * point when there is a reasonable amount of space left on the current - * stack; TclpCheckStackSpace is called sufficiently frequently that that - * is true. - * - * Results: - * TCL_OK if the stack space was discovered, TCL_BREAK if the stack space - * was undiscoverable in a way that stack checks should fail, and - * TCL_CONTINUE if the stack space was undiscoverable in a way that stack - * checks should succeed. - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -static int -GetStackSize( - size_t *stackSizePtr) -{ - size_t rawStackSize; - struct rlimit rLimit; /* The result from getrlimit(). */ - -#ifdef TCL_THREADS - rawStackSize = TclpThreadGetStackSize(); - if (rawStackSize == (size_t) -1) { - /* - * Some kind of confirmed error in TclpThreadGetStackSize?! Fall back - * to whatever getrlimit can determine. - */ - STACK_DEBUG(("stack checks: TclpThreadGetStackSize failed in \n")); - } - if (rawStackSize > 0) { - goto finalSanityCheck; - } - - /* - * If we have zero or an error, try the system limits instead. After all, - * the pthread documentation states that threads should always be bound by - * the system stack size limit in any case. - */ -#endif /* TCL_THREADS */ - - if (getrlimit(RLIMIT_STACK, &rLimit) != 0) { - /* - * getrlimit() failed, just fail the whole thing. - */ - STACK_DEBUG(("skipping stack checks with failure: getrlimit failed\n")); - return TCL_BREAK; - } - if (rLimit.rlim_cur == RLIM_INFINITY) { - /* - * Limit is "infinite"; there is no stack limit. - */ - STACK_DEBUG(("skipping stack checks with success: infinite limit\n")); - return TCL_CONTINUE; - } - rawStackSize = rLimit.rlim_cur; - - /* - * Final sanity check on the determined stack size. If we fail this, - * assume there are bogus values about and that we can't actually figure - * out what the stack size really is. - */ - -#ifdef TCL_THREADS /* Stop warning... */ - finalSanityCheck: -#endif - if (rawStackSize <= 0) { - STACK_DEBUG(("skipping stack checks with success\n")); - return TCL_CONTINUE; - } - - /* - * Calculate a stack size with a safety margin. - */ - - *stackSizePtr = (rawStackSize / TCL_MAGIC_STACK_DIVISOR) - - (getpagesize() * TCL_RESERVED_STACK_PAGES); - - return TCL_OK; -} -#endif /* TCL_NO_STACK_CHECK */ /* *---------------------------------------------------------------------- diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index b3bf457..0e4c4b6 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.27 2008/04/27 22:21:35 dkf Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.28 2008/07/13 09:03:41 msofer Exp $ */ #include "tclInt.h" @@ -82,6 +82,8 @@ static int TestgotsigCmd(ClientData dummy, static void AlarmHandler(int signum); static int TestchmodCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); +static int TeststacklimitCmd(ClientData dummy, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- @@ -122,7 +124,69 @@ TclplatformtestInit( (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testgotsig", TestgotsigCmd, (ClientData) 0, NULL); + Tcl_CreateObjCommand(interp, "teststacklimit", TeststacklimitCmd, + (ClientData) 0, NULL); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TeststacklimitCmd -- + * + * This function implements the "teststacklimit" command. When called + * with no arguments is sets the interp result to the current stack + * limit. When called with an integer argument it will set the stack size + * to the requested number (or the hard limit if it is smaller) and set + * the interp's result to the stack size prevalent before the change. + * Stack sizes are expressed in kB, as in 'ulimit'. + * + * A size of -1 means "unlimited". + * + * Results: + * A standard Tcl result. + * + * Side effects: + * May change the C stack size limit. + * + *---------------------------------------------------------------------- + */ + +static int +TeststacklimitCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ +#define STACK_SCALE 1024 + struct rlimit rlim; + int prev_limit, new_limit, result; + + if (objc > 2) { + Tcl_WrongNumArgs(interp, 1, objv, " ?limit?\""); + return TCL_ERROR; + } + + getrlimit(RLIMIT_STACK, &rlim); + prev_limit = ((rlim.rlim_cur == RLIM_INFINITY) + ? -1 + : (int) (rlim.rlim_cur/STACK_SCALE)); + + if (objc == 2) { + result = Tcl_GetIntFromObj(interp, objv[1], &new_limit); + if (result != TCL_OK) { + return result; + } + rlim.rlim_cur = ((new_limit == -1) + ? RLIM_INFINITY + : STACK_SCALE * (rlim_t) new_limit); + setrlimit(RLIMIT_STACK, &rlim); + } + + Tcl_SetObjResult(interp, Tcl_NewIntObj(prev_limit)); return TCL_OK; +#undef STACK_SCALE } /* diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 9ef5f6e..6120c67 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,21 +10,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.55 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.56 2008/07/13 09:03:41 msofer Exp $ */ #include "tclWinInt.h" -#ifndef TCL_NO_STACK_CHECK -/* - * The following functions implement stack depth checking - */ -typedef struct ThreadSpecificData { - int *stackBound; /* The current stack boundary. */ -} ThreadSpecificData; -static Tcl_ThreadDataKey dataKey; -#endif /* TCL_NO_STACK_CHECK */ - /* * The following data structures are used when loading the thunking library * for execing child processes under Win32s. @@ -522,78 +512,6 @@ TclWinNoBackslash( } /* - *---------------------------------------------------------------------- - * - * TclpGetStackParams -- - * - * Determine the stack params for the current thread: in which direction - * does the stack grow, and what is the stack lower (resp. upper) bound - * for safe invocation of a new command? This is used to cache the values - * needed for an efficient computation of TclpCheckStackSpace() when the - * interp is known. - * - * Results: - * Returns 1 if the stack grows down, in which case a stack lower bound - * is stored at stackBoundPtr. If the stack grows up, 0 is returned and - * an upper bound is stored at stackBoundPtr. If a bound cannot be - * determined NULL is stored at stackBoundPtr. - * - *---------------------------------------------------------------------- - */ - -#ifndef TCL_NO_STACK_CHECK -int -TclpGetCStackParams( - int **stackBoundPtr) -{ - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - SYSTEM_INFO si; /* The system information, used to determine - * the page size. */ - MEMORY_BASIC_INFORMATION mbi; - /* The information about the memory area in - * which the stack resides. */ - - if (!tsdPtr->stackBound - || ((UINT_PTR)&tsdPtr < (UINT_PTR)tsdPtr->stackBound)) { - /* - * Either we haven't determined the stack bound in this thread, or - * else we've overflowed the bound that we previously determined. We - * need to find a new stack bound from Windows. - */ - - GetSystemInfo(&si); - if (VirtualQuery((LPCVOID) &tsdPtr, &mbi, sizeof(mbi)) == 0) { - /* - * For some reason, the system didn't let us query the stack size. - * Nevertheless, we got here and haven't blown up yet. Don't - * update the calculated stack bound. If there is no calculated - * stack bound yet, set it to the base of the current page of - * stack. - */ - - if (!tsdPtr->stackBound) { - tsdPtr->stackBound = (int *) - ((UINT_PTR)(&tsdPtr) & ~ (UINT_PTR)(si.dwPageSize-1)); - } - } else { - /* - * The allocation base of the stack segment has to be advanced by - * one page (to allow for the guard page maintained in the C - * runtime) and then by TCL_WIN_STACK_THRESHOLD (to allow for the - * amount of stack that Tcl needs). - */ - - tsdPtr->stackBound = (int *) - ((UINT_PTR)(mbi.AllocationBase) - + (UINT_PTR)(si.dwPageSize) + TCL_WIN_STACK_THRESHOLD); - } - } - *stackBoundPtr = tsdPtr->stackBound; - return 1; -} -#endif - -/* *--------------------------------------------------------------------------- * * TclWinSetInterfaces -- -- cgit v0.12 From 426c232d6ea53581ef51e7015012c3469572e206 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Jul 2008 09:04:54 +0000 Subject: added new files generic/tclNRE.h and tests/NRE.test --- generic/tclNRE.h | 267 +++++++++++++++++++++++++++++++++++++++++++++++ tests/NRE.test | 308 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 575 insertions(+) create mode 100644 generic/tclNRE.h create mode 100644 tests/NRE.test diff --git a/generic/tclNRE.h b/generic/tclNRE.h new file mode 100644 index 0000000..d892f61 --- /dev/null +++ b/generic/tclNRE.h @@ -0,0 +1,267 @@ +/* + * tclNRE.h -- + * + * This file contains declarations for the infrastructure for + * non-recursive commands. Contents may or may not migrate to tcl.h, + * tcl.decls, tclInt.h and/or tclInt.decls + * + * Copyright (c) 2008 by Miguel Sofer + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * // FIXME: RCS numbering? + * RCS: @(#) $Id: tclNRE.h,v 1.1 2008/07/13 09:04:54 msofer Exp $ + */ + + +#ifndef _TCLNONREC +#define _TCLNONREC + +/***************************************************************************** + * Stuff during devel + *****************************************************************************/ + +#define USE_SMALL_ALLOC 1 /* perf is important for some of these things! */ +#define USE_STACK_ALLOC 1 /* good mainly for debugging, crashes at + * smallest timing error */ +#define ENABLE_ASSERTS 1 + +/* + * IMPLEMENTED IN THIS VERSION - flags for partial enabling of the different + * parts, useful for debugging. May not work - meant to be used at "all ones" + */ + +#define USE_NR_PROC 1 /* are procs defined as NR functions or not? + * Used for testing that the old interfaces + * still work, as they are used by TclOO and + * iTcl */ +#define USE_NR_TEBC 1 /* does TEBC know about his special powers? + * with 1 TEBC remains on stack, TEOV gets + * evicted. */ +#define USE_NR_ALIAS 1 /* First examples: my job */ + +#define USE_NR_IMPORTS 1 /* First examples: my job */ + +#define USE_NR_TAILCALLS 1 /* Incomplete implementation as + * tcl::unsupported::tailcall; best semantics + * are yet not 100% clear to me. */ + +#define USE_NR_NS_ENSEMBLE 1 /* snit!! */ + +/* Here to remind me of what's still missing: none of these do anything today */ + +#define USE_NR_EVAL 0 /* Tcl_EvalObj should be easy; the others may + * require some adapting of the parser. dgp? */ +#define USE_NR_UPLEVEL 0 /* piece of cake, I think */ +#define USE_NR_VAR_TRACES 0 /* require major redesign, I fear. About time + * for it too! */ + +#define USE_NR_CONTINUATIONS 0 + +#define MAKE_3X_FASTER 0 +#define RULE_THE_WORLD 0 + +#define USE_NR_CMD_TRACES /* NEVER?? Maybe ... enter traces on the way in, + * leave traces done in the callback? So a trace + * just needs to replace the procPtr and + * clientData, and TEOV needn't know about the + * whole s**t! Mmhhh */ + +/***************************************************************************** + * Stuff for the public api: gone to the stubs table! + * + * Question: should we allow more callback requests during the callback + * itself? Easy enough to either handle or block, nothing done yet. We could + * also "lock" the Tcl stack during postProc, but it doesn't sound + * reasonable. I think. + *****************************************************************************/ + +/***************************************************************************** + * Private api fo NRE + *****************************************************************************/ + +/* + * Main data struct for representing NR commands (generated at runtime). + */ + +struct ByteCode; + +/* Fill up a SmallAlloc: 4 free ptrs for the user */ +typedef struct TEOV_callback { + TclNR_PostProc *procPtr; + ClientData data0; + ClientData data1; + ClientData data2; + ClientData data3; + struct TEOV_callback *nextPtr; +} TEOV_callback; + + +/* Try to keep within SmallAlloc sizes! */ +typedef struct TEOV_record { + int type; + Command *cmdPtr; + TEOV_callback *callbackPtr; + struct TEOV_record *nextPtr; + union { + struct ByteCode *codePtr; + struct { + Tcl_Obj *objPtr; + int flags; + } obj; + struct { + Tcl_ObjCmdProc *objProc; + ClientData clientData; + } objProc; + struct { + int objc; + Tcl_Obj *const *objv; + } objv; + } data; +#if !USE_SMALL_ALLOC + /* Extra checks: can disappear later */ + Tcl_Obj **tosPtr; +#endif +} TEOV_record; + +/* + * The types for records; we save the first bit to indicate that it stores an + * obj, to indicate the necessary refCount management. That is, odd numbers + * only for obj-carrying types + */ + +#define TCL_NR_NO_TYPE 0 /* for internal (cleanup) use only */ +#define TCL_NR_BC_TYPE 2 /* procs, lambdas, TclOO+Itcl sometime ... */ +#define TCL_NR_OBJPROC_TYPE 4 /* ns-imports (cmdd redirect) */ +#define TCL_NR_TAILCALL_TYPE 6 +#define TCL_NR_TEBC_SWAPENV_TYPE 8 /* continuations, micro-threads !? */ + +#define TCL_NR_CMD_TYPE 1 /* i-alias, ns-ens use this */ +#define TCL_NR_SCRIPT_TYPE 3 /* ns-eval, uplevel use this */ + +#define TCL_NR_HAS_OBJ(TYPE) ((TYPE) & 1) + +#define TOP_RECORD(iPtr) (((Interp *)(iPtr))->execEnvPtr->recordPtr) + +#define GET_TOSPTR(iPtr) \ + (((Interp *)iPtr)->execEnvPtr->execStackPtr->tosPtr) + +#if !USE_SMALL_ALLOC +#define STORE_EXTRA(iPtr, recordPtr) \ + recordPtr->tosPtr = GET_TOSPTR(iPtr) +#else +#define STORE_EXTRA(iPtr, recordPtr) +#endif + +/* A SINGLE record being pushed is what is detected as an NRE request by TEOV */ + +#define PUSH_RECORD(iPtr, recordPtr) \ + TCLNR_ALLOC(interp, recordPtr); \ + recordPtr->nextPtr = TOP_RECORD(iPtr); \ + STORE_EXTRA(iPtr, recordPtr); \ + TOP_RECORD(iPtr) = recordPtr; \ + recordPtr->type = TCL_NR_NO_TYPE; \ + recordPtr->cmdPtr = NULL; \ + recordPtr->callbackPtr = NULL + +#define TEBC_CALL(iPtr) \ + (((Interp *)iPtr)->execEnvPtr->tebcCall) + +#define TEBC_DATA(iPtr) \ + (((Interp *)iPtr)->execEnvPtr->tebcData) + +#define TEBC_DO_EXEC 1 /* MUST NOT be 0 */ +#define TEBC_DO_TAILCALL 2 + +/* + * These are only used by TEOV; here for ease of ref. They should move to + * tclBasic.c later on. + */ + +#define COMPLETE_RECORD(recordPtr) \ + /* accesses variables by name, careful */ \ + recordPtr->cmdPtr = cmdPtr; \ + +#if !USE_SMALL_ALLOC +#define CHECK_EXTRA(iPtr, recordPtr) \ + (recordPtr->tosPtr == GET_TOSPTR(iPtr)) +#else +#define CHECK_EXTRA(iPtr, recordPtr) 1 +#endif + +#define POP_RECORD(iPtr, recordPtr) \ + { \ + recordPtr = TOP_RECORD(iPtr); \ + TOP_RECORD(iPtr) = recordPtr->nextPtr; \ + } + + +#define FREE_RECORD(iPtr, recordPtr) \ + { \ + TEOV_callback *callbackPtr = recordPtr->callbackPtr; \ + if (TCL_NR_HAS_OBJ(recordPtr->type)) { \ + Tcl_DecrRefCount(recordPtr->data.obj.objPtr); \ + } \ + while (callbackPtr) { \ + callbackPtr = callbackPtr->nextPtr; \ + TclSmallFree(recordPtr->callbackPtr); \ + } \ + TCLNR_FREE(((Tcl_Interp *)iPtr), recordPtr); \ + } + +#define VALID_NEW_REQUEST(recordPtr) \ + ( (recordPtr)->callbackPtr || ((recordPtr)->type != TCL_NR_NO_TYPE)) + +#define CHECK_VALID_RETURN(iPtr, recordPtr) \ + ((TOP_RECORD(iPtr) == recordPtr) && \ + CHECK_EXTRA(iPtr, recordPtr)) + +#define READ_OBJV_RECORD(recordPtr) /* TBD? Or read by hand (braille?) */ + + +/* + * functions + */ + +#if 0 +/* built as static inline in tclProc.c. Do TclOO/Itcl need this? */ +MODULE_SCOPE int TclNR_BC (Tcl_Interp * interp, ByteCode *codePtr, + TclNR_PostProc *postProcPtr, ClientData clientData); +#endif + +/* The following starts purges the stack popping TclStackAllocs down to where + * tosPtr has the requested value. Panics on failure.*/ +MODULE_SCOPE void TclStackPurge(Tcl_Interp *interp, Tcl_Obj **tosPtr); + +/* + * Tailcalls! + */ + +MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; + + +/***************************************************************************** + * Stuff that goes away: temp during devel + *****************************************************************************/ + +#if USE_SMALL_ALLOC +#define TCLNR_ALLOC(interp, ptr) TclSmallAlloc(sizeof(TEOV_record), ptr) +#define TCLNR_FREE(interp, ptr) TclSmallFree((ptr)) +#elif USE_STACK_ALLOC +#define TCLNR_ALLOC(interp, ptr) (ptr = TclStackAlloc(interp, sizeof(TEOV_record))) +#define TCLNR_FREE(interp, ptr) TclStackFree(interp, (ptr)) +#else +#define TCLNR_ALLOC(interp, size, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_record)))) +#define TCLNR_FREE(interp, ptr) ckfree((char *) (ptr)) +#endif + +#if ENABLE_ASSERTS +#include +#else +#define assert(expr) +#endif + +#endif /* _TCLNONREC */ diff --git a/tests/NRE.test b/tests/NRE.test new file mode 100644 index 0000000..e0ec9eb --- /dev/null +++ b/tests/NRE.test @@ -0,0 +1,308 @@ +# Commands covered: proc, apply, [interp alias], [namespce import], tailcall +# +# This file contains a collection of tests for the non-recursive executor that +# avoids recursive calls to TEBC. +# +# Copyright (c) 2008 by Miguel Sofer. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: NRE.test,v 1.1 2008/07/13 09:04:54 msofer Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* +} + +if {[testConstraint unix]} { + # + # Workaround for gnu-make bug http://savannah.gnu.org/bugs/?18396 + # + # Do not let make set up too large a C stack for us, as it effectively + # disables the tests under some circumstances + # + + set oldLimit [teststacklimit 2048] +} + + +testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] + +# +# The first few tests will blow the C stack if the NR machinery is not working +# properly: all these calls should execute within the same instance of TEBC, +# and thus do not load the C stack. The nesting limit is given by how much the +# Tcl execution stack can grow. +# + +interp recursionlimit {} 100000 + +test NRE-1.1 {self-recursive procs} -setup { + proc a i { + if {[incr i] > 20000} { + return $i + } + a $i + } +} -body { + list [catch {a 0} msg] $msg +} -cleanup { + rename a {} +} -result {0 20001} + +test NRE-1.2 {self-recursive lambdas} -setup { + set a [list i { + if {[incr i] > 20000} { + return $i + } + apply $::a $i + }] +} -body { + list [catch {apply $a 0} msg] $msg +} -cleanup { + unset a +} -result {0 20001} + +test NRE-1.2.1 {self-recursive lambdas} -setup { + set a [list {} { + if {[incr ::i] > 20000} { + return $::i + } + apply $::a + }] +} -body { + set ::i 0 + list [catch {apply $a} msg] $msg $::i +} -cleanup { + unset a +} -result {0 20001 20001} + +test NRE-1.3 {mutually recursive procs and lambdas} -setup { + proc a i { + apply $::b [incr i] + } + set b [list i { + if {[incr i] > 20000} { + return $i + } + a $i + }] +} -body { + list [catch {list [a 0] [apply $b 0]} msg] $msg +} -cleanup { + rename a {} + unset b +} -result {0 {20002 20001}} + +# +# Test that aliases are non-recursive +# + +test NRE-2.1 {alias is not recursive} -setup { + proc a i { + if {[incr i] > 20000} { + return $i + } + b $i + } + interp alias {} b {} a +} -body { + list [catch {list [a 0] [b 0]} msg] $msg +} -cleanup { + rename a {} + rename b {} +} -result {0 {20001 20001}} + +# +# Test that imports are non-recursive +# + +test NRE-3.1 {imports are not recursive} -setup { + namespace eval foo { + proc a i { + if {[incr i] > 20000} { + return $i + } + ::a $i + } + namespace export a + } + namespace import foo::a + a 1 +} -body { + list [catch {a 0} msg] $msg +} -cleanup { + rename a {} + namespace delete ::foo +} -result {0 20001} + + +test NRE-4.1 {ensembles are not recursive} -setup { + proc a i { + if {[incr i] > 20000} { + return $i + } + b foo $i + } + namespace ensemble create \ + -command b \ + -map [list foo a] +} -body { + list [catch {list [a 0] [b foo 0]} msg] $msg +} -cleanup { + rename a {} + rename b {} +} -result {0 {20001 20001}} + + +test NRE-5.1 {[namespace eval] is not recursive} -setup { + namespace eval ::foo { + proc a i { + if {[incr i] > 20000} { + return $i + } + namespace eval ::foo [list a $i] + } + } +} -body { + list [catch {::foo::a 0} msg] $msg +} -cleanup { + namespace delete ::foo +} -result {0 20001} + +test NRE-5.2 {[namespace eval] is not recursive} -setup { + namespace eval ::foo { + proc a i { + if {[incr i] > 20000} { + return $i + } + namespace eval ::foo "set x $i; a $i" + } + } +} -body { + list [catch {::foo::a 0} msg] $msg +} -cleanup { + namespace delete ::foo +} -result {0 20001} + + +test NRE-6.1 {[uplevel] is not recursive} -setup { + proc a i { + if {[incr i] > 20000} { + return $i + } + uplevel 1 [list a $i] + } +} -body { + list [catch {a 0} msg] $msg +} -cleanup { + rename a {} +} -result {0 20001} + +test NRE-6.2 {[uplevel] is not recursive} -setup { + proc a i { + if {[incr i] > 20000} { + return $i + } + uplevel 1 "set x $i; a $i" + } +} -body { + list [catch {a 0} msg] $msg +} -cleanup { + rename a {} +} -result {0 20001} + +# +# NASTY BUG found by tcllib's interp package +# + +test NRE-X.1 {eval in wrong interp} { + set i [interp create] + set res [$i eval { + set x {namespace children ::} + set y [list namespace children ::] + namespace delete {*}[{*}$y] + set j [interp create] + $j eval {namespace delete {*}[namespace children ::]} + namespace eval foo {} + set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] + interp delete $j + set res + }] + interp delete $i + set res +} {::foo ::foo {} {}} + +# +# Test tailcalls +# +namespace eval tcl::unsupported namespace export tailcall +namespace import tcl::unsupported::tailcall + +test NRE-T.1 {tailcall} {tailcall} { + namespace eval a { + unset -nocomplain x + proc aset args {uplevel 1 [list set {*}$args]} + proc foo {} {tailcall aset x 1} + } + namespace eval b { + unset -nocomplain x + proc aset args {error b::aset} + proc moo {} {set x 0; ::a::foo; set x} + } + unset -nocomplain x + proc aset args {error ::aset} + ::b::moo +} 1 + +test NRE-T.2 {tailcall in non-proc} {tailcall} { + list [catch {namespace eval a [list tailcall set x 1]} msg] $msg +} {1 {tailcall can only be called from a proc or lambda}} + +test NRE-T.3 {tailcall falls off tebc} {tailcall} { + unset -nocomplain x + proc foo {} {tailcall set x 1} + list [catch foo msg] $msg [set x] +} {0 1 1} + +test NRE-T.4 {tailcall falls off tebc} { + set x 2 + proc foo {} {tailcall set x 1} + foo + set x +} 1 + +test NRE-T.5 {tailcall falls off tebc} { + set x 2 + namespace eval bar { + variable x 3 + proc foo {} {tailcall set x 1} + } + foo + list $x $bar::x +} {1 3} + +test NRE-T.6 {tailcall does remove callframes} {tailcall} { + proc foo {} {info level} + proc moo {} {tailcall foo} + proc boo {} {expr {[moo] - [info level]}} + boo +} 1 + + +# +# Test that ensembles are non-recursive +# + + + +# cleanup +::tcltest::cleanupTests + +if {[testConstraint unix]} { + teststacklimit $oldLimit +} + + +return -- cgit v0.12 From 70c3540c76b3c5e4cf4f722288dc9d406ae48b8d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Jul 2008 09:29:51 +0000 Subject: silence compiler warnings about uninited variables (gcc can't follow the logic) --- generic/tclExecute.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 690d190..1299cce 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.376 2008/07/13 09:03:33 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.377 2008/07/13 09:29:51 msofer Exp $ */ #include "tclInt.h" @@ -1797,10 +1797,12 @@ TclExecuteByteCode( * Globals: variables that store state, must remain valid at all times. */ - ptrdiff_t *catchTop; - register Tcl_Obj **tosPtr; /* Cached pointer to top of evaluation + ptrdiff_t *catchTop = 0; + register Tcl_Obj **tosPtr = NULL; + /* Cached pointer to top of evaluation * stack. */ - register unsigned char *pc; /* The current program counter. */ + register unsigned char *pc = NULL; + /* The current program counter. */ int instructionCount = 0; /* Counter that is used to work out when to * call Tcl_AsyncReady() */ Tcl_Obj *auxObjList; /* Linked list of aux data, used for {*} and -- cgit v0.12 From 3b5dd7355ae4d8bd48fe455c38785636e2104d69 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 13 Jul 2008 12:54:03 +0000 Subject: remove leftover DTRACE macro causing buid failure --- generic/tclBasic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cf4bbe4..c680fdc 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.304 2008/07/13 09:03:33 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.305 2008/07/13 12:54:03 das Exp $ */ #include "tclInt.h" @@ -4258,10 +4258,6 @@ int TclEvalObjv_NR2( iPtr->numLevels--; } - if (TCL_DTRACE_CMD_RETURN_ENABLED()) { - TCL_DTRACE_CMD_RETURN(TclGetString(objv[0]), result); - } - FREE_RECORD(iPtr, recordPtr); } -- cgit v0.12 From 57fd707011c3d1f437bb42c16c18a68eaae70146 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 13 Jul 2008 12:54:21 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 1f78999..5b9b433 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -379,9 +379,6 @@ /* What is the default extension for shared libraries? */ #undef TCL_SHLIB_EXT -/* The C stack grows upwards in memory. */ -#undef TCL_STACK_GROWS_UP - /* Are we building with threads enabled? */ #undef TCL_THREADS -- cgit v0.12 From a6e2176f5187db2129fc1c383a56355ba2bf6168 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 13 Jul 2008 12:54:46 +0000 Subject: add new NRE files --- macosx/Tcl.xcodeproj/project.pbxproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index f2880b2..3b61afa 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -937,6 +937,8 @@ F9A3084B08F2D4CE00BAE1AB /* tclsh */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tclsh; sourceTree = BUILT_PRODUCTS_DIR; }; F9A3084E08F2D4F400BAE1AB /* Tcl.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = Tcl.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F9A493240CEBF38300B78AE2 /* chanio.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = chanio.test; sourceTree = ""; }; + F9E070AE0E2A2BB400B853D2 /* tclNRE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclNRE.h; sourceTree = ""; }; + F9E070B40E2A2BCC00B853D2 /* NRE.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NRE.test; sourceTree = ""; }; F9ECB1120B26521500A28025 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = ""; }; F9ECB1130B26521500A28025 /* platform.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = platform.tcl; sourceTree = ""; }; F9ECB1140B26521500A28025 /* shell.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = shell.tcl; sourceTree = ""; }; @@ -967,7 +969,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.36 2008/06/12 06:26:58 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.37 2008/07/13 12:54:46 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1305,6 +1307,7 @@ F96D3F0A08F272A7004A47F5 /* tclMain.c */, F96D3F0B08F272A7004A47F5 /* tclNamesp.c */, F96D3F0C08F272A7004A47F5 /* tclNotify.c */, + F9E070AE0E2A2BB400B853D2 /* tclNRE.h */, F96D3F0D08F272A7004A47F5 /* tclObj.c */, F93599B20DF1F75400E04F67 /* tclOO.c */, F93599B40DF1F75900E04F67 /* tclOO.decls */, @@ -1683,6 +1686,7 @@ F96D439108F272B6004A47F5 /* namespace-old.test */, F96D439208F272B7004A47F5 /* namespace.test */, F96D439308F272B7004A47F5 /* notify.test */, + F9E070B40E2A2BCC00B853D2 /* NRE.test */, F96D439408F272B7004A47F5 /* obj.test */, F93599C80DF1F81900E04F67 /* oo.test */, F96D439508F272B7004A47F5 /* opt.test */, -- cgit v0.12 From faf9c06c92a71acaf96d3813ca666a67c217d952 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 13 Jul 2008 15:56:46 +0000 Subject: whitespace --- generic/tclBasic.c | 348 ++++++++++++++++++++++++++--------------------------- 1 file changed, 174 insertions(+), 174 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c680fdc..0eabf22 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.305 2008/07/13 12:54:03 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.306 2008/07/13 15:56:46 das Exp $ */ #include "tclInt.h" @@ -56,13 +56,13 @@ typedef struct OldMathFuncData { static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr, const char *oldName, const char *newName, int flags); -static int CancelEvalProc(ClientData clientData, +static int CancelEvalProc(ClientData clientData, Tcl_Interp *interp, int code); static int CheckDoubleResult(Tcl_Interp *interp, double dResult); static void DeleteInterpProc(Tcl_Interp *interp); static void DeleteOpCmdClientData(ClientData clientData); static Tcl_Obj *GetCommandSource(Interp *iPtr, int objc, - Tcl_Obj *const objv[], int lookup); + Tcl_Obj *const objv[], int lookup); static void ProcessUnexpectedResult(Tcl_Interp *interp, int returnCode); static int OldMathFuncProc(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj *const *objv); @@ -117,7 +117,7 @@ static void TEOV_PushExceptionHandlers(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); static inline Command * - TEOV_LookupCmdFromObj(Tcl_Interp *interp, Tcl_Obj *namePtr, + TEOV_LookupCmdFromObj(Tcl_Interp *interp, Tcl_Obj *namePtr, Namespace *lookupNsPtr); static int TEOV_NotFound(Tcl_Interp *interp, int objc, @@ -145,7 +145,7 @@ typedef struct { const char *name; /* Name of object-based command. */ Tcl_ObjCmdProc *objProc; /* Object-based function for command. */ CompileProc *compileProc; /* Function called to compile command. */ - Tcl_ObjCmdProc *nreProc; /* NR-based function for command */ + Tcl_ObjCmdProc *nreProc; /* NR-based function for command */ int isSafe; /* If non-zero, command will be present in * safe interpreter. Otherwise it will be * hidden. */ @@ -161,7 +161,7 @@ static const CmdInfo builtInCmds[] = { */ {"append", Tcl_AppendObjCmd, TclCompileAppendCmd, NULL, 1}, - {"apply", Tcl_ApplyObjCmd, NULL, TclNRApplyObjCmd, 1}, + {"apply", Tcl_ApplyObjCmd, NULL, TclNRApplyObjCmd, 1}, {"array", Tcl_ArrayObjCmd, NULL, NULL, 1}, {"break", Tcl_BreakObjCmd, TclCompileBreakCmd, NULL, 1}, #ifndef EXCLUDE_OBSOLETE_COMMANDS @@ -259,35 +259,35 @@ typedef struct { ClientData clientData; /* Client data for the function */ } BuiltinFuncDef; static const BuiltinFuncDef BuiltinFuncTable[] = { - { "abs", ExprAbsFunc, NULL }, - { "acos", ExprUnaryFunc, (ClientData) acos }, - { "asin", ExprUnaryFunc, (ClientData) asin }, - { "atan", ExprUnaryFunc, (ClientData) atan }, - { "atan2", ExprBinaryFunc, (ClientData) atan2 }, + { "abs", ExprAbsFunc, NULL }, + { "acos", ExprUnaryFunc, (ClientData) acos }, + { "asin", ExprUnaryFunc, (ClientData) asin }, + { "atan", ExprUnaryFunc, (ClientData) atan }, + { "atan2", ExprBinaryFunc, (ClientData) atan2 }, { "bool", ExprBoolFunc, NULL }, - { "ceil", ExprCeilFunc, NULL }, - { "cos", ExprUnaryFunc, (ClientData) cos }, + { "ceil", ExprCeilFunc, NULL }, + { "cos", ExprUnaryFunc, (ClientData) cos }, { "cosh", ExprUnaryFunc, (ClientData) cosh }, { "double", ExprDoubleFunc, NULL }, { "entier", ExprEntierFunc, NULL }, { "exp", ExprUnaryFunc, (ClientData) exp }, - { "floor", ExprFloorFunc, NULL }, + { "floor", ExprFloorFunc, NULL }, { "fmod", ExprBinaryFunc, (ClientData) fmod }, - { "hypot", ExprBinaryFunc, (ClientData) hypot }, + { "hypot", ExprBinaryFunc, (ClientData) hypot }, { "int", ExprIntFunc, NULL }, { "isqrt", ExprIsqrtFunc, NULL }, - { "log", ExprUnaryFunc, (ClientData) log }, - { "log10", ExprUnaryFunc, (ClientData) log10 }, - { "pow", ExprBinaryFunc, (ClientData) pow }, + { "log", ExprUnaryFunc, (ClientData) log }, + { "log10", ExprUnaryFunc, (ClientData) log10 }, + { "pow", ExprBinaryFunc, (ClientData) pow }, { "rand", ExprRandFunc, NULL }, { "round", ExprRoundFunc, NULL }, - { "sin", ExprUnaryFunc, (ClientData) sin }, - { "sinh", ExprUnaryFunc, (ClientData) sinh }, - { "sqrt", ExprSqrtFunc, NULL }, + { "sin", ExprUnaryFunc, (ClientData) sin }, + { "sinh", ExprUnaryFunc, (ClientData) sinh }, + { "sqrt", ExprSqrtFunc, NULL }, { "srand", ExprSrandFunc, NULL }, - { "tan", ExprUnaryFunc, (ClientData) tan }, - { "tanh", ExprUnaryFunc, (ClientData) tanh }, - { "wide", ExprWideFunc, NULL }, + { "tan", ExprUnaryFunc, (ClientData) tan }, + { "tanh", ExprUnaryFunc, (ClientData) tanh }, + { "wide", ExprWideFunc, NULL }, { NULL, NULL, NULL } }; @@ -360,8 +360,8 @@ static const OpCmdInfo mathOpCmds[] = { /* * This is the script cancellation struct and hash table. The hash table - * is used to keep track of the information necessary to process script - * cancellation requests, including the original interp, asynchronous handler + * is used to keep track of the information necessary to process script + * cancellation requests, including the original interp, asynchronous handler * tokens (created by Tcl_AsyncCreate), and the clientData and flags arguments * passed to Tcl_CancelEval on a per-interp basis. The cancelLock mutex is * used for protecting calls to Tcl_CancelEval as well as protecting access @@ -369,11 +369,11 @@ static const OpCmdInfo mathOpCmds[] = { */ typedef struct { Tcl_Interp *interp; /* Interp this struct belongs to */ - Tcl_AsyncHandler async; /* Async handler token for script + Tcl_AsyncHandler async; /* Async handler token for script * cancellation */ char *result; /* The script cancellation result or * NULL for a default result */ - int length; /* Length of the above error message */ + int length; /* Length of the above error message */ ClientData clientData; /* Ignored */ int flags; /* Additional flags */ } CancelInfo; @@ -730,7 +730,7 @@ Tcl_CreateInterp(void) /* * Create the "binary", "chan", "dict", "info" and "string" ensembles. - * Note that all these commands (and their subcommands that are not + * Note that all these commands (and their subcommands that are not * present in the global namespace) are wholly safe. */ @@ -1315,28 +1315,28 @@ DeleteInterpProc( Tcl_MutexLock(&cancelLock); hPtr = Tcl_FindHashEntry(&cancelTable, (char *) iPtr); if (hPtr != NULL) { - cancelInfo = (CancelInfo *) Tcl_GetHashValue(hPtr); + cancelInfo = (CancelInfo *) Tcl_GetHashValue(hPtr); - if (cancelInfo != NULL) { - if (cancelInfo->result != NULL) { - ckfree((char *) cancelInfo->result); - cancelInfo->result = NULL; - } - ckfree((char *) cancelInfo); - cancelInfo = NULL; - } + if (cancelInfo != NULL) { + if (cancelInfo->result != NULL) { + ckfree((char *) cancelInfo->result); + cancelInfo->result = NULL; + } + ckfree((char *) cancelInfo); + cancelInfo = NULL; + } - Tcl_DeleteHashEntry(hPtr); + Tcl_DeleteHashEntry(hPtr); } if (iPtr->asyncCancel != NULL) { - Tcl_AsyncDelete(iPtr->asyncCancel); - iPtr->asyncCancel = NULL; + Tcl_AsyncDelete(iPtr->asyncCancel); + iPtr->asyncCancel = NULL; } if (iPtr->asyncCancelMsg != NULL) { - Tcl_DecrRefCount(iPtr->asyncCancelMsg); - iPtr->asyncCancelMsg = NULL; + Tcl_DecrRefCount(iPtr->asyncCancelMsg); + iPtr->asyncCancelMsg = NULL; } Tcl_MutexUnlock(&cancelLock); @@ -2041,7 +2041,7 @@ Tcl_CreateObjCommand( Tcl_ObjCmdProc *proc, /* Object-based function to associate with * name. */ ClientData clientData, /* Arbitrary value to pass to object - * function. */ + * function. */ Tcl_CmdDeleteProc *deleteProc) /* If not NULL, gives a function to call when * this command is deleted. */ @@ -2207,7 +2207,7 @@ TclInvokeStringCommand( const char **argv = (const char **) TclStackAlloc(interp, (unsigned)(objc + 1) * sizeof(char *)); - for (i = 0; i < objc; i++) { + for (i = 0; i < objc; i++) { argv[i] = Tcl_GetString(objv[i]); } argv[objc] = 0; @@ -2256,7 +2256,7 @@ TclInvokeObjectCommand( Tcl_Obj **objv = (Tcl_Obj **) TclStackAlloc(interp, (unsigned)(argc * sizeof(Tcl_Obj *))); - for (i = 0; i < argc; i++) { + for (i = 0; i < argc; i++) { length = strlen(argv[i]); TclNewStringObj(objPtr, argv[i], length); Tcl_IncrRefCount(objPtr); @@ -2281,7 +2281,7 @@ TclInvokeObjectCommand( * free the objv array if malloc'ed storage was used. */ - for (i = 0; i < argc; i++) { + for (i = 0; i < argc; i++) { objPtr = objv[i]; Tcl_DecrRefCount(objPtr); } @@ -2921,7 +2921,7 @@ Tcl_DeleteCommandFromToken( * imported commands now. */ - for (refPtr = cmdPtr->importRefPtr; refPtr != NULL; + for (refPtr = cmdPtr->importRefPtr; refPtr != NULL; refPtr = nextRefPtr) { nextRefPtr = refPtr->nextPtr; importCmd = (Tcl_Command) refPtr->importedCmdPtr; @@ -3071,7 +3071,7 @@ CancelEvalProc(clientData, interp, code) Tcl_Interp *interp; /* Ignored */ int code; /* Current return code from command. */ { - CancelInfo *cancelInfo = (CancelInfo *) clientData; + CancelInfo *cancelInfo = (CancelInfo *) clientData; Interp *iPtr; if (cancelInfo != NULL) { @@ -3095,7 +3095,7 @@ CancelEvalProc(clientData, interp, code) * from Tcl_CancelEval. We do not want to simply combine all * the flags from original Tcl_CancelEval call with the interp * flags here just in case the caller passed flags that might - * cause behaviour unrelated to script cancellation. + * cause behaviour unrelated to script cancellation. */ if (cancelInfo->flags & TCL_CANCEL_UNWIND) { iPtr->flags |= TCL_CANCEL_UNWIND; @@ -3636,8 +3636,8 @@ TclInterpReady( * * TclResetCancellation -- * - * Reset the script cancellation flags if the nesting level - * (iPtr->numLevels) for the interp is zero or argument force is + * Reset the script cancellation flags if the nesting level + * (iPtr->numLevels) for the interp is zero or argument force is * non-zero. * * Results: @@ -3702,23 +3702,23 @@ Tcl_Canceled( /* * Traverse up the to the top-level interp, checking for the - * CANCELED flag along the way. If any of the intervening - * interps have the CANCELED flag set, the current script in + * CANCELED flag along the way. If any of the intervening + * interps have the CANCELED flag set, the current script in * progress is considered to be canceled and we stop checking. - * Otherwise, if any interp has the DELETED flag set we stop + * Otherwise, if any interp has the DELETED flag set we stop * checking. */ for (; iPtr != NULL; iPtr = (Interp *) Tcl_GetMaster((Tcl_Interp *)iPtr)) { /* * Has the current script in progress for this interpreter been - * canceled or is the stack being unwound due to the previous + * canceled or is the stack being unwound due to the previous * script cancellation? */ if ((iPtr->flags & CANCELED) || (iPtr->flags & TCL_CANCEL_UNWIND)) { - /* + /* * The CANCELED flag is a one-shot flag that is reset immediately * upon being detected; however, if the TCL_CANCEL_UNWIND flag is - * set we will continue to report that the script in progress has + * set we will continue to report that the script in progress has * been canceled thereby allowing the evaluation stack for the * interp to be fully unwound. */ @@ -3726,7 +3726,7 @@ Tcl_Canceled( /* * The CANCELED flag was detected and reset; however, if the caller - * specified the TCL_CANCEL_UNWIND flag, we only return TCL_ERROR + * specified the TCL_CANCEL_UNWIND flag, we only return TCL_ERROR * (indicating that the script in progress has been canceled) if the * evaluation stack for the interp is being fully unwound. */ @@ -3766,13 +3766,13 @@ Tcl_Canceled( /* * Return TCL_ERROR to the caller (not necessarily just the Tcl core * itself) that indicates further processing of the script or command - * in progress should halt gracefully and as soon as possible. + * in progress should halt gracefully and as soon as possible. */ return TCL_ERROR; } } else { /* - * FIXME: If this interpreter is being deleted we cannot continue to + * FIXME: If this interpreter is being deleted we cannot continue to * traverse up the interp chain due to an issue with * Tcl_GetMaster (really the slave interp bookkeeping) that * causes us to run off into a freed interp struct. Ideally, @@ -3800,7 +3800,7 @@ Tcl_Canceled( * Results: * The return value is a standard Tcl completion code such as TCL_OK or * TCL_ERROR. Since the interp may belong to a different thread, no - * error message can be left in the interp's result. + * error message can be left in the interp's result. * * Side effects: * The script in progress in the specified interpreter will be @@ -3837,10 +3837,10 @@ Tcl_CancelEval( if (cancelInfo != NULL) { /* - * Populate information needed by the interpreter thread - * to fulfill the cancellation request. Currently, + * Populate information needed by the interpreter thread + * to fulfill the cancellation request. Currently, * clientData is ignored. If the TCL_CANCEL_UNWIND flags - * bit is set, the script in progress is not allowed to + * bit is set, the script in progress is not allowed to * catch the script cancellation because the evaluation * stack for the interp is completely unwound. */ @@ -3875,7 +3875,7 @@ Tcl_CancelEval( } } else { /* - * No CancelInfo hash table (Tcl_CreateInterp + * No CancelInfo hash table (Tcl_CreateInterp * has never been called?) */ code = TCL_ERROR; @@ -3922,7 +3922,7 @@ Tcl_EvalObjv( TEOV_record *rootPtr = TOP_RECORD(iPtr); TEOV_record *recordPtr; - + Tcl_ObjCmdProc *objProc; ClientData objClientData; int tebcCall = TEBC_CALL(iPtr); @@ -3949,12 +3949,12 @@ Tcl_EvalObjv( */ PUSH_RECORD(interp, recordPtr); - + /* * Push records for task to be done on return, in INVERSE order. First, if * needed, the exception handlers (as they should happen last). */ - + if (!(flags & TCL_EVAL_NOERR)) { TEOV_PushExceptionHandlers(interp, objc, objv, flags); } @@ -3983,11 +3983,11 @@ Tcl_EvalObjv( iPtr->ensembleRewrite.sourceObjs = NULL; } - + /* * Lookup the command */ - + cmdPtr = TEOV_LookupCmdFromObj(interp, objv[0], lookupNsPtr); if (!cmdPtr) { notFound: @@ -3999,7 +3999,7 @@ Tcl_EvalObjv( if (iPtr->tracePtr || (cmdPtr->flags & CMD_HAS_EXEC_TRACES)) { /* * Call enter traces. They will schedule a call to the leave traces if - * necessary. + * necessary. */ result = TEOV_RunEnterTraces(interp, &cmdPtr, objc, objv, lookupNsPtr); @@ -4011,7 +4011,7 @@ Tcl_EvalObjv( goto done; } } - + /* * Found a command! The real work begins now ... */ @@ -4051,7 +4051,7 @@ Tcl_EvalObjv( * * Note that I removed the DTRACE thing: I have not really thought * about where it really belongs, and do not really know what it does - * either. + * either. */ iPtr->cmdCount++; @@ -4065,11 +4065,11 @@ Tcl_EvalObjv( if (!objProc) { objProc = cmdPtr->objProc; } - objClientData = cmdPtr->objClientData; - + objClientData = cmdPtr->objClientData; + COMPLETE_RECORD(recordPtr); cmdPtr->refCount++; - + objProcReentryPoint: /* * If this is an NR-enabled command, find the real objProc. @@ -4082,11 +4082,11 @@ Tcl_EvalObjv( #endif goto done; } - + /* * We got a valid callback request: let us complete the corresponding - * record and proceed with the next call. - */ + * record and proceed with the next call. + */ switch(recordPtr->type) { case TCL_NR_NO_TYPE: { @@ -4098,7 +4098,7 @@ Tcl_EvalObjv( /* * We were called by TEBC, and we need a bytecode to be * executed: just ask our caller to do that. - * TEBC_CALL(iPtr) = TEBC_DO_EXEC = 0 is not really needed, as + * TEBC_CALL(iPtr) = TEBC_DO_EXEC = 0 is not really needed, as * it is already 0==TEBC_DO_EXEC */ @@ -4106,10 +4106,10 @@ Tcl_EvalObjv( TEBC_DATA(iPtr) = recordPtr->data.codePtr; return TCL_OK; } - + /* - * No TEBC atop - we'll just have to instantiate a new one and - * do the callback on return. + * No TEBC atop - we'll just have to instantiate a new one and + * do the callback on return. */ result = TclExecuteByteCode(interp, recordPtr->data.codePtr); @@ -4122,9 +4122,9 @@ Tcl_EvalObjv( */ Tcl_Obj *tailObjPtr = recordPtr->data.obj.objPtr; - + result = TclEvalObjv_NR2(interp, result, rootPtr); - + if (result != TCL_OK) { goto done; } @@ -4138,12 +4138,12 @@ Tcl_EvalObjv( TEBC_DATA(iPtr) = tailObjPtr; return TCL_OK; } - + /* * ONLY supported if called from TEBC. Could do an 'uplevel 1'? * Run from here (as hinted below)? Mmhhh ... FIXME. Maybe * tailcalls SHOULD actually be bytecompiled (we know how to more - * or less fake it when falling off TEBC)? + * or less fake it when falling off TEBC)? */ Tcl_Panic("tailcall called from a non-compiled command?"); @@ -4151,7 +4151,7 @@ Tcl_EvalObjv( } case TCL_NR_CMD_TYPE: { /* - * We got an unshared canonical list to eval , do it from here. + * We got an unshared canonical list to eval , do it from here. */ Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; @@ -4248,13 +4248,13 @@ int TclEvalObjv_NR2( } /* - * Decrement the reference count of cmdPtr and deallocate it if it has + * Decrement the reference count of cmdPtr and deallocate it if it has * dropped to zero. The level only needs fixing for records that - * pushed a cmdPtr. + * pushed a cmdPtr. */ if (recordPtr->cmdPtr) { - TclCleanupCommandMacro(recordPtr->cmdPtr); + TclCleanupCommandMacro(recordPtr->cmdPtr); iPtr->numLevels--; } @@ -4263,9 +4263,9 @@ int TclEvalObjv_NR2( /* * Do not interrupt a series of cleanups with async or limit checks: just - * check at the end. + * check at the end. */ - + if (TclAsyncReady(iPtr)) { result = Tcl_AsyncInvoke(interp, result); } @@ -4273,7 +4273,7 @@ int TclEvalObjv_NR2( if (result == TCL_OK) { result = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); } - + if (result == TCL_OK && TclLimitReady(iPtr->limit)) { result = Tcl_LimitCheck(interp); } @@ -4290,7 +4290,7 @@ int TclEvalObjv_NR2( * TEOV_RunLeaveTraces - * TEOV_NotFound - * - * These are helper functions for Tcl_EvalObjv. + * These are helper functions for Tcl_EvalObjv. * *---------------------------------------------------------------------- */ @@ -4303,7 +4303,7 @@ TEOV_PushExceptionHandlers( int flags) { Interp *iPtr = (Interp *) interp; - + /* * If any error processing is necessary, push the appropriate * records. Note that we have to push them in the inverse order: first @@ -4314,16 +4314,16 @@ TEOV_PushExceptionHandlers( /* * Error messages */ - + TclNR_AddCallback(interp, TEOV_Error, INT2PTR(objc), (ClientData) objv, NULL, NULL); } - + if (iPtr->numLevels == 1) { /* * No CONTINUE or BREAK at level 0, manage RETURN */ - + TclNR_AddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL); } } @@ -4333,12 +4333,12 @@ TEOV_SwitchVarFrame( Tcl_Interp *interp) { Interp *iPtr = (Interp *) interp; - + /* * Change the varFrame to be the rootVarFrame, and push a record * to restore things at the end. */ - + TclNR_AddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, NULL, NULL); iPtr->varFramePtr = iPtr->rootFramePtr; } @@ -4361,7 +4361,7 @@ TEOV_Exception( { Interp *iPtr = (Interp *) interp; int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); - + if (result != TCL_OK) { if (result == TCL_RETURN) { result = TclUpdateReturnInfo(iPtr); @@ -4386,7 +4386,7 @@ TEOV_Error( int cmdLen; int objc = PTR2INT(data[0]); Tcl_Obj **objv = data[1]; - + if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)){ /* * If there was an error, a command string will be needed for the @@ -4394,7 +4394,7 @@ TEOV_Error( * type */ - listPtr = Tcl_NewListObj(objc, objv); + listPtr = Tcl_NewListObj(objc, objv); cmdString = Tcl_GetStringFromObj(listPtr, &cmdLen); Tcl_LogCommandInfo(interp, cmdString, cmdString, cmdLen); Tcl_DecrRefCount(listPtr); @@ -4441,32 +4441,32 @@ TEOV_NotFound( TclNewLiteralStringObj(currNsPtr->unknownHandlerPtr, "::unknown"); Tcl_IncrRefCount(currNsPtr->unknownHandlerPtr); } - + /* * Get the list of words for the unknown handler and allocate enough * space to hold both the handler prefix and all words of the command * invokation itself. */ - + Tcl_ListObjGetElements(NULL, currNsPtr->unknownHandlerPtr, &handlerObjc, &handlerObjv); newObjc = objc + handlerObjc; newObjv = (Tcl_Obj **) TclStackAlloc(interp, (int) sizeof(Tcl_Obj *) * newObjc); - + /* * Copy command prefix from unknown handler and add on the real * command's full argument list. Note that we only use memcpy() once * because we have to increment the reference count of all the handler * arguments anyway. */ - + for (i = 0; i < handlerObjc; ++i) { newObjv[i] = handlerObjv[i]; Tcl_IncrRefCount(newObjv[i]); } memcpy(newObjv+handlerObjc, objv, sizeof(Tcl_Obj *) * (unsigned)objc); - + /* * Look up and invoke the handler (by recursive call to this * function). If there is no handler at all, instead of doing the @@ -4476,7 +4476,7 @@ TEOV_NotFound( * In this case we worry a bit less about recursion for now, and call * the "blocking" interface. */ - + cmdPtr = TEOV_LookupCmdFromObj(interp, newObjv[0], lookupNsPtr); if (cmdPtr == NULL) { Tcl_AppendResult(interp, "invalid command name \"", @@ -4492,12 +4492,12 @@ TEOV_NotFound( varFramePtr->nsPtr = savedNsPtr; } } - + /* * Release any resources we locked and allocated during the handler * call. */ - + for (i = 0; i < handlerObjc; ++i) { Tcl_DecrRefCount(newObjv[i]); } @@ -4521,17 +4521,17 @@ TEOV_RunEnterTraces( char *command; int length; Tcl_Obj *commandPtr; - + commandPtr = GetCommandSource(iPtr, objc, objv, 1); command = Tcl_GetStringFromObj(commandPtr, &length); - + /* * Call trace functions * Execute any command or execution traces. Note that we bump up the * command's reference count for the duration of the calling of the * traces so that the structure doesn't go away underneath our feet. */ - + cmdPtr->refCount++; if (iPtr->tracePtr) { traceCode = TclCheckInterpTraces(interp, command, length, @@ -4543,13 +4543,13 @@ TEOV_RunEnterTraces( } newEpoch = cmdPtr->cmdEpoch; TclCleanupCommandMacro(cmdPtr); - + /* * If the traces modified/deleted the command or any existing traces, * they will update the command's epoch. We need to lookup again, but do * not run enter traces on the newly found cmdPtr. */ - + if (cmdEpoch != newEpoch) { cmdPtr = TEOV_LookupCmdFromObj(interp, objv[0], lookupNsPtr); *cmdPtrPtr = cmdPtr; @@ -4560,7 +4560,7 @@ TEOV_RunEnterTraces( * Command was found: push a record to schedule * the leave traces. */ - + TclNR_AddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode), commandPtr, cmdPtr, NULL); cmdPtr->refCount++; @@ -4585,7 +4585,7 @@ TEOV_RunLeaveTraces( int traceCode = PTR2INT(data[0]); Tcl_Obj *commandPtr = data[1]; Command *cmdPtr = data[2]; - + command = Tcl_GetStringFromObj(commandPtr, &length); if (TCL_OK != Tcl_ListObjGetElements(interp, commandPtr, &objc, &objv)) { Tcl_Panic("Who messed with commandPtr?"); @@ -4609,7 +4609,7 @@ TEOV_RunLeaveTraces( * here with cmdPtr->refCount. */ - TclCleanupCommandMacro(cmdPtr); + TclCleanupCommandMacro(cmdPtr); if (traceCode != TCL_OK) { return traceCode; @@ -4627,7 +4627,7 @@ TEOV_LookupCmdFromObj( Interp *iPtr = (Interp *) interp; Command *cmdPtr; Namespace *savedNsPtr = iPtr->varFramePtr->nsPtr; - + if (lookupNsPtr) { iPtr->varFramePtr->nsPtr = lookupNsPtr; iPtr->lookupNsPtr = NULL; @@ -5324,13 +5324,13 @@ TclEvalObjEx( /* * Push an empty record. If this is an NR call, it will modify it - * accordingly. + * accordingly. */ PUSH_RECORD(interp, recordPtr); result = TclNREvalObjEx(interp, objPtr, flags, invoker, word); - assert((TOP_RECORD(interp) == recordPtr)); - return NRPostProcess(interp, result, 0, NULL); + assert((TOP_RECORD(interp) == recordPtr)); + return NRPostProcess(interp, result, 0, NULL); } int @@ -5365,10 +5365,10 @@ TclNREvalObjEx( * either pure or that has its string rep derived by * UpdateStringOfList from the internal rep). */ - + if (objPtr->typePtr == &tclListType) { /* is a list... */ List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; - + if (objPtr->bytes == NULL || /* ...without a string rep */ listRepPtr->canonicalFlag) {/* ...or that is canonical */ /* @@ -5376,39 +5376,39 @@ TclNREvalObjEx( * this is dynamic execution we ignore the invoker, even if * known. */ - + int line, i; char *w; Tcl_Obj **elements, *copyPtr = TclListObjCopy(NULL, objPtr); CmdFrame *eoFramePtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); - + eoFramePtr->type = TCL_LOCATION_EVAL_LIST; eoFramePtr->level = (iPtr->cmdFramePtr == NULL? 1 : iPtr->cmdFramePtr->level + 1); eoFramePtr->framePtr = iPtr->framePtr; eoFramePtr->nextPtr = iPtr->cmdFramePtr; - + Tcl_ListObjGetElements(NULL, copyPtr, &(eoFramePtr->nline), &elements); eoFramePtr->line = (int *) ckalloc(eoFramePtr->nline * sizeof(int)); - + eoFramePtr->cmd.listPtr = objPtr; eoFramePtr->data.eval.path = NULL; - + /* * TIP #280 Computes all the line numbers for the words in the * command. */ - + line = 1; for (i=0; i < eoFramePtr->nline; i++) { eoFramePtr->line[i] = line; w = TclGetString(elements[i]); TclAdvanceLines(&line, w, w + strlen(w)); } - + iPtr->cmdFramePtr = eoFramePtr; TclNR_AddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, @@ -5429,7 +5429,7 @@ TclNREvalObjEx( CallFrame *savedVarFramePtr = NULL; /* Saves old copy of iPtr->varFramePtr in * case TCL_EVAL_GLOBAL was set. */ - + if (flags & TCL_EVAL_GLOBAL) { savedVarFramePtr = iPtr->varFramePtr; iPtr->varFramePtr = iPtr->rootFramePtr; @@ -5440,7 +5440,7 @@ TclNREvalObjEx( newCodePtr = TclCompileObj(interp, objPtr, invoker, word); if (newCodePtr) { TEOV_record *recordPtr = TOP_RECORD(interp); - + recordPtr->type = TCL_NR_BC_TYPE; recordPtr->data.codePtr = newCodePtr; return TCL_OK; @@ -5448,7 +5448,7 @@ TclNREvalObjEx( return TCL_ERROR; } } - + /* * We're not supposed to use the compiler or byte-code interpreter. * Let Tcl_EvalEx evaluate the command directly (and probably more @@ -5462,12 +5462,12 @@ TclNREvalObjEx( * See also tclCompile.c, TclInitCompileEnv, for the equivalent code * in the bytecode compiler. */ - + if (invoker == NULL) { /* * No context, force opening of our own. */ - + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = Tcl_EvalEx(interp, script, numSrcBytes, flags); } else { @@ -5483,53 +5483,53 @@ TclNREvalObjEx( * through the easy dynamic branch. No need to perform more * complex invokations. */ - + if ((invoker->nline <= word) || (invoker->line[word] < 0)) { /* * Dynamic script, or dynamic context, force our own * context. */ - + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = Tcl_EvalEx(interp, script, numSrcBytes, flags); - + } else { /* * Try to get an absolute context for the evaluation. */ - + int pc = 0; CmdFrame *ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); - + *ctxPtr = *invoker; if (invoker->type == TCL_LOCATION_BC) { /* * Note: Type BC => ctxPtr->data.eval.path is not used. * ctxPtr->data.tebc.codePtr is used instead. */ - + TclGetSrcInfoForPc(ctxPtr); pc = 1; } - + if (ctxPtr->type == TCL_LOCATION_SOURCE) { /* * Absolute context to reuse. */ - + iPtr->invokeCmdFramePtr = ctxPtr; iPtr->evalFlags |= TCL_EVAL_CTX; - + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = TclEvalEx(interp, script, numSrcBytes, flags, ctxPtr->line[word]); - + if (pc) { /* * Death of SrcInfo reference. */ - + Tcl_DecrRefCount(ctxPtr->data.eval.path); } } else { @@ -5537,11 +5537,11 @@ TclNREvalObjEx( * Dynamic context or script, easier to make our own as * well. */ - + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = Tcl_EvalEx(interp, script, numSrcBytes, flags); } - + TclStackFree(interp, ctxPtr); } } @@ -5560,8 +5560,8 @@ TEOEx_ByteCodeCallback( Tcl_Obj *objPtr = data[1]; int allowExceptions = PTR2INT(data[2]); char *script; - int numSrcBytes; - + int numSrcBytes; + if (iPtr->numLevels == 0) { if (result == TCL_RETURN) { result = TclUpdateReturnInfo(iPtr); @@ -5574,14 +5574,14 @@ TEOEx_ByteCodeCallback( Tcl_LogCommandInfo(interp, script, script, numSrcBytes); } } - iPtr->evalFlags = 0; - + iPtr->evalFlags = 0; + /* Restore the callFrame if this was a TCL_EVAL_GLOBAL */ - + if (savedVarFramePtr) { iPtr->varFramePtr = savedVarFramePtr; } - + TclDecrRefCount(objPtr); return result; } @@ -5596,7 +5596,7 @@ TEOEx_ListCallback( Tcl_Obj *objPtr = data[0]; CmdFrame *eoFramePtr = data[1]; Tcl_Obj *copyPtr = data[2]; - + /* Remove the cmdFrame if it was added */ Tcl_DecrRefCount(copyPtr); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; @@ -5604,7 +5604,7 @@ TEOEx_ListCallback( eoFramePtr->line = NULL; eoFramePtr->nline = 0; TclStackFree(interp, eoFramePtr); - + TclDecrRefCount(objPtr); return result; } @@ -7406,7 +7406,7 @@ TclNR_CallObjProc( /* * Push an empty record. If this is an NR call, it will modify it - * accordingly. + * accordingly. */ PUSH_RECORD(interp, recordPtr); @@ -7434,7 +7434,7 @@ NRPostProcess( int flags = recordPtr->data.obj.flags; Tcl_Obj **objv; int objc; - + Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); result = Tcl_EvalObjv(interp, objc, objv, flags); break; @@ -7449,7 +7449,7 @@ NRPostProcess( case TCL_NR_OBJPROC_TYPE: { Tcl_ObjCmdProc *objProc = recordPtr->data.objProc.objProc; ClientData clientData = recordPtr->data.objProc.clientData; - + if (!objc) { Tcl_Panic("NRPostProcess: something is very wrong!"); } @@ -7506,7 +7506,7 @@ TclNR_CreateCommand( Tcl_ObjCmdProc *nreProc, /* Object-based function to associate with * name, provides NR implementation */ ClientData clientData, /* Arbitrary value to pass to object - * function. */ + * function. */ Tcl_CmdDeleteProc *deleteProc) /* If not NULL, gives a function to call when * this command is deleted. */ @@ -7524,7 +7524,7 @@ TclNR_CreateCommand( * These are the previous contents of tclNRE.c, part of the NRE api. * */ - + /* * TclNREvalCmd should only be called as an optimisation: when objPtr is known @@ -7582,18 +7582,18 @@ TclNR_EvalObj( /* * Shimmer protection! Always pass an unshared obj. The caller could * incr the refCount of objPtr AFTER calling us! To be completely safe - * we always make a copy. + * we always make a copy. */ - + Tcl_Obj *origPtr = objPtr; - + objPtr = TclListObjCopy(NULL, origPtr); Tcl_IncrRefCount(objPtr); TclDecrRefCount(origPtr); - recordPtr->type = TCL_NR_CMD_TYPE; + recordPtr->type = TCL_NR_CMD_TYPE; } else { - recordPtr->type = TCL_NR_SCRIPT_TYPE; + recordPtr->type = TCL_NR_SCRIPT_TYPE; } recordPtr->data.obj.objPtr = objPtr; recordPtr->data.obj.flags = flags; @@ -7628,7 +7628,7 @@ TclNR_ObjProc( * with two caveats * (a) the current frame is dropped first, after running all * pending cleanup tasks and saving its namespace - * (b) 'a' is looked up in the returning frame's namespace, but the + * (b) 'a' is looked up in the returning frame's namespace, but the * command is run in the context to which we are returning * Current implementation does this if [tailcall] is called from within * a proc, panics otherwise- @@ -7667,7 +7667,7 @@ TclTailcallObjCmd( void TclNR_AddCallback( Tcl_Interp *interp, - TclNR_PostProc *postProcPtr, + TclNR_PostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, @@ -7679,7 +7679,7 @@ void TclNR_AddCallback( if (!postProcPtr) { Tcl_Panic("Adding a callback without and objProc?!"); } - + recordPtr = TOP_RECORD(interp); TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); @@ -7688,7 +7688,7 @@ void TclNR_AddCallback( callbackPtr->data1 = data1; callbackPtr->data2 = data2; callbackPtr->data3 = data3; - + callbackPtr->nextPtr = recordPtr->callbackPtr; recordPtr->callbackPtr = callbackPtr; } -- cgit v0.12 From 5317c96fe29f6bfe0a3c6c5b717a083452f4d4e6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Jul 2008 16:07:18 +0000 Subject: * generic/tclInt.h: the new macros TclSmallAlloc and TclSmallFree were badly defined under mem debugging [Bug 2017240] (thx das) --- ChangeLog | 5 +++++ generic/tclInt.h | 27 ++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2cd3ae8..b9ae7b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-14 Miguel Sofer + + * generic/tclInt.h: the new macros TclSmallAlloc and TclSmallFree + were badly defined under mem debugging [Bug 2017240] (thx das) + 2008-07-13 Miguel Sofer NRE implementation [Patch 2017110] diff --git a/generic/tclInt.h b/generic/tclInt.h index 9e0f6ce..202f5b8 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.372 2008/07/13 09:03:34 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.373 2008/07/13 16:07:19 msofer Exp $ */ #ifndef _TCLINT @@ -3912,6 +3912,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, * DO NOT LET THEM CROSS THREAD BOUNDARIES */ +#ifndef TCL_MEM_DEBUG #define TclSmallAlloc(nbytes, memPtr) \ { \ Tcl_Obj *objPtr; \ @@ -3931,6 +3932,30 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, TclFreeObjStorage((Tcl_Obj *) memPtr); \ TclIncrObjsFreed() +#else /* TCL_MEM_DEBUG */ +#define TclSmallAlloc(nbytes, memPtr) \ + { \ + Tcl_Obj *objPtr; \ + switch ((nbytes)>sizeof(Tcl_Obj)) { \ + case (2 +((nbytes)>sizeof(Tcl_Obj))): \ + case 3: \ + case 1: \ + Tcl_Panic("TclSmallAlloc: nBytes too large!"); \ + case 0: (void)0; \ + } \ + TclNewObj(objPtr); \ + memPtr = (ClientData) objPtr; \ + } + +#define TclSmallFree(memPtr) \ + { \ + Tcl_Obj *objPtr = (Tcl_Obj *) memPtr; \ + objPtr->bytes = NULL; \ + objPtr->typePtr = NULL; \ + objPtr->refCount = 1; \ + TclDecrRefCount(objPtr); \ + } +#endif /* TCL_MEM_DEBUG */ #include "tclPort.h" -- cgit v0.12 From 28f4419947aa4b448501687014bb415dc7096511 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Jul 2008 22:42:24 +0000 Subject: * generic/tclBasic.c: TclResetCancellation() calls were misplaced (merge mishap); stray //. Thanks patthoyts. --- ChangeLog | 3 +++ generic/tclBasic.c | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9ae7b8..2bd7012 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-14 Miguel Sofer + * generic/tclBasic.c: TclResetCancellation() calls were misplaced + (merge mishap); stray //. Thanks patthoyts. + * generic/tclInt.h: the new macros TclSmallAlloc and TclSmallFree were badly defined under mem debugging [Bug 2017240] (thx das) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0eabf22..174a74f 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.306 2008/07/13 15:56:46 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.307 2008/07/13 22:42:25 msofer Exp $ */ #include "tclInt.h" @@ -3930,6 +3930,7 @@ Tcl_EvalObjv( TEBC_CALL(iPtr) = 0; restartAtTop: + TclResetCancellation(interp, 0); iPtr->numLevels++; result = TclInterpReady(interp); @@ -4228,12 +4229,10 @@ int TclEvalObjv_NR2( (void) Tcl_GetObjResult(interp); } - TclResetCancellation(interp, 0); - while (TOP_RECORD(iPtr) != rootPtr) { POP_RECORD(iPtr, recordPtr); - while (recordPtr->callbackPtr) {// + while (recordPtr->callbackPtr) { TEOV_callback *callbackPtr = recordPtr->callbackPtr; result = (*callbackPtr->procPtr)(&callbackPtr->data0, interp, result); @@ -4577,8 +4576,6 @@ TEOV_RunLeaveTraces( int result) { Interp *iPtr = (Interp *) interp; - - TclResetCancellation(interp, 0); char *command; int length, objc; Tcl_Obj **objv; -- cgit v0.12 From ad35d9b5b7a3de682d371c0bb686815f1c5e849e Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 13 Jul 2008 23:15:21 +0000 Subject: more consistent wrong # arg messages: change all messages containing ?options? to the form ?-option value ...? --- doc/http.n | 6 +++--- doc/lindex.n | 4 ++-- doc/lset.n | 4 ++-- doc/tcltest.n | 10 +++++----- generic/tclClock.c | 4 ++-- generic/tclCmdIL.c | 10 +++++----- generic/tclFCmd.c | 8 ++++---- generic/tclIOCmd.c | 4 ++-- generic/tclInterp.c | 10 +++++----- generic/tclOOInfo.c | 6 +++--- generic/tclPkg.c | 4 ++-- tests/chan.test | 4 ++-- tests/cmdIL.test | 4 ++-- tests/fCmd.test | 6 +++--- tests/indexObj.test | 6 +++--- tests/interp.test | 6 +++--- tests/ioCmd.test | 6 +++--- tests/lindex.test | 6 +++--- tests/lsearch.test | 6 +++--- tests/lset.test | 2 +- tests/lsetComp.test | 2 +- tests/pkg.test | 20 ++++++++++---------- tests/var.test | 6 +++--- 23 files changed, 72 insertions(+), 72 deletions(-) diff --git a/doc/http.n b/doc/http.n index d0b3c52..6cfb7cb 100644 --- a/doc/http.n +++ b/doc/http.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: http.n,v 1.36 2008/03/12 10:01:02 hobbs Exp $ +'\" RCS: @(#) $Id: http.n,v 1.37 2008/07/13 23:15:23 nijtmans Exp $ '\" .so man.macros .TH "http" n 2.7 http "Tcl Bundled Packages" @@ -18,9 +18,9 @@ http \- Client-side implementation of the HTTP/1.1 protocol \fBpackage require http ?2.7?\fR .\" See Also -useragent option documentation in body! .sp -\fB::http::config \fI?options?\fR +\fB::http::config ?\fI-option value\fR ...? .sp -\fB::http::geturl \fIurl ?options?\fR +\fB::http::geturl \fIurl\fR ?\fI-option value\fR ...? .sp \fB::http::formatQuery\fR \fIkey value\fR ?\fIkey value\fR ...? .sp diff --git a/doc/lindex.n b/doc/lindex.n index 39682d9..3214cc7 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lindex.n,v 1.19 2008/07/06 09:42:58 dkf Exp $ +'\" RCS: @(#) $Id: lindex.n,v 1.20 2008/07/13 23:15:23 nijtmans Exp $ '\" .so man.macros .TH lindex n 8.4 Tcl "Tcl Built-In Commands" @@ -15,7 +15,7 @@ .SH NAME lindex \- Retrieve an element from a list .SH SYNOPSIS -\fBlindex \fIlist ?index...?\fR +\fBlindex \fIlist ?index ...?\fR .BE .SH DESCRIPTION .PP diff --git a/doc/lset.n b/doc/lset.n index b13f2b1..0e95353 100755 --- a/doc/lset.n +++ b/doc/lset.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lset.n,v 1.16 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: lset.n,v 1.17 2008/07/13 23:15:23 nijtmans Exp $ '\" .so man.macros .TH lset n 8.4 Tcl "Tcl Built-In Commands" @@ -13,7 +13,7 @@ .SH NAME lset \- Change an element in a list .SH SYNOPSIS -\fBlset \fIvarName ?index...? newValue\fR +\fBlset \fIvarName ?index ...? newValue\fR .BE .SH DESCRIPTION .PP diff --git a/doc/tcltest.n b/doc/tcltest.n index 65245bf..88320cc 100644 --- a/doc/tcltest.n +++ b/doc/tcltest.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tcltest.n,v 1.55 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: tcltest.n,v 1.56 2008/07/13 23:15:23 nijtmans Exp $ '\" .so man.macros .TH "tcltest" n 2.3 tcltest "Tcl Bundled Packages" @@ -20,7 +20,7 @@ tcltest \- Test harness support code and utilities .nf \fBpackage require tcltest ?2.3?\fR .sp -\fBtcltest::test \fIname description ?option value ...?\fR +\fBtcltest::test \fIname description ?-option value ...?\fR \fBtcltest::test \fIname description ?constraints? body result\fR .sp \fBtcltest::loadTestedCommands\fR @@ -34,7 +34,7 @@ tcltest \- Test harness support code and utilities .sp \fBtcltest::configure\fR \fBtcltest::configure \fIoption\fR -\fBtcltest::configure \fIoption value ?option value ...?\fR +\fBtcltest::configure \fIoption value ?-option value ...?\fR \fBtcltest::customMatch \fImode command\fR \fBtcltest::testConstraint \fIconstraint ?value?\fR \fBtcltest::outputChannel \fI?channelID?\fR @@ -92,7 +92,7 @@ of how to use the commands of \fBtcltest\fR to produce test suites for your Tcl-enabled code. .SH COMMANDS .TP -\fBtest\fR \fIname description ?option value ...?\fR +\fBtest\fR \fIname description ?-option value ...?\fR Defines and possibly runs a test with the name \fIname\fR and description \fIdescription\fR. The name and description of a test are used in messages reported by \fBtest\fR during the @@ -211,7 +211,7 @@ their valid values, and their effect on \fBtcltest\fR operations. Returns the current value of the supported configurable option \fIoption\fR. Raises an error if \fIoption\fR is not a supported configurable option. .TP -\fBconfigure \fIoption value ?option value ...?\fR +\fBconfigure \fIoption value ?-option value ...?\fR Sets the value of each configurable option \fIoption\fR to the corresponding value \fIvalue\fR, in order. Raises an error if an \fIoption\fR is not a supported configurable option, or if diff --git a/generic/tclClock.c b/generic/tclClock.c index abf70ef..68db1a4 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.68 2008/06/17 17:22:48 andreas_kupries Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.69 2008/07/13 23:15:22 nijtmans Exp $ */ #include "tclInt.h" @@ -1707,7 +1707,7 @@ ClockClicksObjCmd( } break; default: - Tcl_WrongNumArgs(interp, 1, objv, "?option?"); + Tcl_WrongNumArgs(interp, 1, objv, "?-option?"); return TCL_ERROR; } diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 4eef275..b7ea47d 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.143 2008/07/07 21:40:18 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.144 2008/07/13 23:15:22 nijtmans Exp $ */ #include "tclInt.h" @@ -2114,7 +2114,7 @@ Tcl_LindexObjCmd( Tcl_Obj *elemPtr; /* Pointer to the element being extracted. */ if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "list ?index...?"); + Tcl_WrongNumArgs(interp, 1, objv, "list ?index ...?"); return TCL_ERROR; } @@ -2764,7 +2764,7 @@ Tcl_LsearchObjCmd( sortInfo.indexc = 0; if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "?options? list pattern"); + Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...? list pattern"); return TCL_ERROR; } @@ -3386,7 +3386,7 @@ Tcl_LsetObjCmd( */ if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "listVar index ?index...? value"); + Tcl_WrongNumArgs(interp, 1, objv, "listVar index ?index ...? value"); return TCL_ERROR; } @@ -3486,7 +3486,7 @@ Tcl_LsortObjCmd( SortElement *subList[NUM_LISTS+1]; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "?options? list"); + Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...? list"); return TCL_ERROR; } diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index c811f1a..01eea62 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.44 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.45 2008/07/13 23:15:23 nijtmans Exp $ */ #include "tclInt.h" @@ -121,7 +121,7 @@ FileCopyRename( if ((objc - i) < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", TclGetString(objv[0]), " ", TclGetString(objv[1]), - " ?options? source ?source ...? target\"", NULL); + " ?-option value ...? source ?source ...? target\"", NULL); return TCL_ERROR; } @@ -354,7 +354,7 @@ TclFileDeleteCmd( if ((objc - i) < 1) { Tcl_AppendResult(interp, "wrong # args: should be \"", TclGetString(objv[0]), " ", TclGetString(objv[1]), - " ?options? file ?file ...?\"", NULL); + " ?-option value ...? file ?file ...?\"", NULL); return TCL_ERROR; } @@ -955,7 +955,7 @@ TclFileAttrsCmd( if (objc < 3) { Tcl_WrongNumArgs(interp, 2, objv, - "name ?option? ?value? ?option value ...?"); + "name ?-option value ...?"); return TCL_ERROR; } diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 131b905..6549e98 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.54 2008/06/06 19:46:36 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.55 2008/07/13 23:15:22 nijtmans Exp $ */ #include "tclInt.h" @@ -718,7 +718,7 @@ Tcl_FconfigureObjCmd( if ((objc < 2) || (((objc % 2) == 1) && (objc != 3))) { Tcl_WrongNumArgs(interp, 1, objv, - "channelId ?optionName? ?value? ?optionName value?..."); + "channelId ?-option value ...?"); return TCL_ERROR; } diff --git a/generic/tclInterp.c b/generic/tclInterp.c index c4f8515..f2975d0 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.87 2008/07/13 09:03:35 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.88 2008/07/13 23:15:23 nijtmans Exp $ */ #include "tclInt.h" @@ -928,7 +928,7 @@ Tcl_InterpObjCmd( int limitType; if (objc < 4) { - Tcl_WrongNumArgs(interp, 2, objv, "path limitType ?options?"); + Tcl_WrongNumArgs(interp, 2, objv, "path limitType ?-option value ...?"); return TCL_ERROR; } slaveInterp = GetInterp(interp, objv[2]); @@ -2502,7 +2502,7 @@ SlaveObjCmd( int limitType; if (objc < 3) { - Tcl_WrongNumArgs(interp, 2, objv, "limitType ?options?"); + Tcl_WrongNumArgs(interp, 2, objv, "limitType ?-option value ...?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[2], limitTypes, "limit type", 0, @@ -4230,7 +4230,7 @@ SlaveCommandLimitCmd( return TCL_OK; } else if ((objc-consumedObjc) & 1 /* isOdd(objc-consumedObjc) */) { Tcl_WrongNumArgs(interp, consumedObjc, objv, - "?-option? ?value? ?-option value ...?"); + "?-option value ...?"); return TCL_ERROR; } else { int i, scriptLen = 0, limitLen = 0; @@ -4418,7 +4418,7 @@ SlaveTimeLimitCmd( return TCL_OK; } else if ((objc-consumedObjc) & 1 /* isOdd(objc-consumedObjc) */) { Tcl_WrongNumArgs(interp, consumedObjc, objv, - "?-option? ?value? ?-option value ...?"); + "?-option value ...?"); return TCL_ERROR; } else { int i, scriptLen = 0, milliLen = 0, secLen = 0; diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index bded40c..ca5830b 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.4 2008/05/31 11:42:18 dkf Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.5 2008/07/13 23:15:22 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -523,7 +523,7 @@ InfoObjectMethodsCmd( }; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "objName ?options...?"); + Tcl_WrongNumArgs(interp, 1, objv, "objName ?-option value ...?"); return TCL_ERROR; } oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); @@ -1060,7 +1060,7 @@ InfoClassMethodsCmd( }; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "className ?options...?"); + Tcl_WrongNumArgs(interp, 1, objv, "className ?-option value ...?"); return TCL_ERROR; } oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 24f3e62..8756587 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.35 2008/04/01 19:26:36 dgp Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.36 2008/07/13 23:15:22 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -949,7 +949,7 @@ Tcl_PackageObjCmd( if (objc < 3) { requireSyntax: Tcl_WrongNumArgs(interp, 2, objv, - "?-exact? package ?requirement...?"); + "?-exact? package ?requirement ...?"); return TCL_ERROR; } diff --git a/tests/chan.test b/tests/chan.test index 72eccbb..ea2529c 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chan.test,v 1.12 2008/06/06 19:46:38 andreas_kupries Exp $ +# RCS: @(#) $Id: chan.test,v 1.13 2008/07/13 23:15:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36,7 +36,7 @@ test chan-3.1 {chan command: close subcommand} -body { test chan-4.1 {chan command: configure subcommand} -body { chan configure -} -returnCodes error -result "wrong # args: should be \"chan configure channelId ?optionName? ?value? ?optionName value?...\"" +} -returnCodes error -result "wrong # args: should be \"chan configure channelId ?-option value ...?\"" test chan-4.2 {chan command: [Bug 800753]} -body { chan configure stdout -eofchar \u0100 } -returnCodes error -match glob -result {bad value*} diff --git a/tests/cmdIL.test b/tests/cmdIL.test index 1f2cf73..cc1546e 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdIL.test,v 1.38 2008/02/13 19:41:20 dgp Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.39 2008/07/13 23:15:21 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -20,7 +20,7 @@ testConstraint memory [llength [info commands memory]] test cmdIL-1.1 {Tcl_LsortObjCmd procedure} { list [catch {lsort} msg] $msg -} {1 {wrong # args: should be "lsort ?options? list"}} +} {1 {wrong # args: should be "lsort ?-option value ...? list"}} test cmdIL-1.2 {Tcl_LsortObjCmd procedure} { list [catch {lsort -foo {1 3 2 5}} msg] $msg } {1 {bad option "-foo": must be -ascii, -command, -decreasing, -dictionary, -increasing, -index, -indices, -integer, -nocase, -real, or -unique}} diff --git a/tests/fCmd.test b/tests/fCmd.test index 3bf6487..0216a10 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.61 2008/04/10 00:21:02 dkf Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.62 2008/07/13 23:15:22 nijtmans Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -165,7 +165,7 @@ test fCmd-3.1 {FileCopyRename: FileForceOption fails} -constraints {notRoot} -bo } -returnCodes error -result {bad option "-xyz": should be -force or --} test fCmd-3.2 {FileCopyRename: not enough args} -constraints {notRoot} -body { file rename xyz -} -returnCodes error -result {wrong # args: should be "file rename ?options? source ?source ...? target"} +} -returnCodes error -result {wrong # args: should be "file rename ?-option value ...? source ?source ...? target"} test fCmd-3.3 {FileCopyRename: Tcl_TranslateFileName fails} -constraints {notRoot} -body { file rename xyz ~_totally_bogus_user } -returnCodes error -result {user "_totally_bogus_user" doesn't exist} @@ -351,7 +351,7 @@ test fCmd-5.1 {TclFileDeleteCmd: FileForceOption fails} -constraints {notRoot} - } -returnCodes error -result {bad option "-xyz": should be -force or --} test fCmd-5.2 {TclFileDeleteCmd: not enough args} -constraints {notRoot} -body { file delete -force -force -} -returnCodes error -result {wrong # args: should be "file delete ?options? file ?file ...?"} +} -returnCodes error -result {wrong # args: should be "file delete ?-option value ...? file ?file ...?"} test fCmd-5.3 {TclFileDeleteCmd: 1 file} {notRoot} { cleanup createfile tf1 diff --git a/tests/indexObj.test b/tests/indexObj.test index 4c1ef49..b5a3304 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: indexObj.test,v 1.15 2006/04/06 18:57:58 dgp Exp $ +# RCS: @(#) $Id: indexObj.test,v 1.16 2008/07/13 23:15:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -88,8 +88,8 @@ test indexObj-4.1 {free old internal representation} testindexobj { } {2} test indexObj-5.1 {Tcl_WrongNumArgs} testindexobj { - testwrongnumargs 1 "?option?" mycmd -} "wrong # args: should be \"mycmd ?option?\"" + testwrongnumargs 1 "?-option?" mycmd +} "wrong # args: should be \"mycmd ?-option?\"" test indexObj-5.2 {Tcl_WrongNumArgs} testindexobj { testwrongnumargs 2 "bar" mycmd foo } "wrong # args: should be \"mycmd foo bar\"" diff --git a/tests/interp.test b/tests/interp.test index a9c9e8d..c47b8a7 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.58 2008/07/13 09:03:35 msofer Exp $ +# RCS: @(#) $Id: interp.test,v 1.59 2008/07/13 23:15:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -3281,10 +3281,10 @@ test interp-34.12 {time limit extension in callbacks} -setup { test interp-35.1 {interp limit syntax} -body { interp limit -} -returnCodes error -result {wrong # args: should be "interp limit path limitType ?options?"} +} -returnCodes error -result {wrong # args: should be "interp limit path limitType ?-option value ...?"} test interp-35.2 {interp limit syntax} -body { interp limit {} -} -returnCodes error -result {wrong # args: should be "interp limit path limitType ?options?"} +} -returnCodes error -result {wrong # args: should be "interp limit path limitType ?-option value ...?"} test interp-35.3 {interp limit syntax} -body { interp limit {} foo } -returnCodes error -result {bad limit type "foo": must be commands or time} diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 06116d3..47c8daa 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.43 2008/06/06 19:46:38 andreas_kupries Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.44 2008/07/13 23:15:21 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -192,10 +192,10 @@ test iocmd-7.3 {close command} { test iocmd-8.1 {fconfigure command} { list [catch {fconfigure} msg] $msg -} {1 {wrong # args: should be "fconfigure channelId ?optionName? ?value? ?optionName value?..."}} +} {1 {wrong # args: should be "fconfigure channelId ?-option value ...?"}} test iocmd-8.2 {fconfigure command} { list [catch {fconfigure a b c d e f} msg] $msg -} {1 {wrong # args: should be "fconfigure channelId ?optionName? ?value? ?optionName value?..."}} +} {1 {wrong # args: should be "fconfigure channelId ?-option value ...?"}} test iocmd-8.3 {fconfigure command} { list [catch {fconfigure a b} msg] $msg } {1 {can not find channel named "a"}} diff --git a/tests/lindex.test b/tests/lindex.test index 249acb9..1621fda 100644 --- a/tests/lindex.test +++ b/tests/lindex.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lindex.test,v 1.17 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: lindex.test,v 1.18 2008/07/13 23:15:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.2 @@ -26,7 +26,7 @@ testConstraint testevalex [llength [info commands testevalex]] test lindex-1.1 {wrong # args} testevalex { list [catch {testevalex lindex} result] $result -} "1 {wrong # args: should be \"lindex list ?index...?\"}" +} "1 {wrong # args: should be \"lindex list ?index ...?\"}" # Indices that are lists or convertible to lists @@ -190,7 +190,7 @@ test lindex-8.7 {data reuse} testevalex { test lindex-9.1 {wrong # args} { list [catch {lindex} result] $result -} "1 {wrong # args: should be \"lindex list ?index...?\"}" +} "1 {wrong # args: should be \"lindex list ?index ...?\"}" test lindex-9.2 {ensure that compilation works in the right order} { proc foo {} { rename foo {} diff --git a/tests/lsearch.test b/tests/lsearch.test index 91ac00e..93e2117 100644 --- a/tests/lsearch.test +++ b/tests/lsearch.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lsearch.test,v 1.20 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: lsearch.test,v 1.21 2008/07/13 23:15:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -83,10 +83,10 @@ test lsearch-2.16 {search modes without -nocase} { test lsearch-3.1 {lsearch errors} { list [catch lsearch msg] $msg -} {1 {wrong # args: should be "lsearch ?options? list pattern"}} +} {1 {wrong # args: should be "lsearch ?-option value ...? list pattern"}} test lsearch-3.2 {lsearch errors} { list [catch {lsearch a} msg] $msg -} {1 {wrong # args: should be "lsearch ?options? list pattern"}} +} {1 {wrong # args: should be "lsearch ?-option value ...? list pattern"}} test lsearch-3.3 {lsearch errors} { list [catch {lsearch a b c} msg] $msg } {1 {bad option "a": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, or -subindices}} diff --git a/tests/lset.test b/tests/lset.test index 872047b..b6d8758 100644 --- a/tests/lset.test +++ b/tests/lset.test @@ -31,7 +31,7 @@ trace add variable noWrite write failTrace test lset-1.1 {lset, not compiled, arg count} testevalex { list [catch {testevalex lset} msg] $msg -} "1 {wrong \# args: should be \"lset listVar index ?index...? value\"}" +} "1 {wrong \# args: should be \"lset listVar index ?index ...? value\"}" test lset-1.2 {lset, not compiled, no such var} testevalex { list [catch {testevalex {lset noSuchVar 0 {}}} msg] $msg } "1 {can't read \"noSuchVar\": no such variable}" diff --git a/tests/lsetComp.test b/tests/lsetComp.test index 6b9264c..4d0ad2c 100755 --- a/tests/lsetComp.test +++ b/tests/lsetComp.test @@ -36,7 +36,7 @@ test lsetComp-1.1 {lset, compiled, wrong \# args} { evalInProc { lset } -} "1 {wrong \# args: should be \"lset listVar index ?index...? value\"}" +} "1 {wrong \# args: should be \"lset listVar index ?index ...? value\"}" test lsetComp-2.1 {lset, compiled, list of args, not a simple var name} { evalInProc { diff --git a/tests/pkg.test b/tests/pkg.test index 0953eeb..1d94cb3 100644 --- a/tests/pkg.test +++ b/tests/pkg.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: pkg.test,v 1.29 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: pkg.test,v 1.30 2008/07/13 23:15:21 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -648,13 +648,13 @@ test pkg-3.21 {Tcl_PackageCmd procedure, "provide" option} { } {1 {expected version number but got "a.b"}} test pkg-3.22 {Tcl_PackageCmd procedure, "require" option} { list [catch {package require} msg] $msg -} {1 {wrong # args: should be "package require ?-exact? package ?requirement...?"}} +} {1 {wrong # args: should be "package require ?-exact? package ?requirement ...?"}} test pkg-3.24 {Tcl_PackageCmd procedure, "require" option} { list [catch {package require -exact a b c} msg] $msg # Exact syntax: -exact name version - # name ?requirement...? -} {1 {wrong # args: should be "package require ?-exact? package ?requirement...?"}} + # name ?requirement ...? +} {1 {wrong # args: should be "package require ?-exact? package ?requirement ...?"}} test pkg-3.26 {Tcl_PackageCmd procedure, "require" option} { list [catch {package require x a.b} msg] $msg @@ -664,10 +664,10 @@ test pkg-3.27 {Tcl_PackageCmd procedure, "require" option} { } {1 {expected version number but got "a.b"}} test pkg-3.28 {Tcl_PackageCmd procedure, "require" option} { list [catch {package require -exact x} msg] $msg -} {1 {wrong # args: should be "package require ?-exact? package ?requirement...?"}} +} {1 {wrong # args: should be "package require ?-exact? package ?requirement ...?"}} test pkg-3.29 {Tcl_PackageCmd procedure, "require" option} { list [catch {package require -exact} msg] $msg -} {1 {wrong # args: should be "package require ?-exact? package ?requirement...?"}} +} {1 {wrong # args: should be "package require ?-exact? package ?requirement ...?"}} test pkg-3.30 {Tcl_PackageCmd procedure, "require" option} { package forget t package provide t 2.3 @@ -888,13 +888,13 @@ test pkg-7.10 {Tcl_PkgPresent procedure, unknown package} { } {1 {package t 2.4 is not present}} test pkg-7.11 {Tcl_PackageCmd procedure, "present" option} { list [catch {package present} msg] $msg -} {1 {wrong # args: should be "package present ?-exact? package ?requirement...?"}} +} {1 {wrong # args: should be "package present ?-exact? package ?requirement ...?"}} test pkg-7.12 {Tcl_PackageCmd procedure, "present" option} { list [catch {package present a b c} msg] $msg } {1 {expected version number but got "b"}} test pkg-7.13 {Tcl_PackageCmd procedure, "present" option} { list [catch {package present -exact a b c} msg] $msg -} {1 {wrong # args: should be "package present ?-exact? package ?requirement...?"}} +} {1 {wrong # args: should be "package present ?-exact? package ?requirement ...?"}} test pkg-7.14 {Tcl_PackageCmd procedure, "present" option} { list [catch {package present -bs a b} msg] $msg } {1 {expected version number but got "a"}} @@ -906,10 +906,10 @@ test pkg-7.16 {Tcl_PackageCmd procedure, "present" option} { } {1 {expected version number but got "a.b"}} test pkg-7.17 {Tcl_PackageCmd procedure, "present" option} { list [catch {package present -exact x} msg] $msg -} {1 {wrong # args: should be "package present ?-exact? package ?requirement...?"}} +} {1 {wrong # args: should be "package present ?-exact? package ?requirement ...?"}} test pkg-7.18 {Tcl_PackageCmd procedure, "present" option} { list [catch {package present -exact} msg] $msg -} {1 {wrong # args: should be "package present ?-exact? package ?requirement...?"}} +} {1 {wrong # args: should be "package present ?-exact? package ?requirement ...?"}} diff --git a/tests/var.test b/tests/var.test index bf48224..5797434 100644 --- a/tests/var.test +++ b/tests/var.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: var.test,v 1.31 2008/03/11 17:23:56 msofer Exp $ +# RCS: @(#) $Id: var.test,v 1.32 2008/07/13 23:15:22 nijtmans Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -503,12 +503,12 @@ test var-7.15 {Tcl_VariableObjCmd, array element parameter} { } "can't define \"arrayvar(1)\": name refers to an element in an array" test var-7.16 {Tcl_VariableObjCmd, no args} { list [catch {variable} msg] $msg -} {1 {wrong # args: should be "variable ?name value...? name ?value?"}} +} {1 {wrong # args: should be "variable ?name value ...? name ?value?"}} test var-7.17 {Tcl_VariableObjCmd, no args} { namespace eval test_ns_var { list [catch {variable} msg] $msg } -} {1 {wrong # args: should be "variable ?name value...? name ?value?"}} +} {1 {wrong # args: should be "variable ?name value ...? name ?value?"}} test var-8.1 {TclDeleteVars, "unset" traces are called with fully-qualified var names} { catch {namespace delete test_ns_var} -- cgit v0.12 From 4e378306f429f7d5e125b91cecf54ef4fcf6b31b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 00:11:32 +0000 Subject: * generic/tclBasic.c.: NRE left too many calls to * generic/tclExecute.c: TclResetCancellation lying around: it * generic/tclProc.c: only needs to be called prior to any iPtr->numLevels++. Thanks mistachkin. --- ChangeLog | 6 +++++- generic/tclBasic.c | 5 +---- generic/tclExecute.c | 4 +--- generic/tclProc.c | 4 +--- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2bd7012..2d56cb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-07-14 Miguel Sofer + * generic/tclBasic.c.: NRE left too many calls to + * generic/tclExecute.c: TclResetCancellation lying around: it + * generic/tclProc.c: only needs to be called prior to any + iPtr->numLevels++. Thanks mistachkin. + * generic/tclBasic.c: TclResetCancellation() calls were misplaced (merge mishap); stray //. Thanks patthoyts. @@ -44,7 +49,6 @@ * unix/tclUnixTest.c: * win/tclWin32Dll.c: - 2008-07-08 Don Porter * generic/tclGet.c: Corrected out of date comments and removed diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 174a74f..07b3fb5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.307 2008/07/13 22:42:25 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.308 2008/07/14 00:11:32 msofer Exp $ */ #include "tclInt.h" @@ -5041,9 +5041,6 @@ TclEvalEx( eeFramePtr->line = lines; iPtr->cmdFramePtr = eeFramePtr; - - TclResetCancellation(interp, 0); - code = Tcl_EvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 1299cce..0412034 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.377 2008/07/13 09:29:51 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.378 2008/07/14 00:11:33 msofer Exp $ */ #include "tclInt.h" @@ -1502,8 +1502,6 @@ TclCompileObj( * performance is noticeable. */ - TclResetCancellation(interp, 0); - if (TclInterpReady(interp) == TCL_ERROR) { return NULL; } diff --git a/generic/tclProc.c b/generic/tclProc.c index 90cac16..70f2921 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.143 2008/07/13 09:03:35 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.144 2008/07/14 00:11:33 msofer Exp $ */ #include "tclInt.h" @@ -1811,8 +1811,6 @@ TclNRInterpProcCore( * Invoke the commands in the procedure's body. */ - TclResetCancellation(interp, 0); - procPtr->refCount++; codePtr = procPtr->bodyPtr->internalRep.otherValuePtr; if (TCL_DTRACE_PROC_ENTRY_ENABLED()) { -- cgit v0.12 From 329d552a8ac8142022bae7a52391a5b4c7da811b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 00:38:00 +0000 Subject: * generic/tclParse.c: remove unnecessary numLevel management [Bug 2017583] --- ChangeLog | 3 +++ generic/tclParse.c | 6 +----- tests/parse.test | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d56cb8..25e1cca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-14 Miguel Sofer + * generic/tclParse.c: remove unnecessary numLevel management + [Bug 2017583] + * generic/tclBasic.c.: NRE left too many calls to * generic/tclExecute.c: TclResetCancellation lying around: it * generic/tclProc.c: only needs to be called prior to any diff --git a/generic/tclParse.c b/generic/tclParse.c index 126ea4f..3548ade 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.65 2008/06/13 05:45:14 mistachkin Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.66 2008/07/14 00:38:02 msofer Exp $ */ #include "tclInt.h" @@ -2167,9 +2167,6 @@ TclSubstTokens( case TCL_TOKEN_COMMAND: { Interp *iPtr = (Interp *) interp; - TclResetCancellation(interp, 0); - - iPtr->numLevels++; code = TclInterpReady(interp); if (code == TCL_OK) { code = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); @@ -2179,7 +2176,6 @@ TclSubstTokens( code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, 0, line); } - iPtr->numLevels--; appendObj = Tcl_GetObjResult(interp); break; } diff --git a/tests/parse.test b/tests/parse.test index edf37d6..e1ab8c7 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.32 2008/07/13 09:03:35 msofer Exp $ +# RCS: @(#) $Id: parse.test,v 1.33 2008/07/14 00:38:02 msofer Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -1025,7 +1025,7 @@ test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { interp create i load {} Tcltest i i eval {proc {} args {}} - interp recursionlimit i 2 + interp recursionlimit i 1 } -body { i eval {testevalex {[[]]}} } -cleanup { @@ -1045,7 +1045,7 @@ test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { interp create i i eval {proc {} args {}} - interp recursionlimit i 2 + interp recursionlimit i 1 } -body { i eval {subst {[[]]}} } -cleanup { -- cgit v0.12 From f76566ce78e7857adfd7aade7c002776b33670e9 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 00:39:18 +0000 Subject: ChangeLog fix --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 25e1cca..8c82766 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-07-14 Miguel Sofer - * generic/tclParse.c: remove unnecessary numLevel management + * generic/tclParse.c: + * tests/parse.test: remove unnecessary numLevel management [Bug 2017583] * generic/tclBasic.c.: NRE left too many calls to -- cgit v0.12 From 4ec6ad0af11a38ff55e732d0d1a0830ac29d2678 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 00:57:28 +0000 Subject: remove unused variable --- generic/tclParse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generic/tclParse.c b/generic/tclParse.c index 3548ade..1020979 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.66 2008/07/14 00:38:02 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.67 2008/07/14 00:57:28 msofer Exp $ */ #include "tclInt.h" @@ -2165,8 +2165,6 @@ TclSubstTokens( break; case TCL_TOKEN_COMMAND: { - Interp *iPtr = (Interp *) interp; - code = TclInterpReady(interp); if (code == TCL_OK) { code = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); -- cgit v0.12 From f4e3f1d4c5e0fb4af5370f91fa70d0604bc44149 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 01:27:25 +0000 Subject: * generic/tclVar.c: fix error message --- ChangeLog | 2 ++ generic/tclVar.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c82766..e1a3d7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-14 Miguel Sofer + * generic/tclVar.c: fix error message + * generic/tclParse.c: * tests/parse.test: remove unnecessary numLevel management [Bug 2017583] diff --git a/generic/tclVar.c b/generic/tclVar.c index 6279064..8670c24 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.163 2008/06/06 19:46:37 andreas_kupries Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.164 2008/07/14 01:27:25 msofer Exp $ */ #include "tclInt.h" @@ -3945,7 +3945,7 @@ Tcl_VariableObjCmd( Tcl_Obj *varNamePtr, *tailPtr; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "?name value...? name ?value?"); + Tcl_WrongNumArgs(interp, 1, objv, "?name value ...? name ?value?"); return TCL_ERROR; } -- cgit v0.12 From c7d86348c2cc3cdd8643cfb967c672969796b165 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 01:38:00 +0000 Subject: * generic/tclBasic.c.: Embedded Tcl_Canceled() calls into * generic/tclExecute.c: TclInterpReady(). * generic/tclParse.c: --- ChangeLog | 11 +++++++---- generic/tclBasic.c | 14 +++++--------- generic/tclExecute.c | 6 +----- generic/tclParse.c | 5 +---- 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1a3d7c..d86e1cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,18 @@ 2008-07-14 Miguel Sofer + * generic/tclBasic.c.: Embedded Tcl_Canceled() calls into + * generic/tclExecute.c: TclInterpReady(). + * generic/tclParse.c: + * generic/tclVar.c: fix error message - * generic/tclParse.c: - * tests/parse.test: remove unnecessary numLevel management - [Bug 2017583] + * generic/tclParse.c: remove unnecessary numLevel management + * tests/parse.test: [Bug 2017583] * generic/tclBasic.c.: NRE left too many calls to * generic/tclExecute.c: TclResetCancellation lying around: it * generic/tclProc.c: only needs to be called prior to any - iPtr->numLevels++. Thanks mistachkin. + iPtr->numLevels++. Thanks mistachkin. * generic/tclBasic.c: TclResetCancellation() calls were misplaced (merge mishap); stray //. Thanks patthoyts. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 07b3fb5..e2d3712 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.308 2008/07/14 00:11:32 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.309 2008/07/14 01:38:00 msofer Exp $ */ #include "tclInt.h" @@ -3617,6 +3617,10 @@ TclInterpReady( return TCL_ERROR; } + if (TCL_OK != Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG)) { + return TCL_ERROR; + } + /* * Check depth of nested calls to Tcl_Eval: if this gets too large, it's * probably because of an infinite loop somewhere. @@ -3934,10 +3938,6 @@ Tcl_EvalObjv( iPtr->numLevels++; result = TclInterpReady(interp); - if (result == TCL_OK) { - result = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); - } - if ((result != TCL_OK) || (objc == 0)) { iPtr->lookupNsPtr = NULL; iPtr->numLevels--; @@ -5979,10 +5979,6 @@ TclObjInvoke( return TCL_ERROR; } - if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { - return TCL_ERROR; - } - cmdName = TclGetString(objv[0]); hTblPtr = iPtr->hiddenCmdTablePtr; if (hTblPtr != NULL) { diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0412034..8e6a056 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.378 2008/07/14 00:11:33 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.379 2008/07/14 01:38:00 msofer Exp $ */ #include "tclInt.h" @@ -1506,10 +1506,6 @@ TclCompileObj( return NULL; } - if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { - return NULL; - } - namespacePtr = iPtr->varFramePtr->nsPtr; /* diff --git a/generic/tclParse.c b/generic/tclParse.c index 1020979..a6abd52 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.67 2008/07/14 00:57:28 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.68 2008/07/14 01:38:01 msofer Exp $ */ #include "tclInt.h" @@ -2167,9 +2167,6 @@ TclSubstTokens( case TCL_TOKEN_COMMAND: { code = TclInterpReady(interp); if (code == TCL_OK) { - code = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); - } - if (code == TCL_OK) { /* TIP #280: Transfer line information to nested command */ code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, 0, line); -- cgit v0.12 From d41419c07d90567c76f27ec6c1c7a78ae083d8fd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 02:03:52 +0000 Subject: * generic/tclExecute.c: Remove unneeded TclInterpReady call --- ChangeLog | 2 ++ generic/tclExecute.c | 13 +------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d86e1cd..ea97cfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-14 Miguel Sofer + * generic/tclExecute.c: Remove unneeded TclInterpReady call + * generic/tclBasic.c.: Embedded Tcl_Canceled() calls into * generic/tclExecute.c: TclInterpReady(). * generic/tclParse.c: diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 8e6a056..fc1ca9c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.379 2008/07/14 01:38:00 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.380 2008/07/14 02:03:53 msofer Exp $ */ #include "tclInt.h" @@ -1495,17 +1495,6 @@ TclCompileObj( register ByteCode *codePtr; /* Tcl Internal type of bytecode. */ Namespace *namespacePtr; - /* - * Check that the interpreter is ready to execute scripts. Note that we - * manage the interp's runlevel here: it is a small white lie (maybe), but - * saves a ++/-- pair at each invocation. Amazingly enough, the impact on - * performance is noticeable. - */ - - if (TclInterpReady(interp) == TCL_ERROR) { - return NULL; - } - namespacePtr = iPtr->varFramePtr->nsPtr; /* -- cgit v0.12 From 8d88b8afd68de02f280b0221a74a1116bb4f06dd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 02:09:28 +0000 Subject: * generic/tclParse.c: Remove unneeded TclInterpReady call --- ChangeLog | 3 ++- generic/tclParse.c | 11 ++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea97cfd..f034a4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-07-14 Miguel Sofer - * generic/tclExecute.c: Remove unneeded TclInterpReady call + * generic/tclExecute.c: Remove unneeded TclInterpReady calls + * generic/tclParse.c: * generic/tclBasic.c.: Embedded Tcl_Canceled() calls into * generic/tclExecute.c: TclInterpReady(). diff --git a/generic/tclParse.c b/generic/tclParse.c index a6abd52..061f9eb 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.68 2008/07/14 01:38:01 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.69 2008/07/14 02:09:30 msofer Exp $ */ #include "tclInt.h" @@ -2165,12 +2165,9 @@ TclSubstTokens( break; case TCL_TOKEN_COMMAND: { - code = TclInterpReady(interp); - if (code == TCL_OK) { - /* TIP #280: Transfer line information to nested command */ - code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, - 0, line); - } + /* TIP #280: Transfer line information to nested command */ + code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, + 0, line); appendObj = Tcl_GetObjResult(interp); break; } -- cgit v0.12 From 0e87dee6653b2bbae46ab63cf98efb4b06b7380c Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 14 Jul 2008 08:22:11 +0000 Subject: Store ClientDatas in NRE callback storage as an array; that's how they are referred to in callback implementations anyway. --- ChangeLog | 22 +++++++++++++++------- generic/tclBasic.c | 14 +++++++------- generic/tclNRE.h | 7 ++----- generic/tclProc.c | 7 ++++--- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index f034a4e..837a169 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-14 Donal K. Fellows + + * generic/tclProc.c (TclNRApplyObjCmd, TclObjInterpProcCore): + * generic/tclBasic.c (TclNR_AddCallback, TclEvalObjv_NR2): + * generic/tclNRE.h (TEOV_callback): Change the callback storage type + to use an array, so guaranteeing correct inter-member spacing and + memory layout. + 2008-07-14 Miguel Sofer * generic/tclExecute.c: Remove unneeded TclInterpReady calls @@ -54,9 +62,9 @@ * tests/parse.test: * tests/stack.test: - * unix/configure: Removing support for the hacky nonportable stack - * unix/configure.in: check: it is not needed anymore, Tcl is very - * unix/tclConfig.h.in: thrifty on the C stack. + * unix/configure: Removing support for the hacky nonportable + * unix/configure.in: stack check: it is not needed anymore, Tcl + * unix/tclConfig.h.in: is very thrifty on the C stack. * unix/tclUnixInit.c: * unix/tclUnixTest.c: * win/tclWin32Dll.c: @@ -64,10 +72,10 @@ 2008-07-08 Don Porter * generic/tclGet.c: Corrected out of date comments and removed - * generic/tclInt.decls: internal routine TclGetLong() that's no longer - used. If an extension is using this from the internal stubs table, it - can shift to the public routine Tcl_GetLongFromObj() or can request - addition of a public Tcl_GetLong(). + * generic/tclInt.decls: internal routine TclGetLong() that's no + longer used. If an extension is using this from the internal stubs + table, it can shift to the public routine Tcl_GetLongFromObj() or + can request addition of a public Tcl_GetLong(). ***POTENTIAL INCOMPATIBILITY*** * generic/tclIntDecls.h: make genstubs diff --git a/generic/tclBasic.c b/generic/tclBasic.c index e2d3712..273afea 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.309 2008/07/14 01:38:00 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.310 2008/07/14 08:22:13 dkf Exp $ */ #include "tclInt.h" @@ -4234,8 +4234,8 @@ int TclEvalObjv_NR2( while (recordPtr->callbackPtr) { TEOV_callback *callbackPtr = recordPtr->callbackPtr; - result = (*callbackPtr->procPtr)(&callbackPtr->data0, - interp, result); + + result = callbackPtr->procPtr(callbackPtr->data, interp, result); callbackPtr = callbackPtr->nextPtr; TclSmallFree(recordPtr->callbackPtr); recordPtr->callbackPtr = callbackPtr; @@ -7674,10 +7674,10 @@ void TclNR_AddCallback( TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); callbackPtr->procPtr = postProcPtr; - callbackPtr->data0 = data0; - callbackPtr->data1 = data1; - callbackPtr->data2 = data2; - callbackPtr->data3 = data3; + callbackPtr->data[0] = data0; + callbackPtr->data[1] = data1; + callbackPtr->data[2] = data2; + callbackPtr->data[3] = data3; callbackPtr->nextPtr = recordPtr->callbackPtr; recordPtr->callbackPtr = callbackPtr; diff --git a/generic/tclNRE.h b/generic/tclNRE.h index d892f61..729cf51 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.1 2008/07/13 09:04:54 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.2 2008/07/14 08:22:14 dkf Exp $ */ @@ -90,10 +90,7 @@ struct ByteCode; /* Fill up a SmallAlloc: 4 free ptrs for the user */ typedef struct TEOV_callback { TclNR_PostProc *procPtr; - ClientData data0; - ClientData data1; - ClientData data2; - ClientData data3; + ClientData data[4]; struct TEOV_callback *nextPtr; } TEOV_callback; diff --git a/generic/tclProc.c b/generic/tclProc.c index 70f2921..4ecd57f 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.144 2008/07/14 00:11:33 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.145 2008/07/14 08:22:14 dkf Exp $ */ #include "tclInt.h" @@ -1735,7 +1735,7 @@ TclObjInterpProcCore( if (result == TCL_OK) { result = TclExecuteByteCode(interp, record.data.codePtr); result = TclEvalObjv_NR2(interp, result, rootPtr); - result = InterpProcNR2(&record.callbackPtr->data0, interp, result); + result = InterpProcNR2(record.callbackPtr->data, interp, result); TclSmallFree(record.callbackPtr); } return result; @@ -2816,8 +2816,9 @@ TclNRApplyObjCmd( /* Fix the recordPtr! */ TEOV_record *recordPtr = TOP_RECORD(iPtr); + recordPtr->callbackPtr->procPtr = ApplyNR2; - recordPtr->callbackPtr->data2 = extraPtr; + recordPtr->callbackPtr->data[2] = extraPtr; } } if (result != TCL_OK) { -- cgit v0.12 From a3a847f6fe873e569cc78f12befd9d14ae73d114 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 14 Jul 2008 14:15:10 +0000 Subject: Tidy up code for clarity. --- generic/tclBasic.c | 770 ++++++++++++++++++++++++++--------------------------- generic/tclProc.c | 97 +++---- 2 files changed, 431 insertions(+), 436 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 273afea..c1bee01 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.310 2008/07/14 08:22:13 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.311 2008/07/14 14:15:10 dkf Exp $ */ #include "tclInt.h" @@ -106,36 +106,28 @@ static int DTraceObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, MODULE_SCOPE const TclStubs * const tclConstStubsPtr; - /* * Block for Tcl_EvalObjv helpers */ -static void TEOV_SwitchVarFrame(Tcl_Interp *interp); - -static void TEOV_PushExceptionHandlers(Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[], int flags); - -static inline Command * - TEOV_LookupCmdFromObj(Tcl_Interp *interp, Tcl_Obj *namePtr, - Namespace *lookupNsPtr); - -static int TEOV_NotFound(Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[], Namespace *lookupNsPtr); - -static int TEOV_RunEnterTraces(Tcl_Interp *interp, Command **cmdPtrPtr, - int objc, Tcl_Obj *const objv[], Namespace *lookupNsPtr); - -static TclNR_PostProc TEOV_RestoreVarFrame; -static TclNR_PostProc TEOV_RunLeaveTraces; -static TclNR_PostProc TEOV_Exception; -static TclNR_PostProc TEOV_Error; -static TclNR_PostProc TEOEx_ListCallback; -static TclNR_PostProc TEOEx_ByteCodeCallback; - -static int NRPostProcess(Tcl_Interp *interp, int result, int objc, - Tcl_Obj *const objv[]); - +static void TEOV_SwitchVarFrame(Tcl_Interp *interp); +static void TEOV_PushExceptionHandlers(Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[], int flags); +static inline Command * TEOV_LookupCmdFromObj(Tcl_Interp *interp, + Tcl_Obj *namePtr, Namespace *lookupNsPtr); +static int TEOV_NotFound(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[], Namespace *lookupNsPtr); +static int TEOV_RunEnterTraces(Tcl_Interp *interp, + Command **cmdPtrPtr, int objc, + Tcl_Obj *const objv[], Namespace *lookupNsPtr); +static int NRPostProcess(Tcl_Interp *interp, int result, + int objc, Tcl_Obj *const objv[]); +static TclNR_PostProc TEOV_RestoreVarFrame; +static TclNR_PostProc TEOV_RunLeaveTraces; +static TclNR_PostProc TEOV_Exception; +static TclNR_PostProc TEOV_Error; +static TclNR_PostProc TEOEx_ListCallback; +static TclNR_PostProc TEOEx_ByteCodeCallback; /* * The following structure define the commands in the Tcl core. @@ -254,7 +246,7 @@ static const CmdInfo builtInCmds[] = { typedef struct { const char *name; /* Name of the function. The full name is - * "::tcl::mathfunc::". */ + * "::tcl::mathfunc::". */ Tcl_ObjCmdProc *objCmdProc; /* Function that evaluates the function */ ClientData clientData; /* Client data for the function */ } BuiltinFuncDef; @@ -356,17 +348,17 @@ static const OpCmdInfo mathOpCmds[] = { { NULL, NULL, NULL, {0}, NULL} }; - /* - * This is the script cancellation struct and hash table. The hash table - * is used to keep track of the information necessary to process script + * This is the script cancellation struct and hash table. The hash table is + * used to keep track of the information necessary to process script * cancellation requests, including the original interp, asynchronous handler * tokens (created by Tcl_AsyncCreate), and the clientData and flags arguments - * passed to Tcl_CancelEval on a per-interp basis. The cancelLock mutex is - * used for protecting calls to Tcl_CancelEval as well as protecting access - * to the hash table below. + * passed to Tcl_CancelEval on a per-interp basis. The cancelLock mutex is + * used for protecting calls to Tcl_CancelEval as well as protecting access to + * the hash table below. */ + typedef struct { Tcl_Interp *interp; /* Interp this struct belongs to */ Tcl_AsyncHandler async; /* Async handler token for script @@ -3081,22 +3073,24 @@ CancelEvalProc(clientData, interp, code) if (iPtr != NULL) { /* * Setting this flag will cause the script in progress to be - * canceled as soon as possible. The core honors this flag - * at all the necessary places to ensure script cancellation - * is responsive. Extensions can check for this flag by - * calling Tcl_Canceled and checking if TCL_ERROR is returned - * or they can choose to ignore the script cancellation - * flag and the associated functionality altogether. + * canceled as soon as possible. The core honors this flag at all + * the necessary places to ensure script cancellation is + * responsive. Extensions can check for this flag by calling + * Tcl_Canceled and checking if TCL_ERROR is returned or they can + * choose to ignore the script cancellation flag and the + * associated functionality altogether. */ + iPtr->flags |= CANCELED; /* - * Currently, we only care about the TCL_CANCEL_UNWIND flag - * from Tcl_CancelEval. We do not want to simply combine all - * the flags from original Tcl_CancelEval call with the interp - * flags here just in case the caller passed flags that might - * cause behaviour unrelated to script cancellation. + * Currently, we only care about the TCL_CANCEL_UNWIND flag from + * Tcl_CancelEval. We do not want to simply combine all the flags + * from original Tcl_CancelEval call with the interp flags here + * just in case the caller passed flags that might cause behaviour + * unrelated to script cancellation. */ + if (cancelInfo->flags & TCL_CANCEL_UNWIND) { iPtr->flags |= TCL_CANCEL_UNWIND; } @@ -3145,18 +3139,18 @@ GetCommandSource( objPtr = Tcl_NewListObj(objc, objv); if (lookup && cfPtr) { switch (cfPtr->type) { - case TCL_LOCATION_EVAL: - case TCL_LOCATION_SOURCE: - command = cfPtr->cmd.str.cmd; - numChars = cfPtr->cmd.str.len; - break; - case TCL_LOCATION_BC: - case TCL_LOCATION_PREBC: - command = TclGetSrcInfoForCmd(iPtr, &numChars); - break; - case TCL_LOCATION_EVAL_LIST: - /* Got it already */ - break; + case TCL_LOCATION_EVAL: + case TCL_LOCATION_SOURCE: + command = cfPtr->cmd.str.cmd; + numChars = cfPtr->cmd.str.len; + break; + case TCL_LOCATION_BC: + case TCL_LOCATION_PREBC: + command = TclGetSrcInfoForCmd(iPtr, &numChars); + break; + case TCL_LOCATION_EVAL_LIST: + /* Got it already */ + break; } if (command) { obj2Ptr = Tcl_NewStringObj(command, numChars); @@ -3620,7 +3614,7 @@ TclInterpReady( if (TCL_OK != Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG)) { return TCL_ERROR; } - + /* * Check depth of nested calls to Tcl_Eval: if this gets too large, it's * probably because of an infinite loop somewhere. @@ -3655,19 +3649,19 @@ TclInterpReady( int TclResetCancellation( - Tcl_Interp *interp, int force) + Tcl_Interp *interp, + int force) { register Interp *iPtr = (Interp *) interp; - if (iPtr != NULL) { - if (force || (iPtr->numLevels == 0)) { - iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); - } - - return TCL_OK; - } else { + if (iPtr == NULL) { return TCL_ERROR; } + + if (force || (iPtr->numLevels == 0)) { + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); + } + return TCL_OK; } /* @@ -3676,18 +3670,18 @@ TclResetCancellation( * Tcl_Canceled -- * * Check if the script in progress has been canceled, i.e., - * Tcl_CancelEval was called for this interpreter or any of its - * master interpreters. + * Tcl_CancelEval was called for this interpreter or any of its master + * interpreters. * * Results: * The return value is TCL_OK if the script evaluation has not been * canceled, TCL_ERROR otherwise. * - * If "flags" contains TCL_LEAVE_ERR_MSG, an error message is returned - * in the interpreter's result object. Otherwise, the interpreter's - * result object is left unchanged. If "flags" contains - * TCL_CANCEL_UNWIND, TCL_ERROR will only be returned if the script - * evaluation is being completely unwound. + * If "flags" contains TCL_LEAVE_ERR_MSG, an error message is returned in + * the interpreter's result object. Otherwise, the interpreter's result + * object is left unchanged. If "flags" contains TCL_CANCEL_UNWIND, + * TCL_ERROR will only be returned if the script evaluation is being + * completely unwound. * * Side effects: * The CANCELED flag for the interp will be reset if it is set. @@ -3705,19 +3699,20 @@ Tcl_Canceled( int length; /* - * Traverse up the to the top-level interp, checking for the - * CANCELED flag along the way. If any of the intervening - * interps have the CANCELED flag set, the current script in - * progress is considered to be canceled and we stop checking. - * Otherwise, if any interp has the DELETED flag set we stop - * checking. + * Traverse up the to the top-level interp, checking for the CANCELED flag + * along the way. If any of the intervening interps have the CANCELED flag + * set, the current script in progress is considered to be canceled and we + * stop checking. Otherwise, if any interp has the DELETED flag set we + * stop checking. */ + for (; iPtr != NULL; iPtr = (Interp *) Tcl_GetMaster((Tcl_Interp *)iPtr)) { /* * Has the current script in progress for this interpreter been - * canceled or is the stack being unwound due to the previous - * script cancellation? + * canceled or is the stack being unwound due to the previous script + * cancellation? */ + if ((iPtr->flags & CANCELED) || (iPtr->flags & TCL_CANCEL_UNWIND)) { /* * The CANCELED flag is a one-shot flag that is reset immediately @@ -3726,26 +3721,33 @@ Tcl_Canceled( * been canceled thereby allowing the evaluation stack for the * interp to be fully unwound. */ + iPtr->flags &= ~CANCELED; /* - * The CANCELED flag was detected and reset; however, if the caller - * specified the TCL_CANCEL_UNWIND flag, we only return TCL_ERROR - * (indicating that the script in progress has been canceled) if the - * evaluation stack for the interp is being fully unwound. + * The CANCELED flag was detected and reset; however, if the + * caller specified the TCL_CANCEL_UNWIND flag, we only return + * TCL_ERROR (indicating that the script in progress has been + * canceled) if the evaluation stack for the interp is being fully + * unwound. */ - if (!(flags & TCL_CANCEL_UNWIND) || (iPtr->flags & TCL_CANCEL_UNWIND)) { + + if (!(flags & TCL_CANCEL_UNWIND) + || (iPtr->flags & TCL_CANCEL_UNWIND)) { /* - * If the TCL_LEAVE_ERR_MSG flags bit is set, place an error in the - * interp's result; otherwise, we leave it alone. + * If the TCL_LEAVE_ERR_MSG flags bit is set, place an error + * in the interp's result; otherwise, we leave it alone. */ + if (flags & TCL_LEAVE_ERR_MSG) { /* - * Setup errorCode variables so that we can differentiate between - * being canceled and unwound. + * Setup errorCode variables so that we can differentiate + * between being canceled and unwound. */ + if (iPtr->asyncCancelMsg != NULL) { - message = Tcl_GetStringFromObj(iPtr->asyncCancelMsg, &length); + message = Tcl_GetStringFromObj(iPtr->asyncCancelMsg, + &length); } else { length = 0; } @@ -3768,22 +3770,24 @@ Tcl_Canceled( } /* - * Return TCL_ERROR to the caller (not necessarily just the Tcl core - * itself) that indicates further processing of the script or command - * in progress should halt gracefully and as soon as possible. + * Return TCL_ERROR to the caller (not necessarily just the + * Tcl core itself) that indicates further processing of the + * script or command in progress should halt gracefully and as + * soon as possible. */ + return TCL_ERROR; } } else { /* - * FIXME: If this interpreter is being deleted we cannot continue to - * traverse up the interp chain due to an issue with + * FIXME: If this interpreter is being deleted we cannot continue + * to traverse up the interp chain due to an issue with * Tcl_GetMaster (really the slave interp bookkeeping) that - * causes us to run off into a freed interp struct. Ideally, - * this check would not be necessary because Tcl_GetMaster - * would return NULL instead of a pointer to invalid (freed) - * memory. + * causes us to run off into a freed interp struct. Ideally, this + * check would not be necessary because Tcl_GetMaster would + * return NULL instead of a pointer to invalid (freed) memory. */ + if (iPtr->flags & DELETED) { break; } @@ -3798,18 +3802,18 @@ Tcl_Canceled( * * Tcl_CancelEval -- * - * This function schedules the cancellation of the current script in - * the given interpreter. + * This function schedules the cancellation of the current script in the + * given interpreter. * * Results: * The return value is a standard Tcl completion code such as TCL_OK or - * TCL_ERROR. Since the interp may belong to a different thread, no - * error message can be left in the interp's result. + * TCL_ERROR. Since the interp may belong to a different thread, no error + * message can be left in the interp's result. * * Side effects: - * The script in progress in the specified interpreter will be - * canceled with TCL_ERROR after asynchronous handlers are invoked at - * the next Tcl_Canceled check. + * The script in progress in the specified interpreter will be canceled + * with TCL_ERROR after asynchronous handlers are invoked at the next + * Tcl_Canceled check. * *---------------------------------------------------------------------- */ @@ -3818,8 +3822,8 @@ int Tcl_CancelEval( Tcl_Interp *interp, /* Interpreter in which to cancel the * script. */ - Tcl_Obj *resultObjPtr, /* The script cancellation error message - * or NULL for a default error message. */ + Tcl_Obj *resultObjPtr, /* The script cancellation error message or + * NULL for a default error message. */ ClientData clientData, /* Passed to CancelEvalProc. */ int flags) /* Collection of OR-ed bits that control * the cancellation of the script. Only @@ -3828,64 +3832,66 @@ Tcl_CancelEval( { Tcl_HashEntry *hPtr; CancelInfo *cancelInfo; - int code; + int code = TCL_ERROR; const char *result; Tcl_MutexLock(&cancelLock); - if (cancelTableInitialized == 1) { - if (interp != NULL) { - hPtr = Tcl_FindHashEntry(&cancelTable, (char *) interp); - - if (hPtr != NULL) { - cancelInfo = (CancelInfo *) Tcl_GetHashValue(hPtr); + if (cancelTableInitialized != 1) { + /* + * No CancelInfo hash table (Tcl_CreateInterp has never been called?) + */ - if (cancelInfo != NULL) { - /* - * Populate information needed by the interpreter thread - * to fulfill the cancellation request. Currently, - * clientData is ignored. If the TCL_CANCEL_UNWIND flags - * bit is set, the script in progress is not allowed to - * catch the script cancellation because the evaluation - * stack for the interp is completely unwound. - */ - if (resultObjPtr != NULL) { - result = Tcl_GetStringFromObj(resultObjPtr, &cancelInfo->length); - cancelInfo->result = ckrealloc(cancelInfo->result, - cancelInfo->length); - memcpy((void *) cancelInfo->result, (void *) result, - (size_t) cancelInfo->length); - Tcl_DecrRefCount(resultObjPtr); /* discard their result object. */ - } else { - cancelInfo->result = NULL; - cancelInfo->length = 0; - } + goto done; + } + if (interp != NULL) { + /* + * A valid interp must be supplied. + */ - cancelInfo->clientData = clientData; - cancelInfo->flags = flags; + goto done; + } + hPtr = Tcl_FindHashEntry(&cancelTable, (char *) interp); + if (hPtr == NULL) { + /* + * No CancelInfo for this interp. + */ - Tcl_AsyncMark(cancelInfo->async); - code = TCL_OK; - } else { - /* the CancelInfo for this interp is invalid */ - code = TCL_ERROR; - } - } else { - /* no CancelInfo for this interp */ - code = TCL_ERROR; - } - } else { - /* a valid interp must be supplied */ - code = TCL_ERROR; - } - } else { + goto done; + } + cancelInfo = Tcl_GetHashValue(hPtr); + if (cancelInfo == NULL) { /* - * No CancelInfo hash table (Tcl_CreateInterp - * has never been called?) + * The CancelInfo for this interp is invalid. */ - code = TCL_ERROR; + goto done; } - Tcl_MutexUnlock(&cancelLock); + /* + * Populate information needed by the interpreter thread to fulfill the + * cancellation request. Currently, clientData is ignored. If the + * TCL_CANCEL_UNWIND flags bit is set, the script in progress is not + * allowed to catch the script cancellation because the evaluation stack + * for the interp is completely unwound. + */ + + if (resultObjPtr != NULL) { + result = Tcl_GetStringFromObj(resultObjPtr, &cancelInfo->length); + cancelInfo->result = ckrealloc(cancelInfo->result, + cancelInfo->length); + memcpy((void *) cancelInfo->result, (void *) result, + (size_t) cancelInfo->length); + Tcl_DecrRefCount(resultObjPtr); /* Discard their result object. */ + } else { + cancelInfo->result = NULL; + cancelInfo->length = 0; + } + cancelInfo->clientData = clientData; + cancelInfo->flags = flags; + Tcl_AsyncMark(cancelInfo->async); + code = TCL_OK; + + done: + Tcl_MutexUnlock(&cancelLock); return code; } @@ -3923,10 +3929,8 @@ Tcl_EvalObjv( Interp *iPtr = (Interp *) interp; int result; Namespace *lookupNsPtr; - TEOV_record *rootPtr = TOP_RECORD(iPtr); TEOV_record *recordPtr; - Tcl_ObjCmdProc *objProc; ClientData objClientData; int tebcCall = TEBC_CALL(iPtr); @@ -3984,7 +3988,6 @@ Tcl_EvalObjv( iPtr->ensembleRewrite.sourceObjs = NULL; } - /* * Lookup the command */ @@ -4050,9 +4053,8 @@ Tcl_EvalObjv( * into the TODO list, set the params as needed and restart at * the top. * - * Note that I removed the DTRACE thing: I have not really thought - * about where it really belongs, and do not really know what it does - * either. + * Note that I removed the DTRACE thing: I have not really thought about + * where it really belongs, and do not really know what it does either. */ iPtr->cmdCount++; @@ -4071,7 +4073,7 @@ Tcl_EvalObjv( COMPLETE_RECORD(recordPtr); cmdPtr->refCount++; - objProcReentryPoint: + objProcReentryPoint: /* * If this is an NR-enabled command, find the real objProc. */ @@ -4090,124 +4092,122 @@ Tcl_EvalObjv( */ switch(recordPtr->type) { - case TCL_NR_NO_TYPE: { - break; - } - case TCL_NR_BC_TYPE: { - tcl_nr_bc_type: - if (USE_NR_TEBC && tebcCall) { - /* - * We were called by TEBC, and we need a bytecode to be - * executed: just ask our caller to do that. - * TEBC_CALL(iPtr) = TEBC_DO_EXEC = 0 is not really needed, as - * it is already 0==TEBC_DO_EXEC - */ - - TEBC_CALL(iPtr) = TEBC_DO_EXEC; - TEBC_DATA(iPtr) = recordPtr->data.codePtr; - return TCL_OK; - } - + case TCL_NR_NO_TYPE: + break; + case TCL_NR_BC_TYPE: + tcl_nr_bc_type: + if (USE_NR_TEBC && tebcCall) { /* - * No TEBC atop - we'll just have to instantiate a new one and - * do the callback on return. + * We were called by TEBC, and we need a bytecode to be executed: + * just ask our caller to do that. + * TEBC_CALL(iPtr) = TEBC_DO_EXEC = 0 is not really needed, as it + * is already 0==TEBC_DO_EXEC */ - result = TclExecuteByteCode(interp, recordPtr->data.codePtr); - goto done; + TEBC_CALL(iPtr) = TEBC_DO_EXEC; + TEBC_DATA(iPtr) = recordPtr->data.codePtr; + return TCL_OK; } - case TCL_NR_TAILCALL_TYPE: { - /* - * Got to save this record, free the stack (ie, perform all - * pending callbacks) and restore the record. - */ - Tcl_Obj *tailObjPtr = recordPtr->data.obj.objPtr; + /* + * No TEBC atop - we'll just have to instantiate a new one and do the + * callback on return. + */ - result = TclEvalObjv_NR2(interp, result, rootPtr); + result = TclExecuteByteCode(interp, recordPtr->data.codePtr); + goto done; + case TCL_NR_TAILCALL_TYPE: { + /* + * Got to save this record, free the stack (i.e., perform all pending + * callbacks) and restore the record. + */ - if (result != TCL_OK) { - goto done; - } - if (USE_NR_TEBC && tebcCall) { - /* - * We were called by TEBC, and we need it to drop a frame: let - * him know. - */ + Tcl_Obj *tailObjPtr = recordPtr->data.obj.objPtr; - TEBC_CALL(iPtr) = TEBC_DO_TAILCALL; - TEBC_DATA(iPtr) = tailObjPtr; - return TCL_OK; - } + result = TclEvalObjv_NR2(interp, result, rootPtr); + if (result != TCL_OK) { + goto done; + } + if (USE_NR_TEBC && tebcCall) { /* - * ONLY supported if called from TEBC. Could do an 'uplevel 1'? - * Run from here (as hinted below)? Mmhhh ... FIXME. Maybe - * tailcalls SHOULD actually be bytecompiled (we know how to more - * or less fake it when falling off TEBC)? + * We were called by TEBC, and we need it to drop a frame: let him + * know. */ - Tcl_Panic("tailcall called from a non-compiled command?"); - /* FALL THROUGH */ + TEBC_CALL(iPtr) = TEBC_DO_TAILCALL; + TEBC_DATA(iPtr) = tailObjPtr; + return TCL_OK; } - case TCL_NR_CMD_TYPE: { - /* - * We got an unshared canonical list to eval , do it from here. - */ - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - Tcl_Obj **elemPtr; + /* + * ONLY supported if called from TEBC. Could do an 'uplevel 1'? Run + * from here (as hinted below)? Mmhhh ... FIXME. Maybe tailcalls + * SHOULD actually be bytecompiled (we know how to more or less fake + * it when falling off TEBC)? + */ - flags = recordPtr->data.obj.flags; - Tcl_ListObjGetElements(NULL, objPtr, &objc, &elemPtr); - objv = elemPtr; - if (objc == 0) { - goto done; - } + Tcl_Panic("tailcall called from a non-compiled command?"); + /* FALL THROUGH */ + } + case TCL_NR_CMD_TYPE: { + /* + * We got an unshared canonical list to eval , do it from here. + */ + + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + Tcl_Obj **elemPtr; + + flags = recordPtr->data.obj.flags; + Tcl_ListObjGetElements(NULL, objPtr, &objc, &elemPtr); + objv = elemPtr; + if (objc != 0) { goto restartAtTop; } - case TCL_NR_SCRIPT_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - - flags = recordPtr->data.obj.flags; - if (USE_NR_TEBC && tebcCall) { - result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); - if (result == TCL_OK) { - switch (recordPtr->type) { - case TCL_NR_BC_TYPE: - goto tcl_nr_bc_type; - case TCL_NR_NO_TYPE: - goto done; - default: - Tcl_Panic("TEOEx called from TEOV returns unexpected record type"); - } + goto done; + } + case TCL_NR_SCRIPT_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + + flags = recordPtr->data.obj.flags; + if (USE_NR_TEBC && tebcCall) { + result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); + if (result == TCL_OK) { + switch (recordPtr->type) { + case TCL_NR_BC_TYPE: + goto tcl_nr_bc_type; + case TCL_NR_NO_TYPE: + goto done; + default: + Tcl_Panic("TEOEx called from TEOV returns unexpected record type"); } - goto done; - } else { - result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); - goto done; } + } else { + result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); } - case TCL_NR_OBJPROC_TYPE: { - /* This is a rewrite like ns-import does, without a new - * cmdPtr or new reentrant call. FIXME: add the possibility of a - * new callback (TclNR_ObjProc has that), and maybe also edition - * of objc/objv? */ - - objProc = recordPtr->data.objProc.objProc; - objClientData = recordPtr->data.objProc.clientData; - recordPtr->type = TCL_NR_NO_TYPE; - goto objProcReentryPoint; - } - default: { - Tcl_Panic("TEOV: unknown NR-request type %i!", recordPtr->type); - } + goto done; } - done: + case TCL_NR_OBJPROC_TYPE: + /* + * This is a rewrite like ns-import does, without a new cmdPtr or new + * reentrant call. FIXME: add the possibility of a new callback + * (TclNR_ObjProc has that), and maybe also edition of objc/objv? + */ + + objProc = recordPtr->data.objProc.objProc; + objClientData = recordPtr->data.objProc.clientData; + recordPtr->type = TCL_NR_NO_TYPE; + goto objProcReentryPoint; + default: + Tcl_Panic("TEOV: unknown NR-request type %i!", recordPtr->type); + } + + done: return TclEvalObjv_NR2(interp, result, rootPtr); } -int TclEvalObjv_NR2( +int +TclEvalObjv_NR2( Tcl_Interp *interp, int result, struct TEOV_record *rootPtr) @@ -4268,11 +4268,9 @@ int TclEvalObjv_NR2( if (TclAsyncReady(iPtr)) { result = Tcl_AsyncInvoke(interp, result); } - if (result == TCL_OK) { result = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); } - if (result == TCL_OK && TclLimitReady(iPtr->limit)) { result = Tcl_LimitCheck(interp); } @@ -4304,9 +4302,9 @@ TEOV_PushExceptionHandlers( Interp *iPtr = (Interp *) interp; /* - * If any error processing is necessary, push the appropriate - * records. Note that we have to push them in the inverse order: first - * the one that has to run last. + * If any error processing is necessary, push the appropriate records. + * Note that we have to push them in the inverse order: first the one that + * has to run last. */ if (!(flags & TCL_EVAL_INVOKE)) { @@ -4314,8 +4312,8 @@ TEOV_PushExceptionHandlers( * Error messages */ - TclNR_AddCallback(interp, TEOV_Error, INT2PTR(objc), (ClientData) objv, - NULL, NULL); + TclNR_AddCallback(interp, TEOV_Error, INT2PTR(objc), + (ClientData) objv, NULL,NULL); } if (iPtr->numLevels == 1) { @@ -4334,11 +4332,12 @@ TEOV_SwitchVarFrame( Interp *iPtr = (Interp *) interp; /* - * Change the varFrame to be the rootVarFrame, and push a record - * to restore things at the end. + * Change the varFrame to be the rootVarFrame, and push a record to + * restore things at the end. */ - TclNR_AddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, NULL, NULL); + TclNR_AddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, + NULL, NULL); iPtr->varFramePtr = iPtr->rootFramePtr; } @@ -4415,10 +4414,9 @@ TEOV_NotFound( int i; CallFrame *varFramePtr = iPtr->varFramePtr; int result = TCL_OK; - Namespace *currNsPtr = NULL; /* Used to check for and invoke any - * registered unknown command handler - * for the current namespace (TIP - * 181). */ + Namespace *currNsPtr = NULL;/* Used to check for and invoke any registered + * unknown command handler for the current + * namespace (TIP 181). */ int newObjc, handlerObjc; Tcl_Obj **handlerObjv; Namespace *savedNsPtr = NULL; @@ -4432,8 +4430,8 @@ TEOV_NotFound( } /* - * Check to see if the resolution namespace has lost its unknown - * handler. If so, reset it to "::unknown". + * Check to see if the resolution namespace has lost its unknown handler. + * If so, reset it to "::unknown". */ if (currNsPtr->unknownHandlerPtr == NULL) { @@ -4454,10 +4452,9 @@ TEOV_NotFound( (int) sizeof(Tcl_Obj *) * newObjc); /* - * Copy command prefix from unknown handler and add on the real - * command's full argument list. Note that we only use memcpy() once - * because we have to increment the reference count of all the handler - * arguments anyway. + * Copy command prefix from unknown handler and add on the real command's + * full argument list. Note that we only use memcpy() once because we have + * to increment the reference count of all the handler arguments anyway. */ for (i = 0; i < handlerObjc; ++i) { @@ -4467,13 +4464,13 @@ TEOV_NotFound( memcpy(newObjv+handlerObjc, objv, sizeof(Tcl_Obj *) * (unsigned)objc); /* - * Look up and invoke the handler (by recursive call to this - * function). If there is no handler at all, instead of doing the - * recursive call we just generate a generic error message; it would - * be an infinite-recursion nightmare otherwise. + * Look up and invoke the handler (by recursive call to this function). If + * there is no handler at all, instead of doing the recursive call we just + * generate a generic error message; it would be an infinite-recursion + * nightmare otherwise. * - * In this case we worry a bit less about recursion for now, and call - * the "blocking" interface. + * In this case we worry a bit less about recursion for now, and call the + * "blocking" interface. */ cmdPtr = TEOV_LookupCmdFromObj(interp, newObjv[0], lookupNsPtr); @@ -4493,8 +4490,7 @@ TEOV_NotFound( } /* - * Release any resources we locked and allocated during the handler - * call. + * Release any resources we locked and allocated during the handler call. */ for (i = 0; i < handlerObjc; ++i) { @@ -4525,10 +4521,10 @@ TEOV_RunEnterTraces( command = Tcl_GetStringFromObj(commandPtr, &length); /* - * Call trace functions + * Call trace functions. * Execute any command or execution traces. Note that we bump up the - * command's reference count for the duration of the calling of the - * traces so that the structure doesn't go away underneath our feet. + * command's reference count for the duration of the calling of the traces + * so that the structure doesn't go away underneath our feet. */ cmdPtr->refCount++; @@ -4544,9 +4540,9 @@ TEOV_RunEnterTraces( TclCleanupCommandMacro(cmdPtr); /* - * If the traces modified/deleted the command or any existing traces, - * they will update the command's epoch. We need to lookup again, but do - * not run enter traces on the newly found cmdPtr. + * If the traces modified/deleted the command or any existing traces, they + * will update the command's epoch. We need to lookup again, but do not + * run enter traces on the newly found cmdPtr. */ if (cmdEpoch != newEpoch) { @@ -4556,8 +4552,7 @@ TEOV_RunEnterTraces( if (cmdPtr) { /* - * Command was found: push a record to schedule - * the leave traces. + * Command was found: push a record to schedule the leave traces. */ TclNR_AddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode), @@ -4601,18 +4596,17 @@ TEOV_RunLeaveTraces( Tcl_DecrRefCount(commandPtr); /* - * As cmdPtr is set, TclEvalObjv_NR2 is about to reduce the - * numlevels. Prevent that by resetting the cmdPtr field and dealing right - * here with cmdPtr->refCount. + * As cmdPtr is set, TclEvalObjv_NR2 is about to reduce the numlevels. + * Prevent that by resetting the cmdPtr field and dealing right here with + * cmdPtr->refCount. */ TclCleanupCommandMacro(cmdPtr); if (traceCode != TCL_OK) { return traceCode; - } else { - return result; } + return result; } static inline Command * @@ -5348,34 +5342,32 @@ TclNREvalObjEx( Tcl_IncrRefCount(objPtr); /* - * Pure List Optimization (no string representation). In this case, we - * can safely use Tcl_EvalObjv instead and get an appreciable - * improvement in execution speed. This is because it allows us to - * avoid a setFromAny step that would just pack everything into a - * string and back out again. + * Pure List Optimization (no string representation). In this case, we can + * safely use Tcl_EvalObjv instead and get an appreciable improvement in + * execution speed. This is because it allows us to avoid a setFromAny + * step that would just pack everything into a string and back out again. * * This restriction has been relaxed a bit by storing in lists whether - * they are "canonical" or not (a canonical list being one that is - * either pure or that has its string rep derived by - * UpdateStringOfList from the internal rep). + * they are "canonical" or not (a canonical list being one that is either + * pure or that has its string rep derived by UpdateStringOfList from the + * internal rep). */ if (objPtr->typePtr == &tclListType) { /* is a list... */ List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; - if (objPtr->bytes == NULL || /* ...without a string rep */ - listRepPtr->canonicalFlag) {/* ...or that is canonical */ + if (objPtr->bytes == NULL || /* ...without a string rep */ + listRepPtr->canonicalFlag) { /* ...or that is canonical */ /* - * TIP #280 Structures for tracking lines. As we know that - * this is dynamic execution we ignore the invoker, even if - * known. + * TIP #280 Structures for tracking lines. As we know that this is + * dynamic execution we ignore the invoker, even if known. */ int line, i; char *w; Tcl_Obj **elements, *copyPtr = TclListObjCopy(NULL, objPtr); CmdFrame *eoFramePtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); + TclStackAlloc(interp, sizeof(CmdFrame)); eoFramePtr->type = TCL_LOCATION_EVAL_LIST; eoFramePtr->level = (iPtr->cmdFramePtr == NULL? @@ -5420,9 +5412,9 @@ TclNREvalObjEx( */ ByteCode *newCodePtr; - CallFrame *savedVarFramePtr = NULL; - /* Saves old copy of iPtr->varFramePtr in - * case TCL_EVAL_GLOBAL was set. */ + CallFrame *savedVarFramePtr = NULL; /* Saves old copy of + * iPtr->varFramePtr in case + * TCL_EVAL_GLOBAL was set. */ if (flags & TCL_EVAL_GLOBAL) { savedVarFramePtr = iPtr->varFramePtr; @@ -5435,26 +5427,24 @@ TclNREvalObjEx( if (newCodePtr) { TEOV_record *recordPtr = TOP_RECORD(interp); - recordPtr->type = TCL_NR_BC_TYPE; + recordPtr->type = TCL_NR_BC_TYPE; recordPtr->data.codePtr = newCodePtr; return TCL_OK; - } else { - return TCL_ERROR; } + return TCL_ERROR; } /* - * We're not supposed to use the compiler or byte-code interpreter. - * Let Tcl_EvalEx evaluate the command directly (and probably more - * slowly). + * We're not supposed to use the compiler or byte-code interpreter. Let + * Tcl_EvalEx evaluate the command directly (and probably more slowly). * - * TIP #280. Propagate context as much as we can. Especially if the - * script to evaluate is a single literal it makes sense to look if - * our context is one with absolute line numbers we can then track - * into the literal itself too. + * TIP #280. Propagate context as much as we can. Especially if the script + * to evaluate is a single literal it makes sense to look if our context + * is one with absolute line numbers we can then track into the literal + * itself too. * - * See also tclCompile.c, TclInitCompileEnv, for the equivalent code - * in the bytecode compiler. + * See also tclCompile.c, TclInitCompileEnv, for the equivalent code in + * the bytecode compiler. */ if (invoker == NULL) { @@ -5467,21 +5457,20 @@ TclNREvalObjEx( } else { /* * We have an invoker, describing the command asking for the - * evaluation of a subordinate script. This script may originate - * in a literal word, or from a variable, etc. Using the line - * array we now check if we have good line information for the - * relevant word. The type of context is relevant as well. In a - * non-'source' context we don't have to try tracking lines. + * evaluation of a subordinate script. This script may originate in a + * literal word, or from a variable, etc. Using the line array we now + * check if we have good line information for the relevant word. The + * type of context is relevant as well. In a non-'source' context we + * don't have to try tracking lines. * - * First see if the word exists and is a literal. If not we go - * through the easy dynamic branch. No need to perform more - * complex invokations. + * First see if the word exists and is a literal. If not we go through + * the easy dynamic branch. No need to perform more complex + * invokations. */ if ((invoker->nline <= word) || (invoker->line[word] < 0)) { /* - * Dynamic script, or dynamic context, force our own - * context. + * Dynamic script, or dynamic context, force our own context. */ script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); @@ -5494,7 +5483,7 @@ TclNREvalObjEx( int pc = 0; CmdFrame *ctxPtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); + TclStackAlloc(interp, sizeof(CmdFrame)); *ctxPtr = *invoker; if (invoker->type == TCL_LOCATION_BC) { @@ -5570,7 +5559,9 @@ TEOEx_ByteCodeCallback( } iPtr->evalFlags = 0; - /* Restore the callFrame if this was a TCL_EVAL_GLOBAL */ + /* + * Restore the callFrame if this was a TCL_EVAL_GLOBAL. + */ if (savedVarFramePtr) { iPtr->varFramePtr = savedVarFramePtr; @@ -5591,7 +5582,10 @@ TEOEx_ListCallback( CmdFrame *eoFramePtr = data[1]; Tcl_Obj *copyPtr = data[2]; - /* Remove the cmdFrame if it was added */ + /* + * Remove the cmdFrame if it was added. + */ + Tcl_DecrRefCount(copyPtr); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; ckfree((char *) eoFramePtr->line); @@ -7415,39 +7409,38 @@ NRPostProcess( if ((result == TCL_OK) && VALID_NEW_REQUEST(recordPtr)) { switch(recordPtr->type) { - case TCL_NR_BC_TYPE: { - result = TclExecuteByteCode(interp, recordPtr->data.codePtr); - break; - } - case TCL_NR_CMD_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - int flags = recordPtr->data.obj.flags; - Tcl_Obj **objv; - int objc; - - Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); - result = Tcl_EvalObjv(interp, objc, objv, flags); - break; - } - case TCL_NR_SCRIPT_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - int flags = recordPtr->data.obj.flags; + case TCL_NR_BC_TYPE: + result = TclExecuteByteCode(interp, recordPtr->data.codePtr); + break; + case TCL_NR_CMD_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + int flags = recordPtr->data.obj.flags; + Tcl_Obj **objv; + int objc; - result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); - break; - } - case TCL_NR_OBJPROC_TYPE: { - Tcl_ObjCmdProc *objProc = recordPtr->data.objProc.objProc; - ClientData clientData = recordPtr->data.objProc.clientData; + Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); + result = Tcl_EvalObjv(interp, objc, objv, flags); + break; + } + case TCL_NR_SCRIPT_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + int flags = recordPtr->data.obj.flags; - if (!objc) { - Tcl_Panic("NRPostProcess: something is very wrong!"); - } - result = (*objProc)(clientData, interp, objc, objv); - break; + result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); + break; + } + case TCL_NR_OBJPROC_TYPE: { + Tcl_ObjCmdProc *objProc = recordPtr->data.objProc.objProc; + ClientData clientData = recordPtr->data.objProc.clientData; + + if (!objc) { + Tcl_Panic("NRPostProcess: something is very wrong!"); } - default: - Tcl_Panic("NRPostProcess: invalid record type"); + result = (*objProc)(clientData, interp, objc, objv); + break; + } + default: + Tcl_Panic("NRPostProcess: invalid record type"); } } @@ -7492,7 +7485,8 @@ TclNR_CreateCommand( * specified namespace; otherwise it is put in * the global namespace. */ Tcl_ObjCmdProc *proc, /* Object-based function to associate with - * name, provides direct access for direct calls */ + * name, provides direct access for direct + * calls. */ Tcl_ObjCmdProc *nreProc, /* Object-based function to associate with * name, provides NR implementation */ ClientData clientData, /* Arbitrary value to pass to object @@ -7504,8 +7498,8 @@ TclNR_CreateCommand( Command *cmdPtr; - cmdPtr = (Command *) Tcl_CreateObjCommand(interp, cmdName, proc, clientData, - deleteProc); + cmdPtr = (Command *) Tcl_CreateObjCommand(interp, cmdName, proc, + clientData, deleteProc); cmdPtr->nreProc = nreProc; return (Tcl_Command) cmdPtr; } @@ -7515,7 +7509,6 @@ TclNR_CreateCommand( * */ - /* * TclNREvalCmd should only be called as an optimisation: when objPtr is known * to be a canonical list that is not (and will not!) be shared @@ -7523,8 +7516,8 @@ TclNR_CreateCommand( int TclNREvalCmd( - Tcl_Interp * interp, - Tcl_Obj * objPtr, + Tcl_Interp *interp, + Tcl_Obj *objPtr, int flags) { TEOV_record *recordPtr = TOP_RECORD(interp); @@ -7559,8 +7552,8 @@ TclNR_EvalObjv( int TclNR_EvalObj( - Tcl_Interp * interp, - Tcl_Obj * objPtr, + Tcl_Interp *interp, + Tcl_Obj *objPtr, int flags) { TEOV_record *recordPtr = TOP_RECORD(interp); @@ -7592,7 +7585,7 @@ TclNR_EvalObj( int TclNR_ObjProc( - Tcl_Interp * interp, + Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData) { @@ -7631,9 +7624,9 @@ TclNR_ObjProc( int TclTailcallObjCmd( ClientData clientData, - Tcl_Interp * interp, + Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[] ) + Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; TEOV_record *recordPtr = TOP_RECORD(interp); @@ -7645,8 +7638,9 @@ TclTailcallObjCmd( */ if (!iPtr->varFramePtr->isProcCallFrame) { - Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); - return TCL_ERROR; + Tcl_SetResult(interp, + "tailcall can only be called from a proc or lambda", TCL_STATIC); + return TCL_ERROR; } listPtr = Tcl_NewListObj(objc-1, objv+1); @@ -7655,7 +7649,8 @@ TclTailcallObjCmd( return TCL_OK; } -void TclNR_AddCallback( +void +TclNR_AddCallback( Tcl_Interp *interp, TclNR_PostProc *postProcPtr, ClientData data0, @@ -7694,15 +7689,14 @@ TclNRPushRecord( } void -TclNRPopAndFreeRecord ( - Tcl_Interp * interp) +TclNRPopAndFreeRecord( + Tcl_Interp *interp) { TEOV_record *recordPtr; POP_RECORD(interp, recordPtr); FREE_RECORD(interp, recordPtr); } - /* * Local Variables: diff --git a/generic/tclProc.c b/generic/tclProc.c index 4ecd57f..a74a064 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,22 +12,24 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.145 2008/07/14 08:22:14 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.146 2008/07/14 14:15:11 dkf Exp $ */ #include "tclInt.h" #include "tclCompile.h" #include "tclNRE.h" +/* + * Variables that are part of the [apply] command implementation and which + * have to be passed to the other side of the NRE call. + */ + typedef struct { int isRootEnsemble; Command cmd; ExtraFrameInfo efi; } ApplyExtraData; -static TclNR_PostProc ApplyNR2; -static TclNR_PostProc InterpProcNR2; - /* * Prototypes for static functions in this file */ @@ -56,7 +58,8 @@ static int ProcCompileProc(Tcl_Interp *interp, Proc *procPtr, Tcl_Obj *bodyPtr, Namespace *nsPtr, const char *description, const char *procName, Proc **procPtrPtr); - +static TclNR_PostProc ApplyNR2; +static TclNR_PostProc InterpProcNR2; static TclNR_PostProc Uplevel_Callback; /* @@ -198,7 +201,7 @@ Tcl_ProcObjCmd( Tcl_DStringAppend(&ds, procName, -1); cmd = TclNR_CreateCommand(interp, Tcl_DStringValue(&ds), TclObjInterpProc, - TclNRInterpProc, (ClientData) procPtr, TclProcDeleteProc); + TclNRInterpProc, procPtr, TclProcDeleteProc); Tcl_DStringFree(&ds); /* @@ -963,7 +966,8 @@ TclNRUplevelObjCmd( objPtr = Tcl_ConcatObj(objc, objv); } - TclNR_AddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, NULL); + TclNR_AddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, + NULL); return TclNREvalObjEx(interp, objPtr, 0, NULL, 0); } @@ -1462,7 +1466,6 @@ InitArgsAndLocals( * defPtr and varPtr point to the last argument to be initialized. */ - varPtr->flags = 0; if (defPtr->flags & VAR_IS_ARGS) { Tcl_Obj *listPtr = Tcl_NewListObj(argCt-i, argObjs+i); @@ -1491,7 +1494,8 @@ InitArgsAndLocals( correctArgs: if (numArgs < localCt) { - if (!framePtr->nsPtr->compiledVarResProc && !((Interp *)interp)->resolverPtr) { + if (!framePtr->nsPtr->compiledVarResProc + && !((Interp *)interp)->resolverPtr) { memset(varPtr, 0, (localCt - numArgs)*sizeof(Var)); } else { InitResolvedLocals(interp, codePtr, varPtr, framePtr->nsPtr); @@ -1500,13 +1504,13 @@ InitArgsAndLocals( return TCL_OK; - - incorrectArgs: /* * Initialise all compiled locals to avoid problems at DeleteLocalVars. */ - memset(varPtr, 0, ((framePtr->compiledLocals + localCt)-varPtr)*sizeof(Var)); + incorrectArgs: + memset(varPtr, 0, + ((framePtr->compiledLocals + localCt)-varPtr) * sizeof(Var)); return ProcWrongNumArgs(interp, skip); } @@ -1606,10 +1610,9 @@ PushProcCallFrame( return TCL_OK; } - static int TclNR_BC( - Tcl_Interp * interp, + Tcl_Interp *interp, ByteCode *codePtr, TclNR_PostProc *postProcPtr, Tcl_Obj *procNameObj, @@ -1617,9 +1620,10 @@ TclNR_BC( { TEOV_record *recordPtr = TOP_RECORD(interp); - recordPtr->type = TCL_NR_BC_TYPE; + recordPtr->type = TCL_NR_BC_TYPE; recordPtr->data.codePtr = codePtr; - TclNR_AddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, NULL); + TclNR_AddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, + NULL); return TCL_OK; } @@ -1650,18 +1654,17 @@ TclObjInterpProc( * procedure. */ Tcl_Obj *const objv[]) /* Argument value objects. */ { - int result; - /* * Not used in the core; external interface for iTcl and XOTcl */ - result = PushProcCallFrame(clientData, interp, objc, objv, /*isLambda*/ 0); - if (result == TCL_OK) { - return TclObjInterpProcCore(interp, objv[0], 1, &MakeProcError); - } else { + int result = PushProcCallFrame(clientData, interp, objc, objv, + /*isLambda*/ 0); + + if (result != TCL_OK) { return TCL_ERROR; } + return TclObjInterpProcCore(interp, objv[0], 1, &MakeProcError); } int @@ -1672,16 +1675,15 @@ TclNRInterpProc( * invoked. */ int objc, /* Count of number of arguments to this * procedure. */ - Tcl_Obj *CONST objv[]) /* Argument value objects. */ + Tcl_Obj *const objv[]) /* Argument value objects. */ { - int result; + int result = PushProcCallFrame(clientData, interp, objc, objv, + /*isLambda*/ 0); - result = PushProcCallFrame(clientData, interp, objc, objv, /*isLambda*/ 0); - if (result == TCL_OK) { - return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError); - } else { + if (result != TCL_OK) { return TCL_ERROR; } + return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError); } /* @@ -1760,7 +1762,7 @@ TclNRInterpProcCore( result = InitArgsAndLocals(interp, procNameObj, skip); if (result != TCL_OK) { freePtr = iPtr->framePtr; - Tcl_PopCallFrame(interp); /* Pop but do not free. */ + Tcl_PopCallFrame(interp); /* Pop but do not free. */ TclStackFree(interp, freePtr->compiledLocals); /* Free compiledLocals. */ TclStackFree(interp, freePtr); /* Free CallFrame. */ @@ -1788,12 +1790,13 @@ TclNRInterpProcCore( if (TCL_DTRACE_PROC_ARGS_ENABLED()) { char *a[10]; - int i = 0; + int i; int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; - while (i < 10) { + for (i=0 ; i<10 ; i++) { a[i] = (l < iPtr->varFramePtr->objc ? - TclGetString(iPtr->varFramePtr->objv[l]) : NULL); i++; l++; + TclGetString(iPtr->varFramePtr->objv[l]) : NULL); + l++; } TCL_DTRACE_PROC_ARGS(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]); @@ -1823,7 +1826,6 @@ TclNRInterpProcCore( } TclNR_BC(interp, codePtr, InterpProcNR2, procNameObj, errorProc); - return TCL_OK; } @@ -2000,21 +2002,22 @@ ProcCompileProc( && (codePtr->nsPtr == nsPtr) && (codePtr->nsEpoch == nsPtr->resolverEpoch)) { return TCL_OK; - } else { - if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) { - if ((Interp *) *codePtr->interpHandle != iPtr) { - Tcl_AppendResult(interp, - "a precompiled script jumped interps", NULL); - return TCL_ERROR; - } - codePtr->compileEpoch = iPtr->compileEpoch; - codePtr->nsPtr = nsPtr; - } else { - bodyPtr->typePtr->freeIntRepProc(bodyPtr); - bodyPtr->typePtr = NULL; + } + + if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) { + if ((Interp *) *codePtr->interpHandle != iPtr) { + Tcl_AppendResult(interp, + "a precompiled script jumped interps", NULL); + return TCL_ERROR; } + codePtr->compileEpoch = iPtr->compileEpoch; + codePtr->nsPtr = nsPtr; + } else { + bodyPtr->typePtr->freeIntRepProc(bodyPtr); + bodyPtr->typePtr = NULL; } } + if (bodyPtr->typePtr != &tclByteCodeType) { Tcl_HashEntry *hePtr; @@ -2704,13 +2707,12 @@ Tcl_ApplyObjCmd( return TclNR_CallObjProc(interp, TclNRApplyObjCmd, dummy, objc, objv); } - int TclNRApplyObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; Proc *procPtr = NULL; @@ -2883,7 +2885,6 @@ MakeLambdaError( (overflow ? "..." : ""), interp->errorLine)); } - /* *---------------------------------------------------------------------- * -- cgit v0.12 From 8fde7ec910e486d89ba49167d1b295a34197064c Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 20:29:38 +0000 Subject: * generic/tclParse.c: reverting the "fix" for [Bug 2017583], * tests/parse.test: numLevel management and TclInterpReady check seems to be necessary after all. --- ChangeLog | 6 ++++++ generic/tclParse.c | 13 ++++++++++--- tests/parse.test | 6 +++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 837a169..7fe38d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-07-14 Miguel Sofer + + * generic/tclParse.c: reverting the "fix" for [Bug 2017583], + * tests/parse.test: numLevel management and TclInterpReady check + seems to be necessary after all. + 2008-07-14 Donal K. Fellows * generic/tclProc.c (TclNRApplyObjCmd, TclObjInterpProcCore): diff --git a/generic/tclParse.c b/generic/tclParse.c index 061f9eb..269978d 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.69 2008/07/14 02:09:30 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.70 2008/07/14 20:29:40 msofer Exp $ */ #include "tclInt.h" @@ -2165,9 +2165,16 @@ TclSubstTokens( break; case TCL_TOKEN_COMMAND: { + Interp *iPtr = (Interp *) interp; + /* TIP #280: Transfer line information to nested command */ - code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, - 0, line); + iPtr->numLevels++; + code = TclInterpReady(interp); + if (code == TCL_OK) { + code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, + 0, line); + } + iPtr->numLevels--; appendObj = Tcl_GetObjResult(interp); break; } diff --git a/tests/parse.test b/tests/parse.test index e1ab8c7..2220e22 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.33 2008/07/14 00:38:02 msofer Exp $ +# RCS: @(#) $Id: parse.test,v 1.34 2008/07/14 20:29:41 msofer Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -1025,7 +1025,7 @@ test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { interp create i load {} Tcltest i i eval {proc {} args {}} - interp recursionlimit i 1 + interp recursionlimit i 2 } -body { i eval {testevalex {[[]]}} } -cleanup { @@ -1045,7 +1045,7 @@ test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { interp create i i eval {proc {} args {}} - interp recursionlimit i 1 + interp recursionlimit i 2 } -body { i eval {subst {[[]]}} } -cleanup { -- cgit v0.12 From 435f37009833610d8e3dea01a0ff383edacd967d Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 15 Jul 2008 10:15:48 +0000 Subject: Factor the ensemble code a bit more. --- ChangeLog | 7 + generic/tclNamesp.c | 404 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 243 insertions(+), 168 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fe38d3..5484e06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-15 Donal K. Fellows + + * generic/tclNamesp.c (EnsembleUnknownCallback): Factor out some of + the more complex parts of the ensemble code to make it easier to + understand and hence to permit tighter compilation of code on the + critical path. + 2008-07-14 Miguel Sofer * generic/tclParse.c: reverting the "fix" for [Bug 2017583], diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index a0a651b..3faae95 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.165 2008/07/13 09:03:35 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.166 2008/07/15 10:15:52 dkf Exp $ */ #include "tclInt.h" @@ -154,6 +154,9 @@ static int DoImport(Tcl_Interp *interp, const char *cmdName, const char *pattern, Namespace *importNsPtr, int allowOverwrite); static void DupNsNameInternalRep(Tcl_Obj *objPtr,Tcl_Obj *copyPtr); +static inline int EnsembleUnknownCallback(Tcl_Interp *interp, + EnsembleConfig *ensemblePtr, int objc, + Tcl_Obj *const objv[], Tcl_Obj **prefixObjPtr); static char * ErrorCodeRead(ClientData clientData,Tcl_Interp *interp, const char *name1, const char *name2, int flags); static char * ErrorInfoRead(ClientData clientData,Tcl_Interp *interp, @@ -1645,7 +1648,8 @@ DoImport( dataPtr = (ImportedCmdData *) ckalloc(sizeof(ImportedCmdData)); importedCmd = TclNR_CreateCommand(interp, Tcl_DStringValue(&ds), - InvokeImportedCmd, InvokeImportedNRCmd, dataPtr, DeleteImportedCmd); + InvokeImportedCmd, InvokeImportedNRCmd, dataPtr, + DeleteImportedCmd); dataPtr->realCmdPtr = cmdPtr; dataPtr->selfPtr = (Command *) importedCmd; dataPtr->selfPtr->compileProc = cmdPtr->compileProc; @@ -1893,11 +1897,10 @@ InvokeImportedNRCmd( register Command *realCmdPtr = dataPtr->realCmdPtr; if (!realCmdPtr->nreProc) { - return (*realCmdPtr->objProc)(realCmdPtr->objClientData, interp, - objc, objv); + return realCmdPtr->objProc(realCmdPtr->objClientData, interp, + objc, objv); } - return (*realCmdPtr->nreProc)(realCmdPtr->objClientData, interp, - objc, objv); + return realCmdPtr->nreProc(realCmdPtr->objClientData, interp, objc, objv); } static int @@ -1911,8 +1914,7 @@ InvokeImportedCmd( register ImportedCmdData *dataPtr = clientData; register Command *realCmdPtr = dataPtr->realCmdPtr; - return (*realCmdPtr->objProc)(realCmdPtr->objClientData, interp, - objc, objv); + return realCmdPtr->objProc(realCmdPtr->objClientData, interp, objc, objv); } /* @@ -2797,7 +2799,8 @@ Tcl_NamespaceObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return TclNR_CallObjProc(interp, TclNRNamespaceObjCmd, clientData, objc, objv); + return TclNR_CallObjProc(interp, TclNRNamespaceObjCmd, clientData, objc, + objv); } int @@ -3260,35 +3263,6 @@ NamespaceDeleteCmd( */ static int -NsEval_Callback( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - Tcl_Namespace *namespacePtr = data[0]; - - if (result == TCL_ERROR) { - int length = strlen(namespacePtr->fullName); - int limit = 200; - int overflow = (length > limit); - char *cmd = data[1]; - - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (in namespace %s \"%.*s%s\" script line %d)", - cmd, - (overflow ? limit : length), namespacePtr->fullName, - (overflow ? "..." : ""), interp->errorLine)); - } - - /* - * Restore the previous "current" namespace. - */ - - TclPopStackFrame(interp); - return result; -} - -static int NamespaceEvalCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ @@ -3358,9 +3332,39 @@ NamespaceEvalCmd( * TIP #280: Make invoking context available to eval'd script. */ - TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "eval", NULL, NULL); + TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "eval", + NULL, NULL); return TclNREvalObjEx(interp, objPtr, 0, iPtr->cmdFramePtr, 3); } + +static int +NsEval_Callback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Namespace *namespacePtr = data[0]; + + if (result == TCL_ERROR) { + int length = strlen(namespacePtr->fullName); + int limit = 200; + int overflow = (length > limit); + char *cmd = data[1]; + + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in namespace %s \"%.*s%s\" script line %d)", + cmd, + (overflow ? limit : length), namespacePtr->fullName, + (overflow ? "..." : ""), interp->errorLine)); + } + + /* + * Restore the previous "current" namespace. + */ + + TclPopStackFrame(interp); + return result; +} /* *---------------------------------------------------------------------- @@ -3774,7 +3778,8 @@ NamespaceInscopeCmd( Tcl_DecrRefCount(listPtr); /* We're done with the list object. */ } - TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "inscope", NULL, NULL); + TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "inscope", + NULL, NULL); return TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); } @@ -6045,21 +6050,6 @@ NsEnsembleImplementationCmd( clientData, objc, objv); } -int -TclClearRootEnsemble( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - Interp *iPtr = (Interp *) interp; - - iPtr->ensembleRewrite.sourceObjs = NULL; - iPtr->ensembleRewrite.numRemovedObjs = 0; - iPtr->ensembleRewrite.numInsertedObjs = 0; - - return result; -} - static int NsEnsembleImplementationCmdNR( ClientData clientData, @@ -6069,19 +6059,12 @@ NsEnsembleImplementationCmdNR( { EnsembleConfig *ensemblePtr = clientData; /* The ensemble itself. */ - Tcl_Obj **tempObjv; /* Space used to construct the list of - * arguments to pass to the command that - * implements the ensemble subcommand. */ - int result; /* The result of the subcommand execution. */ Tcl_Obj *prefixObj; /* An object containing the prefix words of * the command that implements the * subcommand. */ Tcl_HashEntry *hPtr; /* Used for efficient lookup of fully * specified but not yet cached command * names. */ - Tcl_Obj **prefixObjv; /* The list of objects to substitute in as the - * target command prefix. */ - int prefixObjc; /* Size of prefixObjv of course! */ int reparseCount = 0; /* Number of reparses. */ if (objc < 2) { @@ -6133,7 +6116,7 @@ NsEnsembleImplementationCmdNR( /* * Look in the hashtable for the subcommand name; this is the fastest way - * of all. + * of all if there is no cache in operation. */ hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, @@ -6232,48 +6215,58 @@ NsEnsembleImplementationCmdNR( */ { + Tcl_Obj **prefixObjv; /* The list of objects to substitute in as the + * target command prefix. */ + Tcl_Obj *copyPtr; /* The actual list of words to dispatch to. + * Will be freed by the dispatch engine. */ + int prefixObjc, copyObjc; Interp *iPtr = (Interp *) interp; - int isRootEnsemble, i, tempObjc; - Tcl_Obj *copyPtr; - List *listRepPtr; /* * Get the prefix that we're rewriting to. To do this we need to * ensure that the internal representation of the list does not change * so that we can safely keep the internal representations of the * elements in the list. + * + * TODO: Use conventional list operations to make this code sane! */ TclListObjGetElements(NULL, prefixObj, &prefixObjc, &prefixObjv); - tempObjc = objc - 2 + prefixObjc; - copyPtr = Tcl_NewListObj(tempObjc, NULL); - if (tempObjc > 0) { - listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; - listRepPtr->elemCount = tempObjc; - tempObjv = &listRepPtr->elements; - - memcpy(tempObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); - memcpy(tempObjv+prefixObjc, objv+2, sizeof(Tcl_Obj *) * (objc-2)); - - for (i=0; i < tempObjc; i++) { - Tcl_IncrRefCount(tempObjv[i]); + copyObjc = objc - 2 + prefixObjc; + copyPtr = Tcl_NewListObj(copyObjc, NULL); + if (copyObjc > 0) { + register Tcl_Obj **copyObjv; + /* Space used to construct the list of + * arguments to pass to the command that + * implements the ensemble subcommand. */ + register List *listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; + register int i; + + listRepPtr->elemCount = copyObjc; + copyObjv = &listRepPtr->elements; + memcpy(copyObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); + memcpy(copyObjv+prefixObjc, objv+2, sizeof(Tcl_Obj *) * (objc-2)); + + for (i=0; i < copyObjc; i++) { + Tcl_IncrRefCount(copyObjv[i]); } } - Tcl_DecrRefCount(prefixObj); + TclDecrRefCount(prefixObj); /* * Record what arguments the script sent in so that things like * Tcl_WrongNumArgs can give the correct error message. */ - isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); - if (isRootEnsemble) { + if (iPtr->ensembleRewrite.sourceObjs == NULL) { iPtr->ensembleRewrite.sourceObjs = objv; iPtr->ensembleRewrite.numRemovedObjs = 2; iPtr->ensembleRewrite.numInsertedObjs = prefixObjc; + TclNR_AddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, + NULL); } else { - int ni = iPtr->ensembleRewrite.numInsertedObjs; + register int ni = iPtr->ensembleRewrite.numInsertedObjs; if (ni < 2) { iPtr->ensembleRewrite.numRemovedObjs += 2 - ni; @@ -6287,10 +6280,6 @@ NsEnsembleImplementationCmdNR( * Hand off to the target command. */ - if (isRootEnsemble) { - TclNR_AddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); - } - return TclNREvalCmd(interp, copyPtr, TCL_EVAL_INVOKE); } @@ -6303,90 +6292,15 @@ NsEnsembleImplementationCmdNR( */ if (ensemblePtr->unknownHandler != NULL && reparseCount++ < 1) { - int paramc, i; - Tcl_Obj **paramv, *unknownCmd, *ensObj; - - unknownCmd = Tcl_DuplicateObj(ensemblePtr->unknownHandler); - TclNewObj(ensObj); - Tcl_GetCommandFullName(interp, ensemblePtr->token, ensObj); - Tcl_ListObjAppendElement(NULL, unknownCmd, ensObj); - for (i=1 ; iflags & ENS_DEAD) { - Tcl_DecrRefCount(prefixObj); - Tcl_SetResult(interp, - "unknown subcommand handler deleted its ensemble", - TCL_STATIC); - return TCL_ERROR; - } - - /* - * Namespace is still there. Check if the result is a valid list. - * If it is, and it is non-empty, that list is what we are using - * as our replacement. - */ - - if (TclListObjLength(interp, prefixObj, &prefixObjc) != TCL_OK) { - Tcl_DecrRefCount(prefixObj); - Tcl_AddErrorInfo(interp, "\n while parsing result of " - "ensemble unknown subcommand handler"); - return TCL_ERROR; - } - if (prefixObjc > 0) { - goto runResultingSubcommand; - } - - /* - * Namespace alive & empty result => reparse. - */ - - Tcl_DecrRefCount(prefixObj); + switch (EnsembleUnknownCallback(interp, ensemblePtr, objc, objv, + &prefixObj)) { + case TCL_OK: + goto runResultingSubcommand; + case TCL_ERROR: + return TCL_ERROR; + case TCL_CONTINUE: goto restartEnsembleParse; } - if (!Tcl_InterpDeleted(interp)) { - if (result != TCL_ERROR) { - char buf[TCL_INTEGER_SPACE]; - - Tcl_ResetResult(interp); - Tcl_SetResult(interp, - "unknown subcommand handler returned bad code: ", - TCL_STATIC); - switch (result) { - case TCL_RETURN: - Tcl_AppendResult(interp, "return", NULL); - break; - case TCL_BREAK: - Tcl_AppendResult(interp, "break", NULL); - break; - case TCL_CONTINUE: - Tcl_AppendResult(interp, "continue", NULL); - break; - default: - sprintf(buf, "%d", result); - Tcl_AppendResult(interp, buf, NULL); - } - Tcl_AddErrorInfo(interp, "\n result of " - "ensemble unknown subcommand handler: "); - Tcl_AddErrorInfo(interp, TclGetString(unknownCmd)); - } else { - Tcl_AddErrorInfo(interp, - "\n (ensemble unknown subcommand handler)"); - } - } - Tcl_DecrRefCount(unknownCmd); - Tcl_Release(ensemblePtr); - return TCL_ERROR; } /* @@ -6426,6 +6340,160 @@ NsEnsembleImplementationCmdNR( TclGetString(objv[1]), NULL); return TCL_ERROR; } + +int +TclClearRootEnsemble( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + + iPtr->ensembleRewrite.sourceObjs = NULL; + iPtr->ensembleRewrite.numRemovedObjs = 0; + iPtr->ensembleRewrite.numInsertedObjs = 0; + + return result; +} + +/* + * ---------------------------------------------------------------------- + * + * EnsmebleUnknownCallback -- + * + * Helper for the ensemble engine that handles the procesing of unknown + * callbacks. See the user documentation of the ensemble unknown handler + * for details; this function is only ever called when such a function is + * defined, and is only ever called once per ensemble dispatch (i.e. if a + * reparse still fails, this isn't called again). + * + * Results: + * TCL_OK - *prefixObjPtr contains the command words to dispatch + * to. + * TCL_CONTINUE - Need to reparse (*prefixObjPtr is invalid). + * TCL_ERROR - Something went wrong! Error message in interpreter. + * + * Side effects: + * Calls the Tcl interpreter, so arbitrary. + * + * ---------------------------------------------------------------------- + */ + +static inline int +EnsembleUnknownCallback( + Tcl_Interp *interp, + EnsembleConfig *ensemblePtr, + int objc, + Tcl_Obj *const objv[], + Tcl_Obj **prefixObjPtr) +{ + int paramc, i, result, prefixObjc; + Tcl_Obj **paramv, *unknownCmd, *ensObj; + char buf[TCL_INTEGER_SPACE]; + + /* + * Create the unknown command callback to determine what to do. + */ + + unknownCmd = Tcl_DuplicateObj(ensemblePtr->unknownHandler); + TclNewObj(ensObj); + Tcl_GetCommandFullName(interp, ensemblePtr->token, ensObj); + Tcl_ListObjAppendElement(NULL, unknownCmd, ensObj); + for (i=1 ; iflags & ENS_DEAD)) { + Tcl_SetResult(interp, + "unknown subcommand handler deleted its ensemble", + TCL_STATIC); + result = TCL_ERROR; + } + Tcl_Release(ensemblePtr); + + /* + * If we succeeded, we should either have a list of words that form the + * command to be executed, or an empty list. In the empty-list case, the + * ensemble is believed to be updated so we should ask the ensemble engine + * to reparse the original command. + */ + + if (result == TCL_OK) { + *prefixObjPtr = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(*prefixObjPtr); + TclDecrRefCount(unknownCmd); + Tcl_ResetResult(interp); + + /* + * Namespace is still there. Check if the result is a valid list. If + * it is, and it is non-empty, that list is what we are using as our + * replacement. + */ + + if (TclListObjLength(interp, *prefixObjPtr, &prefixObjc) != TCL_OK) { + TclDecrRefCount(*prefixObjPtr); + Tcl_AddErrorInfo(interp, "\n while parsing result of " + "ensemble unknown subcommand handler"); + return TCL_ERROR; + } + if (prefixObjc > 0) { + return TCL_OK; + } + + /* + * Namespace alive & empty result => reparse. + */ + + TclDecrRefCount(*prefixObjPtr); + return TCL_CONTINUE; + } + + /* + * Oh no! An exceptional result. Convert to an error. + */ + + if (!Tcl_InterpDeleted(interp)) { + if (result != TCL_ERROR) { + Tcl_ResetResult(interp); + Tcl_SetResult(interp, + "unknown subcommand handler returned bad code: ", + TCL_STATIC); + switch (result) { + case TCL_RETURN: + Tcl_AppendResult(interp, "return", NULL); + break; + case TCL_BREAK: + Tcl_AppendResult(interp, "break", NULL); + break; + case TCL_CONTINUE: + Tcl_AppendResult(interp, "continue", NULL); + break; + default: + sprintf(buf, "%d", result); + Tcl_AppendResult(interp, buf, NULL); + } + Tcl_AddErrorInfo(interp, "\n result of " + "ensemble unknown subcommand handler: "); + Tcl_AddErrorInfo(interp, TclGetString(unknownCmd)); + } else { + Tcl_AddErrorInfo(interp, + "\n (ensemble unknown subcommand handler)"); + } + } + TclDecrRefCount(unknownCmd); + return TCL_ERROR; +} /* *---------------------------------------------------------------------- -- cgit v0.12 From d23055ab5a73740c064ad7e19c09fd47b1278dd9 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 15 Jul 2008 12:58:18 +0000 Subject: Fix error in example. [Bug 2016740] --- ChangeLog | 2 ++ doc/DictObj.3 | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5484e06..369f675 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-15 Donal K. Fellows + * doc/DictObj.3: Fix error in example. [Bug 2016740] + * generic/tclNamesp.c (EnsembleUnknownCallback): Factor out some of the more complex parts of the ensemble code to make it easier to understand and hence to permit tighter compilation of code on the diff --git a/doc/DictObj.3 b/doc/DictObj.3 index 1010cbd..45e57b9 100644 --- a/doc/DictObj.3 +++ b/doc/DictObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: DictObj.3,v 1.11 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: DictObj.3,v 1.12 2008/07/15 12:58:19 dkf Exp $ '\" .so man.macros .TH Tcl_DictObj 3 8.5 Tcl "Tcl Library Procedures" @@ -216,7 +216,7 @@ if (\fBTcl_DictObjFirst\fR(interp, objPtr, &search, &key, &value, &done) != TCL_OK) { return TCL_ERROR; } -for (; done ; \fBTcl_DictObjNext\fR(&search, &key, &value, &done)) { +for (; !done ; \fBTcl_DictObjNext\fR(&search, &key, &value, &done)) { /* * Note that strcmp() is not a good way of comparing * objects and is just used here for demonstration -- cgit v0.12 From 98024fc3424aa3fa10c6983bc7e3701dd7bd1f8b Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 15 Jul 2008 13:50:14 +0000 Subject: Fix [Bug 2018603] --- ChangeLog | 2 ++ generic/tclBasic.c | 57 +++++++++++++++++++++++------------------------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 369f675..426b2c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-15 Donal K. Fellows + * generic/tclBasic.c (Tcl_CancelEval): Fix blunder. [Bug 2018603] + * doc/DictObj.3: Fix error in example. [Bug 2016740] * generic/tclNamesp.c (EnsembleUnknownCallback): Factor out some of diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c1bee01..d2a1054 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.311 2008/07/14 14:15:10 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.312 2008/07/15 13:50:15 dkf Exp $ */ #include "tclInt.h" @@ -3313,7 +3313,9 @@ OldMathFuncProc( * We have a non-numeric argument. */ - Tcl_SetResult(interp, "argument to math function didn't have numeric value", TCL_STATIC); + Tcl_SetResult(interp, + "argument to math function didn't have numeric value", + TCL_STATIC); TclCheckBadOctal(interp, Tcl_GetString(valuePtr)); ckfree((char *)args); return TCL_ERROR; @@ -3706,7 +3708,7 @@ Tcl_Canceled( * stop checking. */ - for (; iPtr != NULL; iPtr = (Interp *) Tcl_GetMaster((Tcl_Interp *)iPtr)) { + for (; iPtr!=NULL; iPtr = (Interp *) Tcl_GetMaster((Tcl_Interp *)iPtr)) { /* * Has the current script in progress for this interpreter been * canceled or is the stack being unwound due to the previous script @@ -3835,6 +3837,10 @@ Tcl_CancelEval( int code = TCL_ERROR; const char *result; + if (interp == NULL) { + return TCL_ERROR; + } + Tcl_MutexLock(&cancelLock); if (cancelTableInitialized != 1) { /* @@ -3843,28 +3849,15 @@ Tcl_CancelEval( goto done; } - if (interp != NULL) { - /* - * A valid interp must be supplied. - */ - - goto done; - } hPtr = Tcl_FindHashEntry(&cancelTable, (char *) interp); if (hPtr == NULL) { /* - * No CancelInfo for this interp. + * No CancelInfo record for this interpreter. */ goto done; } cancelInfo = Tcl_GetHashValue(hPtr); - if (cancelInfo == NULL) { - /* - * The CancelInfo for this interp is invalid. - */ - goto done; - } /* * Populate information needed by the interpreter thread to fulfill the @@ -3876,11 +3869,9 @@ Tcl_CancelEval( if (resultObjPtr != NULL) { result = Tcl_GetStringFromObj(resultObjPtr, &cancelInfo->length); - cancelInfo->result = ckrealloc(cancelInfo->result, - cancelInfo->length); - memcpy((void *) cancelInfo->result, (void *) result, - (size_t) cancelInfo->length); - Tcl_DecrRefCount(resultObjPtr); /* Discard their result object. */ + cancelInfo->result = ckrealloc(cancelInfo->result,cancelInfo->length); + memcpy(cancelInfo->result, result, (size_t) cancelInfo->length); + TclDecrRefCount(resultObjPtr); /* Discard their result object. */ } else { cancelInfo->result = NULL; cancelInfo->length = 0; @@ -5784,7 +5775,7 @@ Tcl_ExprLongObj( return TCL_ERROR; } - if (TclGetNumberFromObj(interp, resultPtr, &internalPtr, &type) != TCL_OK){ + if (TclGetNumberFromObj(interp, resultPtr, &internalPtr, &type)!=TCL_OK) { return TCL_ERROR; } @@ -6220,7 +6211,7 @@ Tcl_AddObjErrorInfo( int Tcl_VarEvalVA( - Tcl_Interp *interp, /* Interpreter in which to evaluate command. */ + Tcl_Interp *interp, /* Interpreter in which to evaluate command */ va_list argList) /* Variable argument list. */ { Tcl_DString buf; @@ -7528,10 +7519,10 @@ TclNREvalCmd( recordPtr->data.obj.flags = flags; return TCL_OK; } - -/***************************************************************************** + +/**************************************************************************** * Stuff for the public api - *****************************************************************************/ + ****************************************************************************/ int TclNR_EvalObjv( @@ -7549,7 +7540,7 @@ TclNR_EvalObjv( return TclNREvalCmd(interp, listPtr, flags); } - + int TclNR_EvalObj( Tcl_Interp *interp, @@ -7582,7 +7573,7 @@ TclNR_EvalObj( recordPtr->data.obj.flags = flags; return TCL_OK; } - + int TclNR_ObjProc( Tcl_Interp *interp, @@ -7596,7 +7587,7 @@ TclNR_ObjProc( recordPtr->data.objProc.clientData = clientData; return TCL_OK; } - + /***************************************************************************** * Stuff for tailcalls *****************************************************************************/ @@ -7648,7 +7639,7 @@ TclTailcallObjCmd( recordPtr->type = TCL_NR_TAILCALL_TYPE; return TCL_OK; } - + void TclNR_AddCallback( Tcl_Interp *interp, @@ -7677,7 +7668,7 @@ TclNR_AddCallback( callbackPtr->nextPtr = recordPtr->callbackPtr; recordPtr->callbackPtr = callbackPtr; } - + TEOV_record * TclNRPushRecord( Tcl_Interp *interp) @@ -7687,7 +7678,7 @@ TclNRPushRecord( PUSH_RECORD(interp, recordPtr); return recordPtr; } - + void TclNRPopAndFreeRecord( Tcl_Interp *interp) -- cgit v0.12 From a47e05b2688ec13628b7ae14686f7119b6f21010 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 15 Jul 2008 14:13:03 +0000 Subject: * generic/tclParse.c: fixing incomplete reversion of "fix" for [Bug 2017583], missing TclResetCancellation call. --- ChangeLog | 5 +++++ generic/tclParse.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 426b2c9..b3bea30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-15 Miguel Sofer + + * generic/tclParse.c: fixing incomplete reversion of "fix" for + [Bug 2017583], missing TclResetCancellation call. + 2008-07-15 Donal K. Fellows * generic/tclBasic.c (Tcl_CancelEval): Fix blunder. [Bug 2018603] diff --git a/generic/tclParse.c b/generic/tclParse.c index 269978d..a71c831 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.70 2008/07/14 20:29:40 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.71 2008/07/15 14:13:05 msofer Exp $ */ #include "tclInt.h" @@ -2168,6 +2168,7 @@ TclSubstTokens( Interp *iPtr = (Interp *) interp; /* TIP #280: Transfer line information to nested command */ + TclResetCancellation(interp, 0); iPtr->numLevels++; code = TclInterpReady(interp); if (code == TCL_OK) { -- cgit v0.12 From 98c0b4df207d373b44cdb132ffa4f3404b245e57 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 16 Jul 2008 00:44:38 +0000 Subject: * tests/NRE.test: better constraint for testing the * tests/stack.test: existence of teststacklimit, to insure that the testsuite runs under tclsh. --- ChangeLog | 4 ++++ tests/NRE.test | 11 ++++++----- tests/stack.test | 10 ++++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3bea30..d6e41b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-15 Miguel Sofer + * tests/NRE.test: better constraint for testing the + * tests/stack.test: existence of teststacklimit, to insure that + the testsuite runs under tclsh. + * generic/tclParse.c: fixing incomplete reversion of "fix" for [Bug 2017583], missing TclResetCancellation call. diff --git a/tests/NRE.test b/tests/NRE.test index e0ec9eb..a4007a2 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,14 +8,17 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.1 2008/07/13 09:04:54 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.2 2008/07/16 00:44:44 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } -if {[testConstraint unix]} { +testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] +testConstraint teststacklimit [llength [info commands teststacklimit]] + +if {[testConstraint teststacklimit]} { # # Workaround for gnu-make bug http://savannah.gnu.org/bugs/?18396 # @@ -27,8 +30,6 @@ if {[testConstraint unix]} { } -testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] - # # The first few tests will blow the C stack if the NR machinery is not working # properly: all these calls should execute within the same instance of TEBC, @@ -300,7 +301,7 @@ test NRE-T.6 {tailcall does remove callframes} {tailcall} { # cleanup ::tcltest::cleanupTests -if {[testConstraint unix]} { +if {[testConstraint teststacklimit]} { teststacklimit $oldLimit } diff --git a/tests/stack.test b/tests/stack.test index 4a349fa..7d7f816 100644 --- a/tests/stack.test +++ b/tests/stack.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stack.test,v 1.23 2008/07/13 09:03:36 msofer Exp $ +# RCS: @(#) $Id: stack.test,v 1.24 2008/07/16 00:44:44 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -24,8 +24,14 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # can still squeak through. A core check is really needed. -- JH testConstraint minStack2400 1 +testConstraint teststacklimit [llength [info commands teststacklimit]] + if {[testConstraint unix]} { - set stackSize [teststacklimit] + if {[testConstraint teststacklimit]} { + set stackSize [teststacklimit] + } else { + set stackSize [exec /bin/sh -c "ulimit -s"] + } if {($stackSize > -1) && ($stackSize < 2400)} { puts stderr "WARNING: the default application stacksize of $stackSize\ may cause Tcl to\ncrash due to stack overflow before the\ -- cgit v0.12 From 50c3ec45e663031133f8f9024976f0d5501a3f46 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 16 Jul 2008 22:08:59 +0000 Subject: NRE-aware TclOO. --- ChangeLog | 72 +++++++++++++++----------- generic/tclOO.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++---- generic/tclOOBasic.c | 21 ++++++-- generic/tclOOCall.c | 86 +++++++++++++++++++++---------- generic/tclOOInt.h | 11 ++-- generic/tclOOMethod.c | 40 ++++++++++----- 6 files changed, 280 insertions(+), 86 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6e41b4..e9d76f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,23 @@ +2008-07-16 Donal K. Fellows + + * generic/tclOO.c, generic/tclOOInt.h, generic/tclOOBasic.c: + * generic/tclOOCall.c, generic/tclOOMethod.c: NRE-enable the TclOO + implementation in Tcl. No change to public APIs, except that method + implementations can now be NRE-aware if they choose (which normal + methods and forwards are). On the other hand, callers of + TclOOInvokeObject (which is only in the internal stub table) will need + to deal with the fact that it's only safe to call inside an NRE-aware + context. + ***POTENTIAL INCOMPATIBILITY*** + 2008-07-15 Miguel Sofer - * tests/NRE.test: better constraint for testing the - * tests/stack.test: existence of teststacklimit, to insure that - the testsuite runs under tclsh. - - * generic/tclParse.c: fixing incomplete reversion of "fix" for - [Bug 2017583], missing TclResetCancellation call. + * tests/NRE.test: Better constraint for testing the existence of + * tests/stack.test: teststacklimit, to insure that the test suite + runs under tclsh. + + * generic/tclParse.c: fixing incomplete reversion of "fix" for [Bug + 2017583], missing TclResetCancellation call. 2008-07-15 Donal K. Fellows @@ -20,14 +32,14 @@ 2008-07-14 Miguel Sofer - * generic/tclParse.c: reverting the "fix" for [Bug 2017583], - * tests/parse.test: numLevel management and TclInterpReady check - seems to be necessary after all. - + * generic/tclParse.c: Reverting the "fix" for [Bug 2017583], numLevel + * tests/parse.test: management and TclInterpReady check seems to be + necessary after all. + 2008-07-14 Donal K. Fellows - * generic/tclProc.c (TclNRApplyObjCmd, TclObjInterpProcCore): - * generic/tclBasic.c (TclNR_AddCallback, TclEvalObjv_NR2): + * generic/tclProc.c (TclNRApplyObjCmd, TclObjInterpProcCore): + * generic/tclBasic.c (TclNR_AddCallback, TclEvalObjv_NR2): * generic/tclNRE.h (TEOV_callback): Change the callback storage type to use an array, so guaranteeing correct inter-member spacing and memory layout. @@ -36,35 +48,35 @@ * generic/tclExecute.c: Remove unneeded TclInterpReady calls * generic/tclParse.c: - + * generic/tclBasic.c.: Embedded Tcl_Canceled() calls into * generic/tclExecute.c: TclInterpReady(). - * generic/tclParse.c: - + * generic/tclParse.c: + * generic/tclVar.c: fix error message - - * generic/tclParse.c: remove unnecessary numLevel management + + * generic/tclParse.c: remove unnecessary numLevel management * tests/parse.test: [Bug 2017583] - - * generic/tclBasic.c.: NRE left too many calls to + + * generic/tclBasic.c.: NRE left too many calls to * generic/tclExecute.c: TclResetCancellation lying around: it * generic/tclProc.c: only needs to be called prior to any iPtr->numLevels++. Thanks mistachkin. - + * generic/tclBasic.c: TclResetCancellation() calls were misplaced (merge mishap); stray //. Thanks patthoyts. - + * generic/tclInt.h: the new macros TclSmallAlloc and TclSmallFree were badly defined under mem debugging [Bug 2017240] (thx das) - + 2008-07-13 Miguel Sofer NRE implementation [Patch 2017110] - - * generic/tcl.decls: The NRE infrastructure - * generic/tcl.h: + + * generic/tcl.decls: The NRE infrastructure + * generic/tcl.h: * generic/tclBasic.c: - * generic/tclCmdAH.c: + * generic/tclCmdAH.c: * generic/tclCompile.h: * generic/tclDecls.h: * generic/tclExecute.c: @@ -75,8 +87,8 @@ * generic/tclNRE.h: * generic/tclStubInit.c: * unix/Makefile.in: - - * generic/tclInterp.c: NRE-enabling: procs, lambdas, uplevel, + + * generic/tclInterp.c: NRE-enabling: procs, lambdas, uplevel, * generic/tclNamesp.c: same-interp aliases, ensembles, imports * generic/tclProc.c: and namespace_eval. @@ -85,9 +97,9 @@ tested by the whole testsuite. * tests/interp.test: Fixed numLevel counting. - * tests/parse.test: + * tests/parse.test: * tests/stack.test: - + * unix/configure: Removing support for the hacky nonportable * unix/configure.in: stack check: it is not needed anymore, Tcl * unix/tclConfig.h.in: is very thrifty on the C stack. diff --git a/generic/tclOO.c b/generic/tclOO.c index 2b892af..176e90a 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.9 2008/06/19 21:29:03 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.10 2008/07/16 22:09:00 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -70,6 +70,10 @@ static int CloneClassMethod(Tcl_Interp *interp, Class *clsPtr, Method **newMPtrPtr); static int CloneObjectMethod(Tcl_Interp *interp, Object *oPtr, Method *mPtr, Tcl_Obj *namePtr); +static int FinalizeNext(ClientData data[], + Tcl_Interp *interp, int result); +static int FinalizeObjectCall(ClientData data[], + Tcl_Interp *interp, int result); static void InitFoundation(Tcl_Interp *interp); static void KillFoundation(ClientData clientData, Tcl_Interp *interp); @@ -82,9 +86,15 @@ static void ReleaseClassContents(Tcl_Interp *interp,Object *oPtr); static int PublicObjectCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); +static int PublicNRObjectCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); static int PrivateObjectCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); +static int PrivateNRObjectCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); /* * Methods in the oo::object and oo::class classes. First, we define a helper @@ -476,6 +486,7 @@ AllocObject( oPtr->command = Tcl_CreateObjCommand(interp, oPtr->namespacePtr->fullName, PublicObjectCmd, oPtr, NULL); } + ((Command *) oPtr->command)->nreProc = PublicNRObjectCmd; /* * Access the namespace command table directly when creating "my" to avoid @@ -494,6 +505,7 @@ AllocObject( cmdPtr->objClientData = oPtr; cmdPtr->proc = TclInvokeObjectCommand; cmdPtr->clientData = cmdPtr; + cmdPtr->nreProc = PrivateNRObjectCmd; Tcl_SetHashValue(cmdPtr->hPtr, cmdPtr); } @@ -558,7 +570,8 @@ ObjectRenamedTrace( contextPtr->callPtr->flags |= DESTRUCTOR; contextPtr->skip = 0; state = Tcl_SaveInterpState(interp, TCL_OK); - result = TclOOInvokeContext(interp, contextPtr, 0, NULL); + result = TclNR_CallObjProc(interp, TclOOInvokeContext, contextPtr, + 0, NULL); if (result != TCL_OK) { Tcl_BackgroundError(interp); } @@ -1243,7 +1256,8 @@ Tcl_NewObjectInstance( state = Tcl_SaveInterpState(interp, TCL_OK); contextPtr->callPtr->flags |= CONSTRUCTOR; contextPtr->skip = skip; - result = TclOOInvokeContext(interp, contextPtr, objc, objv); + result = TclNR_CallObjProc(interp, TclOOInvokeContext, contextPtr, + objc, objv); TclOODeleteContext(contextPtr); DelRef(oPtr); if (result != TCL_OK) { @@ -1779,6 +1793,16 @@ PublicObjectCmd( int objc, Tcl_Obj *const *objv) { + return TclNR_CallObjProc(interp, PublicNRObjectCmd, clientData,objc,objv); +} + +static int +PublicNRObjectCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ return TclOOObjectCmdCore(clientData, interp, objc, objv, PUBLIC_METHOD, NULL); } @@ -1790,6 +1814,16 @@ PrivateObjectCmd( int objc, Tcl_Obj *const *objv) { + return TclNR_CallObjProc(interp, PrivateNRObjectCmd,clientData,objc,objv); +} + +static int +PrivateNRObjectCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ return TclOOObjectCmdCore(clientData, interp, objc, objv, 0, NULL); } @@ -1902,8 +1936,8 @@ TclOOObjectCmdCore( result = TCL_ERROR; Tcl_SetResult(interp, "no valid method implementation", TCL_STATIC); - AddRef(oPtr); /* Just to balance. */ - goto disposeChain; + TclOODeleteContext(contextPtr); + return TCL_ERROR; } } @@ -1913,13 +1947,23 @@ TclOOObjectCmdCore( */ AddRef(oPtr); - result = TclOOInvokeContext(interp, contextPtr, objc, objv); + TclNR_AddCallback(interp, FinalizeObjectCall, contextPtr,oPtr, NULL,NULL); + return TclOOInvokeContext(contextPtr, interp, objc, objv); +} + +static int +FinalizeObjectCall( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + register CallContext *contextPtr = data[0]; + register Object *oPtr = data[1]; /* * Dispose of the call chain and drop the lock on the object's structure. */ - disposeChain: TclOODeleteContext(contextPtr); DelRef(oPtr); return result; @@ -1928,11 +1972,12 @@ TclOOObjectCmdCore( /* * ---------------------------------------------------------------------- * - * Tcl_ObjectContextInvokeNext -- + * Tcl_ObjectContextInvokeNext, TclNRObjectContextInvokeNext -- * * Invokes the next stage of the call chain described in an object * context. This is the core of the implementation of the [next] command. - * Does not do management of the call-frame stack. + * Does not do management of the call-frame stack. Available in public + * (standard API) and private (NRE-aware) forms. * * ---------------------------------------------------------------------- */ @@ -1987,7 +2032,8 @@ Tcl_ObjectContextInvokeNext( * Invoke the (advanced) method call context in the caller context. */ - result = TclOOInvokeContext(interp, contextPtr, objc, objv); + result = TclNR_CallObjProc(interp, TclOOInvokeContext, contextPtr, objc, + objv); /* * Restore the call chain context index as we've finished the inner invoke @@ -1999,6 +2045,76 @@ Tcl_ObjectContextInvokeNext( return result; } + +int +TclNRObjectContextInvokeNext( + Tcl_Interp *interp, + Tcl_ObjectContext context, + int objc, + Tcl_Obj *const *objv, + int skip) +{ + register CallContext *contextPtr = (CallContext *) context; + + if (contextPtr->index+1 >= contextPtr->callPtr->numChain) { + /* + * We're at the end of the chain; generate an error message. + */ + + const char *methodType; + + if (contextPtr->callPtr->flags & CONSTRUCTOR) { + methodType = "constructor"; + } else if (contextPtr->callPtr->flags & DESTRUCTOR) { + methodType = "destructor"; + } else { + methodType = "method"; + } + + Tcl_AppendResult(interp, "no next ", methodType, " implementation", + NULL); + return TCL_ERROR; + } + + /* + * Advance to the next method implementation in the chain in the method + * call context while we process the body. However, need to adjust the + * argument-skip control because we're guaranteed to have a single prefix + * arg (i.e., 'next') and not the variable amount that can happen because + * method invokations (i.e., '$obj meth' and 'my meth'), constructors + * (i.e., '$cls new' and '$cls create obj') and destructors (no args at + * all) come through the same code. + */ + + TclNR_AddCallback(interp, FinalizeNext, contextPtr, + INT2PTR(contextPtr->index), INT2PTR(contextPtr->skip), NULL); + contextPtr->index++; + contextPtr->skip = skip; + + /* + * Invoke the (advanced) method call context in the caller context. + */ + + return TclOOInvokeContext(contextPtr, interp, objc, objv); +} + +static int +FinalizeNext( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CallContext *contextPtr = data[0]; + + /* + * Restore the call chain context index as we've finished the inner invoke + * and want to operate in the outer context again. + */ + + contextPtr->index = PTR2INT(data[1]); + contextPtr->skip = PTR2INT(data[2]); + return result; +} /* * ---------------------------------------------------------------------- diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 1cd07df..0af3a0b 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.1 2008/05/31 11:42:17 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.2 2008/07/16 22:09:01 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -17,6 +17,9 @@ #endif #include "tclInt.h" #include "tclOOInt.h" + +static int RestoreFrame(ClientData data[], + Tcl_Interp *interp, int result); /* * ---------------------------------------------------------------------- @@ -581,7 +584,6 @@ TclOONextObjCmd( Interp *iPtr = (Interp *) interp; CallFrame *framePtr = iPtr->varFramePtr; Tcl_ObjectContext context; - int result; /* * Start with sanity checks on the calling context to make sure that we @@ -601,9 +603,20 @@ TclOONextObjCmd( * that this is like [uplevel 1] and not [eval]. */ + TclNR_AddCallback(interp, RestoreFrame, framePtr, NULL, NULL, NULL); iPtr->varFramePtr = framePtr->callerVarPtr; - result = Tcl_ObjectContextInvokeNext(interp, context, objc, objv, 1); - iPtr->varFramePtr = framePtr; + return TclNRObjectContextInvokeNext(interp, context, objc, objv, 1); +} + +static int +RestoreFrame( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + + iPtr->varFramePtr = data[0]; return result; } diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index bc90d09..162e7e2 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.7 2008/06/19 20:57:23 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.8 2008/07/16 22:09:02 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -66,9 +66,15 @@ static void AddSimpleClassChainToCallContext(Class *classPtr, Class *const filterDecl); static int CmpStr(const void *ptr1, const void *ptr2); static void DupMethodNameRep(Tcl_Obj *srcPtr, Tcl_Obj *dstPtr); +static int FinalizeMethodRefs(ClientData data[], + Tcl_Interp *interp, int result); static void FreeMethodNameRep(Tcl_Obj *objPtr); static inline int IsStillValid(CallChain *callPtr, Object *oPtr, int flags, int reuseMask); +static int ResetFilterFlags(ClientData data[], + Tcl_Interp *interp, int result); +static int SetFilterFlags(ClientData data[], + Tcl_Interp *interp, int result); static inline void StashCallChain(Tcl_Obj *objPtr, CallChain *callPtr); /* @@ -231,20 +237,18 @@ FreeMethodNameRep( int TclOOInvokeContext( - Tcl_Interp *const interp, /* Interpreter for error reporting, and many + ClientData clientData, /* The method call context. */ + Tcl_Interp *interp, /* Interpreter for error reporting, and many * other sorts of context handling (e.g., * commands, variables) depending on method * implementation. */ - CallContext *const contextPtr, - /* The method call context. */ - const int objc, /* The number of arguments. */ - Tcl_Obj *const *const objv) /* The arguments as actually seen. */ + int objc, /* The number of arguments. */ + Tcl_Obj *const objv[]) /* The arguments as actually seen. */ { + register CallContext *const contextPtr = clientData; Method *const mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr; - const int isFirst = (contextPtr->index == 0); const int isFilter = contextPtr->callPtr->chain[contextPtr->index].isFilter; - int result, wasFilter; /* * If this is the first step along the chain, we preserve the method @@ -252,7 +256,7 @@ TclOOInvokeContext( * feet. */ - if (isFirst) { + if (contextPtr->index == 0) { int i; for (i=0 ; icallPtr->numChain ; i++) { @@ -267,13 +271,25 @@ TclOOInvokeContext( if (contextPtr->callPtr->flags & OO_UNKNOWN_METHOD) { contextPtr->skip--; } + + /* + * Add a callback to ensure that method references are dropped once + * this call is finished. + */ + + TclNR_AddCallback(interp, FinalizeMethodRefs, contextPtr, NULL, NULL, + NULL); } /* * Save whether we were in a filter and set up whether we are now. */ - wasFilter = contextPtr->oPtr->flags & FILTER_HANDLING; + if (contextPtr->oPtr->flags & FILTER_HANDLING) { + TclNR_AddCallback(interp, SetFilterFlags, contextPtr, NULL,NULL,NULL); + } else { + TclNR_AddCallback(interp, ResetFilterFlags,contextPtr,NULL,NULL,NULL); + } if (isFilter || contextPtr->callPtr->flags & FILTER_HANDLING) { contextPtr->oPtr->flags |= FILTER_HANDLING; } else { @@ -284,25 +300,45 @@ TclOOInvokeContext( * Run the method implementation. */ - result = mPtr->typePtr->callProc(mPtr->clientData, interp, + return mPtr->typePtr->callProc(mPtr->clientData, interp, (Tcl_ObjectContext) contextPtr, objc, objv); +} - /* - * Restore the old filter-ness, release any locks on method - * implementations, and return the result code. - */ +static int +SetFilterFlags( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CallContext *contextPtr = data[0]; - if (wasFilter) { - contextPtr->oPtr->flags |= FILTER_HANDLING; - } else { - contextPtr->oPtr->flags &= ~FILTER_HANDLING; - } - if (isFirst) { - int i; + contextPtr->oPtr->flags |= FILTER_HANDLING; + return result; +} - for (i=0 ; icallPtr->numChain ; i++) { - TclOODelMethodRef(contextPtr->callPtr->chain[i].mPtr); - } +static int +ResetFilterFlags( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CallContext *contextPtr = data[0]; + + contextPtr->oPtr->flags &= ~FILTER_HANDLING; + return result; +} + +static int +FinalizeMethodRefs( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CallContext *contextPtr = data[0]; + int i; + + for (i=0 ; icallPtr->numChain ; i++) { + TclOODelMethodRef(contextPtr->callPtr->chain[i].mPtr); } return result; } diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 580ea13..569ac2f 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.2 2008/05/31 19:56:07 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.3 2008/07/16 22:09:02 dkf Exp $ */ #include @@ -493,9 +493,12 @@ MODULE_SCOPE int TclOOGetSortedMethodList(Object *oPtr, int flags, const char ***stringsPtr); MODULE_SCOPE int TclOOInit(Tcl_Interp *interp); MODULE_SCOPE void TclOOInitInfo(Tcl_Interp *interp); -MODULE_SCOPE int TclOOInvokeContext(Tcl_Interp *const interp, - CallContext *const contextPtr, int const objc, - Tcl_Obj *const *const objv); +MODULE_SCOPE int TclOOInvokeContext(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); +MODULE_SCOPE int TclNRObjectContextInvokeNext(Tcl_Interp *interp, + Tcl_ObjectContext context, int objc, + Tcl_Obj *const *objv, int skip); MODULE_SCOPE void TclOONewBasicMethod(Tcl_Interp *interp, Class *clsPtr, const DeclaredClassMethod *dcm); MODULE_SCOPE Tcl_Obj * TclOOObjectName(Tcl_Interp *interp, Object *oPtr); diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 053336e..62585b7 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.5 2008/06/01 08:11:07 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.6 2008/07/16 22:09:02 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -55,6 +55,8 @@ static Tcl_Obj ** InitEnsembleRewrite(Tcl_Interp *interp, int objc, static int InvokeProcedureMethod(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv); +static int FinalizePMCall(ClientData data[], Tcl_Interp *interp, + int result); static int PushMethodCallFrame(Tcl_Interp *interp, CallContext *contextPtr, ProcedureMethod *pmPtr, int objc, Tcl_Obj *const *objv, @@ -633,7 +635,6 @@ InvokeProcedureMethod( { ProcedureMethod *pmPtr = clientData; int result; - register int skip; PMFrameData *fdPtr; /* Important data that has to have a lifetime * matched by this function (or rather, by the * call frame's lifetime). */ @@ -643,7 +644,6 @@ InvokeProcedureMethod( */ fdPtr = (PMFrameData *) TclStackAlloc(interp, sizeof(PMFrameData)); - pmPtr->refCount++; /* * Create a call frame for this method. @@ -652,8 +652,10 @@ InvokeProcedureMethod( result = PushMethodCallFrame(interp, (CallContext *) context, pmPtr, objc, objv, fdPtr); if (result != TCL_OK) { - goto done; + TclStackFree(interp, fdPtr); + return result; } + pmPtr->refCount++; /* * Give the pre-call callback a chance to do some setup and, possibly, @@ -668,19 +670,32 @@ InvokeProcedureMethod( if (isFinished || result != TCL_OK) { Tcl_PopCallFrame(interp); TclStackFree(interp, fdPtr->framePtr); - goto done; + if (--pmPtr->refCount < 1) { + DeleteProcedureMethodRecord(pmPtr); + } + TclStackFree(interp, fdPtr); + return result; } } /* - * Now invoke the body of the method. Note that we need to take special - * action when doing unknown processing to ensure that the missing method - * name is passed as an argument. + * Now invoke the body of the method. */ - skip = Tcl_ObjectContextSkippedArgs(context); - result = TclObjInterpProcCore(interp, fdPtr->nameObj, skip, - fdPtr->errProc); + TclNR_AddCallback(interp, FinalizePMCall, pmPtr, context, fdPtr, NULL); + return TclNRInterpProcCore(interp, fdPtr->nameObj, + Tcl_ObjectContextSkippedArgs(context), fdPtr->errProc); +} + +static int +FinalizePMCall( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + ProcedureMethod *pmPtr = data[0]; + Tcl_ObjectContext context = data[1]; + PMFrameData *fdPtr = data[2]; /* * Give the post-call callback a chance to do some cleanup. Note that at @@ -699,7 +714,6 @@ InvokeProcedureMethod( * sensitive when it comes to performance! */ - done: if (--pmPtr->refCount < 1) { DeleteProcedureMethodRecord(pmPtr); } @@ -1136,7 +1150,7 @@ InvokeForwardMethod( argObjs = InitEnsembleRewrite(interp, objc, objv, skip, numPrefixes, prefixObjs, &len); - result = Tcl_EvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); + result = TclNR_EvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); TclStackFree(interp, argObjs); return result; } -- cgit v0.12 From 8c89eda3cecbbeefdac39bbaf98c2230a64bebd2 Mon Sep 17 00:00:00 2001 From: georgeps Date: Wed, 16 Jul 2008 23:31:29 +0000 Subject: * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that thread key creation is successful. --- ChangeLog | 5 +++++ win/tclWinThrd.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e9d76f3..f8fad22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-16 George Peter Staplin + + * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that + thread key creation is successful. + 2008-07-16 Donal K. Fellows * generic/tclOO.c, generic/tclOOInt.h, generic/tclOOBasic.c: diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 6ee0a5e..d9dd0f7 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.46 2008/06/13 05:45:15 mistachkin Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.47 2008/07/16 23:31:29 georgeps Exp $ */ #include "tclWinInt.h" @@ -969,6 +969,10 @@ void *TclpThreadCreateKey (void) { } *key = TlsAlloc(); + + if (*key == TLS_OUT_OF_INDEXES) { + Tcl_Panic("unable to allocate thread-local storage"); + } return key; } -- cgit v0.12 From 0603043c5b5bc7a0a930f38c71c5e4810f4831f4 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2008 15:43:53 +0000 Subject: Add NRE support to [dict with]. --- ChangeLog | 7 +++++- generic/tclDictObj.c | 61 ++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8fad22..734e172 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +2008-07-17 Donal K. Fellows + + * generic/tclDictObj.c (DictWithCmd, FinalizeDictWith): Split the + implementation of [dict with] so that it works with NRE. + 2008-07-16 George Peter Staplin - * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that + * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that thread key creation is successful. 2008-07-16 Donal K. Fellows diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 5a617bc..570059e 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.58 2008/06/01 02:42:20 kennykb Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.59 2008/07/17 15:43:53 dkf Exp $ */ #include "tclInt.h" @@ -74,6 +74,8 @@ static inline void DeleteChainTable(struct Dict *dict); static inline Tcl_HashEntry *CreateChainEntry(struct Dict *dict, Tcl_Obj *keyPtr, int *newPtr); static inline int DeleteChainEntry(struct Dict *dict, Tcl_Obj *keyPtr); +static int FinalizeDictWith(ClientData data[], + Tcl_Interp *interp, int result); /* * Table of dict subcommand names and implementations. @@ -3015,10 +3017,9 @@ DictWithCmd( Tcl_Obj *const *objv) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *dictPtr, *keysPtr, *keyPtr, *valPtr, **keyv, *leafPtr; + Tcl_Obj *dictPtr, *keysPtr, *keyPtr, *valPtr, *pathPtr; Tcl_DictSearch s; - Tcl_InterpState state; - int done, result, keyc, i, allocdict = 0; + int done; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictVar ?key ...? script"); @@ -3068,10 +3069,32 @@ DictWithCmd( /* * Execute the body, while making the invoking context available to the - * loop body (TIP#280). + * loop body (TIP#280) and postponing the cleanup until later (NRE). */ - result = TclEvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); + pathPtr = NULL; + if (objc > 3) { + pathPtr = Tcl_NewListObj(objc-3, objv+2); + } + Tcl_IncrRefCount(objv[1]); + TclNR_AddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, + NULL); + return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); +} + +static int +FinalizeDictWith( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj **keyv, *leafPtr, *dictPtr, *valPtr; + int keyc, i, allocdict = 0; + Tcl_InterpState state; + Tcl_Obj *varName = data[0]; + Tcl_Obj *keysPtr = data[1]; + Tcl_Obj *pathPtr = data[2]; + if (result == TCL_ERROR) { Tcl_AddErrorInfo(interp, "\n (body of \"dict with\")"); } @@ -3080,9 +3103,13 @@ DictWithCmd( * If the dictionary variable doesn't exist, drop everything silently. */ - dictPtr = Tcl_ObjGetVar2(interp, objv[1], NULL, 0); + dictPtr = Tcl_ObjGetVar2(interp, varName, NULL, 0); if (dictPtr == NULL) { + TclDecrRefCount(varName); TclDecrRefCount(keysPtr); + if (pathPtr) { + TclDecrRefCount(pathPtr); + } return result; } @@ -3092,7 +3119,11 @@ DictWithCmd( state = Tcl_SaveInterpState(interp, result); if (Tcl_DictObjSize(interp, dictPtr, &i) != TCL_OK) { + TclDecrRefCount(varName); TclDecrRefCount(keysPtr); + if (pathPtr) { + TclDecrRefCount(pathPtr); + } Tcl_DiscardInterpState(state); return TCL_ERROR; } @@ -3102,7 +3133,10 @@ DictWithCmd( allocdict = 1; } - if (objc > 3) { + if (pathPtr != NULL) { + Tcl_Obj **pathv; + int pathc; + /* * Want to get to the dictionary which we will update; need to do * prepare-for-update de-sharing along the path *but* avoid generating @@ -3112,9 +3146,12 @@ DictWithCmd( * perfectly efficient (but no memory should be leaked). */ - leafPtr = TclTraceDictPath(interp, dictPtr, objc-3, objv+2, + Tcl_ListObjGetElements(NULL, pathPtr, &pathc, &pathv); + leafPtr = TclTraceDictPath(interp, dictPtr, pathc, pathv, DICT_PATH_EXISTS | DICT_PATH_UPDATE); + TclDecrRefCount(pathPtr); if (leafPtr == NULL) { + TclDecrRefCount(varName); TclDecrRefCount(keysPtr); if (allocdict) { TclDecrRefCount(dictPtr); @@ -3123,6 +3160,7 @@ DictWithCmd( return TCL_ERROR; } if (leafPtr == DICT_PATH_NON_EXISTENT) { + TclDecrRefCount(varName); TclDecrRefCount(keysPtr); if (allocdict) { TclDecrRefCount(dictPtr); @@ -3160,7 +3198,7 @@ DictWithCmd( * rep. */ - if (objc > 3) { + if (pathPtr != NULL) { InvalidateDictChain(leafPtr); } @@ -3168,11 +3206,12 @@ DictWithCmd( * Write back the outermost dictionary to the variable. */ - if (Tcl_ObjSetVar2(interp, objv[1], NULL, dictPtr, + if (Tcl_ObjSetVar2(interp, varName, NULL, dictPtr, TCL_LEAVE_ERR_MSG) == NULL) { Tcl_DiscardInterpState(state); return TCL_ERROR; } + TclDecrRefCount(varName); return Tcl_RestoreInterpState(interp, state); } -- cgit v0.12 From f30d8e3cdfa9ffef067740f6c285a1dfb246c70d Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2008 20:43:36 +0000 Subject: NRE-ify the non-compiled version of [dict update]. --- ChangeLog | 4 +++- generic/tclDictObj.c | 49 ++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 734e172..16317ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,9 +2,11 @@ * generic/tclDictObj.c (DictWithCmd, FinalizeDictWith): Split the implementation of [dict with] so that it works with NRE. + (DictUpdateCmd, FinalizeDictUpdate): Similarly for the non-compiled + version of [dict update]. 2008-07-16 George Peter Staplin - + * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that thread key creation is successful. diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 570059e..a2cae3a 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.59 2008/07/17 15:43:53 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.60 2008/07/17 20:43:37 dkf Exp $ */ #include "tclInt.h" @@ -74,6 +74,8 @@ static inline void DeleteChainTable(struct Dict *dict); static inline Tcl_HashEntry *CreateChainEntry(struct Dict *dict, Tcl_Obj *keyPtr, int *newPtr); static inline int DeleteChainEntry(struct Dict *dict, Tcl_Obj *keyPtr); +static int FinalizeDictUpdate(ClientData data[], + Tcl_Interp *interp, int result); static int FinalizeDictWith(ClientData data[], Tcl_Interp *interp, int result); @@ -2890,8 +2892,7 @@ DictUpdateCmd( { Interp *iPtr = (Interp *) interp; Tcl_Obj *dictPtr, *objPtr; - int i, result, dummy; - Tcl_InterpState state; + int i, dummy; if (objc < 5 || !(objc & 1)) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2924,10 +2925,32 @@ DictUpdateCmd( TclDecrRefCount(dictPtr); /* - * Execute the body. + * Execute the body after setting up the NRE handler to process the + * results. + */ + + objPtr = Tcl_NewListObj(objc-3, objv+2); + Tcl_IncrRefCount(objPtr); + TclNR_AddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); + return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); +} + +static int +FinalizeDictUpdate( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj *dictPtr, *objPtr, **objv; + Tcl_InterpState state; + int i, objc; + Tcl_Obj *varName = data[0]; + Tcl_Obj *argsObj = data[1]; + + /* + * ErrorInfo handling. */ - result = TclEvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); if (result == TCL_ERROR) { Tcl_AddErrorInfo(interp, "\n (body of \"dict update\")"); } @@ -2936,8 +2959,10 @@ DictUpdateCmd( * If the dictionary variable doesn't exist, drop everything silently. */ - dictPtr = Tcl_ObjGetVar2(interp, objv[1], NULL, 0); + dictPtr = Tcl_ObjGetVar2(interp, varName, NULL, 0); if (dictPtr == NULL) { + TclDecrRefCount(varName); + TclDecrRefCount(argsObj); return result; } @@ -2946,8 +2971,10 @@ DictUpdateCmd( */ state = Tcl_SaveInterpState(interp, result); - if (Tcl_DictObjSize(interp, dictPtr, &dummy) != TCL_OK) { + if (Tcl_DictObjSize(interp, dictPtr, &objc) != TCL_OK) { Tcl_DiscardInterpState(state); + TclDecrRefCount(varName); + TclDecrRefCount(argsObj); return TCL_ERROR; } @@ -2960,7 +2987,8 @@ DictUpdateCmd( * an instruction to remove the key. */ - for (i=2 ; i+2 Date: Thu, 17 Jul 2008 21:57:15 +0000 Subject: stop crash in test suite! --- generic/tclDictObj.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index a2cae3a..9764c30 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.60 2008/07/17 20:43:37 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.61 2008/07/17 21:57:15 dkf Exp $ */ #include "tclInt.h" @@ -2932,7 +2932,12 @@ DictUpdateCmd( objPtr = Tcl_NewListObj(objc-3, objv+2); Tcl_IncrRefCount(objPtr); TclNR_AddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); +#if 0 + /* This crashes when doing nested [dict update]s. */ return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); +#else + return TclNR_EvalObj(interp, objv[objc-1], 0); +#endif } static int @@ -3110,7 +3115,12 @@ DictWithCmd( Tcl_IncrRefCount(objv[1]); TclNR_AddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, NULL); +#if 0 + /* This crashes when doing nested [dict with]s. */ return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); +#else + return TclNR_EvalObj(interp, objv[objc-1], 0); +#endif } static int -- cgit v0.12 From 222e9f575e6b44d31e1bdc5c84430c514465e32d Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 17 Jul 2008 23:48:54 +0000 Subject: Tinkering --- generic/tclOOBasic.c | 66 +++++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 0af3a0b..2b8535d 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.2 2008/07/16 22:09:01 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.3 2008/07/17 23:48:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -259,13 +259,13 @@ TclOO_Object_Eval( { CallContext *contextPtr = (CallContext *) context; Tcl_Object object = Tcl_ObjectContextObject(context); - CallFrame *framePtr, **framePtrPtr; - Tcl_Obj *objnameObj; - int result; + register const int skip = Tcl_ObjectContextSkippedArgs(context); + CallFrame *framePtr, **framePtrPtr = &framePtr; + Tcl_Obj *scriptPtr; + int result, flags; - if (objc-1 < Tcl_ObjectContextSkippedArgs(context)) { - Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, - "arg ?arg ...?"); + if (objc-1 < skip) { + Tcl_WrongNumArgs(interp, skip, objv, "arg ?arg ...?"); return TCL_ERROR; } @@ -274,8 +274,6 @@ TclOO_Object_Eval( * command(s). */ - /* This is needed to satisfy GCC 3.3's strict aliasing rules */ - framePtrPtr = &framePtr; result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, Tcl_GetObjectNamespace(object), 0); if (result != TCL_OK) { @@ -285,34 +283,45 @@ TclOO_Object_Eval( framePtr->objv = objv; /* Reference counts do not need to be * incremented here. */ - if (contextPtr->callPtr->flags & PUBLIC_METHOD) { - objnameObj = TclOOObjectName(interp, (Object *) object); - } else { - objnameObj = Tcl_NewStringObj("my", 2); + if (!(contextPtr->callPtr->flags & PUBLIC_METHOD)) { + object = NULL; /* Now just for error mesage printing. */ } - Tcl_IncrRefCount(objnameObj); - - if (objc == Tcl_ObjectContextSkippedArgs(context)+1) { - result = Tcl_EvalObjEx(interp, - objv[Tcl_ObjectContextSkippedArgs(context)], 0); - } else { - Tcl_Obj *objPtr; - /* - * More than one argument: concatenate them together with spaces - * between, then evaluate the result. Tcl_EvalObjEx will delete the - * object when it decrements its refcount after eval'ing it. - */ + /* + * Work out what script we are actually going to evaluate. + * + * When there's more than one argument, we concatenate them together with + * spaces between, then evaluate the result. Tcl_EvalObjEx will delete the + * object when it decrements its refcount after eval'ing it. + */ - objPtr = Tcl_ConcatObj(objc-Tcl_ObjectContextSkippedArgs(context), - objv+Tcl_ObjectContextSkippedArgs(context)); - result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT); + if (objc != skip+1) { + scriptPtr = Tcl_ConcatObj(objc-skip, objv+skip); + flags = TCL_EVAL_DIRECT; + } else { + scriptPtr = objv[skip]; + flags = 0; } + /* + * Evaluate the script now. + * TODO: make NRE-aware + */ + + result = Tcl_EvalObjEx(interp, scriptPtr, flags); if (result == TCL_ERROR) { + Tcl_Obj *objnameObj; + + if (object) { + objnameObj = TclOOObjectName(interp, (Object *) object); + } else { + objnameObj = Tcl_NewStringObj("my", 2); + } + Tcl_IncrRefCount(objnameObj); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (in \"%s eval\" script line %d)", TclGetString(objnameObj), interp->errorLine)); + Tcl_DecrRefCount(objnameObj); } /* @@ -320,7 +329,6 @@ TclOO_Object_Eval( */ TclPopStackFrame(interp); - Tcl_DecrRefCount(objnameObj); return result; } -- cgit v0.12 From 306e6900a04b226e12b76ba8d7c4366b0b336c9a Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 18 Jul 2008 04:23:35 +0000 Subject: * generic/tclDictObj.c (DictWithCmd, DictUpdateCmd): fix refcounting bugs that caused crashes [Bug 2017857]. * generic/tclBasic.c (TclNREvalObjEx): streamline the management of the command frame (opt). --- ChangeLog | 8 ++++++++ generic/tclBasic.c | 31 +++++++++++++++---------------- generic/tclDictObj.c | 16 +++++----------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16317ad..e2803c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-18 Miguel Sofer + + * generic/tclDictObj.c (DictWithCmd, DictUpdateCmd): fix + refcounting bugs that caused crashes [Bug 2017857]. + + * generic/tclBasic.c (TclNREvalObjEx): streamline the management + of the command frame (opt). + 2008-07-17 Donal K. Fellows * generic/tclDictObj.c (DictWithCmd, FinalizeDictWith): Split the diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d2a1054..902b666 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.312 2008/07/15 13:50:15 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.313 2008/07/18 04:23:54 msofer Exp $ */ #include "tclInt.h" @@ -5354,23 +5354,25 @@ TclNREvalObjEx( * dynamic execution we ignore the invoker, even if known. */ - int line, i; + int line, i, nline; char *w; Tcl_Obj **elements, *copyPtr = TclListObjCopy(NULL, objPtr); - CmdFrame *eoFramePtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); + CmdFrame *eoFramePtr; + + Tcl_ListObjGetElements(NULL, copyPtr, + &nline, &elements); + eoFramePtr = (CmdFrame *) TclStackAlloc(interp, + sizeof(CmdFrame) + nline * sizeof(int)); + eoFramePtr->nline = nline; + eoFramePtr->line = (int *) (eoFramePtr + 1); + eoFramePtr->type = TCL_LOCATION_EVAL_LIST; eoFramePtr->level = (iPtr->cmdFramePtr == NULL? 1 : iPtr->cmdFramePtr->level + 1); eoFramePtr->framePtr = iPtr->framePtr; eoFramePtr->nextPtr = iPtr->cmdFramePtr; - Tcl_ListObjGetElements(NULL, copyPtr, - &(eoFramePtr->nline), &elements); - eoFramePtr->line = (int *) - ckalloc(eoFramePtr->nline * sizeof(int)); - eoFramePtr->cmd.listPtr = objPtr; eoFramePtr->data.eval.path = NULL; @@ -5574,17 +5576,14 @@ TEOEx_ListCallback( Tcl_Obj *copyPtr = data[2]; /* - * Remove the cmdFrame if it was added. + * Remove the cmdFrame */ - Tcl_DecrRefCount(copyPtr); - iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; - ckfree((char *) eoFramePtr->line); - eoFramePtr->line = NULL; - eoFramePtr->nline = 0; + iPtr->cmdFramePtr = eoFramePtr->nextPtr; TclStackFree(interp, eoFramePtr); - + Tcl_DecrRefCount(copyPtr); TclDecrRefCount(objPtr); + return result; } diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 9764c30..9cf2739 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.61 2008/07/17 21:57:15 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.62 2008/07/18 04:23:55 msofer Exp $ */ #include "tclInt.h" @@ -2931,13 +2931,10 @@ DictUpdateCmd( objPtr = Tcl_NewListObj(objc-3, objv+2); Tcl_IncrRefCount(objPtr); + Tcl_IncrRefCount(objv[1]); TclNR_AddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); -#if 0 - /* This crashes when doing nested [dict update]s. */ + return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); -#else - return TclNR_EvalObj(interp, objv[objc-1], 0); -#endif } static int @@ -3111,16 +3108,13 @@ DictWithCmd( pathPtr = NULL; if (objc > 3) { pathPtr = Tcl_NewListObj(objc-3, objv+2); + Tcl_IncrRefCount(pathPtr); } Tcl_IncrRefCount(objv[1]); TclNR_AddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, NULL); -#if 0 - /* This crashes when doing nested [dict with]s. */ + return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); -#else - return TclNR_EvalObj(interp, objv[objc-1], 0); -#endif } static int -- cgit v0.12 From ef5a491fc9ec989eef98fe3415dd79a6c12baf4f Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 18 Jul 2008 13:08:47 +0000 Subject: Minor fixes (clearer panic messages, formatting of comments) --- generic/tclBasic.c | 105 +++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 55 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 902b666..e0e2220 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.313 2008/07/18 04:23:54 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.314 2008/07/18 13:08:47 dkf Exp $ */ #include "tclInt.h" @@ -4035,14 +4035,14 @@ Tcl_EvalObjv( * * Do the NR dance right here: * - for non-NR enabled commands, just sigh and call the objProc - * - for NR-enabled commands call the part1, decide what to do with - * the continuation: - * . if it is a bytecode AND we were called by TEBC, pass it - * back. Otherwise just call a new TEBC on it. Don't register - * the callback, TEBC handles those. - * . if it is a command and it has a callback, push the callback - * into the TODO list, set the params as needed and restart at - * the top. + * - for NR-enabled commands call the part1, decide what to do with the + * continuation: + * . if it is a bytecode AND we were called by TEBC, pass it back. + * Otherwise just call a new TEBC on it. Don't register the + * callback, TEBC handles those. + * . if it is a command and it has a callback, push the callback + * into the TODO list, set the params as needed and restart at the + * top. * * Note that I removed the DTRACE thing: I have not really thought about * where it really belongs, and do not really know what it does either. @@ -4170,7 +4170,8 @@ Tcl_EvalObjv( case TCL_NR_NO_TYPE: goto done; default: - Tcl_Panic("TEOEx called from TEOV returns unexpected record type"); + Tcl_Panic("TEOEx called from TEOV returns unexpected record type: %d", + recordPtr->type); } } } else { @@ -4272,11 +4273,11 @@ TclEvalObjv_NR2( /* *---------------------------------------------------------------------- * - * TEOV_Exception - + * TEOV_Exception - * TEOV_LookupCmdFromObj - - * TEOV_RunEnterTraces - - * TEOV_RunLeaveTraces - - * TEOV_NotFound - + * TEOV_RunEnterTraces - + * TEOV_RunLeaveTraces - + * TEOV_NotFound - * * These are helper functions for Tcl_EvalObjv. * @@ -4401,15 +4402,13 @@ TEOV_NotFound( { Command * cmdPtr; Interp *iPtr = (Interp *) interp; - Tcl_Obj **newObjv; - int i; + int i, newObjc, handlerObjc; + Tcl_Obj **newObjv, **handlerObjv; CallFrame *varFramePtr = iPtr->varFramePtr; int result = TCL_OK; Namespace *currNsPtr = NULL;/* Used to check for and invoke any registered * unknown command handler for the current * namespace (TIP 181). */ - int newObjc, handlerObjc; - Tcl_Obj **handlerObjv; Namespace *savedNsPtr = NULL; currNsPtr = varFramePtr->nsPtr; @@ -4431,9 +4430,9 @@ TEOV_NotFound( } /* - * Get the list of words for the unknown handler and allocate enough - * space to hold both the handler prefix and all words of the command - * invokation itself. + * Get the list of words for the unknown handler and allocate enough space + * to hold both the handler prefix and all words of the command invokation + * itself. */ Tcl_ListObjGetElements(NULL, currNsPtr->unknownHandlerPtr, @@ -4733,7 +4732,7 @@ Tcl_EvalEx( * evaluation of the script. Only * TCL_EVAL_GLOBAL is currently supported. */ { - return TclEvalEx(interp, script, numBytes, flags, 1); + return TclEvalEx(interp, script, numBytes, flags, 1); } int @@ -4765,14 +4764,12 @@ TclEvalEx( * state has been allocated while evaluating * the script, so that it can be freed * properly if an error occurs. */ - Tcl_Parse *parsePtr = (Tcl_Parse *) - TclStackAlloc(interp, sizeof(Tcl_Parse)); - CmdFrame *eeFramePtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); - Tcl_Obj **stackObjArray = (Tcl_Obj **) + Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); + CmdFrame *eeFramePtr = TclStackAlloc(interp, sizeof(CmdFrame)); + Tcl_Obj **stackObjArray = TclStackAlloc(interp, minObjs * sizeof(Tcl_Obj *)); - int *expandStack = (int *) TclStackAlloc(interp, minObjs * sizeof(int)); - int *linesStack = (int *) TclStackAlloc(interp, minObjs * sizeof(int)); + int *expandStack = TclStackAlloc(interp, minObjs * sizeof(int)); + int *linesStack = TclStackAlloc(interp, minObjs * sizeof(int)); /* TIP #280 Structures for tracking of command * locations. */ @@ -4837,6 +4834,7 @@ TclEvalEx( /* * Error message in the interp result. */ + code = TCL_ERROR; goto error; } @@ -4888,7 +4886,7 @@ TclEvalEx( * Generate an array of objects for the words of the command. */ - unsigned int objectsNeeded = 0; + unsigned int objectsNeeded = 0; unsigned int numWords = parsePtr->numWords; if (numWords > minObjs) { @@ -5358,7 +5356,7 @@ TclNREvalObjEx( char *w; Tcl_Obj **elements, *copyPtr = TclListObjCopy(NULL, objPtr); CmdFrame *eoFramePtr; - + Tcl_ListObjGetElements(NULL, copyPtr, &nline, &elements); @@ -5366,7 +5364,7 @@ TclNREvalObjEx( sizeof(CmdFrame) + nline * sizeof(int)); eoFramePtr->nline = nline; eoFramePtr->line = (int *) (eoFramePtr + 1); - + eoFramePtr->type = TCL_LOCATION_EVAL_LIST; eoFramePtr->level = (iPtr->cmdFramePtr == NULL? 1 : iPtr->cmdFramePtr->level + 1); @@ -5535,22 +5533,22 @@ TEOEx_ByteCodeCallback( CallFrame *savedVarFramePtr = data[0]; Tcl_Obj *objPtr = data[1]; int allowExceptions = PTR2INT(data[2]); - char *script; - int numSrcBytes; if (iPtr->numLevels == 0) { if (result == TCL_RETURN) { result = TclUpdateReturnInfo(iPtr); } - if ((result != TCL_OK) && (result != TCL_ERROR) - && !allowExceptions) { + if ((result != TCL_OK) && (result != TCL_ERROR) && !allowExceptions) { + char *script; + int numSrcBytes; + ProcessUnexpectedResult(interp, result); result = TCL_ERROR; script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); Tcl_LogCommandInfo(interp, script, script, numSrcBytes); } } - iPtr->evalFlags = 0; + iPtr->evalFlags = 0; /* * Restore the callFrame if this was a TCL_EVAL_GLOBAL. @@ -5867,6 +5865,7 @@ Tcl_ExprBooleanObj( * * Object version: Invokes a Tcl command, given an objv/objc, from either * the exposed or hidden set of commands in the given interpreter. + * * NOTE: The command is invoked in the global stack frame of the * interpreter or namespace, thus it cannot see any current state on the * stack of that interpreter. @@ -7254,8 +7253,8 @@ MathFuncWrongNumArgs( "too %s arguments for math function \"%s\"", (found < expected ? "few" : "many"), name)); } -#ifdef USE_DTRACE +#ifdef USE_DTRACE /* *---------------------------------------------------------------------- * @@ -7398,7 +7397,7 @@ NRPostProcess( TEOV_record *recordPtr = TOP_RECORD(interp); if ((result == TCL_OK) && VALID_NEW_REQUEST(recordPtr)) { - switch(recordPtr->type) { + switch (recordPtr->type) { case TCL_NR_BC_TYPE: result = TclExecuteByteCode(interp, recordPtr->data.codePtr); break; @@ -7430,7 +7429,8 @@ NRPostProcess( break; } default: - Tcl_Panic("NRPostProcess: invalid record type"); + Tcl_Panic("NRPostProcess: invalid record type: %d", + recordPtr->type); } } @@ -7486,10 +7486,9 @@ TclNR_CreateCommand( * this command is deleted. */ { - Command *cmdPtr; + Command *cmdPtr = (Command *) + Tcl_CreateObjCommand(interp,cmdName,proc,clientData,deleteProc); - cmdPtr = (Command *) Tcl_CreateObjCommand(interp, cmdName, proc, - clientData, deleteProc); cmdPtr->nreProc = nreProc; return (Tcl_Command) cmdPtr; } @@ -7497,9 +7496,6 @@ TclNR_CreateCommand( /* * These are the previous contents of tclNRE.c, part of the NRE api. * - */ - -/* * TclNREvalCmd should only be called as an optimisation: when objPtr is known * to be a canonical list that is not (and will not!) be shared */ @@ -7589,20 +7585,19 @@ TclNR_ObjProc( /***************************************************************************** * Stuff for tailcalls - *****************************************************************************/ - -/* + ***************************************************************************** + * * Just to show that IT CAN BE DONE! The precise semantics are not simple, * require more thought. Possibly need a new Tcl return code to do it right? * Questions include: * (1) How is the objc/objv tailcall to be run? My current thinking is that * it should essentially be - * [tailcall a b c] <=> [uplevel 1 [list a b c]] - * with two caveats - * (a) the current frame is dropped first, after running all - * pending cleanup tasks and saving its namespace - * (b) 'a' is looked up in the returning frame's namespace, but the - * command is run in the context to which we are returning + * [tailcall a b c] <=> [uplevel 1 [list a b c]] + * with two caveats + * (a) the current frame is dropped first, after running all + * pending cleanup tasks and saving its namespace + * (b) 'a' is looked up in the returning frame's namespace, but the + * command is run in the context to which we are returning * Current implementation does this if [tailcall] is called from within * a proc, panics otherwise- * (2) Should a tailcall bypass [catch] in the returning frame? Current -- cgit v0.12 From 5702c0a692ca453f9f0cbbbe3d438870ab8b008e Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 18 Jul 2008 13:10:47 +0000 Subject: NRE-enable oo::object.eval --- ChangeLog | 5 +++++ generic/tclOOBasic.c | 41 ++++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2803c9..6214b1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-18 Donal K. Fellows + + * generic/tclOOBasic.c (TclOO_Object_Eval, FinalizeEval): NRE-enable + the oo::object.eval method. + 2008-07-18 Miguel Sofer * generic/tclDictObj.c (DictWithCmd, DictUpdateCmd): fix diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 2b8535d..350dba6 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.3 2008/07/17 23:48:54 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.4 2008/07/18 13:10:55 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -18,6 +18,8 @@ #include "tclInt.h" #include "tclOOInt.h" +static int FinalizeEval(ClientData data[], + Tcl_Interp *interp, int result); static int RestoreFrame(ClientData data[], Tcl_Interp *interp, int result); @@ -263,6 +265,7 @@ TclOO_Object_Eval( CallFrame *framePtr, **framePtrPtr = &framePtr; Tcl_Obj *scriptPtr; int result, flags; + CmdFrame *invoker; if (objc-1 < skip) { Tcl_WrongNumArgs(interp, skip, objv, "arg ?arg ...?"); @@ -298,30 +301,42 @@ TclOO_Object_Eval( if (objc != skip+1) { scriptPtr = Tcl_ConcatObj(objc-skip, objv+skip); flags = TCL_EVAL_DIRECT; + invoker = NULL; } else { scriptPtr = objv[skip]; flags = 0; + invoker = ((Interp *) interp)->cmdFramePtr; } /* - * Evaluate the script now. - * TODO: make NRE-aware + * Evaluate the script now, with FinalizeEval to do the processing after + * the script completes. */ - result = Tcl_EvalObjEx(interp, scriptPtr, flags); + TclNR_AddCallback(interp, FinalizeEval, object, NULL, NULL, NULL); + return TclNREvalObjEx(interp, scriptPtr, flags, invoker, skip); +} + +static int +FinalizeEval( + ClientData data[], + Tcl_Interp *interp, + int result) +{ if (result == TCL_ERROR) { - Tcl_Obj *objnameObj; + Object *oPtr = data[0]; + + if (oPtr) { + Tcl_Obj *objnameObj = TclOOObjectName(interp, oPtr); - if (object) { - objnameObj = TclOOObjectName(interp, (Object *) object); + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in \"%s eval\" script line %d)", + TclGetString(objnameObj), interp->errorLine)); } else { - objnameObj = Tcl_NewStringObj("my", 2); + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in \"my eval\" script line %d)", + interp->errorLine)); } - Tcl_IncrRefCount(objnameObj); - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (in \"%s eval\" script line %d)", - TclGetString(objnameObj), interp->errorLine)); - Tcl_DecrRefCount(objnameObj); } /* -- cgit v0.12 From 23a7258539e21badb897541271727a7669550378 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 18 Jul 2008 13:46:38 +0000 Subject: * generic/tcl.decls: Change the public api prefix from * generic/tcl.h: TclNR_foo to Tcl_NRfoo * generic/tclBasic.c: * generic/tclDecls.h: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclInterp.c: * generic/tclNRE.h: * generic/tclNamesp.c: * generic/tclOO.c: * generic/tclOOBasic.c: * generic/tclOOCall.c: * generic/tclOOMethod.c: * generic/tclProc.c: * generic/tclStubInit.c: --- ChangeLog | 18 +++++++++++ generic/tcl.decls | 14 ++++---- generic/tcl.h | 4 +-- generic/tclBasic.c | 52 +++++++++++++++--------------- generic/tclDecls.h | 88 +++++++++++++++++++++++++-------------------------- generic/tclDictObj.c | 6 ++-- generic/tclExecute.c | 6 ++-- generic/tclInterp.c | 6 ++-- generic/tclNRE.h | 8 ++--- generic/tclNamesp.c | 18 +++++------ generic/tclOO.c | 16 +++++----- generic/tclOOBasic.c | 6 ++-- generic/tclOOCall.c | 8 ++--- generic/tclOOMethod.c | 6 ++-- generic/tclProc.c | 24 +++++++------- generic/tclStubInit.c | 14 ++++---- 16 files changed, 156 insertions(+), 138 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6214b1f..c16154e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-07-18 Miguel Sofer + + * generic/tcl.decls: Change the public api prefix from + * generic/tcl.h: TclNR_foo to Tcl_NRfoo + * generic/tclBasic.c: + * generic/tclDecls.h: + * generic/tclDictObj.c: + * generic/tclExecute.c: + * generic/tclInterp.c: + * generic/tclNRE.h: + * generic/tclNamesp.c: + * generic/tclOO.c: + * generic/tclOOBasic.c: + * generic/tclOOCall.c: + * generic/tclOOMethod.c: + * generic/tclProc.c: + * generic/tclStubInit.c: + 2008-07-18 Donal K. Fellows * generic/tclOOBasic.c (TclOO_Object_Eval, FinalizeEval): NRE-enable diff --git a/generic/tcl.decls b/generic/tcl.decls index 460d6dc..5ca73c7 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.134 2008/07/13 09:03:32 msofer Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.135 2008/07/18 13:46:39 msofer Exp $ library tcl @@ -2110,24 +2110,24 @@ declare 581 generic { # NRE public interface declare 582 generic { - Tcl_Command TclNR_CreateCommand(Tcl_Interp *interp, + Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, CONST char *cmdName, Tcl_ObjCmdProc *proc, Tcl_ObjCmdProc *nreProc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc) } declare 583 generic { - int TclNR_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) + int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) } declare 584 generic { - int TclNR_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], + int Tcl_NREvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], int flags) } declare 585 generic { - int TclNR_ObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, + int Tcl_NRObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData) } declare 586 generic { - void TclNR_AddCallback(Tcl_Interp *interp, TclNR_PostProc *postProcPtr, + void Tcl_NRAddCallback(Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3) } @@ -2135,7 +2135,7 @@ declare 586 generic { # For use by NR extenders, to have a simple way to also provide a (required!) # classic objProc declare 587 generic { - int TclNR_CallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, + int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]) } diff --git a/generic/tcl.h b/generic/tcl.h index 50bd3c1..ef6d360 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.260 2008/07/13 09:03:32 msofer Exp $ + * RCS: @(#) $Id: tcl.h,v 1.261 2008/07/18 13:46:43 msofer Exp $ */ #ifndef _TCL @@ -2255,7 +2255,7 @@ EXTERN void Tcl_GetMemoryInfo _ANSI_ARGS_((Tcl_DString *dsPtr)); * Single public declaration for NRE */ -typedef int (TclNR_PostProc) (ClientData data[], Tcl_Interp *interp, +typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, int result); /* diff --git a/generic/tclBasic.c b/generic/tclBasic.c index e0e2220..b52ff39 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.314 2008/07/18 13:08:47 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.315 2008/07/18 13:46:43 msofer Exp $ */ #include "tclInt.h" @@ -122,12 +122,12 @@ static int TEOV_RunEnterTraces(Tcl_Interp *interp, Tcl_Obj *const objv[], Namespace *lookupNsPtr); static int NRPostProcess(Tcl_Interp *interp, int result, int objc, Tcl_Obj *const objv[]); -static TclNR_PostProc TEOV_RestoreVarFrame; -static TclNR_PostProc TEOV_RunLeaveTraces; -static TclNR_PostProc TEOV_Exception; -static TclNR_PostProc TEOV_Error; -static TclNR_PostProc TEOEx_ListCallback; -static TclNR_PostProc TEOEx_ByteCodeCallback; +static Tcl_NRPostProc TEOV_RestoreVarFrame; +static Tcl_NRPostProc TEOV_RunLeaveTraces; +static Tcl_NRPostProc TEOV_Exception; +static Tcl_NRPostProc TEOV_Error; +static Tcl_NRPostProc TEOEx_ListCallback; +static Tcl_NRPostProc TEOEx_ByteCodeCallback; /* * The following structure define the commands in the Tcl core. @@ -763,7 +763,7 @@ Tcl_CreateInterp(void) * Create an unsupported command for tailcalls */ - TclNR_CreateCommand(interp, "::tcl::unsupported::tailcall", + Tcl_NRCreateCommand(interp, "::tcl::unsupported::tailcall", /*objProc*/ NULL, TclTailcallObjCmd, NULL, NULL); #ifdef USE_DTRACE @@ -4183,7 +4183,7 @@ Tcl_EvalObjv( /* * This is a rewrite like ns-import does, without a new cmdPtr or new * reentrant call. FIXME: add the possibility of a new callback - * (TclNR_ObjProc has that), and maybe also edition of objc/objv? + * (Tcl_NRObjProc has that), and maybe also edition of objc/objv? */ objProc = recordPtr->data.objProc.objProc; @@ -4304,7 +4304,7 @@ TEOV_PushExceptionHandlers( * Error messages */ - TclNR_AddCallback(interp, TEOV_Error, INT2PTR(objc), + Tcl_NRAddCallback(interp, TEOV_Error, INT2PTR(objc), (ClientData) objv, NULL,NULL); } @@ -4313,7 +4313,7 @@ TEOV_PushExceptionHandlers( * No CONTINUE or BREAK at level 0, manage RETURN */ - TclNR_AddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL); } } @@ -4328,7 +4328,7 @@ TEOV_SwitchVarFrame( * restore things at the end. */ - TclNR_AddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, + Tcl_NRAddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, NULL, NULL); iPtr->varFramePtr = iPtr->rootFramePtr; } @@ -4545,7 +4545,7 @@ TEOV_RunEnterTraces( * Command was found: push a record to schedule the leave traces. */ - TclNR_AddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode), + Tcl_NRAddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode), commandPtr, cmdPtr, NULL); cmdPtr->refCount++; } else { @@ -5388,9 +5388,9 @@ TclNREvalObjEx( iPtr->cmdFramePtr = eoFramePtr; - TclNR_AddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, + Tcl_NRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, copyPtr, NULL); - return TclNR_EvalObj(interp, objPtr, flags); + return Tcl_NREvalObj(interp, objPtr, flags); } } @@ -5411,7 +5411,7 @@ TclNREvalObjEx( savedVarFramePtr = iPtr->varFramePtr; iPtr->varFramePtr = iPtr->rootFramePtr; } - TclNR_AddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, + Tcl_NRAddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, objPtr, INT2PTR(allowExceptions), NULL); newCodePtr = TclCompileObj(interp, objPtr, invoker, word); @@ -7349,7 +7349,7 @@ TclDTraceInfo( /* *---------------------------------------------------------------------- * - * TclNR_CallObjProc -- + * Tcl_NRCallObjProc -- * * This function calls an objProc directly while managing things properly * if it happens to be an NR objProc. It is meant to be used by extenders @@ -7367,7 +7367,7 @@ TclDTraceInfo( */ int -TclNR_CallObjProc( +Tcl_NRCallObjProc( Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData, @@ -7441,7 +7441,7 @@ NRPostProcess( /* *---------------------------------------------------------------------- * - * TclNR_CreateCommand -- + * Tcl_NRCreateCommand -- * * Define a new NRE-enabled object-based command in a command table. * @@ -7467,7 +7467,7 @@ NRPostProcess( */ Tcl_Command -TclNR_CreateCommand( +Tcl_NRCreateCommand( Tcl_Interp *interp, /* Token for command interpreter (returned by * previous call to Tcl_CreateInterp). */ const char *cmdName, /* Name of command. If it contains namespace @@ -7520,7 +7520,7 @@ TclNREvalCmd( ****************************************************************************/ int -TclNR_EvalObjv( +Tcl_NREvalObjv( Tcl_Interp *interp, /* Interpreter in which to evaluate the * command. Also used for error reporting. */ int objc, /* Number of words in command. */ @@ -7537,7 +7537,7 @@ TclNR_EvalObjv( } int -TclNR_EvalObj( +Tcl_NREvalObj( Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) @@ -7570,7 +7570,7 @@ TclNR_EvalObj( } int -TclNR_ObjProc( +Tcl_NRObjProc( Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData) @@ -7629,15 +7629,15 @@ TclTailcallObjCmd( } listPtr = Tcl_NewListObj(objc-1, objv+1); - TclNR_EvalObj(interp, listPtr, 0); + Tcl_NREvalObj(interp, listPtr, 0); recordPtr->type = TCL_NR_TAILCALL_TYPE; return TCL_OK; } void -TclNR_AddCallback( +Tcl_NRAddCallback( Tcl_Interp *interp, - TclNR_PostProc *postProcPtr, + Tcl_NRPostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 5198401..31e3751 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.135 2008/07/13 09:03:33 msofer Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.136 2008/07/18 13:46:43 msofer Exp $ */ #ifndef _TCLDECLS @@ -3513,46 +3513,46 @@ EXTERN int Tcl_CancelEval (Tcl_Interp * interp, /* 581 */ EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); #endif -#ifndef TclNR_CreateCommand_TCL_DECLARED -#define TclNR_CreateCommand_TCL_DECLARED +#ifndef Tcl_NRCreateCommand_TCL_DECLARED +#define Tcl_NRCreateCommand_TCL_DECLARED /* 582 */ -EXTERN Tcl_Command TclNR_CreateCommand (Tcl_Interp * interp, +EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); #endif -#ifndef TclNR_EvalObj_TCL_DECLARED -#define TclNR_EvalObj_TCL_DECLARED +#ifndef Tcl_NREvalObj_TCL_DECLARED +#define Tcl_NREvalObj_TCL_DECLARED /* 583 */ -EXTERN int TclNR_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); #endif -#ifndef TclNR_EvalObjv_TCL_DECLARED -#define TclNR_EvalObjv_TCL_DECLARED +#ifndef Tcl_NREvalObjv_TCL_DECLARED +#define Tcl_NREvalObjv_TCL_DECLARED /* 584 */ -EXTERN int TclNR_EvalObjv (Tcl_Interp * interp, int objc, +EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); #endif -#ifndef TclNR_ObjProc_TCL_DECLARED -#define TclNR_ObjProc_TCL_DECLARED +#ifndef Tcl_NRObjProc_TCL_DECLARED +#define Tcl_NRObjProc_TCL_DECLARED /* 585 */ -EXTERN int TclNR_ObjProc (Tcl_Interp * interp, +EXTERN int Tcl_NRObjProc (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData); #endif -#ifndef TclNR_AddCallback_TCL_DECLARED -#define TclNR_AddCallback_TCL_DECLARED +#ifndef Tcl_NRAddCallback_TCL_DECLARED +#define Tcl_NRAddCallback_TCL_DECLARED /* 586 */ -EXTERN void TclNR_AddCallback (Tcl_Interp * interp, - TclNR_PostProc * postProcPtr, +EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, + Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); #endif -#ifndef TclNR_CallObjProc_TCL_DECLARED -#define TclNR_CallObjProc_TCL_DECLARED +#ifndef Tcl_NRCallObjProc_TCL_DECLARED +#define Tcl_NRCallObjProc_TCL_DECLARED /* 587 */ -EXTERN int TclNR_CallObjProc (Tcl_Interp * interp, +EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); @@ -4198,12 +4198,12 @@ typedef struct TclStubs { void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ - Tcl_Command (*tclNR_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ - int (*tclNR_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ - int (*tclNR_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ - int (*tclNR_ObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData); /* 585 */ - void (*tclNR_AddCallback) (Tcl_Interp * interp, TclNR_PostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ - int (*tclNR_CallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ + int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ + int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ + int (*tcl_NRObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData); /* 585 */ + void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6604,29 +6604,29 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_Canceled \ (tclStubsPtr->tcl_Canceled) /* 581 */ #endif -#ifndef TclNR_CreateCommand -#define TclNR_CreateCommand \ - (tclStubsPtr->tclNR_CreateCommand) /* 582 */ +#ifndef Tcl_NRCreateCommand +#define Tcl_NRCreateCommand \ + (tclStubsPtr->tcl_NRCreateCommand) /* 582 */ #endif -#ifndef TclNR_EvalObj -#define TclNR_EvalObj \ - (tclStubsPtr->tclNR_EvalObj) /* 583 */ +#ifndef Tcl_NREvalObj +#define Tcl_NREvalObj \ + (tclStubsPtr->tcl_NREvalObj) /* 583 */ #endif -#ifndef TclNR_EvalObjv -#define TclNR_EvalObjv \ - (tclStubsPtr->tclNR_EvalObjv) /* 584 */ +#ifndef Tcl_NREvalObjv +#define Tcl_NREvalObjv \ + (tclStubsPtr->tcl_NREvalObjv) /* 584 */ #endif -#ifndef TclNR_ObjProc -#define TclNR_ObjProc \ - (tclStubsPtr->tclNR_ObjProc) /* 585 */ +#ifndef Tcl_NRObjProc +#define Tcl_NRObjProc \ + (tclStubsPtr->tcl_NRObjProc) /* 585 */ #endif -#ifndef TclNR_AddCallback -#define TclNR_AddCallback \ - (tclStubsPtr->tclNR_AddCallback) /* 586 */ +#ifndef Tcl_NRAddCallback +#define Tcl_NRAddCallback \ + (tclStubsPtr->tcl_NRAddCallback) /* 586 */ #endif -#ifndef TclNR_CallObjProc -#define TclNR_CallObjProc \ - (tclStubsPtr->tclNR_CallObjProc) /* 587 */ +#ifndef Tcl_NRCallObjProc +#define Tcl_NRCallObjProc \ + (tclStubsPtr->tcl_NRCallObjProc) /* 587 */ #endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 9cf2739..5b47c22 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.62 2008/07/18 04:23:55 msofer Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.63 2008/07/18 13:46:43 msofer Exp $ */ #include "tclInt.h" @@ -2932,7 +2932,7 @@ DictUpdateCmd( objPtr = Tcl_NewListObj(objc-3, objv+2); Tcl_IncrRefCount(objPtr); Tcl_IncrRefCount(objv[1]); - TclNR_AddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); + Tcl_NRAddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); } @@ -3111,7 +3111,7 @@ DictWithCmd( Tcl_IncrRefCount(pathPtr); } Tcl_IncrRefCount(objv[1]); - TclNR_AddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, + Tcl_NRAddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, NULL); return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index fc1ca9c..dd09802 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.380 2008/07/14 02:03:53 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.381 2008/07/18 13:46:43 msofer Exp $ */ #include "tclInt.h" @@ -25,7 +25,7 @@ #include #include -static TclNR_PostProc TailcallFromTebc; +static Tcl_NRPostProc TailcallFromTebc; /* @@ -7796,7 +7796,7 @@ TclExecuteByteCode( rootPtr = TOP_RECORD(iPtr); PUSH_RECORD(iPtr, recordPtr); - TclNR_AddCallback(interp, TailcallFromTebc, tailObjPtr, lookupNsPtr, NULL, NULL); + Tcl_NRAddCallback(interp, TailcallFromTebc, tailObjPtr, lookupNsPtr, NULL, NULL); /* Now swap them! */ recordPtr->nextPtr = rootPtr->nextPtr; diff --git a/generic/tclInterp.c b/generic/tclInterp.c index f2975d0..358d85c 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.88 2008/07/13 23:15:23 nijtmans Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.89 2008/07/18 13:46:45 msofer Exp $ */ #include "tclInt.h" @@ -1486,7 +1486,7 @@ AliasCreate( Tcl_Preserve(masterInterp); if (slaveInterp == masterInterp) { - aliasPtr->slaveCmd = TclNR_CreateCommand(slaveInterp, + aliasPtr->slaveCmd = Tcl_NRCreateCommand(slaveInterp, TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, AliasObjCmdDeleteProc); } else { @@ -1805,7 +1805,7 @@ AliasNRCmd( */ if (isRootEnsemble) { - TclNR_AddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } return TclNREvalCmd(interp, listPtr, flags); } diff --git a/generic/tclNRE.h b/generic/tclNRE.h index 729cf51..0d13d3a 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.2 2008/07/14 08:22:14 dkf Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.3 2008/07/18 13:46:46 msofer Exp $ */ @@ -89,7 +89,7 @@ struct ByteCode; /* Fill up a SmallAlloc: 4 free ptrs for the user */ typedef struct TEOV_callback { - TclNR_PostProc *procPtr; + Tcl_NRPostProc *procPtr; ClientData data[4]; struct TEOV_callback *nextPtr; } TEOV_callback; @@ -223,8 +223,8 @@ typedef struct TEOV_record { #if 0 /* built as static inline in tclProc.c. Do TclOO/Itcl need this? */ -MODULE_SCOPE int TclNR_BC (Tcl_Interp * interp, ByteCode *codePtr, - TclNR_PostProc *postProcPtr, ClientData clientData); +MODULE_SCOPE int Tcl_NRBC (Tcl_Interp * interp, ByteCode *codePtr, + Tcl_NRPostProc *postProcPtr, ClientData clientData); #endif /* The following starts purges the stack popping TclStackAllocs down to where diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 3faae95..f541a1e 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.166 2008/07/15 10:15:52 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.167 2008/07/18 13:46:46 msofer Exp $ */ #include "tclInt.h" @@ -231,7 +231,7 @@ static void DupEnsembleCmdRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); static void StringOfEnsembleCmdRep(Tcl_Obj *objPtr); static void UnlinkNsPath(Namespace *nsPtr); -static TclNR_PostProc NsEval_Callback; +static Tcl_NRPostProc NsEval_Callback; /* * This structure defines a Tcl object type that contains a namespace @@ -1647,7 +1647,7 @@ DoImport( } dataPtr = (ImportedCmdData *) ckalloc(sizeof(ImportedCmdData)); - importedCmd = TclNR_CreateCommand(interp, Tcl_DStringValue(&ds), + importedCmd = Tcl_NRCreateCommand(interp, Tcl_DStringValue(&ds), InvokeImportedCmd, InvokeImportedNRCmd, dataPtr, DeleteImportedCmd); dataPtr->realCmdPtr = cmdPtr; @@ -2799,7 +2799,7 @@ Tcl_NamespaceObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return TclNR_CallObjProc(interp, TclNRNamespaceObjCmd, clientData, objc, + return Tcl_NRCallObjProc(interp, TclNRNamespaceObjCmd, clientData, objc, objv); } @@ -3332,7 +3332,7 @@ NamespaceEvalCmd( * TIP #280: Make invoking context available to eval'd script. */ - TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "eval", + Tcl_NRAddCallback(interp, NsEval_Callback, namespacePtr, "eval", NULL, NULL); return TclNREvalObjEx(interp, objPtr, 0, iPtr->cmdFramePtr, 3); } @@ -3778,7 +3778,7 @@ NamespaceInscopeCmd( Tcl_DecrRefCount(listPtr); /* We're done with the list object. */ } - TclNR_AddCallback(interp, NsEval_Callback, namespacePtr, "inscope", + Tcl_NRAddCallback(interp, NsEval_Callback, namespacePtr, "inscope", NULL, NULL); return TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); } @@ -5325,7 +5325,7 @@ Tcl_CreateEnsemble( ensemblePtr->subcommandDict = NULL; ensemblePtr->flags = flags; ensemblePtr->unknownHandler = NULL; - ensemblePtr->token = TclNR_CreateCommand(interp, name, + ensemblePtr->token = Tcl_NRCreateCommand(interp, name, NsEnsembleImplementationCmd, NsEnsembleImplementationCmdNR, ensemblePtr, DeleteEnsembleConfig); ensemblePtr->next = (EnsembleConfig *) nsPtr->ensembles; @@ -6046,7 +6046,7 @@ NsEnsembleImplementationCmd( int objc, Tcl_Obj *const objv[]) { - return TclNR_CallObjProc(interp, NsEnsembleImplementationCmdNR, + return Tcl_NRCallObjProc(interp, NsEnsembleImplementationCmdNR, clientData, objc, objv); } @@ -6263,7 +6263,7 @@ NsEnsembleImplementationCmdNR( iPtr->ensembleRewrite.sourceObjs = objv; iPtr->ensembleRewrite.numRemovedObjs = 2; iPtr->ensembleRewrite.numInsertedObjs = prefixObjc; - TclNR_AddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, + Tcl_NRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } else { register int ni = iPtr->ensembleRewrite.numInsertedObjs; diff --git a/generic/tclOO.c b/generic/tclOO.c index 176e90a..dbf85ea 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.10 2008/07/16 22:09:00 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.11 2008/07/18 13:46:46 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -570,7 +570,7 @@ ObjectRenamedTrace( contextPtr->callPtr->flags |= DESTRUCTOR; contextPtr->skip = 0; state = Tcl_SaveInterpState(interp, TCL_OK); - result = TclNR_CallObjProc(interp, TclOOInvokeContext, contextPtr, + result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, 0, NULL); if (result != TCL_OK) { Tcl_BackgroundError(interp); @@ -1256,7 +1256,7 @@ Tcl_NewObjectInstance( state = Tcl_SaveInterpState(interp, TCL_OK); contextPtr->callPtr->flags |= CONSTRUCTOR; contextPtr->skip = skip; - result = TclNR_CallObjProc(interp, TclOOInvokeContext, contextPtr, + result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, objc, objv); TclOODeleteContext(contextPtr); DelRef(oPtr); @@ -1793,7 +1793,7 @@ PublicObjectCmd( int objc, Tcl_Obj *const *objv) { - return TclNR_CallObjProc(interp, PublicNRObjectCmd, clientData,objc,objv); + return Tcl_NRCallObjProc(interp, PublicNRObjectCmd, clientData,objc,objv); } static int @@ -1814,7 +1814,7 @@ PrivateObjectCmd( int objc, Tcl_Obj *const *objv) { - return TclNR_CallObjProc(interp, PrivateNRObjectCmd,clientData,objc,objv); + return Tcl_NRCallObjProc(interp, PrivateNRObjectCmd,clientData,objc,objv); } static int @@ -1947,7 +1947,7 @@ TclOOObjectCmdCore( */ AddRef(oPtr); - TclNR_AddCallback(interp, FinalizeObjectCall, contextPtr,oPtr, NULL,NULL); + Tcl_NRAddCallback(interp, FinalizeObjectCall, contextPtr,oPtr, NULL,NULL); return TclOOInvokeContext(contextPtr, interp, objc, objv); } @@ -2032,7 +2032,7 @@ Tcl_ObjectContextInvokeNext( * Invoke the (advanced) method call context in the caller context. */ - result = TclNR_CallObjProc(interp, TclOOInvokeContext, contextPtr, objc, + result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, objc, objv); /* @@ -2086,7 +2086,7 @@ TclNRObjectContextInvokeNext( * all) come through the same code. */ - TclNR_AddCallback(interp, FinalizeNext, contextPtr, + Tcl_NRAddCallback(interp, FinalizeNext, contextPtr, INT2PTR(contextPtr->index), INT2PTR(contextPtr->skip), NULL); contextPtr->index++; contextPtr->skip = skip; diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 350dba6..2951cc8 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.4 2008/07/18 13:10:55 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.5 2008/07/18 13:46:46 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -313,7 +313,7 @@ TclOO_Object_Eval( * the script completes. */ - TclNR_AddCallback(interp, FinalizeEval, object, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, FinalizeEval, object, NULL, NULL, NULL); return TclNREvalObjEx(interp, scriptPtr, flags, invoker, skip); } @@ -626,7 +626,7 @@ TclOONextObjCmd( * that this is like [uplevel 1] and not [eval]. */ - TclNR_AddCallback(interp, RestoreFrame, framePtr, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, RestoreFrame, framePtr, NULL, NULL, NULL); iPtr->varFramePtr = framePtr->callerVarPtr; return TclNRObjectContextInvokeNext(interp, context, objc, objv, 1); } diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index 162e7e2..8686ee4 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.8 2008/07/16 22:09:02 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.9 2008/07/18 13:46:46 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -277,7 +277,7 @@ TclOOInvokeContext( * this call is finished. */ - TclNR_AddCallback(interp, FinalizeMethodRefs, contextPtr, NULL, NULL, + Tcl_NRAddCallback(interp, FinalizeMethodRefs, contextPtr, NULL, NULL, NULL); } @@ -286,9 +286,9 @@ TclOOInvokeContext( */ if (contextPtr->oPtr->flags & FILTER_HANDLING) { - TclNR_AddCallback(interp, SetFilterFlags, contextPtr, NULL,NULL,NULL); + Tcl_NRAddCallback(interp, SetFilterFlags, contextPtr, NULL,NULL,NULL); } else { - TclNR_AddCallback(interp, ResetFilterFlags,contextPtr,NULL,NULL,NULL); + Tcl_NRAddCallback(interp, ResetFilterFlags,contextPtr,NULL,NULL,NULL); } if (isFilter || contextPtr->callPtr->flags & FILTER_HANDLING) { contextPtr->oPtr->flags |= FILTER_HANDLING; diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 62585b7..7ef07e2 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.6 2008/07/16 22:09:02 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.7 2008/07/18 13:46:46 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -682,7 +682,7 @@ InvokeProcedureMethod( * Now invoke the body of the method. */ - TclNR_AddCallback(interp, FinalizePMCall, pmPtr, context, fdPtr, NULL); + Tcl_NRAddCallback(interp, FinalizePMCall, pmPtr, context, fdPtr, NULL); return TclNRInterpProcCore(interp, fdPtr->nameObj, Tcl_ObjectContextSkippedArgs(context), fdPtr->errProc); } @@ -1150,7 +1150,7 @@ InvokeForwardMethod( argObjs = InitEnsembleRewrite(interp, objc, objv, skip, numPrefixes, prefixObjs, &len); - result = TclNR_EvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); + result = Tcl_NREvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); TclStackFree(interp, argObjs); return result; } diff --git a/generic/tclProc.c b/generic/tclProc.c index a74a064..7816b5c 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.146 2008/07/14 14:15:11 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.147 2008/07/18 13:46:47 msofer Exp $ */ #include "tclInt.h" @@ -58,9 +58,9 @@ static int ProcCompileProc(Tcl_Interp *interp, Proc *procPtr, Tcl_Obj *bodyPtr, Namespace *nsPtr, const char *description, const char *procName, Proc **procPtrPtr); -static TclNR_PostProc ApplyNR2; -static TclNR_PostProc InterpProcNR2; -static TclNR_PostProc Uplevel_Callback; +static Tcl_NRPostProc ApplyNR2; +static Tcl_NRPostProc InterpProcNR2; +static Tcl_NRPostProc Uplevel_Callback; /* * The ProcBodyObjType type @@ -200,7 +200,7 @@ Tcl_ProcObjCmd( } Tcl_DStringAppend(&ds, procName, -1); - cmd = TclNR_CreateCommand(interp, Tcl_DStringValue(&ds), TclObjInterpProc, + cmd = Tcl_NRCreateCommand(interp, Tcl_DStringValue(&ds), TclObjInterpProc, TclNRInterpProc, procPtr, TclProcDeleteProc); Tcl_DStringFree(&ds); @@ -907,7 +907,7 @@ Tcl_UplevelObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return TclNR_CallObjProc(interp, TclNRUplevelObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRUplevelObjCmd, dummy, objc, objv); } int @@ -966,7 +966,7 @@ TclNRUplevelObjCmd( objPtr = Tcl_ConcatObj(objc, objv); } - TclNR_AddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, + Tcl_NRAddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, NULL); return TclNREvalObjEx(interp, objPtr, 0, NULL, 0); } @@ -1611,10 +1611,10 @@ PushProcCallFrame( } static int -TclNR_BC( +Tcl_NRBC( Tcl_Interp *interp, ByteCode *codePtr, - TclNR_PostProc *postProcPtr, + Tcl_NRPostProc *postProcPtr, Tcl_Obj *procNameObj, ProcErrorProc errorProc) { @@ -1622,7 +1622,7 @@ TclNR_BC( recordPtr->type = TCL_NR_BC_TYPE; recordPtr->data.codePtr = codePtr; - TclNR_AddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, + Tcl_NRAddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, NULL); return TCL_OK; } @@ -1825,7 +1825,7 @@ TclNRInterpProcCore( (Tcl_Obj **)(iPtr->varFramePtr->objv + l)); } - TclNR_BC(interp, codePtr, InterpProcNR2, procNameObj, errorProc); + Tcl_NRBC(interp, codePtr, InterpProcNR2, procNameObj, errorProc); return TCL_OK; } @@ -2704,7 +2704,7 @@ Tcl_ApplyObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return TclNR_CallObjProc(interp, TclNRApplyObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRApplyObjCmd, dummy, objc, objv); } int diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 61e8ad1..84aca49 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.156 2008/07/13 09:03:35 msofer Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.157 2008/07/18 13:46:47 msofer Exp $ */ #include "tclInt.h" @@ -1108,12 +1108,12 @@ static const TclStubs tclStubs = { Tcl_AppendPrintfToObj, /* 579 */ Tcl_CancelEval, /* 580 */ Tcl_Canceled, /* 581 */ - TclNR_CreateCommand, /* 582 */ - TclNR_EvalObj, /* 583 */ - TclNR_EvalObjv, /* 584 */ - TclNR_ObjProc, /* 585 */ - TclNR_AddCallback, /* 586 */ - TclNR_CallObjProc, /* 587 */ + Tcl_NRCreateCommand, /* 582 */ + Tcl_NREvalObj, /* 583 */ + Tcl_NREvalObjv, /* 584 */ + Tcl_NRObjProc, /* 585 */ + Tcl_NRAddCallback, /* 586 */ + Tcl_NRCallObjProc, /* 587 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From a0226c67f814c3d4a641687615bf4171ea749088 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 18 Jul 2008 14:02:42 +0000 Subject: * tests/NRE.test: Added basic tests for deep TclOO calls --- ChangeLog | 2 ++ tests/NRE.test | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c16154e..02a578a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-18 Miguel Sofer + * tests/NRE.test: Added basic tests for deep TclOO calls + * generic/tcl.decls: Change the public api prefix from * generic/tcl.h: TclNR_foo to Tcl_NRfoo * generic/tclBasic.c: diff --git a/tests/NRE.test b/tests/NRE.test index a4007a2..fddfa32 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.2 2008/07/16 00:44:44 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.3 2008/07/18 14:02:43 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -215,6 +215,94 @@ test NRE-6.2 {[uplevel] is not recursive} -setup { } -result {0 20001} # +# Basic TclOO tests +# + +test NRE-oo.1 {really deep calls in oo - direct} -setup { + oo::object create foo + oo::objdefine foo method bar i { + if {[incr i] > 20000} { + return $i + } + foo bar $i + } +} -body { + foo bar 0 +} -cleanup { + foo destroy +} -result 20001 + +test NRE-oo.2 {really deep calls in oo - call via [self]} -setup { + oo::object create foo + oo::objdefine foo method bar i { + if {[incr i] > 20000} { + return $i + } + [self] bar $i + } +} -body { + foo bar 0 +} -cleanup { + foo destroy +} -result 20001 + +test NRE-oo.3 {really deep calls in oo - private calls} -setup { + oo::object create foo + oo::objdefine foo method bar i { + if {[incr i] > 20000} { + return $i + } + my bar $i + } +} -body { + foo bar 0 +} -cleanup { + foo destroy +} -result 20001 + +test NRE-oo.4 {really deep calls in oo - overriding} -setup { + oo::class create foo { + method bar i { + if {[incr i] > 20000} { + return $i + } + my bar $i + } + } + oo::class create boo { + superclass foo + method bar i { + if {[incr i] > 20000} { + return $i + } + next $i + } + } +} -body { + [boo new] bar 0 +} -cleanup { + foo destroy +} -result 20001 + +test NRE-oo.5 {really deep calls in oo - forwards} -setup { + oo::object create foo + oo::objdefine foo { + method bar i { + if {[incr i] > 20000} { + return $i + } + my boo $i + } + forward boo ::foo bar + } +} -body { + foo bar 0 +} -cleanup { + foo destroy +} -result 20001 + + +# # NASTY BUG found by tcllib's interp package # -- cgit v0.12 From 7c31170f9b9f73628665a5656daddd8002c771f7 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 18 Jul 2008 17:23:56 +0000 Subject: NRE-enable the TclOO constructor system. --- ChangeLog | 7 +++ generic/tclOO.c | 151 +++++++++++++++++++++++++++++++++++++++++++++++---- generic/tclOOBasic.c | 83 +++++++++++++++++++--------- generic/tclOOInt.h | 7 ++- 4 files changed, 211 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02a578a..521fe711 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-18 Donal K. Fellows + + * generic/tclOO.c (TclNRNewObjectInstance, FinalizeAlloc): + * generic/tclOOBasic.c (TclOO_Class_Create, TclOO_Class_CreateNs) + (TclOO_Class_New, FinalizeConstruction, AddConstructionFinalizer): + NRE-enablement of the class construction methods. + 2008-07-18 Miguel Sofer * tests/NRE.test: Added basic tests for deep TclOO calls diff --git a/generic/tclOO.c b/generic/tclOO.c index dbf85ea..7280172 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.11 2008/07/18 13:46:46 msofer Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.12 2008/07/18 17:23:56 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -70,6 +70,8 @@ static int CloneClassMethod(Tcl_Interp *interp, Class *clsPtr, Method **newMPtrPtr); static int CloneObjectMethod(Tcl_Interp *interp, Object *oPtr, Method *mPtr, Tcl_Obj *namePtr); +static int FinalizeAlloc(ClientData data[], + Tcl_Interp *interp, int result); static int FinalizeNext(ClientData data[], Tcl_Interp *interp, int result); static int FinalizeObjectCall(ClientData data[], @@ -1271,6 +1273,118 @@ Tcl_NewObjectInstance( return (Tcl_Object) oPtr; } + +int +TclNRNewObjectInstance( + Tcl_Interp *interp, /* Interpreter context. */ + Tcl_Class cls, /* Class to create an instance of. */ + const char *nameStr, /* Name of object to create, or NULL to ask + * the code to pick its own unique name. */ + const char *nsNameStr, /* Name of namespace to create inside object, + * or NULL to ask the code to pick its own + * unique name. */ + int objc, /* Number of arguments. Negative value means + * do not call constructor. */ + Tcl_Obj *const *objv, /* Argument list. */ + int skip, /* Number of arguments to _not_ pass to the + * constructor. */ + Tcl_Object *objectPtr) /* Place to write the object reference upon + * successful allocation. */ +{ + register Class *classPtr = (Class *) cls; + Foundation *fPtr = GetFoundation(interp); + CallContext *contextPtr; + Tcl_InterpState state; + Object *oPtr; + + /* + * Check if we're going to create an object over an existing command; + * that's not allowed. + */ + + if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, 0)) { + Tcl_AppendResult(interp, "can't create object \"", nameStr, + "\": command already exists with that name", NULL); + return TCL_ERROR; + } + + /* + * Create the object. + */ + + oPtr = AllocObject(interp, nameStr, nsNameStr); + oPtr->selfCls = classPtr; + TclOOAddToInstances(oPtr, classPtr); + + /* + * Check to see if we're really creating a class. If so, allocate the + * class structure as well. + */ + + if (TclOOIsReachable(fPtr->classCls, classPtr)) { + /* + * Is a class, so attach a class structure. Note that the AllocClass + * function splices the structure into the object, so we don't have + * to. Once that's done, we need to repatch the object to have the + * right class since AllocClass interferes with that. + */ + + AllocClass(interp, oPtr); + oPtr->selfCls = classPtr; + TclOOAddToSubclasses(oPtr->classPtr, fPtr->objectCls); + } + + /* + * Run constructors, except when objc < 0 (a special flag case used for + * object cloning only). If there aren't any constructors, we do nothing. + */ + + if (objc < 0) { + *objectPtr = (Tcl_Object) oPtr; + return TCL_OK; + } + contextPtr = TclOOGetCallContext(oPtr,NULL,CONSTRUCTOR); + if (contextPtr == NULL) { + *objectPtr = (Tcl_Object) oPtr; + return TCL_OK; + } + + AddRef(oPtr); + state = Tcl_SaveInterpState(interp, TCL_OK); + contextPtr->callPtr->flags |= CONSTRUCTOR; + contextPtr->skip = skip; + + /* + * Fire off the constructors non-recursively. + */ + + Tcl_NRAddCallback(interp, FinalizeAlloc, contextPtr, oPtr, state, + objectPtr); + return TclOOInvokeContext(contextPtr, interp, objc, objv); +} + +static int +FinalizeAlloc( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CallContext *contextPtr = data[0]; + Object *oPtr = data[1]; + Tcl_InterpState state = data[2]; + Tcl_Object *objectPtr = data[3]; + + TclOODeleteContext(contextPtr); + DelRef(oPtr); + if (result != TCL_OK) { + Tcl_DiscardInterpState(state); + Tcl_DeleteCommandFromToken(interp, oPtr->command); + return TCL_ERROR; + } + Tcl_RestoreInterpState(interp, state); + *objectPtr = (Tcl_Object) oPtr; + return TCL_OK; +} /* * ---------------------------------------------------------------------- @@ -1776,12 +1890,12 @@ Tcl_ObjectSetMetadata( /* * ---------------------------------------------------------------------- * - * PublicObjectCmd, PrivateObjectCmd, TclOOInvokeObject, TclOOObjectCmdCore -- + * PublicObjectCmd, PrivateObjectCmd, TclOOInvokeObject -- * * Main entry point for object invokations. The Public* and Private* - * wrapper functions are just thin wrappers round the main - * TclOOObjectCmdCore function that does call chain creation, management - * and invokation. + * wrapper functions (implementations of both object instance commands + * and [my]) are just thin wrappers round the main TclOOObjectCmdCore + * function. Note that the core is function is NRE-aware. * * ---------------------------------------------------------------------- */ @@ -1857,6 +1971,18 @@ TclOOInvokeObject( (Class *) startCls); } } + +/* + * ---------------------------------------------------------------------- + * + * TclOOObjectCmdCore, FinalizeObjectCall -- + * + * Main function for object invokations. Does call chain creation, + * management and invokation. The function FinalizeObjectCall exists to + * clean up after the non-recursive processing of TclOOObjectCmdCore. + * + * ---------------------------------------------------------------------- + */ int TclOOObjectCmdCore( @@ -1922,13 +2048,15 @@ TclOOObjectCmdCore( */ if (startCls != NULL) { - while (contextPtr->index < contextPtr->callPtr->numChain) { + for (; contextPtr->index < contextPtr->callPtr->numChain; + contextPtr->index++) { register struct MInvoke *miPtr = &contextPtr->callPtr->chain[contextPtr->index]; - if (miPtr->isFilter || miPtr->mPtr->declaringClassPtr!=startCls) { - contextPtr->index++; - } else { + if (miPtr->isFilter) { + continue; + } + if (miPtr->mPtr->declaringClassPtr == startCls) { break; } } @@ -1972,12 +2100,13 @@ FinalizeObjectCall( /* * ---------------------------------------------------------------------- * - * Tcl_ObjectContextInvokeNext, TclNRObjectContextInvokeNext -- + * Tcl_ObjectContextInvokeNext, TclNRObjectContextInvokeNext, FinalizeNext -- * * Invokes the next stage of the call chain described in an object * context. This is the core of the implementation of the [next] command. * Does not do management of the call-frame stack. Available in public - * (standard API) and private (NRE-aware) forms. + * (standard API) and private (NRE-aware) forms. FinalizeNext is a + * private function used to clean up in the NRE case. * * ---------------------------------------------------------------------- */ diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 2951cc8..cb717ee 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.5 2008/07/18 13:46:46 msofer Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.6 2008/07/18 17:23:57 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -17,7 +17,11 @@ #endif #include "tclInt.h" #include "tclOOInt.h" +#include "tclNRE.h" +static inline Tcl_Object *AddConstructionFinalizer(Tcl_Interp *interp); +static int FinalizeConstruction(ClientData data[], + Tcl_Interp *interp, int result); static int FinalizeEval(ClientData data[], Tcl_Interp *interp, int result); static int RestoreFrame(ClientData data[], @@ -26,6 +30,50 @@ static int RestoreFrame(ClientData data[], /* * ---------------------------------------------------------------------- * + * AddCreateCallback, FinalizeConstruction -- + * + * Special version of Tcl_NRAddCallback that allows the caller to splice + * the object created later on. Always calls FinalizeConstruction, which + * converts the object into its name and stores that in the interpreter + * result. This is shared by all the construction methods (create, + * createWithNamespace, new). + * + * Note that this is the only code in this file (or, indeed, the whole of + * TclOO) that uses tclNRE.h; it is the only code that does non-standard + * poking in the NRE guts. + * + * ---------------------------------------------------------------------- + */ + +static inline Tcl_Object * +AddConstructionFinalizer( + Tcl_Interp *interp) +{ + TEOV_record *recordPtr; + + Tcl_NRAddCallback(interp, FinalizeConstruction, NULL, NULL, NULL, NULL); + recordPtr = TOP_RECORD(interp); + return (Tcl_Object *) &recordPtr->callbackPtr->data[0]; +} + +static int +FinalizeConstruction( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Object *oPtr = data[0]; + + if (result != TCL_OK) { + return result; + } + Tcl_SetObjResult(interp, TclOOObjectName(interp, oPtr)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * * TclOO_Class_Create -- * * Implementation for oo::class->create method. @@ -43,7 +91,6 @@ TclOO_Class_Create( Tcl_Obj *const *objv) /* The actual arguments. */ { Object *oPtr = (Object *) Tcl_ObjectContextObject(context); - Tcl_Object newObject; const char *objName; int len; @@ -80,14 +127,10 @@ TclOO_Class_Create( * Make the object and return its name. */ - newObject = Tcl_NewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, + return TclNRNewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, objName, NULL, objc, objv, - Tcl_ObjectContextSkippedArgs(context)+1); - if (newObject == NULL) { - return TCL_ERROR; - } - Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) newObject)); - return TCL_OK; + Tcl_ObjectContextSkippedArgs(context)+1, + AddConstructionFinalizer(interp)); } /* @@ -110,7 +153,6 @@ TclOO_Class_CreateNs( Tcl_Obj *const *objv) /* The actual arguments. */ { Object *oPtr = (Object *) Tcl_ObjectContextObject(context); - Tcl_Object newObject; const char *objName, *nsName; int len; @@ -153,14 +195,10 @@ TclOO_Class_CreateNs( * Make the object and return its name. */ - newObject = Tcl_NewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, + return TclNRNewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, objName, nsName, objc, objv, - Tcl_ObjectContextSkippedArgs(context)+2); - if (newObject == NULL) { - return TCL_ERROR; - } - Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) newObject)); - return TCL_OK; + Tcl_ObjectContextSkippedArgs(context)+2, + AddConstructionFinalizer(interp)); } /* @@ -183,7 +221,6 @@ TclOO_Class_New( Tcl_Obj *const *objv) /* The actual arguments. */ { Object *oPtr = (Object *) Tcl_ObjectContextObject(context); - Tcl_Object newObject; /* * Sanity check; should not be possible to invoke this method on a @@ -202,13 +239,9 @@ TclOO_Class_New( * Make the object and return its name. */ - newObject = Tcl_NewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, - NULL, NULL, objc, objv, Tcl_ObjectContextSkippedArgs(context)); - if (newObject == NULL) { - return TCL_ERROR; - } - Tcl_SetObjResult(interp, TclOOObjectName(interp, (Object *) newObject)); - return TCL_OK; + return TclNRNewObjectInstance(interp, (Tcl_Class) oPtr->classPtr, + NULL, NULL, objc, objv, Tcl_ObjectContextSkippedArgs(context), + AddConstructionFinalizer(interp)); } /* diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 569ac2f..66dfca5 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.3 2008/07/16 22:09:02 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.4 2008/07/18 17:23:57 dkf Exp $ */ #include @@ -478,6 +478,11 @@ MODULE_SCOPE int TclOO_Object_VarName(ClientData clientData, MODULE_SCOPE void TclOOAddToInstances(Object *oPtr, Class *clsPtr); MODULE_SCOPE void TclOOAddToMixinSubs(Class *subPtr, Class *mixinPtr); MODULE_SCOPE void TclOOAddToSubclasses(Class *subPtr, Class *superPtr); +MODULE_SCOPE int TclNRNewObjectInstance(Tcl_Interp *interp, + Tcl_Class cls, const char *nameStr, + const char *nsNameStr, int objc, + Tcl_Obj *const *objv, int skip, + Tcl_Object *objectPtr); MODULE_SCOPE void TclOODeleteChain(CallChain *callPtr); MODULE_SCOPE void TclOODeleteChainCache(Tcl_HashTable *tablePtr); MODULE_SCOPE void TclOODeleteContext(CallContext *contextPtr); -- cgit v0.12 From 05ee62d96f55adfce2725b9746b6c8b0557989ee Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 18 Jul 2008 23:29:41 +0000 Subject: new TclNRAddCallback macro for internal use instead of the public Tcl_NRAddCallback --- ChangeLog | 16 ++++++++++++++++ generic/tclBasic.c | 32 +++++++++----------------------- generic/tclDictObj.c | 7 ++++--- generic/tclExecute.c | 4 ++-- generic/tclInterp.c | 5 +++-- generic/tclNRE.h | 28 +++++++++++++++++++++++++++- generic/tclNamesp.c | 9 +++++---- generic/tclOO.c | 8 ++++---- generic/tclOOBasic.c | 10 +++++----- generic/tclOOCall.c | 8 ++++---- generic/tclOOInt.h | 3 ++- generic/tclOOMethod.c | 4 ++-- generic/tclProc.c | 6 +++--- 13 files changed, 86 insertions(+), 54 deletions(-) diff --git a/ChangeLog b/ChangeLog index 521fe711..5e9a4d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-07-18 Miguel Sofer + + * generic/tclBasic.c: Optimization: replace calls to + * generic/tclDictObj.c: Tcl_NRAddCallback with the macro + * generic/tclExecute.c: TclNRAddCallback. + * generic/tclInterp.c: + * generic/tclNRE.h: + * generic/tclNamesp.c: + * generic/tclOO.c: + * generic/tclOOBasic.c: + * generic/tclOOCall.c: + * generic/tclOOInt.h: + * generic/tclOOMethod.c: + * generic/tclProc.c: + + 2008-07-18 Donal K. Fellows * generic/tclOO.c (TclNRNewObjectInstance, FinalizeAlloc): diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b52ff39..eb35aaf 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.315 2008/07/18 13:46:43 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.316 2008/07/18 23:29:41 msofer Exp $ */ #include "tclInt.h" @@ -4304,7 +4304,7 @@ TEOV_PushExceptionHandlers( * Error messages */ - Tcl_NRAddCallback(interp, TEOV_Error, INT2PTR(objc), + TclNRAddCallback(interp, TEOV_Error, INT2PTR(objc), (ClientData) objv, NULL,NULL); } @@ -4313,7 +4313,7 @@ TEOV_PushExceptionHandlers( * No CONTINUE or BREAK at level 0, manage RETURN */ - Tcl_NRAddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL); + TclNRAddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL); } } @@ -4328,7 +4328,7 @@ TEOV_SwitchVarFrame( * restore things at the end. */ - Tcl_NRAddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, + TclNRAddCallback(interp, TEOV_RestoreVarFrame, iPtr->varFramePtr, NULL, NULL, NULL); iPtr->varFramePtr = iPtr->rootFramePtr; } @@ -4545,7 +4545,7 @@ TEOV_RunEnterTraces( * Command was found: push a record to schedule the leave traces. */ - Tcl_NRAddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode), + TclNRAddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(traceCode), commandPtr, cmdPtr, NULL); cmdPtr->refCount++; } else { @@ -5388,7 +5388,7 @@ TclNREvalObjEx( iPtr->cmdFramePtr = eoFramePtr; - Tcl_NRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, + TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, copyPtr, NULL); return Tcl_NREvalObj(interp, objPtr, flags); } @@ -5411,7 +5411,7 @@ TclNREvalObjEx( savedVarFramePtr = iPtr->varFramePtr; iPtr->varFramePtr = iPtr->rootFramePtr; } - Tcl_NRAddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, + TclNRAddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, objPtr, INT2PTR(allowExceptions), NULL); newCodePtr = TclCompileObj(interp, objPtr, invoker, word); @@ -7643,24 +7643,10 @@ Tcl_NRAddCallback( ClientData data2, ClientData data3) { - TEOV_record *recordPtr; - TEOV_callback *callbackPtr; - - if (!postProcPtr) { + if (!(postProcPtr)) { Tcl_Panic("Adding a callback without and objProc?!"); } - - recordPtr = TOP_RECORD(interp); - TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); - - callbackPtr->procPtr = postProcPtr; - callbackPtr->data[0] = data0; - callbackPtr->data[1] = data1; - callbackPtr->data[2] = data2; - callbackPtr->data[3] = data3; - - callbackPtr->nextPtr = recordPtr->callbackPtr; - recordPtr->callbackPtr = callbackPtr; + TclNRAddCallback(interp, postProcPtr, data0, data1, data2, data3); } TEOV_record * diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 5b47c22..b75c92c 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,11 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.63 2008/07/18 13:46:43 msofer Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.64 2008/07/18 23:29:42 msofer Exp $ */ #include "tclInt.h" #include "tommath.h" +#include "tclNRE.h" /* * Forward declaration. @@ -2932,7 +2933,7 @@ DictUpdateCmd( objPtr = Tcl_NewListObj(objc-3, objv+2); Tcl_IncrRefCount(objPtr); Tcl_IncrRefCount(objv[1]); - Tcl_NRAddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); + TclNRAddCallback(interp, FinalizeDictUpdate, objv[1], objPtr, NULL,NULL); return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); } @@ -3111,7 +3112,7 @@ DictWithCmd( Tcl_IncrRefCount(pathPtr); } Tcl_IncrRefCount(objv[1]); - Tcl_NRAddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, + TclNRAddCallback(interp, FinalizeDictWith, objv[1], keysPtr, pathPtr, NULL); return TclNREvalObjEx(interp, objv[objc-1], 0, iPtr->cmdFramePtr, objc-1); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index dd09802..7b9ae49 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.381 2008/07/18 13:46:43 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.382 2008/07/18 23:29:43 msofer Exp $ */ #include "tclInt.h" @@ -7796,7 +7796,7 @@ TclExecuteByteCode( rootPtr = TOP_RECORD(iPtr); PUSH_RECORD(iPtr, recordPtr); - Tcl_NRAddCallback(interp, TailcallFromTebc, tailObjPtr, lookupNsPtr, NULL, NULL); + TclNRAddCallback(interp, TailcallFromTebc, tailObjPtr, lookupNsPtr, NULL, NULL); /* Now swap them! */ recordPtr->nextPtr = rootPtr->nextPtr; diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 358d85c..4412aa8 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,10 +10,11 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.89 2008/07/18 13:46:45 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.90 2008/07/18 23:29:44 msofer Exp $ */ #include "tclInt.h" +#include "tclNRE.h" /* * A pointer to a string that holds an initialization script that if non-NULL @@ -1805,7 +1806,7 @@ AliasNRCmd( */ if (isRootEnsemble) { - Tcl_NRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); + TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } return TclNREvalCmd(interp, listPtr, flags); } diff --git a/generic/tclNRE.h b/generic/tclNRE.h index 0d13d3a..08ddcd5 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.3 2008/07/18 13:46:46 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.4 2008/07/18 23:29:44 msofer Exp $ */ @@ -171,6 +171,32 @@ typedef struct TEOV_record { #define TEBC_DO_EXEC 1 /* MUST NOT be 0 */ #define TEBC_DO_TAILCALL 2 +#define TclNRAddCallback(\ + interp,\ + postProcPtr,\ + data0,\ + data1,\ + data2,\ + data3) \ + { \ + TEOV_record *recordPtr; \ + TEOV_callback *callbackPtr; \ + \ + recordPtr = TOP_RECORD(interp); \ + TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); \ + \ + callbackPtr->procPtr = (postProcPtr); \ + callbackPtr->data[0] = (data0); \ + callbackPtr->data[1] = (data1); \ + callbackPtr->data[2] = (data2); \ + callbackPtr->data[3] = (data3); \ + \ + callbackPtr->nextPtr = recordPtr->callbackPtr; \ + recordPtr->callbackPtr = callbackPtr; \ + } + + + /* * These are only used by TEOV; here for ease of ref. They should move to * tclBasic.c later on. diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index f541a1e..b7cd491 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,10 +23,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.167 2008/07/18 13:46:46 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.168 2008/07/18 23:29:44 msofer Exp $ */ #include "tclInt.h" +#include "tclNRE.h" /* * Thread-local storage used to avoid having a global lock on data that is not @@ -3332,7 +3333,7 @@ NamespaceEvalCmd( * TIP #280: Make invoking context available to eval'd script. */ - Tcl_NRAddCallback(interp, NsEval_Callback, namespacePtr, "eval", + TclNRAddCallback(interp, NsEval_Callback, namespacePtr, "eval", NULL, NULL); return TclNREvalObjEx(interp, objPtr, 0, iPtr->cmdFramePtr, 3); } @@ -3778,7 +3779,7 @@ NamespaceInscopeCmd( Tcl_DecrRefCount(listPtr); /* We're done with the list object. */ } - Tcl_NRAddCallback(interp, NsEval_Callback, namespacePtr, "inscope", + TclNRAddCallback(interp, NsEval_Callback, namespacePtr, "inscope", NULL, NULL); return TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); } @@ -6263,7 +6264,7 @@ NsEnsembleImplementationCmdNR( iPtr->ensembleRewrite.sourceObjs = objv; iPtr->ensembleRewrite.numRemovedObjs = 2; iPtr->ensembleRewrite.numInsertedObjs = prefixObjc; - Tcl_NRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, + TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } else { register int ni = iPtr->ensembleRewrite.numInsertedObjs; diff --git a/generic/tclOO.c b/generic/tclOO.c index 7280172..6f078e4 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.12 2008/07/18 17:23:56 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.13 2008/07/18 23:29:44 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -1358,7 +1358,7 @@ TclNRNewObjectInstance( * Fire off the constructors non-recursively. */ - Tcl_NRAddCallback(interp, FinalizeAlloc, contextPtr, oPtr, state, + TclNRAddCallback(interp, FinalizeAlloc, contextPtr, oPtr, state, objectPtr); return TclOOInvokeContext(contextPtr, interp, objc, objv); } @@ -2075,7 +2075,7 @@ TclOOObjectCmdCore( */ AddRef(oPtr); - Tcl_NRAddCallback(interp, FinalizeObjectCall, contextPtr,oPtr, NULL,NULL); + TclNRAddCallback(interp, FinalizeObjectCall, contextPtr,oPtr, NULL,NULL); return TclOOInvokeContext(contextPtr, interp, objc, objv); } @@ -2215,7 +2215,7 @@ TclNRObjectContextInvokeNext( * all) come through the same code. */ - Tcl_NRAddCallback(interp, FinalizeNext, contextPtr, + TclNRAddCallback(interp, FinalizeNext, contextPtr, INT2PTR(contextPtr->index), INT2PTR(contextPtr->skip), NULL); contextPtr->index++; contextPtr->skip = skip; diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index cb717ee..2adf547 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.6 2008/07/18 17:23:57 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.7 2008/07/18 23:29:44 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -32,7 +32,7 @@ static int RestoreFrame(ClientData data[], * * AddCreateCallback, FinalizeConstruction -- * - * Special version of Tcl_NRAddCallback that allows the caller to splice + * Special version of TclNRAddCallback that allows the caller to splice * the object created later on. Always calls FinalizeConstruction, which * converts the object into its name and stores that in the interpreter * result. This is shared by all the construction methods (create, @@ -51,7 +51,7 @@ AddConstructionFinalizer( { TEOV_record *recordPtr; - Tcl_NRAddCallback(interp, FinalizeConstruction, NULL, NULL, NULL, NULL); + TclNRAddCallback(interp, FinalizeConstruction, NULL, NULL, NULL, NULL); recordPtr = TOP_RECORD(interp); return (Tcl_Object *) &recordPtr->callbackPtr->data[0]; } @@ -346,7 +346,7 @@ TclOO_Object_Eval( * the script completes. */ - Tcl_NRAddCallback(interp, FinalizeEval, object, NULL, NULL, NULL); + TclNRAddCallback(interp, FinalizeEval, object, NULL, NULL, NULL); return TclNREvalObjEx(interp, scriptPtr, flags, invoker, skip); } @@ -659,7 +659,7 @@ TclOONextObjCmd( * that this is like [uplevel 1] and not [eval]. */ - Tcl_NRAddCallback(interp, RestoreFrame, framePtr, NULL, NULL, NULL); + TclNRAddCallback(interp, RestoreFrame, framePtr, NULL, NULL, NULL); iPtr->varFramePtr = framePtr->callerVarPtr; return TclNRObjectContextInvokeNext(interp, context, objc, objv, 1); } diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index 8686ee4..e517d28 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.9 2008/07/18 13:46:46 msofer Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.10 2008/07/18 23:29:44 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -277,7 +277,7 @@ TclOOInvokeContext( * this call is finished. */ - Tcl_NRAddCallback(interp, FinalizeMethodRefs, contextPtr, NULL, NULL, + TclNRAddCallback(interp, FinalizeMethodRefs, contextPtr, NULL, NULL, NULL); } @@ -286,9 +286,9 @@ TclOOInvokeContext( */ if (contextPtr->oPtr->flags & FILTER_HANDLING) { - Tcl_NRAddCallback(interp, SetFilterFlags, contextPtr, NULL,NULL,NULL); + TclNRAddCallback(interp, SetFilterFlags, contextPtr, NULL,NULL,NULL); } else { - Tcl_NRAddCallback(interp, ResetFilterFlags,contextPtr,NULL,NULL,NULL); + TclNRAddCallback(interp, ResetFilterFlags,contextPtr,NULL,NULL,NULL); } if (isFilter || contextPtr->callPtr->flags & FILTER_HANDLING) { contextPtr->oPtr->flags |= FILTER_HANDLING; diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 66dfca5..fa7d80e 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,11 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.4 2008/07/18 17:23:57 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.5 2008/07/18 23:29:44 msofer Exp $ */ #include #include "tclOO.h" +#include "tclNRE.h" /* * Forward declarations. diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 7ef07e2..3afe314 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.7 2008/07/18 13:46:46 msofer Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.8 2008/07/18 23:29:44 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -682,7 +682,7 @@ InvokeProcedureMethod( * Now invoke the body of the method. */ - Tcl_NRAddCallback(interp, FinalizePMCall, pmPtr, context, fdPtr, NULL); + TclNRAddCallback(interp, FinalizePMCall, pmPtr, context, fdPtr, NULL); return TclNRInterpProcCore(interp, fdPtr->nameObj, Tcl_ObjectContextSkippedArgs(context), fdPtr->errProc); } diff --git a/generic/tclProc.c b/generic/tclProc.c index 7816b5c..ddfb43b 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.147 2008/07/18 13:46:47 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.148 2008/07/18 23:29:45 msofer Exp $ */ #include "tclInt.h" @@ -966,7 +966,7 @@ TclNRUplevelObjCmd( objPtr = Tcl_ConcatObj(objc, objv); } - Tcl_NRAddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, + TclNRAddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, NULL); return TclNREvalObjEx(interp, objPtr, 0, NULL, 0); } @@ -1622,7 +1622,7 @@ Tcl_NRBC( recordPtr->type = TCL_NR_BC_TYPE; recordPtr->data.codePtr = codePtr; - Tcl_NRAddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, + TclNRAddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, NULL); return TCL_OK; } -- cgit v0.12 From 256c0bd90c3562915f4af7b84ea24c80a8c4ad61 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 19 Jul 2008 09:57:33 +0000 Subject: Rewrite to use tcltest2 and not generate non-ascii chars in results. Part of fix of [Bug 1513659] --- ChangeLog | 6 ++- tests/env.test | 113 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 63 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e9a4d5..b1ef5ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-19 Donal K. Fellows + + * tests/env.test: Rewrite so that non-ASCII characters are not used. + Part of fixing [Bug 1513659]. + 2008-07-18 Miguel Sofer * generic/tclBasic.c: Optimization: replace calls to @@ -13,7 +18,6 @@ * generic/tclOOMethod.c: * generic/tclProc.c: - 2008-07-18 Donal K. Fellows * generic/tclOO.c (TclNRNewObjectInstance, FinalizeAlloc): diff --git a/tests/env.test b/tests/env.test index e417db2..2d4dc8a 100644 --- a/tests/env.test +++ b/tests/env.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: env.test,v 1.28 2007/01/19 01:04:00 das Exp $ +# RCS: @(#) $Id: env.test,v 1.29 2008/07/19 09:57:37 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -27,37 +27,39 @@ testConstraint exec [llength [info commands exec]] # on the Mac). So put them before you test for the existance # of exec. # -test env-1.1 {propagation of env values to child interpreters} { +test env-1.1 {propagation of env values to child interpreters} -setup { catch {interp delete child} catch {unset env(test)} +} -body { interp create child set env(test) garbage - set return [child eval {set env(test)}] + child eval {set env(test)} +} -cleanup { interp delete child unset env(test) - set return -} {garbage} +} -result {garbage} # # This one crashed on Solaris under Tcl8.0, so we only # want to make sure it runs. # -test env-1.2 {lappend to env value} { +test env-1.2 {lappend to env value} -setup { catch {unset env(test)} +} -body { set env(test) aaaaaaaaaaaaaaaa append env(test) bbbbbbbbbbbbbb unset env(test) -} {} -test env-1.3 {reflection of env by "array names"} { +} +test env-1.3 {reflection of env by "array names"} -setup { catch {interp delete child} catch {unset env(test)} +} -body { interp create child child eval {set env(test) garbage} - set names [array names env] + expr {"test" in [array names env]} +} -cleanup { interp delete child - set ix [lsearch $names test] catch {unset env(test)} - expr {$ix >= 0} -} {1} +} -result {1} set printenvScript [makeFile { proc lrem {listname name} { @@ -68,6 +70,14 @@ set printenvScript [makeFile { } return $list } + proc mangle s { + regsub -all {\[|\\|\]} $s {\\&} s + regsub -all {[\u007f-\uffff]} $s {[manglechar &]} s + return [subst -novariables $s] + } + proc manglechar c { + return [format {\u%04x} [scan $c %c]] + } set names [lsort [array names env]] if {$tcl_platform(platform) == "windows"} { @@ -85,11 +95,10 @@ set printenvScript [makeFile { lrem names $name } foreach p $names { - puts "$p=$env($p)" + puts "[mangle $p]=[mangle $env($p)]" } exit } printenv] - # [exec] is required here to see the actual environment received # by child processes. proc getenv {} { @@ -103,9 +112,8 @@ proc getenv {} { # Save the current environment variables at the start of the test. +set env2 [array get env] foreach name [array names env] { - set env2($name) $env($name) - # Keep some environment variables that support operation of the # tcltest package. if {[string toupper $name] ni { @@ -121,18 +129,15 @@ foreach name [array names env] { test env-2.1 {adding environment variables} {exec} { getenv } {} - set env(NAME1) "test string" test env-2.2 {adding environment variables} {exec} { getenv } {NAME1=test string} - set env(NAME2) "more" test env-2.3 {adding environment variables} {exec} { getenv } {NAME1=test string NAME2=more} - set env(XYZZY) "garbage" test env-2.4 {adding environment variables} {exec} { getenv @@ -155,84 +160,84 @@ test env-4.1 {unsetting environment variables} {exec} { set result } {NAME1=test string XYZZY=garbage} - test env-4.2 {unsetting environment variables} {exec} { set result [getenv] unset env(XYZZY) set result } {XYZZY=garbage} - test env-4.3 {setting international environment variables} {exec} { set env(\ua7) \ub6 getenv -} "\ua7=\ub6" +} {\u00a7=\u00b6} test env-4.4 {changing international environment variables} {exec} { set env(\ua7) \ua7 getenv -} "\ua7=\ua7" +} {\u00a7=\u00a7} test env-4.5 {unsetting international environment variables} {exec} { set env(\ub6) \ua7 unset env(\ua7) set result [getenv] unset env(\ub6) set result -} "\ub6=\ua7" +} {\u00b6=\u00a7} -test env-5.0 {corner cases - set a value, it should exist} {} { +test env-5.0 {corner cases - set a value, it should exist} -body { set env(temp) a - set result [set env(temp)] + set env(temp) +} -cleanup { unset env(temp) - set result -} {a} -test env-5.1 {corner cases - remove one elem at a time} {} { +} -result {a} +test env-5.1 {corner cases - remove one elem at a time} -setup { + set x [array get env] +} -body { # When no environment variables exist, the env var will # contain no entries. The "array names" call synchs up # the C-level environ array with the Tcl level env array. # Make sure an empty Tcl array is created. - - set x [array get env] foreach e [array names env] { unset env($e) } - set result [catch {array names env}] + array size env +} -cleanup { array set env $x - set result -} {0} -test env-5.2 {corner cases - unset the env array} {} { +} -result {0} +test env-5.2 {corner cases - unset the env array} -setup { + interp create i +} -body { # Unsetting a variable in an interp detaches the C-level # traces from the Tcl "env" variable. - - interp create i - i eval { unset env } - i eval { set env(THIS_SHOULDNT_EXIST) a} - set result [info exists env(THIS_SHOULDNT_EXIST)] + i eval { + unset env + set env(THIS_SHOULDNT_EXIST) a + } + info exists env(THIS_SHOULDNT_EXIST) +} -cleanup { interp delete i - set result -} {0} -test env-5.3 {corner cases - unset the env in master should unset child} {} { +} -result {0} +test env-5.3 {corner cases - unset the env in master should unset child} -setup { + interp create i +} -body { # Variables deleted in a master interp should be deleted in # child interp too. - - interp create i i eval { set env(THIS_SHOULD_EXIST) a} set result [set env(THIS_SHOULD_EXIST)] unset env(THIS_SHOULD_EXIST) lappend result [i eval {catch {set env(THIS_SHOULD_EXIST)}}] +} -cleanup { interp delete i - set result -} {a 1} -test env-5.4 {corner cases - unset the env array} {} { +} -result {a 1} +test env-5.4 {corner cases - unset the env array} -setup { + interp create i +} -body { # The info exists command should be in synch with the env array. # Know Bug: 1737 - - interp create i i eval { set env(THIS_SHOULD_EXIST) a} set result [info exists env(THIS_SHOULD_EXIST)] lappend result [set env(THIS_SHOULD_EXIST)] lappend result [info exists env(THIS_SHOULD_EXIST)] +} -cleanup { interp delete i - set result -} {1 a 1} +} -result {1 a 1} test env-5.5 {corner cases - cannot have null entries on Windows} {win} { set env() a catch {set env()} @@ -251,9 +256,7 @@ test env-6.1 {corner cases - add lots of env variables} {} { foreach name [array names env] { unset env($name) } -foreach name [array names env2] { - set env($name) $env2($name) -} +array set env $env2 # cleanup removeFile $printenvScript -- cgit v0.12 From f7a85c74ab8ed55803fbcd9cd91a115bc1190b60 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 19 Jul 2008 16:20:14 +0000 Subject: More test cleanup. --- ChangeLog | 5 +- tests/exec.test | 510 ++++++++++++++++++++++++++------------------------------ 2 files changed, 240 insertions(+), 275 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1ef5ef..e22f543 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2008-07-19 Donal K. Fellows - * tests/env.test: Rewrite so that non-ASCII characters are not used. - Part of fixing [Bug 1513659]. + * tests/exec.test, tests/env.test: Rewrite so that non-ASCII + characters are not used in the final comparison. Part of fixing [Bug + 1513659]. 2008-07-18 Miguel Sofer diff --git a/tests/exec.test b/tests/exec.test index c803343..d3e3e35 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -1,17 +1,17 @@ # Commands covered: exec # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: exec.test,v 1.29 2008/03/11 22:23:33 das Exp $ +# RCS: @(#) $Id: exec.test,v 1.30 2008/07/19 16:20:17 dkf Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -20,6 +20,8 @@ namespace import -force ::tcltest::* # Skip them if exec is not defined. testConstraint exec [llength [info commands exec]] unset -nocomplain path + +# Utilities that are like bourne shell stalwarts, but cross-platform. set path(echo) [makeFile { puts -nonewline [lindex $argv 0] foreach str [lrange $argv 1 end] { @@ -28,19 +30,17 @@ set path(echo) [makeFile { puts {} exit } echo] - set path(echo2) [makeFile { puts stdout [join $argv] puts stderr [lindex $argv 1] exit } echo2] - set path(cat) [makeFile { - if {$argv == {}} { + if {$argv eq ""} { set argv - } foreach name $argv { - if {$name == "-"} { + if {$name eq "-"} { set f stdin } elseif {[catch {open $name r} f] != 0} { puts stderr $f @@ -49,13 +49,12 @@ set path(cat) [makeFile { while {[eof $f] == 0} { puts -nonewline [read $f] } - if {$f != "stdin"} { + if {$f ne "stdin"} { close $f } } exit } cat] - set path(wc) [makeFile { set data [read stdin] set lines [regsub -all "\n" $data {} dummy] @@ -64,23 +63,20 @@ set path(wc) [makeFile { puts [format "%8.d%8.d%8.d" $lines $words $chars] exit } wc] - set path(sh) [makeFile { - if {[lindex $argv 0] != "-c"} { + if {[lindex $argv 0] ne "-c"} { error "sh: unexpected arguments $argv" } set cmd [lindex $argv 1] lappend cmd ";" - set newcmd {} - foreach arg $cmd { - if {$arg == ";"} { + if {$arg eq ";"} { eval exec >@stdout 2>@stderr [list [info nameofexecutable]] $newcmd set newcmd {} continue } - if {$arg == "1>&2"} { + if {$arg eq "1>&2"} { set arg >@stderr } lappend newcmd $arg @@ -88,16 +84,14 @@ set path(sh) [makeFile { exit } sh] set path(sh2) [makeFile { - if {[lindex $argv 0] != "-c"} { + if {[lindex $argv 0] ne "-c"} { error "sh: unexpected arguments $argv" } set cmd [lindex $argv 1] lappend cmd ";" - set newcmd {} - foreach arg $cmd { - if {$arg == ";"} { + if {$arg eq ";"} { eval exec -ignorestderr >@stdout [list [info nameofexecutable]] $newcmd set newcmd {} continue @@ -106,16 +100,21 @@ set path(sh2) [makeFile { } exit } sh2] - set path(sleep) [makeFile { after [expr $argv*1000] exit } sleep] - set path(exit) [makeFile { exit $argv } exit] +proc readfile filename { + set f [open $filename] + set d [read $f] + close $f + return [string trimright $d \n] +} + # Basic operations. test exec-1.1 {basic exec operation} {exec} { @@ -152,13 +151,19 @@ test exec-2.4 {redirecting input from immediate source} {exec stdio} { test exec-2.5 {redirecting input from immediate source} {exec} { exec [interpreter] $path(cat) "< external conversion did not - # occur before writing out the temp file. - exec [interpreter] $path(cat) << "\uE9\uE0\uFC\uF1" -} "\uE9\uE0\uFC\uF1" +test exec-2.6 {redirecting input from immediate source, with UTF} -setup { + proc quotenonascii s { + regsub -all {\[|\\|\]} $s {\\&} s + regsub -all {[\u007f-\uffff]} $s \ + {[apply {c {format {\u%04x} [scan $c %c]}} &]} s + return [subst -novariables $s] + } +} -constraints {exec} -body { + # If this fails, it may give back: "\uC3\uA9\uC3\uA0\uC3\uBC\uC3\uB1" + # If it does, this means that the UTF -> external conversion did not occur + # before writing out the temp file. + quotenonascii [exec [interpreter] $path(cat) << "\uE9\uE0\uFC\uF1"] +} -result {\u00e9\u00e0\u00fc\u00f1} # I/O redirection: output to file. @@ -260,18 +265,18 @@ test exec-5.4 {redirecting input from file} {exec stdio} { test exec-5.5 {redirecting input from file} {exec} { exec [interpreter] $path(cat) <$path(gorp.file) } {Just a few thoughts} -test exec-5.6 {redirecting input from file} {exec} { +test exec-5.6 {redirecting input from file} -constraints {exec} -body { set f [open $path(gorp.file) r] - set result [exec [interpreter] $path(cat) <@ $f] + exec [interpreter] $path(cat) <@ $f +} -cleanup { close $f - set result -} {Just a few thoughts} -test exec-5.7 {redirecting input from file} {exec} { +} -result {Just a few thoughts} +test exec-5.7 {redirecting input from file} -constraints {exec} -body { set f [open $path(gorp.file) r] - set result [exec <@$f [interpreter] $path(cat)] + exec <@$f [interpreter] $path(cat) +} -cleanup { close $f - set result -} {Just a few thoughts} +} -result {Just a few thoughts} # I/O redirection: standard error through a pipeline. @@ -300,7 +305,6 @@ test exec-7.2 {multiple I/O redirections} {exec} { } {command input} # Long input to command and output from command. - set a "0123456789 xxxxxxxxx abcdefghi ABCDEFGHIJK\n" set a [concat $a $a $a $a] set a [concat $a $a $a $a] @@ -309,9 +313,7 @@ set a [concat $a $a $a $a] test exec-8.1 {long input and output} {exec} { exec [interpreter] $path(cat) << $a } $a - # More than 20 arguments to exec. - test exec-8.2 {long input and output} {exec} { exec [interpreter] $path(echo) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23} @@ -325,122 +327,120 @@ test exec-9.1 {commands returning errors} {exec} { test exec-9.2 {commands returning errors} {exec} { string tolower [list [catch {exec [interpreter] echo foo | foo123} msg] $msg $errorCode] } {1 {couldn't execute "foo123": no such file or directory} {posix enoent {no such file or directory}}} -test exec-9.3 {commands returning errors} {exec stdio} { - list [catch {exec [interpreter] $path(sleep) 1 | [interpreter] $path(exit) 43 | [interpreter] $path(sleep) 1} msg] $msg -} {1 {child process exited abnormally}} -test exec-9.4 {commands returning errors} {exec stdio} { - list [catch {exec [interpreter] $path(exit) 43 | [interpreter] $path(echo) "foo bar"} msg] $msg -} {1 {foo bar -child process exited abnormally}} -test exec-9.5 {commands returning errors} {exec stdio} { - list [catch {exec gorp456 | [interpreter] echo a b c} msg] [string tolower $msg] -} {1 {couldn't execute "gorp456": no such file or directory}} -test exec-9.6 {commands returning errors} {exec} { - list [catch {exec [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2"} msg] $msg -} {1 {error msg}} -test exec-9.7 {commands returning errors} {exec stdio} { - list [catch {exec [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1" \ - | [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1"} msg] $msg -} {1 {error msg -error msg}} - +test exec-9.3 {commands returning errors} -constraints {exec stdio} -body { + exec [interpreter] $path(sleep) 1 | [interpreter] $path(exit) 43 | [interpreter] $path(sleep) 1 +} -returnCodes error -result {child process exited abnormally} +test exec-9.4 {commands returning errors} -constraints {exec stdio} -body { + exec [interpreter] $path(exit) 43 | [interpreter] $path(echo) "foo bar" +} -returnCodes error -result {foo bar +child process exited abnormally} +test exec-9.5 {commands returning errors} -constraints {exec stdio} -body { + exec gorp456 | [interpreter] echo a b c +} -returnCodes error -result {couldn't execute "gorp456": no such file or directory} +test exec-9.6 {commands returning errors} -constraints {exec} -body { + exec [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2" +} -returnCodes error -result {error msg} +test exec-9.7 {commands returning errors} -constraints {exec stdio nonPortable} -body { + # This test can fail easily on multiprocessor machines + exec [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1" \ + | [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1" +} -returnCodes error -result {error msg +error msg} set path(err) [makeFile {} err] - -test exec-9.8 {commands returning errors} {exec} { +test exec-9.8 {commands returning errors} -constraints {exec} -setup { set f [open $path(err) w] puts $f { puts stdout out puts stderr err } close $f - list [catch {exec [interpreter] $path(err)} msg] $msg -} {1 {out -err}} - -# Errors in executing the Tcl command, as opposed to errors in the -# processes that are invoked. - -test exec-10.1 {errors in exec invocation} {exec} { - list [catch {exec} msg] $msg -} {1 {wrong # args: should be "exec ?switches? arg ?arg ...?"}} -test exec-10.2 {errors in exec invocation} {exec} { - list [catch {exec | cat} msg] $msg -} {1 {illegal use of | or |& in command}} -test exec-10.3 {errors in exec invocation} {exec} { - list [catch {exec cat |} msg] $msg -} {1 {illegal use of | or |& in command}} -test exec-10.4 {errors in exec invocation} {exec} { - list [catch {exec cat | | cat} msg] $msg -} {1 {illegal use of | or |& in command}} -test exec-10.5 {errors in exec invocation} {exec} { - list [catch {exec cat | |& cat} msg] $msg -} {1 {illegal use of | or |& in command}} -test exec-10.6 {errors in exec invocation} {exec} { - list [catch {exec cat |&} msg] $msg -} {1 {illegal use of | or |& in command}} -test exec-10.7 {errors in exec invocation} {exec} { - list [catch {exec cat <} msg] $msg -} {1 {can't specify "<" as last word in command}} -test exec-10.8 {errors in exec invocation} {exec} { - list [catch {exec cat >} msg] $msg -} {1 {can't specify ">" as last word in command}} -test exec-10.9 {errors in exec invocation} {exec} { - list [catch {exec cat <<} msg] $msg -} {1 {can't specify "<<" as last word in command}} -test exec-10.10 {errors in exec invocation} {exec} { - list [catch {exec cat >>} msg] $msg -} {1 {can't specify ">>" as last word in command}} -test exec-10.11 {errors in exec invocation} {exec} { - list [catch {exec cat >&} msg] $msg -} {1 {can't specify ">&" as last word in command}} -test exec-10.12 {errors in exec invocation} {exec} { - list [catch {exec cat >>&} msg] $msg -} {1 {can't specify ">>&" as last word in command}} -test exec-10.13 {errors in exec invocation} {exec} { - list [catch {exec cat >@} msg] $msg -} {1 {can't specify ">@" as last word in command}} -test exec-10.14 {errors in exec invocation} {exec} { - list [catch {exec cat <@} msg] $msg -} {1 {can't specify "<@" as last word in command}} -test exec-10.15 {errors in exec invocation} {exec} { - list [catch {exec cat < a/b/c} msg] [string tolower $msg] -} {1 {couldn't read file "a/b/c": no such file or directory}} -test exec-10.16 {errors in exec invocation} {exec} { - list [catch {exec cat << foo > a/b/c} msg] [string tolower $msg] -} {1 {couldn't write file "a/b/c": no such file or directory}} -test exec-10.17 {errors in exec invocation} {exec} { - list [catch {exec cat << foo > a/b/c} msg] [string tolower $msg] -} {1 {couldn't write file "a/b/c": no such file or directory}} +} -body { + exec [interpreter] $path(err) +} -returnCodes error -result {out +err} + +# Errors in executing the Tcl command, as opposed to errors in the processes +# that are invoked. + +test exec-10.1 {errors in exec invocation} -constraints {exec} -body { + exec +} -returnCodes error -result {wrong # args: should be "exec ?switches? arg ?arg ...?"} +test exec-10.2 {errors in exec invocation} -constraints {exec} -body { + exec | cat +} -returnCodes error -result {illegal use of | or |& in command} +test exec-10.3 {errors in exec invocation} -constraints {exec} -body { + exec cat | +} -returnCodes error -result {illegal use of | or |& in command} +test exec-10.4 {errors in exec invocation} -constraints {exec} -body { + exec cat | | cat +} -returnCodes error -result {illegal use of | or |& in command} +test exec-10.5 {errors in exec invocation} -constraints {exec} -body { + exec cat | |& cat +} -returnCodes error -result {illegal use of | or |& in command} +test exec-10.6 {errors in exec invocation} -constraints {exec} -body { + exec cat |& +} -returnCodes error -result {illegal use of | or |& in command} +test exec-10.7 {errors in exec invocation} -constraints {exec} -body { + exec cat < +} -returnCodes error -result {can't specify "<" as last word in command} +test exec-10.8 {errors in exec invocation} -constraints {exec} -body { + exec cat > +} -returnCodes error -result {can't specify ">" as last word in command} +test exec-10.9 {errors in exec invocation} -constraints {exec} -body { + exec cat << +} -returnCodes error -result {can't specify "<<" as last word in command} +test exec-10.10 {errors in exec invocation} -constraints {exec} -body { + exec cat >> +} -returnCodes error -result {can't specify ">>" as last word in command} +test exec-10.11 {errors in exec invocation} -constraints {exec} -body { + exec cat >& +} -returnCodes error -result {can't specify ">&" as last word in command} +test exec-10.12 {errors in exec invocation} -constraints {exec} -body { + exec cat >>& +} -returnCodes error -result {can't specify ">>&" as last word in command} +test exec-10.13 {errors in exec invocation} -constraints {exec} -body { + exec cat >@ +} -returnCodes error -result {can't specify ">@" as last word in command} +test exec-10.14 {errors in exec invocation} -constraints {exec} -body { + exec cat <@ +} -returnCodes error -result {can't specify "<@" as last word in command} +test exec-10.15 {errors in exec invocation} -constraints {exec} -body { + exec cat < a/b/c +} -returnCodes error -result {couldn't read file "a/b/c": no such file or directory} +test exec-10.16 {errors in exec invocation} -constraints {exec} -body { + exec cat << foo > a/b/c +} -returnCodes error -result {couldn't write file "a/b/c": no such file or directory} +test exec-10.17 {errors in exec invocation} -constraints {exec} -body { + exec cat << foo > a/b/c +} -returnCodes error -result {couldn't write file "a/b/c": no such file or directory} set f [open $path(gorp.file) w] -test exec-10.18 {errors in exec invocation} {exec} { - list [catch {exec cat <@ $f} msg] $msg -} "1 {channel \"$f\" wasn't opened for reading}" +test exec-10.18 {errors in exec invocation} -constraints {exec} -body { + exec cat <@ $f +} -returnCodes error -result "channel \"$f\" wasn't opened for reading" close $f set f [open $path(gorp.file) r] -test exec-10.19 {errors in exec invocation} {exec} { - list [catch {exec cat >@ $f} msg] $msg -} "1 {channel \"$f\" wasn't opened for writing}" +test exec-10.19 {errors in exec invocation} -constraints {exec} -body { + exec cat >@ $f +} -returnCodes error -result "channel \"$f\" wasn't opened for writing" close $f -test exec-10.20 {errors in exec invocation} {exec} { - list [catch {exec ~non_existent_user/foo/bar} msg] $msg -} {1 {user "non_existent_user" doesn't exist}} -test exec-10.21 {errors in exec invocation} {exec} { - list [catch {exec [interpreter] true | ~xyzzy_bad_user/x | false} msg] $msg -} {1 {user "xyzzy_bad_user" doesn't exist}} -test exec-10.22 {errors in exec invocation} \ --constraints exec \ --returnCodes 1 \ --body {exec echo test > ~non_existent_user/foo/bar} \ --result {user "non_existent_user" doesn't exist} +test exec-10.20 {errors in exec invocation} -constraints {exec} -body { + exec ~non_existent_user/foo/bar +} -returnCodes error -result {user "non_existent_user" doesn't exist} +test exec-10.21 {errors in exec invocation} -constraints {exec} -body { + exec [interpreter] true | ~xyzzy_bad_user/x | false +} -returnCodes error -result {user "xyzzy_bad_user" doesn't exist} +test exec-10.22 {errors in exec invocation} -constraints exec -body { + exec echo test > ~non_existent_user/foo/bar +} -returnCodes error -result {user "non_existent_user" doesn't exist} # Commands in background. test exec-11.1 {commands in background} {exec} { - set x [lindex [time {exec [interpreter] $path(sleep) 2 &}] 0] - expr $x<1000000 + set time [time {exec [interpreter] $path(sleep) 2 &}] + expr {[lindex $time 0] < 1000000} } 1 -test exec-11.2 {commands in background} {exec} { - list [catch {exec [interpreter] $path(echo) a &b} msg] $msg -} {0 {a &b}} +test exec-11.2 {commands in background} -constraints {exec} -body { + exec [interpreter] $path(echo) a &b +} -result {a &b} test exec-11.3 {commands in background} {exec} { llength [exec [interpreter] $path(sleep) 1 &] } 1 @@ -451,35 +451,33 @@ test exec-11.5 {commands in background} {exec} { set f [open $path(gorp.file) w] puts $f [list catch [list exec [info nameofexecutable] $path(echo) foo &]] close $f - string compare "foo" [exec [interpreter] $path(gorp.file)] -} 0 + exec [interpreter] $path(gorp.file) +} foo -# Make sure that background commands are properly reaped when -# they eventually die. +# Make sure that background commands are properly reaped when they +# eventually die. -if {[testConstraint exec]} { - exec [interpreter] $path(sleep) 3 +if {[testConstraint exec] && [testConstraint nonPortable]} { + after 1300 + exec [interpreter] $path(sleep) 1 } -test exec-12.1 {reaping background processes} \ - {exec unix nonPortable} { +test exec-12.1 {reaping background processes} {exec unix nonPortable} { for {set i 0} {$i < 20} {incr i} { exec echo foo > /dev/null & } - exec sleep 1 + after 1000 catch {exec ps | fgrep "echo foo" | fgrep -v fgrep | wc} msg lindex $msg 0 } 0 -test exec-12.2 {reaping background processes} \ - {exec unix nonPortable} { +test exec-12.2 {reaping background processes} {exec unix nonPortable} { exec sleep 2 | sleep 2 | sleep 2 & catch {exec ps | fgrep -i "sleep" | fgrep -i -v fgrep | wc} msg set x [lindex $msg 0] - exec sleep 3 + after 3000 catch {exec ps | fgrep -i "sleep" | fgrep -i -v fgrep | wc} msg list $x [lindex $msg 0] } {3 0} -test exec-12.3 {reaping background processes} \ - {exec unix nonPortable} { +test exec-12.3 {reaping background processes} {exec unix nonPortable} { exec sleep 1000 & exec sleep 1000 & set x [exec ps | fgrep "sleep" | fgrep -v fgrep] @@ -492,7 +490,6 @@ test exec-12.3 {reaping background processes} \ } catch {exec ps | fgrep "sleep" | fgrep -v fgrep | wc} msg set x [lindex $msg 0] - foreach i $pids { catch {exec kill -KILL $i} } @@ -513,66 +510,42 @@ test exec-13.3 {setting errorCode variable} {exec} { list $x [string tolower $msg] [lindex $errorCode 0] \ [string tolower [lrange $errorCode 2 end]] } {1 {couldn't execute "_weird_cmd_": no such file or directory} POSIX {{no such file or directory}}} - -test exec-13.4 {extended exit result codes} { - -constraints {win} - -setup { - set tmp [makeFile {exit 0x00000101} tmpfile.exec-13.4] - } - -body { - list [catch {exec [interpreter] $tmp} err]\ - [lreplace $::errorCode 1 1 {}] - } - -cleanup { - removeFile $tmp - } - -result {1 {CHILDSTATUS {} 257}} -} - -test exec-13.5 {extended exit result codes: max value} { - -constraints {win} - -setup { - set tmp [makeFile {exit 0x3fffffff} tmpfile.exec-13.5] - } - -body { - list [catch {exec [interpreter] $tmp} err]\ - [lreplace $::errorCode 1 1 {}] - } - -cleanup { - removeFile $tmp - } - -result {1 {CHILDSTATUS {} 1073741823}} -} - -test exec-13.6 {extended exit result codes: signalled} { - -constraints {win} - -setup { - set tmp [makeFile {exit 0xC0000016} tmpfile.exec-13.6] - } - -body { - list [catch {exec [interpreter] $tmp} err]\ - [lreplace $::errorCode 1 1 {}] - } - -cleanup { - removeFile $tmp - } - -result {1 {CHILDKILLED {} SIGABRT SIGABRT}} -} +test exec-13.4 {extended exit result codes} -setup { + set tmp [makeFile {exit 0x00000101} tmpfile.exec-13.4] +} -constraints {win} -body { + list [catch {exec [interpreter] $tmp} err] [lreplace $::errorCode 1 1 {}] +} -cleanup { + removeFile $tmp +} -result {1 {CHILDSTATUS {} 257}} +test exec-13.5 {extended exit result codes: max value} -setup { + set tmp [makeFile {exit 0x3fffffff} tmpfile.exec-13.5] +} -constraints {win} -body { + list [catch {exec [interpreter] $tmp} err] [lreplace $::errorCode 1 1 {}] +} -cleanup { + removeFile $tmp +} -result {1 {CHILDSTATUS {} 1073741823}} +test exec-13.6 {extended exit result codes: signalled} -setup { + set tmp [makeFile {exit 0xC0000016} tmpfile.exec-13.6] +} -constraints {win} -body { + list [catch {exec [interpreter] $tmp} err] [lreplace $::errorCode 1 1 {}] +} -cleanup { + removeFile $tmp +} -result {1 {CHILDKILLED {} SIGABRT SIGABRT}} # Switches before the first argument test exec-14.1 {-keepnewline switch} {exec} { exec -keepnewline [interpreter] $path(echo) foo } "foo\n" -test exec-14.2 {-keepnewline switch} {exec} { - list [catch {exec -keepnewline} msg] $msg -} {1 {wrong # args: should be "exec ?switches? arg ?arg ...?"}} -test exec-14.3 {unknown switch} {exec} { - list [catch {exec -gorp} msg] $msg -} {1 {bad switch "-gorp": must be -ignorestderr, -keepnewline, or --}} -test exec-14.4 {-- switch} {exec} { - list [catch {exec -- -gorp} msg] [string tolower $msg] -} {1 {couldn't execute "-gorp": no such file or directory}} +test exec-14.2 {-keepnewline switch} -constraints {exec} -body { + exec -keepnewline +} -returnCodes error -result {wrong # args: should be "exec ?switches? arg ?arg ...?"} +test exec-14.3 {unknown switch} -constraints {exec} -body { + exec -gorp +} -returnCodes error -result {bad switch "-gorp": must be -ignorestderr, -keepnewline, or --} +test exec-14.4 {-- switch} -constraints {exec} -body { + exec -- -gorp +} -returnCodes error -result {couldn't execute "-gorp": no such file or directory} test exec-14.5 {-ignorestderr switch} {exec} { # Alas, the use of -ignorestderr is buried here :-( exec [interpreter] $path(sh2) -c [list $path(echo2) foo bar] 2>@1 @@ -587,15 +560,15 @@ test exec-15.1 {standard error redirection} {exec} { } {{} {foo bar}} test exec-15.2 {standard error redirection} {exec stdio} { list [exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" \ - | [interpreter] "$path(echo)" biz baz >$path(gorp.file) 2> "$path(gorp.file2)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file2)"] + | [interpreter] "$path(echo)" biz baz >$path(gorp.file) 2> "$path(gorp.file2)"] \ + [exec [interpreter] "$path(cat)" "$path(gorp.file)"] \ + [exec [interpreter] "$path(cat)" "$path(gorp.file2)"] } {{} {biz baz} {foo bar}} test exec-15.3 {standard error redirection} {exec stdio} { list [exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" \ - | [interpreter] "$path(echo)" biz baz 2>$path(gorp.file) > "$path(gorp.file2)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file2)"] + | [interpreter] "$path(echo)" biz baz 2>$path(gorp.file) > "$path(gorp.file2)"] \ + [exec [interpreter] "$path(cat)" "$path(gorp.file)"] \ + [exec [interpreter] "$path(cat)" "$path(gorp.file2)"] } {{} {foo bar} {biz baz}} test exec-15.4 {standard error redirection} {exec} { set f [open "$path(gorp.file)" w] @@ -604,20 +577,20 @@ test exec-15.4 {standard error redirection} {exec} { exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" 2>@ $f puts $f "Line 3" close $f - exec [interpreter] "$path(cat)" "$path(gorp.file)" + readfile $path(gorp.file) } {Line 1 foo bar Line 3} test exec-15.5 {standard error redirection} {exec} { exec [interpreter] "$path(echo)" "First line" > "$path(gorp.file)" exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" 2>> "$path(gorp.file)" - exec [interpreter] "$path(cat)" "$path(gorp.file)" + readfile $path(gorp.file) } {First line foo bar} test exec-15.6 {standard error redirection} {exec stdio} { exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" > "$path(gorp.file2)" 2> "$path(gorp.file)" \ >& "$path(gorp.file)" 2> "$path(gorp.file2)" | [interpreter] "$path(echo)" biz baz - list [exec [interpreter] "$path(cat)" "$path(gorp.file)"] [exec [interpreter] "$path(cat)" "$path(gorp.file2)"] + list [readfile $path(gorp.file)] [readfile $path(gorp.file2)] } {{biz baz} {foo bar}} test exec-15.7 {standard error redirection 2>@1} {exec stdio} { # This redirects stderr output into normal result output from exec @@ -630,7 +603,7 @@ test exec-16.1 {flush output before exec} {exec} { exec [interpreter] $path(echo) "Second line" >@ $f puts $f "Third line" close $f - exec [interpreter] $path(cat) $path(gorp.file) + readfile $path(gorp.file) } {First line Second line Third line} @@ -640,75 +613,66 @@ test exec-16.2 {flush output before exec} {exec} { exec [interpreter] << {puts stderr {Second line}} >&@ $f > $path(gorp.file2) puts $f "Third line" close $f - exec [interpreter] $path(cat) $path(gorp.file) + readfile $path(gorp.file) } {First line Second line Third line} -set path(script) [makeFile {} script] - -test exec-17.1 { inheriting standard I/O } {exec} { +test exec-17.1 { inheriting standard I/O } -constraints {exec} -setup { + set path(script) [makeFile {} script] set f [open $path(script) w] - puts -nonewline $f {close stdout - set f [} - puts $f [list open $path(gorp.file) w]] - puts $f [list catch \ - [list exec [info nameofexecutable] $path(echo) foobar &]] - puts $f [list exec [info nameofexecutable] $path(sleep) 2] - puts $f {close $f} + puts $f [list lassign [list \ + [info nameofexecutable] $path(gorp.file) $path(echo) $path(sleep) \ + ] exe file echo sleep] + puts $f { + close stdout + set f [open $file w] + catch {exec $exe $echo foobar &} + exec $exe $sleep 2 + close $f + } close $f +} -body { catch {exec [interpreter] $path(script)} result - set f [open $path(gorp.file) r] - lappend result [read $f] - close $f - set result -} {{foobar -}} + list $result [readfile $path(gorp.file)] +} -cleanup { + removeFile $path(script) +} -result {{} foobar} -test exec-18.1 { exec cat deals with weird file names} {exec tempNotWin} { +test exec-18.1 { exec cat deals with weird file names} -body { # This is cross-platform, but the cat isn't predictably correct on # Windows. - set f "foo\[\{blah" - set path(fooblah) [makeFile {} $f] - set fout [open $path(fooblah) w] - puts $fout "contents" - close $fout - set res [list [catch {exec cat $path(fooblah)} msg] $msg] - removeFile $f - set res -} {0 contents} + set path(fooblah) [makeFile {contents} "foo\[\{blah"] + exec cat $path(fooblah) +} -constraints {exec tempNotWin} -cleanup { + removeFile $path(fooblah) +} -result contents # Note that this test cannot be adapted to work on Windows; that platform has # no kernel support for an analog of O_APPEND. -test exec-19.1 {exec >> uses O_APPEND} { - -constraints {exec unix} - -setup { - set tmpfile [makeFile {0} tmpfile.exec-19.1] - } - -body { - # Note that we have to allow for the current contents of the - # temporary file, which is why the result is 14 and not 12 - exec /bin/sh -c \ +test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup { + set tmpfile [makeFile {0} tmpfile.exec-19.1] +} -body { + # Note that we have to allow for the current contents of the temporary + # file, which is why the result is 14 and not 12 + exec /bin/sh -c \ {for a in 1 2 3; do sleep 1; echo $a; done} >>$tmpfile & - exec /bin/sh -c \ + exec /bin/sh -c \ {for a in a b c; do sleep 1; echo $a; done} >>$tmpfile & - # The above two shell invokations take about 3 seconds to - # finish, so allow 5s (in case the machine is busy) - after 5000 - # Check that no bytes have got lost through mixups with - # overlapping appends, which is only guaranteed to work when - # we set O_APPEND on the file descriptor in the [exec >>...] - file size $tmpfile - } - -cleanup { - removeFile $tmpfile - } - -result 14 -} + # The above two shell invokations take about 3 seconds to finish, so allow + # 5s (in case the machine is busy) + after 5000 + # Check that no bytes have got lost through mixups with overlapping + # appends, which is only guaranteed to work when we set O_APPEND on the + # file descriptor in the [exec >>...] + file size $tmpfile +} -cleanup { + removeFile $tmpfile +} -result 14 # cleanup -foreach file {script gorp.file gorp.file2 echo echo2 cat wc sh sh2 sleep exit err} { +foreach file {gorp.file gorp.file2 echo echo2 cat wc sh sh2 sleep exit err} { removeFile $file } unset -nocomplain path -- cgit v0.12 From 408b3815ace54fe1580fe6b3c0aea3403732edf1 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 19 Jul 2008 21:47:53 +0000 Subject: Fix miguel's problem with env failures; need LANG to get [encoding system] right in subprocesses... --- ChangeLog | 4 ++++ tests/env.test | 62 ++++++++++++++++++++++++++++++---------------------------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index e22f543..d7c0068 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-19 Donal K. Fellows + * tests/env.test: Add LANG to the list of variables that are not + touched by the environment variable tests, so that subprocesses can + get their system encoding correct. + * tests/exec.test, tests/env.test: Rewrite so that non-ASCII characters are not used in the final comparison. Part of fixing [Bug 1513659]. diff --git a/tests/env.test b/tests/env.test index 2d4dc8a..043748a 100644 --- a/tests/env.test +++ b/tests/env.test @@ -1,17 +1,17 @@ # Commands covered: none (tests environment variable implementation) # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: env.test,v 1.29 2008/07/19 09:57:37 dkf Exp $ +# RCS: @(#) $Id: env.test,v 1.30 2008/07/19 21:47:55 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -23,9 +23,8 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint exec [llength [info commands exec]] # -# These tests will run on any platform (and indeed crashed -# on the Mac). So put them before you test for the existance -# of exec. +# These tests will run on any platform (and indeed crashed on the Mac). So put +# them before you test for the existance of exec. # test env-1.1 {propagation of env values to child interpreters} -setup { catch {interp delete child} @@ -39,8 +38,8 @@ test env-1.1 {propagation of env values to child interpreters} -setup { unset env(test) } -result {garbage} # -# This one crashed on Solaris under Tcl8.0, so we only -# want to make sure it runs. +# This one crashed on Solaris under Tcl8.0, so we only want to make sure it +# runs. # test env-1.2 {lappend to env value} -setup { catch {unset env(test)} @@ -80,7 +79,7 @@ set printenvScript [makeFile { } set names [lsort [array names env]] - if {$tcl_platform(platform) == "windows"} { + if {$tcl_platform(platform) eq "windows"} { lrem names HOME lrem names COMSPEC lrem names ComSpec @@ -90,7 +89,7 @@ set printenvScript [makeFile { TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH PURE_PROG_NAME DISPLAY SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING - __CF_USER_TEXT_ENCODING SECURITYSESSIONID + __CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG } { lrem names $name } @@ -99,12 +98,12 @@ set printenvScript [makeFile { } exit } printenv] -# [exec] is required here to see the actual environment received -# by child processes. +# [exec] is required here to see the actual environment received by child +# processes. proc getenv {} { global printenvScript tcltest catch {exec [interpreter] $printenvScript} out - if {$out == "child process exited abnormally"} { + if {$out eq "child process exited abnormally"} { set out {} } return $out @@ -114,13 +113,13 @@ proc getenv {} { set env2 [array get env] foreach name [array names env] { - # Keep some environment variables that support operation of the - # tcltest package. + # Keep some environment variables that support operation of the tcltest + # package. if {[string toupper $name] ni { - TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH DISPLAY SHLIB_PATH - SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH - DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING - SECURITYSESSIONID + TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH DISPLAY SHLIB_PATH + SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH + DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING + SECURITYSESSIONID LANG }} { unset env($name) } @@ -190,10 +189,9 @@ test env-5.0 {corner cases - set a value, it should exist} -body { test env-5.1 {corner cases - remove one elem at a time} -setup { set x [array get env] } -body { - # When no environment variables exist, the env var will - # contain no entries. The "array names" call synchs up - # the C-level environ array with the Tcl level env array. - # Make sure an empty Tcl array is created. + # When no environment variables exist, the env var will contain no + # entries. The "array names" call synchs up the C-level environ array with + # the Tcl level env array. Make sure an empty Tcl array is created. foreach e [array names env] { unset env($e) } @@ -204,8 +202,8 @@ test env-5.1 {corner cases - remove one elem at a time} -setup { test env-5.2 {corner cases - unset the env array} -setup { interp create i } -body { - # Unsetting a variable in an interp detaches the C-level - # traces from the Tcl "env" variable. + # Unsetting a variable in an interp detaches the C-level traces from the + # Tcl "env" variable. i eval { unset env set env(THIS_SHOULDNT_EXIST) a @@ -217,8 +215,8 @@ test env-5.2 {corner cases - unset the env array} -setup { test env-5.3 {corner cases - unset the env in master should unset child} -setup { interp create i } -body { - # Variables deleted in a master interp should be deleted in - # child interp too. + # Variables deleted in a master interp should be deleted in child interp + # too. i eval { set env(THIS_SHOULD_EXIST) a} set result [set env(THIS_SHOULD_EXIST)] unset env(THIS_SHOULD_EXIST) @@ -262,3 +260,7 @@ array set env $env2 removeFile $printenvScript ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 9c9a7764a3a00160ff48011547624ecf659a3dc9 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 19 Jul 2008 22:16:57 +0000 Subject: Fix a gcc warning when compiling Tcl with mingw32 tclWinTest.c: In function `TestplatformChmod': tclWinTest.c:706: warning: dereferencing type-punned pointer will break strict-a liasing rules --- win/tclWinTest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 946f179..eb2ccf8 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTest.c,v 1.22 2007/12/13 15:28:44 dgp Exp $ + * RCS: @(#) $Id: tclWinTest.c,v 1.23 2008/07/19 22:16:57 nijtmans Exp $ */ #include "tclInt.h" @@ -700,10 +700,10 @@ TestplatformChmod( acl_readOnly_found = FALSE; for (j = 0; j < ACLSize.AceCount; j++) { - PACL *pACE2; + LPVOID pACE2; ACE_HEADER *phACE2; - if (!getAceProc(curAcl, j, (LPVOID *) &pACE2)) { + if (!getAceProc(curAcl, j, &pACE2)) { goto done; } @@ -736,7 +736,7 @@ TestplatformChmod( * Copy the current ACE from the old to the new ACL. */ - if (!addAceProc(newAcl, ACL_REVISION, MAXDWORD, pACE2, + if (!addAceProc(newAcl, ACL_REVISION, MAXDWORD, (PACL *) pACE2, ((PACE_HEADER) pACE2)->AceSize)) { goto done; } -- cgit v0.12 From 421f74b6e684727db193b1b1fc1e3a9649f86f58 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 19 Jul 2008 22:50:38 +0000 Subject: fix [2021443] inconsistant "wrong # args" messages --- generic/tclBinary.c | 6 +++--- generic/tclCmdAH.c | 4 ++-- generic/tclConfig.c | 4 ++-- generic/tclDictObj.c | 6 +++--- generic/tclInterp.c | 6 +++--- generic/tclNamesp.c | 6 +++--- generic/tclPkg.c | 6 +++--- generic/tclProc.c | 6 +++--- generic/tclScan.c | 6 +++--- generic/tclTest.c | 6 +++--- generic/tclTestObj.c | 4 ++-- generic/tclThreadTest.c | 4 ++-- generic/tclTimer.c | 6 +++--- generic/tclTrace.c | 6 +++--- generic/tclVar.c | 6 +++--- tests/append.test | 6 +++--- tests/appendComp.test | 6 +++--- tests/apply.test | 4 ++-- tests/binary.test | 8 ++++---- tests/chan.test | 4 ++-- tests/config.test | 6 +++--- tests/dict.test | 8 ++++---- tests/format.test | 4 ++-- tests/info.test | 4 ++-- tests/interp.test | 4 ++-- tests/ioCmd.test | 4 ++-- tests/ioTrans.test | 4 ++-- tests/namespace.test | 6 +++--- tests/oo.test | 6 +++--- tests/pkg.test | 6 +++--- tests/proc-old.test | 6 +++--- tests/registry.test | 4 ++-- tests/scan.test | 8 ++++---- tests/set-old.test | 4 ++-- tests/string.test | 4 ++-- tests/stringComp.test | 4 ++-- tests/thread.test | 4 ++-- tests/timer.test | 6 +++--- tests/tm.test | 6 +++--- tests/trace.test | 8 ++++---- win/tclWinReg.c | 4 ++-- 41 files changed, 110 insertions(+), 110 deletions(-) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 7a3473d..996812b 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.45 2008/06/05 00:02:38 das Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.46 2008/07/19 22:50:42 nijtmans Exp $ */ #include "tclInt.h" @@ -735,7 +735,7 @@ BinaryFormatCmd( int offset, size, length; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "formatString ?arg arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "formatString ?arg ...?"); return TCL_ERROR; } @@ -1241,7 +1241,7 @@ BinaryScanCmd( if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, - "value formatString ?varName varName ...?"); + "value formatString ?varName ...?"); return TCL_ERROR; } numberCachePtr = &numberCacheHash; diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 1b90331..048f80f 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.96 2008/07/13 09:03:33 msofer Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.97 2008/07/19 22:50:43 nijtmans Exp $ */ #include "tclInt.h" @@ -1876,7 +1876,7 @@ Tcl_FormatObjCmd( Tcl_Obj *resultPtr; /* Where result is stored finally. */ if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "formatString ?arg arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "formatString ?arg ...?"); return TCL_ERROR; } diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 69306c3..a810521 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.20 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.21 2008/07/19 22:50:40 nijtmans Exp $ */ #include "tclInt.h" @@ -222,7 +222,7 @@ QueryConfigObjCmd( }; if ((objc < 2) || (objc > 3)) { - Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?argument?"); + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], subcmdStrings, "subcommand", 0, diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index b75c92c..2694cf8 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.64 2008/07/18 23:29:42 msofer Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.65 2008/07/19 22:50:42 nijtmans Exp $ */ #include "tclInt.h" @@ -1553,7 +1553,7 @@ DictGetCmd( int result; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key key ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key ...?"); return TCL_ERROR; } @@ -2645,7 +2645,7 @@ DictFilterCmd( char *pattern; if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "dictionary filterType ..."); + Tcl_WrongNumArgs(interp, 1, objv, "dictionary filterType ?arg ...?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[2], filters, "filterType", diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 4412aa8..b4b89a4 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.90 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.91 2008/07/19 22:50:40 nijtmans Exp $ */ #include "tclInt.h" @@ -591,7 +591,7 @@ Tcl_InterpObjCmd( if (objc < 4) { aliasArgs: Tcl_WrongNumArgs(interp, 2, objv, - "slavePath slaveCmd ?masterPath masterCmd? ?args ..?"); + "slavePath slaveCmd ?masterPath masterCmd? ?arg ...?"); return TCL_ERROR; } slaveInterp = GetInterp(interp, objv[2]); @@ -2408,7 +2408,7 @@ SlaveObjCmd( objv[3], objc - 4, objv + 4); } } - Tcl_WrongNumArgs(interp, 2, objv, "aliasName ?targetName? ?args..?"); + Tcl_WrongNumArgs(interp, 2, objv, "aliasName ?targetName? ?arg ...?"); return TCL_ERROR; case OPT_ALIASES: if (objc != 2) { diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index b7cd491..f657e75 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.168 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.169 2008/07/19 22:50:41 nijtmans Exp $ */ #include "tclInt.h" @@ -5006,7 +5006,7 @@ NamespaceEnsembleCmd( case ENS_CONFIG: if (objc < 4 || (objc != 5 && objc & 1)) { - Tcl_WrongNumArgs(interp, 3, objv, "cmdname ?opt? ?value? ..."); + Tcl_WrongNumArgs(interp, 3, objv, "cmdname ?-option value ...? ?arg ...?"); return TCL_ERROR; } token = Tcl_FindEnsemble(interp, objv[3], TCL_LEAVE_ERR_MSG); @@ -6069,7 +6069,7 @@ NsEnsembleImplementationCmdNR( int reparseCount = 0; /* Number of reparses. */ if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?argument ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); return TCL_ERROR; } diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 8756587..346d113 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.36 2008/07/13 23:15:22 nijtmans Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.37 2008/07/19 22:50:39 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -763,7 +763,7 @@ Tcl_PackageObjCmd( char *argv2, *argv3, *argv4, *iva = NULL, *ivb = NULL; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); return TCL_ERROR; } @@ -1100,7 +1100,7 @@ Tcl_PackageObjCmd( if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv, - "version requirement requirement..."); + "version ?requirement ...?"); return TCL_ERROR; } diff --git a/generic/tclProc.c b/generic/tclProc.c index ddfb43b..187c789 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.148 2008/07/18 23:29:45 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.149 2008/07/19 22:50:41 nijtmans Exp $ */ #include "tclInt.h" @@ -1103,7 +1103,7 @@ ProcWrongNumArgs( Tcl_AppendStringsToObj(argObj, "?", TclGetString(namePtr), "?", NULL); } else if (defPtr->flags & VAR_IS_ARGS) { numArgs--; - final = "..."; + final = "?arg ...?"; break; } else { argObj = namePtr; @@ -2722,7 +2722,7 @@ TclNRApplyObjCmd( ApplyExtraData *extraPtr; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "lambdaExpr ?arg1 arg2 ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "lambdaExpr ?arg ...?"); return TCL_ERROR; } diff --git a/generic/tclScan.c b/generic/tclScan.c index ee59260..a732b67 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.28 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.29 2008/07/19 22:50:42 nijtmans Exp $ */ #include "tclInt.h" @@ -575,7 +575,7 @@ Tcl_ScanObjCmd( if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, - "string format ?varName varName ...?"); + "string format ?varName ...?"); return TCL_ERROR; } @@ -1037,7 +1037,7 @@ Tcl_ScanObjCmd( } return code; } - + /* * Local Variables: * mode: c diff --git a/generic/tclTest.c b/generic/tclTest.c index a810a55..ec7eb65 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.115 2008/04/21 16:26:38 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.116 2008/07/19 22:50:41 nijtmans Exp $ */ #define TCL_TEST @@ -1979,7 +1979,7 @@ TesteventObjCmd( TestEvent *ev; /* Event to be queued */ if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?args?"); + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], subcommands, "subcommand", @@ -4272,7 +4272,7 @@ TestfeventCmd( if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], - " option ?arg arg ...?", NULL); + " option ?arg ...?", NULL); return TCL_ERROR; } if (strcmp(argv[1], "cmd") == 0) { diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 2aca3ca..b39b81d 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.22 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.23 2008/07/19 22:50:43 nijtmans Exp $ */ #include "tclInt.h" @@ -141,7 +141,7 @@ TestbignumobjCmd( mp_int bignumValue, newValue; if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?..."); + Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], subcmds, "option", 0, diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index cbc48de..74398fe 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.25 2008/06/13 05:45:14 mistachkin Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.26 2008/07/19 22:50:42 nijtmans Exp $ */ #include "tclInt.h" @@ -231,7 +231,7 @@ Tcl_ThreadObjCmd( }; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?args?"); + Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], threadOptions, "option", 0, diff --git a/generic/tclTimer.c b/generic/tclTimer.c index db9f6a8..704d2bb 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.33 2008/06/13 05:45:14 mistachkin Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.34 2008/07/19 22:50:42 nijtmans Exp $ */ #include "tclInt.h" @@ -793,7 +793,7 @@ Tcl_AfterObjCmd( ThreadSpecificData *tsdPtr = InitTimer(); if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); return TCL_ERROR; } @@ -923,7 +923,7 @@ Tcl_AfterObjCmd( } case AFTER_IDLE: if (objc < 3) { - Tcl_WrongNumArgs(interp, 2, objv, "script script ..."); + Tcl_WrongNumArgs(interp, 2, objv, "script ?script ...?"); return TCL_ERROR; } afterPtr = (AfterInfo *) ckalloc((unsigned) (sizeof(AfterInfo))); diff --git a/generic/tclTrace.c b/generic/tclTrace.c index c7aa4d2..b15b671 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.48 2008/05/30 22:54:29 dkf Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.49 2008/07/19 22:50:42 nijtmans Exp $ */ #include "tclInt.h" @@ -211,7 +211,7 @@ Tcl_TraceObjCmd( }; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); return TCL_ERROR; } @@ -231,7 +231,7 @@ Tcl_TraceObjCmd( int typeIndex; if (objc < 3) { - Tcl_WrongNumArgs(interp, 2, objv, "type ?arg arg ...?"); + Tcl_WrongNumArgs(interp, 2, objv, "type ?arg ...?"); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[2], traceTypeOptions, "option", diff --git a/generic/tclVar.c b/generic/tclVar.c index 8670c24..dd4ac10 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.164 2008/07/14 01:27:25 msofer Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.165 2008/07/19 22:50:42 nijtmans Exp $ */ #include "tclInt.h" @@ -2514,7 +2514,7 @@ Tcl_AppendObjCmd( int i; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "varName ?value value ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "varName ?value ...?"); return TCL_ERROR; } @@ -2579,7 +2579,7 @@ Tcl_LappendObjCmd( int result; if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "varName ?value value ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "varName ?value ...?"); return TCL_ERROR; } if (objc == 2) { diff --git a/tests/append.test b/tests/append.test index 62240cd..14377fa 100644 --- a/tests/append.test +++ b/tests/append.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: append.test,v 1.9 2006/12/17 03:44:20 das Exp $ +# RCS: @(#) $Id: append.test,v 1.10 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -46,7 +46,7 @@ test append-2.1 {long appends} { test append-3.1 {append errors} { list [catch {append} msg] $msg -} {1 {wrong # args: should be "append varName ?value value ...?"}} +} {1 {wrong # args: should be "append varName ?value ...?"}} test append-3.2 {append errors} { set x "" list [catch {append x(0) 44} msg] $msg @@ -177,7 +177,7 @@ test append-5.1 {long lappends} { test append-6.1 {lappend errors} { list [catch {lappend} msg] $msg -} {1 {wrong # args: should be "lappend varName ?value value ...?"}} +} {1 {wrong # args: should be "lappend varName ?value ...?"}} test append-6.2 {lappend errors} { set x "" list [catch {lappend x(0) 44} msg] $msg diff --git a/tests/appendComp.test b/tests/appendComp.test index c946d35..dd0b4d0 100644 --- a/tests/appendComp.test +++ b/tests/appendComp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: appendComp.test,v 1.9 2005/05/10 18:34:56 kennykb Exp $ +# RCS: @(#) $Id: appendComp.test,v 1.10 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -57,7 +57,7 @@ test appendComp-2.1 {long appends} { test appendComp-3.1 {append errors} { proc foo {} {append} list [catch {foo} msg] $msg -} {1 {wrong # args: should be "append varName ?value value ...?"}} +} {1 {wrong # args: should be "append varName ?value ...?"}} test appendComp-3.2 {append errors} { proc foo {} { set x "" @@ -232,7 +232,7 @@ test appendComp-5.1 {long lappends} { test appendComp-6.1 {lappend errors} { proc foo {} {lappend} list [catch {foo} msg] $msg -} {1 {wrong # args: should be "lappend varName ?value value ...?"}} +} {1 {wrong # args: should be "lappend varName ?value ...?"}} test appendComp-6.2 {lappend errors} { proc foo {} { set x "" diff --git a/tests/apply.test b/tests/apply.test index 8c12216..95f4fd8 100644 --- a/tests/apply.test +++ b/tests/apply.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: apply.test,v 1.12 2007/12/13 15:26:04 dgp Exp $ +# RCS: @(#) $Id: apply.test,v 1.13 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.2 @@ -30,7 +30,7 @@ testConstraint memory [llength [info commands memory]] test apply-1.1 {too few arguments} { set res [catch apply msg] list $res $msg -} {1 {wrong # args: should be "apply lambdaExpr ?arg1 arg2 ...?"}} +} {1 {wrong # args: should be "apply lambdaExpr ?arg ...?"}} # Tests for malformed lambda diff --git a/tests/binary.test b/tests/binary.test index 77306b4..2f71866 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.34 2008/06/03 23:52:51 patthoyts Exp $ +# RCS: @(#) $Id: binary.test,v 1.35 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -39,7 +39,7 @@ test binary-1.2 {Tcl_BinaryObjCmd: bad args} -body { test binary-1.3 {Tcl_BinaryObjCmd: format error} -body { binary f } -returnCodes error \ - -result {wrong # args: should be "binary format formatString ?arg arg ...?"} + -result {wrong # args: should be "binary format formatString ?arg ...?"} test binary-1.4 {Tcl_BinaryObjCmd: format} -body { binary format "" } -result {} @@ -592,10 +592,10 @@ test binary-18.1 {Tcl_BinaryObjCmd: format} { test binary-19.1 {Tcl_BinaryObjCmd: errors} { list [catch {binary s} msg] $msg -} {1 {wrong # args: should be "binary scan value formatString ?varName varName ...?"}} +} {1 {wrong # args: should be "binary scan value formatString ?varName ...?"}} test binary-19.2 {Tcl_BinaryObjCmd: errors} { list [catch {binary scan foo} msg] $msg -} {1 {wrong # args: should be "binary scan value formatString ?varName varName ...?"}} +} {1 {wrong # args: should be "binary scan value formatString ?varName ...?"}} test binary-19.3 {Tcl_BinaryObjCmd: scan} { binary scan {} {} } 0 diff --git a/tests/chan.test b/tests/chan.test index ea2529c..b047883 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chan.test,v 1.13 2008/07/13 23:15:22 nijtmans Exp $ +# RCS: @(#) $Id: chan.test,v 1.14 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -21,7 +21,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { test chan-1.1 {chan command general syntax} -body { chan -} -returnCodes error -result "wrong # args: should be \"chan subcommand ?argument ...?\"" +} -returnCodes error -result "wrong # args: should be \"chan subcommand ?arg ...?\"" test chan-1.2 {chan command general syntax} -body { chan FOOBAR } -returnCodes error -result "unknown or ambiguous subcommand \"FOOBAR\": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, pop, postevent, push, puts, read, seek, tell, or truncate" diff --git a/tests/config.test b/tests/config.test index 2023d9c..cc951fb 100644 --- a/tests/config.test +++ b/tests/config.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: config.test,v 1.4 2004/10/29 15:39:10 dkf Exp $ +# RCS: @(#) $Id: config.test,v 1.5 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -35,7 +35,7 @@ test pkgconfig-1.3 {query value multiple times} { test pkgconfig-2.0 {error: missing subcommand} { catch {::tcl::pkgconfig} msg set msg -} {wrong # args: should be "::tcl::pkgconfig subcommand ?argument?"} +} {wrong # args: should be "::tcl::pkgconfig subcommand ?arg?"} test pkgconfig-2.1 {error: illegal subcommand} { catch {::tcl::pkgconfig foo} msg set msg @@ -55,7 +55,7 @@ test pkgconfig-2.4 {error: query unknown key} { test pkgconfig-2.5 {error: query with to many arguments} { catch {::tcl::pkgconfig get foo bar} msg set msg -} {wrong # args: should be "::tcl::pkgconfig subcommand ?argument?"} +} {wrong # args: should be "::tcl::pkgconfig subcommand ?arg?"} # cleanup ::tcltest::cleanupTests diff --git a/tests/dict.test b/tests/dict.test index d3373e2..e8fe560 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.29 2008/05/09 03:51:33 kennykb Exp $ +# RCS: @(#) $Id: dict.test,v 1.30 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35,7 +35,7 @@ proc getOrder {dictVal args} { test dict-1.1 {dict command basic syntax} -returnCodes error -body { dict -} -result {wrong # args: should be "dict subcommand ?argument ...?"} +} -result {wrong # args: should be "dict subcommand ?arg ...?"} test dict-1.2 {dict command basic syntax} -returnCodes error -body { dict ? } -match glob -result {unknown or ambiguous subcommand "?": must be *} @@ -99,7 +99,7 @@ test dict-3.10 {dict get command} -returnCodes error -body { test dict-3.11 {dict get command} {dict get [dict create a b c d] a} b test dict-3.12 {dict get command} -returnCodes error -body { dict get -} -result {wrong # args: should be "dict get dictionary ?key key ...?"} +} -result {wrong # args: should be "dict get dictionary ?key ...?"} test dict-3.13 {dict get command} { set dict [dict get {a b c d}] if {$dict eq "a b c d"} { @@ -764,7 +764,7 @@ test dict-17.20 {dict filter command: script} -returnCodes error -body { } -result {unmatched open brace in list} test dict-17.21 {dict filter command} -returnCodes error -body { dict filter {a b} -} -result {wrong # args: should be "dict filter dictionary filterType ..."} +} -result {wrong # args: should be "dict filter dictionary filterType ?arg ...?"} test dict-17.22 {dict filter command} -returnCodes error -body { dict filter {a b} JUNK } -result {bad filterType "JUNK": must be key, script, or value} diff --git a/tests/format.test b/tests/format.test index a985eeb..1b8869a 100644 --- a/tests/format.test +++ b/tests/format.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: format.test,v 1.26 2008/04/07 15:23:11 rmax Exp $ +# RCS: @(#) $Id: format.test,v 1.27 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -288,7 +288,7 @@ test format-8.1 {error conditions} { test format-8.2 {error conditions} { catch format msg set msg -} {wrong # args: should be "format formatString ?arg arg ...?"} +} {wrong # args: should be "format formatString ?arg ...?"} test format-8.3 {error conditions} { catch {format %*d} } 1 diff --git a/tests/info.test b/tests/info.test index 54a548a..a83a1fc 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.49 2008/06/16 19:59:04 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.50 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -672,7 +672,7 @@ test info-20.5 {info functions option} -returnCodes error -body { test info-21.1 {miscellaneous error conditions} -returnCodes error -body { info -} -result {wrong # args: should be "info subcommand ?argument ...?"} +} -result {wrong # args: should be "info subcommand ?arg ...?"} test info-21.2 {miscellaneous error conditions} -returnCodes error -body { info gorp } -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} diff --git a/tests/interp.test b/tests/interp.test index c47b8a7..33dfda9 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.59 2008/07/13 23:15:22 nijtmans Exp $ +# RCS: @(#) $Id: interp.test,v 1.60 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -275,7 +275,7 @@ test interp-8.2 {testing basic alias invocation} { test interp-8.3 {testing basic alias invocation} { catch {interp create a} list [catch {a alias} msg] $msg -} {1 {wrong # args: should be "a alias aliasName ?targetName? ?args..?"}} +} {1 {wrong # args: should be "a alias aliasName ?targetName? ?arg ...?"}} # Part 8: Testing aliases for non-existent or hidden targets test interp-9.1 {testing aliases for non-existent targets} { diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 47c8daa..9648843 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.44 2008/07/13 23:15:21 nijtmans Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.45 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -637,7 +637,7 @@ close $wfile test iocmd-20.0 {chan, wrong#args} { catch {chan} msg set msg -} {wrong # args: should be "chan subcommand ?argument ...?"} +} {wrong # args: should be "chan subcommand ?arg ...?"} test iocmd-20.1 {chan, unknown method} { catch {chan foo} msg set msg diff --git a/tests/ioTrans.test b/tests/ioTrans.test index 6298af0..e7c7d72 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioTrans.test,v 1.4 2008/06/20 20:48:49 dgp Exp $ +# RCS: @(#) $Id: ioTrans.test,v 1.5 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -115,7 +115,7 @@ eval $helperscript test iortrans-1.0 {chan, wrong#args} { catch {chan} msg set msg -} {wrong # args: should be "chan subcommand ?argument ...?"} +} {wrong # args: should be "chan subcommand ?arg ...?"} test iortrans-1.1 {chan, unknown method} { catch {chan foo} msg set msg diff --git a/tests/namespace.test b/tests/namespace.test index f88e93c..a0035e6 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.72 2008/06/20 20:48:49 dgp Exp $ +# RCS: @(#) $Id: namespace.test,v 1.73 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1764,7 +1764,7 @@ test namespace-46.3 {ensemble: implementation errors} { lappend result $ns::count namespace delete ns lappend result [info command p] -} {1 {wrong # args: should be "ns subcommand ?argument ...?"} 10 3010 3010 {}} +} {1 {wrong # args: should be "ns subcommand ?arg ...?"} 10 3010 3010 {}} test namespace-46.4 {ensemble: implementation errors} { namespace eval ns { namespace ensemble create @@ -2045,7 +2045,7 @@ test namespace-50.1 {ensembles affect proc arguments error messages} -body { namespace ens cre -command a -map {b {bb foo}} proc bb {c d {e f} args} {list $c $args} a b -} -returnCodes error -result "wrong # args: should be \"a b d ?e? ...\"" -cleanup { +} -returnCodes error -result "wrong # args: should be \"a b d ?e? ?arg ...?\"" -cleanup { rename a {} rename bb {} } diff --git a/tests/oo.test b/tests/oo.test index 3f9fa94..f9b7be4 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.7 2008/06/19 21:29:04 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.8 2008/07/19 22:50:39 nijtmans Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1117,7 +1117,7 @@ test oo-15.3 {OO: class cloning} { test oo-16.1 {OO: object introspection} -body { info object -} -returnCodes 1 -result "wrong \# args: should be \"info object subcommand ?argument ...?\"" +} -returnCodes 1 -result "wrong \# args: should be \"info object subcommand ?arg ...?\"" test oo-16.2 {OO: object introspection} -body { info object class NOTANOBJECT } -returnCodes 1 -result {NOTANOBJECT does not refer to an object} @@ -1215,7 +1215,7 @@ test oo-16.11 {OO: object introspection} -setup { test oo-17.1 {OO: class introspection} -body { info class -} -returnCodes 1 -result "wrong \# args: should be \"info class subcommand ?argument ...?\"" +} -returnCodes 1 -result "wrong \# args: should be \"info class subcommand ?arg ...?\"" test oo-17.2 {OO: class introspection} -body { info class superclass NOTANOBJECT } -returnCodes 1 -result {NOTANOBJECT does not refer to an object} diff --git a/tests/pkg.test b/tests/pkg.test index 1d94cb3..4f92d4c 100644 --- a/tests/pkg.test +++ b/tests/pkg.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: pkg.test,v 1.30 2008/07/13 23:15:21 nijtmans Exp $ +# RCS: @(#) $Id: pkg.test,v 1.31 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -525,7 +525,7 @@ test pkg-2.52 {Tcl_PkgRequire procedure, picking best stable version} { test pkg-3.1 {Tcl_PackageCmd procedure} { list [catch {package} msg] $msg -} {1 {wrong # args: should be "package option ?arg arg ...?"}} +} {1 {wrong # args: should be "package option ?arg ...?"}} test pkg-3.2 {Tcl_PackageCmd procedure, "forget" option} { foreach i [package names] { package forget $i @@ -735,7 +735,7 @@ test pkg-3.46 {Tcl_PackageCmd procedure, "versions" option} { } {2.3 2.4} test pkg-3.47 {Tcl_PackageCmd procedure, "vsatisfies" option} { list [catch {package vsatisfies a} msg] $msg -} {1 {wrong # args: should be "package vsatisfies version requirement requirement..."}} +} {1 {wrong # args: should be "package vsatisfies version ?requirement ...?"}} test pkg-3.49 {Tcl_PackageCmd procedure, "vsatisfies" option} { list [catch {package vsatisfies x.y 3.4} msg] $msg diff --git a/tests/proc-old.test b/tests/proc-old.test index 7e2a067..d0a116e 100644 --- a/tests/proc-old.test +++ b/tests/proc-old.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: proc-old.test,v 1.15 2006/10/09 19:15:45 msofer Exp $ +# RCS: @(#) $Id: proc-old.test,v 1.16 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -233,7 +233,7 @@ test proc-old-30.12 {arguments and defaults} { return [list $x $y $args] } list [catch {tproc} msg] $msg -} {1 {wrong # args: should be "tproc x ?y? ..."}} +} {1 {wrong # args: should be "tproc x ?y? ?arg ...?"}} test proc-old-4.1 {variable numbers of arguments} { proc tproc args {return $args} @@ -258,7 +258,7 @@ test proc-old-4.5 {variable numbers of arguments} { test proc-old-4.6 {variable numbers of arguments} { proc tproc {x missing args} {return $args} list [catch {tproc 1} msg] $msg -} {1 {wrong # args: should be "tproc x missing ..."}} +} {1 {wrong # args: should be "tproc x missing ?arg ...?"}} test proc-old-5.1 {error conditions} { list [catch {proc} msg] $msg diff --git a/tests/registry.test b/tests/registry.test index a2329b2..bf32e68 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -10,7 +10,7 @@ # Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# RCS: @(#) $Id: registry.test,v 1.21 2007/04/20 13:39:04 dkf Exp $ +# RCS: @(#) $Id: registry.test,v 1.22 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -38,7 +38,7 @@ testConstraint english [expr { test registry-1.1 {argument parsing for registry command} {win reg} { list [catch {registry} msg] $msg -} {1 {wrong # args: should be "registry option ?arg arg ...?"}} +} {1 {wrong # args: should be "registry option ?arg ...?"}} test registry-1.2 {argument parsing for registry command} {win reg} { list [catch {registry foo} msg] $msg } {1 {bad option "foo": must be broadcast, delete, get, keys, set, type, or values}} diff --git a/tests/scan.test b/tests/scan.test index 2a07f4b..ef40d4b 100644 --- a/tests/scan.test +++ b/tests/scan.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: scan.test,v 1.21 2006/04/25 17:15:25 dgp Exp $ +# RCS: @(#) $Id: scan.test,v 1.22 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -100,10 +100,10 @@ test scan-3.13 {ValidateFormat} { test scan-4.1 {Tcl_ScanObjCmd, argument checks} { list [catch {scan} msg] $msg -} {1 {wrong # args: should be "scan string format ?varName varName ...?"}} +} {1 {wrong # args: should be "scan string format ?varName ...?"}} test scan-4.2 {Tcl_ScanObjCmd, argument checks} { list [catch {scan string} msg] $msg -} {1 {wrong # args: should be "scan string format ?varName varName ...?"}} +} {1 {wrong # args: should be "scan string format ?varName ...?"}} test scan-4.3 {Tcl_ScanObjCmd, argument checks} { # degenerate case, before changed from 8.2 to 8.3 list [catch {scan string format} msg] $msg @@ -509,7 +509,7 @@ test scan-8.1 {error conditions} { test scan-8.2 {error conditions} { catch {scan a} msg set msg -} {wrong # args: should be "scan string format ?varName varName ...?"} +} {wrong # args: should be "scan string format ?varName ...?"} test scan-8.3 {error conditions} { list [catch {scan a %D x} msg] $msg } {1 {bad scan conversion character "D"}} diff --git a/tests/set-old.test b/tests/set-old.test index b6e105b..1a0d5e9 100644 --- a/tests/set-old.test +++ b/tests/set-old.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: set-old.test,v 1.19 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: set-old.test,v 1.20 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -206,7 +206,7 @@ test set-old-7.2 {unset command} { list [catch {unset} msg] $msg } {0 {}} # Used to return: -#{1 {wrong # args: should be "unset ?-nocomplain? ?--? ?varName varName ...?"}} +#{1 {wrong # args: should be "unset ?-nocomplain? ?--? ?varName ...?"}} test set-old-7.3 {unset command} { catch {unset a} list [catch {unset a} msg] $msg diff --git a/tests/string.test b/tests/string.test index b42db45..64ec56f 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.72 2008/07/01 13:24:08 dkf Exp $ +# RCS: @(#) $Id: string.test,v 1.73 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -29,7 +29,7 @@ test string-1.1 {error conditions} { } {1 {unknown or ambiguous subcommand "gorp": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test string-1.2 {error conditions} { list [catch {string} msg] $msg -} {1 {wrong # args: should be "string subcommand ?argument ...?"}} +} {1 {wrong # args: should be "string subcommand ?arg ...?"}} test string-2.1 {string compare, too few args} { list [catch {string compare a} msg] $msg diff --git a/tests/stringComp.test b/tests/stringComp.test index cf22346..c4680fb 100644 --- a/tests/stringComp.test +++ b/tests/stringComp.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringComp.test,v 1.15 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: stringComp.test,v 1.16 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -33,7 +33,7 @@ test stringComp-1.1 {error conditions} { test stringComp-1.2 {error conditions} { proc foo {} {string} list [catch {foo} msg] $msg -} {1 {wrong # args: should be "string subcommand ?argument ...?"}} +} {1 {wrong # args: should be "string subcommand ?arg ...?"}} test stringComp-1.3 {error condition - undefined method during compile} { # We don't want this to complain about 'never' because it may never # be called, or string may get redefined. This must compile OK. diff --git a/tests/thread.test b/tests/thread.test index 97de497..be2bd40 100644 --- a/tests/thread.test +++ b/tests/thread.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: thread.test,v 1.19 2008/06/13 05:45:15 mistachkin Exp $ +# RCS: @(#) $Id: thread.test,v 1.20 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -39,7 +39,7 @@ if {[testConstraint testthread]} { test thread-1.1 {Tcl_ThreadObjCmd: no args} {testthread} { list [catch {testthread} msg] $msg -} {1 {wrong # args: should be "testthread option ?args?"}} +} {1 {wrong # args: should be "testthread option ?arg ...?"}} test thread-1.2 {Tcl_ThreadObjCmd: bad option} {testthread} { list [catch {testthread foo} msg] $msg } {1 {bad option "foo": must be cancel, create, event, exit, id, join, names, send, wait, or errorproc}} diff --git a/tests/timer.test b/tests/timer.test index 16eff33..76be883 100644 --- a/tests/timer.test +++ b/tests/timer.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: timer.test,v 1.13 2008/04/23 15:44:38 dkf Exp $ +# RCS: @(#) $Id: timer.test,v 1.14 2008/07/19 22:50:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -188,7 +188,7 @@ test timer-5.1 {Tcl_ServiceIdle, self-rescheduling handlers} -setup { test timer-6.1 {Tcl_AfterCmd procedure, basics} -returnCodes error -body { after -} -result {wrong # args: should be "after option ?arg arg ...?"} +} -result {wrong # args: should be "after option ?arg ...?"} test timer-6.2 {Tcl_AfterCmd procedure, basics} -returnCodes error -body { after 2x } -result {bad argument "2x": must be cancel, idle, info, or an integer} @@ -327,7 +327,7 @@ test timer-6.15 {Tcl_AfterCmd procedure, cancel option, multiple interps} -setup } -result {2 0 aaa bbb {before b-after}} test timer-6.16 {Tcl_AfterCmd procedure, idle option} -body { after idle -} -returnCodes error -result {wrong # args: should be "after idle script script ..."} +} -returnCodes error -result {wrong # args: should be "after idle script ?script ...?"} test timer-6.17 {Tcl_AfterCmd procedure, idle option} { set x before after idle {set x after} diff --git a/tests/tm.test b/tests/tm.test index 3484747..d2f88a2 100644 --- a/tests/tm.test +++ b/tests/tm.test @@ -6,7 +6,7 @@ # Copyright (c) 2004 by Donal K. Fellows. # All rights reserved. # -# RCS: @(#) $Id: tm.test,v 1.6 2005/08/29 21:55:27 andreas_kupries Exp $ +# RCS: @(#) $Id: tm.test,v 1.7 2008/07/19 22:50:39 nijtmans Exp $ package require Tcl 8.5 if {"::tcltest" ni [namespace children]} { @@ -23,10 +23,10 @@ test tm-1.2 {tm: path command syntax} -returnCodes error -body { } -result {unknown or ambiguous subcommand "foo": must be add, list, or remove} test tm-1.3 {tm: path command syntax} -returnCodes error -body { ::tcl::tm::path add -} -result "wrong # args: should be \"::tcl::tm::path add path ...\"" +} -result "wrong # args: should be \"::tcl::tm::path add path ?arg ...?\"" test tm-1.4 {tm: path command syntax} -returnCodes error -body { ::tcl::tm::path remove -} -result "wrong # args: should be \"::tcl::tm::path remove path ...\"" +} -result "wrong # args: should be \"::tcl::tm::path remove path ?arg ...?\"" test tm-1.5 {tm: path command syntax} -returnCodes error -body { ::tcl::tm::path list foobar } -result "wrong # args: should be \"::tcl::tm::path list\"" diff --git a/tests/trace.test b/tests/trace.test index 20a797d..4d924e2 100644 --- a/tests/trace.test +++ b/tests/trace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: trace.test,v 1.61 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: trace.test,v 1.62 2008/07/19 22:50:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -857,13 +857,13 @@ foreach type {variable command} { test trace-14.1 "trace command, wrong # args errors" { list [catch {trace} msg] $msg -} [list 1 "wrong # args: should be \"trace option ?arg arg ...?\""] +} [list 1 "wrong # args: should be \"trace option ?arg ...?\""] test trace-14.2 "trace command, wrong # args errors" { list [catch {trace add} msg] $msg -} [list 1 "wrong # args: should be \"trace add type ?arg arg ...?\""] +} [list 1 "wrong # args: should be \"trace add type ?arg ...?\""] test trace-14.3 "trace command, wrong # args errors" { list [catch {trace remove} msg] $msg -} [list 1 "wrong # args: should be \"trace remove type ?arg arg ...?\""] +} [list 1 "wrong # args: should be \"trace remove type ?arg ...?\""] test trace-14.4 "trace command, wrong # args errors" { list [catch {trace info} msg] $msg } [list 1 "wrong # args: should be \"trace info type name\""] diff --git a/win/tclWinReg.c b/win/tclWinReg.c index d5205a4..75c5dd9 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.41 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.42 2008/07/19 22:50:43 nijtmans Exp $ */ #include "tclInt.h" @@ -345,7 +345,7 @@ RegistryObjCmd( }; if (objc < 2) { - Tcl_WrongNumArgs(interp, objc, objv, "option ?arg arg ...?"); + Tcl_WrongNumArgs(interp, objc, objv, "option ?arg ...?"); return TCL_ERROR; } -- cgit v0.12 From d2c7aaf09fd67ae2dc65429a9c7520ac772d64dd Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 20 Jul 2008 06:40:01 +0000 Subject: Finish cleaning up this file (move cleanup actions out of test bodies, etc.) --- tests/fCmd.test | 220 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 124 insertions(+), 96 deletions(-) diff --git a/tests/fCmd.test b/tests/fCmd.test index 0216a10..64be7de 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.62 2008/07/13 23:15:22 nijtmans Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.63 2008/07/20 06:40:01 dkf Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -82,7 +82,7 @@ proc checkcontent {file matchString} { set f [open $file] set fileString [read $f] close $f - }]} { + }]} then { return 0 } return [string match $matchString $fileString] @@ -146,19 +146,21 @@ append long $long append long $long append long $long -test fCmd-1.1 {TclFileRenameCmd} {notRoot} { +test fCmd-1.1 {TclFileRenameCmd} -constraints {notRoot} -setup { cleanup +} -body { createfile tf1 file rename tf1 tf2 glob tf* -} {tf2} +} -result {tf2} -test fCmd-2.1 {TclFileCopyCmd} {notRoot} { +test fCmd-2.1 {TclFileCopyCmd} -constraints {notRoot} -setup { cleanup +} -body { createfile tf1 file copy tf1 tf2 lsort [glob tf*] -} {tf1 tf2} +} -result {tf1 tf2} test fCmd-3.1 {FileCopyRename: FileForceOption fails} -constraints {notRoot} -body { file rename -xyz @@ -203,27 +205,31 @@ test fCmd-3.9 {FileCopyRename: too many arguments: argc - i > 2} -setup { } -constraints {notRoot} -returnCodes error -body { file copy -force -- tf1 tf2 tf3 } -result {error copying: target "tf3" is not a directory} -test fCmd-3.10 {FileCopyRename: just 2 arguments} {notRoot} { +test fCmd-3.10 {FileCopyRename: just 2 arguments} -constraints notRoot -setup { cleanup +} -body { createfile tf1 tf1 file rename tf1 tf2 contents tf2 -} {tf1} -test fCmd-3.11 {FileCopyRename: just 2 arguments} {notRoot} { +} -result {tf1} +test fCmd-3.11 {FileCopyRename: just 2 arguments} -constraints notRoot -setup { cleanup +} -body { createfile tf1 tf1 file rename -force -force -- tf1 tf2 contents tf2 -} {tf1} -test fCmd-3.12 {FileCopyRename: move each source: 1 source} {notRoot} { +} -result {tf1} +test fCmd-3.12 {FileCopyRename: move each source: 1 source} -setup { cleanup +} -constraints {notRoot} -body { createfile tf1 tf1 file mkdir td1 file rename tf1 td1 contents [file join td1 tf1] -} {tf1} -test fCmd-3.13 {FileCopyRename: move each source: multiple sources} {notRoot} { +} -result {tf1} +test fCmd-3.13 {FileCopyRename: move each source: multiple sources} -setup { cleanup +} -constraints {notRoot} -body { createfile tf1 tf1 createfile tf2 tf2 createfile tf3 tf3 @@ -232,7 +238,7 @@ test fCmd-3.13 {FileCopyRename: move each source: multiple sources} {notRoot} { file rename tf1 tf2 tf3 tf4 td1 list [contents [file join td1 tf1]] [contents [file join td1 tf2]] \ [contents [file join td1 tf3]] [contents [file join td1 tf4]] -} {tf1 tf2 tf3 tf4} +} -result {tf1 tf2 tf3 tf4} test fCmd-3.14 {FileCopyRename: FileBasename fails} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { @@ -257,22 +263,25 @@ test fCmd-3.16 {FileCopyRename: break on first error} -setup { file rename tf1 tf2 tf3 tf4 td1 } -result [subst {error renaming "tf3" to "[file join td1 tf3]": file already exists}] -test fCmd-4.1 {TclFileMakeDirsCmd: make each dir: 1 dir} {notRoot} { +test fCmd-4.1 {TclFileMakeDirsCmd: make each dir: 1 dir} -setup { cleanup +} -constraints {notRoot} -body { file mkdir td1 glob td* -} {td1} -test fCmd-4.2 {TclFileMakeDirsCmd: make each dir: multiple dirs} {notRoot} { +} -result {td1} +test fCmd-4.2 {TclFileMakeDirsCmd: make each dir: multiple dirs} -setup { cleanup +} -constraints {notRoot} -body { file mkdir td1 td2 td3 lsort [glob td*] -} {td1 td2 td3} -test fCmd-4.3 {TclFileMakeDirsCmd: stops on first error} {notRoot} { +} -result {td1 td2 td3} +test fCmd-4.3 {TclFileMakeDirsCmd: stops on first error} -setup { cleanup +} -constraints {notRoot} -body { createfile tf1 catch {file mkdir td1 td2 tf1 td3 td4} glob td1 td2 tf1 td3 td4 -} {td1 td2 tf1} +} -result {td1 td2 tf1} test fCmd-4.4 {TclFileMakeDirsCmd: Tcl_TranslateFileName fails} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { @@ -283,36 +292,40 @@ test fCmd-4.5 {TclFileMakeDirsCmd: Tcl_SplitPath returns 0: *name == '\0'} -setu } -constraints {notRoot} -returnCodes error -body { file mkdir "" } -result {can't create directory "": no such file or directory} -test fCmd-4.6 {TclFileMakeDirsCmd: one level deep} {notRoot} { +test fCmd-4.6 {TclFileMakeDirsCmd: one level deep} -setup { cleanup +} -constraints {notRoot} -body { file mkdir td1 glob td1 -} {td1} -test fCmd-4.7 {TclFileMakeDirsCmd: multi levels deep} {notRoot} { +} -result {td1} +test fCmd-4.7 {TclFileMakeDirsCmd: multi levels deep} -setup { cleanup +} -constraints {notRoot} -body { file mkdir [file join td1 td2 td3 td4] glob td1 [file join td1 td2] -} "td1 [file join td1 td2]" -test fCmd-4.8 {TclFileMakeDirsCmd: already exist: lstat(target) == 0} {notRoot} { +} -result "td1 [file join td1 td2]" +test fCmd-4.8 {TclFileMakeDirsCmd: already exist: lstat(target) == 0} -setup { cleanup +} -constraints {notRoot} -body { file mkdir td1 set x [file exists td1] file mkdir td1 list $x [file exists td1] -} {1 1} +} -result {1 1} test fCmd-4.9 {TclFileMakeDirsCmd: exists, not dir} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { createfile tf1 file mkdir tf1 } -result [subst {can't create directory "[file join tf1]": file already exists}] -test fCmd-4.10 {TclFileMakeDirsCmd: exists, is dir} {notRoot} { +test fCmd-4.10 {TclFileMakeDirsCmd: exists, is dir} -setup { cleanup +} -constraints {notRoot} -body { file mkdir td1 set x [file exists td1] file mkdir td1 list $x [file exists td1] -} {1 1} +} -result {1 1} test fCmd-4.11 {TclFileMakeDirsCmd: doesn't exist: errno != ENOENT} -setup { cleanup } -constraints {unix notRoot testchmod} -returnCodes error -body { @@ -340,11 +353,12 @@ test fCmd-4.14 {TclFileMakeDirsCmd: TclpCreateDirectory fails} -setup { } -returnCodes error -cleanup { file delete -force foo } -result {can't create directory "foo/tf1": permission denied} -test fCmd-4.16 {TclFileMakeDirsCmd: TclpCreateDirectory succeeds} {notRoot} { +test fCmd-4.16 {TclFileMakeDirsCmd: TclpCreateDirectory succeeds} -setup { cleanup +} -constraints {notRoot} -body { file mkdir tf1 file exists tf1 -} {1} +} -result {1} test fCmd-5.1 {TclFileDeleteCmd: FileForceOption fails} -constraints {notRoot} -body { file delete -xyz @@ -352,51 +366,57 @@ test fCmd-5.1 {TclFileDeleteCmd: FileForceOption fails} -constraints {notRoot} - test fCmd-5.2 {TclFileDeleteCmd: not enough args} -constraints {notRoot} -body { file delete -force -force } -returnCodes error -result {wrong # args: should be "file delete ?-option value ...? file ?file ...?"} -test fCmd-5.3 {TclFileDeleteCmd: 1 file} {notRoot} { +test fCmd-5.3 {TclFileDeleteCmd: 1 file} -constraints {notRoot} -setup { cleanup +} -body { createfile tf1 createfile tf2 file mkdir td1 file delete tf2 glob tf* td* -} {tf1 td1} -test fCmd-5.4 {TclFileDeleteCmd: multiple files} {notRoot} { +} -result {tf1 td1} +test fCmd-5.4 {TclFileDeleteCmd: multiple files} -constraints notRoot -setup { cleanup +} -body { createfile tf1 createfile tf2 file mkdir td1 set x [list [file exists tf1] [file exists tf2] [file exists td1]] file delete tf1 td1 tf2 lappend x [file exists tf1] [file exists tf2] [file exists tf3] -} {1 1 1 0 0 0} -test fCmd-5.5 {TclFileDeleteCmd: stop at first error} {notRoot unixOrPc} { +} -result {1 1 1 0 0 0} +test fCmd-5.5 {TclFileDeleteCmd: stop at first error} -setup { cleanup +} -constraints {notRoot unixOrPc} -body { createfile tf1 createfile tf2 file mkdir td1 catch {file delete tf1 td1 $root tf2} list [file exists tf1] [file exists tf2] [file exists td1] -} {0 1 0} +} -result {0 1 0} test fCmd-5.6 {TclFileDeleteCmd: Tcl_TranslateFileName fails} -constraints {notRoot} -body { file delete ~_totally_bogus_user } -returnCodes error -result {user "_totally_bogus_user" doesn't exist} -test fCmd-5.7 {TclFileDeleteCmd: Tcl_TranslateFileName succeeds} {notRoot} { +test fCmd-5.7 {TclFileDeleteCmd: Tcl_TranslateFileName succeeds} -setup { catch {file delete ~/tf1} +} -constraints {notRoot} -body { createfile ~/tf1 file delete ~/tf1 -} {} -test fCmd-5.8 {TclFileDeleteCmd: file doesn't exist: lstat(name) != 0} {notRoot} { +} -result {} +test fCmd-5.8 {TclFileDeleteCmd: file doesn't exist: lstat(name) != 0} -setup { cleanup +} -constraints {notRoot} -body { set x [file exists tf1] file delete tf1 list $x [file exists tf1] -} {0 0} -test fCmd-5.9 {TclFileDeleteCmd: is directory} {notRoot} { +} -result {0 0} +test fCmd-5.9 {TclFileDeleteCmd: is directory} -constraints {notRoot} -setup { cleanup +} -body { file mkdir td1 file delete td1 file exists td1 -} {0} +} -result {0} test fCmd-5.10 {TclFileDeleteCmd: TclpRemoveDirectory fails} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { @@ -415,14 +435,14 @@ test fCmd-5.11 {TclFileDeleteCmd: TclpRemoveDirectory with cwd inside} -setup { } -cleanup { cd $dir } -result {0 0 {}} -test fCmd-5.12 {TclFileDeleteCmd: TclpRemoveDirectory with bad perms} {unix} { +test fCmd-5.12 {TclFileDeleteCmd: TclpRemoveDirectory with bad perms} -setup { cleanup +} -constraints {unix} -body { file mkdir [file join td1 td2] - #exec chmod u-rwx [file join td1 td2] file attributes [file join td1 td2] -permissions u+rwx set res [list [catch {file delete -force td1} msg]] lappend res [file exists td1] $msg -} {0 0 {}} +} -result {0 0 {}} test fCmd-6.1 {CopyRenameOneFile: bad source} {notRoot emptyTest} { # can't test this, because it's caught by FileCopyRename @@ -435,18 +455,20 @@ test fCmd-6.3 {CopyRenameOneFile: lstat(source) != 0} -setup { } -constraints {notRoot} -returnCodes error -body { file rename tf1 tf2 } -result {error renaming "tf1": no such file or directory} -test fCmd-6.4 {CopyRenameOneFile: lstat(source) == 0} {notRoot} { +test fCmd-6.4 {CopyRenameOneFile: lstat(source) == 0} -setup { cleanup +} -constraints {notRoot} -body { createfile tf1 file rename tf1 tf2 glob tf* -} {tf2} -test fCmd-6.5 {CopyRenameOneFile: lstat(target) != 0} {notRoot} { +} -result {tf2} +test fCmd-6.5 {CopyRenameOneFile: lstat(target) != 0} -setup { cleanup +} -constraints {notRoot} -body { createfile tf1 file rename tf1 tf2 glob tf* -} {tf2} +} -result {tf2} test fCmd-6.6 {CopyRenameOneFile: errno != ENOENT} -setup { cleanup } -constraints {unix notRoot testchmod} -body { @@ -463,12 +485,13 @@ test fCmd-6.7 {CopyRenameOneFile: errno != ENOENT} -setup { createfile tf1 file rename tf1 $long } -result [subst {error renaming "tf1" to "$long": file name too long}] -test fCmd-6.9 {CopyRenameOneFile: errno == ENOENT} {unix notRoot} { +test fCmd-6.9 {CopyRenameOneFile: errno == ENOENT} -setup { cleanup +} -constraints {unix notRoot} -body { createfile tf1 file rename tf1 tf2 glob tf* -} {tf2} +} -result {tf2} test fCmd-6.10 {CopyRenameOneFile: lstat(target) == 0} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { @@ -483,13 +506,14 @@ test fCmd-6.11 {CopyRenameOneFile: force == 0} -setup { createfile tf2 file rename tf1 tf2 } -result {error renaming "tf1" to "tf2": file already exists} -test fCmd-6.12 {CopyRenameOneFile: force != 0} {notRoot} { +test fCmd-6.12 {CopyRenameOneFile: force != 0} -setup { cleanup +} -constraints {notRoot} -body { createfile tf1 createfile tf2 file rename -force tf1 tf2 glob tf* -} {tf2} +} -result {tf2} test fCmd-6.13 {CopyRenameOneFile: source is dir, target is file} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { @@ -537,12 +561,13 @@ test fCmd-6.18 {CopyRenameOneFile: errno != EXDEV} -setup { file rename -force td2 td1 } -returnCodes error -match glob -result \ [subst {error renaming "td2" to "[file join td1 td2]": file *}] -test fCmd-6.19 {CopyRenameOneFile: errno == EXDEV} {unix notRoot} { +test fCmd-6.19 {CopyRenameOneFile: errno == EXDEV} -setup { cleanup /tmp +} -constraints {unix notRoot} -body { createfile tf1 file rename tf1 /tmp glob -nocomplain tf* /tmp/tf1 -} {/tmp/tf1} +} -result {/tmp/tf1} test fCmd-6.20 {CopyRenameOneFile: errno == EXDEV} -constraints {win} -setup { catch {file delete -force c:/tcl8975@ d:/tcl8975@} } -body { @@ -555,20 +580,20 @@ test fCmd-6.20 {CopyRenameOneFile: errno == EXDEV} -constraints {win} -setup { file delete -force c:/tcl8975@ catch {file delete -force d:/tcl8975@} } -result {d:/tcl8975@} -test fCmd-6.21 {CopyRenameOneFile: copy/rename: S_ISDIR(source)} \ - {unix notRoot} { +test fCmd-6.21 {CopyRenameOneFile: copy/rename: S_ISDIR(source)} -setup { cleanup /tmp +} -constraints {unix notRoot} -body { file mkdir td1 file rename td1 /tmp glob -nocomplain td* /tmp/td* -} {/tmp/td1} -test fCmd-6.22 {CopyRenameOneFile: copy/rename: !S_ISDIR(source)} \ - {unix notRoot} { +} -result {/tmp/td1} +test fCmd-6.22 {CopyRenameOneFile: copy/rename: !S_ISDIR(source)} -setup { cleanup /tmp +} -constraints {unix notRoot} -body { createfile tf1 file rename tf1 /tmp glob -nocomplain tf* /tmp/tf* -} {/tmp/tf1} +} -result {/tmp/tf1} test fCmd-6.23 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { cleanup /tmp } -constraints {unix notRoot xdev} -body { @@ -668,15 +693,16 @@ test fCmd-7.1 {FileForceOption: none} -constraints {notRoot} -setup { file mkdir [file join tf1 tf2] file delete tf1 } -result {error deleting "tf1": directory not empty} -test fCmd-7.2 {FileForceOption: -force} {notRoot} { +test fCmd-7.2 {FileForceOption: -force} -constraints {notRoot} -setup { cleanup +} -body { file mkdir [file join tf1 tf2] file delete -force tf1 -} {} -test fCmd-7.3 {FileForceOption: --} {notRoot} { +} -result {} +test fCmd-7.3 {FileForceOption: --} -constraints {notRoot} -body { createfile -tf1 file delete -- -tf1 -} {} +} -result {} test fCmd-7.4 {FileForceOption: bad option} -constraints {notRoot} -setup { createfile -tf1 } -body { @@ -703,9 +729,9 @@ test fCmd-8.1 {FileBasename: basename of ~user: argc == 1 && *path == ~} \ file delete -force td1 } -result "error renaming \"~$user\" to \"td1/[file tail ~$user]\": permission denied" test fCmd-8.2 {FileBasename: basename of ~user: argc == 1 && *path == ~} \ - {unix notRoot} { + -constraints {unix notRoot} -body { string equal [file tail ~$user] ~$user -} 0 +} -result 0 test fCmd-8.3 {file copy and path translation: ensure correct error} -body { file copy ~ [file join this file doesnt exist] } -returnCodes error -result [subst \ @@ -748,15 +774,16 @@ test fCmd-9.4 {file rename: comprehensive: dir to new name} -setup { } -cleanup { cleanup } -result {{td3 td4} 1 0} -test fCmd-9.5 {file rename: comprehensive: file to self} {notRoot testchmod} { +test fCmd-9.5 {file rename: comprehensive: file to self} -setup { cleanup +} -constraints {notRoot testchmod} -body { createfile tf1 tf1 createfile tf2 tf2 testchmod 444 tf2 file rename -force tf1 tf1 file rename -force tf2 tf2 list [contents tf1] [contents tf2] [file writable tf1] [file writable tf2] -} {tf1 tf2 1 0} +} -result {tf1 tf2 1 0} test fCmd-9.6 {file rename: comprehensive: dir to self} -setup { cleanup } -constraints {notRoot unixOrPc testchmod} -body { @@ -794,9 +821,8 @@ test fCmd-9.7 {file rename: comprehensive: file to existing file} -setup { test fCmd-9.8 {file rename: comprehensive: dir to empty dir} -setup { cleanup } -constraints {notRoot testchmod notNetworkFilesystem} -body { - # Under unix, you can rename a read-only directory, but you can't - # move it into another directory. - + # Under unix, you can rename a read-only directory, but you can't move it + # into another directory. file mkdir td1 file mkdir [file join td2 td1] file mkdir tds1 @@ -849,8 +875,9 @@ test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} -setup { list [lsort [glob td*]] $a1 $a2 [file writable tds1] $w2 } -match glob -result \ [subst {{tdd1 tdd2 tds1 tds2} {1 {error renaming "tds1" to "[file join tdd1 tds1]": file *}} {1 {error renaming "tds2" to "[file join tdd2 tds2]": file *}} 1 0}] -test fCmd-9.10 {file rename: comprehensive: file to new name and dir} {notRoot testchmod} { +test fCmd-9.10 {file rename: comprehensive: file to new name and dir} -setup { cleanup +} -constraints {notRoot testchmod} -body { createfile tf1 createfile tf2 file mkdir td1 @@ -859,9 +886,10 @@ test fCmd-9.10 {file rename: comprehensive: file to new name and dir} {notRoot t file rename tf2 [file join td1 tf4] list [catch {glob tf*}] [lsort [glob -directory td1 t*]] \ [file writable [file join td1 tf3]] [file writable [file join td1 tf4]] -} [subst {1 {[file join td1 tf3] [file join td1 tf4]} 1 0}] -test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} {notRoot testchmod} { +} -result [subst {1 {[file join td1 tf3] [file join td1 tf4]} 1 0}] +test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} -setup { cleanup +} -constraints {notRoot testchmod} -body { file mkdir td1 file mkdir td2 file mkdir td3 @@ -877,7 +905,7 @@ test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} {notRoot te } list [lsort [glob td*]] [lsort [glob -directory td3 t*]] \ [file writable [file join td3 td3]] $w4 -} [subst {td3 {[file join td3 td3] [file join td3 td4]} 1 0}] +} -result [subst {td3 {[file join td3 td3] [file join td3 td4]} 1 0}] test fCmd-9.12 {file rename: comprehensive: target exists} -setup { cleanup } -constraints {notRoot testchmod notNetworkFilesystem} -body { @@ -898,18 +926,20 @@ test fCmd-9.13 {file rename: comprehensive: can't overwrite target} -setup { file rename -force td1 td2 } -returnCodes error -match glob -result \ [subst {error renaming "td1" to "[file join td2 td1]": file *}] -test fCmd-9.14 {file rename: comprehensive: dir into self} {notRoot} { +test fCmd-9.14 {file rename: comprehensive: dir into self} -setup { cleanup +} -constraints {notRoot} -body { file mkdir td1 list [glob td*] [list [catch {file rename td1 td1} msg] $msg] -} [subst {td1 {1 {error renaming "td1" to "[file join td1 td1]": trying to rename a volume or move a directory into itself}}}] -test fCmd-9.14.1 {file rename: comprehensive: dir into self} {notRoot} { +} -result [subst {td1 {1 {error renaming "td1" to "[file join td1 td1]": trying to rename a volume or move a directory into itself}}}] +test fCmd-9.14.1 {file rename: comprehensive: dir into self} -setup { cleanup +} -constraints {notRoot} -body { file mkdir td1 file rename td1 td1x file rename td1x td1 set msg "ok" -} {ok} +} -result {ok} test fCmd-9.14.2 {file rename: comprehensive: dir into self} -setup { cleanup set dir [pwd] @@ -952,15 +982,16 @@ test fCmd-10.1 {file copy: comprehensive: source doesn't exist} -setup { } -constraints {notRoot} -returnCodes error -body { file copy tf1 tf2 } -result {error copying "tf1": no such file or directory} -test fCmd-10.2 {file copy: comprehensive: file to new name} {notRoot testchmod} { +test fCmd-10.2 {file copy: comprehensive: file to new name} -setup { cleanup +} -constraints {notRoot testchmod} -body { createfile tf1 tf1 createfile tf2 tf2 testchmod 444 tf2 file copy tf1 tf3 file copy tf2 tf4 list [lsort [glob tf*]] [contents tf3] [contents tf4] [file writable tf3] [file writable tf4] -} {{tf1 tf2 tf3 tf4} tf1 tf2 1 0} +} -result {{tf1 tf2 tf3 tf4} tf1 tf2 1 0} test fCmd-10.3 {file copy: comprehensive: dir to new name} -setup { cleanup } -constraints {notRoot unixOrPc 95or98 testchmod} -body { @@ -1135,9 +1166,9 @@ test fCmd-11.2 {TclFileRenameCmd: bad option} -constraints notRoot -setup { } -cleanup { file delete tfa1 } -result {1 1 0} -test fCmd-11.3 {TclFileRenameCmd: bad \# args} { - catch {file rename --} -} {1} +test fCmd-11.3 {TclFileRenameCmd: bad \# args} -returnCodes error -body { + file rename -- +} -match glob -result * test fCmd-11.4 {TclFileRenameCmd: target filename translation failing} -setup { set temp $::env(HOME) } -constraints notRoot -body { @@ -1320,9 +1351,9 @@ test fCmd-13.3 {TclCopyFilesCmd: bad option} -constraints {notRoot} -setup { } -cleanup { file delete tfa1 } -result {1 1 0} -test fCmd-13.4 {TclCopyFilesCmd: bad \# args} {notRoot} { - catch {file copy --} -} {1} +test fCmd-13.4 {TclCopyFilesCmd: bad \# args} -constraints {notRoot} -body { + file copy -- +} -returnCodes error -match glob -result * test fCmd-13.5 {TclCopyFilesCmd: target filename translation failing} -setup { set temp $::env(HOME) } -body { @@ -1804,7 +1835,6 @@ test fCmd-18.15 {TclFileRenameCmd : rename a file to a symlink dir} -setup { file mkdir tfa1 set s [createfile tfa2] file link -symbolic tfalink tfa1 - file rename tfa2 tfalink checkcontent tfa1/tfa2 $s } -cleanup { @@ -1856,7 +1886,6 @@ test fCmd-19.3 {recursive remove} -constraints {notRoot} -setup { # TclUnixDeleteFile and TraversalDelete are covered by tests from the # TclDeleteFilesCmd suite # -# # # Coverage tests for TraverseUnixTree(), called from TclDeleteFilesCmd @@ -2036,7 +2065,6 @@ test fCmd-22.1 {TclpRenameFile: rename and overwrite in a single dir} -setup { } -constraints {notRoot} -body { set s [createfile tfa1] set s2 [createfile tfa2 q] - set result [catch {file rename tfa1 tfa2}] file rename -force tfa1 tfa2 lappend result [checkcontent tfa2 $s] @@ -2078,7 +2106,6 @@ test fCmd-22.5 {TclMacCopyFile: copy and overwrite in a single dir} -setup { } -constraints {notRoot} -body { set s [createfile tfa1] set s2 [createfile tfa2 q] - set result [catch {file copy tfa1 tfa2}] file copy -force tfa1 tfa2 lappend result [checkcontent tfa2 $s] [checkcontent tfa1 $s] @@ -2100,7 +2127,6 @@ test fCmd-23.1 {TclMacRmdir: trying to remove a nonempty directory} -setup { catch {file delete -force -- tfad} } -constraints {notRoot} -body { file mkdir [file join tfad dir] - list [catch {file delete tfad}] [file delete -force tfad] } -cleanup { catch {file delete -force tfad} @@ -2165,7 +2191,6 @@ test fCmd-26.1 {TclDeleteFilesCmd: delete symlink} -setup { file mkdir tfad1 file link -symbolic tfalink tfad1 file delete tfalink - list [file isdir tfad1] [file exists tfalink] } -cleanup { file delete tfad1 @@ -2178,7 +2203,6 @@ test fCmd-26.2 {TclDeleteFilesCmd: delete dir with symlink} -setup { file mkdir tfad2 file link -symbolic [file join tfad2 link] [file join .. tfad1] file delete -force tfad2 - list [file isdir tfad1] [file exists tfad2] } -cleanup { file delete tfad1 @@ -2190,10 +2214,10 @@ test fCmd-26.3 {TclDeleteFilesCmd: delete dangling symlink} -setup { file link -symbolic tfad2 tfad1 file delete tfad1 file delete tfad2 - list [file exists tfad1] [file exists tfad2] } -result {0 0} +# There is no fCmd-27.1 test fCmd-27.2 {TclFileAttrsCmd - Tcl_TranslateFileName fails} -setup { set platform [testgetplatform] } -constraints {testsetplatform} -body { @@ -2516,3 +2540,7 @@ test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win 2000orNewer kno cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 9626da61ad1682531ef02f2c327a9d7c274ac7dd Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 20 Jul 2008 11:33:38 +0000 Subject: Reduce obscurity of tests by eliminating many [catch]es through use of tcltest2 --- ChangeLog | 7 + tests/fileName.test | 1173 ++++++++++++++++++++++++--------------------------- 2 files changed, 556 insertions(+), 624 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7c0068..7966665 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-20 Donal K. Fellows + + * tests/fileName.test: Revise to reduce the obscurity of tests. In + particular, all tests should now produce informative messages on + failure and the quantity of [catch]-based obscurity is now greatly + reduced; non-erroring is now checked for directly. + 2008-07-19 Donal K. Fellows * tests/env.test: Add LANG to the list of variables that are not diff --git a/tests/fileName.test b/tests/fileName.test index 4cd079b..af2a024 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1,19 +1,19 @@ # This file tests the filename manipulation routines. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. # Copyright (c) 1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.51 2006/03/21 11:12:29 dkf Exp $ +# RCS: @(#) $Id: fileName.test,v 1.52 2008/07/20 11:33:41 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest + package require tcltest 2 namespace import -force ::tcltest::* } @@ -27,21 +27,28 @@ if {[testConstraint win]} { testConstraint linkDirectory 0 } testConstraint symbolicLinkFile 0 + testConstraint sharedCdrive [expr {![catch {cd //[info hostname]/c}]}] } +# This match compares the first two words of the result. If the wanted result +# is "equal", then this is successful if the words are equal. If the wanted +# result is "not equal", then this is successful if the words are different. +customMatch compareWords {apply {{a b} { + lassign $b w1 w2 + expr {$a eq "equal" ? $w1 eq $w2 : $w1 ne $w2} +}}} +proc touch filename {catch {close [open $filename w]}} global env if {[testConstraint testsetplatform]} { set platform [testgetplatform] } -# Caution: when using 'testsetplatform' to test different file -# name platform descriptions in this file, one must be very -# careful not to combine such platform manipulation with -# commands like 'cd', 'pwd'. That is because the latter commands -# operate on the real filesystem but will potentially have their -# logic routed through the wrong generic code paths if we've -# used 'testsetplatform'. This can lead to serious problems, -# even crashes. +# Caution: when using 'testsetplatform' to test different file name platform +# descriptions in this file, one must be very careful not to combine such +# platform manipulation with commands like 'cd', 'pwd'. That is because the +# latter commands operate on the real filesystem but will potentially have +# their logic routed through the wrong generic code paths if we've used +# 'testsetplatform'. This can lead to serious problems, even crashes. test filename-1.1 {Tcl_GetPathType: unix} {testsetplatform} { testsetplatform unix file pathtype / @@ -212,36 +219,33 @@ test filename-4.18 {Tcl_SplitPath: unix} {testsetplatform} { testsetplatform unix file split foo/bar~/baz } {foo bar~ baz} - if {[testConstraint testsetplatform]} { testsetplatform $platform } - -test filename-4.19 {Tcl_SplitPath} { +test filename-4.19 {Tcl_SplitPath} -setup { set oldDir [pwd] - set res [catch { - cd [temporaryDirectory] - file mkdir tildetmp - set nastydir [file join tildetmp ./~tilde] - file mkdir $nastydir - set norm [file normalize $nastydir] - cd tildetmp - cd ./~tilde - glob -nocomplain * - set idx [string first tildetmp $norm] - set norm [string range $norm $idx end] - # fix path away so all platforms are the same - regsub {(.*):$} $norm {\1} norm - regsub -all ":" $norm "/" norm - # make sure we can delete the directory we created - cd $oldDir - file delete -force $nastydir - set norm - } err] + cd [temporaryDirectory] +} -body { + file mkdir tildetmp + set nastydir [file join tildetmp ./~tilde] + file mkdir $nastydir + set norm [file normalize $nastydir] + cd tildetmp + cd ./~tilde + glob -nocomplain * + set idx [string first tildetmp $norm] + set norm [string range $norm $idx end] + # fix path away so all platforms are the same + regsub {(.*):$} $norm {\1} norm + regsub -all ":" $norm "/" norm + # make sure we can delete the directory we created + cd $oldDir + file delete -force $nastydir + return $norm +} -cleanup { cd $oldDir catch {file delete -force [file join [temporaryDirectory] tildetmp]} - list $res $err -} {0 tildetmp/~tilde} +} -result {tildetmp/~tilde} test filename-6.1 {Tcl_SplitPath: win} {testsetplatform} { testsetplatform win @@ -437,7 +441,6 @@ test filename-7.18 {Tcl_JoinPath: unix} {testsetplatform} { file join /// a b } {/a/b} - test filename-9.1 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win file join a b @@ -514,25 +517,25 @@ test filename-9.19 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win set res {} lappend res \ - [file join {C:\foo\bar}] \ - [file join C:/blah {C:\foo\bar}] \ - [file join C:/blah C:/blah {C:\foo\bar}] + [file join {C:\foo\bar}] \ + [file join C:/blah {C:\foo\bar}] \ + [file join C:/blah C:/blah {C:\foo\bar}] } {C:/foo/bar C:/foo/bar C:/foo/bar} test filename-9.19.1 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win set res {} lappend res \ - [file join {foo\bar}] \ - [file join C:/blah {foo\bar}] \ - [file join C:/blah C:/blah {foo\bar}] + [file join {foo\bar}] \ + [file join C:/blah {foo\bar}] \ + [file join C:/blah C:/blah {foo\bar}] } {foo/bar C:/blah/foo/bar C:/blah/foo/bar} test filename-9.19.2 {Tcl_JoinPath: win} {testsetplatform win} { testsetplatform win set res {} lappend res \ - [file join {foo\bar}] \ - [file join [pwd] {foo\bar}] \ - [file join [pwd] [pwd] {foo\bar}] + [file join {foo\bar}] \ + [file join [pwd] {foo\bar}] \ + [file join [pwd] [pwd] {foo\bar}] set nres {} foreach elt $res { lappend nres [string map [list [pwd] pwd] $elt] @@ -543,201 +546,206 @@ test filename-9.20 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix set res {} lappend res \ - [file join {/foo/bar}] \ - [file join /x {/foo/bar}] \ - [file join /x /x {/foo/bar}] + [file join {/foo/bar}] \ + [file join /x {/foo/bar}] \ + [file join /x /x {/foo/bar}] } {/foo/bar /foo/bar /foo/bar} test filename-9.23 {Tcl_JoinPath: win} {testsetplatform} { testsetplatform win set res {} lappend res \ - [file join {foo\bar}] \ - [file join C:/blah {foo\bar}] \ - [file join C:/blah C:/blah {foo\bar}] + [file join {foo\bar}] \ + [file join C:/blah {foo\bar}] \ + [file join C:/blah C:/blah {foo\bar}] string map [list C:/blah ""] $res } {foo/bar /foo/bar /foo/bar} test filename-9.24 {Tcl_JoinPath: unix} {testsetplatform} { testsetplatform unix set res {} lappend res \ - [file join {foo/bar}] \ - [file join /x {foo/bar}] \ - [file join /x /x {foo/bar}] + [file join {foo/bar}] \ + [file join /x {foo/bar}] \ + [file join /x /x {foo/bar}] string map [list /x ""] $res } {foo/bar /foo/bar /foo/bar} -test filename-10.1 {Tcl_TranslateFileName} {testsetplatform} { +test filename-10.1 {Tcl_TranslateFileName} -body { testsetplatform unix - list [catch {testtranslatefilename foo} msg] $msg -} {0 foo} -test filename-10.2 {Tcl_TranslateFileName} {testsetplatform} { + testtranslatefilename foo +} -result {foo} -constraints {testsetplatform testtranslatefilename} +test filename-10.2 {Tcl_TranslateFileName} -body { testsetplatform windows - list [catch {testtranslatefilename {c:/foo}} msg] $msg -} {0 {c:\foo}} -test filename-10.3 {Tcl_TranslateFileName} {testsetplatform} { + testtranslatefilename {c:/foo} +} -result {c:\foo} -constraints {testsetplatform testtranslatefilename} +test filename-10.3 {Tcl_TranslateFileName} -body { testsetplatform windows - list [catch {testtranslatefilename {c:/\\foo/}} msg] $msg -} {0 {c:\foo}} -test filename-10.3.1 {Tcl_TranslateFileName} {testsetplatform} { + testtranslatefilename {c:/\\foo/} +} -result {c:\foo} -constraints {testsetplatform testtranslatefilename} +test filename-10.3.1 {Tcl_TranslateFileName} -body { testsetplatform windows - list [catch {testtranslatefilename {c://///}} msg] $msg -} {0 c:\\} -test filename-10.6 {Tcl_TranslateFileName} {testsetplatform} { + testtranslatefilename {c://///} +} -result c:\\ -constraints {testsetplatform testtranslatefilename} +test filename-10.6 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "/home/test" testsetplatform unix - set result [list [catch {testtranslatefilename ~/foo} msg] $msg] + testtranslatefilename ~/foo +} -cleanup { set env(HOME) $temp - set result -} {0 /home/test/foo} -test filename-10.7 {Tcl_TranslateFileName} {testsetplatform} { +} -result {/home/test/foo} +test filename-10.7 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { unset env(HOME) testsetplatform unix - set result [list [catch {testtranslatefilename ~/foo} msg] $msg] + testtranslatefilename ~/foo +} -returnCodes error -cleanup { set env(HOME) $temp - set result -} {1 {couldn't find HOME environment variable to expand path}} -test filename-10.8 {Tcl_TranslateFileName} {testsetplatform} { +} -result {couldn't find HOME environment variable to expand path} +test filename-10.8 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "/home/test" testsetplatform unix - set result [list [catch {testtranslatefilename ~} msg] $msg] + testtranslatefilename ~ +} -cleanup { set env(HOME) $temp - set result -} {0 /home/test} -test filename-10.9 {Tcl_TranslateFileName} {testsetplatform} { +} -result {/home/test} +test filename-10.9 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "/home/test/" testsetplatform unix - set result [list [catch {testtranslatefilename ~} msg] $msg] + testtranslatefilename ~ +} -cleanup { set env(HOME) $temp - set result -} {0 /home/test} -test filename-10.10 {Tcl_TranslateFileName} {testsetplatform} { +} -result {/home/test} +test filename-10.10 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "/home/test/" testsetplatform unix - set result [list [catch {testtranslatefilename ~/foo} msg] $msg] + testtranslatefilename ~/foo +} -cleanup { set env(HOME) $temp - set result -} {0 /home/test/foo} -test filename-10.17 {Tcl_TranslateFileName} {testsetplatform} { +} -result {/home/test/foo} +test filename-10.17 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "\\home\\" testsetplatform windows - set result [list [catch {testtranslatefilename ~/foo} msg] $msg] + testtranslatefilename ~/foo +} -cleanup { set env(HOME) $temp - set result -} {0 {\home\foo}} -test filename-10.18 {Tcl_TranslateFileName} {testsetplatform} { +} -result {\home\foo} +test filename-10.18 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "\\home\\" testsetplatform windows - set result [list [catch {testtranslatefilename ~/foo\\bar} msg] $msg] + testtranslatefilename ~/foo\\bar +} -cleanup { set env(HOME) $temp - set result -} {0 {\home\foo\bar}} -test filename-10.19 {Tcl_TranslateFileName} {testsetplatform} { +} -result {\home\foo\bar} +test filename-10.19 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "c:" testsetplatform windows - set result [list [catch {testtranslatefilename ~/foo} msg] $msg] + testtranslatefilename ~/foo +} -cleanup { set env(HOME) $temp - set result -} {0 c:foo} -test filename-10.20 {Tcl_TranslateFileName} {testtranslatefilename} { - list [catch {testtranslatefilename ~blorp/foo} msg] $msg -} {1 {user "blorp" doesn't exist}} -test filename-10.21 {Tcl_TranslateFileName} {testsetplatform} { +} -result {c:foo} +test filename-10.20 {Tcl_TranslateFileName} -returnCodes error -body { + testtranslatefilename ~blorp/foo +} -constraints {testtranslatefilename testtranslatefilename} \ + -result {user "blorp" doesn't exist} +test filename-10.21 {Tcl_TranslateFileName} -setup { global env set temp $env(HOME) +} -constraints {testsetplatform testtranslatefilename} -body { set env(HOME) "c:\\" testsetplatform windows - set result [list [catch {testtranslatefilename ~/foo} msg] $msg] + testtranslatefilename ~/foo +} -cleanup { set env(HOME) $temp - set result -} {0 {c:\foo}} -test filename-10.22 {Tcl_TranslateFileName} {testsetplatform} { +} -result {c:\foo} +test filename-10.22 {Tcl_TranslateFileName} -body { testsetplatform windows - list [catch {testtranslatefilename foo//bar} msg] $msg -} {0 {foo\bar}} - + testtranslatefilename foo//bar +} -constraints {testsetplatform testtranslatefilename} -result {foo\bar} if {[testConstraint testsetplatform]} { testsetplatform $platform } - -test filename-10.23 {Tcl_TranslateFileName} {nonPortable} { +test filename-10.23 {Tcl_TranslateFileName} -body { # this test fails if ~ouster is not /home/ouster - list [catch {testtranslatefilename ~ouster} msg] $msg -} {0 /home/ouster} -test filename-10.24 {Tcl_TranslateFileName} {nonPortable} { + testtranslatefilename ~ouster +} -constraints {nonPortable testtranslatefilename} -result {/home/ouster} +test filename-10.24 {Tcl_TranslateFileName} -body { # this test fails if ~ouster is not /home/ouster - list [catch {testtranslatefilename ~ouster/foo} msg] $msg -} {0 /home/ouster/foo} - + testtranslatefilename ~ouster/foo +} -result {/home/ouster/foo} -constraints {nonPortable testtranslatefilename} -test filename-11.1 {Tcl_GlobCmd} { - list [catch {glob} msg] $msg -} {1 {wrong # args: should be "glob ?switches? name ?name ...?"}} -test filename-11.2 {Tcl_GlobCmd} { - list [catch {glob -gorp} msg] $msg -} {1 {bad option "-gorp": must be -directory, -join, -nocomplain, -path, -tails, -types, or --}} -test filename-11.3 {Tcl_GlobCmd} { - list [catch {glob -nocomplai} msg] $msg -} {1 {wrong # args: should be "glob ?switches? name ?name ...?"}} -test filename-11.4 {Tcl_GlobCmd} { - list [catch {glob -nocomplain} msg] $msg -} {1 {wrong # args: should be "glob ?switches? name ?name ...?"}} -test filename-11.5 {Tcl_GlobCmd} { - list [catch {glob -nocomplain * ~xyqrszzz} msg] $msg -} {1 {user "xyqrszzz" doesn't exist}} -test filename-11.6 {Tcl_GlobCmd} { - list [catch {glob ~xyqrszzz} msg] $msg -} {1 {user "xyqrszzz" doesn't exist}} -test filename-11.7 {Tcl_GlobCmd} { - list [catch {glob -- -nocomplain} msg] $msg -} {1 {no files matched glob pattern "-nocomplain"}} -test filename-11.8 {Tcl_GlobCmd} { - list [catch {glob -nocomplain -- -nocomplain} msg] $msg -} {0 {}} -test filename-11.9 {Tcl_GlobCmd} {testsetplatform} { +test filename-11.1 {Tcl_GlobCmd} -returnCodes error -body { + glob +} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +test filename-11.2 {Tcl_GlobCmd} -returnCodes error -body { + glob -gorp +} -result {bad option "-gorp": must be -directory, -join, -nocomplain, -path, -tails, -types, or --} +test filename-11.3 {Tcl_GlobCmd} -returnCodes error -body { + glob -nocomplai +} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +test filename-11.4 {Tcl_GlobCmd} -returnCodes error -body { + glob -nocomplain +} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +test filename-11.5 {Tcl_GlobCmd} -returnCodes error -body { + glob -nocomplain * ~xyqrszzz +} -result {user "xyqrszzz" doesn't exist} +test filename-11.6 {Tcl_GlobCmd} -returnCodes error -body { + glob ~xyqrszzz +} -result {user "xyqrszzz" doesn't exist} +test filename-11.7 {Tcl_GlobCmd} -returnCodes error -body { + glob -- -nocomplain +} -result {no files matched glob pattern "-nocomplain"} +test filename-11.8 {Tcl_GlobCmd} -body { + glob -nocomplain -- -nocomplain +} -result {} +test filename-11.9 {Tcl_GlobCmd} -constraints {testsetplatform} -body { testsetplatform unix - list [catch {glob ~\\xyqrszzz/bar} msg] $msg -} {1 {user "\xyqrszzz" doesn't exist}} -test filename-11.10 {Tcl_GlobCmd} {testsetplatform} { + glob ~\\xyqrszzz/bar +} -returnCodes error -result {user "\xyqrszzz" doesn't exist} +test filename-11.10 {Tcl_GlobCmd} -constraints {testsetplatform} -body { testsetplatform unix - list [catch {glob -nocomplain ~\\xyqrszzz/bar} msg] $msg -} {1 {user "\xyqrszzz" doesn't exist}} -test filename-11.11 {Tcl_GlobCmd} {testsetplatform} { + glob -nocomplain ~\\xyqrszzz/bar +} -returnCodes error -result {user "\xyqrszzz" doesn't exist} +test filename-11.11 {Tcl_GlobCmd} -constraints {testsetplatform} -body { testsetplatform unix - list [catch {glob ~xyqrszzz\\/\\bar} msg] $msg -} {1 {user "xyqrszzz" doesn't exist}} -test filename-11.12 {Tcl_GlobCmd} {testsetplatform} { + glob ~xyqrszzz\\/\\bar +} -returnCodes error -result {user "xyqrszzz" doesn't exist} +test filename-11.12 {Tcl_GlobCmd} -constraints {testsetplatform} -setup { testsetplatform unix set home $env(HOME) +} -body { unset env(HOME) - set x [list [catch {glob ~/*} msg] $msg] + glob ~/* +} -returnCodes error -cleanup { set env(HOME) $home - set x -} {1 {couldn't find HOME environment variable to expand path}} - +} -result {couldn't find HOME environment variable to expand path} if {[testConstraint testsetplatform]} { testsetplatform $platform } - test filename-11.13 {Tcl_GlobCmd} { - list [catch {file join [lindex [glob ~] 0]} msg] $msg -} [list 0 [file join $env(HOME)]] - + file join [lindex [glob ~] 0] +} [file join $env(HOME)] set oldpwd [pwd] set oldhome $env(HOME) cd [temporaryDirectory] @@ -747,395 +755,354 @@ file mkdir globTest/a1/b1 file mkdir globTest/a1/b2 file mkdir globTest/a2/b3 file mkdir globTest/a3 -close [open globTest/x1.c w] -close [open globTest/y1.c w] -close [open globTest/z1.c w] -close [open "globTest/weird name.c" w] -close [open globTest/a1/b1/x2.c w] -close [open globTest/a1/b2/y2.c w] - -catch {close [open globTest/.1 w]} -catch {close [open globTest/x,z1.c w]} - +touch globTest/x1.c +touch globTest/y1.c +touch globTest/z1.c +touch "globTest/weird name.c" +touch globTest/a1/b1/x2.c +touch globTest/a1/b2/y2.c +touch globTest/.1 +touch globTest/x,z1.c test filename-11.14 {Tcl_GlobCmd} { - list [catch {glob ~/globTest} msg] $msg -} [list 0 [list [file join $env(HOME) globTest]]] + glob ~/globTest +} [list [file join $env(HOME) globTest]] test filename-11.15 {Tcl_GlobCmd} { - list [catch {glob ~\\/globTest} msg] $msg -} [list 0 [list [file join $env(HOME) globTest]]] + glob ~\\/globTest +} [list [file join $env(HOME) globTest]] test filename-11.16 {Tcl_GlobCmd} { - list [catch {glob globTest} msg] $msg -} {0 globTest} - + glob globTest +} {globTest} set globname "globTest" set horribleglobname "glob\[\{Test" - test filename-11.17 {Tcl_GlobCmd} {unix} { - list [catch {lsort [glob -directory $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + lsort [glob -directory $globname *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.17.1 {Tcl_GlobCmd} {win} { - list [catch {lsort [glob -directory $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ - [file join $globname .1]\ + lsort [glob -directory $globname *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] -test filename-11.17.2 {Tcl_GlobCmd} {notRoot linkDirectory} { + [file join $globname y1.c] [file join $globname z1.c]]] +test filename-11.17.2 {Tcl_GlobCmd} -setup { set dir [pwd] - set ret "error in test" - if {[catch { - cd $globname - file link -symbolic link a1 - cd $dir - set ret [list [catch { - lsort [glob -directory $globname -join * b1] - } msg] $msg] - }]} { - cd $dir - } +} -constraints {notRoot linkDirectory} -body { + cd $globname + file link -symbolic link a1 + cd $dir + lsort [glob -directory $globname -join * b1] +} -cleanup { + cd $dir file delete [file join $globname link] - set ret -} [list 0 [lsort [list [file join $globname a1 b1] \ - [file join $globname link b1]]]] +} -result [list [file join $globname a1 b1] \ + [file join $globname link b1]] # Simpler version of the above test to illustrate a given bug. -test filename-11.17.3 {Tcl_GlobCmd} {notRoot linkDirectory} { +test filename-11.17.3 {Tcl_GlobCmd} -setup { set dir [pwd] - set ret "error in test" - if {[catch { - cd $globname - file link -symbolic link a1 - cd $dir - set ret [list [catch { - lsort [glob -directory $globname -type d *] - } msg] $msg] - }]} { - cd $dir - } +} -constraints {notRoot linkDirectory} -body { + cd $globname + file link -symbolic link a1 + cd $dir + lsort [glob -directory $globname -type d *] +} -cleanup { + cd $dir file delete [file join $globname link] - set ret -} [list 0 [lsort [list [file join $globname a1] \ - [file join $globname a2] \ - [file join $globname a3] \ - [file join $globname link]]]] -# Make sure the bugfix isn't too simple. We don't want -# to break 'glob -type l'. -test filename-11.17.4 {Tcl_GlobCmd} {notRoot linkDirectory} { +} -result [list [file join $globname a1] \ + [file join $globname a2] \ + [file join $globname a3] \ + [file join $globname link]] +# Make sure the bugfix isn't too simple. We don't want to break 'glob -type l' +test filename-11.17.4 {Tcl_GlobCmd} -setup { set dir [pwd] - set ret "error in test" - if {[catch { - cd $globname - file link -symbolic link a1 - cd $dir - set ret [list [catch { - lsort [glob -directory $globname -type l *] - } msg] $msg] - }]} { - cd $dir - } +} -constraints {notRoot linkDirectory} -body { + cd $globname + file link -symbolic link a1 + cd $dir + lsort [glob -directory $globname -type l *] +} -cleanup { + cd $dir file delete [file join $globname link] - set ret -} [list 0 [list [file join $globname link]]] +} -result [list [file join $globname link]] test filename-11.17.5 {Tcl_GlobCmd} { - list [catch {lsort [glob -directory $globname -tails *.c]} msg] $msg -} [list 0 [lsort [list "weird name.c" x,z1.c x1.c y1.c z1.c]]] + lsort [glob -directory $globname -tails *.c] +} [lsort [list "weird name.c" x,z1.c x1.c y1.c z1.c]] test filename-11.17.6 {Tcl_GlobCmd} { - list [catch {lsort [glob -directory $globname -tails *.c *.c]} msg] $msg -} [list 0 [lsort [concat [list "weird name.c" x,z1.c x1.c y1.c z1.c] \ - [list "weird name.c" x,z1.c x1.c y1.c z1.c]]]] -test filename-11.17.7 {Tcl_GlobCmd: broken link and glob -l} {linkDirectory} { + lsort [glob -directory $globname -tails *.c *.c] +} [lsort [concat [list "weird name.c" x,z1.c x1.c y1.c z1.c] \ + [list "weird name.c" x,z1.c x1.c y1.c z1.c]]] +test filename-11.17.7 {Tcl_GlobCmd: broken link and glob -l} -setup { set dir [pwd] - set ret "error in test" - if {[catch { - cd $globname - file mkdir nonexistent - file link -symbolic link nonexistent - file delete nonexistent - cd $dir - set ret [list [catch { - lsort [glob -nocomplain -directory $globname -type l *] - } msg] $msg] - }]} { - cd $dir - } +} -constraints {linkDirectory} -body { + cd $globname + file mkdir nonexistent + file link -symbolic link nonexistent + file delete nonexistent + cd $dir + lsort [glob -nocomplain -directory $globname -type l *] +} -cleanup { + cd $dir file delete [file join $globname link] - set ret -} [list 0 [list [file join $globname link]]] -test filename-11.17.8 {Tcl_GlobCmd: broken link and glob -l} {symbolicLinkFile} { +} -result [list [file join $globname link]] +test filename-11.17.8 {Tcl_GlobCmd: broken link and glob -l} -setup { set dir [pwd] - set ret "error in test" - if {[catch { - cd $globname - close [open "nonexistent" w] - file link -symbolic link nonexistent - file delete nonexistent - cd $dir - set ret [list [catch { - lsort [glob -nocomplain -directory $globname -type l *] - } msg] $msg] - }]} { - cd $dir - } +} -constraints {symbolicLinkFile} -body { + cd $globname + touch "nonexistent" + file link -symbolic link nonexistent + file delete nonexistent + cd $dir + lsort [glob -nocomplain -directory $globname -type l *] +} -cleanup { + cd $dir file delete [file join $globname link] - set ret -} [list 0 [list [file join $globname link]]] +} -result [list [file join $globname link]] test filename-11.18 {Tcl_GlobCmd} {unix} { - list [catch {lsort [glob -path $globname/ *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + lsort [glob -path $globname/ *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.18.1 {Tcl_GlobCmd} {win} { - list [catch {lsort [glob -path $globname/ *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ - [file join $globname .1]\ + lsort [glob -path $globname/ *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.19 {Tcl_GlobCmd} {unix} { - list [catch {lsort [glob -join -path \ - [string range $globname 0 5] * *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + lsort [glob -join -path [string range $globname 0 5] * *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.19.1 {Tcl_GlobCmd} {win} { - list [catch {lsort [glob -join -path \ - [string range $globname 0 5] * *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ - [file join $globname .1]\ + lsort [glob -join -path [string range $globname 0 5] * *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.20 {Tcl_GlobCmd} { - list [catch {lsort [glob -type d -dir $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1]\ + lsort [glob -type d -dir $globname *] +} [lsort [list [file join $globname a1]\ [file join $globname a2]\ - [file join $globname a3]]]] + [file join $globname a3]]] test filename-11.21 {Tcl_GlobCmd} { - list [catch {lsort [glob -type d -path $globname *]} msg] $msg -} [list 0 [lsort [list $globname]]] - -test filename-11.21.1 {Tcl_GlobCmd} { - close [open {[tcl].testremains} w] - set res [list [catch {lsort [glob -path {[tcl]} *]} msg] $msg] + lsort [glob -type d -path $globname *] +} [list $globname] +test filename-11.21.1 {Tcl_GlobCmd} -body { + touch {[tcl].testremains} + lsort [glob -path {[tcl]} *] +} -cleanup { file delete -force {[tcl].testremains} - set res -} [list 0 {{[tcl].testremains}}] - -# Get rid of file/dir if it exists, since it will have -# been left behind by a previous failed run. +} -result {{[tcl].testremains}} +# Get rid of file/dir if it exists, since it will have been left behind by a +# previous failed run. if {[file exists $horribleglobname]} { file delete -force $horribleglobname } file rename globTest $horribleglobname set globname $horribleglobname - test filename-11.22 {Tcl_GlobCmd} {unix} { - list [catch {lsort [glob -dir $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + lsort [glob -dir $globname *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.22.1 {Tcl_GlobCmd} {win} { - list [catch {lsort [glob -dir $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ - [file join $globname .1]\ + lsort [glob -dir $globname *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.23 {Tcl_GlobCmd} {unix} { - list [catch {lsort [glob -path $globname/ *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + lsort [glob -path $globname/ *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.23.1 {Tcl_GlobCmd} {win} { - list [catch {lsort [glob -path $globname/ *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ - [file join $globname .1]\ + lsort [glob -path $globname/ *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.24 {Tcl_GlobCmd} {unix} { - list [catch {lsort [glob -join -path \ - [string range $globname 0 5] * *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ + lsort [glob -join -path [string range $globname 0 5] * *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.24.1 {Tcl_GlobCmd} {win} { - list [catch {lsort [glob -join -path \ - [string range $globname 0 5] * *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1] [file join $globname a2]\ - [file join $globname .1]\ + lsort [glob -join -path [string range $globname 0 5] * *] +} [lsort [list [file join $globname a1] [file join $globname a2]\ + [file join $globname .1]\ [file join $globname a3]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-11.25 {Tcl_GlobCmd} { - list [catch {lsort [glob -type d -dir $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1]\ + lsort [glob -type d -dir $globname *] +} [lsort [list [file join $globname a1]\ [file join $globname a2]\ - [file join $globname a3]]]] + [file join $globname a3]]] test filename-11.25.1 {Tcl_GlobCmd} { - list [catch {lsort [glob -type {d r} -dir $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1]\ - [file join $globname a2]\ - [file join $globname a3]]]] + lsort [glob -type {d r} -dir $globname *] +} [lsort [list [file join $globname a1]\ + [file join $globname a2]\ + [file join $globname a3]]] test filename-11.25.2 {Tcl_GlobCmd} { - list [catch {lsort [glob -type {d r w} -dir $globname *]} msg] $msg -} [list 0 [lsort [list [file join $globname a1]\ - [file join $globname a2]\ - [file join $globname a3]]]] + lsort [glob -type {d r w} -dir $globname *] +} [lsort [list [file join $globname a1]\ + [file join $globname a2]\ + [file join $globname a3]]] test filename-11.26 {Tcl_GlobCmd} { - list [catch {glob -type d -path $globname *} msg] $msg -} [list 0 [list $globname]] -test filename-11.27 {Tcl_GlobCmd} { - list [catch {glob -types abcde *} msg] $msg -} {1 {bad argument to "-types": abcde}} -test filename-11.28 {Tcl_GlobCmd} { - list [catch {glob -types z *} msg] $msg -} {1 {bad argument to "-types": z}} -test filename-11.29 {Tcl_GlobCmd} { - list [catch {glob -types {abcd efgh} *} msg] $msg -} {1 {only one MacOS type or creator argument to "-types" allowed}} -test filename-11.30 {Tcl_GlobCmd} { - list [catch {glob -types {{macintosh type TEXT} \ - {macintosh creator ALFA} efgh} *} msg] $msg -} {1 {only one MacOS type or creator argument to "-types" allowed}} -test filename-11.31 {Tcl_GlobCmd} { - list [catch {glob -types} msg] $msg -} {1 {missing argument to "-types"}} -test filename-11.32 {Tcl_GlobCmd} { - list [catch {glob -path hello -dir hello *} msg] $msg -} {1 {"-directory" cannot be used with "-path"}} -test filename-11.33 {Tcl_GlobCmd} { - list [catch {glob -path} msg] $msg -} {1 {missing argument to "-path"}} -test filename-11.34 {Tcl_GlobCmd} { - list [catch {glob -direct} msg] $msg -} {1 {missing argument to "-directory"}} -test filename-11.35 {Tcl_GlobCmd} { - list [catch {glob -paths *} msg] $msg -} {1 {bad option "-paths": must be -directory, -join, -nocomplain, -path, -tails, -types, or --}} + glob -type d -path $globname * +} [list $globname] +test filename-11.27 {Tcl_GlobCmd} -returnCodes error -body { + glob -types abcde * +} -result {bad argument to "-types": abcde} +test filename-11.28 {Tcl_GlobCmd} -returnCodes error -body { + glob -types z * +} -result {bad argument to "-types": z} +test filename-11.29 {Tcl_GlobCmd} -returnCodes error -body { + glob -types {abcd efgh} * +} -result {only one MacOS type or creator argument to "-types" allowed} +test filename-11.30 {Tcl_GlobCmd} -returnCodes error -body { + glob -types {{macintosh type TEXT} {macintosh creator ALFA} efgh} * +} -result {only one MacOS type or creator argument to "-types" allowed} +test filename-11.31 {Tcl_GlobCmd} -returnCodes error -body { + glob -types +} -result {missing argument to "-types"} +test filename-11.32 {Tcl_GlobCmd} -returnCodes error -body { + glob -path hello -dir hello * +} -result {"-directory" cannot be used with "-path"} +test filename-11.33 {Tcl_GlobCmd} -returnCodes error -body { + glob -path +} -result {missing argument to "-path"} +test filename-11.34 {Tcl_GlobCmd} -returnCodes error -body { + glob -direct +} -result {missing argument to "-directory"} +test filename-11.35 {Tcl_GlobCmd} -returnCodes error -body { + glob -paths * +} -result {bad option "-paths": must be -directory, -join, -nocomplain, -path, -tails, -types, or --} # Test '-tails' flag to glob. -test filename-11.36 {Tcl_GlobCmd} { - list [catch {glob -tails *} msg] $msg -} {1 {"-tails" must be used with either "-directory" or "-path"}} +test filename-11.36 {Tcl_GlobCmd} -returnCodes error -body { + glob -tails * +} -result {"-tails" must be used with either "-directory" or "-path"} test filename-11.37 {Tcl_GlobCmd} { - list [catch {glob -type d -tails -path $globname *} msg] $msg -} [list 0 [list $globname]] + glob -type d -tails -path $globname * +} [list $globname] test filename-11.38 {Tcl_GlobCmd} { - list [catch {glob -tails -path $globname *} msg] $msg -} [list 0 [list $globname]] + glob -tails -path $globname * +} [list $globname] test filename-11.39 {Tcl_GlobCmd} { - list [catch {glob -tails -join -path $globname *} msg] $msg -} [list 0 [list $globname]] -test filename-11.40 {Tcl_GlobCmd} { - expr {[glob -dir [pwd] -tails *] == [glob *]} -} {1} -test filename-11.41 {Tcl_GlobCmd} { - expr {[glob -dir [pwd] -tails *] != [glob -dir [pwd] *]} -} {1} -test filename-11.42 {Tcl_GlobCmd} { + glob -tails -join -path $globname * +} [list $globname] +test filename-11.40 {Tcl_GlobCmd} -body { + list [glob -dir [pwd] -tails *] [glob *] +} -match compareWords -result equal +test filename-11.41 {Tcl_GlobCmd} -body { + list [glob -dir [pwd] -tails *] [glob -dir [pwd] *] +} -match compareWords -result "not equal" +test filename-11.42 {Tcl_GlobCmd} -body { set res [list] foreach f [glob -dir [pwd] *] { lappend res [file tail $f] } - expr {$res == [glob *]} -} {1} -test filename-11.43 {Tcl_GlobCmd} { - list [catch {glob -t *} msg] $msg -} {1 {ambiguous option "-t": must be -directory, -join, -nocomplain, -path, -tails, -types, or --}} -test filename-11.44 {Tcl_GlobCmd} { - list [catch {glob -tails -path hello -directory hello *} msg] $msg -} {1 {"-directory" cannot be used with "-path"}} -test filename-11.45 {Tcl_GlobCmd on root volume} { + list $res [glob *] +} -match compareWords -result equal +test filename-11.43 {Tcl_GlobCmd} -returnCodes error -body { + glob -t * +} -result {ambiguous option "-t": must be -directory, -join, -nocomplain, -path, -tails, -types, or --} +test filename-11.44 {Tcl_GlobCmd} -returnCodes error -body { + glob -tails -path hello -directory hello * +} -result {"-directory" cannot be used with "-path"} +test filename-11.45 {Tcl_GlobCmd on root volume} -setup { set res1 "" set res2 "" + set tmpd [pwd] +} -body { catch { set res1 [glob -dir [lindex [file volumes] 0] -tails *] } catch { - set tmpd [pwd] cd [lindex [file volumes] 0] set res2 [glob *] - cd $tmpd } - set res [expr {$res1 == $res2}] - if {!$res} { - lappend res $res1 $res2 - } - set res -} {1} -test filename-11.46 {Tcl_GlobCmd} { - list [catch {glob -types abcde -dir foo *} msg] $msg -} {1 {bad argument to "-types": abcde}} -test filename-11.47 {Tcl_GlobCmd} { - list [catch {glob -types abcde -path foo *} msg] $msg -} {1 {bad argument to "-types": abcde}} -test filename-11.48 {Tcl_GlobCmd} { - list [catch {glob -types abcde -dir foo -join * *} msg] $msg -} {1 {bad argument to "-types": abcde}} -test filename-11.49 {Tcl_GlobCmd} { - list [catch {glob -types abcde -path foo -join * *} msg] $msg -} {1 {bad argument to "-types": abcde}} + list $res1 $res2 +} -cleanup { + cd $tmpd +} -match compareWords -result equal +test filename-11.46 {Tcl_GlobCmd} -returnCodes error -body { + glob -types abcde -dir foo * +} -result {bad argument to "-types": abcde} +test filename-11.47 {Tcl_GlobCmd} -returnCodes error -body { + glob -types abcde -path foo * +} -result {bad argument to "-types": abcde} +test filename-11.48 {Tcl_GlobCmd} -returnCodes error -body { + glob -types abcde -dir foo -join * * +} -result {bad argument to "-types": abcde} +test filename-11.49 {Tcl_GlobCmd} -returnCodes error -body { + glob -types abcde -path foo -join * * +} -result {bad argument to "-types": abcde} file rename $horribleglobname globTest set globname globTest unset horribleglobname test filename-12.1 {simple globbing} {unixOrPc} { - list [catch {glob {}} msg] $msg -} {0 .} -test filename-12.1.1 {simple globbing} {unixOrPc} { - list [catch {glob -types f {}} msg] $msg -} {1 {no files matched glob pattern ""}} + glob {} +} {.} +test filename-12.1.1 {simple globbing} -constraints {unixOrPc} -body { + glob -types f {} +} -returnCodes error -result {no files matched glob pattern ""} test filename-12.1.2 {simple globbing} {unixOrPc} { - list [catch {glob -types d {}} msg] $msg -} {0 .} + glob -types d {} +} {.} test filename-12.1.3 {simple globbing} {unix} { - list [catch {glob -types hidden {}} msg] $msg -} {0 .} -test filename-12.1.4 {simple globbing} {win} { - list [catch {glob -types hidden {}} msg] $msg -} {1 {no files matched glob pattern ""}} -test filename-12.1.5 {simple globbing} {win} { - list [catch {glob -types hidden c:/} msg] $msg -} {1 {no files matched glob pattern "c:/"}} + glob -types hidden {} +} {.} +test filename-12.1.4 {simple globbing} -constraints {win} -body { + glob -types hidden {} +} -returnCodes error -result {no files matched glob pattern ""} +test filename-12.1.5 {simple globbing} -constraints {win} -body { + glob -types hidden c:/ +} -returnCodes error -result {no files matched glob pattern "c:/"} test filename-12.1.6 {simple globbing} {win} { - list [catch {glob c:/} msg] $msg -} {0 c:/} + glob c:/ +} {c:/} test filename-12.3 {simple globbing} { - list [catch {glob -nocomplain \{a1,a2\}} msg] $msg -} {0 {}} - + glob -nocomplain \{a1,a2\} +} {} set globPreResult globTest/ set x1 x1.c set y1 y1.c @@ -1143,92 +1110,67 @@ test filename-12.4 {simple globbing} {unixOrPc} { lsort [glob globTest/x1.c globTest/y1.c globTest/foo] } "$globPreResult$x1 $globPreResult$y1" test filename-12.5 {simple globbing} { - list [catch {glob globTest\\/x1.c} msg] $msg -} "0 $globPreResult$x1" + glob globTest\\/x1.c +} "$globPreResult$x1" test filename-12.6 {simple globbing} { - list [catch {glob globTest\\/\\x1.c} msg] $msg -} "0 $globPreResult$x1" -test filename-12.7 {globbing at filesystem root} {unix} { - set res1 [glob -nocomplain /*] - set res2 [glob -path / *] - set equal [string equal $res1 $res2] - if {!$equal} { - lappend equal "not equal" $res1 $res2 - } - set equal -} {1} -test filename-12.8 {globbing at filesystem root} {unix} { - set dir [lindex [glob -type d /*] 0] - set first [string range $dir 0 1] - set res1 [glob -nocomplain ${first}*] - set res2 [glob -path $first *] - set equal [string equal $res1 $res2] - if {!$equal} { - lappend equal "not equal" $res1 $res2 - } - set equal -} {1} -test filename-12.9 {globbing at filesystem root} {win} { - # Can't grab just anything from 'file volumes' because we need a dir - # that has subdirs - assume that C:/ exists across Windows machines. - set dir [lindex [glob -type d C:/*] 0] - set first [string range $dir 0 3] - set res1 [glob -nocomplain ${first}*] - set res2 [glob -path $first *] - set equal [string equal $res1 $res2] - if {!$equal} { - lappend equal "not equal" $res1 $res2 - } - set equal -} {1} - -test filename-12.10 {globbing with volume relative paths} {win} { - set dir [lindex [glob -type d C:/*] 0] + glob globTest\\/\\x1.c +} "$globPreResult$x1" +test filename-12.7 {globbing at filesystem root} -constraints {unix} -body { + list [glob -nocomplain /*] [glob -path / *] +} -match compareWords -result equal +test filename-12.8 {globbing at filesystem root} -constraints {unix} -body { + set first [string range [lindex [glob -type d /*] 0] 0 1] + list [glob -nocomplain ${first}*] [glob -path $first *] +} -match compareWords -result equal +test filename-12.9 {globbing at filesystem root} -constraints {win} -body { + # Can't grab just anything from 'file volumes' because we need a dir that + # has subdirs - assume that C:/ exists across Windows machines. + set first [string range [lindex [glob -type d C:/*] 0] 0 3] + list [glob -nocomplain ${first}*] [glob -path $first *] +} -match compareWords -result equal +test filename-12.10 {globbing with volume relative paths} -setup { set pwd [pwd] +} -body { + set dir [lindex [glob -type d C:/*] 0] cd C:/ - set res1 [glob -nocomplain [string range $dir 2 end]] + list [glob -nocomplain [string range $dir 2 end]] [list $dir] +} -cleanup { cd $pwd - set res2 [list $dir] - set equal [string equal $res1 $res2] - if {!$equal} { - lappend equal "not equal" $res1 $res2 - } - set equal -} {1} +} -constraints {win} -match compareWords -result equal test filename-13.1 {globbing with brace substitution} { - list [catch {glob globTest/\{\}} msg] $msg -} "0 $globPreResult" -test filename-13.2 {globbing with brace substitution} { - list [catch {glob globTest/\{} msg] $msg -} {1 {unmatched open-brace in file name}} -test filename-13.3 {globbing with brace substitution} { - list [catch {glob globTest/\{\\\}} msg] $msg -} {1 {unmatched open-brace in file name}} -test filename-13.4 {globbing with brace substitution} { - list [catch {glob globTest/\{\\} msg] $msg -} {1 {unmatched open-brace in file name}} -test filename-13.5 {globbing with brace substitution} { - list [catch {glob globTest/\}} msg] $msg -} {1 {unmatched close-brace in file name}} + glob globTest/\{\} +} "$globPreResult" +test filename-13.2 {globbing with brace substitution} -body { + glob globTest/\{ +} -returnCodes error -result {unmatched open-brace in file name} +test filename-13.3 {globbing with brace substitution} -body { + glob globTest/\{\\\} +} -returnCodes error -result {unmatched open-brace in file name} +test filename-13.4 {globbing with brace substitution} -body { + glob globTest/\{\\ +} -returnCodes error -result {unmatched open-brace in file name} +test filename-13.5 {globbing with brace substitution} -body { + glob globTest/\} +} -returnCodes error -result {unmatched close-brace in file name} test filename-13.6 {globbing with brace substitution} { - list [catch {glob globTest/\{\}x1.c} msg] $msg -} "0 $globPreResult$x1" + glob globTest/\{\}x1.c +} "$globPreResult$x1" test filename-13.7 {globbing with brace substitution} { - list [catch {glob globTest/\{x\}1.c} msg] $msg -} "0 $globPreResult$x1" + glob globTest/\{x\}1.c +} "$globPreResult$x1" test filename-13.8 {globbing with brace substitution} { - list [catch {glob globTest/\{x\{\}\}1.c} msg] $msg -} "0 $globPreResult$x1" + glob globTest/\{x\{\}\}1.c +} "$globPreResult$x1" test filename-13.9 {globbing with brace substitution} { - list [lsort [catch {glob globTest/\{x,y\}1.c} msg]] $msg -} [list 0 [list $globPreResult$x1 $globPreResult$y1]] + lsort [glob globTest/\{x,y\}1.c] +} [list $globPreResult$x1 $globPreResult$y1] test filename-13.10 {globbing with brace substitution} { - list [lsort [catch {glob globTest/\{x,,y\}1.c} msg]] $msg -} [list 0 [list $globPreResult$x1 $globPreResult$y1]] + lsort [glob globTest/\{x,,y\}1.c] +} [list $globPreResult$x1 $globPreResult$y1] test filename-13.11 {globbing with brace substitution} {unixOrPc} { - list [lsort [catch {glob globTest/\{x,x\\,z,z\}1.c} msg]] $msg -} {0 {globTest/x1.c globTest/x,z1.c globTest/z1.c}} + lsort [glob globTest/\{x,x\\,z,z\}1.c] +} [lsort {globTest/x1.c globTest/x,z1.c globTest/z1.c}] test filename-13.13 {globbing with brace substitution} { lsort [glob globTest/{a,b,x,y}1.c] } [list $globPreResult$x1 $globPreResult$y1] @@ -1244,9 +1186,9 @@ test filename-13.18 {globbing with brace substitution} {unixOrPc} { test filename-13.20 {globbing with brace substitution} {unixOrPc} { lsort [glob globTest/{a,x}1/*/{x,y}*] } {globTest/a1/b1/x2.c globTest/a1/b2/y2.c} -test filename-13.22 {globbing with brace substitution} { - list [catch {glob globTest/\{a,x\}1/*/\{} msg] $msg -} {1 {unmatched open-brace in file name}} +test filename-13.22 {globbing with brace substitution} -body { + glob globTest/\{a,x\}1/*/\{ +} -returnCodes error -result {unmatched open-brace in file name} test filename-14.1 {asterisks, question marks, and brackets} {unixOrPc} { lsort [glob glo*/*.c] @@ -1254,22 +1196,21 @@ test filename-14.1 {asterisks, question marks, and brackets} {unixOrPc} { test filename-14.3 {asterisks, question marks, and brackets} {unixOrPc} { lsort [glob globTest/?1.c] } {globTest/x1.c globTest/y1.c globTest/z1.c} - -# The current directory could be anywhere; do this to stop spurious matches -file mkdir globTestContext -file rename globTest [file join globTestContext globTest] -set savepwd [pwd] -cd globTestContext - -test filename-14.5 {asterisks, question marks, and brackets} {unixOrPc} { +test filename-14.5 {asterisks, question marks, and brackets} -setup { + # The current directory could be anywhere; do this to stop spurious + # matches + file mkdir globTestContext + file rename globTest [file join globTestContext globTest] + set savepwd [pwd] + cd globTestContext +} -constraints {unixOrPc} -body { lsort [glob */*/*/*.c] -} {globTest/a1/b1/x2.c globTest/a1/b2/y2.c} - -# Reset to where we were -cd $savepwd -file rename [file join globTestContext globTest] globTest -file delete globTestContext - +} -cleanup { + # Reset to where we were + cd $savepwd + file rename [file join globTestContext globTest] globTest + file delete globTestContext +} -result {globTest/a1/b1/x2.c globTest/a1/b2/y2.c} test filename-14.7 {asterisks, question marks, and brackets} {unix} { lsort [glob globTest/*] } {globTest/a1 globTest/a2 globTest/a3 {globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c} @@ -1288,26 +1229,27 @@ test filename-14.13 {asterisks, question marks, and brackets} {unixOrPc} { test filename-14.15 {asterisks, question marks, and brackets} {unixOrPc} { lsort [glob globTest/*/] } {globTest/a1/ globTest/a2/ globTest/a3/} -test filename-14.17 {asterisks, question marks, and brackets} { +test filename-14.17 {asterisks, question marks, and brackets} -setup { global env set temp $env(HOME) +} -body { set env(HOME) [file join $env(HOME) globTest] - set result [list [catch {glob ~/z*} msg] $msg] + glob ~/z* +} -cleanup { set env(HOME) $temp - set result -} [list 0 [list [file join $env(HOME) globTest z1.c]]] +} -result [list [file join $env(HOME) globTest z1.c]] test filename-14.18 {asterisks, question marks, and brackets} {unixOrPc} { - list [catch {lsort [glob globTest/*.c goo/*]} msg] $msg -} {0 {{globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c}} + lsort [glob globTest/*.c goo/*] +} {{globTest/weird name.c} globTest/x,z1.c globTest/x1.c globTest/y1.c globTest/z1.c} test filename-14.20 {asterisks, question marks, and brackets} { - list [catch {glob -nocomplain goo/*} msg] $msg -} {0 {}} -test filename-14.21 {asterisks, question marks, and brackets} { - list [catch {glob globTest/*/gorp} msg] $msg -} {1 {no files matched glob pattern "globTest/*/gorp"}} -test filename-14.22 {asterisks, question marks, and brackets} { - list [catch {glob goo/* x*z foo?q} msg] $msg -} {1 {no files matched glob patterns "goo/* x*z foo?q"}} + glob -nocomplain goo/* +} {} +test filename-14.21 {asterisks, question marks, and brackets} -body { + glob globTest/*/gorp +} -returnCodes error -result {no files matched glob pattern "globTest/*/gorp"} +test filename-14.22 {asterisks, question marks, and brackets} -body { + glob goo/* x*z foo?q +} -returnCodes error -result {no files matched glob patterns "goo/* x*z foo?q"} test filename-14.23 {slash globbing} {unix} { glob / } / @@ -1318,97 +1260,89 @@ test filename-14.24 {slash globbing} {win} { glob {\\} } [file norm /] test filename-14.25 {type specific globbing} {unix} { - list [catch {lsort [glob -dir globTest -types f *]} msg] $msg -} [list 0 [lsort [list \ + lsort [glob -dir globTest -types f *] +} [lsort [list \ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-14.25.1 {type specific globbing} {win} { - list [catch {lsort [glob -dir globTest -types f *]} msg] $msg -} [list 0 [lsort [list \ - [file join $globname .1]\ + lsort [glob -dir globTest -types f *] +} [lsort [list \ + [file join $globname .1]\ [file join $globname "weird name.c"]\ [file join $globname x,z1.c]\ [file join $globname x1.c]\ - [file join $globname y1.c] [file join $globname z1.c]]]] + [file join $globname y1.c] [file join $globname z1.c]]] test filename-14.26 {type specific globbing} { - list [catch {glob -nocomplain -dir globTest -types {readonly} *} msg] $msg -} [list 0 {}] + glob -nocomplain -dir globTest -types {readonly} * +} {} unset globname -# The following tests are only valid for Unix systems. -# On some systems, like AFS, "000" protection doesn't prevent -# access by owner, so the following test is not portable. +# The following tests are only valid for Unix systems. On some systems, like +# AFS, "000" protection doesn't prevent access by owner, so the following test +# is not portable. catch {file attributes globTest/a1 -permissions 0000} test filename-15.1 {unix specific globbing} {unix nonPortable} { - string tolower [list [catch {glob globTest/a1/*} msg] $msg $errorCode] + string tolower [list [catch {glob globTest/a1/*} msg] $msg $errorCode] } {1 {couldn't read directory "globtest/a1": permission denied} {posix eacces {permission denied}}} test filename-15.2 {unix specific no complain: no errors} {unix nonPortable} { glob -nocomplain globTest/a1/* } {} test filename-15.3 {unix specific no complain: no errors, good result} \ {unix nonPortable} { - # test fails because if an error occur , the interp's result - # is reset... + # test fails because if an error occurs, the interp's result is reset... glob -nocomplain globTest/a2 globTest/a1/* globTest/a3 } {globTest/a2 globTest/a3} - catch {file attributes globTest/a1 -permissions 0755} test filename-15.4 {unix specific no complain: no errors, good result} \ {unix nonPortable} { - # test fails because if an error occurs, the interp's result - # is reset... or you don't run at scriptics where the - # outser and welch users exists + # test fails because if an error occurs, the interp's result is reset... + # or you don't run at scriptics where the outser and welch users exists glob -nocomplain ~ouster ~foo ~welch } {/home/ouster /home/welch} test filename-15.4.1 {no complain: errors, sequencing} { - # test used to fail because if an error occurs, the interp's result - # is reset... But, the sequence means we throw a different error - # first. - concat \ - [list [catch {glob -nocomplain ~wontexist ~blahxyz ~} res1] $res1] \ - [list [catch {glob -nocomplain ~ ~blahxyz ~wontexist} res2] $res2] + # test used to fail because if an error occurs, the interp's result is + # reset... But, the sequence means we throw a different error first. + list [catch {glob -nocomplain ~wontexist ~blahxyz ~} res1] $res1 \ + [catch {glob -nocomplain ~ ~blahxyz ~wontexist} res2] $res2 } {1 {user "wontexist" doesn't exist} 1 {user "blahxyz" doesn't exist}} -test filename-15.4.2 {no complain: errors, sequencing} { - # test used to fail because if an error occurs, the interp's result - # is reset... - string equal \ - [list [catch {glob -nocomplain ~wontexist *} res1] $res1] \ - [list [catch {glob -nocomplain * ~wontexist} res2] $res2] -} {1} +test filename-15.4.2 {no complain: errors, sequencing} -body { + # test used to fail because if an error occurs, the interp's result is + # reset... + list [list [catch {glob -nocomplain ~wontexist *} res1] $res1] \ + [list [catch {glob -nocomplain * ~wontexist} res2] $res2] +} -match compareWords -result equal test filename-15.5 {unix specific globbing} {unix nonPortable} { glob ~ouster/.csh* } "/home/ouster/.cshrc" -catch {close [open globTest/odd\\\[\]*?\{\}name w]} -test filename-15.6 {unix specific globbing} {unix} { +touch globTest/odd\\\[\]*?\{\}name +test filename-15.6 {unix specific globbing} -constraints {unix} -setup { global env set temp $env(HOME) +} -body { set env(HOME) $env(HOME)/globTest/odd\\\[\]*?\{\}name - set result [list [catch {glob ~} msg] $msg] + glob ~ +} -cleanup { set env(HOME) $temp - set result -} [list 0 [list [lindex [glob ~] 0]/globTest/odd\\\[\]*?\{\}name]] +} -result [list [lindex [glob ~] 0]/globTest/odd\\\[\]*?\{\}name] catch {file delete -force globTest/odd\\\[\]*?\{\}name} -test filename-15.7 {win specific globbing} {win} { - if {[string index [glob ~] end] == "/"} { - set res "glob ~ is [glob ~] but shouldn't end in a separator" - } else { - set res "ok" - } -} {ok} -test filename-15.8 {win and unix specific globbing} {unixOrWin} { +test filename-15.7 {win specific globbing} -constraints {win} -body { + glob ~ +} -match glob -result {*[^/]} +test filename-15.8 {win and unix specific globbing} -constraints {unixOrWin} -setup { global env set temp $env(HOME) - catch {close [open $env(HOME)/globTest/anyname w]} err +} -body { + touch $env(HOME)/globTest/anyname set env(HOME) $env(HOME)/globTest/anyname - set result [list [catch {glob ~} msg] $msg] + glob ~ +} -cleanup { set env(HOME) $temp catch {file delete -force $env(HOME)/globTest/anyname} - set result -} [list 0 [list [lindex [glob ~] 0]/globTest/anyname]] +} -result [list [lindex [glob ~] 0]/globTest/anyname] # The following tests are only valid for Windows systems. set oldDir [pwd] @@ -1416,24 +1350,25 @@ if {[testConstraint win]} { cd c:/ file delete -force globTest file mkdir globTest - close [open globTest/x1.BAT w] - close [open globTest/y1.Bat w] - close [open globTest/z1.bat w] + touch globTest/x1.BAT + touch globTest/y1.Bat + touch globTest/z1.bat } test filename-16.1 {windows specific globbing} {win} { lsort [glob globTest/*.bat] } {globTest/x1.BAT globTest/y1.Bat globTest/z1.bat} test filename-16.2 {windows specific globbing} {win} { - list [catch {glob c:} res] $res -} {0 c:} -test filename-16.2.1 {windows specific globbing} {win} { + glob c: +} c: +test filename-16.2.1 {windows specific globbing} -constraints {win} -setup { set dir [pwd] +} -body { cd C:/ - set res [list [catch {glob c:} err] $err] + glob c: +} -cleanup { cd $dir - set res -} {0 c:} +} -result c: test filename-16.3 {windows specific globbing} {win} { glob -nocomplain c:\\\\ } c:/ @@ -1461,13 +1396,7 @@ test filename-16.10 {windows specific globbing} {win} { test filename-16.11 {windows specific globbing} {win} { lsort [glob -nocomplain c:\\\\globTest\\\\*.bat] } {c:/globTest/x1.BAT c:/globTest/y1.Bat c:/globTest/z1.bat} - # some tests require a shared C drive - -if {[testConstraint win]} { - testConstraint sharedCdrive [expr {![catch {cd //[info hostname]/c}]}] -} - test filename-16.12 {windows specific globbing} {win sharedCdrive} { cd //[info hostname]/c glob //[info hostname]/c/*Test @@ -1487,46 +1416,38 @@ test filename-16.15 {windows specific globbing} {win} { test filename-16.16 {windows specific globbing} {win} { file tail [lindex [glob -nocomplain "[lindex [glob -types d -dir C:/ *] 0]/.."] 0] } {..} -test filename-16.17 {windows specific globbing} {win} { +test filename-16.17 {windows specific globbing} -constraints {win} -body { cd C:/ - # Ensure correct trimming of tails with absolute and - # volume relative globbing. - set res1 [glob -nocomplain -tails -dir C:/ *] - set res2 [glob -nocomplain -tails -dir C: *] - if {$res1 eq $res2} { - concat ok - } else { - concat $res1 ne $res2 - } -} {ok} + # Ensure correct trimming of tails with absolute and volume relative + # globbing. + list [glob -nocomplain -tails -dir C:/ *] \ + [glob -nocomplain -tails -dir C: *] +} -match compareWords -result equal test filename-17.1 {windows specific special files} {testsetplatform} { testsetplatform win list [file pathtype com1] [file pathtype con] [file pathtype lpt3] \ - [file pathtype prn] [file pathtype nul] [file pathtype aux] \ - [file pathtype foo] + [file pathtype prn] [file pathtype nul] [file pathtype aux] \ + [file pathtype foo] } {absolute absolute absolute absolute absolute absolute relative} if {[testConstraint testsetplatform]} { testsetplatform $platform } - -test filename-17.2 {windows specific glob with executable} {win} { +test filename-17.2 {windows specific glob with executable} -body { makeDirectory execglob makeFile contents execglob/abc.exe makeFile contents execglob/abc.notexecutable - set res [glob -nocomplain -dir [temporaryDirectory]/execglob \ - -tails -types x *] + glob -nocomplain -dir [temporaryDirectory]/execglob -tails -types x * +} -constraints {win} -cleanup { removeFile execglob/abc.exe removeFile execglob/abc.notexecutable removeDirectory execglob - set res -} {abc.exe} +} -result {abc.exe} test fileName-18.1 {windows - split ADS name correctly} {win} { # bug 1194458 set x [file split c:/c:d] - set y [eval [linsert $x 0 file join]] - list $x $y + list $x [file join {*}$x] } {{c:/ ./c:d} c:/c:d} test fileName-19.1 {ensure that [Bug 1325099] stays fixed} { @@ -1547,3 +1468,7 @@ if {[testConstraint testsetplatform]} { catch {unset oldhome temp result globPreResult} ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From de532c94fa09b0520a3bba6eaa50d3f9f57b8000 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 20 Jul 2008 17:55:37 +0000 Subject: Fix [Bug 2008248] and make dict->list->dict round trip efficient to boot. --- ChangeLog | 7 +++++++ generic/tclDictObj.c | 11 +--------- generic/tclListObj.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 63 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7966665..ebe7ee7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-07-20 Donal K. Fellows + * generic/tclDictObj.c (SetDictFromAny): Make the list->dict + transformation a bit more efficient; modern dicts are ordered and so + we can round-trip through lists without needing the string rep at all. + * generic/tclListObj.c (SetListFromAny): Make the dict->list + transformation not lossy of internal representations and hence more + efficient. [Bug 2008248] (ajpasadyn) but using a more efficient patch. + * tests/fileName.test: Revise to reduce the obscurity of tests. In particular, all tests should now produce informative messages on failure and the quantity of [catch]-based obscurity is now greatly diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 2694cf8..eb56e4a 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.65 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.66 2008/07/20 17:55:50 dkf Exp $ */ #include "tclInt.h" @@ -593,15 +593,6 @@ SetDictFromAny( } /* - * If the list is shared its string rep must not be lost so it still - * is the same list. - */ - - if (Tcl_IsShared(objPtr)) { - (void) TclGetString(objPtr); - } - - /* * Build the hash of key/value pairs. */ diff --git a/generic/tclListObj.c b/generic/tclListObj.c index d04fb45..6cf903b 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.50 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.51 2008/07/20 17:55:51 dkf Exp $ */ #include "tclInt.h" @@ -1658,6 +1658,58 @@ SetListFromAny( List *listRepPtr; /* + * Dictionaries are a special case; they have a string representation such + * that *all* valid dictionaries are valid lists. Hence we can convert + * more directly. + */ + + if (objPtr->typePtr == &tclDictType) { + Tcl_Obj *keyPtr, *valuePtr; + Tcl_DictSearch search; + int done, size; + + /* + * Create the new list representation. Note that we do not need to do + * anything with the string representation as the transformation (and + * the reverse back to a dictionary) are both order-preserving. Also + * note that since we know we've got a valid dictionary (by + * representation) we also know that fetching the size of the + * dictionary or iterating over it will not fail. + */ + + Tcl_DictObjSize(NULL, objPtr, &size); + listRepPtr = NewListIntRep(size > 0 ? 2*size : 1, NULL); + if (!listRepPtr) { + Tcl_SetResult(interp, + "insufficient memory to allocate list working space", + TCL_STATIC); + return TCL_ERROR; + } + listRepPtr->elemCount = 2 * size; + + /* + * Populate the list representation. + */ + + elemPtrs = &listRepPtr->elements; + Tcl_DictObjFirst(NULL, objPtr, &search, &keyPtr, &valuePtr, &done); + i = 0; + while (!done) { + elemPtrs[i++] = keyPtr; + elemPtrs[i++] = valuePtr; + Tcl_IncrRefCount(keyPtr); + Tcl_IncrRefCount(valuePtr); + Tcl_DictObjNext(&search, &keyPtr, &valuePtr, &done); + } + + /* + * Swap the representations. + */ + + goto commitRepresentation; + } + + /* * Get the string representation. Make it up-to-date if necessary. */ @@ -1742,9 +1794,10 @@ SetListFromAny( * Tcl_GetStringFromObj, to use that old internalRep. */ + commitRepresentation: listRepPtr->refCount++; TclFreeIntRep(objPtr); - objPtr->internalRep.twoPtrValue.ptr1 = (void *) listRepPtr; + objPtr->internalRep.twoPtrValue.ptr1 = listRepPtr; objPtr->internalRep.twoPtrValue.ptr2 = NULL; objPtr->typePtr = &tclListType; return TCL_OK; -- cgit v0.12 From 884b5b343a6e60cb2a8ae23cbb8affd651b20fd8 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 20 Jul 2008 20:24:45 +0000 Subject: * tests/fileName.test: Repaired the failing test fileName-15.7 from dkf's commit earlier today. --- ChangeLog | 5 +++++ tests/fileName.test | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebe7ee7..16afffa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-20 Kevin B. Kenny + + * tests/fileName.test: Repaired the failing test fileName-15.7 + from dkf's commit earlier today. + 2008-07-20 Donal K. Fellows * generic/tclDictObj.c (SetDictFromAny): Make the list->dict diff --git a/tests/fileName.test b/tests/fileName.test index af2a024..b1125de 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.52 2008/07/20 11:33:41 dkf Exp $ +# RCS: @(#) $Id: fileName.test,v 1.53 2008/07/20 20:24:45 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1331,7 +1331,7 @@ test filename-15.6 {unix specific globbing} -constraints {unix} -setup { catch {file delete -force globTest/odd\\\[\]*?\{\}name} test filename-15.7 {win specific globbing} -constraints {win} -body { glob ~ -} -match glob -result {*[^/]} +} -match regexp -result {[^/]$} test filename-15.8 {win and unix specific globbing} -constraints {unixOrWin} -setup { global env set temp $env(HOME) -- cgit v0.12 From 2083b945305b771d513727a999ee374dd051f321 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 20 Jul 2008 23:57:27 +0000 Subject: add cleanup to fix subsequent test failures with -singleproc 1 --- tests/NRE.test | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/tests/NRE.test b/tests/NRE.test index fddfa32..19bb38f 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.3 2008/07/18 14:02:43 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.4 2008/07/20 23:57:27 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -37,6 +37,7 @@ if {[testConstraint teststacklimit]} { # Tcl execution stack can grow. # +set oldRecursionLimit [interp recursionlimit {}] interp recursionlimit {} 100000 test NRE-1.1 {self-recursive procs} -setup { @@ -329,7 +330,7 @@ test NRE-X.1 {eval in wrong interp} { namespace eval tcl::unsupported namespace export tailcall namespace import tcl::unsupported::tailcall -test NRE-T.1 {tailcall} {tailcall} { +test NRE-T.1 {tailcall} -constraints {tailcall} -body { namespace eval a { unset -nocomplain x proc aset args {uplevel 1 [list set {*}$args]} @@ -343,42 +344,59 @@ test NRE-T.1 {tailcall} {tailcall} { unset -nocomplain x proc aset args {error ::aset} ::b::moo -} 1 +} -cleanup { + rename aset {} + namespace delete a b +} -result 1 -test NRE-T.2 {tailcall in non-proc} {tailcall} { +test NRE-T.2 {tailcall in non-proc} -constraints {tailcall} -body { list [catch {namespace eval a [list tailcall set x 1]} msg] $msg -} {1 {tailcall can only be called from a proc or lambda}} +} -result {1 {tailcall can only be called from a proc or lambda}} -test NRE-T.3 {tailcall falls off tebc} {tailcall} { +test NRE-T.3 {tailcall falls off tebc} -constraints {tailcall} -body { unset -nocomplain x proc foo {} {tailcall set x 1} list [catch foo msg] $msg [set x] -} {0 1 1} +} -cleanup { + rename foo {} + unset x +} -result {0 1 1} -test NRE-T.4 {tailcall falls off tebc} { +test NRE-T.4 {tailcall falls off tebc} -constraints {tailcall} -body { set x 2 proc foo {} {tailcall set x 1} foo set x -} 1 +} -cleanup { + rename foo {} + unset x +} -result 1 -test NRE-T.5 {tailcall falls off tebc} { +test NRE-T.5 {tailcall falls off tebc} -constraints {tailcall} -body { set x 2 namespace eval bar { variable x 3 proc foo {} {tailcall set x 1} } - foo + bar::foo list $x $bar::x -} {1 3} +} -cleanup { + unset x + namespace delete bar +} -result {1 3} -test NRE-T.6 {tailcall does remove callframes} {tailcall} { +test NRE-T.6 {tailcall does remove callframes} -constraints {tailcall} -body { proc foo {} {info level} proc moo {} {tailcall foo} proc boo {} {expr {[moo] - [info level]}} boo -} 1 +} -cleanup { + rename foo {} + rename moo {} + rename boo {} +} -result 1 +namespace forget tcl::unsupported::tailcall # # Test that ensembles are non-recursive @@ -389,8 +407,12 @@ test NRE-T.6 {tailcall does remove callframes} {tailcall} { # cleanup ::tcltest::cleanupTests +interp recursionlimit {} $oldRecursionLimit +unset oldRecursionLimit + if {[testConstraint teststacklimit]} { teststacklimit $oldLimit + unset oldLimit } -- cgit v0.12 From 456ffc75f24234b21ad5de58e70e33366df2563c Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 21 Jul 2008 03:43:26 +0000 Subject: * generic/tclBasic.c: NRE: enabled calling NR commands * generic/tclExecute.c: from the callbacks. Completely * generic/tclInt.h: redone tailcall implementation * generic/tclNRE.h: using the new feature. * generic/tclProc.c: * tests/NRE.test: --- ChangeLog | 9 ++ generic/tclBasic.c | 319 +++++++++++++++++++++++++++++++++++---------------- generic/tclExecute.c | 239 ++++++++++++++++++-------------------- generic/tclInt.h | 5 +- generic/tclNRE.h | 14 +-- generic/tclProc.c | 6 +- tests/NRE.test | 35 ++++-- 7 files changed, 373 insertions(+), 254 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16afffa..c202171 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-07-21 Miguel Sofer + + * generic/tclBasic.c: NRE: enabled calling NR commands + * generic/tclExecute.c: from the callbacks. Completely + * generic/tclInt.h: redone tailcall implementation + * generic/tclNRE.h: using the new feature. + * generic/tclProc.c: + * tests/NRE.test: + 2008-07-20 Kevin B. Kenny * tests/fileName.test: Repaired the failing test fileName-15.7 diff --git a/generic/tclBasic.c b/generic/tclBasic.c index eb35aaf..c06a514 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.316 2008/07/18 23:29:41 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.317 2008/07/21 03:43:26 msofer Exp $ */ #include "tclInt.h" @@ -129,6 +129,8 @@ static Tcl_NRPostProc TEOV_Error; static Tcl_NRPostProc TEOEx_ListCallback; static Tcl_NRPostProc TEOEx_ByteCodeCallback; +static Tcl_NRPostProc TailcallCallback; + /* * The following structure define the commands in the Tcl core. */ @@ -4082,21 +4084,13 @@ Tcl_EvalObjv( * record and proceed with the next call. */ + callbackReentryPoint: switch(recordPtr->type) { case TCL_NR_NO_TYPE: break; case TCL_NR_BC_TYPE: tcl_nr_bc_type: if (USE_NR_TEBC && tebcCall) { - /* - * We were called by TEBC, and we need a bytecode to be executed: - * just ask our caller to do that. - * TEBC_CALL(iPtr) = TEBC_DO_EXEC = 0 is not really needed, as it - * is already 0==TEBC_DO_EXEC - */ - - TEBC_CALL(iPtr) = TEBC_DO_EXEC; - TEBC_DATA(iPtr) = recordPtr->data.codePtr; return TCL_OK; } @@ -4107,40 +4101,17 @@ Tcl_EvalObjv( result = TclExecuteByteCode(interp, recordPtr->data.codePtr); goto done; - case TCL_NR_TAILCALL_TYPE: { + case TCL_NR_TAILCALL_TYPE: /* - * Got to save this record, free the stack (i.e., perform all pending - * callbacks) and restore the record. + * Proceed to cleanup the current command, the tailcall will be run + * from the callbacks. */ - Tcl_Obj *tailObjPtr = recordPtr->data.obj.objPtr; - - result = TclEvalObjv_NR2(interp, result, rootPtr); - - if (result != TCL_OK) { - goto done; - } if (USE_NR_TEBC && tebcCall) { - /* - * We were called by TEBC, and we need it to drop a frame: let him - * know. - */ - - TEBC_CALL(iPtr) = TEBC_DO_TAILCALL; - TEBC_DATA(iPtr) = tailObjPtr; return TCL_OK; } - - /* - * ONLY supported if called from TEBC. Could do an 'uplevel 1'? Run - * from here (as hinted below)? Mmhhh ... FIXME. Maybe tailcalls - * SHOULD actually be bytecompiled (we know how to more or less fake - * it when falling off TEBC)? - */ - - Tcl_Panic("tailcall called from a non-compiled command?"); - /* FALL THROUGH */ - } + recordPtr->type = TCL_NR_NO_TYPE; + break; case TCL_NR_CMD_TYPE: { /* * We got an unshared canonical list to eval , do it from here. @@ -4182,8 +4153,7 @@ Tcl_EvalObjv( case TCL_NR_OBJPROC_TYPE: /* * This is a rewrite like ns-import does, without a new cmdPtr or new - * reentrant call. FIXME: add the possibility of a new callback - * (Tcl_NRObjProc has that), and maybe also edition of objc/objv? + * reentrant call. FIXME NRE: add edition of objc/objv? */ objProc = recordPtr->data.objProc.objProc; @@ -4195,7 +4165,19 @@ Tcl_EvalObjv( } done: - return TclEvalObjv_NR2(interp, result, rootPtr); + result = TclEvalObjv_NR2(interp, result, rootPtr); + recordPtr = TOP_RECORD(iPtr); + if (recordPtr == rootPtr) { + return result; + } + + /* + * A callback scheduled a new evaluation! Deal with it. + * Note that recordPtr was already updated right above. + */ + + assert((result == TCL_OK)); + goto callbackReentryPoint; } int @@ -4206,6 +4188,7 @@ TclEvalObjv_NR2( { Interp *iPtr = (Interp *) interp; TEOV_record *recordPtr; + TEOV_callback *callbackPtr; /* * If the interpreter has a non-empty string result, the result object is @@ -4221,17 +4204,41 @@ TclEvalObjv_NR2( (void) Tcl_GetObjResult(interp); } - while (TOP_RECORD(iPtr) != rootPtr) { - POP_RECORD(iPtr, recordPtr); - + restart: + while ((recordPtr = TOP_RECORD(iPtr)) != rootPtr) { while (recordPtr->callbackPtr) { - TEOV_callback *callbackPtr = recordPtr->callbackPtr; - + callbackPtr = recordPtr->callbackPtr; + recordPtr->callbackPtr = callbackPtr->nextPtr; result = callbackPtr->procPtr(callbackPtr->data, interp, result); - callbackPtr = callbackPtr->nextPtr; - TclSmallFree(recordPtr->callbackPtr); - recordPtr->callbackPtr = callbackPtr; + TclSmallFree(callbackPtr); + + if (recordPtr != TOP_RECORD(iPtr)) { + + if (result != TCL_OK) { + goto restart; + } + + /* + * A callback scheduled a new evaluation; return so that our + * caller can run it. + */ + + switch(recordPtr->type) { + case TCL_NR_NO_TYPE: + goto restart; + case TCL_NR_BC_TYPE: + case TCL_NR_CMD_TYPE: + case TCL_NR_SCRIPT_TYPE: + goto done; + case TCL_NR_TAILCALL_TYPE: + Tcl_Panic("Tailcall called from a callback!"); + default: + Tcl_Panic("TEOV_NR2: invalid record type: %d", + recordPtr->type); + } + } } + TOP_RECORD(iPtr) = recordPtr->nextPtr; if (!CHECK_EXTRA(iPtr, recordPtr)) { Tcl_Panic("TclEvalObjv_NR2: wrong tosPtr?"); @@ -4257,6 +4264,8 @@ TclEvalObjv_NR2( * check at the end. */ + done: + if (TclAsyncReady(iPtr)) { result = Tcl_AsyncInvoke(interp, result); } @@ -7394,48 +7403,62 @@ NRPostProcess( int objc, Tcl_Obj *const objv[]) { - TEOV_record *recordPtr = TOP_RECORD(interp); - - if ((result == TCL_OK) && VALID_NEW_REQUEST(recordPtr)) { + TEOV_record *recordPtr, *rootPtr = TOP_RECORD(interp)->nextPtr; + + restart: + recordPtr = TOP_RECORD(interp); + if (result == TCL_OK) { switch (recordPtr->type) { - case TCL_NR_BC_TYPE: - result = TclExecuteByteCode(interp, recordPtr->data.codePtr); - break; - case TCL_NR_CMD_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - int flags = recordPtr->data.obj.flags; - Tcl_Obj **objv; - int objc; - - Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); - result = Tcl_EvalObjv(interp, objc, objv, flags); - break; - } - case TCL_NR_SCRIPT_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - int flags = recordPtr->data.obj.flags; - - result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); - break; - } - case TCL_NR_OBJPROC_TYPE: { - Tcl_ObjCmdProc *objProc = recordPtr->data.objProc.objProc; - ClientData clientData = recordPtr->data.objProc.clientData; - - if (!objc) { - Tcl_Panic("NRPostProcess: something is very wrong!"); + case TCL_NR_NO_TYPE: + break; + case TCL_NR_BC_TYPE: + result = TclExecuteByteCode(interp, recordPtr->data.codePtr); + break; + case TCL_NR_TAILCALL_TYPE: + Tcl_SetResult(interp, + "impossible to tailcall from a non-NRE enabled command", + TCL_STATIC); + result = TCL_ERROR; + break; + case TCL_NR_CMD_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + int flags = recordPtr->data.obj.flags; + Tcl_Obj **objv; + int objc; + + Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); + result = Tcl_EvalObjv(interp, objc, objv, flags); + break; } - result = (*objProc)(clientData, interp, objc, objv); - break; - } - default: - Tcl_Panic("NRPostProcess: invalid record type: %d", - recordPtr->type); + case TCL_NR_SCRIPT_TYPE: { + Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; + int flags = recordPtr->data.obj.flags; + + result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); + break; + } + case TCL_NR_OBJPROC_TYPE: { + Tcl_ObjCmdProc *objProc = recordPtr->data.objProc.objProc; + ClientData clientData = recordPtr->data.objProc.clientData; + + if (!objc) { + Tcl_Panic("NRPostProcess: something is very wrong!"); + } + result = (*objProc)(clientData, interp, objc, objv); + break; + } + default: + Tcl_Panic("NRPostProcess: invalid record type: %d", + recordPtr->type); } } - - assert((TOP_RECORD(interp) == recordPtr)); - return TclEvalObjv_NR2(interp, result, recordPtr->nextPtr); + + result = TclEvalObjv_NR2(interp, result, rootPtr); + if (TOP_RECORD(interp) != rootPtr) { + assert((result == TCL_OK)); + goto restart; + } + return result; } /* @@ -7599,11 +7622,12 @@ Tcl_NRObjProc( * (b) 'a' is looked up in the returning frame's namespace, but the * command is run in the context to which we are returning * Current implementation does this if [tailcall] is called from within - * a proc, panics otherwise- + * a proc, errors otherwise. * (2) Should a tailcall bypass [catch] in the returning frame? Current - * implementation does not - it causes an error. + * implementation does not (or does it? Changed, test!) - it causes an + * error. * - * FIXME! + * FIXME NRE! */ int @@ -7614,25 +7638,122 @@ TclTailcallObjCmd( Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; - TEOV_record *recordPtr = TOP_RECORD(interp); + TEOV_record *rootPtr = TOP_RECORD(interp); + TEOV_callback *headPtr, *tailPtr; + TEOV_record *tmpPtr; Tcl_Obj *listPtr; - - /* - * Do NOT allow tailcall to be called from a non-proc/lambda: tough to - * manage the proper semantics, especially for [uplevel $x tailcall foo] - */ + Command *cmdPtr; + Namespace *nsPtr = iPtr->varFramePtr->nsPtr; if (!iPtr->varFramePtr->isProcCallFrame) { + /* FIXME! Why error? Just look if we have a TEOV above! */ Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; } - + + nsPtr->activationCount++; listPtr = Tcl_NewListObj(objc-1, objv+1); - Tcl_NREvalObj(interp, listPtr, 0); - recordPtr->type = TCL_NR_TAILCALL_TYPE; + rootPtr->type = TCL_NR_TAILCALL_TYPE; + + /* + * Add a callback to perform the tailcall as LAST item in the caller's + * callback stack. + * Find the first record for the caller: start at the one below the top + * (the top being this command's record), and go back until you find + * the one that contains the cmdPtr. + */ + + tmpPtr = rootPtr->nextPtr; + while (tmpPtr->cmdPtr == NULL) { + tmpPtr = tmpPtr->nextPtr; + } + + /* + * Now find the first and last callbacks in this record, and temporarily + * set the callback list to empty. + */ + + headPtr = tailPtr = tmpPtr->callbackPtr; + if (headPtr) { + while (tailPtr->nextPtr) { + tailPtr = tailPtr->nextPtr; + } + tmpPtr->callbackPtr = NULL; + } + + /* + * Temporarily put tmpPtr as the TOP_RECORD, register a callback, then + * replug things back the way they were. + */ + + TOP_RECORD(iPtr) = tmpPtr; + TclNRAddCallback(interp, TailcallCallback, listPtr, nsPtr, NULL, NULL); + TOP_RECORD(iPtr) = rootPtr; + + if (headPtr) { + tailPtr->nextPtr = tmpPtr->callbackPtr; + tmpPtr->callbackPtr = headPtr; + } + return TCL_OK; } + +static int +TailcallCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_Obj *listPtr = data[0], *namePtr; + Namespace *nsPtr = data[1]; + TEOV_record *recordPtr = TOP_RECORD(iPtr); + Command *cmdPtr; + + if (!recordPtr->cmdPtr || recordPtr->callbackPtr) { + Tcl_Panic("TailcallCallback: should not happen!"); + } + + result = Tcl_ListObjIndex(interp, listPtr, 0, &namePtr); + if (result == TCL_OK) { + cmdPtr = TEOV_LookupCmdFromObj(interp, namePtr, nsPtr); + } + + nsPtr->activationCount--; + if ((nsPtr->flags & NS_DYING) + && (nsPtr->activationCount - (nsPtr == iPtr->globalNsPtr) == 0)) { + /* + * FIXME NRE tailcall: is this the proper way to manage this? This is + * like what CallFrames do. + */ + + Tcl_DeleteNamespace((Tcl_Namespace *) nsPtr); + } + + if (!cmdPtr || (result != TCL_OK)) { + Tcl_DecrRefCount(listPtr); + Tcl_SetResult(interp, + "the command to be tailcalled does not exist", TCL_STATIC); + return TCL_ERROR; + } + + /* + * Take over the previous command's record. + */ + + TclCleanupCommandMacro(recordPtr->cmdPtr); + recordPtr->cmdPtr = cmdPtr; + cmdPtr->refCount++; + + /* + * Push a new record to signal that a new command was scheduled. + */ + + PUSH_RECORD(iPtr, recordPtr); + iPtr->lookupNsPtr = nsPtr; + return TclNREvalCmd(interp, listPtr, 0); +} void Tcl_NRAddCallback( diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 7b9ae49..6243266 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.382 2008/07/18 23:29:43 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.383 2008/07/21 03:43:30 msofer Exp $ */ #include "tclInt.h" @@ -25,9 +25,6 @@ #include #include -static Tcl_NRPostProc TailcallFromTebc; - - /* * Hack to determine whether we may expect IEEE floating point. The hack is * formally incorrect in that non-IEEE platforms might have the same precision @@ -1757,10 +1754,6 @@ TclExecuteByteCode( BottomData *bottomPtr; #if USE_NR_TEBC BottomData *oldBottomPtr = NULL; - - /* for tailcall support */ - Namespace *lookupNsPtr = NULL; - Tcl_Obj *tailObjPtr = NULL; #endif /* @@ -1800,7 +1793,10 @@ TclExecuteByteCode( register int cleanup; Tcl_Obj *objResultPtr; - + int evalFlags = TCL_EVAL_NOERR; +#if (USE_NR_TEBC) + int tailcall = 0; +#endif /* * Result variable - needed only when going to checkForcatch or other * error handlers; also used as local in some opcodes. @@ -1880,24 +1876,9 @@ TclExecuteByteCode( bcFramePtr->data.tebc.pc = NULL; bcFramePtr->cmd.str.cmd = NULL; bcFramePtr->cmd.str.len = 0; -#if USE_NR_TEBC - } else if (tailObjPtr) { - /* - * A request to perform a tailcall; a frame has already been dropped, - * so we just have to ... - * (Note that we already have a refcount for tailObjPtr!) - */ - - *++tosPtr = tailObjPtr; - tailObjPtr = NULL; - iPtr->lookupNsPtr = lookupNsPtr; - lookupNsPtr = NULL; - - /* - * Fake pc, INST_EVAL STK will fix this and resume properly - */ - pc--; - goto tailCallEntryPoint; +#if (USE_NR_TEBC) + } else if (tailcall) { + goto tailcallEntry; #endif } else { /* @@ -2497,7 +2478,11 @@ TclExecuteByteCode( int objc, pcAdjustment; Tcl_Obj **objv; - +#if (USE_NR_TEBC) + TEOV_record *recordPtr; + ByteCode *newCodePtr; +#endif + case INST_EXPR_STK: { /* * Moved here to support transforming the eval of an expression to @@ -2505,13 +2490,12 @@ TclExecuteByteCode( */ #if (USE_NR_TEBC) - pcAdjustment = 1; cleanup = 1; bcFramePtr->data.tebc.pc = (char *) pc; iPtr->cmdFramePtr = bcFramePtr; DECACHE_STACK_INFO(); - TEBC_DATA(iPtr) = CompileExprObj(interp, OBJ_AT_TOS); + newCodePtr = CompileExprObj(interp, OBJ_AT_TOS); CACHE_STACK_INFO(); goto tebc_do_exec; #else @@ -2536,8 +2520,28 @@ TclExecuteByteCode( #endif } +#if (USE_NR_TEBC) + tailcallEntry: { + TEOV_record *recordPtr = TOP_RECORD(iPtr); - tailCallEntryPoint: + /* + * We take over the record's object, with its refCount. Clear the + * record type so that it is not freed again when popping the + * record. + */ + + recordPtr->type = TCL_NR_NO_TYPE; + *++tosPtr = recordPtr->data.obj.objPtr; + evalFlags = recordPtr->data.obj.flags; + recordPtr->type = TCL_NR_NO_TYPE; +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " Tailcall: pushing obj with refCount %i\n", + (OBJ_AT_TOS)->refCount); + } +#endif + } +#endif case INST_EVAL_STK: { /* * Moved here to support transforming the eval of objects to a @@ -2546,16 +2550,25 @@ TclExecuteByteCode( */ Tcl_Obj *objPtr = OBJ_AT_TOS; - ByteCode *newCodePtr; - pcAdjustment = 1; cleanup = 1; - + pcAdjustment = !tailcall; + tailcall = 0; + if (objPtr->typePtr == &tclListType) { /* is a list... */ List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; + Tcl_Obj *copyPtr; if (objPtr->bytes == NULL || /* ...without a string rep */ - listRepPtr->canonicalFlag) {/* ...or that is canonical */ + listRepPtr->canonicalFlag) {/* ...or that is canonical + * */ + if (Tcl_IsShared(objPtr)) { + copyPtr = TclListObjCopy(interp, objPtr); + Tcl_IncrRefCount(copyPtr); + OBJ_AT_TOS = copyPtr; + listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; + Tcl_DecrRefCount(objPtr); + } objc = listRepPtr->elemCount; objv = &listRepPtr->elements; goto doInvocationFromEval; @@ -2576,8 +2589,7 @@ TclExecuteByteCode( */ #if (USE_NR_TEBC) bcFramePtr->data.tebc.pc = (char *) pc; - iPtr->cmdFramePtr = bcFramePtr; - TEBC_DATA(iPtr) = newCodePtr; + iPtr->cmdFramePtr = bcFramePtr; goto tebc_do_exec; #else result = TclExecuteByteCode(interp, newCodePtr); @@ -2692,49 +2704,50 @@ TclExecuteByteCode( DECACHE_STACK_INFO(); +#if (USE_NR_TEBC) TEBC_CALL(iPtr) = 1; - result = Tcl_EvalObjv(interp, objc, objv, TCL_EVAL_NOERR); + recordPtr = TOP_RECORD(iPtr); +#endif + result = Tcl_EvalObjv(interp, objc, objv, evalFlags); CACHE_STACK_INFO(); #if (USE_NR_TEBC) - switch (TEBC_CALL(iPtr)) { - case TEBC_DO_EXEC: { + evalFlags = TCL_EVAL_NOERR; + if (TOP_RECORD(iPtr) != recordPtr) { + assert((result == TCL_OK)); + recordPtr = TOP_RECORD(iPtr); + switch(recordPtr->type) { + case TCL_NR_BC_TYPE: + newCodePtr = recordPtr->data.codePtr; tebc_do_exec: /* * A request to execute a bytecode came back. We save * the current state and restart at the top. */ - assert((result == TCL_OK)); - TEBC_CALL(iPtr) = 0; + pc += pcAdjustment; NR_DATA_BURY(); /* this level's state variables */ - codePtr = TEBC_DATA(iPtr); - result = TCL_OK; + codePtr = newCodePtr; goto nonRecursiveCallStart; - } - case TEBC_DO_TAILCALL: { + case TCL_NR_TAILCALL_TYPE: /* - * A request to perform a tailcall: save the current - * namespace, drop a frame and eval the passed listObj - * in the previous frame while looking up the command - * in the current namespace. Read it again. - * - * We take over tailObjPtr's refcount! + * A request to perform a tailcall: just drop this + * bytecode as it is; the tailCall has been scheduled in + * the callbacks. */ - - assert((result == TCL_OK)); - TEBC_CALL(iPtr) = 0; - tailObjPtr = TEBC_DATA(iPtr); +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " Tailcall: request received\n"); + } +#endif if (catchTop != initCatchTop) { result = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); - Tcl_DecrRefCount(tailObjPtr); - tailObjPtr = NULL; goto checkForCatch; } - lookupNsPtr = iPtr->varFramePtr->nsPtr; - result = TCL_OK; goto abnormalReturn; /* drop a level */ + default: + Tcl_Panic("TEBC: TEOV sent us a record we cannot handle!"); } } #endif @@ -2742,7 +2755,6 @@ TclExecuteByteCode( if (result == TCL_OK) { Tcl_Obj *objPtr; - #ifndef TCL_COMPILE_DEBUG if (*(pc+pcAdjustment) == INST_POP) { NEXT_INST_V((pcAdjustment+1), cleanup, 0); @@ -7760,14 +7772,49 @@ TclExecuteByteCode( * * NR_TEBC */ - bottomPtr = oldBottomPtr; /* back to old bc */ /* Please free anything that might still be on my new stack */ - result = TclEvalObjv_NR2(interp, result, bottomPtr->recordPtr); - assert((TOP_RECORD(iPtr) == bottomPtr->recordPtr)); - - /* restore state variables */ + if (TOP_RECORD(iPtr) != bottomPtr->recordPtr) { + CACHE_STACK_INFO(); + result = TclEvalObjv_NR2(interp, result, bottomPtr->recordPtr); + if (TOP_RECORD(iPtr) != bottomPtr->recordPtr) { + TEOV_record *recordPtr = TOP_RECORD(iPtr); + + assert((result == TCL_OK)); + + /* + * A callback scheduled a new evaluation: process it. + */ + + switch(recordPtr->type) { + case TCL_NR_BC_TYPE: + codePtr = recordPtr->data.codePtr; + goto nonRecursiveCallStart; + case TCL_NR_TAILCALL_TYPE: + /* FIXME NRE tailcall*/ + Tcl_Panic("Tailcall called from a callback!"); + NR_DATA_DIG(); + esPtr = iPtr->execEnvPtr->execStackPtr; + goto abnormalReturn; /* drop a level */ + case TCL_NR_CMD_TYPE: + case TCL_NR_SCRIPT_TYPE: + /* + * FIXME NRE tailcall: error messages will be all wrong? + */ +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " Tailcall: eval request received from callback\n"); + } +#endif + tailcall = 1; + goto restoreStateVariables; + default: + Tcl_Panic("TEBC: TEOV_NR2 sent us a record we cannot handle!"); + } + } + } + restoreStateVariables: NR_DATA_DIG(); esPtr = iPtr->execEnvPtr->execStackPtr; tosPtr = esPtr->tosPtr; @@ -7778,69 +7825,9 @@ TclExecuteByteCode( CACHE_STACK_INFO(); goto nonRecursiveCallReturn; } - - if (tailObjPtr && result == TCL_OK) { - /* - * The best we can do here is to add the tailcall at the FRONT of the - * callback list. This will be a real tailcall if we're lucky to have - * been called from TEOV (or similar), and not-quite-but-almost if - * called from eg TclOO (I think). - * The simplest way to add to the front is: - * (a) push a new record - * (b) add the tailcall as callback to the newly-created 2nd record - * (c) swap the two top records: old top is still top, newly created - * record is second - */ - - TEOV_record *rootPtr, *recordPtr; - - rootPtr = TOP_RECORD(iPtr); - PUSH_RECORD(iPtr, recordPtr); - TclNRAddCallback(interp, TailcallFromTebc, tailObjPtr, lookupNsPtr, NULL, NULL); - - /* Now swap them! */ - recordPtr->nextPtr = rootPtr->nextPtr; - rootPtr->nextPtr = recordPtr; - TOP_RECORD(iPtr) = rootPtr; - } #endif return result; } - -static int -TailcallFromTebc( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - Tcl_Obj *tailObjPtr = data[0]; - Namespace *lookupNsPtr = data[1]; - int objc; - Tcl_Obj **objv; - - Tcl_IncrRefCount(tailObjPtr); /* unshared per construction! */ - if (result != TCL_OK) { - goto done; - } - result = Tcl_ListObjGetElements(NULL, tailObjPtr, &objc, &objv); - if (result != TCL_OK) { - /* shouldn't happen */ - goto done; - } - - /* - * Note that by this time the proc's frame SHOULD BE ALREADY POPPED! We do - * as if it was (don't know what happens with eg TclOO), ie, assume that - * are already in [uplevel 1] from the proc's callFrame.. - */ - - iPtr->lookupNsPtr = lookupNsPtr; - result = Tcl_EvalObjv(interp, objc, objv, TCL_EVAL_INVOKE); - - done: - Tcl_DecrRefCount(tailObjPtr); - return result; -} #undef iPtr #ifdef TCL_COMPILE_DEBUG diff --git a/generic/tclInt.h b/generic/tclInt.h index 202f5b8..93fa71b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.373 2008/07/13 16:07:19 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.374 2008/07/21 03:43:31 msofer Exp $ */ #ifndef _TCLINT @@ -1319,9 +1319,6 @@ typedef struct ExecEnv { int tebcCall; /* used to distinguish tebc calls from * other calls to TEOV, and other comms * between TEBC and TEOV */ - ClientData tebcData; /* used by TEOV to pass data to its - * calling TEBC */ - } ExecEnv; /* diff --git a/generic/tclNRE.h b/generic/tclNRE.h index 08ddcd5..4d44ab2 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.4 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.5 2008/07/21 03:43:32 msofer Exp $ */ @@ -102,7 +102,7 @@ typedef struct TEOV_record { TEOV_callback *callbackPtr; struct TEOV_record *nextPtr; union { - struct ByteCode *codePtr; + struct ByteCode *codePtr; /* TCL_NR_BC_TYPE */ struct { Tcl_Obj *objPtr; int flags; @@ -111,10 +111,6 @@ typedef struct TEOV_record { Tcl_ObjCmdProc *objProc; ClientData clientData; } objProc; - struct { - int objc; - Tcl_Obj *const *objv; - } objv; } data; #if !USE_SMALL_ALLOC /* Extra checks: can disappear later */ @@ -165,12 +161,6 @@ typedef struct TEOV_record { #define TEBC_CALL(iPtr) \ (((Interp *)iPtr)->execEnvPtr->tebcCall) -#define TEBC_DATA(iPtr) \ - (((Interp *)iPtr)->execEnvPtr->tebcData) - -#define TEBC_DO_EXEC 1 /* MUST NOT be 0 */ -#define TEBC_DO_TAILCALL 2 - #define TclNRAddCallback(\ interp,\ postProcPtr,\ diff --git a/generic/tclProc.c b/generic/tclProc.c index 187c789..713ee18 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.149 2008/07/19 22:50:41 nijtmans Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.150 2008/07/21 03:43:32 msofer Exp $ */ #include "tclInt.h" @@ -1737,6 +1737,10 @@ TclObjInterpProcCore( if (result == TCL_OK) { result = TclExecuteByteCode(interp, record.data.codePtr); result = TclEvalObjv_NR2(interp, result, rootPtr); + if (TOP_RECORD(iPtr) != rootPtr) { + /* FIXME NRE & tailcalls */ + Tcl_Panic("TclObjInterpProcCore not yet prepared to deal with evals in callbacks!"); + } result = InterpProcNR2(record.callbackPtr->data, interp, result); TclSmallFree(record.callbackPtr); } diff --git a/tests/NRE.test b/tests/NRE.test index 19bb38f..a881675 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.4 2008/07/20 23:57:27 das Exp $ +# RCS: @(#) $Id: NRE.test,v 1.5 2008/07/21 03:43:32 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -332,22 +332,33 @@ namespace import tcl::unsupported::tailcall test NRE-T.1 {tailcall} -constraints {tailcall} -body { namespace eval a { - unset -nocomplain x - proc aset args {uplevel 1 [list set {*}$args]} - proc foo {} {tailcall aset x 1} + variable x *::a + proc xset {} { + set tmp {} + set ns {[namespace current]} + set level [info level] + for {set i 0} {$i <= [info level]} {incr i} { + uplevel #$i "set x $i$ns" + lappend tmp "$i [info level $i]" + } + lrange $tmp 1 end + } + proc foo {} {tailcall xset; set x noreach} } namespace eval b { - unset -nocomplain x - proc aset args {error b::aset} - proc moo {} {set x 0; ::a::foo; set x} + variable x *::b + proc xset args {error b::xset} + proc moo {} {set x 0; variable y [::a::foo]; set x} } - unset -nocomplain x - proc aset args {error ::aset} - ::b::moo + variable x *:: + proc xset args {error ::xset} + list [::b::moo] | $x $a::x $b::x | $::b::y } -cleanup { - rename aset {} + unset x + rename xset {} namespace delete a b -} -result 1 +} -result {1::b | 0:: *::a *::b | {{1 ::b::moo} {2 xset}}} + test NRE-T.2 {tailcall in non-proc} -constraints {tailcall} -body { list [catch {namespace eval a [list tailcall set x 1]} msg] $msg -- cgit v0.12 From 37df80fe19f5198cd59e7e0d61363316325a7878 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 21 Jul 2008 03:49:52 +0000 Subject: fix uninited and unused var warnings --- generic/tclBasic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c06a514..554e5d2 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.317 2008/07/21 03:43:26 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.318 2008/07/21 03:49:52 msofer Exp $ */ #include "tclInt.h" @@ -7642,7 +7642,6 @@ TclTailcallObjCmd( TEOV_callback *headPtr, *tailPtr; TEOV_record *tmpPtr; Tcl_Obj *listPtr; - Command *cmdPtr; Namespace *nsPtr = iPtr->varFramePtr->nsPtr; if (!iPtr->varFramePtr->isProcCallFrame) { @@ -7709,7 +7708,7 @@ TailcallCallback( Tcl_Obj *listPtr = data[0], *namePtr; Namespace *nsPtr = data[1]; TEOV_record *recordPtr = TOP_RECORD(iPtr); - Command *cmdPtr; + Command *cmdPtr = NULL; if (!recordPtr->cmdPtr || recordPtr->callbackPtr) { Tcl_Panic("TailcallCallback: should not happen!"); -- cgit v0.12 From 9247cfd4dd001327d0b13afb31bd9c53de78c61d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 21 Jul 2008 04:12:34 +0000 Subject: ChangeLog fix --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c202171..9466d26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ * generic/tclBasic.c: NRE: enabled calling NR commands * generic/tclExecute.c: from the callbacks. Completely * generic/tclInt.h: redone tailcall implementation - * generic/tclNRE.h: using the new feature. + * generic/tclNRE.h: using the new feature. [Bug 2021489] * generic/tclProc.c: * tests/NRE.test: -- cgit v0.12 From 884b6dff3c37ee13afd4737b75fd7c23ed011c5d Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 21 Jul 2008 14:42:54 +0000 Subject: Inode numbers on Windows are not unique so avoid the inode check on this platform [Bug 2015723] --- ChangeLog | 4 ++++ generic/tclFCmd.c | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9466d26..7559188 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-21 Pat Thoyts + + * generic/tclFCmd.c: Inodes on windows are unreliable [Bug 2015723] + 2008-07-21 Miguel Sofer * generic/tclBasic.c: NRE: enabled calling NR commands diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 01eea62..dc13ef4 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.45 2008/07/13 23:15:23 nijtmans Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.46 2008/07/21 14:42:57 patthoyts Exp $ */ #include "tclInt.h" @@ -522,12 +522,13 @@ CopyRenameOneFile( } /* - * Prevent copying or renaming a file onto itself. Under Windows, stat - * always returns 0 for st_ino. However, the Windows-specific code - * knows how to deal with copying or renaming a file on top of itself. - * It might be a good idea to write a stat that worked. + * Prevent copying or renaming a file onto itself. On Windows since + * 8.5 we do get an inode number, however the unsigned short field is + * insufficient to accept the Win32 API file id so it is truncated to + * 16 bits and we get collisions. See bug #2015723. */ +#ifndef WIN32 if ((sourceStatBuf.st_ino != 0) && (targetStatBuf.st_ino != 0)) { if ((sourceStatBuf.st_ino == targetStatBuf.st_ino) && (sourceStatBuf.st_dev == targetStatBuf.st_dev)) { @@ -535,6 +536,7 @@ CopyRenameOneFile( goto done; } } +#endif /* * Prevent copying/renaming a file onto a directory and vice-versa. -- cgit v0.12 From 1d5e719008a7c51b66cc13a0a30991af762353c1 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 21 Jul 2008 16:25:58 +0000 Subject: * generic/tcl.decls: Changed the implementation of * generic/tclBasic.c: [namespace import]; removed * generic/tclDecls.h: Tcl_NRObjProc, replaced with * generic/tclExecute.c: Tcl_NRCmdSwap (proposed public * generic/tclInt.h: NRE API). This should fix * generic/tclNRE.h: [Bug 582506]. * generic/tclNamesp.c: * generic/tclStubInit.c: --- ChangeLog | 9 +++++ generic/tcl.decls | 6 ++-- generic/tclBasic.c | 98 ++++++++++++++++++++++++++++++++------------------- generic/tclDecls.h | 19 +++++----- generic/tclExecute.c | 7 +++- generic/tclInt.h | 5 ++- generic/tclNRE.h | 15 ++++---- generic/tclNamesp.c | 18 ++++------ generic/tclStubInit.c | 4 +-- 9 files changed, 106 insertions(+), 75 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7559188..d70a848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,15 @@ 2008-07-21 Miguel Sofer + * generic/tcl.decls: Changed the implementation of + * generic/tclBasic.c: [namespace import]; removed + * generic/tclDecls.h: Tcl_NRObjProc, replaced with + * generic/tclExecute.c: Tcl_NRCmdSwap (proposed public + * generic/tclInt.h: NRE API). This should fix + * generic/tclNRE.h: [Bug 582506]. + * generic/tclNamesp.c: + * generic/tclStubInit.c: + * generic/tclBasic.c: NRE: enabled calling NR commands * generic/tclExecute.c: from the callbacks. Completely * generic/tclInt.h: redone tailcall implementation diff --git a/generic/tcl.decls b/generic/tcl.decls index 5ca73c7..c7f5d34 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.135 2008/07/18 13:46:39 msofer Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.136 2008/07/21 16:25:59 msofer Exp $ library tcl @@ -2123,8 +2123,8 @@ declare 584 generic { int flags) } declare 585 generic { - int Tcl_NRObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, - ClientData clientData) + int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc, + Tcl_Obj *CONST objv[]) } declare 586 generic { void Tcl_NRAddCallback(Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 554e5d2..7b08f66 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.318 2008/07/21 03:49:52 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.319 2008/07/21 16:26:01 msofer Exp $ */ #include "tclInt.h" @@ -3918,10 +3918,27 @@ Tcl_EvalObjv( * TCL_EVAL_GLOBAL, TCL_EVAL_INVOKE and * TCL_EVAL_NOERR are currently supported. */ { - Command *cmdPtr; + return TclEvalObjv(interp, objc, objv, flags, NULL); +} + +int +TclEvalObjv( + Tcl_Interp *interp, /* Interpreter in which to evaluate the + * command. Also used for error reporting. */ + int objc, /* Number of words in command. */ + Tcl_Obj *const objv[], /* An array of pointers to objects that are + * the words that make up the command. */ + int flags, /* Collection of OR-ed bits that control the + * evaluation of the script. Only + * TCL_EVAL_GLOBAL, TCL_EVAL_INVOKE and + * TCL_EVAL_NOERR are currently supported. */ + Command *cmdPtr) /* NULL if the Command is to be looked up + * here, otherwise the pointer to the + * requested Command struct to be invoked. */ +{ Interp *iPtr = (Interp *) interp; int result; - Namespace *lookupNsPtr; + Namespace *lookupNsPtr = NULL; TEOV_record *rootPtr = TOP_RECORD(iPtr); TEOV_record *recordPtr; Tcl_ObjCmdProc *objProc; @@ -3930,6 +3947,14 @@ Tcl_EvalObjv( TEBC_CALL(iPtr) = 0; + if (cmdPtr) { + if (iPtr->lookupNsPtr) { + iPtr->lookupNsPtr = NULL; + } + PUSH_RECORD(interp, recordPtr); + goto commandFound; + } + restartAtTop: TclResetCancellation(interp, 0); iPtr->numLevels++; @@ -3993,6 +4018,18 @@ Tcl_EvalObjv( goto done; } + iPtr->cmdCount++; + if (TclLimitExceeded(iPtr->limit)) { + result = TCL_ERROR; + iPtr->numLevels--; + goto done; + } + + /* + * Found a command! The real work begins now ... + */ + + commandFound: if (iPtr->tracePtr || (cmdPtr->flags & CMD_HAS_EXEC_TRACES)) { /* * Call enter traces. They will schedule a call to the leave traces if @@ -4009,10 +4046,6 @@ Tcl_EvalObjv( } } - /* - * Found a command! The real work begins now ... - */ - if (TCL_DTRACE_CMD_ARGS_ENABLED()) { char *a[10]; int i = 0; @@ -4050,13 +4083,6 @@ Tcl_EvalObjv( * where it really belongs, and do not really know what it does either. */ - iPtr->cmdCount++; - if (TclLimitExceeded(iPtr->limit)) { - result = TCL_ERROR; - iPtr->numLevels--; - goto done; - } - objProc = cmdPtr->nreProc; if (!objProc) { objProc = cmdPtr->objProc; @@ -4066,13 +4092,12 @@ Tcl_EvalObjv( COMPLETE_RECORD(recordPtr); cmdPtr->refCount++; - objProcReentryPoint: /* * If this is an NR-enabled command, find the real objProc. */ result = (*objProc)(objClientData, interp, objc, objv); - if ((result != TCL_OK) || !VALID_NEW_REQUEST(recordPtr)) { + if (result != TCL_OK) { #if 0 TclStackPurge(interp, recordPtr->tosPtr); #endif @@ -4150,16 +4175,16 @@ Tcl_EvalObjv( } goto done; } - case TCL_NR_OBJPROC_TYPE: + case TCL_NR_CMDSWAP_TYPE: /* - * This is a rewrite like ns-import does, without a new cmdPtr or new - * reentrant call. FIXME NRE: add edition of objc/objv? + * This is a cmdPtr swap like ns-import does. */ - objProc = recordPtr->data.objProc.objProc; - objClientData = recordPtr->data.objProc.clientData; + cmdPtr = recordPtr->cmdPtr; + objc = recordPtr->data.objcv.objc; + objv = recordPtr->data.objcv.objv; recordPtr->type = TCL_NR_NO_TYPE; - goto objProcReentryPoint; + goto commandFound; default: Tcl_Panic("TEOV: unknown NR-request type %i!", recordPtr->type); } @@ -4229,6 +4254,7 @@ TclEvalObjv_NR2( case TCL_NR_BC_TYPE: case TCL_NR_CMD_TYPE: case TCL_NR_SCRIPT_TYPE: + case TCL_NR_CMDSWAP_TYPE: goto done; case TCL_NR_TAILCALL_TYPE: Tcl_Panic("Tailcall called from a callback!"); @@ -7419,7 +7445,7 @@ NRPostProcess( "impossible to tailcall from a non-NRE enabled command", TCL_STATIC); result = TCL_ERROR; - break; + break; case TCL_NR_CMD_TYPE: { Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; int flags = recordPtr->data.obj.flags; @@ -7437,14 +7463,9 @@ NRPostProcess( result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); break; } - case TCL_NR_OBJPROC_TYPE: { - Tcl_ObjCmdProc *objProc = recordPtr->data.objProc.objProc; - ClientData clientData = recordPtr->data.objProc.clientData; - - if (!objc) { - Tcl_Panic("NRPostProcess: something is very wrong!"); - } - result = (*objProc)(clientData, interp, objc, objv); + case TCL_NR_CMDSWAP_TYPE: { + result = TclEvalObjv(interp, recordPtr->data.objcv.objc, + recordPtr->data.objcv.objv, 0, recordPtr->cmdPtr); break; } default: @@ -7593,16 +7614,19 @@ Tcl_NREvalObj( } int -Tcl_NRObjProc( +Tcl_NRCmdSwap( Tcl_Interp *interp, - Tcl_ObjCmdProc *objProc, - ClientData clientData) + Tcl_Command cmd, + int objc, + Tcl_Obj *const objv[]) { TEOV_record *recordPtr = TOP_RECORD(interp); - recordPtr->type = TCL_NR_OBJPROC_TYPE; - recordPtr->data.objProc.objProc = objProc; - recordPtr->data.objProc.clientData = clientData; + recordPtr->type = TCL_NR_CMDSWAP_TYPE; + recordPtr->cmdPtr = (Command *) cmd; + recordPtr->data.objcv.objc = objc; + recordPtr->data.objcv.objv = (Tcl_Obj **) objv; + return TCL_OK; } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 31e3751..b644952 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.136 2008/07/18 13:46:43 msofer Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.137 2008/07/21 16:26:01 msofer Exp $ */ #ifndef _TCLDECLS @@ -3534,12 +3534,11 @@ EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); #endif -#ifndef Tcl_NRObjProc_TCL_DECLARED -#define Tcl_NRObjProc_TCL_DECLARED +#ifndef Tcl_NRCmdSwap_TCL_DECLARED +#define Tcl_NRCmdSwap_TCL_DECLARED /* 585 */ -EXTERN int Tcl_NRObjProc (Tcl_Interp * interp, - Tcl_ObjCmdProc * objProc, - ClientData clientData); +EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, + int objc, Tcl_Obj *CONST objv[]); #endif #ifndef Tcl_NRAddCallback_TCL_DECLARED #define Tcl_NRAddCallback_TCL_DECLARED @@ -4201,7 +4200,7 @@ typedef struct TclStubs { Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ - int (*tcl_NRObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData); /* 585 */ + int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[]); /* 585 */ void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ } TclStubs; @@ -6616,9 +6615,9 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_NREvalObjv \ (tclStubsPtr->tcl_NREvalObjv) /* 584 */ #endif -#ifndef Tcl_NRObjProc -#define Tcl_NRObjProc \ - (tclStubsPtr->tcl_NRObjProc) /* 585 */ +#ifndef Tcl_NRCmdSwap +#define Tcl_NRCmdSwap \ + (tclStubsPtr->tcl_NRCmdSwap) /* 585 */ #endif #ifndef Tcl_NRAddCallback #define Tcl_NRAddCallback \ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 6243266..0be6655 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.383 2008/07/21 03:43:30 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.384 2008/07/21 16:26:02 msofer Exp $ */ #include "tclInt.h" @@ -7775,6 +7775,7 @@ TclExecuteByteCode( bottomPtr = oldBottomPtr; /* back to old bc */ /* Please free anything that might still be on my new stack */ + resumeCleanup: if (TOP_RECORD(iPtr) != bottomPtr->recordPtr) { CACHE_STACK_INFO(); result = TclEvalObjv_NR2(interp, result, bottomPtr->recordPtr); @@ -7809,6 +7810,10 @@ TclExecuteByteCode( #endif tailcall = 1; goto restoreStateVariables; + case TCL_NR_CMDSWAP_TYPE: + result = TclEvalObjv(interp, recordPtr->data.objcv.objc, + recordPtr->data.objcv.objv, 0, recordPtr->cmdPtr); + goto resumeCleanup; default: Tcl_Panic("TEBC: TEOV_NR2 sent us a record we cannot handle!"); } diff --git a/generic/tclInt.h b/generic/tclInt.h index 93fa71b..1857153 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.374 2008/07/21 03:43:31 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.375 2008/07/21 16:26:06 msofer Exp $ */ #ifndef _TCLINT @@ -2477,9 +2477,12 @@ MODULE_SCOPE char tclEmptyString; *---------------------------------------------------------------- */ +/* Introduced by/for NRE */ MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); +MODULE_SCOPE int TclEvalObjv(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[], int flags, Command *cmdPtr); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); diff --git a/generic/tclNRE.h b/generic/tclNRE.h index 4d44ab2..e0d692d 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.5 2008/07/21 03:43:32 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.6 2008/07/21 16:26:08 msofer Exp $ */ @@ -108,9 +108,9 @@ typedef struct TEOV_record { int flags; } obj; struct { - Tcl_ObjCmdProc *objProc; - ClientData clientData; - } objProc; + int objc; + Tcl_Obj **objv; + } objcv; } data; #if !USE_SMALL_ALLOC /* Extra checks: can disappear later */ @@ -126,11 +126,11 @@ typedef struct TEOV_record { #define TCL_NR_NO_TYPE 0 /* for internal (cleanup) use only */ #define TCL_NR_BC_TYPE 2 /* procs, lambdas, TclOO+Itcl sometime ... */ -#define TCL_NR_OBJPROC_TYPE 4 /* ns-imports (cmdd redirect) */ +#define TCL_NR_CMDSWAP_TYPE 4 /* ns-imports (cmdd redirect) */ #define TCL_NR_TAILCALL_TYPE 6 #define TCL_NR_TEBC_SWAPENV_TYPE 8 /* continuations, micro-threads !? */ -#define TCL_NR_CMD_TYPE 1 /* i-alias, ns-ens use this */ +#define TCL_NR_CMD_TYPE 1 /* i-alias, ns-ens use this */ #define TCL_NR_SCRIPT_TYPE 3 /* ns-eval, uplevel use this */ #define TCL_NR_HAS_OBJ(TYPE) ((TYPE) & 1) @@ -223,9 +223,6 @@ typedef struct TEOV_record { TCLNR_FREE(((Tcl_Interp *)iPtr), recordPtr); \ } -#define VALID_NEW_REQUEST(recordPtr) \ - ( (recordPtr)->callbackPtr || ((recordPtr)->type != TCL_NR_NO_TYPE)) - #define CHECK_VALID_RETURN(iPtr, recordPtr) \ ((TOP_RECORD(iPtr) == recordPtr) && \ CHECK_EXTRA(iPtr, recordPtr)) diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index f657e75..cf7e250 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.169 2008/07/19 22:50:41 nijtmans Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.170 2008/07/21 16:26:08 msofer Exp $ */ #include "tclInt.h" @@ -1894,14 +1894,10 @@ InvokeImportedNRCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { - register ImportedCmdData *dataPtr = clientData; - register Command *realCmdPtr = dataPtr->realCmdPtr; + ImportedCmdData *dataPtr = clientData; + Command *realCmdPtr = dataPtr->realCmdPtr; - if (!realCmdPtr->nreProc) { - return realCmdPtr->objProc(realCmdPtr->objClientData, interp, - objc, objv); - } - return realCmdPtr->nreProc(realCmdPtr->objClientData, interp, objc, objv); + return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv); } static int @@ -1912,10 +1908,8 @@ InvokeImportedCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { - register ImportedCmdData *dataPtr = clientData; - register Command *realCmdPtr = dataPtr->realCmdPtr; - - return realCmdPtr->objProc(realCmdPtr->objClientData, interp, objc, objv); + return Tcl_NRCallObjProc(interp, InvokeImportedNRCmd, clientData, + objc, objv); } /* diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 84aca49..7d310d7 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.157 2008/07/18 13:46:47 msofer Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.158 2008/07/21 16:26:09 msofer Exp $ */ #include "tclInt.h" @@ -1111,7 +1111,7 @@ static const TclStubs tclStubs = { Tcl_NRCreateCommand, /* 582 */ Tcl_NREvalObj, /* 583 */ Tcl_NREvalObjv, /* 584 */ - Tcl_NRObjProc, /* 585 */ + Tcl_NRCmdSwap, /* 585 */ Tcl_NRAddCallback, /* 586 */ Tcl_NRCallObjProc, /* 587 */ }; -- cgit v0.12 From 24289b9502c809549472c1edc7398415f51f578e Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 21 Jul 2008 19:41:42 +0000 Subject: use TclEvalObjv instead of Tcl_EvalObjv at selected spots --- generic/tclBasic.c | 6 +++--- generic/tclExecute.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7b08f66..7a9b32f 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.319 2008/07/21 16:26:01 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.320 2008/07/21 19:41:42 msofer Exp $ */ #include "tclInt.h" @@ -5059,7 +5059,7 @@ TclEvalEx( eeFramePtr->line = lines; iPtr->cmdFramePtr = eeFramePtr; - code = Tcl_EvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR); + code = TclEvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR, NULL); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; eeFramePtr->line = NULL; @@ -7453,7 +7453,7 @@ NRPostProcess( int objc; Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); - result = Tcl_EvalObjv(interp, objc, objv, flags); + result = TclEvalObjv(interp, objc, objv, flags, NULL); break; } case TCL_NR_SCRIPT_TYPE: { diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0be6655..148b3e9 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.384 2008/07/21 16:26:02 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.385 2008/07/21 19:41:42 msofer Exp $ */ #include "tclInt.h" @@ -2686,7 +2686,7 @@ TclExecuteByteCode( #endif /*TCL_COMPILE_DEBUG*/ /* - * Finally, let Tcl_EvalObjv handle the command. + * Finally, let TclEvalObjv handle the command. * * TIP #280: Record the last piece of info needed by * 'TclGetSrcInfoForPc', and push the frame. @@ -2697,7 +2697,7 @@ TclExecuteByteCode( /* * Reset the instructionCount variable, since we're about to check - * for async stuff anyway while processing Tcl_EvalObjv + * for async stuff anyway while processing TclEvalObjv */ instructionCount = 1; @@ -2708,7 +2708,7 @@ TclExecuteByteCode( TEBC_CALL(iPtr) = 1; recordPtr = TOP_RECORD(iPtr); #endif - result = Tcl_EvalObjv(interp, objc, objv, evalFlags); + result = TclEvalObjv(interp, objc, objv, evalFlags, NULL); CACHE_STACK_INFO(); #if (USE_NR_TEBC) evalFlags = TCL_EVAL_NOERR; -- cgit v0.12 From 4ca6151924c3e7338fb1cdca30d81430477673f8 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 21 Jul 2008 21:02:11 +0000 Subject: TIP #304 implementation --- ChangeLog | 12 + doc/chan.n | 13 +- generic/tcl.decls | 8 +- generic/tclDecls.h | 13290 ++++++++++++++++++++++---------------------- generic/tclIOCmd.c | 51 +- generic/tclIntDecls.h | 4322 +++++++------- generic/tclIntPlatDecls.h | 1410 ++--- generic/tclOODecls.h | 764 +-- generic/tclOOIntDecls.h | 528 +- generic/tclOOStubInit.c | 156 +- generic/tclPlatDecls.h | 274 +- generic/tclStubInit.c | 2261 ++++---- generic/tclTomMathDecls.h | 1570 +++--- tests/chan.test | 38 +- tests/ioCmd.test | 11 +- tests/ioTrans.test | 11 +- unix/tclUnixPipe.c | 46 +- win/tclWinPipe.c | 53 +- 18 files changed, 12518 insertions(+), 12300 deletions(-) diff --git a/ChangeLog b/ChangeLog index d70a848..16ec059 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-07-21 Alexandre Ferrieux + + TIP #304 IMPLEMENTATION + + * generic/tcl.decls: public API + * generic/tclIOCmds.c: generic part + * unix/tclUnixPipe.c: OS part + * win/tclWinPipe.c: OS part + * tests/chan.test: [chan pipe] tests + * tests/ioCmd.test: modernized checks + * tests/ioTrans.test: + 2008-07-21 Pat Thoyts * generic/tclFCmd.c: Inodes on windows are unreliable [Bug 2015723] diff --git a/doc/chan.n b/doc/chan.n index 82c8b50..a202b30 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.17 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.18 2008/07/21 21:02:15 ferrieux Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -697,6 +697,17 @@ Sets the byte length of the underlying data stream for the channel named \fIchannelId\fR to be \fIlength\fR (or to the current byte offset within the underlying data stream if \fIlength\fR is omitted). The channel is flushed before truncation. +.TP +\fBchan pipe\fR +. +Creates a standalone pipe whose read- and write-side channels are +returned as a 2-element list, the first element being the read side and +the second the write side. Can be useful e.g. to redirect +separately stderr and stdout from a subprocess. To do this, spawn with "2>@" or +">@" redirection operators onto the write side of a pipe, and then +immediately close it in the parent. This is necessary to get an EOF on +the read side once the child has exited or otherwise closed its output. +. .SH EXAMPLE This opens a file using a known encoding (CP1252, a very common encoding on Windows), searches for a string, rewrites that part, and truncates the diff --git a/generic/tcl.decls b/generic/tcl.decls index c7f5d34..60d85fa 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.136 2008/07/21 16:25:59 msofer Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.137 2008/07/21 21:02:15 ferrieux Exp $ library tcl @@ -2140,6 +2140,11 @@ declare 587 generic { Tcl_Obj *const objv[]) } +# TIP#304 (chan pipe) + +declare 588 generic { + int Tcl_CreatePipe (Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags) +} ############################################################################## @@ -2183,6 +2188,7 @@ declare 1 macosx { char *libraryPath) } + ############################################################################## # Public functions that are not accessible via the stubs table. diff --git a/generic/tclDecls.h b/generic/tclDecls.h index b644952..171a93f 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1,6639 +1,6651 @@ -/* - * tclDecls.h -- - * - * Declarations of functions in the platform independent public Tcl API. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclDecls.h,v 1.137 2008/07/21 16:26:01 msofer Exp $ - */ - -#ifndef _TCLDECLS -#define _TCLDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef Tcl_PkgProvideEx_TCL_DECLARED -#define Tcl_PkgProvideEx_TCL_DECLARED -/* 0 */ -EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, - CONST char* name, CONST char* version, - ClientData clientData); -#endif -#ifndef Tcl_PkgRequireEx_TCL_DECLARED -#define Tcl_PkgRequireEx_TCL_DECLARED -/* 1 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_Panic_TCL_DECLARED -#define Tcl_Panic_TCL_DECLARED -/* 2 */ -EXTERN void Tcl_Panic (CONST char * format, ...); -#endif -#ifndef Tcl_Alloc_TCL_DECLARED -#define Tcl_Alloc_TCL_DECLARED -/* 3 */ -EXTERN char * Tcl_Alloc (unsigned int size); -#endif -#ifndef Tcl_Free_TCL_DECLARED -#define Tcl_Free_TCL_DECLARED -/* 4 */ -EXTERN void Tcl_Free (char * ptr); -#endif -#ifndef Tcl_Realloc_TCL_DECLARED -#define Tcl_Realloc_TCL_DECLARED -/* 5 */ -EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_DbCkalloc_TCL_DECLARED -#define Tcl_DbCkalloc_TCL_DECLARED -/* 6 */ -EXTERN char * Tcl_DbCkalloc (unsigned int size, CONST char * file, - int line); -#endif -#ifndef Tcl_DbCkfree_TCL_DECLARED -#define Tcl_DbCkfree_TCL_DECLARED -/* 7 */ -EXTERN int Tcl_DbCkfree (char * ptr, CONST char * file, - int line); -#endif -#ifndef Tcl_DbCkrealloc_TCL_DECLARED -#define Tcl_DbCkrealloc_TCL_DECLARED -/* 8 */ -EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, - CONST char * file, int line); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer_TCL_DECLARED -#define Tcl_SetTimer_TCL_DECLARED -/* 11 */ -EXTERN void Tcl_SetTimer (Tcl_Time * timePtr); -#endif -#ifndef Tcl_Sleep_TCL_DECLARED -#define Tcl_Sleep_TCL_DECLARED -/* 12 */ -EXTERN void Tcl_Sleep (int ms); -#endif -#ifndef Tcl_WaitForEvent_TCL_DECLARED -#define Tcl_WaitForEvent_TCL_DECLARED -/* 13 */ -EXTERN int Tcl_WaitForEvent (Tcl_Time * timePtr); -#endif -#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED -#define Tcl_AppendAllObjTypes_TCL_DECLARED -/* 14 */ -EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendStringsToObj_TCL_DECLARED -#define Tcl_AppendStringsToObj_TCL_DECLARED -/* 15 */ -EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); -#endif -#ifndef Tcl_AppendToObj_TCL_DECLARED -#define Tcl_AppendToObj_TCL_DECLARED -/* 16 */ -EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, CONST char* bytes, - int length); -#endif -#ifndef Tcl_ConcatObj_TCL_DECLARED -#define Tcl_ConcatObj_TCL_DECLARED -/* 17 */ -EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_ConvertToType_TCL_DECLARED -#define Tcl_ConvertToType_TCL_DECLARED -/* 18 */ -EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_DbDecrRefCount_TCL_DECLARED -#define Tcl_DbDecrRefCount_TCL_DECLARED -/* 19 */ -EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, - CONST char * file, int line); -#endif -#ifndef Tcl_DbIncrRefCount_TCL_DECLARED -#define Tcl_DbIncrRefCount_TCL_DECLARED -/* 20 */ -EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, - CONST char * file, int line); -#endif -#ifndef Tcl_DbIsShared_TCL_DECLARED -#define Tcl_DbIsShared_TCL_DECLARED -/* 21 */ -EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, CONST char * file, - int line); -#endif -#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED -#define Tcl_DbNewBooleanObj_TCL_DECLARED -/* 22 */ -EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, - CONST char * file, int line); -#endif -#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED -#define Tcl_DbNewByteArrayObj_TCL_DECLARED -/* 23 */ -EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (CONST unsigned char * bytes, - int length, CONST char * file, int line); -#endif -#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED -#define Tcl_DbNewDoubleObj_TCL_DECLARED -/* 24 */ -EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, - CONST char * file, int line); -#endif -#ifndef Tcl_DbNewListObj_TCL_DECLARED -#define Tcl_DbNewListObj_TCL_DECLARED -/* 25 */ -EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *CONST * objv, - CONST char * file, int line); -#endif -#ifndef Tcl_DbNewLongObj_TCL_DECLARED -#define Tcl_DbNewLongObj_TCL_DECLARED -/* 26 */ -EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, CONST char * file, - int line); -#endif -#ifndef Tcl_DbNewObj_TCL_DECLARED -#define Tcl_DbNewObj_TCL_DECLARED -/* 27 */ -EXTERN Tcl_Obj * Tcl_DbNewObj (CONST char * file, int line); -#endif -#ifndef Tcl_DbNewStringObj_TCL_DECLARED -#define Tcl_DbNewStringObj_TCL_DECLARED -/* 28 */ -EXTERN Tcl_Obj * Tcl_DbNewStringObj (CONST char * bytes, int length, - CONST char * file, int line); -#endif -#ifndef Tcl_DuplicateObj_TCL_DECLARED -#define Tcl_DuplicateObj_TCL_DECLARED -/* 29 */ -EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); -#endif -#ifndef TclFreeObj_TCL_DECLARED -#define TclFreeObj_TCL_DECLARED -/* 30 */ -EXTERN void TclFreeObj (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetBoolean_TCL_DECLARED -#define Tcl_GetBoolean_TCL_DECLARED -/* 31 */ -EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, - CONST char * src, int * boolPtr); -#endif -#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED -#define Tcl_GetBooleanFromObj_TCL_DECLARED -/* 32 */ -EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * boolPtr); -#endif -#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED -#define Tcl_GetByteArrayFromObj_TCL_DECLARED -/* 33 */ -EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetDouble_TCL_DECLARED -#define Tcl_GetDouble_TCL_DECLARED -/* 34 */ -EXTERN int Tcl_GetDouble (Tcl_Interp * interp, CONST char * src, - double * doublePtr); -#endif -#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED -#define Tcl_GetDoubleFromObj_TCL_DECLARED -/* 35 */ -EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * doublePtr); -#endif -#ifndef Tcl_GetIndexFromObj_TCL_DECLARED -#define Tcl_GetIndexFromObj_TCL_DECLARED -/* 36 */ -EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST84 char ** tablePtr, - CONST char * msg, int flags, int * indexPtr); -#endif -#ifndef Tcl_GetInt_TCL_DECLARED -#define Tcl_GetInt_TCL_DECLARED -/* 37 */ -EXTERN int Tcl_GetInt (Tcl_Interp * interp, CONST char * src, - int * intPtr); -#endif -#ifndef Tcl_GetIntFromObj_TCL_DECLARED -#define Tcl_GetIntFromObj_TCL_DECLARED -/* 38 */ -EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * intPtr); -#endif -#ifndef Tcl_GetLongFromObj_TCL_DECLARED -#define Tcl_GetLongFromObj_TCL_DECLARED -/* 39 */ -EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * longPtr); -#endif -#ifndef Tcl_GetObjType_TCL_DECLARED -#define Tcl_GetObjType_TCL_DECLARED -/* 40 */ -EXTERN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); -#endif -#ifndef Tcl_GetStringFromObj_TCL_DECLARED -#define Tcl_GetStringFromObj_TCL_DECLARED -/* 41 */ -EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_InvalidateStringRep_TCL_DECLARED -#define Tcl_InvalidateStringRep_TCL_DECLARED -/* 42 */ -EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjAppendList_TCL_DECLARED -#define Tcl_ListObjAppendList_TCL_DECLARED -/* 43 */ -EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); -#endif -#ifndef Tcl_ListObjAppendElement_TCL_DECLARED -#define Tcl_ListObjAppendElement_TCL_DECLARED -/* 44 */ -EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjGetElements_TCL_DECLARED -#define Tcl_ListObjGetElements_TCL_DECLARED -/* 45 */ -EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * objcPtr, - Tcl_Obj *** objvPtr); -#endif -#ifndef Tcl_ListObjIndex_TCL_DECLARED -#define Tcl_ListObjIndex_TCL_DECLARED -/* 46 */ -EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj ** objPtrPtr); -#endif -#ifndef Tcl_ListObjLength_TCL_DECLARED -#define Tcl_ListObjLength_TCL_DECLARED -/* 47 */ -EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * lengthPtr); -#endif -#ifndef Tcl_ListObjReplace_TCL_DECLARED -#define Tcl_ListObjReplace_TCL_DECLARED -/* 48 */ -EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, - Tcl_Obj * listPtr, int first, int count, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_NewBooleanObj_TCL_DECLARED -#define Tcl_NewBooleanObj_TCL_DECLARED -/* 49 */ -EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); -#endif -#ifndef Tcl_NewByteArrayObj_TCL_DECLARED -#define Tcl_NewByteArrayObj_TCL_DECLARED -/* 50 */ -EXTERN Tcl_Obj * Tcl_NewByteArrayObj (CONST unsigned char* bytes, - int length); -#endif -#ifndef Tcl_NewDoubleObj_TCL_DECLARED -#define Tcl_NewDoubleObj_TCL_DECLARED -/* 51 */ -EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); -#endif -#ifndef Tcl_NewIntObj_TCL_DECLARED -#define Tcl_NewIntObj_TCL_DECLARED -/* 52 */ -EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); -#endif -#ifndef Tcl_NewListObj_TCL_DECLARED -#define Tcl_NewListObj_TCL_DECLARED -/* 53 */ -EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_NewLongObj_TCL_DECLARED -#define Tcl_NewLongObj_TCL_DECLARED -/* 54 */ -EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); -#endif -#ifndef Tcl_NewObj_TCL_DECLARED -#define Tcl_NewObj_TCL_DECLARED -/* 55 */ -EXTERN Tcl_Obj * Tcl_NewObj (void); -#endif -#ifndef Tcl_NewStringObj_TCL_DECLARED -#define Tcl_NewStringObj_TCL_DECLARED -/* 56 */ -EXTERN Tcl_Obj * Tcl_NewStringObj (CONST char * bytes, int length); -#endif -#ifndef Tcl_SetBooleanObj_TCL_DECLARED -#define Tcl_SetBooleanObj_TCL_DECLARED -/* 57 */ -EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); -#endif -#ifndef Tcl_SetByteArrayLength_TCL_DECLARED -#define Tcl_SetByteArrayLength_TCL_DECLARED -/* 58 */ -EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetByteArrayObj_TCL_DECLARED -#define Tcl_SetByteArrayObj_TCL_DECLARED -/* 59 */ -EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, - CONST unsigned char * bytes, int length); -#endif -#ifndef Tcl_SetDoubleObj_TCL_DECLARED -#define Tcl_SetDoubleObj_TCL_DECLARED -/* 60 */ -EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, - double doubleValue); -#endif -#ifndef Tcl_SetIntObj_TCL_DECLARED -#define Tcl_SetIntObj_TCL_DECLARED -/* 61 */ -EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); -#endif -#ifndef Tcl_SetListObj_TCL_DECLARED -#define Tcl_SetListObj_TCL_DECLARED -/* 62 */ -EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_SetLongObj_TCL_DECLARED -#define Tcl_SetLongObj_TCL_DECLARED -/* 63 */ -EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); -#endif -#ifndef Tcl_SetObjLength_TCL_DECLARED -#define Tcl_SetObjLength_TCL_DECLARED -/* 64 */ -EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetStringObj_TCL_DECLARED -#define Tcl_SetStringObj_TCL_DECLARED -/* 65 */ -EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, CONST char* bytes, - int length); -#endif -#ifndef Tcl_AddErrorInfo_TCL_DECLARED -#define Tcl_AddErrorInfo_TCL_DECLARED -/* 66 */ -EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, - CONST char * message); -#endif -#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED -#define Tcl_AddObjErrorInfo_TCL_DECLARED -/* 67 */ -EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, - CONST char * message, int length); -#endif -#ifndef Tcl_AllowExceptions_TCL_DECLARED -#define Tcl_AllowExceptions_TCL_DECLARED -/* 68 */ -EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); -#endif -#ifndef Tcl_AppendElement_TCL_DECLARED -#define Tcl_AppendElement_TCL_DECLARED -/* 69 */ -EXTERN void Tcl_AppendElement (Tcl_Interp * interp, - CONST char * element); -#endif -#ifndef Tcl_AppendResult_TCL_DECLARED -#define Tcl_AppendResult_TCL_DECLARED -/* 70 */ -EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_AsyncCreate_TCL_DECLARED -#define Tcl_AsyncCreate_TCL_DECLARED -/* 71 */ -EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AsyncDelete_TCL_DECLARED -#define Tcl_AsyncDelete_TCL_DECLARED -/* 72 */ -EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncInvoke_TCL_DECLARED -#define Tcl_AsyncInvoke_TCL_DECLARED -/* 73 */ -EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); -#endif -#ifndef Tcl_AsyncMark_TCL_DECLARED -#define Tcl_AsyncMark_TCL_DECLARED -/* 74 */ -EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncReady_TCL_DECLARED -#define Tcl_AsyncReady_TCL_DECLARED -/* 75 */ -EXTERN int Tcl_AsyncReady (void); -#endif -#ifndef Tcl_BackgroundError_TCL_DECLARED -#define Tcl_BackgroundError_TCL_DECLARED -/* 76 */ -EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); -#endif -#ifndef Tcl_Backslash_TCL_DECLARED -#define Tcl_Backslash_TCL_DECLARED -/* 77 */ -EXTERN char Tcl_Backslash (CONST char * src, int * readPtr); -#endif -#ifndef Tcl_BadChannelOption_TCL_DECLARED -#define Tcl_BadChannelOption_TCL_DECLARED -/* 78 */ -EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, - CONST char * optionName, - CONST char * optionList); -#endif -#ifndef Tcl_CallWhenDeleted_TCL_DECLARED -#define Tcl_CallWhenDeleted_TCL_DECLARED -/* 79 */ -EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CancelIdleCall_TCL_DECLARED -#define Tcl_CancelIdleCall_TCL_DECLARED -/* 80 */ -EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, - ClientData clientData); -#endif -#ifndef Tcl_Close_TCL_DECLARED -#define Tcl_Close_TCL_DECLARED -/* 81 */ -EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); -#endif -#ifndef Tcl_CommandComplete_TCL_DECLARED -#define Tcl_CommandComplete_TCL_DECLARED -/* 82 */ -EXTERN int Tcl_CommandComplete (CONST char * cmd); -#endif -#ifndef Tcl_Concat_TCL_DECLARED -#define Tcl_Concat_TCL_DECLARED -/* 83 */ -EXTERN char * Tcl_Concat (int argc, CONST84 char * CONST * argv); -#endif -#ifndef Tcl_ConvertElement_TCL_DECLARED -#define Tcl_ConvertElement_TCL_DECLARED -/* 84 */ -EXTERN int Tcl_ConvertElement (CONST char * src, char * dst, - int flags); -#endif -#ifndef Tcl_ConvertCountedElement_TCL_DECLARED -#define Tcl_ConvertCountedElement_TCL_DECLARED -/* 85 */ -EXTERN int Tcl_ConvertCountedElement (CONST char * src, - int length, char * dst, int flags); -#endif -#ifndef Tcl_CreateAlias_TCL_DECLARED -#define Tcl_CreateAlias_TCL_DECLARED -/* 86 */ -EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, - CONST char * slaveCmd, Tcl_Interp * target, - CONST char * targetCmd, int argc, - CONST84 char * CONST * argv); -#endif -#ifndef Tcl_CreateAliasObj_TCL_DECLARED -#define Tcl_CreateAliasObj_TCL_DECLARED -/* 87 */ -EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, - CONST char * slaveCmd, Tcl_Interp * target, - CONST char * targetCmd, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_CreateChannel_TCL_DECLARED -#define Tcl_CreateChannel_TCL_DECLARED -/* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel (Tcl_ChannelType * typePtr, - CONST char * chanName, - ClientData instanceData, int mask); -#endif -#ifndef Tcl_CreateChannelHandler_TCL_DECLARED -#define Tcl_CreateChannelHandler_TCL_DECLARED -/* 89 */ -EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateCloseHandler_TCL_DECLARED -#define Tcl_CreateCloseHandler_TCL_DECLARED -/* 90 */ -EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateCommand_TCL_DECLARED -#define Tcl_CreateCommand_TCL_DECLARED -/* 91 */ -EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_CmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateEventSource_TCL_DECLARED -#define Tcl_CreateEventSource_TCL_DECLARED -/* 92 */ -EXTERN void Tcl_CreateEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_CreateExitHandler_TCL_DECLARED -#define Tcl_CreateExitHandler_TCL_DECLARED -/* 93 */ -EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateInterp_TCL_DECLARED -#define Tcl_CreateInterp_TCL_DECLARED -/* 94 */ -EXTERN Tcl_Interp * Tcl_CreateInterp (void); -#endif -#ifndef Tcl_CreateMathFunc_TCL_DECLARED -#define Tcl_CreateMathFunc_TCL_DECLARED -/* 95 */ -EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, - CONST char * name, int numArgs, - Tcl_ValueType * argTypes, - Tcl_MathProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateObjCommand_TCL_DECLARED -#define Tcl_CreateObjCommand_TCL_DECLARED -/* 96 */ -EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_ObjCmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateSlave_TCL_DECLARED -#define Tcl_CreateSlave_TCL_DECLARED -/* 97 */ -EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, - CONST char * slaveName, int isSafe); -#endif -#ifndef Tcl_CreateTimerHandler_TCL_DECLARED -#define Tcl_CreateTimerHandler_TCL_DECLARED -/* 98 */ -EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, - Tcl_TimerProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateTrace_TCL_DECLARED -#define Tcl_CreateTrace_TCL_DECLARED -/* 99 */ -EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, - Tcl_CmdTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteAssocData_TCL_DECLARED -#define Tcl_DeleteAssocData_TCL_DECLARED -/* 100 */ -EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED -#define Tcl_DeleteChannelHandler_TCL_DECLARED -/* 101 */ -EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED -#define Tcl_DeleteCloseHandler_TCL_DECLARED -/* 102 */ -EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_DeleteCommand_TCL_DECLARED -#define Tcl_DeleteCommand_TCL_DECLARED -/* 103 */ -EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, - CONST char * cmdName); -#endif -#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED -#define Tcl_DeleteCommandFromToken_TCL_DECLARED -/* 104 */ -EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_DeleteEvents_TCL_DECLARED -#define Tcl_DeleteEvents_TCL_DECLARED -/* 105 */ -EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteEventSource_TCL_DECLARED -#define Tcl_DeleteEventSource_TCL_DECLARED -/* 106 */ -EXTERN void Tcl_DeleteEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteExitHandler_TCL_DECLARED -#define Tcl_DeleteExitHandler_TCL_DECLARED -/* 107 */ -EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteHashEntry_TCL_DECLARED -#define Tcl_DeleteHashEntry_TCL_DECLARED -/* 108 */ -EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); -#endif -#ifndef Tcl_DeleteHashTable_TCL_DECLARED -#define Tcl_DeleteHashTable_TCL_DECLARED -/* 109 */ -EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_DeleteInterp_TCL_DECLARED -#define Tcl_DeleteInterp_TCL_DECLARED -/* 110 */ -EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED -#define Tcl_DeleteTimerHandler_TCL_DECLARED -/* 112 */ -EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); -#endif -#ifndef Tcl_DeleteTrace_TCL_DECLARED -#define Tcl_DeleteTrace_TCL_DECLARED -/* 113 */ -EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, - Tcl_Trace trace); -#endif -#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED -#define Tcl_DontCallWhenDeleted_TCL_DECLARED -/* 114 */ -EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DoOneEvent_TCL_DECLARED -#define Tcl_DoOneEvent_TCL_DECLARED -/* 115 */ -EXTERN int Tcl_DoOneEvent (int flags); -#endif -#ifndef Tcl_DoWhenIdle_TCL_DECLARED -#define Tcl_DoWhenIdle_TCL_DECLARED -/* 116 */ -EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DStringAppend_TCL_DECLARED -#define Tcl_DStringAppend_TCL_DECLARED -/* 117 */ -EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, - CONST char * bytes, int length); -#endif -#ifndef Tcl_DStringAppendElement_TCL_DECLARED -#define Tcl_DStringAppendElement_TCL_DECLARED -/* 118 */ -EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, - CONST char * element); -#endif -#ifndef Tcl_DStringEndSublist_TCL_DECLARED -#define Tcl_DStringEndSublist_TCL_DECLARED -/* 119 */ -EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringFree_TCL_DECLARED -#define Tcl_DStringFree_TCL_DECLARED -/* 120 */ -EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringGetResult_TCL_DECLARED -#define Tcl_DStringGetResult_TCL_DECLARED -/* 121 */ -EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringInit_TCL_DECLARED -#define Tcl_DStringInit_TCL_DECLARED -/* 122 */ -EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringResult_TCL_DECLARED -#define Tcl_DStringResult_TCL_DECLARED -/* 123 */ -EXTERN void Tcl_DStringResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringSetLength_TCL_DECLARED -#define Tcl_DStringSetLength_TCL_DECLARED -/* 124 */ -EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, - int length); -#endif -#ifndef Tcl_DStringStartSublist_TCL_DECLARED -#define Tcl_DStringStartSublist_TCL_DECLARED -/* 125 */ -EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_Eof_TCL_DECLARED -#define Tcl_Eof_TCL_DECLARED -/* 126 */ -EXTERN int Tcl_Eof (Tcl_Channel chan); -#endif -#ifndef Tcl_ErrnoId_TCL_DECLARED -#define Tcl_ErrnoId_TCL_DECLARED -/* 127 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); -#endif -#ifndef Tcl_ErrnoMsg_TCL_DECLARED -#define Tcl_ErrnoMsg_TCL_DECLARED -/* 128 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); -#endif -#ifndef Tcl_Eval_TCL_DECLARED -#define Tcl_Eval_TCL_DECLARED -/* 129 */ -EXTERN int Tcl_Eval (Tcl_Interp * interp, CONST char * script); -#endif -#ifndef Tcl_EvalFile_TCL_DECLARED -#define Tcl_EvalFile_TCL_DECLARED -/* 130 */ -EXTERN int Tcl_EvalFile (Tcl_Interp * interp, - CONST char * fileName); -#endif -#ifndef Tcl_EvalObj_TCL_DECLARED -#define Tcl_EvalObj_TCL_DECLARED -/* 131 */ -EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_EventuallyFree_TCL_DECLARED -#define Tcl_EventuallyFree_TCL_DECLARED -/* 132 */ -EXTERN void Tcl_EventuallyFree (ClientData clientData, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_Exit_TCL_DECLARED -#define Tcl_Exit_TCL_DECLARED -/* 133 */ -EXTERN void Tcl_Exit (int status); -#endif -#ifndef Tcl_ExposeCommand_TCL_DECLARED -#define Tcl_ExposeCommand_TCL_DECLARED -/* 134 */ -EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, - CONST char * hiddenCmdToken, - CONST char * cmdName); -#endif -#ifndef Tcl_ExprBoolean_TCL_DECLARED -#define Tcl_ExprBoolean_TCL_DECLARED -/* 135 */ -EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, - CONST char * expr, int * ptr); -#endif -#ifndef Tcl_ExprBooleanObj_TCL_DECLARED -#define Tcl_ExprBooleanObj_TCL_DECLARED -/* 136 */ -EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * ptr); -#endif -#ifndef Tcl_ExprDouble_TCL_DECLARED -#define Tcl_ExprDouble_TCL_DECLARED -/* 137 */ -EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, - CONST char * expr, double * ptr); -#endif -#ifndef Tcl_ExprDoubleObj_TCL_DECLARED -#define Tcl_ExprDoubleObj_TCL_DECLARED -/* 138 */ -EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * ptr); -#endif -#ifndef Tcl_ExprLong_TCL_DECLARED -#define Tcl_ExprLong_TCL_DECLARED -/* 139 */ -EXTERN int Tcl_ExprLong (Tcl_Interp * interp, CONST char * expr, - long * ptr); -#endif -#ifndef Tcl_ExprLongObj_TCL_DECLARED -#define Tcl_ExprLongObj_TCL_DECLARED -/* 140 */ -EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * ptr); -#endif -#ifndef Tcl_ExprObj_TCL_DECLARED -#define Tcl_ExprObj_TCL_DECLARED -/* 141 */ -EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - Tcl_Obj ** resultPtrPtr); -#endif -#ifndef Tcl_ExprString_TCL_DECLARED -#define Tcl_ExprString_TCL_DECLARED -/* 142 */ -EXTERN int Tcl_ExprString (Tcl_Interp * interp, - CONST char * expr); -#endif -#ifndef Tcl_Finalize_TCL_DECLARED -#define Tcl_Finalize_TCL_DECLARED -/* 143 */ -EXTERN void Tcl_Finalize (void); -#endif -#ifndef Tcl_FindExecutable_TCL_DECLARED -#define Tcl_FindExecutable_TCL_DECLARED -/* 144 */ -EXTERN void Tcl_FindExecutable (CONST char * argv0); -#endif -#ifndef Tcl_FirstHashEntry_TCL_DECLARED -#define Tcl_FirstHashEntry_TCL_DECLARED -/* 145 */ -EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, - Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_Flush_TCL_DECLARED -#define Tcl_Flush_TCL_DECLARED -/* 146 */ -EXTERN int Tcl_Flush (Tcl_Channel chan); -#endif -#ifndef Tcl_FreeResult_TCL_DECLARED -#define Tcl_FreeResult_TCL_DECLARED -/* 147 */ -EXTERN void Tcl_FreeResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetAlias_TCL_DECLARED -#define Tcl_GetAlias_TCL_DECLARED -/* 148 */ -EXTERN int Tcl_GetAlias (Tcl_Interp * interp, - CONST char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_GetAliasObj_TCL_DECLARED -#define Tcl_GetAliasObj_TCL_DECLARED -/* 149 */ -EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, - CONST char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * objcPtr, - Tcl_Obj *** objv); -#endif -#ifndef Tcl_GetAssocData_TCL_DECLARED -#define Tcl_GetAssocData_TCL_DECLARED -/* 150 */ -EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, - CONST char * name, - Tcl_InterpDeleteProc ** procPtr); -#endif -#ifndef Tcl_GetChannel_TCL_DECLARED -#define Tcl_GetChannel_TCL_DECLARED -/* 151 */ -EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, - CONST char * chanName, int * modePtr); -#endif -#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED -#define Tcl_GetChannelBufferSize_TCL_DECLARED -/* 152 */ -EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelHandle_TCL_DECLARED -#define Tcl_GetChannelHandle_TCL_DECLARED -/* 153 */ -EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, - int direction, ClientData * handlePtr); -#endif -#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED -#define Tcl_GetChannelInstanceData_TCL_DECLARED -/* 154 */ -EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelMode_TCL_DECLARED -#define Tcl_GetChannelMode_TCL_DECLARED -/* 155 */ -EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelName_TCL_DECLARED -#define Tcl_GetChannelName_TCL_DECLARED -/* 156 */ -EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelOption_TCL_DECLARED -#define Tcl_GetChannelOption_TCL_DECLARED -/* 157 */ -EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, CONST char * optionName, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetChannelType_TCL_DECLARED -#define Tcl_GetChannelType_TCL_DECLARED -/* 158 */ -EXTERN Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); -#endif -#ifndef Tcl_GetCommandInfo_TCL_DECLARED -#define Tcl_GetCommandInfo_TCL_DECLARED -/* 159 */ -EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, - CONST char * cmdName, Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_GetCommandName_TCL_DECLARED -#define Tcl_GetCommandName_TCL_DECLARED -/* 160 */ -EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_GetErrno_TCL_DECLARED -#define Tcl_GetErrno_TCL_DECLARED -/* 161 */ -EXTERN int Tcl_GetErrno (void); -#endif -#ifndef Tcl_GetHostName_TCL_DECLARED -#define Tcl_GetHostName_TCL_DECLARED -/* 162 */ -EXTERN CONST84_RETURN char * Tcl_GetHostName (void); -#endif -#ifndef Tcl_GetInterpPath_TCL_DECLARED -#define Tcl_GetInterpPath_TCL_DECLARED -/* 163 */ -EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, - Tcl_Interp * slaveInterp); -#endif -#ifndef Tcl_GetMaster_TCL_DECLARED -#define Tcl_GetMaster_TCL_DECLARED -/* 164 */ -EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED -#define Tcl_GetNameOfExecutable_TCL_DECLARED -/* 165 */ -EXTERN CONST char * Tcl_GetNameOfExecutable (void); -#endif -#ifndef Tcl_GetObjResult_TCL_DECLARED -#define Tcl_GetObjResult_TCL_DECLARED -/* 166 */ -EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - CONST char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - CONST char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType_TCL_DECLARED -#define Tcl_GetPathType_TCL_DECLARED -/* 168 */ -EXTERN Tcl_PathType Tcl_GetPathType (CONST char * path); -#endif -#ifndef Tcl_Gets_TCL_DECLARED -#define Tcl_Gets_TCL_DECLARED -/* 169 */ -EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetsObj_TCL_DECLARED -#define Tcl_GetsObj_TCL_DECLARED -/* 170 */ -EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetServiceMode_TCL_DECLARED -#define Tcl_GetServiceMode_TCL_DECLARED -/* 171 */ -EXTERN int Tcl_GetServiceMode (void); -#endif -#ifndef Tcl_GetSlave_TCL_DECLARED -#define Tcl_GetSlave_TCL_DECLARED -/* 172 */ -EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, - CONST char * slaveName); -#endif -#ifndef Tcl_GetStdChannel_TCL_DECLARED -#define Tcl_GetStdChannel_TCL_DECLARED -/* 173 */ -EXTERN Tcl_Channel Tcl_GetStdChannel (int type); -#endif -#ifndef Tcl_GetStringResult_TCL_DECLARED -#define Tcl_GetStringResult_TCL_DECLARED -/* 174 */ -EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetVar_TCL_DECLARED -#define Tcl_GetVar_TCL_DECLARED -/* 175 */ -EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, - CONST char * varName, int flags); -#endif -#ifndef Tcl_GetVar2_TCL_DECLARED -#define Tcl_GetVar2_TCL_DECLARED -/* 176 */ -EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags); -#endif -#ifndef Tcl_GlobalEval_TCL_DECLARED -#define Tcl_GlobalEval_TCL_DECLARED -/* 177 */ -EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, - CONST char * command); -#endif -#ifndef Tcl_GlobalEvalObj_TCL_DECLARED -#define Tcl_GlobalEvalObj_TCL_DECLARED -/* 178 */ -EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_HideCommand_TCL_DECLARED -#define Tcl_HideCommand_TCL_DECLARED -/* 179 */ -EXTERN int Tcl_HideCommand (Tcl_Interp * interp, - CONST char * cmdName, - CONST char * hiddenCmdToken); -#endif -#ifndef Tcl_Init_TCL_DECLARED -#define Tcl_Init_TCL_DECLARED -/* 180 */ -EXTERN int Tcl_Init (Tcl_Interp * interp); -#endif -#ifndef Tcl_InitHashTable_TCL_DECLARED -#define Tcl_InitHashTable_TCL_DECLARED -/* 181 */ -EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, - int keyType); -#endif -#ifndef Tcl_InputBlocked_TCL_DECLARED -#define Tcl_InputBlocked_TCL_DECLARED -/* 182 */ -EXTERN int Tcl_InputBlocked (Tcl_Channel chan); -#endif -#ifndef Tcl_InputBuffered_TCL_DECLARED -#define Tcl_InputBuffered_TCL_DECLARED -/* 183 */ -EXTERN int Tcl_InputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_InterpDeleted_TCL_DECLARED -#define Tcl_InterpDeleted_TCL_DECLARED -/* 184 */ -EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); -#endif -#ifndef Tcl_IsSafe_TCL_DECLARED -#define Tcl_IsSafe_TCL_DECLARED -/* 185 */ -EXTERN int Tcl_IsSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_JoinPath_TCL_DECLARED -#define Tcl_JoinPath_TCL_DECLARED -/* 186 */ -EXTERN char * Tcl_JoinPath (int argc, CONST84 char * CONST * argv, - Tcl_DString * resultPtr); -#endif -#ifndef Tcl_LinkVar_TCL_DECLARED -#define Tcl_LinkVar_TCL_DECLARED -/* 187 */ -EXTERN int Tcl_LinkVar (Tcl_Interp * interp, - CONST char * varName, char * addr, int type); -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel_TCL_DECLARED -#define Tcl_MakeFileChannel_TCL_DECLARED -/* 189 */ -EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); -#endif -#ifndef Tcl_MakeSafe_TCL_DECLARED -#define Tcl_MakeSafe_TCL_DECLARED -/* 190 */ -EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED -#define Tcl_MakeTcpClientChannel_TCL_DECLARED -/* 191 */ -EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); -#endif -#ifndef Tcl_Merge_TCL_DECLARED -#define Tcl_Merge_TCL_DECLARED -/* 192 */ -EXTERN char * Tcl_Merge (int argc, CONST84 char * CONST * argv); -#endif -#ifndef Tcl_NextHashEntry_TCL_DECLARED -#define Tcl_NextHashEntry_TCL_DECLARED -/* 193 */ -EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_NotifyChannel_TCL_DECLARED -#define Tcl_NotifyChannel_TCL_DECLARED -/* 194 */ -EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); -#endif -#ifndef Tcl_ObjGetVar2_TCL_DECLARED -#define Tcl_ObjGetVar2_TCL_DECLARED -/* 195 */ -EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - int flags); -#endif -#ifndef Tcl_ObjSetVar2_TCL_DECLARED -#define Tcl_ObjSetVar2_TCL_DECLARED -/* 196 */ -EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - Tcl_Obj * newValuePtr, int flags); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel_TCL_DECLARED -#define Tcl_OpenFileChannel_TCL_DECLARED -/* 198 */ -EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, - CONST char * fileName, - CONST char * modeString, int permissions); -#endif -#ifndef Tcl_OpenTcpClient_TCL_DECLARED -#define Tcl_OpenTcpClient_TCL_DECLARED -/* 199 */ -EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, - CONST char * address, CONST char * myaddr, - int myport, int async); -#endif -#ifndef Tcl_OpenTcpServer_TCL_DECLARED -#define Tcl_OpenTcpServer_TCL_DECLARED -/* 200 */ -EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, - CONST char * host, - Tcl_TcpAcceptProc * acceptProc, - ClientData callbackData); -#endif -#ifndef Tcl_Preserve_TCL_DECLARED -#define Tcl_Preserve_TCL_DECLARED -/* 201 */ -EXTERN void Tcl_Preserve (ClientData data); -#endif -#ifndef Tcl_PrintDouble_TCL_DECLARED -#define Tcl_PrintDouble_TCL_DECLARED -/* 202 */ -EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, - char * dst); -#endif -#ifndef Tcl_PutEnv_TCL_DECLARED -#define Tcl_PutEnv_TCL_DECLARED -/* 203 */ -EXTERN int Tcl_PutEnv (CONST char * assignment); -#endif -#ifndef Tcl_PosixError_TCL_DECLARED -#define Tcl_PosixError_TCL_DECLARED -/* 204 */ -EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); -#endif -#ifndef Tcl_QueueEvent_TCL_DECLARED -#define Tcl_QueueEvent_TCL_DECLARED -/* 205 */ -EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, - Tcl_QueuePosition position); -#endif -#ifndef Tcl_Read_TCL_DECLARED -#define Tcl_Read_TCL_DECLARED -/* 206 */ -EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, - int toRead); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval_TCL_DECLARED -#define Tcl_RecordAndEval_TCL_DECLARED -/* 208 */ -EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, - CONST char * cmd, int flags); -#endif -#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED -#define Tcl_RecordAndEvalObj_TCL_DECLARED -/* 209 */ -EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, - Tcl_Obj * cmdPtr, int flags); -#endif -#ifndef Tcl_RegisterChannel_TCL_DECLARED -#define Tcl_RegisterChannel_TCL_DECLARED -/* 210 */ -EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_RegisterObjType_TCL_DECLARED -#define Tcl_RegisterObjType_TCL_DECLARED -/* 211 */ -EXTERN void Tcl_RegisterObjType (Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_RegExpCompile_TCL_DECLARED -#define Tcl_RegExpCompile_TCL_DECLARED -/* 212 */ -EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, - CONST char * pattern); -#endif -#ifndef Tcl_RegExpExec_TCL_DECLARED -#define Tcl_RegExpExec_TCL_DECLARED -/* 213 */ -EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, - Tcl_RegExp regexp, CONST char * text, - CONST char * start); -#endif -#ifndef Tcl_RegExpMatch_TCL_DECLARED -#define Tcl_RegExpMatch_TCL_DECLARED -/* 214 */ -EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, - CONST char * text, CONST char * pattern); -#endif -#ifndef Tcl_RegExpRange_TCL_DECLARED -#define Tcl_RegExpRange_TCL_DECLARED -/* 215 */ -EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, - CONST84 char ** startPtr, - CONST84 char ** endPtr); -#endif -#ifndef Tcl_Release_TCL_DECLARED -#define Tcl_Release_TCL_DECLARED -/* 216 */ -EXTERN void Tcl_Release (ClientData clientData); -#endif -#ifndef Tcl_ResetResult_TCL_DECLARED -#define Tcl_ResetResult_TCL_DECLARED -/* 217 */ -EXTERN void Tcl_ResetResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_ScanElement_TCL_DECLARED -#define Tcl_ScanElement_TCL_DECLARED -/* 218 */ -EXTERN int Tcl_ScanElement (CONST char * str, int * flagPtr); -#endif -#ifndef Tcl_ScanCountedElement_TCL_DECLARED -#define Tcl_ScanCountedElement_TCL_DECLARED -/* 219 */ -EXTERN int Tcl_ScanCountedElement (CONST char * str, int length, - int * flagPtr); -#endif -#ifndef Tcl_SeekOld_TCL_DECLARED -#define Tcl_SeekOld_TCL_DECLARED -/* 220 */ -EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); -#endif -#ifndef Tcl_ServiceAll_TCL_DECLARED -#define Tcl_ServiceAll_TCL_DECLARED -/* 221 */ -EXTERN int Tcl_ServiceAll (void); -#endif -#ifndef Tcl_ServiceEvent_TCL_DECLARED -#define Tcl_ServiceEvent_TCL_DECLARED -/* 222 */ -EXTERN int Tcl_ServiceEvent (int flags); -#endif -#ifndef Tcl_SetAssocData_TCL_DECLARED -#define Tcl_SetAssocData_TCL_DECLARED -/* 223 */ -EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, - CONST char * name, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED -#define Tcl_SetChannelBufferSize_TCL_DECLARED -/* 224 */ -EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); -#endif -#ifndef Tcl_SetChannelOption_TCL_DECLARED -#define Tcl_SetChannelOption_TCL_DECLARED -/* 225 */ -EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, CONST char * optionName, - CONST char * newValue); -#endif -#ifndef Tcl_SetCommandInfo_TCL_DECLARED -#define Tcl_SetCommandInfo_TCL_DECLARED -/* 226 */ -EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, - CONST char * cmdName, - CONST Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_SetErrno_TCL_DECLARED -#define Tcl_SetErrno_TCL_DECLARED -/* 227 */ -EXTERN void Tcl_SetErrno (int err); -#endif -#ifndef Tcl_SetErrorCode_TCL_DECLARED -#define Tcl_SetErrorCode_TCL_DECLARED -/* 228 */ -EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED -#define Tcl_SetMaxBlockTime_TCL_DECLARED -/* 229 */ -EXTERN void Tcl_SetMaxBlockTime (Tcl_Time * timePtr); -#endif -#ifndef Tcl_SetPanicProc_TCL_DECLARED -#define Tcl_SetPanicProc_TCL_DECLARED -/* 230 */ -EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); -#endif -#ifndef Tcl_SetRecursionLimit_TCL_DECLARED -#define Tcl_SetRecursionLimit_TCL_DECLARED -/* 231 */ -EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, - int depth); -#endif -#ifndef Tcl_SetResult_TCL_DECLARED -#define Tcl_SetResult_TCL_DECLARED -/* 232 */ -EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_SetServiceMode_TCL_DECLARED -#define Tcl_SetServiceMode_TCL_DECLARED -/* 233 */ -EXTERN int Tcl_SetServiceMode (int mode); -#endif -#ifndef Tcl_SetObjErrorCode_TCL_DECLARED -#define Tcl_SetObjErrorCode_TCL_DECLARED -/* 234 */ -EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, - Tcl_Obj * errorObjPtr); -#endif -#ifndef Tcl_SetObjResult_TCL_DECLARED -#define Tcl_SetObjResult_TCL_DECLARED -/* 235 */ -EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr); -#endif -#ifndef Tcl_SetStdChannel_TCL_DECLARED -#define Tcl_SetStdChannel_TCL_DECLARED -/* 236 */ -EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); -#endif -#ifndef Tcl_SetVar_TCL_DECLARED -#define Tcl_SetVar_TCL_DECLARED -/* 237 */ -EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, - CONST char * varName, CONST char * newValue, - int flags); -#endif -#ifndef Tcl_SetVar2_TCL_DECLARED -#define Tcl_SetVar2_TCL_DECLARED -/* 238 */ -EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - CONST char * newValue, int flags); -#endif -#ifndef Tcl_SignalId_TCL_DECLARED -#define Tcl_SignalId_TCL_DECLARED -/* 239 */ -EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); -#endif -#ifndef Tcl_SignalMsg_TCL_DECLARED -#define Tcl_SignalMsg_TCL_DECLARED -/* 240 */ -EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); -#endif -#ifndef Tcl_SourceRCFile_TCL_DECLARED -#define Tcl_SourceRCFile_TCL_DECLARED -/* 241 */ -EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); -#endif -#ifndef Tcl_SplitList_TCL_DECLARED -#define Tcl_SplitList_TCL_DECLARED -/* 242 */ -EXTERN int Tcl_SplitList (Tcl_Interp * interp, - CONST char * listStr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_SplitPath_TCL_DECLARED -#define Tcl_SplitPath_TCL_DECLARED -/* 243 */ -EXTERN void Tcl_SplitPath (CONST char * path, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_StaticPackage_TCL_DECLARED -#define Tcl_StaticPackage_TCL_DECLARED -/* 244 */ -EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, - CONST char * pkgName, - Tcl_PackageInitProc * initProc, - Tcl_PackageInitProc * safeInitProc); -#endif -#ifndef Tcl_StringMatch_TCL_DECLARED -#define Tcl_StringMatch_TCL_DECLARED -/* 245 */ -EXTERN int Tcl_StringMatch (CONST char * str, - CONST char * pattern); -#endif -#ifndef Tcl_TellOld_TCL_DECLARED -#define Tcl_TellOld_TCL_DECLARED -/* 246 */ -EXTERN int Tcl_TellOld (Tcl_Channel chan); -#endif -#ifndef Tcl_TraceVar_TCL_DECLARED -#define Tcl_TraceVar_TCL_DECLARED -/* 247 */ -EXTERN int Tcl_TraceVar (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TraceVar2_TCL_DECLARED -#define Tcl_TraceVar2_TCL_DECLARED -/* 248 */ -EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TranslateFileName_TCL_DECLARED -#define Tcl_TranslateFileName_TCL_DECLARED -/* 249 */ -EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, - CONST char * name, Tcl_DString * bufferPtr); -#endif -#ifndef Tcl_Ungets_TCL_DECLARED -#define Tcl_Ungets_TCL_DECLARED -/* 250 */ -EXTERN int Tcl_Ungets (Tcl_Channel chan, CONST char * str, - int len, int atHead); -#endif -#ifndef Tcl_UnlinkVar_TCL_DECLARED -#define Tcl_UnlinkVar_TCL_DECLARED -/* 251 */ -EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, - CONST char * varName); -#endif -#ifndef Tcl_UnregisterChannel_TCL_DECLARED -#define Tcl_UnregisterChannel_TCL_DECLARED -/* 252 */ -EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_UnsetVar_TCL_DECLARED -#define Tcl_UnsetVar_TCL_DECLARED -/* 253 */ -EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, - CONST char * varName, int flags); -#endif -#ifndef Tcl_UnsetVar2_TCL_DECLARED -#define Tcl_UnsetVar2_TCL_DECLARED -/* 254 */ -EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags); -#endif -#ifndef Tcl_UntraceVar_TCL_DECLARED -#define Tcl_UntraceVar_TCL_DECLARED -/* 255 */ -EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceVar2_TCL_DECLARED -#define Tcl_UntraceVar2_TCL_DECLARED -/* 256 */ -EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED -#define Tcl_UpdateLinkedVar_TCL_DECLARED -/* 257 */ -EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, - CONST char * varName); -#endif -#ifndef Tcl_UpVar_TCL_DECLARED -#define Tcl_UpVar_TCL_DECLARED -/* 258 */ -EXTERN int Tcl_UpVar (Tcl_Interp * interp, - CONST char * frameName, CONST char * varName, - CONST char * localName, int flags); -#endif -#ifndef Tcl_UpVar2_TCL_DECLARED -#define Tcl_UpVar2_TCL_DECLARED -/* 259 */ -EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, - CONST char * frameName, CONST char * part1, - CONST char * part2, CONST char * localName, - int flags); -#endif -#ifndef Tcl_VarEval_TCL_DECLARED -#define Tcl_VarEval_TCL_DECLARED -/* 260 */ -EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_VarTraceInfo_TCL_DECLARED -#define Tcl_VarTraceInfo_TCL_DECLARED -/* 261 */ -EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_VarTraceInfo2_TCL_DECLARED -#define Tcl_VarTraceInfo2_TCL_DECLARED -/* 262 */ -EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_Write_TCL_DECLARED -#define Tcl_Write_TCL_DECLARED -/* 263 */ -EXTERN int Tcl_Write (Tcl_Channel chan, CONST char * s, - int slen); -#endif -#ifndef Tcl_WrongNumArgs_TCL_DECLARED -#define Tcl_WrongNumArgs_TCL_DECLARED -/* 264 */ -EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], CONST char * message); -#endif -#ifndef Tcl_DumpActiveMemory_TCL_DECLARED -#define Tcl_DumpActiveMemory_TCL_DECLARED -/* 265 */ -EXTERN int Tcl_DumpActiveMemory (CONST char * fileName); -#endif -#ifndef Tcl_ValidateAllMemory_TCL_DECLARED -#define Tcl_ValidateAllMemory_TCL_DECLARED -/* 266 */ -EXTERN void Tcl_ValidateAllMemory (CONST char * file, int line); -#endif -#ifndef Tcl_AppendResultVA_TCL_DECLARED -#define Tcl_AppendResultVA_TCL_DECLARED -/* 267 */ -EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED -#define Tcl_AppendStringsToObjVA_TCL_DECLARED -/* 268 */ -EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, - va_list argList); -#endif -#ifndef Tcl_HashStats_TCL_DECLARED -#define Tcl_HashStats_TCL_DECLARED -/* 269 */ -EXTERN CONST84_RETURN char * Tcl_HashStats (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_ParseVar_TCL_DECLARED -#define Tcl_ParseVar_TCL_DECLARED -/* 270 */ -EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, - CONST char * start, CONST84 char ** termPtr); -#endif -#ifndef Tcl_PkgPresent_TCL_DECLARED -#define Tcl_PkgPresent_TCL_DECLARED -/* 271 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact); -#endif -#ifndef Tcl_PkgPresentEx_TCL_DECLARED -#define Tcl_PkgPresentEx_TCL_DECLARED -/* 272 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_PkgProvide_TCL_DECLARED -#define Tcl_PkgProvide_TCL_DECLARED -/* 273 */ -EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, - CONST char * name, CONST char * version); -#endif -#ifndef Tcl_PkgRequire_TCL_DECLARED -#define Tcl_PkgRequire_TCL_DECLARED -/* 274 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact); -#endif -#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED -#define Tcl_SetErrorCodeVA_TCL_DECLARED -/* 275 */ -EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_VarEvalVA_TCL_DECLARED -#define Tcl_VarEvalVA_TCL_DECLARED -/* 276 */ -EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); -#endif -#ifndef Tcl_WaitPid_TCL_DECLARED -#define Tcl_WaitPid_TCL_DECLARED -/* 277 */ -EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); -#endif -#ifndef Tcl_PanicVA_TCL_DECLARED -#define Tcl_PanicVA_TCL_DECLARED -/* 278 */ -EXTERN void Tcl_PanicVA (CONST char * format, va_list argList); -#endif -#ifndef Tcl_GetVersion_TCL_DECLARED -#define Tcl_GetVersion_TCL_DECLARED -/* 279 */ -EXTERN void Tcl_GetVersion (int * major, int * minor, - int * patchLevel, int * type); -#endif -#ifndef Tcl_InitMemory_TCL_DECLARED -#define Tcl_InitMemory_TCL_DECLARED -/* 280 */ -EXTERN void Tcl_InitMemory (Tcl_Interp * interp); -#endif -#ifndef Tcl_StackChannel_TCL_DECLARED -#define Tcl_StackChannel_TCL_DECLARED -/* 281 */ -EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, - Tcl_ChannelType * typePtr, - ClientData instanceData, int mask, - Tcl_Channel prevChan); -#endif -#ifndef Tcl_UnstackChannel_TCL_DECLARED -#define Tcl_UnstackChannel_TCL_DECLARED -/* 282 */ -EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_GetStackedChannel_TCL_DECLARED -#define Tcl_GetStackedChannel_TCL_DECLARED -/* 283 */ -EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_SetMainLoop_TCL_DECLARED -#define Tcl_SetMainLoop_TCL_DECLARED -/* 284 */ -EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj_TCL_DECLARED -#define Tcl_AppendObjToObj_TCL_DECLARED -/* 286 */ -EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, - Tcl_Obj * appendObjPtr); -#endif -#ifndef Tcl_CreateEncoding_TCL_DECLARED -#define Tcl_CreateEncoding_TCL_DECLARED -/* 287 */ -EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); -#endif -#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED -#define Tcl_CreateThreadExitHandler_TCL_DECLARED -/* 288 */ -EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED -#define Tcl_DeleteThreadExitHandler_TCL_DECLARED -/* 289 */ -EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DiscardResult_TCL_DECLARED -#define Tcl_DiscardResult_TCL_DECLARED -/* 290 */ -EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_EvalEx_TCL_DECLARED -#define Tcl_EvalEx_TCL_DECLARED -/* 291 */ -EXTERN int Tcl_EvalEx (Tcl_Interp * interp, CONST char * script, - int numBytes, int flags); -#endif -#ifndef Tcl_EvalObjv_TCL_DECLARED -#define Tcl_EvalObjv_TCL_DECLARED -/* 292 */ -EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); -#endif -#ifndef Tcl_EvalObjEx_TCL_DECLARED -#define Tcl_EvalObjEx_TCL_DECLARED -/* 293 */ -EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_ExitThread_TCL_DECLARED -#define Tcl_ExitThread_TCL_DECLARED -/* 294 */ -EXTERN void Tcl_ExitThread (int status); -#endif -#ifndef Tcl_ExternalToUtf_TCL_DECLARED -#define Tcl_ExternalToUtf_TCL_DECLARED -/* 295 */ -EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, - Tcl_Encoding encoding, CONST char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED -#define Tcl_ExternalToUtfDString_TCL_DECLARED -/* 296 */ -EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, - CONST char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_FinalizeThread_TCL_DECLARED -#define Tcl_FinalizeThread_TCL_DECLARED -/* 297 */ -EXTERN void Tcl_FinalizeThread (void); -#endif -#ifndef Tcl_FinalizeNotifier_TCL_DECLARED -#define Tcl_FinalizeNotifier_TCL_DECLARED -/* 298 */ -EXTERN void Tcl_FinalizeNotifier (ClientData clientData); -#endif -#ifndef Tcl_FreeEncoding_TCL_DECLARED -#define Tcl_FreeEncoding_TCL_DECLARED -/* 299 */ -EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetCurrentThread_TCL_DECLARED -#define Tcl_GetCurrentThread_TCL_DECLARED -/* 300 */ -EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); -#endif -#ifndef Tcl_GetEncoding_TCL_DECLARED -#define Tcl_GetEncoding_TCL_DECLARED -/* 301 */ -EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_GetEncodingName_TCL_DECLARED -#define Tcl_GetEncodingName_TCL_DECLARED -/* 302 */ -EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetEncodingNames_TCL_DECLARED -#define Tcl_GetEncodingNames_TCL_DECLARED -/* 303 */ -EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED -#define Tcl_GetIndexFromObjStruct_TCL_DECLARED -/* 304 */ -EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST VOID * tablePtr, - int offset, CONST char * msg, int flags, - int * indexPtr); -#endif -#ifndef Tcl_GetThreadData_TCL_DECLARED -#define Tcl_GetThreadData_TCL_DECLARED -/* 305 */ -EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, - int size); -#endif -#ifndef Tcl_GetVar2Ex_TCL_DECLARED -#define Tcl_GetVar2Ex_TCL_DECLARED -/* 306 */ -EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags); -#endif -#ifndef Tcl_InitNotifier_TCL_DECLARED -#define Tcl_InitNotifier_TCL_DECLARED -/* 307 */ -EXTERN ClientData Tcl_InitNotifier (void); -#endif -#ifndef Tcl_MutexLock_TCL_DECLARED -#define Tcl_MutexLock_TCL_DECLARED -/* 308 */ -EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_MutexUnlock_TCL_DECLARED -#define Tcl_MutexUnlock_TCL_DECLARED -/* 309 */ -EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_ConditionNotify_TCL_DECLARED -#define Tcl_ConditionNotify_TCL_DECLARED -/* 310 */ -EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_ConditionWait_TCL_DECLARED -#define Tcl_ConditionWait_TCL_DECLARED -/* 311 */ -EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, - Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); -#endif -#ifndef Tcl_NumUtfChars_TCL_DECLARED -#define Tcl_NumUtfChars_TCL_DECLARED -/* 312 */ -EXTERN int Tcl_NumUtfChars (CONST char * src, int length); -#endif -#ifndef Tcl_ReadChars_TCL_DECLARED -#define Tcl_ReadChars_TCL_DECLARED -/* 313 */ -EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, - int charsToRead, int appendFlag); -#endif -#ifndef Tcl_RestoreResult_TCL_DECLARED -#define Tcl_RestoreResult_TCL_DECLARED -/* 314 */ -EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SaveResult_TCL_DECLARED -#define Tcl_SaveResult_TCL_DECLARED -/* 315 */ -EXTERN void Tcl_SaveResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SetSystemEncoding_TCL_DECLARED -#define Tcl_SetSystemEncoding_TCL_DECLARED -/* 316 */ -EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_SetVar2Ex_TCL_DECLARED -#define Tcl_SetVar2Ex_TCL_DECLARED -/* 317 */ -EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - Tcl_Obj * newValuePtr, int flags); -#endif -#ifndef Tcl_ThreadAlert_TCL_DECLARED -#define Tcl_ThreadAlert_TCL_DECLARED -/* 318 */ -EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); -#endif -#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED -#define Tcl_ThreadQueueEvent_TCL_DECLARED -/* 319 */ -EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, - Tcl_Event* evPtr, Tcl_QueuePosition position); -#endif -#ifndef Tcl_UniCharAtIndex_TCL_DECLARED -#define Tcl_UniCharAtIndex_TCL_DECLARED -/* 320 */ -EXTERN Tcl_UniChar Tcl_UniCharAtIndex (CONST char * src, int index); -#endif -#ifndef Tcl_UniCharToLower_TCL_DECLARED -#define Tcl_UniCharToLower_TCL_DECLARED -/* 321 */ -EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); -#endif -#ifndef Tcl_UniCharToTitle_TCL_DECLARED -#define Tcl_UniCharToTitle_TCL_DECLARED -/* 322 */ -EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); -#endif -#ifndef Tcl_UniCharToUpper_TCL_DECLARED -#define Tcl_UniCharToUpper_TCL_DECLARED -/* 323 */ -EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); -#endif -#ifndef Tcl_UniCharToUtf_TCL_DECLARED -#define Tcl_UniCharToUtf_TCL_DECLARED -/* 324 */ -EXTERN int Tcl_UniCharToUtf (int ch, char * buf); -#endif -#ifndef Tcl_UtfAtIndex_TCL_DECLARED -#define Tcl_UtfAtIndex_TCL_DECLARED -/* 325 */ -EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (CONST char * src, int index); -#endif -#ifndef Tcl_UtfCharComplete_TCL_DECLARED -#define Tcl_UtfCharComplete_TCL_DECLARED -/* 326 */ -EXTERN int Tcl_UtfCharComplete (CONST char * src, int length); -#endif -#ifndef Tcl_UtfBackslash_TCL_DECLARED -#define Tcl_UtfBackslash_TCL_DECLARED -/* 327 */ -EXTERN int Tcl_UtfBackslash (CONST char * src, int * readPtr, - char * dst); -#endif -#ifndef Tcl_UtfFindFirst_TCL_DECLARED -#define Tcl_UtfFindFirst_TCL_DECLARED -/* 328 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (CONST char * src, int ch); -#endif -#ifndef Tcl_UtfFindLast_TCL_DECLARED -#define Tcl_UtfFindLast_TCL_DECLARED -/* 329 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindLast (CONST char * src, int ch); -#endif -#ifndef Tcl_UtfNext_TCL_DECLARED -#define Tcl_UtfNext_TCL_DECLARED -/* 330 */ -EXTERN CONST84_RETURN char * Tcl_UtfNext (CONST char * src); -#endif -#ifndef Tcl_UtfPrev_TCL_DECLARED -#define Tcl_UtfPrev_TCL_DECLARED -/* 331 */ -EXTERN CONST84_RETURN char * Tcl_UtfPrev (CONST char * src, - CONST char * start); -#endif -#ifndef Tcl_UtfToExternal_TCL_DECLARED -#define Tcl_UtfToExternal_TCL_DECLARED -/* 332 */ -EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, - Tcl_Encoding encoding, CONST char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_UtfToExternalDString_TCL_DECLARED -#define Tcl_UtfToExternalDString_TCL_DECLARED -/* 333 */ -EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, - CONST char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToLower_TCL_DECLARED -#define Tcl_UtfToLower_TCL_DECLARED -/* 334 */ -EXTERN int Tcl_UtfToLower (char * src); -#endif -#ifndef Tcl_UtfToTitle_TCL_DECLARED -#define Tcl_UtfToTitle_TCL_DECLARED -/* 335 */ -EXTERN int Tcl_UtfToTitle (char * src); -#endif -#ifndef Tcl_UtfToUniChar_TCL_DECLARED -#define Tcl_UtfToUniChar_TCL_DECLARED -/* 336 */ -EXTERN int Tcl_UtfToUniChar (CONST char * src, - Tcl_UniChar * chPtr); -#endif -#ifndef Tcl_UtfToUpper_TCL_DECLARED -#define Tcl_UtfToUpper_TCL_DECLARED -/* 337 */ -EXTERN int Tcl_UtfToUpper (char * src); -#endif -#ifndef Tcl_WriteChars_TCL_DECLARED -#define Tcl_WriteChars_TCL_DECLARED -/* 338 */ -EXTERN int Tcl_WriteChars (Tcl_Channel chan, CONST char * src, - int srcLen); -#endif -#ifndef Tcl_WriteObj_TCL_DECLARED -#define Tcl_WriteObj_TCL_DECLARED -/* 339 */ -EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetString_TCL_DECLARED -#define Tcl_GetString_TCL_DECLARED -/* 340 */ -EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED -#define Tcl_GetDefaultEncodingDir_TCL_DECLARED -/* 341 */ -EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); -#endif -#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED -#define Tcl_SetDefaultEncodingDir_TCL_DECLARED -/* 342 */ -EXTERN void Tcl_SetDefaultEncodingDir (CONST char * path); -#endif -#ifndef Tcl_AlertNotifier_TCL_DECLARED -#define Tcl_AlertNotifier_TCL_DECLARED -/* 343 */ -EXTERN void Tcl_AlertNotifier (ClientData clientData); -#endif -#ifndef Tcl_ServiceModeHook_TCL_DECLARED -#define Tcl_ServiceModeHook_TCL_DECLARED -/* 344 */ -EXTERN void Tcl_ServiceModeHook (int mode); -#endif -#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED -#define Tcl_UniCharIsAlnum_TCL_DECLARED -/* 345 */ -EXTERN int Tcl_UniCharIsAlnum (int ch); -#endif -#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED -#define Tcl_UniCharIsAlpha_TCL_DECLARED -/* 346 */ -EXTERN int Tcl_UniCharIsAlpha (int ch); -#endif -#ifndef Tcl_UniCharIsDigit_TCL_DECLARED -#define Tcl_UniCharIsDigit_TCL_DECLARED -/* 347 */ -EXTERN int Tcl_UniCharIsDigit (int ch); -#endif -#ifndef Tcl_UniCharIsLower_TCL_DECLARED -#define Tcl_UniCharIsLower_TCL_DECLARED -/* 348 */ -EXTERN int Tcl_UniCharIsLower (int ch); -#endif -#ifndef Tcl_UniCharIsSpace_TCL_DECLARED -#define Tcl_UniCharIsSpace_TCL_DECLARED -/* 349 */ -EXTERN int Tcl_UniCharIsSpace (int ch); -#endif -#ifndef Tcl_UniCharIsUpper_TCL_DECLARED -#define Tcl_UniCharIsUpper_TCL_DECLARED -/* 350 */ -EXTERN int Tcl_UniCharIsUpper (int ch); -#endif -#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED -#define Tcl_UniCharIsWordChar_TCL_DECLARED -/* 351 */ -EXTERN int Tcl_UniCharIsWordChar (int ch); -#endif -#ifndef Tcl_UniCharLen_TCL_DECLARED -#define Tcl_UniCharLen_TCL_DECLARED -/* 352 */ -EXTERN int Tcl_UniCharLen (CONST Tcl_UniChar * uniStr); -#endif -#ifndef Tcl_UniCharNcmp_TCL_DECLARED -#define Tcl_UniCharNcmp_TCL_DECLARED -/* 353 */ -EXTERN int Tcl_UniCharNcmp (CONST Tcl_UniChar * ucs, - CONST Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED -#define Tcl_UniCharToUtfDString_TCL_DECLARED -/* 354 */ -EXTERN char * Tcl_UniCharToUtfDString (CONST Tcl_UniChar * uniStr, - int uniLength, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED -#define Tcl_UtfToUniCharDString_TCL_DECLARED -/* 355 */ -EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (CONST char * src, - int length, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED -#define Tcl_GetRegExpFromObj_TCL_DECLARED -/* 356 */ -EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, - Tcl_Obj * patObj, int flags); -#endif -#ifndef Tcl_EvalTokens_TCL_DECLARED -#define Tcl_EvalTokens_TCL_DECLARED -/* 357 */ -EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_FreeParse_TCL_DECLARED -#define Tcl_FreeParse_TCL_DECLARED -/* 358 */ -EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_LogCommandInfo_TCL_DECLARED -#define Tcl_LogCommandInfo_TCL_DECLARED -/* 359 */ -EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, - CONST char * script, CONST char * command, - int length); -#endif -#ifndef Tcl_ParseBraces_TCL_DECLARED -#define Tcl_ParseBraces_TCL_DECLARED -/* 360 */ -EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseCommand_TCL_DECLARED -#define Tcl_ParseCommand_TCL_DECLARED -/* 361 */ -EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, - CONST char * start, int numBytes, int nested, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseExpr_TCL_DECLARED -#define Tcl_ParseExpr_TCL_DECLARED -/* 362 */ -EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseQuotedString_TCL_DECLARED -#define Tcl_ParseQuotedString_TCL_DECLARED -/* 363 */ -EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseVarName_TCL_DECLARED -#define Tcl_ParseVarName_TCL_DECLARED -/* 364 */ -EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append); -#endif -#ifndef Tcl_GetCwd_TCL_DECLARED -#define Tcl_GetCwd_TCL_DECLARED -/* 365 */ -EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); -#endif -#ifndef Tcl_Chdir_TCL_DECLARED -#define Tcl_Chdir_TCL_DECLARED -/* 366 */ -EXTERN int Tcl_Chdir (CONST char * dirName); -#endif -#ifndef Tcl_Access_TCL_DECLARED -#define Tcl_Access_TCL_DECLARED -/* 367 */ -EXTERN int Tcl_Access (CONST char * path, int mode); -#endif -#ifndef Tcl_Stat_TCL_DECLARED -#define Tcl_Stat_TCL_DECLARED -/* 368 */ -EXTERN int Tcl_Stat (CONST char * path, struct stat * bufPtr); -#endif -#ifndef Tcl_UtfNcmp_TCL_DECLARED -#define Tcl_UtfNcmp_TCL_DECLARED -/* 369 */ -EXTERN int Tcl_UtfNcmp (CONST char * s1, CONST char * s2, - unsigned long n); -#endif -#ifndef Tcl_UtfNcasecmp_TCL_DECLARED -#define Tcl_UtfNcasecmp_TCL_DECLARED -/* 370 */ -EXTERN int Tcl_UtfNcasecmp (CONST char * s1, CONST char * s2, - unsigned long n); -#endif -#ifndef Tcl_StringCaseMatch_TCL_DECLARED -#define Tcl_StringCaseMatch_TCL_DECLARED -/* 371 */ -EXTERN int Tcl_StringCaseMatch (CONST char * str, - CONST char * pattern, int nocase); -#endif -#ifndef Tcl_UniCharIsControl_TCL_DECLARED -#define Tcl_UniCharIsControl_TCL_DECLARED -/* 372 */ -EXTERN int Tcl_UniCharIsControl (int ch); -#endif -#ifndef Tcl_UniCharIsGraph_TCL_DECLARED -#define Tcl_UniCharIsGraph_TCL_DECLARED -/* 373 */ -EXTERN int Tcl_UniCharIsGraph (int ch); -#endif -#ifndef Tcl_UniCharIsPrint_TCL_DECLARED -#define Tcl_UniCharIsPrint_TCL_DECLARED -/* 374 */ -EXTERN int Tcl_UniCharIsPrint (int ch); -#endif -#ifndef Tcl_UniCharIsPunct_TCL_DECLARED -#define Tcl_UniCharIsPunct_TCL_DECLARED -/* 375 */ -EXTERN int Tcl_UniCharIsPunct (int ch); -#endif -#ifndef Tcl_RegExpExecObj_TCL_DECLARED -#define Tcl_RegExpExecObj_TCL_DECLARED -/* 376 */ -EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, - Tcl_RegExp regexp, Tcl_Obj * textObj, - int offset, int nmatches, int flags); -#endif -#ifndef Tcl_RegExpGetInfo_TCL_DECLARED -#define Tcl_RegExpGetInfo_TCL_DECLARED -/* 377 */ -EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, - Tcl_RegExpInfo * infoPtr); -#endif -#ifndef Tcl_NewUnicodeObj_TCL_DECLARED -#define Tcl_NewUnicodeObj_TCL_DECLARED -/* 378 */ -EXTERN Tcl_Obj * Tcl_NewUnicodeObj (CONST Tcl_UniChar * unicode, - int numChars); -#endif -#ifndef Tcl_SetUnicodeObj_TCL_DECLARED -#define Tcl_SetUnicodeObj_TCL_DECLARED -/* 379 */ -EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, - CONST Tcl_UniChar * unicode, int numChars); -#endif -#ifndef Tcl_GetCharLength_TCL_DECLARED -#define Tcl_GetCharLength_TCL_DECLARED -/* 380 */ -EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetUniChar_TCL_DECLARED -#define Tcl_GetUniChar_TCL_DECLARED -/* 381 */ -EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); -#endif -#ifndef Tcl_GetUnicode_TCL_DECLARED -#define Tcl_GetUnicode_TCL_DECLARED -/* 382 */ -EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetRange_TCL_DECLARED -#define Tcl_GetRange_TCL_DECLARED -/* 383 */ -EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); -#endif -#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED -#define Tcl_AppendUnicodeToObj_TCL_DECLARED -/* 384 */ -EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, - CONST Tcl_UniChar * unicode, int length); -#endif -#ifndef Tcl_RegExpMatchObj_TCL_DECLARED -#define Tcl_RegExpMatchObj_TCL_DECLARED -/* 385 */ -EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, - Tcl_Obj * textObj, Tcl_Obj * patternObj); -#endif -#ifndef Tcl_SetNotifier_TCL_DECLARED -#define Tcl_SetNotifier_TCL_DECLARED -/* 386 */ -EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); -#endif -#ifndef Tcl_GetAllocMutex_TCL_DECLARED -#define Tcl_GetAllocMutex_TCL_DECLARED -/* 387 */ -EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); -#endif -#ifndef Tcl_GetChannelNames_TCL_DECLARED -#define Tcl_GetChannelNames_TCL_DECLARED -/* 388 */ -EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED -#define Tcl_GetChannelNamesEx_TCL_DECLARED -/* 389 */ -EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, - CONST char * pattern); -#endif -#ifndef Tcl_ProcObjCmd_TCL_DECLARED -#define Tcl_ProcObjCmd_TCL_DECLARED -/* 390 */ -EXTERN int Tcl_ProcObjCmd (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_ConditionFinalize_TCL_DECLARED -#define Tcl_ConditionFinalize_TCL_DECLARED -/* 391 */ -EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_MutexFinalize_TCL_DECLARED -#define Tcl_MutexFinalize_TCL_DECLARED -/* 392 */ -EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); -#endif -#ifndef Tcl_CreateThread_TCL_DECLARED -#define Tcl_CreateThread_TCL_DECLARED -/* 393 */ -EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, - Tcl_ThreadCreateProc proc, - ClientData clientData, int stackSize, - int flags); -#endif -#ifndef Tcl_ReadRaw_TCL_DECLARED -#define Tcl_ReadRaw_TCL_DECLARED -/* 394 */ -EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, - int bytesToRead); -#endif -#ifndef Tcl_WriteRaw_TCL_DECLARED -#define Tcl_WriteRaw_TCL_DECLARED -/* 395 */ -EXTERN int Tcl_WriteRaw (Tcl_Channel chan, CONST char * src, - int srcLen); -#endif -#ifndef Tcl_GetTopChannel_TCL_DECLARED -#define Tcl_GetTopChannel_TCL_DECLARED -/* 396 */ -EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelBuffered_TCL_DECLARED -#define Tcl_ChannelBuffered_TCL_DECLARED -/* 397 */ -EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelName_TCL_DECLARED -#define Tcl_ChannelName_TCL_DECLARED -/* 398 */ -EXTERN CONST84_RETURN char * Tcl_ChannelName ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelVersion_TCL_DECLARED -#define Tcl_ChannelVersion_TCL_DECLARED -/* 399 */ -EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED -#define Tcl_ChannelBlockModeProc_TCL_DECLARED -/* 400 */ -EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelCloseProc_TCL_DECLARED -#define Tcl_ChannelCloseProc_TCL_DECLARED -/* 401 */ -EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED -#define Tcl_ChannelClose2Proc_TCL_DECLARED -/* 402 */ -EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelInputProc_TCL_DECLARED -#define Tcl_ChannelInputProc_TCL_DECLARED -/* 403 */ -EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelOutputProc_TCL_DECLARED -#define Tcl_ChannelOutputProc_TCL_DECLARED -/* 404 */ -EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSeekProc_TCL_DECLARED -#define Tcl_ChannelSeekProc_TCL_DECLARED -/* 405 */ -EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED -#define Tcl_ChannelSetOptionProc_TCL_DECLARED -/* 406 */ -EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED -#define Tcl_ChannelGetOptionProc_TCL_DECLARED -/* 407 */ -EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelWatchProc_TCL_DECLARED -#define Tcl_ChannelWatchProc_TCL_DECLARED -/* 408 */ -EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED -#define Tcl_ChannelGetHandleProc_TCL_DECLARED -/* 409 */ -EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelFlushProc_TCL_DECLARED -#define Tcl_ChannelFlushProc_TCL_DECLARED -/* 410 */ -EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED -#define Tcl_ChannelHandlerProc_TCL_DECLARED -/* 411 */ -EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_JoinThread_TCL_DECLARED -#define Tcl_JoinThread_TCL_DECLARED -/* 412 */ -EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int* result); -#endif -#ifndef Tcl_IsChannelShared_TCL_DECLARED -#define Tcl_IsChannelShared_TCL_DECLARED -/* 413 */ -EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelRegistered_TCL_DECLARED -#define Tcl_IsChannelRegistered_TCL_DECLARED -/* 414 */ -EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_CutChannel_TCL_DECLARED -#define Tcl_CutChannel_TCL_DECLARED -/* 415 */ -EXTERN void Tcl_CutChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_SpliceChannel_TCL_DECLARED -#define Tcl_SpliceChannel_TCL_DECLARED -/* 416 */ -EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED -#define Tcl_ClearChannelHandlers_TCL_DECLARED -/* 417 */ -EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelExisting_TCL_DECLARED -#define Tcl_IsChannelExisting_TCL_DECLARED -/* 418 */ -EXTERN int Tcl_IsChannelExisting (CONST char* channelName); -#endif -#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED -#define Tcl_UniCharNcasecmp_TCL_DECLARED -/* 419 */ -EXTERN int Tcl_UniCharNcasecmp (CONST Tcl_UniChar * ucs, - CONST Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED -#define Tcl_UniCharCaseMatch_TCL_DECLARED -/* 420 */ -EXTERN int Tcl_UniCharCaseMatch (CONST Tcl_UniChar * uniStr, - CONST Tcl_UniChar * uniPattern, int nocase); -#endif -#ifndef Tcl_FindHashEntry_TCL_DECLARED -#define Tcl_FindHashEntry_TCL_DECLARED -/* 421 */ -EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, - CONST char * key); -#endif -#ifndef Tcl_CreateHashEntry_TCL_DECLARED -#define Tcl_CreateHashEntry_TCL_DECLARED -/* 422 */ -EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, - CONST char * key, int * newPtr); -#endif -#ifndef Tcl_InitCustomHashTable_TCL_DECLARED -#define Tcl_InitCustomHashTable_TCL_DECLARED -/* 423 */ -EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, - int keyType, Tcl_HashKeyType * typePtr); -#endif -#ifndef Tcl_InitObjHashTable_TCL_DECLARED -#define Tcl_InitObjHashTable_TCL_DECLARED -/* 424 */ -EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_CommandTraceInfo_TCL_DECLARED -#define Tcl_CommandTraceInfo_TCL_DECLARED -/* 425 */ -EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_TraceCommand_TCL_DECLARED -#define Tcl_TraceCommand_TCL_DECLARED -/* 426 */ -EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceCommand_TCL_DECLARED -#define Tcl_UntraceCommand_TCL_DECLARED -/* 427 */ -EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AttemptAlloc_TCL_DECLARED -#define Tcl_AttemptAlloc_TCL_DECLARED -/* 428 */ -EXTERN char * Tcl_AttemptAlloc (unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED -#define Tcl_AttemptDbCkalloc_TCL_DECLARED -/* 429 */ -EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, - CONST char * file, int line); -#endif -#ifndef Tcl_AttemptRealloc_TCL_DECLARED -#define Tcl_AttemptRealloc_TCL_DECLARED -/* 430 */ -EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED -#define Tcl_AttemptDbCkrealloc_TCL_DECLARED -/* 431 */ -EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, - unsigned int size, CONST char * file, - int line); -#endif -#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED -#define Tcl_AttemptSetObjLength_TCL_DECLARED -/* 432 */ -EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, - int length); -#endif -#ifndef Tcl_GetChannelThread_TCL_DECLARED -#define Tcl_GetChannelThread_TCL_DECLARED -/* 433 */ -EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); -#endif -#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED -#define Tcl_GetUnicodeFromObj_TCL_DECLARED -/* 434 */ -EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED -#define Tcl_GetMathFuncInfo_TCL_DECLARED -/* 435 */ -EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, - CONST char * name, int * numArgsPtr, - Tcl_ValueType ** argTypesPtr, - Tcl_MathProc ** procPtr, - ClientData * clientDataPtr); -#endif -#ifndef Tcl_ListMathFuncs_TCL_DECLARED -#define Tcl_ListMathFuncs_TCL_DECLARED -/* 436 */ -EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, - CONST char * pattern); -#endif -#ifndef Tcl_SubstObj_TCL_DECLARED -#define Tcl_SubstObj_TCL_DECLARED -/* 437 */ -EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_DetachChannel_TCL_DECLARED -#define Tcl_DetachChannel_TCL_DECLARED -/* 438 */ -EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_IsStandardChannel_TCL_DECLARED -#define Tcl_IsStandardChannel_TCL_DECLARED -/* 439 */ -EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_FSCopyFile_TCL_DECLARED -#define Tcl_FSCopyFile_TCL_DECLARED -/* 440 */ -EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSCopyDirectory_TCL_DECLARED -#define Tcl_FSCopyDirectory_TCL_DECLARED -/* 441 */ -EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSCreateDirectory_TCL_DECLARED -#define Tcl_FSCreateDirectory_TCL_DECLARED -/* 442 */ -EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSDeleteFile_TCL_DECLARED -#define Tcl_FSDeleteFile_TCL_DECLARED -/* 443 */ -EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSLoadFile_TCL_DECLARED -#define Tcl_FSLoadFile_TCL_DECLARED -/* 444 */ -EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, - Tcl_Obj * pathPtr, CONST char * sym1, - CONST char * sym2, - Tcl_PackageInitProc ** proc1Ptr, - Tcl_PackageInitProc ** proc2Ptr, - Tcl_LoadHandle * handlePtr, - Tcl_FSUnloadFileProc ** unloadProcPtr); -#endif -#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED -#define Tcl_FSMatchInDirectory_TCL_DECLARED -/* 445 */ -EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, - Tcl_Obj * result, Tcl_Obj * pathPtr, - CONST char * pattern, - Tcl_GlobTypeData * types); -#endif -#ifndef Tcl_FSLink_TCL_DECLARED -#define Tcl_FSLink_TCL_DECLARED -/* 446 */ -EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, - int linkAction); -#endif -#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED -#define Tcl_FSRemoveDirectory_TCL_DECLARED -/* 447 */ -EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSRenameFile_TCL_DECLARED -#define Tcl_FSRenameFile_TCL_DECLARED -/* 448 */ -EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSLstat_TCL_DECLARED -#define Tcl_FSLstat_TCL_DECLARED -/* 449 */ -EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSUtime_TCL_DECLARED -#define Tcl_FSUtime_TCL_DECLARED -/* 450 */ -EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, - struct utimbuf * tval); -#endif -#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED -#define Tcl_FSFileAttrsGet_TCL_DECLARED -/* 451 */ -EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED -#define Tcl_FSFileAttrsSet_TCL_DECLARED -/* 452 */ -EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED -#define Tcl_FSFileAttrStrings_TCL_DECLARED -/* 453 */ -EXTERN CONST char ** Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, - Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSStat_TCL_DECLARED -#define Tcl_FSStat_TCL_DECLARED -/* 454 */ -EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSAccess_TCL_DECLARED -#define Tcl_FSAccess_TCL_DECLARED -/* 455 */ -EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); -#endif -#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED -#define Tcl_FSOpenFileChannel_TCL_DECLARED -/* 456 */ -EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, CONST char * modeString, - int permissions); -#endif -#ifndef Tcl_FSGetCwd_TCL_DECLARED -#define Tcl_FSGetCwd_TCL_DECLARED -/* 457 */ -EXTERN Tcl_Obj* Tcl_FSGetCwd (Tcl_Interp * interp); -#endif -#ifndef Tcl_FSChdir_TCL_DECLARED -#define Tcl_FSChdir_TCL_DECLARED -/* 458 */ -EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSConvertToPathType_TCL_DECLARED -#define Tcl_FSConvertToPathType_TCL_DECLARED -/* 459 */ -EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSJoinPath_TCL_DECLARED -#define Tcl_FSJoinPath_TCL_DECLARED -/* 460 */ -EXTERN Tcl_Obj* Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); -#endif -#ifndef Tcl_FSSplitPath_TCL_DECLARED -#define Tcl_FSSplitPath_TCL_DECLARED -/* 461 */ -EXTERN Tcl_Obj* Tcl_FSSplitPath (Tcl_Obj* pathPtr, int * lenPtr); -#endif -#ifndef Tcl_FSEqualPaths_TCL_DECLARED -#define Tcl_FSEqualPaths_TCL_DECLARED -/* 462 */ -EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, - Tcl_Obj* secondPtr); -#endif -#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED -#define Tcl_FSGetNormalizedPath_TCL_DECLARED -/* 463 */ -EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSJoinToPath_TCL_DECLARED -#define Tcl_FSJoinToPath_TCL_DECLARED -/* 464 */ -EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_FSGetInternalRep_TCL_DECLARED -#define Tcl_FSGetInternalRep_TCL_DECLARED -/* 465 */ -EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, - Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED -#define Tcl_FSGetTranslatedPath_TCL_DECLARED -/* 466 */ -EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSEvalFile_TCL_DECLARED -#define Tcl_FSEvalFile_TCL_DECLARED -/* 467 */ -EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, - Tcl_Obj * fileName); -#endif -#ifndef Tcl_FSNewNativePath_TCL_DECLARED -#define Tcl_FSNewNativePath_TCL_DECLARED -/* 468 */ -EXTERN Tcl_Obj* Tcl_FSNewNativePath (Tcl_Filesystem* fromFilesystem, - ClientData clientData); -#endif -#ifndef Tcl_FSGetNativePath_TCL_DECLARED -#define Tcl_FSGetNativePath_TCL_DECLARED -/* 469 */ -EXTERN CONST char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED -#define Tcl_FSFileSystemInfo_TCL_DECLARED -/* 470 */ -EXTERN Tcl_Obj* Tcl_FSFileSystemInfo (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSPathSeparator_TCL_DECLARED -#define Tcl_FSPathSeparator_TCL_DECLARED -/* 471 */ -EXTERN Tcl_Obj* Tcl_FSPathSeparator (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSListVolumes_TCL_DECLARED -#define Tcl_FSListVolumes_TCL_DECLARED -/* 472 */ -EXTERN Tcl_Obj* Tcl_FSListVolumes (void); -#endif -#ifndef Tcl_FSRegister_TCL_DECLARED -#define Tcl_FSRegister_TCL_DECLARED -/* 473 */ -EXTERN int Tcl_FSRegister (ClientData clientData, - Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSUnregister_TCL_DECLARED -#define Tcl_FSUnregister_TCL_DECLARED -/* 474 */ -EXTERN int Tcl_FSUnregister (Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSData_TCL_DECLARED -#define Tcl_FSData_TCL_DECLARED -/* 475 */ -EXTERN ClientData Tcl_FSData (Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED -#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED -/* 476 */ -EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED -#define Tcl_FSGetFileSystemForPath_TCL_DECLARED -/* 477 */ -EXTERN Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSGetPathType_TCL_DECLARED -#define Tcl_FSGetPathType_TCL_DECLARED -/* 478 */ -EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_OutputBuffered_TCL_DECLARED -#define Tcl_OutputBuffered_TCL_DECLARED -/* 479 */ -EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_FSMountsChanged_TCL_DECLARED -#define Tcl_FSMountsChanged_TCL_DECLARED -/* 480 */ -EXTERN void Tcl_FSMountsChanged (Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_EvalTokensStandard_TCL_DECLARED -#define Tcl_EvalTokensStandard_TCL_DECLARED -/* 481 */ -EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_GetTime_TCL_DECLARED -#define Tcl_GetTime_TCL_DECLARED -/* 482 */ -EXTERN void Tcl_GetTime (Tcl_Time* timeBuf); -#endif -#ifndef Tcl_CreateObjTrace_TCL_DECLARED -#define Tcl_CreateObjTrace_TCL_DECLARED -/* 483 */ -EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, - int flags, Tcl_CmdObjTraceProc* objProc, - ClientData clientData, - Tcl_CmdObjTraceDeleteProc* delProc); -#endif -#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED -#define Tcl_GetCommandInfoFromToken_TCL_DECLARED -/* 484 */ -EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, - Tcl_CmdInfo* infoPtr); -#endif -#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED -#define Tcl_SetCommandInfoFromToken_TCL_DECLARED -/* 485 */ -EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, - CONST Tcl_CmdInfo* infoPtr); -#endif -#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED -#define Tcl_DbNewWideIntObj_TCL_DECLARED -/* 486 */ -EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, - CONST char * file, int line); -#endif -#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED -#define Tcl_GetWideIntFromObj_TCL_DECLARED -/* 487 */ -EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_WideInt * widePtr); -#endif -#ifndef Tcl_NewWideIntObj_TCL_DECLARED -#define Tcl_NewWideIntObj_TCL_DECLARED -/* 488 */ -EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); -#endif -#ifndef Tcl_SetWideIntObj_TCL_DECLARED -#define Tcl_SetWideIntObj_TCL_DECLARED -/* 489 */ -EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, - Tcl_WideInt wideValue); -#endif -#ifndef Tcl_AllocStatBuf_TCL_DECLARED -#define Tcl_AllocStatBuf_TCL_DECLARED -/* 490 */ -EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); -#endif -#ifndef Tcl_Seek_TCL_DECLARED -#define Tcl_Seek_TCL_DECLARED -/* 491 */ -EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, - int mode); -#endif -#ifndef Tcl_Tell_TCL_DECLARED -#define Tcl_Tell_TCL_DECLARED -/* 492 */ -EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED -#define Tcl_ChannelWideSeekProc_TCL_DECLARED -/* 493 */ -EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_DictObjPut_TCL_DECLARED -#define Tcl_DictObjPut_TCL_DECLARED -/* 494 */ -EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjGet_TCL_DECLARED -#define Tcl_DictObjGet_TCL_DECLARED -/* 495 */ -EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj ** valuePtrPtr); -#endif -#ifndef Tcl_DictObjRemove_TCL_DECLARED -#define Tcl_DictObjRemove_TCL_DECLARED -/* 496 */ -EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); -#endif -#ifndef Tcl_DictObjSize_TCL_DECLARED -#define Tcl_DictObjSize_TCL_DECLARED -/* 497 */ -EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int * sizePtr); -#endif -#ifndef Tcl_DictObjFirst_TCL_DECLARED -#define Tcl_DictObjFirst_TCL_DECLARED -/* 498 */ -EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, - Tcl_Obj * dictPtr, - Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjNext_TCL_DECLARED -#define Tcl_DictObjNext_TCL_DECLARED -/* 499 */ -EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjDone_TCL_DECLARED -#define Tcl_DictObjDone_TCL_DECLARED -/* 500 */ -EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); -#endif -#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED -#define Tcl_DictObjPutKeyList_TCL_DECLARED -/* 501 */ -EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED -#define Tcl_DictObjRemoveKeyList_TCL_DECLARED -/* 502 */ -EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *CONST * keyv); -#endif -#ifndef Tcl_NewDictObj_TCL_DECLARED -#define Tcl_NewDictObj_TCL_DECLARED -/* 503 */ -EXTERN Tcl_Obj * Tcl_NewDictObj (void); -#endif -#ifndef Tcl_DbNewDictObj_TCL_DECLARED -#define Tcl_DbNewDictObj_TCL_DECLARED -/* 504 */ -EXTERN Tcl_Obj * Tcl_DbNewDictObj (CONST char * file, int line); -#endif -#ifndef Tcl_RegisterConfig_TCL_DECLARED -#define Tcl_RegisterConfig_TCL_DECLARED -/* 505 */ -EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, - CONST char* pkgName, - Tcl_Config* configuration, - CONST char* valEncoding); -#endif -#ifndef Tcl_CreateNamespace_TCL_DECLARED -#define Tcl_CreateNamespace_TCL_DECLARED -/* 506 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - CONST char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); -#endif -#ifndef Tcl_DeleteNamespace_TCL_DECLARED -#define Tcl_DeleteNamespace_TCL_DECLARED -/* 507 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_AppendExportList_TCL_DECLARED -#define Tcl_AppendExportList_TCL_DECLARED -/* 508 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_Export_TCL_DECLARED -#define Tcl_Export_TCL_DECLARED -/* 509 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int resetListFirst); -#endif -#ifndef Tcl_Import_TCL_DECLARED -#define Tcl_Import_TCL_DECLARED -/* 510 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int allowOverwrite); -#endif -#ifndef Tcl_ForgetImport_TCL_DECLARED -#define Tcl_ForgetImport_TCL_DECLARED -/* 511 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern); -#endif -#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED -#define Tcl_GetCurrentNamespace_TCL_DECLARED -/* 512 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED -#define Tcl_GetGlobalNamespace_TCL_DECLARED -/* 513 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_FindNamespace_TCL_DECLARED -#define Tcl_FindNamespace_TCL_DECLARED -/* 514 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_FindCommand_TCL_DECLARED -#define Tcl_FindCommand_TCL_DECLARED -/* 515 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_GetCommandFromObj_TCL_DECLARED -#define Tcl_GetCommandFromObj_TCL_DECLARED -/* 516 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCommandFullName_TCL_DECLARED -#define Tcl_GetCommandFullName_TCL_DECLARED -/* 517 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSEvalFileEx_TCL_DECLARED -#define Tcl_FSEvalFileEx_TCL_DECLARED -/* 518 */ -EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, - Tcl_Obj * fileName, - CONST char * encodingName); -#endif -#ifndef Tcl_SetExitProc_TCL_DECLARED -#define Tcl_SetExitProc_TCL_DECLARED -/* 519 */ -EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); -#endif -#ifndef Tcl_LimitAddHandler_TCL_DECLARED -#define Tcl_LimitAddHandler_TCL_DECLARED -/* 520 */ -EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, - Tcl_LimitHandlerProc * handlerProc, - ClientData clientData, - Tcl_LimitHandlerDeleteProc * deleteProc); -#endif -#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED -#define Tcl_LimitRemoveHandler_TCL_DECLARED -/* 521 */ -EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, - int type, Tcl_LimitHandlerProc * handlerProc, - ClientData clientData); -#endif -#ifndef Tcl_LimitReady_TCL_DECLARED -#define Tcl_LimitReady_TCL_DECLARED -/* 522 */ -EXTERN int Tcl_LimitReady (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitCheck_TCL_DECLARED -#define Tcl_LimitCheck_TCL_DECLARED -/* 523 */ -EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitExceeded_TCL_DECLARED -#define Tcl_LimitExceeded_TCL_DECLARED -/* 524 */ -EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitSetCommands_TCL_DECLARED -#define Tcl_LimitSetCommands_TCL_DECLARED -/* 525 */ -EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, - int commandLimit); -#endif -#ifndef Tcl_LimitSetTime_TCL_DECLARED -#define Tcl_LimitSetTime_TCL_DECLARED -/* 526 */ -EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitSetGranularity_TCL_DECLARED -#define Tcl_LimitSetGranularity_TCL_DECLARED -/* 527 */ -EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, - int type, int granularity); -#endif -#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED -#define Tcl_LimitTypeEnabled_TCL_DECLARED -/* 528 */ -EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED -#define Tcl_LimitTypeExceeded_TCL_DECLARED -/* 529 */ -EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeSet_TCL_DECLARED -#define Tcl_LimitTypeSet_TCL_DECLARED -/* 530 */ -EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeReset_TCL_DECLARED -#define Tcl_LimitTypeReset_TCL_DECLARED -/* 531 */ -EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitGetCommands_TCL_DECLARED -#define Tcl_LimitGetCommands_TCL_DECLARED -/* 532 */ -EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitGetTime_TCL_DECLARED -#define Tcl_LimitGetTime_TCL_DECLARED -/* 533 */ -EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitGetGranularity_TCL_DECLARED -#define Tcl_LimitGetGranularity_TCL_DECLARED -/* 534 */ -EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, - int type); -#endif -#ifndef Tcl_SaveInterpState_TCL_DECLARED -#define Tcl_SaveInterpState_TCL_DECLARED -/* 535 */ -EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); -#endif -#ifndef Tcl_RestoreInterpState_TCL_DECLARED -#define Tcl_RestoreInterpState_TCL_DECLARED -/* 536 */ -EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, - Tcl_InterpState state); -#endif -#ifndef Tcl_DiscardInterpState_TCL_DECLARED -#define Tcl_DiscardInterpState_TCL_DECLARED -/* 537 */ -EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); -#endif -#ifndef Tcl_SetReturnOptions_TCL_DECLARED -#define Tcl_SetReturnOptions_TCL_DECLARED -/* 538 */ -EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, - Tcl_Obj * options); -#endif -#ifndef Tcl_GetReturnOptions_TCL_DECLARED -#define Tcl_GetReturnOptions_TCL_DECLARED -/* 539 */ -EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, - int result); -#endif -#ifndef Tcl_IsEnsemble_TCL_DECLARED -#define Tcl_IsEnsemble_TCL_DECLARED -/* 540 */ -EXTERN int Tcl_IsEnsemble (Tcl_Command token); -#endif -#ifndef Tcl_CreateEnsemble_TCL_DECLARED -#define Tcl_CreateEnsemble_TCL_DECLARED -/* 541 */ -EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * namespacePtr, int flags); -#endif -#ifndef Tcl_FindEnsemble_TCL_DECLARED -#define Tcl_FindEnsemble_TCL_DECLARED -/* 542 */ -EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, - Tcl_Obj * cmdNameObj, int flags); -#endif -#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED -/* 543 */ -EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * subcmdList); -#endif -#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED -#define Tcl_SetEnsembleMappingDict_TCL_DECLARED -/* 544 */ -EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * mapDict); -#endif -#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -/* 545 */ -EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * unknownList); -#endif -#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED -#define Tcl_SetEnsembleFlags_TCL_DECLARED -/* 546 */ -EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int flags); -#endif -#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED -/* 547 */ -EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** subcmdListPtr); -#endif -#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED -#define Tcl_GetEnsembleMappingDict_TCL_DECLARED -/* 548 */ -EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** mapDictPtr); -#endif -#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -/* 549 */ -EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** unknownListPtr); -#endif -#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED -#define Tcl_GetEnsembleFlags_TCL_DECLARED -/* 550 */ -EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int * flagsPtr); -#endif -#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED -#define Tcl_GetEnsembleNamespace_TCL_DECLARED -/* 551 */ -EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, - Tcl_Command token, - Tcl_Namespace ** namespacePtrPtr); -#endif -#ifndef Tcl_SetTimeProc_TCL_DECLARED -#define Tcl_SetTimeProc_TCL_DECLARED -/* 552 */ -EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, - Tcl_ScaleTimeProc* scaleProc, - ClientData clientData); -#endif -#ifndef Tcl_QueryTimeProc_TCL_DECLARED -#define Tcl_QueryTimeProc_TCL_DECLARED -/* 553 */ -EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, - Tcl_ScaleTimeProc** scaleProc, - ClientData* clientData); -#endif -#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED -#define Tcl_ChannelThreadActionProc_TCL_DECLARED -/* 554 */ -EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_NewBignumObj_TCL_DECLARED -#define Tcl_NewBignumObj_TCL_DECLARED -/* 555 */ -EXTERN Tcl_Obj* Tcl_NewBignumObj (mp_int* value); -#endif -#ifndef Tcl_DbNewBignumObj_TCL_DECLARED -#define Tcl_DbNewBignumObj_TCL_DECLARED -/* 556 */ -EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, CONST char* file, - int line); -#endif -#ifndef Tcl_SetBignumObj_TCL_DECLARED -#define Tcl_SetBignumObj_TCL_DECLARED -/* 557 */ -EXTERN void Tcl_SetBignumObj (Tcl_Obj* obj, mp_int* value); -#endif -#ifndef Tcl_GetBignumFromObj_TCL_DECLARED -#define Tcl_GetBignumFromObj_TCL_DECLARED -/* 558 */ -EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, - Tcl_Obj* obj, mp_int* value); -#endif -#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED -#define Tcl_TakeBignumFromObj_TCL_DECLARED -/* 559 */ -EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, - Tcl_Obj* obj, mp_int* value); -#endif -#ifndef Tcl_TruncateChannel_TCL_DECLARED -#define Tcl_TruncateChannel_TCL_DECLARED -/* 560 */ -EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, - Tcl_WideInt length); -#endif -#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED -#define Tcl_ChannelTruncateProc_TCL_DECLARED -/* 561 */ -EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED -#define Tcl_SetChannelErrorInterp_TCL_DECLARED -/* 562 */ -EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, - Tcl_Obj* msg); -#endif -#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED -#define Tcl_GetChannelErrorInterp_TCL_DECLARED -/* 563 */ -EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, - Tcl_Obj** msg); -#endif -#ifndef Tcl_SetChannelError_TCL_DECLARED -#define Tcl_SetChannelError_TCL_DECLARED -/* 564 */ -EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj* msg); -#endif -#ifndef Tcl_GetChannelError_TCL_DECLARED -#define Tcl_GetChannelError_TCL_DECLARED -/* 565 */ -EXTERN void Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj** msg); -#endif -#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED -#define Tcl_InitBignumFromDouble_TCL_DECLARED -/* 566 */ -EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, - double initval, mp_int * toInit); -#endif -#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -/* 567 */ -EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -/* 568 */ -EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); -#endif -#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED -#define Tcl_GetEncodingFromObj_TCL_DECLARED -/* 569 */ -EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, - Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); -#endif -#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED -#define Tcl_GetEncodingSearchPath_TCL_DECLARED -/* 570 */ -EXTERN Tcl_Obj* Tcl_GetEncodingSearchPath (void); -#endif -#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED -#define Tcl_SetEncodingSearchPath_TCL_DECLARED -/* 571 */ -EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj* searchPath); -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -/* 572 */ -EXTERN CONST char * Tcl_GetEncodingNameFromEnvironment ( - Tcl_DString* bufPtr); -#endif -#ifndef Tcl_PkgRequireProc_TCL_DECLARED -#define Tcl_PkgRequireProc_TCL_DECLARED -/* 573 */ -EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, - CONST char * name, int objc, - Tcl_Obj *CONST objv[], - ClientData * clientDataPtr); -#endif -#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED -#define Tcl_AppendObjToErrorInfo_TCL_DECLARED -/* 574 */ -EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED -#define Tcl_AppendLimitedToObj_TCL_DECLARED -/* 575 */ -EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, - CONST char * bytes, int length, int limit, - CONST char * ellipsis); -#endif -#ifndef Tcl_Format_TCL_DECLARED -#define Tcl_Format_TCL_DECLARED -/* 576 */ -EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, CONST char * format, - int objc, Tcl_Obj * CONST objv[]); -#endif -#ifndef Tcl_AppendFormatToObj_TCL_DECLARED -#define Tcl_AppendFormatToObj_TCL_DECLARED -/* 577 */ -EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST char * format, - int objc, Tcl_Obj * CONST objv[]); -#endif -#ifndef Tcl_ObjPrintf_TCL_DECLARED -#define Tcl_ObjPrintf_TCL_DECLARED -/* 578 */ -EXTERN Tcl_Obj * Tcl_ObjPrintf (CONST char * format, ...); -#endif -#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED -#define Tcl_AppendPrintfToObj_TCL_DECLARED -/* 579 */ -EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, - CONST char * format, ...); -#endif -#ifndef Tcl_CancelEval_TCL_DECLARED -#define Tcl_CancelEval_TCL_DECLARED -/* 580 */ -EXTERN int Tcl_CancelEval (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr, - ClientData clientData, int flags); -#endif -#ifndef Tcl_Canceled_TCL_DECLARED -#define Tcl_Canceled_TCL_DECLARED -/* 581 */ -EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); -#endif -#ifndef Tcl_NRCreateCommand_TCL_DECLARED -#define Tcl_NRCreateCommand_TCL_DECLARED -/* 582 */ -EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_ObjCmdProc * proc, - Tcl_ObjCmdProc * nreProc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_NREvalObj_TCL_DECLARED -#define Tcl_NREvalObj_TCL_DECLARED -/* 583 */ -EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_NREvalObjv_TCL_DECLARED -#define Tcl_NREvalObjv_TCL_DECLARED -/* 584 */ -EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); -#endif -#ifndef Tcl_NRCmdSwap_TCL_DECLARED -#define Tcl_NRCmdSwap_TCL_DECLARED -/* 585 */ -EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_NRAddCallback_TCL_DECLARED -#define Tcl_NRAddCallback_TCL_DECLARED -/* 586 */ -EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, - Tcl_NRPostProc * postProcPtr, - ClientData data0, ClientData data1, - ClientData data2, ClientData data3); -#endif -#ifndef Tcl_NRCallObjProc_TCL_DECLARED -#define Tcl_NRCallObjProc_TCL_DECLARED -/* 587 */ -EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, - Tcl_ObjCmdProc * objProc, - ClientData clientData, int objc, - Tcl_Obj *const objv[]); -#endif - -typedef struct TclStubHooks { - CONST struct TclPlatStubs *tclPlatStubs; - CONST struct TclIntStubs *tclIntStubs; - CONST struct TclIntPlatStubs *tclIntPlatStubs; -} TclStubHooks; - -typedef struct TclStubs { - int magic; - CONST struct TclStubHooks *hooks; - - int (*tcl_PkgProvideEx) (Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData); /* 0 */ - CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 1 */ - void (*tcl_Panic) (CONST char * format, ...); /* 2 */ - char * (*tcl_Alloc) (unsigned int size); /* 3 */ - void (*tcl_Free) (char * ptr); /* 4 */ - char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ - char * (*tcl_DbCkalloc) (unsigned int size, CONST char * file, int line); /* 6 */ - int (*tcl_DbCkfree) (char * ptr, CONST char * file, int line); /* 7 */ - char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved9; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved10; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* MACOSX */ - void (*tcl_SetTimer) (Tcl_Time * timePtr); /* 11 */ - void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (Tcl_Time * timePtr); /* 13 */ - int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ - void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ - void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ - Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr); /* 18 */ - void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ - void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ - int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ - Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, CONST char * file, int line); /* 22 */ - Tcl_Obj * (*tcl_DbNewByteArrayObj) (CONST unsigned char * bytes, int length, CONST char * file, int line); /* 23 */ - Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, CONST char * file, int line); /* 24 */ - Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *CONST * objv, CONST char * file, int line); /* 25 */ - Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, CONST char * file, int line); /* 26 */ - Tcl_Obj * (*tcl_DbNewObj) (CONST char * file, int line); /* 27 */ - Tcl_Obj * (*tcl_DbNewStringObj) (CONST char * bytes, int length, CONST char * file, int line); /* 28 */ - Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ - void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ - int (*tcl_GetBoolean) (Tcl_Interp * interp, CONST char * src, int * boolPtr); /* 31 */ - int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ - unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ - int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ - int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ - int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ - int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ - int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ - char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ - void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ - int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ - int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ - int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ - int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ - int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ - int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[]); /* 48 */ - Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ - Tcl_Obj * (*tcl_NewByteArrayObj) (CONST unsigned char* bytes, int length); /* 50 */ - Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ - Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ - Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *CONST objv[]); /* 53 */ - Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ - Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ - Tcl_Obj * (*tcl_NewStringObj) (CONST char * bytes, int length); /* 56 */ - void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ - unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ - void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, CONST unsigned char * bytes, int length); /* 59 */ - void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ - void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ - void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[]); /* 62 */ - void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ - void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ - void (*tcl_SetStringObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 65 */ - void (*tcl_AddErrorInfo) (Tcl_Interp * interp, CONST char * message); /* 66 */ - void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, CONST char * message, int length); /* 67 */ - void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ - void (*tcl_AppendElement) (Tcl_Interp * interp, CONST char * element); /* 69 */ - void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ - Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ - void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ - int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ - void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ - int (*tcl_AsyncReady) (void); /* 75 */ - void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ - char (*tcl_Backslash) (CONST char * src, int * readPtr); /* 77 */ - int (*tcl_BadChannelOption) (Tcl_Interp * interp, CONST char * optionName, CONST char * optionList); /* 78 */ - void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ - void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ - int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ - int (*tcl_CommandComplete) (CONST char * cmd); /* 82 */ - char * (*tcl_Concat) (int argc, CONST84 char * CONST * argv); /* 83 */ - int (*tcl_ConvertElement) (CONST char * src, char * dst, int flags); /* 84 */ - int (*tcl_ConvertCountedElement) (CONST char * src, int length, char * dst, int flags); /* 85 */ - int (*tcl_CreateAlias) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * argv); /* 86 */ - int (*tcl_CreateAliasObj) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[]); /* 87 */ - Tcl_Channel (*tcl_CreateChannel) (Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ - void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ - void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ - Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ - void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ - void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ - Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ - void (*tcl_CreateMathFunc) (Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ - Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ - Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, CONST char * slaveName, int isSafe); /* 97 */ - Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ - Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ - void (*tcl_DeleteAssocData) (Tcl_Interp * interp, CONST char * name); /* 100 */ - void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ - void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ - int (*tcl_DeleteCommand) (Tcl_Interp * interp, CONST char * cmdName); /* 103 */ - int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ - void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ - void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ - void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ - void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ - void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ - void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* MACOSX */ - void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ - void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ - void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ - int (*tcl_DoOneEvent) (int flags); /* 115 */ - void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ - char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, CONST char * bytes, int length); /* 117 */ - char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, CONST char * element); /* 118 */ - void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ - void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ - void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ - void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ - void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ - void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ - void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ - int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ - CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ - CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ - int (*tcl_Eval) (Tcl_Interp * interp, CONST char * script); /* 129 */ - int (*tcl_EvalFile) (Tcl_Interp * interp, CONST char * fileName); /* 130 */ - int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ - void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ - void (*tcl_Exit) (int status); /* 133 */ - int (*tcl_ExposeCommand) (Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName); /* 134 */ - int (*tcl_ExprBoolean) (Tcl_Interp * interp, CONST char * expr, int * ptr); /* 135 */ - int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ - int (*tcl_ExprDouble) (Tcl_Interp * interp, CONST char * expr, double * ptr); /* 137 */ - int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ - int (*tcl_ExprLong) (Tcl_Interp * interp, CONST char * expr, long * ptr); /* 139 */ - int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ - int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ - int (*tcl_ExprString) (Tcl_Interp * interp, CONST char * expr); /* 142 */ - void (*tcl_Finalize) (void); /* 143 */ - void (*tcl_FindExecutable) (CONST char * argv0); /* 144 */ - Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ - int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ - void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ - int (*tcl_GetAlias) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ - int (*tcl_GetAliasObj) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ - ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ - Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, CONST char * chanName, int * modePtr); /* 151 */ - int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ - int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ - ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ - int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ - CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ - int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr); /* 157 */ - Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ - int (*tcl_GetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ - CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ - int (*tcl_GetErrno) (void); /* 161 */ - CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ - int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ - Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ - CONST char * (*tcl_GetNameOfExecutable) (void); /* 165 */ - Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved167; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* MACOSX */ - Tcl_PathType (*tcl_GetPathType) (CONST char * path); /* 168 */ - int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ - int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ - int (*tcl_GetServiceMode) (void); /* 171 */ - Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, CONST char * slaveName); /* 172 */ - Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ - CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ - CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 175 */ - CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 176 */ - int (*tcl_GlobalEval) (Tcl_Interp * interp, CONST char * command); /* 177 */ - int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ - int (*tcl_HideCommand) (Tcl_Interp * interp, CONST char * cmdName, CONST char * hiddenCmdToken); /* 179 */ - int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ - void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ - int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ - int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ - int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ - int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ - char * (*tcl_JoinPath) (int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr); /* 186 */ - int (*tcl_LinkVar) (Tcl_Interp * interp, CONST char * varName, char * addr, int type); /* 187 */ - void *reserved188; - Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ - int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ - Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ - char * (*tcl_Merge) (int argc, CONST84 char * CONST * argv); /* 192 */ - Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ - void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ - Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ - Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* MACOSX */ - Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions); /* 198 */ - Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async); /* 199 */ - Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ - void (*tcl_Preserve) (ClientData data); /* 201 */ - void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ - int (*tcl_PutEnv) (CONST char * assignment); /* 203 */ - CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ - void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ - int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* MACOSX */ - int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ - int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ - void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (Tcl_ObjType * typePtr); /* 211 */ - Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ - int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ - int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ - void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ - void (*tcl_Release) (ClientData clientData); /* 216 */ - void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ - int (*tcl_ScanElement) (CONST char * str, int * flagPtr); /* 218 */ - int (*tcl_ScanCountedElement) (CONST char * str, int length, int * flagPtr); /* 219 */ - int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ - int (*tcl_ServiceAll) (void); /* 221 */ - int (*tcl_ServiceEvent) (int flags); /* 222 */ - void (*tcl_SetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ - void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ - int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, CONST char * newValue); /* 225 */ - int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ - void (*tcl_SetErrno) (int err); /* 227 */ - void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (Tcl_Time * timePtr); /* 229 */ - void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ - int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ - void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ - int (*tcl_SetServiceMode) (int mode); /* 233 */ - void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ - void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ - void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ - CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, CONST char * varName, CONST char * newValue, int flags); /* 237 */ - CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * newValue, int flags); /* 238 */ - CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ - CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ - void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ - int (*tcl_SplitList) (Tcl_Interp * interp, CONST char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ - void (*tcl_SplitPath) (CONST char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ - void (*tcl_StaticPackage) (Tcl_Interp * interp, CONST char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ - int (*tcl_StringMatch) (CONST char * str, CONST char * pattern); /* 245 */ - int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ - int (*tcl_TraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ - int (*tcl_TraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ - char * (*tcl_TranslateFileName) (Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr); /* 249 */ - int (*tcl_Ungets) (Tcl_Channel chan, CONST char * str, int len, int atHead); /* 250 */ - void (*tcl_UnlinkVar) (Tcl_Interp * interp, CONST char * varName); /* 251 */ - int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ - int (*tcl_UnsetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 253 */ - int (*tcl_UnsetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 254 */ - void (*tcl_UntraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ - void (*tcl_UntraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ - void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, CONST char * varName); /* 257 */ - int (*tcl_UpVar) (Tcl_Interp * interp, CONST char * frameName, CONST char * varName, CONST char * localName, int flags); /* 258 */ - int (*tcl_UpVar2) (Tcl_Interp * interp, CONST char * frameName, CONST char * part1, CONST char * part2, CONST char * localName, int flags); /* 259 */ - int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ - ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ - ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ - int (*tcl_Write) (Tcl_Channel chan, CONST char * s, int slen); /* 263 */ - void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message); /* 264 */ - int (*tcl_DumpActiveMemory) (CONST char * fileName); /* 265 */ - void (*tcl_ValidateAllMemory) (CONST char * file, int line); /* 266 */ - void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ - void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ - CONST84_RETURN char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ - CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, CONST char * start, CONST84 char ** termPtr); /* 270 */ - CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 271 */ - CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 272 */ - int (*tcl_PkgProvide) (Tcl_Interp * interp, CONST char * name, CONST char * version); /* 273 */ - CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 274 */ - void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ - int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ - Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ - void (*tcl_PanicVA) (CONST char * format, va_list argList); /* 278 */ - void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ - void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ - Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ - int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ - Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ - void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ - void *reserved285; - void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ - Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ - void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ - void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ - void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ - int (*tcl_EvalEx) (Tcl_Interp * interp, CONST char * script, int numBytes, int flags); /* 291 */ - int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 292 */ - int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ - void (*tcl_ExitThread) (int status); /* 294 */ - int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ - char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ - void (*tcl_FinalizeThread) (void); /* 297 */ - void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ - void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ - Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ - Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, CONST char * name); /* 301 */ - CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ - void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ - int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr); /* 304 */ - VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ - Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 306 */ - ClientData (*tcl_InitNotifier) (void); /* 307 */ - void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ - void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ - void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); /* 311 */ - int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ - int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ - void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ - void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ - int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, CONST char * name); /* 316 */ - Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ - void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ - void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); /* 319 */ - Tcl_UniChar (*tcl_UniCharAtIndex) (CONST char * src, int index); /* 320 */ - Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ - Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ - Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ - int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ - CONST84_RETURN char * (*tcl_UtfAtIndex) (CONST char * src, int index); /* 325 */ - int (*tcl_UtfCharComplete) (CONST char * src, int length); /* 326 */ - int (*tcl_UtfBackslash) (CONST char * src, int * readPtr, char * dst); /* 327 */ - CONST84_RETURN char * (*tcl_UtfFindFirst) (CONST char * src, int ch); /* 328 */ - CONST84_RETURN char * (*tcl_UtfFindLast) (CONST char * src, int ch); /* 329 */ - CONST84_RETURN char * (*tcl_UtfNext) (CONST char * src); /* 330 */ - CONST84_RETURN char * (*tcl_UtfPrev) (CONST char * src, CONST char * start); /* 331 */ - int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ - char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ - int (*tcl_UtfToLower) (char * src); /* 334 */ - int (*tcl_UtfToTitle) (char * src); /* 335 */ - int (*tcl_UtfToUniChar) (CONST char * src, Tcl_UniChar * chPtr); /* 336 */ - int (*tcl_UtfToUpper) (char * src); /* 337 */ - int (*tcl_WriteChars) (Tcl_Channel chan, CONST char * src, int srcLen); /* 338 */ - int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ - char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ - CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ - void (*tcl_SetDefaultEncodingDir) (CONST char * path); /* 342 */ - void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ - void (*tcl_ServiceModeHook) (int mode); /* 344 */ - int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ - int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ - int (*tcl_UniCharIsDigit) (int ch); /* 347 */ - int (*tcl_UniCharIsLower) (int ch); /* 348 */ - int (*tcl_UniCharIsSpace) (int ch); /* 349 */ - int (*tcl_UniCharIsUpper) (int ch); /* 350 */ - int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ - int (*tcl_UniCharLen) (CONST Tcl_UniChar * uniStr); /* 352 */ - int (*tcl_UniCharNcmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 353 */ - char * (*tcl_UniCharToUtfDString) (CONST Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ - Tcl_UniChar * (*tcl_UtfToUniCharDString) (CONST char * src, int length, Tcl_DString * dsPtr); /* 355 */ - Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ - Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ - void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ - void (*tcl_LogCommandInfo) (Tcl_Interp * interp, CONST char * script, CONST char * command, int length); /* 359 */ - int (*tcl_ParseBraces) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ - int (*tcl_ParseCommand) (Tcl_Interp * interp, CONST char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ - int (*tcl_ParseExpr) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ - int (*tcl_ParseQuotedString) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ - int (*tcl_ParseVarName) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ - char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ - int (*tcl_Chdir) (CONST char * dirName); /* 366 */ - int (*tcl_Access) (CONST char * path, int mode); /* 367 */ - int (*tcl_Stat) (CONST char * path, struct stat * bufPtr); /* 368 */ - int (*tcl_UtfNcmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 369 */ - int (*tcl_UtfNcasecmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 370 */ - int (*tcl_StringCaseMatch) (CONST char * str, CONST char * pattern, int nocase); /* 371 */ - int (*tcl_UniCharIsControl) (int ch); /* 372 */ - int (*tcl_UniCharIsGraph) (int ch); /* 373 */ - int (*tcl_UniCharIsPrint) (int ch); /* 374 */ - int (*tcl_UniCharIsPunct) (int ch); /* 375 */ - int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ - void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ - Tcl_Obj * (*tcl_NewUnicodeObj) (CONST Tcl_UniChar * unicode, int numChars); /* 378 */ - void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars); /* 379 */ - int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ - Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ - Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ - Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ - void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length); /* 384 */ - int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ - void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ - Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ - int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ - int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, CONST char * pattern); /* 389 */ - int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 390 */ - void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ - void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ - int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ - int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ - int (*tcl_WriteRaw) (Tcl_Channel chan, CONST char * src, int srcLen); /* 395 */ - Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ - int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ - CONST84_RETURN char * (*tcl_ChannelName) (CONST Tcl_ChannelType * chanTypePtr); /* 398 */ - Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (CONST Tcl_ChannelType * chanTypePtr); /* 399 */ - Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (CONST Tcl_ChannelType * chanTypePtr); /* 400 */ - Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (CONST Tcl_ChannelType * chanTypePtr); /* 401 */ - Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (CONST Tcl_ChannelType * chanTypePtr); /* 402 */ - Tcl_DriverInputProc * (*tcl_ChannelInputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 403 */ - Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 404 */ - Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 405 */ - Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 406 */ - Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 407 */ - Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (CONST Tcl_ChannelType * chanTypePtr); /* 408 */ - Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (CONST Tcl_ChannelType * chanTypePtr); /* 409 */ - Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (CONST Tcl_ChannelType * chanTypePtr); /* 410 */ - Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (CONST Tcl_ChannelType * chanTypePtr); /* 411 */ - int (*tcl_JoinThread) (Tcl_ThreadId threadId, int* result); /* 412 */ - int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ - int (*tcl_IsChannelRegistered) (Tcl_Interp* interp, Tcl_Channel channel); /* 414 */ - void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ - void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ - void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ - int (*tcl_IsChannelExisting) (CONST char* channelName); /* 418 */ - int (*tcl_UniCharNcasecmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 419 */ - int (*tcl_UniCharCaseMatch) (CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase); /* 420 */ - Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, CONST char * key); /* 421 */ - Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, CONST char * key, int * newPtr); /* 422 */ - void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr); /* 423 */ - void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ - ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ - int (*tcl_TraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ - void (*tcl_UntraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ - char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ - char * (*tcl_AttemptDbCkalloc) (unsigned int size, CONST char * file, int line); /* 429 */ - char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ - char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 431 */ - int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ - Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ - Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ - int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, CONST char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ - Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, CONST char * pattern); /* 436 */ - Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ - int (*tcl_DetachChannel) (Tcl_Interp* interp, Tcl_Channel channel); /* 438 */ - int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ - int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ - int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ - int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ - int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ - int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * sym1, CONST char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ - int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, CONST char * pattern, Tcl_GlobTypeData * types); /* 445 */ - Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ - int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ - int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ - int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ - int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ - int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ - int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ - CONST char ** (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ - int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ - int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ - Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions); /* 456 */ - Tcl_Obj* (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ - int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ - int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ - Tcl_Obj* (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ - Tcl_Obj* (*tcl_FSSplitPath) (Tcl_Obj* pathPtr, int * lenPtr); /* 461 */ - int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ - Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ - Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, Tcl_Filesystem * fsPtr); /* 465 */ - Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ - int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj* (*tcl_FSNewNativePath) (Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ - CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ - Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ - Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ - Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (Tcl_Filesystem * fsPtr); /* 475 */ - CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ - Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ - Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ - int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (Tcl_Filesystem * fsPtr); /* 480 */ - int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ - void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ - Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ - int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo* infoPtr); /* 484 */ - int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, CONST Tcl_CmdInfo* infoPtr); /* 485 */ - Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, CONST char * file, int line); /* 486 */ - int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ - Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ - void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ - Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ - Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ - Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ - Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 493 */ - int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ - int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ - int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ - int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ - int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ - void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ - void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ - int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); /* 501 */ - int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv); /* 502 */ - Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ - Tcl_Obj * (*tcl_DbNewDictObj) (CONST char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 509 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 510 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 511 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ - int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, CONST char * encodingName); /* 518 */ - Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ - void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ - void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ - int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ - int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ - int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ - void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ - void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ - void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ - int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ - int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ - void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ - void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ - int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ - void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ - int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ - Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ - int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ - void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ - int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ - Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ - int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ - Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ - Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ - int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ - int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ - int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ - int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ - int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ - int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ - int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ - int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ - int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ - void (*tcl_SetTimeProc) (Tcl_GetTimeProc* getProc, Tcl_ScaleTimeProc* scaleProc, ClientData clientData); /* 552 */ - void (*tcl_QueryTimeProc) (Tcl_GetTimeProc** getProc, Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); /* 553 */ - Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 554 */ - Tcl_Obj* (*tcl_NewBignumObj) (mp_int* value); /* 555 */ - Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, CONST char* file, int line); /* 556 */ - void (*tcl_SetBignumObj) (Tcl_Obj* obj, mp_int* value); /* 557 */ - int (*tcl_GetBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 558 */ - int (*tcl_TakeBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 559 */ - int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ - Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (CONST Tcl_ChannelType * chanTypePtr); /* 561 */ - void (*tcl_SetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj* msg); /* 562 */ - void (*tcl_GetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj** msg); /* 563 */ - void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj* msg); /* 564 */ - void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj** msg); /* 565 */ - int (*tcl_InitBignumFromDouble) (Tcl_Interp* interp, double initval, mp_int * toInit); /* 566 */ - Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ - int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ - int (*tcl_GetEncodingFromObj) (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); /* 569 */ - Tcl_Obj* (*tcl_GetEncodingSearchPath) (void); /* 570 */ - int (*tcl_SetEncodingSearchPath) (Tcl_Obj* searchPath); /* 571 */ - CONST char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ - int (*tcl_PkgRequireProc) (Tcl_Interp * interp, CONST char * name, int objc, Tcl_Obj *CONST objv[], ClientData * clientDataPtr); /* 573 */ - void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ - void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, CONST char * bytes, int length, int limit, CONST char * ellipsis); /* 575 */ - Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 576 */ - int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 577 */ - Tcl_Obj * (*tcl_ObjPrintf) (CONST char * format, ...); /* 578 */ - void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ - int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ - int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ - Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ - int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ - int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ - int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[]); /* 585 */ - void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ -} TclStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclStubs *tclStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef Tcl_PkgProvideEx -#define Tcl_PkgProvideEx \ - (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ -#endif -#ifndef Tcl_PkgRequireEx -#define Tcl_PkgRequireEx \ - (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ -#endif -#ifndef Tcl_Panic -#define Tcl_Panic \ - (tclStubsPtr->tcl_Panic) /* 2 */ -#endif -#ifndef Tcl_Alloc -#define Tcl_Alloc \ - (tclStubsPtr->tcl_Alloc) /* 3 */ -#endif -#ifndef Tcl_Free -#define Tcl_Free \ - (tclStubsPtr->tcl_Free) /* 4 */ -#endif -#ifndef Tcl_Realloc -#define Tcl_Realloc \ - (tclStubsPtr->tcl_Realloc) /* 5 */ -#endif -#ifndef Tcl_DbCkalloc -#define Tcl_DbCkalloc \ - (tclStubsPtr->tcl_DbCkalloc) /* 6 */ -#endif -#ifndef Tcl_DbCkfree -#define Tcl_DbCkfree \ - (tclStubsPtr->tcl_DbCkfree) /* 7 */ -#endif -#ifndef Tcl_DbCkrealloc -#define Tcl_DbCkrealloc \ - (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer -#define Tcl_SetTimer \ - (tclStubsPtr->tcl_SetTimer) /* 11 */ -#endif -#ifndef Tcl_Sleep -#define Tcl_Sleep \ - (tclStubsPtr->tcl_Sleep) /* 12 */ -#endif -#ifndef Tcl_WaitForEvent -#define Tcl_WaitForEvent \ - (tclStubsPtr->tcl_WaitForEvent) /* 13 */ -#endif -#ifndef Tcl_AppendAllObjTypes -#define Tcl_AppendAllObjTypes \ - (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ -#endif -#ifndef Tcl_AppendStringsToObj -#define Tcl_AppendStringsToObj \ - (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ -#endif -#ifndef Tcl_AppendToObj -#define Tcl_AppendToObj \ - (tclStubsPtr->tcl_AppendToObj) /* 16 */ -#endif -#ifndef Tcl_ConcatObj -#define Tcl_ConcatObj \ - (tclStubsPtr->tcl_ConcatObj) /* 17 */ -#endif -#ifndef Tcl_ConvertToType -#define Tcl_ConvertToType \ - (tclStubsPtr->tcl_ConvertToType) /* 18 */ -#endif -#ifndef Tcl_DbDecrRefCount -#define Tcl_DbDecrRefCount \ - (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ -#endif -#ifndef Tcl_DbIncrRefCount -#define Tcl_DbIncrRefCount \ - (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ -#endif -#ifndef Tcl_DbIsShared -#define Tcl_DbIsShared \ - (tclStubsPtr->tcl_DbIsShared) /* 21 */ -#endif -#ifndef Tcl_DbNewBooleanObj -#define Tcl_DbNewBooleanObj \ - (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ -#endif -#ifndef Tcl_DbNewByteArrayObj -#define Tcl_DbNewByteArrayObj \ - (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ -#endif -#ifndef Tcl_DbNewDoubleObj -#define Tcl_DbNewDoubleObj \ - (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ -#endif -#ifndef Tcl_DbNewListObj -#define Tcl_DbNewListObj \ - (tclStubsPtr->tcl_DbNewListObj) /* 25 */ -#endif -#ifndef Tcl_DbNewLongObj -#define Tcl_DbNewLongObj \ - (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ -#endif -#ifndef Tcl_DbNewObj -#define Tcl_DbNewObj \ - (tclStubsPtr->tcl_DbNewObj) /* 27 */ -#endif -#ifndef Tcl_DbNewStringObj -#define Tcl_DbNewStringObj \ - (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ -#endif -#ifndef Tcl_DuplicateObj -#define Tcl_DuplicateObj \ - (tclStubsPtr->tcl_DuplicateObj) /* 29 */ -#endif -#ifndef TclFreeObj -#define TclFreeObj \ - (tclStubsPtr->tclFreeObj) /* 30 */ -#endif -#ifndef Tcl_GetBoolean -#define Tcl_GetBoolean \ - (tclStubsPtr->tcl_GetBoolean) /* 31 */ -#endif -#ifndef Tcl_GetBooleanFromObj -#define Tcl_GetBooleanFromObj \ - (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ -#endif -#ifndef Tcl_GetByteArrayFromObj -#define Tcl_GetByteArrayFromObj \ - (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ -#endif -#ifndef Tcl_GetDouble -#define Tcl_GetDouble \ - (tclStubsPtr->tcl_GetDouble) /* 34 */ -#endif -#ifndef Tcl_GetDoubleFromObj -#define Tcl_GetDoubleFromObj \ - (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ -#endif -#ifndef Tcl_GetIndexFromObj -#define Tcl_GetIndexFromObj \ - (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ -#endif -#ifndef Tcl_GetInt -#define Tcl_GetInt \ - (tclStubsPtr->tcl_GetInt) /* 37 */ -#endif -#ifndef Tcl_GetIntFromObj -#define Tcl_GetIntFromObj \ - (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ -#endif -#ifndef Tcl_GetLongFromObj -#define Tcl_GetLongFromObj \ - (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ -#endif -#ifndef Tcl_GetObjType -#define Tcl_GetObjType \ - (tclStubsPtr->tcl_GetObjType) /* 40 */ -#endif -#ifndef Tcl_GetStringFromObj -#define Tcl_GetStringFromObj \ - (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ -#endif -#ifndef Tcl_InvalidateStringRep -#define Tcl_InvalidateStringRep \ - (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ -#endif -#ifndef Tcl_ListObjAppendList -#define Tcl_ListObjAppendList \ - (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ -#endif -#ifndef Tcl_ListObjAppendElement -#define Tcl_ListObjAppendElement \ - (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ -#endif -#ifndef Tcl_ListObjGetElements -#define Tcl_ListObjGetElements \ - (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ -#endif -#ifndef Tcl_ListObjIndex -#define Tcl_ListObjIndex \ - (tclStubsPtr->tcl_ListObjIndex) /* 46 */ -#endif -#ifndef Tcl_ListObjLength -#define Tcl_ListObjLength \ - (tclStubsPtr->tcl_ListObjLength) /* 47 */ -#endif -#ifndef Tcl_ListObjReplace -#define Tcl_ListObjReplace \ - (tclStubsPtr->tcl_ListObjReplace) /* 48 */ -#endif -#ifndef Tcl_NewBooleanObj -#define Tcl_NewBooleanObj \ - (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ -#endif -#ifndef Tcl_NewByteArrayObj -#define Tcl_NewByteArrayObj \ - (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ -#endif -#ifndef Tcl_NewDoubleObj -#define Tcl_NewDoubleObj \ - (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ -#endif -#ifndef Tcl_NewIntObj -#define Tcl_NewIntObj \ - (tclStubsPtr->tcl_NewIntObj) /* 52 */ -#endif -#ifndef Tcl_NewListObj -#define Tcl_NewListObj \ - (tclStubsPtr->tcl_NewListObj) /* 53 */ -#endif -#ifndef Tcl_NewLongObj -#define Tcl_NewLongObj \ - (tclStubsPtr->tcl_NewLongObj) /* 54 */ -#endif -#ifndef Tcl_NewObj -#define Tcl_NewObj \ - (tclStubsPtr->tcl_NewObj) /* 55 */ -#endif -#ifndef Tcl_NewStringObj -#define Tcl_NewStringObj \ - (tclStubsPtr->tcl_NewStringObj) /* 56 */ -#endif -#ifndef Tcl_SetBooleanObj -#define Tcl_SetBooleanObj \ - (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ -#endif -#ifndef Tcl_SetByteArrayLength -#define Tcl_SetByteArrayLength \ - (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ -#endif -#ifndef Tcl_SetByteArrayObj -#define Tcl_SetByteArrayObj \ - (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ -#endif -#ifndef Tcl_SetDoubleObj -#define Tcl_SetDoubleObj \ - (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ -#endif -#ifndef Tcl_SetIntObj -#define Tcl_SetIntObj \ - (tclStubsPtr->tcl_SetIntObj) /* 61 */ -#endif -#ifndef Tcl_SetListObj -#define Tcl_SetListObj \ - (tclStubsPtr->tcl_SetListObj) /* 62 */ -#endif -#ifndef Tcl_SetLongObj -#define Tcl_SetLongObj \ - (tclStubsPtr->tcl_SetLongObj) /* 63 */ -#endif -#ifndef Tcl_SetObjLength -#define Tcl_SetObjLength \ - (tclStubsPtr->tcl_SetObjLength) /* 64 */ -#endif -#ifndef Tcl_SetStringObj -#define Tcl_SetStringObj \ - (tclStubsPtr->tcl_SetStringObj) /* 65 */ -#endif -#ifndef Tcl_AddErrorInfo -#define Tcl_AddErrorInfo \ - (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ -#endif -#ifndef Tcl_AddObjErrorInfo -#define Tcl_AddObjErrorInfo \ - (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ -#endif -#ifndef Tcl_AllowExceptions -#define Tcl_AllowExceptions \ - (tclStubsPtr->tcl_AllowExceptions) /* 68 */ -#endif -#ifndef Tcl_AppendElement -#define Tcl_AppendElement \ - (tclStubsPtr->tcl_AppendElement) /* 69 */ -#endif -#ifndef Tcl_AppendResult -#define Tcl_AppendResult \ - (tclStubsPtr->tcl_AppendResult) /* 70 */ -#endif -#ifndef Tcl_AsyncCreate -#define Tcl_AsyncCreate \ - (tclStubsPtr->tcl_AsyncCreate) /* 71 */ -#endif -#ifndef Tcl_AsyncDelete -#define Tcl_AsyncDelete \ - (tclStubsPtr->tcl_AsyncDelete) /* 72 */ -#endif -#ifndef Tcl_AsyncInvoke -#define Tcl_AsyncInvoke \ - (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ -#endif -#ifndef Tcl_AsyncMark -#define Tcl_AsyncMark \ - (tclStubsPtr->tcl_AsyncMark) /* 74 */ -#endif -#ifndef Tcl_AsyncReady -#define Tcl_AsyncReady \ - (tclStubsPtr->tcl_AsyncReady) /* 75 */ -#endif -#ifndef Tcl_BackgroundError -#define Tcl_BackgroundError \ - (tclStubsPtr->tcl_BackgroundError) /* 76 */ -#endif -#ifndef Tcl_Backslash -#define Tcl_Backslash \ - (tclStubsPtr->tcl_Backslash) /* 77 */ -#endif -#ifndef Tcl_BadChannelOption -#define Tcl_BadChannelOption \ - (tclStubsPtr->tcl_BadChannelOption) /* 78 */ -#endif -#ifndef Tcl_CallWhenDeleted -#define Tcl_CallWhenDeleted \ - (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ -#endif -#ifndef Tcl_CancelIdleCall -#define Tcl_CancelIdleCall \ - (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ -#endif -#ifndef Tcl_Close -#define Tcl_Close \ - (tclStubsPtr->tcl_Close) /* 81 */ -#endif -#ifndef Tcl_CommandComplete -#define Tcl_CommandComplete \ - (tclStubsPtr->tcl_CommandComplete) /* 82 */ -#endif -#ifndef Tcl_Concat -#define Tcl_Concat \ - (tclStubsPtr->tcl_Concat) /* 83 */ -#endif -#ifndef Tcl_ConvertElement -#define Tcl_ConvertElement \ - (tclStubsPtr->tcl_ConvertElement) /* 84 */ -#endif -#ifndef Tcl_ConvertCountedElement -#define Tcl_ConvertCountedElement \ - (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ -#endif -#ifndef Tcl_CreateAlias -#define Tcl_CreateAlias \ - (tclStubsPtr->tcl_CreateAlias) /* 86 */ -#endif -#ifndef Tcl_CreateAliasObj -#define Tcl_CreateAliasObj \ - (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ -#endif -#ifndef Tcl_CreateChannel -#define Tcl_CreateChannel \ - (tclStubsPtr->tcl_CreateChannel) /* 88 */ -#endif -#ifndef Tcl_CreateChannelHandler -#define Tcl_CreateChannelHandler \ - (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ -#endif -#ifndef Tcl_CreateCloseHandler -#define Tcl_CreateCloseHandler \ - (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ -#endif -#ifndef Tcl_CreateCommand -#define Tcl_CreateCommand \ - (tclStubsPtr->tcl_CreateCommand) /* 91 */ -#endif -#ifndef Tcl_CreateEventSource -#define Tcl_CreateEventSource \ - (tclStubsPtr->tcl_CreateEventSource) /* 92 */ -#endif -#ifndef Tcl_CreateExitHandler -#define Tcl_CreateExitHandler \ - (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ -#endif -#ifndef Tcl_CreateInterp -#define Tcl_CreateInterp \ - (tclStubsPtr->tcl_CreateInterp) /* 94 */ -#endif -#ifndef Tcl_CreateMathFunc -#define Tcl_CreateMathFunc \ - (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ -#endif -#ifndef Tcl_CreateObjCommand -#define Tcl_CreateObjCommand \ - (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ -#endif -#ifndef Tcl_CreateSlave -#define Tcl_CreateSlave \ - (tclStubsPtr->tcl_CreateSlave) /* 97 */ -#endif -#ifndef Tcl_CreateTimerHandler -#define Tcl_CreateTimerHandler \ - (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ -#endif -#ifndef Tcl_CreateTrace -#define Tcl_CreateTrace \ - (tclStubsPtr->tcl_CreateTrace) /* 99 */ -#endif -#ifndef Tcl_DeleteAssocData -#define Tcl_DeleteAssocData \ - (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ -#endif -#ifndef Tcl_DeleteChannelHandler -#define Tcl_DeleteChannelHandler \ - (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ -#endif -#ifndef Tcl_DeleteCloseHandler -#define Tcl_DeleteCloseHandler \ - (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ -#endif -#ifndef Tcl_DeleteCommand -#define Tcl_DeleteCommand \ - (tclStubsPtr->tcl_DeleteCommand) /* 103 */ -#endif -#ifndef Tcl_DeleteCommandFromToken -#define Tcl_DeleteCommandFromToken \ - (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ -#endif -#ifndef Tcl_DeleteEvents -#define Tcl_DeleteEvents \ - (tclStubsPtr->tcl_DeleteEvents) /* 105 */ -#endif -#ifndef Tcl_DeleteEventSource -#define Tcl_DeleteEventSource \ - (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ -#endif -#ifndef Tcl_DeleteExitHandler -#define Tcl_DeleteExitHandler \ - (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ -#endif -#ifndef Tcl_DeleteHashEntry -#define Tcl_DeleteHashEntry \ - (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ -#endif -#ifndef Tcl_DeleteHashTable -#define Tcl_DeleteHashTable \ - (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ -#endif -#ifndef Tcl_DeleteInterp -#define Tcl_DeleteInterp \ - (tclStubsPtr->tcl_DeleteInterp) /* 110 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler -#define Tcl_DeleteTimerHandler \ - (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ -#endif -#ifndef Tcl_DeleteTrace -#define Tcl_DeleteTrace \ - (tclStubsPtr->tcl_DeleteTrace) /* 113 */ -#endif -#ifndef Tcl_DontCallWhenDeleted -#define Tcl_DontCallWhenDeleted \ - (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ -#endif -#ifndef Tcl_DoOneEvent -#define Tcl_DoOneEvent \ - (tclStubsPtr->tcl_DoOneEvent) /* 115 */ -#endif -#ifndef Tcl_DoWhenIdle -#define Tcl_DoWhenIdle \ - (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ -#endif -#ifndef Tcl_DStringAppend -#define Tcl_DStringAppend \ - (tclStubsPtr->tcl_DStringAppend) /* 117 */ -#endif -#ifndef Tcl_DStringAppendElement -#define Tcl_DStringAppendElement \ - (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ -#endif -#ifndef Tcl_DStringEndSublist -#define Tcl_DStringEndSublist \ - (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ -#endif -#ifndef Tcl_DStringFree -#define Tcl_DStringFree \ - (tclStubsPtr->tcl_DStringFree) /* 120 */ -#endif -#ifndef Tcl_DStringGetResult -#define Tcl_DStringGetResult \ - (tclStubsPtr->tcl_DStringGetResult) /* 121 */ -#endif -#ifndef Tcl_DStringInit -#define Tcl_DStringInit \ - (tclStubsPtr->tcl_DStringInit) /* 122 */ -#endif -#ifndef Tcl_DStringResult -#define Tcl_DStringResult \ - (tclStubsPtr->tcl_DStringResult) /* 123 */ -#endif -#ifndef Tcl_DStringSetLength -#define Tcl_DStringSetLength \ - (tclStubsPtr->tcl_DStringSetLength) /* 124 */ -#endif -#ifndef Tcl_DStringStartSublist -#define Tcl_DStringStartSublist \ - (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ -#endif -#ifndef Tcl_Eof -#define Tcl_Eof \ - (tclStubsPtr->tcl_Eof) /* 126 */ -#endif -#ifndef Tcl_ErrnoId -#define Tcl_ErrnoId \ - (tclStubsPtr->tcl_ErrnoId) /* 127 */ -#endif -#ifndef Tcl_ErrnoMsg -#define Tcl_ErrnoMsg \ - (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ -#endif -#ifndef Tcl_Eval -#define Tcl_Eval \ - (tclStubsPtr->tcl_Eval) /* 129 */ -#endif -#ifndef Tcl_EvalFile -#define Tcl_EvalFile \ - (tclStubsPtr->tcl_EvalFile) /* 130 */ -#endif -#ifndef Tcl_EvalObj -#define Tcl_EvalObj \ - (tclStubsPtr->tcl_EvalObj) /* 131 */ -#endif -#ifndef Tcl_EventuallyFree -#define Tcl_EventuallyFree \ - (tclStubsPtr->tcl_EventuallyFree) /* 132 */ -#endif -#ifndef Tcl_Exit -#define Tcl_Exit \ - (tclStubsPtr->tcl_Exit) /* 133 */ -#endif -#ifndef Tcl_ExposeCommand -#define Tcl_ExposeCommand \ - (tclStubsPtr->tcl_ExposeCommand) /* 134 */ -#endif -#ifndef Tcl_ExprBoolean -#define Tcl_ExprBoolean \ - (tclStubsPtr->tcl_ExprBoolean) /* 135 */ -#endif -#ifndef Tcl_ExprBooleanObj -#define Tcl_ExprBooleanObj \ - (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ -#endif -#ifndef Tcl_ExprDouble -#define Tcl_ExprDouble \ - (tclStubsPtr->tcl_ExprDouble) /* 137 */ -#endif -#ifndef Tcl_ExprDoubleObj -#define Tcl_ExprDoubleObj \ - (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ -#endif -#ifndef Tcl_ExprLong -#define Tcl_ExprLong \ - (tclStubsPtr->tcl_ExprLong) /* 139 */ -#endif -#ifndef Tcl_ExprLongObj -#define Tcl_ExprLongObj \ - (tclStubsPtr->tcl_ExprLongObj) /* 140 */ -#endif -#ifndef Tcl_ExprObj -#define Tcl_ExprObj \ - (tclStubsPtr->tcl_ExprObj) /* 141 */ -#endif -#ifndef Tcl_ExprString -#define Tcl_ExprString \ - (tclStubsPtr->tcl_ExprString) /* 142 */ -#endif -#ifndef Tcl_Finalize -#define Tcl_Finalize \ - (tclStubsPtr->tcl_Finalize) /* 143 */ -#endif -#ifndef Tcl_FindExecutable -#define Tcl_FindExecutable \ - (tclStubsPtr->tcl_FindExecutable) /* 144 */ -#endif -#ifndef Tcl_FirstHashEntry -#define Tcl_FirstHashEntry \ - (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ -#endif -#ifndef Tcl_Flush -#define Tcl_Flush \ - (tclStubsPtr->tcl_Flush) /* 146 */ -#endif -#ifndef Tcl_FreeResult -#define Tcl_FreeResult \ - (tclStubsPtr->tcl_FreeResult) /* 147 */ -#endif -#ifndef Tcl_GetAlias -#define Tcl_GetAlias \ - (tclStubsPtr->tcl_GetAlias) /* 148 */ -#endif -#ifndef Tcl_GetAliasObj -#define Tcl_GetAliasObj \ - (tclStubsPtr->tcl_GetAliasObj) /* 149 */ -#endif -#ifndef Tcl_GetAssocData -#define Tcl_GetAssocData \ - (tclStubsPtr->tcl_GetAssocData) /* 150 */ -#endif -#ifndef Tcl_GetChannel -#define Tcl_GetChannel \ - (tclStubsPtr->tcl_GetChannel) /* 151 */ -#endif -#ifndef Tcl_GetChannelBufferSize -#define Tcl_GetChannelBufferSize \ - (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ -#endif -#ifndef Tcl_GetChannelHandle -#define Tcl_GetChannelHandle \ - (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ -#endif -#ifndef Tcl_GetChannelInstanceData -#define Tcl_GetChannelInstanceData \ - (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ -#endif -#ifndef Tcl_GetChannelMode -#define Tcl_GetChannelMode \ - (tclStubsPtr->tcl_GetChannelMode) /* 155 */ -#endif -#ifndef Tcl_GetChannelName -#define Tcl_GetChannelName \ - (tclStubsPtr->tcl_GetChannelName) /* 156 */ -#endif -#ifndef Tcl_GetChannelOption -#define Tcl_GetChannelOption \ - (tclStubsPtr->tcl_GetChannelOption) /* 157 */ -#endif -#ifndef Tcl_GetChannelType -#define Tcl_GetChannelType \ - (tclStubsPtr->tcl_GetChannelType) /* 158 */ -#endif -#ifndef Tcl_GetCommandInfo -#define Tcl_GetCommandInfo \ - (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ -#endif -#ifndef Tcl_GetCommandName -#define Tcl_GetCommandName \ - (tclStubsPtr->tcl_GetCommandName) /* 160 */ -#endif -#ifndef Tcl_GetErrno -#define Tcl_GetErrno \ - (tclStubsPtr->tcl_GetErrno) /* 161 */ -#endif -#ifndef Tcl_GetHostName -#define Tcl_GetHostName \ - (tclStubsPtr->tcl_GetHostName) /* 162 */ -#endif -#ifndef Tcl_GetInterpPath -#define Tcl_GetInterpPath \ - (tclStubsPtr->tcl_GetInterpPath) /* 163 */ -#endif -#ifndef Tcl_GetMaster -#define Tcl_GetMaster \ - (tclStubsPtr->tcl_GetMaster) /* 164 */ -#endif -#ifndef Tcl_GetNameOfExecutable -#define Tcl_GetNameOfExecutable \ - (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ -#endif -#ifndef Tcl_GetObjResult -#define Tcl_GetObjResult \ - (tclStubsPtr->tcl_GetObjResult) /* 166 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType -#define Tcl_GetPathType \ - (tclStubsPtr->tcl_GetPathType) /* 168 */ -#endif -#ifndef Tcl_Gets -#define Tcl_Gets \ - (tclStubsPtr->tcl_Gets) /* 169 */ -#endif -#ifndef Tcl_GetsObj -#define Tcl_GetsObj \ - (tclStubsPtr->tcl_GetsObj) /* 170 */ -#endif -#ifndef Tcl_GetServiceMode -#define Tcl_GetServiceMode \ - (tclStubsPtr->tcl_GetServiceMode) /* 171 */ -#endif -#ifndef Tcl_GetSlave -#define Tcl_GetSlave \ - (tclStubsPtr->tcl_GetSlave) /* 172 */ -#endif -#ifndef Tcl_GetStdChannel -#define Tcl_GetStdChannel \ - (tclStubsPtr->tcl_GetStdChannel) /* 173 */ -#endif -#ifndef Tcl_GetStringResult -#define Tcl_GetStringResult \ - (tclStubsPtr->tcl_GetStringResult) /* 174 */ -#endif -#ifndef Tcl_GetVar -#define Tcl_GetVar \ - (tclStubsPtr->tcl_GetVar) /* 175 */ -#endif -#ifndef Tcl_GetVar2 -#define Tcl_GetVar2 \ - (tclStubsPtr->tcl_GetVar2) /* 176 */ -#endif -#ifndef Tcl_GlobalEval -#define Tcl_GlobalEval \ - (tclStubsPtr->tcl_GlobalEval) /* 177 */ -#endif -#ifndef Tcl_GlobalEvalObj -#define Tcl_GlobalEvalObj \ - (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ -#endif -#ifndef Tcl_HideCommand -#define Tcl_HideCommand \ - (tclStubsPtr->tcl_HideCommand) /* 179 */ -#endif -#ifndef Tcl_Init -#define Tcl_Init \ - (tclStubsPtr->tcl_Init) /* 180 */ -#endif -#ifndef Tcl_InitHashTable -#define Tcl_InitHashTable \ - (tclStubsPtr->tcl_InitHashTable) /* 181 */ -#endif -#ifndef Tcl_InputBlocked -#define Tcl_InputBlocked \ - (tclStubsPtr->tcl_InputBlocked) /* 182 */ -#endif -#ifndef Tcl_InputBuffered -#define Tcl_InputBuffered \ - (tclStubsPtr->tcl_InputBuffered) /* 183 */ -#endif -#ifndef Tcl_InterpDeleted -#define Tcl_InterpDeleted \ - (tclStubsPtr->tcl_InterpDeleted) /* 184 */ -#endif -#ifndef Tcl_IsSafe -#define Tcl_IsSafe \ - (tclStubsPtr->tcl_IsSafe) /* 185 */ -#endif -#ifndef Tcl_JoinPath -#define Tcl_JoinPath \ - (tclStubsPtr->tcl_JoinPath) /* 186 */ -#endif -#ifndef Tcl_LinkVar -#define Tcl_LinkVar \ - (tclStubsPtr->tcl_LinkVar) /* 187 */ -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel -#define Tcl_MakeFileChannel \ - (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ -#endif -#ifndef Tcl_MakeSafe -#define Tcl_MakeSafe \ - (tclStubsPtr->tcl_MakeSafe) /* 190 */ -#endif -#ifndef Tcl_MakeTcpClientChannel -#define Tcl_MakeTcpClientChannel \ - (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ -#endif -#ifndef Tcl_Merge -#define Tcl_Merge \ - (tclStubsPtr->tcl_Merge) /* 192 */ -#endif -#ifndef Tcl_NextHashEntry -#define Tcl_NextHashEntry \ - (tclStubsPtr->tcl_NextHashEntry) /* 193 */ -#endif -#ifndef Tcl_NotifyChannel -#define Tcl_NotifyChannel \ - (tclStubsPtr->tcl_NotifyChannel) /* 194 */ -#endif -#ifndef Tcl_ObjGetVar2 -#define Tcl_ObjGetVar2 \ - (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ -#endif -#ifndef Tcl_ObjSetVar2 -#define Tcl_ObjSetVar2 \ - (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel -#define Tcl_OpenFileChannel \ - (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ -#endif -#ifndef Tcl_OpenTcpClient -#define Tcl_OpenTcpClient \ - (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ -#endif -#ifndef Tcl_OpenTcpServer -#define Tcl_OpenTcpServer \ - (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ -#endif -#ifndef Tcl_Preserve -#define Tcl_Preserve \ - (tclStubsPtr->tcl_Preserve) /* 201 */ -#endif -#ifndef Tcl_PrintDouble -#define Tcl_PrintDouble \ - (tclStubsPtr->tcl_PrintDouble) /* 202 */ -#endif -#ifndef Tcl_PutEnv -#define Tcl_PutEnv \ - (tclStubsPtr->tcl_PutEnv) /* 203 */ -#endif -#ifndef Tcl_PosixError -#define Tcl_PosixError \ - (tclStubsPtr->tcl_PosixError) /* 204 */ -#endif -#ifndef Tcl_QueueEvent -#define Tcl_QueueEvent \ - (tclStubsPtr->tcl_QueueEvent) /* 205 */ -#endif -#ifndef Tcl_Read -#define Tcl_Read \ - (tclStubsPtr->tcl_Read) /* 206 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval -#define Tcl_RecordAndEval \ - (tclStubsPtr->tcl_RecordAndEval) /* 208 */ -#endif -#ifndef Tcl_RecordAndEvalObj -#define Tcl_RecordAndEvalObj \ - (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ -#endif -#ifndef Tcl_RegisterChannel -#define Tcl_RegisterChannel \ - (tclStubsPtr->tcl_RegisterChannel) /* 210 */ -#endif -#ifndef Tcl_RegisterObjType -#define Tcl_RegisterObjType \ - (tclStubsPtr->tcl_RegisterObjType) /* 211 */ -#endif -#ifndef Tcl_RegExpCompile -#define Tcl_RegExpCompile \ - (tclStubsPtr->tcl_RegExpCompile) /* 212 */ -#endif -#ifndef Tcl_RegExpExec -#define Tcl_RegExpExec \ - (tclStubsPtr->tcl_RegExpExec) /* 213 */ -#endif -#ifndef Tcl_RegExpMatch -#define Tcl_RegExpMatch \ - (tclStubsPtr->tcl_RegExpMatch) /* 214 */ -#endif -#ifndef Tcl_RegExpRange -#define Tcl_RegExpRange \ - (tclStubsPtr->tcl_RegExpRange) /* 215 */ -#endif -#ifndef Tcl_Release -#define Tcl_Release \ - (tclStubsPtr->tcl_Release) /* 216 */ -#endif -#ifndef Tcl_ResetResult -#define Tcl_ResetResult \ - (tclStubsPtr->tcl_ResetResult) /* 217 */ -#endif -#ifndef Tcl_ScanElement -#define Tcl_ScanElement \ - (tclStubsPtr->tcl_ScanElement) /* 218 */ -#endif -#ifndef Tcl_ScanCountedElement -#define Tcl_ScanCountedElement \ - (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ -#endif -#ifndef Tcl_SeekOld -#define Tcl_SeekOld \ - (tclStubsPtr->tcl_SeekOld) /* 220 */ -#endif -#ifndef Tcl_ServiceAll -#define Tcl_ServiceAll \ - (tclStubsPtr->tcl_ServiceAll) /* 221 */ -#endif -#ifndef Tcl_ServiceEvent -#define Tcl_ServiceEvent \ - (tclStubsPtr->tcl_ServiceEvent) /* 222 */ -#endif -#ifndef Tcl_SetAssocData -#define Tcl_SetAssocData \ - (tclStubsPtr->tcl_SetAssocData) /* 223 */ -#endif -#ifndef Tcl_SetChannelBufferSize -#define Tcl_SetChannelBufferSize \ - (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ -#endif -#ifndef Tcl_SetChannelOption -#define Tcl_SetChannelOption \ - (tclStubsPtr->tcl_SetChannelOption) /* 225 */ -#endif -#ifndef Tcl_SetCommandInfo -#define Tcl_SetCommandInfo \ - (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ -#endif -#ifndef Tcl_SetErrno -#define Tcl_SetErrno \ - (tclStubsPtr->tcl_SetErrno) /* 227 */ -#endif -#ifndef Tcl_SetErrorCode -#define Tcl_SetErrorCode \ - (tclStubsPtr->tcl_SetErrorCode) /* 228 */ -#endif -#ifndef Tcl_SetMaxBlockTime -#define Tcl_SetMaxBlockTime \ - (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ -#endif -#ifndef Tcl_SetPanicProc -#define Tcl_SetPanicProc \ - (tclStubsPtr->tcl_SetPanicProc) /* 230 */ -#endif -#ifndef Tcl_SetRecursionLimit -#define Tcl_SetRecursionLimit \ - (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ -#endif -#ifndef Tcl_SetResult -#define Tcl_SetResult \ - (tclStubsPtr->tcl_SetResult) /* 232 */ -#endif -#ifndef Tcl_SetServiceMode -#define Tcl_SetServiceMode \ - (tclStubsPtr->tcl_SetServiceMode) /* 233 */ -#endif -#ifndef Tcl_SetObjErrorCode -#define Tcl_SetObjErrorCode \ - (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ -#endif -#ifndef Tcl_SetObjResult -#define Tcl_SetObjResult \ - (tclStubsPtr->tcl_SetObjResult) /* 235 */ -#endif -#ifndef Tcl_SetStdChannel -#define Tcl_SetStdChannel \ - (tclStubsPtr->tcl_SetStdChannel) /* 236 */ -#endif -#ifndef Tcl_SetVar -#define Tcl_SetVar \ - (tclStubsPtr->tcl_SetVar) /* 237 */ -#endif -#ifndef Tcl_SetVar2 -#define Tcl_SetVar2 \ - (tclStubsPtr->tcl_SetVar2) /* 238 */ -#endif -#ifndef Tcl_SignalId -#define Tcl_SignalId \ - (tclStubsPtr->tcl_SignalId) /* 239 */ -#endif -#ifndef Tcl_SignalMsg -#define Tcl_SignalMsg \ - (tclStubsPtr->tcl_SignalMsg) /* 240 */ -#endif -#ifndef Tcl_SourceRCFile -#define Tcl_SourceRCFile \ - (tclStubsPtr->tcl_SourceRCFile) /* 241 */ -#endif -#ifndef Tcl_SplitList -#define Tcl_SplitList \ - (tclStubsPtr->tcl_SplitList) /* 242 */ -#endif -#ifndef Tcl_SplitPath -#define Tcl_SplitPath \ - (tclStubsPtr->tcl_SplitPath) /* 243 */ -#endif -#ifndef Tcl_StaticPackage -#define Tcl_StaticPackage \ - (tclStubsPtr->tcl_StaticPackage) /* 244 */ -#endif -#ifndef Tcl_StringMatch -#define Tcl_StringMatch \ - (tclStubsPtr->tcl_StringMatch) /* 245 */ -#endif -#ifndef Tcl_TellOld -#define Tcl_TellOld \ - (tclStubsPtr->tcl_TellOld) /* 246 */ -#endif -#ifndef Tcl_TraceVar -#define Tcl_TraceVar \ - (tclStubsPtr->tcl_TraceVar) /* 247 */ -#endif -#ifndef Tcl_TraceVar2 -#define Tcl_TraceVar2 \ - (tclStubsPtr->tcl_TraceVar2) /* 248 */ -#endif -#ifndef Tcl_TranslateFileName -#define Tcl_TranslateFileName \ - (tclStubsPtr->tcl_TranslateFileName) /* 249 */ -#endif -#ifndef Tcl_Ungets -#define Tcl_Ungets \ - (tclStubsPtr->tcl_Ungets) /* 250 */ -#endif -#ifndef Tcl_UnlinkVar -#define Tcl_UnlinkVar \ - (tclStubsPtr->tcl_UnlinkVar) /* 251 */ -#endif -#ifndef Tcl_UnregisterChannel -#define Tcl_UnregisterChannel \ - (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ -#endif -#ifndef Tcl_UnsetVar -#define Tcl_UnsetVar \ - (tclStubsPtr->tcl_UnsetVar) /* 253 */ -#endif -#ifndef Tcl_UnsetVar2 -#define Tcl_UnsetVar2 \ - (tclStubsPtr->tcl_UnsetVar2) /* 254 */ -#endif -#ifndef Tcl_UntraceVar -#define Tcl_UntraceVar \ - (tclStubsPtr->tcl_UntraceVar) /* 255 */ -#endif -#ifndef Tcl_UntraceVar2 -#define Tcl_UntraceVar2 \ - (tclStubsPtr->tcl_UntraceVar2) /* 256 */ -#endif -#ifndef Tcl_UpdateLinkedVar -#define Tcl_UpdateLinkedVar \ - (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ -#endif -#ifndef Tcl_UpVar -#define Tcl_UpVar \ - (tclStubsPtr->tcl_UpVar) /* 258 */ -#endif -#ifndef Tcl_UpVar2 -#define Tcl_UpVar2 \ - (tclStubsPtr->tcl_UpVar2) /* 259 */ -#endif -#ifndef Tcl_VarEval -#define Tcl_VarEval \ - (tclStubsPtr->tcl_VarEval) /* 260 */ -#endif -#ifndef Tcl_VarTraceInfo -#define Tcl_VarTraceInfo \ - (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ -#endif -#ifndef Tcl_VarTraceInfo2 -#define Tcl_VarTraceInfo2 \ - (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ -#endif -#ifndef Tcl_Write -#define Tcl_Write \ - (tclStubsPtr->tcl_Write) /* 263 */ -#endif -#ifndef Tcl_WrongNumArgs -#define Tcl_WrongNumArgs \ - (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ -#endif -#ifndef Tcl_DumpActiveMemory -#define Tcl_DumpActiveMemory \ - (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ -#endif -#ifndef Tcl_ValidateAllMemory -#define Tcl_ValidateAllMemory \ - (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ -#endif -#ifndef Tcl_AppendResultVA -#define Tcl_AppendResultVA \ - (tclStubsPtr->tcl_AppendResultVA) /* 267 */ -#endif -#ifndef Tcl_AppendStringsToObjVA -#define Tcl_AppendStringsToObjVA \ - (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ -#endif -#ifndef Tcl_HashStats -#define Tcl_HashStats \ - (tclStubsPtr->tcl_HashStats) /* 269 */ -#endif -#ifndef Tcl_ParseVar -#define Tcl_ParseVar \ - (tclStubsPtr->tcl_ParseVar) /* 270 */ -#endif -#ifndef Tcl_PkgPresent -#define Tcl_PkgPresent \ - (tclStubsPtr->tcl_PkgPresent) /* 271 */ -#endif -#ifndef Tcl_PkgPresentEx -#define Tcl_PkgPresentEx \ - (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ -#endif -#ifndef Tcl_PkgProvide -#define Tcl_PkgProvide \ - (tclStubsPtr->tcl_PkgProvide) /* 273 */ -#endif -#ifndef Tcl_PkgRequire -#define Tcl_PkgRequire \ - (tclStubsPtr->tcl_PkgRequire) /* 274 */ -#endif -#ifndef Tcl_SetErrorCodeVA -#define Tcl_SetErrorCodeVA \ - (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ -#endif -#ifndef Tcl_VarEvalVA -#define Tcl_VarEvalVA \ - (tclStubsPtr->tcl_VarEvalVA) /* 276 */ -#endif -#ifndef Tcl_WaitPid -#define Tcl_WaitPid \ - (tclStubsPtr->tcl_WaitPid) /* 277 */ -#endif -#ifndef Tcl_PanicVA -#define Tcl_PanicVA \ - (tclStubsPtr->tcl_PanicVA) /* 278 */ -#endif -#ifndef Tcl_GetVersion -#define Tcl_GetVersion \ - (tclStubsPtr->tcl_GetVersion) /* 279 */ -#endif -#ifndef Tcl_InitMemory -#define Tcl_InitMemory \ - (tclStubsPtr->tcl_InitMemory) /* 280 */ -#endif -#ifndef Tcl_StackChannel -#define Tcl_StackChannel \ - (tclStubsPtr->tcl_StackChannel) /* 281 */ -#endif -#ifndef Tcl_UnstackChannel -#define Tcl_UnstackChannel \ - (tclStubsPtr->tcl_UnstackChannel) /* 282 */ -#endif -#ifndef Tcl_GetStackedChannel -#define Tcl_GetStackedChannel \ - (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ -#endif -#ifndef Tcl_SetMainLoop -#define Tcl_SetMainLoop \ - (tclStubsPtr->tcl_SetMainLoop) /* 284 */ -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj -#define Tcl_AppendObjToObj \ - (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ -#endif -#ifndef Tcl_CreateEncoding -#define Tcl_CreateEncoding \ - (tclStubsPtr->tcl_CreateEncoding) /* 287 */ -#endif -#ifndef Tcl_CreateThreadExitHandler -#define Tcl_CreateThreadExitHandler \ - (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ -#endif -#ifndef Tcl_DeleteThreadExitHandler -#define Tcl_DeleteThreadExitHandler \ - (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ -#endif -#ifndef Tcl_DiscardResult -#define Tcl_DiscardResult \ - (tclStubsPtr->tcl_DiscardResult) /* 290 */ -#endif -#ifndef Tcl_EvalEx -#define Tcl_EvalEx \ - (tclStubsPtr->tcl_EvalEx) /* 291 */ -#endif -#ifndef Tcl_EvalObjv -#define Tcl_EvalObjv \ - (tclStubsPtr->tcl_EvalObjv) /* 292 */ -#endif -#ifndef Tcl_EvalObjEx -#define Tcl_EvalObjEx \ - (tclStubsPtr->tcl_EvalObjEx) /* 293 */ -#endif -#ifndef Tcl_ExitThread -#define Tcl_ExitThread \ - (tclStubsPtr->tcl_ExitThread) /* 294 */ -#endif -#ifndef Tcl_ExternalToUtf -#define Tcl_ExternalToUtf \ - (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ -#endif -#ifndef Tcl_ExternalToUtfDString -#define Tcl_ExternalToUtfDString \ - (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ -#endif -#ifndef Tcl_FinalizeThread -#define Tcl_FinalizeThread \ - (tclStubsPtr->tcl_FinalizeThread) /* 297 */ -#endif -#ifndef Tcl_FinalizeNotifier -#define Tcl_FinalizeNotifier \ - (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ -#endif -#ifndef Tcl_FreeEncoding -#define Tcl_FreeEncoding \ - (tclStubsPtr->tcl_FreeEncoding) /* 299 */ -#endif -#ifndef Tcl_GetCurrentThread -#define Tcl_GetCurrentThread \ - (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ -#endif -#ifndef Tcl_GetEncoding -#define Tcl_GetEncoding \ - (tclStubsPtr->tcl_GetEncoding) /* 301 */ -#endif -#ifndef Tcl_GetEncodingName -#define Tcl_GetEncodingName \ - (tclStubsPtr->tcl_GetEncodingName) /* 302 */ -#endif -#ifndef Tcl_GetEncodingNames -#define Tcl_GetEncodingNames \ - (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ -#endif -#ifndef Tcl_GetIndexFromObjStruct -#define Tcl_GetIndexFromObjStruct \ - (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ -#endif -#ifndef Tcl_GetThreadData -#define Tcl_GetThreadData \ - (tclStubsPtr->tcl_GetThreadData) /* 305 */ -#endif -#ifndef Tcl_GetVar2Ex -#define Tcl_GetVar2Ex \ - (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ -#endif -#ifndef Tcl_InitNotifier -#define Tcl_InitNotifier \ - (tclStubsPtr->tcl_InitNotifier) /* 307 */ -#endif -#ifndef Tcl_MutexLock -#define Tcl_MutexLock \ - (tclStubsPtr->tcl_MutexLock) /* 308 */ -#endif -#ifndef Tcl_MutexUnlock -#define Tcl_MutexUnlock \ - (tclStubsPtr->tcl_MutexUnlock) /* 309 */ -#endif -#ifndef Tcl_ConditionNotify -#define Tcl_ConditionNotify \ - (tclStubsPtr->tcl_ConditionNotify) /* 310 */ -#endif -#ifndef Tcl_ConditionWait -#define Tcl_ConditionWait \ - (tclStubsPtr->tcl_ConditionWait) /* 311 */ -#endif -#ifndef Tcl_NumUtfChars -#define Tcl_NumUtfChars \ - (tclStubsPtr->tcl_NumUtfChars) /* 312 */ -#endif -#ifndef Tcl_ReadChars -#define Tcl_ReadChars \ - (tclStubsPtr->tcl_ReadChars) /* 313 */ -#endif -#ifndef Tcl_RestoreResult -#define Tcl_RestoreResult \ - (tclStubsPtr->tcl_RestoreResult) /* 314 */ -#endif -#ifndef Tcl_SaveResult -#define Tcl_SaveResult \ - (tclStubsPtr->tcl_SaveResult) /* 315 */ -#endif -#ifndef Tcl_SetSystemEncoding -#define Tcl_SetSystemEncoding \ - (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ -#endif -#ifndef Tcl_SetVar2Ex -#define Tcl_SetVar2Ex \ - (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ -#endif -#ifndef Tcl_ThreadAlert -#define Tcl_ThreadAlert \ - (tclStubsPtr->tcl_ThreadAlert) /* 318 */ -#endif -#ifndef Tcl_ThreadQueueEvent -#define Tcl_ThreadQueueEvent \ - (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ -#endif -#ifndef Tcl_UniCharAtIndex -#define Tcl_UniCharAtIndex \ - (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ -#endif -#ifndef Tcl_UniCharToLower -#define Tcl_UniCharToLower \ - (tclStubsPtr->tcl_UniCharToLower) /* 321 */ -#endif -#ifndef Tcl_UniCharToTitle -#define Tcl_UniCharToTitle \ - (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ -#endif -#ifndef Tcl_UniCharToUpper -#define Tcl_UniCharToUpper \ - (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ -#endif -#ifndef Tcl_UniCharToUtf -#define Tcl_UniCharToUtf \ - (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ -#endif -#ifndef Tcl_UtfAtIndex -#define Tcl_UtfAtIndex \ - (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ -#endif -#ifndef Tcl_UtfCharComplete -#define Tcl_UtfCharComplete \ - (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ -#endif -#ifndef Tcl_UtfBackslash -#define Tcl_UtfBackslash \ - (tclStubsPtr->tcl_UtfBackslash) /* 327 */ -#endif -#ifndef Tcl_UtfFindFirst -#define Tcl_UtfFindFirst \ - (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ -#endif -#ifndef Tcl_UtfFindLast -#define Tcl_UtfFindLast \ - (tclStubsPtr->tcl_UtfFindLast) /* 329 */ -#endif -#ifndef Tcl_UtfNext -#define Tcl_UtfNext \ - (tclStubsPtr->tcl_UtfNext) /* 330 */ -#endif -#ifndef Tcl_UtfPrev -#define Tcl_UtfPrev \ - (tclStubsPtr->tcl_UtfPrev) /* 331 */ -#endif -#ifndef Tcl_UtfToExternal -#define Tcl_UtfToExternal \ - (tclStubsPtr->tcl_UtfToExternal) /* 332 */ -#endif -#ifndef Tcl_UtfToExternalDString -#define Tcl_UtfToExternalDString \ - (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ -#endif -#ifndef Tcl_UtfToLower -#define Tcl_UtfToLower \ - (tclStubsPtr->tcl_UtfToLower) /* 334 */ -#endif -#ifndef Tcl_UtfToTitle -#define Tcl_UtfToTitle \ - (tclStubsPtr->tcl_UtfToTitle) /* 335 */ -#endif -#ifndef Tcl_UtfToUniChar -#define Tcl_UtfToUniChar \ - (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ -#endif -#ifndef Tcl_UtfToUpper -#define Tcl_UtfToUpper \ - (tclStubsPtr->tcl_UtfToUpper) /* 337 */ -#endif -#ifndef Tcl_WriteChars -#define Tcl_WriteChars \ - (tclStubsPtr->tcl_WriteChars) /* 338 */ -#endif -#ifndef Tcl_WriteObj -#define Tcl_WriteObj \ - (tclStubsPtr->tcl_WriteObj) /* 339 */ -#endif -#ifndef Tcl_GetString -#define Tcl_GetString \ - (tclStubsPtr->tcl_GetString) /* 340 */ -#endif -#ifndef Tcl_GetDefaultEncodingDir -#define Tcl_GetDefaultEncodingDir \ - (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ -#endif -#ifndef Tcl_SetDefaultEncodingDir -#define Tcl_SetDefaultEncodingDir \ - (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ -#endif -#ifndef Tcl_AlertNotifier -#define Tcl_AlertNotifier \ - (tclStubsPtr->tcl_AlertNotifier) /* 343 */ -#endif -#ifndef Tcl_ServiceModeHook -#define Tcl_ServiceModeHook \ - (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ -#endif -#ifndef Tcl_UniCharIsAlnum -#define Tcl_UniCharIsAlnum \ - (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ -#endif -#ifndef Tcl_UniCharIsAlpha -#define Tcl_UniCharIsAlpha \ - (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ -#endif -#ifndef Tcl_UniCharIsDigit -#define Tcl_UniCharIsDigit \ - (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ -#endif -#ifndef Tcl_UniCharIsLower -#define Tcl_UniCharIsLower \ - (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ -#endif -#ifndef Tcl_UniCharIsSpace -#define Tcl_UniCharIsSpace \ - (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ -#endif -#ifndef Tcl_UniCharIsUpper -#define Tcl_UniCharIsUpper \ - (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ -#endif -#ifndef Tcl_UniCharIsWordChar -#define Tcl_UniCharIsWordChar \ - (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ -#endif -#ifndef Tcl_UniCharLen -#define Tcl_UniCharLen \ - (tclStubsPtr->tcl_UniCharLen) /* 352 */ -#endif -#ifndef Tcl_UniCharNcmp -#define Tcl_UniCharNcmp \ - (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ -#endif -#ifndef Tcl_UniCharToUtfDString -#define Tcl_UniCharToUtfDString \ - (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ -#endif -#ifndef Tcl_UtfToUniCharDString -#define Tcl_UtfToUniCharDString \ - (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ -#endif -#ifndef Tcl_GetRegExpFromObj -#define Tcl_GetRegExpFromObj \ - (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ -#endif -#ifndef Tcl_EvalTokens -#define Tcl_EvalTokens \ - (tclStubsPtr->tcl_EvalTokens) /* 357 */ -#endif -#ifndef Tcl_FreeParse -#define Tcl_FreeParse \ - (tclStubsPtr->tcl_FreeParse) /* 358 */ -#endif -#ifndef Tcl_LogCommandInfo -#define Tcl_LogCommandInfo \ - (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ -#endif -#ifndef Tcl_ParseBraces -#define Tcl_ParseBraces \ - (tclStubsPtr->tcl_ParseBraces) /* 360 */ -#endif -#ifndef Tcl_ParseCommand -#define Tcl_ParseCommand \ - (tclStubsPtr->tcl_ParseCommand) /* 361 */ -#endif -#ifndef Tcl_ParseExpr -#define Tcl_ParseExpr \ - (tclStubsPtr->tcl_ParseExpr) /* 362 */ -#endif -#ifndef Tcl_ParseQuotedString -#define Tcl_ParseQuotedString \ - (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ -#endif -#ifndef Tcl_ParseVarName -#define Tcl_ParseVarName \ - (tclStubsPtr->tcl_ParseVarName) /* 364 */ -#endif -#ifndef Tcl_GetCwd -#define Tcl_GetCwd \ - (tclStubsPtr->tcl_GetCwd) /* 365 */ -#endif -#ifndef Tcl_Chdir -#define Tcl_Chdir \ - (tclStubsPtr->tcl_Chdir) /* 366 */ -#endif -#ifndef Tcl_Access -#define Tcl_Access \ - (tclStubsPtr->tcl_Access) /* 367 */ -#endif -#ifndef Tcl_Stat -#define Tcl_Stat \ - (tclStubsPtr->tcl_Stat) /* 368 */ -#endif -#ifndef Tcl_UtfNcmp -#define Tcl_UtfNcmp \ - (tclStubsPtr->tcl_UtfNcmp) /* 369 */ -#endif -#ifndef Tcl_UtfNcasecmp -#define Tcl_UtfNcasecmp \ - (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ -#endif -#ifndef Tcl_StringCaseMatch -#define Tcl_StringCaseMatch \ - (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ -#endif -#ifndef Tcl_UniCharIsControl -#define Tcl_UniCharIsControl \ - (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ -#endif -#ifndef Tcl_UniCharIsGraph -#define Tcl_UniCharIsGraph \ - (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ -#endif -#ifndef Tcl_UniCharIsPrint -#define Tcl_UniCharIsPrint \ - (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ -#endif -#ifndef Tcl_UniCharIsPunct -#define Tcl_UniCharIsPunct \ - (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ -#endif -#ifndef Tcl_RegExpExecObj -#define Tcl_RegExpExecObj \ - (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ -#endif -#ifndef Tcl_RegExpGetInfo -#define Tcl_RegExpGetInfo \ - (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ -#endif -#ifndef Tcl_NewUnicodeObj -#define Tcl_NewUnicodeObj \ - (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ -#endif -#ifndef Tcl_SetUnicodeObj -#define Tcl_SetUnicodeObj \ - (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ -#endif -#ifndef Tcl_GetCharLength -#define Tcl_GetCharLength \ - (tclStubsPtr->tcl_GetCharLength) /* 380 */ -#endif -#ifndef Tcl_GetUniChar -#define Tcl_GetUniChar \ - (tclStubsPtr->tcl_GetUniChar) /* 381 */ -#endif -#ifndef Tcl_GetUnicode -#define Tcl_GetUnicode \ - (tclStubsPtr->tcl_GetUnicode) /* 382 */ -#endif -#ifndef Tcl_GetRange -#define Tcl_GetRange \ - (tclStubsPtr->tcl_GetRange) /* 383 */ -#endif -#ifndef Tcl_AppendUnicodeToObj -#define Tcl_AppendUnicodeToObj \ - (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ -#endif -#ifndef Tcl_RegExpMatchObj -#define Tcl_RegExpMatchObj \ - (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ -#endif -#ifndef Tcl_SetNotifier -#define Tcl_SetNotifier \ - (tclStubsPtr->tcl_SetNotifier) /* 386 */ -#endif -#ifndef Tcl_GetAllocMutex -#define Tcl_GetAllocMutex \ - (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ -#endif -#ifndef Tcl_GetChannelNames -#define Tcl_GetChannelNames \ - (tclStubsPtr->tcl_GetChannelNames) /* 388 */ -#endif -#ifndef Tcl_GetChannelNamesEx -#define Tcl_GetChannelNamesEx \ - (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ -#endif -#ifndef Tcl_ProcObjCmd -#define Tcl_ProcObjCmd \ - (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ -#endif -#ifndef Tcl_ConditionFinalize -#define Tcl_ConditionFinalize \ - (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ -#endif -#ifndef Tcl_MutexFinalize -#define Tcl_MutexFinalize \ - (tclStubsPtr->tcl_MutexFinalize) /* 392 */ -#endif -#ifndef Tcl_CreateThread -#define Tcl_CreateThread \ - (tclStubsPtr->tcl_CreateThread) /* 393 */ -#endif -#ifndef Tcl_ReadRaw -#define Tcl_ReadRaw \ - (tclStubsPtr->tcl_ReadRaw) /* 394 */ -#endif -#ifndef Tcl_WriteRaw -#define Tcl_WriteRaw \ - (tclStubsPtr->tcl_WriteRaw) /* 395 */ -#endif -#ifndef Tcl_GetTopChannel -#define Tcl_GetTopChannel \ - (tclStubsPtr->tcl_GetTopChannel) /* 396 */ -#endif -#ifndef Tcl_ChannelBuffered -#define Tcl_ChannelBuffered \ - (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ -#endif -#ifndef Tcl_ChannelName -#define Tcl_ChannelName \ - (tclStubsPtr->tcl_ChannelName) /* 398 */ -#endif -#ifndef Tcl_ChannelVersion -#define Tcl_ChannelVersion \ - (tclStubsPtr->tcl_ChannelVersion) /* 399 */ -#endif -#ifndef Tcl_ChannelBlockModeProc -#define Tcl_ChannelBlockModeProc \ - (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ -#endif -#ifndef Tcl_ChannelCloseProc -#define Tcl_ChannelCloseProc \ - (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ -#endif -#ifndef Tcl_ChannelClose2Proc -#define Tcl_ChannelClose2Proc \ - (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ -#endif -#ifndef Tcl_ChannelInputProc -#define Tcl_ChannelInputProc \ - (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ -#endif -#ifndef Tcl_ChannelOutputProc -#define Tcl_ChannelOutputProc \ - (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ -#endif -#ifndef Tcl_ChannelSeekProc -#define Tcl_ChannelSeekProc \ - (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ -#endif -#ifndef Tcl_ChannelSetOptionProc -#define Tcl_ChannelSetOptionProc \ - (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ -#endif -#ifndef Tcl_ChannelGetOptionProc -#define Tcl_ChannelGetOptionProc \ - (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ -#endif -#ifndef Tcl_ChannelWatchProc -#define Tcl_ChannelWatchProc \ - (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ -#endif -#ifndef Tcl_ChannelGetHandleProc -#define Tcl_ChannelGetHandleProc \ - (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ -#endif -#ifndef Tcl_ChannelFlushProc -#define Tcl_ChannelFlushProc \ - (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ -#endif -#ifndef Tcl_ChannelHandlerProc -#define Tcl_ChannelHandlerProc \ - (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ -#endif -#ifndef Tcl_JoinThread -#define Tcl_JoinThread \ - (tclStubsPtr->tcl_JoinThread) /* 412 */ -#endif -#ifndef Tcl_IsChannelShared -#define Tcl_IsChannelShared \ - (tclStubsPtr->tcl_IsChannelShared) /* 413 */ -#endif -#ifndef Tcl_IsChannelRegistered -#define Tcl_IsChannelRegistered \ - (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ -#endif -#ifndef Tcl_CutChannel -#define Tcl_CutChannel \ - (tclStubsPtr->tcl_CutChannel) /* 415 */ -#endif -#ifndef Tcl_SpliceChannel -#define Tcl_SpliceChannel \ - (tclStubsPtr->tcl_SpliceChannel) /* 416 */ -#endif -#ifndef Tcl_ClearChannelHandlers -#define Tcl_ClearChannelHandlers \ - (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ -#endif -#ifndef Tcl_IsChannelExisting -#define Tcl_IsChannelExisting \ - (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ -#endif -#ifndef Tcl_UniCharNcasecmp -#define Tcl_UniCharNcasecmp \ - (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ -#endif -#ifndef Tcl_UniCharCaseMatch -#define Tcl_UniCharCaseMatch \ - (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ -#endif -#ifndef Tcl_FindHashEntry -#define Tcl_FindHashEntry \ - (tclStubsPtr->tcl_FindHashEntry) /* 421 */ -#endif -#ifndef Tcl_CreateHashEntry -#define Tcl_CreateHashEntry \ - (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ -#endif -#ifndef Tcl_InitCustomHashTable -#define Tcl_InitCustomHashTable \ - (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ -#endif -#ifndef Tcl_InitObjHashTable -#define Tcl_InitObjHashTable \ - (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ -#endif -#ifndef Tcl_CommandTraceInfo -#define Tcl_CommandTraceInfo \ - (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ -#endif -#ifndef Tcl_TraceCommand -#define Tcl_TraceCommand \ - (tclStubsPtr->tcl_TraceCommand) /* 426 */ -#endif -#ifndef Tcl_UntraceCommand -#define Tcl_UntraceCommand \ - (tclStubsPtr->tcl_UntraceCommand) /* 427 */ -#endif -#ifndef Tcl_AttemptAlloc -#define Tcl_AttemptAlloc \ - (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ -#endif -#ifndef Tcl_AttemptDbCkalloc -#define Tcl_AttemptDbCkalloc \ - (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ -#endif -#ifndef Tcl_AttemptRealloc -#define Tcl_AttemptRealloc \ - (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ -#endif -#ifndef Tcl_AttemptDbCkrealloc -#define Tcl_AttemptDbCkrealloc \ - (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ -#endif -#ifndef Tcl_AttemptSetObjLength -#define Tcl_AttemptSetObjLength \ - (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ -#endif -#ifndef Tcl_GetChannelThread -#define Tcl_GetChannelThread \ - (tclStubsPtr->tcl_GetChannelThread) /* 433 */ -#endif -#ifndef Tcl_GetUnicodeFromObj -#define Tcl_GetUnicodeFromObj \ - (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ -#endif -#ifndef Tcl_GetMathFuncInfo -#define Tcl_GetMathFuncInfo \ - (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ -#endif -#ifndef Tcl_ListMathFuncs -#define Tcl_ListMathFuncs \ - (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ -#endif -#ifndef Tcl_SubstObj -#define Tcl_SubstObj \ - (tclStubsPtr->tcl_SubstObj) /* 437 */ -#endif -#ifndef Tcl_DetachChannel -#define Tcl_DetachChannel \ - (tclStubsPtr->tcl_DetachChannel) /* 438 */ -#endif -#ifndef Tcl_IsStandardChannel -#define Tcl_IsStandardChannel \ - (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ -#endif -#ifndef Tcl_FSCopyFile -#define Tcl_FSCopyFile \ - (tclStubsPtr->tcl_FSCopyFile) /* 440 */ -#endif -#ifndef Tcl_FSCopyDirectory -#define Tcl_FSCopyDirectory \ - (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ -#endif -#ifndef Tcl_FSCreateDirectory -#define Tcl_FSCreateDirectory \ - (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ -#endif -#ifndef Tcl_FSDeleteFile -#define Tcl_FSDeleteFile \ - (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ -#endif -#ifndef Tcl_FSLoadFile -#define Tcl_FSLoadFile \ - (tclStubsPtr->tcl_FSLoadFile) /* 444 */ -#endif -#ifndef Tcl_FSMatchInDirectory -#define Tcl_FSMatchInDirectory \ - (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ -#endif -#ifndef Tcl_FSLink -#define Tcl_FSLink \ - (tclStubsPtr->tcl_FSLink) /* 446 */ -#endif -#ifndef Tcl_FSRemoveDirectory -#define Tcl_FSRemoveDirectory \ - (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ -#endif -#ifndef Tcl_FSRenameFile -#define Tcl_FSRenameFile \ - (tclStubsPtr->tcl_FSRenameFile) /* 448 */ -#endif -#ifndef Tcl_FSLstat -#define Tcl_FSLstat \ - (tclStubsPtr->tcl_FSLstat) /* 449 */ -#endif -#ifndef Tcl_FSUtime -#define Tcl_FSUtime \ - (tclStubsPtr->tcl_FSUtime) /* 450 */ -#endif -#ifndef Tcl_FSFileAttrsGet -#define Tcl_FSFileAttrsGet \ - (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ -#endif -#ifndef Tcl_FSFileAttrsSet -#define Tcl_FSFileAttrsSet \ - (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ -#endif -#ifndef Tcl_FSFileAttrStrings -#define Tcl_FSFileAttrStrings \ - (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ -#endif -#ifndef Tcl_FSStat -#define Tcl_FSStat \ - (tclStubsPtr->tcl_FSStat) /* 454 */ -#endif -#ifndef Tcl_FSAccess -#define Tcl_FSAccess \ - (tclStubsPtr->tcl_FSAccess) /* 455 */ -#endif -#ifndef Tcl_FSOpenFileChannel -#define Tcl_FSOpenFileChannel \ - (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ -#endif -#ifndef Tcl_FSGetCwd -#define Tcl_FSGetCwd \ - (tclStubsPtr->tcl_FSGetCwd) /* 457 */ -#endif -#ifndef Tcl_FSChdir -#define Tcl_FSChdir \ - (tclStubsPtr->tcl_FSChdir) /* 458 */ -#endif -#ifndef Tcl_FSConvertToPathType -#define Tcl_FSConvertToPathType \ - (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ -#endif -#ifndef Tcl_FSJoinPath -#define Tcl_FSJoinPath \ - (tclStubsPtr->tcl_FSJoinPath) /* 460 */ -#endif -#ifndef Tcl_FSSplitPath -#define Tcl_FSSplitPath \ - (tclStubsPtr->tcl_FSSplitPath) /* 461 */ -#endif -#ifndef Tcl_FSEqualPaths -#define Tcl_FSEqualPaths \ - (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ -#endif -#ifndef Tcl_FSGetNormalizedPath -#define Tcl_FSGetNormalizedPath \ - (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ -#endif -#ifndef Tcl_FSJoinToPath -#define Tcl_FSJoinToPath \ - (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ -#endif -#ifndef Tcl_FSGetInternalRep -#define Tcl_FSGetInternalRep \ - (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ -#endif -#ifndef Tcl_FSGetTranslatedPath -#define Tcl_FSGetTranslatedPath \ - (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ -#endif -#ifndef Tcl_FSEvalFile -#define Tcl_FSEvalFile \ - (tclStubsPtr->tcl_FSEvalFile) /* 467 */ -#endif -#ifndef Tcl_FSNewNativePath -#define Tcl_FSNewNativePath \ - (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ -#endif -#ifndef Tcl_FSGetNativePath -#define Tcl_FSGetNativePath \ - (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ -#endif -#ifndef Tcl_FSFileSystemInfo -#define Tcl_FSFileSystemInfo \ - (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ -#endif -#ifndef Tcl_FSPathSeparator -#define Tcl_FSPathSeparator \ - (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ -#endif -#ifndef Tcl_FSListVolumes -#define Tcl_FSListVolumes \ - (tclStubsPtr->tcl_FSListVolumes) /* 472 */ -#endif -#ifndef Tcl_FSRegister -#define Tcl_FSRegister \ - (tclStubsPtr->tcl_FSRegister) /* 473 */ -#endif -#ifndef Tcl_FSUnregister -#define Tcl_FSUnregister \ - (tclStubsPtr->tcl_FSUnregister) /* 474 */ -#endif -#ifndef Tcl_FSData -#define Tcl_FSData \ - (tclStubsPtr->tcl_FSData) /* 475 */ -#endif -#ifndef Tcl_FSGetTranslatedStringPath -#define Tcl_FSGetTranslatedStringPath \ - (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ -#endif -#ifndef Tcl_FSGetFileSystemForPath -#define Tcl_FSGetFileSystemForPath \ - (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ -#endif -#ifndef Tcl_FSGetPathType -#define Tcl_FSGetPathType \ - (tclStubsPtr->tcl_FSGetPathType) /* 478 */ -#endif -#ifndef Tcl_OutputBuffered -#define Tcl_OutputBuffered \ - (tclStubsPtr->tcl_OutputBuffered) /* 479 */ -#endif -#ifndef Tcl_FSMountsChanged -#define Tcl_FSMountsChanged \ - (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ -#endif -#ifndef Tcl_EvalTokensStandard -#define Tcl_EvalTokensStandard \ - (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ -#endif -#ifndef Tcl_GetTime -#define Tcl_GetTime \ - (tclStubsPtr->tcl_GetTime) /* 482 */ -#endif -#ifndef Tcl_CreateObjTrace -#define Tcl_CreateObjTrace \ - (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ -#endif -#ifndef Tcl_GetCommandInfoFromToken -#define Tcl_GetCommandInfoFromToken \ - (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ -#endif -#ifndef Tcl_SetCommandInfoFromToken -#define Tcl_SetCommandInfoFromToken \ - (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ -#endif -#ifndef Tcl_DbNewWideIntObj -#define Tcl_DbNewWideIntObj \ - (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ -#endif -#ifndef Tcl_GetWideIntFromObj -#define Tcl_GetWideIntFromObj \ - (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ -#endif -#ifndef Tcl_NewWideIntObj -#define Tcl_NewWideIntObj \ - (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ -#endif -#ifndef Tcl_SetWideIntObj -#define Tcl_SetWideIntObj \ - (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ -#endif -#ifndef Tcl_AllocStatBuf -#define Tcl_AllocStatBuf \ - (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ -#endif -#ifndef Tcl_Seek -#define Tcl_Seek \ - (tclStubsPtr->tcl_Seek) /* 491 */ -#endif -#ifndef Tcl_Tell -#define Tcl_Tell \ - (tclStubsPtr->tcl_Tell) /* 492 */ -#endif -#ifndef Tcl_ChannelWideSeekProc -#define Tcl_ChannelWideSeekProc \ - (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ -#endif -#ifndef Tcl_DictObjPut -#define Tcl_DictObjPut \ - (tclStubsPtr->tcl_DictObjPut) /* 494 */ -#endif -#ifndef Tcl_DictObjGet -#define Tcl_DictObjGet \ - (tclStubsPtr->tcl_DictObjGet) /* 495 */ -#endif -#ifndef Tcl_DictObjRemove -#define Tcl_DictObjRemove \ - (tclStubsPtr->tcl_DictObjRemove) /* 496 */ -#endif -#ifndef Tcl_DictObjSize -#define Tcl_DictObjSize \ - (tclStubsPtr->tcl_DictObjSize) /* 497 */ -#endif -#ifndef Tcl_DictObjFirst -#define Tcl_DictObjFirst \ - (tclStubsPtr->tcl_DictObjFirst) /* 498 */ -#endif -#ifndef Tcl_DictObjNext -#define Tcl_DictObjNext \ - (tclStubsPtr->tcl_DictObjNext) /* 499 */ -#endif -#ifndef Tcl_DictObjDone -#define Tcl_DictObjDone \ - (tclStubsPtr->tcl_DictObjDone) /* 500 */ -#endif -#ifndef Tcl_DictObjPutKeyList -#define Tcl_DictObjPutKeyList \ - (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ -#endif -#ifndef Tcl_DictObjRemoveKeyList -#define Tcl_DictObjRemoveKeyList \ - (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ -#endif -#ifndef Tcl_NewDictObj -#define Tcl_NewDictObj \ - (tclStubsPtr->tcl_NewDictObj) /* 503 */ -#endif -#ifndef Tcl_DbNewDictObj -#define Tcl_DbNewDictObj \ - (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ -#endif -#ifndef Tcl_RegisterConfig -#define Tcl_RegisterConfig \ - (tclStubsPtr->tcl_RegisterConfig) /* 505 */ -#endif -#ifndef Tcl_CreateNamespace -#define Tcl_CreateNamespace \ - (tclStubsPtr->tcl_CreateNamespace) /* 506 */ -#endif -#ifndef Tcl_DeleteNamespace -#define Tcl_DeleteNamespace \ - (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ -#endif -#ifndef Tcl_AppendExportList -#define Tcl_AppendExportList \ - (tclStubsPtr->tcl_AppendExportList) /* 508 */ -#endif -#ifndef Tcl_Export -#define Tcl_Export \ - (tclStubsPtr->tcl_Export) /* 509 */ -#endif -#ifndef Tcl_Import -#define Tcl_Import \ - (tclStubsPtr->tcl_Import) /* 510 */ -#endif -#ifndef Tcl_ForgetImport -#define Tcl_ForgetImport \ - (tclStubsPtr->tcl_ForgetImport) /* 511 */ -#endif -#ifndef Tcl_GetCurrentNamespace -#define Tcl_GetCurrentNamespace \ - (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ -#endif -#ifndef Tcl_GetGlobalNamespace -#define Tcl_GetGlobalNamespace \ - (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ -#endif -#ifndef Tcl_FindNamespace -#define Tcl_FindNamespace \ - (tclStubsPtr->tcl_FindNamespace) /* 514 */ -#endif -#ifndef Tcl_FindCommand -#define Tcl_FindCommand \ - (tclStubsPtr->tcl_FindCommand) /* 515 */ -#endif -#ifndef Tcl_GetCommandFromObj -#define Tcl_GetCommandFromObj \ - (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ -#endif -#ifndef Tcl_GetCommandFullName -#define Tcl_GetCommandFullName \ - (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ -#endif -#ifndef Tcl_FSEvalFileEx -#define Tcl_FSEvalFileEx \ - (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ -#endif -#ifndef Tcl_SetExitProc -#define Tcl_SetExitProc \ - (tclStubsPtr->tcl_SetExitProc) /* 519 */ -#endif -#ifndef Tcl_LimitAddHandler -#define Tcl_LimitAddHandler \ - (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ -#endif -#ifndef Tcl_LimitRemoveHandler -#define Tcl_LimitRemoveHandler \ - (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ -#endif -#ifndef Tcl_LimitReady -#define Tcl_LimitReady \ - (tclStubsPtr->tcl_LimitReady) /* 522 */ -#endif -#ifndef Tcl_LimitCheck -#define Tcl_LimitCheck \ - (tclStubsPtr->tcl_LimitCheck) /* 523 */ -#endif -#ifndef Tcl_LimitExceeded -#define Tcl_LimitExceeded \ - (tclStubsPtr->tcl_LimitExceeded) /* 524 */ -#endif -#ifndef Tcl_LimitSetCommands -#define Tcl_LimitSetCommands \ - (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ -#endif -#ifndef Tcl_LimitSetTime -#define Tcl_LimitSetTime \ - (tclStubsPtr->tcl_LimitSetTime) /* 526 */ -#endif -#ifndef Tcl_LimitSetGranularity -#define Tcl_LimitSetGranularity \ - (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ -#endif -#ifndef Tcl_LimitTypeEnabled -#define Tcl_LimitTypeEnabled \ - (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ -#endif -#ifndef Tcl_LimitTypeExceeded -#define Tcl_LimitTypeExceeded \ - (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ -#endif -#ifndef Tcl_LimitTypeSet -#define Tcl_LimitTypeSet \ - (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ -#endif -#ifndef Tcl_LimitTypeReset -#define Tcl_LimitTypeReset \ - (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ -#endif -#ifndef Tcl_LimitGetCommands -#define Tcl_LimitGetCommands \ - (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ -#endif -#ifndef Tcl_LimitGetTime -#define Tcl_LimitGetTime \ - (tclStubsPtr->tcl_LimitGetTime) /* 533 */ -#endif -#ifndef Tcl_LimitGetGranularity -#define Tcl_LimitGetGranularity \ - (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ -#endif -#ifndef Tcl_SaveInterpState -#define Tcl_SaveInterpState \ - (tclStubsPtr->tcl_SaveInterpState) /* 535 */ -#endif -#ifndef Tcl_RestoreInterpState -#define Tcl_RestoreInterpState \ - (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ -#endif -#ifndef Tcl_DiscardInterpState -#define Tcl_DiscardInterpState \ - (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ -#endif -#ifndef Tcl_SetReturnOptions -#define Tcl_SetReturnOptions \ - (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ -#endif -#ifndef Tcl_GetReturnOptions -#define Tcl_GetReturnOptions \ - (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ -#endif -#ifndef Tcl_IsEnsemble -#define Tcl_IsEnsemble \ - (tclStubsPtr->tcl_IsEnsemble) /* 540 */ -#endif -#ifndef Tcl_CreateEnsemble -#define Tcl_CreateEnsemble \ - (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ -#endif -#ifndef Tcl_FindEnsemble -#define Tcl_FindEnsemble \ - (tclStubsPtr->tcl_FindEnsemble) /* 542 */ -#endif -#ifndef Tcl_SetEnsembleSubcommandList -#define Tcl_SetEnsembleSubcommandList \ - (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ -#endif -#ifndef Tcl_SetEnsembleMappingDict -#define Tcl_SetEnsembleMappingDict \ - (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ -#endif -#ifndef Tcl_SetEnsembleUnknownHandler -#define Tcl_SetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ -#endif -#ifndef Tcl_SetEnsembleFlags -#define Tcl_SetEnsembleFlags \ - (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ -#endif -#ifndef Tcl_GetEnsembleSubcommandList -#define Tcl_GetEnsembleSubcommandList \ - (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ -#endif -#ifndef Tcl_GetEnsembleMappingDict -#define Tcl_GetEnsembleMappingDict \ - (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ -#endif -#ifndef Tcl_GetEnsembleUnknownHandler -#define Tcl_GetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ -#endif -#ifndef Tcl_GetEnsembleFlags -#define Tcl_GetEnsembleFlags \ - (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ -#endif -#ifndef Tcl_GetEnsembleNamespace -#define Tcl_GetEnsembleNamespace \ - (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ -#endif -#ifndef Tcl_SetTimeProc -#define Tcl_SetTimeProc \ - (tclStubsPtr->tcl_SetTimeProc) /* 552 */ -#endif -#ifndef Tcl_QueryTimeProc -#define Tcl_QueryTimeProc \ - (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ -#endif -#ifndef Tcl_ChannelThreadActionProc -#define Tcl_ChannelThreadActionProc \ - (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ -#endif -#ifndef Tcl_NewBignumObj -#define Tcl_NewBignumObj \ - (tclStubsPtr->tcl_NewBignumObj) /* 555 */ -#endif -#ifndef Tcl_DbNewBignumObj -#define Tcl_DbNewBignumObj \ - (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ -#endif -#ifndef Tcl_SetBignumObj -#define Tcl_SetBignumObj \ - (tclStubsPtr->tcl_SetBignumObj) /* 557 */ -#endif -#ifndef Tcl_GetBignumFromObj -#define Tcl_GetBignumFromObj \ - (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ -#endif -#ifndef Tcl_TakeBignumFromObj -#define Tcl_TakeBignumFromObj \ - (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ -#endif -#ifndef Tcl_TruncateChannel -#define Tcl_TruncateChannel \ - (tclStubsPtr->tcl_TruncateChannel) /* 560 */ -#endif -#ifndef Tcl_ChannelTruncateProc -#define Tcl_ChannelTruncateProc \ - (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ -#endif -#ifndef Tcl_SetChannelErrorInterp -#define Tcl_SetChannelErrorInterp \ - (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ -#endif -#ifndef Tcl_GetChannelErrorInterp -#define Tcl_GetChannelErrorInterp \ - (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ -#endif -#ifndef Tcl_SetChannelError -#define Tcl_SetChannelError \ - (tclStubsPtr->tcl_SetChannelError) /* 564 */ -#endif -#ifndef Tcl_GetChannelError -#define Tcl_GetChannelError \ - (tclStubsPtr->tcl_GetChannelError) /* 565 */ -#endif -#ifndef Tcl_InitBignumFromDouble -#define Tcl_InitBignumFromDouble \ - (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ -#endif -#ifndef Tcl_GetNamespaceUnknownHandler -#define Tcl_GetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ -#endif -#ifndef Tcl_SetNamespaceUnknownHandler -#define Tcl_SetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ -#endif -#ifndef Tcl_GetEncodingFromObj -#define Tcl_GetEncodingFromObj \ - (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ -#endif -#ifndef Tcl_GetEncodingSearchPath -#define Tcl_GetEncodingSearchPath \ - (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ -#endif -#ifndef Tcl_SetEncodingSearchPath -#define Tcl_SetEncodingSearchPath \ - (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment -#define Tcl_GetEncodingNameFromEnvironment \ - (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ -#endif -#ifndef Tcl_PkgRequireProc -#define Tcl_PkgRequireProc \ - (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ -#endif -#ifndef Tcl_AppendObjToErrorInfo -#define Tcl_AppendObjToErrorInfo \ - (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ -#endif -#ifndef Tcl_AppendLimitedToObj -#define Tcl_AppendLimitedToObj \ - (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ -#endif -#ifndef Tcl_Format -#define Tcl_Format \ - (tclStubsPtr->tcl_Format) /* 576 */ -#endif -#ifndef Tcl_AppendFormatToObj -#define Tcl_AppendFormatToObj \ - (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ -#endif -#ifndef Tcl_ObjPrintf -#define Tcl_ObjPrintf \ - (tclStubsPtr->tcl_ObjPrintf) /* 578 */ -#endif -#ifndef Tcl_AppendPrintfToObj -#define Tcl_AppendPrintfToObj \ - (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ -#endif -#ifndef Tcl_CancelEval -#define Tcl_CancelEval \ - (tclStubsPtr->tcl_CancelEval) /* 580 */ -#endif -#ifndef Tcl_Canceled -#define Tcl_Canceled \ - (tclStubsPtr->tcl_Canceled) /* 581 */ -#endif -#ifndef Tcl_NRCreateCommand -#define Tcl_NRCreateCommand \ - (tclStubsPtr->tcl_NRCreateCommand) /* 582 */ -#endif -#ifndef Tcl_NREvalObj -#define Tcl_NREvalObj \ - (tclStubsPtr->tcl_NREvalObj) /* 583 */ -#endif -#ifndef Tcl_NREvalObjv -#define Tcl_NREvalObjv \ - (tclStubsPtr->tcl_NREvalObjv) /* 584 */ -#endif -#ifndef Tcl_NRCmdSwap -#define Tcl_NRCmdSwap \ - (tclStubsPtr->tcl_NRCmdSwap) /* 585 */ -#endif -#ifndef Tcl_NRAddCallback -#define Tcl_NRAddCallback \ - (tclStubsPtr->tcl_NRAddCallback) /* 586 */ -#endif -#ifndef Tcl_NRCallObjProc -#define Tcl_NRCallObjProc \ - (tclStubsPtr->tcl_NRCallObjProc) /* 587 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLDECLS */ - +/* + * tclDecls.h -- + * + * Declarations of functions in the platform independent public Tcl API. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclDecls.h,v 1.138 2008/07/21 21:02:15 ferrieux Exp $ + */ + +#ifndef _TCLDECLS +#define _TCLDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tcl_PkgProvideEx_TCL_DECLARED +#define Tcl_PkgProvideEx_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, + CONST char* name, CONST char* version, + ClientData clientData); +#endif +#ifndef Tcl_PkgRequireEx_TCL_DECLARED +#define Tcl_PkgRequireEx_TCL_DECLARED +/* 1 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_Panic_TCL_DECLARED +#define Tcl_Panic_TCL_DECLARED +/* 2 */ +EXTERN void Tcl_Panic (CONST char * format, ...); +#endif +#ifndef Tcl_Alloc_TCL_DECLARED +#define Tcl_Alloc_TCL_DECLARED +/* 3 */ +EXTERN char * Tcl_Alloc (unsigned int size); +#endif +#ifndef Tcl_Free_TCL_DECLARED +#define Tcl_Free_TCL_DECLARED +/* 4 */ +EXTERN void Tcl_Free (char * ptr); +#endif +#ifndef Tcl_Realloc_TCL_DECLARED +#define Tcl_Realloc_TCL_DECLARED +/* 5 */ +EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_DbCkalloc_TCL_DECLARED +#define Tcl_DbCkalloc_TCL_DECLARED +/* 6 */ +EXTERN char * Tcl_DbCkalloc (unsigned int size, CONST char * file, + int line); +#endif +#ifndef Tcl_DbCkfree_TCL_DECLARED +#define Tcl_DbCkfree_TCL_DECLARED +/* 7 */ +EXTERN int Tcl_DbCkfree (char * ptr, CONST char * file, + int line); +#endif +#ifndef Tcl_DbCkrealloc_TCL_DECLARED +#define Tcl_DbCkrealloc_TCL_DECLARED +/* 8 */ +EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, + CONST char * file, int line); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer_TCL_DECLARED +#define Tcl_SetTimer_TCL_DECLARED +/* 11 */ +EXTERN void Tcl_SetTimer (Tcl_Time * timePtr); +#endif +#ifndef Tcl_Sleep_TCL_DECLARED +#define Tcl_Sleep_TCL_DECLARED +/* 12 */ +EXTERN void Tcl_Sleep (int ms); +#endif +#ifndef Tcl_WaitForEvent_TCL_DECLARED +#define Tcl_WaitForEvent_TCL_DECLARED +/* 13 */ +EXTERN int Tcl_WaitForEvent (Tcl_Time * timePtr); +#endif +#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED +#define Tcl_AppendAllObjTypes_TCL_DECLARED +/* 14 */ +EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendStringsToObj_TCL_DECLARED +#define Tcl_AppendStringsToObj_TCL_DECLARED +/* 15 */ +EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); +#endif +#ifndef Tcl_AppendToObj_TCL_DECLARED +#define Tcl_AppendToObj_TCL_DECLARED +/* 16 */ +EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, CONST char* bytes, + int length); +#endif +#ifndef Tcl_ConcatObj_TCL_DECLARED +#define Tcl_ConcatObj_TCL_DECLARED +/* 17 */ +EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_ConvertToType_TCL_DECLARED +#define Tcl_ConvertToType_TCL_DECLARED +/* 18 */ +EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_DbDecrRefCount_TCL_DECLARED +#define Tcl_DbDecrRefCount_TCL_DECLARED +/* 19 */ +EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, + CONST char * file, int line); +#endif +#ifndef Tcl_DbIncrRefCount_TCL_DECLARED +#define Tcl_DbIncrRefCount_TCL_DECLARED +/* 20 */ +EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, + CONST char * file, int line); +#endif +#ifndef Tcl_DbIsShared_TCL_DECLARED +#define Tcl_DbIsShared_TCL_DECLARED +/* 21 */ +EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, CONST char * file, + int line); +#endif +#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED +#define Tcl_DbNewBooleanObj_TCL_DECLARED +/* 22 */ +EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED +#define Tcl_DbNewByteArrayObj_TCL_DECLARED +/* 23 */ +EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (CONST unsigned char * bytes, + int length, CONST char * file, int line); +#endif +#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED +#define Tcl_DbNewDoubleObj_TCL_DECLARED +/* 24 */ +EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewListObj_TCL_DECLARED +#define Tcl_DbNewListObj_TCL_DECLARED +/* 25 */ +EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *CONST * objv, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewLongObj_TCL_DECLARED +#define Tcl_DbNewLongObj_TCL_DECLARED +/* 26 */ +EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, CONST char * file, + int line); +#endif +#ifndef Tcl_DbNewObj_TCL_DECLARED +#define Tcl_DbNewObj_TCL_DECLARED +/* 27 */ +EXTERN Tcl_Obj * Tcl_DbNewObj (CONST char * file, int line); +#endif +#ifndef Tcl_DbNewStringObj_TCL_DECLARED +#define Tcl_DbNewStringObj_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Obj * Tcl_DbNewStringObj (CONST char * bytes, int length, + CONST char * file, int line); +#endif +#ifndef Tcl_DuplicateObj_TCL_DECLARED +#define Tcl_DuplicateObj_TCL_DECLARED +/* 29 */ +EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); +#endif +#ifndef TclFreeObj_TCL_DECLARED +#define TclFreeObj_TCL_DECLARED +/* 30 */ +EXTERN void TclFreeObj (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetBoolean_TCL_DECLARED +#define Tcl_GetBoolean_TCL_DECLARED +/* 31 */ +EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, + CONST char * src, int * boolPtr); +#endif +#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED +#define Tcl_GetBooleanFromObj_TCL_DECLARED +/* 32 */ +EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * boolPtr); +#endif +#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED +#define Tcl_GetByteArrayFromObj_TCL_DECLARED +/* 33 */ +EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetDouble_TCL_DECLARED +#define Tcl_GetDouble_TCL_DECLARED +/* 34 */ +EXTERN int Tcl_GetDouble (Tcl_Interp * interp, CONST char * src, + double * doublePtr); +#endif +#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED +#define Tcl_GetDoubleFromObj_TCL_DECLARED +/* 35 */ +EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * doublePtr); +#endif +#ifndef Tcl_GetIndexFromObj_TCL_DECLARED +#define Tcl_GetIndexFromObj_TCL_DECLARED +/* 36 */ +EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST84 char ** tablePtr, + CONST char * msg, int flags, int * indexPtr); +#endif +#ifndef Tcl_GetInt_TCL_DECLARED +#define Tcl_GetInt_TCL_DECLARED +/* 37 */ +EXTERN int Tcl_GetInt (Tcl_Interp * interp, CONST char * src, + int * intPtr); +#endif +#ifndef Tcl_GetIntFromObj_TCL_DECLARED +#define Tcl_GetIntFromObj_TCL_DECLARED +/* 38 */ +EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * intPtr); +#endif +#ifndef Tcl_GetLongFromObj_TCL_DECLARED +#define Tcl_GetLongFromObj_TCL_DECLARED +/* 39 */ +EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * longPtr); +#endif +#ifndef Tcl_GetObjType_TCL_DECLARED +#define Tcl_GetObjType_TCL_DECLARED +/* 40 */ +EXTERN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); +#endif +#ifndef Tcl_GetStringFromObj_TCL_DECLARED +#define Tcl_GetStringFromObj_TCL_DECLARED +/* 41 */ +EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_InvalidateStringRep_TCL_DECLARED +#define Tcl_InvalidateStringRep_TCL_DECLARED +/* 42 */ +EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjAppendList_TCL_DECLARED +#define Tcl_ListObjAppendList_TCL_DECLARED +/* 43 */ +EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); +#endif +#ifndef Tcl_ListObjAppendElement_TCL_DECLARED +#define Tcl_ListObjAppendElement_TCL_DECLARED +/* 44 */ +EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjGetElements_TCL_DECLARED +#define Tcl_ListObjGetElements_TCL_DECLARED +/* 45 */ +EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * objcPtr, + Tcl_Obj *** objvPtr); +#endif +#ifndef Tcl_ListObjIndex_TCL_DECLARED +#define Tcl_ListObjIndex_TCL_DECLARED +/* 46 */ +EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, + Tcl_Obj ** objPtrPtr); +#endif +#ifndef Tcl_ListObjLength_TCL_DECLARED +#define Tcl_ListObjLength_TCL_DECLARED +/* 47 */ +EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * lengthPtr); +#endif +#ifndef Tcl_ListObjReplace_TCL_DECLARED +#define Tcl_ListObjReplace_TCL_DECLARED +/* 48 */ +EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, + Tcl_Obj * listPtr, int first, int count, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NewBooleanObj_TCL_DECLARED +#define Tcl_NewBooleanObj_TCL_DECLARED +/* 49 */ +EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); +#endif +#ifndef Tcl_NewByteArrayObj_TCL_DECLARED +#define Tcl_NewByteArrayObj_TCL_DECLARED +/* 50 */ +EXTERN Tcl_Obj * Tcl_NewByteArrayObj (CONST unsigned char* bytes, + int length); +#endif +#ifndef Tcl_NewDoubleObj_TCL_DECLARED +#define Tcl_NewDoubleObj_TCL_DECLARED +/* 51 */ +EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); +#endif +#ifndef Tcl_NewIntObj_TCL_DECLARED +#define Tcl_NewIntObj_TCL_DECLARED +/* 52 */ +EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); +#endif +#ifndef Tcl_NewListObj_TCL_DECLARED +#define Tcl_NewListObj_TCL_DECLARED +/* 53 */ +EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NewLongObj_TCL_DECLARED +#define Tcl_NewLongObj_TCL_DECLARED +/* 54 */ +EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); +#endif +#ifndef Tcl_NewObj_TCL_DECLARED +#define Tcl_NewObj_TCL_DECLARED +/* 55 */ +EXTERN Tcl_Obj * Tcl_NewObj (void); +#endif +#ifndef Tcl_NewStringObj_TCL_DECLARED +#define Tcl_NewStringObj_TCL_DECLARED +/* 56 */ +EXTERN Tcl_Obj * Tcl_NewStringObj (CONST char * bytes, int length); +#endif +#ifndef Tcl_SetBooleanObj_TCL_DECLARED +#define Tcl_SetBooleanObj_TCL_DECLARED +/* 57 */ +EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); +#endif +#ifndef Tcl_SetByteArrayLength_TCL_DECLARED +#define Tcl_SetByteArrayLength_TCL_DECLARED +/* 58 */ +EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetByteArrayObj_TCL_DECLARED +#define Tcl_SetByteArrayObj_TCL_DECLARED +/* 59 */ +EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, + CONST unsigned char * bytes, int length); +#endif +#ifndef Tcl_SetDoubleObj_TCL_DECLARED +#define Tcl_SetDoubleObj_TCL_DECLARED +/* 60 */ +EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, + double doubleValue); +#endif +#ifndef Tcl_SetIntObj_TCL_DECLARED +#define Tcl_SetIntObj_TCL_DECLARED +/* 61 */ +EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); +#endif +#ifndef Tcl_SetListObj_TCL_DECLARED +#define Tcl_SetListObj_TCL_DECLARED +/* 62 */ +EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_SetLongObj_TCL_DECLARED +#define Tcl_SetLongObj_TCL_DECLARED +/* 63 */ +EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); +#endif +#ifndef Tcl_SetObjLength_TCL_DECLARED +#define Tcl_SetObjLength_TCL_DECLARED +/* 64 */ +EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetStringObj_TCL_DECLARED +#define Tcl_SetStringObj_TCL_DECLARED +/* 65 */ +EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, CONST char* bytes, + int length); +#endif +#ifndef Tcl_AddErrorInfo_TCL_DECLARED +#define Tcl_AddErrorInfo_TCL_DECLARED +/* 66 */ +EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, + CONST char * message); +#endif +#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED +#define Tcl_AddObjErrorInfo_TCL_DECLARED +/* 67 */ +EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, + CONST char * message, int length); +#endif +#ifndef Tcl_AllowExceptions_TCL_DECLARED +#define Tcl_AllowExceptions_TCL_DECLARED +/* 68 */ +EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); +#endif +#ifndef Tcl_AppendElement_TCL_DECLARED +#define Tcl_AppendElement_TCL_DECLARED +/* 69 */ +EXTERN void Tcl_AppendElement (Tcl_Interp * interp, + CONST char * element); +#endif +#ifndef Tcl_AppendResult_TCL_DECLARED +#define Tcl_AppendResult_TCL_DECLARED +/* 70 */ +EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_AsyncCreate_TCL_DECLARED +#define Tcl_AsyncCreate_TCL_DECLARED +/* 71 */ +EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AsyncDelete_TCL_DECLARED +#define Tcl_AsyncDelete_TCL_DECLARED +/* 72 */ +EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncInvoke_TCL_DECLARED +#define Tcl_AsyncInvoke_TCL_DECLARED +/* 73 */ +EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); +#endif +#ifndef Tcl_AsyncMark_TCL_DECLARED +#define Tcl_AsyncMark_TCL_DECLARED +/* 74 */ +EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncReady_TCL_DECLARED +#define Tcl_AsyncReady_TCL_DECLARED +/* 75 */ +EXTERN int Tcl_AsyncReady (void); +#endif +#ifndef Tcl_BackgroundError_TCL_DECLARED +#define Tcl_BackgroundError_TCL_DECLARED +/* 76 */ +EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); +#endif +#ifndef Tcl_Backslash_TCL_DECLARED +#define Tcl_Backslash_TCL_DECLARED +/* 77 */ +EXTERN char Tcl_Backslash (CONST char * src, int * readPtr); +#endif +#ifndef Tcl_BadChannelOption_TCL_DECLARED +#define Tcl_BadChannelOption_TCL_DECLARED +/* 78 */ +EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, + CONST char * optionName, + CONST char * optionList); +#endif +#ifndef Tcl_CallWhenDeleted_TCL_DECLARED +#define Tcl_CallWhenDeleted_TCL_DECLARED +/* 79 */ +EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CancelIdleCall_TCL_DECLARED +#define Tcl_CancelIdleCall_TCL_DECLARED +/* 80 */ +EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, + ClientData clientData); +#endif +#ifndef Tcl_Close_TCL_DECLARED +#define Tcl_Close_TCL_DECLARED +/* 81 */ +EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); +#endif +#ifndef Tcl_CommandComplete_TCL_DECLARED +#define Tcl_CommandComplete_TCL_DECLARED +/* 82 */ +EXTERN int Tcl_CommandComplete (CONST char * cmd); +#endif +#ifndef Tcl_Concat_TCL_DECLARED +#define Tcl_Concat_TCL_DECLARED +/* 83 */ +EXTERN char * Tcl_Concat (int argc, CONST84 char * CONST * argv); +#endif +#ifndef Tcl_ConvertElement_TCL_DECLARED +#define Tcl_ConvertElement_TCL_DECLARED +/* 84 */ +EXTERN int Tcl_ConvertElement (CONST char * src, char * dst, + int flags); +#endif +#ifndef Tcl_ConvertCountedElement_TCL_DECLARED +#define Tcl_ConvertCountedElement_TCL_DECLARED +/* 85 */ +EXTERN int Tcl_ConvertCountedElement (CONST char * src, + int length, char * dst, int flags); +#endif +#ifndef Tcl_CreateAlias_TCL_DECLARED +#define Tcl_CreateAlias_TCL_DECLARED +/* 86 */ +EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, + CONST char * slaveCmd, Tcl_Interp * target, + CONST char * targetCmd, int argc, + CONST84 char * CONST * argv); +#endif +#ifndef Tcl_CreateAliasObj_TCL_DECLARED +#define Tcl_CreateAliasObj_TCL_DECLARED +/* 87 */ +EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, + CONST char * slaveCmd, Tcl_Interp * target, + CONST char * targetCmd, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_CreateChannel_TCL_DECLARED +#define Tcl_CreateChannel_TCL_DECLARED +/* 88 */ +EXTERN Tcl_Channel Tcl_CreateChannel (Tcl_ChannelType * typePtr, + CONST char * chanName, + ClientData instanceData, int mask); +#endif +#ifndef Tcl_CreateChannelHandler_TCL_DECLARED +#define Tcl_CreateChannelHandler_TCL_DECLARED +/* 89 */ +EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateCloseHandler_TCL_DECLARED +#define Tcl_CreateCloseHandler_TCL_DECLARED +/* 90 */ +EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateCommand_TCL_DECLARED +#define Tcl_CreateCommand_TCL_DECLARED +/* 91 */ +EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_CmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateEventSource_TCL_DECLARED +#define Tcl_CreateEventSource_TCL_DECLARED +/* 92 */ +EXTERN void Tcl_CreateEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_CreateExitHandler_TCL_DECLARED +#define Tcl_CreateExitHandler_TCL_DECLARED +/* 93 */ +EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateInterp_TCL_DECLARED +#define Tcl_CreateInterp_TCL_DECLARED +/* 94 */ +EXTERN Tcl_Interp * Tcl_CreateInterp (void); +#endif +#ifndef Tcl_CreateMathFunc_TCL_DECLARED +#define Tcl_CreateMathFunc_TCL_DECLARED +/* 95 */ +EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, + CONST char * name, int numArgs, + Tcl_ValueType * argTypes, + Tcl_MathProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateObjCommand_TCL_DECLARED +#define Tcl_CreateObjCommand_TCL_DECLARED +/* 96 */ +EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_ObjCmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateSlave_TCL_DECLARED +#define Tcl_CreateSlave_TCL_DECLARED +/* 97 */ +EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, + CONST char * slaveName, int isSafe); +#endif +#ifndef Tcl_CreateTimerHandler_TCL_DECLARED +#define Tcl_CreateTimerHandler_TCL_DECLARED +/* 98 */ +EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, + Tcl_TimerProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateTrace_TCL_DECLARED +#define Tcl_CreateTrace_TCL_DECLARED +/* 99 */ +EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, + Tcl_CmdTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteAssocData_TCL_DECLARED +#define Tcl_DeleteAssocData_TCL_DECLARED +/* 100 */ +EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED +#define Tcl_DeleteChannelHandler_TCL_DECLARED +/* 101 */ +EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED +#define Tcl_DeleteCloseHandler_TCL_DECLARED +/* 102 */ +EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_DeleteCommand_TCL_DECLARED +#define Tcl_DeleteCommand_TCL_DECLARED +/* 103 */ +EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, + CONST char * cmdName); +#endif +#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED +#define Tcl_DeleteCommandFromToken_TCL_DECLARED +/* 104 */ +EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_DeleteEvents_TCL_DECLARED +#define Tcl_DeleteEvents_TCL_DECLARED +/* 105 */ +EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteEventSource_TCL_DECLARED +#define Tcl_DeleteEventSource_TCL_DECLARED +/* 106 */ +EXTERN void Tcl_DeleteEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteExitHandler_TCL_DECLARED +#define Tcl_DeleteExitHandler_TCL_DECLARED +/* 107 */ +EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteHashEntry_TCL_DECLARED +#define Tcl_DeleteHashEntry_TCL_DECLARED +/* 108 */ +EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); +#endif +#ifndef Tcl_DeleteHashTable_TCL_DECLARED +#define Tcl_DeleteHashTable_TCL_DECLARED +/* 109 */ +EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_DeleteInterp_TCL_DECLARED +#define Tcl_DeleteInterp_TCL_DECLARED +/* 110 */ +EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED +#define Tcl_DeleteTimerHandler_TCL_DECLARED +/* 112 */ +EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); +#endif +#ifndef Tcl_DeleteTrace_TCL_DECLARED +#define Tcl_DeleteTrace_TCL_DECLARED +/* 113 */ +EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, + Tcl_Trace trace); +#endif +#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED +#define Tcl_DontCallWhenDeleted_TCL_DECLARED +/* 114 */ +EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DoOneEvent_TCL_DECLARED +#define Tcl_DoOneEvent_TCL_DECLARED +/* 115 */ +EXTERN int Tcl_DoOneEvent (int flags); +#endif +#ifndef Tcl_DoWhenIdle_TCL_DECLARED +#define Tcl_DoWhenIdle_TCL_DECLARED +/* 116 */ +EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DStringAppend_TCL_DECLARED +#define Tcl_DStringAppend_TCL_DECLARED +/* 117 */ +EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, + CONST char * bytes, int length); +#endif +#ifndef Tcl_DStringAppendElement_TCL_DECLARED +#define Tcl_DStringAppendElement_TCL_DECLARED +/* 118 */ +EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, + CONST char * element); +#endif +#ifndef Tcl_DStringEndSublist_TCL_DECLARED +#define Tcl_DStringEndSublist_TCL_DECLARED +/* 119 */ +EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringFree_TCL_DECLARED +#define Tcl_DStringFree_TCL_DECLARED +/* 120 */ +EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringGetResult_TCL_DECLARED +#define Tcl_DStringGetResult_TCL_DECLARED +/* 121 */ +EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringInit_TCL_DECLARED +#define Tcl_DStringInit_TCL_DECLARED +/* 122 */ +EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringResult_TCL_DECLARED +#define Tcl_DStringResult_TCL_DECLARED +/* 123 */ +EXTERN void Tcl_DStringResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringSetLength_TCL_DECLARED +#define Tcl_DStringSetLength_TCL_DECLARED +/* 124 */ +EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, + int length); +#endif +#ifndef Tcl_DStringStartSublist_TCL_DECLARED +#define Tcl_DStringStartSublist_TCL_DECLARED +/* 125 */ +EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_Eof_TCL_DECLARED +#define Tcl_Eof_TCL_DECLARED +/* 126 */ +EXTERN int Tcl_Eof (Tcl_Channel chan); +#endif +#ifndef Tcl_ErrnoId_TCL_DECLARED +#define Tcl_ErrnoId_TCL_DECLARED +/* 127 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); +#endif +#ifndef Tcl_ErrnoMsg_TCL_DECLARED +#define Tcl_ErrnoMsg_TCL_DECLARED +/* 128 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); +#endif +#ifndef Tcl_Eval_TCL_DECLARED +#define Tcl_Eval_TCL_DECLARED +/* 129 */ +EXTERN int Tcl_Eval (Tcl_Interp * interp, CONST char * script); +#endif +#ifndef Tcl_EvalFile_TCL_DECLARED +#define Tcl_EvalFile_TCL_DECLARED +/* 130 */ +EXTERN int Tcl_EvalFile (Tcl_Interp * interp, + CONST char * fileName); +#endif +#ifndef Tcl_EvalObj_TCL_DECLARED +#define Tcl_EvalObj_TCL_DECLARED +/* 131 */ +EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_EventuallyFree_TCL_DECLARED +#define Tcl_EventuallyFree_TCL_DECLARED +/* 132 */ +EXTERN void Tcl_EventuallyFree (ClientData clientData, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_Exit_TCL_DECLARED +#define Tcl_Exit_TCL_DECLARED +/* 133 */ +EXTERN void Tcl_Exit (int status); +#endif +#ifndef Tcl_ExposeCommand_TCL_DECLARED +#define Tcl_ExposeCommand_TCL_DECLARED +/* 134 */ +EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, + CONST char * hiddenCmdToken, + CONST char * cmdName); +#endif +#ifndef Tcl_ExprBoolean_TCL_DECLARED +#define Tcl_ExprBoolean_TCL_DECLARED +/* 135 */ +EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, + CONST char * expr, int * ptr); +#endif +#ifndef Tcl_ExprBooleanObj_TCL_DECLARED +#define Tcl_ExprBooleanObj_TCL_DECLARED +/* 136 */ +EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * ptr); +#endif +#ifndef Tcl_ExprDouble_TCL_DECLARED +#define Tcl_ExprDouble_TCL_DECLARED +/* 137 */ +EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, + CONST char * expr, double * ptr); +#endif +#ifndef Tcl_ExprDoubleObj_TCL_DECLARED +#define Tcl_ExprDoubleObj_TCL_DECLARED +/* 138 */ +EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * ptr); +#endif +#ifndef Tcl_ExprLong_TCL_DECLARED +#define Tcl_ExprLong_TCL_DECLARED +/* 139 */ +EXTERN int Tcl_ExprLong (Tcl_Interp * interp, CONST char * expr, + long * ptr); +#endif +#ifndef Tcl_ExprLongObj_TCL_DECLARED +#define Tcl_ExprLongObj_TCL_DECLARED +/* 140 */ +EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * ptr); +#endif +#ifndef Tcl_ExprObj_TCL_DECLARED +#define Tcl_ExprObj_TCL_DECLARED +/* 141 */ +EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + Tcl_Obj ** resultPtrPtr); +#endif +#ifndef Tcl_ExprString_TCL_DECLARED +#define Tcl_ExprString_TCL_DECLARED +/* 142 */ +EXTERN int Tcl_ExprString (Tcl_Interp * interp, + CONST char * expr); +#endif +#ifndef Tcl_Finalize_TCL_DECLARED +#define Tcl_Finalize_TCL_DECLARED +/* 143 */ +EXTERN void Tcl_Finalize (void); +#endif +#ifndef Tcl_FindExecutable_TCL_DECLARED +#define Tcl_FindExecutable_TCL_DECLARED +/* 144 */ +EXTERN void Tcl_FindExecutable (CONST char * argv0); +#endif +#ifndef Tcl_FirstHashEntry_TCL_DECLARED +#define Tcl_FirstHashEntry_TCL_DECLARED +/* 145 */ +EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, + Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_Flush_TCL_DECLARED +#define Tcl_Flush_TCL_DECLARED +/* 146 */ +EXTERN int Tcl_Flush (Tcl_Channel chan); +#endif +#ifndef Tcl_FreeResult_TCL_DECLARED +#define Tcl_FreeResult_TCL_DECLARED +/* 147 */ +EXTERN void Tcl_FreeResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetAlias_TCL_DECLARED +#define Tcl_GetAlias_TCL_DECLARED +/* 148 */ +EXTERN int Tcl_GetAlias (Tcl_Interp * interp, + CONST char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_GetAliasObj_TCL_DECLARED +#define Tcl_GetAliasObj_TCL_DECLARED +/* 149 */ +EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, + CONST char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * objcPtr, + Tcl_Obj *** objv); +#endif +#ifndef Tcl_GetAssocData_TCL_DECLARED +#define Tcl_GetAssocData_TCL_DECLARED +/* 150 */ +EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, + CONST char * name, + Tcl_InterpDeleteProc ** procPtr); +#endif +#ifndef Tcl_GetChannel_TCL_DECLARED +#define Tcl_GetChannel_TCL_DECLARED +/* 151 */ +EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, + CONST char * chanName, int * modePtr); +#endif +#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED +#define Tcl_GetChannelBufferSize_TCL_DECLARED +/* 152 */ +EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelHandle_TCL_DECLARED +#define Tcl_GetChannelHandle_TCL_DECLARED +/* 153 */ +EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, + int direction, ClientData * handlePtr); +#endif +#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED +#define Tcl_GetChannelInstanceData_TCL_DECLARED +/* 154 */ +EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelMode_TCL_DECLARED +#define Tcl_GetChannelMode_TCL_DECLARED +/* 155 */ +EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelName_TCL_DECLARED +#define Tcl_GetChannelName_TCL_DECLARED +/* 156 */ +EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelOption_TCL_DECLARED +#define Tcl_GetChannelOption_TCL_DECLARED +/* 157 */ +EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, CONST char * optionName, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetChannelType_TCL_DECLARED +#define Tcl_GetChannelType_TCL_DECLARED +/* 158 */ +EXTERN Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); +#endif +#ifndef Tcl_GetCommandInfo_TCL_DECLARED +#define Tcl_GetCommandInfo_TCL_DECLARED +/* 159 */ +EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, + CONST char * cmdName, Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_GetCommandName_TCL_DECLARED +#define Tcl_GetCommandName_TCL_DECLARED +/* 160 */ +EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_GetErrno_TCL_DECLARED +#define Tcl_GetErrno_TCL_DECLARED +/* 161 */ +EXTERN int Tcl_GetErrno (void); +#endif +#ifndef Tcl_GetHostName_TCL_DECLARED +#define Tcl_GetHostName_TCL_DECLARED +/* 162 */ +EXTERN CONST84_RETURN char * Tcl_GetHostName (void); +#endif +#ifndef Tcl_GetInterpPath_TCL_DECLARED +#define Tcl_GetInterpPath_TCL_DECLARED +/* 163 */ +EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, + Tcl_Interp * slaveInterp); +#endif +#ifndef Tcl_GetMaster_TCL_DECLARED +#define Tcl_GetMaster_TCL_DECLARED +/* 164 */ +EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED +#define Tcl_GetNameOfExecutable_TCL_DECLARED +/* 165 */ +EXTERN CONST char * Tcl_GetNameOfExecutable (void); +#endif +#ifndef Tcl_GetObjResult_TCL_DECLARED +#define Tcl_GetObjResult_TCL_DECLARED +/* 166 */ +EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + CONST char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + CONST char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType_TCL_DECLARED +#define Tcl_GetPathType_TCL_DECLARED +/* 168 */ +EXTERN Tcl_PathType Tcl_GetPathType (CONST char * path); +#endif +#ifndef Tcl_Gets_TCL_DECLARED +#define Tcl_Gets_TCL_DECLARED +/* 169 */ +EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetsObj_TCL_DECLARED +#define Tcl_GetsObj_TCL_DECLARED +/* 170 */ +EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetServiceMode_TCL_DECLARED +#define Tcl_GetServiceMode_TCL_DECLARED +/* 171 */ +EXTERN int Tcl_GetServiceMode (void); +#endif +#ifndef Tcl_GetSlave_TCL_DECLARED +#define Tcl_GetSlave_TCL_DECLARED +/* 172 */ +EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, + CONST char * slaveName); +#endif +#ifndef Tcl_GetStdChannel_TCL_DECLARED +#define Tcl_GetStdChannel_TCL_DECLARED +/* 173 */ +EXTERN Tcl_Channel Tcl_GetStdChannel (int type); +#endif +#ifndef Tcl_GetStringResult_TCL_DECLARED +#define Tcl_GetStringResult_TCL_DECLARED +/* 174 */ +EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetVar_TCL_DECLARED +#define Tcl_GetVar_TCL_DECLARED +/* 175 */ +EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, + CONST char * varName, int flags); +#endif +#ifndef Tcl_GetVar2_TCL_DECLARED +#define Tcl_GetVar2_TCL_DECLARED +/* 176 */ +EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_GlobalEval_TCL_DECLARED +#define Tcl_GlobalEval_TCL_DECLARED +/* 177 */ +EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, + CONST char * command); +#endif +#ifndef Tcl_GlobalEvalObj_TCL_DECLARED +#define Tcl_GlobalEvalObj_TCL_DECLARED +/* 178 */ +EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_HideCommand_TCL_DECLARED +#define Tcl_HideCommand_TCL_DECLARED +/* 179 */ +EXTERN int Tcl_HideCommand (Tcl_Interp * interp, + CONST char * cmdName, + CONST char * hiddenCmdToken); +#endif +#ifndef Tcl_Init_TCL_DECLARED +#define Tcl_Init_TCL_DECLARED +/* 180 */ +EXTERN int Tcl_Init (Tcl_Interp * interp); +#endif +#ifndef Tcl_InitHashTable_TCL_DECLARED +#define Tcl_InitHashTable_TCL_DECLARED +/* 181 */ +EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, + int keyType); +#endif +#ifndef Tcl_InputBlocked_TCL_DECLARED +#define Tcl_InputBlocked_TCL_DECLARED +/* 182 */ +EXTERN int Tcl_InputBlocked (Tcl_Channel chan); +#endif +#ifndef Tcl_InputBuffered_TCL_DECLARED +#define Tcl_InputBuffered_TCL_DECLARED +/* 183 */ +EXTERN int Tcl_InputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_InterpDeleted_TCL_DECLARED +#define Tcl_InterpDeleted_TCL_DECLARED +/* 184 */ +EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); +#endif +#ifndef Tcl_IsSafe_TCL_DECLARED +#define Tcl_IsSafe_TCL_DECLARED +/* 185 */ +EXTERN int Tcl_IsSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_JoinPath_TCL_DECLARED +#define Tcl_JoinPath_TCL_DECLARED +/* 186 */ +EXTERN char * Tcl_JoinPath (int argc, CONST84 char * CONST * argv, + Tcl_DString * resultPtr); +#endif +#ifndef Tcl_LinkVar_TCL_DECLARED +#define Tcl_LinkVar_TCL_DECLARED +/* 187 */ +EXTERN int Tcl_LinkVar (Tcl_Interp * interp, + CONST char * varName, char * addr, int type); +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel_TCL_DECLARED +#define Tcl_MakeFileChannel_TCL_DECLARED +/* 189 */ +EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); +#endif +#ifndef Tcl_MakeSafe_TCL_DECLARED +#define Tcl_MakeSafe_TCL_DECLARED +/* 190 */ +EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED +#define Tcl_MakeTcpClientChannel_TCL_DECLARED +/* 191 */ +EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); +#endif +#ifndef Tcl_Merge_TCL_DECLARED +#define Tcl_Merge_TCL_DECLARED +/* 192 */ +EXTERN char * Tcl_Merge (int argc, CONST84 char * CONST * argv); +#endif +#ifndef Tcl_NextHashEntry_TCL_DECLARED +#define Tcl_NextHashEntry_TCL_DECLARED +/* 193 */ +EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_NotifyChannel_TCL_DECLARED +#define Tcl_NotifyChannel_TCL_DECLARED +/* 194 */ +EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); +#endif +#ifndef Tcl_ObjGetVar2_TCL_DECLARED +#define Tcl_ObjGetVar2_TCL_DECLARED +/* 195 */ +EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + int flags); +#endif +#ifndef Tcl_ObjSetVar2_TCL_DECLARED +#define Tcl_ObjSetVar2_TCL_DECLARED +/* 196 */ +EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + Tcl_Obj * newValuePtr, int flags); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel_TCL_DECLARED +#define Tcl_OpenFileChannel_TCL_DECLARED +/* 198 */ +EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, + CONST char * fileName, + CONST char * modeString, int permissions); +#endif +#ifndef Tcl_OpenTcpClient_TCL_DECLARED +#define Tcl_OpenTcpClient_TCL_DECLARED +/* 199 */ +EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, + CONST char * address, CONST char * myaddr, + int myport, int async); +#endif +#ifndef Tcl_OpenTcpServer_TCL_DECLARED +#define Tcl_OpenTcpServer_TCL_DECLARED +/* 200 */ +EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, + CONST char * host, + Tcl_TcpAcceptProc * acceptProc, + ClientData callbackData); +#endif +#ifndef Tcl_Preserve_TCL_DECLARED +#define Tcl_Preserve_TCL_DECLARED +/* 201 */ +EXTERN void Tcl_Preserve (ClientData data); +#endif +#ifndef Tcl_PrintDouble_TCL_DECLARED +#define Tcl_PrintDouble_TCL_DECLARED +/* 202 */ +EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, + char * dst); +#endif +#ifndef Tcl_PutEnv_TCL_DECLARED +#define Tcl_PutEnv_TCL_DECLARED +/* 203 */ +EXTERN int Tcl_PutEnv (CONST char * assignment); +#endif +#ifndef Tcl_PosixError_TCL_DECLARED +#define Tcl_PosixError_TCL_DECLARED +/* 204 */ +EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); +#endif +#ifndef Tcl_QueueEvent_TCL_DECLARED +#define Tcl_QueueEvent_TCL_DECLARED +/* 205 */ +EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tcl_Read_TCL_DECLARED +#define Tcl_Read_TCL_DECLARED +/* 206 */ +EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, + int toRead); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval_TCL_DECLARED +#define Tcl_RecordAndEval_TCL_DECLARED +/* 208 */ +EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, + CONST char * cmd, int flags); +#endif +#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED +#define Tcl_RecordAndEvalObj_TCL_DECLARED +/* 209 */ +EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, + Tcl_Obj * cmdPtr, int flags); +#endif +#ifndef Tcl_RegisterChannel_TCL_DECLARED +#define Tcl_RegisterChannel_TCL_DECLARED +/* 210 */ +EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_RegisterObjType_TCL_DECLARED +#define Tcl_RegisterObjType_TCL_DECLARED +/* 211 */ +EXTERN void Tcl_RegisterObjType (Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_RegExpCompile_TCL_DECLARED +#define Tcl_RegExpCompile_TCL_DECLARED +/* 212 */ +EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_RegExpExec_TCL_DECLARED +#define Tcl_RegExpExec_TCL_DECLARED +/* 213 */ +EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, + Tcl_RegExp regexp, CONST char * text, + CONST char * start); +#endif +#ifndef Tcl_RegExpMatch_TCL_DECLARED +#define Tcl_RegExpMatch_TCL_DECLARED +/* 214 */ +EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, + CONST char * text, CONST char * pattern); +#endif +#ifndef Tcl_RegExpRange_TCL_DECLARED +#define Tcl_RegExpRange_TCL_DECLARED +/* 215 */ +EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, + CONST84 char ** startPtr, + CONST84 char ** endPtr); +#endif +#ifndef Tcl_Release_TCL_DECLARED +#define Tcl_Release_TCL_DECLARED +/* 216 */ +EXTERN void Tcl_Release (ClientData clientData); +#endif +#ifndef Tcl_ResetResult_TCL_DECLARED +#define Tcl_ResetResult_TCL_DECLARED +/* 217 */ +EXTERN void Tcl_ResetResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_ScanElement_TCL_DECLARED +#define Tcl_ScanElement_TCL_DECLARED +/* 218 */ +EXTERN int Tcl_ScanElement (CONST char * str, int * flagPtr); +#endif +#ifndef Tcl_ScanCountedElement_TCL_DECLARED +#define Tcl_ScanCountedElement_TCL_DECLARED +/* 219 */ +EXTERN int Tcl_ScanCountedElement (CONST char * str, int length, + int * flagPtr); +#endif +#ifndef Tcl_SeekOld_TCL_DECLARED +#define Tcl_SeekOld_TCL_DECLARED +/* 220 */ +EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); +#endif +#ifndef Tcl_ServiceAll_TCL_DECLARED +#define Tcl_ServiceAll_TCL_DECLARED +/* 221 */ +EXTERN int Tcl_ServiceAll (void); +#endif +#ifndef Tcl_ServiceEvent_TCL_DECLARED +#define Tcl_ServiceEvent_TCL_DECLARED +/* 222 */ +EXTERN int Tcl_ServiceEvent (int flags); +#endif +#ifndef Tcl_SetAssocData_TCL_DECLARED +#define Tcl_SetAssocData_TCL_DECLARED +/* 223 */ +EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, + CONST char * name, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED +#define Tcl_SetChannelBufferSize_TCL_DECLARED +/* 224 */ +EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); +#endif +#ifndef Tcl_SetChannelOption_TCL_DECLARED +#define Tcl_SetChannelOption_TCL_DECLARED +/* 225 */ +EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, CONST char * optionName, + CONST char * newValue); +#endif +#ifndef Tcl_SetCommandInfo_TCL_DECLARED +#define Tcl_SetCommandInfo_TCL_DECLARED +/* 226 */ +EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, + CONST char * cmdName, + CONST Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_SetErrno_TCL_DECLARED +#define Tcl_SetErrno_TCL_DECLARED +/* 227 */ +EXTERN void Tcl_SetErrno (int err); +#endif +#ifndef Tcl_SetErrorCode_TCL_DECLARED +#define Tcl_SetErrorCode_TCL_DECLARED +/* 228 */ +EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED +#define Tcl_SetMaxBlockTime_TCL_DECLARED +/* 229 */ +EXTERN void Tcl_SetMaxBlockTime (Tcl_Time * timePtr); +#endif +#ifndef Tcl_SetPanicProc_TCL_DECLARED +#define Tcl_SetPanicProc_TCL_DECLARED +/* 230 */ +EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); +#endif +#ifndef Tcl_SetRecursionLimit_TCL_DECLARED +#define Tcl_SetRecursionLimit_TCL_DECLARED +/* 231 */ +EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, + int depth); +#endif +#ifndef Tcl_SetResult_TCL_DECLARED +#define Tcl_SetResult_TCL_DECLARED +/* 232 */ +EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_SetServiceMode_TCL_DECLARED +#define Tcl_SetServiceMode_TCL_DECLARED +/* 233 */ +EXTERN int Tcl_SetServiceMode (int mode); +#endif +#ifndef Tcl_SetObjErrorCode_TCL_DECLARED +#define Tcl_SetObjErrorCode_TCL_DECLARED +/* 234 */ +EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, + Tcl_Obj * errorObjPtr); +#endif +#ifndef Tcl_SetObjResult_TCL_DECLARED +#define Tcl_SetObjResult_TCL_DECLARED +/* 235 */ +EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr); +#endif +#ifndef Tcl_SetStdChannel_TCL_DECLARED +#define Tcl_SetStdChannel_TCL_DECLARED +/* 236 */ +EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); +#endif +#ifndef Tcl_SetVar_TCL_DECLARED +#define Tcl_SetVar_TCL_DECLARED +/* 237 */ +EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, + CONST char * varName, CONST char * newValue, + int flags); +#endif +#ifndef Tcl_SetVar2_TCL_DECLARED +#define Tcl_SetVar2_TCL_DECLARED +/* 238 */ +EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + CONST char * newValue, int flags); +#endif +#ifndef Tcl_SignalId_TCL_DECLARED +#define Tcl_SignalId_TCL_DECLARED +/* 239 */ +EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); +#endif +#ifndef Tcl_SignalMsg_TCL_DECLARED +#define Tcl_SignalMsg_TCL_DECLARED +/* 240 */ +EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); +#endif +#ifndef Tcl_SourceRCFile_TCL_DECLARED +#define Tcl_SourceRCFile_TCL_DECLARED +/* 241 */ +EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); +#endif +#ifndef Tcl_SplitList_TCL_DECLARED +#define Tcl_SplitList_TCL_DECLARED +/* 242 */ +EXTERN int Tcl_SplitList (Tcl_Interp * interp, + CONST char * listStr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_SplitPath_TCL_DECLARED +#define Tcl_SplitPath_TCL_DECLARED +/* 243 */ +EXTERN void Tcl_SplitPath (CONST char * path, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_StaticPackage_TCL_DECLARED +#define Tcl_StaticPackage_TCL_DECLARED +/* 244 */ +EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, + CONST char * pkgName, + Tcl_PackageInitProc * initProc, + Tcl_PackageInitProc * safeInitProc); +#endif +#ifndef Tcl_StringMatch_TCL_DECLARED +#define Tcl_StringMatch_TCL_DECLARED +/* 245 */ +EXTERN int Tcl_StringMatch (CONST char * str, + CONST char * pattern); +#endif +#ifndef Tcl_TellOld_TCL_DECLARED +#define Tcl_TellOld_TCL_DECLARED +/* 246 */ +EXTERN int Tcl_TellOld (Tcl_Channel chan); +#endif +#ifndef Tcl_TraceVar_TCL_DECLARED +#define Tcl_TraceVar_TCL_DECLARED +/* 247 */ +EXTERN int Tcl_TraceVar (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TraceVar2_TCL_DECLARED +#define Tcl_TraceVar2_TCL_DECLARED +/* 248 */ +EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TranslateFileName_TCL_DECLARED +#define Tcl_TranslateFileName_TCL_DECLARED +/* 249 */ +EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, + CONST char * name, Tcl_DString * bufferPtr); +#endif +#ifndef Tcl_Ungets_TCL_DECLARED +#define Tcl_Ungets_TCL_DECLARED +/* 250 */ +EXTERN int Tcl_Ungets (Tcl_Channel chan, CONST char * str, + int len, int atHead); +#endif +#ifndef Tcl_UnlinkVar_TCL_DECLARED +#define Tcl_UnlinkVar_TCL_DECLARED +/* 251 */ +EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef Tcl_UnregisterChannel_TCL_DECLARED +#define Tcl_UnregisterChannel_TCL_DECLARED +/* 252 */ +EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_UnsetVar_TCL_DECLARED +#define Tcl_UnsetVar_TCL_DECLARED +/* 253 */ +EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, + CONST char * varName, int flags); +#endif +#ifndef Tcl_UnsetVar2_TCL_DECLARED +#define Tcl_UnsetVar2_TCL_DECLARED +/* 254 */ +EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_UntraceVar_TCL_DECLARED +#define Tcl_UntraceVar_TCL_DECLARED +/* 255 */ +EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceVar2_TCL_DECLARED +#define Tcl_UntraceVar2_TCL_DECLARED +/* 256 */ +EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED +#define Tcl_UpdateLinkedVar_TCL_DECLARED +/* 257 */ +EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef Tcl_UpVar_TCL_DECLARED +#define Tcl_UpVar_TCL_DECLARED +/* 258 */ +EXTERN int Tcl_UpVar (Tcl_Interp * interp, + CONST char * frameName, CONST char * varName, + CONST char * localName, int flags); +#endif +#ifndef Tcl_UpVar2_TCL_DECLARED +#define Tcl_UpVar2_TCL_DECLARED +/* 259 */ +EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, + CONST char * frameName, CONST char * part1, + CONST char * part2, CONST char * localName, + int flags); +#endif +#ifndef Tcl_VarEval_TCL_DECLARED +#define Tcl_VarEval_TCL_DECLARED +/* 260 */ +EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_VarTraceInfo_TCL_DECLARED +#define Tcl_VarTraceInfo_TCL_DECLARED +/* 261 */ +EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_VarTraceInfo2_TCL_DECLARED +#define Tcl_VarTraceInfo2_TCL_DECLARED +/* 262 */ +EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_Write_TCL_DECLARED +#define Tcl_Write_TCL_DECLARED +/* 263 */ +EXTERN int Tcl_Write (Tcl_Channel chan, CONST char * s, + int slen); +#endif +#ifndef Tcl_WrongNumArgs_TCL_DECLARED +#define Tcl_WrongNumArgs_TCL_DECLARED +/* 264 */ +EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], CONST char * message); +#endif +#ifndef Tcl_DumpActiveMemory_TCL_DECLARED +#define Tcl_DumpActiveMemory_TCL_DECLARED +/* 265 */ +EXTERN int Tcl_DumpActiveMemory (CONST char * fileName); +#endif +#ifndef Tcl_ValidateAllMemory_TCL_DECLARED +#define Tcl_ValidateAllMemory_TCL_DECLARED +/* 266 */ +EXTERN void Tcl_ValidateAllMemory (CONST char * file, int line); +#endif +#ifndef Tcl_AppendResultVA_TCL_DECLARED +#define Tcl_AppendResultVA_TCL_DECLARED +/* 267 */ +EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED +#define Tcl_AppendStringsToObjVA_TCL_DECLARED +/* 268 */ +EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, + va_list argList); +#endif +#ifndef Tcl_HashStats_TCL_DECLARED +#define Tcl_HashStats_TCL_DECLARED +/* 269 */ +EXTERN CONST84_RETURN char * Tcl_HashStats (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_ParseVar_TCL_DECLARED +#define Tcl_ParseVar_TCL_DECLARED +/* 270 */ +EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, + CONST char * start, CONST84 char ** termPtr); +#endif +#ifndef Tcl_PkgPresent_TCL_DECLARED +#define Tcl_PkgPresent_TCL_DECLARED +/* 271 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact); +#endif +#ifndef Tcl_PkgPresentEx_TCL_DECLARED +#define Tcl_PkgPresentEx_TCL_DECLARED +/* 272 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_PkgProvide_TCL_DECLARED +#define Tcl_PkgProvide_TCL_DECLARED +/* 273 */ +EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, + CONST char * name, CONST char * version); +#endif +#ifndef Tcl_PkgRequire_TCL_DECLARED +#define Tcl_PkgRequire_TCL_DECLARED +/* 274 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact); +#endif +#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED +#define Tcl_SetErrorCodeVA_TCL_DECLARED +/* 275 */ +EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_VarEvalVA_TCL_DECLARED +#define Tcl_VarEvalVA_TCL_DECLARED +/* 276 */ +EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); +#endif +#ifndef Tcl_WaitPid_TCL_DECLARED +#define Tcl_WaitPid_TCL_DECLARED +/* 277 */ +EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); +#endif +#ifndef Tcl_PanicVA_TCL_DECLARED +#define Tcl_PanicVA_TCL_DECLARED +/* 278 */ +EXTERN void Tcl_PanicVA (CONST char * format, va_list argList); +#endif +#ifndef Tcl_GetVersion_TCL_DECLARED +#define Tcl_GetVersion_TCL_DECLARED +/* 279 */ +EXTERN void Tcl_GetVersion (int * major, int * minor, + int * patchLevel, int * type); +#endif +#ifndef Tcl_InitMemory_TCL_DECLARED +#define Tcl_InitMemory_TCL_DECLARED +/* 280 */ +EXTERN void Tcl_InitMemory (Tcl_Interp * interp); +#endif +#ifndef Tcl_StackChannel_TCL_DECLARED +#define Tcl_StackChannel_TCL_DECLARED +/* 281 */ +EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, + Tcl_ChannelType * typePtr, + ClientData instanceData, int mask, + Tcl_Channel prevChan); +#endif +#ifndef Tcl_UnstackChannel_TCL_DECLARED +#define Tcl_UnstackChannel_TCL_DECLARED +/* 282 */ +EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_GetStackedChannel_TCL_DECLARED +#define Tcl_GetStackedChannel_TCL_DECLARED +/* 283 */ +EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_SetMainLoop_TCL_DECLARED +#define Tcl_SetMainLoop_TCL_DECLARED +/* 284 */ +EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj_TCL_DECLARED +#define Tcl_AppendObjToObj_TCL_DECLARED +/* 286 */ +EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, + Tcl_Obj * appendObjPtr); +#endif +#ifndef Tcl_CreateEncoding_TCL_DECLARED +#define Tcl_CreateEncoding_TCL_DECLARED +/* 287 */ +EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); +#endif +#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED +#define Tcl_CreateThreadExitHandler_TCL_DECLARED +/* 288 */ +EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED +#define Tcl_DeleteThreadExitHandler_TCL_DECLARED +/* 289 */ +EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DiscardResult_TCL_DECLARED +#define Tcl_DiscardResult_TCL_DECLARED +/* 290 */ +EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_EvalEx_TCL_DECLARED +#define Tcl_EvalEx_TCL_DECLARED +/* 291 */ +EXTERN int Tcl_EvalEx (Tcl_Interp * interp, CONST char * script, + int numBytes, int flags); +#endif +#ifndef Tcl_EvalObjv_TCL_DECLARED +#define Tcl_EvalObjv_TCL_DECLARED +/* 292 */ +EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +#ifndef Tcl_EvalObjEx_TCL_DECLARED +#define Tcl_EvalObjEx_TCL_DECLARED +/* 293 */ +EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_ExitThread_TCL_DECLARED +#define Tcl_ExitThread_TCL_DECLARED +/* 294 */ +EXTERN void Tcl_ExitThread (int status); +#endif +#ifndef Tcl_ExternalToUtf_TCL_DECLARED +#define Tcl_ExternalToUtf_TCL_DECLARED +/* 295 */ +EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, + Tcl_Encoding encoding, CONST char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED +#define Tcl_ExternalToUtfDString_TCL_DECLARED +/* 296 */ +EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, + CONST char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_FinalizeThread_TCL_DECLARED +#define Tcl_FinalizeThread_TCL_DECLARED +/* 297 */ +EXTERN void Tcl_FinalizeThread (void); +#endif +#ifndef Tcl_FinalizeNotifier_TCL_DECLARED +#define Tcl_FinalizeNotifier_TCL_DECLARED +/* 298 */ +EXTERN void Tcl_FinalizeNotifier (ClientData clientData); +#endif +#ifndef Tcl_FreeEncoding_TCL_DECLARED +#define Tcl_FreeEncoding_TCL_DECLARED +/* 299 */ +EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetCurrentThread_TCL_DECLARED +#define Tcl_GetCurrentThread_TCL_DECLARED +/* 300 */ +EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); +#endif +#ifndef Tcl_GetEncoding_TCL_DECLARED +#define Tcl_GetEncoding_TCL_DECLARED +/* 301 */ +EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_GetEncodingName_TCL_DECLARED +#define Tcl_GetEncodingName_TCL_DECLARED +/* 302 */ +EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetEncodingNames_TCL_DECLARED +#define Tcl_GetEncodingNames_TCL_DECLARED +/* 303 */ +EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED +#define Tcl_GetIndexFromObjStruct_TCL_DECLARED +/* 304 */ +EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST VOID * tablePtr, + int offset, CONST char * msg, int flags, + int * indexPtr); +#endif +#ifndef Tcl_GetThreadData_TCL_DECLARED +#define Tcl_GetThreadData_TCL_DECLARED +/* 305 */ +EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, + int size); +#endif +#ifndef Tcl_GetVar2Ex_TCL_DECLARED +#define Tcl_GetVar2Ex_TCL_DECLARED +/* 306 */ +EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_InitNotifier_TCL_DECLARED +#define Tcl_InitNotifier_TCL_DECLARED +/* 307 */ +EXTERN ClientData Tcl_InitNotifier (void); +#endif +#ifndef Tcl_MutexLock_TCL_DECLARED +#define Tcl_MutexLock_TCL_DECLARED +/* 308 */ +EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_MutexUnlock_TCL_DECLARED +#define Tcl_MutexUnlock_TCL_DECLARED +/* 309 */ +EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_ConditionNotify_TCL_DECLARED +#define Tcl_ConditionNotify_TCL_DECLARED +/* 310 */ +EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_ConditionWait_TCL_DECLARED +#define Tcl_ConditionWait_TCL_DECLARED +/* 311 */ +EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, + Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); +#endif +#ifndef Tcl_NumUtfChars_TCL_DECLARED +#define Tcl_NumUtfChars_TCL_DECLARED +/* 312 */ +EXTERN int Tcl_NumUtfChars (CONST char * src, int length); +#endif +#ifndef Tcl_ReadChars_TCL_DECLARED +#define Tcl_ReadChars_TCL_DECLARED +/* 313 */ +EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, + int charsToRead, int appendFlag); +#endif +#ifndef Tcl_RestoreResult_TCL_DECLARED +#define Tcl_RestoreResult_TCL_DECLARED +/* 314 */ +EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SaveResult_TCL_DECLARED +#define Tcl_SaveResult_TCL_DECLARED +/* 315 */ +EXTERN void Tcl_SaveResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SetSystemEncoding_TCL_DECLARED +#define Tcl_SetSystemEncoding_TCL_DECLARED +/* 316 */ +EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_SetVar2Ex_TCL_DECLARED +#define Tcl_SetVar2Ex_TCL_DECLARED +/* 317 */ +EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + Tcl_Obj * newValuePtr, int flags); +#endif +#ifndef Tcl_ThreadAlert_TCL_DECLARED +#define Tcl_ThreadAlert_TCL_DECLARED +/* 318 */ +EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); +#endif +#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED +#define Tcl_ThreadQueueEvent_TCL_DECLARED +/* 319 */ +EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, + Tcl_Event* evPtr, Tcl_QueuePosition position); +#endif +#ifndef Tcl_UniCharAtIndex_TCL_DECLARED +#define Tcl_UniCharAtIndex_TCL_DECLARED +/* 320 */ +EXTERN Tcl_UniChar Tcl_UniCharAtIndex (CONST char * src, int index); +#endif +#ifndef Tcl_UniCharToLower_TCL_DECLARED +#define Tcl_UniCharToLower_TCL_DECLARED +/* 321 */ +EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); +#endif +#ifndef Tcl_UniCharToTitle_TCL_DECLARED +#define Tcl_UniCharToTitle_TCL_DECLARED +/* 322 */ +EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); +#endif +#ifndef Tcl_UniCharToUpper_TCL_DECLARED +#define Tcl_UniCharToUpper_TCL_DECLARED +/* 323 */ +EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); +#endif +#ifndef Tcl_UniCharToUtf_TCL_DECLARED +#define Tcl_UniCharToUtf_TCL_DECLARED +/* 324 */ +EXTERN int Tcl_UniCharToUtf (int ch, char * buf); +#endif +#ifndef Tcl_UtfAtIndex_TCL_DECLARED +#define Tcl_UtfAtIndex_TCL_DECLARED +/* 325 */ +EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (CONST char * src, int index); +#endif +#ifndef Tcl_UtfCharComplete_TCL_DECLARED +#define Tcl_UtfCharComplete_TCL_DECLARED +/* 326 */ +EXTERN int Tcl_UtfCharComplete (CONST char * src, int length); +#endif +#ifndef Tcl_UtfBackslash_TCL_DECLARED +#define Tcl_UtfBackslash_TCL_DECLARED +/* 327 */ +EXTERN int Tcl_UtfBackslash (CONST char * src, int * readPtr, + char * dst); +#endif +#ifndef Tcl_UtfFindFirst_TCL_DECLARED +#define Tcl_UtfFindFirst_TCL_DECLARED +/* 328 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (CONST char * src, int ch); +#endif +#ifndef Tcl_UtfFindLast_TCL_DECLARED +#define Tcl_UtfFindLast_TCL_DECLARED +/* 329 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindLast (CONST char * src, int ch); +#endif +#ifndef Tcl_UtfNext_TCL_DECLARED +#define Tcl_UtfNext_TCL_DECLARED +/* 330 */ +EXTERN CONST84_RETURN char * Tcl_UtfNext (CONST char * src); +#endif +#ifndef Tcl_UtfPrev_TCL_DECLARED +#define Tcl_UtfPrev_TCL_DECLARED +/* 331 */ +EXTERN CONST84_RETURN char * Tcl_UtfPrev (CONST char * src, + CONST char * start); +#endif +#ifndef Tcl_UtfToExternal_TCL_DECLARED +#define Tcl_UtfToExternal_TCL_DECLARED +/* 332 */ +EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, + Tcl_Encoding encoding, CONST char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_UtfToExternalDString_TCL_DECLARED +#define Tcl_UtfToExternalDString_TCL_DECLARED +/* 333 */ +EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, + CONST char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToLower_TCL_DECLARED +#define Tcl_UtfToLower_TCL_DECLARED +/* 334 */ +EXTERN int Tcl_UtfToLower (char * src); +#endif +#ifndef Tcl_UtfToTitle_TCL_DECLARED +#define Tcl_UtfToTitle_TCL_DECLARED +/* 335 */ +EXTERN int Tcl_UtfToTitle (char * src); +#endif +#ifndef Tcl_UtfToUniChar_TCL_DECLARED +#define Tcl_UtfToUniChar_TCL_DECLARED +/* 336 */ +EXTERN int Tcl_UtfToUniChar (CONST char * src, + Tcl_UniChar * chPtr); +#endif +#ifndef Tcl_UtfToUpper_TCL_DECLARED +#define Tcl_UtfToUpper_TCL_DECLARED +/* 337 */ +EXTERN int Tcl_UtfToUpper (char * src); +#endif +#ifndef Tcl_WriteChars_TCL_DECLARED +#define Tcl_WriteChars_TCL_DECLARED +/* 338 */ +EXTERN int Tcl_WriteChars (Tcl_Channel chan, CONST char * src, + int srcLen); +#endif +#ifndef Tcl_WriteObj_TCL_DECLARED +#define Tcl_WriteObj_TCL_DECLARED +/* 339 */ +EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetString_TCL_DECLARED +#define Tcl_GetString_TCL_DECLARED +/* 340 */ +EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED +#define Tcl_GetDefaultEncodingDir_TCL_DECLARED +/* 341 */ +EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); +#endif +#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED +#define Tcl_SetDefaultEncodingDir_TCL_DECLARED +/* 342 */ +EXTERN void Tcl_SetDefaultEncodingDir (CONST char * path); +#endif +#ifndef Tcl_AlertNotifier_TCL_DECLARED +#define Tcl_AlertNotifier_TCL_DECLARED +/* 343 */ +EXTERN void Tcl_AlertNotifier (ClientData clientData); +#endif +#ifndef Tcl_ServiceModeHook_TCL_DECLARED +#define Tcl_ServiceModeHook_TCL_DECLARED +/* 344 */ +EXTERN void Tcl_ServiceModeHook (int mode); +#endif +#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED +#define Tcl_UniCharIsAlnum_TCL_DECLARED +/* 345 */ +EXTERN int Tcl_UniCharIsAlnum (int ch); +#endif +#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED +#define Tcl_UniCharIsAlpha_TCL_DECLARED +/* 346 */ +EXTERN int Tcl_UniCharIsAlpha (int ch); +#endif +#ifndef Tcl_UniCharIsDigit_TCL_DECLARED +#define Tcl_UniCharIsDigit_TCL_DECLARED +/* 347 */ +EXTERN int Tcl_UniCharIsDigit (int ch); +#endif +#ifndef Tcl_UniCharIsLower_TCL_DECLARED +#define Tcl_UniCharIsLower_TCL_DECLARED +/* 348 */ +EXTERN int Tcl_UniCharIsLower (int ch); +#endif +#ifndef Tcl_UniCharIsSpace_TCL_DECLARED +#define Tcl_UniCharIsSpace_TCL_DECLARED +/* 349 */ +EXTERN int Tcl_UniCharIsSpace (int ch); +#endif +#ifndef Tcl_UniCharIsUpper_TCL_DECLARED +#define Tcl_UniCharIsUpper_TCL_DECLARED +/* 350 */ +EXTERN int Tcl_UniCharIsUpper (int ch); +#endif +#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED +#define Tcl_UniCharIsWordChar_TCL_DECLARED +/* 351 */ +EXTERN int Tcl_UniCharIsWordChar (int ch); +#endif +#ifndef Tcl_UniCharLen_TCL_DECLARED +#define Tcl_UniCharLen_TCL_DECLARED +/* 352 */ +EXTERN int Tcl_UniCharLen (CONST Tcl_UniChar * uniStr); +#endif +#ifndef Tcl_UniCharNcmp_TCL_DECLARED +#define Tcl_UniCharNcmp_TCL_DECLARED +/* 353 */ +EXTERN int Tcl_UniCharNcmp (CONST Tcl_UniChar * ucs, + CONST Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED +#define Tcl_UniCharToUtfDString_TCL_DECLARED +/* 354 */ +EXTERN char * Tcl_UniCharToUtfDString (CONST Tcl_UniChar * uniStr, + int uniLength, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED +#define Tcl_UtfToUniCharDString_TCL_DECLARED +/* 355 */ +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (CONST char * src, + int length, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED +#define Tcl_GetRegExpFromObj_TCL_DECLARED +/* 356 */ +EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, + Tcl_Obj * patObj, int flags); +#endif +#ifndef Tcl_EvalTokens_TCL_DECLARED +#define Tcl_EvalTokens_TCL_DECLARED +/* 357 */ +EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_FreeParse_TCL_DECLARED +#define Tcl_FreeParse_TCL_DECLARED +/* 358 */ +EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_LogCommandInfo_TCL_DECLARED +#define Tcl_LogCommandInfo_TCL_DECLARED +/* 359 */ +EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, + CONST char * script, CONST char * command, + int length); +#endif +#ifndef Tcl_ParseBraces_TCL_DECLARED +#define Tcl_ParseBraces_TCL_DECLARED +/* 360 */ +EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseCommand_TCL_DECLARED +#define Tcl_ParseCommand_TCL_DECLARED +/* 361 */ +EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, + CONST char * start, int numBytes, int nested, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseExpr_TCL_DECLARED +#define Tcl_ParseExpr_TCL_DECLARED +/* 362 */ +EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseQuotedString_TCL_DECLARED +#define Tcl_ParseQuotedString_TCL_DECLARED +/* 363 */ +EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseVarName_TCL_DECLARED +#define Tcl_ParseVarName_TCL_DECLARED +/* 364 */ +EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append); +#endif +#ifndef Tcl_GetCwd_TCL_DECLARED +#define Tcl_GetCwd_TCL_DECLARED +/* 365 */ +EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, + Tcl_DString * cwdPtr); +#endif +#ifndef Tcl_Chdir_TCL_DECLARED +#define Tcl_Chdir_TCL_DECLARED +/* 366 */ +EXTERN int Tcl_Chdir (CONST char * dirName); +#endif +#ifndef Tcl_Access_TCL_DECLARED +#define Tcl_Access_TCL_DECLARED +/* 367 */ +EXTERN int Tcl_Access (CONST char * path, int mode); +#endif +#ifndef Tcl_Stat_TCL_DECLARED +#define Tcl_Stat_TCL_DECLARED +/* 368 */ +EXTERN int Tcl_Stat (CONST char * path, struct stat * bufPtr); +#endif +#ifndef Tcl_UtfNcmp_TCL_DECLARED +#define Tcl_UtfNcmp_TCL_DECLARED +/* 369 */ +EXTERN int Tcl_UtfNcmp (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef Tcl_UtfNcasecmp_TCL_DECLARED +#define Tcl_UtfNcasecmp_TCL_DECLARED +/* 370 */ +EXTERN int Tcl_UtfNcasecmp (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef Tcl_StringCaseMatch_TCL_DECLARED +#define Tcl_StringCaseMatch_TCL_DECLARED +/* 371 */ +EXTERN int Tcl_StringCaseMatch (CONST char * str, + CONST char * pattern, int nocase); +#endif +#ifndef Tcl_UniCharIsControl_TCL_DECLARED +#define Tcl_UniCharIsControl_TCL_DECLARED +/* 372 */ +EXTERN int Tcl_UniCharIsControl (int ch); +#endif +#ifndef Tcl_UniCharIsGraph_TCL_DECLARED +#define Tcl_UniCharIsGraph_TCL_DECLARED +/* 373 */ +EXTERN int Tcl_UniCharIsGraph (int ch); +#endif +#ifndef Tcl_UniCharIsPrint_TCL_DECLARED +#define Tcl_UniCharIsPrint_TCL_DECLARED +/* 374 */ +EXTERN int Tcl_UniCharIsPrint (int ch); +#endif +#ifndef Tcl_UniCharIsPunct_TCL_DECLARED +#define Tcl_UniCharIsPunct_TCL_DECLARED +/* 375 */ +EXTERN int Tcl_UniCharIsPunct (int ch); +#endif +#ifndef Tcl_RegExpExecObj_TCL_DECLARED +#define Tcl_RegExpExecObj_TCL_DECLARED +/* 376 */ +EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, + Tcl_RegExp regexp, Tcl_Obj * textObj, + int offset, int nmatches, int flags); +#endif +#ifndef Tcl_RegExpGetInfo_TCL_DECLARED +#define Tcl_RegExpGetInfo_TCL_DECLARED +/* 377 */ +EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, + Tcl_RegExpInfo * infoPtr); +#endif +#ifndef Tcl_NewUnicodeObj_TCL_DECLARED +#define Tcl_NewUnicodeObj_TCL_DECLARED +/* 378 */ +EXTERN Tcl_Obj * Tcl_NewUnicodeObj (CONST Tcl_UniChar * unicode, + int numChars); +#endif +#ifndef Tcl_SetUnicodeObj_TCL_DECLARED +#define Tcl_SetUnicodeObj_TCL_DECLARED +/* 379 */ +EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, + CONST Tcl_UniChar * unicode, int numChars); +#endif +#ifndef Tcl_GetCharLength_TCL_DECLARED +#define Tcl_GetCharLength_TCL_DECLARED +/* 380 */ +EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetUniChar_TCL_DECLARED +#define Tcl_GetUniChar_TCL_DECLARED +/* 381 */ +EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); +#endif +#ifndef Tcl_GetUnicode_TCL_DECLARED +#define Tcl_GetUnicode_TCL_DECLARED +/* 382 */ +EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetRange_TCL_DECLARED +#define Tcl_GetRange_TCL_DECLARED +/* 383 */ +EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); +#endif +#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED +#define Tcl_AppendUnicodeToObj_TCL_DECLARED +/* 384 */ +EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, + CONST Tcl_UniChar * unicode, int length); +#endif +#ifndef Tcl_RegExpMatchObj_TCL_DECLARED +#define Tcl_RegExpMatchObj_TCL_DECLARED +/* 385 */ +EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, + Tcl_Obj * textObj, Tcl_Obj * patternObj); +#endif +#ifndef Tcl_SetNotifier_TCL_DECLARED +#define Tcl_SetNotifier_TCL_DECLARED +/* 386 */ +EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); +#endif +#ifndef Tcl_GetAllocMutex_TCL_DECLARED +#define Tcl_GetAllocMutex_TCL_DECLARED +/* 387 */ +EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); +#endif +#ifndef Tcl_GetChannelNames_TCL_DECLARED +#define Tcl_GetChannelNames_TCL_DECLARED +/* 388 */ +EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED +#define Tcl_GetChannelNamesEx_TCL_DECLARED +/* 389 */ +EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_ProcObjCmd_TCL_DECLARED +#define Tcl_ProcObjCmd_TCL_DECLARED +/* 390 */ +EXTERN int Tcl_ProcObjCmd (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_ConditionFinalize_TCL_DECLARED +#define Tcl_ConditionFinalize_TCL_DECLARED +/* 391 */ +EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_MutexFinalize_TCL_DECLARED +#define Tcl_MutexFinalize_TCL_DECLARED +/* 392 */ +EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); +#endif +#ifndef Tcl_CreateThread_TCL_DECLARED +#define Tcl_CreateThread_TCL_DECLARED +/* 393 */ +EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, + Tcl_ThreadCreateProc proc, + ClientData clientData, int stackSize, + int flags); +#endif +#ifndef Tcl_ReadRaw_TCL_DECLARED +#define Tcl_ReadRaw_TCL_DECLARED +/* 394 */ +EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, + int bytesToRead); +#endif +#ifndef Tcl_WriteRaw_TCL_DECLARED +#define Tcl_WriteRaw_TCL_DECLARED +/* 395 */ +EXTERN int Tcl_WriteRaw (Tcl_Channel chan, CONST char * src, + int srcLen); +#endif +#ifndef Tcl_GetTopChannel_TCL_DECLARED +#define Tcl_GetTopChannel_TCL_DECLARED +/* 396 */ +EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelBuffered_TCL_DECLARED +#define Tcl_ChannelBuffered_TCL_DECLARED +/* 397 */ +EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelName_TCL_DECLARED +#define Tcl_ChannelName_TCL_DECLARED +/* 398 */ +EXTERN CONST84_RETURN char * Tcl_ChannelName ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelVersion_TCL_DECLARED +#define Tcl_ChannelVersion_TCL_DECLARED +/* 399 */ +EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED +#define Tcl_ChannelBlockModeProc_TCL_DECLARED +/* 400 */ +EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelCloseProc_TCL_DECLARED +#define Tcl_ChannelCloseProc_TCL_DECLARED +/* 401 */ +EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED +#define Tcl_ChannelClose2Proc_TCL_DECLARED +/* 402 */ +EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelInputProc_TCL_DECLARED +#define Tcl_ChannelInputProc_TCL_DECLARED +/* 403 */ +EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelOutputProc_TCL_DECLARED +#define Tcl_ChannelOutputProc_TCL_DECLARED +/* 404 */ +EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSeekProc_TCL_DECLARED +#define Tcl_ChannelSeekProc_TCL_DECLARED +/* 405 */ +EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED +#define Tcl_ChannelSetOptionProc_TCL_DECLARED +/* 406 */ +EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED +#define Tcl_ChannelGetOptionProc_TCL_DECLARED +/* 407 */ +EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelWatchProc_TCL_DECLARED +#define Tcl_ChannelWatchProc_TCL_DECLARED +/* 408 */ +EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED +#define Tcl_ChannelGetHandleProc_TCL_DECLARED +/* 409 */ +EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelFlushProc_TCL_DECLARED +#define Tcl_ChannelFlushProc_TCL_DECLARED +/* 410 */ +EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED +#define Tcl_ChannelHandlerProc_TCL_DECLARED +/* 411 */ +EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_JoinThread_TCL_DECLARED +#define Tcl_JoinThread_TCL_DECLARED +/* 412 */ +EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int* result); +#endif +#ifndef Tcl_IsChannelShared_TCL_DECLARED +#define Tcl_IsChannelShared_TCL_DECLARED +/* 413 */ +EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelRegistered_TCL_DECLARED +#define Tcl_IsChannelRegistered_TCL_DECLARED +/* 414 */ +EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_CutChannel_TCL_DECLARED +#define Tcl_CutChannel_TCL_DECLARED +/* 415 */ +EXTERN void Tcl_CutChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_SpliceChannel_TCL_DECLARED +#define Tcl_SpliceChannel_TCL_DECLARED +/* 416 */ +EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED +#define Tcl_ClearChannelHandlers_TCL_DECLARED +/* 417 */ +EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelExisting_TCL_DECLARED +#define Tcl_IsChannelExisting_TCL_DECLARED +/* 418 */ +EXTERN int Tcl_IsChannelExisting (CONST char* channelName); +#endif +#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED +#define Tcl_UniCharNcasecmp_TCL_DECLARED +/* 419 */ +EXTERN int Tcl_UniCharNcasecmp (CONST Tcl_UniChar * ucs, + CONST Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED +#define Tcl_UniCharCaseMatch_TCL_DECLARED +/* 420 */ +EXTERN int Tcl_UniCharCaseMatch (CONST Tcl_UniChar * uniStr, + CONST Tcl_UniChar * uniPattern, int nocase); +#endif +#ifndef Tcl_FindHashEntry_TCL_DECLARED +#define Tcl_FindHashEntry_TCL_DECLARED +/* 421 */ +EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, + CONST char * key); +#endif +#ifndef Tcl_CreateHashEntry_TCL_DECLARED +#define Tcl_CreateHashEntry_TCL_DECLARED +/* 422 */ +EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, + CONST char * key, int * newPtr); +#endif +#ifndef Tcl_InitCustomHashTable_TCL_DECLARED +#define Tcl_InitCustomHashTable_TCL_DECLARED +/* 423 */ +EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, + int keyType, Tcl_HashKeyType * typePtr); +#endif +#ifndef Tcl_InitObjHashTable_TCL_DECLARED +#define Tcl_InitObjHashTable_TCL_DECLARED +/* 424 */ +EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_CommandTraceInfo_TCL_DECLARED +#define Tcl_CommandTraceInfo_TCL_DECLARED +/* 425 */ +EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_TraceCommand_TCL_DECLARED +#define Tcl_TraceCommand_TCL_DECLARED +/* 426 */ +EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceCommand_TCL_DECLARED +#define Tcl_UntraceCommand_TCL_DECLARED +/* 427 */ +EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AttemptAlloc_TCL_DECLARED +#define Tcl_AttemptAlloc_TCL_DECLARED +/* 428 */ +EXTERN char * Tcl_AttemptAlloc (unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED +#define Tcl_AttemptDbCkalloc_TCL_DECLARED +/* 429 */ +EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, + CONST char * file, int line); +#endif +#ifndef Tcl_AttemptRealloc_TCL_DECLARED +#define Tcl_AttemptRealloc_TCL_DECLARED +/* 430 */ +EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED +#define Tcl_AttemptDbCkrealloc_TCL_DECLARED +/* 431 */ +EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, + unsigned int size, CONST char * file, + int line); +#endif +#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED +#define Tcl_AttemptSetObjLength_TCL_DECLARED +/* 432 */ +EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, + int length); +#endif +#ifndef Tcl_GetChannelThread_TCL_DECLARED +#define Tcl_GetChannelThread_TCL_DECLARED +/* 433 */ +EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); +#endif +#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED +#define Tcl_GetUnicodeFromObj_TCL_DECLARED +/* 434 */ +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED +#define Tcl_GetMathFuncInfo_TCL_DECLARED +/* 435 */ +EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, + CONST char * name, int * numArgsPtr, + Tcl_ValueType ** argTypesPtr, + Tcl_MathProc ** procPtr, + ClientData * clientDataPtr); +#endif +#ifndef Tcl_ListMathFuncs_TCL_DECLARED +#define Tcl_ListMathFuncs_TCL_DECLARED +/* 436 */ +EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_SubstObj_TCL_DECLARED +#define Tcl_SubstObj_TCL_DECLARED +/* 437 */ +EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_DetachChannel_TCL_DECLARED +#define Tcl_DetachChannel_TCL_DECLARED +/* 438 */ +EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_IsStandardChannel_TCL_DECLARED +#define Tcl_IsStandardChannel_TCL_DECLARED +/* 439 */ +EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_FSCopyFile_TCL_DECLARED +#define Tcl_FSCopyFile_TCL_DECLARED +/* 440 */ +EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSCopyDirectory_TCL_DECLARED +#define Tcl_FSCopyDirectory_TCL_DECLARED +/* 441 */ +EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSCreateDirectory_TCL_DECLARED +#define Tcl_FSCreateDirectory_TCL_DECLARED +/* 442 */ +EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSDeleteFile_TCL_DECLARED +#define Tcl_FSDeleteFile_TCL_DECLARED +/* 443 */ +EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSLoadFile_TCL_DECLARED +#define Tcl_FSLoadFile_TCL_DECLARED +/* 444 */ +EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, + Tcl_Obj * pathPtr, CONST char * sym1, + CONST char * sym2, + Tcl_PackageInitProc ** proc1Ptr, + Tcl_PackageInitProc ** proc2Ptr, + Tcl_LoadHandle * handlePtr, + Tcl_FSUnloadFileProc ** unloadProcPtr); +#endif +#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED +#define Tcl_FSMatchInDirectory_TCL_DECLARED +/* 445 */ +EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, + Tcl_Obj * result, Tcl_Obj * pathPtr, + CONST char * pattern, + Tcl_GlobTypeData * types); +#endif +#ifndef Tcl_FSLink_TCL_DECLARED +#define Tcl_FSLink_TCL_DECLARED +/* 446 */ +EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, + int linkAction); +#endif +#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED +#define Tcl_FSRemoveDirectory_TCL_DECLARED +/* 447 */ +EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, + int recursive, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSRenameFile_TCL_DECLARED +#define Tcl_FSRenameFile_TCL_DECLARED +/* 448 */ +EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSLstat_TCL_DECLARED +#define Tcl_FSLstat_TCL_DECLARED +/* 449 */ +EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSUtime_TCL_DECLARED +#define Tcl_FSUtime_TCL_DECLARED +/* 450 */ +EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, + struct utimbuf * tval); +#endif +#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED +#define Tcl_FSFileAttrsGet_TCL_DECLARED +/* 451 */ +EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED +#define Tcl_FSFileAttrsSet_TCL_DECLARED +/* 452 */ +EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED +#define Tcl_FSFileAttrStrings_TCL_DECLARED +/* 453 */ +EXTERN CONST char ** Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, + Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSStat_TCL_DECLARED +#define Tcl_FSStat_TCL_DECLARED +/* 454 */ +EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSAccess_TCL_DECLARED +#define Tcl_FSAccess_TCL_DECLARED +/* 455 */ +EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); +#endif +#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED +#define Tcl_FSOpenFileChannel_TCL_DECLARED +/* 456 */ +EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, CONST char * modeString, + int permissions); +#endif +#ifndef Tcl_FSGetCwd_TCL_DECLARED +#define Tcl_FSGetCwd_TCL_DECLARED +/* 457 */ +EXTERN Tcl_Obj* Tcl_FSGetCwd (Tcl_Interp * interp); +#endif +#ifndef Tcl_FSChdir_TCL_DECLARED +#define Tcl_FSChdir_TCL_DECLARED +/* 458 */ +EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSConvertToPathType_TCL_DECLARED +#define Tcl_FSConvertToPathType_TCL_DECLARED +/* 459 */ +EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSJoinPath_TCL_DECLARED +#define Tcl_FSJoinPath_TCL_DECLARED +/* 460 */ +EXTERN Tcl_Obj* Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); +#endif +#ifndef Tcl_FSSplitPath_TCL_DECLARED +#define Tcl_FSSplitPath_TCL_DECLARED +/* 461 */ +EXTERN Tcl_Obj* Tcl_FSSplitPath (Tcl_Obj* pathPtr, int * lenPtr); +#endif +#ifndef Tcl_FSEqualPaths_TCL_DECLARED +#define Tcl_FSEqualPaths_TCL_DECLARED +/* 462 */ +EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, + Tcl_Obj* secondPtr); +#endif +#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED +#define Tcl_FSGetNormalizedPath_TCL_DECLARED +/* 463 */ +EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSJoinToPath_TCL_DECLARED +#define Tcl_FSJoinToPath_TCL_DECLARED +/* 464 */ +EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_FSGetInternalRep_TCL_DECLARED +#define Tcl_FSGetInternalRep_TCL_DECLARED +/* 465 */ +EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, + Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED +#define Tcl_FSGetTranslatedPath_TCL_DECLARED +/* 466 */ +EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSEvalFile_TCL_DECLARED +#define Tcl_FSEvalFile_TCL_DECLARED +/* 467 */ +EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, + Tcl_Obj * fileName); +#endif +#ifndef Tcl_FSNewNativePath_TCL_DECLARED +#define Tcl_FSNewNativePath_TCL_DECLARED +/* 468 */ +EXTERN Tcl_Obj* Tcl_FSNewNativePath (Tcl_Filesystem* fromFilesystem, + ClientData clientData); +#endif +#ifndef Tcl_FSGetNativePath_TCL_DECLARED +#define Tcl_FSGetNativePath_TCL_DECLARED +/* 469 */ +EXTERN CONST char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED +#define Tcl_FSFileSystemInfo_TCL_DECLARED +/* 470 */ +EXTERN Tcl_Obj* Tcl_FSFileSystemInfo (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSPathSeparator_TCL_DECLARED +#define Tcl_FSPathSeparator_TCL_DECLARED +/* 471 */ +EXTERN Tcl_Obj* Tcl_FSPathSeparator (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSListVolumes_TCL_DECLARED +#define Tcl_FSListVolumes_TCL_DECLARED +/* 472 */ +EXTERN Tcl_Obj* Tcl_FSListVolumes (void); +#endif +#ifndef Tcl_FSRegister_TCL_DECLARED +#define Tcl_FSRegister_TCL_DECLARED +/* 473 */ +EXTERN int Tcl_FSRegister (ClientData clientData, + Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSUnregister_TCL_DECLARED +#define Tcl_FSUnregister_TCL_DECLARED +/* 474 */ +EXTERN int Tcl_FSUnregister (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSData_TCL_DECLARED +#define Tcl_FSData_TCL_DECLARED +/* 475 */ +EXTERN ClientData Tcl_FSData (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED +#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED +/* 476 */ +EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED +#define Tcl_FSGetFileSystemForPath_TCL_DECLARED +/* 477 */ +EXTERN Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSGetPathType_TCL_DECLARED +#define Tcl_FSGetPathType_TCL_DECLARED +/* 478 */ +EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_OutputBuffered_TCL_DECLARED +#define Tcl_OutputBuffered_TCL_DECLARED +/* 479 */ +EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_FSMountsChanged_TCL_DECLARED +#define Tcl_FSMountsChanged_TCL_DECLARED +/* 480 */ +EXTERN void Tcl_FSMountsChanged (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_EvalTokensStandard_TCL_DECLARED +#define Tcl_EvalTokensStandard_TCL_DECLARED +/* 481 */ +EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_GetTime_TCL_DECLARED +#define Tcl_GetTime_TCL_DECLARED +/* 482 */ +EXTERN void Tcl_GetTime (Tcl_Time* timeBuf); +#endif +#ifndef Tcl_CreateObjTrace_TCL_DECLARED +#define Tcl_CreateObjTrace_TCL_DECLARED +/* 483 */ +EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, + int flags, Tcl_CmdObjTraceProc* objProc, + ClientData clientData, + Tcl_CmdObjTraceDeleteProc* delProc); +#endif +#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED +#define Tcl_GetCommandInfoFromToken_TCL_DECLARED +/* 484 */ +EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, + Tcl_CmdInfo* infoPtr); +#endif +#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED +#define Tcl_SetCommandInfoFromToken_TCL_DECLARED +/* 485 */ +EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, + CONST Tcl_CmdInfo* infoPtr); +#endif +#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED +#define Tcl_DbNewWideIntObj_TCL_DECLARED +/* 486 */ +EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, + CONST char * file, int line); +#endif +#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED +#define Tcl_GetWideIntFromObj_TCL_DECLARED +/* 487 */ +EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_WideInt * widePtr); +#endif +#ifndef Tcl_NewWideIntObj_TCL_DECLARED +#define Tcl_NewWideIntObj_TCL_DECLARED +/* 488 */ +EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); +#endif +#ifndef Tcl_SetWideIntObj_TCL_DECLARED +#define Tcl_SetWideIntObj_TCL_DECLARED +/* 489 */ +EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, + Tcl_WideInt wideValue); +#endif +#ifndef Tcl_AllocStatBuf_TCL_DECLARED +#define Tcl_AllocStatBuf_TCL_DECLARED +/* 490 */ +EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); +#endif +#ifndef Tcl_Seek_TCL_DECLARED +#define Tcl_Seek_TCL_DECLARED +/* 491 */ +EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, + int mode); +#endif +#ifndef Tcl_Tell_TCL_DECLARED +#define Tcl_Tell_TCL_DECLARED +/* 492 */ +EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED +#define Tcl_ChannelWideSeekProc_TCL_DECLARED +/* 493 */ +EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_DictObjPut_TCL_DECLARED +#define Tcl_DictObjPut_TCL_DECLARED +/* 494 */ +EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjGet_TCL_DECLARED +#define Tcl_DictObjGet_TCL_DECLARED +/* 495 */ +EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj ** valuePtrPtr); +#endif +#ifndef Tcl_DictObjRemove_TCL_DECLARED +#define Tcl_DictObjRemove_TCL_DECLARED +/* 496 */ +EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); +#endif +#ifndef Tcl_DictObjSize_TCL_DECLARED +#define Tcl_DictObjSize_TCL_DECLARED +/* 497 */ +EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int * sizePtr); +#endif +#ifndef Tcl_DictObjFirst_TCL_DECLARED +#define Tcl_DictObjFirst_TCL_DECLARED +/* 498 */ +EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, + Tcl_Obj * dictPtr, + Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjNext_TCL_DECLARED +#define Tcl_DictObjNext_TCL_DECLARED +/* 499 */ +EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjDone_TCL_DECLARED +#define Tcl_DictObjDone_TCL_DECLARED +/* 500 */ +EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); +#endif +#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED +#define Tcl_DictObjPutKeyList_TCL_DECLARED +/* 501 */ +EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED +#define Tcl_DictObjRemoveKeyList_TCL_DECLARED +/* 502 */ +EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *CONST * keyv); +#endif +#ifndef Tcl_NewDictObj_TCL_DECLARED +#define Tcl_NewDictObj_TCL_DECLARED +/* 503 */ +EXTERN Tcl_Obj * Tcl_NewDictObj (void); +#endif +#ifndef Tcl_DbNewDictObj_TCL_DECLARED +#define Tcl_DbNewDictObj_TCL_DECLARED +/* 504 */ +EXTERN Tcl_Obj * Tcl_DbNewDictObj (CONST char * file, int line); +#endif +#ifndef Tcl_RegisterConfig_TCL_DECLARED +#define Tcl_RegisterConfig_TCL_DECLARED +/* 505 */ +EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, + CONST char* pkgName, + Tcl_Config* configuration, + CONST char* valEncoding); +#endif +#ifndef Tcl_CreateNamespace_TCL_DECLARED +#define Tcl_CreateNamespace_TCL_DECLARED +/* 506 */ +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + CONST char * name, ClientData clientData, + Tcl_NamespaceDeleteProc * deleteProc); +#endif +#ifndef Tcl_DeleteNamespace_TCL_DECLARED +#define Tcl_DeleteNamespace_TCL_DECLARED +/* 507 */ +EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_AppendExportList_TCL_DECLARED +#define Tcl_AppendExportList_TCL_DECLARED +/* 508 */ +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_Export_TCL_DECLARED +#define Tcl_Export_TCL_DECLARED +/* 509 */ +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int resetListFirst); +#endif +#ifndef Tcl_Import_TCL_DECLARED +#define Tcl_Import_TCL_DECLARED +/* 510 */ +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int allowOverwrite); +#endif +#ifndef Tcl_ForgetImport_TCL_DECLARED +#define Tcl_ForgetImport_TCL_DECLARED +/* 511 */ +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern); +#endif +#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED +#define Tcl_GetCurrentNamespace_TCL_DECLARED +/* 512 */ +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED +#define Tcl_GetGlobalNamespace_TCL_DECLARED +/* 513 */ +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_FindNamespace_TCL_DECLARED +#define Tcl_FindNamespace_TCL_DECLARED +/* 514 */ +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_FindCommand_TCL_DECLARED +#define Tcl_FindCommand_TCL_DECLARED +/* 515 */ +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_GetCommandFromObj_TCL_DECLARED +#define Tcl_GetCommandFromObj_TCL_DECLARED +/* 516 */ +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCommandFullName_TCL_DECLARED +#define Tcl_GetCommandFullName_TCL_DECLARED +/* 517 */ +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, + Tcl_Command command, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSEvalFileEx_TCL_DECLARED +#define Tcl_FSEvalFileEx_TCL_DECLARED +/* 518 */ +EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, + Tcl_Obj * fileName, + CONST char * encodingName); +#endif +#ifndef Tcl_SetExitProc_TCL_DECLARED +#define Tcl_SetExitProc_TCL_DECLARED +/* 519 */ +EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); +#endif +#ifndef Tcl_LimitAddHandler_TCL_DECLARED +#define Tcl_LimitAddHandler_TCL_DECLARED +/* 520 */ +EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, + Tcl_LimitHandlerProc * handlerProc, + ClientData clientData, + Tcl_LimitHandlerDeleteProc * deleteProc); +#endif +#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED +#define Tcl_LimitRemoveHandler_TCL_DECLARED +/* 521 */ +EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, + int type, Tcl_LimitHandlerProc * handlerProc, + ClientData clientData); +#endif +#ifndef Tcl_LimitReady_TCL_DECLARED +#define Tcl_LimitReady_TCL_DECLARED +/* 522 */ +EXTERN int Tcl_LimitReady (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitCheck_TCL_DECLARED +#define Tcl_LimitCheck_TCL_DECLARED +/* 523 */ +EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitExceeded_TCL_DECLARED +#define Tcl_LimitExceeded_TCL_DECLARED +/* 524 */ +EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitSetCommands_TCL_DECLARED +#define Tcl_LimitSetCommands_TCL_DECLARED +/* 525 */ +EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, + int commandLimit); +#endif +#ifndef Tcl_LimitSetTime_TCL_DECLARED +#define Tcl_LimitSetTime_TCL_DECLARED +/* 526 */ +EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitSetGranularity_TCL_DECLARED +#define Tcl_LimitSetGranularity_TCL_DECLARED +/* 527 */ +EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, + int type, int granularity); +#endif +#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED +#define Tcl_LimitTypeEnabled_TCL_DECLARED +/* 528 */ +EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED +#define Tcl_LimitTypeExceeded_TCL_DECLARED +/* 529 */ +EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeSet_TCL_DECLARED +#define Tcl_LimitTypeSet_TCL_DECLARED +/* 530 */ +EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeReset_TCL_DECLARED +#define Tcl_LimitTypeReset_TCL_DECLARED +/* 531 */ +EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitGetCommands_TCL_DECLARED +#define Tcl_LimitGetCommands_TCL_DECLARED +/* 532 */ +EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitGetTime_TCL_DECLARED +#define Tcl_LimitGetTime_TCL_DECLARED +/* 533 */ +EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitGetGranularity_TCL_DECLARED +#define Tcl_LimitGetGranularity_TCL_DECLARED +/* 534 */ +EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, + int type); +#endif +#ifndef Tcl_SaveInterpState_TCL_DECLARED +#define Tcl_SaveInterpState_TCL_DECLARED +/* 535 */ +EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); +#endif +#ifndef Tcl_RestoreInterpState_TCL_DECLARED +#define Tcl_RestoreInterpState_TCL_DECLARED +/* 536 */ +EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, + Tcl_InterpState state); +#endif +#ifndef Tcl_DiscardInterpState_TCL_DECLARED +#define Tcl_DiscardInterpState_TCL_DECLARED +/* 537 */ +EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); +#endif +#ifndef Tcl_SetReturnOptions_TCL_DECLARED +#define Tcl_SetReturnOptions_TCL_DECLARED +/* 538 */ +EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, + Tcl_Obj * options); +#endif +#ifndef Tcl_GetReturnOptions_TCL_DECLARED +#define Tcl_GetReturnOptions_TCL_DECLARED +/* 539 */ +EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, + int result); +#endif +#ifndef Tcl_IsEnsemble_TCL_DECLARED +#define Tcl_IsEnsemble_TCL_DECLARED +/* 540 */ +EXTERN int Tcl_IsEnsemble (Tcl_Command token); +#endif +#ifndef Tcl_CreateEnsemble_TCL_DECLARED +#define Tcl_CreateEnsemble_TCL_DECLARED +/* 541 */ +EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * namespacePtr, int flags); +#endif +#ifndef Tcl_FindEnsemble_TCL_DECLARED +#define Tcl_FindEnsemble_TCL_DECLARED +/* 542 */ +EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, + Tcl_Obj * cmdNameObj, int flags); +#endif +#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED +/* 543 */ +EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * subcmdList); +#endif +#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED +#define Tcl_SetEnsembleMappingDict_TCL_DECLARED +/* 544 */ +EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * mapDict); +#endif +#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +/* 545 */ +EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * unknownList); +#endif +#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED +#define Tcl_SetEnsembleFlags_TCL_DECLARED +/* 546 */ +EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int flags); +#endif +#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED +/* 547 */ +EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** subcmdListPtr); +#endif +#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED +#define Tcl_GetEnsembleMappingDict_TCL_DECLARED +/* 548 */ +EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** mapDictPtr); +#endif +#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +/* 549 */ +EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** unknownListPtr); +#endif +#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED +#define Tcl_GetEnsembleFlags_TCL_DECLARED +/* 550 */ +EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int * flagsPtr); +#endif +#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED +#define Tcl_GetEnsembleNamespace_TCL_DECLARED +/* 551 */ +EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, + Tcl_Command token, + Tcl_Namespace ** namespacePtrPtr); +#endif +#ifndef Tcl_SetTimeProc_TCL_DECLARED +#define Tcl_SetTimeProc_TCL_DECLARED +/* 552 */ +EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, + Tcl_ScaleTimeProc* scaleProc, + ClientData clientData); +#endif +#ifndef Tcl_QueryTimeProc_TCL_DECLARED +#define Tcl_QueryTimeProc_TCL_DECLARED +/* 553 */ +EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, + Tcl_ScaleTimeProc** scaleProc, + ClientData* clientData); +#endif +#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED +#define Tcl_ChannelThreadActionProc_TCL_DECLARED +/* 554 */ +EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_NewBignumObj_TCL_DECLARED +#define Tcl_NewBignumObj_TCL_DECLARED +/* 555 */ +EXTERN Tcl_Obj* Tcl_NewBignumObj (mp_int* value); +#endif +#ifndef Tcl_DbNewBignumObj_TCL_DECLARED +#define Tcl_DbNewBignumObj_TCL_DECLARED +/* 556 */ +EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, CONST char* file, + int line); +#endif +#ifndef Tcl_SetBignumObj_TCL_DECLARED +#define Tcl_SetBignumObj_TCL_DECLARED +/* 557 */ +EXTERN void Tcl_SetBignumObj (Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_GetBignumFromObj_TCL_DECLARED +#define Tcl_GetBignumFromObj_TCL_DECLARED +/* 558 */ +EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, + Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED +#define Tcl_TakeBignumFromObj_TCL_DECLARED +/* 559 */ +EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, + Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_TruncateChannel_TCL_DECLARED +#define Tcl_TruncateChannel_TCL_DECLARED +/* 560 */ +EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, + Tcl_WideInt length); +#endif +#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED +#define Tcl_ChannelTruncateProc_TCL_DECLARED +/* 561 */ +EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED +#define Tcl_SetChannelErrorInterp_TCL_DECLARED +/* 562 */ +EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, + Tcl_Obj* msg); +#endif +#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED +#define Tcl_GetChannelErrorInterp_TCL_DECLARED +/* 563 */ +EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, + Tcl_Obj** msg); +#endif +#ifndef Tcl_SetChannelError_TCL_DECLARED +#define Tcl_SetChannelError_TCL_DECLARED +/* 564 */ +EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj* msg); +#endif +#ifndef Tcl_GetChannelError_TCL_DECLARED +#define Tcl_GetChannelError_TCL_DECLARED +/* 565 */ +EXTERN void Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj** msg); +#endif +#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED +#define Tcl_InitBignumFromDouble_TCL_DECLARED +/* 566 */ +EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, + double initval, mp_int * toInit); +#endif +#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +/* 567 */ +EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +/* 568 */ +EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); +#endif +#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED +#define Tcl_GetEncodingFromObj_TCL_DECLARED +/* 569 */ +EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, + Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); +#endif +#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED +#define Tcl_GetEncodingSearchPath_TCL_DECLARED +/* 570 */ +EXTERN Tcl_Obj* Tcl_GetEncodingSearchPath (void); +#endif +#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED +#define Tcl_SetEncodingSearchPath_TCL_DECLARED +/* 571 */ +EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj* searchPath); +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +/* 572 */ +EXTERN CONST char * Tcl_GetEncodingNameFromEnvironment ( + Tcl_DString* bufPtr); +#endif +#ifndef Tcl_PkgRequireProc_TCL_DECLARED +#define Tcl_PkgRequireProc_TCL_DECLARED +/* 573 */ +EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, + CONST char * name, int objc, + Tcl_Obj *CONST objv[], + ClientData * clientDataPtr); +#endif +#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED +#define Tcl_AppendObjToErrorInfo_TCL_DECLARED +/* 574 */ +EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED +#define Tcl_AppendLimitedToObj_TCL_DECLARED +/* 575 */ +EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, + CONST char * bytes, int length, int limit, + CONST char * ellipsis); +#endif +#ifndef Tcl_Format_TCL_DECLARED +#define Tcl_Format_TCL_DECLARED +/* 576 */ +EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, CONST char * format, + int objc, Tcl_Obj * CONST objv[]); +#endif +#ifndef Tcl_AppendFormatToObj_TCL_DECLARED +#define Tcl_AppendFormatToObj_TCL_DECLARED +/* 577 */ +EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST char * format, + int objc, Tcl_Obj * CONST objv[]); +#endif +#ifndef Tcl_ObjPrintf_TCL_DECLARED +#define Tcl_ObjPrintf_TCL_DECLARED +/* 578 */ +EXTERN Tcl_Obj * Tcl_ObjPrintf (CONST char * format, ...); +#endif +#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED +#define Tcl_AppendPrintfToObj_TCL_DECLARED +/* 579 */ +EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, + CONST char * format, ...); +#endif +#ifndef Tcl_CancelEval_TCL_DECLARED +#define Tcl_CancelEval_TCL_DECLARED +/* 580 */ +EXTERN int Tcl_CancelEval (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr, + ClientData clientData, int flags); +#endif +#ifndef Tcl_Canceled_TCL_DECLARED +#define Tcl_Canceled_TCL_DECLARED +/* 581 */ +EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); +#endif +#ifndef Tcl_NRCreateCommand_TCL_DECLARED +#define Tcl_NRCreateCommand_TCL_DECLARED +/* 582 */ +EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_ObjCmdProc * proc, + Tcl_ObjCmdProc * nreProc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_NREvalObj_TCL_DECLARED +#define Tcl_NREvalObj_TCL_DECLARED +/* 583 */ +EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_NREvalObjv_TCL_DECLARED +#define Tcl_NREvalObjv_TCL_DECLARED +/* 584 */ +EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +#ifndef Tcl_NRCmdSwap_TCL_DECLARED +#define Tcl_NRCmdSwap_TCL_DECLARED +/* 585 */ +EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NRAddCallback_TCL_DECLARED +#define Tcl_NRAddCallback_TCL_DECLARED +/* 586 */ +EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, + Tcl_NRPostProc * postProcPtr, + ClientData data0, ClientData data1, + ClientData data2, ClientData data3); +#endif +#ifndef Tcl_NRCallObjProc_TCL_DECLARED +#define Tcl_NRCallObjProc_TCL_DECLARED +/* 587 */ +EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, + Tcl_ObjCmdProc * objProc, + ClientData clientData, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_CreatePipe_TCL_DECLARED +#define Tcl_CreatePipe_TCL_DECLARED +/* 588 */ +EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, + Tcl_Channel * rchan, Tcl_Channel * wchan, + int flags); +#endif + +typedef struct TclStubHooks { + CONST struct TclPlatStubs *tclPlatStubs; + CONST struct TclIntStubs *tclIntStubs; + CONST struct TclIntPlatStubs *tclIntPlatStubs; +} TclStubHooks; + +typedef struct TclStubs { + int magic; + CONST struct TclStubHooks *hooks; + + int (*tcl_PkgProvideEx) (Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData); /* 0 */ + CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 1 */ + void (*tcl_Panic) (CONST char * format, ...); /* 2 */ + char * (*tcl_Alloc) (unsigned int size); /* 3 */ + void (*tcl_Free) (char * ptr); /* 4 */ + char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ + char * (*tcl_DbCkalloc) (unsigned int size, CONST char * file, int line); /* 6 */ + int (*tcl_DbCkfree) (char * ptr, CONST char * file, int line); /* 7 */ + char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved9; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved10; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* MACOSX */ + void (*tcl_SetTimer) (Tcl_Time * timePtr); /* 11 */ + void (*tcl_Sleep) (int ms); /* 12 */ + int (*tcl_WaitForEvent) (Tcl_Time * timePtr); /* 13 */ + int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ + void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ + void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ + Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr); /* 18 */ + void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ + void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ + int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ + Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, CONST char * file, int line); /* 22 */ + Tcl_Obj * (*tcl_DbNewByteArrayObj) (CONST unsigned char * bytes, int length, CONST char * file, int line); /* 23 */ + Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, CONST char * file, int line); /* 24 */ + Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *CONST * objv, CONST char * file, int line); /* 25 */ + Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, CONST char * file, int line); /* 26 */ + Tcl_Obj * (*tcl_DbNewObj) (CONST char * file, int line); /* 27 */ + Tcl_Obj * (*tcl_DbNewStringObj) (CONST char * bytes, int length, CONST char * file, int line); /* 28 */ + Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ + void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ + int (*tcl_GetBoolean) (Tcl_Interp * interp, CONST char * src, int * boolPtr); /* 31 */ + int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ + unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ + int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ + int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ + int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ + int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ + Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ + char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ + void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ + int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ + int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ + int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ + int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ + int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ + int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[]); /* 48 */ + Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (CONST unsigned char* bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ + Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ + Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *CONST objv[]); /* 53 */ + Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ + Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ + Tcl_Obj * (*tcl_NewStringObj) (CONST char * bytes, int length); /* 56 */ + void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ + unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ + void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, CONST unsigned char * bytes, int length); /* 59 */ + void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ + void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ + void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[]); /* 62 */ + void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ + void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ + void (*tcl_SetStringObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 65 */ + void (*tcl_AddErrorInfo) (Tcl_Interp * interp, CONST char * message); /* 66 */ + void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, CONST char * message, int length); /* 67 */ + void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ + void (*tcl_AppendElement) (Tcl_Interp * interp, CONST char * element); /* 69 */ + void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ + Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ + void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ + int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ + void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ + int (*tcl_AsyncReady) (void); /* 75 */ + void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ + char (*tcl_Backslash) (CONST char * src, int * readPtr); /* 77 */ + int (*tcl_BadChannelOption) (Tcl_Interp * interp, CONST char * optionName, CONST char * optionList); /* 78 */ + void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ + void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ + int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ + int (*tcl_CommandComplete) (CONST char * cmd); /* 82 */ + char * (*tcl_Concat) (int argc, CONST84 char * CONST * argv); /* 83 */ + int (*tcl_ConvertElement) (CONST char * src, char * dst, int flags); /* 84 */ + int (*tcl_ConvertCountedElement) (CONST char * src, int length, char * dst, int flags); /* 85 */ + int (*tcl_CreateAlias) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * argv); /* 86 */ + int (*tcl_CreateAliasObj) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[]); /* 87 */ + Tcl_Channel (*tcl_CreateChannel) (Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ + void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ + void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ + Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ + void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ + void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ + Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ + void (*tcl_CreateMathFunc) (Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ + Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ + Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, CONST char * slaveName, int isSafe); /* 97 */ + Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ + Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ + void (*tcl_DeleteAssocData) (Tcl_Interp * interp, CONST char * name); /* 100 */ + void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ + void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ + int (*tcl_DeleteCommand) (Tcl_Interp * interp, CONST char * cmdName); /* 103 */ + int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ + void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ + void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ + void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ + void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ + void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ + void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* MACOSX */ + void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ + void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ + void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ + int (*tcl_DoOneEvent) (int flags); /* 115 */ + void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ + char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, CONST char * bytes, int length); /* 117 */ + char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, CONST char * element); /* 118 */ + void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ + void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ + void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ + void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ + void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ + void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ + void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ + int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ + CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ + CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ + int (*tcl_Eval) (Tcl_Interp * interp, CONST char * script); /* 129 */ + int (*tcl_EvalFile) (Tcl_Interp * interp, CONST char * fileName); /* 130 */ + int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ + void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ + void (*tcl_Exit) (int status); /* 133 */ + int (*tcl_ExposeCommand) (Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName); /* 134 */ + int (*tcl_ExprBoolean) (Tcl_Interp * interp, CONST char * expr, int * ptr); /* 135 */ + int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ + int (*tcl_ExprDouble) (Tcl_Interp * interp, CONST char * expr, double * ptr); /* 137 */ + int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ + int (*tcl_ExprLong) (Tcl_Interp * interp, CONST char * expr, long * ptr); /* 139 */ + int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ + int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ + int (*tcl_ExprString) (Tcl_Interp * interp, CONST char * expr); /* 142 */ + void (*tcl_Finalize) (void); /* 143 */ + void (*tcl_FindExecutable) (CONST char * argv0); /* 144 */ + Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ + int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ + void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ + int (*tcl_GetAlias) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ + int (*tcl_GetAliasObj) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ + ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ + Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, CONST char * chanName, int * modePtr); /* 151 */ + int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ + int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ + ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ + int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ + CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ + int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr); /* 157 */ + Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ + int (*tcl_GetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ + CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ + int (*tcl_GetErrno) (void); /* 161 */ + CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ + int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ + Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ + CONST char * (*tcl_GetNameOfExecutable) (void); /* 165 */ + Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved167; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* MACOSX */ + Tcl_PathType (*tcl_GetPathType) (CONST char * path); /* 168 */ + int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ + int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ + int (*tcl_GetServiceMode) (void); /* 171 */ + Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, CONST char * slaveName); /* 172 */ + Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ + CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ + CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 175 */ + CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 176 */ + int (*tcl_GlobalEval) (Tcl_Interp * interp, CONST char * command); /* 177 */ + int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ + int (*tcl_HideCommand) (Tcl_Interp * interp, CONST char * cmdName, CONST char * hiddenCmdToken); /* 179 */ + int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ + void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ + int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ + int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ + int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ + int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ + char * (*tcl_JoinPath) (int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr); /* 186 */ + int (*tcl_LinkVar) (Tcl_Interp * interp, CONST char * varName, char * addr, int type); /* 187 */ + void *reserved188; + Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ + int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ + Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ + char * (*tcl_Merge) (int argc, CONST84 char * CONST * argv); /* 192 */ + Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ + void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ + Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ + Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* MACOSX */ + Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions); /* 198 */ + Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async); /* 199 */ + Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ + void (*tcl_Preserve) (ClientData data); /* 201 */ + void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ + int (*tcl_PutEnv) (CONST char * assignment); /* 203 */ + CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ + void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ + int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* MACOSX */ + int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ + int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ + void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ + void (*tcl_RegisterObjType) (Tcl_ObjType * typePtr); /* 211 */ + Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ + int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ + int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ + void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ + void (*tcl_Release) (ClientData clientData); /* 216 */ + void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ + int (*tcl_ScanElement) (CONST char * str, int * flagPtr); /* 218 */ + int (*tcl_ScanCountedElement) (CONST char * str, int length, int * flagPtr); /* 219 */ + int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ + int (*tcl_ServiceAll) (void); /* 221 */ + int (*tcl_ServiceEvent) (int flags); /* 222 */ + void (*tcl_SetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ + void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ + int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, CONST char * newValue); /* 225 */ + int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ + void (*tcl_SetErrno) (int err); /* 227 */ + void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ + void (*tcl_SetMaxBlockTime) (Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ + int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ + void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ + int (*tcl_SetServiceMode) (int mode); /* 233 */ + void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ + void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ + void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ + CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, CONST char * varName, CONST char * newValue, int flags); /* 237 */ + CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * newValue, int flags); /* 238 */ + CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ + CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ + void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ + int (*tcl_SplitList) (Tcl_Interp * interp, CONST char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ + void (*tcl_SplitPath) (CONST char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ + void (*tcl_StaticPackage) (Tcl_Interp * interp, CONST char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ + int (*tcl_StringMatch) (CONST char * str, CONST char * pattern); /* 245 */ + int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ + int (*tcl_TraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ + int (*tcl_TraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ + char * (*tcl_TranslateFileName) (Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr); /* 249 */ + int (*tcl_Ungets) (Tcl_Channel chan, CONST char * str, int len, int atHead); /* 250 */ + void (*tcl_UnlinkVar) (Tcl_Interp * interp, CONST char * varName); /* 251 */ + int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ + int (*tcl_UnsetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 253 */ + int (*tcl_UnsetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 254 */ + void (*tcl_UntraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ + void (*tcl_UntraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ + void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, CONST char * varName); /* 257 */ + int (*tcl_UpVar) (Tcl_Interp * interp, CONST char * frameName, CONST char * varName, CONST char * localName, int flags); /* 258 */ + int (*tcl_UpVar2) (Tcl_Interp * interp, CONST char * frameName, CONST char * part1, CONST char * part2, CONST char * localName, int flags); /* 259 */ + int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ + ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ + ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ + int (*tcl_Write) (Tcl_Channel chan, CONST char * s, int slen); /* 263 */ + void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message); /* 264 */ + int (*tcl_DumpActiveMemory) (CONST char * fileName); /* 265 */ + void (*tcl_ValidateAllMemory) (CONST char * file, int line); /* 266 */ + void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ + void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ + CONST84_RETURN char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ + CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, CONST char * start, CONST84 char ** termPtr); /* 270 */ + CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 271 */ + CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 272 */ + int (*tcl_PkgProvide) (Tcl_Interp * interp, CONST char * name, CONST char * version); /* 273 */ + CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 274 */ + void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ + int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ + Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ + void (*tcl_PanicVA) (CONST char * format, va_list argList); /* 278 */ + void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ + void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ + Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ + void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ + void *reserved285; + void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ + Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ + void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ + void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ + void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ + int (*tcl_EvalEx) (Tcl_Interp * interp, CONST char * script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 292 */ + int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ + void (*tcl_ExitThread) (int status); /* 294 */ + int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ + char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ + void (*tcl_FinalizeThread) (void); /* 297 */ + void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ + void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ + Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ + Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, CONST char * name); /* 301 */ + CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ + void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr); /* 304 */ + VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ + Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 306 */ + ClientData (*tcl_InitNotifier) (void); /* 307 */ + void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ + void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ + void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); /* 311 */ + int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ + int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ + void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ + void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ + int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, CONST char * name); /* 316 */ + Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ + void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ + void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); /* 319 */ + Tcl_UniChar (*tcl_UniCharAtIndex) (CONST char * src, int index); /* 320 */ + Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ + Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ + Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ + int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ + CONST84_RETURN char * (*tcl_UtfAtIndex) (CONST char * src, int index); /* 325 */ + int (*tcl_UtfCharComplete) (CONST char * src, int length); /* 326 */ + int (*tcl_UtfBackslash) (CONST char * src, int * readPtr, char * dst); /* 327 */ + CONST84_RETURN char * (*tcl_UtfFindFirst) (CONST char * src, int ch); /* 328 */ + CONST84_RETURN char * (*tcl_UtfFindLast) (CONST char * src, int ch); /* 329 */ + CONST84_RETURN char * (*tcl_UtfNext) (CONST char * src); /* 330 */ + CONST84_RETURN char * (*tcl_UtfPrev) (CONST char * src, CONST char * start); /* 331 */ + int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ + char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ + int (*tcl_UtfToLower) (char * src); /* 334 */ + int (*tcl_UtfToTitle) (char * src); /* 335 */ + int (*tcl_UtfToUniChar) (CONST char * src, Tcl_UniChar * chPtr); /* 336 */ + int (*tcl_UtfToUpper) (char * src); /* 337 */ + int (*tcl_WriteChars) (Tcl_Channel chan, CONST char * src, int srcLen); /* 338 */ + int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ + char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ + CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ + void (*tcl_SetDefaultEncodingDir) (CONST char * path); /* 342 */ + void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ + void (*tcl_ServiceModeHook) (int mode); /* 344 */ + int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ + int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ + int (*tcl_UniCharIsDigit) (int ch); /* 347 */ + int (*tcl_UniCharIsLower) (int ch); /* 348 */ + int (*tcl_UniCharIsSpace) (int ch); /* 349 */ + int (*tcl_UniCharIsUpper) (int ch); /* 350 */ + int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ + int (*tcl_UniCharLen) (CONST Tcl_UniChar * uniStr); /* 352 */ + int (*tcl_UniCharNcmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 353 */ + char * (*tcl_UniCharToUtfDString) (CONST Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) (CONST char * src, int length, Tcl_DString * dsPtr); /* 355 */ + Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ + Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ + void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ + void (*tcl_LogCommandInfo) (Tcl_Interp * interp, CONST char * script, CONST char * command, int length); /* 359 */ + int (*tcl_ParseBraces) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ + int (*tcl_ParseCommand) (Tcl_Interp * interp, CONST char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ + int (*tcl_ParseExpr) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ + int (*tcl_ParseQuotedString) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ + int (*tcl_ParseVarName) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ + char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ + int (*tcl_Chdir) (CONST char * dirName); /* 366 */ + int (*tcl_Access) (CONST char * path, int mode); /* 367 */ + int (*tcl_Stat) (CONST char * path, struct stat * bufPtr); /* 368 */ + int (*tcl_UtfNcmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 369 */ + int (*tcl_UtfNcasecmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 370 */ + int (*tcl_StringCaseMatch) (CONST char * str, CONST char * pattern, int nocase); /* 371 */ + int (*tcl_UniCharIsControl) (int ch); /* 372 */ + int (*tcl_UniCharIsGraph) (int ch); /* 373 */ + int (*tcl_UniCharIsPrint) (int ch); /* 374 */ + int (*tcl_UniCharIsPunct) (int ch); /* 375 */ + int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ + void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (CONST Tcl_UniChar * unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars); /* 379 */ + int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ + Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ + Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ + Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ + void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length); /* 384 */ + int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ + void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ + Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ + int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ + int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, CONST char * pattern); /* 389 */ + int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 390 */ + void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ + void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ + int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ + int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ + int (*tcl_WriteRaw) (Tcl_Channel chan, CONST char * src, int srcLen); /* 395 */ + Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ + int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ + CONST84_RETURN char * (*tcl_ChannelName) (CONST Tcl_ChannelType * chanTypePtr); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (CONST Tcl_ChannelType * chanTypePtr); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (CONST Tcl_ChannelType * chanTypePtr); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (CONST Tcl_ChannelType * chanTypePtr); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (CONST Tcl_ChannelType * chanTypePtr); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (CONST Tcl_ChannelType * chanTypePtr); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (CONST Tcl_ChannelType * chanTypePtr); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (CONST Tcl_ChannelType * chanTypePtr); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (CONST Tcl_ChannelType * chanTypePtr); /* 411 */ + int (*tcl_JoinThread) (Tcl_ThreadId threadId, int* result); /* 412 */ + int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ + int (*tcl_IsChannelRegistered) (Tcl_Interp* interp, Tcl_Channel channel); /* 414 */ + void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ + void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ + void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ + int (*tcl_IsChannelExisting) (CONST char* channelName); /* 418 */ + int (*tcl_UniCharNcasecmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 419 */ + int (*tcl_UniCharCaseMatch) (CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase); /* 420 */ + Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, CONST char * key); /* 421 */ + Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, CONST char * key, int * newPtr); /* 422 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr); /* 423 */ + void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ + ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ + int (*tcl_TraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ + void (*tcl_UntraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ + char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ + char * (*tcl_AttemptDbCkalloc) (unsigned int size, CONST char * file, int line); /* 429 */ + char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ + char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 431 */ + int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ + Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ + Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ + int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, CONST char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ + Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, CONST char * pattern); /* 436 */ + Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ + int (*tcl_DetachChannel) (Tcl_Interp* interp, Tcl_Channel channel); /* 438 */ + int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ + int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ + int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ + int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ + int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ + int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * sym1, CONST char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ + int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, CONST char * pattern, Tcl_GlobTypeData * types); /* 445 */ + Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ + int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ + int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ + int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ + int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ + int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ + int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ + CONST char ** (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ + int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ + int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ + Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions); /* 456 */ + Tcl_Obj* (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ + int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ + int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ + Tcl_Obj* (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ + Tcl_Obj* (*tcl_FSSplitPath) (Tcl_Obj* pathPtr, int * lenPtr); /* 461 */ + int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ + Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ + Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, Tcl_Filesystem * fsPtr); /* 465 */ + Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ + int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ + Tcl_Obj* (*tcl_FSNewNativePath) (Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ + CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ + Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ + Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ + Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ + int (*tcl_FSRegister) (ClientData clientData, Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (Tcl_Filesystem * fsPtr); /* 475 */ + CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ + Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ + Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ + int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ + void (*tcl_FSMountsChanged) (Tcl_Filesystem * fsPtr); /* 480 */ + int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ + void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ + Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ + int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo* infoPtr); /* 484 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, CONST Tcl_CmdInfo* infoPtr); /* 485 */ + Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, CONST char * file, int line); /* 486 */ + int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ + Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ + void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ + Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ + Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ + Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ + Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 493 */ + int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ + int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ + int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ + int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ + int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ + void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ + void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ + int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); /* 501 */ + int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv); /* 502 */ + Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ + Tcl_Obj * (*tcl_DbNewDictObj) (CONST char * file, int line); /* 504 */ + void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ + int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 509 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 510 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 511 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ + void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, CONST char * encodingName); /* 518 */ + Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ + void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ + void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ + int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ + int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ + int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ + void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ + void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ + void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ + int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ + int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ + void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ + void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ + int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ + void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ + int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ + Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ + int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ + void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ + int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ + Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ + int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ + Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ + Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ + int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ + int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ + int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ + int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ + int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ + int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ + int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ + int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ + int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ + void (*tcl_SetTimeProc) (Tcl_GetTimeProc* getProc, Tcl_ScaleTimeProc* scaleProc, ClientData clientData); /* 552 */ + void (*tcl_QueryTimeProc) (Tcl_GetTimeProc** getProc, Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); /* 553 */ + Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 554 */ + Tcl_Obj* (*tcl_NewBignumObj) (mp_int* value); /* 555 */ + Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, CONST char* file, int line); /* 556 */ + void (*tcl_SetBignumObj) (Tcl_Obj* obj, mp_int* value); /* 557 */ + int (*tcl_GetBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 558 */ + int (*tcl_TakeBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 559 */ + int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ + Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (CONST Tcl_ChannelType * chanTypePtr); /* 561 */ + void (*tcl_SetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj* msg); /* 562 */ + void (*tcl_GetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj** msg); /* 563 */ + void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj* msg); /* 564 */ + void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj** msg); /* 565 */ + int (*tcl_InitBignumFromDouble) (Tcl_Interp* interp, double initval, mp_int * toInit); /* 566 */ + Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ + int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ + int (*tcl_GetEncodingFromObj) (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); /* 569 */ + Tcl_Obj* (*tcl_GetEncodingSearchPath) (void); /* 570 */ + int (*tcl_SetEncodingSearchPath) (Tcl_Obj* searchPath); /* 571 */ + CONST char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ + int (*tcl_PkgRequireProc) (Tcl_Interp * interp, CONST char * name, int objc, Tcl_Obj *CONST objv[], ClientData * clientDataPtr); /* 573 */ + void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ + void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, CONST char * bytes, int length, int limit, CONST char * ellipsis); /* 575 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 577 */ + Tcl_Obj * (*tcl_ObjPrintf) (CONST char * format, ...); /* 578 */ + void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ + int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ + int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ + int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ + int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ + int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[]); /* 585 */ + void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ + int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 588 */ +} TclStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclStubs *tclStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_PkgProvideEx +#define Tcl_PkgProvideEx \ + (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ +#endif +#ifndef Tcl_PkgRequireEx +#define Tcl_PkgRequireEx \ + (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ +#endif +#ifndef Tcl_Panic +#define Tcl_Panic \ + (tclStubsPtr->tcl_Panic) /* 2 */ +#endif +#ifndef Tcl_Alloc +#define Tcl_Alloc \ + (tclStubsPtr->tcl_Alloc) /* 3 */ +#endif +#ifndef Tcl_Free +#define Tcl_Free \ + (tclStubsPtr->tcl_Free) /* 4 */ +#endif +#ifndef Tcl_Realloc +#define Tcl_Realloc \ + (tclStubsPtr->tcl_Realloc) /* 5 */ +#endif +#ifndef Tcl_DbCkalloc +#define Tcl_DbCkalloc \ + (tclStubsPtr->tcl_DbCkalloc) /* 6 */ +#endif +#ifndef Tcl_DbCkfree +#define Tcl_DbCkfree \ + (tclStubsPtr->tcl_DbCkfree) /* 7 */ +#endif +#ifndef Tcl_DbCkrealloc +#define Tcl_DbCkrealloc \ + (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer +#define Tcl_SetTimer \ + (tclStubsPtr->tcl_SetTimer) /* 11 */ +#endif +#ifndef Tcl_Sleep +#define Tcl_Sleep \ + (tclStubsPtr->tcl_Sleep) /* 12 */ +#endif +#ifndef Tcl_WaitForEvent +#define Tcl_WaitForEvent \ + (tclStubsPtr->tcl_WaitForEvent) /* 13 */ +#endif +#ifndef Tcl_AppendAllObjTypes +#define Tcl_AppendAllObjTypes \ + (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ +#endif +#ifndef Tcl_AppendStringsToObj +#define Tcl_AppendStringsToObj \ + (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ +#endif +#ifndef Tcl_AppendToObj +#define Tcl_AppendToObj \ + (tclStubsPtr->tcl_AppendToObj) /* 16 */ +#endif +#ifndef Tcl_ConcatObj +#define Tcl_ConcatObj \ + (tclStubsPtr->tcl_ConcatObj) /* 17 */ +#endif +#ifndef Tcl_ConvertToType +#define Tcl_ConvertToType \ + (tclStubsPtr->tcl_ConvertToType) /* 18 */ +#endif +#ifndef Tcl_DbDecrRefCount +#define Tcl_DbDecrRefCount \ + (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ +#endif +#ifndef Tcl_DbIncrRefCount +#define Tcl_DbIncrRefCount \ + (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ +#endif +#ifndef Tcl_DbIsShared +#define Tcl_DbIsShared \ + (tclStubsPtr->tcl_DbIsShared) /* 21 */ +#endif +#ifndef Tcl_DbNewBooleanObj +#define Tcl_DbNewBooleanObj \ + (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ +#endif +#ifndef Tcl_DbNewByteArrayObj +#define Tcl_DbNewByteArrayObj \ + (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ +#endif +#ifndef Tcl_DbNewDoubleObj +#define Tcl_DbNewDoubleObj \ + (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ +#endif +#ifndef Tcl_DbNewListObj +#define Tcl_DbNewListObj \ + (tclStubsPtr->tcl_DbNewListObj) /* 25 */ +#endif +#ifndef Tcl_DbNewLongObj +#define Tcl_DbNewLongObj \ + (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ +#endif +#ifndef Tcl_DbNewObj +#define Tcl_DbNewObj \ + (tclStubsPtr->tcl_DbNewObj) /* 27 */ +#endif +#ifndef Tcl_DbNewStringObj +#define Tcl_DbNewStringObj \ + (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ +#endif +#ifndef Tcl_DuplicateObj +#define Tcl_DuplicateObj \ + (tclStubsPtr->tcl_DuplicateObj) /* 29 */ +#endif +#ifndef TclFreeObj +#define TclFreeObj \ + (tclStubsPtr->tclFreeObj) /* 30 */ +#endif +#ifndef Tcl_GetBoolean +#define Tcl_GetBoolean \ + (tclStubsPtr->tcl_GetBoolean) /* 31 */ +#endif +#ifndef Tcl_GetBooleanFromObj +#define Tcl_GetBooleanFromObj \ + (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ +#endif +#ifndef Tcl_GetByteArrayFromObj +#define Tcl_GetByteArrayFromObj \ + (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ +#endif +#ifndef Tcl_GetDouble +#define Tcl_GetDouble \ + (tclStubsPtr->tcl_GetDouble) /* 34 */ +#endif +#ifndef Tcl_GetDoubleFromObj +#define Tcl_GetDoubleFromObj \ + (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ +#endif +#ifndef Tcl_GetIndexFromObj +#define Tcl_GetIndexFromObj \ + (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ +#endif +#ifndef Tcl_GetInt +#define Tcl_GetInt \ + (tclStubsPtr->tcl_GetInt) /* 37 */ +#endif +#ifndef Tcl_GetIntFromObj +#define Tcl_GetIntFromObj \ + (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ +#endif +#ifndef Tcl_GetLongFromObj +#define Tcl_GetLongFromObj \ + (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ +#endif +#ifndef Tcl_GetObjType +#define Tcl_GetObjType \ + (tclStubsPtr->tcl_GetObjType) /* 40 */ +#endif +#ifndef Tcl_GetStringFromObj +#define Tcl_GetStringFromObj \ + (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ +#endif +#ifndef Tcl_InvalidateStringRep +#define Tcl_InvalidateStringRep \ + (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ +#endif +#ifndef Tcl_ListObjAppendList +#define Tcl_ListObjAppendList \ + (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ +#endif +#ifndef Tcl_ListObjAppendElement +#define Tcl_ListObjAppendElement \ + (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ +#endif +#ifndef Tcl_ListObjGetElements +#define Tcl_ListObjGetElements \ + (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ +#endif +#ifndef Tcl_ListObjIndex +#define Tcl_ListObjIndex \ + (tclStubsPtr->tcl_ListObjIndex) /* 46 */ +#endif +#ifndef Tcl_ListObjLength +#define Tcl_ListObjLength \ + (tclStubsPtr->tcl_ListObjLength) /* 47 */ +#endif +#ifndef Tcl_ListObjReplace +#define Tcl_ListObjReplace \ + (tclStubsPtr->tcl_ListObjReplace) /* 48 */ +#endif +#ifndef Tcl_NewBooleanObj +#define Tcl_NewBooleanObj \ + (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ +#endif +#ifndef Tcl_NewByteArrayObj +#define Tcl_NewByteArrayObj \ + (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ +#endif +#ifndef Tcl_NewDoubleObj +#define Tcl_NewDoubleObj \ + (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ +#endif +#ifndef Tcl_NewIntObj +#define Tcl_NewIntObj \ + (tclStubsPtr->tcl_NewIntObj) /* 52 */ +#endif +#ifndef Tcl_NewListObj +#define Tcl_NewListObj \ + (tclStubsPtr->tcl_NewListObj) /* 53 */ +#endif +#ifndef Tcl_NewLongObj +#define Tcl_NewLongObj \ + (tclStubsPtr->tcl_NewLongObj) /* 54 */ +#endif +#ifndef Tcl_NewObj +#define Tcl_NewObj \ + (tclStubsPtr->tcl_NewObj) /* 55 */ +#endif +#ifndef Tcl_NewStringObj +#define Tcl_NewStringObj \ + (tclStubsPtr->tcl_NewStringObj) /* 56 */ +#endif +#ifndef Tcl_SetBooleanObj +#define Tcl_SetBooleanObj \ + (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ +#endif +#ifndef Tcl_SetByteArrayLength +#define Tcl_SetByteArrayLength \ + (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ +#endif +#ifndef Tcl_SetByteArrayObj +#define Tcl_SetByteArrayObj \ + (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ +#endif +#ifndef Tcl_SetDoubleObj +#define Tcl_SetDoubleObj \ + (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ +#endif +#ifndef Tcl_SetIntObj +#define Tcl_SetIntObj \ + (tclStubsPtr->tcl_SetIntObj) /* 61 */ +#endif +#ifndef Tcl_SetListObj +#define Tcl_SetListObj \ + (tclStubsPtr->tcl_SetListObj) /* 62 */ +#endif +#ifndef Tcl_SetLongObj +#define Tcl_SetLongObj \ + (tclStubsPtr->tcl_SetLongObj) /* 63 */ +#endif +#ifndef Tcl_SetObjLength +#define Tcl_SetObjLength \ + (tclStubsPtr->tcl_SetObjLength) /* 64 */ +#endif +#ifndef Tcl_SetStringObj +#define Tcl_SetStringObj \ + (tclStubsPtr->tcl_SetStringObj) /* 65 */ +#endif +#ifndef Tcl_AddErrorInfo +#define Tcl_AddErrorInfo \ + (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ +#endif +#ifndef Tcl_AddObjErrorInfo +#define Tcl_AddObjErrorInfo \ + (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ +#endif +#ifndef Tcl_AllowExceptions +#define Tcl_AllowExceptions \ + (tclStubsPtr->tcl_AllowExceptions) /* 68 */ +#endif +#ifndef Tcl_AppendElement +#define Tcl_AppendElement \ + (tclStubsPtr->tcl_AppendElement) /* 69 */ +#endif +#ifndef Tcl_AppendResult +#define Tcl_AppendResult \ + (tclStubsPtr->tcl_AppendResult) /* 70 */ +#endif +#ifndef Tcl_AsyncCreate +#define Tcl_AsyncCreate \ + (tclStubsPtr->tcl_AsyncCreate) /* 71 */ +#endif +#ifndef Tcl_AsyncDelete +#define Tcl_AsyncDelete \ + (tclStubsPtr->tcl_AsyncDelete) /* 72 */ +#endif +#ifndef Tcl_AsyncInvoke +#define Tcl_AsyncInvoke \ + (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ +#endif +#ifndef Tcl_AsyncMark +#define Tcl_AsyncMark \ + (tclStubsPtr->tcl_AsyncMark) /* 74 */ +#endif +#ifndef Tcl_AsyncReady +#define Tcl_AsyncReady \ + (tclStubsPtr->tcl_AsyncReady) /* 75 */ +#endif +#ifndef Tcl_BackgroundError +#define Tcl_BackgroundError \ + (tclStubsPtr->tcl_BackgroundError) /* 76 */ +#endif +#ifndef Tcl_Backslash +#define Tcl_Backslash \ + (tclStubsPtr->tcl_Backslash) /* 77 */ +#endif +#ifndef Tcl_BadChannelOption +#define Tcl_BadChannelOption \ + (tclStubsPtr->tcl_BadChannelOption) /* 78 */ +#endif +#ifndef Tcl_CallWhenDeleted +#define Tcl_CallWhenDeleted \ + (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ +#endif +#ifndef Tcl_CancelIdleCall +#define Tcl_CancelIdleCall \ + (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ +#endif +#ifndef Tcl_Close +#define Tcl_Close \ + (tclStubsPtr->tcl_Close) /* 81 */ +#endif +#ifndef Tcl_CommandComplete +#define Tcl_CommandComplete \ + (tclStubsPtr->tcl_CommandComplete) /* 82 */ +#endif +#ifndef Tcl_Concat +#define Tcl_Concat \ + (tclStubsPtr->tcl_Concat) /* 83 */ +#endif +#ifndef Tcl_ConvertElement +#define Tcl_ConvertElement \ + (tclStubsPtr->tcl_ConvertElement) /* 84 */ +#endif +#ifndef Tcl_ConvertCountedElement +#define Tcl_ConvertCountedElement \ + (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ +#endif +#ifndef Tcl_CreateAlias +#define Tcl_CreateAlias \ + (tclStubsPtr->tcl_CreateAlias) /* 86 */ +#endif +#ifndef Tcl_CreateAliasObj +#define Tcl_CreateAliasObj \ + (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ +#endif +#ifndef Tcl_CreateChannel +#define Tcl_CreateChannel \ + (tclStubsPtr->tcl_CreateChannel) /* 88 */ +#endif +#ifndef Tcl_CreateChannelHandler +#define Tcl_CreateChannelHandler \ + (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ +#endif +#ifndef Tcl_CreateCloseHandler +#define Tcl_CreateCloseHandler \ + (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ +#endif +#ifndef Tcl_CreateCommand +#define Tcl_CreateCommand \ + (tclStubsPtr->tcl_CreateCommand) /* 91 */ +#endif +#ifndef Tcl_CreateEventSource +#define Tcl_CreateEventSource \ + (tclStubsPtr->tcl_CreateEventSource) /* 92 */ +#endif +#ifndef Tcl_CreateExitHandler +#define Tcl_CreateExitHandler \ + (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ +#endif +#ifndef Tcl_CreateInterp +#define Tcl_CreateInterp \ + (tclStubsPtr->tcl_CreateInterp) /* 94 */ +#endif +#ifndef Tcl_CreateMathFunc +#define Tcl_CreateMathFunc \ + (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ +#endif +#ifndef Tcl_CreateObjCommand +#define Tcl_CreateObjCommand \ + (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ +#endif +#ifndef Tcl_CreateSlave +#define Tcl_CreateSlave \ + (tclStubsPtr->tcl_CreateSlave) /* 97 */ +#endif +#ifndef Tcl_CreateTimerHandler +#define Tcl_CreateTimerHandler \ + (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ +#endif +#ifndef Tcl_CreateTrace +#define Tcl_CreateTrace \ + (tclStubsPtr->tcl_CreateTrace) /* 99 */ +#endif +#ifndef Tcl_DeleteAssocData +#define Tcl_DeleteAssocData \ + (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ +#endif +#ifndef Tcl_DeleteChannelHandler +#define Tcl_DeleteChannelHandler \ + (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ +#endif +#ifndef Tcl_DeleteCloseHandler +#define Tcl_DeleteCloseHandler \ + (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ +#endif +#ifndef Tcl_DeleteCommand +#define Tcl_DeleteCommand \ + (tclStubsPtr->tcl_DeleteCommand) /* 103 */ +#endif +#ifndef Tcl_DeleteCommandFromToken +#define Tcl_DeleteCommandFromToken \ + (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ +#endif +#ifndef Tcl_DeleteEvents +#define Tcl_DeleteEvents \ + (tclStubsPtr->tcl_DeleteEvents) /* 105 */ +#endif +#ifndef Tcl_DeleteEventSource +#define Tcl_DeleteEventSource \ + (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ +#endif +#ifndef Tcl_DeleteExitHandler +#define Tcl_DeleteExitHandler \ + (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ +#endif +#ifndef Tcl_DeleteHashEntry +#define Tcl_DeleteHashEntry \ + (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ +#endif +#ifndef Tcl_DeleteHashTable +#define Tcl_DeleteHashTable \ + (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ +#endif +#ifndef Tcl_DeleteInterp +#define Tcl_DeleteInterp \ + (tclStubsPtr->tcl_DeleteInterp) /* 110 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler +#define Tcl_DeleteTimerHandler \ + (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ +#endif +#ifndef Tcl_DeleteTrace +#define Tcl_DeleteTrace \ + (tclStubsPtr->tcl_DeleteTrace) /* 113 */ +#endif +#ifndef Tcl_DontCallWhenDeleted +#define Tcl_DontCallWhenDeleted \ + (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ +#endif +#ifndef Tcl_DoOneEvent +#define Tcl_DoOneEvent \ + (tclStubsPtr->tcl_DoOneEvent) /* 115 */ +#endif +#ifndef Tcl_DoWhenIdle +#define Tcl_DoWhenIdle \ + (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ +#endif +#ifndef Tcl_DStringAppend +#define Tcl_DStringAppend \ + (tclStubsPtr->tcl_DStringAppend) /* 117 */ +#endif +#ifndef Tcl_DStringAppendElement +#define Tcl_DStringAppendElement \ + (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ +#endif +#ifndef Tcl_DStringEndSublist +#define Tcl_DStringEndSublist \ + (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ +#endif +#ifndef Tcl_DStringFree +#define Tcl_DStringFree \ + (tclStubsPtr->tcl_DStringFree) /* 120 */ +#endif +#ifndef Tcl_DStringGetResult +#define Tcl_DStringGetResult \ + (tclStubsPtr->tcl_DStringGetResult) /* 121 */ +#endif +#ifndef Tcl_DStringInit +#define Tcl_DStringInit \ + (tclStubsPtr->tcl_DStringInit) /* 122 */ +#endif +#ifndef Tcl_DStringResult +#define Tcl_DStringResult \ + (tclStubsPtr->tcl_DStringResult) /* 123 */ +#endif +#ifndef Tcl_DStringSetLength +#define Tcl_DStringSetLength \ + (tclStubsPtr->tcl_DStringSetLength) /* 124 */ +#endif +#ifndef Tcl_DStringStartSublist +#define Tcl_DStringStartSublist \ + (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ +#endif +#ifndef Tcl_Eof +#define Tcl_Eof \ + (tclStubsPtr->tcl_Eof) /* 126 */ +#endif +#ifndef Tcl_ErrnoId +#define Tcl_ErrnoId \ + (tclStubsPtr->tcl_ErrnoId) /* 127 */ +#endif +#ifndef Tcl_ErrnoMsg +#define Tcl_ErrnoMsg \ + (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ +#endif +#ifndef Tcl_Eval +#define Tcl_Eval \ + (tclStubsPtr->tcl_Eval) /* 129 */ +#endif +#ifndef Tcl_EvalFile +#define Tcl_EvalFile \ + (tclStubsPtr->tcl_EvalFile) /* 130 */ +#endif +#ifndef Tcl_EvalObj +#define Tcl_EvalObj \ + (tclStubsPtr->tcl_EvalObj) /* 131 */ +#endif +#ifndef Tcl_EventuallyFree +#define Tcl_EventuallyFree \ + (tclStubsPtr->tcl_EventuallyFree) /* 132 */ +#endif +#ifndef Tcl_Exit +#define Tcl_Exit \ + (tclStubsPtr->tcl_Exit) /* 133 */ +#endif +#ifndef Tcl_ExposeCommand +#define Tcl_ExposeCommand \ + (tclStubsPtr->tcl_ExposeCommand) /* 134 */ +#endif +#ifndef Tcl_ExprBoolean +#define Tcl_ExprBoolean \ + (tclStubsPtr->tcl_ExprBoolean) /* 135 */ +#endif +#ifndef Tcl_ExprBooleanObj +#define Tcl_ExprBooleanObj \ + (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ +#endif +#ifndef Tcl_ExprDouble +#define Tcl_ExprDouble \ + (tclStubsPtr->tcl_ExprDouble) /* 137 */ +#endif +#ifndef Tcl_ExprDoubleObj +#define Tcl_ExprDoubleObj \ + (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ +#endif +#ifndef Tcl_ExprLong +#define Tcl_ExprLong \ + (tclStubsPtr->tcl_ExprLong) /* 139 */ +#endif +#ifndef Tcl_ExprLongObj +#define Tcl_ExprLongObj \ + (tclStubsPtr->tcl_ExprLongObj) /* 140 */ +#endif +#ifndef Tcl_ExprObj +#define Tcl_ExprObj \ + (tclStubsPtr->tcl_ExprObj) /* 141 */ +#endif +#ifndef Tcl_ExprString +#define Tcl_ExprString \ + (tclStubsPtr->tcl_ExprString) /* 142 */ +#endif +#ifndef Tcl_Finalize +#define Tcl_Finalize \ + (tclStubsPtr->tcl_Finalize) /* 143 */ +#endif +#ifndef Tcl_FindExecutable +#define Tcl_FindExecutable \ + (tclStubsPtr->tcl_FindExecutable) /* 144 */ +#endif +#ifndef Tcl_FirstHashEntry +#define Tcl_FirstHashEntry \ + (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ +#endif +#ifndef Tcl_Flush +#define Tcl_Flush \ + (tclStubsPtr->tcl_Flush) /* 146 */ +#endif +#ifndef Tcl_FreeResult +#define Tcl_FreeResult \ + (tclStubsPtr->tcl_FreeResult) /* 147 */ +#endif +#ifndef Tcl_GetAlias +#define Tcl_GetAlias \ + (tclStubsPtr->tcl_GetAlias) /* 148 */ +#endif +#ifndef Tcl_GetAliasObj +#define Tcl_GetAliasObj \ + (tclStubsPtr->tcl_GetAliasObj) /* 149 */ +#endif +#ifndef Tcl_GetAssocData +#define Tcl_GetAssocData \ + (tclStubsPtr->tcl_GetAssocData) /* 150 */ +#endif +#ifndef Tcl_GetChannel +#define Tcl_GetChannel \ + (tclStubsPtr->tcl_GetChannel) /* 151 */ +#endif +#ifndef Tcl_GetChannelBufferSize +#define Tcl_GetChannelBufferSize \ + (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ +#endif +#ifndef Tcl_GetChannelHandle +#define Tcl_GetChannelHandle \ + (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ +#endif +#ifndef Tcl_GetChannelInstanceData +#define Tcl_GetChannelInstanceData \ + (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ +#endif +#ifndef Tcl_GetChannelMode +#define Tcl_GetChannelMode \ + (tclStubsPtr->tcl_GetChannelMode) /* 155 */ +#endif +#ifndef Tcl_GetChannelName +#define Tcl_GetChannelName \ + (tclStubsPtr->tcl_GetChannelName) /* 156 */ +#endif +#ifndef Tcl_GetChannelOption +#define Tcl_GetChannelOption \ + (tclStubsPtr->tcl_GetChannelOption) /* 157 */ +#endif +#ifndef Tcl_GetChannelType +#define Tcl_GetChannelType \ + (tclStubsPtr->tcl_GetChannelType) /* 158 */ +#endif +#ifndef Tcl_GetCommandInfo +#define Tcl_GetCommandInfo \ + (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ +#endif +#ifndef Tcl_GetCommandName +#define Tcl_GetCommandName \ + (tclStubsPtr->tcl_GetCommandName) /* 160 */ +#endif +#ifndef Tcl_GetErrno +#define Tcl_GetErrno \ + (tclStubsPtr->tcl_GetErrno) /* 161 */ +#endif +#ifndef Tcl_GetHostName +#define Tcl_GetHostName \ + (tclStubsPtr->tcl_GetHostName) /* 162 */ +#endif +#ifndef Tcl_GetInterpPath +#define Tcl_GetInterpPath \ + (tclStubsPtr->tcl_GetInterpPath) /* 163 */ +#endif +#ifndef Tcl_GetMaster +#define Tcl_GetMaster \ + (tclStubsPtr->tcl_GetMaster) /* 164 */ +#endif +#ifndef Tcl_GetNameOfExecutable +#define Tcl_GetNameOfExecutable \ + (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ +#endif +#ifndef Tcl_GetObjResult +#define Tcl_GetObjResult \ + (tclStubsPtr->tcl_GetObjResult) /* 166 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType +#define Tcl_GetPathType \ + (tclStubsPtr->tcl_GetPathType) /* 168 */ +#endif +#ifndef Tcl_Gets +#define Tcl_Gets \ + (tclStubsPtr->tcl_Gets) /* 169 */ +#endif +#ifndef Tcl_GetsObj +#define Tcl_GetsObj \ + (tclStubsPtr->tcl_GetsObj) /* 170 */ +#endif +#ifndef Tcl_GetServiceMode +#define Tcl_GetServiceMode \ + (tclStubsPtr->tcl_GetServiceMode) /* 171 */ +#endif +#ifndef Tcl_GetSlave +#define Tcl_GetSlave \ + (tclStubsPtr->tcl_GetSlave) /* 172 */ +#endif +#ifndef Tcl_GetStdChannel +#define Tcl_GetStdChannel \ + (tclStubsPtr->tcl_GetStdChannel) /* 173 */ +#endif +#ifndef Tcl_GetStringResult +#define Tcl_GetStringResult \ + (tclStubsPtr->tcl_GetStringResult) /* 174 */ +#endif +#ifndef Tcl_GetVar +#define Tcl_GetVar \ + (tclStubsPtr->tcl_GetVar) /* 175 */ +#endif +#ifndef Tcl_GetVar2 +#define Tcl_GetVar2 \ + (tclStubsPtr->tcl_GetVar2) /* 176 */ +#endif +#ifndef Tcl_GlobalEval +#define Tcl_GlobalEval \ + (tclStubsPtr->tcl_GlobalEval) /* 177 */ +#endif +#ifndef Tcl_GlobalEvalObj +#define Tcl_GlobalEvalObj \ + (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ +#endif +#ifndef Tcl_HideCommand +#define Tcl_HideCommand \ + (tclStubsPtr->tcl_HideCommand) /* 179 */ +#endif +#ifndef Tcl_Init +#define Tcl_Init \ + (tclStubsPtr->tcl_Init) /* 180 */ +#endif +#ifndef Tcl_InitHashTable +#define Tcl_InitHashTable \ + (tclStubsPtr->tcl_InitHashTable) /* 181 */ +#endif +#ifndef Tcl_InputBlocked +#define Tcl_InputBlocked \ + (tclStubsPtr->tcl_InputBlocked) /* 182 */ +#endif +#ifndef Tcl_InputBuffered +#define Tcl_InputBuffered \ + (tclStubsPtr->tcl_InputBuffered) /* 183 */ +#endif +#ifndef Tcl_InterpDeleted +#define Tcl_InterpDeleted \ + (tclStubsPtr->tcl_InterpDeleted) /* 184 */ +#endif +#ifndef Tcl_IsSafe +#define Tcl_IsSafe \ + (tclStubsPtr->tcl_IsSafe) /* 185 */ +#endif +#ifndef Tcl_JoinPath +#define Tcl_JoinPath \ + (tclStubsPtr->tcl_JoinPath) /* 186 */ +#endif +#ifndef Tcl_LinkVar +#define Tcl_LinkVar \ + (tclStubsPtr->tcl_LinkVar) /* 187 */ +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel +#define Tcl_MakeFileChannel \ + (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ +#endif +#ifndef Tcl_MakeSafe +#define Tcl_MakeSafe \ + (tclStubsPtr->tcl_MakeSafe) /* 190 */ +#endif +#ifndef Tcl_MakeTcpClientChannel +#define Tcl_MakeTcpClientChannel \ + (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ +#endif +#ifndef Tcl_Merge +#define Tcl_Merge \ + (tclStubsPtr->tcl_Merge) /* 192 */ +#endif +#ifndef Tcl_NextHashEntry +#define Tcl_NextHashEntry \ + (tclStubsPtr->tcl_NextHashEntry) /* 193 */ +#endif +#ifndef Tcl_NotifyChannel +#define Tcl_NotifyChannel \ + (tclStubsPtr->tcl_NotifyChannel) /* 194 */ +#endif +#ifndef Tcl_ObjGetVar2 +#define Tcl_ObjGetVar2 \ + (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ +#endif +#ifndef Tcl_ObjSetVar2 +#define Tcl_ObjSetVar2 \ + (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel +#define Tcl_OpenFileChannel \ + (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ +#endif +#ifndef Tcl_OpenTcpClient +#define Tcl_OpenTcpClient \ + (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ +#endif +#ifndef Tcl_OpenTcpServer +#define Tcl_OpenTcpServer \ + (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ +#endif +#ifndef Tcl_Preserve +#define Tcl_Preserve \ + (tclStubsPtr->tcl_Preserve) /* 201 */ +#endif +#ifndef Tcl_PrintDouble +#define Tcl_PrintDouble \ + (tclStubsPtr->tcl_PrintDouble) /* 202 */ +#endif +#ifndef Tcl_PutEnv +#define Tcl_PutEnv \ + (tclStubsPtr->tcl_PutEnv) /* 203 */ +#endif +#ifndef Tcl_PosixError +#define Tcl_PosixError \ + (tclStubsPtr->tcl_PosixError) /* 204 */ +#endif +#ifndef Tcl_QueueEvent +#define Tcl_QueueEvent \ + (tclStubsPtr->tcl_QueueEvent) /* 205 */ +#endif +#ifndef Tcl_Read +#define Tcl_Read \ + (tclStubsPtr->tcl_Read) /* 206 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval +#define Tcl_RecordAndEval \ + (tclStubsPtr->tcl_RecordAndEval) /* 208 */ +#endif +#ifndef Tcl_RecordAndEvalObj +#define Tcl_RecordAndEvalObj \ + (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ +#endif +#ifndef Tcl_RegisterChannel +#define Tcl_RegisterChannel \ + (tclStubsPtr->tcl_RegisterChannel) /* 210 */ +#endif +#ifndef Tcl_RegisterObjType +#define Tcl_RegisterObjType \ + (tclStubsPtr->tcl_RegisterObjType) /* 211 */ +#endif +#ifndef Tcl_RegExpCompile +#define Tcl_RegExpCompile \ + (tclStubsPtr->tcl_RegExpCompile) /* 212 */ +#endif +#ifndef Tcl_RegExpExec +#define Tcl_RegExpExec \ + (tclStubsPtr->tcl_RegExpExec) /* 213 */ +#endif +#ifndef Tcl_RegExpMatch +#define Tcl_RegExpMatch \ + (tclStubsPtr->tcl_RegExpMatch) /* 214 */ +#endif +#ifndef Tcl_RegExpRange +#define Tcl_RegExpRange \ + (tclStubsPtr->tcl_RegExpRange) /* 215 */ +#endif +#ifndef Tcl_Release +#define Tcl_Release \ + (tclStubsPtr->tcl_Release) /* 216 */ +#endif +#ifndef Tcl_ResetResult +#define Tcl_ResetResult \ + (tclStubsPtr->tcl_ResetResult) /* 217 */ +#endif +#ifndef Tcl_ScanElement +#define Tcl_ScanElement \ + (tclStubsPtr->tcl_ScanElement) /* 218 */ +#endif +#ifndef Tcl_ScanCountedElement +#define Tcl_ScanCountedElement \ + (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ +#endif +#ifndef Tcl_SeekOld +#define Tcl_SeekOld \ + (tclStubsPtr->tcl_SeekOld) /* 220 */ +#endif +#ifndef Tcl_ServiceAll +#define Tcl_ServiceAll \ + (tclStubsPtr->tcl_ServiceAll) /* 221 */ +#endif +#ifndef Tcl_ServiceEvent +#define Tcl_ServiceEvent \ + (tclStubsPtr->tcl_ServiceEvent) /* 222 */ +#endif +#ifndef Tcl_SetAssocData +#define Tcl_SetAssocData \ + (tclStubsPtr->tcl_SetAssocData) /* 223 */ +#endif +#ifndef Tcl_SetChannelBufferSize +#define Tcl_SetChannelBufferSize \ + (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ +#endif +#ifndef Tcl_SetChannelOption +#define Tcl_SetChannelOption \ + (tclStubsPtr->tcl_SetChannelOption) /* 225 */ +#endif +#ifndef Tcl_SetCommandInfo +#define Tcl_SetCommandInfo \ + (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ +#endif +#ifndef Tcl_SetErrno +#define Tcl_SetErrno \ + (tclStubsPtr->tcl_SetErrno) /* 227 */ +#endif +#ifndef Tcl_SetErrorCode +#define Tcl_SetErrorCode \ + (tclStubsPtr->tcl_SetErrorCode) /* 228 */ +#endif +#ifndef Tcl_SetMaxBlockTime +#define Tcl_SetMaxBlockTime \ + (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ +#endif +#ifndef Tcl_SetPanicProc +#define Tcl_SetPanicProc \ + (tclStubsPtr->tcl_SetPanicProc) /* 230 */ +#endif +#ifndef Tcl_SetRecursionLimit +#define Tcl_SetRecursionLimit \ + (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ +#endif +#ifndef Tcl_SetResult +#define Tcl_SetResult \ + (tclStubsPtr->tcl_SetResult) /* 232 */ +#endif +#ifndef Tcl_SetServiceMode +#define Tcl_SetServiceMode \ + (tclStubsPtr->tcl_SetServiceMode) /* 233 */ +#endif +#ifndef Tcl_SetObjErrorCode +#define Tcl_SetObjErrorCode \ + (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ +#endif +#ifndef Tcl_SetObjResult +#define Tcl_SetObjResult \ + (tclStubsPtr->tcl_SetObjResult) /* 235 */ +#endif +#ifndef Tcl_SetStdChannel +#define Tcl_SetStdChannel \ + (tclStubsPtr->tcl_SetStdChannel) /* 236 */ +#endif +#ifndef Tcl_SetVar +#define Tcl_SetVar \ + (tclStubsPtr->tcl_SetVar) /* 237 */ +#endif +#ifndef Tcl_SetVar2 +#define Tcl_SetVar2 \ + (tclStubsPtr->tcl_SetVar2) /* 238 */ +#endif +#ifndef Tcl_SignalId +#define Tcl_SignalId \ + (tclStubsPtr->tcl_SignalId) /* 239 */ +#endif +#ifndef Tcl_SignalMsg +#define Tcl_SignalMsg \ + (tclStubsPtr->tcl_SignalMsg) /* 240 */ +#endif +#ifndef Tcl_SourceRCFile +#define Tcl_SourceRCFile \ + (tclStubsPtr->tcl_SourceRCFile) /* 241 */ +#endif +#ifndef Tcl_SplitList +#define Tcl_SplitList \ + (tclStubsPtr->tcl_SplitList) /* 242 */ +#endif +#ifndef Tcl_SplitPath +#define Tcl_SplitPath \ + (tclStubsPtr->tcl_SplitPath) /* 243 */ +#endif +#ifndef Tcl_StaticPackage +#define Tcl_StaticPackage \ + (tclStubsPtr->tcl_StaticPackage) /* 244 */ +#endif +#ifndef Tcl_StringMatch +#define Tcl_StringMatch \ + (tclStubsPtr->tcl_StringMatch) /* 245 */ +#endif +#ifndef Tcl_TellOld +#define Tcl_TellOld \ + (tclStubsPtr->tcl_TellOld) /* 246 */ +#endif +#ifndef Tcl_TraceVar +#define Tcl_TraceVar \ + (tclStubsPtr->tcl_TraceVar) /* 247 */ +#endif +#ifndef Tcl_TraceVar2 +#define Tcl_TraceVar2 \ + (tclStubsPtr->tcl_TraceVar2) /* 248 */ +#endif +#ifndef Tcl_TranslateFileName +#define Tcl_TranslateFileName \ + (tclStubsPtr->tcl_TranslateFileName) /* 249 */ +#endif +#ifndef Tcl_Ungets +#define Tcl_Ungets \ + (tclStubsPtr->tcl_Ungets) /* 250 */ +#endif +#ifndef Tcl_UnlinkVar +#define Tcl_UnlinkVar \ + (tclStubsPtr->tcl_UnlinkVar) /* 251 */ +#endif +#ifndef Tcl_UnregisterChannel +#define Tcl_UnregisterChannel \ + (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ +#endif +#ifndef Tcl_UnsetVar +#define Tcl_UnsetVar \ + (tclStubsPtr->tcl_UnsetVar) /* 253 */ +#endif +#ifndef Tcl_UnsetVar2 +#define Tcl_UnsetVar2 \ + (tclStubsPtr->tcl_UnsetVar2) /* 254 */ +#endif +#ifndef Tcl_UntraceVar +#define Tcl_UntraceVar \ + (tclStubsPtr->tcl_UntraceVar) /* 255 */ +#endif +#ifndef Tcl_UntraceVar2 +#define Tcl_UntraceVar2 \ + (tclStubsPtr->tcl_UntraceVar2) /* 256 */ +#endif +#ifndef Tcl_UpdateLinkedVar +#define Tcl_UpdateLinkedVar \ + (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ +#endif +#ifndef Tcl_UpVar +#define Tcl_UpVar \ + (tclStubsPtr->tcl_UpVar) /* 258 */ +#endif +#ifndef Tcl_UpVar2 +#define Tcl_UpVar2 \ + (tclStubsPtr->tcl_UpVar2) /* 259 */ +#endif +#ifndef Tcl_VarEval +#define Tcl_VarEval \ + (tclStubsPtr->tcl_VarEval) /* 260 */ +#endif +#ifndef Tcl_VarTraceInfo +#define Tcl_VarTraceInfo \ + (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ +#endif +#ifndef Tcl_VarTraceInfo2 +#define Tcl_VarTraceInfo2 \ + (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ +#endif +#ifndef Tcl_Write +#define Tcl_Write \ + (tclStubsPtr->tcl_Write) /* 263 */ +#endif +#ifndef Tcl_WrongNumArgs +#define Tcl_WrongNumArgs \ + (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ +#endif +#ifndef Tcl_DumpActiveMemory +#define Tcl_DumpActiveMemory \ + (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ +#endif +#ifndef Tcl_ValidateAllMemory +#define Tcl_ValidateAllMemory \ + (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ +#endif +#ifndef Tcl_AppendResultVA +#define Tcl_AppendResultVA \ + (tclStubsPtr->tcl_AppendResultVA) /* 267 */ +#endif +#ifndef Tcl_AppendStringsToObjVA +#define Tcl_AppendStringsToObjVA \ + (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ +#endif +#ifndef Tcl_HashStats +#define Tcl_HashStats \ + (tclStubsPtr->tcl_HashStats) /* 269 */ +#endif +#ifndef Tcl_ParseVar +#define Tcl_ParseVar \ + (tclStubsPtr->tcl_ParseVar) /* 270 */ +#endif +#ifndef Tcl_PkgPresent +#define Tcl_PkgPresent \ + (tclStubsPtr->tcl_PkgPresent) /* 271 */ +#endif +#ifndef Tcl_PkgPresentEx +#define Tcl_PkgPresentEx \ + (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ +#endif +#ifndef Tcl_PkgProvide +#define Tcl_PkgProvide \ + (tclStubsPtr->tcl_PkgProvide) /* 273 */ +#endif +#ifndef Tcl_PkgRequire +#define Tcl_PkgRequire \ + (tclStubsPtr->tcl_PkgRequire) /* 274 */ +#endif +#ifndef Tcl_SetErrorCodeVA +#define Tcl_SetErrorCodeVA \ + (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ +#endif +#ifndef Tcl_VarEvalVA +#define Tcl_VarEvalVA \ + (tclStubsPtr->tcl_VarEvalVA) /* 276 */ +#endif +#ifndef Tcl_WaitPid +#define Tcl_WaitPid \ + (tclStubsPtr->tcl_WaitPid) /* 277 */ +#endif +#ifndef Tcl_PanicVA +#define Tcl_PanicVA \ + (tclStubsPtr->tcl_PanicVA) /* 278 */ +#endif +#ifndef Tcl_GetVersion +#define Tcl_GetVersion \ + (tclStubsPtr->tcl_GetVersion) /* 279 */ +#endif +#ifndef Tcl_InitMemory +#define Tcl_InitMemory \ + (tclStubsPtr->tcl_InitMemory) /* 280 */ +#endif +#ifndef Tcl_StackChannel +#define Tcl_StackChannel \ + (tclStubsPtr->tcl_StackChannel) /* 281 */ +#endif +#ifndef Tcl_UnstackChannel +#define Tcl_UnstackChannel \ + (tclStubsPtr->tcl_UnstackChannel) /* 282 */ +#endif +#ifndef Tcl_GetStackedChannel +#define Tcl_GetStackedChannel \ + (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ +#endif +#ifndef Tcl_SetMainLoop +#define Tcl_SetMainLoop \ + (tclStubsPtr->tcl_SetMainLoop) /* 284 */ +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj +#define Tcl_AppendObjToObj \ + (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ +#endif +#ifndef Tcl_CreateEncoding +#define Tcl_CreateEncoding \ + (tclStubsPtr->tcl_CreateEncoding) /* 287 */ +#endif +#ifndef Tcl_CreateThreadExitHandler +#define Tcl_CreateThreadExitHandler \ + (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ +#endif +#ifndef Tcl_DeleteThreadExitHandler +#define Tcl_DeleteThreadExitHandler \ + (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ +#endif +#ifndef Tcl_DiscardResult +#define Tcl_DiscardResult \ + (tclStubsPtr->tcl_DiscardResult) /* 290 */ +#endif +#ifndef Tcl_EvalEx +#define Tcl_EvalEx \ + (tclStubsPtr->tcl_EvalEx) /* 291 */ +#endif +#ifndef Tcl_EvalObjv +#define Tcl_EvalObjv \ + (tclStubsPtr->tcl_EvalObjv) /* 292 */ +#endif +#ifndef Tcl_EvalObjEx +#define Tcl_EvalObjEx \ + (tclStubsPtr->tcl_EvalObjEx) /* 293 */ +#endif +#ifndef Tcl_ExitThread +#define Tcl_ExitThread \ + (tclStubsPtr->tcl_ExitThread) /* 294 */ +#endif +#ifndef Tcl_ExternalToUtf +#define Tcl_ExternalToUtf \ + (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ +#endif +#ifndef Tcl_ExternalToUtfDString +#define Tcl_ExternalToUtfDString \ + (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ +#endif +#ifndef Tcl_FinalizeThread +#define Tcl_FinalizeThread \ + (tclStubsPtr->tcl_FinalizeThread) /* 297 */ +#endif +#ifndef Tcl_FinalizeNotifier +#define Tcl_FinalizeNotifier \ + (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ +#endif +#ifndef Tcl_FreeEncoding +#define Tcl_FreeEncoding \ + (tclStubsPtr->tcl_FreeEncoding) /* 299 */ +#endif +#ifndef Tcl_GetCurrentThread +#define Tcl_GetCurrentThread \ + (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ +#endif +#ifndef Tcl_GetEncoding +#define Tcl_GetEncoding \ + (tclStubsPtr->tcl_GetEncoding) /* 301 */ +#endif +#ifndef Tcl_GetEncodingName +#define Tcl_GetEncodingName \ + (tclStubsPtr->tcl_GetEncodingName) /* 302 */ +#endif +#ifndef Tcl_GetEncodingNames +#define Tcl_GetEncodingNames \ + (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ +#endif +#ifndef Tcl_GetIndexFromObjStruct +#define Tcl_GetIndexFromObjStruct \ + (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ +#endif +#ifndef Tcl_GetThreadData +#define Tcl_GetThreadData \ + (tclStubsPtr->tcl_GetThreadData) /* 305 */ +#endif +#ifndef Tcl_GetVar2Ex +#define Tcl_GetVar2Ex \ + (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ +#endif +#ifndef Tcl_InitNotifier +#define Tcl_InitNotifier \ + (tclStubsPtr->tcl_InitNotifier) /* 307 */ +#endif +#ifndef Tcl_MutexLock +#define Tcl_MutexLock \ + (tclStubsPtr->tcl_MutexLock) /* 308 */ +#endif +#ifndef Tcl_MutexUnlock +#define Tcl_MutexUnlock \ + (tclStubsPtr->tcl_MutexUnlock) /* 309 */ +#endif +#ifndef Tcl_ConditionNotify +#define Tcl_ConditionNotify \ + (tclStubsPtr->tcl_ConditionNotify) /* 310 */ +#endif +#ifndef Tcl_ConditionWait +#define Tcl_ConditionWait \ + (tclStubsPtr->tcl_ConditionWait) /* 311 */ +#endif +#ifndef Tcl_NumUtfChars +#define Tcl_NumUtfChars \ + (tclStubsPtr->tcl_NumUtfChars) /* 312 */ +#endif +#ifndef Tcl_ReadChars +#define Tcl_ReadChars \ + (tclStubsPtr->tcl_ReadChars) /* 313 */ +#endif +#ifndef Tcl_RestoreResult +#define Tcl_RestoreResult \ + (tclStubsPtr->tcl_RestoreResult) /* 314 */ +#endif +#ifndef Tcl_SaveResult +#define Tcl_SaveResult \ + (tclStubsPtr->tcl_SaveResult) /* 315 */ +#endif +#ifndef Tcl_SetSystemEncoding +#define Tcl_SetSystemEncoding \ + (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ +#endif +#ifndef Tcl_SetVar2Ex +#define Tcl_SetVar2Ex \ + (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ +#endif +#ifndef Tcl_ThreadAlert +#define Tcl_ThreadAlert \ + (tclStubsPtr->tcl_ThreadAlert) /* 318 */ +#endif +#ifndef Tcl_ThreadQueueEvent +#define Tcl_ThreadQueueEvent \ + (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ +#endif +#ifndef Tcl_UniCharAtIndex +#define Tcl_UniCharAtIndex \ + (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ +#endif +#ifndef Tcl_UniCharToLower +#define Tcl_UniCharToLower \ + (tclStubsPtr->tcl_UniCharToLower) /* 321 */ +#endif +#ifndef Tcl_UniCharToTitle +#define Tcl_UniCharToTitle \ + (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ +#endif +#ifndef Tcl_UniCharToUpper +#define Tcl_UniCharToUpper \ + (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ +#endif +#ifndef Tcl_UniCharToUtf +#define Tcl_UniCharToUtf \ + (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ +#endif +#ifndef Tcl_UtfAtIndex +#define Tcl_UtfAtIndex \ + (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ +#endif +#ifndef Tcl_UtfCharComplete +#define Tcl_UtfCharComplete \ + (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ +#endif +#ifndef Tcl_UtfBackslash +#define Tcl_UtfBackslash \ + (tclStubsPtr->tcl_UtfBackslash) /* 327 */ +#endif +#ifndef Tcl_UtfFindFirst +#define Tcl_UtfFindFirst \ + (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ +#endif +#ifndef Tcl_UtfFindLast +#define Tcl_UtfFindLast \ + (tclStubsPtr->tcl_UtfFindLast) /* 329 */ +#endif +#ifndef Tcl_UtfNext +#define Tcl_UtfNext \ + (tclStubsPtr->tcl_UtfNext) /* 330 */ +#endif +#ifndef Tcl_UtfPrev +#define Tcl_UtfPrev \ + (tclStubsPtr->tcl_UtfPrev) /* 331 */ +#endif +#ifndef Tcl_UtfToExternal +#define Tcl_UtfToExternal \ + (tclStubsPtr->tcl_UtfToExternal) /* 332 */ +#endif +#ifndef Tcl_UtfToExternalDString +#define Tcl_UtfToExternalDString \ + (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ +#endif +#ifndef Tcl_UtfToLower +#define Tcl_UtfToLower \ + (tclStubsPtr->tcl_UtfToLower) /* 334 */ +#endif +#ifndef Tcl_UtfToTitle +#define Tcl_UtfToTitle \ + (tclStubsPtr->tcl_UtfToTitle) /* 335 */ +#endif +#ifndef Tcl_UtfToUniChar +#define Tcl_UtfToUniChar \ + (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ +#endif +#ifndef Tcl_UtfToUpper +#define Tcl_UtfToUpper \ + (tclStubsPtr->tcl_UtfToUpper) /* 337 */ +#endif +#ifndef Tcl_WriteChars +#define Tcl_WriteChars \ + (tclStubsPtr->tcl_WriteChars) /* 338 */ +#endif +#ifndef Tcl_WriteObj +#define Tcl_WriteObj \ + (tclStubsPtr->tcl_WriteObj) /* 339 */ +#endif +#ifndef Tcl_GetString +#define Tcl_GetString \ + (tclStubsPtr->tcl_GetString) /* 340 */ +#endif +#ifndef Tcl_GetDefaultEncodingDir +#define Tcl_GetDefaultEncodingDir \ + (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ +#endif +#ifndef Tcl_SetDefaultEncodingDir +#define Tcl_SetDefaultEncodingDir \ + (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ +#endif +#ifndef Tcl_AlertNotifier +#define Tcl_AlertNotifier \ + (tclStubsPtr->tcl_AlertNotifier) /* 343 */ +#endif +#ifndef Tcl_ServiceModeHook +#define Tcl_ServiceModeHook \ + (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ +#endif +#ifndef Tcl_UniCharIsAlnum +#define Tcl_UniCharIsAlnum \ + (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ +#endif +#ifndef Tcl_UniCharIsAlpha +#define Tcl_UniCharIsAlpha \ + (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ +#endif +#ifndef Tcl_UniCharIsDigit +#define Tcl_UniCharIsDigit \ + (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ +#endif +#ifndef Tcl_UniCharIsLower +#define Tcl_UniCharIsLower \ + (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ +#endif +#ifndef Tcl_UniCharIsSpace +#define Tcl_UniCharIsSpace \ + (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ +#endif +#ifndef Tcl_UniCharIsUpper +#define Tcl_UniCharIsUpper \ + (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ +#endif +#ifndef Tcl_UniCharIsWordChar +#define Tcl_UniCharIsWordChar \ + (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ +#endif +#ifndef Tcl_UniCharLen +#define Tcl_UniCharLen \ + (tclStubsPtr->tcl_UniCharLen) /* 352 */ +#endif +#ifndef Tcl_UniCharNcmp +#define Tcl_UniCharNcmp \ + (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ +#endif +#ifndef Tcl_UniCharToUtfDString +#define Tcl_UniCharToUtfDString \ + (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ +#endif +#ifndef Tcl_UtfToUniCharDString +#define Tcl_UtfToUniCharDString \ + (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ +#endif +#ifndef Tcl_GetRegExpFromObj +#define Tcl_GetRegExpFromObj \ + (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ +#endif +#ifndef Tcl_EvalTokens +#define Tcl_EvalTokens \ + (tclStubsPtr->tcl_EvalTokens) /* 357 */ +#endif +#ifndef Tcl_FreeParse +#define Tcl_FreeParse \ + (tclStubsPtr->tcl_FreeParse) /* 358 */ +#endif +#ifndef Tcl_LogCommandInfo +#define Tcl_LogCommandInfo \ + (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ +#endif +#ifndef Tcl_ParseBraces +#define Tcl_ParseBraces \ + (tclStubsPtr->tcl_ParseBraces) /* 360 */ +#endif +#ifndef Tcl_ParseCommand +#define Tcl_ParseCommand \ + (tclStubsPtr->tcl_ParseCommand) /* 361 */ +#endif +#ifndef Tcl_ParseExpr +#define Tcl_ParseExpr \ + (tclStubsPtr->tcl_ParseExpr) /* 362 */ +#endif +#ifndef Tcl_ParseQuotedString +#define Tcl_ParseQuotedString \ + (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ +#endif +#ifndef Tcl_ParseVarName +#define Tcl_ParseVarName \ + (tclStubsPtr->tcl_ParseVarName) /* 364 */ +#endif +#ifndef Tcl_GetCwd +#define Tcl_GetCwd \ + (tclStubsPtr->tcl_GetCwd) /* 365 */ +#endif +#ifndef Tcl_Chdir +#define Tcl_Chdir \ + (tclStubsPtr->tcl_Chdir) /* 366 */ +#endif +#ifndef Tcl_Access +#define Tcl_Access \ + (tclStubsPtr->tcl_Access) /* 367 */ +#endif +#ifndef Tcl_Stat +#define Tcl_Stat \ + (tclStubsPtr->tcl_Stat) /* 368 */ +#endif +#ifndef Tcl_UtfNcmp +#define Tcl_UtfNcmp \ + (tclStubsPtr->tcl_UtfNcmp) /* 369 */ +#endif +#ifndef Tcl_UtfNcasecmp +#define Tcl_UtfNcasecmp \ + (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ +#endif +#ifndef Tcl_StringCaseMatch +#define Tcl_StringCaseMatch \ + (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ +#endif +#ifndef Tcl_UniCharIsControl +#define Tcl_UniCharIsControl \ + (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ +#endif +#ifndef Tcl_UniCharIsGraph +#define Tcl_UniCharIsGraph \ + (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ +#endif +#ifndef Tcl_UniCharIsPrint +#define Tcl_UniCharIsPrint \ + (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ +#endif +#ifndef Tcl_UniCharIsPunct +#define Tcl_UniCharIsPunct \ + (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ +#endif +#ifndef Tcl_RegExpExecObj +#define Tcl_RegExpExecObj \ + (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ +#endif +#ifndef Tcl_RegExpGetInfo +#define Tcl_RegExpGetInfo \ + (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ +#endif +#ifndef Tcl_NewUnicodeObj +#define Tcl_NewUnicodeObj \ + (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ +#endif +#ifndef Tcl_SetUnicodeObj +#define Tcl_SetUnicodeObj \ + (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ +#endif +#ifndef Tcl_GetCharLength +#define Tcl_GetCharLength \ + (tclStubsPtr->tcl_GetCharLength) /* 380 */ +#endif +#ifndef Tcl_GetUniChar +#define Tcl_GetUniChar \ + (tclStubsPtr->tcl_GetUniChar) /* 381 */ +#endif +#ifndef Tcl_GetUnicode +#define Tcl_GetUnicode \ + (tclStubsPtr->tcl_GetUnicode) /* 382 */ +#endif +#ifndef Tcl_GetRange +#define Tcl_GetRange \ + (tclStubsPtr->tcl_GetRange) /* 383 */ +#endif +#ifndef Tcl_AppendUnicodeToObj +#define Tcl_AppendUnicodeToObj \ + (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ +#endif +#ifndef Tcl_RegExpMatchObj +#define Tcl_RegExpMatchObj \ + (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ +#endif +#ifndef Tcl_SetNotifier +#define Tcl_SetNotifier \ + (tclStubsPtr->tcl_SetNotifier) /* 386 */ +#endif +#ifndef Tcl_GetAllocMutex +#define Tcl_GetAllocMutex \ + (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ +#endif +#ifndef Tcl_GetChannelNames +#define Tcl_GetChannelNames \ + (tclStubsPtr->tcl_GetChannelNames) /* 388 */ +#endif +#ifndef Tcl_GetChannelNamesEx +#define Tcl_GetChannelNamesEx \ + (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ +#endif +#ifndef Tcl_ProcObjCmd +#define Tcl_ProcObjCmd \ + (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ +#endif +#ifndef Tcl_ConditionFinalize +#define Tcl_ConditionFinalize \ + (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ +#endif +#ifndef Tcl_MutexFinalize +#define Tcl_MutexFinalize \ + (tclStubsPtr->tcl_MutexFinalize) /* 392 */ +#endif +#ifndef Tcl_CreateThread +#define Tcl_CreateThread \ + (tclStubsPtr->tcl_CreateThread) /* 393 */ +#endif +#ifndef Tcl_ReadRaw +#define Tcl_ReadRaw \ + (tclStubsPtr->tcl_ReadRaw) /* 394 */ +#endif +#ifndef Tcl_WriteRaw +#define Tcl_WriteRaw \ + (tclStubsPtr->tcl_WriteRaw) /* 395 */ +#endif +#ifndef Tcl_GetTopChannel +#define Tcl_GetTopChannel \ + (tclStubsPtr->tcl_GetTopChannel) /* 396 */ +#endif +#ifndef Tcl_ChannelBuffered +#define Tcl_ChannelBuffered \ + (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ +#endif +#ifndef Tcl_ChannelName +#define Tcl_ChannelName \ + (tclStubsPtr->tcl_ChannelName) /* 398 */ +#endif +#ifndef Tcl_ChannelVersion +#define Tcl_ChannelVersion \ + (tclStubsPtr->tcl_ChannelVersion) /* 399 */ +#endif +#ifndef Tcl_ChannelBlockModeProc +#define Tcl_ChannelBlockModeProc \ + (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ +#endif +#ifndef Tcl_ChannelCloseProc +#define Tcl_ChannelCloseProc \ + (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ +#endif +#ifndef Tcl_ChannelClose2Proc +#define Tcl_ChannelClose2Proc \ + (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ +#endif +#ifndef Tcl_ChannelInputProc +#define Tcl_ChannelInputProc \ + (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ +#endif +#ifndef Tcl_ChannelOutputProc +#define Tcl_ChannelOutputProc \ + (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ +#endif +#ifndef Tcl_ChannelSeekProc +#define Tcl_ChannelSeekProc \ + (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ +#endif +#ifndef Tcl_ChannelSetOptionProc +#define Tcl_ChannelSetOptionProc \ + (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ +#endif +#ifndef Tcl_ChannelGetOptionProc +#define Tcl_ChannelGetOptionProc \ + (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ +#endif +#ifndef Tcl_ChannelWatchProc +#define Tcl_ChannelWatchProc \ + (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ +#endif +#ifndef Tcl_ChannelGetHandleProc +#define Tcl_ChannelGetHandleProc \ + (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ +#endif +#ifndef Tcl_ChannelFlushProc +#define Tcl_ChannelFlushProc \ + (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ +#endif +#ifndef Tcl_ChannelHandlerProc +#define Tcl_ChannelHandlerProc \ + (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ +#endif +#ifndef Tcl_JoinThread +#define Tcl_JoinThread \ + (tclStubsPtr->tcl_JoinThread) /* 412 */ +#endif +#ifndef Tcl_IsChannelShared +#define Tcl_IsChannelShared \ + (tclStubsPtr->tcl_IsChannelShared) /* 413 */ +#endif +#ifndef Tcl_IsChannelRegistered +#define Tcl_IsChannelRegistered \ + (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ +#endif +#ifndef Tcl_CutChannel +#define Tcl_CutChannel \ + (tclStubsPtr->tcl_CutChannel) /* 415 */ +#endif +#ifndef Tcl_SpliceChannel +#define Tcl_SpliceChannel \ + (tclStubsPtr->tcl_SpliceChannel) /* 416 */ +#endif +#ifndef Tcl_ClearChannelHandlers +#define Tcl_ClearChannelHandlers \ + (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ +#endif +#ifndef Tcl_IsChannelExisting +#define Tcl_IsChannelExisting \ + (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ +#endif +#ifndef Tcl_UniCharNcasecmp +#define Tcl_UniCharNcasecmp \ + (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ +#endif +#ifndef Tcl_UniCharCaseMatch +#define Tcl_UniCharCaseMatch \ + (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ +#endif +#ifndef Tcl_FindHashEntry +#define Tcl_FindHashEntry \ + (tclStubsPtr->tcl_FindHashEntry) /* 421 */ +#endif +#ifndef Tcl_CreateHashEntry +#define Tcl_CreateHashEntry \ + (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ +#endif +#ifndef Tcl_InitCustomHashTable +#define Tcl_InitCustomHashTable \ + (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ +#endif +#ifndef Tcl_InitObjHashTable +#define Tcl_InitObjHashTable \ + (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ +#endif +#ifndef Tcl_CommandTraceInfo +#define Tcl_CommandTraceInfo \ + (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ +#endif +#ifndef Tcl_TraceCommand +#define Tcl_TraceCommand \ + (tclStubsPtr->tcl_TraceCommand) /* 426 */ +#endif +#ifndef Tcl_UntraceCommand +#define Tcl_UntraceCommand \ + (tclStubsPtr->tcl_UntraceCommand) /* 427 */ +#endif +#ifndef Tcl_AttemptAlloc +#define Tcl_AttemptAlloc \ + (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ +#endif +#ifndef Tcl_AttemptDbCkalloc +#define Tcl_AttemptDbCkalloc \ + (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ +#endif +#ifndef Tcl_AttemptRealloc +#define Tcl_AttemptRealloc \ + (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ +#endif +#ifndef Tcl_AttemptDbCkrealloc +#define Tcl_AttemptDbCkrealloc \ + (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ +#endif +#ifndef Tcl_AttemptSetObjLength +#define Tcl_AttemptSetObjLength \ + (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ +#endif +#ifndef Tcl_GetChannelThread +#define Tcl_GetChannelThread \ + (tclStubsPtr->tcl_GetChannelThread) /* 433 */ +#endif +#ifndef Tcl_GetUnicodeFromObj +#define Tcl_GetUnicodeFromObj \ + (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ +#endif +#ifndef Tcl_GetMathFuncInfo +#define Tcl_GetMathFuncInfo \ + (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ +#endif +#ifndef Tcl_ListMathFuncs +#define Tcl_ListMathFuncs \ + (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ +#endif +#ifndef Tcl_SubstObj +#define Tcl_SubstObj \ + (tclStubsPtr->tcl_SubstObj) /* 437 */ +#endif +#ifndef Tcl_DetachChannel +#define Tcl_DetachChannel \ + (tclStubsPtr->tcl_DetachChannel) /* 438 */ +#endif +#ifndef Tcl_IsStandardChannel +#define Tcl_IsStandardChannel \ + (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ +#endif +#ifndef Tcl_FSCopyFile +#define Tcl_FSCopyFile \ + (tclStubsPtr->tcl_FSCopyFile) /* 440 */ +#endif +#ifndef Tcl_FSCopyDirectory +#define Tcl_FSCopyDirectory \ + (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ +#endif +#ifndef Tcl_FSCreateDirectory +#define Tcl_FSCreateDirectory \ + (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ +#endif +#ifndef Tcl_FSDeleteFile +#define Tcl_FSDeleteFile \ + (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ +#endif +#ifndef Tcl_FSLoadFile +#define Tcl_FSLoadFile \ + (tclStubsPtr->tcl_FSLoadFile) /* 444 */ +#endif +#ifndef Tcl_FSMatchInDirectory +#define Tcl_FSMatchInDirectory \ + (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ +#endif +#ifndef Tcl_FSLink +#define Tcl_FSLink \ + (tclStubsPtr->tcl_FSLink) /* 446 */ +#endif +#ifndef Tcl_FSRemoveDirectory +#define Tcl_FSRemoveDirectory \ + (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ +#endif +#ifndef Tcl_FSRenameFile +#define Tcl_FSRenameFile \ + (tclStubsPtr->tcl_FSRenameFile) /* 448 */ +#endif +#ifndef Tcl_FSLstat +#define Tcl_FSLstat \ + (tclStubsPtr->tcl_FSLstat) /* 449 */ +#endif +#ifndef Tcl_FSUtime +#define Tcl_FSUtime \ + (tclStubsPtr->tcl_FSUtime) /* 450 */ +#endif +#ifndef Tcl_FSFileAttrsGet +#define Tcl_FSFileAttrsGet \ + (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ +#endif +#ifndef Tcl_FSFileAttrsSet +#define Tcl_FSFileAttrsSet \ + (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ +#endif +#ifndef Tcl_FSFileAttrStrings +#define Tcl_FSFileAttrStrings \ + (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ +#endif +#ifndef Tcl_FSStat +#define Tcl_FSStat \ + (tclStubsPtr->tcl_FSStat) /* 454 */ +#endif +#ifndef Tcl_FSAccess +#define Tcl_FSAccess \ + (tclStubsPtr->tcl_FSAccess) /* 455 */ +#endif +#ifndef Tcl_FSOpenFileChannel +#define Tcl_FSOpenFileChannel \ + (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ +#endif +#ifndef Tcl_FSGetCwd +#define Tcl_FSGetCwd \ + (tclStubsPtr->tcl_FSGetCwd) /* 457 */ +#endif +#ifndef Tcl_FSChdir +#define Tcl_FSChdir \ + (tclStubsPtr->tcl_FSChdir) /* 458 */ +#endif +#ifndef Tcl_FSConvertToPathType +#define Tcl_FSConvertToPathType \ + (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ +#endif +#ifndef Tcl_FSJoinPath +#define Tcl_FSJoinPath \ + (tclStubsPtr->tcl_FSJoinPath) /* 460 */ +#endif +#ifndef Tcl_FSSplitPath +#define Tcl_FSSplitPath \ + (tclStubsPtr->tcl_FSSplitPath) /* 461 */ +#endif +#ifndef Tcl_FSEqualPaths +#define Tcl_FSEqualPaths \ + (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ +#endif +#ifndef Tcl_FSGetNormalizedPath +#define Tcl_FSGetNormalizedPath \ + (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ +#endif +#ifndef Tcl_FSJoinToPath +#define Tcl_FSJoinToPath \ + (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ +#endif +#ifndef Tcl_FSGetInternalRep +#define Tcl_FSGetInternalRep \ + (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ +#endif +#ifndef Tcl_FSGetTranslatedPath +#define Tcl_FSGetTranslatedPath \ + (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ +#endif +#ifndef Tcl_FSEvalFile +#define Tcl_FSEvalFile \ + (tclStubsPtr->tcl_FSEvalFile) /* 467 */ +#endif +#ifndef Tcl_FSNewNativePath +#define Tcl_FSNewNativePath \ + (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ +#endif +#ifndef Tcl_FSGetNativePath +#define Tcl_FSGetNativePath \ + (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ +#endif +#ifndef Tcl_FSFileSystemInfo +#define Tcl_FSFileSystemInfo \ + (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ +#endif +#ifndef Tcl_FSPathSeparator +#define Tcl_FSPathSeparator \ + (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ +#endif +#ifndef Tcl_FSListVolumes +#define Tcl_FSListVolumes \ + (tclStubsPtr->tcl_FSListVolumes) /* 472 */ +#endif +#ifndef Tcl_FSRegister +#define Tcl_FSRegister \ + (tclStubsPtr->tcl_FSRegister) /* 473 */ +#endif +#ifndef Tcl_FSUnregister +#define Tcl_FSUnregister \ + (tclStubsPtr->tcl_FSUnregister) /* 474 */ +#endif +#ifndef Tcl_FSData +#define Tcl_FSData \ + (tclStubsPtr->tcl_FSData) /* 475 */ +#endif +#ifndef Tcl_FSGetTranslatedStringPath +#define Tcl_FSGetTranslatedStringPath \ + (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ +#endif +#ifndef Tcl_FSGetFileSystemForPath +#define Tcl_FSGetFileSystemForPath \ + (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ +#endif +#ifndef Tcl_FSGetPathType +#define Tcl_FSGetPathType \ + (tclStubsPtr->tcl_FSGetPathType) /* 478 */ +#endif +#ifndef Tcl_OutputBuffered +#define Tcl_OutputBuffered \ + (tclStubsPtr->tcl_OutputBuffered) /* 479 */ +#endif +#ifndef Tcl_FSMountsChanged +#define Tcl_FSMountsChanged \ + (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ +#endif +#ifndef Tcl_EvalTokensStandard +#define Tcl_EvalTokensStandard \ + (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ +#endif +#ifndef Tcl_GetTime +#define Tcl_GetTime \ + (tclStubsPtr->tcl_GetTime) /* 482 */ +#endif +#ifndef Tcl_CreateObjTrace +#define Tcl_CreateObjTrace \ + (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ +#endif +#ifndef Tcl_GetCommandInfoFromToken +#define Tcl_GetCommandInfoFromToken \ + (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ +#endif +#ifndef Tcl_SetCommandInfoFromToken +#define Tcl_SetCommandInfoFromToken \ + (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ +#endif +#ifndef Tcl_DbNewWideIntObj +#define Tcl_DbNewWideIntObj \ + (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ +#endif +#ifndef Tcl_GetWideIntFromObj +#define Tcl_GetWideIntFromObj \ + (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ +#endif +#ifndef Tcl_NewWideIntObj +#define Tcl_NewWideIntObj \ + (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ +#endif +#ifndef Tcl_SetWideIntObj +#define Tcl_SetWideIntObj \ + (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ +#endif +#ifndef Tcl_AllocStatBuf +#define Tcl_AllocStatBuf \ + (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ +#endif +#ifndef Tcl_Seek +#define Tcl_Seek \ + (tclStubsPtr->tcl_Seek) /* 491 */ +#endif +#ifndef Tcl_Tell +#define Tcl_Tell \ + (tclStubsPtr->tcl_Tell) /* 492 */ +#endif +#ifndef Tcl_ChannelWideSeekProc +#define Tcl_ChannelWideSeekProc \ + (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ +#endif +#ifndef Tcl_DictObjPut +#define Tcl_DictObjPut \ + (tclStubsPtr->tcl_DictObjPut) /* 494 */ +#endif +#ifndef Tcl_DictObjGet +#define Tcl_DictObjGet \ + (tclStubsPtr->tcl_DictObjGet) /* 495 */ +#endif +#ifndef Tcl_DictObjRemove +#define Tcl_DictObjRemove \ + (tclStubsPtr->tcl_DictObjRemove) /* 496 */ +#endif +#ifndef Tcl_DictObjSize +#define Tcl_DictObjSize \ + (tclStubsPtr->tcl_DictObjSize) /* 497 */ +#endif +#ifndef Tcl_DictObjFirst +#define Tcl_DictObjFirst \ + (tclStubsPtr->tcl_DictObjFirst) /* 498 */ +#endif +#ifndef Tcl_DictObjNext +#define Tcl_DictObjNext \ + (tclStubsPtr->tcl_DictObjNext) /* 499 */ +#endif +#ifndef Tcl_DictObjDone +#define Tcl_DictObjDone \ + (tclStubsPtr->tcl_DictObjDone) /* 500 */ +#endif +#ifndef Tcl_DictObjPutKeyList +#define Tcl_DictObjPutKeyList \ + (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ +#endif +#ifndef Tcl_DictObjRemoveKeyList +#define Tcl_DictObjRemoveKeyList \ + (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ +#endif +#ifndef Tcl_NewDictObj +#define Tcl_NewDictObj \ + (tclStubsPtr->tcl_NewDictObj) /* 503 */ +#endif +#ifndef Tcl_DbNewDictObj +#define Tcl_DbNewDictObj \ + (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ +#endif +#ifndef Tcl_RegisterConfig +#define Tcl_RegisterConfig \ + (tclStubsPtr->tcl_RegisterConfig) /* 505 */ +#endif +#ifndef Tcl_CreateNamespace +#define Tcl_CreateNamespace \ + (tclStubsPtr->tcl_CreateNamespace) /* 506 */ +#endif +#ifndef Tcl_DeleteNamespace +#define Tcl_DeleteNamespace \ + (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ +#endif +#ifndef Tcl_AppendExportList +#define Tcl_AppendExportList \ + (tclStubsPtr->tcl_AppendExportList) /* 508 */ +#endif +#ifndef Tcl_Export +#define Tcl_Export \ + (tclStubsPtr->tcl_Export) /* 509 */ +#endif +#ifndef Tcl_Import +#define Tcl_Import \ + (tclStubsPtr->tcl_Import) /* 510 */ +#endif +#ifndef Tcl_ForgetImport +#define Tcl_ForgetImport \ + (tclStubsPtr->tcl_ForgetImport) /* 511 */ +#endif +#ifndef Tcl_GetCurrentNamespace +#define Tcl_GetCurrentNamespace \ + (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ +#endif +#ifndef Tcl_GetGlobalNamespace +#define Tcl_GetGlobalNamespace \ + (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ +#endif +#ifndef Tcl_FindNamespace +#define Tcl_FindNamespace \ + (tclStubsPtr->tcl_FindNamespace) /* 514 */ +#endif +#ifndef Tcl_FindCommand +#define Tcl_FindCommand \ + (tclStubsPtr->tcl_FindCommand) /* 515 */ +#endif +#ifndef Tcl_GetCommandFromObj +#define Tcl_GetCommandFromObj \ + (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ +#endif +#ifndef Tcl_GetCommandFullName +#define Tcl_GetCommandFullName \ + (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ +#endif +#ifndef Tcl_FSEvalFileEx +#define Tcl_FSEvalFileEx \ + (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ +#endif +#ifndef Tcl_SetExitProc +#define Tcl_SetExitProc \ + (tclStubsPtr->tcl_SetExitProc) /* 519 */ +#endif +#ifndef Tcl_LimitAddHandler +#define Tcl_LimitAddHandler \ + (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ +#endif +#ifndef Tcl_LimitRemoveHandler +#define Tcl_LimitRemoveHandler \ + (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ +#endif +#ifndef Tcl_LimitReady +#define Tcl_LimitReady \ + (tclStubsPtr->tcl_LimitReady) /* 522 */ +#endif +#ifndef Tcl_LimitCheck +#define Tcl_LimitCheck \ + (tclStubsPtr->tcl_LimitCheck) /* 523 */ +#endif +#ifndef Tcl_LimitExceeded +#define Tcl_LimitExceeded \ + (tclStubsPtr->tcl_LimitExceeded) /* 524 */ +#endif +#ifndef Tcl_LimitSetCommands +#define Tcl_LimitSetCommands \ + (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ +#endif +#ifndef Tcl_LimitSetTime +#define Tcl_LimitSetTime \ + (tclStubsPtr->tcl_LimitSetTime) /* 526 */ +#endif +#ifndef Tcl_LimitSetGranularity +#define Tcl_LimitSetGranularity \ + (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ +#endif +#ifndef Tcl_LimitTypeEnabled +#define Tcl_LimitTypeEnabled \ + (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ +#endif +#ifndef Tcl_LimitTypeExceeded +#define Tcl_LimitTypeExceeded \ + (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ +#endif +#ifndef Tcl_LimitTypeSet +#define Tcl_LimitTypeSet \ + (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ +#endif +#ifndef Tcl_LimitTypeReset +#define Tcl_LimitTypeReset \ + (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ +#endif +#ifndef Tcl_LimitGetCommands +#define Tcl_LimitGetCommands \ + (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ +#endif +#ifndef Tcl_LimitGetTime +#define Tcl_LimitGetTime \ + (tclStubsPtr->tcl_LimitGetTime) /* 533 */ +#endif +#ifndef Tcl_LimitGetGranularity +#define Tcl_LimitGetGranularity \ + (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ +#endif +#ifndef Tcl_SaveInterpState +#define Tcl_SaveInterpState \ + (tclStubsPtr->tcl_SaveInterpState) /* 535 */ +#endif +#ifndef Tcl_RestoreInterpState +#define Tcl_RestoreInterpState \ + (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ +#endif +#ifndef Tcl_DiscardInterpState +#define Tcl_DiscardInterpState \ + (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ +#endif +#ifndef Tcl_SetReturnOptions +#define Tcl_SetReturnOptions \ + (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ +#endif +#ifndef Tcl_GetReturnOptions +#define Tcl_GetReturnOptions \ + (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ +#endif +#ifndef Tcl_IsEnsemble +#define Tcl_IsEnsemble \ + (tclStubsPtr->tcl_IsEnsemble) /* 540 */ +#endif +#ifndef Tcl_CreateEnsemble +#define Tcl_CreateEnsemble \ + (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ +#endif +#ifndef Tcl_FindEnsemble +#define Tcl_FindEnsemble \ + (tclStubsPtr->tcl_FindEnsemble) /* 542 */ +#endif +#ifndef Tcl_SetEnsembleSubcommandList +#define Tcl_SetEnsembleSubcommandList \ + (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ +#endif +#ifndef Tcl_SetEnsembleMappingDict +#define Tcl_SetEnsembleMappingDict \ + (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ +#endif +#ifndef Tcl_SetEnsembleUnknownHandler +#define Tcl_SetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ +#endif +#ifndef Tcl_SetEnsembleFlags +#define Tcl_SetEnsembleFlags \ + (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ +#endif +#ifndef Tcl_GetEnsembleSubcommandList +#define Tcl_GetEnsembleSubcommandList \ + (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ +#endif +#ifndef Tcl_GetEnsembleMappingDict +#define Tcl_GetEnsembleMappingDict \ + (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ +#endif +#ifndef Tcl_GetEnsembleUnknownHandler +#define Tcl_GetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ +#endif +#ifndef Tcl_GetEnsembleFlags +#define Tcl_GetEnsembleFlags \ + (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ +#endif +#ifndef Tcl_GetEnsembleNamespace +#define Tcl_GetEnsembleNamespace \ + (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ +#endif +#ifndef Tcl_SetTimeProc +#define Tcl_SetTimeProc \ + (tclStubsPtr->tcl_SetTimeProc) /* 552 */ +#endif +#ifndef Tcl_QueryTimeProc +#define Tcl_QueryTimeProc \ + (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ +#endif +#ifndef Tcl_ChannelThreadActionProc +#define Tcl_ChannelThreadActionProc \ + (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ +#endif +#ifndef Tcl_NewBignumObj +#define Tcl_NewBignumObj \ + (tclStubsPtr->tcl_NewBignumObj) /* 555 */ +#endif +#ifndef Tcl_DbNewBignumObj +#define Tcl_DbNewBignumObj \ + (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ +#endif +#ifndef Tcl_SetBignumObj +#define Tcl_SetBignumObj \ + (tclStubsPtr->tcl_SetBignumObj) /* 557 */ +#endif +#ifndef Tcl_GetBignumFromObj +#define Tcl_GetBignumFromObj \ + (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ +#endif +#ifndef Tcl_TakeBignumFromObj +#define Tcl_TakeBignumFromObj \ + (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ +#endif +#ifndef Tcl_TruncateChannel +#define Tcl_TruncateChannel \ + (tclStubsPtr->tcl_TruncateChannel) /* 560 */ +#endif +#ifndef Tcl_ChannelTruncateProc +#define Tcl_ChannelTruncateProc \ + (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ +#endif +#ifndef Tcl_SetChannelErrorInterp +#define Tcl_SetChannelErrorInterp \ + (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ +#endif +#ifndef Tcl_GetChannelErrorInterp +#define Tcl_GetChannelErrorInterp \ + (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ +#endif +#ifndef Tcl_SetChannelError +#define Tcl_SetChannelError \ + (tclStubsPtr->tcl_SetChannelError) /* 564 */ +#endif +#ifndef Tcl_GetChannelError +#define Tcl_GetChannelError \ + (tclStubsPtr->tcl_GetChannelError) /* 565 */ +#endif +#ifndef Tcl_InitBignumFromDouble +#define Tcl_InitBignumFromDouble \ + (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ +#endif +#ifndef Tcl_GetNamespaceUnknownHandler +#define Tcl_GetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ +#endif +#ifndef Tcl_SetNamespaceUnknownHandler +#define Tcl_SetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ +#endif +#ifndef Tcl_GetEncodingFromObj +#define Tcl_GetEncodingFromObj \ + (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ +#endif +#ifndef Tcl_GetEncodingSearchPath +#define Tcl_GetEncodingSearchPath \ + (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ +#endif +#ifndef Tcl_SetEncodingSearchPath +#define Tcl_SetEncodingSearchPath \ + (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment +#define Tcl_GetEncodingNameFromEnvironment \ + (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ +#endif +#ifndef Tcl_PkgRequireProc +#define Tcl_PkgRequireProc \ + (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ +#endif +#ifndef Tcl_AppendObjToErrorInfo +#define Tcl_AppendObjToErrorInfo \ + (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ +#endif +#ifndef Tcl_AppendLimitedToObj +#define Tcl_AppendLimitedToObj \ + (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ +#endif +#ifndef Tcl_Format +#define Tcl_Format \ + (tclStubsPtr->tcl_Format) /* 576 */ +#endif +#ifndef Tcl_AppendFormatToObj +#define Tcl_AppendFormatToObj \ + (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ +#endif +#ifndef Tcl_ObjPrintf +#define Tcl_ObjPrintf \ + (tclStubsPtr->tcl_ObjPrintf) /* 578 */ +#endif +#ifndef Tcl_AppendPrintfToObj +#define Tcl_AppendPrintfToObj \ + (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ +#endif +#ifndef Tcl_CancelEval +#define Tcl_CancelEval \ + (tclStubsPtr->tcl_CancelEval) /* 580 */ +#endif +#ifndef Tcl_Canceled +#define Tcl_Canceled \ + (tclStubsPtr->tcl_Canceled) /* 581 */ +#endif +#ifndef Tcl_NRCreateCommand +#define Tcl_NRCreateCommand \ + (tclStubsPtr->tcl_NRCreateCommand) /* 582 */ +#endif +#ifndef Tcl_NREvalObj +#define Tcl_NREvalObj \ + (tclStubsPtr->tcl_NREvalObj) /* 583 */ +#endif +#ifndef Tcl_NREvalObjv +#define Tcl_NREvalObjv \ + (tclStubsPtr->tcl_NREvalObjv) /* 584 */ +#endif +#ifndef Tcl_NRCmdSwap +#define Tcl_NRCmdSwap \ + (tclStubsPtr->tcl_NRCmdSwap) /* 585 */ +#endif +#ifndef Tcl_NRAddCallback +#define Tcl_NRAddCallback \ + (tclStubsPtr->tcl_NRAddCallback) /* 586 */ +#endif +#ifndef Tcl_NRCallObjProc +#define Tcl_NRCallObjProc \ + (tclStubsPtr->tcl_NRCallObjProc) /* 587 */ +#endif +#ifndef Tcl_CreatePipe +#define Tcl_CreatePipe \ + (tclStubsPtr->tcl_CreatePipe) /* 588 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLDECLS */ + diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 6549e98..b24b856 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.55 2008/07/13 23:15:22 nijtmans Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.56 2008/07/21 21:02:17 ferrieux Exp $ */ #include "tclInt.h" @@ -1799,6 +1799,54 @@ ChanTruncateObjCmd( return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * ChanPipeObjCmd -- + * + * This function is invoked to process the "chan pipe" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * Creates a pair of Tcl channels wrapping both ends of a new + * anonymous pipe. + * + *---------------------------------------------------------------------- + */ + +static int +ChanPipeObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Channel rchan,wchan; + const char *channelNames [2]; + Tcl_Obj *resultPtr; + + if (objc != 1) { + Tcl_WrongNumArgs(interp, 1, objv, ""); + return TCL_ERROR; + } + + if (Tcl_CreatePipe (interp, &rchan, &wchan, 0) != TCL_OK) { + return TCL_ERROR; + } + + channelNames [0] = Tcl_GetChannelName (rchan); + channelNames [1] = Tcl_GetChannelName (wchan); + + resultPtr = Tcl_NewObj(); + Tcl_ListObjAppendElement(NULL, resultPtr, Tcl_NewStringObj(channelNames[0],-1)); + Tcl_ListObjAppendElement(NULL, resultPtr, Tcl_NewStringObj(channelNames[1],-1)); + Tcl_SetObjResult(interp, resultPtr); + + return TCL_OK; +} /* *---------------------------------------------------------------------- @@ -1844,6 +1892,7 @@ TclInitChanCmd( {"puts", Tcl_PutsObjCmd}, {"read", Tcl_ReadObjCmd}, {"seek", Tcl_SeekObjCmd}, + {"pipe", ChanPipeObjCmd}, /* TIP #304 */ {"tell", Tcl_TellObjCmd}, {"truncate", ChanTruncateObjCmd}, /* TIP #208 */ {NULL} diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 6dc36c0..856da1d 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -1,2161 +1,2161 @@ -/* - * tclIntDecls.h -- - * - * This file contains the declarations for all unsupported - * functions that are exported by the Tcl library. These - * interfaces are not guaranteed to remain the same between - * versions. Use at your own risk. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclIntDecls.h,v 1.118 2008/07/13 09:03:35 msofer Exp $ - */ - -#ifndef _TCLINTDECLS -#define _TCLINTDECLS - -#include "tclPort.h" - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclInt.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -/* Slot 0 is reserved */ -/* Slot 1 is reserved */ -/* Slot 2 is reserved */ -#ifndef TclAllocateFreeObjects_TCL_DECLARED -#define TclAllocateFreeObjects_TCL_DECLARED -/* 3 */ -EXTERN void TclAllocateFreeObjects (void); -#endif -/* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* MACOSX */ -#ifndef TclCleanupCommand_TCL_DECLARED -#define TclCleanupCommand_TCL_DECLARED -/* 6 */ -EXTERN void TclCleanupCommand (Command * cmdPtr); -#endif -#ifndef TclCopyAndCollapse_TCL_DECLARED -#define TclCopyAndCollapse_TCL_DECLARED -/* 7 */ -EXTERN int TclCopyAndCollapse (int count, CONST char * src, - char * dst); -#endif -#ifndef TclCopyChannel_TCL_DECLARED -#define TclCopyChannel_TCL_DECLARED -/* 8 */ -EXTERN int TclCopyChannel (Tcl_Interp * interp, - Tcl_Channel inChan, Tcl_Channel outChan, - int toRead, Tcl_Obj * cmdPtr); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* MACOSX */ -#ifndef TclCreateProc_TCL_DECLARED -#define TclCreateProc_TCL_DECLARED -/* 10 */ -EXTERN int TclCreateProc (Tcl_Interp * interp, - Namespace * nsPtr, CONST char * procName, - Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, - Proc ** procPtrPtr); -#endif -#ifndef TclDeleteCompiledLocalVars_TCL_DECLARED -#define TclDeleteCompiledLocalVars_TCL_DECLARED -/* 11 */ -EXTERN void TclDeleteCompiledLocalVars (Interp * iPtr, - CallFrame * framePtr); -#endif -#ifndef TclDeleteVars_TCL_DECLARED -#define TclDeleteVars_TCL_DECLARED -/* 12 */ -EXTERN void TclDeleteVars (Interp * iPtr, - TclVarHashTable * tablePtr); -#endif -/* Slot 13 is reserved */ -#ifndef TclDumpMemoryInfo_TCL_DECLARED -#define TclDumpMemoryInfo_TCL_DECLARED -/* 14 */ -EXTERN void TclDumpMemoryInfo (FILE * outFile); -#endif -/* Slot 15 is reserved */ -#ifndef TclExprFloatError_TCL_DECLARED -#define TclExprFloatError_TCL_DECLARED -/* 16 */ -EXTERN void TclExprFloatError (Tcl_Interp * interp, double value); -#endif -/* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ -/* Slot 21 is reserved */ -#ifndef TclFindElement_TCL_DECLARED -#define TclFindElement_TCL_DECLARED -/* 22 */ -EXTERN int TclFindElement (Tcl_Interp * interp, - CONST char * listStr, int listLength, - CONST char ** elementPtr, - CONST char ** nextPtr, int * sizePtr, - int * bracePtr); -#endif -#ifndef TclFindProc_TCL_DECLARED -#define TclFindProc_TCL_DECLARED -/* 23 */ -EXTERN Proc * TclFindProc (Interp * iPtr, CONST char * procName); -#endif -/* Slot 24 is reserved */ -#ifndef TclFreePackageInfo_TCL_DECLARED -#define TclFreePackageInfo_TCL_DECLARED -/* 25 */ -EXTERN void TclFreePackageInfo (Interp * iPtr); -#endif -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -#ifndef TclpGetDefaultStdChannel_TCL_DECLARED -#define TclpGetDefaultStdChannel_TCL_DECLARED -/* 28 */ -EXTERN Tcl_Channel TclpGetDefaultStdChannel (int type); -#endif -/* Slot 29 is reserved */ -/* Slot 30 is reserved */ -#ifndef TclGetExtension_TCL_DECLARED -#define TclGetExtension_TCL_DECLARED -/* 31 */ -EXTERN CONST char * TclGetExtension (CONST char * name); -#endif -#ifndef TclGetFrame_TCL_DECLARED -#define TclGetFrame_TCL_DECLARED -/* 32 */ -EXTERN int TclGetFrame (Tcl_Interp * interp, CONST char * str, - CallFrame ** framePtrPtr); -#endif -/* Slot 33 is reserved */ -#ifndef TclGetIntForIndex_TCL_DECLARED -#define TclGetIntForIndex_TCL_DECLARED -/* 34 */ -EXTERN int TclGetIntForIndex (Tcl_Interp * interp, - Tcl_Obj * objPtr, int endValue, - int * indexPtr); -#endif -/* Slot 35 is reserved */ -/* Slot 36 is reserved */ -#ifndef TclGetLoadedPackages_TCL_DECLARED -#define TclGetLoadedPackages_TCL_DECLARED -/* 37 */ -EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, - char * targetName); -#endif -#ifndef TclGetNamespaceForQualName_TCL_DECLARED -#define TclGetNamespaceForQualName_TCL_DECLARED -/* 38 */ -EXTERN int TclGetNamespaceForQualName (Tcl_Interp * interp, - CONST char * qualName, Namespace * cxtNsPtr, - int flags, Namespace ** nsPtrPtr, - Namespace ** altNsPtrPtr, - Namespace ** actualCxtPtrPtr, - CONST char ** simpleNamePtr); -#endif -#ifndef TclGetObjInterpProc_TCL_DECLARED -#define TclGetObjInterpProc_TCL_DECLARED -/* 39 */ -EXTERN TclObjCmdProcType TclGetObjInterpProc (void); -#endif -#ifndef TclGetOpenMode_TCL_DECLARED -#define TclGetOpenMode_TCL_DECLARED -/* 40 */ -EXTERN int TclGetOpenMode (Tcl_Interp * interp, - CONST char * str, int * seekFlagPtr); -#endif -#ifndef TclGetOriginalCommand_TCL_DECLARED -#define TclGetOriginalCommand_TCL_DECLARED -/* 41 */ -EXTERN Tcl_Command TclGetOriginalCommand (Tcl_Command command); -#endif -#ifndef TclpGetUserHome_TCL_DECLARED -#define TclpGetUserHome_TCL_DECLARED -/* 42 */ -EXTERN char * TclpGetUserHome (CONST char * name, - Tcl_DString * bufferPtr); -#endif -/* Slot 43 is reserved */ -#ifndef TclGuessPackageName_TCL_DECLARED -#define TclGuessPackageName_TCL_DECLARED -/* 44 */ -EXTERN int TclGuessPackageName (CONST char * fileName, - Tcl_DString * bufPtr); -#endif -#ifndef TclHideUnsafeCommands_TCL_DECLARED -#define TclHideUnsafeCommands_TCL_DECLARED -/* 45 */ -EXTERN int TclHideUnsafeCommands (Tcl_Interp * interp); -#endif -#ifndef TclInExit_TCL_DECLARED -#define TclInExit_TCL_DECLARED -/* 46 */ -EXTERN int TclInExit (void); -#endif -/* Slot 47 is reserved */ -/* Slot 48 is reserved */ -/* Slot 49 is reserved */ -#ifndef TclInitCompiledLocals_TCL_DECLARED -#define TclInitCompiledLocals_TCL_DECLARED -/* 50 */ -EXTERN void TclInitCompiledLocals (Tcl_Interp * interp, - CallFrame * framePtr, Namespace * nsPtr); -#endif -#ifndef TclInterpInit_TCL_DECLARED -#define TclInterpInit_TCL_DECLARED -/* 51 */ -EXTERN int TclInterpInit (Tcl_Interp * interp); -#endif -/* Slot 52 is reserved */ -#ifndef TclInvokeObjectCommand_TCL_DECLARED -#define TclInvokeObjectCommand_TCL_DECLARED -/* 53 */ -EXTERN int TclInvokeObjectCommand (ClientData clientData, - Tcl_Interp * interp, int argc, - CONST84 char ** argv); -#endif -#ifndef TclInvokeStringCommand_TCL_DECLARED -#define TclInvokeStringCommand_TCL_DECLARED -/* 54 */ -EXTERN int TclInvokeStringCommand (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef TclIsProc_TCL_DECLARED -#define TclIsProc_TCL_DECLARED -/* 55 */ -EXTERN Proc * TclIsProc (Command * cmdPtr); -#endif -/* Slot 56 is reserved */ -/* Slot 57 is reserved */ -#ifndef TclLookupVar_TCL_DECLARED -#define TclLookupVar_TCL_DECLARED -/* 58 */ -EXTERN Var * TclLookupVar (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, CONST char * msg, int createPart1, - int createPart2, Var ** arrayPtrPtr); -#endif -/* Slot 59 is reserved */ -#ifndef TclNeedSpace_TCL_DECLARED -#define TclNeedSpace_TCL_DECLARED -/* 60 */ -EXTERN int TclNeedSpace (CONST char * start, CONST char * end); -#endif -#ifndef TclNewProcBodyObj_TCL_DECLARED -#define TclNewProcBodyObj_TCL_DECLARED -/* 61 */ -EXTERN Tcl_Obj * TclNewProcBodyObj (Proc * procPtr); -#endif -#ifndef TclObjCommandComplete_TCL_DECLARED -#define TclObjCommandComplete_TCL_DECLARED -/* 62 */ -EXTERN int TclObjCommandComplete (Tcl_Obj * cmdPtr); -#endif -#ifndef TclObjInterpProc_TCL_DECLARED -#define TclObjInterpProc_TCL_DECLARED -/* 63 */ -EXTERN int TclObjInterpProc (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef TclObjInvoke_TCL_DECLARED -#define TclObjInvoke_TCL_DECLARED -/* 64 */ -EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); -#endif -/* Slot 65 is reserved */ -/* Slot 66 is reserved */ -/* Slot 67 is reserved */ -/* Slot 68 is reserved */ -#ifndef TclpAlloc_TCL_DECLARED -#define TclpAlloc_TCL_DECLARED -/* 69 */ -EXTERN char * TclpAlloc (unsigned int size); -#endif -/* Slot 70 is reserved */ -/* Slot 71 is reserved */ -/* Slot 72 is reserved */ -/* Slot 73 is reserved */ -#ifndef TclpFree_TCL_DECLARED -#define TclpFree_TCL_DECLARED -/* 74 */ -EXTERN void TclpFree (char * ptr); -#endif -#ifndef TclpGetClicks_TCL_DECLARED -#define TclpGetClicks_TCL_DECLARED -/* 75 */ -EXTERN unsigned long TclpGetClicks (void); -#endif -#ifndef TclpGetSeconds_TCL_DECLARED -#define TclpGetSeconds_TCL_DECLARED -/* 76 */ -EXTERN unsigned long TclpGetSeconds (void); -#endif -#ifndef TclpGetTime_TCL_DECLARED -#define TclpGetTime_TCL_DECLARED -/* 77 */ -EXTERN void TclpGetTime (Tcl_Time * time); -#endif -#ifndef TclpGetTimeZone_TCL_DECLARED -#define TclpGetTimeZone_TCL_DECLARED -/* 78 */ -EXTERN int TclpGetTimeZone (unsigned long time); -#endif -/* Slot 79 is reserved */ -/* Slot 80 is reserved */ -#ifndef TclpRealloc_TCL_DECLARED -#define TclpRealloc_TCL_DECLARED -/* 81 */ -EXTERN char * TclpRealloc (char * ptr, unsigned int size); -#endif -/* Slot 82 is reserved */ -/* Slot 83 is reserved */ -/* Slot 84 is reserved */ -/* Slot 85 is reserved */ -/* Slot 86 is reserved */ -/* Slot 87 is reserved */ -#ifndef TclPrecTraceProc_TCL_DECLARED -#define TclPrecTraceProc_TCL_DECLARED -/* 88 */ -EXTERN char * TclPrecTraceProc (ClientData clientData, - Tcl_Interp * interp, CONST char * name1, - CONST char * name2, int flags); -#endif -#ifndef TclPreventAliasLoop_TCL_DECLARED -#define TclPreventAliasLoop_TCL_DECLARED -/* 89 */ -EXTERN int TclPreventAliasLoop (Tcl_Interp * interp, - Tcl_Interp * cmdInterp, Tcl_Command cmd); -#endif -/* Slot 90 is reserved */ -#ifndef TclProcCleanupProc_TCL_DECLARED -#define TclProcCleanupProc_TCL_DECLARED -/* 91 */ -EXTERN void TclProcCleanupProc (Proc * procPtr); -#endif -#ifndef TclProcCompileProc_TCL_DECLARED -#define TclProcCompileProc_TCL_DECLARED -/* 92 */ -EXTERN int TclProcCompileProc (Tcl_Interp * interp, - Proc * procPtr, Tcl_Obj * bodyPtr, - Namespace * nsPtr, CONST char * description, - CONST char * procName); -#endif -#ifndef TclProcDeleteProc_TCL_DECLARED -#define TclProcDeleteProc_TCL_DECLARED -/* 93 */ -EXTERN void TclProcDeleteProc (ClientData clientData); -#endif -/* Slot 94 is reserved */ -/* Slot 95 is reserved */ -#ifndef TclRenameCommand_TCL_DECLARED -#define TclRenameCommand_TCL_DECLARED -/* 96 */ -EXTERN int TclRenameCommand (Tcl_Interp * interp, - CONST char * oldName, CONST char * newName); -#endif -#ifndef TclResetShadowedCmdRefs_TCL_DECLARED -#define TclResetShadowedCmdRefs_TCL_DECLARED -/* 97 */ -EXTERN void TclResetShadowedCmdRefs (Tcl_Interp * interp, - Command * newCmdPtr); -#endif -#ifndef TclServiceIdle_TCL_DECLARED -#define TclServiceIdle_TCL_DECLARED -/* 98 */ -EXTERN int TclServiceIdle (void); -#endif -/* Slot 99 is reserved */ -/* Slot 100 is reserved */ -#ifndef TclSetPreInitScript_TCL_DECLARED -#define TclSetPreInitScript_TCL_DECLARED -/* 101 */ -EXTERN char * TclSetPreInitScript (char * string); -#endif -#ifndef TclSetupEnv_TCL_DECLARED -#define TclSetupEnv_TCL_DECLARED -/* 102 */ -EXTERN void TclSetupEnv (Tcl_Interp * interp); -#endif -#ifndef TclSockGetPort_TCL_DECLARED -#define TclSockGetPort_TCL_DECLARED -/* 103 */ -EXTERN int TclSockGetPort (Tcl_Interp * interp, - CONST char * str, CONST char * proto, - int * portPtr); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* MACOSX */ -/* Slot 105 is reserved */ -/* Slot 106 is reserved */ -/* Slot 107 is reserved */ -#ifndef TclTeardownNamespace_TCL_DECLARED -#define TclTeardownNamespace_TCL_DECLARED -/* 108 */ -EXTERN void TclTeardownNamespace (Namespace * nsPtr); -#endif -#ifndef TclUpdateReturnInfo_TCL_DECLARED -#define TclUpdateReturnInfo_TCL_DECLARED -/* 109 */ -EXTERN int TclUpdateReturnInfo (Interp * iPtr); -#endif -/* Slot 110 is reserved */ -#ifndef Tcl_AddInterpResolvers_TCL_DECLARED -#define Tcl_AddInterpResolvers_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_AddInterpResolvers (Tcl_Interp * interp, - CONST char * name, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, - Tcl_ResolveCompiledVarProc * compiledVarProc); -#endif -#ifndef Tcl_AppendExportList_TCL_DECLARED -#define Tcl_AppendExportList_TCL_DECLARED -/* 112 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_CreateNamespace_TCL_DECLARED -#define Tcl_CreateNamespace_TCL_DECLARED -/* 113 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - CONST char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); -#endif -#ifndef Tcl_DeleteNamespace_TCL_DECLARED -#define Tcl_DeleteNamespace_TCL_DECLARED -/* 114 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_Export_TCL_DECLARED -#define Tcl_Export_TCL_DECLARED -/* 115 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int resetListFirst); -#endif -#ifndef Tcl_FindCommand_TCL_DECLARED -#define Tcl_FindCommand_TCL_DECLARED -/* 116 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_FindNamespace_TCL_DECLARED -#define Tcl_FindNamespace_TCL_DECLARED -/* 117 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_GetInterpResolvers_TCL_DECLARED -#define Tcl_GetInterpResolvers_TCL_DECLARED -/* 118 */ -EXTERN int Tcl_GetInterpResolvers (Tcl_Interp * interp, - CONST char * name, - Tcl_ResolverInfo * resInfo); -#endif -#ifndef Tcl_GetNamespaceResolvers_TCL_DECLARED -#define Tcl_GetNamespaceResolvers_TCL_DECLARED -/* 119 */ -EXTERN int Tcl_GetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, - Tcl_ResolverInfo * resInfo); -#endif -#ifndef Tcl_FindNamespaceVar_TCL_DECLARED -#define Tcl_FindNamespaceVar_TCL_DECLARED -/* 120 */ -EXTERN Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_ForgetImport_TCL_DECLARED -#define Tcl_ForgetImport_TCL_DECLARED -/* 121 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern); -#endif -#ifndef Tcl_GetCommandFromObj_TCL_DECLARED -#define Tcl_GetCommandFromObj_TCL_DECLARED -/* 122 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCommandFullName_TCL_DECLARED -#define Tcl_GetCommandFullName_TCL_DECLARED -/* 123 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED -#define Tcl_GetCurrentNamespace_TCL_DECLARED -/* 124 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED -#define Tcl_GetGlobalNamespace_TCL_DECLARED -/* 125 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetVariableFullName_TCL_DECLARED -#define Tcl_GetVariableFullName_TCL_DECLARED -/* 126 */ -EXTERN void Tcl_GetVariableFullName (Tcl_Interp * interp, - Tcl_Var variable, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_Import_TCL_DECLARED -#define Tcl_Import_TCL_DECLARED -/* 127 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int allowOverwrite); -#endif -#ifndef Tcl_PopCallFrame_TCL_DECLARED -#define Tcl_PopCallFrame_TCL_DECLARED -/* 128 */ -EXTERN void Tcl_PopCallFrame (Tcl_Interp * interp); -#endif -#ifndef Tcl_PushCallFrame_TCL_DECLARED -#define Tcl_PushCallFrame_TCL_DECLARED -/* 129 */ -EXTERN int Tcl_PushCallFrame (Tcl_Interp * interp, - Tcl_CallFrame * framePtr, - Tcl_Namespace * nsPtr, int isProcCallFrame); -#endif -#ifndef Tcl_RemoveInterpResolvers_TCL_DECLARED -#define Tcl_RemoveInterpResolvers_TCL_DECLARED -/* 130 */ -EXTERN int Tcl_RemoveInterpResolvers (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_SetNamespaceResolvers_TCL_DECLARED -#define Tcl_SetNamespaceResolvers_TCL_DECLARED -/* 131 */ -EXTERN void Tcl_SetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, - Tcl_ResolveCompiledVarProc * compiledVarProc); -#endif -#ifndef TclpHasSockets_TCL_DECLARED -#define TclpHasSockets_TCL_DECLARED -/* 132 */ -EXTERN int TclpHasSockets (Tcl_Interp * interp); -#endif -#ifndef TclpGetDate_TCL_DECLARED -#define TclpGetDate_TCL_DECLARED -/* 133 */ -EXTERN struct tm * TclpGetDate (CONST time_t * time, int useGMT); -#endif -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ -/* Slot 136 is reserved */ -/* Slot 137 is reserved */ -#ifndef TclGetEnv_TCL_DECLARED -#define TclGetEnv_TCL_DECLARED -/* 138 */ -EXTERN CONST84_RETURN char * TclGetEnv (CONST char * name, - Tcl_DString * valuePtr); -#endif -/* Slot 139 is reserved */ -/* Slot 140 is reserved */ -#ifndef TclpGetCwd_TCL_DECLARED -#define TclpGetCwd_TCL_DECLARED -/* 141 */ -EXTERN CONST84_RETURN char * TclpGetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); -#endif -#ifndef TclSetByteCodeFromAny_TCL_DECLARED -#define TclSetByteCodeFromAny_TCL_DECLARED -/* 142 */ -EXTERN int TclSetByteCodeFromAny (Tcl_Interp * interp, - Tcl_Obj * objPtr, CompileHookProc * hookProc, - ClientData clientData); -#endif -#ifndef TclAddLiteralObj_TCL_DECLARED -#define TclAddLiteralObj_TCL_DECLARED -/* 143 */ -EXTERN int TclAddLiteralObj (struct CompileEnv * envPtr, - Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); -#endif -#ifndef TclHideLiteral_TCL_DECLARED -#define TclHideLiteral_TCL_DECLARED -/* 144 */ -EXTERN void TclHideLiteral (Tcl_Interp * interp, - struct CompileEnv * envPtr, int index); -#endif -#ifndef TclGetAuxDataType_TCL_DECLARED -#define TclGetAuxDataType_TCL_DECLARED -/* 145 */ -EXTERN struct AuxDataType * TclGetAuxDataType (char * typeName); -#endif -#ifndef TclHandleCreate_TCL_DECLARED -#define TclHandleCreate_TCL_DECLARED -/* 146 */ -EXTERN TclHandle TclHandleCreate (VOID * ptr); -#endif -#ifndef TclHandleFree_TCL_DECLARED -#define TclHandleFree_TCL_DECLARED -/* 147 */ -EXTERN void TclHandleFree (TclHandle handle); -#endif -#ifndef TclHandlePreserve_TCL_DECLARED -#define TclHandlePreserve_TCL_DECLARED -/* 148 */ -EXTERN TclHandle TclHandlePreserve (TclHandle handle); -#endif -#ifndef TclHandleRelease_TCL_DECLARED -#define TclHandleRelease_TCL_DECLARED -/* 149 */ -EXTERN void TclHandleRelease (TclHandle handle); -#endif -#ifndef TclRegAbout_TCL_DECLARED -#define TclRegAbout_TCL_DECLARED -/* 150 */ -EXTERN int TclRegAbout (Tcl_Interp * interp, Tcl_RegExp re); -#endif -#ifndef TclRegExpRangeUniChar_TCL_DECLARED -#define TclRegExpRangeUniChar_TCL_DECLARED -/* 151 */ -EXTERN void TclRegExpRangeUniChar (Tcl_RegExp re, int index, - int * startPtr, int * endPtr); -#endif -#ifndef TclSetLibraryPath_TCL_DECLARED -#define TclSetLibraryPath_TCL_DECLARED -/* 152 */ -EXTERN void TclSetLibraryPath (Tcl_Obj * pathPtr); -#endif -#ifndef TclGetLibraryPath_TCL_DECLARED -#define TclGetLibraryPath_TCL_DECLARED -/* 153 */ -EXTERN Tcl_Obj * TclGetLibraryPath (void); -#endif -/* Slot 154 is reserved */ -/* Slot 155 is reserved */ -#ifndef TclRegError_TCL_DECLARED -#define TclRegError_TCL_DECLARED -/* 156 */ -EXTERN void TclRegError (Tcl_Interp * interp, CONST char * msg, - int status); -#endif -#ifndef TclVarTraceExists_TCL_DECLARED -#define TclVarTraceExists_TCL_DECLARED -/* 157 */ -EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, - CONST char * varName); -#endif -#ifndef TclSetStartupScriptFileName_TCL_DECLARED -#define TclSetStartupScriptFileName_TCL_DECLARED -/* 158 */ -EXTERN void TclSetStartupScriptFileName (CONST char * filename); -#endif -#ifndef TclGetStartupScriptFileName_TCL_DECLARED -#define TclGetStartupScriptFileName_TCL_DECLARED -/* 159 */ -EXTERN CONST84_RETURN char * TclGetStartupScriptFileName (void); -#endif -/* Slot 160 is reserved */ -#ifndef TclChannelTransform_TCL_DECLARED -#define TclChannelTransform_TCL_DECLARED -/* 161 */ -EXTERN int TclChannelTransform (Tcl_Interp * interp, - Tcl_Channel chan, Tcl_Obj * cmdObjPtr); -#endif -#ifndef TclChannelEventScriptInvoker_TCL_DECLARED -#define TclChannelEventScriptInvoker_TCL_DECLARED -/* 162 */ -EXTERN void TclChannelEventScriptInvoker (ClientData clientData, - int flags); -#endif -#ifndef TclGetInstructionTable_TCL_DECLARED -#define TclGetInstructionTable_TCL_DECLARED -/* 163 */ -EXTERN void * TclGetInstructionTable (void); -#endif -#ifndef TclExpandCodeArray_TCL_DECLARED -#define TclExpandCodeArray_TCL_DECLARED -/* 164 */ -EXTERN void TclExpandCodeArray (void * envPtr); -#endif -#ifndef TclpSetInitialEncodings_TCL_DECLARED -#define TclpSetInitialEncodings_TCL_DECLARED -/* 165 */ -EXTERN void TclpSetInitialEncodings (void); -#endif -#ifndef TclListObjSetElement_TCL_DECLARED -#define TclListObjSetElement_TCL_DECLARED -/* 166 */ -EXTERN int TclListObjSetElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj * valuePtr); -#endif -#ifndef TclSetStartupScriptPath_TCL_DECLARED -#define TclSetStartupScriptPath_TCL_DECLARED -/* 167 */ -EXTERN void TclSetStartupScriptPath (Tcl_Obj * pathPtr); -#endif -#ifndef TclGetStartupScriptPath_TCL_DECLARED -#define TclGetStartupScriptPath_TCL_DECLARED -/* 168 */ -EXTERN Tcl_Obj * TclGetStartupScriptPath (void); -#endif -#ifndef TclpUtfNcmp2_TCL_DECLARED -#define TclpUtfNcmp2_TCL_DECLARED -/* 169 */ -EXTERN int TclpUtfNcmp2 (CONST char * s1, CONST char * s2, - unsigned long n); -#endif -#ifndef TclCheckInterpTraces_TCL_DECLARED -#define TclCheckInterpTraces_TCL_DECLARED -/* 170 */ -EXTERN int TclCheckInterpTraces (Tcl_Interp * interp, - CONST char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef TclCheckExecutionTraces_TCL_DECLARED -#define TclCheckExecutionTraces_TCL_DECLARED -/* 171 */ -EXTERN int TclCheckExecutionTraces (Tcl_Interp * interp, - CONST char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef TclInThreadExit_TCL_DECLARED -#define TclInThreadExit_TCL_DECLARED -/* 172 */ -EXTERN int TclInThreadExit (void); -#endif -#ifndef TclUniCharMatch_TCL_DECLARED -#define TclUniCharMatch_TCL_DECLARED -/* 173 */ -EXTERN int TclUniCharMatch (CONST Tcl_UniChar * string, - int strLen, CONST Tcl_UniChar * pattern, - int ptnLen, int flags); -#endif -/* Slot 174 is reserved */ -#ifndef TclCallVarTraces_TCL_DECLARED -#define TclCallVarTraces_TCL_DECLARED -/* 175 */ -EXTERN int TclCallVarTraces (Interp * iPtr, Var * arrayPtr, - Var * varPtr, CONST char * part1, - CONST char * part2, int flags, - int leaveErrMsg); -#endif -#ifndef TclCleanupVar_TCL_DECLARED -#define TclCleanupVar_TCL_DECLARED -/* 176 */ -EXTERN void TclCleanupVar (Var * varPtr, Var * arrayPtr); -#endif -#ifndef TclVarErrMsg_TCL_DECLARED -#define TclVarErrMsg_TCL_DECLARED -/* 177 */ -EXTERN void TclVarErrMsg (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - CONST char * operation, CONST char * reason); -#endif -#ifndef Tcl_SetStartupScript_TCL_DECLARED -#define Tcl_SetStartupScript_TCL_DECLARED -/* 178 */ -EXTERN void Tcl_SetStartupScript (Tcl_Obj * pathPtr, - CONST char* encodingName); -#endif -#ifndef Tcl_GetStartupScript_TCL_DECLARED -#define Tcl_GetStartupScript_TCL_DECLARED -/* 179 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript (CONST char ** encodingNamePtr); -#endif -/* Slot 180 is reserved */ -/* Slot 181 is reserved */ -#ifndef TclpLocaltime_TCL_DECLARED -#define TclpLocaltime_TCL_DECLARED -/* 182 */ -EXTERN struct tm * TclpLocaltime (CONST time_t * clock); -#endif -#ifndef TclpGmtime_TCL_DECLARED -#define TclpGmtime_TCL_DECLARED -/* 183 */ -EXTERN struct tm * TclpGmtime (CONST time_t * clock); -#endif -/* Slot 184 is reserved */ -/* Slot 185 is reserved */ -/* Slot 186 is reserved */ -/* Slot 187 is reserved */ -/* Slot 188 is reserved */ -/* Slot 189 is reserved */ -/* Slot 190 is reserved */ -/* Slot 191 is reserved */ -/* Slot 192 is reserved */ -/* Slot 193 is reserved */ -/* Slot 194 is reserved */ -/* Slot 195 is reserved */ -/* Slot 196 is reserved */ -/* Slot 197 is reserved */ -#ifndef TclObjGetFrame_TCL_DECLARED -#define TclObjGetFrame_TCL_DECLARED -/* 198 */ -EXTERN int TclObjGetFrame (Tcl_Interp * interp, - Tcl_Obj * objPtr, CallFrame ** framePtrPtr); -#endif -/* Slot 199 is reserved */ -#ifndef TclpObjRemoveDirectory_TCL_DECLARED -#define TclpObjRemoveDirectory_TCL_DECLARED -/* 200 */ -EXTERN int TclpObjRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); -#endif -#ifndef TclpObjCopyDirectory_TCL_DECLARED -#define TclpObjCopyDirectory_TCL_DECLARED -/* 201 */ -EXTERN int TclpObjCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); -#endif -#ifndef TclpObjCreateDirectory_TCL_DECLARED -#define TclpObjCreateDirectory_TCL_DECLARED -/* 202 */ -EXTERN int TclpObjCreateDirectory (Tcl_Obj * pathPtr); -#endif -#ifndef TclpObjDeleteFile_TCL_DECLARED -#define TclpObjDeleteFile_TCL_DECLARED -/* 203 */ -EXTERN int TclpObjDeleteFile (Tcl_Obj * pathPtr); -#endif -#ifndef TclpObjCopyFile_TCL_DECLARED -#define TclpObjCopyFile_TCL_DECLARED -/* 204 */ -EXTERN int TclpObjCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef TclpObjRenameFile_TCL_DECLARED -#define TclpObjRenameFile_TCL_DECLARED -/* 205 */ -EXTERN int TclpObjRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef TclpObjStat_TCL_DECLARED -#define TclpObjStat_TCL_DECLARED -/* 206 */ -EXTERN int TclpObjStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef TclpObjAccess_TCL_DECLARED -#define TclpObjAccess_TCL_DECLARED -/* 207 */ -EXTERN int TclpObjAccess (Tcl_Obj * pathPtr, int mode); -#endif -#ifndef TclpOpenFileChannel_TCL_DECLARED -#define TclpOpenFileChannel_TCL_DECLARED -/* 208 */ -EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, int mode, int permissions); -#endif -/* Slot 209 is reserved */ -/* Slot 210 is reserved */ -/* Slot 211 is reserved */ -#ifndef TclpFindExecutable_TCL_DECLARED -#define TclpFindExecutable_TCL_DECLARED -/* 212 */ -EXTERN void TclpFindExecutable (CONST char * argv0); -#endif -#ifndef TclGetObjNameOfExecutable_TCL_DECLARED -#define TclGetObjNameOfExecutable_TCL_DECLARED -/* 213 */ -EXTERN Tcl_Obj * TclGetObjNameOfExecutable (void); -#endif -#ifndef TclSetObjNameOfExecutable_TCL_DECLARED -#define TclSetObjNameOfExecutable_TCL_DECLARED -/* 214 */ -EXTERN void TclSetObjNameOfExecutable (Tcl_Obj * name, - Tcl_Encoding encoding); -#endif -#ifndef TclStackAlloc_TCL_DECLARED -#define TclStackAlloc_TCL_DECLARED -/* 215 */ -EXTERN void * TclStackAlloc (Tcl_Interp * interp, int numBytes); -#endif -#ifndef TclStackFree_TCL_DECLARED -#define TclStackFree_TCL_DECLARED -/* 216 */ -EXTERN void TclStackFree (Tcl_Interp * interp, void * freePtr); -#endif -#ifndef TclPushStackFrame_TCL_DECLARED -#define TclPushStackFrame_TCL_DECLARED -/* 217 */ -EXTERN int TclPushStackFrame (Tcl_Interp * interp, - Tcl_CallFrame ** framePtrPtr, - Tcl_Namespace * namespacePtr, - int isProcCallFrame); -#endif -#ifndef TclPopStackFrame_TCL_DECLARED -#define TclPopStackFrame_TCL_DECLARED -/* 218 */ -EXTERN void TclPopStackFrame (Tcl_Interp * interp); -#endif -/* Slot 219 is reserved */ -/* Slot 220 is reserved */ -/* Slot 221 is reserved */ -/* Slot 222 is reserved */ -/* Slot 223 is reserved */ -#ifndef TclGetPlatform_TCL_DECLARED -#define TclGetPlatform_TCL_DECLARED -/* 224 */ -EXTERN TclPlatformType * TclGetPlatform (void); -#endif -#ifndef TclTraceDictPath_TCL_DECLARED -#define TclTraceDictPath_TCL_DECLARED -/* 225 */ -EXTERN Tcl_Obj * TclTraceDictPath (Tcl_Interp * interp, - Tcl_Obj * rootPtr, int keyc, - Tcl_Obj *CONST keyv[], int flags); -#endif -#ifndef TclObjBeingDeleted_TCL_DECLARED -#define TclObjBeingDeleted_TCL_DECLARED -/* 226 */ -EXTERN int TclObjBeingDeleted (Tcl_Obj * objPtr); -#endif -#ifndef TclSetNsPath_TCL_DECLARED -#define TclSetNsPath_TCL_DECLARED -/* 227 */ -EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, - Tcl_Namespace * pathAry[]); -#endif -#ifndef TclObjInterpProcCore_TCL_DECLARED -#define TclObjInterpProcCore_TCL_DECLARED -/* 228 */ -EXTERN int TclObjInterpProcCore (register Tcl_Interp * interp, - Tcl_Obj * procNameObj, int skip, - ProcErrorProc errorProc); -#endif -#ifndef TclPtrMakeUpvar_TCL_DECLARED -#define TclPtrMakeUpvar_TCL_DECLARED -/* 229 */ -EXTERN int TclPtrMakeUpvar (Tcl_Interp * interp, - Var * otherP1Ptr, CONST char * myName, - int myFlags, int index); -#endif -#ifndef TclObjLookupVar_TCL_DECLARED -#define TclObjLookupVar_TCL_DECLARED -/* 230 */ -EXTERN Var * TclObjLookupVar (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, CONST char * part2, - int flags, CONST char * msg, - CONST int createPart1, CONST int createPart2, - Var ** arrayPtrPtr); -#endif -#ifndef TclGetNamespaceFromObj_TCL_DECLARED -#define TclGetNamespaceFromObj_TCL_DECLARED -/* 231 */ -EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); -#endif -#ifndef TclEvalObjEx_TCL_DECLARED -#define TclEvalObjEx_TCL_DECLARED -/* 232 */ -EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags, const CmdFrame * invoker, - int word); -#endif -#ifndef TclGetSrcInfoForPc_TCL_DECLARED -#define TclGetSrcInfoForPc_TCL_DECLARED -/* 233 */ -EXTERN void TclGetSrcInfoForPc (CmdFrame * contextPtr); -#endif -#ifndef TclVarHashCreateVar_TCL_DECLARED -#define TclVarHashCreateVar_TCL_DECLARED -/* 234 */ -EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, - const char * key, int * newPtr); -#endif -#ifndef TclInitVarHashTable_TCL_DECLARED -#define TclInitVarHashTable_TCL_DECLARED -/* 235 */ -EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, - Namespace * nsPtr); -#endif -#ifndef TclBackgroundException_TCL_DECLARED -#define TclBackgroundException_TCL_DECLARED -/* 236 */ -EXTERN void TclBackgroundException (Tcl_Interp * interp, - int code); -#endif -#ifndef TclResetCancellation_TCL_DECLARED -#define TclResetCancellation_TCL_DECLARED -/* 237 */ -EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); -#endif -#ifndef TclEvalObjv_NR2_TCL_DECLARED -#define TclEvalObjv_NR2_TCL_DECLARED -/* 238 */ -EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, - struct TEOV_record * rootPtr); -#endif -/* 239 */ -EXTERN Tcl_ObjCmdProc TclNRInterpProc; -#ifndef TclNRInterpProcCore_TCL_DECLARED -#define TclNRInterpProcCore_TCL_DECLARED -/* 240 */ -EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, - Tcl_Obj * procNameObj, int skip, - ProcErrorProc errorProc); -#endif -#ifndef TclNRPushRecord_TCL_DECLARED -#define TclNRPushRecord_TCL_DECLARED -/* 241 */ -EXTERN struct TEOV_record * TclNRPushRecord (Tcl_Interp * interp); -#endif -#ifndef TclNRPopAndFreeRecord_TCL_DECLARED -#define TclNRPopAndFreeRecord_TCL_DECLARED -/* 242 */ -EXTERN void TclNRPopAndFreeRecord (Tcl_Interp * interp); -#endif -#ifndef TclNREvalObjEx_TCL_DECLARED -#define TclNREvalObjEx_TCL_DECLARED -/* 243 */ -EXTERN int TclNREvalObjEx (Tcl_Interp * interp, - Tcl_Obj * objPtr, int flags, - const CmdFrame * invoker, int word); -#endif - -typedef struct TclIntStubs { - int magic; - CONST struct TclIntStubHooks *hooks; - - void *reserved0; - void *reserved1; - void *reserved2; - void (*tclAllocateFreeObjects) (void); /* 3 */ - void *reserved4; -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* MACOSX */ - void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */ - int (*tclCopyAndCollapse) (int count, CONST char * src, char * dst); /* 7 */ - int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* MACOSX */ - int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, CONST char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ - void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */ - void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */ - void *reserved13; - void (*tclDumpMemoryInfo) (FILE * outFile); /* 14 */ - void *reserved15; - void (*tclExprFloatError) (Tcl_Interp * interp, double value); /* 16 */ - void *reserved17; - void *reserved18; - void *reserved19; - void *reserved20; - void *reserved21; - int (*tclFindElement) (Tcl_Interp * interp, CONST char * listStr, int listLength, CONST char ** elementPtr, CONST char ** nextPtr, int * sizePtr, int * bracePtr); /* 22 */ - Proc * (*tclFindProc) (Interp * iPtr, CONST char * procName); /* 23 */ - void *reserved24; - void (*tclFreePackageInfo) (Interp * iPtr); /* 25 */ - void *reserved26; - void *reserved27; - Tcl_Channel (*tclpGetDefaultStdChannel) (int type); /* 28 */ - void *reserved29; - void *reserved30; - CONST char * (*tclGetExtension) (CONST char * name); /* 31 */ - int (*tclGetFrame) (Tcl_Interp * interp, CONST char * str, CallFrame ** framePtrPtr); /* 32 */ - void *reserved33; - int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ - void *reserved35; - void *reserved36; - int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */ - int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr); /* 38 */ - TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ - int (*tclGetOpenMode) (Tcl_Interp * interp, CONST char * str, int * seekFlagPtr); /* 40 */ - Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ - char * (*tclpGetUserHome) (CONST char * name, Tcl_DString * bufferPtr); /* 42 */ - void *reserved43; - int (*tclGuessPackageName) (CONST char * fileName, Tcl_DString * bufPtr); /* 44 */ - int (*tclHideUnsafeCommands) (Tcl_Interp * interp); /* 45 */ - int (*tclInExit) (void); /* 46 */ - void *reserved47; - void *reserved48; - void *reserved49; - void (*tclInitCompiledLocals) (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); /* 50 */ - int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ - void *reserved52; - int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ - int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 54 */ - Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ - void *reserved56; - void *reserved57; - Var * (*tclLookupVar) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, CONST char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); /* 58 */ - void *reserved59; - int (*tclNeedSpace) (CONST char * start, CONST char * end); /* 60 */ - Tcl_Obj * (*tclNewProcBodyObj) (Proc * procPtr); /* 61 */ - int (*tclObjCommandComplete) (Tcl_Obj * cmdPtr); /* 62 */ - int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 63 */ - int (*tclObjInvoke) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 64 */ - void *reserved65; - void *reserved66; - void *reserved67; - void *reserved68; - char * (*tclpAlloc) (unsigned int size); /* 69 */ - void *reserved70; - void *reserved71; - void *reserved72; - void *reserved73; - void (*tclpFree) (char * ptr); /* 74 */ - unsigned long (*tclpGetClicks) (void); /* 75 */ - unsigned long (*tclpGetSeconds) (void); /* 76 */ - void (*tclpGetTime) (Tcl_Time * time); /* 77 */ - int (*tclpGetTimeZone) (unsigned long time); /* 78 */ - void *reserved79; - void *reserved80; - char * (*tclpRealloc) (char * ptr, unsigned int size); /* 81 */ - void *reserved82; - void *reserved83; - void *reserved84; - void *reserved85; - void *reserved86; - void *reserved87; - char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp * interp, CONST char * name1, CONST char * name2, int flags); /* 88 */ - int (*tclPreventAliasLoop) (Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd); /* 89 */ - void *reserved90; - void (*tclProcCleanupProc) (Proc * procPtr); /* 91 */ - int (*tclProcCompileProc) (Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, CONST char * description, CONST char * procName); /* 92 */ - void (*tclProcDeleteProc) (ClientData clientData); /* 93 */ - void *reserved94; - void *reserved95; - int (*tclRenameCommand) (Tcl_Interp * interp, CONST char * oldName, CONST char * newName); /* 96 */ - void (*tclResetShadowedCmdRefs) (Tcl_Interp * interp, Command * newCmdPtr); /* 97 */ - int (*tclServiceIdle) (void); /* 98 */ - void *reserved99; - void *reserved100; - char * (*tclSetPreInitScript) (char * string); /* 101 */ - void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ - int (*tclSockGetPort) (Tcl_Interp * interp, CONST char * str, CONST char * proto, int * portPtr); /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* MACOSX */ - void *reserved105; - void *reserved106; - void *reserved107; - void (*tclTeardownNamespace) (Namespace * nsPtr); /* 108 */ - int (*tclUpdateReturnInfo) (Interp * iPtr); /* 109 */ - void *reserved110; - void (*tcl_AddInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 111 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 112 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 113 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 114 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 115 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 116 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 117 */ - int (*tcl_GetInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolverInfo * resInfo); /* 118 */ - int (*tcl_GetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo); /* 119 */ - Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 120 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 121 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 122 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 123 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 124 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 125 */ - void (*tcl_GetVariableFullName) (Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr); /* 126 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 127 */ - void (*tcl_PopCallFrame) (Tcl_Interp * interp); /* 128 */ - int (*tcl_PushCallFrame) (Tcl_Interp * interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame); /* 129 */ - int (*tcl_RemoveInterpResolvers) (Tcl_Interp * interp, CONST char * name); /* 130 */ - void (*tcl_SetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 131 */ - int (*tclpHasSockets) (Tcl_Interp * interp); /* 132 */ - struct tm * (*tclpGetDate) (CONST time_t * time, int useGMT); /* 133 */ - void *reserved134; - void *reserved135; - void *reserved136; - void *reserved137; - CONST84_RETURN char * (*tclGetEnv) (CONST char * name, Tcl_DString * valuePtr); /* 138 */ - void *reserved139; - void *reserved140; - CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ - int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ - int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ - void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ - struct AuxDataType * (*tclGetAuxDataType) (char * typeName); /* 145 */ - TclHandle (*tclHandleCreate) (VOID * ptr); /* 146 */ - void (*tclHandleFree) (TclHandle handle); /* 147 */ - TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ - void (*tclHandleRelease) (TclHandle handle); /* 149 */ - int (*tclRegAbout) (Tcl_Interp * interp, Tcl_RegExp re); /* 150 */ - void (*tclRegExpRangeUniChar) (Tcl_RegExp re, int index, int * startPtr, int * endPtr); /* 151 */ - void (*tclSetLibraryPath) (Tcl_Obj * pathPtr); /* 152 */ - Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */ - void *reserved154; - void *reserved155; - void (*tclRegError) (Tcl_Interp * interp, CONST char * msg, int status); /* 156 */ - Var * (*tclVarTraceExists) (Tcl_Interp * interp, CONST char * varName); /* 157 */ - void (*tclSetStartupScriptFileName) (CONST char * filename); /* 158 */ - CONST84_RETURN char * (*tclGetStartupScriptFileName) (void); /* 159 */ - void *reserved160; - int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ - void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ - void * (*tclGetInstructionTable) (void); /* 163 */ - void (*tclExpandCodeArray) (void * envPtr); /* 164 */ - void (*tclpSetInitialEncodings) (void); /* 165 */ - int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ - void (*tclSetStartupScriptPath) (Tcl_Obj * pathPtr); /* 167 */ - Tcl_Obj * (*tclGetStartupScriptPath) (void); /* 168 */ - int (*tclpUtfNcmp2) (CONST char * s1, CONST char * s2, unsigned long n); /* 169 */ - int (*tclCheckInterpTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 170 */ - int (*tclCheckExecutionTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 171 */ - int (*tclInThreadExit) (void); /* 172 */ - int (*tclUniCharMatch) (CONST Tcl_UniChar * string, int strLen, CONST Tcl_UniChar * pattern, int ptnLen, int flags); /* 173 */ - void *reserved174; - int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, CONST char * part1, CONST char * part2, int flags, int leaveErrMsg); /* 175 */ - void (*tclCleanupVar) (Var * varPtr, Var * arrayPtr); /* 176 */ - void (*tclVarErrMsg) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * operation, CONST char * reason); /* 177 */ - void (*tcl_SetStartupScript) (Tcl_Obj * pathPtr, CONST char* encodingName); /* 178 */ - Tcl_Obj * (*tcl_GetStartupScript) (CONST char ** encodingNamePtr); /* 179 */ - void *reserved180; - void *reserved181; - struct tm * (*tclpLocaltime) (CONST time_t * clock); /* 182 */ - struct tm * (*tclpGmtime) (CONST time_t * clock); /* 183 */ - void *reserved184; - void *reserved185; - void *reserved186; - void *reserved187; - void *reserved188; - void *reserved189; - void *reserved190; - void *reserved191; - void *reserved192; - void *reserved193; - void *reserved194; - void *reserved195; - void *reserved196; - void *reserved197; - int (*tclObjGetFrame) (Tcl_Interp * interp, Tcl_Obj * objPtr, CallFrame ** framePtrPtr); /* 198 */ - void *reserved199; - int (*tclpObjRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 200 */ - int (*tclpObjCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 201 */ - int (*tclpObjCreateDirectory) (Tcl_Obj * pathPtr); /* 202 */ - int (*tclpObjDeleteFile) (Tcl_Obj * pathPtr); /* 203 */ - int (*tclpObjCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 204 */ - int (*tclpObjRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 205 */ - int (*tclpObjStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 206 */ - int (*tclpObjAccess) (Tcl_Obj * pathPtr, int mode); /* 207 */ - Tcl_Channel (*tclpOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions); /* 208 */ - void *reserved209; - void *reserved210; - void *reserved211; - void (*tclpFindExecutable) (CONST char * argv0); /* 212 */ - Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */ - void (*tclSetObjNameOfExecutable) (Tcl_Obj * name, Tcl_Encoding encoding); /* 214 */ - void * (*tclStackAlloc) (Tcl_Interp * interp, int numBytes); /* 215 */ - void (*tclStackFree) (Tcl_Interp * interp, void * freePtr); /* 216 */ - int (*tclPushStackFrame) (Tcl_Interp * interp, Tcl_CallFrame ** framePtrPtr, Tcl_Namespace * namespacePtr, int isProcCallFrame); /* 217 */ - void (*tclPopStackFrame) (Tcl_Interp * interp); /* 218 */ - void *reserved219; - void *reserved220; - void *reserved221; - void *reserved222; - void *reserved223; - TclPlatformType * (*tclGetPlatform) (void); /* 224 */ - Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *CONST keyv[], int flags); /* 225 */ - int (*tclObjBeingDeleted) (Tcl_Obj * objPtr); /* 226 */ - void (*tclSetNsPath) (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); /* 227 */ - int (*tclObjInterpProcCore) (register Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 228 */ - int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, CONST char * myName, int myFlags, int index); /* 229 */ - Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, CONST char * part2, int flags, CONST char * msg, CONST int createPart1, CONST int createPart2, Var ** arrayPtrPtr); /* 230 */ - int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ - int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 232 */ - void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ - Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ - void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ - void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ - int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ - int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ - Tcl_ObjCmdProc *tclNRInterpProc; /* 239 */ - int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ - struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ - void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ - int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 243 */ -} TclIntStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclIntStubs *tclIntStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -/* Slot 0 is reserved */ -/* Slot 1 is reserved */ -/* Slot 2 is reserved */ -#ifndef TclAllocateFreeObjects -#define TclAllocateFreeObjects \ - (tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */ -#endif -/* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* MACOSX */ -#ifndef TclCleanupCommand -#define TclCleanupCommand \ - (tclIntStubsPtr->tclCleanupCommand) /* 6 */ -#endif -#ifndef TclCopyAndCollapse -#define TclCopyAndCollapse \ - (tclIntStubsPtr->tclCopyAndCollapse) /* 7 */ -#endif -#ifndef TclCopyChannel -#define TclCopyChannel \ - (tclIntStubsPtr->tclCopyChannel) /* 8 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* MACOSX */ -#ifndef TclCreateProc -#define TclCreateProc \ - (tclIntStubsPtr->tclCreateProc) /* 10 */ -#endif -#ifndef TclDeleteCompiledLocalVars -#define TclDeleteCompiledLocalVars \ - (tclIntStubsPtr->tclDeleteCompiledLocalVars) /* 11 */ -#endif -#ifndef TclDeleteVars -#define TclDeleteVars \ - (tclIntStubsPtr->tclDeleteVars) /* 12 */ -#endif -/* Slot 13 is reserved */ -#ifndef TclDumpMemoryInfo -#define TclDumpMemoryInfo \ - (tclIntStubsPtr->tclDumpMemoryInfo) /* 14 */ -#endif -/* Slot 15 is reserved */ -#ifndef TclExprFloatError -#define TclExprFloatError \ - (tclIntStubsPtr->tclExprFloatError) /* 16 */ -#endif -/* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ -/* Slot 21 is reserved */ -#ifndef TclFindElement -#define TclFindElement \ - (tclIntStubsPtr->tclFindElement) /* 22 */ -#endif -#ifndef TclFindProc -#define TclFindProc \ - (tclIntStubsPtr->tclFindProc) /* 23 */ -#endif -/* Slot 24 is reserved */ -#ifndef TclFreePackageInfo -#define TclFreePackageInfo \ - (tclIntStubsPtr->tclFreePackageInfo) /* 25 */ -#endif -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -#ifndef TclpGetDefaultStdChannel -#define TclpGetDefaultStdChannel \ - (tclIntStubsPtr->tclpGetDefaultStdChannel) /* 28 */ -#endif -/* Slot 29 is reserved */ -/* Slot 30 is reserved */ -#ifndef TclGetExtension -#define TclGetExtension \ - (tclIntStubsPtr->tclGetExtension) /* 31 */ -#endif -#ifndef TclGetFrame -#define TclGetFrame \ - (tclIntStubsPtr->tclGetFrame) /* 32 */ -#endif -/* Slot 33 is reserved */ -#ifndef TclGetIntForIndex -#define TclGetIntForIndex \ - (tclIntStubsPtr->tclGetIntForIndex) /* 34 */ -#endif -/* Slot 35 is reserved */ -/* Slot 36 is reserved */ -#ifndef TclGetLoadedPackages -#define TclGetLoadedPackages \ - (tclIntStubsPtr->tclGetLoadedPackages) /* 37 */ -#endif -#ifndef TclGetNamespaceForQualName -#define TclGetNamespaceForQualName \ - (tclIntStubsPtr->tclGetNamespaceForQualName) /* 38 */ -#endif -#ifndef TclGetObjInterpProc -#define TclGetObjInterpProc \ - (tclIntStubsPtr->tclGetObjInterpProc) /* 39 */ -#endif -#ifndef TclGetOpenMode -#define TclGetOpenMode \ - (tclIntStubsPtr->tclGetOpenMode) /* 40 */ -#endif -#ifndef TclGetOriginalCommand -#define TclGetOriginalCommand \ - (tclIntStubsPtr->tclGetOriginalCommand) /* 41 */ -#endif -#ifndef TclpGetUserHome -#define TclpGetUserHome \ - (tclIntStubsPtr->tclpGetUserHome) /* 42 */ -#endif -/* Slot 43 is reserved */ -#ifndef TclGuessPackageName -#define TclGuessPackageName \ - (tclIntStubsPtr->tclGuessPackageName) /* 44 */ -#endif -#ifndef TclHideUnsafeCommands -#define TclHideUnsafeCommands \ - (tclIntStubsPtr->tclHideUnsafeCommands) /* 45 */ -#endif -#ifndef TclInExit -#define TclInExit \ - (tclIntStubsPtr->tclInExit) /* 46 */ -#endif -/* Slot 47 is reserved */ -/* Slot 48 is reserved */ -/* Slot 49 is reserved */ -#ifndef TclInitCompiledLocals -#define TclInitCompiledLocals \ - (tclIntStubsPtr->tclInitCompiledLocals) /* 50 */ -#endif -#ifndef TclInterpInit -#define TclInterpInit \ - (tclIntStubsPtr->tclInterpInit) /* 51 */ -#endif -/* Slot 52 is reserved */ -#ifndef TclInvokeObjectCommand -#define TclInvokeObjectCommand \ - (tclIntStubsPtr->tclInvokeObjectCommand) /* 53 */ -#endif -#ifndef TclInvokeStringCommand -#define TclInvokeStringCommand \ - (tclIntStubsPtr->tclInvokeStringCommand) /* 54 */ -#endif -#ifndef TclIsProc -#define TclIsProc \ - (tclIntStubsPtr->tclIsProc) /* 55 */ -#endif -/* Slot 56 is reserved */ -/* Slot 57 is reserved */ -#ifndef TclLookupVar -#define TclLookupVar \ - (tclIntStubsPtr->tclLookupVar) /* 58 */ -#endif -/* Slot 59 is reserved */ -#ifndef TclNeedSpace -#define TclNeedSpace \ - (tclIntStubsPtr->tclNeedSpace) /* 60 */ -#endif -#ifndef TclNewProcBodyObj -#define TclNewProcBodyObj \ - (tclIntStubsPtr->tclNewProcBodyObj) /* 61 */ -#endif -#ifndef TclObjCommandComplete -#define TclObjCommandComplete \ - (tclIntStubsPtr->tclObjCommandComplete) /* 62 */ -#endif -#ifndef TclObjInterpProc -#define TclObjInterpProc \ - (tclIntStubsPtr->tclObjInterpProc) /* 63 */ -#endif -#ifndef TclObjInvoke -#define TclObjInvoke \ - (tclIntStubsPtr->tclObjInvoke) /* 64 */ -#endif -/* Slot 65 is reserved */ -/* Slot 66 is reserved */ -/* Slot 67 is reserved */ -/* Slot 68 is reserved */ -#ifndef TclpAlloc -#define TclpAlloc \ - (tclIntStubsPtr->tclpAlloc) /* 69 */ -#endif -/* Slot 70 is reserved */ -/* Slot 71 is reserved */ -/* Slot 72 is reserved */ -/* Slot 73 is reserved */ -#ifndef TclpFree -#define TclpFree \ - (tclIntStubsPtr->tclpFree) /* 74 */ -#endif -#ifndef TclpGetClicks -#define TclpGetClicks \ - (tclIntStubsPtr->tclpGetClicks) /* 75 */ -#endif -#ifndef TclpGetSeconds -#define TclpGetSeconds \ - (tclIntStubsPtr->tclpGetSeconds) /* 76 */ -#endif -#ifndef TclpGetTime -#define TclpGetTime \ - (tclIntStubsPtr->tclpGetTime) /* 77 */ -#endif -#ifndef TclpGetTimeZone -#define TclpGetTimeZone \ - (tclIntStubsPtr->tclpGetTimeZone) /* 78 */ -#endif -/* Slot 79 is reserved */ -/* Slot 80 is reserved */ -#ifndef TclpRealloc -#define TclpRealloc \ - (tclIntStubsPtr->tclpRealloc) /* 81 */ -#endif -/* Slot 82 is reserved */ -/* Slot 83 is reserved */ -/* Slot 84 is reserved */ -/* Slot 85 is reserved */ -/* Slot 86 is reserved */ -/* Slot 87 is reserved */ -#ifndef TclPrecTraceProc -#define TclPrecTraceProc \ - (tclIntStubsPtr->tclPrecTraceProc) /* 88 */ -#endif -#ifndef TclPreventAliasLoop -#define TclPreventAliasLoop \ - (tclIntStubsPtr->tclPreventAliasLoop) /* 89 */ -#endif -/* Slot 90 is reserved */ -#ifndef TclProcCleanupProc -#define TclProcCleanupProc \ - (tclIntStubsPtr->tclProcCleanupProc) /* 91 */ -#endif -#ifndef TclProcCompileProc -#define TclProcCompileProc \ - (tclIntStubsPtr->tclProcCompileProc) /* 92 */ -#endif -#ifndef TclProcDeleteProc -#define TclProcDeleteProc \ - (tclIntStubsPtr->tclProcDeleteProc) /* 93 */ -#endif -/* Slot 94 is reserved */ -/* Slot 95 is reserved */ -#ifndef TclRenameCommand -#define TclRenameCommand \ - (tclIntStubsPtr->tclRenameCommand) /* 96 */ -#endif -#ifndef TclResetShadowedCmdRefs -#define TclResetShadowedCmdRefs \ - (tclIntStubsPtr->tclResetShadowedCmdRefs) /* 97 */ -#endif -#ifndef TclServiceIdle -#define TclServiceIdle \ - (tclIntStubsPtr->tclServiceIdle) /* 98 */ -#endif -/* Slot 99 is reserved */ -/* Slot 100 is reserved */ -#ifndef TclSetPreInitScript -#define TclSetPreInitScript \ - (tclIntStubsPtr->tclSetPreInitScript) /* 101 */ -#endif -#ifndef TclSetupEnv -#define TclSetupEnv \ - (tclIntStubsPtr->tclSetupEnv) /* 102 */ -#endif -#ifndef TclSockGetPort -#define TclSockGetPort \ - (tclIntStubsPtr->tclSockGetPort) /* 103 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* MACOSX */ -/* Slot 105 is reserved */ -/* Slot 106 is reserved */ -/* Slot 107 is reserved */ -#ifndef TclTeardownNamespace -#define TclTeardownNamespace \ - (tclIntStubsPtr->tclTeardownNamespace) /* 108 */ -#endif -#ifndef TclUpdateReturnInfo -#define TclUpdateReturnInfo \ - (tclIntStubsPtr->tclUpdateReturnInfo) /* 109 */ -#endif -/* Slot 110 is reserved */ -#ifndef Tcl_AddInterpResolvers -#define Tcl_AddInterpResolvers \ - (tclIntStubsPtr->tcl_AddInterpResolvers) /* 111 */ -#endif -#ifndef Tcl_AppendExportList -#define Tcl_AppendExportList \ - (tclIntStubsPtr->tcl_AppendExportList) /* 112 */ -#endif -#ifndef Tcl_CreateNamespace -#define Tcl_CreateNamespace \ - (tclIntStubsPtr->tcl_CreateNamespace) /* 113 */ -#endif -#ifndef Tcl_DeleteNamespace -#define Tcl_DeleteNamespace \ - (tclIntStubsPtr->tcl_DeleteNamespace) /* 114 */ -#endif -#ifndef Tcl_Export -#define Tcl_Export \ - (tclIntStubsPtr->tcl_Export) /* 115 */ -#endif -#ifndef Tcl_FindCommand -#define Tcl_FindCommand \ - (tclIntStubsPtr->tcl_FindCommand) /* 116 */ -#endif -#ifndef Tcl_FindNamespace -#define Tcl_FindNamespace \ - (tclIntStubsPtr->tcl_FindNamespace) /* 117 */ -#endif -#ifndef Tcl_GetInterpResolvers -#define Tcl_GetInterpResolvers \ - (tclIntStubsPtr->tcl_GetInterpResolvers) /* 118 */ -#endif -#ifndef Tcl_GetNamespaceResolvers -#define Tcl_GetNamespaceResolvers \ - (tclIntStubsPtr->tcl_GetNamespaceResolvers) /* 119 */ -#endif -#ifndef Tcl_FindNamespaceVar -#define Tcl_FindNamespaceVar \ - (tclIntStubsPtr->tcl_FindNamespaceVar) /* 120 */ -#endif -#ifndef Tcl_ForgetImport -#define Tcl_ForgetImport \ - (tclIntStubsPtr->tcl_ForgetImport) /* 121 */ -#endif -#ifndef Tcl_GetCommandFromObj -#define Tcl_GetCommandFromObj \ - (tclIntStubsPtr->tcl_GetCommandFromObj) /* 122 */ -#endif -#ifndef Tcl_GetCommandFullName -#define Tcl_GetCommandFullName \ - (tclIntStubsPtr->tcl_GetCommandFullName) /* 123 */ -#endif -#ifndef Tcl_GetCurrentNamespace -#define Tcl_GetCurrentNamespace \ - (tclIntStubsPtr->tcl_GetCurrentNamespace) /* 124 */ -#endif -#ifndef Tcl_GetGlobalNamespace -#define Tcl_GetGlobalNamespace \ - (tclIntStubsPtr->tcl_GetGlobalNamespace) /* 125 */ -#endif -#ifndef Tcl_GetVariableFullName -#define Tcl_GetVariableFullName \ - (tclIntStubsPtr->tcl_GetVariableFullName) /* 126 */ -#endif -#ifndef Tcl_Import -#define Tcl_Import \ - (tclIntStubsPtr->tcl_Import) /* 127 */ -#endif -#ifndef Tcl_PopCallFrame -#define Tcl_PopCallFrame \ - (tclIntStubsPtr->tcl_PopCallFrame) /* 128 */ -#endif -#ifndef Tcl_PushCallFrame -#define Tcl_PushCallFrame \ - (tclIntStubsPtr->tcl_PushCallFrame) /* 129 */ -#endif -#ifndef Tcl_RemoveInterpResolvers -#define Tcl_RemoveInterpResolvers \ - (tclIntStubsPtr->tcl_RemoveInterpResolvers) /* 130 */ -#endif -#ifndef Tcl_SetNamespaceResolvers -#define Tcl_SetNamespaceResolvers \ - (tclIntStubsPtr->tcl_SetNamespaceResolvers) /* 131 */ -#endif -#ifndef TclpHasSockets -#define TclpHasSockets \ - (tclIntStubsPtr->tclpHasSockets) /* 132 */ -#endif -#ifndef TclpGetDate -#define TclpGetDate \ - (tclIntStubsPtr->tclpGetDate) /* 133 */ -#endif -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ -/* Slot 136 is reserved */ -/* Slot 137 is reserved */ -#ifndef TclGetEnv -#define TclGetEnv \ - (tclIntStubsPtr->tclGetEnv) /* 138 */ -#endif -/* Slot 139 is reserved */ -/* Slot 140 is reserved */ -#ifndef TclpGetCwd -#define TclpGetCwd \ - (tclIntStubsPtr->tclpGetCwd) /* 141 */ -#endif -#ifndef TclSetByteCodeFromAny -#define TclSetByteCodeFromAny \ - (tclIntStubsPtr->tclSetByteCodeFromAny) /* 142 */ -#endif -#ifndef TclAddLiteralObj -#define TclAddLiteralObj \ - (tclIntStubsPtr->tclAddLiteralObj) /* 143 */ -#endif -#ifndef TclHideLiteral -#define TclHideLiteral \ - (tclIntStubsPtr->tclHideLiteral) /* 144 */ -#endif -#ifndef TclGetAuxDataType -#define TclGetAuxDataType \ - (tclIntStubsPtr->tclGetAuxDataType) /* 145 */ -#endif -#ifndef TclHandleCreate -#define TclHandleCreate \ - (tclIntStubsPtr->tclHandleCreate) /* 146 */ -#endif -#ifndef TclHandleFree -#define TclHandleFree \ - (tclIntStubsPtr->tclHandleFree) /* 147 */ -#endif -#ifndef TclHandlePreserve -#define TclHandlePreserve \ - (tclIntStubsPtr->tclHandlePreserve) /* 148 */ -#endif -#ifndef TclHandleRelease -#define TclHandleRelease \ - (tclIntStubsPtr->tclHandleRelease) /* 149 */ -#endif -#ifndef TclRegAbout -#define TclRegAbout \ - (tclIntStubsPtr->tclRegAbout) /* 150 */ -#endif -#ifndef TclRegExpRangeUniChar -#define TclRegExpRangeUniChar \ - (tclIntStubsPtr->tclRegExpRangeUniChar) /* 151 */ -#endif -#ifndef TclSetLibraryPath -#define TclSetLibraryPath \ - (tclIntStubsPtr->tclSetLibraryPath) /* 152 */ -#endif -#ifndef TclGetLibraryPath -#define TclGetLibraryPath \ - (tclIntStubsPtr->tclGetLibraryPath) /* 153 */ -#endif -/* Slot 154 is reserved */ -/* Slot 155 is reserved */ -#ifndef TclRegError -#define TclRegError \ - (tclIntStubsPtr->tclRegError) /* 156 */ -#endif -#ifndef TclVarTraceExists -#define TclVarTraceExists \ - (tclIntStubsPtr->tclVarTraceExists) /* 157 */ -#endif -#ifndef TclSetStartupScriptFileName -#define TclSetStartupScriptFileName \ - (tclIntStubsPtr->tclSetStartupScriptFileName) /* 158 */ -#endif -#ifndef TclGetStartupScriptFileName -#define TclGetStartupScriptFileName \ - (tclIntStubsPtr->tclGetStartupScriptFileName) /* 159 */ -#endif -/* Slot 160 is reserved */ -#ifndef TclChannelTransform -#define TclChannelTransform \ - (tclIntStubsPtr->tclChannelTransform) /* 161 */ -#endif -#ifndef TclChannelEventScriptInvoker -#define TclChannelEventScriptInvoker \ - (tclIntStubsPtr->tclChannelEventScriptInvoker) /* 162 */ -#endif -#ifndef TclGetInstructionTable -#define TclGetInstructionTable \ - (tclIntStubsPtr->tclGetInstructionTable) /* 163 */ -#endif -#ifndef TclExpandCodeArray -#define TclExpandCodeArray \ - (tclIntStubsPtr->tclExpandCodeArray) /* 164 */ -#endif -#ifndef TclpSetInitialEncodings -#define TclpSetInitialEncodings \ - (tclIntStubsPtr->tclpSetInitialEncodings) /* 165 */ -#endif -#ifndef TclListObjSetElement -#define TclListObjSetElement \ - (tclIntStubsPtr->tclListObjSetElement) /* 166 */ -#endif -#ifndef TclSetStartupScriptPath -#define TclSetStartupScriptPath \ - (tclIntStubsPtr->tclSetStartupScriptPath) /* 167 */ -#endif -#ifndef TclGetStartupScriptPath -#define TclGetStartupScriptPath \ - (tclIntStubsPtr->tclGetStartupScriptPath) /* 168 */ -#endif -#ifndef TclpUtfNcmp2 -#define TclpUtfNcmp2 \ - (tclIntStubsPtr->tclpUtfNcmp2) /* 169 */ -#endif -#ifndef TclCheckInterpTraces -#define TclCheckInterpTraces \ - (tclIntStubsPtr->tclCheckInterpTraces) /* 170 */ -#endif -#ifndef TclCheckExecutionTraces -#define TclCheckExecutionTraces \ - (tclIntStubsPtr->tclCheckExecutionTraces) /* 171 */ -#endif -#ifndef TclInThreadExit -#define TclInThreadExit \ - (tclIntStubsPtr->tclInThreadExit) /* 172 */ -#endif -#ifndef TclUniCharMatch -#define TclUniCharMatch \ - (tclIntStubsPtr->tclUniCharMatch) /* 173 */ -#endif -/* Slot 174 is reserved */ -#ifndef TclCallVarTraces -#define TclCallVarTraces \ - (tclIntStubsPtr->tclCallVarTraces) /* 175 */ -#endif -#ifndef TclCleanupVar -#define TclCleanupVar \ - (tclIntStubsPtr->tclCleanupVar) /* 176 */ -#endif -#ifndef TclVarErrMsg -#define TclVarErrMsg \ - (tclIntStubsPtr->tclVarErrMsg) /* 177 */ -#endif -#ifndef Tcl_SetStartupScript -#define Tcl_SetStartupScript \ - (tclIntStubsPtr->tcl_SetStartupScript) /* 178 */ -#endif -#ifndef Tcl_GetStartupScript -#define Tcl_GetStartupScript \ - (tclIntStubsPtr->tcl_GetStartupScript) /* 179 */ -#endif -/* Slot 180 is reserved */ -/* Slot 181 is reserved */ -#ifndef TclpLocaltime -#define TclpLocaltime \ - (tclIntStubsPtr->tclpLocaltime) /* 182 */ -#endif -#ifndef TclpGmtime -#define TclpGmtime \ - (tclIntStubsPtr->tclpGmtime) /* 183 */ -#endif -/* Slot 184 is reserved */ -/* Slot 185 is reserved */ -/* Slot 186 is reserved */ -/* Slot 187 is reserved */ -/* Slot 188 is reserved */ -/* Slot 189 is reserved */ -/* Slot 190 is reserved */ -/* Slot 191 is reserved */ -/* Slot 192 is reserved */ -/* Slot 193 is reserved */ -/* Slot 194 is reserved */ -/* Slot 195 is reserved */ -/* Slot 196 is reserved */ -/* Slot 197 is reserved */ -#ifndef TclObjGetFrame -#define TclObjGetFrame \ - (tclIntStubsPtr->tclObjGetFrame) /* 198 */ -#endif -/* Slot 199 is reserved */ -#ifndef TclpObjRemoveDirectory -#define TclpObjRemoveDirectory \ - (tclIntStubsPtr->tclpObjRemoveDirectory) /* 200 */ -#endif -#ifndef TclpObjCopyDirectory -#define TclpObjCopyDirectory \ - (tclIntStubsPtr->tclpObjCopyDirectory) /* 201 */ -#endif -#ifndef TclpObjCreateDirectory -#define TclpObjCreateDirectory \ - (tclIntStubsPtr->tclpObjCreateDirectory) /* 202 */ -#endif -#ifndef TclpObjDeleteFile -#define TclpObjDeleteFile \ - (tclIntStubsPtr->tclpObjDeleteFile) /* 203 */ -#endif -#ifndef TclpObjCopyFile -#define TclpObjCopyFile \ - (tclIntStubsPtr->tclpObjCopyFile) /* 204 */ -#endif -#ifndef TclpObjRenameFile -#define TclpObjRenameFile \ - (tclIntStubsPtr->tclpObjRenameFile) /* 205 */ -#endif -#ifndef TclpObjStat -#define TclpObjStat \ - (tclIntStubsPtr->tclpObjStat) /* 206 */ -#endif -#ifndef TclpObjAccess -#define TclpObjAccess \ - (tclIntStubsPtr->tclpObjAccess) /* 207 */ -#endif -#ifndef TclpOpenFileChannel -#define TclpOpenFileChannel \ - (tclIntStubsPtr->tclpOpenFileChannel) /* 208 */ -#endif -/* Slot 209 is reserved */ -/* Slot 210 is reserved */ -/* Slot 211 is reserved */ -#ifndef TclpFindExecutable -#define TclpFindExecutable \ - (tclIntStubsPtr->tclpFindExecutable) /* 212 */ -#endif -#ifndef TclGetObjNameOfExecutable -#define TclGetObjNameOfExecutable \ - (tclIntStubsPtr->tclGetObjNameOfExecutable) /* 213 */ -#endif -#ifndef TclSetObjNameOfExecutable -#define TclSetObjNameOfExecutable \ - (tclIntStubsPtr->tclSetObjNameOfExecutable) /* 214 */ -#endif -#ifndef TclStackAlloc -#define TclStackAlloc \ - (tclIntStubsPtr->tclStackAlloc) /* 215 */ -#endif -#ifndef TclStackFree -#define TclStackFree \ - (tclIntStubsPtr->tclStackFree) /* 216 */ -#endif -#ifndef TclPushStackFrame -#define TclPushStackFrame \ - (tclIntStubsPtr->tclPushStackFrame) /* 217 */ -#endif -#ifndef TclPopStackFrame -#define TclPopStackFrame \ - (tclIntStubsPtr->tclPopStackFrame) /* 218 */ -#endif -/* Slot 219 is reserved */ -/* Slot 220 is reserved */ -/* Slot 221 is reserved */ -/* Slot 222 is reserved */ -/* Slot 223 is reserved */ -#ifndef TclGetPlatform -#define TclGetPlatform \ - (tclIntStubsPtr->tclGetPlatform) /* 224 */ -#endif -#ifndef TclTraceDictPath -#define TclTraceDictPath \ - (tclIntStubsPtr->tclTraceDictPath) /* 225 */ -#endif -#ifndef TclObjBeingDeleted -#define TclObjBeingDeleted \ - (tclIntStubsPtr->tclObjBeingDeleted) /* 226 */ -#endif -#ifndef TclSetNsPath -#define TclSetNsPath \ - (tclIntStubsPtr->tclSetNsPath) /* 227 */ -#endif -#ifndef TclObjInterpProcCore -#define TclObjInterpProcCore \ - (tclIntStubsPtr->tclObjInterpProcCore) /* 228 */ -#endif -#ifndef TclPtrMakeUpvar -#define TclPtrMakeUpvar \ - (tclIntStubsPtr->tclPtrMakeUpvar) /* 229 */ -#endif -#ifndef TclObjLookupVar -#define TclObjLookupVar \ - (tclIntStubsPtr->tclObjLookupVar) /* 230 */ -#endif -#ifndef TclGetNamespaceFromObj -#define TclGetNamespaceFromObj \ - (tclIntStubsPtr->tclGetNamespaceFromObj) /* 231 */ -#endif -#ifndef TclEvalObjEx -#define TclEvalObjEx \ - (tclIntStubsPtr->tclEvalObjEx) /* 232 */ -#endif -#ifndef TclGetSrcInfoForPc -#define TclGetSrcInfoForPc \ - (tclIntStubsPtr->tclGetSrcInfoForPc) /* 233 */ -#endif -#ifndef TclVarHashCreateVar -#define TclVarHashCreateVar \ - (tclIntStubsPtr->tclVarHashCreateVar) /* 234 */ -#endif -#ifndef TclInitVarHashTable -#define TclInitVarHashTable \ - (tclIntStubsPtr->tclInitVarHashTable) /* 235 */ -#endif -#ifndef TclBackgroundException -#define TclBackgroundException \ - (tclIntStubsPtr->tclBackgroundException) /* 236 */ -#endif -#ifndef TclResetCancellation -#define TclResetCancellation \ - (tclIntStubsPtr->tclResetCancellation) /* 237 */ -#endif -#ifndef TclEvalObjv_NR2 -#define TclEvalObjv_NR2 \ - (tclIntStubsPtr->tclEvalObjv_NR2) /* 238 */ -#endif -#ifndef TclNRInterpProc -#define TclNRInterpProc \ - (*tclIntStubsPtr->tclNRInterpProc) /* 239 */ -#endif -#ifndef TclNRInterpProcCore -#define TclNRInterpProcCore \ - (tclIntStubsPtr->tclNRInterpProcCore) /* 240 */ -#endif -#ifndef TclNRPushRecord -#define TclNRPushRecord \ - (tclIntStubsPtr->tclNRPushRecord) /* 241 */ -#endif -#ifndef TclNRPopAndFreeRecord -#define TclNRPopAndFreeRecord \ - (tclIntStubsPtr->tclNRPopAndFreeRecord) /* 242 */ -#endif -#ifndef TclNREvalObjEx -#define TclNREvalObjEx \ - (tclIntStubsPtr->tclNREvalObjEx) /* 243 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLINTDECLS */ +/* + * tclIntDecls.h -- + * + * This file contains the declarations for all unsupported + * functions that are exported by the Tcl library. These + * interfaces are not guaranteed to remain the same between + * versions. Use at your own risk. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclIntDecls.h,v 1.119 2008/07/21 21:02:17 ferrieux Exp $ + */ + +#ifndef _TCLINTDECLS +#define _TCLINTDECLS + +#include "tclPort.h" + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclInt.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +/* Slot 0 is reserved */ +/* Slot 1 is reserved */ +/* Slot 2 is reserved */ +#ifndef TclAllocateFreeObjects_TCL_DECLARED +#define TclAllocateFreeObjects_TCL_DECLARED +/* 3 */ +EXTERN void TclAllocateFreeObjects (void); +#endif +/* Slot 4 is reserved */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCleanupChildren_TCL_DECLARED +#define TclCleanupChildren_TCL_DECLARED +/* 5 */ +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, + Tcl_Pid * pidPtr, Tcl_Channel errorChan); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCleanupChildren_TCL_DECLARED +#define TclCleanupChildren_TCL_DECLARED +/* 5 */ +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, + Tcl_Pid * pidPtr, Tcl_Channel errorChan); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCleanupChildren_TCL_DECLARED +#define TclCleanupChildren_TCL_DECLARED +/* 5 */ +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, + Tcl_Pid * pidPtr, Tcl_Channel errorChan); +#endif +#endif /* MACOSX */ +#ifndef TclCleanupCommand_TCL_DECLARED +#define TclCleanupCommand_TCL_DECLARED +/* 6 */ +EXTERN void TclCleanupCommand (Command * cmdPtr); +#endif +#ifndef TclCopyAndCollapse_TCL_DECLARED +#define TclCopyAndCollapse_TCL_DECLARED +/* 7 */ +EXTERN int TclCopyAndCollapse (int count, CONST char * src, + char * dst); +#endif +#ifndef TclCopyChannel_TCL_DECLARED +#define TclCopyChannel_TCL_DECLARED +/* 8 */ +EXTERN int TclCopyChannel (Tcl_Interp * interp, + Tcl_Channel inChan, Tcl_Channel outChan, + int toRead, Tcl_Obj * cmdPtr); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCreatePipeline_TCL_DECLARED +#define TclCreatePipeline_TCL_DECLARED +/* 9 */ +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + CONST char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, + TclFile * errFilePtr); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCreatePipeline_TCL_DECLARED +#define TclCreatePipeline_TCL_DECLARED +/* 9 */ +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + CONST char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, + TclFile * errFilePtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCreatePipeline_TCL_DECLARED +#define TclCreatePipeline_TCL_DECLARED +/* 9 */ +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + CONST char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, + TclFile * errFilePtr); +#endif +#endif /* MACOSX */ +#ifndef TclCreateProc_TCL_DECLARED +#define TclCreateProc_TCL_DECLARED +/* 10 */ +EXTERN int TclCreateProc (Tcl_Interp * interp, + Namespace * nsPtr, CONST char * procName, + Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, + Proc ** procPtrPtr); +#endif +#ifndef TclDeleteCompiledLocalVars_TCL_DECLARED +#define TclDeleteCompiledLocalVars_TCL_DECLARED +/* 11 */ +EXTERN void TclDeleteCompiledLocalVars (Interp * iPtr, + CallFrame * framePtr); +#endif +#ifndef TclDeleteVars_TCL_DECLARED +#define TclDeleteVars_TCL_DECLARED +/* 12 */ +EXTERN void TclDeleteVars (Interp * iPtr, + TclVarHashTable * tablePtr); +#endif +/* Slot 13 is reserved */ +#ifndef TclDumpMemoryInfo_TCL_DECLARED +#define TclDumpMemoryInfo_TCL_DECLARED +/* 14 */ +EXTERN void TclDumpMemoryInfo (FILE * outFile); +#endif +/* Slot 15 is reserved */ +#ifndef TclExprFloatError_TCL_DECLARED +#define TclExprFloatError_TCL_DECLARED +/* 16 */ +EXTERN void TclExprFloatError (Tcl_Interp * interp, double value); +#endif +/* Slot 17 is reserved */ +/* Slot 18 is reserved */ +/* Slot 19 is reserved */ +/* Slot 20 is reserved */ +/* Slot 21 is reserved */ +#ifndef TclFindElement_TCL_DECLARED +#define TclFindElement_TCL_DECLARED +/* 22 */ +EXTERN int TclFindElement (Tcl_Interp * interp, + CONST char * listStr, int listLength, + CONST char ** elementPtr, + CONST char ** nextPtr, int * sizePtr, + int * bracePtr); +#endif +#ifndef TclFindProc_TCL_DECLARED +#define TclFindProc_TCL_DECLARED +/* 23 */ +EXTERN Proc * TclFindProc (Interp * iPtr, CONST char * procName); +#endif +/* Slot 24 is reserved */ +#ifndef TclFreePackageInfo_TCL_DECLARED +#define TclFreePackageInfo_TCL_DECLARED +/* 25 */ +EXTERN void TclFreePackageInfo (Interp * iPtr); +#endif +/* Slot 26 is reserved */ +/* Slot 27 is reserved */ +#ifndef TclpGetDefaultStdChannel_TCL_DECLARED +#define TclpGetDefaultStdChannel_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Channel TclpGetDefaultStdChannel (int type); +#endif +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +#ifndef TclGetExtension_TCL_DECLARED +#define TclGetExtension_TCL_DECLARED +/* 31 */ +EXTERN CONST char * TclGetExtension (CONST char * name); +#endif +#ifndef TclGetFrame_TCL_DECLARED +#define TclGetFrame_TCL_DECLARED +/* 32 */ +EXTERN int TclGetFrame (Tcl_Interp * interp, CONST char * str, + CallFrame ** framePtrPtr); +#endif +/* Slot 33 is reserved */ +#ifndef TclGetIntForIndex_TCL_DECLARED +#define TclGetIntForIndex_TCL_DECLARED +/* 34 */ +EXTERN int TclGetIntForIndex (Tcl_Interp * interp, + Tcl_Obj * objPtr, int endValue, + int * indexPtr); +#endif +/* Slot 35 is reserved */ +/* Slot 36 is reserved */ +#ifndef TclGetLoadedPackages_TCL_DECLARED +#define TclGetLoadedPackages_TCL_DECLARED +/* 37 */ +EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, + char * targetName); +#endif +#ifndef TclGetNamespaceForQualName_TCL_DECLARED +#define TclGetNamespaceForQualName_TCL_DECLARED +/* 38 */ +EXTERN int TclGetNamespaceForQualName (Tcl_Interp * interp, + CONST char * qualName, Namespace * cxtNsPtr, + int flags, Namespace ** nsPtrPtr, + Namespace ** altNsPtrPtr, + Namespace ** actualCxtPtrPtr, + CONST char ** simpleNamePtr); +#endif +#ifndef TclGetObjInterpProc_TCL_DECLARED +#define TclGetObjInterpProc_TCL_DECLARED +/* 39 */ +EXTERN TclObjCmdProcType TclGetObjInterpProc (void); +#endif +#ifndef TclGetOpenMode_TCL_DECLARED +#define TclGetOpenMode_TCL_DECLARED +/* 40 */ +EXTERN int TclGetOpenMode (Tcl_Interp * interp, + CONST char * str, int * seekFlagPtr); +#endif +#ifndef TclGetOriginalCommand_TCL_DECLARED +#define TclGetOriginalCommand_TCL_DECLARED +/* 41 */ +EXTERN Tcl_Command TclGetOriginalCommand (Tcl_Command command); +#endif +#ifndef TclpGetUserHome_TCL_DECLARED +#define TclpGetUserHome_TCL_DECLARED +/* 42 */ +EXTERN char * TclpGetUserHome (CONST char * name, + Tcl_DString * bufferPtr); +#endif +/* Slot 43 is reserved */ +#ifndef TclGuessPackageName_TCL_DECLARED +#define TclGuessPackageName_TCL_DECLARED +/* 44 */ +EXTERN int TclGuessPackageName (CONST char * fileName, + Tcl_DString * bufPtr); +#endif +#ifndef TclHideUnsafeCommands_TCL_DECLARED +#define TclHideUnsafeCommands_TCL_DECLARED +/* 45 */ +EXTERN int TclHideUnsafeCommands (Tcl_Interp * interp); +#endif +#ifndef TclInExit_TCL_DECLARED +#define TclInExit_TCL_DECLARED +/* 46 */ +EXTERN int TclInExit (void); +#endif +/* Slot 47 is reserved */ +/* Slot 48 is reserved */ +/* Slot 49 is reserved */ +#ifndef TclInitCompiledLocals_TCL_DECLARED +#define TclInitCompiledLocals_TCL_DECLARED +/* 50 */ +EXTERN void TclInitCompiledLocals (Tcl_Interp * interp, + CallFrame * framePtr, Namespace * nsPtr); +#endif +#ifndef TclInterpInit_TCL_DECLARED +#define TclInterpInit_TCL_DECLARED +/* 51 */ +EXTERN int TclInterpInit (Tcl_Interp * interp); +#endif +/* Slot 52 is reserved */ +#ifndef TclInvokeObjectCommand_TCL_DECLARED +#define TclInvokeObjectCommand_TCL_DECLARED +/* 53 */ +EXTERN int TclInvokeObjectCommand (ClientData clientData, + Tcl_Interp * interp, int argc, + CONST84 char ** argv); +#endif +#ifndef TclInvokeStringCommand_TCL_DECLARED +#define TclInvokeStringCommand_TCL_DECLARED +/* 54 */ +EXTERN int TclInvokeStringCommand (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef TclIsProc_TCL_DECLARED +#define TclIsProc_TCL_DECLARED +/* 55 */ +EXTERN Proc * TclIsProc (Command * cmdPtr); +#endif +/* Slot 56 is reserved */ +/* Slot 57 is reserved */ +#ifndef TclLookupVar_TCL_DECLARED +#define TclLookupVar_TCL_DECLARED +/* 58 */ +EXTERN Var * TclLookupVar (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, CONST char * msg, int createPart1, + int createPart2, Var ** arrayPtrPtr); +#endif +/* Slot 59 is reserved */ +#ifndef TclNeedSpace_TCL_DECLARED +#define TclNeedSpace_TCL_DECLARED +/* 60 */ +EXTERN int TclNeedSpace (CONST char * start, CONST char * end); +#endif +#ifndef TclNewProcBodyObj_TCL_DECLARED +#define TclNewProcBodyObj_TCL_DECLARED +/* 61 */ +EXTERN Tcl_Obj * TclNewProcBodyObj (Proc * procPtr); +#endif +#ifndef TclObjCommandComplete_TCL_DECLARED +#define TclObjCommandComplete_TCL_DECLARED +/* 62 */ +EXTERN int TclObjCommandComplete (Tcl_Obj * cmdPtr); +#endif +#ifndef TclObjInterpProc_TCL_DECLARED +#define TclObjInterpProc_TCL_DECLARED +/* 63 */ +EXTERN int TclObjInterpProc (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef TclObjInvoke_TCL_DECLARED +#define TclObjInvoke_TCL_DECLARED +/* 64 */ +EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +/* Slot 65 is reserved */ +/* Slot 66 is reserved */ +/* Slot 67 is reserved */ +/* Slot 68 is reserved */ +#ifndef TclpAlloc_TCL_DECLARED +#define TclpAlloc_TCL_DECLARED +/* 69 */ +EXTERN char * TclpAlloc (unsigned int size); +#endif +/* Slot 70 is reserved */ +/* Slot 71 is reserved */ +/* Slot 72 is reserved */ +/* Slot 73 is reserved */ +#ifndef TclpFree_TCL_DECLARED +#define TclpFree_TCL_DECLARED +/* 74 */ +EXTERN void TclpFree (char * ptr); +#endif +#ifndef TclpGetClicks_TCL_DECLARED +#define TclpGetClicks_TCL_DECLARED +/* 75 */ +EXTERN unsigned long TclpGetClicks (void); +#endif +#ifndef TclpGetSeconds_TCL_DECLARED +#define TclpGetSeconds_TCL_DECLARED +/* 76 */ +EXTERN unsigned long TclpGetSeconds (void); +#endif +#ifndef TclpGetTime_TCL_DECLARED +#define TclpGetTime_TCL_DECLARED +/* 77 */ +EXTERN void TclpGetTime (Tcl_Time * time); +#endif +#ifndef TclpGetTimeZone_TCL_DECLARED +#define TclpGetTimeZone_TCL_DECLARED +/* 78 */ +EXTERN int TclpGetTimeZone (unsigned long time); +#endif +/* Slot 79 is reserved */ +/* Slot 80 is reserved */ +#ifndef TclpRealloc_TCL_DECLARED +#define TclpRealloc_TCL_DECLARED +/* 81 */ +EXTERN char * TclpRealloc (char * ptr, unsigned int size); +#endif +/* Slot 82 is reserved */ +/* Slot 83 is reserved */ +/* Slot 84 is reserved */ +/* Slot 85 is reserved */ +/* Slot 86 is reserved */ +/* Slot 87 is reserved */ +#ifndef TclPrecTraceProc_TCL_DECLARED +#define TclPrecTraceProc_TCL_DECLARED +/* 88 */ +EXTERN char * TclPrecTraceProc (ClientData clientData, + Tcl_Interp * interp, CONST char * name1, + CONST char * name2, int flags); +#endif +#ifndef TclPreventAliasLoop_TCL_DECLARED +#define TclPreventAliasLoop_TCL_DECLARED +/* 89 */ +EXTERN int TclPreventAliasLoop (Tcl_Interp * interp, + Tcl_Interp * cmdInterp, Tcl_Command cmd); +#endif +/* Slot 90 is reserved */ +#ifndef TclProcCleanupProc_TCL_DECLARED +#define TclProcCleanupProc_TCL_DECLARED +/* 91 */ +EXTERN void TclProcCleanupProc (Proc * procPtr); +#endif +#ifndef TclProcCompileProc_TCL_DECLARED +#define TclProcCompileProc_TCL_DECLARED +/* 92 */ +EXTERN int TclProcCompileProc (Tcl_Interp * interp, + Proc * procPtr, Tcl_Obj * bodyPtr, + Namespace * nsPtr, CONST char * description, + CONST char * procName); +#endif +#ifndef TclProcDeleteProc_TCL_DECLARED +#define TclProcDeleteProc_TCL_DECLARED +/* 93 */ +EXTERN void TclProcDeleteProc (ClientData clientData); +#endif +/* Slot 94 is reserved */ +/* Slot 95 is reserved */ +#ifndef TclRenameCommand_TCL_DECLARED +#define TclRenameCommand_TCL_DECLARED +/* 96 */ +EXTERN int TclRenameCommand (Tcl_Interp * interp, + CONST char * oldName, CONST char * newName); +#endif +#ifndef TclResetShadowedCmdRefs_TCL_DECLARED +#define TclResetShadowedCmdRefs_TCL_DECLARED +/* 97 */ +EXTERN void TclResetShadowedCmdRefs (Tcl_Interp * interp, + Command * newCmdPtr); +#endif +#ifndef TclServiceIdle_TCL_DECLARED +#define TclServiceIdle_TCL_DECLARED +/* 98 */ +EXTERN int TclServiceIdle (void); +#endif +/* Slot 99 is reserved */ +/* Slot 100 is reserved */ +#ifndef TclSetPreInitScript_TCL_DECLARED +#define TclSetPreInitScript_TCL_DECLARED +/* 101 */ +EXTERN char * TclSetPreInitScript (char * string); +#endif +#ifndef TclSetupEnv_TCL_DECLARED +#define TclSetupEnv_TCL_DECLARED +/* 102 */ +EXTERN void TclSetupEnv (Tcl_Interp * interp); +#endif +#ifndef TclSockGetPort_TCL_DECLARED +#define TclSockGetPort_TCL_DECLARED +/* 103 */ +EXTERN int TclSockGetPort (Tcl_Interp * interp, + CONST char * str, CONST char * proto, + int * portPtr); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclSockMinimumBuffers_TCL_DECLARED +#define TclSockMinimumBuffers_TCL_DECLARED +/* 104 */ +EXTERN int TclSockMinimumBuffers (int sock, int size); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclSockMinimumBuffers_TCL_DECLARED +#define TclSockMinimumBuffers_TCL_DECLARED +/* 104 */ +EXTERN int TclSockMinimumBuffers (int sock, int size); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclSockMinimumBuffers_TCL_DECLARED +#define TclSockMinimumBuffers_TCL_DECLARED +/* 104 */ +EXTERN int TclSockMinimumBuffers (int sock, int size); +#endif +#endif /* MACOSX */ +/* Slot 105 is reserved */ +/* Slot 106 is reserved */ +/* Slot 107 is reserved */ +#ifndef TclTeardownNamespace_TCL_DECLARED +#define TclTeardownNamespace_TCL_DECLARED +/* 108 */ +EXTERN void TclTeardownNamespace (Namespace * nsPtr); +#endif +#ifndef TclUpdateReturnInfo_TCL_DECLARED +#define TclUpdateReturnInfo_TCL_DECLARED +/* 109 */ +EXTERN int TclUpdateReturnInfo (Interp * iPtr); +#endif +/* Slot 110 is reserved */ +#ifndef Tcl_AddInterpResolvers_TCL_DECLARED +#define Tcl_AddInterpResolvers_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_AddInterpResolvers (Tcl_Interp * interp, + CONST char * name, + Tcl_ResolveCmdProc * cmdProc, + Tcl_ResolveVarProc * varProc, + Tcl_ResolveCompiledVarProc * compiledVarProc); +#endif +#ifndef Tcl_AppendExportList_TCL_DECLARED +#define Tcl_AppendExportList_TCL_DECLARED +/* 112 */ +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_CreateNamespace_TCL_DECLARED +#define Tcl_CreateNamespace_TCL_DECLARED +/* 113 */ +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + CONST char * name, ClientData clientData, + Tcl_NamespaceDeleteProc * deleteProc); +#endif +#ifndef Tcl_DeleteNamespace_TCL_DECLARED +#define Tcl_DeleteNamespace_TCL_DECLARED +/* 114 */ +EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_Export_TCL_DECLARED +#define Tcl_Export_TCL_DECLARED +/* 115 */ +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int resetListFirst); +#endif +#ifndef Tcl_FindCommand_TCL_DECLARED +#define Tcl_FindCommand_TCL_DECLARED +/* 116 */ +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_FindNamespace_TCL_DECLARED +#define Tcl_FindNamespace_TCL_DECLARED +/* 117 */ +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_GetInterpResolvers_TCL_DECLARED +#define Tcl_GetInterpResolvers_TCL_DECLARED +/* 118 */ +EXTERN int Tcl_GetInterpResolvers (Tcl_Interp * interp, + CONST char * name, + Tcl_ResolverInfo * resInfo); +#endif +#ifndef Tcl_GetNamespaceResolvers_TCL_DECLARED +#define Tcl_GetNamespaceResolvers_TCL_DECLARED +/* 119 */ +EXTERN int Tcl_GetNamespaceResolvers ( + Tcl_Namespace * namespacePtr, + Tcl_ResolverInfo * resInfo); +#endif +#ifndef Tcl_FindNamespaceVar_TCL_DECLARED +#define Tcl_FindNamespaceVar_TCL_DECLARED +/* 120 */ +EXTERN Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_ForgetImport_TCL_DECLARED +#define Tcl_ForgetImport_TCL_DECLARED +/* 121 */ +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern); +#endif +#ifndef Tcl_GetCommandFromObj_TCL_DECLARED +#define Tcl_GetCommandFromObj_TCL_DECLARED +/* 122 */ +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCommandFullName_TCL_DECLARED +#define Tcl_GetCommandFullName_TCL_DECLARED +/* 123 */ +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, + Tcl_Command command, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED +#define Tcl_GetCurrentNamespace_TCL_DECLARED +/* 124 */ +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED +#define Tcl_GetGlobalNamespace_TCL_DECLARED +/* 125 */ +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetVariableFullName_TCL_DECLARED +#define Tcl_GetVariableFullName_TCL_DECLARED +/* 126 */ +EXTERN void Tcl_GetVariableFullName (Tcl_Interp * interp, + Tcl_Var variable, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_Import_TCL_DECLARED +#define Tcl_Import_TCL_DECLARED +/* 127 */ +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int allowOverwrite); +#endif +#ifndef Tcl_PopCallFrame_TCL_DECLARED +#define Tcl_PopCallFrame_TCL_DECLARED +/* 128 */ +EXTERN void Tcl_PopCallFrame (Tcl_Interp * interp); +#endif +#ifndef Tcl_PushCallFrame_TCL_DECLARED +#define Tcl_PushCallFrame_TCL_DECLARED +/* 129 */ +EXTERN int Tcl_PushCallFrame (Tcl_Interp * interp, + Tcl_CallFrame * framePtr, + Tcl_Namespace * nsPtr, int isProcCallFrame); +#endif +#ifndef Tcl_RemoveInterpResolvers_TCL_DECLARED +#define Tcl_RemoveInterpResolvers_TCL_DECLARED +/* 130 */ +EXTERN int Tcl_RemoveInterpResolvers (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_SetNamespaceResolvers_TCL_DECLARED +#define Tcl_SetNamespaceResolvers_TCL_DECLARED +/* 131 */ +EXTERN void Tcl_SetNamespaceResolvers ( + Tcl_Namespace * namespacePtr, + Tcl_ResolveCmdProc * cmdProc, + Tcl_ResolveVarProc * varProc, + Tcl_ResolveCompiledVarProc * compiledVarProc); +#endif +#ifndef TclpHasSockets_TCL_DECLARED +#define TclpHasSockets_TCL_DECLARED +/* 132 */ +EXTERN int TclpHasSockets (Tcl_Interp * interp); +#endif +#ifndef TclpGetDate_TCL_DECLARED +#define TclpGetDate_TCL_DECLARED +/* 133 */ +EXTERN struct tm * TclpGetDate (CONST time_t * time, int useGMT); +#endif +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +#ifndef TclGetEnv_TCL_DECLARED +#define TclGetEnv_TCL_DECLARED +/* 138 */ +EXTERN CONST84_RETURN char * TclGetEnv (CONST char * name, + Tcl_DString * valuePtr); +#endif +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +#ifndef TclpGetCwd_TCL_DECLARED +#define TclpGetCwd_TCL_DECLARED +/* 141 */ +EXTERN CONST84_RETURN char * TclpGetCwd (Tcl_Interp * interp, + Tcl_DString * cwdPtr); +#endif +#ifndef TclSetByteCodeFromAny_TCL_DECLARED +#define TclSetByteCodeFromAny_TCL_DECLARED +/* 142 */ +EXTERN int TclSetByteCodeFromAny (Tcl_Interp * interp, + Tcl_Obj * objPtr, CompileHookProc * hookProc, + ClientData clientData); +#endif +#ifndef TclAddLiteralObj_TCL_DECLARED +#define TclAddLiteralObj_TCL_DECLARED +/* 143 */ +EXTERN int TclAddLiteralObj (struct CompileEnv * envPtr, + Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); +#endif +#ifndef TclHideLiteral_TCL_DECLARED +#define TclHideLiteral_TCL_DECLARED +/* 144 */ +EXTERN void TclHideLiteral (Tcl_Interp * interp, + struct CompileEnv * envPtr, int index); +#endif +#ifndef TclGetAuxDataType_TCL_DECLARED +#define TclGetAuxDataType_TCL_DECLARED +/* 145 */ +EXTERN struct AuxDataType * TclGetAuxDataType (char * typeName); +#endif +#ifndef TclHandleCreate_TCL_DECLARED +#define TclHandleCreate_TCL_DECLARED +/* 146 */ +EXTERN TclHandle TclHandleCreate (VOID * ptr); +#endif +#ifndef TclHandleFree_TCL_DECLARED +#define TclHandleFree_TCL_DECLARED +/* 147 */ +EXTERN void TclHandleFree (TclHandle handle); +#endif +#ifndef TclHandlePreserve_TCL_DECLARED +#define TclHandlePreserve_TCL_DECLARED +/* 148 */ +EXTERN TclHandle TclHandlePreserve (TclHandle handle); +#endif +#ifndef TclHandleRelease_TCL_DECLARED +#define TclHandleRelease_TCL_DECLARED +/* 149 */ +EXTERN void TclHandleRelease (TclHandle handle); +#endif +#ifndef TclRegAbout_TCL_DECLARED +#define TclRegAbout_TCL_DECLARED +/* 150 */ +EXTERN int TclRegAbout (Tcl_Interp * interp, Tcl_RegExp re); +#endif +#ifndef TclRegExpRangeUniChar_TCL_DECLARED +#define TclRegExpRangeUniChar_TCL_DECLARED +/* 151 */ +EXTERN void TclRegExpRangeUniChar (Tcl_RegExp re, int index, + int * startPtr, int * endPtr); +#endif +#ifndef TclSetLibraryPath_TCL_DECLARED +#define TclSetLibraryPath_TCL_DECLARED +/* 152 */ +EXTERN void TclSetLibraryPath (Tcl_Obj * pathPtr); +#endif +#ifndef TclGetLibraryPath_TCL_DECLARED +#define TclGetLibraryPath_TCL_DECLARED +/* 153 */ +EXTERN Tcl_Obj * TclGetLibraryPath (void); +#endif +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +#ifndef TclRegError_TCL_DECLARED +#define TclRegError_TCL_DECLARED +/* 156 */ +EXTERN void TclRegError (Tcl_Interp * interp, CONST char * msg, + int status); +#endif +#ifndef TclVarTraceExists_TCL_DECLARED +#define TclVarTraceExists_TCL_DECLARED +/* 157 */ +EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef TclSetStartupScriptFileName_TCL_DECLARED +#define TclSetStartupScriptFileName_TCL_DECLARED +/* 158 */ +EXTERN void TclSetStartupScriptFileName (CONST char * filename); +#endif +#ifndef TclGetStartupScriptFileName_TCL_DECLARED +#define TclGetStartupScriptFileName_TCL_DECLARED +/* 159 */ +EXTERN CONST84_RETURN char * TclGetStartupScriptFileName (void); +#endif +/* Slot 160 is reserved */ +#ifndef TclChannelTransform_TCL_DECLARED +#define TclChannelTransform_TCL_DECLARED +/* 161 */ +EXTERN int TclChannelTransform (Tcl_Interp * interp, + Tcl_Channel chan, Tcl_Obj * cmdObjPtr); +#endif +#ifndef TclChannelEventScriptInvoker_TCL_DECLARED +#define TclChannelEventScriptInvoker_TCL_DECLARED +/* 162 */ +EXTERN void TclChannelEventScriptInvoker (ClientData clientData, + int flags); +#endif +#ifndef TclGetInstructionTable_TCL_DECLARED +#define TclGetInstructionTable_TCL_DECLARED +/* 163 */ +EXTERN void * TclGetInstructionTable (void); +#endif +#ifndef TclExpandCodeArray_TCL_DECLARED +#define TclExpandCodeArray_TCL_DECLARED +/* 164 */ +EXTERN void TclExpandCodeArray (void * envPtr); +#endif +#ifndef TclpSetInitialEncodings_TCL_DECLARED +#define TclpSetInitialEncodings_TCL_DECLARED +/* 165 */ +EXTERN void TclpSetInitialEncodings (void); +#endif +#ifndef TclListObjSetElement_TCL_DECLARED +#define TclListObjSetElement_TCL_DECLARED +/* 166 */ +EXTERN int TclListObjSetElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, + Tcl_Obj * valuePtr); +#endif +#ifndef TclSetStartupScriptPath_TCL_DECLARED +#define TclSetStartupScriptPath_TCL_DECLARED +/* 167 */ +EXTERN void TclSetStartupScriptPath (Tcl_Obj * pathPtr); +#endif +#ifndef TclGetStartupScriptPath_TCL_DECLARED +#define TclGetStartupScriptPath_TCL_DECLARED +/* 168 */ +EXTERN Tcl_Obj * TclGetStartupScriptPath (void); +#endif +#ifndef TclpUtfNcmp2_TCL_DECLARED +#define TclpUtfNcmp2_TCL_DECLARED +/* 169 */ +EXTERN int TclpUtfNcmp2 (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef TclCheckInterpTraces_TCL_DECLARED +#define TclCheckInterpTraces_TCL_DECLARED +/* 170 */ +EXTERN int TclCheckInterpTraces (Tcl_Interp * interp, + CONST char * command, int numChars, + Command * cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef TclCheckExecutionTraces_TCL_DECLARED +#define TclCheckExecutionTraces_TCL_DECLARED +/* 171 */ +EXTERN int TclCheckExecutionTraces (Tcl_Interp * interp, + CONST char * command, int numChars, + Command * cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef TclInThreadExit_TCL_DECLARED +#define TclInThreadExit_TCL_DECLARED +/* 172 */ +EXTERN int TclInThreadExit (void); +#endif +#ifndef TclUniCharMatch_TCL_DECLARED +#define TclUniCharMatch_TCL_DECLARED +/* 173 */ +EXTERN int TclUniCharMatch (CONST Tcl_UniChar * string, + int strLen, CONST Tcl_UniChar * pattern, + int ptnLen, int flags); +#endif +/* Slot 174 is reserved */ +#ifndef TclCallVarTraces_TCL_DECLARED +#define TclCallVarTraces_TCL_DECLARED +/* 175 */ +EXTERN int TclCallVarTraces (Interp * iPtr, Var * arrayPtr, + Var * varPtr, CONST char * part1, + CONST char * part2, int flags, + int leaveErrMsg); +#endif +#ifndef TclCleanupVar_TCL_DECLARED +#define TclCleanupVar_TCL_DECLARED +/* 176 */ +EXTERN void TclCleanupVar (Var * varPtr, Var * arrayPtr); +#endif +#ifndef TclVarErrMsg_TCL_DECLARED +#define TclVarErrMsg_TCL_DECLARED +/* 177 */ +EXTERN void TclVarErrMsg (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + CONST char * operation, CONST char * reason); +#endif +#ifndef Tcl_SetStartupScript_TCL_DECLARED +#define Tcl_SetStartupScript_TCL_DECLARED +/* 178 */ +EXTERN void Tcl_SetStartupScript (Tcl_Obj * pathPtr, + CONST char* encodingName); +#endif +#ifndef Tcl_GetStartupScript_TCL_DECLARED +#define Tcl_GetStartupScript_TCL_DECLARED +/* 179 */ +EXTERN Tcl_Obj * Tcl_GetStartupScript (CONST char ** encodingNamePtr); +#endif +/* Slot 180 is reserved */ +/* Slot 181 is reserved */ +#ifndef TclpLocaltime_TCL_DECLARED +#define TclpLocaltime_TCL_DECLARED +/* 182 */ +EXTERN struct tm * TclpLocaltime (CONST time_t * clock); +#endif +#ifndef TclpGmtime_TCL_DECLARED +#define TclpGmtime_TCL_DECLARED +/* 183 */ +EXTERN struct tm * TclpGmtime (CONST time_t * clock); +#endif +/* Slot 184 is reserved */ +/* Slot 185 is reserved */ +/* Slot 186 is reserved */ +/* Slot 187 is reserved */ +/* Slot 188 is reserved */ +/* Slot 189 is reserved */ +/* Slot 190 is reserved */ +/* Slot 191 is reserved */ +/* Slot 192 is reserved */ +/* Slot 193 is reserved */ +/* Slot 194 is reserved */ +/* Slot 195 is reserved */ +/* Slot 196 is reserved */ +/* Slot 197 is reserved */ +#ifndef TclObjGetFrame_TCL_DECLARED +#define TclObjGetFrame_TCL_DECLARED +/* 198 */ +EXTERN int TclObjGetFrame (Tcl_Interp * interp, + Tcl_Obj * objPtr, CallFrame ** framePtrPtr); +#endif +/* Slot 199 is reserved */ +#ifndef TclpObjRemoveDirectory_TCL_DECLARED +#define TclpObjRemoveDirectory_TCL_DECLARED +/* 200 */ +EXTERN int TclpObjRemoveDirectory (Tcl_Obj * pathPtr, + int recursive, Tcl_Obj ** errorPtr); +#endif +#ifndef TclpObjCopyDirectory_TCL_DECLARED +#define TclpObjCopyDirectory_TCL_DECLARED +/* 201 */ +EXTERN int TclpObjCopyDirectory (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +#endif +#ifndef TclpObjCreateDirectory_TCL_DECLARED +#define TclpObjCreateDirectory_TCL_DECLARED +/* 202 */ +EXTERN int TclpObjCreateDirectory (Tcl_Obj * pathPtr); +#endif +#ifndef TclpObjDeleteFile_TCL_DECLARED +#define TclpObjDeleteFile_TCL_DECLARED +/* 203 */ +EXTERN int TclpObjDeleteFile (Tcl_Obj * pathPtr); +#endif +#ifndef TclpObjCopyFile_TCL_DECLARED +#define TclpObjCopyFile_TCL_DECLARED +/* 204 */ +EXTERN int TclpObjCopyFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef TclpObjRenameFile_TCL_DECLARED +#define TclpObjRenameFile_TCL_DECLARED +/* 205 */ +EXTERN int TclpObjRenameFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef TclpObjStat_TCL_DECLARED +#define TclpObjStat_TCL_DECLARED +/* 206 */ +EXTERN int TclpObjStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef TclpObjAccess_TCL_DECLARED +#define TclpObjAccess_TCL_DECLARED +/* 207 */ +EXTERN int TclpObjAccess (Tcl_Obj * pathPtr, int mode); +#endif +#ifndef TclpOpenFileChannel_TCL_DECLARED +#define TclpOpenFileChannel_TCL_DECLARED +/* 208 */ +EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, int mode, int permissions); +#endif +/* Slot 209 is reserved */ +/* Slot 210 is reserved */ +/* Slot 211 is reserved */ +#ifndef TclpFindExecutable_TCL_DECLARED +#define TclpFindExecutable_TCL_DECLARED +/* 212 */ +EXTERN void TclpFindExecutable (CONST char * argv0); +#endif +#ifndef TclGetObjNameOfExecutable_TCL_DECLARED +#define TclGetObjNameOfExecutable_TCL_DECLARED +/* 213 */ +EXTERN Tcl_Obj * TclGetObjNameOfExecutable (void); +#endif +#ifndef TclSetObjNameOfExecutable_TCL_DECLARED +#define TclSetObjNameOfExecutable_TCL_DECLARED +/* 214 */ +EXTERN void TclSetObjNameOfExecutable (Tcl_Obj * name, + Tcl_Encoding encoding); +#endif +#ifndef TclStackAlloc_TCL_DECLARED +#define TclStackAlloc_TCL_DECLARED +/* 215 */ +EXTERN void * TclStackAlloc (Tcl_Interp * interp, int numBytes); +#endif +#ifndef TclStackFree_TCL_DECLARED +#define TclStackFree_TCL_DECLARED +/* 216 */ +EXTERN void TclStackFree (Tcl_Interp * interp, void * freePtr); +#endif +#ifndef TclPushStackFrame_TCL_DECLARED +#define TclPushStackFrame_TCL_DECLARED +/* 217 */ +EXTERN int TclPushStackFrame (Tcl_Interp * interp, + Tcl_CallFrame ** framePtrPtr, + Tcl_Namespace * namespacePtr, + int isProcCallFrame); +#endif +#ifndef TclPopStackFrame_TCL_DECLARED +#define TclPopStackFrame_TCL_DECLARED +/* 218 */ +EXTERN void TclPopStackFrame (Tcl_Interp * interp); +#endif +/* Slot 219 is reserved */ +/* Slot 220 is reserved */ +/* Slot 221 is reserved */ +/* Slot 222 is reserved */ +/* Slot 223 is reserved */ +#ifndef TclGetPlatform_TCL_DECLARED +#define TclGetPlatform_TCL_DECLARED +/* 224 */ +EXTERN TclPlatformType * TclGetPlatform (void); +#endif +#ifndef TclTraceDictPath_TCL_DECLARED +#define TclTraceDictPath_TCL_DECLARED +/* 225 */ +EXTERN Tcl_Obj * TclTraceDictPath (Tcl_Interp * interp, + Tcl_Obj * rootPtr, int keyc, + Tcl_Obj *CONST keyv[], int flags); +#endif +#ifndef TclObjBeingDeleted_TCL_DECLARED +#define TclObjBeingDeleted_TCL_DECLARED +/* 226 */ +EXTERN int TclObjBeingDeleted (Tcl_Obj * objPtr); +#endif +#ifndef TclSetNsPath_TCL_DECLARED +#define TclSetNsPath_TCL_DECLARED +/* 227 */ +EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, + Tcl_Namespace * pathAry[]); +#endif +#ifndef TclObjInterpProcCore_TCL_DECLARED +#define TclObjInterpProcCore_TCL_DECLARED +/* 228 */ +EXTERN int TclObjInterpProcCore (register Tcl_Interp * interp, + Tcl_Obj * procNameObj, int skip, + ProcErrorProc errorProc); +#endif +#ifndef TclPtrMakeUpvar_TCL_DECLARED +#define TclPtrMakeUpvar_TCL_DECLARED +/* 229 */ +EXTERN int TclPtrMakeUpvar (Tcl_Interp * interp, + Var * otherP1Ptr, CONST char * myName, + int myFlags, int index); +#endif +#ifndef TclObjLookupVar_TCL_DECLARED +#define TclObjLookupVar_TCL_DECLARED +/* 230 */ +EXTERN Var * TclObjLookupVar (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, CONST char * part2, + int flags, CONST char * msg, + CONST int createPart1, CONST int createPart2, + Var ** arrayPtrPtr); +#endif +#ifndef TclGetNamespaceFromObj_TCL_DECLARED +#define TclGetNamespaceFromObj_TCL_DECLARED +/* 231 */ +EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); +#endif +#ifndef TclEvalObjEx_TCL_DECLARED +#define TclEvalObjEx_TCL_DECLARED +/* 232 */ +EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags, const CmdFrame * invoker, + int word); +#endif +#ifndef TclGetSrcInfoForPc_TCL_DECLARED +#define TclGetSrcInfoForPc_TCL_DECLARED +/* 233 */ +EXTERN void TclGetSrcInfoForPc (CmdFrame * contextPtr); +#endif +#ifndef TclVarHashCreateVar_TCL_DECLARED +#define TclVarHashCreateVar_TCL_DECLARED +/* 234 */ +EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, + const char * key, int * newPtr); +#endif +#ifndef TclInitVarHashTable_TCL_DECLARED +#define TclInitVarHashTable_TCL_DECLARED +/* 235 */ +EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, + Namespace * nsPtr); +#endif +#ifndef TclBackgroundException_TCL_DECLARED +#define TclBackgroundException_TCL_DECLARED +/* 236 */ +EXTERN void TclBackgroundException (Tcl_Interp * interp, + int code); +#endif +#ifndef TclResetCancellation_TCL_DECLARED +#define TclResetCancellation_TCL_DECLARED +/* 237 */ +EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); +#endif +#ifndef TclEvalObjv_NR2_TCL_DECLARED +#define TclEvalObjv_NR2_TCL_DECLARED +/* 238 */ +EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, + struct TEOV_record * rootPtr); +#endif +/* 239 */ +EXTERN Tcl_ObjCmdProc TclNRInterpProc; +#ifndef TclNRInterpProcCore_TCL_DECLARED +#define TclNRInterpProcCore_TCL_DECLARED +/* 240 */ +EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, + Tcl_Obj * procNameObj, int skip, + ProcErrorProc errorProc); +#endif +#ifndef TclNRPushRecord_TCL_DECLARED +#define TclNRPushRecord_TCL_DECLARED +/* 241 */ +EXTERN struct TEOV_record * TclNRPushRecord (Tcl_Interp * interp); +#endif +#ifndef TclNRPopAndFreeRecord_TCL_DECLARED +#define TclNRPopAndFreeRecord_TCL_DECLARED +/* 242 */ +EXTERN void TclNRPopAndFreeRecord (Tcl_Interp * interp); +#endif +#ifndef TclNREvalObjEx_TCL_DECLARED +#define TclNREvalObjEx_TCL_DECLARED +/* 243 */ +EXTERN int TclNREvalObjEx (Tcl_Interp * interp, + Tcl_Obj * objPtr, int flags, + const CmdFrame * invoker, int word); +#endif + +typedef struct TclIntStubs { + int magic; + CONST struct TclIntStubHooks *hooks; + + void *reserved0; + void *reserved1; + void *reserved2; + void (*tclAllocateFreeObjects) (void); /* 3 */ + void *reserved4; +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ +#endif /* MACOSX */ + void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */ + int (*tclCopyAndCollapse) (int count, CONST char * src, char * dst); /* 7 */ + int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ +#endif /* MACOSX */ + int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, CONST char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ + void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */ + void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */ + void *reserved13; + void (*tclDumpMemoryInfo) (FILE * outFile); /* 14 */ + void *reserved15; + void (*tclExprFloatError) (Tcl_Interp * interp, double value); /* 16 */ + void *reserved17; + void *reserved18; + void *reserved19; + void *reserved20; + void *reserved21; + int (*tclFindElement) (Tcl_Interp * interp, CONST char * listStr, int listLength, CONST char ** elementPtr, CONST char ** nextPtr, int * sizePtr, int * bracePtr); /* 22 */ + Proc * (*tclFindProc) (Interp * iPtr, CONST char * procName); /* 23 */ + void *reserved24; + void (*tclFreePackageInfo) (Interp * iPtr); /* 25 */ + void *reserved26; + void *reserved27; + Tcl_Channel (*tclpGetDefaultStdChannel) (int type); /* 28 */ + void *reserved29; + void *reserved30; + CONST char * (*tclGetExtension) (CONST char * name); /* 31 */ + int (*tclGetFrame) (Tcl_Interp * interp, CONST char * str, CallFrame ** framePtrPtr); /* 32 */ + void *reserved33; + int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ + void *reserved35; + void *reserved36; + int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */ + int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr); /* 38 */ + TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ + int (*tclGetOpenMode) (Tcl_Interp * interp, CONST char * str, int * seekFlagPtr); /* 40 */ + Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ + char * (*tclpGetUserHome) (CONST char * name, Tcl_DString * bufferPtr); /* 42 */ + void *reserved43; + int (*tclGuessPackageName) (CONST char * fileName, Tcl_DString * bufPtr); /* 44 */ + int (*tclHideUnsafeCommands) (Tcl_Interp * interp); /* 45 */ + int (*tclInExit) (void); /* 46 */ + void *reserved47; + void *reserved48; + void *reserved49; + void (*tclInitCompiledLocals) (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); /* 50 */ + int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ + void *reserved52; + int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ + int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 54 */ + Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ + void *reserved56; + void *reserved57; + Var * (*tclLookupVar) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, CONST char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); /* 58 */ + void *reserved59; + int (*tclNeedSpace) (CONST char * start, CONST char * end); /* 60 */ + Tcl_Obj * (*tclNewProcBodyObj) (Proc * procPtr); /* 61 */ + int (*tclObjCommandComplete) (Tcl_Obj * cmdPtr); /* 62 */ + int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 63 */ + int (*tclObjInvoke) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 64 */ + void *reserved65; + void *reserved66; + void *reserved67; + void *reserved68; + char * (*tclpAlloc) (unsigned int size); /* 69 */ + void *reserved70; + void *reserved71; + void *reserved72; + void *reserved73; + void (*tclpFree) (char * ptr); /* 74 */ + unsigned long (*tclpGetClicks) (void); /* 75 */ + unsigned long (*tclpGetSeconds) (void); /* 76 */ + void (*tclpGetTime) (Tcl_Time * time); /* 77 */ + int (*tclpGetTimeZone) (unsigned long time); /* 78 */ + void *reserved79; + void *reserved80; + char * (*tclpRealloc) (char * ptr, unsigned int size); /* 81 */ + void *reserved82; + void *reserved83; + void *reserved84; + void *reserved85; + void *reserved86; + void *reserved87; + char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp * interp, CONST char * name1, CONST char * name2, int flags); /* 88 */ + int (*tclPreventAliasLoop) (Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd); /* 89 */ + void *reserved90; + void (*tclProcCleanupProc) (Proc * procPtr); /* 91 */ + int (*tclProcCompileProc) (Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, CONST char * description, CONST char * procName); /* 92 */ + void (*tclProcDeleteProc) (ClientData clientData); /* 93 */ + void *reserved94; + void *reserved95; + int (*tclRenameCommand) (Tcl_Interp * interp, CONST char * oldName, CONST char * newName); /* 96 */ + void (*tclResetShadowedCmdRefs) (Tcl_Interp * interp, Command * newCmdPtr); /* 97 */ + int (*tclServiceIdle) (void); /* 98 */ + void *reserved99; + void *reserved100; + char * (*tclSetPreInitScript) (char * string); /* 101 */ + void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ + int (*tclSockGetPort) (Tcl_Interp * interp, CONST char * str, CONST char * proto, int * portPtr); /* 103 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ +#endif /* MACOSX */ + void *reserved105; + void *reserved106; + void *reserved107; + void (*tclTeardownNamespace) (Namespace * nsPtr); /* 108 */ + int (*tclUpdateReturnInfo) (Interp * iPtr); /* 109 */ + void *reserved110; + void (*tcl_AddInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 111 */ + int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 112 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 113 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 114 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 115 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 116 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 117 */ + int (*tcl_GetInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolverInfo * resInfo); /* 118 */ + int (*tcl_GetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo); /* 119 */ + Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 120 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 121 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 122 */ + void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 123 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 124 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 125 */ + void (*tcl_GetVariableFullName) (Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr); /* 126 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 127 */ + void (*tcl_PopCallFrame) (Tcl_Interp * interp); /* 128 */ + int (*tcl_PushCallFrame) (Tcl_Interp * interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame); /* 129 */ + int (*tcl_RemoveInterpResolvers) (Tcl_Interp * interp, CONST char * name); /* 130 */ + void (*tcl_SetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 131 */ + int (*tclpHasSockets) (Tcl_Interp * interp); /* 132 */ + struct tm * (*tclpGetDate) (CONST time_t * time, int useGMT); /* 133 */ + void *reserved134; + void *reserved135; + void *reserved136; + void *reserved137; + CONST84_RETURN char * (*tclGetEnv) (CONST char * name, Tcl_DString * valuePtr); /* 138 */ + void *reserved139; + void *reserved140; + CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ + int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ + int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ + void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ + struct AuxDataType * (*tclGetAuxDataType) (char * typeName); /* 145 */ + TclHandle (*tclHandleCreate) (VOID * ptr); /* 146 */ + void (*tclHandleFree) (TclHandle handle); /* 147 */ + TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ + void (*tclHandleRelease) (TclHandle handle); /* 149 */ + int (*tclRegAbout) (Tcl_Interp * interp, Tcl_RegExp re); /* 150 */ + void (*tclRegExpRangeUniChar) (Tcl_RegExp re, int index, int * startPtr, int * endPtr); /* 151 */ + void (*tclSetLibraryPath) (Tcl_Obj * pathPtr); /* 152 */ + Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */ + void *reserved154; + void *reserved155; + void (*tclRegError) (Tcl_Interp * interp, CONST char * msg, int status); /* 156 */ + Var * (*tclVarTraceExists) (Tcl_Interp * interp, CONST char * varName); /* 157 */ + void (*tclSetStartupScriptFileName) (CONST char * filename); /* 158 */ + CONST84_RETURN char * (*tclGetStartupScriptFileName) (void); /* 159 */ + void *reserved160; + int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ + void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ + void * (*tclGetInstructionTable) (void); /* 163 */ + void (*tclExpandCodeArray) (void * envPtr); /* 164 */ + void (*tclpSetInitialEncodings) (void); /* 165 */ + int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ + void (*tclSetStartupScriptPath) (Tcl_Obj * pathPtr); /* 167 */ + Tcl_Obj * (*tclGetStartupScriptPath) (void); /* 168 */ + int (*tclpUtfNcmp2) (CONST char * s1, CONST char * s2, unsigned long n); /* 169 */ + int (*tclCheckInterpTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 170 */ + int (*tclCheckExecutionTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 171 */ + int (*tclInThreadExit) (void); /* 172 */ + int (*tclUniCharMatch) (CONST Tcl_UniChar * string, int strLen, CONST Tcl_UniChar * pattern, int ptnLen, int flags); /* 173 */ + void *reserved174; + int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, CONST char * part1, CONST char * part2, int flags, int leaveErrMsg); /* 175 */ + void (*tclCleanupVar) (Var * varPtr, Var * arrayPtr); /* 176 */ + void (*tclVarErrMsg) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * operation, CONST char * reason); /* 177 */ + void (*tcl_SetStartupScript) (Tcl_Obj * pathPtr, CONST char* encodingName); /* 178 */ + Tcl_Obj * (*tcl_GetStartupScript) (CONST char ** encodingNamePtr); /* 179 */ + void *reserved180; + void *reserved181; + struct tm * (*tclpLocaltime) (CONST time_t * clock); /* 182 */ + struct tm * (*tclpGmtime) (CONST time_t * clock); /* 183 */ + void *reserved184; + void *reserved185; + void *reserved186; + void *reserved187; + void *reserved188; + void *reserved189; + void *reserved190; + void *reserved191; + void *reserved192; + void *reserved193; + void *reserved194; + void *reserved195; + void *reserved196; + void *reserved197; + int (*tclObjGetFrame) (Tcl_Interp * interp, Tcl_Obj * objPtr, CallFrame ** framePtrPtr); /* 198 */ + void *reserved199; + int (*tclpObjRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 200 */ + int (*tclpObjCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 201 */ + int (*tclpObjCreateDirectory) (Tcl_Obj * pathPtr); /* 202 */ + int (*tclpObjDeleteFile) (Tcl_Obj * pathPtr); /* 203 */ + int (*tclpObjCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 204 */ + int (*tclpObjRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 205 */ + int (*tclpObjStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 206 */ + int (*tclpObjAccess) (Tcl_Obj * pathPtr, int mode); /* 207 */ + Tcl_Channel (*tclpOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions); /* 208 */ + void *reserved209; + void *reserved210; + void *reserved211; + void (*tclpFindExecutable) (CONST char * argv0); /* 212 */ + Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */ + void (*tclSetObjNameOfExecutable) (Tcl_Obj * name, Tcl_Encoding encoding); /* 214 */ + void * (*tclStackAlloc) (Tcl_Interp * interp, int numBytes); /* 215 */ + void (*tclStackFree) (Tcl_Interp * interp, void * freePtr); /* 216 */ + int (*tclPushStackFrame) (Tcl_Interp * interp, Tcl_CallFrame ** framePtrPtr, Tcl_Namespace * namespacePtr, int isProcCallFrame); /* 217 */ + void (*tclPopStackFrame) (Tcl_Interp * interp); /* 218 */ + void *reserved219; + void *reserved220; + void *reserved221; + void *reserved222; + void *reserved223; + TclPlatformType * (*tclGetPlatform) (void); /* 224 */ + Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *CONST keyv[], int flags); /* 225 */ + int (*tclObjBeingDeleted) (Tcl_Obj * objPtr); /* 226 */ + void (*tclSetNsPath) (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); /* 227 */ + int (*tclObjInterpProcCore) (register Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 228 */ + int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, CONST char * myName, int myFlags, int index); /* 229 */ + Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, CONST char * part2, int flags, CONST char * msg, CONST int createPart1, CONST int createPart2, Var ** arrayPtrPtr); /* 230 */ + int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ + int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 232 */ + void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ + Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ + void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ + void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ + int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ + int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ + Tcl_ObjCmdProc *tclNRInterpProc; /* 239 */ + int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ + struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ + void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ + int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 243 */ +} TclIntStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclIntStubs *tclIntStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +/* Slot 0 is reserved */ +/* Slot 1 is reserved */ +/* Slot 2 is reserved */ +#ifndef TclAllocateFreeObjects +#define TclAllocateFreeObjects \ + (tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */ +#endif +/* Slot 4 is reserved */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCleanupChildren +#define TclCleanupChildren \ + (tclIntStubsPtr->tclCleanupChildren) /* 5 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCleanupChildren +#define TclCleanupChildren \ + (tclIntStubsPtr->tclCleanupChildren) /* 5 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCleanupChildren +#define TclCleanupChildren \ + (tclIntStubsPtr->tclCleanupChildren) /* 5 */ +#endif +#endif /* MACOSX */ +#ifndef TclCleanupCommand +#define TclCleanupCommand \ + (tclIntStubsPtr->tclCleanupCommand) /* 6 */ +#endif +#ifndef TclCopyAndCollapse +#define TclCopyAndCollapse \ + (tclIntStubsPtr->tclCopyAndCollapse) /* 7 */ +#endif +#ifndef TclCopyChannel +#define TclCopyChannel \ + (tclIntStubsPtr->tclCopyChannel) /* 8 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCreatePipeline +#define TclCreatePipeline \ + (tclIntStubsPtr->tclCreatePipeline) /* 9 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCreatePipeline +#define TclCreatePipeline \ + (tclIntStubsPtr->tclCreatePipeline) /* 9 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCreatePipeline +#define TclCreatePipeline \ + (tclIntStubsPtr->tclCreatePipeline) /* 9 */ +#endif +#endif /* MACOSX */ +#ifndef TclCreateProc +#define TclCreateProc \ + (tclIntStubsPtr->tclCreateProc) /* 10 */ +#endif +#ifndef TclDeleteCompiledLocalVars +#define TclDeleteCompiledLocalVars \ + (tclIntStubsPtr->tclDeleteCompiledLocalVars) /* 11 */ +#endif +#ifndef TclDeleteVars +#define TclDeleteVars \ + (tclIntStubsPtr->tclDeleteVars) /* 12 */ +#endif +/* Slot 13 is reserved */ +#ifndef TclDumpMemoryInfo +#define TclDumpMemoryInfo \ + (tclIntStubsPtr->tclDumpMemoryInfo) /* 14 */ +#endif +/* Slot 15 is reserved */ +#ifndef TclExprFloatError +#define TclExprFloatError \ + (tclIntStubsPtr->tclExprFloatError) /* 16 */ +#endif +/* Slot 17 is reserved */ +/* Slot 18 is reserved */ +/* Slot 19 is reserved */ +/* Slot 20 is reserved */ +/* Slot 21 is reserved */ +#ifndef TclFindElement +#define TclFindElement \ + (tclIntStubsPtr->tclFindElement) /* 22 */ +#endif +#ifndef TclFindProc +#define TclFindProc \ + (tclIntStubsPtr->tclFindProc) /* 23 */ +#endif +/* Slot 24 is reserved */ +#ifndef TclFreePackageInfo +#define TclFreePackageInfo \ + (tclIntStubsPtr->tclFreePackageInfo) /* 25 */ +#endif +/* Slot 26 is reserved */ +/* Slot 27 is reserved */ +#ifndef TclpGetDefaultStdChannel +#define TclpGetDefaultStdChannel \ + (tclIntStubsPtr->tclpGetDefaultStdChannel) /* 28 */ +#endif +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +#ifndef TclGetExtension +#define TclGetExtension \ + (tclIntStubsPtr->tclGetExtension) /* 31 */ +#endif +#ifndef TclGetFrame +#define TclGetFrame \ + (tclIntStubsPtr->tclGetFrame) /* 32 */ +#endif +/* Slot 33 is reserved */ +#ifndef TclGetIntForIndex +#define TclGetIntForIndex \ + (tclIntStubsPtr->tclGetIntForIndex) /* 34 */ +#endif +/* Slot 35 is reserved */ +/* Slot 36 is reserved */ +#ifndef TclGetLoadedPackages +#define TclGetLoadedPackages \ + (tclIntStubsPtr->tclGetLoadedPackages) /* 37 */ +#endif +#ifndef TclGetNamespaceForQualName +#define TclGetNamespaceForQualName \ + (tclIntStubsPtr->tclGetNamespaceForQualName) /* 38 */ +#endif +#ifndef TclGetObjInterpProc +#define TclGetObjInterpProc \ + (tclIntStubsPtr->tclGetObjInterpProc) /* 39 */ +#endif +#ifndef TclGetOpenMode +#define TclGetOpenMode \ + (tclIntStubsPtr->tclGetOpenMode) /* 40 */ +#endif +#ifndef TclGetOriginalCommand +#define TclGetOriginalCommand \ + (tclIntStubsPtr->tclGetOriginalCommand) /* 41 */ +#endif +#ifndef TclpGetUserHome +#define TclpGetUserHome \ + (tclIntStubsPtr->tclpGetUserHome) /* 42 */ +#endif +/* Slot 43 is reserved */ +#ifndef TclGuessPackageName +#define TclGuessPackageName \ + (tclIntStubsPtr->tclGuessPackageName) /* 44 */ +#endif +#ifndef TclHideUnsafeCommands +#define TclHideUnsafeCommands \ + (tclIntStubsPtr->tclHideUnsafeCommands) /* 45 */ +#endif +#ifndef TclInExit +#define TclInExit \ + (tclIntStubsPtr->tclInExit) /* 46 */ +#endif +/* Slot 47 is reserved */ +/* Slot 48 is reserved */ +/* Slot 49 is reserved */ +#ifndef TclInitCompiledLocals +#define TclInitCompiledLocals \ + (tclIntStubsPtr->tclInitCompiledLocals) /* 50 */ +#endif +#ifndef TclInterpInit +#define TclInterpInit \ + (tclIntStubsPtr->tclInterpInit) /* 51 */ +#endif +/* Slot 52 is reserved */ +#ifndef TclInvokeObjectCommand +#define TclInvokeObjectCommand \ + (tclIntStubsPtr->tclInvokeObjectCommand) /* 53 */ +#endif +#ifndef TclInvokeStringCommand +#define TclInvokeStringCommand \ + (tclIntStubsPtr->tclInvokeStringCommand) /* 54 */ +#endif +#ifndef TclIsProc +#define TclIsProc \ + (tclIntStubsPtr->tclIsProc) /* 55 */ +#endif +/* Slot 56 is reserved */ +/* Slot 57 is reserved */ +#ifndef TclLookupVar +#define TclLookupVar \ + (tclIntStubsPtr->tclLookupVar) /* 58 */ +#endif +/* Slot 59 is reserved */ +#ifndef TclNeedSpace +#define TclNeedSpace \ + (tclIntStubsPtr->tclNeedSpace) /* 60 */ +#endif +#ifndef TclNewProcBodyObj +#define TclNewProcBodyObj \ + (tclIntStubsPtr->tclNewProcBodyObj) /* 61 */ +#endif +#ifndef TclObjCommandComplete +#define TclObjCommandComplete \ + (tclIntStubsPtr->tclObjCommandComplete) /* 62 */ +#endif +#ifndef TclObjInterpProc +#define TclObjInterpProc \ + (tclIntStubsPtr->tclObjInterpProc) /* 63 */ +#endif +#ifndef TclObjInvoke +#define TclObjInvoke \ + (tclIntStubsPtr->tclObjInvoke) /* 64 */ +#endif +/* Slot 65 is reserved */ +/* Slot 66 is reserved */ +/* Slot 67 is reserved */ +/* Slot 68 is reserved */ +#ifndef TclpAlloc +#define TclpAlloc \ + (tclIntStubsPtr->tclpAlloc) /* 69 */ +#endif +/* Slot 70 is reserved */ +/* Slot 71 is reserved */ +/* Slot 72 is reserved */ +/* Slot 73 is reserved */ +#ifndef TclpFree +#define TclpFree \ + (tclIntStubsPtr->tclpFree) /* 74 */ +#endif +#ifndef TclpGetClicks +#define TclpGetClicks \ + (tclIntStubsPtr->tclpGetClicks) /* 75 */ +#endif +#ifndef TclpGetSeconds +#define TclpGetSeconds \ + (tclIntStubsPtr->tclpGetSeconds) /* 76 */ +#endif +#ifndef TclpGetTime +#define TclpGetTime \ + (tclIntStubsPtr->tclpGetTime) /* 77 */ +#endif +#ifndef TclpGetTimeZone +#define TclpGetTimeZone \ + (tclIntStubsPtr->tclpGetTimeZone) /* 78 */ +#endif +/* Slot 79 is reserved */ +/* Slot 80 is reserved */ +#ifndef TclpRealloc +#define TclpRealloc \ + (tclIntStubsPtr->tclpRealloc) /* 81 */ +#endif +/* Slot 82 is reserved */ +/* Slot 83 is reserved */ +/* Slot 84 is reserved */ +/* Slot 85 is reserved */ +/* Slot 86 is reserved */ +/* Slot 87 is reserved */ +#ifndef TclPrecTraceProc +#define TclPrecTraceProc \ + (tclIntStubsPtr->tclPrecTraceProc) /* 88 */ +#endif +#ifndef TclPreventAliasLoop +#define TclPreventAliasLoop \ + (tclIntStubsPtr->tclPreventAliasLoop) /* 89 */ +#endif +/* Slot 90 is reserved */ +#ifndef TclProcCleanupProc +#define TclProcCleanupProc \ + (tclIntStubsPtr->tclProcCleanupProc) /* 91 */ +#endif +#ifndef TclProcCompileProc +#define TclProcCompileProc \ + (tclIntStubsPtr->tclProcCompileProc) /* 92 */ +#endif +#ifndef TclProcDeleteProc +#define TclProcDeleteProc \ + (tclIntStubsPtr->tclProcDeleteProc) /* 93 */ +#endif +/* Slot 94 is reserved */ +/* Slot 95 is reserved */ +#ifndef TclRenameCommand +#define TclRenameCommand \ + (tclIntStubsPtr->tclRenameCommand) /* 96 */ +#endif +#ifndef TclResetShadowedCmdRefs +#define TclResetShadowedCmdRefs \ + (tclIntStubsPtr->tclResetShadowedCmdRefs) /* 97 */ +#endif +#ifndef TclServiceIdle +#define TclServiceIdle \ + (tclIntStubsPtr->tclServiceIdle) /* 98 */ +#endif +/* Slot 99 is reserved */ +/* Slot 100 is reserved */ +#ifndef TclSetPreInitScript +#define TclSetPreInitScript \ + (tclIntStubsPtr->tclSetPreInitScript) /* 101 */ +#endif +#ifndef TclSetupEnv +#define TclSetupEnv \ + (tclIntStubsPtr->tclSetupEnv) /* 102 */ +#endif +#ifndef TclSockGetPort +#define TclSockGetPort \ + (tclIntStubsPtr->tclSockGetPort) /* 103 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclSockMinimumBuffers +#define TclSockMinimumBuffers \ + (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclSockMinimumBuffers +#define TclSockMinimumBuffers \ + (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclSockMinimumBuffers +#define TclSockMinimumBuffers \ + (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ +#endif +#endif /* MACOSX */ +/* Slot 105 is reserved */ +/* Slot 106 is reserved */ +/* Slot 107 is reserved */ +#ifndef TclTeardownNamespace +#define TclTeardownNamespace \ + (tclIntStubsPtr->tclTeardownNamespace) /* 108 */ +#endif +#ifndef TclUpdateReturnInfo +#define TclUpdateReturnInfo \ + (tclIntStubsPtr->tclUpdateReturnInfo) /* 109 */ +#endif +/* Slot 110 is reserved */ +#ifndef Tcl_AddInterpResolvers +#define Tcl_AddInterpResolvers \ + (tclIntStubsPtr->tcl_AddInterpResolvers) /* 111 */ +#endif +#ifndef Tcl_AppendExportList +#define Tcl_AppendExportList \ + (tclIntStubsPtr->tcl_AppendExportList) /* 112 */ +#endif +#ifndef Tcl_CreateNamespace +#define Tcl_CreateNamespace \ + (tclIntStubsPtr->tcl_CreateNamespace) /* 113 */ +#endif +#ifndef Tcl_DeleteNamespace +#define Tcl_DeleteNamespace \ + (tclIntStubsPtr->tcl_DeleteNamespace) /* 114 */ +#endif +#ifndef Tcl_Export +#define Tcl_Export \ + (tclIntStubsPtr->tcl_Export) /* 115 */ +#endif +#ifndef Tcl_FindCommand +#define Tcl_FindCommand \ + (tclIntStubsPtr->tcl_FindCommand) /* 116 */ +#endif +#ifndef Tcl_FindNamespace +#define Tcl_FindNamespace \ + (tclIntStubsPtr->tcl_FindNamespace) /* 117 */ +#endif +#ifndef Tcl_GetInterpResolvers +#define Tcl_GetInterpResolvers \ + (tclIntStubsPtr->tcl_GetInterpResolvers) /* 118 */ +#endif +#ifndef Tcl_GetNamespaceResolvers +#define Tcl_GetNamespaceResolvers \ + (tclIntStubsPtr->tcl_GetNamespaceResolvers) /* 119 */ +#endif +#ifndef Tcl_FindNamespaceVar +#define Tcl_FindNamespaceVar \ + (tclIntStubsPtr->tcl_FindNamespaceVar) /* 120 */ +#endif +#ifndef Tcl_ForgetImport +#define Tcl_ForgetImport \ + (tclIntStubsPtr->tcl_ForgetImport) /* 121 */ +#endif +#ifndef Tcl_GetCommandFromObj +#define Tcl_GetCommandFromObj \ + (tclIntStubsPtr->tcl_GetCommandFromObj) /* 122 */ +#endif +#ifndef Tcl_GetCommandFullName +#define Tcl_GetCommandFullName \ + (tclIntStubsPtr->tcl_GetCommandFullName) /* 123 */ +#endif +#ifndef Tcl_GetCurrentNamespace +#define Tcl_GetCurrentNamespace \ + (tclIntStubsPtr->tcl_GetCurrentNamespace) /* 124 */ +#endif +#ifndef Tcl_GetGlobalNamespace +#define Tcl_GetGlobalNamespace \ + (tclIntStubsPtr->tcl_GetGlobalNamespace) /* 125 */ +#endif +#ifndef Tcl_GetVariableFullName +#define Tcl_GetVariableFullName \ + (tclIntStubsPtr->tcl_GetVariableFullName) /* 126 */ +#endif +#ifndef Tcl_Import +#define Tcl_Import \ + (tclIntStubsPtr->tcl_Import) /* 127 */ +#endif +#ifndef Tcl_PopCallFrame +#define Tcl_PopCallFrame \ + (tclIntStubsPtr->tcl_PopCallFrame) /* 128 */ +#endif +#ifndef Tcl_PushCallFrame +#define Tcl_PushCallFrame \ + (tclIntStubsPtr->tcl_PushCallFrame) /* 129 */ +#endif +#ifndef Tcl_RemoveInterpResolvers +#define Tcl_RemoveInterpResolvers \ + (tclIntStubsPtr->tcl_RemoveInterpResolvers) /* 130 */ +#endif +#ifndef Tcl_SetNamespaceResolvers +#define Tcl_SetNamespaceResolvers \ + (tclIntStubsPtr->tcl_SetNamespaceResolvers) /* 131 */ +#endif +#ifndef TclpHasSockets +#define TclpHasSockets \ + (tclIntStubsPtr->tclpHasSockets) /* 132 */ +#endif +#ifndef TclpGetDate +#define TclpGetDate \ + (tclIntStubsPtr->tclpGetDate) /* 133 */ +#endif +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +#ifndef TclGetEnv +#define TclGetEnv \ + (tclIntStubsPtr->tclGetEnv) /* 138 */ +#endif +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +#ifndef TclpGetCwd +#define TclpGetCwd \ + (tclIntStubsPtr->tclpGetCwd) /* 141 */ +#endif +#ifndef TclSetByteCodeFromAny +#define TclSetByteCodeFromAny \ + (tclIntStubsPtr->tclSetByteCodeFromAny) /* 142 */ +#endif +#ifndef TclAddLiteralObj +#define TclAddLiteralObj \ + (tclIntStubsPtr->tclAddLiteralObj) /* 143 */ +#endif +#ifndef TclHideLiteral +#define TclHideLiteral \ + (tclIntStubsPtr->tclHideLiteral) /* 144 */ +#endif +#ifndef TclGetAuxDataType +#define TclGetAuxDataType \ + (tclIntStubsPtr->tclGetAuxDataType) /* 145 */ +#endif +#ifndef TclHandleCreate +#define TclHandleCreate \ + (tclIntStubsPtr->tclHandleCreate) /* 146 */ +#endif +#ifndef TclHandleFree +#define TclHandleFree \ + (tclIntStubsPtr->tclHandleFree) /* 147 */ +#endif +#ifndef TclHandlePreserve +#define TclHandlePreserve \ + (tclIntStubsPtr->tclHandlePreserve) /* 148 */ +#endif +#ifndef TclHandleRelease +#define TclHandleRelease \ + (tclIntStubsPtr->tclHandleRelease) /* 149 */ +#endif +#ifndef TclRegAbout +#define TclRegAbout \ + (tclIntStubsPtr->tclRegAbout) /* 150 */ +#endif +#ifndef TclRegExpRangeUniChar +#define TclRegExpRangeUniChar \ + (tclIntStubsPtr->tclRegExpRangeUniChar) /* 151 */ +#endif +#ifndef TclSetLibraryPath +#define TclSetLibraryPath \ + (tclIntStubsPtr->tclSetLibraryPath) /* 152 */ +#endif +#ifndef TclGetLibraryPath +#define TclGetLibraryPath \ + (tclIntStubsPtr->tclGetLibraryPath) /* 153 */ +#endif +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +#ifndef TclRegError +#define TclRegError \ + (tclIntStubsPtr->tclRegError) /* 156 */ +#endif +#ifndef TclVarTraceExists +#define TclVarTraceExists \ + (tclIntStubsPtr->tclVarTraceExists) /* 157 */ +#endif +#ifndef TclSetStartupScriptFileName +#define TclSetStartupScriptFileName \ + (tclIntStubsPtr->tclSetStartupScriptFileName) /* 158 */ +#endif +#ifndef TclGetStartupScriptFileName +#define TclGetStartupScriptFileName \ + (tclIntStubsPtr->tclGetStartupScriptFileName) /* 159 */ +#endif +/* Slot 160 is reserved */ +#ifndef TclChannelTransform +#define TclChannelTransform \ + (tclIntStubsPtr->tclChannelTransform) /* 161 */ +#endif +#ifndef TclChannelEventScriptInvoker +#define TclChannelEventScriptInvoker \ + (tclIntStubsPtr->tclChannelEventScriptInvoker) /* 162 */ +#endif +#ifndef TclGetInstructionTable +#define TclGetInstructionTable \ + (tclIntStubsPtr->tclGetInstructionTable) /* 163 */ +#endif +#ifndef TclExpandCodeArray +#define TclExpandCodeArray \ + (tclIntStubsPtr->tclExpandCodeArray) /* 164 */ +#endif +#ifndef TclpSetInitialEncodings +#define TclpSetInitialEncodings \ + (tclIntStubsPtr->tclpSetInitialEncodings) /* 165 */ +#endif +#ifndef TclListObjSetElement +#define TclListObjSetElement \ + (tclIntStubsPtr->tclListObjSetElement) /* 166 */ +#endif +#ifndef TclSetStartupScriptPath +#define TclSetStartupScriptPath \ + (tclIntStubsPtr->tclSetStartupScriptPath) /* 167 */ +#endif +#ifndef TclGetStartupScriptPath +#define TclGetStartupScriptPath \ + (tclIntStubsPtr->tclGetStartupScriptPath) /* 168 */ +#endif +#ifndef TclpUtfNcmp2 +#define TclpUtfNcmp2 \ + (tclIntStubsPtr->tclpUtfNcmp2) /* 169 */ +#endif +#ifndef TclCheckInterpTraces +#define TclCheckInterpTraces \ + (tclIntStubsPtr->tclCheckInterpTraces) /* 170 */ +#endif +#ifndef TclCheckExecutionTraces +#define TclCheckExecutionTraces \ + (tclIntStubsPtr->tclCheckExecutionTraces) /* 171 */ +#endif +#ifndef TclInThreadExit +#define TclInThreadExit \ + (tclIntStubsPtr->tclInThreadExit) /* 172 */ +#endif +#ifndef TclUniCharMatch +#define TclUniCharMatch \ + (tclIntStubsPtr->tclUniCharMatch) /* 173 */ +#endif +/* Slot 174 is reserved */ +#ifndef TclCallVarTraces +#define TclCallVarTraces \ + (tclIntStubsPtr->tclCallVarTraces) /* 175 */ +#endif +#ifndef TclCleanupVar +#define TclCleanupVar \ + (tclIntStubsPtr->tclCleanupVar) /* 176 */ +#endif +#ifndef TclVarErrMsg +#define TclVarErrMsg \ + (tclIntStubsPtr->tclVarErrMsg) /* 177 */ +#endif +#ifndef Tcl_SetStartupScript +#define Tcl_SetStartupScript \ + (tclIntStubsPtr->tcl_SetStartupScript) /* 178 */ +#endif +#ifndef Tcl_GetStartupScript +#define Tcl_GetStartupScript \ + (tclIntStubsPtr->tcl_GetStartupScript) /* 179 */ +#endif +/* Slot 180 is reserved */ +/* Slot 181 is reserved */ +#ifndef TclpLocaltime +#define TclpLocaltime \ + (tclIntStubsPtr->tclpLocaltime) /* 182 */ +#endif +#ifndef TclpGmtime +#define TclpGmtime \ + (tclIntStubsPtr->tclpGmtime) /* 183 */ +#endif +/* Slot 184 is reserved */ +/* Slot 185 is reserved */ +/* Slot 186 is reserved */ +/* Slot 187 is reserved */ +/* Slot 188 is reserved */ +/* Slot 189 is reserved */ +/* Slot 190 is reserved */ +/* Slot 191 is reserved */ +/* Slot 192 is reserved */ +/* Slot 193 is reserved */ +/* Slot 194 is reserved */ +/* Slot 195 is reserved */ +/* Slot 196 is reserved */ +/* Slot 197 is reserved */ +#ifndef TclObjGetFrame +#define TclObjGetFrame \ + (tclIntStubsPtr->tclObjGetFrame) /* 198 */ +#endif +/* Slot 199 is reserved */ +#ifndef TclpObjRemoveDirectory +#define TclpObjRemoveDirectory \ + (tclIntStubsPtr->tclpObjRemoveDirectory) /* 200 */ +#endif +#ifndef TclpObjCopyDirectory +#define TclpObjCopyDirectory \ + (tclIntStubsPtr->tclpObjCopyDirectory) /* 201 */ +#endif +#ifndef TclpObjCreateDirectory +#define TclpObjCreateDirectory \ + (tclIntStubsPtr->tclpObjCreateDirectory) /* 202 */ +#endif +#ifndef TclpObjDeleteFile +#define TclpObjDeleteFile \ + (tclIntStubsPtr->tclpObjDeleteFile) /* 203 */ +#endif +#ifndef TclpObjCopyFile +#define TclpObjCopyFile \ + (tclIntStubsPtr->tclpObjCopyFile) /* 204 */ +#endif +#ifndef TclpObjRenameFile +#define TclpObjRenameFile \ + (tclIntStubsPtr->tclpObjRenameFile) /* 205 */ +#endif +#ifndef TclpObjStat +#define TclpObjStat \ + (tclIntStubsPtr->tclpObjStat) /* 206 */ +#endif +#ifndef TclpObjAccess +#define TclpObjAccess \ + (tclIntStubsPtr->tclpObjAccess) /* 207 */ +#endif +#ifndef TclpOpenFileChannel +#define TclpOpenFileChannel \ + (tclIntStubsPtr->tclpOpenFileChannel) /* 208 */ +#endif +/* Slot 209 is reserved */ +/* Slot 210 is reserved */ +/* Slot 211 is reserved */ +#ifndef TclpFindExecutable +#define TclpFindExecutable \ + (tclIntStubsPtr->tclpFindExecutable) /* 212 */ +#endif +#ifndef TclGetObjNameOfExecutable +#define TclGetObjNameOfExecutable \ + (tclIntStubsPtr->tclGetObjNameOfExecutable) /* 213 */ +#endif +#ifndef TclSetObjNameOfExecutable +#define TclSetObjNameOfExecutable \ + (tclIntStubsPtr->tclSetObjNameOfExecutable) /* 214 */ +#endif +#ifndef TclStackAlloc +#define TclStackAlloc \ + (tclIntStubsPtr->tclStackAlloc) /* 215 */ +#endif +#ifndef TclStackFree +#define TclStackFree \ + (tclIntStubsPtr->tclStackFree) /* 216 */ +#endif +#ifndef TclPushStackFrame +#define TclPushStackFrame \ + (tclIntStubsPtr->tclPushStackFrame) /* 217 */ +#endif +#ifndef TclPopStackFrame +#define TclPopStackFrame \ + (tclIntStubsPtr->tclPopStackFrame) /* 218 */ +#endif +/* Slot 219 is reserved */ +/* Slot 220 is reserved */ +/* Slot 221 is reserved */ +/* Slot 222 is reserved */ +/* Slot 223 is reserved */ +#ifndef TclGetPlatform +#define TclGetPlatform \ + (tclIntStubsPtr->tclGetPlatform) /* 224 */ +#endif +#ifndef TclTraceDictPath +#define TclTraceDictPath \ + (tclIntStubsPtr->tclTraceDictPath) /* 225 */ +#endif +#ifndef TclObjBeingDeleted +#define TclObjBeingDeleted \ + (tclIntStubsPtr->tclObjBeingDeleted) /* 226 */ +#endif +#ifndef TclSetNsPath +#define TclSetNsPath \ + (tclIntStubsPtr->tclSetNsPath) /* 227 */ +#endif +#ifndef TclObjInterpProcCore +#define TclObjInterpProcCore \ + (tclIntStubsPtr->tclObjInterpProcCore) /* 228 */ +#endif +#ifndef TclPtrMakeUpvar +#define TclPtrMakeUpvar \ + (tclIntStubsPtr->tclPtrMakeUpvar) /* 229 */ +#endif +#ifndef TclObjLookupVar +#define TclObjLookupVar \ + (tclIntStubsPtr->tclObjLookupVar) /* 230 */ +#endif +#ifndef TclGetNamespaceFromObj +#define TclGetNamespaceFromObj \ + (tclIntStubsPtr->tclGetNamespaceFromObj) /* 231 */ +#endif +#ifndef TclEvalObjEx +#define TclEvalObjEx \ + (tclIntStubsPtr->tclEvalObjEx) /* 232 */ +#endif +#ifndef TclGetSrcInfoForPc +#define TclGetSrcInfoForPc \ + (tclIntStubsPtr->tclGetSrcInfoForPc) /* 233 */ +#endif +#ifndef TclVarHashCreateVar +#define TclVarHashCreateVar \ + (tclIntStubsPtr->tclVarHashCreateVar) /* 234 */ +#endif +#ifndef TclInitVarHashTable +#define TclInitVarHashTable \ + (tclIntStubsPtr->tclInitVarHashTable) /* 235 */ +#endif +#ifndef TclBackgroundException +#define TclBackgroundException \ + (tclIntStubsPtr->tclBackgroundException) /* 236 */ +#endif +#ifndef TclResetCancellation +#define TclResetCancellation \ + (tclIntStubsPtr->tclResetCancellation) /* 237 */ +#endif +#ifndef TclEvalObjv_NR2 +#define TclEvalObjv_NR2 \ + (tclIntStubsPtr->tclEvalObjv_NR2) /* 238 */ +#endif +#ifndef TclNRInterpProc +#define TclNRInterpProc \ + (*tclIntStubsPtr->tclNRInterpProc) /* 239 */ +#endif +#ifndef TclNRInterpProcCore +#define TclNRInterpProcCore \ + (tclIntStubsPtr->tclNRInterpProcCore) /* 240 */ +#endif +#ifndef TclNRPushRecord +#define TclNRPushRecord \ + (tclIntStubsPtr->tclNRPushRecord) /* 241 */ +#endif +#ifndef TclNRPopAndFreeRecord +#define TclNRPopAndFreeRecord \ + (tclIntStubsPtr->tclNRPopAndFreeRecord) /* 242 */ +#endif +#ifndef TclNREvalObjEx +#define TclNREvalObjEx \ + (tclIntStubsPtr->tclNREvalObjEx) /* 243 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLINTDECLS */ diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index c419da9..3fdd94a 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -1,705 +1,705 @@ -/* - * tclIntPlatDecls.h -- - * - * This file contains the declarations for all platform dependent - * unsupported functions that are exported by the Tcl library. These - * interfaces are not guaranteed to remain the same between - * versions. Use at your own risk. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * All rights reserved. - * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.35 2008/04/08 14:54:53 das Exp $ - */ - -#ifndef _TCLINTPLATDECLS -#define _TCLINTPLATDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclInt.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclGetAndDetachPids_TCL_DECLARED -#define TclGetAndDetachPids_TCL_DECLARED -/* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef TclpCloseFile_TCL_DECLARED -#define TclpCloseFile_TCL_DECLARED -/* 1 */ -EXTERN int TclpCloseFile (TclFile file); -#endif -#ifndef TclpCreateCommandChannel_TCL_DECLARED -#define TclpCreateCommandChannel_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); -#endif -#ifndef TclpCreatePipe_TCL_DECLARED -#define TclpCreatePipe_TCL_DECLARED -/* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); -#endif -#ifndef TclpCreateProcess_TCL_DECLARED -#define TclpCreateProcess_TCL_DECLARED -/* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile_TCL_DECLARED -#define TclpMakeFile_TCL_DECLARED -/* 6 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); -#endif -#ifndef TclpOpenFile_TCL_DECLARED -#define TclpOpenFile_TCL_DECLARED -/* 7 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); -#endif -#ifndef TclUnixWaitForFile_TCL_DECLARED -#define TclUnixWaitForFile_TCL_DECLARED -/* 8 */ -EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); -#endif -#ifndef TclpCreateTempFile_TCL_DECLARED -#define TclpCreateTempFile_TCL_DECLARED -/* 9 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); -#endif -#ifndef TclpReaddir_TCL_DECLARED -#define TclpReaddir_TCL_DECLARED -/* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); -#endif -#ifndef TclpLocaltime_unix_TCL_DECLARED -#define TclpLocaltime_unix_TCL_DECLARED -/* 11 */ -EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); -#endif -#ifndef TclpGmtime_unix_TCL_DECLARED -#define TclpGmtime_unix_TCL_DECLARED -/* 12 */ -EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); -#endif -#ifndef TclpInetNtoa_TCL_DECLARED -#define TclpInetNtoa_TCL_DECLARED -/* 13 */ -EXTERN char * TclpInetNtoa (struct in_addr addr); -#endif -#ifndef TclUnixCopyFile_TCL_DECLARED -#define TclUnixCopyFile_TCL_DECLARED -/* 14 */ -EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, - CONST Tcl_StatBuf * statBufPtr, - int dontCopyAtts); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclWinConvertError_TCL_DECLARED -#define TclWinConvertError_TCL_DECLARED -/* 0 */ -EXTERN void TclWinConvertError (DWORD errCode); -#endif -#ifndef TclWinConvertWSAError_TCL_DECLARED -#define TclWinConvertWSAError_TCL_DECLARED -/* 1 */ -EXTERN void TclWinConvertWSAError (DWORD errCode); -#endif -#ifndef TclWinGetServByName_TCL_DECLARED -#define TclWinGetServByName_TCL_DECLARED -/* 2 */ -EXTERN struct servent * TclWinGetServByName (CONST char * nm, - CONST char * proto); -#endif -#ifndef TclWinGetSockOpt_TCL_DECLARED -#define TclWinGetSockOpt_TCL_DECLARED -/* 3 */ -EXTERN int TclWinGetSockOpt (int s, int level, int optname, - char FAR * optval, int FAR * optlen); -#endif -#ifndef TclWinGetTclInstance_TCL_DECLARED -#define TclWinGetTclInstance_TCL_DECLARED -/* 4 */ -EXTERN HINSTANCE TclWinGetTclInstance (void); -#endif -/* Slot 5 is reserved */ -#ifndef TclWinNToHS_TCL_DECLARED -#define TclWinNToHS_TCL_DECLARED -/* 6 */ -EXTERN u_short TclWinNToHS (u_short ns); -#endif -#ifndef TclWinSetSockOpt_TCL_DECLARED -#define TclWinSetSockOpt_TCL_DECLARED -/* 7 */ -EXTERN int TclWinSetSockOpt (int s, int level, int optname, - CONST char FAR * optval, int optlen); -#endif -#ifndef TclpGetPid_TCL_DECLARED -#define TclpGetPid_TCL_DECLARED -/* 8 */ -EXTERN unsigned long TclpGetPid (Tcl_Pid pid); -#endif -#ifndef TclWinGetPlatformId_TCL_DECLARED -#define TclWinGetPlatformId_TCL_DECLARED -/* 9 */ -EXTERN int TclWinGetPlatformId (void); -#endif -/* Slot 10 is reserved */ -#ifndef TclGetAndDetachPids_TCL_DECLARED -#define TclGetAndDetachPids_TCL_DECLARED -/* 11 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef TclpCloseFile_TCL_DECLARED -#define TclpCloseFile_TCL_DECLARED -/* 12 */ -EXTERN int TclpCloseFile (TclFile file); -#endif -#ifndef TclpCreateCommandChannel_TCL_DECLARED -#define TclpCreateCommandChannel_TCL_DECLARED -/* 13 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); -#endif -#ifndef TclpCreatePipe_TCL_DECLARED -#define TclpCreatePipe_TCL_DECLARED -/* 14 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); -#endif -#ifndef TclpCreateProcess_TCL_DECLARED -#define TclpCreateProcess_TCL_DECLARED -/* 15 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); -#endif -/* Slot 16 is reserved */ -/* Slot 17 is reserved */ -#ifndef TclpMakeFile_TCL_DECLARED -#define TclpMakeFile_TCL_DECLARED -/* 18 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); -#endif -#ifndef TclpOpenFile_TCL_DECLARED -#define TclpOpenFile_TCL_DECLARED -/* 19 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); -#endif -#ifndef TclWinAddProcess_TCL_DECLARED -#define TclWinAddProcess_TCL_DECLARED -/* 20 */ -EXTERN void TclWinAddProcess (HANDLE hProcess, DWORD id); -#endif -/* Slot 21 is reserved */ -#ifndef TclpCreateTempFile_TCL_DECLARED -#define TclpCreateTempFile_TCL_DECLARED -/* 22 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); -#endif -#ifndef TclpGetTZName_TCL_DECLARED -#define TclpGetTZName_TCL_DECLARED -/* 23 */ -EXTERN char * TclpGetTZName (int isdst); -#endif -#ifndef TclWinNoBackslash_TCL_DECLARED -#define TclWinNoBackslash_TCL_DECLARED -/* 24 */ -EXTERN char * TclWinNoBackslash (char * path); -#endif -/* Slot 25 is reserved */ -#ifndef TclWinSetInterfaces_TCL_DECLARED -#define TclWinSetInterfaces_TCL_DECLARED -/* 26 */ -EXTERN void TclWinSetInterfaces (int wide); -#endif -#ifndef TclWinFlushDirtyChannels_TCL_DECLARED -#define TclWinFlushDirtyChannels_TCL_DECLARED -/* 27 */ -EXTERN void TclWinFlushDirtyChannels (void); -#endif -#ifndef TclWinResetInterfaces_TCL_DECLARED -#define TclWinResetInterfaces_TCL_DECLARED -/* 28 */ -EXTERN void TclWinResetInterfaces (void); -#endif -#ifndef TclWinCPUID_TCL_DECLARED -#define TclWinCPUID_TCL_DECLARED -/* 29 */ -EXTERN int TclWinCPUID (unsigned int index, unsigned int * regs); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclGetAndDetachPids_TCL_DECLARED -#define TclGetAndDetachPids_TCL_DECLARED -/* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef TclpCloseFile_TCL_DECLARED -#define TclpCloseFile_TCL_DECLARED -/* 1 */ -EXTERN int TclpCloseFile (TclFile file); -#endif -#ifndef TclpCreateCommandChannel_TCL_DECLARED -#define TclpCreateCommandChannel_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); -#endif -#ifndef TclpCreatePipe_TCL_DECLARED -#define TclpCreatePipe_TCL_DECLARED -/* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); -#endif -#ifndef TclpCreateProcess_TCL_DECLARED -#define TclpCreateProcess_TCL_DECLARED -/* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile_TCL_DECLARED -#define TclpMakeFile_TCL_DECLARED -/* 6 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); -#endif -#ifndef TclpOpenFile_TCL_DECLARED -#define TclpOpenFile_TCL_DECLARED -/* 7 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); -#endif -#ifndef TclUnixWaitForFile_TCL_DECLARED -#define TclUnixWaitForFile_TCL_DECLARED -/* 8 */ -EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); -#endif -#ifndef TclpCreateTempFile_TCL_DECLARED -#define TclpCreateTempFile_TCL_DECLARED -/* 9 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); -#endif -#ifndef TclpReaddir_TCL_DECLARED -#define TclpReaddir_TCL_DECLARED -/* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); -#endif -#ifndef TclpLocaltime_unix_TCL_DECLARED -#define TclpLocaltime_unix_TCL_DECLARED -/* 11 */ -EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); -#endif -#ifndef TclpGmtime_unix_TCL_DECLARED -#define TclpGmtime_unix_TCL_DECLARED -/* 12 */ -EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); -#endif -#ifndef TclpInetNtoa_TCL_DECLARED -#define TclpInetNtoa_TCL_DECLARED -/* 13 */ -EXTERN char * TclpInetNtoa (struct in_addr addr); -#endif -#ifndef TclUnixCopyFile_TCL_DECLARED -#define TclUnixCopyFile_TCL_DECLARED -/* 14 */ -EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, - CONST Tcl_StatBuf * statBufPtr, - int dontCopyAtts); -#endif -#ifndef TclMacOSXGetFileAttribute_TCL_DECLARED -#define TclMacOSXGetFileAttribute_TCL_DECLARED -/* 15 */ -EXTERN int TclMacOSXGetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, - Tcl_Obj ** attributePtrPtr); -#endif -#ifndef TclMacOSXSetFileAttribute_TCL_DECLARED -#define TclMacOSXSetFileAttribute_TCL_DECLARED -/* 16 */ -EXTERN int TclMacOSXSetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, - Tcl_Obj * attributePtr); -#endif -#ifndef TclMacOSXCopyFileAttributes_TCL_DECLARED -#define TclMacOSXCopyFileAttributes_TCL_DECLARED -/* 17 */ -EXTERN int TclMacOSXCopyFileAttributes (CONST char * src, - CONST char * dst, - CONST Tcl_StatBuf * statBufPtr); -#endif -#ifndef TclMacOSXMatchType_TCL_DECLARED -#define TclMacOSXMatchType_TCL_DECLARED -/* 18 */ -EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, - CONST char * pathName, CONST char * fileName, - Tcl_StatBuf * statBufPtr, - Tcl_GlobTypeData * types); -#endif -#endif /* MACOSX */ - -typedef struct TclIntPlatStubs { - int magic; - CONST struct TclIntPlatStubHooks *hooks; - -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ - int (*tclpCloseFile) (TclFile file); /* 1 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ - void *reserved5; - TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ - int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ - char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tclWinConvertError) (DWORD errCode); /* 0 */ - void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ - struct servent * (*tclWinGetServByName) (CONST char * nm, CONST char * proto); /* 2 */ - int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ - HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ - void *reserved5; - u_short (*tclWinNToHS) (u_short ns); /* 6 */ - int (*tclWinSetSockOpt) (int s, int level, int optname, CONST char FAR * optval, int optlen); /* 7 */ - unsigned long (*tclpGetPid) (Tcl_Pid pid); /* 8 */ - int (*tclWinGetPlatformId) (void); /* 9 */ - void *reserved10; - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 11 */ - int (*tclpCloseFile) (TclFile file); /* 12 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 13 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 14 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 15 */ - void *reserved16; - void *reserved17; - TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 19 */ - void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */ - void *reserved21; - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 22 */ - char * (*tclpGetTZName) (int isdst); /* 23 */ - char * (*tclWinNoBackslash) (char * path); /* 24 */ - void *reserved25; - void (*tclWinSetInterfaces) (int wide); /* 26 */ - void (*tclWinFlushDirtyChannels) (void); /* 27 */ - void (*tclWinResetInterfaces) (void); /* 28 */ - int (*tclWinCPUID) (unsigned int index, unsigned int * regs); /* 29 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ - int (*tclpCloseFile) (TclFile file); /* 1 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ - void *reserved5; - TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ - int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ - char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ - int (*tclMacOSXGetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr); /* 15 */ - int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ - int (*tclMacOSXCopyFileAttributes) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr); /* 17 */ - int (*tclMacOSXMatchType) (Tcl_Interp * interp, CONST char * pathName, CONST char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ -#endif /* MACOSX */ -} TclIntPlatStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclIntPlatStubs *tclIntPlatStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclGetAndDetachPids -#define TclGetAndDetachPids \ - (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ -#endif -#ifndef TclpCloseFile -#define TclpCloseFile \ - (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ -#endif -#ifndef TclpCreateCommandChannel -#define TclpCreateCommandChannel \ - (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ -#endif -#ifndef TclpCreatePipe -#define TclpCreatePipe \ - (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ -#endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ -#endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ -#endif -#ifndef TclUnixWaitForFile -#define TclUnixWaitForFile \ - (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ -#endif -#ifndef TclpCreateTempFile -#define TclpCreateTempFile \ - (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ -#endif -#ifndef TclpReaddir -#define TclpReaddir \ - (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ -#endif -#ifndef TclpLocaltime_unix -#define TclpLocaltime_unix \ - (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ -#endif -#ifndef TclpGmtime_unix -#define TclpGmtime_unix \ - (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ -#endif -#ifndef TclpInetNtoa -#define TclpInetNtoa \ - (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ -#endif -#ifndef TclUnixCopyFile -#define TclUnixCopyFile \ - (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclWinConvertError -#define TclWinConvertError \ - (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ -#endif -#ifndef TclWinConvertWSAError -#define TclWinConvertWSAError \ - (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ -#endif -#ifndef TclWinGetServByName -#define TclWinGetServByName \ - (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */ -#endif -#ifndef TclWinGetSockOpt -#define TclWinGetSockOpt \ - (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */ -#endif -#ifndef TclWinGetTclInstance -#define TclWinGetTclInstance \ - (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */ -#endif -/* Slot 5 is reserved */ -#ifndef TclWinNToHS -#define TclWinNToHS \ - (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */ -#endif -#ifndef TclWinSetSockOpt -#define TclWinSetSockOpt \ - (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */ -#endif -#ifndef TclpGetPid -#define TclpGetPid \ - (tclIntPlatStubsPtr->tclpGetPid) /* 8 */ -#endif -#ifndef TclWinGetPlatformId -#define TclWinGetPlatformId \ - (tclIntPlatStubsPtr->tclWinGetPlatformId) /* 9 */ -#endif -/* Slot 10 is reserved */ -#ifndef TclGetAndDetachPids -#define TclGetAndDetachPids \ - (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */ -#endif -#ifndef TclpCloseFile -#define TclpCloseFile \ - (tclIntPlatStubsPtr->tclpCloseFile) /* 12 */ -#endif -#ifndef TclpCreateCommandChannel -#define TclpCreateCommandChannel \ - (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 13 */ -#endif -#ifndef TclpCreatePipe -#define TclpCreatePipe \ - (tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */ -#endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */ -#endif -/* Slot 16 is reserved */ -/* Slot 17 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 18 */ -#endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 19 */ -#endif -#ifndef TclWinAddProcess -#define TclWinAddProcess \ - (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */ -#endif -/* Slot 21 is reserved */ -#ifndef TclpCreateTempFile -#define TclpCreateTempFile \ - (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */ -#endif -#ifndef TclpGetTZName -#define TclpGetTZName \ - (tclIntPlatStubsPtr->tclpGetTZName) /* 23 */ -#endif -#ifndef TclWinNoBackslash -#define TclWinNoBackslash \ - (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */ -#endif -/* Slot 25 is reserved */ -#ifndef TclWinSetInterfaces -#define TclWinSetInterfaces \ - (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */ -#endif -#ifndef TclWinFlushDirtyChannels -#define TclWinFlushDirtyChannels \ - (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */ -#endif -#ifndef TclWinResetInterfaces -#define TclWinResetInterfaces \ - (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */ -#endif -#ifndef TclWinCPUID -#define TclWinCPUID \ - (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclGetAndDetachPids -#define TclGetAndDetachPids \ - (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ -#endif -#ifndef TclpCloseFile -#define TclpCloseFile \ - (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ -#endif -#ifndef TclpCreateCommandChannel -#define TclpCreateCommandChannel \ - (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ -#endif -#ifndef TclpCreatePipe -#define TclpCreatePipe \ - (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ -#endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ -#endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ -#endif -#ifndef TclUnixWaitForFile -#define TclUnixWaitForFile \ - (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ -#endif -#ifndef TclpCreateTempFile -#define TclpCreateTempFile \ - (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ -#endif -#ifndef TclpReaddir -#define TclpReaddir \ - (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ -#endif -#ifndef TclpLocaltime_unix -#define TclpLocaltime_unix \ - (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ -#endif -#ifndef TclpGmtime_unix -#define TclpGmtime_unix \ - (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ -#endif -#ifndef TclpInetNtoa -#define TclpInetNtoa \ - (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ -#endif -#ifndef TclUnixCopyFile -#define TclUnixCopyFile \ - (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ -#endif -#ifndef TclMacOSXGetFileAttribute -#define TclMacOSXGetFileAttribute \ - (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */ -#endif -#ifndef TclMacOSXSetFileAttribute -#define TclMacOSXSetFileAttribute \ - (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */ -#endif -#ifndef TclMacOSXCopyFileAttributes -#define TclMacOSXCopyFileAttributes \ - (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */ -#endif -#ifndef TclMacOSXMatchType -#define TclMacOSXMatchType \ - (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ -#endif -#endif /* MACOSX */ - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLINTPLATDECLS */ +/* + * tclIntPlatDecls.h -- + * + * This file contains the declarations for all platform dependent + * unsupported functions that are exported by the Tcl library. These + * interfaces are not guaranteed to remain the same between + * versions. Use at your own risk. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * All rights reserved. + * + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.36 2008/07/21 21:02:18 ferrieux Exp $ + */ + +#ifndef _TCLINTPLATDECLS +#define _TCLINTPLATDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclInt.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclGetAndDetachPids_TCL_DECLARED +#define TclGetAndDetachPids_TCL_DECLARED +/* 0 */ +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef TclpCloseFile_TCL_DECLARED +#define TclpCloseFile_TCL_DECLARED +/* 1 */ +EXTERN int TclpCloseFile (TclFile file); +#endif +#ifndef TclpCreateCommandChannel_TCL_DECLARED +#define TclpCreateCommandChannel_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, + int numPids, Tcl_Pid * pidPtr); +#endif +#ifndef TclpCreatePipe_TCL_DECLARED +#define TclpCreatePipe_TCL_DECLARED +/* 3 */ +EXTERN int TclpCreatePipe (TclFile * readPipe, + TclFile * writePipe); +#endif +#ifndef TclpCreateProcess_TCL_DECLARED +#define TclpCreateProcess_TCL_DECLARED +/* 4 */ +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + CONST char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, + Tcl_Pid * pidPtr); +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile_TCL_DECLARED +#define TclpMakeFile_TCL_DECLARED +/* 6 */ +EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +#endif +#ifndef TclpOpenFile_TCL_DECLARED +#define TclpOpenFile_TCL_DECLARED +/* 7 */ +EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +#endif +#ifndef TclUnixWaitForFile_TCL_DECLARED +#define TclUnixWaitForFile_TCL_DECLARED +/* 8 */ +EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); +#endif +#ifndef TclpCreateTempFile_TCL_DECLARED +#define TclpCreateTempFile_TCL_DECLARED +/* 9 */ +EXTERN TclFile TclpCreateTempFile (CONST char * contents); +#endif +#ifndef TclpReaddir_TCL_DECLARED +#define TclpReaddir_TCL_DECLARED +/* 10 */ +EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); +#endif +#ifndef TclpLocaltime_unix_TCL_DECLARED +#define TclpLocaltime_unix_TCL_DECLARED +/* 11 */ +EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); +#endif +#ifndef TclpGmtime_unix_TCL_DECLARED +#define TclpGmtime_unix_TCL_DECLARED +/* 12 */ +EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); +#endif +#ifndef TclpInetNtoa_TCL_DECLARED +#define TclpInetNtoa_TCL_DECLARED +/* 13 */ +EXTERN char * TclpInetNtoa (struct in_addr addr); +#endif +#ifndef TclUnixCopyFile_TCL_DECLARED +#define TclUnixCopyFile_TCL_DECLARED +/* 14 */ +EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, + CONST Tcl_StatBuf * statBufPtr, + int dontCopyAtts); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclWinConvertError_TCL_DECLARED +#define TclWinConvertError_TCL_DECLARED +/* 0 */ +EXTERN void TclWinConvertError (DWORD errCode); +#endif +#ifndef TclWinConvertWSAError_TCL_DECLARED +#define TclWinConvertWSAError_TCL_DECLARED +/* 1 */ +EXTERN void TclWinConvertWSAError (DWORD errCode); +#endif +#ifndef TclWinGetServByName_TCL_DECLARED +#define TclWinGetServByName_TCL_DECLARED +/* 2 */ +EXTERN struct servent * TclWinGetServByName (CONST char * nm, + CONST char * proto); +#endif +#ifndef TclWinGetSockOpt_TCL_DECLARED +#define TclWinGetSockOpt_TCL_DECLARED +/* 3 */ +EXTERN int TclWinGetSockOpt (int s, int level, int optname, + char FAR * optval, int FAR * optlen); +#endif +#ifndef TclWinGetTclInstance_TCL_DECLARED +#define TclWinGetTclInstance_TCL_DECLARED +/* 4 */ +EXTERN HINSTANCE TclWinGetTclInstance (void); +#endif +/* Slot 5 is reserved */ +#ifndef TclWinNToHS_TCL_DECLARED +#define TclWinNToHS_TCL_DECLARED +/* 6 */ +EXTERN u_short TclWinNToHS (u_short ns); +#endif +#ifndef TclWinSetSockOpt_TCL_DECLARED +#define TclWinSetSockOpt_TCL_DECLARED +/* 7 */ +EXTERN int TclWinSetSockOpt (int s, int level, int optname, + CONST char FAR * optval, int optlen); +#endif +#ifndef TclpGetPid_TCL_DECLARED +#define TclpGetPid_TCL_DECLARED +/* 8 */ +EXTERN unsigned long TclpGetPid (Tcl_Pid pid); +#endif +#ifndef TclWinGetPlatformId_TCL_DECLARED +#define TclWinGetPlatformId_TCL_DECLARED +/* 9 */ +EXTERN int TclWinGetPlatformId (void); +#endif +/* Slot 10 is reserved */ +#ifndef TclGetAndDetachPids_TCL_DECLARED +#define TclGetAndDetachPids_TCL_DECLARED +/* 11 */ +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef TclpCloseFile_TCL_DECLARED +#define TclpCloseFile_TCL_DECLARED +/* 12 */ +EXTERN int TclpCloseFile (TclFile file); +#endif +#ifndef TclpCreateCommandChannel_TCL_DECLARED +#define TclpCreateCommandChannel_TCL_DECLARED +/* 13 */ +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, + int numPids, Tcl_Pid * pidPtr); +#endif +#ifndef TclpCreatePipe_TCL_DECLARED +#define TclpCreatePipe_TCL_DECLARED +/* 14 */ +EXTERN int TclpCreatePipe (TclFile * readPipe, + TclFile * writePipe); +#endif +#ifndef TclpCreateProcess_TCL_DECLARED +#define TclpCreateProcess_TCL_DECLARED +/* 15 */ +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + CONST char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, + Tcl_Pid * pidPtr); +#endif +/* Slot 16 is reserved */ +/* Slot 17 is reserved */ +#ifndef TclpMakeFile_TCL_DECLARED +#define TclpMakeFile_TCL_DECLARED +/* 18 */ +EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +#endif +#ifndef TclpOpenFile_TCL_DECLARED +#define TclpOpenFile_TCL_DECLARED +/* 19 */ +EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +#endif +#ifndef TclWinAddProcess_TCL_DECLARED +#define TclWinAddProcess_TCL_DECLARED +/* 20 */ +EXTERN void TclWinAddProcess (HANDLE hProcess, DWORD id); +#endif +/* Slot 21 is reserved */ +#ifndef TclpCreateTempFile_TCL_DECLARED +#define TclpCreateTempFile_TCL_DECLARED +/* 22 */ +EXTERN TclFile TclpCreateTempFile (CONST char * contents); +#endif +#ifndef TclpGetTZName_TCL_DECLARED +#define TclpGetTZName_TCL_DECLARED +/* 23 */ +EXTERN char * TclpGetTZName (int isdst); +#endif +#ifndef TclWinNoBackslash_TCL_DECLARED +#define TclWinNoBackslash_TCL_DECLARED +/* 24 */ +EXTERN char * TclWinNoBackslash (char * path); +#endif +/* Slot 25 is reserved */ +#ifndef TclWinSetInterfaces_TCL_DECLARED +#define TclWinSetInterfaces_TCL_DECLARED +/* 26 */ +EXTERN void TclWinSetInterfaces (int wide); +#endif +#ifndef TclWinFlushDirtyChannels_TCL_DECLARED +#define TclWinFlushDirtyChannels_TCL_DECLARED +/* 27 */ +EXTERN void TclWinFlushDirtyChannels (void); +#endif +#ifndef TclWinResetInterfaces_TCL_DECLARED +#define TclWinResetInterfaces_TCL_DECLARED +/* 28 */ +EXTERN void TclWinResetInterfaces (void); +#endif +#ifndef TclWinCPUID_TCL_DECLARED +#define TclWinCPUID_TCL_DECLARED +/* 29 */ +EXTERN int TclWinCPUID (unsigned int index, unsigned int * regs); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclGetAndDetachPids_TCL_DECLARED +#define TclGetAndDetachPids_TCL_DECLARED +/* 0 */ +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef TclpCloseFile_TCL_DECLARED +#define TclpCloseFile_TCL_DECLARED +/* 1 */ +EXTERN int TclpCloseFile (TclFile file); +#endif +#ifndef TclpCreateCommandChannel_TCL_DECLARED +#define TclpCreateCommandChannel_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, + int numPids, Tcl_Pid * pidPtr); +#endif +#ifndef TclpCreatePipe_TCL_DECLARED +#define TclpCreatePipe_TCL_DECLARED +/* 3 */ +EXTERN int TclpCreatePipe (TclFile * readPipe, + TclFile * writePipe); +#endif +#ifndef TclpCreateProcess_TCL_DECLARED +#define TclpCreateProcess_TCL_DECLARED +/* 4 */ +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + CONST char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, + Tcl_Pid * pidPtr); +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile_TCL_DECLARED +#define TclpMakeFile_TCL_DECLARED +/* 6 */ +EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +#endif +#ifndef TclpOpenFile_TCL_DECLARED +#define TclpOpenFile_TCL_DECLARED +/* 7 */ +EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +#endif +#ifndef TclUnixWaitForFile_TCL_DECLARED +#define TclUnixWaitForFile_TCL_DECLARED +/* 8 */ +EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); +#endif +#ifndef TclpCreateTempFile_TCL_DECLARED +#define TclpCreateTempFile_TCL_DECLARED +/* 9 */ +EXTERN TclFile TclpCreateTempFile (CONST char * contents); +#endif +#ifndef TclpReaddir_TCL_DECLARED +#define TclpReaddir_TCL_DECLARED +/* 10 */ +EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); +#endif +#ifndef TclpLocaltime_unix_TCL_DECLARED +#define TclpLocaltime_unix_TCL_DECLARED +/* 11 */ +EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); +#endif +#ifndef TclpGmtime_unix_TCL_DECLARED +#define TclpGmtime_unix_TCL_DECLARED +/* 12 */ +EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); +#endif +#ifndef TclpInetNtoa_TCL_DECLARED +#define TclpInetNtoa_TCL_DECLARED +/* 13 */ +EXTERN char * TclpInetNtoa (struct in_addr addr); +#endif +#ifndef TclUnixCopyFile_TCL_DECLARED +#define TclUnixCopyFile_TCL_DECLARED +/* 14 */ +EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, + CONST Tcl_StatBuf * statBufPtr, + int dontCopyAtts); +#endif +#ifndef TclMacOSXGetFileAttribute_TCL_DECLARED +#define TclMacOSXGetFileAttribute_TCL_DECLARED +/* 15 */ +EXTERN int TclMacOSXGetFileAttribute (Tcl_Interp * interp, + int objIndex, Tcl_Obj * fileName, + Tcl_Obj ** attributePtrPtr); +#endif +#ifndef TclMacOSXSetFileAttribute_TCL_DECLARED +#define TclMacOSXSetFileAttribute_TCL_DECLARED +/* 16 */ +EXTERN int TclMacOSXSetFileAttribute (Tcl_Interp * interp, + int objIndex, Tcl_Obj * fileName, + Tcl_Obj * attributePtr); +#endif +#ifndef TclMacOSXCopyFileAttributes_TCL_DECLARED +#define TclMacOSXCopyFileAttributes_TCL_DECLARED +/* 17 */ +EXTERN int TclMacOSXCopyFileAttributes (CONST char * src, + CONST char * dst, + CONST Tcl_StatBuf * statBufPtr); +#endif +#ifndef TclMacOSXMatchType_TCL_DECLARED +#define TclMacOSXMatchType_TCL_DECLARED +/* 18 */ +EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, + CONST char * pathName, CONST char * fileName, + Tcl_StatBuf * statBufPtr, + Tcl_GlobTypeData * types); +#endif +#endif /* MACOSX */ + +typedef struct TclIntPlatStubs { + int magic; + CONST struct TclIntPlatStubHooks *hooks; + +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ + int (*tclpCloseFile) (TclFile file); /* 1 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ + int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + void *reserved5; + TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ + TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ + int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ + TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ + Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ + struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ + char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ + int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tclWinConvertError) (DWORD errCode); /* 0 */ + void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ + struct servent * (*tclWinGetServByName) (CONST char * nm, CONST char * proto); /* 2 */ + int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ + HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ + void *reserved5; + u_short (*tclWinNToHS) (u_short ns); /* 6 */ + int (*tclWinSetSockOpt) (int s, int level, int optname, CONST char FAR * optval, int optlen); /* 7 */ + unsigned long (*tclpGetPid) (Tcl_Pid pid); /* 8 */ + int (*tclWinGetPlatformId) (void); /* 9 */ + void *reserved10; + void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 11 */ + int (*tclpCloseFile) (TclFile file); /* 12 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 13 */ + int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 14 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 15 */ + void *reserved16; + void *reserved17; + TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ + TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 19 */ + void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */ + void *reserved21; + TclFile (*tclpCreateTempFile) (CONST char * contents); /* 22 */ + char * (*tclpGetTZName) (int isdst); /* 23 */ + char * (*tclWinNoBackslash) (char * path); /* 24 */ + void *reserved25; + void (*tclWinSetInterfaces) (int wide); /* 26 */ + void (*tclWinFlushDirtyChannels) (void); /* 27 */ + void (*tclWinResetInterfaces) (void); /* 28 */ + int (*tclWinCPUID) (unsigned int index, unsigned int * regs); /* 29 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ + int (*tclpCloseFile) (TclFile file); /* 1 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ + int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + void *reserved5; + TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ + TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ + int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ + TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ + Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ + struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ + char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ + int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ + int (*tclMacOSXGetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr); /* 15 */ + int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ + int (*tclMacOSXCopyFileAttributes) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr); /* 17 */ + int (*tclMacOSXMatchType) (Tcl_Interp * interp, CONST char * pathName, CONST char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ +#endif /* MACOSX */ +} TclIntPlatStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclIntPlatStubs *tclIntPlatStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclGetAndDetachPids +#define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ +#endif +#ifndef TclpCloseFile +#define TclpCloseFile \ + (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ +#endif +#ifndef TclpCreateCommandChannel +#define TclpCreateCommandChannel \ + (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ +#endif +#ifndef TclpCreatePipe +#define TclpCreatePipe \ + (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ +#endif +#ifndef TclpCreateProcess +#define TclpCreateProcess \ + (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile +#define TclpMakeFile \ + (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ +#endif +#ifndef TclpOpenFile +#define TclpOpenFile \ + (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ +#endif +#ifndef TclUnixWaitForFile +#define TclUnixWaitForFile \ + (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ +#endif +#ifndef TclpCreateTempFile +#define TclpCreateTempFile \ + (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ +#endif +#ifndef TclpReaddir +#define TclpReaddir \ + (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ +#endif +#ifndef TclpLocaltime_unix +#define TclpLocaltime_unix \ + (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ +#endif +#ifndef TclpGmtime_unix +#define TclpGmtime_unix \ + (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ +#endif +#ifndef TclpInetNtoa +#define TclpInetNtoa \ + (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ +#endif +#ifndef TclUnixCopyFile +#define TclUnixCopyFile \ + (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclWinConvertError +#define TclWinConvertError \ + (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ +#endif +#ifndef TclWinConvertWSAError +#define TclWinConvertWSAError \ + (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ +#endif +#ifndef TclWinGetServByName +#define TclWinGetServByName \ + (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */ +#endif +#ifndef TclWinGetSockOpt +#define TclWinGetSockOpt \ + (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */ +#endif +#ifndef TclWinGetTclInstance +#define TclWinGetTclInstance \ + (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */ +#endif +/* Slot 5 is reserved */ +#ifndef TclWinNToHS +#define TclWinNToHS \ + (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */ +#endif +#ifndef TclWinSetSockOpt +#define TclWinSetSockOpt \ + (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */ +#endif +#ifndef TclpGetPid +#define TclpGetPid \ + (tclIntPlatStubsPtr->tclpGetPid) /* 8 */ +#endif +#ifndef TclWinGetPlatformId +#define TclWinGetPlatformId \ + (tclIntPlatStubsPtr->tclWinGetPlatformId) /* 9 */ +#endif +/* Slot 10 is reserved */ +#ifndef TclGetAndDetachPids +#define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */ +#endif +#ifndef TclpCloseFile +#define TclpCloseFile \ + (tclIntPlatStubsPtr->tclpCloseFile) /* 12 */ +#endif +#ifndef TclpCreateCommandChannel +#define TclpCreateCommandChannel \ + (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 13 */ +#endif +#ifndef TclpCreatePipe +#define TclpCreatePipe \ + (tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */ +#endif +#ifndef TclpCreateProcess +#define TclpCreateProcess \ + (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */ +#endif +/* Slot 16 is reserved */ +/* Slot 17 is reserved */ +#ifndef TclpMakeFile +#define TclpMakeFile \ + (tclIntPlatStubsPtr->tclpMakeFile) /* 18 */ +#endif +#ifndef TclpOpenFile +#define TclpOpenFile \ + (tclIntPlatStubsPtr->tclpOpenFile) /* 19 */ +#endif +#ifndef TclWinAddProcess +#define TclWinAddProcess \ + (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */ +#endif +/* Slot 21 is reserved */ +#ifndef TclpCreateTempFile +#define TclpCreateTempFile \ + (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */ +#endif +#ifndef TclpGetTZName +#define TclpGetTZName \ + (tclIntPlatStubsPtr->tclpGetTZName) /* 23 */ +#endif +#ifndef TclWinNoBackslash +#define TclWinNoBackslash \ + (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */ +#endif +/* Slot 25 is reserved */ +#ifndef TclWinSetInterfaces +#define TclWinSetInterfaces \ + (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */ +#endif +#ifndef TclWinFlushDirtyChannels +#define TclWinFlushDirtyChannels \ + (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */ +#endif +#ifndef TclWinResetInterfaces +#define TclWinResetInterfaces \ + (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */ +#endif +#ifndef TclWinCPUID +#define TclWinCPUID \ + (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclGetAndDetachPids +#define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ +#endif +#ifndef TclpCloseFile +#define TclpCloseFile \ + (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ +#endif +#ifndef TclpCreateCommandChannel +#define TclpCreateCommandChannel \ + (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ +#endif +#ifndef TclpCreatePipe +#define TclpCreatePipe \ + (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ +#endif +#ifndef TclpCreateProcess +#define TclpCreateProcess \ + (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile +#define TclpMakeFile \ + (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ +#endif +#ifndef TclpOpenFile +#define TclpOpenFile \ + (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ +#endif +#ifndef TclUnixWaitForFile +#define TclUnixWaitForFile \ + (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ +#endif +#ifndef TclpCreateTempFile +#define TclpCreateTempFile \ + (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ +#endif +#ifndef TclpReaddir +#define TclpReaddir \ + (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ +#endif +#ifndef TclpLocaltime_unix +#define TclpLocaltime_unix \ + (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ +#endif +#ifndef TclpGmtime_unix +#define TclpGmtime_unix \ + (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ +#endif +#ifndef TclpInetNtoa +#define TclpInetNtoa \ + (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ +#endif +#ifndef TclUnixCopyFile +#define TclUnixCopyFile \ + (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ +#endif +#ifndef TclMacOSXGetFileAttribute +#define TclMacOSXGetFileAttribute \ + (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */ +#endif +#ifndef TclMacOSXSetFileAttribute +#define TclMacOSXSetFileAttribute \ + (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */ +#endif +#ifndef TclMacOSXCopyFileAttributes +#define TclMacOSXCopyFileAttributes \ + (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */ +#endif +#ifndef TclMacOSXMatchType +#define TclMacOSXMatchType \ + (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ +#endif +#endif /* MACOSX */ + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLINTPLATDECLS */ diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 969cd5d..1c01ce1 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,382 +1,382 @@ -/* - * $Id: tclOODecls.h,v 1.5 2008/06/12 06:29:18 das Exp $ - * - * This file is (mostly) automatically generated from tclOO.decls. - */ - - -#ifndef _TCLOODECLS -#define _TCLOODECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclOO.decls script. - */ - - - -#if defined(USE_TCLOO_STUBS) -extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); -#define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp),TCLOO_VERSION) -#else -#define Tcl_OOInitStubs(interp) Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION) -#endif - - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef Tcl_CopyObjectInstance_TCL_DECLARED -#define Tcl_CopyObjectInstance_TCL_DECLARED -/* 0 */ -EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, - Tcl_Object sourceObject, - const char * targetName, - const char * targetNamespaceName); -#endif -#ifndef Tcl_GetClassAsObject_TCL_DECLARED -#define Tcl_GetClassAsObject_TCL_DECLARED -/* 1 */ -EXTERN Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); -#endif -#ifndef Tcl_GetObjectAsClass_TCL_DECLARED -#define Tcl_GetObjectAsClass_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); -#endif -#ifndef Tcl_GetObjectCommand_TCL_DECLARED -#define Tcl_GetObjectCommand_TCL_DECLARED -/* 3 */ -EXTERN Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); -#endif -#ifndef Tcl_GetObjectFromObj_TCL_DECLARED -#define Tcl_GetObjectFromObj_TCL_DECLARED -/* 4 */ -EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetObjectNamespace_TCL_DECLARED -#define Tcl_GetObjectNamespace_TCL_DECLARED -/* 5 */ -EXTERN Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); -#endif -#ifndef Tcl_MethodDeclarerClass_TCL_DECLARED -#define Tcl_MethodDeclarerClass_TCL_DECLARED -/* 6 */ -EXTERN Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); -#endif -#ifndef Tcl_MethodDeclarerObject_TCL_DECLARED -#define Tcl_MethodDeclarerObject_TCL_DECLARED -/* 7 */ -EXTERN Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); -#endif -#ifndef Tcl_MethodIsPublic_TCL_DECLARED -#define Tcl_MethodIsPublic_TCL_DECLARED -/* 8 */ -EXTERN int Tcl_MethodIsPublic (Tcl_Method method); -#endif -#ifndef Tcl_MethodIsType_TCL_DECLARED -#define Tcl_MethodIsType_TCL_DECLARED -/* 9 */ -EXTERN int Tcl_MethodIsType (Tcl_Method method, - const Tcl_MethodType * typePtr, - ClientData * clientDataPtr); -#endif -#ifndef Tcl_MethodName_TCL_DECLARED -#define Tcl_MethodName_TCL_DECLARED -/* 10 */ -EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); -#endif -#ifndef Tcl_NewInstanceMethod_TCL_DECLARED -#define Tcl_NewInstanceMethod_TCL_DECLARED -/* 11 */ -EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, - Tcl_Object object, Tcl_Obj * nameObj, - int isPublic, const Tcl_MethodType * typePtr, - ClientData clientData); -#endif -#ifndef Tcl_NewMethod_TCL_DECLARED -#define Tcl_NewMethod_TCL_DECLARED -/* 12 */ -EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, - Tcl_Obj * nameObj, int isPublic, - const Tcl_MethodType * typePtr, - ClientData clientData); -#endif -#ifndef Tcl_NewObjectInstance_TCL_DECLARED -#define Tcl_NewObjectInstance_TCL_DECLARED -/* 13 */ -EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, - Tcl_Class cls, const char * nameStr, - const char * nsNameStr, int objc, - Tcl_Obj *const * objv, int skip); -#endif -#ifndef Tcl_ObjectDeleted_TCL_DECLARED -#define Tcl_ObjectDeleted_TCL_DECLARED -/* 14 */ -EXTERN int Tcl_ObjectDeleted (Tcl_Object object); -#endif -#ifndef Tcl_ObjectContextIsFiltering_TCL_DECLARED -#define Tcl_ObjectContextIsFiltering_TCL_DECLARED -/* 15 */ -EXTERN int Tcl_ObjectContextIsFiltering ( - Tcl_ObjectContext context); -#endif -#ifndef Tcl_ObjectContextMethod_TCL_DECLARED -#define Tcl_ObjectContextMethod_TCL_DECLARED -/* 16 */ -EXTERN Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); -#endif -#ifndef Tcl_ObjectContextObject_TCL_DECLARED -#define Tcl_ObjectContextObject_TCL_DECLARED -/* 17 */ -EXTERN Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); -#endif -#ifndef Tcl_ObjectContextSkippedArgs_TCL_DECLARED -#define Tcl_ObjectContextSkippedArgs_TCL_DECLARED -/* 18 */ -EXTERN int Tcl_ObjectContextSkippedArgs ( - Tcl_ObjectContext context); -#endif -#ifndef Tcl_ClassGetMetadata_TCL_DECLARED -#define Tcl_ClassGetMetadata_TCL_DECLARED -/* 19 */ -EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr); -#endif -#ifndef Tcl_ClassSetMetadata_TCL_DECLARED -#define Tcl_ClassSetMetadata_TCL_DECLARED -/* 20 */ -EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr, - ClientData metadata); -#endif -#ifndef Tcl_ObjectGetMetadata_TCL_DECLARED -#define Tcl_ObjectGetMetadata_TCL_DECLARED -/* 21 */ -EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr); -#endif -#ifndef Tcl_ObjectSetMetadata_TCL_DECLARED -#define Tcl_ObjectSetMetadata_TCL_DECLARED -/* 22 */ -EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr, - ClientData metadata); -#endif -#ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED -#define Tcl_ObjectContextInvokeNext_TCL_DECLARED -/* 23 */ -EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, - Tcl_ObjectContext context, int objc, - Tcl_Obj *const * objv, int skip); -#endif -#ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED -#define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED -/* 24 */ -EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( - Tcl_Object object); -#endif -#ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED -#define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED -/* 25 */ -EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, - Tcl_ObjectMapMethodNameProc mapMethodNameProc); -#endif -#ifndef Tcl_ClassSetConstructor_TCL_DECLARED -#define Tcl_ClassSetConstructor_TCL_DECLARED -/* 26 */ -EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, - Tcl_Class clazz, Tcl_Method method); -#endif -#ifndef Tcl_ClassSetDestructor_TCL_DECLARED -#define Tcl_ClassSetDestructor_TCL_DECLARED -/* 27 */ -EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, - Tcl_Class clazz, Tcl_Method method); -#endif - -typedef struct TclOOStubHooks { - CONST struct TclOOIntStubs *tclOOIntStubs; -} TclOOStubHooks; - -typedef struct TclOOStubs { - int magic; - CONST struct TclOOStubHooks *hooks; - - Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ - Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ - Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ - Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ - Tcl_Object (*tcl_GetObjectFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 4 */ - Tcl_Namespace * (*tcl_GetObjectNamespace) (Tcl_Object object); /* 5 */ - Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ - Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ - int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ - int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ - Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ - Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ - Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ - Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ - int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ - int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ - Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ - Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ - int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ - ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ - void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ - ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ - void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ - int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ - Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ - void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ - void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ - void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ -} TclOOStubs; - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) -extern CONST TclOOStubs *tclOOStubsPtr; -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef Tcl_CopyObjectInstance -#define Tcl_CopyObjectInstance \ - (tclOOStubsPtr->tcl_CopyObjectInstance) /* 0 */ -#endif -#ifndef Tcl_GetClassAsObject -#define Tcl_GetClassAsObject \ - (tclOOStubsPtr->tcl_GetClassAsObject) /* 1 */ -#endif -#ifndef Tcl_GetObjectAsClass -#define Tcl_GetObjectAsClass \ - (tclOOStubsPtr->tcl_GetObjectAsClass) /* 2 */ -#endif -#ifndef Tcl_GetObjectCommand -#define Tcl_GetObjectCommand \ - (tclOOStubsPtr->tcl_GetObjectCommand) /* 3 */ -#endif -#ifndef Tcl_GetObjectFromObj -#define Tcl_GetObjectFromObj \ - (tclOOStubsPtr->tcl_GetObjectFromObj) /* 4 */ -#endif -#ifndef Tcl_GetObjectNamespace -#define Tcl_GetObjectNamespace \ - (tclOOStubsPtr->tcl_GetObjectNamespace) /* 5 */ -#endif -#ifndef Tcl_MethodDeclarerClass -#define Tcl_MethodDeclarerClass \ - (tclOOStubsPtr->tcl_MethodDeclarerClass) /* 6 */ -#endif -#ifndef Tcl_MethodDeclarerObject -#define Tcl_MethodDeclarerObject \ - (tclOOStubsPtr->tcl_MethodDeclarerObject) /* 7 */ -#endif -#ifndef Tcl_MethodIsPublic -#define Tcl_MethodIsPublic \ - (tclOOStubsPtr->tcl_MethodIsPublic) /* 8 */ -#endif -#ifndef Tcl_MethodIsType -#define Tcl_MethodIsType \ - (tclOOStubsPtr->tcl_MethodIsType) /* 9 */ -#endif -#ifndef Tcl_MethodName -#define Tcl_MethodName \ - (tclOOStubsPtr->tcl_MethodName) /* 10 */ -#endif -#ifndef Tcl_NewInstanceMethod -#define Tcl_NewInstanceMethod \ - (tclOOStubsPtr->tcl_NewInstanceMethod) /* 11 */ -#endif -#ifndef Tcl_NewMethod -#define Tcl_NewMethod \ - (tclOOStubsPtr->tcl_NewMethod) /* 12 */ -#endif -#ifndef Tcl_NewObjectInstance -#define Tcl_NewObjectInstance \ - (tclOOStubsPtr->tcl_NewObjectInstance) /* 13 */ -#endif -#ifndef Tcl_ObjectDeleted -#define Tcl_ObjectDeleted \ - (tclOOStubsPtr->tcl_ObjectDeleted) /* 14 */ -#endif -#ifndef Tcl_ObjectContextIsFiltering -#define Tcl_ObjectContextIsFiltering \ - (tclOOStubsPtr->tcl_ObjectContextIsFiltering) /* 15 */ -#endif -#ifndef Tcl_ObjectContextMethod -#define Tcl_ObjectContextMethod \ - (tclOOStubsPtr->tcl_ObjectContextMethod) /* 16 */ -#endif -#ifndef Tcl_ObjectContextObject -#define Tcl_ObjectContextObject \ - (tclOOStubsPtr->tcl_ObjectContextObject) /* 17 */ -#endif -#ifndef Tcl_ObjectContextSkippedArgs -#define Tcl_ObjectContextSkippedArgs \ - (tclOOStubsPtr->tcl_ObjectContextSkippedArgs) /* 18 */ -#endif -#ifndef Tcl_ClassGetMetadata -#define Tcl_ClassGetMetadata \ - (tclOOStubsPtr->tcl_ClassGetMetadata) /* 19 */ -#endif -#ifndef Tcl_ClassSetMetadata -#define Tcl_ClassSetMetadata \ - (tclOOStubsPtr->tcl_ClassSetMetadata) /* 20 */ -#endif -#ifndef Tcl_ObjectGetMetadata -#define Tcl_ObjectGetMetadata \ - (tclOOStubsPtr->tcl_ObjectGetMetadata) /* 21 */ -#endif -#ifndef Tcl_ObjectSetMetadata -#define Tcl_ObjectSetMetadata \ - (tclOOStubsPtr->tcl_ObjectSetMetadata) /* 22 */ -#endif -#ifndef Tcl_ObjectContextInvokeNext -#define Tcl_ObjectContextInvokeNext \ - (tclOOStubsPtr->tcl_ObjectContextInvokeNext) /* 23 */ -#endif -#ifndef Tcl_ObjectGetMethodNameMapper -#define Tcl_ObjectGetMethodNameMapper \ - (tclOOStubsPtr->tcl_ObjectGetMethodNameMapper) /* 24 */ -#endif -#ifndef Tcl_ObjectSetMethodNameMapper -#define Tcl_ObjectSetMethodNameMapper \ - (tclOOStubsPtr->tcl_ObjectSetMethodNameMapper) /* 25 */ -#endif -#ifndef Tcl_ClassSetConstructor -#define Tcl_ClassSetConstructor \ - (tclOOStubsPtr->tcl_ClassSetConstructor) /* 26 */ -#endif -#ifndef Tcl_ClassSetDestructor -#define Tcl_ClassSetDestructor \ - (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ -#endif - -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLOODECLS */ +/* + * $Id: tclOODecls.h,v 1.6 2008/07/21 21:02:18 ferrieux Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + */ + + +#ifndef _TCLOODECLS +#define _TCLOODECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclOO.decls script. + */ + + + +#if defined(USE_TCLOO_STUBS) +extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); +#define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp),TCLOO_VERSION) +#else +#define Tcl_OOInitStubs(interp) Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION) +#endif + + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tcl_CopyObjectInstance_TCL_DECLARED +#define Tcl_CopyObjectInstance_TCL_DECLARED +/* 0 */ +EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, + Tcl_Object sourceObject, + const char * targetName, + const char * targetNamespaceName); +#endif +#ifndef Tcl_GetClassAsObject_TCL_DECLARED +#define Tcl_GetClassAsObject_TCL_DECLARED +/* 1 */ +EXTERN Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); +#endif +#ifndef Tcl_GetObjectAsClass_TCL_DECLARED +#define Tcl_GetObjectAsClass_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); +#endif +#ifndef Tcl_GetObjectCommand_TCL_DECLARED +#define Tcl_GetObjectCommand_TCL_DECLARED +/* 3 */ +EXTERN Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); +#endif +#ifndef Tcl_GetObjectFromObj_TCL_DECLARED +#define Tcl_GetObjectFromObj_TCL_DECLARED +/* 4 */ +EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetObjectNamespace_TCL_DECLARED +#define Tcl_GetObjectNamespace_TCL_DECLARED +/* 5 */ +EXTERN Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); +#endif +#ifndef Tcl_MethodDeclarerClass_TCL_DECLARED +#define Tcl_MethodDeclarerClass_TCL_DECLARED +/* 6 */ +EXTERN Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); +#endif +#ifndef Tcl_MethodDeclarerObject_TCL_DECLARED +#define Tcl_MethodDeclarerObject_TCL_DECLARED +/* 7 */ +EXTERN Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); +#endif +#ifndef Tcl_MethodIsPublic_TCL_DECLARED +#define Tcl_MethodIsPublic_TCL_DECLARED +/* 8 */ +EXTERN int Tcl_MethodIsPublic (Tcl_Method method); +#endif +#ifndef Tcl_MethodIsType_TCL_DECLARED +#define Tcl_MethodIsType_TCL_DECLARED +/* 9 */ +EXTERN int Tcl_MethodIsType (Tcl_Method method, + const Tcl_MethodType * typePtr, + ClientData * clientDataPtr); +#endif +#ifndef Tcl_MethodName_TCL_DECLARED +#define Tcl_MethodName_TCL_DECLARED +/* 10 */ +EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); +#endif +#ifndef Tcl_NewInstanceMethod_TCL_DECLARED +#define Tcl_NewInstanceMethod_TCL_DECLARED +/* 11 */ +EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, + Tcl_Object object, Tcl_Obj * nameObj, + int isPublic, const Tcl_MethodType * typePtr, + ClientData clientData); +#endif +#ifndef Tcl_NewMethod_TCL_DECLARED +#define Tcl_NewMethod_TCL_DECLARED +/* 12 */ +EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, + Tcl_Obj * nameObj, int isPublic, + const Tcl_MethodType * typePtr, + ClientData clientData); +#endif +#ifndef Tcl_NewObjectInstance_TCL_DECLARED +#define Tcl_NewObjectInstance_TCL_DECLARED +/* 13 */ +EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, + Tcl_Class cls, const char * nameStr, + const char * nsNameStr, int objc, + Tcl_Obj *const * objv, int skip); +#endif +#ifndef Tcl_ObjectDeleted_TCL_DECLARED +#define Tcl_ObjectDeleted_TCL_DECLARED +/* 14 */ +EXTERN int Tcl_ObjectDeleted (Tcl_Object object); +#endif +#ifndef Tcl_ObjectContextIsFiltering_TCL_DECLARED +#define Tcl_ObjectContextIsFiltering_TCL_DECLARED +/* 15 */ +EXTERN int Tcl_ObjectContextIsFiltering ( + Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextMethod_TCL_DECLARED +#define Tcl_ObjectContextMethod_TCL_DECLARED +/* 16 */ +EXTERN Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextObject_TCL_DECLARED +#define Tcl_ObjectContextObject_TCL_DECLARED +/* 17 */ +EXTERN Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextSkippedArgs_TCL_DECLARED +#define Tcl_ObjectContextSkippedArgs_TCL_DECLARED +/* 18 */ +EXTERN int Tcl_ObjectContextSkippedArgs ( + Tcl_ObjectContext context); +#endif +#ifndef Tcl_ClassGetMetadata_TCL_DECLARED +#define Tcl_ClassGetMetadata_TCL_DECLARED +/* 19 */ +EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, + const Tcl_ObjectMetadataType * typePtr); +#endif +#ifndef Tcl_ClassSetMetadata_TCL_DECLARED +#define Tcl_ClassSetMetadata_TCL_DECLARED +/* 20 */ +EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, + const Tcl_ObjectMetadataType * typePtr, + ClientData metadata); +#endif +#ifndef Tcl_ObjectGetMetadata_TCL_DECLARED +#define Tcl_ObjectGetMetadata_TCL_DECLARED +/* 21 */ +EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, + const Tcl_ObjectMetadataType * typePtr); +#endif +#ifndef Tcl_ObjectSetMetadata_TCL_DECLARED +#define Tcl_ObjectSetMetadata_TCL_DECLARED +/* 22 */ +EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, + const Tcl_ObjectMetadataType * typePtr, + ClientData metadata); +#endif +#ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED +#define Tcl_ObjectContextInvokeNext_TCL_DECLARED +/* 23 */ +EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, + Tcl_ObjectContext context, int objc, + Tcl_Obj *const * objv, int skip); +#endif +#ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED +#define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED +/* 24 */ +EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( + Tcl_Object object); +#endif +#ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED +#define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED +/* 25 */ +EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, + Tcl_ObjectMapMethodNameProc mapMethodNameProc); +#endif +#ifndef Tcl_ClassSetConstructor_TCL_DECLARED +#define Tcl_ClassSetConstructor_TCL_DECLARED +/* 26 */ +EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, + Tcl_Class clazz, Tcl_Method method); +#endif +#ifndef Tcl_ClassSetDestructor_TCL_DECLARED +#define Tcl_ClassSetDestructor_TCL_DECLARED +/* 27 */ +EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, + Tcl_Class clazz, Tcl_Method method); +#endif + +typedef struct TclOOStubHooks { + CONST struct TclOOIntStubs *tclOOIntStubs; +} TclOOStubHooks; + +typedef struct TclOOStubs { + int magic; + CONST struct TclOOStubHooks *hooks; + + Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ + Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ + Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ + Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ + Tcl_Object (*tcl_GetObjectFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 4 */ + Tcl_Namespace * (*tcl_GetObjectNamespace) (Tcl_Object object); /* 5 */ + Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ + Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ + int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ + int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ + Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ + Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ + Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ + Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ + int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ + int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ + Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ + Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ + int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ + ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ + void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ + ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ + void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ + int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ + Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ + void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ + void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ + void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ +} TclOOStubs; + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) +extern CONST TclOOStubs *tclOOStubsPtr; +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_CopyObjectInstance +#define Tcl_CopyObjectInstance \ + (tclOOStubsPtr->tcl_CopyObjectInstance) /* 0 */ +#endif +#ifndef Tcl_GetClassAsObject +#define Tcl_GetClassAsObject \ + (tclOOStubsPtr->tcl_GetClassAsObject) /* 1 */ +#endif +#ifndef Tcl_GetObjectAsClass +#define Tcl_GetObjectAsClass \ + (tclOOStubsPtr->tcl_GetObjectAsClass) /* 2 */ +#endif +#ifndef Tcl_GetObjectCommand +#define Tcl_GetObjectCommand \ + (tclOOStubsPtr->tcl_GetObjectCommand) /* 3 */ +#endif +#ifndef Tcl_GetObjectFromObj +#define Tcl_GetObjectFromObj \ + (tclOOStubsPtr->tcl_GetObjectFromObj) /* 4 */ +#endif +#ifndef Tcl_GetObjectNamespace +#define Tcl_GetObjectNamespace \ + (tclOOStubsPtr->tcl_GetObjectNamespace) /* 5 */ +#endif +#ifndef Tcl_MethodDeclarerClass +#define Tcl_MethodDeclarerClass \ + (tclOOStubsPtr->tcl_MethodDeclarerClass) /* 6 */ +#endif +#ifndef Tcl_MethodDeclarerObject +#define Tcl_MethodDeclarerObject \ + (tclOOStubsPtr->tcl_MethodDeclarerObject) /* 7 */ +#endif +#ifndef Tcl_MethodIsPublic +#define Tcl_MethodIsPublic \ + (tclOOStubsPtr->tcl_MethodIsPublic) /* 8 */ +#endif +#ifndef Tcl_MethodIsType +#define Tcl_MethodIsType \ + (tclOOStubsPtr->tcl_MethodIsType) /* 9 */ +#endif +#ifndef Tcl_MethodName +#define Tcl_MethodName \ + (tclOOStubsPtr->tcl_MethodName) /* 10 */ +#endif +#ifndef Tcl_NewInstanceMethod +#define Tcl_NewInstanceMethod \ + (tclOOStubsPtr->tcl_NewInstanceMethod) /* 11 */ +#endif +#ifndef Tcl_NewMethod +#define Tcl_NewMethod \ + (tclOOStubsPtr->tcl_NewMethod) /* 12 */ +#endif +#ifndef Tcl_NewObjectInstance +#define Tcl_NewObjectInstance \ + (tclOOStubsPtr->tcl_NewObjectInstance) /* 13 */ +#endif +#ifndef Tcl_ObjectDeleted +#define Tcl_ObjectDeleted \ + (tclOOStubsPtr->tcl_ObjectDeleted) /* 14 */ +#endif +#ifndef Tcl_ObjectContextIsFiltering +#define Tcl_ObjectContextIsFiltering \ + (tclOOStubsPtr->tcl_ObjectContextIsFiltering) /* 15 */ +#endif +#ifndef Tcl_ObjectContextMethod +#define Tcl_ObjectContextMethod \ + (tclOOStubsPtr->tcl_ObjectContextMethod) /* 16 */ +#endif +#ifndef Tcl_ObjectContextObject +#define Tcl_ObjectContextObject \ + (tclOOStubsPtr->tcl_ObjectContextObject) /* 17 */ +#endif +#ifndef Tcl_ObjectContextSkippedArgs +#define Tcl_ObjectContextSkippedArgs \ + (tclOOStubsPtr->tcl_ObjectContextSkippedArgs) /* 18 */ +#endif +#ifndef Tcl_ClassGetMetadata +#define Tcl_ClassGetMetadata \ + (tclOOStubsPtr->tcl_ClassGetMetadata) /* 19 */ +#endif +#ifndef Tcl_ClassSetMetadata +#define Tcl_ClassSetMetadata \ + (tclOOStubsPtr->tcl_ClassSetMetadata) /* 20 */ +#endif +#ifndef Tcl_ObjectGetMetadata +#define Tcl_ObjectGetMetadata \ + (tclOOStubsPtr->tcl_ObjectGetMetadata) /* 21 */ +#endif +#ifndef Tcl_ObjectSetMetadata +#define Tcl_ObjectSetMetadata \ + (tclOOStubsPtr->tcl_ObjectSetMetadata) /* 22 */ +#endif +#ifndef Tcl_ObjectContextInvokeNext +#define Tcl_ObjectContextInvokeNext \ + (tclOOStubsPtr->tcl_ObjectContextInvokeNext) /* 23 */ +#endif +#ifndef Tcl_ObjectGetMethodNameMapper +#define Tcl_ObjectGetMethodNameMapper \ + (tclOOStubsPtr->tcl_ObjectGetMethodNameMapper) /* 24 */ +#endif +#ifndef Tcl_ObjectSetMethodNameMapper +#define Tcl_ObjectSetMethodNameMapper \ + (tclOOStubsPtr->tcl_ObjectSetMethodNameMapper) /* 25 */ +#endif +#ifndef Tcl_ClassSetConstructor +#define Tcl_ClassSetConstructor \ + (tclOOStubsPtr->tcl_ClassSetConstructor) /* 26 */ +#endif +#ifndef Tcl_ClassSetDestructor +#define Tcl_ClassSetDestructor \ + (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ +#endif + +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLOODECLS */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index de761a7..c660fdd 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,264 +1,264 @@ -/* - * $Id: tclOOIntDecls.h,v 1.5 2008/06/12 06:29:18 das Exp $ - * - * This file is (mostly) automatically generated from tclOO.decls. - */ - -#ifndef _TCLOOINTDECLS -#define _TCLOOINTDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclOO.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef TclOOGetDefineCmdContext_TCL_DECLARED -#define TclOOGetDefineCmdContext_TCL_DECLARED -/* 0 */ -EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); -#endif -#ifndef TclOOMakeProcInstanceMethod_TCL_DECLARED -#define TclOOMakeProcInstanceMethod_TCL_DECLARED -/* 1 */ -EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, - ClientData clientData, Proc ** procPtrPtr); -#endif -#ifndef TclOOMakeProcMethod_TCL_DECLARED -#define TclOOMakeProcMethod_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - const char * namePtr, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, - ClientData clientData, Proc ** procPtrPtr); -#endif -#ifndef TclOONewProcInstanceMethod_TCL_DECLARED -#define TclOONewProcInstanceMethod_TCL_DECLARED -/* 3 */ -EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - ProcedureMethod ** pmPtrPtr); -#endif -#ifndef TclOONewProcMethod_TCL_DECLARED -#define TclOONewProcMethod_TCL_DECLARED -/* 4 */ -EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - ProcedureMethod ** pmPtrPtr); -#endif -#ifndef TclOOObjectCmdCore_TCL_DECLARED -#define TclOOObjectCmdCore_TCL_DECLARED -/* 5 */ -EXTERN int TclOOObjectCmdCore (Object * oPtr, - Tcl_Interp * interp, int objc, - Tcl_Obj *const * objv, int publicOnly, - Class * startCls); -#endif -#ifndef TclOOIsReachable_TCL_DECLARED -#define TclOOIsReachable_TCL_DECLARED -/* 6 */ -EXTERN int TclOOIsReachable (Class * targetPtr, - Class * startPtr); -#endif -#ifndef TclOONewForwardMethod_TCL_DECLARED -#define TclOONewForwardMethod_TCL_DECLARED -/* 7 */ -EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, - Class * clsPtr, int isPublic, - Tcl_Obj * nameObj, Tcl_Obj * prefixObj); -#endif -#ifndef TclOONewForwardInstanceMethod_TCL_DECLARED -#define TclOONewForwardInstanceMethod_TCL_DECLARED -/* 8 */ -EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int isPublic, - Tcl_Obj * nameObj, Tcl_Obj * prefixObj); -#endif -#ifndef TclOONewProcInstanceMethodEx_TCL_DECLARED -#define TclOONewProcInstanceMethodEx_TCL_DECLARED -/* 9 */ -EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, - Tcl_Object oPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, - void ** internalTokenPtr); -#endif -#ifndef TclOONewProcMethodEx_TCL_DECLARED -#define TclOONewProcMethodEx_TCL_DECLARED -/* 10 */ -EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, - Tcl_Class clsPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, - void ** internalTokenPtr); -#endif -#ifndef TclOOInvokeObject_TCL_DECLARED -#define TclOOInvokeObject_TCL_DECLARED -/* 11 */ -EXTERN int TclOOInvokeObject (Tcl_Interp * interp, - Tcl_Object object, Tcl_Class startCls, - int publicPrivate, int objc, - Tcl_Obj *const * objv); -#endif -#ifndef TclOOObjectSetFilters_TCL_DECLARED -#define TclOOObjectSetFilters_TCL_DECLARED -/* 12 */ -EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, - Tcl_Obj *const * filters); -#endif -#ifndef TclOOClassSetFilters_TCL_DECLARED -#define TclOOClassSetFilters_TCL_DECLARED -/* 13 */ -EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, - Class * classPtr, int numFilters, - Tcl_Obj *const * filters); -#endif -#ifndef TclOOObjectSetMixins_TCL_DECLARED -#define TclOOObjectSetMixins_TCL_DECLARED -/* 14 */ -EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, - Class *const * mixins); -#endif -#ifndef TclOOClassSetMixins_TCL_DECLARED -#define TclOOClassSetMixins_TCL_DECLARED -/* 15 */ -EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, - Class * classPtr, int numMixins, - Class *const * mixins); -#endif - -typedef struct TclOOIntStubs { - int magic; - CONST struct TclOOIntStubHooks *hooks; - - Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ - Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ - Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ - Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ - Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ - int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ - int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ - Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ - Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ - Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ - Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ - int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ - void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ - void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ - void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ - void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ -} TclOOIntStubs; - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) -extern CONST TclOOIntStubs *tclOOIntStubsPtr; -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef TclOOGetDefineCmdContext -#define TclOOGetDefineCmdContext \ - (tclOOIntStubsPtr->tclOOGetDefineCmdContext) /* 0 */ -#endif -#ifndef TclOOMakeProcInstanceMethod -#define TclOOMakeProcInstanceMethod \ - (tclOOIntStubsPtr->tclOOMakeProcInstanceMethod) /* 1 */ -#endif -#ifndef TclOOMakeProcMethod -#define TclOOMakeProcMethod \ - (tclOOIntStubsPtr->tclOOMakeProcMethod) /* 2 */ -#endif -#ifndef TclOONewProcInstanceMethod -#define TclOONewProcInstanceMethod \ - (tclOOIntStubsPtr->tclOONewProcInstanceMethod) /* 3 */ -#endif -#ifndef TclOONewProcMethod -#define TclOONewProcMethod \ - (tclOOIntStubsPtr->tclOONewProcMethod) /* 4 */ -#endif -#ifndef TclOOObjectCmdCore -#define TclOOObjectCmdCore \ - (tclOOIntStubsPtr->tclOOObjectCmdCore) /* 5 */ -#endif -#ifndef TclOOIsReachable -#define TclOOIsReachable \ - (tclOOIntStubsPtr->tclOOIsReachable) /* 6 */ -#endif -#ifndef TclOONewForwardMethod -#define TclOONewForwardMethod \ - (tclOOIntStubsPtr->tclOONewForwardMethod) /* 7 */ -#endif -#ifndef TclOONewForwardInstanceMethod -#define TclOONewForwardInstanceMethod \ - (tclOOIntStubsPtr->tclOONewForwardInstanceMethod) /* 8 */ -#endif -#ifndef TclOONewProcInstanceMethodEx -#define TclOONewProcInstanceMethodEx \ - (tclOOIntStubsPtr->tclOONewProcInstanceMethodEx) /* 9 */ -#endif -#ifndef TclOONewProcMethodEx -#define TclOONewProcMethodEx \ - (tclOOIntStubsPtr->tclOONewProcMethodEx) /* 10 */ -#endif -#ifndef TclOOInvokeObject -#define TclOOInvokeObject \ - (tclOOIntStubsPtr->tclOOInvokeObject) /* 11 */ -#endif -#ifndef TclOOObjectSetFilters -#define TclOOObjectSetFilters \ - (tclOOIntStubsPtr->tclOOObjectSetFilters) /* 12 */ -#endif -#ifndef TclOOClassSetFilters -#define TclOOClassSetFilters \ - (tclOOIntStubsPtr->tclOOClassSetFilters) /* 13 */ -#endif -#ifndef TclOOObjectSetMixins -#define TclOOObjectSetMixins \ - (tclOOIntStubsPtr->tclOOObjectSetMixins) /* 14 */ -#endif -#ifndef TclOOClassSetMixins -#define TclOOClassSetMixins \ - (tclOOIntStubsPtr->tclOOClassSetMixins) /* 15 */ -#endif - -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLOOINTDECLS */ +/* + * $Id: tclOOIntDecls.h,v 1.6 2008/07/21 21:02:18 ferrieux Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + */ + +#ifndef _TCLOOINTDECLS +#define _TCLOOINTDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclOO.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef TclOOGetDefineCmdContext_TCL_DECLARED +#define TclOOGetDefineCmdContext_TCL_DECLARED +/* 0 */ +EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); +#endif +#ifndef TclOOMakeProcInstanceMethod_TCL_DECLARED +#define TclOOMakeProcInstanceMethod_TCL_DECLARED +/* 1 */ +EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, + ClientData clientData, Proc ** procPtrPtr); +#endif +#ifndef TclOOMakeProcMethod_TCL_DECLARED +#define TclOOMakeProcMethod_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + const char * namePtr, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, + ClientData clientData, Proc ** procPtrPtr); +#endif +#ifndef TclOONewProcInstanceMethod_TCL_DECLARED +#define TclOONewProcInstanceMethod_TCL_DECLARED +/* 3 */ +EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + ProcedureMethod ** pmPtrPtr); +#endif +#ifndef TclOONewProcMethod_TCL_DECLARED +#define TclOONewProcMethod_TCL_DECLARED +/* 4 */ +EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + ProcedureMethod ** pmPtrPtr); +#endif +#ifndef TclOOObjectCmdCore_TCL_DECLARED +#define TclOOObjectCmdCore_TCL_DECLARED +/* 5 */ +EXTERN int TclOOObjectCmdCore (Object * oPtr, + Tcl_Interp * interp, int objc, + Tcl_Obj *const * objv, int publicOnly, + Class * startCls); +#endif +#ifndef TclOOIsReachable_TCL_DECLARED +#define TclOOIsReachable_TCL_DECLARED +/* 6 */ +EXTERN int TclOOIsReachable (Class * targetPtr, + Class * startPtr); +#endif +#ifndef TclOONewForwardMethod_TCL_DECLARED +#define TclOONewForwardMethod_TCL_DECLARED +/* 7 */ +EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, + Class * clsPtr, int isPublic, + Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +#endif +#ifndef TclOONewForwardInstanceMethod_TCL_DECLARED +#define TclOONewForwardInstanceMethod_TCL_DECLARED +/* 8 */ +EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int isPublic, + Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +#endif +#ifndef TclOONewProcInstanceMethodEx_TCL_DECLARED +#define TclOONewProcInstanceMethodEx_TCL_DECLARED +/* 9 */ +EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, + Tcl_Object oPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, + void ** internalTokenPtr); +#endif +#ifndef TclOONewProcMethodEx_TCL_DECLARED +#define TclOONewProcMethodEx_TCL_DECLARED +/* 10 */ +EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, + Tcl_Class clsPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, + void ** internalTokenPtr); +#endif +#ifndef TclOOInvokeObject_TCL_DECLARED +#define TclOOInvokeObject_TCL_DECLARED +/* 11 */ +EXTERN int TclOOInvokeObject (Tcl_Interp * interp, + Tcl_Object object, Tcl_Class startCls, + int publicPrivate, int objc, + Tcl_Obj *const * objv); +#endif +#ifndef TclOOObjectSetFilters_TCL_DECLARED +#define TclOOObjectSetFilters_TCL_DECLARED +/* 12 */ +EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, + Tcl_Obj *const * filters); +#endif +#ifndef TclOOClassSetFilters_TCL_DECLARED +#define TclOOClassSetFilters_TCL_DECLARED +/* 13 */ +EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, + Class * classPtr, int numFilters, + Tcl_Obj *const * filters); +#endif +#ifndef TclOOObjectSetMixins_TCL_DECLARED +#define TclOOObjectSetMixins_TCL_DECLARED +/* 14 */ +EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, + Class *const * mixins); +#endif +#ifndef TclOOClassSetMixins_TCL_DECLARED +#define TclOOClassSetMixins_TCL_DECLARED +/* 15 */ +EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, + Class * classPtr, int numMixins, + Class *const * mixins); +#endif + +typedef struct TclOOIntStubs { + int magic; + CONST struct TclOOIntStubHooks *hooks; + + Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ + Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ + Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ + Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ + Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ + int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ + int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ + Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ + Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ + Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ + Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ + int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ + void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ + void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ + void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ + void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ +} TclOOIntStubs; + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) +extern CONST TclOOIntStubs *tclOOIntStubsPtr; +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef TclOOGetDefineCmdContext +#define TclOOGetDefineCmdContext \ + (tclOOIntStubsPtr->tclOOGetDefineCmdContext) /* 0 */ +#endif +#ifndef TclOOMakeProcInstanceMethod +#define TclOOMakeProcInstanceMethod \ + (tclOOIntStubsPtr->tclOOMakeProcInstanceMethod) /* 1 */ +#endif +#ifndef TclOOMakeProcMethod +#define TclOOMakeProcMethod \ + (tclOOIntStubsPtr->tclOOMakeProcMethod) /* 2 */ +#endif +#ifndef TclOONewProcInstanceMethod +#define TclOONewProcInstanceMethod \ + (tclOOIntStubsPtr->tclOONewProcInstanceMethod) /* 3 */ +#endif +#ifndef TclOONewProcMethod +#define TclOONewProcMethod \ + (tclOOIntStubsPtr->tclOONewProcMethod) /* 4 */ +#endif +#ifndef TclOOObjectCmdCore +#define TclOOObjectCmdCore \ + (tclOOIntStubsPtr->tclOOObjectCmdCore) /* 5 */ +#endif +#ifndef TclOOIsReachable +#define TclOOIsReachable \ + (tclOOIntStubsPtr->tclOOIsReachable) /* 6 */ +#endif +#ifndef TclOONewForwardMethod +#define TclOONewForwardMethod \ + (tclOOIntStubsPtr->tclOONewForwardMethod) /* 7 */ +#endif +#ifndef TclOONewForwardInstanceMethod +#define TclOONewForwardInstanceMethod \ + (tclOOIntStubsPtr->tclOONewForwardInstanceMethod) /* 8 */ +#endif +#ifndef TclOONewProcInstanceMethodEx +#define TclOONewProcInstanceMethodEx \ + (tclOOIntStubsPtr->tclOONewProcInstanceMethodEx) /* 9 */ +#endif +#ifndef TclOONewProcMethodEx +#define TclOONewProcMethodEx \ + (tclOOIntStubsPtr->tclOONewProcMethodEx) /* 10 */ +#endif +#ifndef TclOOInvokeObject +#define TclOOInvokeObject \ + (tclOOIntStubsPtr->tclOOInvokeObject) /* 11 */ +#endif +#ifndef TclOOObjectSetFilters +#define TclOOObjectSetFilters \ + (tclOOIntStubsPtr->tclOOObjectSetFilters) /* 12 */ +#endif +#ifndef TclOOClassSetFilters +#define TclOOClassSetFilters \ + (tclOOIntStubsPtr->tclOOClassSetFilters) /* 13 */ +#endif +#ifndef TclOOObjectSetMixins +#define TclOOObjectSetMixins \ + (tclOOIntStubsPtr->tclOOObjectSetMixins) /* 14 */ +#endif +#ifndef TclOOClassSetMixins +#define TclOOClassSetMixins \ + (tclOOIntStubsPtr->tclOOClassSetMixins) /* 15 */ +#endif + +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLOOINTDECLS */ diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index 06e22d0..ec3ed19 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,78 +1,78 @@ -/* - * $Id: tclOOStubInit.c,v 1.4 2008/06/12 06:29:18 das Exp $ - * - * This file is (mostly) automatically generated from tclOO.decls. - * It is compiled and linked in with the tclOO package proper. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "tclOO.h" -#include "tclOOInt.h" - -/* !BEGIN!: Do not edit below this line. */ - -static const TclOOIntStubs tclOOIntStubs = { - TCL_STUB_MAGIC, - NULL, - TclOOGetDefineCmdContext, /* 0 */ - TclOOMakeProcInstanceMethod, /* 1 */ - TclOOMakeProcMethod, /* 2 */ - TclOONewProcInstanceMethod, /* 3 */ - TclOONewProcMethod, /* 4 */ - TclOOObjectCmdCore, /* 5 */ - TclOOIsReachable, /* 6 */ - TclOONewForwardMethod, /* 7 */ - TclOONewForwardInstanceMethod, /* 8 */ - TclOONewProcInstanceMethodEx, /* 9 */ - TclOONewProcMethodEx, /* 10 */ - TclOOInvokeObject, /* 11 */ - TclOOObjectSetFilters, /* 12 */ - TclOOClassSetFilters, /* 13 */ - TclOOObjectSetMixins, /* 14 */ - TclOOClassSetMixins, /* 15 */ -}; - -static const TclOOStubHooks tclOOStubHooks = { - &tclOOIntStubs -}; - -static const TclOOStubs tclOOStubs = { - TCL_STUB_MAGIC, - &tclOOStubHooks, - Tcl_CopyObjectInstance, /* 0 */ - Tcl_GetClassAsObject, /* 1 */ - Tcl_GetObjectAsClass, /* 2 */ - Tcl_GetObjectCommand, /* 3 */ - Tcl_GetObjectFromObj, /* 4 */ - Tcl_GetObjectNamespace, /* 5 */ - Tcl_MethodDeclarerClass, /* 6 */ - Tcl_MethodDeclarerObject, /* 7 */ - Tcl_MethodIsPublic, /* 8 */ - Tcl_MethodIsType, /* 9 */ - Tcl_MethodName, /* 10 */ - Tcl_NewInstanceMethod, /* 11 */ - Tcl_NewMethod, /* 12 */ - Tcl_NewObjectInstance, /* 13 */ - Tcl_ObjectDeleted, /* 14 */ - Tcl_ObjectContextIsFiltering, /* 15 */ - Tcl_ObjectContextMethod, /* 16 */ - Tcl_ObjectContextObject, /* 17 */ - Tcl_ObjectContextSkippedArgs, /* 18 */ - Tcl_ClassGetMetadata, /* 19 */ - Tcl_ClassSetMetadata, /* 20 */ - Tcl_ObjectGetMetadata, /* 21 */ - Tcl_ObjectSetMetadata, /* 22 */ - Tcl_ObjectContextInvokeNext, /* 23 */ - Tcl_ObjectGetMethodNameMapper, /* 24 */ - Tcl_ObjectSetMethodNameMapper, /* 25 */ - Tcl_ClassSetConstructor, /* 26 */ - Tcl_ClassSetDestructor, /* 27 */ -}; - -/* !END!: Do not edit above this line. */ - -MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; -const TclOOStubs * const tclOOConstStubPtr = &tclOOStubs; - +/* + * $Id: tclOOStubInit.c,v 1.5 2008/07/21 21:02:18 ferrieux Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + * It is compiled and linked in with the tclOO package proper. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclOO.h" +#include "tclOOInt.h" + +/* !BEGIN!: Do not edit below this line. */ + +static const TclOOIntStubs tclOOIntStubs = { + TCL_STUB_MAGIC, + NULL, + TclOOGetDefineCmdContext, /* 0 */ + TclOOMakeProcInstanceMethod, /* 1 */ + TclOOMakeProcMethod, /* 2 */ + TclOONewProcInstanceMethod, /* 3 */ + TclOONewProcMethod, /* 4 */ + TclOOObjectCmdCore, /* 5 */ + TclOOIsReachable, /* 6 */ + TclOONewForwardMethod, /* 7 */ + TclOONewForwardInstanceMethod, /* 8 */ + TclOONewProcInstanceMethodEx, /* 9 */ + TclOONewProcMethodEx, /* 10 */ + TclOOInvokeObject, /* 11 */ + TclOOObjectSetFilters, /* 12 */ + TclOOClassSetFilters, /* 13 */ + TclOOObjectSetMixins, /* 14 */ + TclOOClassSetMixins, /* 15 */ +}; + +static const TclOOStubHooks tclOOStubHooks = { + &tclOOIntStubs +}; + +static const TclOOStubs tclOOStubs = { + TCL_STUB_MAGIC, + &tclOOStubHooks, + Tcl_CopyObjectInstance, /* 0 */ + Tcl_GetClassAsObject, /* 1 */ + Tcl_GetObjectAsClass, /* 2 */ + Tcl_GetObjectCommand, /* 3 */ + Tcl_GetObjectFromObj, /* 4 */ + Tcl_GetObjectNamespace, /* 5 */ + Tcl_MethodDeclarerClass, /* 6 */ + Tcl_MethodDeclarerObject, /* 7 */ + Tcl_MethodIsPublic, /* 8 */ + Tcl_MethodIsType, /* 9 */ + Tcl_MethodName, /* 10 */ + Tcl_NewInstanceMethod, /* 11 */ + Tcl_NewMethod, /* 12 */ + Tcl_NewObjectInstance, /* 13 */ + Tcl_ObjectDeleted, /* 14 */ + Tcl_ObjectContextIsFiltering, /* 15 */ + Tcl_ObjectContextMethod, /* 16 */ + Tcl_ObjectContextObject, /* 17 */ + Tcl_ObjectContextSkippedArgs, /* 18 */ + Tcl_ClassGetMetadata, /* 19 */ + Tcl_ClassSetMetadata, /* 20 */ + Tcl_ObjectGetMetadata, /* 21 */ + Tcl_ObjectSetMetadata, /* 22 */ + Tcl_ObjectContextInvokeNext, /* 23 */ + Tcl_ObjectGetMethodNameMapper, /* 24 */ + Tcl_ObjectSetMethodNameMapper, /* 25 */ + Tcl_ClassSetConstructor, /* 26 */ + Tcl_ClassSetDestructor, /* 27 */ +}; + +/* !END!: Do not edit above this line. */ + +MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; +const TclOOStubs * const tclOOConstStubPtr = &tclOOStubs; + diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 1ba435f..1607753 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -1,137 +1,137 @@ -/* - * tclPlatDecls.h -- - * - * Declarations of platform specific Tcl APIs. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * All rights reserved. - * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.30 2008/04/08 14:54:53 das Exp $ - */ - -#ifndef _TCLPLATDECLS -#define _TCLPLATDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * Pull in the typedef of TCHAR for windows. - */ -#if defined(__CYGWIN__) - typedef char TCHAR; -#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) -# include -# ifndef _TCHAR_DEFINED - /* Borland seems to forget to set this. */ - typedef _TCHAR TCHAR; -# define _TCHAR_DEFINED -# endif -# if defined(_MSC_VER) && defined(__STDC__) - /* MSVC++ misses this. */ - typedef _TCHAR TCHAR; -# endif -#endif - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_WinUtfToTChar_TCL_DECLARED -#define Tcl_WinUtfToTChar_TCL_DECLARED -/* 0 */ -EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_WinTCharToUtf_TCL_DECLARED -#define Tcl_WinTCharToUtf_TCL_DECLARED -/* 1 */ -EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len, - Tcl_DString * dsPtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED -#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED -/* 0 */ -EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, - CONST char * bundleName, int hasResourceFile, - int maxPathLen, char * libraryPath); -#endif -#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED -#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED -/* 1 */ -EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( - Tcl_Interp * interp, CONST char * bundleName, - CONST char * bundleVersion, - int hasResourceFile, int maxPathLen, - char * libraryPath); -#endif -#endif /* MACOSX */ - -typedef struct TclPlatStubs { - int magic; - CONST struct TclPlatStubHooks *hooks; - -#ifdef __WIN32__ /* WIN */ - TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */ - char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ - int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ -#endif /* MACOSX */ -} TclPlatStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclPlatStubs *tclPlatStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_WinUtfToTChar -#define Tcl_WinUtfToTChar \ - (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */ -#endif -#ifndef Tcl_WinTCharToUtf -#define Tcl_WinTCharToUtf \ - (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_MacOSXOpenBundleResources -#define Tcl_MacOSXOpenBundleResources \ - (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */ -#endif -#ifndef Tcl_MacOSXOpenVersionedBundleResources -#define Tcl_MacOSXOpenVersionedBundleResources \ - (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */ -#endif -#endif /* MACOSX */ - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLPLATDECLS */ - - +/* + * tclPlatDecls.h -- + * + * Declarations of platform specific Tcl APIs. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * All rights reserved. + * + * RCS: @(#) $Id: tclPlatDecls.h,v 1.31 2008/07/21 21:02:18 ferrieux Exp $ + */ + +#ifndef _TCLPLATDECLS +#define _TCLPLATDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * Pull in the typedef of TCHAR for windows. + */ +#if defined(__CYGWIN__) + typedef char TCHAR; +#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) +# include +# ifndef _TCHAR_DEFINED + /* Borland seems to forget to set this. */ + typedef _TCHAR TCHAR; +# define _TCHAR_DEFINED +# endif +# if defined(_MSC_VER) && defined(__STDC__) + /* MSVC++ misses this. */ + typedef _TCHAR TCHAR; +# endif +#endif + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_WinUtfToTChar_TCL_DECLARED +#define Tcl_WinUtfToTChar_TCL_DECLARED +/* 0 */ +EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_WinTCharToUtf_TCL_DECLARED +#define Tcl_WinTCharToUtf_TCL_DECLARED +/* 1 */ +EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len, + Tcl_DString * dsPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, + CONST char * bundleName, int hasResourceFile, + int maxPathLen, char * libraryPath); +#endif +#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED +/* 1 */ +EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( + Tcl_Interp * interp, CONST char * bundleName, + CONST char * bundleVersion, + int hasResourceFile, int maxPathLen, + char * libraryPath); +#endif +#endif /* MACOSX */ + +typedef struct TclPlatStubs { + int magic; + CONST struct TclPlatStubHooks *hooks; + +#ifdef __WIN32__ /* WIN */ + TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */ + char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ + int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ +#endif /* MACOSX */ +} TclPlatStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclPlatStubs *tclPlatStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_WinUtfToTChar +#define Tcl_WinUtfToTChar \ + (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */ +#endif +#ifndef Tcl_WinTCharToUtf +#define Tcl_WinTCharToUtf \ + (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_MacOSXOpenBundleResources +#define Tcl_MacOSXOpenBundleResources \ + (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */ +#endif +#ifndef Tcl_MacOSXOpenVersionedBundleResources +#define Tcl_MacOSXOpenVersionedBundleResources \ + (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */ +#endif +#endif /* MACOSX */ + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLPLATDECLS */ + + diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 7d310d7..034689f 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1,1130 +1,1131 @@ -/* - * tclStubInit.c -- - * - * This file contains the initializers for the Tcl stub vectors. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclStubInit.c,v 1.158 2008/07/21 16:26:09 msofer Exp $ - */ - -#include "tclInt.h" -#include "tommath.h" - -/* - * Remove macros that will interfere with the definitions below. - */ - -#undef Tcl_Alloc -#undef Tcl_Free -#undef Tcl_Realloc -#undef Tcl_NewBooleanObj -#undef Tcl_NewByteArrayObj -#undef Tcl_NewDoubleObj -#undef Tcl_NewIntObj -#undef Tcl_NewListObj -#undef Tcl_NewLongObj -#undef Tcl_NewObj -#undef Tcl_NewStringObj -#undef Tcl_DumpActiveMemory -#undef Tcl_ValidateAllMemory -#undef Tcl_FindHashEntry -#undef Tcl_CreateHashEntry - -/* - * WARNING: The contents of this file is automatically generated by the - * tools/genStubs.tcl script. Any modifications to the function declarations - * below should be made in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -static const TclIntStubs tclIntStubs = { - TCL_STUB_MAGIC, - NULL, - NULL, /* 0 */ - NULL, /* 1 */ - NULL, /* 2 */ - TclAllocateFreeObjects, /* 3 */ - NULL, /* 4 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCleanupChildren, /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCleanupChildren, /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCleanupChildren, /* 5 */ -#endif /* MACOSX */ - TclCleanupCommand, /* 6 */ - TclCopyAndCollapse, /* 7 */ - TclCopyChannel, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCreatePipeline, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCreatePipeline, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCreatePipeline, /* 9 */ -#endif /* MACOSX */ - TclCreateProc, /* 10 */ - TclDeleteCompiledLocalVars, /* 11 */ - TclDeleteVars, /* 12 */ - NULL, /* 13 */ - TclDumpMemoryInfo, /* 14 */ - NULL, /* 15 */ - TclExprFloatError, /* 16 */ - NULL, /* 17 */ - NULL, /* 18 */ - NULL, /* 19 */ - NULL, /* 20 */ - NULL, /* 21 */ - TclFindElement, /* 22 */ - TclFindProc, /* 23 */ - NULL, /* 24 */ - TclFreePackageInfo, /* 25 */ - NULL, /* 26 */ - NULL, /* 27 */ - TclpGetDefaultStdChannel, /* 28 */ - NULL, /* 29 */ - NULL, /* 30 */ - TclGetExtension, /* 31 */ - TclGetFrame, /* 32 */ - NULL, /* 33 */ - TclGetIntForIndex, /* 34 */ - NULL, /* 35 */ - NULL, /* 36 */ - TclGetLoadedPackages, /* 37 */ - TclGetNamespaceForQualName, /* 38 */ - TclGetObjInterpProc, /* 39 */ - TclGetOpenMode, /* 40 */ - TclGetOriginalCommand, /* 41 */ - TclpGetUserHome, /* 42 */ - NULL, /* 43 */ - TclGuessPackageName, /* 44 */ - TclHideUnsafeCommands, /* 45 */ - TclInExit, /* 46 */ - NULL, /* 47 */ - NULL, /* 48 */ - NULL, /* 49 */ - TclInitCompiledLocals, /* 50 */ - TclInterpInit, /* 51 */ - NULL, /* 52 */ - TclInvokeObjectCommand, /* 53 */ - TclInvokeStringCommand, /* 54 */ - TclIsProc, /* 55 */ - NULL, /* 56 */ - NULL, /* 57 */ - TclLookupVar, /* 58 */ - NULL, /* 59 */ - TclNeedSpace, /* 60 */ - TclNewProcBodyObj, /* 61 */ - TclObjCommandComplete, /* 62 */ - TclObjInterpProc, /* 63 */ - TclObjInvoke, /* 64 */ - NULL, /* 65 */ - NULL, /* 66 */ - NULL, /* 67 */ - NULL, /* 68 */ - TclpAlloc, /* 69 */ - NULL, /* 70 */ - NULL, /* 71 */ - NULL, /* 72 */ - NULL, /* 73 */ - TclpFree, /* 74 */ - TclpGetClicks, /* 75 */ - TclpGetSeconds, /* 76 */ - TclpGetTime, /* 77 */ - TclpGetTimeZone, /* 78 */ - NULL, /* 79 */ - NULL, /* 80 */ - TclpRealloc, /* 81 */ - NULL, /* 82 */ - NULL, /* 83 */ - NULL, /* 84 */ - NULL, /* 85 */ - NULL, /* 86 */ - NULL, /* 87 */ - TclPrecTraceProc, /* 88 */ - TclPreventAliasLoop, /* 89 */ - NULL, /* 90 */ - TclProcCleanupProc, /* 91 */ - TclProcCompileProc, /* 92 */ - TclProcDeleteProc, /* 93 */ - NULL, /* 94 */ - NULL, /* 95 */ - TclRenameCommand, /* 96 */ - TclResetShadowedCmdRefs, /* 97 */ - TclServiceIdle, /* 98 */ - NULL, /* 99 */ - NULL, /* 100 */ - TclSetPreInitScript, /* 101 */ - TclSetupEnv, /* 102 */ - TclSockGetPort, /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclSockMinimumBuffers, /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* MACOSX */ - NULL, /* 105 */ - NULL, /* 106 */ - NULL, /* 107 */ - TclTeardownNamespace, /* 108 */ - TclUpdateReturnInfo, /* 109 */ - NULL, /* 110 */ - Tcl_AddInterpResolvers, /* 111 */ - Tcl_AppendExportList, /* 112 */ - Tcl_CreateNamespace, /* 113 */ - Tcl_DeleteNamespace, /* 114 */ - Tcl_Export, /* 115 */ - Tcl_FindCommand, /* 116 */ - Tcl_FindNamespace, /* 117 */ - Tcl_GetInterpResolvers, /* 118 */ - Tcl_GetNamespaceResolvers, /* 119 */ - Tcl_FindNamespaceVar, /* 120 */ - Tcl_ForgetImport, /* 121 */ - Tcl_GetCommandFromObj, /* 122 */ - Tcl_GetCommandFullName, /* 123 */ - Tcl_GetCurrentNamespace, /* 124 */ - Tcl_GetGlobalNamespace, /* 125 */ - Tcl_GetVariableFullName, /* 126 */ - Tcl_Import, /* 127 */ - Tcl_PopCallFrame, /* 128 */ - Tcl_PushCallFrame, /* 129 */ - Tcl_RemoveInterpResolvers, /* 130 */ - Tcl_SetNamespaceResolvers, /* 131 */ - TclpHasSockets, /* 132 */ - TclpGetDate, /* 133 */ - NULL, /* 134 */ - NULL, /* 135 */ - NULL, /* 136 */ - NULL, /* 137 */ - TclGetEnv, /* 138 */ - NULL, /* 139 */ - NULL, /* 140 */ - TclpGetCwd, /* 141 */ - TclSetByteCodeFromAny, /* 142 */ - TclAddLiteralObj, /* 143 */ - TclHideLiteral, /* 144 */ - TclGetAuxDataType, /* 145 */ - TclHandleCreate, /* 146 */ - TclHandleFree, /* 147 */ - TclHandlePreserve, /* 148 */ - TclHandleRelease, /* 149 */ - TclRegAbout, /* 150 */ - TclRegExpRangeUniChar, /* 151 */ - TclSetLibraryPath, /* 152 */ - TclGetLibraryPath, /* 153 */ - NULL, /* 154 */ - NULL, /* 155 */ - TclRegError, /* 156 */ - TclVarTraceExists, /* 157 */ - TclSetStartupScriptFileName, /* 158 */ - TclGetStartupScriptFileName, /* 159 */ - NULL, /* 160 */ - TclChannelTransform, /* 161 */ - TclChannelEventScriptInvoker, /* 162 */ - TclGetInstructionTable, /* 163 */ - TclExpandCodeArray, /* 164 */ - TclpSetInitialEncodings, /* 165 */ - TclListObjSetElement, /* 166 */ - TclSetStartupScriptPath, /* 167 */ - TclGetStartupScriptPath, /* 168 */ - TclpUtfNcmp2, /* 169 */ - TclCheckInterpTraces, /* 170 */ - TclCheckExecutionTraces, /* 171 */ - TclInThreadExit, /* 172 */ - TclUniCharMatch, /* 173 */ - NULL, /* 174 */ - TclCallVarTraces, /* 175 */ - TclCleanupVar, /* 176 */ - TclVarErrMsg, /* 177 */ - Tcl_SetStartupScript, /* 178 */ - Tcl_GetStartupScript, /* 179 */ - NULL, /* 180 */ - NULL, /* 181 */ - TclpLocaltime, /* 182 */ - TclpGmtime, /* 183 */ - NULL, /* 184 */ - NULL, /* 185 */ - NULL, /* 186 */ - NULL, /* 187 */ - NULL, /* 188 */ - NULL, /* 189 */ - NULL, /* 190 */ - NULL, /* 191 */ - NULL, /* 192 */ - NULL, /* 193 */ - NULL, /* 194 */ - NULL, /* 195 */ - NULL, /* 196 */ - NULL, /* 197 */ - TclObjGetFrame, /* 198 */ - NULL, /* 199 */ - TclpObjRemoveDirectory, /* 200 */ - TclpObjCopyDirectory, /* 201 */ - TclpObjCreateDirectory, /* 202 */ - TclpObjDeleteFile, /* 203 */ - TclpObjCopyFile, /* 204 */ - TclpObjRenameFile, /* 205 */ - TclpObjStat, /* 206 */ - TclpObjAccess, /* 207 */ - TclpOpenFileChannel, /* 208 */ - NULL, /* 209 */ - NULL, /* 210 */ - NULL, /* 211 */ - TclpFindExecutable, /* 212 */ - TclGetObjNameOfExecutable, /* 213 */ - TclSetObjNameOfExecutable, /* 214 */ - TclStackAlloc, /* 215 */ - TclStackFree, /* 216 */ - TclPushStackFrame, /* 217 */ - TclPopStackFrame, /* 218 */ - NULL, /* 219 */ - NULL, /* 220 */ - NULL, /* 221 */ - NULL, /* 222 */ - NULL, /* 223 */ - TclGetPlatform, /* 224 */ - TclTraceDictPath, /* 225 */ - TclObjBeingDeleted, /* 226 */ - TclSetNsPath, /* 227 */ - TclObjInterpProcCore, /* 228 */ - TclPtrMakeUpvar, /* 229 */ - TclObjLookupVar, /* 230 */ - TclGetNamespaceFromObj, /* 231 */ - TclEvalObjEx, /* 232 */ - TclGetSrcInfoForPc, /* 233 */ - TclVarHashCreateVar, /* 234 */ - TclInitVarHashTable, /* 235 */ - TclBackgroundException, /* 236 */ - TclResetCancellation, /* 237 */ - TclEvalObjv_NR2, /* 238 */ - &TclNRInterpProc, /* 239 */ - TclNRInterpProcCore, /* 240 */ - TclNRPushRecord, /* 241 */ - TclNRPopAndFreeRecord, /* 242 */ - TclNREvalObjEx, /* 243 */ -}; - -static const TclIntPlatStubs tclIntPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclWinConvertError, /* 0 */ - TclWinConvertWSAError, /* 1 */ - TclWinGetServByName, /* 2 */ - TclWinGetSockOpt, /* 3 */ - TclWinGetTclInstance, /* 4 */ - NULL, /* 5 */ - TclWinNToHS, /* 6 */ - TclWinSetSockOpt, /* 7 */ - TclpGetPid, /* 8 */ - TclWinGetPlatformId, /* 9 */ - NULL, /* 10 */ - TclGetAndDetachPids, /* 11 */ - TclpCloseFile, /* 12 */ - TclpCreateCommandChannel, /* 13 */ - TclpCreatePipe, /* 14 */ - TclpCreateProcess, /* 15 */ - NULL, /* 16 */ - NULL, /* 17 */ - TclpMakeFile, /* 18 */ - TclpOpenFile, /* 19 */ - TclWinAddProcess, /* 20 */ - NULL, /* 21 */ - TclpCreateTempFile, /* 22 */ - TclpGetTZName, /* 23 */ - TclWinNoBackslash, /* 24 */ - NULL, /* 25 */ - TclWinSetInterfaces, /* 26 */ - TclWinFlushDirtyChannels, /* 27 */ - TclWinResetInterfaces, /* 28 */ - TclWinCPUID, /* 29 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ - TclMacOSXGetFileAttribute, /* 15 */ - TclMacOSXSetFileAttribute, /* 16 */ - TclMacOSXCopyFileAttributes, /* 17 */ - TclMacOSXMatchType, /* 18 */ -#endif /* MACOSX */ -}; - -static const TclPlatStubs tclPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#ifdef __WIN32__ /* WIN */ - Tcl_WinUtfToTChar, /* 0 */ - Tcl_WinTCharToUtf, /* 1 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_MacOSXOpenBundleResources, /* 0 */ - Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ -#endif /* MACOSX */ -}; - -static const TclTomMathStubs tclTomMathStubs = { - TCL_STUB_MAGIC, - NULL, - TclBN_epoch, /* 0 */ - TclBN_revision, /* 1 */ - TclBN_mp_add, /* 2 */ - TclBN_mp_add_d, /* 3 */ - TclBN_mp_and, /* 4 */ - TclBN_mp_clamp, /* 5 */ - TclBN_mp_clear, /* 6 */ - TclBN_mp_clear_multi, /* 7 */ - TclBN_mp_cmp, /* 8 */ - TclBN_mp_cmp_d, /* 9 */ - TclBN_mp_cmp_mag, /* 10 */ - TclBN_mp_copy, /* 11 */ - TclBN_mp_count_bits, /* 12 */ - TclBN_mp_div, /* 13 */ - TclBN_mp_div_d, /* 14 */ - TclBN_mp_div_2, /* 15 */ - TclBN_mp_div_2d, /* 16 */ - TclBN_mp_div_3, /* 17 */ - TclBN_mp_exch, /* 18 */ - TclBN_mp_expt_d, /* 19 */ - TclBN_mp_grow, /* 20 */ - TclBN_mp_init, /* 21 */ - TclBN_mp_init_copy, /* 22 */ - TclBN_mp_init_multi, /* 23 */ - TclBN_mp_init_set, /* 24 */ - TclBN_mp_init_size, /* 25 */ - TclBN_mp_lshd, /* 26 */ - TclBN_mp_mod, /* 27 */ - TclBN_mp_mod_2d, /* 28 */ - TclBN_mp_mul, /* 29 */ - TclBN_mp_mul_d, /* 30 */ - TclBN_mp_mul_2, /* 31 */ - TclBN_mp_mul_2d, /* 32 */ - TclBN_mp_neg, /* 33 */ - TclBN_mp_or, /* 34 */ - TclBN_mp_radix_size, /* 35 */ - TclBN_mp_read_radix, /* 36 */ - TclBN_mp_rshd, /* 37 */ - TclBN_mp_shrink, /* 38 */ - TclBN_mp_set, /* 39 */ - TclBN_mp_sqr, /* 40 */ - TclBN_mp_sqrt, /* 41 */ - TclBN_mp_sub, /* 42 */ - TclBN_mp_sub_d, /* 43 */ - TclBN_mp_to_unsigned_bin, /* 44 */ - TclBN_mp_to_unsigned_bin_n, /* 45 */ - TclBN_mp_toradix_n, /* 46 */ - TclBN_mp_unsigned_bin_size, /* 47 */ - TclBN_mp_xor, /* 48 */ - TclBN_mp_zero, /* 49 */ - TclBN_reverse, /* 50 */ - TclBN_fast_s_mp_mul_digs, /* 51 */ - TclBN_fast_s_mp_sqr, /* 52 */ - TclBN_mp_karatsuba_mul, /* 53 */ - TclBN_mp_karatsuba_sqr, /* 54 */ - TclBN_mp_toom_mul, /* 55 */ - TclBN_mp_toom_sqr, /* 56 */ - TclBN_s_mp_add, /* 57 */ - TclBN_s_mp_mul_digs, /* 58 */ - TclBN_s_mp_sqr, /* 59 */ - TclBN_s_mp_sub, /* 60 */ -}; - -static const TclStubHooks tclStubHooks = { - &tclPlatStubs, - &tclIntStubs, - &tclIntPlatStubs -}; - -static const TclStubs tclStubs = { - TCL_STUB_MAGIC, - &tclStubHooks, - Tcl_PkgProvideEx, /* 0 */ - Tcl_PkgRequireEx, /* 1 */ - Tcl_Panic, /* 2 */ - Tcl_Alloc, /* 3 */ - Tcl_Free, /* 4 */ - Tcl_Realloc, /* 5 */ - Tcl_DbCkalloc, /* 6 */ - Tcl_DbCkfree, /* 7 */ - Tcl_DbCkrealloc, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 10 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* MACOSX */ - Tcl_SetTimer, /* 11 */ - Tcl_Sleep, /* 12 */ - Tcl_WaitForEvent, /* 13 */ - Tcl_AppendAllObjTypes, /* 14 */ - Tcl_AppendStringsToObj, /* 15 */ - Tcl_AppendToObj, /* 16 */ - Tcl_ConcatObj, /* 17 */ - Tcl_ConvertToType, /* 18 */ - Tcl_DbDecrRefCount, /* 19 */ - Tcl_DbIncrRefCount, /* 20 */ - Tcl_DbIsShared, /* 21 */ - Tcl_DbNewBooleanObj, /* 22 */ - Tcl_DbNewByteArrayObj, /* 23 */ - Tcl_DbNewDoubleObj, /* 24 */ - Tcl_DbNewListObj, /* 25 */ - Tcl_DbNewLongObj, /* 26 */ - Tcl_DbNewObj, /* 27 */ - Tcl_DbNewStringObj, /* 28 */ - Tcl_DuplicateObj, /* 29 */ - TclFreeObj, /* 30 */ - Tcl_GetBoolean, /* 31 */ - Tcl_GetBooleanFromObj, /* 32 */ - Tcl_GetByteArrayFromObj, /* 33 */ - Tcl_GetDouble, /* 34 */ - Tcl_GetDoubleFromObj, /* 35 */ - Tcl_GetIndexFromObj, /* 36 */ - Tcl_GetInt, /* 37 */ - Tcl_GetIntFromObj, /* 38 */ - Tcl_GetLongFromObj, /* 39 */ - Tcl_GetObjType, /* 40 */ - Tcl_GetStringFromObj, /* 41 */ - Tcl_InvalidateStringRep, /* 42 */ - Tcl_ListObjAppendList, /* 43 */ - Tcl_ListObjAppendElement, /* 44 */ - Tcl_ListObjGetElements, /* 45 */ - Tcl_ListObjIndex, /* 46 */ - Tcl_ListObjLength, /* 47 */ - Tcl_ListObjReplace, /* 48 */ - Tcl_NewBooleanObj, /* 49 */ - Tcl_NewByteArrayObj, /* 50 */ - Tcl_NewDoubleObj, /* 51 */ - Tcl_NewIntObj, /* 52 */ - Tcl_NewListObj, /* 53 */ - Tcl_NewLongObj, /* 54 */ - Tcl_NewObj, /* 55 */ - Tcl_NewStringObj, /* 56 */ - Tcl_SetBooleanObj, /* 57 */ - Tcl_SetByteArrayLength, /* 58 */ - Tcl_SetByteArrayObj, /* 59 */ - Tcl_SetDoubleObj, /* 60 */ - Tcl_SetIntObj, /* 61 */ - Tcl_SetListObj, /* 62 */ - Tcl_SetLongObj, /* 63 */ - Tcl_SetObjLength, /* 64 */ - Tcl_SetStringObj, /* 65 */ - Tcl_AddErrorInfo, /* 66 */ - Tcl_AddObjErrorInfo, /* 67 */ - Tcl_AllowExceptions, /* 68 */ - Tcl_AppendElement, /* 69 */ - Tcl_AppendResult, /* 70 */ - Tcl_AsyncCreate, /* 71 */ - Tcl_AsyncDelete, /* 72 */ - Tcl_AsyncInvoke, /* 73 */ - Tcl_AsyncMark, /* 74 */ - Tcl_AsyncReady, /* 75 */ - Tcl_BackgroundError, /* 76 */ - Tcl_Backslash, /* 77 */ - Tcl_BadChannelOption, /* 78 */ - Tcl_CallWhenDeleted, /* 79 */ - Tcl_CancelIdleCall, /* 80 */ - Tcl_Close, /* 81 */ - Tcl_CommandComplete, /* 82 */ - Tcl_Concat, /* 83 */ - Tcl_ConvertElement, /* 84 */ - Tcl_ConvertCountedElement, /* 85 */ - Tcl_CreateAlias, /* 86 */ - Tcl_CreateAliasObj, /* 87 */ - Tcl_CreateChannel, /* 88 */ - Tcl_CreateChannelHandler, /* 89 */ - Tcl_CreateCloseHandler, /* 90 */ - Tcl_CreateCommand, /* 91 */ - Tcl_CreateEventSource, /* 92 */ - Tcl_CreateExitHandler, /* 93 */ - Tcl_CreateInterp, /* 94 */ - Tcl_CreateMathFunc, /* 95 */ - Tcl_CreateObjCommand, /* 96 */ - Tcl_CreateSlave, /* 97 */ - Tcl_CreateTimerHandler, /* 98 */ - Tcl_CreateTrace, /* 99 */ - Tcl_DeleteAssocData, /* 100 */ - Tcl_DeleteChannelHandler, /* 101 */ - Tcl_DeleteCloseHandler, /* 102 */ - Tcl_DeleteCommand, /* 103 */ - Tcl_DeleteCommandFromToken, /* 104 */ - Tcl_DeleteEvents, /* 105 */ - Tcl_DeleteEventSource, /* 106 */ - Tcl_DeleteExitHandler, /* 107 */ - Tcl_DeleteHashEntry, /* 108 */ - Tcl_DeleteHashTable, /* 109 */ - Tcl_DeleteInterp, /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DetachPids, /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_DetachPids, /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DetachPids, /* 111 */ -#endif /* MACOSX */ - Tcl_DeleteTimerHandler, /* 112 */ - Tcl_DeleteTrace, /* 113 */ - Tcl_DontCallWhenDeleted, /* 114 */ - Tcl_DoOneEvent, /* 115 */ - Tcl_DoWhenIdle, /* 116 */ - Tcl_DStringAppend, /* 117 */ - Tcl_DStringAppendElement, /* 118 */ - Tcl_DStringEndSublist, /* 119 */ - Tcl_DStringFree, /* 120 */ - Tcl_DStringGetResult, /* 121 */ - Tcl_DStringInit, /* 122 */ - Tcl_DStringResult, /* 123 */ - Tcl_DStringSetLength, /* 124 */ - Tcl_DStringStartSublist, /* 125 */ - Tcl_Eof, /* 126 */ - Tcl_ErrnoId, /* 127 */ - Tcl_ErrnoMsg, /* 128 */ - Tcl_Eval, /* 129 */ - Tcl_EvalFile, /* 130 */ - Tcl_EvalObj, /* 131 */ - Tcl_EventuallyFree, /* 132 */ - Tcl_Exit, /* 133 */ - Tcl_ExposeCommand, /* 134 */ - Tcl_ExprBoolean, /* 135 */ - Tcl_ExprBooleanObj, /* 136 */ - Tcl_ExprDouble, /* 137 */ - Tcl_ExprDoubleObj, /* 138 */ - Tcl_ExprLong, /* 139 */ - Tcl_ExprLongObj, /* 140 */ - Tcl_ExprObj, /* 141 */ - Tcl_ExprString, /* 142 */ - Tcl_Finalize, /* 143 */ - Tcl_FindExecutable, /* 144 */ - Tcl_FirstHashEntry, /* 145 */ - Tcl_Flush, /* 146 */ - Tcl_FreeResult, /* 147 */ - Tcl_GetAlias, /* 148 */ - Tcl_GetAliasObj, /* 149 */ - Tcl_GetAssocData, /* 150 */ - Tcl_GetChannel, /* 151 */ - Tcl_GetChannelBufferSize, /* 152 */ - Tcl_GetChannelHandle, /* 153 */ - Tcl_GetChannelInstanceData, /* 154 */ - Tcl_GetChannelMode, /* 155 */ - Tcl_GetChannelName, /* 156 */ - Tcl_GetChannelOption, /* 157 */ - Tcl_GetChannelType, /* 158 */ - Tcl_GetCommandInfo, /* 159 */ - Tcl_GetCommandName, /* 160 */ - Tcl_GetErrno, /* 161 */ - Tcl_GetHostName, /* 162 */ - Tcl_GetInterpPath, /* 163 */ - Tcl_GetMaster, /* 164 */ - Tcl_GetNameOfExecutable, /* 165 */ - Tcl_GetObjResult, /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 167 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* MACOSX */ - Tcl_GetPathType, /* 168 */ - Tcl_Gets, /* 169 */ - Tcl_GetsObj, /* 170 */ - Tcl_GetServiceMode, /* 171 */ - Tcl_GetSlave, /* 172 */ - Tcl_GetStdChannel, /* 173 */ - Tcl_GetStringResult, /* 174 */ - Tcl_GetVar, /* 175 */ - Tcl_GetVar2, /* 176 */ - Tcl_GlobalEval, /* 177 */ - Tcl_GlobalEvalObj, /* 178 */ - Tcl_HideCommand, /* 179 */ - Tcl_Init, /* 180 */ - Tcl_InitHashTable, /* 181 */ - Tcl_InputBlocked, /* 182 */ - Tcl_InputBuffered, /* 183 */ - Tcl_InterpDeleted, /* 184 */ - Tcl_IsSafe, /* 185 */ - Tcl_JoinPath, /* 186 */ - Tcl_LinkVar, /* 187 */ - NULL, /* 188 */ - Tcl_MakeFileChannel, /* 189 */ - Tcl_MakeSafe, /* 190 */ - Tcl_MakeTcpClientChannel, /* 191 */ - Tcl_Merge, /* 192 */ - Tcl_NextHashEntry, /* 193 */ - Tcl_NotifyChannel, /* 194 */ - Tcl_ObjGetVar2, /* 195 */ - Tcl_ObjSetVar2, /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* MACOSX */ - Tcl_OpenFileChannel, /* 198 */ - Tcl_OpenTcpClient, /* 199 */ - Tcl_OpenTcpServer, /* 200 */ - Tcl_Preserve, /* 201 */ - Tcl_PrintDouble, /* 202 */ - Tcl_PutEnv, /* 203 */ - Tcl_PosixError, /* 204 */ - Tcl_QueueEvent, /* 205 */ - Tcl_Read, /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* MACOSX */ - Tcl_RecordAndEval, /* 208 */ - Tcl_RecordAndEvalObj, /* 209 */ - Tcl_RegisterChannel, /* 210 */ - Tcl_RegisterObjType, /* 211 */ - Tcl_RegExpCompile, /* 212 */ - Tcl_RegExpExec, /* 213 */ - Tcl_RegExpMatch, /* 214 */ - Tcl_RegExpRange, /* 215 */ - Tcl_Release, /* 216 */ - Tcl_ResetResult, /* 217 */ - Tcl_ScanElement, /* 218 */ - Tcl_ScanCountedElement, /* 219 */ - Tcl_SeekOld, /* 220 */ - Tcl_ServiceAll, /* 221 */ - Tcl_ServiceEvent, /* 222 */ - Tcl_SetAssocData, /* 223 */ - Tcl_SetChannelBufferSize, /* 224 */ - Tcl_SetChannelOption, /* 225 */ - Tcl_SetCommandInfo, /* 226 */ - Tcl_SetErrno, /* 227 */ - Tcl_SetErrorCode, /* 228 */ - Tcl_SetMaxBlockTime, /* 229 */ - Tcl_SetPanicProc, /* 230 */ - Tcl_SetRecursionLimit, /* 231 */ - Tcl_SetResult, /* 232 */ - Tcl_SetServiceMode, /* 233 */ - Tcl_SetObjErrorCode, /* 234 */ - Tcl_SetObjResult, /* 235 */ - Tcl_SetStdChannel, /* 236 */ - Tcl_SetVar, /* 237 */ - Tcl_SetVar2, /* 238 */ - Tcl_SignalId, /* 239 */ - Tcl_SignalMsg, /* 240 */ - Tcl_SourceRCFile, /* 241 */ - Tcl_SplitList, /* 242 */ - Tcl_SplitPath, /* 243 */ - Tcl_StaticPackage, /* 244 */ - Tcl_StringMatch, /* 245 */ - Tcl_TellOld, /* 246 */ - Tcl_TraceVar, /* 247 */ - Tcl_TraceVar2, /* 248 */ - Tcl_TranslateFileName, /* 249 */ - Tcl_Ungets, /* 250 */ - Tcl_UnlinkVar, /* 251 */ - Tcl_UnregisterChannel, /* 252 */ - Tcl_UnsetVar, /* 253 */ - Tcl_UnsetVar2, /* 254 */ - Tcl_UntraceVar, /* 255 */ - Tcl_UntraceVar2, /* 256 */ - Tcl_UpdateLinkedVar, /* 257 */ - Tcl_UpVar, /* 258 */ - Tcl_UpVar2, /* 259 */ - Tcl_VarEval, /* 260 */ - Tcl_VarTraceInfo, /* 261 */ - Tcl_VarTraceInfo2, /* 262 */ - Tcl_Write, /* 263 */ - Tcl_WrongNumArgs, /* 264 */ - Tcl_DumpActiveMemory, /* 265 */ - Tcl_ValidateAllMemory, /* 266 */ - Tcl_AppendResultVA, /* 267 */ - Tcl_AppendStringsToObjVA, /* 268 */ - Tcl_HashStats, /* 269 */ - Tcl_ParseVar, /* 270 */ - Tcl_PkgPresent, /* 271 */ - Tcl_PkgPresentEx, /* 272 */ - Tcl_PkgProvide, /* 273 */ - Tcl_PkgRequire, /* 274 */ - Tcl_SetErrorCodeVA, /* 275 */ - Tcl_VarEvalVA, /* 276 */ - Tcl_WaitPid, /* 277 */ - Tcl_PanicVA, /* 278 */ - Tcl_GetVersion, /* 279 */ - Tcl_InitMemory, /* 280 */ - Tcl_StackChannel, /* 281 */ - Tcl_UnstackChannel, /* 282 */ - Tcl_GetStackedChannel, /* 283 */ - Tcl_SetMainLoop, /* 284 */ - NULL, /* 285 */ - Tcl_AppendObjToObj, /* 286 */ - Tcl_CreateEncoding, /* 287 */ - Tcl_CreateThreadExitHandler, /* 288 */ - Tcl_DeleteThreadExitHandler, /* 289 */ - Tcl_DiscardResult, /* 290 */ - Tcl_EvalEx, /* 291 */ - Tcl_EvalObjv, /* 292 */ - Tcl_EvalObjEx, /* 293 */ - Tcl_ExitThread, /* 294 */ - Tcl_ExternalToUtf, /* 295 */ - Tcl_ExternalToUtfDString, /* 296 */ - Tcl_FinalizeThread, /* 297 */ - Tcl_FinalizeNotifier, /* 298 */ - Tcl_FreeEncoding, /* 299 */ - Tcl_GetCurrentThread, /* 300 */ - Tcl_GetEncoding, /* 301 */ - Tcl_GetEncodingName, /* 302 */ - Tcl_GetEncodingNames, /* 303 */ - Tcl_GetIndexFromObjStruct, /* 304 */ - Tcl_GetThreadData, /* 305 */ - Tcl_GetVar2Ex, /* 306 */ - Tcl_InitNotifier, /* 307 */ - Tcl_MutexLock, /* 308 */ - Tcl_MutexUnlock, /* 309 */ - Tcl_ConditionNotify, /* 310 */ - Tcl_ConditionWait, /* 311 */ - Tcl_NumUtfChars, /* 312 */ - Tcl_ReadChars, /* 313 */ - Tcl_RestoreResult, /* 314 */ - Tcl_SaveResult, /* 315 */ - Tcl_SetSystemEncoding, /* 316 */ - Tcl_SetVar2Ex, /* 317 */ - Tcl_ThreadAlert, /* 318 */ - Tcl_ThreadQueueEvent, /* 319 */ - Tcl_UniCharAtIndex, /* 320 */ - Tcl_UniCharToLower, /* 321 */ - Tcl_UniCharToTitle, /* 322 */ - Tcl_UniCharToUpper, /* 323 */ - Tcl_UniCharToUtf, /* 324 */ - Tcl_UtfAtIndex, /* 325 */ - Tcl_UtfCharComplete, /* 326 */ - Tcl_UtfBackslash, /* 327 */ - Tcl_UtfFindFirst, /* 328 */ - Tcl_UtfFindLast, /* 329 */ - Tcl_UtfNext, /* 330 */ - Tcl_UtfPrev, /* 331 */ - Tcl_UtfToExternal, /* 332 */ - Tcl_UtfToExternalDString, /* 333 */ - Tcl_UtfToLower, /* 334 */ - Tcl_UtfToTitle, /* 335 */ - Tcl_UtfToUniChar, /* 336 */ - Tcl_UtfToUpper, /* 337 */ - Tcl_WriteChars, /* 338 */ - Tcl_WriteObj, /* 339 */ - Tcl_GetString, /* 340 */ - Tcl_GetDefaultEncodingDir, /* 341 */ - Tcl_SetDefaultEncodingDir, /* 342 */ - Tcl_AlertNotifier, /* 343 */ - Tcl_ServiceModeHook, /* 344 */ - Tcl_UniCharIsAlnum, /* 345 */ - Tcl_UniCharIsAlpha, /* 346 */ - Tcl_UniCharIsDigit, /* 347 */ - Tcl_UniCharIsLower, /* 348 */ - Tcl_UniCharIsSpace, /* 349 */ - Tcl_UniCharIsUpper, /* 350 */ - Tcl_UniCharIsWordChar, /* 351 */ - Tcl_UniCharLen, /* 352 */ - Tcl_UniCharNcmp, /* 353 */ - Tcl_UniCharToUtfDString, /* 354 */ - Tcl_UtfToUniCharDString, /* 355 */ - Tcl_GetRegExpFromObj, /* 356 */ - Tcl_EvalTokens, /* 357 */ - Tcl_FreeParse, /* 358 */ - Tcl_LogCommandInfo, /* 359 */ - Tcl_ParseBraces, /* 360 */ - Tcl_ParseCommand, /* 361 */ - Tcl_ParseExpr, /* 362 */ - Tcl_ParseQuotedString, /* 363 */ - Tcl_ParseVarName, /* 364 */ - Tcl_GetCwd, /* 365 */ - Tcl_Chdir, /* 366 */ - Tcl_Access, /* 367 */ - Tcl_Stat, /* 368 */ - Tcl_UtfNcmp, /* 369 */ - Tcl_UtfNcasecmp, /* 370 */ - Tcl_StringCaseMatch, /* 371 */ - Tcl_UniCharIsControl, /* 372 */ - Tcl_UniCharIsGraph, /* 373 */ - Tcl_UniCharIsPrint, /* 374 */ - Tcl_UniCharIsPunct, /* 375 */ - Tcl_RegExpExecObj, /* 376 */ - Tcl_RegExpGetInfo, /* 377 */ - Tcl_NewUnicodeObj, /* 378 */ - Tcl_SetUnicodeObj, /* 379 */ - Tcl_GetCharLength, /* 380 */ - Tcl_GetUniChar, /* 381 */ - Tcl_GetUnicode, /* 382 */ - Tcl_GetRange, /* 383 */ - Tcl_AppendUnicodeToObj, /* 384 */ - Tcl_RegExpMatchObj, /* 385 */ - Tcl_SetNotifier, /* 386 */ - Tcl_GetAllocMutex, /* 387 */ - Tcl_GetChannelNames, /* 388 */ - Tcl_GetChannelNamesEx, /* 389 */ - Tcl_ProcObjCmd, /* 390 */ - Tcl_ConditionFinalize, /* 391 */ - Tcl_MutexFinalize, /* 392 */ - Tcl_CreateThread, /* 393 */ - Tcl_ReadRaw, /* 394 */ - Tcl_WriteRaw, /* 395 */ - Tcl_GetTopChannel, /* 396 */ - Tcl_ChannelBuffered, /* 397 */ - Tcl_ChannelName, /* 398 */ - Tcl_ChannelVersion, /* 399 */ - Tcl_ChannelBlockModeProc, /* 400 */ - Tcl_ChannelCloseProc, /* 401 */ - Tcl_ChannelClose2Proc, /* 402 */ - Tcl_ChannelInputProc, /* 403 */ - Tcl_ChannelOutputProc, /* 404 */ - Tcl_ChannelSeekProc, /* 405 */ - Tcl_ChannelSetOptionProc, /* 406 */ - Tcl_ChannelGetOptionProc, /* 407 */ - Tcl_ChannelWatchProc, /* 408 */ - Tcl_ChannelGetHandleProc, /* 409 */ - Tcl_ChannelFlushProc, /* 410 */ - Tcl_ChannelHandlerProc, /* 411 */ - Tcl_JoinThread, /* 412 */ - Tcl_IsChannelShared, /* 413 */ - Tcl_IsChannelRegistered, /* 414 */ - Tcl_CutChannel, /* 415 */ - Tcl_SpliceChannel, /* 416 */ - Tcl_ClearChannelHandlers, /* 417 */ - Tcl_IsChannelExisting, /* 418 */ - Tcl_UniCharNcasecmp, /* 419 */ - Tcl_UniCharCaseMatch, /* 420 */ - Tcl_FindHashEntry, /* 421 */ - Tcl_CreateHashEntry, /* 422 */ - Tcl_InitCustomHashTable, /* 423 */ - Tcl_InitObjHashTable, /* 424 */ - Tcl_CommandTraceInfo, /* 425 */ - Tcl_TraceCommand, /* 426 */ - Tcl_UntraceCommand, /* 427 */ - Tcl_AttemptAlloc, /* 428 */ - Tcl_AttemptDbCkalloc, /* 429 */ - Tcl_AttemptRealloc, /* 430 */ - Tcl_AttemptDbCkrealloc, /* 431 */ - Tcl_AttemptSetObjLength, /* 432 */ - Tcl_GetChannelThread, /* 433 */ - Tcl_GetUnicodeFromObj, /* 434 */ - Tcl_GetMathFuncInfo, /* 435 */ - Tcl_ListMathFuncs, /* 436 */ - Tcl_SubstObj, /* 437 */ - Tcl_DetachChannel, /* 438 */ - Tcl_IsStandardChannel, /* 439 */ - Tcl_FSCopyFile, /* 440 */ - Tcl_FSCopyDirectory, /* 441 */ - Tcl_FSCreateDirectory, /* 442 */ - Tcl_FSDeleteFile, /* 443 */ - Tcl_FSLoadFile, /* 444 */ - Tcl_FSMatchInDirectory, /* 445 */ - Tcl_FSLink, /* 446 */ - Tcl_FSRemoveDirectory, /* 447 */ - Tcl_FSRenameFile, /* 448 */ - Tcl_FSLstat, /* 449 */ - Tcl_FSUtime, /* 450 */ - Tcl_FSFileAttrsGet, /* 451 */ - Tcl_FSFileAttrsSet, /* 452 */ - Tcl_FSFileAttrStrings, /* 453 */ - Tcl_FSStat, /* 454 */ - Tcl_FSAccess, /* 455 */ - Tcl_FSOpenFileChannel, /* 456 */ - Tcl_FSGetCwd, /* 457 */ - Tcl_FSChdir, /* 458 */ - Tcl_FSConvertToPathType, /* 459 */ - Tcl_FSJoinPath, /* 460 */ - Tcl_FSSplitPath, /* 461 */ - Tcl_FSEqualPaths, /* 462 */ - Tcl_FSGetNormalizedPath, /* 463 */ - Tcl_FSJoinToPath, /* 464 */ - Tcl_FSGetInternalRep, /* 465 */ - Tcl_FSGetTranslatedPath, /* 466 */ - Tcl_FSEvalFile, /* 467 */ - Tcl_FSNewNativePath, /* 468 */ - Tcl_FSGetNativePath, /* 469 */ - Tcl_FSFileSystemInfo, /* 470 */ - Tcl_FSPathSeparator, /* 471 */ - Tcl_FSListVolumes, /* 472 */ - Tcl_FSRegister, /* 473 */ - Tcl_FSUnregister, /* 474 */ - Tcl_FSData, /* 475 */ - Tcl_FSGetTranslatedStringPath, /* 476 */ - Tcl_FSGetFileSystemForPath, /* 477 */ - Tcl_FSGetPathType, /* 478 */ - Tcl_OutputBuffered, /* 479 */ - Tcl_FSMountsChanged, /* 480 */ - Tcl_EvalTokensStandard, /* 481 */ - Tcl_GetTime, /* 482 */ - Tcl_CreateObjTrace, /* 483 */ - Tcl_GetCommandInfoFromToken, /* 484 */ - Tcl_SetCommandInfoFromToken, /* 485 */ - Tcl_DbNewWideIntObj, /* 486 */ - Tcl_GetWideIntFromObj, /* 487 */ - Tcl_NewWideIntObj, /* 488 */ - Tcl_SetWideIntObj, /* 489 */ - Tcl_AllocStatBuf, /* 490 */ - Tcl_Seek, /* 491 */ - Tcl_Tell, /* 492 */ - Tcl_ChannelWideSeekProc, /* 493 */ - Tcl_DictObjPut, /* 494 */ - Tcl_DictObjGet, /* 495 */ - Tcl_DictObjRemove, /* 496 */ - Tcl_DictObjSize, /* 497 */ - Tcl_DictObjFirst, /* 498 */ - Tcl_DictObjNext, /* 499 */ - Tcl_DictObjDone, /* 500 */ - Tcl_DictObjPutKeyList, /* 501 */ - Tcl_DictObjRemoveKeyList, /* 502 */ - Tcl_NewDictObj, /* 503 */ - Tcl_DbNewDictObj, /* 504 */ - Tcl_RegisterConfig, /* 505 */ - Tcl_CreateNamespace, /* 506 */ - Tcl_DeleteNamespace, /* 507 */ - Tcl_AppendExportList, /* 508 */ - Tcl_Export, /* 509 */ - Tcl_Import, /* 510 */ - Tcl_ForgetImport, /* 511 */ - Tcl_GetCurrentNamespace, /* 512 */ - Tcl_GetGlobalNamespace, /* 513 */ - Tcl_FindNamespace, /* 514 */ - Tcl_FindCommand, /* 515 */ - Tcl_GetCommandFromObj, /* 516 */ - Tcl_GetCommandFullName, /* 517 */ - Tcl_FSEvalFileEx, /* 518 */ - Tcl_SetExitProc, /* 519 */ - Tcl_LimitAddHandler, /* 520 */ - Tcl_LimitRemoveHandler, /* 521 */ - Tcl_LimitReady, /* 522 */ - Tcl_LimitCheck, /* 523 */ - Tcl_LimitExceeded, /* 524 */ - Tcl_LimitSetCommands, /* 525 */ - Tcl_LimitSetTime, /* 526 */ - Tcl_LimitSetGranularity, /* 527 */ - Tcl_LimitTypeEnabled, /* 528 */ - Tcl_LimitTypeExceeded, /* 529 */ - Tcl_LimitTypeSet, /* 530 */ - Tcl_LimitTypeReset, /* 531 */ - Tcl_LimitGetCommands, /* 532 */ - Tcl_LimitGetTime, /* 533 */ - Tcl_LimitGetGranularity, /* 534 */ - Tcl_SaveInterpState, /* 535 */ - Tcl_RestoreInterpState, /* 536 */ - Tcl_DiscardInterpState, /* 537 */ - Tcl_SetReturnOptions, /* 538 */ - Tcl_GetReturnOptions, /* 539 */ - Tcl_IsEnsemble, /* 540 */ - Tcl_CreateEnsemble, /* 541 */ - Tcl_FindEnsemble, /* 542 */ - Tcl_SetEnsembleSubcommandList, /* 543 */ - Tcl_SetEnsembleMappingDict, /* 544 */ - Tcl_SetEnsembleUnknownHandler, /* 545 */ - Tcl_SetEnsembleFlags, /* 546 */ - Tcl_GetEnsembleSubcommandList, /* 547 */ - Tcl_GetEnsembleMappingDict, /* 548 */ - Tcl_GetEnsembleUnknownHandler, /* 549 */ - Tcl_GetEnsembleFlags, /* 550 */ - Tcl_GetEnsembleNamespace, /* 551 */ - Tcl_SetTimeProc, /* 552 */ - Tcl_QueryTimeProc, /* 553 */ - Tcl_ChannelThreadActionProc, /* 554 */ - Tcl_NewBignumObj, /* 555 */ - Tcl_DbNewBignumObj, /* 556 */ - Tcl_SetBignumObj, /* 557 */ - Tcl_GetBignumFromObj, /* 558 */ - Tcl_TakeBignumFromObj, /* 559 */ - Tcl_TruncateChannel, /* 560 */ - Tcl_ChannelTruncateProc, /* 561 */ - Tcl_SetChannelErrorInterp, /* 562 */ - Tcl_GetChannelErrorInterp, /* 563 */ - Tcl_SetChannelError, /* 564 */ - Tcl_GetChannelError, /* 565 */ - Tcl_InitBignumFromDouble, /* 566 */ - Tcl_GetNamespaceUnknownHandler, /* 567 */ - Tcl_SetNamespaceUnknownHandler, /* 568 */ - Tcl_GetEncodingFromObj, /* 569 */ - Tcl_GetEncodingSearchPath, /* 570 */ - Tcl_SetEncodingSearchPath, /* 571 */ - Tcl_GetEncodingNameFromEnvironment, /* 572 */ - Tcl_PkgRequireProc, /* 573 */ - Tcl_AppendObjToErrorInfo, /* 574 */ - Tcl_AppendLimitedToObj, /* 575 */ - Tcl_Format, /* 576 */ - Tcl_AppendFormatToObj, /* 577 */ - Tcl_ObjPrintf, /* 578 */ - Tcl_AppendPrintfToObj, /* 579 */ - Tcl_CancelEval, /* 580 */ - Tcl_Canceled, /* 581 */ - Tcl_NRCreateCommand, /* 582 */ - Tcl_NREvalObj, /* 583 */ - Tcl_NREvalObjv, /* 584 */ - Tcl_NRCmdSwap, /* 585 */ - Tcl_NRAddCallback, /* 586 */ - Tcl_NRCallObjProc, /* 587 */ -}; - -/* !END!: Do not edit above this line. */ - -/* - * Module-scope pointers to the main static stubs tables, used for package - * initialization via Tcl_PkgProvideEx(). - */ - -MODULE_SCOPE const TclStubs * const tclConstStubsPtr; -MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; - -const TclStubs * const tclConstStubsPtr = &tclStubs; -const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; +/* + * tclStubInit.c -- + * + * This file contains the initializers for the Tcl stub vectors. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclStubInit.c,v 1.159 2008/07/21 21:02:18 ferrieux Exp $ + */ + +#include "tclInt.h" +#include "tommath.h" + +/* + * Remove macros that will interfere with the definitions below. + */ + +#undef Tcl_Alloc +#undef Tcl_Free +#undef Tcl_Realloc +#undef Tcl_NewBooleanObj +#undef Tcl_NewByteArrayObj +#undef Tcl_NewDoubleObj +#undef Tcl_NewIntObj +#undef Tcl_NewListObj +#undef Tcl_NewLongObj +#undef Tcl_NewObj +#undef Tcl_NewStringObj +#undef Tcl_DumpActiveMemory +#undef Tcl_ValidateAllMemory +#undef Tcl_FindHashEntry +#undef Tcl_CreateHashEntry + +/* + * WARNING: The contents of this file is automatically generated by the + * tools/genStubs.tcl script. Any modifications to the function declarations + * below should be made in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +static const TclIntStubs tclIntStubs = { + TCL_STUB_MAGIC, + NULL, + NULL, /* 0 */ + NULL, /* 1 */ + NULL, /* 2 */ + TclAllocateFreeObjects, /* 3 */ + NULL, /* 4 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCleanupChildren, /* 5 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCleanupChildren, /* 5 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCleanupChildren, /* 5 */ +#endif /* MACOSX */ + TclCleanupCommand, /* 6 */ + TclCopyAndCollapse, /* 7 */ + TclCopyChannel, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCreatePipeline, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCreatePipeline, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCreatePipeline, /* 9 */ +#endif /* MACOSX */ + TclCreateProc, /* 10 */ + TclDeleteCompiledLocalVars, /* 11 */ + TclDeleteVars, /* 12 */ + NULL, /* 13 */ + TclDumpMemoryInfo, /* 14 */ + NULL, /* 15 */ + TclExprFloatError, /* 16 */ + NULL, /* 17 */ + NULL, /* 18 */ + NULL, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + TclFindElement, /* 22 */ + TclFindProc, /* 23 */ + NULL, /* 24 */ + TclFreePackageInfo, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + TclpGetDefaultStdChannel, /* 28 */ + NULL, /* 29 */ + NULL, /* 30 */ + TclGetExtension, /* 31 */ + TclGetFrame, /* 32 */ + NULL, /* 33 */ + TclGetIntForIndex, /* 34 */ + NULL, /* 35 */ + NULL, /* 36 */ + TclGetLoadedPackages, /* 37 */ + TclGetNamespaceForQualName, /* 38 */ + TclGetObjInterpProc, /* 39 */ + TclGetOpenMode, /* 40 */ + TclGetOriginalCommand, /* 41 */ + TclpGetUserHome, /* 42 */ + NULL, /* 43 */ + TclGuessPackageName, /* 44 */ + TclHideUnsafeCommands, /* 45 */ + TclInExit, /* 46 */ + NULL, /* 47 */ + NULL, /* 48 */ + NULL, /* 49 */ + TclInitCompiledLocals, /* 50 */ + TclInterpInit, /* 51 */ + NULL, /* 52 */ + TclInvokeObjectCommand, /* 53 */ + TclInvokeStringCommand, /* 54 */ + TclIsProc, /* 55 */ + NULL, /* 56 */ + NULL, /* 57 */ + TclLookupVar, /* 58 */ + NULL, /* 59 */ + TclNeedSpace, /* 60 */ + TclNewProcBodyObj, /* 61 */ + TclObjCommandComplete, /* 62 */ + TclObjInterpProc, /* 63 */ + TclObjInvoke, /* 64 */ + NULL, /* 65 */ + NULL, /* 66 */ + NULL, /* 67 */ + NULL, /* 68 */ + TclpAlloc, /* 69 */ + NULL, /* 70 */ + NULL, /* 71 */ + NULL, /* 72 */ + NULL, /* 73 */ + TclpFree, /* 74 */ + TclpGetClicks, /* 75 */ + TclpGetSeconds, /* 76 */ + TclpGetTime, /* 77 */ + TclpGetTimeZone, /* 78 */ + NULL, /* 79 */ + NULL, /* 80 */ + TclpRealloc, /* 81 */ + NULL, /* 82 */ + NULL, /* 83 */ + NULL, /* 84 */ + NULL, /* 85 */ + NULL, /* 86 */ + NULL, /* 87 */ + TclPrecTraceProc, /* 88 */ + TclPreventAliasLoop, /* 89 */ + NULL, /* 90 */ + TclProcCleanupProc, /* 91 */ + TclProcCompileProc, /* 92 */ + TclProcDeleteProc, /* 93 */ + NULL, /* 94 */ + NULL, /* 95 */ + TclRenameCommand, /* 96 */ + TclResetShadowedCmdRefs, /* 97 */ + TclServiceIdle, /* 98 */ + NULL, /* 99 */ + NULL, /* 100 */ + TclSetPreInitScript, /* 101 */ + TclSetupEnv, /* 102 */ + TclSockGetPort, /* 103 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclSockMinimumBuffers, /* 104 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* MACOSX */ + NULL, /* 105 */ + NULL, /* 106 */ + NULL, /* 107 */ + TclTeardownNamespace, /* 108 */ + TclUpdateReturnInfo, /* 109 */ + NULL, /* 110 */ + Tcl_AddInterpResolvers, /* 111 */ + Tcl_AppendExportList, /* 112 */ + Tcl_CreateNamespace, /* 113 */ + Tcl_DeleteNamespace, /* 114 */ + Tcl_Export, /* 115 */ + Tcl_FindCommand, /* 116 */ + Tcl_FindNamespace, /* 117 */ + Tcl_GetInterpResolvers, /* 118 */ + Tcl_GetNamespaceResolvers, /* 119 */ + Tcl_FindNamespaceVar, /* 120 */ + Tcl_ForgetImport, /* 121 */ + Tcl_GetCommandFromObj, /* 122 */ + Tcl_GetCommandFullName, /* 123 */ + Tcl_GetCurrentNamespace, /* 124 */ + Tcl_GetGlobalNamespace, /* 125 */ + Tcl_GetVariableFullName, /* 126 */ + Tcl_Import, /* 127 */ + Tcl_PopCallFrame, /* 128 */ + Tcl_PushCallFrame, /* 129 */ + Tcl_RemoveInterpResolvers, /* 130 */ + Tcl_SetNamespaceResolvers, /* 131 */ + TclpHasSockets, /* 132 */ + TclpGetDate, /* 133 */ + NULL, /* 134 */ + NULL, /* 135 */ + NULL, /* 136 */ + NULL, /* 137 */ + TclGetEnv, /* 138 */ + NULL, /* 139 */ + NULL, /* 140 */ + TclpGetCwd, /* 141 */ + TclSetByteCodeFromAny, /* 142 */ + TclAddLiteralObj, /* 143 */ + TclHideLiteral, /* 144 */ + TclGetAuxDataType, /* 145 */ + TclHandleCreate, /* 146 */ + TclHandleFree, /* 147 */ + TclHandlePreserve, /* 148 */ + TclHandleRelease, /* 149 */ + TclRegAbout, /* 150 */ + TclRegExpRangeUniChar, /* 151 */ + TclSetLibraryPath, /* 152 */ + TclGetLibraryPath, /* 153 */ + NULL, /* 154 */ + NULL, /* 155 */ + TclRegError, /* 156 */ + TclVarTraceExists, /* 157 */ + TclSetStartupScriptFileName, /* 158 */ + TclGetStartupScriptFileName, /* 159 */ + NULL, /* 160 */ + TclChannelTransform, /* 161 */ + TclChannelEventScriptInvoker, /* 162 */ + TclGetInstructionTable, /* 163 */ + TclExpandCodeArray, /* 164 */ + TclpSetInitialEncodings, /* 165 */ + TclListObjSetElement, /* 166 */ + TclSetStartupScriptPath, /* 167 */ + TclGetStartupScriptPath, /* 168 */ + TclpUtfNcmp2, /* 169 */ + TclCheckInterpTraces, /* 170 */ + TclCheckExecutionTraces, /* 171 */ + TclInThreadExit, /* 172 */ + TclUniCharMatch, /* 173 */ + NULL, /* 174 */ + TclCallVarTraces, /* 175 */ + TclCleanupVar, /* 176 */ + TclVarErrMsg, /* 177 */ + Tcl_SetStartupScript, /* 178 */ + Tcl_GetStartupScript, /* 179 */ + NULL, /* 180 */ + NULL, /* 181 */ + TclpLocaltime, /* 182 */ + TclpGmtime, /* 183 */ + NULL, /* 184 */ + NULL, /* 185 */ + NULL, /* 186 */ + NULL, /* 187 */ + NULL, /* 188 */ + NULL, /* 189 */ + NULL, /* 190 */ + NULL, /* 191 */ + NULL, /* 192 */ + NULL, /* 193 */ + NULL, /* 194 */ + NULL, /* 195 */ + NULL, /* 196 */ + NULL, /* 197 */ + TclObjGetFrame, /* 198 */ + NULL, /* 199 */ + TclpObjRemoveDirectory, /* 200 */ + TclpObjCopyDirectory, /* 201 */ + TclpObjCreateDirectory, /* 202 */ + TclpObjDeleteFile, /* 203 */ + TclpObjCopyFile, /* 204 */ + TclpObjRenameFile, /* 205 */ + TclpObjStat, /* 206 */ + TclpObjAccess, /* 207 */ + TclpOpenFileChannel, /* 208 */ + NULL, /* 209 */ + NULL, /* 210 */ + NULL, /* 211 */ + TclpFindExecutable, /* 212 */ + TclGetObjNameOfExecutable, /* 213 */ + TclSetObjNameOfExecutable, /* 214 */ + TclStackAlloc, /* 215 */ + TclStackFree, /* 216 */ + TclPushStackFrame, /* 217 */ + TclPopStackFrame, /* 218 */ + NULL, /* 219 */ + NULL, /* 220 */ + NULL, /* 221 */ + NULL, /* 222 */ + NULL, /* 223 */ + TclGetPlatform, /* 224 */ + TclTraceDictPath, /* 225 */ + TclObjBeingDeleted, /* 226 */ + TclSetNsPath, /* 227 */ + TclObjInterpProcCore, /* 228 */ + TclPtrMakeUpvar, /* 229 */ + TclObjLookupVar, /* 230 */ + TclGetNamespaceFromObj, /* 231 */ + TclEvalObjEx, /* 232 */ + TclGetSrcInfoForPc, /* 233 */ + TclVarHashCreateVar, /* 234 */ + TclInitVarHashTable, /* 235 */ + TclBackgroundException, /* 236 */ + TclResetCancellation, /* 237 */ + TclEvalObjv_NR2, /* 238 */ + &TclNRInterpProc, /* 239 */ + TclNRInterpProcCore, /* 240 */ + TclNRPushRecord, /* 241 */ + TclNRPopAndFreeRecord, /* 242 */ + TclNREvalObjEx, /* 243 */ +}; + +static const TclIntPlatStubs tclIntPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ + TclWinGetServByName, /* 2 */ + TclWinGetSockOpt, /* 3 */ + TclWinGetTclInstance, /* 4 */ + NULL, /* 5 */ + TclWinNToHS, /* 6 */ + TclWinSetSockOpt, /* 7 */ + TclpGetPid, /* 8 */ + TclWinGetPlatformId, /* 9 */ + NULL, /* 10 */ + TclGetAndDetachPids, /* 11 */ + TclpCloseFile, /* 12 */ + TclpCreateCommandChannel, /* 13 */ + TclpCreatePipe, /* 14 */ + TclpCreateProcess, /* 15 */ + NULL, /* 16 */ + NULL, /* 17 */ + TclpMakeFile, /* 18 */ + TclpOpenFile, /* 19 */ + TclWinAddProcess, /* 20 */ + NULL, /* 21 */ + TclpCreateTempFile, /* 22 */ + TclpGetTZName, /* 23 */ + TclWinNoBackslash, /* 24 */ + NULL, /* 25 */ + TclWinSetInterfaces, /* 26 */ + TclWinFlushDirtyChannels, /* 27 */ + TclWinResetInterfaces, /* 28 */ + TclWinCPUID, /* 29 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ + TclMacOSXGetFileAttribute, /* 15 */ + TclMacOSXSetFileAttribute, /* 16 */ + TclMacOSXCopyFileAttributes, /* 17 */ + TclMacOSXMatchType, /* 18 */ +#endif /* MACOSX */ +}; + +static const TclPlatStubs tclPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#ifdef __WIN32__ /* WIN */ + Tcl_WinUtfToTChar, /* 0 */ + Tcl_WinTCharToUtf, /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_MacOSXOpenBundleResources, /* 0 */ + Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ +#endif /* MACOSX */ +}; + +static const TclTomMathStubs tclTomMathStubs = { + TCL_STUB_MAGIC, + NULL, + TclBN_epoch, /* 0 */ + TclBN_revision, /* 1 */ + TclBN_mp_add, /* 2 */ + TclBN_mp_add_d, /* 3 */ + TclBN_mp_and, /* 4 */ + TclBN_mp_clamp, /* 5 */ + TclBN_mp_clear, /* 6 */ + TclBN_mp_clear_multi, /* 7 */ + TclBN_mp_cmp, /* 8 */ + TclBN_mp_cmp_d, /* 9 */ + TclBN_mp_cmp_mag, /* 10 */ + TclBN_mp_copy, /* 11 */ + TclBN_mp_count_bits, /* 12 */ + TclBN_mp_div, /* 13 */ + TclBN_mp_div_d, /* 14 */ + TclBN_mp_div_2, /* 15 */ + TclBN_mp_div_2d, /* 16 */ + TclBN_mp_div_3, /* 17 */ + TclBN_mp_exch, /* 18 */ + TclBN_mp_expt_d, /* 19 */ + TclBN_mp_grow, /* 20 */ + TclBN_mp_init, /* 21 */ + TclBN_mp_init_copy, /* 22 */ + TclBN_mp_init_multi, /* 23 */ + TclBN_mp_init_set, /* 24 */ + TclBN_mp_init_size, /* 25 */ + TclBN_mp_lshd, /* 26 */ + TclBN_mp_mod, /* 27 */ + TclBN_mp_mod_2d, /* 28 */ + TclBN_mp_mul, /* 29 */ + TclBN_mp_mul_d, /* 30 */ + TclBN_mp_mul_2, /* 31 */ + TclBN_mp_mul_2d, /* 32 */ + TclBN_mp_neg, /* 33 */ + TclBN_mp_or, /* 34 */ + TclBN_mp_radix_size, /* 35 */ + TclBN_mp_read_radix, /* 36 */ + TclBN_mp_rshd, /* 37 */ + TclBN_mp_shrink, /* 38 */ + TclBN_mp_set, /* 39 */ + TclBN_mp_sqr, /* 40 */ + TclBN_mp_sqrt, /* 41 */ + TclBN_mp_sub, /* 42 */ + TclBN_mp_sub_d, /* 43 */ + TclBN_mp_to_unsigned_bin, /* 44 */ + TclBN_mp_to_unsigned_bin_n, /* 45 */ + TclBN_mp_toradix_n, /* 46 */ + TclBN_mp_unsigned_bin_size, /* 47 */ + TclBN_mp_xor, /* 48 */ + TclBN_mp_zero, /* 49 */ + TclBN_reverse, /* 50 */ + TclBN_fast_s_mp_mul_digs, /* 51 */ + TclBN_fast_s_mp_sqr, /* 52 */ + TclBN_mp_karatsuba_mul, /* 53 */ + TclBN_mp_karatsuba_sqr, /* 54 */ + TclBN_mp_toom_mul, /* 55 */ + TclBN_mp_toom_sqr, /* 56 */ + TclBN_s_mp_add, /* 57 */ + TclBN_s_mp_mul_digs, /* 58 */ + TclBN_s_mp_sqr, /* 59 */ + TclBN_s_mp_sub, /* 60 */ +}; + +static const TclStubHooks tclStubHooks = { + &tclPlatStubs, + &tclIntStubs, + &tclIntPlatStubs +}; + +static const TclStubs tclStubs = { + TCL_STUB_MAGIC, + &tclStubHooks, + Tcl_PkgProvideEx, /* 0 */ + Tcl_PkgRequireEx, /* 1 */ + Tcl_Panic, /* 2 */ + Tcl_Alloc, /* 3 */ + Tcl_Free, /* 4 */ + Tcl_Realloc, /* 5 */ + Tcl_DbCkalloc, /* 6 */ + Tcl_DbCkfree, /* 7 */ + Tcl_DbCkrealloc, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 10 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* MACOSX */ + Tcl_SetTimer, /* 11 */ + Tcl_Sleep, /* 12 */ + Tcl_WaitForEvent, /* 13 */ + Tcl_AppendAllObjTypes, /* 14 */ + Tcl_AppendStringsToObj, /* 15 */ + Tcl_AppendToObj, /* 16 */ + Tcl_ConcatObj, /* 17 */ + Tcl_ConvertToType, /* 18 */ + Tcl_DbDecrRefCount, /* 19 */ + Tcl_DbIncrRefCount, /* 20 */ + Tcl_DbIsShared, /* 21 */ + Tcl_DbNewBooleanObj, /* 22 */ + Tcl_DbNewByteArrayObj, /* 23 */ + Tcl_DbNewDoubleObj, /* 24 */ + Tcl_DbNewListObj, /* 25 */ + Tcl_DbNewLongObj, /* 26 */ + Tcl_DbNewObj, /* 27 */ + Tcl_DbNewStringObj, /* 28 */ + Tcl_DuplicateObj, /* 29 */ + TclFreeObj, /* 30 */ + Tcl_GetBoolean, /* 31 */ + Tcl_GetBooleanFromObj, /* 32 */ + Tcl_GetByteArrayFromObj, /* 33 */ + Tcl_GetDouble, /* 34 */ + Tcl_GetDoubleFromObj, /* 35 */ + Tcl_GetIndexFromObj, /* 36 */ + Tcl_GetInt, /* 37 */ + Tcl_GetIntFromObj, /* 38 */ + Tcl_GetLongFromObj, /* 39 */ + Tcl_GetObjType, /* 40 */ + Tcl_GetStringFromObj, /* 41 */ + Tcl_InvalidateStringRep, /* 42 */ + Tcl_ListObjAppendList, /* 43 */ + Tcl_ListObjAppendElement, /* 44 */ + Tcl_ListObjGetElements, /* 45 */ + Tcl_ListObjIndex, /* 46 */ + Tcl_ListObjLength, /* 47 */ + Tcl_ListObjReplace, /* 48 */ + Tcl_NewBooleanObj, /* 49 */ + Tcl_NewByteArrayObj, /* 50 */ + Tcl_NewDoubleObj, /* 51 */ + Tcl_NewIntObj, /* 52 */ + Tcl_NewListObj, /* 53 */ + Tcl_NewLongObj, /* 54 */ + Tcl_NewObj, /* 55 */ + Tcl_NewStringObj, /* 56 */ + Tcl_SetBooleanObj, /* 57 */ + Tcl_SetByteArrayLength, /* 58 */ + Tcl_SetByteArrayObj, /* 59 */ + Tcl_SetDoubleObj, /* 60 */ + Tcl_SetIntObj, /* 61 */ + Tcl_SetListObj, /* 62 */ + Tcl_SetLongObj, /* 63 */ + Tcl_SetObjLength, /* 64 */ + Tcl_SetStringObj, /* 65 */ + Tcl_AddErrorInfo, /* 66 */ + Tcl_AddObjErrorInfo, /* 67 */ + Tcl_AllowExceptions, /* 68 */ + Tcl_AppendElement, /* 69 */ + Tcl_AppendResult, /* 70 */ + Tcl_AsyncCreate, /* 71 */ + Tcl_AsyncDelete, /* 72 */ + Tcl_AsyncInvoke, /* 73 */ + Tcl_AsyncMark, /* 74 */ + Tcl_AsyncReady, /* 75 */ + Tcl_BackgroundError, /* 76 */ + Tcl_Backslash, /* 77 */ + Tcl_BadChannelOption, /* 78 */ + Tcl_CallWhenDeleted, /* 79 */ + Tcl_CancelIdleCall, /* 80 */ + Tcl_Close, /* 81 */ + Tcl_CommandComplete, /* 82 */ + Tcl_Concat, /* 83 */ + Tcl_ConvertElement, /* 84 */ + Tcl_ConvertCountedElement, /* 85 */ + Tcl_CreateAlias, /* 86 */ + Tcl_CreateAliasObj, /* 87 */ + Tcl_CreateChannel, /* 88 */ + Tcl_CreateChannelHandler, /* 89 */ + Tcl_CreateCloseHandler, /* 90 */ + Tcl_CreateCommand, /* 91 */ + Tcl_CreateEventSource, /* 92 */ + Tcl_CreateExitHandler, /* 93 */ + Tcl_CreateInterp, /* 94 */ + Tcl_CreateMathFunc, /* 95 */ + Tcl_CreateObjCommand, /* 96 */ + Tcl_CreateSlave, /* 97 */ + Tcl_CreateTimerHandler, /* 98 */ + Tcl_CreateTrace, /* 99 */ + Tcl_DeleteAssocData, /* 100 */ + Tcl_DeleteChannelHandler, /* 101 */ + Tcl_DeleteCloseHandler, /* 102 */ + Tcl_DeleteCommand, /* 103 */ + Tcl_DeleteCommandFromToken, /* 104 */ + Tcl_DeleteEvents, /* 105 */ + Tcl_DeleteEventSource, /* 106 */ + Tcl_DeleteExitHandler, /* 107 */ + Tcl_DeleteHashEntry, /* 108 */ + Tcl_DeleteHashTable, /* 109 */ + Tcl_DeleteInterp, /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DetachPids, /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_DetachPids, /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DetachPids, /* 111 */ +#endif /* MACOSX */ + Tcl_DeleteTimerHandler, /* 112 */ + Tcl_DeleteTrace, /* 113 */ + Tcl_DontCallWhenDeleted, /* 114 */ + Tcl_DoOneEvent, /* 115 */ + Tcl_DoWhenIdle, /* 116 */ + Tcl_DStringAppend, /* 117 */ + Tcl_DStringAppendElement, /* 118 */ + Tcl_DStringEndSublist, /* 119 */ + Tcl_DStringFree, /* 120 */ + Tcl_DStringGetResult, /* 121 */ + Tcl_DStringInit, /* 122 */ + Tcl_DStringResult, /* 123 */ + Tcl_DStringSetLength, /* 124 */ + Tcl_DStringStartSublist, /* 125 */ + Tcl_Eof, /* 126 */ + Tcl_ErrnoId, /* 127 */ + Tcl_ErrnoMsg, /* 128 */ + Tcl_Eval, /* 129 */ + Tcl_EvalFile, /* 130 */ + Tcl_EvalObj, /* 131 */ + Tcl_EventuallyFree, /* 132 */ + Tcl_Exit, /* 133 */ + Tcl_ExposeCommand, /* 134 */ + Tcl_ExprBoolean, /* 135 */ + Tcl_ExprBooleanObj, /* 136 */ + Tcl_ExprDouble, /* 137 */ + Tcl_ExprDoubleObj, /* 138 */ + Tcl_ExprLong, /* 139 */ + Tcl_ExprLongObj, /* 140 */ + Tcl_ExprObj, /* 141 */ + Tcl_ExprString, /* 142 */ + Tcl_Finalize, /* 143 */ + Tcl_FindExecutable, /* 144 */ + Tcl_FirstHashEntry, /* 145 */ + Tcl_Flush, /* 146 */ + Tcl_FreeResult, /* 147 */ + Tcl_GetAlias, /* 148 */ + Tcl_GetAliasObj, /* 149 */ + Tcl_GetAssocData, /* 150 */ + Tcl_GetChannel, /* 151 */ + Tcl_GetChannelBufferSize, /* 152 */ + Tcl_GetChannelHandle, /* 153 */ + Tcl_GetChannelInstanceData, /* 154 */ + Tcl_GetChannelMode, /* 155 */ + Tcl_GetChannelName, /* 156 */ + Tcl_GetChannelOption, /* 157 */ + Tcl_GetChannelType, /* 158 */ + Tcl_GetCommandInfo, /* 159 */ + Tcl_GetCommandName, /* 160 */ + Tcl_GetErrno, /* 161 */ + Tcl_GetHostName, /* 162 */ + Tcl_GetInterpPath, /* 163 */ + Tcl_GetMaster, /* 164 */ + Tcl_GetNameOfExecutable, /* 165 */ + Tcl_GetObjResult, /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 167 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* MACOSX */ + Tcl_GetPathType, /* 168 */ + Tcl_Gets, /* 169 */ + Tcl_GetsObj, /* 170 */ + Tcl_GetServiceMode, /* 171 */ + Tcl_GetSlave, /* 172 */ + Tcl_GetStdChannel, /* 173 */ + Tcl_GetStringResult, /* 174 */ + Tcl_GetVar, /* 175 */ + Tcl_GetVar2, /* 176 */ + Tcl_GlobalEval, /* 177 */ + Tcl_GlobalEvalObj, /* 178 */ + Tcl_HideCommand, /* 179 */ + Tcl_Init, /* 180 */ + Tcl_InitHashTable, /* 181 */ + Tcl_InputBlocked, /* 182 */ + Tcl_InputBuffered, /* 183 */ + Tcl_InterpDeleted, /* 184 */ + Tcl_IsSafe, /* 185 */ + Tcl_JoinPath, /* 186 */ + Tcl_LinkVar, /* 187 */ + NULL, /* 188 */ + Tcl_MakeFileChannel, /* 189 */ + Tcl_MakeSafe, /* 190 */ + Tcl_MakeTcpClientChannel, /* 191 */ + Tcl_Merge, /* 192 */ + Tcl_NextHashEntry, /* 193 */ + Tcl_NotifyChannel, /* 194 */ + Tcl_ObjGetVar2, /* 195 */ + Tcl_ObjSetVar2, /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* MACOSX */ + Tcl_OpenFileChannel, /* 198 */ + Tcl_OpenTcpClient, /* 199 */ + Tcl_OpenTcpServer, /* 200 */ + Tcl_Preserve, /* 201 */ + Tcl_PrintDouble, /* 202 */ + Tcl_PutEnv, /* 203 */ + Tcl_PosixError, /* 204 */ + Tcl_QueueEvent, /* 205 */ + Tcl_Read, /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* MACOSX */ + Tcl_RecordAndEval, /* 208 */ + Tcl_RecordAndEvalObj, /* 209 */ + Tcl_RegisterChannel, /* 210 */ + Tcl_RegisterObjType, /* 211 */ + Tcl_RegExpCompile, /* 212 */ + Tcl_RegExpExec, /* 213 */ + Tcl_RegExpMatch, /* 214 */ + Tcl_RegExpRange, /* 215 */ + Tcl_Release, /* 216 */ + Tcl_ResetResult, /* 217 */ + Tcl_ScanElement, /* 218 */ + Tcl_ScanCountedElement, /* 219 */ + Tcl_SeekOld, /* 220 */ + Tcl_ServiceAll, /* 221 */ + Tcl_ServiceEvent, /* 222 */ + Tcl_SetAssocData, /* 223 */ + Tcl_SetChannelBufferSize, /* 224 */ + Tcl_SetChannelOption, /* 225 */ + Tcl_SetCommandInfo, /* 226 */ + Tcl_SetErrno, /* 227 */ + Tcl_SetErrorCode, /* 228 */ + Tcl_SetMaxBlockTime, /* 229 */ + Tcl_SetPanicProc, /* 230 */ + Tcl_SetRecursionLimit, /* 231 */ + Tcl_SetResult, /* 232 */ + Tcl_SetServiceMode, /* 233 */ + Tcl_SetObjErrorCode, /* 234 */ + Tcl_SetObjResult, /* 235 */ + Tcl_SetStdChannel, /* 236 */ + Tcl_SetVar, /* 237 */ + Tcl_SetVar2, /* 238 */ + Tcl_SignalId, /* 239 */ + Tcl_SignalMsg, /* 240 */ + Tcl_SourceRCFile, /* 241 */ + Tcl_SplitList, /* 242 */ + Tcl_SplitPath, /* 243 */ + Tcl_StaticPackage, /* 244 */ + Tcl_StringMatch, /* 245 */ + Tcl_TellOld, /* 246 */ + Tcl_TraceVar, /* 247 */ + Tcl_TraceVar2, /* 248 */ + Tcl_TranslateFileName, /* 249 */ + Tcl_Ungets, /* 250 */ + Tcl_UnlinkVar, /* 251 */ + Tcl_UnregisterChannel, /* 252 */ + Tcl_UnsetVar, /* 253 */ + Tcl_UnsetVar2, /* 254 */ + Tcl_UntraceVar, /* 255 */ + Tcl_UntraceVar2, /* 256 */ + Tcl_UpdateLinkedVar, /* 257 */ + Tcl_UpVar, /* 258 */ + Tcl_UpVar2, /* 259 */ + Tcl_VarEval, /* 260 */ + Tcl_VarTraceInfo, /* 261 */ + Tcl_VarTraceInfo2, /* 262 */ + Tcl_Write, /* 263 */ + Tcl_WrongNumArgs, /* 264 */ + Tcl_DumpActiveMemory, /* 265 */ + Tcl_ValidateAllMemory, /* 266 */ + Tcl_AppendResultVA, /* 267 */ + Tcl_AppendStringsToObjVA, /* 268 */ + Tcl_HashStats, /* 269 */ + Tcl_ParseVar, /* 270 */ + Tcl_PkgPresent, /* 271 */ + Tcl_PkgPresentEx, /* 272 */ + Tcl_PkgProvide, /* 273 */ + Tcl_PkgRequire, /* 274 */ + Tcl_SetErrorCodeVA, /* 275 */ + Tcl_VarEvalVA, /* 276 */ + Tcl_WaitPid, /* 277 */ + Tcl_PanicVA, /* 278 */ + Tcl_GetVersion, /* 279 */ + Tcl_InitMemory, /* 280 */ + Tcl_StackChannel, /* 281 */ + Tcl_UnstackChannel, /* 282 */ + Tcl_GetStackedChannel, /* 283 */ + Tcl_SetMainLoop, /* 284 */ + NULL, /* 285 */ + Tcl_AppendObjToObj, /* 286 */ + Tcl_CreateEncoding, /* 287 */ + Tcl_CreateThreadExitHandler, /* 288 */ + Tcl_DeleteThreadExitHandler, /* 289 */ + Tcl_DiscardResult, /* 290 */ + Tcl_EvalEx, /* 291 */ + Tcl_EvalObjv, /* 292 */ + Tcl_EvalObjEx, /* 293 */ + Tcl_ExitThread, /* 294 */ + Tcl_ExternalToUtf, /* 295 */ + Tcl_ExternalToUtfDString, /* 296 */ + Tcl_FinalizeThread, /* 297 */ + Tcl_FinalizeNotifier, /* 298 */ + Tcl_FreeEncoding, /* 299 */ + Tcl_GetCurrentThread, /* 300 */ + Tcl_GetEncoding, /* 301 */ + Tcl_GetEncodingName, /* 302 */ + Tcl_GetEncodingNames, /* 303 */ + Tcl_GetIndexFromObjStruct, /* 304 */ + Tcl_GetThreadData, /* 305 */ + Tcl_GetVar2Ex, /* 306 */ + Tcl_InitNotifier, /* 307 */ + Tcl_MutexLock, /* 308 */ + Tcl_MutexUnlock, /* 309 */ + Tcl_ConditionNotify, /* 310 */ + Tcl_ConditionWait, /* 311 */ + Tcl_NumUtfChars, /* 312 */ + Tcl_ReadChars, /* 313 */ + Tcl_RestoreResult, /* 314 */ + Tcl_SaveResult, /* 315 */ + Tcl_SetSystemEncoding, /* 316 */ + Tcl_SetVar2Ex, /* 317 */ + Tcl_ThreadAlert, /* 318 */ + Tcl_ThreadQueueEvent, /* 319 */ + Tcl_UniCharAtIndex, /* 320 */ + Tcl_UniCharToLower, /* 321 */ + Tcl_UniCharToTitle, /* 322 */ + Tcl_UniCharToUpper, /* 323 */ + Tcl_UniCharToUtf, /* 324 */ + Tcl_UtfAtIndex, /* 325 */ + Tcl_UtfCharComplete, /* 326 */ + Tcl_UtfBackslash, /* 327 */ + Tcl_UtfFindFirst, /* 328 */ + Tcl_UtfFindLast, /* 329 */ + Tcl_UtfNext, /* 330 */ + Tcl_UtfPrev, /* 331 */ + Tcl_UtfToExternal, /* 332 */ + Tcl_UtfToExternalDString, /* 333 */ + Tcl_UtfToLower, /* 334 */ + Tcl_UtfToTitle, /* 335 */ + Tcl_UtfToUniChar, /* 336 */ + Tcl_UtfToUpper, /* 337 */ + Tcl_WriteChars, /* 338 */ + Tcl_WriteObj, /* 339 */ + Tcl_GetString, /* 340 */ + Tcl_GetDefaultEncodingDir, /* 341 */ + Tcl_SetDefaultEncodingDir, /* 342 */ + Tcl_AlertNotifier, /* 343 */ + Tcl_ServiceModeHook, /* 344 */ + Tcl_UniCharIsAlnum, /* 345 */ + Tcl_UniCharIsAlpha, /* 346 */ + Tcl_UniCharIsDigit, /* 347 */ + Tcl_UniCharIsLower, /* 348 */ + Tcl_UniCharIsSpace, /* 349 */ + Tcl_UniCharIsUpper, /* 350 */ + Tcl_UniCharIsWordChar, /* 351 */ + Tcl_UniCharLen, /* 352 */ + Tcl_UniCharNcmp, /* 353 */ + Tcl_UniCharToUtfDString, /* 354 */ + Tcl_UtfToUniCharDString, /* 355 */ + Tcl_GetRegExpFromObj, /* 356 */ + Tcl_EvalTokens, /* 357 */ + Tcl_FreeParse, /* 358 */ + Tcl_LogCommandInfo, /* 359 */ + Tcl_ParseBraces, /* 360 */ + Tcl_ParseCommand, /* 361 */ + Tcl_ParseExpr, /* 362 */ + Tcl_ParseQuotedString, /* 363 */ + Tcl_ParseVarName, /* 364 */ + Tcl_GetCwd, /* 365 */ + Tcl_Chdir, /* 366 */ + Tcl_Access, /* 367 */ + Tcl_Stat, /* 368 */ + Tcl_UtfNcmp, /* 369 */ + Tcl_UtfNcasecmp, /* 370 */ + Tcl_StringCaseMatch, /* 371 */ + Tcl_UniCharIsControl, /* 372 */ + Tcl_UniCharIsGraph, /* 373 */ + Tcl_UniCharIsPrint, /* 374 */ + Tcl_UniCharIsPunct, /* 375 */ + Tcl_RegExpExecObj, /* 376 */ + Tcl_RegExpGetInfo, /* 377 */ + Tcl_NewUnicodeObj, /* 378 */ + Tcl_SetUnicodeObj, /* 379 */ + Tcl_GetCharLength, /* 380 */ + Tcl_GetUniChar, /* 381 */ + Tcl_GetUnicode, /* 382 */ + Tcl_GetRange, /* 383 */ + Tcl_AppendUnicodeToObj, /* 384 */ + Tcl_RegExpMatchObj, /* 385 */ + Tcl_SetNotifier, /* 386 */ + Tcl_GetAllocMutex, /* 387 */ + Tcl_GetChannelNames, /* 388 */ + Tcl_GetChannelNamesEx, /* 389 */ + Tcl_ProcObjCmd, /* 390 */ + Tcl_ConditionFinalize, /* 391 */ + Tcl_MutexFinalize, /* 392 */ + Tcl_CreateThread, /* 393 */ + Tcl_ReadRaw, /* 394 */ + Tcl_WriteRaw, /* 395 */ + Tcl_GetTopChannel, /* 396 */ + Tcl_ChannelBuffered, /* 397 */ + Tcl_ChannelName, /* 398 */ + Tcl_ChannelVersion, /* 399 */ + Tcl_ChannelBlockModeProc, /* 400 */ + Tcl_ChannelCloseProc, /* 401 */ + Tcl_ChannelClose2Proc, /* 402 */ + Tcl_ChannelInputProc, /* 403 */ + Tcl_ChannelOutputProc, /* 404 */ + Tcl_ChannelSeekProc, /* 405 */ + Tcl_ChannelSetOptionProc, /* 406 */ + Tcl_ChannelGetOptionProc, /* 407 */ + Tcl_ChannelWatchProc, /* 408 */ + Tcl_ChannelGetHandleProc, /* 409 */ + Tcl_ChannelFlushProc, /* 410 */ + Tcl_ChannelHandlerProc, /* 411 */ + Tcl_JoinThread, /* 412 */ + Tcl_IsChannelShared, /* 413 */ + Tcl_IsChannelRegistered, /* 414 */ + Tcl_CutChannel, /* 415 */ + Tcl_SpliceChannel, /* 416 */ + Tcl_ClearChannelHandlers, /* 417 */ + Tcl_IsChannelExisting, /* 418 */ + Tcl_UniCharNcasecmp, /* 419 */ + Tcl_UniCharCaseMatch, /* 420 */ + Tcl_FindHashEntry, /* 421 */ + Tcl_CreateHashEntry, /* 422 */ + Tcl_InitCustomHashTable, /* 423 */ + Tcl_InitObjHashTable, /* 424 */ + Tcl_CommandTraceInfo, /* 425 */ + Tcl_TraceCommand, /* 426 */ + Tcl_UntraceCommand, /* 427 */ + Tcl_AttemptAlloc, /* 428 */ + Tcl_AttemptDbCkalloc, /* 429 */ + Tcl_AttemptRealloc, /* 430 */ + Tcl_AttemptDbCkrealloc, /* 431 */ + Tcl_AttemptSetObjLength, /* 432 */ + Tcl_GetChannelThread, /* 433 */ + Tcl_GetUnicodeFromObj, /* 434 */ + Tcl_GetMathFuncInfo, /* 435 */ + Tcl_ListMathFuncs, /* 436 */ + Tcl_SubstObj, /* 437 */ + Tcl_DetachChannel, /* 438 */ + Tcl_IsStandardChannel, /* 439 */ + Tcl_FSCopyFile, /* 440 */ + Tcl_FSCopyDirectory, /* 441 */ + Tcl_FSCreateDirectory, /* 442 */ + Tcl_FSDeleteFile, /* 443 */ + Tcl_FSLoadFile, /* 444 */ + Tcl_FSMatchInDirectory, /* 445 */ + Tcl_FSLink, /* 446 */ + Tcl_FSRemoveDirectory, /* 447 */ + Tcl_FSRenameFile, /* 448 */ + Tcl_FSLstat, /* 449 */ + Tcl_FSUtime, /* 450 */ + Tcl_FSFileAttrsGet, /* 451 */ + Tcl_FSFileAttrsSet, /* 452 */ + Tcl_FSFileAttrStrings, /* 453 */ + Tcl_FSStat, /* 454 */ + Tcl_FSAccess, /* 455 */ + Tcl_FSOpenFileChannel, /* 456 */ + Tcl_FSGetCwd, /* 457 */ + Tcl_FSChdir, /* 458 */ + Tcl_FSConvertToPathType, /* 459 */ + Tcl_FSJoinPath, /* 460 */ + Tcl_FSSplitPath, /* 461 */ + Tcl_FSEqualPaths, /* 462 */ + Tcl_FSGetNormalizedPath, /* 463 */ + Tcl_FSJoinToPath, /* 464 */ + Tcl_FSGetInternalRep, /* 465 */ + Tcl_FSGetTranslatedPath, /* 466 */ + Tcl_FSEvalFile, /* 467 */ + Tcl_FSNewNativePath, /* 468 */ + Tcl_FSGetNativePath, /* 469 */ + Tcl_FSFileSystemInfo, /* 470 */ + Tcl_FSPathSeparator, /* 471 */ + Tcl_FSListVolumes, /* 472 */ + Tcl_FSRegister, /* 473 */ + Tcl_FSUnregister, /* 474 */ + Tcl_FSData, /* 475 */ + Tcl_FSGetTranslatedStringPath, /* 476 */ + Tcl_FSGetFileSystemForPath, /* 477 */ + Tcl_FSGetPathType, /* 478 */ + Tcl_OutputBuffered, /* 479 */ + Tcl_FSMountsChanged, /* 480 */ + Tcl_EvalTokensStandard, /* 481 */ + Tcl_GetTime, /* 482 */ + Tcl_CreateObjTrace, /* 483 */ + Tcl_GetCommandInfoFromToken, /* 484 */ + Tcl_SetCommandInfoFromToken, /* 485 */ + Tcl_DbNewWideIntObj, /* 486 */ + Tcl_GetWideIntFromObj, /* 487 */ + Tcl_NewWideIntObj, /* 488 */ + Tcl_SetWideIntObj, /* 489 */ + Tcl_AllocStatBuf, /* 490 */ + Tcl_Seek, /* 491 */ + Tcl_Tell, /* 492 */ + Tcl_ChannelWideSeekProc, /* 493 */ + Tcl_DictObjPut, /* 494 */ + Tcl_DictObjGet, /* 495 */ + Tcl_DictObjRemove, /* 496 */ + Tcl_DictObjSize, /* 497 */ + Tcl_DictObjFirst, /* 498 */ + Tcl_DictObjNext, /* 499 */ + Tcl_DictObjDone, /* 500 */ + Tcl_DictObjPutKeyList, /* 501 */ + Tcl_DictObjRemoveKeyList, /* 502 */ + Tcl_NewDictObj, /* 503 */ + Tcl_DbNewDictObj, /* 504 */ + Tcl_RegisterConfig, /* 505 */ + Tcl_CreateNamespace, /* 506 */ + Tcl_DeleteNamespace, /* 507 */ + Tcl_AppendExportList, /* 508 */ + Tcl_Export, /* 509 */ + Tcl_Import, /* 510 */ + Tcl_ForgetImport, /* 511 */ + Tcl_GetCurrentNamespace, /* 512 */ + Tcl_GetGlobalNamespace, /* 513 */ + Tcl_FindNamespace, /* 514 */ + Tcl_FindCommand, /* 515 */ + Tcl_GetCommandFromObj, /* 516 */ + Tcl_GetCommandFullName, /* 517 */ + Tcl_FSEvalFileEx, /* 518 */ + Tcl_SetExitProc, /* 519 */ + Tcl_LimitAddHandler, /* 520 */ + Tcl_LimitRemoveHandler, /* 521 */ + Tcl_LimitReady, /* 522 */ + Tcl_LimitCheck, /* 523 */ + Tcl_LimitExceeded, /* 524 */ + Tcl_LimitSetCommands, /* 525 */ + Tcl_LimitSetTime, /* 526 */ + Tcl_LimitSetGranularity, /* 527 */ + Tcl_LimitTypeEnabled, /* 528 */ + Tcl_LimitTypeExceeded, /* 529 */ + Tcl_LimitTypeSet, /* 530 */ + Tcl_LimitTypeReset, /* 531 */ + Tcl_LimitGetCommands, /* 532 */ + Tcl_LimitGetTime, /* 533 */ + Tcl_LimitGetGranularity, /* 534 */ + Tcl_SaveInterpState, /* 535 */ + Tcl_RestoreInterpState, /* 536 */ + Tcl_DiscardInterpState, /* 537 */ + Tcl_SetReturnOptions, /* 538 */ + Tcl_GetReturnOptions, /* 539 */ + Tcl_IsEnsemble, /* 540 */ + Tcl_CreateEnsemble, /* 541 */ + Tcl_FindEnsemble, /* 542 */ + Tcl_SetEnsembleSubcommandList, /* 543 */ + Tcl_SetEnsembleMappingDict, /* 544 */ + Tcl_SetEnsembleUnknownHandler, /* 545 */ + Tcl_SetEnsembleFlags, /* 546 */ + Tcl_GetEnsembleSubcommandList, /* 547 */ + Tcl_GetEnsembleMappingDict, /* 548 */ + Tcl_GetEnsembleUnknownHandler, /* 549 */ + Tcl_GetEnsembleFlags, /* 550 */ + Tcl_GetEnsembleNamespace, /* 551 */ + Tcl_SetTimeProc, /* 552 */ + Tcl_QueryTimeProc, /* 553 */ + Tcl_ChannelThreadActionProc, /* 554 */ + Tcl_NewBignumObj, /* 555 */ + Tcl_DbNewBignumObj, /* 556 */ + Tcl_SetBignumObj, /* 557 */ + Tcl_GetBignumFromObj, /* 558 */ + Tcl_TakeBignumFromObj, /* 559 */ + Tcl_TruncateChannel, /* 560 */ + Tcl_ChannelTruncateProc, /* 561 */ + Tcl_SetChannelErrorInterp, /* 562 */ + Tcl_GetChannelErrorInterp, /* 563 */ + Tcl_SetChannelError, /* 564 */ + Tcl_GetChannelError, /* 565 */ + Tcl_InitBignumFromDouble, /* 566 */ + Tcl_GetNamespaceUnknownHandler, /* 567 */ + Tcl_SetNamespaceUnknownHandler, /* 568 */ + Tcl_GetEncodingFromObj, /* 569 */ + Tcl_GetEncodingSearchPath, /* 570 */ + Tcl_SetEncodingSearchPath, /* 571 */ + Tcl_GetEncodingNameFromEnvironment, /* 572 */ + Tcl_PkgRequireProc, /* 573 */ + Tcl_AppendObjToErrorInfo, /* 574 */ + Tcl_AppendLimitedToObj, /* 575 */ + Tcl_Format, /* 576 */ + Tcl_AppendFormatToObj, /* 577 */ + Tcl_ObjPrintf, /* 578 */ + Tcl_AppendPrintfToObj, /* 579 */ + Tcl_CancelEval, /* 580 */ + Tcl_Canceled, /* 581 */ + Tcl_NRCreateCommand, /* 582 */ + Tcl_NREvalObj, /* 583 */ + Tcl_NREvalObjv, /* 584 */ + Tcl_NRCmdSwap, /* 585 */ + Tcl_NRAddCallback, /* 586 */ + Tcl_NRCallObjProc, /* 587 */ + Tcl_CreatePipe, /* 588 */ +}; + +/* !END!: Do not edit above this line. */ + +/* + * Module-scope pointers to the main static stubs tables, used for package + * initialization via Tcl_PkgProvideEx(). + */ + +MODULE_SCOPE const TclStubs * const tclConstStubsPtr; +MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; + +const TclStubs * const tclConstStubsPtr = &tclStubs; +const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 13b1936..9ebd73a 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -1,785 +1,785 @@ -/* - *---------------------------------------------------------------------- - * - * tclTomMathDecls.h -- - * - * This file contains the declarations for the 'libtommath' - * functions that are exported by the Tcl library. - * - * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.5 2008/04/08 14:54:53 das Exp $ - */ - -#ifndef _TCLTOMMATHDECLS -#define _TCLTOMMATHDECLS - -#include "tcl.h" - -/* - * Define the version of the Stubs table that's exported for tommath - */ - -#define TCLTOMMATH_EPOCH 0 -#define TCLTOMMATH_REVISION 0 - -#define Tcl_TomMath_InitStubs(interp,version) \ - (TclTomMathInitializeStubs((interp),(version),\ - TCLTOMMATH_EPOCH,TCLTOMMATH_REVISION)) - -/* Define custom memory allocation for libtommath */ - -/* MODULE_SCOPE void* TclBNAlloc( size_t ); */ -#define TclBNAlloc(s) ((void*)ckalloc((size_t)(s))) -/* MODULE_SCOPE void* TclBNRealloc( void*, size_t ); */ -#define TclBNRealloc(x,s) ((void*)ckrealloc((char*)(x),(size_t)(s))) -/* MODULE_SCOPE void TclBNFree( void* ); */ -#define TclBNFree(x) (ckfree((char*)(x))) -/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */ -/* unused - no macro */ - -#define XMALLOC(x) TclBNAlloc(x) -#define XFREE(x) TclBNFree(x) -#define XREALLOC(x,n) TclBNRealloc(x,n) -#define XCALLOC(n,x) TclBNCalloc(n,x) - -/* Rename the global symbols in libtommath to avoid linkage conflicts */ - -#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff -#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff -#define TOOM_MUL_CUTOFF TclBNToomMulCutoff -#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff - -#define bn_reverse TclBN_reverse -#define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs -#define fast_s_mp_sqr TclBN_fast_s_mp_sqr -#define mp_add TclBN_mp_add -#define mp_add_d TclBN_mp_add_d -#define mp_and TclBN_mp_and -#define mp_clamp TclBN_mp_clamp -#define mp_clear TclBN_mp_clear -#define mp_clear_multi TclBN_mp_clear_multi -#define mp_cmp TclBN_mp_cmp -#define mp_cmp_d TclBN_mp_cmp_d -#define mp_cmp_mag TclBN_mp_cmp_mag -#define mp_copy TclBN_mp_copy -#define mp_count_bits TclBN_mp_count_bits -#define mp_div TclBN_mp_div -#define mp_div_2 TclBN_mp_div_2 -#define mp_div_2d TclBN_mp_div_2d -#define mp_div_3 TclBN_mp_div_3 -#define mp_div_d TclBN_mp_div_d -#define mp_exch TclBN_mp_exch -#define mp_expt_d TclBN_mp_expt_d -#define mp_grow TclBN_mp_grow -#define mp_init TclBN_mp_init -#define mp_init_copy TclBN_mp_init_copy -#define mp_init_multi TclBN_mp_init_multi -#define mp_init_set TclBN_mp_init_set -#define mp_init_size TclBN_mp_init_size -#define mp_karatsuba_mul TclBN_mp_karatsuba_mul -#define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr -#define mp_lshd TclBN_mp_lshd -#define mp_mod TclBN_mp_mod -#define mp_mod_2d TclBN_mp_mod_2d -#define mp_mul TclBN_mp_mul -#define mp_mul_2 TclBN_mp_mul_2 -#define mp_mul_2d TclBN_mp_mul_2d -#define mp_mul_d TclBN_mp_mul_d -#define mp_neg TclBN_mp_neg -#define mp_or TclBN_mp_or -#define mp_radix_size TclBN_mp_radix_size -#define mp_read_radix TclBN_mp_read_radix -#define mp_rshd TclBN_mp_rshd -#define mp_s_rmap TclBNMpSRmap -#define mp_set TclBN_mp_set -#define mp_shrink TclBN_mp_shrink -#define mp_sqr TclBN_mp_sqr -#define mp_sqrt TclBN_mp_sqrt -#define mp_sub TclBN_mp_sub -#define mp_sub_d TclBN_mp_sub_d -#define mp_to_unsigned_bin TclBN_mp_to_unsigned_bin -#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n -#define mp_toom_mul TclBN_mp_toom_mul -#define mp_toom_sqr TclBN_mp_toom_sqr -#define mp_toradix_n TclBN_mp_toradix_n -#define mp_unsigned_bin_size TclBN_mp_unsigned_bin_size -#define mp_xor TclBN_mp_xor -#define mp_zero TclBN_mp_zero -#define s_mp_add TclBN_s_mp_add -#define s_mp_mul_digs TclBN_s_mp_mul_digs -#define s_mp_sqr TclBN_s_mp_sqr -#define s_mp_sub TclBN_s_mp_sub - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclInt.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef TclBN_epoch_TCL_DECLARED -#define TclBN_epoch_TCL_DECLARED -/* 0 */ -EXTERN int TclBN_epoch (void); -#endif -#ifndef TclBN_revision_TCL_DECLARED -#define TclBN_revision_TCL_DECLARED -/* 1 */ -EXTERN int TclBN_revision (void); -#endif -#ifndef TclBN_mp_add_TCL_DECLARED -#define TclBN_mp_add_TCL_DECLARED -/* 2 */ -EXTERN int TclBN_mp_add (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_add_d_TCL_DECLARED -#define TclBN_mp_add_d_TCL_DECLARED -/* 3 */ -EXTERN int TclBN_mp_add_d (mp_int* a, mp_digit b, mp_int* c); -#endif -#ifndef TclBN_mp_and_TCL_DECLARED -#define TclBN_mp_and_TCL_DECLARED -/* 4 */ -EXTERN int TclBN_mp_and (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_clamp_TCL_DECLARED -#define TclBN_mp_clamp_TCL_DECLARED -/* 5 */ -EXTERN void TclBN_mp_clamp (mp_int* a); -#endif -#ifndef TclBN_mp_clear_TCL_DECLARED -#define TclBN_mp_clear_TCL_DECLARED -/* 6 */ -EXTERN void TclBN_mp_clear (mp_int* a); -#endif -#ifndef TclBN_mp_clear_multi_TCL_DECLARED -#define TclBN_mp_clear_multi_TCL_DECLARED -/* 7 */ -EXTERN void TclBN_mp_clear_multi (mp_int* a, ...); -#endif -#ifndef TclBN_mp_cmp_TCL_DECLARED -#define TclBN_mp_cmp_TCL_DECLARED -/* 8 */ -EXTERN int TclBN_mp_cmp (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_cmp_d_TCL_DECLARED -#define TclBN_mp_cmp_d_TCL_DECLARED -/* 9 */ -EXTERN int TclBN_mp_cmp_d (mp_int* a, mp_digit b); -#endif -#ifndef TclBN_mp_cmp_mag_TCL_DECLARED -#define TclBN_mp_cmp_mag_TCL_DECLARED -/* 10 */ -EXTERN int TclBN_mp_cmp_mag (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_copy_TCL_DECLARED -#define TclBN_mp_copy_TCL_DECLARED -/* 11 */ -EXTERN int TclBN_mp_copy (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_count_bits_TCL_DECLARED -#define TclBN_mp_count_bits_TCL_DECLARED -/* 12 */ -EXTERN int TclBN_mp_count_bits (mp_int* a); -#endif -#ifndef TclBN_mp_div_TCL_DECLARED -#define TclBN_mp_div_TCL_DECLARED -/* 13 */ -EXTERN int TclBN_mp_div (mp_int* a, mp_int* b, mp_int* q, - mp_int* r); -#endif -#ifndef TclBN_mp_div_d_TCL_DECLARED -#define TclBN_mp_div_d_TCL_DECLARED -/* 14 */ -EXTERN int TclBN_mp_div_d (mp_int* a, mp_digit b, mp_int* q, - mp_digit* r); -#endif -#ifndef TclBN_mp_div_2_TCL_DECLARED -#define TclBN_mp_div_2_TCL_DECLARED -/* 15 */ -EXTERN int TclBN_mp_div_2 (mp_int* a, mp_int* q); -#endif -#ifndef TclBN_mp_div_2d_TCL_DECLARED -#define TclBN_mp_div_2d_TCL_DECLARED -/* 16 */ -EXTERN int TclBN_mp_div_2d (mp_int* a, int b, mp_int* q, - mp_int* r); -#endif -#ifndef TclBN_mp_div_3_TCL_DECLARED -#define TclBN_mp_div_3_TCL_DECLARED -/* 17 */ -EXTERN int TclBN_mp_div_3 (mp_int* a, mp_int* q, mp_digit* r); -#endif -#ifndef TclBN_mp_exch_TCL_DECLARED -#define TclBN_mp_exch_TCL_DECLARED -/* 18 */ -EXTERN void TclBN_mp_exch (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_expt_d_TCL_DECLARED -#define TclBN_mp_expt_d_TCL_DECLARED -/* 19 */ -EXTERN int TclBN_mp_expt_d (mp_int* a, mp_digit b, mp_int* c); -#endif -#ifndef TclBN_mp_grow_TCL_DECLARED -#define TclBN_mp_grow_TCL_DECLARED -/* 20 */ -EXTERN int TclBN_mp_grow (mp_int* a, int size); -#endif -#ifndef TclBN_mp_init_TCL_DECLARED -#define TclBN_mp_init_TCL_DECLARED -/* 21 */ -EXTERN int TclBN_mp_init (mp_int* a); -#endif -#ifndef TclBN_mp_init_copy_TCL_DECLARED -#define TclBN_mp_init_copy_TCL_DECLARED -/* 22 */ -EXTERN int TclBN_mp_init_copy (mp_int * a, mp_int* b); -#endif -#ifndef TclBN_mp_init_multi_TCL_DECLARED -#define TclBN_mp_init_multi_TCL_DECLARED -/* 23 */ -EXTERN int TclBN_mp_init_multi (mp_int* a, ...); -#endif -#ifndef TclBN_mp_init_set_TCL_DECLARED -#define TclBN_mp_init_set_TCL_DECLARED -/* 24 */ -EXTERN int TclBN_mp_init_set (mp_int* a, mp_digit b); -#endif -#ifndef TclBN_mp_init_size_TCL_DECLARED -#define TclBN_mp_init_size_TCL_DECLARED -/* 25 */ -EXTERN int TclBN_mp_init_size (mp_int* a, int size); -#endif -#ifndef TclBN_mp_lshd_TCL_DECLARED -#define TclBN_mp_lshd_TCL_DECLARED -/* 26 */ -EXTERN int TclBN_mp_lshd (mp_int* a, int shift); -#endif -#ifndef TclBN_mp_mod_TCL_DECLARED -#define TclBN_mp_mod_TCL_DECLARED -/* 27 */ -EXTERN int TclBN_mp_mod (mp_int* a, mp_int* b, mp_int* r); -#endif -#ifndef TclBN_mp_mod_2d_TCL_DECLARED -#define TclBN_mp_mod_2d_TCL_DECLARED -/* 28 */ -EXTERN int TclBN_mp_mod_2d (mp_int* a, int b, mp_int* r); -#endif -#ifndef TclBN_mp_mul_TCL_DECLARED -#define TclBN_mp_mul_TCL_DECLARED -/* 29 */ -EXTERN int TclBN_mp_mul (mp_int* a, mp_int* b, mp_int* p); -#endif -#ifndef TclBN_mp_mul_d_TCL_DECLARED -#define TclBN_mp_mul_d_TCL_DECLARED -/* 30 */ -EXTERN int TclBN_mp_mul_d (mp_int* a, mp_digit b, mp_int* p); -#endif -#ifndef TclBN_mp_mul_2_TCL_DECLARED -#define TclBN_mp_mul_2_TCL_DECLARED -/* 31 */ -EXTERN int TclBN_mp_mul_2 (mp_int* a, mp_int* p); -#endif -#ifndef TclBN_mp_mul_2d_TCL_DECLARED -#define TclBN_mp_mul_2d_TCL_DECLARED -/* 32 */ -EXTERN int TclBN_mp_mul_2d (mp_int* a, int d, mp_int* p); -#endif -#ifndef TclBN_mp_neg_TCL_DECLARED -#define TclBN_mp_neg_TCL_DECLARED -/* 33 */ -EXTERN int TclBN_mp_neg (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_or_TCL_DECLARED -#define TclBN_mp_or_TCL_DECLARED -/* 34 */ -EXTERN int TclBN_mp_or (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_radix_size_TCL_DECLARED -#define TclBN_mp_radix_size_TCL_DECLARED -/* 35 */ -EXTERN int TclBN_mp_radix_size (mp_int* a, int radix, int* size); -#endif -#ifndef TclBN_mp_read_radix_TCL_DECLARED -#define TclBN_mp_read_radix_TCL_DECLARED -/* 36 */ -EXTERN int TclBN_mp_read_radix (mp_int* a, const char* str, - int radix); -#endif -#ifndef TclBN_mp_rshd_TCL_DECLARED -#define TclBN_mp_rshd_TCL_DECLARED -/* 37 */ -EXTERN void TclBN_mp_rshd (mp_int * a, int shift); -#endif -#ifndef TclBN_mp_shrink_TCL_DECLARED -#define TclBN_mp_shrink_TCL_DECLARED -/* 38 */ -EXTERN int TclBN_mp_shrink (mp_int* a); -#endif -#ifndef TclBN_mp_set_TCL_DECLARED -#define TclBN_mp_set_TCL_DECLARED -/* 39 */ -EXTERN void TclBN_mp_set (mp_int* a, mp_digit b); -#endif -#ifndef TclBN_mp_sqr_TCL_DECLARED -#define TclBN_mp_sqr_TCL_DECLARED -/* 40 */ -EXTERN int TclBN_mp_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_sqrt_TCL_DECLARED -#define TclBN_mp_sqrt_TCL_DECLARED -/* 41 */ -EXTERN int TclBN_mp_sqrt (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_sub_TCL_DECLARED -#define TclBN_mp_sub_TCL_DECLARED -/* 42 */ -EXTERN int TclBN_mp_sub (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_sub_d_TCL_DECLARED -#define TclBN_mp_sub_d_TCL_DECLARED -/* 43 */ -EXTERN int TclBN_mp_sub_d (mp_int* a, mp_digit b, mp_int* c); -#endif -#ifndef TclBN_mp_to_unsigned_bin_TCL_DECLARED -#define TclBN_mp_to_unsigned_bin_TCL_DECLARED -/* 44 */ -EXTERN int TclBN_mp_to_unsigned_bin (mp_int* a, - unsigned char* b); -#endif -#ifndef TclBN_mp_to_unsigned_bin_n_TCL_DECLARED -#define TclBN_mp_to_unsigned_bin_n_TCL_DECLARED -/* 45 */ -EXTERN int TclBN_mp_to_unsigned_bin_n (mp_int* a, - unsigned char* b, unsigned long* outlen); -#endif -#ifndef TclBN_mp_toradix_n_TCL_DECLARED -#define TclBN_mp_toradix_n_TCL_DECLARED -/* 46 */ -EXTERN int TclBN_mp_toradix_n (mp_int* a, char* str, int radix, - int maxlen); -#endif -#ifndef TclBN_mp_unsigned_bin_size_TCL_DECLARED -#define TclBN_mp_unsigned_bin_size_TCL_DECLARED -/* 47 */ -EXTERN int TclBN_mp_unsigned_bin_size (mp_int* a); -#endif -#ifndef TclBN_mp_xor_TCL_DECLARED -#define TclBN_mp_xor_TCL_DECLARED -/* 48 */ -EXTERN int TclBN_mp_xor (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_zero_TCL_DECLARED -#define TclBN_mp_zero_TCL_DECLARED -/* 49 */ -EXTERN void TclBN_mp_zero (mp_int* a); -#endif -#ifndef TclBN_reverse_TCL_DECLARED -#define TclBN_reverse_TCL_DECLARED -/* 50 */ -EXTERN void TclBN_reverse (unsigned char* s, int len); -#endif -#ifndef TclBN_fast_s_mp_mul_digs_TCL_DECLARED -#define TclBN_fast_s_mp_mul_digs_TCL_DECLARED -/* 51 */ -EXTERN int TclBN_fast_s_mp_mul_digs (mp_int * a, mp_int * b, - mp_int * c, int digs); -#endif -#ifndef TclBN_fast_s_mp_sqr_TCL_DECLARED -#define TclBN_fast_s_mp_sqr_TCL_DECLARED -/* 52 */ -EXTERN int TclBN_fast_s_mp_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_karatsuba_mul_TCL_DECLARED -#define TclBN_mp_karatsuba_mul_TCL_DECLARED -/* 53 */ -EXTERN int TclBN_mp_karatsuba_mul (mp_int* a, mp_int* b, - mp_int* c); -#endif -#ifndef TclBN_mp_karatsuba_sqr_TCL_DECLARED -#define TclBN_mp_karatsuba_sqr_TCL_DECLARED -/* 54 */ -EXTERN int TclBN_mp_karatsuba_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_toom_mul_TCL_DECLARED -#define TclBN_mp_toom_mul_TCL_DECLARED -/* 55 */ -EXTERN int TclBN_mp_toom_mul (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_toom_sqr_TCL_DECLARED -#define TclBN_mp_toom_sqr_TCL_DECLARED -/* 56 */ -EXTERN int TclBN_mp_toom_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_s_mp_add_TCL_DECLARED -#define TclBN_s_mp_add_TCL_DECLARED -/* 57 */ -EXTERN int TclBN_s_mp_add (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_s_mp_mul_digs_TCL_DECLARED -#define TclBN_s_mp_mul_digs_TCL_DECLARED -/* 58 */ -EXTERN int TclBN_s_mp_mul_digs (mp_int* a, mp_int* b, mp_int* c, - int digs); -#endif -#ifndef TclBN_s_mp_sqr_TCL_DECLARED -#define TclBN_s_mp_sqr_TCL_DECLARED -/* 59 */ -EXTERN int TclBN_s_mp_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_s_mp_sub_TCL_DECLARED -#define TclBN_s_mp_sub_TCL_DECLARED -/* 60 */ -EXTERN int TclBN_s_mp_sub (mp_int* a, mp_int* b, mp_int* c); -#endif - -typedef struct TclTomMathStubs { - int magic; - CONST struct TclTomMathStubHooks *hooks; - - int (*tclBN_epoch) (void); /* 0 */ - int (*tclBN_revision) (void); /* 1 */ - int (*tclBN_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 2 */ - int (*tclBN_mp_add_d) (mp_int* a, mp_digit b, mp_int* c); /* 3 */ - int (*tclBN_mp_and) (mp_int* a, mp_int* b, mp_int* c); /* 4 */ - void (*tclBN_mp_clamp) (mp_int* a); /* 5 */ - void (*tclBN_mp_clear) (mp_int* a); /* 6 */ - void (*tclBN_mp_clear_multi) (mp_int* a, ...); /* 7 */ - int (*tclBN_mp_cmp) (mp_int* a, mp_int* b); /* 8 */ - int (*tclBN_mp_cmp_d) (mp_int* a, mp_digit b); /* 9 */ - int (*tclBN_mp_cmp_mag) (mp_int* a, mp_int* b); /* 10 */ - int (*tclBN_mp_copy) (mp_int* a, mp_int* b); /* 11 */ - int (*tclBN_mp_count_bits) (mp_int* a); /* 12 */ - int (*tclBN_mp_div) (mp_int* a, mp_int* b, mp_int* q, mp_int* r); /* 13 */ - int (*tclBN_mp_div_d) (mp_int* a, mp_digit b, mp_int* q, mp_digit* r); /* 14 */ - int (*tclBN_mp_div_2) (mp_int* a, mp_int* q); /* 15 */ - int (*tclBN_mp_div_2d) (mp_int* a, int b, mp_int* q, mp_int* r); /* 16 */ - int (*tclBN_mp_div_3) (mp_int* a, mp_int* q, mp_digit* r); /* 17 */ - void (*tclBN_mp_exch) (mp_int* a, mp_int* b); /* 18 */ - int (*tclBN_mp_expt_d) (mp_int* a, mp_digit b, mp_int* c); /* 19 */ - int (*tclBN_mp_grow) (mp_int* a, int size); /* 20 */ - int (*tclBN_mp_init) (mp_int* a); /* 21 */ - int (*tclBN_mp_init_copy) (mp_int * a, mp_int* b); /* 22 */ - int (*tclBN_mp_init_multi) (mp_int* a, ...); /* 23 */ - int (*tclBN_mp_init_set) (mp_int* a, mp_digit b); /* 24 */ - int (*tclBN_mp_init_size) (mp_int* a, int size); /* 25 */ - int (*tclBN_mp_lshd) (mp_int* a, int shift); /* 26 */ - int (*tclBN_mp_mod) (mp_int* a, mp_int* b, mp_int* r); /* 27 */ - int (*tclBN_mp_mod_2d) (mp_int* a, int b, mp_int* r); /* 28 */ - int (*tclBN_mp_mul) (mp_int* a, mp_int* b, mp_int* p); /* 29 */ - int (*tclBN_mp_mul_d) (mp_int* a, mp_digit b, mp_int* p); /* 30 */ - int (*tclBN_mp_mul_2) (mp_int* a, mp_int* p); /* 31 */ - int (*tclBN_mp_mul_2d) (mp_int* a, int d, mp_int* p); /* 32 */ - int (*tclBN_mp_neg) (mp_int* a, mp_int* b); /* 33 */ - int (*tclBN_mp_or) (mp_int* a, mp_int* b, mp_int* c); /* 34 */ - int (*tclBN_mp_radix_size) (mp_int* a, int radix, int* size); /* 35 */ - int (*tclBN_mp_read_radix) (mp_int* a, const char* str, int radix); /* 36 */ - void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ - int (*tclBN_mp_shrink) (mp_int* a); /* 38 */ - void (*tclBN_mp_set) (mp_int* a, mp_digit b); /* 39 */ - int (*tclBN_mp_sqr) (mp_int* a, mp_int* b); /* 40 */ - int (*tclBN_mp_sqrt) (mp_int* a, mp_int* b); /* 41 */ - int (*tclBN_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 42 */ - int (*tclBN_mp_sub_d) (mp_int* a, mp_digit b, mp_int* c); /* 43 */ - int (*tclBN_mp_to_unsigned_bin) (mp_int* a, unsigned char* b); /* 44 */ - int (*tclBN_mp_to_unsigned_bin_n) (mp_int* a, unsigned char* b, unsigned long* outlen); /* 45 */ - int (*tclBN_mp_toradix_n) (mp_int* a, char* str, int radix, int maxlen); /* 46 */ - int (*tclBN_mp_unsigned_bin_size) (mp_int* a); /* 47 */ - int (*tclBN_mp_xor) (mp_int* a, mp_int* b, mp_int* c); /* 48 */ - void (*tclBN_mp_zero) (mp_int* a); /* 49 */ - void (*tclBN_reverse) (unsigned char* s, int len); /* 50 */ - int (*tclBN_fast_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 51 */ - int (*tclBN_fast_s_mp_sqr) (mp_int* a, mp_int* b); /* 52 */ - int (*tclBN_mp_karatsuba_mul) (mp_int* a, mp_int* b, mp_int* c); /* 53 */ - int (*tclBN_mp_karatsuba_sqr) (mp_int* a, mp_int* b); /* 54 */ - int (*tclBN_mp_toom_mul) (mp_int* a, mp_int* b, mp_int* c); /* 55 */ - int (*tclBN_mp_toom_sqr) (mp_int* a, mp_int* b); /* 56 */ - int (*tclBN_s_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 57 */ - int (*tclBN_s_mp_mul_digs) (mp_int* a, mp_int* b, mp_int* c, int digs); /* 58 */ - int (*tclBN_s_mp_sqr) (mp_int* a, mp_int* b); /* 59 */ - int (*tclBN_s_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 60 */ -} TclTomMathStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclTomMathStubs *tclTomMathStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef TclBN_epoch -#define TclBN_epoch \ - (tclTomMathStubsPtr->tclBN_epoch) /* 0 */ -#endif -#ifndef TclBN_revision -#define TclBN_revision \ - (tclTomMathStubsPtr->tclBN_revision) /* 1 */ -#endif -#ifndef TclBN_mp_add -#define TclBN_mp_add \ - (tclTomMathStubsPtr->tclBN_mp_add) /* 2 */ -#endif -#ifndef TclBN_mp_add_d -#define TclBN_mp_add_d \ - (tclTomMathStubsPtr->tclBN_mp_add_d) /* 3 */ -#endif -#ifndef TclBN_mp_and -#define TclBN_mp_and \ - (tclTomMathStubsPtr->tclBN_mp_and) /* 4 */ -#endif -#ifndef TclBN_mp_clamp -#define TclBN_mp_clamp \ - (tclTomMathStubsPtr->tclBN_mp_clamp) /* 5 */ -#endif -#ifndef TclBN_mp_clear -#define TclBN_mp_clear \ - (tclTomMathStubsPtr->tclBN_mp_clear) /* 6 */ -#endif -#ifndef TclBN_mp_clear_multi -#define TclBN_mp_clear_multi \ - (tclTomMathStubsPtr->tclBN_mp_clear_multi) /* 7 */ -#endif -#ifndef TclBN_mp_cmp -#define TclBN_mp_cmp \ - (tclTomMathStubsPtr->tclBN_mp_cmp) /* 8 */ -#endif -#ifndef TclBN_mp_cmp_d -#define TclBN_mp_cmp_d \ - (tclTomMathStubsPtr->tclBN_mp_cmp_d) /* 9 */ -#endif -#ifndef TclBN_mp_cmp_mag -#define TclBN_mp_cmp_mag \ - (tclTomMathStubsPtr->tclBN_mp_cmp_mag) /* 10 */ -#endif -#ifndef TclBN_mp_copy -#define TclBN_mp_copy \ - (tclTomMathStubsPtr->tclBN_mp_copy) /* 11 */ -#endif -#ifndef TclBN_mp_count_bits -#define TclBN_mp_count_bits \ - (tclTomMathStubsPtr->tclBN_mp_count_bits) /* 12 */ -#endif -#ifndef TclBN_mp_div -#define TclBN_mp_div \ - (tclTomMathStubsPtr->tclBN_mp_div) /* 13 */ -#endif -#ifndef TclBN_mp_div_d -#define TclBN_mp_div_d \ - (tclTomMathStubsPtr->tclBN_mp_div_d) /* 14 */ -#endif -#ifndef TclBN_mp_div_2 -#define TclBN_mp_div_2 \ - (tclTomMathStubsPtr->tclBN_mp_div_2) /* 15 */ -#endif -#ifndef TclBN_mp_div_2d -#define TclBN_mp_div_2d \ - (tclTomMathStubsPtr->tclBN_mp_div_2d) /* 16 */ -#endif -#ifndef TclBN_mp_div_3 -#define TclBN_mp_div_3 \ - (tclTomMathStubsPtr->tclBN_mp_div_3) /* 17 */ -#endif -#ifndef TclBN_mp_exch -#define TclBN_mp_exch \ - (tclTomMathStubsPtr->tclBN_mp_exch) /* 18 */ -#endif -#ifndef TclBN_mp_expt_d -#define TclBN_mp_expt_d \ - (tclTomMathStubsPtr->tclBN_mp_expt_d) /* 19 */ -#endif -#ifndef TclBN_mp_grow -#define TclBN_mp_grow \ - (tclTomMathStubsPtr->tclBN_mp_grow) /* 20 */ -#endif -#ifndef TclBN_mp_init -#define TclBN_mp_init \ - (tclTomMathStubsPtr->tclBN_mp_init) /* 21 */ -#endif -#ifndef TclBN_mp_init_copy -#define TclBN_mp_init_copy \ - (tclTomMathStubsPtr->tclBN_mp_init_copy) /* 22 */ -#endif -#ifndef TclBN_mp_init_multi -#define TclBN_mp_init_multi \ - (tclTomMathStubsPtr->tclBN_mp_init_multi) /* 23 */ -#endif -#ifndef TclBN_mp_init_set -#define TclBN_mp_init_set \ - (tclTomMathStubsPtr->tclBN_mp_init_set) /* 24 */ -#endif -#ifndef TclBN_mp_init_size -#define TclBN_mp_init_size \ - (tclTomMathStubsPtr->tclBN_mp_init_size) /* 25 */ -#endif -#ifndef TclBN_mp_lshd -#define TclBN_mp_lshd \ - (tclTomMathStubsPtr->tclBN_mp_lshd) /* 26 */ -#endif -#ifndef TclBN_mp_mod -#define TclBN_mp_mod \ - (tclTomMathStubsPtr->tclBN_mp_mod) /* 27 */ -#endif -#ifndef TclBN_mp_mod_2d -#define TclBN_mp_mod_2d \ - (tclTomMathStubsPtr->tclBN_mp_mod_2d) /* 28 */ -#endif -#ifndef TclBN_mp_mul -#define TclBN_mp_mul \ - (tclTomMathStubsPtr->tclBN_mp_mul) /* 29 */ -#endif -#ifndef TclBN_mp_mul_d -#define TclBN_mp_mul_d \ - (tclTomMathStubsPtr->tclBN_mp_mul_d) /* 30 */ -#endif -#ifndef TclBN_mp_mul_2 -#define TclBN_mp_mul_2 \ - (tclTomMathStubsPtr->tclBN_mp_mul_2) /* 31 */ -#endif -#ifndef TclBN_mp_mul_2d -#define TclBN_mp_mul_2d \ - (tclTomMathStubsPtr->tclBN_mp_mul_2d) /* 32 */ -#endif -#ifndef TclBN_mp_neg -#define TclBN_mp_neg \ - (tclTomMathStubsPtr->tclBN_mp_neg) /* 33 */ -#endif -#ifndef TclBN_mp_or -#define TclBN_mp_or \ - (tclTomMathStubsPtr->tclBN_mp_or) /* 34 */ -#endif -#ifndef TclBN_mp_radix_size -#define TclBN_mp_radix_size \ - (tclTomMathStubsPtr->tclBN_mp_radix_size) /* 35 */ -#endif -#ifndef TclBN_mp_read_radix -#define TclBN_mp_read_radix \ - (tclTomMathStubsPtr->tclBN_mp_read_radix) /* 36 */ -#endif -#ifndef TclBN_mp_rshd -#define TclBN_mp_rshd \ - (tclTomMathStubsPtr->tclBN_mp_rshd) /* 37 */ -#endif -#ifndef TclBN_mp_shrink -#define TclBN_mp_shrink \ - (tclTomMathStubsPtr->tclBN_mp_shrink) /* 38 */ -#endif -#ifndef TclBN_mp_set -#define TclBN_mp_set \ - (tclTomMathStubsPtr->tclBN_mp_set) /* 39 */ -#endif -#ifndef TclBN_mp_sqr -#define TclBN_mp_sqr \ - (tclTomMathStubsPtr->tclBN_mp_sqr) /* 40 */ -#endif -#ifndef TclBN_mp_sqrt -#define TclBN_mp_sqrt \ - (tclTomMathStubsPtr->tclBN_mp_sqrt) /* 41 */ -#endif -#ifndef TclBN_mp_sub -#define TclBN_mp_sub \ - (tclTomMathStubsPtr->tclBN_mp_sub) /* 42 */ -#endif -#ifndef TclBN_mp_sub_d -#define TclBN_mp_sub_d \ - (tclTomMathStubsPtr->tclBN_mp_sub_d) /* 43 */ -#endif -#ifndef TclBN_mp_to_unsigned_bin -#define TclBN_mp_to_unsigned_bin \ - (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin) /* 44 */ -#endif -#ifndef TclBN_mp_to_unsigned_bin_n -#define TclBN_mp_to_unsigned_bin_n \ - (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin_n) /* 45 */ -#endif -#ifndef TclBN_mp_toradix_n -#define TclBN_mp_toradix_n \ - (tclTomMathStubsPtr->tclBN_mp_toradix_n) /* 46 */ -#endif -#ifndef TclBN_mp_unsigned_bin_size -#define TclBN_mp_unsigned_bin_size \ - (tclTomMathStubsPtr->tclBN_mp_unsigned_bin_size) /* 47 */ -#endif -#ifndef TclBN_mp_xor -#define TclBN_mp_xor \ - (tclTomMathStubsPtr->tclBN_mp_xor) /* 48 */ -#endif -#ifndef TclBN_mp_zero -#define TclBN_mp_zero \ - (tclTomMathStubsPtr->tclBN_mp_zero) /* 49 */ -#endif -#ifndef TclBN_reverse -#define TclBN_reverse \ - (tclTomMathStubsPtr->tclBN_reverse) /* 50 */ -#endif -#ifndef TclBN_fast_s_mp_mul_digs -#define TclBN_fast_s_mp_mul_digs \ - (tclTomMathStubsPtr->tclBN_fast_s_mp_mul_digs) /* 51 */ -#endif -#ifndef TclBN_fast_s_mp_sqr -#define TclBN_fast_s_mp_sqr \ - (tclTomMathStubsPtr->tclBN_fast_s_mp_sqr) /* 52 */ -#endif -#ifndef TclBN_mp_karatsuba_mul -#define TclBN_mp_karatsuba_mul \ - (tclTomMathStubsPtr->tclBN_mp_karatsuba_mul) /* 53 */ -#endif -#ifndef TclBN_mp_karatsuba_sqr -#define TclBN_mp_karatsuba_sqr \ - (tclTomMathStubsPtr->tclBN_mp_karatsuba_sqr) /* 54 */ -#endif -#ifndef TclBN_mp_toom_mul -#define TclBN_mp_toom_mul \ - (tclTomMathStubsPtr->tclBN_mp_toom_mul) /* 55 */ -#endif -#ifndef TclBN_mp_toom_sqr -#define TclBN_mp_toom_sqr \ - (tclTomMathStubsPtr->tclBN_mp_toom_sqr) /* 56 */ -#endif -#ifndef TclBN_s_mp_add -#define TclBN_s_mp_add \ - (tclTomMathStubsPtr->tclBN_s_mp_add) /* 57 */ -#endif -#ifndef TclBN_s_mp_mul_digs -#define TclBN_s_mp_mul_digs \ - (tclTomMathStubsPtr->tclBN_s_mp_mul_digs) /* 58 */ -#endif -#ifndef TclBN_s_mp_sqr -#define TclBN_s_mp_sqr \ - (tclTomMathStubsPtr->tclBN_s_mp_sqr) /* 59 */ -#endif -#ifndef TclBN_s_mp_sub -#define TclBN_s_mp_sub \ - (tclTomMathStubsPtr->tclBN_s_mp_sub) /* 60 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLINTDECLS */ +/* + *---------------------------------------------------------------------- + * + * tclTomMathDecls.h -- + * + * This file contains the declarations for the 'libtommath' + * functions that are exported by the Tcl library. + * + * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.6 2008/07/21 21:02:18 ferrieux Exp $ + */ + +#ifndef _TCLTOMMATHDECLS +#define _TCLTOMMATHDECLS + +#include "tcl.h" + +/* + * Define the version of the Stubs table that's exported for tommath + */ + +#define TCLTOMMATH_EPOCH 0 +#define TCLTOMMATH_REVISION 0 + +#define Tcl_TomMath_InitStubs(interp,version) \ + (TclTomMathInitializeStubs((interp),(version),\ + TCLTOMMATH_EPOCH,TCLTOMMATH_REVISION)) + +/* Define custom memory allocation for libtommath */ + +/* MODULE_SCOPE void* TclBNAlloc( size_t ); */ +#define TclBNAlloc(s) ((void*)ckalloc((size_t)(s))) +/* MODULE_SCOPE void* TclBNRealloc( void*, size_t ); */ +#define TclBNRealloc(x,s) ((void*)ckrealloc((char*)(x),(size_t)(s))) +/* MODULE_SCOPE void TclBNFree( void* ); */ +#define TclBNFree(x) (ckfree((char*)(x))) +/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */ +/* unused - no macro */ + +#define XMALLOC(x) TclBNAlloc(x) +#define XFREE(x) TclBNFree(x) +#define XREALLOC(x,n) TclBNRealloc(x,n) +#define XCALLOC(n,x) TclBNCalloc(n,x) + +/* Rename the global symbols in libtommath to avoid linkage conflicts */ + +#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff +#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff +#define TOOM_MUL_CUTOFF TclBNToomMulCutoff +#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff + +#define bn_reverse TclBN_reverse +#define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs +#define fast_s_mp_sqr TclBN_fast_s_mp_sqr +#define mp_add TclBN_mp_add +#define mp_add_d TclBN_mp_add_d +#define mp_and TclBN_mp_and +#define mp_clamp TclBN_mp_clamp +#define mp_clear TclBN_mp_clear +#define mp_clear_multi TclBN_mp_clear_multi +#define mp_cmp TclBN_mp_cmp +#define mp_cmp_d TclBN_mp_cmp_d +#define mp_cmp_mag TclBN_mp_cmp_mag +#define mp_copy TclBN_mp_copy +#define mp_count_bits TclBN_mp_count_bits +#define mp_div TclBN_mp_div +#define mp_div_2 TclBN_mp_div_2 +#define mp_div_2d TclBN_mp_div_2d +#define mp_div_3 TclBN_mp_div_3 +#define mp_div_d TclBN_mp_div_d +#define mp_exch TclBN_mp_exch +#define mp_expt_d TclBN_mp_expt_d +#define mp_grow TclBN_mp_grow +#define mp_init TclBN_mp_init +#define mp_init_copy TclBN_mp_init_copy +#define mp_init_multi TclBN_mp_init_multi +#define mp_init_set TclBN_mp_init_set +#define mp_init_size TclBN_mp_init_size +#define mp_karatsuba_mul TclBN_mp_karatsuba_mul +#define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr +#define mp_lshd TclBN_mp_lshd +#define mp_mod TclBN_mp_mod +#define mp_mod_2d TclBN_mp_mod_2d +#define mp_mul TclBN_mp_mul +#define mp_mul_2 TclBN_mp_mul_2 +#define mp_mul_2d TclBN_mp_mul_2d +#define mp_mul_d TclBN_mp_mul_d +#define mp_neg TclBN_mp_neg +#define mp_or TclBN_mp_or +#define mp_radix_size TclBN_mp_radix_size +#define mp_read_radix TclBN_mp_read_radix +#define mp_rshd TclBN_mp_rshd +#define mp_s_rmap TclBNMpSRmap +#define mp_set TclBN_mp_set +#define mp_shrink TclBN_mp_shrink +#define mp_sqr TclBN_mp_sqr +#define mp_sqrt TclBN_mp_sqrt +#define mp_sub TclBN_mp_sub +#define mp_sub_d TclBN_mp_sub_d +#define mp_to_unsigned_bin TclBN_mp_to_unsigned_bin +#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n +#define mp_toom_mul TclBN_mp_toom_mul +#define mp_toom_sqr TclBN_mp_toom_sqr +#define mp_toradix_n TclBN_mp_toradix_n +#define mp_unsigned_bin_size TclBN_mp_unsigned_bin_size +#define mp_xor TclBN_mp_xor +#define mp_zero TclBN_mp_zero +#define s_mp_add TclBN_s_mp_add +#define s_mp_mul_digs TclBN_s_mp_mul_digs +#define s_mp_sqr TclBN_s_mp_sqr +#define s_mp_sub TclBN_s_mp_sub + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclInt.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef TclBN_epoch_TCL_DECLARED +#define TclBN_epoch_TCL_DECLARED +/* 0 */ +EXTERN int TclBN_epoch (void); +#endif +#ifndef TclBN_revision_TCL_DECLARED +#define TclBN_revision_TCL_DECLARED +/* 1 */ +EXTERN int TclBN_revision (void); +#endif +#ifndef TclBN_mp_add_TCL_DECLARED +#define TclBN_mp_add_TCL_DECLARED +/* 2 */ +EXTERN int TclBN_mp_add (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_add_d_TCL_DECLARED +#define TclBN_mp_add_d_TCL_DECLARED +/* 3 */ +EXTERN int TclBN_mp_add_d (mp_int* a, mp_digit b, mp_int* c); +#endif +#ifndef TclBN_mp_and_TCL_DECLARED +#define TclBN_mp_and_TCL_DECLARED +/* 4 */ +EXTERN int TclBN_mp_and (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_clamp_TCL_DECLARED +#define TclBN_mp_clamp_TCL_DECLARED +/* 5 */ +EXTERN void TclBN_mp_clamp (mp_int* a); +#endif +#ifndef TclBN_mp_clear_TCL_DECLARED +#define TclBN_mp_clear_TCL_DECLARED +/* 6 */ +EXTERN void TclBN_mp_clear (mp_int* a); +#endif +#ifndef TclBN_mp_clear_multi_TCL_DECLARED +#define TclBN_mp_clear_multi_TCL_DECLARED +/* 7 */ +EXTERN void TclBN_mp_clear_multi (mp_int* a, ...); +#endif +#ifndef TclBN_mp_cmp_TCL_DECLARED +#define TclBN_mp_cmp_TCL_DECLARED +/* 8 */ +EXTERN int TclBN_mp_cmp (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_cmp_d_TCL_DECLARED +#define TclBN_mp_cmp_d_TCL_DECLARED +/* 9 */ +EXTERN int TclBN_mp_cmp_d (mp_int* a, mp_digit b); +#endif +#ifndef TclBN_mp_cmp_mag_TCL_DECLARED +#define TclBN_mp_cmp_mag_TCL_DECLARED +/* 10 */ +EXTERN int TclBN_mp_cmp_mag (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_copy_TCL_DECLARED +#define TclBN_mp_copy_TCL_DECLARED +/* 11 */ +EXTERN int TclBN_mp_copy (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_count_bits_TCL_DECLARED +#define TclBN_mp_count_bits_TCL_DECLARED +/* 12 */ +EXTERN int TclBN_mp_count_bits (mp_int* a); +#endif +#ifndef TclBN_mp_div_TCL_DECLARED +#define TclBN_mp_div_TCL_DECLARED +/* 13 */ +EXTERN int TclBN_mp_div (mp_int* a, mp_int* b, mp_int* q, + mp_int* r); +#endif +#ifndef TclBN_mp_div_d_TCL_DECLARED +#define TclBN_mp_div_d_TCL_DECLARED +/* 14 */ +EXTERN int TclBN_mp_div_d (mp_int* a, mp_digit b, mp_int* q, + mp_digit* r); +#endif +#ifndef TclBN_mp_div_2_TCL_DECLARED +#define TclBN_mp_div_2_TCL_DECLARED +/* 15 */ +EXTERN int TclBN_mp_div_2 (mp_int* a, mp_int* q); +#endif +#ifndef TclBN_mp_div_2d_TCL_DECLARED +#define TclBN_mp_div_2d_TCL_DECLARED +/* 16 */ +EXTERN int TclBN_mp_div_2d (mp_int* a, int b, mp_int* q, + mp_int* r); +#endif +#ifndef TclBN_mp_div_3_TCL_DECLARED +#define TclBN_mp_div_3_TCL_DECLARED +/* 17 */ +EXTERN int TclBN_mp_div_3 (mp_int* a, mp_int* q, mp_digit* r); +#endif +#ifndef TclBN_mp_exch_TCL_DECLARED +#define TclBN_mp_exch_TCL_DECLARED +/* 18 */ +EXTERN void TclBN_mp_exch (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_expt_d_TCL_DECLARED +#define TclBN_mp_expt_d_TCL_DECLARED +/* 19 */ +EXTERN int TclBN_mp_expt_d (mp_int* a, mp_digit b, mp_int* c); +#endif +#ifndef TclBN_mp_grow_TCL_DECLARED +#define TclBN_mp_grow_TCL_DECLARED +/* 20 */ +EXTERN int TclBN_mp_grow (mp_int* a, int size); +#endif +#ifndef TclBN_mp_init_TCL_DECLARED +#define TclBN_mp_init_TCL_DECLARED +/* 21 */ +EXTERN int TclBN_mp_init (mp_int* a); +#endif +#ifndef TclBN_mp_init_copy_TCL_DECLARED +#define TclBN_mp_init_copy_TCL_DECLARED +/* 22 */ +EXTERN int TclBN_mp_init_copy (mp_int * a, mp_int* b); +#endif +#ifndef TclBN_mp_init_multi_TCL_DECLARED +#define TclBN_mp_init_multi_TCL_DECLARED +/* 23 */ +EXTERN int TclBN_mp_init_multi (mp_int* a, ...); +#endif +#ifndef TclBN_mp_init_set_TCL_DECLARED +#define TclBN_mp_init_set_TCL_DECLARED +/* 24 */ +EXTERN int TclBN_mp_init_set (mp_int* a, mp_digit b); +#endif +#ifndef TclBN_mp_init_size_TCL_DECLARED +#define TclBN_mp_init_size_TCL_DECLARED +/* 25 */ +EXTERN int TclBN_mp_init_size (mp_int* a, int size); +#endif +#ifndef TclBN_mp_lshd_TCL_DECLARED +#define TclBN_mp_lshd_TCL_DECLARED +/* 26 */ +EXTERN int TclBN_mp_lshd (mp_int* a, int shift); +#endif +#ifndef TclBN_mp_mod_TCL_DECLARED +#define TclBN_mp_mod_TCL_DECLARED +/* 27 */ +EXTERN int TclBN_mp_mod (mp_int* a, mp_int* b, mp_int* r); +#endif +#ifndef TclBN_mp_mod_2d_TCL_DECLARED +#define TclBN_mp_mod_2d_TCL_DECLARED +/* 28 */ +EXTERN int TclBN_mp_mod_2d (mp_int* a, int b, mp_int* r); +#endif +#ifndef TclBN_mp_mul_TCL_DECLARED +#define TclBN_mp_mul_TCL_DECLARED +/* 29 */ +EXTERN int TclBN_mp_mul (mp_int* a, mp_int* b, mp_int* p); +#endif +#ifndef TclBN_mp_mul_d_TCL_DECLARED +#define TclBN_mp_mul_d_TCL_DECLARED +/* 30 */ +EXTERN int TclBN_mp_mul_d (mp_int* a, mp_digit b, mp_int* p); +#endif +#ifndef TclBN_mp_mul_2_TCL_DECLARED +#define TclBN_mp_mul_2_TCL_DECLARED +/* 31 */ +EXTERN int TclBN_mp_mul_2 (mp_int* a, mp_int* p); +#endif +#ifndef TclBN_mp_mul_2d_TCL_DECLARED +#define TclBN_mp_mul_2d_TCL_DECLARED +/* 32 */ +EXTERN int TclBN_mp_mul_2d (mp_int* a, int d, mp_int* p); +#endif +#ifndef TclBN_mp_neg_TCL_DECLARED +#define TclBN_mp_neg_TCL_DECLARED +/* 33 */ +EXTERN int TclBN_mp_neg (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_or_TCL_DECLARED +#define TclBN_mp_or_TCL_DECLARED +/* 34 */ +EXTERN int TclBN_mp_or (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_radix_size_TCL_DECLARED +#define TclBN_mp_radix_size_TCL_DECLARED +/* 35 */ +EXTERN int TclBN_mp_radix_size (mp_int* a, int radix, int* size); +#endif +#ifndef TclBN_mp_read_radix_TCL_DECLARED +#define TclBN_mp_read_radix_TCL_DECLARED +/* 36 */ +EXTERN int TclBN_mp_read_radix (mp_int* a, const char* str, + int radix); +#endif +#ifndef TclBN_mp_rshd_TCL_DECLARED +#define TclBN_mp_rshd_TCL_DECLARED +/* 37 */ +EXTERN void TclBN_mp_rshd (mp_int * a, int shift); +#endif +#ifndef TclBN_mp_shrink_TCL_DECLARED +#define TclBN_mp_shrink_TCL_DECLARED +/* 38 */ +EXTERN int TclBN_mp_shrink (mp_int* a); +#endif +#ifndef TclBN_mp_set_TCL_DECLARED +#define TclBN_mp_set_TCL_DECLARED +/* 39 */ +EXTERN void TclBN_mp_set (mp_int* a, mp_digit b); +#endif +#ifndef TclBN_mp_sqr_TCL_DECLARED +#define TclBN_mp_sqr_TCL_DECLARED +/* 40 */ +EXTERN int TclBN_mp_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_sqrt_TCL_DECLARED +#define TclBN_mp_sqrt_TCL_DECLARED +/* 41 */ +EXTERN int TclBN_mp_sqrt (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_sub_TCL_DECLARED +#define TclBN_mp_sub_TCL_DECLARED +/* 42 */ +EXTERN int TclBN_mp_sub (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_sub_d_TCL_DECLARED +#define TclBN_mp_sub_d_TCL_DECLARED +/* 43 */ +EXTERN int TclBN_mp_sub_d (mp_int* a, mp_digit b, mp_int* c); +#endif +#ifndef TclBN_mp_to_unsigned_bin_TCL_DECLARED +#define TclBN_mp_to_unsigned_bin_TCL_DECLARED +/* 44 */ +EXTERN int TclBN_mp_to_unsigned_bin (mp_int* a, + unsigned char* b); +#endif +#ifndef TclBN_mp_to_unsigned_bin_n_TCL_DECLARED +#define TclBN_mp_to_unsigned_bin_n_TCL_DECLARED +/* 45 */ +EXTERN int TclBN_mp_to_unsigned_bin_n (mp_int* a, + unsigned char* b, unsigned long* outlen); +#endif +#ifndef TclBN_mp_toradix_n_TCL_DECLARED +#define TclBN_mp_toradix_n_TCL_DECLARED +/* 46 */ +EXTERN int TclBN_mp_toradix_n (mp_int* a, char* str, int radix, + int maxlen); +#endif +#ifndef TclBN_mp_unsigned_bin_size_TCL_DECLARED +#define TclBN_mp_unsigned_bin_size_TCL_DECLARED +/* 47 */ +EXTERN int TclBN_mp_unsigned_bin_size (mp_int* a); +#endif +#ifndef TclBN_mp_xor_TCL_DECLARED +#define TclBN_mp_xor_TCL_DECLARED +/* 48 */ +EXTERN int TclBN_mp_xor (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_zero_TCL_DECLARED +#define TclBN_mp_zero_TCL_DECLARED +/* 49 */ +EXTERN void TclBN_mp_zero (mp_int* a); +#endif +#ifndef TclBN_reverse_TCL_DECLARED +#define TclBN_reverse_TCL_DECLARED +/* 50 */ +EXTERN void TclBN_reverse (unsigned char* s, int len); +#endif +#ifndef TclBN_fast_s_mp_mul_digs_TCL_DECLARED +#define TclBN_fast_s_mp_mul_digs_TCL_DECLARED +/* 51 */ +EXTERN int TclBN_fast_s_mp_mul_digs (mp_int * a, mp_int * b, + mp_int * c, int digs); +#endif +#ifndef TclBN_fast_s_mp_sqr_TCL_DECLARED +#define TclBN_fast_s_mp_sqr_TCL_DECLARED +/* 52 */ +EXTERN int TclBN_fast_s_mp_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_karatsuba_mul_TCL_DECLARED +#define TclBN_mp_karatsuba_mul_TCL_DECLARED +/* 53 */ +EXTERN int TclBN_mp_karatsuba_mul (mp_int* a, mp_int* b, + mp_int* c); +#endif +#ifndef TclBN_mp_karatsuba_sqr_TCL_DECLARED +#define TclBN_mp_karatsuba_sqr_TCL_DECLARED +/* 54 */ +EXTERN int TclBN_mp_karatsuba_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_toom_mul_TCL_DECLARED +#define TclBN_mp_toom_mul_TCL_DECLARED +/* 55 */ +EXTERN int TclBN_mp_toom_mul (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_toom_sqr_TCL_DECLARED +#define TclBN_mp_toom_sqr_TCL_DECLARED +/* 56 */ +EXTERN int TclBN_mp_toom_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_s_mp_add_TCL_DECLARED +#define TclBN_s_mp_add_TCL_DECLARED +/* 57 */ +EXTERN int TclBN_s_mp_add (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_s_mp_mul_digs_TCL_DECLARED +#define TclBN_s_mp_mul_digs_TCL_DECLARED +/* 58 */ +EXTERN int TclBN_s_mp_mul_digs (mp_int* a, mp_int* b, mp_int* c, + int digs); +#endif +#ifndef TclBN_s_mp_sqr_TCL_DECLARED +#define TclBN_s_mp_sqr_TCL_DECLARED +/* 59 */ +EXTERN int TclBN_s_mp_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_s_mp_sub_TCL_DECLARED +#define TclBN_s_mp_sub_TCL_DECLARED +/* 60 */ +EXTERN int TclBN_s_mp_sub (mp_int* a, mp_int* b, mp_int* c); +#endif + +typedef struct TclTomMathStubs { + int magic; + CONST struct TclTomMathStubHooks *hooks; + + int (*tclBN_epoch) (void); /* 0 */ + int (*tclBN_revision) (void); /* 1 */ + int (*tclBN_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 2 */ + int (*tclBN_mp_add_d) (mp_int* a, mp_digit b, mp_int* c); /* 3 */ + int (*tclBN_mp_and) (mp_int* a, mp_int* b, mp_int* c); /* 4 */ + void (*tclBN_mp_clamp) (mp_int* a); /* 5 */ + void (*tclBN_mp_clear) (mp_int* a); /* 6 */ + void (*tclBN_mp_clear_multi) (mp_int* a, ...); /* 7 */ + int (*tclBN_mp_cmp) (mp_int* a, mp_int* b); /* 8 */ + int (*tclBN_mp_cmp_d) (mp_int* a, mp_digit b); /* 9 */ + int (*tclBN_mp_cmp_mag) (mp_int* a, mp_int* b); /* 10 */ + int (*tclBN_mp_copy) (mp_int* a, mp_int* b); /* 11 */ + int (*tclBN_mp_count_bits) (mp_int* a); /* 12 */ + int (*tclBN_mp_div) (mp_int* a, mp_int* b, mp_int* q, mp_int* r); /* 13 */ + int (*tclBN_mp_div_d) (mp_int* a, mp_digit b, mp_int* q, mp_digit* r); /* 14 */ + int (*tclBN_mp_div_2) (mp_int* a, mp_int* q); /* 15 */ + int (*tclBN_mp_div_2d) (mp_int* a, int b, mp_int* q, mp_int* r); /* 16 */ + int (*tclBN_mp_div_3) (mp_int* a, mp_int* q, mp_digit* r); /* 17 */ + void (*tclBN_mp_exch) (mp_int* a, mp_int* b); /* 18 */ + int (*tclBN_mp_expt_d) (mp_int* a, mp_digit b, mp_int* c); /* 19 */ + int (*tclBN_mp_grow) (mp_int* a, int size); /* 20 */ + int (*tclBN_mp_init) (mp_int* a); /* 21 */ + int (*tclBN_mp_init_copy) (mp_int * a, mp_int* b); /* 22 */ + int (*tclBN_mp_init_multi) (mp_int* a, ...); /* 23 */ + int (*tclBN_mp_init_set) (mp_int* a, mp_digit b); /* 24 */ + int (*tclBN_mp_init_size) (mp_int* a, int size); /* 25 */ + int (*tclBN_mp_lshd) (mp_int* a, int shift); /* 26 */ + int (*tclBN_mp_mod) (mp_int* a, mp_int* b, mp_int* r); /* 27 */ + int (*tclBN_mp_mod_2d) (mp_int* a, int b, mp_int* r); /* 28 */ + int (*tclBN_mp_mul) (mp_int* a, mp_int* b, mp_int* p); /* 29 */ + int (*tclBN_mp_mul_d) (mp_int* a, mp_digit b, mp_int* p); /* 30 */ + int (*tclBN_mp_mul_2) (mp_int* a, mp_int* p); /* 31 */ + int (*tclBN_mp_mul_2d) (mp_int* a, int d, mp_int* p); /* 32 */ + int (*tclBN_mp_neg) (mp_int* a, mp_int* b); /* 33 */ + int (*tclBN_mp_or) (mp_int* a, mp_int* b, mp_int* c); /* 34 */ + int (*tclBN_mp_radix_size) (mp_int* a, int radix, int* size); /* 35 */ + int (*tclBN_mp_read_radix) (mp_int* a, const char* str, int radix); /* 36 */ + void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ + int (*tclBN_mp_shrink) (mp_int* a); /* 38 */ + void (*tclBN_mp_set) (mp_int* a, mp_digit b); /* 39 */ + int (*tclBN_mp_sqr) (mp_int* a, mp_int* b); /* 40 */ + int (*tclBN_mp_sqrt) (mp_int* a, mp_int* b); /* 41 */ + int (*tclBN_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 42 */ + int (*tclBN_mp_sub_d) (mp_int* a, mp_digit b, mp_int* c); /* 43 */ + int (*tclBN_mp_to_unsigned_bin) (mp_int* a, unsigned char* b); /* 44 */ + int (*tclBN_mp_to_unsigned_bin_n) (mp_int* a, unsigned char* b, unsigned long* outlen); /* 45 */ + int (*tclBN_mp_toradix_n) (mp_int* a, char* str, int radix, int maxlen); /* 46 */ + int (*tclBN_mp_unsigned_bin_size) (mp_int* a); /* 47 */ + int (*tclBN_mp_xor) (mp_int* a, mp_int* b, mp_int* c); /* 48 */ + void (*tclBN_mp_zero) (mp_int* a); /* 49 */ + void (*tclBN_reverse) (unsigned char* s, int len); /* 50 */ + int (*tclBN_fast_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 51 */ + int (*tclBN_fast_s_mp_sqr) (mp_int* a, mp_int* b); /* 52 */ + int (*tclBN_mp_karatsuba_mul) (mp_int* a, mp_int* b, mp_int* c); /* 53 */ + int (*tclBN_mp_karatsuba_sqr) (mp_int* a, mp_int* b); /* 54 */ + int (*tclBN_mp_toom_mul) (mp_int* a, mp_int* b, mp_int* c); /* 55 */ + int (*tclBN_mp_toom_sqr) (mp_int* a, mp_int* b); /* 56 */ + int (*tclBN_s_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 57 */ + int (*tclBN_s_mp_mul_digs) (mp_int* a, mp_int* b, mp_int* c, int digs); /* 58 */ + int (*tclBN_s_mp_sqr) (mp_int* a, mp_int* b); /* 59 */ + int (*tclBN_s_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 60 */ +} TclTomMathStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclTomMathStubs *tclTomMathStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef TclBN_epoch +#define TclBN_epoch \ + (tclTomMathStubsPtr->tclBN_epoch) /* 0 */ +#endif +#ifndef TclBN_revision +#define TclBN_revision \ + (tclTomMathStubsPtr->tclBN_revision) /* 1 */ +#endif +#ifndef TclBN_mp_add +#define TclBN_mp_add \ + (tclTomMathStubsPtr->tclBN_mp_add) /* 2 */ +#endif +#ifndef TclBN_mp_add_d +#define TclBN_mp_add_d \ + (tclTomMathStubsPtr->tclBN_mp_add_d) /* 3 */ +#endif +#ifndef TclBN_mp_and +#define TclBN_mp_and \ + (tclTomMathStubsPtr->tclBN_mp_and) /* 4 */ +#endif +#ifndef TclBN_mp_clamp +#define TclBN_mp_clamp \ + (tclTomMathStubsPtr->tclBN_mp_clamp) /* 5 */ +#endif +#ifndef TclBN_mp_clear +#define TclBN_mp_clear \ + (tclTomMathStubsPtr->tclBN_mp_clear) /* 6 */ +#endif +#ifndef TclBN_mp_clear_multi +#define TclBN_mp_clear_multi \ + (tclTomMathStubsPtr->tclBN_mp_clear_multi) /* 7 */ +#endif +#ifndef TclBN_mp_cmp +#define TclBN_mp_cmp \ + (tclTomMathStubsPtr->tclBN_mp_cmp) /* 8 */ +#endif +#ifndef TclBN_mp_cmp_d +#define TclBN_mp_cmp_d \ + (tclTomMathStubsPtr->tclBN_mp_cmp_d) /* 9 */ +#endif +#ifndef TclBN_mp_cmp_mag +#define TclBN_mp_cmp_mag \ + (tclTomMathStubsPtr->tclBN_mp_cmp_mag) /* 10 */ +#endif +#ifndef TclBN_mp_copy +#define TclBN_mp_copy \ + (tclTomMathStubsPtr->tclBN_mp_copy) /* 11 */ +#endif +#ifndef TclBN_mp_count_bits +#define TclBN_mp_count_bits \ + (tclTomMathStubsPtr->tclBN_mp_count_bits) /* 12 */ +#endif +#ifndef TclBN_mp_div +#define TclBN_mp_div \ + (tclTomMathStubsPtr->tclBN_mp_div) /* 13 */ +#endif +#ifndef TclBN_mp_div_d +#define TclBN_mp_div_d \ + (tclTomMathStubsPtr->tclBN_mp_div_d) /* 14 */ +#endif +#ifndef TclBN_mp_div_2 +#define TclBN_mp_div_2 \ + (tclTomMathStubsPtr->tclBN_mp_div_2) /* 15 */ +#endif +#ifndef TclBN_mp_div_2d +#define TclBN_mp_div_2d \ + (tclTomMathStubsPtr->tclBN_mp_div_2d) /* 16 */ +#endif +#ifndef TclBN_mp_div_3 +#define TclBN_mp_div_3 \ + (tclTomMathStubsPtr->tclBN_mp_div_3) /* 17 */ +#endif +#ifndef TclBN_mp_exch +#define TclBN_mp_exch \ + (tclTomMathStubsPtr->tclBN_mp_exch) /* 18 */ +#endif +#ifndef TclBN_mp_expt_d +#define TclBN_mp_expt_d \ + (tclTomMathStubsPtr->tclBN_mp_expt_d) /* 19 */ +#endif +#ifndef TclBN_mp_grow +#define TclBN_mp_grow \ + (tclTomMathStubsPtr->tclBN_mp_grow) /* 20 */ +#endif +#ifndef TclBN_mp_init +#define TclBN_mp_init \ + (tclTomMathStubsPtr->tclBN_mp_init) /* 21 */ +#endif +#ifndef TclBN_mp_init_copy +#define TclBN_mp_init_copy \ + (tclTomMathStubsPtr->tclBN_mp_init_copy) /* 22 */ +#endif +#ifndef TclBN_mp_init_multi +#define TclBN_mp_init_multi \ + (tclTomMathStubsPtr->tclBN_mp_init_multi) /* 23 */ +#endif +#ifndef TclBN_mp_init_set +#define TclBN_mp_init_set \ + (tclTomMathStubsPtr->tclBN_mp_init_set) /* 24 */ +#endif +#ifndef TclBN_mp_init_size +#define TclBN_mp_init_size \ + (tclTomMathStubsPtr->tclBN_mp_init_size) /* 25 */ +#endif +#ifndef TclBN_mp_lshd +#define TclBN_mp_lshd \ + (tclTomMathStubsPtr->tclBN_mp_lshd) /* 26 */ +#endif +#ifndef TclBN_mp_mod +#define TclBN_mp_mod \ + (tclTomMathStubsPtr->tclBN_mp_mod) /* 27 */ +#endif +#ifndef TclBN_mp_mod_2d +#define TclBN_mp_mod_2d \ + (tclTomMathStubsPtr->tclBN_mp_mod_2d) /* 28 */ +#endif +#ifndef TclBN_mp_mul +#define TclBN_mp_mul \ + (tclTomMathStubsPtr->tclBN_mp_mul) /* 29 */ +#endif +#ifndef TclBN_mp_mul_d +#define TclBN_mp_mul_d \ + (tclTomMathStubsPtr->tclBN_mp_mul_d) /* 30 */ +#endif +#ifndef TclBN_mp_mul_2 +#define TclBN_mp_mul_2 \ + (tclTomMathStubsPtr->tclBN_mp_mul_2) /* 31 */ +#endif +#ifndef TclBN_mp_mul_2d +#define TclBN_mp_mul_2d \ + (tclTomMathStubsPtr->tclBN_mp_mul_2d) /* 32 */ +#endif +#ifndef TclBN_mp_neg +#define TclBN_mp_neg \ + (tclTomMathStubsPtr->tclBN_mp_neg) /* 33 */ +#endif +#ifndef TclBN_mp_or +#define TclBN_mp_or \ + (tclTomMathStubsPtr->tclBN_mp_or) /* 34 */ +#endif +#ifndef TclBN_mp_radix_size +#define TclBN_mp_radix_size \ + (tclTomMathStubsPtr->tclBN_mp_radix_size) /* 35 */ +#endif +#ifndef TclBN_mp_read_radix +#define TclBN_mp_read_radix \ + (tclTomMathStubsPtr->tclBN_mp_read_radix) /* 36 */ +#endif +#ifndef TclBN_mp_rshd +#define TclBN_mp_rshd \ + (tclTomMathStubsPtr->tclBN_mp_rshd) /* 37 */ +#endif +#ifndef TclBN_mp_shrink +#define TclBN_mp_shrink \ + (tclTomMathStubsPtr->tclBN_mp_shrink) /* 38 */ +#endif +#ifndef TclBN_mp_set +#define TclBN_mp_set \ + (tclTomMathStubsPtr->tclBN_mp_set) /* 39 */ +#endif +#ifndef TclBN_mp_sqr +#define TclBN_mp_sqr \ + (tclTomMathStubsPtr->tclBN_mp_sqr) /* 40 */ +#endif +#ifndef TclBN_mp_sqrt +#define TclBN_mp_sqrt \ + (tclTomMathStubsPtr->tclBN_mp_sqrt) /* 41 */ +#endif +#ifndef TclBN_mp_sub +#define TclBN_mp_sub \ + (tclTomMathStubsPtr->tclBN_mp_sub) /* 42 */ +#endif +#ifndef TclBN_mp_sub_d +#define TclBN_mp_sub_d \ + (tclTomMathStubsPtr->tclBN_mp_sub_d) /* 43 */ +#endif +#ifndef TclBN_mp_to_unsigned_bin +#define TclBN_mp_to_unsigned_bin \ + (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin) /* 44 */ +#endif +#ifndef TclBN_mp_to_unsigned_bin_n +#define TclBN_mp_to_unsigned_bin_n \ + (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin_n) /* 45 */ +#endif +#ifndef TclBN_mp_toradix_n +#define TclBN_mp_toradix_n \ + (tclTomMathStubsPtr->tclBN_mp_toradix_n) /* 46 */ +#endif +#ifndef TclBN_mp_unsigned_bin_size +#define TclBN_mp_unsigned_bin_size \ + (tclTomMathStubsPtr->tclBN_mp_unsigned_bin_size) /* 47 */ +#endif +#ifndef TclBN_mp_xor +#define TclBN_mp_xor \ + (tclTomMathStubsPtr->tclBN_mp_xor) /* 48 */ +#endif +#ifndef TclBN_mp_zero +#define TclBN_mp_zero \ + (tclTomMathStubsPtr->tclBN_mp_zero) /* 49 */ +#endif +#ifndef TclBN_reverse +#define TclBN_reverse \ + (tclTomMathStubsPtr->tclBN_reverse) /* 50 */ +#endif +#ifndef TclBN_fast_s_mp_mul_digs +#define TclBN_fast_s_mp_mul_digs \ + (tclTomMathStubsPtr->tclBN_fast_s_mp_mul_digs) /* 51 */ +#endif +#ifndef TclBN_fast_s_mp_sqr +#define TclBN_fast_s_mp_sqr \ + (tclTomMathStubsPtr->tclBN_fast_s_mp_sqr) /* 52 */ +#endif +#ifndef TclBN_mp_karatsuba_mul +#define TclBN_mp_karatsuba_mul \ + (tclTomMathStubsPtr->tclBN_mp_karatsuba_mul) /* 53 */ +#endif +#ifndef TclBN_mp_karatsuba_sqr +#define TclBN_mp_karatsuba_sqr \ + (tclTomMathStubsPtr->tclBN_mp_karatsuba_sqr) /* 54 */ +#endif +#ifndef TclBN_mp_toom_mul +#define TclBN_mp_toom_mul \ + (tclTomMathStubsPtr->tclBN_mp_toom_mul) /* 55 */ +#endif +#ifndef TclBN_mp_toom_sqr +#define TclBN_mp_toom_sqr \ + (tclTomMathStubsPtr->tclBN_mp_toom_sqr) /* 56 */ +#endif +#ifndef TclBN_s_mp_add +#define TclBN_s_mp_add \ + (tclTomMathStubsPtr->tclBN_s_mp_add) /* 57 */ +#endif +#ifndef TclBN_s_mp_mul_digs +#define TclBN_s_mp_mul_digs \ + (tclTomMathStubsPtr->tclBN_s_mp_mul_digs) /* 58 */ +#endif +#ifndef TclBN_s_mp_sqr +#define TclBN_s_mp_sqr \ + (tclTomMathStubsPtr->tclBN_s_mp_sqr) /* 59 */ +#endif +#ifndef TclBN_s_mp_sub +#define TclBN_s_mp_sub \ + (tclTomMathStubsPtr->tclBN_s_mp_sub) /* 60 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLINTDECLS */ diff --git a/tests/chan.test b/tests/chan.test index b047883..39dd111 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chan.test,v 1.14 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: chan.test,v 1.15 2008/07/21 21:02:19 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -24,7 +24,7 @@ test chan-1.1 {chan command general syntax} -body { } -returnCodes error -result "wrong # args: should be \"chan subcommand ?arg ...?\"" test chan-1.2 {chan command general syntax} -body { chan FOOBAR -} -returnCodes error -result "unknown or ambiguous subcommand \"FOOBAR\": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, pop, postevent, push, puts, read, seek, tell, or truncate" +} -returnCodes error -match glob -result "unknown or ambiguous subcommand \"FOOBAR\": must be *" test chan-2.1 {chan command: blocked subcommand} -body { chan blocked foo bar @@ -223,6 +223,40 @@ test chan-16.13 {chan command: pending output subcommand} -setup { catch {removeFile $file} } +# TIP 304: chan pipe + +test chan-17.1 {chan command: pipe subcommand} -body { + chan pipe foo +} -returnCodes error -result "wrong # args: should be \"chan pipe \"" + +test chan-17.2 {chan command: pipe subcommand} -body { + chan pipe foo bar +} -returnCodes error -result "wrong # args: should be \"chan pipe \"" + +test chan-17.3 {chan command: pipe subcommand} -body { + set l [chan pipe] + foreach {pr pw} $l break + list [llength $l] [fconfigure $pr -blocking] [fconfigure $pw -blocking] +} -result [list 2 1 1] -cleanup { + close $pw + close $pr +} + +test chan-17.4 {chan command: pipe subcommand} -body { + set ::done 0 + foreach {::pr ::pw} [chan pipe] break + after 100 {puts $::pw foo;flush $::pw} + fileevent $::pr readable {set ::done 1} + after 500 {set ::done -1} + vwait ::done + set out nope + if {$::done==1} {gets $::pr out} + list $::done $out +} -result [list 1 foo] -cleanup { + close $::pw + close $::pr +} + cleanupTests return diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 9648843..101f2fb 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.45 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.46 2008/07/21 21:02:19 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -637,11 +637,10 @@ close $wfile test iocmd-20.0 {chan, wrong#args} { catch {chan} msg set msg -} {wrong # args: should be "chan subcommand ?arg ...?"} -test iocmd-20.1 {chan, unknown method} { - catch {chan foo} msg - set msg -} {unknown or ambiguous subcommand "foo": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, pop, postevent, push, puts, read, seek, tell, or truncate} +} {wrong # args: should be "chan subcommand ?argument ...?"} +test iocmd-20.1 {chan, unknown method} -body { + chan foo +} -returnCodes error -match glob -result {unknown or ambiguous subcommand "foo": must be *} # --- --- --- --------- --------- --------- # chan create, and method "initalize" diff --git a/tests/ioTrans.test b/tests/ioTrans.test index e7c7d72..1b329c3 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioTrans.test,v 1.5 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: ioTrans.test,v 1.6 2008/07/21 21:02:20 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -115,11 +115,10 @@ eval $helperscript test iortrans-1.0 {chan, wrong#args} { catch {chan} msg set msg -} {wrong # args: should be "chan subcommand ?arg ...?"} -test iortrans-1.1 {chan, unknown method} { - catch {chan foo} msg - set msg -} {unknown or ambiguous subcommand "foo": must be blocked, close, configure, copy, create, eof, event, flush, gets, names, pending, pop, postevent, push, puts, read, seek, tell, or truncate} +} {wrong # args: should be "chan subcommand ?argument ...?"} +test iortrans-1.1 {chan, unknown method} -body { + chan foo +} -returnCodes error -match glob -result {unknown or ambiguous subcommand "foo": must be*} # --- --- --- --------- --------- --------- # chan push, and method "initalize" diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 64b58a1..6d4ac4e 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.42 2008/03/14 16:32:52 rmax Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.43 2008/07/21 21:02:20 ferrieux Exp $ */ #include "tclInt.h" @@ -769,6 +769,50 @@ TclpCreateCommandChannel( /* *---------------------------------------------------------------------- * + * Tcl_CreatePipe -- + * + * System dependent interface to create a pipe for the [chan pipe] + * command. Stolen from TclX. + * + * Parameters: + * o interp - Errors returned in result. + * o rchan, wchan - Returned read and write side. + * o flags - Reserved for future use. + * Results: + * TCL_OK or TCL_ERROR. + * + *---------------------------------------------------------------------- + */ +int +Tcl_CreatePipe ( + Tcl_Interp *interp, + Tcl_Channel *rchan, + Tcl_Channel *wchan, + int flags + ) +{ + int fileNums [2]; + + if (pipe (fileNums) < 0) { + Tcl_AppendResult (interp, "pipe creation failed: ", + Tcl_PosixError (interp), (char *) NULL); + return TCL_ERROR; + } + *rchan = Tcl_MakeFileChannel ((ClientData) fileNums [0], + TCL_READABLE); + Tcl_RegisterChannel (interp, *rchan); + + *wchan = Tcl_MakeFileChannel ((ClientData) fileNums [1], + TCL_WRITABLE); + Tcl_RegisterChannel (interp, *wchan); + + return TCL_OK; +} + + +/* + *---------------------------------------------------------------------- + * * TclGetAndDetachPids -- * * This function is invoked in the generic implementation of a diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index b27a762..c24875f 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.65 2007/02/20 23:24:07 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.66 2008/07/21 21:02:20 ferrieux Exp $ */ #include "tclWinInt.h" @@ -1750,6 +1750,57 @@ TclpCreateCommandChannel( /* *---------------------------------------------------------------------- * + * Tcl_CreatePipe -- + * + * System dependent interface to create a pipe for the [chan pipe] + * command. Stolen from TclX. + * + * Parameters: + * o interp - Errors returned in result. + * o rchan, wchan - Returned read and write side. + * o flags - Reserved for future use. + * Results: + * TCL_OK or TCL_ERROR. + * + *---------------------------------------------------------------------- + */ +int +Tcl_CreatePipe ( + Tcl_Interp *interp, + Tcl_Channel *rchan, + Tcl_Channel *wchan, + int flags + ) +{ + HANDLE readHandle, writeHandle; + SECURITY_ATTRIBUTES sec; + + sec.nLength = sizeof(SECURITY_ATTRIBUTES); + sec.lpSecurityDescriptor = NULL; + sec.bInheritHandle = FALSE; + + if (!CreatePipe (&readHandle, &writeHandle, &sec, 0)) { + TclWinConvertError (GetLastError ()); + Tcl_AppendResult (interp, "pipe creation failed: ", + Tcl_PosixError (interp), (char *) NULL); + return TCL_ERROR; + } + + *rchan = Tcl_MakeFileChannel ((ClientData) readHandle, + TCL_READABLE); + Tcl_RegisterChannel (interp, *rchan); + + *wchan = Tcl_MakeFileChannel ((ClientData) writeHandle, + TCL_WRITABLE); + Tcl_RegisterChannel (interp, *wchan); + + return TCL_OK; +} + + +/* + *---------------------------------------------------------------------- + * * TclGetAndDetachPids -- * * Stores a list of the command PIDs for a command channel in the -- cgit v0.12 From ca32e49e84dd1c4b6f27fac6eb8a747cd699d864 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 21 Jul 2008 21:12:49 +0000 Subject: Resync with recent ?arg ...? normalization --- tests/ioCmd.test | 4 ++-- tests/ioTrans.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 101f2fb..a38158e 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.46 2008/07/21 21:02:19 ferrieux Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.47 2008/07/21 21:12:49 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -637,7 +637,7 @@ close $wfile test iocmd-20.0 {chan, wrong#args} { catch {chan} msg set msg -} {wrong # args: should be "chan subcommand ?argument ...?"} +} {wrong # args: should be "chan subcommand ?arg ...?"} test iocmd-20.1 {chan, unknown method} -body { chan foo } -returnCodes error -match glob -result {unknown or ambiguous subcommand "foo": must be *} diff --git a/tests/ioTrans.test b/tests/ioTrans.test index 1b329c3..d26789c 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioTrans.test,v 1.6 2008/07/21 21:02:20 ferrieux Exp $ +# RCS: @(#) $Id: ioTrans.test,v 1.7 2008/07/21 21:12:49 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -115,7 +115,7 @@ eval $helperscript test iortrans-1.0 {chan, wrong#args} { catch {chan} msg set msg -} {wrong # args: should be "chan subcommand ?argument ...?"} +} {wrong # args: should be "chan subcommand ?arg ...?"} test iortrans-1.1 {chan, unknown method} -body { chan foo } -returnCodes error -match glob -result {unknown or ambiguous subcommand "foo": must be*} -- cgit v0.12 From 35f986c4f26a93c0b5a0f91c81deaea2a1e5f30f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 21 Jul 2008 21:25:21 +0000 Subject: fix [2021443] inconsistant "wrong # args" messages (follow-up) --- generic/tclClock.c | 76 +++++++++++++++++++++++++-------------------------- generic/tclCmdMZ.c | 10 +++---- generic/tclFileName.c | 4 +-- generic/tclIOCmd.c | 4 +-- generic/tclLoad.c | 4 +-- generic/tclTest.c | 4 +-- tests/clock.test | 8 +++--- tests/exec.test | 6 ++-- tests/fileName.test | 8 +++--- tests/indexObj.test | 6 ++-- tests/regexp.test | 14 +++++----- tests/regexpComp.test | 12 ++++---- tests/switch.test | 10 +++---- tests/unload.test | 6 ++-- 14 files changed, 86 insertions(+), 86 deletions(-) diff --git a/generic/tclClock.c b/generic/tclClock.c index 68db1a4..d32e786 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.69 2008/07/13 23:15:22 nijtmans Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.70 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -60,7 +60,7 @@ static const int daysInPriorMonths[2][13] = { typedef enum ClockLiteral { LIT__NIL, LIT__DEFAULT_FORMAT, - LIT_BCE, LIT_C, + LIT_BCE, LIT_C, LIT_CANNOT_USE_GMT_AND_TIMEZONE, LIT_CE, LIT_DAYOFMONTH, LIT_DAYOFWEEK, LIT_DAYOFYEAR, @@ -76,7 +76,7 @@ typedef enum ClockLiteral { static const char *const literals[] = { "", "%a %b %d %H:%M:%S %Z %Y", - "BCE", "C", + "BCE", "C", "cannot use -gmt and -timezone in same call", "CE", "dayOfMonth", "dayOfWeek", "dayOfYear", @@ -225,7 +225,7 @@ static const struct ClockCommand clockCommands[] = { { "ParseFormatArgs", ClockParseformatargsObjCmd }, { NULL, NULL } }; - + /* *---------------------------------------------------------------------- * @@ -280,7 +280,7 @@ TclClockInit( ClockDeleteCmdProc); } } - + /* *---------------------------------------------------------------------- * @@ -369,7 +369,7 @@ ClockConvertlocaltoutcObjCmd( } return status; } - + /* *---------------------------------------------------------------------- * @@ -426,7 +426,7 @@ ClockGetdatefieldsObjCmd( return TCL_ERROR; } - /* + /* * fields.seconds could be an unsigned number that overflowed. Make * sure that it isn't. */ @@ -492,7 +492,7 @@ ClockGetdatefieldsObjCmd( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -583,7 +583,7 @@ ClockGetjuliandayfromerayearmonthdayObjCmd ( } return status; } - + /* *---------------------------------------------------------------------- * @@ -676,7 +676,7 @@ ClockGetjuliandayfromerayearweekdayObjCmd ( } return status; } - + /* *---------------------------------------------------------------------- * @@ -724,7 +724,7 @@ ConvertLocalToUTC( return ConvertLocalToUTCUsingTable(interp, fields, rowc, rowv); } } - + /* *---------------------------------------------------------------------- * @@ -800,7 +800,7 @@ ConvertLocalToUTCUsingTable( fields->seconds = fields->localSeconds - fields->tzOffset; return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -882,7 +882,7 @@ ConvertLocalToUTCUsingC( } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -928,7 +928,7 @@ ConvertUTCToLocal( return ConvertUTCToLocalUsingTable(interp, fields, rowc, rowv); } } - + /* *---------------------------------------------------------------------- * @@ -979,7 +979,7 @@ ConvertUTCToLocalUsingTable( fields->localSeconds = fields->seconds + fields->tzOffset; return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1072,7 +1072,7 @@ ConvertUTCToLocalUsingC( Tcl_IncrRefCount(fields->tzName); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1138,7 +1138,7 @@ LookupLastTransition( } return rowv[l]; } - + /* *---------------------------------------------------------------------- * @@ -1205,7 +1205,7 @@ GetYearWeekDay( fields->dayOfWeek += 7; } } - + /* *---------------------------------------------------------------------- * @@ -1325,7 +1325,7 @@ GetGregorianEraYearDay( } fields->dayOfYear = day + 1; } - + /* *---------------------------------------------------------------------- * @@ -1356,7 +1356,7 @@ GetMonthDay( fields->month = month+1; fields->dayOfMonth = day; } - + /* *---------------------------------------------------------------------- * @@ -1407,7 +1407,7 @@ GetJulianDayFromEraYearWeekDay( fields->julianDay = firstMonday + 7 * (fields->iso8601Week - 1) + fields->dayOfWeek - 1; } - + /* *---------------------------------------------------------------------- * @@ -1508,7 +1508,7 @@ GetJulianDayFromEraYearMonthDay( + ym1o4; } } - + /* *---------------------------------------------------------------------- * @@ -1546,7 +1546,7 @@ IsGregorianLeapYear( return 1; } } - + /* *---------------------------------------------------------------------- * @@ -1572,7 +1572,7 @@ WeekdayOnOrBefore( } return julianDay - ((julianDay - k) % 7); } - + /* *---------------------------------------------------------------------- * @@ -1616,7 +1616,7 @@ ClockGetenvObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj(varValue, -1)); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1662,7 +1662,7 @@ ThreadSafeLocalTime( #endif return tmPtr; } - + /*---------------------------------------------------------------------- * * ClockClicksObjCmd -- @@ -1701,13 +1701,13 @@ ClockClicksObjCmd( case 1: break; case 2: - if (Tcl_GetIndexFromObj(interp, objv[1], clicksSwitches, "option", 0, + if (Tcl_GetIndexFromObj(interp, objv[1], clicksSwitches, "switch", 0, &index) != TCL_OK) { return TCL_ERROR; } break; default: - Tcl_WrongNumArgs(interp, 1, objv, "?-option?"); + Tcl_WrongNumArgs(interp, 1, objv, "?-switch?"); return TCL_ERROR; } @@ -1735,7 +1735,7 @@ ClockClicksObjCmd( return TCL_OK; } - + /*---------------------------------------------------------------------- * * ClockMillisecondsObjCmd - @@ -1772,7 +1772,7 @@ ClockMillisecondsObjCmd( now.sec * 1000 + now.usec / 1000)); return TCL_OK; } - + /*---------------------------------------------------------------------- * * ClockMicrosecondsObjCmd - @@ -1809,7 +1809,7 @@ ClockMicrosecondsObjCmd( ((Tcl_WideInt) now.sec * 1000000) + now.usec)); return TCL_OK; } - + /* *----------------------------------------------------------------------------- * @@ -1818,11 +1818,11 @@ ClockMicrosecondsObjCmd( * Parses the arguments for [clock format]. * * Results: - * Returns a standard Tcl result, whose value is a four-element + * Returns a standard Tcl result, whose value is a four-element * list comprising the time format, the locale, and the timezone. * * This function exists because the loop that parses the [clock format] - * options is a known performance "hot spot", and is implemented in an + * options is a known performance "hot spot", and is implemented in an * effort to speed that particular code up. * *----------------------------------------------------------------------------- @@ -1854,7 +1854,7 @@ ClockParseformatargsObjCmd( "-timezone", NULL }; enum optionInd { CLOCK_FORMAT_FORMAT, CLOCK_FORMAT_GMT, CLOCK_FORMAT_LOCALE, - CLOCK_FORMAT_TIMEZONE + CLOCK_FORMAT_TIMEZONE }; int optionIndex; /* Index of an option */ int saw = 0; /* Flag == 1 if option was seen already */ @@ -1927,7 +1927,7 @@ ClockParseformatargsObjCmd( #undef formatObj } - + /*---------------------------------------------------------------------- * * ClockSecondsObjCmd - @@ -1963,7 +1963,7 @@ ClockSecondsObjCmd( Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) now.sec)); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -2004,7 +2004,7 @@ TzsetIfNecessary(void) } Tcl_MutexUnlock(&clockMutex); } - + /* *---------------------------------------------------------------------- * @@ -2035,7 +2035,7 @@ ClockDeleteCmdProc( ckfree((char*) data); } } - + /* * Local Variables: * mode: c diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index c5a1cb6..f1501ff 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.165 2008/05/30 22:54:27 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.166 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -175,7 +175,7 @@ Tcl_RegexpObjCmd( endOfForLoop: if ((objc - i) < (2 - about)) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"); + "?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"); goto optionError; } objc -= i; @@ -515,7 +515,7 @@ Tcl_RegsubObjCmd( endOfForLoop: if (objc-idx < 3 || objc-idx > 4) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? exp string subSpec ?varName?"); + "?-switch ...? exp string subSpec ?varName?"); optionError: if (startIndex) { Tcl_DecrRefCount(startIndex); @@ -3539,7 +3539,7 @@ Tcl_SwitchObjCmd( finishedOptions: if (objc - i < 2) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? string pattern body ... ?default body?"); + "?-switch ...? string pattern body ?pattern body ...? ?default body?"); return TCL_ERROR; } if (indexVarObj != NULL && mode != OPT_REGEXP) { @@ -3582,7 +3582,7 @@ Tcl_SwitchObjCmd( if (objc < 1) { Tcl_WrongNumArgs(interp, 1, savedObjv, - "?switches? string {pattern body ... ?default body?}"); + "?-switch ...? string {pattern body ?pattern body ...? ?default body?}"); return TCL_ERROR; } objv = listv; diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 723b993..ce2ee53 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.88 2008/05/02 20:02:39 patthoyts Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.89 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -1300,7 +1300,7 @@ Tcl_GlobObjCmd( endOfForLoop: if (objc - i < 1) { - Tcl_WrongNumArgs(interp, 1, objv, "?switches? name ?name ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "?-switch ...? name ?name ...?"); return TCL_ERROR; } if ((globFlags & TCL_GLOBMODE_TAILS) && (pathOrDir == NULL)) { diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index b24b856..57b289b 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.56 2008/07/21 21:02:17 ferrieux Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.57 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -873,7 +873,7 @@ Tcl_ExecObjCmd( } } if (objc <= skip) { - Tcl_WrongNumArgs(interp, 1, objv, "?switches? arg ?arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "?-switch ...? arg ?arg ...?"); return TCL_ERROR; } diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 7ed2ee7..6c1c483 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.17 2008/05/30 22:54:29 dkf Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.18 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -549,7 +549,7 @@ Tcl_UnloadObjCmd( endOfForLoop: if ((objc-i < 1) || (objc-i > 3)) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? fileName ?packageName? ?interp?"); + "?-switch ...? fileName ?packageName? ?interp?"); return TCL_ERROR; } if (Tcl_FSConvertToPathType(interp, objv[i]) != TCL_OK) { diff --git a/generic/tclTest.c b/generic/tclTest.c index ec7eb65..3d6e2fb 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.116 2008/07/19 22:50:41 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.117 2008/07/21 21:25:21 nijtmans Exp $ */ #define TCL_TEST @@ -3672,7 +3672,7 @@ TestregexpObjCmd( endOfForLoop: if (objc - i < hasxflags + 2 - about) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"); + "?-switch ...? exp string ?matchVar? ?subMatchVar ...?"); return TCL_ERROR; } objc -= i; diff --git a/tests/clock.test b/tests/clock.test index 3d0f62d..a2c0fda 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.85 2008/06/17 02:16:07 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.86 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35454,7 +35454,7 @@ test clock-33.2 {clock clicks tests} { } {1} test clock-33.3 {clock clicks tests} { list [catch {clock clicks foo} msg] $msg -} {1 {bad option "foo": must be -milliseconds or -microseconds}} +} {1 {bad switch "foo": must be -milliseconds or -microseconds}} test clock-33.4 {clock clicks tests} { expr [clock clicks -milliseconds]+1 concat {} @@ -35489,10 +35489,10 @@ test clock-33.5a {clock tests, millisecond timing test} { } {ok} test clock-33.6 {clock clicks, milli with too much abbreviation} { list [catch { clock clicks ? } msg] $msg -} {1 {bad option "?": must be -milliseconds or -microseconds}} +} {1 {bad switch "?": must be -milliseconds or -microseconds}} test clock-33.7 {clock clicks, milli with too much abbreviation} { list [catch { clock clicks - } msg] $msg -} {1 {ambiguous option "-": must be -milliseconds or -microseconds}} +} {1 {ambiguous switch "-": must be -milliseconds or -microseconds}} test clock-33.8 {clock clicks test, microsecond timing test} { # This test can fail on a system that is so heavily loaded that diff --git a/tests/exec.test b/tests/exec.test index d3e3e35..e8b0e66 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: exec.test,v 1.30 2008/07/19 16:20:17 dkf Exp $ +# RCS: @(#) $Id: exec.test,v 1.31 2008/07/21 21:25:21 nijtmans Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -364,7 +364,7 @@ err} test exec-10.1 {errors in exec invocation} -constraints {exec} -body { exec -} -returnCodes error -result {wrong # args: should be "exec ?switches? arg ?arg ...?"} +} -returnCodes error -result {wrong # args: should be "exec ?-switch ...? arg ?arg ...?"} test exec-10.2 {errors in exec invocation} -constraints {exec} -body { exec | cat } -returnCodes error -result {illegal use of | or |& in command} @@ -539,7 +539,7 @@ test exec-14.1 {-keepnewline switch} {exec} { } "foo\n" test exec-14.2 {-keepnewline switch} -constraints {exec} -body { exec -keepnewline -} -returnCodes error -result {wrong # args: should be "exec ?switches? arg ?arg ...?"} +} -returnCodes error -result {wrong # args: should be "exec ?-switch ...? arg ?arg ...?"} test exec-14.3 {unknown switch} -constraints {exec} -body { exec -gorp } -returnCodes error -result {bad switch "-gorp": must be -ignorestderr, -keepnewline, or --} diff --git a/tests/fileName.test b/tests/fileName.test index b1125de..27cb661 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.53 2008/07/20 20:24:45 kennykb Exp $ +# RCS: @(#) $Id: fileName.test,v 1.54 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -697,16 +697,16 @@ test filename-10.24 {Tcl_TranslateFileName} -body { test filename-11.1 {Tcl_GlobCmd} -returnCodes error -body { glob -} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} test filename-11.2 {Tcl_GlobCmd} -returnCodes error -body { glob -gorp } -result {bad option "-gorp": must be -directory, -join, -nocomplain, -path, -tails, -types, or --} test filename-11.3 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplai -} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} test filename-11.4 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplain -} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} test filename-11.5 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplain * ~xyqrszzz } -result {user "xyqrszzz" doesn't exist} diff --git a/tests/indexObj.test b/tests/indexObj.test index b5a3304..495af3c 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: indexObj.test,v 1.16 2008/07/13 23:15:22 nijtmans Exp $ +# RCS: @(#) $Id: indexObj.test,v 1.17 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -88,8 +88,8 @@ test indexObj-4.1 {free old internal representation} testindexobj { } {2} test indexObj-5.1 {Tcl_WrongNumArgs} testindexobj { - testwrongnumargs 1 "?-option?" mycmd -} "wrong # args: should be \"mycmd ?-option?\"" + testwrongnumargs 1 "?-switch?" mycmd +} "wrong # args: should be \"mycmd ?-switch?\"" test indexObj-5.2 {Tcl_WrongNumArgs} testindexobj { testwrongnumargs 2 "bar" mycmd foo } "wrong # args: should be \"mycmd foo bar\"" diff --git a/tests/regexp.test b/tests/regexp.test index 92b6c6a..b32d027 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.30 2007/12/23 21:29:42 hobbs Exp $ +# RCS: @(#) $Id: regexp.test,v 1.31 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -194,10 +194,10 @@ test regexp-5.5 {exercise cache of compiled expressions} { test regexp-6.1 {regexp errors} { list [catch {regexp a} msg] $msg -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexp-6.2 {regexp errors} { list [catch {regexp -nocase a} msg] $msg -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexp-6.3 {regexp errors} { list [catch {regexp -gorp a} msg] $msg } {1 {bad switch "-gorp": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --}} @@ -354,16 +354,16 @@ test regexp-10.5 {inverse partial newline sensitivity in regsub} { test regexp-11.1 {regsub errors} { list [catch {regsub a b} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.2 {regsub errors} { list [catch {regsub -nocase a b} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.3 {regsub errors} { list [catch {regsub -nocase -all a b} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.4 {regsub errors} { list [catch {regsub a b c d e f} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.5 {regsub errors} { list [catch {regsub -gorp a b c} msg] $msg } {1 {bad switch "-gorp": must be -all, -nocase, -expanded, -line, -linestop, -lineanchor, -start, or --}} diff --git a/tests/regexpComp.test b/tests/regexpComp.test index c7a5980..e9c324f 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -259,12 +259,12 @@ test regexpComp-6.1 {regexp errors} { evalInProc { list [catch {regexp a} msg] $msg } -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexpComp-6.2 {regexp errors} { evalInProc { list [catch {regexp -nocase a} msg] $msg } -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexpComp-6.3 {regexp errors} { evalInProc { list [catch {regexp -gorp a} msg] $msg @@ -505,22 +505,22 @@ test regexpComp-11.1 {regsub errors} { evalInProc { list [catch {regsub a b} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.2 {regsub errors} { evalInProc { list [catch {regsub -nocase a b} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.3 {regsub errors} { evalInProc { list [catch {regsub -nocase -all a b} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.4 {regsub errors} { evalInProc { list [catch {regsub a b c d e f} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.5 {regsub errors} { evalInProc { list [catch {regsub -gorp a b c} msg] $msg diff --git a/tests/switch.test b/tests/switch.test index 9a46191..5164ca4 100644 --- a/tests/switch.test +++ b/tests/switch.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: switch.test,v 1.21 2008/03/21 19:09:13 dkf Exp $ +# RCS: @(#) $Id: switch.test,v 1.22 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -171,7 +171,7 @@ test switch-4.1 {error in executed command} { "switch a a {error "Just a test"} default {subst 1}"}} test switch-4.2 {error: not enough args} -returnCodes error -body { switch -} -result {wrong # args: should be "switch ?switches? string pattern body ... ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} test switch-4.3 {error: pattern with no body} -body { switch a b } -returnCodes error -result {extra switch pattern with no body} @@ -271,16 +271,16 @@ test switch-8.3 {weird body text, variable} { test switch-9.1 {empty pattern/body list} -returnCodes error -body { switch x -} -result {wrong # args: should be "switch ?switches? string pattern body ... ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} test switch-9.2 {unpaired pattern} -returnCodes error -body { switch -- x } -result {extra switch pattern with no body} test switch-9.3 {empty pattern/body list} -body { switch x {} -} -returnCodes error -result {wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} test switch-9.4 {empty pattern/body list} -body { switch -- x {} -} -returnCodes error -result {wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} test switch-9.5 {unpaired pattern} -body { switch x a {} b } -returnCodes error -result {extra switch pattern with no body} diff --git a/tests/unload.test b/tests/unload.test index 761f05c..b61e4cc 100644 --- a/tests/unload.test +++ b/tests/unload.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unload.test,v 1.7 2008/04/23 15:44:38 dkf Exp $ +# RCS: @(#) $Id: unload.test,v 1.8 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -43,10 +43,10 @@ testConstraint teststaticpkg [llength [info commands teststaticpkg]] # Basic tests: parameter testing... test unload-1.1 {basic errors} -returnCodes error -body { unload -} -result {wrong # args: should be "unload ?switches? fileName ?packageName? ?interp?"} +} -result {wrong # args: should be "unload ?-switch ...? fileName ?packageName? ?interp?"} test unload-1.2 {basic errors} -returnCodes error -body { unload a b c d -} -result {wrong # args: should be "unload ?switches? fileName ?packageName? ?interp?"} +} -result {wrong # args: should be "unload ?-switch ...? fileName ?packageName? ?interp?"} test unload-1.3 {basic errors} -returnCodes error -body { unload a b foobar } -result {could not find interpreter "foobar"} -- cgit v0.12 From 45fca6378191844231368026abfba87f18334f39 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 21 Jul 2008 21:46:47 +0000 Subject: fix warnings, formatting --- unix/tclUnixPipe.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 6d4ac4e..a243889 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.43 2008/07/21 21:02:20 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.44 2008/07/21 21:46:47 das Exp $ */ #include "tclInt.h" @@ -784,27 +784,26 @@ TclpCreateCommandChannel( *---------------------------------------------------------------------- */ int -Tcl_CreatePipe ( - Tcl_Interp *interp, - Tcl_Channel *rchan, - Tcl_Channel *wchan, - int flags - ) +Tcl_CreatePipe( + Tcl_Interp *interp, + Tcl_Channel *rchan, + Tcl_Channel *wchan, + int flags) { - int fileNums [2]; + int fileNums[2]; - if (pipe (fileNums) < 0) { - Tcl_AppendResult (interp, "pipe creation failed: ", - Tcl_PosixError (interp), (char *) NULL); - return TCL_ERROR; + if (pipe(fileNums) < 0) { + Tcl_AppendResult(interp, "pipe creation failed: ", + Tcl_PosixError(interp), NULL); + return TCL_ERROR; } - *rchan = Tcl_MakeFileChannel ((ClientData) fileNums [0], - TCL_READABLE); - Tcl_RegisterChannel (interp, *rchan); - *wchan = Tcl_MakeFileChannel ((ClientData) fileNums [1], - TCL_WRITABLE); - Tcl_RegisterChannel (interp, *wchan); + *rchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[0]), + TCL_READABLE); + Tcl_RegisterChannel(interp, *rchan); + *wchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[1]), + TCL_WRITABLE); + Tcl_RegisterChannel(interp, *wchan); return TCL_OK; } -- cgit v0.12 From 0cfbc1cfc7ced06308d425a94a7eb780cd0a0909 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 21 Jul 2008 21:51:35 +0000 Subject: Added test for file rename with inode collision on windows --- ChangeLog | 1 + tests/winFCmd.test | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 16ec059..1a2f383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ 2008-07-21 Pat Thoyts * generic/tclFCmd.c: Inodes on windows are unreliable [Bug 2015723] + * tests/winFCmd.test: test rename with inode collision 2008-07-21 Miguel Sofer diff --git a/tests/winFCmd.test b/tests/winFCmd.test index f434516..d9598b1 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFCmd.test,v 1.43 2008/04/10 00:21:02 dkf Exp $ +# RCS: @(#) $Id: winFCmd.test,v 1.44 2008/07/21 21:51:36 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -387,6 +387,44 @@ test winFCmd-1.37 {TclpRenameFile: need to restore temp file} {win emptyTest} { # Need a file that can't be copied. } {} +# If the native filesystem produces 0 for inodes numbers there is no point +# doing the following test. +testConstraint winNonZeroInodes [eval { + file stat [info nameofexecutable] statExe + expr {$statExe(ino) != 0} +}] + +proc MakeFiles {dirname} { + set inodes {} + set ndx -1 + while {1} { + if {$ndx > 10000} { + return -code error "limit reached without finding a collistion." + } + set filename [file join $dirname Test[incr ndx]] + set f [open $filename w] + close $f + file stat $filename stat + if {[set n [lsearch -exact -integer $inodes $stat(ino)]] != -1} { + return [list [file join $dirname Test$n] $filename] + } + lappend inodes $stat(ino) + unset stat + } +} + +test winFCmd-1.38 {TclpRenameFile: check rename of conflicting inodes} -setup { + cleanup +} -constraints {win winNonZeroInodes} -body { + file mkdir td1 + foreach {a b} [MakeFiles td1] break + file rename -force $a $b + file exists $a +} -cleanup { + cleanup +} -result {0} + + test winFCmd-2.1 {TclpCopyFile: errno: EACCES} -setup { cleanup } -constraints {win cdrom testfile} -body { -- cgit v0.12 From 5a78f45601d3430d38a4fba6c4066e08a365b411 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 21 Jul 2008 21:52:12 +0000 Subject: stack-3.1 no longer fails when testsuite is run from Xcode --- macosx/Tcl.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 3b61afa..f048025 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -969,7 +969,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.37 2008/07/13 12:54:46 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.38 2008/07/21 21:52:12 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -2013,7 +2013,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\nif [ -z \"${HOME}\" ]; then export HOME=\"$(echo ~)\"; fi\ncd \"${TARGET_TEMP_DIR}\"; rm -rf \"${DERIVED_FILE_DIR}\"; mkdir -p \"${DERIVED_FILE_DIR}\"\nprintf '%s%s%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${TCL_SRCROOT}\" '/tests}]\nconfigure -tmpdir [file normalize {' \"${DERIVED_FILE_DIR}\" '}]\nconfigure -verbose [concat [configure -verbose] line]\n# following test only fails when testsuite is run from inside Xcode, so skip it\nconfigure -skip [concat [configure -skip] stack-3.1]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi"; + shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\nif [ -z \"${HOME}\" ]; then export HOME=\"$(echo ~)\"; fi\ncd \"${TARGET_TEMP_DIR}\"; rm -rf \"${DERIVED_FILE_DIR}\"; mkdir -p \"${DERIVED_FILE_DIR}\"\nprintf '%s%s%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${TCL_SRCROOT}\" '/tests}]\nconfigure -tmpdir [file normalize {' \"${DERIVED_FILE_DIR}\" '}]\nconfigure -verbose [concat [configure -verbose] line]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi"; showEnvVarsInLog = 0; }; F97AF02F0B665DA900310EA2 /* ShellScript */ = { -- cgit v0.12 From c063bd4d2bc95b600282a37a69948d7807b50eac Mon Sep 17 00:00:00 2001 From: das Date: Mon, 21 Jul 2008 21:54:06 +0000 Subject: whitespace --- generic/tclBasic.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7a9b32f..c7faf44 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.320 2008/07/21 19:41:42 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.321 2008/07/21 21:54:06 das Exp $ */ #include "tclInt.h" @@ -3954,7 +3954,7 @@ TclEvalObjv( PUSH_RECORD(interp, recordPtr); goto commandFound; } - + restartAtTop: TclResetCancellation(interp, 0); iPtr->numLevels++; @@ -4135,7 +4135,7 @@ TclEvalObjv( if (USE_NR_TEBC && tebcCall) { return TCL_OK; } - recordPtr->type = TCL_NR_NO_TYPE; + recordPtr->type = TCL_NR_NO_TYPE; break; case TCL_NR_CMD_TYPE: { /* @@ -4242,22 +4242,22 @@ TclEvalObjv_NR2( if (result != TCL_OK) { goto restart; } - + /* * A callback scheduled a new evaluation; return so that our * caller can run it. */ - + switch(recordPtr->type) { case TCL_NR_NO_TYPE: goto restart; case TCL_NR_BC_TYPE: - case TCL_NR_CMD_TYPE: + case TCL_NR_CMD_TYPE: case TCL_NR_SCRIPT_TYPE: case TCL_NR_CMDSWAP_TYPE: goto done; case TCL_NR_TAILCALL_TYPE: - Tcl_Panic("Tailcall called from a callback!"); + Tcl_Panic("Tailcall called from a callback!"); default: Tcl_Panic("TEOV_NR2: invalid record type: %d", recordPtr->type); @@ -4291,7 +4291,7 @@ TclEvalObjv_NR2( */ done: - + if (TclAsyncReady(iPtr)) { result = Tcl_AsyncInvoke(interp, result); } @@ -4340,7 +4340,7 @@ TEOV_PushExceptionHandlers( */ TclNRAddCallback(interp, TEOV_Error, INT2PTR(objc), - (ClientData) objv, NULL,NULL); + (ClientData) objv, NULL, NULL); } if (iPtr->numLevels == 1) { @@ -7430,7 +7430,7 @@ NRPostProcess( Tcl_Obj *const objv[]) { TEOV_record *recordPtr, *rootPtr = TOP_RECORD(interp)->nextPtr; - + restart: recordPtr = TOP_RECORD(interp); if (result == TCL_OK) { @@ -7459,7 +7459,7 @@ NRPostProcess( case TCL_NR_SCRIPT_TYPE: { Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; int flags = recordPtr->data.obj.flags; - + result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); break; } @@ -7473,7 +7473,7 @@ NRPostProcess( recordPtr->type); } } - + result = TclEvalObjv_NR2(interp, result, rootPtr); if (TOP_RECORD(interp) != rootPtr) { assert((result == TCL_OK)); @@ -7649,7 +7649,7 @@ Tcl_NRCmdSwap( * a proc, errors otherwise. * (2) Should a tailcall bypass [catch] in the returning frame? Current * implementation does not (or does it? Changed, test!) - it causes an - * error. + * error. * * FIXME NRE! */ @@ -7674,7 +7674,7 @@ TclTailcallObjCmd( "tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; } - + nsPtr->activationCount++; listPtr = Tcl_NewListObj(objc-1, objv+1); rootPtr->type = TCL_NR_TAILCALL_TYPE; @@ -7686,7 +7686,7 @@ TclTailcallObjCmd( * (the top being this command's record), and go back until you find * the one that contains the cmdPtr. */ - + tmpPtr = rootPtr->nextPtr; while (tmpPtr->cmdPtr == NULL) { tmpPtr = tmpPtr->nextPtr; @@ -7696,7 +7696,7 @@ TclTailcallObjCmd( * Now find the first and last callbacks in this record, and temporarily * set the callback list to empty. */ - + headPtr = tailPtr = tmpPtr->callbackPtr; if (headPtr) { while (tailPtr->nextPtr) { @@ -7713,7 +7713,7 @@ TclTailcallObjCmd( TOP_RECORD(iPtr) = tmpPtr; TclNRAddCallback(interp, TailcallCallback, listPtr, nsPtr, NULL, NULL); TOP_RECORD(iPtr) = rootPtr; - + if (headPtr) { tailPtr->nextPtr = tmpPtr->callbackPtr; tmpPtr->callbackPtr = headPtr; @@ -7733,7 +7733,7 @@ TailcallCallback( Namespace *nsPtr = data[1]; TEOV_record *recordPtr = TOP_RECORD(iPtr); Command *cmdPtr = NULL; - + if (!recordPtr->cmdPtr || recordPtr->callbackPtr) { Tcl_Panic("TailcallCallback: should not happen!"); } @@ -7753,22 +7753,22 @@ TailcallCallback( Tcl_DeleteNamespace((Tcl_Namespace *) nsPtr); } - + if (!cmdPtr || (result != TCL_OK)) { Tcl_DecrRefCount(listPtr); Tcl_SetResult(interp, "the command to be tailcalled does not exist", TCL_STATIC); return TCL_ERROR; - } + } /* * Take over the previous command's record. */ - + TclCleanupCommandMacro(recordPtr->cmdPtr); recordPtr->cmdPtr = cmdPtr; cmdPtr->refCount++; - + /* * Push a new record to signal that a new command was scheduled. */ -- cgit v0.12 From ee89317ed438f41a8fa968d3a117332e96b7f155 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 21 Jul 2008 21:58:22 +0000 Subject: formatting, whitespace --- generic/tclIOCmd.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 57b289b..6bbf780 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.57 2008/07/21 21:25:21 nijtmans Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.58 2008/07/21 21:58:22 das Exp $ */ #include "tclInt.h" @@ -1799,6 +1799,7 @@ ChanTruncateObjCmd( return TCL_OK; } + /* *---------------------------------------------------------------------- * @@ -1819,32 +1820,34 @@ ChanTruncateObjCmd( static int ChanPipeObjCmd( - ClientData dummy, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_Channel rchan,wchan; - const char *channelNames [2]; + Tcl_Channel rchan, wchan; + const char *channelNames[2]; Tcl_Obj *resultPtr; - + if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, ""); return TCL_ERROR; } - - if (Tcl_CreatePipe (interp, &rchan, &wchan, 0) != TCL_OK) { - return TCL_ERROR; + + if (Tcl_CreatePipe(interp, &rchan, &wchan, 0) != TCL_OK) { + return TCL_ERROR; } - - channelNames [0] = Tcl_GetChannelName (rchan); - channelNames [1] = Tcl_GetChannelName (wchan); - + + channelNames[0] = Tcl_GetChannelName(rchan); + channelNames[1] = Tcl_GetChannelName(wchan); + resultPtr = Tcl_NewObj(); - Tcl_ListObjAppendElement(NULL, resultPtr, Tcl_NewStringObj(channelNames[0],-1)); - Tcl_ListObjAppendElement(NULL, resultPtr, Tcl_NewStringObj(channelNames[1],-1)); + Tcl_ListObjAppendElement(NULL, resultPtr, + Tcl_NewStringObj(channelNames[0], -1)); + Tcl_ListObjAppendElement(NULL, resultPtr, + Tcl_NewStringObj(channelNames[1], -1)); Tcl_SetObjResult(interp, resultPtr); - + return TCL_OK; } -- cgit v0.12 From 57bdff7e68cb1e0fe66a2671b18ce67ecbb79e69 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 21 Jul 2008 22:22:27 +0000 Subject: fix [2021443] inconsistant "wrong # args" messages (follow-up) --- ChangeLog | 7 +++++++ generic/tclCmdAH.c | 4 ++-- generic/tclCmdIL.c | 4 ++-- generic/tclCmdMZ.c | 8 ++++---- tests/case.test | 4 ++-- tests/lreplace.test | 6 +++--- tests/regexp.test | 6 +++--- tests/regexpComp.test | 4 ++-- tests/switch.test | 10 +++++----- 9 files changed, 30 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a2f383..a757bdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-22 Jan Nijtmans + + * generic/*.c: fix [2021443] inconsistant "wrong # args" messages + * win/tclWinReg.c + * win/tclWinTest.c + * tests/*.test + 2008-07-21 Alexandre Ferrieux TIP #304 IMPLEMENTATION diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 048f80f..303ecd5 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.97 2008/07/19 22:50:43 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.98 2008/07/21 22:22:27 nijtmans Exp $ */ #include "tclInt.h" @@ -101,7 +101,7 @@ Tcl_CaseObjCmd( if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, - "string ?in? patList body ... ?default body?"); + "string ?in? ?pattern body ...? ?default body?"); return TCL_ERROR; } diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index b7ea47d..9c668c2 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.144 2008/07/13 23:15:22 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.145 2008/07/21 22:22:27 nijtmans Exp $ */ #include "tclInt.h" @@ -2524,7 +2524,7 @@ Tcl_LreplaceObjCmd( if (objc < 4) { Tcl_WrongNumArgs(interp, 1, objv, - "list first last ?element element ...?"); + "list first last ?element ...?"); return TCL_ERROR; } diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index f1501ff..2777d92 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.166 2008/07/21 21:25:21 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.167 2008/07/21 22:22:27 nijtmans Exp $ */ #include "tclInt.h" @@ -175,7 +175,7 @@ Tcl_RegexpObjCmd( endOfForLoop: if ((objc - i) < (2 - about)) { Tcl_WrongNumArgs(interp, 1, objv, - "?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"); + "?-switch ...? exp string ?matchVar? ?subMatchVar ...?"); goto optionError; } objc -= i; @@ -3539,7 +3539,7 @@ Tcl_SwitchObjCmd( finishedOptions: if (objc - i < 2) { Tcl_WrongNumArgs(interp, 1, objv, - "?-switch ...? string pattern body ?pattern body ...? ?default body?"); + "?-switch ...? string ?pattern body ...? ?default body?"); return TCL_ERROR; } if (indexVarObj != NULL && mode != OPT_REGEXP) { @@ -3582,7 +3582,7 @@ Tcl_SwitchObjCmd( if (objc < 1) { Tcl_WrongNumArgs(interp, 1, savedObjv, - "?-switch ...? string {pattern body ?pattern body ...? ?default body?}"); + "?-switch ...? string {?pattern body ...? ?default body?}"); return TCL_ERROR; } objv = listv; diff --git a/tests/case.test b/tests/case.test index 023fdbb..a9bec93 100644 --- a/tests/case.test +++ b/tests/case.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: case.test,v 1.7 2006/10/09 19:15:44 msofer Exp $ +# RCS: @(#) $Id: case.test,v 1.8 2008/07/21 22:22:28 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -51,7 +51,7 @@ test case-2.1 {error in executed command} { "case a in a {error "Just a test"} default {format 1}"}} test case-2.2 {error: not enough args} { list [catch {case} msg] $msg -} {1 {wrong # args: should be "case string ?in? patList body ... ?default body?"}} +} {1 {wrong # args: should be "case string ?in? ?pattern body ...? ?default body?"}} test case-2.3 {error: pattern with no body} { list [catch {case a b} msg] $msg } {1 {extra case pattern with no body}} diff --git a/tests/lreplace.test b/tests/lreplace.test index 6ea1f75..59934fb 100644 --- a/tests/lreplace.test +++ b/tests/lreplace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lreplace.test,v 1.9 2005/05/10 18:35:22 kennykb Exp $ +# RCS: @(#) $Id: lreplace.test,v 1.10 2008/07/21 22:22:28 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -104,10 +104,10 @@ test lreplace-1.26 {lreplace command} { test lreplace-2.1 {lreplace errors} { list [catch lreplace msg] $msg -} {1 {wrong # args: should be "lreplace list first last ?element element ...?"}} +} {1 {wrong # args: should be "lreplace list first last ?element ...?"}} test lreplace-2.2 {lreplace errors} { list [catch {lreplace a b} msg] $msg -} {1 {wrong # args: should be "lreplace list first last ?element element ...?"}} +} {1 {wrong # args: should be "lreplace list first last ?element ...?"}} test lreplace-2.3 {lreplace errors} { list [catch {lreplace x a 10} msg] $msg } {1 {bad index "a": must be integer?[+-]integer? or end?[+-]integer?}} diff --git a/tests/regexp.test b/tests/regexp.test index b32d027..5b0f886 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.31 2008/07/21 21:25:22 nijtmans Exp $ +# RCS: @(#) $Id: regexp.test,v 1.32 2008/07/21 22:22:28 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -194,10 +194,10 @@ test regexp-5.5 {exercise cache of compiled expressions} { test regexp-6.1 {regexp errors} { list [catch {regexp a} msg] $msg -} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}} test regexp-6.2 {regexp errors} { list [catch {regexp -nocase a} msg] $msg -} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}} test regexp-6.3 {regexp errors} { list [catch {regexp -gorp a} msg] $msg } {1 {bad switch "-gorp": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --}} diff --git a/tests/regexpComp.test b/tests/regexpComp.test index e9c324f..7feaa5f 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -259,12 +259,12 @@ test regexpComp-6.1 {regexp errors} { evalInProc { list [catch {regexp a} msg] $msg } -} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}} test regexpComp-6.2 {regexp errors} { evalInProc { list [catch {regexp -nocase a} msg] $msg } -} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}} test regexpComp-6.3 {regexp errors} { evalInProc { list [catch {regexp -gorp a} msg] $msg diff --git a/tests/switch.test b/tests/switch.test index 5164ca4..db346e9 100644 --- a/tests/switch.test +++ b/tests/switch.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: switch.test,v 1.22 2008/07/21 21:25:22 nijtmans Exp $ +# RCS: @(#) $Id: switch.test,v 1.23 2008/07/21 22:22:28 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -171,7 +171,7 @@ test switch-4.1 {error in executed command} { "switch a a {error "Just a test"} default {subst 1}"}} test switch-4.2 {error: not enough args} -returnCodes error -body { switch -} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string ?pattern body ...? ?default body?"} test switch-4.3 {error: pattern with no body} -body { switch a b } -returnCodes error -result {extra switch pattern with no body} @@ -271,16 +271,16 @@ test switch-8.3 {weird body text, variable} { test switch-9.1 {empty pattern/body list} -returnCodes error -body { switch x -} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string ?pattern body ...? ?default body?"} test switch-9.2 {unpaired pattern} -returnCodes error -body { switch -- x } -result {extra switch pattern with no body} test switch-9.3 {empty pattern/body list} -body { switch x {} -} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {?pattern body ...? ?default body?}"} test switch-9.4 {empty pattern/body list} -body { switch -- x {} -} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {?pattern body ...? ?default body?}"} test switch-9.5 {unpaired pattern} -body { switch x a {} b } -returnCodes error -result {extra switch pattern with no body} -- cgit v0.12 From d0b609270a5168026fc5df405c4245ae2e33deed Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 21 Jul 2008 22:50:30 +0000 Subject: * generic/tclBasic.c: Extended the existing TIP #280 system (info * generic/tclCmdAH.c: frame), added the ability to track the * generic/tclCompCmds.c: absolute location of literal procedure * generic/tclCompile.c: arguments, and making this information * generic/tclCompile.h: available to uplevel, eval, and * generic/tclInterp.c: siblings. This allows proper tracking of * generic/tclInt.h: absolute location through custom (Tcl-coded) * generic/tclNamesp.c: control structures based on uplevel, etc. * generic/tclProc.c: * tests/info.test: --- ChangeLog | 13 +++ generic/tclBasic.c | 300 +++++++++++++++++++++++++++++++++++++++++++-------- generic/tclCmdAH.c | 11 +- generic/tclCompile.c | 47 +++++++- generic/tclCompile.h | 13 ++- generic/tclInt.h | 33 +++++- generic/tclInterp.c | 10 +- generic/tclNamesp.c | 19 +++- generic/tclProc.c | 12 ++- tests/info.test | 14 +-- 10 files changed, 403 insertions(+), 69 deletions(-) diff --git a/ChangeLog b/ChangeLog index a757bdb..d388303 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-07-21 Andreas Kupries + + * generic/tclBasic.c: Extended the existing TIP #280 system (info + * generic/tclCmdAH.c: frame), added the ability to track the + * generic/tclCompCmds.c: absolute location of literal procedure + * generic/tclCompile.c: arguments, and making this information + * generic/tclCompile.h: available to uplevel, eval, and + * generic/tclInterp.c: siblings. This allows proper tracking of + * generic/tclInt.h: absolute location through custom (Tcl-coded) + * generic/tclNamesp.c: control structures based on uplevel, etc. + * generic/tclProc.c: + * tests/info.test: + 2007-02-22 Jan Nijtmans * generic/*.c: fix [2021443] inconsistant "wrong # args" messages diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c7faf44..9ccc388 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.321 2008/07/21 21:54:06 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.322 2008/07/21 22:50:34 andreas_kupries Exp $ */ #include "tclInt.h" @@ -497,8 +497,10 @@ Tcl_CreateInterp(void) iPtr->cmdFramePtr = NULL; iPtr->linePBodyPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); iPtr->lineBCPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); + iPtr->lineLAPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); Tcl_InitHashTable(iPtr->linePBodyPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineBCPtr, TCL_ONE_WORD_KEYS); + Tcl_InitHashTable(iPtr->lineLAPtr, TCL_ONE_WORD_KEYS); iPtr->activeVarTracePtr = NULL; @@ -1517,6 +1519,26 @@ DeleteInterpProc( Tcl_DeleteHashTable(iPtr->lineBCPtr); ckfree((char *) iPtr->lineBCPtr); iPtr->lineBCPtr = NULL; + + /* + * Location stack for uplevel/eval/... scripts which were passed + * through proc arguments. Actually we track all arguments as we + * don't, cannot know which arguments will be used as scripts and + * which won't. + */ + + if (iPtr->lineLAPtr->numEntries) { + /* + * When the interp goes away we have nothing on the stack, so + * there are no arguments, so this table has to be empty. + */ + + Tcl_Panic ("Argument location tracking table not empty"); + } + + Tcl_DeleteHashTable (iPtr->lineLAPtr); + ckfree((char*) iPtr->lineLAPtr); + iPtr->lineLAPtr = NULL; } Tcl_DeleteHashTable(&iPtr->varTraces); @@ -5058,9 +5080,11 @@ TclEvalEx( eeFramePtr->nline = objectsUsed; eeFramePtr->line = lines; + TclArgumentEnter (interp, objv, objectsUsed, eeFramePtr); iPtr->cmdFramePtr = eeFramePtr; code = TclEvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR, NULL); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; + TclArgumentRelease (interp, objv, objectsUsed); eeFramePtr->line = NULL; eeFramePtr->nline = 0; @@ -5210,6 +5234,207 @@ TclAdvanceLines( /* *---------------------------------------------------------------------- + * Note: The whole data structure access for argument location tracking is + * hidden behind these three functions. The only parts open are the lineLAPtr + * field in the Interp structure. The CFWord definition is internal to here. + * Should make it easier to redo the data structures if we find something more + * space/time efficient. + */ + +/* + *---------------------------------------------------------------------- + * + * TclArgumentEnter -- + * + * This procedure is a helper for the TIP #280 uplevel extension. + * It enters location references for the arguments of a command to be + * invoked. Only the first entry has the actual data, further entries + * simply count the usage up. + * + * Results: + * None. + * + * Side effects: + * May allocate memory. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +void +TclArgumentEnter(interp,objv,objc,cfPtr) + Tcl_Interp* interp; + Tcl_Obj** objv; + int objc; + CmdFrame* cfPtr; +{ + Interp* iPtr = (Interp*) interp; + int new, i; + Tcl_HashEntry* hPtr; + CFWord* cfwPtr; + + for (i=1; i < objc; i++) { + /* + * Ignore argument words without line information (= dynamic). If + * they are variables they may have location information associated + * with that, either through globally recorded 'set' invokations, or + * literals in bytecode. Eitehr way there is no need to record + * something here. + */ + + if (cfPtr->line [i] < 0) continue; + hPtr = Tcl_CreateHashEntry (iPtr->lineLAPtr, (char*) objv[i], &new); + if (new) { + /* + * The word is not on the stack yet, remember the current location + * and initialize references. + */ + cfwPtr = (CFWord*) ckalloc (sizeof (CFWord)); + cfwPtr->framePtr = cfPtr; + cfwPtr->word = i; + cfwPtr->refCount = 1; + Tcl_SetHashValue (hPtr, cfwPtr); + } else { + /* + * The word is already on the stack, its current location is not + * relevant. Just remember the reference to prevent early removal. + */ + cfwPtr = (CFWord*) Tcl_GetHashValue (hPtr); + cfwPtr->refCount ++; + } + } +} + +/* + *---------------------------------------------------------------------- + * + * TclArgumentRelease -- + * + * This procedure is a helper for the TIP #280 uplevel extension. + * It removes the location references for the arguments of a command + * just done. Usage is counted down, the data is removed only when + * no user is left over. + * + * Results: + * None. + * + * Side effects: + * May release memory. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +void +TclArgumentRelease(interp,objv,objc) + Tcl_Interp* interp; + Tcl_Obj** objv; + int objc; +{ + Interp* iPtr = (Interp*) interp; + Tcl_HashEntry* hPtr; + CFWord* cfwPtr; + int i; + + for (i=1; i < objc; i++) { + hPtr = Tcl_FindHashEntry (iPtr->lineLAPtr, (char *) objv[i]); + + if (!hPtr) { continue; } + cfwPtr = (CFWord*) Tcl_GetHashValue (hPtr); + + cfwPtr->refCount --; + if (cfwPtr->refCount > 0) { continue; } + + ckfree ((char*) cfwPtr); + Tcl_DeleteHashEntry (hPtr); + } +} + +/* + *---------------------------------------------------------------------- + * + * TclArgumentGet -- + * + * This procedure is a helper for the TIP #280 uplevel extension. + * It find the location references for a Tcl_Obj, if any. + * + * Results: + * None. + * + * Side effects: + * Writes found location information into the result arguments. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +void +TclArgumentGet(interp,obj,cfPtrPtr,wordPtr) + Tcl_Interp* interp; + Tcl_Obj* obj; + CmdFrame** cfPtrPtr; + int* wordPtr; +{ + Interp* iPtr = (Interp*) interp; + Tcl_HashEntry* hPtr; + CmdFrame* framePtr; + + /* + * First look for location information recorded in the argument + * stack. That is nearest. + */ + + hPtr = Tcl_FindHashEntry (iPtr->lineLAPtr, (char *) obj); + if (hPtr) { + CFWord* cfwPtr = (CFWord*) Tcl_GetHashValue (hPtr); + *wordPtr = cfwPtr->word; + *cfPtrPtr = cfwPtr->framePtr; + return; + } + + /* + * Check if the Tcl_Obj has location information as a bytecode literal. We + * have to scan the stack up and check all bytecode frames for a possible + * definition. + */ + + for (framePtr = iPtr->cmdFramePtr; + framePtr; + framePtr = framePtr->nextPtr) { + const ByteCode* codePtr; + Tcl_HashEntry* hePtr; + + if (framePtr->type != TCL_LOCATION_BC) continue; + + codePtr = framePtr->data.tebc.codePtr; + hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); + + if (hePtr) { + ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); + Tcl_HashEntry *hlPtr = Tcl_FindHashEntry (&eclPtr->litIndex, (char *) obj); + + if (hlPtr) { + /* + * Convert from the current invoker CmdFrame to a CmdFrame + * refering to the actual word location. We are directly + * manipulating the relevant command frame in the frame stack. + * That is no problem because TEBC is already setting the pc + * for each invokation, so moving it somewhere will not affect + * the following commands. + */ + + ExtIndex* eiPtr = (ExtIndex*) Tcl_GetHashValue (hlPtr); + + framePtr->data.tebc.pc = codePtr->codeStart + eiPtr->pc; + *cfPtrPtr = framePtr; + *wordPtr = eiPtr->word; + } + } + } +} + +/* + *---------------------------------------------------------------------- * * Tcl_Eval -- * @@ -5494,65 +5719,52 @@ TclNREvalObjEx( * invokations. */ - if ((invoker->nline <= word) || (invoker->line[word] < 0)) { + int pc = 0; + CmdFrame *ctxPtr = (CmdFrame *) + TclStackAlloc(interp, sizeof(CmdFrame)); + + *ctxPtr = *invoker; + if (invoker->type == TCL_LOCATION_BC) { + /* + * Note: Type BC => ctxPtr->data.eval.path is not used. + * ctxPtr->data.tebc.codePtr is used instead. + */ + + TclGetSrcInfoForPc(ctxPtr); + pc = 1; + } + + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); + + if ((invoker->nline <= word) || + (invoker->line[word] < 0) || + (ctxPtr->type != TCL_LOCATION_SOURCE)) { /* * Dynamic script, or dynamic context, force our own context. */ - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = Tcl_EvalEx(interp, script, numSrcBytes, flags); } else { /* - * Try to get an absolute context for the evaluation. + * Absolute context to reuse. */ - int pc = 0; - CmdFrame *ctxPtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); + iPtr->invokeCmdFramePtr = ctxPtr; + iPtr->evalFlags |= TCL_EVAL_CTX; - *ctxPtr = *invoker; - if (invoker->type == TCL_LOCATION_BC) { - /* - * Note: Type BC => ctxPtr->data.eval.path is not used. - * ctxPtr->data.tebc.codePtr is used instead. - */ - - TclGetSrcInfoForPc(ctxPtr); - pc = 1; - } + result = TclEvalEx(interp, script, numSrcBytes, flags, + ctxPtr->line[word]); - if (ctxPtr->type == TCL_LOCATION_SOURCE) { + if (pc) { /* - * Absolute context to reuse. + * Death of SrcInfo reference. */ - - iPtr->invokeCmdFramePtr = ctxPtr; - iPtr->evalFlags |= TCL_EVAL_CTX; - - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - result = TclEvalEx(interp, script, numSrcBytes, flags, - ctxPtr->line[word]); - - if (pc) { - /* - * Death of SrcInfo reference. - */ - - Tcl_DecrRefCount(ctxPtr->data.eval.path); - } - } else { - /* - * Dynamic context or script, easier to make our own as - * well. - */ - - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - result = Tcl_EvalEx(interp, script, numSrcBytes, flags); + + Tcl_DecrRefCount(ctxPtr->data.eval.path); } - - TclStackFree(interp, ctxPtr); } + TclStackFree(interp, ctxPtr); } TclDecrRefCount(objPtr); return result; diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 303ecd5..6f4778b 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.98 2008/07/21 22:22:27 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.99 2008/07/21 22:50:34 andreas_kupries Exp $ */ #include "tclInt.h" @@ -657,10 +657,15 @@ Tcl_EvalObjCmd( if (objc == 2) { /* - * TIP #280. Make invoking context available to eval'd script. + * TIP #280. Make argument location available to eval'd script. */ - result = TclEvalObjEx(interp, objv[1], TCL_EVAL_DIRECT, iPtr->cmdFramePtr, 1); + CmdFrame* invoker = iPtr->cmdFramePtr; + int word = 1; + TclArgumentGet (interp, objv[1], &invoker, &word); + + result = TclEvalObjEx(interp, objv[1], TCL_EVAL_DIRECT, + invoker, word); } else { /* * More than one argument: concatenate them together with spaces diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 187d81e..88d8b86 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.149 2008/06/08 03:21:33 msofer Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.150 2008/07/21 22:50:34 andreas_kupries Exp $ */ #include "tclInt.h" @@ -801,6 +801,8 @@ TclCleanupByteCode( if (hePtr) { ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); int i; + Tcl_HashSearch hSearch; + Tcl_HashEntry *hlPtr; if (eclPtr->type == TCL_LOCATION_SOURCE) { Tcl_DecrRefCount(eclPtr->path); @@ -813,6 +815,15 @@ TclCleanupByteCode( ckfree((char *) eclPtr->loc); } + /* Release index of literals as well. */ + for (hlPtr = Tcl_FirstHashEntry(&eclPtr->litIndex, &hSearch); + hlPtr != NULL; + hlPtr = Tcl_NextHashEntry(&hSearch)) { + ExtIndex* eiPtr = (ExtIndex*) Tcl_GetHashValue (hlPtr); + ckfree((char*) eiPtr); + Tcl_DeleteHashEntry (hlPtr); + } + Tcl_DeleteHashTable (&eclPtr->litIndex); ckfree((char *) eclPtr); Tcl_DeleteHashEntry(hePtr); } @@ -902,6 +913,7 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->nloc = 0; envPtr->extCmdMapPtr->nuloc = 0; envPtr->extCmdMapPtr->path = NULL; + Tcl_InitHashTable(&envPtr->extCmdMapPtr->litIndex, TCL_ONE_WORD_KEYS); if (invoker == NULL) { /* @@ -1441,8 +1453,23 @@ TclCompileScript( TclHideLiteral(interp, envPtr, objIndex); } } else { + /* + * Simple argument word of a command. We reach this if and + * only if the command word was not compiled for whatever + * reason. Register the literal's location for use by + * uplevel, etc. commands, should they encounter it + * unmodified. We care only if the we are in a context + * which already allows absolute counting. + */ objIndex = TclRegisterNewLiteral(envPtr, tokenPtr[1].start, tokenPtr[1].size); + + if (eclPtr->type == TCL_LOCATION_SOURCE) { + TclEnterCmdWordIndex (eclPtr, + envPtr->literalArrayPtr[objIndex].objPtr, + envPtr->codeNext - envPtr->codeStart, + wordIdx); + } } TclEmitPush(objIndex, envPtr); } /* for loop */ @@ -2442,6 +2469,24 @@ EnterCmdWordData( eclPtr->nuloc ++; } +void +TclEnterCmdWordIndex (eclPtr, obj, pc, word) + ExtCmdLoc *eclPtr; + Tcl_Obj* obj; + int pc; + int word; +{ + int new; + ExtIndex* eiPtr = (ExtIndex*) ckalloc (sizeof (ExtIndex)); + + eiPtr->pc = pc; + eiPtr->word = word; + + Tcl_SetHashValue (Tcl_CreateHashEntry (&eclPtr->litIndex, + (char*) obj, &new), + eiPtr); +} + /* *---------------------------------------------------------------------- * diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 21ff9cc..a27bbd9 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.93 2008/07/13 09:03:33 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.94 2008/07/21 22:50:34 andreas_kupries Exp $ */ #ifndef _TCLCOMPILATION @@ -129,7 +129,7 @@ typedef struct CmdLocation { typedef struct ECL { int srcOffset; /* Command location to find the entry. */ - int nline; + int nline; /* Number of words in the command */ int *line; /* Line information for all words in the * command. */ } ECL; @@ -141,8 +141,17 @@ typedef struct ExtCmdLoc { ECL *loc; /* Command word locations (lines). */ int nloc; /* Number of allocated entries in 'loc'. */ int nuloc; /* Number of used entries in 'loc'. */ + Tcl_HashTable litIndex; /* HashValue is ExtIndex* */ } ExtCmdLoc; +typedef struct ExtIndex { + int pc; /* Instruction pointer of a command in ExtCmdLoc.loc[.] */ + int word; /* Index of word in ExtCmdLoc.loc[cmd]->line[.] */ +} ExtIndex; + +EXTERN void TclEnterCmdWordIndex (ExtCmdLoc *eclPtr, Tcl_Obj* obj, + int pc, int word); + /* * CompileProcs need the ability to record information during compilation that * can be used by bytecode instructions during execution. The AuxData diff --git a/generic/tclInt.h b/generic/tclInt.h index 1857153..7614f32 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.375 2008/07/21 16:26:06 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.376 2008/07/21 22:50:34 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -1150,6 +1150,12 @@ typedef struct CmdFrame { } cmd; } CmdFrame; +typedef struct CFWord { + CmdFrame* framePtr; /* CmdFrame to acess */ + int word; /* Index of the word in the command */ + int refCount; /* #times the word is on the stack */ +} CFWord; + /* * The following macros define the allowed values for the type field of the * CmdFrame structure above. Some of the values occur only in the extended @@ -1862,11 +1868,26 @@ typedef struct Interp { Tcl_HashTable *linePBodyPtr;/* This table remembers for each statically * defined procedure the location information * for its body. It is keyed by the address of - * the Proc structure for a procedure. */ + * the Proc structure for a procedure. The + * values are "struct CmdFrame*". */ Tcl_HashTable *lineBCPtr; /* This table remembers for each ByteCode * object the location information for its * body. It is keyed by the address of the - * Proc structure for a procedure. */ + * Proc structure for a procedure. The values + * are "struct ExtCmdLoc*" (See tclCompile.h) */ + Tcl_HashTable* lineLAPtr; /* This table remembers for each argument of a + * command on the execution stack the index of + * the argument in the command, and the + * location data of the command. It is keyed + * by the address of the Tcl_Obj containing + * the argument. The values are "struct + * CFWord*" (See tclBasic.c). This allows + * commands like uplevel, eval, etc. to find + * location information for their arguments, + * if they are a proper literal argument to an + * invoking command. Alt view: An index to the + * CmdFrame stack keyed by command argument + * holders. */ /* * TIP #268. The currently active selection mode, i.e. the package require * preferences. @@ -2486,6 +2507,12 @@ MODULE_SCOPE int TclEvalObjv(Tcl_Interp *interp, int objc, MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); +MODULE_SCOPE void TclArgumentEnter(Tcl_Interp* interp, + Tcl_Obj* objv[], int objc, CmdFrame* cf); +MODULE_SCOPE void TclArgumentRelease(Tcl_Interp* interp, + Tcl_Obj* objv[], int objc); +MODULE_SCOPE void TclArgumentGet(Tcl_Interp* interp, Tcl_Obj* obj, + CmdFrame** cfPtrPtr, int* wordPtr); MODULE_SCOPE int TclArraySet(Tcl_Interp *interp, Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj); MODULE_SCOPE double TclBignumToDouble(mp_int *bignum); diff --git a/generic/tclInterp.c b/generic/tclInterp.c index b4b89a4..6c55d97 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.91 2008/07/19 22:50:40 nijtmans Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.92 2008/07/21 22:50:35 andreas_kupries Exp $ */ #include "tclInt.h" @@ -2614,7 +2614,7 @@ SlaveEval( if (objc == 1) { /* - * TIP #280: Make invoker available to eval'd script. + * TIP #280: Make actual argument location available to eval'd script. * * Do not let any intReps accross, with the exception of * bytecodes. The intrep spoiling is due to happen anyway when @@ -2622,6 +2622,8 @@ SlaveEval( */ Interp *iPtr = (Interp *) interp; + CmdFrame* invoker = iPtr->cmdFramePtr; + int word = 0; objPtr = objv[0]; if (objPtr->typePtr @@ -2631,8 +2633,10 @@ SlaveEval( TclFreeIntRep(objPtr); objPtr->typePtr = NULL; } + + TclArgumentGet (interp, objPtr, &invoker, &word); - result = TclEvalObjEx(slaveInterp, objPtr, 0, iPtr->cmdFramePtr, 0); + result = TclEvalObjEx(slaveInterp, objPtr, 0, invoker, word); } else { objPtr = Tcl_ConcatObj(objc, objv); Tcl_IncrRefCount(objPtr); diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index cf7e250..3eda959 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.170 2008/07/21 16:26:08 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.171 2008/07/21 22:50:36 andreas_kupries Exp $ */ #include "tclInt.h" @@ -3265,6 +3265,8 @@ NamespaceEvalCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; + CmdFrame* invoker; + int word; Tcl_Namespace *namespacePtr; CallFrame *framePtr, **framePtrPtr; Tcl_Obj *objPtr; @@ -3312,7 +3314,14 @@ NamespaceEvalCmd( framePtr->objv = objv; if (objc == 4) { - objPtr = objv[3]; + /* + * TIP #280: Make actual argument location available to eval'd script. + */ + + objPtr = objv[3]; + invoker = iPtr->cmdFramePtr; + word = 3; + TclArgumentGet (interp, objPtr, &invoker, &word); } else { /* * More than one argument: concatenate them together with spaces @@ -3320,7 +3329,9 @@ NamespaceEvalCmd( * object when it decrements its refcount after eval'ing it. */ - objPtr = Tcl_ConcatObj(objc-3, objv+3); + objPtr = Tcl_ConcatObj(objc-3, objv+3); + invoker = NULL; + word = 0; } /* @@ -3329,7 +3340,7 @@ NamespaceEvalCmd( TclNRAddCallback(interp, NsEval_Callback, namespacePtr, "eval", NULL, NULL); - return TclNREvalObjEx(interp, objPtr, 0, iPtr->cmdFramePtr, 3); + return TclNREvalObjEx(interp, objPtr, 0, invoker, word); } static int diff --git a/generic/tclProc.c b/generic/tclProc.c index 713ee18..9947549 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.150 2008/07/21 03:43:32 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.151 2008/07/21 22:50:36 andreas_kupries Exp $ */ #include "tclInt.h" @@ -919,6 +919,8 @@ TclNRUplevelObjCmd( { register Interp *iPtr = (Interp *) interp; + CmdFrame* invoker = NULL; + int word = 0; int result; CallFrame *savedVarFramePtr, *framePtr; Tcl_Obj *objPtr; @@ -955,7 +957,13 @@ TclNRUplevelObjCmd( */ if (objc == 1) { + /* + * TIP #280. Make actual argument location available to eval'd script + */ + + TclArgumentGet (interp, objv[0], &invoker, &word); objPtr = objv[0]; + } else { /* * More than one argument: concatenate them together with spaces @@ -968,7 +976,7 @@ TclNRUplevelObjCmd( TclNRAddCallback(interp, Uplevel_Callback, savedVarFramePtr, NULL, NULL, NULL); - return TclNREvalObjEx(interp, objPtr, 0, NULL, 0); + return TclNREvalObjEx(interp, objPtr, 0, invoker, word); } /* diff --git a/tests/info.test b/tests/info.test index a83a1fc..43fc794 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.50 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: info.test,v 1.51 2008/07/21 22:50:36 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -746,15 +746,15 @@ test info-22.2 {info frame, bad level absolute} {!singleTestInterp} { catch {info frame 9} msg set msg } {bad level "9"} -test info-22.3 {info frame, current, relative} { +test info-22.3 {info frame, current, relative} -match glob -body { info frame 0 -} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} -test info-22.4 {info frame, current, relative, nested} { +} -result {type source line 750 file */info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-22.4 {info frame, current, relative, nested} -match glob -body { set res [info frame 0] -} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} -test info-22.5 {info frame, current, absolute} {!singleTestInterp} { +} -result {type source line 753 file */info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-22.5 {info frame, current, absolute} -constraints {!singleTestInterp} -match glob -body { reduce [info frame 7] -} {type eval line 2 cmd {info frame 7} proc ::tcltest::RunTest} +} -result {type source line 756 file info.test cmd {info frame 7} proc ::tcltest::RunTest} test info-22.6 {info frame, global, relative} {!singleTestInterp} { reduce [info frame -6] } {type source line 758 file info.test cmd test\ info-22.6\ \{info\ frame,\ global,\ relative\}\ \{!singleTestInter level 0} -- cgit v0.12 From 35e3d899aaa7f90fdf39652a2a4fdd45fc14965b Mon Sep 17 00:00:00 2001 From: das Date: Mon, 21 Jul 2008 23:46:51 +0000 Subject: fix warning, formatting, whitespace --- generic/tclBasic.c | 148 +++++++++++++++++++++++++++++------------------------ 1 file changed, 80 insertions(+), 68 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9ccc388..8c4f69a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.322 2008/07/21 22:50:34 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.323 2008/07/21 23:46:51 das Exp $ */ #include "tclInt.h" @@ -1533,10 +1533,10 @@ DeleteInterpProc( * there are no arguments, so this table has to be empty. */ - Tcl_Panic ("Argument location tracking table not empty"); + Tcl_Panic("Argument location tracking table not empty"); } - Tcl_DeleteHashTable (iPtr->lineLAPtr); + Tcl_DeleteHashTable(iPtr->lineLAPtr); ckfree((char*) iPtr->lineLAPtr); iPtr->lineLAPtr = NULL; } @@ -5080,11 +5080,11 @@ TclEvalEx( eeFramePtr->nline = objectsUsed; eeFramePtr->line = lines; - TclArgumentEnter (interp, objv, objectsUsed, eeFramePtr); + TclArgumentEnter(interp, objv, objectsUsed, eeFramePtr); iPtr->cmdFramePtr = eeFramePtr; code = TclEvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR, NULL); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; - TclArgumentRelease (interp, objv, objectsUsed); + TclArgumentRelease(interp, objv, objectsUsed); eeFramePtr->line = NULL; eeFramePtr->nline = 0; @@ -5262,18 +5262,18 @@ TclAdvanceLines( */ void -TclArgumentEnter(interp,objv,objc,cfPtr) - Tcl_Interp* interp; - Tcl_Obj** objv; - int objc; - CmdFrame* cfPtr; +TclArgumentEnter( + Tcl_Interp *interp, + Tcl_Obj **objv, + int objc, + CmdFrame *cfPtr) { - Interp* iPtr = (Interp*) interp; + Interp *iPtr = (Interp*) interp; int new, i; - Tcl_HashEntry* hPtr; - CFWord* cfwPtr; + Tcl_HashEntry *hPtr; + CFWord *cfwPtr; - for (i=1; i < objc; i++) { + for (i = 1; i < objc; i++) { /* * Ignore argument words without line information (= dynamic). If * they are variables they may have location information associated @@ -5282,25 +5282,29 @@ TclArgumentEnter(interp,objv,objc,cfPtr) * something here. */ - if (cfPtr->line [i] < 0) continue; - hPtr = Tcl_CreateHashEntry (iPtr->lineLAPtr, (char*) objv[i], &new); + if (cfPtr->line[i] < 0) { + continue; + } + hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, (char*) objv[i], &new); if (new) { - /* - * The word is not on the stack yet, remember the current location - * and initialize references. - */ - cfwPtr = (CFWord*) ckalloc (sizeof (CFWord)); - cfwPtr->framePtr = cfPtr; - cfwPtr->word = i; - cfwPtr->refCount = 1; - Tcl_SetHashValue (hPtr, cfwPtr); + /* + * The word is not on the stack yet, remember the current location + * and initialize references. + */ + + cfwPtr = (CFWord*) ckalloc(sizeof(CFWord)); + cfwPtr->framePtr = cfPtr; + cfwPtr->word = i; + cfwPtr->refCount = 1; + Tcl_SetHashValue(hPtr, cfwPtr); } else { - /* - * The word is already on the stack, its current location is not - * relevant. Just remember the reference to prevent early removal. - */ - cfwPtr = (CFWord*) Tcl_GetHashValue (hPtr); - cfwPtr->refCount ++; + /* + * The word is already on the stack, its current location is not + * relevant. Just remember the reference to prevent early removal. + */ + + cfwPtr = (CFWord*) Tcl_GetHashValue(hPtr); + cfwPtr->refCount++; } } } @@ -5326,27 +5330,31 @@ TclArgumentEnter(interp,objv,objc,cfPtr) */ void -TclArgumentRelease(interp,objv,objc) - Tcl_Interp* interp; - Tcl_Obj** objv; - int objc; +TclArgumentRelease( + Tcl_Interp *interp, + Tcl_Obj **objv, + int objc) { - Interp* iPtr = (Interp*) interp; - Tcl_HashEntry* hPtr; - CFWord* cfwPtr; + Interp *iPtr = (Interp*) interp; + Tcl_HashEntry *hPtr; + CFWord *cfwPtr; int i; - for (i=1; i < objc; i++) { - hPtr = Tcl_FindHashEntry (iPtr->lineLAPtr, (char *) objv[i]); + for (i = 1; i < objc; i++) { + hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) objv[i]); - if (!hPtr) { continue; } - cfwPtr = (CFWord*) Tcl_GetHashValue (hPtr); + if (!hPtr) { + continue; + } + cfwPtr = (CFWord*) Tcl_GetHashValue(hPtr); - cfwPtr->refCount --; - if (cfwPtr->refCount > 0) { continue; } + cfwPtr->refCount--; + if (cfwPtr->refCount > 0) { + continue; + } - ckfree ((char*) cfwPtr); - Tcl_DeleteHashEntry (hPtr); + ckfree((char*) cfwPtr); + Tcl_DeleteHashEntry(hPtr); } } @@ -5369,24 +5377,25 @@ TclArgumentRelease(interp,objv,objc) */ void -TclArgumentGet(interp,obj,cfPtrPtr,wordPtr) - Tcl_Interp* interp; - Tcl_Obj* obj; - CmdFrame** cfPtrPtr; - int* wordPtr; +TclArgumentGet( + Tcl_Interp *interp, + Tcl_Obj *obj, + CmdFrame **cfPtrPtr, + int *wordPtr) { - Interp* iPtr = (Interp*) interp; - Tcl_HashEntry* hPtr; - CmdFrame* framePtr; + Interp *iPtr = (Interp*) interp; + Tcl_HashEntry *hPtr; + CmdFrame *framePtr; /* * First look for location information recorded in the argument * stack. That is nearest. */ - hPtr = Tcl_FindHashEntry (iPtr->lineLAPtr, (char *) obj); + hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) obj); if (hPtr) { - CFWord* cfwPtr = (CFWord*) Tcl_GetHashValue (hPtr); + CFWord *cfwPtr = (CFWord*) Tcl_GetHashValue(hPtr); + *wordPtr = cfwPtr->word; *cfPtrPtr = cfwPtr->framePtr; return; @@ -5398,20 +5407,22 @@ TclArgumentGet(interp,obj,cfPtrPtr,wordPtr) * definition. */ - for (framePtr = iPtr->cmdFramePtr; - framePtr; - framePtr = framePtr->nextPtr) { - const ByteCode* codePtr; - Tcl_HashEntry* hePtr; + for (framePtr = iPtr->cmdFramePtr; framePtr; + framePtr = framePtr->nextPtr) { + const ByteCode *codePtr; + Tcl_HashEntry *hePtr; - if (framePtr->type != TCL_LOCATION_BC) continue; + if (framePtr->type != TCL_LOCATION_BC) { + continue; + } codePtr = framePtr->data.tebc.codePtr; - hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); + hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr); if (hePtr) { - ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); - Tcl_HashEntry *hlPtr = Tcl_FindHashEntry (&eclPtr->litIndex, (char *) obj); + ExtCmdLoc *eclPtr = (ExtCmdLoc*) Tcl_GetHashValue(hePtr); + Tcl_HashEntry *hlPtr = Tcl_FindHashEntry(&eclPtr->litIndex, + (char *) obj); if (hlPtr) { /* @@ -5423,9 +5434,10 @@ TclArgumentGet(interp,obj,cfPtrPtr,wordPtr) * the following commands. */ - ExtIndex* eiPtr = (ExtIndex*) Tcl_GetHashValue (hlPtr); + ExtIndex *eiPtr = (ExtIndex*) Tcl_GetHashValue(hlPtr); - framePtr->data.tebc.pc = codePtr->codeStart + eiPtr->pc; + framePtr->data.tebc.pc = (char *) (codePtr->codeStart + + eiPtr->pc); *cfPtrPtr = framePtr; *wordPtr = eiPtr->word; } @@ -5760,7 +5772,7 @@ TclNREvalObjEx( /* * Death of SrcInfo reference. */ - + Tcl_DecrRefCount(ctxPtr->data.eval.path); } } -- cgit v0.12 From 63d4144a37db8c69be1a8090936516467f684480 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 22 Jul 2008 21:02:25 +0000 Subject: * generic/tclBasic.c: Added numLevels field to CommandFrame, * generic/tclExecute.c: let GetCommandSource use it. This solves * generic/tclInt.h: [Bug 2017146]. Thx dgp for the analysis. --- ChangeLog | 8 +++++++- generic/tclBasic.c | 6 ++++-- generic/tclExecute.c | 3 ++- generic/tclInt.h | 4 +++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d388303..6d06add 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2008-07-21 Andreas Kupries +2008-07-22 Miguel Sofer + + * generic/tclBasic.c: Added numLevels field to CommandFrame, + * generic/tclExecute.c: let GetCommandSource use it. This solves + * generic/tclInt.h: [Bug 2017146]. Thx dgp for the analysis. + +2008-07-22 Andreas Kupries * generic/tclBasic.c: Extended the existing TIP #280 system (info * generic/tclCmdAH.c: frame), added the ability to track the diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8c4f69a..f7c667a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.323 2008/07/21 23:46:51 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.324 2008/07/22 21:02:27 msofer Exp $ */ #include "tclInt.h" @@ -3161,7 +3161,7 @@ GetCommandSource( int numChars; objPtr = Tcl_NewListObj(objc, objv); - if (lookup && cfPtr) { + if (lookup && cfPtr && (cfPtr->numLevels == iPtr->numLevels-1)) { switch (cfPtr->type) { case TCL_LOCATION_EVAL: case TCL_LOCATION_SOURCE: @@ -4910,6 +4910,7 @@ TclEvalEx( } eeFramePtr->level = iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level + 1 : 1; + eeFramePtr->numLevels = iPtr->numLevels; eeFramePtr->framePtr = iPtr->framePtr; eeFramePtr->nextPtr = iPtr->cmdFramePtr; eeFramePtr->nline = 0; @@ -5640,6 +5641,7 @@ TclNREvalObjEx( eoFramePtr->type = TCL_LOCATION_EVAL_LIST; eoFramePtr->level = (iPtr->cmdFramePtr == NULL? 1 : iPtr->cmdFramePtr->level + 1); + eoFramePtr->numLevels = iPtr->numLevels; eoFramePtr->framePtr = iPtr->framePtr; eoFramePtr->nextPtr = iPtr->cmdFramePtr; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 148b3e9..b26d77e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.385 2008/07/21 19:41:42 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.386 2008/07/22 21:02:28 msofer Exp $ */ #include "tclInt.h" @@ -1867,6 +1867,7 @@ TclExecuteByteCode( bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) ? TCL_LOCATION_PREBC : TCL_LOCATION_BC); bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1); + bcFramePtr->numLevels = iPtr->numLevels; bcFramePtr->framePtr = iPtr->framePtr; bcFramePtr->nextPtr = iPtr->cmdFramePtr; bcFramePtr->nline = 0; diff --git a/generic/tclInt.h b/generic/tclInt.h index 7614f32..dad62a8 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.376 2008/07/21 22:50:34 andreas_kupries Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.377 2008/07/22 21:02:30 msofer Exp $ */ #ifndef _TCLINT @@ -1094,6 +1094,8 @@ typedef struct CmdFrame { int type; /* Values see below. */ int level; /* #Frames in stack, prevent O(n) scan of * list. */ + int numLevels; /* value of interp's numLevels when the frame + * was pushed */ int *line; /* Lines the words of the command start on. */ int nline; -- cgit v0.12 From 9f031215bb9752fcfc9c9065039b509c0962117e Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 22 Jul 2008 21:41:48 +0000 Subject: * generic/tclBasic.c: Reworked the handling of bytecode literals * generic/tclCompile.c: for #280 to fix the abysmal performance * generic/tclCompile.h: for deep recursion, replaced the linear * generic/tclExecute.c: search through the whole stack with * generic/tclInt.h: another hashtable and simplified the data structure used by the compiler (array instead of hashtable). Incidentially this also fixes the memory leak reported via [Bug 2024937]. --- ChangeLog | 11 ++++ generic/tclBasic.c | 140 +++++++++++++++++++++++++++++++++++++-------------- generic/tclCompile.c | 43 ++++++++++------ generic/tclCompile.h | 13 +++-- generic/tclExecute.c | 7 ++- generic/tclInt.h | 20 +++++++- 6 files changed, 171 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d06add..57158b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-07-22 Andreas Kupries + + * generic/tclBasic.c: Reworked the handling of bytecode literals + * generic/tclCompile.c: for #280 to fix the abysmal performance + * generic/tclCompile.h: for deep recursion, replaced the linear + * generic/tclExecute.c: search through the whole stack with + * generic/tclInt.h: another hashtable and simplified the data + structure used by the compiler (array instead of hashtable). + Incidentially this also fixes the memory leak reported via [Bug + 2024937]. + 2008-07-22 Miguel Sofer * generic/tclBasic.c: Added numLevels field to CommandFrame, diff --git a/generic/tclBasic.c b/generic/tclBasic.c index f7c667a..18a9857 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.324 2008/07/22 21:02:27 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.325 2008/07/22 21:41:49 andreas_kupries Exp $ */ #include "tclInt.h" @@ -498,9 +498,11 @@ Tcl_CreateInterp(void) iPtr->linePBodyPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); iPtr->lineBCPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); iPtr->lineLAPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); + iPtr->lineLABCPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); Tcl_InitHashTable(iPtr->linePBodyPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineBCPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineLAPtr, TCL_ONE_WORD_KEYS); + Tcl_InitHashTable(iPtr->lineLABCPtr, TCL_ONE_WORD_KEYS); iPtr->activeVarTracePtr = NULL; @@ -1539,6 +1541,19 @@ DeleteInterpProc( Tcl_DeleteHashTable(iPtr->lineLAPtr); ckfree((char*) iPtr->lineLAPtr); iPtr->lineLAPtr = NULL; + + if (iPtr->lineLABCPtr->numEntries) { + /* + * When the interp goes away we have nothing on the stack, so + * there are no arguments, so this table has to be empty. + */ + + Tcl_Panic ("Argument location tracking table not empty"); + } + + Tcl_DeleteHashTable (iPtr->lineLABCPtr); + ckfree((char*) iPtr->lineLABCPtr); + iPtr->lineLABCPtr = NULL; } Tcl_DeleteHashTable(&iPtr->varTraces); @@ -5359,6 +5374,81 @@ TclArgumentRelease( } } + +void +TclArgumentBCEnter(interp,codePtr,cfPtr) + Tcl_Interp* interp; + void* codePtr; + CmdFrame* cfPtr; +{ + Interp* iPtr = (Interp*) interp; + Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); + + if (hePtr) { + ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); + int i; + + for (i=0; i < eclPtr->nueiloc; i++) { + + ExtIndex* eiPtr = &eclPtr->eiloc[i]; + Tcl_Obj* obj = eiPtr->obj; + int new; + Tcl_HashEntry* hPtr; + CFWordBC* cfwPtr; + + hPtr = Tcl_CreateHashEntry (iPtr->lineLABCPtr, (char*) obj, &new); + if (new) { + /* + * The word is not on the stack yet, remember the current location + * and initialize references. + */ + cfwPtr = (CFWordBC*) ckalloc (sizeof (CFWordBC)); + cfwPtr->framePtr = cfPtr; + cfwPtr->eiPtr = eiPtr; + cfwPtr->refCount = 1; + Tcl_SetHashValue (hPtr, cfwPtr); + } else { + /* + * The word is already on the stack, its current location is not + * relevant. Just remember the reference to prevent early removal. + */ + cfwPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); + cfwPtr->refCount ++; + } + } /* for */ + } /* if */ +} + +void +TclArgumentBCRelease(interp,codePtr) + Tcl_Interp* interp; + void* codePtr; +{ + Interp* iPtr = (Interp*) interp; + Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); + + if (hePtr) { + ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); + int i; + + for (i=0; i < eclPtr->nueiloc; i++) { + Tcl_Obj* obj = eclPtr->eiloc[i].obj; + Tcl_HashEntry* hPtr = Tcl_FindHashEntry (iPtr->lineLABCPtr, (char *) obj); + CFWordBC* cfwPtr; + + if (!hPtr) { continue; } + + cfwPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); + + cfwPtr->refCount --; + if (cfwPtr->refCount > 0) { continue; } + + ckfree ((char*) cfwPtr); + Tcl_DeleteHashEntry (hPtr); + } /* for */ + } /* if */ +} + /* *---------------------------------------------------------------------- * @@ -5403,46 +5493,20 @@ TclArgumentGet( } /* - * Check if the Tcl_Obj has location information as a bytecode literal. We - * have to scan the stack up and check all bytecode frames for a possible - * definition. + * Check if the Tcl_Obj has location information as a bytecode literal, in + * that stack. */ - for (framePtr = iPtr->cmdFramePtr; framePtr; - framePtr = framePtr->nextPtr) { - const ByteCode *codePtr; - Tcl_HashEntry *hePtr; - - if (framePtr->type != TCL_LOCATION_BC) { - continue; - } - - codePtr = framePtr->data.tebc.codePtr; - hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr); - - if (hePtr) { - ExtCmdLoc *eclPtr = (ExtCmdLoc*) Tcl_GetHashValue(hePtr); - Tcl_HashEntry *hlPtr = Tcl_FindHashEntry(&eclPtr->litIndex, - (char *) obj); - - if (hlPtr) { - /* - * Convert from the current invoker CmdFrame to a CmdFrame - * refering to the actual word location. We are directly - * manipulating the relevant command frame in the frame stack. - * That is no problem because TEBC is already setting the pc - * for each invokation, so moving it somewhere will not affect - * the following commands. - */ - - ExtIndex *eiPtr = (ExtIndex*) Tcl_GetHashValue(hlPtr); + hPtr = Tcl_FindHashEntry (iPtr->lineLABCPtr, (char *) obj); + if (hPtr) { + CFWordBC* cfwPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); + ExtIndex* eiPtr = cfwPtr->eiPtr; - framePtr->data.tebc.pc = (char *) (codePtr->codeStart + - eiPtr->pc); - *cfPtrPtr = framePtr; - *wordPtr = eiPtr->word; - } - } + framePtr = cfwPtr->framePtr; + framePtr->data.tebc.pc = ((ByteCode*) framePtr->data.tebc.codePtr)->codeStart + eiPtr->pc; + *cfPtrPtr = cfwPtr->framePtr; + *wordPtr = eiPtr->word; + return; } } diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 88d8b86..79a9313 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.150 2008/07/21 22:50:34 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.151 2008/07/22 21:41:51 andreas_kupries Exp $ */ #include "tclInt.h" @@ -801,8 +801,6 @@ TclCleanupByteCode( if (hePtr) { ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); int i; - Tcl_HashSearch hSearch; - Tcl_HashEntry *hlPtr; if (eclPtr->type == TCL_LOCATION_SOURCE) { Tcl_DecrRefCount(eclPtr->path); @@ -816,14 +814,10 @@ TclCleanupByteCode( } /* Release index of literals as well. */ - for (hlPtr = Tcl_FirstHashEntry(&eclPtr->litIndex, &hSearch); - hlPtr != NULL; - hlPtr = Tcl_NextHashEntry(&hSearch)) { - ExtIndex* eiPtr = (ExtIndex*) Tcl_GetHashValue (hlPtr); - ckfree((char*) eiPtr); - Tcl_DeleteHashEntry (hlPtr); + if (eclPtr->eiloc != NULL) { + ckfree((char *) eclPtr->eiloc); } - Tcl_DeleteHashTable (&eclPtr->litIndex); + ckfree((char *) eclPtr); Tcl_DeleteHashEntry(hePtr); } @@ -913,7 +907,9 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->nloc = 0; envPtr->extCmdMapPtr->nuloc = 0; envPtr->extCmdMapPtr->path = NULL; - Tcl_InitHashTable(&envPtr->extCmdMapPtr->litIndex, TCL_ONE_WORD_KEYS); + envPtr->extCmdMapPtr->eiloc = NULL; + envPtr->extCmdMapPtr->neiloc = 0; + envPtr->extCmdMapPtr->nueiloc = 0; if (invoker == NULL) { /* @@ -2476,15 +2472,30 @@ TclEnterCmdWordIndex (eclPtr, obj, pc, word) int pc; int word; { - int new; - ExtIndex* eiPtr = (ExtIndex*) ckalloc (sizeof (ExtIndex)); + ExtIndex* eiPtr; + + if (eclPtr->nueiloc >= eclPtr->neiloc) { + /* + * Expand the ExtIndex array by allocating more storage from the heap. The + * currently allocated ECL entries are stored from eclPtr->loc[0] up + * to eclPtr->loc[eclPtr->nuloc-1] (inclusive). + */ + + size_t currElems = eclPtr->neiloc; + size_t newElems = (currElems ? 2*currElems : 1); + size_t newBytes = newElems * sizeof(ExtIndex); + + eclPtr->eiloc = (ExtIndex *) ckrealloc((char *)(eclPtr->eiloc), newBytes); + eclPtr->neiloc = newElems; + } + + eiPtr = &eclPtr->eiloc[eclPtr->nueiloc]; + eiPtr->obj = obj; eiPtr->pc = pc; eiPtr->word = word; - Tcl_SetHashValue (Tcl_CreateHashEntry (&eclPtr->litIndex, - (char*) obj, &new), - eiPtr); + eclPtr->nueiloc ++; } /* diff --git a/generic/tclCompile.h b/generic/tclCompile.h index a27bbd9..ec3cbbf 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.94 2008/07/21 22:50:34 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.95 2008/07/22 21:41:55 andreas_kupries Exp $ */ #ifndef _TCLCOMPILATION @@ -134,6 +134,8 @@ typedef struct ECL { * command. */ } ECL; +/* ExtIndex defined in tclInt.h */ + typedef struct ExtCmdLoc { int type; /* Context type. */ Tcl_Obj *path; /* Path of the sourced file the command is @@ -141,14 +143,11 @@ typedef struct ExtCmdLoc { ECL *loc; /* Command word locations (lines). */ int nloc; /* Number of allocated entries in 'loc'. */ int nuloc; /* Number of used entries in 'loc'. */ - Tcl_HashTable litIndex; /* HashValue is ExtIndex* */ + ExtIndex* eiloc; + int neiloc; + int nueiloc; } ExtCmdLoc; -typedef struct ExtIndex { - int pc; /* Instruction pointer of a command in ExtCmdLoc.loc[.] */ - int word; /* Index of word in ExtCmdLoc.loc[cmd]->line[.] */ -} ExtIndex; - EXTERN void TclEnterCmdWordIndex (ExtCmdLoc *eclPtr, Tcl_Obj* obj, int pc, int word); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index b26d77e..0102f5a 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.386 2008/07/22 21:02:28 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.387 2008/07/22 21:41:55 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1877,6 +1877,9 @@ TclExecuteByteCode( bcFramePtr->data.tebc.pc = NULL; bcFramePtr->cmd.str.cmd = NULL; bcFramePtr->cmd.str.len = 0; + + TclArgumentBCEnter((Tcl_Interp*) iPtr,codePtr,bcFramePtr); + #if (USE_NR_TEBC) } else if (tailcall) { goto tailcallEntry; @@ -7757,6 +7760,8 @@ TclExecuteByteCode( } } + TclArgumentBCRelease((Tcl_Interp*) iPtr,codePtr); + #if USE_NR_TEBC oldBottomPtr = bottomPtr->prevBottomPtr; #endif diff --git a/generic/tclInt.h b/generic/tclInt.h index dad62a8..7566e24 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.377 2008/07/22 21:02:30 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.378 2008/07/22 21:41:55 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -1158,6 +1158,19 @@ typedef struct CFWord { int refCount; /* #times the word is on the stack */ } CFWord; +typedef struct ExtIndex { + Tcl_Obj* obj; /* Reference to the word */ + int pc; /* Instruction pointer of a command in ExtCmdLoc.loc[.] */ + int word; /* Index of word in ExtCmdLoc.loc[cmd]->line[.] */ +} ExtIndex; + + +typedef struct CFWordBC { + CmdFrame* framePtr; /* CmdFrame to acess */ + ExtIndex* eiPtr; /* Word info: PC and index */ + int refCount; /* #times the word is on the stack */ +} CFWordBC; + /* * The following macros define the allowed values for the type field of the * CmdFrame structure above. Some of the values occur only in the extended @@ -1877,6 +1890,7 @@ typedef struct Interp { * body. It is keyed by the address of the * Proc structure for a procedure. The values * are "struct ExtCmdLoc*" (See tclCompile.h) */ + Tcl_HashTable* lineLABCPtr; Tcl_HashTable* lineLAPtr; /* This table remembers for each argument of a * command on the execution stack the index of * the argument in the command, and the @@ -2513,6 +2527,10 @@ MODULE_SCOPE void TclArgumentEnter(Tcl_Interp* interp, Tcl_Obj* objv[], int objc, CmdFrame* cf); MODULE_SCOPE void TclArgumentRelease(Tcl_Interp* interp, Tcl_Obj* objv[], int objc); +MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp* interp, + void* codePtr, CmdFrame* cfPtr); +MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp* interp, + void* codePtr); MODULE_SCOPE void TclArgumentGet(Tcl_Interp* interp, Tcl_Obj* obj, CmdFrame** cfPtrPtr, int* wordPtr); MODULE_SCOPE int TclArraySet(Tcl_Interp *interp, -- cgit v0.12 From 6df65aa18ab8b9cb1f2791881680962f47e22804 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 22 Jul 2008 21:50:49 +0000 Subject: * generic/tclBasic.c: Ansified the new functions. --- ChangeLog | 2 ++ generic/tclBasic.c | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57158b1..bbaf214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-22 Andreas Kupries + * generic/tclBasic.c: Ansified the new functions. + * generic/tclBasic.c: Reworked the handling of bytecode literals * generic/tclCompile.c: for #280 to fix the abysmal performance * generic/tclCompile.h: for deep recursion, replaced the linear diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 18a9857..f12f5fc 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.325 2008/07/22 21:41:49 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.326 2008/07/22 21:50:50 andreas_kupries Exp $ */ #include "tclInt.h" @@ -5376,10 +5376,10 @@ TclArgumentRelease( void -TclArgumentBCEnter(interp,codePtr,cfPtr) - Tcl_Interp* interp; - void* codePtr; - CmdFrame* cfPtr; +TclArgumentBCEnter( + Tcl_Interp* interp, + void* codePtr, + CmdFrame* cfPtr) { Interp* iPtr = (Interp*) interp; Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); @@ -5420,9 +5420,9 @@ TclArgumentBCEnter(interp,codePtr,cfPtr) } void -TclArgumentBCRelease(interp,codePtr) - Tcl_Interp* interp; - void* codePtr; +TclArgumentBCRelease( + Tcl_Interp* interp, + void* codePtr) { Interp* iPtr = (Interp*) interp; Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); @@ -5503,7 +5503,9 @@ TclArgumentGet( ExtIndex* eiPtr = cfwPtr->eiPtr; framePtr = cfwPtr->framePtr; - framePtr->data.tebc.pc = ((ByteCode*) framePtr->data.tebc.codePtr)->codeStart + eiPtr->pc; + framePtr->data.tebc.pc = ((ByteCode*) + framePtr->data.tebc.codePtr)->codeStart + + eiPtr->pc; *cfPtrPtr = cfwPtr->framePtr; *wordPtr = eiPtr->word; return; -- cgit v0.12 From 0ed5c6869b7c4c0b89033e5f79d317cdcc947c3f Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 22 Jul 2008 22:24:19 +0000 Subject: * generic/tclCompile.c: Made the new TclEnterCmdWordIndex * generic/tclCompile.h: static, and ansified. --- ChangeLog | 5 ++++- generic/tclCompile.c | 25 ++++++++++++++----------- generic/tclCompile.h | 5 +---- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index bbaf214..3519537 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-22 Andreas Kupries + * generic/tclCompile.c: Made the new TclEnterCmdWordIndex + * generic/tclCompile.h: static, and ansified. + * generic/tclBasic.c: Ansified the new functions. * generic/tclBasic.c: Reworked the handling of bytecode literals @@ -17,7 +20,7 @@ * generic/tclExecute.c: let GetCommandSource use it. This solves * generic/tclInt.h: [Bug 2017146]. Thx dgp for the analysis. -2008-07-22 Andreas Kupries +2008-07-21 Andreas Kupries * generic/tclBasic.c: Extended the existing TIP #280 system (info * generic/tclCmdAH.c: frame), added the ability to track the diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 79a9313..c754ef1 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.151 2008/07/22 21:41:51 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.152 2008/07/22 22:24:21 andreas_kupries Exp $ */ #include "tclInt.h" @@ -433,6 +433,9 @@ static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset, Tcl_Token *tokenPtr, const char *cmd, int len, int numWords, int line, int **lines); +static void EnterCmdWordIndex (ExtCmdLoc *eclPtr, Tcl_Obj* obj, + int pc, int word); + /* * The structure below defines the bytecode Tcl object type by means of * procedures that can be invoked by generic object code. @@ -1461,10 +1464,10 @@ TclCompileScript( tokenPtr[1].start, tokenPtr[1].size); if (eclPtr->type == TCL_LOCATION_SOURCE) { - TclEnterCmdWordIndex (eclPtr, - envPtr->literalArrayPtr[objIndex].objPtr, - envPtr->codeNext - envPtr->codeStart, - wordIdx); + EnterCmdWordIndex (eclPtr, + envPtr->literalArrayPtr[objIndex].objPtr, + envPtr->codeNext - envPtr->codeStart, + wordIdx); } } TclEmitPush(objIndex, envPtr); @@ -2465,12 +2468,12 @@ EnterCmdWordData( eclPtr->nuloc ++; } -void -TclEnterCmdWordIndex (eclPtr, obj, pc, word) - ExtCmdLoc *eclPtr; - Tcl_Obj* obj; - int pc; - int word; +static void +EnterCmdWordIndex ( + ExtCmdLoc *eclPtr, + Tcl_Obj* obj, + int pc, + int word) { ExtIndex* eiPtr; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index ec3cbbf..63df8ce 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.95 2008/07/22 21:41:55 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.96 2008/07/22 22:24:21 andreas_kupries Exp $ */ #ifndef _TCLCOMPILATION @@ -148,9 +148,6 @@ typedef struct ExtCmdLoc { int nueiloc; } ExtCmdLoc; -EXTERN void TclEnterCmdWordIndex (ExtCmdLoc *eclPtr, Tcl_Obj* obj, - int pc, int word); - /* * CompileProcs need the ability to record information during compilation that * can be used by bytecode instructions during execution. The AuxData -- cgit v0.12 From fdb533a9bb00c69ab15e4d7915fca655ef17013f Mon Sep 17 00:00:00 2001 From: das Date: Tue, 22 Jul 2008 22:26:00 +0000 Subject: fix warning; formatting --- generic/tclBasic.c | 98 +++++++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 46 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index f12f5fc..10dc886 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.326 2008/07/22 21:50:50 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.327 2008/07/22 22:26:00 das Exp $ */ #include "tclInt.h" @@ -497,8 +497,8 @@ Tcl_CreateInterp(void) iPtr->cmdFramePtr = NULL; iPtr->linePBodyPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); iPtr->lineBCPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); - iPtr->lineLAPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); - iPtr->lineLABCPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); + iPtr->lineLAPtr = (Tcl_HashTable*) ckalloc(sizeof(Tcl_HashTable)); + iPtr->lineLABCPtr = (Tcl_HashTable*) ckalloc(sizeof(Tcl_HashTable)); Tcl_InitHashTable(iPtr->linePBodyPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineBCPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineLAPtr, TCL_ONE_WORD_KEYS); @@ -1548,10 +1548,10 @@ DeleteInterpProc( * there are no arguments, so this table has to be empty. */ - Tcl_Panic ("Argument location tracking table not empty"); + Tcl_Panic("Argument location tracking table not empty"); } - Tcl_DeleteHashTable (iPtr->lineLABCPtr); + Tcl_DeleteHashTable(iPtr->lineLABCPtr); ckfree((char*) iPtr->lineLABCPtr); iPtr->lineLABCPtr = NULL; } @@ -5374,45 +5374,47 @@ TclArgumentRelease( } } - void TclArgumentBCEnter( - Tcl_Interp* interp, - void* codePtr, - CmdFrame* cfPtr) + Tcl_Interp *interp, + void *codePtr, + CmdFrame *cfPtr) { - Interp* iPtr = (Interp*) interp; - Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); + Interp *iPtr = (Interp*) interp; + Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, (char*) codePtr); if (hePtr) { - ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); + ExtCmdLoc *eclPtr = (ExtCmdLoc*) Tcl_GetHashValue(hePtr); int i; - for (i=0; i < eclPtr->nueiloc; i++) { + for (i = 0; i < eclPtr->nueiloc; i++) { - ExtIndex* eiPtr = &eclPtr->eiloc[i]; - Tcl_Obj* obj = eiPtr->obj; + ExtIndex *eiPtr = &eclPtr->eiloc[i]; + Tcl_Obj *obj = eiPtr->obj; int new; - Tcl_HashEntry* hPtr; - CFWordBC* cfwPtr; + Tcl_HashEntry *hPtr; + CFWordBC *cfwPtr; - hPtr = Tcl_CreateHashEntry (iPtr->lineLABCPtr, (char*) obj, &new); + hPtr = Tcl_CreateHashEntry(iPtr->lineLABCPtr, (char*) obj, &new); if (new) { /* - * The word is not on the stack yet, remember the current location - * and initialize references. + * The word is not on the stack yet, remember the current + * location and initialize references. */ - cfwPtr = (CFWordBC*) ckalloc (sizeof (CFWordBC)); + + cfwPtr = (CFWordBC*) ckalloc(sizeof(CFWordBC)); cfwPtr->framePtr = cfPtr; cfwPtr->eiPtr = eiPtr; cfwPtr->refCount = 1; - Tcl_SetHashValue (hPtr, cfwPtr); + Tcl_SetHashValue(hPtr, cfwPtr); } else { /* - * The word is already on the stack, its current location is not - * relevant. Just remember the reference to prevent early removal. + * The word is already on the stack, its current location is + * not relevant. Just remember the reference to prevent early + * removal. */ - cfwPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); + + cfwPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); cfwPtr->refCount ++; } } /* for */ @@ -5421,30 +5423,35 @@ TclArgumentBCEnter( void TclArgumentBCRelease( - Tcl_Interp* interp, - void* codePtr) + Tcl_Interp *interp, + void *codePtr) { - Interp* iPtr = (Interp*) interp; - Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); + Interp *iPtr = (Interp*) interp; + Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, (char*) codePtr); if (hePtr) { - ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); + ExtCmdLoc *eclPtr = (ExtCmdLoc*) Tcl_GetHashValue(hePtr); int i; - for (i=0; i < eclPtr->nueiloc; i++) { - Tcl_Obj* obj = eclPtr->eiloc[i].obj; - Tcl_HashEntry* hPtr = Tcl_FindHashEntry (iPtr->lineLABCPtr, (char *) obj); - CFWordBC* cfwPtr; + for (i = 0; i < eclPtr->nueiloc; i++) { + Tcl_Obj *obj = eclPtr->eiloc[i].obj; + Tcl_HashEntry *hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, + (char*) obj); + CFWordBC *cfwPtr; - if (!hPtr) { continue; } + if (!hPtr) { + continue; + } - cfwPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); + cfwPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); - cfwPtr->refCount --; - if (cfwPtr->refCount > 0) { continue; } + cfwPtr->refCount--; + if (cfwPtr->refCount > 0) { + continue; + } - ckfree ((char*) cfwPtr); - Tcl_DeleteHashEntry (hPtr); + ckfree((char*) cfwPtr); + Tcl_DeleteHashEntry(hPtr); } /* for */ } /* if */ } @@ -5497,15 +5504,14 @@ TclArgumentGet( * that stack. */ - hPtr = Tcl_FindHashEntry (iPtr->lineLABCPtr, (char *) obj); + hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) obj); if (hPtr) { - CFWordBC* cfwPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); - ExtIndex* eiPtr = cfwPtr->eiPtr; + CFWordBC *cfwPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); + ExtIndex *eiPtr = cfwPtr->eiPtr; framePtr = cfwPtr->framePtr; - framePtr->data.tebc.pc = ((ByteCode*) - framePtr->data.tebc.codePtr)->codeStart + - eiPtr->pc; + framePtr->data.tebc.pc = (char*) (((ByteCode*) + framePtr->data.tebc.codePtr)->codeStart + eiPtr->pc); *cfPtrPtr = cfwPtr->framePtr; *wordPtr = eiPtr->word; return; -- cgit v0.12 From ecee118e989091333f596e1ab060ed03fd99092f Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 22 Jul 2008 22:46:44 +0000 Subject: Added missing function comments. --- ChangeLog | 3 ++- generic/tclBasic.c | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3519537..22704ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,8 @@ * generic/tclCompile.c: Made the new TclEnterCmdWordIndex * generic/tclCompile.h: static, and ansified. - * generic/tclBasic.c: Ansified the new functions. + * generic/tclBasic.c: Ansified the new functions. Added missing + function comments. * generic/tclBasic.c: Reworked the handling of bytecode literals * generic/tclCompile.c: for #280 to fix the abysmal performance diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 10dc886..0e77315 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.327 2008/07/22 22:26:00 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.328 2008/07/22 22:46:46 andreas_kupries Exp $ */ #include "tclInt.h" @@ -5374,6 +5374,26 @@ TclArgumentRelease( } } +/* + *---------------------------------------------------------------------- + * + * TclArgumentBCEnter -- + * + * This procedure is a helper for the TIP #280 uplevel extension. + * It enters location references for the literal arguments of commands + * in bytecode about to be invoked. Only the first entry has the actual + * data, further entries simply count the usage up. + * + * Results: + * None. + * + * Side effects: + * May allocate memory. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + void TclArgumentBCEnter( Tcl_Interp *interp, @@ -5421,6 +5441,26 @@ TclArgumentBCEnter( } /* if */ } +/* + *---------------------------------------------------------------------- + * + * TclArgumentBCRelease -- + * + * This procedure is a helper for the TIP #280 uplevel extension. + * It removes the location references for the literal arguments of + * commands in bytecode just done. Usage is counted down, the data + * is removed only when no user is left over. + * + * Results: + * None. + * + * Side effects: + * May release memory. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + void TclArgumentBCRelease( Tcl_Interp *interp, -- cgit v0.12 From d163d0f0b3d1c048dff893c84af1b89108625e89 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 22 Jul 2008 23:01:31 +0000 Subject: fix line-endings --- generic/tclDecls.h | 13302 ++++++++++++++++++++++---------------------- generic/tclIntDecls.h | 4322 +++++++------- generic/tclIntPlatDecls.h | 1410 ++--- generic/tclOODecls.h | 764 +-- generic/tclOOIntDecls.h | 528 +- generic/tclOOStubInit.c | 156 +- generic/tclPlatDecls.h | 274 +- generic/tclStubInit.c | 2262 ++++---- generic/tclTomMathDecls.h | 1570 +++--- 9 files changed, 12294 insertions(+), 12294 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 171a93f..53ed4c6 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1,6651 +1,6651 @@ -/* - * tclDecls.h -- - * - * Declarations of functions in the platform independent public Tcl API. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclDecls.h,v 1.138 2008/07/21 21:02:15 ferrieux Exp $ - */ - -#ifndef _TCLDECLS -#define _TCLDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef Tcl_PkgProvideEx_TCL_DECLARED -#define Tcl_PkgProvideEx_TCL_DECLARED -/* 0 */ -EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, - CONST char* name, CONST char* version, - ClientData clientData); -#endif -#ifndef Tcl_PkgRequireEx_TCL_DECLARED -#define Tcl_PkgRequireEx_TCL_DECLARED -/* 1 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_Panic_TCL_DECLARED -#define Tcl_Panic_TCL_DECLARED -/* 2 */ -EXTERN void Tcl_Panic (CONST char * format, ...); -#endif -#ifndef Tcl_Alloc_TCL_DECLARED -#define Tcl_Alloc_TCL_DECLARED -/* 3 */ -EXTERN char * Tcl_Alloc (unsigned int size); -#endif -#ifndef Tcl_Free_TCL_DECLARED -#define Tcl_Free_TCL_DECLARED -/* 4 */ -EXTERN void Tcl_Free (char * ptr); -#endif -#ifndef Tcl_Realloc_TCL_DECLARED -#define Tcl_Realloc_TCL_DECLARED -/* 5 */ -EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_DbCkalloc_TCL_DECLARED -#define Tcl_DbCkalloc_TCL_DECLARED -/* 6 */ -EXTERN char * Tcl_DbCkalloc (unsigned int size, CONST char * file, - int line); -#endif -#ifndef Tcl_DbCkfree_TCL_DECLARED -#define Tcl_DbCkfree_TCL_DECLARED -/* 7 */ -EXTERN int Tcl_DbCkfree (char * ptr, CONST char * file, - int line); -#endif -#ifndef Tcl_DbCkrealloc_TCL_DECLARED -#define Tcl_DbCkrealloc_TCL_DECLARED -/* 8 */ -EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, - CONST char * file, int line); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer_TCL_DECLARED -#define Tcl_SetTimer_TCL_DECLARED -/* 11 */ -EXTERN void Tcl_SetTimer (Tcl_Time * timePtr); -#endif -#ifndef Tcl_Sleep_TCL_DECLARED -#define Tcl_Sleep_TCL_DECLARED -/* 12 */ -EXTERN void Tcl_Sleep (int ms); -#endif -#ifndef Tcl_WaitForEvent_TCL_DECLARED -#define Tcl_WaitForEvent_TCL_DECLARED -/* 13 */ -EXTERN int Tcl_WaitForEvent (Tcl_Time * timePtr); -#endif -#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED -#define Tcl_AppendAllObjTypes_TCL_DECLARED -/* 14 */ -EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendStringsToObj_TCL_DECLARED -#define Tcl_AppendStringsToObj_TCL_DECLARED -/* 15 */ -EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); -#endif -#ifndef Tcl_AppendToObj_TCL_DECLARED -#define Tcl_AppendToObj_TCL_DECLARED -/* 16 */ -EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, CONST char* bytes, - int length); -#endif -#ifndef Tcl_ConcatObj_TCL_DECLARED -#define Tcl_ConcatObj_TCL_DECLARED -/* 17 */ -EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_ConvertToType_TCL_DECLARED -#define Tcl_ConvertToType_TCL_DECLARED -/* 18 */ -EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_DbDecrRefCount_TCL_DECLARED -#define Tcl_DbDecrRefCount_TCL_DECLARED -/* 19 */ -EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, - CONST char * file, int line); -#endif -#ifndef Tcl_DbIncrRefCount_TCL_DECLARED -#define Tcl_DbIncrRefCount_TCL_DECLARED -/* 20 */ -EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, - CONST char * file, int line); -#endif -#ifndef Tcl_DbIsShared_TCL_DECLARED -#define Tcl_DbIsShared_TCL_DECLARED -/* 21 */ -EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, CONST char * file, - int line); -#endif -#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED -#define Tcl_DbNewBooleanObj_TCL_DECLARED -/* 22 */ -EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, - CONST char * file, int line); -#endif -#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED -#define Tcl_DbNewByteArrayObj_TCL_DECLARED -/* 23 */ -EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (CONST unsigned char * bytes, - int length, CONST char * file, int line); -#endif -#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED -#define Tcl_DbNewDoubleObj_TCL_DECLARED -/* 24 */ -EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, - CONST char * file, int line); -#endif -#ifndef Tcl_DbNewListObj_TCL_DECLARED -#define Tcl_DbNewListObj_TCL_DECLARED -/* 25 */ -EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *CONST * objv, - CONST char * file, int line); -#endif -#ifndef Tcl_DbNewLongObj_TCL_DECLARED -#define Tcl_DbNewLongObj_TCL_DECLARED -/* 26 */ -EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, CONST char * file, - int line); -#endif -#ifndef Tcl_DbNewObj_TCL_DECLARED -#define Tcl_DbNewObj_TCL_DECLARED -/* 27 */ -EXTERN Tcl_Obj * Tcl_DbNewObj (CONST char * file, int line); -#endif -#ifndef Tcl_DbNewStringObj_TCL_DECLARED -#define Tcl_DbNewStringObj_TCL_DECLARED -/* 28 */ -EXTERN Tcl_Obj * Tcl_DbNewStringObj (CONST char * bytes, int length, - CONST char * file, int line); -#endif -#ifndef Tcl_DuplicateObj_TCL_DECLARED -#define Tcl_DuplicateObj_TCL_DECLARED -/* 29 */ -EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); -#endif -#ifndef TclFreeObj_TCL_DECLARED -#define TclFreeObj_TCL_DECLARED -/* 30 */ -EXTERN void TclFreeObj (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetBoolean_TCL_DECLARED -#define Tcl_GetBoolean_TCL_DECLARED -/* 31 */ -EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, - CONST char * src, int * boolPtr); -#endif -#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED -#define Tcl_GetBooleanFromObj_TCL_DECLARED -/* 32 */ -EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * boolPtr); -#endif -#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED -#define Tcl_GetByteArrayFromObj_TCL_DECLARED -/* 33 */ -EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetDouble_TCL_DECLARED -#define Tcl_GetDouble_TCL_DECLARED -/* 34 */ -EXTERN int Tcl_GetDouble (Tcl_Interp * interp, CONST char * src, - double * doublePtr); -#endif -#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED -#define Tcl_GetDoubleFromObj_TCL_DECLARED -/* 35 */ -EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * doublePtr); -#endif -#ifndef Tcl_GetIndexFromObj_TCL_DECLARED -#define Tcl_GetIndexFromObj_TCL_DECLARED -/* 36 */ -EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST84 char ** tablePtr, - CONST char * msg, int flags, int * indexPtr); -#endif -#ifndef Tcl_GetInt_TCL_DECLARED -#define Tcl_GetInt_TCL_DECLARED -/* 37 */ -EXTERN int Tcl_GetInt (Tcl_Interp * interp, CONST char * src, - int * intPtr); -#endif -#ifndef Tcl_GetIntFromObj_TCL_DECLARED -#define Tcl_GetIntFromObj_TCL_DECLARED -/* 38 */ -EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * intPtr); -#endif -#ifndef Tcl_GetLongFromObj_TCL_DECLARED -#define Tcl_GetLongFromObj_TCL_DECLARED -/* 39 */ -EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * longPtr); -#endif -#ifndef Tcl_GetObjType_TCL_DECLARED -#define Tcl_GetObjType_TCL_DECLARED -/* 40 */ -EXTERN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); -#endif -#ifndef Tcl_GetStringFromObj_TCL_DECLARED -#define Tcl_GetStringFromObj_TCL_DECLARED -/* 41 */ -EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_InvalidateStringRep_TCL_DECLARED -#define Tcl_InvalidateStringRep_TCL_DECLARED -/* 42 */ -EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjAppendList_TCL_DECLARED -#define Tcl_ListObjAppendList_TCL_DECLARED -/* 43 */ -EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); -#endif -#ifndef Tcl_ListObjAppendElement_TCL_DECLARED -#define Tcl_ListObjAppendElement_TCL_DECLARED -/* 44 */ -EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjGetElements_TCL_DECLARED -#define Tcl_ListObjGetElements_TCL_DECLARED -/* 45 */ -EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * objcPtr, - Tcl_Obj *** objvPtr); -#endif -#ifndef Tcl_ListObjIndex_TCL_DECLARED -#define Tcl_ListObjIndex_TCL_DECLARED -/* 46 */ -EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj ** objPtrPtr); -#endif -#ifndef Tcl_ListObjLength_TCL_DECLARED -#define Tcl_ListObjLength_TCL_DECLARED -/* 47 */ -EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * lengthPtr); -#endif -#ifndef Tcl_ListObjReplace_TCL_DECLARED -#define Tcl_ListObjReplace_TCL_DECLARED -/* 48 */ -EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, - Tcl_Obj * listPtr, int first, int count, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_NewBooleanObj_TCL_DECLARED -#define Tcl_NewBooleanObj_TCL_DECLARED -/* 49 */ -EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); -#endif -#ifndef Tcl_NewByteArrayObj_TCL_DECLARED -#define Tcl_NewByteArrayObj_TCL_DECLARED -/* 50 */ -EXTERN Tcl_Obj * Tcl_NewByteArrayObj (CONST unsigned char* bytes, - int length); -#endif -#ifndef Tcl_NewDoubleObj_TCL_DECLARED -#define Tcl_NewDoubleObj_TCL_DECLARED -/* 51 */ -EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); -#endif -#ifndef Tcl_NewIntObj_TCL_DECLARED -#define Tcl_NewIntObj_TCL_DECLARED -/* 52 */ -EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); -#endif -#ifndef Tcl_NewListObj_TCL_DECLARED -#define Tcl_NewListObj_TCL_DECLARED -/* 53 */ -EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_NewLongObj_TCL_DECLARED -#define Tcl_NewLongObj_TCL_DECLARED -/* 54 */ -EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); -#endif -#ifndef Tcl_NewObj_TCL_DECLARED -#define Tcl_NewObj_TCL_DECLARED -/* 55 */ -EXTERN Tcl_Obj * Tcl_NewObj (void); -#endif -#ifndef Tcl_NewStringObj_TCL_DECLARED -#define Tcl_NewStringObj_TCL_DECLARED -/* 56 */ -EXTERN Tcl_Obj * Tcl_NewStringObj (CONST char * bytes, int length); -#endif -#ifndef Tcl_SetBooleanObj_TCL_DECLARED -#define Tcl_SetBooleanObj_TCL_DECLARED -/* 57 */ -EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); -#endif -#ifndef Tcl_SetByteArrayLength_TCL_DECLARED -#define Tcl_SetByteArrayLength_TCL_DECLARED -/* 58 */ -EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetByteArrayObj_TCL_DECLARED -#define Tcl_SetByteArrayObj_TCL_DECLARED -/* 59 */ -EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, - CONST unsigned char * bytes, int length); -#endif -#ifndef Tcl_SetDoubleObj_TCL_DECLARED -#define Tcl_SetDoubleObj_TCL_DECLARED -/* 60 */ -EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, - double doubleValue); -#endif -#ifndef Tcl_SetIntObj_TCL_DECLARED -#define Tcl_SetIntObj_TCL_DECLARED -/* 61 */ -EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); -#endif -#ifndef Tcl_SetListObj_TCL_DECLARED -#define Tcl_SetListObj_TCL_DECLARED -/* 62 */ -EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_SetLongObj_TCL_DECLARED -#define Tcl_SetLongObj_TCL_DECLARED -/* 63 */ -EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); -#endif -#ifndef Tcl_SetObjLength_TCL_DECLARED -#define Tcl_SetObjLength_TCL_DECLARED -/* 64 */ -EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetStringObj_TCL_DECLARED -#define Tcl_SetStringObj_TCL_DECLARED -/* 65 */ -EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, CONST char* bytes, - int length); -#endif -#ifndef Tcl_AddErrorInfo_TCL_DECLARED -#define Tcl_AddErrorInfo_TCL_DECLARED -/* 66 */ -EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, - CONST char * message); -#endif -#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED -#define Tcl_AddObjErrorInfo_TCL_DECLARED -/* 67 */ -EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, - CONST char * message, int length); -#endif -#ifndef Tcl_AllowExceptions_TCL_DECLARED -#define Tcl_AllowExceptions_TCL_DECLARED -/* 68 */ -EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); -#endif -#ifndef Tcl_AppendElement_TCL_DECLARED -#define Tcl_AppendElement_TCL_DECLARED -/* 69 */ -EXTERN void Tcl_AppendElement (Tcl_Interp * interp, - CONST char * element); -#endif -#ifndef Tcl_AppendResult_TCL_DECLARED -#define Tcl_AppendResult_TCL_DECLARED -/* 70 */ -EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_AsyncCreate_TCL_DECLARED -#define Tcl_AsyncCreate_TCL_DECLARED -/* 71 */ -EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AsyncDelete_TCL_DECLARED -#define Tcl_AsyncDelete_TCL_DECLARED -/* 72 */ -EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncInvoke_TCL_DECLARED -#define Tcl_AsyncInvoke_TCL_DECLARED -/* 73 */ -EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); -#endif -#ifndef Tcl_AsyncMark_TCL_DECLARED -#define Tcl_AsyncMark_TCL_DECLARED -/* 74 */ -EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncReady_TCL_DECLARED -#define Tcl_AsyncReady_TCL_DECLARED -/* 75 */ -EXTERN int Tcl_AsyncReady (void); -#endif -#ifndef Tcl_BackgroundError_TCL_DECLARED -#define Tcl_BackgroundError_TCL_DECLARED -/* 76 */ -EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); -#endif -#ifndef Tcl_Backslash_TCL_DECLARED -#define Tcl_Backslash_TCL_DECLARED -/* 77 */ -EXTERN char Tcl_Backslash (CONST char * src, int * readPtr); -#endif -#ifndef Tcl_BadChannelOption_TCL_DECLARED -#define Tcl_BadChannelOption_TCL_DECLARED -/* 78 */ -EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, - CONST char * optionName, - CONST char * optionList); -#endif -#ifndef Tcl_CallWhenDeleted_TCL_DECLARED -#define Tcl_CallWhenDeleted_TCL_DECLARED -/* 79 */ -EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CancelIdleCall_TCL_DECLARED -#define Tcl_CancelIdleCall_TCL_DECLARED -/* 80 */ -EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, - ClientData clientData); -#endif -#ifndef Tcl_Close_TCL_DECLARED -#define Tcl_Close_TCL_DECLARED -/* 81 */ -EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); -#endif -#ifndef Tcl_CommandComplete_TCL_DECLARED -#define Tcl_CommandComplete_TCL_DECLARED -/* 82 */ -EXTERN int Tcl_CommandComplete (CONST char * cmd); -#endif -#ifndef Tcl_Concat_TCL_DECLARED -#define Tcl_Concat_TCL_DECLARED -/* 83 */ -EXTERN char * Tcl_Concat (int argc, CONST84 char * CONST * argv); -#endif -#ifndef Tcl_ConvertElement_TCL_DECLARED -#define Tcl_ConvertElement_TCL_DECLARED -/* 84 */ -EXTERN int Tcl_ConvertElement (CONST char * src, char * dst, - int flags); -#endif -#ifndef Tcl_ConvertCountedElement_TCL_DECLARED -#define Tcl_ConvertCountedElement_TCL_DECLARED -/* 85 */ -EXTERN int Tcl_ConvertCountedElement (CONST char * src, - int length, char * dst, int flags); -#endif -#ifndef Tcl_CreateAlias_TCL_DECLARED -#define Tcl_CreateAlias_TCL_DECLARED -/* 86 */ -EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, - CONST char * slaveCmd, Tcl_Interp * target, - CONST char * targetCmd, int argc, - CONST84 char * CONST * argv); -#endif -#ifndef Tcl_CreateAliasObj_TCL_DECLARED -#define Tcl_CreateAliasObj_TCL_DECLARED -/* 87 */ -EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, - CONST char * slaveCmd, Tcl_Interp * target, - CONST char * targetCmd, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_CreateChannel_TCL_DECLARED -#define Tcl_CreateChannel_TCL_DECLARED -/* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel (Tcl_ChannelType * typePtr, - CONST char * chanName, - ClientData instanceData, int mask); -#endif -#ifndef Tcl_CreateChannelHandler_TCL_DECLARED -#define Tcl_CreateChannelHandler_TCL_DECLARED -/* 89 */ -EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateCloseHandler_TCL_DECLARED -#define Tcl_CreateCloseHandler_TCL_DECLARED -/* 90 */ -EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateCommand_TCL_DECLARED -#define Tcl_CreateCommand_TCL_DECLARED -/* 91 */ -EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_CmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateEventSource_TCL_DECLARED -#define Tcl_CreateEventSource_TCL_DECLARED -/* 92 */ -EXTERN void Tcl_CreateEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_CreateExitHandler_TCL_DECLARED -#define Tcl_CreateExitHandler_TCL_DECLARED -/* 93 */ -EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateInterp_TCL_DECLARED -#define Tcl_CreateInterp_TCL_DECLARED -/* 94 */ -EXTERN Tcl_Interp * Tcl_CreateInterp (void); -#endif -#ifndef Tcl_CreateMathFunc_TCL_DECLARED -#define Tcl_CreateMathFunc_TCL_DECLARED -/* 95 */ -EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, - CONST char * name, int numArgs, - Tcl_ValueType * argTypes, - Tcl_MathProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateObjCommand_TCL_DECLARED -#define Tcl_CreateObjCommand_TCL_DECLARED -/* 96 */ -EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_ObjCmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateSlave_TCL_DECLARED -#define Tcl_CreateSlave_TCL_DECLARED -/* 97 */ -EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, - CONST char * slaveName, int isSafe); -#endif -#ifndef Tcl_CreateTimerHandler_TCL_DECLARED -#define Tcl_CreateTimerHandler_TCL_DECLARED -/* 98 */ -EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, - Tcl_TimerProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateTrace_TCL_DECLARED -#define Tcl_CreateTrace_TCL_DECLARED -/* 99 */ -EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, - Tcl_CmdTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteAssocData_TCL_DECLARED -#define Tcl_DeleteAssocData_TCL_DECLARED -/* 100 */ -EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED -#define Tcl_DeleteChannelHandler_TCL_DECLARED -/* 101 */ -EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED -#define Tcl_DeleteCloseHandler_TCL_DECLARED -/* 102 */ -EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_DeleteCommand_TCL_DECLARED -#define Tcl_DeleteCommand_TCL_DECLARED -/* 103 */ -EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, - CONST char * cmdName); -#endif -#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED -#define Tcl_DeleteCommandFromToken_TCL_DECLARED -/* 104 */ -EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_DeleteEvents_TCL_DECLARED -#define Tcl_DeleteEvents_TCL_DECLARED -/* 105 */ -EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteEventSource_TCL_DECLARED -#define Tcl_DeleteEventSource_TCL_DECLARED -/* 106 */ -EXTERN void Tcl_DeleteEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteExitHandler_TCL_DECLARED -#define Tcl_DeleteExitHandler_TCL_DECLARED -/* 107 */ -EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteHashEntry_TCL_DECLARED -#define Tcl_DeleteHashEntry_TCL_DECLARED -/* 108 */ -EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); -#endif -#ifndef Tcl_DeleteHashTable_TCL_DECLARED -#define Tcl_DeleteHashTable_TCL_DECLARED -/* 109 */ -EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_DeleteInterp_TCL_DECLARED -#define Tcl_DeleteInterp_TCL_DECLARED -/* 110 */ -EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED -#define Tcl_DeleteTimerHandler_TCL_DECLARED -/* 112 */ -EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); -#endif -#ifndef Tcl_DeleteTrace_TCL_DECLARED -#define Tcl_DeleteTrace_TCL_DECLARED -/* 113 */ -EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, - Tcl_Trace trace); -#endif -#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED -#define Tcl_DontCallWhenDeleted_TCL_DECLARED -/* 114 */ -EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DoOneEvent_TCL_DECLARED -#define Tcl_DoOneEvent_TCL_DECLARED -/* 115 */ -EXTERN int Tcl_DoOneEvent (int flags); -#endif -#ifndef Tcl_DoWhenIdle_TCL_DECLARED -#define Tcl_DoWhenIdle_TCL_DECLARED -/* 116 */ -EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DStringAppend_TCL_DECLARED -#define Tcl_DStringAppend_TCL_DECLARED -/* 117 */ -EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, - CONST char * bytes, int length); -#endif -#ifndef Tcl_DStringAppendElement_TCL_DECLARED -#define Tcl_DStringAppendElement_TCL_DECLARED -/* 118 */ -EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, - CONST char * element); -#endif -#ifndef Tcl_DStringEndSublist_TCL_DECLARED -#define Tcl_DStringEndSublist_TCL_DECLARED -/* 119 */ -EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringFree_TCL_DECLARED -#define Tcl_DStringFree_TCL_DECLARED -/* 120 */ -EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringGetResult_TCL_DECLARED -#define Tcl_DStringGetResult_TCL_DECLARED -/* 121 */ -EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringInit_TCL_DECLARED -#define Tcl_DStringInit_TCL_DECLARED -/* 122 */ -EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringResult_TCL_DECLARED -#define Tcl_DStringResult_TCL_DECLARED -/* 123 */ -EXTERN void Tcl_DStringResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringSetLength_TCL_DECLARED -#define Tcl_DStringSetLength_TCL_DECLARED -/* 124 */ -EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, - int length); -#endif -#ifndef Tcl_DStringStartSublist_TCL_DECLARED -#define Tcl_DStringStartSublist_TCL_DECLARED -/* 125 */ -EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_Eof_TCL_DECLARED -#define Tcl_Eof_TCL_DECLARED -/* 126 */ -EXTERN int Tcl_Eof (Tcl_Channel chan); -#endif -#ifndef Tcl_ErrnoId_TCL_DECLARED -#define Tcl_ErrnoId_TCL_DECLARED -/* 127 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); -#endif -#ifndef Tcl_ErrnoMsg_TCL_DECLARED -#define Tcl_ErrnoMsg_TCL_DECLARED -/* 128 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); -#endif -#ifndef Tcl_Eval_TCL_DECLARED -#define Tcl_Eval_TCL_DECLARED -/* 129 */ -EXTERN int Tcl_Eval (Tcl_Interp * interp, CONST char * script); -#endif -#ifndef Tcl_EvalFile_TCL_DECLARED -#define Tcl_EvalFile_TCL_DECLARED -/* 130 */ -EXTERN int Tcl_EvalFile (Tcl_Interp * interp, - CONST char * fileName); -#endif -#ifndef Tcl_EvalObj_TCL_DECLARED -#define Tcl_EvalObj_TCL_DECLARED -/* 131 */ -EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_EventuallyFree_TCL_DECLARED -#define Tcl_EventuallyFree_TCL_DECLARED -/* 132 */ -EXTERN void Tcl_EventuallyFree (ClientData clientData, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_Exit_TCL_DECLARED -#define Tcl_Exit_TCL_DECLARED -/* 133 */ -EXTERN void Tcl_Exit (int status); -#endif -#ifndef Tcl_ExposeCommand_TCL_DECLARED -#define Tcl_ExposeCommand_TCL_DECLARED -/* 134 */ -EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, - CONST char * hiddenCmdToken, - CONST char * cmdName); -#endif -#ifndef Tcl_ExprBoolean_TCL_DECLARED -#define Tcl_ExprBoolean_TCL_DECLARED -/* 135 */ -EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, - CONST char * expr, int * ptr); -#endif -#ifndef Tcl_ExprBooleanObj_TCL_DECLARED -#define Tcl_ExprBooleanObj_TCL_DECLARED -/* 136 */ -EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * ptr); -#endif -#ifndef Tcl_ExprDouble_TCL_DECLARED -#define Tcl_ExprDouble_TCL_DECLARED -/* 137 */ -EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, - CONST char * expr, double * ptr); -#endif -#ifndef Tcl_ExprDoubleObj_TCL_DECLARED -#define Tcl_ExprDoubleObj_TCL_DECLARED -/* 138 */ -EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * ptr); -#endif -#ifndef Tcl_ExprLong_TCL_DECLARED -#define Tcl_ExprLong_TCL_DECLARED -/* 139 */ -EXTERN int Tcl_ExprLong (Tcl_Interp * interp, CONST char * expr, - long * ptr); -#endif -#ifndef Tcl_ExprLongObj_TCL_DECLARED -#define Tcl_ExprLongObj_TCL_DECLARED -/* 140 */ -EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * ptr); -#endif -#ifndef Tcl_ExprObj_TCL_DECLARED -#define Tcl_ExprObj_TCL_DECLARED -/* 141 */ -EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - Tcl_Obj ** resultPtrPtr); -#endif -#ifndef Tcl_ExprString_TCL_DECLARED -#define Tcl_ExprString_TCL_DECLARED -/* 142 */ -EXTERN int Tcl_ExprString (Tcl_Interp * interp, - CONST char * expr); -#endif -#ifndef Tcl_Finalize_TCL_DECLARED -#define Tcl_Finalize_TCL_DECLARED -/* 143 */ -EXTERN void Tcl_Finalize (void); -#endif -#ifndef Tcl_FindExecutable_TCL_DECLARED -#define Tcl_FindExecutable_TCL_DECLARED -/* 144 */ -EXTERN void Tcl_FindExecutable (CONST char * argv0); -#endif -#ifndef Tcl_FirstHashEntry_TCL_DECLARED -#define Tcl_FirstHashEntry_TCL_DECLARED -/* 145 */ -EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, - Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_Flush_TCL_DECLARED -#define Tcl_Flush_TCL_DECLARED -/* 146 */ -EXTERN int Tcl_Flush (Tcl_Channel chan); -#endif -#ifndef Tcl_FreeResult_TCL_DECLARED -#define Tcl_FreeResult_TCL_DECLARED -/* 147 */ -EXTERN void Tcl_FreeResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetAlias_TCL_DECLARED -#define Tcl_GetAlias_TCL_DECLARED -/* 148 */ -EXTERN int Tcl_GetAlias (Tcl_Interp * interp, - CONST char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_GetAliasObj_TCL_DECLARED -#define Tcl_GetAliasObj_TCL_DECLARED -/* 149 */ -EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, - CONST char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * objcPtr, - Tcl_Obj *** objv); -#endif -#ifndef Tcl_GetAssocData_TCL_DECLARED -#define Tcl_GetAssocData_TCL_DECLARED -/* 150 */ -EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, - CONST char * name, - Tcl_InterpDeleteProc ** procPtr); -#endif -#ifndef Tcl_GetChannel_TCL_DECLARED -#define Tcl_GetChannel_TCL_DECLARED -/* 151 */ -EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, - CONST char * chanName, int * modePtr); -#endif -#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED -#define Tcl_GetChannelBufferSize_TCL_DECLARED -/* 152 */ -EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelHandle_TCL_DECLARED -#define Tcl_GetChannelHandle_TCL_DECLARED -/* 153 */ -EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, - int direction, ClientData * handlePtr); -#endif -#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED -#define Tcl_GetChannelInstanceData_TCL_DECLARED -/* 154 */ -EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelMode_TCL_DECLARED -#define Tcl_GetChannelMode_TCL_DECLARED -/* 155 */ -EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelName_TCL_DECLARED -#define Tcl_GetChannelName_TCL_DECLARED -/* 156 */ -EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelOption_TCL_DECLARED -#define Tcl_GetChannelOption_TCL_DECLARED -/* 157 */ -EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, CONST char * optionName, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetChannelType_TCL_DECLARED -#define Tcl_GetChannelType_TCL_DECLARED -/* 158 */ -EXTERN Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); -#endif -#ifndef Tcl_GetCommandInfo_TCL_DECLARED -#define Tcl_GetCommandInfo_TCL_DECLARED -/* 159 */ -EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, - CONST char * cmdName, Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_GetCommandName_TCL_DECLARED -#define Tcl_GetCommandName_TCL_DECLARED -/* 160 */ -EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_GetErrno_TCL_DECLARED -#define Tcl_GetErrno_TCL_DECLARED -/* 161 */ -EXTERN int Tcl_GetErrno (void); -#endif -#ifndef Tcl_GetHostName_TCL_DECLARED -#define Tcl_GetHostName_TCL_DECLARED -/* 162 */ -EXTERN CONST84_RETURN char * Tcl_GetHostName (void); -#endif -#ifndef Tcl_GetInterpPath_TCL_DECLARED -#define Tcl_GetInterpPath_TCL_DECLARED -/* 163 */ -EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, - Tcl_Interp * slaveInterp); -#endif -#ifndef Tcl_GetMaster_TCL_DECLARED -#define Tcl_GetMaster_TCL_DECLARED -/* 164 */ -EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED -#define Tcl_GetNameOfExecutable_TCL_DECLARED -/* 165 */ -EXTERN CONST char * Tcl_GetNameOfExecutable (void); -#endif -#ifndef Tcl_GetObjResult_TCL_DECLARED -#define Tcl_GetObjResult_TCL_DECLARED -/* 166 */ -EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - CONST char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - CONST char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType_TCL_DECLARED -#define Tcl_GetPathType_TCL_DECLARED -/* 168 */ -EXTERN Tcl_PathType Tcl_GetPathType (CONST char * path); -#endif -#ifndef Tcl_Gets_TCL_DECLARED -#define Tcl_Gets_TCL_DECLARED -/* 169 */ -EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetsObj_TCL_DECLARED -#define Tcl_GetsObj_TCL_DECLARED -/* 170 */ -EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetServiceMode_TCL_DECLARED -#define Tcl_GetServiceMode_TCL_DECLARED -/* 171 */ -EXTERN int Tcl_GetServiceMode (void); -#endif -#ifndef Tcl_GetSlave_TCL_DECLARED -#define Tcl_GetSlave_TCL_DECLARED -/* 172 */ -EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, - CONST char * slaveName); -#endif -#ifndef Tcl_GetStdChannel_TCL_DECLARED -#define Tcl_GetStdChannel_TCL_DECLARED -/* 173 */ -EXTERN Tcl_Channel Tcl_GetStdChannel (int type); -#endif -#ifndef Tcl_GetStringResult_TCL_DECLARED -#define Tcl_GetStringResult_TCL_DECLARED -/* 174 */ -EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetVar_TCL_DECLARED -#define Tcl_GetVar_TCL_DECLARED -/* 175 */ -EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, - CONST char * varName, int flags); -#endif -#ifndef Tcl_GetVar2_TCL_DECLARED -#define Tcl_GetVar2_TCL_DECLARED -/* 176 */ -EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags); -#endif -#ifndef Tcl_GlobalEval_TCL_DECLARED -#define Tcl_GlobalEval_TCL_DECLARED -/* 177 */ -EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, - CONST char * command); -#endif -#ifndef Tcl_GlobalEvalObj_TCL_DECLARED -#define Tcl_GlobalEvalObj_TCL_DECLARED -/* 178 */ -EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_HideCommand_TCL_DECLARED -#define Tcl_HideCommand_TCL_DECLARED -/* 179 */ -EXTERN int Tcl_HideCommand (Tcl_Interp * interp, - CONST char * cmdName, - CONST char * hiddenCmdToken); -#endif -#ifndef Tcl_Init_TCL_DECLARED -#define Tcl_Init_TCL_DECLARED -/* 180 */ -EXTERN int Tcl_Init (Tcl_Interp * interp); -#endif -#ifndef Tcl_InitHashTable_TCL_DECLARED -#define Tcl_InitHashTable_TCL_DECLARED -/* 181 */ -EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, - int keyType); -#endif -#ifndef Tcl_InputBlocked_TCL_DECLARED -#define Tcl_InputBlocked_TCL_DECLARED -/* 182 */ -EXTERN int Tcl_InputBlocked (Tcl_Channel chan); -#endif -#ifndef Tcl_InputBuffered_TCL_DECLARED -#define Tcl_InputBuffered_TCL_DECLARED -/* 183 */ -EXTERN int Tcl_InputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_InterpDeleted_TCL_DECLARED -#define Tcl_InterpDeleted_TCL_DECLARED -/* 184 */ -EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); -#endif -#ifndef Tcl_IsSafe_TCL_DECLARED -#define Tcl_IsSafe_TCL_DECLARED -/* 185 */ -EXTERN int Tcl_IsSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_JoinPath_TCL_DECLARED -#define Tcl_JoinPath_TCL_DECLARED -/* 186 */ -EXTERN char * Tcl_JoinPath (int argc, CONST84 char * CONST * argv, - Tcl_DString * resultPtr); -#endif -#ifndef Tcl_LinkVar_TCL_DECLARED -#define Tcl_LinkVar_TCL_DECLARED -/* 187 */ -EXTERN int Tcl_LinkVar (Tcl_Interp * interp, - CONST char * varName, char * addr, int type); -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel_TCL_DECLARED -#define Tcl_MakeFileChannel_TCL_DECLARED -/* 189 */ -EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); -#endif -#ifndef Tcl_MakeSafe_TCL_DECLARED -#define Tcl_MakeSafe_TCL_DECLARED -/* 190 */ -EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED -#define Tcl_MakeTcpClientChannel_TCL_DECLARED -/* 191 */ -EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); -#endif -#ifndef Tcl_Merge_TCL_DECLARED -#define Tcl_Merge_TCL_DECLARED -/* 192 */ -EXTERN char * Tcl_Merge (int argc, CONST84 char * CONST * argv); -#endif -#ifndef Tcl_NextHashEntry_TCL_DECLARED -#define Tcl_NextHashEntry_TCL_DECLARED -/* 193 */ -EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_NotifyChannel_TCL_DECLARED -#define Tcl_NotifyChannel_TCL_DECLARED -/* 194 */ -EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); -#endif -#ifndef Tcl_ObjGetVar2_TCL_DECLARED -#define Tcl_ObjGetVar2_TCL_DECLARED -/* 195 */ -EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - int flags); -#endif -#ifndef Tcl_ObjSetVar2_TCL_DECLARED -#define Tcl_ObjSetVar2_TCL_DECLARED -/* 196 */ -EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - Tcl_Obj * newValuePtr, int flags); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel_TCL_DECLARED -#define Tcl_OpenFileChannel_TCL_DECLARED -/* 198 */ -EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, - CONST char * fileName, - CONST char * modeString, int permissions); -#endif -#ifndef Tcl_OpenTcpClient_TCL_DECLARED -#define Tcl_OpenTcpClient_TCL_DECLARED -/* 199 */ -EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, - CONST char * address, CONST char * myaddr, - int myport, int async); -#endif -#ifndef Tcl_OpenTcpServer_TCL_DECLARED -#define Tcl_OpenTcpServer_TCL_DECLARED -/* 200 */ -EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, - CONST char * host, - Tcl_TcpAcceptProc * acceptProc, - ClientData callbackData); -#endif -#ifndef Tcl_Preserve_TCL_DECLARED -#define Tcl_Preserve_TCL_DECLARED -/* 201 */ -EXTERN void Tcl_Preserve (ClientData data); -#endif -#ifndef Tcl_PrintDouble_TCL_DECLARED -#define Tcl_PrintDouble_TCL_DECLARED -/* 202 */ -EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, - char * dst); -#endif -#ifndef Tcl_PutEnv_TCL_DECLARED -#define Tcl_PutEnv_TCL_DECLARED -/* 203 */ -EXTERN int Tcl_PutEnv (CONST char * assignment); -#endif -#ifndef Tcl_PosixError_TCL_DECLARED -#define Tcl_PosixError_TCL_DECLARED -/* 204 */ -EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); -#endif -#ifndef Tcl_QueueEvent_TCL_DECLARED -#define Tcl_QueueEvent_TCL_DECLARED -/* 205 */ -EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, - Tcl_QueuePosition position); -#endif -#ifndef Tcl_Read_TCL_DECLARED -#define Tcl_Read_TCL_DECLARED -/* 206 */ -EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, - int toRead); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval_TCL_DECLARED -#define Tcl_RecordAndEval_TCL_DECLARED -/* 208 */ -EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, - CONST char * cmd, int flags); -#endif -#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED -#define Tcl_RecordAndEvalObj_TCL_DECLARED -/* 209 */ -EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, - Tcl_Obj * cmdPtr, int flags); -#endif -#ifndef Tcl_RegisterChannel_TCL_DECLARED -#define Tcl_RegisterChannel_TCL_DECLARED -/* 210 */ -EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_RegisterObjType_TCL_DECLARED -#define Tcl_RegisterObjType_TCL_DECLARED -/* 211 */ -EXTERN void Tcl_RegisterObjType (Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_RegExpCompile_TCL_DECLARED -#define Tcl_RegExpCompile_TCL_DECLARED -/* 212 */ -EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, - CONST char * pattern); -#endif -#ifndef Tcl_RegExpExec_TCL_DECLARED -#define Tcl_RegExpExec_TCL_DECLARED -/* 213 */ -EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, - Tcl_RegExp regexp, CONST char * text, - CONST char * start); -#endif -#ifndef Tcl_RegExpMatch_TCL_DECLARED -#define Tcl_RegExpMatch_TCL_DECLARED -/* 214 */ -EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, - CONST char * text, CONST char * pattern); -#endif -#ifndef Tcl_RegExpRange_TCL_DECLARED -#define Tcl_RegExpRange_TCL_DECLARED -/* 215 */ -EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, - CONST84 char ** startPtr, - CONST84 char ** endPtr); -#endif -#ifndef Tcl_Release_TCL_DECLARED -#define Tcl_Release_TCL_DECLARED -/* 216 */ -EXTERN void Tcl_Release (ClientData clientData); -#endif -#ifndef Tcl_ResetResult_TCL_DECLARED -#define Tcl_ResetResult_TCL_DECLARED -/* 217 */ -EXTERN void Tcl_ResetResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_ScanElement_TCL_DECLARED -#define Tcl_ScanElement_TCL_DECLARED -/* 218 */ -EXTERN int Tcl_ScanElement (CONST char * str, int * flagPtr); -#endif -#ifndef Tcl_ScanCountedElement_TCL_DECLARED -#define Tcl_ScanCountedElement_TCL_DECLARED -/* 219 */ -EXTERN int Tcl_ScanCountedElement (CONST char * str, int length, - int * flagPtr); -#endif -#ifndef Tcl_SeekOld_TCL_DECLARED -#define Tcl_SeekOld_TCL_DECLARED -/* 220 */ -EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); -#endif -#ifndef Tcl_ServiceAll_TCL_DECLARED -#define Tcl_ServiceAll_TCL_DECLARED -/* 221 */ -EXTERN int Tcl_ServiceAll (void); -#endif -#ifndef Tcl_ServiceEvent_TCL_DECLARED -#define Tcl_ServiceEvent_TCL_DECLARED -/* 222 */ -EXTERN int Tcl_ServiceEvent (int flags); -#endif -#ifndef Tcl_SetAssocData_TCL_DECLARED -#define Tcl_SetAssocData_TCL_DECLARED -/* 223 */ -EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, - CONST char * name, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED -#define Tcl_SetChannelBufferSize_TCL_DECLARED -/* 224 */ -EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); -#endif -#ifndef Tcl_SetChannelOption_TCL_DECLARED -#define Tcl_SetChannelOption_TCL_DECLARED -/* 225 */ -EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, CONST char * optionName, - CONST char * newValue); -#endif -#ifndef Tcl_SetCommandInfo_TCL_DECLARED -#define Tcl_SetCommandInfo_TCL_DECLARED -/* 226 */ -EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, - CONST char * cmdName, - CONST Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_SetErrno_TCL_DECLARED -#define Tcl_SetErrno_TCL_DECLARED -/* 227 */ -EXTERN void Tcl_SetErrno (int err); -#endif -#ifndef Tcl_SetErrorCode_TCL_DECLARED -#define Tcl_SetErrorCode_TCL_DECLARED -/* 228 */ -EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED -#define Tcl_SetMaxBlockTime_TCL_DECLARED -/* 229 */ -EXTERN void Tcl_SetMaxBlockTime (Tcl_Time * timePtr); -#endif -#ifndef Tcl_SetPanicProc_TCL_DECLARED -#define Tcl_SetPanicProc_TCL_DECLARED -/* 230 */ -EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); -#endif -#ifndef Tcl_SetRecursionLimit_TCL_DECLARED -#define Tcl_SetRecursionLimit_TCL_DECLARED -/* 231 */ -EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, - int depth); -#endif -#ifndef Tcl_SetResult_TCL_DECLARED -#define Tcl_SetResult_TCL_DECLARED -/* 232 */ -EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_SetServiceMode_TCL_DECLARED -#define Tcl_SetServiceMode_TCL_DECLARED -/* 233 */ -EXTERN int Tcl_SetServiceMode (int mode); -#endif -#ifndef Tcl_SetObjErrorCode_TCL_DECLARED -#define Tcl_SetObjErrorCode_TCL_DECLARED -/* 234 */ -EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, - Tcl_Obj * errorObjPtr); -#endif -#ifndef Tcl_SetObjResult_TCL_DECLARED -#define Tcl_SetObjResult_TCL_DECLARED -/* 235 */ -EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr); -#endif -#ifndef Tcl_SetStdChannel_TCL_DECLARED -#define Tcl_SetStdChannel_TCL_DECLARED -/* 236 */ -EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); -#endif -#ifndef Tcl_SetVar_TCL_DECLARED -#define Tcl_SetVar_TCL_DECLARED -/* 237 */ -EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, - CONST char * varName, CONST char * newValue, - int flags); -#endif -#ifndef Tcl_SetVar2_TCL_DECLARED -#define Tcl_SetVar2_TCL_DECLARED -/* 238 */ -EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - CONST char * newValue, int flags); -#endif -#ifndef Tcl_SignalId_TCL_DECLARED -#define Tcl_SignalId_TCL_DECLARED -/* 239 */ -EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); -#endif -#ifndef Tcl_SignalMsg_TCL_DECLARED -#define Tcl_SignalMsg_TCL_DECLARED -/* 240 */ -EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); -#endif -#ifndef Tcl_SourceRCFile_TCL_DECLARED -#define Tcl_SourceRCFile_TCL_DECLARED -/* 241 */ -EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); -#endif -#ifndef Tcl_SplitList_TCL_DECLARED -#define Tcl_SplitList_TCL_DECLARED -/* 242 */ -EXTERN int Tcl_SplitList (Tcl_Interp * interp, - CONST char * listStr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_SplitPath_TCL_DECLARED -#define Tcl_SplitPath_TCL_DECLARED -/* 243 */ -EXTERN void Tcl_SplitPath (CONST char * path, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_StaticPackage_TCL_DECLARED -#define Tcl_StaticPackage_TCL_DECLARED -/* 244 */ -EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, - CONST char * pkgName, - Tcl_PackageInitProc * initProc, - Tcl_PackageInitProc * safeInitProc); -#endif -#ifndef Tcl_StringMatch_TCL_DECLARED -#define Tcl_StringMatch_TCL_DECLARED -/* 245 */ -EXTERN int Tcl_StringMatch (CONST char * str, - CONST char * pattern); -#endif -#ifndef Tcl_TellOld_TCL_DECLARED -#define Tcl_TellOld_TCL_DECLARED -/* 246 */ -EXTERN int Tcl_TellOld (Tcl_Channel chan); -#endif -#ifndef Tcl_TraceVar_TCL_DECLARED -#define Tcl_TraceVar_TCL_DECLARED -/* 247 */ -EXTERN int Tcl_TraceVar (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TraceVar2_TCL_DECLARED -#define Tcl_TraceVar2_TCL_DECLARED -/* 248 */ -EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TranslateFileName_TCL_DECLARED -#define Tcl_TranslateFileName_TCL_DECLARED -/* 249 */ -EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, - CONST char * name, Tcl_DString * bufferPtr); -#endif -#ifndef Tcl_Ungets_TCL_DECLARED -#define Tcl_Ungets_TCL_DECLARED -/* 250 */ -EXTERN int Tcl_Ungets (Tcl_Channel chan, CONST char * str, - int len, int atHead); -#endif -#ifndef Tcl_UnlinkVar_TCL_DECLARED -#define Tcl_UnlinkVar_TCL_DECLARED -/* 251 */ -EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, - CONST char * varName); -#endif -#ifndef Tcl_UnregisterChannel_TCL_DECLARED -#define Tcl_UnregisterChannel_TCL_DECLARED -/* 252 */ -EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_UnsetVar_TCL_DECLARED -#define Tcl_UnsetVar_TCL_DECLARED -/* 253 */ -EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, - CONST char * varName, int flags); -#endif -#ifndef Tcl_UnsetVar2_TCL_DECLARED -#define Tcl_UnsetVar2_TCL_DECLARED -/* 254 */ -EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags); -#endif -#ifndef Tcl_UntraceVar_TCL_DECLARED -#define Tcl_UntraceVar_TCL_DECLARED -/* 255 */ -EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceVar2_TCL_DECLARED -#define Tcl_UntraceVar2_TCL_DECLARED -/* 256 */ -EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED -#define Tcl_UpdateLinkedVar_TCL_DECLARED -/* 257 */ -EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, - CONST char * varName); -#endif -#ifndef Tcl_UpVar_TCL_DECLARED -#define Tcl_UpVar_TCL_DECLARED -/* 258 */ -EXTERN int Tcl_UpVar (Tcl_Interp * interp, - CONST char * frameName, CONST char * varName, - CONST char * localName, int flags); -#endif -#ifndef Tcl_UpVar2_TCL_DECLARED -#define Tcl_UpVar2_TCL_DECLARED -/* 259 */ -EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, - CONST char * frameName, CONST char * part1, - CONST char * part2, CONST char * localName, - int flags); -#endif -#ifndef Tcl_VarEval_TCL_DECLARED -#define Tcl_VarEval_TCL_DECLARED -/* 260 */ -EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_VarTraceInfo_TCL_DECLARED -#define Tcl_VarTraceInfo_TCL_DECLARED -/* 261 */ -EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_VarTraceInfo2_TCL_DECLARED -#define Tcl_VarTraceInfo2_TCL_DECLARED -/* 262 */ -EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_Write_TCL_DECLARED -#define Tcl_Write_TCL_DECLARED -/* 263 */ -EXTERN int Tcl_Write (Tcl_Channel chan, CONST char * s, - int slen); -#endif -#ifndef Tcl_WrongNumArgs_TCL_DECLARED -#define Tcl_WrongNumArgs_TCL_DECLARED -/* 264 */ -EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], CONST char * message); -#endif -#ifndef Tcl_DumpActiveMemory_TCL_DECLARED -#define Tcl_DumpActiveMemory_TCL_DECLARED -/* 265 */ -EXTERN int Tcl_DumpActiveMemory (CONST char * fileName); -#endif -#ifndef Tcl_ValidateAllMemory_TCL_DECLARED -#define Tcl_ValidateAllMemory_TCL_DECLARED -/* 266 */ -EXTERN void Tcl_ValidateAllMemory (CONST char * file, int line); -#endif -#ifndef Tcl_AppendResultVA_TCL_DECLARED -#define Tcl_AppendResultVA_TCL_DECLARED -/* 267 */ -EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED -#define Tcl_AppendStringsToObjVA_TCL_DECLARED -/* 268 */ -EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, - va_list argList); -#endif -#ifndef Tcl_HashStats_TCL_DECLARED -#define Tcl_HashStats_TCL_DECLARED -/* 269 */ -EXTERN CONST84_RETURN char * Tcl_HashStats (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_ParseVar_TCL_DECLARED -#define Tcl_ParseVar_TCL_DECLARED -/* 270 */ -EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, - CONST char * start, CONST84 char ** termPtr); -#endif -#ifndef Tcl_PkgPresent_TCL_DECLARED -#define Tcl_PkgPresent_TCL_DECLARED -/* 271 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact); -#endif -#ifndef Tcl_PkgPresentEx_TCL_DECLARED -#define Tcl_PkgPresentEx_TCL_DECLARED -/* 272 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_PkgProvide_TCL_DECLARED -#define Tcl_PkgProvide_TCL_DECLARED -/* 273 */ -EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, - CONST char * name, CONST char * version); -#endif -#ifndef Tcl_PkgRequire_TCL_DECLARED -#define Tcl_PkgRequire_TCL_DECLARED -/* 274 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, - CONST char * name, CONST char * version, - int exact); -#endif -#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED -#define Tcl_SetErrorCodeVA_TCL_DECLARED -/* 275 */ -EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_VarEvalVA_TCL_DECLARED -#define Tcl_VarEvalVA_TCL_DECLARED -/* 276 */ -EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); -#endif -#ifndef Tcl_WaitPid_TCL_DECLARED -#define Tcl_WaitPid_TCL_DECLARED -/* 277 */ -EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); -#endif -#ifndef Tcl_PanicVA_TCL_DECLARED -#define Tcl_PanicVA_TCL_DECLARED -/* 278 */ -EXTERN void Tcl_PanicVA (CONST char * format, va_list argList); -#endif -#ifndef Tcl_GetVersion_TCL_DECLARED -#define Tcl_GetVersion_TCL_DECLARED -/* 279 */ -EXTERN void Tcl_GetVersion (int * major, int * minor, - int * patchLevel, int * type); -#endif -#ifndef Tcl_InitMemory_TCL_DECLARED -#define Tcl_InitMemory_TCL_DECLARED -/* 280 */ -EXTERN void Tcl_InitMemory (Tcl_Interp * interp); -#endif -#ifndef Tcl_StackChannel_TCL_DECLARED -#define Tcl_StackChannel_TCL_DECLARED -/* 281 */ -EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, - Tcl_ChannelType * typePtr, - ClientData instanceData, int mask, - Tcl_Channel prevChan); -#endif -#ifndef Tcl_UnstackChannel_TCL_DECLARED -#define Tcl_UnstackChannel_TCL_DECLARED -/* 282 */ -EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_GetStackedChannel_TCL_DECLARED -#define Tcl_GetStackedChannel_TCL_DECLARED -/* 283 */ -EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_SetMainLoop_TCL_DECLARED -#define Tcl_SetMainLoop_TCL_DECLARED -/* 284 */ -EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj_TCL_DECLARED -#define Tcl_AppendObjToObj_TCL_DECLARED -/* 286 */ -EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, - Tcl_Obj * appendObjPtr); -#endif -#ifndef Tcl_CreateEncoding_TCL_DECLARED -#define Tcl_CreateEncoding_TCL_DECLARED -/* 287 */ -EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); -#endif -#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED -#define Tcl_CreateThreadExitHandler_TCL_DECLARED -/* 288 */ -EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED -#define Tcl_DeleteThreadExitHandler_TCL_DECLARED -/* 289 */ -EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DiscardResult_TCL_DECLARED -#define Tcl_DiscardResult_TCL_DECLARED -/* 290 */ -EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_EvalEx_TCL_DECLARED -#define Tcl_EvalEx_TCL_DECLARED -/* 291 */ -EXTERN int Tcl_EvalEx (Tcl_Interp * interp, CONST char * script, - int numBytes, int flags); -#endif -#ifndef Tcl_EvalObjv_TCL_DECLARED -#define Tcl_EvalObjv_TCL_DECLARED -/* 292 */ -EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); -#endif -#ifndef Tcl_EvalObjEx_TCL_DECLARED -#define Tcl_EvalObjEx_TCL_DECLARED -/* 293 */ -EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_ExitThread_TCL_DECLARED -#define Tcl_ExitThread_TCL_DECLARED -/* 294 */ -EXTERN void Tcl_ExitThread (int status); -#endif -#ifndef Tcl_ExternalToUtf_TCL_DECLARED -#define Tcl_ExternalToUtf_TCL_DECLARED -/* 295 */ -EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, - Tcl_Encoding encoding, CONST char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED -#define Tcl_ExternalToUtfDString_TCL_DECLARED -/* 296 */ -EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, - CONST char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_FinalizeThread_TCL_DECLARED -#define Tcl_FinalizeThread_TCL_DECLARED -/* 297 */ -EXTERN void Tcl_FinalizeThread (void); -#endif -#ifndef Tcl_FinalizeNotifier_TCL_DECLARED -#define Tcl_FinalizeNotifier_TCL_DECLARED -/* 298 */ -EXTERN void Tcl_FinalizeNotifier (ClientData clientData); -#endif -#ifndef Tcl_FreeEncoding_TCL_DECLARED -#define Tcl_FreeEncoding_TCL_DECLARED -/* 299 */ -EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetCurrentThread_TCL_DECLARED -#define Tcl_GetCurrentThread_TCL_DECLARED -/* 300 */ -EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); -#endif -#ifndef Tcl_GetEncoding_TCL_DECLARED -#define Tcl_GetEncoding_TCL_DECLARED -/* 301 */ -EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_GetEncodingName_TCL_DECLARED -#define Tcl_GetEncodingName_TCL_DECLARED -/* 302 */ -EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetEncodingNames_TCL_DECLARED -#define Tcl_GetEncodingNames_TCL_DECLARED -/* 303 */ -EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED -#define Tcl_GetIndexFromObjStruct_TCL_DECLARED -/* 304 */ -EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST VOID * tablePtr, - int offset, CONST char * msg, int flags, - int * indexPtr); -#endif -#ifndef Tcl_GetThreadData_TCL_DECLARED -#define Tcl_GetThreadData_TCL_DECLARED -/* 305 */ -EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, - int size); -#endif -#ifndef Tcl_GetVar2Ex_TCL_DECLARED -#define Tcl_GetVar2Ex_TCL_DECLARED -/* 306 */ -EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags); -#endif -#ifndef Tcl_InitNotifier_TCL_DECLARED -#define Tcl_InitNotifier_TCL_DECLARED -/* 307 */ -EXTERN ClientData Tcl_InitNotifier (void); -#endif -#ifndef Tcl_MutexLock_TCL_DECLARED -#define Tcl_MutexLock_TCL_DECLARED -/* 308 */ -EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_MutexUnlock_TCL_DECLARED -#define Tcl_MutexUnlock_TCL_DECLARED -/* 309 */ -EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_ConditionNotify_TCL_DECLARED -#define Tcl_ConditionNotify_TCL_DECLARED -/* 310 */ -EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_ConditionWait_TCL_DECLARED -#define Tcl_ConditionWait_TCL_DECLARED -/* 311 */ -EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, - Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); -#endif -#ifndef Tcl_NumUtfChars_TCL_DECLARED -#define Tcl_NumUtfChars_TCL_DECLARED -/* 312 */ -EXTERN int Tcl_NumUtfChars (CONST char * src, int length); -#endif -#ifndef Tcl_ReadChars_TCL_DECLARED -#define Tcl_ReadChars_TCL_DECLARED -/* 313 */ -EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, - int charsToRead, int appendFlag); -#endif -#ifndef Tcl_RestoreResult_TCL_DECLARED -#define Tcl_RestoreResult_TCL_DECLARED -/* 314 */ -EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SaveResult_TCL_DECLARED -#define Tcl_SaveResult_TCL_DECLARED -/* 315 */ -EXTERN void Tcl_SaveResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SetSystemEncoding_TCL_DECLARED -#define Tcl_SetSystemEncoding_TCL_DECLARED -/* 316 */ -EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_SetVar2Ex_TCL_DECLARED -#define Tcl_SetVar2Ex_TCL_DECLARED -/* 317 */ -EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - Tcl_Obj * newValuePtr, int flags); -#endif -#ifndef Tcl_ThreadAlert_TCL_DECLARED -#define Tcl_ThreadAlert_TCL_DECLARED -/* 318 */ -EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); -#endif -#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED -#define Tcl_ThreadQueueEvent_TCL_DECLARED -/* 319 */ -EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, - Tcl_Event* evPtr, Tcl_QueuePosition position); -#endif -#ifndef Tcl_UniCharAtIndex_TCL_DECLARED -#define Tcl_UniCharAtIndex_TCL_DECLARED -/* 320 */ -EXTERN Tcl_UniChar Tcl_UniCharAtIndex (CONST char * src, int index); -#endif -#ifndef Tcl_UniCharToLower_TCL_DECLARED -#define Tcl_UniCharToLower_TCL_DECLARED -/* 321 */ -EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); -#endif -#ifndef Tcl_UniCharToTitle_TCL_DECLARED -#define Tcl_UniCharToTitle_TCL_DECLARED -/* 322 */ -EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); -#endif -#ifndef Tcl_UniCharToUpper_TCL_DECLARED -#define Tcl_UniCharToUpper_TCL_DECLARED -/* 323 */ -EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); -#endif -#ifndef Tcl_UniCharToUtf_TCL_DECLARED -#define Tcl_UniCharToUtf_TCL_DECLARED -/* 324 */ -EXTERN int Tcl_UniCharToUtf (int ch, char * buf); -#endif -#ifndef Tcl_UtfAtIndex_TCL_DECLARED -#define Tcl_UtfAtIndex_TCL_DECLARED -/* 325 */ -EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (CONST char * src, int index); -#endif -#ifndef Tcl_UtfCharComplete_TCL_DECLARED -#define Tcl_UtfCharComplete_TCL_DECLARED -/* 326 */ -EXTERN int Tcl_UtfCharComplete (CONST char * src, int length); -#endif -#ifndef Tcl_UtfBackslash_TCL_DECLARED -#define Tcl_UtfBackslash_TCL_DECLARED -/* 327 */ -EXTERN int Tcl_UtfBackslash (CONST char * src, int * readPtr, - char * dst); -#endif -#ifndef Tcl_UtfFindFirst_TCL_DECLARED -#define Tcl_UtfFindFirst_TCL_DECLARED -/* 328 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (CONST char * src, int ch); -#endif -#ifndef Tcl_UtfFindLast_TCL_DECLARED -#define Tcl_UtfFindLast_TCL_DECLARED -/* 329 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindLast (CONST char * src, int ch); -#endif -#ifndef Tcl_UtfNext_TCL_DECLARED -#define Tcl_UtfNext_TCL_DECLARED -/* 330 */ -EXTERN CONST84_RETURN char * Tcl_UtfNext (CONST char * src); -#endif -#ifndef Tcl_UtfPrev_TCL_DECLARED -#define Tcl_UtfPrev_TCL_DECLARED -/* 331 */ -EXTERN CONST84_RETURN char * Tcl_UtfPrev (CONST char * src, - CONST char * start); -#endif -#ifndef Tcl_UtfToExternal_TCL_DECLARED -#define Tcl_UtfToExternal_TCL_DECLARED -/* 332 */ -EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, - Tcl_Encoding encoding, CONST char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_UtfToExternalDString_TCL_DECLARED -#define Tcl_UtfToExternalDString_TCL_DECLARED -/* 333 */ -EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, - CONST char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToLower_TCL_DECLARED -#define Tcl_UtfToLower_TCL_DECLARED -/* 334 */ -EXTERN int Tcl_UtfToLower (char * src); -#endif -#ifndef Tcl_UtfToTitle_TCL_DECLARED -#define Tcl_UtfToTitle_TCL_DECLARED -/* 335 */ -EXTERN int Tcl_UtfToTitle (char * src); -#endif -#ifndef Tcl_UtfToUniChar_TCL_DECLARED -#define Tcl_UtfToUniChar_TCL_DECLARED -/* 336 */ -EXTERN int Tcl_UtfToUniChar (CONST char * src, - Tcl_UniChar * chPtr); -#endif -#ifndef Tcl_UtfToUpper_TCL_DECLARED -#define Tcl_UtfToUpper_TCL_DECLARED -/* 337 */ -EXTERN int Tcl_UtfToUpper (char * src); -#endif -#ifndef Tcl_WriteChars_TCL_DECLARED -#define Tcl_WriteChars_TCL_DECLARED -/* 338 */ -EXTERN int Tcl_WriteChars (Tcl_Channel chan, CONST char * src, - int srcLen); -#endif -#ifndef Tcl_WriteObj_TCL_DECLARED -#define Tcl_WriteObj_TCL_DECLARED -/* 339 */ -EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetString_TCL_DECLARED -#define Tcl_GetString_TCL_DECLARED -/* 340 */ -EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED -#define Tcl_GetDefaultEncodingDir_TCL_DECLARED -/* 341 */ -EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); -#endif -#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED -#define Tcl_SetDefaultEncodingDir_TCL_DECLARED -/* 342 */ -EXTERN void Tcl_SetDefaultEncodingDir (CONST char * path); -#endif -#ifndef Tcl_AlertNotifier_TCL_DECLARED -#define Tcl_AlertNotifier_TCL_DECLARED -/* 343 */ -EXTERN void Tcl_AlertNotifier (ClientData clientData); -#endif -#ifndef Tcl_ServiceModeHook_TCL_DECLARED -#define Tcl_ServiceModeHook_TCL_DECLARED -/* 344 */ -EXTERN void Tcl_ServiceModeHook (int mode); -#endif -#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED -#define Tcl_UniCharIsAlnum_TCL_DECLARED -/* 345 */ -EXTERN int Tcl_UniCharIsAlnum (int ch); -#endif -#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED -#define Tcl_UniCharIsAlpha_TCL_DECLARED -/* 346 */ -EXTERN int Tcl_UniCharIsAlpha (int ch); -#endif -#ifndef Tcl_UniCharIsDigit_TCL_DECLARED -#define Tcl_UniCharIsDigit_TCL_DECLARED -/* 347 */ -EXTERN int Tcl_UniCharIsDigit (int ch); -#endif -#ifndef Tcl_UniCharIsLower_TCL_DECLARED -#define Tcl_UniCharIsLower_TCL_DECLARED -/* 348 */ -EXTERN int Tcl_UniCharIsLower (int ch); -#endif -#ifndef Tcl_UniCharIsSpace_TCL_DECLARED -#define Tcl_UniCharIsSpace_TCL_DECLARED -/* 349 */ -EXTERN int Tcl_UniCharIsSpace (int ch); -#endif -#ifndef Tcl_UniCharIsUpper_TCL_DECLARED -#define Tcl_UniCharIsUpper_TCL_DECLARED -/* 350 */ -EXTERN int Tcl_UniCharIsUpper (int ch); -#endif -#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED -#define Tcl_UniCharIsWordChar_TCL_DECLARED -/* 351 */ -EXTERN int Tcl_UniCharIsWordChar (int ch); -#endif -#ifndef Tcl_UniCharLen_TCL_DECLARED -#define Tcl_UniCharLen_TCL_DECLARED -/* 352 */ -EXTERN int Tcl_UniCharLen (CONST Tcl_UniChar * uniStr); -#endif -#ifndef Tcl_UniCharNcmp_TCL_DECLARED -#define Tcl_UniCharNcmp_TCL_DECLARED -/* 353 */ -EXTERN int Tcl_UniCharNcmp (CONST Tcl_UniChar * ucs, - CONST Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED -#define Tcl_UniCharToUtfDString_TCL_DECLARED -/* 354 */ -EXTERN char * Tcl_UniCharToUtfDString (CONST Tcl_UniChar * uniStr, - int uniLength, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED -#define Tcl_UtfToUniCharDString_TCL_DECLARED -/* 355 */ -EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (CONST char * src, - int length, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED -#define Tcl_GetRegExpFromObj_TCL_DECLARED -/* 356 */ -EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, - Tcl_Obj * patObj, int flags); -#endif -#ifndef Tcl_EvalTokens_TCL_DECLARED -#define Tcl_EvalTokens_TCL_DECLARED -/* 357 */ -EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_FreeParse_TCL_DECLARED -#define Tcl_FreeParse_TCL_DECLARED -/* 358 */ -EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_LogCommandInfo_TCL_DECLARED -#define Tcl_LogCommandInfo_TCL_DECLARED -/* 359 */ -EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, - CONST char * script, CONST char * command, - int length); -#endif -#ifndef Tcl_ParseBraces_TCL_DECLARED -#define Tcl_ParseBraces_TCL_DECLARED -/* 360 */ -EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseCommand_TCL_DECLARED -#define Tcl_ParseCommand_TCL_DECLARED -/* 361 */ -EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, - CONST char * start, int numBytes, int nested, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseExpr_TCL_DECLARED -#define Tcl_ParseExpr_TCL_DECLARED -/* 362 */ -EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseQuotedString_TCL_DECLARED -#define Tcl_ParseQuotedString_TCL_DECLARED -/* 363 */ -EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseVarName_TCL_DECLARED -#define Tcl_ParseVarName_TCL_DECLARED -/* 364 */ -EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append); -#endif -#ifndef Tcl_GetCwd_TCL_DECLARED -#define Tcl_GetCwd_TCL_DECLARED -/* 365 */ -EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); -#endif -#ifndef Tcl_Chdir_TCL_DECLARED -#define Tcl_Chdir_TCL_DECLARED -/* 366 */ -EXTERN int Tcl_Chdir (CONST char * dirName); -#endif -#ifndef Tcl_Access_TCL_DECLARED -#define Tcl_Access_TCL_DECLARED -/* 367 */ -EXTERN int Tcl_Access (CONST char * path, int mode); -#endif -#ifndef Tcl_Stat_TCL_DECLARED -#define Tcl_Stat_TCL_DECLARED -/* 368 */ -EXTERN int Tcl_Stat (CONST char * path, struct stat * bufPtr); -#endif -#ifndef Tcl_UtfNcmp_TCL_DECLARED -#define Tcl_UtfNcmp_TCL_DECLARED -/* 369 */ -EXTERN int Tcl_UtfNcmp (CONST char * s1, CONST char * s2, - unsigned long n); -#endif -#ifndef Tcl_UtfNcasecmp_TCL_DECLARED -#define Tcl_UtfNcasecmp_TCL_DECLARED -/* 370 */ -EXTERN int Tcl_UtfNcasecmp (CONST char * s1, CONST char * s2, - unsigned long n); -#endif -#ifndef Tcl_StringCaseMatch_TCL_DECLARED -#define Tcl_StringCaseMatch_TCL_DECLARED -/* 371 */ -EXTERN int Tcl_StringCaseMatch (CONST char * str, - CONST char * pattern, int nocase); -#endif -#ifndef Tcl_UniCharIsControl_TCL_DECLARED -#define Tcl_UniCharIsControl_TCL_DECLARED -/* 372 */ -EXTERN int Tcl_UniCharIsControl (int ch); -#endif -#ifndef Tcl_UniCharIsGraph_TCL_DECLARED -#define Tcl_UniCharIsGraph_TCL_DECLARED -/* 373 */ -EXTERN int Tcl_UniCharIsGraph (int ch); -#endif -#ifndef Tcl_UniCharIsPrint_TCL_DECLARED -#define Tcl_UniCharIsPrint_TCL_DECLARED -/* 374 */ -EXTERN int Tcl_UniCharIsPrint (int ch); -#endif -#ifndef Tcl_UniCharIsPunct_TCL_DECLARED -#define Tcl_UniCharIsPunct_TCL_DECLARED -/* 375 */ -EXTERN int Tcl_UniCharIsPunct (int ch); -#endif -#ifndef Tcl_RegExpExecObj_TCL_DECLARED -#define Tcl_RegExpExecObj_TCL_DECLARED -/* 376 */ -EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, - Tcl_RegExp regexp, Tcl_Obj * textObj, - int offset, int nmatches, int flags); -#endif -#ifndef Tcl_RegExpGetInfo_TCL_DECLARED -#define Tcl_RegExpGetInfo_TCL_DECLARED -/* 377 */ -EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, - Tcl_RegExpInfo * infoPtr); -#endif -#ifndef Tcl_NewUnicodeObj_TCL_DECLARED -#define Tcl_NewUnicodeObj_TCL_DECLARED -/* 378 */ -EXTERN Tcl_Obj * Tcl_NewUnicodeObj (CONST Tcl_UniChar * unicode, - int numChars); -#endif -#ifndef Tcl_SetUnicodeObj_TCL_DECLARED -#define Tcl_SetUnicodeObj_TCL_DECLARED -/* 379 */ -EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, - CONST Tcl_UniChar * unicode, int numChars); -#endif -#ifndef Tcl_GetCharLength_TCL_DECLARED -#define Tcl_GetCharLength_TCL_DECLARED -/* 380 */ -EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetUniChar_TCL_DECLARED -#define Tcl_GetUniChar_TCL_DECLARED -/* 381 */ -EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); -#endif -#ifndef Tcl_GetUnicode_TCL_DECLARED -#define Tcl_GetUnicode_TCL_DECLARED -/* 382 */ -EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetRange_TCL_DECLARED -#define Tcl_GetRange_TCL_DECLARED -/* 383 */ -EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); -#endif -#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED -#define Tcl_AppendUnicodeToObj_TCL_DECLARED -/* 384 */ -EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, - CONST Tcl_UniChar * unicode, int length); -#endif -#ifndef Tcl_RegExpMatchObj_TCL_DECLARED -#define Tcl_RegExpMatchObj_TCL_DECLARED -/* 385 */ -EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, - Tcl_Obj * textObj, Tcl_Obj * patternObj); -#endif -#ifndef Tcl_SetNotifier_TCL_DECLARED -#define Tcl_SetNotifier_TCL_DECLARED -/* 386 */ -EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); -#endif -#ifndef Tcl_GetAllocMutex_TCL_DECLARED -#define Tcl_GetAllocMutex_TCL_DECLARED -/* 387 */ -EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); -#endif -#ifndef Tcl_GetChannelNames_TCL_DECLARED -#define Tcl_GetChannelNames_TCL_DECLARED -/* 388 */ -EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED -#define Tcl_GetChannelNamesEx_TCL_DECLARED -/* 389 */ -EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, - CONST char * pattern); -#endif -#ifndef Tcl_ProcObjCmd_TCL_DECLARED -#define Tcl_ProcObjCmd_TCL_DECLARED -/* 390 */ -EXTERN int Tcl_ProcObjCmd (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_ConditionFinalize_TCL_DECLARED -#define Tcl_ConditionFinalize_TCL_DECLARED -/* 391 */ -EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_MutexFinalize_TCL_DECLARED -#define Tcl_MutexFinalize_TCL_DECLARED -/* 392 */ -EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); -#endif -#ifndef Tcl_CreateThread_TCL_DECLARED -#define Tcl_CreateThread_TCL_DECLARED -/* 393 */ -EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, - Tcl_ThreadCreateProc proc, - ClientData clientData, int stackSize, - int flags); -#endif -#ifndef Tcl_ReadRaw_TCL_DECLARED -#define Tcl_ReadRaw_TCL_DECLARED -/* 394 */ -EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, - int bytesToRead); -#endif -#ifndef Tcl_WriteRaw_TCL_DECLARED -#define Tcl_WriteRaw_TCL_DECLARED -/* 395 */ -EXTERN int Tcl_WriteRaw (Tcl_Channel chan, CONST char * src, - int srcLen); -#endif -#ifndef Tcl_GetTopChannel_TCL_DECLARED -#define Tcl_GetTopChannel_TCL_DECLARED -/* 396 */ -EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelBuffered_TCL_DECLARED -#define Tcl_ChannelBuffered_TCL_DECLARED -/* 397 */ -EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelName_TCL_DECLARED -#define Tcl_ChannelName_TCL_DECLARED -/* 398 */ -EXTERN CONST84_RETURN char * Tcl_ChannelName ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelVersion_TCL_DECLARED -#define Tcl_ChannelVersion_TCL_DECLARED -/* 399 */ -EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED -#define Tcl_ChannelBlockModeProc_TCL_DECLARED -/* 400 */ -EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelCloseProc_TCL_DECLARED -#define Tcl_ChannelCloseProc_TCL_DECLARED -/* 401 */ -EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED -#define Tcl_ChannelClose2Proc_TCL_DECLARED -/* 402 */ -EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelInputProc_TCL_DECLARED -#define Tcl_ChannelInputProc_TCL_DECLARED -/* 403 */ -EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelOutputProc_TCL_DECLARED -#define Tcl_ChannelOutputProc_TCL_DECLARED -/* 404 */ -EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSeekProc_TCL_DECLARED -#define Tcl_ChannelSeekProc_TCL_DECLARED -/* 405 */ -EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED -#define Tcl_ChannelSetOptionProc_TCL_DECLARED -/* 406 */ -EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED -#define Tcl_ChannelGetOptionProc_TCL_DECLARED -/* 407 */ -EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelWatchProc_TCL_DECLARED -#define Tcl_ChannelWatchProc_TCL_DECLARED -/* 408 */ -EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED -#define Tcl_ChannelGetHandleProc_TCL_DECLARED -/* 409 */ -EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelFlushProc_TCL_DECLARED -#define Tcl_ChannelFlushProc_TCL_DECLARED -/* 410 */ -EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED -#define Tcl_ChannelHandlerProc_TCL_DECLARED -/* 411 */ -EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_JoinThread_TCL_DECLARED -#define Tcl_JoinThread_TCL_DECLARED -/* 412 */ -EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int* result); -#endif -#ifndef Tcl_IsChannelShared_TCL_DECLARED -#define Tcl_IsChannelShared_TCL_DECLARED -/* 413 */ -EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelRegistered_TCL_DECLARED -#define Tcl_IsChannelRegistered_TCL_DECLARED -/* 414 */ -EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_CutChannel_TCL_DECLARED -#define Tcl_CutChannel_TCL_DECLARED -/* 415 */ -EXTERN void Tcl_CutChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_SpliceChannel_TCL_DECLARED -#define Tcl_SpliceChannel_TCL_DECLARED -/* 416 */ -EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED -#define Tcl_ClearChannelHandlers_TCL_DECLARED -/* 417 */ -EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelExisting_TCL_DECLARED -#define Tcl_IsChannelExisting_TCL_DECLARED -/* 418 */ -EXTERN int Tcl_IsChannelExisting (CONST char* channelName); -#endif -#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED -#define Tcl_UniCharNcasecmp_TCL_DECLARED -/* 419 */ -EXTERN int Tcl_UniCharNcasecmp (CONST Tcl_UniChar * ucs, - CONST Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED -#define Tcl_UniCharCaseMatch_TCL_DECLARED -/* 420 */ -EXTERN int Tcl_UniCharCaseMatch (CONST Tcl_UniChar * uniStr, - CONST Tcl_UniChar * uniPattern, int nocase); -#endif -#ifndef Tcl_FindHashEntry_TCL_DECLARED -#define Tcl_FindHashEntry_TCL_DECLARED -/* 421 */ -EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, - CONST char * key); -#endif -#ifndef Tcl_CreateHashEntry_TCL_DECLARED -#define Tcl_CreateHashEntry_TCL_DECLARED -/* 422 */ -EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, - CONST char * key, int * newPtr); -#endif -#ifndef Tcl_InitCustomHashTable_TCL_DECLARED -#define Tcl_InitCustomHashTable_TCL_DECLARED -/* 423 */ -EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, - int keyType, Tcl_HashKeyType * typePtr); -#endif -#ifndef Tcl_InitObjHashTable_TCL_DECLARED -#define Tcl_InitObjHashTable_TCL_DECLARED -/* 424 */ -EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_CommandTraceInfo_TCL_DECLARED -#define Tcl_CommandTraceInfo_TCL_DECLARED -/* 425 */ -EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_TraceCommand_TCL_DECLARED -#define Tcl_TraceCommand_TCL_DECLARED -/* 426 */ -EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceCommand_TCL_DECLARED -#define Tcl_UntraceCommand_TCL_DECLARED -/* 427 */ -EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AttemptAlloc_TCL_DECLARED -#define Tcl_AttemptAlloc_TCL_DECLARED -/* 428 */ -EXTERN char * Tcl_AttemptAlloc (unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED -#define Tcl_AttemptDbCkalloc_TCL_DECLARED -/* 429 */ -EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, - CONST char * file, int line); -#endif -#ifndef Tcl_AttemptRealloc_TCL_DECLARED -#define Tcl_AttemptRealloc_TCL_DECLARED -/* 430 */ -EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED -#define Tcl_AttemptDbCkrealloc_TCL_DECLARED -/* 431 */ -EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, - unsigned int size, CONST char * file, - int line); -#endif -#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED -#define Tcl_AttemptSetObjLength_TCL_DECLARED -/* 432 */ -EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, - int length); -#endif -#ifndef Tcl_GetChannelThread_TCL_DECLARED -#define Tcl_GetChannelThread_TCL_DECLARED -/* 433 */ -EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); -#endif -#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED -#define Tcl_GetUnicodeFromObj_TCL_DECLARED -/* 434 */ -EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED -#define Tcl_GetMathFuncInfo_TCL_DECLARED -/* 435 */ -EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, - CONST char * name, int * numArgsPtr, - Tcl_ValueType ** argTypesPtr, - Tcl_MathProc ** procPtr, - ClientData * clientDataPtr); -#endif -#ifndef Tcl_ListMathFuncs_TCL_DECLARED -#define Tcl_ListMathFuncs_TCL_DECLARED -/* 436 */ -EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, - CONST char * pattern); -#endif -#ifndef Tcl_SubstObj_TCL_DECLARED -#define Tcl_SubstObj_TCL_DECLARED -/* 437 */ -EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_DetachChannel_TCL_DECLARED -#define Tcl_DetachChannel_TCL_DECLARED -/* 438 */ -EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_IsStandardChannel_TCL_DECLARED -#define Tcl_IsStandardChannel_TCL_DECLARED -/* 439 */ -EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_FSCopyFile_TCL_DECLARED -#define Tcl_FSCopyFile_TCL_DECLARED -/* 440 */ -EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSCopyDirectory_TCL_DECLARED -#define Tcl_FSCopyDirectory_TCL_DECLARED -/* 441 */ -EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSCreateDirectory_TCL_DECLARED -#define Tcl_FSCreateDirectory_TCL_DECLARED -/* 442 */ -EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSDeleteFile_TCL_DECLARED -#define Tcl_FSDeleteFile_TCL_DECLARED -/* 443 */ -EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSLoadFile_TCL_DECLARED -#define Tcl_FSLoadFile_TCL_DECLARED -/* 444 */ -EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, - Tcl_Obj * pathPtr, CONST char * sym1, - CONST char * sym2, - Tcl_PackageInitProc ** proc1Ptr, - Tcl_PackageInitProc ** proc2Ptr, - Tcl_LoadHandle * handlePtr, - Tcl_FSUnloadFileProc ** unloadProcPtr); -#endif -#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED -#define Tcl_FSMatchInDirectory_TCL_DECLARED -/* 445 */ -EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, - Tcl_Obj * result, Tcl_Obj * pathPtr, - CONST char * pattern, - Tcl_GlobTypeData * types); -#endif -#ifndef Tcl_FSLink_TCL_DECLARED -#define Tcl_FSLink_TCL_DECLARED -/* 446 */ -EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, - int linkAction); -#endif -#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED -#define Tcl_FSRemoveDirectory_TCL_DECLARED -/* 447 */ -EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSRenameFile_TCL_DECLARED -#define Tcl_FSRenameFile_TCL_DECLARED -/* 448 */ -EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSLstat_TCL_DECLARED -#define Tcl_FSLstat_TCL_DECLARED -/* 449 */ -EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSUtime_TCL_DECLARED -#define Tcl_FSUtime_TCL_DECLARED -/* 450 */ -EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, - struct utimbuf * tval); -#endif -#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED -#define Tcl_FSFileAttrsGet_TCL_DECLARED -/* 451 */ -EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED -#define Tcl_FSFileAttrsSet_TCL_DECLARED -/* 452 */ -EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED -#define Tcl_FSFileAttrStrings_TCL_DECLARED -/* 453 */ -EXTERN CONST char ** Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, - Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSStat_TCL_DECLARED -#define Tcl_FSStat_TCL_DECLARED -/* 454 */ -EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSAccess_TCL_DECLARED -#define Tcl_FSAccess_TCL_DECLARED -/* 455 */ -EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); -#endif -#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED -#define Tcl_FSOpenFileChannel_TCL_DECLARED -/* 456 */ -EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, CONST char * modeString, - int permissions); -#endif -#ifndef Tcl_FSGetCwd_TCL_DECLARED -#define Tcl_FSGetCwd_TCL_DECLARED -/* 457 */ -EXTERN Tcl_Obj* Tcl_FSGetCwd (Tcl_Interp * interp); -#endif -#ifndef Tcl_FSChdir_TCL_DECLARED -#define Tcl_FSChdir_TCL_DECLARED -/* 458 */ -EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSConvertToPathType_TCL_DECLARED -#define Tcl_FSConvertToPathType_TCL_DECLARED -/* 459 */ -EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSJoinPath_TCL_DECLARED -#define Tcl_FSJoinPath_TCL_DECLARED -/* 460 */ -EXTERN Tcl_Obj* Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); -#endif -#ifndef Tcl_FSSplitPath_TCL_DECLARED -#define Tcl_FSSplitPath_TCL_DECLARED -/* 461 */ -EXTERN Tcl_Obj* Tcl_FSSplitPath (Tcl_Obj* pathPtr, int * lenPtr); -#endif -#ifndef Tcl_FSEqualPaths_TCL_DECLARED -#define Tcl_FSEqualPaths_TCL_DECLARED -/* 462 */ -EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, - Tcl_Obj* secondPtr); -#endif -#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED -#define Tcl_FSGetNormalizedPath_TCL_DECLARED -/* 463 */ -EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSJoinToPath_TCL_DECLARED -#define Tcl_FSJoinToPath_TCL_DECLARED -/* 464 */ -EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_FSGetInternalRep_TCL_DECLARED -#define Tcl_FSGetInternalRep_TCL_DECLARED -/* 465 */ -EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, - Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED -#define Tcl_FSGetTranslatedPath_TCL_DECLARED -/* 466 */ -EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSEvalFile_TCL_DECLARED -#define Tcl_FSEvalFile_TCL_DECLARED -/* 467 */ -EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, - Tcl_Obj * fileName); -#endif -#ifndef Tcl_FSNewNativePath_TCL_DECLARED -#define Tcl_FSNewNativePath_TCL_DECLARED -/* 468 */ -EXTERN Tcl_Obj* Tcl_FSNewNativePath (Tcl_Filesystem* fromFilesystem, - ClientData clientData); -#endif -#ifndef Tcl_FSGetNativePath_TCL_DECLARED -#define Tcl_FSGetNativePath_TCL_DECLARED -/* 469 */ -EXTERN CONST char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED -#define Tcl_FSFileSystemInfo_TCL_DECLARED -/* 470 */ -EXTERN Tcl_Obj* Tcl_FSFileSystemInfo (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSPathSeparator_TCL_DECLARED -#define Tcl_FSPathSeparator_TCL_DECLARED -/* 471 */ -EXTERN Tcl_Obj* Tcl_FSPathSeparator (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSListVolumes_TCL_DECLARED -#define Tcl_FSListVolumes_TCL_DECLARED -/* 472 */ -EXTERN Tcl_Obj* Tcl_FSListVolumes (void); -#endif -#ifndef Tcl_FSRegister_TCL_DECLARED -#define Tcl_FSRegister_TCL_DECLARED -/* 473 */ -EXTERN int Tcl_FSRegister (ClientData clientData, - Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSUnregister_TCL_DECLARED -#define Tcl_FSUnregister_TCL_DECLARED -/* 474 */ -EXTERN int Tcl_FSUnregister (Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSData_TCL_DECLARED -#define Tcl_FSData_TCL_DECLARED -/* 475 */ -EXTERN ClientData Tcl_FSData (Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED -#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED -/* 476 */ -EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED -#define Tcl_FSGetFileSystemForPath_TCL_DECLARED -/* 477 */ -EXTERN Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); -#endif -#ifndef Tcl_FSGetPathType_TCL_DECLARED -#define Tcl_FSGetPathType_TCL_DECLARED -/* 478 */ -EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_OutputBuffered_TCL_DECLARED -#define Tcl_OutputBuffered_TCL_DECLARED -/* 479 */ -EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_FSMountsChanged_TCL_DECLARED -#define Tcl_FSMountsChanged_TCL_DECLARED -/* 480 */ -EXTERN void Tcl_FSMountsChanged (Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_EvalTokensStandard_TCL_DECLARED -#define Tcl_EvalTokensStandard_TCL_DECLARED -/* 481 */ -EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_GetTime_TCL_DECLARED -#define Tcl_GetTime_TCL_DECLARED -/* 482 */ -EXTERN void Tcl_GetTime (Tcl_Time* timeBuf); -#endif -#ifndef Tcl_CreateObjTrace_TCL_DECLARED -#define Tcl_CreateObjTrace_TCL_DECLARED -/* 483 */ -EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, - int flags, Tcl_CmdObjTraceProc* objProc, - ClientData clientData, - Tcl_CmdObjTraceDeleteProc* delProc); -#endif -#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED -#define Tcl_GetCommandInfoFromToken_TCL_DECLARED -/* 484 */ -EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, - Tcl_CmdInfo* infoPtr); -#endif -#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED -#define Tcl_SetCommandInfoFromToken_TCL_DECLARED -/* 485 */ -EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, - CONST Tcl_CmdInfo* infoPtr); -#endif -#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED -#define Tcl_DbNewWideIntObj_TCL_DECLARED -/* 486 */ -EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, - CONST char * file, int line); -#endif -#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED -#define Tcl_GetWideIntFromObj_TCL_DECLARED -/* 487 */ -EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_WideInt * widePtr); -#endif -#ifndef Tcl_NewWideIntObj_TCL_DECLARED -#define Tcl_NewWideIntObj_TCL_DECLARED -/* 488 */ -EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); -#endif -#ifndef Tcl_SetWideIntObj_TCL_DECLARED -#define Tcl_SetWideIntObj_TCL_DECLARED -/* 489 */ -EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, - Tcl_WideInt wideValue); -#endif -#ifndef Tcl_AllocStatBuf_TCL_DECLARED -#define Tcl_AllocStatBuf_TCL_DECLARED -/* 490 */ -EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); -#endif -#ifndef Tcl_Seek_TCL_DECLARED -#define Tcl_Seek_TCL_DECLARED -/* 491 */ -EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, - int mode); -#endif -#ifndef Tcl_Tell_TCL_DECLARED -#define Tcl_Tell_TCL_DECLARED -/* 492 */ -EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED -#define Tcl_ChannelWideSeekProc_TCL_DECLARED -/* 493 */ -EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_DictObjPut_TCL_DECLARED -#define Tcl_DictObjPut_TCL_DECLARED -/* 494 */ -EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjGet_TCL_DECLARED -#define Tcl_DictObjGet_TCL_DECLARED -/* 495 */ -EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj ** valuePtrPtr); -#endif -#ifndef Tcl_DictObjRemove_TCL_DECLARED -#define Tcl_DictObjRemove_TCL_DECLARED -/* 496 */ -EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); -#endif -#ifndef Tcl_DictObjSize_TCL_DECLARED -#define Tcl_DictObjSize_TCL_DECLARED -/* 497 */ -EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int * sizePtr); -#endif -#ifndef Tcl_DictObjFirst_TCL_DECLARED -#define Tcl_DictObjFirst_TCL_DECLARED -/* 498 */ -EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, - Tcl_Obj * dictPtr, - Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjNext_TCL_DECLARED -#define Tcl_DictObjNext_TCL_DECLARED -/* 499 */ -EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjDone_TCL_DECLARED -#define Tcl_DictObjDone_TCL_DECLARED -/* 500 */ -EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); -#endif -#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED -#define Tcl_DictObjPutKeyList_TCL_DECLARED -/* 501 */ -EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED -#define Tcl_DictObjRemoveKeyList_TCL_DECLARED -/* 502 */ -EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *CONST * keyv); -#endif -#ifndef Tcl_NewDictObj_TCL_DECLARED -#define Tcl_NewDictObj_TCL_DECLARED -/* 503 */ -EXTERN Tcl_Obj * Tcl_NewDictObj (void); -#endif -#ifndef Tcl_DbNewDictObj_TCL_DECLARED -#define Tcl_DbNewDictObj_TCL_DECLARED -/* 504 */ -EXTERN Tcl_Obj * Tcl_DbNewDictObj (CONST char * file, int line); -#endif -#ifndef Tcl_RegisterConfig_TCL_DECLARED -#define Tcl_RegisterConfig_TCL_DECLARED -/* 505 */ -EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, - CONST char* pkgName, - Tcl_Config* configuration, - CONST char* valEncoding); -#endif -#ifndef Tcl_CreateNamespace_TCL_DECLARED -#define Tcl_CreateNamespace_TCL_DECLARED -/* 506 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - CONST char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); -#endif -#ifndef Tcl_DeleteNamespace_TCL_DECLARED -#define Tcl_DeleteNamespace_TCL_DECLARED -/* 507 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_AppendExportList_TCL_DECLARED -#define Tcl_AppendExportList_TCL_DECLARED -/* 508 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_Export_TCL_DECLARED -#define Tcl_Export_TCL_DECLARED -/* 509 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int resetListFirst); -#endif -#ifndef Tcl_Import_TCL_DECLARED -#define Tcl_Import_TCL_DECLARED -/* 510 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int allowOverwrite); -#endif -#ifndef Tcl_ForgetImport_TCL_DECLARED -#define Tcl_ForgetImport_TCL_DECLARED -/* 511 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern); -#endif -#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED -#define Tcl_GetCurrentNamespace_TCL_DECLARED -/* 512 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED -#define Tcl_GetGlobalNamespace_TCL_DECLARED -/* 513 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_FindNamespace_TCL_DECLARED -#define Tcl_FindNamespace_TCL_DECLARED -/* 514 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_FindCommand_TCL_DECLARED -#define Tcl_FindCommand_TCL_DECLARED -/* 515 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_GetCommandFromObj_TCL_DECLARED -#define Tcl_GetCommandFromObj_TCL_DECLARED -/* 516 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCommandFullName_TCL_DECLARED -#define Tcl_GetCommandFullName_TCL_DECLARED -/* 517 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSEvalFileEx_TCL_DECLARED -#define Tcl_FSEvalFileEx_TCL_DECLARED -/* 518 */ -EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, - Tcl_Obj * fileName, - CONST char * encodingName); -#endif -#ifndef Tcl_SetExitProc_TCL_DECLARED -#define Tcl_SetExitProc_TCL_DECLARED -/* 519 */ -EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); -#endif -#ifndef Tcl_LimitAddHandler_TCL_DECLARED -#define Tcl_LimitAddHandler_TCL_DECLARED -/* 520 */ -EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, - Tcl_LimitHandlerProc * handlerProc, - ClientData clientData, - Tcl_LimitHandlerDeleteProc * deleteProc); -#endif -#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED -#define Tcl_LimitRemoveHandler_TCL_DECLARED -/* 521 */ -EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, - int type, Tcl_LimitHandlerProc * handlerProc, - ClientData clientData); -#endif -#ifndef Tcl_LimitReady_TCL_DECLARED -#define Tcl_LimitReady_TCL_DECLARED -/* 522 */ -EXTERN int Tcl_LimitReady (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitCheck_TCL_DECLARED -#define Tcl_LimitCheck_TCL_DECLARED -/* 523 */ -EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitExceeded_TCL_DECLARED -#define Tcl_LimitExceeded_TCL_DECLARED -/* 524 */ -EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitSetCommands_TCL_DECLARED -#define Tcl_LimitSetCommands_TCL_DECLARED -/* 525 */ -EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, - int commandLimit); -#endif -#ifndef Tcl_LimitSetTime_TCL_DECLARED -#define Tcl_LimitSetTime_TCL_DECLARED -/* 526 */ -EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitSetGranularity_TCL_DECLARED -#define Tcl_LimitSetGranularity_TCL_DECLARED -/* 527 */ -EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, - int type, int granularity); -#endif -#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED -#define Tcl_LimitTypeEnabled_TCL_DECLARED -/* 528 */ -EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED -#define Tcl_LimitTypeExceeded_TCL_DECLARED -/* 529 */ -EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeSet_TCL_DECLARED -#define Tcl_LimitTypeSet_TCL_DECLARED -/* 530 */ -EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeReset_TCL_DECLARED -#define Tcl_LimitTypeReset_TCL_DECLARED -/* 531 */ -EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitGetCommands_TCL_DECLARED -#define Tcl_LimitGetCommands_TCL_DECLARED -/* 532 */ -EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitGetTime_TCL_DECLARED -#define Tcl_LimitGetTime_TCL_DECLARED -/* 533 */ -EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitGetGranularity_TCL_DECLARED -#define Tcl_LimitGetGranularity_TCL_DECLARED -/* 534 */ -EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, - int type); -#endif -#ifndef Tcl_SaveInterpState_TCL_DECLARED -#define Tcl_SaveInterpState_TCL_DECLARED -/* 535 */ -EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); -#endif -#ifndef Tcl_RestoreInterpState_TCL_DECLARED -#define Tcl_RestoreInterpState_TCL_DECLARED -/* 536 */ -EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, - Tcl_InterpState state); -#endif -#ifndef Tcl_DiscardInterpState_TCL_DECLARED -#define Tcl_DiscardInterpState_TCL_DECLARED -/* 537 */ -EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); -#endif -#ifndef Tcl_SetReturnOptions_TCL_DECLARED -#define Tcl_SetReturnOptions_TCL_DECLARED -/* 538 */ -EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, - Tcl_Obj * options); -#endif -#ifndef Tcl_GetReturnOptions_TCL_DECLARED -#define Tcl_GetReturnOptions_TCL_DECLARED -/* 539 */ -EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, - int result); -#endif -#ifndef Tcl_IsEnsemble_TCL_DECLARED -#define Tcl_IsEnsemble_TCL_DECLARED -/* 540 */ -EXTERN int Tcl_IsEnsemble (Tcl_Command token); -#endif -#ifndef Tcl_CreateEnsemble_TCL_DECLARED -#define Tcl_CreateEnsemble_TCL_DECLARED -/* 541 */ -EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * namespacePtr, int flags); -#endif -#ifndef Tcl_FindEnsemble_TCL_DECLARED -#define Tcl_FindEnsemble_TCL_DECLARED -/* 542 */ -EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, - Tcl_Obj * cmdNameObj, int flags); -#endif -#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED -/* 543 */ -EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * subcmdList); -#endif -#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED -#define Tcl_SetEnsembleMappingDict_TCL_DECLARED -/* 544 */ -EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * mapDict); -#endif -#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -/* 545 */ -EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * unknownList); -#endif -#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED -#define Tcl_SetEnsembleFlags_TCL_DECLARED -/* 546 */ -EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int flags); -#endif -#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED -/* 547 */ -EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** subcmdListPtr); -#endif -#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED -#define Tcl_GetEnsembleMappingDict_TCL_DECLARED -/* 548 */ -EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** mapDictPtr); -#endif -#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -/* 549 */ -EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** unknownListPtr); -#endif -#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED -#define Tcl_GetEnsembleFlags_TCL_DECLARED -/* 550 */ -EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int * flagsPtr); -#endif -#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED -#define Tcl_GetEnsembleNamespace_TCL_DECLARED -/* 551 */ -EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, - Tcl_Command token, - Tcl_Namespace ** namespacePtrPtr); -#endif -#ifndef Tcl_SetTimeProc_TCL_DECLARED -#define Tcl_SetTimeProc_TCL_DECLARED -/* 552 */ -EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, - Tcl_ScaleTimeProc* scaleProc, - ClientData clientData); -#endif -#ifndef Tcl_QueryTimeProc_TCL_DECLARED -#define Tcl_QueryTimeProc_TCL_DECLARED -/* 553 */ -EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, - Tcl_ScaleTimeProc** scaleProc, - ClientData* clientData); -#endif -#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED -#define Tcl_ChannelThreadActionProc_TCL_DECLARED -/* 554 */ -EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_NewBignumObj_TCL_DECLARED -#define Tcl_NewBignumObj_TCL_DECLARED -/* 555 */ -EXTERN Tcl_Obj* Tcl_NewBignumObj (mp_int* value); -#endif -#ifndef Tcl_DbNewBignumObj_TCL_DECLARED -#define Tcl_DbNewBignumObj_TCL_DECLARED -/* 556 */ -EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, CONST char* file, - int line); -#endif -#ifndef Tcl_SetBignumObj_TCL_DECLARED -#define Tcl_SetBignumObj_TCL_DECLARED -/* 557 */ -EXTERN void Tcl_SetBignumObj (Tcl_Obj* obj, mp_int* value); -#endif -#ifndef Tcl_GetBignumFromObj_TCL_DECLARED -#define Tcl_GetBignumFromObj_TCL_DECLARED -/* 558 */ -EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, - Tcl_Obj* obj, mp_int* value); -#endif -#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED -#define Tcl_TakeBignumFromObj_TCL_DECLARED -/* 559 */ -EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, - Tcl_Obj* obj, mp_int* value); -#endif -#ifndef Tcl_TruncateChannel_TCL_DECLARED -#define Tcl_TruncateChannel_TCL_DECLARED -/* 560 */ -EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, - Tcl_WideInt length); -#endif -#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED -#define Tcl_ChannelTruncateProc_TCL_DECLARED -/* 561 */ -EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( - CONST Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED -#define Tcl_SetChannelErrorInterp_TCL_DECLARED -/* 562 */ -EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, - Tcl_Obj* msg); -#endif -#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED -#define Tcl_GetChannelErrorInterp_TCL_DECLARED -/* 563 */ -EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, - Tcl_Obj** msg); -#endif -#ifndef Tcl_SetChannelError_TCL_DECLARED -#define Tcl_SetChannelError_TCL_DECLARED -/* 564 */ -EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj* msg); -#endif -#ifndef Tcl_GetChannelError_TCL_DECLARED -#define Tcl_GetChannelError_TCL_DECLARED -/* 565 */ -EXTERN void Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj** msg); -#endif -#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED -#define Tcl_InitBignumFromDouble_TCL_DECLARED -/* 566 */ -EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, - double initval, mp_int * toInit); -#endif -#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -/* 567 */ -EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -/* 568 */ -EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); -#endif -#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED -#define Tcl_GetEncodingFromObj_TCL_DECLARED -/* 569 */ -EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, - Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); -#endif -#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED -#define Tcl_GetEncodingSearchPath_TCL_DECLARED -/* 570 */ -EXTERN Tcl_Obj* Tcl_GetEncodingSearchPath (void); -#endif -#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED -#define Tcl_SetEncodingSearchPath_TCL_DECLARED -/* 571 */ -EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj* searchPath); -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -/* 572 */ -EXTERN CONST char * Tcl_GetEncodingNameFromEnvironment ( - Tcl_DString* bufPtr); -#endif -#ifndef Tcl_PkgRequireProc_TCL_DECLARED -#define Tcl_PkgRequireProc_TCL_DECLARED -/* 573 */ -EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, - CONST char * name, int objc, - Tcl_Obj *CONST objv[], - ClientData * clientDataPtr); -#endif -#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED -#define Tcl_AppendObjToErrorInfo_TCL_DECLARED -/* 574 */ -EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED -#define Tcl_AppendLimitedToObj_TCL_DECLARED -/* 575 */ -EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, - CONST char * bytes, int length, int limit, - CONST char * ellipsis); -#endif -#ifndef Tcl_Format_TCL_DECLARED -#define Tcl_Format_TCL_DECLARED -/* 576 */ -EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, CONST char * format, - int objc, Tcl_Obj * CONST objv[]); -#endif -#ifndef Tcl_AppendFormatToObj_TCL_DECLARED -#define Tcl_AppendFormatToObj_TCL_DECLARED -/* 577 */ -EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST char * format, - int objc, Tcl_Obj * CONST objv[]); -#endif -#ifndef Tcl_ObjPrintf_TCL_DECLARED -#define Tcl_ObjPrintf_TCL_DECLARED -/* 578 */ -EXTERN Tcl_Obj * Tcl_ObjPrintf (CONST char * format, ...); -#endif -#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED -#define Tcl_AppendPrintfToObj_TCL_DECLARED -/* 579 */ -EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, - CONST char * format, ...); -#endif -#ifndef Tcl_CancelEval_TCL_DECLARED -#define Tcl_CancelEval_TCL_DECLARED -/* 580 */ -EXTERN int Tcl_CancelEval (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr, - ClientData clientData, int flags); -#endif -#ifndef Tcl_Canceled_TCL_DECLARED -#define Tcl_Canceled_TCL_DECLARED -/* 581 */ -EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); -#endif -#ifndef Tcl_NRCreateCommand_TCL_DECLARED -#define Tcl_NRCreateCommand_TCL_DECLARED -/* 582 */ -EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_ObjCmdProc * proc, - Tcl_ObjCmdProc * nreProc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_NREvalObj_TCL_DECLARED -#define Tcl_NREvalObj_TCL_DECLARED -/* 583 */ -EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_NREvalObjv_TCL_DECLARED -#define Tcl_NREvalObjv_TCL_DECLARED -/* 584 */ -EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); -#endif -#ifndef Tcl_NRCmdSwap_TCL_DECLARED -#define Tcl_NRCmdSwap_TCL_DECLARED -/* 585 */ -EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef Tcl_NRAddCallback_TCL_DECLARED -#define Tcl_NRAddCallback_TCL_DECLARED -/* 586 */ -EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, - Tcl_NRPostProc * postProcPtr, - ClientData data0, ClientData data1, - ClientData data2, ClientData data3); -#endif -#ifndef Tcl_NRCallObjProc_TCL_DECLARED -#define Tcl_NRCallObjProc_TCL_DECLARED -/* 587 */ -EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, - Tcl_ObjCmdProc * objProc, - ClientData clientData, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_CreatePipe_TCL_DECLARED -#define Tcl_CreatePipe_TCL_DECLARED -/* 588 */ -EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, - Tcl_Channel * rchan, Tcl_Channel * wchan, - int flags); -#endif - -typedef struct TclStubHooks { - CONST struct TclPlatStubs *tclPlatStubs; - CONST struct TclIntStubs *tclIntStubs; - CONST struct TclIntPlatStubs *tclIntPlatStubs; -} TclStubHooks; - -typedef struct TclStubs { - int magic; - CONST struct TclStubHooks *hooks; - - int (*tcl_PkgProvideEx) (Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData); /* 0 */ - CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 1 */ - void (*tcl_Panic) (CONST char * format, ...); /* 2 */ - char * (*tcl_Alloc) (unsigned int size); /* 3 */ - void (*tcl_Free) (char * ptr); /* 4 */ - char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ - char * (*tcl_DbCkalloc) (unsigned int size, CONST char * file, int line); /* 6 */ - int (*tcl_DbCkfree) (char * ptr, CONST char * file, int line); /* 7 */ - char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved9; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved10; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* MACOSX */ - void (*tcl_SetTimer) (Tcl_Time * timePtr); /* 11 */ - void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (Tcl_Time * timePtr); /* 13 */ - int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ - void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ - void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ - Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr); /* 18 */ - void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ - void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ - int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ - Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, CONST char * file, int line); /* 22 */ - Tcl_Obj * (*tcl_DbNewByteArrayObj) (CONST unsigned char * bytes, int length, CONST char * file, int line); /* 23 */ - Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, CONST char * file, int line); /* 24 */ - Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *CONST * objv, CONST char * file, int line); /* 25 */ - Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, CONST char * file, int line); /* 26 */ - Tcl_Obj * (*tcl_DbNewObj) (CONST char * file, int line); /* 27 */ - Tcl_Obj * (*tcl_DbNewStringObj) (CONST char * bytes, int length, CONST char * file, int line); /* 28 */ - Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ - void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ - int (*tcl_GetBoolean) (Tcl_Interp * interp, CONST char * src, int * boolPtr); /* 31 */ - int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ - unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ - int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ - int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ - int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ - int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ - int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ - char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ - void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ - int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ - int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ - int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ - int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ - int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ - int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[]); /* 48 */ - Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ - Tcl_Obj * (*tcl_NewByteArrayObj) (CONST unsigned char* bytes, int length); /* 50 */ - Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ - Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ - Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *CONST objv[]); /* 53 */ - Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ - Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ - Tcl_Obj * (*tcl_NewStringObj) (CONST char * bytes, int length); /* 56 */ - void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ - unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ - void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, CONST unsigned char * bytes, int length); /* 59 */ - void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ - void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ - void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[]); /* 62 */ - void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ - void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ - void (*tcl_SetStringObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 65 */ - void (*tcl_AddErrorInfo) (Tcl_Interp * interp, CONST char * message); /* 66 */ - void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, CONST char * message, int length); /* 67 */ - void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ - void (*tcl_AppendElement) (Tcl_Interp * interp, CONST char * element); /* 69 */ - void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ - Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ - void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ - int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ - void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ - int (*tcl_AsyncReady) (void); /* 75 */ - void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ - char (*tcl_Backslash) (CONST char * src, int * readPtr); /* 77 */ - int (*tcl_BadChannelOption) (Tcl_Interp * interp, CONST char * optionName, CONST char * optionList); /* 78 */ - void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ - void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ - int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ - int (*tcl_CommandComplete) (CONST char * cmd); /* 82 */ - char * (*tcl_Concat) (int argc, CONST84 char * CONST * argv); /* 83 */ - int (*tcl_ConvertElement) (CONST char * src, char * dst, int flags); /* 84 */ - int (*tcl_ConvertCountedElement) (CONST char * src, int length, char * dst, int flags); /* 85 */ - int (*tcl_CreateAlias) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * argv); /* 86 */ - int (*tcl_CreateAliasObj) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[]); /* 87 */ - Tcl_Channel (*tcl_CreateChannel) (Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ - void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ - void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ - Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ - void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ - void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ - Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ - void (*tcl_CreateMathFunc) (Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ - Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ - Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, CONST char * slaveName, int isSafe); /* 97 */ - Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ - Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ - void (*tcl_DeleteAssocData) (Tcl_Interp * interp, CONST char * name); /* 100 */ - void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ - void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ - int (*tcl_DeleteCommand) (Tcl_Interp * interp, CONST char * cmdName); /* 103 */ - int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ - void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ - void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ - void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ - void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ - void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ - void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* MACOSX */ - void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ - void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ - void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ - int (*tcl_DoOneEvent) (int flags); /* 115 */ - void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ - char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, CONST char * bytes, int length); /* 117 */ - char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, CONST char * element); /* 118 */ - void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ - void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ - void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ - void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ - void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ - void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ - void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ - int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ - CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ - CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ - int (*tcl_Eval) (Tcl_Interp * interp, CONST char * script); /* 129 */ - int (*tcl_EvalFile) (Tcl_Interp * interp, CONST char * fileName); /* 130 */ - int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ - void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ - void (*tcl_Exit) (int status); /* 133 */ - int (*tcl_ExposeCommand) (Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName); /* 134 */ - int (*tcl_ExprBoolean) (Tcl_Interp * interp, CONST char * expr, int * ptr); /* 135 */ - int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ - int (*tcl_ExprDouble) (Tcl_Interp * interp, CONST char * expr, double * ptr); /* 137 */ - int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ - int (*tcl_ExprLong) (Tcl_Interp * interp, CONST char * expr, long * ptr); /* 139 */ - int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ - int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ - int (*tcl_ExprString) (Tcl_Interp * interp, CONST char * expr); /* 142 */ - void (*tcl_Finalize) (void); /* 143 */ - void (*tcl_FindExecutable) (CONST char * argv0); /* 144 */ - Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ - int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ - void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ - int (*tcl_GetAlias) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ - int (*tcl_GetAliasObj) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ - ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ - Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, CONST char * chanName, int * modePtr); /* 151 */ - int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ - int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ - ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ - int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ - CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ - int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr); /* 157 */ - Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ - int (*tcl_GetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ - CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ - int (*tcl_GetErrno) (void); /* 161 */ - CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ - int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ - Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ - CONST char * (*tcl_GetNameOfExecutable) (void); /* 165 */ - Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved167; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* MACOSX */ - Tcl_PathType (*tcl_GetPathType) (CONST char * path); /* 168 */ - int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ - int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ - int (*tcl_GetServiceMode) (void); /* 171 */ - Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, CONST char * slaveName); /* 172 */ - Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ - CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ - CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 175 */ - CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 176 */ - int (*tcl_GlobalEval) (Tcl_Interp * interp, CONST char * command); /* 177 */ - int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ - int (*tcl_HideCommand) (Tcl_Interp * interp, CONST char * cmdName, CONST char * hiddenCmdToken); /* 179 */ - int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ - void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ - int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ - int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ - int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ - int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ - char * (*tcl_JoinPath) (int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr); /* 186 */ - int (*tcl_LinkVar) (Tcl_Interp * interp, CONST char * varName, char * addr, int type); /* 187 */ - void *reserved188; - Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ - int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ - Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ - char * (*tcl_Merge) (int argc, CONST84 char * CONST * argv); /* 192 */ - Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ - void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ - Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ - Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* MACOSX */ - Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions); /* 198 */ - Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async); /* 199 */ - Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ - void (*tcl_Preserve) (ClientData data); /* 201 */ - void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ - int (*tcl_PutEnv) (CONST char * assignment); /* 203 */ - CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ - void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ - int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* MACOSX */ - int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ - int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ - void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (Tcl_ObjType * typePtr); /* 211 */ - Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ - int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ - int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ - void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ - void (*tcl_Release) (ClientData clientData); /* 216 */ - void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ - int (*tcl_ScanElement) (CONST char * str, int * flagPtr); /* 218 */ - int (*tcl_ScanCountedElement) (CONST char * str, int length, int * flagPtr); /* 219 */ - int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ - int (*tcl_ServiceAll) (void); /* 221 */ - int (*tcl_ServiceEvent) (int flags); /* 222 */ - void (*tcl_SetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ - void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ - int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, CONST char * newValue); /* 225 */ - int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ - void (*tcl_SetErrno) (int err); /* 227 */ - void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (Tcl_Time * timePtr); /* 229 */ - void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ - int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ - void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ - int (*tcl_SetServiceMode) (int mode); /* 233 */ - void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ - void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ - void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ - CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, CONST char * varName, CONST char * newValue, int flags); /* 237 */ - CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * newValue, int flags); /* 238 */ - CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ - CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ - void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ - int (*tcl_SplitList) (Tcl_Interp * interp, CONST char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ - void (*tcl_SplitPath) (CONST char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ - void (*tcl_StaticPackage) (Tcl_Interp * interp, CONST char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ - int (*tcl_StringMatch) (CONST char * str, CONST char * pattern); /* 245 */ - int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ - int (*tcl_TraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ - int (*tcl_TraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ - char * (*tcl_TranslateFileName) (Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr); /* 249 */ - int (*tcl_Ungets) (Tcl_Channel chan, CONST char * str, int len, int atHead); /* 250 */ - void (*tcl_UnlinkVar) (Tcl_Interp * interp, CONST char * varName); /* 251 */ - int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ - int (*tcl_UnsetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 253 */ - int (*tcl_UnsetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 254 */ - void (*tcl_UntraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ - void (*tcl_UntraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ - void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, CONST char * varName); /* 257 */ - int (*tcl_UpVar) (Tcl_Interp * interp, CONST char * frameName, CONST char * varName, CONST char * localName, int flags); /* 258 */ - int (*tcl_UpVar2) (Tcl_Interp * interp, CONST char * frameName, CONST char * part1, CONST char * part2, CONST char * localName, int flags); /* 259 */ - int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ - ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ - ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ - int (*tcl_Write) (Tcl_Channel chan, CONST char * s, int slen); /* 263 */ - void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message); /* 264 */ - int (*tcl_DumpActiveMemory) (CONST char * fileName); /* 265 */ - void (*tcl_ValidateAllMemory) (CONST char * file, int line); /* 266 */ - void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ - void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ - CONST84_RETURN char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ - CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, CONST char * start, CONST84 char ** termPtr); /* 270 */ - CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 271 */ - CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 272 */ - int (*tcl_PkgProvide) (Tcl_Interp * interp, CONST char * name, CONST char * version); /* 273 */ - CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 274 */ - void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ - int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ - Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ - void (*tcl_PanicVA) (CONST char * format, va_list argList); /* 278 */ - void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ - void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ - Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ - int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ - Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ - void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ - void *reserved285; - void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ - Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ - void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ - void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ - void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ - int (*tcl_EvalEx) (Tcl_Interp * interp, CONST char * script, int numBytes, int flags); /* 291 */ - int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 292 */ - int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ - void (*tcl_ExitThread) (int status); /* 294 */ - int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ - char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ - void (*tcl_FinalizeThread) (void); /* 297 */ - void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ - void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ - Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ - Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, CONST char * name); /* 301 */ - CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ - void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ - int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr); /* 304 */ - VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ - Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 306 */ - ClientData (*tcl_InitNotifier) (void); /* 307 */ - void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ - void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ - void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); /* 311 */ - int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ - int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ - void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ - void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ - int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, CONST char * name); /* 316 */ - Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ - void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ - void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); /* 319 */ - Tcl_UniChar (*tcl_UniCharAtIndex) (CONST char * src, int index); /* 320 */ - Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ - Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ - Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ - int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ - CONST84_RETURN char * (*tcl_UtfAtIndex) (CONST char * src, int index); /* 325 */ - int (*tcl_UtfCharComplete) (CONST char * src, int length); /* 326 */ - int (*tcl_UtfBackslash) (CONST char * src, int * readPtr, char * dst); /* 327 */ - CONST84_RETURN char * (*tcl_UtfFindFirst) (CONST char * src, int ch); /* 328 */ - CONST84_RETURN char * (*tcl_UtfFindLast) (CONST char * src, int ch); /* 329 */ - CONST84_RETURN char * (*tcl_UtfNext) (CONST char * src); /* 330 */ - CONST84_RETURN char * (*tcl_UtfPrev) (CONST char * src, CONST char * start); /* 331 */ - int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ - char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ - int (*tcl_UtfToLower) (char * src); /* 334 */ - int (*tcl_UtfToTitle) (char * src); /* 335 */ - int (*tcl_UtfToUniChar) (CONST char * src, Tcl_UniChar * chPtr); /* 336 */ - int (*tcl_UtfToUpper) (char * src); /* 337 */ - int (*tcl_WriteChars) (Tcl_Channel chan, CONST char * src, int srcLen); /* 338 */ - int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ - char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ - CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ - void (*tcl_SetDefaultEncodingDir) (CONST char * path); /* 342 */ - void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ - void (*tcl_ServiceModeHook) (int mode); /* 344 */ - int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ - int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ - int (*tcl_UniCharIsDigit) (int ch); /* 347 */ - int (*tcl_UniCharIsLower) (int ch); /* 348 */ - int (*tcl_UniCharIsSpace) (int ch); /* 349 */ - int (*tcl_UniCharIsUpper) (int ch); /* 350 */ - int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ - int (*tcl_UniCharLen) (CONST Tcl_UniChar * uniStr); /* 352 */ - int (*tcl_UniCharNcmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 353 */ - char * (*tcl_UniCharToUtfDString) (CONST Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ - Tcl_UniChar * (*tcl_UtfToUniCharDString) (CONST char * src, int length, Tcl_DString * dsPtr); /* 355 */ - Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ - Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ - void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ - void (*tcl_LogCommandInfo) (Tcl_Interp * interp, CONST char * script, CONST char * command, int length); /* 359 */ - int (*tcl_ParseBraces) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ - int (*tcl_ParseCommand) (Tcl_Interp * interp, CONST char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ - int (*tcl_ParseExpr) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ - int (*tcl_ParseQuotedString) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ - int (*tcl_ParseVarName) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ - char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ - int (*tcl_Chdir) (CONST char * dirName); /* 366 */ - int (*tcl_Access) (CONST char * path, int mode); /* 367 */ - int (*tcl_Stat) (CONST char * path, struct stat * bufPtr); /* 368 */ - int (*tcl_UtfNcmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 369 */ - int (*tcl_UtfNcasecmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 370 */ - int (*tcl_StringCaseMatch) (CONST char * str, CONST char * pattern, int nocase); /* 371 */ - int (*tcl_UniCharIsControl) (int ch); /* 372 */ - int (*tcl_UniCharIsGraph) (int ch); /* 373 */ - int (*tcl_UniCharIsPrint) (int ch); /* 374 */ - int (*tcl_UniCharIsPunct) (int ch); /* 375 */ - int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ - void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ - Tcl_Obj * (*tcl_NewUnicodeObj) (CONST Tcl_UniChar * unicode, int numChars); /* 378 */ - void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars); /* 379 */ - int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ - Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ - Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ - Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ - void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length); /* 384 */ - int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ - void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ - Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ - int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ - int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, CONST char * pattern); /* 389 */ - int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 390 */ - void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ - void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ - int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ - int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ - int (*tcl_WriteRaw) (Tcl_Channel chan, CONST char * src, int srcLen); /* 395 */ - Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ - int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ - CONST84_RETURN char * (*tcl_ChannelName) (CONST Tcl_ChannelType * chanTypePtr); /* 398 */ - Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (CONST Tcl_ChannelType * chanTypePtr); /* 399 */ - Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (CONST Tcl_ChannelType * chanTypePtr); /* 400 */ - Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (CONST Tcl_ChannelType * chanTypePtr); /* 401 */ - Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (CONST Tcl_ChannelType * chanTypePtr); /* 402 */ - Tcl_DriverInputProc * (*tcl_ChannelInputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 403 */ - Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 404 */ - Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 405 */ - Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 406 */ - Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 407 */ - Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (CONST Tcl_ChannelType * chanTypePtr); /* 408 */ - Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (CONST Tcl_ChannelType * chanTypePtr); /* 409 */ - Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (CONST Tcl_ChannelType * chanTypePtr); /* 410 */ - Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (CONST Tcl_ChannelType * chanTypePtr); /* 411 */ - int (*tcl_JoinThread) (Tcl_ThreadId threadId, int* result); /* 412 */ - int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ - int (*tcl_IsChannelRegistered) (Tcl_Interp* interp, Tcl_Channel channel); /* 414 */ - void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ - void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ - void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ - int (*tcl_IsChannelExisting) (CONST char* channelName); /* 418 */ - int (*tcl_UniCharNcasecmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 419 */ - int (*tcl_UniCharCaseMatch) (CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase); /* 420 */ - Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, CONST char * key); /* 421 */ - Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, CONST char * key, int * newPtr); /* 422 */ - void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr); /* 423 */ - void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ - ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ - int (*tcl_TraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ - void (*tcl_UntraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ - char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ - char * (*tcl_AttemptDbCkalloc) (unsigned int size, CONST char * file, int line); /* 429 */ - char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ - char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 431 */ - int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ - Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ - Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ - int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, CONST char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ - Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, CONST char * pattern); /* 436 */ - Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ - int (*tcl_DetachChannel) (Tcl_Interp* interp, Tcl_Channel channel); /* 438 */ - int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ - int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ - int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ - int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ - int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ - int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * sym1, CONST char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ - int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, CONST char * pattern, Tcl_GlobTypeData * types); /* 445 */ - Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ - int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ - int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ - int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ - int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ - int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ - int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ - CONST char ** (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ - int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ - int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ - Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions); /* 456 */ - Tcl_Obj* (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ - int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ - int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ - Tcl_Obj* (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ - Tcl_Obj* (*tcl_FSSplitPath) (Tcl_Obj* pathPtr, int * lenPtr); /* 461 */ - int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ - Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ - Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, Tcl_Filesystem * fsPtr); /* 465 */ - Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ - int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj* (*tcl_FSNewNativePath) (Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ - CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ - Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ - Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ - Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (Tcl_Filesystem * fsPtr); /* 475 */ - CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ - Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ - Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ - int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (Tcl_Filesystem * fsPtr); /* 480 */ - int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ - void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ - Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ - int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo* infoPtr); /* 484 */ - int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, CONST Tcl_CmdInfo* infoPtr); /* 485 */ - Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, CONST char * file, int line); /* 486 */ - int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ - Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ - void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ - Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ - Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ - Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ - Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 493 */ - int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ - int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ - int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ - int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ - int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ - void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ - void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ - int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); /* 501 */ - int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv); /* 502 */ - Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ - Tcl_Obj * (*tcl_DbNewDictObj) (CONST char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 509 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 510 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 511 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ - int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, CONST char * encodingName); /* 518 */ - Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ - void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ - void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ - int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ - int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ - int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ - void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ - void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ - void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ - int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ - int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ - void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ - void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ - int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ - void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ - int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ - Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ - int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ - void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ - int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ - Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ - int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ - Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ - Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ - int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ - int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ - int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ - int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ - int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ - int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ - int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ - int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ - int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ - void (*tcl_SetTimeProc) (Tcl_GetTimeProc* getProc, Tcl_ScaleTimeProc* scaleProc, ClientData clientData); /* 552 */ - void (*tcl_QueryTimeProc) (Tcl_GetTimeProc** getProc, Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); /* 553 */ - Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 554 */ - Tcl_Obj* (*tcl_NewBignumObj) (mp_int* value); /* 555 */ - Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, CONST char* file, int line); /* 556 */ - void (*tcl_SetBignumObj) (Tcl_Obj* obj, mp_int* value); /* 557 */ - int (*tcl_GetBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 558 */ - int (*tcl_TakeBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 559 */ - int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ - Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (CONST Tcl_ChannelType * chanTypePtr); /* 561 */ - void (*tcl_SetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj* msg); /* 562 */ - void (*tcl_GetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj** msg); /* 563 */ - void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj* msg); /* 564 */ - void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj** msg); /* 565 */ - int (*tcl_InitBignumFromDouble) (Tcl_Interp* interp, double initval, mp_int * toInit); /* 566 */ - Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ - int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ - int (*tcl_GetEncodingFromObj) (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); /* 569 */ - Tcl_Obj* (*tcl_GetEncodingSearchPath) (void); /* 570 */ - int (*tcl_SetEncodingSearchPath) (Tcl_Obj* searchPath); /* 571 */ - CONST char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ - int (*tcl_PkgRequireProc) (Tcl_Interp * interp, CONST char * name, int objc, Tcl_Obj *CONST objv[], ClientData * clientDataPtr); /* 573 */ - void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ - void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, CONST char * bytes, int length, int limit, CONST char * ellipsis); /* 575 */ - Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 576 */ - int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 577 */ - Tcl_Obj * (*tcl_ObjPrintf) (CONST char * format, ...); /* 578 */ - void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ - int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ - int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ - Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ - int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ - int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ - int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[]); /* 585 */ - void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ - int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 588 */ -} TclStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclStubs *tclStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef Tcl_PkgProvideEx -#define Tcl_PkgProvideEx \ - (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ -#endif -#ifndef Tcl_PkgRequireEx -#define Tcl_PkgRequireEx \ - (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ -#endif -#ifndef Tcl_Panic -#define Tcl_Panic \ - (tclStubsPtr->tcl_Panic) /* 2 */ -#endif -#ifndef Tcl_Alloc -#define Tcl_Alloc \ - (tclStubsPtr->tcl_Alloc) /* 3 */ -#endif -#ifndef Tcl_Free -#define Tcl_Free \ - (tclStubsPtr->tcl_Free) /* 4 */ -#endif -#ifndef Tcl_Realloc -#define Tcl_Realloc \ - (tclStubsPtr->tcl_Realloc) /* 5 */ -#endif -#ifndef Tcl_DbCkalloc -#define Tcl_DbCkalloc \ - (tclStubsPtr->tcl_DbCkalloc) /* 6 */ -#endif -#ifndef Tcl_DbCkfree -#define Tcl_DbCkfree \ - (tclStubsPtr->tcl_DbCkfree) /* 7 */ -#endif -#ifndef Tcl_DbCkrealloc -#define Tcl_DbCkrealloc \ - (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer -#define Tcl_SetTimer \ - (tclStubsPtr->tcl_SetTimer) /* 11 */ -#endif -#ifndef Tcl_Sleep -#define Tcl_Sleep \ - (tclStubsPtr->tcl_Sleep) /* 12 */ -#endif -#ifndef Tcl_WaitForEvent -#define Tcl_WaitForEvent \ - (tclStubsPtr->tcl_WaitForEvent) /* 13 */ -#endif -#ifndef Tcl_AppendAllObjTypes -#define Tcl_AppendAllObjTypes \ - (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ -#endif -#ifndef Tcl_AppendStringsToObj -#define Tcl_AppendStringsToObj \ - (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ -#endif -#ifndef Tcl_AppendToObj -#define Tcl_AppendToObj \ - (tclStubsPtr->tcl_AppendToObj) /* 16 */ -#endif -#ifndef Tcl_ConcatObj -#define Tcl_ConcatObj \ - (tclStubsPtr->tcl_ConcatObj) /* 17 */ -#endif -#ifndef Tcl_ConvertToType -#define Tcl_ConvertToType \ - (tclStubsPtr->tcl_ConvertToType) /* 18 */ -#endif -#ifndef Tcl_DbDecrRefCount -#define Tcl_DbDecrRefCount \ - (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ -#endif -#ifndef Tcl_DbIncrRefCount -#define Tcl_DbIncrRefCount \ - (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ -#endif -#ifndef Tcl_DbIsShared -#define Tcl_DbIsShared \ - (tclStubsPtr->tcl_DbIsShared) /* 21 */ -#endif -#ifndef Tcl_DbNewBooleanObj -#define Tcl_DbNewBooleanObj \ - (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ -#endif -#ifndef Tcl_DbNewByteArrayObj -#define Tcl_DbNewByteArrayObj \ - (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ -#endif -#ifndef Tcl_DbNewDoubleObj -#define Tcl_DbNewDoubleObj \ - (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ -#endif -#ifndef Tcl_DbNewListObj -#define Tcl_DbNewListObj \ - (tclStubsPtr->tcl_DbNewListObj) /* 25 */ -#endif -#ifndef Tcl_DbNewLongObj -#define Tcl_DbNewLongObj \ - (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ -#endif -#ifndef Tcl_DbNewObj -#define Tcl_DbNewObj \ - (tclStubsPtr->tcl_DbNewObj) /* 27 */ -#endif -#ifndef Tcl_DbNewStringObj -#define Tcl_DbNewStringObj \ - (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ -#endif -#ifndef Tcl_DuplicateObj -#define Tcl_DuplicateObj \ - (tclStubsPtr->tcl_DuplicateObj) /* 29 */ -#endif -#ifndef TclFreeObj -#define TclFreeObj \ - (tclStubsPtr->tclFreeObj) /* 30 */ -#endif -#ifndef Tcl_GetBoolean -#define Tcl_GetBoolean \ - (tclStubsPtr->tcl_GetBoolean) /* 31 */ -#endif -#ifndef Tcl_GetBooleanFromObj -#define Tcl_GetBooleanFromObj \ - (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ -#endif -#ifndef Tcl_GetByteArrayFromObj -#define Tcl_GetByteArrayFromObj \ - (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ -#endif -#ifndef Tcl_GetDouble -#define Tcl_GetDouble \ - (tclStubsPtr->tcl_GetDouble) /* 34 */ -#endif -#ifndef Tcl_GetDoubleFromObj -#define Tcl_GetDoubleFromObj \ - (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ -#endif -#ifndef Tcl_GetIndexFromObj -#define Tcl_GetIndexFromObj \ - (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ -#endif -#ifndef Tcl_GetInt -#define Tcl_GetInt \ - (tclStubsPtr->tcl_GetInt) /* 37 */ -#endif -#ifndef Tcl_GetIntFromObj -#define Tcl_GetIntFromObj \ - (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ -#endif -#ifndef Tcl_GetLongFromObj -#define Tcl_GetLongFromObj \ - (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ -#endif -#ifndef Tcl_GetObjType -#define Tcl_GetObjType \ - (tclStubsPtr->tcl_GetObjType) /* 40 */ -#endif -#ifndef Tcl_GetStringFromObj -#define Tcl_GetStringFromObj \ - (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ -#endif -#ifndef Tcl_InvalidateStringRep -#define Tcl_InvalidateStringRep \ - (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ -#endif -#ifndef Tcl_ListObjAppendList -#define Tcl_ListObjAppendList \ - (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ -#endif -#ifndef Tcl_ListObjAppendElement -#define Tcl_ListObjAppendElement \ - (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ -#endif -#ifndef Tcl_ListObjGetElements -#define Tcl_ListObjGetElements \ - (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ -#endif -#ifndef Tcl_ListObjIndex -#define Tcl_ListObjIndex \ - (tclStubsPtr->tcl_ListObjIndex) /* 46 */ -#endif -#ifndef Tcl_ListObjLength -#define Tcl_ListObjLength \ - (tclStubsPtr->tcl_ListObjLength) /* 47 */ -#endif -#ifndef Tcl_ListObjReplace -#define Tcl_ListObjReplace \ - (tclStubsPtr->tcl_ListObjReplace) /* 48 */ -#endif -#ifndef Tcl_NewBooleanObj -#define Tcl_NewBooleanObj \ - (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ -#endif -#ifndef Tcl_NewByteArrayObj -#define Tcl_NewByteArrayObj \ - (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ -#endif -#ifndef Tcl_NewDoubleObj -#define Tcl_NewDoubleObj \ - (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ -#endif -#ifndef Tcl_NewIntObj -#define Tcl_NewIntObj \ - (tclStubsPtr->tcl_NewIntObj) /* 52 */ -#endif -#ifndef Tcl_NewListObj -#define Tcl_NewListObj \ - (tclStubsPtr->tcl_NewListObj) /* 53 */ -#endif -#ifndef Tcl_NewLongObj -#define Tcl_NewLongObj \ - (tclStubsPtr->tcl_NewLongObj) /* 54 */ -#endif -#ifndef Tcl_NewObj -#define Tcl_NewObj \ - (tclStubsPtr->tcl_NewObj) /* 55 */ -#endif -#ifndef Tcl_NewStringObj -#define Tcl_NewStringObj \ - (tclStubsPtr->tcl_NewStringObj) /* 56 */ -#endif -#ifndef Tcl_SetBooleanObj -#define Tcl_SetBooleanObj \ - (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ -#endif -#ifndef Tcl_SetByteArrayLength -#define Tcl_SetByteArrayLength \ - (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ -#endif -#ifndef Tcl_SetByteArrayObj -#define Tcl_SetByteArrayObj \ - (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ -#endif -#ifndef Tcl_SetDoubleObj -#define Tcl_SetDoubleObj \ - (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ -#endif -#ifndef Tcl_SetIntObj -#define Tcl_SetIntObj \ - (tclStubsPtr->tcl_SetIntObj) /* 61 */ -#endif -#ifndef Tcl_SetListObj -#define Tcl_SetListObj \ - (tclStubsPtr->tcl_SetListObj) /* 62 */ -#endif -#ifndef Tcl_SetLongObj -#define Tcl_SetLongObj \ - (tclStubsPtr->tcl_SetLongObj) /* 63 */ -#endif -#ifndef Tcl_SetObjLength -#define Tcl_SetObjLength \ - (tclStubsPtr->tcl_SetObjLength) /* 64 */ -#endif -#ifndef Tcl_SetStringObj -#define Tcl_SetStringObj \ - (tclStubsPtr->tcl_SetStringObj) /* 65 */ -#endif -#ifndef Tcl_AddErrorInfo -#define Tcl_AddErrorInfo \ - (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ -#endif -#ifndef Tcl_AddObjErrorInfo -#define Tcl_AddObjErrorInfo \ - (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ -#endif -#ifndef Tcl_AllowExceptions -#define Tcl_AllowExceptions \ - (tclStubsPtr->tcl_AllowExceptions) /* 68 */ -#endif -#ifndef Tcl_AppendElement -#define Tcl_AppendElement \ - (tclStubsPtr->tcl_AppendElement) /* 69 */ -#endif -#ifndef Tcl_AppendResult -#define Tcl_AppendResult \ - (tclStubsPtr->tcl_AppendResult) /* 70 */ -#endif -#ifndef Tcl_AsyncCreate -#define Tcl_AsyncCreate \ - (tclStubsPtr->tcl_AsyncCreate) /* 71 */ -#endif -#ifndef Tcl_AsyncDelete -#define Tcl_AsyncDelete \ - (tclStubsPtr->tcl_AsyncDelete) /* 72 */ -#endif -#ifndef Tcl_AsyncInvoke -#define Tcl_AsyncInvoke \ - (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ -#endif -#ifndef Tcl_AsyncMark -#define Tcl_AsyncMark \ - (tclStubsPtr->tcl_AsyncMark) /* 74 */ -#endif -#ifndef Tcl_AsyncReady -#define Tcl_AsyncReady \ - (tclStubsPtr->tcl_AsyncReady) /* 75 */ -#endif -#ifndef Tcl_BackgroundError -#define Tcl_BackgroundError \ - (tclStubsPtr->tcl_BackgroundError) /* 76 */ -#endif -#ifndef Tcl_Backslash -#define Tcl_Backslash \ - (tclStubsPtr->tcl_Backslash) /* 77 */ -#endif -#ifndef Tcl_BadChannelOption -#define Tcl_BadChannelOption \ - (tclStubsPtr->tcl_BadChannelOption) /* 78 */ -#endif -#ifndef Tcl_CallWhenDeleted -#define Tcl_CallWhenDeleted \ - (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ -#endif -#ifndef Tcl_CancelIdleCall -#define Tcl_CancelIdleCall \ - (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ -#endif -#ifndef Tcl_Close -#define Tcl_Close \ - (tclStubsPtr->tcl_Close) /* 81 */ -#endif -#ifndef Tcl_CommandComplete -#define Tcl_CommandComplete \ - (tclStubsPtr->tcl_CommandComplete) /* 82 */ -#endif -#ifndef Tcl_Concat -#define Tcl_Concat \ - (tclStubsPtr->tcl_Concat) /* 83 */ -#endif -#ifndef Tcl_ConvertElement -#define Tcl_ConvertElement \ - (tclStubsPtr->tcl_ConvertElement) /* 84 */ -#endif -#ifndef Tcl_ConvertCountedElement -#define Tcl_ConvertCountedElement \ - (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ -#endif -#ifndef Tcl_CreateAlias -#define Tcl_CreateAlias \ - (tclStubsPtr->tcl_CreateAlias) /* 86 */ -#endif -#ifndef Tcl_CreateAliasObj -#define Tcl_CreateAliasObj \ - (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ -#endif -#ifndef Tcl_CreateChannel -#define Tcl_CreateChannel \ - (tclStubsPtr->tcl_CreateChannel) /* 88 */ -#endif -#ifndef Tcl_CreateChannelHandler -#define Tcl_CreateChannelHandler \ - (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ -#endif -#ifndef Tcl_CreateCloseHandler -#define Tcl_CreateCloseHandler \ - (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ -#endif -#ifndef Tcl_CreateCommand -#define Tcl_CreateCommand \ - (tclStubsPtr->tcl_CreateCommand) /* 91 */ -#endif -#ifndef Tcl_CreateEventSource -#define Tcl_CreateEventSource \ - (tclStubsPtr->tcl_CreateEventSource) /* 92 */ -#endif -#ifndef Tcl_CreateExitHandler -#define Tcl_CreateExitHandler \ - (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ -#endif -#ifndef Tcl_CreateInterp -#define Tcl_CreateInterp \ - (tclStubsPtr->tcl_CreateInterp) /* 94 */ -#endif -#ifndef Tcl_CreateMathFunc -#define Tcl_CreateMathFunc \ - (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ -#endif -#ifndef Tcl_CreateObjCommand -#define Tcl_CreateObjCommand \ - (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ -#endif -#ifndef Tcl_CreateSlave -#define Tcl_CreateSlave \ - (tclStubsPtr->tcl_CreateSlave) /* 97 */ -#endif -#ifndef Tcl_CreateTimerHandler -#define Tcl_CreateTimerHandler \ - (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ -#endif -#ifndef Tcl_CreateTrace -#define Tcl_CreateTrace \ - (tclStubsPtr->tcl_CreateTrace) /* 99 */ -#endif -#ifndef Tcl_DeleteAssocData -#define Tcl_DeleteAssocData \ - (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ -#endif -#ifndef Tcl_DeleteChannelHandler -#define Tcl_DeleteChannelHandler \ - (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ -#endif -#ifndef Tcl_DeleteCloseHandler -#define Tcl_DeleteCloseHandler \ - (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ -#endif -#ifndef Tcl_DeleteCommand -#define Tcl_DeleteCommand \ - (tclStubsPtr->tcl_DeleteCommand) /* 103 */ -#endif -#ifndef Tcl_DeleteCommandFromToken -#define Tcl_DeleteCommandFromToken \ - (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ -#endif -#ifndef Tcl_DeleteEvents -#define Tcl_DeleteEvents \ - (tclStubsPtr->tcl_DeleteEvents) /* 105 */ -#endif -#ifndef Tcl_DeleteEventSource -#define Tcl_DeleteEventSource \ - (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ -#endif -#ifndef Tcl_DeleteExitHandler -#define Tcl_DeleteExitHandler \ - (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ -#endif -#ifndef Tcl_DeleteHashEntry -#define Tcl_DeleteHashEntry \ - (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ -#endif -#ifndef Tcl_DeleteHashTable -#define Tcl_DeleteHashTable \ - (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ -#endif -#ifndef Tcl_DeleteInterp -#define Tcl_DeleteInterp \ - (tclStubsPtr->tcl_DeleteInterp) /* 110 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler -#define Tcl_DeleteTimerHandler \ - (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ -#endif -#ifndef Tcl_DeleteTrace -#define Tcl_DeleteTrace \ - (tclStubsPtr->tcl_DeleteTrace) /* 113 */ -#endif -#ifndef Tcl_DontCallWhenDeleted -#define Tcl_DontCallWhenDeleted \ - (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ -#endif -#ifndef Tcl_DoOneEvent -#define Tcl_DoOneEvent \ - (tclStubsPtr->tcl_DoOneEvent) /* 115 */ -#endif -#ifndef Tcl_DoWhenIdle -#define Tcl_DoWhenIdle \ - (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ -#endif -#ifndef Tcl_DStringAppend -#define Tcl_DStringAppend \ - (tclStubsPtr->tcl_DStringAppend) /* 117 */ -#endif -#ifndef Tcl_DStringAppendElement -#define Tcl_DStringAppendElement \ - (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ -#endif -#ifndef Tcl_DStringEndSublist -#define Tcl_DStringEndSublist \ - (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ -#endif -#ifndef Tcl_DStringFree -#define Tcl_DStringFree \ - (tclStubsPtr->tcl_DStringFree) /* 120 */ -#endif -#ifndef Tcl_DStringGetResult -#define Tcl_DStringGetResult \ - (tclStubsPtr->tcl_DStringGetResult) /* 121 */ -#endif -#ifndef Tcl_DStringInit -#define Tcl_DStringInit \ - (tclStubsPtr->tcl_DStringInit) /* 122 */ -#endif -#ifndef Tcl_DStringResult -#define Tcl_DStringResult \ - (tclStubsPtr->tcl_DStringResult) /* 123 */ -#endif -#ifndef Tcl_DStringSetLength -#define Tcl_DStringSetLength \ - (tclStubsPtr->tcl_DStringSetLength) /* 124 */ -#endif -#ifndef Tcl_DStringStartSublist -#define Tcl_DStringStartSublist \ - (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ -#endif -#ifndef Tcl_Eof -#define Tcl_Eof \ - (tclStubsPtr->tcl_Eof) /* 126 */ -#endif -#ifndef Tcl_ErrnoId -#define Tcl_ErrnoId \ - (tclStubsPtr->tcl_ErrnoId) /* 127 */ -#endif -#ifndef Tcl_ErrnoMsg -#define Tcl_ErrnoMsg \ - (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ -#endif -#ifndef Tcl_Eval -#define Tcl_Eval \ - (tclStubsPtr->tcl_Eval) /* 129 */ -#endif -#ifndef Tcl_EvalFile -#define Tcl_EvalFile \ - (tclStubsPtr->tcl_EvalFile) /* 130 */ -#endif -#ifndef Tcl_EvalObj -#define Tcl_EvalObj \ - (tclStubsPtr->tcl_EvalObj) /* 131 */ -#endif -#ifndef Tcl_EventuallyFree -#define Tcl_EventuallyFree \ - (tclStubsPtr->tcl_EventuallyFree) /* 132 */ -#endif -#ifndef Tcl_Exit -#define Tcl_Exit \ - (tclStubsPtr->tcl_Exit) /* 133 */ -#endif -#ifndef Tcl_ExposeCommand -#define Tcl_ExposeCommand \ - (tclStubsPtr->tcl_ExposeCommand) /* 134 */ -#endif -#ifndef Tcl_ExprBoolean -#define Tcl_ExprBoolean \ - (tclStubsPtr->tcl_ExprBoolean) /* 135 */ -#endif -#ifndef Tcl_ExprBooleanObj -#define Tcl_ExprBooleanObj \ - (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ -#endif -#ifndef Tcl_ExprDouble -#define Tcl_ExprDouble \ - (tclStubsPtr->tcl_ExprDouble) /* 137 */ -#endif -#ifndef Tcl_ExprDoubleObj -#define Tcl_ExprDoubleObj \ - (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ -#endif -#ifndef Tcl_ExprLong -#define Tcl_ExprLong \ - (tclStubsPtr->tcl_ExprLong) /* 139 */ -#endif -#ifndef Tcl_ExprLongObj -#define Tcl_ExprLongObj \ - (tclStubsPtr->tcl_ExprLongObj) /* 140 */ -#endif -#ifndef Tcl_ExprObj -#define Tcl_ExprObj \ - (tclStubsPtr->tcl_ExprObj) /* 141 */ -#endif -#ifndef Tcl_ExprString -#define Tcl_ExprString \ - (tclStubsPtr->tcl_ExprString) /* 142 */ -#endif -#ifndef Tcl_Finalize -#define Tcl_Finalize \ - (tclStubsPtr->tcl_Finalize) /* 143 */ -#endif -#ifndef Tcl_FindExecutable -#define Tcl_FindExecutable \ - (tclStubsPtr->tcl_FindExecutable) /* 144 */ -#endif -#ifndef Tcl_FirstHashEntry -#define Tcl_FirstHashEntry \ - (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ -#endif -#ifndef Tcl_Flush -#define Tcl_Flush \ - (tclStubsPtr->tcl_Flush) /* 146 */ -#endif -#ifndef Tcl_FreeResult -#define Tcl_FreeResult \ - (tclStubsPtr->tcl_FreeResult) /* 147 */ -#endif -#ifndef Tcl_GetAlias -#define Tcl_GetAlias \ - (tclStubsPtr->tcl_GetAlias) /* 148 */ -#endif -#ifndef Tcl_GetAliasObj -#define Tcl_GetAliasObj \ - (tclStubsPtr->tcl_GetAliasObj) /* 149 */ -#endif -#ifndef Tcl_GetAssocData -#define Tcl_GetAssocData \ - (tclStubsPtr->tcl_GetAssocData) /* 150 */ -#endif -#ifndef Tcl_GetChannel -#define Tcl_GetChannel \ - (tclStubsPtr->tcl_GetChannel) /* 151 */ -#endif -#ifndef Tcl_GetChannelBufferSize -#define Tcl_GetChannelBufferSize \ - (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ -#endif -#ifndef Tcl_GetChannelHandle -#define Tcl_GetChannelHandle \ - (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ -#endif -#ifndef Tcl_GetChannelInstanceData -#define Tcl_GetChannelInstanceData \ - (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ -#endif -#ifndef Tcl_GetChannelMode -#define Tcl_GetChannelMode \ - (tclStubsPtr->tcl_GetChannelMode) /* 155 */ -#endif -#ifndef Tcl_GetChannelName -#define Tcl_GetChannelName \ - (tclStubsPtr->tcl_GetChannelName) /* 156 */ -#endif -#ifndef Tcl_GetChannelOption -#define Tcl_GetChannelOption \ - (tclStubsPtr->tcl_GetChannelOption) /* 157 */ -#endif -#ifndef Tcl_GetChannelType -#define Tcl_GetChannelType \ - (tclStubsPtr->tcl_GetChannelType) /* 158 */ -#endif -#ifndef Tcl_GetCommandInfo -#define Tcl_GetCommandInfo \ - (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ -#endif -#ifndef Tcl_GetCommandName -#define Tcl_GetCommandName \ - (tclStubsPtr->tcl_GetCommandName) /* 160 */ -#endif -#ifndef Tcl_GetErrno -#define Tcl_GetErrno \ - (tclStubsPtr->tcl_GetErrno) /* 161 */ -#endif -#ifndef Tcl_GetHostName -#define Tcl_GetHostName \ - (tclStubsPtr->tcl_GetHostName) /* 162 */ -#endif -#ifndef Tcl_GetInterpPath -#define Tcl_GetInterpPath \ - (tclStubsPtr->tcl_GetInterpPath) /* 163 */ -#endif -#ifndef Tcl_GetMaster -#define Tcl_GetMaster \ - (tclStubsPtr->tcl_GetMaster) /* 164 */ -#endif -#ifndef Tcl_GetNameOfExecutable -#define Tcl_GetNameOfExecutable \ - (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ -#endif -#ifndef Tcl_GetObjResult -#define Tcl_GetObjResult \ - (tclStubsPtr->tcl_GetObjResult) /* 166 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType -#define Tcl_GetPathType \ - (tclStubsPtr->tcl_GetPathType) /* 168 */ -#endif -#ifndef Tcl_Gets -#define Tcl_Gets \ - (tclStubsPtr->tcl_Gets) /* 169 */ -#endif -#ifndef Tcl_GetsObj -#define Tcl_GetsObj \ - (tclStubsPtr->tcl_GetsObj) /* 170 */ -#endif -#ifndef Tcl_GetServiceMode -#define Tcl_GetServiceMode \ - (tclStubsPtr->tcl_GetServiceMode) /* 171 */ -#endif -#ifndef Tcl_GetSlave -#define Tcl_GetSlave \ - (tclStubsPtr->tcl_GetSlave) /* 172 */ -#endif -#ifndef Tcl_GetStdChannel -#define Tcl_GetStdChannel \ - (tclStubsPtr->tcl_GetStdChannel) /* 173 */ -#endif -#ifndef Tcl_GetStringResult -#define Tcl_GetStringResult \ - (tclStubsPtr->tcl_GetStringResult) /* 174 */ -#endif -#ifndef Tcl_GetVar -#define Tcl_GetVar \ - (tclStubsPtr->tcl_GetVar) /* 175 */ -#endif -#ifndef Tcl_GetVar2 -#define Tcl_GetVar2 \ - (tclStubsPtr->tcl_GetVar2) /* 176 */ -#endif -#ifndef Tcl_GlobalEval -#define Tcl_GlobalEval \ - (tclStubsPtr->tcl_GlobalEval) /* 177 */ -#endif -#ifndef Tcl_GlobalEvalObj -#define Tcl_GlobalEvalObj \ - (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ -#endif -#ifndef Tcl_HideCommand -#define Tcl_HideCommand \ - (tclStubsPtr->tcl_HideCommand) /* 179 */ -#endif -#ifndef Tcl_Init -#define Tcl_Init \ - (tclStubsPtr->tcl_Init) /* 180 */ -#endif -#ifndef Tcl_InitHashTable -#define Tcl_InitHashTable \ - (tclStubsPtr->tcl_InitHashTable) /* 181 */ -#endif -#ifndef Tcl_InputBlocked -#define Tcl_InputBlocked \ - (tclStubsPtr->tcl_InputBlocked) /* 182 */ -#endif -#ifndef Tcl_InputBuffered -#define Tcl_InputBuffered \ - (tclStubsPtr->tcl_InputBuffered) /* 183 */ -#endif -#ifndef Tcl_InterpDeleted -#define Tcl_InterpDeleted \ - (tclStubsPtr->tcl_InterpDeleted) /* 184 */ -#endif -#ifndef Tcl_IsSafe -#define Tcl_IsSafe \ - (tclStubsPtr->tcl_IsSafe) /* 185 */ -#endif -#ifndef Tcl_JoinPath -#define Tcl_JoinPath \ - (tclStubsPtr->tcl_JoinPath) /* 186 */ -#endif -#ifndef Tcl_LinkVar -#define Tcl_LinkVar \ - (tclStubsPtr->tcl_LinkVar) /* 187 */ -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel -#define Tcl_MakeFileChannel \ - (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ -#endif -#ifndef Tcl_MakeSafe -#define Tcl_MakeSafe \ - (tclStubsPtr->tcl_MakeSafe) /* 190 */ -#endif -#ifndef Tcl_MakeTcpClientChannel -#define Tcl_MakeTcpClientChannel \ - (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ -#endif -#ifndef Tcl_Merge -#define Tcl_Merge \ - (tclStubsPtr->tcl_Merge) /* 192 */ -#endif -#ifndef Tcl_NextHashEntry -#define Tcl_NextHashEntry \ - (tclStubsPtr->tcl_NextHashEntry) /* 193 */ -#endif -#ifndef Tcl_NotifyChannel -#define Tcl_NotifyChannel \ - (tclStubsPtr->tcl_NotifyChannel) /* 194 */ -#endif -#ifndef Tcl_ObjGetVar2 -#define Tcl_ObjGetVar2 \ - (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ -#endif -#ifndef Tcl_ObjSetVar2 -#define Tcl_ObjSetVar2 \ - (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel -#define Tcl_OpenFileChannel \ - (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ -#endif -#ifndef Tcl_OpenTcpClient -#define Tcl_OpenTcpClient \ - (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ -#endif -#ifndef Tcl_OpenTcpServer -#define Tcl_OpenTcpServer \ - (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ -#endif -#ifndef Tcl_Preserve -#define Tcl_Preserve \ - (tclStubsPtr->tcl_Preserve) /* 201 */ -#endif -#ifndef Tcl_PrintDouble -#define Tcl_PrintDouble \ - (tclStubsPtr->tcl_PrintDouble) /* 202 */ -#endif -#ifndef Tcl_PutEnv -#define Tcl_PutEnv \ - (tclStubsPtr->tcl_PutEnv) /* 203 */ -#endif -#ifndef Tcl_PosixError -#define Tcl_PosixError \ - (tclStubsPtr->tcl_PosixError) /* 204 */ -#endif -#ifndef Tcl_QueueEvent -#define Tcl_QueueEvent \ - (tclStubsPtr->tcl_QueueEvent) /* 205 */ -#endif -#ifndef Tcl_Read -#define Tcl_Read \ - (tclStubsPtr->tcl_Read) /* 206 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval -#define Tcl_RecordAndEval \ - (tclStubsPtr->tcl_RecordAndEval) /* 208 */ -#endif -#ifndef Tcl_RecordAndEvalObj -#define Tcl_RecordAndEvalObj \ - (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ -#endif -#ifndef Tcl_RegisterChannel -#define Tcl_RegisterChannel \ - (tclStubsPtr->tcl_RegisterChannel) /* 210 */ -#endif -#ifndef Tcl_RegisterObjType -#define Tcl_RegisterObjType \ - (tclStubsPtr->tcl_RegisterObjType) /* 211 */ -#endif -#ifndef Tcl_RegExpCompile -#define Tcl_RegExpCompile \ - (tclStubsPtr->tcl_RegExpCompile) /* 212 */ -#endif -#ifndef Tcl_RegExpExec -#define Tcl_RegExpExec \ - (tclStubsPtr->tcl_RegExpExec) /* 213 */ -#endif -#ifndef Tcl_RegExpMatch -#define Tcl_RegExpMatch \ - (tclStubsPtr->tcl_RegExpMatch) /* 214 */ -#endif -#ifndef Tcl_RegExpRange -#define Tcl_RegExpRange \ - (tclStubsPtr->tcl_RegExpRange) /* 215 */ -#endif -#ifndef Tcl_Release -#define Tcl_Release \ - (tclStubsPtr->tcl_Release) /* 216 */ -#endif -#ifndef Tcl_ResetResult -#define Tcl_ResetResult \ - (tclStubsPtr->tcl_ResetResult) /* 217 */ -#endif -#ifndef Tcl_ScanElement -#define Tcl_ScanElement \ - (tclStubsPtr->tcl_ScanElement) /* 218 */ -#endif -#ifndef Tcl_ScanCountedElement -#define Tcl_ScanCountedElement \ - (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ -#endif -#ifndef Tcl_SeekOld -#define Tcl_SeekOld \ - (tclStubsPtr->tcl_SeekOld) /* 220 */ -#endif -#ifndef Tcl_ServiceAll -#define Tcl_ServiceAll \ - (tclStubsPtr->tcl_ServiceAll) /* 221 */ -#endif -#ifndef Tcl_ServiceEvent -#define Tcl_ServiceEvent \ - (tclStubsPtr->tcl_ServiceEvent) /* 222 */ -#endif -#ifndef Tcl_SetAssocData -#define Tcl_SetAssocData \ - (tclStubsPtr->tcl_SetAssocData) /* 223 */ -#endif -#ifndef Tcl_SetChannelBufferSize -#define Tcl_SetChannelBufferSize \ - (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ -#endif -#ifndef Tcl_SetChannelOption -#define Tcl_SetChannelOption \ - (tclStubsPtr->tcl_SetChannelOption) /* 225 */ -#endif -#ifndef Tcl_SetCommandInfo -#define Tcl_SetCommandInfo \ - (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ -#endif -#ifndef Tcl_SetErrno -#define Tcl_SetErrno \ - (tclStubsPtr->tcl_SetErrno) /* 227 */ -#endif -#ifndef Tcl_SetErrorCode -#define Tcl_SetErrorCode \ - (tclStubsPtr->tcl_SetErrorCode) /* 228 */ -#endif -#ifndef Tcl_SetMaxBlockTime -#define Tcl_SetMaxBlockTime \ - (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ -#endif -#ifndef Tcl_SetPanicProc -#define Tcl_SetPanicProc \ - (tclStubsPtr->tcl_SetPanicProc) /* 230 */ -#endif -#ifndef Tcl_SetRecursionLimit -#define Tcl_SetRecursionLimit \ - (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ -#endif -#ifndef Tcl_SetResult -#define Tcl_SetResult \ - (tclStubsPtr->tcl_SetResult) /* 232 */ -#endif -#ifndef Tcl_SetServiceMode -#define Tcl_SetServiceMode \ - (tclStubsPtr->tcl_SetServiceMode) /* 233 */ -#endif -#ifndef Tcl_SetObjErrorCode -#define Tcl_SetObjErrorCode \ - (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ -#endif -#ifndef Tcl_SetObjResult -#define Tcl_SetObjResult \ - (tclStubsPtr->tcl_SetObjResult) /* 235 */ -#endif -#ifndef Tcl_SetStdChannel -#define Tcl_SetStdChannel \ - (tclStubsPtr->tcl_SetStdChannel) /* 236 */ -#endif -#ifndef Tcl_SetVar -#define Tcl_SetVar \ - (tclStubsPtr->tcl_SetVar) /* 237 */ -#endif -#ifndef Tcl_SetVar2 -#define Tcl_SetVar2 \ - (tclStubsPtr->tcl_SetVar2) /* 238 */ -#endif -#ifndef Tcl_SignalId -#define Tcl_SignalId \ - (tclStubsPtr->tcl_SignalId) /* 239 */ -#endif -#ifndef Tcl_SignalMsg -#define Tcl_SignalMsg \ - (tclStubsPtr->tcl_SignalMsg) /* 240 */ -#endif -#ifndef Tcl_SourceRCFile -#define Tcl_SourceRCFile \ - (tclStubsPtr->tcl_SourceRCFile) /* 241 */ -#endif -#ifndef Tcl_SplitList -#define Tcl_SplitList \ - (tclStubsPtr->tcl_SplitList) /* 242 */ -#endif -#ifndef Tcl_SplitPath -#define Tcl_SplitPath \ - (tclStubsPtr->tcl_SplitPath) /* 243 */ -#endif -#ifndef Tcl_StaticPackage -#define Tcl_StaticPackage \ - (tclStubsPtr->tcl_StaticPackage) /* 244 */ -#endif -#ifndef Tcl_StringMatch -#define Tcl_StringMatch \ - (tclStubsPtr->tcl_StringMatch) /* 245 */ -#endif -#ifndef Tcl_TellOld -#define Tcl_TellOld \ - (tclStubsPtr->tcl_TellOld) /* 246 */ -#endif -#ifndef Tcl_TraceVar -#define Tcl_TraceVar \ - (tclStubsPtr->tcl_TraceVar) /* 247 */ -#endif -#ifndef Tcl_TraceVar2 -#define Tcl_TraceVar2 \ - (tclStubsPtr->tcl_TraceVar2) /* 248 */ -#endif -#ifndef Tcl_TranslateFileName -#define Tcl_TranslateFileName \ - (tclStubsPtr->tcl_TranslateFileName) /* 249 */ -#endif -#ifndef Tcl_Ungets -#define Tcl_Ungets \ - (tclStubsPtr->tcl_Ungets) /* 250 */ -#endif -#ifndef Tcl_UnlinkVar -#define Tcl_UnlinkVar \ - (tclStubsPtr->tcl_UnlinkVar) /* 251 */ -#endif -#ifndef Tcl_UnregisterChannel -#define Tcl_UnregisterChannel \ - (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ -#endif -#ifndef Tcl_UnsetVar -#define Tcl_UnsetVar \ - (tclStubsPtr->tcl_UnsetVar) /* 253 */ -#endif -#ifndef Tcl_UnsetVar2 -#define Tcl_UnsetVar2 \ - (tclStubsPtr->tcl_UnsetVar2) /* 254 */ -#endif -#ifndef Tcl_UntraceVar -#define Tcl_UntraceVar \ - (tclStubsPtr->tcl_UntraceVar) /* 255 */ -#endif -#ifndef Tcl_UntraceVar2 -#define Tcl_UntraceVar2 \ - (tclStubsPtr->tcl_UntraceVar2) /* 256 */ -#endif -#ifndef Tcl_UpdateLinkedVar -#define Tcl_UpdateLinkedVar \ - (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ -#endif -#ifndef Tcl_UpVar -#define Tcl_UpVar \ - (tclStubsPtr->tcl_UpVar) /* 258 */ -#endif -#ifndef Tcl_UpVar2 -#define Tcl_UpVar2 \ - (tclStubsPtr->tcl_UpVar2) /* 259 */ -#endif -#ifndef Tcl_VarEval -#define Tcl_VarEval \ - (tclStubsPtr->tcl_VarEval) /* 260 */ -#endif -#ifndef Tcl_VarTraceInfo -#define Tcl_VarTraceInfo \ - (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ -#endif -#ifndef Tcl_VarTraceInfo2 -#define Tcl_VarTraceInfo2 \ - (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ -#endif -#ifndef Tcl_Write -#define Tcl_Write \ - (tclStubsPtr->tcl_Write) /* 263 */ -#endif -#ifndef Tcl_WrongNumArgs -#define Tcl_WrongNumArgs \ - (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ -#endif -#ifndef Tcl_DumpActiveMemory -#define Tcl_DumpActiveMemory \ - (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ -#endif -#ifndef Tcl_ValidateAllMemory -#define Tcl_ValidateAllMemory \ - (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ -#endif -#ifndef Tcl_AppendResultVA -#define Tcl_AppendResultVA \ - (tclStubsPtr->tcl_AppendResultVA) /* 267 */ -#endif -#ifndef Tcl_AppendStringsToObjVA -#define Tcl_AppendStringsToObjVA \ - (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ -#endif -#ifndef Tcl_HashStats -#define Tcl_HashStats \ - (tclStubsPtr->tcl_HashStats) /* 269 */ -#endif -#ifndef Tcl_ParseVar -#define Tcl_ParseVar \ - (tclStubsPtr->tcl_ParseVar) /* 270 */ -#endif -#ifndef Tcl_PkgPresent -#define Tcl_PkgPresent \ - (tclStubsPtr->tcl_PkgPresent) /* 271 */ -#endif -#ifndef Tcl_PkgPresentEx -#define Tcl_PkgPresentEx \ - (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ -#endif -#ifndef Tcl_PkgProvide -#define Tcl_PkgProvide \ - (tclStubsPtr->tcl_PkgProvide) /* 273 */ -#endif -#ifndef Tcl_PkgRequire -#define Tcl_PkgRequire \ - (tclStubsPtr->tcl_PkgRequire) /* 274 */ -#endif -#ifndef Tcl_SetErrorCodeVA -#define Tcl_SetErrorCodeVA \ - (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ -#endif -#ifndef Tcl_VarEvalVA -#define Tcl_VarEvalVA \ - (tclStubsPtr->tcl_VarEvalVA) /* 276 */ -#endif -#ifndef Tcl_WaitPid -#define Tcl_WaitPid \ - (tclStubsPtr->tcl_WaitPid) /* 277 */ -#endif -#ifndef Tcl_PanicVA -#define Tcl_PanicVA \ - (tclStubsPtr->tcl_PanicVA) /* 278 */ -#endif -#ifndef Tcl_GetVersion -#define Tcl_GetVersion \ - (tclStubsPtr->tcl_GetVersion) /* 279 */ -#endif -#ifndef Tcl_InitMemory -#define Tcl_InitMemory \ - (tclStubsPtr->tcl_InitMemory) /* 280 */ -#endif -#ifndef Tcl_StackChannel -#define Tcl_StackChannel \ - (tclStubsPtr->tcl_StackChannel) /* 281 */ -#endif -#ifndef Tcl_UnstackChannel -#define Tcl_UnstackChannel \ - (tclStubsPtr->tcl_UnstackChannel) /* 282 */ -#endif -#ifndef Tcl_GetStackedChannel -#define Tcl_GetStackedChannel \ - (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ -#endif -#ifndef Tcl_SetMainLoop -#define Tcl_SetMainLoop \ - (tclStubsPtr->tcl_SetMainLoop) /* 284 */ -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj -#define Tcl_AppendObjToObj \ - (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ -#endif -#ifndef Tcl_CreateEncoding -#define Tcl_CreateEncoding \ - (tclStubsPtr->tcl_CreateEncoding) /* 287 */ -#endif -#ifndef Tcl_CreateThreadExitHandler -#define Tcl_CreateThreadExitHandler \ - (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ -#endif -#ifndef Tcl_DeleteThreadExitHandler -#define Tcl_DeleteThreadExitHandler \ - (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ -#endif -#ifndef Tcl_DiscardResult -#define Tcl_DiscardResult \ - (tclStubsPtr->tcl_DiscardResult) /* 290 */ -#endif -#ifndef Tcl_EvalEx -#define Tcl_EvalEx \ - (tclStubsPtr->tcl_EvalEx) /* 291 */ -#endif -#ifndef Tcl_EvalObjv -#define Tcl_EvalObjv \ - (tclStubsPtr->tcl_EvalObjv) /* 292 */ -#endif -#ifndef Tcl_EvalObjEx -#define Tcl_EvalObjEx \ - (tclStubsPtr->tcl_EvalObjEx) /* 293 */ -#endif -#ifndef Tcl_ExitThread -#define Tcl_ExitThread \ - (tclStubsPtr->tcl_ExitThread) /* 294 */ -#endif -#ifndef Tcl_ExternalToUtf -#define Tcl_ExternalToUtf \ - (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ -#endif -#ifndef Tcl_ExternalToUtfDString -#define Tcl_ExternalToUtfDString \ - (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ -#endif -#ifndef Tcl_FinalizeThread -#define Tcl_FinalizeThread \ - (tclStubsPtr->tcl_FinalizeThread) /* 297 */ -#endif -#ifndef Tcl_FinalizeNotifier -#define Tcl_FinalizeNotifier \ - (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ -#endif -#ifndef Tcl_FreeEncoding -#define Tcl_FreeEncoding \ - (tclStubsPtr->tcl_FreeEncoding) /* 299 */ -#endif -#ifndef Tcl_GetCurrentThread -#define Tcl_GetCurrentThread \ - (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ -#endif -#ifndef Tcl_GetEncoding -#define Tcl_GetEncoding \ - (tclStubsPtr->tcl_GetEncoding) /* 301 */ -#endif -#ifndef Tcl_GetEncodingName -#define Tcl_GetEncodingName \ - (tclStubsPtr->tcl_GetEncodingName) /* 302 */ -#endif -#ifndef Tcl_GetEncodingNames -#define Tcl_GetEncodingNames \ - (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ -#endif -#ifndef Tcl_GetIndexFromObjStruct -#define Tcl_GetIndexFromObjStruct \ - (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ -#endif -#ifndef Tcl_GetThreadData -#define Tcl_GetThreadData \ - (tclStubsPtr->tcl_GetThreadData) /* 305 */ -#endif -#ifndef Tcl_GetVar2Ex -#define Tcl_GetVar2Ex \ - (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ -#endif -#ifndef Tcl_InitNotifier -#define Tcl_InitNotifier \ - (tclStubsPtr->tcl_InitNotifier) /* 307 */ -#endif -#ifndef Tcl_MutexLock -#define Tcl_MutexLock \ - (tclStubsPtr->tcl_MutexLock) /* 308 */ -#endif -#ifndef Tcl_MutexUnlock -#define Tcl_MutexUnlock \ - (tclStubsPtr->tcl_MutexUnlock) /* 309 */ -#endif -#ifndef Tcl_ConditionNotify -#define Tcl_ConditionNotify \ - (tclStubsPtr->tcl_ConditionNotify) /* 310 */ -#endif -#ifndef Tcl_ConditionWait -#define Tcl_ConditionWait \ - (tclStubsPtr->tcl_ConditionWait) /* 311 */ -#endif -#ifndef Tcl_NumUtfChars -#define Tcl_NumUtfChars \ - (tclStubsPtr->tcl_NumUtfChars) /* 312 */ -#endif -#ifndef Tcl_ReadChars -#define Tcl_ReadChars \ - (tclStubsPtr->tcl_ReadChars) /* 313 */ -#endif -#ifndef Tcl_RestoreResult -#define Tcl_RestoreResult \ - (tclStubsPtr->tcl_RestoreResult) /* 314 */ -#endif -#ifndef Tcl_SaveResult -#define Tcl_SaveResult \ - (tclStubsPtr->tcl_SaveResult) /* 315 */ -#endif -#ifndef Tcl_SetSystemEncoding -#define Tcl_SetSystemEncoding \ - (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ -#endif -#ifndef Tcl_SetVar2Ex -#define Tcl_SetVar2Ex \ - (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ -#endif -#ifndef Tcl_ThreadAlert -#define Tcl_ThreadAlert \ - (tclStubsPtr->tcl_ThreadAlert) /* 318 */ -#endif -#ifndef Tcl_ThreadQueueEvent -#define Tcl_ThreadQueueEvent \ - (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ -#endif -#ifndef Tcl_UniCharAtIndex -#define Tcl_UniCharAtIndex \ - (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ -#endif -#ifndef Tcl_UniCharToLower -#define Tcl_UniCharToLower \ - (tclStubsPtr->tcl_UniCharToLower) /* 321 */ -#endif -#ifndef Tcl_UniCharToTitle -#define Tcl_UniCharToTitle \ - (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ -#endif -#ifndef Tcl_UniCharToUpper -#define Tcl_UniCharToUpper \ - (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ -#endif -#ifndef Tcl_UniCharToUtf -#define Tcl_UniCharToUtf \ - (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ -#endif -#ifndef Tcl_UtfAtIndex -#define Tcl_UtfAtIndex \ - (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ -#endif -#ifndef Tcl_UtfCharComplete -#define Tcl_UtfCharComplete \ - (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ -#endif -#ifndef Tcl_UtfBackslash -#define Tcl_UtfBackslash \ - (tclStubsPtr->tcl_UtfBackslash) /* 327 */ -#endif -#ifndef Tcl_UtfFindFirst -#define Tcl_UtfFindFirst \ - (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ -#endif -#ifndef Tcl_UtfFindLast -#define Tcl_UtfFindLast \ - (tclStubsPtr->tcl_UtfFindLast) /* 329 */ -#endif -#ifndef Tcl_UtfNext -#define Tcl_UtfNext \ - (tclStubsPtr->tcl_UtfNext) /* 330 */ -#endif -#ifndef Tcl_UtfPrev -#define Tcl_UtfPrev \ - (tclStubsPtr->tcl_UtfPrev) /* 331 */ -#endif -#ifndef Tcl_UtfToExternal -#define Tcl_UtfToExternal \ - (tclStubsPtr->tcl_UtfToExternal) /* 332 */ -#endif -#ifndef Tcl_UtfToExternalDString -#define Tcl_UtfToExternalDString \ - (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ -#endif -#ifndef Tcl_UtfToLower -#define Tcl_UtfToLower \ - (tclStubsPtr->tcl_UtfToLower) /* 334 */ -#endif -#ifndef Tcl_UtfToTitle -#define Tcl_UtfToTitle \ - (tclStubsPtr->tcl_UtfToTitle) /* 335 */ -#endif -#ifndef Tcl_UtfToUniChar -#define Tcl_UtfToUniChar \ - (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ -#endif -#ifndef Tcl_UtfToUpper -#define Tcl_UtfToUpper \ - (tclStubsPtr->tcl_UtfToUpper) /* 337 */ -#endif -#ifndef Tcl_WriteChars -#define Tcl_WriteChars \ - (tclStubsPtr->tcl_WriteChars) /* 338 */ -#endif -#ifndef Tcl_WriteObj -#define Tcl_WriteObj \ - (tclStubsPtr->tcl_WriteObj) /* 339 */ -#endif -#ifndef Tcl_GetString -#define Tcl_GetString \ - (tclStubsPtr->tcl_GetString) /* 340 */ -#endif -#ifndef Tcl_GetDefaultEncodingDir -#define Tcl_GetDefaultEncodingDir \ - (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ -#endif -#ifndef Tcl_SetDefaultEncodingDir -#define Tcl_SetDefaultEncodingDir \ - (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ -#endif -#ifndef Tcl_AlertNotifier -#define Tcl_AlertNotifier \ - (tclStubsPtr->tcl_AlertNotifier) /* 343 */ -#endif -#ifndef Tcl_ServiceModeHook -#define Tcl_ServiceModeHook \ - (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ -#endif -#ifndef Tcl_UniCharIsAlnum -#define Tcl_UniCharIsAlnum \ - (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ -#endif -#ifndef Tcl_UniCharIsAlpha -#define Tcl_UniCharIsAlpha \ - (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ -#endif -#ifndef Tcl_UniCharIsDigit -#define Tcl_UniCharIsDigit \ - (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ -#endif -#ifndef Tcl_UniCharIsLower -#define Tcl_UniCharIsLower \ - (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ -#endif -#ifndef Tcl_UniCharIsSpace -#define Tcl_UniCharIsSpace \ - (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ -#endif -#ifndef Tcl_UniCharIsUpper -#define Tcl_UniCharIsUpper \ - (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ -#endif -#ifndef Tcl_UniCharIsWordChar -#define Tcl_UniCharIsWordChar \ - (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ -#endif -#ifndef Tcl_UniCharLen -#define Tcl_UniCharLen \ - (tclStubsPtr->tcl_UniCharLen) /* 352 */ -#endif -#ifndef Tcl_UniCharNcmp -#define Tcl_UniCharNcmp \ - (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ -#endif -#ifndef Tcl_UniCharToUtfDString -#define Tcl_UniCharToUtfDString \ - (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ -#endif -#ifndef Tcl_UtfToUniCharDString -#define Tcl_UtfToUniCharDString \ - (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ -#endif -#ifndef Tcl_GetRegExpFromObj -#define Tcl_GetRegExpFromObj \ - (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ -#endif -#ifndef Tcl_EvalTokens -#define Tcl_EvalTokens \ - (tclStubsPtr->tcl_EvalTokens) /* 357 */ -#endif -#ifndef Tcl_FreeParse -#define Tcl_FreeParse \ - (tclStubsPtr->tcl_FreeParse) /* 358 */ -#endif -#ifndef Tcl_LogCommandInfo -#define Tcl_LogCommandInfo \ - (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ -#endif -#ifndef Tcl_ParseBraces -#define Tcl_ParseBraces \ - (tclStubsPtr->tcl_ParseBraces) /* 360 */ -#endif -#ifndef Tcl_ParseCommand -#define Tcl_ParseCommand \ - (tclStubsPtr->tcl_ParseCommand) /* 361 */ -#endif -#ifndef Tcl_ParseExpr -#define Tcl_ParseExpr \ - (tclStubsPtr->tcl_ParseExpr) /* 362 */ -#endif -#ifndef Tcl_ParseQuotedString -#define Tcl_ParseQuotedString \ - (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ -#endif -#ifndef Tcl_ParseVarName -#define Tcl_ParseVarName \ - (tclStubsPtr->tcl_ParseVarName) /* 364 */ -#endif -#ifndef Tcl_GetCwd -#define Tcl_GetCwd \ - (tclStubsPtr->tcl_GetCwd) /* 365 */ -#endif -#ifndef Tcl_Chdir -#define Tcl_Chdir \ - (tclStubsPtr->tcl_Chdir) /* 366 */ -#endif -#ifndef Tcl_Access -#define Tcl_Access \ - (tclStubsPtr->tcl_Access) /* 367 */ -#endif -#ifndef Tcl_Stat -#define Tcl_Stat \ - (tclStubsPtr->tcl_Stat) /* 368 */ -#endif -#ifndef Tcl_UtfNcmp -#define Tcl_UtfNcmp \ - (tclStubsPtr->tcl_UtfNcmp) /* 369 */ -#endif -#ifndef Tcl_UtfNcasecmp -#define Tcl_UtfNcasecmp \ - (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ -#endif -#ifndef Tcl_StringCaseMatch -#define Tcl_StringCaseMatch \ - (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ -#endif -#ifndef Tcl_UniCharIsControl -#define Tcl_UniCharIsControl \ - (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ -#endif -#ifndef Tcl_UniCharIsGraph -#define Tcl_UniCharIsGraph \ - (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ -#endif -#ifndef Tcl_UniCharIsPrint -#define Tcl_UniCharIsPrint \ - (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ -#endif -#ifndef Tcl_UniCharIsPunct -#define Tcl_UniCharIsPunct \ - (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ -#endif -#ifndef Tcl_RegExpExecObj -#define Tcl_RegExpExecObj \ - (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ -#endif -#ifndef Tcl_RegExpGetInfo -#define Tcl_RegExpGetInfo \ - (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ -#endif -#ifndef Tcl_NewUnicodeObj -#define Tcl_NewUnicodeObj \ - (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ -#endif -#ifndef Tcl_SetUnicodeObj -#define Tcl_SetUnicodeObj \ - (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ -#endif -#ifndef Tcl_GetCharLength -#define Tcl_GetCharLength \ - (tclStubsPtr->tcl_GetCharLength) /* 380 */ -#endif -#ifndef Tcl_GetUniChar -#define Tcl_GetUniChar \ - (tclStubsPtr->tcl_GetUniChar) /* 381 */ -#endif -#ifndef Tcl_GetUnicode -#define Tcl_GetUnicode \ - (tclStubsPtr->tcl_GetUnicode) /* 382 */ -#endif -#ifndef Tcl_GetRange -#define Tcl_GetRange \ - (tclStubsPtr->tcl_GetRange) /* 383 */ -#endif -#ifndef Tcl_AppendUnicodeToObj -#define Tcl_AppendUnicodeToObj \ - (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ -#endif -#ifndef Tcl_RegExpMatchObj -#define Tcl_RegExpMatchObj \ - (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ -#endif -#ifndef Tcl_SetNotifier -#define Tcl_SetNotifier \ - (tclStubsPtr->tcl_SetNotifier) /* 386 */ -#endif -#ifndef Tcl_GetAllocMutex -#define Tcl_GetAllocMutex \ - (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ -#endif -#ifndef Tcl_GetChannelNames -#define Tcl_GetChannelNames \ - (tclStubsPtr->tcl_GetChannelNames) /* 388 */ -#endif -#ifndef Tcl_GetChannelNamesEx -#define Tcl_GetChannelNamesEx \ - (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ -#endif -#ifndef Tcl_ProcObjCmd -#define Tcl_ProcObjCmd \ - (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ -#endif -#ifndef Tcl_ConditionFinalize -#define Tcl_ConditionFinalize \ - (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ -#endif -#ifndef Tcl_MutexFinalize -#define Tcl_MutexFinalize \ - (tclStubsPtr->tcl_MutexFinalize) /* 392 */ -#endif -#ifndef Tcl_CreateThread -#define Tcl_CreateThread \ - (tclStubsPtr->tcl_CreateThread) /* 393 */ -#endif -#ifndef Tcl_ReadRaw -#define Tcl_ReadRaw \ - (tclStubsPtr->tcl_ReadRaw) /* 394 */ -#endif -#ifndef Tcl_WriteRaw -#define Tcl_WriteRaw \ - (tclStubsPtr->tcl_WriteRaw) /* 395 */ -#endif -#ifndef Tcl_GetTopChannel -#define Tcl_GetTopChannel \ - (tclStubsPtr->tcl_GetTopChannel) /* 396 */ -#endif -#ifndef Tcl_ChannelBuffered -#define Tcl_ChannelBuffered \ - (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ -#endif -#ifndef Tcl_ChannelName -#define Tcl_ChannelName \ - (tclStubsPtr->tcl_ChannelName) /* 398 */ -#endif -#ifndef Tcl_ChannelVersion -#define Tcl_ChannelVersion \ - (tclStubsPtr->tcl_ChannelVersion) /* 399 */ -#endif -#ifndef Tcl_ChannelBlockModeProc -#define Tcl_ChannelBlockModeProc \ - (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ -#endif -#ifndef Tcl_ChannelCloseProc -#define Tcl_ChannelCloseProc \ - (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ -#endif -#ifndef Tcl_ChannelClose2Proc -#define Tcl_ChannelClose2Proc \ - (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ -#endif -#ifndef Tcl_ChannelInputProc -#define Tcl_ChannelInputProc \ - (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ -#endif -#ifndef Tcl_ChannelOutputProc -#define Tcl_ChannelOutputProc \ - (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ -#endif -#ifndef Tcl_ChannelSeekProc -#define Tcl_ChannelSeekProc \ - (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ -#endif -#ifndef Tcl_ChannelSetOptionProc -#define Tcl_ChannelSetOptionProc \ - (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ -#endif -#ifndef Tcl_ChannelGetOptionProc -#define Tcl_ChannelGetOptionProc \ - (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ -#endif -#ifndef Tcl_ChannelWatchProc -#define Tcl_ChannelWatchProc \ - (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ -#endif -#ifndef Tcl_ChannelGetHandleProc -#define Tcl_ChannelGetHandleProc \ - (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ -#endif -#ifndef Tcl_ChannelFlushProc -#define Tcl_ChannelFlushProc \ - (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ -#endif -#ifndef Tcl_ChannelHandlerProc -#define Tcl_ChannelHandlerProc \ - (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ -#endif -#ifndef Tcl_JoinThread -#define Tcl_JoinThread \ - (tclStubsPtr->tcl_JoinThread) /* 412 */ -#endif -#ifndef Tcl_IsChannelShared -#define Tcl_IsChannelShared \ - (tclStubsPtr->tcl_IsChannelShared) /* 413 */ -#endif -#ifndef Tcl_IsChannelRegistered -#define Tcl_IsChannelRegistered \ - (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ -#endif -#ifndef Tcl_CutChannel -#define Tcl_CutChannel \ - (tclStubsPtr->tcl_CutChannel) /* 415 */ -#endif -#ifndef Tcl_SpliceChannel -#define Tcl_SpliceChannel \ - (tclStubsPtr->tcl_SpliceChannel) /* 416 */ -#endif -#ifndef Tcl_ClearChannelHandlers -#define Tcl_ClearChannelHandlers \ - (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ -#endif -#ifndef Tcl_IsChannelExisting -#define Tcl_IsChannelExisting \ - (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ -#endif -#ifndef Tcl_UniCharNcasecmp -#define Tcl_UniCharNcasecmp \ - (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ -#endif -#ifndef Tcl_UniCharCaseMatch -#define Tcl_UniCharCaseMatch \ - (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ -#endif -#ifndef Tcl_FindHashEntry -#define Tcl_FindHashEntry \ - (tclStubsPtr->tcl_FindHashEntry) /* 421 */ -#endif -#ifndef Tcl_CreateHashEntry -#define Tcl_CreateHashEntry \ - (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ -#endif -#ifndef Tcl_InitCustomHashTable -#define Tcl_InitCustomHashTable \ - (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ -#endif -#ifndef Tcl_InitObjHashTable -#define Tcl_InitObjHashTable \ - (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ -#endif -#ifndef Tcl_CommandTraceInfo -#define Tcl_CommandTraceInfo \ - (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ -#endif -#ifndef Tcl_TraceCommand -#define Tcl_TraceCommand \ - (tclStubsPtr->tcl_TraceCommand) /* 426 */ -#endif -#ifndef Tcl_UntraceCommand -#define Tcl_UntraceCommand \ - (tclStubsPtr->tcl_UntraceCommand) /* 427 */ -#endif -#ifndef Tcl_AttemptAlloc -#define Tcl_AttemptAlloc \ - (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ -#endif -#ifndef Tcl_AttemptDbCkalloc -#define Tcl_AttemptDbCkalloc \ - (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ -#endif -#ifndef Tcl_AttemptRealloc -#define Tcl_AttemptRealloc \ - (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ -#endif -#ifndef Tcl_AttemptDbCkrealloc -#define Tcl_AttemptDbCkrealloc \ - (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ -#endif -#ifndef Tcl_AttemptSetObjLength -#define Tcl_AttemptSetObjLength \ - (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ -#endif -#ifndef Tcl_GetChannelThread -#define Tcl_GetChannelThread \ - (tclStubsPtr->tcl_GetChannelThread) /* 433 */ -#endif -#ifndef Tcl_GetUnicodeFromObj -#define Tcl_GetUnicodeFromObj \ - (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ -#endif -#ifndef Tcl_GetMathFuncInfo -#define Tcl_GetMathFuncInfo \ - (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ -#endif -#ifndef Tcl_ListMathFuncs -#define Tcl_ListMathFuncs \ - (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ -#endif -#ifndef Tcl_SubstObj -#define Tcl_SubstObj \ - (tclStubsPtr->tcl_SubstObj) /* 437 */ -#endif -#ifndef Tcl_DetachChannel -#define Tcl_DetachChannel \ - (tclStubsPtr->tcl_DetachChannel) /* 438 */ -#endif -#ifndef Tcl_IsStandardChannel -#define Tcl_IsStandardChannel \ - (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ -#endif -#ifndef Tcl_FSCopyFile -#define Tcl_FSCopyFile \ - (tclStubsPtr->tcl_FSCopyFile) /* 440 */ -#endif -#ifndef Tcl_FSCopyDirectory -#define Tcl_FSCopyDirectory \ - (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ -#endif -#ifndef Tcl_FSCreateDirectory -#define Tcl_FSCreateDirectory \ - (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ -#endif -#ifndef Tcl_FSDeleteFile -#define Tcl_FSDeleteFile \ - (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ -#endif -#ifndef Tcl_FSLoadFile -#define Tcl_FSLoadFile \ - (tclStubsPtr->tcl_FSLoadFile) /* 444 */ -#endif -#ifndef Tcl_FSMatchInDirectory -#define Tcl_FSMatchInDirectory \ - (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ -#endif -#ifndef Tcl_FSLink -#define Tcl_FSLink \ - (tclStubsPtr->tcl_FSLink) /* 446 */ -#endif -#ifndef Tcl_FSRemoveDirectory -#define Tcl_FSRemoveDirectory \ - (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ -#endif -#ifndef Tcl_FSRenameFile -#define Tcl_FSRenameFile \ - (tclStubsPtr->tcl_FSRenameFile) /* 448 */ -#endif -#ifndef Tcl_FSLstat -#define Tcl_FSLstat \ - (tclStubsPtr->tcl_FSLstat) /* 449 */ -#endif -#ifndef Tcl_FSUtime -#define Tcl_FSUtime \ - (tclStubsPtr->tcl_FSUtime) /* 450 */ -#endif -#ifndef Tcl_FSFileAttrsGet -#define Tcl_FSFileAttrsGet \ - (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ -#endif -#ifndef Tcl_FSFileAttrsSet -#define Tcl_FSFileAttrsSet \ - (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ -#endif -#ifndef Tcl_FSFileAttrStrings -#define Tcl_FSFileAttrStrings \ - (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ -#endif -#ifndef Tcl_FSStat -#define Tcl_FSStat \ - (tclStubsPtr->tcl_FSStat) /* 454 */ -#endif -#ifndef Tcl_FSAccess -#define Tcl_FSAccess \ - (tclStubsPtr->tcl_FSAccess) /* 455 */ -#endif -#ifndef Tcl_FSOpenFileChannel -#define Tcl_FSOpenFileChannel \ - (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ -#endif -#ifndef Tcl_FSGetCwd -#define Tcl_FSGetCwd \ - (tclStubsPtr->tcl_FSGetCwd) /* 457 */ -#endif -#ifndef Tcl_FSChdir -#define Tcl_FSChdir \ - (tclStubsPtr->tcl_FSChdir) /* 458 */ -#endif -#ifndef Tcl_FSConvertToPathType -#define Tcl_FSConvertToPathType \ - (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ -#endif -#ifndef Tcl_FSJoinPath -#define Tcl_FSJoinPath \ - (tclStubsPtr->tcl_FSJoinPath) /* 460 */ -#endif -#ifndef Tcl_FSSplitPath -#define Tcl_FSSplitPath \ - (tclStubsPtr->tcl_FSSplitPath) /* 461 */ -#endif -#ifndef Tcl_FSEqualPaths -#define Tcl_FSEqualPaths \ - (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ -#endif -#ifndef Tcl_FSGetNormalizedPath -#define Tcl_FSGetNormalizedPath \ - (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ -#endif -#ifndef Tcl_FSJoinToPath -#define Tcl_FSJoinToPath \ - (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ -#endif -#ifndef Tcl_FSGetInternalRep -#define Tcl_FSGetInternalRep \ - (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ -#endif -#ifndef Tcl_FSGetTranslatedPath -#define Tcl_FSGetTranslatedPath \ - (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ -#endif -#ifndef Tcl_FSEvalFile -#define Tcl_FSEvalFile \ - (tclStubsPtr->tcl_FSEvalFile) /* 467 */ -#endif -#ifndef Tcl_FSNewNativePath -#define Tcl_FSNewNativePath \ - (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ -#endif -#ifndef Tcl_FSGetNativePath -#define Tcl_FSGetNativePath \ - (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ -#endif -#ifndef Tcl_FSFileSystemInfo -#define Tcl_FSFileSystemInfo \ - (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ -#endif -#ifndef Tcl_FSPathSeparator -#define Tcl_FSPathSeparator \ - (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ -#endif -#ifndef Tcl_FSListVolumes -#define Tcl_FSListVolumes \ - (tclStubsPtr->tcl_FSListVolumes) /* 472 */ -#endif -#ifndef Tcl_FSRegister -#define Tcl_FSRegister \ - (tclStubsPtr->tcl_FSRegister) /* 473 */ -#endif -#ifndef Tcl_FSUnregister -#define Tcl_FSUnregister \ - (tclStubsPtr->tcl_FSUnregister) /* 474 */ -#endif -#ifndef Tcl_FSData -#define Tcl_FSData \ - (tclStubsPtr->tcl_FSData) /* 475 */ -#endif -#ifndef Tcl_FSGetTranslatedStringPath -#define Tcl_FSGetTranslatedStringPath \ - (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ -#endif -#ifndef Tcl_FSGetFileSystemForPath -#define Tcl_FSGetFileSystemForPath \ - (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ -#endif -#ifndef Tcl_FSGetPathType -#define Tcl_FSGetPathType \ - (tclStubsPtr->tcl_FSGetPathType) /* 478 */ -#endif -#ifndef Tcl_OutputBuffered -#define Tcl_OutputBuffered \ - (tclStubsPtr->tcl_OutputBuffered) /* 479 */ -#endif -#ifndef Tcl_FSMountsChanged -#define Tcl_FSMountsChanged \ - (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ -#endif -#ifndef Tcl_EvalTokensStandard -#define Tcl_EvalTokensStandard \ - (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ -#endif -#ifndef Tcl_GetTime -#define Tcl_GetTime \ - (tclStubsPtr->tcl_GetTime) /* 482 */ -#endif -#ifndef Tcl_CreateObjTrace -#define Tcl_CreateObjTrace \ - (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ -#endif -#ifndef Tcl_GetCommandInfoFromToken -#define Tcl_GetCommandInfoFromToken \ - (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ -#endif -#ifndef Tcl_SetCommandInfoFromToken -#define Tcl_SetCommandInfoFromToken \ - (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ -#endif -#ifndef Tcl_DbNewWideIntObj -#define Tcl_DbNewWideIntObj \ - (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ -#endif -#ifndef Tcl_GetWideIntFromObj -#define Tcl_GetWideIntFromObj \ - (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ -#endif -#ifndef Tcl_NewWideIntObj -#define Tcl_NewWideIntObj \ - (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ -#endif -#ifndef Tcl_SetWideIntObj -#define Tcl_SetWideIntObj \ - (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ -#endif -#ifndef Tcl_AllocStatBuf -#define Tcl_AllocStatBuf \ - (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ -#endif -#ifndef Tcl_Seek -#define Tcl_Seek \ - (tclStubsPtr->tcl_Seek) /* 491 */ -#endif -#ifndef Tcl_Tell -#define Tcl_Tell \ - (tclStubsPtr->tcl_Tell) /* 492 */ -#endif -#ifndef Tcl_ChannelWideSeekProc -#define Tcl_ChannelWideSeekProc \ - (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ -#endif -#ifndef Tcl_DictObjPut -#define Tcl_DictObjPut \ - (tclStubsPtr->tcl_DictObjPut) /* 494 */ -#endif -#ifndef Tcl_DictObjGet -#define Tcl_DictObjGet \ - (tclStubsPtr->tcl_DictObjGet) /* 495 */ -#endif -#ifndef Tcl_DictObjRemove -#define Tcl_DictObjRemove \ - (tclStubsPtr->tcl_DictObjRemove) /* 496 */ -#endif -#ifndef Tcl_DictObjSize -#define Tcl_DictObjSize \ - (tclStubsPtr->tcl_DictObjSize) /* 497 */ -#endif -#ifndef Tcl_DictObjFirst -#define Tcl_DictObjFirst \ - (tclStubsPtr->tcl_DictObjFirst) /* 498 */ -#endif -#ifndef Tcl_DictObjNext -#define Tcl_DictObjNext \ - (tclStubsPtr->tcl_DictObjNext) /* 499 */ -#endif -#ifndef Tcl_DictObjDone -#define Tcl_DictObjDone \ - (tclStubsPtr->tcl_DictObjDone) /* 500 */ -#endif -#ifndef Tcl_DictObjPutKeyList -#define Tcl_DictObjPutKeyList \ - (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ -#endif -#ifndef Tcl_DictObjRemoveKeyList -#define Tcl_DictObjRemoveKeyList \ - (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ -#endif -#ifndef Tcl_NewDictObj -#define Tcl_NewDictObj \ - (tclStubsPtr->tcl_NewDictObj) /* 503 */ -#endif -#ifndef Tcl_DbNewDictObj -#define Tcl_DbNewDictObj \ - (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ -#endif -#ifndef Tcl_RegisterConfig -#define Tcl_RegisterConfig \ - (tclStubsPtr->tcl_RegisterConfig) /* 505 */ -#endif -#ifndef Tcl_CreateNamespace -#define Tcl_CreateNamespace \ - (tclStubsPtr->tcl_CreateNamespace) /* 506 */ -#endif -#ifndef Tcl_DeleteNamespace -#define Tcl_DeleteNamespace \ - (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ -#endif -#ifndef Tcl_AppendExportList -#define Tcl_AppendExportList \ - (tclStubsPtr->tcl_AppendExportList) /* 508 */ -#endif -#ifndef Tcl_Export -#define Tcl_Export \ - (tclStubsPtr->tcl_Export) /* 509 */ -#endif -#ifndef Tcl_Import -#define Tcl_Import \ - (tclStubsPtr->tcl_Import) /* 510 */ -#endif -#ifndef Tcl_ForgetImport -#define Tcl_ForgetImport \ - (tclStubsPtr->tcl_ForgetImport) /* 511 */ -#endif -#ifndef Tcl_GetCurrentNamespace -#define Tcl_GetCurrentNamespace \ - (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ -#endif -#ifndef Tcl_GetGlobalNamespace -#define Tcl_GetGlobalNamespace \ - (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ -#endif -#ifndef Tcl_FindNamespace -#define Tcl_FindNamespace \ - (tclStubsPtr->tcl_FindNamespace) /* 514 */ -#endif -#ifndef Tcl_FindCommand -#define Tcl_FindCommand \ - (tclStubsPtr->tcl_FindCommand) /* 515 */ -#endif -#ifndef Tcl_GetCommandFromObj -#define Tcl_GetCommandFromObj \ - (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ -#endif -#ifndef Tcl_GetCommandFullName -#define Tcl_GetCommandFullName \ - (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ -#endif -#ifndef Tcl_FSEvalFileEx -#define Tcl_FSEvalFileEx \ - (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ -#endif -#ifndef Tcl_SetExitProc -#define Tcl_SetExitProc \ - (tclStubsPtr->tcl_SetExitProc) /* 519 */ -#endif -#ifndef Tcl_LimitAddHandler -#define Tcl_LimitAddHandler \ - (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ -#endif -#ifndef Tcl_LimitRemoveHandler -#define Tcl_LimitRemoveHandler \ - (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ -#endif -#ifndef Tcl_LimitReady -#define Tcl_LimitReady \ - (tclStubsPtr->tcl_LimitReady) /* 522 */ -#endif -#ifndef Tcl_LimitCheck -#define Tcl_LimitCheck \ - (tclStubsPtr->tcl_LimitCheck) /* 523 */ -#endif -#ifndef Tcl_LimitExceeded -#define Tcl_LimitExceeded \ - (tclStubsPtr->tcl_LimitExceeded) /* 524 */ -#endif -#ifndef Tcl_LimitSetCommands -#define Tcl_LimitSetCommands \ - (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ -#endif -#ifndef Tcl_LimitSetTime -#define Tcl_LimitSetTime \ - (tclStubsPtr->tcl_LimitSetTime) /* 526 */ -#endif -#ifndef Tcl_LimitSetGranularity -#define Tcl_LimitSetGranularity \ - (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ -#endif -#ifndef Tcl_LimitTypeEnabled -#define Tcl_LimitTypeEnabled \ - (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ -#endif -#ifndef Tcl_LimitTypeExceeded -#define Tcl_LimitTypeExceeded \ - (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ -#endif -#ifndef Tcl_LimitTypeSet -#define Tcl_LimitTypeSet \ - (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ -#endif -#ifndef Tcl_LimitTypeReset -#define Tcl_LimitTypeReset \ - (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ -#endif -#ifndef Tcl_LimitGetCommands -#define Tcl_LimitGetCommands \ - (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ -#endif -#ifndef Tcl_LimitGetTime -#define Tcl_LimitGetTime \ - (tclStubsPtr->tcl_LimitGetTime) /* 533 */ -#endif -#ifndef Tcl_LimitGetGranularity -#define Tcl_LimitGetGranularity \ - (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ -#endif -#ifndef Tcl_SaveInterpState -#define Tcl_SaveInterpState \ - (tclStubsPtr->tcl_SaveInterpState) /* 535 */ -#endif -#ifndef Tcl_RestoreInterpState -#define Tcl_RestoreInterpState \ - (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ -#endif -#ifndef Tcl_DiscardInterpState -#define Tcl_DiscardInterpState \ - (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ -#endif -#ifndef Tcl_SetReturnOptions -#define Tcl_SetReturnOptions \ - (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ -#endif -#ifndef Tcl_GetReturnOptions -#define Tcl_GetReturnOptions \ - (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ -#endif -#ifndef Tcl_IsEnsemble -#define Tcl_IsEnsemble \ - (tclStubsPtr->tcl_IsEnsemble) /* 540 */ -#endif -#ifndef Tcl_CreateEnsemble -#define Tcl_CreateEnsemble \ - (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ -#endif -#ifndef Tcl_FindEnsemble -#define Tcl_FindEnsemble \ - (tclStubsPtr->tcl_FindEnsemble) /* 542 */ -#endif -#ifndef Tcl_SetEnsembleSubcommandList -#define Tcl_SetEnsembleSubcommandList \ - (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ -#endif -#ifndef Tcl_SetEnsembleMappingDict -#define Tcl_SetEnsembleMappingDict \ - (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ -#endif -#ifndef Tcl_SetEnsembleUnknownHandler -#define Tcl_SetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ -#endif -#ifndef Tcl_SetEnsembleFlags -#define Tcl_SetEnsembleFlags \ - (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ -#endif -#ifndef Tcl_GetEnsembleSubcommandList -#define Tcl_GetEnsembleSubcommandList \ - (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ -#endif -#ifndef Tcl_GetEnsembleMappingDict -#define Tcl_GetEnsembleMappingDict \ - (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ -#endif -#ifndef Tcl_GetEnsembleUnknownHandler -#define Tcl_GetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ -#endif -#ifndef Tcl_GetEnsembleFlags -#define Tcl_GetEnsembleFlags \ - (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ -#endif -#ifndef Tcl_GetEnsembleNamespace -#define Tcl_GetEnsembleNamespace \ - (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ -#endif -#ifndef Tcl_SetTimeProc -#define Tcl_SetTimeProc \ - (tclStubsPtr->tcl_SetTimeProc) /* 552 */ -#endif -#ifndef Tcl_QueryTimeProc -#define Tcl_QueryTimeProc \ - (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ -#endif -#ifndef Tcl_ChannelThreadActionProc -#define Tcl_ChannelThreadActionProc \ - (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ -#endif -#ifndef Tcl_NewBignumObj -#define Tcl_NewBignumObj \ - (tclStubsPtr->tcl_NewBignumObj) /* 555 */ -#endif -#ifndef Tcl_DbNewBignumObj -#define Tcl_DbNewBignumObj \ - (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ -#endif -#ifndef Tcl_SetBignumObj -#define Tcl_SetBignumObj \ - (tclStubsPtr->tcl_SetBignumObj) /* 557 */ -#endif -#ifndef Tcl_GetBignumFromObj -#define Tcl_GetBignumFromObj \ - (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ -#endif -#ifndef Tcl_TakeBignumFromObj -#define Tcl_TakeBignumFromObj \ - (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ -#endif -#ifndef Tcl_TruncateChannel -#define Tcl_TruncateChannel \ - (tclStubsPtr->tcl_TruncateChannel) /* 560 */ -#endif -#ifndef Tcl_ChannelTruncateProc -#define Tcl_ChannelTruncateProc \ - (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ -#endif -#ifndef Tcl_SetChannelErrorInterp -#define Tcl_SetChannelErrorInterp \ - (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ -#endif -#ifndef Tcl_GetChannelErrorInterp -#define Tcl_GetChannelErrorInterp \ - (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ -#endif -#ifndef Tcl_SetChannelError -#define Tcl_SetChannelError \ - (tclStubsPtr->tcl_SetChannelError) /* 564 */ -#endif -#ifndef Tcl_GetChannelError -#define Tcl_GetChannelError \ - (tclStubsPtr->tcl_GetChannelError) /* 565 */ -#endif -#ifndef Tcl_InitBignumFromDouble -#define Tcl_InitBignumFromDouble \ - (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ -#endif -#ifndef Tcl_GetNamespaceUnknownHandler -#define Tcl_GetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ -#endif -#ifndef Tcl_SetNamespaceUnknownHandler -#define Tcl_SetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ -#endif -#ifndef Tcl_GetEncodingFromObj -#define Tcl_GetEncodingFromObj \ - (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ -#endif -#ifndef Tcl_GetEncodingSearchPath -#define Tcl_GetEncodingSearchPath \ - (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ -#endif -#ifndef Tcl_SetEncodingSearchPath -#define Tcl_SetEncodingSearchPath \ - (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment -#define Tcl_GetEncodingNameFromEnvironment \ - (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ -#endif -#ifndef Tcl_PkgRequireProc -#define Tcl_PkgRequireProc \ - (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ -#endif -#ifndef Tcl_AppendObjToErrorInfo -#define Tcl_AppendObjToErrorInfo \ - (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ -#endif -#ifndef Tcl_AppendLimitedToObj -#define Tcl_AppendLimitedToObj \ - (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ -#endif -#ifndef Tcl_Format -#define Tcl_Format \ - (tclStubsPtr->tcl_Format) /* 576 */ -#endif -#ifndef Tcl_AppendFormatToObj -#define Tcl_AppendFormatToObj \ - (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ -#endif -#ifndef Tcl_ObjPrintf -#define Tcl_ObjPrintf \ - (tclStubsPtr->tcl_ObjPrintf) /* 578 */ -#endif -#ifndef Tcl_AppendPrintfToObj -#define Tcl_AppendPrintfToObj \ - (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ -#endif -#ifndef Tcl_CancelEval -#define Tcl_CancelEval \ - (tclStubsPtr->tcl_CancelEval) /* 580 */ -#endif -#ifndef Tcl_Canceled -#define Tcl_Canceled \ - (tclStubsPtr->tcl_Canceled) /* 581 */ -#endif -#ifndef Tcl_NRCreateCommand -#define Tcl_NRCreateCommand \ - (tclStubsPtr->tcl_NRCreateCommand) /* 582 */ -#endif -#ifndef Tcl_NREvalObj -#define Tcl_NREvalObj \ - (tclStubsPtr->tcl_NREvalObj) /* 583 */ -#endif -#ifndef Tcl_NREvalObjv -#define Tcl_NREvalObjv \ - (tclStubsPtr->tcl_NREvalObjv) /* 584 */ -#endif -#ifndef Tcl_NRCmdSwap -#define Tcl_NRCmdSwap \ - (tclStubsPtr->tcl_NRCmdSwap) /* 585 */ -#endif -#ifndef Tcl_NRAddCallback -#define Tcl_NRAddCallback \ - (tclStubsPtr->tcl_NRAddCallback) /* 586 */ -#endif -#ifndef Tcl_NRCallObjProc -#define Tcl_NRCallObjProc \ - (tclStubsPtr->tcl_NRCallObjProc) /* 587 */ -#endif -#ifndef Tcl_CreatePipe -#define Tcl_CreatePipe \ - (tclStubsPtr->tcl_CreatePipe) /* 588 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLDECLS */ - +/* + * tclDecls.h -- + * + * Declarations of functions in the platform independent public Tcl API. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclDecls.h,v 1.139 2008/07/22 23:01:31 das Exp $ + */ + +#ifndef _TCLDECLS +#define _TCLDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tcl_PkgProvideEx_TCL_DECLARED +#define Tcl_PkgProvideEx_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, + CONST char* name, CONST char* version, + ClientData clientData); +#endif +#ifndef Tcl_PkgRequireEx_TCL_DECLARED +#define Tcl_PkgRequireEx_TCL_DECLARED +/* 1 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_Panic_TCL_DECLARED +#define Tcl_Panic_TCL_DECLARED +/* 2 */ +EXTERN void Tcl_Panic (CONST char * format, ...); +#endif +#ifndef Tcl_Alloc_TCL_DECLARED +#define Tcl_Alloc_TCL_DECLARED +/* 3 */ +EXTERN char * Tcl_Alloc (unsigned int size); +#endif +#ifndef Tcl_Free_TCL_DECLARED +#define Tcl_Free_TCL_DECLARED +/* 4 */ +EXTERN void Tcl_Free (char * ptr); +#endif +#ifndef Tcl_Realloc_TCL_DECLARED +#define Tcl_Realloc_TCL_DECLARED +/* 5 */ +EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_DbCkalloc_TCL_DECLARED +#define Tcl_DbCkalloc_TCL_DECLARED +/* 6 */ +EXTERN char * Tcl_DbCkalloc (unsigned int size, CONST char * file, + int line); +#endif +#ifndef Tcl_DbCkfree_TCL_DECLARED +#define Tcl_DbCkfree_TCL_DECLARED +/* 7 */ +EXTERN int Tcl_DbCkfree (char * ptr, CONST char * file, + int line); +#endif +#ifndef Tcl_DbCkrealloc_TCL_DECLARED +#define Tcl_DbCkrealloc_TCL_DECLARED +/* 8 */ +EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, + CONST char * file, int line); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer_TCL_DECLARED +#define Tcl_SetTimer_TCL_DECLARED +/* 11 */ +EXTERN void Tcl_SetTimer (Tcl_Time * timePtr); +#endif +#ifndef Tcl_Sleep_TCL_DECLARED +#define Tcl_Sleep_TCL_DECLARED +/* 12 */ +EXTERN void Tcl_Sleep (int ms); +#endif +#ifndef Tcl_WaitForEvent_TCL_DECLARED +#define Tcl_WaitForEvent_TCL_DECLARED +/* 13 */ +EXTERN int Tcl_WaitForEvent (Tcl_Time * timePtr); +#endif +#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED +#define Tcl_AppendAllObjTypes_TCL_DECLARED +/* 14 */ +EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendStringsToObj_TCL_DECLARED +#define Tcl_AppendStringsToObj_TCL_DECLARED +/* 15 */ +EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); +#endif +#ifndef Tcl_AppendToObj_TCL_DECLARED +#define Tcl_AppendToObj_TCL_DECLARED +/* 16 */ +EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, CONST char* bytes, + int length); +#endif +#ifndef Tcl_ConcatObj_TCL_DECLARED +#define Tcl_ConcatObj_TCL_DECLARED +/* 17 */ +EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_ConvertToType_TCL_DECLARED +#define Tcl_ConvertToType_TCL_DECLARED +/* 18 */ +EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_DbDecrRefCount_TCL_DECLARED +#define Tcl_DbDecrRefCount_TCL_DECLARED +/* 19 */ +EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, + CONST char * file, int line); +#endif +#ifndef Tcl_DbIncrRefCount_TCL_DECLARED +#define Tcl_DbIncrRefCount_TCL_DECLARED +/* 20 */ +EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, + CONST char * file, int line); +#endif +#ifndef Tcl_DbIsShared_TCL_DECLARED +#define Tcl_DbIsShared_TCL_DECLARED +/* 21 */ +EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, CONST char * file, + int line); +#endif +#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED +#define Tcl_DbNewBooleanObj_TCL_DECLARED +/* 22 */ +EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED +#define Tcl_DbNewByteArrayObj_TCL_DECLARED +/* 23 */ +EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (CONST unsigned char * bytes, + int length, CONST char * file, int line); +#endif +#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED +#define Tcl_DbNewDoubleObj_TCL_DECLARED +/* 24 */ +EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewListObj_TCL_DECLARED +#define Tcl_DbNewListObj_TCL_DECLARED +/* 25 */ +EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *CONST * objv, + CONST char * file, int line); +#endif +#ifndef Tcl_DbNewLongObj_TCL_DECLARED +#define Tcl_DbNewLongObj_TCL_DECLARED +/* 26 */ +EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, CONST char * file, + int line); +#endif +#ifndef Tcl_DbNewObj_TCL_DECLARED +#define Tcl_DbNewObj_TCL_DECLARED +/* 27 */ +EXTERN Tcl_Obj * Tcl_DbNewObj (CONST char * file, int line); +#endif +#ifndef Tcl_DbNewStringObj_TCL_DECLARED +#define Tcl_DbNewStringObj_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Obj * Tcl_DbNewStringObj (CONST char * bytes, int length, + CONST char * file, int line); +#endif +#ifndef Tcl_DuplicateObj_TCL_DECLARED +#define Tcl_DuplicateObj_TCL_DECLARED +/* 29 */ +EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); +#endif +#ifndef TclFreeObj_TCL_DECLARED +#define TclFreeObj_TCL_DECLARED +/* 30 */ +EXTERN void TclFreeObj (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetBoolean_TCL_DECLARED +#define Tcl_GetBoolean_TCL_DECLARED +/* 31 */ +EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, + CONST char * src, int * boolPtr); +#endif +#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED +#define Tcl_GetBooleanFromObj_TCL_DECLARED +/* 32 */ +EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * boolPtr); +#endif +#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED +#define Tcl_GetByteArrayFromObj_TCL_DECLARED +/* 33 */ +EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetDouble_TCL_DECLARED +#define Tcl_GetDouble_TCL_DECLARED +/* 34 */ +EXTERN int Tcl_GetDouble (Tcl_Interp * interp, CONST char * src, + double * doublePtr); +#endif +#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED +#define Tcl_GetDoubleFromObj_TCL_DECLARED +/* 35 */ +EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * doublePtr); +#endif +#ifndef Tcl_GetIndexFromObj_TCL_DECLARED +#define Tcl_GetIndexFromObj_TCL_DECLARED +/* 36 */ +EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST84 char ** tablePtr, + CONST char * msg, int flags, int * indexPtr); +#endif +#ifndef Tcl_GetInt_TCL_DECLARED +#define Tcl_GetInt_TCL_DECLARED +/* 37 */ +EXTERN int Tcl_GetInt (Tcl_Interp * interp, CONST char * src, + int * intPtr); +#endif +#ifndef Tcl_GetIntFromObj_TCL_DECLARED +#define Tcl_GetIntFromObj_TCL_DECLARED +/* 38 */ +EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * intPtr); +#endif +#ifndef Tcl_GetLongFromObj_TCL_DECLARED +#define Tcl_GetLongFromObj_TCL_DECLARED +/* 39 */ +EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * longPtr); +#endif +#ifndef Tcl_GetObjType_TCL_DECLARED +#define Tcl_GetObjType_TCL_DECLARED +/* 40 */ +EXTERN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); +#endif +#ifndef Tcl_GetStringFromObj_TCL_DECLARED +#define Tcl_GetStringFromObj_TCL_DECLARED +/* 41 */ +EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_InvalidateStringRep_TCL_DECLARED +#define Tcl_InvalidateStringRep_TCL_DECLARED +/* 42 */ +EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjAppendList_TCL_DECLARED +#define Tcl_ListObjAppendList_TCL_DECLARED +/* 43 */ +EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); +#endif +#ifndef Tcl_ListObjAppendElement_TCL_DECLARED +#define Tcl_ListObjAppendElement_TCL_DECLARED +/* 44 */ +EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjGetElements_TCL_DECLARED +#define Tcl_ListObjGetElements_TCL_DECLARED +/* 45 */ +EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * objcPtr, + Tcl_Obj *** objvPtr); +#endif +#ifndef Tcl_ListObjIndex_TCL_DECLARED +#define Tcl_ListObjIndex_TCL_DECLARED +/* 46 */ +EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, + Tcl_Obj ** objPtrPtr); +#endif +#ifndef Tcl_ListObjLength_TCL_DECLARED +#define Tcl_ListObjLength_TCL_DECLARED +/* 47 */ +EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * lengthPtr); +#endif +#ifndef Tcl_ListObjReplace_TCL_DECLARED +#define Tcl_ListObjReplace_TCL_DECLARED +/* 48 */ +EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, + Tcl_Obj * listPtr, int first, int count, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NewBooleanObj_TCL_DECLARED +#define Tcl_NewBooleanObj_TCL_DECLARED +/* 49 */ +EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); +#endif +#ifndef Tcl_NewByteArrayObj_TCL_DECLARED +#define Tcl_NewByteArrayObj_TCL_DECLARED +/* 50 */ +EXTERN Tcl_Obj * Tcl_NewByteArrayObj (CONST unsigned char* bytes, + int length); +#endif +#ifndef Tcl_NewDoubleObj_TCL_DECLARED +#define Tcl_NewDoubleObj_TCL_DECLARED +/* 51 */ +EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); +#endif +#ifndef Tcl_NewIntObj_TCL_DECLARED +#define Tcl_NewIntObj_TCL_DECLARED +/* 52 */ +EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); +#endif +#ifndef Tcl_NewListObj_TCL_DECLARED +#define Tcl_NewListObj_TCL_DECLARED +/* 53 */ +EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NewLongObj_TCL_DECLARED +#define Tcl_NewLongObj_TCL_DECLARED +/* 54 */ +EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); +#endif +#ifndef Tcl_NewObj_TCL_DECLARED +#define Tcl_NewObj_TCL_DECLARED +/* 55 */ +EXTERN Tcl_Obj * Tcl_NewObj (void); +#endif +#ifndef Tcl_NewStringObj_TCL_DECLARED +#define Tcl_NewStringObj_TCL_DECLARED +/* 56 */ +EXTERN Tcl_Obj * Tcl_NewStringObj (CONST char * bytes, int length); +#endif +#ifndef Tcl_SetBooleanObj_TCL_DECLARED +#define Tcl_SetBooleanObj_TCL_DECLARED +/* 57 */ +EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); +#endif +#ifndef Tcl_SetByteArrayLength_TCL_DECLARED +#define Tcl_SetByteArrayLength_TCL_DECLARED +/* 58 */ +EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetByteArrayObj_TCL_DECLARED +#define Tcl_SetByteArrayObj_TCL_DECLARED +/* 59 */ +EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, + CONST unsigned char * bytes, int length); +#endif +#ifndef Tcl_SetDoubleObj_TCL_DECLARED +#define Tcl_SetDoubleObj_TCL_DECLARED +/* 60 */ +EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, + double doubleValue); +#endif +#ifndef Tcl_SetIntObj_TCL_DECLARED +#define Tcl_SetIntObj_TCL_DECLARED +/* 61 */ +EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); +#endif +#ifndef Tcl_SetListObj_TCL_DECLARED +#define Tcl_SetListObj_TCL_DECLARED +/* 62 */ +EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_SetLongObj_TCL_DECLARED +#define Tcl_SetLongObj_TCL_DECLARED +/* 63 */ +EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); +#endif +#ifndef Tcl_SetObjLength_TCL_DECLARED +#define Tcl_SetObjLength_TCL_DECLARED +/* 64 */ +EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetStringObj_TCL_DECLARED +#define Tcl_SetStringObj_TCL_DECLARED +/* 65 */ +EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, CONST char* bytes, + int length); +#endif +#ifndef Tcl_AddErrorInfo_TCL_DECLARED +#define Tcl_AddErrorInfo_TCL_DECLARED +/* 66 */ +EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, + CONST char * message); +#endif +#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED +#define Tcl_AddObjErrorInfo_TCL_DECLARED +/* 67 */ +EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, + CONST char * message, int length); +#endif +#ifndef Tcl_AllowExceptions_TCL_DECLARED +#define Tcl_AllowExceptions_TCL_DECLARED +/* 68 */ +EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); +#endif +#ifndef Tcl_AppendElement_TCL_DECLARED +#define Tcl_AppendElement_TCL_DECLARED +/* 69 */ +EXTERN void Tcl_AppendElement (Tcl_Interp * interp, + CONST char * element); +#endif +#ifndef Tcl_AppendResult_TCL_DECLARED +#define Tcl_AppendResult_TCL_DECLARED +/* 70 */ +EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_AsyncCreate_TCL_DECLARED +#define Tcl_AsyncCreate_TCL_DECLARED +/* 71 */ +EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AsyncDelete_TCL_DECLARED +#define Tcl_AsyncDelete_TCL_DECLARED +/* 72 */ +EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncInvoke_TCL_DECLARED +#define Tcl_AsyncInvoke_TCL_DECLARED +/* 73 */ +EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); +#endif +#ifndef Tcl_AsyncMark_TCL_DECLARED +#define Tcl_AsyncMark_TCL_DECLARED +/* 74 */ +EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncReady_TCL_DECLARED +#define Tcl_AsyncReady_TCL_DECLARED +/* 75 */ +EXTERN int Tcl_AsyncReady (void); +#endif +#ifndef Tcl_BackgroundError_TCL_DECLARED +#define Tcl_BackgroundError_TCL_DECLARED +/* 76 */ +EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); +#endif +#ifndef Tcl_Backslash_TCL_DECLARED +#define Tcl_Backslash_TCL_DECLARED +/* 77 */ +EXTERN char Tcl_Backslash (CONST char * src, int * readPtr); +#endif +#ifndef Tcl_BadChannelOption_TCL_DECLARED +#define Tcl_BadChannelOption_TCL_DECLARED +/* 78 */ +EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, + CONST char * optionName, + CONST char * optionList); +#endif +#ifndef Tcl_CallWhenDeleted_TCL_DECLARED +#define Tcl_CallWhenDeleted_TCL_DECLARED +/* 79 */ +EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CancelIdleCall_TCL_DECLARED +#define Tcl_CancelIdleCall_TCL_DECLARED +/* 80 */ +EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, + ClientData clientData); +#endif +#ifndef Tcl_Close_TCL_DECLARED +#define Tcl_Close_TCL_DECLARED +/* 81 */ +EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); +#endif +#ifndef Tcl_CommandComplete_TCL_DECLARED +#define Tcl_CommandComplete_TCL_DECLARED +/* 82 */ +EXTERN int Tcl_CommandComplete (CONST char * cmd); +#endif +#ifndef Tcl_Concat_TCL_DECLARED +#define Tcl_Concat_TCL_DECLARED +/* 83 */ +EXTERN char * Tcl_Concat (int argc, CONST84 char * CONST * argv); +#endif +#ifndef Tcl_ConvertElement_TCL_DECLARED +#define Tcl_ConvertElement_TCL_DECLARED +/* 84 */ +EXTERN int Tcl_ConvertElement (CONST char * src, char * dst, + int flags); +#endif +#ifndef Tcl_ConvertCountedElement_TCL_DECLARED +#define Tcl_ConvertCountedElement_TCL_DECLARED +/* 85 */ +EXTERN int Tcl_ConvertCountedElement (CONST char * src, + int length, char * dst, int flags); +#endif +#ifndef Tcl_CreateAlias_TCL_DECLARED +#define Tcl_CreateAlias_TCL_DECLARED +/* 86 */ +EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, + CONST char * slaveCmd, Tcl_Interp * target, + CONST char * targetCmd, int argc, + CONST84 char * CONST * argv); +#endif +#ifndef Tcl_CreateAliasObj_TCL_DECLARED +#define Tcl_CreateAliasObj_TCL_DECLARED +/* 87 */ +EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, + CONST char * slaveCmd, Tcl_Interp * target, + CONST char * targetCmd, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_CreateChannel_TCL_DECLARED +#define Tcl_CreateChannel_TCL_DECLARED +/* 88 */ +EXTERN Tcl_Channel Tcl_CreateChannel (Tcl_ChannelType * typePtr, + CONST char * chanName, + ClientData instanceData, int mask); +#endif +#ifndef Tcl_CreateChannelHandler_TCL_DECLARED +#define Tcl_CreateChannelHandler_TCL_DECLARED +/* 89 */ +EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateCloseHandler_TCL_DECLARED +#define Tcl_CreateCloseHandler_TCL_DECLARED +/* 90 */ +EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateCommand_TCL_DECLARED +#define Tcl_CreateCommand_TCL_DECLARED +/* 91 */ +EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_CmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateEventSource_TCL_DECLARED +#define Tcl_CreateEventSource_TCL_DECLARED +/* 92 */ +EXTERN void Tcl_CreateEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_CreateExitHandler_TCL_DECLARED +#define Tcl_CreateExitHandler_TCL_DECLARED +/* 93 */ +EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateInterp_TCL_DECLARED +#define Tcl_CreateInterp_TCL_DECLARED +/* 94 */ +EXTERN Tcl_Interp * Tcl_CreateInterp (void); +#endif +#ifndef Tcl_CreateMathFunc_TCL_DECLARED +#define Tcl_CreateMathFunc_TCL_DECLARED +/* 95 */ +EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, + CONST char * name, int numArgs, + Tcl_ValueType * argTypes, + Tcl_MathProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateObjCommand_TCL_DECLARED +#define Tcl_CreateObjCommand_TCL_DECLARED +/* 96 */ +EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_ObjCmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateSlave_TCL_DECLARED +#define Tcl_CreateSlave_TCL_DECLARED +/* 97 */ +EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, + CONST char * slaveName, int isSafe); +#endif +#ifndef Tcl_CreateTimerHandler_TCL_DECLARED +#define Tcl_CreateTimerHandler_TCL_DECLARED +/* 98 */ +EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, + Tcl_TimerProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateTrace_TCL_DECLARED +#define Tcl_CreateTrace_TCL_DECLARED +/* 99 */ +EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, + Tcl_CmdTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteAssocData_TCL_DECLARED +#define Tcl_DeleteAssocData_TCL_DECLARED +/* 100 */ +EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED +#define Tcl_DeleteChannelHandler_TCL_DECLARED +/* 101 */ +EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED +#define Tcl_DeleteCloseHandler_TCL_DECLARED +/* 102 */ +EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_DeleteCommand_TCL_DECLARED +#define Tcl_DeleteCommand_TCL_DECLARED +/* 103 */ +EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, + CONST char * cmdName); +#endif +#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED +#define Tcl_DeleteCommandFromToken_TCL_DECLARED +/* 104 */ +EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_DeleteEvents_TCL_DECLARED +#define Tcl_DeleteEvents_TCL_DECLARED +/* 105 */ +EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteEventSource_TCL_DECLARED +#define Tcl_DeleteEventSource_TCL_DECLARED +/* 106 */ +EXTERN void Tcl_DeleteEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteExitHandler_TCL_DECLARED +#define Tcl_DeleteExitHandler_TCL_DECLARED +/* 107 */ +EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteHashEntry_TCL_DECLARED +#define Tcl_DeleteHashEntry_TCL_DECLARED +/* 108 */ +EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); +#endif +#ifndef Tcl_DeleteHashTable_TCL_DECLARED +#define Tcl_DeleteHashTable_TCL_DECLARED +/* 109 */ +EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_DeleteInterp_TCL_DECLARED +#define Tcl_DeleteInterp_TCL_DECLARED +/* 110 */ +EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED +#define Tcl_DeleteTimerHandler_TCL_DECLARED +/* 112 */ +EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); +#endif +#ifndef Tcl_DeleteTrace_TCL_DECLARED +#define Tcl_DeleteTrace_TCL_DECLARED +/* 113 */ +EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, + Tcl_Trace trace); +#endif +#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED +#define Tcl_DontCallWhenDeleted_TCL_DECLARED +/* 114 */ +EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DoOneEvent_TCL_DECLARED +#define Tcl_DoOneEvent_TCL_DECLARED +/* 115 */ +EXTERN int Tcl_DoOneEvent (int flags); +#endif +#ifndef Tcl_DoWhenIdle_TCL_DECLARED +#define Tcl_DoWhenIdle_TCL_DECLARED +/* 116 */ +EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DStringAppend_TCL_DECLARED +#define Tcl_DStringAppend_TCL_DECLARED +/* 117 */ +EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, + CONST char * bytes, int length); +#endif +#ifndef Tcl_DStringAppendElement_TCL_DECLARED +#define Tcl_DStringAppendElement_TCL_DECLARED +/* 118 */ +EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, + CONST char * element); +#endif +#ifndef Tcl_DStringEndSublist_TCL_DECLARED +#define Tcl_DStringEndSublist_TCL_DECLARED +/* 119 */ +EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringFree_TCL_DECLARED +#define Tcl_DStringFree_TCL_DECLARED +/* 120 */ +EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringGetResult_TCL_DECLARED +#define Tcl_DStringGetResult_TCL_DECLARED +/* 121 */ +EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringInit_TCL_DECLARED +#define Tcl_DStringInit_TCL_DECLARED +/* 122 */ +EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringResult_TCL_DECLARED +#define Tcl_DStringResult_TCL_DECLARED +/* 123 */ +EXTERN void Tcl_DStringResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringSetLength_TCL_DECLARED +#define Tcl_DStringSetLength_TCL_DECLARED +/* 124 */ +EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, + int length); +#endif +#ifndef Tcl_DStringStartSublist_TCL_DECLARED +#define Tcl_DStringStartSublist_TCL_DECLARED +/* 125 */ +EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_Eof_TCL_DECLARED +#define Tcl_Eof_TCL_DECLARED +/* 126 */ +EXTERN int Tcl_Eof (Tcl_Channel chan); +#endif +#ifndef Tcl_ErrnoId_TCL_DECLARED +#define Tcl_ErrnoId_TCL_DECLARED +/* 127 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); +#endif +#ifndef Tcl_ErrnoMsg_TCL_DECLARED +#define Tcl_ErrnoMsg_TCL_DECLARED +/* 128 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); +#endif +#ifndef Tcl_Eval_TCL_DECLARED +#define Tcl_Eval_TCL_DECLARED +/* 129 */ +EXTERN int Tcl_Eval (Tcl_Interp * interp, CONST char * script); +#endif +#ifndef Tcl_EvalFile_TCL_DECLARED +#define Tcl_EvalFile_TCL_DECLARED +/* 130 */ +EXTERN int Tcl_EvalFile (Tcl_Interp * interp, + CONST char * fileName); +#endif +#ifndef Tcl_EvalObj_TCL_DECLARED +#define Tcl_EvalObj_TCL_DECLARED +/* 131 */ +EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_EventuallyFree_TCL_DECLARED +#define Tcl_EventuallyFree_TCL_DECLARED +/* 132 */ +EXTERN void Tcl_EventuallyFree (ClientData clientData, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_Exit_TCL_DECLARED +#define Tcl_Exit_TCL_DECLARED +/* 133 */ +EXTERN void Tcl_Exit (int status); +#endif +#ifndef Tcl_ExposeCommand_TCL_DECLARED +#define Tcl_ExposeCommand_TCL_DECLARED +/* 134 */ +EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, + CONST char * hiddenCmdToken, + CONST char * cmdName); +#endif +#ifndef Tcl_ExprBoolean_TCL_DECLARED +#define Tcl_ExprBoolean_TCL_DECLARED +/* 135 */ +EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, + CONST char * expr, int * ptr); +#endif +#ifndef Tcl_ExprBooleanObj_TCL_DECLARED +#define Tcl_ExprBooleanObj_TCL_DECLARED +/* 136 */ +EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * ptr); +#endif +#ifndef Tcl_ExprDouble_TCL_DECLARED +#define Tcl_ExprDouble_TCL_DECLARED +/* 137 */ +EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, + CONST char * expr, double * ptr); +#endif +#ifndef Tcl_ExprDoubleObj_TCL_DECLARED +#define Tcl_ExprDoubleObj_TCL_DECLARED +/* 138 */ +EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * ptr); +#endif +#ifndef Tcl_ExprLong_TCL_DECLARED +#define Tcl_ExprLong_TCL_DECLARED +/* 139 */ +EXTERN int Tcl_ExprLong (Tcl_Interp * interp, CONST char * expr, + long * ptr); +#endif +#ifndef Tcl_ExprLongObj_TCL_DECLARED +#define Tcl_ExprLongObj_TCL_DECLARED +/* 140 */ +EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * ptr); +#endif +#ifndef Tcl_ExprObj_TCL_DECLARED +#define Tcl_ExprObj_TCL_DECLARED +/* 141 */ +EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + Tcl_Obj ** resultPtrPtr); +#endif +#ifndef Tcl_ExprString_TCL_DECLARED +#define Tcl_ExprString_TCL_DECLARED +/* 142 */ +EXTERN int Tcl_ExprString (Tcl_Interp * interp, + CONST char * expr); +#endif +#ifndef Tcl_Finalize_TCL_DECLARED +#define Tcl_Finalize_TCL_DECLARED +/* 143 */ +EXTERN void Tcl_Finalize (void); +#endif +#ifndef Tcl_FindExecutable_TCL_DECLARED +#define Tcl_FindExecutable_TCL_DECLARED +/* 144 */ +EXTERN void Tcl_FindExecutable (CONST char * argv0); +#endif +#ifndef Tcl_FirstHashEntry_TCL_DECLARED +#define Tcl_FirstHashEntry_TCL_DECLARED +/* 145 */ +EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, + Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_Flush_TCL_DECLARED +#define Tcl_Flush_TCL_DECLARED +/* 146 */ +EXTERN int Tcl_Flush (Tcl_Channel chan); +#endif +#ifndef Tcl_FreeResult_TCL_DECLARED +#define Tcl_FreeResult_TCL_DECLARED +/* 147 */ +EXTERN void Tcl_FreeResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetAlias_TCL_DECLARED +#define Tcl_GetAlias_TCL_DECLARED +/* 148 */ +EXTERN int Tcl_GetAlias (Tcl_Interp * interp, + CONST char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_GetAliasObj_TCL_DECLARED +#define Tcl_GetAliasObj_TCL_DECLARED +/* 149 */ +EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, + CONST char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * objcPtr, + Tcl_Obj *** objv); +#endif +#ifndef Tcl_GetAssocData_TCL_DECLARED +#define Tcl_GetAssocData_TCL_DECLARED +/* 150 */ +EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, + CONST char * name, + Tcl_InterpDeleteProc ** procPtr); +#endif +#ifndef Tcl_GetChannel_TCL_DECLARED +#define Tcl_GetChannel_TCL_DECLARED +/* 151 */ +EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, + CONST char * chanName, int * modePtr); +#endif +#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED +#define Tcl_GetChannelBufferSize_TCL_DECLARED +/* 152 */ +EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelHandle_TCL_DECLARED +#define Tcl_GetChannelHandle_TCL_DECLARED +/* 153 */ +EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, + int direction, ClientData * handlePtr); +#endif +#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED +#define Tcl_GetChannelInstanceData_TCL_DECLARED +/* 154 */ +EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelMode_TCL_DECLARED +#define Tcl_GetChannelMode_TCL_DECLARED +/* 155 */ +EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelName_TCL_DECLARED +#define Tcl_GetChannelName_TCL_DECLARED +/* 156 */ +EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelOption_TCL_DECLARED +#define Tcl_GetChannelOption_TCL_DECLARED +/* 157 */ +EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, CONST char * optionName, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetChannelType_TCL_DECLARED +#define Tcl_GetChannelType_TCL_DECLARED +/* 158 */ +EXTERN Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); +#endif +#ifndef Tcl_GetCommandInfo_TCL_DECLARED +#define Tcl_GetCommandInfo_TCL_DECLARED +/* 159 */ +EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, + CONST char * cmdName, Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_GetCommandName_TCL_DECLARED +#define Tcl_GetCommandName_TCL_DECLARED +/* 160 */ +EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_GetErrno_TCL_DECLARED +#define Tcl_GetErrno_TCL_DECLARED +/* 161 */ +EXTERN int Tcl_GetErrno (void); +#endif +#ifndef Tcl_GetHostName_TCL_DECLARED +#define Tcl_GetHostName_TCL_DECLARED +/* 162 */ +EXTERN CONST84_RETURN char * Tcl_GetHostName (void); +#endif +#ifndef Tcl_GetInterpPath_TCL_DECLARED +#define Tcl_GetInterpPath_TCL_DECLARED +/* 163 */ +EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, + Tcl_Interp * slaveInterp); +#endif +#ifndef Tcl_GetMaster_TCL_DECLARED +#define Tcl_GetMaster_TCL_DECLARED +/* 164 */ +EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED +#define Tcl_GetNameOfExecutable_TCL_DECLARED +/* 165 */ +EXTERN CONST char * Tcl_GetNameOfExecutable (void); +#endif +#ifndef Tcl_GetObjResult_TCL_DECLARED +#define Tcl_GetObjResult_TCL_DECLARED +/* 166 */ +EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + CONST char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + CONST char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType_TCL_DECLARED +#define Tcl_GetPathType_TCL_DECLARED +/* 168 */ +EXTERN Tcl_PathType Tcl_GetPathType (CONST char * path); +#endif +#ifndef Tcl_Gets_TCL_DECLARED +#define Tcl_Gets_TCL_DECLARED +/* 169 */ +EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetsObj_TCL_DECLARED +#define Tcl_GetsObj_TCL_DECLARED +/* 170 */ +EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetServiceMode_TCL_DECLARED +#define Tcl_GetServiceMode_TCL_DECLARED +/* 171 */ +EXTERN int Tcl_GetServiceMode (void); +#endif +#ifndef Tcl_GetSlave_TCL_DECLARED +#define Tcl_GetSlave_TCL_DECLARED +/* 172 */ +EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, + CONST char * slaveName); +#endif +#ifndef Tcl_GetStdChannel_TCL_DECLARED +#define Tcl_GetStdChannel_TCL_DECLARED +/* 173 */ +EXTERN Tcl_Channel Tcl_GetStdChannel (int type); +#endif +#ifndef Tcl_GetStringResult_TCL_DECLARED +#define Tcl_GetStringResult_TCL_DECLARED +/* 174 */ +EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetVar_TCL_DECLARED +#define Tcl_GetVar_TCL_DECLARED +/* 175 */ +EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, + CONST char * varName, int flags); +#endif +#ifndef Tcl_GetVar2_TCL_DECLARED +#define Tcl_GetVar2_TCL_DECLARED +/* 176 */ +EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_GlobalEval_TCL_DECLARED +#define Tcl_GlobalEval_TCL_DECLARED +/* 177 */ +EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, + CONST char * command); +#endif +#ifndef Tcl_GlobalEvalObj_TCL_DECLARED +#define Tcl_GlobalEvalObj_TCL_DECLARED +/* 178 */ +EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_HideCommand_TCL_DECLARED +#define Tcl_HideCommand_TCL_DECLARED +/* 179 */ +EXTERN int Tcl_HideCommand (Tcl_Interp * interp, + CONST char * cmdName, + CONST char * hiddenCmdToken); +#endif +#ifndef Tcl_Init_TCL_DECLARED +#define Tcl_Init_TCL_DECLARED +/* 180 */ +EXTERN int Tcl_Init (Tcl_Interp * interp); +#endif +#ifndef Tcl_InitHashTable_TCL_DECLARED +#define Tcl_InitHashTable_TCL_DECLARED +/* 181 */ +EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, + int keyType); +#endif +#ifndef Tcl_InputBlocked_TCL_DECLARED +#define Tcl_InputBlocked_TCL_DECLARED +/* 182 */ +EXTERN int Tcl_InputBlocked (Tcl_Channel chan); +#endif +#ifndef Tcl_InputBuffered_TCL_DECLARED +#define Tcl_InputBuffered_TCL_DECLARED +/* 183 */ +EXTERN int Tcl_InputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_InterpDeleted_TCL_DECLARED +#define Tcl_InterpDeleted_TCL_DECLARED +/* 184 */ +EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); +#endif +#ifndef Tcl_IsSafe_TCL_DECLARED +#define Tcl_IsSafe_TCL_DECLARED +/* 185 */ +EXTERN int Tcl_IsSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_JoinPath_TCL_DECLARED +#define Tcl_JoinPath_TCL_DECLARED +/* 186 */ +EXTERN char * Tcl_JoinPath (int argc, CONST84 char * CONST * argv, + Tcl_DString * resultPtr); +#endif +#ifndef Tcl_LinkVar_TCL_DECLARED +#define Tcl_LinkVar_TCL_DECLARED +/* 187 */ +EXTERN int Tcl_LinkVar (Tcl_Interp * interp, + CONST char * varName, char * addr, int type); +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel_TCL_DECLARED +#define Tcl_MakeFileChannel_TCL_DECLARED +/* 189 */ +EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); +#endif +#ifndef Tcl_MakeSafe_TCL_DECLARED +#define Tcl_MakeSafe_TCL_DECLARED +/* 190 */ +EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED +#define Tcl_MakeTcpClientChannel_TCL_DECLARED +/* 191 */ +EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); +#endif +#ifndef Tcl_Merge_TCL_DECLARED +#define Tcl_Merge_TCL_DECLARED +/* 192 */ +EXTERN char * Tcl_Merge (int argc, CONST84 char * CONST * argv); +#endif +#ifndef Tcl_NextHashEntry_TCL_DECLARED +#define Tcl_NextHashEntry_TCL_DECLARED +/* 193 */ +EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_NotifyChannel_TCL_DECLARED +#define Tcl_NotifyChannel_TCL_DECLARED +/* 194 */ +EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); +#endif +#ifndef Tcl_ObjGetVar2_TCL_DECLARED +#define Tcl_ObjGetVar2_TCL_DECLARED +/* 195 */ +EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + int flags); +#endif +#ifndef Tcl_ObjSetVar2_TCL_DECLARED +#define Tcl_ObjSetVar2_TCL_DECLARED +/* 196 */ +EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + Tcl_Obj * newValuePtr, int flags); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel_TCL_DECLARED +#define Tcl_OpenFileChannel_TCL_DECLARED +/* 198 */ +EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, + CONST char * fileName, + CONST char * modeString, int permissions); +#endif +#ifndef Tcl_OpenTcpClient_TCL_DECLARED +#define Tcl_OpenTcpClient_TCL_DECLARED +/* 199 */ +EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, + CONST char * address, CONST char * myaddr, + int myport, int async); +#endif +#ifndef Tcl_OpenTcpServer_TCL_DECLARED +#define Tcl_OpenTcpServer_TCL_DECLARED +/* 200 */ +EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, + CONST char * host, + Tcl_TcpAcceptProc * acceptProc, + ClientData callbackData); +#endif +#ifndef Tcl_Preserve_TCL_DECLARED +#define Tcl_Preserve_TCL_DECLARED +/* 201 */ +EXTERN void Tcl_Preserve (ClientData data); +#endif +#ifndef Tcl_PrintDouble_TCL_DECLARED +#define Tcl_PrintDouble_TCL_DECLARED +/* 202 */ +EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, + char * dst); +#endif +#ifndef Tcl_PutEnv_TCL_DECLARED +#define Tcl_PutEnv_TCL_DECLARED +/* 203 */ +EXTERN int Tcl_PutEnv (CONST char * assignment); +#endif +#ifndef Tcl_PosixError_TCL_DECLARED +#define Tcl_PosixError_TCL_DECLARED +/* 204 */ +EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); +#endif +#ifndef Tcl_QueueEvent_TCL_DECLARED +#define Tcl_QueueEvent_TCL_DECLARED +/* 205 */ +EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tcl_Read_TCL_DECLARED +#define Tcl_Read_TCL_DECLARED +/* 206 */ +EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, + int toRead); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval_TCL_DECLARED +#define Tcl_RecordAndEval_TCL_DECLARED +/* 208 */ +EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, + CONST char * cmd, int flags); +#endif +#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED +#define Tcl_RecordAndEvalObj_TCL_DECLARED +/* 209 */ +EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, + Tcl_Obj * cmdPtr, int flags); +#endif +#ifndef Tcl_RegisterChannel_TCL_DECLARED +#define Tcl_RegisterChannel_TCL_DECLARED +/* 210 */ +EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_RegisterObjType_TCL_DECLARED +#define Tcl_RegisterObjType_TCL_DECLARED +/* 211 */ +EXTERN void Tcl_RegisterObjType (Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_RegExpCompile_TCL_DECLARED +#define Tcl_RegExpCompile_TCL_DECLARED +/* 212 */ +EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_RegExpExec_TCL_DECLARED +#define Tcl_RegExpExec_TCL_DECLARED +/* 213 */ +EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, + Tcl_RegExp regexp, CONST char * text, + CONST char * start); +#endif +#ifndef Tcl_RegExpMatch_TCL_DECLARED +#define Tcl_RegExpMatch_TCL_DECLARED +/* 214 */ +EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, + CONST char * text, CONST char * pattern); +#endif +#ifndef Tcl_RegExpRange_TCL_DECLARED +#define Tcl_RegExpRange_TCL_DECLARED +/* 215 */ +EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, + CONST84 char ** startPtr, + CONST84 char ** endPtr); +#endif +#ifndef Tcl_Release_TCL_DECLARED +#define Tcl_Release_TCL_DECLARED +/* 216 */ +EXTERN void Tcl_Release (ClientData clientData); +#endif +#ifndef Tcl_ResetResult_TCL_DECLARED +#define Tcl_ResetResult_TCL_DECLARED +/* 217 */ +EXTERN void Tcl_ResetResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_ScanElement_TCL_DECLARED +#define Tcl_ScanElement_TCL_DECLARED +/* 218 */ +EXTERN int Tcl_ScanElement (CONST char * str, int * flagPtr); +#endif +#ifndef Tcl_ScanCountedElement_TCL_DECLARED +#define Tcl_ScanCountedElement_TCL_DECLARED +/* 219 */ +EXTERN int Tcl_ScanCountedElement (CONST char * str, int length, + int * flagPtr); +#endif +#ifndef Tcl_SeekOld_TCL_DECLARED +#define Tcl_SeekOld_TCL_DECLARED +/* 220 */ +EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); +#endif +#ifndef Tcl_ServiceAll_TCL_DECLARED +#define Tcl_ServiceAll_TCL_DECLARED +/* 221 */ +EXTERN int Tcl_ServiceAll (void); +#endif +#ifndef Tcl_ServiceEvent_TCL_DECLARED +#define Tcl_ServiceEvent_TCL_DECLARED +/* 222 */ +EXTERN int Tcl_ServiceEvent (int flags); +#endif +#ifndef Tcl_SetAssocData_TCL_DECLARED +#define Tcl_SetAssocData_TCL_DECLARED +/* 223 */ +EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, + CONST char * name, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED +#define Tcl_SetChannelBufferSize_TCL_DECLARED +/* 224 */ +EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); +#endif +#ifndef Tcl_SetChannelOption_TCL_DECLARED +#define Tcl_SetChannelOption_TCL_DECLARED +/* 225 */ +EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, CONST char * optionName, + CONST char * newValue); +#endif +#ifndef Tcl_SetCommandInfo_TCL_DECLARED +#define Tcl_SetCommandInfo_TCL_DECLARED +/* 226 */ +EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, + CONST char * cmdName, + CONST Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_SetErrno_TCL_DECLARED +#define Tcl_SetErrno_TCL_DECLARED +/* 227 */ +EXTERN void Tcl_SetErrno (int err); +#endif +#ifndef Tcl_SetErrorCode_TCL_DECLARED +#define Tcl_SetErrorCode_TCL_DECLARED +/* 228 */ +EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED +#define Tcl_SetMaxBlockTime_TCL_DECLARED +/* 229 */ +EXTERN void Tcl_SetMaxBlockTime (Tcl_Time * timePtr); +#endif +#ifndef Tcl_SetPanicProc_TCL_DECLARED +#define Tcl_SetPanicProc_TCL_DECLARED +/* 230 */ +EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); +#endif +#ifndef Tcl_SetRecursionLimit_TCL_DECLARED +#define Tcl_SetRecursionLimit_TCL_DECLARED +/* 231 */ +EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, + int depth); +#endif +#ifndef Tcl_SetResult_TCL_DECLARED +#define Tcl_SetResult_TCL_DECLARED +/* 232 */ +EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_SetServiceMode_TCL_DECLARED +#define Tcl_SetServiceMode_TCL_DECLARED +/* 233 */ +EXTERN int Tcl_SetServiceMode (int mode); +#endif +#ifndef Tcl_SetObjErrorCode_TCL_DECLARED +#define Tcl_SetObjErrorCode_TCL_DECLARED +/* 234 */ +EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, + Tcl_Obj * errorObjPtr); +#endif +#ifndef Tcl_SetObjResult_TCL_DECLARED +#define Tcl_SetObjResult_TCL_DECLARED +/* 235 */ +EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr); +#endif +#ifndef Tcl_SetStdChannel_TCL_DECLARED +#define Tcl_SetStdChannel_TCL_DECLARED +/* 236 */ +EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); +#endif +#ifndef Tcl_SetVar_TCL_DECLARED +#define Tcl_SetVar_TCL_DECLARED +/* 237 */ +EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, + CONST char * varName, CONST char * newValue, + int flags); +#endif +#ifndef Tcl_SetVar2_TCL_DECLARED +#define Tcl_SetVar2_TCL_DECLARED +/* 238 */ +EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + CONST char * newValue, int flags); +#endif +#ifndef Tcl_SignalId_TCL_DECLARED +#define Tcl_SignalId_TCL_DECLARED +/* 239 */ +EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); +#endif +#ifndef Tcl_SignalMsg_TCL_DECLARED +#define Tcl_SignalMsg_TCL_DECLARED +/* 240 */ +EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); +#endif +#ifndef Tcl_SourceRCFile_TCL_DECLARED +#define Tcl_SourceRCFile_TCL_DECLARED +/* 241 */ +EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); +#endif +#ifndef Tcl_SplitList_TCL_DECLARED +#define Tcl_SplitList_TCL_DECLARED +/* 242 */ +EXTERN int Tcl_SplitList (Tcl_Interp * interp, + CONST char * listStr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_SplitPath_TCL_DECLARED +#define Tcl_SplitPath_TCL_DECLARED +/* 243 */ +EXTERN void Tcl_SplitPath (CONST char * path, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_StaticPackage_TCL_DECLARED +#define Tcl_StaticPackage_TCL_DECLARED +/* 244 */ +EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, + CONST char * pkgName, + Tcl_PackageInitProc * initProc, + Tcl_PackageInitProc * safeInitProc); +#endif +#ifndef Tcl_StringMatch_TCL_DECLARED +#define Tcl_StringMatch_TCL_DECLARED +/* 245 */ +EXTERN int Tcl_StringMatch (CONST char * str, + CONST char * pattern); +#endif +#ifndef Tcl_TellOld_TCL_DECLARED +#define Tcl_TellOld_TCL_DECLARED +/* 246 */ +EXTERN int Tcl_TellOld (Tcl_Channel chan); +#endif +#ifndef Tcl_TraceVar_TCL_DECLARED +#define Tcl_TraceVar_TCL_DECLARED +/* 247 */ +EXTERN int Tcl_TraceVar (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TraceVar2_TCL_DECLARED +#define Tcl_TraceVar2_TCL_DECLARED +/* 248 */ +EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TranslateFileName_TCL_DECLARED +#define Tcl_TranslateFileName_TCL_DECLARED +/* 249 */ +EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, + CONST char * name, Tcl_DString * bufferPtr); +#endif +#ifndef Tcl_Ungets_TCL_DECLARED +#define Tcl_Ungets_TCL_DECLARED +/* 250 */ +EXTERN int Tcl_Ungets (Tcl_Channel chan, CONST char * str, + int len, int atHead); +#endif +#ifndef Tcl_UnlinkVar_TCL_DECLARED +#define Tcl_UnlinkVar_TCL_DECLARED +/* 251 */ +EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef Tcl_UnregisterChannel_TCL_DECLARED +#define Tcl_UnregisterChannel_TCL_DECLARED +/* 252 */ +EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_UnsetVar_TCL_DECLARED +#define Tcl_UnsetVar_TCL_DECLARED +/* 253 */ +EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, + CONST char * varName, int flags); +#endif +#ifndef Tcl_UnsetVar2_TCL_DECLARED +#define Tcl_UnsetVar2_TCL_DECLARED +/* 254 */ +EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_UntraceVar_TCL_DECLARED +#define Tcl_UntraceVar_TCL_DECLARED +/* 255 */ +EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceVar2_TCL_DECLARED +#define Tcl_UntraceVar2_TCL_DECLARED +/* 256 */ +EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED +#define Tcl_UpdateLinkedVar_TCL_DECLARED +/* 257 */ +EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef Tcl_UpVar_TCL_DECLARED +#define Tcl_UpVar_TCL_DECLARED +/* 258 */ +EXTERN int Tcl_UpVar (Tcl_Interp * interp, + CONST char * frameName, CONST char * varName, + CONST char * localName, int flags); +#endif +#ifndef Tcl_UpVar2_TCL_DECLARED +#define Tcl_UpVar2_TCL_DECLARED +/* 259 */ +EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, + CONST char * frameName, CONST char * part1, + CONST char * part2, CONST char * localName, + int flags); +#endif +#ifndef Tcl_VarEval_TCL_DECLARED +#define Tcl_VarEval_TCL_DECLARED +/* 260 */ +EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_VarTraceInfo_TCL_DECLARED +#define Tcl_VarTraceInfo_TCL_DECLARED +/* 261 */ +EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_VarTraceInfo2_TCL_DECLARED +#define Tcl_VarTraceInfo2_TCL_DECLARED +/* 262 */ +EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_Write_TCL_DECLARED +#define Tcl_Write_TCL_DECLARED +/* 263 */ +EXTERN int Tcl_Write (Tcl_Channel chan, CONST char * s, + int slen); +#endif +#ifndef Tcl_WrongNumArgs_TCL_DECLARED +#define Tcl_WrongNumArgs_TCL_DECLARED +/* 264 */ +EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], CONST char * message); +#endif +#ifndef Tcl_DumpActiveMemory_TCL_DECLARED +#define Tcl_DumpActiveMemory_TCL_DECLARED +/* 265 */ +EXTERN int Tcl_DumpActiveMemory (CONST char * fileName); +#endif +#ifndef Tcl_ValidateAllMemory_TCL_DECLARED +#define Tcl_ValidateAllMemory_TCL_DECLARED +/* 266 */ +EXTERN void Tcl_ValidateAllMemory (CONST char * file, int line); +#endif +#ifndef Tcl_AppendResultVA_TCL_DECLARED +#define Tcl_AppendResultVA_TCL_DECLARED +/* 267 */ +EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED +#define Tcl_AppendStringsToObjVA_TCL_DECLARED +/* 268 */ +EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, + va_list argList); +#endif +#ifndef Tcl_HashStats_TCL_DECLARED +#define Tcl_HashStats_TCL_DECLARED +/* 269 */ +EXTERN CONST84_RETURN char * Tcl_HashStats (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_ParseVar_TCL_DECLARED +#define Tcl_ParseVar_TCL_DECLARED +/* 270 */ +EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, + CONST char * start, CONST84 char ** termPtr); +#endif +#ifndef Tcl_PkgPresent_TCL_DECLARED +#define Tcl_PkgPresent_TCL_DECLARED +/* 271 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact); +#endif +#ifndef Tcl_PkgPresentEx_TCL_DECLARED +#define Tcl_PkgPresentEx_TCL_DECLARED +/* 272 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_PkgProvide_TCL_DECLARED +#define Tcl_PkgProvide_TCL_DECLARED +/* 273 */ +EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, + CONST char * name, CONST char * version); +#endif +#ifndef Tcl_PkgRequire_TCL_DECLARED +#define Tcl_PkgRequire_TCL_DECLARED +/* 274 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, + CONST char * name, CONST char * version, + int exact); +#endif +#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED +#define Tcl_SetErrorCodeVA_TCL_DECLARED +/* 275 */ +EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_VarEvalVA_TCL_DECLARED +#define Tcl_VarEvalVA_TCL_DECLARED +/* 276 */ +EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); +#endif +#ifndef Tcl_WaitPid_TCL_DECLARED +#define Tcl_WaitPid_TCL_DECLARED +/* 277 */ +EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); +#endif +#ifndef Tcl_PanicVA_TCL_DECLARED +#define Tcl_PanicVA_TCL_DECLARED +/* 278 */ +EXTERN void Tcl_PanicVA (CONST char * format, va_list argList); +#endif +#ifndef Tcl_GetVersion_TCL_DECLARED +#define Tcl_GetVersion_TCL_DECLARED +/* 279 */ +EXTERN void Tcl_GetVersion (int * major, int * minor, + int * patchLevel, int * type); +#endif +#ifndef Tcl_InitMemory_TCL_DECLARED +#define Tcl_InitMemory_TCL_DECLARED +/* 280 */ +EXTERN void Tcl_InitMemory (Tcl_Interp * interp); +#endif +#ifndef Tcl_StackChannel_TCL_DECLARED +#define Tcl_StackChannel_TCL_DECLARED +/* 281 */ +EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, + Tcl_ChannelType * typePtr, + ClientData instanceData, int mask, + Tcl_Channel prevChan); +#endif +#ifndef Tcl_UnstackChannel_TCL_DECLARED +#define Tcl_UnstackChannel_TCL_DECLARED +/* 282 */ +EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_GetStackedChannel_TCL_DECLARED +#define Tcl_GetStackedChannel_TCL_DECLARED +/* 283 */ +EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_SetMainLoop_TCL_DECLARED +#define Tcl_SetMainLoop_TCL_DECLARED +/* 284 */ +EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj_TCL_DECLARED +#define Tcl_AppendObjToObj_TCL_DECLARED +/* 286 */ +EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, + Tcl_Obj * appendObjPtr); +#endif +#ifndef Tcl_CreateEncoding_TCL_DECLARED +#define Tcl_CreateEncoding_TCL_DECLARED +/* 287 */ +EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); +#endif +#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED +#define Tcl_CreateThreadExitHandler_TCL_DECLARED +/* 288 */ +EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED +#define Tcl_DeleteThreadExitHandler_TCL_DECLARED +/* 289 */ +EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DiscardResult_TCL_DECLARED +#define Tcl_DiscardResult_TCL_DECLARED +/* 290 */ +EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_EvalEx_TCL_DECLARED +#define Tcl_EvalEx_TCL_DECLARED +/* 291 */ +EXTERN int Tcl_EvalEx (Tcl_Interp * interp, CONST char * script, + int numBytes, int flags); +#endif +#ifndef Tcl_EvalObjv_TCL_DECLARED +#define Tcl_EvalObjv_TCL_DECLARED +/* 292 */ +EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +#ifndef Tcl_EvalObjEx_TCL_DECLARED +#define Tcl_EvalObjEx_TCL_DECLARED +/* 293 */ +EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_ExitThread_TCL_DECLARED +#define Tcl_ExitThread_TCL_DECLARED +/* 294 */ +EXTERN void Tcl_ExitThread (int status); +#endif +#ifndef Tcl_ExternalToUtf_TCL_DECLARED +#define Tcl_ExternalToUtf_TCL_DECLARED +/* 295 */ +EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, + Tcl_Encoding encoding, CONST char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED +#define Tcl_ExternalToUtfDString_TCL_DECLARED +/* 296 */ +EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, + CONST char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_FinalizeThread_TCL_DECLARED +#define Tcl_FinalizeThread_TCL_DECLARED +/* 297 */ +EXTERN void Tcl_FinalizeThread (void); +#endif +#ifndef Tcl_FinalizeNotifier_TCL_DECLARED +#define Tcl_FinalizeNotifier_TCL_DECLARED +/* 298 */ +EXTERN void Tcl_FinalizeNotifier (ClientData clientData); +#endif +#ifndef Tcl_FreeEncoding_TCL_DECLARED +#define Tcl_FreeEncoding_TCL_DECLARED +/* 299 */ +EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetCurrentThread_TCL_DECLARED +#define Tcl_GetCurrentThread_TCL_DECLARED +/* 300 */ +EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); +#endif +#ifndef Tcl_GetEncoding_TCL_DECLARED +#define Tcl_GetEncoding_TCL_DECLARED +/* 301 */ +EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_GetEncodingName_TCL_DECLARED +#define Tcl_GetEncodingName_TCL_DECLARED +/* 302 */ +EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetEncodingNames_TCL_DECLARED +#define Tcl_GetEncodingNames_TCL_DECLARED +/* 303 */ +EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED +#define Tcl_GetIndexFromObjStruct_TCL_DECLARED +/* 304 */ +EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST VOID * tablePtr, + int offset, CONST char * msg, int flags, + int * indexPtr); +#endif +#ifndef Tcl_GetThreadData_TCL_DECLARED +#define Tcl_GetThreadData_TCL_DECLARED +/* 305 */ +EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, + int size); +#endif +#ifndef Tcl_GetVar2Ex_TCL_DECLARED +#define Tcl_GetVar2Ex_TCL_DECLARED +/* 306 */ +EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags); +#endif +#ifndef Tcl_InitNotifier_TCL_DECLARED +#define Tcl_InitNotifier_TCL_DECLARED +/* 307 */ +EXTERN ClientData Tcl_InitNotifier (void); +#endif +#ifndef Tcl_MutexLock_TCL_DECLARED +#define Tcl_MutexLock_TCL_DECLARED +/* 308 */ +EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_MutexUnlock_TCL_DECLARED +#define Tcl_MutexUnlock_TCL_DECLARED +/* 309 */ +EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_ConditionNotify_TCL_DECLARED +#define Tcl_ConditionNotify_TCL_DECLARED +/* 310 */ +EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_ConditionWait_TCL_DECLARED +#define Tcl_ConditionWait_TCL_DECLARED +/* 311 */ +EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, + Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); +#endif +#ifndef Tcl_NumUtfChars_TCL_DECLARED +#define Tcl_NumUtfChars_TCL_DECLARED +/* 312 */ +EXTERN int Tcl_NumUtfChars (CONST char * src, int length); +#endif +#ifndef Tcl_ReadChars_TCL_DECLARED +#define Tcl_ReadChars_TCL_DECLARED +/* 313 */ +EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, + int charsToRead, int appendFlag); +#endif +#ifndef Tcl_RestoreResult_TCL_DECLARED +#define Tcl_RestoreResult_TCL_DECLARED +/* 314 */ +EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SaveResult_TCL_DECLARED +#define Tcl_SaveResult_TCL_DECLARED +/* 315 */ +EXTERN void Tcl_SaveResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SetSystemEncoding_TCL_DECLARED +#define Tcl_SetSystemEncoding_TCL_DECLARED +/* 316 */ +EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_SetVar2Ex_TCL_DECLARED +#define Tcl_SetVar2Ex_TCL_DECLARED +/* 317 */ +EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + Tcl_Obj * newValuePtr, int flags); +#endif +#ifndef Tcl_ThreadAlert_TCL_DECLARED +#define Tcl_ThreadAlert_TCL_DECLARED +/* 318 */ +EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); +#endif +#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED +#define Tcl_ThreadQueueEvent_TCL_DECLARED +/* 319 */ +EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, + Tcl_Event* evPtr, Tcl_QueuePosition position); +#endif +#ifndef Tcl_UniCharAtIndex_TCL_DECLARED +#define Tcl_UniCharAtIndex_TCL_DECLARED +/* 320 */ +EXTERN Tcl_UniChar Tcl_UniCharAtIndex (CONST char * src, int index); +#endif +#ifndef Tcl_UniCharToLower_TCL_DECLARED +#define Tcl_UniCharToLower_TCL_DECLARED +/* 321 */ +EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); +#endif +#ifndef Tcl_UniCharToTitle_TCL_DECLARED +#define Tcl_UniCharToTitle_TCL_DECLARED +/* 322 */ +EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); +#endif +#ifndef Tcl_UniCharToUpper_TCL_DECLARED +#define Tcl_UniCharToUpper_TCL_DECLARED +/* 323 */ +EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); +#endif +#ifndef Tcl_UniCharToUtf_TCL_DECLARED +#define Tcl_UniCharToUtf_TCL_DECLARED +/* 324 */ +EXTERN int Tcl_UniCharToUtf (int ch, char * buf); +#endif +#ifndef Tcl_UtfAtIndex_TCL_DECLARED +#define Tcl_UtfAtIndex_TCL_DECLARED +/* 325 */ +EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (CONST char * src, int index); +#endif +#ifndef Tcl_UtfCharComplete_TCL_DECLARED +#define Tcl_UtfCharComplete_TCL_DECLARED +/* 326 */ +EXTERN int Tcl_UtfCharComplete (CONST char * src, int length); +#endif +#ifndef Tcl_UtfBackslash_TCL_DECLARED +#define Tcl_UtfBackslash_TCL_DECLARED +/* 327 */ +EXTERN int Tcl_UtfBackslash (CONST char * src, int * readPtr, + char * dst); +#endif +#ifndef Tcl_UtfFindFirst_TCL_DECLARED +#define Tcl_UtfFindFirst_TCL_DECLARED +/* 328 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (CONST char * src, int ch); +#endif +#ifndef Tcl_UtfFindLast_TCL_DECLARED +#define Tcl_UtfFindLast_TCL_DECLARED +/* 329 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindLast (CONST char * src, int ch); +#endif +#ifndef Tcl_UtfNext_TCL_DECLARED +#define Tcl_UtfNext_TCL_DECLARED +/* 330 */ +EXTERN CONST84_RETURN char * Tcl_UtfNext (CONST char * src); +#endif +#ifndef Tcl_UtfPrev_TCL_DECLARED +#define Tcl_UtfPrev_TCL_DECLARED +/* 331 */ +EXTERN CONST84_RETURN char * Tcl_UtfPrev (CONST char * src, + CONST char * start); +#endif +#ifndef Tcl_UtfToExternal_TCL_DECLARED +#define Tcl_UtfToExternal_TCL_DECLARED +/* 332 */ +EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, + Tcl_Encoding encoding, CONST char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_UtfToExternalDString_TCL_DECLARED +#define Tcl_UtfToExternalDString_TCL_DECLARED +/* 333 */ +EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, + CONST char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToLower_TCL_DECLARED +#define Tcl_UtfToLower_TCL_DECLARED +/* 334 */ +EXTERN int Tcl_UtfToLower (char * src); +#endif +#ifndef Tcl_UtfToTitle_TCL_DECLARED +#define Tcl_UtfToTitle_TCL_DECLARED +/* 335 */ +EXTERN int Tcl_UtfToTitle (char * src); +#endif +#ifndef Tcl_UtfToUniChar_TCL_DECLARED +#define Tcl_UtfToUniChar_TCL_DECLARED +/* 336 */ +EXTERN int Tcl_UtfToUniChar (CONST char * src, + Tcl_UniChar * chPtr); +#endif +#ifndef Tcl_UtfToUpper_TCL_DECLARED +#define Tcl_UtfToUpper_TCL_DECLARED +/* 337 */ +EXTERN int Tcl_UtfToUpper (char * src); +#endif +#ifndef Tcl_WriteChars_TCL_DECLARED +#define Tcl_WriteChars_TCL_DECLARED +/* 338 */ +EXTERN int Tcl_WriteChars (Tcl_Channel chan, CONST char * src, + int srcLen); +#endif +#ifndef Tcl_WriteObj_TCL_DECLARED +#define Tcl_WriteObj_TCL_DECLARED +/* 339 */ +EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetString_TCL_DECLARED +#define Tcl_GetString_TCL_DECLARED +/* 340 */ +EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED +#define Tcl_GetDefaultEncodingDir_TCL_DECLARED +/* 341 */ +EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); +#endif +#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED +#define Tcl_SetDefaultEncodingDir_TCL_DECLARED +/* 342 */ +EXTERN void Tcl_SetDefaultEncodingDir (CONST char * path); +#endif +#ifndef Tcl_AlertNotifier_TCL_DECLARED +#define Tcl_AlertNotifier_TCL_DECLARED +/* 343 */ +EXTERN void Tcl_AlertNotifier (ClientData clientData); +#endif +#ifndef Tcl_ServiceModeHook_TCL_DECLARED +#define Tcl_ServiceModeHook_TCL_DECLARED +/* 344 */ +EXTERN void Tcl_ServiceModeHook (int mode); +#endif +#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED +#define Tcl_UniCharIsAlnum_TCL_DECLARED +/* 345 */ +EXTERN int Tcl_UniCharIsAlnum (int ch); +#endif +#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED +#define Tcl_UniCharIsAlpha_TCL_DECLARED +/* 346 */ +EXTERN int Tcl_UniCharIsAlpha (int ch); +#endif +#ifndef Tcl_UniCharIsDigit_TCL_DECLARED +#define Tcl_UniCharIsDigit_TCL_DECLARED +/* 347 */ +EXTERN int Tcl_UniCharIsDigit (int ch); +#endif +#ifndef Tcl_UniCharIsLower_TCL_DECLARED +#define Tcl_UniCharIsLower_TCL_DECLARED +/* 348 */ +EXTERN int Tcl_UniCharIsLower (int ch); +#endif +#ifndef Tcl_UniCharIsSpace_TCL_DECLARED +#define Tcl_UniCharIsSpace_TCL_DECLARED +/* 349 */ +EXTERN int Tcl_UniCharIsSpace (int ch); +#endif +#ifndef Tcl_UniCharIsUpper_TCL_DECLARED +#define Tcl_UniCharIsUpper_TCL_DECLARED +/* 350 */ +EXTERN int Tcl_UniCharIsUpper (int ch); +#endif +#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED +#define Tcl_UniCharIsWordChar_TCL_DECLARED +/* 351 */ +EXTERN int Tcl_UniCharIsWordChar (int ch); +#endif +#ifndef Tcl_UniCharLen_TCL_DECLARED +#define Tcl_UniCharLen_TCL_DECLARED +/* 352 */ +EXTERN int Tcl_UniCharLen (CONST Tcl_UniChar * uniStr); +#endif +#ifndef Tcl_UniCharNcmp_TCL_DECLARED +#define Tcl_UniCharNcmp_TCL_DECLARED +/* 353 */ +EXTERN int Tcl_UniCharNcmp (CONST Tcl_UniChar * ucs, + CONST Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED +#define Tcl_UniCharToUtfDString_TCL_DECLARED +/* 354 */ +EXTERN char * Tcl_UniCharToUtfDString (CONST Tcl_UniChar * uniStr, + int uniLength, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED +#define Tcl_UtfToUniCharDString_TCL_DECLARED +/* 355 */ +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (CONST char * src, + int length, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED +#define Tcl_GetRegExpFromObj_TCL_DECLARED +/* 356 */ +EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, + Tcl_Obj * patObj, int flags); +#endif +#ifndef Tcl_EvalTokens_TCL_DECLARED +#define Tcl_EvalTokens_TCL_DECLARED +/* 357 */ +EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_FreeParse_TCL_DECLARED +#define Tcl_FreeParse_TCL_DECLARED +/* 358 */ +EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_LogCommandInfo_TCL_DECLARED +#define Tcl_LogCommandInfo_TCL_DECLARED +/* 359 */ +EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, + CONST char * script, CONST char * command, + int length); +#endif +#ifndef Tcl_ParseBraces_TCL_DECLARED +#define Tcl_ParseBraces_TCL_DECLARED +/* 360 */ +EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseCommand_TCL_DECLARED +#define Tcl_ParseCommand_TCL_DECLARED +/* 361 */ +EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, + CONST char * start, int numBytes, int nested, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseExpr_TCL_DECLARED +#define Tcl_ParseExpr_TCL_DECLARED +/* 362 */ +EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseQuotedString_TCL_DECLARED +#define Tcl_ParseQuotedString_TCL_DECLARED +/* 363 */ +EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseVarName_TCL_DECLARED +#define Tcl_ParseVarName_TCL_DECLARED +/* 364 */ +EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, + CONST char * start, int numBytes, + Tcl_Parse * parsePtr, int append); +#endif +#ifndef Tcl_GetCwd_TCL_DECLARED +#define Tcl_GetCwd_TCL_DECLARED +/* 365 */ +EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, + Tcl_DString * cwdPtr); +#endif +#ifndef Tcl_Chdir_TCL_DECLARED +#define Tcl_Chdir_TCL_DECLARED +/* 366 */ +EXTERN int Tcl_Chdir (CONST char * dirName); +#endif +#ifndef Tcl_Access_TCL_DECLARED +#define Tcl_Access_TCL_DECLARED +/* 367 */ +EXTERN int Tcl_Access (CONST char * path, int mode); +#endif +#ifndef Tcl_Stat_TCL_DECLARED +#define Tcl_Stat_TCL_DECLARED +/* 368 */ +EXTERN int Tcl_Stat (CONST char * path, struct stat * bufPtr); +#endif +#ifndef Tcl_UtfNcmp_TCL_DECLARED +#define Tcl_UtfNcmp_TCL_DECLARED +/* 369 */ +EXTERN int Tcl_UtfNcmp (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef Tcl_UtfNcasecmp_TCL_DECLARED +#define Tcl_UtfNcasecmp_TCL_DECLARED +/* 370 */ +EXTERN int Tcl_UtfNcasecmp (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef Tcl_StringCaseMatch_TCL_DECLARED +#define Tcl_StringCaseMatch_TCL_DECLARED +/* 371 */ +EXTERN int Tcl_StringCaseMatch (CONST char * str, + CONST char * pattern, int nocase); +#endif +#ifndef Tcl_UniCharIsControl_TCL_DECLARED +#define Tcl_UniCharIsControl_TCL_DECLARED +/* 372 */ +EXTERN int Tcl_UniCharIsControl (int ch); +#endif +#ifndef Tcl_UniCharIsGraph_TCL_DECLARED +#define Tcl_UniCharIsGraph_TCL_DECLARED +/* 373 */ +EXTERN int Tcl_UniCharIsGraph (int ch); +#endif +#ifndef Tcl_UniCharIsPrint_TCL_DECLARED +#define Tcl_UniCharIsPrint_TCL_DECLARED +/* 374 */ +EXTERN int Tcl_UniCharIsPrint (int ch); +#endif +#ifndef Tcl_UniCharIsPunct_TCL_DECLARED +#define Tcl_UniCharIsPunct_TCL_DECLARED +/* 375 */ +EXTERN int Tcl_UniCharIsPunct (int ch); +#endif +#ifndef Tcl_RegExpExecObj_TCL_DECLARED +#define Tcl_RegExpExecObj_TCL_DECLARED +/* 376 */ +EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, + Tcl_RegExp regexp, Tcl_Obj * textObj, + int offset, int nmatches, int flags); +#endif +#ifndef Tcl_RegExpGetInfo_TCL_DECLARED +#define Tcl_RegExpGetInfo_TCL_DECLARED +/* 377 */ +EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, + Tcl_RegExpInfo * infoPtr); +#endif +#ifndef Tcl_NewUnicodeObj_TCL_DECLARED +#define Tcl_NewUnicodeObj_TCL_DECLARED +/* 378 */ +EXTERN Tcl_Obj * Tcl_NewUnicodeObj (CONST Tcl_UniChar * unicode, + int numChars); +#endif +#ifndef Tcl_SetUnicodeObj_TCL_DECLARED +#define Tcl_SetUnicodeObj_TCL_DECLARED +/* 379 */ +EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, + CONST Tcl_UniChar * unicode, int numChars); +#endif +#ifndef Tcl_GetCharLength_TCL_DECLARED +#define Tcl_GetCharLength_TCL_DECLARED +/* 380 */ +EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetUniChar_TCL_DECLARED +#define Tcl_GetUniChar_TCL_DECLARED +/* 381 */ +EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); +#endif +#ifndef Tcl_GetUnicode_TCL_DECLARED +#define Tcl_GetUnicode_TCL_DECLARED +/* 382 */ +EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetRange_TCL_DECLARED +#define Tcl_GetRange_TCL_DECLARED +/* 383 */ +EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); +#endif +#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED +#define Tcl_AppendUnicodeToObj_TCL_DECLARED +/* 384 */ +EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, + CONST Tcl_UniChar * unicode, int length); +#endif +#ifndef Tcl_RegExpMatchObj_TCL_DECLARED +#define Tcl_RegExpMatchObj_TCL_DECLARED +/* 385 */ +EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, + Tcl_Obj * textObj, Tcl_Obj * patternObj); +#endif +#ifndef Tcl_SetNotifier_TCL_DECLARED +#define Tcl_SetNotifier_TCL_DECLARED +/* 386 */ +EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); +#endif +#ifndef Tcl_GetAllocMutex_TCL_DECLARED +#define Tcl_GetAllocMutex_TCL_DECLARED +/* 387 */ +EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); +#endif +#ifndef Tcl_GetChannelNames_TCL_DECLARED +#define Tcl_GetChannelNames_TCL_DECLARED +/* 388 */ +EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED +#define Tcl_GetChannelNamesEx_TCL_DECLARED +/* 389 */ +EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_ProcObjCmd_TCL_DECLARED +#define Tcl_ProcObjCmd_TCL_DECLARED +/* 390 */ +EXTERN int Tcl_ProcObjCmd (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_ConditionFinalize_TCL_DECLARED +#define Tcl_ConditionFinalize_TCL_DECLARED +/* 391 */ +EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_MutexFinalize_TCL_DECLARED +#define Tcl_MutexFinalize_TCL_DECLARED +/* 392 */ +EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); +#endif +#ifndef Tcl_CreateThread_TCL_DECLARED +#define Tcl_CreateThread_TCL_DECLARED +/* 393 */ +EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, + Tcl_ThreadCreateProc proc, + ClientData clientData, int stackSize, + int flags); +#endif +#ifndef Tcl_ReadRaw_TCL_DECLARED +#define Tcl_ReadRaw_TCL_DECLARED +/* 394 */ +EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, + int bytesToRead); +#endif +#ifndef Tcl_WriteRaw_TCL_DECLARED +#define Tcl_WriteRaw_TCL_DECLARED +/* 395 */ +EXTERN int Tcl_WriteRaw (Tcl_Channel chan, CONST char * src, + int srcLen); +#endif +#ifndef Tcl_GetTopChannel_TCL_DECLARED +#define Tcl_GetTopChannel_TCL_DECLARED +/* 396 */ +EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelBuffered_TCL_DECLARED +#define Tcl_ChannelBuffered_TCL_DECLARED +/* 397 */ +EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelName_TCL_DECLARED +#define Tcl_ChannelName_TCL_DECLARED +/* 398 */ +EXTERN CONST84_RETURN char * Tcl_ChannelName ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelVersion_TCL_DECLARED +#define Tcl_ChannelVersion_TCL_DECLARED +/* 399 */ +EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED +#define Tcl_ChannelBlockModeProc_TCL_DECLARED +/* 400 */ +EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelCloseProc_TCL_DECLARED +#define Tcl_ChannelCloseProc_TCL_DECLARED +/* 401 */ +EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED +#define Tcl_ChannelClose2Proc_TCL_DECLARED +/* 402 */ +EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelInputProc_TCL_DECLARED +#define Tcl_ChannelInputProc_TCL_DECLARED +/* 403 */ +EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelOutputProc_TCL_DECLARED +#define Tcl_ChannelOutputProc_TCL_DECLARED +/* 404 */ +EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSeekProc_TCL_DECLARED +#define Tcl_ChannelSeekProc_TCL_DECLARED +/* 405 */ +EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED +#define Tcl_ChannelSetOptionProc_TCL_DECLARED +/* 406 */ +EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED +#define Tcl_ChannelGetOptionProc_TCL_DECLARED +/* 407 */ +EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelWatchProc_TCL_DECLARED +#define Tcl_ChannelWatchProc_TCL_DECLARED +/* 408 */ +EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED +#define Tcl_ChannelGetHandleProc_TCL_DECLARED +/* 409 */ +EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelFlushProc_TCL_DECLARED +#define Tcl_ChannelFlushProc_TCL_DECLARED +/* 410 */ +EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED +#define Tcl_ChannelHandlerProc_TCL_DECLARED +/* 411 */ +EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_JoinThread_TCL_DECLARED +#define Tcl_JoinThread_TCL_DECLARED +/* 412 */ +EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int* result); +#endif +#ifndef Tcl_IsChannelShared_TCL_DECLARED +#define Tcl_IsChannelShared_TCL_DECLARED +/* 413 */ +EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelRegistered_TCL_DECLARED +#define Tcl_IsChannelRegistered_TCL_DECLARED +/* 414 */ +EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_CutChannel_TCL_DECLARED +#define Tcl_CutChannel_TCL_DECLARED +/* 415 */ +EXTERN void Tcl_CutChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_SpliceChannel_TCL_DECLARED +#define Tcl_SpliceChannel_TCL_DECLARED +/* 416 */ +EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED +#define Tcl_ClearChannelHandlers_TCL_DECLARED +/* 417 */ +EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelExisting_TCL_DECLARED +#define Tcl_IsChannelExisting_TCL_DECLARED +/* 418 */ +EXTERN int Tcl_IsChannelExisting (CONST char* channelName); +#endif +#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED +#define Tcl_UniCharNcasecmp_TCL_DECLARED +/* 419 */ +EXTERN int Tcl_UniCharNcasecmp (CONST Tcl_UniChar * ucs, + CONST Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED +#define Tcl_UniCharCaseMatch_TCL_DECLARED +/* 420 */ +EXTERN int Tcl_UniCharCaseMatch (CONST Tcl_UniChar * uniStr, + CONST Tcl_UniChar * uniPattern, int nocase); +#endif +#ifndef Tcl_FindHashEntry_TCL_DECLARED +#define Tcl_FindHashEntry_TCL_DECLARED +/* 421 */ +EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, + CONST char * key); +#endif +#ifndef Tcl_CreateHashEntry_TCL_DECLARED +#define Tcl_CreateHashEntry_TCL_DECLARED +/* 422 */ +EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, + CONST char * key, int * newPtr); +#endif +#ifndef Tcl_InitCustomHashTable_TCL_DECLARED +#define Tcl_InitCustomHashTable_TCL_DECLARED +/* 423 */ +EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, + int keyType, Tcl_HashKeyType * typePtr); +#endif +#ifndef Tcl_InitObjHashTable_TCL_DECLARED +#define Tcl_InitObjHashTable_TCL_DECLARED +/* 424 */ +EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_CommandTraceInfo_TCL_DECLARED +#define Tcl_CommandTraceInfo_TCL_DECLARED +/* 425 */ +EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_TraceCommand_TCL_DECLARED +#define Tcl_TraceCommand_TCL_DECLARED +/* 426 */ +EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceCommand_TCL_DECLARED +#define Tcl_UntraceCommand_TCL_DECLARED +/* 427 */ +EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, + CONST char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AttemptAlloc_TCL_DECLARED +#define Tcl_AttemptAlloc_TCL_DECLARED +/* 428 */ +EXTERN char * Tcl_AttemptAlloc (unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED +#define Tcl_AttemptDbCkalloc_TCL_DECLARED +/* 429 */ +EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, + CONST char * file, int line); +#endif +#ifndef Tcl_AttemptRealloc_TCL_DECLARED +#define Tcl_AttemptRealloc_TCL_DECLARED +/* 430 */ +EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED +#define Tcl_AttemptDbCkrealloc_TCL_DECLARED +/* 431 */ +EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, + unsigned int size, CONST char * file, + int line); +#endif +#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED +#define Tcl_AttemptSetObjLength_TCL_DECLARED +/* 432 */ +EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, + int length); +#endif +#ifndef Tcl_GetChannelThread_TCL_DECLARED +#define Tcl_GetChannelThread_TCL_DECLARED +/* 433 */ +EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); +#endif +#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED +#define Tcl_GetUnicodeFromObj_TCL_DECLARED +/* 434 */ +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED +#define Tcl_GetMathFuncInfo_TCL_DECLARED +/* 435 */ +EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, + CONST char * name, int * numArgsPtr, + Tcl_ValueType ** argTypesPtr, + Tcl_MathProc ** procPtr, + ClientData * clientDataPtr); +#endif +#ifndef Tcl_ListMathFuncs_TCL_DECLARED +#define Tcl_ListMathFuncs_TCL_DECLARED +/* 436 */ +EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, + CONST char * pattern); +#endif +#ifndef Tcl_SubstObj_TCL_DECLARED +#define Tcl_SubstObj_TCL_DECLARED +/* 437 */ +EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_DetachChannel_TCL_DECLARED +#define Tcl_DetachChannel_TCL_DECLARED +/* 438 */ +EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_IsStandardChannel_TCL_DECLARED +#define Tcl_IsStandardChannel_TCL_DECLARED +/* 439 */ +EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_FSCopyFile_TCL_DECLARED +#define Tcl_FSCopyFile_TCL_DECLARED +/* 440 */ +EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSCopyDirectory_TCL_DECLARED +#define Tcl_FSCopyDirectory_TCL_DECLARED +/* 441 */ +EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSCreateDirectory_TCL_DECLARED +#define Tcl_FSCreateDirectory_TCL_DECLARED +/* 442 */ +EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSDeleteFile_TCL_DECLARED +#define Tcl_FSDeleteFile_TCL_DECLARED +/* 443 */ +EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSLoadFile_TCL_DECLARED +#define Tcl_FSLoadFile_TCL_DECLARED +/* 444 */ +EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, + Tcl_Obj * pathPtr, CONST char * sym1, + CONST char * sym2, + Tcl_PackageInitProc ** proc1Ptr, + Tcl_PackageInitProc ** proc2Ptr, + Tcl_LoadHandle * handlePtr, + Tcl_FSUnloadFileProc ** unloadProcPtr); +#endif +#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED +#define Tcl_FSMatchInDirectory_TCL_DECLARED +/* 445 */ +EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, + Tcl_Obj * result, Tcl_Obj * pathPtr, + CONST char * pattern, + Tcl_GlobTypeData * types); +#endif +#ifndef Tcl_FSLink_TCL_DECLARED +#define Tcl_FSLink_TCL_DECLARED +/* 446 */ +EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, + int linkAction); +#endif +#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED +#define Tcl_FSRemoveDirectory_TCL_DECLARED +/* 447 */ +EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, + int recursive, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSRenameFile_TCL_DECLARED +#define Tcl_FSRenameFile_TCL_DECLARED +/* 448 */ +EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSLstat_TCL_DECLARED +#define Tcl_FSLstat_TCL_DECLARED +/* 449 */ +EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSUtime_TCL_DECLARED +#define Tcl_FSUtime_TCL_DECLARED +/* 450 */ +EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, + struct utimbuf * tval); +#endif +#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED +#define Tcl_FSFileAttrsGet_TCL_DECLARED +/* 451 */ +EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED +#define Tcl_FSFileAttrsSet_TCL_DECLARED +/* 452 */ +EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED +#define Tcl_FSFileAttrStrings_TCL_DECLARED +/* 453 */ +EXTERN CONST char ** Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, + Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSStat_TCL_DECLARED +#define Tcl_FSStat_TCL_DECLARED +/* 454 */ +EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSAccess_TCL_DECLARED +#define Tcl_FSAccess_TCL_DECLARED +/* 455 */ +EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); +#endif +#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED +#define Tcl_FSOpenFileChannel_TCL_DECLARED +/* 456 */ +EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, CONST char * modeString, + int permissions); +#endif +#ifndef Tcl_FSGetCwd_TCL_DECLARED +#define Tcl_FSGetCwd_TCL_DECLARED +/* 457 */ +EXTERN Tcl_Obj* Tcl_FSGetCwd (Tcl_Interp * interp); +#endif +#ifndef Tcl_FSChdir_TCL_DECLARED +#define Tcl_FSChdir_TCL_DECLARED +/* 458 */ +EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSConvertToPathType_TCL_DECLARED +#define Tcl_FSConvertToPathType_TCL_DECLARED +/* 459 */ +EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSJoinPath_TCL_DECLARED +#define Tcl_FSJoinPath_TCL_DECLARED +/* 460 */ +EXTERN Tcl_Obj* Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); +#endif +#ifndef Tcl_FSSplitPath_TCL_DECLARED +#define Tcl_FSSplitPath_TCL_DECLARED +/* 461 */ +EXTERN Tcl_Obj* Tcl_FSSplitPath (Tcl_Obj* pathPtr, int * lenPtr); +#endif +#ifndef Tcl_FSEqualPaths_TCL_DECLARED +#define Tcl_FSEqualPaths_TCL_DECLARED +/* 462 */ +EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, + Tcl_Obj* secondPtr); +#endif +#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED +#define Tcl_FSGetNormalizedPath_TCL_DECLARED +/* 463 */ +EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSJoinToPath_TCL_DECLARED +#define Tcl_FSJoinToPath_TCL_DECLARED +/* 464 */ +EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_FSGetInternalRep_TCL_DECLARED +#define Tcl_FSGetInternalRep_TCL_DECLARED +/* 465 */ +EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, + Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED +#define Tcl_FSGetTranslatedPath_TCL_DECLARED +/* 466 */ +EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSEvalFile_TCL_DECLARED +#define Tcl_FSEvalFile_TCL_DECLARED +/* 467 */ +EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, + Tcl_Obj * fileName); +#endif +#ifndef Tcl_FSNewNativePath_TCL_DECLARED +#define Tcl_FSNewNativePath_TCL_DECLARED +/* 468 */ +EXTERN Tcl_Obj* Tcl_FSNewNativePath (Tcl_Filesystem* fromFilesystem, + ClientData clientData); +#endif +#ifndef Tcl_FSGetNativePath_TCL_DECLARED +#define Tcl_FSGetNativePath_TCL_DECLARED +/* 469 */ +EXTERN CONST char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED +#define Tcl_FSFileSystemInfo_TCL_DECLARED +/* 470 */ +EXTERN Tcl_Obj* Tcl_FSFileSystemInfo (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSPathSeparator_TCL_DECLARED +#define Tcl_FSPathSeparator_TCL_DECLARED +/* 471 */ +EXTERN Tcl_Obj* Tcl_FSPathSeparator (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSListVolumes_TCL_DECLARED +#define Tcl_FSListVolumes_TCL_DECLARED +/* 472 */ +EXTERN Tcl_Obj* Tcl_FSListVolumes (void); +#endif +#ifndef Tcl_FSRegister_TCL_DECLARED +#define Tcl_FSRegister_TCL_DECLARED +/* 473 */ +EXTERN int Tcl_FSRegister (ClientData clientData, + Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSUnregister_TCL_DECLARED +#define Tcl_FSUnregister_TCL_DECLARED +/* 474 */ +EXTERN int Tcl_FSUnregister (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSData_TCL_DECLARED +#define Tcl_FSData_TCL_DECLARED +/* 475 */ +EXTERN ClientData Tcl_FSData (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED +#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED +/* 476 */ +EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, + Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED +#define Tcl_FSGetFileSystemForPath_TCL_DECLARED +/* 477 */ +EXTERN Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); +#endif +#ifndef Tcl_FSGetPathType_TCL_DECLARED +#define Tcl_FSGetPathType_TCL_DECLARED +/* 478 */ +EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_OutputBuffered_TCL_DECLARED +#define Tcl_OutputBuffered_TCL_DECLARED +/* 479 */ +EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_FSMountsChanged_TCL_DECLARED +#define Tcl_FSMountsChanged_TCL_DECLARED +/* 480 */ +EXTERN void Tcl_FSMountsChanged (Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_EvalTokensStandard_TCL_DECLARED +#define Tcl_EvalTokensStandard_TCL_DECLARED +/* 481 */ +EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_GetTime_TCL_DECLARED +#define Tcl_GetTime_TCL_DECLARED +/* 482 */ +EXTERN void Tcl_GetTime (Tcl_Time* timeBuf); +#endif +#ifndef Tcl_CreateObjTrace_TCL_DECLARED +#define Tcl_CreateObjTrace_TCL_DECLARED +/* 483 */ +EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, + int flags, Tcl_CmdObjTraceProc* objProc, + ClientData clientData, + Tcl_CmdObjTraceDeleteProc* delProc); +#endif +#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED +#define Tcl_GetCommandInfoFromToken_TCL_DECLARED +/* 484 */ +EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, + Tcl_CmdInfo* infoPtr); +#endif +#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED +#define Tcl_SetCommandInfoFromToken_TCL_DECLARED +/* 485 */ +EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, + CONST Tcl_CmdInfo* infoPtr); +#endif +#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED +#define Tcl_DbNewWideIntObj_TCL_DECLARED +/* 486 */ +EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, + CONST char * file, int line); +#endif +#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED +#define Tcl_GetWideIntFromObj_TCL_DECLARED +/* 487 */ +EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_WideInt * widePtr); +#endif +#ifndef Tcl_NewWideIntObj_TCL_DECLARED +#define Tcl_NewWideIntObj_TCL_DECLARED +/* 488 */ +EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); +#endif +#ifndef Tcl_SetWideIntObj_TCL_DECLARED +#define Tcl_SetWideIntObj_TCL_DECLARED +/* 489 */ +EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, + Tcl_WideInt wideValue); +#endif +#ifndef Tcl_AllocStatBuf_TCL_DECLARED +#define Tcl_AllocStatBuf_TCL_DECLARED +/* 490 */ +EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); +#endif +#ifndef Tcl_Seek_TCL_DECLARED +#define Tcl_Seek_TCL_DECLARED +/* 491 */ +EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, + int mode); +#endif +#ifndef Tcl_Tell_TCL_DECLARED +#define Tcl_Tell_TCL_DECLARED +/* 492 */ +EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED +#define Tcl_ChannelWideSeekProc_TCL_DECLARED +/* 493 */ +EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_DictObjPut_TCL_DECLARED +#define Tcl_DictObjPut_TCL_DECLARED +/* 494 */ +EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjGet_TCL_DECLARED +#define Tcl_DictObjGet_TCL_DECLARED +/* 495 */ +EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj ** valuePtrPtr); +#endif +#ifndef Tcl_DictObjRemove_TCL_DECLARED +#define Tcl_DictObjRemove_TCL_DECLARED +/* 496 */ +EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); +#endif +#ifndef Tcl_DictObjSize_TCL_DECLARED +#define Tcl_DictObjSize_TCL_DECLARED +/* 497 */ +EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int * sizePtr); +#endif +#ifndef Tcl_DictObjFirst_TCL_DECLARED +#define Tcl_DictObjFirst_TCL_DECLARED +/* 498 */ +EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, + Tcl_Obj * dictPtr, + Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjNext_TCL_DECLARED +#define Tcl_DictObjNext_TCL_DECLARED +/* 499 */ +EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjDone_TCL_DECLARED +#define Tcl_DictObjDone_TCL_DECLARED +/* 500 */ +EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); +#endif +#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED +#define Tcl_DictObjPutKeyList_TCL_DECLARED +/* 501 */ +EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED +#define Tcl_DictObjRemoveKeyList_TCL_DECLARED +/* 502 */ +EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *CONST * keyv); +#endif +#ifndef Tcl_NewDictObj_TCL_DECLARED +#define Tcl_NewDictObj_TCL_DECLARED +/* 503 */ +EXTERN Tcl_Obj * Tcl_NewDictObj (void); +#endif +#ifndef Tcl_DbNewDictObj_TCL_DECLARED +#define Tcl_DbNewDictObj_TCL_DECLARED +/* 504 */ +EXTERN Tcl_Obj * Tcl_DbNewDictObj (CONST char * file, int line); +#endif +#ifndef Tcl_RegisterConfig_TCL_DECLARED +#define Tcl_RegisterConfig_TCL_DECLARED +/* 505 */ +EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, + CONST char* pkgName, + Tcl_Config* configuration, + CONST char* valEncoding); +#endif +#ifndef Tcl_CreateNamespace_TCL_DECLARED +#define Tcl_CreateNamespace_TCL_DECLARED +/* 506 */ +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + CONST char * name, ClientData clientData, + Tcl_NamespaceDeleteProc * deleteProc); +#endif +#ifndef Tcl_DeleteNamespace_TCL_DECLARED +#define Tcl_DeleteNamespace_TCL_DECLARED +/* 507 */ +EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_AppendExportList_TCL_DECLARED +#define Tcl_AppendExportList_TCL_DECLARED +/* 508 */ +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_Export_TCL_DECLARED +#define Tcl_Export_TCL_DECLARED +/* 509 */ +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int resetListFirst); +#endif +#ifndef Tcl_Import_TCL_DECLARED +#define Tcl_Import_TCL_DECLARED +/* 510 */ +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int allowOverwrite); +#endif +#ifndef Tcl_ForgetImport_TCL_DECLARED +#define Tcl_ForgetImport_TCL_DECLARED +/* 511 */ +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern); +#endif +#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED +#define Tcl_GetCurrentNamespace_TCL_DECLARED +/* 512 */ +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED +#define Tcl_GetGlobalNamespace_TCL_DECLARED +/* 513 */ +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_FindNamespace_TCL_DECLARED +#define Tcl_FindNamespace_TCL_DECLARED +/* 514 */ +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_FindCommand_TCL_DECLARED +#define Tcl_FindCommand_TCL_DECLARED +/* 515 */ +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_GetCommandFromObj_TCL_DECLARED +#define Tcl_GetCommandFromObj_TCL_DECLARED +/* 516 */ +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCommandFullName_TCL_DECLARED +#define Tcl_GetCommandFullName_TCL_DECLARED +/* 517 */ +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, + Tcl_Command command, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSEvalFileEx_TCL_DECLARED +#define Tcl_FSEvalFileEx_TCL_DECLARED +/* 518 */ +EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, + Tcl_Obj * fileName, + CONST char * encodingName); +#endif +#ifndef Tcl_SetExitProc_TCL_DECLARED +#define Tcl_SetExitProc_TCL_DECLARED +/* 519 */ +EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); +#endif +#ifndef Tcl_LimitAddHandler_TCL_DECLARED +#define Tcl_LimitAddHandler_TCL_DECLARED +/* 520 */ +EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, + Tcl_LimitHandlerProc * handlerProc, + ClientData clientData, + Tcl_LimitHandlerDeleteProc * deleteProc); +#endif +#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED +#define Tcl_LimitRemoveHandler_TCL_DECLARED +/* 521 */ +EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, + int type, Tcl_LimitHandlerProc * handlerProc, + ClientData clientData); +#endif +#ifndef Tcl_LimitReady_TCL_DECLARED +#define Tcl_LimitReady_TCL_DECLARED +/* 522 */ +EXTERN int Tcl_LimitReady (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitCheck_TCL_DECLARED +#define Tcl_LimitCheck_TCL_DECLARED +/* 523 */ +EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitExceeded_TCL_DECLARED +#define Tcl_LimitExceeded_TCL_DECLARED +/* 524 */ +EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitSetCommands_TCL_DECLARED +#define Tcl_LimitSetCommands_TCL_DECLARED +/* 525 */ +EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, + int commandLimit); +#endif +#ifndef Tcl_LimitSetTime_TCL_DECLARED +#define Tcl_LimitSetTime_TCL_DECLARED +/* 526 */ +EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitSetGranularity_TCL_DECLARED +#define Tcl_LimitSetGranularity_TCL_DECLARED +/* 527 */ +EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, + int type, int granularity); +#endif +#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED +#define Tcl_LimitTypeEnabled_TCL_DECLARED +/* 528 */ +EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED +#define Tcl_LimitTypeExceeded_TCL_DECLARED +/* 529 */ +EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeSet_TCL_DECLARED +#define Tcl_LimitTypeSet_TCL_DECLARED +/* 530 */ +EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeReset_TCL_DECLARED +#define Tcl_LimitTypeReset_TCL_DECLARED +/* 531 */ +EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitGetCommands_TCL_DECLARED +#define Tcl_LimitGetCommands_TCL_DECLARED +/* 532 */ +EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitGetTime_TCL_DECLARED +#define Tcl_LimitGetTime_TCL_DECLARED +/* 533 */ +EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitGetGranularity_TCL_DECLARED +#define Tcl_LimitGetGranularity_TCL_DECLARED +/* 534 */ +EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, + int type); +#endif +#ifndef Tcl_SaveInterpState_TCL_DECLARED +#define Tcl_SaveInterpState_TCL_DECLARED +/* 535 */ +EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); +#endif +#ifndef Tcl_RestoreInterpState_TCL_DECLARED +#define Tcl_RestoreInterpState_TCL_DECLARED +/* 536 */ +EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, + Tcl_InterpState state); +#endif +#ifndef Tcl_DiscardInterpState_TCL_DECLARED +#define Tcl_DiscardInterpState_TCL_DECLARED +/* 537 */ +EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); +#endif +#ifndef Tcl_SetReturnOptions_TCL_DECLARED +#define Tcl_SetReturnOptions_TCL_DECLARED +/* 538 */ +EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, + Tcl_Obj * options); +#endif +#ifndef Tcl_GetReturnOptions_TCL_DECLARED +#define Tcl_GetReturnOptions_TCL_DECLARED +/* 539 */ +EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, + int result); +#endif +#ifndef Tcl_IsEnsemble_TCL_DECLARED +#define Tcl_IsEnsemble_TCL_DECLARED +/* 540 */ +EXTERN int Tcl_IsEnsemble (Tcl_Command token); +#endif +#ifndef Tcl_CreateEnsemble_TCL_DECLARED +#define Tcl_CreateEnsemble_TCL_DECLARED +/* 541 */ +EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * namespacePtr, int flags); +#endif +#ifndef Tcl_FindEnsemble_TCL_DECLARED +#define Tcl_FindEnsemble_TCL_DECLARED +/* 542 */ +EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, + Tcl_Obj * cmdNameObj, int flags); +#endif +#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED +/* 543 */ +EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * subcmdList); +#endif +#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED +#define Tcl_SetEnsembleMappingDict_TCL_DECLARED +/* 544 */ +EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * mapDict); +#endif +#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +/* 545 */ +EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * unknownList); +#endif +#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED +#define Tcl_SetEnsembleFlags_TCL_DECLARED +/* 546 */ +EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int flags); +#endif +#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED +/* 547 */ +EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** subcmdListPtr); +#endif +#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED +#define Tcl_GetEnsembleMappingDict_TCL_DECLARED +/* 548 */ +EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** mapDictPtr); +#endif +#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +/* 549 */ +EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** unknownListPtr); +#endif +#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED +#define Tcl_GetEnsembleFlags_TCL_DECLARED +/* 550 */ +EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int * flagsPtr); +#endif +#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED +#define Tcl_GetEnsembleNamespace_TCL_DECLARED +/* 551 */ +EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, + Tcl_Command token, + Tcl_Namespace ** namespacePtrPtr); +#endif +#ifndef Tcl_SetTimeProc_TCL_DECLARED +#define Tcl_SetTimeProc_TCL_DECLARED +/* 552 */ +EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, + Tcl_ScaleTimeProc* scaleProc, + ClientData clientData); +#endif +#ifndef Tcl_QueryTimeProc_TCL_DECLARED +#define Tcl_QueryTimeProc_TCL_DECLARED +/* 553 */ +EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, + Tcl_ScaleTimeProc** scaleProc, + ClientData* clientData); +#endif +#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED +#define Tcl_ChannelThreadActionProc_TCL_DECLARED +/* 554 */ +EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_NewBignumObj_TCL_DECLARED +#define Tcl_NewBignumObj_TCL_DECLARED +/* 555 */ +EXTERN Tcl_Obj* Tcl_NewBignumObj (mp_int* value); +#endif +#ifndef Tcl_DbNewBignumObj_TCL_DECLARED +#define Tcl_DbNewBignumObj_TCL_DECLARED +/* 556 */ +EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, CONST char* file, + int line); +#endif +#ifndef Tcl_SetBignumObj_TCL_DECLARED +#define Tcl_SetBignumObj_TCL_DECLARED +/* 557 */ +EXTERN void Tcl_SetBignumObj (Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_GetBignumFromObj_TCL_DECLARED +#define Tcl_GetBignumFromObj_TCL_DECLARED +/* 558 */ +EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, + Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED +#define Tcl_TakeBignumFromObj_TCL_DECLARED +/* 559 */ +EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, + Tcl_Obj* obj, mp_int* value); +#endif +#ifndef Tcl_TruncateChannel_TCL_DECLARED +#define Tcl_TruncateChannel_TCL_DECLARED +/* 560 */ +EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, + Tcl_WideInt length); +#endif +#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED +#define Tcl_ChannelTruncateProc_TCL_DECLARED +/* 561 */ +EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( + CONST Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED +#define Tcl_SetChannelErrorInterp_TCL_DECLARED +/* 562 */ +EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, + Tcl_Obj* msg); +#endif +#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED +#define Tcl_GetChannelErrorInterp_TCL_DECLARED +/* 563 */ +EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, + Tcl_Obj** msg); +#endif +#ifndef Tcl_SetChannelError_TCL_DECLARED +#define Tcl_SetChannelError_TCL_DECLARED +/* 564 */ +EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj* msg); +#endif +#ifndef Tcl_GetChannelError_TCL_DECLARED +#define Tcl_GetChannelError_TCL_DECLARED +/* 565 */ +EXTERN void Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj** msg); +#endif +#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED +#define Tcl_InitBignumFromDouble_TCL_DECLARED +/* 566 */ +EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, + double initval, mp_int * toInit); +#endif +#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +/* 567 */ +EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +/* 568 */ +EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); +#endif +#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED +#define Tcl_GetEncodingFromObj_TCL_DECLARED +/* 569 */ +EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, + Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); +#endif +#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED +#define Tcl_GetEncodingSearchPath_TCL_DECLARED +/* 570 */ +EXTERN Tcl_Obj* Tcl_GetEncodingSearchPath (void); +#endif +#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED +#define Tcl_SetEncodingSearchPath_TCL_DECLARED +/* 571 */ +EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj* searchPath); +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +/* 572 */ +EXTERN CONST char * Tcl_GetEncodingNameFromEnvironment ( + Tcl_DString* bufPtr); +#endif +#ifndef Tcl_PkgRequireProc_TCL_DECLARED +#define Tcl_PkgRequireProc_TCL_DECLARED +/* 573 */ +EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, + CONST char * name, int objc, + Tcl_Obj *CONST objv[], + ClientData * clientDataPtr); +#endif +#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED +#define Tcl_AppendObjToErrorInfo_TCL_DECLARED +/* 574 */ +EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED +#define Tcl_AppendLimitedToObj_TCL_DECLARED +/* 575 */ +EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, + CONST char * bytes, int length, int limit, + CONST char * ellipsis); +#endif +#ifndef Tcl_Format_TCL_DECLARED +#define Tcl_Format_TCL_DECLARED +/* 576 */ +EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, CONST char * format, + int objc, Tcl_Obj * CONST objv[]); +#endif +#ifndef Tcl_AppendFormatToObj_TCL_DECLARED +#define Tcl_AppendFormatToObj_TCL_DECLARED +/* 577 */ +EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, CONST char * format, + int objc, Tcl_Obj * CONST objv[]); +#endif +#ifndef Tcl_ObjPrintf_TCL_DECLARED +#define Tcl_ObjPrintf_TCL_DECLARED +/* 578 */ +EXTERN Tcl_Obj * Tcl_ObjPrintf (CONST char * format, ...); +#endif +#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED +#define Tcl_AppendPrintfToObj_TCL_DECLARED +/* 579 */ +EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, + CONST char * format, ...); +#endif +#ifndef Tcl_CancelEval_TCL_DECLARED +#define Tcl_CancelEval_TCL_DECLARED +/* 580 */ +EXTERN int Tcl_CancelEval (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr, + ClientData clientData, int flags); +#endif +#ifndef Tcl_Canceled_TCL_DECLARED +#define Tcl_Canceled_TCL_DECLARED +/* 581 */ +EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); +#endif +#ifndef Tcl_NRCreateCommand_TCL_DECLARED +#define Tcl_NRCreateCommand_TCL_DECLARED +/* 582 */ +EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, + CONST char * cmdName, Tcl_ObjCmdProc * proc, + Tcl_ObjCmdProc * nreProc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_NREvalObj_TCL_DECLARED +#define Tcl_NREvalObj_TCL_DECLARED +/* 583 */ +EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_NREvalObjv_TCL_DECLARED +#define Tcl_NREvalObjv_TCL_DECLARED +/* 584 */ +EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +#ifndef Tcl_NRCmdSwap_TCL_DECLARED +#define Tcl_NRCmdSwap_TCL_DECLARED +/* 585 */ +EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef Tcl_NRAddCallback_TCL_DECLARED +#define Tcl_NRAddCallback_TCL_DECLARED +/* 586 */ +EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, + Tcl_NRPostProc * postProcPtr, + ClientData data0, ClientData data1, + ClientData data2, ClientData data3); +#endif +#ifndef Tcl_NRCallObjProc_TCL_DECLARED +#define Tcl_NRCallObjProc_TCL_DECLARED +/* 587 */ +EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, + Tcl_ObjCmdProc * objProc, + ClientData clientData, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_CreatePipe_TCL_DECLARED +#define Tcl_CreatePipe_TCL_DECLARED +/* 588 */ +EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, + Tcl_Channel * rchan, Tcl_Channel * wchan, + int flags); +#endif + +typedef struct TclStubHooks { + CONST struct TclPlatStubs *tclPlatStubs; + CONST struct TclIntStubs *tclIntStubs; + CONST struct TclIntPlatStubs *tclIntPlatStubs; +} TclStubHooks; + +typedef struct TclStubs { + int magic; + CONST struct TclStubHooks *hooks; + + int (*tcl_PkgProvideEx) (Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData); /* 0 */ + CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 1 */ + void (*tcl_Panic) (CONST char * format, ...); /* 2 */ + char * (*tcl_Alloc) (unsigned int size); /* 3 */ + void (*tcl_Free) (char * ptr); /* 4 */ + char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ + char * (*tcl_DbCkalloc) (unsigned int size, CONST char * file, int line); /* 6 */ + int (*tcl_DbCkfree) (char * ptr, CONST char * file, int line); /* 7 */ + char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved9; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved10; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* MACOSX */ + void (*tcl_SetTimer) (Tcl_Time * timePtr); /* 11 */ + void (*tcl_Sleep) (int ms); /* 12 */ + int (*tcl_WaitForEvent) (Tcl_Time * timePtr); /* 13 */ + int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ + void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ + void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ + Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr); /* 18 */ + void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ + void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ + int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ + Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, CONST char * file, int line); /* 22 */ + Tcl_Obj * (*tcl_DbNewByteArrayObj) (CONST unsigned char * bytes, int length, CONST char * file, int line); /* 23 */ + Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, CONST char * file, int line); /* 24 */ + Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *CONST * objv, CONST char * file, int line); /* 25 */ + Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, CONST char * file, int line); /* 26 */ + Tcl_Obj * (*tcl_DbNewObj) (CONST char * file, int line); /* 27 */ + Tcl_Obj * (*tcl_DbNewStringObj) (CONST char * bytes, int length, CONST char * file, int line); /* 28 */ + Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ + void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ + int (*tcl_GetBoolean) (Tcl_Interp * interp, CONST char * src, int * boolPtr); /* 31 */ + int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ + unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ + int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ + int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ + int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ + int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ + Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ + char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ + void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ + int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ + int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ + int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ + int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ + int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ + int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[]); /* 48 */ + Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (CONST unsigned char* bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ + Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ + Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *CONST objv[]); /* 53 */ + Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ + Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ + Tcl_Obj * (*tcl_NewStringObj) (CONST char * bytes, int length); /* 56 */ + void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ + unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ + void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, CONST unsigned char * bytes, int length); /* 59 */ + void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ + void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ + void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[]); /* 62 */ + void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ + void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ + void (*tcl_SetStringObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 65 */ + void (*tcl_AddErrorInfo) (Tcl_Interp * interp, CONST char * message); /* 66 */ + void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, CONST char * message, int length); /* 67 */ + void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ + void (*tcl_AppendElement) (Tcl_Interp * interp, CONST char * element); /* 69 */ + void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ + Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ + void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ + int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ + void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ + int (*tcl_AsyncReady) (void); /* 75 */ + void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ + char (*tcl_Backslash) (CONST char * src, int * readPtr); /* 77 */ + int (*tcl_BadChannelOption) (Tcl_Interp * interp, CONST char * optionName, CONST char * optionList); /* 78 */ + void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ + void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ + int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ + int (*tcl_CommandComplete) (CONST char * cmd); /* 82 */ + char * (*tcl_Concat) (int argc, CONST84 char * CONST * argv); /* 83 */ + int (*tcl_ConvertElement) (CONST char * src, char * dst, int flags); /* 84 */ + int (*tcl_ConvertCountedElement) (CONST char * src, int length, char * dst, int flags); /* 85 */ + int (*tcl_CreateAlias) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * argv); /* 86 */ + int (*tcl_CreateAliasObj) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[]); /* 87 */ + Tcl_Channel (*tcl_CreateChannel) (Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ + void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ + void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ + Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ + void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ + void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ + Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ + void (*tcl_CreateMathFunc) (Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ + Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ + Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, CONST char * slaveName, int isSafe); /* 97 */ + Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ + Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ + void (*tcl_DeleteAssocData) (Tcl_Interp * interp, CONST char * name); /* 100 */ + void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ + void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ + int (*tcl_DeleteCommand) (Tcl_Interp * interp, CONST char * cmdName); /* 103 */ + int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ + void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ + void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ + void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ + void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ + void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ + void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* MACOSX */ + void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ + void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ + void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ + int (*tcl_DoOneEvent) (int flags); /* 115 */ + void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ + char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, CONST char * bytes, int length); /* 117 */ + char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, CONST char * element); /* 118 */ + void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ + void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ + void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ + void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ + void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ + void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ + void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ + int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ + CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ + CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ + int (*tcl_Eval) (Tcl_Interp * interp, CONST char * script); /* 129 */ + int (*tcl_EvalFile) (Tcl_Interp * interp, CONST char * fileName); /* 130 */ + int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ + void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ + void (*tcl_Exit) (int status); /* 133 */ + int (*tcl_ExposeCommand) (Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName); /* 134 */ + int (*tcl_ExprBoolean) (Tcl_Interp * interp, CONST char * expr, int * ptr); /* 135 */ + int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ + int (*tcl_ExprDouble) (Tcl_Interp * interp, CONST char * expr, double * ptr); /* 137 */ + int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ + int (*tcl_ExprLong) (Tcl_Interp * interp, CONST char * expr, long * ptr); /* 139 */ + int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ + int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ + int (*tcl_ExprString) (Tcl_Interp * interp, CONST char * expr); /* 142 */ + void (*tcl_Finalize) (void); /* 143 */ + void (*tcl_FindExecutable) (CONST char * argv0); /* 144 */ + Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ + int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ + void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ + int (*tcl_GetAlias) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ + int (*tcl_GetAliasObj) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ + ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ + Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, CONST char * chanName, int * modePtr); /* 151 */ + int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ + int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ + ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ + int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ + CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ + int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr); /* 157 */ + Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ + int (*tcl_GetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ + CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ + int (*tcl_GetErrno) (void); /* 161 */ + CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ + int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ + Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ + CONST char * (*tcl_GetNameOfExecutable) (void); /* 165 */ + Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved167; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* MACOSX */ + Tcl_PathType (*tcl_GetPathType) (CONST char * path); /* 168 */ + int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ + int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ + int (*tcl_GetServiceMode) (void); /* 171 */ + Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, CONST char * slaveName); /* 172 */ + Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ + CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ + CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 175 */ + CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 176 */ + int (*tcl_GlobalEval) (Tcl_Interp * interp, CONST char * command); /* 177 */ + int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ + int (*tcl_HideCommand) (Tcl_Interp * interp, CONST char * cmdName, CONST char * hiddenCmdToken); /* 179 */ + int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ + void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ + int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ + int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ + int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ + int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ + char * (*tcl_JoinPath) (int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr); /* 186 */ + int (*tcl_LinkVar) (Tcl_Interp * interp, CONST char * varName, char * addr, int type); /* 187 */ + void *reserved188; + Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ + int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ + Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ + char * (*tcl_Merge) (int argc, CONST84 char * CONST * argv); /* 192 */ + Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ + void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ + Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ + Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* MACOSX */ + Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions); /* 198 */ + Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async); /* 199 */ + Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ + void (*tcl_Preserve) (ClientData data); /* 201 */ + void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ + int (*tcl_PutEnv) (CONST char * assignment); /* 203 */ + CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ + void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ + int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* MACOSX */ + int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ + int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ + void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ + void (*tcl_RegisterObjType) (Tcl_ObjType * typePtr); /* 211 */ + Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ + int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ + int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ + void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ + void (*tcl_Release) (ClientData clientData); /* 216 */ + void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ + int (*tcl_ScanElement) (CONST char * str, int * flagPtr); /* 218 */ + int (*tcl_ScanCountedElement) (CONST char * str, int length, int * flagPtr); /* 219 */ + int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ + int (*tcl_ServiceAll) (void); /* 221 */ + int (*tcl_ServiceEvent) (int flags); /* 222 */ + void (*tcl_SetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ + void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ + int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, CONST char * newValue); /* 225 */ + int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ + void (*tcl_SetErrno) (int err); /* 227 */ + void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ + void (*tcl_SetMaxBlockTime) (Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ + int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ + void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ + int (*tcl_SetServiceMode) (int mode); /* 233 */ + void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ + void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ + void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ + CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, CONST char * varName, CONST char * newValue, int flags); /* 237 */ + CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * newValue, int flags); /* 238 */ + CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ + CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ + void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ + int (*tcl_SplitList) (Tcl_Interp * interp, CONST char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ + void (*tcl_SplitPath) (CONST char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ + void (*tcl_StaticPackage) (Tcl_Interp * interp, CONST char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ + int (*tcl_StringMatch) (CONST char * str, CONST char * pattern); /* 245 */ + int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ + int (*tcl_TraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ + int (*tcl_TraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ + char * (*tcl_TranslateFileName) (Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr); /* 249 */ + int (*tcl_Ungets) (Tcl_Channel chan, CONST char * str, int len, int atHead); /* 250 */ + void (*tcl_UnlinkVar) (Tcl_Interp * interp, CONST char * varName); /* 251 */ + int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ + int (*tcl_UnsetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 253 */ + int (*tcl_UnsetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 254 */ + void (*tcl_UntraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ + void (*tcl_UntraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ + void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, CONST char * varName); /* 257 */ + int (*tcl_UpVar) (Tcl_Interp * interp, CONST char * frameName, CONST char * varName, CONST char * localName, int flags); /* 258 */ + int (*tcl_UpVar2) (Tcl_Interp * interp, CONST char * frameName, CONST char * part1, CONST char * part2, CONST char * localName, int flags); /* 259 */ + int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ + ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ + ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ + int (*tcl_Write) (Tcl_Channel chan, CONST char * s, int slen); /* 263 */ + void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message); /* 264 */ + int (*tcl_DumpActiveMemory) (CONST char * fileName); /* 265 */ + void (*tcl_ValidateAllMemory) (CONST char * file, int line); /* 266 */ + void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ + void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ + CONST84_RETURN char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ + CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, CONST char * start, CONST84 char ** termPtr); /* 270 */ + CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 271 */ + CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 272 */ + int (*tcl_PkgProvide) (Tcl_Interp * interp, CONST char * name, CONST char * version); /* 273 */ + CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 274 */ + void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ + int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ + Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ + void (*tcl_PanicVA) (CONST char * format, va_list argList); /* 278 */ + void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ + void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ + Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ + void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ + void *reserved285; + void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ + Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ + void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ + void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ + void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ + int (*tcl_EvalEx) (Tcl_Interp * interp, CONST char * script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 292 */ + int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ + void (*tcl_ExitThread) (int status); /* 294 */ + int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ + char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ + void (*tcl_FinalizeThread) (void); /* 297 */ + void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ + void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ + Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ + Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, CONST char * name); /* 301 */ + CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ + void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr); /* 304 */ + VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ + Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 306 */ + ClientData (*tcl_InitNotifier) (void); /* 307 */ + void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ + void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ + void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); /* 311 */ + int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ + int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ + void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ + void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ + int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, CONST char * name); /* 316 */ + Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ + void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ + void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); /* 319 */ + Tcl_UniChar (*tcl_UniCharAtIndex) (CONST char * src, int index); /* 320 */ + Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ + Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ + Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ + int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ + CONST84_RETURN char * (*tcl_UtfAtIndex) (CONST char * src, int index); /* 325 */ + int (*tcl_UtfCharComplete) (CONST char * src, int length); /* 326 */ + int (*tcl_UtfBackslash) (CONST char * src, int * readPtr, char * dst); /* 327 */ + CONST84_RETURN char * (*tcl_UtfFindFirst) (CONST char * src, int ch); /* 328 */ + CONST84_RETURN char * (*tcl_UtfFindLast) (CONST char * src, int ch); /* 329 */ + CONST84_RETURN char * (*tcl_UtfNext) (CONST char * src); /* 330 */ + CONST84_RETURN char * (*tcl_UtfPrev) (CONST char * src, CONST char * start); /* 331 */ + int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ + char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ + int (*tcl_UtfToLower) (char * src); /* 334 */ + int (*tcl_UtfToTitle) (char * src); /* 335 */ + int (*tcl_UtfToUniChar) (CONST char * src, Tcl_UniChar * chPtr); /* 336 */ + int (*tcl_UtfToUpper) (char * src); /* 337 */ + int (*tcl_WriteChars) (Tcl_Channel chan, CONST char * src, int srcLen); /* 338 */ + int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ + char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ + CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ + void (*tcl_SetDefaultEncodingDir) (CONST char * path); /* 342 */ + void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ + void (*tcl_ServiceModeHook) (int mode); /* 344 */ + int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ + int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ + int (*tcl_UniCharIsDigit) (int ch); /* 347 */ + int (*tcl_UniCharIsLower) (int ch); /* 348 */ + int (*tcl_UniCharIsSpace) (int ch); /* 349 */ + int (*tcl_UniCharIsUpper) (int ch); /* 350 */ + int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ + int (*tcl_UniCharLen) (CONST Tcl_UniChar * uniStr); /* 352 */ + int (*tcl_UniCharNcmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 353 */ + char * (*tcl_UniCharToUtfDString) (CONST Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) (CONST char * src, int length, Tcl_DString * dsPtr); /* 355 */ + Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ + Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ + void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ + void (*tcl_LogCommandInfo) (Tcl_Interp * interp, CONST char * script, CONST char * command, int length); /* 359 */ + int (*tcl_ParseBraces) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ + int (*tcl_ParseCommand) (Tcl_Interp * interp, CONST char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ + int (*tcl_ParseExpr) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ + int (*tcl_ParseQuotedString) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ + int (*tcl_ParseVarName) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ + char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ + int (*tcl_Chdir) (CONST char * dirName); /* 366 */ + int (*tcl_Access) (CONST char * path, int mode); /* 367 */ + int (*tcl_Stat) (CONST char * path, struct stat * bufPtr); /* 368 */ + int (*tcl_UtfNcmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 369 */ + int (*tcl_UtfNcasecmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 370 */ + int (*tcl_StringCaseMatch) (CONST char * str, CONST char * pattern, int nocase); /* 371 */ + int (*tcl_UniCharIsControl) (int ch); /* 372 */ + int (*tcl_UniCharIsGraph) (int ch); /* 373 */ + int (*tcl_UniCharIsPrint) (int ch); /* 374 */ + int (*tcl_UniCharIsPunct) (int ch); /* 375 */ + int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ + void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (CONST Tcl_UniChar * unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars); /* 379 */ + int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ + Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ + Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ + Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ + void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length); /* 384 */ + int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ + void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ + Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ + int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ + int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, CONST char * pattern); /* 389 */ + int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 390 */ + void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ + void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ + int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ + int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ + int (*tcl_WriteRaw) (Tcl_Channel chan, CONST char * src, int srcLen); /* 395 */ + Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ + int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ + CONST84_RETURN char * (*tcl_ChannelName) (CONST Tcl_ChannelType * chanTypePtr); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (CONST Tcl_ChannelType * chanTypePtr); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (CONST Tcl_ChannelType * chanTypePtr); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (CONST Tcl_ChannelType * chanTypePtr); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (CONST Tcl_ChannelType * chanTypePtr); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (CONST Tcl_ChannelType * chanTypePtr); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (CONST Tcl_ChannelType * chanTypePtr); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (CONST Tcl_ChannelType * chanTypePtr); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (CONST Tcl_ChannelType * chanTypePtr); /* 411 */ + int (*tcl_JoinThread) (Tcl_ThreadId threadId, int* result); /* 412 */ + int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ + int (*tcl_IsChannelRegistered) (Tcl_Interp* interp, Tcl_Channel channel); /* 414 */ + void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ + void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ + void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ + int (*tcl_IsChannelExisting) (CONST char* channelName); /* 418 */ + int (*tcl_UniCharNcasecmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 419 */ + int (*tcl_UniCharCaseMatch) (CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase); /* 420 */ + Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, CONST char * key); /* 421 */ + Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, CONST char * key, int * newPtr); /* 422 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr); /* 423 */ + void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ + ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ + int (*tcl_TraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ + void (*tcl_UntraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ + char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ + char * (*tcl_AttemptDbCkalloc) (unsigned int size, CONST char * file, int line); /* 429 */ + char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ + char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 431 */ + int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ + Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ + Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ + int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, CONST char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ + Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, CONST char * pattern); /* 436 */ + Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ + int (*tcl_DetachChannel) (Tcl_Interp* interp, Tcl_Channel channel); /* 438 */ + int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ + int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ + int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ + int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ + int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ + int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * sym1, CONST char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ + int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, CONST char * pattern, Tcl_GlobTypeData * types); /* 445 */ + Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ + int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ + int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ + int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ + int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ + int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ + int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ + CONST char ** (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ + int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ + int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ + Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions); /* 456 */ + Tcl_Obj* (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ + int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ + int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ + Tcl_Obj* (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ + Tcl_Obj* (*tcl_FSSplitPath) (Tcl_Obj* pathPtr, int * lenPtr); /* 461 */ + int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ + Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ + Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, Tcl_Filesystem * fsPtr); /* 465 */ + Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ + int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ + Tcl_Obj* (*tcl_FSNewNativePath) (Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ + CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ + Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ + Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ + Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ + int (*tcl_FSRegister) (ClientData clientData, Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (Tcl_Filesystem * fsPtr); /* 475 */ + CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ + Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ + Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ + int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ + void (*tcl_FSMountsChanged) (Tcl_Filesystem * fsPtr); /* 480 */ + int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ + void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ + Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ + int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo* infoPtr); /* 484 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, CONST Tcl_CmdInfo* infoPtr); /* 485 */ + Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, CONST char * file, int line); /* 486 */ + int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ + Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ + void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ + Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ + Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ + Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ + Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 493 */ + int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ + int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ + int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ + int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ + int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ + void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ + void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ + int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); /* 501 */ + int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv); /* 502 */ + Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ + Tcl_Obj * (*tcl_DbNewDictObj) (CONST char * file, int line); /* 504 */ + void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ + int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 509 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 510 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 511 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ + void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, CONST char * encodingName); /* 518 */ + Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ + void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ + void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ + int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ + int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ + int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ + void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ + void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ + void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ + int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ + int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ + void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ + void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ + int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ + void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ + int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ + Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ + int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ + void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ + int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ + Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ + int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ + Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ + Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ + int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ + int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ + int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ + int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ + int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ + int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ + int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ + int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ + int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ + void (*tcl_SetTimeProc) (Tcl_GetTimeProc* getProc, Tcl_ScaleTimeProc* scaleProc, ClientData clientData); /* 552 */ + void (*tcl_QueryTimeProc) (Tcl_GetTimeProc** getProc, Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); /* 553 */ + Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 554 */ + Tcl_Obj* (*tcl_NewBignumObj) (mp_int* value); /* 555 */ + Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, CONST char* file, int line); /* 556 */ + void (*tcl_SetBignumObj) (Tcl_Obj* obj, mp_int* value); /* 557 */ + int (*tcl_GetBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 558 */ + int (*tcl_TakeBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 559 */ + int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ + Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (CONST Tcl_ChannelType * chanTypePtr); /* 561 */ + void (*tcl_SetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj* msg); /* 562 */ + void (*tcl_GetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj** msg); /* 563 */ + void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj* msg); /* 564 */ + void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj** msg); /* 565 */ + int (*tcl_InitBignumFromDouble) (Tcl_Interp* interp, double initval, mp_int * toInit); /* 566 */ + Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ + int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ + int (*tcl_GetEncodingFromObj) (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); /* 569 */ + Tcl_Obj* (*tcl_GetEncodingSearchPath) (void); /* 570 */ + int (*tcl_SetEncodingSearchPath) (Tcl_Obj* searchPath); /* 571 */ + CONST char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ + int (*tcl_PkgRequireProc) (Tcl_Interp * interp, CONST char * name, int objc, Tcl_Obj *CONST objv[], ClientData * clientDataPtr); /* 573 */ + void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ + void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, CONST char * bytes, int length, int limit, CONST char * ellipsis); /* 575 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 577 */ + Tcl_Obj * (*tcl_ObjPrintf) (CONST char * format, ...); /* 578 */ + void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ + int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ + int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ + int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ + int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ + int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[]); /* 585 */ + void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ + int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 588 */ +} TclStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclStubs *tclStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_PkgProvideEx +#define Tcl_PkgProvideEx \ + (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ +#endif +#ifndef Tcl_PkgRequireEx +#define Tcl_PkgRequireEx \ + (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ +#endif +#ifndef Tcl_Panic +#define Tcl_Panic \ + (tclStubsPtr->tcl_Panic) /* 2 */ +#endif +#ifndef Tcl_Alloc +#define Tcl_Alloc \ + (tclStubsPtr->tcl_Alloc) /* 3 */ +#endif +#ifndef Tcl_Free +#define Tcl_Free \ + (tclStubsPtr->tcl_Free) /* 4 */ +#endif +#ifndef Tcl_Realloc +#define Tcl_Realloc \ + (tclStubsPtr->tcl_Realloc) /* 5 */ +#endif +#ifndef Tcl_DbCkalloc +#define Tcl_DbCkalloc \ + (tclStubsPtr->tcl_DbCkalloc) /* 6 */ +#endif +#ifndef Tcl_DbCkfree +#define Tcl_DbCkfree \ + (tclStubsPtr->tcl_DbCkfree) /* 7 */ +#endif +#ifndef Tcl_DbCkrealloc +#define Tcl_DbCkrealloc \ + (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer +#define Tcl_SetTimer \ + (tclStubsPtr->tcl_SetTimer) /* 11 */ +#endif +#ifndef Tcl_Sleep +#define Tcl_Sleep \ + (tclStubsPtr->tcl_Sleep) /* 12 */ +#endif +#ifndef Tcl_WaitForEvent +#define Tcl_WaitForEvent \ + (tclStubsPtr->tcl_WaitForEvent) /* 13 */ +#endif +#ifndef Tcl_AppendAllObjTypes +#define Tcl_AppendAllObjTypes \ + (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ +#endif +#ifndef Tcl_AppendStringsToObj +#define Tcl_AppendStringsToObj \ + (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ +#endif +#ifndef Tcl_AppendToObj +#define Tcl_AppendToObj \ + (tclStubsPtr->tcl_AppendToObj) /* 16 */ +#endif +#ifndef Tcl_ConcatObj +#define Tcl_ConcatObj \ + (tclStubsPtr->tcl_ConcatObj) /* 17 */ +#endif +#ifndef Tcl_ConvertToType +#define Tcl_ConvertToType \ + (tclStubsPtr->tcl_ConvertToType) /* 18 */ +#endif +#ifndef Tcl_DbDecrRefCount +#define Tcl_DbDecrRefCount \ + (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ +#endif +#ifndef Tcl_DbIncrRefCount +#define Tcl_DbIncrRefCount \ + (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ +#endif +#ifndef Tcl_DbIsShared +#define Tcl_DbIsShared \ + (tclStubsPtr->tcl_DbIsShared) /* 21 */ +#endif +#ifndef Tcl_DbNewBooleanObj +#define Tcl_DbNewBooleanObj \ + (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ +#endif +#ifndef Tcl_DbNewByteArrayObj +#define Tcl_DbNewByteArrayObj \ + (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ +#endif +#ifndef Tcl_DbNewDoubleObj +#define Tcl_DbNewDoubleObj \ + (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ +#endif +#ifndef Tcl_DbNewListObj +#define Tcl_DbNewListObj \ + (tclStubsPtr->tcl_DbNewListObj) /* 25 */ +#endif +#ifndef Tcl_DbNewLongObj +#define Tcl_DbNewLongObj \ + (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ +#endif +#ifndef Tcl_DbNewObj +#define Tcl_DbNewObj \ + (tclStubsPtr->tcl_DbNewObj) /* 27 */ +#endif +#ifndef Tcl_DbNewStringObj +#define Tcl_DbNewStringObj \ + (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ +#endif +#ifndef Tcl_DuplicateObj +#define Tcl_DuplicateObj \ + (tclStubsPtr->tcl_DuplicateObj) /* 29 */ +#endif +#ifndef TclFreeObj +#define TclFreeObj \ + (tclStubsPtr->tclFreeObj) /* 30 */ +#endif +#ifndef Tcl_GetBoolean +#define Tcl_GetBoolean \ + (tclStubsPtr->tcl_GetBoolean) /* 31 */ +#endif +#ifndef Tcl_GetBooleanFromObj +#define Tcl_GetBooleanFromObj \ + (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ +#endif +#ifndef Tcl_GetByteArrayFromObj +#define Tcl_GetByteArrayFromObj \ + (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ +#endif +#ifndef Tcl_GetDouble +#define Tcl_GetDouble \ + (tclStubsPtr->tcl_GetDouble) /* 34 */ +#endif +#ifndef Tcl_GetDoubleFromObj +#define Tcl_GetDoubleFromObj \ + (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ +#endif +#ifndef Tcl_GetIndexFromObj +#define Tcl_GetIndexFromObj \ + (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ +#endif +#ifndef Tcl_GetInt +#define Tcl_GetInt \ + (tclStubsPtr->tcl_GetInt) /* 37 */ +#endif +#ifndef Tcl_GetIntFromObj +#define Tcl_GetIntFromObj \ + (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ +#endif +#ifndef Tcl_GetLongFromObj +#define Tcl_GetLongFromObj \ + (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ +#endif +#ifndef Tcl_GetObjType +#define Tcl_GetObjType \ + (tclStubsPtr->tcl_GetObjType) /* 40 */ +#endif +#ifndef Tcl_GetStringFromObj +#define Tcl_GetStringFromObj \ + (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ +#endif +#ifndef Tcl_InvalidateStringRep +#define Tcl_InvalidateStringRep \ + (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ +#endif +#ifndef Tcl_ListObjAppendList +#define Tcl_ListObjAppendList \ + (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ +#endif +#ifndef Tcl_ListObjAppendElement +#define Tcl_ListObjAppendElement \ + (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ +#endif +#ifndef Tcl_ListObjGetElements +#define Tcl_ListObjGetElements \ + (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ +#endif +#ifndef Tcl_ListObjIndex +#define Tcl_ListObjIndex \ + (tclStubsPtr->tcl_ListObjIndex) /* 46 */ +#endif +#ifndef Tcl_ListObjLength +#define Tcl_ListObjLength \ + (tclStubsPtr->tcl_ListObjLength) /* 47 */ +#endif +#ifndef Tcl_ListObjReplace +#define Tcl_ListObjReplace \ + (tclStubsPtr->tcl_ListObjReplace) /* 48 */ +#endif +#ifndef Tcl_NewBooleanObj +#define Tcl_NewBooleanObj \ + (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ +#endif +#ifndef Tcl_NewByteArrayObj +#define Tcl_NewByteArrayObj \ + (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ +#endif +#ifndef Tcl_NewDoubleObj +#define Tcl_NewDoubleObj \ + (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ +#endif +#ifndef Tcl_NewIntObj +#define Tcl_NewIntObj \ + (tclStubsPtr->tcl_NewIntObj) /* 52 */ +#endif +#ifndef Tcl_NewListObj +#define Tcl_NewListObj \ + (tclStubsPtr->tcl_NewListObj) /* 53 */ +#endif +#ifndef Tcl_NewLongObj +#define Tcl_NewLongObj \ + (tclStubsPtr->tcl_NewLongObj) /* 54 */ +#endif +#ifndef Tcl_NewObj +#define Tcl_NewObj \ + (tclStubsPtr->tcl_NewObj) /* 55 */ +#endif +#ifndef Tcl_NewStringObj +#define Tcl_NewStringObj \ + (tclStubsPtr->tcl_NewStringObj) /* 56 */ +#endif +#ifndef Tcl_SetBooleanObj +#define Tcl_SetBooleanObj \ + (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ +#endif +#ifndef Tcl_SetByteArrayLength +#define Tcl_SetByteArrayLength \ + (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ +#endif +#ifndef Tcl_SetByteArrayObj +#define Tcl_SetByteArrayObj \ + (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ +#endif +#ifndef Tcl_SetDoubleObj +#define Tcl_SetDoubleObj \ + (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ +#endif +#ifndef Tcl_SetIntObj +#define Tcl_SetIntObj \ + (tclStubsPtr->tcl_SetIntObj) /* 61 */ +#endif +#ifndef Tcl_SetListObj +#define Tcl_SetListObj \ + (tclStubsPtr->tcl_SetListObj) /* 62 */ +#endif +#ifndef Tcl_SetLongObj +#define Tcl_SetLongObj \ + (tclStubsPtr->tcl_SetLongObj) /* 63 */ +#endif +#ifndef Tcl_SetObjLength +#define Tcl_SetObjLength \ + (tclStubsPtr->tcl_SetObjLength) /* 64 */ +#endif +#ifndef Tcl_SetStringObj +#define Tcl_SetStringObj \ + (tclStubsPtr->tcl_SetStringObj) /* 65 */ +#endif +#ifndef Tcl_AddErrorInfo +#define Tcl_AddErrorInfo \ + (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ +#endif +#ifndef Tcl_AddObjErrorInfo +#define Tcl_AddObjErrorInfo \ + (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ +#endif +#ifndef Tcl_AllowExceptions +#define Tcl_AllowExceptions \ + (tclStubsPtr->tcl_AllowExceptions) /* 68 */ +#endif +#ifndef Tcl_AppendElement +#define Tcl_AppendElement \ + (tclStubsPtr->tcl_AppendElement) /* 69 */ +#endif +#ifndef Tcl_AppendResult +#define Tcl_AppendResult \ + (tclStubsPtr->tcl_AppendResult) /* 70 */ +#endif +#ifndef Tcl_AsyncCreate +#define Tcl_AsyncCreate \ + (tclStubsPtr->tcl_AsyncCreate) /* 71 */ +#endif +#ifndef Tcl_AsyncDelete +#define Tcl_AsyncDelete \ + (tclStubsPtr->tcl_AsyncDelete) /* 72 */ +#endif +#ifndef Tcl_AsyncInvoke +#define Tcl_AsyncInvoke \ + (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ +#endif +#ifndef Tcl_AsyncMark +#define Tcl_AsyncMark \ + (tclStubsPtr->tcl_AsyncMark) /* 74 */ +#endif +#ifndef Tcl_AsyncReady +#define Tcl_AsyncReady \ + (tclStubsPtr->tcl_AsyncReady) /* 75 */ +#endif +#ifndef Tcl_BackgroundError +#define Tcl_BackgroundError \ + (tclStubsPtr->tcl_BackgroundError) /* 76 */ +#endif +#ifndef Tcl_Backslash +#define Tcl_Backslash \ + (tclStubsPtr->tcl_Backslash) /* 77 */ +#endif +#ifndef Tcl_BadChannelOption +#define Tcl_BadChannelOption \ + (tclStubsPtr->tcl_BadChannelOption) /* 78 */ +#endif +#ifndef Tcl_CallWhenDeleted +#define Tcl_CallWhenDeleted \ + (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ +#endif +#ifndef Tcl_CancelIdleCall +#define Tcl_CancelIdleCall \ + (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ +#endif +#ifndef Tcl_Close +#define Tcl_Close \ + (tclStubsPtr->tcl_Close) /* 81 */ +#endif +#ifndef Tcl_CommandComplete +#define Tcl_CommandComplete \ + (tclStubsPtr->tcl_CommandComplete) /* 82 */ +#endif +#ifndef Tcl_Concat +#define Tcl_Concat \ + (tclStubsPtr->tcl_Concat) /* 83 */ +#endif +#ifndef Tcl_ConvertElement +#define Tcl_ConvertElement \ + (tclStubsPtr->tcl_ConvertElement) /* 84 */ +#endif +#ifndef Tcl_ConvertCountedElement +#define Tcl_ConvertCountedElement \ + (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ +#endif +#ifndef Tcl_CreateAlias +#define Tcl_CreateAlias \ + (tclStubsPtr->tcl_CreateAlias) /* 86 */ +#endif +#ifndef Tcl_CreateAliasObj +#define Tcl_CreateAliasObj \ + (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ +#endif +#ifndef Tcl_CreateChannel +#define Tcl_CreateChannel \ + (tclStubsPtr->tcl_CreateChannel) /* 88 */ +#endif +#ifndef Tcl_CreateChannelHandler +#define Tcl_CreateChannelHandler \ + (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ +#endif +#ifndef Tcl_CreateCloseHandler +#define Tcl_CreateCloseHandler \ + (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ +#endif +#ifndef Tcl_CreateCommand +#define Tcl_CreateCommand \ + (tclStubsPtr->tcl_CreateCommand) /* 91 */ +#endif +#ifndef Tcl_CreateEventSource +#define Tcl_CreateEventSource \ + (tclStubsPtr->tcl_CreateEventSource) /* 92 */ +#endif +#ifndef Tcl_CreateExitHandler +#define Tcl_CreateExitHandler \ + (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ +#endif +#ifndef Tcl_CreateInterp +#define Tcl_CreateInterp \ + (tclStubsPtr->tcl_CreateInterp) /* 94 */ +#endif +#ifndef Tcl_CreateMathFunc +#define Tcl_CreateMathFunc \ + (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ +#endif +#ifndef Tcl_CreateObjCommand +#define Tcl_CreateObjCommand \ + (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ +#endif +#ifndef Tcl_CreateSlave +#define Tcl_CreateSlave \ + (tclStubsPtr->tcl_CreateSlave) /* 97 */ +#endif +#ifndef Tcl_CreateTimerHandler +#define Tcl_CreateTimerHandler \ + (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ +#endif +#ifndef Tcl_CreateTrace +#define Tcl_CreateTrace \ + (tclStubsPtr->tcl_CreateTrace) /* 99 */ +#endif +#ifndef Tcl_DeleteAssocData +#define Tcl_DeleteAssocData \ + (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ +#endif +#ifndef Tcl_DeleteChannelHandler +#define Tcl_DeleteChannelHandler \ + (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ +#endif +#ifndef Tcl_DeleteCloseHandler +#define Tcl_DeleteCloseHandler \ + (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ +#endif +#ifndef Tcl_DeleteCommand +#define Tcl_DeleteCommand \ + (tclStubsPtr->tcl_DeleteCommand) /* 103 */ +#endif +#ifndef Tcl_DeleteCommandFromToken +#define Tcl_DeleteCommandFromToken \ + (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ +#endif +#ifndef Tcl_DeleteEvents +#define Tcl_DeleteEvents \ + (tclStubsPtr->tcl_DeleteEvents) /* 105 */ +#endif +#ifndef Tcl_DeleteEventSource +#define Tcl_DeleteEventSource \ + (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ +#endif +#ifndef Tcl_DeleteExitHandler +#define Tcl_DeleteExitHandler \ + (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ +#endif +#ifndef Tcl_DeleteHashEntry +#define Tcl_DeleteHashEntry \ + (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ +#endif +#ifndef Tcl_DeleteHashTable +#define Tcl_DeleteHashTable \ + (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ +#endif +#ifndef Tcl_DeleteInterp +#define Tcl_DeleteInterp \ + (tclStubsPtr->tcl_DeleteInterp) /* 110 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler +#define Tcl_DeleteTimerHandler \ + (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ +#endif +#ifndef Tcl_DeleteTrace +#define Tcl_DeleteTrace \ + (tclStubsPtr->tcl_DeleteTrace) /* 113 */ +#endif +#ifndef Tcl_DontCallWhenDeleted +#define Tcl_DontCallWhenDeleted \ + (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ +#endif +#ifndef Tcl_DoOneEvent +#define Tcl_DoOneEvent \ + (tclStubsPtr->tcl_DoOneEvent) /* 115 */ +#endif +#ifndef Tcl_DoWhenIdle +#define Tcl_DoWhenIdle \ + (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ +#endif +#ifndef Tcl_DStringAppend +#define Tcl_DStringAppend \ + (tclStubsPtr->tcl_DStringAppend) /* 117 */ +#endif +#ifndef Tcl_DStringAppendElement +#define Tcl_DStringAppendElement \ + (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ +#endif +#ifndef Tcl_DStringEndSublist +#define Tcl_DStringEndSublist \ + (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ +#endif +#ifndef Tcl_DStringFree +#define Tcl_DStringFree \ + (tclStubsPtr->tcl_DStringFree) /* 120 */ +#endif +#ifndef Tcl_DStringGetResult +#define Tcl_DStringGetResult \ + (tclStubsPtr->tcl_DStringGetResult) /* 121 */ +#endif +#ifndef Tcl_DStringInit +#define Tcl_DStringInit \ + (tclStubsPtr->tcl_DStringInit) /* 122 */ +#endif +#ifndef Tcl_DStringResult +#define Tcl_DStringResult \ + (tclStubsPtr->tcl_DStringResult) /* 123 */ +#endif +#ifndef Tcl_DStringSetLength +#define Tcl_DStringSetLength \ + (tclStubsPtr->tcl_DStringSetLength) /* 124 */ +#endif +#ifndef Tcl_DStringStartSublist +#define Tcl_DStringStartSublist \ + (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ +#endif +#ifndef Tcl_Eof +#define Tcl_Eof \ + (tclStubsPtr->tcl_Eof) /* 126 */ +#endif +#ifndef Tcl_ErrnoId +#define Tcl_ErrnoId \ + (tclStubsPtr->tcl_ErrnoId) /* 127 */ +#endif +#ifndef Tcl_ErrnoMsg +#define Tcl_ErrnoMsg \ + (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ +#endif +#ifndef Tcl_Eval +#define Tcl_Eval \ + (tclStubsPtr->tcl_Eval) /* 129 */ +#endif +#ifndef Tcl_EvalFile +#define Tcl_EvalFile \ + (tclStubsPtr->tcl_EvalFile) /* 130 */ +#endif +#ifndef Tcl_EvalObj +#define Tcl_EvalObj \ + (tclStubsPtr->tcl_EvalObj) /* 131 */ +#endif +#ifndef Tcl_EventuallyFree +#define Tcl_EventuallyFree \ + (tclStubsPtr->tcl_EventuallyFree) /* 132 */ +#endif +#ifndef Tcl_Exit +#define Tcl_Exit \ + (tclStubsPtr->tcl_Exit) /* 133 */ +#endif +#ifndef Tcl_ExposeCommand +#define Tcl_ExposeCommand \ + (tclStubsPtr->tcl_ExposeCommand) /* 134 */ +#endif +#ifndef Tcl_ExprBoolean +#define Tcl_ExprBoolean \ + (tclStubsPtr->tcl_ExprBoolean) /* 135 */ +#endif +#ifndef Tcl_ExprBooleanObj +#define Tcl_ExprBooleanObj \ + (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ +#endif +#ifndef Tcl_ExprDouble +#define Tcl_ExprDouble \ + (tclStubsPtr->tcl_ExprDouble) /* 137 */ +#endif +#ifndef Tcl_ExprDoubleObj +#define Tcl_ExprDoubleObj \ + (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ +#endif +#ifndef Tcl_ExprLong +#define Tcl_ExprLong \ + (tclStubsPtr->tcl_ExprLong) /* 139 */ +#endif +#ifndef Tcl_ExprLongObj +#define Tcl_ExprLongObj \ + (tclStubsPtr->tcl_ExprLongObj) /* 140 */ +#endif +#ifndef Tcl_ExprObj +#define Tcl_ExprObj \ + (tclStubsPtr->tcl_ExprObj) /* 141 */ +#endif +#ifndef Tcl_ExprString +#define Tcl_ExprString \ + (tclStubsPtr->tcl_ExprString) /* 142 */ +#endif +#ifndef Tcl_Finalize +#define Tcl_Finalize \ + (tclStubsPtr->tcl_Finalize) /* 143 */ +#endif +#ifndef Tcl_FindExecutable +#define Tcl_FindExecutable \ + (tclStubsPtr->tcl_FindExecutable) /* 144 */ +#endif +#ifndef Tcl_FirstHashEntry +#define Tcl_FirstHashEntry \ + (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ +#endif +#ifndef Tcl_Flush +#define Tcl_Flush \ + (tclStubsPtr->tcl_Flush) /* 146 */ +#endif +#ifndef Tcl_FreeResult +#define Tcl_FreeResult \ + (tclStubsPtr->tcl_FreeResult) /* 147 */ +#endif +#ifndef Tcl_GetAlias +#define Tcl_GetAlias \ + (tclStubsPtr->tcl_GetAlias) /* 148 */ +#endif +#ifndef Tcl_GetAliasObj +#define Tcl_GetAliasObj \ + (tclStubsPtr->tcl_GetAliasObj) /* 149 */ +#endif +#ifndef Tcl_GetAssocData +#define Tcl_GetAssocData \ + (tclStubsPtr->tcl_GetAssocData) /* 150 */ +#endif +#ifndef Tcl_GetChannel +#define Tcl_GetChannel \ + (tclStubsPtr->tcl_GetChannel) /* 151 */ +#endif +#ifndef Tcl_GetChannelBufferSize +#define Tcl_GetChannelBufferSize \ + (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ +#endif +#ifndef Tcl_GetChannelHandle +#define Tcl_GetChannelHandle \ + (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ +#endif +#ifndef Tcl_GetChannelInstanceData +#define Tcl_GetChannelInstanceData \ + (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ +#endif +#ifndef Tcl_GetChannelMode +#define Tcl_GetChannelMode \ + (tclStubsPtr->tcl_GetChannelMode) /* 155 */ +#endif +#ifndef Tcl_GetChannelName +#define Tcl_GetChannelName \ + (tclStubsPtr->tcl_GetChannelName) /* 156 */ +#endif +#ifndef Tcl_GetChannelOption +#define Tcl_GetChannelOption \ + (tclStubsPtr->tcl_GetChannelOption) /* 157 */ +#endif +#ifndef Tcl_GetChannelType +#define Tcl_GetChannelType \ + (tclStubsPtr->tcl_GetChannelType) /* 158 */ +#endif +#ifndef Tcl_GetCommandInfo +#define Tcl_GetCommandInfo \ + (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ +#endif +#ifndef Tcl_GetCommandName +#define Tcl_GetCommandName \ + (tclStubsPtr->tcl_GetCommandName) /* 160 */ +#endif +#ifndef Tcl_GetErrno +#define Tcl_GetErrno \ + (tclStubsPtr->tcl_GetErrno) /* 161 */ +#endif +#ifndef Tcl_GetHostName +#define Tcl_GetHostName \ + (tclStubsPtr->tcl_GetHostName) /* 162 */ +#endif +#ifndef Tcl_GetInterpPath +#define Tcl_GetInterpPath \ + (tclStubsPtr->tcl_GetInterpPath) /* 163 */ +#endif +#ifndef Tcl_GetMaster +#define Tcl_GetMaster \ + (tclStubsPtr->tcl_GetMaster) /* 164 */ +#endif +#ifndef Tcl_GetNameOfExecutable +#define Tcl_GetNameOfExecutable \ + (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ +#endif +#ifndef Tcl_GetObjResult +#define Tcl_GetObjResult \ + (tclStubsPtr->tcl_GetObjResult) /* 166 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType +#define Tcl_GetPathType \ + (tclStubsPtr->tcl_GetPathType) /* 168 */ +#endif +#ifndef Tcl_Gets +#define Tcl_Gets \ + (tclStubsPtr->tcl_Gets) /* 169 */ +#endif +#ifndef Tcl_GetsObj +#define Tcl_GetsObj \ + (tclStubsPtr->tcl_GetsObj) /* 170 */ +#endif +#ifndef Tcl_GetServiceMode +#define Tcl_GetServiceMode \ + (tclStubsPtr->tcl_GetServiceMode) /* 171 */ +#endif +#ifndef Tcl_GetSlave +#define Tcl_GetSlave \ + (tclStubsPtr->tcl_GetSlave) /* 172 */ +#endif +#ifndef Tcl_GetStdChannel +#define Tcl_GetStdChannel \ + (tclStubsPtr->tcl_GetStdChannel) /* 173 */ +#endif +#ifndef Tcl_GetStringResult +#define Tcl_GetStringResult \ + (tclStubsPtr->tcl_GetStringResult) /* 174 */ +#endif +#ifndef Tcl_GetVar +#define Tcl_GetVar \ + (tclStubsPtr->tcl_GetVar) /* 175 */ +#endif +#ifndef Tcl_GetVar2 +#define Tcl_GetVar2 \ + (tclStubsPtr->tcl_GetVar2) /* 176 */ +#endif +#ifndef Tcl_GlobalEval +#define Tcl_GlobalEval \ + (tclStubsPtr->tcl_GlobalEval) /* 177 */ +#endif +#ifndef Tcl_GlobalEvalObj +#define Tcl_GlobalEvalObj \ + (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ +#endif +#ifndef Tcl_HideCommand +#define Tcl_HideCommand \ + (tclStubsPtr->tcl_HideCommand) /* 179 */ +#endif +#ifndef Tcl_Init +#define Tcl_Init \ + (tclStubsPtr->tcl_Init) /* 180 */ +#endif +#ifndef Tcl_InitHashTable +#define Tcl_InitHashTable \ + (tclStubsPtr->tcl_InitHashTable) /* 181 */ +#endif +#ifndef Tcl_InputBlocked +#define Tcl_InputBlocked \ + (tclStubsPtr->tcl_InputBlocked) /* 182 */ +#endif +#ifndef Tcl_InputBuffered +#define Tcl_InputBuffered \ + (tclStubsPtr->tcl_InputBuffered) /* 183 */ +#endif +#ifndef Tcl_InterpDeleted +#define Tcl_InterpDeleted \ + (tclStubsPtr->tcl_InterpDeleted) /* 184 */ +#endif +#ifndef Tcl_IsSafe +#define Tcl_IsSafe \ + (tclStubsPtr->tcl_IsSafe) /* 185 */ +#endif +#ifndef Tcl_JoinPath +#define Tcl_JoinPath \ + (tclStubsPtr->tcl_JoinPath) /* 186 */ +#endif +#ifndef Tcl_LinkVar +#define Tcl_LinkVar \ + (tclStubsPtr->tcl_LinkVar) /* 187 */ +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel +#define Tcl_MakeFileChannel \ + (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ +#endif +#ifndef Tcl_MakeSafe +#define Tcl_MakeSafe \ + (tclStubsPtr->tcl_MakeSafe) /* 190 */ +#endif +#ifndef Tcl_MakeTcpClientChannel +#define Tcl_MakeTcpClientChannel \ + (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ +#endif +#ifndef Tcl_Merge +#define Tcl_Merge \ + (tclStubsPtr->tcl_Merge) /* 192 */ +#endif +#ifndef Tcl_NextHashEntry +#define Tcl_NextHashEntry \ + (tclStubsPtr->tcl_NextHashEntry) /* 193 */ +#endif +#ifndef Tcl_NotifyChannel +#define Tcl_NotifyChannel \ + (tclStubsPtr->tcl_NotifyChannel) /* 194 */ +#endif +#ifndef Tcl_ObjGetVar2 +#define Tcl_ObjGetVar2 \ + (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ +#endif +#ifndef Tcl_ObjSetVar2 +#define Tcl_ObjSetVar2 \ + (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel +#define Tcl_OpenFileChannel \ + (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ +#endif +#ifndef Tcl_OpenTcpClient +#define Tcl_OpenTcpClient \ + (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ +#endif +#ifndef Tcl_OpenTcpServer +#define Tcl_OpenTcpServer \ + (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ +#endif +#ifndef Tcl_Preserve +#define Tcl_Preserve \ + (tclStubsPtr->tcl_Preserve) /* 201 */ +#endif +#ifndef Tcl_PrintDouble +#define Tcl_PrintDouble \ + (tclStubsPtr->tcl_PrintDouble) /* 202 */ +#endif +#ifndef Tcl_PutEnv +#define Tcl_PutEnv \ + (tclStubsPtr->tcl_PutEnv) /* 203 */ +#endif +#ifndef Tcl_PosixError +#define Tcl_PosixError \ + (tclStubsPtr->tcl_PosixError) /* 204 */ +#endif +#ifndef Tcl_QueueEvent +#define Tcl_QueueEvent \ + (tclStubsPtr->tcl_QueueEvent) /* 205 */ +#endif +#ifndef Tcl_Read +#define Tcl_Read \ + (tclStubsPtr->tcl_Read) /* 206 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval +#define Tcl_RecordAndEval \ + (tclStubsPtr->tcl_RecordAndEval) /* 208 */ +#endif +#ifndef Tcl_RecordAndEvalObj +#define Tcl_RecordAndEvalObj \ + (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ +#endif +#ifndef Tcl_RegisterChannel +#define Tcl_RegisterChannel \ + (tclStubsPtr->tcl_RegisterChannel) /* 210 */ +#endif +#ifndef Tcl_RegisterObjType +#define Tcl_RegisterObjType \ + (tclStubsPtr->tcl_RegisterObjType) /* 211 */ +#endif +#ifndef Tcl_RegExpCompile +#define Tcl_RegExpCompile \ + (tclStubsPtr->tcl_RegExpCompile) /* 212 */ +#endif +#ifndef Tcl_RegExpExec +#define Tcl_RegExpExec \ + (tclStubsPtr->tcl_RegExpExec) /* 213 */ +#endif +#ifndef Tcl_RegExpMatch +#define Tcl_RegExpMatch \ + (tclStubsPtr->tcl_RegExpMatch) /* 214 */ +#endif +#ifndef Tcl_RegExpRange +#define Tcl_RegExpRange \ + (tclStubsPtr->tcl_RegExpRange) /* 215 */ +#endif +#ifndef Tcl_Release +#define Tcl_Release \ + (tclStubsPtr->tcl_Release) /* 216 */ +#endif +#ifndef Tcl_ResetResult +#define Tcl_ResetResult \ + (tclStubsPtr->tcl_ResetResult) /* 217 */ +#endif +#ifndef Tcl_ScanElement +#define Tcl_ScanElement \ + (tclStubsPtr->tcl_ScanElement) /* 218 */ +#endif +#ifndef Tcl_ScanCountedElement +#define Tcl_ScanCountedElement \ + (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ +#endif +#ifndef Tcl_SeekOld +#define Tcl_SeekOld \ + (tclStubsPtr->tcl_SeekOld) /* 220 */ +#endif +#ifndef Tcl_ServiceAll +#define Tcl_ServiceAll \ + (tclStubsPtr->tcl_ServiceAll) /* 221 */ +#endif +#ifndef Tcl_ServiceEvent +#define Tcl_ServiceEvent \ + (tclStubsPtr->tcl_ServiceEvent) /* 222 */ +#endif +#ifndef Tcl_SetAssocData +#define Tcl_SetAssocData \ + (tclStubsPtr->tcl_SetAssocData) /* 223 */ +#endif +#ifndef Tcl_SetChannelBufferSize +#define Tcl_SetChannelBufferSize \ + (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ +#endif +#ifndef Tcl_SetChannelOption +#define Tcl_SetChannelOption \ + (tclStubsPtr->tcl_SetChannelOption) /* 225 */ +#endif +#ifndef Tcl_SetCommandInfo +#define Tcl_SetCommandInfo \ + (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ +#endif +#ifndef Tcl_SetErrno +#define Tcl_SetErrno \ + (tclStubsPtr->tcl_SetErrno) /* 227 */ +#endif +#ifndef Tcl_SetErrorCode +#define Tcl_SetErrorCode \ + (tclStubsPtr->tcl_SetErrorCode) /* 228 */ +#endif +#ifndef Tcl_SetMaxBlockTime +#define Tcl_SetMaxBlockTime \ + (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ +#endif +#ifndef Tcl_SetPanicProc +#define Tcl_SetPanicProc \ + (tclStubsPtr->tcl_SetPanicProc) /* 230 */ +#endif +#ifndef Tcl_SetRecursionLimit +#define Tcl_SetRecursionLimit \ + (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ +#endif +#ifndef Tcl_SetResult +#define Tcl_SetResult \ + (tclStubsPtr->tcl_SetResult) /* 232 */ +#endif +#ifndef Tcl_SetServiceMode +#define Tcl_SetServiceMode \ + (tclStubsPtr->tcl_SetServiceMode) /* 233 */ +#endif +#ifndef Tcl_SetObjErrorCode +#define Tcl_SetObjErrorCode \ + (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ +#endif +#ifndef Tcl_SetObjResult +#define Tcl_SetObjResult \ + (tclStubsPtr->tcl_SetObjResult) /* 235 */ +#endif +#ifndef Tcl_SetStdChannel +#define Tcl_SetStdChannel \ + (tclStubsPtr->tcl_SetStdChannel) /* 236 */ +#endif +#ifndef Tcl_SetVar +#define Tcl_SetVar \ + (tclStubsPtr->tcl_SetVar) /* 237 */ +#endif +#ifndef Tcl_SetVar2 +#define Tcl_SetVar2 \ + (tclStubsPtr->tcl_SetVar2) /* 238 */ +#endif +#ifndef Tcl_SignalId +#define Tcl_SignalId \ + (tclStubsPtr->tcl_SignalId) /* 239 */ +#endif +#ifndef Tcl_SignalMsg +#define Tcl_SignalMsg \ + (tclStubsPtr->tcl_SignalMsg) /* 240 */ +#endif +#ifndef Tcl_SourceRCFile +#define Tcl_SourceRCFile \ + (tclStubsPtr->tcl_SourceRCFile) /* 241 */ +#endif +#ifndef Tcl_SplitList +#define Tcl_SplitList \ + (tclStubsPtr->tcl_SplitList) /* 242 */ +#endif +#ifndef Tcl_SplitPath +#define Tcl_SplitPath \ + (tclStubsPtr->tcl_SplitPath) /* 243 */ +#endif +#ifndef Tcl_StaticPackage +#define Tcl_StaticPackage \ + (tclStubsPtr->tcl_StaticPackage) /* 244 */ +#endif +#ifndef Tcl_StringMatch +#define Tcl_StringMatch \ + (tclStubsPtr->tcl_StringMatch) /* 245 */ +#endif +#ifndef Tcl_TellOld +#define Tcl_TellOld \ + (tclStubsPtr->tcl_TellOld) /* 246 */ +#endif +#ifndef Tcl_TraceVar +#define Tcl_TraceVar \ + (tclStubsPtr->tcl_TraceVar) /* 247 */ +#endif +#ifndef Tcl_TraceVar2 +#define Tcl_TraceVar2 \ + (tclStubsPtr->tcl_TraceVar2) /* 248 */ +#endif +#ifndef Tcl_TranslateFileName +#define Tcl_TranslateFileName \ + (tclStubsPtr->tcl_TranslateFileName) /* 249 */ +#endif +#ifndef Tcl_Ungets +#define Tcl_Ungets \ + (tclStubsPtr->tcl_Ungets) /* 250 */ +#endif +#ifndef Tcl_UnlinkVar +#define Tcl_UnlinkVar \ + (tclStubsPtr->tcl_UnlinkVar) /* 251 */ +#endif +#ifndef Tcl_UnregisterChannel +#define Tcl_UnregisterChannel \ + (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ +#endif +#ifndef Tcl_UnsetVar +#define Tcl_UnsetVar \ + (tclStubsPtr->tcl_UnsetVar) /* 253 */ +#endif +#ifndef Tcl_UnsetVar2 +#define Tcl_UnsetVar2 \ + (tclStubsPtr->tcl_UnsetVar2) /* 254 */ +#endif +#ifndef Tcl_UntraceVar +#define Tcl_UntraceVar \ + (tclStubsPtr->tcl_UntraceVar) /* 255 */ +#endif +#ifndef Tcl_UntraceVar2 +#define Tcl_UntraceVar2 \ + (tclStubsPtr->tcl_UntraceVar2) /* 256 */ +#endif +#ifndef Tcl_UpdateLinkedVar +#define Tcl_UpdateLinkedVar \ + (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ +#endif +#ifndef Tcl_UpVar +#define Tcl_UpVar \ + (tclStubsPtr->tcl_UpVar) /* 258 */ +#endif +#ifndef Tcl_UpVar2 +#define Tcl_UpVar2 \ + (tclStubsPtr->tcl_UpVar2) /* 259 */ +#endif +#ifndef Tcl_VarEval +#define Tcl_VarEval \ + (tclStubsPtr->tcl_VarEval) /* 260 */ +#endif +#ifndef Tcl_VarTraceInfo +#define Tcl_VarTraceInfo \ + (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ +#endif +#ifndef Tcl_VarTraceInfo2 +#define Tcl_VarTraceInfo2 \ + (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ +#endif +#ifndef Tcl_Write +#define Tcl_Write \ + (tclStubsPtr->tcl_Write) /* 263 */ +#endif +#ifndef Tcl_WrongNumArgs +#define Tcl_WrongNumArgs \ + (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ +#endif +#ifndef Tcl_DumpActiveMemory +#define Tcl_DumpActiveMemory \ + (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ +#endif +#ifndef Tcl_ValidateAllMemory +#define Tcl_ValidateAllMemory \ + (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ +#endif +#ifndef Tcl_AppendResultVA +#define Tcl_AppendResultVA \ + (tclStubsPtr->tcl_AppendResultVA) /* 267 */ +#endif +#ifndef Tcl_AppendStringsToObjVA +#define Tcl_AppendStringsToObjVA \ + (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ +#endif +#ifndef Tcl_HashStats +#define Tcl_HashStats \ + (tclStubsPtr->tcl_HashStats) /* 269 */ +#endif +#ifndef Tcl_ParseVar +#define Tcl_ParseVar \ + (tclStubsPtr->tcl_ParseVar) /* 270 */ +#endif +#ifndef Tcl_PkgPresent +#define Tcl_PkgPresent \ + (tclStubsPtr->tcl_PkgPresent) /* 271 */ +#endif +#ifndef Tcl_PkgPresentEx +#define Tcl_PkgPresentEx \ + (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ +#endif +#ifndef Tcl_PkgProvide +#define Tcl_PkgProvide \ + (tclStubsPtr->tcl_PkgProvide) /* 273 */ +#endif +#ifndef Tcl_PkgRequire +#define Tcl_PkgRequire \ + (tclStubsPtr->tcl_PkgRequire) /* 274 */ +#endif +#ifndef Tcl_SetErrorCodeVA +#define Tcl_SetErrorCodeVA \ + (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ +#endif +#ifndef Tcl_VarEvalVA +#define Tcl_VarEvalVA \ + (tclStubsPtr->tcl_VarEvalVA) /* 276 */ +#endif +#ifndef Tcl_WaitPid +#define Tcl_WaitPid \ + (tclStubsPtr->tcl_WaitPid) /* 277 */ +#endif +#ifndef Tcl_PanicVA +#define Tcl_PanicVA \ + (tclStubsPtr->tcl_PanicVA) /* 278 */ +#endif +#ifndef Tcl_GetVersion +#define Tcl_GetVersion \ + (tclStubsPtr->tcl_GetVersion) /* 279 */ +#endif +#ifndef Tcl_InitMemory +#define Tcl_InitMemory \ + (tclStubsPtr->tcl_InitMemory) /* 280 */ +#endif +#ifndef Tcl_StackChannel +#define Tcl_StackChannel \ + (tclStubsPtr->tcl_StackChannel) /* 281 */ +#endif +#ifndef Tcl_UnstackChannel +#define Tcl_UnstackChannel \ + (tclStubsPtr->tcl_UnstackChannel) /* 282 */ +#endif +#ifndef Tcl_GetStackedChannel +#define Tcl_GetStackedChannel \ + (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ +#endif +#ifndef Tcl_SetMainLoop +#define Tcl_SetMainLoop \ + (tclStubsPtr->tcl_SetMainLoop) /* 284 */ +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj +#define Tcl_AppendObjToObj \ + (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ +#endif +#ifndef Tcl_CreateEncoding +#define Tcl_CreateEncoding \ + (tclStubsPtr->tcl_CreateEncoding) /* 287 */ +#endif +#ifndef Tcl_CreateThreadExitHandler +#define Tcl_CreateThreadExitHandler \ + (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ +#endif +#ifndef Tcl_DeleteThreadExitHandler +#define Tcl_DeleteThreadExitHandler \ + (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ +#endif +#ifndef Tcl_DiscardResult +#define Tcl_DiscardResult \ + (tclStubsPtr->tcl_DiscardResult) /* 290 */ +#endif +#ifndef Tcl_EvalEx +#define Tcl_EvalEx \ + (tclStubsPtr->tcl_EvalEx) /* 291 */ +#endif +#ifndef Tcl_EvalObjv +#define Tcl_EvalObjv \ + (tclStubsPtr->tcl_EvalObjv) /* 292 */ +#endif +#ifndef Tcl_EvalObjEx +#define Tcl_EvalObjEx \ + (tclStubsPtr->tcl_EvalObjEx) /* 293 */ +#endif +#ifndef Tcl_ExitThread +#define Tcl_ExitThread \ + (tclStubsPtr->tcl_ExitThread) /* 294 */ +#endif +#ifndef Tcl_ExternalToUtf +#define Tcl_ExternalToUtf \ + (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ +#endif +#ifndef Tcl_ExternalToUtfDString +#define Tcl_ExternalToUtfDString \ + (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ +#endif +#ifndef Tcl_FinalizeThread +#define Tcl_FinalizeThread \ + (tclStubsPtr->tcl_FinalizeThread) /* 297 */ +#endif +#ifndef Tcl_FinalizeNotifier +#define Tcl_FinalizeNotifier \ + (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ +#endif +#ifndef Tcl_FreeEncoding +#define Tcl_FreeEncoding \ + (tclStubsPtr->tcl_FreeEncoding) /* 299 */ +#endif +#ifndef Tcl_GetCurrentThread +#define Tcl_GetCurrentThread \ + (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ +#endif +#ifndef Tcl_GetEncoding +#define Tcl_GetEncoding \ + (tclStubsPtr->tcl_GetEncoding) /* 301 */ +#endif +#ifndef Tcl_GetEncodingName +#define Tcl_GetEncodingName \ + (tclStubsPtr->tcl_GetEncodingName) /* 302 */ +#endif +#ifndef Tcl_GetEncodingNames +#define Tcl_GetEncodingNames \ + (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ +#endif +#ifndef Tcl_GetIndexFromObjStruct +#define Tcl_GetIndexFromObjStruct \ + (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ +#endif +#ifndef Tcl_GetThreadData +#define Tcl_GetThreadData \ + (tclStubsPtr->tcl_GetThreadData) /* 305 */ +#endif +#ifndef Tcl_GetVar2Ex +#define Tcl_GetVar2Ex \ + (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ +#endif +#ifndef Tcl_InitNotifier +#define Tcl_InitNotifier \ + (tclStubsPtr->tcl_InitNotifier) /* 307 */ +#endif +#ifndef Tcl_MutexLock +#define Tcl_MutexLock \ + (tclStubsPtr->tcl_MutexLock) /* 308 */ +#endif +#ifndef Tcl_MutexUnlock +#define Tcl_MutexUnlock \ + (tclStubsPtr->tcl_MutexUnlock) /* 309 */ +#endif +#ifndef Tcl_ConditionNotify +#define Tcl_ConditionNotify \ + (tclStubsPtr->tcl_ConditionNotify) /* 310 */ +#endif +#ifndef Tcl_ConditionWait +#define Tcl_ConditionWait \ + (tclStubsPtr->tcl_ConditionWait) /* 311 */ +#endif +#ifndef Tcl_NumUtfChars +#define Tcl_NumUtfChars \ + (tclStubsPtr->tcl_NumUtfChars) /* 312 */ +#endif +#ifndef Tcl_ReadChars +#define Tcl_ReadChars \ + (tclStubsPtr->tcl_ReadChars) /* 313 */ +#endif +#ifndef Tcl_RestoreResult +#define Tcl_RestoreResult \ + (tclStubsPtr->tcl_RestoreResult) /* 314 */ +#endif +#ifndef Tcl_SaveResult +#define Tcl_SaveResult \ + (tclStubsPtr->tcl_SaveResult) /* 315 */ +#endif +#ifndef Tcl_SetSystemEncoding +#define Tcl_SetSystemEncoding \ + (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ +#endif +#ifndef Tcl_SetVar2Ex +#define Tcl_SetVar2Ex \ + (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ +#endif +#ifndef Tcl_ThreadAlert +#define Tcl_ThreadAlert \ + (tclStubsPtr->tcl_ThreadAlert) /* 318 */ +#endif +#ifndef Tcl_ThreadQueueEvent +#define Tcl_ThreadQueueEvent \ + (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ +#endif +#ifndef Tcl_UniCharAtIndex +#define Tcl_UniCharAtIndex \ + (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ +#endif +#ifndef Tcl_UniCharToLower +#define Tcl_UniCharToLower \ + (tclStubsPtr->tcl_UniCharToLower) /* 321 */ +#endif +#ifndef Tcl_UniCharToTitle +#define Tcl_UniCharToTitle \ + (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ +#endif +#ifndef Tcl_UniCharToUpper +#define Tcl_UniCharToUpper \ + (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ +#endif +#ifndef Tcl_UniCharToUtf +#define Tcl_UniCharToUtf \ + (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ +#endif +#ifndef Tcl_UtfAtIndex +#define Tcl_UtfAtIndex \ + (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ +#endif +#ifndef Tcl_UtfCharComplete +#define Tcl_UtfCharComplete \ + (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ +#endif +#ifndef Tcl_UtfBackslash +#define Tcl_UtfBackslash \ + (tclStubsPtr->tcl_UtfBackslash) /* 327 */ +#endif +#ifndef Tcl_UtfFindFirst +#define Tcl_UtfFindFirst \ + (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ +#endif +#ifndef Tcl_UtfFindLast +#define Tcl_UtfFindLast \ + (tclStubsPtr->tcl_UtfFindLast) /* 329 */ +#endif +#ifndef Tcl_UtfNext +#define Tcl_UtfNext \ + (tclStubsPtr->tcl_UtfNext) /* 330 */ +#endif +#ifndef Tcl_UtfPrev +#define Tcl_UtfPrev \ + (tclStubsPtr->tcl_UtfPrev) /* 331 */ +#endif +#ifndef Tcl_UtfToExternal +#define Tcl_UtfToExternal \ + (tclStubsPtr->tcl_UtfToExternal) /* 332 */ +#endif +#ifndef Tcl_UtfToExternalDString +#define Tcl_UtfToExternalDString \ + (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ +#endif +#ifndef Tcl_UtfToLower +#define Tcl_UtfToLower \ + (tclStubsPtr->tcl_UtfToLower) /* 334 */ +#endif +#ifndef Tcl_UtfToTitle +#define Tcl_UtfToTitle \ + (tclStubsPtr->tcl_UtfToTitle) /* 335 */ +#endif +#ifndef Tcl_UtfToUniChar +#define Tcl_UtfToUniChar \ + (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ +#endif +#ifndef Tcl_UtfToUpper +#define Tcl_UtfToUpper \ + (tclStubsPtr->tcl_UtfToUpper) /* 337 */ +#endif +#ifndef Tcl_WriteChars +#define Tcl_WriteChars \ + (tclStubsPtr->tcl_WriteChars) /* 338 */ +#endif +#ifndef Tcl_WriteObj +#define Tcl_WriteObj \ + (tclStubsPtr->tcl_WriteObj) /* 339 */ +#endif +#ifndef Tcl_GetString +#define Tcl_GetString \ + (tclStubsPtr->tcl_GetString) /* 340 */ +#endif +#ifndef Tcl_GetDefaultEncodingDir +#define Tcl_GetDefaultEncodingDir \ + (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ +#endif +#ifndef Tcl_SetDefaultEncodingDir +#define Tcl_SetDefaultEncodingDir \ + (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ +#endif +#ifndef Tcl_AlertNotifier +#define Tcl_AlertNotifier \ + (tclStubsPtr->tcl_AlertNotifier) /* 343 */ +#endif +#ifndef Tcl_ServiceModeHook +#define Tcl_ServiceModeHook \ + (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ +#endif +#ifndef Tcl_UniCharIsAlnum +#define Tcl_UniCharIsAlnum \ + (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ +#endif +#ifndef Tcl_UniCharIsAlpha +#define Tcl_UniCharIsAlpha \ + (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ +#endif +#ifndef Tcl_UniCharIsDigit +#define Tcl_UniCharIsDigit \ + (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ +#endif +#ifndef Tcl_UniCharIsLower +#define Tcl_UniCharIsLower \ + (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ +#endif +#ifndef Tcl_UniCharIsSpace +#define Tcl_UniCharIsSpace \ + (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ +#endif +#ifndef Tcl_UniCharIsUpper +#define Tcl_UniCharIsUpper \ + (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ +#endif +#ifndef Tcl_UniCharIsWordChar +#define Tcl_UniCharIsWordChar \ + (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ +#endif +#ifndef Tcl_UniCharLen +#define Tcl_UniCharLen \ + (tclStubsPtr->tcl_UniCharLen) /* 352 */ +#endif +#ifndef Tcl_UniCharNcmp +#define Tcl_UniCharNcmp \ + (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ +#endif +#ifndef Tcl_UniCharToUtfDString +#define Tcl_UniCharToUtfDString \ + (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ +#endif +#ifndef Tcl_UtfToUniCharDString +#define Tcl_UtfToUniCharDString \ + (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ +#endif +#ifndef Tcl_GetRegExpFromObj +#define Tcl_GetRegExpFromObj \ + (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ +#endif +#ifndef Tcl_EvalTokens +#define Tcl_EvalTokens \ + (tclStubsPtr->tcl_EvalTokens) /* 357 */ +#endif +#ifndef Tcl_FreeParse +#define Tcl_FreeParse \ + (tclStubsPtr->tcl_FreeParse) /* 358 */ +#endif +#ifndef Tcl_LogCommandInfo +#define Tcl_LogCommandInfo \ + (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ +#endif +#ifndef Tcl_ParseBraces +#define Tcl_ParseBraces \ + (tclStubsPtr->tcl_ParseBraces) /* 360 */ +#endif +#ifndef Tcl_ParseCommand +#define Tcl_ParseCommand \ + (tclStubsPtr->tcl_ParseCommand) /* 361 */ +#endif +#ifndef Tcl_ParseExpr +#define Tcl_ParseExpr \ + (tclStubsPtr->tcl_ParseExpr) /* 362 */ +#endif +#ifndef Tcl_ParseQuotedString +#define Tcl_ParseQuotedString \ + (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ +#endif +#ifndef Tcl_ParseVarName +#define Tcl_ParseVarName \ + (tclStubsPtr->tcl_ParseVarName) /* 364 */ +#endif +#ifndef Tcl_GetCwd +#define Tcl_GetCwd \ + (tclStubsPtr->tcl_GetCwd) /* 365 */ +#endif +#ifndef Tcl_Chdir +#define Tcl_Chdir \ + (tclStubsPtr->tcl_Chdir) /* 366 */ +#endif +#ifndef Tcl_Access +#define Tcl_Access \ + (tclStubsPtr->tcl_Access) /* 367 */ +#endif +#ifndef Tcl_Stat +#define Tcl_Stat \ + (tclStubsPtr->tcl_Stat) /* 368 */ +#endif +#ifndef Tcl_UtfNcmp +#define Tcl_UtfNcmp \ + (tclStubsPtr->tcl_UtfNcmp) /* 369 */ +#endif +#ifndef Tcl_UtfNcasecmp +#define Tcl_UtfNcasecmp \ + (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ +#endif +#ifndef Tcl_StringCaseMatch +#define Tcl_StringCaseMatch \ + (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ +#endif +#ifndef Tcl_UniCharIsControl +#define Tcl_UniCharIsControl \ + (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ +#endif +#ifndef Tcl_UniCharIsGraph +#define Tcl_UniCharIsGraph \ + (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ +#endif +#ifndef Tcl_UniCharIsPrint +#define Tcl_UniCharIsPrint \ + (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ +#endif +#ifndef Tcl_UniCharIsPunct +#define Tcl_UniCharIsPunct \ + (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ +#endif +#ifndef Tcl_RegExpExecObj +#define Tcl_RegExpExecObj \ + (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ +#endif +#ifndef Tcl_RegExpGetInfo +#define Tcl_RegExpGetInfo \ + (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ +#endif +#ifndef Tcl_NewUnicodeObj +#define Tcl_NewUnicodeObj \ + (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ +#endif +#ifndef Tcl_SetUnicodeObj +#define Tcl_SetUnicodeObj \ + (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ +#endif +#ifndef Tcl_GetCharLength +#define Tcl_GetCharLength \ + (tclStubsPtr->tcl_GetCharLength) /* 380 */ +#endif +#ifndef Tcl_GetUniChar +#define Tcl_GetUniChar \ + (tclStubsPtr->tcl_GetUniChar) /* 381 */ +#endif +#ifndef Tcl_GetUnicode +#define Tcl_GetUnicode \ + (tclStubsPtr->tcl_GetUnicode) /* 382 */ +#endif +#ifndef Tcl_GetRange +#define Tcl_GetRange \ + (tclStubsPtr->tcl_GetRange) /* 383 */ +#endif +#ifndef Tcl_AppendUnicodeToObj +#define Tcl_AppendUnicodeToObj \ + (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ +#endif +#ifndef Tcl_RegExpMatchObj +#define Tcl_RegExpMatchObj \ + (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ +#endif +#ifndef Tcl_SetNotifier +#define Tcl_SetNotifier \ + (tclStubsPtr->tcl_SetNotifier) /* 386 */ +#endif +#ifndef Tcl_GetAllocMutex +#define Tcl_GetAllocMutex \ + (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ +#endif +#ifndef Tcl_GetChannelNames +#define Tcl_GetChannelNames \ + (tclStubsPtr->tcl_GetChannelNames) /* 388 */ +#endif +#ifndef Tcl_GetChannelNamesEx +#define Tcl_GetChannelNamesEx \ + (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ +#endif +#ifndef Tcl_ProcObjCmd +#define Tcl_ProcObjCmd \ + (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ +#endif +#ifndef Tcl_ConditionFinalize +#define Tcl_ConditionFinalize \ + (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ +#endif +#ifndef Tcl_MutexFinalize +#define Tcl_MutexFinalize \ + (tclStubsPtr->tcl_MutexFinalize) /* 392 */ +#endif +#ifndef Tcl_CreateThread +#define Tcl_CreateThread \ + (tclStubsPtr->tcl_CreateThread) /* 393 */ +#endif +#ifndef Tcl_ReadRaw +#define Tcl_ReadRaw \ + (tclStubsPtr->tcl_ReadRaw) /* 394 */ +#endif +#ifndef Tcl_WriteRaw +#define Tcl_WriteRaw \ + (tclStubsPtr->tcl_WriteRaw) /* 395 */ +#endif +#ifndef Tcl_GetTopChannel +#define Tcl_GetTopChannel \ + (tclStubsPtr->tcl_GetTopChannel) /* 396 */ +#endif +#ifndef Tcl_ChannelBuffered +#define Tcl_ChannelBuffered \ + (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ +#endif +#ifndef Tcl_ChannelName +#define Tcl_ChannelName \ + (tclStubsPtr->tcl_ChannelName) /* 398 */ +#endif +#ifndef Tcl_ChannelVersion +#define Tcl_ChannelVersion \ + (tclStubsPtr->tcl_ChannelVersion) /* 399 */ +#endif +#ifndef Tcl_ChannelBlockModeProc +#define Tcl_ChannelBlockModeProc \ + (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ +#endif +#ifndef Tcl_ChannelCloseProc +#define Tcl_ChannelCloseProc \ + (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ +#endif +#ifndef Tcl_ChannelClose2Proc +#define Tcl_ChannelClose2Proc \ + (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ +#endif +#ifndef Tcl_ChannelInputProc +#define Tcl_ChannelInputProc \ + (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ +#endif +#ifndef Tcl_ChannelOutputProc +#define Tcl_ChannelOutputProc \ + (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ +#endif +#ifndef Tcl_ChannelSeekProc +#define Tcl_ChannelSeekProc \ + (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ +#endif +#ifndef Tcl_ChannelSetOptionProc +#define Tcl_ChannelSetOptionProc \ + (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ +#endif +#ifndef Tcl_ChannelGetOptionProc +#define Tcl_ChannelGetOptionProc \ + (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ +#endif +#ifndef Tcl_ChannelWatchProc +#define Tcl_ChannelWatchProc \ + (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ +#endif +#ifndef Tcl_ChannelGetHandleProc +#define Tcl_ChannelGetHandleProc \ + (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ +#endif +#ifndef Tcl_ChannelFlushProc +#define Tcl_ChannelFlushProc \ + (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ +#endif +#ifndef Tcl_ChannelHandlerProc +#define Tcl_ChannelHandlerProc \ + (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ +#endif +#ifndef Tcl_JoinThread +#define Tcl_JoinThread \ + (tclStubsPtr->tcl_JoinThread) /* 412 */ +#endif +#ifndef Tcl_IsChannelShared +#define Tcl_IsChannelShared \ + (tclStubsPtr->tcl_IsChannelShared) /* 413 */ +#endif +#ifndef Tcl_IsChannelRegistered +#define Tcl_IsChannelRegistered \ + (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ +#endif +#ifndef Tcl_CutChannel +#define Tcl_CutChannel \ + (tclStubsPtr->tcl_CutChannel) /* 415 */ +#endif +#ifndef Tcl_SpliceChannel +#define Tcl_SpliceChannel \ + (tclStubsPtr->tcl_SpliceChannel) /* 416 */ +#endif +#ifndef Tcl_ClearChannelHandlers +#define Tcl_ClearChannelHandlers \ + (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ +#endif +#ifndef Tcl_IsChannelExisting +#define Tcl_IsChannelExisting \ + (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ +#endif +#ifndef Tcl_UniCharNcasecmp +#define Tcl_UniCharNcasecmp \ + (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ +#endif +#ifndef Tcl_UniCharCaseMatch +#define Tcl_UniCharCaseMatch \ + (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ +#endif +#ifndef Tcl_FindHashEntry +#define Tcl_FindHashEntry \ + (tclStubsPtr->tcl_FindHashEntry) /* 421 */ +#endif +#ifndef Tcl_CreateHashEntry +#define Tcl_CreateHashEntry \ + (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ +#endif +#ifndef Tcl_InitCustomHashTable +#define Tcl_InitCustomHashTable \ + (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ +#endif +#ifndef Tcl_InitObjHashTable +#define Tcl_InitObjHashTable \ + (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ +#endif +#ifndef Tcl_CommandTraceInfo +#define Tcl_CommandTraceInfo \ + (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ +#endif +#ifndef Tcl_TraceCommand +#define Tcl_TraceCommand \ + (tclStubsPtr->tcl_TraceCommand) /* 426 */ +#endif +#ifndef Tcl_UntraceCommand +#define Tcl_UntraceCommand \ + (tclStubsPtr->tcl_UntraceCommand) /* 427 */ +#endif +#ifndef Tcl_AttemptAlloc +#define Tcl_AttemptAlloc \ + (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ +#endif +#ifndef Tcl_AttemptDbCkalloc +#define Tcl_AttemptDbCkalloc \ + (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ +#endif +#ifndef Tcl_AttemptRealloc +#define Tcl_AttemptRealloc \ + (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ +#endif +#ifndef Tcl_AttemptDbCkrealloc +#define Tcl_AttemptDbCkrealloc \ + (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ +#endif +#ifndef Tcl_AttemptSetObjLength +#define Tcl_AttemptSetObjLength \ + (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ +#endif +#ifndef Tcl_GetChannelThread +#define Tcl_GetChannelThread \ + (tclStubsPtr->tcl_GetChannelThread) /* 433 */ +#endif +#ifndef Tcl_GetUnicodeFromObj +#define Tcl_GetUnicodeFromObj \ + (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ +#endif +#ifndef Tcl_GetMathFuncInfo +#define Tcl_GetMathFuncInfo \ + (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ +#endif +#ifndef Tcl_ListMathFuncs +#define Tcl_ListMathFuncs \ + (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ +#endif +#ifndef Tcl_SubstObj +#define Tcl_SubstObj \ + (tclStubsPtr->tcl_SubstObj) /* 437 */ +#endif +#ifndef Tcl_DetachChannel +#define Tcl_DetachChannel \ + (tclStubsPtr->tcl_DetachChannel) /* 438 */ +#endif +#ifndef Tcl_IsStandardChannel +#define Tcl_IsStandardChannel \ + (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ +#endif +#ifndef Tcl_FSCopyFile +#define Tcl_FSCopyFile \ + (tclStubsPtr->tcl_FSCopyFile) /* 440 */ +#endif +#ifndef Tcl_FSCopyDirectory +#define Tcl_FSCopyDirectory \ + (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ +#endif +#ifndef Tcl_FSCreateDirectory +#define Tcl_FSCreateDirectory \ + (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ +#endif +#ifndef Tcl_FSDeleteFile +#define Tcl_FSDeleteFile \ + (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ +#endif +#ifndef Tcl_FSLoadFile +#define Tcl_FSLoadFile \ + (tclStubsPtr->tcl_FSLoadFile) /* 444 */ +#endif +#ifndef Tcl_FSMatchInDirectory +#define Tcl_FSMatchInDirectory \ + (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ +#endif +#ifndef Tcl_FSLink +#define Tcl_FSLink \ + (tclStubsPtr->tcl_FSLink) /* 446 */ +#endif +#ifndef Tcl_FSRemoveDirectory +#define Tcl_FSRemoveDirectory \ + (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ +#endif +#ifndef Tcl_FSRenameFile +#define Tcl_FSRenameFile \ + (tclStubsPtr->tcl_FSRenameFile) /* 448 */ +#endif +#ifndef Tcl_FSLstat +#define Tcl_FSLstat \ + (tclStubsPtr->tcl_FSLstat) /* 449 */ +#endif +#ifndef Tcl_FSUtime +#define Tcl_FSUtime \ + (tclStubsPtr->tcl_FSUtime) /* 450 */ +#endif +#ifndef Tcl_FSFileAttrsGet +#define Tcl_FSFileAttrsGet \ + (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ +#endif +#ifndef Tcl_FSFileAttrsSet +#define Tcl_FSFileAttrsSet \ + (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ +#endif +#ifndef Tcl_FSFileAttrStrings +#define Tcl_FSFileAttrStrings \ + (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ +#endif +#ifndef Tcl_FSStat +#define Tcl_FSStat \ + (tclStubsPtr->tcl_FSStat) /* 454 */ +#endif +#ifndef Tcl_FSAccess +#define Tcl_FSAccess \ + (tclStubsPtr->tcl_FSAccess) /* 455 */ +#endif +#ifndef Tcl_FSOpenFileChannel +#define Tcl_FSOpenFileChannel \ + (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ +#endif +#ifndef Tcl_FSGetCwd +#define Tcl_FSGetCwd \ + (tclStubsPtr->tcl_FSGetCwd) /* 457 */ +#endif +#ifndef Tcl_FSChdir +#define Tcl_FSChdir \ + (tclStubsPtr->tcl_FSChdir) /* 458 */ +#endif +#ifndef Tcl_FSConvertToPathType +#define Tcl_FSConvertToPathType \ + (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ +#endif +#ifndef Tcl_FSJoinPath +#define Tcl_FSJoinPath \ + (tclStubsPtr->tcl_FSJoinPath) /* 460 */ +#endif +#ifndef Tcl_FSSplitPath +#define Tcl_FSSplitPath \ + (tclStubsPtr->tcl_FSSplitPath) /* 461 */ +#endif +#ifndef Tcl_FSEqualPaths +#define Tcl_FSEqualPaths \ + (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ +#endif +#ifndef Tcl_FSGetNormalizedPath +#define Tcl_FSGetNormalizedPath \ + (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ +#endif +#ifndef Tcl_FSJoinToPath +#define Tcl_FSJoinToPath \ + (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ +#endif +#ifndef Tcl_FSGetInternalRep +#define Tcl_FSGetInternalRep \ + (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ +#endif +#ifndef Tcl_FSGetTranslatedPath +#define Tcl_FSGetTranslatedPath \ + (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ +#endif +#ifndef Tcl_FSEvalFile +#define Tcl_FSEvalFile \ + (tclStubsPtr->tcl_FSEvalFile) /* 467 */ +#endif +#ifndef Tcl_FSNewNativePath +#define Tcl_FSNewNativePath \ + (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ +#endif +#ifndef Tcl_FSGetNativePath +#define Tcl_FSGetNativePath \ + (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ +#endif +#ifndef Tcl_FSFileSystemInfo +#define Tcl_FSFileSystemInfo \ + (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ +#endif +#ifndef Tcl_FSPathSeparator +#define Tcl_FSPathSeparator \ + (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ +#endif +#ifndef Tcl_FSListVolumes +#define Tcl_FSListVolumes \ + (tclStubsPtr->tcl_FSListVolumes) /* 472 */ +#endif +#ifndef Tcl_FSRegister +#define Tcl_FSRegister \ + (tclStubsPtr->tcl_FSRegister) /* 473 */ +#endif +#ifndef Tcl_FSUnregister +#define Tcl_FSUnregister \ + (tclStubsPtr->tcl_FSUnregister) /* 474 */ +#endif +#ifndef Tcl_FSData +#define Tcl_FSData \ + (tclStubsPtr->tcl_FSData) /* 475 */ +#endif +#ifndef Tcl_FSGetTranslatedStringPath +#define Tcl_FSGetTranslatedStringPath \ + (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ +#endif +#ifndef Tcl_FSGetFileSystemForPath +#define Tcl_FSGetFileSystemForPath \ + (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ +#endif +#ifndef Tcl_FSGetPathType +#define Tcl_FSGetPathType \ + (tclStubsPtr->tcl_FSGetPathType) /* 478 */ +#endif +#ifndef Tcl_OutputBuffered +#define Tcl_OutputBuffered \ + (tclStubsPtr->tcl_OutputBuffered) /* 479 */ +#endif +#ifndef Tcl_FSMountsChanged +#define Tcl_FSMountsChanged \ + (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ +#endif +#ifndef Tcl_EvalTokensStandard +#define Tcl_EvalTokensStandard \ + (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ +#endif +#ifndef Tcl_GetTime +#define Tcl_GetTime \ + (tclStubsPtr->tcl_GetTime) /* 482 */ +#endif +#ifndef Tcl_CreateObjTrace +#define Tcl_CreateObjTrace \ + (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ +#endif +#ifndef Tcl_GetCommandInfoFromToken +#define Tcl_GetCommandInfoFromToken \ + (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ +#endif +#ifndef Tcl_SetCommandInfoFromToken +#define Tcl_SetCommandInfoFromToken \ + (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ +#endif +#ifndef Tcl_DbNewWideIntObj +#define Tcl_DbNewWideIntObj \ + (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ +#endif +#ifndef Tcl_GetWideIntFromObj +#define Tcl_GetWideIntFromObj \ + (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ +#endif +#ifndef Tcl_NewWideIntObj +#define Tcl_NewWideIntObj \ + (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ +#endif +#ifndef Tcl_SetWideIntObj +#define Tcl_SetWideIntObj \ + (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ +#endif +#ifndef Tcl_AllocStatBuf +#define Tcl_AllocStatBuf \ + (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ +#endif +#ifndef Tcl_Seek +#define Tcl_Seek \ + (tclStubsPtr->tcl_Seek) /* 491 */ +#endif +#ifndef Tcl_Tell +#define Tcl_Tell \ + (tclStubsPtr->tcl_Tell) /* 492 */ +#endif +#ifndef Tcl_ChannelWideSeekProc +#define Tcl_ChannelWideSeekProc \ + (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ +#endif +#ifndef Tcl_DictObjPut +#define Tcl_DictObjPut \ + (tclStubsPtr->tcl_DictObjPut) /* 494 */ +#endif +#ifndef Tcl_DictObjGet +#define Tcl_DictObjGet \ + (tclStubsPtr->tcl_DictObjGet) /* 495 */ +#endif +#ifndef Tcl_DictObjRemove +#define Tcl_DictObjRemove \ + (tclStubsPtr->tcl_DictObjRemove) /* 496 */ +#endif +#ifndef Tcl_DictObjSize +#define Tcl_DictObjSize \ + (tclStubsPtr->tcl_DictObjSize) /* 497 */ +#endif +#ifndef Tcl_DictObjFirst +#define Tcl_DictObjFirst \ + (tclStubsPtr->tcl_DictObjFirst) /* 498 */ +#endif +#ifndef Tcl_DictObjNext +#define Tcl_DictObjNext \ + (tclStubsPtr->tcl_DictObjNext) /* 499 */ +#endif +#ifndef Tcl_DictObjDone +#define Tcl_DictObjDone \ + (tclStubsPtr->tcl_DictObjDone) /* 500 */ +#endif +#ifndef Tcl_DictObjPutKeyList +#define Tcl_DictObjPutKeyList \ + (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ +#endif +#ifndef Tcl_DictObjRemoveKeyList +#define Tcl_DictObjRemoveKeyList \ + (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ +#endif +#ifndef Tcl_NewDictObj +#define Tcl_NewDictObj \ + (tclStubsPtr->tcl_NewDictObj) /* 503 */ +#endif +#ifndef Tcl_DbNewDictObj +#define Tcl_DbNewDictObj \ + (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ +#endif +#ifndef Tcl_RegisterConfig +#define Tcl_RegisterConfig \ + (tclStubsPtr->tcl_RegisterConfig) /* 505 */ +#endif +#ifndef Tcl_CreateNamespace +#define Tcl_CreateNamespace \ + (tclStubsPtr->tcl_CreateNamespace) /* 506 */ +#endif +#ifndef Tcl_DeleteNamespace +#define Tcl_DeleteNamespace \ + (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ +#endif +#ifndef Tcl_AppendExportList +#define Tcl_AppendExportList \ + (tclStubsPtr->tcl_AppendExportList) /* 508 */ +#endif +#ifndef Tcl_Export +#define Tcl_Export \ + (tclStubsPtr->tcl_Export) /* 509 */ +#endif +#ifndef Tcl_Import +#define Tcl_Import \ + (tclStubsPtr->tcl_Import) /* 510 */ +#endif +#ifndef Tcl_ForgetImport +#define Tcl_ForgetImport \ + (tclStubsPtr->tcl_ForgetImport) /* 511 */ +#endif +#ifndef Tcl_GetCurrentNamespace +#define Tcl_GetCurrentNamespace \ + (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ +#endif +#ifndef Tcl_GetGlobalNamespace +#define Tcl_GetGlobalNamespace \ + (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ +#endif +#ifndef Tcl_FindNamespace +#define Tcl_FindNamespace \ + (tclStubsPtr->tcl_FindNamespace) /* 514 */ +#endif +#ifndef Tcl_FindCommand +#define Tcl_FindCommand \ + (tclStubsPtr->tcl_FindCommand) /* 515 */ +#endif +#ifndef Tcl_GetCommandFromObj +#define Tcl_GetCommandFromObj \ + (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ +#endif +#ifndef Tcl_GetCommandFullName +#define Tcl_GetCommandFullName \ + (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ +#endif +#ifndef Tcl_FSEvalFileEx +#define Tcl_FSEvalFileEx \ + (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ +#endif +#ifndef Tcl_SetExitProc +#define Tcl_SetExitProc \ + (tclStubsPtr->tcl_SetExitProc) /* 519 */ +#endif +#ifndef Tcl_LimitAddHandler +#define Tcl_LimitAddHandler \ + (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ +#endif +#ifndef Tcl_LimitRemoveHandler +#define Tcl_LimitRemoveHandler \ + (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ +#endif +#ifndef Tcl_LimitReady +#define Tcl_LimitReady \ + (tclStubsPtr->tcl_LimitReady) /* 522 */ +#endif +#ifndef Tcl_LimitCheck +#define Tcl_LimitCheck \ + (tclStubsPtr->tcl_LimitCheck) /* 523 */ +#endif +#ifndef Tcl_LimitExceeded +#define Tcl_LimitExceeded \ + (tclStubsPtr->tcl_LimitExceeded) /* 524 */ +#endif +#ifndef Tcl_LimitSetCommands +#define Tcl_LimitSetCommands \ + (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ +#endif +#ifndef Tcl_LimitSetTime +#define Tcl_LimitSetTime \ + (tclStubsPtr->tcl_LimitSetTime) /* 526 */ +#endif +#ifndef Tcl_LimitSetGranularity +#define Tcl_LimitSetGranularity \ + (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ +#endif +#ifndef Tcl_LimitTypeEnabled +#define Tcl_LimitTypeEnabled \ + (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ +#endif +#ifndef Tcl_LimitTypeExceeded +#define Tcl_LimitTypeExceeded \ + (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ +#endif +#ifndef Tcl_LimitTypeSet +#define Tcl_LimitTypeSet \ + (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ +#endif +#ifndef Tcl_LimitTypeReset +#define Tcl_LimitTypeReset \ + (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ +#endif +#ifndef Tcl_LimitGetCommands +#define Tcl_LimitGetCommands \ + (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ +#endif +#ifndef Tcl_LimitGetTime +#define Tcl_LimitGetTime \ + (tclStubsPtr->tcl_LimitGetTime) /* 533 */ +#endif +#ifndef Tcl_LimitGetGranularity +#define Tcl_LimitGetGranularity \ + (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ +#endif +#ifndef Tcl_SaveInterpState +#define Tcl_SaveInterpState \ + (tclStubsPtr->tcl_SaveInterpState) /* 535 */ +#endif +#ifndef Tcl_RestoreInterpState +#define Tcl_RestoreInterpState \ + (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ +#endif +#ifndef Tcl_DiscardInterpState +#define Tcl_DiscardInterpState \ + (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ +#endif +#ifndef Tcl_SetReturnOptions +#define Tcl_SetReturnOptions \ + (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ +#endif +#ifndef Tcl_GetReturnOptions +#define Tcl_GetReturnOptions \ + (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ +#endif +#ifndef Tcl_IsEnsemble +#define Tcl_IsEnsemble \ + (tclStubsPtr->tcl_IsEnsemble) /* 540 */ +#endif +#ifndef Tcl_CreateEnsemble +#define Tcl_CreateEnsemble \ + (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ +#endif +#ifndef Tcl_FindEnsemble +#define Tcl_FindEnsemble \ + (tclStubsPtr->tcl_FindEnsemble) /* 542 */ +#endif +#ifndef Tcl_SetEnsembleSubcommandList +#define Tcl_SetEnsembleSubcommandList \ + (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ +#endif +#ifndef Tcl_SetEnsembleMappingDict +#define Tcl_SetEnsembleMappingDict \ + (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ +#endif +#ifndef Tcl_SetEnsembleUnknownHandler +#define Tcl_SetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ +#endif +#ifndef Tcl_SetEnsembleFlags +#define Tcl_SetEnsembleFlags \ + (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ +#endif +#ifndef Tcl_GetEnsembleSubcommandList +#define Tcl_GetEnsembleSubcommandList \ + (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ +#endif +#ifndef Tcl_GetEnsembleMappingDict +#define Tcl_GetEnsembleMappingDict \ + (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ +#endif +#ifndef Tcl_GetEnsembleUnknownHandler +#define Tcl_GetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ +#endif +#ifndef Tcl_GetEnsembleFlags +#define Tcl_GetEnsembleFlags \ + (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ +#endif +#ifndef Tcl_GetEnsembleNamespace +#define Tcl_GetEnsembleNamespace \ + (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ +#endif +#ifndef Tcl_SetTimeProc +#define Tcl_SetTimeProc \ + (tclStubsPtr->tcl_SetTimeProc) /* 552 */ +#endif +#ifndef Tcl_QueryTimeProc +#define Tcl_QueryTimeProc \ + (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ +#endif +#ifndef Tcl_ChannelThreadActionProc +#define Tcl_ChannelThreadActionProc \ + (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ +#endif +#ifndef Tcl_NewBignumObj +#define Tcl_NewBignumObj \ + (tclStubsPtr->tcl_NewBignumObj) /* 555 */ +#endif +#ifndef Tcl_DbNewBignumObj +#define Tcl_DbNewBignumObj \ + (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ +#endif +#ifndef Tcl_SetBignumObj +#define Tcl_SetBignumObj \ + (tclStubsPtr->tcl_SetBignumObj) /* 557 */ +#endif +#ifndef Tcl_GetBignumFromObj +#define Tcl_GetBignumFromObj \ + (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ +#endif +#ifndef Tcl_TakeBignumFromObj +#define Tcl_TakeBignumFromObj \ + (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ +#endif +#ifndef Tcl_TruncateChannel +#define Tcl_TruncateChannel \ + (tclStubsPtr->tcl_TruncateChannel) /* 560 */ +#endif +#ifndef Tcl_ChannelTruncateProc +#define Tcl_ChannelTruncateProc \ + (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ +#endif +#ifndef Tcl_SetChannelErrorInterp +#define Tcl_SetChannelErrorInterp \ + (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ +#endif +#ifndef Tcl_GetChannelErrorInterp +#define Tcl_GetChannelErrorInterp \ + (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ +#endif +#ifndef Tcl_SetChannelError +#define Tcl_SetChannelError \ + (tclStubsPtr->tcl_SetChannelError) /* 564 */ +#endif +#ifndef Tcl_GetChannelError +#define Tcl_GetChannelError \ + (tclStubsPtr->tcl_GetChannelError) /* 565 */ +#endif +#ifndef Tcl_InitBignumFromDouble +#define Tcl_InitBignumFromDouble \ + (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ +#endif +#ifndef Tcl_GetNamespaceUnknownHandler +#define Tcl_GetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ +#endif +#ifndef Tcl_SetNamespaceUnknownHandler +#define Tcl_SetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ +#endif +#ifndef Tcl_GetEncodingFromObj +#define Tcl_GetEncodingFromObj \ + (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ +#endif +#ifndef Tcl_GetEncodingSearchPath +#define Tcl_GetEncodingSearchPath \ + (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ +#endif +#ifndef Tcl_SetEncodingSearchPath +#define Tcl_SetEncodingSearchPath \ + (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment +#define Tcl_GetEncodingNameFromEnvironment \ + (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ +#endif +#ifndef Tcl_PkgRequireProc +#define Tcl_PkgRequireProc \ + (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ +#endif +#ifndef Tcl_AppendObjToErrorInfo +#define Tcl_AppendObjToErrorInfo \ + (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ +#endif +#ifndef Tcl_AppendLimitedToObj +#define Tcl_AppendLimitedToObj \ + (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ +#endif +#ifndef Tcl_Format +#define Tcl_Format \ + (tclStubsPtr->tcl_Format) /* 576 */ +#endif +#ifndef Tcl_AppendFormatToObj +#define Tcl_AppendFormatToObj \ + (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ +#endif +#ifndef Tcl_ObjPrintf +#define Tcl_ObjPrintf \ + (tclStubsPtr->tcl_ObjPrintf) /* 578 */ +#endif +#ifndef Tcl_AppendPrintfToObj +#define Tcl_AppendPrintfToObj \ + (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ +#endif +#ifndef Tcl_CancelEval +#define Tcl_CancelEval \ + (tclStubsPtr->tcl_CancelEval) /* 580 */ +#endif +#ifndef Tcl_Canceled +#define Tcl_Canceled \ + (tclStubsPtr->tcl_Canceled) /* 581 */ +#endif +#ifndef Tcl_NRCreateCommand +#define Tcl_NRCreateCommand \ + (tclStubsPtr->tcl_NRCreateCommand) /* 582 */ +#endif +#ifndef Tcl_NREvalObj +#define Tcl_NREvalObj \ + (tclStubsPtr->tcl_NREvalObj) /* 583 */ +#endif +#ifndef Tcl_NREvalObjv +#define Tcl_NREvalObjv \ + (tclStubsPtr->tcl_NREvalObjv) /* 584 */ +#endif +#ifndef Tcl_NRCmdSwap +#define Tcl_NRCmdSwap \ + (tclStubsPtr->tcl_NRCmdSwap) /* 585 */ +#endif +#ifndef Tcl_NRAddCallback +#define Tcl_NRAddCallback \ + (tclStubsPtr->tcl_NRAddCallback) /* 586 */ +#endif +#ifndef Tcl_NRCallObjProc +#define Tcl_NRCallObjProc \ + (tclStubsPtr->tcl_NRCallObjProc) /* 587 */ +#endif +#ifndef Tcl_CreatePipe +#define Tcl_CreatePipe \ + (tclStubsPtr->tcl_CreatePipe) /* 588 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLDECLS */ + diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 856da1d..1190867 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -1,2161 +1,2161 @@ -/* - * tclIntDecls.h -- - * - * This file contains the declarations for all unsupported - * functions that are exported by the Tcl library. These - * interfaces are not guaranteed to remain the same between - * versions. Use at your own risk. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclIntDecls.h,v 1.119 2008/07/21 21:02:17 ferrieux Exp $ - */ - -#ifndef _TCLINTDECLS -#define _TCLINTDECLS - -#include "tclPort.h" - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclInt.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -/* Slot 0 is reserved */ -/* Slot 1 is reserved */ -/* Slot 2 is reserved */ -#ifndef TclAllocateFreeObjects_TCL_DECLARED -#define TclAllocateFreeObjects_TCL_DECLARED -/* 3 */ -EXTERN void TclAllocateFreeObjects (void); -#endif -/* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* MACOSX */ -#ifndef TclCleanupCommand_TCL_DECLARED -#define TclCleanupCommand_TCL_DECLARED -/* 6 */ -EXTERN void TclCleanupCommand (Command * cmdPtr); -#endif -#ifndef TclCopyAndCollapse_TCL_DECLARED -#define TclCopyAndCollapse_TCL_DECLARED -/* 7 */ -EXTERN int TclCopyAndCollapse (int count, CONST char * src, - char * dst); -#endif -#ifndef TclCopyChannel_TCL_DECLARED -#define TclCopyChannel_TCL_DECLARED -/* 8 */ -EXTERN int TclCopyChannel (Tcl_Interp * interp, - Tcl_Channel inChan, Tcl_Channel outChan, - int toRead, Tcl_Obj * cmdPtr); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* MACOSX */ -#ifndef TclCreateProc_TCL_DECLARED -#define TclCreateProc_TCL_DECLARED -/* 10 */ -EXTERN int TclCreateProc (Tcl_Interp * interp, - Namespace * nsPtr, CONST char * procName, - Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, - Proc ** procPtrPtr); -#endif -#ifndef TclDeleteCompiledLocalVars_TCL_DECLARED -#define TclDeleteCompiledLocalVars_TCL_DECLARED -/* 11 */ -EXTERN void TclDeleteCompiledLocalVars (Interp * iPtr, - CallFrame * framePtr); -#endif -#ifndef TclDeleteVars_TCL_DECLARED -#define TclDeleteVars_TCL_DECLARED -/* 12 */ -EXTERN void TclDeleteVars (Interp * iPtr, - TclVarHashTable * tablePtr); -#endif -/* Slot 13 is reserved */ -#ifndef TclDumpMemoryInfo_TCL_DECLARED -#define TclDumpMemoryInfo_TCL_DECLARED -/* 14 */ -EXTERN void TclDumpMemoryInfo (FILE * outFile); -#endif -/* Slot 15 is reserved */ -#ifndef TclExprFloatError_TCL_DECLARED -#define TclExprFloatError_TCL_DECLARED -/* 16 */ -EXTERN void TclExprFloatError (Tcl_Interp * interp, double value); -#endif -/* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ -/* Slot 21 is reserved */ -#ifndef TclFindElement_TCL_DECLARED -#define TclFindElement_TCL_DECLARED -/* 22 */ -EXTERN int TclFindElement (Tcl_Interp * interp, - CONST char * listStr, int listLength, - CONST char ** elementPtr, - CONST char ** nextPtr, int * sizePtr, - int * bracePtr); -#endif -#ifndef TclFindProc_TCL_DECLARED -#define TclFindProc_TCL_DECLARED -/* 23 */ -EXTERN Proc * TclFindProc (Interp * iPtr, CONST char * procName); -#endif -/* Slot 24 is reserved */ -#ifndef TclFreePackageInfo_TCL_DECLARED -#define TclFreePackageInfo_TCL_DECLARED -/* 25 */ -EXTERN void TclFreePackageInfo (Interp * iPtr); -#endif -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -#ifndef TclpGetDefaultStdChannel_TCL_DECLARED -#define TclpGetDefaultStdChannel_TCL_DECLARED -/* 28 */ -EXTERN Tcl_Channel TclpGetDefaultStdChannel (int type); -#endif -/* Slot 29 is reserved */ -/* Slot 30 is reserved */ -#ifndef TclGetExtension_TCL_DECLARED -#define TclGetExtension_TCL_DECLARED -/* 31 */ -EXTERN CONST char * TclGetExtension (CONST char * name); -#endif -#ifndef TclGetFrame_TCL_DECLARED -#define TclGetFrame_TCL_DECLARED -/* 32 */ -EXTERN int TclGetFrame (Tcl_Interp * interp, CONST char * str, - CallFrame ** framePtrPtr); -#endif -/* Slot 33 is reserved */ -#ifndef TclGetIntForIndex_TCL_DECLARED -#define TclGetIntForIndex_TCL_DECLARED -/* 34 */ -EXTERN int TclGetIntForIndex (Tcl_Interp * interp, - Tcl_Obj * objPtr, int endValue, - int * indexPtr); -#endif -/* Slot 35 is reserved */ -/* Slot 36 is reserved */ -#ifndef TclGetLoadedPackages_TCL_DECLARED -#define TclGetLoadedPackages_TCL_DECLARED -/* 37 */ -EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, - char * targetName); -#endif -#ifndef TclGetNamespaceForQualName_TCL_DECLARED -#define TclGetNamespaceForQualName_TCL_DECLARED -/* 38 */ -EXTERN int TclGetNamespaceForQualName (Tcl_Interp * interp, - CONST char * qualName, Namespace * cxtNsPtr, - int flags, Namespace ** nsPtrPtr, - Namespace ** altNsPtrPtr, - Namespace ** actualCxtPtrPtr, - CONST char ** simpleNamePtr); -#endif -#ifndef TclGetObjInterpProc_TCL_DECLARED -#define TclGetObjInterpProc_TCL_DECLARED -/* 39 */ -EXTERN TclObjCmdProcType TclGetObjInterpProc (void); -#endif -#ifndef TclGetOpenMode_TCL_DECLARED -#define TclGetOpenMode_TCL_DECLARED -/* 40 */ -EXTERN int TclGetOpenMode (Tcl_Interp * interp, - CONST char * str, int * seekFlagPtr); -#endif -#ifndef TclGetOriginalCommand_TCL_DECLARED -#define TclGetOriginalCommand_TCL_DECLARED -/* 41 */ -EXTERN Tcl_Command TclGetOriginalCommand (Tcl_Command command); -#endif -#ifndef TclpGetUserHome_TCL_DECLARED -#define TclpGetUserHome_TCL_DECLARED -/* 42 */ -EXTERN char * TclpGetUserHome (CONST char * name, - Tcl_DString * bufferPtr); -#endif -/* Slot 43 is reserved */ -#ifndef TclGuessPackageName_TCL_DECLARED -#define TclGuessPackageName_TCL_DECLARED -/* 44 */ -EXTERN int TclGuessPackageName (CONST char * fileName, - Tcl_DString * bufPtr); -#endif -#ifndef TclHideUnsafeCommands_TCL_DECLARED -#define TclHideUnsafeCommands_TCL_DECLARED -/* 45 */ -EXTERN int TclHideUnsafeCommands (Tcl_Interp * interp); -#endif -#ifndef TclInExit_TCL_DECLARED -#define TclInExit_TCL_DECLARED -/* 46 */ -EXTERN int TclInExit (void); -#endif -/* Slot 47 is reserved */ -/* Slot 48 is reserved */ -/* Slot 49 is reserved */ -#ifndef TclInitCompiledLocals_TCL_DECLARED -#define TclInitCompiledLocals_TCL_DECLARED -/* 50 */ -EXTERN void TclInitCompiledLocals (Tcl_Interp * interp, - CallFrame * framePtr, Namespace * nsPtr); -#endif -#ifndef TclInterpInit_TCL_DECLARED -#define TclInterpInit_TCL_DECLARED -/* 51 */ -EXTERN int TclInterpInit (Tcl_Interp * interp); -#endif -/* Slot 52 is reserved */ -#ifndef TclInvokeObjectCommand_TCL_DECLARED -#define TclInvokeObjectCommand_TCL_DECLARED -/* 53 */ -EXTERN int TclInvokeObjectCommand (ClientData clientData, - Tcl_Interp * interp, int argc, - CONST84 char ** argv); -#endif -#ifndef TclInvokeStringCommand_TCL_DECLARED -#define TclInvokeStringCommand_TCL_DECLARED -/* 54 */ -EXTERN int TclInvokeStringCommand (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef TclIsProc_TCL_DECLARED -#define TclIsProc_TCL_DECLARED -/* 55 */ -EXTERN Proc * TclIsProc (Command * cmdPtr); -#endif -/* Slot 56 is reserved */ -/* Slot 57 is reserved */ -#ifndef TclLookupVar_TCL_DECLARED -#define TclLookupVar_TCL_DECLARED -/* 58 */ -EXTERN Var * TclLookupVar (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, CONST char * msg, int createPart1, - int createPart2, Var ** arrayPtrPtr); -#endif -/* Slot 59 is reserved */ -#ifndef TclNeedSpace_TCL_DECLARED -#define TclNeedSpace_TCL_DECLARED -/* 60 */ -EXTERN int TclNeedSpace (CONST char * start, CONST char * end); -#endif -#ifndef TclNewProcBodyObj_TCL_DECLARED -#define TclNewProcBodyObj_TCL_DECLARED -/* 61 */ -EXTERN Tcl_Obj * TclNewProcBodyObj (Proc * procPtr); -#endif -#ifndef TclObjCommandComplete_TCL_DECLARED -#define TclObjCommandComplete_TCL_DECLARED -/* 62 */ -EXTERN int TclObjCommandComplete (Tcl_Obj * cmdPtr); -#endif -#ifndef TclObjInterpProc_TCL_DECLARED -#define TclObjInterpProc_TCL_DECLARED -/* 63 */ -EXTERN int TclObjInterpProc (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); -#endif -#ifndef TclObjInvoke_TCL_DECLARED -#define TclObjInvoke_TCL_DECLARED -/* 64 */ -EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); -#endif -/* Slot 65 is reserved */ -/* Slot 66 is reserved */ -/* Slot 67 is reserved */ -/* Slot 68 is reserved */ -#ifndef TclpAlloc_TCL_DECLARED -#define TclpAlloc_TCL_DECLARED -/* 69 */ -EXTERN char * TclpAlloc (unsigned int size); -#endif -/* Slot 70 is reserved */ -/* Slot 71 is reserved */ -/* Slot 72 is reserved */ -/* Slot 73 is reserved */ -#ifndef TclpFree_TCL_DECLARED -#define TclpFree_TCL_DECLARED -/* 74 */ -EXTERN void TclpFree (char * ptr); -#endif -#ifndef TclpGetClicks_TCL_DECLARED -#define TclpGetClicks_TCL_DECLARED -/* 75 */ -EXTERN unsigned long TclpGetClicks (void); -#endif -#ifndef TclpGetSeconds_TCL_DECLARED -#define TclpGetSeconds_TCL_DECLARED -/* 76 */ -EXTERN unsigned long TclpGetSeconds (void); -#endif -#ifndef TclpGetTime_TCL_DECLARED -#define TclpGetTime_TCL_DECLARED -/* 77 */ -EXTERN void TclpGetTime (Tcl_Time * time); -#endif -#ifndef TclpGetTimeZone_TCL_DECLARED -#define TclpGetTimeZone_TCL_DECLARED -/* 78 */ -EXTERN int TclpGetTimeZone (unsigned long time); -#endif -/* Slot 79 is reserved */ -/* Slot 80 is reserved */ -#ifndef TclpRealloc_TCL_DECLARED -#define TclpRealloc_TCL_DECLARED -/* 81 */ -EXTERN char * TclpRealloc (char * ptr, unsigned int size); -#endif -/* Slot 82 is reserved */ -/* Slot 83 is reserved */ -/* Slot 84 is reserved */ -/* Slot 85 is reserved */ -/* Slot 86 is reserved */ -/* Slot 87 is reserved */ -#ifndef TclPrecTraceProc_TCL_DECLARED -#define TclPrecTraceProc_TCL_DECLARED -/* 88 */ -EXTERN char * TclPrecTraceProc (ClientData clientData, - Tcl_Interp * interp, CONST char * name1, - CONST char * name2, int flags); -#endif -#ifndef TclPreventAliasLoop_TCL_DECLARED -#define TclPreventAliasLoop_TCL_DECLARED -/* 89 */ -EXTERN int TclPreventAliasLoop (Tcl_Interp * interp, - Tcl_Interp * cmdInterp, Tcl_Command cmd); -#endif -/* Slot 90 is reserved */ -#ifndef TclProcCleanupProc_TCL_DECLARED -#define TclProcCleanupProc_TCL_DECLARED -/* 91 */ -EXTERN void TclProcCleanupProc (Proc * procPtr); -#endif -#ifndef TclProcCompileProc_TCL_DECLARED -#define TclProcCompileProc_TCL_DECLARED -/* 92 */ -EXTERN int TclProcCompileProc (Tcl_Interp * interp, - Proc * procPtr, Tcl_Obj * bodyPtr, - Namespace * nsPtr, CONST char * description, - CONST char * procName); -#endif -#ifndef TclProcDeleteProc_TCL_DECLARED -#define TclProcDeleteProc_TCL_DECLARED -/* 93 */ -EXTERN void TclProcDeleteProc (ClientData clientData); -#endif -/* Slot 94 is reserved */ -/* Slot 95 is reserved */ -#ifndef TclRenameCommand_TCL_DECLARED -#define TclRenameCommand_TCL_DECLARED -/* 96 */ -EXTERN int TclRenameCommand (Tcl_Interp * interp, - CONST char * oldName, CONST char * newName); -#endif -#ifndef TclResetShadowedCmdRefs_TCL_DECLARED -#define TclResetShadowedCmdRefs_TCL_DECLARED -/* 97 */ -EXTERN void TclResetShadowedCmdRefs (Tcl_Interp * interp, - Command * newCmdPtr); -#endif -#ifndef TclServiceIdle_TCL_DECLARED -#define TclServiceIdle_TCL_DECLARED -/* 98 */ -EXTERN int TclServiceIdle (void); -#endif -/* Slot 99 is reserved */ -/* Slot 100 is reserved */ -#ifndef TclSetPreInitScript_TCL_DECLARED -#define TclSetPreInitScript_TCL_DECLARED -/* 101 */ -EXTERN char * TclSetPreInitScript (char * string); -#endif -#ifndef TclSetupEnv_TCL_DECLARED -#define TclSetupEnv_TCL_DECLARED -/* 102 */ -EXTERN void TclSetupEnv (Tcl_Interp * interp); -#endif -#ifndef TclSockGetPort_TCL_DECLARED -#define TclSockGetPort_TCL_DECLARED -/* 103 */ -EXTERN int TclSockGetPort (Tcl_Interp * interp, - CONST char * str, CONST char * proto, - int * portPtr); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* MACOSX */ -/* Slot 105 is reserved */ -/* Slot 106 is reserved */ -/* Slot 107 is reserved */ -#ifndef TclTeardownNamespace_TCL_DECLARED -#define TclTeardownNamespace_TCL_DECLARED -/* 108 */ -EXTERN void TclTeardownNamespace (Namespace * nsPtr); -#endif -#ifndef TclUpdateReturnInfo_TCL_DECLARED -#define TclUpdateReturnInfo_TCL_DECLARED -/* 109 */ -EXTERN int TclUpdateReturnInfo (Interp * iPtr); -#endif -/* Slot 110 is reserved */ -#ifndef Tcl_AddInterpResolvers_TCL_DECLARED -#define Tcl_AddInterpResolvers_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_AddInterpResolvers (Tcl_Interp * interp, - CONST char * name, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, - Tcl_ResolveCompiledVarProc * compiledVarProc); -#endif -#ifndef Tcl_AppendExportList_TCL_DECLARED -#define Tcl_AppendExportList_TCL_DECLARED -/* 112 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_CreateNamespace_TCL_DECLARED -#define Tcl_CreateNamespace_TCL_DECLARED -/* 113 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - CONST char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); -#endif -#ifndef Tcl_DeleteNamespace_TCL_DECLARED -#define Tcl_DeleteNamespace_TCL_DECLARED -/* 114 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_Export_TCL_DECLARED -#define Tcl_Export_TCL_DECLARED -/* 115 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int resetListFirst); -#endif -#ifndef Tcl_FindCommand_TCL_DECLARED -#define Tcl_FindCommand_TCL_DECLARED -/* 116 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_FindNamespace_TCL_DECLARED -#define Tcl_FindNamespace_TCL_DECLARED -/* 117 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_GetInterpResolvers_TCL_DECLARED -#define Tcl_GetInterpResolvers_TCL_DECLARED -/* 118 */ -EXTERN int Tcl_GetInterpResolvers (Tcl_Interp * interp, - CONST char * name, - Tcl_ResolverInfo * resInfo); -#endif -#ifndef Tcl_GetNamespaceResolvers_TCL_DECLARED -#define Tcl_GetNamespaceResolvers_TCL_DECLARED -/* 119 */ -EXTERN int Tcl_GetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, - Tcl_ResolverInfo * resInfo); -#endif -#ifndef Tcl_FindNamespaceVar_TCL_DECLARED -#define Tcl_FindNamespaceVar_TCL_DECLARED -/* 120 */ -EXTERN Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp * interp, - CONST char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_ForgetImport_TCL_DECLARED -#define Tcl_ForgetImport_TCL_DECLARED -/* 121 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern); -#endif -#ifndef Tcl_GetCommandFromObj_TCL_DECLARED -#define Tcl_GetCommandFromObj_TCL_DECLARED -/* 122 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCommandFullName_TCL_DECLARED -#define Tcl_GetCommandFullName_TCL_DECLARED -/* 123 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED -#define Tcl_GetCurrentNamespace_TCL_DECLARED -/* 124 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED -#define Tcl_GetGlobalNamespace_TCL_DECLARED -/* 125 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetVariableFullName_TCL_DECLARED -#define Tcl_GetVariableFullName_TCL_DECLARED -/* 126 */ -EXTERN void Tcl_GetVariableFullName (Tcl_Interp * interp, - Tcl_Var variable, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_Import_TCL_DECLARED -#define Tcl_Import_TCL_DECLARED -/* 127 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, - int allowOverwrite); -#endif -#ifndef Tcl_PopCallFrame_TCL_DECLARED -#define Tcl_PopCallFrame_TCL_DECLARED -/* 128 */ -EXTERN void Tcl_PopCallFrame (Tcl_Interp * interp); -#endif -#ifndef Tcl_PushCallFrame_TCL_DECLARED -#define Tcl_PushCallFrame_TCL_DECLARED -/* 129 */ -EXTERN int Tcl_PushCallFrame (Tcl_Interp * interp, - Tcl_CallFrame * framePtr, - Tcl_Namespace * nsPtr, int isProcCallFrame); -#endif -#ifndef Tcl_RemoveInterpResolvers_TCL_DECLARED -#define Tcl_RemoveInterpResolvers_TCL_DECLARED -/* 130 */ -EXTERN int Tcl_RemoveInterpResolvers (Tcl_Interp * interp, - CONST char * name); -#endif -#ifndef Tcl_SetNamespaceResolvers_TCL_DECLARED -#define Tcl_SetNamespaceResolvers_TCL_DECLARED -/* 131 */ -EXTERN void Tcl_SetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, - Tcl_ResolveCompiledVarProc * compiledVarProc); -#endif -#ifndef TclpHasSockets_TCL_DECLARED -#define TclpHasSockets_TCL_DECLARED -/* 132 */ -EXTERN int TclpHasSockets (Tcl_Interp * interp); -#endif -#ifndef TclpGetDate_TCL_DECLARED -#define TclpGetDate_TCL_DECLARED -/* 133 */ -EXTERN struct tm * TclpGetDate (CONST time_t * time, int useGMT); -#endif -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ -/* Slot 136 is reserved */ -/* Slot 137 is reserved */ -#ifndef TclGetEnv_TCL_DECLARED -#define TclGetEnv_TCL_DECLARED -/* 138 */ -EXTERN CONST84_RETURN char * TclGetEnv (CONST char * name, - Tcl_DString * valuePtr); -#endif -/* Slot 139 is reserved */ -/* Slot 140 is reserved */ -#ifndef TclpGetCwd_TCL_DECLARED -#define TclpGetCwd_TCL_DECLARED -/* 141 */ -EXTERN CONST84_RETURN char * TclpGetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); -#endif -#ifndef TclSetByteCodeFromAny_TCL_DECLARED -#define TclSetByteCodeFromAny_TCL_DECLARED -/* 142 */ -EXTERN int TclSetByteCodeFromAny (Tcl_Interp * interp, - Tcl_Obj * objPtr, CompileHookProc * hookProc, - ClientData clientData); -#endif -#ifndef TclAddLiteralObj_TCL_DECLARED -#define TclAddLiteralObj_TCL_DECLARED -/* 143 */ -EXTERN int TclAddLiteralObj (struct CompileEnv * envPtr, - Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); -#endif -#ifndef TclHideLiteral_TCL_DECLARED -#define TclHideLiteral_TCL_DECLARED -/* 144 */ -EXTERN void TclHideLiteral (Tcl_Interp * interp, - struct CompileEnv * envPtr, int index); -#endif -#ifndef TclGetAuxDataType_TCL_DECLARED -#define TclGetAuxDataType_TCL_DECLARED -/* 145 */ -EXTERN struct AuxDataType * TclGetAuxDataType (char * typeName); -#endif -#ifndef TclHandleCreate_TCL_DECLARED -#define TclHandleCreate_TCL_DECLARED -/* 146 */ -EXTERN TclHandle TclHandleCreate (VOID * ptr); -#endif -#ifndef TclHandleFree_TCL_DECLARED -#define TclHandleFree_TCL_DECLARED -/* 147 */ -EXTERN void TclHandleFree (TclHandle handle); -#endif -#ifndef TclHandlePreserve_TCL_DECLARED -#define TclHandlePreserve_TCL_DECLARED -/* 148 */ -EXTERN TclHandle TclHandlePreserve (TclHandle handle); -#endif -#ifndef TclHandleRelease_TCL_DECLARED -#define TclHandleRelease_TCL_DECLARED -/* 149 */ -EXTERN void TclHandleRelease (TclHandle handle); -#endif -#ifndef TclRegAbout_TCL_DECLARED -#define TclRegAbout_TCL_DECLARED -/* 150 */ -EXTERN int TclRegAbout (Tcl_Interp * interp, Tcl_RegExp re); -#endif -#ifndef TclRegExpRangeUniChar_TCL_DECLARED -#define TclRegExpRangeUniChar_TCL_DECLARED -/* 151 */ -EXTERN void TclRegExpRangeUniChar (Tcl_RegExp re, int index, - int * startPtr, int * endPtr); -#endif -#ifndef TclSetLibraryPath_TCL_DECLARED -#define TclSetLibraryPath_TCL_DECLARED -/* 152 */ -EXTERN void TclSetLibraryPath (Tcl_Obj * pathPtr); -#endif -#ifndef TclGetLibraryPath_TCL_DECLARED -#define TclGetLibraryPath_TCL_DECLARED -/* 153 */ -EXTERN Tcl_Obj * TclGetLibraryPath (void); -#endif -/* Slot 154 is reserved */ -/* Slot 155 is reserved */ -#ifndef TclRegError_TCL_DECLARED -#define TclRegError_TCL_DECLARED -/* 156 */ -EXTERN void TclRegError (Tcl_Interp * interp, CONST char * msg, - int status); -#endif -#ifndef TclVarTraceExists_TCL_DECLARED -#define TclVarTraceExists_TCL_DECLARED -/* 157 */ -EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, - CONST char * varName); -#endif -#ifndef TclSetStartupScriptFileName_TCL_DECLARED -#define TclSetStartupScriptFileName_TCL_DECLARED -/* 158 */ -EXTERN void TclSetStartupScriptFileName (CONST char * filename); -#endif -#ifndef TclGetStartupScriptFileName_TCL_DECLARED -#define TclGetStartupScriptFileName_TCL_DECLARED -/* 159 */ -EXTERN CONST84_RETURN char * TclGetStartupScriptFileName (void); -#endif -/* Slot 160 is reserved */ -#ifndef TclChannelTransform_TCL_DECLARED -#define TclChannelTransform_TCL_DECLARED -/* 161 */ -EXTERN int TclChannelTransform (Tcl_Interp * interp, - Tcl_Channel chan, Tcl_Obj * cmdObjPtr); -#endif -#ifndef TclChannelEventScriptInvoker_TCL_DECLARED -#define TclChannelEventScriptInvoker_TCL_DECLARED -/* 162 */ -EXTERN void TclChannelEventScriptInvoker (ClientData clientData, - int flags); -#endif -#ifndef TclGetInstructionTable_TCL_DECLARED -#define TclGetInstructionTable_TCL_DECLARED -/* 163 */ -EXTERN void * TclGetInstructionTable (void); -#endif -#ifndef TclExpandCodeArray_TCL_DECLARED -#define TclExpandCodeArray_TCL_DECLARED -/* 164 */ -EXTERN void TclExpandCodeArray (void * envPtr); -#endif -#ifndef TclpSetInitialEncodings_TCL_DECLARED -#define TclpSetInitialEncodings_TCL_DECLARED -/* 165 */ -EXTERN void TclpSetInitialEncodings (void); -#endif -#ifndef TclListObjSetElement_TCL_DECLARED -#define TclListObjSetElement_TCL_DECLARED -/* 166 */ -EXTERN int TclListObjSetElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj * valuePtr); -#endif -#ifndef TclSetStartupScriptPath_TCL_DECLARED -#define TclSetStartupScriptPath_TCL_DECLARED -/* 167 */ -EXTERN void TclSetStartupScriptPath (Tcl_Obj * pathPtr); -#endif -#ifndef TclGetStartupScriptPath_TCL_DECLARED -#define TclGetStartupScriptPath_TCL_DECLARED -/* 168 */ -EXTERN Tcl_Obj * TclGetStartupScriptPath (void); -#endif -#ifndef TclpUtfNcmp2_TCL_DECLARED -#define TclpUtfNcmp2_TCL_DECLARED -/* 169 */ -EXTERN int TclpUtfNcmp2 (CONST char * s1, CONST char * s2, - unsigned long n); -#endif -#ifndef TclCheckInterpTraces_TCL_DECLARED -#define TclCheckInterpTraces_TCL_DECLARED -/* 170 */ -EXTERN int TclCheckInterpTraces (Tcl_Interp * interp, - CONST char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef TclCheckExecutionTraces_TCL_DECLARED -#define TclCheckExecutionTraces_TCL_DECLARED -/* 171 */ -EXTERN int TclCheckExecutionTraces (Tcl_Interp * interp, - CONST char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]); -#endif -#ifndef TclInThreadExit_TCL_DECLARED -#define TclInThreadExit_TCL_DECLARED -/* 172 */ -EXTERN int TclInThreadExit (void); -#endif -#ifndef TclUniCharMatch_TCL_DECLARED -#define TclUniCharMatch_TCL_DECLARED -/* 173 */ -EXTERN int TclUniCharMatch (CONST Tcl_UniChar * string, - int strLen, CONST Tcl_UniChar * pattern, - int ptnLen, int flags); -#endif -/* Slot 174 is reserved */ -#ifndef TclCallVarTraces_TCL_DECLARED -#define TclCallVarTraces_TCL_DECLARED -/* 175 */ -EXTERN int TclCallVarTraces (Interp * iPtr, Var * arrayPtr, - Var * varPtr, CONST char * part1, - CONST char * part2, int flags, - int leaveErrMsg); -#endif -#ifndef TclCleanupVar_TCL_DECLARED -#define TclCleanupVar_TCL_DECLARED -/* 176 */ -EXTERN void TclCleanupVar (Var * varPtr, Var * arrayPtr); -#endif -#ifndef TclVarErrMsg_TCL_DECLARED -#define TclVarErrMsg_TCL_DECLARED -/* 177 */ -EXTERN void TclVarErrMsg (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - CONST char * operation, CONST char * reason); -#endif -#ifndef Tcl_SetStartupScript_TCL_DECLARED -#define Tcl_SetStartupScript_TCL_DECLARED -/* 178 */ -EXTERN void Tcl_SetStartupScript (Tcl_Obj * pathPtr, - CONST char* encodingName); -#endif -#ifndef Tcl_GetStartupScript_TCL_DECLARED -#define Tcl_GetStartupScript_TCL_DECLARED -/* 179 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript (CONST char ** encodingNamePtr); -#endif -/* Slot 180 is reserved */ -/* Slot 181 is reserved */ -#ifndef TclpLocaltime_TCL_DECLARED -#define TclpLocaltime_TCL_DECLARED -/* 182 */ -EXTERN struct tm * TclpLocaltime (CONST time_t * clock); -#endif -#ifndef TclpGmtime_TCL_DECLARED -#define TclpGmtime_TCL_DECLARED -/* 183 */ -EXTERN struct tm * TclpGmtime (CONST time_t * clock); -#endif -/* Slot 184 is reserved */ -/* Slot 185 is reserved */ -/* Slot 186 is reserved */ -/* Slot 187 is reserved */ -/* Slot 188 is reserved */ -/* Slot 189 is reserved */ -/* Slot 190 is reserved */ -/* Slot 191 is reserved */ -/* Slot 192 is reserved */ -/* Slot 193 is reserved */ -/* Slot 194 is reserved */ -/* Slot 195 is reserved */ -/* Slot 196 is reserved */ -/* Slot 197 is reserved */ -#ifndef TclObjGetFrame_TCL_DECLARED -#define TclObjGetFrame_TCL_DECLARED -/* 198 */ -EXTERN int TclObjGetFrame (Tcl_Interp * interp, - Tcl_Obj * objPtr, CallFrame ** framePtrPtr); -#endif -/* Slot 199 is reserved */ -#ifndef TclpObjRemoveDirectory_TCL_DECLARED -#define TclpObjRemoveDirectory_TCL_DECLARED -/* 200 */ -EXTERN int TclpObjRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); -#endif -#ifndef TclpObjCopyDirectory_TCL_DECLARED -#define TclpObjCopyDirectory_TCL_DECLARED -/* 201 */ -EXTERN int TclpObjCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); -#endif -#ifndef TclpObjCreateDirectory_TCL_DECLARED -#define TclpObjCreateDirectory_TCL_DECLARED -/* 202 */ -EXTERN int TclpObjCreateDirectory (Tcl_Obj * pathPtr); -#endif -#ifndef TclpObjDeleteFile_TCL_DECLARED -#define TclpObjDeleteFile_TCL_DECLARED -/* 203 */ -EXTERN int TclpObjDeleteFile (Tcl_Obj * pathPtr); -#endif -#ifndef TclpObjCopyFile_TCL_DECLARED -#define TclpObjCopyFile_TCL_DECLARED -/* 204 */ -EXTERN int TclpObjCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef TclpObjRenameFile_TCL_DECLARED -#define TclpObjRenameFile_TCL_DECLARED -/* 205 */ -EXTERN int TclpObjRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef TclpObjStat_TCL_DECLARED -#define TclpObjStat_TCL_DECLARED -/* 206 */ -EXTERN int TclpObjStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef TclpObjAccess_TCL_DECLARED -#define TclpObjAccess_TCL_DECLARED -/* 207 */ -EXTERN int TclpObjAccess (Tcl_Obj * pathPtr, int mode); -#endif -#ifndef TclpOpenFileChannel_TCL_DECLARED -#define TclpOpenFileChannel_TCL_DECLARED -/* 208 */ -EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, int mode, int permissions); -#endif -/* Slot 209 is reserved */ -/* Slot 210 is reserved */ -/* Slot 211 is reserved */ -#ifndef TclpFindExecutable_TCL_DECLARED -#define TclpFindExecutable_TCL_DECLARED -/* 212 */ -EXTERN void TclpFindExecutable (CONST char * argv0); -#endif -#ifndef TclGetObjNameOfExecutable_TCL_DECLARED -#define TclGetObjNameOfExecutable_TCL_DECLARED -/* 213 */ -EXTERN Tcl_Obj * TclGetObjNameOfExecutable (void); -#endif -#ifndef TclSetObjNameOfExecutable_TCL_DECLARED -#define TclSetObjNameOfExecutable_TCL_DECLARED -/* 214 */ -EXTERN void TclSetObjNameOfExecutable (Tcl_Obj * name, - Tcl_Encoding encoding); -#endif -#ifndef TclStackAlloc_TCL_DECLARED -#define TclStackAlloc_TCL_DECLARED -/* 215 */ -EXTERN void * TclStackAlloc (Tcl_Interp * interp, int numBytes); -#endif -#ifndef TclStackFree_TCL_DECLARED -#define TclStackFree_TCL_DECLARED -/* 216 */ -EXTERN void TclStackFree (Tcl_Interp * interp, void * freePtr); -#endif -#ifndef TclPushStackFrame_TCL_DECLARED -#define TclPushStackFrame_TCL_DECLARED -/* 217 */ -EXTERN int TclPushStackFrame (Tcl_Interp * interp, - Tcl_CallFrame ** framePtrPtr, - Tcl_Namespace * namespacePtr, - int isProcCallFrame); -#endif -#ifndef TclPopStackFrame_TCL_DECLARED -#define TclPopStackFrame_TCL_DECLARED -/* 218 */ -EXTERN void TclPopStackFrame (Tcl_Interp * interp); -#endif -/* Slot 219 is reserved */ -/* Slot 220 is reserved */ -/* Slot 221 is reserved */ -/* Slot 222 is reserved */ -/* Slot 223 is reserved */ -#ifndef TclGetPlatform_TCL_DECLARED -#define TclGetPlatform_TCL_DECLARED -/* 224 */ -EXTERN TclPlatformType * TclGetPlatform (void); -#endif -#ifndef TclTraceDictPath_TCL_DECLARED -#define TclTraceDictPath_TCL_DECLARED -/* 225 */ -EXTERN Tcl_Obj * TclTraceDictPath (Tcl_Interp * interp, - Tcl_Obj * rootPtr, int keyc, - Tcl_Obj *CONST keyv[], int flags); -#endif -#ifndef TclObjBeingDeleted_TCL_DECLARED -#define TclObjBeingDeleted_TCL_DECLARED -/* 226 */ -EXTERN int TclObjBeingDeleted (Tcl_Obj * objPtr); -#endif -#ifndef TclSetNsPath_TCL_DECLARED -#define TclSetNsPath_TCL_DECLARED -/* 227 */ -EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, - Tcl_Namespace * pathAry[]); -#endif -#ifndef TclObjInterpProcCore_TCL_DECLARED -#define TclObjInterpProcCore_TCL_DECLARED -/* 228 */ -EXTERN int TclObjInterpProcCore (register Tcl_Interp * interp, - Tcl_Obj * procNameObj, int skip, - ProcErrorProc errorProc); -#endif -#ifndef TclPtrMakeUpvar_TCL_DECLARED -#define TclPtrMakeUpvar_TCL_DECLARED -/* 229 */ -EXTERN int TclPtrMakeUpvar (Tcl_Interp * interp, - Var * otherP1Ptr, CONST char * myName, - int myFlags, int index); -#endif -#ifndef TclObjLookupVar_TCL_DECLARED -#define TclObjLookupVar_TCL_DECLARED -/* 230 */ -EXTERN Var * TclObjLookupVar (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, CONST char * part2, - int flags, CONST char * msg, - CONST int createPart1, CONST int createPart2, - Var ** arrayPtrPtr); -#endif -#ifndef TclGetNamespaceFromObj_TCL_DECLARED -#define TclGetNamespaceFromObj_TCL_DECLARED -/* 231 */ -EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); -#endif -#ifndef TclEvalObjEx_TCL_DECLARED -#define TclEvalObjEx_TCL_DECLARED -/* 232 */ -EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags, const CmdFrame * invoker, - int word); -#endif -#ifndef TclGetSrcInfoForPc_TCL_DECLARED -#define TclGetSrcInfoForPc_TCL_DECLARED -/* 233 */ -EXTERN void TclGetSrcInfoForPc (CmdFrame * contextPtr); -#endif -#ifndef TclVarHashCreateVar_TCL_DECLARED -#define TclVarHashCreateVar_TCL_DECLARED -/* 234 */ -EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, - const char * key, int * newPtr); -#endif -#ifndef TclInitVarHashTable_TCL_DECLARED -#define TclInitVarHashTable_TCL_DECLARED -/* 235 */ -EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, - Namespace * nsPtr); -#endif -#ifndef TclBackgroundException_TCL_DECLARED -#define TclBackgroundException_TCL_DECLARED -/* 236 */ -EXTERN void TclBackgroundException (Tcl_Interp * interp, - int code); -#endif -#ifndef TclResetCancellation_TCL_DECLARED -#define TclResetCancellation_TCL_DECLARED -/* 237 */ -EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); -#endif -#ifndef TclEvalObjv_NR2_TCL_DECLARED -#define TclEvalObjv_NR2_TCL_DECLARED -/* 238 */ -EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, - struct TEOV_record * rootPtr); -#endif -/* 239 */ -EXTERN Tcl_ObjCmdProc TclNRInterpProc; -#ifndef TclNRInterpProcCore_TCL_DECLARED -#define TclNRInterpProcCore_TCL_DECLARED -/* 240 */ -EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, - Tcl_Obj * procNameObj, int skip, - ProcErrorProc errorProc); -#endif -#ifndef TclNRPushRecord_TCL_DECLARED -#define TclNRPushRecord_TCL_DECLARED -/* 241 */ -EXTERN struct TEOV_record * TclNRPushRecord (Tcl_Interp * interp); -#endif -#ifndef TclNRPopAndFreeRecord_TCL_DECLARED -#define TclNRPopAndFreeRecord_TCL_DECLARED -/* 242 */ -EXTERN void TclNRPopAndFreeRecord (Tcl_Interp * interp); -#endif -#ifndef TclNREvalObjEx_TCL_DECLARED -#define TclNREvalObjEx_TCL_DECLARED -/* 243 */ -EXTERN int TclNREvalObjEx (Tcl_Interp * interp, - Tcl_Obj * objPtr, int flags, - const CmdFrame * invoker, int word); -#endif - -typedef struct TclIntStubs { - int magic; - CONST struct TclIntStubHooks *hooks; - - void *reserved0; - void *reserved1; - void *reserved2; - void (*tclAllocateFreeObjects) (void); /* 3 */ - void *reserved4; -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* MACOSX */ - void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */ - int (*tclCopyAndCollapse) (int count, CONST char * src, char * dst); /* 7 */ - int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* MACOSX */ - int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, CONST char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ - void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */ - void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */ - void *reserved13; - void (*tclDumpMemoryInfo) (FILE * outFile); /* 14 */ - void *reserved15; - void (*tclExprFloatError) (Tcl_Interp * interp, double value); /* 16 */ - void *reserved17; - void *reserved18; - void *reserved19; - void *reserved20; - void *reserved21; - int (*tclFindElement) (Tcl_Interp * interp, CONST char * listStr, int listLength, CONST char ** elementPtr, CONST char ** nextPtr, int * sizePtr, int * bracePtr); /* 22 */ - Proc * (*tclFindProc) (Interp * iPtr, CONST char * procName); /* 23 */ - void *reserved24; - void (*tclFreePackageInfo) (Interp * iPtr); /* 25 */ - void *reserved26; - void *reserved27; - Tcl_Channel (*tclpGetDefaultStdChannel) (int type); /* 28 */ - void *reserved29; - void *reserved30; - CONST char * (*tclGetExtension) (CONST char * name); /* 31 */ - int (*tclGetFrame) (Tcl_Interp * interp, CONST char * str, CallFrame ** framePtrPtr); /* 32 */ - void *reserved33; - int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ - void *reserved35; - void *reserved36; - int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */ - int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr); /* 38 */ - TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ - int (*tclGetOpenMode) (Tcl_Interp * interp, CONST char * str, int * seekFlagPtr); /* 40 */ - Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ - char * (*tclpGetUserHome) (CONST char * name, Tcl_DString * bufferPtr); /* 42 */ - void *reserved43; - int (*tclGuessPackageName) (CONST char * fileName, Tcl_DString * bufPtr); /* 44 */ - int (*tclHideUnsafeCommands) (Tcl_Interp * interp); /* 45 */ - int (*tclInExit) (void); /* 46 */ - void *reserved47; - void *reserved48; - void *reserved49; - void (*tclInitCompiledLocals) (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); /* 50 */ - int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ - void *reserved52; - int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ - int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 54 */ - Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ - void *reserved56; - void *reserved57; - Var * (*tclLookupVar) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, CONST char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); /* 58 */ - void *reserved59; - int (*tclNeedSpace) (CONST char * start, CONST char * end); /* 60 */ - Tcl_Obj * (*tclNewProcBodyObj) (Proc * procPtr); /* 61 */ - int (*tclObjCommandComplete) (Tcl_Obj * cmdPtr); /* 62 */ - int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 63 */ - int (*tclObjInvoke) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 64 */ - void *reserved65; - void *reserved66; - void *reserved67; - void *reserved68; - char * (*tclpAlloc) (unsigned int size); /* 69 */ - void *reserved70; - void *reserved71; - void *reserved72; - void *reserved73; - void (*tclpFree) (char * ptr); /* 74 */ - unsigned long (*tclpGetClicks) (void); /* 75 */ - unsigned long (*tclpGetSeconds) (void); /* 76 */ - void (*tclpGetTime) (Tcl_Time * time); /* 77 */ - int (*tclpGetTimeZone) (unsigned long time); /* 78 */ - void *reserved79; - void *reserved80; - char * (*tclpRealloc) (char * ptr, unsigned int size); /* 81 */ - void *reserved82; - void *reserved83; - void *reserved84; - void *reserved85; - void *reserved86; - void *reserved87; - char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp * interp, CONST char * name1, CONST char * name2, int flags); /* 88 */ - int (*tclPreventAliasLoop) (Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd); /* 89 */ - void *reserved90; - void (*tclProcCleanupProc) (Proc * procPtr); /* 91 */ - int (*tclProcCompileProc) (Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, CONST char * description, CONST char * procName); /* 92 */ - void (*tclProcDeleteProc) (ClientData clientData); /* 93 */ - void *reserved94; - void *reserved95; - int (*tclRenameCommand) (Tcl_Interp * interp, CONST char * oldName, CONST char * newName); /* 96 */ - void (*tclResetShadowedCmdRefs) (Tcl_Interp * interp, Command * newCmdPtr); /* 97 */ - int (*tclServiceIdle) (void); /* 98 */ - void *reserved99; - void *reserved100; - char * (*tclSetPreInitScript) (char * string); /* 101 */ - void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ - int (*tclSockGetPort) (Tcl_Interp * interp, CONST char * str, CONST char * proto, int * portPtr); /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* MACOSX */ - void *reserved105; - void *reserved106; - void *reserved107; - void (*tclTeardownNamespace) (Namespace * nsPtr); /* 108 */ - int (*tclUpdateReturnInfo) (Interp * iPtr); /* 109 */ - void *reserved110; - void (*tcl_AddInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 111 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 112 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 113 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 114 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 115 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 116 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 117 */ - int (*tcl_GetInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolverInfo * resInfo); /* 118 */ - int (*tcl_GetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo); /* 119 */ - Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 120 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 121 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 122 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 123 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 124 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 125 */ - void (*tcl_GetVariableFullName) (Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr); /* 126 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 127 */ - void (*tcl_PopCallFrame) (Tcl_Interp * interp); /* 128 */ - int (*tcl_PushCallFrame) (Tcl_Interp * interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame); /* 129 */ - int (*tcl_RemoveInterpResolvers) (Tcl_Interp * interp, CONST char * name); /* 130 */ - void (*tcl_SetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 131 */ - int (*tclpHasSockets) (Tcl_Interp * interp); /* 132 */ - struct tm * (*tclpGetDate) (CONST time_t * time, int useGMT); /* 133 */ - void *reserved134; - void *reserved135; - void *reserved136; - void *reserved137; - CONST84_RETURN char * (*tclGetEnv) (CONST char * name, Tcl_DString * valuePtr); /* 138 */ - void *reserved139; - void *reserved140; - CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ - int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ - int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ - void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ - struct AuxDataType * (*tclGetAuxDataType) (char * typeName); /* 145 */ - TclHandle (*tclHandleCreate) (VOID * ptr); /* 146 */ - void (*tclHandleFree) (TclHandle handle); /* 147 */ - TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ - void (*tclHandleRelease) (TclHandle handle); /* 149 */ - int (*tclRegAbout) (Tcl_Interp * interp, Tcl_RegExp re); /* 150 */ - void (*tclRegExpRangeUniChar) (Tcl_RegExp re, int index, int * startPtr, int * endPtr); /* 151 */ - void (*tclSetLibraryPath) (Tcl_Obj * pathPtr); /* 152 */ - Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */ - void *reserved154; - void *reserved155; - void (*tclRegError) (Tcl_Interp * interp, CONST char * msg, int status); /* 156 */ - Var * (*tclVarTraceExists) (Tcl_Interp * interp, CONST char * varName); /* 157 */ - void (*tclSetStartupScriptFileName) (CONST char * filename); /* 158 */ - CONST84_RETURN char * (*tclGetStartupScriptFileName) (void); /* 159 */ - void *reserved160; - int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ - void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ - void * (*tclGetInstructionTable) (void); /* 163 */ - void (*tclExpandCodeArray) (void * envPtr); /* 164 */ - void (*tclpSetInitialEncodings) (void); /* 165 */ - int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ - void (*tclSetStartupScriptPath) (Tcl_Obj * pathPtr); /* 167 */ - Tcl_Obj * (*tclGetStartupScriptPath) (void); /* 168 */ - int (*tclpUtfNcmp2) (CONST char * s1, CONST char * s2, unsigned long n); /* 169 */ - int (*tclCheckInterpTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 170 */ - int (*tclCheckExecutionTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 171 */ - int (*tclInThreadExit) (void); /* 172 */ - int (*tclUniCharMatch) (CONST Tcl_UniChar * string, int strLen, CONST Tcl_UniChar * pattern, int ptnLen, int flags); /* 173 */ - void *reserved174; - int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, CONST char * part1, CONST char * part2, int flags, int leaveErrMsg); /* 175 */ - void (*tclCleanupVar) (Var * varPtr, Var * arrayPtr); /* 176 */ - void (*tclVarErrMsg) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * operation, CONST char * reason); /* 177 */ - void (*tcl_SetStartupScript) (Tcl_Obj * pathPtr, CONST char* encodingName); /* 178 */ - Tcl_Obj * (*tcl_GetStartupScript) (CONST char ** encodingNamePtr); /* 179 */ - void *reserved180; - void *reserved181; - struct tm * (*tclpLocaltime) (CONST time_t * clock); /* 182 */ - struct tm * (*tclpGmtime) (CONST time_t * clock); /* 183 */ - void *reserved184; - void *reserved185; - void *reserved186; - void *reserved187; - void *reserved188; - void *reserved189; - void *reserved190; - void *reserved191; - void *reserved192; - void *reserved193; - void *reserved194; - void *reserved195; - void *reserved196; - void *reserved197; - int (*tclObjGetFrame) (Tcl_Interp * interp, Tcl_Obj * objPtr, CallFrame ** framePtrPtr); /* 198 */ - void *reserved199; - int (*tclpObjRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 200 */ - int (*tclpObjCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 201 */ - int (*tclpObjCreateDirectory) (Tcl_Obj * pathPtr); /* 202 */ - int (*tclpObjDeleteFile) (Tcl_Obj * pathPtr); /* 203 */ - int (*tclpObjCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 204 */ - int (*tclpObjRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 205 */ - int (*tclpObjStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 206 */ - int (*tclpObjAccess) (Tcl_Obj * pathPtr, int mode); /* 207 */ - Tcl_Channel (*tclpOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions); /* 208 */ - void *reserved209; - void *reserved210; - void *reserved211; - void (*tclpFindExecutable) (CONST char * argv0); /* 212 */ - Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */ - void (*tclSetObjNameOfExecutable) (Tcl_Obj * name, Tcl_Encoding encoding); /* 214 */ - void * (*tclStackAlloc) (Tcl_Interp * interp, int numBytes); /* 215 */ - void (*tclStackFree) (Tcl_Interp * interp, void * freePtr); /* 216 */ - int (*tclPushStackFrame) (Tcl_Interp * interp, Tcl_CallFrame ** framePtrPtr, Tcl_Namespace * namespacePtr, int isProcCallFrame); /* 217 */ - void (*tclPopStackFrame) (Tcl_Interp * interp); /* 218 */ - void *reserved219; - void *reserved220; - void *reserved221; - void *reserved222; - void *reserved223; - TclPlatformType * (*tclGetPlatform) (void); /* 224 */ - Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *CONST keyv[], int flags); /* 225 */ - int (*tclObjBeingDeleted) (Tcl_Obj * objPtr); /* 226 */ - void (*tclSetNsPath) (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); /* 227 */ - int (*tclObjInterpProcCore) (register Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 228 */ - int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, CONST char * myName, int myFlags, int index); /* 229 */ - Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, CONST char * part2, int flags, CONST char * msg, CONST int createPart1, CONST int createPart2, Var ** arrayPtrPtr); /* 230 */ - int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ - int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 232 */ - void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ - Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ - void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ - void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ - int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ - int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ - Tcl_ObjCmdProc *tclNRInterpProc; /* 239 */ - int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ - struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ - void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ - int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 243 */ -} TclIntStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclIntStubs *tclIntStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -/* Slot 0 is reserved */ -/* Slot 1 is reserved */ -/* Slot 2 is reserved */ -#ifndef TclAllocateFreeObjects -#define TclAllocateFreeObjects \ - (tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */ -#endif -/* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* MACOSX */ -#ifndef TclCleanupCommand -#define TclCleanupCommand \ - (tclIntStubsPtr->tclCleanupCommand) /* 6 */ -#endif -#ifndef TclCopyAndCollapse -#define TclCopyAndCollapse \ - (tclIntStubsPtr->tclCopyAndCollapse) /* 7 */ -#endif -#ifndef TclCopyChannel -#define TclCopyChannel \ - (tclIntStubsPtr->tclCopyChannel) /* 8 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* MACOSX */ -#ifndef TclCreateProc -#define TclCreateProc \ - (tclIntStubsPtr->tclCreateProc) /* 10 */ -#endif -#ifndef TclDeleteCompiledLocalVars -#define TclDeleteCompiledLocalVars \ - (tclIntStubsPtr->tclDeleteCompiledLocalVars) /* 11 */ -#endif -#ifndef TclDeleteVars -#define TclDeleteVars \ - (tclIntStubsPtr->tclDeleteVars) /* 12 */ -#endif -/* Slot 13 is reserved */ -#ifndef TclDumpMemoryInfo -#define TclDumpMemoryInfo \ - (tclIntStubsPtr->tclDumpMemoryInfo) /* 14 */ -#endif -/* Slot 15 is reserved */ -#ifndef TclExprFloatError -#define TclExprFloatError \ - (tclIntStubsPtr->tclExprFloatError) /* 16 */ -#endif -/* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ -/* Slot 21 is reserved */ -#ifndef TclFindElement -#define TclFindElement \ - (tclIntStubsPtr->tclFindElement) /* 22 */ -#endif -#ifndef TclFindProc -#define TclFindProc \ - (tclIntStubsPtr->tclFindProc) /* 23 */ -#endif -/* Slot 24 is reserved */ -#ifndef TclFreePackageInfo -#define TclFreePackageInfo \ - (tclIntStubsPtr->tclFreePackageInfo) /* 25 */ -#endif -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -#ifndef TclpGetDefaultStdChannel -#define TclpGetDefaultStdChannel \ - (tclIntStubsPtr->tclpGetDefaultStdChannel) /* 28 */ -#endif -/* Slot 29 is reserved */ -/* Slot 30 is reserved */ -#ifndef TclGetExtension -#define TclGetExtension \ - (tclIntStubsPtr->tclGetExtension) /* 31 */ -#endif -#ifndef TclGetFrame -#define TclGetFrame \ - (tclIntStubsPtr->tclGetFrame) /* 32 */ -#endif -/* Slot 33 is reserved */ -#ifndef TclGetIntForIndex -#define TclGetIntForIndex \ - (tclIntStubsPtr->tclGetIntForIndex) /* 34 */ -#endif -/* Slot 35 is reserved */ -/* Slot 36 is reserved */ -#ifndef TclGetLoadedPackages -#define TclGetLoadedPackages \ - (tclIntStubsPtr->tclGetLoadedPackages) /* 37 */ -#endif -#ifndef TclGetNamespaceForQualName -#define TclGetNamespaceForQualName \ - (tclIntStubsPtr->tclGetNamespaceForQualName) /* 38 */ -#endif -#ifndef TclGetObjInterpProc -#define TclGetObjInterpProc \ - (tclIntStubsPtr->tclGetObjInterpProc) /* 39 */ -#endif -#ifndef TclGetOpenMode -#define TclGetOpenMode \ - (tclIntStubsPtr->tclGetOpenMode) /* 40 */ -#endif -#ifndef TclGetOriginalCommand -#define TclGetOriginalCommand \ - (tclIntStubsPtr->tclGetOriginalCommand) /* 41 */ -#endif -#ifndef TclpGetUserHome -#define TclpGetUserHome \ - (tclIntStubsPtr->tclpGetUserHome) /* 42 */ -#endif -/* Slot 43 is reserved */ -#ifndef TclGuessPackageName -#define TclGuessPackageName \ - (tclIntStubsPtr->tclGuessPackageName) /* 44 */ -#endif -#ifndef TclHideUnsafeCommands -#define TclHideUnsafeCommands \ - (tclIntStubsPtr->tclHideUnsafeCommands) /* 45 */ -#endif -#ifndef TclInExit -#define TclInExit \ - (tclIntStubsPtr->tclInExit) /* 46 */ -#endif -/* Slot 47 is reserved */ -/* Slot 48 is reserved */ -/* Slot 49 is reserved */ -#ifndef TclInitCompiledLocals -#define TclInitCompiledLocals \ - (tclIntStubsPtr->tclInitCompiledLocals) /* 50 */ -#endif -#ifndef TclInterpInit -#define TclInterpInit \ - (tclIntStubsPtr->tclInterpInit) /* 51 */ -#endif -/* Slot 52 is reserved */ -#ifndef TclInvokeObjectCommand -#define TclInvokeObjectCommand \ - (tclIntStubsPtr->tclInvokeObjectCommand) /* 53 */ -#endif -#ifndef TclInvokeStringCommand -#define TclInvokeStringCommand \ - (tclIntStubsPtr->tclInvokeStringCommand) /* 54 */ -#endif -#ifndef TclIsProc -#define TclIsProc \ - (tclIntStubsPtr->tclIsProc) /* 55 */ -#endif -/* Slot 56 is reserved */ -/* Slot 57 is reserved */ -#ifndef TclLookupVar -#define TclLookupVar \ - (tclIntStubsPtr->tclLookupVar) /* 58 */ -#endif -/* Slot 59 is reserved */ -#ifndef TclNeedSpace -#define TclNeedSpace \ - (tclIntStubsPtr->tclNeedSpace) /* 60 */ -#endif -#ifndef TclNewProcBodyObj -#define TclNewProcBodyObj \ - (tclIntStubsPtr->tclNewProcBodyObj) /* 61 */ -#endif -#ifndef TclObjCommandComplete -#define TclObjCommandComplete \ - (tclIntStubsPtr->tclObjCommandComplete) /* 62 */ -#endif -#ifndef TclObjInterpProc -#define TclObjInterpProc \ - (tclIntStubsPtr->tclObjInterpProc) /* 63 */ -#endif -#ifndef TclObjInvoke -#define TclObjInvoke \ - (tclIntStubsPtr->tclObjInvoke) /* 64 */ -#endif -/* Slot 65 is reserved */ -/* Slot 66 is reserved */ -/* Slot 67 is reserved */ -/* Slot 68 is reserved */ -#ifndef TclpAlloc -#define TclpAlloc \ - (tclIntStubsPtr->tclpAlloc) /* 69 */ -#endif -/* Slot 70 is reserved */ -/* Slot 71 is reserved */ -/* Slot 72 is reserved */ -/* Slot 73 is reserved */ -#ifndef TclpFree -#define TclpFree \ - (tclIntStubsPtr->tclpFree) /* 74 */ -#endif -#ifndef TclpGetClicks -#define TclpGetClicks \ - (tclIntStubsPtr->tclpGetClicks) /* 75 */ -#endif -#ifndef TclpGetSeconds -#define TclpGetSeconds \ - (tclIntStubsPtr->tclpGetSeconds) /* 76 */ -#endif -#ifndef TclpGetTime -#define TclpGetTime \ - (tclIntStubsPtr->tclpGetTime) /* 77 */ -#endif -#ifndef TclpGetTimeZone -#define TclpGetTimeZone \ - (tclIntStubsPtr->tclpGetTimeZone) /* 78 */ -#endif -/* Slot 79 is reserved */ -/* Slot 80 is reserved */ -#ifndef TclpRealloc -#define TclpRealloc \ - (tclIntStubsPtr->tclpRealloc) /* 81 */ -#endif -/* Slot 82 is reserved */ -/* Slot 83 is reserved */ -/* Slot 84 is reserved */ -/* Slot 85 is reserved */ -/* Slot 86 is reserved */ -/* Slot 87 is reserved */ -#ifndef TclPrecTraceProc -#define TclPrecTraceProc \ - (tclIntStubsPtr->tclPrecTraceProc) /* 88 */ -#endif -#ifndef TclPreventAliasLoop -#define TclPreventAliasLoop \ - (tclIntStubsPtr->tclPreventAliasLoop) /* 89 */ -#endif -/* Slot 90 is reserved */ -#ifndef TclProcCleanupProc -#define TclProcCleanupProc \ - (tclIntStubsPtr->tclProcCleanupProc) /* 91 */ -#endif -#ifndef TclProcCompileProc -#define TclProcCompileProc \ - (tclIntStubsPtr->tclProcCompileProc) /* 92 */ -#endif -#ifndef TclProcDeleteProc -#define TclProcDeleteProc \ - (tclIntStubsPtr->tclProcDeleteProc) /* 93 */ -#endif -/* Slot 94 is reserved */ -/* Slot 95 is reserved */ -#ifndef TclRenameCommand -#define TclRenameCommand \ - (tclIntStubsPtr->tclRenameCommand) /* 96 */ -#endif -#ifndef TclResetShadowedCmdRefs -#define TclResetShadowedCmdRefs \ - (tclIntStubsPtr->tclResetShadowedCmdRefs) /* 97 */ -#endif -#ifndef TclServiceIdle -#define TclServiceIdle \ - (tclIntStubsPtr->tclServiceIdle) /* 98 */ -#endif -/* Slot 99 is reserved */ -/* Slot 100 is reserved */ -#ifndef TclSetPreInitScript -#define TclSetPreInitScript \ - (tclIntStubsPtr->tclSetPreInitScript) /* 101 */ -#endif -#ifndef TclSetupEnv -#define TclSetupEnv \ - (tclIntStubsPtr->tclSetupEnv) /* 102 */ -#endif -#ifndef TclSockGetPort -#define TclSockGetPort \ - (tclIntStubsPtr->tclSockGetPort) /* 103 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* MACOSX */ -/* Slot 105 is reserved */ -/* Slot 106 is reserved */ -/* Slot 107 is reserved */ -#ifndef TclTeardownNamespace -#define TclTeardownNamespace \ - (tclIntStubsPtr->tclTeardownNamespace) /* 108 */ -#endif -#ifndef TclUpdateReturnInfo -#define TclUpdateReturnInfo \ - (tclIntStubsPtr->tclUpdateReturnInfo) /* 109 */ -#endif -/* Slot 110 is reserved */ -#ifndef Tcl_AddInterpResolvers -#define Tcl_AddInterpResolvers \ - (tclIntStubsPtr->tcl_AddInterpResolvers) /* 111 */ -#endif -#ifndef Tcl_AppendExportList -#define Tcl_AppendExportList \ - (tclIntStubsPtr->tcl_AppendExportList) /* 112 */ -#endif -#ifndef Tcl_CreateNamespace -#define Tcl_CreateNamespace \ - (tclIntStubsPtr->tcl_CreateNamespace) /* 113 */ -#endif -#ifndef Tcl_DeleteNamespace -#define Tcl_DeleteNamespace \ - (tclIntStubsPtr->tcl_DeleteNamespace) /* 114 */ -#endif -#ifndef Tcl_Export -#define Tcl_Export \ - (tclIntStubsPtr->tcl_Export) /* 115 */ -#endif -#ifndef Tcl_FindCommand -#define Tcl_FindCommand \ - (tclIntStubsPtr->tcl_FindCommand) /* 116 */ -#endif -#ifndef Tcl_FindNamespace -#define Tcl_FindNamespace \ - (tclIntStubsPtr->tcl_FindNamespace) /* 117 */ -#endif -#ifndef Tcl_GetInterpResolvers -#define Tcl_GetInterpResolvers \ - (tclIntStubsPtr->tcl_GetInterpResolvers) /* 118 */ -#endif -#ifndef Tcl_GetNamespaceResolvers -#define Tcl_GetNamespaceResolvers \ - (tclIntStubsPtr->tcl_GetNamespaceResolvers) /* 119 */ -#endif -#ifndef Tcl_FindNamespaceVar -#define Tcl_FindNamespaceVar \ - (tclIntStubsPtr->tcl_FindNamespaceVar) /* 120 */ -#endif -#ifndef Tcl_ForgetImport -#define Tcl_ForgetImport \ - (tclIntStubsPtr->tcl_ForgetImport) /* 121 */ -#endif -#ifndef Tcl_GetCommandFromObj -#define Tcl_GetCommandFromObj \ - (tclIntStubsPtr->tcl_GetCommandFromObj) /* 122 */ -#endif -#ifndef Tcl_GetCommandFullName -#define Tcl_GetCommandFullName \ - (tclIntStubsPtr->tcl_GetCommandFullName) /* 123 */ -#endif -#ifndef Tcl_GetCurrentNamespace -#define Tcl_GetCurrentNamespace \ - (tclIntStubsPtr->tcl_GetCurrentNamespace) /* 124 */ -#endif -#ifndef Tcl_GetGlobalNamespace -#define Tcl_GetGlobalNamespace \ - (tclIntStubsPtr->tcl_GetGlobalNamespace) /* 125 */ -#endif -#ifndef Tcl_GetVariableFullName -#define Tcl_GetVariableFullName \ - (tclIntStubsPtr->tcl_GetVariableFullName) /* 126 */ -#endif -#ifndef Tcl_Import -#define Tcl_Import \ - (tclIntStubsPtr->tcl_Import) /* 127 */ -#endif -#ifndef Tcl_PopCallFrame -#define Tcl_PopCallFrame \ - (tclIntStubsPtr->tcl_PopCallFrame) /* 128 */ -#endif -#ifndef Tcl_PushCallFrame -#define Tcl_PushCallFrame \ - (tclIntStubsPtr->tcl_PushCallFrame) /* 129 */ -#endif -#ifndef Tcl_RemoveInterpResolvers -#define Tcl_RemoveInterpResolvers \ - (tclIntStubsPtr->tcl_RemoveInterpResolvers) /* 130 */ -#endif -#ifndef Tcl_SetNamespaceResolvers -#define Tcl_SetNamespaceResolvers \ - (tclIntStubsPtr->tcl_SetNamespaceResolvers) /* 131 */ -#endif -#ifndef TclpHasSockets -#define TclpHasSockets \ - (tclIntStubsPtr->tclpHasSockets) /* 132 */ -#endif -#ifndef TclpGetDate -#define TclpGetDate \ - (tclIntStubsPtr->tclpGetDate) /* 133 */ -#endif -/* Slot 134 is reserved */ -/* Slot 135 is reserved */ -/* Slot 136 is reserved */ -/* Slot 137 is reserved */ -#ifndef TclGetEnv -#define TclGetEnv \ - (tclIntStubsPtr->tclGetEnv) /* 138 */ -#endif -/* Slot 139 is reserved */ -/* Slot 140 is reserved */ -#ifndef TclpGetCwd -#define TclpGetCwd \ - (tclIntStubsPtr->tclpGetCwd) /* 141 */ -#endif -#ifndef TclSetByteCodeFromAny -#define TclSetByteCodeFromAny \ - (tclIntStubsPtr->tclSetByteCodeFromAny) /* 142 */ -#endif -#ifndef TclAddLiteralObj -#define TclAddLiteralObj \ - (tclIntStubsPtr->tclAddLiteralObj) /* 143 */ -#endif -#ifndef TclHideLiteral -#define TclHideLiteral \ - (tclIntStubsPtr->tclHideLiteral) /* 144 */ -#endif -#ifndef TclGetAuxDataType -#define TclGetAuxDataType \ - (tclIntStubsPtr->tclGetAuxDataType) /* 145 */ -#endif -#ifndef TclHandleCreate -#define TclHandleCreate \ - (tclIntStubsPtr->tclHandleCreate) /* 146 */ -#endif -#ifndef TclHandleFree -#define TclHandleFree \ - (tclIntStubsPtr->tclHandleFree) /* 147 */ -#endif -#ifndef TclHandlePreserve -#define TclHandlePreserve \ - (tclIntStubsPtr->tclHandlePreserve) /* 148 */ -#endif -#ifndef TclHandleRelease -#define TclHandleRelease \ - (tclIntStubsPtr->tclHandleRelease) /* 149 */ -#endif -#ifndef TclRegAbout -#define TclRegAbout \ - (tclIntStubsPtr->tclRegAbout) /* 150 */ -#endif -#ifndef TclRegExpRangeUniChar -#define TclRegExpRangeUniChar \ - (tclIntStubsPtr->tclRegExpRangeUniChar) /* 151 */ -#endif -#ifndef TclSetLibraryPath -#define TclSetLibraryPath \ - (tclIntStubsPtr->tclSetLibraryPath) /* 152 */ -#endif -#ifndef TclGetLibraryPath -#define TclGetLibraryPath \ - (tclIntStubsPtr->tclGetLibraryPath) /* 153 */ -#endif -/* Slot 154 is reserved */ -/* Slot 155 is reserved */ -#ifndef TclRegError -#define TclRegError \ - (tclIntStubsPtr->tclRegError) /* 156 */ -#endif -#ifndef TclVarTraceExists -#define TclVarTraceExists \ - (tclIntStubsPtr->tclVarTraceExists) /* 157 */ -#endif -#ifndef TclSetStartupScriptFileName -#define TclSetStartupScriptFileName \ - (tclIntStubsPtr->tclSetStartupScriptFileName) /* 158 */ -#endif -#ifndef TclGetStartupScriptFileName -#define TclGetStartupScriptFileName \ - (tclIntStubsPtr->tclGetStartupScriptFileName) /* 159 */ -#endif -/* Slot 160 is reserved */ -#ifndef TclChannelTransform -#define TclChannelTransform \ - (tclIntStubsPtr->tclChannelTransform) /* 161 */ -#endif -#ifndef TclChannelEventScriptInvoker -#define TclChannelEventScriptInvoker \ - (tclIntStubsPtr->tclChannelEventScriptInvoker) /* 162 */ -#endif -#ifndef TclGetInstructionTable -#define TclGetInstructionTable \ - (tclIntStubsPtr->tclGetInstructionTable) /* 163 */ -#endif -#ifndef TclExpandCodeArray -#define TclExpandCodeArray \ - (tclIntStubsPtr->tclExpandCodeArray) /* 164 */ -#endif -#ifndef TclpSetInitialEncodings -#define TclpSetInitialEncodings \ - (tclIntStubsPtr->tclpSetInitialEncodings) /* 165 */ -#endif -#ifndef TclListObjSetElement -#define TclListObjSetElement \ - (tclIntStubsPtr->tclListObjSetElement) /* 166 */ -#endif -#ifndef TclSetStartupScriptPath -#define TclSetStartupScriptPath \ - (tclIntStubsPtr->tclSetStartupScriptPath) /* 167 */ -#endif -#ifndef TclGetStartupScriptPath -#define TclGetStartupScriptPath \ - (tclIntStubsPtr->tclGetStartupScriptPath) /* 168 */ -#endif -#ifndef TclpUtfNcmp2 -#define TclpUtfNcmp2 \ - (tclIntStubsPtr->tclpUtfNcmp2) /* 169 */ -#endif -#ifndef TclCheckInterpTraces -#define TclCheckInterpTraces \ - (tclIntStubsPtr->tclCheckInterpTraces) /* 170 */ -#endif -#ifndef TclCheckExecutionTraces -#define TclCheckExecutionTraces \ - (tclIntStubsPtr->tclCheckExecutionTraces) /* 171 */ -#endif -#ifndef TclInThreadExit -#define TclInThreadExit \ - (tclIntStubsPtr->tclInThreadExit) /* 172 */ -#endif -#ifndef TclUniCharMatch -#define TclUniCharMatch \ - (tclIntStubsPtr->tclUniCharMatch) /* 173 */ -#endif -/* Slot 174 is reserved */ -#ifndef TclCallVarTraces -#define TclCallVarTraces \ - (tclIntStubsPtr->tclCallVarTraces) /* 175 */ -#endif -#ifndef TclCleanupVar -#define TclCleanupVar \ - (tclIntStubsPtr->tclCleanupVar) /* 176 */ -#endif -#ifndef TclVarErrMsg -#define TclVarErrMsg \ - (tclIntStubsPtr->tclVarErrMsg) /* 177 */ -#endif -#ifndef Tcl_SetStartupScript -#define Tcl_SetStartupScript \ - (tclIntStubsPtr->tcl_SetStartupScript) /* 178 */ -#endif -#ifndef Tcl_GetStartupScript -#define Tcl_GetStartupScript \ - (tclIntStubsPtr->tcl_GetStartupScript) /* 179 */ -#endif -/* Slot 180 is reserved */ -/* Slot 181 is reserved */ -#ifndef TclpLocaltime -#define TclpLocaltime \ - (tclIntStubsPtr->tclpLocaltime) /* 182 */ -#endif -#ifndef TclpGmtime -#define TclpGmtime \ - (tclIntStubsPtr->tclpGmtime) /* 183 */ -#endif -/* Slot 184 is reserved */ -/* Slot 185 is reserved */ -/* Slot 186 is reserved */ -/* Slot 187 is reserved */ -/* Slot 188 is reserved */ -/* Slot 189 is reserved */ -/* Slot 190 is reserved */ -/* Slot 191 is reserved */ -/* Slot 192 is reserved */ -/* Slot 193 is reserved */ -/* Slot 194 is reserved */ -/* Slot 195 is reserved */ -/* Slot 196 is reserved */ -/* Slot 197 is reserved */ -#ifndef TclObjGetFrame -#define TclObjGetFrame \ - (tclIntStubsPtr->tclObjGetFrame) /* 198 */ -#endif -/* Slot 199 is reserved */ -#ifndef TclpObjRemoveDirectory -#define TclpObjRemoveDirectory \ - (tclIntStubsPtr->tclpObjRemoveDirectory) /* 200 */ -#endif -#ifndef TclpObjCopyDirectory -#define TclpObjCopyDirectory \ - (tclIntStubsPtr->tclpObjCopyDirectory) /* 201 */ -#endif -#ifndef TclpObjCreateDirectory -#define TclpObjCreateDirectory \ - (tclIntStubsPtr->tclpObjCreateDirectory) /* 202 */ -#endif -#ifndef TclpObjDeleteFile -#define TclpObjDeleteFile \ - (tclIntStubsPtr->tclpObjDeleteFile) /* 203 */ -#endif -#ifndef TclpObjCopyFile -#define TclpObjCopyFile \ - (tclIntStubsPtr->tclpObjCopyFile) /* 204 */ -#endif -#ifndef TclpObjRenameFile -#define TclpObjRenameFile \ - (tclIntStubsPtr->tclpObjRenameFile) /* 205 */ -#endif -#ifndef TclpObjStat -#define TclpObjStat \ - (tclIntStubsPtr->tclpObjStat) /* 206 */ -#endif -#ifndef TclpObjAccess -#define TclpObjAccess \ - (tclIntStubsPtr->tclpObjAccess) /* 207 */ -#endif -#ifndef TclpOpenFileChannel -#define TclpOpenFileChannel \ - (tclIntStubsPtr->tclpOpenFileChannel) /* 208 */ -#endif -/* Slot 209 is reserved */ -/* Slot 210 is reserved */ -/* Slot 211 is reserved */ -#ifndef TclpFindExecutable -#define TclpFindExecutable \ - (tclIntStubsPtr->tclpFindExecutable) /* 212 */ -#endif -#ifndef TclGetObjNameOfExecutable -#define TclGetObjNameOfExecutable \ - (tclIntStubsPtr->tclGetObjNameOfExecutable) /* 213 */ -#endif -#ifndef TclSetObjNameOfExecutable -#define TclSetObjNameOfExecutable \ - (tclIntStubsPtr->tclSetObjNameOfExecutable) /* 214 */ -#endif -#ifndef TclStackAlloc -#define TclStackAlloc \ - (tclIntStubsPtr->tclStackAlloc) /* 215 */ -#endif -#ifndef TclStackFree -#define TclStackFree \ - (tclIntStubsPtr->tclStackFree) /* 216 */ -#endif -#ifndef TclPushStackFrame -#define TclPushStackFrame \ - (tclIntStubsPtr->tclPushStackFrame) /* 217 */ -#endif -#ifndef TclPopStackFrame -#define TclPopStackFrame \ - (tclIntStubsPtr->tclPopStackFrame) /* 218 */ -#endif -/* Slot 219 is reserved */ -/* Slot 220 is reserved */ -/* Slot 221 is reserved */ -/* Slot 222 is reserved */ -/* Slot 223 is reserved */ -#ifndef TclGetPlatform -#define TclGetPlatform \ - (tclIntStubsPtr->tclGetPlatform) /* 224 */ -#endif -#ifndef TclTraceDictPath -#define TclTraceDictPath \ - (tclIntStubsPtr->tclTraceDictPath) /* 225 */ -#endif -#ifndef TclObjBeingDeleted -#define TclObjBeingDeleted \ - (tclIntStubsPtr->tclObjBeingDeleted) /* 226 */ -#endif -#ifndef TclSetNsPath -#define TclSetNsPath \ - (tclIntStubsPtr->tclSetNsPath) /* 227 */ -#endif -#ifndef TclObjInterpProcCore -#define TclObjInterpProcCore \ - (tclIntStubsPtr->tclObjInterpProcCore) /* 228 */ -#endif -#ifndef TclPtrMakeUpvar -#define TclPtrMakeUpvar \ - (tclIntStubsPtr->tclPtrMakeUpvar) /* 229 */ -#endif -#ifndef TclObjLookupVar -#define TclObjLookupVar \ - (tclIntStubsPtr->tclObjLookupVar) /* 230 */ -#endif -#ifndef TclGetNamespaceFromObj -#define TclGetNamespaceFromObj \ - (tclIntStubsPtr->tclGetNamespaceFromObj) /* 231 */ -#endif -#ifndef TclEvalObjEx -#define TclEvalObjEx \ - (tclIntStubsPtr->tclEvalObjEx) /* 232 */ -#endif -#ifndef TclGetSrcInfoForPc -#define TclGetSrcInfoForPc \ - (tclIntStubsPtr->tclGetSrcInfoForPc) /* 233 */ -#endif -#ifndef TclVarHashCreateVar -#define TclVarHashCreateVar \ - (tclIntStubsPtr->tclVarHashCreateVar) /* 234 */ -#endif -#ifndef TclInitVarHashTable -#define TclInitVarHashTable \ - (tclIntStubsPtr->tclInitVarHashTable) /* 235 */ -#endif -#ifndef TclBackgroundException -#define TclBackgroundException \ - (tclIntStubsPtr->tclBackgroundException) /* 236 */ -#endif -#ifndef TclResetCancellation -#define TclResetCancellation \ - (tclIntStubsPtr->tclResetCancellation) /* 237 */ -#endif -#ifndef TclEvalObjv_NR2 -#define TclEvalObjv_NR2 \ - (tclIntStubsPtr->tclEvalObjv_NR2) /* 238 */ -#endif -#ifndef TclNRInterpProc -#define TclNRInterpProc \ - (*tclIntStubsPtr->tclNRInterpProc) /* 239 */ -#endif -#ifndef TclNRInterpProcCore -#define TclNRInterpProcCore \ - (tclIntStubsPtr->tclNRInterpProcCore) /* 240 */ -#endif -#ifndef TclNRPushRecord -#define TclNRPushRecord \ - (tclIntStubsPtr->tclNRPushRecord) /* 241 */ -#endif -#ifndef TclNRPopAndFreeRecord -#define TclNRPopAndFreeRecord \ - (tclIntStubsPtr->tclNRPopAndFreeRecord) /* 242 */ -#endif -#ifndef TclNREvalObjEx -#define TclNREvalObjEx \ - (tclIntStubsPtr->tclNREvalObjEx) /* 243 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLINTDECLS */ +/* + * tclIntDecls.h -- + * + * This file contains the declarations for all unsupported + * functions that are exported by the Tcl library. These + * interfaces are not guaranteed to remain the same between + * versions. Use at your own risk. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclIntDecls.h,v 1.120 2008/07/22 23:01:36 das Exp $ + */ + +#ifndef _TCLINTDECLS +#define _TCLINTDECLS + +#include "tclPort.h" + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclInt.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +/* Slot 0 is reserved */ +/* Slot 1 is reserved */ +/* Slot 2 is reserved */ +#ifndef TclAllocateFreeObjects_TCL_DECLARED +#define TclAllocateFreeObjects_TCL_DECLARED +/* 3 */ +EXTERN void TclAllocateFreeObjects (void); +#endif +/* Slot 4 is reserved */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCleanupChildren_TCL_DECLARED +#define TclCleanupChildren_TCL_DECLARED +/* 5 */ +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, + Tcl_Pid * pidPtr, Tcl_Channel errorChan); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCleanupChildren_TCL_DECLARED +#define TclCleanupChildren_TCL_DECLARED +/* 5 */ +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, + Tcl_Pid * pidPtr, Tcl_Channel errorChan); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCleanupChildren_TCL_DECLARED +#define TclCleanupChildren_TCL_DECLARED +/* 5 */ +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, + Tcl_Pid * pidPtr, Tcl_Channel errorChan); +#endif +#endif /* MACOSX */ +#ifndef TclCleanupCommand_TCL_DECLARED +#define TclCleanupCommand_TCL_DECLARED +/* 6 */ +EXTERN void TclCleanupCommand (Command * cmdPtr); +#endif +#ifndef TclCopyAndCollapse_TCL_DECLARED +#define TclCopyAndCollapse_TCL_DECLARED +/* 7 */ +EXTERN int TclCopyAndCollapse (int count, CONST char * src, + char * dst); +#endif +#ifndef TclCopyChannel_TCL_DECLARED +#define TclCopyChannel_TCL_DECLARED +/* 8 */ +EXTERN int TclCopyChannel (Tcl_Interp * interp, + Tcl_Channel inChan, Tcl_Channel outChan, + int toRead, Tcl_Obj * cmdPtr); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCreatePipeline_TCL_DECLARED +#define TclCreatePipeline_TCL_DECLARED +/* 9 */ +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + CONST char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, + TclFile * errFilePtr); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCreatePipeline_TCL_DECLARED +#define TclCreatePipeline_TCL_DECLARED +/* 9 */ +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + CONST char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, + TclFile * errFilePtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCreatePipeline_TCL_DECLARED +#define TclCreatePipeline_TCL_DECLARED +/* 9 */ +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + CONST char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, + TclFile * errFilePtr); +#endif +#endif /* MACOSX */ +#ifndef TclCreateProc_TCL_DECLARED +#define TclCreateProc_TCL_DECLARED +/* 10 */ +EXTERN int TclCreateProc (Tcl_Interp * interp, + Namespace * nsPtr, CONST char * procName, + Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, + Proc ** procPtrPtr); +#endif +#ifndef TclDeleteCompiledLocalVars_TCL_DECLARED +#define TclDeleteCompiledLocalVars_TCL_DECLARED +/* 11 */ +EXTERN void TclDeleteCompiledLocalVars (Interp * iPtr, + CallFrame * framePtr); +#endif +#ifndef TclDeleteVars_TCL_DECLARED +#define TclDeleteVars_TCL_DECLARED +/* 12 */ +EXTERN void TclDeleteVars (Interp * iPtr, + TclVarHashTable * tablePtr); +#endif +/* Slot 13 is reserved */ +#ifndef TclDumpMemoryInfo_TCL_DECLARED +#define TclDumpMemoryInfo_TCL_DECLARED +/* 14 */ +EXTERN void TclDumpMemoryInfo (FILE * outFile); +#endif +/* Slot 15 is reserved */ +#ifndef TclExprFloatError_TCL_DECLARED +#define TclExprFloatError_TCL_DECLARED +/* 16 */ +EXTERN void TclExprFloatError (Tcl_Interp * interp, double value); +#endif +/* Slot 17 is reserved */ +/* Slot 18 is reserved */ +/* Slot 19 is reserved */ +/* Slot 20 is reserved */ +/* Slot 21 is reserved */ +#ifndef TclFindElement_TCL_DECLARED +#define TclFindElement_TCL_DECLARED +/* 22 */ +EXTERN int TclFindElement (Tcl_Interp * interp, + CONST char * listStr, int listLength, + CONST char ** elementPtr, + CONST char ** nextPtr, int * sizePtr, + int * bracePtr); +#endif +#ifndef TclFindProc_TCL_DECLARED +#define TclFindProc_TCL_DECLARED +/* 23 */ +EXTERN Proc * TclFindProc (Interp * iPtr, CONST char * procName); +#endif +/* Slot 24 is reserved */ +#ifndef TclFreePackageInfo_TCL_DECLARED +#define TclFreePackageInfo_TCL_DECLARED +/* 25 */ +EXTERN void TclFreePackageInfo (Interp * iPtr); +#endif +/* Slot 26 is reserved */ +/* Slot 27 is reserved */ +#ifndef TclpGetDefaultStdChannel_TCL_DECLARED +#define TclpGetDefaultStdChannel_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Channel TclpGetDefaultStdChannel (int type); +#endif +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +#ifndef TclGetExtension_TCL_DECLARED +#define TclGetExtension_TCL_DECLARED +/* 31 */ +EXTERN CONST char * TclGetExtension (CONST char * name); +#endif +#ifndef TclGetFrame_TCL_DECLARED +#define TclGetFrame_TCL_DECLARED +/* 32 */ +EXTERN int TclGetFrame (Tcl_Interp * interp, CONST char * str, + CallFrame ** framePtrPtr); +#endif +/* Slot 33 is reserved */ +#ifndef TclGetIntForIndex_TCL_DECLARED +#define TclGetIntForIndex_TCL_DECLARED +/* 34 */ +EXTERN int TclGetIntForIndex (Tcl_Interp * interp, + Tcl_Obj * objPtr, int endValue, + int * indexPtr); +#endif +/* Slot 35 is reserved */ +/* Slot 36 is reserved */ +#ifndef TclGetLoadedPackages_TCL_DECLARED +#define TclGetLoadedPackages_TCL_DECLARED +/* 37 */ +EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, + char * targetName); +#endif +#ifndef TclGetNamespaceForQualName_TCL_DECLARED +#define TclGetNamespaceForQualName_TCL_DECLARED +/* 38 */ +EXTERN int TclGetNamespaceForQualName (Tcl_Interp * interp, + CONST char * qualName, Namespace * cxtNsPtr, + int flags, Namespace ** nsPtrPtr, + Namespace ** altNsPtrPtr, + Namespace ** actualCxtPtrPtr, + CONST char ** simpleNamePtr); +#endif +#ifndef TclGetObjInterpProc_TCL_DECLARED +#define TclGetObjInterpProc_TCL_DECLARED +/* 39 */ +EXTERN TclObjCmdProcType TclGetObjInterpProc (void); +#endif +#ifndef TclGetOpenMode_TCL_DECLARED +#define TclGetOpenMode_TCL_DECLARED +/* 40 */ +EXTERN int TclGetOpenMode (Tcl_Interp * interp, + CONST char * str, int * seekFlagPtr); +#endif +#ifndef TclGetOriginalCommand_TCL_DECLARED +#define TclGetOriginalCommand_TCL_DECLARED +/* 41 */ +EXTERN Tcl_Command TclGetOriginalCommand (Tcl_Command command); +#endif +#ifndef TclpGetUserHome_TCL_DECLARED +#define TclpGetUserHome_TCL_DECLARED +/* 42 */ +EXTERN char * TclpGetUserHome (CONST char * name, + Tcl_DString * bufferPtr); +#endif +/* Slot 43 is reserved */ +#ifndef TclGuessPackageName_TCL_DECLARED +#define TclGuessPackageName_TCL_DECLARED +/* 44 */ +EXTERN int TclGuessPackageName (CONST char * fileName, + Tcl_DString * bufPtr); +#endif +#ifndef TclHideUnsafeCommands_TCL_DECLARED +#define TclHideUnsafeCommands_TCL_DECLARED +/* 45 */ +EXTERN int TclHideUnsafeCommands (Tcl_Interp * interp); +#endif +#ifndef TclInExit_TCL_DECLARED +#define TclInExit_TCL_DECLARED +/* 46 */ +EXTERN int TclInExit (void); +#endif +/* Slot 47 is reserved */ +/* Slot 48 is reserved */ +/* Slot 49 is reserved */ +#ifndef TclInitCompiledLocals_TCL_DECLARED +#define TclInitCompiledLocals_TCL_DECLARED +/* 50 */ +EXTERN void TclInitCompiledLocals (Tcl_Interp * interp, + CallFrame * framePtr, Namespace * nsPtr); +#endif +#ifndef TclInterpInit_TCL_DECLARED +#define TclInterpInit_TCL_DECLARED +/* 51 */ +EXTERN int TclInterpInit (Tcl_Interp * interp); +#endif +/* Slot 52 is reserved */ +#ifndef TclInvokeObjectCommand_TCL_DECLARED +#define TclInvokeObjectCommand_TCL_DECLARED +/* 53 */ +EXTERN int TclInvokeObjectCommand (ClientData clientData, + Tcl_Interp * interp, int argc, + CONST84 char ** argv); +#endif +#ifndef TclInvokeStringCommand_TCL_DECLARED +#define TclInvokeStringCommand_TCL_DECLARED +/* 54 */ +EXTERN int TclInvokeStringCommand (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef TclIsProc_TCL_DECLARED +#define TclIsProc_TCL_DECLARED +/* 55 */ +EXTERN Proc * TclIsProc (Command * cmdPtr); +#endif +/* Slot 56 is reserved */ +/* Slot 57 is reserved */ +#ifndef TclLookupVar_TCL_DECLARED +#define TclLookupVar_TCL_DECLARED +/* 58 */ +EXTERN Var * TclLookupVar (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + int flags, CONST char * msg, int createPart1, + int createPart2, Var ** arrayPtrPtr); +#endif +/* Slot 59 is reserved */ +#ifndef TclNeedSpace_TCL_DECLARED +#define TclNeedSpace_TCL_DECLARED +/* 60 */ +EXTERN int TclNeedSpace (CONST char * start, CONST char * end); +#endif +#ifndef TclNewProcBodyObj_TCL_DECLARED +#define TclNewProcBodyObj_TCL_DECLARED +/* 61 */ +EXTERN Tcl_Obj * TclNewProcBodyObj (Proc * procPtr); +#endif +#ifndef TclObjCommandComplete_TCL_DECLARED +#define TclObjCommandComplete_TCL_DECLARED +/* 62 */ +EXTERN int TclObjCommandComplete (Tcl_Obj * cmdPtr); +#endif +#ifndef TclObjInterpProc_TCL_DECLARED +#define TclObjInterpProc_TCL_DECLARED +/* 63 */ +EXTERN int TclObjInterpProc (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[]); +#endif +#ifndef TclObjInvoke_TCL_DECLARED +#define TclObjInvoke_TCL_DECLARED +/* 64 */ +EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, + Tcl_Obj *CONST objv[], int flags); +#endif +/* Slot 65 is reserved */ +/* Slot 66 is reserved */ +/* Slot 67 is reserved */ +/* Slot 68 is reserved */ +#ifndef TclpAlloc_TCL_DECLARED +#define TclpAlloc_TCL_DECLARED +/* 69 */ +EXTERN char * TclpAlloc (unsigned int size); +#endif +/* Slot 70 is reserved */ +/* Slot 71 is reserved */ +/* Slot 72 is reserved */ +/* Slot 73 is reserved */ +#ifndef TclpFree_TCL_DECLARED +#define TclpFree_TCL_DECLARED +/* 74 */ +EXTERN void TclpFree (char * ptr); +#endif +#ifndef TclpGetClicks_TCL_DECLARED +#define TclpGetClicks_TCL_DECLARED +/* 75 */ +EXTERN unsigned long TclpGetClicks (void); +#endif +#ifndef TclpGetSeconds_TCL_DECLARED +#define TclpGetSeconds_TCL_DECLARED +/* 76 */ +EXTERN unsigned long TclpGetSeconds (void); +#endif +#ifndef TclpGetTime_TCL_DECLARED +#define TclpGetTime_TCL_DECLARED +/* 77 */ +EXTERN void TclpGetTime (Tcl_Time * time); +#endif +#ifndef TclpGetTimeZone_TCL_DECLARED +#define TclpGetTimeZone_TCL_DECLARED +/* 78 */ +EXTERN int TclpGetTimeZone (unsigned long time); +#endif +/* Slot 79 is reserved */ +/* Slot 80 is reserved */ +#ifndef TclpRealloc_TCL_DECLARED +#define TclpRealloc_TCL_DECLARED +/* 81 */ +EXTERN char * TclpRealloc (char * ptr, unsigned int size); +#endif +/* Slot 82 is reserved */ +/* Slot 83 is reserved */ +/* Slot 84 is reserved */ +/* Slot 85 is reserved */ +/* Slot 86 is reserved */ +/* Slot 87 is reserved */ +#ifndef TclPrecTraceProc_TCL_DECLARED +#define TclPrecTraceProc_TCL_DECLARED +/* 88 */ +EXTERN char * TclPrecTraceProc (ClientData clientData, + Tcl_Interp * interp, CONST char * name1, + CONST char * name2, int flags); +#endif +#ifndef TclPreventAliasLoop_TCL_DECLARED +#define TclPreventAliasLoop_TCL_DECLARED +/* 89 */ +EXTERN int TclPreventAliasLoop (Tcl_Interp * interp, + Tcl_Interp * cmdInterp, Tcl_Command cmd); +#endif +/* Slot 90 is reserved */ +#ifndef TclProcCleanupProc_TCL_DECLARED +#define TclProcCleanupProc_TCL_DECLARED +/* 91 */ +EXTERN void TclProcCleanupProc (Proc * procPtr); +#endif +#ifndef TclProcCompileProc_TCL_DECLARED +#define TclProcCompileProc_TCL_DECLARED +/* 92 */ +EXTERN int TclProcCompileProc (Tcl_Interp * interp, + Proc * procPtr, Tcl_Obj * bodyPtr, + Namespace * nsPtr, CONST char * description, + CONST char * procName); +#endif +#ifndef TclProcDeleteProc_TCL_DECLARED +#define TclProcDeleteProc_TCL_DECLARED +/* 93 */ +EXTERN void TclProcDeleteProc (ClientData clientData); +#endif +/* Slot 94 is reserved */ +/* Slot 95 is reserved */ +#ifndef TclRenameCommand_TCL_DECLARED +#define TclRenameCommand_TCL_DECLARED +/* 96 */ +EXTERN int TclRenameCommand (Tcl_Interp * interp, + CONST char * oldName, CONST char * newName); +#endif +#ifndef TclResetShadowedCmdRefs_TCL_DECLARED +#define TclResetShadowedCmdRefs_TCL_DECLARED +/* 97 */ +EXTERN void TclResetShadowedCmdRefs (Tcl_Interp * interp, + Command * newCmdPtr); +#endif +#ifndef TclServiceIdle_TCL_DECLARED +#define TclServiceIdle_TCL_DECLARED +/* 98 */ +EXTERN int TclServiceIdle (void); +#endif +/* Slot 99 is reserved */ +/* Slot 100 is reserved */ +#ifndef TclSetPreInitScript_TCL_DECLARED +#define TclSetPreInitScript_TCL_DECLARED +/* 101 */ +EXTERN char * TclSetPreInitScript (char * string); +#endif +#ifndef TclSetupEnv_TCL_DECLARED +#define TclSetupEnv_TCL_DECLARED +/* 102 */ +EXTERN void TclSetupEnv (Tcl_Interp * interp); +#endif +#ifndef TclSockGetPort_TCL_DECLARED +#define TclSockGetPort_TCL_DECLARED +/* 103 */ +EXTERN int TclSockGetPort (Tcl_Interp * interp, + CONST char * str, CONST char * proto, + int * portPtr); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclSockMinimumBuffers_TCL_DECLARED +#define TclSockMinimumBuffers_TCL_DECLARED +/* 104 */ +EXTERN int TclSockMinimumBuffers (int sock, int size); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclSockMinimumBuffers_TCL_DECLARED +#define TclSockMinimumBuffers_TCL_DECLARED +/* 104 */ +EXTERN int TclSockMinimumBuffers (int sock, int size); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclSockMinimumBuffers_TCL_DECLARED +#define TclSockMinimumBuffers_TCL_DECLARED +/* 104 */ +EXTERN int TclSockMinimumBuffers (int sock, int size); +#endif +#endif /* MACOSX */ +/* Slot 105 is reserved */ +/* Slot 106 is reserved */ +/* Slot 107 is reserved */ +#ifndef TclTeardownNamespace_TCL_DECLARED +#define TclTeardownNamespace_TCL_DECLARED +/* 108 */ +EXTERN void TclTeardownNamespace (Namespace * nsPtr); +#endif +#ifndef TclUpdateReturnInfo_TCL_DECLARED +#define TclUpdateReturnInfo_TCL_DECLARED +/* 109 */ +EXTERN int TclUpdateReturnInfo (Interp * iPtr); +#endif +/* Slot 110 is reserved */ +#ifndef Tcl_AddInterpResolvers_TCL_DECLARED +#define Tcl_AddInterpResolvers_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_AddInterpResolvers (Tcl_Interp * interp, + CONST char * name, + Tcl_ResolveCmdProc * cmdProc, + Tcl_ResolveVarProc * varProc, + Tcl_ResolveCompiledVarProc * compiledVarProc); +#endif +#ifndef Tcl_AppendExportList_TCL_DECLARED +#define Tcl_AppendExportList_TCL_DECLARED +/* 112 */ +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_CreateNamespace_TCL_DECLARED +#define Tcl_CreateNamespace_TCL_DECLARED +/* 113 */ +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + CONST char * name, ClientData clientData, + Tcl_NamespaceDeleteProc * deleteProc); +#endif +#ifndef Tcl_DeleteNamespace_TCL_DECLARED +#define Tcl_DeleteNamespace_TCL_DECLARED +/* 114 */ +EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_Export_TCL_DECLARED +#define Tcl_Export_TCL_DECLARED +/* 115 */ +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int resetListFirst); +#endif +#ifndef Tcl_FindCommand_TCL_DECLARED +#define Tcl_FindCommand_TCL_DECLARED +/* 116 */ +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_FindNamespace_TCL_DECLARED +#define Tcl_FindNamespace_TCL_DECLARED +/* 117 */ +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_GetInterpResolvers_TCL_DECLARED +#define Tcl_GetInterpResolvers_TCL_DECLARED +/* 118 */ +EXTERN int Tcl_GetInterpResolvers (Tcl_Interp * interp, + CONST char * name, + Tcl_ResolverInfo * resInfo); +#endif +#ifndef Tcl_GetNamespaceResolvers_TCL_DECLARED +#define Tcl_GetNamespaceResolvers_TCL_DECLARED +/* 119 */ +EXTERN int Tcl_GetNamespaceResolvers ( + Tcl_Namespace * namespacePtr, + Tcl_ResolverInfo * resInfo); +#endif +#ifndef Tcl_FindNamespaceVar_TCL_DECLARED +#define Tcl_FindNamespaceVar_TCL_DECLARED +/* 120 */ +EXTERN Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp * interp, + CONST char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_ForgetImport_TCL_DECLARED +#define Tcl_ForgetImport_TCL_DECLARED +/* 121 */ +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern); +#endif +#ifndef Tcl_GetCommandFromObj_TCL_DECLARED +#define Tcl_GetCommandFromObj_TCL_DECLARED +/* 122 */ +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCommandFullName_TCL_DECLARED +#define Tcl_GetCommandFullName_TCL_DECLARED +/* 123 */ +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, + Tcl_Command command, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED +#define Tcl_GetCurrentNamespace_TCL_DECLARED +/* 124 */ +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED +#define Tcl_GetGlobalNamespace_TCL_DECLARED +/* 125 */ +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetVariableFullName_TCL_DECLARED +#define Tcl_GetVariableFullName_TCL_DECLARED +/* 126 */ +EXTERN void Tcl_GetVariableFullName (Tcl_Interp * interp, + Tcl_Var variable, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_Import_TCL_DECLARED +#define Tcl_Import_TCL_DECLARED +/* 127 */ +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, CONST char * pattern, + int allowOverwrite); +#endif +#ifndef Tcl_PopCallFrame_TCL_DECLARED +#define Tcl_PopCallFrame_TCL_DECLARED +/* 128 */ +EXTERN void Tcl_PopCallFrame (Tcl_Interp * interp); +#endif +#ifndef Tcl_PushCallFrame_TCL_DECLARED +#define Tcl_PushCallFrame_TCL_DECLARED +/* 129 */ +EXTERN int Tcl_PushCallFrame (Tcl_Interp * interp, + Tcl_CallFrame * framePtr, + Tcl_Namespace * nsPtr, int isProcCallFrame); +#endif +#ifndef Tcl_RemoveInterpResolvers_TCL_DECLARED +#define Tcl_RemoveInterpResolvers_TCL_DECLARED +/* 130 */ +EXTERN int Tcl_RemoveInterpResolvers (Tcl_Interp * interp, + CONST char * name); +#endif +#ifndef Tcl_SetNamespaceResolvers_TCL_DECLARED +#define Tcl_SetNamespaceResolvers_TCL_DECLARED +/* 131 */ +EXTERN void Tcl_SetNamespaceResolvers ( + Tcl_Namespace * namespacePtr, + Tcl_ResolveCmdProc * cmdProc, + Tcl_ResolveVarProc * varProc, + Tcl_ResolveCompiledVarProc * compiledVarProc); +#endif +#ifndef TclpHasSockets_TCL_DECLARED +#define TclpHasSockets_TCL_DECLARED +/* 132 */ +EXTERN int TclpHasSockets (Tcl_Interp * interp); +#endif +#ifndef TclpGetDate_TCL_DECLARED +#define TclpGetDate_TCL_DECLARED +/* 133 */ +EXTERN struct tm * TclpGetDate (CONST time_t * time, int useGMT); +#endif +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +#ifndef TclGetEnv_TCL_DECLARED +#define TclGetEnv_TCL_DECLARED +/* 138 */ +EXTERN CONST84_RETURN char * TclGetEnv (CONST char * name, + Tcl_DString * valuePtr); +#endif +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +#ifndef TclpGetCwd_TCL_DECLARED +#define TclpGetCwd_TCL_DECLARED +/* 141 */ +EXTERN CONST84_RETURN char * TclpGetCwd (Tcl_Interp * interp, + Tcl_DString * cwdPtr); +#endif +#ifndef TclSetByteCodeFromAny_TCL_DECLARED +#define TclSetByteCodeFromAny_TCL_DECLARED +/* 142 */ +EXTERN int TclSetByteCodeFromAny (Tcl_Interp * interp, + Tcl_Obj * objPtr, CompileHookProc * hookProc, + ClientData clientData); +#endif +#ifndef TclAddLiteralObj_TCL_DECLARED +#define TclAddLiteralObj_TCL_DECLARED +/* 143 */ +EXTERN int TclAddLiteralObj (struct CompileEnv * envPtr, + Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); +#endif +#ifndef TclHideLiteral_TCL_DECLARED +#define TclHideLiteral_TCL_DECLARED +/* 144 */ +EXTERN void TclHideLiteral (Tcl_Interp * interp, + struct CompileEnv * envPtr, int index); +#endif +#ifndef TclGetAuxDataType_TCL_DECLARED +#define TclGetAuxDataType_TCL_DECLARED +/* 145 */ +EXTERN struct AuxDataType * TclGetAuxDataType (char * typeName); +#endif +#ifndef TclHandleCreate_TCL_DECLARED +#define TclHandleCreate_TCL_DECLARED +/* 146 */ +EXTERN TclHandle TclHandleCreate (VOID * ptr); +#endif +#ifndef TclHandleFree_TCL_DECLARED +#define TclHandleFree_TCL_DECLARED +/* 147 */ +EXTERN void TclHandleFree (TclHandle handle); +#endif +#ifndef TclHandlePreserve_TCL_DECLARED +#define TclHandlePreserve_TCL_DECLARED +/* 148 */ +EXTERN TclHandle TclHandlePreserve (TclHandle handle); +#endif +#ifndef TclHandleRelease_TCL_DECLARED +#define TclHandleRelease_TCL_DECLARED +/* 149 */ +EXTERN void TclHandleRelease (TclHandle handle); +#endif +#ifndef TclRegAbout_TCL_DECLARED +#define TclRegAbout_TCL_DECLARED +/* 150 */ +EXTERN int TclRegAbout (Tcl_Interp * interp, Tcl_RegExp re); +#endif +#ifndef TclRegExpRangeUniChar_TCL_DECLARED +#define TclRegExpRangeUniChar_TCL_DECLARED +/* 151 */ +EXTERN void TclRegExpRangeUniChar (Tcl_RegExp re, int index, + int * startPtr, int * endPtr); +#endif +#ifndef TclSetLibraryPath_TCL_DECLARED +#define TclSetLibraryPath_TCL_DECLARED +/* 152 */ +EXTERN void TclSetLibraryPath (Tcl_Obj * pathPtr); +#endif +#ifndef TclGetLibraryPath_TCL_DECLARED +#define TclGetLibraryPath_TCL_DECLARED +/* 153 */ +EXTERN Tcl_Obj * TclGetLibraryPath (void); +#endif +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +#ifndef TclRegError_TCL_DECLARED +#define TclRegError_TCL_DECLARED +/* 156 */ +EXTERN void TclRegError (Tcl_Interp * interp, CONST char * msg, + int status); +#endif +#ifndef TclVarTraceExists_TCL_DECLARED +#define TclVarTraceExists_TCL_DECLARED +/* 157 */ +EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, + CONST char * varName); +#endif +#ifndef TclSetStartupScriptFileName_TCL_DECLARED +#define TclSetStartupScriptFileName_TCL_DECLARED +/* 158 */ +EXTERN void TclSetStartupScriptFileName (CONST char * filename); +#endif +#ifndef TclGetStartupScriptFileName_TCL_DECLARED +#define TclGetStartupScriptFileName_TCL_DECLARED +/* 159 */ +EXTERN CONST84_RETURN char * TclGetStartupScriptFileName (void); +#endif +/* Slot 160 is reserved */ +#ifndef TclChannelTransform_TCL_DECLARED +#define TclChannelTransform_TCL_DECLARED +/* 161 */ +EXTERN int TclChannelTransform (Tcl_Interp * interp, + Tcl_Channel chan, Tcl_Obj * cmdObjPtr); +#endif +#ifndef TclChannelEventScriptInvoker_TCL_DECLARED +#define TclChannelEventScriptInvoker_TCL_DECLARED +/* 162 */ +EXTERN void TclChannelEventScriptInvoker (ClientData clientData, + int flags); +#endif +#ifndef TclGetInstructionTable_TCL_DECLARED +#define TclGetInstructionTable_TCL_DECLARED +/* 163 */ +EXTERN void * TclGetInstructionTable (void); +#endif +#ifndef TclExpandCodeArray_TCL_DECLARED +#define TclExpandCodeArray_TCL_DECLARED +/* 164 */ +EXTERN void TclExpandCodeArray (void * envPtr); +#endif +#ifndef TclpSetInitialEncodings_TCL_DECLARED +#define TclpSetInitialEncodings_TCL_DECLARED +/* 165 */ +EXTERN void TclpSetInitialEncodings (void); +#endif +#ifndef TclListObjSetElement_TCL_DECLARED +#define TclListObjSetElement_TCL_DECLARED +/* 166 */ +EXTERN int TclListObjSetElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, + Tcl_Obj * valuePtr); +#endif +#ifndef TclSetStartupScriptPath_TCL_DECLARED +#define TclSetStartupScriptPath_TCL_DECLARED +/* 167 */ +EXTERN void TclSetStartupScriptPath (Tcl_Obj * pathPtr); +#endif +#ifndef TclGetStartupScriptPath_TCL_DECLARED +#define TclGetStartupScriptPath_TCL_DECLARED +/* 168 */ +EXTERN Tcl_Obj * TclGetStartupScriptPath (void); +#endif +#ifndef TclpUtfNcmp2_TCL_DECLARED +#define TclpUtfNcmp2_TCL_DECLARED +/* 169 */ +EXTERN int TclpUtfNcmp2 (CONST char * s1, CONST char * s2, + unsigned long n); +#endif +#ifndef TclCheckInterpTraces_TCL_DECLARED +#define TclCheckInterpTraces_TCL_DECLARED +/* 170 */ +EXTERN int TclCheckInterpTraces (Tcl_Interp * interp, + CONST char * command, int numChars, + Command * cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef TclCheckExecutionTraces_TCL_DECLARED +#define TclCheckExecutionTraces_TCL_DECLARED +/* 171 */ +EXTERN int TclCheckExecutionTraces (Tcl_Interp * interp, + CONST char * command, int numChars, + Command * cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]); +#endif +#ifndef TclInThreadExit_TCL_DECLARED +#define TclInThreadExit_TCL_DECLARED +/* 172 */ +EXTERN int TclInThreadExit (void); +#endif +#ifndef TclUniCharMatch_TCL_DECLARED +#define TclUniCharMatch_TCL_DECLARED +/* 173 */ +EXTERN int TclUniCharMatch (CONST Tcl_UniChar * string, + int strLen, CONST Tcl_UniChar * pattern, + int ptnLen, int flags); +#endif +/* Slot 174 is reserved */ +#ifndef TclCallVarTraces_TCL_DECLARED +#define TclCallVarTraces_TCL_DECLARED +/* 175 */ +EXTERN int TclCallVarTraces (Interp * iPtr, Var * arrayPtr, + Var * varPtr, CONST char * part1, + CONST char * part2, int flags, + int leaveErrMsg); +#endif +#ifndef TclCleanupVar_TCL_DECLARED +#define TclCleanupVar_TCL_DECLARED +/* 176 */ +EXTERN void TclCleanupVar (Var * varPtr, Var * arrayPtr); +#endif +#ifndef TclVarErrMsg_TCL_DECLARED +#define TclVarErrMsg_TCL_DECLARED +/* 177 */ +EXTERN void TclVarErrMsg (Tcl_Interp * interp, + CONST char * part1, CONST char * part2, + CONST char * operation, CONST char * reason); +#endif +#ifndef Tcl_SetStartupScript_TCL_DECLARED +#define Tcl_SetStartupScript_TCL_DECLARED +/* 178 */ +EXTERN void Tcl_SetStartupScript (Tcl_Obj * pathPtr, + CONST char* encodingName); +#endif +#ifndef Tcl_GetStartupScript_TCL_DECLARED +#define Tcl_GetStartupScript_TCL_DECLARED +/* 179 */ +EXTERN Tcl_Obj * Tcl_GetStartupScript (CONST char ** encodingNamePtr); +#endif +/* Slot 180 is reserved */ +/* Slot 181 is reserved */ +#ifndef TclpLocaltime_TCL_DECLARED +#define TclpLocaltime_TCL_DECLARED +/* 182 */ +EXTERN struct tm * TclpLocaltime (CONST time_t * clock); +#endif +#ifndef TclpGmtime_TCL_DECLARED +#define TclpGmtime_TCL_DECLARED +/* 183 */ +EXTERN struct tm * TclpGmtime (CONST time_t * clock); +#endif +/* Slot 184 is reserved */ +/* Slot 185 is reserved */ +/* Slot 186 is reserved */ +/* Slot 187 is reserved */ +/* Slot 188 is reserved */ +/* Slot 189 is reserved */ +/* Slot 190 is reserved */ +/* Slot 191 is reserved */ +/* Slot 192 is reserved */ +/* Slot 193 is reserved */ +/* Slot 194 is reserved */ +/* Slot 195 is reserved */ +/* Slot 196 is reserved */ +/* Slot 197 is reserved */ +#ifndef TclObjGetFrame_TCL_DECLARED +#define TclObjGetFrame_TCL_DECLARED +/* 198 */ +EXTERN int TclObjGetFrame (Tcl_Interp * interp, + Tcl_Obj * objPtr, CallFrame ** framePtrPtr); +#endif +/* Slot 199 is reserved */ +#ifndef TclpObjRemoveDirectory_TCL_DECLARED +#define TclpObjRemoveDirectory_TCL_DECLARED +/* 200 */ +EXTERN int TclpObjRemoveDirectory (Tcl_Obj * pathPtr, + int recursive, Tcl_Obj ** errorPtr); +#endif +#ifndef TclpObjCopyDirectory_TCL_DECLARED +#define TclpObjCopyDirectory_TCL_DECLARED +/* 201 */ +EXTERN int TclpObjCopyDirectory (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +#endif +#ifndef TclpObjCreateDirectory_TCL_DECLARED +#define TclpObjCreateDirectory_TCL_DECLARED +/* 202 */ +EXTERN int TclpObjCreateDirectory (Tcl_Obj * pathPtr); +#endif +#ifndef TclpObjDeleteFile_TCL_DECLARED +#define TclpObjDeleteFile_TCL_DECLARED +/* 203 */ +EXTERN int TclpObjDeleteFile (Tcl_Obj * pathPtr); +#endif +#ifndef TclpObjCopyFile_TCL_DECLARED +#define TclpObjCopyFile_TCL_DECLARED +/* 204 */ +EXTERN int TclpObjCopyFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef TclpObjRenameFile_TCL_DECLARED +#define TclpObjRenameFile_TCL_DECLARED +/* 205 */ +EXTERN int TclpObjRenameFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef TclpObjStat_TCL_DECLARED +#define TclpObjStat_TCL_DECLARED +/* 206 */ +EXTERN int TclpObjStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef TclpObjAccess_TCL_DECLARED +#define TclpObjAccess_TCL_DECLARED +/* 207 */ +EXTERN int TclpObjAccess (Tcl_Obj * pathPtr, int mode); +#endif +#ifndef TclpOpenFileChannel_TCL_DECLARED +#define TclpOpenFileChannel_TCL_DECLARED +/* 208 */ +EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, int mode, int permissions); +#endif +/* Slot 209 is reserved */ +/* Slot 210 is reserved */ +/* Slot 211 is reserved */ +#ifndef TclpFindExecutable_TCL_DECLARED +#define TclpFindExecutable_TCL_DECLARED +/* 212 */ +EXTERN void TclpFindExecutable (CONST char * argv0); +#endif +#ifndef TclGetObjNameOfExecutable_TCL_DECLARED +#define TclGetObjNameOfExecutable_TCL_DECLARED +/* 213 */ +EXTERN Tcl_Obj * TclGetObjNameOfExecutable (void); +#endif +#ifndef TclSetObjNameOfExecutable_TCL_DECLARED +#define TclSetObjNameOfExecutable_TCL_DECLARED +/* 214 */ +EXTERN void TclSetObjNameOfExecutable (Tcl_Obj * name, + Tcl_Encoding encoding); +#endif +#ifndef TclStackAlloc_TCL_DECLARED +#define TclStackAlloc_TCL_DECLARED +/* 215 */ +EXTERN void * TclStackAlloc (Tcl_Interp * interp, int numBytes); +#endif +#ifndef TclStackFree_TCL_DECLARED +#define TclStackFree_TCL_DECLARED +/* 216 */ +EXTERN void TclStackFree (Tcl_Interp * interp, void * freePtr); +#endif +#ifndef TclPushStackFrame_TCL_DECLARED +#define TclPushStackFrame_TCL_DECLARED +/* 217 */ +EXTERN int TclPushStackFrame (Tcl_Interp * interp, + Tcl_CallFrame ** framePtrPtr, + Tcl_Namespace * namespacePtr, + int isProcCallFrame); +#endif +#ifndef TclPopStackFrame_TCL_DECLARED +#define TclPopStackFrame_TCL_DECLARED +/* 218 */ +EXTERN void TclPopStackFrame (Tcl_Interp * interp); +#endif +/* Slot 219 is reserved */ +/* Slot 220 is reserved */ +/* Slot 221 is reserved */ +/* Slot 222 is reserved */ +/* Slot 223 is reserved */ +#ifndef TclGetPlatform_TCL_DECLARED +#define TclGetPlatform_TCL_DECLARED +/* 224 */ +EXTERN TclPlatformType * TclGetPlatform (void); +#endif +#ifndef TclTraceDictPath_TCL_DECLARED +#define TclTraceDictPath_TCL_DECLARED +/* 225 */ +EXTERN Tcl_Obj * TclTraceDictPath (Tcl_Interp * interp, + Tcl_Obj * rootPtr, int keyc, + Tcl_Obj *CONST keyv[], int flags); +#endif +#ifndef TclObjBeingDeleted_TCL_DECLARED +#define TclObjBeingDeleted_TCL_DECLARED +/* 226 */ +EXTERN int TclObjBeingDeleted (Tcl_Obj * objPtr); +#endif +#ifndef TclSetNsPath_TCL_DECLARED +#define TclSetNsPath_TCL_DECLARED +/* 227 */ +EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, + Tcl_Namespace * pathAry[]); +#endif +#ifndef TclObjInterpProcCore_TCL_DECLARED +#define TclObjInterpProcCore_TCL_DECLARED +/* 228 */ +EXTERN int TclObjInterpProcCore (register Tcl_Interp * interp, + Tcl_Obj * procNameObj, int skip, + ProcErrorProc errorProc); +#endif +#ifndef TclPtrMakeUpvar_TCL_DECLARED +#define TclPtrMakeUpvar_TCL_DECLARED +/* 229 */ +EXTERN int TclPtrMakeUpvar (Tcl_Interp * interp, + Var * otherP1Ptr, CONST char * myName, + int myFlags, int index); +#endif +#ifndef TclObjLookupVar_TCL_DECLARED +#define TclObjLookupVar_TCL_DECLARED +/* 230 */ +EXTERN Var * TclObjLookupVar (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, CONST char * part2, + int flags, CONST char * msg, + CONST int createPart1, CONST int createPart2, + Var ** arrayPtrPtr); +#endif +#ifndef TclGetNamespaceFromObj_TCL_DECLARED +#define TclGetNamespaceFromObj_TCL_DECLARED +/* 231 */ +EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); +#endif +#ifndef TclEvalObjEx_TCL_DECLARED +#define TclEvalObjEx_TCL_DECLARED +/* 232 */ +EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags, const CmdFrame * invoker, + int word); +#endif +#ifndef TclGetSrcInfoForPc_TCL_DECLARED +#define TclGetSrcInfoForPc_TCL_DECLARED +/* 233 */ +EXTERN void TclGetSrcInfoForPc (CmdFrame * contextPtr); +#endif +#ifndef TclVarHashCreateVar_TCL_DECLARED +#define TclVarHashCreateVar_TCL_DECLARED +/* 234 */ +EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, + const char * key, int * newPtr); +#endif +#ifndef TclInitVarHashTable_TCL_DECLARED +#define TclInitVarHashTable_TCL_DECLARED +/* 235 */ +EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, + Namespace * nsPtr); +#endif +#ifndef TclBackgroundException_TCL_DECLARED +#define TclBackgroundException_TCL_DECLARED +/* 236 */ +EXTERN void TclBackgroundException (Tcl_Interp * interp, + int code); +#endif +#ifndef TclResetCancellation_TCL_DECLARED +#define TclResetCancellation_TCL_DECLARED +/* 237 */ +EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); +#endif +#ifndef TclEvalObjv_NR2_TCL_DECLARED +#define TclEvalObjv_NR2_TCL_DECLARED +/* 238 */ +EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, + struct TEOV_record * rootPtr); +#endif +/* 239 */ +EXTERN Tcl_ObjCmdProc TclNRInterpProc; +#ifndef TclNRInterpProcCore_TCL_DECLARED +#define TclNRInterpProcCore_TCL_DECLARED +/* 240 */ +EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, + Tcl_Obj * procNameObj, int skip, + ProcErrorProc errorProc); +#endif +#ifndef TclNRPushRecord_TCL_DECLARED +#define TclNRPushRecord_TCL_DECLARED +/* 241 */ +EXTERN struct TEOV_record * TclNRPushRecord (Tcl_Interp * interp); +#endif +#ifndef TclNRPopAndFreeRecord_TCL_DECLARED +#define TclNRPopAndFreeRecord_TCL_DECLARED +/* 242 */ +EXTERN void TclNRPopAndFreeRecord (Tcl_Interp * interp); +#endif +#ifndef TclNREvalObjEx_TCL_DECLARED +#define TclNREvalObjEx_TCL_DECLARED +/* 243 */ +EXTERN int TclNREvalObjEx (Tcl_Interp * interp, + Tcl_Obj * objPtr, int flags, + const CmdFrame * invoker, int word); +#endif + +typedef struct TclIntStubs { + int magic; + CONST struct TclIntStubHooks *hooks; + + void *reserved0; + void *reserved1; + void *reserved2; + void (*tclAllocateFreeObjects) (void); /* 3 */ + void *reserved4; +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ +#endif /* MACOSX */ + void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */ + int (*tclCopyAndCollapse) (int count, CONST char * src, char * dst); /* 7 */ + int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ +#endif /* MACOSX */ + int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, CONST char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ + void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */ + void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */ + void *reserved13; + void (*tclDumpMemoryInfo) (FILE * outFile); /* 14 */ + void *reserved15; + void (*tclExprFloatError) (Tcl_Interp * interp, double value); /* 16 */ + void *reserved17; + void *reserved18; + void *reserved19; + void *reserved20; + void *reserved21; + int (*tclFindElement) (Tcl_Interp * interp, CONST char * listStr, int listLength, CONST char ** elementPtr, CONST char ** nextPtr, int * sizePtr, int * bracePtr); /* 22 */ + Proc * (*tclFindProc) (Interp * iPtr, CONST char * procName); /* 23 */ + void *reserved24; + void (*tclFreePackageInfo) (Interp * iPtr); /* 25 */ + void *reserved26; + void *reserved27; + Tcl_Channel (*tclpGetDefaultStdChannel) (int type); /* 28 */ + void *reserved29; + void *reserved30; + CONST char * (*tclGetExtension) (CONST char * name); /* 31 */ + int (*tclGetFrame) (Tcl_Interp * interp, CONST char * str, CallFrame ** framePtrPtr); /* 32 */ + void *reserved33; + int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ + void *reserved35; + void *reserved36; + int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */ + int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr); /* 38 */ + TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ + int (*tclGetOpenMode) (Tcl_Interp * interp, CONST char * str, int * seekFlagPtr); /* 40 */ + Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ + char * (*tclpGetUserHome) (CONST char * name, Tcl_DString * bufferPtr); /* 42 */ + void *reserved43; + int (*tclGuessPackageName) (CONST char * fileName, Tcl_DString * bufPtr); /* 44 */ + int (*tclHideUnsafeCommands) (Tcl_Interp * interp); /* 45 */ + int (*tclInExit) (void); /* 46 */ + void *reserved47; + void *reserved48; + void *reserved49; + void (*tclInitCompiledLocals) (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); /* 50 */ + int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ + void *reserved52; + int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ + int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 54 */ + Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ + void *reserved56; + void *reserved57; + Var * (*tclLookupVar) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, CONST char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); /* 58 */ + void *reserved59; + int (*tclNeedSpace) (CONST char * start, CONST char * end); /* 60 */ + Tcl_Obj * (*tclNewProcBodyObj) (Proc * procPtr); /* 61 */ + int (*tclObjCommandComplete) (Tcl_Obj * cmdPtr); /* 62 */ + int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 63 */ + int (*tclObjInvoke) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 64 */ + void *reserved65; + void *reserved66; + void *reserved67; + void *reserved68; + char * (*tclpAlloc) (unsigned int size); /* 69 */ + void *reserved70; + void *reserved71; + void *reserved72; + void *reserved73; + void (*tclpFree) (char * ptr); /* 74 */ + unsigned long (*tclpGetClicks) (void); /* 75 */ + unsigned long (*tclpGetSeconds) (void); /* 76 */ + void (*tclpGetTime) (Tcl_Time * time); /* 77 */ + int (*tclpGetTimeZone) (unsigned long time); /* 78 */ + void *reserved79; + void *reserved80; + char * (*tclpRealloc) (char * ptr, unsigned int size); /* 81 */ + void *reserved82; + void *reserved83; + void *reserved84; + void *reserved85; + void *reserved86; + void *reserved87; + char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp * interp, CONST char * name1, CONST char * name2, int flags); /* 88 */ + int (*tclPreventAliasLoop) (Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd); /* 89 */ + void *reserved90; + void (*tclProcCleanupProc) (Proc * procPtr); /* 91 */ + int (*tclProcCompileProc) (Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, CONST char * description, CONST char * procName); /* 92 */ + void (*tclProcDeleteProc) (ClientData clientData); /* 93 */ + void *reserved94; + void *reserved95; + int (*tclRenameCommand) (Tcl_Interp * interp, CONST char * oldName, CONST char * newName); /* 96 */ + void (*tclResetShadowedCmdRefs) (Tcl_Interp * interp, Command * newCmdPtr); /* 97 */ + int (*tclServiceIdle) (void); /* 98 */ + void *reserved99; + void *reserved100; + char * (*tclSetPreInitScript) (char * string); /* 101 */ + void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ + int (*tclSockGetPort) (Tcl_Interp * interp, CONST char * str, CONST char * proto, int * portPtr); /* 103 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ +#endif /* MACOSX */ + void *reserved105; + void *reserved106; + void *reserved107; + void (*tclTeardownNamespace) (Namespace * nsPtr); /* 108 */ + int (*tclUpdateReturnInfo) (Interp * iPtr); /* 109 */ + void *reserved110; + void (*tcl_AddInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 111 */ + int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 112 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 113 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 114 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 115 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 116 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 117 */ + int (*tcl_GetInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolverInfo * resInfo); /* 118 */ + int (*tcl_GetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo); /* 119 */ + Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 120 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 121 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 122 */ + void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 123 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 124 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 125 */ + void (*tcl_GetVariableFullName) (Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr); /* 126 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 127 */ + void (*tcl_PopCallFrame) (Tcl_Interp * interp); /* 128 */ + int (*tcl_PushCallFrame) (Tcl_Interp * interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame); /* 129 */ + int (*tcl_RemoveInterpResolvers) (Tcl_Interp * interp, CONST char * name); /* 130 */ + void (*tcl_SetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 131 */ + int (*tclpHasSockets) (Tcl_Interp * interp); /* 132 */ + struct tm * (*tclpGetDate) (CONST time_t * time, int useGMT); /* 133 */ + void *reserved134; + void *reserved135; + void *reserved136; + void *reserved137; + CONST84_RETURN char * (*tclGetEnv) (CONST char * name, Tcl_DString * valuePtr); /* 138 */ + void *reserved139; + void *reserved140; + CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ + int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ + int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ + void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ + struct AuxDataType * (*tclGetAuxDataType) (char * typeName); /* 145 */ + TclHandle (*tclHandleCreate) (VOID * ptr); /* 146 */ + void (*tclHandleFree) (TclHandle handle); /* 147 */ + TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ + void (*tclHandleRelease) (TclHandle handle); /* 149 */ + int (*tclRegAbout) (Tcl_Interp * interp, Tcl_RegExp re); /* 150 */ + void (*tclRegExpRangeUniChar) (Tcl_RegExp re, int index, int * startPtr, int * endPtr); /* 151 */ + void (*tclSetLibraryPath) (Tcl_Obj * pathPtr); /* 152 */ + Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */ + void *reserved154; + void *reserved155; + void (*tclRegError) (Tcl_Interp * interp, CONST char * msg, int status); /* 156 */ + Var * (*tclVarTraceExists) (Tcl_Interp * interp, CONST char * varName); /* 157 */ + void (*tclSetStartupScriptFileName) (CONST char * filename); /* 158 */ + CONST84_RETURN char * (*tclGetStartupScriptFileName) (void); /* 159 */ + void *reserved160; + int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ + void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ + void * (*tclGetInstructionTable) (void); /* 163 */ + void (*tclExpandCodeArray) (void * envPtr); /* 164 */ + void (*tclpSetInitialEncodings) (void); /* 165 */ + int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ + void (*tclSetStartupScriptPath) (Tcl_Obj * pathPtr); /* 167 */ + Tcl_Obj * (*tclGetStartupScriptPath) (void); /* 168 */ + int (*tclpUtfNcmp2) (CONST char * s1, CONST char * s2, unsigned long n); /* 169 */ + int (*tclCheckInterpTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 170 */ + int (*tclCheckExecutionTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 171 */ + int (*tclInThreadExit) (void); /* 172 */ + int (*tclUniCharMatch) (CONST Tcl_UniChar * string, int strLen, CONST Tcl_UniChar * pattern, int ptnLen, int flags); /* 173 */ + void *reserved174; + int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, CONST char * part1, CONST char * part2, int flags, int leaveErrMsg); /* 175 */ + void (*tclCleanupVar) (Var * varPtr, Var * arrayPtr); /* 176 */ + void (*tclVarErrMsg) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * operation, CONST char * reason); /* 177 */ + void (*tcl_SetStartupScript) (Tcl_Obj * pathPtr, CONST char* encodingName); /* 178 */ + Tcl_Obj * (*tcl_GetStartupScript) (CONST char ** encodingNamePtr); /* 179 */ + void *reserved180; + void *reserved181; + struct tm * (*tclpLocaltime) (CONST time_t * clock); /* 182 */ + struct tm * (*tclpGmtime) (CONST time_t * clock); /* 183 */ + void *reserved184; + void *reserved185; + void *reserved186; + void *reserved187; + void *reserved188; + void *reserved189; + void *reserved190; + void *reserved191; + void *reserved192; + void *reserved193; + void *reserved194; + void *reserved195; + void *reserved196; + void *reserved197; + int (*tclObjGetFrame) (Tcl_Interp * interp, Tcl_Obj * objPtr, CallFrame ** framePtrPtr); /* 198 */ + void *reserved199; + int (*tclpObjRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 200 */ + int (*tclpObjCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 201 */ + int (*tclpObjCreateDirectory) (Tcl_Obj * pathPtr); /* 202 */ + int (*tclpObjDeleteFile) (Tcl_Obj * pathPtr); /* 203 */ + int (*tclpObjCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 204 */ + int (*tclpObjRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 205 */ + int (*tclpObjStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 206 */ + int (*tclpObjAccess) (Tcl_Obj * pathPtr, int mode); /* 207 */ + Tcl_Channel (*tclpOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions); /* 208 */ + void *reserved209; + void *reserved210; + void *reserved211; + void (*tclpFindExecutable) (CONST char * argv0); /* 212 */ + Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */ + void (*tclSetObjNameOfExecutable) (Tcl_Obj * name, Tcl_Encoding encoding); /* 214 */ + void * (*tclStackAlloc) (Tcl_Interp * interp, int numBytes); /* 215 */ + void (*tclStackFree) (Tcl_Interp * interp, void * freePtr); /* 216 */ + int (*tclPushStackFrame) (Tcl_Interp * interp, Tcl_CallFrame ** framePtrPtr, Tcl_Namespace * namespacePtr, int isProcCallFrame); /* 217 */ + void (*tclPopStackFrame) (Tcl_Interp * interp); /* 218 */ + void *reserved219; + void *reserved220; + void *reserved221; + void *reserved222; + void *reserved223; + TclPlatformType * (*tclGetPlatform) (void); /* 224 */ + Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *CONST keyv[], int flags); /* 225 */ + int (*tclObjBeingDeleted) (Tcl_Obj * objPtr); /* 226 */ + void (*tclSetNsPath) (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); /* 227 */ + int (*tclObjInterpProcCore) (register Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 228 */ + int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, CONST char * myName, int myFlags, int index); /* 229 */ + Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, CONST char * part2, int flags, CONST char * msg, CONST int createPart1, CONST int createPart2, Var ** arrayPtrPtr); /* 230 */ + int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ + int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 232 */ + void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ + Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ + void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ + void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ + int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ + int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ + Tcl_ObjCmdProc *tclNRInterpProc; /* 239 */ + int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ + struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ + void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ + int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 243 */ +} TclIntStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclIntStubs *tclIntStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +/* Slot 0 is reserved */ +/* Slot 1 is reserved */ +/* Slot 2 is reserved */ +#ifndef TclAllocateFreeObjects +#define TclAllocateFreeObjects \ + (tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */ +#endif +/* Slot 4 is reserved */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCleanupChildren +#define TclCleanupChildren \ + (tclIntStubsPtr->tclCleanupChildren) /* 5 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCleanupChildren +#define TclCleanupChildren \ + (tclIntStubsPtr->tclCleanupChildren) /* 5 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCleanupChildren +#define TclCleanupChildren \ + (tclIntStubsPtr->tclCleanupChildren) /* 5 */ +#endif +#endif /* MACOSX */ +#ifndef TclCleanupCommand +#define TclCleanupCommand \ + (tclIntStubsPtr->tclCleanupCommand) /* 6 */ +#endif +#ifndef TclCopyAndCollapse +#define TclCopyAndCollapse \ + (tclIntStubsPtr->tclCopyAndCollapse) /* 7 */ +#endif +#ifndef TclCopyChannel +#define TclCopyChannel \ + (tclIntStubsPtr->tclCopyChannel) /* 8 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclCreatePipeline +#define TclCreatePipeline \ + (tclIntStubsPtr->tclCreatePipeline) /* 9 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclCreatePipeline +#define TclCreatePipeline \ + (tclIntStubsPtr->tclCreatePipeline) /* 9 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclCreatePipeline +#define TclCreatePipeline \ + (tclIntStubsPtr->tclCreatePipeline) /* 9 */ +#endif +#endif /* MACOSX */ +#ifndef TclCreateProc +#define TclCreateProc \ + (tclIntStubsPtr->tclCreateProc) /* 10 */ +#endif +#ifndef TclDeleteCompiledLocalVars +#define TclDeleteCompiledLocalVars \ + (tclIntStubsPtr->tclDeleteCompiledLocalVars) /* 11 */ +#endif +#ifndef TclDeleteVars +#define TclDeleteVars \ + (tclIntStubsPtr->tclDeleteVars) /* 12 */ +#endif +/* Slot 13 is reserved */ +#ifndef TclDumpMemoryInfo +#define TclDumpMemoryInfo \ + (tclIntStubsPtr->tclDumpMemoryInfo) /* 14 */ +#endif +/* Slot 15 is reserved */ +#ifndef TclExprFloatError +#define TclExprFloatError \ + (tclIntStubsPtr->tclExprFloatError) /* 16 */ +#endif +/* Slot 17 is reserved */ +/* Slot 18 is reserved */ +/* Slot 19 is reserved */ +/* Slot 20 is reserved */ +/* Slot 21 is reserved */ +#ifndef TclFindElement +#define TclFindElement \ + (tclIntStubsPtr->tclFindElement) /* 22 */ +#endif +#ifndef TclFindProc +#define TclFindProc \ + (tclIntStubsPtr->tclFindProc) /* 23 */ +#endif +/* Slot 24 is reserved */ +#ifndef TclFreePackageInfo +#define TclFreePackageInfo \ + (tclIntStubsPtr->tclFreePackageInfo) /* 25 */ +#endif +/* Slot 26 is reserved */ +/* Slot 27 is reserved */ +#ifndef TclpGetDefaultStdChannel +#define TclpGetDefaultStdChannel \ + (tclIntStubsPtr->tclpGetDefaultStdChannel) /* 28 */ +#endif +/* Slot 29 is reserved */ +/* Slot 30 is reserved */ +#ifndef TclGetExtension +#define TclGetExtension \ + (tclIntStubsPtr->tclGetExtension) /* 31 */ +#endif +#ifndef TclGetFrame +#define TclGetFrame \ + (tclIntStubsPtr->tclGetFrame) /* 32 */ +#endif +/* Slot 33 is reserved */ +#ifndef TclGetIntForIndex +#define TclGetIntForIndex \ + (tclIntStubsPtr->tclGetIntForIndex) /* 34 */ +#endif +/* Slot 35 is reserved */ +/* Slot 36 is reserved */ +#ifndef TclGetLoadedPackages +#define TclGetLoadedPackages \ + (tclIntStubsPtr->tclGetLoadedPackages) /* 37 */ +#endif +#ifndef TclGetNamespaceForQualName +#define TclGetNamespaceForQualName \ + (tclIntStubsPtr->tclGetNamespaceForQualName) /* 38 */ +#endif +#ifndef TclGetObjInterpProc +#define TclGetObjInterpProc \ + (tclIntStubsPtr->tclGetObjInterpProc) /* 39 */ +#endif +#ifndef TclGetOpenMode +#define TclGetOpenMode \ + (tclIntStubsPtr->tclGetOpenMode) /* 40 */ +#endif +#ifndef TclGetOriginalCommand +#define TclGetOriginalCommand \ + (tclIntStubsPtr->tclGetOriginalCommand) /* 41 */ +#endif +#ifndef TclpGetUserHome +#define TclpGetUserHome \ + (tclIntStubsPtr->tclpGetUserHome) /* 42 */ +#endif +/* Slot 43 is reserved */ +#ifndef TclGuessPackageName +#define TclGuessPackageName \ + (tclIntStubsPtr->tclGuessPackageName) /* 44 */ +#endif +#ifndef TclHideUnsafeCommands +#define TclHideUnsafeCommands \ + (tclIntStubsPtr->tclHideUnsafeCommands) /* 45 */ +#endif +#ifndef TclInExit +#define TclInExit \ + (tclIntStubsPtr->tclInExit) /* 46 */ +#endif +/* Slot 47 is reserved */ +/* Slot 48 is reserved */ +/* Slot 49 is reserved */ +#ifndef TclInitCompiledLocals +#define TclInitCompiledLocals \ + (tclIntStubsPtr->tclInitCompiledLocals) /* 50 */ +#endif +#ifndef TclInterpInit +#define TclInterpInit \ + (tclIntStubsPtr->tclInterpInit) /* 51 */ +#endif +/* Slot 52 is reserved */ +#ifndef TclInvokeObjectCommand +#define TclInvokeObjectCommand \ + (tclIntStubsPtr->tclInvokeObjectCommand) /* 53 */ +#endif +#ifndef TclInvokeStringCommand +#define TclInvokeStringCommand \ + (tclIntStubsPtr->tclInvokeStringCommand) /* 54 */ +#endif +#ifndef TclIsProc +#define TclIsProc \ + (tclIntStubsPtr->tclIsProc) /* 55 */ +#endif +/* Slot 56 is reserved */ +/* Slot 57 is reserved */ +#ifndef TclLookupVar +#define TclLookupVar \ + (tclIntStubsPtr->tclLookupVar) /* 58 */ +#endif +/* Slot 59 is reserved */ +#ifndef TclNeedSpace +#define TclNeedSpace \ + (tclIntStubsPtr->tclNeedSpace) /* 60 */ +#endif +#ifndef TclNewProcBodyObj +#define TclNewProcBodyObj \ + (tclIntStubsPtr->tclNewProcBodyObj) /* 61 */ +#endif +#ifndef TclObjCommandComplete +#define TclObjCommandComplete \ + (tclIntStubsPtr->tclObjCommandComplete) /* 62 */ +#endif +#ifndef TclObjInterpProc +#define TclObjInterpProc \ + (tclIntStubsPtr->tclObjInterpProc) /* 63 */ +#endif +#ifndef TclObjInvoke +#define TclObjInvoke \ + (tclIntStubsPtr->tclObjInvoke) /* 64 */ +#endif +/* Slot 65 is reserved */ +/* Slot 66 is reserved */ +/* Slot 67 is reserved */ +/* Slot 68 is reserved */ +#ifndef TclpAlloc +#define TclpAlloc \ + (tclIntStubsPtr->tclpAlloc) /* 69 */ +#endif +/* Slot 70 is reserved */ +/* Slot 71 is reserved */ +/* Slot 72 is reserved */ +/* Slot 73 is reserved */ +#ifndef TclpFree +#define TclpFree \ + (tclIntStubsPtr->tclpFree) /* 74 */ +#endif +#ifndef TclpGetClicks +#define TclpGetClicks \ + (tclIntStubsPtr->tclpGetClicks) /* 75 */ +#endif +#ifndef TclpGetSeconds +#define TclpGetSeconds \ + (tclIntStubsPtr->tclpGetSeconds) /* 76 */ +#endif +#ifndef TclpGetTime +#define TclpGetTime \ + (tclIntStubsPtr->tclpGetTime) /* 77 */ +#endif +#ifndef TclpGetTimeZone +#define TclpGetTimeZone \ + (tclIntStubsPtr->tclpGetTimeZone) /* 78 */ +#endif +/* Slot 79 is reserved */ +/* Slot 80 is reserved */ +#ifndef TclpRealloc +#define TclpRealloc \ + (tclIntStubsPtr->tclpRealloc) /* 81 */ +#endif +/* Slot 82 is reserved */ +/* Slot 83 is reserved */ +/* Slot 84 is reserved */ +/* Slot 85 is reserved */ +/* Slot 86 is reserved */ +/* Slot 87 is reserved */ +#ifndef TclPrecTraceProc +#define TclPrecTraceProc \ + (tclIntStubsPtr->tclPrecTraceProc) /* 88 */ +#endif +#ifndef TclPreventAliasLoop +#define TclPreventAliasLoop \ + (tclIntStubsPtr->tclPreventAliasLoop) /* 89 */ +#endif +/* Slot 90 is reserved */ +#ifndef TclProcCleanupProc +#define TclProcCleanupProc \ + (tclIntStubsPtr->tclProcCleanupProc) /* 91 */ +#endif +#ifndef TclProcCompileProc +#define TclProcCompileProc \ + (tclIntStubsPtr->tclProcCompileProc) /* 92 */ +#endif +#ifndef TclProcDeleteProc +#define TclProcDeleteProc \ + (tclIntStubsPtr->tclProcDeleteProc) /* 93 */ +#endif +/* Slot 94 is reserved */ +/* Slot 95 is reserved */ +#ifndef TclRenameCommand +#define TclRenameCommand \ + (tclIntStubsPtr->tclRenameCommand) /* 96 */ +#endif +#ifndef TclResetShadowedCmdRefs +#define TclResetShadowedCmdRefs \ + (tclIntStubsPtr->tclResetShadowedCmdRefs) /* 97 */ +#endif +#ifndef TclServiceIdle +#define TclServiceIdle \ + (tclIntStubsPtr->tclServiceIdle) /* 98 */ +#endif +/* Slot 99 is reserved */ +/* Slot 100 is reserved */ +#ifndef TclSetPreInitScript +#define TclSetPreInitScript \ + (tclIntStubsPtr->tclSetPreInitScript) /* 101 */ +#endif +#ifndef TclSetupEnv +#define TclSetupEnv \ + (tclIntStubsPtr->tclSetupEnv) /* 102 */ +#endif +#ifndef TclSockGetPort +#define TclSockGetPort \ + (tclIntStubsPtr->tclSockGetPort) /* 103 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclSockMinimumBuffers +#define TclSockMinimumBuffers \ + (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclSockMinimumBuffers +#define TclSockMinimumBuffers \ + (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclSockMinimumBuffers +#define TclSockMinimumBuffers \ + (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ +#endif +#endif /* MACOSX */ +/* Slot 105 is reserved */ +/* Slot 106 is reserved */ +/* Slot 107 is reserved */ +#ifndef TclTeardownNamespace +#define TclTeardownNamespace \ + (tclIntStubsPtr->tclTeardownNamespace) /* 108 */ +#endif +#ifndef TclUpdateReturnInfo +#define TclUpdateReturnInfo \ + (tclIntStubsPtr->tclUpdateReturnInfo) /* 109 */ +#endif +/* Slot 110 is reserved */ +#ifndef Tcl_AddInterpResolvers +#define Tcl_AddInterpResolvers \ + (tclIntStubsPtr->tcl_AddInterpResolvers) /* 111 */ +#endif +#ifndef Tcl_AppendExportList +#define Tcl_AppendExportList \ + (tclIntStubsPtr->tcl_AppendExportList) /* 112 */ +#endif +#ifndef Tcl_CreateNamespace +#define Tcl_CreateNamespace \ + (tclIntStubsPtr->tcl_CreateNamespace) /* 113 */ +#endif +#ifndef Tcl_DeleteNamespace +#define Tcl_DeleteNamespace \ + (tclIntStubsPtr->tcl_DeleteNamespace) /* 114 */ +#endif +#ifndef Tcl_Export +#define Tcl_Export \ + (tclIntStubsPtr->tcl_Export) /* 115 */ +#endif +#ifndef Tcl_FindCommand +#define Tcl_FindCommand \ + (tclIntStubsPtr->tcl_FindCommand) /* 116 */ +#endif +#ifndef Tcl_FindNamespace +#define Tcl_FindNamespace \ + (tclIntStubsPtr->tcl_FindNamespace) /* 117 */ +#endif +#ifndef Tcl_GetInterpResolvers +#define Tcl_GetInterpResolvers \ + (tclIntStubsPtr->tcl_GetInterpResolvers) /* 118 */ +#endif +#ifndef Tcl_GetNamespaceResolvers +#define Tcl_GetNamespaceResolvers \ + (tclIntStubsPtr->tcl_GetNamespaceResolvers) /* 119 */ +#endif +#ifndef Tcl_FindNamespaceVar +#define Tcl_FindNamespaceVar \ + (tclIntStubsPtr->tcl_FindNamespaceVar) /* 120 */ +#endif +#ifndef Tcl_ForgetImport +#define Tcl_ForgetImport \ + (tclIntStubsPtr->tcl_ForgetImport) /* 121 */ +#endif +#ifndef Tcl_GetCommandFromObj +#define Tcl_GetCommandFromObj \ + (tclIntStubsPtr->tcl_GetCommandFromObj) /* 122 */ +#endif +#ifndef Tcl_GetCommandFullName +#define Tcl_GetCommandFullName \ + (tclIntStubsPtr->tcl_GetCommandFullName) /* 123 */ +#endif +#ifndef Tcl_GetCurrentNamespace +#define Tcl_GetCurrentNamespace \ + (tclIntStubsPtr->tcl_GetCurrentNamespace) /* 124 */ +#endif +#ifndef Tcl_GetGlobalNamespace +#define Tcl_GetGlobalNamespace \ + (tclIntStubsPtr->tcl_GetGlobalNamespace) /* 125 */ +#endif +#ifndef Tcl_GetVariableFullName +#define Tcl_GetVariableFullName \ + (tclIntStubsPtr->tcl_GetVariableFullName) /* 126 */ +#endif +#ifndef Tcl_Import +#define Tcl_Import \ + (tclIntStubsPtr->tcl_Import) /* 127 */ +#endif +#ifndef Tcl_PopCallFrame +#define Tcl_PopCallFrame \ + (tclIntStubsPtr->tcl_PopCallFrame) /* 128 */ +#endif +#ifndef Tcl_PushCallFrame +#define Tcl_PushCallFrame \ + (tclIntStubsPtr->tcl_PushCallFrame) /* 129 */ +#endif +#ifndef Tcl_RemoveInterpResolvers +#define Tcl_RemoveInterpResolvers \ + (tclIntStubsPtr->tcl_RemoveInterpResolvers) /* 130 */ +#endif +#ifndef Tcl_SetNamespaceResolvers +#define Tcl_SetNamespaceResolvers \ + (tclIntStubsPtr->tcl_SetNamespaceResolvers) /* 131 */ +#endif +#ifndef TclpHasSockets +#define TclpHasSockets \ + (tclIntStubsPtr->tclpHasSockets) /* 132 */ +#endif +#ifndef TclpGetDate +#define TclpGetDate \ + (tclIntStubsPtr->tclpGetDate) /* 133 */ +#endif +/* Slot 134 is reserved */ +/* Slot 135 is reserved */ +/* Slot 136 is reserved */ +/* Slot 137 is reserved */ +#ifndef TclGetEnv +#define TclGetEnv \ + (tclIntStubsPtr->tclGetEnv) /* 138 */ +#endif +/* Slot 139 is reserved */ +/* Slot 140 is reserved */ +#ifndef TclpGetCwd +#define TclpGetCwd \ + (tclIntStubsPtr->tclpGetCwd) /* 141 */ +#endif +#ifndef TclSetByteCodeFromAny +#define TclSetByteCodeFromAny \ + (tclIntStubsPtr->tclSetByteCodeFromAny) /* 142 */ +#endif +#ifndef TclAddLiteralObj +#define TclAddLiteralObj \ + (tclIntStubsPtr->tclAddLiteralObj) /* 143 */ +#endif +#ifndef TclHideLiteral +#define TclHideLiteral \ + (tclIntStubsPtr->tclHideLiteral) /* 144 */ +#endif +#ifndef TclGetAuxDataType +#define TclGetAuxDataType \ + (tclIntStubsPtr->tclGetAuxDataType) /* 145 */ +#endif +#ifndef TclHandleCreate +#define TclHandleCreate \ + (tclIntStubsPtr->tclHandleCreate) /* 146 */ +#endif +#ifndef TclHandleFree +#define TclHandleFree \ + (tclIntStubsPtr->tclHandleFree) /* 147 */ +#endif +#ifndef TclHandlePreserve +#define TclHandlePreserve \ + (tclIntStubsPtr->tclHandlePreserve) /* 148 */ +#endif +#ifndef TclHandleRelease +#define TclHandleRelease \ + (tclIntStubsPtr->tclHandleRelease) /* 149 */ +#endif +#ifndef TclRegAbout +#define TclRegAbout \ + (tclIntStubsPtr->tclRegAbout) /* 150 */ +#endif +#ifndef TclRegExpRangeUniChar +#define TclRegExpRangeUniChar \ + (tclIntStubsPtr->tclRegExpRangeUniChar) /* 151 */ +#endif +#ifndef TclSetLibraryPath +#define TclSetLibraryPath \ + (tclIntStubsPtr->tclSetLibraryPath) /* 152 */ +#endif +#ifndef TclGetLibraryPath +#define TclGetLibraryPath \ + (tclIntStubsPtr->tclGetLibraryPath) /* 153 */ +#endif +/* Slot 154 is reserved */ +/* Slot 155 is reserved */ +#ifndef TclRegError +#define TclRegError \ + (tclIntStubsPtr->tclRegError) /* 156 */ +#endif +#ifndef TclVarTraceExists +#define TclVarTraceExists \ + (tclIntStubsPtr->tclVarTraceExists) /* 157 */ +#endif +#ifndef TclSetStartupScriptFileName +#define TclSetStartupScriptFileName \ + (tclIntStubsPtr->tclSetStartupScriptFileName) /* 158 */ +#endif +#ifndef TclGetStartupScriptFileName +#define TclGetStartupScriptFileName \ + (tclIntStubsPtr->tclGetStartupScriptFileName) /* 159 */ +#endif +/* Slot 160 is reserved */ +#ifndef TclChannelTransform +#define TclChannelTransform \ + (tclIntStubsPtr->tclChannelTransform) /* 161 */ +#endif +#ifndef TclChannelEventScriptInvoker +#define TclChannelEventScriptInvoker \ + (tclIntStubsPtr->tclChannelEventScriptInvoker) /* 162 */ +#endif +#ifndef TclGetInstructionTable +#define TclGetInstructionTable \ + (tclIntStubsPtr->tclGetInstructionTable) /* 163 */ +#endif +#ifndef TclExpandCodeArray +#define TclExpandCodeArray \ + (tclIntStubsPtr->tclExpandCodeArray) /* 164 */ +#endif +#ifndef TclpSetInitialEncodings +#define TclpSetInitialEncodings \ + (tclIntStubsPtr->tclpSetInitialEncodings) /* 165 */ +#endif +#ifndef TclListObjSetElement +#define TclListObjSetElement \ + (tclIntStubsPtr->tclListObjSetElement) /* 166 */ +#endif +#ifndef TclSetStartupScriptPath +#define TclSetStartupScriptPath \ + (tclIntStubsPtr->tclSetStartupScriptPath) /* 167 */ +#endif +#ifndef TclGetStartupScriptPath +#define TclGetStartupScriptPath \ + (tclIntStubsPtr->tclGetStartupScriptPath) /* 168 */ +#endif +#ifndef TclpUtfNcmp2 +#define TclpUtfNcmp2 \ + (tclIntStubsPtr->tclpUtfNcmp2) /* 169 */ +#endif +#ifndef TclCheckInterpTraces +#define TclCheckInterpTraces \ + (tclIntStubsPtr->tclCheckInterpTraces) /* 170 */ +#endif +#ifndef TclCheckExecutionTraces +#define TclCheckExecutionTraces \ + (tclIntStubsPtr->tclCheckExecutionTraces) /* 171 */ +#endif +#ifndef TclInThreadExit +#define TclInThreadExit \ + (tclIntStubsPtr->tclInThreadExit) /* 172 */ +#endif +#ifndef TclUniCharMatch +#define TclUniCharMatch \ + (tclIntStubsPtr->tclUniCharMatch) /* 173 */ +#endif +/* Slot 174 is reserved */ +#ifndef TclCallVarTraces +#define TclCallVarTraces \ + (tclIntStubsPtr->tclCallVarTraces) /* 175 */ +#endif +#ifndef TclCleanupVar +#define TclCleanupVar \ + (tclIntStubsPtr->tclCleanupVar) /* 176 */ +#endif +#ifndef TclVarErrMsg +#define TclVarErrMsg \ + (tclIntStubsPtr->tclVarErrMsg) /* 177 */ +#endif +#ifndef Tcl_SetStartupScript +#define Tcl_SetStartupScript \ + (tclIntStubsPtr->tcl_SetStartupScript) /* 178 */ +#endif +#ifndef Tcl_GetStartupScript +#define Tcl_GetStartupScript \ + (tclIntStubsPtr->tcl_GetStartupScript) /* 179 */ +#endif +/* Slot 180 is reserved */ +/* Slot 181 is reserved */ +#ifndef TclpLocaltime +#define TclpLocaltime \ + (tclIntStubsPtr->tclpLocaltime) /* 182 */ +#endif +#ifndef TclpGmtime +#define TclpGmtime \ + (tclIntStubsPtr->tclpGmtime) /* 183 */ +#endif +/* Slot 184 is reserved */ +/* Slot 185 is reserved */ +/* Slot 186 is reserved */ +/* Slot 187 is reserved */ +/* Slot 188 is reserved */ +/* Slot 189 is reserved */ +/* Slot 190 is reserved */ +/* Slot 191 is reserved */ +/* Slot 192 is reserved */ +/* Slot 193 is reserved */ +/* Slot 194 is reserved */ +/* Slot 195 is reserved */ +/* Slot 196 is reserved */ +/* Slot 197 is reserved */ +#ifndef TclObjGetFrame +#define TclObjGetFrame \ + (tclIntStubsPtr->tclObjGetFrame) /* 198 */ +#endif +/* Slot 199 is reserved */ +#ifndef TclpObjRemoveDirectory +#define TclpObjRemoveDirectory \ + (tclIntStubsPtr->tclpObjRemoveDirectory) /* 200 */ +#endif +#ifndef TclpObjCopyDirectory +#define TclpObjCopyDirectory \ + (tclIntStubsPtr->tclpObjCopyDirectory) /* 201 */ +#endif +#ifndef TclpObjCreateDirectory +#define TclpObjCreateDirectory \ + (tclIntStubsPtr->tclpObjCreateDirectory) /* 202 */ +#endif +#ifndef TclpObjDeleteFile +#define TclpObjDeleteFile \ + (tclIntStubsPtr->tclpObjDeleteFile) /* 203 */ +#endif +#ifndef TclpObjCopyFile +#define TclpObjCopyFile \ + (tclIntStubsPtr->tclpObjCopyFile) /* 204 */ +#endif +#ifndef TclpObjRenameFile +#define TclpObjRenameFile \ + (tclIntStubsPtr->tclpObjRenameFile) /* 205 */ +#endif +#ifndef TclpObjStat +#define TclpObjStat \ + (tclIntStubsPtr->tclpObjStat) /* 206 */ +#endif +#ifndef TclpObjAccess +#define TclpObjAccess \ + (tclIntStubsPtr->tclpObjAccess) /* 207 */ +#endif +#ifndef TclpOpenFileChannel +#define TclpOpenFileChannel \ + (tclIntStubsPtr->tclpOpenFileChannel) /* 208 */ +#endif +/* Slot 209 is reserved */ +/* Slot 210 is reserved */ +/* Slot 211 is reserved */ +#ifndef TclpFindExecutable +#define TclpFindExecutable \ + (tclIntStubsPtr->tclpFindExecutable) /* 212 */ +#endif +#ifndef TclGetObjNameOfExecutable +#define TclGetObjNameOfExecutable \ + (tclIntStubsPtr->tclGetObjNameOfExecutable) /* 213 */ +#endif +#ifndef TclSetObjNameOfExecutable +#define TclSetObjNameOfExecutable \ + (tclIntStubsPtr->tclSetObjNameOfExecutable) /* 214 */ +#endif +#ifndef TclStackAlloc +#define TclStackAlloc \ + (tclIntStubsPtr->tclStackAlloc) /* 215 */ +#endif +#ifndef TclStackFree +#define TclStackFree \ + (tclIntStubsPtr->tclStackFree) /* 216 */ +#endif +#ifndef TclPushStackFrame +#define TclPushStackFrame \ + (tclIntStubsPtr->tclPushStackFrame) /* 217 */ +#endif +#ifndef TclPopStackFrame +#define TclPopStackFrame \ + (tclIntStubsPtr->tclPopStackFrame) /* 218 */ +#endif +/* Slot 219 is reserved */ +/* Slot 220 is reserved */ +/* Slot 221 is reserved */ +/* Slot 222 is reserved */ +/* Slot 223 is reserved */ +#ifndef TclGetPlatform +#define TclGetPlatform \ + (tclIntStubsPtr->tclGetPlatform) /* 224 */ +#endif +#ifndef TclTraceDictPath +#define TclTraceDictPath \ + (tclIntStubsPtr->tclTraceDictPath) /* 225 */ +#endif +#ifndef TclObjBeingDeleted +#define TclObjBeingDeleted \ + (tclIntStubsPtr->tclObjBeingDeleted) /* 226 */ +#endif +#ifndef TclSetNsPath +#define TclSetNsPath \ + (tclIntStubsPtr->tclSetNsPath) /* 227 */ +#endif +#ifndef TclObjInterpProcCore +#define TclObjInterpProcCore \ + (tclIntStubsPtr->tclObjInterpProcCore) /* 228 */ +#endif +#ifndef TclPtrMakeUpvar +#define TclPtrMakeUpvar \ + (tclIntStubsPtr->tclPtrMakeUpvar) /* 229 */ +#endif +#ifndef TclObjLookupVar +#define TclObjLookupVar \ + (tclIntStubsPtr->tclObjLookupVar) /* 230 */ +#endif +#ifndef TclGetNamespaceFromObj +#define TclGetNamespaceFromObj \ + (tclIntStubsPtr->tclGetNamespaceFromObj) /* 231 */ +#endif +#ifndef TclEvalObjEx +#define TclEvalObjEx \ + (tclIntStubsPtr->tclEvalObjEx) /* 232 */ +#endif +#ifndef TclGetSrcInfoForPc +#define TclGetSrcInfoForPc \ + (tclIntStubsPtr->tclGetSrcInfoForPc) /* 233 */ +#endif +#ifndef TclVarHashCreateVar +#define TclVarHashCreateVar \ + (tclIntStubsPtr->tclVarHashCreateVar) /* 234 */ +#endif +#ifndef TclInitVarHashTable +#define TclInitVarHashTable \ + (tclIntStubsPtr->tclInitVarHashTable) /* 235 */ +#endif +#ifndef TclBackgroundException +#define TclBackgroundException \ + (tclIntStubsPtr->tclBackgroundException) /* 236 */ +#endif +#ifndef TclResetCancellation +#define TclResetCancellation \ + (tclIntStubsPtr->tclResetCancellation) /* 237 */ +#endif +#ifndef TclEvalObjv_NR2 +#define TclEvalObjv_NR2 \ + (tclIntStubsPtr->tclEvalObjv_NR2) /* 238 */ +#endif +#ifndef TclNRInterpProc +#define TclNRInterpProc \ + (*tclIntStubsPtr->tclNRInterpProc) /* 239 */ +#endif +#ifndef TclNRInterpProcCore +#define TclNRInterpProcCore \ + (tclIntStubsPtr->tclNRInterpProcCore) /* 240 */ +#endif +#ifndef TclNRPushRecord +#define TclNRPushRecord \ + (tclIntStubsPtr->tclNRPushRecord) /* 241 */ +#endif +#ifndef TclNRPopAndFreeRecord +#define TclNRPopAndFreeRecord \ + (tclIntStubsPtr->tclNRPopAndFreeRecord) /* 242 */ +#endif +#ifndef TclNREvalObjEx +#define TclNREvalObjEx \ + (tclIntStubsPtr->tclNREvalObjEx) /* 243 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLINTDECLS */ diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 3fdd94a..2ca2b2c 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -1,705 +1,705 @@ -/* - * tclIntPlatDecls.h -- - * - * This file contains the declarations for all platform dependent - * unsupported functions that are exported by the Tcl library. These - * interfaces are not guaranteed to remain the same between - * versions. Use at your own risk. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * All rights reserved. - * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.36 2008/07/21 21:02:18 ferrieux Exp $ - */ - -#ifndef _TCLINTPLATDECLS -#define _TCLINTPLATDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclInt.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclGetAndDetachPids_TCL_DECLARED -#define TclGetAndDetachPids_TCL_DECLARED -/* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef TclpCloseFile_TCL_DECLARED -#define TclpCloseFile_TCL_DECLARED -/* 1 */ -EXTERN int TclpCloseFile (TclFile file); -#endif -#ifndef TclpCreateCommandChannel_TCL_DECLARED -#define TclpCreateCommandChannel_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); -#endif -#ifndef TclpCreatePipe_TCL_DECLARED -#define TclpCreatePipe_TCL_DECLARED -/* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); -#endif -#ifndef TclpCreateProcess_TCL_DECLARED -#define TclpCreateProcess_TCL_DECLARED -/* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile_TCL_DECLARED -#define TclpMakeFile_TCL_DECLARED -/* 6 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); -#endif -#ifndef TclpOpenFile_TCL_DECLARED -#define TclpOpenFile_TCL_DECLARED -/* 7 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); -#endif -#ifndef TclUnixWaitForFile_TCL_DECLARED -#define TclUnixWaitForFile_TCL_DECLARED -/* 8 */ -EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); -#endif -#ifndef TclpCreateTempFile_TCL_DECLARED -#define TclpCreateTempFile_TCL_DECLARED -/* 9 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); -#endif -#ifndef TclpReaddir_TCL_DECLARED -#define TclpReaddir_TCL_DECLARED -/* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); -#endif -#ifndef TclpLocaltime_unix_TCL_DECLARED -#define TclpLocaltime_unix_TCL_DECLARED -/* 11 */ -EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); -#endif -#ifndef TclpGmtime_unix_TCL_DECLARED -#define TclpGmtime_unix_TCL_DECLARED -/* 12 */ -EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); -#endif -#ifndef TclpInetNtoa_TCL_DECLARED -#define TclpInetNtoa_TCL_DECLARED -/* 13 */ -EXTERN char * TclpInetNtoa (struct in_addr addr); -#endif -#ifndef TclUnixCopyFile_TCL_DECLARED -#define TclUnixCopyFile_TCL_DECLARED -/* 14 */ -EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, - CONST Tcl_StatBuf * statBufPtr, - int dontCopyAtts); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclWinConvertError_TCL_DECLARED -#define TclWinConvertError_TCL_DECLARED -/* 0 */ -EXTERN void TclWinConvertError (DWORD errCode); -#endif -#ifndef TclWinConvertWSAError_TCL_DECLARED -#define TclWinConvertWSAError_TCL_DECLARED -/* 1 */ -EXTERN void TclWinConvertWSAError (DWORD errCode); -#endif -#ifndef TclWinGetServByName_TCL_DECLARED -#define TclWinGetServByName_TCL_DECLARED -/* 2 */ -EXTERN struct servent * TclWinGetServByName (CONST char * nm, - CONST char * proto); -#endif -#ifndef TclWinGetSockOpt_TCL_DECLARED -#define TclWinGetSockOpt_TCL_DECLARED -/* 3 */ -EXTERN int TclWinGetSockOpt (int s, int level, int optname, - char FAR * optval, int FAR * optlen); -#endif -#ifndef TclWinGetTclInstance_TCL_DECLARED -#define TclWinGetTclInstance_TCL_DECLARED -/* 4 */ -EXTERN HINSTANCE TclWinGetTclInstance (void); -#endif -/* Slot 5 is reserved */ -#ifndef TclWinNToHS_TCL_DECLARED -#define TclWinNToHS_TCL_DECLARED -/* 6 */ -EXTERN u_short TclWinNToHS (u_short ns); -#endif -#ifndef TclWinSetSockOpt_TCL_DECLARED -#define TclWinSetSockOpt_TCL_DECLARED -/* 7 */ -EXTERN int TclWinSetSockOpt (int s, int level, int optname, - CONST char FAR * optval, int optlen); -#endif -#ifndef TclpGetPid_TCL_DECLARED -#define TclpGetPid_TCL_DECLARED -/* 8 */ -EXTERN unsigned long TclpGetPid (Tcl_Pid pid); -#endif -#ifndef TclWinGetPlatformId_TCL_DECLARED -#define TclWinGetPlatformId_TCL_DECLARED -/* 9 */ -EXTERN int TclWinGetPlatformId (void); -#endif -/* Slot 10 is reserved */ -#ifndef TclGetAndDetachPids_TCL_DECLARED -#define TclGetAndDetachPids_TCL_DECLARED -/* 11 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef TclpCloseFile_TCL_DECLARED -#define TclpCloseFile_TCL_DECLARED -/* 12 */ -EXTERN int TclpCloseFile (TclFile file); -#endif -#ifndef TclpCreateCommandChannel_TCL_DECLARED -#define TclpCreateCommandChannel_TCL_DECLARED -/* 13 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); -#endif -#ifndef TclpCreatePipe_TCL_DECLARED -#define TclpCreatePipe_TCL_DECLARED -/* 14 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); -#endif -#ifndef TclpCreateProcess_TCL_DECLARED -#define TclpCreateProcess_TCL_DECLARED -/* 15 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); -#endif -/* Slot 16 is reserved */ -/* Slot 17 is reserved */ -#ifndef TclpMakeFile_TCL_DECLARED -#define TclpMakeFile_TCL_DECLARED -/* 18 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); -#endif -#ifndef TclpOpenFile_TCL_DECLARED -#define TclpOpenFile_TCL_DECLARED -/* 19 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); -#endif -#ifndef TclWinAddProcess_TCL_DECLARED -#define TclWinAddProcess_TCL_DECLARED -/* 20 */ -EXTERN void TclWinAddProcess (HANDLE hProcess, DWORD id); -#endif -/* Slot 21 is reserved */ -#ifndef TclpCreateTempFile_TCL_DECLARED -#define TclpCreateTempFile_TCL_DECLARED -/* 22 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); -#endif -#ifndef TclpGetTZName_TCL_DECLARED -#define TclpGetTZName_TCL_DECLARED -/* 23 */ -EXTERN char * TclpGetTZName (int isdst); -#endif -#ifndef TclWinNoBackslash_TCL_DECLARED -#define TclWinNoBackslash_TCL_DECLARED -/* 24 */ -EXTERN char * TclWinNoBackslash (char * path); -#endif -/* Slot 25 is reserved */ -#ifndef TclWinSetInterfaces_TCL_DECLARED -#define TclWinSetInterfaces_TCL_DECLARED -/* 26 */ -EXTERN void TclWinSetInterfaces (int wide); -#endif -#ifndef TclWinFlushDirtyChannels_TCL_DECLARED -#define TclWinFlushDirtyChannels_TCL_DECLARED -/* 27 */ -EXTERN void TclWinFlushDirtyChannels (void); -#endif -#ifndef TclWinResetInterfaces_TCL_DECLARED -#define TclWinResetInterfaces_TCL_DECLARED -/* 28 */ -EXTERN void TclWinResetInterfaces (void); -#endif -#ifndef TclWinCPUID_TCL_DECLARED -#define TclWinCPUID_TCL_DECLARED -/* 29 */ -EXTERN int TclWinCPUID (unsigned int index, unsigned int * regs); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclGetAndDetachPids_TCL_DECLARED -#define TclGetAndDetachPids_TCL_DECLARED -/* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef TclpCloseFile_TCL_DECLARED -#define TclpCloseFile_TCL_DECLARED -/* 1 */ -EXTERN int TclpCloseFile (TclFile file); -#endif -#ifndef TclpCreateCommandChannel_TCL_DECLARED -#define TclpCreateCommandChannel_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); -#endif -#ifndef TclpCreatePipe_TCL_DECLARED -#define TclpCreatePipe_TCL_DECLARED -/* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); -#endif -#ifndef TclpCreateProcess_TCL_DECLARED -#define TclpCreateProcess_TCL_DECLARED -/* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile_TCL_DECLARED -#define TclpMakeFile_TCL_DECLARED -/* 6 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); -#endif -#ifndef TclpOpenFile_TCL_DECLARED -#define TclpOpenFile_TCL_DECLARED -/* 7 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); -#endif -#ifndef TclUnixWaitForFile_TCL_DECLARED -#define TclUnixWaitForFile_TCL_DECLARED -/* 8 */ -EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); -#endif -#ifndef TclpCreateTempFile_TCL_DECLARED -#define TclpCreateTempFile_TCL_DECLARED -/* 9 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); -#endif -#ifndef TclpReaddir_TCL_DECLARED -#define TclpReaddir_TCL_DECLARED -/* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); -#endif -#ifndef TclpLocaltime_unix_TCL_DECLARED -#define TclpLocaltime_unix_TCL_DECLARED -/* 11 */ -EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); -#endif -#ifndef TclpGmtime_unix_TCL_DECLARED -#define TclpGmtime_unix_TCL_DECLARED -/* 12 */ -EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); -#endif -#ifndef TclpInetNtoa_TCL_DECLARED -#define TclpInetNtoa_TCL_DECLARED -/* 13 */ -EXTERN char * TclpInetNtoa (struct in_addr addr); -#endif -#ifndef TclUnixCopyFile_TCL_DECLARED -#define TclUnixCopyFile_TCL_DECLARED -/* 14 */ -EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, - CONST Tcl_StatBuf * statBufPtr, - int dontCopyAtts); -#endif -#ifndef TclMacOSXGetFileAttribute_TCL_DECLARED -#define TclMacOSXGetFileAttribute_TCL_DECLARED -/* 15 */ -EXTERN int TclMacOSXGetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, - Tcl_Obj ** attributePtrPtr); -#endif -#ifndef TclMacOSXSetFileAttribute_TCL_DECLARED -#define TclMacOSXSetFileAttribute_TCL_DECLARED -/* 16 */ -EXTERN int TclMacOSXSetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, - Tcl_Obj * attributePtr); -#endif -#ifndef TclMacOSXCopyFileAttributes_TCL_DECLARED -#define TclMacOSXCopyFileAttributes_TCL_DECLARED -/* 17 */ -EXTERN int TclMacOSXCopyFileAttributes (CONST char * src, - CONST char * dst, - CONST Tcl_StatBuf * statBufPtr); -#endif -#ifndef TclMacOSXMatchType_TCL_DECLARED -#define TclMacOSXMatchType_TCL_DECLARED -/* 18 */ -EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, - CONST char * pathName, CONST char * fileName, - Tcl_StatBuf * statBufPtr, - Tcl_GlobTypeData * types); -#endif -#endif /* MACOSX */ - -typedef struct TclIntPlatStubs { - int magic; - CONST struct TclIntPlatStubHooks *hooks; - -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ - int (*tclpCloseFile) (TclFile file); /* 1 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ - void *reserved5; - TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ - int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ - char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tclWinConvertError) (DWORD errCode); /* 0 */ - void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ - struct servent * (*tclWinGetServByName) (CONST char * nm, CONST char * proto); /* 2 */ - int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ - HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ - void *reserved5; - u_short (*tclWinNToHS) (u_short ns); /* 6 */ - int (*tclWinSetSockOpt) (int s, int level, int optname, CONST char FAR * optval, int optlen); /* 7 */ - unsigned long (*tclpGetPid) (Tcl_Pid pid); /* 8 */ - int (*tclWinGetPlatformId) (void); /* 9 */ - void *reserved10; - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 11 */ - int (*tclpCloseFile) (TclFile file); /* 12 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 13 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 14 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 15 */ - void *reserved16; - void *reserved17; - TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 19 */ - void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */ - void *reserved21; - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 22 */ - char * (*tclpGetTZName) (int isdst); /* 23 */ - char * (*tclWinNoBackslash) (char * path); /* 24 */ - void *reserved25; - void (*tclWinSetInterfaces) (int wide); /* 26 */ - void (*tclWinFlushDirtyChannels) (void); /* 27 */ - void (*tclWinResetInterfaces) (void); /* 28 */ - int (*tclWinCPUID) (unsigned int index, unsigned int * regs); /* 29 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ - int (*tclpCloseFile) (TclFile file); /* 1 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ - void *reserved5; - TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ - int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ - char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ - int (*tclMacOSXGetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr); /* 15 */ - int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ - int (*tclMacOSXCopyFileAttributes) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr); /* 17 */ - int (*tclMacOSXMatchType) (Tcl_Interp * interp, CONST char * pathName, CONST char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ -#endif /* MACOSX */ -} TclIntPlatStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclIntPlatStubs *tclIntPlatStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclGetAndDetachPids -#define TclGetAndDetachPids \ - (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ -#endif -#ifndef TclpCloseFile -#define TclpCloseFile \ - (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ -#endif -#ifndef TclpCreateCommandChannel -#define TclpCreateCommandChannel \ - (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ -#endif -#ifndef TclpCreatePipe -#define TclpCreatePipe \ - (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ -#endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ -#endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ -#endif -#ifndef TclUnixWaitForFile -#define TclUnixWaitForFile \ - (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ -#endif -#ifndef TclpCreateTempFile -#define TclpCreateTempFile \ - (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ -#endif -#ifndef TclpReaddir -#define TclpReaddir \ - (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ -#endif -#ifndef TclpLocaltime_unix -#define TclpLocaltime_unix \ - (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ -#endif -#ifndef TclpGmtime_unix -#define TclpGmtime_unix \ - (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ -#endif -#ifndef TclpInetNtoa -#define TclpInetNtoa \ - (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ -#endif -#ifndef TclUnixCopyFile -#define TclUnixCopyFile \ - (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclWinConvertError -#define TclWinConvertError \ - (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ -#endif -#ifndef TclWinConvertWSAError -#define TclWinConvertWSAError \ - (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ -#endif -#ifndef TclWinGetServByName -#define TclWinGetServByName \ - (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */ -#endif -#ifndef TclWinGetSockOpt -#define TclWinGetSockOpt \ - (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */ -#endif -#ifndef TclWinGetTclInstance -#define TclWinGetTclInstance \ - (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */ -#endif -/* Slot 5 is reserved */ -#ifndef TclWinNToHS -#define TclWinNToHS \ - (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */ -#endif -#ifndef TclWinSetSockOpt -#define TclWinSetSockOpt \ - (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */ -#endif -#ifndef TclpGetPid -#define TclpGetPid \ - (tclIntPlatStubsPtr->tclpGetPid) /* 8 */ -#endif -#ifndef TclWinGetPlatformId -#define TclWinGetPlatformId \ - (tclIntPlatStubsPtr->tclWinGetPlatformId) /* 9 */ -#endif -/* Slot 10 is reserved */ -#ifndef TclGetAndDetachPids -#define TclGetAndDetachPids \ - (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */ -#endif -#ifndef TclpCloseFile -#define TclpCloseFile \ - (tclIntPlatStubsPtr->tclpCloseFile) /* 12 */ -#endif -#ifndef TclpCreateCommandChannel -#define TclpCreateCommandChannel \ - (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 13 */ -#endif -#ifndef TclpCreatePipe -#define TclpCreatePipe \ - (tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */ -#endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */ -#endif -/* Slot 16 is reserved */ -/* Slot 17 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 18 */ -#endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 19 */ -#endif -#ifndef TclWinAddProcess -#define TclWinAddProcess \ - (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */ -#endif -/* Slot 21 is reserved */ -#ifndef TclpCreateTempFile -#define TclpCreateTempFile \ - (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */ -#endif -#ifndef TclpGetTZName -#define TclpGetTZName \ - (tclIntPlatStubsPtr->tclpGetTZName) /* 23 */ -#endif -#ifndef TclWinNoBackslash -#define TclWinNoBackslash \ - (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */ -#endif -/* Slot 25 is reserved */ -#ifndef TclWinSetInterfaces -#define TclWinSetInterfaces \ - (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */ -#endif -#ifndef TclWinFlushDirtyChannels -#define TclWinFlushDirtyChannels \ - (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */ -#endif -#ifndef TclWinResetInterfaces -#define TclWinResetInterfaces \ - (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */ -#endif -#ifndef TclWinCPUID -#define TclWinCPUID \ - (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclGetAndDetachPids -#define TclGetAndDetachPids \ - (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ -#endif -#ifndef TclpCloseFile -#define TclpCloseFile \ - (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ -#endif -#ifndef TclpCreateCommandChannel -#define TclpCreateCommandChannel \ - (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ -#endif -#ifndef TclpCreatePipe -#define TclpCreatePipe \ - (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ -#endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ -#endif -/* Slot 5 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ -#endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ -#endif -#ifndef TclUnixWaitForFile -#define TclUnixWaitForFile \ - (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ -#endif -#ifndef TclpCreateTempFile -#define TclpCreateTempFile \ - (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ -#endif -#ifndef TclpReaddir -#define TclpReaddir \ - (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ -#endif -#ifndef TclpLocaltime_unix -#define TclpLocaltime_unix \ - (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ -#endif -#ifndef TclpGmtime_unix -#define TclpGmtime_unix \ - (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ -#endif -#ifndef TclpInetNtoa -#define TclpInetNtoa \ - (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ -#endif -#ifndef TclUnixCopyFile -#define TclUnixCopyFile \ - (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ -#endif -#ifndef TclMacOSXGetFileAttribute -#define TclMacOSXGetFileAttribute \ - (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */ -#endif -#ifndef TclMacOSXSetFileAttribute -#define TclMacOSXSetFileAttribute \ - (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */ -#endif -#ifndef TclMacOSXCopyFileAttributes -#define TclMacOSXCopyFileAttributes \ - (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */ -#endif -#ifndef TclMacOSXMatchType -#define TclMacOSXMatchType \ - (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ -#endif -#endif /* MACOSX */ - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLINTPLATDECLS */ +/* + * tclIntPlatDecls.h -- + * + * This file contains the declarations for all platform dependent + * unsupported functions that are exported by the Tcl library. These + * interfaces are not guaranteed to remain the same between + * versions. Use at your own risk. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * All rights reserved. + * + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.37 2008/07/22 23:01:37 das Exp $ + */ + +#ifndef _TCLINTPLATDECLS +#define _TCLINTPLATDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclInt.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclGetAndDetachPids_TCL_DECLARED +#define TclGetAndDetachPids_TCL_DECLARED +/* 0 */ +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef TclpCloseFile_TCL_DECLARED +#define TclpCloseFile_TCL_DECLARED +/* 1 */ +EXTERN int TclpCloseFile (TclFile file); +#endif +#ifndef TclpCreateCommandChannel_TCL_DECLARED +#define TclpCreateCommandChannel_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, + int numPids, Tcl_Pid * pidPtr); +#endif +#ifndef TclpCreatePipe_TCL_DECLARED +#define TclpCreatePipe_TCL_DECLARED +/* 3 */ +EXTERN int TclpCreatePipe (TclFile * readPipe, + TclFile * writePipe); +#endif +#ifndef TclpCreateProcess_TCL_DECLARED +#define TclpCreateProcess_TCL_DECLARED +/* 4 */ +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + CONST char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, + Tcl_Pid * pidPtr); +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile_TCL_DECLARED +#define TclpMakeFile_TCL_DECLARED +/* 6 */ +EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +#endif +#ifndef TclpOpenFile_TCL_DECLARED +#define TclpOpenFile_TCL_DECLARED +/* 7 */ +EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +#endif +#ifndef TclUnixWaitForFile_TCL_DECLARED +#define TclUnixWaitForFile_TCL_DECLARED +/* 8 */ +EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); +#endif +#ifndef TclpCreateTempFile_TCL_DECLARED +#define TclpCreateTempFile_TCL_DECLARED +/* 9 */ +EXTERN TclFile TclpCreateTempFile (CONST char * contents); +#endif +#ifndef TclpReaddir_TCL_DECLARED +#define TclpReaddir_TCL_DECLARED +/* 10 */ +EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); +#endif +#ifndef TclpLocaltime_unix_TCL_DECLARED +#define TclpLocaltime_unix_TCL_DECLARED +/* 11 */ +EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); +#endif +#ifndef TclpGmtime_unix_TCL_DECLARED +#define TclpGmtime_unix_TCL_DECLARED +/* 12 */ +EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); +#endif +#ifndef TclpInetNtoa_TCL_DECLARED +#define TclpInetNtoa_TCL_DECLARED +/* 13 */ +EXTERN char * TclpInetNtoa (struct in_addr addr); +#endif +#ifndef TclUnixCopyFile_TCL_DECLARED +#define TclUnixCopyFile_TCL_DECLARED +/* 14 */ +EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, + CONST Tcl_StatBuf * statBufPtr, + int dontCopyAtts); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclWinConvertError_TCL_DECLARED +#define TclWinConvertError_TCL_DECLARED +/* 0 */ +EXTERN void TclWinConvertError (DWORD errCode); +#endif +#ifndef TclWinConvertWSAError_TCL_DECLARED +#define TclWinConvertWSAError_TCL_DECLARED +/* 1 */ +EXTERN void TclWinConvertWSAError (DWORD errCode); +#endif +#ifndef TclWinGetServByName_TCL_DECLARED +#define TclWinGetServByName_TCL_DECLARED +/* 2 */ +EXTERN struct servent * TclWinGetServByName (CONST char * nm, + CONST char * proto); +#endif +#ifndef TclWinGetSockOpt_TCL_DECLARED +#define TclWinGetSockOpt_TCL_DECLARED +/* 3 */ +EXTERN int TclWinGetSockOpt (int s, int level, int optname, + char FAR * optval, int FAR * optlen); +#endif +#ifndef TclWinGetTclInstance_TCL_DECLARED +#define TclWinGetTclInstance_TCL_DECLARED +/* 4 */ +EXTERN HINSTANCE TclWinGetTclInstance (void); +#endif +/* Slot 5 is reserved */ +#ifndef TclWinNToHS_TCL_DECLARED +#define TclWinNToHS_TCL_DECLARED +/* 6 */ +EXTERN u_short TclWinNToHS (u_short ns); +#endif +#ifndef TclWinSetSockOpt_TCL_DECLARED +#define TclWinSetSockOpt_TCL_DECLARED +/* 7 */ +EXTERN int TclWinSetSockOpt (int s, int level, int optname, + CONST char FAR * optval, int optlen); +#endif +#ifndef TclpGetPid_TCL_DECLARED +#define TclpGetPid_TCL_DECLARED +/* 8 */ +EXTERN unsigned long TclpGetPid (Tcl_Pid pid); +#endif +#ifndef TclWinGetPlatformId_TCL_DECLARED +#define TclWinGetPlatformId_TCL_DECLARED +/* 9 */ +EXTERN int TclWinGetPlatformId (void); +#endif +/* Slot 10 is reserved */ +#ifndef TclGetAndDetachPids_TCL_DECLARED +#define TclGetAndDetachPids_TCL_DECLARED +/* 11 */ +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef TclpCloseFile_TCL_DECLARED +#define TclpCloseFile_TCL_DECLARED +/* 12 */ +EXTERN int TclpCloseFile (TclFile file); +#endif +#ifndef TclpCreateCommandChannel_TCL_DECLARED +#define TclpCreateCommandChannel_TCL_DECLARED +/* 13 */ +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, + int numPids, Tcl_Pid * pidPtr); +#endif +#ifndef TclpCreatePipe_TCL_DECLARED +#define TclpCreatePipe_TCL_DECLARED +/* 14 */ +EXTERN int TclpCreatePipe (TclFile * readPipe, + TclFile * writePipe); +#endif +#ifndef TclpCreateProcess_TCL_DECLARED +#define TclpCreateProcess_TCL_DECLARED +/* 15 */ +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + CONST char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, + Tcl_Pid * pidPtr); +#endif +/* Slot 16 is reserved */ +/* Slot 17 is reserved */ +#ifndef TclpMakeFile_TCL_DECLARED +#define TclpMakeFile_TCL_DECLARED +/* 18 */ +EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +#endif +#ifndef TclpOpenFile_TCL_DECLARED +#define TclpOpenFile_TCL_DECLARED +/* 19 */ +EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +#endif +#ifndef TclWinAddProcess_TCL_DECLARED +#define TclWinAddProcess_TCL_DECLARED +/* 20 */ +EXTERN void TclWinAddProcess (HANDLE hProcess, DWORD id); +#endif +/* Slot 21 is reserved */ +#ifndef TclpCreateTempFile_TCL_DECLARED +#define TclpCreateTempFile_TCL_DECLARED +/* 22 */ +EXTERN TclFile TclpCreateTempFile (CONST char * contents); +#endif +#ifndef TclpGetTZName_TCL_DECLARED +#define TclpGetTZName_TCL_DECLARED +/* 23 */ +EXTERN char * TclpGetTZName (int isdst); +#endif +#ifndef TclWinNoBackslash_TCL_DECLARED +#define TclWinNoBackslash_TCL_DECLARED +/* 24 */ +EXTERN char * TclWinNoBackslash (char * path); +#endif +/* Slot 25 is reserved */ +#ifndef TclWinSetInterfaces_TCL_DECLARED +#define TclWinSetInterfaces_TCL_DECLARED +/* 26 */ +EXTERN void TclWinSetInterfaces (int wide); +#endif +#ifndef TclWinFlushDirtyChannels_TCL_DECLARED +#define TclWinFlushDirtyChannels_TCL_DECLARED +/* 27 */ +EXTERN void TclWinFlushDirtyChannels (void); +#endif +#ifndef TclWinResetInterfaces_TCL_DECLARED +#define TclWinResetInterfaces_TCL_DECLARED +/* 28 */ +EXTERN void TclWinResetInterfaces (void); +#endif +#ifndef TclWinCPUID_TCL_DECLARED +#define TclWinCPUID_TCL_DECLARED +/* 29 */ +EXTERN int TclWinCPUID (unsigned int index, unsigned int * regs); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclGetAndDetachPids_TCL_DECLARED +#define TclGetAndDetachPids_TCL_DECLARED +/* 0 */ +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef TclpCloseFile_TCL_DECLARED +#define TclpCloseFile_TCL_DECLARED +/* 1 */ +EXTERN int TclpCloseFile (TclFile file); +#endif +#ifndef TclpCreateCommandChannel_TCL_DECLARED +#define TclpCreateCommandChannel_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, + int numPids, Tcl_Pid * pidPtr); +#endif +#ifndef TclpCreatePipe_TCL_DECLARED +#define TclpCreatePipe_TCL_DECLARED +/* 3 */ +EXTERN int TclpCreatePipe (TclFile * readPipe, + TclFile * writePipe); +#endif +#ifndef TclpCreateProcess_TCL_DECLARED +#define TclpCreateProcess_TCL_DECLARED +/* 4 */ +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + CONST char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, + Tcl_Pid * pidPtr); +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile_TCL_DECLARED +#define TclpMakeFile_TCL_DECLARED +/* 6 */ +EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +#endif +#ifndef TclpOpenFile_TCL_DECLARED +#define TclpOpenFile_TCL_DECLARED +/* 7 */ +EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +#endif +#ifndef TclUnixWaitForFile_TCL_DECLARED +#define TclUnixWaitForFile_TCL_DECLARED +/* 8 */ +EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); +#endif +#ifndef TclpCreateTempFile_TCL_DECLARED +#define TclpCreateTempFile_TCL_DECLARED +/* 9 */ +EXTERN TclFile TclpCreateTempFile (CONST char * contents); +#endif +#ifndef TclpReaddir_TCL_DECLARED +#define TclpReaddir_TCL_DECLARED +/* 10 */ +EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); +#endif +#ifndef TclpLocaltime_unix_TCL_DECLARED +#define TclpLocaltime_unix_TCL_DECLARED +/* 11 */ +EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); +#endif +#ifndef TclpGmtime_unix_TCL_DECLARED +#define TclpGmtime_unix_TCL_DECLARED +/* 12 */ +EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); +#endif +#ifndef TclpInetNtoa_TCL_DECLARED +#define TclpInetNtoa_TCL_DECLARED +/* 13 */ +EXTERN char * TclpInetNtoa (struct in_addr addr); +#endif +#ifndef TclUnixCopyFile_TCL_DECLARED +#define TclUnixCopyFile_TCL_DECLARED +/* 14 */ +EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, + CONST Tcl_StatBuf * statBufPtr, + int dontCopyAtts); +#endif +#ifndef TclMacOSXGetFileAttribute_TCL_DECLARED +#define TclMacOSXGetFileAttribute_TCL_DECLARED +/* 15 */ +EXTERN int TclMacOSXGetFileAttribute (Tcl_Interp * interp, + int objIndex, Tcl_Obj * fileName, + Tcl_Obj ** attributePtrPtr); +#endif +#ifndef TclMacOSXSetFileAttribute_TCL_DECLARED +#define TclMacOSXSetFileAttribute_TCL_DECLARED +/* 16 */ +EXTERN int TclMacOSXSetFileAttribute (Tcl_Interp * interp, + int objIndex, Tcl_Obj * fileName, + Tcl_Obj * attributePtr); +#endif +#ifndef TclMacOSXCopyFileAttributes_TCL_DECLARED +#define TclMacOSXCopyFileAttributes_TCL_DECLARED +/* 17 */ +EXTERN int TclMacOSXCopyFileAttributes (CONST char * src, + CONST char * dst, + CONST Tcl_StatBuf * statBufPtr); +#endif +#ifndef TclMacOSXMatchType_TCL_DECLARED +#define TclMacOSXMatchType_TCL_DECLARED +/* 18 */ +EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, + CONST char * pathName, CONST char * fileName, + Tcl_StatBuf * statBufPtr, + Tcl_GlobTypeData * types); +#endif +#endif /* MACOSX */ + +typedef struct TclIntPlatStubs { + int magic; + CONST struct TclIntPlatStubHooks *hooks; + +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ + int (*tclpCloseFile) (TclFile file); /* 1 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ + int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + void *reserved5; + TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ + TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ + int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ + TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ + Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ + struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ + char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ + int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tclWinConvertError) (DWORD errCode); /* 0 */ + void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ + struct servent * (*tclWinGetServByName) (CONST char * nm, CONST char * proto); /* 2 */ + int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ + HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ + void *reserved5; + u_short (*tclWinNToHS) (u_short ns); /* 6 */ + int (*tclWinSetSockOpt) (int s, int level, int optname, CONST char FAR * optval, int optlen); /* 7 */ + unsigned long (*tclpGetPid) (Tcl_Pid pid); /* 8 */ + int (*tclWinGetPlatformId) (void); /* 9 */ + void *reserved10; + void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 11 */ + int (*tclpCloseFile) (TclFile file); /* 12 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 13 */ + int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 14 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 15 */ + void *reserved16; + void *reserved17; + TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ + TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 19 */ + void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */ + void *reserved21; + TclFile (*tclpCreateTempFile) (CONST char * contents); /* 22 */ + char * (*tclpGetTZName) (int isdst); /* 23 */ + char * (*tclWinNoBackslash) (char * path); /* 24 */ + void *reserved25; + void (*tclWinSetInterfaces) (int wide); /* 26 */ + void (*tclWinFlushDirtyChannels) (void); /* 27 */ + void (*tclWinResetInterfaces) (void); /* 28 */ + int (*tclWinCPUID) (unsigned int index, unsigned int * regs); /* 29 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ + int (*tclpCloseFile) (TclFile file); /* 1 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ + int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + void *reserved5; + TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ + TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ + int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ + TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ + Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ + struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ + char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ + int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ + int (*tclMacOSXGetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr); /* 15 */ + int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ + int (*tclMacOSXCopyFileAttributes) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr); /* 17 */ + int (*tclMacOSXMatchType) (Tcl_Interp * interp, CONST char * pathName, CONST char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ +#endif /* MACOSX */ +} TclIntPlatStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclIntPlatStubs *tclIntPlatStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef TclGetAndDetachPids +#define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ +#endif +#ifndef TclpCloseFile +#define TclpCloseFile \ + (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ +#endif +#ifndef TclpCreateCommandChannel +#define TclpCreateCommandChannel \ + (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ +#endif +#ifndef TclpCreatePipe +#define TclpCreatePipe \ + (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ +#endif +#ifndef TclpCreateProcess +#define TclpCreateProcess \ + (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile +#define TclpMakeFile \ + (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ +#endif +#ifndef TclpOpenFile +#define TclpOpenFile \ + (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ +#endif +#ifndef TclUnixWaitForFile +#define TclUnixWaitForFile \ + (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ +#endif +#ifndef TclpCreateTempFile +#define TclpCreateTempFile \ + (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ +#endif +#ifndef TclpReaddir +#define TclpReaddir \ + (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ +#endif +#ifndef TclpLocaltime_unix +#define TclpLocaltime_unix \ + (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ +#endif +#ifndef TclpGmtime_unix +#define TclpGmtime_unix \ + (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ +#endif +#ifndef TclpInetNtoa +#define TclpInetNtoa \ + (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ +#endif +#ifndef TclUnixCopyFile +#define TclUnixCopyFile \ + (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef TclWinConvertError +#define TclWinConvertError \ + (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ +#endif +#ifndef TclWinConvertWSAError +#define TclWinConvertWSAError \ + (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ +#endif +#ifndef TclWinGetServByName +#define TclWinGetServByName \ + (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */ +#endif +#ifndef TclWinGetSockOpt +#define TclWinGetSockOpt \ + (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */ +#endif +#ifndef TclWinGetTclInstance +#define TclWinGetTclInstance \ + (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */ +#endif +/* Slot 5 is reserved */ +#ifndef TclWinNToHS +#define TclWinNToHS \ + (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */ +#endif +#ifndef TclWinSetSockOpt +#define TclWinSetSockOpt \ + (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */ +#endif +#ifndef TclpGetPid +#define TclpGetPid \ + (tclIntPlatStubsPtr->tclpGetPid) /* 8 */ +#endif +#ifndef TclWinGetPlatformId +#define TclWinGetPlatformId \ + (tclIntPlatStubsPtr->tclWinGetPlatformId) /* 9 */ +#endif +/* Slot 10 is reserved */ +#ifndef TclGetAndDetachPids +#define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 11 */ +#endif +#ifndef TclpCloseFile +#define TclpCloseFile \ + (tclIntPlatStubsPtr->tclpCloseFile) /* 12 */ +#endif +#ifndef TclpCreateCommandChannel +#define TclpCreateCommandChannel \ + (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 13 */ +#endif +#ifndef TclpCreatePipe +#define TclpCreatePipe \ + (tclIntPlatStubsPtr->tclpCreatePipe) /* 14 */ +#endif +#ifndef TclpCreateProcess +#define TclpCreateProcess \ + (tclIntPlatStubsPtr->tclpCreateProcess) /* 15 */ +#endif +/* Slot 16 is reserved */ +/* Slot 17 is reserved */ +#ifndef TclpMakeFile +#define TclpMakeFile \ + (tclIntPlatStubsPtr->tclpMakeFile) /* 18 */ +#endif +#ifndef TclpOpenFile +#define TclpOpenFile \ + (tclIntPlatStubsPtr->tclpOpenFile) /* 19 */ +#endif +#ifndef TclWinAddProcess +#define TclWinAddProcess \ + (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */ +#endif +/* Slot 21 is reserved */ +#ifndef TclpCreateTempFile +#define TclpCreateTempFile \ + (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */ +#endif +#ifndef TclpGetTZName +#define TclpGetTZName \ + (tclIntPlatStubsPtr->tclpGetTZName) /* 23 */ +#endif +#ifndef TclWinNoBackslash +#define TclWinNoBackslash \ + (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */ +#endif +/* Slot 25 is reserved */ +#ifndef TclWinSetInterfaces +#define TclWinSetInterfaces \ + (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */ +#endif +#ifndef TclWinFlushDirtyChannels +#define TclWinFlushDirtyChannels \ + (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */ +#endif +#ifndef TclWinResetInterfaces +#define TclWinResetInterfaces \ + (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */ +#endif +#ifndef TclWinCPUID +#define TclWinCPUID \ + (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef TclGetAndDetachPids +#define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ +#endif +#ifndef TclpCloseFile +#define TclpCloseFile \ + (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ +#endif +#ifndef TclpCreateCommandChannel +#define TclpCreateCommandChannel \ + (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ +#endif +#ifndef TclpCreatePipe +#define TclpCreatePipe \ + (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ +#endif +#ifndef TclpCreateProcess +#define TclpCreateProcess \ + (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ +#endif +/* Slot 5 is reserved */ +#ifndef TclpMakeFile +#define TclpMakeFile \ + (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ +#endif +#ifndef TclpOpenFile +#define TclpOpenFile \ + (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ +#endif +#ifndef TclUnixWaitForFile +#define TclUnixWaitForFile \ + (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ +#endif +#ifndef TclpCreateTempFile +#define TclpCreateTempFile \ + (tclIntPlatStubsPtr->tclpCreateTempFile) /* 9 */ +#endif +#ifndef TclpReaddir +#define TclpReaddir \ + (tclIntPlatStubsPtr->tclpReaddir) /* 10 */ +#endif +#ifndef TclpLocaltime_unix +#define TclpLocaltime_unix \ + (tclIntPlatStubsPtr->tclpLocaltime_unix) /* 11 */ +#endif +#ifndef TclpGmtime_unix +#define TclpGmtime_unix \ + (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ +#endif +#ifndef TclpInetNtoa +#define TclpInetNtoa \ + (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ +#endif +#ifndef TclUnixCopyFile +#define TclUnixCopyFile \ + (tclIntPlatStubsPtr->tclUnixCopyFile) /* 14 */ +#endif +#ifndef TclMacOSXGetFileAttribute +#define TclMacOSXGetFileAttribute \ + (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */ +#endif +#ifndef TclMacOSXSetFileAttribute +#define TclMacOSXSetFileAttribute \ + (tclIntPlatStubsPtr->tclMacOSXSetFileAttribute) /* 16 */ +#endif +#ifndef TclMacOSXCopyFileAttributes +#define TclMacOSXCopyFileAttributes \ + (tclIntPlatStubsPtr->tclMacOSXCopyFileAttributes) /* 17 */ +#endif +#ifndef TclMacOSXMatchType +#define TclMacOSXMatchType \ + (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ +#endif +#endif /* MACOSX */ + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLINTPLATDECLS */ diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 1c01ce1..79629ce 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,382 +1,382 @@ -/* - * $Id: tclOODecls.h,v 1.6 2008/07/21 21:02:18 ferrieux Exp $ - * - * This file is (mostly) automatically generated from tclOO.decls. - */ - - -#ifndef _TCLOODECLS -#define _TCLOODECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclOO.decls script. - */ - - - -#if defined(USE_TCLOO_STUBS) -extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); -#define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp),TCLOO_VERSION) -#else -#define Tcl_OOInitStubs(interp) Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION) -#endif - - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef Tcl_CopyObjectInstance_TCL_DECLARED -#define Tcl_CopyObjectInstance_TCL_DECLARED -/* 0 */ -EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, - Tcl_Object sourceObject, - const char * targetName, - const char * targetNamespaceName); -#endif -#ifndef Tcl_GetClassAsObject_TCL_DECLARED -#define Tcl_GetClassAsObject_TCL_DECLARED -/* 1 */ -EXTERN Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); -#endif -#ifndef Tcl_GetObjectAsClass_TCL_DECLARED -#define Tcl_GetObjectAsClass_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); -#endif -#ifndef Tcl_GetObjectCommand_TCL_DECLARED -#define Tcl_GetObjectCommand_TCL_DECLARED -/* 3 */ -EXTERN Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); -#endif -#ifndef Tcl_GetObjectFromObj_TCL_DECLARED -#define Tcl_GetObjectFromObj_TCL_DECLARED -/* 4 */ -EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetObjectNamespace_TCL_DECLARED -#define Tcl_GetObjectNamespace_TCL_DECLARED -/* 5 */ -EXTERN Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); -#endif -#ifndef Tcl_MethodDeclarerClass_TCL_DECLARED -#define Tcl_MethodDeclarerClass_TCL_DECLARED -/* 6 */ -EXTERN Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); -#endif -#ifndef Tcl_MethodDeclarerObject_TCL_DECLARED -#define Tcl_MethodDeclarerObject_TCL_DECLARED -/* 7 */ -EXTERN Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); -#endif -#ifndef Tcl_MethodIsPublic_TCL_DECLARED -#define Tcl_MethodIsPublic_TCL_DECLARED -/* 8 */ -EXTERN int Tcl_MethodIsPublic (Tcl_Method method); -#endif -#ifndef Tcl_MethodIsType_TCL_DECLARED -#define Tcl_MethodIsType_TCL_DECLARED -/* 9 */ -EXTERN int Tcl_MethodIsType (Tcl_Method method, - const Tcl_MethodType * typePtr, - ClientData * clientDataPtr); -#endif -#ifndef Tcl_MethodName_TCL_DECLARED -#define Tcl_MethodName_TCL_DECLARED -/* 10 */ -EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); -#endif -#ifndef Tcl_NewInstanceMethod_TCL_DECLARED -#define Tcl_NewInstanceMethod_TCL_DECLARED -/* 11 */ -EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, - Tcl_Object object, Tcl_Obj * nameObj, - int isPublic, const Tcl_MethodType * typePtr, - ClientData clientData); -#endif -#ifndef Tcl_NewMethod_TCL_DECLARED -#define Tcl_NewMethod_TCL_DECLARED -/* 12 */ -EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, - Tcl_Obj * nameObj, int isPublic, - const Tcl_MethodType * typePtr, - ClientData clientData); -#endif -#ifndef Tcl_NewObjectInstance_TCL_DECLARED -#define Tcl_NewObjectInstance_TCL_DECLARED -/* 13 */ -EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, - Tcl_Class cls, const char * nameStr, - const char * nsNameStr, int objc, - Tcl_Obj *const * objv, int skip); -#endif -#ifndef Tcl_ObjectDeleted_TCL_DECLARED -#define Tcl_ObjectDeleted_TCL_DECLARED -/* 14 */ -EXTERN int Tcl_ObjectDeleted (Tcl_Object object); -#endif -#ifndef Tcl_ObjectContextIsFiltering_TCL_DECLARED -#define Tcl_ObjectContextIsFiltering_TCL_DECLARED -/* 15 */ -EXTERN int Tcl_ObjectContextIsFiltering ( - Tcl_ObjectContext context); -#endif -#ifndef Tcl_ObjectContextMethod_TCL_DECLARED -#define Tcl_ObjectContextMethod_TCL_DECLARED -/* 16 */ -EXTERN Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); -#endif -#ifndef Tcl_ObjectContextObject_TCL_DECLARED -#define Tcl_ObjectContextObject_TCL_DECLARED -/* 17 */ -EXTERN Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); -#endif -#ifndef Tcl_ObjectContextSkippedArgs_TCL_DECLARED -#define Tcl_ObjectContextSkippedArgs_TCL_DECLARED -/* 18 */ -EXTERN int Tcl_ObjectContextSkippedArgs ( - Tcl_ObjectContext context); -#endif -#ifndef Tcl_ClassGetMetadata_TCL_DECLARED -#define Tcl_ClassGetMetadata_TCL_DECLARED -/* 19 */ -EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr); -#endif -#ifndef Tcl_ClassSetMetadata_TCL_DECLARED -#define Tcl_ClassSetMetadata_TCL_DECLARED -/* 20 */ -EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr, - ClientData metadata); -#endif -#ifndef Tcl_ObjectGetMetadata_TCL_DECLARED -#define Tcl_ObjectGetMetadata_TCL_DECLARED -/* 21 */ -EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr); -#endif -#ifndef Tcl_ObjectSetMetadata_TCL_DECLARED -#define Tcl_ObjectSetMetadata_TCL_DECLARED -/* 22 */ -EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr, - ClientData metadata); -#endif -#ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED -#define Tcl_ObjectContextInvokeNext_TCL_DECLARED -/* 23 */ -EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, - Tcl_ObjectContext context, int objc, - Tcl_Obj *const * objv, int skip); -#endif -#ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED -#define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED -/* 24 */ -EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( - Tcl_Object object); -#endif -#ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED -#define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED -/* 25 */ -EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, - Tcl_ObjectMapMethodNameProc mapMethodNameProc); -#endif -#ifndef Tcl_ClassSetConstructor_TCL_DECLARED -#define Tcl_ClassSetConstructor_TCL_DECLARED -/* 26 */ -EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, - Tcl_Class clazz, Tcl_Method method); -#endif -#ifndef Tcl_ClassSetDestructor_TCL_DECLARED -#define Tcl_ClassSetDestructor_TCL_DECLARED -/* 27 */ -EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, - Tcl_Class clazz, Tcl_Method method); -#endif - -typedef struct TclOOStubHooks { - CONST struct TclOOIntStubs *tclOOIntStubs; -} TclOOStubHooks; - -typedef struct TclOOStubs { - int magic; - CONST struct TclOOStubHooks *hooks; - - Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ - Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ - Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ - Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ - Tcl_Object (*tcl_GetObjectFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 4 */ - Tcl_Namespace * (*tcl_GetObjectNamespace) (Tcl_Object object); /* 5 */ - Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ - Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ - int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ - int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ - Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ - Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ - Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ - Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ - int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ - int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ - Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ - Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ - int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ - ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ - void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ - ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ - void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ - int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ - Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ - void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ - void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ - void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ -} TclOOStubs; - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) -extern CONST TclOOStubs *tclOOStubsPtr; -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef Tcl_CopyObjectInstance -#define Tcl_CopyObjectInstance \ - (tclOOStubsPtr->tcl_CopyObjectInstance) /* 0 */ -#endif -#ifndef Tcl_GetClassAsObject -#define Tcl_GetClassAsObject \ - (tclOOStubsPtr->tcl_GetClassAsObject) /* 1 */ -#endif -#ifndef Tcl_GetObjectAsClass -#define Tcl_GetObjectAsClass \ - (tclOOStubsPtr->tcl_GetObjectAsClass) /* 2 */ -#endif -#ifndef Tcl_GetObjectCommand -#define Tcl_GetObjectCommand \ - (tclOOStubsPtr->tcl_GetObjectCommand) /* 3 */ -#endif -#ifndef Tcl_GetObjectFromObj -#define Tcl_GetObjectFromObj \ - (tclOOStubsPtr->tcl_GetObjectFromObj) /* 4 */ -#endif -#ifndef Tcl_GetObjectNamespace -#define Tcl_GetObjectNamespace \ - (tclOOStubsPtr->tcl_GetObjectNamespace) /* 5 */ -#endif -#ifndef Tcl_MethodDeclarerClass -#define Tcl_MethodDeclarerClass \ - (tclOOStubsPtr->tcl_MethodDeclarerClass) /* 6 */ -#endif -#ifndef Tcl_MethodDeclarerObject -#define Tcl_MethodDeclarerObject \ - (tclOOStubsPtr->tcl_MethodDeclarerObject) /* 7 */ -#endif -#ifndef Tcl_MethodIsPublic -#define Tcl_MethodIsPublic \ - (tclOOStubsPtr->tcl_MethodIsPublic) /* 8 */ -#endif -#ifndef Tcl_MethodIsType -#define Tcl_MethodIsType \ - (tclOOStubsPtr->tcl_MethodIsType) /* 9 */ -#endif -#ifndef Tcl_MethodName -#define Tcl_MethodName \ - (tclOOStubsPtr->tcl_MethodName) /* 10 */ -#endif -#ifndef Tcl_NewInstanceMethod -#define Tcl_NewInstanceMethod \ - (tclOOStubsPtr->tcl_NewInstanceMethod) /* 11 */ -#endif -#ifndef Tcl_NewMethod -#define Tcl_NewMethod \ - (tclOOStubsPtr->tcl_NewMethod) /* 12 */ -#endif -#ifndef Tcl_NewObjectInstance -#define Tcl_NewObjectInstance \ - (tclOOStubsPtr->tcl_NewObjectInstance) /* 13 */ -#endif -#ifndef Tcl_ObjectDeleted -#define Tcl_ObjectDeleted \ - (tclOOStubsPtr->tcl_ObjectDeleted) /* 14 */ -#endif -#ifndef Tcl_ObjectContextIsFiltering -#define Tcl_ObjectContextIsFiltering \ - (tclOOStubsPtr->tcl_ObjectContextIsFiltering) /* 15 */ -#endif -#ifndef Tcl_ObjectContextMethod -#define Tcl_ObjectContextMethod \ - (tclOOStubsPtr->tcl_ObjectContextMethod) /* 16 */ -#endif -#ifndef Tcl_ObjectContextObject -#define Tcl_ObjectContextObject \ - (tclOOStubsPtr->tcl_ObjectContextObject) /* 17 */ -#endif -#ifndef Tcl_ObjectContextSkippedArgs -#define Tcl_ObjectContextSkippedArgs \ - (tclOOStubsPtr->tcl_ObjectContextSkippedArgs) /* 18 */ -#endif -#ifndef Tcl_ClassGetMetadata -#define Tcl_ClassGetMetadata \ - (tclOOStubsPtr->tcl_ClassGetMetadata) /* 19 */ -#endif -#ifndef Tcl_ClassSetMetadata -#define Tcl_ClassSetMetadata \ - (tclOOStubsPtr->tcl_ClassSetMetadata) /* 20 */ -#endif -#ifndef Tcl_ObjectGetMetadata -#define Tcl_ObjectGetMetadata \ - (tclOOStubsPtr->tcl_ObjectGetMetadata) /* 21 */ -#endif -#ifndef Tcl_ObjectSetMetadata -#define Tcl_ObjectSetMetadata \ - (tclOOStubsPtr->tcl_ObjectSetMetadata) /* 22 */ -#endif -#ifndef Tcl_ObjectContextInvokeNext -#define Tcl_ObjectContextInvokeNext \ - (tclOOStubsPtr->tcl_ObjectContextInvokeNext) /* 23 */ -#endif -#ifndef Tcl_ObjectGetMethodNameMapper -#define Tcl_ObjectGetMethodNameMapper \ - (tclOOStubsPtr->tcl_ObjectGetMethodNameMapper) /* 24 */ -#endif -#ifndef Tcl_ObjectSetMethodNameMapper -#define Tcl_ObjectSetMethodNameMapper \ - (tclOOStubsPtr->tcl_ObjectSetMethodNameMapper) /* 25 */ -#endif -#ifndef Tcl_ClassSetConstructor -#define Tcl_ClassSetConstructor \ - (tclOOStubsPtr->tcl_ClassSetConstructor) /* 26 */ -#endif -#ifndef Tcl_ClassSetDestructor -#define Tcl_ClassSetDestructor \ - (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ -#endif - -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLOODECLS */ +/* + * $Id: tclOODecls.h,v 1.7 2008/07/22 23:01:37 das Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + */ + + +#ifndef _TCLOODECLS +#define _TCLOODECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclOO.decls script. + */ + + + +#if defined(USE_TCLOO_STUBS) +extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); +#define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp),TCLOO_VERSION) +#else +#define Tcl_OOInitStubs(interp) Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION) +#endif + + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tcl_CopyObjectInstance_TCL_DECLARED +#define Tcl_CopyObjectInstance_TCL_DECLARED +/* 0 */ +EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, + Tcl_Object sourceObject, + const char * targetName, + const char * targetNamespaceName); +#endif +#ifndef Tcl_GetClassAsObject_TCL_DECLARED +#define Tcl_GetClassAsObject_TCL_DECLARED +/* 1 */ +EXTERN Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); +#endif +#ifndef Tcl_GetObjectAsClass_TCL_DECLARED +#define Tcl_GetObjectAsClass_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); +#endif +#ifndef Tcl_GetObjectCommand_TCL_DECLARED +#define Tcl_GetObjectCommand_TCL_DECLARED +/* 3 */ +EXTERN Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); +#endif +#ifndef Tcl_GetObjectFromObj_TCL_DECLARED +#define Tcl_GetObjectFromObj_TCL_DECLARED +/* 4 */ +EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetObjectNamespace_TCL_DECLARED +#define Tcl_GetObjectNamespace_TCL_DECLARED +/* 5 */ +EXTERN Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); +#endif +#ifndef Tcl_MethodDeclarerClass_TCL_DECLARED +#define Tcl_MethodDeclarerClass_TCL_DECLARED +/* 6 */ +EXTERN Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); +#endif +#ifndef Tcl_MethodDeclarerObject_TCL_DECLARED +#define Tcl_MethodDeclarerObject_TCL_DECLARED +/* 7 */ +EXTERN Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); +#endif +#ifndef Tcl_MethodIsPublic_TCL_DECLARED +#define Tcl_MethodIsPublic_TCL_DECLARED +/* 8 */ +EXTERN int Tcl_MethodIsPublic (Tcl_Method method); +#endif +#ifndef Tcl_MethodIsType_TCL_DECLARED +#define Tcl_MethodIsType_TCL_DECLARED +/* 9 */ +EXTERN int Tcl_MethodIsType (Tcl_Method method, + const Tcl_MethodType * typePtr, + ClientData * clientDataPtr); +#endif +#ifndef Tcl_MethodName_TCL_DECLARED +#define Tcl_MethodName_TCL_DECLARED +/* 10 */ +EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); +#endif +#ifndef Tcl_NewInstanceMethod_TCL_DECLARED +#define Tcl_NewInstanceMethod_TCL_DECLARED +/* 11 */ +EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, + Tcl_Object object, Tcl_Obj * nameObj, + int isPublic, const Tcl_MethodType * typePtr, + ClientData clientData); +#endif +#ifndef Tcl_NewMethod_TCL_DECLARED +#define Tcl_NewMethod_TCL_DECLARED +/* 12 */ +EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, + Tcl_Obj * nameObj, int isPublic, + const Tcl_MethodType * typePtr, + ClientData clientData); +#endif +#ifndef Tcl_NewObjectInstance_TCL_DECLARED +#define Tcl_NewObjectInstance_TCL_DECLARED +/* 13 */ +EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, + Tcl_Class cls, const char * nameStr, + const char * nsNameStr, int objc, + Tcl_Obj *const * objv, int skip); +#endif +#ifndef Tcl_ObjectDeleted_TCL_DECLARED +#define Tcl_ObjectDeleted_TCL_DECLARED +/* 14 */ +EXTERN int Tcl_ObjectDeleted (Tcl_Object object); +#endif +#ifndef Tcl_ObjectContextIsFiltering_TCL_DECLARED +#define Tcl_ObjectContextIsFiltering_TCL_DECLARED +/* 15 */ +EXTERN int Tcl_ObjectContextIsFiltering ( + Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextMethod_TCL_DECLARED +#define Tcl_ObjectContextMethod_TCL_DECLARED +/* 16 */ +EXTERN Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextObject_TCL_DECLARED +#define Tcl_ObjectContextObject_TCL_DECLARED +/* 17 */ +EXTERN Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); +#endif +#ifndef Tcl_ObjectContextSkippedArgs_TCL_DECLARED +#define Tcl_ObjectContextSkippedArgs_TCL_DECLARED +/* 18 */ +EXTERN int Tcl_ObjectContextSkippedArgs ( + Tcl_ObjectContext context); +#endif +#ifndef Tcl_ClassGetMetadata_TCL_DECLARED +#define Tcl_ClassGetMetadata_TCL_DECLARED +/* 19 */ +EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, + const Tcl_ObjectMetadataType * typePtr); +#endif +#ifndef Tcl_ClassSetMetadata_TCL_DECLARED +#define Tcl_ClassSetMetadata_TCL_DECLARED +/* 20 */ +EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, + const Tcl_ObjectMetadataType * typePtr, + ClientData metadata); +#endif +#ifndef Tcl_ObjectGetMetadata_TCL_DECLARED +#define Tcl_ObjectGetMetadata_TCL_DECLARED +/* 21 */ +EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, + const Tcl_ObjectMetadataType * typePtr); +#endif +#ifndef Tcl_ObjectSetMetadata_TCL_DECLARED +#define Tcl_ObjectSetMetadata_TCL_DECLARED +/* 22 */ +EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, + const Tcl_ObjectMetadataType * typePtr, + ClientData metadata); +#endif +#ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED +#define Tcl_ObjectContextInvokeNext_TCL_DECLARED +/* 23 */ +EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, + Tcl_ObjectContext context, int objc, + Tcl_Obj *const * objv, int skip); +#endif +#ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED +#define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED +/* 24 */ +EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( + Tcl_Object object); +#endif +#ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED +#define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED +/* 25 */ +EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, + Tcl_ObjectMapMethodNameProc mapMethodNameProc); +#endif +#ifndef Tcl_ClassSetConstructor_TCL_DECLARED +#define Tcl_ClassSetConstructor_TCL_DECLARED +/* 26 */ +EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, + Tcl_Class clazz, Tcl_Method method); +#endif +#ifndef Tcl_ClassSetDestructor_TCL_DECLARED +#define Tcl_ClassSetDestructor_TCL_DECLARED +/* 27 */ +EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, + Tcl_Class clazz, Tcl_Method method); +#endif + +typedef struct TclOOStubHooks { + CONST struct TclOOIntStubs *tclOOIntStubs; +} TclOOStubHooks; + +typedef struct TclOOStubs { + int magic; + CONST struct TclOOStubHooks *hooks; + + Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ + Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ + Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ + Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ + Tcl_Object (*tcl_GetObjectFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 4 */ + Tcl_Namespace * (*tcl_GetObjectNamespace) (Tcl_Object object); /* 5 */ + Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ + Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ + int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ + int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ + Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ + Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ + Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ + Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ + int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ + int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ + Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ + Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ + int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ + ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ + void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ + ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ + void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ + int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ + Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ + void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ + void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ + void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ +} TclOOStubs; + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) +extern CONST TclOOStubs *tclOOStubsPtr; +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_CopyObjectInstance +#define Tcl_CopyObjectInstance \ + (tclOOStubsPtr->tcl_CopyObjectInstance) /* 0 */ +#endif +#ifndef Tcl_GetClassAsObject +#define Tcl_GetClassAsObject \ + (tclOOStubsPtr->tcl_GetClassAsObject) /* 1 */ +#endif +#ifndef Tcl_GetObjectAsClass +#define Tcl_GetObjectAsClass \ + (tclOOStubsPtr->tcl_GetObjectAsClass) /* 2 */ +#endif +#ifndef Tcl_GetObjectCommand +#define Tcl_GetObjectCommand \ + (tclOOStubsPtr->tcl_GetObjectCommand) /* 3 */ +#endif +#ifndef Tcl_GetObjectFromObj +#define Tcl_GetObjectFromObj \ + (tclOOStubsPtr->tcl_GetObjectFromObj) /* 4 */ +#endif +#ifndef Tcl_GetObjectNamespace +#define Tcl_GetObjectNamespace \ + (tclOOStubsPtr->tcl_GetObjectNamespace) /* 5 */ +#endif +#ifndef Tcl_MethodDeclarerClass +#define Tcl_MethodDeclarerClass \ + (tclOOStubsPtr->tcl_MethodDeclarerClass) /* 6 */ +#endif +#ifndef Tcl_MethodDeclarerObject +#define Tcl_MethodDeclarerObject \ + (tclOOStubsPtr->tcl_MethodDeclarerObject) /* 7 */ +#endif +#ifndef Tcl_MethodIsPublic +#define Tcl_MethodIsPublic \ + (tclOOStubsPtr->tcl_MethodIsPublic) /* 8 */ +#endif +#ifndef Tcl_MethodIsType +#define Tcl_MethodIsType \ + (tclOOStubsPtr->tcl_MethodIsType) /* 9 */ +#endif +#ifndef Tcl_MethodName +#define Tcl_MethodName \ + (tclOOStubsPtr->tcl_MethodName) /* 10 */ +#endif +#ifndef Tcl_NewInstanceMethod +#define Tcl_NewInstanceMethod \ + (tclOOStubsPtr->tcl_NewInstanceMethod) /* 11 */ +#endif +#ifndef Tcl_NewMethod +#define Tcl_NewMethod \ + (tclOOStubsPtr->tcl_NewMethod) /* 12 */ +#endif +#ifndef Tcl_NewObjectInstance +#define Tcl_NewObjectInstance \ + (tclOOStubsPtr->tcl_NewObjectInstance) /* 13 */ +#endif +#ifndef Tcl_ObjectDeleted +#define Tcl_ObjectDeleted \ + (tclOOStubsPtr->tcl_ObjectDeleted) /* 14 */ +#endif +#ifndef Tcl_ObjectContextIsFiltering +#define Tcl_ObjectContextIsFiltering \ + (tclOOStubsPtr->tcl_ObjectContextIsFiltering) /* 15 */ +#endif +#ifndef Tcl_ObjectContextMethod +#define Tcl_ObjectContextMethod \ + (tclOOStubsPtr->tcl_ObjectContextMethod) /* 16 */ +#endif +#ifndef Tcl_ObjectContextObject +#define Tcl_ObjectContextObject \ + (tclOOStubsPtr->tcl_ObjectContextObject) /* 17 */ +#endif +#ifndef Tcl_ObjectContextSkippedArgs +#define Tcl_ObjectContextSkippedArgs \ + (tclOOStubsPtr->tcl_ObjectContextSkippedArgs) /* 18 */ +#endif +#ifndef Tcl_ClassGetMetadata +#define Tcl_ClassGetMetadata \ + (tclOOStubsPtr->tcl_ClassGetMetadata) /* 19 */ +#endif +#ifndef Tcl_ClassSetMetadata +#define Tcl_ClassSetMetadata \ + (tclOOStubsPtr->tcl_ClassSetMetadata) /* 20 */ +#endif +#ifndef Tcl_ObjectGetMetadata +#define Tcl_ObjectGetMetadata \ + (tclOOStubsPtr->tcl_ObjectGetMetadata) /* 21 */ +#endif +#ifndef Tcl_ObjectSetMetadata +#define Tcl_ObjectSetMetadata \ + (tclOOStubsPtr->tcl_ObjectSetMetadata) /* 22 */ +#endif +#ifndef Tcl_ObjectContextInvokeNext +#define Tcl_ObjectContextInvokeNext \ + (tclOOStubsPtr->tcl_ObjectContextInvokeNext) /* 23 */ +#endif +#ifndef Tcl_ObjectGetMethodNameMapper +#define Tcl_ObjectGetMethodNameMapper \ + (tclOOStubsPtr->tcl_ObjectGetMethodNameMapper) /* 24 */ +#endif +#ifndef Tcl_ObjectSetMethodNameMapper +#define Tcl_ObjectSetMethodNameMapper \ + (tclOOStubsPtr->tcl_ObjectSetMethodNameMapper) /* 25 */ +#endif +#ifndef Tcl_ClassSetConstructor +#define Tcl_ClassSetConstructor \ + (tclOOStubsPtr->tcl_ClassSetConstructor) /* 26 */ +#endif +#ifndef Tcl_ClassSetDestructor +#define Tcl_ClassSetDestructor \ + (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ +#endif + +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLOODECLS */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index c660fdd..4ee1788 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,264 +1,264 @@ -/* - * $Id: tclOOIntDecls.h,v 1.6 2008/07/21 21:02:18 ferrieux Exp $ - * - * This file is (mostly) automatically generated from tclOO.decls. - */ - -#ifndef _TCLOOINTDECLS -#define _TCLOOINTDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclOO.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef TclOOGetDefineCmdContext_TCL_DECLARED -#define TclOOGetDefineCmdContext_TCL_DECLARED -/* 0 */ -EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); -#endif -#ifndef TclOOMakeProcInstanceMethod_TCL_DECLARED -#define TclOOMakeProcInstanceMethod_TCL_DECLARED -/* 1 */ -EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, - ClientData clientData, Proc ** procPtrPtr); -#endif -#ifndef TclOOMakeProcMethod_TCL_DECLARED -#define TclOOMakeProcMethod_TCL_DECLARED -/* 2 */ -EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - const char * namePtr, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, - ClientData clientData, Proc ** procPtrPtr); -#endif -#ifndef TclOONewProcInstanceMethod_TCL_DECLARED -#define TclOONewProcInstanceMethod_TCL_DECLARED -/* 3 */ -EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - ProcedureMethod ** pmPtrPtr); -#endif -#ifndef TclOONewProcMethod_TCL_DECLARED -#define TclOONewProcMethod_TCL_DECLARED -/* 4 */ -EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - ProcedureMethod ** pmPtrPtr); -#endif -#ifndef TclOOObjectCmdCore_TCL_DECLARED -#define TclOOObjectCmdCore_TCL_DECLARED -/* 5 */ -EXTERN int TclOOObjectCmdCore (Object * oPtr, - Tcl_Interp * interp, int objc, - Tcl_Obj *const * objv, int publicOnly, - Class * startCls); -#endif -#ifndef TclOOIsReachable_TCL_DECLARED -#define TclOOIsReachable_TCL_DECLARED -/* 6 */ -EXTERN int TclOOIsReachable (Class * targetPtr, - Class * startPtr); -#endif -#ifndef TclOONewForwardMethod_TCL_DECLARED -#define TclOONewForwardMethod_TCL_DECLARED -/* 7 */ -EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, - Class * clsPtr, int isPublic, - Tcl_Obj * nameObj, Tcl_Obj * prefixObj); -#endif -#ifndef TclOONewForwardInstanceMethod_TCL_DECLARED -#define TclOONewForwardInstanceMethod_TCL_DECLARED -/* 8 */ -EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int isPublic, - Tcl_Obj * nameObj, Tcl_Obj * prefixObj); -#endif -#ifndef TclOONewProcInstanceMethodEx_TCL_DECLARED -#define TclOONewProcInstanceMethodEx_TCL_DECLARED -/* 9 */ -EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, - Tcl_Object oPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, - void ** internalTokenPtr); -#endif -#ifndef TclOONewProcMethodEx_TCL_DECLARED -#define TclOONewProcMethodEx_TCL_DECLARED -/* 10 */ -EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, - Tcl_Class clsPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, - void ** internalTokenPtr); -#endif -#ifndef TclOOInvokeObject_TCL_DECLARED -#define TclOOInvokeObject_TCL_DECLARED -/* 11 */ -EXTERN int TclOOInvokeObject (Tcl_Interp * interp, - Tcl_Object object, Tcl_Class startCls, - int publicPrivate, int objc, - Tcl_Obj *const * objv); -#endif -#ifndef TclOOObjectSetFilters_TCL_DECLARED -#define TclOOObjectSetFilters_TCL_DECLARED -/* 12 */ -EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, - Tcl_Obj *const * filters); -#endif -#ifndef TclOOClassSetFilters_TCL_DECLARED -#define TclOOClassSetFilters_TCL_DECLARED -/* 13 */ -EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, - Class * classPtr, int numFilters, - Tcl_Obj *const * filters); -#endif -#ifndef TclOOObjectSetMixins_TCL_DECLARED -#define TclOOObjectSetMixins_TCL_DECLARED -/* 14 */ -EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, - Class *const * mixins); -#endif -#ifndef TclOOClassSetMixins_TCL_DECLARED -#define TclOOClassSetMixins_TCL_DECLARED -/* 15 */ -EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, - Class * classPtr, int numMixins, - Class *const * mixins); -#endif - -typedef struct TclOOIntStubs { - int magic; - CONST struct TclOOIntStubHooks *hooks; - - Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ - Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ - Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ - Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ - Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ - int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ - int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ - Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ - Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ - Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ - Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ - int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ - void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ - void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ - void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ - void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ -} TclOOIntStubs; - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) -extern CONST TclOOIntStubs *tclOOIntStubsPtr; -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef TclOOGetDefineCmdContext -#define TclOOGetDefineCmdContext \ - (tclOOIntStubsPtr->tclOOGetDefineCmdContext) /* 0 */ -#endif -#ifndef TclOOMakeProcInstanceMethod -#define TclOOMakeProcInstanceMethod \ - (tclOOIntStubsPtr->tclOOMakeProcInstanceMethod) /* 1 */ -#endif -#ifndef TclOOMakeProcMethod -#define TclOOMakeProcMethod \ - (tclOOIntStubsPtr->tclOOMakeProcMethod) /* 2 */ -#endif -#ifndef TclOONewProcInstanceMethod -#define TclOONewProcInstanceMethod \ - (tclOOIntStubsPtr->tclOONewProcInstanceMethod) /* 3 */ -#endif -#ifndef TclOONewProcMethod -#define TclOONewProcMethod \ - (tclOOIntStubsPtr->tclOONewProcMethod) /* 4 */ -#endif -#ifndef TclOOObjectCmdCore -#define TclOOObjectCmdCore \ - (tclOOIntStubsPtr->tclOOObjectCmdCore) /* 5 */ -#endif -#ifndef TclOOIsReachable -#define TclOOIsReachable \ - (tclOOIntStubsPtr->tclOOIsReachable) /* 6 */ -#endif -#ifndef TclOONewForwardMethod -#define TclOONewForwardMethod \ - (tclOOIntStubsPtr->tclOONewForwardMethod) /* 7 */ -#endif -#ifndef TclOONewForwardInstanceMethod -#define TclOONewForwardInstanceMethod \ - (tclOOIntStubsPtr->tclOONewForwardInstanceMethod) /* 8 */ -#endif -#ifndef TclOONewProcInstanceMethodEx -#define TclOONewProcInstanceMethodEx \ - (tclOOIntStubsPtr->tclOONewProcInstanceMethodEx) /* 9 */ -#endif -#ifndef TclOONewProcMethodEx -#define TclOONewProcMethodEx \ - (tclOOIntStubsPtr->tclOONewProcMethodEx) /* 10 */ -#endif -#ifndef TclOOInvokeObject -#define TclOOInvokeObject \ - (tclOOIntStubsPtr->tclOOInvokeObject) /* 11 */ -#endif -#ifndef TclOOObjectSetFilters -#define TclOOObjectSetFilters \ - (tclOOIntStubsPtr->tclOOObjectSetFilters) /* 12 */ -#endif -#ifndef TclOOClassSetFilters -#define TclOOClassSetFilters \ - (tclOOIntStubsPtr->tclOOClassSetFilters) /* 13 */ -#endif -#ifndef TclOOObjectSetMixins -#define TclOOObjectSetMixins \ - (tclOOIntStubsPtr->tclOOObjectSetMixins) /* 14 */ -#endif -#ifndef TclOOClassSetMixins -#define TclOOClassSetMixins \ - (tclOOIntStubsPtr->tclOOClassSetMixins) /* 15 */ -#endif - -#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLOOINTDECLS */ +/* + * $Id: tclOOIntDecls.h,v 1.7 2008/07/22 23:01:38 das Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + */ + +#ifndef _TCLOOINTDECLS +#define _TCLOOINTDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclOO.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef TclOOGetDefineCmdContext_TCL_DECLARED +#define TclOOGetDefineCmdContext_TCL_DECLARED +/* 0 */ +EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); +#endif +#ifndef TclOOMakeProcInstanceMethod_TCL_DECLARED +#define TclOOMakeProcInstanceMethod_TCL_DECLARED +/* 1 */ +EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, + ClientData clientData, Proc ** procPtrPtr); +#endif +#ifndef TclOOMakeProcMethod_TCL_DECLARED +#define TclOOMakeProcMethod_TCL_DECLARED +/* 2 */ +EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + const char * namePtr, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, + ClientData clientData, Proc ** procPtrPtr); +#endif +#ifndef TclOONewProcInstanceMethod_TCL_DECLARED +#define TclOONewProcInstanceMethod_TCL_DECLARED +/* 3 */ +EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + ProcedureMethod ** pmPtrPtr); +#endif +#ifndef TclOONewProcMethod_TCL_DECLARED +#define TclOONewProcMethod_TCL_DECLARED +/* 4 */ +EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + ProcedureMethod ** pmPtrPtr); +#endif +#ifndef TclOOObjectCmdCore_TCL_DECLARED +#define TclOOObjectCmdCore_TCL_DECLARED +/* 5 */ +EXTERN int TclOOObjectCmdCore (Object * oPtr, + Tcl_Interp * interp, int objc, + Tcl_Obj *const * objv, int publicOnly, + Class * startCls); +#endif +#ifndef TclOOIsReachable_TCL_DECLARED +#define TclOOIsReachable_TCL_DECLARED +/* 6 */ +EXTERN int TclOOIsReachable (Class * targetPtr, + Class * startPtr); +#endif +#ifndef TclOONewForwardMethod_TCL_DECLARED +#define TclOONewForwardMethod_TCL_DECLARED +/* 7 */ +EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, + Class * clsPtr, int isPublic, + Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +#endif +#ifndef TclOONewForwardInstanceMethod_TCL_DECLARED +#define TclOONewForwardInstanceMethod_TCL_DECLARED +/* 8 */ +EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int isPublic, + Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +#endif +#ifndef TclOONewProcInstanceMethodEx_TCL_DECLARED +#define TclOONewProcInstanceMethodEx_TCL_DECLARED +/* 9 */ +EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, + Tcl_Object oPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, + void ** internalTokenPtr); +#endif +#ifndef TclOONewProcMethodEx_TCL_DECLARED +#define TclOONewProcMethodEx_TCL_DECLARED +/* 10 */ +EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, + Tcl_Class clsPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, + void ** internalTokenPtr); +#endif +#ifndef TclOOInvokeObject_TCL_DECLARED +#define TclOOInvokeObject_TCL_DECLARED +/* 11 */ +EXTERN int TclOOInvokeObject (Tcl_Interp * interp, + Tcl_Object object, Tcl_Class startCls, + int publicPrivate, int objc, + Tcl_Obj *const * objv); +#endif +#ifndef TclOOObjectSetFilters_TCL_DECLARED +#define TclOOObjectSetFilters_TCL_DECLARED +/* 12 */ +EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, + Tcl_Obj *const * filters); +#endif +#ifndef TclOOClassSetFilters_TCL_DECLARED +#define TclOOClassSetFilters_TCL_DECLARED +/* 13 */ +EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, + Class * classPtr, int numFilters, + Tcl_Obj *const * filters); +#endif +#ifndef TclOOObjectSetMixins_TCL_DECLARED +#define TclOOObjectSetMixins_TCL_DECLARED +/* 14 */ +EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, + Class *const * mixins); +#endif +#ifndef TclOOClassSetMixins_TCL_DECLARED +#define TclOOClassSetMixins_TCL_DECLARED +/* 15 */ +EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, + Class * classPtr, int numMixins, + Class *const * mixins); +#endif + +typedef struct TclOOIntStubs { + int magic; + CONST struct TclOOIntStubHooks *hooks; + + Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ + Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ + Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ + Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ + Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ + int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ + int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ + Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ + Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ + Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ + Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ + int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ + void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ + void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ + void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ + void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ +} TclOOIntStubs; + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) +extern CONST TclOOIntStubs *tclOOIntStubsPtr; +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +#if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef TclOOGetDefineCmdContext +#define TclOOGetDefineCmdContext \ + (tclOOIntStubsPtr->tclOOGetDefineCmdContext) /* 0 */ +#endif +#ifndef TclOOMakeProcInstanceMethod +#define TclOOMakeProcInstanceMethod \ + (tclOOIntStubsPtr->tclOOMakeProcInstanceMethod) /* 1 */ +#endif +#ifndef TclOOMakeProcMethod +#define TclOOMakeProcMethod \ + (tclOOIntStubsPtr->tclOOMakeProcMethod) /* 2 */ +#endif +#ifndef TclOONewProcInstanceMethod +#define TclOONewProcInstanceMethod \ + (tclOOIntStubsPtr->tclOONewProcInstanceMethod) /* 3 */ +#endif +#ifndef TclOONewProcMethod +#define TclOONewProcMethod \ + (tclOOIntStubsPtr->tclOONewProcMethod) /* 4 */ +#endif +#ifndef TclOOObjectCmdCore +#define TclOOObjectCmdCore \ + (tclOOIntStubsPtr->tclOOObjectCmdCore) /* 5 */ +#endif +#ifndef TclOOIsReachable +#define TclOOIsReachable \ + (tclOOIntStubsPtr->tclOOIsReachable) /* 6 */ +#endif +#ifndef TclOONewForwardMethod +#define TclOONewForwardMethod \ + (tclOOIntStubsPtr->tclOONewForwardMethod) /* 7 */ +#endif +#ifndef TclOONewForwardInstanceMethod +#define TclOONewForwardInstanceMethod \ + (tclOOIntStubsPtr->tclOONewForwardInstanceMethod) /* 8 */ +#endif +#ifndef TclOONewProcInstanceMethodEx +#define TclOONewProcInstanceMethodEx \ + (tclOOIntStubsPtr->tclOONewProcInstanceMethodEx) /* 9 */ +#endif +#ifndef TclOONewProcMethodEx +#define TclOONewProcMethodEx \ + (tclOOIntStubsPtr->tclOONewProcMethodEx) /* 10 */ +#endif +#ifndef TclOOInvokeObject +#define TclOOInvokeObject \ + (tclOOIntStubsPtr->tclOOInvokeObject) /* 11 */ +#endif +#ifndef TclOOObjectSetFilters +#define TclOOObjectSetFilters \ + (tclOOIntStubsPtr->tclOOObjectSetFilters) /* 12 */ +#endif +#ifndef TclOOClassSetFilters +#define TclOOClassSetFilters \ + (tclOOIntStubsPtr->tclOOClassSetFilters) /* 13 */ +#endif +#ifndef TclOOObjectSetMixins +#define TclOOObjectSetMixins \ + (tclOOIntStubsPtr->tclOOObjectSetMixins) /* 14 */ +#endif +#ifndef TclOOClassSetMixins +#define TclOOClassSetMixins \ + (tclOOIntStubsPtr->tclOOClassSetMixins) /* 15 */ +#endif + +#endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLOOINTDECLS */ diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index ec3ed19..400eeef 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,78 +1,78 @@ -/* - * $Id: tclOOStubInit.c,v 1.5 2008/07/21 21:02:18 ferrieux Exp $ - * - * This file is (mostly) automatically generated from tclOO.decls. - * It is compiled and linked in with the tclOO package proper. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "tclOO.h" -#include "tclOOInt.h" - -/* !BEGIN!: Do not edit below this line. */ - -static const TclOOIntStubs tclOOIntStubs = { - TCL_STUB_MAGIC, - NULL, - TclOOGetDefineCmdContext, /* 0 */ - TclOOMakeProcInstanceMethod, /* 1 */ - TclOOMakeProcMethod, /* 2 */ - TclOONewProcInstanceMethod, /* 3 */ - TclOONewProcMethod, /* 4 */ - TclOOObjectCmdCore, /* 5 */ - TclOOIsReachable, /* 6 */ - TclOONewForwardMethod, /* 7 */ - TclOONewForwardInstanceMethod, /* 8 */ - TclOONewProcInstanceMethodEx, /* 9 */ - TclOONewProcMethodEx, /* 10 */ - TclOOInvokeObject, /* 11 */ - TclOOObjectSetFilters, /* 12 */ - TclOOClassSetFilters, /* 13 */ - TclOOObjectSetMixins, /* 14 */ - TclOOClassSetMixins, /* 15 */ -}; - -static const TclOOStubHooks tclOOStubHooks = { - &tclOOIntStubs -}; - -static const TclOOStubs tclOOStubs = { - TCL_STUB_MAGIC, - &tclOOStubHooks, - Tcl_CopyObjectInstance, /* 0 */ - Tcl_GetClassAsObject, /* 1 */ - Tcl_GetObjectAsClass, /* 2 */ - Tcl_GetObjectCommand, /* 3 */ - Tcl_GetObjectFromObj, /* 4 */ - Tcl_GetObjectNamespace, /* 5 */ - Tcl_MethodDeclarerClass, /* 6 */ - Tcl_MethodDeclarerObject, /* 7 */ - Tcl_MethodIsPublic, /* 8 */ - Tcl_MethodIsType, /* 9 */ - Tcl_MethodName, /* 10 */ - Tcl_NewInstanceMethod, /* 11 */ - Tcl_NewMethod, /* 12 */ - Tcl_NewObjectInstance, /* 13 */ - Tcl_ObjectDeleted, /* 14 */ - Tcl_ObjectContextIsFiltering, /* 15 */ - Tcl_ObjectContextMethod, /* 16 */ - Tcl_ObjectContextObject, /* 17 */ - Tcl_ObjectContextSkippedArgs, /* 18 */ - Tcl_ClassGetMetadata, /* 19 */ - Tcl_ClassSetMetadata, /* 20 */ - Tcl_ObjectGetMetadata, /* 21 */ - Tcl_ObjectSetMetadata, /* 22 */ - Tcl_ObjectContextInvokeNext, /* 23 */ - Tcl_ObjectGetMethodNameMapper, /* 24 */ - Tcl_ObjectSetMethodNameMapper, /* 25 */ - Tcl_ClassSetConstructor, /* 26 */ - Tcl_ClassSetDestructor, /* 27 */ -}; - -/* !END!: Do not edit above this line. */ - -MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; -const TclOOStubs * const tclOOConstStubPtr = &tclOOStubs; - +/* + * $Id: tclOOStubInit.c,v 1.6 2008/07/22 23:01:39 das Exp $ + * + * This file is (mostly) automatically generated from tclOO.decls. + * It is compiled and linked in with the tclOO package proper. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "tclOO.h" +#include "tclOOInt.h" + +/* !BEGIN!: Do not edit below this line. */ + +static const TclOOIntStubs tclOOIntStubs = { + TCL_STUB_MAGIC, + NULL, + TclOOGetDefineCmdContext, /* 0 */ + TclOOMakeProcInstanceMethod, /* 1 */ + TclOOMakeProcMethod, /* 2 */ + TclOONewProcInstanceMethod, /* 3 */ + TclOONewProcMethod, /* 4 */ + TclOOObjectCmdCore, /* 5 */ + TclOOIsReachable, /* 6 */ + TclOONewForwardMethod, /* 7 */ + TclOONewForwardInstanceMethod, /* 8 */ + TclOONewProcInstanceMethodEx, /* 9 */ + TclOONewProcMethodEx, /* 10 */ + TclOOInvokeObject, /* 11 */ + TclOOObjectSetFilters, /* 12 */ + TclOOClassSetFilters, /* 13 */ + TclOOObjectSetMixins, /* 14 */ + TclOOClassSetMixins, /* 15 */ +}; + +static const TclOOStubHooks tclOOStubHooks = { + &tclOOIntStubs +}; + +static const TclOOStubs tclOOStubs = { + TCL_STUB_MAGIC, + &tclOOStubHooks, + Tcl_CopyObjectInstance, /* 0 */ + Tcl_GetClassAsObject, /* 1 */ + Tcl_GetObjectAsClass, /* 2 */ + Tcl_GetObjectCommand, /* 3 */ + Tcl_GetObjectFromObj, /* 4 */ + Tcl_GetObjectNamespace, /* 5 */ + Tcl_MethodDeclarerClass, /* 6 */ + Tcl_MethodDeclarerObject, /* 7 */ + Tcl_MethodIsPublic, /* 8 */ + Tcl_MethodIsType, /* 9 */ + Tcl_MethodName, /* 10 */ + Tcl_NewInstanceMethod, /* 11 */ + Tcl_NewMethod, /* 12 */ + Tcl_NewObjectInstance, /* 13 */ + Tcl_ObjectDeleted, /* 14 */ + Tcl_ObjectContextIsFiltering, /* 15 */ + Tcl_ObjectContextMethod, /* 16 */ + Tcl_ObjectContextObject, /* 17 */ + Tcl_ObjectContextSkippedArgs, /* 18 */ + Tcl_ClassGetMetadata, /* 19 */ + Tcl_ClassSetMetadata, /* 20 */ + Tcl_ObjectGetMetadata, /* 21 */ + Tcl_ObjectSetMetadata, /* 22 */ + Tcl_ObjectContextInvokeNext, /* 23 */ + Tcl_ObjectGetMethodNameMapper, /* 24 */ + Tcl_ObjectSetMethodNameMapper, /* 25 */ + Tcl_ClassSetConstructor, /* 26 */ + Tcl_ClassSetDestructor, /* 27 */ +}; + +/* !END!: Do not edit above this line. */ + +MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; +const TclOOStubs * const tclOOConstStubPtr = &tclOOStubs; + diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 1607753..b7e49b5 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -1,137 +1,137 @@ -/* - * tclPlatDecls.h -- - * - * Declarations of platform specific Tcl APIs. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * All rights reserved. - * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.31 2008/07/21 21:02:18 ferrieux Exp $ - */ - -#ifndef _TCLPLATDECLS -#define _TCLPLATDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * Pull in the typedef of TCHAR for windows. - */ -#if defined(__CYGWIN__) - typedef char TCHAR; -#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) -# include -# ifndef _TCHAR_DEFINED - /* Borland seems to forget to set this. */ - typedef _TCHAR TCHAR; -# define _TCHAR_DEFINED -# endif -# if defined(_MSC_VER) && defined(__STDC__) - /* MSVC++ misses this. */ - typedef _TCHAR TCHAR; -# endif -#endif - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_WinUtfToTChar_TCL_DECLARED -#define Tcl_WinUtfToTChar_TCL_DECLARED -/* 0 */ -EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_WinTCharToUtf_TCL_DECLARED -#define Tcl_WinTCharToUtf_TCL_DECLARED -/* 1 */ -EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len, - Tcl_DString * dsPtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED -#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED -/* 0 */ -EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, - CONST char * bundleName, int hasResourceFile, - int maxPathLen, char * libraryPath); -#endif -#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED -#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED -/* 1 */ -EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( - Tcl_Interp * interp, CONST char * bundleName, - CONST char * bundleVersion, - int hasResourceFile, int maxPathLen, - char * libraryPath); -#endif -#endif /* MACOSX */ - -typedef struct TclPlatStubs { - int magic; - CONST struct TclPlatStubHooks *hooks; - -#ifdef __WIN32__ /* WIN */ - TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */ - char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ - int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ -#endif /* MACOSX */ -} TclPlatStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclPlatStubs *tclPlatStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_WinUtfToTChar -#define Tcl_WinUtfToTChar \ - (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */ -#endif -#ifndef Tcl_WinTCharToUtf -#define Tcl_WinTCharToUtf \ - (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_MacOSXOpenBundleResources -#define Tcl_MacOSXOpenBundleResources \ - (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */ -#endif -#ifndef Tcl_MacOSXOpenVersionedBundleResources -#define Tcl_MacOSXOpenVersionedBundleResources \ - (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */ -#endif -#endif /* MACOSX */ - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLPLATDECLS */ - - +/* + * tclPlatDecls.h -- + * + * Declarations of platform specific Tcl APIs. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * All rights reserved. + * + * RCS: @(#) $Id: tclPlatDecls.h,v 1.32 2008/07/22 23:01:43 das Exp $ + */ + +#ifndef _TCLPLATDECLS +#define _TCLPLATDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * Pull in the typedef of TCHAR for windows. + */ +#if defined(__CYGWIN__) + typedef char TCHAR; +#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) +# include +# ifndef _TCHAR_DEFINED + /* Borland seems to forget to set this. */ + typedef _TCHAR TCHAR; +# define _TCHAR_DEFINED +# endif +# if defined(_MSC_VER) && defined(__STDC__) + /* MSVC++ misses this. */ + typedef _TCHAR TCHAR; +# endif +#endif + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_WinUtfToTChar_TCL_DECLARED +#define Tcl_WinUtfToTChar_TCL_DECLARED +/* 0 */ +EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_WinTCharToUtf_TCL_DECLARED +#define Tcl_WinTCharToUtf_TCL_DECLARED +/* 1 */ +EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len, + Tcl_DString * dsPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, + CONST char * bundleName, int hasResourceFile, + int maxPathLen, char * libraryPath); +#endif +#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED +#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED +/* 1 */ +EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( + Tcl_Interp * interp, CONST char * bundleName, + CONST char * bundleVersion, + int hasResourceFile, int maxPathLen, + char * libraryPath); +#endif +#endif /* MACOSX */ + +typedef struct TclPlatStubs { + int magic; + CONST struct TclPlatStubHooks *hooks; + +#ifdef __WIN32__ /* WIN */ + TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */ + char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ + int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ +#endif /* MACOSX */ +} TclPlatStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclPlatStubs *tclPlatStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_WinUtfToTChar +#define Tcl_WinUtfToTChar \ + (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */ +#endif +#ifndef Tcl_WinTCharToUtf +#define Tcl_WinTCharToUtf \ + (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_MacOSXOpenBundleResources +#define Tcl_MacOSXOpenBundleResources \ + (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */ +#endif +#ifndef Tcl_MacOSXOpenVersionedBundleResources +#define Tcl_MacOSXOpenVersionedBundleResources \ + (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */ +#endif +#endif /* MACOSX */ + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLPLATDECLS */ + + diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 034689f..6473d74 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1,1131 +1,1131 @@ -/* - * tclStubInit.c -- - * - * This file contains the initializers for the Tcl stub vectors. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclStubInit.c,v 1.159 2008/07/21 21:02:18 ferrieux Exp $ - */ - -#include "tclInt.h" -#include "tommath.h" - -/* - * Remove macros that will interfere with the definitions below. - */ - -#undef Tcl_Alloc -#undef Tcl_Free -#undef Tcl_Realloc -#undef Tcl_NewBooleanObj -#undef Tcl_NewByteArrayObj -#undef Tcl_NewDoubleObj -#undef Tcl_NewIntObj -#undef Tcl_NewListObj -#undef Tcl_NewLongObj -#undef Tcl_NewObj -#undef Tcl_NewStringObj -#undef Tcl_DumpActiveMemory -#undef Tcl_ValidateAllMemory -#undef Tcl_FindHashEntry -#undef Tcl_CreateHashEntry - -/* - * WARNING: The contents of this file is automatically generated by the - * tools/genStubs.tcl script. Any modifications to the function declarations - * below should be made in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -static const TclIntStubs tclIntStubs = { - TCL_STUB_MAGIC, - NULL, - NULL, /* 0 */ - NULL, /* 1 */ - NULL, /* 2 */ - TclAllocateFreeObjects, /* 3 */ - NULL, /* 4 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCleanupChildren, /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCleanupChildren, /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCleanupChildren, /* 5 */ -#endif /* MACOSX */ - TclCleanupCommand, /* 6 */ - TclCopyAndCollapse, /* 7 */ - TclCopyChannel, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCreatePipeline, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCreatePipeline, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCreatePipeline, /* 9 */ -#endif /* MACOSX */ - TclCreateProc, /* 10 */ - TclDeleteCompiledLocalVars, /* 11 */ - TclDeleteVars, /* 12 */ - NULL, /* 13 */ - TclDumpMemoryInfo, /* 14 */ - NULL, /* 15 */ - TclExprFloatError, /* 16 */ - NULL, /* 17 */ - NULL, /* 18 */ - NULL, /* 19 */ - NULL, /* 20 */ - NULL, /* 21 */ - TclFindElement, /* 22 */ - TclFindProc, /* 23 */ - NULL, /* 24 */ - TclFreePackageInfo, /* 25 */ - NULL, /* 26 */ - NULL, /* 27 */ - TclpGetDefaultStdChannel, /* 28 */ - NULL, /* 29 */ - NULL, /* 30 */ - TclGetExtension, /* 31 */ - TclGetFrame, /* 32 */ - NULL, /* 33 */ - TclGetIntForIndex, /* 34 */ - NULL, /* 35 */ - NULL, /* 36 */ - TclGetLoadedPackages, /* 37 */ - TclGetNamespaceForQualName, /* 38 */ - TclGetObjInterpProc, /* 39 */ - TclGetOpenMode, /* 40 */ - TclGetOriginalCommand, /* 41 */ - TclpGetUserHome, /* 42 */ - NULL, /* 43 */ - TclGuessPackageName, /* 44 */ - TclHideUnsafeCommands, /* 45 */ - TclInExit, /* 46 */ - NULL, /* 47 */ - NULL, /* 48 */ - NULL, /* 49 */ - TclInitCompiledLocals, /* 50 */ - TclInterpInit, /* 51 */ - NULL, /* 52 */ - TclInvokeObjectCommand, /* 53 */ - TclInvokeStringCommand, /* 54 */ - TclIsProc, /* 55 */ - NULL, /* 56 */ - NULL, /* 57 */ - TclLookupVar, /* 58 */ - NULL, /* 59 */ - TclNeedSpace, /* 60 */ - TclNewProcBodyObj, /* 61 */ - TclObjCommandComplete, /* 62 */ - TclObjInterpProc, /* 63 */ - TclObjInvoke, /* 64 */ - NULL, /* 65 */ - NULL, /* 66 */ - NULL, /* 67 */ - NULL, /* 68 */ - TclpAlloc, /* 69 */ - NULL, /* 70 */ - NULL, /* 71 */ - NULL, /* 72 */ - NULL, /* 73 */ - TclpFree, /* 74 */ - TclpGetClicks, /* 75 */ - TclpGetSeconds, /* 76 */ - TclpGetTime, /* 77 */ - TclpGetTimeZone, /* 78 */ - NULL, /* 79 */ - NULL, /* 80 */ - TclpRealloc, /* 81 */ - NULL, /* 82 */ - NULL, /* 83 */ - NULL, /* 84 */ - NULL, /* 85 */ - NULL, /* 86 */ - NULL, /* 87 */ - TclPrecTraceProc, /* 88 */ - TclPreventAliasLoop, /* 89 */ - NULL, /* 90 */ - TclProcCleanupProc, /* 91 */ - TclProcCompileProc, /* 92 */ - TclProcDeleteProc, /* 93 */ - NULL, /* 94 */ - NULL, /* 95 */ - TclRenameCommand, /* 96 */ - TclResetShadowedCmdRefs, /* 97 */ - TclServiceIdle, /* 98 */ - NULL, /* 99 */ - NULL, /* 100 */ - TclSetPreInitScript, /* 101 */ - TclSetupEnv, /* 102 */ - TclSockGetPort, /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclSockMinimumBuffers, /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* MACOSX */ - NULL, /* 105 */ - NULL, /* 106 */ - NULL, /* 107 */ - TclTeardownNamespace, /* 108 */ - TclUpdateReturnInfo, /* 109 */ - NULL, /* 110 */ - Tcl_AddInterpResolvers, /* 111 */ - Tcl_AppendExportList, /* 112 */ - Tcl_CreateNamespace, /* 113 */ - Tcl_DeleteNamespace, /* 114 */ - Tcl_Export, /* 115 */ - Tcl_FindCommand, /* 116 */ - Tcl_FindNamespace, /* 117 */ - Tcl_GetInterpResolvers, /* 118 */ - Tcl_GetNamespaceResolvers, /* 119 */ - Tcl_FindNamespaceVar, /* 120 */ - Tcl_ForgetImport, /* 121 */ - Tcl_GetCommandFromObj, /* 122 */ - Tcl_GetCommandFullName, /* 123 */ - Tcl_GetCurrentNamespace, /* 124 */ - Tcl_GetGlobalNamespace, /* 125 */ - Tcl_GetVariableFullName, /* 126 */ - Tcl_Import, /* 127 */ - Tcl_PopCallFrame, /* 128 */ - Tcl_PushCallFrame, /* 129 */ - Tcl_RemoveInterpResolvers, /* 130 */ - Tcl_SetNamespaceResolvers, /* 131 */ - TclpHasSockets, /* 132 */ - TclpGetDate, /* 133 */ - NULL, /* 134 */ - NULL, /* 135 */ - NULL, /* 136 */ - NULL, /* 137 */ - TclGetEnv, /* 138 */ - NULL, /* 139 */ - NULL, /* 140 */ - TclpGetCwd, /* 141 */ - TclSetByteCodeFromAny, /* 142 */ - TclAddLiteralObj, /* 143 */ - TclHideLiteral, /* 144 */ - TclGetAuxDataType, /* 145 */ - TclHandleCreate, /* 146 */ - TclHandleFree, /* 147 */ - TclHandlePreserve, /* 148 */ - TclHandleRelease, /* 149 */ - TclRegAbout, /* 150 */ - TclRegExpRangeUniChar, /* 151 */ - TclSetLibraryPath, /* 152 */ - TclGetLibraryPath, /* 153 */ - NULL, /* 154 */ - NULL, /* 155 */ - TclRegError, /* 156 */ - TclVarTraceExists, /* 157 */ - TclSetStartupScriptFileName, /* 158 */ - TclGetStartupScriptFileName, /* 159 */ - NULL, /* 160 */ - TclChannelTransform, /* 161 */ - TclChannelEventScriptInvoker, /* 162 */ - TclGetInstructionTable, /* 163 */ - TclExpandCodeArray, /* 164 */ - TclpSetInitialEncodings, /* 165 */ - TclListObjSetElement, /* 166 */ - TclSetStartupScriptPath, /* 167 */ - TclGetStartupScriptPath, /* 168 */ - TclpUtfNcmp2, /* 169 */ - TclCheckInterpTraces, /* 170 */ - TclCheckExecutionTraces, /* 171 */ - TclInThreadExit, /* 172 */ - TclUniCharMatch, /* 173 */ - NULL, /* 174 */ - TclCallVarTraces, /* 175 */ - TclCleanupVar, /* 176 */ - TclVarErrMsg, /* 177 */ - Tcl_SetStartupScript, /* 178 */ - Tcl_GetStartupScript, /* 179 */ - NULL, /* 180 */ - NULL, /* 181 */ - TclpLocaltime, /* 182 */ - TclpGmtime, /* 183 */ - NULL, /* 184 */ - NULL, /* 185 */ - NULL, /* 186 */ - NULL, /* 187 */ - NULL, /* 188 */ - NULL, /* 189 */ - NULL, /* 190 */ - NULL, /* 191 */ - NULL, /* 192 */ - NULL, /* 193 */ - NULL, /* 194 */ - NULL, /* 195 */ - NULL, /* 196 */ - NULL, /* 197 */ - TclObjGetFrame, /* 198 */ - NULL, /* 199 */ - TclpObjRemoveDirectory, /* 200 */ - TclpObjCopyDirectory, /* 201 */ - TclpObjCreateDirectory, /* 202 */ - TclpObjDeleteFile, /* 203 */ - TclpObjCopyFile, /* 204 */ - TclpObjRenameFile, /* 205 */ - TclpObjStat, /* 206 */ - TclpObjAccess, /* 207 */ - TclpOpenFileChannel, /* 208 */ - NULL, /* 209 */ - NULL, /* 210 */ - NULL, /* 211 */ - TclpFindExecutable, /* 212 */ - TclGetObjNameOfExecutable, /* 213 */ - TclSetObjNameOfExecutable, /* 214 */ - TclStackAlloc, /* 215 */ - TclStackFree, /* 216 */ - TclPushStackFrame, /* 217 */ - TclPopStackFrame, /* 218 */ - NULL, /* 219 */ - NULL, /* 220 */ - NULL, /* 221 */ - NULL, /* 222 */ - NULL, /* 223 */ - TclGetPlatform, /* 224 */ - TclTraceDictPath, /* 225 */ - TclObjBeingDeleted, /* 226 */ - TclSetNsPath, /* 227 */ - TclObjInterpProcCore, /* 228 */ - TclPtrMakeUpvar, /* 229 */ - TclObjLookupVar, /* 230 */ - TclGetNamespaceFromObj, /* 231 */ - TclEvalObjEx, /* 232 */ - TclGetSrcInfoForPc, /* 233 */ - TclVarHashCreateVar, /* 234 */ - TclInitVarHashTable, /* 235 */ - TclBackgroundException, /* 236 */ - TclResetCancellation, /* 237 */ - TclEvalObjv_NR2, /* 238 */ - &TclNRInterpProc, /* 239 */ - TclNRInterpProcCore, /* 240 */ - TclNRPushRecord, /* 241 */ - TclNRPopAndFreeRecord, /* 242 */ - TclNREvalObjEx, /* 243 */ -}; - -static const TclIntPlatStubs tclIntPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclWinConvertError, /* 0 */ - TclWinConvertWSAError, /* 1 */ - TclWinGetServByName, /* 2 */ - TclWinGetSockOpt, /* 3 */ - TclWinGetTclInstance, /* 4 */ - NULL, /* 5 */ - TclWinNToHS, /* 6 */ - TclWinSetSockOpt, /* 7 */ - TclpGetPid, /* 8 */ - TclWinGetPlatformId, /* 9 */ - NULL, /* 10 */ - TclGetAndDetachPids, /* 11 */ - TclpCloseFile, /* 12 */ - TclpCreateCommandChannel, /* 13 */ - TclpCreatePipe, /* 14 */ - TclpCreateProcess, /* 15 */ - NULL, /* 16 */ - NULL, /* 17 */ - TclpMakeFile, /* 18 */ - TclpOpenFile, /* 19 */ - TclWinAddProcess, /* 20 */ - NULL, /* 21 */ - TclpCreateTempFile, /* 22 */ - TclpGetTZName, /* 23 */ - TclWinNoBackslash, /* 24 */ - NULL, /* 25 */ - TclWinSetInterfaces, /* 26 */ - TclWinFlushDirtyChannels, /* 27 */ - TclWinResetInterfaces, /* 28 */ - TclWinCPUID, /* 29 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ - TclMacOSXGetFileAttribute, /* 15 */ - TclMacOSXSetFileAttribute, /* 16 */ - TclMacOSXCopyFileAttributes, /* 17 */ - TclMacOSXMatchType, /* 18 */ -#endif /* MACOSX */ -}; - -static const TclPlatStubs tclPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#ifdef __WIN32__ /* WIN */ - Tcl_WinUtfToTChar, /* 0 */ - Tcl_WinTCharToUtf, /* 1 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_MacOSXOpenBundleResources, /* 0 */ - Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ -#endif /* MACOSX */ -}; - -static const TclTomMathStubs tclTomMathStubs = { - TCL_STUB_MAGIC, - NULL, - TclBN_epoch, /* 0 */ - TclBN_revision, /* 1 */ - TclBN_mp_add, /* 2 */ - TclBN_mp_add_d, /* 3 */ - TclBN_mp_and, /* 4 */ - TclBN_mp_clamp, /* 5 */ - TclBN_mp_clear, /* 6 */ - TclBN_mp_clear_multi, /* 7 */ - TclBN_mp_cmp, /* 8 */ - TclBN_mp_cmp_d, /* 9 */ - TclBN_mp_cmp_mag, /* 10 */ - TclBN_mp_copy, /* 11 */ - TclBN_mp_count_bits, /* 12 */ - TclBN_mp_div, /* 13 */ - TclBN_mp_div_d, /* 14 */ - TclBN_mp_div_2, /* 15 */ - TclBN_mp_div_2d, /* 16 */ - TclBN_mp_div_3, /* 17 */ - TclBN_mp_exch, /* 18 */ - TclBN_mp_expt_d, /* 19 */ - TclBN_mp_grow, /* 20 */ - TclBN_mp_init, /* 21 */ - TclBN_mp_init_copy, /* 22 */ - TclBN_mp_init_multi, /* 23 */ - TclBN_mp_init_set, /* 24 */ - TclBN_mp_init_size, /* 25 */ - TclBN_mp_lshd, /* 26 */ - TclBN_mp_mod, /* 27 */ - TclBN_mp_mod_2d, /* 28 */ - TclBN_mp_mul, /* 29 */ - TclBN_mp_mul_d, /* 30 */ - TclBN_mp_mul_2, /* 31 */ - TclBN_mp_mul_2d, /* 32 */ - TclBN_mp_neg, /* 33 */ - TclBN_mp_or, /* 34 */ - TclBN_mp_radix_size, /* 35 */ - TclBN_mp_read_radix, /* 36 */ - TclBN_mp_rshd, /* 37 */ - TclBN_mp_shrink, /* 38 */ - TclBN_mp_set, /* 39 */ - TclBN_mp_sqr, /* 40 */ - TclBN_mp_sqrt, /* 41 */ - TclBN_mp_sub, /* 42 */ - TclBN_mp_sub_d, /* 43 */ - TclBN_mp_to_unsigned_bin, /* 44 */ - TclBN_mp_to_unsigned_bin_n, /* 45 */ - TclBN_mp_toradix_n, /* 46 */ - TclBN_mp_unsigned_bin_size, /* 47 */ - TclBN_mp_xor, /* 48 */ - TclBN_mp_zero, /* 49 */ - TclBN_reverse, /* 50 */ - TclBN_fast_s_mp_mul_digs, /* 51 */ - TclBN_fast_s_mp_sqr, /* 52 */ - TclBN_mp_karatsuba_mul, /* 53 */ - TclBN_mp_karatsuba_sqr, /* 54 */ - TclBN_mp_toom_mul, /* 55 */ - TclBN_mp_toom_sqr, /* 56 */ - TclBN_s_mp_add, /* 57 */ - TclBN_s_mp_mul_digs, /* 58 */ - TclBN_s_mp_sqr, /* 59 */ - TclBN_s_mp_sub, /* 60 */ -}; - -static const TclStubHooks tclStubHooks = { - &tclPlatStubs, - &tclIntStubs, - &tclIntPlatStubs -}; - -static const TclStubs tclStubs = { - TCL_STUB_MAGIC, - &tclStubHooks, - Tcl_PkgProvideEx, /* 0 */ - Tcl_PkgRequireEx, /* 1 */ - Tcl_Panic, /* 2 */ - Tcl_Alloc, /* 3 */ - Tcl_Free, /* 4 */ - Tcl_Realloc, /* 5 */ - Tcl_DbCkalloc, /* 6 */ - Tcl_DbCkfree, /* 7 */ - Tcl_DbCkrealloc, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 10 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* MACOSX */ - Tcl_SetTimer, /* 11 */ - Tcl_Sleep, /* 12 */ - Tcl_WaitForEvent, /* 13 */ - Tcl_AppendAllObjTypes, /* 14 */ - Tcl_AppendStringsToObj, /* 15 */ - Tcl_AppendToObj, /* 16 */ - Tcl_ConcatObj, /* 17 */ - Tcl_ConvertToType, /* 18 */ - Tcl_DbDecrRefCount, /* 19 */ - Tcl_DbIncrRefCount, /* 20 */ - Tcl_DbIsShared, /* 21 */ - Tcl_DbNewBooleanObj, /* 22 */ - Tcl_DbNewByteArrayObj, /* 23 */ - Tcl_DbNewDoubleObj, /* 24 */ - Tcl_DbNewListObj, /* 25 */ - Tcl_DbNewLongObj, /* 26 */ - Tcl_DbNewObj, /* 27 */ - Tcl_DbNewStringObj, /* 28 */ - Tcl_DuplicateObj, /* 29 */ - TclFreeObj, /* 30 */ - Tcl_GetBoolean, /* 31 */ - Tcl_GetBooleanFromObj, /* 32 */ - Tcl_GetByteArrayFromObj, /* 33 */ - Tcl_GetDouble, /* 34 */ - Tcl_GetDoubleFromObj, /* 35 */ - Tcl_GetIndexFromObj, /* 36 */ - Tcl_GetInt, /* 37 */ - Tcl_GetIntFromObj, /* 38 */ - Tcl_GetLongFromObj, /* 39 */ - Tcl_GetObjType, /* 40 */ - Tcl_GetStringFromObj, /* 41 */ - Tcl_InvalidateStringRep, /* 42 */ - Tcl_ListObjAppendList, /* 43 */ - Tcl_ListObjAppendElement, /* 44 */ - Tcl_ListObjGetElements, /* 45 */ - Tcl_ListObjIndex, /* 46 */ - Tcl_ListObjLength, /* 47 */ - Tcl_ListObjReplace, /* 48 */ - Tcl_NewBooleanObj, /* 49 */ - Tcl_NewByteArrayObj, /* 50 */ - Tcl_NewDoubleObj, /* 51 */ - Tcl_NewIntObj, /* 52 */ - Tcl_NewListObj, /* 53 */ - Tcl_NewLongObj, /* 54 */ - Tcl_NewObj, /* 55 */ - Tcl_NewStringObj, /* 56 */ - Tcl_SetBooleanObj, /* 57 */ - Tcl_SetByteArrayLength, /* 58 */ - Tcl_SetByteArrayObj, /* 59 */ - Tcl_SetDoubleObj, /* 60 */ - Tcl_SetIntObj, /* 61 */ - Tcl_SetListObj, /* 62 */ - Tcl_SetLongObj, /* 63 */ - Tcl_SetObjLength, /* 64 */ - Tcl_SetStringObj, /* 65 */ - Tcl_AddErrorInfo, /* 66 */ - Tcl_AddObjErrorInfo, /* 67 */ - Tcl_AllowExceptions, /* 68 */ - Tcl_AppendElement, /* 69 */ - Tcl_AppendResult, /* 70 */ - Tcl_AsyncCreate, /* 71 */ - Tcl_AsyncDelete, /* 72 */ - Tcl_AsyncInvoke, /* 73 */ - Tcl_AsyncMark, /* 74 */ - Tcl_AsyncReady, /* 75 */ - Tcl_BackgroundError, /* 76 */ - Tcl_Backslash, /* 77 */ - Tcl_BadChannelOption, /* 78 */ - Tcl_CallWhenDeleted, /* 79 */ - Tcl_CancelIdleCall, /* 80 */ - Tcl_Close, /* 81 */ - Tcl_CommandComplete, /* 82 */ - Tcl_Concat, /* 83 */ - Tcl_ConvertElement, /* 84 */ - Tcl_ConvertCountedElement, /* 85 */ - Tcl_CreateAlias, /* 86 */ - Tcl_CreateAliasObj, /* 87 */ - Tcl_CreateChannel, /* 88 */ - Tcl_CreateChannelHandler, /* 89 */ - Tcl_CreateCloseHandler, /* 90 */ - Tcl_CreateCommand, /* 91 */ - Tcl_CreateEventSource, /* 92 */ - Tcl_CreateExitHandler, /* 93 */ - Tcl_CreateInterp, /* 94 */ - Tcl_CreateMathFunc, /* 95 */ - Tcl_CreateObjCommand, /* 96 */ - Tcl_CreateSlave, /* 97 */ - Tcl_CreateTimerHandler, /* 98 */ - Tcl_CreateTrace, /* 99 */ - Tcl_DeleteAssocData, /* 100 */ - Tcl_DeleteChannelHandler, /* 101 */ - Tcl_DeleteCloseHandler, /* 102 */ - Tcl_DeleteCommand, /* 103 */ - Tcl_DeleteCommandFromToken, /* 104 */ - Tcl_DeleteEvents, /* 105 */ - Tcl_DeleteEventSource, /* 106 */ - Tcl_DeleteExitHandler, /* 107 */ - Tcl_DeleteHashEntry, /* 108 */ - Tcl_DeleteHashTable, /* 109 */ - Tcl_DeleteInterp, /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DetachPids, /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_DetachPids, /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DetachPids, /* 111 */ -#endif /* MACOSX */ - Tcl_DeleteTimerHandler, /* 112 */ - Tcl_DeleteTrace, /* 113 */ - Tcl_DontCallWhenDeleted, /* 114 */ - Tcl_DoOneEvent, /* 115 */ - Tcl_DoWhenIdle, /* 116 */ - Tcl_DStringAppend, /* 117 */ - Tcl_DStringAppendElement, /* 118 */ - Tcl_DStringEndSublist, /* 119 */ - Tcl_DStringFree, /* 120 */ - Tcl_DStringGetResult, /* 121 */ - Tcl_DStringInit, /* 122 */ - Tcl_DStringResult, /* 123 */ - Tcl_DStringSetLength, /* 124 */ - Tcl_DStringStartSublist, /* 125 */ - Tcl_Eof, /* 126 */ - Tcl_ErrnoId, /* 127 */ - Tcl_ErrnoMsg, /* 128 */ - Tcl_Eval, /* 129 */ - Tcl_EvalFile, /* 130 */ - Tcl_EvalObj, /* 131 */ - Tcl_EventuallyFree, /* 132 */ - Tcl_Exit, /* 133 */ - Tcl_ExposeCommand, /* 134 */ - Tcl_ExprBoolean, /* 135 */ - Tcl_ExprBooleanObj, /* 136 */ - Tcl_ExprDouble, /* 137 */ - Tcl_ExprDoubleObj, /* 138 */ - Tcl_ExprLong, /* 139 */ - Tcl_ExprLongObj, /* 140 */ - Tcl_ExprObj, /* 141 */ - Tcl_ExprString, /* 142 */ - Tcl_Finalize, /* 143 */ - Tcl_FindExecutable, /* 144 */ - Tcl_FirstHashEntry, /* 145 */ - Tcl_Flush, /* 146 */ - Tcl_FreeResult, /* 147 */ - Tcl_GetAlias, /* 148 */ - Tcl_GetAliasObj, /* 149 */ - Tcl_GetAssocData, /* 150 */ - Tcl_GetChannel, /* 151 */ - Tcl_GetChannelBufferSize, /* 152 */ - Tcl_GetChannelHandle, /* 153 */ - Tcl_GetChannelInstanceData, /* 154 */ - Tcl_GetChannelMode, /* 155 */ - Tcl_GetChannelName, /* 156 */ - Tcl_GetChannelOption, /* 157 */ - Tcl_GetChannelType, /* 158 */ - Tcl_GetCommandInfo, /* 159 */ - Tcl_GetCommandName, /* 160 */ - Tcl_GetErrno, /* 161 */ - Tcl_GetHostName, /* 162 */ - Tcl_GetInterpPath, /* 163 */ - Tcl_GetMaster, /* 164 */ - Tcl_GetNameOfExecutable, /* 165 */ - Tcl_GetObjResult, /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 167 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* MACOSX */ - Tcl_GetPathType, /* 168 */ - Tcl_Gets, /* 169 */ - Tcl_GetsObj, /* 170 */ - Tcl_GetServiceMode, /* 171 */ - Tcl_GetSlave, /* 172 */ - Tcl_GetStdChannel, /* 173 */ - Tcl_GetStringResult, /* 174 */ - Tcl_GetVar, /* 175 */ - Tcl_GetVar2, /* 176 */ - Tcl_GlobalEval, /* 177 */ - Tcl_GlobalEvalObj, /* 178 */ - Tcl_HideCommand, /* 179 */ - Tcl_Init, /* 180 */ - Tcl_InitHashTable, /* 181 */ - Tcl_InputBlocked, /* 182 */ - Tcl_InputBuffered, /* 183 */ - Tcl_InterpDeleted, /* 184 */ - Tcl_IsSafe, /* 185 */ - Tcl_JoinPath, /* 186 */ - Tcl_LinkVar, /* 187 */ - NULL, /* 188 */ - Tcl_MakeFileChannel, /* 189 */ - Tcl_MakeSafe, /* 190 */ - Tcl_MakeTcpClientChannel, /* 191 */ - Tcl_Merge, /* 192 */ - Tcl_NextHashEntry, /* 193 */ - Tcl_NotifyChannel, /* 194 */ - Tcl_ObjGetVar2, /* 195 */ - Tcl_ObjSetVar2, /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* MACOSX */ - Tcl_OpenFileChannel, /* 198 */ - Tcl_OpenTcpClient, /* 199 */ - Tcl_OpenTcpServer, /* 200 */ - Tcl_Preserve, /* 201 */ - Tcl_PrintDouble, /* 202 */ - Tcl_PutEnv, /* 203 */ - Tcl_PosixError, /* 204 */ - Tcl_QueueEvent, /* 205 */ - Tcl_Read, /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* MACOSX */ - Tcl_RecordAndEval, /* 208 */ - Tcl_RecordAndEvalObj, /* 209 */ - Tcl_RegisterChannel, /* 210 */ - Tcl_RegisterObjType, /* 211 */ - Tcl_RegExpCompile, /* 212 */ - Tcl_RegExpExec, /* 213 */ - Tcl_RegExpMatch, /* 214 */ - Tcl_RegExpRange, /* 215 */ - Tcl_Release, /* 216 */ - Tcl_ResetResult, /* 217 */ - Tcl_ScanElement, /* 218 */ - Tcl_ScanCountedElement, /* 219 */ - Tcl_SeekOld, /* 220 */ - Tcl_ServiceAll, /* 221 */ - Tcl_ServiceEvent, /* 222 */ - Tcl_SetAssocData, /* 223 */ - Tcl_SetChannelBufferSize, /* 224 */ - Tcl_SetChannelOption, /* 225 */ - Tcl_SetCommandInfo, /* 226 */ - Tcl_SetErrno, /* 227 */ - Tcl_SetErrorCode, /* 228 */ - Tcl_SetMaxBlockTime, /* 229 */ - Tcl_SetPanicProc, /* 230 */ - Tcl_SetRecursionLimit, /* 231 */ - Tcl_SetResult, /* 232 */ - Tcl_SetServiceMode, /* 233 */ - Tcl_SetObjErrorCode, /* 234 */ - Tcl_SetObjResult, /* 235 */ - Tcl_SetStdChannel, /* 236 */ - Tcl_SetVar, /* 237 */ - Tcl_SetVar2, /* 238 */ - Tcl_SignalId, /* 239 */ - Tcl_SignalMsg, /* 240 */ - Tcl_SourceRCFile, /* 241 */ - Tcl_SplitList, /* 242 */ - Tcl_SplitPath, /* 243 */ - Tcl_StaticPackage, /* 244 */ - Tcl_StringMatch, /* 245 */ - Tcl_TellOld, /* 246 */ - Tcl_TraceVar, /* 247 */ - Tcl_TraceVar2, /* 248 */ - Tcl_TranslateFileName, /* 249 */ - Tcl_Ungets, /* 250 */ - Tcl_UnlinkVar, /* 251 */ - Tcl_UnregisterChannel, /* 252 */ - Tcl_UnsetVar, /* 253 */ - Tcl_UnsetVar2, /* 254 */ - Tcl_UntraceVar, /* 255 */ - Tcl_UntraceVar2, /* 256 */ - Tcl_UpdateLinkedVar, /* 257 */ - Tcl_UpVar, /* 258 */ - Tcl_UpVar2, /* 259 */ - Tcl_VarEval, /* 260 */ - Tcl_VarTraceInfo, /* 261 */ - Tcl_VarTraceInfo2, /* 262 */ - Tcl_Write, /* 263 */ - Tcl_WrongNumArgs, /* 264 */ - Tcl_DumpActiveMemory, /* 265 */ - Tcl_ValidateAllMemory, /* 266 */ - Tcl_AppendResultVA, /* 267 */ - Tcl_AppendStringsToObjVA, /* 268 */ - Tcl_HashStats, /* 269 */ - Tcl_ParseVar, /* 270 */ - Tcl_PkgPresent, /* 271 */ - Tcl_PkgPresentEx, /* 272 */ - Tcl_PkgProvide, /* 273 */ - Tcl_PkgRequire, /* 274 */ - Tcl_SetErrorCodeVA, /* 275 */ - Tcl_VarEvalVA, /* 276 */ - Tcl_WaitPid, /* 277 */ - Tcl_PanicVA, /* 278 */ - Tcl_GetVersion, /* 279 */ - Tcl_InitMemory, /* 280 */ - Tcl_StackChannel, /* 281 */ - Tcl_UnstackChannel, /* 282 */ - Tcl_GetStackedChannel, /* 283 */ - Tcl_SetMainLoop, /* 284 */ - NULL, /* 285 */ - Tcl_AppendObjToObj, /* 286 */ - Tcl_CreateEncoding, /* 287 */ - Tcl_CreateThreadExitHandler, /* 288 */ - Tcl_DeleteThreadExitHandler, /* 289 */ - Tcl_DiscardResult, /* 290 */ - Tcl_EvalEx, /* 291 */ - Tcl_EvalObjv, /* 292 */ - Tcl_EvalObjEx, /* 293 */ - Tcl_ExitThread, /* 294 */ - Tcl_ExternalToUtf, /* 295 */ - Tcl_ExternalToUtfDString, /* 296 */ - Tcl_FinalizeThread, /* 297 */ - Tcl_FinalizeNotifier, /* 298 */ - Tcl_FreeEncoding, /* 299 */ - Tcl_GetCurrentThread, /* 300 */ - Tcl_GetEncoding, /* 301 */ - Tcl_GetEncodingName, /* 302 */ - Tcl_GetEncodingNames, /* 303 */ - Tcl_GetIndexFromObjStruct, /* 304 */ - Tcl_GetThreadData, /* 305 */ - Tcl_GetVar2Ex, /* 306 */ - Tcl_InitNotifier, /* 307 */ - Tcl_MutexLock, /* 308 */ - Tcl_MutexUnlock, /* 309 */ - Tcl_ConditionNotify, /* 310 */ - Tcl_ConditionWait, /* 311 */ - Tcl_NumUtfChars, /* 312 */ - Tcl_ReadChars, /* 313 */ - Tcl_RestoreResult, /* 314 */ - Tcl_SaveResult, /* 315 */ - Tcl_SetSystemEncoding, /* 316 */ - Tcl_SetVar2Ex, /* 317 */ - Tcl_ThreadAlert, /* 318 */ - Tcl_ThreadQueueEvent, /* 319 */ - Tcl_UniCharAtIndex, /* 320 */ - Tcl_UniCharToLower, /* 321 */ - Tcl_UniCharToTitle, /* 322 */ - Tcl_UniCharToUpper, /* 323 */ - Tcl_UniCharToUtf, /* 324 */ - Tcl_UtfAtIndex, /* 325 */ - Tcl_UtfCharComplete, /* 326 */ - Tcl_UtfBackslash, /* 327 */ - Tcl_UtfFindFirst, /* 328 */ - Tcl_UtfFindLast, /* 329 */ - Tcl_UtfNext, /* 330 */ - Tcl_UtfPrev, /* 331 */ - Tcl_UtfToExternal, /* 332 */ - Tcl_UtfToExternalDString, /* 333 */ - Tcl_UtfToLower, /* 334 */ - Tcl_UtfToTitle, /* 335 */ - Tcl_UtfToUniChar, /* 336 */ - Tcl_UtfToUpper, /* 337 */ - Tcl_WriteChars, /* 338 */ - Tcl_WriteObj, /* 339 */ - Tcl_GetString, /* 340 */ - Tcl_GetDefaultEncodingDir, /* 341 */ - Tcl_SetDefaultEncodingDir, /* 342 */ - Tcl_AlertNotifier, /* 343 */ - Tcl_ServiceModeHook, /* 344 */ - Tcl_UniCharIsAlnum, /* 345 */ - Tcl_UniCharIsAlpha, /* 346 */ - Tcl_UniCharIsDigit, /* 347 */ - Tcl_UniCharIsLower, /* 348 */ - Tcl_UniCharIsSpace, /* 349 */ - Tcl_UniCharIsUpper, /* 350 */ - Tcl_UniCharIsWordChar, /* 351 */ - Tcl_UniCharLen, /* 352 */ - Tcl_UniCharNcmp, /* 353 */ - Tcl_UniCharToUtfDString, /* 354 */ - Tcl_UtfToUniCharDString, /* 355 */ - Tcl_GetRegExpFromObj, /* 356 */ - Tcl_EvalTokens, /* 357 */ - Tcl_FreeParse, /* 358 */ - Tcl_LogCommandInfo, /* 359 */ - Tcl_ParseBraces, /* 360 */ - Tcl_ParseCommand, /* 361 */ - Tcl_ParseExpr, /* 362 */ - Tcl_ParseQuotedString, /* 363 */ - Tcl_ParseVarName, /* 364 */ - Tcl_GetCwd, /* 365 */ - Tcl_Chdir, /* 366 */ - Tcl_Access, /* 367 */ - Tcl_Stat, /* 368 */ - Tcl_UtfNcmp, /* 369 */ - Tcl_UtfNcasecmp, /* 370 */ - Tcl_StringCaseMatch, /* 371 */ - Tcl_UniCharIsControl, /* 372 */ - Tcl_UniCharIsGraph, /* 373 */ - Tcl_UniCharIsPrint, /* 374 */ - Tcl_UniCharIsPunct, /* 375 */ - Tcl_RegExpExecObj, /* 376 */ - Tcl_RegExpGetInfo, /* 377 */ - Tcl_NewUnicodeObj, /* 378 */ - Tcl_SetUnicodeObj, /* 379 */ - Tcl_GetCharLength, /* 380 */ - Tcl_GetUniChar, /* 381 */ - Tcl_GetUnicode, /* 382 */ - Tcl_GetRange, /* 383 */ - Tcl_AppendUnicodeToObj, /* 384 */ - Tcl_RegExpMatchObj, /* 385 */ - Tcl_SetNotifier, /* 386 */ - Tcl_GetAllocMutex, /* 387 */ - Tcl_GetChannelNames, /* 388 */ - Tcl_GetChannelNamesEx, /* 389 */ - Tcl_ProcObjCmd, /* 390 */ - Tcl_ConditionFinalize, /* 391 */ - Tcl_MutexFinalize, /* 392 */ - Tcl_CreateThread, /* 393 */ - Tcl_ReadRaw, /* 394 */ - Tcl_WriteRaw, /* 395 */ - Tcl_GetTopChannel, /* 396 */ - Tcl_ChannelBuffered, /* 397 */ - Tcl_ChannelName, /* 398 */ - Tcl_ChannelVersion, /* 399 */ - Tcl_ChannelBlockModeProc, /* 400 */ - Tcl_ChannelCloseProc, /* 401 */ - Tcl_ChannelClose2Proc, /* 402 */ - Tcl_ChannelInputProc, /* 403 */ - Tcl_ChannelOutputProc, /* 404 */ - Tcl_ChannelSeekProc, /* 405 */ - Tcl_ChannelSetOptionProc, /* 406 */ - Tcl_ChannelGetOptionProc, /* 407 */ - Tcl_ChannelWatchProc, /* 408 */ - Tcl_ChannelGetHandleProc, /* 409 */ - Tcl_ChannelFlushProc, /* 410 */ - Tcl_ChannelHandlerProc, /* 411 */ - Tcl_JoinThread, /* 412 */ - Tcl_IsChannelShared, /* 413 */ - Tcl_IsChannelRegistered, /* 414 */ - Tcl_CutChannel, /* 415 */ - Tcl_SpliceChannel, /* 416 */ - Tcl_ClearChannelHandlers, /* 417 */ - Tcl_IsChannelExisting, /* 418 */ - Tcl_UniCharNcasecmp, /* 419 */ - Tcl_UniCharCaseMatch, /* 420 */ - Tcl_FindHashEntry, /* 421 */ - Tcl_CreateHashEntry, /* 422 */ - Tcl_InitCustomHashTable, /* 423 */ - Tcl_InitObjHashTable, /* 424 */ - Tcl_CommandTraceInfo, /* 425 */ - Tcl_TraceCommand, /* 426 */ - Tcl_UntraceCommand, /* 427 */ - Tcl_AttemptAlloc, /* 428 */ - Tcl_AttemptDbCkalloc, /* 429 */ - Tcl_AttemptRealloc, /* 430 */ - Tcl_AttemptDbCkrealloc, /* 431 */ - Tcl_AttemptSetObjLength, /* 432 */ - Tcl_GetChannelThread, /* 433 */ - Tcl_GetUnicodeFromObj, /* 434 */ - Tcl_GetMathFuncInfo, /* 435 */ - Tcl_ListMathFuncs, /* 436 */ - Tcl_SubstObj, /* 437 */ - Tcl_DetachChannel, /* 438 */ - Tcl_IsStandardChannel, /* 439 */ - Tcl_FSCopyFile, /* 440 */ - Tcl_FSCopyDirectory, /* 441 */ - Tcl_FSCreateDirectory, /* 442 */ - Tcl_FSDeleteFile, /* 443 */ - Tcl_FSLoadFile, /* 444 */ - Tcl_FSMatchInDirectory, /* 445 */ - Tcl_FSLink, /* 446 */ - Tcl_FSRemoveDirectory, /* 447 */ - Tcl_FSRenameFile, /* 448 */ - Tcl_FSLstat, /* 449 */ - Tcl_FSUtime, /* 450 */ - Tcl_FSFileAttrsGet, /* 451 */ - Tcl_FSFileAttrsSet, /* 452 */ - Tcl_FSFileAttrStrings, /* 453 */ - Tcl_FSStat, /* 454 */ - Tcl_FSAccess, /* 455 */ - Tcl_FSOpenFileChannel, /* 456 */ - Tcl_FSGetCwd, /* 457 */ - Tcl_FSChdir, /* 458 */ - Tcl_FSConvertToPathType, /* 459 */ - Tcl_FSJoinPath, /* 460 */ - Tcl_FSSplitPath, /* 461 */ - Tcl_FSEqualPaths, /* 462 */ - Tcl_FSGetNormalizedPath, /* 463 */ - Tcl_FSJoinToPath, /* 464 */ - Tcl_FSGetInternalRep, /* 465 */ - Tcl_FSGetTranslatedPath, /* 466 */ - Tcl_FSEvalFile, /* 467 */ - Tcl_FSNewNativePath, /* 468 */ - Tcl_FSGetNativePath, /* 469 */ - Tcl_FSFileSystemInfo, /* 470 */ - Tcl_FSPathSeparator, /* 471 */ - Tcl_FSListVolumes, /* 472 */ - Tcl_FSRegister, /* 473 */ - Tcl_FSUnregister, /* 474 */ - Tcl_FSData, /* 475 */ - Tcl_FSGetTranslatedStringPath, /* 476 */ - Tcl_FSGetFileSystemForPath, /* 477 */ - Tcl_FSGetPathType, /* 478 */ - Tcl_OutputBuffered, /* 479 */ - Tcl_FSMountsChanged, /* 480 */ - Tcl_EvalTokensStandard, /* 481 */ - Tcl_GetTime, /* 482 */ - Tcl_CreateObjTrace, /* 483 */ - Tcl_GetCommandInfoFromToken, /* 484 */ - Tcl_SetCommandInfoFromToken, /* 485 */ - Tcl_DbNewWideIntObj, /* 486 */ - Tcl_GetWideIntFromObj, /* 487 */ - Tcl_NewWideIntObj, /* 488 */ - Tcl_SetWideIntObj, /* 489 */ - Tcl_AllocStatBuf, /* 490 */ - Tcl_Seek, /* 491 */ - Tcl_Tell, /* 492 */ - Tcl_ChannelWideSeekProc, /* 493 */ - Tcl_DictObjPut, /* 494 */ - Tcl_DictObjGet, /* 495 */ - Tcl_DictObjRemove, /* 496 */ - Tcl_DictObjSize, /* 497 */ - Tcl_DictObjFirst, /* 498 */ - Tcl_DictObjNext, /* 499 */ - Tcl_DictObjDone, /* 500 */ - Tcl_DictObjPutKeyList, /* 501 */ - Tcl_DictObjRemoveKeyList, /* 502 */ - Tcl_NewDictObj, /* 503 */ - Tcl_DbNewDictObj, /* 504 */ - Tcl_RegisterConfig, /* 505 */ - Tcl_CreateNamespace, /* 506 */ - Tcl_DeleteNamespace, /* 507 */ - Tcl_AppendExportList, /* 508 */ - Tcl_Export, /* 509 */ - Tcl_Import, /* 510 */ - Tcl_ForgetImport, /* 511 */ - Tcl_GetCurrentNamespace, /* 512 */ - Tcl_GetGlobalNamespace, /* 513 */ - Tcl_FindNamespace, /* 514 */ - Tcl_FindCommand, /* 515 */ - Tcl_GetCommandFromObj, /* 516 */ - Tcl_GetCommandFullName, /* 517 */ - Tcl_FSEvalFileEx, /* 518 */ - Tcl_SetExitProc, /* 519 */ - Tcl_LimitAddHandler, /* 520 */ - Tcl_LimitRemoveHandler, /* 521 */ - Tcl_LimitReady, /* 522 */ - Tcl_LimitCheck, /* 523 */ - Tcl_LimitExceeded, /* 524 */ - Tcl_LimitSetCommands, /* 525 */ - Tcl_LimitSetTime, /* 526 */ - Tcl_LimitSetGranularity, /* 527 */ - Tcl_LimitTypeEnabled, /* 528 */ - Tcl_LimitTypeExceeded, /* 529 */ - Tcl_LimitTypeSet, /* 530 */ - Tcl_LimitTypeReset, /* 531 */ - Tcl_LimitGetCommands, /* 532 */ - Tcl_LimitGetTime, /* 533 */ - Tcl_LimitGetGranularity, /* 534 */ - Tcl_SaveInterpState, /* 535 */ - Tcl_RestoreInterpState, /* 536 */ - Tcl_DiscardInterpState, /* 537 */ - Tcl_SetReturnOptions, /* 538 */ - Tcl_GetReturnOptions, /* 539 */ - Tcl_IsEnsemble, /* 540 */ - Tcl_CreateEnsemble, /* 541 */ - Tcl_FindEnsemble, /* 542 */ - Tcl_SetEnsembleSubcommandList, /* 543 */ - Tcl_SetEnsembleMappingDict, /* 544 */ - Tcl_SetEnsembleUnknownHandler, /* 545 */ - Tcl_SetEnsembleFlags, /* 546 */ - Tcl_GetEnsembleSubcommandList, /* 547 */ - Tcl_GetEnsembleMappingDict, /* 548 */ - Tcl_GetEnsembleUnknownHandler, /* 549 */ - Tcl_GetEnsembleFlags, /* 550 */ - Tcl_GetEnsembleNamespace, /* 551 */ - Tcl_SetTimeProc, /* 552 */ - Tcl_QueryTimeProc, /* 553 */ - Tcl_ChannelThreadActionProc, /* 554 */ - Tcl_NewBignumObj, /* 555 */ - Tcl_DbNewBignumObj, /* 556 */ - Tcl_SetBignumObj, /* 557 */ - Tcl_GetBignumFromObj, /* 558 */ - Tcl_TakeBignumFromObj, /* 559 */ - Tcl_TruncateChannel, /* 560 */ - Tcl_ChannelTruncateProc, /* 561 */ - Tcl_SetChannelErrorInterp, /* 562 */ - Tcl_GetChannelErrorInterp, /* 563 */ - Tcl_SetChannelError, /* 564 */ - Tcl_GetChannelError, /* 565 */ - Tcl_InitBignumFromDouble, /* 566 */ - Tcl_GetNamespaceUnknownHandler, /* 567 */ - Tcl_SetNamespaceUnknownHandler, /* 568 */ - Tcl_GetEncodingFromObj, /* 569 */ - Tcl_GetEncodingSearchPath, /* 570 */ - Tcl_SetEncodingSearchPath, /* 571 */ - Tcl_GetEncodingNameFromEnvironment, /* 572 */ - Tcl_PkgRequireProc, /* 573 */ - Tcl_AppendObjToErrorInfo, /* 574 */ - Tcl_AppendLimitedToObj, /* 575 */ - Tcl_Format, /* 576 */ - Tcl_AppendFormatToObj, /* 577 */ - Tcl_ObjPrintf, /* 578 */ - Tcl_AppendPrintfToObj, /* 579 */ - Tcl_CancelEval, /* 580 */ - Tcl_Canceled, /* 581 */ - Tcl_NRCreateCommand, /* 582 */ - Tcl_NREvalObj, /* 583 */ - Tcl_NREvalObjv, /* 584 */ - Tcl_NRCmdSwap, /* 585 */ - Tcl_NRAddCallback, /* 586 */ - Tcl_NRCallObjProc, /* 587 */ - Tcl_CreatePipe, /* 588 */ -}; - -/* !END!: Do not edit above this line. */ - -/* - * Module-scope pointers to the main static stubs tables, used for package - * initialization via Tcl_PkgProvideEx(). - */ - -MODULE_SCOPE const TclStubs * const tclConstStubsPtr; -MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; - -const TclStubs * const tclConstStubsPtr = &tclStubs; -const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; +/* + * tclStubInit.c -- + * + * This file contains the initializers for the Tcl stub vectors. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclStubInit.c,v 1.160 2008/07/22 23:01:43 das Exp $ + */ + +#include "tclInt.h" +#include "tommath.h" + +/* + * Remove macros that will interfere with the definitions below. + */ + +#undef Tcl_Alloc +#undef Tcl_Free +#undef Tcl_Realloc +#undef Tcl_NewBooleanObj +#undef Tcl_NewByteArrayObj +#undef Tcl_NewDoubleObj +#undef Tcl_NewIntObj +#undef Tcl_NewListObj +#undef Tcl_NewLongObj +#undef Tcl_NewObj +#undef Tcl_NewStringObj +#undef Tcl_DumpActiveMemory +#undef Tcl_ValidateAllMemory +#undef Tcl_FindHashEntry +#undef Tcl_CreateHashEntry + +/* + * WARNING: The contents of this file is automatically generated by the + * tools/genStubs.tcl script. Any modifications to the function declarations + * below should be made in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +static const TclIntStubs tclIntStubs = { + TCL_STUB_MAGIC, + NULL, + NULL, /* 0 */ + NULL, /* 1 */ + NULL, /* 2 */ + TclAllocateFreeObjects, /* 3 */ + NULL, /* 4 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCleanupChildren, /* 5 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCleanupChildren, /* 5 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCleanupChildren, /* 5 */ +#endif /* MACOSX */ + TclCleanupCommand, /* 6 */ + TclCopyAndCollapse, /* 7 */ + TclCopyChannel, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCreatePipeline, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCreatePipeline, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCreatePipeline, /* 9 */ +#endif /* MACOSX */ + TclCreateProc, /* 10 */ + TclDeleteCompiledLocalVars, /* 11 */ + TclDeleteVars, /* 12 */ + NULL, /* 13 */ + TclDumpMemoryInfo, /* 14 */ + NULL, /* 15 */ + TclExprFloatError, /* 16 */ + NULL, /* 17 */ + NULL, /* 18 */ + NULL, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + TclFindElement, /* 22 */ + TclFindProc, /* 23 */ + NULL, /* 24 */ + TclFreePackageInfo, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + TclpGetDefaultStdChannel, /* 28 */ + NULL, /* 29 */ + NULL, /* 30 */ + TclGetExtension, /* 31 */ + TclGetFrame, /* 32 */ + NULL, /* 33 */ + TclGetIntForIndex, /* 34 */ + NULL, /* 35 */ + NULL, /* 36 */ + TclGetLoadedPackages, /* 37 */ + TclGetNamespaceForQualName, /* 38 */ + TclGetObjInterpProc, /* 39 */ + TclGetOpenMode, /* 40 */ + TclGetOriginalCommand, /* 41 */ + TclpGetUserHome, /* 42 */ + NULL, /* 43 */ + TclGuessPackageName, /* 44 */ + TclHideUnsafeCommands, /* 45 */ + TclInExit, /* 46 */ + NULL, /* 47 */ + NULL, /* 48 */ + NULL, /* 49 */ + TclInitCompiledLocals, /* 50 */ + TclInterpInit, /* 51 */ + NULL, /* 52 */ + TclInvokeObjectCommand, /* 53 */ + TclInvokeStringCommand, /* 54 */ + TclIsProc, /* 55 */ + NULL, /* 56 */ + NULL, /* 57 */ + TclLookupVar, /* 58 */ + NULL, /* 59 */ + TclNeedSpace, /* 60 */ + TclNewProcBodyObj, /* 61 */ + TclObjCommandComplete, /* 62 */ + TclObjInterpProc, /* 63 */ + TclObjInvoke, /* 64 */ + NULL, /* 65 */ + NULL, /* 66 */ + NULL, /* 67 */ + NULL, /* 68 */ + TclpAlloc, /* 69 */ + NULL, /* 70 */ + NULL, /* 71 */ + NULL, /* 72 */ + NULL, /* 73 */ + TclpFree, /* 74 */ + TclpGetClicks, /* 75 */ + TclpGetSeconds, /* 76 */ + TclpGetTime, /* 77 */ + TclpGetTimeZone, /* 78 */ + NULL, /* 79 */ + NULL, /* 80 */ + TclpRealloc, /* 81 */ + NULL, /* 82 */ + NULL, /* 83 */ + NULL, /* 84 */ + NULL, /* 85 */ + NULL, /* 86 */ + NULL, /* 87 */ + TclPrecTraceProc, /* 88 */ + TclPreventAliasLoop, /* 89 */ + NULL, /* 90 */ + TclProcCleanupProc, /* 91 */ + TclProcCompileProc, /* 92 */ + TclProcDeleteProc, /* 93 */ + NULL, /* 94 */ + NULL, /* 95 */ + TclRenameCommand, /* 96 */ + TclResetShadowedCmdRefs, /* 97 */ + TclServiceIdle, /* 98 */ + NULL, /* 99 */ + NULL, /* 100 */ + TclSetPreInitScript, /* 101 */ + TclSetupEnv, /* 102 */ + TclSockGetPort, /* 103 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclSockMinimumBuffers, /* 104 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* MACOSX */ + NULL, /* 105 */ + NULL, /* 106 */ + NULL, /* 107 */ + TclTeardownNamespace, /* 108 */ + TclUpdateReturnInfo, /* 109 */ + NULL, /* 110 */ + Tcl_AddInterpResolvers, /* 111 */ + Tcl_AppendExportList, /* 112 */ + Tcl_CreateNamespace, /* 113 */ + Tcl_DeleteNamespace, /* 114 */ + Tcl_Export, /* 115 */ + Tcl_FindCommand, /* 116 */ + Tcl_FindNamespace, /* 117 */ + Tcl_GetInterpResolvers, /* 118 */ + Tcl_GetNamespaceResolvers, /* 119 */ + Tcl_FindNamespaceVar, /* 120 */ + Tcl_ForgetImport, /* 121 */ + Tcl_GetCommandFromObj, /* 122 */ + Tcl_GetCommandFullName, /* 123 */ + Tcl_GetCurrentNamespace, /* 124 */ + Tcl_GetGlobalNamespace, /* 125 */ + Tcl_GetVariableFullName, /* 126 */ + Tcl_Import, /* 127 */ + Tcl_PopCallFrame, /* 128 */ + Tcl_PushCallFrame, /* 129 */ + Tcl_RemoveInterpResolvers, /* 130 */ + Tcl_SetNamespaceResolvers, /* 131 */ + TclpHasSockets, /* 132 */ + TclpGetDate, /* 133 */ + NULL, /* 134 */ + NULL, /* 135 */ + NULL, /* 136 */ + NULL, /* 137 */ + TclGetEnv, /* 138 */ + NULL, /* 139 */ + NULL, /* 140 */ + TclpGetCwd, /* 141 */ + TclSetByteCodeFromAny, /* 142 */ + TclAddLiteralObj, /* 143 */ + TclHideLiteral, /* 144 */ + TclGetAuxDataType, /* 145 */ + TclHandleCreate, /* 146 */ + TclHandleFree, /* 147 */ + TclHandlePreserve, /* 148 */ + TclHandleRelease, /* 149 */ + TclRegAbout, /* 150 */ + TclRegExpRangeUniChar, /* 151 */ + TclSetLibraryPath, /* 152 */ + TclGetLibraryPath, /* 153 */ + NULL, /* 154 */ + NULL, /* 155 */ + TclRegError, /* 156 */ + TclVarTraceExists, /* 157 */ + TclSetStartupScriptFileName, /* 158 */ + TclGetStartupScriptFileName, /* 159 */ + NULL, /* 160 */ + TclChannelTransform, /* 161 */ + TclChannelEventScriptInvoker, /* 162 */ + TclGetInstructionTable, /* 163 */ + TclExpandCodeArray, /* 164 */ + TclpSetInitialEncodings, /* 165 */ + TclListObjSetElement, /* 166 */ + TclSetStartupScriptPath, /* 167 */ + TclGetStartupScriptPath, /* 168 */ + TclpUtfNcmp2, /* 169 */ + TclCheckInterpTraces, /* 170 */ + TclCheckExecutionTraces, /* 171 */ + TclInThreadExit, /* 172 */ + TclUniCharMatch, /* 173 */ + NULL, /* 174 */ + TclCallVarTraces, /* 175 */ + TclCleanupVar, /* 176 */ + TclVarErrMsg, /* 177 */ + Tcl_SetStartupScript, /* 178 */ + Tcl_GetStartupScript, /* 179 */ + NULL, /* 180 */ + NULL, /* 181 */ + TclpLocaltime, /* 182 */ + TclpGmtime, /* 183 */ + NULL, /* 184 */ + NULL, /* 185 */ + NULL, /* 186 */ + NULL, /* 187 */ + NULL, /* 188 */ + NULL, /* 189 */ + NULL, /* 190 */ + NULL, /* 191 */ + NULL, /* 192 */ + NULL, /* 193 */ + NULL, /* 194 */ + NULL, /* 195 */ + NULL, /* 196 */ + NULL, /* 197 */ + TclObjGetFrame, /* 198 */ + NULL, /* 199 */ + TclpObjRemoveDirectory, /* 200 */ + TclpObjCopyDirectory, /* 201 */ + TclpObjCreateDirectory, /* 202 */ + TclpObjDeleteFile, /* 203 */ + TclpObjCopyFile, /* 204 */ + TclpObjRenameFile, /* 205 */ + TclpObjStat, /* 206 */ + TclpObjAccess, /* 207 */ + TclpOpenFileChannel, /* 208 */ + NULL, /* 209 */ + NULL, /* 210 */ + NULL, /* 211 */ + TclpFindExecutable, /* 212 */ + TclGetObjNameOfExecutable, /* 213 */ + TclSetObjNameOfExecutable, /* 214 */ + TclStackAlloc, /* 215 */ + TclStackFree, /* 216 */ + TclPushStackFrame, /* 217 */ + TclPopStackFrame, /* 218 */ + NULL, /* 219 */ + NULL, /* 220 */ + NULL, /* 221 */ + NULL, /* 222 */ + NULL, /* 223 */ + TclGetPlatform, /* 224 */ + TclTraceDictPath, /* 225 */ + TclObjBeingDeleted, /* 226 */ + TclSetNsPath, /* 227 */ + TclObjInterpProcCore, /* 228 */ + TclPtrMakeUpvar, /* 229 */ + TclObjLookupVar, /* 230 */ + TclGetNamespaceFromObj, /* 231 */ + TclEvalObjEx, /* 232 */ + TclGetSrcInfoForPc, /* 233 */ + TclVarHashCreateVar, /* 234 */ + TclInitVarHashTable, /* 235 */ + TclBackgroundException, /* 236 */ + TclResetCancellation, /* 237 */ + TclEvalObjv_NR2, /* 238 */ + &TclNRInterpProc, /* 239 */ + TclNRInterpProcCore, /* 240 */ + TclNRPushRecord, /* 241 */ + TclNRPopAndFreeRecord, /* 242 */ + TclNREvalObjEx, /* 243 */ +}; + +static const TclIntPlatStubs tclIntPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ + TclWinGetServByName, /* 2 */ + TclWinGetSockOpt, /* 3 */ + TclWinGetTclInstance, /* 4 */ + NULL, /* 5 */ + TclWinNToHS, /* 6 */ + TclWinSetSockOpt, /* 7 */ + TclpGetPid, /* 8 */ + TclWinGetPlatformId, /* 9 */ + NULL, /* 10 */ + TclGetAndDetachPids, /* 11 */ + TclpCloseFile, /* 12 */ + TclpCreateCommandChannel, /* 13 */ + TclpCreatePipe, /* 14 */ + TclpCreateProcess, /* 15 */ + NULL, /* 16 */ + NULL, /* 17 */ + TclpMakeFile, /* 18 */ + TclpOpenFile, /* 19 */ + TclWinAddProcess, /* 20 */ + NULL, /* 21 */ + TclpCreateTempFile, /* 22 */ + TclpGetTZName, /* 23 */ + TclWinNoBackslash, /* 24 */ + NULL, /* 25 */ + TclWinSetInterfaces, /* 26 */ + TclWinFlushDirtyChannels, /* 27 */ + TclWinResetInterfaces, /* 28 */ + TclWinCPUID, /* 29 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ + TclMacOSXGetFileAttribute, /* 15 */ + TclMacOSXSetFileAttribute, /* 16 */ + TclMacOSXCopyFileAttributes, /* 17 */ + TclMacOSXMatchType, /* 18 */ +#endif /* MACOSX */ +}; + +static const TclPlatStubs tclPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#ifdef __WIN32__ /* WIN */ + Tcl_WinUtfToTChar, /* 0 */ + Tcl_WinTCharToUtf, /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_MacOSXOpenBundleResources, /* 0 */ + Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ +#endif /* MACOSX */ +}; + +static const TclTomMathStubs tclTomMathStubs = { + TCL_STUB_MAGIC, + NULL, + TclBN_epoch, /* 0 */ + TclBN_revision, /* 1 */ + TclBN_mp_add, /* 2 */ + TclBN_mp_add_d, /* 3 */ + TclBN_mp_and, /* 4 */ + TclBN_mp_clamp, /* 5 */ + TclBN_mp_clear, /* 6 */ + TclBN_mp_clear_multi, /* 7 */ + TclBN_mp_cmp, /* 8 */ + TclBN_mp_cmp_d, /* 9 */ + TclBN_mp_cmp_mag, /* 10 */ + TclBN_mp_copy, /* 11 */ + TclBN_mp_count_bits, /* 12 */ + TclBN_mp_div, /* 13 */ + TclBN_mp_div_d, /* 14 */ + TclBN_mp_div_2, /* 15 */ + TclBN_mp_div_2d, /* 16 */ + TclBN_mp_div_3, /* 17 */ + TclBN_mp_exch, /* 18 */ + TclBN_mp_expt_d, /* 19 */ + TclBN_mp_grow, /* 20 */ + TclBN_mp_init, /* 21 */ + TclBN_mp_init_copy, /* 22 */ + TclBN_mp_init_multi, /* 23 */ + TclBN_mp_init_set, /* 24 */ + TclBN_mp_init_size, /* 25 */ + TclBN_mp_lshd, /* 26 */ + TclBN_mp_mod, /* 27 */ + TclBN_mp_mod_2d, /* 28 */ + TclBN_mp_mul, /* 29 */ + TclBN_mp_mul_d, /* 30 */ + TclBN_mp_mul_2, /* 31 */ + TclBN_mp_mul_2d, /* 32 */ + TclBN_mp_neg, /* 33 */ + TclBN_mp_or, /* 34 */ + TclBN_mp_radix_size, /* 35 */ + TclBN_mp_read_radix, /* 36 */ + TclBN_mp_rshd, /* 37 */ + TclBN_mp_shrink, /* 38 */ + TclBN_mp_set, /* 39 */ + TclBN_mp_sqr, /* 40 */ + TclBN_mp_sqrt, /* 41 */ + TclBN_mp_sub, /* 42 */ + TclBN_mp_sub_d, /* 43 */ + TclBN_mp_to_unsigned_bin, /* 44 */ + TclBN_mp_to_unsigned_bin_n, /* 45 */ + TclBN_mp_toradix_n, /* 46 */ + TclBN_mp_unsigned_bin_size, /* 47 */ + TclBN_mp_xor, /* 48 */ + TclBN_mp_zero, /* 49 */ + TclBN_reverse, /* 50 */ + TclBN_fast_s_mp_mul_digs, /* 51 */ + TclBN_fast_s_mp_sqr, /* 52 */ + TclBN_mp_karatsuba_mul, /* 53 */ + TclBN_mp_karatsuba_sqr, /* 54 */ + TclBN_mp_toom_mul, /* 55 */ + TclBN_mp_toom_sqr, /* 56 */ + TclBN_s_mp_add, /* 57 */ + TclBN_s_mp_mul_digs, /* 58 */ + TclBN_s_mp_sqr, /* 59 */ + TclBN_s_mp_sub, /* 60 */ +}; + +static const TclStubHooks tclStubHooks = { + &tclPlatStubs, + &tclIntStubs, + &tclIntPlatStubs +}; + +static const TclStubs tclStubs = { + TCL_STUB_MAGIC, + &tclStubHooks, + Tcl_PkgProvideEx, /* 0 */ + Tcl_PkgRequireEx, /* 1 */ + Tcl_Panic, /* 2 */ + Tcl_Alloc, /* 3 */ + Tcl_Free, /* 4 */ + Tcl_Realloc, /* 5 */ + Tcl_DbCkalloc, /* 6 */ + Tcl_DbCkfree, /* 7 */ + Tcl_DbCkrealloc, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 10 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* MACOSX */ + Tcl_SetTimer, /* 11 */ + Tcl_Sleep, /* 12 */ + Tcl_WaitForEvent, /* 13 */ + Tcl_AppendAllObjTypes, /* 14 */ + Tcl_AppendStringsToObj, /* 15 */ + Tcl_AppendToObj, /* 16 */ + Tcl_ConcatObj, /* 17 */ + Tcl_ConvertToType, /* 18 */ + Tcl_DbDecrRefCount, /* 19 */ + Tcl_DbIncrRefCount, /* 20 */ + Tcl_DbIsShared, /* 21 */ + Tcl_DbNewBooleanObj, /* 22 */ + Tcl_DbNewByteArrayObj, /* 23 */ + Tcl_DbNewDoubleObj, /* 24 */ + Tcl_DbNewListObj, /* 25 */ + Tcl_DbNewLongObj, /* 26 */ + Tcl_DbNewObj, /* 27 */ + Tcl_DbNewStringObj, /* 28 */ + Tcl_DuplicateObj, /* 29 */ + TclFreeObj, /* 30 */ + Tcl_GetBoolean, /* 31 */ + Tcl_GetBooleanFromObj, /* 32 */ + Tcl_GetByteArrayFromObj, /* 33 */ + Tcl_GetDouble, /* 34 */ + Tcl_GetDoubleFromObj, /* 35 */ + Tcl_GetIndexFromObj, /* 36 */ + Tcl_GetInt, /* 37 */ + Tcl_GetIntFromObj, /* 38 */ + Tcl_GetLongFromObj, /* 39 */ + Tcl_GetObjType, /* 40 */ + Tcl_GetStringFromObj, /* 41 */ + Tcl_InvalidateStringRep, /* 42 */ + Tcl_ListObjAppendList, /* 43 */ + Tcl_ListObjAppendElement, /* 44 */ + Tcl_ListObjGetElements, /* 45 */ + Tcl_ListObjIndex, /* 46 */ + Tcl_ListObjLength, /* 47 */ + Tcl_ListObjReplace, /* 48 */ + Tcl_NewBooleanObj, /* 49 */ + Tcl_NewByteArrayObj, /* 50 */ + Tcl_NewDoubleObj, /* 51 */ + Tcl_NewIntObj, /* 52 */ + Tcl_NewListObj, /* 53 */ + Tcl_NewLongObj, /* 54 */ + Tcl_NewObj, /* 55 */ + Tcl_NewStringObj, /* 56 */ + Tcl_SetBooleanObj, /* 57 */ + Tcl_SetByteArrayLength, /* 58 */ + Tcl_SetByteArrayObj, /* 59 */ + Tcl_SetDoubleObj, /* 60 */ + Tcl_SetIntObj, /* 61 */ + Tcl_SetListObj, /* 62 */ + Tcl_SetLongObj, /* 63 */ + Tcl_SetObjLength, /* 64 */ + Tcl_SetStringObj, /* 65 */ + Tcl_AddErrorInfo, /* 66 */ + Tcl_AddObjErrorInfo, /* 67 */ + Tcl_AllowExceptions, /* 68 */ + Tcl_AppendElement, /* 69 */ + Tcl_AppendResult, /* 70 */ + Tcl_AsyncCreate, /* 71 */ + Tcl_AsyncDelete, /* 72 */ + Tcl_AsyncInvoke, /* 73 */ + Tcl_AsyncMark, /* 74 */ + Tcl_AsyncReady, /* 75 */ + Tcl_BackgroundError, /* 76 */ + Tcl_Backslash, /* 77 */ + Tcl_BadChannelOption, /* 78 */ + Tcl_CallWhenDeleted, /* 79 */ + Tcl_CancelIdleCall, /* 80 */ + Tcl_Close, /* 81 */ + Tcl_CommandComplete, /* 82 */ + Tcl_Concat, /* 83 */ + Tcl_ConvertElement, /* 84 */ + Tcl_ConvertCountedElement, /* 85 */ + Tcl_CreateAlias, /* 86 */ + Tcl_CreateAliasObj, /* 87 */ + Tcl_CreateChannel, /* 88 */ + Tcl_CreateChannelHandler, /* 89 */ + Tcl_CreateCloseHandler, /* 90 */ + Tcl_CreateCommand, /* 91 */ + Tcl_CreateEventSource, /* 92 */ + Tcl_CreateExitHandler, /* 93 */ + Tcl_CreateInterp, /* 94 */ + Tcl_CreateMathFunc, /* 95 */ + Tcl_CreateObjCommand, /* 96 */ + Tcl_CreateSlave, /* 97 */ + Tcl_CreateTimerHandler, /* 98 */ + Tcl_CreateTrace, /* 99 */ + Tcl_DeleteAssocData, /* 100 */ + Tcl_DeleteChannelHandler, /* 101 */ + Tcl_DeleteCloseHandler, /* 102 */ + Tcl_DeleteCommand, /* 103 */ + Tcl_DeleteCommandFromToken, /* 104 */ + Tcl_DeleteEvents, /* 105 */ + Tcl_DeleteEventSource, /* 106 */ + Tcl_DeleteExitHandler, /* 107 */ + Tcl_DeleteHashEntry, /* 108 */ + Tcl_DeleteHashTable, /* 109 */ + Tcl_DeleteInterp, /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DetachPids, /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_DetachPids, /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DetachPids, /* 111 */ +#endif /* MACOSX */ + Tcl_DeleteTimerHandler, /* 112 */ + Tcl_DeleteTrace, /* 113 */ + Tcl_DontCallWhenDeleted, /* 114 */ + Tcl_DoOneEvent, /* 115 */ + Tcl_DoWhenIdle, /* 116 */ + Tcl_DStringAppend, /* 117 */ + Tcl_DStringAppendElement, /* 118 */ + Tcl_DStringEndSublist, /* 119 */ + Tcl_DStringFree, /* 120 */ + Tcl_DStringGetResult, /* 121 */ + Tcl_DStringInit, /* 122 */ + Tcl_DStringResult, /* 123 */ + Tcl_DStringSetLength, /* 124 */ + Tcl_DStringStartSublist, /* 125 */ + Tcl_Eof, /* 126 */ + Tcl_ErrnoId, /* 127 */ + Tcl_ErrnoMsg, /* 128 */ + Tcl_Eval, /* 129 */ + Tcl_EvalFile, /* 130 */ + Tcl_EvalObj, /* 131 */ + Tcl_EventuallyFree, /* 132 */ + Tcl_Exit, /* 133 */ + Tcl_ExposeCommand, /* 134 */ + Tcl_ExprBoolean, /* 135 */ + Tcl_ExprBooleanObj, /* 136 */ + Tcl_ExprDouble, /* 137 */ + Tcl_ExprDoubleObj, /* 138 */ + Tcl_ExprLong, /* 139 */ + Tcl_ExprLongObj, /* 140 */ + Tcl_ExprObj, /* 141 */ + Tcl_ExprString, /* 142 */ + Tcl_Finalize, /* 143 */ + Tcl_FindExecutable, /* 144 */ + Tcl_FirstHashEntry, /* 145 */ + Tcl_Flush, /* 146 */ + Tcl_FreeResult, /* 147 */ + Tcl_GetAlias, /* 148 */ + Tcl_GetAliasObj, /* 149 */ + Tcl_GetAssocData, /* 150 */ + Tcl_GetChannel, /* 151 */ + Tcl_GetChannelBufferSize, /* 152 */ + Tcl_GetChannelHandle, /* 153 */ + Tcl_GetChannelInstanceData, /* 154 */ + Tcl_GetChannelMode, /* 155 */ + Tcl_GetChannelName, /* 156 */ + Tcl_GetChannelOption, /* 157 */ + Tcl_GetChannelType, /* 158 */ + Tcl_GetCommandInfo, /* 159 */ + Tcl_GetCommandName, /* 160 */ + Tcl_GetErrno, /* 161 */ + Tcl_GetHostName, /* 162 */ + Tcl_GetInterpPath, /* 163 */ + Tcl_GetMaster, /* 164 */ + Tcl_GetNameOfExecutable, /* 165 */ + Tcl_GetObjResult, /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 167 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* MACOSX */ + Tcl_GetPathType, /* 168 */ + Tcl_Gets, /* 169 */ + Tcl_GetsObj, /* 170 */ + Tcl_GetServiceMode, /* 171 */ + Tcl_GetSlave, /* 172 */ + Tcl_GetStdChannel, /* 173 */ + Tcl_GetStringResult, /* 174 */ + Tcl_GetVar, /* 175 */ + Tcl_GetVar2, /* 176 */ + Tcl_GlobalEval, /* 177 */ + Tcl_GlobalEvalObj, /* 178 */ + Tcl_HideCommand, /* 179 */ + Tcl_Init, /* 180 */ + Tcl_InitHashTable, /* 181 */ + Tcl_InputBlocked, /* 182 */ + Tcl_InputBuffered, /* 183 */ + Tcl_InterpDeleted, /* 184 */ + Tcl_IsSafe, /* 185 */ + Tcl_JoinPath, /* 186 */ + Tcl_LinkVar, /* 187 */ + NULL, /* 188 */ + Tcl_MakeFileChannel, /* 189 */ + Tcl_MakeSafe, /* 190 */ + Tcl_MakeTcpClientChannel, /* 191 */ + Tcl_Merge, /* 192 */ + Tcl_NextHashEntry, /* 193 */ + Tcl_NotifyChannel, /* 194 */ + Tcl_ObjGetVar2, /* 195 */ + Tcl_ObjSetVar2, /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* MACOSX */ + Tcl_OpenFileChannel, /* 198 */ + Tcl_OpenTcpClient, /* 199 */ + Tcl_OpenTcpServer, /* 200 */ + Tcl_Preserve, /* 201 */ + Tcl_PrintDouble, /* 202 */ + Tcl_PutEnv, /* 203 */ + Tcl_PosixError, /* 204 */ + Tcl_QueueEvent, /* 205 */ + Tcl_Read, /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* MACOSX */ + Tcl_RecordAndEval, /* 208 */ + Tcl_RecordAndEvalObj, /* 209 */ + Tcl_RegisterChannel, /* 210 */ + Tcl_RegisterObjType, /* 211 */ + Tcl_RegExpCompile, /* 212 */ + Tcl_RegExpExec, /* 213 */ + Tcl_RegExpMatch, /* 214 */ + Tcl_RegExpRange, /* 215 */ + Tcl_Release, /* 216 */ + Tcl_ResetResult, /* 217 */ + Tcl_ScanElement, /* 218 */ + Tcl_ScanCountedElement, /* 219 */ + Tcl_SeekOld, /* 220 */ + Tcl_ServiceAll, /* 221 */ + Tcl_ServiceEvent, /* 222 */ + Tcl_SetAssocData, /* 223 */ + Tcl_SetChannelBufferSize, /* 224 */ + Tcl_SetChannelOption, /* 225 */ + Tcl_SetCommandInfo, /* 226 */ + Tcl_SetErrno, /* 227 */ + Tcl_SetErrorCode, /* 228 */ + Tcl_SetMaxBlockTime, /* 229 */ + Tcl_SetPanicProc, /* 230 */ + Tcl_SetRecursionLimit, /* 231 */ + Tcl_SetResult, /* 232 */ + Tcl_SetServiceMode, /* 233 */ + Tcl_SetObjErrorCode, /* 234 */ + Tcl_SetObjResult, /* 235 */ + Tcl_SetStdChannel, /* 236 */ + Tcl_SetVar, /* 237 */ + Tcl_SetVar2, /* 238 */ + Tcl_SignalId, /* 239 */ + Tcl_SignalMsg, /* 240 */ + Tcl_SourceRCFile, /* 241 */ + Tcl_SplitList, /* 242 */ + Tcl_SplitPath, /* 243 */ + Tcl_StaticPackage, /* 244 */ + Tcl_StringMatch, /* 245 */ + Tcl_TellOld, /* 246 */ + Tcl_TraceVar, /* 247 */ + Tcl_TraceVar2, /* 248 */ + Tcl_TranslateFileName, /* 249 */ + Tcl_Ungets, /* 250 */ + Tcl_UnlinkVar, /* 251 */ + Tcl_UnregisterChannel, /* 252 */ + Tcl_UnsetVar, /* 253 */ + Tcl_UnsetVar2, /* 254 */ + Tcl_UntraceVar, /* 255 */ + Tcl_UntraceVar2, /* 256 */ + Tcl_UpdateLinkedVar, /* 257 */ + Tcl_UpVar, /* 258 */ + Tcl_UpVar2, /* 259 */ + Tcl_VarEval, /* 260 */ + Tcl_VarTraceInfo, /* 261 */ + Tcl_VarTraceInfo2, /* 262 */ + Tcl_Write, /* 263 */ + Tcl_WrongNumArgs, /* 264 */ + Tcl_DumpActiveMemory, /* 265 */ + Tcl_ValidateAllMemory, /* 266 */ + Tcl_AppendResultVA, /* 267 */ + Tcl_AppendStringsToObjVA, /* 268 */ + Tcl_HashStats, /* 269 */ + Tcl_ParseVar, /* 270 */ + Tcl_PkgPresent, /* 271 */ + Tcl_PkgPresentEx, /* 272 */ + Tcl_PkgProvide, /* 273 */ + Tcl_PkgRequire, /* 274 */ + Tcl_SetErrorCodeVA, /* 275 */ + Tcl_VarEvalVA, /* 276 */ + Tcl_WaitPid, /* 277 */ + Tcl_PanicVA, /* 278 */ + Tcl_GetVersion, /* 279 */ + Tcl_InitMemory, /* 280 */ + Tcl_StackChannel, /* 281 */ + Tcl_UnstackChannel, /* 282 */ + Tcl_GetStackedChannel, /* 283 */ + Tcl_SetMainLoop, /* 284 */ + NULL, /* 285 */ + Tcl_AppendObjToObj, /* 286 */ + Tcl_CreateEncoding, /* 287 */ + Tcl_CreateThreadExitHandler, /* 288 */ + Tcl_DeleteThreadExitHandler, /* 289 */ + Tcl_DiscardResult, /* 290 */ + Tcl_EvalEx, /* 291 */ + Tcl_EvalObjv, /* 292 */ + Tcl_EvalObjEx, /* 293 */ + Tcl_ExitThread, /* 294 */ + Tcl_ExternalToUtf, /* 295 */ + Tcl_ExternalToUtfDString, /* 296 */ + Tcl_FinalizeThread, /* 297 */ + Tcl_FinalizeNotifier, /* 298 */ + Tcl_FreeEncoding, /* 299 */ + Tcl_GetCurrentThread, /* 300 */ + Tcl_GetEncoding, /* 301 */ + Tcl_GetEncodingName, /* 302 */ + Tcl_GetEncodingNames, /* 303 */ + Tcl_GetIndexFromObjStruct, /* 304 */ + Tcl_GetThreadData, /* 305 */ + Tcl_GetVar2Ex, /* 306 */ + Tcl_InitNotifier, /* 307 */ + Tcl_MutexLock, /* 308 */ + Tcl_MutexUnlock, /* 309 */ + Tcl_ConditionNotify, /* 310 */ + Tcl_ConditionWait, /* 311 */ + Tcl_NumUtfChars, /* 312 */ + Tcl_ReadChars, /* 313 */ + Tcl_RestoreResult, /* 314 */ + Tcl_SaveResult, /* 315 */ + Tcl_SetSystemEncoding, /* 316 */ + Tcl_SetVar2Ex, /* 317 */ + Tcl_ThreadAlert, /* 318 */ + Tcl_ThreadQueueEvent, /* 319 */ + Tcl_UniCharAtIndex, /* 320 */ + Tcl_UniCharToLower, /* 321 */ + Tcl_UniCharToTitle, /* 322 */ + Tcl_UniCharToUpper, /* 323 */ + Tcl_UniCharToUtf, /* 324 */ + Tcl_UtfAtIndex, /* 325 */ + Tcl_UtfCharComplete, /* 326 */ + Tcl_UtfBackslash, /* 327 */ + Tcl_UtfFindFirst, /* 328 */ + Tcl_UtfFindLast, /* 329 */ + Tcl_UtfNext, /* 330 */ + Tcl_UtfPrev, /* 331 */ + Tcl_UtfToExternal, /* 332 */ + Tcl_UtfToExternalDString, /* 333 */ + Tcl_UtfToLower, /* 334 */ + Tcl_UtfToTitle, /* 335 */ + Tcl_UtfToUniChar, /* 336 */ + Tcl_UtfToUpper, /* 337 */ + Tcl_WriteChars, /* 338 */ + Tcl_WriteObj, /* 339 */ + Tcl_GetString, /* 340 */ + Tcl_GetDefaultEncodingDir, /* 341 */ + Tcl_SetDefaultEncodingDir, /* 342 */ + Tcl_AlertNotifier, /* 343 */ + Tcl_ServiceModeHook, /* 344 */ + Tcl_UniCharIsAlnum, /* 345 */ + Tcl_UniCharIsAlpha, /* 346 */ + Tcl_UniCharIsDigit, /* 347 */ + Tcl_UniCharIsLower, /* 348 */ + Tcl_UniCharIsSpace, /* 349 */ + Tcl_UniCharIsUpper, /* 350 */ + Tcl_UniCharIsWordChar, /* 351 */ + Tcl_UniCharLen, /* 352 */ + Tcl_UniCharNcmp, /* 353 */ + Tcl_UniCharToUtfDString, /* 354 */ + Tcl_UtfToUniCharDString, /* 355 */ + Tcl_GetRegExpFromObj, /* 356 */ + Tcl_EvalTokens, /* 357 */ + Tcl_FreeParse, /* 358 */ + Tcl_LogCommandInfo, /* 359 */ + Tcl_ParseBraces, /* 360 */ + Tcl_ParseCommand, /* 361 */ + Tcl_ParseExpr, /* 362 */ + Tcl_ParseQuotedString, /* 363 */ + Tcl_ParseVarName, /* 364 */ + Tcl_GetCwd, /* 365 */ + Tcl_Chdir, /* 366 */ + Tcl_Access, /* 367 */ + Tcl_Stat, /* 368 */ + Tcl_UtfNcmp, /* 369 */ + Tcl_UtfNcasecmp, /* 370 */ + Tcl_StringCaseMatch, /* 371 */ + Tcl_UniCharIsControl, /* 372 */ + Tcl_UniCharIsGraph, /* 373 */ + Tcl_UniCharIsPrint, /* 374 */ + Tcl_UniCharIsPunct, /* 375 */ + Tcl_RegExpExecObj, /* 376 */ + Tcl_RegExpGetInfo, /* 377 */ + Tcl_NewUnicodeObj, /* 378 */ + Tcl_SetUnicodeObj, /* 379 */ + Tcl_GetCharLength, /* 380 */ + Tcl_GetUniChar, /* 381 */ + Tcl_GetUnicode, /* 382 */ + Tcl_GetRange, /* 383 */ + Tcl_AppendUnicodeToObj, /* 384 */ + Tcl_RegExpMatchObj, /* 385 */ + Tcl_SetNotifier, /* 386 */ + Tcl_GetAllocMutex, /* 387 */ + Tcl_GetChannelNames, /* 388 */ + Tcl_GetChannelNamesEx, /* 389 */ + Tcl_ProcObjCmd, /* 390 */ + Tcl_ConditionFinalize, /* 391 */ + Tcl_MutexFinalize, /* 392 */ + Tcl_CreateThread, /* 393 */ + Tcl_ReadRaw, /* 394 */ + Tcl_WriteRaw, /* 395 */ + Tcl_GetTopChannel, /* 396 */ + Tcl_ChannelBuffered, /* 397 */ + Tcl_ChannelName, /* 398 */ + Tcl_ChannelVersion, /* 399 */ + Tcl_ChannelBlockModeProc, /* 400 */ + Tcl_ChannelCloseProc, /* 401 */ + Tcl_ChannelClose2Proc, /* 402 */ + Tcl_ChannelInputProc, /* 403 */ + Tcl_ChannelOutputProc, /* 404 */ + Tcl_ChannelSeekProc, /* 405 */ + Tcl_ChannelSetOptionProc, /* 406 */ + Tcl_ChannelGetOptionProc, /* 407 */ + Tcl_ChannelWatchProc, /* 408 */ + Tcl_ChannelGetHandleProc, /* 409 */ + Tcl_ChannelFlushProc, /* 410 */ + Tcl_ChannelHandlerProc, /* 411 */ + Tcl_JoinThread, /* 412 */ + Tcl_IsChannelShared, /* 413 */ + Tcl_IsChannelRegistered, /* 414 */ + Tcl_CutChannel, /* 415 */ + Tcl_SpliceChannel, /* 416 */ + Tcl_ClearChannelHandlers, /* 417 */ + Tcl_IsChannelExisting, /* 418 */ + Tcl_UniCharNcasecmp, /* 419 */ + Tcl_UniCharCaseMatch, /* 420 */ + Tcl_FindHashEntry, /* 421 */ + Tcl_CreateHashEntry, /* 422 */ + Tcl_InitCustomHashTable, /* 423 */ + Tcl_InitObjHashTable, /* 424 */ + Tcl_CommandTraceInfo, /* 425 */ + Tcl_TraceCommand, /* 426 */ + Tcl_UntraceCommand, /* 427 */ + Tcl_AttemptAlloc, /* 428 */ + Tcl_AttemptDbCkalloc, /* 429 */ + Tcl_AttemptRealloc, /* 430 */ + Tcl_AttemptDbCkrealloc, /* 431 */ + Tcl_AttemptSetObjLength, /* 432 */ + Tcl_GetChannelThread, /* 433 */ + Tcl_GetUnicodeFromObj, /* 434 */ + Tcl_GetMathFuncInfo, /* 435 */ + Tcl_ListMathFuncs, /* 436 */ + Tcl_SubstObj, /* 437 */ + Tcl_DetachChannel, /* 438 */ + Tcl_IsStandardChannel, /* 439 */ + Tcl_FSCopyFile, /* 440 */ + Tcl_FSCopyDirectory, /* 441 */ + Tcl_FSCreateDirectory, /* 442 */ + Tcl_FSDeleteFile, /* 443 */ + Tcl_FSLoadFile, /* 444 */ + Tcl_FSMatchInDirectory, /* 445 */ + Tcl_FSLink, /* 446 */ + Tcl_FSRemoveDirectory, /* 447 */ + Tcl_FSRenameFile, /* 448 */ + Tcl_FSLstat, /* 449 */ + Tcl_FSUtime, /* 450 */ + Tcl_FSFileAttrsGet, /* 451 */ + Tcl_FSFileAttrsSet, /* 452 */ + Tcl_FSFileAttrStrings, /* 453 */ + Tcl_FSStat, /* 454 */ + Tcl_FSAccess, /* 455 */ + Tcl_FSOpenFileChannel, /* 456 */ + Tcl_FSGetCwd, /* 457 */ + Tcl_FSChdir, /* 458 */ + Tcl_FSConvertToPathType, /* 459 */ + Tcl_FSJoinPath, /* 460 */ + Tcl_FSSplitPath, /* 461 */ + Tcl_FSEqualPaths, /* 462 */ + Tcl_FSGetNormalizedPath, /* 463 */ + Tcl_FSJoinToPath, /* 464 */ + Tcl_FSGetInternalRep, /* 465 */ + Tcl_FSGetTranslatedPath, /* 466 */ + Tcl_FSEvalFile, /* 467 */ + Tcl_FSNewNativePath, /* 468 */ + Tcl_FSGetNativePath, /* 469 */ + Tcl_FSFileSystemInfo, /* 470 */ + Tcl_FSPathSeparator, /* 471 */ + Tcl_FSListVolumes, /* 472 */ + Tcl_FSRegister, /* 473 */ + Tcl_FSUnregister, /* 474 */ + Tcl_FSData, /* 475 */ + Tcl_FSGetTranslatedStringPath, /* 476 */ + Tcl_FSGetFileSystemForPath, /* 477 */ + Tcl_FSGetPathType, /* 478 */ + Tcl_OutputBuffered, /* 479 */ + Tcl_FSMountsChanged, /* 480 */ + Tcl_EvalTokensStandard, /* 481 */ + Tcl_GetTime, /* 482 */ + Tcl_CreateObjTrace, /* 483 */ + Tcl_GetCommandInfoFromToken, /* 484 */ + Tcl_SetCommandInfoFromToken, /* 485 */ + Tcl_DbNewWideIntObj, /* 486 */ + Tcl_GetWideIntFromObj, /* 487 */ + Tcl_NewWideIntObj, /* 488 */ + Tcl_SetWideIntObj, /* 489 */ + Tcl_AllocStatBuf, /* 490 */ + Tcl_Seek, /* 491 */ + Tcl_Tell, /* 492 */ + Tcl_ChannelWideSeekProc, /* 493 */ + Tcl_DictObjPut, /* 494 */ + Tcl_DictObjGet, /* 495 */ + Tcl_DictObjRemove, /* 496 */ + Tcl_DictObjSize, /* 497 */ + Tcl_DictObjFirst, /* 498 */ + Tcl_DictObjNext, /* 499 */ + Tcl_DictObjDone, /* 500 */ + Tcl_DictObjPutKeyList, /* 501 */ + Tcl_DictObjRemoveKeyList, /* 502 */ + Tcl_NewDictObj, /* 503 */ + Tcl_DbNewDictObj, /* 504 */ + Tcl_RegisterConfig, /* 505 */ + Tcl_CreateNamespace, /* 506 */ + Tcl_DeleteNamespace, /* 507 */ + Tcl_AppendExportList, /* 508 */ + Tcl_Export, /* 509 */ + Tcl_Import, /* 510 */ + Tcl_ForgetImport, /* 511 */ + Tcl_GetCurrentNamespace, /* 512 */ + Tcl_GetGlobalNamespace, /* 513 */ + Tcl_FindNamespace, /* 514 */ + Tcl_FindCommand, /* 515 */ + Tcl_GetCommandFromObj, /* 516 */ + Tcl_GetCommandFullName, /* 517 */ + Tcl_FSEvalFileEx, /* 518 */ + Tcl_SetExitProc, /* 519 */ + Tcl_LimitAddHandler, /* 520 */ + Tcl_LimitRemoveHandler, /* 521 */ + Tcl_LimitReady, /* 522 */ + Tcl_LimitCheck, /* 523 */ + Tcl_LimitExceeded, /* 524 */ + Tcl_LimitSetCommands, /* 525 */ + Tcl_LimitSetTime, /* 526 */ + Tcl_LimitSetGranularity, /* 527 */ + Tcl_LimitTypeEnabled, /* 528 */ + Tcl_LimitTypeExceeded, /* 529 */ + Tcl_LimitTypeSet, /* 530 */ + Tcl_LimitTypeReset, /* 531 */ + Tcl_LimitGetCommands, /* 532 */ + Tcl_LimitGetTime, /* 533 */ + Tcl_LimitGetGranularity, /* 534 */ + Tcl_SaveInterpState, /* 535 */ + Tcl_RestoreInterpState, /* 536 */ + Tcl_DiscardInterpState, /* 537 */ + Tcl_SetReturnOptions, /* 538 */ + Tcl_GetReturnOptions, /* 539 */ + Tcl_IsEnsemble, /* 540 */ + Tcl_CreateEnsemble, /* 541 */ + Tcl_FindEnsemble, /* 542 */ + Tcl_SetEnsembleSubcommandList, /* 543 */ + Tcl_SetEnsembleMappingDict, /* 544 */ + Tcl_SetEnsembleUnknownHandler, /* 545 */ + Tcl_SetEnsembleFlags, /* 546 */ + Tcl_GetEnsembleSubcommandList, /* 547 */ + Tcl_GetEnsembleMappingDict, /* 548 */ + Tcl_GetEnsembleUnknownHandler, /* 549 */ + Tcl_GetEnsembleFlags, /* 550 */ + Tcl_GetEnsembleNamespace, /* 551 */ + Tcl_SetTimeProc, /* 552 */ + Tcl_QueryTimeProc, /* 553 */ + Tcl_ChannelThreadActionProc, /* 554 */ + Tcl_NewBignumObj, /* 555 */ + Tcl_DbNewBignumObj, /* 556 */ + Tcl_SetBignumObj, /* 557 */ + Tcl_GetBignumFromObj, /* 558 */ + Tcl_TakeBignumFromObj, /* 559 */ + Tcl_TruncateChannel, /* 560 */ + Tcl_ChannelTruncateProc, /* 561 */ + Tcl_SetChannelErrorInterp, /* 562 */ + Tcl_GetChannelErrorInterp, /* 563 */ + Tcl_SetChannelError, /* 564 */ + Tcl_GetChannelError, /* 565 */ + Tcl_InitBignumFromDouble, /* 566 */ + Tcl_GetNamespaceUnknownHandler, /* 567 */ + Tcl_SetNamespaceUnknownHandler, /* 568 */ + Tcl_GetEncodingFromObj, /* 569 */ + Tcl_GetEncodingSearchPath, /* 570 */ + Tcl_SetEncodingSearchPath, /* 571 */ + Tcl_GetEncodingNameFromEnvironment, /* 572 */ + Tcl_PkgRequireProc, /* 573 */ + Tcl_AppendObjToErrorInfo, /* 574 */ + Tcl_AppendLimitedToObj, /* 575 */ + Tcl_Format, /* 576 */ + Tcl_AppendFormatToObj, /* 577 */ + Tcl_ObjPrintf, /* 578 */ + Tcl_AppendPrintfToObj, /* 579 */ + Tcl_CancelEval, /* 580 */ + Tcl_Canceled, /* 581 */ + Tcl_NRCreateCommand, /* 582 */ + Tcl_NREvalObj, /* 583 */ + Tcl_NREvalObjv, /* 584 */ + Tcl_NRCmdSwap, /* 585 */ + Tcl_NRAddCallback, /* 586 */ + Tcl_NRCallObjProc, /* 587 */ + Tcl_CreatePipe, /* 588 */ +}; + +/* !END!: Do not edit above this line. */ + +/* + * Module-scope pointers to the main static stubs tables, used for package + * initialization via Tcl_PkgProvideEx(). + */ + +MODULE_SCOPE const TclStubs * const tclConstStubsPtr; +MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; + +const TclStubs * const tclConstStubsPtr = &tclStubs; +const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 9ebd73a..548ceb1 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -1,785 +1,785 @@ -/* - *---------------------------------------------------------------------- - * - * tclTomMathDecls.h -- - * - * This file contains the declarations for the 'libtommath' - * functions that are exported by the Tcl library. - * - * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.6 2008/07/21 21:02:18 ferrieux Exp $ - */ - -#ifndef _TCLTOMMATHDECLS -#define _TCLTOMMATHDECLS - -#include "tcl.h" - -/* - * Define the version of the Stubs table that's exported for tommath - */ - -#define TCLTOMMATH_EPOCH 0 -#define TCLTOMMATH_REVISION 0 - -#define Tcl_TomMath_InitStubs(interp,version) \ - (TclTomMathInitializeStubs((interp),(version),\ - TCLTOMMATH_EPOCH,TCLTOMMATH_REVISION)) - -/* Define custom memory allocation for libtommath */ - -/* MODULE_SCOPE void* TclBNAlloc( size_t ); */ -#define TclBNAlloc(s) ((void*)ckalloc((size_t)(s))) -/* MODULE_SCOPE void* TclBNRealloc( void*, size_t ); */ -#define TclBNRealloc(x,s) ((void*)ckrealloc((char*)(x),(size_t)(s))) -/* MODULE_SCOPE void TclBNFree( void* ); */ -#define TclBNFree(x) (ckfree((char*)(x))) -/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */ -/* unused - no macro */ - -#define XMALLOC(x) TclBNAlloc(x) -#define XFREE(x) TclBNFree(x) -#define XREALLOC(x,n) TclBNRealloc(x,n) -#define XCALLOC(n,x) TclBNCalloc(n,x) - -/* Rename the global symbols in libtommath to avoid linkage conflicts */ - -#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff -#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff -#define TOOM_MUL_CUTOFF TclBNToomMulCutoff -#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff - -#define bn_reverse TclBN_reverse -#define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs -#define fast_s_mp_sqr TclBN_fast_s_mp_sqr -#define mp_add TclBN_mp_add -#define mp_add_d TclBN_mp_add_d -#define mp_and TclBN_mp_and -#define mp_clamp TclBN_mp_clamp -#define mp_clear TclBN_mp_clear -#define mp_clear_multi TclBN_mp_clear_multi -#define mp_cmp TclBN_mp_cmp -#define mp_cmp_d TclBN_mp_cmp_d -#define mp_cmp_mag TclBN_mp_cmp_mag -#define mp_copy TclBN_mp_copy -#define mp_count_bits TclBN_mp_count_bits -#define mp_div TclBN_mp_div -#define mp_div_2 TclBN_mp_div_2 -#define mp_div_2d TclBN_mp_div_2d -#define mp_div_3 TclBN_mp_div_3 -#define mp_div_d TclBN_mp_div_d -#define mp_exch TclBN_mp_exch -#define mp_expt_d TclBN_mp_expt_d -#define mp_grow TclBN_mp_grow -#define mp_init TclBN_mp_init -#define mp_init_copy TclBN_mp_init_copy -#define mp_init_multi TclBN_mp_init_multi -#define mp_init_set TclBN_mp_init_set -#define mp_init_size TclBN_mp_init_size -#define mp_karatsuba_mul TclBN_mp_karatsuba_mul -#define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr -#define mp_lshd TclBN_mp_lshd -#define mp_mod TclBN_mp_mod -#define mp_mod_2d TclBN_mp_mod_2d -#define mp_mul TclBN_mp_mul -#define mp_mul_2 TclBN_mp_mul_2 -#define mp_mul_2d TclBN_mp_mul_2d -#define mp_mul_d TclBN_mp_mul_d -#define mp_neg TclBN_mp_neg -#define mp_or TclBN_mp_or -#define mp_radix_size TclBN_mp_radix_size -#define mp_read_radix TclBN_mp_read_radix -#define mp_rshd TclBN_mp_rshd -#define mp_s_rmap TclBNMpSRmap -#define mp_set TclBN_mp_set -#define mp_shrink TclBN_mp_shrink -#define mp_sqr TclBN_mp_sqr -#define mp_sqrt TclBN_mp_sqrt -#define mp_sub TclBN_mp_sub -#define mp_sub_d TclBN_mp_sub_d -#define mp_to_unsigned_bin TclBN_mp_to_unsigned_bin -#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n -#define mp_toom_mul TclBN_mp_toom_mul -#define mp_toom_sqr TclBN_mp_toom_sqr -#define mp_toradix_n TclBN_mp_toradix_n -#define mp_unsigned_bin_size TclBN_mp_unsigned_bin_size -#define mp_xor TclBN_mp_xor -#define mp_zero TclBN_mp_zero -#define s_mp_add TclBN_s_mp_add -#define s_mp_mul_digs TclBN_s_mp_mul_digs -#define s_mp_sqr TclBN_s_mp_sqr -#define s_mp_sub TclBN_s_mp_sub - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tclInt.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef TclBN_epoch_TCL_DECLARED -#define TclBN_epoch_TCL_DECLARED -/* 0 */ -EXTERN int TclBN_epoch (void); -#endif -#ifndef TclBN_revision_TCL_DECLARED -#define TclBN_revision_TCL_DECLARED -/* 1 */ -EXTERN int TclBN_revision (void); -#endif -#ifndef TclBN_mp_add_TCL_DECLARED -#define TclBN_mp_add_TCL_DECLARED -/* 2 */ -EXTERN int TclBN_mp_add (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_add_d_TCL_DECLARED -#define TclBN_mp_add_d_TCL_DECLARED -/* 3 */ -EXTERN int TclBN_mp_add_d (mp_int* a, mp_digit b, mp_int* c); -#endif -#ifndef TclBN_mp_and_TCL_DECLARED -#define TclBN_mp_and_TCL_DECLARED -/* 4 */ -EXTERN int TclBN_mp_and (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_clamp_TCL_DECLARED -#define TclBN_mp_clamp_TCL_DECLARED -/* 5 */ -EXTERN void TclBN_mp_clamp (mp_int* a); -#endif -#ifndef TclBN_mp_clear_TCL_DECLARED -#define TclBN_mp_clear_TCL_DECLARED -/* 6 */ -EXTERN void TclBN_mp_clear (mp_int* a); -#endif -#ifndef TclBN_mp_clear_multi_TCL_DECLARED -#define TclBN_mp_clear_multi_TCL_DECLARED -/* 7 */ -EXTERN void TclBN_mp_clear_multi (mp_int* a, ...); -#endif -#ifndef TclBN_mp_cmp_TCL_DECLARED -#define TclBN_mp_cmp_TCL_DECLARED -/* 8 */ -EXTERN int TclBN_mp_cmp (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_cmp_d_TCL_DECLARED -#define TclBN_mp_cmp_d_TCL_DECLARED -/* 9 */ -EXTERN int TclBN_mp_cmp_d (mp_int* a, mp_digit b); -#endif -#ifndef TclBN_mp_cmp_mag_TCL_DECLARED -#define TclBN_mp_cmp_mag_TCL_DECLARED -/* 10 */ -EXTERN int TclBN_mp_cmp_mag (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_copy_TCL_DECLARED -#define TclBN_mp_copy_TCL_DECLARED -/* 11 */ -EXTERN int TclBN_mp_copy (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_count_bits_TCL_DECLARED -#define TclBN_mp_count_bits_TCL_DECLARED -/* 12 */ -EXTERN int TclBN_mp_count_bits (mp_int* a); -#endif -#ifndef TclBN_mp_div_TCL_DECLARED -#define TclBN_mp_div_TCL_DECLARED -/* 13 */ -EXTERN int TclBN_mp_div (mp_int* a, mp_int* b, mp_int* q, - mp_int* r); -#endif -#ifndef TclBN_mp_div_d_TCL_DECLARED -#define TclBN_mp_div_d_TCL_DECLARED -/* 14 */ -EXTERN int TclBN_mp_div_d (mp_int* a, mp_digit b, mp_int* q, - mp_digit* r); -#endif -#ifndef TclBN_mp_div_2_TCL_DECLARED -#define TclBN_mp_div_2_TCL_DECLARED -/* 15 */ -EXTERN int TclBN_mp_div_2 (mp_int* a, mp_int* q); -#endif -#ifndef TclBN_mp_div_2d_TCL_DECLARED -#define TclBN_mp_div_2d_TCL_DECLARED -/* 16 */ -EXTERN int TclBN_mp_div_2d (mp_int* a, int b, mp_int* q, - mp_int* r); -#endif -#ifndef TclBN_mp_div_3_TCL_DECLARED -#define TclBN_mp_div_3_TCL_DECLARED -/* 17 */ -EXTERN int TclBN_mp_div_3 (mp_int* a, mp_int* q, mp_digit* r); -#endif -#ifndef TclBN_mp_exch_TCL_DECLARED -#define TclBN_mp_exch_TCL_DECLARED -/* 18 */ -EXTERN void TclBN_mp_exch (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_expt_d_TCL_DECLARED -#define TclBN_mp_expt_d_TCL_DECLARED -/* 19 */ -EXTERN int TclBN_mp_expt_d (mp_int* a, mp_digit b, mp_int* c); -#endif -#ifndef TclBN_mp_grow_TCL_DECLARED -#define TclBN_mp_grow_TCL_DECLARED -/* 20 */ -EXTERN int TclBN_mp_grow (mp_int* a, int size); -#endif -#ifndef TclBN_mp_init_TCL_DECLARED -#define TclBN_mp_init_TCL_DECLARED -/* 21 */ -EXTERN int TclBN_mp_init (mp_int* a); -#endif -#ifndef TclBN_mp_init_copy_TCL_DECLARED -#define TclBN_mp_init_copy_TCL_DECLARED -/* 22 */ -EXTERN int TclBN_mp_init_copy (mp_int * a, mp_int* b); -#endif -#ifndef TclBN_mp_init_multi_TCL_DECLARED -#define TclBN_mp_init_multi_TCL_DECLARED -/* 23 */ -EXTERN int TclBN_mp_init_multi (mp_int* a, ...); -#endif -#ifndef TclBN_mp_init_set_TCL_DECLARED -#define TclBN_mp_init_set_TCL_DECLARED -/* 24 */ -EXTERN int TclBN_mp_init_set (mp_int* a, mp_digit b); -#endif -#ifndef TclBN_mp_init_size_TCL_DECLARED -#define TclBN_mp_init_size_TCL_DECLARED -/* 25 */ -EXTERN int TclBN_mp_init_size (mp_int* a, int size); -#endif -#ifndef TclBN_mp_lshd_TCL_DECLARED -#define TclBN_mp_lshd_TCL_DECLARED -/* 26 */ -EXTERN int TclBN_mp_lshd (mp_int* a, int shift); -#endif -#ifndef TclBN_mp_mod_TCL_DECLARED -#define TclBN_mp_mod_TCL_DECLARED -/* 27 */ -EXTERN int TclBN_mp_mod (mp_int* a, mp_int* b, mp_int* r); -#endif -#ifndef TclBN_mp_mod_2d_TCL_DECLARED -#define TclBN_mp_mod_2d_TCL_DECLARED -/* 28 */ -EXTERN int TclBN_mp_mod_2d (mp_int* a, int b, mp_int* r); -#endif -#ifndef TclBN_mp_mul_TCL_DECLARED -#define TclBN_mp_mul_TCL_DECLARED -/* 29 */ -EXTERN int TclBN_mp_mul (mp_int* a, mp_int* b, mp_int* p); -#endif -#ifndef TclBN_mp_mul_d_TCL_DECLARED -#define TclBN_mp_mul_d_TCL_DECLARED -/* 30 */ -EXTERN int TclBN_mp_mul_d (mp_int* a, mp_digit b, mp_int* p); -#endif -#ifndef TclBN_mp_mul_2_TCL_DECLARED -#define TclBN_mp_mul_2_TCL_DECLARED -/* 31 */ -EXTERN int TclBN_mp_mul_2 (mp_int* a, mp_int* p); -#endif -#ifndef TclBN_mp_mul_2d_TCL_DECLARED -#define TclBN_mp_mul_2d_TCL_DECLARED -/* 32 */ -EXTERN int TclBN_mp_mul_2d (mp_int* a, int d, mp_int* p); -#endif -#ifndef TclBN_mp_neg_TCL_DECLARED -#define TclBN_mp_neg_TCL_DECLARED -/* 33 */ -EXTERN int TclBN_mp_neg (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_or_TCL_DECLARED -#define TclBN_mp_or_TCL_DECLARED -/* 34 */ -EXTERN int TclBN_mp_or (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_radix_size_TCL_DECLARED -#define TclBN_mp_radix_size_TCL_DECLARED -/* 35 */ -EXTERN int TclBN_mp_radix_size (mp_int* a, int radix, int* size); -#endif -#ifndef TclBN_mp_read_radix_TCL_DECLARED -#define TclBN_mp_read_radix_TCL_DECLARED -/* 36 */ -EXTERN int TclBN_mp_read_radix (mp_int* a, const char* str, - int radix); -#endif -#ifndef TclBN_mp_rshd_TCL_DECLARED -#define TclBN_mp_rshd_TCL_DECLARED -/* 37 */ -EXTERN void TclBN_mp_rshd (mp_int * a, int shift); -#endif -#ifndef TclBN_mp_shrink_TCL_DECLARED -#define TclBN_mp_shrink_TCL_DECLARED -/* 38 */ -EXTERN int TclBN_mp_shrink (mp_int* a); -#endif -#ifndef TclBN_mp_set_TCL_DECLARED -#define TclBN_mp_set_TCL_DECLARED -/* 39 */ -EXTERN void TclBN_mp_set (mp_int* a, mp_digit b); -#endif -#ifndef TclBN_mp_sqr_TCL_DECLARED -#define TclBN_mp_sqr_TCL_DECLARED -/* 40 */ -EXTERN int TclBN_mp_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_sqrt_TCL_DECLARED -#define TclBN_mp_sqrt_TCL_DECLARED -/* 41 */ -EXTERN int TclBN_mp_sqrt (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_sub_TCL_DECLARED -#define TclBN_mp_sub_TCL_DECLARED -/* 42 */ -EXTERN int TclBN_mp_sub (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_sub_d_TCL_DECLARED -#define TclBN_mp_sub_d_TCL_DECLARED -/* 43 */ -EXTERN int TclBN_mp_sub_d (mp_int* a, mp_digit b, mp_int* c); -#endif -#ifndef TclBN_mp_to_unsigned_bin_TCL_DECLARED -#define TclBN_mp_to_unsigned_bin_TCL_DECLARED -/* 44 */ -EXTERN int TclBN_mp_to_unsigned_bin (mp_int* a, - unsigned char* b); -#endif -#ifndef TclBN_mp_to_unsigned_bin_n_TCL_DECLARED -#define TclBN_mp_to_unsigned_bin_n_TCL_DECLARED -/* 45 */ -EXTERN int TclBN_mp_to_unsigned_bin_n (mp_int* a, - unsigned char* b, unsigned long* outlen); -#endif -#ifndef TclBN_mp_toradix_n_TCL_DECLARED -#define TclBN_mp_toradix_n_TCL_DECLARED -/* 46 */ -EXTERN int TclBN_mp_toradix_n (mp_int* a, char* str, int radix, - int maxlen); -#endif -#ifndef TclBN_mp_unsigned_bin_size_TCL_DECLARED -#define TclBN_mp_unsigned_bin_size_TCL_DECLARED -/* 47 */ -EXTERN int TclBN_mp_unsigned_bin_size (mp_int* a); -#endif -#ifndef TclBN_mp_xor_TCL_DECLARED -#define TclBN_mp_xor_TCL_DECLARED -/* 48 */ -EXTERN int TclBN_mp_xor (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_zero_TCL_DECLARED -#define TclBN_mp_zero_TCL_DECLARED -/* 49 */ -EXTERN void TclBN_mp_zero (mp_int* a); -#endif -#ifndef TclBN_reverse_TCL_DECLARED -#define TclBN_reverse_TCL_DECLARED -/* 50 */ -EXTERN void TclBN_reverse (unsigned char* s, int len); -#endif -#ifndef TclBN_fast_s_mp_mul_digs_TCL_DECLARED -#define TclBN_fast_s_mp_mul_digs_TCL_DECLARED -/* 51 */ -EXTERN int TclBN_fast_s_mp_mul_digs (mp_int * a, mp_int * b, - mp_int * c, int digs); -#endif -#ifndef TclBN_fast_s_mp_sqr_TCL_DECLARED -#define TclBN_fast_s_mp_sqr_TCL_DECLARED -/* 52 */ -EXTERN int TclBN_fast_s_mp_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_karatsuba_mul_TCL_DECLARED -#define TclBN_mp_karatsuba_mul_TCL_DECLARED -/* 53 */ -EXTERN int TclBN_mp_karatsuba_mul (mp_int* a, mp_int* b, - mp_int* c); -#endif -#ifndef TclBN_mp_karatsuba_sqr_TCL_DECLARED -#define TclBN_mp_karatsuba_sqr_TCL_DECLARED -/* 54 */ -EXTERN int TclBN_mp_karatsuba_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_mp_toom_mul_TCL_DECLARED -#define TclBN_mp_toom_mul_TCL_DECLARED -/* 55 */ -EXTERN int TclBN_mp_toom_mul (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_mp_toom_sqr_TCL_DECLARED -#define TclBN_mp_toom_sqr_TCL_DECLARED -/* 56 */ -EXTERN int TclBN_mp_toom_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_s_mp_add_TCL_DECLARED -#define TclBN_s_mp_add_TCL_DECLARED -/* 57 */ -EXTERN int TclBN_s_mp_add (mp_int* a, mp_int* b, mp_int* c); -#endif -#ifndef TclBN_s_mp_mul_digs_TCL_DECLARED -#define TclBN_s_mp_mul_digs_TCL_DECLARED -/* 58 */ -EXTERN int TclBN_s_mp_mul_digs (mp_int* a, mp_int* b, mp_int* c, - int digs); -#endif -#ifndef TclBN_s_mp_sqr_TCL_DECLARED -#define TclBN_s_mp_sqr_TCL_DECLARED -/* 59 */ -EXTERN int TclBN_s_mp_sqr (mp_int* a, mp_int* b); -#endif -#ifndef TclBN_s_mp_sub_TCL_DECLARED -#define TclBN_s_mp_sub_TCL_DECLARED -/* 60 */ -EXTERN int TclBN_s_mp_sub (mp_int* a, mp_int* b, mp_int* c); -#endif - -typedef struct TclTomMathStubs { - int magic; - CONST struct TclTomMathStubHooks *hooks; - - int (*tclBN_epoch) (void); /* 0 */ - int (*tclBN_revision) (void); /* 1 */ - int (*tclBN_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 2 */ - int (*tclBN_mp_add_d) (mp_int* a, mp_digit b, mp_int* c); /* 3 */ - int (*tclBN_mp_and) (mp_int* a, mp_int* b, mp_int* c); /* 4 */ - void (*tclBN_mp_clamp) (mp_int* a); /* 5 */ - void (*tclBN_mp_clear) (mp_int* a); /* 6 */ - void (*tclBN_mp_clear_multi) (mp_int* a, ...); /* 7 */ - int (*tclBN_mp_cmp) (mp_int* a, mp_int* b); /* 8 */ - int (*tclBN_mp_cmp_d) (mp_int* a, mp_digit b); /* 9 */ - int (*tclBN_mp_cmp_mag) (mp_int* a, mp_int* b); /* 10 */ - int (*tclBN_mp_copy) (mp_int* a, mp_int* b); /* 11 */ - int (*tclBN_mp_count_bits) (mp_int* a); /* 12 */ - int (*tclBN_mp_div) (mp_int* a, mp_int* b, mp_int* q, mp_int* r); /* 13 */ - int (*tclBN_mp_div_d) (mp_int* a, mp_digit b, mp_int* q, mp_digit* r); /* 14 */ - int (*tclBN_mp_div_2) (mp_int* a, mp_int* q); /* 15 */ - int (*tclBN_mp_div_2d) (mp_int* a, int b, mp_int* q, mp_int* r); /* 16 */ - int (*tclBN_mp_div_3) (mp_int* a, mp_int* q, mp_digit* r); /* 17 */ - void (*tclBN_mp_exch) (mp_int* a, mp_int* b); /* 18 */ - int (*tclBN_mp_expt_d) (mp_int* a, mp_digit b, mp_int* c); /* 19 */ - int (*tclBN_mp_grow) (mp_int* a, int size); /* 20 */ - int (*tclBN_mp_init) (mp_int* a); /* 21 */ - int (*tclBN_mp_init_copy) (mp_int * a, mp_int* b); /* 22 */ - int (*tclBN_mp_init_multi) (mp_int* a, ...); /* 23 */ - int (*tclBN_mp_init_set) (mp_int* a, mp_digit b); /* 24 */ - int (*tclBN_mp_init_size) (mp_int* a, int size); /* 25 */ - int (*tclBN_mp_lshd) (mp_int* a, int shift); /* 26 */ - int (*tclBN_mp_mod) (mp_int* a, mp_int* b, mp_int* r); /* 27 */ - int (*tclBN_mp_mod_2d) (mp_int* a, int b, mp_int* r); /* 28 */ - int (*tclBN_mp_mul) (mp_int* a, mp_int* b, mp_int* p); /* 29 */ - int (*tclBN_mp_mul_d) (mp_int* a, mp_digit b, mp_int* p); /* 30 */ - int (*tclBN_mp_mul_2) (mp_int* a, mp_int* p); /* 31 */ - int (*tclBN_mp_mul_2d) (mp_int* a, int d, mp_int* p); /* 32 */ - int (*tclBN_mp_neg) (mp_int* a, mp_int* b); /* 33 */ - int (*tclBN_mp_or) (mp_int* a, mp_int* b, mp_int* c); /* 34 */ - int (*tclBN_mp_radix_size) (mp_int* a, int radix, int* size); /* 35 */ - int (*tclBN_mp_read_radix) (mp_int* a, const char* str, int radix); /* 36 */ - void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ - int (*tclBN_mp_shrink) (mp_int* a); /* 38 */ - void (*tclBN_mp_set) (mp_int* a, mp_digit b); /* 39 */ - int (*tclBN_mp_sqr) (mp_int* a, mp_int* b); /* 40 */ - int (*tclBN_mp_sqrt) (mp_int* a, mp_int* b); /* 41 */ - int (*tclBN_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 42 */ - int (*tclBN_mp_sub_d) (mp_int* a, mp_digit b, mp_int* c); /* 43 */ - int (*tclBN_mp_to_unsigned_bin) (mp_int* a, unsigned char* b); /* 44 */ - int (*tclBN_mp_to_unsigned_bin_n) (mp_int* a, unsigned char* b, unsigned long* outlen); /* 45 */ - int (*tclBN_mp_toradix_n) (mp_int* a, char* str, int radix, int maxlen); /* 46 */ - int (*tclBN_mp_unsigned_bin_size) (mp_int* a); /* 47 */ - int (*tclBN_mp_xor) (mp_int* a, mp_int* b, mp_int* c); /* 48 */ - void (*tclBN_mp_zero) (mp_int* a); /* 49 */ - void (*tclBN_reverse) (unsigned char* s, int len); /* 50 */ - int (*tclBN_fast_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 51 */ - int (*tclBN_fast_s_mp_sqr) (mp_int* a, mp_int* b); /* 52 */ - int (*tclBN_mp_karatsuba_mul) (mp_int* a, mp_int* b, mp_int* c); /* 53 */ - int (*tclBN_mp_karatsuba_sqr) (mp_int* a, mp_int* b); /* 54 */ - int (*tclBN_mp_toom_mul) (mp_int* a, mp_int* b, mp_int* c); /* 55 */ - int (*tclBN_mp_toom_sqr) (mp_int* a, mp_int* b); /* 56 */ - int (*tclBN_s_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 57 */ - int (*tclBN_s_mp_mul_digs) (mp_int* a, mp_int* b, mp_int* c, int digs); /* 58 */ - int (*tclBN_s_mp_sqr) (mp_int* a, mp_int* b); /* 59 */ - int (*tclBN_s_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 60 */ -} TclTomMathStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclTomMathStubs *tclTomMathStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef TclBN_epoch -#define TclBN_epoch \ - (tclTomMathStubsPtr->tclBN_epoch) /* 0 */ -#endif -#ifndef TclBN_revision -#define TclBN_revision \ - (tclTomMathStubsPtr->tclBN_revision) /* 1 */ -#endif -#ifndef TclBN_mp_add -#define TclBN_mp_add \ - (tclTomMathStubsPtr->tclBN_mp_add) /* 2 */ -#endif -#ifndef TclBN_mp_add_d -#define TclBN_mp_add_d \ - (tclTomMathStubsPtr->tclBN_mp_add_d) /* 3 */ -#endif -#ifndef TclBN_mp_and -#define TclBN_mp_and \ - (tclTomMathStubsPtr->tclBN_mp_and) /* 4 */ -#endif -#ifndef TclBN_mp_clamp -#define TclBN_mp_clamp \ - (tclTomMathStubsPtr->tclBN_mp_clamp) /* 5 */ -#endif -#ifndef TclBN_mp_clear -#define TclBN_mp_clear \ - (tclTomMathStubsPtr->tclBN_mp_clear) /* 6 */ -#endif -#ifndef TclBN_mp_clear_multi -#define TclBN_mp_clear_multi \ - (tclTomMathStubsPtr->tclBN_mp_clear_multi) /* 7 */ -#endif -#ifndef TclBN_mp_cmp -#define TclBN_mp_cmp \ - (tclTomMathStubsPtr->tclBN_mp_cmp) /* 8 */ -#endif -#ifndef TclBN_mp_cmp_d -#define TclBN_mp_cmp_d \ - (tclTomMathStubsPtr->tclBN_mp_cmp_d) /* 9 */ -#endif -#ifndef TclBN_mp_cmp_mag -#define TclBN_mp_cmp_mag \ - (tclTomMathStubsPtr->tclBN_mp_cmp_mag) /* 10 */ -#endif -#ifndef TclBN_mp_copy -#define TclBN_mp_copy \ - (tclTomMathStubsPtr->tclBN_mp_copy) /* 11 */ -#endif -#ifndef TclBN_mp_count_bits -#define TclBN_mp_count_bits \ - (tclTomMathStubsPtr->tclBN_mp_count_bits) /* 12 */ -#endif -#ifndef TclBN_mp_div -#define TclBN_mp_div \ - (tclTomMathStubsPtr->tclBN_mp_div) /* 13 */ -#endif -#ifndef TclBN_mp_div_d -#define TclBN_mp_div_d \ - (tclTomMathStubsPtr->tclBN_mp_div_d) /* 14 */ -#endif -#ifndef TclBN_mp_div_2 -#define TclBN_mp_div_2 \ - (tclTomMathStubsPtr->tclBN_mp_div_2) /* 15 */ -#endif -#ifndef TclBN_mp_div_2d -#define TclBN_mp_div_2d \ - (tclTomMathStubsPtr->tclBN_mp_div_2d) /* 16 */ -#endif -#ifndef TclBN_mp_div_3 -#define TclBN_mp_div_3 \ - (tclTomMathStubsPtr->tclBN_mp_div_3) /* 17 */ -#endif -#ifndef TclBN_mp_exch -#define TclBN_mp_exch \ - (tclTomMathStubsPtr->tclBN_mp_exch) /* 18 */ -#endif -#ifndef TclBN_mp_expt_d -#define TclBN_mp_expt_d \ - (tclTomMathStubsPtr->tclBN_mp_expt_d) /* 19 */ -#endif -#ifndef TclBN_mp_grow -#define TclBN_mp_grow \ - (tclTomMathStubsPtr->tclBN_mp_grow) /* 20 */ -#endif -#ifndef TclBN_mp_init -#define TclBN_mp_init \ - (tclTomMathStubsPtr->tclBN_mp_init) /* 21 */ -#endif -#ifndef TclBN_mp_init_copy -#define TclBN_mp_init_copy \ - (tclTomMathStubsPtr->tclBN_mp_init_copy) /* 22 */ -#endif -#ifndef TclBN_mp_init_multi -#define TclBN_mp_init_multi \ - (tclTomMathStubsPtr->tclBN_mp_init_multi) /* 23 */ -#endif -#ifndef TclBN_mp_init_set -#define TclBN_mp_init_set \ - (tclTomMathStubsPtr->tclBN_mp_init_set) /* 24 */ -#endif -#ifndef TclBN_mp_init_size -#define TclBN_mp_init_size \ - (tclTomMathStubsPtr->tclBN_mp_init_size) /* 25 */ -#endif -#ifndef TclBN_mp_lshd -#define TclBN_mp_lshd \ - (tclTomMathStubsPtr->tclBN_mp_lshd) /* 26 */ -#endif -#ifndef TclBN_mp_mod -#define TclBN_mp_mod \ - (tclTomMathStubsPtr->tclBN_mp_mod) /* 27 */ -#endif -#ifndef TclBN_mp_mod_2d -#define TclBN_mp_mod_2d \ - (tclTomMathStubsPtr->tclBN_mp_mod_2d) /* 28 */ -#endif -#ifndef TclBN_mp_mul -#define TclBN_mp_mul \ - (tclTomMathStubsPtr->tclBN_mp_mul) /* 29 */ -#endif -#ifndef TclBN_mp_mul_d -#define TclBN_mp_mul_d \ - (tclTomMathStubsPtr->tclBN_mp_mul_d) /* 30 */ -#endif -#ifndef TclBN_mp_mul_2 -#define TclBN_mp_mul_2 \ - (tclTomMathStubsPtr->tclBN_mp_mul_2) /* 31 */ -#endif -#ifndef TclBN_mp_mul_2d -#define TclBN_mp_mul_2d \ - (tclTomMathStubsPtr->tclBN_mp_mul_2d) /* 32 */ -#endif -#ifndef TclBN_mp_neg -#define TclBN_mp_neg \ - (tclTomMathStubsPtr->tclBN_mp_neg) /* 33 */ -#endif -#ifndef TclBN_mp_or -#define TclBN_mp_or \ - (tclTomMathStubsPtr->tclBN_mp_or) /* 34 */ -#endif -#ifndef TclBN_mp_radix_size -#define TclBN_mp_radix_size \ - (tclTomMathStubsPtr->tclBN_mp_radix_size) /* 35 */ -#endif -#ifndef TclBN_mp_read_radix -#define TclBN_mp_read_radix \ - (tclTomMathStubsPtr->tclBN_mp_read_radix) /* 36 */ -#endif -#ifndef TclBN_mp_rshd -#define TclBN_mp_rshd \ - (tclTomMathStubsPtr->tclBN_mp_rshd) /* 37 */ -#endif -#ifndef TclBN_mp_shrink -#define TclBN_mp_shrink \ - (tclTomMathStubsPtr->tclBN_mp_shrink) /* 38 */ -#endif -#ifndef TclBN_mp_set -#define TclBN_mp_set \ - (tclTomMathStubsPtr->tclBN_mp_set) /* 39 */ -#endif -#ifndef TclBN_mp_sqr -#define TclBN_mp_sqr \ - (tclTomMathStubsPtr->tclBN_mp_sqr) /* 40 */ -#endif -#ifndef TclBN_mp_sqrt -#define TclBN_mp_sqrt \ - (tclTomMathStubsPtr->tclBN_mp_sqrt) /* 41 */ -#endif -#ifndef TclBN_mp_sub -#define TclBN_mp_sub \ - (tclTomMathStubsPtr->tclBN_mp_sub) /* 42 */ -#endif -#ifndef TclBN_mp_sub_d -#define TclBN_mp_sub_d \ - (tclTomMathStubsPtr->tclBN_mp_sub_d) /* 43 */ -#endif -#ifndef TclBN_mp_to_unsigned_bin -#define TclBN_mp_to_unsigned_bin \ - (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin) /* 44 */ -#endif -#ifndef TclBN_mp_to_unsigned_bin_n -#define TclBN_mp_to_unsigned_bin_n \ - (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin_n) /* 45 */ -#endif -#ifndef TclBN_mp_toradix_n -#define TclBN_mp_toradix_n \ - (tclTomMathStubsPtr->tclBN_mp_toradix_n) /* 46 */ -#endif -#ifndef TclBN_mp_unsigned_bin_size -#define TclBN_mp_unsigned_bin_size \ - (tclTomMathStubsPtr->tclBN_mp_unsigned_bin_size) /* 47 */ -#endif -#ifndef TclBN_mp_xor -#define TclBN_mp_xor \ - (tclTomMathStubsPtr->tclBN_mp_xor) /* 48 */ -#endif -#ifndef TclBN_mp_zero -#define TclBN_mp_zero \ - (tclTomMathStubsPtr->tclBN_mp_zero) /* 49 */ -#endif -#ifndef TclBN_reverse -#define TclBN_reverse \ - (tclTomMathStubsPtr->tclBN_reverse) /* 50 */ -#endif -#ifndef TclBN_fast_s_mp_mul_digs -#define TclBN_fast_s_mp_mul_digs \ - (tclTomMathStubsPtr->tclBN_fast_s_mp_mul_digs) /* 51 */ -#endif -#ifndef TclBN_fast_s_mp_sqr -#define TclBN_fast_s_mp_sqr \ - (tclTomMathStubsPtr->tclBN_fast_s_mp_sqr) /* 52 */ -#endif -#ifndef TclBN_mp_karatsuba_mul -#define TclBN_mp_karatsuba_mul \ - (tclTomMathStubsPtr->tclBN_mp_karatsuba_mul) /* 53 */ -#endif -#ifndef TclBN_mp_karatsuba_sqr -#define TclBN_mp_karatsuba_sqr \ - (tclTomMathStubsPtr->tclBN_mp_karatsuba_sqr) /* 54 */ -#endif -#ifndef TclBN_mp_toom_mul -#define TclBN_mp_toom_mul \ - (tclTomMathStubsPtr->tclBN_mp_toom_mul) /* 55 */ -#endif -#ifndef TclBN_mp_toom_sqr -#define TclBN_mp_toom_sqr \ - (tclTomMathStubsPtr->tclBN_mp_toom_sqr) /* 56 */ -#endif -#ifndef TclBN_s_mp_add -#define TclBN_s_mp_add \ - (tclTomMathStubsPtr->tclBN_s_mp_add) /* 57 */ -#endif -#ifndef TclBN_s_mp_mul_digs -#define TclBN_s_mp_mul_digs \ - (tclTomMathStubsPtr->tclBN_s_mp_mul_digs) /* 58 */ -#endif -#ifndef TclBN_s_mp_sqr -#define TclBN_s_mp_sqr \ - (tclTomMathStubsPtr->tclBN_s_mp_sqr) /* 59 */ -#endif -#ifndef TclBN_s_mp_sub -#define TclBN_s_mp_sub \ - (tclTomMathStubsPtr->tclBN_s_mp_sub) /* 60 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLINTDECLS */ +/* + *---------------------------------------------------------------------- + * + * tclTomMathDecls.h -- + * + * This file contains the declarations for the 'libtommath' + * functions that are exported by the Tcl library. + * + * Copyright (c) 2005 by Kevin B. Kenny. All rights reserved. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.7 2008/07/22 23:01:44 das Exp $ + */ + +#ifndef _TCLTOMMATHDECLS +#define _TCLTOMMATHDECLS + +#include "tcl.h" + +/* + * Define the version of the Stubs table that's exported for tommath + */ + +#define TCLTOMMATH_EPOCH 0 +#define TCLTOMMATH_REVISION 0 + +#define Tcl_TomMath_InitStubs(interp,version) \ + (TclTomMathInitializeStubs((interp),(version),\ + TCLTOMMATH_EPOCH,TCLTOMMATH_REVISION)) + +/* Define custom memory allocation for libtommath */ + +/* MODULE_SCOPE void* TclBNAlloc( size_t ); */ +#define TclBNAlloc(s) ((void*)ckalloc((size_t)(s))) +/* MODULE_SCOPE void* TclBNRealloc( void*, size_t ); */ +#define TclBNRealloc(x,s) ((void*)ckrealloc((char*)(x),(size_t)(s))) +/* MODULE_SCOPE void TclBNFree( void* ); */ +#define TclBNFree(x) (ckfree((char*)(x))) +/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */ +/* unused - no macro */ + +#define XMALLOC(x) TclBNAlloc(x) +#define XFREE(x) TclBNFree(x) +#define XREALLOC(x,n) TclBNRealloc(x,n) +#define XCALLOC(n,x) TclBNCalloc(n,x) + +/* Rename the global symbols in libtommath to avoid linkage conflicts */ + +#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff +#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff +#define TOOM_MUL_CUTOFF TclBNToomMulCutoff +#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff + +#define bn_reverse TclBN_reverse +#define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs +#define fast_s_mp_sqr TclBN_fast_s_mp_sqr +#define mp_add TclBN_mp_add +#define mp_add_d TclBN_mp_add_d +#define mp_and TclBN_mp_and +#define mp_clamp TclBN_mp_clamp +#define mp_clear TclBN_mp_clear +#define mp_clear_multi TclBN_mp_clear_multi +#define mp_cmp TclBN_mp_cmp +#define mp_cmp_d TclBN_mp_cmp_d +#define mp_cmp_mag TclBN_mp_cmp_mag +#define mp_copy TclBN_mp_copy +#define mp_count_bits TclBN_mp_count_bits +#define mp_div TclBN_mp_div +#define mp_div_2 TclBN_mp_div_2 +#define mp_div_2d TclBN_mp_div_2d +#define mp_div_3 TclBN_mp_div_3 +#define mp_div_d TclBN_mp_div_d +#define mp_exch TclBN_mp_exch +#define mp_expt_d TclBN_mp_expt_d +#define mp_grow TclBN_mp_grow +#define mp_init TclBN_mp_init +#define mp_init_copy TclBN_mp_init_copy +#define mp_init_multi TclBN_mp_init_multi +#define mp_init_set TclBN_mp_init_set +#define mp_init_size TclBN_mp_init_size +#define mp_karatsuba_mul TclBN_mp_karatsuba_mul +#define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr +#define mp_lshd TclBN_mp_lshd +#define mp_mod TclBN_mp_mod +#define mp_mod_2d TclBN_mp_mod_2d +#define mp_mul TclBN_mp_mul +#define mp_mul_2 TclBN_mp_mul_2 +#define mp_mul_2d TclBN_mp_mul_2d +#define mp_mul_d TclBN_mp_mul_d +#define mp_neg TclBN_mp_neg +#define mp_or TclBN_mp_or +#define mp_radix_size TclBN_mp_radix_size +#define mp_read_radix TclBN_mp_read_radix +#define mp_rshd TclBN_mp_rshd +#define mp_s_rmap TclBNMpSRmap +#define mp_set TclBN_mp_set +#define mp_shrink TclBN_mp_shrink +#define mp_sqr TclBN_mp_sqr +#define mp_sqrt TclBN_mp_sqrt +#define mp_sub TclBN_mp_sub +#define mp_sub_d TclBN_mp_sub_d +#define mp_to_unsigned_bin TclBN_mp_to_unsigned_bin +#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n +#define mp_toom_mul TclBN_mp_toom_mul +#define mp_toom_sqr TclBN_mp_toom_sqr +#define mp_toradix_n TclBN_mp_toradix_n +#define mp_unsigned_bin_size TclBN_mp_unsigned_bin_size +#define mp_xor TclBN_mp_xor +#define mp_zero TclBN_mp_zero +#define s_mp_add TclBN_s_mp_add +#define s_mp_mul_digs TclBN_s_mp_mul_digs +#define s_mp_sqr TclBN_s_mp_sqr +#define s_mp_sub TclBN_s_mp_sub + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tclInt.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef TclBN_epoch_TCL_DECLARED +#define TclBN_epoch_TCL_DECLARED +/* 0 */ +EXTERN int TclBN_epoch (void); +#endif +#ifndef TclBN_revision_TCL_DECLARED +#define TclBN_revision_TCL_DECLARED +/* 1 */ +EXTERN int TclBN_revision (void); +#endif +#ifndef TclBN_mp_add_TCL_DECLARED +#define TclBN_mp_add_TCL_DECLARED +/* 2 */ +EXTERN int TclBN_mp_add (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_add_d_TCL_DECLARED +#define TclBN_mp_add_d_TCL_DECLARED +/* 3 */ +EXTERN int TclBN_mp_add_d (mp_int* a, mp_digit b, mp_int* c); +#endif +#ifndef TclBN_mp_and_TCL_DECLARED +#define TclBN_mp_and_TCL_DECLARED +/* 4 */ +EXTERN int TclBN_mp_and (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_clamp_TCL_DECLARED +#define TclBN_mp_clamp_TCL_DECLARED +/* 5 */ +EXTERN void TclBN_mp_clamp (mp_int* a); +#endif +#ifndef TclBN_mp_clear_TCL_DECLARED +#define TclBN_mp_clear_TCL_DECLARED +/* 6 */ +EXTERN void TclBN_mp_clear (mp_int* a); +#endif +#ifndef TclBN_mp_clear_multi_TCL_DECLARED +#define TclBN_mp_clear_multi_TCL_DECLARED +/* 7 */ +EXTERN void TclBN_mp_clear_multi (mp_int* a, ...); +#endif +#ifndef TclBN_mp_cmp_TCL_DECLARED +#define TclBN_mp_cmp_TCL_DECLARED +/* 8 */ +EXTERN int TclBN_mp_cmp (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_cmp_d_TCL_DECLARED +#define TclBN_mp_cmp_d_TCL_DECLARED +/* 9 */ +EXTERN int TclBN_mp_cmp_d (mp_int* a, mp_digit b); +#endif +#ifndef TclBN_mp_cmp_mag_TCL_DECLARED +#define TclBN_mp_cmp_mag_TCL_DECLARED +/* 10 */ +EXTERN int TclBN_mp_cmp_mag (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_copy_TCL_DECLARED +#define TclBN_mp_copy_TCL_DECLARED +/* 11 */ +EXTERN int TclBN_mp_copy (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_count_bits_TCL_DECLARED +#define TclBN_mp_count_bits_TCL_DECLARED +/* 12 */ +EXTERN int TclBN_mp_count_bits (mp_int* a); +#endif +#ifndef TclBN_mp_div_TCL_DECLARED +#define TclBN_mp_div_TCL_DECLARED +/* 13 */ +EXTERN int TclBN_mp_div (mp_int* a, mp_int* b, mp_int* q, + mp_int* r); +#endif +#ifndef TclBN_mp_div_d_TCL_DECLARED +#define TclBN_mp_div_d_TCL_DECLARED +/* 14 */ +EXTERN int TclBN_mp_div_d (mp_int* a, mp_digit b, mp_int* q, + mp_digit* r); +#endif +#ifndef TclBN_mp_div_2_TCL_DECLARED +#define TclBN_mp_div_2_TCL_DECLARED +/* 15 */ +EXTERN int TclBN_mp_div_2 (mp_int* a, mp_int* q); +#endif +#ifndef TclBN_mp_div_2d_TCL_DECLARED +#define TclBN_mp_div_2d_TCL_DECLARED +/* 16 */ +EXTERN int TclBN_mp_div_2d (mp_int* a, int b, mp_int* q, + mp_int* r); +#endif +#ifndef TclBN_mp_div_3_TCL_DECLARED +#define TclBN_mp_div_3_TCL_DECLARED +/* 17 */ +EXTERN int TclBN_mp_div_3 (mp_int* a, mp_int* q, mp_digit* r); +#endif +#ifndef TclBN_mp_exch_TCL_DECLARED +#define TclBN_mp_exch_TCL_DECLARED +/* 18 */ +EXTERN void TclBN_mp_exch (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_expt_d_TCL_DECLARED +#define TclBN_mp_expt_d_TCL_DECLARED +/* 19 */ +EXTERN int TclBN_mp_expt_d (mp_int* a, mp_digit b, mp_int* c); +#endif +#ifndef TclBN_mp_grow_TCL_DECLARED +#define TclBN_mp_grow_TCL_DECLARED +/* 20 */ +EXTERN int TclBN_mp_grow (mp_int* a, int size); +#endif +#ifndef TclBN_mp_init_TCL_DECLARED +#define TclBN_mp_init_TCL_DECLARED +/* 21 */ +EXTERN int TclBN_mp_init (mp_int* a); +#endif +#ifndef TclBN_mp_init_copy_TCL_DECLARED +#define TclBN_mp_init_copy_TCL_DECLARED +/* 22 */ +EXTERN int TclBN_mp_init_copy (mp_int * a, mp_int* b); +#endif +#ifndef TclBN_mp_init_multi_TCL_DECLARED +#define TclBN_mp_init_multi_TCL_DECLARED +/* 23 */ +EXTERN int TclBN_mp_init_multi (mp_int* a, ...); +#endif +#ifndef TclBN_mp_init_set_TCL_DECLARED +#define TclBN_mp_init_set_TCL_DECLARED +/* 24 */ +EXTERN int TclBN_mp_init_set (mp_int* a, mp_digit b); +#endif +#ifndef TclBN_mp_init_size_TCL_DECLARED +#define TclBN_mp_init_size_TCL_DECLARED +/* 25 */ +EXTERN int TclBN_mp_init_size (mp_int* a, int size); +#endif +#ifndef TclBN_mp_lshd_TCL_DECLARED +#define TclBN_mp_lshd_TCL_DECLARED +/* 26 */ +EXTERN int TclBN_mp_lshd (mp_int* a, int shift); +#endif +#ifndef TclBN_mp_mod_TCL_DECLARED +#define TclBN_mp_mod_TCL_DECLARED +/* 27 */ +EXTERN int TclBN_mp_mod (mp_int* a, mp_int* b, mp_int* r); +#endif +#ifndef TclBN_mp_mod_2d_TCL_DECLARED +#define TclBN_mp_mod_2d_TCL_DECLARED +/* 28 */ +EXTERN int TclBN_mp_mod_2d (mp_int* a, int b, mp_int* r); +#endif +#ifndef TclBN_mp_mul_TCL_DECLARED +#define TclBN_mp_mul_TCL_DECLARED +/* 29 */ +EXTERN int TclBN_mp_mul (mp_int* a, mp_int* b, mp_int* p); +#endif +#ifndef TclBN_mp_mul_d_TCL_DECLARED +#define TclBN_mp_mul_d_TCL_DECLARED +/* 30 */ +EXTERN int TclBN_mp_mul_d (mp_int* a, mp_digit b, mp_int* p); +#endif +#ifndef TclBN_mp_mul_2_TCL_DECLARED +#define TclBN_mp_mul_2_TCL_DECLARED +/* 31 */ +EXTERN int TclBN_mp_mul_2 (mp_int* a, mp_int* p); +#endif +#ifndef TclBN_mp_mul_2d_TCL_DECLARED +#define TclBN_mp_mul_2d_TCL_DECLARED +/* 32 */ +EXTERN int TclBN_mp_mul_2d (mp_int* a, int d, mp_int* p); +#endif +#ifndef TclBN_mp_neg_TCL_DECLARED +#define TclBN_mp_neg_TCL_DECLARED +/* 33 */ +EXTERN int TclBN_mp_neg (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_or_TCL_DECLARED +#define TclBN_mp_or_TCL_DECLARED +/* 34 */ +EXTERN int TclBN_mp_or (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_radix_size_TCL_DECLARED +#define TclBN_mp_radix_size_TCL_DECLARED +/* 35 */ +EXTERN int TclBN_mp_radix_size (mp_int* a, int radix, int* size); +#endif +#ifndef TclBN_mp_read_radix_TCL_DECLARED +#define TclBN_mp_read_radix_TCL_DECLARED +/* 36 */ +EXTERN int TclBN_mp_read_radix (mp_int* a, const char* str, + int radix); +#endif +#ifndef TclBN_mp_rshd_TCL_DECLARED +#define TclBN_mp_rshd_TCL_DECLARED +/* 37 */ +EXTERN void TclBN_mp_rshd (mp_int * a, int shift); +#endif +#ifndef TclBN_mp_shrink_TCL_DECLARED +#define TclBN_mp_shrink_TCL_DECLARED +/* 38 */ +EXTERN int TclBN_mp_shrink (mp_int* a); +#endif +#ifndef TclBN_mp_set_TCL_DECLARED +#define TclBN_mp_set_TCL_DECLARED +/* 39 */ +EXTERN void TclBN_mp_set (mp_int* a, mp_digit b); +#endif +#ifndef TclBN_mp_sqr_TCL_DECLARED +#define TclBN_mp_sqr_TCL_DECLARED +/* 40 */ +EXTERN int TclBN_mp_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_sqrt_TCL_DECLARED +#define TclBN_mp_sqrt_TCL_DECLARED +/* 41 */ +EXTERN int TclBN_mp_sqrt (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_sub_TCL_DECLARED +#define TclBN_mp_sub_TCL_DECLARED +/* 42 */ +EXTERN int TclBN_mp_sub (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_sub_d_TCL_DECLARED +#define TclBN_mp_sub_d_TCL_DECLARED +/* 43 */ +EXTERN int TclBN_mp_sub_d (mp_int* a, mp_digit b, mp_int* c); +#endif +#ifndef TclBN_mp_to_unsigned_bin_TCL_DECLARED +#define TclBN_mp_to_unsigned_bin_TCL_DECLARED +/* 44 */ +EXTERN int TclBN_mp_to_unsigned_bin (mp_int* a, + unsigned char* b); +#endif +#ifndef TclBN_mp_to_unsigned_bin_n_TCL_DECLARED +#define TclBN_mp_to_unsigned_bin_n_TCL_DECLARED +/* 45 */ +EXTERN int TclBN_mp_to_unsigned_bin_n (mp_int* a, + unsigned char* b, unsigned long* outlen); +#endif +#ifndef TclBN_mp_toradix_n_TCL_DECLARED +#define TclBN_mp_toradix_n_TCL_DECLARED +/* 46 */ +EXTERN int TclBN_mp_toradix_n (mp_int* a, char* str, int radix, + int maxlen); +#endif +#ifndef TclBN_mp_unsigned_bin_size_TCL_DECLARED +#define TclBN_mp_unsigned_bin_size_TCL_DECLARED +/* 47 */ +EXTERN int TclBN_mp_unsigned_bin_size (mp_int* a); +#endif +#ifndef TclBN_mp_xor_TCL_DECLARED +#define TclBN_mp_xor_TCL_DECLARED +/* 48 */ +EXTERN int TclBN_mp_xor (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_zero_TCL_DECLARED +#define TclBN_mp_zero_TCL_DECLARED +/* 49 */ +EXTERN void TclBN_mp_zero (mp_int* a); +#endif +#ifndef TclBN_reverse_TCL_DECLARED +#define TclBN_reverse_TCL_DECLARED +/* 50 */ +EXTERN void TclBN_reverse (unsigned char* s, int len); +#endif +#ifndef TclBN_fast_s_mp_mul_digs_TCL_DECLARED +#define TclBN_fast_s_mp_mul_digs_TCL_DECLARED +/* 51 */ +EXTERN int TclBN_fast_s_mp_mul_digs (mp_int * a, mp_int * b, + mp_int * c, int digs); +#endif +#ifndef TclBN_fast_s_mp_sqr_TCL_DECLARED +#define TclBN_fast_s_mp_sqr_TCL_DECLARED +/* 52 */ +EXTERN int TclBN_fast_s_mp_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_karatsuba_mul_TCL_DECLARED +#define TclBN_mp_karatsuba_mul_TCL_DECLARED +/* 53 */ +EXTERN int TclBN_mp_karatsuba_mul (mp_int* a, mp_int* b, + mp_int* c); +#endif +#ifndef TclBN_mp_karatsuba_sqr_TCL_DECLARED +#define TclBN_mp_karatsuba_sqr_TCL_DECLARED +/* 54 */ +EXTERN int TclBN_mp_karatsuba_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_mp_toom_mul_TCL_DECLARED +#define TclBN_mp_toom_mul_TCL_DECLARED +/* 55 */ +EXTERN int TclBN_mp_toom_mul (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_mp_toom_sqr_TCL_DECLARED +#define TclBN_mp_toom_sqr_TCL_DECLARED +/* 56 */ +EXTERN int TclBN_mp_toom_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_s_mp_add_TCL_DECLARED +#define TclBN_s_mp_add_TCL_DECLARED +/* 57 */ +EXTERN int TclBN_s_mp_add (mp_int* a, mp_int* b, mp_int* c); +#endif +#ifndef TclBN_s_mp_mul_digs_TCL_DECLARED +#define TclBN_s_mp_mul_digs_TCL_DECLARED +/* 58 */ +EXTERN int TclBN_s_mp_mul_digs (mp_int* a, mp_int* b, mp_int* c, + int digs); +#endif +#ifndef TclBN_s_mp_sqr_TCL_DECLARED +#define TclBN_s_mp_sqr_TCL_DECLARED +/* 59 */ +EXTERN int TclBN_s_mp_sqr (mp_int* a, mp_int* b); +#endif +#ifndef TclBN_s_mp_sub_TCL_DECLARED +#define TclBN_s_mp_sub_TCL_DECLARED +/* 60 */ +EXTERN int TclBN_s_mp_sub (mp_int* a, mp_int* b, mp_int* c); +#endif + +typedef struct TclTomMathStubs { + int magic; + CONST struct TclTomMathStubHooks *hooks; + + int (*tclBN_epoch) (void); /* 0 */ + int (*tclBN_revision) (void); /* 1 */ + int (*tclBN_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 2 */ + int (*tclBN_mp_add_d) (mp_int* a, mp_digit b, mp_int* c); /* 3 */ + int (*tclBN_mp_and) (mp_int* a, mp_int* b, mp_int* c); /* 4 */ + void (*tclBN_mp_clamp) (mp_int* a); /* 5 */ + void (*tclBN_mp_clear) (mp_int* a); /* 6 */ + void (*tclBN_mp_clear_multi) (mp_int* a, ...); /* 7 */ + int (*tclBN_mp_cmp) (mp_int* a, mp_int* b); /* 8 */ + int (*tclBN_mp_cmp_d) (mp_int* a, mp_digit b); /* 9 */ + int (*tclBN_mp_cmp_mag) (mp_int* a, mp_int* b); /* 10 */ + int (*tclBN_mp_copy) (mp_int* a, mp_int* b); /* 11 */ + int (*tclBN_mp_count_bits) (mp_int* a); /* 12 */ + int (*tclBN_mp_div) (mp_int* a, mp_int* b, mp_int* q, mp_int* r); /* 13 */ + int (*tclBN_mp_div_d) (mp_int* a, mp_digit b, mp_int* q, mp_digit* r); /* 14 */ + int (*tclBN_mp_div_2) (mp_int* a, mp_int* q); /* 15 */ + int (*tclBN_mp_div_2d) (mp_int* a, int b, mp_int* q, mp_int* r); /* 16 */ + int (*tclBN_mp_div_3) (mp_int* a, mp_int* q, mp_digit* r); /* 17 */ + void (*tclBN_mp_exch) (mp_int* a, mp_int* b); /* 18 */ + int (*tclBN_mp_expt_d) (mp_int* a, mp_digit b, mp_int* c); /* 19 */ + int (*tclBN_mp_grow) (mp_int* a, int size); /* 20 */ + int (*tclBN_mp_init) (mp_int* a); /* 21 */ + int (*tclBN_mp_init_copy) (mp_int * a, mp_int* b); /* 22 */ + int (*tclBN_mp_init_multi) (mp_int* a, ...); /* 23 */ + int (*tclBN_mp_init_set) (mp_int* a, mp_digit b); /* 24 */ + int (*tclBN_mp_init_size) (mp_int* a, int size); /* 25 */ + int (*tclBN_mp_lshd) (mp_int* a, int shift); /* 26 */ + int (*tclBN_mp_mod) (mp_int* a, mp_int* b, mp_int* r); /* 27 */ + int (*tclBN_mp_mod_2d) (mp_int* a, int b, mp_int* r); /* 28 */ + int (*tclBN_mp_mul) (mp_int* a, mp_int* b, mp_int* p); /* 29 */ + int (*tclBN_mp_mul_d) (mp_int* a, mp_digit b, mp_int* p); /* 30 */ + int (*tclBN_mp_mul_2) (mp_int* a, mp_int* p); /* 31 */ + int (*tclBN_mp_mul_2d) (mp_int* a, int d, mp_int* p); /* 32 */ + int (*tclBN_mp_neg) (mp_int* a, mp_int* b); /* 33 */ + int (*tclBN_mp_or) (mp_int* a, mp_int* b, mp_int* c); /* 34 */ + int (*tclBN_mp_radix_size) (mp_int* a, int radix, int* size); /* 35 */ + int (*tclBN_mp_read_radix) (mp_int* a, const char* str, int radix); /* 36 */ + void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ + int (*tclBN_mp_shrink) (mp_int* a); /* 38 */ + void (*tclBN_mp_set) (mp_int* a, mp_digit b); /* 39 */ + int (*tclBN_mp_sqr) (mp_int* a, mp_int* b); /* 40 */ + int (*tclBN_mp_sqrt) (mp_int* a, mp_int* b); /* 41 */ + int (*tclBN_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 42 */ + int (*tclBN_mp_sub_d) (mp_int* a, mp_digit b, mp_int* c); /* 43 */ + int (*tclBN_mp_to_unsigned_bin) (mp_int* a, unsigned char* b); /* 44 */ + int (*tclBN_mp_to_unsigned_bin_n) (mp_int* a, unsigned char* b, unsigned long* outlen); /* 45 */ + int (*tclBN_mp_toradix_n) (mp_int* a, char* str, int radix, int maxlen); /* 46 */ + int (*tclBN_mp_unsigned_bin_size) (mp_int* a); /* 47 */ + int (*tclBN_mp_xor) (mp_int* a, mp_int* b, mp_int* c); /* 48 */ + void (*tclBN_mp_zero) (mp_int* a); /* 49 */ + void (*tclBN_reverse) (unsigned char* s, int len); /* 50 */ + int (*tclBN_fast_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 51 */ + int (*tclBN_fast_s_mp_sqr) (mp_int* a, mp_int* b); /* 52 */ + int (*tclBN_mp_karatsuba_mul) (mp_int* a, mp_int* b, mp_int* c); /* 53 */ + int (*tclBN_mp_karatsuba_sqr) (mp_int* a, mp_int* b); /* 54 */ + int (*tclBN_mp_toom_mul) (mp_int* a, mp_int* b, mp_int* c); /* 55 */ + int (*tclBN_mp_toom_sqr) (mp_int* a, mp_int* b); /* 56 */ + int (*tclBN_s_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 57 */ + int (*tclBN_s_mp_mul_digs) (mp_int* a, mp_int* b, mp_int* c, int digs); /* 58 */ + int (*tclBN_s_mp_sqr) (mp_int* a, mp_int* b); /* 59 */ + int (*tclBN_s_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 60 */ +} TclTomMathStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern CONST TclTomMathStubs *tclTomMathStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef TclBN_epoch +#define TclBN_epoch \ + (tclTomMathStubsPtr->tclBN_epoch) /* 0 */ +#endif +#ifndef TclBN_revision +#define TclBN_revision \ + (tclTomMathStubsPtr->tclBN_revision) /* 1 */ +#endif +#ifndef TclBN_mp_add +#define TclBN_mp_add \ + (tclTomMathStubsPtr->tclBN_mp_add) /* 2 */ +#endif +#ifndef TclBN_mp_add_d +#define TclBN_mp_add_d \ + (tclTomMathStubsPtr->tclBN_mp_add_d) /* 3 */ +#endif +#ifndef TclBN_mp_and +#define TclBN_mp_and \ + (tclTomMathStubsPtr->tclBN_mp_and) /* 4 */ +#endif +#ifndef TclBN_mp_clamp +#define TclBN_mp_clamp \ + (tclTomMathStubsPtr->tclBN_mp_clamp) /* 5 */ +#endif +#ifndef TclBN_mp_clear +#define TclBN_mp_clear \ + (tclTomMathStubsPtr->tclBN_mp_clear) /* 6 */ +#endif +#ifndef TclBN_mp_clear_multi +#define TclBN_mp_clear_multi \ + (tclTomMathStubsPtr->tclBN_mp_clear_multi) /* 7 */ +#endif +#ifndef TclBN_mp_cmp +#define TclBN_mp_cmp \ + (tclTomMathStubsPtr->tclBN_mp_cmp) /* 8 */ +#endif +#ifndef TclBN_mp_cmp_d +#define TclBN_mp_cmp_d \ + (tclTomMathStubsPtr->tclBN_mp_cmp_d) /* 9 */ +#endif +#ifndef TclBN_mp_cmp_mag +#define TclBN_mp_cmp_mag \ + (tclTomMathStubsPtr->tclBN_mp_cmp_mag) /* 10 */ +#endif +#ifndef TclBN_mp_copy +#define TclBN_mp_copy \ + (tclTomMathStubsPtr->tclBN_mp_copy) /* 11 */ +#endif +#ifndef TclBN_mp_count_bits +#define TclBN_mp_count_bits \ + (tclTomMathStubsPtr->tclBN_mp_count_bits) /* 12 */ +#endif +#ifndef TclBN_mp_div +#define TclBN_mp_div \ + (tclTomMathStubsPtr->tclBN_mp_div) /* 13 */ +#endif +#ifndef TclBN_mp_div_d +#define TclBN_mp_div_d \ + (tclTomMathStubsPtr->tclBN_mp_div_d) /* 14 */ +#endif +#ifndef TclBN_mp_div_2 +#define TclBN_mp_div_2 \ + (tclTomMathStubsPtr->tclBN_mp_div_2) /* 15 */ +#endif +#ifndef TclBN_mp_div_2d +#define TclBN_mp_div_2d \ + (tclTomMathStubsPtr->tclBN_mp_div_2d) /* 16 */ +#endif +#ifndef TclBN_mp_div_3 +#define TclBN_mp_div_3 \ + (tclTomMathStubsPtr->tclBN_mp_div_3) /* 17 */ +#endif +#ifndef TclBN_mp_exch +#define TclBN_mp_exch \ + (tclTomMathStubsPtr->tclBN_mp_exch) /* 18 */ +#endif +#ifndef TclBN_mp_expt_d +#define TclBN_mp_expt_d \ + (tclTomMathStubsPtr->tclBN_mp_expt_d) /* 19 */ +#endif +#ifndef TclBN_mp_grow +#define TclBN_mp_grow \ + (tclTomMathStubsPtr->tclBN_mp_grow) /* 20 */ +#endif +#ifndef TclBN_mp_init +#define TclBN_mp_init \ + (tclTomMathStubsPtr->tclBN_mp_init) /* 21 */ +#endif +#ifndef TclBN_mp_init_copy +#define TclBN_mp_init_copy \ + (tclTomMathStubsPtr->tclBN_mp_init_copy) /* 22 */ +#endif +#ifndef TclBN_mp_init_multi +#define TclBN_mp_init_multi \ + (tclTomMathStubsPtr->tclBN_mp_init_multi) /* 23 */ +#endif +#ifndef TclBN_mp_init_set +#define TclBN_mp_init_set \ + (tclTomMathStubsPtr->tclBN_mp_init_set) /* 24 */ +#endif +#ifndef TclBN_mp_init_size +#define TclBN_mp_init_size \ + (tclTomMathStubsPtr->tclBN_mp_init_size) /* 25 */ +#endif +#ifndef TclBN_mp_lshd +#define TclBN_mp_lshd \ + (tclTomMathStubsPtr->tclBN_mp_lshd) /* 26 */ +#endif +#ifndef TclBN_mp_mod +#define TclBN_mp_mod \ + (tclTomMathStubsPtr->tclBN_mp_mod) /* 27 */ +#endif +#ifndef TclBN_mp_mod_2d +#define TclBN_mp_mod_2d \ + (tclTomMathStubsPtr->tclBN_mp_mod_2d) /* 28 */ +#endif +#ifndef TclBN_mp_mul +#define TclBN_mp_mul \ + (tclTomMathStubsPtr->tclBN_mp_mul) /* 29 */ +#endif +#ifndef TclBN_mp_mul_d +#define TclBN_mp_mul_d \ + (tclTomMathStubsPtr->tclBN_mp_mul_d) /* 30 */ +#endif +#ifndef TclBN_mp_mul_2 +#define TclBN_mp_mul_2 \ + (tclTomMathStubsPtr->tclBN_mp_mul_2) /* 31 */ +#endif +#ifndef TclBN_mp_mul_2d +#define TclBN_mp_mul_2d \ + (tclTomMathStubsPtr->tclBN_mp_mul_2d) /* 32 */ +#endif +#ifndef TclBN_mp_neg +#define TclBN_mp_neg \ + (tclTomMathStubsPtr->tclBN_mp_neg) /* 33 */ +#endif +#ifndef TclBN_mp_or +#define TclBN_mp_or \ + (tclTomMathStubsPtr->tclBN_mp_or) /* 34 */ +#endif +#ifndef TclBN_mp_radix_size +#define TclBN_mp_radix_size \ + (tclTomMathStubsPtr->tclBN_mp_radix_size) /* 35 */ +#endif +#ifndef TclBN_mp_read_radix +#define TclBN_mp_read_radix \ + (tclTomMathStubsPtr->tclBN_mp_read_radix) /* 36 */ +#endif +#ifndef TclBN_mp_rshd +#define TclBN_mp_rshd \ + (tclTomMathStubsPtr->tclBN_mp_rshd) /* 37 */ +#endif +#ifndef TclBN_mp_shrink +#define TclBN_mp_shrink \ + (tclTomMathStubsPtr->tclBN_mp_shrink) /* 38 */ +#endif +#ifndef TclBN_mp_set +#define TclBN_mp_set \ + (tclTomMathStubsPtr->tclBN_mp_set) /* 39 */ +#endif +#ifndef TclBN_mp_sqr +#define TclBN_mp_sqr \ + (tclTomMathStubsPtr->tclBN_mp_sqr) /* 40 */ +#endif +#ifndef TclBN_mp_sqrt +#define TclBN_mp_sqrt \ + (tclTomMathStubsPtr->tclBN_mp_sqrt) /* 41 */ +#endif +#ifndef TclBN_mp_sub +#define TclBN_mp_sub \ + (tclTomMathStubsPtr->tclBN_mp_sub) /* 42 */ +#endif +#ifndef TclBN_mp_sub_d +#define TclBN_mp_sub_d \ + (tclTomMathStubsPtr->tclBN_mp_sub_d) /* 43 */ +#endif +#ifndef TclBN_mp_to_unsigned_bin +#define TclBN_mp_to_unsigned_bin \ + (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin) /* 44 */ +#endif +#ifndef TclBN_mp_to_unsigned_bin_n +#define TclBN_mp_to_unsigned_bin_n \ + (tclTomMathStubsPtr->tclBN_mp_to_unsigned_bin_n) /* 45 */ +#endif +#ifndef TclBN_mp_toradix_n +#define TclBN_mp_toradix_n \ + (tclTomMathStubsPtr->tclBN_mp_toradix_n) /* 46 */ +#endif +#ifndef TclBN_mp_unsigned_bin_size +#define TclBN_mp_unsigned_bin_size \ + (tclTomMathStubsPtr->tclBN_mp_unsigned_bin_size) /* 47 */ +#endif +#ifndef TclBN_mp_xor +#define TclBN_mp_xor \ + (tclTomMathStubsPtr->tclBN_mp_xor) /* 48 */ +#endif +#ifndef TclBN_mp_zero +#define TclBN_mp_zero \ + (tclTomMathStubsPtr->tclBN_mp_zero) /* 49 */ +#endif +#ifndef TclBN_reverse +#define TclBN_reverse \ + (tclTomMathStubsPtr->tclBN_reverse) /* 50 */ +#endif +#ifndef TclBN_fast_s_mp_mul_digs +#define TclBN_fast_s_mp_mul_digs \ + (tclTomMathStubsPtr->tclBN_fast_s_mp_mul_digs) /* 51 */ +#endif +#ifndef TclBN_fast_s_mp_sqr +#define TclBN_fast_s_mp_sqr \ + (tclTomMathStubsPtr->tclBN_fast_s_mp_sqr) /* 52 */ +#endif +#ifndef TclBN_mp_karatsuba_mul +#define TclBN_mp_karatsuba_mul \ + (tclTomMathStubsPtr->tclBN_mp_karatsuba_mul) /* 53 */ +#endif +#ifndef TclBN_mp_karatsuba_sqr +#define TclBN_mp_karatsuba_sqr \ + (tclTomMathStubsPtr->tclBN_mp_karatsuba_sqr) /* 54 */ +#endif +#ifndef TclBN_mp_toom_mul +#define TclBN_mp_toom_mul \ + (tclTomMathStubsPtr->tclBN_mp_toom_mul) /* 55 */ +#endif +#ifndef TclBN_mp_toom_sqr +#define TclBN_mp_toom_sqr \ + (tclTomMathStubsPtr->tclBN_mp_toom_sqr) /* 56 */ +#endif +#ifndef TclBN_s_mp_add +#define TclBN_s_mp_add \ + (tclTomMathStubsPtr->tclBN_s_mp_add) /* 57 */ +#endif +#ifndef TclBN_s_mp_mul_digs +#define TclBN_s_mp_mul_digs \ + (tclTomMathStubsPtr->tclBN_s_mp_mul_digs) /* 58 */ +#endif +#ifndef TclBN_s_mp_sqr +#define TclBN_s_mp_sqr \ + (tclTomMathStubsPtr->tclBN_s_mp_sqr) /* 59 */ +#endif +#ifndef TclBN_s_mp_sub +#define TclBN_s_mp_sub \ + (tclTomMathStubsPtr->tclBN_s_mp_sub) /* 60 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLINTDECLS */ -- cgit v0.12 From c7c37e1d88e15726e56e7455fd6435d4b4548c5b Mon Sep 17 00:00:00 2001 From: das Date: Tue, 22 Jul 2008 23:05:31 +0000 Subject: fix TclNRInterpProc stub table declaration (broke 'make checkstubs') --- generic/tclInt.decls | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index f5be70a..3e02cd7 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.124 2008/07/13 09:03:33 msofer Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.125 2008/07/22 23:05:31 das Exp $ library tcl @@ -947,7 +947,8 @@ declare 238 generic { struct TEOV_record *rootPtr) } declare 239 generic { - Tcl_ObjCmdProc TclNRInterpProc + int TclNRInterpProc(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]) } declare 240 generic { int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj, -- cgit v0.12 From a4c31dcffa6781cf45a97ec8ea576c9b0b914c04 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 22 Jul 2008 23:06:25 +0000 Subject: make genstubs --- generic/tclIntDecls.h | 13 +++++++++---- generic/tclStubInit.c | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 1190867..f79728e 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.120 2008/07/22 23:01:36 das Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.121 2008/07/22 23:06:25 das Exp $ */ #ifndef _TCLINTDECLS @@ -1082,8 +1082,13 @@ EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); #endif +#ifndef TclNRInterpProc_TCL_DECLARED +#define TclNRInterpProc_TCL_DECLARED /* 239 */ -EXTERN Tcl_ObjCmdProc TclNRInterpProc; +EXTERN int TclNRInterpProc (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[]); +#endif #ifndef TclNRInterpProcCore_TCL_DECLARED #define TclNRInterpProcCore_TCL_DECLARED /* 240 */ @@ -1376,7 +1381,7 @@ typedef struct TclIntStubs { void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ - Tcl_ObjCmdProc *tclNRInterpProc; /* 239 */ + int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 239 */ int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ @@ -2132,7 +2137,7 @@ extern CONST TclIntStubs *tclIntStubsPtr; #endif #ifndef TclNRInterpProc #define TclNRInterpProc \ - (*tclIntStubsPtr->tclNRInterpProc) /* 239 */ + (tclIntStubsPtr->tclNRInterpProc) /* 239 */ #endif #ifndef TclNRInterpProcCore #define TclNRInterpProcCore \ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 6473d74..76c0e15 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.160 2008/07/22 23:01:43 das Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.161 2008/07/22 23:06:25 das Exp $ */ #include "tclInt.h" @@ -308,7 +308,7 @@ static const TclIntStubs tclIntStubs = { TclBackgroundException, /* 236 */ TclResetCancellation, /* 237 */ TclEvalObjv_NR2, /* 238 */ - &TclNRInterpProc, /* 239 */ + TclNRInterpProc, /* 239 */ TclNRInterpProcCore, /* 240 */ TclNRPushRecord, /* 241 */ TclNRPopAndFreeRecord, /* 242 */ -- cgit v0.12 From 16253514a3a86502bec2e5b592f4c0789641535d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 23 Jul 2008 13:38:21 +0000 Subject: * generic/tclBasic.c (GetCommandSource): added comment with explanation and warning for waintainers. --- ChangeLog | 5 +++++ generic/tclBasic.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 22704ce..a5a8a89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-23 Miguel Sofer + + * generic/tclBasic.c (GetCommandSource): added comment with + explanation and warning for waintainers. + 2008-07-22 Andreas Kupries * generic/tclCompile.c: Made the new TclEnterCmdWordIndex diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0e77315..1730097 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.328 2008/07/22 22:46:46 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.329 2008/07/23 13:38:22 msofer Exp $ */ #include "tclInt.h" @@ -3160,6 +3160,14 @@ CancelEvalProc(clientData, interp, code) * command. This insures that traces get a correct NUL-terminated command * string. The Tcl_Obj has refCount==1. * + * *** MAINTAINER WARNING *** + * The returned Tcl_Obj is all wrong for any purpose but getting the + * source string for an objc/objv command line in the stringRep (no + * stringRep if no source is available) and the corresponding substituted + * version in the List intrep. + * This means that the intRep and stringRep DO NOT COINCIDE! Using these + * Tcl_Objs normally is likely to break things. + * *---------------------------------------------------------------------- */ -- cgit v0.12 From a0900a49110c0eaf5ed791ee35c70b800d3d52ec Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 23 Jul 2008 20:49:50 +0000 Subject: * generic/tclBasic.c: Modified TclArgumentGet to reject pure lists * generic/tclCmdIL.c: immediately, without search. Reworked setup * generic/tclCompile.c: of eoFramePtr, doesn't need the line * tests/info.test: information, more sensible to have everything on line 1 when eval'ing a pure list. Updated the users of the line information to special case this based on the frame type (i.e. TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new behaviour. --- ChangeLog | 11 +++++++++++ generic/tclBasic.c | 47 ++++++++++++++++++++++++----------------------- generic/tclCmdIL.c | 4 ++-- generic/tclCompile.c | 8 +++++--- tests/info.test | 28 +++++++++++++++++++++++++++- 5 files changed, 69 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5a8a89..6ab9250 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-07-23 Andreas Kupries + + * generic/tclBasic.c: Modified TclArgumentGet to reject pure lists + * generic/tclCmdIL.c: immediately, without search. Reworked setup + * generic/tclCompile.c: of eoFramePtr, doesn't need the line + * tests/info.test: information, more sensible to have everything + on line 1 when eval'ing a pure list. Updated the users of the line + information to special case this based on the frame type (i.e. + TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new + behaviour. + 2008-07-23 Miguel Sofer * generic/tclBasic.c (GetCommandSource): added comment with diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1730097..da81e9c 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.329 2008/07/23 13:38:22 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.330 2008/07/23 20:49:50 andreas_kupries Exp $ */ #include "tclInt.h" @@ -5534,6 +5534,18 @@ TclArgumentGet( CmdFrame *framePtr; /* + * An object which either has no string rep or else is a canonical list is + * guaranteed to have been generated dynamically: bail out, this cannot + * have a usable absolute location. _Do not touch_ the information the set + * up by the caller. It knows better than us. + */ + + if ((!obj->bytes) || ((obj->typePtr == &tclListType) && + ((List *)obj->internalRep.twoPtrValue.ptr1)->canonicalFlag)) { + return; + } + + /* * First look for location information recorded in the argument * stack. That is nearest. */ @@ -5745,18 +5757,11 @@ TclNREvalObjEx( * dynamic execution we ignore the invoker, even if known. */ - int line, i, nline; - char *w; - Tcl_Obj **elements, *copyPtr = TclListObjCopy(NULL, objPtr); CmdFrame *eoFramePtr; - Tcl_ListObjGetElements(NULL, copyPtr, - &nline, &elements); - - eoFramePtr = (CmdFrame *) TclStackAlloc(interp, - sizeof(CmdFrame) + nline * sizeof(int)); - eoFramePtr->nline = nline; - eoFramePtr->line = (int *) (eoFramePtr + 1); + eoFramePtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); + eoFramePtr->nline = 0; + eoFramePtr->line = NULL; eoFramePtr->type = TCL_LOCATION_EVAL_LIST; eoFramePtr->level = (iPtr->cmdFramePtr == NULL? @@ -5769,21 +5774,19 @@ TclNREvalObjEx( eoFramePtr->data.eval.path = NULL; /* - * TIP #280 Computes all the line numbers for the words in the - * command. + * TIP #280. We do _not_ compute all the line numbers for the + * words in the command. For the eval of a pure list the most + * sensible choice is to put all words on line 1. Given that we + * neither need memory for them nor compute anything. 'line' is + * left NULL. The two places using this information (TclInfoFrame, + * and TclInitCompileEnv), are special-cased to use the proper + * line number directly instead of accessing the 'line' array. */ - line = 1; - for (i=0; i < eoFramePtr->nline; i++) { - eoFramePtr->line[i] = line; - w = TclGetString(elements[i]); - TclAdvanceLines(&line, w, w + strlen(w)); - } - iPtr->cmdFramePtr = eoFramePtr; TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, - copyPtr, NULL); + NULL, NULL); return Tcl_NREvalObj(interp, objPtr, flags); } } @@ -5952,7 +5955,6 @@ TEOEx_ListCallback( Interp *iPtr = (Interp *) interp; Tcl_Obj *objPtr = data[0]; CmdFrame *eoFramePtr = data[1]; - Tcl_Obj *copyPtr = data[2]; /* * Remove the cmdFrame @@ -5960,7 +5962,6 @@ TEOEx_ListCallback( iPtr->cmdFramePtr = eoFramePtr->nextPtr; TclStackFree(interp, eoFramePtr); - Tcl_DecrRefCount(copyPtr); TclDecrRefCount(objPtr); return result; diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 9c668c2..ab324de 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.145 2008/07/21 22:22:27 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.146 2008/07/23 20:49:52 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1159,7 +1159,7 @@ TclInfoFrame( */ ADD_PAIR("type", Tcl_NewStringObj(typeString[framePtr->type], -1)); - ADD_PAIR("line", Tcl_NewIntObj(framePtr->line[0])); + ADD_PAIR("line", Tcl_NewIntObj(1)); /* * We put a duplicate of the command list obj into the result to diff --git a/generic/tclCompile.c b/generic/tclCompile.c index c754ef1..f484d7b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.152 2008/07/22 22:24:21 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.153 2008/07/23 20:49:52 andreas_kupries Exp $ */ #include "tclInt.h" @@ -914,9 +914,11 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->neiloc = 0; envPtr->extCmdMapPtr->nueiloc = 0; - if (invoker == NULL) { + if ((invoker == NULL) || + (invoker->type == TCL_LOCATION_EVAL_LIST)) { /* - * Initialize the compiler for relative counting. + * Initialize the compiler for relative counting in case of a + * dynamic context. */ envPtr->line = 1; diff --git a/tests/info.test b/tests/info.test index 43fc794..7fd9ec1 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.51 2008/07/21 22:50:36 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.52 2008/07/23 20:49:52 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1301,6 +1301,32 @@ namespace delete foo # ------------------------------------------------------------------------- +test info-34.0 {eval pure list, single line} { + # Basically, counting the newline in the word seen through $foo + # doesn't really make sense. It makes a bit of sense if the word + # would have been a string literal in the command list. + # + # Problem: At the point where we see the list elements we cannot + # distinguish the two cases, thus we cannot switch between + # count/not-count, it is has to be one or the other for all + # cases. Of the two possibilities miguel convinced me that 'not + # counting' is the more proper. + set foo {b + c} + set cmd [list foreach $foo {x y} { + set res [join [lrange [etrace] 0 2] \n] + break + }] + eval $cmd + set res +} {10 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +9 {type eval line 2 cmd etrace proc ::tcltest::RunTest} +8 {type eval line 1 cmd foreac proc ::tcltest::RunTest}} + +# ------------------------------------------------------------------------- + +# ------------------------------------------------------------------------- + # cleanup catch {namespace delete test_ns_info1 test_ns_info2} ::tcltest::cleanupTests -- cgit v0.12 From c4bf898f7977057eb1cf4c6155fbe222cc970726 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 23 Jul 2008 21:07:45 +0000 Subject: Rename new test to avoid duplicate test name. --- tests/info.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/info.test b/tests/info.test index 7fd9ec1..b1f6a40 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.52 2008/07/23 20:49:52 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.53 2008/07/23 21:07:45 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1301,7 +1301,7 @@ namespace delete foo # ------------------------------------------------------------------------- -test info-34.0 {eval pure list, single line} { +test info-37.0 {eval pure list, single line} { # Basically, counting the newline in the word seen through $foo # doesn't really make sense. It makes a bit of sense if the word # would have been a string literal in the command list. -- cgit v0.12 From af2edfcf503b8fbedd006c9df5e2e4c04ff4c7e5 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 23 Jul 2008 21:43:22 +0000 Subject: * tests/info.test: Reordered the tests to have monotonously increasing numbers. --- ChangeLog | 3 + tests/info.test | 308 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 157 insertions(+), 154 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ab9250..7fe6b8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-23 Andreas Kupries + * tests/info.test: Reordered the tests to have monotonously + increasing numbers. + * generic/tclBasic.c: Modified TclArgumentGet to reject pure lists * generic/tclCmdIL.c: immediately, without search. Reworked setup * generic/tclCompile.c: of eoFramePtr, doesn't need the line diff --git a/tests/info.test b/tests/info.test index b1f6a40..a50ba84 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.53 2008/07/23 21:07:45 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.54 2008/07/23 21:43:23 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -904,20 +904,110 @@ test info-24.5 {info frame, interaction, for} -body { # ------------------------------------------------------------------------- +namespace eval foo {} +set x foo +switch -exact -- $x { + foo { + proc ::foo::bar {} {info frame 0} + } +} + +test info-24.6.0 {info frame, interaction, switch, list body} -body { + reduce [foo::bar] +} -cleanup { + namespace delete foo + unset x +} -result {type source line 911 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- + +namespace eval foo {} +set x foo +switch -exact -- $x foo { + proc ::foo::bar {} {info frame 0} +} + +test info-24.6.1 {info frame, interaction, switch, multi-body} -body { + reduce [foo::bar] +} -cleanup { + namespace delete foo + unset x +} -result {type source line 927 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- + +namespace eval foo {} +set x foo +switch -exact -- $x [list foo { + proc ::foo::bar {} {info frame 0} +}] + +test info-24.6.2 {info frame, interaction, switch, list body, dynamic} -body { + reduce [foo::bar] +} -cleanup { + namespace delete foo + unset x +} -result {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- + +namespace eval foo {} +dict for {k v} {foo bar} { + proc ::foo::bar {} {info frame 0} +} + +test info-24.7 {info frame, interaction, dict for} { + reduce [foo::bar] +} {type source line 956 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +namespace delete foo + +# ------------------------------------------------------------------------- + +namespace eval foo {} +set thedict {foo bar} +dict with thedict { + proc ::foo::bar {} {info frame 0} +} + +test info-24.8 {info frame, interaction, dict with} { + reduce [foo::bar] +} {type source line 970 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +namespace delete foo +unset thedict + +# ------------------------------------------------------------------------- + +namespace eval foo {} +dict filter {foo bar} script {k v} { + proc ::foo::bar {} {info frame 0} + set x 1 +} + +test info-24.9 {info frame, interaction, dict filter} { + reduce [foo::bar] +} {type source line 984 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +namespace delete foo +unset x + +# ------------------------------------------------------------------------- + eval { proc bar {} {info frame 0} } test info-25.0 {info frame, proc in eval} { reduce [bar] -} {type source line 908 file info.test cmd {info frame 0} proc ::bar level 0} +} {type source line 998 file info.test cmd {info frame 0} proc ::bar level 0} # Don't need to clean up yet... proc bar {} {info frame 0} test info-25.1 {info frame, regular proc} { reduce [bar] -} {type source line 916 file info.test cmd {info frame 0} proc ::bar level 0} +} {type source line 1006 file info.test cmd {info frame 0} proc ::bar level 0} rename bar {} @@ -986,53 +1076,6 @@ test info-31.6 {eval, script in variable} { # ------------------------------------------------------------------------- -namespace eval foo {} -set x foo -switch -exact -- $x { - foo { - proc ::foo::bar {} {info frame 0} - } -} - -test info-24.6.0 {info frame, interaction, switch, list body} -body { - reduce [foo::bar] -} -cleanup { - namespace delete foo - unset x -} -result {type source line 993 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -# ------------------------------------------------------------------------- - -namespace eval foo {} -set x foo -switch -exact -- $x foo { - proc ::foo::bar {} {info frame 0} -} - -test info-24.6.1 {info frame, interaction, switch, multi-body} -body { - reduce [foo::bar] -} -cleanup { - namespace delete foo - unset x -} -result {type source line 1009 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -# ------------------------------------------------------------------------- - -namespace eval foo {} -set x foo -switch -exact -- $x [list foo { - proc ::foo::bar {} {info frame 0} -}] - -test info-24.6.2 {info frame, interaction, switch, list body, dynamic} -body { - reduce [foo::bar] -} -cleanup { - namespace delete foo - unset x -} -result {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0} - -# ------------------------------------------------------------------------- - set body { foo { proc ::foo::bar {} {info frame 0} @@ -1076,7 +1119,7 @@ test info-33.0 {{*}, literal, direct} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 1073 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1116 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -1092,7 +1135,59 @@ test info-33.1 {{*}, literal, simple, bytecompiled} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 1088 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1131 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- + +namespace {*}" + eval + foo + {proc bar {} {info frame 0}} +" +test info-33.2 {{*}, literal, direct} { + reduce [foo::bar] +} {type source line 1145 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +namespace delete foo + +# ------------------------------------------------------------------------- + +namespace {*}"eval\nfoo\n{proc bar {} {info frame 0}}\n" + +test info-33.2a {{*}, literal, not simple, direct} { + reduce [foo::bar] +} {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0} + +namespace delete foo + +# ------------------------------------------------------------------------- + +namespace eval foo {} +proc foo::bar {} { + set flag 1 + if {*}" + {1} + {info frame 0} + " +} +test info-33.3 {{*}, literal, simple, bytecompiled} { + reduce [foo::bar] +} {type source line 1170 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +namespace delete foo + +# ------------------------------------------------------------------------- + +namespace eval foo {} +proc foo::bar {} { + set flag 1 + if {*}"\n{1}\n{info frame 0}" +} +test info-33.3a {{*}, literal, not simple, bytecompiled} { + reduce [foo::bar] +} {type eval line 1 cmd {info frame 0} proc ::foo::bar level 0} + +namespace delete foo # ------------------------------------------------------------------------- @@ -1139,7 +1234,7 @@ proc foo {} { } test info-35.0 {apply, literal} { reduce [foo] -} {type source line 1137 file info.test cmd {info frame 0} lambda { +} {type source line 1232 file info.test cmd {info frame 0} lambda { {x y} {info frame 0} } level 0} @@ -1160,58 +1255,15 @@ unset lambda # ------------------------------------------------------------------------- namespace eval foo {} -dict for {k v} {foo bar} { - proc ::foo::bar {} {info frame 0} -} - -test info-24.7 {info frame, interaction, dict for} { - reduce [foo::bar] -} {type source line 1164 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -namespace delete foo - -# ------------------------------------------------------------------------- - -namespace eval foo {} -set thedict {foo bar} -dict with thedict { - proc ::foo::bar {} {info frame 0} -} - -test info-24.8 {info frame, interaction, dict with} { - reduce [foo::bar] -} {type source line 1178 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -namespace delete foo -unset thedict - -# ------------------------------------------------------------------------- - -namespace eval foo {} -dict filter {foo bar} script {k v} { - proc ::foo::bar {} {info frame 0} - set x 1 -} - -test info-24.9 {info frame, interaction, dict filter} { - reduce [foo::bar] -} {type source line 1192 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -namespace delete foo -unset x - -# ------------------------------------------------------------------------- - -namespace eval foo {} proc foo::bar {} { dict for {k v} {foo bar} { set x [info frame 0] } set x } -test info-36.0 {info frame, dict for, bcc} { +test info-36.0 {info frame, dict for, bcc} -body { reduce [foo::bar] -} {type source line 1208 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1260 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -1226,9 +1278,9 @@ proc foo::bar {} { set y } -test info-36.1.0 {switch, list literal, bcc} { +test info-36.1.0 {switch, list literal, bcc} -body { reduce [foo::bar] -} {type source line 1224 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1276 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -1241,61 +1293,9 @@ proc foo::bar {} { set y } -test info-36.1.1 {switch, multi-body literals, bcc} { +test info-36.1.1 {switch, multi-body literals, bcc} -body { reduce [foo::bar] -} {type source line 1240 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -namespace delete foo - -# ------------------------------------------------------------------------- - -namespace {*}" - eval - foo - {proc bar {} {info frame 0}} -" -test info-33.2 {{*}, literal, direct} { - reduce [foo::bar] -} {type source line 1255 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -namespace delete foo - -# ------------------------------------------------------------------------- - -namespace {*}"eval\nfoo\n{proc bar {} {info frame 0}}\n" - -test info-33.2a {{*}, literal, not simple, direct} { - reduce [foo::bar] -} {type proc line 1 cmd {info frame 0} proc ::foo::bar level 0} - -namespace delete foo - -# ------------------------------------------------------------------------- - -namespace eval foo {} -proc foo::bar {} { - set flag 1 - if {*}" - {1} - {info frame 0} - " -} -test info-33.3 {{*}, literal, simple, bytecompiled} { - reduce [foo::bar] -} {type source line 1280 file info.test cmd {info frame 0} proc ::foo::bar level 0} - -namespace delete foo - -# ------------------------------------------------------------------------- - -namespace eval foo {} -proc foo::bar {} { - set flag 1 - if {*}"\n{1}\n{info frame 0}" -} -test info-33.3a {{*}, literal, not simple, bytecompiled} { - reduce [foo::bar] -} {type eval line 1 cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1292 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo -- cgit v0.12 From 4f9bbccc00c295f21e8675079ffa2664f4d2c41d Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 23 Jul 2008 22:50:32 +0000 Subject: Added relative speed test for lrange, checking fro in-place optimization. --- ChangeLog | 5 +++++ tests/lrange.test | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fe6b8b..2b129a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-23 Alexandre Ferrieux + + * tests/lrange.test: Added relative speed test to check for lrange + in-place optimization committed 2008-06-30. + 2008-07-23 Andreas Kupries * tests/info.test: Reordered the tests to have monotonously diff --git a/tests/lrange.test b/tests/lrange.test index 29eafb9..443d8c9 100644 --- a/tests/lrange.test +++ b/tests/lrange.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lrange.test,v 1.9 2005/05/10 18:35:22 kennykb Exp $ +# RCS: @(#) $Id: lrange.test,v 1.10 2008/07/23 22:50:42 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -66,7 +66,12 @@ test lrange-1.15 {range of list elements} { test lrange-1.16 {list element quoting} { lrange {[append a .b]} 0 end } {{[append} a .b\]} - +test lrange-1.17 {lrange in-place speed} { + set l [lrepeat 1000000 1] + set t1 [lindex [time {set l [lrange $l 0 end-1]}] 0] + set t2 [lindex [time {set l [lrange $l[unset l] 0 end-1]}] 0] + expr {($t1/$t2)>100} +} 1 test lrange-2.1 {error conditions} { list [catch {lrange a b} msg] $msg } {1 {wrong # args: should be "lrange list first last"}} -- cgit v0.12 From 7b1a1c06d6d6cdf4035ef5b35802f85862b27088 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 23 Jul 2008 23:19:31 +0000 Subject: Added relative speed test for pure byte array concats. --- ChangeLog | 4 +++- tests/binary.test | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b129a8..449a1fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ 2008-07-23 Alexandre Ferrieux * tests/lrange.test: Added relative speed test to check for lrange - in-place optimization committed 2008-06-30. + in-place optimization committed 2008-06-30. + * tests/binary.test: Added relative speed test to check for pure + byte array CONCAT1 optimization committed 2008-06-30. 2008-07-23 Andreas Kupries diff --git a/tests/binary.test b/tests/binary.test index 2f71866..7f41559 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.35 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: binary.test,v 1.36 2008/07/23 23:19:33 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -2700,6 +2700,17 @@ test binary-75.23 {binary decode uuencode} -body { list [string length $r] $r } -result {3 abc} +test binary-76.1 {byte array concat speed} -body { + set b1 [binary format H* [string repeat E9 1000000]] + set b2 [binary format H* 41] + set t1 [lindex [time {set z ${b1}${b2}}] 0] + unset z + set b1 [binary format H* [string repeat E9 1000000]] + set b2 [binary format H* 41] + set t2 [lindex [time {set z ${b1}é}] 0] + expr {($t2/$t1)>3} +} -result 1 + # cleanup ::tcltest::cleanupTests return -- cgit v0.12 From 7f55ab2959b7ec3cac71c72171f20aed26c8f016 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 24 Jul 2008 21:54:38 +0000 Subject: CONSTified 4 functions in the Notifier which all have a Tcl_Time* in it which is supposed to be a constant, but this was not reflected in the API: Tcl_SetTimer Tcl_WaitForEvent Tcl_ConditionWait Tcl_SetMaxBlockTime Introduced a CONST86, so extensions which have their own Notifier (are there any?) can be modified to compile against both Tcl 8.5 and Tcl 8.6. This change complies with TIP #24 --- ChangeLog | 19 +++++++++++++++++++ doc/Notifier.3 | 4 ++-- doc/Thread.3 | 4 ++-- generic/tcl.decls | 10 +++++----- generic/tcl.h | 14 ++++++++------ generic/tclDecls.h | 19 ++++++++++--------- generic/tclNotify.c | 4 ++-- generic/tclThread.c | 8 ++++---- macosx/tclMacOSXNotify.c | 6 +++--- unix/tclUnixNotfy.c | 6 +++--- unix/tclUnixThrd.c | 14 +++++++------- win/tclWinNotify.c | 6 +++--- win/tclWinThrd.c | 10 +++++----- 13 files changed, 73 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 449a1fa..77604ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2007-02-24 Jan Nijtmans + + * doc/Notifier.3 CONSTified 4 functions in the + * doc/Thread.3 Notifier which all have a + * generic/tcl.decls Tcl_Time * in it which is supposed + * generic/tcl.h to be a constant, but this was not + * generic/tclDecls.h reflected in the API: + * generic/tclNotify.c Tcl_SetTimer + * generic/tclThread.c Tcl_WaitForEvent + * macosx/tclMacOSXNotify.c Tcl_ConditionWait + * unix/tclUnixNotfy.c Tcl_SetMaxBlockTime + * unix/tclUnixThrd.c Introduced a CONST86, so extensions which + * win/tclWinNotify.c have their own Notifier (are there any?) + * win/tclWinThrd.c can be modified to compile against both + Tcl 8.5 and Tcl 8.6 + tclDecls.h is re-generated with "make genstubs" + This change complies with TIP #24 + ***POTENTIAL INCOMPATIBILITY*** + 2008-07-23 Alexandre Ferrieux * tests/lrange.test: Added relative speed test to check for lrange diff --git a/doc/Notifier.3 b/doc/Notifier.3 index b9d3495..4eddc54 100644 --- a/doc/Notifier.3 +++ b/doc/Notifier.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Notifier.3,v 1.22 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Notifier.3,v 1.23 2008/07/24 21:54:43 nijtmans Exp $ '\" .so man.macros .TH Notifier 3 8.1 Tcl "Tcl Library Procedures" @@ -83,7 +83,7 @@ queues them. .AP ClientData clientData in Arbitrary one-word value to pass to \fIsetupProc\fR, \fIcheckProc\fR, or \fIdeleteProc\fR. -.AP Tcl_Time *timePtr in +.AP "const Tcl_Time" *timePtr in Indicates the maximum amount of time to wait for an event. This is specified as an interval (how long to wait), not an absolute time (when to wakeup). If the pointer passed to \fBTcl_WaitForEvent\fR diff --git a/doc/Thread.3 b/doc/Thread.3 index 73ba742..97e759a 100644 --- a/doc/Thread.3 +++ b/doc/Thread.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Thread.3,v 1.29 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Thread.3,v 1.30 2008/07/24 21:54:43 nijtmans Exp $ '\" .so man.macros .TH Threads 3 "8.1" Tcl "Tcl Library Procedures" @@ -48,7 +48,7 @@ int A condition variable, which must be associated with a mutex lock. .AP Tcl_Mutex *mutexPtr in A mutex lock. -.AP Tcl_Time *timePtr in +.AP "const Tcl_Time" *timePtr in A time limit on the condition wait. NULL to wait forever. Note that a polling value of 0 seconds does not make much sense. .AP Tcl_ThreadDataKey *keyPtr in diff --git a/generic/tcl.decls b/generic/tcl.decls index 60d85fa..f5cc117 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.137 2008/07/21 21:02:15 ferrieux Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.138 2008/07/24 21:54:39 nijtmans Exp $ library tcl @@ -72,13 +72,13 @@ declare 10 unix { void Tcl_DeleteFileHandler(int fd) } declare 11 generic { - void Tcl_SetTimer(Tcl_Time *timePtr) + void Tcl_SetTimer(CONST86 Tcl_Time *timePtr) } declare 12 generic { void Tcl_Sleep(int ms) } declare 13 generic { - int Tcl_WaitForEvent(Tcl_Time *timePtr) + int Tcl_WaitForEvent(CONST86 Tcl_Time *timePtr) } declare 14 generic { int Tcl_AppendAllObjTypes(Tcl_Interp *interp, Tcl_Obj *objPtr) @@ -813,7 +813,7 @@ declare 228 generic { void Tcl_SetErrorCode(Tcl_Interp *interp, ...) } declare 229 generic { - void Tcl_SetMaxBlockTime(Tcl_Time *timePtr) + void Tcl_SetMaxBlockTime(CONST86 Tcl_Time *timePtr) } declare 230 generic { void Tcl_SetPanicProc(Tcl_PanicProc *panicProc) @@ -1119,7 +1119,7 @@ declare 310 generic { } declare 311 generic { void Tcl_ConditionWait(Tcl_Condition *condPtr, Tcl_Mutex *mutexPtr, - Tcl_Time *timePtr) + CONST86 Tcl_Time *timePtr) } declare 312 generic { int Tcl_NumUtfChars(CONST char *src, int length) diff --git a/generic/tcl.h b/generic/tcl.h index ef6d360..6b539ea 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.261 2008/07/18 13:46:43 msofer Exp $ + * RCS: @(#) $Id: tcl.h,v 1.262 2008/07/24 21:54:38 nijtmans Exp $ */ #ifndef _TCL @@ -145,7 +145,7 @@ extern "C" { * * The following TCL_VARARGS* macros are to support old extensions * written for older versions of Tcl where the macros permitted - * support for the varargs.h system as well as stdarg.h . + * support for the varargs.h system as well as stdarg.h . * * New code should just directly be written to use stdarg.h conventions. */ @@ -167,7 +167,7 @@ extern "C" { * Note: when building static but linking dynamically to MSVCRT we must still * correctly decorate the C library imported function. Use CRTIMPORT * for this purpose. _DLL is defined by the compiler when linking to - * MSVCRT. + * MSVCRT. */ #if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec)))) @@ -261,6 +261,8 @@ extern "C" { # endif #endif +#define CONST86 CONST84 + /* * Make sure EXTERN isn't defined elsewhere */ @@ -987,7 +989,7 @@ typedef struct Tcl_DString { * stack for the script in progress to be * completely unwound. * TCL_EVAL_NOERR: Do no exception reporting at all, just return - * as the caller will report. + * as the caller will report. */ #define TCL_NO_EVAL 0x10000 #define TCL_EVAL_GLOBAL 0x20000 @@ -1341,8 +1343,8 @@ typedef struct Tcl_Time { long usec; /* Microseconds. */ } Tcl_Time; -typedef void (Tcl_SetTimerProc) _ANSI_ARGS_((Tcl_Time *timePtr)); -typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((Tcl_Time *timePtr)); +typedef void (Tcl_SetTimerProc) _ANSI_ARGS_((CONST86 Tcl_Time *timePtr)); +typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((CONST86 Tcl_Time *timePtr)); /* * TIP #233 (Virtualized Time) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 53ed4c6..1603726 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.139 2008/07/22 23:01:31 das Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.140 2008/07/24 21:54:39 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -122,7 +122,7 @@ EXTERN void Tcl_DeleteFileHandler (int fd); #ifndef Tcl_SetTimer_TCL_DECLARED #define Tcl_SetTimer_TCL_DECLARED /* 11 */ -EXTERN void Tcl_SetTimer (Tcl_Time * timePtr); +EXTERN void Tcl_SetTimer (CONST86 Tcl_Time * timePtr); #endif #ifndef Tcl_Sleep_TCL_DECLARED #define Tcl_Sleep_TCL_DECLARED @@ -132,7 +132,7 @@ EXTERN void Tcl_Sleep (int ms); #ifndef Tcl_WaitForEvent_TCL_DECLARED #define Tcl_WaitForEvent_TCL_DECLARED /* 13 */ -EXTERN int Tcl_WaitForEvent (Tcl_Time * timePtr); +EXTERN int Tcl_WaitForEvent (CONST86 Tcl_Time * timePtr); #endif #ifndef Tcl_AppendAllObjTypes_TCL_DECLARED #define Tcl_AppendAllObjTypes_TCL_DECLARED @@ -1440,7 +1440,7 @@ EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); #ifndef Tcl_SetMaxBlockTime_TCL_DECLARED #define Tcl_SetMaxBlockTime_TCL_DECLARED /* 229 */ -EXTERN void Tcl_SetMaxBlockTime (Tcl_Time * timePtr); +EXTERN void Tcl_SetMaxBlockTime (CONST86 Tcl_Time * timePtr); #endif #ifndef Tcl_SetPanicProc_TCL_DECLARED #define Tcl_SetPanicProc_TCL_DECLARED @@ -1931,7 +1931,8 @@ EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); #define Tcl_ConditionWait_TCL_DECLARED /* 311 */ EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, - Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); + Tcl_Mutex * mutexPtr, + CONST86 Tcl_Time * timePtr); #endif #ifndef Tcl_NumUtfChars_TCL_DECLARED #define Tcl_NumUtfChars_TCL_DECLARED @@ -3601,9 +3602,9 @@ typedef struct TclStubs { #ifdef MAC_OSX_TCL /* MACOSX */ void (*tcl_DeleteFileHandler) (int fd); /* 10 */ #endif /* MACOSX */ - void (*tcl_SetTimer) (Tcl_Time * timePtr); /* 11 */ + void (*tcl_SetTimer) (CONST86 Tcl_Time * timePtr); /* 11 */ void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (Tcl_Time * timePtr); /* 13 */ + int (*tcl_WaitForEvent) (CONST86 Tcl_Time * timePtr); /* 13 */ int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ @@ -3851,7 +3852,7 @@ typedef struct TclStubs { int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ void (*tcl_SetErrno) (int err); /* 227 */ void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetMaxBlockTime) (CONST86 Tcl_Time * timePtr); /* 229 */ void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ @@ -3933,7 +3934,7 @@ typedef struct TclStubs { void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr); /* 311 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, CONST86 Tcl_Time * timePtr); /* 311 */ int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 0e13379..e6c4d40 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNotify.c,v 1.27 2008/06/13 05:45:14 mistachkin Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.28 2008/07/24 21:54:38 nijtmans Exp $ */ #include "tclInt.h" @@ -794,7 +794,7 @@ Tcl_SetServiceMode( void Tcl_SetMaxBlockTime( - Tcl_Time *timePtr) /* Specifies a maximum elapsed time for the + const Tcl_Time *timePtr) /* Specifies a maximum elapsed time for the * next blocking operation in the event * tsdPtr-> */ { diff --git a/generic/tclThread.c b/generic/tclThread.c index 1a544e3..0feba5b 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThread.c,v 1.20 2008/05/09 04:58:54 georgeps Exp $ + * RCS: @(#) $Id: tclThread.c,v 1.21 2008/07/24 21:54:39 nijtmans Exp $ */ #include "tclInt.h" @@ -125,7 +125,7 @@ Tcl_GetThreadData( void * TclThreadDataKeyGet( Tcl_ThreadDataKey *keyPtr) /* Identifier for the data chunk. */ - + { #ifdef TCL_THREADS return TclThreadStorageKeyGet(keyPtr); @@ -405,7 +405,7 @@ TclFinalizeSynchronization(void) } keyRecord.max = 0; keyRecord.num = 0; - + #ifdef TCL_THREADS /* * Call thread storage master cleanup. @@ -496,7 +496,7 @@ void Tcl_ConditionWait( Tcl_Condition *condPtr, /* Really (pthread_cond_t **) */ Tcl_Mutex *mutexPtr, /* Really (pthread_mutex_t **) */ - Tcl_Time *timePtr) /* Timeout on waiting period */ + const Tcl_Time *timePtr) /* Timeout on waiting period */ { } diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 419cc48..125307e 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.19 2008/04/16 14:29:25 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.20 2008/07/24 21:54:43 nijtmans Exp $ */ #include "tclInt.h" @@ -605,7 +605,7 @@ Tcl_AlertNotifier( void Tcl_SetTimer( - Tcl_Time *timePtr) /* Timeout value, may be NULL. */ + const Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { if (tclNotifierHooks.setTimerProc) { tclNotifierHooks.setTimerProc(timePtr); @@ -903,7 +903,7 @@ FileHandlerEventProc( int Tcl_WaitForEvent( - Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { if (tclNotifierHooks.waitForEventProc) { return tclNotifierHooks.waitForEventProc(timePtr); diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index a763b1d..e285f03 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.35 2008/04/16 14:29:26 das Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.36 2008/07/24 21:54:42 nijtmans Exp $ */ #include "tclInt.h" @@ -371,7 +371,7 @@ Tcl_AlertNotifier( void Tcl_SetTimer( - Tcl_Time *timePtr) /* Timeout value, may be NULL. */ + const Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { if (tclNotifierHooks.setTimerProc) { tclNotifierHooks.setTimerProc(timePtr); @@ -669,7 +669,7 @@ FileHandlerEventProc( int Tcl_WaitForEvent( - Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { if (tclNotifierHooks.waitForEventProc) { return tclNotifierHooks.waitForEventProc(timePtr); diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 63e8733..d122f41 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixThrd.c,v 1.58 2008/05/09 04:58:54 georgeps Exp $ + * RCS: @(#) $Id: tclUnixThrd.c,v 1.59 2008/07/24 21:54:42 nijtmans Exp $ */ #include "tclInt.h" @@ -224,13 +224,13 @@ TclpThreadGetStackSize(void) #if defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && defined(TclpPthreadGetAttrs) pthread_attr_t threadAttr; /* This will hold the thread attributes for * the current thread. */ -#ifdef __GLIBC__ +#ifdef __GLIBC__ /* * Fix for [Bug 1815573] * * DESCRIPTION: * On linux TclpPthreadGetAttrs (which is pthread_attr_get_np) may return - * bogus values on the initial thread. + * bogus values on the initial thread. * * ASSUMPTIONS: * There seems to be no api to determine if we are on the initial @@ -268,7 +268,7 @@ TclpThreadGetStackSize(void) } } - + if (pthread_attr_getstacksize(&threadAttr, &stackSize) != 0) { pthread_attr_destroy(&threadAttr); return (size_t)-1; @@ -279,7 +279,7 @@ TclpThreadGetStackSize(void) /* * On Darwin, the API below does not return the correct stack size for the * main thread (which is not a real pthread), so fallback to getrlimit(). - */ + */ if (!pthread_main_np()) #endif stackSize = pthread_get_stacksize_np(pthread_self()); @@ -617,7 +617,7 @@ void Tcl_ConditionWait( Tcl_Condition *condPtr, /* Really (pthread_cond_t **) */ Tcl_Mutex *mutexPtr, /* Really (pthread_mutex_t **) */ - Tcl_Time *timePtr) /* Timeout on waiting period */ + const Tcl_Time *timePtr) /* Timeout on waiting period */ { pthread_cond_t *pcondPtr; pthread_mutex_t *pmutexPtr; @@ -882,7 +882,7 @@ void TclpThreadDeleteKey(void *keyPtr) { void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) { pthread_key_t *key = tsdKeyPtr; - + if (pthread_setspecific(*key, ptr)) { Tcl_Panic("unable to set master TSD value"); } diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 8d19ba2..436d333 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.23 2008/06/13 05:45:15 mistachkin Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.24 2008/07/24 21:54:43 nijtmans Exp $ */ #include "tclInt.h" @@ -268,7 +268,7 @@ Tcl_AlertNotifier( void Tcl_SetTimer( - Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { if (tclNotifierHooks.setTimerProc) { tclNotifierHooks.setTimerProc(timePtr); @@ -431,7 +431,7 @@ NotifierProc( int Tcl_WaitForEvent( - Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { if (tclNotifierHooks.waitForEventProc) { return tclNotifierHooks.waitForEventProc(timePtr); diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index d9dd0f7..9667d7d 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.47 2008/07/16 23:31:29 georgeps Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.48 2008/07/24 21:54:43 nijtmans Exp $ */ #include "tclWinInt.h" @@ -590,7 +590,7 @@ void Tcl_ConditionWait( Tcl_Condition *condPtr, /* Really (WinCondition **) */ Tcl_Mutex *mutexPtr, /* Really (CRITICAL_SECTION **) */ - Tcl_Time *timePtr) /* Timeout on waiting period */ + const Tcl_Time *timePtr) /* Timeout on waiting period */ { WinCondition *winCondPtr; /* Per-condition queue head */ CRITICAL_SECTION *csPtr; /* Caller's Mutex, after casting */ @@ -967,13 +967,13 @@ void *TclpThreadCreateKey (void) { if (key == NULL) { Tcl_Panic("unable to allocate thread key!"); } - + *key = TlsAlloc(); if (*key == TLS_OUT_OF_INDEXES) { Tcl_Panic("unable to allocate thread-local storage"); } - + return key; } @@ -989,7 +989,7 @@ void TclpThreadDeleteKey(void *keyPtr) { void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) { DWORD *key = tsdKeyPtr; - + if (!TlsSetValue(*key, ptr)) { Tcl_Panic("unable to set master TSD value"); } -- cgit v0.12 From ac5cc6796dae55b9839ed9f82f6a2841b7a4bfa3 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 24 Jul 2008 21:56:17 +0000 Subject: Oops, wrong date --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 77604ee..6b1f188 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2007-02-24 Jan Nijtmans +2007-07-24 Jan Nijtmans * doc/Notifier.3 CONSTified 4 functions in the * doc/Thread.3 Notifier which all have a @@ -79,7 +79,7 @@ * generic/tclProc.c: * tests/info.test: -2007-02-22 Jan Nijtmans +2007-07-21 Jan Nijtmans * generic/*.c: fix [2021443] inconsistant "wrong # args" messages * win/tclWinReg.c -- cgit v0.12 From c6ff6fce1217116410ac5084b505b161f58ab1a4 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 24 Jul 2008 22:57:54 +0000 Subject: just a few const -> CONST (in header files and .decls files) and CONST -> const (.c files and internal .h files) --- generic/tcl.decls | 6 +++--- generic/tclDecls.h | 10 +++++----- generic/tclInt.decls | 10 +++++----- generic/tclInt.h | 16 ++++++++-------- generic/tclIntDecls.h | 18 +++++++++--------- generic/tclInterp.c | 16 ++++++++-------- generic/tclOO.decls | 44 +++++++++++++++++++++---------------------- generic/tclOODecls.h | 48 +++++++++++++++++++++++------------------------ generic/tclOOIntDecls.h | 36 +++++++++++++++++------------------ generic/tclTomMath.decls | 4 ++-- generic/tclTomMathDecls.h | 6 +++--- 11 files changed, 107 insertions(+), 107 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index f5cc117..1b6326d 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.138 2008/07/24 21:54:39 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.139 2008/07/24 22:57:57 nijtmans Exp $ library tcl @@ -1037,7 +1037,7 @@ declare 286 generic { void Tcl_AppendObjToObj(Tcl_Obj *objPtr, Tcl_Obj *appendObjPtr) } declare 287 generic { - Tcl_Encoding Tcl_CreateEncoding(const Tcl_EncodingType *typePtr) + Tcl_Encoding Tcl_CreateEncoding(CONST Tcl_EncodingType *typePtr) } declare 288 generic { void Tcl_CreateThreadExitHandler(Tcl_ExitProc *proc, ClientData clientData) @@ -2137,7 +2137,7 @@ declare 586 generic { declare 587 generic { int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData, int objc, - Tcl_Obj *const objv[]) + Tcl_Obj *CONST objv[]) } # TIP#304 (chan pipe) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 1603726..bb44d58 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.140 2008/07/24 21:54:39 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.141 2008/07/24 22:57:57 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -1791,7 +1791,7 @@ EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, #ifndef Tcl_CreateEncoding_TCL_DECLARED #define Tcl_CreateEncoding_TCL_DECLARED /* 287 */ -EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); +EXTERN Tcl_Encoding Tcl_CreateEncoding (CONST Tcl_EncodingType * typePtr); #endif #ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED #define Tcl_CreateThreadExitHandler_TCL_DECLARED @@ -3555,7 +3555,7 @@ EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, - Tcl_Obj *const objv[]); + Tcl_Obj *CONST objv[]); #endif #ifndef Tcl_CreatePipe_TCL_DECLARED #define Tcl_CreatePipe_TCL_DECLARED @@ -3910,7 +3910,7 @@ typedef struct TclStubs { void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ void *reserved285; void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ - Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ + Tcl_Encoding (*tcl_CreateEncoding) (CONST Tcl_EncodingType * typePtr); /* 287 */ void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ @@ -4210,7 +4210,7 @@ typedef struct TclStubs { int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[]); /* 585 */ void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 587 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); /* 587 */ int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 588 */ } TclStubs; diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 3e02cd7..e1e46d0 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.125 2008/07/22 23:05:31 das Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.126 2008/07/24 22:57:57 nijtmans Exp $ library tcl @@ -915,7 +915,7 @@ declare 231 generic { # Bits and pieces of TIP#280's guts declare 232 generic { int TclEvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, - const CmdFrame *invoker, int word) + CONST CmdFrame *invoker, int word) } declare 233 generic { void TclGetSrcInfoForPc(CmdFrame *contextPtr) @@ -923,7 +923,7 @@ declare 233 generic { # Exports for VarReform compat: Itcl, XOTcl like to peek into our varTables :( declare 234 generic { - Var *TclVarHashCreateVar(TclVarHashTable *tablePtr, const char *key, + Var *TclVarHashCreateVar(TclVarHashTable *tablePtr, CONST char *key, int *newPtr) } declare 235 generic { @@ -948,7 +948,7 @@ declare 238 generic { } declare 239 generic { int TclNRInterpProc(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]) + int objc, Tcl_Obj *CONST objv[]) } declare 240 generic { int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj, @@ -963,7 +963,7 @@ declare 242 generic { declare 243 generic { int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, - const CmdFrame *invoker, int word) + CONST CmdFrame *invoker, int word) } ############################################################################## diff --git a/generic/tclInt.h b/generic/tclInt.h index 7566e24..0587ecf 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.378 2008/07/22 21:41:55 andreas_kupries Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.379 2008/07/24 22:57:55 nijtmans Exp $ */ #ifndef _TCLINT @@ -163,13 +163,13 @@ typedef struct Tcl_ResolvedVarInfo { } Tcl_ResolvedVarInfo; typedef int (Tcl_ResolveCompiledVarProc) (Tcl_Interp *interp, - CONST84 char *name, int length, Tcl_Namespace *context, + const char *name, int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr); -typedef int (Tcl_ResolveVarProc) (Tcl_Interp *interp, CONST84 char *name, +typedef int (Tcl_ResolveVarProc) (Tcl_Interp *interp, const char *name, Tcl_Namespace *context, int flags, Tcl_Var *rPtr); -typedef int (Tcl_ResolveCmdProc) (Tcl_Interp *interp, CONST84 char *name, +typedef int (Tcl_ResolveCmdProc) (Tcl_Interp *interp, const char *name, Tcl_Namespace *context, int flags, Tcl_Command *rPtr); typedef struct Tcl_ResolverInfo { @@ -1335,7 +1335,7 @@ typedef struct ExecEnv { ExecStack *execStackPtr; /* Points to the first item in the * evaluation stack on the heap. */ Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" - * objs. */ + * objs. */ struct TEOV_record *recordPtr; /* Top record in TEOV's stack */ int tebcCall; /* used to distinguish tebc calls from * other calls to TEOV, and other comms @@ -2789,8 +2789,8 @@ MODULE_SCOPE Tcl_Obj * TclDisassembleByteCodeObj(Tcl_Obj *objPtr); MODULE_SCOPE void * TclpThreadCreateKey(void); MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); MODULE_SCOPE void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr); -MODULE_SCOPE void * TclpThreadGetMasterTSD(void *tsdKeyPtr); - +MODULE_SCOPE void * TclpThreadGetMasterTSD(void *tsdKeyPtr); + /* *---------------------------------------------------------------- * Command procedures in the generic core: @@ -4011,7 +4011,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #include "tclTomMathDecls.h" #endif /* _TCLINT */ - + /* * Local Variables: * mode: c diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index f79728e..0ef9eef 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.121 2008/07/22 23:06:25 das Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.122 2008/07/24 22:57:54 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -1045,7 +1045,7 @@ EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, #define TclEvalObjEx_TCL_DECLARED /* 232 */ EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags, const CmdFrame * invoker, + int flags, CONST CmdFrame * invoker, int word); #endif #ifndef TclGetSrcInfoForPc_TCL_DECLARED @@ -1057,7 +1057,7 @@ EXTERN void TclGetSrcInfoForPc (CmdFrame * contextPtr); #define TclVarHashCreateVar_TCL_DECLARED /* 234 */ EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, - const char * key, int * newPtr); + CONST char * key, int * newPtr); #endif #ifndef TclInitVarHashTable_TCL_DECLARED #define TclInitVarHashTable_TCL_DECLARED @@ -1087,7 +1087,7 @@ EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, /* 239 */ EXTERN int TclNRInterpProc (ClientData clientData, Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[]); + Tcl_Obj *CONST objv[]); #endif #ifndef TclNRInterpProcCore_TCL_DECLARED #define TclNRInterpProcCore_TCL_DECLARED @@ -1111,7 +1111,7 @@ EXTERN void TclNRPopAndFreeRecord (Tcl_Interp * interp); /* 243 */ EXTERN int TclNREvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, - const CmdFrame * invoker, int word); + CONST CmdFrame * invoker, int word); #endif typedef struct TclIntStubs { @@ -1374,18 +1374,18 @@ typedef struct TclIntStubs { int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, CONST char * myName, int myFlags, int index); /* 229 */ Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, CONST char * part2, int flags, CONST char * msg, CONST int createPart1, CONST int createPart2, Var ** arrayPtrPtr); /* 230 */ int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ - int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 232 */ + int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, CONST CmdFrame * invoker, int word); /* 232 */ void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ - Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ + Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, CONST char * key, int * newPtr); /* 234 */ void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ - int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 239 */ + int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 239 */ int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ - int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 243 */ + int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, CONST CmdFrame * invoker, int word); /* 243 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 6c55d97..025109d 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.92 2008/07/21 22:50:35 andreas_kupries Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.93 2008/07/24 22:57:56 nijtmans Exp $ */ #include "tclInt.h" @@ -646,7 +646,7 @@ Tcl_InterpObjCmd( int i, flags; Tcl_Interp *slaveInterp; Tcl_Obj *resultObjPtr; - static CONST char *options[] = { + static const char *options[] = { "-unwind", "--", NULL }; enum option { @@ -687,7 +687,7 @@ Tcl_InterpObjCmd( /* * Did they specify a slave interp to cancel the script in - * progress in? If not, use the current interp. + * progress in? If not, use the current interp. */ if (i < objc) { @@ -1488,7 +1488,7 @@ AliasCreate( if (slaveInterp == masterInterp) { aliasPtr->slaveCmd = Tcl_NRCreateCommand(slaveInterp, - TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, + TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, AliasObjCmdDeleteProc); } else { aliasPtr->slaveCmd = Tcl_CreateObjCommand(slaveInterp, @@ -1763,7 +1763,7 @@ AliasNRCmd( Tcl_Obj *listPtr; List *listRep; int flags = TCL_EVAL_INVOKE; - + /* * Append the arguments to the command prefix and invoke the command in * the target interp's global namespace. @@ -1777,7 +1777,7 @@ AliasNRCmd( listRep = listPtr->internalRep.twoPtrValue.ptr1; listRep->elemCount = cmdc; cmdv = &listRep->elements; - + prefv = &aliasPtr->objPtr; memcpy(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *))); memcpy(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *))); @@ -2618,7 +2618,7 @@ SlaveEval( * * Do not let any intReps accross, with the exception of * bytecodes. The intrep spoiling is due to happen anyway when - * compiling. + * compiling. */ Interp *iPtr = (Interp *) interp; @@ -2635,7 +2635,7 @@ SlaveEval( } TclArgumentGet (interp, objPtr, &invoker, &word); - + result = TclEvalObjEx(slaveInterp, objPtr, 0, invoker, word); } else { objPtr = Tcl_ConcatObj(objc, objv); diff --git a/generic/tclOO.decls b/generic/tclOO.decls index bb30e20..1868397 100644 --- a/generic/tclOO.decls +++ b/generic/tclOO.decls @@ -1,5 +1,5 @@ # -*- tcl -*- -# $Id: tclOO.decls,v 1.2 2008/06/01 00:02:05 dkf Exp $ +# $Id: tclOO.decls,v 1.3 2008/07/24 22:57:56 nijtmans Exp $ # public API library tclOO @@ -8,8 +8,8 @@ hooks tclOOInt declare 0 generic { Tcl_Object Tcl_CopyObjectInstance(Tcl_Interp *interp, - Tcl_Object sourceObject, const char *targetName, - const char *targetNamespaceName) + Tcl_Object sourceObject, CONST char *targetName, + CONST char *targetNamespaceName) } declare 1 generic { Tcl_Object Tcl_GetClassAsObject(Tcl_Class clazz) @@ -36,7 +36,7 @@ declare 8 generic { int Tcl_MethodIsPublic(Tcl_Method method) } declare 9 generic { - int Tcl_MethodIsType(Tcl_Method method, const Tcl_MethodType *typePtr, + int Tcl_MethodIsType(Tcl_Method method, CONST Tcl_MethodType *typePtr, ClientData *clientDataPtr) } declare 10 generic { @@ -44,18 +44,18 @@ declare 10 generic { } declare 11 generic { Tcl_Method Tcl_NewInstanceMethod(Tcl_Interp *interp, Tcl_Object object, - Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, + Tcl_Obj *nameObj, int isPublic, CONST Tcl_MethodType *typePtr, ClientData clientData) } declare 12 generic { Tcl_Method Tcl_NewMethod(Tcl_Interp *interp, Tcl_Class cls, - Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, + Tcl_Obj *nameObj, int isPublic, CONST Tcl_MethodType *typePtr, ClientData clientData) } declare 13 generic { Tcl_Object Tcl_NewObjectInstance(Tcl_Interp *interp, Tcl_Class cls, - const char *nameStr, const char *nsNameStr, int objc, - Tcl_Obj *const *objv, int skip) + CONST char *nameStr, CONST char *nsNameStr, int objc, + Tcl_Obj *CONST *objv, int skip) } declare 14 generic { int Tcl_ObjectDeleted(Tcl_Object object) @@ -74,23 +74,23 @@ declare 18 generic { } declare 19 generic { ClientData Tcl_ClassGetMetadata(Tcl_Class clazz, - const Tcl_ObjectMetadataType *typePtr) + CONST Tcl_ObjectMetadataType *typePtr) } declare 20 generic { void Tcl_ClassSetMetadata(Tcl_Class clazz, - const Tcl_ObjectMetadataType *typePtr, ClientData metadata) + CONST Tcl_ObjectMetadataType *typePtr, ClientData metadata) } declare 21 generic { ClientData Tcl_ObjectGetMetadata(Tcl_Object object, - const Tcl_ObjectMetadataType *typePtr) + CONST Tcl_ObjectMetadataType *typePtr) } declare 22 generic { void Tcl_ObjectSetMetadata(Tcl_Object object, - const Tcl_ObjectMetadataType *typePtr, ClientData metadata) + CONST Tcl_ObjectMetadataType *typePtr, ClientData metadata) } declare 23 generic { int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp, - Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, + Tcl_ObjectContext context, int objc, Tcl_Obj *CONST *objv, int skip) } declare 24 generic { @@ -118,13 +118,13 @@ declare 0 generic { declare 1 generic { Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, - const Tcl_MethodType *typePtr, ClientData clientData, + CONST Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr) } declare 2 generic { Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp, Class *clsPtr, - int flags, Tcl_Obj *nameObj, const char *namePtr, - Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, + int flags, Tcl_Obj *nameObj, CONST char *namePtr, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, CONST Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr) } declare 3 generic { @@ -139,7 +139,7 @@ declare 4 generic { } declare 5 generic { int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *const *objv, int publicOnly, Class *startCls) + Tcl_Obj *CONST *objv, int publicOnly, Class *startCls) } declare 6 generic { int TclOOIsReachable(Class *targetPtr, Class *startPtr) @@ -169,21 +169,21 @@ declare 10 generic { declare 11 generic { int TclOOInvokeObject(Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, - Tcl_Obj *const *objv) + Tcl_Obj *CONST *objv) } declare 12 generic { void TclOOObjectSetFilters(Object *oPtr, int numFilters, - Tcl_Obj *const *filters) + Tcl_Obj *CONST *filters) } declare 13 generic { void TclOOClassSetFilters(Tcl_Interp *interp, Class *classPtr, - int numFilters, Tcl_Obj *const *filters) + int numFilters, Tcl_Obj *CONST *filters) } declare 14 generic { void TclOOObjectSetMixins(Object *oPtr, int numMixins, - Class *const *mixins) + Class *CONST *mixins) } declare 15 generic { void TclOOClassSetMixins(Tcl_Interp *interp, Class *classPtr, - int numMixins, Class *const *mixins) + int numMixins, Class *CONST *mixins) } diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 79629ce..c86267c 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.7 2008/07/22 23:01:37 das Exp $ + * $Id: tclOODecls.h,v 1.8 2008/07/24 22:57:57 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -46,8 +46,8 @@ extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); /* 0 */ EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, Tcl_Object sourceObject, - const char * targetName, - const char * targetNamespaceName); + CONST char * targetName, + CONST char * targetNamespaceName); #endif #ifndef Tcl_GetClassAsObject_TCL_DECLARED #define Tcl_GetClassAsObject_TCL_DECLARED @@ -94,7 +94,7 @@ EXTERN int Tcl_MethodIsPublic (Tcl_Method method); #define Tcl_MethodIsType_TCL_DECLARED /* 9 */ EXTERN int Tcl_MethodIsType (Tcl_Method method, - const Tcl_MethodType * typePtr, + CONST Tcl_MethodType * typePtr, ClientData * clientDataPtr); #endif #ifndef Tcl_MethodName_TCL_DECLARED @@ -107,7 +107,7 @@ EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); /* 11 */ EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, - int isPublic, const Tcl_MethodType * typePtr, + int isPublic, CONST Tcl_MethodType * typePtr, ClientData clientData); #endif #ifndef Tcl_NewMethod_TCL_DECLARED @@ -115,16 +115,16 @@ EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, /* 12 */ EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, - const Tcl_MethodType * typePtr, + CONST Tcl_MethodType * typePtr, ClientData clientData); #endif #ifndef Tcl_NewObjectInstance_TCL_DECLARED #define Tcl_NewObjectInstance_TCL_DECLARED /* 13 */ EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, - Tcl_Class cls, const char * nameStr, - const char * nsNameStr, int objc, - Tcl_Obj *const * objv, int skip); + Tcl_Class cls, CONST char * nameStr, + CONST char * nsNameStr, int objc, + Tcl_Obj *CONST * objv, int skip); #endif #ifndef Tcl_ObjectDeleted_TCL_DECLARED #define Tcl_ObjectDeleted_TCL_DECLARED @@ -157,26 +157,26 @@ EXTERN int Tcl_ObjectContextSkippedArgs ( #define Tcl_ClassGetMetadata_TCL_DECLARED /* 19 */ EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr); + CONST Tcl_ObjectMetadataType * typePtr); #endif #ifndef Tcl_ClassSetMetadata_TCL_DECLARED #define Tcl_ClassSetMetadata_TCL_DECLARED /* 20 */ EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr, + CONST Tcl_ObjectMetadataType * typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectGetMetadata_TCL_DECLARED #define Tcl_ObjectGetMetadata_TCL_DECLARED /* 21 */ EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr); + CONST Tcl_ObjectMetadataType * typePtr); #endif #ifndef Tcl_ObjectSetMetadata_TCL_DECLARED #define Tcl_ObjectSetMetadata_TCL_DECLARED /* 22 */ EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr, + CONST Tcl_ObjectMetadataType * typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED @@ -184,7 +184,7 @@ EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, /* 23 */ EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, - Tcl_Obj *const * objv, int skip); + Tcl_Obj *CONST * objv, int skip); #endif #ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED #define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED @@ -219,7 +219,7 @@ typedef struct TclOOStubs { int magic; CONST struct TclOOStubHooks *hooks; - Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ + Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, CONST char * targetName, CONST char * targetNamespaceName); /* 0 */ Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ @@ -228,21 +228,21 @@ typedef struct TclOOStubs { Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ - int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ + int (*tcl_MethodIsType) (Tcl_Method method, CONST Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ - Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ - Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ - Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ + Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, CONST Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ + Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, CONST Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ + Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, CONST char * nameStr, CONST char * nsNameStr, int objc, Tcl_Obj *CONST * objv, int skip); /* 13 */ int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ - ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ - void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ - ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ - void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ - int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ + ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, CONST Tcl_ObjectMetadataType * typePtr); /* 19 */ + void (*tcl_ClassSetMetadata) (Tcl_Class clazz, CONST Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ + ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, CONST Tcl_ObjectMetadataType * typePtr); /* 21 */ + void (*tcl_ObjectSetMetadata) (Tcl_Object object, CONST Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ + int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *CONST * objv, int skip); /* 23 */ Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index 4ee1788..680aa61 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.7 2008/07/22 23:01:38 das Exp $ + * $Id: tclOOIntDecls.h,v 1.8 2008/07/24 22:57:57 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -41,7 +41,7 @@ EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, + CONST Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); #endif #ifndef TclOOMakeProcMethod_TCL_DECLARED @@ -49,9 +49,9 @@ EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, /* 2 */ EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, - const char * namePtr, Tcl_Obj * argsObj, + CONST char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, + CONST Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); #endif #ifndef TclOONewProcInstanceMethod_TCL_DECLARED @@ -75,7 +75,7 @@ EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, /* 5 */ EXTERN int TclOOObjectCmdCore (Object * oPtr, Tcl_Interp * interp, int objc, - Tcl_Obj *const * objv, int publicOnly, + Tcl_Obj *CONST * objv, int publicOnly, Class * startCls); #endif #ifndef TclOOIsReachable_TCL_DECLARED @@ -128,33 +128,33 @@ EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, EXTERN int TclOOInvokeObject (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, - Tcl_Obj *const * objv); + Tcl_Obj *CONST * objv); #endif #ifndef TclOOObjectSetFilters_TCL_DECLARED #define TclOOObjectSetFilters_TCL_DECLARED /* 12 */ EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, - Tcl_Obj *const * filters); + Tcl_Obj *CONST * filters); #endif #ifndef TclOOClassSetFilters_TCL_DECLARED #define TclOOClassSetFilters_TCL_DECLARED /* 13 */ EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, Class * classPtr, int numFilters, - Tcl_Obj *const * filters); + Tcl_Obj *CONST * filters); #endif #ifndef TclOOObjectSetMixins_TCL_DECLARED #define TclOOObjectSetMixins_TCL_DECLARED /* 14 */ EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, - Class *const * mixins); + Class *CONST * mixins); #endif #ifndef TclOOClassSetMixins_TCL_DECLARED #define TclOOClassSetMixins_TCL_DECLARED /* 15 */ EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, Class * classPtr, int numMixins, - Class *const * mixins); + Class *CONST * mixins); #endif typedef struct TclOOIntStubs { @@ -162,21 +162,21 @@ typedef struct TclOOIntStubs { CONST struct TclOOIntStubHooks *hooks; Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ - Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ - Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ + Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, CONST Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ + Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, CONST char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, CONST Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ - int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ + int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *CONST * objv, int publicOnly, Class * startCls); /* 5 */ int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ - int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ - void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ - void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ - void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ - void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ + int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *CONST * objv); /* 11 */ + void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *CONST * filters); /* 12 */ + void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *CONST * filters); /* 13 */ + void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *CONST * mixins); /* 14 */ + void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *CONST * mixins); /* 15 */ } TclOOIntStubs; #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls index 7e89a39..9ace7fd 100644 --- a/generic/tclTomMath.decls +++ b/generic/tclTomMath.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclTomMath.decls,v 1.3 2007/12/13 15:23:20 dgp Exp $ +# RCS: @(#) $Id: tclTomMath.decls,v 1.4 2008/07/24 22:57:56 nijtmans Exp $ library tcl @@ -134,7 +134,7 @@ declare 35 generic { int TclBN_mp_radix_size(mp_int* a, int radix, int* size) } declare 36 generic { - int TclBN_mp_read_radix(mp_int* a, const char* str, int radix) + int TclBN_mp_read_radix(mp_int* a, CONST char* str, int radix) } declare 37 generic { void TclBN_mp_rshd(mp_int * a, int shift) diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 548ceb1..203e90c 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.7 2008/07/22 23:01:44 das Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.8 2008/07/24 22:57:57 nijtmans Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -323,7 +323,7 @@ EXTERN int TclBN_mp_radix_size (mp_int* a, int radix, int* size); #ifndef TclBN_mp_read_radix_TCL_DECLARED #define TclBN_mp_read_radix_TCL_DECLARED /* 36 */ -EXTERN int TclBN_mp_read_radix (mp_int* a, const char* str, +EXTERN int TclBN_mp_read_radix (mp_int* a, CONST char* str, int radix); #endif #ifndef TclBN_mp_rshd_TCL_DECLARED @@ -493,7 +493,7 @@ typedef struct TclTomMathStubs { int (*tclBN_mp_neg) (mp_int* a, mp_int* b); /* 33 */ int (*tclBN_mp_or) (mp_int* a, mp_int* b, mp_int* c); /* 34 */ int (*tclBN_mp_radix_size) (mp_int* a, int radix, int* size); /* 35 */ - int (*tclBN_mp_read_radix) (mp_int* a, const char* str, int radix); /* 36 */ + int (*tclBN_mp_read_radix) (mp_int* a, CONST char* str, int radix); /* 36 */ void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ int (*tclBN_mp_shrink) (mp_int* a); /* 38 */ void (*tclBN_mp_set) (mp_int* a, mp_digit b); /* 39 */ -- cgit v0.12 From 492567dd1a47ceb460e19a20e233ff6d1efeb5ab Mon Sep 17 00:00:00 2001 From: das Date: Fri, 25 Jul 2008 21:23:59 +0000 Subject: * tests/info.test (info-37.0): Add !singleTestInterp constraint; (info-22.8, info-23.0): switch to glob matching to avoid sensitivity to tcltest.tcl line number changes, remove knownBug constraint, fix expected result. [Bug 1605269] --- ChangeLog | 9 ++++++++- tests/info.test | 42 +++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b1f188..20baea6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-25 Daniel Steffen + + * tests/info.test (info-37.0): Add !singleTestInterp constraint; + (info-22.8, info-23.0): switch to glob matching to avoid sensitivity + to tcltest.tcl line number changes, remove knownBug constraint, fix + expected result. [Bug 1605269] + 2007-07-24 Jan Nijtmans * doc/Notifier.3 CONSTified 4 functions in the @@ -20,7 +27,7 @@ 2008-07-23 Alexandre Ferrieux * tests/lrange.test: Added relative speed test to check for lrange - in-place optimization committed 2008-06-30. + in-place optimization committed 2008-06-30. * tests/binary.test: Added relative speed test to check for pure byte array CONCAT1 optimization committed 2008-06-30. diff --git a/tests/info.test b/tests/info.test index a50ba84..a04e7b5 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.54 2008/07/23 21:43:23 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.55 2008/07/25 21:24:01 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -761,16 +761,16 @@ test info-22.6 {info frame, global, relative} {!singleTestInterp} { test info-22.7 {info frame, global, absolute} {!singleTestInterp} { reduce [info frame 1] } {type source line 761 file info.test cmd test\ info-22.7\ \{info\ frame,\ global,\ absolute\}\ \{!singleTestInter level 0} -test info-22.8 {info frame, basic trace} {knownBug !singleTestInterp} { +test info-22.8 {info frame, basic trace} -constraints {!singleTestInterp} -match glob -body { join [etrace] \n -} {8 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -7 {type eval line 2 cmd etrace} -6 {type source line 2299 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest} -5 {type eval line 1 cmd {::tcltest::RunTest info-22}} -4 {type source line 1621 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::Eval} -3 {type eval line 1 cmd ::tcltest::Eval\ \{::tcltest::RunTest\ info-22} -2 {type source line 1967 file tcltest.tcl cmd {uplevel 1 [list [namespace origin Eval] $command 1]} proc ::tcltest::test} -1 {type source line 764 file info.test cmd test\ info-22.8\ \{info\ frame,\ basic\ trace\}\ \{!singleTestInter level 1}} +} -result {8 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +7 {type source line 765 file info.test cmd etrace proc ::tcltest::RunTest} +6 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest} +5 {type eval line 1 cmd {::tcltest::RunTest info-22} proc ::tcltest::Eval} +4 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::Eval} +3 {type eval line 1 cmd ::tcltest::Eval\\ \\\{::tcltest::RunTest\\ info-22 proc ::tcltest::test} +2 {type source line * file tcltest.tcl cmd {uplevel 1 \[list \[namespace origin Eval\] $command 1\]} proc ::tcltest::test} +1 {type source line 764 file info.test cmd {test info-22.8 {info frame, basic trace} -constraints {!singleTestInterp} -match glob -bo} level 1}} ## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 test info-23.0 {eval'd info frame} {!singleTestInterp} { @@ -795,18 +795,18 @@ test info-23.5 {eval'd info frame, dynamic} { set script {info frame 0} eval $script } {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} -test info-23.6 {eval'd info frame, trace} {knownBug !singleTestInterp} { +test info-23.6 {eval'd info frame, trace} -constraints {!singleTestInterp} -match glob -body { set script {etrace} join [eval $script] \n -} {9 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -8 {type eval line 1 cmd etrace} -7 {type eval line 3 cmd {eval $script}} -6 {type source line 2299 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest} -5 {type eval line 1 cmd {::tcltest::RunTest info-23}} -4 {type source line 1621 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::Eval} -3 {type eval line 1 cmd ::tcltest::Eval\ \{::tcltest::RunTest\ info-23} -2 {type source line 1967 file tcltest.tcl cmd {uplevel 1 [list [namespace origin Eval] $command 1]} proc ::tcltest::test} -1 {type source line 798 file info.test cmd test\ info-23.6\ \{eval'd\ info\ frame,\ trace\}\ \{!singleTestInter level 1}} +} -result {9 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +8 {type eval line 1 cmd etrace proc ::tcltest::RunTest} +7 {type source line 800 file info.test cmd {eval $script} proc ::tcltest::RunTest} +6 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest} +5 {type eval line 1 cmd {::tcltest::RunTest info-23} proc ::tcltest::Eval} +4 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::Eval} +3 {type eval line 1 cmd ::tcltest::Eval\\ \\\{::tcltest::RunTest\\ info-23 proc ::tcltest::test} +2 {type source line * file tcltest.tcl cmd {uplevel 1 \[list \[namespace origin Eval\] $command 1\]} proc ::tcltest::test} +1 {type source line 798 file info.test cmd {test info-23.6 {eval'd info frame, trace} -constraints {!singleTestInterp} -match glob -bo} level 1}} ## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 # ------------------------------------------------------------------------- @@ -1301,7 +1301,7 @@ namespace delete foo # ------------------------------------------------------------------------- -test info-37.0 {eval pure list, single line} { +test info-37.0 {eval pure list, single line} {!singleTestInterp} { # Basically, counting the newline in the word seen through $foo # doesn't really make sense. It makes a bit of sense if the word # would have been a string literal in the command list. -- cgit v0.12 From e6ab7a094e17c5ecfaed583a37feb06afbc6bd94 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 25 Jul 2008 22:11:18 +0000 Subject: * tests/info.test: Tests 38.* added, exactly testing the tracking of location for uplevel scripts. Resolved merge conflict on info-37.0, switched !singleTestInterp constraint to glob matching instead. Ditto info-22.8, removed constraint, more glob matching, and reduced the depth of the stack we check. More is coming, right now I want to commit the bug fixes. * tests/oo.test: Updated oo-22.1 for expanded location tracking. * generic/tclCompile.c (TclInitCompileEnv): Reorganized the initialization of the #280 location information to match the flow in TclEvalObjEx to get more absolute contexts. * generic/tclBasic.c (TclEvalObjEx): Added missing cleanup of extended location information. --- ChangeLog | 18 +++++++++ generic/tclBasic.c | 9 ++++- generic/tclCompile.c | 44 ++++++++++++--------- generic/tclProc.c | 4 +- tests/info.test | 110 ++++++++++++++++++++++++++++++++++++++++++++------- tests/oo.test | 6 +-- 6 files changed, 152 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20baea6..56429bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-07-25 Andreas Kupries + + * tests/info.test: Tests 38.* added, exactly testing the tracking + of location for uplevel scripts. Resolved merge conflict on + info-37.0, switched !singleTestInterp constraint to glob matching + instead. Ditto info-22.8, removed constraint, more glob matching, + and reduced the depth of the stack we check. More is coming, right + now I want to commit the bug fixes. + + * tests/oo.test: Updated oo-22.1 for expanded location tracking. + + * generic/tclCompile.c (TclInitCompileEnv): Reorganized the + initialization of the #280 location information to match the flow + in TclEvalObjEx to get more absolute contexts. + + * generic/tclBasic.c (TclEvalObjEx): Added missing cleanup of + extended location information. + 2008-07-25 Daniel Steffen * tests/info.test (info-37.0): Add !singleTestInterp constraint; diff --git a/generic/tclBasic.c b/generic/tclBasic.c index da81e9c..eb5e1c8 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.330 2008/07/23 20:49:50 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.331 2008/07/25 22:11:19 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1515,6 +1515,10 @@ DeleteInterpProc( ckfree((char *) eclPtr->loc); } + if (eclPtr->eiloc != NULL) { + ckfree((char *) eclPtr->eiloc); + } + ckfree((char *) eclPtr); Tcl_DeleteHashEntry(hPtr); } @@ -5741,6 +5745,9 @@ TclNREvalObjEx( * execution speed. This is because it allows us to avoid a setFromAny * step that would just pack everything into a string and back out again. * + * This also preserves any associations between list elements and location + * information for such elements. + * * This restriction has been relaxed a bit by storing in lists whether * they are "canonical" or not (a canonical list being one that is either * pure or that has its string rep derived by UpdateStringOfList from the diff --git a/generic/tclCompile.c b/generic/tclCompile.c index f484d7b..2d040b4 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.153 2008/07/23 20:49:52 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.154 2008/07/25 22:11:20 andreas_kupries Exp $ */ #include "tclInt.h" @@ -932,7 +932,23 @@ TclInitCompileEnv( * ...) which may make change the type as well. */ - if ((invoker->nline <= word) || (invoker->line[word] < 0)) { + CmdFrame *ctxPtr; + int pc = 0; + + ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); + *ctxPtr = *invoker; + + if (invoker->type == TCL_LOCATION_BC) { + /* + * Note: Type BC => ctx.data.eval.path is not used. + * ctx.data.tebc.codePtr is used instead. + */ + + TclGetSrcInfoForPc(ctxPtr); + pc = 1; + } + + if ((ctxPtr->nline <= word) || (ctxPtr->line[word] < 0)) { /* * Word is not a literal, relative counting. */ @@ -940,45 +956,37 @@ TclInitCompileEnv( envPtr->line = 1; envPtr->extCmdMapPtr->type = (envPtr->procPtr ? TCL_LOCATION_PROC : TCL_LOCATION_BC); - } else { - CmdFrame *ctxPtr; - int pc = 0; - - ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); - *ctxPtr = *invoker; - if (invoker->type == TCL_LOCATION_BC) { + if (pc && (ctxPtr->type == TCL_LOCATION_SOURCE)) { /* - * Note: Type BC => ctx.data.eval.path is not used. - * ctx.data.tebc.codePtr is used instead. + * The reference made by 'TclGetSrcInfoForPc' is dead. */ - - TclGetSrcInfoForPc(ctxPtr); - pc = 1; + Tcl_DecrRefCount(ctxPtr->data.eval.path); } - + } else { envPtr->line = ctxPtr->line[word]; envPtr->extCmdMapPtr->type = ctxPtr->type; if (ctxPtr->type == TCL_LOCATION_SOURCE) { + envPtr->extCmdMapPtr->path = ctxPtr->data.eval.path; + if (pc) { /* * The reference 'TclGetSrcInfoForPc' made is transfered. */ - envPtr->extCmdMapPtr->path = ctxPtr->data.eval.path; ctxPtr->data.eval.path = NULL; } else { /* * We have a new reference here. */ - envPtr->extCmdMapPtr->path = ctxPtr->data.eval.path; Tcl_IncrRefCount(envPtr->extCmdMapPtr->path); } } - TclStackFree(interp, ctxPtr); } + + TclStackFree(interp, ctxPtr); } envPtr->auxDataArrayPtr = envPtr->staticAuxDataArraySpace; diff --git a/generic/tclProc.c b/generic/tclProc.c index 9947549..63aa7d5 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.151 2008/07/21 22:50:36 andreas_kupries Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.152 2008/07/25 22:11:21 andreas_kupries Exp $ */ #include "tclInt.h" @@ -2281,7 +2281,7 @@ TclProcCleanupProc( /* * TIP #280: Release the location data associated with this Proc * structure, if any. The interpreter may not exist (For example for - * procbody structurues created by tbcload. + * procbody structures created by tbcload. */ if (!iPtr) { diff --git a/tests/info.test b/tests/info.test index a04e7b5..5b83ed2 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.55 2008/07/25 21:24:01 das Exp $ +# RCS: @(#) $Id: info.test,v 1.56 2008/07/25 22:11:21 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -761,16 +761,11 @@ test info-22.6 {info frame, global, relative} {!singleTestInterp} { test info-22.7 {info frame, global, absolute} {!singleTestInterp} { reduce [info frame 1] } {type source line 761 file info.test cmd test\ info-22.7\ \{info\ frame,\ global,\ absolute\}\ \{!singleTestInter level 0} -test info-22.8 {info frame, basic trace} -constraints {!singleTestInterp} -match glob -body { - join [etrace] \n -} -result {8 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -7 {type source line 765 file info.test cmd etrace proc ::tcltest::RunTest} -6 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest} -5 {type eval line 1 cmd {::tcltest::RunTest info-22} proc ::tcltest::Eval} -4 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::Eval} -3 {type eval line 1 cmd ::tcltest::Eval\\ \\\{::tcltest::RunTest\\ info-22 proc ::tcltest::test} -2 {type source line * file tcltest.tcl cmd {uplevel 1 \[list \[namespace origin Eval\] $command 1\]} proc ::tcltest::test} -1 {type source line 764 file info.test cmd {test info-22.8 {info frame, basic trace} -constraints {!singleTestInterp} -match glob -bo} level 1}} +test info-22.8 {info frame, basic trace} -match glob -body { + join [lrange [etrace] 0 2] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type source line 765 file info.test cmd etrace proc ::tcltest::RunTest} +* {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}} ## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 test info-23.0 {eval'd info frame} {!singleTestInterp} { @@ -1301,7 +1296,7 @@ namespace delete foo # ------------------------------------------------------------------------- -test info-37.0 {eval pure list, single line} {!singleTestInterp} { +test info-37.0 {eval pure list, single line} -match glob -body { # Basically, counting the newline in the word seen through $foo # doesn't really make sense. It makes a bit of sense if the word # would have been a string literal in the command list. @@ -1319,12 +1314,97 @@ test info-37.0 {eval pure list, single line} {!singleTestInterp} { }] eval $cmd set res -} {10 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -9 {type eval line 2 cmd etrace proc ::tcltest::RunTest} -8 {type eval line 1 cmd foreac proc ::tcltest::RunTest}} +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type eval line 2 cmd etrace proc ::tcltest::RunTest} +* {type eval line 1 cmd foreac proc ::tcltest::RunTest}} # ------------------------------------------------------------------------- +# 6 cases. +## DV. direct-var - unchanged +## DPV direct-proc-var - ditto +## PPV proc-proc-var - ditto +## DL. direct-literal - now tracking absolute location +## DPL direct-proc-literal - ditto +## PPL proc-proc-literal - ditto +## ### ### ### ######### ######### #########" + +proc control {vv script} { + upvar 1 $vv var + return [uplevel 1 $script] +} + +proc datal {} { + control y { + set y PPL + etrace + } +} + +proc datav {} { + set script { + set y PPV + etrace + } + control y $script +} + +test info-38.1 {location information for uplevel, dv, direct-var} -match glob -body { + set script { + set y DV. + etrace + } + join [lrange [uplevel \#0 $script] 0 2] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type eval line 3 cmd etrace proc ::tcltest::RunTest} +* {type source line 1362 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}} + +test info-38.2 {location information for uplevel, dl, direct-literal} -match glob -body { + join [lrange [uplevel \#0 { + set y DL. + etrace + }] 0 2] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type source line 1370 file info.test cmd etrace proc ::tcltest::RunTest} +* {type source line 1368 file info.test cmd uplevel\\ \\\\ proc ::tcltest::RunTest}} + +test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match glob -body { + set script { + set y DPV + etrace + } + join [lrange [control y $script] 0 3] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type eval line 3 cmd etrace proc ::control} +* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1381 file info.test cmd {control y $script} proc ::tcltest::RunTest}} + +test info-38.4 {location information for uplevel, dpv, direct-proc-literal} -match glob -body { + join [lrange [control y { + set y DPL + etrace + }] 0 3] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type source line 1390 file info.test cmd etrace proc ::control} +* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1388 file info.test cmd control proc ::tcltest::RunTest}} + +test info-38.5 {location information for uplevel, ppv, proc-proc-var} -match glob -body { + join [lrange [datav] 0 4] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type eval line 3 cmd etrace proc ::control} +* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1354 file info.test cmd {control y $script} proc ::datav level 1} +* {type source line 1398 file info.test cmd datav proc ::tcltest::RunTest}} + +test info-38.6 {location information for uplevel, ppl, proc-proc-literal} -match glob -body { + join [lrange [datal] 0 4] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type source line 1345 file info.test cmd etrace proc ::control} +* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1343 file info.test cmd control proc ::datal level 1} +* {type source line 1406 file info.test cmd datal proc ::tcltest::RunTest}} + # ------------------------------------------------------------------------- # cleanup diff --git a/tests/oo.test b/tests/oo.test index f9b7be4..8ff06e8 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.8 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: oo.test,v 1.9 2008/07/25 22:11:21 andreas_kupries Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1685,7 +1685,7 @@ test oo-21.4 {OO: inheritance ordering} -setup { test oo-22.1 {OO and info frame} -setup { oo::class create c c create i -} -body { +} -match glob -body { oo::define c self method frame {} { info frame 0 } @@ -1708,7 +1708,7 @@ test oo-22.1 {OO and info frame} -setup { list [i level] [i frames] [dict get [c frame] object] } -cleanup { c destroy -} -result {1 {{type proc line 2 cmd {info frame 0} method frames class ::c level 0} {type proc line 2 cmd {info frame 0} method frames object ::i level 0}} ::c} +} -result {1 {{type source line * file * cmd {info frame 0} method frames class ::c level 0} {type source line * file * cmd {info frame 0} method frames object ::i level 0}} ::c} # Prove that the issue in [Bug 1865054] isn't an issue any more test oo-23.1 {Self-like derivation; complex case!} -setup { -- cgit v0.12 From 496f531a89bb73a3d70a47ab4ef3d124081806ec Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 25 Jul 2008 23:06:19 +0000 Subject: * test/info.test: More work on singleTestInterp usability. This fixes bug [1605269]. --- ChangeLog | 3 ++ tests/info.test | 106 +++++++++++++++++++++++++++++--------------------------- 2 files changed, 58 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56429bf..2d093b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-25 Andreas Kupries + * test/info.test: More work on singleTestInterp usability. This + fixes bug [1605269]. + * tests/info.test: Tests 38.* added, exactly testing the tracking of location for uplevel scripts. Resolved merge conflict on info-37.0, switched !singleTestInterp constraint to glob matching diff --git a/tests/info.test b/tests/info.test index 5b83ed2..d68da9f 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.56 2008/07/25 22:11:21 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.57 2008/07/25 23:06:21 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -768,16 +768,26 @@ test info-22.8 {info frame, basic trace} -match glob -body { * {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}} ## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 -test info-23.0 {eval'd info frame} {!singleTestInterp} { +test info-23.0.0 {eval'd info frame} {!singleTestInterp} { eval {info frame} } 8 -test info-23.1 {eval'd info frame, semi-dynamic} {!singleTestInterp} { +test info-23.0.1 {eval'd info frame} -constraints {singleTestInterp} -match glob -body { + eval {info frame} +} -result {1[12]} ;# SingleTestInterp results changes depending on running the whole suite, or info.test alone. +test info-23.1.0 {eval'd info frame, semi-dynamic} {!singleTestInterp} { eval info frame } 8 -test info-23.2 {eval'd info frame, dynamic} {!singleTestInterp} { +test info-23.1.1 {eval'd info frame, semi-dynamic} -constraints {singleTestInterp} -match glob -body { + eval info frame +} -result {1[12]} +test info-23.2.0 {eval'd info frame, dynamic} {!singleTestInterp} { set script {info frame} eval $script } 8 +test info-23.2.1 {eval'd info frame, dynamic} -constraints {singleTestInterp} -match glob -body { + set script {info frame} + eval $script +} -result {1[12]} test info-23.3 {eval'd info frame, literal} { eval { info frame 0 @@ -790,18 +800,12 @@ test info-23.5 {eval'd info frame, dynamic} { set script {info frame 0} eval $script } {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} -test info-23.6 {eval'd info frame, trace} -constraints {!singleTestInterp} -match glob -body { +test info-23.6 {eval'd info frame, trace} -match glob -body { set script {etrace} - join [eval $script] \n -} -result {9 {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -8 {type eval line 1 cmd etrace proc ::tcltest::RunTest} -7 {type source line 800 file info.test cmd {eval $script} proc ::tcltest::RunTest} -6 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest} -5 {type eval line 1 cmd {::tcltest::RunTest info-23} proc ::tcltest::Eval} -4 {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::Eval} -3 {type eval line 1 cmd ::tcltest::Eval\\ \\\{::tcltest::RunTest\\ info-23 proc ::tcltest::test} -2 {type source line * file tcltest.tcl cmd {uplevel 1 \[list \[namespace origin Eval\] $command 1\]} proc ::tcltest::test} -1 {type source line 798 file info.test cmd {test info-23.6 {eval'd info frame, trace} -constraints {!singleTestInterp} -match glob -bo} level 1}} + join [lrange [eval $script] 0 2] \n +} -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} +* {type eval line 1 cmd etrace proc ::tcltest::RunTest} +* {type source line 805 file info.test cmd {eval $script} proc ::tcltest::RunTest}} ## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 # ------------------------------------------------------------------------- @@ -825,7 +829,7 @@ test info-24.0 {info frame, interaction, namespace eval} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 826 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 825 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -839,7 +843,7 @@ test info-24.1 {info frame, interaction, if} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 840 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 839 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -854,7 +858,7 @@ test info-24.2 {info frame, interaction, while} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 854 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 853 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -867,7 +871,7 @@ test info-24.3 {info frame, interaction, catch} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 868 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 867 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -881,7 +885,7 @@ test info-24.4 {info frame, interaction, foreach} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 881 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 880 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -895,7 +899,7 @@ test info-24.5 {info frame, interaction, for} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 895 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 894 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -912,7 +916,7 @@ test info-24.6.0 {info frame, interaction, switch, list body} -body { } -cleanup { namespace delete foo unset x -} -result {type source line 911 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 910 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -927,7 +931,7 @@ test info-24.6.1 {info frame, interaction, switch, multi-body} -body { } -cleanup { namespace delete foo unset x -} -result {type source line 927 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 926 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -953,7 +957,7 @@ dict for {k v} {foo bar} { test info-24.7 {info frame, interaction, dict for} { reduce [foo::bar] -} {type source line 956 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} {type source line 955 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -967,7 +971,7 @@ dict with thedict { test info-24.8 {info frame, interaction, dict with} { reduce [foo::bar] -} {type source line 970 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} {type source line 969 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo unset thedict @@ -982,7 +986,7 @@ dict filter {foo bar} script {k v} { test info-24.9 {info frame, interaction, dict filter} { reduce [foo::bar] -} {type source line 984 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} {type source line 983 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo unset x @@ -995,14 +999,14 @@ eval { test info-25.0 {info frame, proc in eval} { reduce [bar] -} {type source line 998 file info.test cmd {info frame 0} proc ::bar level 0} +} {type source line 997 file info.test cmd {info frame 0} proc ::bar level 0} # Don't need to clean up yet... proc bar {} {info frame 0} test info-25.1 {info frame, regular proc} { reduce [bar] -} {type source line 1006 file info.test cmd {info frame 0} proc ::bar level 0} +} {type source line 1005 file info.test cmd {info frame 0} proc ::bar level 0} rename bar {} @@ -1114,7 +1118,7 @@ test info-33.0 {{*}, literal, direct} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 1116 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1115 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -1130,7 +1134,7 @@ test info-33.1 {{*}, literal, simple, bytecompiled} -body { reduce [foo::bar] } -cleanup { namespace delete foo -} -result {type source line 1131 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1130 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- @@ -1141,7 +1145,7 @@ namespace {*}" " test info-33.2 {{*}, literal, direct} { reduce [foo::bar] -} {type source line 1145 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} {type source line 1144 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -1167,7 +1171,7 @@ proc foo::bar {} { } test info-33.3 {{*}, literal, simple, bytecompiled} { reduce [foo::bar] -} {type source line 1170 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} {type source line 1169 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -1229,7 +1233,7 @@ proc foo {} { } test info-35.0 {apply, literal} { reduce [foo] -} {type source line 1232 file info.test cmd {info frame 0} lambda { +} {type source line 1231 file info.test cmd {info frame 0} lambda { {x y} {info frame 0} } level 0} @@ -1258,7 +1262,7 @@ proc foo::bar {} { } test info-36.0 {info frame, dict for, bcc} -body { reduce [foo::bar] -} -result {type source line 1260 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1259 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -1275,7 +1279,7 @@ proc foo::bar {} { test info-36.1.0 {switch, list literal, bcc} -body { reduce [foo::bar] -} -result {type source line 1276 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1275 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -1290,7 +1294,7 @@ proc foo::bar {} { test info-36.1.1 {switch, multi-body literals, bcc} -body { reduce [foo::bar] -} -result {type source line 1292 file info.test cmd {info frame 0} proc ::foo::bar level 0} +} -result {type source line 1291 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo @@ -1357,7 +1361,7 @@ test info-38.1 {location information for uplevel, dv, direct-var} -match glob -b join [lrange [uplevel \#0 $script] 0 2] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type eval line 3 cmd etrace proc ::tcltest::RunTest} -* {type source line 1362 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}} +* {type source line 1361 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}} test info-38.2 {location information for uplevel, dl, direct-literal} -match glob -body { join [lrange [uplevel \#0 { @@ -1365,8 +1369,8 @@ test info-38.2 {location information for uplevel, dl, direct-literal} -match glo etrace }] 0 2] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -* {type source line 1370 file info.test cmd etrace proc ::tcltest::RunTest} -* {type source line 1368 file info.test cmd uplevel\\ \\\\ proc ::tcltest::RunTest}} +* {type source line 1369 file info.test cmd etrace proc ::tcltest::RunTest} +* {type source line 1367 file info.test cmd uplevel\\ \\\\ proc ::tcltest::RunTest}} test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match glob -body { set script { @@ -1376,8 +1380,8 @@ test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match g join [lrange [control y $script] 0 3] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type eval line 3 cmd etrace proc ::control} -* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} -* {type source line 1381 file info.test cmd {control y $script} proc ::tcltest::RunTest}} +* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1380 file info.test cmd {control y $script} proc ::tcltest::RunTest}} test info-38.4 {location information for uplevel, dpv, direct-proc-literal} -match glob -body { join [lrange [control y { @@ -1385,25 +1389,25 @@ test info-38.4 {location information for uplevel, dpv, direct-proc-literal} -mat etrace }] 0 3] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -* {type source line 1390 file info.test cmd etrace proc ::control} -* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} -* {type source line 1388 file info.test cmd control proc ::tcltest::RunTest}} +* {type source line 1389 file info.test cmd etrace proc ::control} +* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1387 file info.test cmd control proc ::tcltest::RunTest}} test info-38.5 {location information for uplevel, ppv, proc-proc-var} -match glob -body { join [lrange [datav] 0 4] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type eval line 3 cmd etrace proc ::control} -* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} -* {type source line 1354 file info.test cmd {control y $script} proc ::datav level 1} -* {type source line 1398 file info.test cmd datav proc ::tcltest::RunTest}} +* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1353 file info.test cmd {control y $script} proc ::datav level 1} +* {type source line 1397 file info.test cmd datav proc ::tcltest::RunTest}} test info-38.6 {location information for uplevel, ppl, proc-proc-literal} -match glob -body { join [lrange [datal] 0 4] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} -* {type source line 1345 file info.test cmd etrace proc ::control} -* {type source line 1339 file info.test cmd {uplevel 1 $script} proc ::control} -* {type source line 1343 file info.test cmd control proc ::datal level 1} -* {type source line 1406 file info.test cmd datal proc ::tcltest::RunTest}} +* {type source line 1344 file info.test cmd etrace proc ::control} +* {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control} +* {type source line 1342 file info.test cmd control proc ::datal level 1} +* {type source line 1405 file info.test cmd datal proc ::tcltest::RunTest}} # ------------------------------------------------------------------------- -- cgit v0.12 From 18bbede136bbdbc5867f284093730f6b5b57cff6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 27 Jul 2008 22:18:21 +0000 Subject: * doc/Object.3 CONSTified 3 functions using * doc/ObjectType.3 Tcl_ObjType which all are supposed * generic/tcl.decls to be a constant, but this was not * generic/tcl.h reflected in the API: * generic/tclDecls.h Tcl_ConvertToType * generic/tclObj.c Tcl_GetObjType * generic/tclCompCmds.c Tcl_RegisterObjType * generic/tclOOMethod.c Introduced a CONST86_RETURN, so extensions which * generic/tclTestobj.c use Tcl_ObjType directly can be modified to compile against both Tcl 8.5 and Tcl 8.6 tclDecls.h is re-generated with "make genstubs" This change complies with TIP #24 ***POTENTIAL INCOMPATIBILITY*** --- ChangeLog | 16 ++++++++++++++++ doc/Object.3 | 4 ++-- doc/ObjectType.3 | 8 ++++---- generic/tcl.decls | 8 ++++---- generic/tcl.h | 7 ++++--- generic/tclCompCmds.c | 6 +++--- generic/tclDecls.h | 15 ++++++++------- generic/tclOOMethod.c | 4 ++-- generic/tclObj.c | 50 +++++++++++++++++++++++++------------------------- generic/tclTestObj.c | 4 ++-- 10 files changed, 70 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d093b6..43c21e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-07-27 Jan Nijtmans + + * doc/Object.3 CONSTified 3 functions using + * doc/ObjectType.3 Tcl_ObjType which all are supposed + * generic/tcl.decls to be a constant, but this was not + * generic/tcl.h reflected in the API: + * generic/tclDecls.h Tcl_ConvertToType + * generic/tclObj.c Tcl_GetObjType + * generic/tclCompCmds.c Tcl_RegisterObjType + * generic/tclOOMethod.c Introduced a CONST86_RETURN, so extensions which + * generic/tclTestobj.c use Tcl_ObjType directly can be modified to compile + against both Tcl 8.5 and Tcl 8.6 + tclDecls.h is re-generated with "make genstubs" + This change complies with TIP #24 + ***POTENTIAL INCOMPATIBILITY*** + 2008-07-25 Andreas Kupries * test/info.test: More work on singleTestInterp usability. This diff --git a/doc/Object.3 b/doc/Object.3 index 6951f10..3b6abc8 100644 --- a/doc/Object.3 +++ b/doc/Object.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Object.3,v 1.20 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Object.3,v 1.21 2008/07/27 22:18:21 nijtmans Exp $ '\" .so man.macros .TH Tcl_Obj 3 8.5 Tcl "Tcl Library Procedures" @@ -114,7 +114,7 @@ typedef struct Tcl_Obj { int \fIrefCount\fR; char *\fIbytes\fR; int \fIlength\fR; - Tcl_ObjType *\fItypePtr\fR; + const Tcl_ObjType *\fItypePtr\fR; union { long \fIlongValue\fR; double \fIdoubleValue\fR; diff --git a/doc/ObjectType.3 b/doc/ObjectType.3 index 902c8da..30158ce 100644 --- a/doc/ObjectType.3 +++ b/doc/ObjectType.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ObjectType.3,v 1.19 2008/06/30 15:58:06 dgp Exp $ +'\" RCS: @(#) $Id: ObjectType.3,v 1.20 2008/07/27 22:18:21 nijtmans Exp $ '\" .so man.macros .TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures" @@ -17,7 +17,7 @@ Tcl_RegisterObjType, Tcl_GetObjType, Tcl_AppendAllObjTypes, Tcl_ConvertToType \ .sp \fBTcl_RegisterObjType\fR(\fItypePtr\fR) .sp -Tcl_ObjType * +const Tcl_ObjType * \fBTcl_GetObjType\fR(\fItypeName\fR) .sp int @@ -27,7 +27,7 @@ int \fBTcl_ConvertToType\fR(\fIinterp, objPtr, typePtr\fR) .SH ARGUMENTS .AS "const char" *typeName -.AP Tcl_ObjType *typePtr in +.AP "const Tcl_ObjType" *typePtr in Points to the structure containing information about the Tcl object type. This storage must live forever, typically by being statically allocated. @@ -107,7 +107,7 @@ The \fBTcl_ObjType\fR structure is defined as follows: .PP .CS typedef struct Tcl_ObjType { - char *\fIname\fR; + const char *\fIname\fR; Tcl_FreeInternalRepProc *\fIfreeIntRepProc\fR; Tcl_DupInternalRepProc *\fIdupIntRepProc\fR; Tcl_UpdateStringProc *\fIupdateStringProc\fR; diff --git a/generic/tcl.decls b/generic/tcl.decls index 1b6326d..8fc52ac 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.139 2008/07/24 22:57:57 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.140 2008/07/27 22:18:21 nijtmans Exp $ library tcl @@ -94,7 +94,7 @@ declare 17 generic { } declare 18 generic { int Tcl_ConvertToType(Tcl_Interp *interp, Tcl_Obj *objPtr, - Tcl_ObjType *typePtr) + CONST86 Tcl_ObjType *typePtr) } declare 19 generic { void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, CONST char *file, int line) @@ -167,7 +167,7 @@ declare 39 generic { int Tcl_GetLongFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr) } declare 40 generic { - Tcl_ObjType * Tcl_GetObjType(CONST char *typeName) + CONST86_RETURN Tcl_ObjType * Tcl_GetObjType(CONST char *typeName) } declare 41 generic { char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr) @@ -752,7 +752,7 @@ declare 210 generic { void Tcl_RegisterChannel(Tcl_Interp *interp, Tcl_Channel chan) } declare 211 generic { - void Tcl_RegisterObjType(Tcl_ObjType *typePtr) + void Tcl_RegisterObjType(CONST86 Tcl_ObjType *typePtr) } declare 212 generic { Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, CONST char *pattern) diff --git a/generic/tcl.h b/generic/tcl.h index 6b539ea..c98cef2 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.262 2008/07/24 21:54:38 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.263 2008/07/27 22:18:23 nijtmans Exp $ */ #ifndef _TCL @@ -262,6 +262,7 @@ extern "C" { #endif #define CONST86 CONST84 +#define CONST86_RETURN CONST84_RETURN /* * Make sure EXTERN isn't defined elsewhere @@ -721,7 +722,7 @@ typedef void (Tcl_MainLoopProc) _ANSI_ARGS_((void)); */ typedef struct Tcl_ObjType { - char *name; /* Name of the type, e.g. "int". */ + CONST86 char *name; /* Name of the type, e.g. "int". */ Tcl_FreeInternalRepProc *freeIntRepProc; /* Called to free any storage for the type's * internal rep. NULL if the internal rep does @@ -759,7 +760,7 @@ typedef struct Tcl_Obj { * array as a readonly value. */ int length; /* The number of bytes at *bytes, not * including the terminating null. */ - Tcl_ObjType *typePtr; /* Denotes the object's type. Always + CONST86 Tcl_ObjType *typePtr; /* Denotes the object's type. Always * corresponds to the type of the object's * internal rep. NULL indicates the object has * no internal rep (has no type). */ diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index ac0b2c2..dae4417 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.145 2008/06/08 03:21:32 msofer Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.146 2008/07/27 22:18:22 nijtmans Exp $ */ #include "tclInt.h" @@ -425,7 +425,7 @@ TclCompileCatchCmd( if (resultIndex < 0) { return TCL_ERROR; } - + /* DKF */ if (parsePtr->numWords == 4) { optsNameTokenPtr = TokenAfter(resultNameTokenPtr); @@ -5840,7 +5840,7 @@ TclCompileUpvarCmd( tokenPtr = TokenAfter(parsePtr->tokenPtr); if(TclWordKnownAtCompileTime(tokenPtr, objPtr)) { CallFrame *framePtr; - Tcl_ObjType *newTypePtr, *typePtr = objPtr->typePtr; + const Tcl_ObjType *newTypePtr, *typePtr = objPtr->typePtr; /* * Attempt to convert to a level reference. Note that TclObjGetFrame diff --git a/generic/tclDecls.h b/generic/tclDecls.h index bb44d58..880e40c 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.141 2008/07/24 22:57:57 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.142 2008/07/27 22:18:23 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -160,7 +160,8 @@ EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); #define Tcl_ConvertToType_TCL_DECLARED /* 18 */ EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_ObjType * typePtr); + Tcl_Obj * objPtr, + CONST86 Tcl_ObjType * typePtr); #endif #ifndef Tcl_DbDecrRefCount_TCL_DECLARED #define Tcl_DbDecrRefCount_TCL_DECLARED @@ -289,7 +290,7 @@ EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, #ifndef Tcl_GetObjType_TCL_DECLARED #define Tcl_GetObjType_TCL_DECLARED /* 40 */ -EXTERN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); +EXTERN CONST86_RETURN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); #endif #ifndef Tcl_GetStringFromObj_TCL_DECLARED #define Tcl_GetStringFromObj_TCL_DECLARED @@ -1336,7 +1337,7 @@ EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, #ifndef Tcl_RegisterObjType_TCL_DECLARED #define Tcl_RegisterObjType_TCL_DECLARED /* 211 */ -EXTERN void Tcl_RegisterObjType (Tcl_ObjType * typePtr); +EXTERN void Tcl_RegisterObjType (CONST86 Tcl_ObjType * typePtr); #endif #ifndef Tcl_RegExpCompile_TCL_DECLARED #define Tcl_RegExpCompile_TCL_DECLARED @@ -3609,7 +3610,7 @@ typedef struct TclStubs { void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr); /* 18 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST86 Tcl_ObjType * typePtr); /* 18 */ void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ @@ -3631,7 +3632,7 @@ typedef struct TclStubs { int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ + CONST86_RETURN Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ @@ -3834,7 +3835,7 @@ typedef struct TclStubs { int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (Tcl_ObjType * typePtr); /* 211 */ + void (*tcl_RegisterObjType) (CONST86 Tcl_ObjType * typePtr); /* 211 */ Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 3afe314..8dfb834 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.8 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.9 2008/07/27 22:18:23 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -736,7 +736,7 @@ PushMethodCallFrame( register int result; const char *namePtr; CallFrame **framePtrPtr = &fdPtr->framePtr; - static Tcl_ObjType *byteCodeTypePtr = NULL; /* HACK! */ + static const Tcl_ObjType *byteCodeTypePtr = NULL; /* HACK! */ /* * Compute basic information on the basis of the type of method it is. diff --git a/generic/tclObj.c b/generic/tclObj.c index 12c31f9..f445f08 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.141 2008/04/27 22:21:31 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.142 2008/07/27 22:18:21 nijtmans Exp $ */ #include "tclInt.h" @@ -440,7 +440,7 @@ TclFinalizeObjects(void) void Tcl_RegisterObjType( - Tcl_ObjType *typePtr) /* Information about object type; storage must + const Tcl_ObjType *typePtr) /* Information about object type; storage must * be statically allocated (must live * forever). */ { @@ -527,17 +527,17 @@ Tcl_AppendAllObjTypes( *---------------------------------------------------------------------- */ -Tcl_ObjType * +const Tcl_ObjType * Tcl_GetObjType( const char *typeName) /* Name of Tcl object type to look up. */ { register Tcl_HashEntry *hPtr; - Tcl_ObjType *typePtr = NULL; + const Tcl_ObjType *typePtr = NULL; Tcl_MutexLock(&tableMutex); hPtr = Tcl_FindHashEntry(&typeTable, typeName); if (hPtr != NULL) { - typePtr = (Tcl_ObjType *) Tcl_GetHashValue(hPtr); + typePtr = (const Tcl_ObjType *) Tcl_GetHashValue(hPtr); } Tcl_MutexUnlock(&tableMutex); return typePtr; @@ -567,7 +567,7 @@ int Tcl_ConvertToType( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* The object to convert. */ - Tcl_ObjType *typePtr) /* The target type. */ + const Tcl_ObjType *typePtr) /* The target type. */ { if (objPtr->typePtr == typePtr) { return TCL_OK; @@ -833,7 +833,7 @@ void TclFreeObj( register Tcl_Obj *objPtr) /* The object to be freed. */ { - register Tcl_ObjType *typePtr = objPtr->typePtr; + register const Tcl_ObjType *typePtr = objPtr->typePtr; /* * This macro declares a variable, so must come here... @@ -845,10 +845,10 @@ TclFreeObj( Tcl_Panic("Reference count for %lx was negative", objPtr); } - /* Invalidate the string rep first so we can use the bytes value + /* Invalidate the string rep first so we can use the bytes value * for our pointer chain, and signal an obj deletion (as opposed - * to shimmering) with 'length == -1' */ - + * to shimmering) with 'length == -1' */ + TclInvalidateStringRep(objPtr); objPtr->length = -1; @@ -888,13 +888,13 @@ void TclFreeObj( register Tcl_Obj *objPtr) /* The object to be freed. */ { - /* Invalidate the string rep first so we can use the bytes value + /* Invalidate the string rep first so we can use the bytes value * for our pointer chain, and signal an obj deletion (as opposed - * to shimmering) with 'length == -1' */ + * to shimmering) with 'length == -1' */ TclInvalidateStringRep(objPtr); objPtr->length = -1; - + if (!objPtr->typePtr || !objPtr->typePtr->freeIntRepProc) { /* * objPtr can be freed safely, as it will not attempt to free any @@ -1008,7 +1008,7 @@ Tcl_Obj * Tcl_DuplicateObj( register Tcl_Obj *objPtr) /* The object to duplicate. */ { - register Tcl_ObjType *typePtr = objPtr->typePtr; + register const Tcl_ObjType *typePtr = objPtr->typePtr; register Tcl_Obj *dupPtr; TclNewObj(dupPtr); @@ -3517,7 +3517,7 @@ Tcl_GetCommandFromObj( * is not deleted. * * If any check fails, then force another conversion to the command type, - * to discard the old rep and create a new one. + * to discard the old rep and create a new one. */ resPtr = objPtr->internalRep.twoPtrValue.ptr1; @@ -3526,15 +3526,15 @@ Tcl_GetCommandFromObj( || (cmdPtr = resPtr->cmdPtr, cmdPtr->cmdEpoch != resPtr->cmdEpoch) || (interp != cmdPtr->nsPtr->interp) || (cmdPtr->flags & CMD_IS_DELETED) - || ((resPtr->refNsPtr != NULL) && + || ((resPtr->refNsPtr != NULL) && (((refNsPtr = (Namespace *) TclGetCurrentNamespace(interp)) != resPtr->refNsPtr) || (resPtr->refNsId != refNsPtr->nsId) || (resPtr->refNsCmdEpoch != refNsPtr->cmdRefEpoch))) ) { - + result = tclCmdNameType.setFromAnyProc(interp, objPtr); - + resPtr = objPtr->internalRep.twoPtrValue.ptr1; if ((result == TCL_OK) && resPtr) { cmdPtr = resPtr->cmdPtr; @@ -3542,7 +3542,7 @@ Tcl_GetCommandFromObj( cmdPtr = NULL; } } - + return (Tcl_Command) cmdPtr; } @@ -3594,7 +3594,7 @@ TclSetCmdNameObj( if ((*name++ == ':') && (*name == ':')) { /* * The name is fully qualified: set the referring namespace to - * NULL. + * NULL. */ resPtr->refNsPtr = NULL; @@ -3604,7 +3604,7 @@ TclSetCmdNameObj( */ currNsPtr = iPtr->varFramePtr->nsPtr; - + resPtr->refNsPtr = currNsPtr; resPtr->refNsId = currNsPtr->nsId; resPtr->refNsCmdEpoch = currNsPtr->cmdRefEpoch; @@ -3759,7 +3759,7 @@ SetCmdNameFromAny( /* * Reuse the old ResolvedCmdName struct instead of freeing it */ - + Command *oldCmdPtr = resPtr->cmdPtr; if (--oldCmdPtr->refCount == 0) { @@ -3777,8 +3777,8 @@ SetCmdNameFromAny( resPtr->cmdEpoch = cmdPtr->cmdEpoch; if ((*name++ == ':') && (*name == ':')) { /* - * The name is fully qualified: set the referring namespace to - * NULL. + * The name is fully qualified: set the referring namespace to + * NULL. */ resPtr->refNsPtr = NULL; @@ -3788,7 +3788,7 @@ SetCmdNameFromAny( */ currNsPtr = iPtr->varFramePtr->nsPtr; - + resPtr->refNsPtr = currNsPtr; resPtr->refNsId = currNsPtr->nsId; resPtr->refNsCmdEpoch = currNsPtr->cmdRefEpoch; diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index b39b81d..c0d4f17 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.23 2008/07/19 22:50:43 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.24 2008/07/27 22:18:23 nijtmans Exp $ */ #include "tclInt.h" @@ -801,7 +801,7 @@ TestobjCmd( { int varIndex, destIndex, i; char *index, *subCmd, *string; - Tcl_ObjType *targetType; + const Tcl_ObjType *targetType; if (objc < 2) { wrongNumArgs: -- cgit v0.12 From 620325b7527923ddf3727210101f009552e00d47 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 27 Jul 2008 22:28:54 +0000 Subject: Remove unnecessary hack. --- ChangeLog | 5 +++++ generic/tclOOMethod.c | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43c21e4..7628b02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-27 Donal K. Fellows + + * generic/tclOOMethod.c (PushMethodCallFrame): Remove hack that should + have gone when this code was merged into Tcl. + 2007-07-27 Jan Nijtmans * doc/Object.3 CONSTified 3 functions using diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 8dfb834..8ce3c34 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.9 2008/07/27 22:18:23 nijtmans Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.10 2008/07/27 22:28:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -736,7 +736,6 @@ PushMethodCallFrame( register int result; const char *namePtr; CallFrame **framePtrPtr = &fdPtr->framePtr; - static const Tcl_ObjType *byteCodeTypePtr = NULL; /* HACK! */ /* * Compute basic information on the basis of the type of method it is. @@ -786,18 +785,13 @@ PushMethodCallFrame( fdPtr->cmd.clientData = &fdPtr->efi; pmPtr->procPtr->cmdPtr = &fdPtr->cmd; - /* Should be a reference to tclByteCodeType, but that's MODULE_SCOPE */ - if (byteCodeTypePtr == NULL || - pmPtr->procPtr->bodyPtr->typePtr != byteCodeTypePtr) { + if (pmPtr->procPtr->bodyPtr->typePtr != &tclByteCodeType) { result = TclProcCompileProc(interp, pmPtr->procPtr, pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, "body of method", namePtr); if (result != TCL_OK) { return result; } - if (byteCodeTypePtr == NULL) { - byteCodeTypePtr = pmPtr->procPtr->bodyPtr->typePtr; - } } /* -- cgit v0.12 From c5ed9debb3f2dd617c9c26aaa357b0af24acbfb6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 27 Jul 2008 22:40:23 +0000 Subject: formatting only --- ChangeLog | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7628b02..04d94e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,19 +5,19 @@ 2007-07-27 Jan Nijtmans - * doc/Object.3 CONSTified 3 functions using - * doc/ObjectType.3 Tcl_ObjType which all are supposed - * generic/tcl.decls to be a constant, but this was not - * generic/tcl.h reflected in the API: - * generic/tclDecls.h Tcl_ConvertToType - * generic/tclObj.c Tcl_GetObjType - * generic/tclCompCmds.c Tcl_RegisterObjType - * generic/tclOOMethod.c Introduced a CONST86_RETURN, so extensions which - * generic/tclTestobj.c use Tcl_ObjType directly can be modified to compile - against both Tcl 8.5 and Tcl 8.6 - tclDecls.h is re-generated with "make genstubs" - This change complies with TIP #24 - ***POTENTIAL INCOMPATIBILITY*** + * doc/Object.3 CONSTified 3 functions using + * doc/ObjectType.3 Tcl_ObjType which all are supposed + * generic/tcl.decls to be a constant, but this was not + * generic/tcl.h reflected in the API: + * generic/tclDecls.h Tcl_ConvertToType + * generic/tclObj.c Tcl_GetObjType + * generic/tclCompCmds.c Tcl_RegisterObjType + * generic/tclOOMethod.c Introduced a CONST86_RETURN, so extensions which + * generic/tclTestobj.c use Tcl_ObjType directly can be modified to compile + against both Tcl 8.5 and Tcl 8.6 + tclDecls.h is re-generated with "make genstubs" + This change complies with TIP #24 + ***POTENTIAL INCOMPATIBILITY*** 2008-07-25 Andreas Kupries -- cgit v0.12 From 9eee73cf65297a361965729c5e4a692932dba00a Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 27 Jul 2008 22:50:06 +0000 Subject: general tidy up --- ChangeLog | 422 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 208 insertions(+), 214 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04d94e7..ca5ac5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,40 +5,37 @@ 2007-07-27 Jan Nijtmans - * doc/Object.3 CONSTified 3 functions using - * doc/ObjectType.3 Tcl_ObjType which all are supposed - * generic/tcl.decls to be a constant, but this was not - * generic/tcl.h reflected in the API: - * generic/tclDecls.h Tcl_ConvertToType - * generic/tclObj.c Tcl_GetObjType - * generic/tclCompCmds.c Tcl_RegisterObjType - * generic/tclOOMethod.c Introduced a CONST86_RETURN, so extensions which - * generic/tclTestobj.c use Tcl_ObjType directly can be modified to compile - against both Tcl 8.5 and Tcl 8.6 - tclDecls.h is re-generated with "make genstubs" - This change complies with TIP #24 + * doc/Object.3: CONSTified 3 functions using Tcl_ObjType + * doc/ObjectType.3: which all are supposed to be a constant, but + * generic/tcl.decls: this was not reflected in the API: + * generic/tcl.h: Tcl_ConvertToType, Tcl_GetObjType, + * generic/tclDecls.h: Tcl_RegisterObjType + * generic/tclObj.c: Introduced a CONST86_RETURN, so extensions + * generic/tclCompCmds.c: which use Tcl_ObjType directly can be + * generic/tclOOMethod.c: modified to compile against both Tcl 8.5 and + * generic/tclTestobj.c: Tcl 8.6. tclDecls.h regenerated + This change complies with TIP #24. ***POTENTIAL INCOMPATIBILITY*** 2008-07-25 Andreas Kupries - * test/info.test: More work on singleTestInterp usability. This - fixes bug [1605269]. + * test/info.test: More work on singleTestInterp usability. [1605269] - * tests/info.test: Tests 38.* added, exactly testing the tracking - of location for uplevel scripts. Resolved merge conflict on - info-37.0, switched !singleTestInterp constraint to glob matching - instead. Ditto info-22.8, removed constraint, more glob matching, - and reduced the depth of the stack we check. More is coming, right - now I want to commit the bug fixes. + * tests/info.test: Tests 38.* added, exactly testing the tracking of + location for uplevel scripts. Resolved merge conflict on info-37.0, + switched !singleTestInterp constraint to glob matching instead. Ditto + info-22.8, removed constraint, more glob matching, and reduced the + depth of the stack we check. More is coming, right now I want to + commit the bug fixes. * tests/oo.test: Updated oo-22.1 for expanded location tracking. * generic/tclCompile.c (TclInitCompileEnv): Reorganized the - initialization of the #280 location information to match the flow - in TclEvalObjEx to get more absolute contexts. + initialization of the #280 location information to match the flow in + TclEvalObjEx to get more absolute contexts. - * generic/tclBasic.c (TclEvalObjEx): Added missing cleanup of - extended location information. + * generic/tclBasic.c (TclEvalObjEx): Added missing cleanup of extended + location information. 2008-07-25 Daniel Steffen @@ -49,41 +46,39 @@ 2007-07-24 Jan Nijtmans - * doc/Notifier.3 CONSTified 4 functions in the - * doc/Thread.3 Notifier which all have a - * generic/tcl.decls Tcl_Time * in it which is supposed - * generic/tcl.h to be a constant, but this was not - * generic/tclDecls.h reflected in the API: - * generic/tclNotify.c Tcl_SetTimer - * generic/tclThread.c Tcl_WaitForEvent - * macosx/tclMacOSXNotify.c Tcl_ConditionWait - * unix/tclUnixNotfy.c Tcl_SetMaxBlockTime - * unix/tclUnixThrd.c Introduced a CONST86, so extensions which - * win/tclWinNotify.c have their own Notifier (are there any?) - * win/tclWinThrd.c can be modified to compile against both - Tcl 8.5 and Tcl 8.6 - tclDecls.h is re-generated with "make genstubs" + * doc/Notifier.3: CONSTified 4 functions in the Notifier which + * doc/Thread.3: all have a Tcl_Time* in it which is supposed + * generic/tcl.decls: to be a constant, but this was not reflected + * generic/tcl.h: reflected in the API: + * generic/tclDecls.h: Tcl_SetTimer, Tcl_WaitForEvent, + * generic/tclNotify.c: Tcl_ConditionWait, Tcl_SetMaxBlockTime + * macosx/tclMacOSXNotify.c: + * generic/tclThread.c: Introduced a CONST86, so extensions which have + * unix/tclUnixNotfy.c: have their own Notifier (are there any?) can + * unix/tclUnixThrd.c: can be modified to compile against both Tcl + * win/tclWinNotify.c: Tcl 8.5 and Tcl 8.6 + * win/tclWinThrd.c: Regenerated tclDecls.h with "make stubs". This change complies with TIP #24 ***POTENTIAL INCOMPATIBILITY*** -2008-07-23 Alexandre Ferrieux +2008-07-23 Alexandre Ferrieux * tests/lrange.test: Added relative speed test to check for lrange in-place optimization committed 2008-06-30. - * tests/binary.test: Added relative speed test to check for pure - byte array CONCAT1 optimization committed 2008-06-30. + * tests/binary.test: Added relative speed test to check for pure byte + array CONCAT1 optimization committed 2008-06-30. 2008-07-23 Andreas Kupries - * tests/info.test: Reordered the tests to have monotonously - increasing numbers. + * tests/info.test: Reordered the tests to have monotonously increasing + numbers. * generic/tclBasic.c: Modified TclArgumentGet to reject pure lists - * generic/tclCmdIL.c: immediately, without search. Reworked setup - * generic/tclCompile.c: of eoFramePtr, doesn't need the line - * tests/info.test: information, more sensible to have everything - on line 1 when eval'ing a pure list. Updated the users of the line - information to special case this based on the frame type (i.e. + * generic/tclCmdIL.c: immediately, without search. Reworked setup of + * generic/tclCompile.c: eoFramePtr, doesn't need the line information, + * tests/info.test: more sensible to have everything on line 1 when + eval'ing a pure list. Updated the users of the line information to + special case this based on the frame type (i.e. TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new behaviour. @@ -94,37 +89,36 @@ 2008-07-22 Andreas Kupries - * generic/tclCompile.c: Made the new TclEnterCmdWordIndex - * generic/tclCompile.h: static, and ansified. + * generic/tclCompile.c: Made the new TclEnterCmdWordIndex static, and + * generic/tclCompile.h: ansified. * generic/tclBasic.c: Ansified the new functions. Added missing function comments. - * generic/tclBasic.c: Reworked the handling of bytecode literals - * generic/tclCompile.c: for #280 to fix the abysmal performance - * generic/tclCompile.h: for deep recursion, replaced the linear - * generic/tclExecute.c: search through the whole stack with - * generic/tclInt.h: another hashtable and simplified the data - structure used by the compiler (array instead of hashtable). - Incidentially this also fixes the memory leak reported via [Bug - 2024937]. + * generic/tclBasic.c: Reworked the handling of bytecode literals for + * generic/tclCompile.c: #280 to fix the abysmal performance for deep + * generic/tclCompile.h: recursion, replaced the linear search through + * generic/tclExecute.c: the whole stack with another hashtable and + * generic/tclInt.h: simplified the data structure used by the compiler + by using an array instead of a hashtable. Incidentially this also + fixes the memory leak reported via [Bug 2024937]. 2008-07-22 Miguel Sofer - * generic/tclBasic.c: Added numLevels field to CommandFrame, - * generic/tclExecute.c: let GetCommandSource use it. This solves - * generic/tclInt.h: [Bug 2017146]. Thx dgp for the analysis. + * generic/tclBasic.c: Added numLevels field to CommandFrame, let + * generic/tclExecute.c: GetCommandSource use it. This solves [Bug + * generic/tclInt.h: 2017146]. Thx dgp for the analysis. 2008-07-21 Andreas Kupries * generic/tclBasic.c: Extended the existing TIP #280 system (info - * generic/tclCmdAH.c: frame), added the ability to track the - * generic/tclCompCmds.c: absolute location of literal procedure - * generic/tclCompile.c: arguments, and making this information - * generic/tclCompile.h: available to uplevel, eval, and - * generic/tclInterp.c: siblings. This allows proper tracking of - * generic/tclInt.h: absolute location through custom (Tcl-coded) - * generic/tclNamesp.c: control structures based on uplevel, etc. + * generic/tclCmdAH.c: frame), added the ability to track the absolute + * generic/tclCompCmds.c: location of literal procedure arguments, and + * generic/tclCompile.c: making this information available to uplevel + * generic/tclCompile.h: eval, and siblings. This allows proper + * generic/tclInterp.c: tracking of absolute location through custom + * generic/tclInt.h: (Tcl-coded) control structures based on uplevel, + * generic/tclNamesp.c: etc. * generic/tclProc.c: * tests/info.test: @@ -135,7 +129,7 @@ * win/tclWinTest.c * tests/*.test -2008-07-21 Alexandre Ferrieux +2008-07-21 Alexandre Ferrieux TIP #304 IMPLEMENTATION @@ -147,33 +141,33 @@ * tests/ioCmd.test: modernized checks * tests/ioTrans.test: -2008-07-21 Pat Thoyts +2008-07-21 Pat Thoyts - * generic/tclFCmd.c: Inodes on windows are unreliable [Bug 2015723] + * generic/tclFCmd.c: Inodes on windows are unreliable. [Bug 2015723] * tests/winFCmd.test: test rename with inode collision 2008-07-21 Miguel Sofer - * generic/tcl.decls: Changed the implementation of - * generic/tclBasic.c: [namespace import]; removed - * generic/tclDecls.h: Tcl_NRObjProc, replaced with - * generic/tclExecute.c: Tcl_NRCmdSwap (proposed public - * generic/tclInt.h: NRE API). This should fix - * generic/tclNRE.h: [Bug 582506]. + * generic/tcl.decls: Changed the implementation of + * generic/tclBasic.c: [namespace import]; removed + * generic/tclDecls.h: Tcl_NRObjProc, replaced with + * generic/tclExecute.c: Tcl_NRCmdSwap (proposed public + * generic/tclInt.h: NRE API). This should fix + * generic/tclNRE.h: [Bug 582506]. * generic/tclNamesp.c: * generic/tclStubInit.c: - * generic/tclBasic.c: NRE: enabled calling NR commands - * generic/tclExecute.c: from the callbacks. Completely - * generic/tclInt.h: redone tailcall implementation - * generic/tclNRE.h: using the new feature. [Bug 2021489] + * generic/tclBasic.c: NRE: enabled calling NR commands + * generic/tclExecute.c: from the callbacks. Completely + * generic/tclInt.h: redone tailcall implementation + * generic/tclNRE.h: using the new feature. [Bug 2021489] * generic/tclProc.c: * tests/NRE.test: 2008-07-20 Kevin B. Kenny - * tests/fileName.test: Repaired the failing test fileName-15.7 - from dkf's commit earlier today. + * tests/fileName.test: Repaired the failing test fileName-15.7 from + dkf's commit earlier today. 2008-07-20 Donal K. Fellows @@ -201,9 +195,9 @@ 2008-07-18 Miguel Sofer - * generic/tclBasic.c: Optimization: replace calls to - * generic/tclDictObj.c: Tcl_NRAddCallback with the macro - * generic/tclExecute.c: TclNRAddCallback. + * generic/tclBasic.c: Optimization: replace calls to + * generic/tclDictObj.c: Tcl_NRAddCallback with the macro + * generic/tclExecute.c: TclNRAddCallback. * generic/tclInterp.c: * generic/tclNRE.h: * generic/tclNamesp.c: @@ -225,8 +219,8 @@ * tests/NRE.test: Added basic tests for deep TclOO calls - * generic/tcl.decls: Change the public api prefix from - * generic/tcl.h: TclNR_foo to Tcl_NRfoo + * generic/tcl.decls: Change the public api prefix from + * generic/tcl.h: TclNR_foo to Tcl_NRfoo * generic/tclBasic.c: * generic/tclDecls.h: * generic/tclDictObj.c: @@ -248,11 +242,11 @@ 2008-07-18 Miguel Sofer - * generic/tclDictObj.c (DictWithCmd, DictUpdateCmd): fix - refcounting bugs that caused crashes [Bug 2017857]. + * generic/tclDictObj.c (DictWithCmd, DictUpdateCmd): fix refcounting + bugs that caused crashes [Bug 2017857]. - * generic/tclBasic.c (TclNREvalObjEx): streamline the management - of the command frame (opt). + * generic/tclBasic.c (TclNREvalObjEx): streamline the management of + the command frame (opt). 2008-07-17 Donal K. Fellows @@ -282,7 +276,7 @@ * tests/NRE.test: Better constraint for testing the existence of * tests/stack.test: teststacklimit, to insure that the test suite - runs under tclsh. + runs under tclsh. * generic/tclParse.c: fixing incomplete reversion of "fix" for [Bug 2017583], missing TclResetCancellation call. @@ -302,7 +296,7 @@ * generic/tclParse.c: Reverting the "fix" for [Bug 2017583], numLevel * tests/parse.test: management and TclInterpReady check seems to be - necessary after all. + necessary after all. 2008-07-14 Donal K. Fellows @@ -314,11 +308,11 @@ 2008-07-14 Miguel Sofer - * generic/tclExecute.c: Remove unneeded TclInterpReady calls + * generic/tclExecute.c: Remove unneeded TclInterpReady calls * generic/tclParse.c: - * generic/tclBasic.c.: Embedded Tcl_Canceled() calls into - * generic/tclExecute.c: TclInterpReady(). + * generic/tclBasic.c.: Embedded Tcl_Canceled() calls into + * generic/tclExecute.c: TclInterpReady(). * generic/tclParse.c: * generic/tclVar.c: fix error message @@ -326,10 +320,10 @@ * generic/tclParse.c: remove unnecessary numLevel management * tests/parse.test: [Bug 2017583] - * generic/tclBasic.c.: NRE left too many calls to - * generic/tclExecute.c: TclResetCancellation lying around: it - * generic/tclProc.c: only needs to be called prior to any - iPtr->numLevels++. Thanks mistachkin. + * generic/tclBasic.c.: NRE left too many calls to + * generic/tclExecute.c: TclResetCancellation lying around: it + * generic/tclProc.c: only needs to be called prior to any + iPtr->numLevels++. Thanks mistachkin. * generic/tclBasic.c: TclResetCancellation() calls were misplaced (merge mishap); stray //. Thanks patthoyts. @@ -341,7 +335,7 @@ NRE implementation [Patch 2017110] - * generic/tcl.decls: The NRE infrastructure + * generic/tcl.decls: The NRE infrastructure * generic/tcl.h: * generic/tclBasic.c: * generic/tclCmdAH.c: @@ -356,26 +350,26 @@ * generic/tclStubInit.c: * unix/Makefile.in: - * generic/tclInterp.c: NRE-enabling: procs, lambdas, uplevel, - * generic/tclNamesp.c: same-interp aliases, ensembles, imports - * generic/tclProc.c: and namespace_eval. + * generic/tclInterp.c: NRE-enabling: procs, lambdas, uplevel, + * generic/tclNamesp.c: same-interp aliases, ensembles, imports + * generic/tclProc.c: and namespace_eval. * generic/tclTestProcBodyObj.c: New NRE specific tests (few, but - * tests/NRE.test: note that the thing is actually - tested by the whole testsuite. + * tests/NRE.test: note that the thing is actually + tested by the whole testsuite. - * tests/interp.test: Fixed numLevel counting. + * tests/interp.test: Fixed numLevel counting. * tests/parse.test: * tests/stack.test: - * unix/configure: Removing support for the hacky nonportable - * unix/configure.in: stack check: it is not needed anymore, Tcl - * unix/tclConfig.h.in: is very thrifty on the C stack. + * unix/configure: Removing support for the hacky nonportable + * unix/configure.in: stack check: it is not needed anymore, Tcl + * unix/tclConfig.h.in: is very thrifty on the C stack. * unix/tclUnixInit.c: * unix/tclUnixTest.c: * win/tclWin32Dll.c: -2008-07-08 Don Porter +2008-07-08 Don Porter * generic/tclGet.c: Corrected out of date comments and removed * generic/tclInt.decls: internal routine TclGetLong() that's no @@ -411,9 +405,9 @@ reported in [Bug 1987821]. Thanks to Miguel for the report and Don Porter for tracking the cause down. -2008-07-03 Don Porter +2008-07-03 Don Porter - * library/package.tcl: Removed [file readable] testing from + * library/package.tcl: Removed [file readable] testing from [tclPkgUnknown] and friends. We find out soon enough whether a file is readable when we try to [source] it, and not testing before allows us to workaround the bugs on some common filesystems where [file @@ -433,12 +427,12 @@ * doc/ObjectType.3: Clean up typedef formatting. -2008-06-30 Don Porter +2008-06-30 Don Porter - * doc/ObjectType.3: Updated documentation of the Tcl_ObjType + * doc/ObjectType.3: Updated documentation of the Tcl_ObjType struct to match expectations of Tcl 8.5. [Bug 1917650] -2008-06-30 Alexandre Ferrieux +2008-06-30 Alexandre Ferrieux * generic/tclCmdIL.c: Lrange cleanup and in-place optimization. [Patch 1890831] @@ -452,9 +446,9 @@ change bars and cleaning up the formatting of typedefs. Added a few missing bits of documentation in the process. -2008-06-29 Don Porter +2008-06-29 Don Porter - * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanks + * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanks to Rolf Ade for detecting. 2008-06-29 Donal K. Fellows @@ -465,9 +459,9 @@ * doc/object.n (EXAMPLES): Fix incorrect usage of oo::define to be done with oo::objdefine instead. [Bug 2004480] -2008-06-28 Don Porter +2008-06-28 Don Porter - * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanks + * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanks to Rolf Ade for detecting and Dan Steffen for the fix. [Bug 2004654] 2008-06-26 Andreas Kupries @@ -477,7 +471,7 @@ conditional on interpreter safeness as well. Thanks to Daniel Steffen for reminding me of that code. -2008-06-25 Don Porter +2008-06-25 Don Porter *** 8.6a1 TAGGED FOR RELEASE *** @@ -492,22 +486,22 @@ * library/init.tcl: enabling requiring Tcl Modules in safe * tests/safe.test: interpreters. [Bug 1999119] -2008-06-25 Pat Thoyts +2008-06-25 Pat Thoyts * win/rules.vc: fix versions of dde and registry dlls * win/makefile.vc: fix problem building with staticpkg option -2008-06-24 Don Porter +2008-06-24 Don Porter * generic/tclPathObj.c: Fixed some internals management in the "path" Tcl_ObjType for the empty string value. Problem led to a crash in the command [glob -dir {} a]. [Bug 1999176]. -2008-06-24 Pat Thoyts +2008-06-24 Pat Thoyts * doc/fileevent.n: Fix examples and comment on eof use. [Bug 1995063] -2008-06-23 Don Porter +2008-06-23 Don Porter * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when operating on the "Special path" variant of the "path" Tcl_ObjType @@ -515,12 +509,12 @@ relative paths to absolute, contrary to what the function of producing the "translated path" is supposed to do. [Bug 1972879] -2008-06-20 Don Porter +2008-06-20 Don Porter * changes: Updates for 8.6a1 release. - * generic/tclInterp.c: Fixed completely boneheaded mistake that - * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] + * generic/tclInterp.c: Fixed completely boneheaded mistake that + * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] would always act like [interp bgerror {}]. [Bug 1999035] * tests/chanio.test: Corrected flawed tests revealed by a -debug 1 @@ -543,7 +537,7 @@ * tests/oo.test (oo-14.8): that class mixins are processed in the documented order. [Bug 1998221] -2008-06-19 Don Porter +2008-06-19 Don Porter * changes: Updates for 8.6a1 release. @@ -570,7 +564,7 @@ new (underscored) form of environment variable names, but make it the encouraged form as well. [Bug 1914604] -2006-06-17 Kevin Kenny +2006-06-17 Kevin Kenny * generic/tclClock.c (ConvertLocalToUTC): * tests/clock.test (clock-63.1): Fixed a bug where the internal @@ -679,7 +673,7 @@ * generic/tclIORTrans.c: fix signed <-> unsigned cast warnings. * unix/Makefile.in: clean generated tclDTrace.h file. - * unix/configure.in (SunOS): fix static DTrace-enabled build. + * unix/configure.in (SunOS): fix static DTrace-enabled build. * unix/tcl.m4 (SunOS-5.11): fix 64bit amd64 support with gcc & Sun cc. * unix/configure: autoconf-2.59 @@ -689,7 +683,7 @@ * macosx/Tcl.xcode/project.pbxproj: sync Tcl.xcodeproj changes. * macosx/README: document new build configs. -2008-06-10 Joe English +2008-06-10 Joe English * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension when converting incomplete UTF-8 sequences. See [Bug 1908443] for @@ -721,11 +715,11 @@ 2008-06-08 Miguel Sofer - * generic/tclBasic.c: Compilation of uplevel scripts, allow + * generic/tclBasic.c: Compilation of uplevel scripts, allow * generic/tclCompCmds.c: non-body compiled scripts to access the - * generic/tclCompile.c: LVT (but not to extend it) and enable the - * generic/tclCompile.h: canonical list opt to sidestep the - * generic/tclExecute.c: compiler. This is [Patch 1973096] + * generic/tclCompile.c: LVT (but not to extend it) and enable the + * generic/tclCompile.h: canonical list opt to sidestep the + * generic/tclExecute.c: compiler. This is [Patch 1973096] * generic/tclProc.c: * tests/uplevel.test: @@ -752,7 +746,7 @@ over both modules and see which of the common parts we can factor out and share. -2008-06-04 Pat Thoyts +2008-06-04 Pat Thoyts * generic/tclBinary.c: TIP #317 implementation * tests/binary.test: @@ -778,10 +772,10 @@ 2008-06-01 Kevin B. Kenny - * generic/tclOODecls.h: Added the swizzling of DLLEXPORT and + * generic/tclOODecls.h: Added the swizzling of DLLEXPORT and * generic/tclOOIntDecls.h: DLLIMPORT needed to make EXTERN work. - * generic/tclDictObj.c: Added missing initializers to the ensemble + * generic/tclDictObj.c: Added missing initializers to the ensemble map to silence a compiler warning. Thanks to George Peter Staplin for the report. @@ -844,7 +838,7 @@ TclOO to sit directly inside Tcl. Note that this is incomplete (e.g. no build support yet for Windows). -2008-05-26 Jeff Hobbs +2008-05-26 Jeff Hobbs * tests/io.test (io-53.9): need to close chan before removing file. @@ -866,9 +860,9 @@ the supported range are now clipped to nearest boundary instead of ignored. -2008-05-22 Don Porter +2008-05-22 Don Porter - * generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to + * generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to handle the argument value length = -1. Thanks to Chris Darroch for discovering the bug and providing the fix. [Bug 1968245] @@ -891,13 +885,13 @@ * generic/tclCompile.c: fix crash with tcl_traceExec. Found and fixed by Alexander Pasadyn. [Bug 1964803] -2008-05-15 Pat Thoyts +2008-05-15 Pat Thoyts * win/makefile.vc: We should use the thread allocator for threaded - * win/rules.vc: builds. Added 'tclalloc' option to disable. + * win/rules.vc: builds. Added 'tclalloc' option to disable. 2008-05-09 George Peter Staplin - * tools/tsdPerf.c A loadable Tcl extension for testing TSD + * tools/tsdPerf.c A loadable Tcl extension for testing TSD performance. * tools/tsdPerf.tcl A simplistic tool that uses the thread extension and tsdPerf.so to get some performance metrics by, @@ -905,10 +899,10 @@ 2008-05-09 George Peter Staplin - * generic/tcl.h: Make Tcl_ThreadDataKey a void *. + * generic/tcl.h: Make Tcl_ThreadDataKey a void *. * generic/tclInt.h: Change around some function names and add some new per-platform declarations for thread-specific data functions. - * generic/tclThread.c: Make use of of the new function names that no + * generic/tclThread.c: Make use of of the new function names that no longer have a Tclp prefix. * generic/tclThreadStorage.c: Replace the core thread-specific data (TSD) mechanism with an array offset solution that eliminates the hash @@ -916,7 +910,7 @@ Kenny for his help with this. * unix/tclUnixThrd.c: Add platform-specific TSD functions for use by - * win/tclWinThrd.c: tclThreadStorage.c. + * win/tclWinThrd.c: tclThreadStorage.c. 2008-05-09 Kevin B. Kenny @@ -930,12 +924,12 @@ one error that caused a crash every time a compiled 'dict append' with more than one argument was used. Found by Colin McCormack. -2008-05-02 Pat Thoyts +2008-05-02 Pat Thoyts - * generic/tclBasic.c: Converted the [binary] command into an - * generic/tclBinary.c: ensemble. + * generic/tclBasic.c: Converted the [binary] command into an + * generic/tclBinary.c: ensemble. * generic/tclInt.h: - * test/binary.test: Updated the error tests for ensemble errors. + * test/binary.test: Updated the error tests for ensemble errors. * generic/tclFileName.c: Reverted accidental commit of TIP 316 APIs. @@ -1214,7 +1208,7 @@ * generic/tclPlatDecls.h: * generic/tclTomMathDecls.h: -2008-03-30 Kevin Kenny +2008-03-30 Kevin Kenny * generic/tclInt.h (TclIsNaN): * unix/configure.in: Added code to the configurator to check for a @@ -1260,7 +1254,7 @@ * library/tztata/America/St_Barthelemy: * library/tzdata/America/Argentina/San_Luis: * library/tzdata/Asia/Ho_Chi_Minh: - * library/tzdata/Asia/Kolkata: (new files) + * library/tzdata/Asia/Kolkata: (new files) * library/tzdata/America/Caracas: * library/tzdata/America/Havana: * library/tzdata/America/Santiago: @@ -1291,7 +1285,7 @@ * changes: Updated for 8.5.2 release. -2008-03-24 Pat Thoyts +2008-03-24 Pat Thoyts * generic/tclBinary.c: [Bug 1923966] - crash in binary format * tests/binary.test: Added tests for the above crash condition. @@ -1394,7 +1388,7 @@ * doc/info.n: Replaced {expand} with {*}. -2008-03-12 Jeff Hobbs +2008-03-12 Jeff Hobbs * unix/Makefile.in (install-libraries): Bump http to 2.7 * win/Makefile.in (install-libraries): Added -myaddr option to allow @@ -1407,7 +1401,7 @@ Added -strict option to control URL validation on per-call basis. [Bug 1560506] -2008-03-11 Jeff Hobbs +2008-03-11 Jeff Hobbs * library/http/http.tcl (http::geturl): Add -method option to support * tests/http.test (http-3.1): http PUT and DELETE requests. @@ -1470,7 +1464,7 @@ * doc/http.n: Revised to indicate that [package require http 2.5.5] is needed to get all the documented commands ([http::meta]). - * generic/tclEvent.c (TclDefaultBgErrorHandlerObjCmd): Added error + * generic/tclEvent.c (TclDefaultBgErrorHandlerObjCmd): Added error * tests/event.test (event-5.*): checking to protect against callers passing invalid return options dictionaries. [Bug 1901113] @@ -1548,12 +1542,12 @@ one caller within Tcl itself which passes a non-0-count value to Tcl_AppendObjToErrorInfo(). -2008-02-28 Joe English +2008-02-28 Joe English * unix/tclPort.h, unix/tclCompat.h, unix/tclUnixChan.h: Reduce scope of and #includes. [Patch 1903339] -2008-02-28 Joe English +2008-02-28 Joe English * unix/tclUnixChan.c, unix/tclUnixNotfy.c, unix/tclUnixPipe.c: Consolidate all code conditionalized on -DUSE_FIONBIO into one place. @@ -1577,7 +1571,7 @@ to optimize compiled [return -level 0 $x] [RFE 1794073] introduced a memory leak of the return options dictionary. Fixing that. -2008-02-27 Pat Thoyts +2008-02-27 Pat Thoyts * library/http/http.tcl: [Bug 705956] - fix inverted logic when cleaning up socket error in geturl. @@ -1595,43 +1589,43 @@ * tests/clock.test (clock-61.*, clock-62.1): Regression tests for [Bug 1862555] and [Bug 1902423]. -2008-02-26 Joe English +2008-02-26 Joe English * generic/tclIOUtil.c, unix/tclUnixPort.h, unix/tclUnixChan.c: Remove dead/unused portability-related #defines and unused conditional code. See [Patch 1901828] for discussion. -2008-02-26 Joe English +2008-02-26 Joe English * generic/tclIORChan.c (enum MethodName), * generic/tclCompExpr.c (enum Marks): More stray trailing ","s -2008-02-26 Joe English +2008-02-26 Joe English * unix/configure.in(socklen_t test): Define socklen_t as "int" if missing, not "unsigned". Use AC_TRY_COMPILE instead of AC_EGREP_HEADER. * unix/configure: regenerated. -2008-02-26 Joe English +2008-02-26 Joe English * generic/tclCompile.h: Remove stray trailing "," from enum InstOperandType definition (C99ism). -2008-02-26 Jeff Hobbs +2008-02-26 Jeff Hobbs * generic/tclUtil.c (TclReToGlob): Fix the handling of the last star * tests/regexpComp.test: possibly being escaped in determining right anchor. [Bug 1902436] -2008-02-26 Pat Thoyts +2008-02-26 Pat Thoyts * library/http/pkgIndex.tcl: Set version 2.5.5 * library/http/http.tcl: It is better to do the [eof] check after trying to read from the socket. No clashes found in testing. Added http::meta command to access the http headers. [Bug 1868845] -2008-02-22 Pat Thoyts +2008-02-22 Pat Thoyts * library/http/pkgIndex.tcl: Set version 2.5.4 * library/http/http.tcl: Always check that the state array exists @@ -1751,7 +1745,7 @@ * tests/cmdIL.test (cmdIL-7.7): Fix crash on reversing an empty list. [Bug 1876793] -2008-01-20 Jeff Hobbs +2008-01-20 Jeff Hobbs * unix/README: Minor typo fixes [Bug 1853072] @@ -1767,8 +1761,8 @@ 2008-01-15 Miguel Sofer * generic/tclCompExpr.c: Add an 'optimize' argument to - * generic/tclCompile.c: TclCompileExpr() to profit from better - * generic/tclCompile.h: literal management according to usage. + * generic/tclCompile.c: TclCompileExpr() to profit from better + * generic/tclCompile.h: literal management according to usage. * generic/tclExecute.c: * generic/tclCompExpr.c: Fix literal leak in exprs [Bug 1869989] (dgp) @@ -1781,11 +1775,11 @@ 2008-01-15 Miguel Sofer - * generic/tclBasic.c: Replacing 'operator' by 'op' in the def of + * generic/tclBasic.c: Replacing 'operator' by 'op' in the def of * generic/tclCompExpr.c: struct TclOpCmdClientData to accommodate C++ - * generic/tclCompile.h: compilers. [Bug 1855644] + * generic/tclCompile.h: compilers. [Bug 1855644] -2008-01-13 Jeff Hobbs +2008-01-13 Jeff Hobbs * win/tclWinSerial.c (SerialCloseProc, TclWinOpenSerialChannel): Use critical section for read & write side. [Bug 1353846] (newman) @@ -1808,7 +1802,7 @@ * doc/vwait.n: Add a missing be to fix a typo. -2008-01-04 Jeff Hobbs +2008-01-04 Jeff Hobbs * tools/tcltk-man2html.tcl (make-man-pages): Make man page title use more specific info on lhs to improve tabbed browser view titles. @@ -1851,9 +1845,9 @@ Improved -unique handling, now eliminating repeated elems immediately instead of marking them to avoid reinsertion at the end. -2007-12-23 Jeff Hobbs +2007-12-23 Jeff Hobbs - * generic/tclCompCmds.c (TclCompileRegexpCmd): TCL_REG_NOSUB cannot + * generic/tclCompCmds.c (TclCompileRegexpCmd): TCL_REG_NOSUB cannot * tests/regexp.test (regexp-22.2): be used because it * tests/regexpComp.test: [Bug 1857126] disallows backrefs. @@ -1879,7 +1873,7 @@ * changes: Updated for 8.5.0 release. -2007-12-19 Jeff Hobbs +2007-12-19 Jeff Hobbs * generic/tclCompCmds.c (TclCompileSwitchCmd): update switch -regexp * tests/switch.test-14.*: compilation to pass @@ -1912,14 +1906,14 @@ TclStackAlloc; insure that all memory allocators align to 16-byte boundaries on 64 bit platforms [Bug 1851832, 1851524] -2007-12-14 Jeff Hobbs +2007-12-14 Jeff Hobbs * generic/tclIOUtil.c (FsAddMountsToGlobResult): fix the tail conversion of vfs mounts. [Bug 1602539] * win/README: updated notes -2007-12-14 Pat Thoyts +2007-12-14 Pat Thoyts * tests/winFile.test: Fixed tests for win2k with long machine name @@ -1941,15 +1935,15 @@ * changes: Updated for 8.5.0 release. -2007-12-10 Jeff Hobbs +2007-12-10 Jeff Hobbs * generic/tclUtil.c (TclReToGlob): reduce escapes in conversion when not necessary - * generic/tclInt.decls: move TclByteArrayMatch and TclReToGlob + * generic/tclInt.decls: move TclByteArrayMatch and TclReToGlob * generic/tclIntDecls.h: to tclInt.h from stubs. * generic/tclStubInit.c: Add flags var to TclByteArrayMatch for - * generic/tclInt.h: future extensibility + * generic/tclInt.h: future extensibility * generic/tcl.h: define TCL_MATCH_EXACT doc for Tcl_StringCaseMatch. * doc/StrMatch.3: It is compatible with existing usage. * generic/tclExecute.c (INST_STR_MATCH): flag for TclByteArrayMatch @@ -1958,7 +1952,7 @@ * generic/tclCmdMZ.c (StringMatchCmd): Use TclStringMatchObj * tests/string.test (11.9.* 11.10.*): more tests -2007-12-10 Joe English +2007-12-10 Joe English * doc/string.n, doc/UniCharIsAlpha.3: Fix markup errors. * doc/CrtCommand.3, doc/CrtMathFnc.3, doc/FileSystem.3, @@ -1985,10 +1979,10 @@ * generic/tclPlatDecls.h: * generic/tclStubInit.c: -2007-12-09 Jeff Hobbs +2007-12-09 Jeff Hobbs * tests/io.test, tests/chanio.test (io-73.1): Make sure to invalidate - * generic/tclIO.c (SetChannelFromAny): internal rep only after + * generic/tclIO.c (SetChannelFromAny): internal rep only after validating channel rep. [Bug 1847044] 2007-12-08 Donal K. Fellows @@ -2000,7 +1994,7 @@ * doc/interp.n (SAFE INTERPRETERS): exposed commands so that the documentation and reality now match. [Bug 1662436] -2007-12-07 Jeff Hobbs +2007-12-07 Jeff Hobbs * generic/tclExecute.c (TclExecuteByteCode INST_REGEXP): * generic/tclCompCmds.c (TclCompileRegexpCmd): Pass correct RE @@ -2016,7 +2010,7 @@ * unix/README: Mention the stub library created by `make` and warn about the effect of embedded paths in the installed binaries. - Thanks to Larry Virden. [Bug 1794084] + Thanks to Larry Virden. [Bug 1794084] * doc/AddErrInfo.3: Documentation for the new routines in TIP 270. * doc/Interp.3: @@ -2027,7 +2021,7 @@ * doc/namespace.n: Documentation for zero-argument form of [namespace import] (TIP 261) [Bug 1596416] -2007-12-06 Jeff Hobbs +2007-12-06 Jeff Hobbs * generic/tclInt.h: add TclGetChannelFromObj decl (TclMatchIsTrivial): simplify TclMatchIsTrivial to remove ] check. @@ -2046,7 +2040,7 @@ * generic/tclNamesp.c (TclMakeEnsemble): Added missing release of a DString. [Bug 1845397] -2007-12-05 Jeff Hobbs +2007-12-05 Jeff Hobbs * generic/tclIO.h: Create Tcl_Obj for Tcl channels to reduce * generic/tclIO.c: overhead in lookup by Tcl_GetChannel. New @@ -2060,7 +2054,7 @@ about which mechanism caused the error (interp's recursion limit or C-stack depth detector). -2007-12-05 Jeff Hobbs +2007-12-05 Jeff Hobbs * win/configure, win/tcl.m4 (LIBS_GUI): mingw needs -lole32 -loleaut32 but not msvc for Tk's [send]. [Bug 1844749] @@ -2082,7 +2076,7 @@ * unix/Makefile.in: stable Tcl. * win/Makefile.in: -2007-12-03 Jeff Hobbs +2007-12-03 Jeff Hobbs * win/configure, win/tcl.m4 (LIBS_GUI): remove ole32.lib oleaut32.lib @@ -2094,7 +2088,7 @@ since in the two-arg case, detecting an option would definitely lead to a syntax error. [Patch 1836519] -2007-11-29 Jeff Hobbs +2007-11-29 Jeff Hobbs * win/makefile.vc: add ws2_32.lib to baselibs * win/configure, win/tcl.m4: add ws2_32.lib / -lws2_32 to build. @@ -2121,7 +2115,7 @@ * generic/tclIO.c: Simplify test and improve accuracy of error message in latest changes. -2007-11-28 Pat Thoyts +2007-11-28 Pat Thoyts * generic/tclIO.c: -eofchar must support no eofchar. @@ -2174,10 +2168,10 @@ * tests/ioCmd.test: Updated the testsuite. -2007-11-23 Jeff Hobbs +2007-11-23 Jeff Hobbs * generic/tclVar.c (Tcl_ArrayObjCmd): handle the right data for - * tests/var.test (var-14.2): [array names $var -glob $ptn] + * tests/var.test (var-14.2): [array names $var -glob $ptn] 2007-11-23 Donal K. Fellows @@ -2248,7 +2242,7 @@ * changes: Updated for 8.5b3 release. -2007-11-19 Kevin Kenny +2007-11-19 Kevin Kenny * library/tzdata/Africa/Cairo: * library/tzdata/America/Campo_Grande: @@ -2301,7 +2295,7 @@ option to their linker if they so desire. This is a configuration only recommended for (some) vendors. Relates to [Patch 1231022]. -2007-11-15 Pat Thoyts +2007-11-15 Pat Thoyts * win/tclWin32Dll.c: Prefer UINT_PTR to DWORD_PTR when casting pointers to integer types for greater portability. [Bug 1831253] @@ -2341,7 +2335,7 @@ completely. Simplifies the code quite a bit. If people still want the full code, it will remain on the 8.4 branch. [Bug 1831425] -2007-11-13 Jeff Hobbs +2007-11-13 Jeff Hobbs * generic/tclCompCmds.c (TclCompileRegexpCmd): clean up comments, only free dstring on OK from TclReToGlob. @@ -2368,7 +2362,7 @@ undefined here; this should be set (or not) in the compile options, it is used elsewhere and needs to be consistent. -2007-11-13 Pat Thoyts +2007-11-13 Pat Thoyts * unix/tcl.m4: Added autoconf goo to detect and make use of * unix/configure.in: getaddrinfo and friends. @@ -2393,7 +2387,7 @@ enabled by default, as no autoconf-ery written). Part of fix for [Bug 1618235]. -2007-11-12 Jeff Hobbs +2007-11-12 Jeff Hobbs * generic/tclGet.c (Tcl_Get, Tcl_GetInt): revert use of TclGet* macros due to compiler warning. These cases won't save time either. @@ -2415,7 +2409,7 @@ perfomance wins, which turn out to be tiny. Not worth the complication. -2007-11-11 Jeff Hobbs +2007-11-11 Jeff Hobbs * generic/tclCompCmds.c, generic/tclCompile.c, generic/tclCompile.h: * generic/tclExecute.c, generic/tclInt.decls, generic/tclIntDecls.h: @@ -2492,7 +2486,7 @@ is that "nobody does that", and so it is not worth the cost. Improved failure comments (mistachkin). -2007-11-10 Kevin Kenny +2007-11-10 Kevin Kenny * win/tclWin32Dll.c: Rewrote the Windows stack checking algorithm to use information from VirtualQuery to determine the bound of the stack. @@ -2529,7 +2523,7 @@ replace Tcl_AsyncReady and TclpCheckStackSpace by much faster variants [Patch 1829248] -2007-11-09 Jeff Hobbs +2007-11-09 Jeff Hobbs * generic/tclInt.decls, generic/tclIntDecls.h: Use unsigned char for * generic/tclExecute.c, generic/tclUtil.c: TclByteArrayMatch and @@ -2539,7 +2533,7 @@ * generic/tclBinary.c (Tcl_GetByteArrayFromObj): check type before func jump (perf). -2007-11-07 Jeff Hobbs +2007-11-07 Jeff Hobbs * generic/tclStubInit.c: Added TclByteArrayMatch * generic/tclInt.decls: for efficient glob @@ -2708,7 +2702,7 @@ 2007-10-20 Miguel Sofer - * generic/tclCompile.c: Fix comments. + * generic/tclCompile.c: Fix comments. * generic/tclExecute.c: 2007-10-18 David Gravereaux @@ -2801,12 +2795,12 @@ 2007-10-14 David Gravereaux * tools/mkdepend.tcl (new): Initial stab at generating automatic - * win/makefile.vc: dependencies. + * win/makefile.vc: dependencies. -2007-10-12 Pat Thoyts +2007-10-12 Pat Thoyts * win/makefile.vc: Mine all version information from headers. - * win/rules.vc: Sync tcl and tk and bring extension versions + * win/rules.vc: Sync tcl and tk and bring extension versions * win/nmakehlp.c: closer together. Try and avoid using tclsh to do substitutions as we may cross compile. * win/coffbase.txt: Added offsets for snack dlls. @@ -2844,7 +2838,7 @@ * doc/Hash.3: Correct the valid usage of the flags member for the Tcl_HashKeyType. It should be 0 or more of the flags mentioned. -2007-10-02 Jeff Hobbs +2007-10-02 Jeff Hobbs * generic/tcl.h (Tcl_DecrRefCount): Update change from 2006-05-29 to make macro more warning-robust in unbraced if code. @@ -2853,7 +2847,7 @@ [core-stabilizer-branch] - * README: Bump version number to 8.5.0 + * README: Bump version number to 8.5.0 * generic/tcl.h: * library/init.tcl: * tools/tcl.wse.in: @@ -2895,7 +2889,7 @@ * unix/tcl.spec: * win/configure.in: -2007-09-19 Pat Thoyts +2007-09-19 Pat Thoyts * generic/tclStubLib.: Replaced isdigit with internal implementation. @@ -2905,7 +2899,7 @@ * win/makefile.vc: that we don't need the C library linked in to libtclStub. -2007-09-17 Pat Thoyts +2007-09-17 Pat Thoyts * win/makefile.vc: Add crt flags for tclStubLib now it uses C-library functions. -- cgit v0.12 From 8f13bd76fede30fc0ad2cce6aa00582ec5eecd70 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 28 Jul 2008 21:06:07 +0000 Subject: * generic/tclBasic.c: Added missing ref count when creating an empty string as path (TclEvalEx). In 8.4 the missing code caused panics in the testsuite. It doesn't in 8.5. I am guessing that the code path with the missing the incr-refcount is not invoked any longer. Because the bug in itself is certainly the same. --- ChangeLog | 8 ++++++++ generic/tclBasic.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca5ac5b..41d5930 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-07-28 Andreas Kupries + + * generic/tclBasic.c: Added missing ref count when creating an + empty string as path (TclEvalEx). In 8.4 the missing code caused + panics in the testsuite. It doesn't in 8.5. I am guessing that the + code path with the missing the incr-refcount is not invoked any + longer. Because the bug in itself is certainly the same. + 2008-07-27 Donal K. Fellows * generic/tclOOMethod.c (PushMethodCallFrame): Remove hack that should diff --git a/generic/tclBasic.c b/generic/tclBasic.c index eb5e1c8..87a36b3 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.331 2008/07/25 22:11:19 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.332 2008/07/28 21:06:09 andreas_kupries Exp $ */ #include "tclInt.h" @@ -4923,10 +4923,10 @@ TclEvalEx( goto error; } eeFramePtr->data.eval.path = norm; - Tcl_IncrRefCount(eeFramePtr->data.eval.path); } else { TclNewLiteralStringObj(eeFramePtr->data.eval.path, ""); } + Tcl_IncrRefCount(eeFramePtr->data.eval.path); } else { /* * Set up for plain eval. -- cgit v0.12 From cf2289dd006cf8960813d308551da6f06e96d0e6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 28 Jul 2008 21:31:13 +0000 Subject: * doc/FileSystem.3: CONSTified many functions using Tcl_FileSystem * generic/tcl.decls: which all are supposed to be a constant, but * generic/tclDecls.h: this was not reflected in the API: * generic/tclFileSystem.h: Tcl_FSGetInternalRep * generic/tclIOUtil.c: Tcl_FSNewNativePath, Tcl_FSData * generic/tclPathObj.c: Tcl_FSRegister, Tcl_FSUnregister * generic/tclTest.c: Tcl_FSGetFileSystemForPath ... This change complies with TIP #24. ***POTENTIAL INCOMPATIBILITY*** --- ChangeLog | 12 ++++ doc/FileSystem.3 | 8 +-- generic/tcl.decls | 16 ++--- generic/tclDecls.h | 32 +++++----- generic/tclFileSystem.h | 18 +++--- generic/tclIOUtil.c | 164 ++++++++++++++++++++++++------------------------ generic/tclPathObj.c | 12 ++-- generic/tclTest.c | 6 +- 8 files changed, 141 insertions(+), 127 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41d5930..0e12f05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-07-28 Jan Nijtmans + + * doc/FileSystem.3: CONSTified many functions using Tcl_FileSystem + * generic/tcl.decls: which all are supposed to be a constant, but + * generic/tclDecls.h: this was not reflected in the API: + * generic/tclFileSystem.h: Tcl_FSGetInternalRep + * generic/tclIOUtil.c: Tcl_FSNewNativePath, Tcl_FSData + * generic/tclPathObj.c: Tcl_FSRegister, Tcl_FSUnregister + * generic/tclTest.c: Tcl_FSGetFileSystemForPath ... + This change complies with TIP #24. + ***POTENTIAL INCOMPATIBILITY*** + 2008-07-28 Andreas Kupries * generic/tclBasic.c: Added missing ref count when creating an diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index bf38dc2..9201d00 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.63 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.64 2008/07/28 21:31:13 nijtmans Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -27,7 +27,7 @@ ClientData void \fBTcl_FSMountsChanged\fR(\fIfsPtr\fR) .sp -Tcl_Filesystem * +const Tcl_Filesystem * \fBTcl_FSGetFileSystemForPath\fR(\fIpathPtr\fR) .sp Tcl_PathType @@ -143,7 +143,7 @@ Tcl_StatBuf * \fBTcl_AllocStatBuf\fR() .SH ARGUMENTS .AS Tcl_FSUnloadFileProc **unloadProcPtr out -.AP Tcl_Filesystem *fsPtr in +.AP "const Tcl_Filesystem" *fsPtr in Points to a structure containing the addresses of procedures that can be called to perform the various filesystem operations. .AP Tcl_Obj *pathPtr in @@ -714,7 +714,7 @@ further categorization of files. A valid list object is returned, unless the path object is not recognized, when NULL will be returned. .PP -\fBTcl_FSGetFileSystemForPath\fR returns the a pointer to the +\fBTcl_FSGetFileSystemForPath\fR returns a pointer to the \fBTcl_Filesystem\fR which accepts this path as valid. .PP If no filesystem will accept the path, NULL is returned. diff --git a/generic/tcl.decls b/generic/tcl.decls index 8fc52ac..9700497 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.140 2008/07/27 22:18:21 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.141 2008/07/28 21:31:15 nijtmans Exp $ library tcl @@ -1651,7 +1651,7 @@ declare 464 generic { } declare 465 generic { ClientData Tcl_FSGetInternalRep(Tcl_Obj* pathPtr, - Tcl_Filesystem *fsPtr) + CONST86 Tcl_Filesystem *fsPtr) } declare 466 generic { Tcl_Obj* Tcl_FSGetTranslatedPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) @@ -1660,7 +1660,7 @@ declare 467 generic { int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName) } declare 468 generic { - Tcl_Obj* Tcl_FSNewNativePath(Tcl_Filesystem* fromFilesystem, + Tcl_Obj* Tcl_FSNewNativePath(CONST86 Tcl_Filesystem* fromFilesystem, ClientData clientData) } declare 469 generic { @@ -1676,20 +1676,20 @@ declare 472 generic { Tcl_Obj* Tcl_FSListVolumes(void) } declare 473 generic { - int Tcl_FSRegister(ClientData clientData, Tcl_Filesystem *fsPtr) + int Tcl_FSRegister(ClientData clientData, CONST86 Tcl_Filesystem *fsPtr) } declare 474 generic { - int Tcl_FSUnregister(Tcl_Filesystem *fsPtr) + int Tcl_FSUnregister(CONST86 Tcl_Filesystem *fsPtr) } declare 475 generic { - ClientData Tcl_FSData(Tcl_Filesystem *fsPtr) + ClientData Tcl_FSData(CONST86 Tcl_Filesystem *fsPtr) } declare 476 generic { CONST char* Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) } declare 477 generic { - Tcl_Filesystem* Tcl_FSGetFileSystemForPath(Tcl_Obj* pathPtr) + CONST86_RETURN Tcl_Filesystem* Tcl_FSGetFileSystemForPath(Tcl_Obj* pathPtr) } declare 478 generic { Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr) @@ -1699,7 +1699,7 @@ declare 479 generic { int Tcl_OutputBuffered(Tcl_Channel chan) } declare 480 generic { - void Tcl_FSMountsChanged(Tcl_Filesystem *fsPtr) + void Tcl_FSMountsChanged(CONST86 Tcl_Filesystem *fsPtr) } # New function due to TIP#56 declare 481 generic { diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 880e40c..138911f 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.142 2008/07/27 22:18:23 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.143 2008/07/28 21:31:21 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -2827,7 +2827,7 @@ EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, #define Tcl_FSGetInternalRep_TCL_DECLARED /* 465 */ EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, - Tcl_Filesystem * fsPtr); + CONST86 Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED #define Tcl_FSGetTranslatedPath_TCL_DECLARED @@ -2844,7 +2844,8 @@ EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, #ifndef Tcl_FSNewNativePath_TCL_DECLARED #define Tcl_FSNewNativePath_TCL_DECLARED /* 468 */ -EXTERN Tcl_Obj* Tcl_FSNewNativePath (Tcl_Filesystem* fromFilesystem, +EXTERN Tcl_Obj* Tcl_FSNewNativePath ( + CONST86 Tcl_Filesystem* fromFilesystem, ClientData clientData); #endif #ifndef Tcl_FSGetNativePath_TCL_DECLARED @@ -2871,17 +2872,17 @@ EXTERN Tcl_Obj* Tcl_FSListVolumes (void); #define Tcl_FSRegister_TCL_DECLARED /* 473 */ EXTERN int Tcl_FSRegister (ClientData clientData, - Tcl_Filesystem * fsPtr); + CONST86 Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSUnregister_TCL_DECLARED #define Tcl_FSUnregister_TCL_DECLARED /* 474 */ -EXTERN int Tcl_FSUnregister (Tcl_Filesystem * fsPtr); +EXTERN int Tcl_FSUnregister (CONST86 Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSData_TCL_DECLARED #define Tcl_FSData_TCL_DECLARED /* 475 */ -EXTERN ClientData Tcl_FSData (Tcl_Filesystem * fsPtr); +EXTERN ClientData Tcl_FSData (CONST86 Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED #define Tcl_FSGetTranslatedStringPath_TCL_DECLARED @@ -2892,7 +2893,8 @@ EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, #ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED #define Tcl_FSGetFileSystemForPath_TCL_DECLARED /* 477 */ -EXTERN Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); +EXTERN CONST86_RETURN Tcl_Filesystem* Tcl_FSGetFileSystemForPath ( + Tcl_Obj* pathPtr); #endif #ifndef Tcl_FSGetPathType_TCL_DECLARED #define Tcl_FSGetPathType_TCL_DECLARED @@ -2907,7 +2909,7 @@ EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); #ifndef Tcl_FSMountsChanged_TCL_DECLARED #define Tcl_FSMountsChanged_TCL_DECLARED /* 480 */ -EXTERN void Tcl_FSMountsChanged (Tcl_Filesystem * fsPtr); +EXTERN void Tcl_FSMountsChanged (CONST86 Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_EvalTokensStandard_TCL_DECLARED #define Tcl_EvalTokensStandard_TCL_DECLARED @@ -4089,22 +4091,22 @@ typedef struct TclStubs { int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, Tcl_Filesystem * fsPtr); /* 465 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, CONST86 Tcl_Filesystem * fsPtr); /* 465 */ Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj* (*tcl_FSNewNativePath) (Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ + Tcl_Obj* (*tcl_FSNewNativePath) (CONST86 Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (Tcl_Filesystem * fsPtr); /* 475 */ + int (*tcl_FSRegister) (ClientData clientData, CONST86 Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (CONST86 Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (CONST86 Tcl_Filesystem * fsPtr); /* 475 */ CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ - Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ + CONST86_RETURN Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (Tcl_Filesystem * fsPtr); /* 480 */ + void (*tcl_FSMountsChanged) (CONST86 Tcl_Filesystem * fsPtr); /* 480 */ int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ diff --git a/generic/tclFileSystem.h b/generic/tclFileSystem.h index fee4d6e..b9ca8b9 100644 --- a/generic/tclFileSystem.h +++ b/generic/tclFileSystem.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileSystem.h,v 1.12 2008/05/02 10:27:07 dkf Exp $ + * RCS: @(#) $Id: tclFileSystem.h,v 1.13 2008/07/28 21:31:21 nijtmans Exp $ */ #ifndef _TCLFILESYSTEM @@ -29,7 +29,7 @@ typedef struct FilesystemRecord { ClientData clientData; /* Client specific data for the new filesystem * (can be NULL) */ - Tcl_Filesystem *fsPtr; /* Pointer to filesystem dispatch table. */ + const Tcl_Filesystem *fsPtr; /* Pointer to filesystem dispatch table. */ int fileRefCount; /* How many Tcl_Obj's use this filesystem. */ struct FilesystemRecord *nextPtr; /* The next filesystem registered to Tcl, or @@ -72,11 +72,11 @@ MODULE_SCOPE int TclFSNormalizeToUniquePath(Tcl_Interp *interp, MODULE_SCOPE Tcl_Obj * TclFSMakePathRelative(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_Obj *cwdPtr); MODULE_SCOPE Tcl_Obj * TclFSInternalToNormalized( - Tcl_Filesystem *fromFilesystem, + const Tcl_Filesystem *fromFilesystem, ClientData clientData, FilesystemRecord **fsRecPtrPtr); MODULE_SCOPE int TclFSEnsureEpochOk(Tcl_Obj *pathPtr, - Tcl_Filesystem **fsPtrPtr); + const Tcl_Filesystem **fsPtrPtr); MODULE_SCOPE void TclFSSetPathDetails(Tcl_Obj *pathPtr, FilesystemRecord *fsRecPtr, ClientData clientData); @@ -87,7 +87,7 @@ MODULE_SCOPE Tcl_Obj * TclFSNormalizeAbsolutePath(Tcl_Interp *interp, * Private shared variables for use by tclIOUtil.c and tclPathObj.c */ -MODULE_SCOPE Tcl_Filesystem tclNativeFilesystem; +MODULE_SCOPE const Tcl_Filesystem tclNativeFilesystem; MODULE_SCOPE Tcl_ThreadDataKey tclFsDataKey; /* @@ -96,13 +96,13 @@ MODULE_SCOPE Tcl_ThreadDataKey tclFsDataKey; */ MODULE_SCOPE Tcl_PathType TclFSGetPathType(Tcl_Obj *pathPtr, - Tcl_Filesystem **filesystemPtrPtr, + const Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr); MODULE_SCOPE Tcl_PathType TclFSNonnativePathType(const char *pathPtr, - int pathLen, Tcl_Filesystem **filesystemPtrPtr, + int pathLen, const Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr, Tcl_Obj **driveNameRef); MODULE_SCOPE Tcl_PathType TclGetPathType(Tcl_Obj *pathPtr, - Tcl_Filesystem **filesystemPtrPtr, + const Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr, Tcl_Obj **driveNameRef); MODULE_SCOPE int TclFSEpochOk(int filesystemEpoch); MODULE_SCOPE int TclFSCwdIsNative(void); @@ -113,7 +113,7 @@ MODULE_SCOPE Tcl_FSPathInFilesystemProc TclNativePathInFilesystem; MODULE_SCOPE Tcl_FSCreateInternalRepProc TclNativeCreateNativeRep; #endif /* _TCLFILESYSTEM */ - + /* * Local Variables: * mode: c diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 89465a0..93bdc4b 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.154 2008/05/02 10:27:07 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.155 2008/07/28 21:31:15 nijtmans Exp $ */ #include "tclInt.h" @@ -57,7 +57,7 @@ MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; * removed in a future release (Tcl 9 would be a good time). */ - + /* Obsolete */ int Tcl_Stat( @@ -148,7 +148,7 @@ Tcl_Stat( } return ret; } - + /* Obsolete */ int Tcl_Access( @@ -164,7 +164,7 @@ Tcl_Access( return ret; } - + /* Obsolete */ Tcl_Channel Tcl_OpenFileChannel( @@ -185,7 +185,7 @@ Tcl_OpenFileChannel( return ret; } - + /* Obsolete */ int Tcl_Chdir( @@ -198,7 +198,7 @@ Tcl_Chdir( Tcl_DecrRefCount(pathPtr); return ret; } - + /* Obsolete */ char * Tcl_GetCwd( @@ -215,7 +215,7 @@ Tcl_GetCwd( Tcl_DecrRefCount(cwd); return Tcl_DStringValue(cwdPtr); } - + /* Obsolete */ int Tcl_EvalFile( @@ -231,7 +231,7 @@ Tcl_EvalFile( Tcl_DecrRefCount(pathPtr); return ret; } - + /* * The 3 hooks for Stat, Access and OpenFileChannel are obsolete. The * complete, general hooked filesystem APIs should be used instead. This @@ -245,7 +245,7 @@ Tcl_EvalFile( * support, I suggest all these hooks are removed. */ - + /* * Declare the native filesystem support. These functions should be considered @@ -301,7 +301,7 @@ Tcl_FSListVolumesProc TclpObjListVolumes; * delving inside here! */ -Tcl_Filesystem tclNativeFilesystem = { +const Tcl_Filesystem tclNativeFilesystem = { "native", sizeof(Tcl_Filesystem), TCL_FILESYSTEM_VERSION_2, @@ -408,7 +408,7 @@ typedef struct FsDivertLoad { const Tcl_Filesystem *divertedFilesystem; ClientData divertedFileNativeRep; } FsDivertLoad; - + /* * Now move on to the basic filesystem implementation */ @@ -446,7 +446,7 @@ FsThrExitProc( } tsdPtr->initialized = 0; } - + int TclFSCwdIsNative(void) { @@ -458,7 +458,7 @@ TclFSCwdIsNative(void) return 0; } } - + /* *---------------------------------------------------------------------- * @@ -542,7 +542,7 @@ TclFSCwdPointerEquals( } } } - + #ifdef TCL_THREADS static void FsRecacheFilesystemList(void) @@ -604,7 +604,7 @@ FsRecacheFilesystemList(void) } } #endif /* TCL_THREADS */ - + static FilesystemRecord * FsGetFirstFilesystem(void) { @@ -626,7 +626,7 @@ FsGetFirstFilesystem(void) #endif return fsRecPtr; } - + /* * The epoch can be changed both by filesystems being added or removed and by * env(HOME) changing. @@ -640,7 +640,7 @@ TclFSEpochOk( (void) FsGetFirstFilesystem(); return (filesystemEpoch == tsdPtr->filesystemEpoch); } - + /* * If non-NULL, clientData is owned by us and must be freed later. */ @@ -699,7 +699,7 @@ FsUpdateCwd( Tcl_IncrRefCount(tsdPtr->cwdPathPtr); } } - + /* *---------------------------------------------------------------------- * @@ -771,7 +771,7 @@ TclFinalizeFilesystem(void) TclWinEncodingsCleanup(); #endif } - + /* *---------------------------------------------------------------------- * @@ -807,7 +807,7 @@ TclResetFilesystem(void) TclWinResetInterfaces(); #endif } - + /* *---------------------------------------------------------------------- * @@ -841,7 +841,7 @@ TclResetFilesystem(void) int Tcl_FSRegister( ClientData clientData, /* Client specific data for this fs */ - Tcl_Filesystem *fsPtr) /* The filesystem record for the new fs. */ + const Tcl_Filesystem *fsPtr) /* The filesystem record for the new fs. */ { FilesystemRecord *newFilesystemPtr; @@ -893,7 +893,7 @@ Tcl_FSRegister( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -920,7 +920,7 @@ Tcl_FSRegister( int Tcl_FSUnregister( - Tcl_Filesystem *fsPtr) /* The filesystem record to remove. */ + const Tcl_Filesystem *fsPtr) /* The filesystem record to remove. */ { int retVal = TCL_ERROR; FilesystemRecord *fsRecPtr; @@ -969,7 +969,7 @@ Tcl_FSUnregister( Tcl_MutexUnlock(&filesystemMutex); return retVal; } - + /* *---------------------------------------------------------------------- * @@ -1115,7 +1115,7 @@ Tcl_FSMatchInDirectory( Tcl_DecrRefCount(cwd); return ret; } - + /* *---------------------------------------------------------------------- * @@ -1220,7 +1220,7 @@ FsAddMountsToGlobResult( endOfMounts: Tcl_DecrRefCount(mounts); } - + /* *---------------------------------------------------------------------- * @@ -1270,7 +1270,7 @@ FsAddMountsToGlobResult( void Tcl_FSMountsChanged( - Tcl_Filesystem *fsPtr) + const Tcl_Filesystem *fsPtr) { /* * We currently don't do anything with this parameter. We could in the @@ -1289,7 +1289,7 @@ Tcl_FSMountsChanged( theFilesystemEpoch++; Tcl_MutexUnlock(&filesystemMutex); } - + /* *---------------------------------------------------------------------- * @@ -1311,7 +1311,7 @@ Tcl_FSMountsChanged( ClientData Tcl_FSData( - Tcl_Filesystem *fsPtr) /* The filesystem record to query. */ + const Tcl_Filesystem *fsPtr) /* The filesystem record to query. */ { ClientData retVal = NULL; FilesystemRecord *fsRecPtr = FsGetFirstFilesystem(); @@ -1331,7 +1331,7 @@ Tcl_FSData( return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -1424,7 +1424,7 @@ TclFSNormalizeToUniquePath( return startAt; } - + /* *--------------------------------------------------------------------------- * @@ -1454,7 +1454,7 @@ TclGetOpenMode( int binary = 0; return TclGetOpenModeEx(interp, modeString, seekFlagPtr, &binary); } - + /* *--------------------------------------------------------------------------- * @@ -1661,7 +1661,7 @@ TclGetOpenModeEx( } return mode; } - + /* * Tcl_FSEvalFile is Tcl_FSEvalFileEx without encoding argument. */ @@ -1674,7 +1674,7 @@ Tcl_FSEvalFile( { return Tcl_FSEvalFileEx(interp, pathPtr, NULL); } - + /* *---------------------------------------------------------------------- * @@ -1807,7 +1807,7 @@ Tcl_FSEvalFileEx( Tcl_DecrRefCount(objPtr); return result; } - + /* *---------------------------------------------------------------------- * @@ -1837,7 +1837,7 @@ Tcl_GetErrno(void) return errno; } - + /* *---------------------------------------------------------------------- * @@ -1865,7 +1865,7 @@ Tcl_SetErrno( errno = err; } - + /* *---------------------------------------------------------------------- * @@ -1899,7 +1899,7 @@ Tcl_PosixError( } return msg; } - + /* *---------------------------------------------------------------------- * @@ -1932,7 +1932,7 @@ Tcl_FSStat( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -1970,7 +1970,7 @@ Tcl_FSLstat( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2001,7 +2001,7 @@ Tcl_FSAccess( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2097,7 +2097,7 @@ Tcl_FSOpenFileChannel( } return NULL; } - + /* *---------------------------------------------------------------------- * @@ -2129,7 +2129,7 @@ Tcl_FSUtime( /* TODO: set errno here? Tcl_SetErrno(ENOENT); */ return -1; } - + /* *---------------------------------------------------------------------- * @@ -2157,7 +2157,7 @@ NativeFileAttrStrings( { return tclpFileAttrStrings; } - + /* *---------------------------------------------------------------------- * @@ -2190,7 +2190,7 @@ NativeFileAttrsGet( return (*tclpFileAttrProcs[index].getProc)(interp, index, pathPtr, objPtrRef); } - + /* *---------------------------------------------------------------------- * @@ -2219,7 +2219,7 @@ NativeFileAttrsSet( { return (*tclpFileAttrProcs[index].setProc)(interp, index, pathPtr, objPtr); } - + /* *---------------------------------------------------------------------- * @@ -2257,7 +2257,7 @@ Tcl_FSFileAttrStrings( Tcl_SetErrno(ENOENT); return NULL; } - + /* *---------------------------------------------------------------------- * @@ -2334,7 +2334,7 @@ TclFSFileAttrIndex( return TCL_ERROR; } } - + /* *---------------------------------------------------------------------- * @@ -2371,7 +2371,7 @@ Tcl_FSFileAttrsGet( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2405,7 +2405,7 @@ Tcl_FSFileAttrsSet( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2667,7 +2667,7 @@ Tcl_FSGetCwd( return tsdPtr->cwdPathPtr; } - + /* *---------------------------------------------------------------------- * @@ -2815,7 +2815,7 @@ Tcl_FSChdir( return retVal; } - + /* *---------------------------------------------------------------------- * @@ -2898,7 +2898,7 @@ Tcl_FSLoadFile( *handlePtr = clientData; return res; } - + /* *---------------------------------------------------------------------- * @@ -2957,7 +2957,7 @@ TclLoadFile( * file. */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - Tcl_Filesystem *copyFsPtr; + const Tcl_Filesystem *copyFsPtr; Tcl_Obj *copyToPtr; Tcl_LoadHandle newLoadHandle = NULL; ClientData newClientData = NULL; @@ -3265,7 +3265,7 @@ TclpLoadFile( *proc2Ptr = TclpFindSymbol(interp, handle, sym2); return TCL_OK; } - + /* *--------------------------------------------------------------------------- * @@ -3358,7 +3358,7 @@ FSUnloadTempFile( ckfree((char *) tvdlPtr); } - + /* *--------------------------------------------------------------------------- * @@ -3419,7 +3419,7 @@ Tcl_FSLink( #endif /* S_IFLNK */ return NULL; } - + /* *--------------------------------------------------------------------------- * @@ -3473,7 +3473,7 @@ Tcl_FSListVolumes(void) return resultPtr; } - + /* *--------------------------------------------------------------------------- * @@ -3523,7 +3523,7 @@ FsListMounts( return resultPtr; } - + /* *--------------------------------------------------------------------------- * @@ -3550,7 +3550,7 @@ Tcl_FSSplitPath( int *lenPtr) /* int to store number of path elements. */ { Tcl_Obj *result = NULL; /* Needed only to prevent gcc warnings. */ - Tcl_Filesystem *fsPtr; + const Tcl_Filesystem *fsPtr; char separator = '/'; int driveNameLength; char *p; @@ -3631,11 +3631,11 @@ Tcl_FSSplitPath( } return result; } - + /* Simple helper function */ Tcl_Obj * TclFSInternalToNormalized( - Tcl_Filesystem *fromFilesystem, + const Tcl_Filesystem *fromFilesystem, ClientData clientData, FilesystemRecord **fsRecPtrPtr) { @@ -3655,7 +3655,7 @@ TclFSInternalToNormalized( } return (*fromFilesystem->internalToNormalizedProc)(clientData); } - + /* *---------------------------------------------------------------------- * @@ -3678,7 +3678,7 @@ TclFSInternalToNormalized( Tcl_PathType TclGetPathType( Tcl_Obj *pathPtr, /* Path to determine type for */ - Tcl_Filesystem **filesystemPtrPtr, + const Tcl_Filesystem **filesystemPtrPtr, /* If absolute path and this is not NULL, then * set to the filesystem which claims this * path. */ @@ -3707,7 +3707,7 @@ TclGetPathType( } return type; } - + /* *---------------------------------------------------------------------- * @@ -3734,7 +3734,7 @@ Tcl_PathType TclFSNonnativePathType( const char *path, /* Path to determine type for */ int pathLen, /* Length of the path */ - Tcl_Filesystem **filesystemPtrPtr, + const Tcl_Filesystem **filesystemPtrPtr, /* If absolute path and this is not NULL, then * set to the filesystem which claims this * path. */ @@ -3837,7 +3837,7 @@ TclFSNonnativePathType( } return type; } - + /* *--------------------------------------------------------------------------- * @@ -3878,7 +3878,7 @@ Tcl_FSRenameFile( } return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -3920,7 +3920,7 @@ Tcl_FSCopyFile( } return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -3998,7 +3998,7 @@ TclCrossFilesystemCopy( done: return result; } - + /* *--------------------------------------------------------------------------- * @@ -4028,7 +4028,7 @@ Tcl_FSDeleteFile( Tcl_SetErrno(ENOENT); return -1; } - + /* *--------------------------------------------------------------------------- * @@ -4058,7 +4058,7 @@ Tcl_FSCreateDirectory( Tcl_SetErrno(ENOENT); return -1; } - + /* *--------------------------------------------------------------------------- * @@ -4100,7 +4100,7 @@ Tcl_FSCopyDirectory( } return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -4170,7 +4170,7 @@ Tcl_FSRemoveDirectory( Tcl_SetErrno(ENOENT); return -1; } - + /* *--------------------------------------------------------------------------- * @@ -4190,12 +4190,12 @@ Tcl_FSRemoveDirectory( *--------------------------------------------------------------------------- */ -Tcl_Filesystem * +const Tcl_Filesystem * Tcl_FSGetFileSystemForPath( Tcl_Obj *pathPtr) { FilesystemRecord *fsRecPtr; - Tcl_Filesystem *retVal = NULL; + const Tcl_Filesystem *retVal = NULL; if (pathPtr == NULL) { Tcl_Panic("Tcl_FSGetFileSystemForPath called with NULL object"); @@ -4253,7 +4253,7 @@ Tcl_FSGetFileSystemForPath( return NULL; } - + /* *--------------------------------------------------------------------------- * @@ -4289,7 +4289,7 @@ Tcl_FSGetNativePath( { return (const char *) Tcl_FSGetInternalRep(pathPtr, &tclNativeFilesystem); } - + /* *--------------------------------------------------------------------------- * @@ -4312,7 +4312,7 @@ NativeFreeInternalRep( { ckfree((char *) clientData); } - + /* *--------------------------------------------------------------------------- * @@ -4356,7 +4356,7 @@ Tcl_FSFileSystemInfo( return resPtr; } - + /* *--------------------------------------------------------------------------- * @@ -4399,7 +4399,7 @@ Tcl_FSPathSeparator( return resultObj; } } - + /* *--------------------------------------------------------------------------- * @@ -4433,7 +4433,7 @@ NativeFilesystemSeparator( return Tcl_NewStringObj(separator,1); } - + /* * Local Variables: * mode: c diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 475bf7f..1ac1496 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.72 2008/06/29 19:09:28 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.73 2008/07/28 21:31:19 nijtmans Exp $ */ #include "tclInt.h" @@ -492,7 +492,7 @@ Tcl_FSGetPathType( Tcl_PathType TclFSGetPathType( Tcl_Obj *pathPtr, - Tcl_Filesystem **filesystemPtrPtr, + const Tcl_Filesystem **filesystemPtrPtr, int *driveNameLengthPtr) { FsPath *fsPathPtr; @@ -809,7 +809,7 @@ Tcl_FSJoinPath( { Tcl_Obj *res; int i; - Tcl_Filesystem *fsPtr = NULL; + const Tcl_Filesystem *fsPtr = NULL; if (elements < 0) { if (Tcl_ListObjLength(NULL, listObj, &elements) != TCL_OK) { @@ -1511,7 +1511,7 @@ TclFSMakePathFromNormalized( Tcl_Obj * Tcl_FSNewNativePath( - Tcl_Filesystem *fromFilesystem, + const Tcl_Filesystem *fromFilesystem, ClientData clientData) { Tcl_Obj *pathPtr; @@ -2026,7 +2026,7 @@ Tcl_FSGetNormalizedPath( ClientData Tcl_FSGetInternalRep( Tcl_Obj *pathPtr, - Tcl_Filesystem *fsPtr) + const Tcl_Filesystem *fsPtr) { FsPath *srcFsPathPtr; @@ -2128,7 +2128,7 @@ Tcl_FSGetInternalRep( int TclFSEnsureEpochOk( Tcl_Obj *pathPtr, - Tcl_Filesystem **fsPtrPtr) + const Tcl_Filesystem **fsPtrPtr) { FsPath *srcFsPathPtr; diff --git a/generic/tclTest.c b/generic/tclTest.c index 3d6e2fb..3052cc9 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.117 2008/07/21 21:25:21 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.118 2008/07/28 21:31:19 nijtmans Exp $ */ #define TCL_TEST @@ -403,7 +403,7 @@ static int TestHashSystemHashCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static Tcl_Filesystem testReportingFilesystem = { +static const Tcl_Filesystem testReportingFilesystem = { "reporting", sizeof(Tcl_Filesystem), TCL_FILESYSTEM_VERSION_1, @@ -437,7 +437,7 @@ static Tcl_Filesystem testReportingFilesystem = { &TestReportChdir }; -static Tcl_Filesystem simpleFilesystem = { +static const Tcl_Filesystem simpleFilesystem = { "simple", sizeof(Tcl_Filesystem), TCL_FILESYSTEM_VERSION_1, -- cgit v0.12 From f0e9c26da804fcb46360eebe2164bf251f89f4e3 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 28 Jul 2008 22:09:31 +0000 Subject: it's tip #27, not #24 --- ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e12f05..124affc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,7 @@ * generic/tclIOUtil.c: Tcl_FSNewNativePath, Tcl_FSData * generic/tclPathObj.c: Tcl_FSRegister, Tcl_FSUnregister * generic/tclTest.c: Tcl_FSGetFileSystemForPath ... - This change complies with TIP #24. + This change complies with TIP #27. ***POTENTIAL INCOMPATIBILITY*** 2008-07-28 Andreas Kupries @@ -34,7 +34,7 @@ * generic/tclCompCmds.c: which use Tcl_ObjType directly can be * generic/tclOOMethod.c: modified to compile against both Tcl 8.5 and * generic/tclTestobj.c: Tcl 8.6. tclDecls.h regenerated - This change complies with TIP #24. + This change complies with TIP #27. ***POTENTIAL INCOMPATIBILITY*** 2008-07-25 Andreas Kupries @@ -78,7 +78,7 @@ * unix/tclUnixThrd.c: can be modified to compile against both Tcl * win/tclWinNotify.c: Tcl 8.5 and Tcl 8.6 * win/tclWinThrd.c: Regenerated tclDecls.h with "make stubs". - This change complies with TIP #24 + This change complies with TIP #27 ***POTENTIAL INCOMPATIBILITY*** 2008-07-23 Alexandre Ferrieux -- cgit v0.12 From 2eec1c8e78758156521c033507b1a4513e80d1be Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 29 Jul 2008 05:30:25 +0000 Subject: Completely revamped NRE implementation, with (almost) unchanged API. --- generic/tcl.decls | 28 +- generic/tclBasic.c | 770 ++++++++++++++++++-------------------------------- generic/tclCompile.h | 9 +- generic/tclDecls.h | 64 ++--- generic/tclExecute.c | 391 +++++++++---------------- generic/tclInt.decls | 33 ++- generic/tclInt.h | 24 +- generic/tclIntDecls.h | 85 +++--- generic/tclInterp.c | 19 +- generic/tclNRE.h | 215 ++------------ generic/tclNamesp.c | 12 +- generic/tclOOBasic.c | 7 +- generic/tclOOMethod.c | 19 +- generic/tclProc.c | 97 +------ generic/tclStubInit.c | 29 +- generic/tclTest.c | 38 ++- 16 files changed, 641 insertions(+), 1199 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 9700497..c67462e 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.141 2008/07/28 21:31:15 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.142 2008/07/29 05:30:25 msofer Exp $ library tcl @@ -2108,25 +2108,31 @@ declare 581 generic { int Tcl_Canceled(Tcl_Interp *interp, int flags) } -# NRE public interface +# TIP#304 (chan pipe) + declare 582 generic { + int Tcl_CreatePipe (Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags) +} + +# TIP #322 (NRE public interface) +declare 583 generic { Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, CONST char *cmdName, Tcl_ObjCmdProc *proc, Tcl_ObjCmdProc *nreProc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc) } -declare 583 generic { +declare 584 generic { int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) } -declare 584 generic { +declare 585 generic { int Tcl_NREvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], int flags) } -declare 585 generic { +declare 586 generic { int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *CONST objv[], int flags) } -declare 586 generic { +declare 587 generic { void Tcl_NRAddCallback(Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3) @@ -2134,18 +2140,12 @@ declare 586 generic { # For use by NR extenders, to have a simple way to also provide a (required!) # classic objProc -declare 587 generic { +declare 588 generic { int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]) } -# TIP#304 (chan pipe) - -declare 588 generic { - int Tcl_CreatePipe (Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags) -} - ############################################################################## # Define the platform specific public Tcl interface. These functions are diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 87a36b3..cb96099 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.332 2008/07/28 21:06:09 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.333 2008/07/29 05:30:25 msofer Exp $ */ #include "tclInt.h" @@ -107,7 +107,7 @@ static int DTraceObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, MODULE_SCOPE const TclStubs * const tclConstStubsPtr; /* - * Block for Tcl_EvalObjv helpers + * Tcl_EvalObjv helpers */ static void TEOV_SwitchVarFrame(Tcl_Interp *interp); @@ -120,8 +120,6 @@ static int TEOV_NotFound(Tcl_Interp *interp, int objc, static int TEOV_RunEnterTraces(Tcl_Interp *interp, Command **cmdPtrPtr, int objc, Tcl_Obj *const objv[], Namespace *lookupNsPtr); -static int NRPostProcess(Tcl_Interp *interp, int result, - int objc, Tcl_Obj *const objv[]); static Tcl_NRPostProc TEOV_RestoreVarFrame; static Tcl_NRPostProc TEOV_RunLeaveTraces; static Tcl_NRPostProc TEOV_Exception; @@ -129,7 +127,26 @@ static Tcl_NRPostProc TEOV_Error; static Tcl_NRPostProc TEOEx_ListCallback; static Tcl_NRPostProc TEOEx_ByteCodeCallback; -static Tcl_NRPostProc TailcallCallback; +static Tcl_NRPostProc NRCommand; +static Tcl_NRPostProc NRRunObjProc; + +static Tcl_NRPostProc EvalTailcall; + +#define NR_IS_COMMAND(callbackPtr) \ + (callbackPtr \ + && (callbackPtr->procPtr == NRCommand) \ + && (PTR2INT(callbackPtr->data[1]))) + +#define NR_CLEAR_COMMAND(interp) \ + TEOV_callback *callbackPtr = TOP_CB(interp); \ + \ + while (!NR_IS_COMMAND(callbackPtr)) { \ + callbackPtr = callbackPtr->nextPtr; \ + } \ + if (callbackPtr) { \ + callbackPtr->data[1] = INT2PTR(0); \ + } + /* * The following structure define the commands in the Tcl core. @@ -894,7 +911,7 @@ Tcl_CreateInterp(void) Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); } - TOP_RECORD(iPtr) = NULL; + TOP_CB(iPtr) = NULL; return interp; } @@ -3950,7 +3967,7 @@ Tcl_CancelEval( * TCL_ERROR. A result or error message is left in interp's result. * * Side effects: - * Depends on the command. + * Always pushes a callback. Other side effects depend on the command. * *---------------------------------------------------------------------- */ @@ -3967,11 +3984,15 @@ Tcl_EvalObjv( * TCL_EVAL_GLOBAL, TCL_EVAL_INVOKE and * TCL_EVAL_NOERR are currently supported. */ { - return TclEvalObjv(interp, objc, objv, flags, NULL); + int result; + TEOV_callback *rootPtr = TOP_CB(interp); + + result = TclNREvalObjv(interp, objc, objv, flags, NULL); + return TclNRRunCallbacks(interp, result, rootPtr, 0); } int -TclEvalObjv( +TclNREvalObjv( Tcl_Interp *interp, /* Interpreter in which to evaluate the * command. Also used for error reporting. */ int objc, /* Number of words in command. */ @@ -3987,40 +4008,38 @@ TclEvalObjv( { Interp *iPtr = (Interp *) interp; int result; - Namespace *lookupNsPtr = NULL; - TEOV_record *rootPtr = TOP_RECORD(iPtr); - TEOV_record *recordPtr; + Namespace *lookupNsPtr = iPtr->lookupNsPtr; Tcl_ObjCmdProc *objProc; ClientData objClientData; - int tebcCall = TEBC_CALL(iPtr); - - TEBC_CALL(iPtr) = 0; - - if (cmdPtr) { - if (iPtr->lookupNsPtr) { - iPtr->lookupNsPtr = NULL; - } - PUSH_RECORD(interp, recordPtr); - goto commandFound; - } + Command **cmdPtrPtr; + + iPtr->lookupNsPtr = NULL; + + /* + * Push a callback with cleanup tasks for commands; the cmdPtr at data[0] + * will be filled later when the command is found: save its address at + * objProcPtr. + * + * data[1] stores a marker for use by tailcalls; it will be reset to 0 by + * command redirectors (imports, alias, ensembles) so that tailcalls + * finishes the source command and not just the target. + */ - restartAtTop: + TclNRAddCallback(interp, NRCommand, NULL, INT2PTR(1), + NULL, NULL); + cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); + TclResetCancellation(interp, 0); iPtr->numLevels++; result = TclInterpReady(interp); if ((result != TCL_OK) || (objc == 0)) { - iPtr->lookupNsPtr = NULL; - iPtr->numLevels--; - goto done; + return result; } - /* - * Always push a record for the command (avoid queuing callbacks for an - * older command!) - */ - - PUSH_RECORD(interp, recordPtr); + if (cmdPtr) { + goto commandFound; + } /* * Push records for task to be done on return, in INVERSE order. First, if @@ -4035,12 +4054,9 @@ TclEvalObjv( * Configure evaluation context to match the requested flags. */ - lookupNsPtr = iPtr->lookupNsPtr; if ((flags & TCL_EVAL_INVOKE) || lookupNsPtr) { if (!lookupNsPtr) { lookupNsPtr = iPtr->globalNsPtr; - } else { - iPtr->lookupNsPtr = NULL; } } else { if (flags & TCL_EVAL_GLOBAL) { @@ -4063,15 +4079,12 @@ TclEvalObjv( if (!cmdPtr) { notFound: result = TEOV_NotFound(interp, objc, objv, lookupNsPtr); - iPtr->numLevels--; - goto done; + return result; } iPtr->cmdCount++; if (TclLimitExceeded(iPtr->limit)) { - result = TCL_ERROR; - iPtr->numLevels--; - goto done; + return TCL_ERROR; } /* @@ -4090,8 +4103,7 @@ TclEvalObjv( goto notFound; } if (result != TCL_OK) { - iPtr->numLevels--; - goto done; + return result; } } @@ -4115,154 +4127,38 @@ TclEvalObjv( } /* - * Finally, invoke the command's Tcl_ObjCmdProc. - * - * Do the NR dance right here: - * - for non-NR enabled commands, just sigh and call the objProc - * - for NR-enabled commands call the part1, decide what to do with the - * continuation: - * . if it is a bytecode AND we were called by TEBC, pass it back. - * Otherwise just call a new TEBC on it. Don't register the - * callback, TEBC handles those. - * . if it is a command and it has a callback, push the callback - * into the TODO list, set the params as needed and restart at the - * top. - * - * Note that I removed the DTRACE thing: I have not really thought about - * where it really belongs, and do not really know what it does either. + * Fix the original callback to point to the now known cmdPtr. Insure that + * the Command struct lives until the command returns. */ - objProc = cmdPtr->nreProc; - if (!objProc) { - objProc = cmdPtr->objProc; - } - objClientData = cmdPtr->objClientData; - - COMPLETE_RECORD(recordPtr); + *cmdPtrPtr = cmdPtr; cmdPtr->refCount++; - - /* - * If this is an NR-enabled command, find the real objProc. - */ - - result = (*objProc)(objClientData, interp, objc, objv); - if (result != TCL_OK) { -#if 0 - TclStackPurge(interp, recordPtr->tosPtr); -#endif - goto done; - } - + /* - * We got a valid callback request: let us complete the corresponding - * record and proceed with the next call. + * Find the objProc to call: nreProc if available, objProc otherwise. Push + * a callback to do the actual running. */ - callbackReentryPoint: - switch(recordPtr->type) { - case TCL_NR_NO_TYPE: - break; - case TCL_NR_BC_TYPE: - tcl_nr_bc_type: - if (USE_NR_TEBC && tebcCall) { - return TCL_OK; - } - - /* - * No TEBC atop - we'll just have to instantiate a new one and do the - * callback on return. - */ - - result = TclExecuteByteCode(interp, recordPtr->data.codePtr); - goto done; - case TCL_NR_TAILCALL_TYPE: - /* - * Proceed to cleanup the current command, the tailcall will be run - * from the callbacks. - */ - - if (USE_NR_TEBC && tebcCall) { - return TCL_OK; - } - recordPtr->type = TCL_NR_NO_TYPE; - break; - case TCL_NR_CMD_TYPE: { - /* - * We got an unshared canonical list to eval , do it from here. - */ - - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - Tcl_Obj **elemPtr; - - flags = recordPtr->data.obj.flags; - Tcl_ListObjGetElements(NULL, objPtr, &objc, &elemPtr); - objv = elemPtr; - if (objc != 0) { - goto restartAtTop; - } - goto done; - } - case TCL_NR_SCRIPT_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - - flags = recordPtr->data.obj.flags; - if (USE_NR_TEBC && tebcCall) { - result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); - if (result == TCL_OK) { - switch (recordPtr->type) { - case TCL_NR_BC_TYPE: - goto tcl_nr_bc_type; - case TCL_NR_NO_TYPE: - goto done; - default: - Tcl_Panic("TEOEx called from TEOV returns unexpected record type: %d", - recordPtr->type); - } - } - } else { - result = TclEvalObjEx(interp, objPtr, flags, NULL, 0); - } - goto done; - } - case TCL_NR_CMDSWAP_TYPE: - /* - * This is a cmdPtr swap like ns-import does. - */ - - cmdPtr = recordPtr->cmdPtr; - objc = recordPtr->data.objcv.objc; - objv = recordPtr->data.objcv.objv; - recordPtr->type = TCL_NR_NO_TYPE; - goto commandFound; - default: - Tcl_Panic("TEOV: unknown NR-request type %i!", recordPtr->type); - } - - done: - result = TclEvalObjv_NR2(interp, result, rootPtr); - recordPtr = TOP_RECORD(iPtr); - if (recordPtr == rootPtr) { - return result; + objProc = cmdPtr->nreProc; + if (!objProc) { + objProc = cmdPtr->objProc; } + objClientData = cmdPtr->objClientData; - /* - * A callback scheduled a new evaluation! Deal with it. - * Note that recordPtr was already updated right above. - */ - - assert((result == TCL_OK)); - goto callbackReentryPoint; + TclNRAddCallback(interp, NRRunObjProc, objProc, objClientData, + INT2PTR(objc), (ClientData) objv); + return TCL_OK; } int -TclEvalObjv_NR2( +TclNRRunCallbacks( Tcl_Interp *interp, int result, - struct TEOV_record *rootPtr) + struct TEOV_callback *rootPtr, + int tebcCall) { Interp *iPtr = (Interp *) interp; - TEOV_record *recordPtr; - TEOV_callback *callbackPtr; + TEOV_callback *callbackPtr = TOP_CB(interp); /* * If the interpreter has a non-empty string result, the result object is @@ -4278,68 +4174,57 @@ TclEvalObjv_NR2( (void) Tcl_GetObjResult(interp); } - restart: - while ((recordPtr = TOP_RECORD(iPtr)) != rootPtr) { - while (recordPtr->callbackPtr) { - callbackPtr = recordPtr->callbackPtr; - recordPtr->callbackPtr = callbackPtr->nextPtr; - result = callbackPtr->procPtr(callbackPtr->data, interp, result); - TclSmallFree(callbackPtr); - - if (recordPtr != TOP_RECORD(iPtr)) { - - if (result != TCL_OK) { - goto restart; - } + while (TOP_CB(interp) != rootPtr) { + callbackPtr = TOP_CB(interp); + if (tebcCall) { + if ((callbackPtr->procPtr == NRRunBytecode) || + (callbackPtr->procPtr == NRDropCommand)) { /* - * A callback scheduled a new evaluation; return so that our - * caller can run it. + * TEBC pass thru: let the caller tebc handle and get rid of + * this callback. */ - switch(recordPtr->type) { - case TCL_NR_NO_TYPE: - goto restart; - case TCL_NR_BC_TYPE: - case TCL_NR_CMD_TYPE: - case TCL_NR_SCRIPT_TYPE: - case TCL_NR_CMDSWAP_TYPE: - goto done; - case TCL_NR_TAILCALL_TYPE: - Tcl_Panic("Tailcall called from a callback!"); - default: - Tcl_Panic("TEOV_NR2: invalid record type: %d", - recordPtr->type); - } + return TCL_OK; } } - TOP_RECORD(iPtr) = recordPtr->nextPtr; - - if (!CHECK_EXTRA(iPtr, recordPtr)) { - Tcl_Panic("TclEvalObjv_NR2: wrong tosPtr?"); - /* TclStackPurge(interp, recordPtr->tosPtr); */ - } /* - * Decrement the reference count of cmdPtr and deallocate it if it has - * dropped to zero. The level only needs fixing for records that - * pushed a cmdPtr. + * IMPLEMENTATION REMARKS (FIXME) + * + * Add here other direct handling possibilities for optimisation? + * One could handle the very frequent NRCommand and NRRunObjProc right + * here to save an indirect function call and improve icache + * management. Would it? Test it, time it ... */ - if (recordPtr->cmdPtr) { - TclCleanupCommandMacro(recordPtr->cmdPtr); - iPtr->numLevels--; - } - - FREE_RECORD(iPtr, recordPtr); + TOP_CB(interp) = callbackPtr->nextPtr; + result = callbackPtr->procPtr(callbackPtr->data, interp, result); + TCLNR_FREE(interp, callbackPtr); } + return result; +} - /* - * Do not interrupt a series of cleanups with async or limit checks: just - * check at the end. - */ +static int +NRCommand( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Command *cmdPtr = data[0]; + /* int cmdStart = PTR2INT(data[1]); NOT USED HERE */ - done: + + if (cmdPtr) { + TclCleanupCommandMacro(cmdPtr); + } + ((Interp *)interp)->numLevels--; + + /* OPT ?? + * Do not interrupt a series of cleanups with async or limit checks: + * just check at the end? + */ if (TclAsyncReady(iPtr)) { result = Tcl_AsyncInvoke(interp, result); @@ -4350,6 +4235,52 @@ TclEvalObjv_NR2( if (result == TCL_OK && TclLimitReady(iPtr->limit)) { result = Tcl_LimitCheck(interp); } + return result; +} + +static int +NRRunObjProc( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + /* OPT: do not call? */ + + Tcl_ObjCmdProc *objProc = data[0]; + ClientData objClientData = data[1]; + int objc = PTR2INT(data[2]); + Tcl_Obj **objv = data[3]; + + if (result == TCL_OK) { + return (*objProc)(objClientData, interp, objc, objv); + } + return result; +} + +int +NRRunBytecode( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + ByteCode *codePtr = data[0]; + + if (result == TCL_OK) { + return TclExecuteByteCode(interp, codePtr); + } + return result; +} + +int +NRDropCommand( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + /* For tailcalls! + * drop all callbacks until the last command start: nothing to do here, + * just need this to be able to pass it up to tebc. + */ return result; } @@ -4670,7 +4601,7 @@ TEOV_RunLeaveTraces( Tcl_DecrRefCount(commandPtr); /* - * As cmdPtr is set, TclEvalObjv_NR2 is about to reduce the numlevels. + * As cmdPtr is set, TclNRRunCallbacks is about to reduce the numlevels. * Prevent that by resetting the cmdPtr field and dealing right here with * cmdPtr->refCount. */ @@ -5110,7 +5041,7 @@ TclEvalEx( TclArgumentEnter(interp, objv, objectsUsed, eeFramePtr); iPtr->cmdFramePtr = eeFramePtr; - code = TclEvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR, NULL); + code = Tcl_EvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR); iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; TclArgumentRelease(interp, objv, objectsUsed); @@ -5706,17 +5637,10 @@ TclEvalObjEx( int word) /* Index of the word which is in objPtr. */ { int result = TCL_OK; - TEOV_record *recordPtr; - - /* - * Push an empty record. If this is an NR call, it will modify it - * accordingly. - */ + TEOV_callback *rootPtr = TOP_CB(interp); - PUSH_RECORD(interp, recordPtr); result = TclNREvalObjEx(interp, objPtr, flags, invoker, word); - assert((TOP_RECORD(interp) == recordPtr)); - return NRPostProcess(interp, result, 0, NULL); + return TclNRRunCallbacks(interp, result, rootPtr, 0); } int @@ -5759,28 +5683,15 @@ TclNREvalObjEx( if (objPtr->bytes == NULL || /* ...without a string rep */ listRepPtr->canonicalFlag) { /* ...or that is canonical */ + Tcl_Obj *listPtr = objPtr; + CmdFrame *eoFramePtr = NULL; + int objc; + Tcl_Obj **objv; + /* * TIP #280 Structures for tracking lines. As we know that this is * dynamic execution we ignore the invoker, even if known. - */ - - CmdFrame *eoFramePtr; - - eoFramePtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); - eoFramePtr->nline = 0; - eoFramePtr->line = NULL; - - eoFramePtr->type = TCL_LOCATION_EVAL_LIST; - eoFramePtr->level = (iPtr->cmdFramePtr == NULL? - 1 : iPtr->cmdFramePtr->level + 1); - eoFramePtr->numLevels = iPtr->numLevels; - eoFramePtr->framePtr = iPtr->framePtr; - eoFramePtr->nextPtr = iPtr->cmdFramePtr; - - eoFramePtr->cmd.listPtr = objPtr; - eoFramePtr->data.eval.path = NULL; - - /* + * * TIP #280. We do _not_ compute all the line numbers for the * words in the command. For the eval of a pure list the most * sensible choice is to put all words on line 1. Given that we @@ -5788,13 +5699,44 @@ TclNREvalObjEx( * left NULL. The two places using this information (TclInfoFrame, * and TclInitCompileEnv), are special-cased to use the proper * line number directly instead of accessing the 'line' array. + * + * Note that we use (word==INTMIN) to signal that no command frame + * should be pushed, as needed by alias and ensemble redirections. */ - iPtr->cmdFramePtr = eoFramePtr; + if (word != INT_MIN) { + eoFramePtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); + eoFramePtr->nline = 0; + eoFramePtr->line = NULL; + + eoFramePtr->type = TCL_LOCATION_EVAL_LIST; + eoFramePtr->level = (iPtr->cmdFramePtr == NULL? + 1 : iPtr->cmdFramePtr->level + 1); + eoFramePtr->numLevels = iPtr->numLevels; + eoFramePtr->framePtr = iPtr->framePtr; + eoFramePtr->nextPtr = iPtr->cmdFramePtr; + + eoFramePtr->cmd.listPtr = objPtr; + eoFramePtr->data.eval.path = NULL; + + iPtr->cmdFramePtr = eoFramePtr; + } + + /* + * Shimmer protection! Always pass an unshared obj. The caller could + * incr the refCount of objPtr AFTER calling us! To be completely safe + * we always make a copy. + * + * FIXME OPT: preserve just the internal rep? + */ + listPtr = TclListObjCopy(interp, objPtr); + Tcl_IncrRefCount(listPtr); TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, - NULL, NULL); - return Tcl_NREvalObj(interp, objPtr, flags); + listPtr, NULL); + + ListObjGetElements(listPtr, objc, objv); + return TclNREvalObjv(interp, objc, objv, flags, NULL); } } @@ -5806,7 +5748,7 @@ TclNREvalObjEx( * We transfer this to the byte code compiler. */ - ByteCode *newCodePtr; + ByteCode *codePtr; CallFrame *savedVarFramePtr = NULL; /* Saves old copy of * iPtr->varFramePtr in case * TCL_EVAL_GLOBAL was set. */ @@ -5815,18 +5757,12 @@ TclNREvalObjEx( savedVarFramePtr = iPtr->varFramePtr; iPtr->varFramePtr = iPtr->rootFramePtr; } + codePtr = TclCompileObj(interp, objPtr, invoker, word); + TclNRAddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, objPtr, INT2PTR(allowExceptions), NULL); - - newCodePtr = TclCompileObj(interp, objPtr, invoker, word); - if (newCodePtr) { - TEOV_record *recordPtr = TOP_RECORD(interp); - - recordPtr->type = TCL_NR_BC_TYPE; - recordPtr->data.codePtr = newCodePtr; - return TCL_OK; - } - return TCL_ERROR; + TclNRAddCallback(interp, NRRunBytecode, codePtr, NULL, NULL, NULL); + return TCL_OK; } /* @@ -5962,14 +5898,18 @@ TEOEx_ListCallback( Interp *iPtr = (Interp *) interp; Tcl_Obj *objPtr = data[0]; CmdFrame *eoFramePtr = data[1]; + Tcl_Obj *listPtr = data[2]; /* * Remove the cmdFrame */ - iPtr->cmdFramePtr = eoFramePtr->nextPtr; - TclStackFree(interp, eoFramePtr); + if (eoFramePtr) { + iPtr->cmdFramePtr = eoFramePtr->nextPtr; + TclStackFree(interp, eoFramePtr); + } TclDecrRefCount(objPtr); + TclDecrRefCount(listPtr); return result; } @@ -7764,76 +7704,10 @@ Tcl_NRCallObjProc( Tcl_Obj *const objv[]) { int result = TCL_OK; - TEOV_record *recordPtr; + TEOV_callback *rootPtr = TOP_CB(interp); - /* - * Push an empty record. If this is an NR call, it will modify it - * accordingly. - */ - - PUSH_RECORD(interp, recordPtr); result = (*objProc)(clientData, interp, objc, objv); - return NRPostProcess(interp, result, objc, objv); -} - -static int -NRPostProcess( - Tcl_Interp *interp, - int result, - int objc, - Tcl_Obj *const objv[]) -{ - TEOV_record *recordPtr, *rootPtr = TOP_RECORD(interp)->nextPtr; - - restart: - recordPtr = TOP_RECORD(interp); - if (result == TCL_OK) { - switch (recordPtr->type) { - case TCL_NR_NO_TYPE: - break; - case TCL_NR_BC_TYPE: - result = TclExecuteByteCode(interp, recordPtr->data.codePtr); - break; - case TCL_NR_TAILCALL_TYPE: - Tcl_SetResult(interp, - "impossible to tailcall from a non-NRE enabled command", - TCL_STATIC); - result = TCL_ERROR; - break; - case TCL_NR_CMD_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - int flags = recordPtr->data.obj.flags; - Tcl_Obj **objv; - int objc; - - Tcl_ListObjGetElements(NULL, objPtr, &objc, &objv); - result = TclEvalObjv(interp, objc, objv, flags, NULL); - break; - } - case TCL_NR_SCRIPT_TYPE: { - Tcl_Obj *objPtr = recordPtr->data.obj.objPtr; - int flags = recordPtr->data.obj.flags; - - result = TclNREvalObjEx(interp, objPtr, flags, NULL, 0); - break; - } - case TCL_NR_CMDSWAP_TYPE: { - result = TclEvalObjv(interp, recordPtr->data.objcv.objc, - recordPtr->data.objcv.objv, 0, recordPtr->cmdPtr); - break; - } - default: - Tcl_Panic("NRPostProcess: invalid record type: %d", - recordPtr->type); - } - } - - result = TclEvalObjv_NR2(interp, result, rootPtr); - if (TOP_RECORD(interp) != rootPtr) { - assert((result == TCL_OK)); - goto restart; - } - return result; + return TclNRRunCallbacks(interp, result, rootPtr, 0); } /* @@ -7891,31 +7765,18 @@ Tcl_NRCreateCommand( return (Tcl_Command) cmdPtr; } -/* - * These are the previous contents of tclNRE.c, part of the NRE api. - * - * TclNREvalCmd should only be called as an optimisation: when objPtr is known - * to be a canonical list that is not (and will not!) be shared - */ +/**************************************************************************** + * Stuff for the public api + ****************************************************************************/ int -TclNREvalCmd( +Tcl_NREvalObj( Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) { - TEOV_record *recordPtr = TOP_RECORD(interp); - - Tcl_IncrRefCount(objPtr); - recordPtr->type = TCL_NR_CMD_TYPE; - recordPtr->data.obj.objPtr = objPtr; - recordPtr->data.obj.flags = flags; - return TCL_OK; + return TclNREvalObjEx(interp, objPtr, flags, NULL, INT_MIN); } - -/**************************************************************************** - * Stuff for the public api - ****************************************************************************/ int Tcl_NREvalObjv( @@ -7929,42 +7790,14 @@ Tcl_NREvalObjv( * TCL_EVAL_GLOBAL, TCL_EVAL_INVOKE and * TCL_EVAL_NOERR are currently supported. */ { - Tcl_Obj *listPtr = Tcl_NewListObj(objc, objv); - - return TclNREvalCmd(interp, listPtr, flags); + return TclNREvalObjv(interp, objc, objv, flags, NULL); } -int -Tcl_NREvalObj( - Tcl_Interp *interp, - Tcl_Obj *objPtr, - int flags) +void +TclNRClearCommandFlag( + Tcl_Interp *interp) { - TEOV_record *recordPtr = TOP_RECORD(interp); - List *listRep = objPtr->internalRep.twoPtrValue.ptr1; - - Tcl_IncrRefCount(objPtr); - if ((objPtr->typePtr == &tclListType) - && (!objPtr->bytes || listRep->canonicalFlag)) { - /* - * Shimmer protection! Always pass an unshared obj. The caller could - * incr the refCount of objPtr AFTER calling us! To be completely safe - * we always make a copy. - */ - - Tcl_Obj *origPtr = objPtr; - - objPtr = TclListObjCopy(NULL, origPtr); - Tcl_IncrRefCount(objPtr); - TclDecrRefCount(origPtr); - - recordPtr->type = TCL_NR_CMD_TYPE; - } else { - recordPtr->type = TCL_NR_SCRIPT_TYPE; - } - recordPtr->data.obj.objPtr = objPtr; - recordPtr->data.obj.flags = flags; - return TCL_OK; + NR_CLEAR_COMMAND(interp); } int @@ -7972,16 +7805,14 @@ Tcl_NRCmdSwap( Tcl_Interp *interp, Tcl_Command cmd, int objc, - Tcl_Obj *const objv[]) + Tcl_Obj *const objv[], + int flags) { - TEOV_record *recordPtr = TOP_RECORD(interp); - - recordPtr->type = TCL_NR_CMDSWAP_TYPE; - recordPtr->cmdPtr = (Command *) cmd; - recordPtr->data.objcv.objc = objc; - recordPtr->data.objcv.objv = (Tcl_Obj **) objv; + int result; - return TCL_OK; + result = TclNREvalObjv(interp, objc, objv, flags, (Command *)cmd); + NR_CLEAR_COMMAND(interp); + return result; } /***************************************************************************** @@ -8016,85 +7847,82 @@ TclTailcallObjCmd( Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; - TEOV_record *rootPtr = TOP_RECORD(interp); - TEOV_callback *headPtr, *tailPtr; - TEOV_record *tmpPtr; - Tcl_Obj *listPtr; + TEOV_callback *rootPtr = TOP_CB(interp); + TEOV_callback *tailPtr; + Tcl_Obj *scriptPtr; Namespace *nsPtr = iPtr->varFramePtr->nsPtr; - - if (!iPtr->varFramePtr->isProcCallFrame) { - /* FIXME! Why error? Just look if we have a TEOV above! */ - Tcl_SetResult(interp, - "tailcall can only be called from a proc or lambda", TCL_STATIC); - return TCL_ERROR; + int count; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); } - nsPtr->activationCount++; - listPtr = Tcl_NewListObj(objc-1, objv+1); - rootPtr->type = TCL_NR_TAILCALL_TYPE; - /* - * Add a callback to perform the tailcall as LAST item in the caller's + * Add a callback to perform the tailcall as LAST item in the CALLER's * callback stack. - * Find the first record for the caller: start at the one below the top - * (the top being this command's record), and go back until you find - * the one that contains the cmdPtr. + * Find the first record for the caller: + * 1. find the SECOND callback that contains a cmdPtr below the top (note + * that the FIRST one correspond to this TclTailcallObjCmd call) + * 2. set the callback for the tailcalled command below that */ - tmpPtr = rootPtr->nextPtr; - while (tmpPtr->cmdPtr == NULL) { - tmpPtr = tmpPtr->nextPtr; + tailPtr = rootPtr; + count = NR_IS_COMMAND(tailPtr); + while (tailPtr && tailPtr->nextPtr && (count < 2)) { + tailPtr = tailPtr->nextPtr; + count += NR_IS_COMMAND(tailPtr); } - /* - * Now find the first and last callbacks in this record, and temporarily - * set the callback list to empty. - */ - - headPtr = tailPtr = tmpPtr->callbackPtr; - if (headPtr) { - while (tailPtr->nextPtr) { - tailPtr = tailPtr->nextPtr; - } - tmpPtr->callbackPtr = NULL; +#if 1 + if (!iPtr->varFramePtr->isProcCallFrame) { + /* FIXME! Why error? Just look if we have a TEOV above! */ + Tcl_SetResult(interp, + "tailcall can only be called from a proc or lambda", TCL_STATIC); + return TCL_ERROR; + } +#else + if (!tailPtr->nextPtr) { + /* FIXME! Is this the behaviour we want? */ + Tcl_SetResult(interp, + "cannot tailcall: not running a command", TCL_STATIC); + return TCL_ERROR; } +#endif /* - * Temporarily put tmpPtr as the TOP_RECORD, register a callback, then + * Temporarily put NULL as the TOP_BC, register a callback, then * replug things back the way they were. */ - TOP_RECORD(iPtr) = tmpPtr; - TclNRAddCallback(interp, TailcallCallback, listPtr, nsPtr, NULL, NULL); - TOP_RECORD(iPtr) = rootPtr; - - if (headPtr) { - tailPtr->nextPtr = tmpPtr->callbackPtr; - tmpPtr->callbackPtr = headPtr; + nsPtr->activationCount++; + if (objc == 2) { + scriptPtr = objv[1]; + } else { + scriptPtr = Tcl_NewListObj(objc-1, objv+1); } + TOP_CB(iPtr) = tailPtr->nextPtr; + TclNRAddCallback(interp, EvalTailcall, scriptPtr, nsPtr, NULL, NULL); + tailPtr->nextPtr = TOP_CB(iPtr); + TOP_CB(iPtr) = rootPtr; + + TclNRAddCallback(interp, NRDropCommand, NULL, NULL, NULL, NULL); return TCL_OK; } static int -TailcallCallback( +EvalTailcall( ClientData data[], Tcl_Interp *interp, int result) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *listPtr = data[0], *namePtr; + Tcl_Obj *scriptPtr = data[0]; Namespace *nsPtr = data[1]; - TEOV_record *recordPtr = TOP_RECORD(iPtr); - Command *cmdPtr = NULL; - if (!recordPtr->cmdPtr || recordPtr->callbackPtr) { - Tcl_Panic("TailcallCallback: should not happen!"); - } - - result = Tcl_ListObjIndex(interp, listPtr, 0, &namePtr); if (result == TCL_OK) { - cmdPtr = TEOV_LookupCmdFromObj(interp, namePtr, nsPtr); + iPtr->lookupNsPtr = nsPtr; + result = TclNREvalObjEx(interp, scriptPtr, 0, NULL, 0); } nsPtr->activationCount--; @@ -8107,29 +7935,7 @@ TailcallCallback( Tcl_DeleteNamespace((Tcl_Namespace *) nsPtr); } - - if (!cmdPtr || (result != TCL_OK)) { - Tcl_DecrRefCount(listPtr); - Tcl_SetResult(interp, - "the command to be tailcalled does not exist", TCL_STATIC); - return TCL_ERROR; - } - - /* - * Take over the previous command's record. - */ - - TclCleanupCommandMacro(recordPtr->cmdPtr); - recordPtr->cmdPtr = cmdPtr; - cmdPtr->refCount++; - - /* - * Push a new record to signal that a new command was scheduled. - */ - - PUSH_RECORD(iPtr, recordPtr); - iPtr->lookupNsPtr = nsPtr; - return TclNREvalCmd(interp, listPtr, 0); + return result; } void @@ -8142,31 +7948,11 @@ Tcl_NRAddCallback( ClientData data3) { if (!(postProcPtr)) { - Tcl_Panic("Adding a callback without and objProc?!"); + Tcl_Panic("Adding a callback without an objProc?!"); } TclNRAddCallback(interp, postProcPtr, data0, data1, data2, data3); } -TEOV_record * -TclNRPushRecord( - Tcl_Interp *interp) -{ - TEOV_record *recordPtr; - - PUSH_RECORD(interp, recordPtr); - return recordPtr; -} - -void -TclNRPopAndFreeRecord( - Tcl_Interp *interp) -{ - TEOV_record *recordPtr; - - POP_RECORD(interp, recordPtr); - FREE_RECORD(interp, recordPtr); -} - /* * Local Variables: * mode: c diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 63df8ce..c5ab71d 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.96 2008/07/22 22:24:21 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.97 2008/07/29 05:30:25 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -830,15 +830,16 @@ typedef struct { } i; } TclOpCmdClientData; + /* *---------------------------------------------------------------- * Procedures exported by tclBasic.c to be used within the engine. *---------------------------------------------------------------- */ -MODULE_SCOPE int TclEvalObjvInternal(Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[], - const char *command, int length, int flags); +MODULE_SCOPE Tcl_NRPostProc NRRunBytecode; +MODULE_SCOPE Tcl_NRPostProc NRDropCommand; + /* *---------------------------------------------------------------- * Procedures exported by the engine to be used by tclBasic.c diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 138911f..1417bf9 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.143 2008/07/28 21:31:21 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.144 2008/07/29 05:30:25 msofer Exp $ */ #ifndef _TCLDECLS @@ -3517,9 +3517,16 @@ EXTERN int Tcl_CancelEval (Tcl_Interp * interp, /* 581 */ EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); #endif +#ifndef Tcl_CreatePipe_TCL_DECLARED +#define Tcl_CreatePipe_TCL_DECLARED +/* 582 */ +EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, + Tcl_Channel * rchan, Tcl_Channel * wchan, + int flags); +#endif #ifndef Tcl_NRCreateCommand_TCL_DECLARED #define Tcl_NRCreateCommand_TCL_DECLARED -/* 582 */ +/* 583 */ EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, @@ -3528,25 +3535,25 @@ EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, #endif #ifndef Tcl_NREvalObj_TCL_DECLARED #define Tcl_NREvalObj_TCL_DECLARED -/* 583 */ +/* 584 */ EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); #endif #ifndef Tcl_NREvalObjv_TCL_DECLARED #define Tcl_NREvalObjv_TCL_DECLARED -/* 584 */ +/* 585 */ EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); #endif #ifndef Tcl_NRCmdSwap_TCL_DECLARED #define Tcl_NRCmdSwap_TCL_DECLARED -/* 585 */ +/* 586 */ EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *CONST objv[], int flags); #endif #ifndef Tcl_NRAddCallback_TCL_DECLARED #define Tcl_NRAddCallback_TCL_DECLARED -/* 586 */ +/* 587 */ EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, @@ -3554,19 +3561,12 @@ EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, #endif #ifndef Tcl_NRCallObjProc_TCL_DECLARED #define Tcl_NRCallObjProc_TCL_DECLARED -/* 587 */ +/* 588 */ EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); #endif -#ifndef Tcl_CreatePipe_TCL_DECLARED -#define Tcl_CreatePipe_TCL_DECLARED -/* 588 */ -EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, - Tcl_Channel * rchan, Tcl_Channel * wchan, - int flags); -#endif typedef struct TclStubHooks { CONST struct TclPlatStubs *tclPlatStubs; @@ -4208,13 +4208,13 @@ typedef struct TclStubs { void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ - Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 582 */ - int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 583 */ - int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 584 */ - int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[]); /* 585 */ - void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 586 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); /* 587 */ - int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 588 */ + int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 582 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ + int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 584 */ + int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 585 */ + int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[], int flags); /* 586 */ + void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); /* 588 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6615,33 +6615,33 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_Canceled \ (tclStubsPtr->tcl_Canceled) /* 581 */ #endif +#ifndef Tcl_CreatePipe +#define Tcl_CreatePipe \ + (tclStubsPtr->tcl_CreatePipe) /* 582 */ +#endif #ifndef Tcl_NRCreateCommand #define Tcl_NRCreateCommand \ - (tclStubsPtr->tcl_NRCreateCommand) /* 582 */ + (tclStubsPtr->tcl_NRCreateCommand) /* 583 */ #endif #ifndef Tcl_NREvalObj #define Tcl_NREvalObj \ - (tclStubsPtr->tcl_NREvalObj) /* 583 */ + (tclStubsPtr->tcl_NREvalObj) /* 584 */ #endif #ifndef Tcl_NREvalObjv #define Tcl_NREvalObjv \ - (tclStubsPtr->tcl_NREvalObjv) /* 584 */ + (tclStubsPtr->tcl_NREvalObjv) /* 585 */ #endif #ifndef Tcl_NRCmdSwap #define Tcl_NRCmdSwap \ - (tclStubsPtr->tcl_NRCmdSwap) /* 585 */ + (tclStubsPtr->tcl_NRCmdSwap) /* 586 */ #endif #ifndef Tcl_NRAddCallback #define Tcl_NRAddCallback \ - (tclStubsPtr->tcl_NRAddCallback) /* 586 */ + (tclStubsPtr->tcl_NRAddCallback) /* 587 */ #endif #ifndef Tcl_NRCallObjProc #define Tcl_NRCallObjProc \ - (tclStubsPtr->tcl_NRCallObjProc) /* 587 */ -#endif -#ifndef Tcl_CreatePipe -#define Tcl_CreatePipe \ - (tclStubsPtr->tcl_CreatePipe) /* 588 */ + (tclStubsPtr->tcl_NRCallObjProc) /* 588 */ #endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0102f5a..0aee386 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.387 2008/07/22 21:41:55 andreas_kupries Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.388 2008/07/29 05:30:26 msofer Exp $ */ #include "tclInt.h" @@ -166,27 +166,26 @@ static BuiltinFunc tclBuiltinFuncTable[] = { /* * NR_TEBC * Helpers for NR - non-recursive calls to TEBC + * Minimal data required to fully reconstruct the execution state. */ typedef struct BottomData { -#if USE_NR_TEBC struct BottomData *prevBottomPtr; - TEOV_record *recordPtr; /* Top record on TEOVI's cleanup stack when - * this level was entered. */ - ByteCode *codePtr; /* The following data is used on return */ - unsigned char *pc; /* TO this level: they record the state when */ - ptrdiff_t *catchTop; /* a new codePtr was received for NR */ - int cleanup; /* execution. */ + TEOV_callback *rootPtr; /* State when this bytecode execution began. */ + ByteCode *codePtr; /* These fields remain constant until it */ + CmdFrame *cmdFramePtr; /* returns. */ + /* ------------------------------------------*/ + unsigned char *pc; /* These fields are used on return TO this */ + ptrdiff_t *catchTop; /* this level: they record the state when a */ + int cleanup; /* new codePtr was received for NR execution */ Tcl_Obj *auxObjList; -#endif } BottomData; -#if USE_NR_TEBC - -#define NR_DATA_INIT() \ +#define NR_DATA_INIT() \ bottomPtr->prevBottomPtr = oldBottomPtr; \ - bottomPtr->recordPtr = TOP_RECORD(iPtr); \ - bottomPtr->codePtr = codePtr + bottomPtr->rootPtr = TOP_CB(iPtr); \ + bottomPtr->codePtr = codePtr; \ + bottomPtr->cmdFramePtr = iPtr->cmdFramePtr #define NR_DATA_BURY() \ bottomPtr->pc = pc; \ @@ -201,12 +200,13 @@ typedef struct BottomData { catchTop = bottomPtr->catchTop; \ cleanup = bottomPtr->cleanup; \ auxObjList = bottomPtr->auxObjList; \ - iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr -#endif + esPtr = iPtr->execEnvPtr->execStackPtr; \ + tosPtr = esPtr->tosPtr; \ + iPtr->cmdFramePtr = bottomPtr->cmdFramePtr; #define PUSH_AUX_OBJ(objPtr) \ objPtr->internalRep.twoPtrValue.ptr2 = auxObjList; \ - auxObjList = objPtr + auxObjList = objPtr #define POP_AUX_OBJ() \ { \ @@ -799,8 +799,7 @@ TclCreateExecEnv( Tcl_IncrRefCount(eePtr->constants[0]); TclNewBooleanObj(eePtr->constants[1], 1); Tcl_IncrRefCount(eePtr->constants[1]); - eePtr->recordPtr = NULL; - eePtr->tebcCall = 0; + eePtr->callbackPtr = NULL; esPtr->prevPtr = NULL; esPtr->nextPtr = NULL; @@ -875,7 +874,7 @@ TclDeleteExecEnv( TclDecrRefCount(eePtr->constants[0]); TclDecrRefCount(eePtr->constants[1]); - if (eePtr->recordPtr) { + if (eePtr->callbackPtr) { Tcl_Panic("Deleting execEnv with pending TEOV callbacks!"); } ckfree((char *) eePtr); @@ -1473,7 +1472,7 @@ FreeExprCodeInternalRep( * This procedure compiles the script contained in a Tcl_Obj * * Results: - * A pointer to the corresponding ByteCode + * A pointer to the corresponding ByteCode, never NULL. * * Side effects: * The object is shimmered to bytecode type @@ -1752,9 +1751,7 @@ TclExecuteByteCode( /* NR_TEBC */ BottomData *bottomPtr; -#if USE_NR_TEBC BottomData *oldBottomPtr = NULL; -#endif /* * Constants: variables that do not change during the execution, used @@ -1793,10 +1790,7 @@ TclExecuteByteCode( register int cleanup; Tcl_Obj *objResultPtr; - int evalFlags = TCL_EVAL_NOERR; -#if (USE_NR_TEBC) - int tailcall = 0; -#endif + /* * Result variable - needed only when going to checkForcatch or other * error handlers; also used as local in some opcodes. @@ -1826,13 +1820,47 @@ TclExecuteByteCode( * execution stack is large enough to execute this ByteCode. */ - /* - * NR_TEBC - */ + int nested = 0; -#if USE_NR_TEBC nonRecursiveCallStart: + if (nested) { + TEOV_callback *callbackPtr = TOP_CB(interp); + Tcl_NRPostProc *procPtr = callbackPtr->procPtr; + ByteCode *newCodePtr = callbackPtr->data[0]; + + assert((result==TCL_OK)); + assert((callbackPtr != bottomPtr->rootPtr)); + + TOP_CB(interp) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); + + if (procPtr == NRRunBytecode) { + NR_DATA_BURY(); /* this level's state variables */ + codePtr = newCodePtr; + } else if (procPtr == NRDropCommand) { + /* + * A request to perform a tailcall: just drop this + * bytecode as it is; the tailCall has been scheduled in + * the callbacks. + */ +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " Tailcall: request received\n"); + } #endif + if (catchTop != initCatchTop) { + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + goto checkForCatch; + } + goto abnormalReturn; /* drop a level */ + } else { + Tcl_Panic("TEBC: TRCB sent us a record we cannot handle! (1)"); + } + } + nested = 1; + codePtr->refCount++; bottomPtr = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) @@ -1840,12 +1868,9 @@ TclExecuteByteCode( curInstName = NULL; auxObjList = NULL; initLevel = 1; - -#if USE_NR_TEBC NR_DATA_INIT(); /* record this level's data */ - + nonRecursiveCallReturn: -#endif bcFramePtr = (CmdFrame *) (bottomPtr + 1); initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); @@ -1880,10 +1905,6 @@ TclExecuteByteCode( TclArgumentBCEnter((Tcl_Interp*) iPtr,codePtr,bcFramePtr); -#if (USE_NR_TEBC) - } else if (tailcall) { - goto tailcallEntry; -#endif } else { /* * Returning from a non-recursive call. State is already completely @@ -2475,6 +2496,25 @@ TclExecuteByteCode( NEXT_INST_F(5, 0, 0); } + case INST_EXPR_STK: { + /* + * Moved here to support transforming the eval of an expression to + * a non-recursive TEBC call. + */ + + ByteCode *newCodePtr; + + bcFramePtr->data.tebc.pc = (char *) pc; + iPtr->cmdFramePtr = bcFramePtr; + DECACHE_STACK_INFO(); + newCodePtr = CompileExprObj(interp, OBJ_AT_TOS); + CACHE_STACK_INFO(); + cleanup = 1; + pc++; + Tcl_NRAddCallback(interp, NRRunBytecode, newCodePtr, NULL, NULL, NULL); + goto nonRecursiveCallStart; + } + { /* * INVOCATION BLOCK @@ -2482,70 +2522,7 @@ TclExecuteByteCode( int objc, pcAdjustment; Tcl_Obj **objv; -#if (USE_NR_TEBC) - TEOV_record *recordPtr; - ByteCode *newCodePtr; -#endif - case INST_EXPR_STK: { - /* - * Moved here to support transforming the eval of an expression to - * a non-recursive TEBC call. - */ - -#if (USE_NR_TEBC) - pcAdjustment = 1; - cleanup = 1; - bcFramePtr->data.tebc.pc = (char *) pc; - iPtr->cmdFramePtr = bcFramePtr; - DECACHE_STACK_INFO(); - newCodePtr = CompileExprObj(interp, OBJ_AT_TOS); - CACHE_STACK_INFO(); - goto tebc_do_exec; -#else - Tcl_Obj *objPtr, *valuePtr; - - objPtr = OBJ_AT_TOS; - - DECACHE_STACK_INFO(); - /*Tcl_ResetResult(interp);*/ - result = Tcl_ExprObj(interp, objPtr, &valuePtr); - CACHE_STACK_INFO(); - if (result == TCL_OK) { - objResultPtr = valuePtr; - TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(objPtr)), valuePtr); - NEXT_INST_F(1, 1, -1); /* Already has right refct. */ - } else { - TRACE_WITH_OBJ(("\"%.30s\" => ERROR: ", O2S(objPtr)), - Tcl_GetObjResult(interp)); - cleanup = 1; - goto checkForCatch; - } -#endif - } - -#if (USE_NR_TEBC) - tailcallEntry: { - TEOV_record *recordPtr = TOP_RECORD(iPtr); - - /* - * We take over the record's object, with its refCount. Clear the - * record type so that it is not freed again when popping the - * record. - */ - - recordPtr->type = TCL_NR_NO_TYPE; - *++tosPtr = recordPtr->data.obj.objPtr; - evalFlags = recordPtr->data.obj.flags; - recordPtr->type = TCL_NR_NO_TYPE; -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall: pushing obj with refCount %i\n", - (OBJ_AT_TOS)->refCount); - } -#endif - } -#endif case INST_EVAL_STK: { /* * Moved here to support transforming the eval of objects to a @@ -2554,10 +2531,10 @@ TclExecuteByteCode( */ Tcl_Obj *objPtr = OBJ_AT_TOS; + ByteCode *newCodePtr; cleanup = 1; - pcAdjustment = !tailcall; - tailcall = 0; + pcAdjustment = 1; if (objPtr->typePtr == &tclListType) { /* is a list... */ List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; @@ -2580,59 +2557,20 @@ TclExecuteByteCode( } /* + * Run the bytecode in this same TEBC instance! + * * TIP #280: The invoking context is left NULL for a dynamically * constructed command. We cannot match its lines to the outer * context. - */ + */ DECACHE_STACK_INFO(); newCodePtr = TclCompileObj(interp, objPtr, NULL, 0); - if (newCodePtr) { - /* - * Run the bytecode in this same TEBC instance! - */ -#if (USE_NR_TEBC) - bcFramePtr->data.tebc.pc = (char *) pc; - iPtr->cmdFramePtr = bcFramePtr; - goto tebc_do_exec; -#else - result = TclExecuteByteCode(interp, newCodePtr); - CACHE_STACK_INFO(); - - if (result == TCL_OK) { - /* - * Normal return; push the eval's object result. - */ - - objResultPtr = Tcl_GetObjResult(interp); - TRACE_WITH_OBJ(("\"%.30s\" => ", O2S(objPtr)), - Tcl_GetObjResult(interp)); - - /* - * Reset the interp's result to avoid possible duplications of - * large objects [Bug 781585]. We do not call Tcl_ResetResult to - * avoid any side effects caused by the resetting of errorInfo and - * errorCode [Bug 804681], which are not needed here. We chose - * instead to manipulate the interp's object result directly. - * - * Note that the result object is now in objResultPtr, it keeps - * the refCount it had in its role of iPtr->objResultPtr. - */ - - TclNewObj(objPtr); - Tcl_IncrRefCount(objPtr); - iPtr->objResultPtr = objPtr; - NEXT_INST_F(1, 1, -1); - } -#endif - } - - /* - * Compilation failed, error - */ - - result = TCL_ERROR; - goto processExceptionReturn; + bcFramePtr->data.tebc.pc = (char *) pc; + iPtr->cmdFramePtr = bcFramePtr; + pc++; + Tcl_NRAddCallback(interp, NRRunBytecode, newCodePtr, NULL, NULL, NULL); + goto nonRecursiveCallStart; } case INST_INVOKE_EXPANDED: @@ -2708,55 +2646,17 @@ TclExecuteByteCode( DECACHE_STACK_INFO(); -#if (USE_NR_TEBC) - TEBC_CALL(iPtr) = 1; - recordPtr = TOP_RECORD(iPtr); -#endif - result = TclEvalObjv(interp, objc, objv, evalFlags, NULL); + result = TclNREvalObjv(interp, objc, objv, TCL_EVAL_NOERR, NULL); + result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); CACHE_STACK_INFO(); -#if (USE_NR_TEBC) - evalFlags = TCL_EVAL_NOERR; - if (TOP_RECORD(iPtr) != recordPtr) { - assert((result == TCL_OK)); - recordPtr = TOP_RECORD(iPtr); - switch(recordPtr->type) { - case TCL_NR_BC_TYPE: - newCodePtr = recordPtr->data.codePtr; - tebc_do_exec: - /* - * A request to execute a bytecode came back. We save - * the current state and restart at the top. - */ - pc += pcAdjustment; - NR_DATA_BURY(); /* this level's state variables */ - codePtr = newCodePtr; - goto nonRecursiveCallStart; - case TCL_NR_TAILCALL_TYPE: - /* - * A request to perform a tailcall: just drop this - * bytecode as it is; the tailCall has been scheduled in - * the callbacks. - */ -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall: request received\n"); - } -#endif - if (catchTop != initCatchTop) { - result = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", - TCL_STATIC); - goto checkForCatch; - } - goto abnormalReturn; /* drop a level */ - default: - Tcl_Panic("TEBC: TEOV sent us a record we cannot handle!"); - } + if (TOP_CB(interp) != bottomPtr->rootPtr) { + assert ((result == TCL_OK)); + pc += pcAdjustment; + goto nonRecursiveCallStart; } -#endif iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; - + if (result == TCL_OK) { Tcl_Obj *objPtr; #ifndef TCL_COMPILE_DEBUG @@ -7762,81 +7662,64 @@ TclExecuteByteCode( TclArgumentBCRelease((Tcl_Interp*) iPtr,codePtr); -#if USE_NR_TEBC oldBottomPtr = bottomPtr->prevBottomPtr; -#endif TclStackFree(interp, bottomPtr); /* free my stack */ if (--codePtr->refCount <= 0) { TclCleanupByteCode(codePtr); } -#if USE_NR_TEBC if (oldBottomPtr) { /* * Restore the state to what it was previous to this bytecode. - * - * NR_TEBC */ - bottomPtr = oldBottomPtr; /* back to old bc */ + + bottomPtr = oldBottomPtr; /* back to old bc */ + result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); - /* Please free anything that might still be on my new stack */ - resumeCleanup: - if (TOP_RECORD(iPtr) != bottomPtr->recordPtr) { - CACHE_STACK_INFO(); - result = TclEvalObjv_NR2(interp, result, bottomPtr->recordPtr); - if (TOP_RECORD(iPtr) != bottomPtr->recordPtr) { - TEOV_record *recordPtr = TOP_RECORD(iPtr); + NR_DATA_DIG(); + DECACHE_STACK_INFO(); + if (TOP_CB(interp) == bottomPtr->rootPtr) { + /* + * The bytecode is returning, remove the caller's arguments and + * keep processing the caller. + */ + + while (cleanup--) { + Tcl_Obj *objPtr = POP_OBJECT(); + Tcl_DecrRefCount(objPtr); + } + goto nonRecursiveCallReturn; + } else { + /* + * A request for a new execution: a tailcall. Remove the caller's + * arguments and start the new bytecode. + * + * FIXME KNOWNBUG: we get a pointer smash if we do remove the + * arguments, a leak otherwise: tailcalls are not yet quite + * there. Chose to leave the leak for now. + */ - assert((result == TCL_OK)); - - /* - * A callback scheduled a new evaluation: process it. - */ - - switch(recordPtr->type) { - case TCL_NR_BC_TYPE: - codePtr = recordPtr->data.codePtr; - goto nonRecursiveCallStart; - case TCL_NR_TAILCALL_TYPE: - /* FIXME NRE tailcall*/ - Tcl_Panic("Tailcall called from a callback!"); - NR_DATA_DIG(); - esPtr = iPtr->execEnvPtr->execStackPtr; - goto abnormalReturn; /* drop a level */ - case TCL_NR_CMD_TYPE: - case TCL_NR_SCRIPT_TYPE: - /* - * FIXME NRE tailcall: error messages will be all wrong? - */ -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall: eval request received from callback\n"); - } -#endif - tailcall = 1; - goto restoreStateVariables; - case TCL_NR_CMDSWAP_TYPE: - result = TclEvalObjv(interp, recordPtr->data.objcv.objc, - recordPtr->data.objcv.objv, 0, recordPtr->cmdPtr); - goto resumeCleanup; - default: - Tcl_Panic("TEBC: TEOV_NR2 sent us a record we cannot handle!"); + TEOV_callback *callbackPtr = TOP_CB(interp); + Tcl_NRPostProc *procPtr = callbackPtr->procPtr; + + if (procPtr == NRRunBytecode) { + goto nonRecursiveCallStart; + } else if (procPtr == NRDropCommand) { + /* FIXME: 'tailcall tailcall' not yet working */ + Tcl_Panic("Tailcalls from within tailcalls are not yet implemented"); + if (catchTop != initCatchTop) { + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + goto checkForCatch; } + goto abnormalReturn; /* drop a level */ + } else { + Tcl_Panic("TEBC: TEOV sent us a record we cannot handle! (2)"); } } - restoreStateVariables: - NR_DATA_DIG(); - esPtr = iPtr->execEnvPtr->execStackPtr; - tosPtr = esPtr->tosPtr; - while (cleanup--) { - Tcl_Obj *objPtr = POP_OBJECT(); - Tcl_DecrRefCount(objPtr); - } - CACHE_STACK_INFO(); - goto nonRecursiveCallReturn; } -#endif return result; } #undef iPtr diff --git a/generic/tclInt.decls b/generic/tclInt.decls index e1e46d0..8213109 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.126 2008/07/24 22:57:57 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.127 2008/07/29 05:30:32 msofer Exp $ library tcl @@ -894,10 +894,12 @@ declare 227 generic { void TclSetNsPath(Namespace *nsPtr, int pathLength, Tcl_Namespace *pathAry[]) } -declare 228 generic { - int TclObjInterpProcCore(register Tcl_Interp *interp, Tcl_Obj *procNameObj, - int skip, ProcErrorProc errorProc) -} +# Used to be needed for TclOO-extension; unneeded now that TclOO is in the +# core and NRE-enabled +# declare 228 generic { +# int TclObjInterpProcCore(register Tcl_Interp *interp, Tcl_Obj *procNameObj, +# int skip, ProcErrorProc errorProc) +# } declare 229 generic { int TclPtrMakeUpvar(Tcl_Interp *interp, Var *otherP1Ptr, CONST char *myName, int myFlags, int index) @@ -943,28 +945,25 @@ declare 237 generic { # NRE functions for "rogue" extensions to exploit NRE; they will need to # include NRE.h too. declare 238 generic { - int TclEvalObjv_NR2(Tcl_Interp *interp, int result, - struct TEOV_record *rootPtr) -} -declare 239 generic { int TclNRInterpProc(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) } -declare 240 generic { +declare 239 generic { int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj, int skip, ProcErrorProc errorProc) } -declare 241 generic { - struct TEOV_record * TclNRPushRecord(Tcl_Interp *interp) -} -declare 242 generic { - void TclNRPopAndFreeRecord(Tcl_Interp *interp) +declare 240 generic { + int TclNRRunCallbacks(Tcl_Interp * interp, int result, + struct TEOV_callback * rootPtr, int tebcCall) } - -declare 243 generic { +declare 241 generic { int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, CONST CmdFrame *invoker, int word) } +declare 242 generic { + int TclNREvalObjv(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[], int flags, Command *cmdPtr) +} ############################################################################## # Define the platform specific internal Tcl interface. These functions are diff --git a/generic/tclInt.h b/generic/tclInt.h index 0587ecf..1b10fc6 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.379 2008/07/24 22:57:55 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.380 2008/07/29 05:30:32 msofer Exp $ */ #ifndef _TCLINT @@ -1329,17 +1329,13 @@ typedef struct ExecStack { * currently active execution stack. */ -struct TEOV_record; - typedef struct ExecEnv { ExecStack *execStackPtr; /* Points to the first item in the * evaluation stack on the heap. */ Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" - * objs. */ - struct TEOV_record *recordPtr; /* Top record in TEOV's stack */ - int tebcCall; /* used to distinguish tebc calls from - * other calls to TEOV, and other comms - * between TEBC and TEOV */ + * objs. */ + struct TEOV_callback *callbackPtr; + /* Top callback in TEOV's stack */ } ExecEnv; /* @@ -2516,10 +2512,12 @@ MODULE_SCOPE char tclEmptyString; /* Introduced by/for NRE */ MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); -MODULE_SCOPE int TclEvalObjv(Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[], int flags, Command *cmdPtr); + +MODULE_SCOPE void TclNRClearCommandFlag(Tcl_Interp *interp); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); @@ -2789,8 +2787,8 @@ MODULE_SCOPE Tcl_Obj * TclDisassembleByteCodeObj(Tcl_Obj *objPtr); MODULE_SCOPE void * TclpThreadCreateKey(void); MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); MODULE_SCOPE void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr); -MODULE_SCOPE void * TclpThreadGetMasterTSD(void *tsdKeyPtr); - +MODULE_SCOPE void * TclpThreadGetMasterTSD(void *tsdKeyPtr); + /* *---------------------------------------------------------------- * Command procedures in the generic core: @@ -4011,7 +4009,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #include "tclTomMathDecls.h" #endif /* _TCLINT */ - + /* * Local Variables: * mode: c diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 0ef9eef..2148ab6 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.122 2008/07/24 22:57:54 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.123 2008/07/29 05:30:34 msofer Exp $ */ #ifndef _TCLINTDECLS @@ -1012,13 +1012,7 @@ EXTERN int TclObjBeingDeleted (Tcl_Obj * objPtr); EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); #endif -#ifndef TclObjInterpProcCore_TCL_DECLARED -#define TclObjInterpProcCore_TCL_DECLARED -/* 228 */ -EXTERN int TclObjInterpProcCore (register Tcl_Interp * interp, - Tcl_Obj * procNameObj, int skip, - ProcErrorProc errorProc); -#endif +/* Slot 228 is reserved */ #ifndef TclPtrMakeUpvar_TCL_DECLARED #define TclPtrMakeUpvar_TCL_DECLARED /* 229 */ @@ -1076,43 +1070,40 @@ EXTERN void TclBackgroundException (Tcl_Interp * interp, /* 237 */ EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); #endif -#ifndef TclEvalObjv_NR2_TCL_DECLARED -#define TclEvalObjv_NR2_TCL_DECLARED -/* 238 */ -EXTERN int TclEvalObjv_NR2 (Tcl_Interp * interp, int result, - struct TEOV_record * rootPtr); -#endif #ifndef TclNRInterpProc_TCL_DECLARED #define TclNRInterpProc_TCL_DECLARED -/* 239 */ +/* 238 */ EXTERN int TclNRInterpProc (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); #endif #ifndef TclNRInterpProcCore_TCL_DECLARED #define TclNRInterpProcCore_TCL_DECLARED -/* 240 */ +/* 239 */ EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); #endif -#ifndef TclNRPushRecord_TCL_DECLARED -#define TclNRPushRecord_TCL_DECLARED -/* 241 */ -EXTERN struct TEOV_record * TclNRPushRecord (Tcl_Interp * interp); -#endif -#ifndef TclNRPopAndFreeRecord_TCL_DECLARED -#define TclNRPopAndFreeRecord_TCL_DECLARED -/* 242 */ -EXTERN void TclNRPopAndFreeRecord (Tcl_Interp * interp); +#ifndef TclNRRunCallbacks_TCL_DECLARED +#define TclNRRunCallbacks_TCL_DECLARED +/* 240 */ +EXTERN int TclNRRunCallbacks (Tcl_Interp * interp, int result, + struct TEOV_callback * rootPtr, int tebcCall); #endif #ifndef TclNREvalObjEx_TCL_DECLARED #define TclNREvalObjEx_TCL_DECLARED -/* 243 */ +/* 241 */ EXTERN int TclNREvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, CONST CmdFrame * invoker, int word); #endif +#ifndef TclNREvalObjv_TCL_DECLARED +#define TclNREvalObjv_TCL_DECLARED +/* 242 */ +EXTERN int TclNREvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags, + Command * cmdPtr); +#endif typedef struct TclIntStubs { int magic; @@ -1370,7 +1361,7 @@ typedef struct TclIntStubs { Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *CONST keyv[], int flags); /* 225 */ int (*tclObjBeingDeleted) (Tcl_Obj * objPtr); /* 226 */ void (*tclSetNsPath) (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); /* 227 */ - int (*tclObjInterpProcCore) (register Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 228 */ + void *reserved228; int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, CONST char * myName, int myFlags, int index); /* 229 */ Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, CONST char * part2, int flags, CONST char * msg, CONST int createPart1, CONST int createPart2, Var ** arrayPtrPtr); /* 230 */ int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ @@ -1380,12 +1371,11 @@ typedef struct TclIntStubs { void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ - int (*tclEvalObjv_NR2) (Tcl_Interp * interp, int result, struct TEOV_record * rootPtr); /* 238 */ - int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 239 */ - int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 240 */ - struct TEOV_record * (*tclNRPushRecord) (Tcl_Interp * interp); /* 241 */ - void (*tclNRPopAndFreeRecord) (Tcl_Interp * interp); /* 242 */ - int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, CONST CmdFrame * invoker, int word); /* 243 */ + int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 238 */ + int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 239 */ + int (*tclNRRunCallbacks) (Tcl_Interp * interp, int result, struct TEOV_callback * rootPtr, int tebcCall); /* 240 */ + int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, CONST CmdFrame * invoker, int word); /* 241 */ + int (*tclNREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags, Command * cmdPtr); /* 242 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -2091,10 +2081,7 @@ extern CONST TclIntStubs *tclIntStubsPtr; #define TclSetNsPath \ (tclIntStubsPtr->tclSetNsPath) /* 227 */ #endif -#ifndef TclObjInterpProcCore -#define TclObjInterpProcCore \ - (tclIntStubsPtr->tclObjInterpProcCore) /* 228 */ -#endif +/* Slot 228 is reserved */ #ifndef TclPtrMakeUpvar #define TclPtrMakeUpvar \ (tclIntStubsPtr->tclPtrMakeUpvar) /* 229 */ @@ -2131,29 +2118,25 @@ extern CONST TclIntStubs *tclIntStubsPtr; #define TclResetCancellation \ (tclIntStubsPtr->tclResetCancellation) /* 237 */ #endif -#ifndef TclEvalObjv_NR2 -#define TclEvalObjv_NR2 \ - (tclIntStubsPtr->tclEvalObjv_NR2) /* 238 */ -#endif #ifndef TclNRInterpProc #define TclNRInterpProc \ - (tclIntStubsPtr->tclNRInterpProc) /* 239 */ + (tclIntStubsPtr->tclNRInterpProc) /* 238 */ #endif #ifndef TclNRInterpProcCore #define TclNRInterpProcCore \ - (tclIntStubsPtr->tclNRInterpProcCore) /* 240 */ + (tclIntStubsPtr->tclNRInterpProcCore) /* 239 */ #endif -#ifndef TclNRPushRecord -#define TclNRPushRecord \ - (tclIntStubsPtr->tclNRPushRecord) /* 241 */ -#endif -#ifndef TclNRPopAndFreeRecord -#define TclNRPopAndFreeRecord \ - (tclIntStubsPtr->tclNRPopAndFreeRecord) /* 242 */ +#ifndef TclNRRunCallbacks +#define TclNRRunCallbacks \ + (tclIntStubsPtr->tclNRRunCallbacks) /* 240 */ #endif #ifndef TclNREvalObjEx #define TclNREvalObjEx \ - (tclIntStubsPtr->tclNREvalObjEx) /* 243 */ + (tclIntStubsPtr->tclNREvalObjEx) /* 241 */ +#endif +#ifndef TclNREvalObjv +#define TclNREvalObjv \ + (tclIntStubsPtr->tclNREvalObjv) /* 242 */ #endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 025109d..d5736c3 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.93 2008/07/24 22:57:56 nijtmans Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.94 2008/07/29 05:30:35 msofer Exp $ */ #include "tclInt.h" @@ -687,7 +687,7 @@ Tcl_InterpObjCmd( /* * Did they specify a slave interp to cancel the script in - * progress in? If not, use the current interp. + * progress in? If not, use the current interp. */ if (i < objc) { @@ -1488,7 +1488,7 @@ AliasCreate( if (slaveInterp == masterInterp) { aliasPtr->slaveCmd = Tcl_NRCreateCommand(slaveInterp, - TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, + TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, AliasObjCmdDeleteProc); } else { aliasPtr->slaveCmd = Tcl_CreateObjCommand(slaveInterp, @@ -1763,7 +1763,8 @@ AliasNRCmd( Tcl_Obj *listPtr; List *listRep; int flags = TCL_EVAL_INVOKE; - + int result; + /* * Append the arguments to the command prefix and invoke the command in * the target interp's global namespace. @@ -1777,7 +1778,7 @@ AliasNRCmd( listRep = listPtr->internalRep.twoPtrValue.ptr1; listRep->elemCount = cmdc; cmdv = &listRep->elements; - + prefv = &aliasPtr->objPtr; memcpy(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *))); memcpy(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *))); @@ -1808,7 +1809,9 @@ AliasNRCmd( if (isRootEnsemble) { TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } - return TclNREvalCmd(interp, listPtr, flags); + result = Tcl_NREvalObj(interp, listPtr, flags); + TclNRClearCommandFlag(interp); + return result; } static int @@ -2618,7 +2621,7 @@ SlaveEval( * * Do not let any intReps accross, with the exception of * bytecodes. The intrep spoiling is due to happen anyway when - * compiling. + * compiling. */ Interp *iPtr = (Interp *) interp; @@ -2635,7 +2638,7 @@ SlaveEval( } TclArgumentGet (interp, objPtr, &invoker, &word); - + result = TclEvalObjEx(slaveInterp, objPtr, 0, invoker, word); } else { objPtr = Tcl_ConcatObj(objc, objv); diff --git a/generic/tclNRE.h b/generic/tclNRE.h index e0d692d..15f0e54 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.6 2008/07/21 16:26:08 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.7 2008/07/29 05:30:36 msofer Exp $ */ @@ -23,60 +23,8 @@ *****************************************************************************/ #define USE_SMALL_ALLOC 1 /* perf is important for some of these things! */ -#define USE_STACK_ALLOC 1 /* good mainly for debugging, crashes at - * smallest timing error */ #define ENABLE_ASSERTS 1 -/* - * IMPLEMENTED IN THIS VERSION - flags for partial enabling of the different - * parts, useful for debugging. May not work - meant to be used at "all ones" - */ - -#define USE_NR_PROC 1 /* are procs defined as NR functions or not? - * Used for testing that the old interfaces - * still work, as they are used by TclOO and - * iTcl */ -#define USE_NR_TEBC 1 /* does TEBC know about his special powers? - * with 1 TEBC remains on stack, TEOV gets - * evicted. */ -#define USE_NR_ALIAS 1 /* First examples: my job */ - -#define USE_NR_IMPORTS 1 /* First examples: my job */ - -#define USE_NR_TAILCALLS 1 /* Incomplete implementation as - * tcl::unsupported::tailcall; best semantics - * are yet not 100% clear to me. */ - -#define USE_NR_NS_ENSEMBLE 1 /* snit!! */ - -/* Here to remind me of what's still missing: none of these do anything today */ - -#define USE_NR_EVAL 0 /* Tcl_EvalObj should be easy; the others may - * require some adapting of the parser. dgp? */ -#define USE_NR_UPLEVEL 0 /* piece of cake, I think */ -#define USE_NR_VAR_TRACES 0 /* require major redesign, I fear. About time - * for it too! */ - -#define USE_NR_CONTINUATIONS 0 - -#define MAKE_3X_FASTER 0 -#define RULE_THE_WORLD 0 - -#define USE_NR_CMD_TRACES /* NEVER?? Maybe ... enter traces on the way in, - * leave traces done in the callback? So a trace - * just needs to replace the procPtr and - * clientData, and TEOV needn't know about the - * whole s**t! Mmhhh */ - -/***************************************************************************** - * Stuff for the public api: gone to the stubs table! - * - * Question: should we allow more callback requests during the callback - * itself? Easy enough to either handle or block, nothing done yet. We could - * also "lock" the Tcl stack during postProc, but it doesn't sound - * reasonable. I think. - *****************************************************************************/ - /***************************************************************************** * Private api fo NRE *****************************************************************************/ @@ -94,162 +42,38 @@ typedef struct TEOV_callback { struct TEOV_callback *nextPtr; } TEOV_callback; - -/* Try to keep within SmallAlloc sizes! */ -typedef struct TEOV_record { - int type; - Command *cmdPtr; - TEOV_callback *callbackPtr; - struct TEOV_record *nextPtr; - union { - struct ByteCode *codePtr; /* TCL_NR_BC_TYPE */ - struct { - Tcl_Obj *objPtr; - int flags; - } obj; - struct { - int objc; - Tcl_Obj **objv; - } objcv; - } data; -#if !USE_SMALL_ALLOC - /* Extra checks: can disappear later */ - Tcl_Obj **tosPtr; -#endif -} TEOV_record; - -/* - * The types for records; we save the first bit to indicate that it stores an - * obj, to indicate the necessary refCount management. That is, odd numbers - * only for obj-carrying types - */ - -#define TCL_NR_NO_TYPE 0 /* for internal (cleanup) use only */ -#define TCL_NR_BC_TYPE 2 /* procs, lambdas, TclOO+Itcl sometime ... */ -#define TCL_NR_CMDSWAP_TYPE 4 /* ns-imports (cmdd redirect) */ -#define TCL_NR_TAILCALL_TYPE 6 -#define TCL_NR_TEBC_SWAPENV_TYPE 8 /* continuations, micro-threads !? */ - -#define TCL_NR_CMD_TYPE 1 /* i-alias, ns-ens use this */ -#define TCL_NR_SCRIPT_TYPE 3 /* ns-eval, uplevel use this */ - -#define TCL_NR_HAS_OBJ(TYPE) ((TYPE) & 1) - -#define TOP_RECORD(iPtr) (((Interp *)(iPtr))->execEnvPtr->recordPtr) +#define TOP_CB(iPtr) (((Interp *)(iPtr))->execEnvPtr->callbackPtr) #define GET_TOSPTR(iPtr) \ (((Interp *)iPtr)->execEnvPtr->execStackPtr->tosPtr) -#if !USE_SMALL_ALLOC -#define STORE_EXTRA(iPtr, recordPtr) \ - recordPtr->tosPtr = GET_TOSPTR(iPtr) -#else -#define STORE_EXTRA(iPtr, recordPtr) -#endif - -/* A SINGLE record being pushed is what is detected as an NRE request by TEOV */ - -#define PUSH_RECORD(iPtr, recordPtr) \ - TCLNR_ALLOC(interp, recordPtr); \ - recordPtr->nextPtr = TOP_RECORD(iPtr); \ - STORE_EXTRA(iPtr, recordPtr); \ - TOP_RECORD(iPtr) = recordPtr; \ - recordPtr->type = TCL_NR_NO_TYPE; \ - recordPtr->cmdPtr = NULL; \ - recordPtr->callbackPtr = NULL - -#define TEBC_CALL(iPtr) \ - (((Interp *)iPtr)->execEnvPtr->tebcCall) +/* + * Inline version of Tcl_NRAddCallback + */ -#define TclNRAddCallback(\ - interp,\ - postProcPtr,\ - data0,\ - data1,\ - data2,\ - data3) \ - { \ - TEOV_record *recordPtr; \ - TEOV_callback *callbackPtr; \ - \ - recordPtr = TOP_RECORD(interp); \ +#define TclNRAddCallback( \ + interp, \ + postProcPtr, \ + data0, \ + data1, \ + data2, \ + data3) \ + { \ + TEOV_callback *callbackPtr; \ TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); \ - \ callbackPtr->procPtr = (postProcPtr); \ callbackPtr->data[0] = (data0); \ callbackPtr->data[1] = (data1); \ callbackPtr->data[2] = (data2); \ callbackPtr->data[3] = (data3); \ - \ - callbackPtr->nextPtr = recordPtr->callbackPtr; \ - recordPtr->callbackPtr = callbackPtr; \ + callbackPtr->nextPtr = TOP_CB(interp); \ + TOP_CB(interp) = callbackPtr; \ } - - - -/* - * These are only used by TEOV; here for ease of ref. They should move to - * tclBasic.c later on. - */ - -#define COMPLETE_RECORD(recordPtr) \ - /* accesses variables by name, careful */ \ - recordPtr->cmdPtr = cmdPtr; \ - -#if !USE_SMALL_ALLOC -#define CHECK_EXTRA(iPtr, recordPtr) \ - (recordPtr->tosPtr == GET_TOSPTR(iPtr)) -#else -#define CHECK_EXTRA(iPtr, recordPtr) 1 -#endif - -#define POP_RECORD(iPtr, recordPtr) \ - { \ - recordPtr = TOP_RECORD(iPtr); \ - TOP_RECORD(iPtr) = recordPtr->nextPtr; \ - } - - -#define FREE_RECORD(iPtr, recordPtr) \ - { \ - TEOV_callback *callbackPtr = recordPtr->callbackPtr; \ - if (TCL_NR_HAS_OBJ(recordPtr->type)) { \ - Tcl_DecrRefCount(recordPtr->data.obj.objPtr); \ - } \ - while (callbackPtr) { \ - callbackPtr = callbackPtr->nextPtr; \ - TclSmallFree(recordPtr->callbackPtr); \ - } \ - TCLNR_FREE(((Tcl_Interp *)iPtr), recordPtr); \ - } - -#define CHECK_VALID_RETURN(iPtr, recordPtr) \ - ((TOP_RECORD(iPtr) == recordPtr) && \ - CHECK_EXTRA(iPtr, recordPtr)) - -#define READ_OBJV_RECORD(recordPtr) /* TBD? Or read by hand (braille?) */ - - -/* - * functions - */ - -#if 0 -/* built as static inline in tclProc.c. Do TclOO/Itcl need this? */ -MODULE_SCOPE int Tcl_NRBC (Tcl_Interp * interp, ByteCode *codePtr, - Tcl_NRPostProc *postProcPtr, ClientData clientData); -#endif - -/* The following starts purges the stack popping TclStackAllocs down to where - * tosPtr has the requested value. Panics on failure.*/ -MODULE_SCOPE void TclStackPurge(Tcl_Interp *interp, Tcl_Obj **tosPtr); /* * Tailcalls! */ -MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; -MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; @@ -258,13 +82,10 @@ MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; *****************************************************************************/ #if USE_SMALL_ALLOC -#define TCLNR_ALLOC(interp, ptr) TclSmallAlloc(sizeof(TEOV_record), ptr) +#define TCLNR_ALLOC(interp, ptr) TclSmallAlloc(sizeof(TEOV_callback), ptr) #define TCLNR_FREE(interp, ptr) TclSmallFree((ptr)) -#elif USE_STACK_ALLOC -#define TCLNR_ALLOC(interp, ptr) (ptr = TclStackAlloc(interp, sizeof(TEOV_record))) -#define TCLNR_FREE(interp, ptr) TclStackFree(interp, (ptr)) #else -#define TCLNR_ALLOC(interp, size, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_record)))) +#define TCLNR_ALLOC(interp, size, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_callback)))) #define TCLNR_FREE(interp, ptr) ckfree((char *) (ptr)) #endif diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 3eda959..ff56db7 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.171 2008/07/21 22:50:36 andreas_kupries Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.172 2008/07/29 05:30:36 msofer Exp $ */ #include "tclInt.h" @@ -1897,7 +1897,7 @@ InvokeImportedNRCmd( ImportedCmdData *dataPtr = clientData; Command *realCmdPtr = dataPtr->realCmdPtr; - return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv); + return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv, 0); } static int @@ -6225,7 +6225,7 @@ NsEnsembleImplementationCmdNR( * target command prefix. */ Tcl_Obj *copyPtr; /* The actual list of words to dispatch to. * Will be freed by the dispatch engine. */ - int prefixObjc, copyObjc; + int prefixObjc, copyObjc, result; Interp *iPtr = (Interp *) interp; /* @@ -6285,8 +6285,10 @@ NsEnsembleImplementationCmdNR( /* * Hand off to the target command. */ - - return TclNREvalCmd(interp, copyPtr, TCL_EVAL_INVOKE); + + result = Tcl_NREvalObj(interp, copyPtr, TCL_EVAL_INVOKE); + TclNRClearCommandFlag(interp); + return result; } unknownOrAmbiguousSubcommand: diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 2adf547..1e9bd11 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.7 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.8 2008/07/29 05:30:37 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -49,11 +49,8 @@ static inline Tcl_Object * AddConstructionFinalizer( Tcl_Interp *interp) { - TEOV_record *recordPtr; - TclNRAddCallback(interp, FinalizeConstruction, NULL, NULL, NULL, NULL); - recordPtr = TOP_RECORD(interp); - return (Tcl_Object *) &recordPtr->callbackPtr->data[0]; + return (Tcl_Object *) &(TOP_CB(interp)->data[0]); } static int diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 8ce3c34..9cd2678 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.10 2008/07/27 22:28:54 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.11 2008/07/29 05:30:37 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -55,6 +55,8 @@ static Tcl_Obj ** InitEnsembleRewrite(Tcl_Interp *interp, int objc, static int InvokeProcedureMethod(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv); +static int FinalizeForwardCall(ClientData data[], Tcl_Interp *interp, + int result); static int FinalizePMCall(ClientData data[], Tcl_Interp *interp, int result); static int PushMethodCallFrame(Tcl_Interp *interp, @@ -1131,7 +1133,7 @@ InvokeForwardMethod( CallContext *contextPtr = (CallContext *) context; ForwardMethod *fmPtr = clientData; Tcl_Obj **argObjs, **prefixObjs; - int numPrefixes, result, len, skip = contextPtr->skip; + int numPrefixes, len, skip = contextPtr->skip; /* * Build the real list of arguments to use. Note that we know that the @@ -1144,7 +1146,18 @@ InvokeForwardMethod( argObjs = InitEnsembleRewrite(interp, objc, objv, skip, numPrefixes, prefixObjs, &len); - result = Tcl_NREvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); + Tcl_NRAddCallback(interp, FinalizeForwardCall, argObjs, NULL, NULL, NULL); + return Tcl_NREvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); +} + +static int +FinalizeForwardCall( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj **argObjs = data[0]; + TclStackFree(interp, argObjs); return result; } diff --git a/generic/tclProc.c b/generic/tclProc.c index 63aa7d5..ea5f617 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.152 2008/07/25 22:11:21 andreas_kupries Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.153 2008/07/29 05:30:37 msofer Exp $ */ #include "tclInt.h" @@ -1618,23 +1618,6 @@ PushProcCallFrame( return TCL_OK; } -static int -Tcl_NRBC( - Tcl_Interp *interp, - ByteCode *codePtr, - Tcl_NRPostProc *postProcPtr, - Tcl_Obj *procNameObj, - ProcErrorProc errorProc) -{ - TEOV_record *recordPtr = TOP_RECORD(interp); - - recordPtr->type = TCL_NR_BC_TYPE; - recordPtr->data.codePtr = codePtr; - TclNRAddCallback(interp, postProcPtr, procNameObj, errorProc, NULL, - NULL); - return TCL_OK; -} - /* *---------------------------------------------------------------------- * @@ -1663,16 +1646,10 @@ TclObjInterpProc( Tcl_Obj *const objv[]) /* Argument value objects. */ { /* - * Not used in the core; external interface for iTcl and XOTcl + * Not used much in the core; external interface for iTcl */ - int result = PushProcCallFrame(clientData, interp, objc, objv, - /*isLambda*/ 0); - - if (result != TCL_OK) { - return TCL_ERROR; - } - return TclObjInterpProcCore(interp, objv[0], 1, &MakeProcError); + return Tcl_NRCallObjProc(interp, TclNRInterpProc, clientData, objc, objv); } int @@ -1697,7 +1674,7 @@ TclNRInterpProc( /* *---------------------------------------------------------------------- * - * TclObjInterpProcCore -- + * TclNRInterpProcCore -- * * When a Tcl procedure, lambda term or anything else that works like a * procedure gets invoked during bytecode evaluation, this object-based @@ -1713,49 +1690,6 @@ TclNRInterpProc( */ int -TclObjInterpProcCore( - register Tcl_Interp *interp,/* Interpreter in which procedure was - * invoked. */ - Tcl_Obj *procNameObj, /* Procedure name for error reporting. */ - int skip, /* Number of initial arguments to be skipped, - * i.e., words in the "command name". */ - ProcErrorProc errorProc) /* How to convert results from the script into - * results of the overall procedure. */ -{ - /* - * Not used in the core; external interface for TclOO - */ - - Interp *iPtr = (Interp *) interp; - TEOV_record record, *rootPtr; - int result; - - /* - * Put a top record NOT ON THE TCL STACK! Note that TclNRInterpProcCore - * assumes it can free the CallFrame in the error case, there cannot be - * anything else on top of that. We use a C-stack record, it could also be - * ckalloc'ed or anything else, just NOT TclStackAlloc. - */ - - rootPtr = TOP_RECORD(iPtr); - TOP_RECORD(iPtr) = &record; - result = TclNRInterpProcCore(interp, procNameObj, skip, errorProc); - TOP_RECORD(iPtr) = rootPtr; - - if (result == TCL_OK) { - result = TclExecuteByteCode(interp, record.data.codePtr); - result = TclEvalObjv_NR2(interp, result, rootPtr); - if (TOP_RECORD(iPtr) != rootPtr) { - /* FIXME NRE & tailcalls */ - Tcl_Panic("TclObjInterpProcCore not yet prepared to deal with evals in callbacks!"); - } - result = InterpProcNR2(record.callbackPtr->data, interp, result); - TclSmallFree(record.callbackPtr); - } - return result; -} - -int TclNRInterpProcCore( register Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ @@ -1837,7 +1771,9 @@ TclNRInterpProcCore( (Tcl_Obj **)(iPtr->varFramePtr->objv + l)); } - Tcl_NRBC(interp, codePtr, InterpProcNR2, procNameObj, errorProc); + TclNRAddCallback(interp, InterpProcNR2, procNameObj, errorProc, + NULL, NULL); + TclNRAddCallback(interp, NRRunBytecode, codePtr, NULL, NULL, NULL); return TCL_OK; } @@ -2825,21 +2761,8 @@ TclNRApplyObjCmd( result = PushProcCallFrame((ClientData) procPtr, interp, objc, objv, 1); if (result == TCL_OK) { + TclNRAddCallback(interp, ApplyNR2, extraPtr, NULL, NULL, NULL); result = TclNRInterpProcCore(interp, objv[1], 2, &MakeLambdaError); - if (result == TCL_OK) { - /* Fix the recordPtr! */ - - TEOV_record *recordPtr = TOP_RECORD(iPtr); - - recordPtr->callbackPtr->procPtr = ApplyNR2; - recordPtr->callbackPtr->data[2] = extraPtr; - } - } - if (result != TCL_OK) { - if (isRootEnsemble) { - iPtr->ensembleRewrite.sourceObjs = NULL; - } - TclStackFree(interp, extraPtr); } return result; } @@ -2850,10 +2773,8 @@ ApplyNR2( Tcl_Interp *interp, int result) { - ApplyExtraData *extraPtr = data[2]; + ApplyExtraData *extraPtr = data[0]; - result = InterpProcNR2(data, interp, result); - if (extraPtr->isRootEnsemble) { ((Interp *) interp)->ensembleRewrite.sourceObjs = NULL; } diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 76c0e15..49f5029 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.161 2008/07/22 23:06:25 das Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.162 2008/07/29 05:30:38 msofer Exp $ */ #include "tclInt.h" @@ -297,7 +297,7 @@ static const TclIntStubs tclIntStubs = { TclTraceDictPath, /* 225 */ TclObjBeingDeleted, /* 226 */ TclSetNsPath, /* 227 */ - TclObjInterpProcCore, /* 228 */ + NULL, /* 228 */ TclPtrMakeUpvar, /* 229 */ TclObjLookupVar, /* 230 */ TclGetNamespaceFromObj, /* 231 */ @@ -307,12 +307,11 @@ static const TclIntStubs tclIntStubs = { TclInitVarHashTable, /* 235 */ TclBackgroundException, /* 236 */ TclResetCancellation, /* 237 */ - TclEvalObjv_NR2, /* 238 */ - TclNRInterpProc, /* 239 */ - TclNRInterpProcCore, /* 240 */ - TclNRPushRecord, /* 241 */ - TclNRPopAndFreeRecord, /* 242 */ - TclNREvalObjEx, /* 243 */ + TclNRInterpProc, /* 238 */ + TclNRInterpProcCore, /* 239 */ + TclNRRunCallbacks, /* 240 */ + TclNREvalObjEx, /* 241 */ + TclNREvalObjv, /* 242 */ }; static const TclIntPlatStubs tclIntPlatStubs = { @@ -1108,13 +1107,13 @@ static const TclStubs tclStubs = { Tcl_AppendPrintfToObj, /* 579 */ Tcl_CancelEval, /* 580 */ Tcl_Canceled, /* 581 */ - Tcl_NRCreateCommand, /* 582 */ - Tcl_NREvalObj, /* 583 */ - Tcl_NREvalObjv, /* 584 */ - Tcl_NRCmdSwap, /* 585 */ - Tcl_NRAddCallback, /* 586 */ - Tcl_NRCallObjProc, /* 587 */ - Tcl_CreatePipe, /* 588 */ + Tcl_CreatePipe, /* 582 */ + Tcl_NRCreateCommand, /* 583 */ + Tcl_NREvalObj, /* 584 */ + Tcl_NREvalObjv, /* 585 */ + Tcl_NRCmdSwap, /* 586 */ + Tcl_NRAddCallback, /* 587 */ + Tcl_NRCallObjProc, /* 588 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclTest.c b/generic/tclTest.c index 3052cc9..4ce4277 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.118 2008/07/28 21:31:19 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.119 2008/07/29 05:30:38 msofer Exp $ */ #define TCL_TEST @@ -402,6 +402,9 @@ static int TestNumUtfCharsCmd(ClientData clientData, static int TestHashSystemHashCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +static int TestNRELevels(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); static const Tcl_Filesystem testReportingFilesystem = { "reporting", @@ -658,6 +661,10 @@ Tcltest_Init( Tcl_CreateMathFunc(interp, "T3", 2, t3ArgTypes, TestMathFunc2, (ClientData) 0); + Tcl_CreateObjCommand(interp, "testnrelevels", TestNRELevels, + (ClientData) NULL, NULL); + + #ifdef TCL_THREADS if (TclThread_Init(interp) != TCL_OK) { return TCL_ERROR; @@ -6527,6 +6534,35 @@ TestgetintCmd( } } +static int +TestNRELevels( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + static ptrdiff_t *refDepth = NULL; + ptrdiff_t depth; + Tcl_Obj *levels[5]; + + if (refDepth == NULL) { + refDepth = &depth; + } + + depth = (refDepth - &depth); + + levels[0] = Tcl_NewIntObj(depth); + levels[1] = Tcl_NewIntObj(((Interp *)interp)->numLevels); + levels[2] = Tcl_NewIntObj(iPtr->cmdFramePtr->level); + levels[3] = Tcl_NewIntObj(iPtr->varFramePtr->level); + levels[4] = Tcl_NewIntObj((iPtr->execEnvPtr->execStackPtr->tosPtr + - iPtr->execEnvPtr->execStackPtr->stackWords)); + + Tcl_SetObjResult(interp, Tcl_NewListObj(5, levels)); + return TCL_OK; +} + /* * Local Variables: * mode: c -- cgit v0.12 From 8f735184219e861f6622cdf93cbf295df9da0c0c Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 29 Jul 2008 05:31:29 +0000 Subject: changelog entry --- ChangeLog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 124affc..28c5dcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-07-29 Miguel Sofer + + * generic/tcl.decls: Completely revamped NRE implementation, + * generic/tclBasic.c: with (almost) unchanged API. + * generic/tclCompile.h: + * generic/tclExecute.c: TEBC will require a bit of a facelift, + * generic/tclInt.decls: but TEOV at least looks great now. + * generic/tclInt.h: There are new tests (incomplete!) to verify + * generic/tclInterp.c: that execution is indeed in the same TEBC + * generic/tclNRE.h: instance, at the same level in all stacks + * generic/tclNamesp.c: involved. Tailcalls are still a bit leaky, + * generic/tclOOBasic.c: still deserving to be in tcl::unsupported. + * generic/tclOOMethod.c: + * generic/tclProc.c: Uninit'd var warnings in TEBC with -O2, no + * generic/tclTest.c: warnings otherwise. + 2007-07-28 Jan Nijtmans * doc/FileSystem.3: CONSTified many functions using Tcl_FileSystem -- cgit v0.12 From cb577f757e0f2461f6e4886506c1899ae34b3d98 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 29 Jul 2008 05:52:29 +0000 Subject: fix macro --- generic/tclNRE.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclNRE.h b/generic/tclNRE.h index 15f0e54..a90bc8d 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.7 2008/07/29 05:30:36 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.8 2008/07/29 05:52:29 msofer Exp $ */ @@ -60,7 +60,7 @@ typedef struct TEOV_callback { data3) \ { \ TEOV_callback *callbackPtr; \ - TclSmallAlloc(sizeof(TEOV_callback), callbackPtr); \ + TCLNR_ALLOC((interp), (callbackPtr)); \ callbackPtr->procPtr = (postProcPtr); \ callbackPtr->data[0] = (data0); \ callbackPtr->data[1] = (data1); \ -- cgit v0.12 From d63487fc10c65ca57db9496dc4300e63faece5fa Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 29 Jul 2008 13:45:08 +0000 Subject: * generic/tclExecute.c: fix [Bug 2030670] that cause TclStackRealloc to panic on rare corner cases. Thx ajpasadyn for diagnose and patch. --- ChangeLog | 4 ++++ generic/tclExecute.c | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28c5dcd..0bd884d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-29 Miguel Sofer + * generic/tclExecute.c: fix [Bug 2030670] that cause + TclStackRealloc to panic on rare corner cases. Thx ajpasadyn for + diagnose and patch. + * generic/tcl.decls: Completely revamped NRE implementation, * generic/tclBasic.c: with (almost) unchanged API. * generic/tclCompile.h: diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0aee386..0965d48 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.388 2008/07/29 05:30:26 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.389 2008/07/29 13:45:17 msofer Exp $ */ #include "tclInt.h" @@ -973,6 +973,7 @@ GrowEvaluationStack( int newBytes, newElems, currElems; int needed = growth - (esPtr->endPtr - esPtr->tosPtr); Tcl_Obj **markerPtr = esPtr->markerPtr, **memStart; + int moveWords = 0; if (move) { if (!markerPtr) { @@ -1007,9 +1008,9 @@ GrowEvaluationStack( */ if (move) { - move = esPtr->tosPtr - MEMSTART(markerPtr) + 1; + moveWords = esPtr->tosPtr - MEMSTART(markerPtr) + 1; } - needed = growth + move + WALLOCALIGN - 1; + needed = growth + moveWords + WALLOCALIGN - 1; /* * Check if there is enough room in the next stack (if there is one, it @@ -1069,8 +1070,8 @@ GrowEvaluationStack( esPtr->tosPtr = memStart - 1; if (move) { - memcpy(memStart, MEMSTART(markerPtr), move*sizeof(Tcl_Obj *)); - esPtr->tosPtr += move; + memcpy(memStart, MEMSTART(markerPtr), moveWords*sizeof(Tcl_Obj *)); + esPtr->tosPtr += moveWords; oldPtr->markerPtr = (Tcl_Obj **) *markerPtr; oldPtr->tosPtr = markerPtr-1; } -- cgit v0.12 From e0dc5ad1dac50c004c16b1b5945aeda964c40ecd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 29 Jul 2008 18:19:08 +0000 Subject: * generic/tclBasic.c: Made use of the thread's alloc cache * generic/tclInt.h: stored in the ekeko at interp creation * generic/tclNRE.h: to avoid hitting the TSD each time an * generic/tclThreadAlloc.c: NRE callback is pushed or pulled; the approach is suitably general to extend to evry other obj allocation where an interp is know; this is left for some other time, requires a lot of grunt work. --- ChangeLog | 8 ++++ generic/tclBasic.c | 5 ++- generic/tclInt.h | 103 ++++++++++++++++++++++++++++++++++++----------- generic/tclNRE.h | 8 ++-- generic/tclThreadAlloc.c | 18 +++++++-- 5 files changed, 110 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bd884d..e471e99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-07-29 Miguel Sofer + * generic/tclBasic.c: Made use of the thread's alloc cache + * generic/tclInt.h: stored in the ekeko at interp creation + * generic/tclNRE.h: to avoid hitting the TSD each time an + * generic/tclThreadAlloc.c: NRE callback is pushed or pulled; the + approach is suitably general to extend to evry other obj + allocation where an interp is know; this is left for some other + time, requires a lot of grunt work. + * generic/tclExecute.c: fix [Bug 2030670] that cause TclStackRealloc to panic on rare corner cases. Thx ajpasadyn for diagnose and patch. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cb96099..3e5c1cf 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.333 2008/07/29 05:30:25 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.334 2008/07/29 18:19:10 msofer Exp $ */ #include "tclInt.h" @@ -692,7 +692,8 @@ Tcl_CreateInterp(void) TclInitLimitSupport(interp); /* - * Initialise the thread-specific data ekeko. + * Initialise the thread-specific data ekeko. Note that the thread's alloc + * cache was already initialised by the call to alloc the interp struct. */ #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) diff --git a/generic/tclInt.h b/generic/tclInt.h index 1b10fc6..fb77ec5 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.380 2008/07/29 05:30:32 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.381 2008/07/29 18:19:12 msofer Exp $ */ #ifndef _TCLINT @@ -1602,6 +1602,24 @@ enum PkgPreferOptions { /* *---------------------------------------------------------------- + * This structure shadows the first few fields of the memory cache for the + * allocator defined in tclThreadAlloc.c; it has to be kept in sync with the + * definition there. + * Some macros require knowledge of some fields in the struct in order to + * avoid hitting the TSD unnecessarily. In order to facilitate this, a pointer + * to the relevant fields is kept in the objCache field in struct Interp. + *---------------------------------------------------------------- + */ + +typedef struct AllocCache { + struct Cache *nextPtr; /* Linked list of cache entries */ + Tcl_ThreadId owner; /* Which thread's cache is this? */ + Tcl_Obj *firstObjPtr; /* List of free objects for thread */ + int numObjects; /* Number of objects for thread */ +} AllocCache; + +/* + *---------------------------------------------------------------- * This structure defines an interpreter, which is a collection of commands * plus other state information related to interpreting commands, such as * variable storage. Primary responsibility for this data structure is in @@ -1928,17 +1946,12 @@ typedef struct Interp { * They are used by the macros defined below. */ - void *allocCache; + AllocCache *allocCache; void *pendingObjDataPtr; /* Pointer to the Cache and PendingObjData * structs for this interp's thread; see * tclObj.c and tclThreadAlloc.c */ int *asyncReadyPtr; /* Pointer to the asyncReady indicator for * this interp's thread; see tclAsync.c */ - int *stackBound; /* Pointer to the limit stack address - * allowable for invoking a new command - * without "risking" a C-stack overflow; see - * TclpCheckStackSpace in the platform's - * directory. */ /* * The pointer to the object system root ekeko. c.f. TIP #257. @@ -3411,6 +3424,12 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr); # define TclIncrObjsFreed() #endif /* TCL_COMPILE_STATS */ +# define TclAllocObjStorage(objPtr) \ + TclAllocObjStorageEx(NULL, (objPtr)) + +# define TclFreeObjStorage(objPtr) \ + TclFreeObjStorageEx(NULL, (objPtr)) + #ifndef TCL_MEM_DEBUG # define TclNewObj(objPtr) \ TclIncrObjsAllocated(); \ @@ -3453,10 +3472,10 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr); * track memory leaks */ -# define TclAllocObjStorage(objPtr) \ +# define TclAllocObjStorageEx(interp, objPtr) \ (objPtr) = (Tcl_Obj *) Tcl_Alloc(sizeof(Tcl_Obj)) -# define TclFreeObjStorage(objPtr) \ +# define TclFreeObjStorageEx(interp, objPtr) \ ckfree((char *) (objPtr)) #undef USE_THREAD_ALLOC @@ -3476,11 +3495,43 @@ MODULE_SCOPE void TclpSetAllocCache(void *); MODULE_SCOPE void TclpFreeAllocMutex(Tcl_Mutex *mutex); MODULE_SCOPE void TclpFreeAllocCache(void *); -# define TclAllocObjStorage(objPtr) \ - (objPtr) = TclThreadAllocObj() - -# define TclFreeObjStorage(objPtr) \ - TclThreadFreeObj((objPtr)) +/* + * These macros need to be kept in sync with the code of TclThreadAllocObj() + * and TclThreadFreeObj(). + * + * Note that the optimiser should resolve the case (interp==NULL) at compile + * time. + */ + +# define ALLOC_NOBJHIGH 1200 + +# define TclAllocObjStorageEx(interp, objPtr) \ + do { \ + AllocCache *cachePtr; \ + if (((interp) == NULL) || \ + ((cachePtr = ((Interp *)(interp))->allocCache), \ + (cachePtr->numObjects == 0))) { \ + (objPtr) = TclThreadAllocObj(); \ + } else { \ + (objPtr) = cachePtr->firstObjPtr; \ + cachePtr->firstObjPtr = (objPtr)->internalRep.otherValuePtr; \ + --cachePtr->numObjects; \ + } \ + } while (0) + +# define TclFreeObjStorageEx(interp, objPtr) \ + do { \ + AllocCache *cachePtr; \ + if (((interp) == NULL) || \ + ((cachePtr = ((Interp *)(interp))->allocCache), \ + (cachePtr->numObjects >= ALLOC_NOBJHIGH))) { \ + TclThreadFreeObj(objPtr); \ + } else { \ + (objPtr)->internalRep.otherValuePtr = cachePtr->firstObjPtr; \ + cachePtr->firstObjPtr = objPtr; \ + ++cachePtr->numObjects; \ + } \ + } while (0) #else /* not PURIFY or USE_THREAD_ALLOC */ @@ -3489,7 +3540,7 @@ MODULE_SCOPE void TclpFreeAllocCache(void *); MODULE_SCOPE Tcl_Mutex tclObjMutex; #endif -# define TclAllocObjStorage(objPtr) \ +# define TclAllocObjStorageEx(interp, objPtr) \ Tcl_MutexLock(&tclObjMutex); \ if (tclFreeObjList == NULL) { \ TclAllocateFreeObjects(); \ @@ -3499,7 +3550,7 @@ MODULE_SCOPE Tcl_Mutex tclObjMutex; tclFreeObjList->internalRep.otherValuePtr; \ Tcl_MutexUnlock(&tclObjMutex) -# define TclFreeObjStorage(objPtr) \ +# define TclFreeObjStorageEx(interp, objPtr) \ Tcl_MutexLock(&tclObjMutex); \ (objPtr)->internalRep.otherValuePtr = (void *) tclFreeObjList; \ tclFreeObjList = (objPtr); \ @@ -3957,8 +4008,14 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, * DO NOT LET THEM CROSS THREAD BOUNDARIES */ +#define TclSmallAlloc(nbytes, memPtr) \ + TclSmallAllocEx(NULL, (nbytes), (memPtr)) + +#define TclSmallFree(memPtr) \ + TclSmallFreeEx(NULL, (memPtr)) + #ifndef TCL_MEM_DEBUG -#define TclSmallAlloc(nbytes, memPtr) \ +#define TclSmallAllocEx(interp, nbytes, memPtr) \ { \ Tcl_Obj *objPtr; \ switch ((nbytes)>sizeof(Tcl_Obj)) { \ @@ -3969,16 +4026,16 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, case 0: (void)0; \ } \ TclIncrObjsAllocated(); \ - TclAllocObjStorage(objPtr); \ - memPtr = (ClientData) objPtr; \ + TclAllocObjStorageEx((interp), (objPtr)); \ + memPtr = (ClientData) (objPtr); \ } -#define TclSmallFree(memPtr) \ - TclFreeObjStorage((Tcl_Obj *) memPtr); \ +#define TclSmallFreeEx(interp, memPtr) \ + TclFreeObjStorageEx((interp), (Tcl_Obj *) (memPtr)); \ TclIncrObjsFreed() #else /* TCL_MEM_DEBUG */ -#define TclSmallAlloc(nbytes, memPtr) \ +#define TclSmallAllocEx(interp, nbytes, memPtr) \ { \ Tcl_Obj *objPtr; \ switch ((nbytes)>sizeof(Tcl_Obj)) { \ @@ -3992,7 +4049,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, memPtr = (ClientData) objPtr; \ } -#define TclSmallFree(memPtr) \ +#define TclSmallFreeEx(interp, memPtr) \ { \ Tcl_Obj *objPtr = (Tcl_Obj *) memPtr; \ objPtr->bytes = NULL; \ diff --git a/generic/tclNRE.h b/generic/tclNRE.h index a90bc8d..3943cfb 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.8 2008/07/29 05:52:29 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.9 2008/07/29 18:19:17 msofer Exp $ */ @@ -82,10 +82,10 @@ MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; *****************************************************************************/ #if USE_SMALL_ALLOC -#define TCLNR_ALLOC(interp, ptr) TclSmallAlloc(sizeof(TEOV_callback), ptr) -#define TCLNR_FREE(interp, ptr) TclSmallFree((ptr)) +#define TCLNR_ALLOC(interp, ptr) TclSmallAllocEx(interp, sizeof(TEOV_callback), (ptr)) +#define TCLNR_FREE(interp, ptr) TclSmallFreeEx((interp), (ptr)) #else -#define TCLNR_ALLOC(interp, size, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_callback)))) +#define TCLNR_ALLOC(interp, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_callback)))) #define TCLNR_FREE(interp, ptr) ckfree((char *) (ptr)) #endif diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index 0850d66..a448328 100755 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadAlloc.c,v 1.27 2008/03/20 09:49:16 dkf Exp $ + * RCS: @(#) $Id: tclThreadAlloc.c,v 1.28 2008/07/29 18:19:17 msofer Exp $ */ #include "tclInt.h" @@ -37,7 +37,9 @@ */ #define NOBJALLOC 800 -#define NOBJHIGH 1200 + +/* Actual definition moved to tclInt.h */ +#define NOBJHIGH ALLOC_NOBJHIGH /* * The following union stores accounting information for each block including @@ -97,7 +99,9 @@ typedef struct Bucket { /* * The following structure defines a cache of buckets and objs, of which there - * will be (at most) one per thread. + * will be (at most) one per thread. Any changes need to be reflected in the + * struct AllocCache defined in tclInt.h, possibly also in the initialisation + * code in Tcl_CreateInterp(). */ typedef struct Cache { @@ -490,6 +494,10 @@ TclpRealloc( * May move Tcl_Obj's from shared cached or allocate new Tcl_Obj's if * list is empty. * + * Note: + * If this code is updated, the changes need to be reflected in the + * macro TclAllocObjStorageEx() defined in tclInt.h + * *---------------------------------------------------------------------- */ @@ -559,6 +567,10 @@ TclThreadAllocObj(void) * Side effects: * May move free Tcl_Obj's to shared list upon hitting high water mark. * + * Note: + * If this code is updated, the changes need to be reflected in the + * macro TclAllocObjStorageEx() defined in tclInt.h + * *---------------------------------------------------------------------- */ -- cgit v0.12 From 580724e069e7de6cbe19b235d60d6a6abe6712e3 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 29 Jul 2008 20:53:20 +0000 Subject: a timid start at cleaning up --- ChangeLog | 4 ++ generic/tclBasic.c | 119 +++++++++++++++++++++++++-------------------------- generic/tclExecute.c | 25 +---------- generic/tclNRE.h | 21 +++------ 4 files changed, 72 insertions(+), 97 deletions(-) diff --git a/ChangeLog b/ChangeLog index e471e99..942c603 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-29 Miguel Sofer + * generic/tclBasic.c: Clean up + * generic/tclNRE.h: + * generic/tclExecute.c: + * generic/tclBasic.c: Made use of the thread's alloc cache * generic/tclInt.h: stored in the ekeko at interp creation * generic/tclNRE.h: to avoid hitting the TSD each time an diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3e5c1cf..0524d5b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.334 2008/07/29 18:19:10 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.335 2008/07/29 20:53:21 msofer Exp $ */ #include "tclInt.h" @@ -5661,34 +5661,35 @@ TclNREvalObjEx( int numSrcBytes; int result; int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); + List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; Tcl_IncrRefCount(objPtr); - /* - * Pure List Optimization (no string representation). In this case, we can - * safely use Tcl_EvalObjv instead and get an appreciable improvement in - * execution speed. This is because it allows us to avoid a setFromAny - * step that would just pack everything into a string and back out again. - * - * This also preserves any associations between list elements and location - * information for such elements. - * - * This restriction has been relaxed a bit by storing in lists whether - * they are "canonical" or not (a canonical list being one that is either - * pure or that has its string rep derived by UpdateStringOfList from the - * internal rep). - */ - - if (objPtr->typePtr == &tclListType) { /* is a list... */ - List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; + if ((objPtr->typePtr == &tclListType) && /* is a list... */ + ((objPtr->bytes == NULL || /* ...without a string rep */ + listRepPtr->canonicalFlag))) { /* ...or that is canonical */ + Tcl_Obj *listPtr = objPtr; + CmdFrame *eoFramePtr = NULL; + int objc; + Tcl_Obj **objv; + + /* + * Pure List Optimization (no string representation). In this case, we + * can safely use Tcl_EvalObjv instead and get an appreciable + * improvement in execution speed. This is because it allows us to + * avoid a setFromAny step that would just pack everything into a + * string and back out again. + * + * This also preserves any associations between list elements and + * location information for such elements. + * + * This restriction has been relaxed a bit by storing in lists whether + * they are "canonical" or not (a canonical list being one that is either + * pure or that has its string rep derived by UpdateStringOfList from + * the internal rep). + */ - if (objPtr->bytes == NULL || /* ...without a string rep */ - listRepPtr->canonicalFlag) { /* ...or that is canonical */ - Tcl_Obj *listPtr = objPtr; - CmdFrame *eoFramePtr = NULL; - int objc; - Tcl_Obj **objv; - + if (word != INT_MIN) { /* * TIP #280 Structures for tracking lines. As we know that this is * dynamic execution we ignore the invoker, even if known. @@ -5704,41 +5705,39 @@ TclNREvalObjEx( * Note that we use (word==INTMIN) to signal that no command frame * should be pushed, as needed by alias and ensemble redirections. */ - - if (word != INT_MIN) { - eoFramePtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); - eoFramePtr->nline = 0; - eoFramePtr->line = NULL; - - eoFramePtr->type = TCL_LOCATION_EVAL_LIST; - eoFramePtr->level = (iPtr->cmdFramePtr == NULL? - 1 : iPtr->cmdFramePtr->level + 1); - eoFramePtr->numLevels = iPtr->numLevels; - eoFramePtr->framePtr = iPtr->framePtr; - eoFramePtr->nextPtr = iPtr->cmdFramePtr; - - eoFramePtr->cmd.listPtr = objPtr; - eoFramePtr->data.eval.path = NULL; - - iPtr->cmdFramePtr = eoFramePtr; - } - - /* - * Shimmer protection! Always pass an unshared obj. The caller could - * incr the refCount of objPtr AFTER calling us! To be completely safe - * we always make a copy. - * - * FIXME OPT: preserve just the internal rep? - */ - - listPtr = TclListObjCopy(interp, objPtr); - Tcl_IncrRefCount(listPtr); - TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, - listPtr, NULL); - - ListObjGetElements(listPtr, objc, objv); - return TclNREvalObjv(interp, objc, objv, flags, NULL); + + eoFramePtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); + eoFramePtr->nline = 0; + eoFramePtr->line = NULL; + + eoFramePtr->type = TCL_LOCATION_EVAL_LIST; + eoFramePtr->level = (iPtr->cmdFramePtr == NULL? + 1 : iPtr->cmdFramePtr->level + 1); + eoFramePtr->numLevels = iPtr->numLevels; + eoFramePtr->framePtr = iPtr->framePtr; + eoFramePtr->nextPtr = iPtr->cmdFramePtr; + + eoFramePtr->cmd.listPtr = objPtr; + eoFramePtr->data.eval.path = NULL; + + iPtr->cmdFramePtr = eoFramePtr; } + + /* + * Shimmer protection! Always pass an unshared obj. The caller could + * incr the refCount of objPtr AFTER calling us! To be completely safe + * we always make a copy. + * + * FIXME OPT: preserve just the internal rep? + */ + + listPtr = TclListObjCopy(interp, objPtr); + Tcl_IncrRefCount(listPtr); + TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, + listPtr, NULL); + + ListObjGetElements(listPtr, objc, objv); + return TclNREvalObjv(interp, objc, objv, flags, NULL); } if (!(flags & TCL_EVAL_DIRECT)) { @@ -5765,7 +5764,7 @@ TclNREvalObjEx( TclNRAddCallback(interp, NRRunBytecode, codePtr, NULL, NULL, NULL); return TCL_OK; } - + /* * We're not supposed to use the compiler or byte-code interpreter. Let * Tcl_EvalEx evaluate the command directly (and probably more slowly). diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0965d48..9574e0f 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.389 2008/07/29 13:45:17 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.390 2008/07/29 20:53:21 msofer Exp $ */ #include "tclInt.h" @@ -1137,25 +1137,6 @@ StackReallocWords( } void -TclStackPurge( - Tcl_Interp *interp, - Tcl_Obj **tosPtr) -{ - Tcl_Obj **newTosPtr = GET_TOSPTR(interp); - - if (!tosPtr) { - Tcl_Panic("TclStackPurge: cannot purge to NULL"); - } - while (newTosPtr && (newTosPtr != tosPtr)) { - TclStackFree(interp, NULL); - newTosPtr = GET_TOSPTR(interp); - } - if (newTosPtr != tosPtr) { - Tcl_Panic("TclStackPurge: requested tosPtr not here"); - } -} - -void TclStackFree( Tcl_Interp *interp, void *freePtr) @@ -1490,9 +1471,7 @@ TclCompileObj( { register Interp *iPtr = (Interp *) interp; register ByteCode *codePtr; /* Tcl Internal type of bytecode. */ - Namespace *namespacePtr; - - namespacePtr = iPtr->varFramePtr->nsPtr; + Namespace *namespacePtr = iPtr->varFramePtr->nsPtr; /* * If the object is not already of tclByteCodeType, compile it (and reset diff --git a/generic/tclNRE.h b/generic/tclNRE.h index 3943cfb..3a5af55 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.9 2008/07/29 18:19:17 msofer Exp $ + * RCS: @(#) $Id: tclNRE.h,v 1.10 2008/07/29 20:53:22 msofer Exp $ */ @@ -22,20 +22,16 @@ * Stuff during devel *****************************************************************************/ -#define USE_SMALL_ALLOC 1 /* perf is important for some of these things! */ -#define ENABLE_ASSERTS 1 - -/***************************************************************************** - * Private api fo NRE - *****************************************************************************/ +#define ENABLE_ASSERTS 0 +#define USE_SMALL_ALLOC 1 /* Only turn off for debugging purposes. */ /* - * Main data struct for representing NR commands (generated at runtime). + * TEOV_callback - + * + * Main data struct for representing NR commands. It is designed to fit in + * sizeof(Tcl_Obj) in order to exploit the fastest memory allocator available. */ -struct ByteCode; - -/* Fill up a SmallAlloc: 4 free ptrs for the user */ typedef struct TEOV_callback { Tcl_NRPostProc *procPtr; ClientData data[4]; @@ -44,9 +40,6 @@ typedef struct TEOV_callback { #define TOP_CB(iPtr) (((Interp *)(iPtr))->execEnvPtr->callbackPtr) -#define GET_TOSPTR(iPtr) \ - (((Interp *)iPtr)->execEnvPtr->execStackPtr->tosPtr) - /* * Inline version of Tcl_NRAddCallback */ -- cgit v0.12 From 4e7c533c4c7575412649e7978325ff32cec68d3b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 29 Jul 2008 23:18:06 +0000 Subject: * tests/NRE.test: new tests that went MIA in the NRE revamping --- ChangeLog | 2 + tests/NRE.test | 226 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 225 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 942c603..f0ca176 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-29 Miguel Sofer + * tests/NRE.test: new tests that went MIA in the NRE revamping + * generic/tclBasic.c: Clean up * generic/tclNRE.h: * generic/tclExecute.c: diff --git a/tests/NRE.test b/tests/NRE.test index a881675..bc0801a 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.5 2008/07/21 03:43:32 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.6 2008/07/29 23:18:07 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -29,6 +29,26 @@ if {[testConstraint teststacklimit]} { set oldLimit [teststacklimit 2048] } +namespace eval testnre { + # + # [testnrelevels] returns a 5-list with: C-stack depth, iPtr->numlevels, + # cmdFrame level, callFrame level and tosPtr + # + variable last [testnrelevels] + proc depthDiff {} { + variable last + set depth [testnrelevels] + set res {} + foreach t $depth l $last { + lappend res [expr {$t-$l}] + } + set last $depth + return $res + } + namespace export * +} +namespace import testnre::* + # # The first few tests will blow the C stack if the NR machinery is not working @@ -41,6 +61,7 @@ set oldRecursionLimit [interp recursionlimit {}] interp recursionlimit {} 100000 test NRE-1.1 {self-recursive procs} -setup { + variable a {} proc a i { if {[incr i] > 20000} { return $i @@ -53,6 +74,21 @@ test NRE-1.1 {self-recursive procs} -setup { rename a {} } -result {0 20001} +test NRE-1.1a {self-recursive procs} -setup { + variable a {} + proc a i { + set x [depthDiff] + if {[incr i] > 10} { + return [lrange $x 0 3] + } + a $i + } +} -body { + a 0 +} -cleanup { + rename a {} +} -result {0 1 1 1} + test NRE-1.2 {self-recursive lambdas} -setup { set a [list i { if {[incr i] > 20000} { @@ -330,6 +366,20 @@ test NRE-X.1 {eval in wrong interp} { namespace eval tcl::unsupported namespace export tailcall namespace import tcl::unsupported::tailcall +test NRE-T.0 {tailcall is constant space} -constraints {tailcall knownbug} -setup { + proc a i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + tailcall a $i + } +} -body { + a 0 +} -cleanup { + rename a {} +} -result {0 0 0 0 0} + test NRE-T.1 {tailcall} -constraints {tailcall} -body { namespace eval a { variable x *::a @@ -407,8 +457,178 @@ test NRE-T.6 {tailcall does remove callframes} -constraints {tailcall} -body { rename boo {} } -result 1 -namespace forget tcl::unsupported::tailcall +test NRE-T.7 {tailcall does return} -constraints {tailcall} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall set x 1 + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + proc d {} { + variable res + append res d + c + append res d + } + } +} -body { + namespace eval ::foo d +} -cleanup { + namespace delete ::foo +} -result dcbabcd + +test NRE-T.8 {tailcall tailcall} -constraints {tailcall knownbug} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall tailcall set x 1 + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + proc d {} { + variable res + append res d + c + append res d + } + } +} -body { + namespace eval ::foo d +} -cleanup { + namespace delete ::foo +} -result dcbacd +test NRE-T.9 {tailcall does return} -constraints {tailcall} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall {set x 1} + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + proc d {} { + variable res + append res d + c + append res d + } + } +} -body { + namespace eval ::foo d +} -cleanup { + namespace delete ::foo +} -result dcbabcd + +test NRE-T.10 {tailcall tailcall} -constraints {tailcall knownbug} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall {tailcall set x 1} + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + proc d {} { + variable res + append res d + c + append res d + } + } +} -body { + namespace eval ::foo d +} -cleanup { + namespace delete ::foo +} -result dcbacd + +test NRE-T.11 {tailcall tailcall} -constraints {tailcall knownbug} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall {tailcall {set x 1}} + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + proc d {} { + variable res + append res d + c + append res d + } + } +} -body { + namespace eval ::foo d +} -cleanup { + namespace delete ::foo +} -result dcbacd + + +namespace forget tcl::unsupported::tailcall # # Test that ensembles are non-recursive # @@ -425,6 +645,6 @@ if {[testConstraint teststacklimit]} { teststacklimit $oldLimit unset oldLimit } - +namespace delete testnre return -- cgit v0.12 From 18213edfa8ddd785f6eda5f24766f09b3c95a909 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 30 Jul 2008 17:30:55 +0000 Subject: * generic/tclBasic.c: guard against the value of iPtr->evalFlags changing between the times where TEOV and TEOV_exception run. Thanks dgp for catching this. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0ca176..511aef8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-07-30 Miguel Sofer + + * generic/tclBasic.c: guard against the value of iPtr->evalFlags + changing between the times where TEOV and TEOV_exception + run. Thanks dgp for catching this. + 2008-07-29 Miguel Sofer * tests/NRE.test: new tests that went MIA in the NRE revamping diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0524d5b..7580316 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.335 2008/07/29 20:53:21 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.336 2008/07/30 17:30:56 msofer Exp $ */ #include "tclInt.h" @@ -4329,7 +4329,8 @@ TEOV_PushExceptionHandlers( * No CONTINUE or BREAK at level 0, manage RETURN */ - TclNRAddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL); + TclNRAddCallback(interp, TEOV_Exception, INT2PTR(iPtr->evalFlags), + NULL, NULL, NULL); } } @@ -4366,7 +4367,7 @@ TEOV_Exception( int result) { Interp *iPtr = (Interp *) interp; - int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); + int allowExceptions = PTR2INT(data[0]); if (result != TCL_OK) { if (result == TCL_RETURN) { -- cgit v0.12 From e86d18adcb954c6cdaa595f47a553ababe192fa7 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 30 Jul 2008 17:34:52 +0000 Subject: fixing last commit --- generic/tclBasic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7580316..028fb1e 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.336 2008/07/30 17:30:56 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.337 2008/07/30 17:34:52 msofer Exp $ */ #include "tclInt.h" @@ -4367,7 +4367,7 @@ TEOV_Exception( int result) { Interp *iPtr = (Interp *) interp; - int allowExceptions = PTR2INT(data[0]); + int allowExceptions = (PTR2INT(data[0]) & TCL_ALLOW_EXCEPTIONS); if (result != TCL_OK) { if (result == TCL_RETURN) { -- cgit v0.12 From e251dd2937f9caaf882a32adb4d40f787a7e00d3 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 30 Jul 2008 17:54:21 +0000 Subject: * generic/tclBasic.c (TclNREvalObjEx): new comments and code reorg to clarify what is happening. --- ChangeLog | 3 + generic/tclBasic.c | 166 ++++++++++++++++++++++++++++------------------------- 2 files changed, 92 insertions(+), 77 deletions(-) diff --git a/ChangeLog b/ChangeLog index 511aef8..9c277fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-30 Miguel Sofer + * generic/tclBasic.c (TclNREvalObjEx): new comments and code reorg + to clarify what is happening. + * generic/tclBasic.c: guard against the value of iPtr->evalFlags changing between the times where TEOV and TEOV_exception run. Thanks dgp for catching this. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 028fb1e..fd93641 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.337 2008/07/30 17:34:52 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.338 2008/07/30 17:54:23 msofer Exp $ */ #include "tclInt.h" @@ -5657,15 +5657,16 @@ TclNREvalObjEx( const CmdFrame *invoker, /* Frame of the command doing the eval. */ int word) /* Index of the word which is in objPtr. */ { - register Interp *iPtr = (Interp *) interp; - char *script; - int numSrcBytes; + Interp *iPtr = (Interp *) interp; int result; - int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; - Tcl_IncrRefCount(objPtr); - + /* + * This function consists of three independent blocks for: direct + * evaluation of canonical lists, compileation and bytecode execution and + * finally direct evaluation. Precisely one of these blocks will be run. + */ + if ((objPtr->typePtr == &tclListType) && /* is a list... */ ((objPtr->bytes == NULL || /* ...without a string rep */ listRepPtr->canonicalFlag))) { /* ...or that is canonical */ @@ -5727,11 +5728,13 @@ TclNREvalObjEx( /* * Shimmer protection! Always pass an unshared obj. The caller could * incr the refCount of objPtr AFTER calling us! To be completely safe - * we always make a copy. + * we always make a copy. The callback takes care od the refCounts for + * both listPtr and objPtr. * * FIXME OPT: preserve just the internal rep? */ + Tcl_IncrRefCount(objPtr); listPtr = TclListObjCopy(interp, objPtr); Tcl_IncrRefCount(listPtr); TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, @@ -5749,6 +5752,7 @@ TclNREvalObjEx( * We transfer this to the byte code compiler. */ + int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS); ByteCode *codePtr; CallFrame *savedVarFramePtr = NULL; /* Saves old copy of * iPtr->varFramePtr in case @@ -5758,6 +5762,7 @@ TclNREvalObjEx( savedVarFramePtr = iPtr->varFramePtr; iPtr->varFramePtr = iPtr->rootFramePtr; } + Tcl_IncrRefCount(objPtr); codePtr = TclCompileObj(interp, objPtr, invoker, word); TclNRAddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, @@ -5766,91 +5771,98 @@ TclNREvalObjEx( return TCL_OK; } - /* - * We're not supposed to use the compiler or byte-code interpreter. Let - * Tcl_EvalEx evaluate the command directly (and probably more slowly). - * - * TIP #280. Propagate context as much as we can. Especially if the script - * to evaluate is a single literal it makes sense to look if our context - * is one with absolute line numbers we can then track into the literal - * itself too. - * - * See also tclCompile.c, TclInitCompileEnv, for the equivalent code in - * the bytecode compiler. - */ - - if (invoker == NULL) { - /* - * No context, force opening of our own. - */ - - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - result = Tcl_EvalEx(interp, script, numSrcBytes, flags); - } else { + { /* - * We have an invoker, describing the command asking for the - * evaluation of a subordinate script. This script may originate in a - * literal word, or from a variable, etc. Using the line array we now - * check if we have good line information for the relevant word. The - * type of context is relevant as well. In a non-'source' context we - * don't have to try tracking lines. + * We're not supposed to use the compiler or byte-code + * interpreter. Let Tcl_EvalEx evaluate the command directly (and + * probably more slowly). + * + * TIP #280. Propagate context as much as we can. Especially if the + * script to evaluate is a single literal it makes sense to look if + * our context is one with absolute line numbers we can then track + * into the literal itself too. * - * First see if the word exists and is a literal. If not we go through - * the easy dynamic branch. No need to perform more complex - * invokations. + * See also tclCompile.c, TclInitCompileEnv, for the equivalent code + * in the bytecode compiler. */ - int pc = 0; - CmdFrame *ctxPtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); - - *ctxPtr = *invoker; - if (invoker->type == TCL_LOCATION_BC) { - /* - * Note: Type BC => ctxPtr->data.eval.path is not used. - * ctxPtr->data.tebc.codePtr is used instead. - */ - - TclGetSrcInfoForPc(ctxPtr); - pc = 1; - } - - script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - - if ((invoker->nline <= word) || - (invoker->line[word] < 0) || - (ctxPtr->type != TCL_LOCATION_SOURCE)) { + char *script; + int numSrcBytes; + + Tcl_IncrRefCount(objPtr); + if (invoker == NULL) { /* - * Dynamic script, or dynamic context, force our own context. + * No context, force opening of our own. */ - + + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = Tcl_EvalEx(interp, script, numSrcBytes, flags); - } else { /* - * Absolute context to reuse. + * We have an invoker, describing the command asking for the + * evaluation of a subordinate script. This script may originate in a + * literal word, or from a variable, etc. Using the line array we now + * check if we have good line information for the relevant word. The + * type of context is relevant as well. In a non-'source' context we + * don't have to try tracking lines. + * + * First see if the word exists and is a literal. If not we go through + * the easy dynamic branch. No need to perform more complex + * invokations. */ - - iPtr->invokeCmdFramePtr = ctxPtr; - iPtr->evalFlags |= TCL_EVAL_CTX; - - result = TclEvalEx(interp, script, numSrcBytes, flags, - ctxPtr->line[word]); - - if (pc) { + + int pc = 0; + CmdFrame *ctxPtr = (CmdFrame *) + TclStackAlloc(interp, sizeof(CmdFrame)); + + *ctxPtr = *invoker; + if (invoker->type == TCL_LOCATION_BC) { /* - * Death of SrcInfo reference. + * Note: Type BC => ctxPtr->data.eval.path is not used. + * ctxPtr->data.tebc.codePtr is used instead. */ - - Tcl_DecrRefCount(ctxPtr->data.eval.path); + + TclGetSrcInfoForPc(ctxPtr); + pc = 1; } + + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); + + if ((invoker->nline <= word) || + (invoker->line[word] < 0) || + (ctxPtr->type != TCL_LOCATION_SOURCE)) { + /* + * Dynamic script, or dynamic context, force our own context. + */ + + result = Tcl_EvalEx(interp, script, numSrcBytes, flags); + + } else { + /* + * Absolute context to reuse. + */ + + iPtr->invokeCmdFramePtr = ctxPtr; + iPtr->evalFlags |= TCL_EVAL_CTX; + + result = TclEvalEx(interp, script, numSrcBytes, flags, + ctxPtr->line[word]); + + if (pc) { + /* + * Death of SrcInfo reference. + */ + + Tcl_DecrRefCount(ctxPtr->data.eval.path); + } + } + TclStackFree(interp, ctxPtr); } - TclStackFree(interp, ctxPtr); + TclDecrRefCount(objPtr); + return result; } - TclDecrRefCount(objPtr); - return result; } - + static int TEOEx_ByteCodeCallback( ClientData data[], -- cgit v0.12 From 5ddf3538699df040576471a623bfc1f3c3c38bd3 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 00:43:06 +0000 Subject: * generic/tclBasic.c: Improved tailcalls and tests. * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclTest.c: * tests/NRE.test: --- ChangeLog | 6 +++ generic/tclBasic.c | 69 ++++++++++++++++++------------- generic/tclCompile.h | 4 +- generic/tclExecute.c | 91 ++++++++++++++++++++++++---------------- generic/tclTest.c | 15 +++++-- tests/NRE.test | 114 +++++++++++++++++++++++++++++---------------------- 6 files changed, 179 insertions(+), 120 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c277fa..6bc09cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-07-30 Miguel Sofer + * generic/tclBasic.c: Improved tailcalls. + * generic/tclCompile.h: + * generic/tclExecute.c: + * generic/tclTest.c: + * tests/NRE.test: + * generic/tclBasic.c (TclNREvalObjEx): new comments and code reorg to clarify what is happening. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index fd93641..fa42894 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.338 2008/07/30 17:54:23 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.339 2008/07/31 00:43:09 msofer Exp $ */ #include "tclInt.h" @@ -130,7 +130,8 @@ static Tcl_NRPostProc TEOEx_ByteCodeCallback; static Tcl_NRPostProc NRCommand; static Tcl_NRPostProc NRRunObjProc; -static Tcl_NRPostProc EvalTailcall; +static Tcl_NRPostProc TailcallEval; +static Tcl_NRPostProc TailcallCleanup; #define NR_IS_COMMAND(callbackPtr) \ (callbackPtr \ @@ -4180,7 +4181,7 @@ TclNRRunCallbacks( if (tebcCall) { if ((callbackPtr->procPtr == NRRunBytecode) || - (callbackPtr->procPtr == NRDropCommand)) { + (callbackPtr->procPtr == NRDoTailcall)) { /* * TEBC pass thru: let the caller tebc handle and get rid of * this callback. @@ -4190,6 +4191,16 @@ TclNRRunCallbacks( } } + if (callbackPtr->procPtr == NRDoTailcall) { + /* + * It is an error to schedule a tailcall in this situation. + */ + + Tcl_SetResult(interp, + "tailcall can only be called from a proc or lambda", TCL_STATIC); + result = TCL_ERROR; + } + /* * IMPLEMENTATION REMARKS (FIXME) * @@ -4273,7 +4284,7 @@ NRRunBytecode( } int -NRDropCommand( +NRDoTailcall( ClientData data[], Tcl_Interp *interp, int result) @@ -5666,7 +5677,7 @@ TclNREvalObjEx( * evaluation of canonical lists, compileation and bytecode execution and * finally direct evaluation. Precisely one of these blocks will be run. */ - + if ((objPtr->typePtr == &tclListType) && /* is a list... */ ((objPtr->bytes == NULL || /* ...without a string rep */ listRepPtr->canonicalFlag))) { /* ...or that is canonical */ @@ -5810,7 +5821,7 @@ TclNREvalObjEx( * the easy dynamic branch. No need to perform more complex * invokations. */ - + int pc = 0; CmdFrame *ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); @@ -5841,7 +5852,7 @@ TclNREvalObjEx( /* * Absolute context to reuse. */ - + iPtr->invokeCmdFramePtr = ctxPtr; iPtr->evalFlags |= TCL_EVAL_CTX; @@ -5862,7 +5873,7 @@ TclNREvalObjEx( return result; } } - + static int TEOEx_ByteCodeCallback( ClientData data[], @@ -7886,26 +7897,11 @@ TclTailcallObjCmd( count += NR_IS_COMMAND(tailPtr); } -#if 1 if (!iPtr->varFramePtr->isProcCallFrame) { - /* FIXME! Why error? Just look if we have a TEOV above! */ Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; } -#else - if (!tailPtr->nextPtr) { - /* FIXME! Is this the behaviour we want? */ - Tcl_SetResult(interp, - "cannot tailcall: not running a command", TCL_STATIC); - return TCL_ERROR; - } -#endif - - /* - * Temporarily put NULL as the TOP_BC, register a callback, then - * replug things back the way they were. - */ nsPtr->activationCount++; if (objc == 2) { @@ -7913,18 +7909,22 @@ TclTailcallObjCmd( } else { scriptPtr = Tcl_NewListObj(objc-1, objv+1); } + Tcl_IncrRefCount(scriptPtr); + + /* + * Add two callbacks: first the one to actually evaluate the tailcalled + * command, then the one that signals TEBC to stash the first at its + * proper place. + */ - TOP_CB(iPtr) = tailPtr->nextPtr; - TclNRAddCallback(interp, EvalTailcall, scriptPtr, nsPtr, NULL, NULL); - tailPtr->nextPtr = TOP_CB(iPtr); - TOP_CB(iPtr) = rootPtr; + TclNRAddCallback(interp, TailcallEval, scriptPtr, nsPtr, NULL, NULL); + TclNRAddCallback(interp, NRDoTailcall, NULL, NULL, NULL, NULL); - TclNRAddCallback(interp, NRDropCommand, NULL, NULL, NULL, NULL); return TCL_OK; } static int -EvalTailcall( +TailcallEval( ClientData data[], Tcl_Interp *interp, int result) @@ -7933,6 +7933,7 @@ EvalTailcall( Tcl_Obj *scriptPtr = data[0]; Namespace *nsPtr = data[1]; + TclNRAddCallback(interp, TailcallCleanup, scriptPtr, NULL, NULL, NULL); if (result == TCL_OK) { iPtr->lookupNsPtr = nsPtr; result = TclNREvalObjEx(interp, scriptPtr, 0, NULL, 0); @@ -7950,6 +7951,16 @@ EvalTailcall( } return result; } + +static int +TailcallCleanup( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_DecrRefCount((Tcl_Obj *) data[0]); + return result; +} void Tcl_NRAddCallback( diff --git a/generic/tclCompile.h b/generic/tclCompile.h index c5ab71d..8d1db2c 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.97 2008/07/29 05:30:25 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.98 2008/07/31 00:43:09 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -838,7 +838,7 @@ typedef struct { */ MODULE_SCOPE Tcl_NRPostProc NRRunBytecode; -MODULE_SCOPE Tcl_NRPostProc NRDropCommand; +MODULE_SCOPE Tcl_NRPostProc NRDoTailcall; /* *---------------------------------------------------------------- diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9574e0f..2a1d232 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.390 2008/07/29 20:53:21 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.391 2008/07/31 00:43:09 msofer Exp $ */ #include "tclInt.h" @@ -1815,28 +1815,59 @@ TclExecuteByteCode( TCLNR_FREE(interp, callbackPtr); if (procPtr == NRRunBytecode) { - NR_DATA_BURY(); /* this level's state variables */ + /* + * A request to run a bytecode: record this level's state + * variables, swap codePtr and start running the new one. + */ + + NR_DATA_BURY(); codePtr = newCodePtr; - } else if (procPtr == NRDropCommand) { + } else if (procPtr == NRDoTailcall) { /* - * A request to perform a tailcall: just drop this - * bytecode as it is; the tailCall has been scheduled in - * the callbacks. + * A request to perform a tailcall: schedule the tailcall callback + * at its proper place, then just drop the present bytecode. */ + + TEOV_callback *tailcallPtr = TOP_CB(interp); + TEOV_callback *tmpPtr = tailcallPtr; + + if (catchTop != initCatchTop) { + /* FIXME!! If we catch it, the tailcall callback is still in + * and will be run when we return! Should we fish it out? */ + + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + goto checkForCatch; + } + + TOP_CB(interp) = tailcallPtr->nextPtr; #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " Tailcall: request received\n"); } #endif - if (catchTop != initCatchTop) { + if (bottomPtr->prevBottomPtr) { + while (tmpPtr->nextPtr != bottomPtr->prevBottomPtr->rootPtr) { + tmpPtr = tmpPtr->nextPtr; + } + tailcallPtr->nextPtr = tmpPtr->nextPtr; + tmpPtr->nextPtr = tailcallPtr; + goto abnormalReturn; /* drop a level */ + } else { + /* + * This will fall off TEBC; how do we know where to put it? It + * should be after all cleanup of the current command is done, + * but we do not know where that is. + */ + + Tcl_SetResult(interp, + "tailcall would fall off tebc!", TCL_STATIC); result = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", - TCL_STATIC); goto checkForCatch; } - goto abnormalReturn; /* drop a level */ } else { - Tcl_Panic("TEBC: TRCB sent us a record we cannot handle! (1)"); + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (1)"); } } nested = 1; @@ -7661,8 +7692,8 @@ TclExecuteByteCode( DECACHE_STACK_INFO(); if (TOP_CB(interp) == bottomPtr->rootPtr) { /* - * The bytecode is returning, remove the caller's arguments and - * keep processing the caller. + * The bytecode is returning, all callbacks were run. Remove the + * caller's arguments and keep processing the caller. */ while (cleanup--) { @@ -7672,32 +7703,20 @@ TclExecuteByteCode( goto nonRecursiveCallReturn; } else { /* - * A request for a new execution: a tailcall. Remove the caller's - * arguments and start the new bytecode. - * - * FIXME KNOWNBUG: we get a pointer smash if we do remove the - * arguments, a leak otherwise: tailcalls are not yet quite - * there. Chose to leave the leak for now. + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. */ - TEOV_callback *callbackPtr = TOP_CB(interp); - Tcl_NRPostProc *procPtr = callbackPtr->procPtr; - - if (procPtr == NRRunBytecode) { - goto nonRecursiveCallStart; - } else if (procPtr == NRDropCommand) { - /* FIXME: 'tailcall tailcall' not yet working */ - Tcl_Panic("Tailcalls from within tailcalls are not yet implemented"); - if (catchTop != initCatchTop) { - result = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", - TCL_STATIC); - goto checkForCatch; - } - goto abnormalReturn; /* drop a level */ - } else { - Tcl_Panic("TEBC: TEOV sent us a record we cannot handle! (2)"); + if (TOP_CB(interp)->procPtr == NRDoTailcall) { +#if 1 + Tcl_Panic("'tailcall tailcall' not yet implemented");// +#endif + Tcl_SetResult(interp,"'tailcall tailcall' not yet implemented", + TCL_STATIC); + result = TCL_ERROR; + goto checkForCatch; } + goto nonRecursiveCallStart; } } return result; diff --git a/generic/tclTest.c b/generic/tclTest.c index 4ce4277..1cb6714 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,11 +14,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.119 2008/07/29 05:30:38 msofer Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.120 2008/07/31 00:43:10 msofer Exp $ */ #define TCL_TEST #include "tclInt.h" +#include "tclNRE.h" /* * Required for Testregexp*Cmd @@ -6545,7 +6546,9 @@ TestNRELevels( static ptrdiff_t *refDepth = NULL; ptrdiff_t depth; Tcl_Obj *levels[5]; - + int i = 0; + TEOV_callback *cbPtr = ((Interp *) interp)->execEnvPtr->callbackPtr; + if (refDepth == NULL) { refDepth = &depth; } @@ -6558,8 +6561,14 @@ TestNRELevels( levels[3] = Tcl_NewIntObj(iPtr->varFramePtr->level); levels[4] = Tcl_NewIntObj((iPtr->execEnvPtr->execStackPtr->tosPtr - iPtr->execEnvPtr->execStackPtr->stackWords)); + + while (cbPtr) { + i++; + cbPtr = cbPtr->nextPtr; + } + levels[5] = Tcl_NewIntObj(i); - Tcl_SetObjResult(interp, Tcl_NewListObj(5, levels)); + Tcl_SetObjResult(interp, Tcl_NewListObj(6, levels)); return TCL_OK; } diff --git a/tests/NRE.test b/tests/NRE.test index bc0801a..dc306c7 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.6 2008/07/29 23:18:07 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.7 2008/07/31 00:43:10 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -31,8 +31,8 @@ if {[testConstraint teststacklimit]} { namespace eval testnre { # - # [testnrelevels] returns a 5-list with: C-stack depth, iPtr->numlevels, - # cmdFrame level, callFrame level and tosPtr + # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, + # cmdFrame level, callFrame level, tosPtr and callback depth # variable last [testnrelevels] proc depthDiff {} { @@ -102,6 +102,20 @@ test NRE-1.2 {self-recursive lambdas} -setup { unset a } -result {0 20001} +test NRE-1.2a {self-recursive lambdas} -setup { + set a [list i { + set x [depthDiff] + if {[incr i] > 10} { + return [lrange $x 0 3] + } + apply $::a $i + }] +} -body { + apply $a 0 +} -cleanup { + unset a +} -result {0 1 1 1} + test NRE-1.2.1 {self-recursive lambdas} -setup { set a [list {} { if {[incr ::i] > 20000} { @@ -152,6 +166,22 @@ test NRE-2.1 {alias is not recursive} -setup { rename b {} } -result {0 {20001 20001}} +test NRE-2.1a {alias is not recursive} -setup { + proc a i { + set x [depthDiff] + if {[incr i] > 10} { + return [lrange $x 0 3] + } + b $i + } + interp alias {} b {} a +} -body { + list [a 0] [b 0] +} -cleanup { + rename a {} + rename b {} +} -result {{0 2 1 1} {0 2 1 1}} + # # Test that imports are non-recursive # @@ -159,8 +189,9 @@ test NRE-2.1 {alias is not recursive} -setup { test NRE-3.1 {imports are not recursive} -setup { namespace eval foo { proc a i { - if {[incr i] > 20000} { - return $i + set x [depthDiff] + if {[incr i] > 10} { + return [lrange $x 0 3] } ::a $i } @@ -169,17 +200,18 @@ test NRE-3.1 {imports are not recursive} -setup { namespace import foo::a a 1 } -body { - list [catch {a 0} msg] $msg + a 0 } -cleanup { rename a {} namespace delete ::foo -} -result {0 20001} +} -result {0 2 1 1} test NRE-4.1 {ensembles are not recursive} -setup { proc a i { - if {[incr i] > 20000} { - return $i + set x [depthDiff] + if {[incr i] > 10} { + return [lrange $x 0 3] } b foo $i } @@ -187,27 +219,28 @@ test NRE-4.1 {ensembles are not recursive} -setup { -command b \ -map [list foo a] } -body { - list [catch {list [a 0] [b foo 0]} msg] $msg + list [a 0] [b foo 0] } -cleanup { rename a {} rename b {} -} -result {0 {20001 20001}} +} -result {{0 2 1 1} {0 2 1 1}} test NRE-5.1 {[namespace eval] is not recursive} -setup { namespace eval ::foo { proc a i { - if {[incr i] > 20000} { - return $i + set x [depthDiff] + if {[incr i] > 10} { + return [lrange $x 0 3] } namespace eval ::foo [list a $i] } } } -body { - list [catch {::foo::a 0} msg] $msg + ::foo::a 0 } -cleanup { namespace delete ::foo -} -result {0 20001} +} -result {0 2 2 2} test NRE-5.2 {[namespace eval] is not recursive} -setup { namespace eval ::foo { @@ -227,16 +260,17 @@ test NRE-5.2 {[namespace eval] is not recursive} -setup { test NRE-6.1 {[uplevel] is not recursive} -setup { proc a i { - if {[incr i] > 20000} { - return $i + set x [depthDiff] + if {[incr i] > 10} { + return [lrange $x 0 3] } uplevel 1 [list a $i] } } -body { - list [catch {a 0} msg] $msg + a 0 } -cleanup { rename a {} -} -result {0 20001} +} -result {0 2 2 0} test NRE-6.2 {[uplevel] is not recursive} -setup { proc a i { @@ -366,7 +400,7 @@ test NRE-X.1 {eval in wrong interp} { namespace eval tcl::unsupported namespace export tailcall namespace import tcl::unsupported::tailcall -test NRE-T.0 {tailcall is constant space} -constraints {tailcall knownbug} -setup { +test NRE-T.0 {tailcall is constant space} -constraints {tailcall} -setup { proc a i { if {[incr i] > 10} { return [depthDiff] @@ -378,7 +412,7 @@ test NRE-T.0 {tailcall is constant space} -constraints {tailcall knownbug} -setu a 0 } -cleanup { rename a {} -} -result {0 0 0 0 0} +} -result {0 0 0 0 0 0} test NRE-T.1 {tailcall} -constraints {tailcall} -body { namespace eval a { @@ -593,39 +627,19 @@ test NRE-T.10 {tailcall tailcall} -constraints {tailcall knownbug} -setup { namespace delete ::foo } -result dcbacd -test NRE-T.11 {tailcall tailcall} -constraints {tailcall knownbug} -setup { - namespace eval ::foo { - variable res {} - proc a {} { - variable res - append res a - tailcall {tailcall {set x 1}} - append res a - } - proc b {} { - variable res - append res b - a - append res b - } - proc c {} { - variable res - append res c - b - append res c - } - proc d {} { - variable res - append res d - c - append res d + +test NRE-T.11 {tailcall factorial} -constraints {tailcall} -setup { + proc fact {n {b 1}} { + if {$n == 1} { + return $b } + tailcall fact [expr {$n-1}] [expr {$n*$b}] } } -body { - namespace eval ::foo d + list [fact 1] [fact 5] [fact 10] [fact 15] } -cleanup { - namespace delete ::foo -} -result dcbacd + rename fact {} +} -result {1 120 3628800 1307674368000} namespace forget tcl::unsupported::tailcall -- cgit v0.12 From 49b3a0638d14782cab0d6f55302277572a7b9d89 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 00:55:15 +0000 Subject: fix macro that gcc swallows but msvc doesn't --- generic/tclBasic.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index fa42894..b6cb2fd 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.339 2008/07/31 00:43:09 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.340 2008/07/31 00:55:15 msofer Exp $ */ #include "tclInt.h" @@ -139,13 +139,15 @@ static Tcl_NRPostProc TailcallCleanup; && (PTR2INT(callbackPtr->data[1]))) #define NR_CLEAR_COMMAND(interp) \ - TEOV_callback *callbackPtr = TOP_CB(interp); \ + { \ + TEOV_callback *callbackPtr = TOP_CB(interp); \ \ - while (!NR_IS_COMMAND(callbackPtr)) { \ - callbackPtr = callbackPtr->nextPtr; \ - } \ - if (callbackPtr) { \ - callbackPtr->data[1] = INT2PTR(0); \ + while (!NR_IS_COMMAND(callbackPtr)) { \ + callbackPtr = callbackPtr->nextPtr; \ + } \ + if (callbackPtr) { \ + callbackPtr->data[1] = INT2PTR(0); \ + }\ } -- cgit v0.12 From 8b4bd2bb9a913d76dbb65ca98921a537bce251fd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 03:42:15 +0000 Subject: restricting usage and avoiding panics in [tailcall] --- generic/tclBasic.c | 82 ++++++++++++++++++--------------------------- generic/tclExecute.c | 26 +++++--------- tests/NRE.test | 95 ++++------------------------------------------------ 3 files changed, 48 insertions(+), 155 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b6cb2fd..b9d7efe 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.340 2008/07/31 00:55:15 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.341 2008/07/31 03:42:15 msofer Exp $ */ #include "tclInt.h" @@ -4158,8 +4158,12 @@ int TclNRRunCallbacks( Tcl_Interp *interp, int result, - struct TEOV_callback *rootPtr, - int tebcCall) + struct TEOV_callback *rootPtr, /* All callbacks down to rootPtr not + * inclusive are to be run */ + int tebcCall) /* Normal callers set this to 0; TEBC sets + * it to 1 when executing a bytecode, to + * 2 when cleaning up after a bytecode + * returns. */ { Interp *iPtr = (Interp *) interp; TEOV_callback *callbackPtr = TOP_CB(interp); @@ -4181,26 +4185,22 @@ TclNRRunCallbacks( while (TOP_CB(interp) != rootPtr) { callbackPtr = TOP_CB(interp); - if (tebcCall) { - if ((callbackPtr->procPtr == NRRunBytecode) || - (callbackPtr->procPtr == NRDoTailcall)) { - /* - * TEBC pass thru: let the caller tebc handle and get rid of - * this callback. - */ - + if (tebcCall && (callbackPtr->procPtr == NRRunBytecode)) { return TCL_OK; + } else if (callbackPtr->procPtr == NRDoTailcall) { + if (tebcCall == 1) { + return TCL_OK; + } else if (tebcCall == 2) { + Tcl_SetResult(interp, + "tailcall cannot be invoked recursively", TCL_STATIC); + } else { + Tcl_SetResult(interp, + "tailcall can only be called from a proc or lambda", TCL_STATIC); } - } - - if (callbackPtr->procPtr == NRDoTailcall) { - /* - * It is an error to schedule a tailcall in this situation. - */ - - Tcl_SetResult(interp, - "tailcall can only be called from a proc or lambda", TCL_STATIC); + TOP_CB(interp) = callbackPtr->nextPtr; result = TCL_ERROR; + TCLNR_FREE(interp, callbackPtr); + continue; } /* @@ -7873,9 +7873,7 @@ TclTailcallObjCmd( Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; - TEOV_callback *rootPtr = TOP_CB(interp); - TEOV_callback *tailPtr; - Tcl_Obj *scriptPtr; + Tcl_Obj *listPtr; Namespace *nsPtr = iPtr->varFramePtr->nsPtr; int count; @@ -7883,35 +7881,16 @@ TclTailcallObjCmd( Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); } - /* - * Add a callback to perform the tailcall as LAST item in the CALLER's - * callback stack. - * Find the first record for the caller: - * 1. find the SECOND callback that contains a cmdPtr below the top (note - * that the FIRST one correspond to this TclTailcallObjCmd call) - * 2. set the callback for the tailcalled command below that - */ - - tailPtr = rootPtr; - count = NR_IS_COMMAND(tailPtr); - while (tailPtr && tailPtr->nextPtr && (count < 2)) { - tailPtr = tailPtr->nextPtr; - count += NR_IS_COMMAND(tailPtr); - } - - if (!iPtr->varFramePtr->isProcCallFrame) { + if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ + (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; } nsPtr->activationCount++; - if (objc == 2) { - scriptPtr = objv[1]; - } else { - scriptPtr = Tcl_NewListObj(objc-1, objv+1); - } - Tcl_IncrRefCount(scriptPtr); + listPtr = Tcl_NewListObj(objc-1, objv+1); + Tcl_IncrRefCount(listPtr); /* * Add two callbacks: first the one to actually evaluate the tailcalled @@ -7919,7 +7898,7 @@ TclTailcallObjCmd( * proper place. */ - TclNRAddCallback(interp, TailcallEval, scriptPtr, nsPtr, NULL, NULL); + TclNRAddCallback(interp, TailcallEval, listPtr, nsPtr, NULL, NULL); TclNRAddCallback(interp, NRDoTailcall, NULL, NULL, NULL, NULL); return TCL_OK; @@ -7932,13 +7911,16 @@ TailcallEval( int result) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *scriptPtr = data[0]; + Tcl_Obj *listPtr = data[0]; Namespace *nsPtr = data[1]; + int objc; + Tcl_Obj **objv; - TclNRAddCallback(interp, TailcallCleanup, scriptPtr, NULL, NULL, NULL); + TclNRAddCallback(interp, TailcallCleanup, listPtr, NULL, NULL, NULL); if (result == TCL_OK) { iPtr->lookupNsPtr = nsPtr; - result = TclNREvalObjEx(interp, scriptPtr, 0, NULL, 0); + ListObjGetElements(listPtr, objc, objv); + result = TclNREvalObjv(interp, objc, objv, 0, NULL); } nsPtr->activationCount--; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 2a1d232..9ee7ec0 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.391 2008/07/31 00:43:09 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.392 2008/07/31 03:42:15 msofer Exp $ */ #include "tclInt.h" @@ -7686,7 +7686,7 @@ TclExecuteByteCode( */ bottomPtr = oldBottomPtr; /* back to old bc */ - result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); + result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 2); NR_DATA_DIG(); DECACHE_STACK_INFO(); @@ -7701,23 +7701,15 @@ TclExecuteByteCode( Tcl_DecrRefCount(objPtr); } goto nonRecursiveCallReturn; - } else { + } else if (TOP_CB(interp)->procPtr == NRRunBytecode) { /* - * One of the callbacks requested a new execution: a tailcall! - * Start the new bytecode. - */ - - if (TOP_CB(interp)->procPtr == NRDoTailcall) { -#if 1 - Tcl_Panic("'tailcall tailcall' not yet implemented");// -#endif - Tcl_SetResult(interp,"'tailcall tailcall' not yet implemented", - TCL_STATIC); - result = TCL_ERROR; - goto checkForCatch; - } - goto nonRecursiveCallStart; + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. + */ + + goto nonRecursiveCallStart; } + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (2)"); } return result; } diff --git a/tests/NRE.test b/tests/NRE.test index dc306c7..b80eed8 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.7 2008/07/31 00:43:10 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.8 2008/07/31 03:42:17 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -512,20 +512,14 @@ test NRE-T.7 {tailcall does return} -constraints {tailcall} -setup { b append res c } - proc d {} { - variable res - append res d - c - append res d - } } } -body { - namespace eval ::foo d + namespace eval ::foo c } -cleanup { namespace delete ::foo -} -result dcbabcd +} -result cbabc -test NRE-T.8 {tailcall tailcall} -constraints {tailcall knownbug} -setup { +test NRE-T.8 {tailcall tailcall} -constraints {tailcall} -setup { namespace eval ::foo { variable res {} proc a {} { @@ -546,89 +540,14 @@ test NRE-T.8 {tailcall tailcall} -constraints {tailcall knownbug} -setup { b append res c } - proc d {} { - variable res - append res d - c - append res d - } } } -body { - namespace eval ::foo d + namespace eval ::foo c } -cleanup { namespace delete ::foo -} -result dcbacd - -test NRE-T.9 {tailcall does return} -constraints {tailcall} -setup { - namespace eval ::foo { - variable res {} - proc a {} { - variable res - append res a - tailcall {set x 1} - append res a - } - proc b {} { - variable res - append res b - a - append res b - } - proc c {} { - variable res - append res c - b - append res c - } - proc d {} { - variable res - append res d - c - append res d - } - } -} -body { - namespace eval ::foo d -} -cleanup { - namespace delete ::foo -} -result dcbabcd - -test NRE-T.10 {tailcall tailcall} -constraints {tailcall knownbug} -setup { - namespace eval ::foo { - variable res {} - proc a {} { - variable res - append res a - tailcall {tailcall set x 1} - append res a - } - proc b {} { - variable res - append res b - a - append res b - } - proc c {} { - variable res - append res c - b - append res c - } - proc d {} { - variable res - append res d - c - append res d - } - } -} -body { - namespace eval ::foo d -} -cleanup { - namespace delete ::foo -} -result dcbacd - +} -match glob -result *tailcall* -returnCodes error -test NRE-T.11 {tailcall factorial} -constraints {tailcall} -setup { +test NRE-T.9 {tailcall factorial} -constraints {tailcall} -setup { proc fact {n {b 1}} { if {$n == 1} { return $b -- cgit v0.12 From 53bc9e6c6a1e6f0cfa6ad54e6c95be54753e3b49 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 14:43:35 +0000 Subject: Dumped tclNRE.h's contents into tclInt.h. The file is now empty and unrefernced everywhere but in macosx/Tcl.xcodeproj/project.pbxproj: some knowledgeable maintainer please remove tclNRE.h after making sure it doesn't break the build on macosx --- ChangeLog | 15 +++++++++ generic/tclBasic.c | 8 +++-- generic/tclDictObj.c | 3 +- generic/tclExecute.c | 14 +++++--- generic/tclInt.h | 67 +++++++++++++++++++++++++++++++++++++- generic/tclInterp.c | 3 +- generic/tclNRE.h | 91 ---------------------------------------------------- generic/tclNamesp.c | 3 +- generic/tclOOBasic.c | 7 ++-- generic/tclOOInt.h | 3 +- generic/tclProc.c | 3 +- generic/tclTest.c | 3 +- unix/Makefile.in | 4 +-- 13 files changed, 106 insertions(+), 118 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bc09cc..e06b52a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2008-07-30 Miguel Sofer + * generic/tclBasic.c: Moved the few remaining defs from + * generic/tclDictObj.c: tclNRE.h to tclInt.h, eliminated + * generic/tclExecute.c: inclusion of tclNRE.h everywhere. + * generic/tclInt.h: + * generic/tclInterp.c: The file remains empty; I did not + * generic/tclNRE.h: remove it from CVS as it is referenced + * generic/tclNamesp.c: in macosx/Tcl.xcodeproj/project.pbxproj + * generic/tclOOBasic.c: and I fear to break the build on macosx. + * generic/tclOOInt.h: As soon as that is fixed, the file can + * generic/tclProc.c: be removed. + * generic/tclTest.c: + * unix/Makefile.in: + +2008-07-30 Miguel Sofer + * generic/tclBasic.c: Improved tailcalls. * generic/tclCompile.h: * generic/tclExecute.c: diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b9d7efe..8ffdcef 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.341 2008/07/31 03:42:15 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.342 2008/07/31 14:43:43 msofer Exp $ */ #include "tclInt.h" @@ -26,7 +26,10 @@ #include #include #include "tommath.h" -#include "tclNRE.h" + +#if NRE_ENABLE_ASSERTS +#include +#endif /* * Determine whether we're using IEEE floating point @@ -7875,7 +7878,6 @@ TclTailcallObjCmd( Interp *iPtr = (Interp *) interp; Tcl_Obj *listPtr; Namespace *nsPtr = iPtr->varFramePtr->nsPtr; - int count; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index eb56e4a..9531f22 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,12 +9,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.66 2008/07/20 17:55:50 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.67 2008/07/31 14:43:44 msofer Exp $ */ #include "tclInt.h" #include "tommath.h" -#include "tclNRE.h" /* * Forward declaration. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9ee7ec0..0645d53 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,17 +14,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.392 2008/07/31 03:42:15 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.393 2008/07/31 14:43:44 msofer Exp $ */ #include "tclInt.h" #include "tclCompile.h" #include "tommath.h" -#include "tclNRE.h" #include #include +#if NRE_ENABLE_ASSERTS +#include +#endif + /* * Hack to determine whether we may expect IEEE floating point. The hack is * formally incorrect in that non-IEEE platforms might have the same precision @@ -1808,8 +1811,8 @@ TclExecuteByteCode( Tcl_NRPostProc *procPtr = callbackPtr->procPtr; ByteCode *newCodePtr = callbackPtr->data[0]; - assert((result==TCL_OK)); - assert((callbackPtr != bottomPtr->rootPtr)); + NRE_ASSERT(result==TCL_OK); + NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); TOP_CB(interp) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); @@ -2662,7 +2665,7 @@ TclExecuteByteCode( CACHE_STACK_INFO(); if (TOP_CB(interp) != bottomPtr->rootPtr) { - assert ((result == TCL_OK)); + NRE_ASSERT(result == TCL_OK); pc += pcAdjustment; goto nonRecursiveCallStart; } @@ -7707,6 +7710,7 @@ TclExecuteByteCode( * Start the new bytecode. */ + NRE_ASSERT(result == TCL_OK); goto nonRecursiveCallStart; } Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (2)"); diff --git a/generic/tclInt.h b/generic/tclInt.h index fb77ec5..a098b5f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -10,11 +10,12 @@ * Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved. * Copyright (c) 2007 Daniel A. Steffen * Copyright (c) 2006-2008 by Joe Mistachkin. All rights reserved. + * Copyright (c) 2008 by Miguel Sofer. All rights reserved. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.381 2008/07/29 18:19:12 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.382 2008/07/31 14:43:45 msofer Exp $ */ #ifndef _TCLINT @@ -2527,6 +2528,8 @@ MODULE_SCOPE char tclEmptyString; MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; + MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); @@ -4006,6 +4009,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, * size is dynamic, a panic will be compiled in for the wrong case. * * DO NOT LET THEM CROSS THREAD BOUNDARIES + *---------------------------------------------------------------- */ #define TclSmallAlloc(nbytes, memPtr) \ @@ -4059,6 +4063,67 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, } #endif /* TCL_MEM_DEBUG */ +/* + *---------------------------------------------------------------- + * Parameters, structs and macros for the non-recursive engine (NRE) + *---------------------------------------------------------------- + */ + +#define NRE_USE_SMALL_ALLOC 1 /* Only turn off for debugging purposes. */ +#define NRE_ENABLE_ASSERTS 1 + +/* + * This is the main data struct for representing NR commands. It is designed + * to fit in sizeof(Tcl_Obj) in order to exploit the fastest memory allocator + * available. + */ + +typedef struct TEOV_callback { + Tcl_NRPostProc *procPtr; + ClientData data[4]; + struct TEOV_callback *nextPtr; +} TEOV_callback; + +#define TOP_CB(iPtr) (((Interp *)(iPtr))->execEnvPtr->callbackPtr) + +/* + * Inline version of Tcl_NRAddCallback + */ + +#define TclNRAddCallback( \ + interp, \ + postProcPtr, \ + data0, \ + data1, \ + data2, \ + data3) \ + { \ + TEOV_callback *callbackPtr; \ + TCLNR_ALLOC((interp), (callbackPtr)); \ + callbackPtr->procPtr = (postProcPtr); \ + callbackPtr->data[0] = (data0); \ + callbackPtr->data[1] = (data1); \ + callbackPtr->data[2] = (data2); \ + callbackPtr->data[3] = (data3); \ + callbackPtr->nextPtr = TOP_CB(interp); \ + TOP_CB(interp) = callbackPtr; \ + } + +#if NRE_USE_SMALL_ALLOC +#define TCLNR_ALLOC(interp, ptr) TclSmallAllocEx(interp, sizeof(TEOV_callback), (ptr)) +#define TCLNR_FREE(interp, ptr) TclSmallFreeEx((interp), (ptr)) +#else +#define TCLNR_ALLOC(interp, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_callback)))) +#define TCLNR_FREE(interp, ptr) ckfree((char *) (ptr)) +#endif + +#if NRE_ENABLE_ASSERTS +#define NRE_ASSERT(expr) assert((expr)) +#else +#define NRE_ASSERT(expr) +#endif + + #include "tclPort.h" #include "tclIntDecls.h" diff --git a/generic/tclInterp.c b/generic/tclInterp.c index d5736c3..daa705b 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,11 +10,10 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.94 2008/07/29 05:30:35 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.95 2008/07/31 14:43:46 msofer Exp $ */ #include "tclInt.h" -#include "tclNRE.h" /* * A pointer to a string that holds an initialization script that if non-NULL diff --git a/generic/tclNRE.h b/generic/tclNRE.h index 3a5af55..e69de29 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -1,91 +0,0 @@ -/* - * tclNRE.h -- - * - * This file contains declarations for the infrastructure for - * non-recursive commands. Contents may or may not migrate to tcl.h, - * tcl.decls, tclInt.h and/or tclInt.decls - * - * Copyright (c) 2008 by Miguel Sofer - * - * See the file "license.terms" for information on usage and redistribution of - * this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * // FIXME: RCS numbering? - * RCS: @(#) $Id: tclNRE.h,v 1.10 2008/07/29 20:53:22 msofer Exp $ - */ - - -#ifndef _TCLNONREC -#define _TCLNONREC - -/***************************************************************************** - * Stuff during devel - *****************************************************************************/ - -#define ENABLE_ASSERTS 0 -#define USE_SMALL_ALLOC 1 /* Only turn off for debugging purposes. */ - -/* - * TEOV_callback - - * - * Main data struct for representing NR commands. It is designed to fit in - * sizeof(Tcl_Obj) in order to exploit the fastest memory allocator available. - */ - -typedef struct TEOV_callback { - Tcl_NRPostProc *procPtr; - ClientData data[4]; - struct TEOV_callback *nextPtr; -} TEOV_callback; - -#define TOP_CB(iPtr) (((Interp *)(iPtr))->execEnvPtr->callbackPtr) - -/* - * Inline version of Tcl_NRAddCallback - */ - -#define TclNRAddCallback( \ - interp, \ - postProcPtr, \ - data0, \ - data1, \ - data2, \ - data3) \ - { \ - TEOV_callback *callbackPtr; \ - TCLNR_ALLOC((interp), (callbackPtr)); \ - callbackPtr->procPtr = (postProcPtr); \ - callbackPtr->data[0] = (data0); \ - callbackPtr->data[1] = (data1); \ - callbackPtr->data[2] = (data2); \ - callbackPtr->data[3] = (data3); \ - callbackPtr->nextPtr = TOP_CB(interp); \ - TOP_CB(interp) = callbackPtr; \ - } - -/* - * Tailcalls! - */ - -MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; - - -/***************************************************************************** - * Stuff that goes away: temp during devel - *****************************************************************************/ - -#if USE_SMALL_ALLOC -#define TCLNR_ALLOC(interp, ptr) TclSmallAllocEx(interp, sizeof(TEOV_callback), (ptr)) -#define TCLNR_FREE(interp, ptr) TclSmallFreeEx((interp), (ptr)) -#else -#define TCLNR_ALLOC(interp, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_callback)))) -#define TCLNR_FREE(interp, ptr) ckfree((char *) (ptr)) -#endif - -#if ENABLE_ASSERTS -#include -#else -#define assert(expr) -#endif - -#endif /* _TCLNONREC */ diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index ff56db7..bad1fc7 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,11 +23,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.172 2008/07/29 05:30:36 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.173 2008/07/31 14:43:47 msofer Exp $ */ #include "tclInt.h" -#include "tclNRE.h" /* * Thread-local storage used to avoid having a global lock on data that is not diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 1e9bd11..28033cd 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.8 2008/07/29 05:30:37 msofer Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.9 2008/07/31 14:43:47 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -17,7 +17,6 @@ #endif #include "tclInt.h" #include "tclOOInt.h" -#include "tclNRE.h" static inline Tcl_Object *AddConstructionFinalizer(Tcl_Interp *interp); static int FinalizeConstruction(ClientData data[], @@ -39,8 +38,8 @@ static int RestoreFrame(ClientData data[], * createWithNamespace, new). * * Note that this is the only code in this file (or, indeed, the whole of - * TclOO) that uses tclNRE.h; it is the only code that does non-standard - * poking in the NRE guts. + * TclOO) that uses NRE internals; it is the only code that does + * non-standard poking in the NRE guts. * * ---------------------------------------------------------------------- */ diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index fa7d80e..6b10a40 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,12 +9,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.5 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.6 2008/07/31 14:43:47 msofer Exp $ */ #include #include "tclOO.h" -#include "tclNRE.h" /* * Forward declarations. diff --git a/generic/tclProc.c b/generic/tclProc.c index ea5f617..0cc9ae4 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,12 +12,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.153 2008/07/29 05:30:37 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.154 2008/07/31 14:43:47 msofer Exp $ */ #include "tclInt.h" #include "tclCompile.h" -#include "tclNRE.h" /* * Variables that are part of the [apply] command implementation and which diff --git a/generic/tclTest.c b/generic/tclTest.c index 1cb6714..60f15a8 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,12 +14,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.120 2008/07/31 00:43:10 msofer Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.121 2008/07/31 14:43:48 msofer Exp $ */ #define TCL_TEST #include "tclInt.h" -#include "tclNRE.h" /* * Required for Testregexp*Cmd diff --git a/unix/Makefile.in b/unix/Makefile.in index a9d2211..adb897f 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.241 2008/07/13 09:03:37 msofer Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.242 2008/07/31 14:43:49 msofer Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -957,7 +957,7 @@ COMPILEHDR=$(GENERIC_DIR)/tclCompile.h FSHDR=$(GENERIC_DIR)/tclFileSystem.h IOHDR=$(GENERIC_DIR)/tclIO.h MATHHDRS=$(GENERIC_DIR)/tommath.h $(GENERIC_DIR)/tclTomMath.h -NREHDR=$(GENERIC_DIR)/tclNRE.h +NREHDR=$(GENERIC_DIR)/tclInt.h regcomp.o: $(REGHDRS) $(GENERIC_DIR)/regcomp.c $(GENERIC_DIR)/regc_lex.c \ $(GENERIC_DIR)/regc_color.c $(GENERIC_DIR)/regc_locale.c \ -- cgit v0.12 From 0a80549aa57439939e05b98b8471c00b2af09b49 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 14:47:27 +0000 Subject: wrong date in Changelog --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e06b52a..506acf3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2008-07-30 Miguel Sofer +2008-07-31 Miguel Sofer * generic/tclBasic.c: Moved the few remaining defs from * generic/tclDictObj.c: tclNRE.h to tclInt.h, eliminated -- cgit v0.12 From cad03f83809878b3802167f7b8cd219012690cc8 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 15:42:06 +0000 Subject: * generic/tclBasic.c: NR-enabling [catch] * generic/tclCmdAH.c: * generic/tclInt.h: * tests/NRE.test: --- ChangeLog | 5 +++++ generic/tclBasic.c | 4 ++-- generic/tclCmdAH.c | 33 ++++++++++++++++++++++++++++++--- generic/tclInt.h | 3 ++- tests/NRE.test | 19 ++++++++++++++++++- 5 files changed, 57 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 506acf3..87d8e5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-07-31 Miguel Sofer + * generic/tclBasic.c: NR-enabling [catch] + * generic/tclCmdAH.c: + * generic/tclInt.h: + * tests/NRE.test: + * generic/tclBasic.c: Moved the few remaining defs from * generic/tclDictObj.c: tclNRE.h to tclInt.h, eliminated * generic/tclExecute.c: inclusion of tclNRE.h everywhere. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8ffdcef..754d464 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.342 2008/07/31 14:43:43 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.343 2008/07/31 15:42:06 msofer Exp $ */ #include "tclInt.h" @@ -184,7 +184,7 @@ static const CmdInfo builtInCmds[] = { #ifndef EXCLUDE_OBSOLETE_COMMANDS {"case", Tcl_CaseObjCmd, NULL, NULL, 1}, #endif - {"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, NULL, 1}, + {"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, TclNRCatchObjCmd, 1}, {"concat", Tcl_ConcatObjCmd, NULL, NULL, 1}, {"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, NULL, 1}, {"error", Tcl_ErrorObjCmd, NULL, NULL, 1}, diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 6f4778b..409d633 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.99 2008/07/21 22:50:34 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.100 2008/07/31 15:42:06 msofer Exp $ */ #include "tclInt.h" @@ -30,6 +30,9 @@ static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, static char * GetTypeFromMode(int mode); static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); +static Tcl_NRPostProc CatchObjCmdCallback; + + /* *---------------------------------------------------------------------- @@ -228,9 +231,18 @@ Tcl_CatchObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + return Tcl_NRCallObjProc(interp, TclNRCatchObjCmd, dummy, objc, objv); +} + +int +TclNRCatchObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ Tcl_Obj *varNamePtr = NULL; Tcl_Obj *optionVarNamePtr = NULL; - int result; Interp *iPtr = (Interp *) interp; if ((objc < 2) || (objc > 4)) { @@ -250,8 +262,23 @@ Tcl_CatchObjCmd( * TIP #280. Make invoking context available to caught script. */ - result = TclEvalObjEx(interp, objv[1], 0, iPtr->cmdFramePtr, 1); + Tcl_NRAddCallback(interp, CatchObjCmdCallback, INT2PTR(objc), + varNamePtr, optionVarNamePtr, NULL); + + return TclNREvalObjEx(interp, objv[1], 0, iPtr->cmdFramePtr, 1); +} +static int +CatchObjCmdCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + int objc = PTR2INT(data[0]); + Tcl_Obj *varNamePtr = data[1]; + Tcl_Obj *optionVarNamePtr = data[2]; + + /* * We disable catch in interpreters where the limit has been exceeded. */ diff --git a/generic/tclInt.h b/generic/tclInt.h index a098b5f..6941f18 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.382 2008/07/31 14:43:45 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.383 2008/07/31 15:42:07 msofer Exp $ */ #ifndef _TCLINT @@ -2528,6 +2528,7 @@ MODULE_SCOPE char tclEmptyString; MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, diff --git a/tests/NRE.test b/tests/NRE.test index b80eed8..dfa6f59 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.8 2008/07/31 03:42:17 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.9 2008/07/31 15:42:08 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -285,6 +285,23 @@ test NRE-6.2 {[uplevel] is not recursive} -setup { rename a {} } -result {0 20001} +test NRE-7.1 {[catch] is not recursive} -setup { + proc a i { + variable x [depthDiff] + if {[incr i] > 10} { + return + } + uplevel 1 [list catch "a $i"] + } +} -body { + catch {a 0} + lrange $x 0 3 +} -cleanup { + rename a {} + unset x +} -result {0 3 3 0} + + # # Basic TclOO tests # -- cgit v0.12 From 9df06f31b0103f7c3c7ab69c4dab6eb19021f50c Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 17:32:29 +0000 Subject: nr-enabling [if] --- generic/tclBasic.c | 4 ++-- generic/tclCmdIL.c | 18 ++++++++++++++---- generic/tclInt.h | 3 ++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 754d464..d65d32b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.343 2008/07/31 15:42:06 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.344 2008/07/31 17:32:29 msofer Exp $ */ #include "tclInt.h" @@ -194,7 +194,7 @@ static const CmdInfo builtInCmds[] = { {"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, NULL, 1}, {"format", Tcl_FormatObjCmd, NULL, NULL, 1}, {"global", Tcl_GlobalObjCmd, TclCompileGlobalCmd, NULL, 1}, - {"if", Tcl_IfObjCmd, TclCompileIfCmd, NULL, 1}, + {"if", Tcl_IfObjCmd, TclCompileIfCmd, TclNRIfObjCmd, 1}, {"incr", Tcl_IncrObjCmd, TclCompileIncrCmd, NULL, 1}, {"join", Tcl_JoinObjCmd, NULL, NULL, 1}, {"lappend", Tcl_LappendObjCmd, TclCompileLappendCmd, NULL, 1}, diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index ab324de..89b8874 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.146 2008/07/23 20:49:52 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.147 2008/07/31 17:32:30 msofer Exp $ */ #include "tclInt.h" @@ -208,6 +208,16 @@ Tcl_IfObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + return Tcl_NRCallObjProc(interp, TclNRIfObjCmd, dummy, objc, objv); +} + +int +TclNRIfObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ int thenScriptIndex = 0; /* "then" script to be evaled after syntax * check. */ Interp *iPtr = (Interp *) interp; @@ -267,7 +277,7 @@ Tcl_IfObjCmd( * TIP #280. Make invoking context available to branch. */ - return TclEvalObjEx(interp, objv[thenScriptIndex], 0, + return TclNREvalObjEx(interp, objv[thenScriptIndex], 0, iPtr->cmdFramePtr, thenScriptIndex); } return TCL_OK; @@ -304,10 +314,10 @@ Tcl_IfObjCmd( * TIP #280. Make invoking context available to branch/else. */ - return TclEvalObjEx(interp, objv[thenScriptIndex], 0, + return TclNREvalObjEx(interp, objv[thenScriptIndex], 0, iPtr->cmdFramePtr, thenScriptIndex); } - return TclEvalObjEx(interp, objv[i], 0, iPtr->cmdFramePtr, i); + return TclNREvalObjEx(interp, objv[i], 0, iPtr->cmdFramePtr, i); } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 6941f18..9ecea20 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.383 2008/07/31 15:42:07 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.384 2008/07/31 17:32:30 msofer Exp $ */ #ifndef _TCLINT @@ -2529,6 +2529,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, -- cgit v0.12 From 4325c5973acbaf71dedbc3d44b7e4264d9986702 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 17:37:06 +0000 Subject: missing ChangeLog entry --- ChangeLog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87d8e5a..eb4b36a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2008-07-31 Miguel Sofer - * generic/tclBasic.c: NR-enabling [catch] - * generic/tclCmdAH.c: + * generic/tclBasic.c: NR-enabling [catch] and [if] (the script, + * generic/tclCmdAH.c: not the test) + * generic/tclCmdIL.c: * generic/tclInt.h: * tests/NRE.test: -- cgit v0.12 From 48251df30f4df754d76577f0bb3f1a230a205ad4 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 18:29:38 +0000 Subject: nr-enabling [while] --- ChangeLog | 5 ++-- generic/tclBasic.c | 4 ++-- generic/tclCmdMZ.c | 69 +++++++++++++++++++++++++++++++++++++----------------- generic/tclInt.h | 4 +++- 4 files changed, 55 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb4b36a..ddbdc23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,9 @@ 2008-07-31 Miguel Sofer - * generic/tclBasic.c: NR-enabling [catch] and [if] (the script, - * generic/tclCmdAH.c: not the test) + * generic/tclBasic.c: NR-enabling [catch], [if] and [while] (the + * generic/tclCmdAH.c: script, not the test) * generic/tclCmdIL.c: + * generic/tclCmdMZ.c: * generic/tclInt.h: * tests/NRE.test: diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d65d32b..b4a59d5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.344 2008/07/31 17:32:29 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.345 2008/07/31 18:29:38 msofer Exp $ */ #include "tclInt.h" @@ -227,7 +227,7 @@ static const CmdInfo builtInCmds[] = { {"uplevel", Tcl_UplevelObjCmd, NULL, TclNRUplevelObjCmd, 1}, {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1}, - {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, NULL, 1}, + {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, TclNRWhileObjCmd, 1}, /* * Commands in the OS-interface. Note that many of these are unsafe. diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 2777d92..839103e 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,13 +15,16 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.167 2008/07/21 22:22:27 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.168 2008/07/31 18:29:39 msofer Exp $ */ #include "tclInt.h" #include "tclRegexp.h" static int UniCharIsAscii(int character); + +static Tcl_NRPostProc NRWhileIterCallback; + /* *---------------------------------------------------------------------- @@ -4008,38 +4011,60 @@ Tcl_WhileObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int result, value; - Interp *iPtr = (Interp *) interp; + return Tcl_NRCallObjProc(interp, TclNRWhileObjCmd, dummy, objc, objv); +} +int +TclNRWhileObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "test command"); return TCL_ERROR; } - while (1) { - result = Tcl_ExprBooleanObj(interp, objv[1], &value); - if (result != TCL_OK) { - return result; - } - if (!value) { - break; - } + TclNRAddCallback(interp, NRWhileIterCallback, objv[1], objv[2], NULL, NULL); + return TCL_CONTINUE; +} + +static int +NRWhileIterCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_Obj *cond = data[0]; + Tcl_Obj *body = data[1]; + int value; + if ((result != TCL_OK) && (result != TCL_CONTINUE)) { + goto done; + } + + result = Tcl_ExprBooleanObj(interp, cond, &value); + if (result != TCL_OK) { + return result; + } + if (value) { /* TIP #280. */ - result = TclEvalObjEx(interp, objv[2], 0, iPtr->cmdFramePtr, 2); - if ((result != TCL_OK) && (result != TCL_CONTINUE)) { - if (result == TCL_ERROR) { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"while\" body line %d)", interp->errorLine)); - } - break; - } + TclNRAddCallback(interp, NRWhileIterCallback, cond, body, NULL, NULL); + return TclNREvalObjEx(interp, body, 0, iPtr->cmdFramePtr, 2); } - if (result == TCL_BREAK) { + + done: + switch (result) { + case TCL_BREAK: result = TCL_OK; - } - if (result == TCL_OK) { + case TCL_OK: Tcl_ResetResult(interp); + break; + case TCL_ERROR: + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"while\" body line %d)", interp->errorLine)); } return result; } diff --git a/generic/tclInt.h b/generic/tclInt.h index 9ecea20..a3f6fd2 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.384 2008/07/31 17:32:30 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.385 2008/07/31 18:29:40 msofer Exp $ */ #ifndef _TCLINT @@ -2530,6 +2530,8 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; + MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, -- cgit v0.12 From d9e5311f467b0b01c8aa09875bd1bae9eafe91dc Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 31 Jul 2008 20:01:33 +0000 Subject: nr-enabling [for]; [while] made to reuse [for]'s infrastructure. --- ChangeLog | 4 +- generic/tclBasic.c | 4 +- generic/tclCmdAH.c | 123 +++++++++++++++++++++++++++++++++++++---------------- generic/tclCmdMZ.c | 50 +++------------------- generic/tclInt.h | 4 +- 5 files changed, 101 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddbdc23..fa4893f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2008-07-31 Miguel Sofer - * generic/tclBasic.c: NR-enabling [catch], [if] and [while] (the - * generic/tclCmdAH.c: script, not the test) + * generic/tclBasic.c: NR-enabling [catch], [if] and [for] and + * generic/tclCmdAH.c: [while] (the script, not the tests) * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclInt.h: diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b4a59d5..019de9c 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.345 2008/07/31 18:29:38 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.346 2008/07/31 20:01:38 msofer Exp $ */ #include "tclInt.h" @@ -190,7 +190,7 @@ static const CmdInfo builtInCmds[] = { {"error", Tcl_ErrorObjCmd, NULL, NULL, 1}, {"eval", Tcl_EvalObjCmd, NULL, NULL, 1}, {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, NULL, 1}, - {"for", Tcl_ForObjCmd, TclCompileForCmd, NULL, 1}, + {"for", Tcl_ForObjCmd, TclCompileForCmd, TclNRForObjCmd, 1}, {"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, NULL, 1}, {"format", Tcl_FormatObjCmd, NULL, NULL, 1}, {"global", Tcl_GlobalObjCmd, TclCompileGlobalCmd, NULL, 1}, diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 409d633..868b0b8 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.100 2008/07/31 15:42:06 msofer Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.101 2008/07/31 20:01:39 msofer Exp $ */ #include "tclInt.h" @@ -31,6 +31,7 @@ static char * GetTypeFromMode(int mode); static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); static Tcl_NRPostProc CatchObjCmdCallback; +static Tcl_NRPostProc ForNextCallback; @@ -1635,7 +1636,18 @@ Tcl_ForObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int result, value; + return Tcl_NRCallObjProc(interp, TclNRForObjCmd, dummy, objc, objv); +} + + +int +TclNRForObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int result; Interp *iPtr = (Interp *) interp; if (objc != 5) { @@ -1654,55 +1666,94 @@ Tcl_ForObjCmd( } return result; } - while (1) { - /* - * We need to reset the result before passing it off to - * Tcl_ExprBooleanObj. Otherwise, any error message will be appended - * to the result of the last evaluation. - */ - Tcl_ResetResult(interp); - result = Tcl_ExprBooleanObj(interp, objv[2], &value); - if (result != TCL_OK) { - return result; - } - if (!value) { - break; - } + TclNRAddCallback(interp, TclNRForIterCallback, objv[2], objv[4], + objv[3], "\n (\"for\" body line %d)"); + return TCL_OK; +} - /* - * TIP #280. Make invoking context available to loop body. - */ +int +TclNRForIterCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_Obj *cond = data[0]; + Tcl_Obj *body = data[1]; + Tcl_Obj *next = data[2]; + char *msg = data[3]; + int value; - result = TclEvalObjEx(interp, objv[4], 0, iPtr->cmdFramePtr, 4); - if ((result != TCL_OK) && (result != TCL_CONTINUE)) { - if (result == TCL_ERROR) { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"for\" body line %d)", interp->errorLine)); - } - break; + if ((result != TCL_OK) && (result != TCL_CONTINUE)) { + goto done; + } + + /* + * We need to reset the result before passing it off to + * Tcl_ExprBooleanObj. Otherwise, any error message will be appended + * to the result of the last evaluation. + */ + + Tcl_ResetResult(interp); + result = Tcl_ExprBooleanObj(interp, cond, &value); + if (result != TCL_OK) { + return result; + } + if (value) { + /* TIP #280. */ + if (next) { + TclNRAddCallback(interp, ForNextCallback, cond, body, next, msg); + } else { + TclNRAddCallback(interp, TclNRForIterCallback, cond, body, NULL, msg); } + return TclNREvalObjEx(interp, body, 0, iPtr->cmdFramePtr, 2); + } + + done: + switch (result) { + case TCL_BREAK: + result = TCL_OK; + case TCL_OK: + Tcl_ResetResult(interp); + break; + case TCL_ERROR: + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(msg, interp->errorLine)); + } + return result; +} +static int +ForNextCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_Obj *cond = data[0]; + Tcl_Obj *body = data[1]; + Tcl_Obj *next = data[2]; + char *msg = data[3]; + + + if (result == TCL_OK) { /* * TIP #280. Make invoking context available to next script. + * + * NRE: we let the next script run in a new TEBC instance, ie, it is + * not nr-enabled. */ - result = TclEvalObjEx(interp, objv[3], 0, iPtr->cmdFramePtr, 3); - if (result == TCL_BREAK) { - break; - } else if (result != TCL_OK) { + result = TclEvalObjEx(interp, next, 0, iPtr->cmdFramePtr, 3); + if ((result != TCL_BREAK) && (result != TCL_OK)) { if (result == TCL_ERROR) { Tcl_AddErrorInfo(interp, "\n (\"for\" loop-end command)"); } return result; } } - if (result == TCL_BREAK) { - result = TCL_OK; - } - if (result == TCL_OK) { - Tcl_ResetResult(interp); - } + + TclNRAddCallback(interp, TclNRForIterCallback, cond, body, next, msg); return result; } diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 839103e..227e7b8 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.168 2008/07/31 18:29:39 msofer Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.169 2008/07/31 20:01:40 msofer Exp $ */ #include "tclInt.h" @@ -23,8 +23,6 @@ static int UniCharIsAscii(int character); -static Tcl_NRPostProc NRWhileIterCallback; - /* *---------------------------------------------------------------------- @@ -4026,47 +4024,13 @@ TclNRWhileObjCmd( return TCL_ERROR; } - TclNRAddCallback(interp, NRWhileIterCallback, objv[1], objv[2], NULL, NULL); - return TCL_CONTINUE; -} - -static int -NRWhileIterCallback( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - Interp *iPtr = (Interp *) interp; - Tcl_Obj *cond = data[0]; - Tcl_Obj *body = data[1]; - int value; - - if ((result != TCL_OK) && (result != TCL_CONTINUE)) { - goto done; - } - - result = Tcl_ExprBooleanObj(interp, cond, &value); - if (result != TCL_OK) { - return result; - } - if (value) { - /* TIP #280. */ - TclNRAddCallback(interp, NRWhileIterCallback, cond, body, NULL, NULL); - return TclNREvalObjEx(interp, body, 0, iPtr->cmdFramePtr, 2); - } + /* + * We reuse [for]'s callback, passing a NULL for the 'next' script. + */ - done: - switch (result) { - case TCL_BREAK: - result = TCL_OK; - case TCL_OK: - Tcl_ResetResult(interp); - break; - case TCL_ERROR: - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"while\" body line %d)", interp->errorLine)); - } - return result; + TclNRAddCallback(interp, TclNRForIterCallback, objv[1], objv[2], + NULL, "\n (\"while\" body line %d)"); + return TCL_OK; } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index a3f6fd2..31114e9 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.385 2008/07/31 18:29:40 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.386 2008/07/31 20:01:40 msofer Exp $ */ #ifndef _TCLINT @@ -2529,9 +2529,11 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; +MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, -- cgit v0.12 From 74eb24e991b20268a699c69978e770adab5c8b2f Mon Sep 17 00:00:00 2001 From: das Date: Thu, 31 Jul 2008 22:12:02 +0000 Subject: tclNRE.h die die die --- ChangeLog | 80 ++++++++++++++++++------------------ generic/tclNRE.h | 0 macosx/Tcl.xcodeproj/project.pbxproj | 4 +- 3 files changed, 41 insertions(+), 43 deletions(-) delete mode 100644 generic/tclNRE.h diff --git a/ChangeLog b/ChangeLog index fa4893f..a4fc26a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,25 +1,25 @@ 2008-07-31 Miguel Sofer - * generic/tclBasic.c: NR-enabling [catch], [if] and [for] and + * generic/tclBasic.c: NR-enabling [catch], [if] and [for] and * generic/tclCmdAH.c: [while] (the script, not the tests) * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclInt.h: * tests/NRE.test: - - * generic/tclBasic.c: Moved the few remaining defs from - * generic/tclDictObj.c: tclNRE.h to tclInt.h, eliminated - * generic/tclExecute.c: inclusion of tclNRE.h everywhere. + + * generic/tclBasic.c: Moved the few remaining defs from tclNRE.h to + * generic/tclDictObj.c: tclInt.h, eliminated inclusion of tclNRE.h + * generic/tclExecute.c: everywhere. * generic/tclInt.h: - * generic/tclInterp.c: The file remains empty; I did not - * generic/tclNRE.h: remove it from CVS as it is referenced - * generic/tclNamesp.c: in macosx/Tcl.xcodeproj/project.pbxproj - * generic/tclOOBasic.c: and I fear to break the build on macosx. - * generic/tclOOInt.h: As soon as that is fixed, the file can - * generic/tclProc.c: be removed. + * generic/tclInterp.c: + * generic/tclNRE.h (removed): + * generic/tclNamesp.c: + * generic/tclOOBasic.c: + * generic/tclOOInt.h: + * generic/tclProc.c: * generic/tclTest.c: * unix/Makefile.in: - + 2008-07-30 Miguel Sofer * generic/tclBasic.c: Improved tailcalls. @@ -27,25 +27,25 @@ * generic/tclExecute.c: * generic/tclTest.c: * tests/NRE.test: - + * generic/tclBasic.c (TclNREvalObjEx): new comments and code reorg to clarify what is happening. * generic/tclBasic.c: guard against the value of iPtr->evalFlags changing between the times where TEOV and TEOV_exception run. Thanks dgp for catching this. - + 2008-07-29 Miguel Sofer * tests/NRE.test: new tests that went MIA in the NRE revamping - + * generic/tclBasic.c: Clean up - * generic/tclNRE.h: - * generic/tclExecute.c: - + * generic/tclNRE.h: + * generic/tclExecute.c: + * generic/tclBasic.c: Made use of the thread's alloc cache * generic/tclInt.h: stored in the ekeko at interp creation - * generic/tclNRE.h: to avoid hitting the TSD each time an + * generic/tclNRE.h: to avoid hitting the TSD each time an * generic/tclThreadAlloc.c: NRE callback is pushed or pulled; the approach is suitably general to extend to evry other obj allocation where an interp is know; this is left for some other @@ -59,7 +59,7 @@ * generic/tclBasic.c: with (almost) unchanged API. * generic/tclCompile.h: * generic/tclExecute.c: TEBC will require a bit of a facelift, - * generic/tclInt.decls: but TEOV at least looks great now. + * generic/tclInt.decls: but TEOV at least looks great now. * generic/tclInt.h: There are new tests (incomplete!) to verify * generic/tclInterp.c: that execution is indeed in the same TEBC * generic/tclNRE.h: instance, at the same level in all stacks @@ -71,12 +71,12 @@ 2007-07-28 Jan Nijtmans - * doc/FileSystem.3: CONSTified many functions using Tcl_FileSystem - * generic/tcl.decls: which all are supposed to be a constant, but - * generic/tclDecls.h: this was not reflected in the API: - * generic/tclFileSystem.h: Tcl_FSGetInternalRep - * generic/tclIOUtil.c: Tcl_FSNewNativePath, Tcl_FSData - * generic/tclPathObj.c: Tcl_FSRegister, Tcl_FSUnregister + * doc/FileSystem.3: CONSTified many functions using + * generic/tcl.decls: Tcl_FileSystem which all are supposed to be + * generic/tclDecls.h: a constant, but this was not reflected + * generic/tclFileSystem.h: in the API: Tcl_FSGetInternalRep, + * generic/tclIOUtil.c: Tcl_FSNewNativePath, Tcl_FSData, + * generic/tclPathObj.c: Tcl_FSRegister, Tcl_FSUnregister, * generic/tclTest.c: Tcl_FSGetFileSystemForPath ... This change complies with TIP #27. ***POTENTIAL INCOMPATIBILITY*** @@ -145,7 +145,7 @@ * generic/tclNotify.c: Tcl_ConditionWait, Tcl_SetMaxBlockTime * macosx/tclMacOSXNotify.c: * generic/tclThread.c: Introduced a CONST86, so extensions which have - * unix/tclUnixNotfy.c: have their own Notifier (are there any?) can + * unix/tclUnixNotfy.c: have their own Notifier (are there any?) can * unix/tclUnixThrd.c: can be modified to compile against both Tcl * win/tclWinNotify.c: Tcl 8.5 and Tcl 8.6 * win/tclWinThrd.c: Regenerated tclDecls.h with "make stubs". @@ -169,7 +169,7 @@ * generic/tclCompile.c: eoFramePtr, doesn't need the line information, * tests/info.test: more sensible to have everything on line 1 when eval'ing a pure list. Updated the users of the line information to - special case this based on the frame type (i.e. + special case this based on the frame type (i.e. TCL_LOCATION_EVAL_LIST). Added a testcase demonstrating the new behaviour. @@ -239,27 +239,27 @@ 2008-07-21 Miguel Sofer - * generic/tcl.decls: Changed the implementation of + * generic/tcl.decls: Changed the implementation of * generic/tclBasic.c: [namespace import]; removed * generic/tclDecls.h: Tcl_NRObjProc, replaced with * generic/tclExecute.c: Tcl_NRCmdSwap (proposed public - * generic/tclInt.h: NRE API). This should fix + * generic/tclInt.h: NRE API). This should fix * generic/tclNRE.h: [Bug 582506]. * generic/tclNamesp.c: - * generic/tclStubInit.c: - - * generic/tclBasic.c: NRE: enabled calling NR commands + * generic/tclStubInit.c: + + * generic/tclBasic.c: NRE: enabled calling NR commands * generic/tclExecute.c: from the callbacks. Completely * generic/tclInt.h: redone tailcall implementation - * generic/tclNRE.h: using the new feature. [Bug 2021489] + * generic/tclNRE.h: using the new feature. [Bug 2021489] * generic/tclProc.c: * tests/NRE.test: - + 2008-07-20 Kevin B. Kenny * tests/fileName.test: Repaired the failing test fileName-15.7 from dkf's commit earlier today. - + 2008-07-20 Donal K. Fellows * generic/tclDictObj.c (SetDictFromAny): Make the list->dict @@ -298,7 +298,7 @@ * generic/tclOOInt.h: * generic/tclOOMethod.c: * generic/tclProc.c: - + 2008-07-18 Donal K. Fellows * generic/tclOO.c (TclNRNewObjectInstance, FinalizeAlloc): @@ -309,8 +309,8 @@ 2008-07-18 Miguel Sofer * tests/NRE.test: Added basic tests for deep TclOO calls - - * generic/tcl.decls: Change the public api prefix from + + * generic/tcl.decls: Change the public api prefix from * generic/tcl.h: TclNR_foo to Tcl_NRfoo * generic/tclBasic.c: * generic/tclDecls.h: @@ -325,7 +325,7 @@ * generic/tclOOMethod.c: * generic/tclProc.c: * generic/tclStubInit.c: - + 2008-07-18 Donal K. Fellows * generic/tclOOBasic.c (TclOO_Object_Eval, FinalizeEval): NRE-enable diff --git a/generic/tclNRE.h b/generic/tclNRE.h deleted file mode 100644 index e69de29..0000000 diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index f048025..1a683bf 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -937,7 +937,6 @@ F9A3084B08F2D4CE00BAE1AB /* tclsh */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tclsh; sourceTree = BUILT_PRODUCTS_DIR; }; F9A3084E08F2D4F400BAE1AB /* Tcl.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = Tcl.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F9A493240CEBF38300B78AE2 /* chanio.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = chanio.test; sourceTree = ""; }; - F9E070AE0E2A2BB400B853D2 /* tclNRE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclNRE.h; sourceTree = ""; }; F9E070B40E2A2BCC00B853D2 /* NRE.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NRE.test; sourceTree = ""; }; F9ECB1120B26521500A28025 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = ""; }; F9ECB1130B26521500A28025 /* platform.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = platform.tcl; sourceTree = ""; }; @@ -969,7 +968,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.38 2008/07/21 21:52:12 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.39 2008/07/31 22:12:04 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1307,7 +1306,6 @@ F96D3F0A08F272A7004A47F5 /* tclMain.c */, F96D3F0B08F272A7004A47F5 /* tclNamesp.c */, F96D3F0C08F272A7004A47F5 /* tclNotify.c */, - F9E070AE0E2A2BB400B853D2 /* tclNRE.h */, F96D3F0D08F272A7004A47F5 /* tclObj.c */, F93599B20DF1F75400E04F67 /* tclOO.c */, F93599B40DF1F75900E04F67 /* tclOO.decls */, -- cgit v0.12 From 6defa80ae783c5777b9d9e152d512bb722e3417d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 1 Aug 2008 00:44:04 +0000 Subject: * tests/NRE.test: replaced all deep-recursing tests by shallower tests that actually measure the C-stack depth. This makes them bearable again (even under memdebug) and avoid crashing on failure. --- ChangeLog | 4 + tests/NRE.test | 368 +++++++++++++++++++-------------------------------------- 2 files changed, 126 insertions(+), 246 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4fc26a..d645141 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-31 Miguel Sofer + * tests/NRE.test: replaced all deep-recursing tests by shallower + tests that actually measure the C-stack depth. This makes them + bearable again (even under memdebug) and avoid crashing on failure. + * generic/tclBasic.c: NR-enabling [catch], [if] and [for] and * generic/tclCmdAH.c: [while] (the script, not the tests) * generic/tclCmdIL.c: diff --git a/tests/NRE.test b/tests/NRE.test index dfa6f59..4a279bc 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: NRE.test,v 1.9 2008/07/31 15:42:08 msofer Exp $ +# RCS: @(#) $Id: NRE.test,v 1.10 2008/08/01 00:44:05 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -16,171 +16,98 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] -testConstraint teststacklimit [llength [info commands teststacklimit]] - -if {[testConstraint teststacklimit]} { - # - # Workaround for gnu-make bug http://savannah.gnu.org/bugs/?18396 - # - # Do not let make set up too large a C stack for us, as it effectively - # disables the tests under some circumstances - # - - set oldLimit [teststacklimit 2048] -} - -namespace eval testnre { - # - # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, - # cmdFrame level, callFrame level, tosPtr and callback depth - # - variable last [testnrelevels] - proc depthDiff {} { - variable last - set depth [testnrelevels] - set res {} - foreach t $depth l $last { - lappend res [expr {$t-$l}] - } - set last $depth - return $res - } - namespace export * -} -namespace import testnre::* - +testConstraint testnrelevels [llength [info commands testnrelevels]] # -# The first few tests will blow the C stack if the NR machinery is not working -# properly: all these calls should execute within the same instance of TEBC, -# and thus do not load the C stack. The nesting limit is given by how much the -# Tcl execution stack can grow. +# The tests that risked blowing the C stack on failure have been removed: we +# can now actually measure using testnrelevels. # -set oldRecursionLimit [interp recursionlimit {}] -interp recursionlimit {} 100000 - -test NRE-1.1 {self-recursive procs} -setup { - variable a {} - proc a i { - if {[incr i] > 20000} { - return $i +if {[testConstraint testnrelevels]} { + namespace eval testnre { + # + # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, + # cmdFrame level, callFrame level, tosPtr and callback depth + # + variable last [testnrelevels] + proc depthDiff {} { + variable last + set depth [testnrelevels] + set res {} + foreach t $depth l $last { + lappend res [expr {$t-$l}] + } + set last $depth + return $res + } + proc setabs {} { + uplevel 1 variable abs -[lindex [testnrelevels] 0] } - a $i - } -} -body { - list [catch {a 0} msg] $msg -} -cleanup { - rename a {} -} -result {0 20001} -test NRE-1.1a {self-recursive procs} -setup { - variable a {} - proc a i { - set x [depthDiff] - if {[incr i] > 10} { - return [lrange $x 0 3] + variable body0 { + set x [depthDiff] + if {[incr i] > 10} { + variable abs + incr abs [lindex [testnrelevels] 0] + return [list [lrange $x 0 3] $abs] + } + } + proc makebody txt { + variable body0 + return "$body0; $txt" } - a $i + namespace export * } + namespace import testnre::* +} + +test NRE-1.1 {self-recursive procs} -setup { + proc a i [makebody {a $i}] } -body { + setabs a 0 } -cleanup { rename a {} -} -result {0 1 1 1} + unset abs +} -result {{0 1 1 1} 0} test NRE-1.2 {self-recursive lambdas} -setup { - set a [list i { - if {[incr i] > 20000} { - return $i - } - apply $::a $i - }] -} -body { - list [catch {apply $a 0} msg] $msg -} -cleanup { - unset a -} -result {0 20001} - -test NRE-1.2a {self-recursive lambdas} -setup { - set a [list i { - set x [depthDiff] - if {[incr i] > 10} { - return [lrange $x 0 3] - } - apply $::a $i - }] + set a [list i [makebody {apply $::a $i}]] } -body { + setabs apply $a 0 } -cleanup { - unset a -} -result {0 1 1 1} - -test NRE-1.2.1 {self-recursive lambdas} -setup { - set a [list {} { - if {[incr ::i] > 20000} { - return $::i - } - apply $::a - }] -} -body { - set ::i 0 - list [catch {apply $a} msg] $msg $::i -} -cleanup { - unset a -} -result {0 20001 20001} + unset a abs +} -result {{0 1 1 1} 0} test NRE-1.3 {mutually recursive procs and lambdas} -setup { proc a i { apply $::b [incr i] } - set b [list i { - if {[incr i] > 20000} { - return $i - } - a $i - }] + set b [list i [makebody {a $i}]] } -body { - list [catch {list [a 0] [apply $b 0]} msg] $msg + setabs + a 0 } -cleanup { rename a {} - unset b -} -result {0 {20002 20001}} + unset b abs +} -result {{0 2 2 2} 0} # # Test that aliases are non-recursive # test NRE-2.1 {alias is not recursive} -setup { - proc a i { - if {[incr i] > 20000} { - return $i - } - b $i - } - interp alias {} b {} a -} -body { - list [catch {list [a 0] [b 0]} msg] $msg -} -cleanup { - rename a {} - rename b {} -} -result {0 {20001 20001}} - -test NRE-2.1a {alias is not recursive} -setup { - proc a i { - set x [depthDiff] - if {[incr i] > 10} { - return [lrange $x 0 3] - } - b $i - } + proc a i [makebody {b $i}] interp alias {} b {} a } -body { - list [a 0] [b 0] + setabs + a 0 } -cleanup { rename a {} rename b {} -} -result {{0 2 1 1} {0 2 1 1}} + unset abs +} -result {{0 2 1 1} 0} # # Test that imports are non-recursive @@ -188,119 +115,83 @@ test NRE-2.1a {alias is not recursive} -setup { test NRE-3.1 {imports are not recursive} -setup { namespace eval foo { - proc a i { - set x [depthDiff] - if {[incr i] > 10} { - return [lrange $x 0 3] - } - ::a $i - } + setabs namespace export a } + proc foo::a i [makebody {::a $i}] namespace import foo::a - a 1 } -body { a 0 } -cleanup { rename a {} namespace delete ::foo -} -result {0 2 1 1} - +} -result {{0 2 1 1} 0} test NRE-4.1 {ensembles are not recursive} -setup { - proc a i { - set x [depthDiff] - if {[incr i] > 10} { - return [lrange $x 0 3] - } - b foo $i - } + proc a i [makebody {b foo $i}] namespace ensemble create \ -command b \ -map [list foo a] } -body { - list [a 0] [b foo 0] + setabs + a 0 } -cleanup { rename a {} rename b {} -} -result {{0 2 1 1} {0 2 1 1}} - + unset abs +} -result {{0 2 1 1} 0} test NRE-5.1 {[namespace eval] is not recursive} -setup { namespace eval ::foo { - proc a i { - set x [depthDiff] - if {[incr i] > 10} { - return [lrange $x 0 3] - } - namespace eval ::foo [list a $i] - } + setabs } + proc foo::a i [makebody {namespace eval ::foo [list a $i]}] } -body { ::foo::a 0 } -cleanup { namespace delete ::foo -} -result {0 2 2 2} +} -result {{0 2 2 2} 0} test NRE-5.2 {[namespace eval] is not recursive} -setup { namespace eval ::foo { - proc a i { - if {[incr i] > 20000} { - return $i - } - namespace eval ::foo "set x $i; a $i" - } + setabs } + proc foo::a i [makebody {namespace eval ::foo "set x $i; a $i"}] } -body { - list [catch {::foo::a 0} msg] $msg + foo::a 0 } -cleanup { namespace delete ::foo -} -result {0 20001} - +} -result {{0 2 2 2} 0} test NRE-6.1 {[uplevel] is not recursive} -setup { - proc a i { - set x [depthDiff] - if {[incr i] > 10} { - return [lrange $x 0 3] - } - uplevel 1 [list a $i] - } + proc a i [makebody {uplevel 1 [list a $i]}] } -body { + setabs a 0 } -cleanup { rename a {} -} -result {0 2 2 0} + unset abs +} -result {{0 2 2 0} 0} test NRE-6.2 {[uplevel] is not recursive} -setup { - proc a i { - if {[incr i] > 20000} { - return $i - } - uplevel 1 "set x $i; a $i" - } + setabs + proc a i [makebody {uplevel 1 "set x $i; a $i"}] } -body { - list [catch {a 0} msg] $msg + a 0 } -cleanup { rename a {} -} -result {0 20001} + unset abs +} -result {{0 2 2 0} 0} test NRE-7.1 {[catch] is not recursive} -setup { - proc a i { - variable x [depthDiff] - if {[incr i] > 10} { - return - } - uplevel 1 [list catch "a $i"] - } + setabs + proc a i [makebody {uplevel 1 "catch {a $i} msg; set msg"}] } -body { - catch {a 0} - lrange $x 0 3 + a 0 } -cleanup { rename a {} - unset x -} -result {0 3 3 0} - + unset x abs +} -result {{0 3 3 0} 0} # # Basic TclOO tests @@ -308,86 +199,67 @@ test NRE-7.1 {[catch] is not recursive} -setup { test NRE-oo.1 {really deep calls in oo - direct} -setup { oo::object create foo - oo::objdefine foo method bar i { - if {[incr i] > 20000} { - return $i - } - foo bar $i - } + oo::objdefine foo method bar i [makebody {foo bar $i}] } -body { + setabs foo bar 0 } -cleanup { foo destroy -} -result 20001 + unset abs +} -result {{0 1 1 1} 0} test NRE-oo.2 {really deep calls in oo - call via [self]} -setup { oo::object create foo - oo::objdefine foo method bar i { - if {[incr i] > 20000} { - return $i - } - [self] bar $i - } + oo::objdefine foo method bar i [makebody {[self] bar $i}] } -body { + setabs foo bar 0 } -cleanup { foo destroy -} -result 20001 + unset abs +} -result {{0 1 1 1} 0} test NRE-oo.3 {really deep calls in oo - private calls} -setup { oo::object create foo - oo::objdefine foo method bar i { - if {[incr i] > 20000} { - return $i - } - my bar $i - } + oo::objdefine foo method bar i [makebody {my bar $i}] } -body { + setabs foo bar 0 } -cleanup { foo destroy -} -result 20001 + unset abs +} -result {{0 1 1 1} 0} test NRE-oo.4 {really deep calls in oo - overriding} -setup { oo::class create foo { - method bar i { - if {[incr i] > 20000} { - return $i - } - my bar $i - } + method bar i [makebody {my bar $i}] } oo::class create boo { superclass foo - method bar i { - if {[incr i] > 20000} { - return $i - } - next $i - } + method bar i [makebody {next $i}] } } -body { + setabs [boo new] bar 0 } -cleanup { foo destroy -} -result 20001 + unset abs +} -result {{0 1 1 1} 0} test NRE-oo.5 {really deep calls in oo - forwards} -setup { oo::object create foo - oo::objdefine foo { - method bar i { - if {[incr i] > 20000} { - return $i - } - my boo $i - } + set body [makebody {my boo $i}] + oo::objdefine foo " + method bar i {$body} forward boo ::foo bar - } + " } -body { + setabs foo bar 0 } -cleanup { foo destroy -} -result 20001 + unset abs +} -result {{0 2 1 1} 0} # @@ -414,8 +286,11 @@ test NRE-X.1 {eval in wrong interp} { # # Test tailcalls # -namespace eval tcl::unsupported namespace export tailcall -namespace import tcl::unsupported::tailcall + +if {[testConstraint tailcall]} { + namespace eval tcl::unsupported namespace export tailcall + namespace import tcl::unsupported::tailcall +} test NRE-T.0 {tailcall is constant space} -constraints {tailcall} -setup { proc a i { @@ -579,6 +454,7 @@ test NRE-T.9 {tailcall factorial} -constraints {tailcall} -setup { namespace forget tcl::unsupported::tailcall + # # Test that ensembles are non-recursive # @@ -588,13 +464,13 @@ namespace forget tcl::unsupported::tailcall # cleanup ::tcltest::cleanupTests -interp recursionlimit {} $oldRecursionLimit -unset oldRecursionLimit +if {[testConstraint testnrelevels]} { + namespace forget testnre::* + namespace delete testnre +} -if {[testConstraint teststacklimit]} { - teststacklimit $oldLimit - unset oldLimit +if {[testConstraint tailcall]} { + namespace forget tcl::unsupported::tailcall } -namespace delete testnre return -- cgit v0.12 From 4500f56474ce572532e86d38956af8fe69eb9d7d Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 1 Aug 2008 17:07:46 +0000 Subject: * generic/tclBasic.c: Revised timing of the CmdFrame stack management * tests/info.test: in TclEvalEx so that the CmdFrame will still be on the stack at the time Tcl_LogCommandInfo is called to append another level of -errorinfo information. Sets the stage to add file and line data to the stack trace. Added test to check that [info frame] functioning remains unchanged by the revision. --- ChangeLog | 9 +++++++++ generic/tclBasic.c | 29 +++++++++++++++++------------ tests/info.test | 9 ++++++++- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index d645141..c8efe8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-08-01 Don Porter + + * generic/tclBasic.c: Revised timing of the CmdFrame stack management + * tests/info.test: in TclEvalEx so that the CmdFrame will still + be on the stack at the time Tcl_LogCommandInfo is called to append + another level of -errorinfo information. Sets the stage to add + file and line data to the stack trace. Added test to check that + [info frame] functioning remains unchanged by the revision. + 2008-07-31 Miguel Sofer * tests/NRE.test: replaced all deep-recursing tests by shallower diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 019de9c..9509848 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.346 2008/07/31 20:01:38 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.347 2008/08/01 17:07:47 dgp Exp $ */ #include "tclInt.h" @@ -4838,6 +4838,14 @@ TclEvalEx( * Tcl initialization. */ + eeFramePtr->level = iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level + 1 : 1; + eeFramePtr->numLevels = iPtr->numLevels; + eeFramePtr->framePtr = iPtr->framePtr; + eeFramePtr->nextPtr = iPtr->cmdFramePtr; + eeFramePtr->nline = 0; + eeFramePtr->line = NULL; + + iPtr->cmdFramePtr = eeFramePtr; if (iPtr->evalFlags & TCL_EVAL_CTX) { /* * Path information comes out of the context. @@ -4885,13 +4893,6 @@ TclEvalEx( eeFramePtr->data.eval.path = NULL; } - eeFramePtr->level = iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level + 1 : 1; - eeFramePtr->numLevels = iPtr->numLevels; - eeFramePtr->framePtr = iPtr->framePtr; - eeFramePtr->nextPtr = iPtr->cmdFramePtr; - eeFramePtr->nline = 0; - eeFramePtr->line = NULL; - iPtr->evalFlags = 0; do { if (Tcl_ParseCommand(interp, p, bytesLeft, 0, parsePtr) != TCL_OK) { @@ -4933,6 +4934,7 @@ TclEvalEx( objv = objvSpace; lines = lineSpace; + iPtr->cmdFramePtr = eeFramePtr->nextPtr; for (objectsUsed = 0, tokenPtr = parsePtr->tokenPtr; objectsUsed < numWords; objectsUsed++, tokenPtr += tokenPtr->numComponents+1) { @@ -4960,7 +4962,7 @@ TclEvalEx( iPtr->evalFlags = 0; if (code != TCL_OK) { - goto error; + break; } objv[objectsUsed] = Tcl_GetObjResult(interp); Tcl_IncrRefCount(objv[objectsUsed]); @@ -4977,7 +4979,7 @@ TclEvalEx( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (expanding word %d)", objectsUsed)); Tcl_DecrRefCount(objv[objectsUsed]); - goto error; + break; } expandRequested = 1; expand[objectsUsed] = 1; @@ -4988,6 +4990,10 @@ TclEvalEx( objectsNeeded++; } } /* for loop */ + iPtr->cmdFramePtr = eeFramePtr; + if (code != TCL_OK) { + goto error; + } if (expandRequested) { /* * Some word expansion was requested. Check for objv resize. @@ -5058,9 +5064,7 @@ TclEvalEx( eeFramePtr->line = lines; TclArgumentEnter(interp, objv, objectsUsed, eeFramePtr); - iPtr->cmdFramePtr = eeFramePtr; code = Tcl_EvalObjv(interp, objectsUsed, objv, TCL_EVAL_NOERR); - iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; TclArgumentRelease(interp, objv, objectsUsed); eeFramePtr->line = NULL; @@ -5164,6 +5168,7 @@ TclEvalEx( * TIP #280. Release the local CmdFrame, and its contents. */ + iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; if (eeFramePtr->type == TCL_LOCATION_SOURCE) { Tcl_DecrRefCount(eeFramePtr->data.eval.path); } diff --git a/tests/info.test b/tests/info.test index d68da9f..d51390f 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.57 2008/07/25 23:06:21 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.58 2008/08/01 17:07:48 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1409,6 +1409,13 @@ test info-38.6 {location information for uplevel, ppl, proc-proc-literal} -match * {type source line 1342 file info.test cmd control proc ::datal level 1} * {type source line 1405 file info.test cmd datal proc ::tcltest::RunTest}} +test info-38.7 {location information for arg substitution} -match glob -body { + join [lrange [testevalex {return -level 0 [etrace]}] 0 3] \n +} -result {* {type source line 728 file info.test cmd {info frame \$level} proc ::etrace level 0} +* {type eval line 1 cmd etrace proc ::tcltest::RunTest} +* {type source line 1413 file info.test cmd {testevalex {return -level 0 \[etrace]}} proc ::tcltest::RunTest} +* {type source line 2298 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}} + # ------------------------------------------------------------------------- # cleanup -- cgit v0.12 From e8eb91c8acb09e341223b15de621f7ef1c8131f9 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 1 Aug 2008 18:22:27 +0000 Subject: * doc/Exit.3: do not call Tcl_Finalize implicitly * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead * win/tclWin32Dll.c (DllMain): to issues and the user should be explicitly calling Tcl_Finalize before unloading regardless. Clarify the docs to note the explicit need in embedded use. --- ChangeLog | 8 ++++ doc/Exit.3 | 10 ++--- generic/tclEvent.c | 7 ++-- win/tclWin32Dll.c | 107 ++--------------------------------------------------- 4 files changed, 19 insertions(+), 113 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8efe8e..617788e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-01 Jeff Hobbs + + * doc/Exit.3: do not call Tcl_Finalize implicitly + * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead + * win/tclWin32Dll.c (DllMain): to issues and the user should be + explicitly calling Tcl_Finalize before unloading regardless. + Clarify the docs to note the explicit need in embedded use. + 2008-08-01 Don Porter * generic/tclBasic.c: Revised timing of the CmdFrame stack management diff --git a/doc/Exit.3 b/doc/Exit.3 index 082802c..61fb222 100644 --- a/doc/Exit.3 +++ b/doc/Exit.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Exit.3,v 1.7 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Exit.3,v 1.8 2008/08/01 18:22:29 hobbs Exp $ '\" .so man.macros .TH Tcl_Exit 3 8.5 Tcl "Tcl Library Procedures" @@ -74,12 +74,8 @@ exit from the current process. It is useful for cleaning up when a process is finished using \fBTcl\fR but wishes to continue executing, and when \fBTcl\fR is used in a dynamically loaded extension that is about to be unloaded. -On some systems \fBTcl\fR is automatically notified when it is being -unloaded, and it calls \fBTcl_Finalize\fR internally; on these systems it -not necessary for the caller to explicitly call \fBTcl_Finalize\fR. -However, to ensure portability, your code should always invoke -\fBTcl_Finalize\fR when \fBTcl\fR is being unloaded, to ensure that the -code will work on all platforms. \fBTcl_Finalize\fR can be safely called +Your code should always invoke \fBTcl_Finalize\fR when \fBTcl\fR is being +unloaded, to ensure proper cleanup. \fBTcl_Finalize\fR can be safely called more than once. .PP \fBTcl_ExitThread\fR is used to terminate the current thread and invoke diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 836d958..9e38f24 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.82 2008/06/13 05:45:10 mistachkin Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.83 2008/08/01 18:22:28 hobbs Exp $ */ #include "tclInt.h" @@ -914,8 +914,9 @@ TclInitSubsystems(void) * Tcl_Finalize -- * * Shut down Tcl. First calls registered exit handlers, then carefully - * shuts down various subsystems. Called by Tcl_Exit or when the Tcl - * shared library is being unloaded. + * shuts down various subsystems. Called by Tcl_Exit, or should be + * invoked by user before the Tcl shared library is being unloaded in + * an embedded context. * * Results: * None. diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 6120c67..ac04198 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.56 2008/07/13 09:03:41 msofer Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.57 2008/08/01 18:22:29 hobbs Exp $ */ #include "tclWinInt.h" @@ -188,23 +188,12 @@ static TclWinProcs unicodeProcs = { TclWinProcs *tclWinProcs; static Tcl_Encoding tclWinTCharEncoding; -#ifdef HAVE_NO_SEH -/* - * Need to add noinline flag to DllMain declaration so that gcc -O3 does not - * inline asm code into DllEntryPoint and cause a compile time error because - * of redefined local labels. - */ - -BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, - LPVOID reserved) __attribute__ ((noinline)); -#else /* * The following declaration is for the VC++ DLL entry point. */ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved); -#endif /* HAVE_NO_SEH */ /* * The following structure and linked list is to allow us to map between @@ -277,10 +266,7 @@ DllEntryPoint( * TRUE on sucess, FALSE on failure. * * Side effects: - * Establishes 32-to-16 bit thunk and initializes sockets library. This - * might call some sycronization functions, but MSDN documentation - * states: "Waiting on synchronization objects in DllMain can cause a - * deadlock." + * Initializes most rudimentary Windows bits. * *---------------------------------------------------------------------- */ @@ -291,101 +277,16 @@ DllMain( DWORD reason, /* Reason this function is being called. */ LPVOID reserved) /* Not used. */ { -#ifdef HAVE_NO_SEH - EXCEPTION_REGISTRATION registration; -#endif - switch (reason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hInst); TclWinInit(hInst); return TRUE; - case DLL_PROCESS_DETACH: /* - * Protect the call to Tcl_Finalize. The OS could be unloading us from - * an exception handler and the state of the stack might be unstable. + * DLL_PROCESS_DETACH is unnecessary as the user should call + * Tcl_Finalize explicitly before unloading Tcl. */ - -#ifdef HAVE_NO_SEH - __asm__ __volatile__ ( - - /* - * Construct an EXCEPTION_REGISTRATION to protect the call to - * Tcl_Finalize - */ - - "leal %[registration], %%edx" "\n\t" - "movl %%fs:0, %%eax" "\n\t" - "movl %%eax, 0x0(%%edx)" "\n\t" /* link */ - "leal 1f, %%eax" "\n\t" - "movl %%eax, 0x4(%%edx)" "\n\t" /* handler */ - "movl %%ebp, 0x8(%%edx)" "\n\t" /* ebp */ - "movl %%esp, 0xc(%%edx)" "\n\t" /* esp */ - "movl %[error], 0x10(%%edx)" "\n\t" /* status */ - - /* - * Link the EXCEPTION_REGISTRATION on the chain - */ - - "movl %%edx, %%fs:0" "\n\t" - - /* - * Call Tcl_Finalize - */ - - "call _Tcl_Finalize" "\n\t" - - /* - * Come here on a normal exit. Recover the EXCEPTION_REGISTRATION - * and store a TCL_OK status - */ - - "movl %%fs:0, %%edx" "\n\t" - "movl %[ok], %%eax" "\n\t" - "movl %%eax, 0x10(%%edx)" "\n\t" - "jmp 2f" "\n" - - /* - * Come here on an exception. Get the EXCEPTION_REGISTRATION that - * we previously put on the chain. - */ - - "1:" "\t" - "movl %%fs:0, %%edx" "\n\t" - "movl 0x8(%%edx), %%edx" "\n" - - - /* - * Come here however we exited. Restore context from the - * EXCEPTION_REGISTRATION in case the stack is unbalanced. - */ - - "2:" "\t" - "movl 0xc(%%edx), %%esp" "\n\t" - "movl 0x8(%%edx), %%ebp" "\n\t" - "movl 0x0(%%edx), %%eax" "\n\t" - "movl %%eax, %%fs:0" "\n\t" - - : - /* No outputs */ - : - [registration] "m" (registration), - [ok] "i" (TCL_OK), - [error] "i" (TCL_ERROR) - : - "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory" - ); - -#else /* HAVE_NO_SEH */ - __try { - Tcl_Finalize(); - } __except (EXCEPTION_EXECUTE_HANDLER) { - /* empty handler body. */ - } -#endif - - break; } return TRUE; -- cgit v0.12 From 1f4b86be27a81175aae9c86e7847149de4442ff6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 2 Aug 2008 14:12:55 +0000 Subject: * tests/NRE.test: made empty, waiting for removal until das does his thing in macosx/Tcl.xcodeproj/project.pbxproj * tests/nre.test: migrated tests to standard locations, * tests/unsupported.test: separating core functionality from the experimental commands. These are new files. --- ChangeLog | 9 + tests/NRE.test | 476 ------------------------------------------------- tests/nre.test | 295 ++++++++++++++++++++++++++++++ tests/unsupported.test | 248 ++++++++++++++++++++++++++ 4 files changed, 552 insertions(+), 476 deletions(-) create mode 100644 tests/nre.test create mode 100644 tests/unsupported.test diff --git a/ChangeLog b/ChangeLog index 617788e..5327945 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-08-02 Miguel Sofer + + * tests/NRE.test: made empty, waiting for removal until das does + his thing in macosx/Tcl.xcodeproj/project.pbxproj + + * tests/nre.test: migrated tests to standard locations, + * tests/unsupported.test: separating core functionality from the + experimental commands. These are new files. + 2008-08-01 Jeff Hobbs * doc/Exit.3: do not call Tcl_Finalize implicitly diff --git a/tests/NRE.test b/tests/NRE.test index 4a279bc..e69de29 100644 --- a/tests/NRE.test +++ b/tests/NRE.test @@ -1,476 +0,0 @@ -# Commands covered: proc, apply, [interp alias], [namespce import], tailcall -# -# This file contains a collection of tests for the non-recursive executor that -# avoids recursive calls to TEBC. -# -# Copyright (c) 2008 by Miguel Sofer. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: NRE.test,v 1.10 2008/08/01 00:44:05 msofer Exp $ - -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest - namespace import -force ::tcltest::* -} - -testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] -testConstraint testnrelevels [llength [info commands testnrelevels]] - -# -# The tests that risked blowing the C stack on failure have been removed: we -# can now actually measure using testnrelevels. -# - -if {[testConstraint testnrelevels]} { - namespace eval testnre { - # - # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, - # cmdFrame level, callFrame level, tosPtr and callback depth - # - variable last [testnrelevels] - proc depthDiff {} { - variable last - set depth [testnrelevels] - set res {} - foreach t $depth l $last { - lappend res [expr {$t-$l}] - } - set last $depth - return $res - } - proc setabs {} { - uplevel 1 variable abs -[lindex [testnrelevels] 0] - } - - variable body0 { - set x [depthDiff] - if {[incr i] > 10} { - variable abs - incr abs [lindex [testnrelevels] 0] - return [list [lrange $x 0 3] $abs] - } - } - proc makebody txt { - variable body0 - return "$body0; $txt" - } - namespace export * - } - namespace import testnre::* -} - -test NRE-1.1 {self-recursive procs} -setup { - proc a i [makebody {a $i}] -} -body { - setabs - a 0 -} -cleanup { - rename a {} - unset abs -} -result {{0 1 1 1} 0} - -test NRE-1.2 {self-recursive lambdas} -setup { - set a [list i [makebody {apply $::a $i}]] -} -body { - setabs - apply $a 0 -} -cleanup { - unset a abs -} -result {{0 1 1 1} 0} - -test NRE-1.3 {mutually recursive procs and lambdas} -setup { - proc a i { - apply $::b [incr i] - } - set b [list i [makebody {a $i}]] -} -body { - setabs - a 0 -} -cleanup { - rename a {} - unset b abs -} -result {{0 2 2 2} 0} - -# -# Test that aliases are non-recursive -# - -test NRE-2.1 {alias is not recursive} -setup { - proc a i [makebody {b $i}] - interp alias {} b {} a -} -body { - setabs - a 0 -} -cleanup { - rename a {} - rename b {} - unset abs -} -result {{0 2 1 1} 0} - -# -# Test that imports are non-recursive -# - -test NRE-3.1 {imports are not recursive} -setup { - namespace eval foo { - setabs - namespace export a - } - proc foo::a i [makebody {::a $i}] - namespace import foo::a -} -body { - a 0 -} -cleanup { - rename a {} - namespace delete ::foo -} -result {{0 2 1 1} 0} - -test NRE-4.1 {ensembles are not recursive} -setup { - proc a i [makebody {b foo $i}] - namespace ensemble create \ - -command b \ - -map [list foo a] -} -body { - setabs - a 0 -} -cleanup { - rename a {} - rename b {} - unset abs -} -result {{0 2 1 1} 0} - -test NRE-5.1 {[namespace eval] is not recursive} -setup { - namespace eval ::foo { - setabs - } - proc foo::a i [makebody {namespace eval ::foo [list a $i]}] -} -body { - ::foo::a 0 -} -cleanup { - namespace delete ::foo -} -result {{0 2 2 2} 0} - -test NRE-5.2 {[namespace eval] is not recursive} -setup { - namespace eval ::foo { - setabs - } - proc foo::a i [makebody {namespace eval ::foo "set x $i; a $i"}] -} -body { - foo::a 0 -} -cleanup { - namespace delete ::foo -} -result {{0 2 2 2} 0} - -test NRE-6.1 {[uplevel] is not recursive} -setup { - proc a i [makebody {uplevel 1 [list a $i]}] -} -body { - setabs - a 0 -} -cleanup { - rename a {} - unset abs -} -result {{0 2 2 0} 0} - -test NRE-6.2 {[uplevel] is not recursive} -setup { - setabs - proc a i [makebody {uplevel 1 "set x $i; a $i"}] -} -body { - a 0 -} -cleanup { - rename a {} - unset abs -} -result {{0 2 2 0} 0} - -test NRE-7.1 {[catch] is not recursive} -setup { - setabs - proc a i [makebody {uplevel 1 "catch {a $i} msg; set msg"}] -} -body { - a 0 -} -cleanup { - rename a {} - unset x abs -} -result {{0 3 3 0} 0} - -# -# Basic TclOO tests -# - -test NRE-oo.1 {really deep calls in oo - direct} -setup { - oo::object create foo - oo::objdefine foo method bar i [makebody {foo bar $i}] -} -body { - setabs - foo bar 0 -} -cleanup { - foo destroy - unset abs -} -result {{0 1 1 1} 0} - -test NRE-oo.2 {really deep calls in oo - call via [self]} -setup { - oo::object create foo - oo::objdefine foo method bar i [makebody {[self] bar $i}] -} -body { - setabs - foo bar 0 -} -cleanup { - foo destroy - unset abs -} -result {{0 1 1 1} 0} - -test NRE-oo.3 {really deep calls in oo - private calls} -setup { - oo::object create foo - oo::objdefine foo method bar i [makebody {my bar $i}] -} -body { - setabs - foo bar 0 -} -cleanup { - foo destroy - unset abs -} -result {{0 1 1 1} 0} - -test NRE-oo.4 {really deep calls in oo - overriding} -setup { - oo::class create foo { - method bar i [makebody {my bar $i}] - } - oo::class create boo { - superclass foo - method bar i [makebody {next $i}] - } -} -body { - setabs - [boo new] bar 0 -} -cleanup { - foo destroy - unset abs -} -result {{0 1 1 1} 0} - -test NRE-oo.5 {really deep calls in oo - forwards} -setup { - oo::object create foo - set body [makebody {my boo $i}] - oo::objdefine foo " - method bar i {$body} - forward boo ::foo bar - " -} -body { - setabs - foo bar 0 -} -cleanup { - foo destroy - unset abs -} -result {{0 2 1 1} 0} - - -# -# NASTY BUG found by tcllib's interp package -# - -test NRE-X.1 {eval in wrong interp} { - set i [interp create] - set res [$i eval { - set x {namespace children ::} - set y [list namespace children ::] - namespace delete {*}[{*}$y] - set j [interp create] - $j eval {namespace delete {*}[namespace children ::]} - namespace eval foo {} - set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] - interp delete $j - set res - }] - interp delete $i - set res -} {::foo ::foo {} {}} - -# -# Test tailcalls -# - -if {[testConstraint tailcall]} { - namespace eval tcl::unsupported namespace export tailcall - namespace import tcl::unsupported::tailcall -} - -test NRE-T.0 {tailcall is constant space} -constraints {tailcall} -setup { - proc a i { - if {[incr i] > 10} { - return [depthDiff] - } - depthDiff - tailcall a $i - } -} -body { - a 0 -} -cleanup { - rename a {} -} -result {0 0 0 0 0 0} - -test NRE-T.1 {tailcall} -constraints {tailcall} -body { - namespace eval a { - variable x *::a - proc xset {} { - set tmp {} - set ns {[namespace current]} - set level [info level] - for {set i 0} {$i <= [info level]} {incr i} { - uplevel #$i "set x $i$ns" - lappend tmp "$i [info level $i]" - } - lrange $tmp 1 end - } - proc foo {} {tailcall xset; set x noreach} - } - namespace eval b { - variable x *::b - proc xset args {error b::xset} - proc moo {} {set x 0; variable y [::a::foo]; set x} - } - variable x *:: - proc xset args {error ::xset} - list [::b::moo] | $x $a::x $b::x | $::b::y -} -cleanup { - unset x - rename xset {} - namespace delete a b -} -result {1::b | 0:: *::a *::b | {{1 ::b::moo} {2 xset}}} - - -test NRE-T.2 {tailcall in non-proc} -constraints {tailcall} -body { - list [catch {namespace eval a [list tailcall set x 1]} msg] $msg -} -result {1 {tailcall can only be called from a proc or lambda}} - -test NRE-T.3 {tailcall falls off tebc} -constraints {tailcall} -body { - unset -nocomplain x - proc foo {} {tailcall set x 1} - list [catch foo msg] $msg [set x] -} -cleanup { - rename foo {} - unset x -} -result {0 1 1} - -test NRE-T.4 {tailcall falls off tebc} -constraints {tailcall} -body { - set x 2 - proc foo {} {tailcall set x 1} - foo - set x -} -cleanup { - rename foo {} - unset x -} -result 1 - -test NRE-T.5 {tailcall falls off tebc} -constraints {tailcall} -body { - set x 2 - namespace eval bar { - variable x 3 - proc foo {} {tailcall set x 1} - } - bar::foo - list $x $bar::x -} -cleanup { - unset x - namespace delete bar -} -result {1 3} - -test NRE-T.6 {tailcall does remove callframes} -constraints {tailcall} -body { - proc foo {} {info level} - proc moo {} {tailcall foo} - proc boo {} {expr {[moo] - [info level]}} - boo -} -cleanup { - rename foo {} - rename moo {} - rename boo {} -} -result 1 - -test NRE-T.7 {tailcall does return} -constraints {tailcall} -setup { - namespace eval ::foo { - variable res {} - proc a {} { - variable res - append res a - tailcall set x 1 - append res a - } - proc b {} { - variable res - append res b - a - append res b - } - proc c {} { - variable res - append res c - b - append res c - } - } -} -body { - namespace eval ::foo c -} -cleanup { - namespace delete ::foo -} -result cbabc - -test NRE-T.8 {tailcall tailcall} -constraints {tailcall} -setup { - namespace eval ::foo { - variable res {} - proc a {} { - variable res - append res a - tailcall tailcall set x 1 - append res a - } - proc b {} { - variable res - append res b - a - append res b - } - proc c {} { - variable res - append res c - b - append res c - } - } -} -body { - namespace eval ::foo c -} -cleanup { - namespace delete ::foo -} -match glob -result *tailcall* -returnCodes error - -test NRE-T.9 {tailcall factorial} -constraints {tailcall} -setup { - proc fact {n {b 1}} { - if {$n == 1} { - return $b - } - tailcall fact [expr {$n-1}] [expr {$n*$b}] - } -} -body { - list [fact 1] [fact 5] [fact 10] [fact 15] -} -cleanup { - rename fact {} -} -result {1 120 3628800 1307674368000} - - -namespace forget tcl::unsupported::tailcall - -# -# Test that ensembles are non-recursive -# - - - -# cleanup -::tcltest::cleanupTests - -if {[testConstraint testnrelevels]} { - namespace forget testnre::* - namespace delete testnre -} - -if {[testConstraint tailcall]} { - namespace forget tcl::unsupported::tailcall -} - -return diff --git a/tests/nre.test b/tests/nre.test new file mode 100644 index 0000000..c926de5 --- /dev/null +++ b/tests/nre.test @@ -0,0 +1,295 @@ +# Commands covered: proc, apply, [interp alias], [namespce import] +# +# This file contains a collection of tests for the non-recursive executor that +# avoids recursive calls to TEBC. Only the NRE behaviour is tested here, the +# actual command functionality is tested in the specific test file. +# +# Copyright (c) 2008 by Miguel Sofer. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: nre.test,v 1.1 2008/08/02 14:12:56 msofer Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* +} + +testConstraint testnrelevels [llength [info commands testnrelevels]] + +# +# The tests that risked blowing the C stack on failure have been removed: we +# can now actually measure using testnrelevels. +# + +if {[testConstraint testnrelevels]} { + namespace eval testnre { + # + # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, + # cmdFrame level, callFrame level, tosPtr and callback depth + # + variable last [testnrelevels] + proc depthDiff {} { + variable last + set depth [testnrelevels] + set res {} + foreach t $depth l $last { + lappend res [expr {$t-$l}] + } + set last $depth + return $res + } + proc setabs {} { + uplevel 1 variable abs -[lindex [testnrelevels] 0] + } + + variable body0 { + set x [depthDiff] + if {[incr i] > 10} { + variable abs + incr abs [lindex [testnrelevels] 0] + return [list [lrange $x 0 3] $abs] + } + } + proc makebody txt { + variable body0 + return "$body0; $txt" + } + namespace export * + } + namespace import testnre::* +} + +test nre-1.1 {self-recursive procs} -setup { + proc a i [makebody {a $i}] +} -body { + setabs + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 1 1 1} 0} + +test nre-1.2 {self-recursive lambdas} -setup { + set a [list i [makebody {apply $::a $i}]] +} -body { + setabs + apply $a 0 +} -cleanup { + unset a abs +} -result {{0 1 1 1} 0} + +test nre-1.3 {mutually recursive procs and lambdas} -setup { + proc a i { + apply $::b [incr i] + } + set b [list i [makebody {a $i}]] +} -body { + setabs + a 0 +} -cleanup { + rename a {} + unset b abs +} -result {{0 2 2 2} 0} + +# +# Test that aliases are non-recursive +# + +test nre-2.1 {alias is not recursive} -setup { + proc a i [makebody {b $i}] + interp alias {} b {} a +} -body { + setabs + a 0 +} -cleanup { + rename a {} + rename b {} + unset abs +} -result {{0 2 1 1} 0} + +# +# Test that imports are non-recursive +# + +test nre-3.1 {imports are not recursive} -setup { + namespace eval foo { + setabs + namespace export a + } + proc foo::a i [makebody {::a $i}] + namespace import foo::a +} -body { + a 0 +} -cleanup { + rename a {} + namespace delete ::foo +} -result {{0 2 1 1} 0} + +test nre-4.1 {ensembles are not recursive} -setup { + proc a i [makebody {b foo $i}] + namespace ensemble create \ + -command b \ + -map [list foo a] +} -body { + setabs + a 0 +} -cleanup { + rename a {} + rename b {} + unset abs +} -result {{0 2 1 1} 0} + +test nre-5.1 {[namespace eval] is not recursive} -setup { + namespace eval ::foo { + setabs + } + proc foo::a i [makebody {namespace eval ::foo [list a $i]}] +} -body { + ::foo::a 0 +} -cleanup { + namespace delete ::foo +} -result {{0 2 2 2} 0} + +test nre-5.2 {[namespace eval] is not recursive} -setup { + namespace eval ::foo { + setabs + } + proc foo::a i [makebody {namespace eval ::foo "set x $i; a $i"}] +} -body { + foo::a 0 +} -cleanup { + namespace delete ::foo +} -result {{0 2 2 2} 0} + +test nre-6.1 {[uplevel] is not recursive} -setup { + proc a i [makebody {uplevel 1 [list a $i]}] +} -body { + setabs + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 0} 0} + +test nre-6.2 {[uplevel] is not recursive} -setup { + setabs + proc a i [makebody {uplevel 1 "set x $i; a $i"}] +} -body { + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 0} 0} + +test nre-7.1 {[catch] is not recursive} -setup { + setabs + proc a i [makebody {uplevel 1 "catch {a $i} msg; set msg"}] +} -body { + a 0 +} -cleanup { + rename a {} + unset x abs +} -result {{0 3 3 0} 0} + +# +# Basic TclOO tests +# + +test nre-oo.1 {really deep calls in oo - direct} -setup { + oo::object create foo + oo::objdefine foo method bar i [makebody {foo bar $i}] +} -body { + setabs + foo bar 0 +} -cleanup { + foo destroy + unset abs +} -result {{0 1 1 1} 0} + +test nre-oo.2 {really deep calls in oo - call via [self]} -setup { + oo::object create foo + oo::objdefine foo method bar i [makebody {[self] bar $i}] +} -body { + setabs + foo bar 0 +} -cleanup { + foo destroy + unset abs +} -result {{0 1 1 1} 0} + +test nre-oo.3 {really deep calls in oo - private calls} -setup { + oo::object create foo + oo::objdefine foo method bar i [makebody {my bar $i}] +} -body { + setabs + foo bar 0 +} -cleanup { + foo destroy + unset abs +} -result {{0 1 1 1} 0} + +test nre-oo.4 {really deep calls in oo - overriding} -setup { + oo::class create foo { + method bar i [makebody {my bar $i}] + } + oo::class create boo { + superclass foo + method bar i [makebody {next $i}] + } +} -body { + setabs + [boo new] bar 0 +} -cleanup { + foo destroy + unset abs +} -result {{0 1 1 1} 0} + +test nre-oo.5 {really deep calls in oo - forwards} -setup { + oo::object create foo + set body [makebody {my boo $i}] + oo::objdefine foo " + method bar i {$body} + forward boo ::foo bar + " +} -body { + setabs + foo bar 0 +} -cleanup { + foo destroy + unset abs +} -result {{0 2 1 1} 0} + + +# +# NASTY BUG found by tcllib's interp package +# + +test nre-X.1 {eval in wrong interp} { + set i [interp create] + set res [$i eval { + set x {namespace children ::} + set y [list namespace children ::] + namespace delete {*}[{*}$y] + set j [interp create] + $j eval {namespace delete {*}[namespace children ::]} + namespace eval foo {} + set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] + interp delete $j + set res + }] + interp delete $i + set res +} {::foo ::foo {} {}} + + +# cleanup +::tcltest::cleanupTests + +if {[testConstraint testnrelevels]} { + namespace forget testnre::* + namespace delete testnre +} + +return diff --git a/tests/unsupported.test b/tests/unsupported.test new file mode 100644 index 0000000..7d09558 --- /dev/null +++ b/tests/unsupported.test @@ -0,0 +1,248 @@ +# Commands covered: proc, apply, [interp alias], [namespce import], tailcall +# +# This file contains a collection of tests for experimental commands that are +# found in ::tcl::unsupported. The tests will migrate to normal test files +# if/when the commands find their way into the core. +# +# Copyright (c) 2008 by Miguel Sofer. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: unsupported.test,v 1.1 2008/08/02 14:12:56 msofer Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* +} + +testConstraint testnrelevels [llength [info commands testnrelevels]] + +# +# The tests that risked blowing the C stack on failure have been removed: we +# can now actually measure using testnrelevels. +# + +if {[testConstraint testnrelevels]} { + namespace eval testnre { + # + # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, + # cmdFrame level, callFrame level, tosPtr and callback depth + # + variable last [testnrelevels] + proc depthDiff {} { + variable last + set depth [testnrelevels] + set res {} + foreach t $depth l $last { + lappend res [expr {$t-$l}] + } + set last $depth + return $res + } + proc setabs {} { + uplevel 1 variable abs -[lindex [testnrelevels] 0] + } + + variable body0 { + set x [depthDiff] + if {[incr i] > 10} { + variable abs + incr abs [lindex [testnrelevels] 0] + return [list [lrange $x 0 3] $abs] + } + } + proc makebody txt { + variable body0 + return "$body0; $txt" + } + namespace export * + } + namespace import testnre::* +} + +# +# Test tailcalls +# + +testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] + +if {[testConstraint tailcall]} { + namespace eval tcl::unsupported namespace export tailcall + namespace import tcl::unsupported::tailcall +} + +test unsupported-T.0 {tailcall is constant space} -constraints {tailcall} -setup { + proc a i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + tailcall a $i + } +} -body { + a 0 +} -cleanup { + rename a {} +} -result {0 0 0 0 0 0} + +test unsupported-T.1 {tailcall} -constraints {tailcall} -body { + namespace eval a { + variable x *::a + proc xset {} { + set tmp {} + set ns {[namespace current]} + set level [info level] + for {set i 0} {$i <= [info level]} {incr i} { + uplevel #$i "set x $i$ns" + lappend tmp "$i [info level $i]" + } + lrange $tmp 1 end + } + proc foo {} {tailcall xset; set x noreach} + } + namespace eval b { + variable x *::b + proc xset args {error b::xset} + proc moo {} {set x 0; variable y [::a::foo]; set x} + } + variable x *:: + proc xset args {error ::xset} + list [::b::moo] | $x $a::x $b::x | $::b::y +} -cleanup { + unset x + rename xset {} + namespace delete a b +} -result {1::b | 0:: *::a *::b | {{1 ::b::moo} {2 xset}}} + + +test unsupported-T.2 {tailcall in non-proc} -constraints {tailcall} -body { + list [catch {namespace eval a [list tailcall set x 1]} msg] $msg +} -result {1 {tailcall can only be called from a proc or lambda}} + +test unsupported-T.3 {tailcall falls off tebc} -constraints {tailcall} -body { + unset -nocomplain x + proc foo {} {tailcall set x 1} + list [catch foo msg] $msg [set x] +} -cleanup { + rename foo {} + unset x +} -result {0 1 1} + +test unsupported-T.4 {tailcall falls off tebc} -constraints {tailcall} -body { + set x 2 + proc foo {} {tailcall set x 1} + foo + set x +} -cleanup { + rename foo {} + unset x +} -result 1 + +test unsupported-T.5 {tailcall falls off tebc} -constraints {tailcall} -body { + set x 2 + namespace eval bar { + variable x 3 + proc foo {} {tailcall set x 1} + } + bar::foo + list $x $bar::x +} -cleanup { + unset x + namespace delete bar +} -result {1 3} + +test unsupported-T.6 {tailcall does remove callframes} -constraints {tailcall} -body { + proc foo {} {info level} + proc moo {} {tailcall foo} + proc boo {} {expr {[moo] - [info level]}} + boo +} -cleanup { + rename foo {} + rename moo {} + rename boo {} +} -result 1 + +test unsupported-T.7 {tailcall does return} -constraints {tailcall} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall set x 1 + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + } +} -body { + namespace eval ::foo c +} -cleanup { + namespace delete ::foo +} -result cbabc + +test unsupported-T.8 {tailcall tailcall} -constraints {tailcall} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall tailcall set x 1 + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + } +} -body { + namespace eval ::foo c +} -cleanup { + namespace delete ::foo +} -match glob -result *tailcall* -returnCodes error + +test unsupported-T.9 {tailcall factorial} -constraints {tailcall} -setup { + proc fact {n {b 1}} { + if {$n == 1} { + return $b + } + tailcall fact [expr {$n-1}] [expr {$n*$b}] + } +} -body { + list [fact 1] [fact 5] [fact 10] [fact 15] +} -cleanup { + rename fact {} +} -result {1 120 3628800 1307674368000} + + +if {[testConstraint tailcall]} { + namespace forget tcl::unsupported::tailcall +} + +# cleanup +::tcltest::cleanupTests + +if {[testConstraint testnrelevels]} { + namespace forget testnre::* + namespace delete testnre +} + +return -- cgit v0.12 From 4e05e9902f3b5f40de10d672ed0c5e1a106dc8ae Mon Sep 17 00:00:00 2001 From: das Date: Sun, 3 Aug 2008 10:19:27 +0000 Subject: remove NRE.test & add new test files to Tcl.xcodeproj --- ChangeLog | 9 +++------ macosx/Tcl.xcodeproj/project.pbxproj | 8 +++++--- tests/NRE.test | 0 3 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 tests/NRE.test diff --git a/ChangeLog b/ChangeLog index 5327945..39eafc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,8 @@ 2008-08-02 Miguel Sofer - * tests/NRE.test: made empty, waiting for removal until das does - his thing in macosx/Tcl.xcodeproj/project.pbxproj - - * tests/nre.test: migrated tests to standard locations, - * tests/unsupported.test: separating core functionality from the - experimental commands. These are new files. + * tests/NRE.test (removed): migrated tests to standard locations, + * tests/nre.test (new): separating core functionality from the + * tests/unsupported.test (new): experimental commands. 2008-08-01 Jeff Hobbs diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 1a683bf..6565987 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -185,6 +185,8 @@ /* Begin PBXFileReference section */ 8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; }; + F91DC23C0E44C51B002CB8D1 /* nre.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = nre.test; sourceTree = ""; }; + F91DC23D0E44C530002CB8D1 /* unsupported.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unsupported.test; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; F92D7F100DE777240033A13A /* tsdPerf.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tsdPerf.tcl; sourceTree = ""; }; F92D7F140DE777670033A13A /* tsdPerf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsdPerf.c; sourceTree = ""; }; @@ -937,7 +939,6 @@ F9A3084B08F2D4CE00BAE1AB /* tclsh */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tclsh; sourceTree = BUILT_PRODUCTS_DIR; }; F9A3084E08F2D4F400BAE1AB /* Tcl.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = Tcl.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F9A493240CEBF38300B78AE2 /* chanio.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = chanio.test; sourceTree = ""; }; - F9E070B40E2A2BCC00B853D2 /* NRE.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NRE.test; sourceTree = ""; }; F9ECB1120B26521500A28025 /* pkgIndex.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = pkgIndex.tcl; sourceTree = ""; }; F9ECB1130B26521500A28025 /* platform.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = platform.tcl; sourceTree = ""; }; F9ECB1140B26521500A28025 /* shell.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = shell.tcl; sourceTree = ""; }; @@ -968,7 +969,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.39 2008/07/31 22:12:04 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.40 2008/08/03 10:19:29 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1684,7 +1685,7 @@ F96D439108F272B6004A47F5 /* namespace-old.test */, F96D439208F272B7004A47F5 /* namespace.test */, F96D439308F272B7004A47F5 /* notify.test */, - F9E070B40E2A2BCC00B853D2 /* NRE.test */, + F91DC23C0E44C51B002CB8D1 /* nre.test */, F96D439408F272B7004A47F5 /* obj.test */, F93599C80DF1F81900E04F67 /* oo.test */, F96D439508F272B7004A47F5 /* opt.test */, @@ -1732,6 +1733,7 @@ F96D43BF08F272B7004A47F5 /* unixNotfy.test */, F96D43C008F272B7004A47F5 /* unknown.test */, F96D43C108F272B7004A47F5 /* unload.test */, + F91DC23D0E44C530002CB8D1 /* unsupported.test */, F96D43C208F272B7004A47F5 /* uplevel.test */, F96D43C308F272B7004A47F5 /* upvar.test */, F96D43C408F272B7004A47F5 /* utf.test */, diff --git a/tests/NRE.test b/tests/NRE.test deleted file mode 100644 index e69de29..0000000 -- cgit v0.12 From 245ab4ae255929317069b92446f66b83c901b8f8 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 3 Aug 2008 17:33:10 +0000 Subject: * generic/tclBasic.c: new unsupported command atProcExit * generic/tclCompile.h: that shares the implementation with * generic/tclExecute.c: tailcall. Fixed a segfault in * generic/tclInt.h: tailcalls. Tests added. * generic/tclInterp.c: * generic/tclNamesp.c: * tests/unsupported.test: --- generic/tclBasic.c | 69 ++++++------------ generic/tclCompile.h | 6 +- generic/tclExecute.c | 192 +++++++++++++++++++++++++++++++++++++------------ generic/tclInt.h | 9 ++- generic/tclInterp.c | 7 +- generic/tclNamesp.c | 8 +-- tests/unsupported.test | 168 ++++++++++++++++++++++++++++++++++++++++--- 7 files changed, 337 insertions(+), 122 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9509848..7c9da84 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.347 2008/08/01 17:07:47 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.348 2008/08/03 17:33:10 msofer Exp $ */ #include "tclInt.h" @@ -133,26 +133,7 @@ static Tcl_NRPostProc TEOEx_ByteCodeCallback; static Tcl_NRPostProc NRCommand; static Tcl_NRPostProc NRRunObjProc; -static Tcl_NRPostProc TailcallEval; -static Tcl_NRPostProc TailcallCleanup; - -#define NR_IS_COMMAND(callbackPtr) \ - (callbackPtr \ - && (callbackPtr->procPtr == NRCommand) \ - && (PTR2INT(callbackPtr->data[1]))) - -#define NR_CLEAR_COMMAND(interp) \ - { \ - TEOV_callback *callbackPtr = TOP_CB(interp); \ - \ - while (!NR_IS_COMMAND(callbackPtr)) { \ - callbackPtr = callbackPtr->nextPtr; \ - } \ - if (callbackPtr) { \ - callbackPtr->data[1] = INT2PTR(0); \ - }\ - } - +static Tcl_NRPostProc AtProcExitCleanup; /* * The following structure define the commands in the Tcl core. @@ -790,11 +771,13 @@ Tcl_CreateInterp(void) Tcl_DisassembleObjCmd, NULL, NULL); /* - * Create an unsupported command for tailcalls + * Create unsupported commands for atProcExit and tailcall */ + Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit", + /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(0), NULL); Tcl_NRCreateCommand(interp, "::tcl::unsupported::tailcall", - /*objProc*/ NULL, TclTailcallObjCmd, NULL, NULL); + /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(1), NULL); #ifdef USE_DTRACE /* @@ -4032,8 +4015,7 @@ TclNREvalObjv( * finishes the source command and not just the target. */ - TclNRAddCallback(interp, NRCommand, NULL, INT2PTR(1), - NULL, NULL); + TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); TclResetCancellation(interp, 0); @@ -4190,15 +4172,15 @@ TclNRRunCallbacks( if (tebcCall && (callbackPtr->procPtr == NRRunBytecode)) { return TCL_OK; - } else if (callbackPtr->procPtr == NRDoTailcall) { + } else if (callbackPtr->procPtr == NRAtProcExit) { if (tebcCall == 1) { return TCL_OK; } else if (tebcCall == 2) { Tcl_SetResult(interp, - "tailcall cannot be invoked recursively", TCL_STATIC); + "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); } else { Tcl_SetResult(interp, - "tailcall can only be called from a proc or lambda", TCL_STATIC); + "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); } TOP_CB(interp) = callbackPtr->nextPtr; result = TCL_ERROR; @@ -4289,7 +4271,7 @@ NRRunBytecode( } int -NRDoTailcall( +NRAtProcExit( ClientData data[], Tcl_Interp *interp, int result) @@ -7827,12 +7809,6 @@ Tcl_NREvalObjv( return TclNREvalObjv(interp, objc, objv, flags, NULL); } -void -TclNRClearCommandFlag( - Tcl_Interp *interp) -{ - NR_CLEAR_COMMAND(interp); -} int Tcl_NRCmdSwap( @@ -7842,11 +7818,7 @@ Tcl_NRCmdSwap( Tcl_Obj *const objv[], int flags) { - int result; - - result = TclNREvalObjv(interp, objc, objv, flags, (Command *)cmd); - NR_CLEAR_COMMAND(interp); - return result; + return TclNREvalObjv(interp, objc, objv, flags, (Command *)cmd); } /***************************************************************************** @@ -7874,7 +7846,7 @@ Tcl_NRCmdSwap( */ int -TclTailcallObjCmd( +TclNRAtProcExitObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, @@ -7886,12 +7858,13 @@ TclTailcallObjCmd( if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); + return TCL_ERROR; } if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ Tcl_SetResult(interp, - "tailcall can only be called from a proc or lambda", TCL_STATIC); + "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; } @@ -7905,14 +7878,14 @@ TclTailcallObjCmd( * proper place. */ - TclNRAddCallback(interp, TailcallEval, listPtr, nsPtr, NULL, NULL); - TclNRAddCallback(interp, NRDoTailcall, NULL, NULL, NULL, NULL); + TclNRAddCallback(interp, NRAtProcExitEval, listPtr, nsPtr, NULL, NULL); + TclNRAddCallback(interp, NRAtProcExit, clientData, NULL, NULL, NULL); return TCL_OK; } -static int -TailcallEval( +int +NRAtProcExitEval( ClientData data[], Tcl_Interp *interp, int result) @@ -7923,7 +7896,7 @@ TailcallEval( int objc; Tcl_Obj **objv; - TclNRAddCallback(interp, TailcallCleanup, listPtr, NULL, NULL, NULL); + TclNRAddCallback(interp, AtProcExitCleanup, listPtr, NULL, NULL, NULL); if (result == TCL_OK) { iPtr->lookupNsPtr = nsPtr; ListObjGetElements(listPtr, objc, objv); @@ -7944,7 +7917,7 @@ TailcallEval( } static int -TailcallCleanup( +AtProcExitCleanup( ClientData data[], Tcl_Interp *interp, int result) diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 8d1db2c..14d3880 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.98 2008/07/31 00:43:09 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.99 2008/08/03 17:33:10 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -838,7 +838,9 @@ typedef struct { */ MODULE_SCOPE Tcl_NRPostProc NRRunBytecode; -MODULE_SCOPE Tcl_NRPostProc NRDoTailcall; +MODULE_SCOPE Tcl_NRPostProc NRAtProcExit; +MODULE_SCOPE Tcl_NRPostProc NRAtProcExitEval; + /* *---------------------------------------------------------------- diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0645d53..3f8f4a7 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.393 2008/07/31 14:43:44 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.394 2008/08/03 17:33:10 msofer Exp $ */ #include "tclInt.h" @@ -178,6 +178,8 @@ typedef struct BottomData { ByteCode *codePtr; /* These fields remain constant until it */ CmdFrame *cmdFramePtr; /* returns. */ /* ------------------------------------------*/ + TEOV_callback *atExitPtr; /* This field is used on return FROM here */ + /* ------------------------------------------*/ unsigned char *pc; /* These fields are used on return TO this */ ptrdiff_t *catchTop; /* this level: they record the state when a */ int cleanup; /* new codePtr was received for NR execution */ @@ -186,9 +188,10 @@ typedef struct BottomData { #define NR_DATA_INIT() \ bottomPtr->prevBottomPtr = oldBottomPtr; \ - bottomPtr->rootPtr = TOP_CB(iPtr); \ - bottomPtr->codePtr = codePtr; \ - bottomPtr->cmdFramePtr = iPtr->cmdFramePtr + bottomPtr->rootPtr = TOP_CB(iPtr); \ + bottomPtr->codePtr = codePtr; \ + bottomPtr->cmdFramePtr = iPtr->cmdFramePtr; \ + bottomPtr->atExitPtr = NULL #define NR_DATA_BURY() \ bottomPtr->pc = pc; \ @@ -207,6 +210,8 @@ typedef struct BottomData { tosPtr = esPtr->tosPtr; \ iPtr->cmdFramePtr = bottomPtr->cmdFramePtr; +static Tcl_NRPostProc NRRestoreInterpState; + #define PUSH_AUX_OBJ(objPtr) \ objPtr->internalRep.twoPtrValue.ptr2 = auxObjList; \ auxObjList = objPtr @@ -1707,6 +1712,22 @@ TclIncrObj( *---------------------------------------------------------------------- */ +static int +NRRestoreInterpState( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + /* FIXME + * Save the current state somewhere for instrospection of what happened in + * the atExit handlers? + */ + + Tcl_InterpState state = data[0]; + + return Tcl_RestoreInterpState(interp, state); +} + int TclExecuteByteCode( Tcl_Interp *interp, /* Token for command interpreter. */ @@ -1804,6 +1825,8 @@ TclExecuteByteCode( */ int nested = 0; + TEOV_callback *atExitPtr = NULL; + int isTailcall = 0; nonRecursiveCallStart: if (nested) { @@ -1811,12 +1834,15 @@ TclExecuteByteCode( Tcl_NRPostProc *procPtr = callbackPtr->procPtr; ByteCode *newCodePtr = callbackPtr->data[0]; + isTailcall = PTR2INT(callbackPtr->data[0]); + NRE_ASSERT(result==TCL_OK); NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); TOP_CB(interp) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); + NR_DATA_BURY(); if (procPtr == NRRunBytecode) { /* * A request to run a bytecode: record this level's state @@ -1825,49 +1851,58 @@ TclExecuteByteCode( NR_DATA_BURY(); codePtr = newCodePtr; - } else if (procPtr == NRDoTailcall) { + } else if (procPtr == NRAtProcExit) { /* - * A request to perform a tailcall: schedule the tailcall callback - * at its proper place, then just drop the present bytecode. + * A request to perform a command at exit: schedule the command at + * its proper place, then continue or just drop the present bytecode if + * this is a tailcall. */ - TEOV_callback *tailcallPtr = TOP_CB(interp); - TEOV_callback *tmpPtr = tailcallPtr; - - if (catchTop != initCatchTop) { - /* FIXME!! If we catch it, the tailcall callback is still in - * and will be run when we return! Should we fish it out? */ + TEOV_callback *newPtr = TOP_CB(interp); - result = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", - TCL_STATIC); - goto checkForCatch; - } + TOP_CB(interp) = newPtr->nextPtr; - TOP_CB(interp) = tailcallPtr->nextPtr; + if (!isTailcall) { #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall: request received\n"); - } -#endif - if (bottomPtr->prevBottomPtr) { - while (tmpPtr->nextPtr != bottomPtr->prevBottomPtr->rootPtr) { - tmpPtr = tmpPtr->nextPtr; + if (traceInstructions) { + fprintf(stdout, " atProcExit request received\n"); } - tailcallPtr->nextPtr = tmpPtr->nextPtr; - tmpPtr->nextPtr = tailcallPtr; - goto abnormalReturn; /* drop a level */ +#endif + newPtr->nextPtr = bottomPtr->atExitPtr; + bottomPtr->atExitPtr = newPtr; + goto nonRecursiveCallReturn; } else { - /* - * This will fall off TEBC; how do we know where to put it? It - * should be after all cleanup of the current command is done, - * but we do not know where that is. - */ - - Tcl_SetResult(interp, - "tailcall would fall off tebc!", TCL_STATIC); - result = TCL_ERROR; - goto checkForCatch; + +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " Tailcall request received\n"); + } +#endif + if (catchTop != initCatchTop) { + isTailcall = 0; + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + goto checkForCatch; + } + + newPtr->nextPtr = NULL; + if (!bottomPtr->atExitPtr) { + newPtr->nextPtr = NULL; + bottomPtr->atExitPtr = newPtr; + } else { + /* + * There are already atExit callbacks: run last. + */ + + TEOV_callback *tmpPtr = bottomPtr->atExitPtr; + + while (tmpPtr->nextPtr) { + tmpPtr = tmpPtr->nextPtr; + } + tmpPtr->nextPtr = newPtr; + } + goto abnormalReturn; } } else { Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (1)"); @@ -7677,6 +7712,7 @@ TclExecuteByteCode( TclArgumentBCRelease((Tcl_Interp*) iPtr,codePtr); oldBottomPtr = bottomPtr->prevBottomPtr; + atExitPtr = bottomPtr->atExitPtr; TclStackFree(interp, bottomPtr); /* free my stack */ if (--codePtr->refCount <= 0) { @@ -7685,19 +7721,53 @@ TclExecuteByteCode( if (oldBottomPtr) { /* - * Restore the state to what it was previous to this bytecode. + * Restore the state to what it was previous to this bytecode, deal + * with atExit handlers and tailcalls. */ - bottomPtr = oldBottomPtr; /* back to old bc */ + bottomPtr = oldBottomPtr; /* back to old bc */ + + rerunCallbacks: result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 2); NR_DATA_DIG(); DECACHE_STACK_INFO(); if (TOP_CB(interp) == bottomPtr->rootPtr) { /* - * The bytecode is returning, all callbacks were run. Remove the - * caller's arguments and keep processing the caller. + * The bytecode is returning, all callbacks were run. Run atExit + * handlers, remove the caller's arguments and keep processing the + * caller. */ + + if (atExitPtr) { + /* + * Find the last one + */ + + TEOV_callback *lastPtr = atExitPtr; + while (lastPtr->nextPtr) { + lastPtr = lastPtr->nextPtr; + } + NRE_ASSERT(lastPtr->nextPtr == NULL); + if (!isTailcall) { + /* save the interp state, arrange for restoring it after + running the callbacks.*/ + + TclNRAddCallback(interp, NRRestoreInterpState, + Tcl_SaveInterpState(interp, result), NULL, + NULL, NULL); + } + + /* + * splice in the atExit callbacks and rerun all callbacks + */ + + lastPtr->nextPtr = TOP_CB(interp); + TOP_CB(interp) = atExitPtr; + isTailcall = 0; + atExitPtr = NULL; + goto rerunCallbacks; + } while (cleanup--) { Tcl_Obj *objPtr = POP_OBJECT(); @@ -7706,15 +7776,45 @@ TclExecuteByteCode( goto nonRecursiveCallReturn; } else if (TOP_CB(interp)->procPtr == NRRunBytecode) { /* - * One of the callbacks requested a new execution: a tailcall! - * Start the new bytecode. - */ + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. + */ NRE_ASSERT(result == TCL_OK); goto nonRecursiveCallStart; } Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (2)"); } + + + if (atExitPtr) { + /* + * Find the last one + */ + + TEOV_callback *lastPtr = atExitPtr; + while (lastPtr->nextPtr) { + lastPtr = lastPtr->nextPtr; + } + NRE_ASSERT(lastPtr->nextPtr == NULL); + if (!isTailcall) { + /* save the interp state, arrange for restoring it after + running the callbacks.*/ + + Tcl_InterpState state = Tcl_SaveInterpState(interp, result); + + TclNRAddCallback(interp, NRRestoreInterpState, state, NULL, + NULL, NULL); + } + + /* + * splice in the atExit callbacks and rerun all callbacks + */ + + lastPtr->nextPtr = TOP_CB(interp); + TOP_CB(interp) = atExitPtr; + } + return result; } #undef iPtr diff --git a/generic/tclInt.h b/generic/tclInt.h index 31114e9..ecd0300 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.386 2008/07/31 20:01:40 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.387 2008/08/03 17:33:10 msofer Exp $ */ #ifndef _TCLINT @@ -2029,7 +2029,7 @@ typedef struct InterpList { * other than these should be turned into errors. */ -#define TCL_ALLOW_EXCEPTIONS 4 +#define TCL_ALLOW_EXCEPTIONS 4 #define TCL_EVAL_FILE 2 #define TCL_EVAL_CTX 8 @@ -2534,13 +2534,12 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; -MODULE_SCOPE Tcl_ObjCmdProc TclTailcallObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRAtProcExitObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclAtProcExitObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); -MODULE_SCOPE void TclNRClearCommandFlag(Tcl_Interp *interp); - MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); MODULE_SCOPE void TclArgumentEnter(Tcl_Interp* interp, diff --git a/generic/tclInterp.c b/generic/tclInterp.c index daa705b..4f15134 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.95 2008/07/31 14:43:46 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.96 2008/08/03 17:33:12 msofer Exp $ */ #include "tclInt.h" @@ -1762,7 +1762,6 @@ AliasNRCmd( Tcl_Obj *listPtr; List *listRep; int flags = TCL_EVAL_INVOKE; - int result; /* * Append the arguments to the command prefix and invoke the command in @@ -1808,9 +1807,7 @@ AliasNRCmd( if (isRootEnsemble) { TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } - result = Tcl_NREvalObj(interp, listPtr, flags); - TclNRClearCommandFlag(interp); - return result; + return Tcl_NREvalObj(interp, listPtr, flags); } static int diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index bad1fc7..c9f022d 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.173 2008/07/31 14:43:47 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.174 2008/08/03 17:33:12 msofer Exp $ */ #include "tclInt.h" @@ -6224,7 +6224,7 @@ NsEnsembleImplementationCmdNR( * target command prefix. */ Tcl_Obj *copyPtr; /* The actual list of words to dispatch to. * Will be freed by the dispatch engine. */ - int prefixObjc, copyObjc, result; + int prefixObjc, copyObjc; Interp *iPtr = (Interp *) interp; /* @@ -6285,9 +6285,7 @@ NsEnsembleImplementationCmdNR( * Hand off to the target command. */ - result = Tcl_NREvalObj(interp, copyPtr, TCL_EVAL_INVOKE); - TclNRClearCommandFlag(interp); - return result; + return Tcl_NREvalObj(interp, copyPtr, TCL_EVAL_INVOKE); } unknownOrAmbiguousSubcommand: diff --git a/tests/unsupported.test b/tests/unsupported.test index 7d09558..fc64e01 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.1 2008/08/02 14:12:56 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.2 2008/08/03 17:33:13 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -17,6 +17,18 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testnrelevels [llength [info commands testnrelevels]] +testConstraint atProcExit [llength [info commands ::tcl::unsupported::atProcExit]] +testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] + +if {[testConstraint atProcExit]} { + namespace eval tcl::unsupported namespace export atProcExit + namespace import tcl::unsupported::atProcExit +} + +if {[testConstraint tailcall]} { + namespace eval tcl::unsupported namespace export tailcall + namespace import tcl::unsupported::tailcall +} # # The tests that risked blowing the C stack on failure have been removed: we @@ -62,15 +74,119 @@ if {[testConstraint testnrelevels]} { } # -# Test tailcalls +# Test atProcExit # -testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] +test unsupported-A.1 {atProcExit works} -constraints {atProcExit} -setup { + variable x x y y + proc a {} { + variable x 0 y 0 + atProcExit set ::x 1 + set x 2 + set y $x + set x 3 + } + proc b {} a +} -body { + list [b] $x $y +} -cleanup { + unset x y + rename a {} + rename b {} +} -result {3 1 2} -if {[testConstraint tailcall]} { - namespace eval tcl::unsupported namespace export tailcall - namespace import tcl::unsupported::tailcall -} +test unsupported-A.2 {atProcExit} -constraints {atProcExit} -setup { + variable x x y x + proc a {} { + variable x 0 y 0 + atProcExit set ::x 1 + set x 2 + set y $x + set x 3 + } +} -body { + list [a] $x $y +} -cleanup { + unset x y + rename a {} +} -result {3 1 2} + +test unsupported-A.3 {atProcExit} -constraints {atProcExit} -setup { + variable x x y y + proc a {} { + variable x 0 y 0 + atProcExit lappend ::x 1 + lappend x 2 + atProcExit lappend ::x 3 + lappend y $x + lappend x 4 + return 5 + } +} -body { + list [a] $x $y +} -cleanup { + unset x y + rename a {} +} -result {5 {0 2 4 3 1} {0 {0 2}}} + +test unsupported-A.4 {atProcExit errors} -constraints {atProcExit} -setup { + variable x x y y + proc a {} { + variable x 0 y 0 + atProcExit lappend ::x 1 + lappend x 2 + atProcExit lappend ::x 3 + lappend y $x + lappend x 4 + error foo + } +} -body { + list [a] $x $y +} -cleanup { + unset x y + rename a {} +} -returnCodes error -result foo + +test unsupported-A.5 {atProcExit errors} -constraints {atProcExit} -setup { + variable x x y y + proc a {} { + variable x 0 y 0 + atProcExit error foo + lappend x 2 + atProcExit lappend ::x 3 + lappend y $x + lappend x 4 + return 5 + } +} -body { + list [a] $x $y +} -cleanup { + unset x y + rename a {} +} -result {5 {0 2 4 3} {0 {0 2}}} + +test unsupported-A.6 {atProcExit errors} -constraints {atProcExit} -setup { + variable x x y y + proc a {} { + variable x 0 y 0 + atProcExit lappend ::x 1 + lappend x 2 + atProcExit error foo + lappend y $x + lappend x 4 + return 5 + } +} -body { + list [a] $x $y +} -cleanup { + unset x y + rename a {} +} -result {5 {0 2 4} {0 {0 2}}} + + +# +# Test tailcalls +# test unsupported-T.0 {tailcall is constant space} -constraints {tailcall} -setup { proc a i { @@ -117,8 +233,8 @@ test unsupported-T.1 {tailcall} -constraints {tailcall} -body { test unsupported-T.2 {tailcall in non-proc} -constraints {tailcall} -body { - list [catch {namespace eval a [list tailcall set x 1]} msg] $msg -} -result {1 {tailcall can only be called from a proc or lambda}} + namespace eval a [list tailcall set x 1] +} -match glob -result *tailcall* -returnCodes error test unsupported-T.3 {tailcall falls off tebc} -constraints {tailcall} -body { unset -nocomplain x @@ -233,12 +349,42 @@ test unsupported-T.9 {tailcall factorial} -constraints {tailcall} -setup { } -result {1 120 3628800 1307674368000} +# +# Test both together +# + +test unsupported-AT.1 {atProcExit and tailcall} -constraints { + atProcExit tailcall +} -setup { + variable x x y y + proc a {} { + variable x 0 y 0 + atProcExit lappend ::x 1 + lappend x 2 + atProcExit lappend ::x 3 + tailcall lappend ::x 6 + lappend y $x + lappend x 4 + return 5 + } +} -body { + list [a] $x $y +} -cleanup { + unset x y + rename a {} +} -result {{0 2 3 1 6} {0 2 3 1 6} 0} + + +# cleanup +::tcltest::cleanupTests + if {[testConstraint tailcall]} { namespace forget tcl::unsupported::tailcall } -# cleanup -::tcltest::cleanupTests +if {[testConstraint atProcExit]} { + namespace forget tcl::unsupported::atProcExit +} if {[testConstraint testnrelevels]} { namespace forget testnre::* -- cgit v0.12 From 811623f8834badd39fce32d94399cc592b178d90 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 3 Aug 2008 17:33:53 +0000 Subject: ChangeLog entry --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 39eafc8..a37f982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-08-03 Miguel Sofer + + * generic/tclBasic.c: new unsupported command atProcExit + * generic/tclCompile.h: that shares the implementation with + * generic/tclExecute.c: tailcall. Fixed a segfault in + * generic/tclInt.h: tailcalls. Tests added. + * generic/tclInterp.c: + * generic/tclNamesp.c: + * tests/unsupported.test: + 2008-08-02 Miguel Sofer * tests/NRE.test (removed): migrated tests to standard locations, -- cgit v0.12 From b1dde98c17cc47bfc3015d91395cbdabcd939d86 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 3 Aug 2008 17:49:09 +0000 Subject: remove unneeded declaration --- generic/tclInt.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index ecd0300..a7991ab 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.387 2008/08/03 17:33:10 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.388 2008/08/03 17:49:09 msofer Exp $ */ #ifndef _TCLINT @@ -2535,7 +2535,6 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; MODULE_SCOPE Tcl_ObjCmdProc TclNRAtProcExitObjCmd; -MODULE_SCOPE Tcl_ObjCmdProc TclAtProcExitObjCmd; MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); -- cgit v0.12 From 7d4f17d0447b1a63cf5c5a22a4d5e601c2221626 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 3 Aug 2008 18:00:46 +0000 Subject: made function static --- generic/tclBasic.c | 3 ++- generic/tclCompile.h | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7c9da84..98d2944 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.348 2008/08/03 17:33:10 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.349 2008/08/03 18:00:46 msofer Exp $ */ #include "tclInt.h" @@ -134,6 +134,7 @@ static Tcl_NRPostProc NRCommand; static Tcl_NRPostProc NRRunObjProc; static Tcl_NRPostProc AtProcExitCleanup; +static Tcl_NRPostProc NRAtProcExitEval; /* * The following structure define the commands in the Tcl core. diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 14d3880..68e6afe 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.99 2008/08/03 17:33:10 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.100 2008/08/03 18:00:49 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -839,8 +839,6 @@ typedef struct { MODULE_SCOPE Tcl_NRPostProc NRRunBytecode; MODULE_SCOPE Tcl_NRPostProc NRAtProcExit; -MODULE_SCOPE Tcl_NRPostProc NRAtProcExitEval; - /* *---------------------------------------------------------------- -- cgit v0.12 From 7afb51929c36eb56d586471d1411586a7f3c2a6e Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 4 Aug 2008 04:49:23 +0000 Subject: * generic/tclExecute.c: Stopped faulty double-logging of errors to * tests/execute.test: stack trace when a compile epoch bump triggers fallback to direct evaluation of commands in a compiled script. [Bug 2037338] --- ChangeLog | 7 +++++++ generic/tclExecute.c | 12 +++++++++++- tests/execute.test | 23 ++++++++++++++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a37f982..2730b57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-04 Don Porter S + + * generic/tclExecute.c: Stopped faulty double-logging of errors to + * tests/execute.test: stack trace when a compile epoch bump triggers + fallback to direct evaluation of commands in a compiled script. + [Bug 2037338] + 2008-08-03 Miguel Sofer * generic/tclBasic.c: new unsupported command atProcExit diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3f8f4a7..360525e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.394 2008/08/03 17:33:10 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.395 2008/08/04 04:49:24 dgp Exp $ */ #include "tclInt.h" @@ -2294,6 +2294,16 @@ TclExecuteByteCode( CACHE_STACK_INFO(); if (result != TCL_OK) { cleanup = 0; + if (result == TCL_ERROR) { + /* + * Tcl_EvalEx already did the task of logging + * the error to the stack trace for us, so set + * a flag to prevent the TEBC exception handling + * machinery from trying to do it again. + * Tcl Bug 2037338. See test execute-8.4. + */ + iPtr->flags |= ERR_ALREADY_LOGGED; + } goto processExceptionReturn; } opnd = TclGetUInt4AtPtr(pc+1); diff --git a/tests/execute.test b/tests/execute.test index a43e8e6..6c34dc1 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.27 2008/03/07 19:04:10 dgp Exp $ +# RCS: @(#) $Id: execute.test,v 1.28 2008/08/04 04:49:24 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -937,6 +937,27 @@ test execute-8.3 {Stack restoration} -body { interp recursionlimit {} $limit } -result {too many nested evaluations (infinite loop?)} +test execute-8.4 {Compile epoch bump effect on stack trace} -setup { + proc foo {} { + error bar + } + proc FOO {} { + catch {error bar} m o + rename ::set ::dummy + rename ::dummy ::set + return -options $o $m + } +} -body { + catch foo m o + set stack1 [dict get $o -errorinfo] + catch FOO m o + set stack2 [string map {FOO foo} [dict get $o -errorinfo]] + expr {$stack1 eq $stack2 ? {} : "These differ:\n$stack1\n$stack2"} +} -cleanup { + rename foo {} + rename FOO {} +} -result {} + test execute-9.1 {Interp result resetting [Bug 1522803]} { set c 0 catch { -- cgit v0.12 From 43e81520e0e2ad0155c836147ceff63c3c7a3855 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 4 Aug 2008 13:43:38 +0000 Subject: * generic/tclBasic.c: made atProcExit commands run * generic/tclCompile.h: inconditionally, streamlined * generic/tclExecute.c: atProcExit/tailcall processing * generic/tclProc.c: in TEBC. * tests/unsupported.test: --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2730b57..feccf40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-04 Miguel Sofer + + * generic/tclBasic.c: made atProcExit commands run + * generic/tclCompile.h: inconditionally, streamlined + * generic/tclExecute.c: atProcExit/tailcall processing + * generic/tclProc.c: in TEBC. + * tests/unsupported.test: + 2008-08-04 Don Porter S * generic/tclExecute.c: Stopped faulty double-logging of errors to -- cgit v0.12 From 9f1ea1f4ceab1ae51bae4e6db3ed9c65375ce8f5 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 4 Aug 2008 14:09:28 +0000 Subject: duh ... committed only the ChangeLog entry, not the rest --- generic/tclBasic.c | 71 ++++++++++++++++++++++------------------------------ generic/tclCompile.h | 8 +++--- generic/tclExecute.c | 60 ++++++++++++++++++++++++++++---------------- generic/tclProc.c | 5 ++-- 4 files changed, 77 insertions(+), 67 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 98d2944..4a4c240 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.349 2008/08/03 18:00:46 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.350 2008/08/04 14:09:28 msofer Exp $ */ #include "tclInt.h" @@ -4152,7 +4152,8 @@ TclNRRunCallbacks( * returns. */ { Interp *iPtr = (Interp *) interp; - TEOV_callback *callbackPtr = TOP_CB(interp); + TEOV_callback *callbackPtr; + Tcl_NRPostProc *procPtr; /* * If the interpreter has a non-empty string result, the result object is @@ -4170,23 +4171,11 @@ TclNRRunCallbacks( while (TOP_CB(interp) != rootPtr) { callbackPtr = TOP_CB(interp); + procPtr = callbackPtr->procPtr; - if (tebcCall && (callbackPtr->procPtr == NRRunBytecode)) { - return TCL_OK; - } else if (callbackPtr->procPtr == NRAtProcExit) { - if (tebcCall == 1) { - return TCL_OK; - } else if (tebcCall == 2) { - Tcl_SetResult(interp, - "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); - } else { - Tcl_SetResult(interp, - "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); - } - TOP_CB(interp) = callbackPtr->nextPtr; - result = TCL_ERROR; - TCLNR_FREE(interp, callbackPtr); - continue; + if (tebcCall && (procPtr == NRCallTEBC)) { + NRE_ASSERT(result==TCL_OK); + return TCL_OK; } /* @@ -4199,7 +4188,7 @@ TclNRRunCallbacks( */ TOP_CB(interp) = callbackPtr->nextPtr; - result = callbackPtr->procPtr(callbackPtr->data, interp, result); + result = (procPtr)(callbackPtr->data, interp, result); TCLNR_FREE(interp, callbackPtr); } return result; @@ -4258,31 +4247,29 @@ NRRunObjProc( } int -NRRunBytecode( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - ByteCode *codePtr = data[0]; - - if (result == TCL_OK) { - return TclExecuteByteCode(interp, codePtr); - } - return result; -} - -int -NRAtProcExit( +NRCallTEBC( ClientData data[], Tcl_Interp *interp, int result) { - /* For tailcalls! - * drop all callbacks until the last command start: nothing to do here, - * just need this to be able to pass it up to tebc. + /* + * This is not run normally, the callback is passed up to tebc. This + function is only called when no tebc is above. */ - - return result; + int type = PTR2INT(data[0]); + + switch (type) { + case TCL_NR_BC_TYPE: + return TclExecuteByteCode(interp, data[1]); + case TCL_NR_ATEXIT_TYPE: + /* For atProcExit and tailcalls */ + Tcl_SetResult(interp, + "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); + return TCL_ERROR; + default: + Tcl_Panic("unknown call type to TEBC"); + } + return result; /* not reached */ } /* @@ -5771,7 +5758,8 @@ TclNREvalObjEx( TclNRAddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, objPtr, INT2PTR(allowExceptions), NULL); - TclNRAddCallback(interp, NRRunBytecode, codePtr, NULL, NULL, NULL); + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), codePtr, + NULL, NULL); return TCL_OK; } @@ -7880,7 +7868,8 @@ TclNRAtProcExitObjCmd( */ TclNRAddCallback(interp, NRAtProcExitEval, listPtr, nsPtr, NULL, NULL); - TclNRAddCallback(interp, NRAtProcExit, clientData, NULL, NULL, NULL); + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_ATEXIT_TYPE), clientData, + NULL, NULL); return TCL_OK; } diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 68e6afe..1653ea5 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.100 2008/08/03 18:00:49 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.101 2008/08/04 14:09:31 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -837,8 +837,10 @@ typedef struct { *---------------------------------------------------------------- */ -MODULE_SCOPE Tcl_NRPostProc NRRunBytecode; -MODULE_SCOPE Tcl_NRPostProc NRAtProcExit; +MODULE_SCOPE Tcl_NRPostProc NRCallTEBC; + +#define TCL_NR_BC_TYPE 0 +#define TCL_NR_ATEXIT_TYPE 1 /* *---------------------------------------------------------------- diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 360525e..0c77b9e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.395 2008/08/04 04:49:24 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.396 2008/08/04 14:09:31 msofer Exp $ */ #include "tclInt.h" @@ -1831,27 +1831,27 @@ TclExecuteByteCode( nonRecursiveCallStart: if (nested) { TEOV_callback *callbackPtr = TOP_CB(interp); - Tcl_NRPostProc *procPtr = callbackPtr->procPtr; - ByteCode *newCodePtr = callbackPtr->data[0]; - - isTailcall = PTR2INT(callbackPtr->data[0]); + int type = PTR2INT(callbackPtr->data[0]); + ClientData param = callbackPtr->data[1]; NRE_ASSERT(result==TCL_OK); NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); - + NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); + TOP_CB(interp) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); NR_DATA_BURY(); - if (procPtr == NRRunBytecode) { + + if (type == TCL_NR_BC_TYPE) { /* * A request to run a bytecode: record this level's state * variables, swap codePtr and start running the new one. */ NR_DATA_BURY(); - codePtr = newCodePtr; - } else if (procPtr == NRAtProcExit) { + codePtr = param; + } else if (type == TCL_NR_ATEXIT_TYPE) { /* * A request to perform a command at exit: schedule the command at * its proper place, then continue or just drop the present bytecode if @@ -1862,6 +1862,7 @@ TclExecuteByteCode( TOP_CB(interp) = newPtr->nextPtr; + isTailcall = PTR2INT(param); if (!isTailcall) { #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { @@ -1905,7 +1906,7 @@ TclExecuteByteCode( goto abnormalReturn; } } else { - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (1)"); + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } nested = 1; @@ -2570,7 +2571,8 @@ TclExecuteByteCode( CACHE_STACK_INFO(); cleanup = 1; pc++; - Tcl_NRAddCallback(interp, NRRunBytecode, newCodePtr, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), newCodePtr, + NULL, NULL); goto nonRecursiveCallStart; } @@ -2628,7 +2630,8 @@ TclExecuteByteCode( bcFramePtr->data.tebc.pc = (char *) pc; iPtr->cmdFramePtr = bcFramePtr; pc++; - Tcl_NRAddCallback(interp, NRRunBytecode, newCodePtr, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), newCodePtr, + NULL, NULL); goto nonRecursiveCallStart; } @@ -7738,7 +7741,7 @@ TclExecuteByteCode( bottomPtr = oldBottomPtr; /* back to old bc */ rerunCallbacks: - result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 2); + result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); NR_DATA_DIG(); DECACHE_STACK_INFO(); @@ -7784,16 +7787,31 @@ TclExecuteByteCode( Tcl_DecrRefCount(objPtr); } goto nonRecursiveCallReturn; - } else if (TOP_CB(interp)->procPtr == NRRunBytecode) { - /* - * One of the callbacks requested a new execution: a tailcall! - * Start the new bytecode. - */ - + } else { + TEOV_callback *callbackPtr = TOP_CB(iPtr); + int type = PTR2INT(callbackPtr->data[0]); + + NRE_ASSERT(TOP_CB(interp)->procPtr == NRCallTEBC); NRE_ASSERT(result == TCL_OK); - goto nonRecursiveCallStart; + + if (type == TCL_NR_BC_TYPE) { + /* + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. + */ + + goto nonRecursiveCallStart; + } else if (type == TCL_NR_ATEXIT_TYPE) { + TOP_CB(iPtr) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); + + Tcl_SetResult(interp, + "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); + result = TCL_ERROR; + goto rerunCallbacks; + } } - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle! (2)"); + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } diff --git a/generic/tclProc.c b/generic/tclProc.c index 0cc9ae4..1fe9b39 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.154 2008/07/31 14:43:47 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.155 2008/08/04 14:09:32 msofer Exp $ */ #include "tclInt.h" @@ -1772,7 +1772,8 @@ TclNRInterpProcCore( TclNRAddCallback(interp, InterpProcNR2, procNameObj, errorProc, NULL, NULL); - TclNRAddCallback(interp, NRRunBytecode, codePtr, NULL, NULL, NULL); + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), codePtr, + NULL, NULL); return TCL_OK; } -- cgit v0.12 From d0175ffdeb40da28f971392eecbb97ac221d776f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 4 Aug 2008 14:59:53 +0000 Subject: missing commit to tests/unsupported.test --- tests/unsupported.test | 52 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/tests/unsupported.test b/tests/unsupported.test index fc64e01..c043ae2 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.2 2008/08/03 17:33:13 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.3 2008/08/04 14:59:53 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -183,6 +183,35 @@ test unsupported-A.6 {atProcExit errors} -constraints {atProcExit} -setup { rename a {} } -result {5 {0 2 4} {0 {0 2}}} +test unsupported-A.7 {atProcExit non-proc} -constraints {atProcExit} -body { + atProcExit set x 2 + set x 1 +} -cleanup { + unset -nocomplain x +} -match glob -result *atProcExit* -returnCodes error + +test unsupported-A.8 {atProcExit and eval} -constraints {knownbug atProcExit} -setup { + proc a {} { + eval atProcExit lappend ::x 2 + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -result {1 2} + +test unsupported-A9 {atProcExit and uplevel} -constraints {knownbug atProcExit} -setup { + proc a {} { + uplevel 1 [list atProcExit set ::x 2] + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -result {1 2} + # # Test tailcalls @@ -348,6 +377,27 @@ test unsupported-T.9 {tailcall factorial} -constraints {tailcall} -setup { rename fact {} } -result {1 120 3628800 1307674368000} +test unsupported-T.10 {tailcall and eval} -constraints {knownbug atProcExit} -setup { + proc a {} { + eval [list tailcall lappend ::x 2] + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -result {1 2} + +test unsupported-T.11 {tailcall and uplevel} -constraints {knownbug atProcExit} -setup { + proc a {} { + uplevel 1 [list tailcall set ::x 2] + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -result {1 2} # # Test both together -- cgit v0.12 From f78f8e7da883b378770d2136210a8e22ffc3791e Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 4 Aug 2008 15:32:38 +0000 Subject: * tests/nre.test: added tests for [if], [while] and [for]. A test for [foreach] has been added and marked as knownbug, awaiting for it to be NR-enabled. --- ChangeLog | 4 ++++ tests/nre.test | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index feccf40..265d556 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-08-04 Miguel Sofer + * tests/nre.test: added tests for [if], [while] and [for]. A test + for [foreach] has been added and marked as knownbug, awaiting for + it to be NR-enabled. + * generic/tclBasic.c: made atProcExit commands run * generic/tclCompile.h: inconditionally, streamlined * generic/tclExecute.c: atProcExit/tailcall processing diff --git a/tests/nre.test b/tests/nre.test index c926de5..28861de 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.1 2008/08/02 14:12:56 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.2 2008/08/04 15:32:40 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -190,9 +190,52 @@ test nre-7.1 {[catch] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset x abs + unset abs } -result {{0 3 3 0} 0} +test nre-7.2 {[if] is not recursive} -setup { + setabs + proc a i [makebody {uplevel 1 "if 1 {a $i}"}] +} -body { + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 0} 0} + +test nre-7.3 {[while] is not recursive} -setup { + setabs + proc a i [makebody {uplevel 1 "while 1 {set res \[a $i\]; break}; set res"}] +} -body { + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 0} 0} + +test nre-7.4 {[for] is not recursive} -setup { + setabs + proc a i [makebody {uplevel 1 "for {set j 0} {\$j < 10} {incr j} {set res \[a $i\]; break}; set res"}] +} -body { + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 0} 0} + +test nre-7.5 {[foreach] is not recursive} -constraints {knownbug} -setup { + # + # Enable once [foreach] is NR-enabled + # + setabs + proc a i [makebody {uplevel 1 "foreach j {1 2 3 4 5 6} {set res \[a $i\]; break}; set res"}] +} -body { + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 0} 0} + # # Basic TclOO tests # -- cgit v0.12 From 904ad53bcc04a8e011a2e168389dbe29cd52fbcb Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 4 Aug 2008 18:32:29 +0000 Subject: fix "bad stack top" bug in last commit --- generic/tclExecute.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0c77b9e..5d33e3c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.396 2008/08/04 14:09:31 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.397 2008/08/04 18:32:29 msofer Exp $ */ #include "tclInt.h" @@ -1871,6 +1871,10 @@ TclExecuteByteCode( #endif newPtr->nextPtr = bottomPtr->atExitPtr; bottomPtr->atExitPtr = newPtr; + while (cleanup--) { + Tcl_Obj *objPtr = POP_OBJECT(); + Tcl_DecrRefCount(objPtr); + } goto nonRecursiveCallReturn; } else { -- cgit v0.12 From 163c13b1f004afa81c6aaa1fdc93a95ca319cebd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 5 Aug 2008 15:52:23 +0000 Subject: * generic/tclExecute.c: Fix for [Bug 2038069] by dgp. * tests/execute.test: --- generic/tclExecute.c | 5 +++-- tests/execute.test | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5d33e3c..87695ba 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.397 2008/08/04 18:32:29 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.398 2008/08/05 15:52:23 msofer Exp $ */ #include "tclInt.h" @@ -2712,7 +2712,8 @@ TclExecuteByteCode( DECACHE_STACK_INFO(); - result = TclNREvalObjv(interp, objc, objv, TCL_EVAL_NOERR, NULL); + result = TclNREvalObjv(interp, objc, objv, + (*pc == INST_EVAL_STK) ? 0 : TCL_EVAL_NOERR, NULL); result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); CACHE_STACK_INFO(); diff --git a/tests/execute.test b/tests/execute.test index 6c34dc1..d9f02e0 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.28 2008/08/04 04:49:24 dgp Exp $ +# RCS: @(#) $Id: execute.test,v 1.29 2008/08/05 15:52:24 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -958,6 +958,21 @@ test execute-8.4 {Compile epoch bump effect on stack trace} -setup { rename FOO {} } -result {} +test execute-8.5 {Bug 2038069} -setup { + proc demo {} { + catch [list error FOO] m o + return $o + } +} -body { + demo +} -cleanup { + rename demo {} +} -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO + while executing +"error FOO" + invoked from within +"catch [list error FOO] m o"} -errorline 2} + test execute-9.1 {Interp result resetting [Bug 1522803]} { set c 0 catch { -- cgit v0.12 From 1f1a20cf5974c8067fbc369f2205c8ef06c1d1cb Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 5 Aug 2008 22:52:08 +0000 Subject: missing ChangeLof entry --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 265d556..f6e96b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-05 Miguel Sofer + + * generic/tclExecute.c: Fix for [Bug 2038069] by dgp. + * tests/execute.test: + 2008-08-04 Miguel Sofer * tests/nre.test: added tests for [if], [while] and [for]. A test -- cgit v0.12 From c290f50d94d557eda1ec276f0fd53e0879d281e8 Mon Sep 17 00:00:00 2001 From: jenglish Date: Tue, 5 Aug 2008 23:47:11 +0000 Subject: Streamline async connect logic [Patch 1994512]. Consolidate error reporting paths in CreateSocket(); Restore blocking mode immediately after connect() FD blocking mode is now consistent with [fconfigure ... -blocking] setting while async connect is in progress. --- ChangeLog | 4 ++ unix/tclUnixChan.c | 108 ++++++++++++++++++++--------------------------------- 2 files changed, 44 insertions(+), 68 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6e96b4..9271629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-05 Joe English + + * unix/tclUnixChan.c: Streamline async connect logic [Patch 1994512] + 2008-08-05 Miguel Sofer * generic/tclExecute.c: Fix for [Bug 2038069] by dgp. diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 629f9d0..3e99c14 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.93 2008/03/03 14:54:43 rmax Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.94 2008/08/05 23:47:12 jenglish Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -1828,14 +1828,13 @@ TcpBlockModeProc( * * WaitForConnect -- * - * Waits for a connection on an asynchronously opened socket to be - * completed. + * Wait for a connection on an asynchronously opened socket to be + * completed. In nonblocking mode, just test if the connection + * has completed without blocking. * * Results: - * None. - * - * Side effects: - * The socket is connected after this function returns. + * 0 if the connection has completed, -1 if still in progress + * or there is an error. * *---------------------------------------------------------------------- */ @@ -1862,9 +1861,6 @@ WaitForConnect( errno = 0; state = TclUnixWaitForFile(statePtr->fd, TCL_WRITABLE | TCL_EXCEPTION, timeOut); - if (!(statePtr->flags & TCP_ASYNC_SOCKET)) { - (void) TclUnixSetBlockingMode(statePtr->fd, TCL_MODE_BLOCKING); - } if (state & TCL_EXCEPTION) { return -1; } @@ -1910,11 +1906,10 @@ TcpInputProc( int *errorCodePtr) /* Where to store error code. */ { TcpState *statePtr = (TcpState *) instanceData; - int bytesRead, state; + int bytesRead; *errorCodePtr = 0; - state = WaitForConnect(statePtr, errorCodePtr); - if (state != 0) { + if (WaitForConnect(statePtr, errorCodePtr) != 0) { return -1; } bytesRead = recv(statePtr->fd, buf, (size_t) bufSize, 0); @@ -1962,11 +1957,9 @@ TcpOutputProc( { TcpState *statePtr = (TcpState *) instanceData; int written; - int state; /* Of waiting for connection. */ *errorCodePtr = 0; - state = WaitForConnect(statePtr, errorCodePtr); - if (state != 0) { + if (WaitForConnect(statePtr, errorCodePtr) != 0) { return -1; } written = send(statePtr->fd, buf, (size_t) toWrite, 0); @@ -2279,25 +2272,23 @@ CreateSocket( * attempt to do an async connect. Otherwise * do a synchronous connect or bind. */ { - int status, sock, asyncConnect, curState, origState; + int status = 0, sock = -1; struct sockaddr_in sockaddr; /* socket address */ struct sockaddr_in mysockaddr; /* Socket address for client */ TcpState *statePtr; const char *errorMsg = NULL; - sock = -1; - origState = 0; if (!CreateSocketAddress(&sockaddr, host, port, 0, &errorMsg)) { - goto addressError; + goto error; } if ((myaddr != NULL || myport != 0) && !CreateSocketAddress(&mysockaddr, myaddr, myport, 1, &errorMsg)) { - goto addressError; + goto error; } sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { - goto addressError; + goto error; } /* @@ -2313,7 +2304,6 @@ CreateSocket( TclSockMinimumBuffers(sock, SOCKET_BUFSIZE); - asyncConnect = 0; status = 0; if (server) { /* @@ -2321,9 +2311,9 @@ CreateSocket( * specified port. */ - status = 1; - (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &status, - sizeof(status)); + int reuseaddr = 1; + (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, + (char *) &reuseaddr, sizeof(reuseaddr)); status = bind(sock, (struct sockaddr *) &sockaddr, sizeof(struct sockaddr)); if (status != -1) { @@ -2331,13 +2321,13 @@ CreateSocket( } } else { if (myaddr != NULL || myport != 0) { - curState = 1; + int reuseaddr = 1; (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, - (char *) &curState, sizeof(curState)); + (char *) &reuseaddr, sizeof(reuseaddr)); status = bind(sock, (struct sockaddr *) &mysockaddr, sizeof(struct sockaddr)); if (status < 0) { - goto bindError; + goto error; } } @@ -2350,38 +2340,36 @@ CreateSocket( if (async) { status = TclUnixSetBlockingMode(sock, TCL_MODE_NONBLOCKING); - } else { - status = 0; - } - if (status > -1) { - status = connect(sock, (struct sockaddr *) &sockaddr, - sizeof(sockaddr)); if (status < 0) { - if (errno == EINPROGRESS) { - asyncConnect = 1; - status = 0; - } + goto error; + } + } + + status = connect(sock, (struct sockaddr *) &sockaddr, + sizeof(sockaddr)); + if (status < 0) { + if (errno == EINPROGRESS) { + status = 0; } else { - /* - * Here we are if the connect succeeds. In case of an - * asynchronous connect we have to reset the channel to - * blocking mode. This appears to happen not very often, but - * e.g. on a HP 9000/800 under HP-UX B.11.00 we enter this - * stage. [Bug: 4388] - */ - - if (async) { - status = TclUnixSetBlockingMode(sock, TCL_MODE_BLOCKING); - } + goto error; } + } + if (async) { + /* + * Restore blocking mode. + */ + status = TclUnixSetBlockingMode(sock, TCL_MODE_BLOCKING); } } - bindError: if (status < 0) { +error: if (interp != NULL) { Tcl_AppendResult(interp, "couldn't open socket: ", Tcl_PosixError(interp), NULL); + if (errorMsg != NULL) { + Tcl_AppendResult(interp, " (", errorMsg, ")", NULL); + } } if (sock != -1) { close(sock); @@ -2394,26 +2382,10 @@ CreateSocket( */ statePtr = (TcpState *) ckalloc((unsigned) sizeof(TcpState)); - statePtr->flags = 0; - if (asyncConnect) { - statePtr->flags = TCP_ASYNC_CONNECT; - } + statePtr->flags = async ? TCP_ASYNC_CONNECT : 0; statePtr->fd = sock; return statePtr; - - addressError: - if (sock != -1) { - close(sock); - } - if (interp != NULL) { - Tcl_AppendResult(interp, "couldn't open socket: ", - Tcl_PosixError(interp), NULL); - if (errorMsg != NULL) { - Tcl_AppendResult(interp, " (", errorMsg, ")", NULL); - } - } - return NULL; } /* -- cgit v0.12 From 878b3777fceb1c6a339bd3bec9f0f5fd02a7d2d7 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 6 Aug 2008 19:23:10 +0000 Subject: * library/init.tcl (::unknown): removed the [namespace inscope] hack that was maintained for Itcl *** POTENTIAL INCOMPATIBILITY *** for Itcl Itcl users will need a new release with Itcl's [Patch 2040295], or else load the tiny script in that patch by themselves (rewrite ::unknown). Note that it is a script-only patch. --- ChangeLog | 10 ++++++++++ library/init.tcl | 15 +++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9271629..4b4b05e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-08-06 Miguel Sofer + + * library/init.tcl (::unknown): removed the [namespace inscope] + hack that was maintained for Itcl + + *** POTENTIAL INCOMPATIBILITY *** for Itcl + Itcl users will need a new release with Itcl's [Patch 2040295], or + else load the tiny script in that patch by themselves (rewrite + ::unknown). Note that it is a script-only patch. + 2008-08-05 Joe English * unix/tclUnixChan.c: Streamline async connect logic [Patch 1994512] diff --git a/library/init.tcl b/library/init.tcl index 3a3b105..ab5d858 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.107 2008/06/25 17:40:03 andreas_kupries Exp $ +# RCS: @(#) $Id: init.tcl,v 1.108 2008/08/06 19:23:13 msofer Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -241,19 +241,10 @@ proc unknown args { # If the command word has the form "namespace inscope ns cmd" # then concatenate its arguments onto the end and evaluate it. - set cmd [lindex $args 0] - if {[regexp "^:*namespace\[ \t\n\]+inscope" $cmd] && [llength $cmd] == 4} { - #return -code error "You need an {*}" - set arglist [lrange $args 1 end] - set ret [catch {uplevel 1 ::$cmd $arglist} result opts] - dict unset opts -errorinfo - dict incr opts -level - return -options $opts $result - } - catch {set savedErrorInfo $::errorInfo} catch {set savedErrorCode $::errorCode} - set name $cmd + + set name [lindex $args 0] if {![info exists auto_noload]} { # # Make sure we're not trying to load the same proc twice. -- cgit v0.12 From d60baf9f3c7b3c74386cd31147650c3a936e4fb2 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 6 Aug 2008 19:46:26 +0000 Subject: missed some nukeable comments re [namespace inscope] --- library/init.tcl | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/library/init.tcl b/library/init.tcl index ab5d858..3e47642 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.108 2008/08/06 19:23:13 msofer Exp $ +# RCS: @(#) $Id: init.tcl,v 1.109 2008/08/06 19:46:26 msofer Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -217,11 +217,9 @@ if {[namespace which -command tclLog] eq ""} { # exist in the interpreter. It takes the following steps to make the # command available: # -# 1. See if the command has the form "namespace inscope ns cmd" and -# if so, concatenate its arguments onto the end and evaluate it. -# 2. See if the autoload facility can locate the command in a +# 1. See if the autoload facility can locate the command in a # Tcl script file. If so, load it and execute it. -# 3. If the command was invoked interactively at top-level: +# 2. If the command was invoked interactively at top-level: # (a) see if the command exists as an executable UNIX program. # If so, "exec" the command. # (b) see if the command requests csh-like history substitution @@ -238,9 +236,6 @@ proc unknown args { variable ::tcl::UnknownPending global auto_noexec auto_noload env tcl_interactive - # If the command word has the form "namespace inscope ns cmd" - # then concatenate its arguments onto the end and evaluate it. - catch {set savedErrorInfo $::errorInfo} catch {set savedErrorCode $::errorCode} -- cgit v0.12 From 82d70288992628555e6c555719490b7a504fd671 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 6 Aug 2008 20:58:48 +0000 Subject: * generic/tclVar.c (TclLookupSimpleVar): fix bug that the core could not trigger before TclOO: the number of locals was being read from the Proc, which can under some circumstance be out of sync with the localCache's. --- ChangeLog | 5 +++++ generic/tclVar.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b4b05e..e5d5615 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-08-06 Miguel Sofer + * generic/tclVar.c (TclLookupSimpleVar): fix bug that the core + could not trigger before TclOO: the number of locals was being + read from the Proc, which can under some circumstance be out of + sync with the localCache's. + * library/init.tcl (::unknown): removed the [namespace inscope] hack that was maintained for Itcl diff --git a/generic/tclVar.c b/generic/tclVar.c index dd4ac10..f4e1ad3 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.165 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.166 2008/08/06 20:58:49 msofer Exp $ */ #include "tclInt.h" @@ -997,8 +997,7 @@ TclLookupSimpleVar( } } } else { /* Local var: look in frame varFramePtr. */ - Proc *procPtr = varFramePtr->procPtr; - int localCt = procPtr->numCompiledLocals; + int localCt = varFramePtr->numCompiledLocals; Tcl_Obj **objPtrPtr = &varFramePtr->localCachePtr->varName0; for (i=0 ; i Date: Wed, 6 Aug 2008 21:02:50 +0000 Subject: credit dgp for that bug :} --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e5d5615..b6b2194 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,8 @@ * generic/tclVar.c (TclLookupSimpleVar): fix bug that the core could not trigger before TclOO: the number of locals was being read from the Proc, which can under some circumstance be out of - sync with the localCache's. + sync with the localCache's. Found by dgp while investigating + [Bug 2037727] * library/init.tcl (::unknown): removed the [namespace inscope] hack that was maintained for Itcl -- cgit v0.12 From 4c3c492b67b48506cdf77c1f146af9f4318f24c1 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 6 Aug 2008 21:23:13 +0000 Subject: * generic/tclOO.c: Revised TclOO's check for an interp being deleted during handling of object command deletion. The old code was relying on documented features of command delete traces that do not in fact work. [Bug 2039178]. * tests/oo.test (oo-26.*): Added tests that demonstrate failure of TclOO to check for various kinds of invalid bytecode during method dispatch. [Bug 2037727]. --- ChangeLog | 11 +++++++++++ generic/tclOO.c | 4 ++-- tests/oo.test | 30 +++++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6b2194..f97328a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-08-04 Don Porter S + + * generic/tclOO.c: Revised TclOO's check for an interp + being deleted during handling of object command deletion. The + old code was relying on documented features of command delete + traces that do not in fact work. [Bug 2039178]. + + * tests/oo.test (oo-26.*): Added tests that demonstrate + failure of TclOO to check for various kinds of invalid bytecode + during method dispatch. [Bug 2037727]. + 2008-08-06 Miguel Sofer * generic/tclVar.c (TclLookupSimpleVar): fix bug that the core diff --git a/generic/tclOO.c b/generic/tclOO.c index 6f078e4..4db39c3 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.13 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.14 2008/08/06 21:23:14 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -562,7 +562,7 @@ ObjectRenamedTrace( AddRef(oPtr); oPtr->flags |= OBJECT_DELETED; - if (!(flags & TCL_INTERP_DESTROYED)) { + if (!Tcl_InterpDeleted(interp)) { CallContext *contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); if (contextPtr != NULL) { diff --git a/tests/oo.test b/tests/oo.test index 8ff06e8..ea97bf2 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.9 2008/07/25 22:11:21 andreas_kupries Exp $ +# RCS: @(#) $Id: oo.test,v 1.10 2008/08/06 21:23:15 dgp Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1787,6 +1787,34 @@ test oo-25.1 {call chain caching} -setup { lappend result [foo $m1] [bar $m2] } -result {ok ok ok ok ok ok good ok} +test oo-26.1 {Bug 2037727} -setup { + proc succeed args {} + oo::object create example +} -body { + oo::objdefine example method foo {} {succeed} + example foo + proc succeed {} {return succeed} + example foo +} -cleanup { + example destroy + rename succeed {} +} -result succeed + +test oo-26.2 {Bug 2037727} -setup { + oo::class create example { + method namespace {} {self namespace} + method foo {} {succeed} + } + example create i1 + example create i2 + namespace eval [i1 namespace] {proc succeed args {}} + namespace eval [i2 namespace] {proc succeed args {return succeed}} +} -body { + list [i1 foo] [i2 foo] +} -cleanup { + example destroy +} -result {{} succeed} + cleanupTests return -- cgit v0.12 From 62d36886b926591b14c230558c64c8ccc85cbb82 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 7 Aug 2008 04:13:49 +0000 Subject: * generic/tclBasic.c: Fix tailcalls falling out of tebc into * generic/tclExecute.c: Tcl_EvalEx [Bug 2017946] * generic/tclInt.h: --- ChangeLog | 8 +++++++- generic/tclBasic.c | 16 ++++++++++++++-- generic/tclExecute.c | 16 +++++++--------- generic/tclInt.h | 7 ++++++- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index f97328a..a4cd4d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2008-08-04 Don Porter S +2008-08-07 Miguel Sofer + + * generic/tclBasic.c: Fix tailcalls falling out of tebc into + * generic/tclExecute.c: Tcl_EvalEx [Bug 2017946] + * generic/tclInt.h: + +2008-08-06 Don Porter S * generic/tclOO.c: Revised TclOO's check for an interp being deleted during handling of object command deletion. The diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 4a4c240..1133c4c 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.350 2008/08/04 14:09:28 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.351 2008/08/07 04:13:50 msofer Exp $ */ #include "tclInt.h" @@ -691,7 +691,8 @@ Tcl_CreateInterp(void) #endif iPtr->pendingObjDataPtr = NULL; iPtr->asyncReadyPtr = TclGetAsyncReadyPtr(); - + iPtr->atExitPtr = NULL; + /* * Create the core commands. Do it here, rather than calling * Tcl_CreateCommand, because it's faster (there's no need to check for a @@ -4169,6 +4170,7 @@ TclNRRunCallbacks( (void) Tcl_GetObjResult(interp); } + restart: while (TOP_CB(interp) != rootPtr) { callbackPtr = TOP_CB(interp); procPtr = callbackPtr->procPtr; @@ -4191,6 +4193,16 @@ TclNRRunCallbacks( result = (procPtr)(callbackPtr->data, interp, result); TCLNR_FREE(interp, callbackPtr); } + if (iPtr->atExitPtr) { + callbackPtr = iPtr->atExitPtr; + while (callbackPtr->nextPtr) { + callbackPtr = callbackPtr->nextPtr; + } + callbackPtr->nextPtr = rootPtr; + TOP_CB(iPtr) = iPtr->atExitPtr; + iPtr->atExitPtr = NULL; + goto restart; + } return result; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 87695ba..614a3d9 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.398 2008/08/05 15:52:23 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.399 2008/08/07 04:13:51 msofer Exp $ */ #include "tclInt.h" @@ -7832,20 +7832,18 @@ TclExecuteByteCode( NRE_ASSERT(lastPtr->nextPtr == NULL); if (!isTailcall) { /* save the interp state, arrange for restoring it after - running the callbacks.*/ + running the callbacks. Put the callback at the bottom of the + atExit stack */ Tcl_InterpState state = Tcl_SaveInterpState(interp, result); TclNRAddCallback(interp, NRRestoreInterpState, state, NULL, NULL, NULL); + lastPtr->nextPtr = TOP_CB(iPtr); + TOP_CB(iPtr) = TOP_CB(iPtr)->nextPtr; + lastPtr->nextPtr->nextPtr = NULL; } - - /* - * splice in the atExit callbacks and rerun all callbacks - */ - - lastPtr->nextPtr = TOP_CB(interp); - TOP_CB(interp) = atExitPtr; + iPtr->atExitPtr = atExitPtr; } return result; diff --git a/generic/tclInt.h b/generic/tclInt.h index a7991ab..5b8f104 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.388 2008/08/03 17:49:09 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.389 2008/08/07 04:13:52 msofer Exp $ */ #ifndef _TCLINT @@ -1964,6 +1964,11 @@ typedef struct Interp { * tclOOInt.h and tclOO.c for real definition * and setup. */ + struct TEOV_callback *atExitPtr; + /* Callbacks to be run after a command exited; + * this is only set for atProcExirt or + * tailcalls that fall back out of tebc. */ + #ifdef TCL_COMPILE_STATS /* * Statistical information about the bytecode compiler and interpreter's -- cgit v0.12 From 15dff7716f39d8df807b873b3e29f2955c5855ca Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 7 Aug 2008 11:27:27 +0000 Subject: small modif of last commit --- generic/tclExecute.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 614a3d9..e9f3939 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.399 2008/08/07 04:13:51 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.400 2008/08/07 11:27:27 msofer Exp $ */ #include "tclInt.h" @@ -7821,21 +7821,18 @@ TclExecuteByteCode( if (atExitPtr) { - /* - * Find the last one - */ - - TEOV_callback *lastPtr = atExitPtr; - while (lastPtr->nextPtr) { - lastPtr = lastPtr->nextPtr; - } - NRE_ASSERT(lastPtr->nextPtr == NULL); if (!isTailcall) { /* save the interp state, arrange for restoring it after running the callbacks. Put the callback at the bottom of the atExit stack */ Tcl_InterpState state = Tcl_SaveInterpState(interp, result); + TEOV_callback *lastPtr = atExitPtr; + + while (lastPtr->nextPtr) { + lastPtr = lastPtr->nextPtr; + } + NRE_ASSERT(lastPtr->nextPtr == NULL); TclNRAddCallback(interp, NRRestoreInterpState, state, NULL, NULL, NULL); -- cgit v0.12 From 0f1dccb3a4258d401a597efe627913246f49357d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 7 Aug 2008 22:29:09 +0000 Subject: generic/tclExecute.c formatting only: remove spaces at the end of a every line generic/tclConfig.c make the internal cfg variable const. generic/tclTrace.c add a "const" keyword, allowing the "traceSubCmds[]" array to be placed by the C- compiler in a code segment in stead of a data segment Those harmless changes are as a preparation for a future change proposal. Unfortunately, my (Eclipse) editor automatically removes spaces at the end of every line. Creating a patch for this proposal should not contain unrelated harmless changes, so therefore this separate check-in. No change in functionality. No risk. --- generic/tclConfig.c | 4 +- generic/tclExecute.c | 106 +++++++++++++++++++++++++-------------------------- generic/tclTrace.c | 4 +- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/generic/tclConfig.c b/generic/tclConfig.c index a810521..e0ee15a 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.21 2008/07/19 22:50:40 nijtmans Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.22 2008/08/07 22:29:09 nijtmans Exp $ */ #include "tclInt.h" @@ -78,7 +78,7 @@ Tcl_RegisterConfig( * configuration values, ASCII, thus UTF-8. */ { Tcl_DString cmdName; - Tcl_Config *cfg; + const Tcl_Config *cfg; Tcl_Encoding venc = Tcl_GetEncoding(NULL, valEncoding); QCCD *cdPtr = (QCCD *) ckalloc(sizeof(QCCD)); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index e9f3939..213b99b 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.400 2008/08/07 11:27:27 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.401 2008/08/07 22:29:09 nijtmans Exp $ */ #include "tclInt.h" @@ -208,7 +208,7 @@ typedef struct BottomData { auxObjList = bottomPtr->auxObjList; \ esPtr = iPtr->execEnvPtr->execStackPtr; \ tosPtr = esPtr->tosPtr; \ - iPtr->cmdFramePtr = bottomPtr->cmdFramePtr; + iPtr->cmdFramePtr = bottomPtr->cmdFramePtr; static Tcl_NRPostProc NRRestoreInterpState; @@ -916,12 +916,12 @@ TclFinalizeExecution(void) } /* - * Auxiliary code to insure that GrowEvaluationStack always returns correctly + * Auxiliary code to insure that GrowEvaluationStack always returns correctly * aligned memory. * * WALLOCALIGN represents the alignment reqs in words, just as TCL_ALLOCALIGN * represents the reqs in bytes. This assumes that TCL_ALLOCALIGN is a - * multiple of the wordsize 'sizeof(Tcl_Obj *)'. + * multiple of the wordsize 'sizeof(Tcl_Obj *)'. */ #define WALLOCALIGN \ @@ -943,7 +943,7 @@ OFFSET( } /* - * Given a marker, compute where the following aligned memory starts. + * Given a marker, compute where the following aligned memory starts. */ #define MEMSTART(markerPtr) \ @@ -996,13 +996,13 @@ GrowEvaluationStack( if (needed + offset < 0) { /* - * Put a marker pointing to the previous marker in this stack, and + * Put a marker pointing to the previous marker in this stack, and * store it in esPtr as the current marker. Return a pointer to * the start of aligned memory. */ esPtr->markerPtr = tmpMarkerPtr; - memStart = tmpMarkerPtr + offset; + memStart = tmpMarkerPtr + offset; esPtr->tosPtr = memStart - 1; *esPtr->markerPtr = (Tcl_Obj *) markerPtr; return memStart; @@ -1012,7 +1012,7 @@ GrowEvaluationStack( /* * Reset move to hold the number of words to be moved to new stack (if * any) and growth to hold the complete stack requirements: add the marker - * and maximal possible offset. + * and maximal possible offset. */ if (move) { @@ -1076,7 +1076,7 @@ GrowEvaluationStack( esPtr->markerPtr = &esPtr->stackWords[0]; memStart = MEMSTART(esPtr->markerPtr); esPtr->tosPtr = memStart - 1; - + if (move) { memcpy(memStart, MEMSTART(markerPtr), moveWords*sizeof(Tcl_Obj *)); esPtr->tosPtr += moveWords; @@ -1459,7 +1459,7 @@ FreeExprCodeInternalRep( * * TclCompileObj -- * - * This procedure compiles the script contained in a Tcl_Obj + * This procedure compiles the script contained in a Tcl_Obj * * Results: * A pointer to the corresponding ByteCode, never NULL. @@ -1724,7 +1724,7 @@ NRRestoreInterpState( */ Tcl_InterpState state = data[0]; - + return Tcl_RestoreInterpState(interp, state); } @@ -1756,7 +1756,7 @@ TclExecuteByteCode( BottomData *bottomPtr; BottomData *oldBottomPtr = NULL; - + /* * Constants: variables that do not change during the execution, used * sporadically. @@ -1813,7 +1813,7 @@ TclExecuteByteCode( char cmdNameBuf[21]; #endif char *curInstName; - + /* * The execution uses a unified stack: first a BottomData, immediately * above it a CmdFrame, then the catch stack, then the execution stack. @@ -1827,28 +1827,28 @@ TclExecuteByteCode( int nested = 0; TEOV_callback *atExitPtr = NULL; int isTailcall = 0; - + nonRecursiveCallStart: if (nested) { TEOV_callback *callbackPtr = TOP_CB(interp); int type = PTR2INT(callbackPtr->data[0]); ClientData param = callbackPtr->data[1]; - + NRE_ASSERT(result==TCL_OK); - NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); + NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); - + TOP_CB(interp) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); NR_DATA_BURY(); - + if (type == TCL_NR_BC_TYPE) { /* * A request to run a bytecode: record this level's state * variables, swap codePtr and start running the new one. */ - + NR_DATA_BURY(); codePtr = param; } else if (type == TCL_NR_ATEXIT_TYPE) { @@ -1863,7 +1863,7 @@ TclExecuteByteCode( TOP_CB(interp) = newPtr->nextPtr; isTailcall = PTR2INT(param); - if (!isTailcall) { + if (!isTailcall) { #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " atProcExit request received\n"); @@ -1877,7 +1877,7 @@ TclExecuteByteCode( } goto nonRecursiveCallReturn; } else { - + #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " Tailcall request received\n"); @@ -1890,18 +1890,18 @@ TclExecuteByteCode( TCL_STATIC); goto checkForCatch; } - + newPtr->nextPtr = NULL; if (!bottomPtr->atExitPtr) { newPtr->nextPtr = NULL; bottomPtr->atExitPtr = newPtr; } else { /* - * There are already atExit callbacks: run last. + * There are already atExit callbacks: run last. */ - + TEOV_callback *tmpPtr = bottomPtr->atExitPtr; - + while (tmpPtr->nextPtr) { tmpPtr = tmpPtr->nextPtr; } @@ -1914,7 +1914,7 @@ TclExecuteByteCode( } } nested = 1; - + codePtr->refCount++; bottomPtr = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) @@ -1924,7 +1924,7 @@ TclExecuteByteCode( initLevel = 1; NR_DATA_INIT(); /* record this level's data */ - nonRecursiveCallReturn: + nonRecursiveCallReturn: bcFramePtr = (CmdFrame *) (bottomPtr + 1); initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); @@ -1938,11 +1938,11 @@ TclExecuteByteCode( pc = codePtr->codeStart; catchTop = initCatchTop; tosPtr = initTosPtr; - + /* * TIP #280: Initialize the frame. Do not push it yet. */ - + bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) ? TCL_LOCATION_PREBC : TCL_LOCATION_BC); bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1); @@ -1951,7 +1951,7 @@ TclExecuteByteCode( bcFramePtr->nextPtr = iPtr->cmdFramePtr; bcFramePtr->nline = 0; bcFramePtr->line = NULL; - + bcFramePtr->data.tebc.codePtr = codePtr; bcFramePtr->data.tebc.pc = NULL; bcFramePtr->cmd.str.cmd = NULL; @@ -1964,7 +1964,7 @@ TclExecuteByteCode( * Returning from a non-recursive call. State is already completely * reset, now process the return. */ - + if (result == TCL_OK) { /* * Reset the interp's result to avoid possible duplications of @@ -1986,7 +1986,7 @@ TclExecuteByteCode( #endif objResultPtr = Tcl_GetObjResult(interp); *(++tosPtr) = objResultPtr; - + TclNewObj(objResultPtr); Tcl_IncrRefCount(objResultPtr); iPtr->objResultPtr = objResultPtr; @@ -2565,11 +2565,11 @@ TclExecuteByteCode( * Moved here to support transforming the eval of an expression to * a non-recursive TEBC call. */ - + ByteCode *newCodePtr; - + bcFramePtr->data.tebc.pc = (char *) pc; - iPtr->cmdFramePtr = bcFramePtr; + iPtr->cmdFramePtr = bcFramePtr; DECACHE_STACK_INFO(); newCodePtr = CompileExprObj(interp, OBJ_AT_TOS); CACHE_STACK_INFO(); @@ -2587,24 +2587,24 @@ TclExecuteByteCode( int objc, pcAdjustment; Tcl_Obj **objv; - + case INST_EVAL_STK: { /* * Moved here to support transforming the eval of objects to a * simple command invocation (for canonical lists) or a * non-recursive TEBC call (compiled scripts). */ - + Tcl_Obj *objPtr = OBJ_AT_TOS; ByteCode *newCodePtr; cleanup = 1; pcAdjustment = 1; - + if (objPtr->typePtr == &tclListType) { /* is a list... */ List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; Tcl_Obj *copyPtr; - + if (objPtr->bytes == NULL || /* ...without a string rep */ listRepPtr->canonicalFlag) {/* ...or that is canonical * */ @@ -2613,14 +2613,14 @@ TclExecuteByteCode( Tcl_IncrRefCount(copyPtr); OBJ_AT_TOS = copyPtr; listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; - Tcl_DecrRefCount(objPtr); + Tcl_DecrRefCount(objPtr); } objc = listRepPtr->elemCount; objv = &listRepPtr->elements; goto doInvocationFromEval; } } - + /* * Run the bytecode in this same TEBC instance! * @@ -2628,7 +2628,7 @@ TclExecuteByteCode( * constructed command. We cannot match its lines to the outer * context. */ - + DECACHE_STACK_INFO(); newCodePtr = TclCompileObj(interp, objPtr, NULL, 0); bcFramePtr->data.tebc.pc = (char *) pc; @@ -2719,11 +2719,11 @@ TclExecuteByteCode( if (TOP_CB(interp) != bottomPtr->rootPtr) { NRE_ASSERT(result == TCL_OK); - pc += pcAdjustment; + pc += pcAdjustment; goto nonRecursiveCallStart; } iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; - + if (result == TCL_OK) { Tcl_Obj *objPtr; #ifndef TCL_COMPILE_DEBUG @@ -7705,7 +7705,7 @@ TclExecuteByteCode( * Clear all expansions and same-level NR calls. * * Note that expansion markers have a NULL type; avoid removing other - * markers. + * markers. */ while (auxObjList) { @@ -7747,14 +7747,14 @@ TclExecuteByteCode( rerunCallbacks: result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); - + NR_DATA_DIG(); DECACHE_STACK_INFO(); if (TOP_CB(interp) == bottomPtr->rootPtr) { /* * The bytecode is returning, all callbacks were run. Run atExit * handlers, remove the caller's arguments and keep processing the - * caller. + * caller. */ if (atExitPtr) { @@ -7775,7 +7775,7 @@ TclExecuteByteCode( Tcl_SaveInterpState(interp, result), NULL, NULL, NULL); } - + /* * splice in the atExit callbacks and rerun all callbacks */ @@ -7786,7 +7786,7 @@ TclExecuteByteCode( atExitPtr = NULL; goto rerunCallbacks; } - + while (cleanup--) { Tcl_Obj *objPtr = POP_OBJECT(); Tcl_DecrRefCount(objPtr); @@ -7795,21 +7795,21 @@ TclExecuteByteCode( } else { TEOV_callback *callbackPtr = TOP_CB(iPtr); int type = PTR2INT(callbackPtr->data[0]); - + NRE_ASSERT(TOP_CB(interp)->procPtr == NRCallTEBC); NRE_ASSERT(result == TCL_OK); if (type == TCL_NR_BC_TYPE) { /* - * One of the callbacks requested a new execution: a tailcall! + * One of the callbacks requested a new execution: a tailcall! * Start the new bytecode. */ - + goto nonRecursiveCallStart; } else if (type == TCL_NR_ATEXIT_TYPE) { TOP_CB(iPtr) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); - + Tcl_SetResult(interp, "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); result = TCL_ERROR; diff --git a/generic/tclTrace.c b/generic/tclTrace.c index b15b671..bb4dbfa 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.49 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.50 2008/08/07 22:29:09 nijtmans Exp $ */ #include "tclInt.h" @@ -112,7 +112,7 @@ static Tcl_TraceTypeObjCmd TraceExecutionObjCmd; static const char *traceTypeOptions[] = { "execution", "command", "variable", NULL }; -static Tcl_TraceTypeObjCmd *traceSubCmds[] = { +static Tcl_TraceTypeObjCmd *const traceSubCmds[] = { TraceExecutionObjCmd, TraceCommandObjCmd, TraceVariableObjCmd, -- cgit v0.12 From a8841be6ab161b0a8171a3fb8b24b791e4150635 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 8 Aug 2008 15:30:40 +0000 Subject: Olson's tzdata2008e --- ChangeLog | 15 +++++++++++++++ library/tzdata/Africa/Casablanca | 2 ++ library/tzdata/America/Argentina/San_Luis | 18 +++++++----------- library/tzdata/America/Eirunepe | 1 + library/tzdata/America/Rio_Branco | 1 + library/tzdata/Asia/Karachi | 2 ++ library/tzdata/CET | 2 ++ library/tzdata/Europe/Belgrade | 1 + library/tzdata/Europe/Berlin | 7 ++++--- library/tzdata/Europe/Budapest | 3 ++- library/tzdata/Europe/Sofia | 1 + library/tzdata/Indian/Mauritius | 4 ++++ library/tzdata/MET | 2 ++ 13 files changed, 44 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4cd4d8..bc70da2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2008-08-08 Kevin Kenny + + * library/tzdata/CET: + * library/tzdata/MET: + * library/tzdata/Africa/Casablanca: + * library/tzdata/America/Eirunepe: + * library/tzdata/America/Rio_Branco: + * library/tzdata/America/Argentina/San_Luis: + * library/tzdata/Asia/Karachi: + * library/tzdata/Europe/Belgrade: + * library/tzdata/Europe/Berlin: + * library/tzdata/Europe/Budapest: + * library/tzdata/Europe/Sofia: + * library/tzdata/Indian/Mauritius: Olson's tzdata2008e. + 2008-08-07 Miguel Sofer * generic/tclBasic.c: Fix tailcalls falling out of tebc into diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca index aa4c8e3..15613fb 100644 --- a/library/tzdata/Africa/Casablanca +++ b/library/tzdata/Africa/Casablanca @@ -21,4 +21,6 @@ set TZData(:Africa/Casablanca) { {271033200 0 0 WET} {448243200 3600 0 CET} {504918000 0 0 WET} + {1212278400 3600 1 WEST} + {1222556400 0 0 WET} } diff --git a/library/tzdata/America/Argentina/San_Luis b/library/tzdata/America/Argentina/San_Luis index d98cd75..60a7995 100644 --- a/library/tzdata/America/Argentina/San_Luis +++ b/library/tzdata/America/Argentina/San_Luis @@ -50,17 +50,13 @@ set TZData(:America/Argentina/San_Luis) { {596948400 -7200 1 ARST} {605066400 -10800 0 ART} {624423600 -7200 1 ARST} - {636516000 -10800 0 ART} - {656478000 -7200 1 ARST} - {667792800 -14400 0 WART} - {673588800 -10800 0 ART} - {687927600 -7200 1 ARST} - {699415200 -10800 0 ART} - {719377200 -7200 1 ARST} - {731469600 -10800 0 ART} - {938916000 -10800 0 ART} - {938919600 -10800 1 ARST} - {952056000 -10800 0 ART} + {631159200 -7200 1 ARST} + {637380000 -14400 0 WART} + {655963200 -10800 1 WARST} + {667796400 -14400 0 WART} + {675748800 -10800 0 ART} + {938919600 -10800 1 WARST} + {952052400 -10800 0 ART} {1085972400 -14400 0 WART} {1090728000 -10800 0 ART} {1198983600 -7200 1 ARST} diff --git a/library/tzdata/America/Eirunepe b/library/tzdata/America/Eirunepe index b168fcc..86dcd8f 100644 --- a/library/tzdata/America/Eirunepe +++ b/library/tzdata/America/Eirunepe @@ -36,4 +36,5 @@ set TZData(:America/Eirunepe) { {750834000 -14400 1 ACST} {761716800 -18000 0 ACT} {780206400 -18000 0 ACT} + {1214283600 -14400 0 AMT} } diff --git a/library/tzdata/America/Rio_Branco b/library/tzdata/America/Rio_Branco index f4513e3..20889cb 100644 --- a/library/tzdata/America/Rio_Branco +++ b/library/tzdata/America/Rio_Branco @@ -32,4 +32,5 @@ set TZData(:America/Rio_Branco) { {562136400 -14400 1 ACST} {571204800 -18000 0 ACT} {590040000 -18000 0 ACT} + {1214283600 -14400 0 AMT} } diff --git a/library/tzdata/Asia/Karachi b/library/tzdata/Asia/Karachi index 8ce9edd..5e1c63e 100644 --- a/library/tzdata/Asia/Karachi +++ b/library/tzdata/Asia/Karachi @@ -9,4 +9,6 @@ set TZData(:Asia/Karachi) { {38775600 18000 0 PKT} {1018119660 21600 1 PKST} {1033840860 18000 0 PKT} + {1212260400 21600 1 PKST} + {1220205600 18000 0 PKT} } diff --git a/library/tzdata/CET b/library/tzdata/CET index a5fec55..b08750a 100644 --- a/library/tzdata/CET +++ b/library/tzdata/CET @@ -14,6 +14,8 @@ set TZData(:CET) { {-828226800 3600 0 CET} {-812502000 7200 1 CEST} {-796777200 3600 0 CET} + {-781052400 7200 1 CEST} + {-766623600 3600 0 CET} {228877200 7200 1 CEST} {243997200 3600 0 CET} {260326800 7200 1 CEST} diff --git a/library/tzdata/Europe/Belgrade b/library/tzdata/Europe/Belgrade index 384ee91..b11f7b3 100644 --- a/library/tzdata/Europe/Belgrade +++ b/library/tzdata/Europe/Belgrade @@ -9,6 +9,7 @@ set TZData(:Europe/Belgrade) { {-828226800 3600 0 CET} {-812502000 7200 1 CEST} {-796777200 3600 0 CET} + {-788922000 3600 0 CET} {-777942000 7200 1 CEST} {-766623600 3600 0 CET} {407199600 3600 0 CET} diff --git a/library/tzdata/Europe/Berlin b/library/tzdata/Europe/Berlin index 62a7141..5469cf6 100644 --- a/library/tzdata/Europe/Berlin +++ b/library/tzdata/Europe/Berlin @@ -15,13 +15,14 @@ set TZData(:Europe/Berlin) { {-828226800 3600 0 CET} {-812502000 7200 1 CEST} {-796777200 3600 0 CET} - {-781052400 7200 0 CEST} - {-776563200 10800 1 CEMT} + {-781052400 7200 1 CEST} + {-776559600 10800 0 CEMT} {-765936000 7200 1 CEST} {-761180400 3600 0 CET} + {-757386000 3600 0 CET} {-748479600 7200 1 CEST} {-733273200 3600 0 CET} - {-717634800 7200 1 CEST} + {-717631200 7200 1 CEST} {-714610800 10800 1 CEMT} {-710380800 7200 1 CEST} {-701910000 3600 0 CET} diff --git a/library/tzdata/Europe/Budapest b/library/tzdata/Europe/Budapest index c39d118..fd41acc 100644 --- a/library/tzdata/Europe/Budapest +++ b/library/tzdata/Europe/Budapest @@ -20,7 +20,8 @@ set TZData(:Europe/Budapest) { {-828226800 3600 0 CET} {-812502000 7200 1 CEST} {-796777200 3600 0 CET} - {-778471200 7200 0 CEST} + {-788922000 3600 0 CET} + {-778471200 7200 1 CEST} {-762487200 3600 0 CET} {-749689200 7200 1 CEST} {-733359600 3600 0 CET} diff --git a/library/tzdata/Europe/Sofia b/library/tzdata/Europe/Sofia index 300dca0..8fd55f6 100644 --- a/library/tzdata/Europe/Sofia +++ b/library/tzdata/Europe/Sofia @@ -9,6 +9,7 @@ set TZData(:Europe/Sofia) { {-828226800 3600 0 CET} {-812502000 7200 1 CEST} {-796777200 3600 0 CET} + {-788922000 3600 0 CET} {-781048800 7200 0 EET} {291762000 10800 0 EEST} {307576800 7200 0 EET} diff --git a/library/tzdata/Indian/Mauritius b/library/tzdata/Indian/Mauritius index 018447a..430bad4 100644 --- a/library/tzdata/Indian/Mauritius +++ b/library/tzdata/Indian/Mauritius @@ -3,4 +3,8 @@ set TZData(:Indian/Mauritius) { {-9223372036854775808 13800 0 LMT} {-1988164200 14400 0 MUT} + {403041600 18000 1 MUST} + {417034800 14400 0 MUT} + {1224972000 18000 1 MUST} + {1238104800 14400 0 MUT} } diff --git a/library/tzdata/MET b/library/tzdata/MET index a2c72c0..8789c97 100644 --- a/library/tzdata/MET +++ b/library/tzdata/MET @@ -14,6 +14,8 @@ set TZData(:MET) { {-828226800 3600 0 MET} {-812502000 7200 1 MEST} {-796777200 3600 0 MET} + {-781052400 7200 1 MEST} + {-766623600 3600 0 MET} {228877200 7200 1 MEST} {243997200 3600 0 MET} {260326800 7200 1 MEST} -- cgit v0.12 From bf39f96ff8294effecfd46009be07e8c587a89e9 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 8 Aug 2008 15:43:46 +0000 Subject: Olson's tzdata2008e --- ChangeLog | 1 + library/tzdata/America/Santarem | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 library/tzdata/America/Santarem diff --git a/ChangeLog b/ChangeLog index bc70da2..076d306 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * library/tzdata/Africa/Casablanca: * library/tzdata/America/Eirunepe: * library/tzdata/America/Rio_Branco: + * library/tzdata/America/Santarem: * library/tzdata/America/Argentina/San_Luis: * library/tzdata/Asia/Karachi: * library/tzdata/Europe/Belgrade: diff --git a/library/tzdata/America/Santarem b/library/tzdata/America/Santarem new file mode 100644 index 0000000..b6e9264 --- /dev/null +++ b/library/tzdata/America/Santarem @@ -0,0 +1,36 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:America/Santarem) { + {-9223372036854775808 -13128 0 LMT} + {-1767212472 -14400 0 AMT} + {-1206954000 -10800 1 AMST} + {-1191358800 -14400 0 AMT} + {-1175371200 -10800 1 AMST} + {-1159822800 -14400 0 AMT} + {-633816000 -10800 1 AMST} + {-622065600 -14400 0 AMT} + {-602280000 -10800 1 AMST} + {-591829200 -14400 0 AMT} + {-570744000 -10800 1 AMST} + {-560206800 -14400 0 AMT} + {-539121600 -10800 1 AMST} + {-531349200 -14400 0 AMT} + {-191361600 -10800 1 AMST} + {-184194000 -14400 0 AMT} + {-155160000 -10800 1 AMST} + {-150066000 -14400 0 AMT} + {-128894400 -10800 1 AMST} + {-121122000 -14400 0 AMT} + {-99950400 -10800 1 AMST} + {-89586000 -14400 0 AMT} + {-68414400 -10800 1 AMST} + {-57963600 -14400 0 AMT} + {499752000 -10800 1 AMST} + {511239600 -14400 0 AMT} + {530596800 -10800 1 AMST} + {540270000 -14400 0 AMT} + {562132800 -10800 1 AMST} + {571201200 -14400 0 AMT} + {590036400 -14400 0 AMT} + {1214280000 -10800 0 BRT} +} -- cgit v0.12 From ef80a8e33e4a3556fa3ebf372e3ccc2b83549cac Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 8 Aug 2008 20:43:04 +0000 Subject: * changes: Updates for 8.6a2 release. --- ChangeLog | 4 ++++ changes | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 076d306..87fc970 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-06 Don Porter S + + * changes: Updates for 8.6a2 release. + 2008-08-08 Kevin Kenny * library/tzdata/CET: diff --git a/changes b/changes index 723094b..0846933 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.141 2008/06/25 17:44:05 dgp Exp $ +RCS: @(#) $Id: changes,v 1.142 2008/08/08 20:43:17 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7242,6 +7242,48 @@ variables without "." added to customization hooks (kupries) 2008-06-24 (bug fix)[1999176] crash in [glob -dir {} a] (porter) -2008-06-25 (bug fix)[1999119] Support TM packages in Sage Base (kupries) +2008-06-25 (bug fix)[1999119] Support TM packages in Safe Base (kupries) --- Released 8.6a1, June 25, 2008 --- See ChangeLog for details --- + +2008-06-29 (bug fix)[2004480] plug memory leaks (ade,porter,steffen) + +2008-07-01 (enhancement)[1905562] embed recursion limit in RE engine (fellows) + +2008-07-03 (bug fix)[1969717] fix package finding on Samba shares (jos) + +2008-07-03 (bug fix)[1987821] mem leak in [seek] on reflected chan (kupries) + +2008-07-13 (enhancement)[2017110] new Non-Recursive Evaluation implementation +enables deep Tcl evaluation stacks without deep C stacks. (sofer) + +2008-07-20 (enhancement)[2008248] dict->list preserve item intreps (pasadyn) + +2008-07-21 (bug fix)[582506] imported cmds now fire execution traces (sofer) + +2008-07-21 (bug fix)[2015723] [file] bad use of inodes on Windows (thoyts) + +2008-07-21 (new feature)[TIP 304] [chan pipe] (ferrieux) + +2008-07-21 (bug fix)[2021443] more consistent "wrong # args" msgs (nijtmans) + +2008-07-21 (enhancement) [info frame] returns file data in more cases (kupries) + +2008-07-29 (bug fix)[2030670] fix rare panic in TclStackFree (pasadyn,sofer) + +2008-08-01 Tcl_Finalize() no longer called implicitly on DLL_PROCESS_DETACH. +Programs that unload the Tcl library need to call Tcl_Finalize() first. + *** POTENTIAL INCOMPATIBILITY *** + +2008-08-05 (enhancement)[1994512] async connect logic simplified (jenglish) + +2008-08-06 (bug fix)[2040295] stopped supplying a workaround for bugs +in Itcl's use of [namespace code]. Itcl now supplies its own workaround. + *** POTENTIAL INCOMPATIBILITY for older Itcl releases *** + +2008-08-06 (bug fix)[2039178] repaired guard against dispatching oo methods +in a deleted interp. (porter) + +2008-08-08 tzdata updated to Olson's tzdata2008e (kenny) + +--- Released 8.6a2, August 15, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 2474d2381b0e75f2615d60dc21bb3d15943dd88e Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 8 Aug 2008 20:56:18 +0000 Subject: removed INCOMPAT flag --- changes | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/changes b/changes index 0846933..4421762 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.142 2008/08/08 20:43:17 dgp Exp $ +RCS: @(#) $Id: changes,v 1.143 2008/08/08 20:56:18 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7272,8 +7272,6 @@ enables deep Tcl evaluation stacks without deep C stacks. (sofer) 2008-07-29 (bug fix)[2030670] fix rare panic in TclStackFree (pasadyn,sofer) 2008-08-01 Tcl_Finalize() no longer called implicitly on DLL_PROCESS_DETACH. -Programs that unload the Tcl library need to call Tcl_Finalize() first. - *** POTENTIAL INCOMPATIBILITY *** 2008-08-05 (enhancement)[1994512] async connect logic simplified (jenglish) -- cgit v0.12 From 5c7cc56d32de30098fc443a2148de7a4c0479c2f Mon Sep 17 00:00:00 2001 From: das Date: Sat, 9 Aug 2008 00:13:36 +0000 Subject: fix warnings --- generic/tclExecute.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 213b99b..f9d8bae 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.401 2008/08/07 22:29:09 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.402 2008/08/09 00:13:36 das Exp $ */ #include "tclInt.h" @@ -1152,7 +1152,7 @@ TclStackFree( Interp *iPtr = (Interp *) interp; ExecEnv *eePtr; ExecStack *esPtr; - Tcl_Obj **markerPtr; + Tcl_Obj **markerPtr, *marker; if (iPtr == NULL || iPtr->execEnvPtr == NULL) { Tcl_Free((char *) freePtr); @@ -1168,15 +1168,16 @@ TclStackFree( eePtr = iPtr->execEnvPtr; esPtr = eePtr->execStackPtr; markerPtr = esPtr->markerPtr; + marker = *markerPtr; if ((freePtr != NULL) && (MEMSTART(markerPtr) != (Tcl_Obj **)freePtr)) { Tcl_Panic("TclStackFree: incorrect freePtr. Call out of sequence?"); } - esPtr->tosPtr = markerPtr-1; - esPtr->markerPtr = (Tcl_Obj **) *markerPtr; - if (*markerPtr) { - return; + esPtr->tosPtr = markerPtr - 1; + esPtr->markerPtr = (Tcl_Obj **) marker; + if (marker) { + return; } /* @@ -1750,11 +1751,11 @@ TclExecuteByteCode( * Bottom of allocated stack holds the NR data */ - int initLevel; + int initLevel = 0; /* NR_TEBC */ - BottomData *bottomPtr; + BottomData *bottomPtr = NULL; BottomData *oldBottomPtr = NULL; /* @@ -1762,12 +1763,12 @@ TclExecuteByteCode( * sporadically. */ - ExecStack *esPtr; - Tcl_Obj **initTosPtr; /* Stack top at start of execution. */ - ptrdiff_t *initCatchTop; /* Catch stack top at start of execution. */ - Var *compiledLocals; - Namespace *namespacePtr; - CmdFrame *bcFramePtr; /* TIP #280: Structure for tracking lines. */ + ExecStack *esPtr = NULL; + Tcl_Obj **initTosPtr = NULL; /* Stack top at start of execution. */ + ptrdiff_t *initCatchTop = NULL; /* Catch stack top at start of execution */ + Var *compiledLocals = NULL; + Namespace *namespacePtr = NULL; + CmdFrame *bcFramePtr = NULL; /* TIP #280 Structure for tracking lines */ Tcl_Obj **constants = &iPtr->execEnvPtr->constants[0]; /* @@ -1782,7 +1783,7 @@ TclExecuteByteCode( /* The current program counter. */ int instructionCount = 0; /* Counter that is used to work out when to * call Tcl_AsyncReady() */ - Tcl_Obj *auxObjList; /* Linked list of aux data, used for {*} and + Tcl_Obj *auxObjList = NULL; /* Linked list of aux data, used for {*} and * for same-level NR calls. */ int checkInterp = 0; /* Indicates when a check of interp readyness * is necessary. Set by CACHE_STACK_INFO() */ @@ -1792,7 +1793,7 @@ TclExecuteByteCode( * executing an instruction. */ - register int cleanup; + register int cleanup = 0; Tcl_Obj *objResultPtr; /* @@ -1812,7 +1813,7 @@ TclExecuteByteCode( int traceInstructions = (tclTraceExec == 3); char cmdNameBuf[21]; #endif - char *curInstName; + char *curInstName = NULL; /* * The execution uses a unified stack: first a BottomData, immediately -- cgit v0.12 From 11ef0e666d8b0e8b4b098afaff89c54e923c7c7c Mon Sep 17 00:00:00 2001 From: das Date: Sat, 9 Aug 2008 00:15:09 +0000 Subject: (PushMethodCallFrame): fix uninitialized efi name field --- generic/tclOOMethod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 9cd2678..f17b09b 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.11 2008/07/29 05:30:37 msofer Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.12 2008/08/09 00:15:09 das Exp $ */ #ifdef HAVE_CONFIG_H @@ -820,6 +820,7 @@ PushMethodCallFrame( fdPtr->efi.fields[0].proc = NULL; fdPtr->efi.fields[0].clientData = fdPtr->nameObj; if (pmPtr->gfivProc != NULL) { + fdPtr->efi.fields[1].name = ""; fdPtr->efi.fields[1].proc = pmPtr->gfivProc; fdPtr->efi.fields[1].clientData = pmPtr; } else { -- cgit v0.12 From 1b56971b4efb064c4db68d06e0a589d76cecd202 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 9 Aug 2008 00:16:06 +0000 Subject: (lrange-1.17): add test cleanup; whitespace --- tests/lrange.test | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/lrange.test b/tests/lrange.test index 443d8c9..f218d38 100644 --- a/tests/lrange.test +++ b/tests/lrange.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lrange.test,v 1.10 2008/07/23 22:50:42 ferrieux Exp $ +# RCS: @(#) $Id: lrange.test,v 1.11 2008/08/09 00:16:06 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -66,12 +66,12 @@ test lrange-1.15 {range of list elements} { test lrange-1.16 {list element quoting} { lrange {[append a .b]} 0 end } {{[append} a .b\]} -test lrange-1.17 {lrange in-place speed} { - set l [lrepeat 1000000 1] - set t1 [lindex [time {set l [lrange $l 0 end-1]}] 0] - set t2 [lindex [time {set l [lrange $l[unset l] 0 end-1]}] 0] - expr {($t1/$t2)>100} -} 1 +test lrange-1.17 {lrange in-place speed} -body { + set l [lrepeat 1000000 0] + set t1 [lindex [time {set l [lrange $l 0 end-1]}] 0] + set t2 [lindex [time {set l [lrange $l[unset l] 0 end-1]}] 0] + expr {($t1/$t2)>100} +} -result 1 -cleanup {unset l t1 t2} test lrange-2.1 {error conditions} { list [catch {lrange a b} msg] $msg } {1 {wrong # args: should be "lrange list first last"}} -- cgit v0.12 From 7d8ba3fe1315d64a484a885d7678e384fec71811 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 9 Aug 2008 00:20:04 +0000 Subject: * generic/tclExecute.c: fix warnings. * generic/tclOOMethod.c (PushMethodCallFrame): fix uninitialized efi name field. * tests/lrange.test (lrange-1.17): add test cleanup; whitespace. --- ChangeLog | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87fc970..760888b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,13 @@ -2008-08-06 Don Porter S +2008-08-09 Daniel Steffen + + * generic/tclExecute.c: fix warnings. + + * generic/tclOOMethod.c (PushMethodCallFrame): fix uninitialized efi + name field. + + * tests/lrange.test (lrange-1.17): add test cleanup; whitespace. + +2008-08-08 Don Porter S * changes: Updates for 8.6a2 release. @@ -21,7 +30,7 @@ 2008-08-07 Miguel Sofer * generic/tclBasic.c: Fix tailcalls falling out of tebc into - * generic/tclExecute.c: Tcl_EvalEx [Bug 2017946] + * generic/tclExecute.c: Tcl_EvalEx. [Bug 2017946] * generic/tclInt.h: 2008-08-06 Don Porter S @@ -29,11 +38,11 @@ * generic/tclOO.c: Revised TclOO's check for an interp being deleted during handling of object command deletion. The old code was relying on documented features of command delete - traces that do not in fact work. [Bug 2039178]. + traces that do not in fact work. [Bug 2039178] * tests/oo.test (oo-26.*): Added tests that demonstrate failure of TclOO to check for various kinds of invalid bytecode - during method dispatch. [Bug 2037727]. + during method dispatch. [Bug 2037727] 2008-08-06 Miguel Sofer @@ -41,7 +50,7 @@ could not trigger before TclOO: the number of locals was being read from the Proc, which can under some circumstance be out of sync with the localCache's. Found by dgp while investigating - [Bug 2037727] + [Bug 2037727]. * library/init.tcl (::unknown): removed the [namespace inscope] hack that was maintained for Itcl -- cgit v0.12 From 872dbedfd8d5080ae12fb1f69f6e112c6f3ecc2b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 9 Aug 2008 22:20:52 +0000 Subject: * generic/tclBasic.c: slight cleanup * generic/tclCompile.h: * generic/tclExecute.c: --- ChangeLog | 6 ++++ generic/tclBasic.c | 13 +++---- generic/tclCompile.h | 3 +- generic/tclExecute.c | 99 +++++++++++++++++++++++++++++----------------------- 4 files changed, 70 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 760888b..40a3228 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-09 Miguel Sofer + + * generic/tclBasic.c: slight cleanup + * generic/tclCompile.h: + * generic/tclExecute.c: + 2008-08-09 Daniel Steffen * generic/tclExecute.c: fix warnings. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1133c4c..b1ceab7 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.351 2008/08/07 04:13:50 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.352 2008/08/09 22:20:56 msofer Exp $ */ #include "tclInt.h" @@ -777,9 +777,11 @@ Tcl_CreateInterp(void) */ Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit", - /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(0), NULL); + /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE), + NULL); Tcl_NRCreateCommand(interp, "::tcl::unsupported::tailcall", - /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(1), NULL); + /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_TAILCALL_TYPE), + NULL); #ifdef USE_DTRACE /* @@ -4274,6 +4276,7 @@ NRCallTEBC( case TCL_NR_BC_TYPE: return TclExecuteByteCode(interp, data[1]); case TCL_NR_ATEXIT_TYPE: + case TCL_NR_TAILCALL_TYPE: /* For atProcExit and tailcalls */ Tcl_SetResult(interp, "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); @@ -7880,9 +7883,7 @@ TclNRAtProcExitObjCmd( */ TclNRAddCallback(interp, NRAtProcExitEval, listPtr, nsPtr, NULL, NULL); - TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_ATEXIT_TYPE), clientData, - NULL, NULL); - + TclNRAddCallback(interp, NRCallTEBC, clientData, NULL, NULL, NULL); return TCL_OK; } diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 1653ea5..53a2c95 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.101 2008/08/04 14:09:31 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.102 2008/08/09 22:20:56 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -841,6 +841,7 @@ MODULE_SCOPE Tcl_NRPostProc NRCallTEBC; #define TCL_NR_BC_TYPE 0 #define TCL_NR_ATEXIT_TYPE 1 +#define TCL_NR_TAILCALL_TYPE 2 /* *---------------------------------------------------------------- diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f9d8bae..d2c656e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.402 2008/08/09 00:13:36 das Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.403 2008/08/09 22:20:57 msofer Exp $ */ #include "tclInt.h" @@ -1844,27 +1844,26 @@ TclExecuteByteCode( NR_DATA_BURY(); - if (type == TCL_NR_BC_TYPE) { - /* - * A request to run a bytecode: record this level's state - * variables, swap codePtr and start running the new one. - */ - - NR_DATA_BURY(); - codePtr = param; - } else if (type == TCL_NR_ATEXIT_TYPE) { - /* - * A request to perform a command at exit: schedule the command at - * its proper place, then continue or just drop the present bytecode if - * this is a tailcall. - */ - - TEOV_callback *newPtr = TOP_CB(interp); - - TOP_CB(interp) = newPtr->nextPtr; + switch (type) { + case TCL_NR_BC_TYPE: + /* + * A request to run a bytecode: record this level's state + * variables, swap codePtr and start running the new one. + */ + + NR_DATA_BURY(); + codePtr = param; + break; + case TCL_NR_ATEXIT_TYPE: { + /* + * A request to perform a command at exit: put it in the stack + * and continue eexec'ing the current bytecode + */ + + TEOV_callback *newPtr = TOP_CB(interp); - isTailcall = PTR2INT(param); - if (!isTailcall) { + TOP_CB(interp) = newPtr->nextPtr; + #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " atProcExit request received\n"); @@ -1877,8 +1876,17 @@ TclExecuteByteCode( Tcl_DecrRefCount(objPtr); } goto nonRecursiveCallReturn; - } else { - + } + case TCL_NR_TAILCALL_TYPE: { + /* + * A request to perform a tailcall: put it at the front of the + * atExit stack and abandon the current bytecode. + */ + + TEOV_callback *newPtr = TOP_CB(interp); + + TOP_CB(interp) = newPtr->nextPtr; + isTailcall = 1; #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " Tailcall request received\n"); @@ -1891,7 +1899,7 @@ TclExecuteByteCode( TCL_STATIC); goto checkForCatch; } - + newPtr->nextPtr = NULL; if (!bottomPtr->atExitPtr) { newPtr->nextPtr = NULL; @@ -1900,9 +1908,9 @@ TclExecuteByteCode( /* * There are already atExit callbacks: run last. */ - + TEOV_callback *tmpPtr = bottomPtr->atExitPtr; - + while (tmpPtr->nextPtr) { tmpPtr = tmpPtr->nextPtr; } @@ -1910,8 +1918,8 @@ TclExecuteByteCode( } goto abnormalReturn; } - } else { - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } nested = 1; @@ -7800,24 +7808,27 @@ TclExecuteByteCode( NRE_ASSERT(TOP_CB(interp)->procPtr == NRCallTEBC); NRE_ASSERT(result == TCL_OK); - if (type == TCL_NR_BC_TYPE) { - /* - * One of the callbacks requested a new execution: a tailcall! - * Start the new bytecode. - */ - - goto nonRecursiveCallStart; - } else if (type == TCL_NR_ATEXIT_TYPE) { - TOP_CB(iPtr) = callbackPtr->nextPtr; - TCLNR_FREE(interp, callbackPtr); - - Tcl_SetResult(interp, - "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); - result = TCL_ERROR; - goto rerunCallbacks; + switch (type) { + case TCL_NR_BC_TYPE: + /* + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. + */ + + goto nonRecursiveCallStart; + case TCL_NR_ATEXIT_TYPE: + case TCL_NR_TAILCALL_TYPE: + TOP_CB(iPtr) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); + + Tcl_SetResult(interp, + "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); + result = TCL_ERROR; + goto rerunCallbacks; + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } -- cgit v0.12 From 0424a43c3010587b193ad4675b83670e0a0849eb Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 10 Aug 2008 15:35:33 +0000 Subject: * generic/tclProc.c: completely removed ProcCompileProc, which was a fix for [Bug 1482718]. This is not needed at least since varReform, where the local variable data at runtime is read from the CallFrame and/or the LocalCache. --- ChangeLog | 7 +++++ generic/tclProc.c | 89 +++---------------------------------------------------- 2 files changed, 11 insertions(+), 85 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40a3228..33365d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-10 Miguel Sofer + + * generic/tclProc.c: completely removed ProcCompileProc, which was + a fix for [Bug 1482718]. This is not needed at least since + varReform, where the local variable data at runtime is read from + the CallFrame and/or the LocalCache. + 2008-08-09 Miguel Sofer * generic/tclBasic.c: slight cleanup diff --git a/generic/tclProc.c b/generic/tclProc.c index 1fe9b39..12ae064 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.155 2008/08/04 14:09:32 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.156 2008/08/10 15:35:36 msofer Exp $ */ #include "tclInt.h" @@ -53,10 +53,7 @@ static void MakeProcError(Tcl_Interp *interp, static void MakeLambdaError(Tcl_Interp *interp, Tcl_Obj *procNameObj); static int SetLambdaFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); -static int ProcCompileProc(Tcl_Interp *interp, Proc *procPtr, - Tcl_Obj *bodyPtr, Namespace *nsPtr, - const char *description, const char *procName, - Proc **procPtrPtr); + static Tcl_NRPostProc ApplyNR2; static Tcl_NRPostProc InterpProcNR2; static Tcl_NRPostProc Uplevel_Callback; @@ -1586,9 +1583,9 @@ PushProcCallFrame( } } else { doCompilation: - result = ProcCompileProc(interp, procPtr, procPtr->bodyPtr, nsPtr, + result = TclProcCompileProc(interp, procPtr, procPtr->bodyPtr, nsPtr, (isLambda ? "body of lambda term" : "body of proc"), - TclGetString(objv[isLambda]), &procPtr); + TclGetString(objv[isLambda])); if (result != TCL_OK) { return result; } @@ -1906,23 +1903,6 @@ TclProcCompileProc( const char *description, /* string describing this body of code. */ const char *procName) /* Name of this procedure. */ { - return ProcCompileProc(interp, procPtr, bodyPtr, nsPtr, description, - procName, NULL); -} - -static int -ProcCompileProc( - Tcl_Interp *interp, /* Interpreter containing procedure. */ - Proc *procPtr, /* Data associated with procedure. */ - Tcl_Obj *bodyPtr, /* Body of proc. (Usually procPtr->bodyPtr, - * but could be any code fragment compiled in - * the context of this procedure.) */ - Namespace *nsPtr, /* Namespace containing procedure. */ - const char *description, /* string describing this body of code. */ - const char *procName, /* Name of this procedure. */ - Proc **procPtrPtr) /* Points to storage where a replacement - * (Proc *) value may be written. */ -{ Interp *iPtr = (Interp *) interp; int i; Tcl_CallFrame *framePtr; @@ -1998,67 +1978,6 @@ ProcCompileProc( */ saveProcPtr = iPtr->compiledProcPtr; - - if (procPtrPtr != NULL && procPtr->refCount > 1) { - Tcl_Command token; - Tcl_CmdInfo info; - Proc *newProc = (Proc *) ckalloc(sizeof(Proc)); - - newProc->iPtr = procPtr->iPtr; - newProc->refCount = 1; - newProc->cmdPtr = procPtr->cmdPtr; - token = (Tcl_Command) newProc->cmdPtr; - newProc->bodyPtr = Tcl_DuplicateObj(bodyPtr); - bodyPtr = newProc->bodyPtr; - Tcl_IncrRefCount(bodyPtr); - newProc->numArgs = procPtr->numArgs; - - newProc->numCompiledLocals = newProc->numArgs; - newProc->firstLocalPtr = NULL; - newProc->lastLocalPtr = NULL; - localPtr = procPtr->firstLocalPtr; - for (i=0; inumArgs; i++, localPtr=localPtr->nextPtr) { - CompiledLocal *copy = (CompiledLocal *) ckalloc((unsigned) - (sizeof(CompiledLocal) - sizeof(localPtr->name) - + localPtr->nameLength + 1)); - - if (newProc->firstLocalPtr == NULL) { - newProc->firstLocalPtr = newProc->lastLocalPtr = copy; - } else { - newProc->lastLocalPtr->nextPtr = copy; - newProc->lastLocalPtr = copy; - } - copy->nextPtr = NULL; - copy->nameLength = localPtr->nameLength; - copy->frameIndex = localPtr->frameIndex; - copy->flags = localPtr->flags; - copy->defValuePtr = localPtr->defValuePtr; - if (copy->defValuePtr) { - Tcl_IncrRefCount(copy->defValuePtr); - } - copy->resolveInfo = localPtr->resolveInfo; - strcpy(copy->name, localPtr->name); - } - - /* - * Reset the ClientData - */ - - Tcl_GetCommandInfoFromToken(token, &info); - if (info.objClientData == (ClientData) procPtr) { - info.objClientData = (ClientData) newProc; - } - if (info.clientData == (ClientData) procPtr) { - info.clientData = (ClientData) newProc; - } - if (info.deleteData == (ClientData) procPtr) { - info.deleteData = (ClientData) newProc; - } - Tcl_SetCommandInfoFromToken(token, &info); - - procPtr->refCount--; - *procPtrPtr = procPtr = newProc; - } iPtr->compiledProcPtr = procPtr; (void) TclPushStackFrame(interp, &framePtr, -- cgit v0.12 From d661e47c352a7501f151528ad5b6e94e8de7bd46 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 10 Aug 2008 15:58:58 +0000 Subject: remove unused vars --- generic/tclProc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generic/tclProc.c b/generic/tclProc.c index 12ae064..bee78ca 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.156 2008/08/10 15:35:36 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.157 2008/08/10 15:58:58 msofer Exp $ */ #include "tclInt.h" @@ -1904,11 +1904,9 @@ TclProcCompileProc( const char *procName) /* Name of this procedure. */ { Interp *iPtr = (Interp *) interp; - int i; Tcl_CallFrame *framePtr; Proc *saveProcPtr; ByteCode *codePtr = bodyPtr->internalRep.otherValuePtr; - CompiledLocal *localPtr; /* * If necessary, compile the procedure's body. The compiler will allocate -- cgit v0.12 From f5d8f2016dad44e597753ca1f41d317a49495bae Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 10 Aug 2008 23:06:17 +0000 Subject: made variable Tcl_ChannelType *parentType in TransFormSeek(Wide)?Proc a const. This variable is only used in a Tcl_Channel(Wide)?SeekProc call, where it is handled as a const, so we might as well consider it a const a few lines earlier. --- generic/tclIOGT.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index 9c891f1..a4ba61a 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * CVS: $Id: tclIOGT.c,v 1.20 2007/12/13 15:23:18 dgp Exp $ + * CVS: $Id: tclIOGT.c,v 1.21 2008/08/10 23:06:17 nijtmans Exp $ */ #include "tclInt.h" @@ -802,7 +802,7 @@ TransformSeekProc( { TransformChannelData *dataPtr = instanceData; Tcl_Channel parent = Tcl_GetStackedChannel(dataPtr->self); - Tcl_ChannelType *parentType = Tcl_GetChannelType(parent); + const Tcl_ChannelType *parentType = Tcl_GetChannelType(parent); Tcl_DriverSeekProc *parentSeekProc = Tcl_ChannelSeekProc(parentType); if ((offset == 0) && (mode == SEEK_CUR)) { @@ -866,7 +866,7 @@ TransformWideSeekProc( { TransformChannelData *dataPtr = instanceData; Tcl_Channel parent = Tcl_GetStackedChannel(dataPtr->self); - Tcl_ChannelType *parentType = Tcl_GetChannelType(parent); + const Tcl_ChannelType *parentType = Tcl_GetChannelType(parent); Tcl_DriverSeekProc *parentSeekProc = Tcl_ChannelSeekProc(parentType); Tcl_DriverWideSeekProc *parentWideSeekProc = Tcl_ChannelWideSeekProc(parentType); -- cgit v0.12 From 1f91a55358e101b75b320e2835c41d491c1814bd Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 11 Aug 2008 14:39:37 +0000 Subject: crc field from zlib data should be treated as unsigned for 64bit support [Bug 2046846] --- ChangeLog | 5 +++++ library/http/http.tcl | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33365d7..1ae3885 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-11 Pat Thoyts + + * library/http/http.tcl: crc field from zlib data should be treated as + unsigned for 64bit support [Bug 2046846] + 2008-08-10 Miguel Sofer * generic/tclProc.c: completely removed ProcCompileProc, which was diff --git a/library/http/http.tcl b/library/http/http.tcl index 84a1da2..c5ad8d6 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.67 2008/03/12 10:01:02 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.68 2008/08/11 14:39:39 patthoyts Exp $ package require Tcl 8.4 # Keep this in sync with pkgIndex.tcl and with the install directories @@ -1406,7 +1406,7 @@ proc http::Gunzip {data} { incr pos } - binary scan [string range $data end-7 end] ii crc size + binary scan [string range $data end-7 end] iuiu crc size set inflated [zlib inflate [string range $data $pos end-8]] if { $crc != [set chk [zlib crc32 $inflated]] } { -- cgit v0.12 From 407fb5d1cadffc43d3ff6262d66bb5a2c8a36b4a Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 11 Aug 2008 15:59:50 +0000 Subject: * library/http/http.tcl: Bump http version to 2.7.1 to account * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This * unix/Makefile.in: release of http now requires a * win/Makefile.in: dependency on Tcl 8.5 to be able to * win/makefile.bc: use the unsigned formats in the * win/makefile.vc: [binary scan] command. --- ChangeLog | 9 +++++++++ library/http/http.tcl | 6 +++--- library/http/pkgIndex.tcl | 4 ++-- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- win/makefile.bc | 8 ++++---- win/makefile.vc | 4 ++-- 7 files changed, 26 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ae3885..8a454d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-08-11 Don Porter + + * library/http/http.tcl: Bump http version to 2.7.1 to account + * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This + * unix/Makefile.in: release of http now requires a + * win/Makefile.in: dependency on Tcl 8.5 to be able to + * win/makefile.bc: use the unsigned formats in the + * win/makefile.vc: [binary scan] command. + 2008-08-11 Pat Thoyts * library/http/http.tcl: crc field from zlib data should be treated as diff --git a/library/http/http.tcl b/library/http/http.tcl index c5ad8d6..cd12953 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,12 +8,12 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.68 2008/08/11 14:39:39 patthoyts Exp $ +# RCS: @(#) $Id: http.tcl,v 1.69 2008/08/11 15:59:51 dgp Exp $ -package require Tcl 8.4 +package require Tcl 8.5.0 # Keep this in sync with pkgIndex.tcl and with the install directories # in Makefiles -package provide http 2.7 +package provide http 2.7.1 namespace eval http { # Allow resourcing to not clobber existing data diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 870019a..00a7e78 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,4 +1,4 @@ # Tcl package index file, version 1.1 -if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded http 2.7 [list tclPkgSetup $dir http 2.7 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +if {![package vsatisfies [package provide Tcl] 8.5.0} {return} +package ifneeded http 2.7.1 [list tclPkgSetup $dir http 2.7.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in index adb897f..3786372 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.242 2008/07/31 14:43:49 msofer Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.243 2008/08/11 15:59:51 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -799,8 +799,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.7 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.tm; + @echo "Installing package http 2.7.1 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/http-2.7.1.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index 5e32d59..d8a10dd 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.132 2008/06/06 19:46:42 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.133 2008/08/11 15:59:51 dgp Exp $ VERSION = @TCL_VERSION@ @@ -636,8 +636,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.7 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.tm; + @echo "Installing package http 2.7.1 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/http-2.7.1.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ diff --git a/win/makefile.bc b/win/makefile.bc index 2989b67..69d6268 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -427,10 +427,10 @@ install-libraries: -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http1.0" -@copy "$(ROOT)\library\http1.0\http.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" -@copy "$(ROOT)\library\http1.0\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" - @echo installing http2.4 - -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http2.4" - -@copy "$(ROOT)\library\http\http.tcl" "$(SCRIPT_INSTALL_DIR)\http2.4" - -@copy "$(ROOT)\library\http\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http2.4" + @echo installing http2.7 + -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http2.7" + -@copy "$(ROOT)\library\http\http.tcl" "$(SCRIPT_INSTALL_DIR)\http2.7" + -@copy "$(ROOT)\library\http\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http2.7" @echo installing opt0.4 -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\opt0.4" -@copy "$(ROOT)\library\opt\optparse.tcl" "$(SCRIPT_INSTALL_DIR)\opt0.4" diff --git a/win/makefile.vc b/win/makefile.vc index 73b8410..10d604e 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.186 2008/06/25 10:25:12 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.187 2008/08/11 15:59:52 dgp Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -1051,7 +1051,7 @@ install-libraries: tclConfig install-msgs install-tzdata "$(SCRIPT_INSTALL_DIR)\opt0.4\" @echo Installing package http $(PKG_HTTP_VER) as a Tcl Module @$(COPY) "$(ROOT)\library\http\http.tcl" \ - "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\http-$(PKG_HTTP_VER).tm" + "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\http-$(PKG_HTTP_VER).tm" @echo Installing package msgcat $(PKG_MSGCAT_VER) as a Tcl Module @$(COPY) "$(ROOT)\library\msgcat\msgcat.tcl" \ "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\msgcat-$(PKG_MSGCAT_VER).tm" -- cgit v0.12 From 60540fe921222a09d82443fcf37083e68e566afa Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 11 Aug 2008 17:32:10 +0000 Subject: &#(*& typo! --- library/http/pkgIndex.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 00a7e78..7263414 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,4 +1,4 @@ # Tcl package index file, version 1.1 -if {![package vsatisfies [package provide Tcl] 8.5.0} {return} +if {![package vsatisfies [package provide Tcl] 8.5.0]} {return} package ifneeded http 2.7.1 [list tclPkgSetup $dir http 2.7.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] -- cgit v0.12 From ca80199d12c1842a8046ed38269b20bbdbe2ca80 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 11 Aug 2008 20:40:32 +0000 Subject: * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggered * tests/proc.test: by procbody::test::proc. See [Bug 2043636]. Added a test case demonstrating the leak before the fix. Fixed a few spelling errors in test descriptions as well. --- ChangeLog | 7 +++++++ generic/tclProc.c | 26 +++++++++++++++++++++++--- tests/proc.test | 36 +++++++++++++++++++++++++++++++----- 3 files changed, 61 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a454d8..8deab7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-11 Andreas Kupries + + * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggered + * tests/proc.test: by procbody::test::proc. See [Bug 2043636]. + Added a test case demonstrating the leak before the fix. Fixed a + few spelling errors in test descriptions as well. + 2008-08-11 Don Porter * library/http/http.tcl: Bump http version to 2.7.1 to account diff --git a/generic/tclProc.c b/generic/tclProc.c index bee78ca..9427f55 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.157 2008/08/10 15:58:58 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.158 2008/08/11 20:40:40 andreas_kupries Exp $ */ #include "tclInt.h" @@ -255,6 +255,7 @@ Tcl_ProcObjCmd( if (contextPtr->line && (contextPtr->nline >= 4) && (contextPtr->line[3] >= 0)) { int isNew; + Tcl_HashEntry* hePtr; CmdFrame *cfPtr = (CmdFrame *) ckalloc(sizeof(CmdFrame)); cfPtr->level = -1; @@ -271,8 +272,27 @@ Tcl_ProcObjCmd( cfPtr->cmd.str.cmd = NULL; cfPtr->cmd.str.len = 0; - Tcl_SetHashValue(Tcl_CreateHashEntry(iPtr->linePBodyPtr, - (char *) procPtr, &isNew), cfPtr); + hePtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr, (char *) procPtr, + &isNew); + if (!isNew) { + /* + * Get the old command frame and release it. See also + * TclProcCleanupProc in this file. Currently it seems as + * if only the procbodytest::proc command of the testsuite + * is able to trigger this situation. + */ + + CmdFrame* cfOldPtr = (CmdFrame *) Tcl_GetHashValue(hePtr); + + if (cfOldPtr->type == TCL_LOCATION_SOURCE) { + Tcl_DecrRefCount(cfOldPtr->data.eval.path); + cfOldPtr->data.eval.path = NULL; + } + ckfree((char *) cfOldPtr->line); + cfOldPtr->line = NULL; + ckfree((char *) cfOldPtr); + } + Tcl_SetHashValue(hePtr, cfPtr); } /* diff --git a/tests/proc.test b/tests/proc.test index 8fdc159..6ef6811 100644 --- a/tests/proc.test +++ b/tests/proc.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: proc.test,v 1.19 2006/11/03 00:34:53 hobbs Exp $ +# RCS: @(#) $Id: proc.test,v 1.20 2008/08/11 20:40:41 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -26,6 +26,8 @@ if {[catch {package require procbodytest}]} { testConstraint procbodytest 1 } +testConstraint memory [llength [info commands memory]] + catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename p ""} catch {rename {} ""} @@ -233,7 +235,7 @@ test proc-4.3 {TclCreateProc, procbody obj, too many args} procbodytest { catch {rename t ""} set result } {procedure "t": arg list contains 3 entries, precompiled header expects 1} -test proc-4.4 {TclCreateProc, procbody obj, inconsitent arg name} procbodytest { +test proc-4.4 {TclCreateProc, procbody obj, inconsistent arg name} procbodytest { catch { proc p {x y z} { set v [join [list $x $y $z]] @@ -249,7 +251,7 @@ test proc-4.4 {TclCreateProc, procbody obj, inconsitent arg name} procbodytest { catch {rename t ""} set result } {procedure "t": formal parameter 1 is inconsistent with precompiled body} -test proc-4.5 {TclCreateProc, procbody obj, inconsitent arg default type} procbodytest { +test proc-4.5 {TclCreateProc, procbody obj, inconsistent arg default type} procbodytest { catch { proc p {x y {z Z}} { set v [join [list $x $y $z]] @@ -265,7 +267,7 @@ test proc-4.5 {TclCreateProc, procbody obj, inconsitent arg default type} procbo catch {rename t ""} set result } {procedure "t": formal parameter 2 is inconsistent with precompiled body} -test proc-4.6 {TclCreateProc, procbody obj, inconsitent arg default type} procbodytest { +test proc-4.6 {TclCreateProc, procbody obj, inconsistent arg default type} procbodytest { catch { proc p {x y z} { set v [join [list $x $y $z]] @@ -281,7 +283,7 @@ test proc-4.6 {TclCreateProc, procbody obj, inconsitent arg default type} procbo catch {rename t ""} set result } {procedure "t": formal parameter 2 is inconsistent with precompiled body} -test proc-4.7 {TclCreateProc, procbody obj, inconsitent arg default value} procbodytest { +test proc-4.7 {TclCreateProc, procbody obj, inconsistent arg default value} procbodytest { catch { proc p {x y {z Z}} { set v [join [list $x $y $z]] @@ -297,6 +299,30 @@ test proc-4.7 {TclCreateProc, procbody obj, inconsitent arg default value} procb catch {rename t ""} set result } {procedure "t": formal parameter "z" has default value inconsistent with precompiled body} +test proc-4.8 {TclCreateProc, procbody obj, no leak on multiple iterations} -setup { + proc getbytes {} { + set lines [split [memory info] "\n"] + lindex $lines 3 3 + } + proc px x { + set y [string tolower $x] + return "$x:$y" + } + px x +} -constraints {procbodytest memory} -body { + + set end [getbytes] + for {set i 0} {$i < 5} {incr i} { + + procbodytest::proc tx x px + + set tmp $end + set end [getbytes] + } + set leakedBytes [expr {$end - $tmp}] +} -cleanup { + rename getbytes {} +} -result 0 test proc-5.1 {Bytecompiling noop; test for correct argument substitution} { proc p args {} ; # this will be bytecompiled into t -- cgit v0.12 From 1a86c2e86267a3ddb6c0543e27e524eabff94442 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 11 Aug 2008 21:04:42 +0000 Subject: * library/tm.tcl: Added a 'package provide' command to the generated ifneeded scripts of Tcl Modules, for early detection of conflicts between the version specified through the file name and a 'provide' command in the module implementation, if any. Note that this change also now allows Tcl Modules to not provide a 'provide' command at all, and declaring their version only through their filename. --- ChangeLog | 8 ++++++++ library/tm.tcl | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8deab7f..d7656fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-08-11 Andreas Kupries + * library/tm.tcl: Added a 'package provide' command to the + generated ifneeded scripts of Tcl Modules, for early detection of + conflicts between the version specified through the file name and + a 'provide' command in the module implementation, if any. Note + that this change also now allows Tcl Modules to not provide a + 'provide' command at all, and declaring their version only through + their filename. + * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggered * tests/proc.test: by procbody::test::proc. See [Bug 2043636]. Added a test case demonstrating the leak before the fix. Fixed a diff --git a/library/tm.tcl b/library/tm.tcl index f6ffe5d..4f8e09e 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -254,7 +254,8 @@ proc ::tcl::tm::UnknownHandler {original name args} { # means something else without the namespace # specifier. - package ifneeded $pkgname $pkgversion [::list source -encoding utf-8 $file] + package ifneeded $pkgname $pkgversion \ + "[::list package provide $pkgname $pkgversion];[::list source -encoding utf-8 $file]" # We abort in this unknown handler only if we got # a satisfying candidate for the requested -- cgit v0.12 From a069279c8c46c16594f83200022a91c434a74e64 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 11 Aug 2008 21:29:45 +0000 Subject: Remove the 8.5+ requirement to avoid problems with shipping http as a tcl module. --- ChangeLog | 4 ++++ library/http/http.tcl | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7656fa..f8f570a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-11 Pat Thoyts + + * library/http/http.tcl: Remove 8.5 requirement. + 2008-08-11 Andreas Kupries * library/tm.tcl: Added a 'package provide' command to the diff --git a/library/http/http.tcl b/library/http/http.tcl index cd12953..ef0817c 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.69 2008/08/11 15:59:51 dgp Exp $ +# RCS: @(#) $Id: http.tcl,v 1.70 2008/08/11 21:29:47 patthoyts Exp $ package require Tcl 8.5.0 # Keep this in sync with pkgIndex.tcl and with the install directories @@ -1406,10 +1406,10 @@ proc http::Gunzip {data} { incr pos } - binary scan [string range $data end-7 end] iuiu crc size + binary scan [string range $data end-7 end] ii crc size set inflated [zlib inflate [string range $data $pos end-8]] - - if { $crc != [set chk [zlib crc32 $inflated]] } { + set chk [zlib crc32 $inflated] + if { ($crc & 0xffffffff) != ($chk & 0xffffffff)} { return -code error "invalid data: checksum mismatch $crc != $chk" } return $inflated -- cgit v0.12 From d012e417ea577645b17692aed2c240f5051dd815 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 11 Aug 2008 21:58:03 +0000 Subject: * library/http/http.tcl: Remove 8.5 requirement. * library/http/pkgIndex.tcl: * unix/Makefile.in: * win/Makefile.in: * win/makefile.vc: --- ChangeLog | 4 ++++ library/http/http.tcl | 4 ++-- library/http/pkgIndex.tcl | 2 +- unix/Makefile.in | 4 ++-- win/Makefile.in | 4 ++-- win/makefile.vc | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8f570a..46ff727 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ 2008-08-11 Pat Thoyts * library/http/http.tcl: Remove 8.5 requirement. + * library/http/pkgIndex.tcl: + * unix/Makefile.in: + * win/Makefile.in: + * win/makefile.vc: 2008-08-11 Andreas Kupries diff --git a/library/http/http.tcl b/library/http/http.tcl index ef0817c..046329b 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,9 +8,9 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.70 2008/08/11 21:29:47 patthoyts Exp $ +# RCS: @(#) $Id: http.tcl,v 1.71 2008/08/11 21:58:07 dgp Exp $ -package require Tcl 8.5.0 +package require Tcl 8.4 # Keep this in sync with pkgIndex.tcl and with the install directories # in Makefiles package provide http 2.7.1 diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 7263414..932017a 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,4 +1,4 @@ # Tcl package index file, version 1.1 -if {![package vsatisfies [package provide Tcl] 8.5.0]} {return} +if {![package vsatisfies [package provide Tcl] 8.4]} {return} package ifneeded http 2.7.1 [list tclPkgSetup $dir http 2.7.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in index 3786372..a2395eb 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.243 2008/08/11 15:59:51 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.244 2008/08/11 21:58:07 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -800,7 +800,7 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; @echo "Installing package http 2.7.1 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/http-2.7.1.tm; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.1.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index d8a10dd..2f5df7c 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.133 2008/08/11 15:59:51 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.134 2008/08/11 21:58:09 dgp Exp $ VERSION = @TCL_VERSION@ @@ -637,7 +637,7 @@ install-libraries: libraries install-tzdata install-msgs $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; @echo "Installing package http 2.7.1 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/http-2.7.1.tm; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.1.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ diff --git a/win/makefile.vc b/win/makefile.vc index 10d604e..99698d5 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.187 2008/08/11 15:59:52 dgp Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.188 2008/08/11 21:58:09 dgp Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -1051,7 +1051,7 @@ install-libraries: tclConfig install-msgs install-tzdata "$(SCRIPT_INSTALL_DIR)\opt0.4\" @echo Installing package http $(PKG_HTTP_VER) as a Tcl Module @$(COPY) "$(ROOT)\library\http\http.tcl" \ - "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\http-$(PKG_HTTP_VER).tm" + "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\http-$(PKG_HTTP_VER).tm" @echo Installing package msgcat $(PKG_MSGCAT_VER) as a Tcl Module @$(COPY) "$(ROOT)\library\msgcat\msgcat.tcl" \ "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\msgcat-$(PKG_MSGCAT_VER).tm" -- cgit v0.12 From 82d9d352c73e5c04dbe6d8ca0e3349dbdf5e187c Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 12 Aug 2008 15:00:23 +0000 Subject: * changes: Updates for 8.6a2 release. --- ChangeLog | 6 +++++- changes | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46ff727..e713337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-08 Don Porter S + + * changes: Updates for 8.6a2 release. + 2008-08-11 Pat Thoyts * library/http/http.tcl: Remove 8.5 requirement. @@ -57,7 +61,7 @@ * tests/lrange.test (lrange-1.17): add test cleanup; whitespace. -2008-08-08 Don Porter S +2008-08-08 Don Porter * changes: Updates for 8.6a2 release. diff --git a/changes b/changes index 4421762..7cfe44a 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.143 2008/08/08 20:56:18 dgp Exp $ +RCS: @(#) $Id: changes,v 1.144 2008/08/12 15:00:23 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7284,4 +7284,9 @@ in a deleted interp. (porter) 2008-08-08 tzdata updated to Olson's tzdata2008e (kenny) +2008-08-11 (bug fix)[2046846] 64bit support for http zlib crc (thoyts) +=> http 2.7.1 + +2008-08-11 (enhancement) automatic [package provide] for TMs (kupries) + --- Released 8.6a2, August 15, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 548d5bd4026829d315d293d2fce922b155fcdf4f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 12 Aug 2008 15:10:31 +0000 Subject: * README: Bump version number to 8.6a2 * generic/tcl.h: * library/init.tcl: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/configure.in: * unix/configure: autoconf-2.59 * win/configure: --- ChangeLog | 11 + README | 4 +- generic/tcl.h | 6 +- library/init.tcl | 4 +- tools/tcl.wse.in | 2 +- unix/configure | 12564 ++++++++++++++++++++++++++-------------------------- unix/configure.in | 4 +- unix/tcl.spec | 4 +- win/configure | 2 +- win/configure.in | 4 +- 10 files changed, 6313 insertions(+), 6292 deletions(-) diff --git a/ChangeLog b/ChangeLog index e713337..105e01f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2008-08-08 Don Porter S + * README: Bump version number to 8.6a2 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + * changes: Updates for 8.6a2 release. 2008-08-11 Pat Thoyts diff --git a/README b/README index 766ac68..de57917 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tcl - This is the Tcl 8.6a1 source distribution. + This is the Tcl 8.6a2 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.69 2008/06/19 15:37:02 dgp Exp $ +RCS: @(#) $Id: README,v 1.70 2008/08/12 15:10:32 dgp Exp $ Contents -------- diff --git a/generic/tcl.h b/generic/tcl.h index c98cef2..1feda6f 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.263 2008/07/27 22:18:23 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.264 2008/08/12 15:10:33 dgp Exp $ */ #ifndef _TCL @@ -60,10 +60,10 @@ extern "C" { #define TCL_MAJOR_VERSION 8 #define TCL_MINOR_VERSION 6 #define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TCL_RELEASE_SERIAL 1 +#define TCL_RELEASE_SERIAL 2 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6a1" +#define TCL_PATCH_LEVEL "8.6a2" /* * The following definitions set up the proper options for Windows compilers. diff --git a/library/init.tcl b/library/init.tcl index 3e47642..b02c3e5 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.109 2008/08/06 19:46:26 msofer Exp $ +# RCS: @(#) $Id: init.tcl,v 1.110 2008/08/12 15:10:36 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6a1 +package require -exact Tcl 8.6a2 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in index a1f7813..cfaad3f 100644 --- a/tools/tcl.wse.in +++ b/tools/tcl.wse.in @@ -12,7 +12,7 @@ item: Global Log Pathname=%MAINDIR%\INSTALL.LOG Message Font=MS Sans Serif Font Size=8 - Disk Label=tcl8.6a1 + Disk Label=tcl8.6a2 Disk Filename=setup Patch Flags=0000000000000001 Patch Threshold=85 diff --git a/unix/configure b/unix/configure index 499a397..55aac71 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,175 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -774,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -837,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -902,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -932,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1006,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1068,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1112,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1132,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1171,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1269,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1286,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1352,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1459,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1473,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1495,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1505,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1527,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1538,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1552,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1590,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1623,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1671,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1697,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1710,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1739,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1756,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1780,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1794,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a1" +TCL_PATCH_LEVEL="a2" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ @@ -1816,23 +1357,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } - - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1841,37 +1383,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1894,8 +1435,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1908,34 +1449,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1948,51 +1487,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2005,34 +1529,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2046,7 +1610,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2057,7 +1621,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2075,23 +1638,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2104,38 +1666,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2148,45 +1708,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2199,35 +1743,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2252,77 +1782,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2334,21 +1834,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2367,27 +1865,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2398,8 +1891,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2413,14 +1907,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2440,20 +1934,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2471,12 +1959,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2499,49 +1987,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2557,118 +2046,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2684,12 +2093,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2723,17 +2132,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2748,116 +2152,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +continue fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2890,8 +2444,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2925,22 +2479,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2949,10 +2505,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2962,22 +2517,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2988,7 +2545,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3006,8 +2562,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3030,22 +2586,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3054,10 +2612,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3067,22 +2624,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3093,7 +2652,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3116,170 +2674,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3303,31 +2714,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3383,7 +2798,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3403,27 +2817,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3436,14 +2841,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3466,9 +2869,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3482,35 +2885,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3522,8 +2928,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3563,36 +2969,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3603,17 +3012,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3624,37 +3033,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3663,22 +3076,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3686,10 +3101,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3713,18 +3127,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3739,17 +3160,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3760,37 +3181,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3799,22 +3224,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3822,10 +3249,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3849,18 +3275,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3875,17 +3308,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3896,37 +3329,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3935,22 +3372,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3958,10 +3397,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3985,18 +3423,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4015,17 +3460,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4036,37 +3481,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4075,22 +3524,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4098,10 +3549,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4125,18 +3575,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4205,17 +3662,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4226,37 +3683,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4265,22 +3726,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4288,10 +3751,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4315,18 +3777,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4383,17 +3852,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4404,37 +3873,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4443,22 +3916,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4466,10 +3941,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4493,18 +3967,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4519,17 +4000,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4540,37 +4021,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4579,22 +4064,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4602,10 +4089,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4629,18 +4115,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4660,19 +4153,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4683,37 +4175,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4722,22 +4218,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4745,10 +4243,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4772,19 +4269,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4804,8 +4307,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4827,35 +4330,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4866,13 +4373,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4904,8 +4411,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4918,53 +4425,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4977,8 +4487,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4991,53 +4501,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5050,8 +4563,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5064,53 +4577,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5121,8 +4637,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5135,53 +4651,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5189,8 +4708,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5203,53 +4722,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5277,9 +4799,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5305,60 +4827,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5367,8 +4897,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 -echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 +echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6 if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5395,59 +4925,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_attr_get_np -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_attr_get_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_pthread_attr_get_np || defined __stub___pthread_attr_get_np +#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np) choke me +#else +char (*f) () = pthread_attr_get_np; +#endif +#ifdef __cplusplus +} #endif int main () { -return pthread_attr_get_np (); +return f != pthread_attr_get_np; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_pthread_attr_get_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_pthread_attr_get_np=no +ac_cv_func_pthread_attr_get_np=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6 if test $ac_cv_func_pthread_attr_get_np = yes; then tcl_ok=yes else @@ -5460,8 +4999,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_ATTR_GET_NP 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 -echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 +echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5484,8 +5023,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6 if test $tcl_cv_grep_pthread_attr_get_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5494,8 +5033,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 -echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 +echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6 if test "${ac_cv_func_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5522,59 +5061,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef pthread_getattr_np -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_getattr_np (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_pthread_getattr_np || defined __stub___pthread_getattr_np +#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np) choke me +#else +char (*f) () = pthread_getattr_np; +#endif +#ifdef __cplusplus +} #endif int main () { -return pthread_getattr_np (); +return f != pthread_getattr_np; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_pthread_getattr_np=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_pthread_getattr_np=no +ac_cv_func_pthread_getattr_np=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6 if test $ac_cv_func_pthread_getattr_np = yes; then tcl_ok=yes else @@ -5587,8 +5135,8 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD_GETATTR_NP 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 -echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 +echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5611,8 +5159,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 +echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6 if test $tcl_cv_grep_pthread_getattr_np = missing ; then cat >>confdefs.h <<\_ACEOF @@ -5628,9 +5176,9 @@ _ACEOF for ac_func in pthread_get_stacksize_np do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5656,60 +5204,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5724,8 +5280,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5733,15 +5289,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5753,11 +5309,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5786,8 +5342,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5814,67 +5370,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5891,43 +5456,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5938,8 +5506,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5956,59 +5524,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6019,37 +5590,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6058,22 +5633,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6081,10 +5658,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6108,18 +5684,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -6152,8 +5735,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6180,59 +5763,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -6240,8 +5832,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6268,64 +5860,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6338,53 +5939,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_socket_setsockopt=yes -else + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_setsockopt=yes +else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6397,8 +6001,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6425,59 +6029,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6485,8 +6098,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6513,64 +6126,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6583,53 +6205,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6642,15 +6267,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6660,12 +6285,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6684,8 +6309,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6698,34 +6323,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6738,41 +6361,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6781,31 +6390,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6815,8 +6424,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6840,37 +6449,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6884,24 +6496,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6928,16 +6540,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6950,53 +6562,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -7036,8 +6651,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7050,27 +6665,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7096,8 +6709,8 @@ fi CC=${CC}_r ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7175,10 +6788,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7198,8 +6813,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7212,53 +6827,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7290,8 +6908,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7304,53 +6922,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7411,8 +7032,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7425,53 +7046,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7541,8 +7165,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7555,53 +7179,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7733,8 +7360,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7757,37 +7384,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7876,8 +7506,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7903,8 +7533,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7935,8 +7565,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7962,8 +7592,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -8027,8 +7657,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8051,37 +7681,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8090,8 +7723,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8114,37 +7747,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8170,8 +7806,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8194,37 +7830,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8243,8 +7882,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8267,37 +7906,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8324,21 +7966,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8372,32 +8014,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8408,8 +8053,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8425,8 +8070,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8450,39 +8095,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8818,25 +8466,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8847,37 +8495,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8886,22 +8538,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8909,10 +8563,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8936,18 +8589,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -8956,8 +8616,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -9032,8 +8692,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9056,37 +8716,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9121,13 +8784,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9272,22 +8935,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9297,8 +8960,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9333,11 +8996,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9358,8 +9021,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9381,28 +9044,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9419,34 +9087,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9478,28 +9149,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9516,34 +9192,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9575,28 +9254,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9613,34 +9297,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9653,17 +9340,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9686,31 +9373,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9732,31 +9423,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9765,20 +9459,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9800,34 +9494,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_struct_dirent64=yes -else - echo "$as_me: failed program was:" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_struct_dirent64=yes +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9836,8 +9534,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9859,34 +9557,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9900,9 +9602,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9928,60 +9630,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9990,8 +9700,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10013,31 +9723,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10048,11 +9762,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -10062,8 +9776,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10080,8 +9794,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -10090,22 +9803,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10128,36 +9846,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10167,11 +9889,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10182,22 +9904,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10213,10 +9940,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10224,41 +9949,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10271,16 +9982,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10309,9 +10017,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10337,60 +10045,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10414,9 +10130,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10442,78 +10158,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10540,59 +10266,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10603,8 +10338,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10631,59 +10366,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10694,8 +10438,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10722,59 +10466,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10785,8 +10538,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10813,59 +10566,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -10883,8 +10645,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10911,59 +10673,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -10975,8 +10746,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11003,63 +10774,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11087,34 +10867,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11132,8 +10916,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11160,63 +10944,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11247,34 +11040,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11283,8 +11080,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11315,34 +11112,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11362,8 +11163,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11390,63 +11191,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11477,34 +11287,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11513,8 +11327,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11545,34 +11359,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11592,8 +11410,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11620,63 +11438,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getgrgid_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getgrgid_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11707,34 +11534,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11743,8 +11574,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11775,34 +11606,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11822,8 +11657,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11850,63 +11685,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11937,34 +11781,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11973,8 +11821,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12005,34 +11853,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12085,8 +11937,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12113,63 +11965,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12200,34 +12061,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12236,8 +12101,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12268,34 +12133,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12304,8 +12173,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12334,34 +12203,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12382,8 +12255,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12410,63 +12283,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12500,34 +12382,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12536,8 +12422,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12571,34 +12457,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12632,19 +12522,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12655,37 +12544,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12694,22 +12587,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12717,10 +12612,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12744,19 +12638,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12768,8 +12668,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12797,22 +12697,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12825,10 +12716,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12852,22 +12741,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12880,10 +12760,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12909,22 +12787,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12937,10 +12806,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12968,22 +12835,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12996,10 +12854,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13026,22 +12882,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13054,10 +12901,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13085,22 +12930,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13113,14 +12949,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13150,8 +12984,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13172,38 +13006,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13226,8 +13064,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13249,8 +13087,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13266,42 +13104,44 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h +ac_cv_struct_tm=sys/time.h fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13315,19 +13155,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13338,37 +13177,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13377,22 +13220,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13400,10 +13245,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13427,19 +13271,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13451,8 +13301,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13476,34 +13326,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13512,8 +13366,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13538,28 +13392,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13580,37 +13439,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_tm_tm_zone=no +ac_cv_member_struct_tm_tm_zone=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13627,9 +13489,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then + echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6 +if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13639,66 +13501,71 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif int main () { -#ifndef tzname - (void) tzname; -#endif - +atoi(*tzname); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_tzname=no +ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 + if test $ac_cv_var_tzname = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 _ACEOF + fi +fi -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF -fi - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } -if test "${ac_cv_var_tzname+set}" = set; then +for ac_func in gmtime_r localtime_r mktime +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13707,148 +13574,85 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -int -main () -{ -return tzname[0][0]; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_var_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_var_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 -_ACEOF - - fi -fi - - - - - -for ac_func in gmtime_r localtime_r mktime -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include #endif #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13858,8 +13662,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13880,34 +13684,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13916,8 +13724,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13938,34 +13746,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13978,8 +13790,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14002,34 +13814,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14040,8 +13856,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14064,34 +13880,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14107,8 +13927,9 @@ _ACEOF # in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } + +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14130,28 +13951,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14169,37 +13995,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14214,8 +14043,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14242,59 +14071,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14311,8 +14149,8 @@ fi # data, this checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14331,9 +14169,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14349,9 +14187,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14359,22 +14197,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14387,17 +14216,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14408,8 +14237,8 @@ esac # {The replacement define is in compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14436,59 +14265,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14512,8 +14350,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14540,59 +14378,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14600,8 +14447,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14620,22 +14467,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14648,13 +14486,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14662,10 +14498,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14679,8 +14517,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14707,59 +14545,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14767,8 +14614,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14788,22 +14635,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14816,13 +14654,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14830,10 +14666,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14846,8 +14684,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14874,59 +14712,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14934,8 +14781,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14955,22 +14802,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14983,13 +14821,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14997,10 +14833,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15015,8 +14853,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15043,59 +14881,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15103,8 +14950,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15140,22 +14987,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15168,18 +15006,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15197,8 +15035,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15209,47 +15047,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15260,8 +15101,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15272,47 +15113,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15323,8 +15167,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15335,59 +15179,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15409,8 +15256,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15425,8 +15272,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15452,34 +15299,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15488,8 +15339,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15500,47 +15351,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_intptr_t=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15550,8 +15404,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15576,36 +15430,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15616,8 +15474,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15628,47 +15486,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15678,8 +15539,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15705,36 +15566,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15753,8 +15618,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15781,59 +15646,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15853,8 +15727,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15880,36 +15754,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15924,8 +15801,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15952,59 +15829,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -16012,8 +15898,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16026,53 +15912,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16081,8 +15970,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16095,53 +15984,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16150,10 +16042,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -16170,8 +16064,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16198,59 +16092,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16259,8 +16162,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16287,59 +16190,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16353,8 +16265,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16377,8 +16289,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16394,8 +16306,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16417,34 +16329,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16452,8 +16368,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16477,34 +16393,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16517,8 +16437,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16553,22 +16473,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16581,13 +16492,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16601,28 +16510,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16633,37 +16542,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16672,22 +16585,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16695,10 +16610,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16722,18 +16636,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16744,8 +16665,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16767,35 +16688,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16804,8 +16729,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16817,9 +16742,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16845,60 +16770,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16912,8 +16845,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16936,36 +16869,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16983,9 +16919,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17011,60 +16947,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17077,19 +17021,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17100,37 +17043,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17139,22 +17086,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17162,10 +17111,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17189,19 +17137,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17217,9 +17171,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17245,60 +17199,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17312,19 +17274,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17335,37 +17296,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17374,22 +17339,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17397,10 +17364,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17424,19 +17390,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17452,9 +17424,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17480,60 +17452,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17546,9 +17526,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17574,60 +17554,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17661,19 +17649,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17684,37 +17671,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17723,22 +17714,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17746,10 +17739,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17773,19 +17765,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17798,8 +17796,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17830,37 +17828,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17881,8 +17882,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17911,36 +17912,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17961,19 +17965,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17984,37 +17987,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18023,22 +18030,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18046,10 +18055,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18073,19 +18081,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18101,19 +18115,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18124,37 +18137,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18163,22 +18180,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18186,10 +18205,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18213,19 +18231,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18238,8 +18262,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18266,12 +18290,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18284,8 +18308,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18293,27 +18317,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18321,8 +18345,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18330,24 +18354,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18371,8 +18395,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18385,8 +18409,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18394,26 +18418,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18424,37 +18448,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18463,22 +18491,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18486,10 +18516,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18513,18 +18542,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18538,8 +18574,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18555,32 +18591,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18602,8 +18637,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18632,15 +18667,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18654,16 +18689,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18675,7 +18710,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18688,7 +18723,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18855,7 +18890,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18875,58 +18910,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18935,36 +18951,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -18993,45 +19025,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19041,43 +19045,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -19091,19 +19060,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19111,120 +19079,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19233,28 +19240,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19263,14 +19249,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19278,19 +19281,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19298,7 +19312,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19312,20 +19326,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19336,42 +19348,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19387,52 +19417,40 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19443,476 +19461,368 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - case $ac_mode in - :F) - # - # CONFIG_FILE - # +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19920,52 +19830,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/unix/configure.in b/unix/configure.in index 097ca7f..1caed5e 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.185 2008/07/13 09:03:41 msofer Exp $ +# RCS: @(#) $Id: configure.in,v 1.186 2008/08/12 15:10:40 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -27,7 +27,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a1" +TCL_PATCH_LEVEL="a2" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/tcl.spec b/unix/tcl.spec index da3757d..529fc1f 100644 --- a/unix/tcl.spec +++ b/unix/tcl.spec @@ -1,11 +1,11 @@ -# $Id: tcl.spec,v 1.39 2008/06/19 15:37:11 dgp Exp $ +# $Id: tcl.spec,v 1.40 2008/08/12 15:10:40 dgp Exp $ # This file is the basis for a binary Tcl RPM for Linux. %{!?directory:%define directory /usr/local} Name: tcl Summary: Tcl scripting language development environment -Version: 8.6a1 +Version: 8.6a2 Release: 2 License: BSD Group: Development/Languages diff --git a/win/configure b/win/configure index b9e9705..ad83af3 100755 --- a/win/configure +++ b/win/configure @@ -1272,7 +1272,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a1" +TCL_PATCH_LEVEL="a2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index af989ff..ba282da 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.106 2008/06/19 15:37:13 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.107 2008/08/12 15:10:40 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -16,7 +16,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a1" +TCL_PATCH_LEVEL="a2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 -- cgit v0.12 From 06c2fab3218c8dc8a7a7582a182178f42c89964a Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 12 Aug 2008 17:45:24 +0000 Subject: * generic/tclProc.c (TclProcCompileProc): On recompile of a proc, clear away any entries on the CompiledLocal list from the previous compile. This will prevent compile of temporary variables in the proc body from growing the localCache arbitrarily large. --- ChangeLog | 5 +++++ generic/tclProc.c | 26 +++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 105e01f..7ece66a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-08-08 Don Porter S + * generic/tclProc.c (TclProcCompileProc): On recompile of + a proc, clear away any entries on the CompiledLocal list from the + previous compile. This will prevent compile of temporary variables + in the proc body from growing the localCache arbitrarily large. + * README: Bump version number to 8.6a2 * generic/tcl.h: * library/init.tcl: diff --git a/generic/tclProc.c b/generic/tclProc.c index 9427f55..495e194 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.158 2008/08/11 20:40:40 andreas_kupries Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.159 2008/08/12 17:45:25 dgp Exp $ */ #include "tclInt.h" @@ -1998,6 +1998,30 @@ TclProcCompileProc( saveProcPtr = iPtr->compiledProcPtr; iPtr->compiledProcPtr = procPtr; + if (procPtr->numCompiledLocals > procPtr->numArgs) { + CompiledLocal *clPtr = procPtr->firstLocalPtr; + CompiledLocal *lastPtr = NULL; + int i, numArgs = procPtr->numArgs; + + for (i = 0; i < numArgs; i++) { + lastPtr = clPtr; + clPtr = clPtr->nextPtr; + } + + if (lastPtr) { + lastPtr->nextPtr = NULL; + } else { + procPtr->firstLocalPtr = NULL; + } + procPtr->lastLocalPtr = lastPtr; + while (clPtr) { + CompiledLocal *toFree = clPtr; + clPtr = clPtr->nextPtr; + ckfree((char *) toFree); + } + procPtr->numCompiledLocals = procPtr->numArgs; + } + (void) TclPushStackFrame(interp, &framePtr, (Tcl_Namespace *) nsPtr, /* isProcCallFrame */ 0); -- cgit v0.12 From 96184da694c1e5f119c8eea1bfff507bc151b3f3 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 12 Aug 2008 17:51:02 +0000 Subject: * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check for bytecode validity. [Bug 2037727] --- ChangeLog | 3 +++ generic/tclOOMethod.c | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ece66a..baf8db6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-08-08 Don Porter S + * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check + for bytecode validity. [Bug 2037727] + * generic/tclProc.c (TclProcCompileProc): On recompile of a proc, clear away any entries on the CompiledLocal list from the previous compile. This will prevent compile of temporary variables diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index f17b09b..c977a3b 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.12 2008/08/09 00:15:09 das Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.13 2008/08/12 17:51:03 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -787,14 +787,17 @@ PushMethodCallFrame( fdPtr->cmd.clientData = &fdPtr->efi; pmPtr->procPtr->cmdPtr = &fdPtr->cmd; - if (pmPtr->procPtr->bodyPtr->typePtr != &tclByteCodeType) { + /* + * [Bug 2037727] Always call TclProcCompileProc so that we check not + * only that we have bytecode, but also that it remains valid. + */ + result = TclProcCompileProc(interp, pmPtr->procPtr, pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, "body of method", namePtr); if (result != TCL_OK) { return result; } - } /* * Make the stack frame and fill it out with information about this call. -- cgit v0.12 From d5c768d731847b62f9f74833e68518558dbfa782 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 12 Aug 2008 23:19:15 +0000 Subject: * generic/tclOOInfo.c (InfoObjectDefnCmd, InfoObjectMixinsCmd): fix # args displayed. [Bug 2048676] --- ChangeLog | 5 +++++ generic/tclOOInfo.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index baf8db6..6db6c9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-12 Jeff Hobbs + + * generic/tclOOInfo.c (InfoObjectDefnCmd, InfoObjectMixinsCmd): + fix # args displayed. [Bug 2048676] + 2008-08-08 Don Porter S * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index ca5830b..bc7b4fb 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.5 2008/07/13 23:15:22 nijtmans Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.6 2008/08/12 23:19:15 hobbs Exp $ */ #ifdef HAVE_CONFIG_H @@ -226,7 +226,7 @@ InfoObjectDefnCmd( Tcl_Obj *argsObj; if (objc != 3) { - Tcl_WrongNumArgs(interp, 3, objv, "objName methodName"); + Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); return TCL_ERROR; } @@ -599,7 +599,7 @@ InfoObjectMixinsCmd( int i; if (objc != 2) { - Tcl_WrongNumArgs(interp, 3, objv, "objName"); + Tcl_WrongNumArgs(interp, 1, objv, "objName"); return TCL_ERROR; } oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); -- cgit v0.12 From fce0abd807701f8f0b1cbc8f820d3254efdd7f32 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 13 Aug 2008 18:14:43 +0000 Subject: * generic/tclFileName.c: Fix for errors handling -types {} * tests/fileName.test: option to [glob]. [Bug 1750300] Thanks to Matthias Kraft and George Peter Staplin. --- ChangeLog | 6 ++++++ generic/tclFileName.c | 6 +++++- tests/fileName.test | 39 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6db6c9b..4afbdb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-13 Don Porter + + * generic/tclFileName.c: Fix for errors handling -types {} + * tests/fileName.test: option to [glob]. [Bug 1750300] + Thanks to Matthias Kraft and George Peter Staplin. + 2008-08-12 Jeff Hobbs * generic/tclOOInfo.c (InfoObjectDefnCmd, InfoObjectMixinsCmd): diff --git a/generic/tclFileName.c b/generic/tclFileName.c index ce2ee53..999a685 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.89 2008/07/21 21:25:21 nijtmans Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.90 2008/08/13 18:14:44 dgp Exp $ */ #include "tclInt.h" @@ -1412,6 +1412,9 @@ Tcl_GlobObjCmd( */ Tcl_ListObjLength(interp, typePtr, &length); + if (length <= 0) { + goto skipTypes; + } globTypes = (Tcl_GlobTypeData *) TclStackAlloc(interp, sizeof(Tcl_GlobTypeData)); globTypes->type = 0; @@ -1529,6 +1532,7 @@ Tcl_GlobObjCmd( } } + skipTypes: /* * Now we perform the actual glob below. This may involve joining together * the pattern arguments, dealing with particular file types etc. We use a diff --git a/tests/fileName.test b/tests/fileName.test index 27cb661..f0788f4 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.54 2008/07/21 21:25:22 nijtmans Exp $ +# RCS: @(#) $Id: fileName.test,v 1.55 2008/08/13 18:14:44 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1455,6 +1455,43 @@ test fileName-19.1 {ensure that [Bug 1325099] stays fixed} { list [file exists ~//.nonexistant_file] [file exists ~///.nonexistant_file] } {0 0} +test fileName-20.1 {Bug 1750300} -setup { + set d [makeDirectory foo] + makeFile {} TAGS $d +} -body { + llength [glob -nocomplain -directory $d -- TAGS tags Tags] +} -cleanup { + removeFile TAGS $d + removeDirectory foo +} -result 1 +test fileName-20.2 {Bug 1750300} -setup { + set d [makeDirectory foo] + makeFile {} TAGS $d +} -body { + llength [glob -nocomplain -directory $d -types {} -- TAGS tags Tags] +} -cleanup { + removeFile TAGS $d + removeDirectory foo +} -result 1 +test fileName-20.3 {Bug 1750300} -setup { + set d [makeDirectory foo] + makeFile {} TAGS $d +} -body { + llength [glob -nocomplain -directory $d -types {} -- *U*] +} -cleanup { + removeFile TAGS $d + removeDirectory foo +} -result 0 +test fileName-20.4 {Bug 1750300} -setup { + set d [makeDirectory foo] + makeFile {} TAGS $d +} -body { + llength [glob -nocomplain -directory $d -types {} -- URGENT Urgent] +} -cleanup { + removeFile TAGS $d + removeDirectory foo +} -result 0 + # cleanup catch {file delete -force C:/globTest} cd [temporaryDirectory] -- cgit v0.12 From d0122a5130593dd68e1d2ebcda75380f031156d7 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 13 Aug 2008 22:02:27 +0000 Subject: * tests/nre.test: added test for large {*}-expansion effects --- ChangeLog | 4 ++++ tests/nre.test | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4afbdb0..b48007d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-13 Miguel Sofer + + * tests/nre.test: added test for large {*}-expansion effects + 2008-08-13 Don Porter * generic/tclFileName.c: Fix for errors handling -types {} diff --git a/tests/nre.test b/tests/nre.test index 28861de..8e98991 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.2 2008/08/04 15:32:40 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.3 2008/08/13 22:02:27 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -236,6 +236,22 @@ test nre-7.5 {[foreach] is not recursive} -constraints {knownbug} -setup { unset abs } -result {{0 2 2 0} 0} +test nre-8.1 {nre and {*}} -body { + # force an expansion that grows the evaluation stack, check that nre + # adapts the bottomPtr. This crashes on failure. + + proc inner {} { + set long [lrepeat 1000000 1] + list {*}$long + } + proc outer {} inner + lrange [outer] 0 2 +} -cleanup { + rename inner {} + rename outer {} +} -result {1 1 1} + + # # Basic TclOO tests # -- cgit v0.12 From edb0651e6bc56331193b87b671cf154fbb556624 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 13 Aug 2008 23:04:13 +0000 Subject: * unix/tcl.m4 (SC_PATH_X): check for libX11.dylib in addition to libX11.so et al. --- unix/tcl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 1659a12..c7a13c6 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2407,7 +2407,7 @@ AC_DEFUN([SC_PATH_X], [ XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do - if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then + if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then AC_MSG_RESULT([$i]) XLIBSW="-L$i -lX11" x_libraries="$i" -- cgit v0.12 From e48a13a4a47c8dabc6edd925ae0f0d7eef67e047 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 13 Aug 2008 23:07:07 +0000 Subject: * unix/Makefile.in: ensure Makefile shell is /bin/bash for * unix/configure.in (SunOS): DTrace-enabled build on Solaris. (followup to 2008-06-12) [Bug 2016584] --- unix/Makefile.in | 4 ++-- unix/configure.in | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index a2395eb..3ed9008 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.244 2008/08/11 21:58:07 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.245 2008/08/13 23:07:07 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -139,7 +139,7 @@ NO_DEPRECATED_FLAGS = # Some versions of make, like SGI's, use the following variable to determine # which shell to use for executing commands: -SHELL = /bin/sh +SHELL = @MAKEFILE_SHELL@ # Tcl used to let the configure script choose which program to use for # installing, but there are just too many different versions of "install" diff --git a/unix/configure.in b/unix/configure.in index 1caed5e..87ea9df 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.186 2008/08/12 15:10:40 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.187 2008/08/13 23:07:07 das Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -657,6 +657,7 @@ if test $tcl_ok = yes; then test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi AC_MSG_CHECKING([whether to enable DTrace support]) +MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then AC_DEFINE(USE_DTRACE, 1, [Are we building with DTrace support?]) DTRACE_SRC="\${DTRACE_SRC}" @@ -667,6 +668,7 @@ if test $tcl_ok = yes; then # Need to create an intermediate object file to ensure tclDTrace.o # gets included when linking against the static tcl library. STLIB_LD='stlib_ld () { /usr/ccs/bin/ld -r -o $${1%.a}.o "$${@:2}" && '"${STLIB_LD}"' $${1} $${1%.a}.o ; } && stlib_ld' + MAKEFILE_SHELL='/bin/bash' # Force use of Sun ar and ranlib, the GNU versions choke on # tclDTrace.o and the combined object file above. AR='/usr/ccs/bin/ar' @@ -868,6 +870,7 @@ AC_SUBST(INSTALL_TZDATA) AC_SUBST(DTRACE_SRC) AC_SUBST(DTRACE_HDR) AC_SUBST(DTRACE_OBJ) +AC_SUBST(MAKEFILE_SHELL) AC_SUBST(BUILD_DLTEST) AC_SUBST(TCL_PACKAGE_PATH) -- cgit v0.12 From 403d0af61f5e408620c7f57e40ef2d209b37835f Mon Sep 17 00:00:00 2001 From: das Date: Wed, 13 Aug 2008 23:08:38 +0000 Subject: * unix/tclUnixThrd.c: remove unused TclpThreadGetStackSize() * generic/tclInt.h: and related ifdefs and autoconf tests. * unix/tclUnixPort.h: [Bug 2017264] (jenglish) * unix/tcl.m4: --- ChangeLog | 16 +++++++++ generic/tclInt.h | 3 +- unix/tcl.m4 | 37 --------------------- unix/tclUnixPort.h | 20 +----------- unix/tclUnixThrd.c | 95 +----------------------------------------------------- 5 files changed, 19 insertions(+), 152 deletions(-) diff --git a/ChangeLog b/ChangeLog index b48007d..e02c752 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-08-14 Daniel Steffen + + * unix/tclUnixThrd.c: remove unused TclpThreadGetStackSize() + * generic/tclInt.h: and related ifdefs and autoconf tests. + * unix/tclUnixPort.h: [Bug 2017264] (jenglish) + * unix/tcl.m4: + + * unix/Makefile.in: ensure Makefile shell is /bin/bash for + * unix/configure.in (SunOS): DTrace-enabled build on Solaris. + (followup to 2008-06-12) [Bug 2016584] + + * unix/tcl.m4 (SC_PATH_X): check for libX11.dylib in addition to + libX11.so et al. + + * unix/configure: autoconf-2.59 + 2008-08-13 Miguel Sofer * tests/nre.test: added test for large {*}-expansion effects diff --git a/generic/tclInt.h b/generic/tclInt.h index 5b8f104..8992044 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.389 2008/08/07 04:13:52 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.390 2008/08/13 23:08:38 das Exp $ */ #ifndef _TCLINT @@ -2759,7 +2759,6 @@ MODULE_SCOPE void * TclThreadStorageKeyGet(Tcl_ThreadDataKey *keyPtr); MODULE_SCOPE void TclThreadStorageKeySet(Tcl_ThreadDataKey *keyPtr, void *data); MODULE_SCOPE void TclpThreadExit(int status); -MODULE_SCOPE size_t TclpThreadGetStackSize(void); MODULE_SCOPE void TclRememberCondition(Tcl_Condition *mutex); MODULE_SCOPE void TclRememberJoinableThread(Tcl_ThreadId id); MODULE_SCOPE void TclRememberMutex(Tcl_Mutex *mutex); diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c7a13c6..c5be8f0 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -676,44 +676,7 @@ AC_DEFUN([SC_ENABLE_THREADS], [ # Does the pthread-implementation provide # 'pthread_attr_setstacksize' ? - - ac_saved_libs=$LIBS - LIBS="$LIBS $THREADS_LIBS" AC_CHECK_FUNCS(pthread_attr_setstacksize) - AC_CHECK_FUNC(pthread_attr_get_np,tcl_ok=yes,tcl_ok=no) - if test $tcl_ok = yes ; then - AC_DEFINE(HAVE_PTHREAD_ATTR_GET_NP, 1, - [Do we want a BSD-like thread-attribute interface?]) - AC_CACHE_CHECK([for pthread_attr_get_np declaration], - tcl_cv_grep_pthread_attr_get_np, [ - AC_EGREP_HEADER(pthread_attr_get_np, pthread.h, - tcl_cv_grep_pthread_attr_get_np=present, - tcl_cv_grep_pthread_attr_get_np=missing)]) - if test $tcl_cv_grep_pthread_attr_get_np = missing ; then - AC_DEFINE(ATTRGETNP_NOT_DECLARED, 1, - [Is pthread_attr_get_np() declared in ?]) - fi - else - AC_CHECK_FUNC(pthread_getattr_np,tcl_ok=yes,tcl_ok=no) - if test $tcl_ok = yes ; then - AC_DEFINE(HAVE_PTHREAD_GETATTR_NP, 1, - [Do we want a Linux-like thread-attribute interface?]) - AC_CACHE_CHECK([for pthread_getattr_np declaration], - tcl_cv_grep_pthread_getattr_np, [ - AC_EGREP_HEADER(pthread_getattr_np, pthread.h, - tcl_cv_grep_pthread_getattr_np=present, - tcl_cv_grep_pthread_getattr_np=missing)]) - if test $tcl_cv_grep_pthread_getattr_np = missing ; then - AC_DEFINE(GETATTRNP_NOT_DECLARED, 1, - [Is pthread_getattr_np declared in ?]) - fi - fi - fi - if test $tcl_ok = no; then - # Darwin thread stacksize API - AC_CHECK_FUNCS(pthread_get_stacksize_np) - fi - LIBS=$ac_saved_libs else TCL_THREADS=0 fi diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index f925b49..8fc6574 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.66 2008/05/02 10:27:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.67 2008/08/13 23:08:38 das Exp $ */ #ifndef _TCLUNIXPORT @@ -602,24 +602,6 @@ EXTERN char * TclpInetNtoa(struct in_addr); * #define gmtime(x) TclpGmtime(x) */ # undef inet_ntoa # define inet_ntoa(x) TclpInetNtoa(x) -# ifdef HAVE_PTHREAD_ATTR_GET_NP -# define TclpPthreadGetAttrs pthread_attr_get_np -# ifdef ATTRGETNP_NOT_DECLARED -/* - * Assume it is in pthread_np.h if it isn't in pthread.h. [Bug 1064882] - * We might need to revisit this in the future. :^( - */ -# include -# include -# endif -# else -# ifdef HAVE_PTHREAD_GETATTR_NP -# define TclpPthreadGetAttrs pthread_getattr_np -# ifdef GETATTRNP_NOT_DECLARED -EXTERN int pthread_getattr_np _ANSI_ARGS_((pthread_t, pthread_attr_t *)); -# endif -# endif /* HAVE_PTHREAD_GETATTR_NP */ -# endif /* HAVE_PTHREAD_ATTR_GET_NP */ #endif /* TCL_THREADS */ /* diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index d122f41..eac1bc8 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixThrd.c,v 1.59 2008/07/24 21:54:42 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixThrd.c,v 1.60 2008/08/13 23:08:39 das Exp $ */ #include "tclInt.h" @@ -200,99 +200,6 @@ TclpThreadExit( } #endif /* TCL_THREADS */ -#ifdef TCL_THREADS -/* - *---------------------------------------------------------------------- - * - * TclpThreadGetStackSize -- - * - * This procedure returns the size of the current thread's stack. - * - * Results: - * Stack size (in bytes?) or -1 for error or 0 for undeterminable. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -size_t -TclpThreadGetStackSize(void) -{ - size_t stackSize = 0; -#if defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && defined(TclpPthreadGetAttrs) - pthread_attr_t threadAttr; /* This will hold the thread attributes for - * the current thread. */ -#ifdef __GLIBC__ - /* - * Fix for [Bug 1815573] - * - * DESCRIPTION: - * On linux TclpPthreadGetAttrs (which is pthread_attr_get_np) may return - * bogus values on the initial thread. - * - * ASSUMPTIONS: - * There seems to be no api to determine if we are on the initial - * thread. The simple scheme implemented here assumes: - * 1. The first Tcl interp to be created lives in the initial thread. If - * this assumption is not true, the fix is to call - * TclpThreadGetStackSize from the initial thread previous to - * creating any Tcl interpreter. In this case, especially if another - * Tcl interpreter may be created in the initial thread, it might be - * better to enable the second branch in the #if below - * 2. There will be no races in creating the first Tcl interp - ie, the - * second Tcl interp will be created only after the first call to - * Tcl_CreateInterp returns. - * - * These assumptions are satisfied by tclsh. Embedders on linux may want - * to check their validity, and possibly adapt the code on failing to meet - * them. - */ - - static int initialized = 0; - - if (!initialized) { - initialized = 1; - return 0; - } else { -#else - { -#endif - if (pthread_attr_init(&threadAttr) != 0) { - return -1; - } - if (TclpPthreadGetAttrs(pthread_self(), &threadAttr) != 0) { - pthread_attr_destroy(&threadAttr); - return (size_t)-1; - } - } - - - if (pthread_attr_getstacksize(&threadAttr, &stackSize) != 0) { - pthread_attr_destroy(&threadAttr); - return (size_t)-1; - } - pthread_attr_destroy(&threadAttr); -#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) -#ifdef __APPLE__ - /* - * On Darwin, the API below does not return the correct stack size for the - * main thread (which is not a real pthread), so fallback to getrlimit(). - */ - if (!pthread_main_np()) -#endif - stackSize = pthread_get_stacksize_np(pthread_self()); -#else - /* - * Cannot determine the real stack size of this thread. The caller might - * want to try looking at the process accounting limits instead. - */ -#endif - return stackSize; -} -#endif /* TCL_THREADS */ - /* *---------------------------------------------------------------------- * -- cgit v0.12 From 888bcc6e0d9b7a8192cd0b44b674df936fc093b7 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 13 Aug 2008 23:13:29 +0000 Subject: autoconf-2.59 --- unix/configure | 388 +-------------------------------------------------------- 1 file changed, 5 insertions(+), 383 deletions(-) diff --git a/unix/configure b/unix/configure index 55aac71..f82fc19 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' # Initialize some variables set by options. @@ -4793,9 +4793,6 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m # Does the pthread-implementation provide # 'pthread_attr_setstacksize' ? - ac_saved_libs=$LIBS - LIBS="$LIBS $THREADS_LIBS" - for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -4897,385 +4894,6 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for pthread_attr_get_np" >&5 -echo $ECHO_N "checking for pthread_attr_get_np... $ECHO_C" >&6 -if test "${ac_cv_func_pthread_attr_get_np+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define pthread_attr_get_np to an innocuous variant, in case declares pthread_attr_get_np. - For example, HP-UX 11i declares gettimeofday. */ -#define pthread_attr_get_np innocuous_pthread_attr_get_np - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pthread_attr_get_np (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef pthread_attr_get_np - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_attr_get_np (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_attr_get_np) || defined (__stub___pthread_attr_get_np) -choke me -#else -char (*f) () = pthread_attr_get_np; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != pthread_attr_get_np; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_pthread_attr_get_np=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_pthread_attr_get_np=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_pthread_attr_get_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_attr_get_np" >&6 -if test $ac_cv_func_pthread_attr_get_np = yes; then - tcl_ok=yes -else - tcl_ok=no -fi - - if test $tcl_ok = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD_ATTR_GET_NP 1 -_ACEOF - - echo "$as_me:$LINENO: checking for pthread_attr_get_np declaration" >&5 -echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6 -if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pthread_attr_get_np" >/dev/null 2>&1; then - tcl_cv_grep_pthread_attr_get_np=present -else - tcl_cv_grep_pthread_attr_get_np=missing -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_attr_get_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_attr_get_np" >&6 - if test $tcl_cv_grep_pthread_attr_get_np = missing ; then - -cat >>confdefs.h <<\_ACEOF -#define ATTRGETNP_NOT_DECLARED 1 -_ACEOF - - fi - else - echo "$as_me:$LINENO: checking for pthread_getattr_np" >&5 -echo $ECHO_N "checking for pthread_getattr_np... $ECHO_C" >&6 -if test "${ac_cv_func_pthread_getattr_np+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define pthread_getattr_np to an innocuous variant, in case declares pthread_getattr_np. - For example, HP-UX 11i declares gettimeofday. */ -#define pthread_getattr_np innocuous_pthread_getattr_np - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pthread_getattr_np (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef pthread_getattr_np - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_getattr_np (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_getattr_np) || defined (__stub___pthread_getattr_np) -choke me -#else -char (*f) () = pthread_getattr_np; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != pthread_getattr_np; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_pthread_getattr_np=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_pthread_getattr_np=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_pthread_getattr_np" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_getattr_np" >&6 -if test $ac_cv_func_pthread_getattr_np = yes; then - tcl_ok=yes -else - tcl_ok=no -fi - - if test $tcl_ok = yes ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD_GETATTR_NP 1 -_ACEOF - - echo "$as_me:$LINENO: checking for pthread_getattr_np declaration" >&5 -echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6 -if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "pthread_getattr_np" >/dev/null 2>&1; then - tcl_cv_grep_pthread_getattr_np=present -else - tcl_cv_grep_pthread_getattr_np=missing -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_pthread_getattr_np" >&5 -echo "${ECHO_T}$tcl_cv_grep_pthread_getattr_np" >&6 - if test $tcl_cv_grep_pthread_getattr_np = missing ; then - -cat >>confdefs.h <<\_ACEOF -#define GETATTRNP_NOT_DECLARED 1 -_ACEOF - - fi - fi - fi - if test $tcl_ok = no; then - # Darwin thread stacksize API - -for ac_func in pthread_get_stacksize_np -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - fi - LIBS=$ac_saved_libs else TCL_THREADS=0 fi @@ -18616,6 +18234,7 @@ fi fi echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18630,6 +18249,7 @@ _ACEOF # Need to create an intermediate object file to ensure tclDTrace.o # gets included when linking against the static tcl library. STLIB_LD='stlib_ld () { /usr/ccs/bin/ld -r -o $${1%.a}.o "$${@:2}" && '"${STLIB_LD}"' $${1} $${1%.a}.o ; } && stlib_ld' + MAKEFILE_SHELL='/bin/bash' # Force use of Sun ar and ranlib, the GNU versions choke on # tclDTrace.o and the combined object file above. AR='/usr/ccs/bin/ar' @@ -18890,6 +18510,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF @@ -19603,6 +19224,7 @@ s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t s,@DTRACE_SRC@,$DTRACE_SRC,;t t s,@DTRACE_HDR@,$DTRACE_HDR,;t t s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -- cgit v0.12 From 6425f2590d59b5a5c46cb4b50f2152a1118263ed Mon Sep 17 00:00:00 2001 From: das Date: Wed, 13 Aug 2008 23:14:26 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 5b9b433..d68948e 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -4,12 +4,6 @@ #ifndef _TCLCONFIG #define _TCLCONFIG -/* Is pthread_attr_get_np() declared in ? */ -#undef ATTRGETNP_NOT_DECLARED - -/* Is pthread_getattr_np declared in ? */ -#undef GETATTRNP_NOT_DECLARED - /* Is gettimeofday() actually declared in ? */ #undef GETTOD_NOT_DECLARED @@ -151,18 +145,9 @@ /* Define to 1 if you have the `pthread_atfork' function. */ #undef HAVE_PTHREAD_ATFORK -/* Do we want a BSD-like thread-attribute interface? */ -#undef HAVE_PTHREAD_ATTR_GET_NP - /* Define to 1 if you have the `pthread_attr_setstacksize' function. */ #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE -/* Do we want a Linux-like thread-attribute interface? */ -#undef HAVE_PTHREAD_GETATTR_NP - -/* Define to 1 if you have the `pthread_get_stacksize_np' function. */ -#undef HAVE_PTHREAD_GET_STACKSIZE_NP - /* Does putenv() copy strings or incorporate them by reference? */ #undef HAVE_PUTENV_THAT_COPIES -- cgit v0.12 From c8f2aa86aa2023b82b2329d7412a144dca4c4953 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 14 Aug 2008 00:08:23 +0000 Subject: * tests/fCmd.test (fCmd-6.23): made result matching robust when test workdir and /tmp are not on same FS. --- ChangeLog | 4 ++++ tests/fCmd.test | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e02c752..a69d097 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-08-14 Daniel Steffen + * tests/fCmd.test (fCmd-6.23): made result matching robust when test + workdir and /tmp are not on same FS. + * unix/tclUnixThrd.c: remove unused TclpThreadGetStackSize() * generic/tclInt.h: and related ifdefs and autoconf tests. * unix/tclUnixPort.h: [Bug 2017264] (jenglish) @@ -13,6 +16,7 @@ libX11.so et al. * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 2008-08-13 Miguel Sofer diff --git a/tests/fCmd.test b/tests/fCmd.test index 64be7de..78c0270 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.63 2008/07/20 06:40:01 dkf Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.64 2008/08/14 00:08:24 das Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -602,7 +602,7 @@ test fCmd-6.23 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { file rename td1 /tmp } -returnCodes error -cleanup { file attributes td1 -permissions 0755 -} -result {error renaming "td1": permission denied} +} -match regexp -result {^error renaming "td1"( to "/tmp/td1")?: permission denied$} test fCmd-6.24 {CopyRenameOneFile: error uses original name} -setup { cleanup } -constraints {unix notRoot} -body { -- cgit v0.12 From 26fdc714770e1a928602741126a435c48ca9ff27 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 14 Aug 2008 02:09:46 +0000 Subject: * generic/tclCmdIL.c (TclInfoFrame): check fPtr->line before dereferencing as line info may not exists when TclInfoFrame() is called from a DTrace probe. --- generic/tclCmdIL.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 89b8874..fb8d54e 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.147 2008/07/31 17:32:30 msofer Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.148 2008/08/14 02:09:46 das Exp $ */ #include "tclInt.h" @@ -1213,7 +1213,9 @@ TclInfoFrame( */ ADD_PAIR("type", Tcl_NewStringObj(typeString[fPtr->type], -1)); - ADD_PAIR("line", Tcl_NewIntObj(fPtr->line[0])); + if (fPtr->line) { + ADD_PAIR("line", Tcl_NewIntObj(fPtr->line[0])); + } if (fPtr->type == TCL_LOCATION_SOURCE) { ADD_PAIR("file", fPtr->data.eval.path); -- cgit v0.12 From f4104c736e717c8d8f03582e042992b4128d56ae Mon Sep 17 00:00:00 2001 From: das Date: Thu, 14 Aug 2008 02:11:46 +0000 Subject: * generic/tclBasic.c (TclNREvalObjv, Tcl_NRCallObjProc): DTrace probes * generic/tclProc.c (TclNRInterpProcCore, InterpProcNR2): for NRE. [Bug 2017160] * generic/tclBasic.c (TclDTraceInfo): add two extra arguments to * generic/tclCompile.h: DTrace 'info' probes for tclOO * generic/tclDTrace.d: method & class/object info. * generic/tclCompile.h: add support for debug logging of DTrace * generic/tclBasic.c: 'proc', 'cmd' and 'inst' probes (does _not_ require a platform with DTrace). --- ChangeLog | 17 +++++++ generic/tclBasic.c | 106 +++++++++++++++++++++++++++++++++++------ generic/tclCompile.h | 131 +++++++++++++++++++++++++++++++++++++++++++++++---- generic/tclDTrace.d | 10 ++-- generic/tclProc.c | 30 ++++++++---- 5 files changed, 260 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index a69d097..b18c4e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,22 @@ 2008-08-14 Daniel Steffen + * generic/tclBasic.c (TclNREvalObjv, Tcl_NRCallObjProc): DTrace probes + * generic/tclProc.c (TclNRInterpProcCore, InterpProcNR2): for NRE. + [Bug 2017160] + + * generic/tclBasic.c (TclDTraceInfo): add two extra arguments to + * generic/tclCompile.h: DTrace 'info' probes for tclOO + * generic/tclDTrace.d: method & class/object info. + + * generic/tclCompile.h: add support for debug logging of DTrace + * generic/tclBasic.c: 'proc', 'cmd' and 'inst' probes (does + _not_ require a platform with DTrace). + + * generic/tclCmdIL.c (TclInfoFrame): check fPtr->line before + dereferencing as line info may + not exists when TclInfoFrame() + is called from a DTrace probe. + * tests/fCmd.test (fCmd-6.23): made result matching robust when test workdir and /tmp are not on same FS. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b1ceab7..96857ac 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.352 2008/08/09 22:20:56 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.353 2008/08/14 02:11:50 das Exp $ */ #include "tclInt.h" @@ -105,6 +105,8 @@ static void MathFuncWrongNumArgs(Tcl_Interp *interp, int expected, #ifdef USE_DTRACE static int DTraceObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +static int DTraceCmdReturn(ClientData data[], Tcl_Interp *interp, + int result); #endif MODULE_SCOPE const TclStubs * const tclConstStubsPtr; @@ -4112,12 +4114,19 @@ TclNREvalObjv( } if (TCL_DTRACE_CMD_INFO_ENABLED() && iPtr->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, iPtr->cmdFramePtr); - char *a[4]; int i[2]; + char *a[6]; int i[2]; TclDTraceInfo(info, a, i); - TCL_DTRACE_CMD_INFO(a[0], a[1], a[2], a[3], i[0], i[1]); + TCL_DTRACE_CMD_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); TclDecrRefCount(info); } + if (TCL_DTRACE_CMD_RETURN_ENABLED() || TCL_DTRACE_CMD_RESULT_ENABLED()) { + TclNRAddCallback(interp, DTraceCmdReturn, objv[0], NULL, NULL, NULL); + } + if (TCL_DTRACE_CMD_ENTRY_ENABLED()) { + TCL_DTRACE_CMD_ENTRY(TclGetString(objv[0]), objc - 1, + (Tcl_Obj **)(objv + 1)); + } /* * Fix the original callback to point to the now known cmdPtr. Insure that @@ -7662,28 +7671,33 @@ TclDTraceInfo( char **args, int *argsi) { - static Tcl_Obj *keys[7] = { NULL }; + static Tcl_Obj *keys[10] = { NULL }; Tcl_Obj **k = keys, *val; - int i; + int i = 0; if (!*k) { - TclNewLiteralStringObj(keys[0], "cmd"); - TclNewLiteralStringObj(keys[1], "type"); - TclNewLiteralStringObj(keys[2], "proc"); - TclNewLiteralStringObj(keys[3], "file"); - TclNewLiteralStringObj(keys[4], "lambda"); - TclNewLiteralStringObj(keys[5], "line"); - TclNewLiteralStringObj(keys[6], "level"); - } - for (i = 0; i < 4; i++) { +#define kini(s) TclNewLiteralStringObj(keys[i], s); i++ + kini("cmd"); kini("type"); kini("proc"); kini("file"); + kini("method"); kini("class"); kini("lambda"); kini("object"); + kini("line"); kini("level"); +#undef kini + } + for (i = 0; i < 6; i++) { Tcl_DictObjGet(NULL, info, *k++, &val); args[i] = val ? TclGetString(val) : NULL; } + /* no "proc" -> use "lambda" */ if (!args[2]) { Tcl_DictObjGet(NULL, info, *k, &val); args[2] = val ? TclGetString(val) : NULL; } k++; + /* no "class" -> use "object" */ + if (!args[5]) { + Tcl_DictObjGet(NULL, info, *k, &val); + args[5] = val ? TclGetString(val) : NULL; + } + k++; for (i = 0; i < 2; i++) { Tcl_DictObjGet(NULL, info, *k++, &val); if (val) { @@ -7693,6 +7707,44 @@ TclDTraceInfo( } } } + +/* + *---------------------------------------------------------------------- + * + * DTraceCmdReturn -- + * + * NR callback for DTrace command return probes. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +DTraceCmdReturn( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + char *cmdName = TclGetString((Tcl_Obj *)data[0]); + + if (TCL_DTRACE_CMD_RETURN_ENABLED()) { + TCL_DTRACE_CMD_RETURN(cmdName, result); + } + if (TCL_DTRACE_CMD_RESULT_ENABLED()) { + Tcl_Obj *r = Tcl_GetObjResult(interp); + + TCL_DTRACE_CMD_RESULT(cmdName, result, TclGetString(r), r); + } + return result; +} + +TCL_DTRACE_DEBUG_LOG(); + #endif /* USE_DTRACE */ /* @@ -7726,6 +7778,32 @@ Tcl_NRCallObjProc( int result = TCL_OK; TEOV_callback *rootPtr = TOP_CB(interp); + if (TCL_DTRACE_CMD_ARGS_ENABLED()) { + char *a[10]; + int i = 0; + + while (i < 10) { + a[i] = i < objc ? TclGetString(objv[i]) : NULL; i++; + } + TCL_DTRACE_CMD_ARGS(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], + a[8], a[9]); + } + if (TCL_DTRACE_CMD_INFO_ENABLED() && ((Interp *) interp)->cmdFramePtr) { + Tcl_Obj *info = TclInfoFrame(interp, ((Interp *) interp)->cmdFramePtr); + char *a[6]; int i[2]; + + TclDTraceInfo(info, a, i); + TCL_DTRACE_CMD_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); + TclDecrRefCount(info); + } + if ((TCL_DTRACE_CMD_RETURN_ENABLED() || TCL_DTRACE_CMD_RESULT_ENABLED()) + && objc) { + TclNRAddCallback(interp, DTraceCmdReturn, objv[0], NULL, NULL, NULL); + } + if (TCL_DTRACE_CMD_ENTRY_ENABLED() && objc) { + TCL_DTRACE_CMD_ENTRY(TclGetString(objv[0]), objc - 1, + (Tcl_Obj **)(objv + 1)); + } result = (*objProc)(clientData, interp, objc, objv); return TclNRRunCallbacks(interp, result, rootPtr, 0); } diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 53a2c95..4bf78af 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.102 2008/08/09 22:20:56 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.103 2008/08/14 02:11:51 das Exp $ */ #ifndef _TCLCOMPILATION @@ -1223,11 +1223,30 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, * DTrace probe macros (NOPs if DTrace support is not enabled). */ +/* + * Define the following macros to enable debug logging of the DTrace proc, + * cmd, and inst probes. Note that this does _not_ require a platform with + * DTrace, it simply logs all probe output to /tmp/tclDTraceDebug-[pid].log. + * + * If the second macro is defined, logging to file starts immediately, + * otherwise only after the first call to [tcl::dtrace]. Note that the debug + * probe data is always computed, even when it is not logged to file. + * + * Defining the third macro enables debug logging of inst probes (disabled + * by default due to the significant performance impact). + */ + +#define TCL_DTRACE_DEBUG 1 +//#define TCL_DTRACE_DEBUG_LOG_ENABLED 1 +#define TCL_DTRACE_DEBUG_INST_PROBES 1 + +#if !(defined(TCL_DTRACE_DEBUG) && defined(__GNUC__)) + #ifdef USE_DTRACE #include "tclDTrace.h" -#if defined(__GNUC__ ) && __GNUC__ > 2 +#if defined(__GNUC__) && __GNUC__ > 2 /* Use gcc branch prediction hint to minimize cost of DTrace ENABLED checks. */ #define unlikely(x) (__builtin_expect((x), 0)) #else @@ -1244,8 +1263,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TCL_DTRACE_PROC_RESULT(a0, a1, a2, a3) TCL_PROC_RESULT(a0, a1, a2, a3) #define TCL_DTRACE_PROC_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ TCL_PROC_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) -#define TCL_DTRACE_PROC_INFO(a0, a1, a2, a3, a4, a5) \ - TCL_PROC_INFO(a0, a1, a2, a3, a4, a5) +#define TCL_DTRACE_PROC_INFO(a0, a1, a2, a3, a4, a5, a6, a7) \ + TCL_PROC_INFO(a0, a1, a2, a3, a4, a5, a6, a7) #define TCL_DTRACE_CMD_ENTRY_ENABLED() unlikely(TCL_CMD_ENTRY_ENABLED()) #define TCL_DTRACE_CMD_RETURN_ENABLED() unlikely(TCL_CMD_RETURN_ENABLED()) @@ -1257,8 +1276,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TCL_DTRACE_CMD_RESULT(a0, a1, a2, a3) TCL_CMD_RESULT(a0, a1, a2, a3) #define TCL_DTRACE_CMD_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ TCL_CMD_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) -#define TCL_DTRACE_CMD_INFO(a0, a1, a2, a3, a4, a5) \ - TCL_CMD_INFO(a0, a1, a2, a3, a4, a5) +#define TCL_DTRACE_CMD_INFO(a0, a1, a2, a3, a4, a5, a6, a7) \ + TCL_CMD_INFO(a0, a1, a2, a3, a4, a5, a6, a7) #define TCL_DTRACE_INST_START_ENABLED() unlikely(TCL_INST_START_ENABLED()) #define TCL_DTRACE_INST_DONE_ENABLED() unlikely(TCL_INST_DONE_ENABLED()) @@ -1269,6 +1288,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TCL_DTRACE_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ TCL_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define TCL_DTRACE_DEBUG_LOG() + MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); #else /* USE_DTRACE */ @@ -1282,7 +1303,7 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); #define TCL_DTRACE_PROC_RETURN(a0, a1) {} #define TCL_DTRACE_PROC_RESULT(a0, a1, a2, a3) {} #define TCL_DTRACE_PROC_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {} -#define TCL_DTRACE_PROC_INFO(a0, a1, a2, a3, a4, a5) {} +#define TCL_DTRACE_PROC_INFO(a0, a1, a2, a3, a4, a5, a6, a7) {} #define TCL_DTRACE_CMD_ENTRY_ENABLED() 0 #define TCL_DTRACE_CMD_RETURN_ENABLED() 0 @@ -1293,7 +1314,7 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); #define TCL_DTRACE_CMD_RETURN(a0, a1) {} #define TCL_DTRACE_CMD_RESULT(a0, a1, a2, a3) {} #define TCL_DTRACE_CMD_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {} -#define TCL_DTRACE_CMD_INFO(a0, a1, a2, a3, a4, a5) {} +#define TCL_DTRACE_CMD_INFO(a0, a1, a2, a3, a4, a5, a6, a7) {} #define TCL_DTRACE_INST_START_ENABLED() 0 #define TCL_DTRACE_INST_DONE_ENABLED() 0 @@ -1307,6 +1328,100 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); #endif /* USE_DTRACE */ +#else /* TCL_DTRACE_DEBUG */ + +#define USE_DTRACE 1 + +#if !defined(TCL_DTRACE_DEBUG_LOG_ENABLED) || !(TCL_DTRACE_DEBUG_LOG_ENABLED) +#undef TCL_DTRACE_DEBUG_LOG_ENABLED +#define TCL_DTRACE_DEBUG_LOG_ENABLED 0 +#endif + +#if !defined(TCL_DTRACE_DEBUG_INST_PROBES) || !(TCL_DTRACE_DEBUG_INST_PROBES) +#undef TCL_DTRACE_DEBUG_INST_PROBES +#define TCL_DTRACE_DEBUG_INST_PROBES 0 +#endif + +MODULE_SCOPE int tclDTraceDebugEnabled, tclDTraceDebugIndent; +MODULE_SCOPE FILE *tclDTraceDebugLog; +MODULE_SCOPE void TclDTraceOpenDebugLog(void); +MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); + +#define TCL_DTRACE_DEBUG_LOG() \ + int tclDTraceDebugEnabled = TCL_DTRACE_DEBUG_LOG_ENABLED;\ + int tclDTraceDebugIndent = 0; \ + FILE *tclDTraceDebugLog = NULL; \ + void TclDTraceOpenDebugLog(void) { char n[35]; \ + sprintf(n, "/tmp/tclDTraceDebug-%lu.log", (unsigned long) getpid()); \ + tclDTraceDebugLog = fopen(n, "a"); } \ + +#define TclDTraceDbgMsg(p, m, ...) do { if (tclDTraceDebugEnabled) { \ + int _l, _t = 0; if (!tclDTraceDebugLog) { TclDTraceOpenDebugLog(); } \ + fprintf(tclDTraceDebugLog, "%.12s:%.4d:%n", strrchr(__FILE__, '/') + \ + 1, __LINE__, &_l); _t += _l; \ + fprintf(tclDTraceDebugLog, " %.*s():%n", (_t < 18 ? 18 - _t : 0) + \ + 18, __func__, &_l); _t += _l; \ + fprintf(tclDTraceDebugLog, "%*s" p "%n", (_t < 40 ? 40 - _t : 0) + \ + 2 * tclDTraceDebugIndent, "", &_l); _t += _l; \ + fprintf(tclDTraceDebugLog, "%*s" m "\n", (_t < 64 ? 64 - _t : 1), "", \ + ##__VA_ARGS__); fflush(tclDTraceDebugLog); \ + } } while (0) + +#define TCL_DTRACE_PROC_ENTRY_ENABLED() 1 +#define TCL_DTRACE_PROC_RETURN_ENABLED() 1 +#define TCL_DTRACE_PROC_RESULT_ENABLED() 1 +#define TCL_DTRACE_PROC_ARGS_ENABLED() 1 +#define TCL_DTRACE_PROC_INFO_ENABLED() 1 +#define TCL_DTRACE_PROC_ENTRY(a0, a1, a2) \ + tclDTraceDebugIndent++; \ + TclDTraceDbgMsg("-> proc-entry", "%s %d %p", a0, a1, a2) +#define TCL_DTRACE_PROC_RETURN(a0, a1) \ + TclDTraceDbgMsg("<- proc-return", "%s %d", a0, a1); \ + tclDTraceDebugIndent-- +#define TCL_DTRACE_PROC_RESULT(a0, a1, a2, a3) \ + TclDTraceDbgMsg(" | proc-result", "%s %d %s %p", a0, a1, a2, a3) +#define TCL_DTRACE_PROC_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ + TclDTraceDbgMsg(" | proc-args", "%s %s %s %s %s %s %s %s %s %s", a0, \ + a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define TCL_DTRACE_PROC_INFO(a0, a1, a2, a3, a4, a5, a6, a7) \ + TclDTraceDbgMsg(" | proc-info", "%s %s %s %s %d %d %s %s", a0, a1, \ + a2, a3, a4, a5, a6, a7) + +#define TCL_DTRACE_CMD_ENTRY_ENABLED() 1 +#define TCL_DTRACE_CMD_RETURN_ENABLED() 1 +#define TCL_DTRACE_CMD_RESULT_ENABLED() 1 +#define TCL_DTRACE_CMD_ARGS_ENABLED() 1 +#define TCL_DTRACE_CMD_INFO_ENABLED() 1 +#define TCL_DTRACE_CMD_ENTRY(a0, a1, a2) \ + tclDTraceDebugIndent++; \ + TclDTraceDbgMsg("-> cmd-entry", "%s %d %p", a0, a1, a2) +#define TCL_DTRACE_CMD_RETURN(a0, a1) \ + TclDTraceDbgMsg("<- cmd-return", "%s %d", a0, a1); \ + tclDTraceDebugIndent-- +#define TCL_DTRACE_CMD_RESULT(a0, a1, a2, a3) \ + TclDTraceDbgMsg(" | cmd-result", "%s %d %s %p", a0, a1, a2, a3) +#define TCL_DTRACE_CMD_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ + TclDTraceDbgMsg(" | cmd-args", "%s %s %s %s %s %s %s %s %s %s", a0, \ + a1, a2, a3, a4, a5, a6, a7, a8, a9) +#define TCL_DTRACE_CMD_INFO(a0, a1, a2, a3, a4, a5, a6, a7) \ + TclDTraceDbgMsg(" | cmd-info", "%s %s %s %s %d %d %s %s", a0, a1, \ + a2, a3, a4, a5, a6, a7) + +#define TCL_DTRACE_INST_START_ENABLED() TCL_DTRACE_DEBUG_INST_PROBES +#define TCL_DTRACE_INST_DONE_ENABLED() TCL_DTRACE_DEBUG_INST_PROBES +#define TCL_DTRACE_INST_START(a0, a1, a2) \ + TclDTraceDbgMsg(" | inst-start", "%s %d %p", a0, a1, a2) +#define TCL_DTRACE_INST_DONE(a0, a1, a2) \ + TclDTraceDbgMsg(" | inst-end", "%s %d %p", a0, a1, a2) + +#define TCL_DTRACE_TCL_PROBE_ENABLED() 1 +#define TCL_DTRACE_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ + tclDTraceDebugEnabled = 1; \ + TclDTraceDbgMsg(" | tcl-probe", "%s %s %s %s %s %s %s %s %s %s", a0, \ + a1, a2, a3, a4, a5, a6, a7, a8, a9) + +#endif /* TCL_DTRACE_DEBUG */ + #endif /* _TCLCOMPILATION */ /* diff --git a/generic/tclDTrace.d b/generic/tclDTrace.d index 8d0fbcc..65c804e 100644 --- a/generic/tclDTrace.d +++ b/generic/tclDTrace.d @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDTrace.d,v 1.2 2007/12/13 15:23:16 dgp Exp $ + * RCS: @(#) $Id: tclDTrace.d,v 1.3 2008/08/14 02:11:51 das Exp $ */ typedef struct Tcl_Obj Tcl_Obj; @@ -63,9 +63,11 @@ provider tcl { * arg3: TIP 280 file (string) * arg4: TIP 280 line (int) * arg5: TIP 280 level (int) + * arg6: TclOO method (string) + * arg7: TclOO class/object (string) */ probe proc__info(char* cmd, char* type, char* proc, char* file, int line, - int level); + int level, char* method, char* class); /***************************** cmd probes ******************************/ /* @@ -112,9 +114,11 @@ provider tcl { * arg3: TIP 280 file (string) * arg4: TIP 280 line (int) * arg5: TIP 280 level (int) + * arg6: TclOO method (string) + * arg7: TclOO class/object (string) */ probe cmd__info(char* cmd, char* type, char* proc, char* file, int line, - int level); + int level, char* method, char* class); /***************************** inst probes *****************************/ /* diff --git a/generic/tclProc.c b/generic/tclProc.c index 495e194..8d1c9d7 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.159 2008/08/12 17:45:25 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.160 2008/08/14 02:11:51 das Exp $ */ #include "tclInt.h" @@ -1751,11 +1751,11 @@ TclNRInterpProcCore( #endif /*TCL_COMPILE_DEBUG*/ if (TCL_DTRACE_PROC_ARGS_ENABLED()) { + int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; char *a[10]; int i; - int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; - for (i=0 ; i<10 ; i++) { + for (i = 0 ; i < 10 ; i++) { a[i] = (l < iPtr->varFramePtr->objc ? TclGetString(iPtr->varFramePtr->objv[l]) : NULL); l++; @@ -1765,12 +1765,20 @@ TclNRInterpProcCore( } if (TCL_DTRACE_PROC_INFO_ENABLED() && iPtr->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, iPtr->cmdFramePtr); - char *a[4]; int i[2]; + char *a[6]; int i[2]; TclDTraceInfo(info, a, i); - TCL_DTRACE_PROC_INFO(a[0], a[1], a[2], a[3], i[0], i[1]); + TCL_DTRACE_PROC_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); TclDecrRefCount(info); } + if (TCL_DTRACE_PROC_ENTRY_ENABLED()) { + int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; + + TCL_DTRACE_PROC_ENTRY(l < iPtr->varFramePtr->objc ? + TclGetString(iPtr->varFramePtr->objv[l]) : NULL, + iPtr->varFramePtr->objc - l - 1, + (Tcl_Obj **)(iPtr->varFramePtr->objv + l + 1)); + } /* * Invoke the commands in the procedure's body. @@ -1807,7 +1815,10 @@ InterpProcNR2( ProcErrorProc errorProc = data[1]; if (TCL_DTRACE_PROC_RETURN_ENABLED()) { - TCL_DTRACE_PROC_RETURN(TclGetString(procNameObj), result); + int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; + + TCL_DTRACE_PROC_RETURN(l < iPtr->varFramePtr->objc ? + TclGetString(iPtr->varFramePtr->objv[l]) : NULL, result); } if (--procPtr->refCount <= 0) { TclProcCleanupProc(procPtr); @@ -1868,10 +1879,11 @@ InterpProcNR2( } if (TCL_DTRACE_PROC_RESULT_ENABLED()) { - Tcl_Obj *r; + int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; + Tcl_Obj *r = Tcl_GetObjResult(interp); - r = Tcl_GetObjResult(interp); - TCL_DTRACE_PROC_RESULT(TclGetString(procNameObj), result, + TCL_DTRACE_PROC_RESULT(l < iPtr->varFramePtr->objc ? + TclGetString(iPtr->varFramePtr->objv[l]) : NULL, result, TclGetString(r), r); } -- cgit v0.12 From 94b68024308ffd3abbb8c2b33f1578eea15f7d07 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 14 Aug 2008 02:16:36 +0000 Subject: typo --- generic/tclCompile.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 4bf78af..f859e11 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.103 2008/08/14 02:11:51 das Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.104 2008/08/14 02:16:36 das Exp $ */ #ifndef _TCLCOMPILATION @@ -1236,9 +1236,11 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, * by default due to the significant performance impact). */ +/* #define TCL_DTRACE_DEBUG 1 -//#define TCL_DTRACE_DEBUG_LOG_ENABLED 1 +#define TCL_DTRACE_DEBUG_LOG_ENABLED 1 #define TCL_DTRACE_DEBUG_INST_PROBES 1 +*/ #if !(defined(TCL_DTRACE_DEBUG) && defined(__GNUC__)) -- cgit v0.12 From 1dd5e8ff9790f2b3087139bc870d3c3b4477609b Mon Sep 17 00:00:00 2001 From: das Date: Thu, 14 Aug 2008 10:32:19 +0000 Subject: #define DTraceCmdReturn when USE_DTRACE is not defined --- generic/tclBasic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 96857ac..8f6c1af 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.353 2008/08/14 02:11:50 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.354 2008/08/14 10:32:19 das Exp $ */ #include "tclInt.h" @@ -107,6 +107,8 @@ static int DTraceObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int DTraceCmdReturn(ClientData data[], Tcl_Interp *interp, int result); +#else +#define DTraceCmdReturn NULL #endif MODULE_SCOPE const TclStubs * const tclConstStubsPtr; -- cgit v0.12 From ca670c5a70a7fe17949373baed14393af713d227 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 14 Aug 2008 10:49:08 +0000 Subject: fix unused variable warnings when USE_DTRACE is not defined --- generic/tclCompile.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclCompile.h b/generic/tclCompile.h index f859e11..044a978 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.104 2008/08/14 02:16:36 das Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.105 2008/08/14 10:49:08 das Exp $ */ #ifndef _TCLCOMPILATION @@ -1301,9 +1301,9 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); #define TCL_DTRACE_PROC_RESULT_ENABLED() 0 #define TCL_DTRACE_PROC_ARGS_ENABLED() 0 #define TCL_DTRACE_PROC_INFO_ENABLED() 0 -#define TCL_DTRACE_PROC_ENTRY(a0, a1, a2) {} -#define TCL_DTRACE_PROC_RETURN(a0, a1) {} -#define TCL_DTRACE_PROC_RESULT(a0, a1, a2, a3) {} +#define TCL_DTRACE_PROC_ENTRY(a0, a1, a2) {if (a0) {}} +#define TCL_DTRACE_PROC_RETURN(a0, a1) {if (a0) {}} +#define TCL_DTRACE_PROC_RESULT(a0, a1, a2, a3) {if (a0) {}; if (a3) {}} #define TCL_DTRACE_PROC_ARGS(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {} #define TCL_DTRACE_PROC_INFO(a0, a1, a2, a3, a4, a5, a6, a7) {} -- cgit v0.12 From 9ee70ad9a7f0ed70053101eea7e8d08924f7532b Mon Sep 17 00:00:00 2001 From: das Date: Thu, 14 Aug 2008 10:49:39 +0000 Subject: remove overlooked old TCL_DTRACE_PROC_ENTRY --- generic/tclProc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/generic/tclProc.c b/generic/tclProc.c index 8d1c9d7..d763fde 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.160 2008/08/14 02:11:51 das Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.161 2008/08/14 10:49:39 das Exp $ */ #include "tclInt.h" @@ -1786,14 +1786,6 @@ TclNRInterpProcCore( procPtr->refCount++; codePtr = procPtr->bodyPtr->internalRep.otherValuePtr; - if (TCL_DTRACE_PROC_ENTRY_ENABLED()) { - int l; - - l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 2 : 1; - TCL_DTRACE_PROC_ENTRY(TclGetString(procNameObj), - iPtr->varFramePtr->objc - l, - (Tcl_Obj **)(iPtr->varFramePtr->objv + l)); - } TclNRAddCallback(interp, InterpProcNR2, procNameObj, errorProc, NULL, NULL); -- cgit v0.12 From a810a762c4bddc1860b928b81b8aeefad6a4ac16 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 14 Aug 2008 13:09:47 +0000 Subject: * tests/fileName.test: Revise new tests for portability to case insensitive filesystems. --- ChangeLog | 5 +++++ tests/fileName.test | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b18c4e6..bc7e8b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-14 Don Porter + + * tests/fileName.test: Revise new tests for portability to case + insensitive filesystems. + 2008-08-14 Daniel Steffen * generic/tclBasic.c (TclNREvalObjv, Tcl_NRCallObjProc): DTrace probes diff --git a/tests/fileName.test b/tests/fileName.test index f0788f4..86a1b23 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.55 2008/08/13 18:14:44 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.56 2008/08/14 13:09:50 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1459,7 +1459,7 @@ test fileName-20.1 {Bug 1750300} -setup { set d [makeDirectory foo] makeFile {} TAGS $d } -body { - llength [glob -nocomplain -directory $d -- TAGS tags Tags] + llength [glob -nocomplain -directory $d -- TAGS one two] } -cleanup { removeFile TAGS $d removeDirectory foo @@ -1468,7 +1468,7 @@ test fileName-20.2 {Bug 1750300} -setup { set d [makeDirectory foo] makeFile {} TAGS $d } -body { - llength [glob -nocomplain -directory $d -types {} -- TAGS tags Tags] + llength [glob -nocomplain -directory $d -types {} -- TAGS one two] } -cleanup { removeFile TAGS $d removeDirectory foo @@ -1486,7 +1486,7 @@ test fileName-20.4 {Bug 1750300} -setup { set d [makeDirectory foo] makeFile {} TAGS $d } -body { - llength [glob -nocomplain -directory $d -types {} -- URGENT Urgent] + llength [glob -nocomplain -directory $d -types {} -- URGENT Urkle] } -cleanup { removeFile TAGS $d removeDirectory foo -- cgit v0.12 From 8b77a53b22e9d5980dfbb50da05351f9b9352434 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 16 Aug 2008 13:59:56 +0000 Subject: * generic/tclExecute.c: better cmdFrame management --- ChangeLog | 4 ++++ generic/tclExecute.c | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc7e8b0..690a0d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-16 Miguel Sofer + + * generic/tclExecute.c: better cmdFrame management + 2008-08-14 Don Porter * tests/fileName.test: Revise new tests for portability to case diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d2c656e..950df0d 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.403 2008/08/09 22:20:57 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.404 2008/08/16 14:00:08 msofer Exp $ */ #include "tclInt.h" @@ -174,9 +174,8 @@ static BuiltinFunc tclBuiltinFuncTable[] = { typedef struct BottomData { struct BottomData *prevBottomPtr; - TEOV_callback *rootPtr; /* State when this bytecode execution began. */ - ByteCode *codePtr; /* These fields remain constant until it */ - CmdFrame *cmdFramePtr; /* returns. */ + TEOV_callback *rootPtr; /* State when this bytecode execution began: */ + ByteCode *codePtr; /* constant until it returns */ /* ------------------------------------------*/ TEOV_callback *atExitPtr; /* This field is used on return FROM here */ /* ------------------------------------------*/ @@ -190,7 +189,6 @@ typedef struct BottomData { bottomPtr->prevBottomPtr = oldBottomPtr; \ bottomPtr->rootPtr = TOP_CB(iPtr); \ bottomPtr->codePtr = codePtr; \ - bottomPtr->cmdFramePtr = iPtr->cmdFramePtr; \ bottomPtr->atExitPtr = NULL #define NR_DATA_BURY() \ @@ -207,8 +205,7 @@ typedef struct BottomData { cleanup = bottomPtr->cleanup; \ auxObjList = bottomPtr->auxObjList; \ esPtr = iPtr->execEnvPtr->execStackPtr; \ - tosPtr = esPtr->tosPtr; \ - iPtr->cmdFramePtr = bottomPtr->cmdFramePtr; + tosPtr = esPtr->tosPtr static Tcl_NRPostProc NRRestoreInterpState; @@ -7740,6 +7737,7 @@ TclExecuteByteCode( oldBottomPtr = bottomPtr->prevBottomPtr; atExitPtr = bottomPtr->atExitPtr; + iPtr->cmdFramePtr = bcFramePtr->nextPtr; TclStackFree(interp, bottomPtr); /* free my stack */ if (--codePtr->refCount <= 0) { -- cgit v0.12 From 146f94987b85cac730a1bde68d0e16d6907f79c0 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 16 Aug 2008 14:27:28 +0000 Subject: fix last commit --- generic/tclExecute.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 950df0d..cc7e4bc 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.404 2008/08/16 14:00:08 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.405 2008/08/16 14:27:28 msofer Exp $ */ #include "tclInt.h" @@ -1971,6 +1971,9 @@ TclExecuteByteCode( * reset, now process the return. */ + NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + if (result == TCL_OK) { /* * Reset the interp's result to avoid possible duplications of -- cgit v0.12 From d49908850f4747e397786cba1c88d3aca348eb36 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 17 Aug 2008 14:15:24 +0000 Subject: * generic/tclTest.c (TestconcatobjCmd): * generic/tclUtil.c (Tcl_ConcatObj): * tests/util.test (util-4.7): fix [Bug 1447328]; the original "fix" turned Tcl_ConcatObj() into a hairy monster. This was exposed by [Bug 2055782]. Additionally, Tcl_ConcatObj could corrupt its input under certain conditions! *** NASTY BUG FIXED *** --- ChangeLog | 11 +++ generic/tclTest.c | 283 +++++++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclUtil.c | 8 +- tests/util.test | 7 +- 4 files changed, 301 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 690a0d8..0e863e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-08-17 Miguel Sofer + + * generic/tclTest.c (TestconcatobjCmd): + * generic/tclUtil.c (Tcl_ConcatObj): + * tests/util.test (util-4.7): + fix [Bug 1447328]; the original "fix" turned Tcl_ConcatObj() into + a hairy monster. This was exposed by [Bug 2055782]. Additionally, + Tcl_ConcatObj could corrupt its input under certain conditions! + + *** NASTY BUG FIXED *** + 2008-08-16 Miguel Sofer * generic/tclExecute.c: better cmdFrame management diff --git a/generic/tclTest.c b/generic/tclTest.c index 60f15a8..b2b0265 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.121 2008/07/31 14:43:48 msofer Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.122 2008/08/17 14:15:25 msofer Exp $ */ #define TCL_TEST @@ -210,6 +210,8 @@ static int TestcmdtokenCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestcmdtraceCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); +static int TestconcatobjCmd(ClientData dummy, + Tcl_Interp *interp, int argc, const char **argv); static int TestcreatecommandCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestdcallCmd(ClientData dummy, @@ -562,6 +564,8 @@ Tcltest_Init( NULL); Tcl_CreateCommand(interp, "testcmdtrace", TestcmdtraceCmd, (ClientData) 0, NULL); + Tcl_CreateCommand(interp, "testconcatobj", TestconcatobjCmd, + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testcreatecommand", TestcreatecommandCmd, (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testdcall", TestdcallCmd, (ClientData) 0, NULL); @@ -6572,6 +6576,283 @@ TestNRELevels( } /* + *---------------------------------------------------------------------- + * + * TestconcatobjCmd -- + * + * This procedure implements the "testconcatobj" command. It is used + * to test that Tcl_ConcatObj does indeed return a fresh Tcl_Obj in all + * cases and thet it never corrupts its arguments. In other words, that + * [Bug 1447328] was fixed properly. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +TestconcatobjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int argc, /* Number of arguments. */ + const char **argv) /* Argument strings. */ +{ + Tcl_Obj *list1Ptr, *list2Ptr, *emptyPtr, *concatPtr, *tmpPtr; + int result = TCL_OK, len; + Tcl_Obj *objv[3]; + + /* + * Set the start of the error message as obj result; it will be cleared at + * the end if no errors were found. + */ + + Tcl_SetObjResult(interp, + Tcl_NewStringObj("Tcl_ConcatObj is unsafe:", -1)); + + emptyPtr = Tcl_NewObj(); + + list1Ptr = Tcl_NewStringObj("foo bar sum", -1); + Tcl_ListObjLength(NULL, list1Ptr, &len); + TclInvalidateStringRep(list1Ptr); + + list2Ptr = Tcl_NewStringObj("eeny meeny", -1); + Tcl_ListObjLength(NULL, list2Ptr, &len); + TclInvalidateStringRep(list2Ptr); + + /* + * Verify that concat'ing a list obj with one or more empty strings does + * return a fresh Tcl_Obj (see also [Bug 2055782]). + */ + + tmpPtr = Tcl_DuplicateObj(list1Ptr); + + objv[0] = tmpPtr; + objv[1] = emptyPtr; + concatPtr = Tcl_ConcatObj(2, objv); + if (concatPtr->refCount != 0) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (a) concatObj does not have refCount 0", NULL); + } + if (concatPtr == tmpPtr) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (a) concatObj is not a new obj ", NULL); + switch (tmpPtr->refCount) { + case 0: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 1: + Tcl_AppendResult(interp, "(refCount added)", NULL); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + } + tmpPtr = Tcl_DuplicateObj(list1Ptr); + objv[0] = tmpPtr; + } + Tcl_DecrRefCount(concatPtr); + + Tcl_IncrRefCount(tmpPtr); + concatPtr = Tcl_ConcatObj(2, objv); + if (concatPtr->refCount != 0) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (b) concatObj does not have refCount 0", NULL); + } + if (concatPtr == tmpPtr) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (b) concatObj is not a new obj ", NULL); + switch (tmpPtr->refCount) { + case 0: + Tcl_AppendResult(interp, "(refCount removed?)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + break; + case 1: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 2: + Tcl_AppendResult(interp, "(refCount added)", NULL); + Tcl_DecrRefCount(tmpPtr); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + } + tmpPtr = Tcl_DuplicateObj(list1Ptr); + objv[0] = tmpPtr; + } + Tcl_DecrRefCount(concatPtr); + + + objv[0] = emptyPtr; + objv[1] = tmpPtr; + objv[2] = emptyPtr; + concatPtr = Tcl_ConcatObj(3, objv); + if (concatPtr->refCount != 0) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (c) concatObj does not have refCount 0", NULL); + } + if (concatPtr == tmpPtr) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (c) concatObj is not a new obj ", NULL); + switch (tmpPtr->refCount) { + case 0: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 1: + Tcl_AppendResult(interp, "(refCount added)", NULL); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + } + tmpPtr = Tcl_DuplicateObj(list1Ptr); + objv[1] = tmpPtr; + } + Tcl_DecrRefCount(concatPtr); + + Tcl_IncrRefCount(tmpPtr); + concatPtr = Tcl_ConcatObj(3, objv); + if (concatPtr->refCount != 0) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (d) concatObj does not have refCount 0", NULL); + } + if (concatPtr == tmpPtr) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (d) concatObj is not a new obj ", NULL); + switch (tmpPtr->refCount) { + case 0: + Tcl_AppendResult(interp, "(refCount removed?)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + break; + case 1: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 2: + Tcl_AppendResult(interp, "(refCount added)", NULL); + Tcl_DecrRefCount(tmpPtr); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + } + tmpPtr = Tcl_DuplicateObj(list1Ptr); + objv[1] = tmpPtr; + } + Tcl_DecrRefCount(concatPtr); + + /* + * Verify that an unshared list is not corrupted when concat'ing things to + * it. + */ + + objv[0] = tmpPtr; + objv[1] = list2Ptr; + concatPtr = Tcl_ConcatObj(2, objv); + if (concatPtr->refCount != 0) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (e) concatObj does not have refCount 0", NULL); + } + if (concatPtr == tmpPtr) { + int len; + + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (e) concatObj is not a new obj ", NULL); + + (void) Tcl_ListObjLength(NULL, concatPtr, &len); + switch (tmpPtr->refCount) { + case 3: + Tcl_AppendResult(interp, "(failed to concat)", NULL); + break; + default: + Tcl_AppendResult(interp, "(corrupted input!)", NULL); + } + if (Tcl_IsShared(tmpPtr)) { + Tcl_DecrRefCount(tmpPtr); + } + tmpPtr = Tcl_DuplicateObj(list1Ptr); + objv[0] = tmpPtr; + } + Tcl_DecrRefCount(concatPtr); + + objv[0] = tmpPtr; + objv[1] = list2Ptr; + Tcl_IncrRefCount(tmpPtr); + concatPtr = Tcl_ConcatObj(2, objv); + if (concatPtr->refCount != 0) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (f) concatObj does not have refCount 0", NULL); + } + if (concatPtr == tmpPtr) { + int len; + + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (f) concatObj is not a new obj ", NULL); + + (void) Tcl_ListObjLength(NULL, concatPtr, &len); + switch (tmpPtr->refCount) { + case 3: + Tcl_AppendResult(interp, "(failed to concat)", NULL); + break; + default: + Tcl_AppendResult(interp, "(corrupted input!)", NULL); + } + if (Tcl_IsShared(tmpPtr)) { + Tcl_DecrRefCount(tmpPtr); + } + tmpPtr = Tcl_DuplicateObj(list1Ptr); + objv[0] = tmpPtr; + } + Tcl_DecrRefCount(concatPtr); + + objv[0] = tmpPtr; + objv[1] = list2Ptr; + Tcl_IncrRefCount(tmpPtr); + Tcl_IncrRefCount(tmpPtr); + concatPtr = Tcl_ConcatObj(2, objv); + if (concatPtr->refCount != 0) { + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (g) concatObj does not have refCount 0", NULL); + } + if (concatPtr == tmpPtr) { + int len; + + result = TCL_ERROR; + Tcl_AppendResult(interp, "\n\t* (g) concatObj is not a new obj ", NULL); + + (void) Tcl_ListObjLength(NULL, concatPtr, &len); + switch (tmpPtr->refCount) { + case 3: + Tcl_AppendResult(interp, "(failed to concat)", NULL); + break; + default: + Tcl_AppendResult(interp, "(corrupted input!)", NULL); + } + Tcl_DecrRefCount(tmpPtr); + if (Tcl_IsShared(tmpPtr)) { + Tcl_DecrRefCount(tmpPtr); + } + tmpPtr = Tcl_DuplicateObj(list1Ptr); + objv[0] = tmpPtr; + } + Tcl_DecrRefCount(concatPtr); + + + Tcl_DecrRefCount(list1Ptr); + Tcl_DecrRefCount(list2Ptr); + Tcl_DecrRefCount(emptyPtr); + Tcl_DecrRefCount(tmpPtr); + + if (result == TCL_OK) { + Tcl_ResetResult(interp); + } + return result; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 480196c..a1a0861 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.98 2008/04/27 22:21:33 dkf Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.99 2008/08/17 14:15:26 msofer Exp $ */ #include "tclInt.h" @@ -1197,11 +1197,7 @@ Tcl_ConcatObj( if (resPtr) { Tcl_ListObjReplace(NULL, resPtr, INT_MAX, 0, listc, listv); } else { - if (Tcl_IsShared(objPtr)) { - resPtr = TclListObjCopy(NULL, objPtr); - } else { - resPtr = objPtr; - } + resPtr = TclListObjCopy(NULL, objPtr); } } } diff --git a/tests/util.test b/tests/util.test index 8c1ef26..61e0fff 100644 --- a/tests/util.test +++ b/tests/util.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: util.test,v 1.18 2006/03/21 11:12:29 dkf Exp $ +# RCS: @(#) $Id: util.test,v 1.19 2008/08/17 14:15:26 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -163,6 +163,11 @@ test util-4.6 {Tcl_ConcatObj - utf-8 sequence with "whitespace" char} { # Check for Bug #227512. If this violates C isspace, then it returns \xc3. concat \xe0 } \xe0 +test util-4.7 {Tcl_ConcatObj - refCount safety} { + # Check for Bug #1447328 (actually, bugs in its original "fix"). One of the + # symptoms was Bug #2055782. + testconcatobj +} {} proc Wrapper_Tcl_StringMatch {pattern string} { # Forces use of Tcl_StringMatch, not Tcl_UniCharCaseMatch -- cgit v0.12 From 66b7825d012cdec4bf088bf8c35be432c0ade73a Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 17 Aug 2008 19:37:04 +0000 Subject: * generic/tclBasic.c: Implementation of [coroutine] and [yield] * generic/tclCmdAH.c: commands (in tcl::unsupported). * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclInt.h: * tests/unsupported.test: --- ChangeLog | 7 + generic/tclBasic.c | 446 ++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclCmdAH.c | 6 +- generic/tclCompile.h | 3 +- generic/tclExecute.c | 99 +++++++++-- generic/tclInt.h | 38 ++++- tests/unsupported.test | 322 +++++++++++++++++++++++++++++++++-- 7 files changed, 891 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e863e8..ca1e984 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-08-17 Miguel Sofer + * generic/tclBasic.c: Implementation of [coroutine] and [yield] + * generic/tclCmdAH.c: commands (in tcl::unsupported). + * generic/tclCompile.h: + * generic/tclExecute.c: + * generic/tclInt.h: + * tests/unsupported.test: + * generic/tclTest.c (TestconcatobjCmd): * generic/tclUtil.c (Tcl_ConcatObj): * tests/util.test (util-4.7): diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8f6c1af..6d91c02 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.354 2008/08/14 10:32:19 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.355 2008/08/17 19:37:10 msofer Exp $ */ #include "tclInt.h" @@ -777,6 +777,7 @@ Tcl_CreateInterp(void) Tcl_DisassembleObjCmd, NULL, NULL); /* + * Create unsupported commands for tailcall, coroutine and yield * Create unsupported commands for atProcExit and tailcall */ @@ -787,6 +788,11 @@ Tcl_CreateInterp(void) /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_TAILCALL_TYPE), NULL); + Tcl_NRCreateCommand(interp, "::tcl::unsupported::coroutine", + /*objProc*/ NULL, TclNRCoroutineObjCmd, NULL, NULL); + Tcl_NRCreateCommand(interp, "::tcl::unsupported::yield", + /*objProc*/ NULL, TclNRYieldObjCmd, NULL, NULL); + #ifdef USE_DTRACE /* * Register the tcl::dtrace command. @@ -3679,7 +3685,8 @@ TclInterpReady( return TCL_ERROR; } - if (TCL_OK != Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG)) { + if (iPtr->execEnvPtr->rewind || + (TCL_OK != Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG))) { return TCL_ERROR; } @@ -4186,6 +4193,7 @@ TclNRRunCallbacks( restart: while (TOP_CB(interp) != rootPtr) { callbackPtr = TOP_CB(interp); + procPtr = callbackPtr->procPtr; if (tebcCall && (procPtr == NRCallTEBC)) { @@ -4282,7 +4290,10 @@ NRCallTEBC( function is only called when no tebc is above. */ int type = PTR2INT(data[0]); - + Interp *iPtr = ((Interp *) interp); + + NRE_ASSERT(result == TCL_OK); + switch (type) { case TCL_NR_BC_TYPE: return TclExecuteByteCode(interp, data[1]); @@ -4292,6 +4303,13 @@ NRCallTEBC( Tcl_SetResult(interp, "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; + case TCL_NR_YIELD_TYPE: + if (iPtr->execEnvPtr->corPtr) { + Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); + } else { + Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); + } + return TCL_ERROR; default: Tcl_Panic("unknown call type to TEBC"); } @@ -8023,6 +8041,428 @@ Tcl_NRAddCallback( } TclNRAddCallback(interp, postProcPtr, data0, data1, data2, data3); } + + +/* + *---------------------------------------------------------------------- + * + * TclNRCoroutineObjCmd -- (and friends) + * + * This object-based function is invoked to process the "coroutine" Tcl + * command. It is heavily based on "apply". + * + * Results: + * A standard Tcl object result value. + * + * Side effects: + * A new procedure gets created. + * + * ** FIRST EXPERIMENTAL IMPLEMENTATION ** + * + * It is fairly amateurish and not up to our standards - mainly in terms of + * error messages and [info] interaction. Just to test the infrastructure in + * teov and tebc. + *---------------------------------------------------------------------- + */ + +static int NRInterpCoroutine(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); +static int RewindCoroutine(CoroutineData *corPtr, int result); +static void DeleteCoroutine(ClientData clientData); +static void PlugCoroutineChains(CoroutineData *corPtr); + +static int NRCoroutineFirstCallback(ClientData data[], + Tcl_Interp *interp, int result); +static int NRCoroutineExitCallback(ClientData data[], + Tcl_Interp *interp, int result); +static int NRCoroutineCallerCallback(ClientData data[], + Tcl_Interp *interp, int result); + + + +static const CorContext NULL_CONTEXT = {NULL, NULL, NULL}; + +#define SAVE_CONTEXT(context) \ + (context).framePtr = iPtr->framePtr; \ + (context).varFramePtr = iPtr->varFramePtr; \ + (context).cmdFramePtr = iPtr->cmdFramePtr + +#define RESTORE_CONTEXT(context) \ + iPtr->framePtr = (context).framePtr; \ + iPtr->varFramePtr = (context).varFramePtr; \ + iPtr->cmdFramePtr = (context).cmdFramePtr + +#define iPtr ((Interp *) interp) + +int +TclNRYieldObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + if (objc > 2) { + Tcl_WrongNumArgs(interp, 1, objv, "?returnValue?"); + return TCL_ERROR; + } + + if (!iPtr->execEnvPtr->corPtr) { + Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); + return TCL_ERROR; + } + + if (objc == 2) { + Tcl_SetObjResult(interp, objv[1]); + } + + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), + NULL, NULL, NULL); + return TCL_OK; +} + +static int +RewindCoroutine( + CoroutineData *corPtr, + int result) +{ + Tcl_Obj *objPtr; + Tcl_Interp *interp = corPtr->eePtr->interp; + Tcl_InterpState state = Tcl_SaveInterpState(interp, result); + + NRE_ASSERT(COR_IS_SUSPENDED(corPtr)); + NRE_ASSERT(corPtr->eePtr != NULL); + NRE_ASSERT(corPtr->eePtr->bottomPtr != NULL); + NRE_ASSERT(corPtr->eePtr != iPtr->execEnvPtr); + + TclNewObj(objPtr); + Tcl_IncrRefCount(objPtr); + + corPtr->eePtr->rewind = 1; + result = NRInterpCoroutine((ClientData) corPtr, interp, 1, &objPtr); + + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + + Tcl_DecrRefCount(objPtr); + result = Tcl_RestoreInterpState(interp, state); + return result; +} + +static void +DeleteCoroutine( + ClientData clientData) +{ + CoroutineData *corPtr = (CoroutineData *) clientData; + + if (COR_IS_SUSPENDED(corPtr)) { + (void) RewindCoroutine(corPtr, TCL_OK); + } +} + +static void +PlugCoroutineChains( + CoroutineData *corPtr) +{ + Tcl_Interp *interp = corPtr->eePtr->interp; + /* + * Called to plug the coroutine's running environment into the caller's, + * so that the frame chains are uninterrupted. Note that the levels and + * numlevels may be wrong - we should fix them for the whole chain and not + * just the base! This probably breaks Tip 280 and should be fixed, or at + * least rethought as some of 280's functionality makes doubtful sense in + * presence of coroutines (maybe the cmdFrame should be attached to the + * execEnv and not the interp?) + */ + + corPtr->base.framePtr->callerPtr = corPtr->caller.framePtr; + corPtr->base.framePtr->callerVarPtr = corPtr->caller.varFramePtr; + + corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; + corPtr->base.cmdFramePtr->level = (iPtr->cmdFramePtr == NULL? + 1 : iPtr->cmdFramePtr->level + 1); + corPtr->base.cmdFramePtr->numLevels = iPtr->numLevels; +} + +static int +NRCoroutineFirstCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CoroutineData *corPtr = data[0]; + + { + CmdFrame *tmpPtr = iPtr->cmdFramePtr; + + if (corPtr->eePtr) { + while (tmpPtr->nextPtr != corPtr->caller.cmdFramePtr) { + tmpPtr = tmpPtr->nextPtr; + } + corPtr->base.cmdFramePtr = tmpPtr; + } + } + + return result; +} + +static int +NRCoroutineCallerCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CoroutineData *corPtr = data[0]; + Command *cmdPtr = corPtr->cmdPtr; + + /* + * This is the last callback in the caller execEnv, right before switching + * to the coroutine's + */ + + NRE_ASSERT(iPtr->execEnvPtr == corPtr->callerEEPtr); + + if (!corPtr->eePtr) { + /* + * The execEnv was wound down but not deleted for our sake. We finish + * the job here. The caller context has already been restored. + */ + + NRE_ASSERT(iPtr->varFramePtr == corPtr->caller.varFramePtr); + NRE_ASSERT(iPtr->framePtr == corPtr->caller.framePtr); + NRE_ASSERT(iPtr->cmdFramePtr == corPtr->caller.cmdFramePtr); + ckfree((char *) corPtr); + return result; + } + + NRE_ASSERT(COR_IS_SUSPENDED(corPtr)); + SAVE_CONTEXT(corPtr->running); + RESTORE_CONTEXT(corPtr->caller); + + if (cmdPtr->flags & CMD_IS_DELETED) { + /* + * The command was deleted while it was running: wind down the execEnv, + * this will do the complete cleanup. RewindCoroutine will restore both + * the caller's context and interp state. + */ + + return RewindCoroutine(corPtr, result); + } + + return result; +} + +static int +NRCoroutineExitCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CoroutineData *corPtr = data[0]; + Command *cmdPtr = corPtr->cmdPtr; + + /* + * This runs at the bottom of the Coroutine's execEnv: it will be executed + * when the coroutine returns or is wound down, but not when it yields. It + * deletes the coroutine and restores the caller's environment. + */ + + NRE_ASSERT(interp == corPtr->eePtr->interp); + NRE_ASSERT(TOP_CB(interp) == NULL); + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + NRE_ASSERT(!COR_IS_SUSPENDED(corPtr)); + NRE_ASSERT(TOP_CB(interp) == NULL); + NRE_ASSERT((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineCallerCallback) + || ((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineFirstCallback) && + (corPtr->callerEEPtr->callbackPtr->nextPtr->procPtr == NRCoroutineCallerCallback))); + + NRE_ASSERT(iPtr->framePtr->compiledLocals == NULL); + TclPopStackFrame(interp); + + cmdPtr->deleteProc = NULL; + Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); + TclCleanupCommandMacro(cmdPtr); + + corPtr->eePtr->corPtr = NULL; + TclDeleteExecEnv(corPtr->eePtr); + corPtr->eePtr = NULL; + + /* RESTORE_CONTEXT(corPtr->caller); AUTOMATIC! */ + + NRE_ASSERT(iPtr->framePtr == corPtr->caller.framePtr); + NRE_ASSERT(iPtr->cmdFramePtr == corPtr->caller.cmdFramePtr); + iPtr->varFramePtr = corPtr->caller.varFramePtr; + + iPtr->execEnvPtr = corPtr->callerEEPtr; + + return result; +} + +static int +NRInterpCoroutine( + ClientData clientData, + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + CoroutineData *corPtr = (CoroutineData *) clientData; + + if ((objc != 1) && (objc != 2)) { + Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); + return TCL_ERROR; + } + + if (!COR_IS_SUSPENDED(corPtr)) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "coroutine \"", Tcl_GetString(objv[0]), + "\" is already running", NULL); + return TCL_ERROR; + } + + + /* + * Swap the interp's environment to make it suitable to run this coroutine. + * TEBC needs no info to resume executing after a suspension: the codePtr + * will be read from the execEnv's saved bottomPtr. + */ + + if (objc == 2) { + Tcl_SetObjResult(interp, objv[1]); + } + + SAVE_CONTEXT(corPtr->caller); + RESTORE_CONTEXT(corPtr->running); + PlugCoroutineChains(corPtr); + + TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); + + iPtr->execEnvPtr = corPtr->eePtr; + return TclExecuteByteCode(interp, NULL); +} + +int +TclNRCoroutineObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Command *cmdPtr; + CoroutineData *corPtr; + Tcl_Obj *cmdObjPtr; + CallFrame *framePtr, **framePtrPtr; + TEOV_callback *rootPtr = TOP_CB(interp); + char *fullName; + const char *procName; + Namespace *nsPtr, *altNsPtr, *cxtNsPtr; + Tcl_DString ds; + + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); + return TCL_ERROR; + } + + /* + * FIXME: this is copy/pasted from Tcl_ProcObjCommand. Should have + * something in tclUtil.c to find the FQ name. + */ + + fullName = TclGetString(objv[1]); + TclGetNamespaceForQualName(interp, fullName, NULL, 0, + &nsPtr, &altNsPtr, &cxtNsPtr, &procName); + + if (nsPtr == NULL) { + Tcl_AppendResult(interp, "can't create procedure \"", fullName, + "\": unknown namespace", NULL); + return TCL_ERROR; + } + if (procName == NULL) { + Tcl_AppendResult(interp, "can't create procedure \"", fullName, + "\": bad procedure name", NULL); + return TCL_ERROR; + } + if ((nsPtr != iPtr->globalNsPtr) + && (procName != NULL) && (procName[0] == ':')) { + Tcl_AppendResult(interp, "can't create procedure \"", procName, + "\" in non-global namespace with name starting with \":\"", + NULL); + return TCL_ERROR; + } + + corPtr = (CoroutineData *) ckalloc(sizeof(CoroutineData)); + corPtr->eePtr = TclCreateExecEnv(interp); + corPtr->callerEEPtr = iPtr->execEnvPtr; + corPtr->eePtr->corPtr = corPtr; + corPtr->stackLevel = NULL; + + Tcl_DStringInit(&ds); + if (nsPtr != iPtr->globalNsPtr) { + Tcl_DStringAppend(&ds, nsPtr->fullName, -1); + Tcl_DStringAppend(&ds, "::", 2); + } + Tcl_DStringAppend(&ds, procName, -1); + + cmdPtr = (Command *) Tcl_NRCreateCommand(interp, Tcl_DStringValue(&ds), + /*objProc*/ NULL, NRInterpCoroutine, (ClientData) corPtr, + DeleteCoroutine); + Tcl_DStringFree(&ds); + + corPtr->cmdPtr = cmdPtr; + cmdPtr->refCount++; + + /* + * Be sure not to pass a canonical list for the command so that we insure + * the body is bytecompiled: we need a TEBC instance to handle [yield] + */ + + cmdObjPtr = Tcl_NewListObj(objc-2, &objv[2]); + TclGetString(cmdObjPtr); + TclFreeIntRep(cmdObjPtr); + cmdObjPtr->typePtr = NULL; + Tcl_IncrRefCount(cmdObjPtr); + + /* + * Set up the callback in caller execEnv and switch to the new + * execEnv. Switch now so that the CallFrame is allocated on the new + * execEnv's stack. Then push a CallFrame and CmdFrame. + */ + + TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); + TclNRAddCallback(interp, NRCoroutineFirstCallback, corPtr, NULL, NULL, NULL); + SAVE_CONTEXT(corPtr->caller); + + iPtr->execEnvPtr = corPtr->eePtr; + + framePtrPtr = &framePtr; + if (TCL_OK != TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, + NULL, 0)) { + corPtr->eePtr->corPtr = NULL; + TclDeleteExecEnv(corPtr->eePtr); + ckfree((char *) corPtr); + return TCL_ERROR; + } + framePtr->objc = objc-2; + framePtr->objv = &objv[2]; + + SAVE_CONTEXT(corPtr->base); + corPtr->running = NULL_CONTEXT; + + /* + * Eval things in 'uplevel #0', except for the very first command lookup + * which should be looked up in caller's context. + * + * A better approach would use the lambda infrastructure, but it is a bit + * clumsy for now: we have the "lambda is a nameless proc" hack, we'd need + * the cleaner "proc is a named lambda" to do this properly. + */ + + iPtr->varFramePtr = iPtr->rootFramePtr; + iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; + + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL, NULL, NULL); + return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); +} + /* * Local Variables: diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 868b0b8..8e26dcf 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.101 2008/07/31 20:01:39 msofer Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.102 2008/08/17 19:37:11 msofer Exp $ */ #include "tclInt.h" @@ -278,13 +278,13 @@ CatchObjCmdCallback( int objc = PTR2INT(data[0]); Tcl_Obj *varNamePtr = data[1]; Tcl_Obj *optionVarNamePtr = data[2]; - + int rewind = ((Interp *) interp)->execEnvPtr->rewind; /* * We disable catch in interpreters where the limit has been exceeded. */ - if (Tcl_LimitExceeded(interp)) { + if (rewind || Tcl_LimitExceeded(interp)) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (\"catch\" body line %d)", interp->errorLine)); return TCL_ERROR; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 044a978..c7539ba 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.105 2008/08/14 10:49:08 das Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.106 2008/08/17 19:37:11 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -842,6 +842,7 @@ MODULE_SCOPE Tcl_NRPostProc NRCallTEBC; #define TCL_NR_BC_TYPE 0 #define TCL_NR_ATEXIT_TYPE 1 #define TCL_NR_TAILCALL_TYPE 2 +#define TCL_NR_YIELD_TYPE 3 /* *---------------------------------------------------------------- diff --git a/generic/tclExecute.c b/generic/tclExecute.c index cc7e4bc..65795bd 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.405 2008/08/16 14:27:28 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.406 2008/08/17 19:37:11 msofer Exp $ */ #include "tclInt.h" @@ -804,7 +804,11 @@ TclCreateExecEnv( Tcl_IncrRefCount(eePtr->constants[0]); TclNewBooleanObj(eePtr->constants[1], 1); Tcl_IncrRefCount(eePtr->constants[1]); + eePtr->interp = interp; eePtr->callbackPtr = NULL; + eePtr->corPtr = NULL; + eePtr->bottomPtr = NULL; + eePtr->rewind = 0; esPtr->prevPtr = NULL; esPtr->nextPtr = NULL; @@ -882,6 +886,9 @@ TclDeleteExecEnv( if (eePtr->callbackPtr) { Tcl_Panic("Deleting execEnv with pending TEOV callbacks!"); } + if (eePtr->corPtr) { + Tcl_Panic("Deleting execEnv with existing coroutine"); + } ckfree((char *) eePtr); } @@ -1826,6 +1833,28 @@ TclExecuteByteCode( TEOV_callback *atExitPtr = NULL; int isTailcall = 0; + if (!codePtr) { + /* + * Reawakening a suspended coroutine: the [yield] command + * is returning. + */ + + NRE_ASSERT(iPtr->execEnvPtr->corPtr->eePtr == iPtr->execEnvPtr); + NRE_ASSERT(iPtr->execEnvPtr->corPtr != NULL); + NRE_ASSERT(iPtr->execEnvPtr->corPtr->eePtr == iPtr->execEnvPtr); + NRE_ASSERT(COR_IS_SUSPENDED(iPtr->execEnvPtr->corPtr)); + + initLevel = 0; + nested = 1; + + oldBottomPtr = iPtr->execEnvPtr->bottomPtr; + iPtr->execEnvPtr->corPtr->stackLevel = &initLevel; + if (iPtr->execEnvPtr->rewind) { + result = TCL_ERROR; + } + goto returnToCaller; + } + nonRecursiveCallStart: if (nested) { TEOV_callback *callbackPtr = TOP_CB(interp); @@ -1848,13 +1877,12 @@ TclExecuteByteCode( * variables, swap codePtr and start running the new one. */ - NR_DATA_BURY(); codePtr = param; break; case TCL_NR_ATEXIT_TYPE: { /* * A request to perform a command at exit: put it in the stack - * and continue eexec'ing the current bytecode + * and continue exec'ing the current bytecode */ TEOV_callback *newPtr = TOP_CB(interp); @@ -1868,11 +1896,8 @@ TclExecuteByteCode( #endif newPtr->nextPtr = bottomPtr->atExitPtr; bottomPtr->atExitPtr = newPtr; - while (cleanup--) { - Tcl_Obj *objPtr = POP_OBJECT(); - Tcl_DecrRefCount(objPtr); - } - goto nonRecursiveCallReturn; + oldBottomPtr = bottomPtr; + goto returnToCaller; } case TCL_NR_TAILCALL_TYPE: { /* @@ -1915,6 +1940,37 @@ TclExecuteByteCode( } goto abnormalReturn; } + case TCL_NR_YIELD_TYPE: { /*[yield] */ + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + + if (!corPtr) { + Tcl_SetResult(interp, + "yield can only be called in a coroutine", TCL_STATIC); + result = TCL_ERROR; + goto checkForCatch; + } + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + NRE_ASSERT(corPtr->stackLevel != NULL); + NRE_ASSERT(bottomPtr == corPtr->eePtr->bottomPtr); + if (corPtr->stackLevel != &initLevel) { + Tcl_SetResult(interp, + "cannot yield: C stack busy", TCL_STATIC); + result = TCL_ERROR; + goto checkForCatch; + } + + /* + * Save our state, restore the caller's execEnv and return + */ + + NR_DATA_BURY(); + esPtr->tosPtr = tosPtr; + corPtr->stackLevel = NULL; /* mark suspended */ + iPtr->execEnvPtr->bottomPtr = bottomPtr; + + iPtr->execEnvPtr = corPtr->callerEEPtr; + return TCL_OK; + } default: Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } @@ -1929,8 +1985,13 @@ TclExecuteByteCode( auxObjList = NULL; initLevel = 1; NR_DATA_INIT(); /* record this level's data */ + + if (iPtr->execEnvPtr->corPtr && !iPtr->execEnvPtr->corPtr->stackLevel) { + iPtr->execEnvPtr->corPtr->stackLevel = &initLevel; + } nonRecursiveCallReturn: + iPtr->execEnvPtr->bottomPtr = bottomPtr; bcFramePtr = (CmdFrame *) (bottomPtr + 1); initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); @@ -1965,6 +2026,11 @@ TclExecuteByteCode( TclArgumentBCEnter((Tcl_Interp*) iPtr,codePtr,bcFramePtr); + if (iPtr->execEnvPtr->rewind) { + result = TCL_ERROR; + goto abnormalReturn; + } + } else { /* * Returning from a non-recursive call. State is already completely @@ -1973,7 +2039,12 @@ TclExecuteByteCode( NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); iPtr->cmdFramePtr = bcFramePtr->nextPtr; - + + if (iPtr->execEnvPtr->rewind) { + result = TCL_ERROR; + goto abnormalReturn; + } + if (result == TCL_OK) { /* * Reset the interp's result to avoid possible duplications of @@ -2731,7 +2802,11 @@ TclExecuteByteCode( pc += pcAdjustment; goto nonRecursiveCallStart; } + iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; + NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr->nextPtr); + + iPtr->execEnvPtr->bottomPtr = bottomPtr; if (result == TCL_OK) { Tcl_Obj *objPtr; @@ -7591,6 +7666,9 @@ TclExecuteByteCode( */ checkForCatch: + if (iPtr->execEnvPtr->rewind) { + goto abnormalReturn; + } if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { bytes = GetSrcInfoForPc(pc, codePtr, &length); if (bytes != NULL) { @@ -7747,6 +7825,7 @@ TclExecuteByteCode( TclCleanupByteCode(codePtr); } + returnToCaller: if (oldBottomPtr) { /* * Restore the state to what it was previous to this bytecode, deal @@ -7759,7 +7838,6 @@ TclExecuteByteCode( result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); NR_DATA_DIG(); - DECACHE_STACK_INFO(); if (TOP_CB(interp) == bottomPtr->rootPtr) { /* * The bytecode is returning, all callbacks were run. Run atExit @@ -7856,6 +7934,7 @@ TclExecuteByteCode( iPtr->atExitPtr = atExitPtr; } + iPtr->execEnvPtr->bottomPtr = NULL; return result; } #undef iPtr diff --git a/generic/tclInt.h b/generic/tclInt.h index 8992044..c40220f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.390 2008/08/13 23:08:38 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.391 2008/08/17 19:37:12 msofer Exp $ */ #ifndef _TCLINT @@ -1330,15 +1330,38 @@ typedef struct ExecStack { * currently active execution stack. */ +typedef struct CorContext { + struct CallFrame *framePtr; + struct CallFrame *varFramePtr; + struct CmdFrame *cmdFramePtr; +} CorContext; + +typedef struct CoroutineData { + struct Command *cmdPtr; + struct ExecEnv *eePtr; + struct ExecEnv *callerEEPtr; + CorContext caller; + CorContext running; + CorContext base; + int *stackLevel; +} CoroutineData; + typedef struct ExecEnv { ExecStack *execStackPtr; /* Points to the first item in the * evaluation stack on the heap. */ Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" * objs. */ + struct Tcl_Interp *interp; struct TEOV_callback *callbackPtr; /* Top callback in TEOV's stack */ + struct CoroutineData *corPtr; + struct BottomData *bottomPtr; + int rewind; } ExecEnv; +#define COR_IS_SUSPENDED(corPtr) \ + ((corPtr)->stackLevel == NULL) + /* * The definitions for the LiteralTable and LiteralEntry structures. Each * interpreter contains a LiteralTable. It is used to reduce the storage @@ -2523,13 +2546,14 @@ MODULE_SCOPE long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS]; MODULE_SCOPE char * tclEmptyStringRep; MODULE_SCOPE char tclEmptyString; + /* *---------------------------------------------------------------- - * Procedures shared among Tcl modules but not used by the outside world: + * Procedures shared among Tcl modules but not used by the outside world, + * introduced by/for NRE. *---------------------------------------------------------------- */ -/* Introduced by/for NRE */ MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; @@ -2540,6 +2564,14 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; MODULE_SCOPE Tcl_ObjCmdProc TclNRAtProcExitObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; + +/* + *---------------------------------------------------------------- + * Procedures shared among Tcl modules but not used by the outside world: + *---------------------------------------------------------------- + */ MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); diff --git a/tests/unsupported.test b/tests/unsupported.test index c043ae2..48cd130 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -1,4 +1,4 @@ -# Commands covered: proc, apply, [interp alias], [namespce import], tailcall +# Commands covered: tailcall, atProcExit, coroutine, yield # # This file contains a collection of tests for experimental commands that are # found in ::tcl::unsupported. The tests will migrate to normal test files @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.3 2008/08/04 14:59:53 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.4 2008/08/17 19:37:13 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -19,15 +19,11 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint testnrelevels [llength [info commands testnrelevels]] testConstraint atProcExit [llength [info commands ::tcl::unsupported::atProcExit]] testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] +testConstraint coroutine [llength [info commands ::tcl::unsupported::yield]] -if {[testConstraint atProcExit]} { - namespace eval tcl::unsupported namespace export atProcExit - namespace import tcl::unsupported::atProcExit -} - -if {[testConstraint tailcall]} { - namespace eval tcl::unsupported namespace export tailcall - namespace import tcl::unsupported::tailcall +if {[namespace exists tcl::unsupported]} { + namespace eval tcl::unsupported namespace export * + namespace import tcl::unsupported::* } # @@ -424,10 +420,311 @@ test unsupported-AT.1 {atProcExit and tailcall} -constraints { rename a {} } -result {{0 2 3 1 6} {0 2 3 1 6} 0} +# +# Test coroutines +# + +if {[testConstraint coroutine]} { + namespace import tcl::unsupported::coroutine + namespace import tcl::unsupported::yield +} + +set lambda [list {{start 0} {stop 10}} { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + yield [expr {$i*$stop}] + incr i + } +}] + + +test unsupported-C.1.1 {coroutine basic} -constraints {coroutine} \ +-setup { + coroutine foo ::apply $lambda + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo] + } + set res +} -cleanup { + rename foo {} + unset res +} -result {0 10 20} + +test unsupported-C.1.2 {coroutine basic} -constraints {coroutine} \ +-setup { + coroutine foo ::apply $lambda 2 8 + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo] + } + set res +} -cleanup { + rename foo {} + unset res +} -result {16 24 32} + +test unsupported-C.1.3 {yield returns new arg} -constraints {coroutine} \ +-setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + set stop [yield [expr {$i*$stop}]] + incr i + } + } + coroutine foo ::apply [list {{start 2} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo $k] + } + set res +} -cleanup { + rename foo {} + unset res +} -result {20 6 12} + +test unsupported-C.1.4 {yield in nested proc} -constraints {coroutine} \ +-setup { + proc moo {} { + upvar 1 i i stop stop + yield [expr {$i*$stop}] + } + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + moo + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo $k] + } + set res +} -cleanup { + rename foo {} + rename moo {} + unset body res +} -result {0 10 20} + +test unsupported-C.1.5 {just yield} -constraints {coroutine} \ +-body { + coroutine foo yield + list [foo] [catch foo msg] $msg +} -cleanup { + unset msg +} -result {{} 1 {invalid command name "foo"}} + +test unsupported-C.1.6 {just yield} -constraints {coroutine} \ +-body { + coroutine foo [list yield] + list [foo] [catch foo msg] $msg +} -cleanup { + unset msg +} -result {{} 1 {invalid command name "foo"}} + +test unsupported-C.1.7 {yield in nested uplevel} -constraints {coroutine} \ +-setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + uplevel 0 [list yield [expr {$i*$stop}]] + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [eval foo $k] + } + set res +} -cleanup { + rename foo {} + unset body res +} -result {0 10 20} + +test unsupported-C.1.8 {yield in nested uplevel} -constraints {coroutine} \ +-setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + uplevel 0 yield [expr {$i*$stop}] + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [eval foo $k] + } + set res +} -cleanup { + rename foo {} + unset body res +} -result {0 10 20} + +test unsupported-C.1.9 {yield in nested eval} -constraints {coroutine} \ +-setup { + proc moo {} { + upvar 1 i i stop stop + yield [expr {$i*$stop}] + } + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + eval moo + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo $k] + } + set res +} -cleanup { + rename moo {} + unset body res +} -returnCodes error -result {cannot yield: C stack busy} + +test unsupported-C.1.10 {yield in nested eval} -constraints {coroutine} \ +-setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + eval yield + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [eval foo $k] + } + set res +} -cleanup { + unset body res +} -returnCodes error -result {cannot yield: C stack busy} + +test unsupported-C.1.11 {yield outside coroutine} -constraints {coroutine} \ +-setup { + proc moo {} { + upvar 1 i i stop stop + yield [expr {$i*$stop}] + } +} -body { + variable i 5 stop 6 + moo +} -cleanup { + rename moo {} + unset i stop +} -returnCodes error -result {yield can only be called in a coroutine} + +test unsupported-C.1.12 {proc as coroutine} -constraints {coroutine} \ +-setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + uplevel 0 [list yield [expr {$i*$stop}]] + incr i + } + } + proc moo {{start 0} {stop 10}} $body + coroutine foo moo 2 8 +} -body { + list [foo] [foo] +} -cleanup { + unset body + rename moo {} + rename foo {} +} -result {16 24} + +test unsupported-C.2.1 {self deletion on return} -constraints {coroutine} \ +-body { + coroutine foo set x 3 + foo +} -returnCodes error -result {invalid command name "foo"} + +test unsupported-C.2.2 {self deletion on return} -constraints {coroutine} \ +-body { + coroutine foo ::apply [list {} {yield; yield 1; return 2}] + list [foo] [foo] [catch foo msg] $msg +} -result {1 2 1 {invalid command name "foo"}} + +test unsupported-C.2.3 {self deletion on error return} -constraints {coroutine} \ +-body { + coroutine foo ::apply [list {} {yield;yield 1; error ouch!}] + list [foo] [catch foo msg] $msg [catch foo msg] $msg +} -result {1 1 ouch! 1 {invalid command name "foo"}} + +test unsupported-C.2.4 {self deletion on other return} -constraints {coroutine} \ +-body { + coroutine foo ::apply [list {} {yield;yield 1; return -code 100 ouch!}] + list [foo] [catch foo msg] $msg [catch foo msg] $msg +} -result {1 100 ouch! 1 {invalid command name "foo"}} + +test unsupported-C.2.5 {deletion of suspended coroutine} -constraints {coroutine} \ +-body { + coroutine foo ::apply [list {} {yield; yield 1; return 2}] + list [foo] [rename foo {}] [catch foo msg] $msg +} -result {1 {} 1 {invalid command name "foo"}} + +test unsupported-C.2.6 {deletion of running coroutine} -constraints {coroutine} \ +-body { + coroutine foo ::apply [list {} {yield; rename foo {}; yield 1; return 2}] + list [foo] [catch foo msg] $msg +} -result {1 1 {invalid command name "foo"}} + + # cleanup ::tcltest::cleanupTests + +unset -nocomplain lambda + if {[testConstraint tailcall]} { namespace forget tcl::unsupported::tailcall } @@ -436,6 +733,11 @@ if {[testConstraint atProcExit]} { namespace forget tcl::unsupported::atProcExit } +if {[testConstraint coroutine]} { + namespace forget tcl::unsupported::coroutine + namespace forget tcl::unsupported::yield +} + if {[testConstraint testnrelevels]} { namespace forget testnre::* namespace delete testnre -- cgit v0.12 From 6318a3f2fcce17f013901a893ca69b8dd36843ee Mon Sep 17 00:00:00 2001 From: das Date: Wed, 20 Aug 2008 11:45:15 +0000 Subject: * generic/tclTest.c (TestconcatobjCmd): fix use of internal-only TclInvalidateStringRep macro. [Bug 2057479] --- ChangeLog | 6 ++++++ generic/tclTest.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca1e984..0ac5357 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-20 Daniel Steffen + + * generic/tclTest.c (TestconcatobjCmd): fix use of internal-only + TclInvalidateStringRep macro. + [Bug 2057479] + 2008-08-17 Miguel Sofer * generic/tclBasic.c: Implementation of [coroutine] and [yield] diff --git a/generic/tclTest.c b/generic/tclTest.c index b2b0265..f332bf8 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.122 2008/08/17 14:15:25 msofer Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.123 2008/08/20 11:45:19 das Exp $ */ #define TCL_TEST @@ -6617,11 +6617,17 @@ TestconcatobjCmd( list1Ptr = Tcl_NewStringObj("foo bar sum", -1); Tcl_ListObjLength(NULL, list1Ptr, &len); - TclInvalidateStringRep(list1Ptr); + if (list1Ptr->bytes != NULL) { + ckfree((char *) list1Ptr->bytes); + list1Ptr->bytes = NULL; + } list2Ptr = Tcl_NewStringObj("eeny meeny", -1); Tcl_ListObjLength(NULL, list2Ptr, &len); - TclInvalidateStringRep(list2Ptr); + if (list2Ptr->bytes != NULL) { + ckfree((char *) list2Ptr->bytes); + list2Ptr->bytes = NULL; + } /* * Verify that concat'ing a list obj with one or more empty strings does -- cgit v0.12 From 446c1175b59ef4cb95c7fc050a187c8855df7500 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Aug 2008 12:18:17 +0000 Subject: Minor cleanup --- ChangeLog | 165 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 81 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ac5357..af59a38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,7 @@ 2008-08-20 Daniel Steffen - * generic/tclTest.c (TestconcatobjCmd): fix use of internal-only - TclInvalidateStringRep macro. - [Bug 2057479] + * generic/tclTest.c (TestconcatobjCmd): Fix use of internal-only + TclInvalidateStringRep macro. [Bug 2057479] 2008-08-17 Miguel Sofer @@ -14,17 +13,17 @@ * tests/unsupported.test: * generic/tclTest.c (TestconcatobjCmd): - * generic/tclUtil.c (Tcl_ConcatObj): - * tests/util.test (util-4.7): - fix [Bug 1447328]; the original "fix" turned Tcl_ConcatObj() into - a hairy monster. This was exposed by [Bug 2055782]. Additionally, + * generic/tclUtil.c (Tcl_ConcatObj): + * tests/util.test (util-4.7): + Fix [Bug 1447328]; the original "fix" turned Tcl_ConcatObj() into a + hairy monster. This was exposed by [Bug 2055782]. Additionally, Tcl_ConcatObj could corrupt its input under certain conditions! *** NASTY BUG FIXED *** 2008-08-16 Miguel Sofer - * generic/tclExecute.c: better cmdFrame management + * generic/tclExecute.c: Better cmdFrame management 2008-08-14 Don Porter @@ -37,32 +36,32 @@ * generic/tclProc.c (TclNRInterpProcCore, InterpProcNR2): for NRE. [Bug 2017160] - * generic/tclBasic.c (TclDTraceInfo): add two extra arguments to + * generic/tclBasic.c (TclDTraceInfo): Add two extra arguments to * generic/tclCompile.h: DTrace 'info' probes for tclOO * generic/tclDTrace.d: method & class/object info. - * generic/tclCompile.h: add support for debug logging of DTrace + * generic/tclCompile.h: Add support for debug logging of DTrace * generic/tclBasic.c: 'proc', 'cmd' and 'inst' probes (does _not_ require a platform with DTrace). - * generic/tclCmdIL.c (TclInfoFrame): check fPtr->line before + * generic/tclCmdIL.c (TclInfoFrame): Check fPtr->line before dereferencing as line info may not exists when TclInfoFrame() is called from a DTrace probe. - * tests/fCmd.test (fCmd-6.23): made result matching robust when test + * tests/fCmd.test (fCmd-6.23): Made result matching robust when test workdir and /tmp are not on same FS. - * unix/tclUnixThrd.c: remove unused TclpThreadGetStackSize() + * unix/tclUnixThrd.c: Remove unused TclpThreadGetStackSize() * generic/tclInt.h: and related ifdefs and autoconf tests. * unix/tclUnixPort.h: [Bug 2017264] (jenglish) * unix/tcl.m4: - * unix/Makefile.in: ensure Makefile shell is /bin/bash for + * unix/Makefile.in: Ensure Makefile shell is /bin/bash for * unix/configure.in (SunOS): DTrace-enabled build on Solaris. (followup to 2008-06-12) [Bug 2016584] - * unix/tcl.m4 (SC_PATH_X): check for libX11.dylib in addition to + * unix/tcl.m4 (SC_PATH_X): Check for libX11.dylib in addition to libX11.so et al. * unix/configure: autoconf-2.59 @@ -70,8 +69,8 @@ 2008-08-13 Miguel Sofer - * tests/nre.test: added test for large {*}-expansion effects - + * tests/nre.test: Added test for large {*}-expansion effects + 2008-08-13 Don Porter * generic/tclFileName.c: Fix for errors handling -types {} @@ -81,17 +80,17 @@ 2008-08-12 Jeff Hobbs * generic/tclOOInfo.c (InfoObjectDefnCmd, InfoObjectMixinsCmd): - fix # args displayed. [Bug 2048676] + Fix # args displayed. [Bug 2048676] 2008-08-08 Don Porter S * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check for bytecode validity. [Bug 2037727] - * generic/tclProc.c (TclProcCompileProc): On recompile of - a proc, clear away any entries on the CompiledLocal list from the - previous compile. This will prevent compile of temporary variables - in the proc body from growing the localCache arbitrarily large. + * generic/tclProc.c (TclProcCompileProc): On recompile of a + proc, clear away any entries on the CompiledLocal list from the + previous compile. This will prevent compile of temporary variables in + the proc body from growing the localCache arbitrarily large. * README: Bump version number to 8.6a2 * generic/tcl.h: @@ -116,23 +115,22 @@ 2008-08-11 Andreas Kupries - * library/tm.tcl: Added a 'package provide' command to the - generated ifneeded scripts of Tcl Modules, for early detection of - conflicts between the version specified through the file name and - a 'provide' command in the module implementation, if any. Note - that this change also now allows Tcl Modules to not provide a - 'provide' command at all, and declaring their version only through - their filename. + * library/tm.tcl: Added a 'package provide' command to the generated + ifneeded scripts of Tcl Modules, for early detection of conflicts + between the version specified through the file name and a 'provide' + command in the module implementation, if any. Note that this change + also now allows Tcl Modules to not provide a 'provide' command at all, + and declaring their version only through their filename. - * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggered - * tests/proc.test: by procbody::test::proc. See [Bug 2043636]. - Added a test case demonstrating the leak before the fix. Fixed a - few spelling errors in test descriptions as well. + * generic/tclProc.c (Tcl_ProcObjCmd): Fixed memory leak triggered by + * tests/proc.test: procbody::test::proc. See [Bug 2043636]. Added a + test case demonstrating the leak before the fix. Fixed a few spelling + errors in test descriptions as well. 2008-08-11 Don Porter * library/http/http.tcl: Bump http version to 2.7.1 to account - * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This + * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This * unix/Makefile.in: release of http now requires a * win/Makefile.in: dependency on Tcl 8.5 to be able to * win/makefile.bc: use the unsigned formats in the @@ -140,30 +138,30 @@ 2008-08-11 Pat Thoyts - * library/http/http.tcl: crc field from zlib data should be treated as + * library/http/http.tcl: CRC field from zlib data should be treated as unsigned for 64bit support [Bug 2046846] 2008-08-10 Miguel Sofer - * generic/tclProc.c: completely removed ProcCompileProc, which was - a fix for [Bug 1482718]. This is not needed at least since - varReform, where the local variable data at runtime is read from - the CallFrame and/or the LocalCache. - + * generic/tclProc.c: Completely removed ProcCompileProc, which was a + fix for [Bug 1482718]. This is not needed at least since varReform, + where the local variable data at runtime is read from the CallFrame + and/or the LocalCache. + 2008-08-09 Miguel Sofer - * generic/tclBasic.c: slight cleanup + * generic/tclBasic.c: Slight cleanup * generic/tclCompile.h: - * generic/tclExecute.c: + * generic/tclExecute.c: 2008-08-09 Daniel Steffen - * generic/tclExecute.c: fix warnings. + * generic/tclExecute.c: Fix warnings. - * generic/tclOOMethod.c (PushMethodCallFrame): fix uninitialized efi + * generic/tclOOMethod.c (PushMethodCallFrame): Fix uninitialized efi name field. - * tests/lrange.test (lrange-1.17): add test cleanup; whitespace. + * tests/lrange.test (lrange-1.17): Add test cleanup; whitespace. 2008-08-08 Don Porter @@ -184,33 +182,32 @@ * library/tzdata/Europe/Budapest: * library/tzdata/Europe/Sofia: * library/tzdata/Indian/Mauritius: Olson's tzdata2008e. - + 2008-08-07 Miguel Sofer - * generic/tclBasic.c: Fix tailcalls falling out of tebc into + * generic/tclBasic.c: Fix tailcalls falling out of tebc into * generic/tclExecute.c: Tcl_EvalEx. [Bug 2017946] * generic/tclInt.h: - + 2008-08-06 Don Porter S - * generic/tclOO.c: Revised TclOO's check for an interp - being deleted during handling of object command deletion. The - old code was relying on documented features of command delete - traces that do not in fact work. [Bug 2039178] + * generic/tclOO.c: Revised TclOO's check for an interp being + deleted during handling of object command deletion. The old code was + relying on documented features of command delete traces that do not in + fact work. [Bug 2039178] - * tests/oo.test (oo-26.*): Added tests that demonstrate - failure of TclOO to check for various kinds of invalid bytecode - during method dispatch. [Bug 2037727] + * tests/oo.test (oo-26.*): Added tests that demonstrate failure + of TclOO to check for various kinds of invalid bytecode during method + dispatch. [Bug 2037727] 2008-08-06 Miguel Sofer - * generic/tclVar.c (TclLookupSimpleVar): fix bug that the core - could not trigger before TclOO: the number of locals was being - read from the Proc, which can under some circumstance be out of - sync with the localCache's. Found by dgp while investigating - [Bug 2037727]. - - * library/init.tcl (::unknown): removed the [namespace inscope] + * generic/tclVar.c (TclLookupSimpleVar): Fix bug that the core could + not trigger before TclOO: the number of locals was being read from the + Proc, which can under some circumstance be out of sync with the + localCache's. Found by dgp while investigating [Bug 2037727]. + + * library/init.tcl (::unknown): Removed the [namespace inscope] hack that was maintained for Itcl *** POTENTIAL INCOMPATIBILITY *** for Itcl @@ -229,17 +226,17 @@ 2008-08-04 Miguel Sofer - * tests/nre.test: added tests for [if], [while] and [for]. A test - for [foreach] has been added and marked as knownbug, awaiting for - it to be NR-enabled. - - * generic/tclBasic.c: made atProcExit commands run + * tests/nre.test: Added tests for [if], [while] and [for]. A test + for [foreach] has been added and marked as knownbug, awaiting for it + to be NR-enabled. + + * generic/tclBasic.c: Made atProcExit commands run * generic/tclCompile.h: inconditionally, streamlined * generic/tclExecute.c: atProcExit/tailcall processing * generic/tclProc.c: in TEBC. * tests/unsupported.test: -2008-08-04 Don Porter S +2008-08-04 Don Porter * generic/tclExecute.c: Stopped faulty double-logging of errors to * tests/execute.test: stack trace when a compile epoch bump triggers @@ -248,27 +245,27 @@ 2008-08-03 Miguel Sofer - * generic/tclBasic.c: new unsupported command atProcExit - * generic/tclCompile.h: that shares the implementation with - * generic/tclExecute.c: tailcall. Fixed a segfault in + * generic/tclBasic.c: New unsupported command atProcExit + * generic/tclCompile.h: that shares the implementation with + * generic/tclExecute.c: tailcall. Fixed a segfault in * generic/tclInt.h: tailcalls. Tests added. * generic/tclInterp.c: * generic/tclNamesp.c: * tests/unsupported.test: - + 2008-08-02 Miguel Sofer - * tests/NRE.test (removed): migrated tests to standard locations, + * tests/NRE.test (removed): Migrated tests to standard locations, * tests/nre.test (new): separating core functionality from the * tests/unsupported.test (new): experimental commands. 2008-08-01 Jeff Hobbs - * doc/Exit.3: do not call Tcl_Finalize implicitly + * doc/Exit.3: Do not call Tcl_Finalize implicitly * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead * win/tclWin32Dll.c (DllMain): to issues and the user should be - explicitly calling Tcl_Finalize before unloading regardless. - Clarify the docs to note the explicit need in embedded use. + explicitly calling Tcl_Finalize before unloading regardless. Clarify + the docs to note the explicit need in embedded use. 2008-08-01 Don Porter @@ -281,10 +278,10 @@ 2008-07-31 Miguel Sofer - * tests/NRE.test: replaced all deep-recursing tests by shallower + * tests/NRE.test: Replaced all deep-recursing tests by shallower tests that actually measure the C-stack depth. This makes them bearable again (even under memdebug) and avoid crashing on failure. - + * generic/tclBasic.c: NR-enabling [catch], [if] and [for] and * generic/tclCmdAH.c: [while] (the script, not the tests) * generic/tclCmdIL.c: @@ -313,16 +310,16 @@ * generic/tclTest.c: * tests/NRE.test: - * generic/tclBasic.c (TclNREvalObjEx): new comments and code reorg + * generic/tclBasic.c (TclNREvalObjEx): New comments and code reorg to clarify what is happening. - * generic/tclBasic.c: guard against the value of iPtr->evalFlags - changing between the times where TEOV and TEOV_exception - run. Thanks dgp for catching this. + * generic/tclBasic.c: Guard against the value of iPtr->evalFlags + changing between the times where TEOV and TEOV_exception run. Thanks + dgp for catching this. 2008-07-29 Miguel Sofer - * tests/NRE.test: new tests that went MIA in the NRE revamping + * tests/NRE.test: New tests that went MIA in the NRE revamping * generic/tclBasic.c: Clean up * generic/tclNRE.h: @@ -336,7 +333,7 @@ allocation where an interp is know; this is left for some other time, requires a lot of grunt work. - * generic/tclExecute.c: fix [Bug 2030670] that cause + * generic/tclExecute.c: Fix [Bug 2030670] that cause TclStackRealloc to panic on rare corner cases. Thx ajpasadyn for diagnose and patch. -- cgit v0.12 From b2fbd3af7fb8e933d6689b24dd0328b311da11fa Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Aug 2008 13:14:41 +0000 Subject: Remove pointless casts --- generic/tclTest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index f332bf8..be7853e 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.123 2008/08/20 11:45:19 das Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.124 2008/08/20 13:14:41 dkf Exp $ */ #define TCL_TEST @@ -6618,14 +6618,14 @@ TestconcatobjCmd( list1Ptr = Tcl_NewStringObj("foo bar sum", -1); Tcl_ListObjLength(NULL, list1Ptr, &len); if (list1Ptr->bytes != NULL) { - ckfree((char *) list1Ptr->bytes); + ckfree(list1Ptr->bytes); list1Ptr->bytes = NULL; } list2Ptr = Tcl_NewStringObj("eeny meeny", -1); Tcl_ListObjLength(NULL, list2Ptr, &len); if (list2Ptr->bytes != NULL) { - ckfree((char *) list2Ptr->bytes); + ckfree(list2Ptr->bytes); list2Ptr->bytes = NULL; } -- cgit v0.12 From d873ee915ba7272ff08adda29fcc075b6cff21f4 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Aug 2008 15:02:32 +0000 Subject: Squelch warning --- generic/tclExecute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 65795bd..0311da2 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.406 2008/08/17 19:37:11 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.407 2008/08/20 15:02:32 dkf Exp $ */ #include "tclInt.h" @@ -2370,7 +2370,7 @@ TclExecuteByteCode( goto instStartCmdOK; } else { const char *bytes; - int length, opnd; + int length = 0, opnd; Tcl_Obj *newObjResultPtr; bytes = GetSrcInfoForPc(pc, codePtr, &length); -- cgit v0.12 From 37a1fa926eb75cc4aee1113d06f594adaa5e6f20 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Aug 2008 15:31:06 +0000 Subject: General whitespace/style policing --- generic/tclBasic.c | 552 ++++++++++++++++++++++++++--------------------------- 1 file changed, 271 insertions(+), 281 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 6d91c02..40c76b5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.355 2008/08/17 19:37:10 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.356 2008/08/20 15:31:06 dkf Exp $ */ #include "tclInt.h" @@ -506,8 +506,8 @@ Tcl_CreateInterp(void) iPtr->cmdFramePtr = NULL; iPtr->linePBodyPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); iPtr->lineBCPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); - iPtr->lineLAPtr = (Tcl_HashTable*) ckalloc(sizeof(Tcl_HashTable)); - iPtr->lineLABCPtr = (Tcl_HashTable*) ckalloc(sizeof(Tcl_HashTable)); + iPtr->lineLAPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); + iPtr->lineLABCPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); Tcl_InitHashTable(iPtr->linePBodyPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineBCPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineLAPtr, TCL_ONE_WORD_KEYS); @@ -640,16 +640,16 @@ Tcl_CreateInterp(void) statsPtr->numExecutions = 0; statsPtr->numCompilations = 0; statsPtr->numByteCodesFreed = 0; - (void) memset(statsPtr->instructionCount, 0, + memset(statsPtr->instructionCount, 0, sizeof(statsPtr->instructionCount)); statsPtr->totalSrcBytes = 0.0; statsPtr->totalByteCodeBytes = 0.0; statsPtr->currentSrcBytes = 0.0; statsPtr->currentByteCodeBytes = 0.0; - (void) memset(statsPtr->srcCount, 0, sizeof(statsPtr->srcCount)); - (void) memset(statsPtr->byteCodeCount, 0, sizeof(statsPtr->byteCodeCount)); - (void) memset(statsPtr->lifetimeCount, 0, sizeof(statsPtr->lifetimeCount)); + memset(statsPtr->srcCount, 0, sizeof(statsPtr->srcCount)); + memset(statsPtr->byteCodeCount, 0, sizeof(statsPtr->byteCodeCount)); + memset(statsPtr->lifetimeCount, 0, sizeof(statsPtr->lifetimeCount)); statsPtr->currentInstBytes = 0.0; statsPtr->currentLitBytes = 0.0; @@ -660,7 +660,7 @@ Tcl_CreateInterp(void) statsPtr->numLiteralsCreated = 0; statsPtr->totalLitStringBytes = 0.0; statsPtr->currentLitStringBytes = 0.0; - (void) memset(statsPtr->literalCount, 0, sizeof(statsPtr->literalCount)); + memset(statsPtr->literalCount, 0, sizeof(statsPtr->literalCount)); #endif /* TCL_COMPILE_STATS */ /* @@ -696,7 +696,7 @@ Tcl_CreateInterp(void) iPtr->pendingObjDataPtr = NULL; iPtr->asyncReadyPtr = TclGetAsyncReadyPtr(); iPtr->atExitPtr = NULL; - + /* * Create the core commands. Do it here, rather than calling * Tcl_CreateCommand, because it's faster (there's no need to check for a @@ -828,7 +828,7 @@ Tcl_CreateInterp(void) if (mathopNSPtr == NULL) { Tcl_Panic("can't create math operator namespace"); } - (void) Tcl_Export(interp, mathopNSPtr, "*", 1); + Tcl_Export(interp, mathopNSPtr, "*", 1); strcpy(mathFuncName, "::tcl::mathop::"); for (opcmdInfoPtr=mathOpCmds ; opcmdInfoPtr->name!=NULL ; opcmdInfoPtr++){ TclOpCmdClientData *occdPtr = (TclOpCmdClientData *) @@ -1049,7 +1049,7 @@ Tcl_DontCallWhenDeleted( } for (hPtr = Tcl_FirstHashEntry(hTablePtr, &hSearch); hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { - dPtr = (AssocData *) Tcl_GetHashValue(hPtr); + dPtr = Tcl_GetHashValue(hPtr); if ((dPtr->proc == proc) && (dPtr->clientData == clientData)) { ckfree((char *) dPtr); Tcl_DeleteHashEntry(hPtr); @@ -1298,7 +1298,6 @@ DeleteInterpProc( Tcl_HashSearch search; Tcl_HashTable *hTablePtr; ResolverScheme *resPtr, *nextResPtr; - CancelInfo *cancelInfo; /* * Punt if there is an error in the Tcl_Release/Tcl_Preserve matchup. @@ -1334,15 +1333,13 @@ DeleteInterpProc( Tcl_MutexLock(&cancelLock); hPtr = Tcl_FindHashEntry(&cancelTable, (char *) iPtr); if (hPtr != NULL) { - cancelInfo = (CancelInfo *) Tcl_GetHashValue(hPtr); + CancelInfo *cancelInfo = Tcl_GetHashValue(hPtr); if (cancelInfo != NULL) { if (cancelInfo->result != NULL) { ckfree((char *) cancelInfo->result); - cancelInfo->result = NULL; } ckfree((char *) cancelInfo); - cancelInfo = NULL; } Tcl_DeleteHashEntry(hPtr); @@ -1395,8 +1392,7 @@ DeleteInterpProc( hPtr = Tcl_FirstHashEntry(hTablePtr, &search); for (; hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { - Tcl_DeleteCommandFromToken(interp, - (Tcl_Command) Tcl_GetHashValue(hPtr)); + Tcl_DeleteCommandFromToken(interp, Tcl_GetHashValue(hPtr)); } Tcl_DeleteHashTable(hTablePtr); ckfree((char *) hTablePtr); @@ -1523,7 +1519,7 @@ DeleteInterpProc( for (hPtr = Tcl_FirstHashEntry(iPtr->lineBCPtr, &hSearch); hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { - ExtCmdLoc *eclPtr = (ExtCmdLoc *) Tcl_GetHashValue(hPtr); + ExtCmdLoc *eclPtr = Tcl_GetHashValue(hPtr); if (eclPtr->type == TCL_LOCATION_SOURCE) { Tcl_DecrRefCount(eclPtr->path); @@ -1564,7 +1560,7 @@ DeleteInterpProc( } Tcl_DeleteHashTable(iPtr->lineLAPtr); - ckfree((char*) iPtr->lineLAPtr); + ckfree((char *) iPtr->lineLAPtr); iPtr->lineLAPtr = NULL; if (iPtr->lineLABCPtr->numEntries) { @@ -1577,7 +1573,7 @@ DeleteInterpProc( } Tcl_DeleteHashTable(iPtr->lineLABCPtr); - ckfree((char*) iPtr->lineLABCPtr); + ckfree((char *) iPtr->lineLABCPtr); iPtr->lineLABCPtr = NULL; } @@ -2002,7 +1998,7 @@ Tcl_CreateCommand( * stuck in an infinite loop). */ - ckfree((char *) Tcl_GetHashValue(hPtr)); + ckfree(Tcl_GetHashValue(hPtr)); } } else { /* @@ -2260,7 +2256,7 @@ TclInvokeStringCommand( { Command *cmdPtr = clientData; int i, result; - const char **argv = (const char **) + const char **argv = TclStackAlloc(interp, (unsigned)(objc + 1) * sizeof(char *)); for (i = 0; i < objc; i++) { @@ -2274,7 +2270,7 @@ TclInvokeStringCommand( result = (*cmdPtr->proc)(cmdPtr->clientData, interp, objc, argv); - TclStackFree(interp, (void *) argv); + TclStackFree(interp, argv); return result; } @@ -2306,10 +2302,10 @@ TclInvokeObjectCommand( int argc, /* Number of arguments. */ register const char **argv) /* Argument strings. */ { - Command *cmdPtr = (Command *) clientData; + Command *cmdPtr = clientData; Tcl_Obj *objPtr; int i, length, result; - Tcl_Obj **objv = (Tcl_Obj **) + Tcl_Obj **objv = TclStackAlloc(interp, (unsigned)(argc * sizeof(Tcl_Obj *))); for (i = 0; i < argc; i++) { @@ -3122,12 +3118,12 @@ CallCommandTraces( } static int -CancelEvalProc(clientData, interp, code) - ClientData clientData; /* Interp to cancel the script in progress. */ - Tcl_Interp *interp; /* Ignored */ - int code; /* Current return code from command. */ +CancelEvalProc( + ClientData clientData, /* Interp to cancel the script in progress. */ + Tcl_Interp *interp, /* Ignored */ + int code) /* Current return code from command. */ { - CancelInfo *cancelInfo = (CancelInfo *) clientData; + CancelInfo *cancelInfo = clientData; Interp *iPtr; if (cancelInfo != NULL) { @@ -3185,13 +3181,13 @@ CancelEvalProc(clientData, interp, code) * command. This insures that traces get a correct NUL-terminated command * string. The Tcl_Obj has refCount==1. * - * *** MAINTAINER WARNING *** - * The returned Tcl_Obj is all wrong for any purpose but getting the - * source string for an objc/objv command line in the stringRep (no - * stringRep if no source is available) and the corresponding substituted - * version in the List intrep. - * This means that the intRep and stringRep DO NOT COINCIDE! Using these - * Tcl_Objs normally is likely to break things. + * *** MAINTAINER WARNING *** + * The returned Tcl_Obj is all wrong for any purpose but getting the + * source string for an objc/objv command line in the stringRep (no + * stringRep if no source is available) and the corresponding substituted + * version in the List intrep. + * This means that the intRep and stringRep DO NOT COINCIDE! Using these + * Tcl_Objs normally is likely to break things. * *---------------------------------------------------------------------- */ @@ -3370,7 +3366,6 @@ OldMathFuncProc( args = (Tcl_Value *) ckalloc(dataPtr->numArgs * sizeof(Tcl_Value)); for (j = 1, k = 0; j < objc; ++j, ++k) { - /* TODO: Convert to TclGetNumberFromObj() ? */ valuePtr = objv[j]; result = Tcl_GetDoubleFromObj(NULL, valuePtr, &d); @@ -3389,7 +3384,7 @@ OldMathFuncProc( "argument to math function didn't have numeric value", TCL_STATIC); TclCheckBadOctal(interp, Tcl_GetString(valuePtr)); - ckfree((char *)args); + ckfree((char *) args); return TCL_ERROR; } @@ -3421,7 +3416,7 @@ OldMathFuncProc( break; case TCL_INT: if (ExprIntFunc(NULL, interp, 2, &(objv[j-1])) != TCL_OK) { - ckfree((char *)args); + ckfree((char *) args); return TCL_ERROR; } valuePtr = Tcl_GetObjResult(interp); @@ -3430,7 +3425,7 @@ OldMathFuncProc( break; case TCL_WIDE_INT: if (ExprWideFunc(NULL, interp, 2, &(objv[j-1])) != TCL_OK) { - ckfree((char *)args); + ckfree((char *) args); return TCL_ERROR; } valuePtr = Tcl_GetObjResult(interp); @@ -3446,7 +3441,7 @@ OldMathFuncProc( errno = 0; result = (*dataPtr->proc)(dataPtr->clientData, interp, args, &funcResult); - ckfree((char *)args); + ckfree((char *) args); if (result != TCL_OK) { return result; } @@ -3770,8 +3765,6 @@ Tcl_Canceled( int flags) { register Interp *iPtr = (Interp *) interp; - const char *id, *message = NULL; - int length; /* * Traverse up the to the top-level interp, checking for the CANCELED flag @@ -3781,7 +3774,7 @@ Tcl_Canceled( * stop checking. */ - for (; iPtr!=NULL; iPtr = (Interp *) Tcl_GetMaster((Tcl_Interp *)iPtr)) { + for (; iPtr!=NULL; iPtr = (Interp *) Tcl_GetMaster((Tcl_Interp *) iPtr)) { /* * Has the current script in progress for this interpreter been * canceled or is the stack being unwound due to the previous script @@ -3815,6 +3808,9 @@ Tcl_Canceled( */ if (flags & TCL_LEAVE_ERR_MSG) { + const char *id, *message = NULL; + int length; + /* * Setup errorCode variables so that we can differentiate * between being canceled and unwound. @@ -3972,7 +3968,7 @@ Tcl_CancelEval( * TCL_ERROR. A result or error message is left in interp's result. * * Side effects: - * Always pushes a callback. Other side effects depend on the command. + * Always pushes a callback. Other side effects depend on the command. * *---------------------------------------------------------------------- */ @@ -3993,7 +3989,7 @@ Tcl_EvalObjv( TEOV_callback *rootPtr = TOP_CB(interp); result = TclNREvalObjv(interp, objc, objv, flags, NULL); - return TclNRRunCallbacks(interp, result, rootPtr, 0); + return TclNRRunCallbacks(interp, result, rootPtr, 0); } int @@ -4007,7 +4003,7 @@ TclNREvalObjv( * evaluation of the script. Only * TCL_EVAL_GLOBAL, TCL_EVAL_INVOKE and * TCL_EVAL_NOERR are currently supported. */ - Command *cmdPtr) /* NULL if the Command is to be looked up + Command *cmdPtr) /* NULL if the Command is to be looked up * here, otherwise the pointer to the * requested Command struct to be invoked. */ { @@ -4017,9 +4013,9 @@ TclNREvalObjv( Tcl_ObjCmdProc *objProc; ClientData objClientData; Command **cmdPtrPtr; - + iPtr->lookupNsPtr = NULL; - + /* * Push a callback with cleanup tasks for commands; the cmdPtr at data[0] * will be filled later when the command is found: save its address at @@ -4032,7 +4028,7 @@ TclNREvalObjv( TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); - + TclResetCancellation(interp, 0); iPtr->numLevels++; result = TclInterpReady(interp); @@ -4081,7 +4077,7 @@ TclNREvalObjv( cmdPtr = TEOV_LookupCmdFromObj(interp, objv[0], lookupNsPtr); if (!cmdPtr) { - notFound: + notFound: result = TEOV_NotFound(interp, objc, objv, lookupNsPtr); return result; } @@ -4144,7 +4140,7 @@ TclNREvalObjv( *cmdPtrPtr = cmdPtr; cmdPtr->refCount++; - + /* * Find the objProc to call: nreProc if available, objProc otherwise. Push * a callback to do the actual running. @@ -4165,12 +4161,12 @@ int TclNRRunCallbacks( Tcl_Interp *interp, int result, - struct TEOV_callback *rootPtr, /* All callbacks down to rootPtr not - * inclusive are to be run */ - int tebcCall) /* Normal callers set this to 0; TEBC sets - * it to 1 when executing a bytecode, to - * 2 when cleaning up after a bytecode - * returns. */ + struct TEOV_callback *rootPtr, + /* All callbacks down to rootPtr not inclusive + * are to be run. */ + int tebcCall) /* Normal callers set this to 0; TEBC sets it + * to 1 when executing a bytecode, to 2 when + * cleaning up after a bytecode returns. */ { Interp *iPtr = (Interp *) interp; TEOV_callback *callbackPtr; @@ -4190,7 +4186,7 @@ TclNRRunCallbacks( (void) Tcl_GetObjResult(interp); } - restart: + restart: while (TOP_CB(interp) != rootPtr) { callbackPtr = TOP_CB(interp); @@ -4200,12 +4196,12 @@ TclNRRunCallbacks( NRE_ASSERT(result==TCL_OK); return TCL_OK; } - + /* * IMPLEMENTATION REMARKS (FIXME) * - * Add here other direct handling possibilities for optimisation? - * One could handle the very frequent NRCommand and NRRunObjProc right + * Add here other direct handling possibilities for optimisation? One + * could handle the very frequent NRCommand and NRRunObjProc right * here to save an indirect function call and improve icache * management. Would it? Test it, time it ... */ @@ -4237,12 +4233,11 @@ NRCommand( Command *cmdPtr = data[0]; /* int cmdStart = PTR2INT(data[1]); NOT USED HERE */ - if (cmdPtr) { TclCleanupCommandMacro(cmdPtr); } ((Interp *)interp)->numLevels--; - + /* OPT ?? * Do not interrupt a series of cleanups with async or limit checks: * just check at the end? @@ -4259,7 +4254,7 @@ NRCommand( } return result; } - + static int NRRunObjProc( ClientData data[], @@ -4295,23 +4290,25 @@ NRCallTEBC( NRE_ASSERT(result == TCL_OK); switch (type) { - case TCL_NR_BC_TYPE: - return TclExecuteByteCode(interp, data[1]); - case TCL_NR_ATEXIT_TYPE: - case TCL_NR_TAILCALL_TYPE: - /* For atProcExit and tailcalls */ - Tcl_SetResult(interp, - "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); - return TCL_ERROR; - case TCL_NR_YIELD_TYPE: - if (iPtr->execEnvPtr->corPtr) { - Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); - } else { - Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); - } - return TCL_ERROR; - default: - Tcl_Panic("unknown call type to TEBC"); + case TCL_NR_BC_TYPE: + return TclExecuteByteCode(interp, data[1]); + case TCL_NR_ATEXIT_TYPE: + case TCL_NR_TAILCALL_TYPE: + /* For atProcExit and tailcalls */ + Tcl_SetResult(interp, + "atProcExit/tailcall can only be called from a proc or lambda", + TCL_STATIC); + return TCL_ERROR; + case TCL_NR_YIELD_TYPE: + if (iPtr->execEnvPtr->corPtr) { + Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); + } else { + Tcl_SetResult(interp, "yield can only be called in a coroutine", + TCL_STATIC); + } + return TCL_ERROR; + default: + Tcl_Panic("unknown call type to TEBC"); } return result; /* not reached */ } @@ -4485,8 +4482,7 @@ TEOV_NotFound( Tcl_ListObjGetElements(NULL, currNsPtr->unknownHandlerPtr, &handlerObjc, &handlerObjv); newObjc = objc + handlerObjc; - newObjv = (Tcl_Obj **) TclStackAlloc(interp, - (int) sizeof(Tcl_Obj *) * newObjc); + newObjv = TclStackAlloc(interp, (int) sizeof(Tcl_Obj *) * newObjc); /* * Copy command prefix from unknown handler and add on the real command's @@ -4928,7 +4924,7 @@ TclEvalEx( * TIP #280. Track lines within the words of the current command. */ - int wordLine = line; + int wordLine = line; const char *wordStart = parsePtr->commandStart; /* @@ -5018,7 +5014,7 @@ TclEvalEx( int wordIdx = numWords; int objIdx = objectsNeeded - 1; - if ((numWords > minObjs) || (objectsNeeded > minObjs)) { + if ((numWords > minObjs) || (objectsNeeded > minObjs)) { objv = objvSpace = (Tcl_Obj **) ckalloc(objectsNeeded * sizeof(Tcl_Obj *)); lines = lineSpace = (int *) @@ -5242,8 +5238,8 @@ TclAdvanceLines( * * TclArgumentEnter -- * - * This procedure is a helper for the TIP #280 uplevel extension. - * It enters location references for the arguments of a command to be + * This procedure is a helper for the TIP #280 uplevel extension. It + * enters location references for the arguments of a command to be * invoked. Only the first entry has the actual data, further entries * simply count the usage up. * @@ -5259,21 +5255,21 @@ TclAdvanceLines( void TclArgumentEnter( - Tcl_Interp *interp, - Tcl_Obj **objv, - int objc, - CmdFrame *cfPtr) + Tcl_Interp *interp, + Tcl_Obj **objv, + int objc, + CmdFrame *cfPtr) { - Interp *iPtr = (Interp*) interp; + Interp *iPtr = (Interp *) interp; int new, i; Tcl_HashEntry *hPtr; CFWord *cfwPtr; for (i = 1; i < objc; i++) { /* - * Ignore argument words without line information (= dynamic). If - * they are variables they may have location information associated - * with that, either through globally recorded 'set' invokations, or + * Ignore argument words without line information (= dynamic). If they + * are variables they may have location information associated with + * that, either through globally recorded 'set' invokations, or * literals in bytecode. Eitehr way there is no need to record * something here. */ @@ -5281,16 +5277,16 @@ TclArgumentEnter( if (cfPtr->line[i] < 0) { continue; } - hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, (char*) objv[i], &new); + hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, (char *) objv[i], &new); if (new) { /* * The word is not on the stack yet, remember the current location * and initialize references. */ - cfwPtr = (CFWord*) ckalloc(sizeof(CFWord)); + cfwPtr = (CFWord *) ckalloc(sizeof(CFWord)); cfwPtr->framePtr = cfPtr; - cfwPtr->word = i; + cfwPtr->word = i; cfwPtr->refCount = 1; Tcl_SetHashValue(hPtr, cfwPtr); } else { @@ -5299,7 +5295,7 @@ TclArgumentEnter( * relevant. Just remember the reference to prevent early removal. */ - cfwPtr = (CFWord*) Tcl_GetHashValue(hPtr); + cfwPtr = Tcl_GetHashValue(hPtr); cfwPtr->refCount++; } } @@ -5327,29 +5323,29 @@ TclArgumentEnter( void TclArgumentRelease( - Tcl_Interp *interp, - Tcl_Obj **objv, - int objc) + Tcl_Interp *interp, + Tcl_Obj **objv, + int objc) { - Interp *iPtr = (Interp*) interp; - Tcl_HashEntry *hPtr; - CFWord *cfwPtr; + Interp *iPtr = (Interp *) interp; int i; for (i = 1; i < objc; i++) { - hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) objv[i]); + CFWord *cfwPtr; + Tcl_HashEntry *hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, + (char *) objv[i]); if (!hPtr) { continue; } - cfwPtr = (CFWord*) Tcl_GetHashValue(hPtr); + cfwPtr = (CFWord *) Tcl_GetHashValue(hPtr); cfwPtr->refCount--; if (cfwPtr->refCount > 0) { continue; } - ckfree((char*) cfwPtr); + ckfree((char *) cfwPtr); Tcl_DeleteHashEntry(hPtr); } } @@ -5359,9 +5355,9 @@ TclArgumentRelease( * * TclArgumentBCEnter -- * - * This procedure is a helper for the TIP #280 uplevel extension. - * It enters location references for the literal arguments of commands - * in bytecode about to be invoked. Only the first entry has the actual + * This procedure is a helper for the TIP #280 uplevel extension. It + * enters location references for the literal arguments of commands in + * bytecode about to be invoked. Only the first entry has the actual * data, further entries simply count the usage up. * * Results: @@ -5380,31 +5376,31 @@ TclArgumentBCEnter( void *codePtr, CmdFrame *cfPtr) { - Interp *iPtr = (Interp*) interp; - Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, (char*) codePtr); + Interp *iPtr = (Interp *) interp; + Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, + (char *) codePtr); if (hePtr) { - ExtCmdLoc *eclPtr = (ExtCmdLoc*) Tcl_GetHashValue(hePtr); + ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); int i; for (i = 0; i < eclPtr->nueiloc; i++) { - ExtIndex *eiPtr = &eclPtr->eiloc[i]; Tcl_Obj *obj = eiPtr->obj; int new; Tcl_HashEntry *hPtr; CFWordBC *cfwPtr; - hPtr = Tcl_CreateHashEntry(iPtr->lineLABCPtr, (char*) obj, &new); + hPtr = Tcl_CreateHashEntry(iPtr->lineLABCPtr, (char *) obj, &new); if (new) { /* * The word is not on the stack yet, remember the current * location and initialize references. */ - cfwPtr = (CFWordBC*) ckalloc(sizeof(CFWordBC)); + cfwPtr = (CFWordBC *) ckalloc(sizeof(CFWordBC)); cfwPtr->framePtr = cfPtr; - cfwPtr->eiPtr = eiPtr; + cfwPtr->eiPtr = eiPtr; cfwPtr->refCount = 1; Tcl_SetHashValue(hPtr, cfwPtr); } else { @@ -5414,11 +5410,11 @@ TclArgumentBCEnter( * removal. */ - cfwPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); - cfwPtr->refCount ++; + cfwPtr = Tcl_GetHashValue(hPtr); + cfwPtr->refCount++; } - } /* for */ - } /* if */ + } + } } /* @@ -5426,10 +5422,10 @@ TclArgumentBCEnter( * * TclArgumentBCRelease -- * - * This procedure is a helper for the TIP #280 uplevel extension. - * It removes the location references for the literal arguments of - * commands in bytecode just done. Usage is counted down, the data - * is removed only when no user is left over. + * This procedure is a helper for the TIP #280 uplevel extension. It + * removes the location references for the literal arguments of commands + * in bytecode just done. Usage is counted down, the data is removed only + * when no user is left over. * * Results: * None. @@ -5446,34 +5442,35 @@ TclArgumentBCRelease( Tcl_Interp *interp, void *codePtr) { - Interp *iPtr = (Interp*) interp; - Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, (char*) codePtr); + Interp *iPtr = (Interp *) interp; + Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, + (char *) codePtr); if (hePtr) { - ExtCmdLoc *eclPtr = (ExtCmdLoc*) Tcl_GetHashValue(hePtr); + ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); int i; for (i = 0; i < eclPtr->nueiloc; i++) { Tcl_Obj *obj = eclPtr->eiloc[i].obj; Tcl_HashEntry *hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, - (char*) obj); + (char *) obj); CFWordBC *cfwPtr; if (!hPtr) { continue; } - cfwPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); + cfwPtr = Tcl_GetHashValue(hPtr); cfwPtr->refCount--; if (cfwPtr->refCount > 0) { continue; } - ckfree((char*) cfwPtr); + ckfree((char *) cfwPtr); Tcl_DeleteHashEntry(hPtr); - } /* for */ - } /* if */ + } + } } /* @@ -5496,12 +5493,12 @@ TclArgumentBCRelease( void TclArgumentGet( - Tcl_Interp *interp, - Tcl_Obj *obj, - CmdFrame **cfPtrPtr, - int *wordPtr) + Tcl_Interp *interp, + Tcl_Obj *obj, + CmdFrame **cfPtrPtr, + int *wordPtr) { - Interp *iPtr = (Interp*) interp; + Interp *iPtr = (Interp *) interp; Tcl_HashEntry *hPtr; CmdFrame *framePtr; @@ -5516,7 +5513,7 @@ TclArgumentGet( ((List *)obj->internalRep.twoPtrValue.ptr1)->canonicalFlag)) { return; } - + /* * First look for location information recorded in the argument * stack. That is nearest. @@ -5524,9 +5521,9 @@ TclArgumentGet( hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) obj); if (hPtr) { - CFWord *cfwPtr = (CFWord*) Tcl_GetHashValue(hPtr); + CFWord *cfwPtr = Tcl_GetHashValue(hPtr); - *wordPtr = cfwPtr->word; + *wordPtr = cfwPtr->word; *cfPtrPtr = cfwPtr->framePtr; return; } @@ -5538,14 +5535,14 @@ TclArgumentGet( hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) obj); if (hPtr) { - CFWordBC *cfwPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); + CFWordBC *cfwPtr = Tcl_GetHashValue(hPtr); ExtIndex *eiPtr = cfwPtr->eiPtr; framePtr = cfwPtr->framePtr; - framePtr->data.tebc.pc = (char*) (((ByteCode*) + framePtr->data.tebc.pc = (char *) (((ByteCode *) framePtr->data.tebc.codePtr)->codeStart + eiPtr->pc); *cfPtrPtr = cfwPtr->framePtr; - *wordPtr = eiPtr->word; + *wordPtr = eiPtr->word; return; } } @@ -5677,7 +5674,7 @@ TclEvalObjEx( TEOV_callback *rootPtr = TOP_CB(interp); result = TclNREvalObjEx(interp, objPtr, flags, invoker, word); - return TclNRRunCallbacks(interp, result, rootPtr, 0); + return TclNRRunCallbacks(interp, result, rootPtr, 0); } int @@ -5709,21 +5706,21 @@ TclNREvalObjEx( CmdFrame *eoFramePtr = NULL; int objc; Tcl_Obj **objv; - + /* * Pure List Optimization (no string representation). In this case, we * can safely use Tcl_EvalObjv instead and get an appreciable * improvement in execution speed. This is because it allows us to * avoid a setFromAny step that would just pack everything into a - * string and back out again. + * string and back out again. * * This also preserves any associations between list elements and * location information for such elements. * * This restriction has been relaxed a bit by storing in lists whether - * they are "canonical" or not (a canonical list being one that is either - * pure or that has its string rep derived by UpdateStringOfList from - * the internal rep). + * they are "canonical" or not (a canonical list being one that is + * either pure or that has its string rep derived by + * UpdateStringOfList from the internal rep). */ if (word != INT_MIN) { @@ -5742,41 +5739,41 @@ TclNREvalObjEx( * Note that we use (word==INTMIN) to signal that no command frame * should be pushed, as needed by alias and ensemble redirections. */ - - eoFramePtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); + + eoFramePtr = TclStackAlloc(interp, sizeof(CmdFrame)); eoFramePtr->nline = 0; eoFramePtr->line = NULL; - + eoFramePtr->type = TCL_LOCATION_EVAL_LIST; eoFramePtr->level = (iPtr->cmdFramePtr == NULL? 1 : iPtr->cmdFramePtr->level + 1); eoFramePtr->numLevels = iPtr->numLevels; eoFramePtr->framePtr = iPtr->framePtr; eoFramePtr->nextPtr = iPtr->cmdFramePtr; - - eoFramePtr->cmd.listPtr = objPtr; + + eoFramePtr->cmd.listPtr = objPtr; eoFramePtr->data.eval.path = NULL; - + iPtr->cmdFramePtr = eoFramePtr; } - + /* * Shimmer protection! Always pass an unshared obj. The caller could * incr the refCount of objPtr AFTER calling us! To be completely safe * we always make a copy. The callback takes care od the refCounts for * both listPtr and objPtr. * - * FIXME OPT: preserve just the internal rep? + * FIXME OPT: preserve just the internal rep? */ - + Tcl_IncrRefCount(objPtr); listPtr = TclListObjCopy(interp, objPtr); Tcl_IncrRefCount(listPtr); TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, listPtr, NULL); - + ListObjGetElements(listPtr, objc, objv); - return TclNREvalObjv(interp, objc, objv, flags, NULL); + return TclNREvalObjv(interp, objc, objv, flags, NULL); } if (!(flags & TCL_EVAL_DIRECT)) { @@ -5806,7 +5803,7 @@ TclNREvalObjEx( NULL, NULL); return TCL_OK; } - + { /* * We're not supposed to use the compiler or byte-code @@ -5824,55 +5821,53 @@ TclNREvalObjEx( char *script; int numSrcBytes; - + Tcl_IncrRefCount(objPtr); if (invoker == NULL) { /* * No context, force opening of our own. */ - + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); result = Tcl_EvalEx(interp, script, numSrcBytes, flags); } else { /* * We have an invoker, describing the command asking for the - * evaluation of a subordinate script. This script may originate in a - * literal word, or from a variable, etc. Using the line array we now - * check if we have good line information for the relevant word. The - * type of context is relevant as well. In a non-'source' context we - * don't have to try tracking lines. + * evaluation of a subordinate script. This script may originate + * in a literal word, or from a variable, etc. Using the line + * array we now check if we have good line information for the + * relevant word. The type of context is relevant as well. In a + * non-'source' context we don't have to try tracking lines. * - * First see if the word exists and is a literal. If not we go through - * the easy dynamic branch. No need to perform more complex - * invokations. + * First see if the word exists and is a literal. If not we go + * through the easy dynamic branch. No need to perform more + * complex invokations. */ int pc = 0; - CmdFrame *ctxPtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); - + CmdFrame *ctxPtr = TclStackAlloc(interp, sizeof(CmdFrame)); + *ctxPtr = *invoker; if (invoker->type == TCL_LOCATION_BC) { /* * Note: Type BC => ctxPtr->data.eval.path is not used. * ctxPtr->data.tebc.codePtr is used instead. */ - + TclGetSrcInfoForPc(ctxPtr); pc = 1; } - + script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); - + if ((invoker->nline <= word) || (invoker->line[word] < 0) || (ctxPtr->type != TCL_LOCATION_SOURCE)) { /* * Dynamic script, or dynamic context, force our own context. */ - + result = Tcl_EvalEx(interp, script, numSrcBytes, flags); - } else { /* * Absolute context to reuse. @@ -5880,15 +5875,15 @@ TclNREvalObjEx( iPtr->invokeCmdFramePtr = ctxPtr; iPtr->evalFlags |= TCL_EVAL_CTX; - + result = TclEvalEx(interp, script, numSrcBytes, flags, ctxPtr->line[word]); - + if (pc) { /* * Death of SrcInfo reference. */ - + Tcl_DecrRefCount(ctxPtr->data.eval.path); } } @@ -6826,6 +6821,7 @@ ExprCeilFunc( if (code != TCL_OK) { return TCL_ERROR; } + if (Tcl_GetBignumFromObj(NULL, objv[1], &big) == TCL_OK) { Tcl_SetObjResult(interp, Tcl_NewDoubleObj(TclCeil(&big))); mp_clear(&big); @@ -6861,6 +6857,7 @@ ExprFloorFunc( if (code != TCL_OK) { return TCL_ERROR; } + if (Tcl_GetBignumFromObj(NULL, objv[1], &big) == TCL_OK) { Tcl_SetObjResult(interp, Tcl_NewDoubleObj(TclFloor(&big))); mp_clear(&big); @@ -6882,9 +6879,8 @@ ExprIsqrtFunc( double d; Tcl_WideInt w; mp_int big; - int exact = 0; /* Flag == 1 if the argument can be - * represented in a double as an exact - * integer. */ + int exact = 0; /* Flag ==1 if the argument can be represented + * in a double as an exact integer. */ /* * Check syntax. @@ -6961,7 +6957,6 @@ ExprIsqrtFunc( mp_clear(&big); Tcl_SetObjResult(interp, Tcl_NewBignumObj(&root)); } - return TCL_OK; negarg: @@ -7750,7 +7745,7 @@ DTraceCmdReturn( Tcl_Interp *interp, int result) { - char *cmdName = TclGetString((Tcl_Obj *)data[0]); + char *cmdName = TclGetString((Tcl_Obj *) data[0]); if (TCL_DTRACE_CMD_RETURN_ENABLED()) { TCL_DTRACE_CMD_RETURN(cmdName, result); @@ -7875,7 +7870,6 @@ Tcl_NRCreateCommand( /* If not NULL, gives a function to call when * this command is deleted. */ { - Command *cmdPtr = (Command *) Tcl_CreateObjCommand(interp,cmdName,proc,clientData,deleteProc); @@ -7911,7 +7905,6 @@ Tcl_NREvalObjv( return TclNREvalObjv(interp, objc, objv, flags, NULL); } - int Tcl_NRCmdSwap( Tcl_Interp *interp, @@ -7920,7 +7913,7 @@ Tcl_NRCmdSwap( Tcl_Obj *const objv[], int flags) { - return TclNREvalObjv(interp, objc, objv, flags, (Command *)cmd); + return TclNREvalObjv(interp, objc, objv, flags, (Command *) cmd); } /***************************************************************************** @@ -7931,18 +7924,18 @@ Tcl_NRCmdSwap( * require more thought. Possibly need a new Tcl return code to do it right? * Questions include: * (1) How is the objc/objv tailcall to be run? My current thinking is that - * it should essentially be + * it should essentially be * [tailcall a b c] <=> [uplevel 1 [list a b c]] * with two caveats - * (a) the current frame is dropped first, after running all - * pending cleanup tasks and saving its namespace - * (b) 'a' is looked up in the returning frame's namespace, but the - * command is run in the context to which we are returning - * Current implementation does this if [tailcall] is called from within - * a proc, errors otherwise. + * (a) the current frame is dropped first, after running all pending + * cleanup tasks and saving its namespace + * (b) 'a' is looked up in the returning frame's namespace, but the + * command is run in the context to which we are returning + * Current implementation does this if [tailcall] is called from within + * a proc, errors otherwise. * (2) Should a tailcall bypass [catch] in the returning frame? Current - * implementation does not (or does it? Changed, test!) - it causes an - * error. + * implementation does not (or does it? Changed, test!) - it causes an + * error. * * FIXME NRE! */ @@ -7957,16 +7950,17 @@ TclNRAtProcExitObjCmd( Interp *iPtr = (Interp *) interp; Tcl_Obj *listPtr; Namespace *nsPtr = iPtr->varFramePtr->nsPtr; - + if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); return TCL_ERROR; } - if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ + if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ Tcl_SetResult(interp, - "atProcExit/tailcall can only be called from a proc or lambda", TCL_STATIC); + "atProcExit/tailcall can only be called from a proc or lambda", + TCL_STATIC); return TCL_ERROR; } @@ -8041,14 +8035,13 @@ Tcl_NRAddCallback( } TclNRAddCallback(interp, postProcPtr, data0, data1, data2, data3); } - /* *---------------------------------------------------------------------- * * TclNRCoroutineObjCmd -- (and friends) * - * This object-based function is invoked to process the "coroutine" Tcl + * This object-based function is invoked to process the "coroutine" Tcl * command. It is heavily based on "apply". * * Results: @@ -8065,27 +8058,25 @@ Tcl_NRAddCallback( *---------------------------------------------------------------------- */ -static int NRInterpCoroutine(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int RewindCoroutine(CoroutineData *corPtr, int result); -static void DeleteCoroutine(ClientData clientData); -static void PlugCoroutineChains(CoroutineData *corPtr); - -static int NRCoroutineFirstCallback(ClientData data[], - Tcl_Interp *interp, int result); -static int NRCoroutineExitCallback(ClientData data[], - Tcl_Interp *interp, int result); -static int NRCoroutineCallerCallback(ClientData data[], - Tcl_Interp *interp, int result); - +static int NRInterpCoroutine(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); +static int RewindCoroutine(CoroutineData *corPtr, int result); +static void DeleteCoroutine(ClientData clientData); +static void PlugCoroutineChains(CoroutineData *corPtr); +static int NRCoroutineFirstCallback(ClientData data[], + Tcl_Interp *interp, int result); +static int NRCoroutineExitCallback(ClientData data[], + Tcl_Interp *interp, int result); +static int NRCoroutineCallerCallback(ClientData data[], + Tcl_Interp *interp, int result); static const CorContext NULL_CONTEXT = {NULL, NULL, NULL}; #define SAVE_CONTEXT(context) \ (context).framePtr = iPtr->framePtr; \ - (context).varFramePtr = iPtr->varFramePtr; \ + (context).varFramePtr = iPtr->varFramePtr; \ (context).cmdFramePtr = iPtr->cmdFramePtr #define RESTORE_CONTEXT(context) \ @@ -8108,10 +8099,11 @@ TclNRYieldObjCmd( } if (!iPtr->execEnvPtr->corPtr) { - Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); + Tcl_SetResult(interp, "yield can only be called in a coroutine", + TCL_STATIC); return TCL_ERROR; } - + if (objc == 2) { Tcl_SetObjResult(interp, objv[1]); } @@ -8129,7 +8121,7 @@ RewindCoroutine( Tcl_Obj *objPtr; Tcl_Interp *interp = corPtr->eePtr->interp; Tcl_InterpState state = Tcl_SaveInterpState(interp, result); - + NRE_ASSERT(COR_IS_SUSPENDED(corPtr)); NRE_ASSERT(corPtr->eePtr != NULL); NRE_ASSERT(corPtr->eePtr->bottomPtr != NULL); @@ -8139,7 +8131,7 @@ RewindCoroutine( Tcl_IncrRefCount(objPtr); corPtr->eePtr->rewind = 1; - result = NRInterpCoroutine((ClientData) corPtr, interp, 1, &objPtr); + result = NRInterpCoroutine(corPtr, interp, 1, &objPtr); NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); @@ -8152,10 +8144,10 @@ static void DeleteCoroutine( ClientData clientData) { - CoroutineData *corPtr = (CoroutineData *) clientData; - + register CoroutineData *corPtr = clientData; + if (COR_IS_SUSPENDED(corPtr)) { - (void) RewindCoroutine(corPtr, TCL_OK); + RewindCoroutine(corPtr, TCL_OK); } } @@ -8164,6 +8156,7 @@ PlugCoroutineChains( CoroutineData *corPtr) { Tcl_Interp *interp = corPtr->eePtr->interp; + /* * Called to plug the coroutine's running environment into the caller's, * so that the frame chains are uninterrupted. Note that the levels and @@ -8176,7 +8169,7 @@ PlugCoroutineChains( corPtr->base.framePtr->callerPtr = corPtr->caller.framePtr; corPtr->base.framePtr->callerVarPtr = corPtr->caller.varFramePtr; - + corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; corPtr->base.cmdFramePtr->level = (iPtr->cmdFramePtr == NULL? 1 : iPtr->cmdFramePtr->level + 1); @@ -8190,18 +8183,15 @@ NRCoroutineFirstCallback( int result) { CoroutineData *corPtr = data[0]; + register CmdFrame *tmpPtr = iPtr->cmdFramePtr; - { - CmdFrame *tmpPtr = iPtr->cmdFramePtr; - - if (corPtr->eePtr) { - while (tmpPtr->nextPtr != corPtr->caller.cmdFramePtr) { - tmpPtr = tmpPtr->nextPtr; - } - corPtr->base.cmdFramePtr = tmpPtr; + if (corPtr->eePtr) { + while (tmpPtr->nextPtr != corPtr->caller.cmdFramePtr) { + tmpPtr = tmpPtr->nextPtr; } + corPtr->base.cmdFramePtr = tmpPtr; } - + return result; } @@ -8218,36 +8208,36 @@ NRCoroutineCallerCallback( * This is the last callback in the caller execEnv, right before switching * to the coroutine's */ - + NRE_ASSERT(iPtr->execEnvPtr == corPtr->callerEEPtr); - + if (!corPtr->eePtr) { /* * The execEnv was wound down but not deleted for our sake. We finish * the job here. The caller context has already been restored. */ - + NRE_ASSERT(iPtr->varFramePtr == corPtr->caller.varFramePtr); NRE_ASSERT(iPtr->framePtr == corPtr->caller.framePtr); NRE_ASSERT(iPtr->cmdFramePtr == corPtr->caller.cmdFramePtr); ckfree((char *) corPtr); return result; } - + NRE_ASSERT(COR_IS_SUSPENDED(corPtr)); SAVE_CONTEXT(corPtr->running); RESTORE_CONTEXT(corPtr->caller); - + if (cmdPtr->flags & CMD_IS_DELETED) { /* * The command was deleted while it was running: wind down the execEnv, * this will do the complete cleanup. RewindCoroutine will restore both * the caller's context and interp state. */ - + return RewindCoroutine(corPtr, result); } - + return result; } @@ -8259,13 +8249,13 @@ NRCoroutineExitCallback( { CoroutineData *corPtr = data[0]; Command *cmdPtr = corPtr->cmdPtr; - + /* * This runs at the bottom of the Coroutine's execEnv: it will be executed * when the coroutine returns or is wound down, but not when it yields. It * deletes the coroutine and restores the caller's environment. */ - + NRE_ASSERT(interp == corPtr->eePtr->interp); NRE_ASSERT(TOP_CB(interp) == NULL); NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); @@ -8277,7 +8267,7 @@ NRCoroutineExitCallback( NRE_ASSERT(iPtr->framePtr->compiledLocals == NULL); TclPopStackFrame(interp); - + cmdPtr->deleteProc = NULL; Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); TclCleanupCommandMacro(cmdPtr); @@ -8293,7 +8283,7 @@ NRCoroutineExitCallback( iPtr->varFramePtr = corPtr->caller.varFramePtr; iPtr->execEnvPtr = corPtr->callerEEPtr; - + return result; } @@ -8304,8 +8294,8 @@ NRInterpCoroutine( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - CoroutineData *corPtr = (CoroutineData *) clientData; - + CoroutineData *corPtr = clientData; + if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; @@ -8317,23 +8307,23 @@ NRInterpCoroutine( "\" is already running", NULL); return TCL_ERROR; } - - + /* * Swap the interp's environment to make it suitable to run this coroutine. * TEBC needs no info to resume executing after a suspension: the codePtr - * will be read from the execEnv's saved bottomPtr. + * will be read from the execEnv's saved bottomPtr. */ - + if (objc == 2) { Tcl_SetObjResult(interp, objv[1]); } - + SAVE_CONTEXT(corPtr->caller); RESTORE_CONTEXT(corPtr->running); PlugCoroutineChains(corPtr); - - TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); + + TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, + NULL); iPtr->execEnvPtr = corPtr->eePtr; return TclExecuteByteCode(interp, NULL); @@ -8356,7 +8346,6 @@ TclNRCoroutineObjCmd( Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; - if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); return TCL_ERROR; @@ -8401,12 +8390,11 @@ TclNRCoroutineObjCmd( Tcl_DStringAppend(&ds, "::", 2); } Tcl_DStringAppend(&ds, procName, -1); - + cmdPtr = (Command *) Tcl_NRCreateCommand(interp, Tcl_DStringValue(&ds), - /*objProc*/ NULL, NRInterpCoroutine, (ClientData) corPtr, - DeleteCoroutine); + /*objProc*/ NULL, NRInterpCoroutine, corPtr, DeleteCoroutine); Tcl_DStringFree(&ds); - + corPtr->cmdPtr = cmdPtr; cmdPtr->refCount++; @@ -8414,28 +8402,30 @@ TclNRCoroutineObjCmd( * Be sure not to pass a canonical list for the command so that we insure * the body is bytecompiled: we need a TEBC instance to handle [yield] */ - + cmdObjPtr = Tcl_NewListObj(objc-2, &objv[2]); TclGetString(cmdObjPtr); TclFreeIntRep(cmdObjPtr); cmdObjPtr->typePtr = NULL; Tcl_IncrRefCount(cmdObjPtr); - + /* - * Set up the callback in caller execEnv and switch to the new - * execEnv. Switch now so that the CallFrame is allocated on the new - * execEnv's stack. Then push a CallFrame and CmdFrame. + * Set up the callback in caller execEnv and switch to the new execEnv. + * Switch now so that the CallFrame is allocated on the new execEnv's + * stack. Then push a CallFrame and CmdFrame. */ - - TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); - TclNRAddCallback(interp, NRCoroutineFirstCallback, corPtr, NULL, NULL, NULL); + + TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, + NULL); + TclNRAddCallback(interp, NRCoroutineFirstCallback, corPtr, NULL, NULL, + NULL); SAVE_CONTEXT(corPtr->caller); iPtr->execEnvPtr = corPtr->eePtr; framePtrPtr = &framePtr; if (TCL_OK != TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, - NULL, 0)) { + NULL, 0)) { corPtr->eePtr->corPtr = NULL; TclDeleteExecEnv(corPtr->eePtr); ckfree((char *) corPtr); @@ -8443,10 +8433,10 @@ TclNRCoroutineObjCmd( } framePtr->objc = objc-2; framePtr->objv = &objv[2]; - + SAVE_CONTEXT(corPtr->base); corPtr->running = NULL_CONTEXT; - + /* * Eval things in 'uplevel #0', except for the very first command lookup * which should be looked up in caller's context. @@ -8455,14 +8445,14 @@ TclNRCoroutineObjCmd( * clumsy for now: we have the "lambda is a nameless proc" hack, we'd need * the cleaner "proc is a named lambda" to do this properly. */ - - iPtr->varFramePtr = iPtr->rootFramePtr; + + iPtr->varFramePtr = iPtr->rootFramePtr; iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; - TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL, NULL, NULL); - return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); + return TclNRRunCallbacks(interp, + TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); } - /* * Local Variables: -- cgit v0.12 From faa29c2fefd6d227c3dad33bb98df241a38006bf Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Aug 2008 15:41:20 +0000 Subject: Fix performance bug introduced by fix of [Bug 2037727] --- ChangeLog | 13 +++++++++++++ generic/tclCompile.c | 11 ++++++----- generic/tclInt.h | 12 ++++++++---- generic/tclNamesp.c | 12 +++++++++++- generic/tclOO.c | 10 +++++++++- generic/tclOOMethod.c | 29 +++++++++++++++++++---------- tests/oo.test | 31 +++++++++++++++++++++++-------- 7 files changed, 89 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index af59a38..14372f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-08-20 Donal K. Fellows + + * generic/tclOO.c (AllocObject): Suppress compilation of commands in + the namespace allocated for each object. + * generic/tclOOMethod.c (PushMethodCallFrame): Restore some of the + hackery that makes calling methods of classes fast. Fixes performance + problem introduced by the fix of [Bug 2037727]. + + * generic/tclCompile.c (TclCompileScript): Allow the suppression of + * generic/tclInt.h (NS_SUPPRESS_COMPILATION): compilation of commands + * generic/tclNamesp.c (Tcl_CreateNamespace): from a namespace or its + children. + 2008-08-20 Daniel Steffen * generic/tclTest.c (TestconcatobjCmd): Fix use of internal-only diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 2d040b4..d79ba9d 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.154 2008/07/25 22:11:20 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.155 2008/08/20 15:41:21 dkf Exp $ */ #include "tclInt.h" @@ -1350,6 +1350,7 @@ TclCompileScript( if ((cmdPtr != NULL) && (cmdPtr->compileProc != NULL) + && !(cmdPtr->nsPtr->flags&NS_SUPPRESS_COMPILATION) && !(cmdPtr->flags & CMD_HAS_EXEC_TRACES) && !(iPtr->flags & DONT_COMPILE_CMDS_INLINE)) { int savedNumCmds = envPtr->numCommands; @@ -1474,10 +1475,10 @@ TclCompileScript( tokenPtr[1].start, tokenPtr[1].size); if (eclPtr->type == TCL_LOCATION_SOURCE) { - EnterCmdWordIndex (eclPtr, - envPtr->literalArrayPtr[objIndex].objPtr, - envPtr->codeNext - envPtr->codeStart, - wordIdx); + EnterCmdWordIndex(eclPtr, + envPtr->literalArrayPtr[objIndex].objPtr, + envPtr->codeNext - envPtr->codeStart, + wordIdx); } } TclEmitPush(objIndex, envPtr); diff --git a/generic/tclInt.h b/generic/tclInt.h index c40220f..811278b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.391 2008/08/17 19:37:12 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.392 2008/08/20 15:41:24 dkf Exp $ */ #ifndef _TCLINT @@ -361,13 +361,17 @@ struct NamespacePathEntry { * unit that refers to the namespace has been freed (i.e., when * the namespace's refCount is 0), the namespace's storage will * be freed. - * NS_KILLED 1 means that TclTeardownNamespace has already been called on - * this namespace and it should not be called again [Bug 1355942] + * NS_KILLED - 1 means that TclTeardownNamespace has already been called on + * this namespace and it should not be called again [Bug 1355942] + * NS_SUPPRESS_COMPILATION - + * Marks the commands in this namespace for not being compiled, + * forcing them to be looked up every time. */ #define NS_DYING 0x01 #define NS_DEAD 0x02 -#define NS_KILLED 0x04 +#define NS_KILLED 0x04 +#define NS_SUPPRESS_COMPILATION 0x08 /* * Flags passed to TclGetNamespaceForQualName: diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index c9f022d..535f8cc 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.174 2008/08/03 17:33:12 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.175 2008/08/20 15:41:25 dkf Exp $ */ #include "tclInt.h" @@ -893,6 +893,16 @@ Tcl_CreateNamespace( Tcl_DStringFree(&buffer2); /* + * If compilation of commands originating from the parent NS is + * suppressed, suppress it for commands originating in this one too. + */ + + if (nsPtr->parentPtr != NULL && + nsPtr->parentPtr->flags & NS_SUPPRESS_COMPILATION) { + nsPtr->flags |= NS_SUPPRESS_COMPILATION; + } + + /* * Return a pointer to the new namespace. */ diff --git a/generic/tclOO.c b/generic/tclOO.c index 4db39c3..95926f2 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.14 2008/08/06 21:23:14 dgp Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.15 2008/08/20 15:41:26 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -455,6 +455,14 @@ AllocObject( TclSetNsPath((Namespace *) oPtr->namespacePtr, 1, &fPtr->helpersNs); /* + * Suppress use of compiled versions of the commands in this object's + * namespace and its children; causes wrong behaviour without expensive + * recompilation. [Bug 2037727] + */ + + ((Namespace *) oPtr->namespacePtr)->flags |= NS_SUPPRESS_COMPILATION; + + /* * Fill in the rest of the non-zero/NULL parts of the structure. */ diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index c977a3b..0110283 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.13 2008/08/12 17:51:03 dgp Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.14 2008/08/20 15:41:26 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -16,6 +16,7 @@ #endif #include "tclInt.h" #include "tclOOInt.h" +#include "tclCompile.h" /* * Structure used to help delay computing names of objects or classes for @@ -787,17 +788,25 @@ PushMethodCallFrame( fdPtr->cmd.clientData = &fdPtr->efi; pmPtr->procPtr->cmdPtr = &fdPtr->cmd; - /* - * [Bug 2037727] Always call TclProcCompileProc so that we check not - * only that we have bytecode, but also that it remains valid. + /* + * [Bug 2037727] Always call TclProcCompileProc so that we check not only + * that we have bytecode, but also that it remains valid. Note that we set + * the namespace of the code here directly; this is a hack, but the + * alternative is *so* slow... */ - result = TclProcCompileProc(interp, pmPtr->procPtr, - pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, - "body of method", namePtr); - if (result != TCL_OK) { - return result; - } + if (pmPtr->procPtr->bodyPtr->typePtr == &tclByteCodeType) { + ByteCode *codePtr = + pmPtr->procPtr->bodyPtr->internalRep.otherValuePtr; + + codePtr->nsPtr = nsPtr; + } + result = TclProcCompileProc(interp, pmPtr->procPtr, + pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, "body of method", + namePtr); + if (result != TCL_OK) { + return result; + } /* * Make the stack frame and fill it out with information about this call. diff --git a/tests/oo.test b/tests/oo.test index ea97bf2..3575511 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.10 2008/08/06 21:23:15 dgp Exp $ +# RCS: @(#) $Id: oo.test,v 1.11 2008/08/20 15:41:26 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1799,21 +1799,36 @@ test oo-26.1 {Bug 2037727} -setup { example destroy rename succeed {} } -result succeed - test oo-26.2 {Bug 2037727} -setup { oo::class create example { - method namespace {} {self namespace} - method foo {} {succeed} + method localProc {args body} {proc called $args $body} + method run {} { called } + } + example create i1 + example create i2 +} -body { + i1 localProc args {} + i2 localProc args {return nonempty} + list [i1 run] [i2 run] +} -cleanup { + example destroy +} -result {{} nonempty} +test oo-26.3 {Bug 2037727} -setup { + oo::class create example { + method subProc {args body} { + namespace eval subns [list proc called $args $body] + } + method run {} { subns::called } } example create i1 example create i2 - namespace eval [i1 namespace] {proc succeed args {}} - namespace eval [i2 namespace] {proc succeed args {return succeed}} } -body { - list [i1 foo] [i2 foo] + i1 subProc args {} + i2 subProc args {return nonempty} + list [i1 run] [i2 run] } -cleanup { example destroy -} -result {{} succeed} +} -result {{} nonempty} cleanupTests return -- cgit v0.12 From ae0969dc1fc93fffcaffba7b9558c852a33d624f Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 20 Aug 2008 23:48:42 +0000 Subject: Added casts to make MSVC happy and re-enable the debug build. --- ChangeLog | 5 +++++ generic/tclBasic.c | 4 ++-- generic/tclOOMethod.c | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14372f2..7725eb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-21 Pat Thoyts + + * generic/tclOOMethod.c: Added casts to make MSVC happy + * generic/tclBasic.c: + 2008-08-20 Donal K. Fellows * generic/tclOO.c (AllocObject): Suppress compilation of commands in diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 40c76b5..ac7fd5e 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.356 2008/08/20 15:31:06 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.357 2008/08/20 23:48:42 patthoyts Exp $ */ #include "tclInt.h" @@ -2270,7 +2270,7 @@ TclInvokeStringCommand( result = (*cmdPtr->proc)(cmdPtr->clientData, interp, objc, argv); - TclStackFree(interp, argv); + TclStackFree(interp, (char **)argv); return result; } diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 0110283..c33638d 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.14 2008/08/20 15:41:26 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.15 2008/08/20 23:48:42 patthoyts Exp $ */ #ifdef HAVE_CONFIG_H @@ -799,7 +799,7 @@ PushMethodCallFrame( ByteCode *codePtr = pmPtr->procPtr->bodyPtr->internalRep.otherValuePtr; - codePtr->nsPtr = nsPtr; + codePtr->nsPtr = (Namespace *) nsPtr; } result = TclProcCompileProc(interp, pmPtr->procPtr, pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, "body of method", -- cgit v0.12 From 8ab97c30e3c73b79ec3b866da2879596d77cc9b7 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 21 Aug 2008 10:36:57 +0000 Subject: Align variable naming and typing a bit better with tclNamesp.c. --- generic/tclOOMethod.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index c33638d..67d67b5 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.15 2008/08/20 23:48:42 patthoyts Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.16 2008/08/21 10:36:57 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -735,7 +735,7 @@ PushMethodCallFrame( PMFrameData *fdPtr) /* Place to store information about the call * frame. */ { - Tcl_Namespace *nsPtr = contextPtr->oPtr->namespacePtr; + Namespace *nsPtr = (Namespace *) contextPtr->oPtr->namespacePtr; register int result; const char *namePtr; CallFrame **framePtrPtr = &fdPtr->framePtr; @@ -772,9 +772,10 @@ PushMethodCallFrame( contextPtr->callPtr->chain[contextPtr->index].mPtr; if (mPtr->declaringClassPtr != NULL) { - nsPtr = mPtr->declaringClassPtr->thisPtr->namespacePtr; + nsPtr = (Namespace *) + mPtr->declaringClassPtr->thisPtr->namespacePtr; } else { - nsPtr = mPtr->declaringObjectPtr->namespacePtr; + nsPtr = (Namespace *) mPtr->declaringObjectPtr->namespacePtr; } } @@ -784,7 +785,7 @@ PushMethodCallFrame( fdPtr->efi.length = 2; memset(&fdPtr->cmd, 0, sizeof(Command)); - fdPtr->cmd.nsPtr = (Namespace *) nsPtr; + fdPtr->cmd.nsPtr = nsPtr; fdPtr->cmd.clientData = &fdPtr->efi; pmPtr->procPtr->cmdPtr = &fdPtr->cmd; @@ -799,11 +800,10 @@ PushMethodCallFrame( ByteCode *codePtr = pmPtr->procPtr->bodyPtr->internalRep.otherValuePtr; - codePtr->nsPtr = (Namespace *) nsPtr; + codePtr->nsPtr = nsPtr; } result = TclProcCompileProc(interp, pmPtr->procPtr, - pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, "body of method", - namePtr); + pmPtr->procPtr->bodyPtr, nsPtr, "body of method", namePtr); if (result != TCL_OK) { return result; } @@ -813,8 +813,8 @@ PushMethodCallFrame( * This operation may fail. */ - result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, nsPtr, - FRAME_IS_PROC|FRAME_IS_METHOD); + result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, + (Tcl_Namespace *) nsPtr, FRAME_IS_PROC|FRAME_IS_METHOD); if (result != TCL_OK) { return result; } -- cgit v0.12 From 0aefd12ecc49b90bb53275239ab60e815c7e2ad5 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 21 Aug 2008 14:02:14 +0000 Subject: Added disassembly of TclOO methods. --- ChangeLog | 5 + generic/tclProc.c | 363 ++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 232 insertions(+), 136 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7725eb1..5595080 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-21 Donal K. Fellows + + * generic/tclProc.c (Tcl_DisassembleObjCmd): Added ability to + disassemble TclOO methods. The code to do this is very ugly. + 2008-08-21 Pat Thoyts * generic/tclOOMethod.c: Added casts to make MSVC happy diff --git a/generic/tclProc.c b/generic/tclProc.c index d763fde..9b28fd5 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,11 +12,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.161 2008/08/14 10:49:39 das Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.162 2008/08/21 14:02:23 dkf Exp $ */ #include "tclInt.h" #include "tclCompile.h" +#include "tclOOInt.h" /* * Variables that are part of the [apply] command implementation and which @@ -40,14 +41,14 @@ static int InitArgsAndLocals(Tcl_Interp *interp, Tcl_Obj *procNameObj, int skip); static void InitResolvedLocals(Tcl_Interp *interp, ByteCode *codePtr, Var *defPtr, - Namespace *nsPtr); -static void InitLocalCache(Proc *procPtr); + Namespace *nsPtr); +static void InitLocalCache(Proc *procPtr); static int PushProcCallFrame(ClientData clientData, register Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int isLambda); static void ProcBodyDup(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); static void ProcBodyFree(Tcl_Obj *objPtr); -static int ProcWrongNumArgs(Tcl_Interp *interp, int skip); +static int ProcWrongNumArgs(Tcl_Interp *interp, int skip); static void MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj); static void MakeLambdaError(Tcl_Interp *interp, @@ -223,11 +224,9 @@ Tcl_ProcObjCmd( */ if (iPtr->cmdFramePtr) { - CmdFrame *contextPtr; + CmdFrame *contextPtr = TclStackAlloc(interp, sizeof(CmdFrame)); - contextPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); *contextPtr = *iPtr->cmdFramePtr; - if (contextPtr->type == TCL_LOCATION_BC) { /* * Retrieve source information from the bytecode, if possible. If @@ -255,7 +254,7 @@ Tcl_ProcObjCmd( if (contextPtr->line && (contextPtr->nline >= 4) && (contextPtr->line[3] >= 0)) { int isNew; - Tcl_HashEntry* hePtr; + Tcl_HashEntry *hePtr; CmdFrame *cfPtr = (CmdFrame *) ckalloc(sizeof(CmdFrame)); cfPtr->level = -1; @@ -272,17 +271,17 @@ Tcl_ProcObjCmd( cfPtr->cmd.str.cmd = NULL; cfPtr->cmd.str.len = 0; - hePtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr, (char *) procPtr, - &isNew); + hePtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr, + (char *) procPtr, &isNew); if (!isNew) { /* - * Get the old command frame and release it. See also + * Get the old command frame and release it. See also * TclProcCleanupProc in this file. Currently it seems as * if only the procbodytest::proc command of the testsuite * is able to trigger this situation. */ - CmdFrame* cfOldPtr = (CmdFrame *) Tcl_GetHashValue(hePtr); + CmdFrame *cfOldPtr = Tcl_GetHashValue(hePtr); if (cfOldPtr->type == TCL_LOCATION_SOURCE) { Tcl_DecrRefCount(cfOldPtr->data.eval.path); @@ -296,8 +295,8 @@ Tcl_ProcObjCmd( } /* - * 'contextPtr' is going out of scope; account for the reference that - * it's holding to the path name. + * 'contextPtr' is going out of scope; account for the reference + * that it's holding to the path name. */ Tcl_DecrRefCount(contextPtr->data.eval.path); @@ -935,8 +934,8 @@ TclNRUplevelObjCmd( { register Interp *iPtr = (Interp *) interp; - CmdFrame* invoker = NULL; - int word = 0; + CmdFrame *invoker = NULL; + int word = 0; int result; CallFrame *savedVarFramePtr, *framePtr; Tcl_Obj *objPtr; @@ -1057,16 +1056,15 @@ Proc * TclIsProc( Command *cmdPtr) /* Command to test. */ { - Tcl_Command origCmd; + Tcl_Command origCmd = TclGetOriginalCommand((Tcl_Command) cmdPtr); - origCmd = TclGetOriginalCommand((Tcl_Command) cmdPtr); if (origCmd != NULL) { cmdPtr = (Command *) origCmd; } if (cmdPtr->deleteProc == TclProcDeleteProc) { - return (Proc *) cmdPtr->objClientData; + return cmdPtr->objClientData; } - return (Proc *) 0; + return NULL; } /* @@ -1091,7 +1089,8 @@ TclIsProc( static int ProcWrongNumArgs( - Tcl_Interp *interp, int skip) + Tcl_Interp *interp, + int skip) { CallFrame *framePtr = ((Interp *)interp)->varFramePtr; register Proc *procPtr = framePtr->procPtr; @@ -1099,13 +1098,13 @@ ProcWrongNumArgs( int localCt = procPtr->numCompiledLocals, numArgs, i; Tcl_Obj **desiredObjs; const char *final = NULL; - + /* * Build up desired argument list for Tcl_WrongNumArgs */ numArgs = framePtr->procPtr->numArgs; - desiredObjs = (Tcl_Obj **) TclStackAlloc(interp, + desiredObjs = TclStackAlloc(interp, (int) sizeof(Tcl_Obj *) * (numArgs+1)); #ifdef AVOID_HACKS_FOR_ITCL @@ -1189,7 +1188,7 @@ TclInitCompiledLocals( } framePtr->localCachePtr = codePtr->localCachePtr; framePtr->localCachePtr->refCount++; - } + } InitResolvedLocals(interp, codePtr, varPtr, nsPtr); } @@ -1236,44 +1235,14 @@ InitResolvedLocals( } if (!(haveResolvers && (codePtr->flags & TCL_BYTECODE_RESOLVE_VARS))) { - /* - * Initialize the array of local variables stored in the call frame. - * Some variables may have special resolution rules. In that case, we - * call their "resolver" procs to get our hands on the variable, and - * we make the compiled local a link to the real variable. - */ - - doInitResolvedLocals: - for (; localPtr != NULL; varPtr++, localPtr = localPtr->nextPtr) { - varPtr->flags = 0; - varPtr->value.objPtr = NULL; - - /* - * Now invoke the resolvers to determine the exact variables - * that should be used. - */ - - resVarInfo = localPtr->resolveInfo; - if (resVarInfo && resVarInfo->fetchProc) { - Var *resolvedVarPtr = (Var *) - (*resVarInfo->fetchProc)(interp, resVarInfo); - if (resolvedVarPtr) { - if (TclIsVarInHash(resolvedVarPtr)) { - VarHashRefCount(resolvedVarPtr)++; - } - varPtr->flags = VAR_LINK; - varPtr->value.linkPtr = resolvedVarPtr; - } - } - } - return; + goto doInitResolvedLocals; } /* * This is the first run after a recompile, or else the resolver epoch * has changed: update the resolver cache. */ - + firstLocalPtr = localPtr; for (; localPtr != NULL; localPtr = localPtr->nextPtr) { if (localPtr->resolveInfo) { @@ -1285,15 +1254,15 @@ InitResolvedLocals( localPtr->resolveInfo = NULL; } localPtr->flags &= ~VAR_RESOLVED; - + if (haveResolvers && !(localPtr->flags & (VAR_ARGUMENT|VAR_TEMPORARY))) { ResolverScheme *resPtr = iPtr->resolverPtr; Tcl_ResolvedVarInfo *vinfo; int result; - + if (nsPtr->compiledVarResProc) { - result = (*nsPtr->compiledVarResProc)(nsPtr->interp, + result = nsPtr->compiledVarResProc(nsPtr->interp, localPtr->name, localPtr->nameLength, (Tcl_Namespace *) nsPtr, &vinfo); } else { @@ -1302,7 +1271,7 @@ InitResolvedLocals( while ((result == TCL_CONTINUE) && resPtr) { if (resPtr->compiledVarResProc) { - result = (*resPtr->compiledVarResProc)(nsPtr->interp, + result = resPtr->compiledVarResProc(nsPtr->interp, localPtr->name, localPtr->nameLength, (Tcl_Namespace *) nsPtr, &vinfo); } @@ -1316,7 +1285,38 @@ InitResolvedLocals( } localPtr = firstLocalPtr; codePtr->flags &= ~TCL_BYTECODE_RESOLVE_VARS; - goto doInitResolvedLocals; + + /* + * Initialize the array of local variables stored in the call frame. Some + * variables may have special resolution rules. In that case, we call + * their "resolver" procs to get our hands on the variable, and we make + * the compiled local a link to the real variable. + */ + + doInitResolvedLocals: + for (; localPtr != NULL; varPtr++, localPtr = localPtr->nextPtr) { + varPtr->flags = 0; + varPtr->value.objPtr = NULL; + + /* + * Now invoke the resolvers to determine the exact variables that + * should be used. + */ + + resVarInfo = localPtr->resolveInfo; + if (resVarInfo && resVarInfo->fetchProc) { + register Var *resolvedVarPtr = (Var *) + resVarInfo->fetchProc(interp, resVarInfo); + + if (resolvedVarPtr) { + if (TclIsVarInHash(resolvedVarPtr)) { + VarHashRefCount(resolvedVarPtr)++; + } + varPtr->flags = VAR_LINK; + varPtr->value.linkPtr = resolvedVarPtr; + } + } + } } void @@ -1328,12 +1328,13 @@ TclFreeLocalCache( Tcl_Obj **namePtrPtr = &localCachePtr->varName0; for (i = 0; i < localCachePtr->numVars; i++, namePtrPtr++) { - Tcl_Obj *objPtr = *namePtrPtr; + register Tcl_Obj *objPtr = *namePtrPtr; + /* - * Note that this can be called with interp==NULL, on interp - * deletion. In that case, the literal table and objects go away - * on their own. + * Note that this can be called with interp==NULL, on interp deletion. + * In that case, the literal table and objects go away on their own. */ + if (objPtr) { if (interp) { TclReleaseLiteral(interp, objPtr); @@ -1346,7 +1347,8 @@ TclFreeLocalCache( } static void -InitLocalCache(Proc *procPtr) +InitLocalCache( + Proc *procPtr) { Interp *iPtr = procPtr->iPtr; ByteCode *codePtr = procPtr->bodyPtr->internalRep.otherValuePtr; @@ -1393,7 +1395,7 @@ InitLocalCache(Proc *procPtr) } codePtr->localCachePtr = localCachePtr; localCachePtr->refCount = 1; - localCachePtr->numVars = localCt; + localCachePtr->numVars = localCt; } static int @@ -1410,7 +1412,7 @@ InitArgsAndLocals( register Var *varPtr, *defPtr; int localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax; Tcl_Obj *const *argObjs; - + /* * Make sure that the local cache of variable names and initial values has * been initialised properly . @@ -1426,14 +1428,14 @@ InitArgsAndLocals( } else { defPtr = NULL; } - + /* * Create the "compiledLocals" array. Make sure it is large enough to hold * all the procedure's compiled local variables, including its formal * parameters. */ - varPtr = (Var *) TclStackAlloc(interp, (int)(localCt * sizeof(Var))); + varPtr = TclStackAlloc(interp, (int)(localCt * sizeof(Var))); framePtr->compiledLocals = varPtr; framePtr->numCompiledLocals = localCt; @@ -1476,13 +1478,12 @@ InitArgsAndLocals( Tcl_Obj *objPtr = defPtr->value.objPtr; - if (objPtr) { - varPtr->flags = 0; - varPtr->value.objPtr = objPtr; - Tcl_IncrRefCount(objPtr); /* Local var reference. */ - } else { + if (!objPtr) { goto incorrectArgs; } + varPtr->flags = 0; + varPtr->value.objPtr = objPtr; + Tcl_IncrRefCount(objPtr); /* Local var reference. */ } /* @@ -1568,7 +1569,7 @@ PushProcCallFrame( int isLambda) /* 1 if this is a call by ApplyObjCmd: it * needs special rules for error msg */ { - Proc *procPtr = (Proc *) clientData; + Proc *procPtr = clientData; Namespace *nsPtr = procPtr->cmdPtr->nsPtr; CallFrame *framePtr, **framePtrPtr; int result; @@ -1664,7 +1665,7 @@ TclObjInterpProc( /* * Not used much in the core; external interface for iTcl */ - + return Tcl_NRCallObjProc(interp, TclNRInterpProc, clientData, objc, objv); } @@ -1726,7 +1727,7 @@ TclNRInterpProcCore( freePtr = iPtr->framePtr; Tcl_PopCallFrame(interp); /* Pop but do not free. */ TclStackFree(interp, freePtr->compiledLocals); - /* Free compiledLocals. */ + /* Free compiledLocals. */ TclStackFree(interp, freePtr); /* Free CallFrame. */ return TCL_ERROR; } @@ -1756,7 +1757,7 @@ TclNRInterpProcCore( int i; for (i = 0 ; i < 10 ; i++) { - a[i] = (l < iPtr->varFramePtr->objc ? + a[i] = (l < iPtr->varFramePtr->objc ? TclGetString(iPtr->varFramePtr->objv[l]) : NULL); l++; } @@ -1766,7 +1767,7 @@ TclNRInterpProcCore( if (TCL_DTRACE_PROC_INFO_ENABLED() && iPtr->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, iPtr->cmdFramePtr); char *a[6]; int i[2]; - + TclDTraceInfo(info, a, i); TCL_DTRACE_PROC_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); TclDecrRefCount(info); @@ -1805,7 +1806,7 @@ InterpProcNR2( CallFrame *freePtr; Tcl_Obj *procNameObj = data[0]; ProcErrorProc errorProc = data[1]; - + if (TCL_DTRACE_PROC_RETURN_ENABLED()) { int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; @@ -1853,7 +1854,7 @@ InterpProcNR2( * function handed to us as an argument. */ - (*errorProc)(interp, procNameObj); + errorProc(interp, procNameObj); default: /* @@ -2012,7 +2013,7 @@ TclProcCompileProc( clPtr = clPtr->nextPtr; } - if (lastPtr) { + if (lastPtr) { lastPtr->nextPtr = NULL; } else { procPtr->firstLocalPtr = NULL; @@ -2026,8 +2027,8 @@ TclProcCompileProc( procPtr->numCompiledLocals = procPtr->numArgs; } - (void) TclPushStackFrame(interp, &framePtr, - (Tcl_Namespace *) nsPtr, /* isProcCallFrame */ 0); + TclPushStackFrame(interp, &framePtr, (Tcl_Namespace *) nsPtr, + /* isProcCallFrame */ 0); /* * TIP #280: We get the invoking context from the cmdFrame which @@ -2041,9 +2042,8 @@ TclProcCompileProc( */ iPtr->invokeWord = 0; - iPtr->invokeCmdFramePtr = - (hePtr ? (CmdFrame *) Tcl_GetHashValue(hePtr) : NULL); - (void) tclByteCodeType.setFromAnyProc(interp, bodyPtr); + iPtr->invokeCmdFramePtr = (hePtr ? Tcl_GetHashValue(hePtr) : NULL); + tclByteCodeType.setFromAnyProc(interp, bodyPtr); iPtr->invokeCmdFramePtr = NULL; TclPopStackFrame(interp); iPtr->compiledProcPtr = saveProcPtr; @@ -2118,7 +2118,7 @@ void TclProcDeleteProc( ClientData clientData) /* Procedure to be deleted. */ { - Proc *procPtr = (Proc *) clientData; + Proc *procPtr = clientData; procPtr->refCount--; if (procPtr->refCount <= 0) { @@ -2164,7 +2164,7 @@ TclProcCleanupProc( resVarInfo = localPtr->resolveInfo; if (resVarInfo) { if (resVarInfo->deleteProc) { - (*resVarInfo->deleteProc)(resVarInfo); + resVarInfo->deleteProc(resVarInfo); } else { ckfree((char *) resVarInfo); } @@ -2194,7 +2194,7 @@ TclProcCleanupProc( return; } - cfPtr = (CmdFrame *) Tcl_GetHashValue(hePtr); + cfPtr = Tcl_GetHashValue(hePtr); if (cfPtr->type == TCL_LOCATION_SOURCE) { Tcl_DecrRefCount(cfPtr->data.eval.path); @@ -2490,11 +2490,9 @@ SetLambdaFromAny( */ if (iPtr->cmdFramePtr) { - CmdFrame *contextPtr; + CmdFrame *contextPtr = TclStackAlloc(interp, sizeof(CmdFrame)); - contextPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); *contextPtr = *iPtr->cmdFramePtr; - if (contextPtr->type == TCL_LOCATION_BC) { /* * Retrieve the source context from the bytecode. This call @@ -2655,7 +2653,7 @@ TclNRApplyObjCmd( * ENABLE! Leaving here as reminder to (a) TIP the suggestion, and (b) adapt * the code. (MS) */ - + #if JOE_EXTENSION else { /* @@ -2701,11 +2699,11 @@ TclNRApplyObjCmd( /* * TIP#280 (semi-)HACK! * - * Using cmd.clientData to tell [info frame] how to render the - * 'lambdaPtr'. The InfoFrameCmd will detect this case by testing cmd.hPtr - * for NULL. This condition holds here because of the 'memset' above, and - * nowhere else (in the core). Regular commands always have a valid - * 'hPtr', and lambda's never. + * Using cmd.clientData to tell [info frame] how to render the lambdaPtr. + * The InfoFrameCmd will detect this case by testing cmd.hPtr for NULL. + * This condition holds here because of the memset() above, and nowhere + * else (in the core). Regular commands always have a valid hPtr, and + * lambda's never. */ extraPtr->efi.length = 1; @@ -2724,7 +2722,7 @@ TclNRApplyObjCmd( } extraPtr->isRootEnsemble = isRootEnsemble; - result = PushProcCallFrame((ClientData) procPtr, interp, objc, objv, 1); + result = PushProcCallFrame(procPtr, interp, objc, objv, 1); if (result == TCL_OK) { TclNRAddCallback(interp, ApplyNR2, extraPtr, NULL, NULL, NULL); result = TclNRInterpProcCore(interp, objv[1], 2, &MakeLambdaError); @@ -2739,7 +2737,7 @@ ApplyNR2( int result) { ApplyExtraData *extraPtr = data[0]; - + if (extraPtr->isRootEnsemble) { ((Interp *) interp)->ensembleRewrite.sourceObjs = NULL; } @@ -2804,15 +2802,20 @@ Tcl_DisassembleObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { static const char *types[] = { - "lambda", "proc", "script", NULL + "lambda", "method", "objmethod", "proc", "script", NULL }; enum Types { - DISAS_LAMBDA, DISAS_PROC, DISAS_SCRIPT + DISAS_LAMBDA, DISAS_CLASS_METHOD, DISAS_OBJECT_METHOD, DISAS_PROC, + DISAS_SCRIPT }; int idx, result; + Tcl_Obj *codeObjPtr = NULL; + Proc *procPtr = NULL; + Tcl_HashEntry *hPtr; + Object *oPtr; - if (objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "type procName|lambdaTerm|script"); + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "type ..."); return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], types, "type", 0, &idx)!=TCL_OK){ @@ -2821,7 +2824,6 @@ Tcl_DisassembleObjCmd( switch ((enum Types) idx) { case DISAS_LAMBDA: { - Proc *procPtr = NULL; Command cmd; Tcl_Obj *nsObjPtr; Tcl_Namespace *nsPtr; @@ -2830,6 +2832,10 @@ Tcl_DisassembleObjCmd( * Compile (if uncompiled) and disassemble a lambda term. */ + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "lambdaTerm"); + return TCL_ERROR; + } if (objv[2]->typePtr == &lambdaType) { procPtr = objv[2]->internalRep.twoPtrValue.ptr1; } @@ -2854,55 +2860,140 @@ Tcl_DisassembleObjCmd( return result; } TclPopStackFrame(interp); - if (((ByteCode *) procPtr->bodyPtr->internalRep.otherValuePtr)->flags - & TCL_BYTECODE_PRECOMPILED) { - Tcl_AppendResult(interp, "may not disassemble prebuilt bytecode", - NULL); + codeObjPtr = procPtr->bodyPtr; + break; + } + case DISAS_PROC: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "procName"); return TCL_ERROR; + } else { + procPtr = TclFindProc((Interp *) interp, TclGetString(objv[2])); + if (procPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[2]), + "\" isn't a procedure", NULL); + return TCL_ERROR; + } + + /* + * Compile (if uncompiled) and disassemble a procedure. + */ + + result = PushProcCallFrame(procPtr, interp, 2, objv+1, 1); + if (result != TCL_OK) { + return result; + } + TclPopStackFrame(interp); + codeObjPtr = procPtr->bodyPtr; + break; + } + case DISAS_SCRIPT: + /* + * Compile and disassemble a script. + */ + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "script"); + return TCL_ERROR; + } + if (objv[2]->typePtr != &tclByteCodeType) { + if (TclSetByteCodeFromAny(interp, objv[2], NULL, NULL) != TCL_OK){ + return TCL_ERROR; + } } - Tcl_SetObjResult(interp, TclDisassembleByteCodeObj(procPtr->bodyPtr)); + codeObjPtr = objv[2]; break; - } - case DISAS_PROC: { - Proc *procPtr = TclFindProc((Interp *) interp, TclGetString(objv[2])); - if (procPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[2]), - "\" isn't a procedure", NULL); + case DISAS_CLASS_METHOD: + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "className methodName"); return TCL_ERROR; } /* - * Compile (if uncompiled) and disassemble a procedure. + * Look up the body of a class method. */ - result = PushProcCallFrame(procPtr, interp, 2, objv+1, 1); - if (result != TCL_OK) { - return result; + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[2]); + if (oPtr == NULL) { + return TCL_ERROR; } - TclPopStackFrame(interp); - if (((ByteCode *) procPtr->bodyPtr->internalRep.otherValuePtr)->flags - & TCL_BYTECODE_PRECOMPILED) { - Tcl_AppendResult(interp, "may not disassemble prebuilt bytecode", - NULL); + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[2]), + "\" is not a class", NULL); return TCL_ERROR; } - Tcl_SetObjResult(interp, TclDisassembleByteCodeObj(procPtr->bodyPtr)); - break; - } - case DISAS_SCRIPT: + hPtr = Tcl_FindHashEntry(&oPtr->classPtr->classMethods, + (char *) objv[3]); + goto methodBody; + case DISAS_OBJECT_METHOD: + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "objectName methodName"); + return TCL_ERROR; + } + /* - * Compile and disassemble a script. + * Look up the body of an instance method. */ - if (objv[2]->typePtr != &tclByteCodeType) { - if (TclSetByteCodeFromAny(interp, objv[2], NULL, NULL) != TCL_OK){ - return TCL_ERROR; + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[2]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->methodsPtr == NULL) { + goto unknownMethod; + } + hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[3]); + + /* + * Compile (if necessary) and disassemble a method body. + */ + + methodBody: + if (hPtr == NULL) { + unknownMethod: + Tcl_AppendResult(interp, "unknown method \"", + TclGetString(objv[3]), "\"", NULL); + return TCL_ERROR; + } + procPtr = TclOOGetProcFromMethod(Tcl_GetHashValue(hPtr)); + if (procPtr == NULL) { + Tcl_AppendResult(interp, + "body not available for this kind of method", NULL); + return TCL_ERROR; + } + if (procPtr->bodyPtr->typePtr != &tclByteCodeType) { + Command cmd; + + /* + * Yes, this is ugly, but we need to pass the namespace in to the + * compiler in two places. + */ + + cmd.nsPtr = (Namespace *) oPtr->namespacePtr; + procPtr->cmdPtr = &cmd; + result = TclProcCompileProc(interp, procPtr, procPtr->bodyPtr, + (Namespace *) oPtr->namespacePtr, "body of method", + TclGetString(objv[3])); + procPtr->cmdPtr = NULL; + if (result != TCL_OK) { + return result; } } - Tcl_SetObjResult(interp, TclDisassembleByteCodeObj(objv[2])); + codeObjPtr = procPtr->bodyPtr; break; } + + /* + * Do the actual disassembly. + */ + + if (((ByteCode *) codeObjPtr->internalRep.otherValuePtr)->flags + & TCL_BYTECODE_PRECOMPILED) { + Tcl_AppendResult(interp,"may not disassemble prebuilt bytecode",NULL); + return TCL_ERROR; + } + Tcl_SetObjResult(interp, TclDisassembleByteCodeObj(codeObjPtr)); return TCL_OK; } -- cgit v0.12 From d9990b25f1fc6db099c55ae7ce637230bc41d02c Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 21 Aug 2008 21:01:17 +0000 Subject: * generic/tclBasic.c: Fix the cmdFrame level count in * generic/tclCmdIL.c: coroutines. Fix small bug on coroutine * generic/tclInt.h: rewind. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 28 +++++++++++++++++++++------- generic/tclCmdIL.c | 12 +++++++++++- generic/tclInt.h | 3 ++- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5595080..6d71661 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-21 Miguel Sofer + + * generic/tclBasic.c: Fix the cmdFrame level count in + * generic/tclCmdIL.c: coroutines. Fix small bug on coroutine + * generic/tclInt.h: rewind. + 2008-08-21 Donal K. Fellows * generic/tclProc.c (Tcl_DisassembleObjCmd): Added ability to diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ac7fd5e..b50234b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.357 2008/08/20 23:48:42 patthoyts Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.358 2008/08/21 21:01:23 msofer Exp $ */ #include "tclInt.h" @@ -8144,10 +8144,12 @@ static void DeleteCoroutine( ClientData clientData) { - register CoroutineData *corPtr = clientData; - + CoroutineData *corPtr = (CoroutineData *) clientData; + Tcl_Interp *interp = corPtr->eePtr->interp; + TEOV_callback *rootPtr = TOP_CB(interp); + if (COR_IS_SUSPENDED(corPtr)) { - RewindCoroutine(corPtr, TCL_OK); + (void) TclNRRunCallbacks(interp, RewindCoroutine(corPtr, TCL_OK), rootPtr, 0); } } @@ -8171,9 +8173,7 @@ PlugCoroutineChains( corPtr->base.framePtr->callerVarPtr = corPtr->caller.varFramePtr; corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; - corPtr->base.cmdFramePtr->level = (iPtr->cmdFramePtr == NULL? - 1 : iPtr->cmdFramePtr->level + 1); - corPtr->base.cmdFramePtr->numLevels = iPtr->numLevels; + corPtr->levelOffset = iPtr->cmdFramePtr->level; } static int @@ -8189,6 +8189,13 @@ NRCoroutineFirstCallback( while (tmpPtr->nextPtr != corPtr->caller.cmdFramePtr) { tmpPtr = tmpPtr->nextPtr; } + + /* + * Set the base cmdFrame level to zero, it will be computed using the + * offset. + */ + + tmpPtr->level = 0; corPtr->base.cmdFramePtr = tmpPtr; } @@ -8384,6 +8391,13 @@ TclNRCoroutineObjCmd( corPtr->eePtr->corPtr = corPtr; corPtr->stackLevel = NULL; + /* + * On first run just set a 0 level-offset, the natural numbering is + * correct. The offset will be fixed for later runs. + */ + + corPtr->levelOffset = 0; + Tcl_DStringInit(&ds); if (nsPtr != iPtr->globalNsPtr) { Tcl_DStringAppend(&ds, nsPtr->fullName, -1); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index fb8d54e..7e4973b 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.148 2008/08/14 02:09:46 das Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.149 2008/08/21 21:01:25 msofer Exp $ */ #include "tclInt.h" @@ -1045,7 +1045,17 @@ InfoFrameCmd( Interp *iPtr = (Interp *) interp; int level; CmdFrame *framePtr; + int absoluteLevel = iPtr->cmdFramePtr->level; + if (iPtr->execEnvPtr->corPtr) { + /* + * We are running within a coroutine, the levels are relative to the + * coroutine's initial frame: do the correction here. + */ + + absoluteLevel += iPtr->execEnvPtr->corPtr->levelOffset; + } + if (objc == 1) { /* * Just "info frame". diff --git a/generic/tclInt.h b/generic/tclInt.h index 811278b..1b2014b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.392 2008/08/20 15:41:24 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.393 2008/08/21 21:01:25 msofer Exp $ */ #ifndef _TCLINT @@ -1347,6 +1347,7 @@ typedef struct CoroutineData { CorContext caller; CorContext running; CorContext base; + int levelOffset; int *stackLevel; } CoroutineData; -- cgit v0.12 From 3665ead9e176eb4b5058f87e048c67ea3efb3dd3 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 21 Aug 2008 21:24:53 +0000 Subject: parts of last commit were not saved :} --- generic/tclCmdIL.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 7e4973b..d6d0b09 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.149 2008/08/21 21:01:25 msofer Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.150 2008/08/21 21:24:53 msofer Exp $ */ #include "tclInt.h" @@ -1045,7 +1045,9 @@ InfoFrameCmd( Interp *iPtr = (Interp *) interp; int level; CmdFrame *framePtr; - int absoluteLevel = iPtr->cmdFramePtr->level; + int absoluteLevel = ((iPtr->cmdFramePtr == NULL) + ? 0 + : iPtr->cmdFramePtr->level); if (iPtr->execEnvPtr->corPtr) { /* @@ -1062,7 +1064,7 @@ InfoFrameCmd( */ int levels = - (iPtr->cmdFramePtr == NULL ? 0 : iPtr->cmdFramePtr->level); + (iPtr->cmdFramePtr == NULL ? 0 : absoluteLevel); Tcl_SetObjResult(interp, Tcl_NewIntObj (levels)); return TCL_OK; @@ -1100,7 +1102,16 @@ InfoFrameCmd( for (framePtr = iPtr->cmdFramePtr; framePtr != NULL; framePtr = framePtr->nextPtr) { - if (framePtr->level == level) { + absoluteLevel = framePtr->level; + if (iPtr->execEnvPtr->corPtr) { + /* + * We are running within a coroutine, the levels are relative to + * the coroutine's initial frame: do the correction here. + */ + + absoluteLevel += iPtr->execEnvPtr->corPtr->levelOffset; + } + if (absoluteLevel == level) { break; } } -- cgit v0.12 From 2b9c55d714bec1b7497dba6f79d2c54f13e9c07a Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 21 Aug 2008 21:35:35 +0000 Subject: * generic/tcl.h: Reduced the use of CONST86 and eliminated * generic/tcl.decls: the use of CONST86_RETURN to support source code compatibility with Tcl 8.5 on those public routines passing (Tcl_Filesystem *), (Tcl_Timer *), and (Tcl_Objtype *) values which have been const-ified. What remains is the minimum configurability needed to support code written for pre-8.6 headers via the new -DUSE_COMPAT85_CONST compiler directive. *** POTENTIAL INCOMPATIBILITY *** * generic/tclDecls.h: make genstubs --- ChangeLog | 13 ++++++++++++ generic/tcl.decls | 30 +++++++++++++-------------- generic/tcl.h | 13 +++++++----- generic/tclDecls.h | 59 +++++++++++++++++++++++++++--------------------------- 4 files changed, 65 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d71661..da29d56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-08-21 Don Porter + + * generic/tcl.h: Reduced the use of CONST86 and eliminated + * generic/tcl.decls: the use of CONST86_RETURN to support source + code compatibility with Tcl 8.5 on those public routines passing + (Tcl_Filesystem *), (Tcl_Timer *), and (Tcl_Objtype *) values which + have been const-ified. What remains is the minimum configurability + needed to support code written for pre-8.6 headers via the new + -DUSE_COMPAT85_CONST compiler directive. + *** POTENTIAL INCOMPATIBILITY *** + + * generic/tclDecls.h: make genstubs + 2008-08-21 Miguel Sofer * generic/tclBasic.c: Fix the cmdFrame level count in diff --git a/generic/tcl.decls b/generic/tcl.decls index c67462e..1351e02 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.142 2008/07/29 05:30:25 msofer Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.143 2008/08/21 21:35:37 dgp Exp $ library tcl @@ -72,13 +72,13 @@ declare 10 unix { void Tcl_DeleteFileHandler(int fd) } declare 11 generic { - void Tcl_SetTimer(CONST86 Tcl_Time *timePtr) + void Tcl_SetTimer(CONST Tcl_Time *timePtr) } declare 12 generic { void Tcl_Sleep(int ms) } declare 13 generic { - int Tcl_WaitForEvent(CONST86 Tcl_Time *timePtr) + int Tcl_WaitForEvent(CONST Tcl_Time *timePtr) } declare 14 generic { int Tcl_AppendAllObjTypes(Tcl_Interp *interp, Tcl_Obj *objPtr) @@ -94,7 +94,7 @@ declare 17 generic { } declare 18 generic { int Tcl_ConvertToType(Tcl_Interp *interp, Tcl_Obj *objPtr, - CONST86 Tcl_ObjType *typePtr) + CONST Tcl_ObjType *typePtr) } declare 19 generic { void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, CONST char *file, int line) @@ -167,7 +167,7 @@ declare 39 generic { int Tcl_GetLongFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr) } declare 40 generic { - CONST86_RETURN Tcl_ObjType * Tcl_GetObjType(CONST char *typeName) + CONST86 Tcl_ObjType * Tcl_GetObjType(CONST char *typeName) } declare 41 generic { char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr) @@ -752,7 +752,7 @@ declare 210 generic { void Tcl_RegisterChannel(Tcl_Interp *interp, Tcl_Channel chan) } declare 211 generic { - void Tcl_RegisterObjType(CONST86 Tcl_ObjType *typePtr) + void Tcl_RegisterObjType(CONST Tcl_ObjType *typePtr) } declare 212 generic { Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, CONST char *pattern) @@ -813,7 +813,7 @@ declare 228 generic { void Tcl_SetErrorCode(Tcl_Interp *interp, ...) } declare 229 generic { - void Tcl_SetMaxBlockTime(CONST86 Tcl_Time *timePtr) + void Tcl_SetMaxBlockTime(CONST Tcl_Time *timePtr) } declare 230 generic { void Tcl_SetPanicProc(Tcl_PanicProc *panicProc) @@ -1119,7 +1119,7 @@ declare 310 generic { } declare 311 generic { void Tcl_ConditionWait(Tcl_Condition *condPtr, Tcl_Mutex *mutexPtr, - CONST86 Tcl_Time *timePtr) + CONST Tcl_Time *timePtr) } declare 312 generic { int Tcl_NumUtfChars(CONST char *src, int length) @@ -1651,7 +1651,7 @@ declare 464 generic { } declare 465 generic { ClientData Tcl_FSGetInternalRep(Tcl_Obj* pathPtr, - CONST86 Tcl_Filesystem *fsPtr) + CONST Tcl_Filesystem *fsPtr) } declare 466 generic { Tcl_Obj* Tcl_FSGetTranslatedPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) @@ -1660,7 +1660,7 @@ declare 467 generic { int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName) } declare 468 generic { - Tcl_Obj* Tcl_FSNewNativePath(CONST86 Tcl_Filesystem* fromFilesystem, + Tcl_Obj* Tcl_FSNewNativePath(CONST Tcl_Filesystem* fromFilesystem, ClientData clientData) } declare 469 generic { @@ -1676,20 +1676,20 @@ declare 472 generic { Tcl_Obj* Tcl_FSListVolumes(void) } declare 473 generic { - int Tcl_FSRegister(ClientData clientData, CONST86 Tcl_Filesystem *fsPtr) + int Tcl_FSRegister(ClientData clientData, CONST Tcl_Filesystem *fsPtr) } declare 474 generic { - int Tcl_FSUnregister(CONST86 Tcl_Filesystem *fsPtr) + int Tcl_FSUnregister(CONST Tcl_Filesystem *fsPtr) } declare 475 generic { - ClientData Tcl_FSData(CONST86 Tcl_Filesystem *fsPtr) + ClientData Tcl_FSData(CONST Tcl_Filesystem *fsPtr) } declare 476 generic { CONST char* Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) } declare 477 generic { - CONST86_RETURN Tcl_Filesystem* Tcl_FSGetFileSystemForPath(Tcl_Obj* pathPtr) + CONST86 Tcl_Filesystem* Tcl_FSGetFileSystemForPath(Tcl_Obj* pathPtr) } declare 478 generic { Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr) @@ -1699,7 +1699,7 @@ declare 479 generic { int Tcl_OutputBuffered(Tcl_Channel chan) } declare 480 generic { - void Tcl_FSMountsChanged(CONST86 Tcl_Filesystem *fsPtr) + void Tcl_FSMountsChanged(CONST Tcl_Filesystem *fsPtr) } # New function due to TIP#56 declare 481 generic { diff --git a/generic/tcl.h b/generic/tcl.h index 1feda6f..ba0d938 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.264 2008/08/12 15:10:33 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.265 2008/08/21 21:35:37 dgp Exp $ */ #ifndef _TCL @@ -261,8 +261,11 @@ extern "C" { # endif #endif -#define CONST86 CONST84 -#define CONST86_RETURN CONST84_RETURN +#ifdef USE_COMPAT85_CONST +# define CONST86 +#else +# define CONST86 CONST +#endif /* * Make sure EXTERN isn't defined elsewhere @@ -722,7 +725,7 @@ typedef void (Tcl_MainLoopProc) _ANSI_ARGS_((void)); */ typedef struct Tcl_ObjType { - CONST86 char *name; /* Name of the type, e.g. "int". */ + CONST char *name; /* Name of the type, e.g. "int". */ Tcl_FreeInternalRepProc *freeIntRepProc; /* Called to free any storage for the type's * internal rep. NULL if the internal rep does @@ -760,7 +763,7 @@ typedef struct Tcl_Obj { * array as a readonly value. */ int length; /* The number of bytes at *bytes, not * including the terminating null. */ - CONST86 Tcl_ObjType *typePtr; /* Denotes the object's type. Always + CONST Tcl_ObjType *typePtr; /* Denotes the object's type. Always * corresponds to the type of the object's * internal rep. NULL indicates the object has * no internal rep (has no type). */ diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 1417bf9..d80093a 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.144 2008/07/29 05:30:25 msofer Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.145 2008/08/21 21:35:38 dgp Exp $ */ #ifndef _TCLDECLS @@ -122,7 +122,7 @@ EXTERN void Tcl_DeleteFileHandler (int fd); #ifndef Tcl_SetTimer_TCL_DECLARED #define Tcl_SetTimer_TCL_DECLARED /* 11 */ -EXTERN void Tcl_SetTimer (CONST86 Tcl_Time * timePtr); +EXTERN void Tcl_SetTimer (CONST Tcl_Time * timePtr); #endif #ifndef Tcl_Sleep_TCL_DECLARED #define Tcl_Sleep_TCL_DECLARED @@ -132,7 +132,7 @@ EXTERN void Tcl_Sleep (int ms); #ifndef Tcl_WaitForEvent_TCL_DECLARED #define Tcl_WaitForEvent_TCL_DECLARED /* 13 */ -EXTERN int Tcl_WaitForEvent (CONST86 Tcl_Time * timePtr); +EXTERN int Tcl_WaitForEvent (CONST Tcl_Time * timePtr); #endif #ifndef Tcl_AppendAllObjTypes_TCL_DECLARED #define Tcl_AppendAllObjTypes_TCL_DECLARED @@ -161,7 +161,7 @@ EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); /* 18 */ EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, Tcl_Obj * objPtr, - CONST86 Tcl_ObjType * typePtr); + CONST Tcl_ObjType * typePtr); #endif #ifndef Tcl_DbDecrRefCount_TCL_DECLARED #define Tcl_DbDecrRefCount_TCL_DECLARED @@ -290,7 +290,7 @@ EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, #ifndef Tcl_GetObjType_TCL_DECLARED #define Tcl_GetObjType_TCL_DECLARED /* 40 */ -EXTERN CONST86_RETURN Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); +EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); #endif #ifndef Tcl_GetStringFromObj_TCL_DECLARED #define Tcl_GetStringFromObj_TCL_DECLARED @@ -1337,7 +1337,7 @@ EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, #ifndef Tcl_RegisterObjType_TCL_DECLARED #define Tcl_RegisterObjType_TCL_DECLARED /* 211 */ -EXTERN void Tcl_RegisterObjType (CONST86 Tcl_ObjType * typePtr); +EXTERN void Tcl_RegisterObjType (CONST Tcl_ObjType * typePtr); #endif #ifndef Tcl_RegExpCompile_TCL_DECLARED #define Tcl_RegExpCompile_TCL_DECLARED @@ -1441,7 +1441,7 @@ EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); #ifndef Tcl_SetMaxBlockTime_TCL_DECLARED #define Tcl_SetMaxBlockTime_TCL_DECLARED /* 229 */ -EXTERN void Tcl_SetMaxBlockTime (CONST86 Tcl_Time * timePtr); +EXTERN void Tcl_SetMaxBlockTime (CONST Tcl_Time * timePtr); #endif #ifndef Tcl_SetPanicProc_TCL_DECLARED #define Tcl_SetPanicProc_TCL_DECLARED @@ -1933,7 +1933,7 @@ EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); /* 311 */ EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, - CONST86 Tcl_Time * timePtr); + CONST Tcl_Time * timePtr); #endif #ifndef Tcl_NumUtfChars_TCL_DECLARED #define Tcl_NumUtfChars_TCL_DECLARED @@ -2827,7 +2827,7 @@ EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, #define Tcl_FSGetInternalRep_TCL_DECLARED /* 465 */ EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, - CONST86 Tcl_Filesystem * fsPtr); + CONST Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED #define Tcl_FSGetTranslatedPath_TCL_DECLARED @@ -2845,7 +2845,7 @@ EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, #define Tcl_FSNewNativePath_TCL_DECLARED /* 468 */ EXTERN Tcl_Obj* Tcl_FSNewNativePath ( - CONST86 Tcl_Filesystem* fromFilesystem, + CONST Tcl_Filesystem* fromFilesystem, ClientData clientData); #endif #ifndef Tcl_FSGetNativePath_TCL_DECLARED @@ -2872,17 +2872,17 @@ EXTERN Tcl_Obj* Tcl_FSListVolumes (void); #define Tcl_FSRegister_TCL_DECLARED /* 473 */ EXTERN int Tcl_FSRegister (ClientData clientData, - CONST86 Tcl_Filesystem * fsPtr); + CONST Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSUnregister_TCL_DECLARED #define Tcl_FSUnregister_TCL_DECLARED /* 474 */ -EXTERN int Tcl_FSUnregister (CONST86 Tcl_Filesystem * fsPtr); +EXTERN int Tcl_FSUnregister (CONST Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSData_TCL_DECLARED #define Tcl_FSData_TCL_DECLARED /* 475 */ -EXTERN ClientData Tcl_FSData (CONST86 Tcl_Filesystem * fsPtr); +EXTERN ClientData Tcl_FSData (CONST Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED #define Tcl_FSGetTranslatedStringPath_TCL_DECLARED @@ -2893,8 +2893,7 @@ EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, #ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED #define Tcl_FSGetFileSystemForPath_TCL_DECLARED /* 477 */ -EXTERN CONST86_RETURN Tcl_Filesystem* Tcl_FSGetFileSystemForPath ( - Tcl_Obj* pathPtr); +EXTERN CONST86 Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); #endif #ifndef Tcl_FSGetPathType_TCL_DECLARED #define Tcl_FSGetPathType_TCL_DECLARED @@ -2909,7 +2908,7 @@ EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); #ifndef Tcl_FSMountsChanged_TCL_DECLARED #define Tcl_FSMountsChanged_TCL_DECLARED /* 480 */ -EXTERN void Tcl_FSMountsChanged (CONST86 Tcl_Filesystem * fsPtr); +EXTERN void Tcl_FSMountsChanged (CONST Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_EvalTokensStandard_TCL_DECLARED #define Tcl_EvalTokensStandard_TCL_DECLARED @@ -3605,14 +3604,14 @@ typedef struct TclStubs { #ifdef MAC_OSX_TCL /* MACOSX */ void (*tcl_DeleteFileHandler) (int fd); /* 10 */ #endif /* MACOSX */ - void (*tcl_SetTimer) (CONST86 Tcl_Time * timePtr); /* 11 */ + void (*tcl_SetTimer) (CONST Tcl_Time * timePtr); /* 11 */ void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (CONST86 Tcl_Time * timePtr); /* 13 */ + int (*tcl_WaitForEvent) (CONST Tcl_Time * timePtr); /* 13 */ int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST86 Tcl_ObjType * typePtr); /* 18 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST Tcl_ObjType * typePtr); /* 18 */ void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ @@ -3634,7 +3633,7 @@ typedef struct TclStubs { int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - CONST86_RETURN Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ + CONST86 Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ @@ -3837,7 +3836,7 @@ typedef struct TclStubs { int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (CONST86 Tcl_ObjType * typePtr); /* 211 */ + void (*tcl_RegisterObjType) (CONST Tcl_ObjType * typePtr); /* 211 */ Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ @@ -3855,7 +3854,7 @@ typedef struct TclStubs { int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ void (*tcl_SetErrno) (int err); /* 227 */ void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (CONST86 Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetMaxBlockTime) (CONST Tcl_Time * timePtr); /* 229 */ void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ @@ -3937,7 +3936,7 @@ typedef struct TclStubs { void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, CONST86 Tcl_Time * timePtr); /* 311 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, CONST Tcl_Time * timePtr); /* 311 */ int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ @@ -4091,22 +4090,22 @@ typedef struct TclStubs { int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, CONST86 Tcl_Filesystem * fsPtr); /* 465 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, CONST Tcl_Filesystem * fsPtr); /* 465 */ Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj* (*tcl_FSNewNativePath) (CONST86 Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ + Tcl_Obj* (*tcl_FSNewNativePath) (CONST Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, CONST86 Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (CONST86 Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (CONST86 Tcl_Filesystem * fsPtr); /* 475 */ + int (*tcl_FSRegister) (ClientData clientData, CONST Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (CONST Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (CONST Tcl_Filesystem * fsPtr); /* 475 */ CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ - CONST86_RETURN Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ + CONST86 Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (CONST86 Tcl_Filesystem * fsPtr); /* 480 */ + void (*tcl_FSMountsChanged) (CONST Tcl_Filesystem * fsPtr); /* 480 */ int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ -- cgit v0.12 From b960e085fa96bdac779fd6c41f343d7bf4d6e4e6 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 21 Aug 2008 23:19:49 +0000 Subject: * tests/regexp.test, tests/regexpComp.test: correct re2glob ***= * generic/tclUtil.c (TclReToGlob): translation from exact to anywhere-in-string match. [Bug 2065115] --- ChangeLog | 6 ++++++ generic/tclUtil.c | 7 +++---- tests/regexp.test | 27 ++++++++++++++++++++++++++- tests/regexpComp.test | 39 ++++++++++++++++++++++++++++++++++++++- 4 files changed, 73 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index da29d56..e753ae9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-21 Jeff Hobbs + + * tests/regexp.test, tests/regexpComp.test: correct re2glob ***= + * generic/tclUtil.c (TclReToGlob): translation from exact + to anywhere-in-string match. [Bug 2065115] + 2008-08-21 Don Porter * generic/tcl.h: Reduced the use of CONST86 and eliminated diff --git a/generic/tclUtil.c b/generic/tclUtil.c index a1a0861..5f20af1 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.99 2008/08/17 14:15:26 msofer Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.100 2008/08/21 23:19:49 hobbs Exp $ */ #include "tclInt.h" @@ -3279,10 +3279,9 @@ TclReToGlob( */ if ((reStrLen >= 4) && (memcmp("***=", reStr, 4) == 0)) { - if (exactPtr) { - *exactPtr = 1; - } + Tcl_DStringAppend(dsPtr, "*", 1); Tcl_DStringAppend(dsPtr, reStr + 4, reStrLen - 4); + Tcl_DStringAppend(dsPtr, "*", 1); return TCL_OK; } diff --git a/tests/regexp.test b/tests/regexp.test index 5b0f886..c4b4cab 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.32 2008/07/21 22:22:28 nijtmans Exp $ +# RCS: @(#) $Id: regexp.test,v 1.33 2008/08/21 23:19:51 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -44,6 +44,31 @@ test regexp-1.7 {regexp utf compliance} { list [string compare $foo $bar] [regexp 4 $bar] } {0 0} +test regexp-1.8 {regexp ***= metasyntax} { + regexp -- "***=o" "aeiou" +} 1 +test regexp-1.9 {regexp ***= metasyntax} { + set string "aeiou" + regexp -- "***=o" $string +} 1 +test regexp-1.10 {regexp ***= metasyntax} { + set string "aeiou" + set re "***=o" + regexp -- $re $string +} 1 +test regexp-1.11 {regexp ***= metasyntax} { + regexp -- "***=y" "aeiou" +} 0 +test regexp-1.12 {regexp ***= metasyntax} { + set string "aeiou" + regexp -- "***=y" $string +} 0 +test regexp-1.13 {regexp ***= metasyntax} { + set string "aeiou" + set re "***=y" + regexp -- $re $string +} 0 + test regexp-2.1 {getting substrings back from regexp} { set foo {} list [regexp ab*c abbbbc foo] $foo diff --git a/tests/regexpComp.test b/tests/regexpComp.test index 7feaa5f..eeba434 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -43,7 +43,7 @@ test regexpComp-1.2 {basic regexp operation} { } } 1 test regexpComp-1.3 {basic regexp operation} { - evalInProc { + evalInProc { regexp ab*c ab } } 0 @@ -69,6 +69,43 @@ test regexpComp-1.7 {regexp utf compliance} { } } {0 0} +test regexp-1.8 {regexp ***= metasyntax} { + evalInProc { + regexp -- "***=o" "aeiou" + } +} 1 +test regexp-1.9 {regexp ***= metasyntax} { + evalInProc { + set string "aeiou" + regexp -- "***=o" $string + } +} 1 +test regexp-1.10 {regexp ***= metasyntax} { + evalInProc { + set string "aeiou" + set re "***=o" + regexp -- $re $string + } +} 1 +test regexp-1.11 {regexp ***= metasyntax} { + evalInProc { + regexp -- "***=y" "aeiou" + } +} 0 +test regexp-1.12 {regexp ***= metasyntax} { + evalInProc { + set string "aeiou" + regexp -- "***=y" $string + } +} 0 +test regexp-1.13 {regexp ***= metasyntax} { + evalInProc { + set string "aeiou" + set re "***=y" + regexp -- $re $string + } +} 0 + test regexpComp-2.1 {getting substrings back from regexp} { evalInProc { set foo {} -- cgit v0.12 From edfda9078ba74cdc4c6038b014e610f7b6efcc96 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 21 Aug 2008 23:42:13 +0000 Subject: really fix translation to escape glob-sensitive chars --- generic/tclUtil.c | 37 ++++++++++++++++++++++++------------- tests/regexpComp.test | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 5f20af1..605951c 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.100 2008/08/21 23:19:49 hobbs Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.101 2008/08/21 23:42:13 hobbs Exp $ */ #include "tclInt.h" @@ -3275,23 +3275,34 @@ TclReToGlob( Tcl_DStringInit(dsPtr); /* - * "***=xxx" == "*xxx*" + * Write to the ds directly without the function overhead. + * An equivalent glob pattern can be no more than reStrLen+2 in size. */ - if ((reStrLen >= 4) && (memcmp("***=", reStr, 4) == 0)) { - Tcl_DStringAppend(dsPtr, "*", 1); - Tcl_DStringAppend(dsPtr, reStr + 4, reStrLen - 4); - Tcl_DStringAppend(dsPtr, "*", 1); - return TCL_OK; - } + Tcl_DStringSetLength(dsPtr, reStrLen + 2); + dsStr = dsStrStart = Tcl_DStringValue(dsPtr); /* - * Write to the ds directly without the function overhead. - * An equivalent glob pattern can be no more than reStrLen+2 in size. + * "***=xxx" == "*xxx*", watch for glob-sensitive chars. */ - Tcl_DStringSetLength(dsPtr, reStrLen + 2); - dsStrStart = Tcl_DStringValue(dsPtr); + if ((reStrLen >= 4) && (memcmp("***=", reStr, 4) == 0)) { + *dsStr++ = '*'; + for (p = reStr + 4; p < strEnd; p++) { + switch (*p) { + case '\\': case '*': case '[': case ']': case '?': + /* Only add \ where necessary for glob */ + *dsStr++ = '\\'; + /* fall through */ + default: + *dsStr++ = *p; + break; + } + } + *dsStr++ = '*'; + Tcl_DStringSetLength(dsPtr, dsStr - dsStrStart); + return TCL_OK; + } /* * Check for anchored REs (ie ^foo$), so we can use string equal if @@ -3306,7 +3317,7 @@ TclReToGlob( p = reStr; anchorRight = 0; lastIsStar = 0; - dsStr = dsStrStart; + if (*p == '^') { anchorLeft = 1; p++; diff --git a/tests/regexpComp.test b/tests/regexpComp.test index eeba434..aaae977 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -105,6 +105,27 @@ test regexp-1.13 {regexp ***= metasyntax} { regexp -- $re $string } } 0 +test regexp-1.14 {regexp ***= metasyntax} { + evalInProc { + set string "aeiou" + set re "***=e*o" + regexp -- $re $string + } +} 0 +test regexp-1.15 {regexp ***= metasyntax} { + evalInProc { + set string "ae*ou" + set re "***=e*o" + regexp -- $re $string + } +} 1 +test regexp-1.16 {regexp ***= metasyntax} { + evalInProc { + set string {ae*[o]?ua} + set re {***=e*[o]?u} + regexp -- $re $string + } +} 1 test regexpComp-2.1 {getting substrings back from regexp} { evalInProc { -- cgit v0.12 From c81af542ef2037176d7f71f883aa3e93dfc4196b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 21 Aug 2008 23:57:41 +0000 Subject: * generic/tclBasic.c: Previous fix, now done right. * generic/tclCmdIL.c: * generic/tclInt.h: * tests/unsupported.test: --- ChangeLog | 7 +++++ generic/tclBasic.c | 11 +------- generic/tclCmdIL.c | 70 +++++++++++++++++++------------------------------- generic/tclInt.h | 3 +-- tests/unsupported.test | 30 +++++++++++++++++++++- 5 files changed, 65 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index e753ae9..369f59f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-21 Miguel Sofer + + * generic/tclBasic.c: Previous fix, now done right. + * generic/tclCmdIL.c: + * generic/tclInt.h: + * tests/unsupported.test: + 2008-08-21 Jeff Hobbs * tests/regexp.test, tests/regexpComp.test: correct re2glob ***= diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b50234b..53be9de 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.358 2008/08/21 21:01:23 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.359 2008/08/21 23:57:42 msofer Exp $ */ #include "tclInt.h" @@ -8173,7 +8173,6 @@ PlugCoroutineChains( corPtr->base.framePtr->callerVarPtr = corPtr->caller.varFramePtr; corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; - corPtr->levelOffset = iPtr->cmdFramePtr->level; } static int @@ -8190,12 +8189,6 @@ NRCoroutineFirstCallback( tmpPtr = tmpPtr->nextPtr; } - /* - * Set the base cmdFrame level to zero, it will be computed using the - * offset. - */ - - tmpPtr->level = 0; corPtr->base.cmdFramePtr = tmpPtr; } @@ -8396,8 +8389,6 @@ TclNRCoroutineObjCmd( * correct. The offset will be fixed for later runs. */ - corPtr->levelOffset = 0; - Tcl_DStringInit(&ds); if (nsPtr != iPtr->globalNsPtr) { Tcl_DStringAppend(&ds, nsPtr->fullName, -1); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index d6d0b09..a96f555 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.150 2008/08/21 21:24:53 msofer Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.151 2008/08/21 23:57:43 msofer Exp $ */ #include "tclInt.h" @@ -1043,30 +1043,29 @@ InfoFrameCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; - int level; + int level, topLevel; CmdFrame *framePtr; - int absoluteLevel = ((iPtr->cmdFramePtr == NULL) + + topLevel = ((iPtr->cmdFramePtr == NULL) ? 0 : iPtr->cmdFramePtr->level); + if (iPtr->execEnvPtr->corPtr) { /* - * We are running within a coroutine, the levels are relative to the - * coroutine's initial frame: do the correction here. + * A coroutine: must fix the level computations */ - absoluteLevel += iPtr->execEnvPtr->corPtr->levelOffset; + topLevel += iPtr->execEnvPtr->corPtr->caller.cmdFramePtr->level + 1 - + iPtr->execEnvPtr->corPtr->base.cmdFramePtr->level; } - + if (objc == 1) { /* * Just "info frame". */ - int levels = - (iPtr->cmdFramePtr == NULL ? 0 : absoluteLevel); - - Tcl_SetObjResult(interp, Tcl_NewIntObj (levels)); + Tcl_SetObjResult(interp, Tcl_NewIntObj (topLevel)); return TCL_OK; } else if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?number?"); @@ -1080,44 +1079,29 @@ InfoFrameCmd( if (TclGetIntFromObj(interp, objv[1], &level) != TCL_OK) { return TCL_ERROR; } - if (level <= 0) { - /* - * Negative levels are adressing relative to the current frame's - * depth. - */ - - if (iPtr->cmdFramePtr == NULL) { - levelError: - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad level \"", - TclGetString(objv[1]), "\"", NULL); - return TCL_ERROR; - } - /* - * Convert to absolute. - */ + if ((level > topLevel) || (level <= - topLevel)) { + levelError: + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad level \"", + TclGetString(objv[1]), "\"", NULL); + return TCL_ERROR; + } + + /* + * Let us convert to relative so that we know how many levels to go back + */ - level += iPtr->cmdFramePtr->level; + if (level > 0) { + level -= topLevel; } - for (framePtr = iPtr->cmdFramePtr; framePtr != NULL; - framePtr = framePtr->nextPtr) { - absoluteLevel = framePtr->level; - if (iPtr->execEnvPtr->corPtr) { - /* - * We are running within a coroutine, the levels are relative to - * the coroutine's initial frame: do the correction here. - */ - - absoluteLevel += iPtr->execEnvPtr->corPtr->levelOffset; - } - if (absoluteLevel == level) { - break; + framePtr = iPtr->cmdFramePtr; + while (++level <= 0) { + framePtr = framePtr->nextPtr; + if (!framePtr) { + goto levelError; } } - if (framePtr == NULL) { - goto levelError; - } Tcl_SetObjResult(interp, TclInfoFrame(interp, framePtr)); return TCL_OK; diff --git a/generic/tclInt.h b/generic/tclInt.h index 1b2014b..7084cd1 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.393 2008/08/21 21:01:25 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.394 2008/08/21 23:57:43 msofer Exp $ */ #ifndef _TCLINT @@ -1347,7 +1347,6 @@ typedef struct CoroutineData { CorContext caller; CorContext running; CorContext base; - int levelOffset; int *stackLevel; } CoroutineData; diff --git a/tests/unsupported.test b/tests/unsupported.test index 48cd130..87db81d 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.4 2008/08/17 19:37:13 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.5 2008/08/21 23:57:43 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -717,6 +717,34 @@ test unsupported-C.2.6 {deletion of running coroutine} -constraints {coroutine} list [foo] [catch foo msg] $msg } -result {1 1 {invalid command name "foo"}} +test unsupported-C.3.1 {info level computation} -constraints {coroutine} \ +-setup { + proc a {} {while 1 {yield [info level]}} + proc b {} foo +} -body { + # note that coroutines execute in uplevel #0 + set l0 [coroutine foo a] + set l1 [foo] + set l2 [b] + list $l0 $l1 $l2 +} -cleanup { + rename a {} + rename b {} +} -result {1 1 1} + +test unsupported-C.3.2 {info frame computation} -constraints {coroutine} \ +-setup { + proc a {} {while 1 {yield [info frame]}} + proc b {} foo +} -body { + set l0 [coroutine foo a] + set l1 [foo] + set l2 [b] + expr {$l2 - $l1} +} -cleanup { + rename a {} + rename b {} +} -result 1 # cleanup -- cgit v0.12 From 6f75579e3a357853eaa316f593edcb47eddc0c36 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 22 Aug 2008 17:26:46 +0000 Subject: * generic/tclUtil.c (TclReToGlob): Added missing set of the *exactPtr value to really fix [Bug 2065115]. * tests/regexpComp.test: Correct duplicate test names. --- ChangeLog | 6 ++++++ generic/tclUtil.c | 5 ++++- tests/regexpComp.test | 18 +++++++++--------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 369f59f..cab7cd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-22 Don Porter + + * generic/tclUtil.c (TclReToGlob): Added missing set of the + *exactPtr value to really fix [Bug 2065115]. + * tests/regexpComp.test: Correct duplicate test names. + 2008-08-21 Miguel Sofer * generic/tclBasic.c: Previous fix, now done right. diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 605951c..6f74ad8 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.101 2008/08/21 23:42:13 hobbs Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.102 2008/08/22 17:26:46 dgp Exp $ */ #include "tclInt.h" @@ -3301,6 +3301,9 @@ TclReToGlob( } *dsStr++ = '*'; Tcl_DStringSetLength(dsPtr, dsStr - dsStrStart); + if (exactPtr) { + *exactPtr = 0; + } return TCL_OK; } diff --git a/tests/regexpComp.test b/tests/regexpComp.test index aaae977..4f05bc3 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -69,57 +69,57 @@ test regexpComp-1.7 {regexp utf compliance} { } } {0 0} -test regexp-1.8 {regexp ***= metasyntax} { +test regexpComp-1.8 {regexp ***= metasyntax} { evalInProc { regexp -- "***=o" "aeiou" } } 1 -test regexp-1.9 {regexp ***= metasyntax} { +test regexpComp-1.9 {regexp ***= metasyntax} { evalInProc { set string "aeiou" regexp -- "***=o" $string } } 1 -test regexp-1.10 {regexp ***= metasyntax} { +test regexpComp-1.10 {regexp ***= metasyntax} { evalInProc { set string "aeiou" set re "***=o" regexp -- $re $string } } 1 -test regexp-1.11 {regexp ***= metasyntax} { +test regexpComp-1.11 {regexp ***= metasyntax} { evalInProc { regexp -- "***=y" "aeiou" } } 0 -test regexp-1.12 {regexp ***= metasyntax} { +test regexpComp-1.12 {regexp ***= metasyntax} { evalInProc { set string "aeiou" regexp -- "***=y" $string } } 0 -test regexp-1.13 {regexp ***= metasyntax} { +test regexpComp-1.13 {regexp ***= metasyntax} { evalInProc { set string "aeiou" set re "***=y" regexp -- $re $string } } 0 -test regexp-1.14 {regexp ***= metasyntax} { +test regexpComp-1.14 {regexp ***= metasyntax} { evalInProc { set string "aeiou" set re "***=e*o" regexp -- $re $string } } 0 -test regexp-1.15 {regexp ***= metasyntax} { +test regexpComp-1.15 {regexp ***= metasyntax} { evalInProc { set string "ae*ou" set re "***=e*o" regexp -- $re $string } } 1 -test regexp-1.16 {regexp ***= metasyntax} { +test regexpComp-1.16 {regexp ***= metasyntax} { evalInProc { set string {ae*[o]?ua} set re {***=e*[o]?u} -- cgit v0.12 From c531d0f4476d9cbe08053202cb8ba541451b99bf Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 22 Aug 2008 18:00:58 +0000 Subject: * generic/tclUtil.c (TclReToGlob): Added missing set of the *exactPtr value to really fix [Bug 2065115]. Also avoid possible DString overflow. --- ChangeLog | 3 ++- generic/tclUtil.c | 24 +++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index cab7cd7..a3a47e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2008-08-22 Don Porter * generic/tclUtil.c (TclReToGlob): Added missing set of the - *exactPtr value to really fix [Bug 2065115]. + *exactPtr value to really fix [Bug 2065115]. Also avoid possible + DString overflow. * tests/regexpComp.test: Correct duplicate test names. 2008-08-21 Miguel Sofer diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 6f74ad8..22b9e73 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.102 2008/08/22 17:26:46 dgp Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.103 2008/08/22 18:01:00 dgp Exp $ */ #include "tclInt.h" @@ -3275,18 +3275,16 @@ TclReToGlob( Tcl_DStringInit(dsPtr); /* - * Write to the ds directly without the function overhead. - * An equivalent glob pattern can be no more than reStrLen+2 in size. - */ - - Tcl_DStringSetLength(dsPtr, reStrLen + 2); - dsStr = dsStrStart = Tcl_DStringValue(dsPtr); - - /* * "***=xxx" == "*xxx*", watch for glob-sensitive chars. */ if ((reStrLen >= 4) && (memcmp("***=", reStr, 4) == 0)) { + /* + * At most, the glob pattern has length 2*reStrLen + 2 to + * backslash escape every character and have * at each end. + */ + Tcl_DStringSetLength(dsPtr, reStrLen + 2); + dsStr = dsStrStart = Tcl_DStringValue(dsPtr); *dsStr++ = '*'; for (p = reStr + 4; p < strEnd; p++) { switch (*p) { @@ -3308,6 +3306,14 @@ TclReToGlob( } /* + * At most, the glob pattern has length reStrLen + 2 to account + * for possible * at each end. + */ + + Tcl_DStringSetLength(dsPtr, reStrLen + 2); + dsStr = dsStrStart = Tcl_DStringValue(dsPtr); + + /* * Check for anchored REs (ie ^foo$), so we can use string equal if * possible. Do not alter the start of str so we can free it correctly. * -- cgit v0.12 From 6b0fac94b5b540742b1e77429ec272b94107fe4c Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 22 Aug 2008 18:16:44 +0000 Subject: * generic/tcl.h: Drop use of USE_COMPAT85_CONST. That added indirection without value. Use -DCONST86="" to engage source compat support for code written for 8.5 headers. --- ChangeLog | 4 ++++ generic/tcl.h | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3a47e8..efd5390 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-08-22 Don Porter + * generic/tcl.h: Drop use of USE_COMPAT85_CONST. That added + indirection without value. Use -DCONST86="" to engage source compat + support for code written for 8.5 headers. + * generic/tclUtil.c (TclReToGlob): Added missing set of the *exactPtr value to really fix [Bug 2065115]. Also avoid possible DString overflow. diff --git a/generic/tcl.h b/generic/tcl.h index ba0d938..abde870 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.265 2008/08/21 21:35:37 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.266 2008/08/22 18:16:44 dgp Exp $ */ #ifndef _TCL @@ -261,9 +261,7 @@ extern "C" { # endif #endif -#ifdef USE_COMPAT85_CONST -# define CONST86 -#else +#ifndef CONST86 # define CONST86 CONST #endif -- cgit v0.12 From fc2d441c7dae498f52b432c51af8a3daf7aaa0b6 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 22 Aug 2008 18:27:27 +0000 Subject: speling ficks --- tests/nre.test | 4 ++-- tests/unsupported.test | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/nre.test b/tests/nre.test index 8e98991..cc15b13 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.3 2008/08/13 22:02:27 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.4 2008/08/22 18:27:27 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -223,7 +223,7 @@ test nre-7.4 {[for] is not recursive} -setup { unset abs } -result {{0 2 2 0} 0} -test nre-7.5 {[foreach] is not recursive} -constraints {knownbug} -setup { +test nre-7.5 {[foreach] is not recursive} -constraints {knownBug} -setup { # # Enable once [foreach] is NR-enabled # diff --git a/tests/unsupported.test b/tests/unsupported.test index 87db81d..94242fa 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.5 2008/08/21 23:57:43 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.6 2008/08/22 18:27:27 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -186,7 +186,7 @@ test unsupported-A.7 {atProcExit non-proc} -constraints {atProcExit} -body { unset -nocomplain x } -match glob -result *atProcExit* -returnCodes error -test unsupported-A.8 {atProcExit and eval} -constraints {knownbug atProcExit} -setup { +test unsupported-A.8 {atProcExit and eval} -constraints {knownBug atProcExit} -setup { proc a {} { eval atProcExit lappend ::x 2 set ::x 1 @@ -197,7 +197,7 @@ test unsupported-A.8 {atProcExit and eval} -constraints {knownbug atProcExit} -s unset -nocomplain ::x } -result {1 2} -test unsupported-A9 {atProcExit and uplevel} -constraints {knownbug atProcExit} -setup { +test unsupported-A9 {atProcExit and uplevel} -constraints {knownBug atProcExit} -setup { proc a {} { uplevel 1 [list atProcExit set ::x 2] set ::x 1 @@ -373,7 +373,7 @@ test unsupported-T.9 {tailcall factorial} -constraints {tailcall} -setup { rename fact {} } -result {1 120 3628800 1307674368000} -test unsupported-T.10 {tailcall and eval} -constraints {knownbug atProcExit} -setup { +test unsupported-T.10 {tailcall and eval} -constraints {knownBug atProcExit} -setup { proc a {} { eval [list tailcall lappend ::x 2] set ::x 1 @@ -384,7 +384,7 @@ test unsupported-T.10 {tailcall and eval} -constraints {knownbug atProcExit} -se unset -nocomplain ::x } -result {1 2} -test unsupported-T.11 {tailcall and uplevel} -constraints {knownbug atProcExit} -setup { +test unsupported-T.11 {tailcall and uplevel} -constraints {knownBug atProcExit} -setup { proc a {} { uplevel 1 [list tailcall set ::x 2] set ::x 1 -- cgit v0.12 From ff438a1585e89220bba50c88493bee7174377ff9 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 22 Aug 2008 19:41:45 +0000 Subject: * changes: Updates for 8.6a2 release. --- ChangeLog | 4 ++++ changes | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index efd5390..c2010dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-08-22 Don Porter + *** 8.6a2 TAGGED FOR RELEASE *** + + * changes: Updates for 8.6a2 release. + * generic/tcl.h: Drop use of USE_COMPAT85_CONST. That added indirection without value. Use -DCONST86="" to engage source compat support for code written for 8.5 headers. diff --git a/changes b/changes index 7cfe44a..9f6c3be 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.144 2008/08/12 15:00:23 dgp Exp $ +RCS: @(#) $Id: changes,v 1.145 2008/08/22 19:41:47 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7289,4 +7289,12 @@ in a deleted interp. (porter) 2008-08-11 (enhancement) automatic [package provide] for TMs (kupries) ---- Released 8.6a2, August 15, 2008 --- See ChangeLog for details --- +2008-08-17 (bug fix)[2055782] crash involving Tcl_ConcatObj (sofer) + +2008-08-21 (new feature) CONST-ified Tcl routines passing (Tcl_ObjType *), +(Tcl_Filesystem *), or (Tcl_Timer *) arguments (nijtmans,porter) + *** POTENTIAL INCOMPATIBILITY *** + +2008-08-21 (bug fix)[2065115] Restored ***= regexp functioning (hobbs,porter) + +--- Released 8.6a2, August 25, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 94a254e8f66296402989d1c1fae71f7bc0b88f4d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 23 Aug 2008 01:42:52 +0000 Subject: * generic/tclBasic.c: Set a special COROUTINE_BUSY errorcode --- ChangeLog | 4 ++++ generic/tclBasic.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c2010dc..29ac32c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-08-22 Miguel Sofer + + * generic/tclBasic.c: Set a special COROUTINE_BUSY errorcode + 2008-08-22 Don Porter *** 8.6a2 TAGGED FOR RELEASE *** diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 53be9de..d8ab1d0 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.359 2008/08/21 23:57:42 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.360 2008/08/23 01:42:54 msofer Exp $ */ #include "tclInt.h" @@ -8305,6 +8305,7 @@ NRInterpCoroutine( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "coroutine \"", Tcl_GetString(objv[0]), "\" is already running", NULL); + Tcl_SetErrorCode(interp, "COROUTINE_BUSY", NULL); return TCL_ERROR; } -- cgit v0.12 From 0e7c2a3c941ea709e13087114f8467e4b19d0777 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 23 Aug 2008 01:48:24 +0000 Subject: * generic/tclBasic.c: Set special errocodes: COROUTINE_BUSY, COROUTINE_CANT_YIELD, COROUTINE_ILLEGAL_YIELD. --- ChangeLog | 3 ++- generic/tclBasic.c | 4 +++- generic/tclExecute.c | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29ac32c..82fefe2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-08-22 Miguel Sofer - * generic/tclBasic.c: Set a special COROUTINE_BUSY errorcode + * generic/tclBasic.c: Set special errocodes: COROUTINE_BUSY, + COROUTINE_CANT_YIELD, COROUTINE_ILLEGAL_YIELD. 2008-08-22 Don Porter diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d8ab1d0..30631a5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.360 2008/08/23 01:42:54 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.361 2008/08/23 01:48:25 msofer Exp $ */ #include "tclInt.h" @@ -4302,9 +4302,11 @@ NRCallTEBC( case TCL_NR_YIELD_TYPE: if (iPtr->execEnvPtr->corPtr) { Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); } else { Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); } return TCL_ERROR; default: diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0311da2..453be92 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.407 2008/08/20 15:02:32 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.408 2008/08/23 01:48:26 msofer Exp $ */ #include "tclInt.h" @@ -1946,6 +1946,7 @@ TclExecuteByteCode( if (!corPtr) { Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); result = TCL_ERROR; goto checkForCatch; } @@ -1955,6 +1956,7 @@ TclExecuteByteCode( if (corPtr->stackLevel != &initLevel) { Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); result = TCL_ERROR; goto checkForCatch; } -- cgit v0.12 From 51485a0a2322299308d4f86bff6d52a543ea5164 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 23 Aug 2008 01:55:02 +0000 Subject: fix ChangeLog entry --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 82fefe2..f17c207 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-08-22 Miguel Sofer - * generic/tclBasic.c: Set special errocodes: COROUTINE_BUSY, + * generic/tclBasic.c: + * generic/tclExecute.c: Set special errocodes: COROUTINE_BUSY, COROUTINE_CANT_YIELD, COROUTINE_ILLEGAL_YIELD. 2008-08-22 Don Porter -- cgit v0.12 From 7ca11ee5bdfe73bede408c4e213282430c6575d0 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 23 Aug 2008 10:54:24 +0000 Subject: Silence some warnings. --- generic/tclListObj.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 6cf903b..7505569 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.51 2008/07/20 17:55:51 dkf Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.52 2008/08/23 10:54:24 dkf Exp $ */ #include "tclInt.h" @@ -1081,8 +1081,8 @@ TclLindexFlat( Tcl_IncrRefCount(listPtr); for (i=0 ; i Date: Sat, 23 Aug 2008 11:35:43 +0000 Subject: NRE-enable the ensemble creator (add extra field!) Arrange for [dict for] to be NRE-enabled when not compiled. [Bug 2017632] --- ChangeLog | 10 ++ generic/tclDictObj.c | 235 ++++++++++++++++++++--------- generic/tclInt.h | 406 +++++++++++++++++++++++++-------------------------- generic/tclNamesp.c | 5 +- 4 files changed, 374 insertions(+), 282 deletions(-) diff --git a/ChangeLog b/ChangeLog index f17c207..c087901 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-08-23 Donal K. Fellows + + * generic/tclInt.h (EnsembleImplMap): Added extra field to make it + * generic/tclNamesp.c (TclMakeEnsemble): easier to build non-recursive + ensembles in the core. + + * generic/tclDictObj.c (DictForNRCmd): Converted the [dict for] + command to have an NRE-aware non-compiled implementation. Part of the + [Bug 2017632] project. + 2008-08-22 Miguel Sofer * generic/tclBasic.c: diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 9531f22..6253e43 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.67 2008/07/31 14:43:44 msofer Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.68 2008/08/23 11:35:43 dkf Exp $ */ #include "tclInt.h" @@ -78,6 +78,11 @@ static int FinalizeDictUpdate(ClientData data[], Tcl_Interp *interp, int result); static int FinalizeDictWith(ClientData data[], Tcl_Interp *interp, int result); +static int DictForNRCmd(ClientData dummy, Tcl_Interp *interp, + int objc, Tcl_Obj *const *objv); +static int DictForLoopCallback(ClientData data[], + Tcl_Interp *interp, int result); + /* * Table of dict subcommand names and implementations. @@ -85,25 +90,25 @@ static int FinalizeDictWith(ClientData data[], static const EnsembleImplMap implementationMap[] = { {"append", DictAppendCmd, TclCompileDictAppendCmd }, - {"create", DictCreateCmd, NULL }, - {"exists", DictExistsCmd, NULL }, - {"filter", DictFilterCmd, NULL }, - {"for", DictForCmd, TclCompileDictForCmd }, + {"create", DictCreateCmd }, + {"exists", DictExistsCmd }, + {"filter", DictFilterCmd }, + {"for", DictForCmd, TclCompileDictForCmd, DictForNRCmd }, {"get", DictGetCmd, TclCompileDictGetCmd }, {"incr", DictIncrCmd, TclCompileDictIncrCmd }, - {"info", DictInfoCmd, NULL }, - {"keys", DictKeysCmd, NULL }, + {"info", DictInfoCmd }, + {"keys", DictKeysCmd }, {"lappend", DictLappendCmd, TclCompileDictLappendCmd }, - {"merge", DictMergeCmd, NULL }, - {"remove", DictRemoveCmd, NULL }, - {"replace", DictReplaceCmd, NULL }, + {"merge", DictMergeCmd }, + {"remove", DictRemoveCmd }, + {"replace", DictReplaceCmd }, {"set", DictSetCmd, TclCompileDictSetCmd }, - {"size", DictSizeCmd, NULL }, - {"unset", DictUnsetCmd, NULL }, + {"size", DictSizeCmd }, + {"unset", DictUnsetCmd }, {"update", DictUpdateCmd, TclCompileDictUpdateCmd }, - {"values", DictValuesCmd, NULL }, - {"with", DictWithCmd, NULL }, - {NULL, NULL, NULL } + {"values", DictValuesCmd }, + {"with", DictWithCmd }, + {NULL} }; /* @@ -1554,7 +1559,7 @@ DictGetCmd( */ if (objc == 2) { - Tcl_Obj *keyPtr, *listPtr; + Tcl_Obj *keyPtr = NULL, *listPtr; Tcl_DictSearch search; int done; @@ -1734,7 +1739,7 @@ DictMergeCmd( int objc, Tcl_Obj *const *objv) { - Tcl_Obj *targetObj, *keyObj, *valueObj; + Tcl_Obj *targetObj, *keyObj = NULL, *valueObj = NULL; int allocatedDict = 0; int i, done; Tcl_DictSearch search; @@ -1858,8 +1863,8 @@ DictKeysCmd( } } else { Tcl_DictSearch search; - Tcl_Obj *keyPtr; - int done; + Tcl_Obj *keyPtr = NULL; + int done = 0; /* * At this point, we know we have a dictionary (or at least something @@ -1906,7 +1911,7 @@ DictValuesCmd( int objc, Tcl_Obj *const *objv) { - Tcl_Obj *valuePtr, *listPtr; + Tcl_Obj *valuePtr = NULL, *listPtr; Tcl_DictSearch search; int done; char *pattern; @@ -2377,11 +2382,21 @@ DictForCmd( int objc, Tcl_Obj *const *objv) { + return Tcl_NRCallObjProc(interp, DictForNRCmd, dummy, objc, objv); +} + +static int +DictForNRCmd( + ClientData dummy, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ Interp *iPtr = (Interp *) interp; Tcl_Obj *scriptObj, *keyVarObj, *valueVarObj; Tcl_Obj **varv, *keyObj, *valueObj; - Tcl_DictSearch search; - int varc, done, result; + Tcl_DictSearch *searchPtr; + int varc, done; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2389,6 +2404,10 @@ DictForCmd( return TCL_ERROR; } + /* + * Parse arguments. + */ + if (TclListObjGetElements(interp, objv[1], &varc, &varv) != TCL_OK) { return TCL_ERROR; } @@ -2397,14 +2416,20 @@ DictForCmd( TCL_STATIC); return TCL_ERROR; } - keyVarObj = varv[0]; - valueVarObj = varv[1]; - scriptObj = objv[3]; - - if (Tcl_DictObjFirst(interp, objv[2], &search, &keyObj, &valueObj, + searchPtr = TclStackAlloc(interp, sizeof(Tcl_DictSearch)); + if (Tcl_DictObjFirst(interp, objv[2], searchPtr, &keyObj, &valueObj, &done) != TCL_OK) { + TclStackFree(interp, searchPtr); return TCL_ERROR; } + if (done) { + TclStackFree(interp, searchPtr); + return TCL_OK; + } + TclListObjGetElements(NULL, objv[1], &varc, &varv); + keyVarObj = varv[0]; + valueVarObj = varv[1]; + scriptObj = objv[3]; /* * Make sure that these objects (which we need throughout the body of the @@ -2416,64 +2441,130 @@ DictForCmd( Tcl_IncrRefCount(valueVarObj); Tcl_IncrRefCount(scriptObj); - result = TCL_OK; - while (!done) { - /* - * Stop the value from getting hit in any way by any traces on the key - * variable. - */ + /* + * Stop the value from getting hit in any way by any traces on the key + * variable. + */ - Tcl_IncrRefCount(valueObj); - if (Tcl_ObjSetVar2(interp, keyVarObj, NULL, keyObj, 0) == NULL) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "couldn't set key variable: \"", - TclGetString(keyVarObj), "\"", NULL); - TclDecrRefCount(valueObj); - result = TCL_ERROR; - break; - } + Tcl_IncrRefCount(valueObj); + if (Tcl_ObjSetVar2(interp, keyVarObj, NULL, keyObj, 0) == NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "couldn't set key variable: \"", + TclGetString(keyVarObj), "\"", NULL); TclDecrRefCount(valueObj); - if (Tcl_ObjSetVar2(interp, valueVarObj, NULL, valueObj, 0) == NULL) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "couldn't set value variable: \"", - TclGetString(valueVarObj), "\"", NULL); - result = TCL_ERROR; - break; - } + goto error; + } + TclDecrRefCount(valueObj); + if (Tcl_ObjSetVar2(interp, valueVarObj, NULL, valueObj, 0) == NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "couldn't set value variable: \"", + TclGetString(valueVarObj), "\"", NULL); + goto error; + } - /* - * TIP #280. Make invoking context available to loop body. - */ + /* + * Run the script. + */ + + TclNRAddCallback(interp, DictForLoopCallback, searchPtr, keyVarObj, + valueVarObj, scriptObj); + return TclNREvalObjEx(interp, scriptObj, 0, iPtr->cmdFramePtr, 3); + + /* + * For unwinding everything on error. + */ + + error: + TclDecrRefCount(keyVarObj); + TclDecrRefCount(valueVarObj); + TclDecrRefCount(scriptObj); + Tcl_DictObjDone(searchPtr); + TclStackFree(interp, searchPtr); + return TCL_ERROR; +} + +static int +DictForLoopCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_DictSearch *searchPtr = data[0]; + Tcl_Obj *keyVarObj = data[1]; + Tcl_Obj *valueVarObj = data[2]; + Tcl_Obj *scriptObj = data[3]; + Tcl_Obj *keyObj, *valueObj; + int done; + + /* + * Process the result from the previous execution of the script body. + */ - result = TclEvalObjEx(interp, scriptObj, 0, iPtr->cmdFramePtr, 3); - if (result == TCL_CONTINUE) { + if (result == TCL_CONTINUE) { + result = TCL_OK; + } else if (result != TCL_OK) { + if (result == TCL_BREAK) { + Tcl_ResetResult(interp); result = TCL_OK; - } else if (result != TCL_OK) { - if (result == TCL_BREAK) { - result = TCL_OK; - } else if (result == TCL_ERROR) { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"dict for\" body line %d)", - interp->errorLine)); - } - break; + } else if (result == TCL_ERROR) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"dict for\" body line %d)", interp->errorLine)); } + goto done; + } + + /* + * Get the next mapping from the dictionary. + */ - Tcl_DictObjNext(&search, &keyObj, &valueObj, &done); + Tcl_DictObjNext(searchPtr, &keyObj, &valueObj, &done); + if (done) { + Tcl_ResetResult(interp); + goto done; } /* - * Stop holding a reference to these objects. + * Stop the value from getting hit in any way by any traces on the key + * variable. */ + Tcl_IncrRefCount(valueObj); + if (Tcl_ObjSetVar2(interp, keyVarObj, NULL, keyObj, 0) == NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "couldn't set key variable: \"", + TclGetString(keyVarObj), "\"", NULL); + TclDecrRefCount(valueObj); + result = TCL_ERROR; + goto done; + } + TclDecrRefCount(valueObj); + if (Tcl_ObjSetVar2(interp, valueVarObj, NULL, valueObj, 0) == NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "couldn't set value variable: \"", + TclGetString(valueVarObj), "\"", NULL); + result = TCL_ERROR; + goto done; + } + + /* + * Run the script. + */ + + TclNRAddCallback(interp, DictForLoopCallback, searchPtr, keyVarObj, + valueVarObj, scriptObj); + return TclNREvalObjEx(interp, scriptObj, 0, iPtr->cmdFramePtr, 3); + + /* + * For unwinding everything once the iterating is done. + */ + + done: TclDecrRefCount(keyVarObj); TclDecrRefCount(valueVarObj); TclDecrRefCount(scriptObj); - - Tcl_DictObjDone(&search); - if (result == TCL_OK) { - Tcl_ResetResult(interp); - } + Tcl_DictObjDone(searchPtr); + TclStackFree(interp, searchPtr); return result; } @@ -2629,7 +2720,7 @@ DictFilterCmd( FILTER_KEYS, FILTER_SCRIPT, FILTER_VALUES }; Tcl_Obj *scriptObj, *keyVarObj, *valueVarObj; - Tcl_Obj **varv, *keyObj, *valueObj, *resultObj, *boolObj; + Tcl_Obj **varv, *keyObj = NULL, *valueObj = NULL, *resultObj, *boolObj; Tcl_DictSearch search; int index, varc, done, result, satisfied; char *pattern; @@ -3041,7 +3132,7 @@ DictWithCmd( Tcl_Obj *const *objv) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *dictPtr, *keysPtr, *keyPtr, *valPtr, *pathPtr; + Tcl_Obj *dictPtr, *keysPtr, *keyPtr = NULL, *valPtr = NULL, *pathPtr; Tcl_DictSearch s; int done; diff --git a/generic/tclInt.h b/generic/tclInt.h index 7084cd1..f5b7ba5 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.394 2008/08/21 23:57:43 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.395 2008/08/23 11:35:52 dkf Exp $ */ #ifndef _TCLINT @@ -123,19 +123,19 @@ typedef int ptrdiff_t; #if !defined(INT2PTR) && !defined(PTR2INT) # if defined(HAVE_INTPTR_T) || defined(intptr_t) -# define INT2PTR(p) ((void*)(intptr_t)(p)) +# define INT2PTR(p) ((void *)(intptr_t)(p)) # define PTR2INT(p) ((int)(intptr_t)(p)) # else -# define INT2PTR(p) ((void*)(p)) +# define INT2PTR(p) ((void *)(p)) # define PTR2INT(p) ((int)(p)) # endif #endif #if !defined(UINT2PTR) && !defined(PTR2UINT) # if defined(HAVE_UINTPTR_T) || defined(uintptr_t) -# define UINT2PTR(p) ((void*)(uintptr_t)(p)) +# define UINT2PTR(p) ((void *)(uintptr_t)(p)) # define PTR2UINT(p) ((unsigned int)(uintptr_t)(p)) # else -# define UINT2PTR(p) ((void*)(p)) +# define UINT2PTR(p) ((void *)(p)) # define PTR2UINT(p) ((unsigned int)(p)) # endif #endif @@ -163,14 +163,14 @@ typedef struct Tcl_ResolvedVarInfo { Tcl_ResolveVarDeleteProc *deleteProc; } Tcl_ResolvedVarInfo; -typedef int (Tcl_ResolveCompiledVarProc) (Tcl_Interp *interp, +typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp, const char *name, int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr); -typedef int (Tcl_ResolveVarProc) (Tcl_Interp *interp, const char *name, +typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, const char *name, Tcl_Namespace *context, int flags, Tcl_Var *rPtr); -typedef int (Tcl_ResolveCmdProc) (Tcl_Interp *interp, const char *name, +typedef int (Tcl_ResolveCmdProc)(Tcl_Interp *interp, const char *name, Tcl_Namespace *context, int flags, Tcl_Command *rPtr); typedef struct Tcl_ResolverInfo { @@ -214,7 +214,6 @@ typedef struct TclVarHashTable { #define TclVarHashFindVar(tablePtr, key) \ TclVarHashCreateVar((tablePtr), (key), NULL) - /* * The structure below defines a namespace. * Note: the first five fields must match exactly the fields in a @@ -361,7 +360,7 @@ struct NamespacePathEntry { * unit that refers to the namespace has been freed (i.e., when * the namespace's refCount is 0), the namespace's storage will * be freed. - * NS_KILLED - 1 means that TclTeardownNamespace has already been called on + * NS_KILLED - 1 means that TclTeardownNamespace has already been called on * this namespace and it should not be called again [Bug 1355942] * NS_SUPPRESS_COMPILATION - * Marks the commands in this namespace for not being compiled, @@ -590,8 +589,8 @@ typedef struct VarInHash { * local variable that was assigned a slot in a * procedure frame by the compiler so the Var * storage is part of the call frame. - * VAR_DEAD_HASH 1 means that this var's entry in the hashtable - * has already been deleted. + * VAR_DEAD_HASH 1 means that this var's entry in the hashtable + * has already been deleted. * VAR_ARRAY_ELEMENT - 1 means that this variable is an array * element, so it is not legal for it to be an * array itself (the VAR_ARRAY flag had better @@ -628,8 +627,8 @@ typedef struct VarInHash { * name. * VAR_RESOLVED - 1 if name resolution has been done for this * variable. - * VAR_IS_ARGS 1 if this variable is the last argument and is - * named "args". + * VAR_IS_ARGS 1 if this variable is the last argument and is + * named "args". */ /* @@ -642,35 +641,33 @@ typedef struct VarInHash { * in precompiled scripts keep working. */ - /* Type of value (0 is scalar) */ #define VAR_ARRAY 0x1 #define VAR_LINK 0x2 /* Type of storage (0 is compiled local) */ #define VAR_IN_HASHTABLE 0x4 -#define VAR_DEAD_HASH 0x8 +#define VAR_DEAD_HASH 0x8 #define VAR_ARRAY_ELEMENT 0x1000 -#define VAR_NAMESPACE_VAR 0x80 /* KEEP OLD VALUE for Itcl */ +#define VAR_NAMESPACE_VAR 0x80 /* KEEP OLD VALUE for Itcl */ #define VAR_ALL_HASH \ (VAR_IN_HASHTABLE|VAR_DEAD_HASH|VAR_NAMESPACE_VAR|VAR_ARRAY_ELEMENT) /* Trace and search state */ -#define VAR_TRACED_READ 0x10 /* TCL_TRACE_READS */ -#define VAR_TRACED_WRITE 0x20 /* TCL_TRACE_WRITES */ -#define VAR_TRACED_UNSET 0x40 /* TCL_TRACE_UNSETS */ -#define VAR_TRACED_ARRAY 0x800 /* TCL_TRACE_ARRAY */ -#define VAR_TRACE_ACTIVE 0x2000 -#define VAR_SEARCH_ACTIVE 0x4000 +#define VAR_TRACED_READ 0x10 /* TCL_TRACE_READS */ +#define VAR_TRACED_WRITE 0x20 /* TCL_TRACE_WRITES */ +#define VAR_TRACED_UNSET 0x40 /* TCL_TRACE_UNSETS */ +#define VAR_TRACED_ARRAY 0x800 /* TCL_TRACE_ARRAY */ +#define VAR_TRACE_ACTIVE 0x2000 +#define VAR_SEARCH_ACTIVE 0x4000 #define VAR_ALL_TRACES \ (VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) - /* Special handling on initialisation (only CompiledLocal) */ -#define VAR_ARGUMENT 0x100 /* KEEP OLD VALUE! See tclProc.c */ -#define VAR_TEMPORARY 0x200 /* KEEP OLD VALUE! See tclProc.c */ +#define VAR_ARGUMENT 0x100 /* KEEP OLD VALUE! See tclProc.c */ +#define VAR_TEMPORARY 0x200 /* KEEP OLD VALUE! See tclProc.c */ #define VAR_IS_ARGS 0x400 #define VAR_RESOLVED 0x8000 @@ -767,7 +764,7 @@ typedef struct VarInHash { ((varPtr)->flags & VAR_TRACE_ACTIVE) #define TclIsVarTraced(varPtr) \ - ((varPtr)->flags & VAR_ALL_TRACES) + ((varPtr)->flags & VAR_ALL_TRACES) #define TclIsVarInHash(varPtr) \ ((varPtr)->flags & VAR_IN_HASHTABLE) @@ -777,8 +774,8 @@ typedef struct VarInHash { #define TclGetVarNsPtr(varPtr) \ (TclIsVarInHash(varPtr) \ - ? ((TclVarHashTable *) ((((VarInHash *) (varPtr))->entry.tablePtr)))->nsPtr \ - : NULL) + ? ((TclVarHashTable *) ((((VarInHash *) (varPtr))->entry.tablePtr)))->nsPtr \ + : NULL) #define VarHashRefCount(varPtr) \ ((VarInHash *) (varPtr))->refCount @@ -800,16 +797,15 @@ typedef struct VarInHash { #define TclIsVarDirectReadable2(varPtr, arrayPtr) \ (TclIsVarDirectReadable(varPtr) &&\ - (!(arrayPtr) || !((arrayPtr)->flags & VAR_TRACED_READ))) + (!(arrayPtr) || !((arrayPtr)->flags & VAR_TRACED_READ))) #define TclIsVarDirectWritable2(varPtr, arrayPtr) \ (TclIsVarDirectWritable(varPtr) &&\ - (!(arrayPtr) || !((arrayPtr)->flags & VAR_TRACED_WRITE))) + (!(arrayPtr) || !((arrayPtr)->flags & VAR_TRACED_WRITE))) #define TclIsVarDirectModifyable2(varPtr, arrayPtr) \ (TclIsVarDirectModifyable(varPtr) &&\ - (!(arrayPtr) || !((arrayPtr)->flags & (VAR_TRACED_READ|VAR_TRACED_WRITE)))) - + (!(arrayPtr) || !((arrayPtr)->flags & (VAR_TRACED_READ|VAR_TRACED_WRITE)))) /* *---------------------------------------------------------------- @@ -909,7 +905,7 @@ typedef struct Proc { * of a procedure (or lambda term or ...). */ -typedef void (*ProcErrorProc)(Tcl_Interp *interp, Tcl_Obj *procNameObj); +typedef void (ProcErrorProc)(Tcl_Interp *interp, Tcl_Obj *procNameObj); /* * The structure below defines a command trace. This is used to allow Tcl @@ -924,7 +920,7 @@ typedef struct Trace { struct Trace *nextPtr; /* Next in list of traces for this interp. */ int flags; /* Flags governing the trace - see * Tcl_CreateObjTrace for details */ - Tcl_CmdObjTraceDeleteProc* delProc; + Tcl_CmdObjTraceDeleteProc *delProc; /* Procedure to call when trace is deleted */ } Trace; @@ -1040,7 +1036,7 @@ typedef struct CallFrame { * (local variables assigned entries ["slots"] * in the compiledLocals array below). */ TclVarHashTable *varTablePtr; - /* Hash table containing local variables not + /* Hash table containing local variables not * recognized by the compiler, or created at * execution time through, e.g., upvar. * Initially NULL and created if needed. */ @@ -1062,7 +1058,7 @@ typedef struct CallFrame { LocalCache *localCachePtr; } CallFrame; -#define FRAME_IS_PROC 0x1 +#define FRAME_IS_PROC 0x1 #define FRAME_IS_LAMBDA 0x2 #define FRAME_IS_METHOD 0x4 /* The frame is a method body, and the frame's * clientData field contains a CallContext @@ -1099,11 +1095,10 @@ typedef struct CmdFrame { int type; /* Values see below. */ int level; /* #Frames in stack, prevent O(n) scan of * list. */ - int numLevels; /* value of interp's numLevels when the frame + int numLevels; /* value of interp's numLevels when the frame * was pushed */ int *line; /* Lines the words of the command start on. */ int nline; - CallFrame *framePtr; /* Procedure activation record, may be * NULL. */ struct CmdFrame *nextPtr; /* Link to calling frame */ @@ -1158,22 +1153,23 @@ typedef struct CmdFrame { } CmdFrame; typedef struct CFWord { - CmdFrame* framePtr; /* CmdFrame to acess */ - int word; /* Index of the word in the command */ - int refCount; /* #times the word is on the stack */ + CmdFrame *framePtr; /* CmdFrame to acess */ + int word; /* Index of the word in the command */ + int refCount; /* #times the word is on the stack */ } CFWord; typedef struct ExtIndex { - Tcl_Obj* obj; /* Reference to the word */ - int pc; /* Instruction pointer of a command in ExtCmdLoc.loc[.] */ - int word; /* Index of word in ExtCmdLoc.loc[cmd]->line[.] */ + Tcl_Obj *obj; /* Reference to the word */ + int pc; /* Instruction pointer of a command in + * ExtCmdLoc.loc[.] */ + int word; /* Index of word in + * ExtCmdLoc.loc[cmd]->line[.] */ } ExtIndex; - typedef struct CFWordBC { - CmdFrame* framePtr; /* CmdFrame to acess */ - ExtIndex* eiPtr; /* Word info: PC and index */ - int refCount; /* #times the word is on the stack */ + CmdFrame *framePtr; /* CmdFrame to acess */ + ExtIndex *eiPtr; /* Word info: PC and index */ + int refCount; /* #times the word is on the stack */ } CFWordBC; /* @@ -1194,16 +1190,15 @@ typedef struct CFWordBC { * types, per the context of the byte code in execution. */ -#define TCL_LOCATION_EVAL (0) /* Location in a dynamic eval script */ -#define TCL_LOCATION_EVAL_LIST (1) /* Location in a dynamic eval script, - * list-path */ -#define TCL_LOCATION_BC (2) /* Location in byte code */ -#define TCL_LOCATION_PREBC (3) /* Location in precompiled byte code, no - * location */ -#define TCL_LOCATION_SOURCE (4) /* Location in a file */ -#define TCL_LOCATION_PROC (5) /* Location in a dynamic proc */ - -#define TCL_LOCATION_LAST (6) /* Number of values in the enum */ +#define TCL_LOCATION_EVAL (0) /* Location in a dynamic eval script */ +#define TCL_LOCATION_EVAL_LIST (1) /* Location in a dynamic eval script, + * list-path */ +#define TCL_LOCATION_BC (2) /* Location in byte code */ +#define TCL_LOCATION_PREBC (3) /* Location in precompiled byte code, no + * location */ +#define TCL_LOCATION_SOURCE (4) /* Location in a file */ +#define TCL_LOCATION_PROC (5) /* Location in a dynamic proc */ +#define TCL_LOCATION_LAST (6) /* Number of values in the enum */ /* * Structure passed to describe procedure-like "procedures" that are not @@ -1264,7 +1259,6 @@ MODULE_SCOPE void TclThreadDataKeySet(Tcl_ThreadDataKey *keyPtr, #define TCL_TSD_INIT(keyPtr) \ (ThreadSpecificData *)Tcl_GetThreadData((keyPtr), sizeof(ThreadSpecificData)) - /* *---------------------------------------------------------------- * Data structures related to bytecode compilation and execution. These are @@ -1302,7 +1296,7 @@ struct CompileEnv; #define TCL_OUT_LINE_COMPILE TCL_ERROR -typedef int (CompileProc) (Tcl_Interp *interp, Tcl_Parse *parsePtr, +typedef int (CompileProc)(Tcl_Interp *interp, Tcl_Parse *parsePtr, struct Command *cmdPtr, struct CompileEnv *compEnvPtr); /* @@ -1310,7 +1304,7 @@ typedef int (CompileProc) (Tcl_Interp *interp, Tcl_Parse *parsePtr, * SetByteCodeFromAny. */ -typedef int (CompileHookProc) (Tcl_Interp *interp, +typedef int (CompileHookProc)(Tcl_Interp *interp, struct CompileEnv *compEnvPtr, ClientData clientData); /* @@ -1351,13 +1345,12 @@ typedef struct CoroutineData { } CoroutineData; typedef struct ExecEnv { - ExecStack *execStackPtr; /* Points to the first item in the - * evaluation stack on the heap. */ - Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" - * objs. */ + ExecStack *execStackPtr; /* Points to the first item in the evaluation + * stack on the heap. */ + Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" objs. */ struct Tcl_Interp *interp; struct TEOV_callback *callbackPtr; - /* Top callback in TEOV's stack */ + /* Top callback in TEOV's stack */ struct CoroutineData *corPtr; struct BottomData *bottomPtr; int rewind; @@ -1462,6 +1455,7 @@ typedef struct { const char *name; /* The name of the subcommand. */ Tcl_ObjCmdProc *proc; /* The implementation of the subcommand. */ CompileProc *compileProc; /* The compiler for the subcommand. */ + Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */ } EnsembleImplMap; /* @@ -1903,23 +1897,24 @@ typedef struct Interp { * TIP #285, Script cancellation support. */ - Tcl_AsyncHandler asyncCancel; /* Async handler token for Tcl_CancelEval. */ - Tcl_Obj* asyncCancelMsg; /* Error message set by async cancel handler - * for the propagation of arbitrary Tcl - * errors. This information, if present - * (asyncCancelMsg not NULL), takes precedence - * over the default error messages returned by - * a script cancellation operation. */ + Tcl_AsyncHandler asyncCancel; + /* Async handler token for Tcl_CancelEval. */ + Tcl_Obj *asyncCancelMsg; /* Error message set by async cancel handler + * for the propagation of arbitrary Tcl + * errors. This information, if present + * (asyncCancelMsg not NULL), takes precedence + * over the default error messages returned by + * a script cancellation operation. */ /* TIP #280 */ - CmdFrame *cmdFramePtr; /* Points to the command frame containing - * the location information for the current + CmdFrame *cmdFramePtr; /* Points to the command frame containing the + * location information for the current * command. */ const CmdFrame *invokeCmdFramePtr; /* Points to the command frame which is the * invoking context of the bytecode compiler. * NULL when the byte code compiler is not - * active */ + * active. */ int invokeWord; /* Index of the word in the command which * is getting compiled. */ Tcl_HashTable *linePBodyPtr;/* This table remembers for each statically @@ -1931,9 +1926,10 @@ typedef struct Interp { * object the location information for its * body. It is keyed by the address of the * Proc structure for a procedure. The values - * are "struct ExtCmdLoc*" (See tclCompile.h) */ - Tcl_HashTable* lineLABCPtr; - Tcl_HashTable* lineLAPtr; /* This table remembers for each argument of a + * are "struct ExtCmdLoc*". (See + * tclCompile.h) */ + Tcl_HashTable *lineLABCPtr; + Tcl_HashTable *lineLAPtr; /* This table remembers for each argument of a * command on the execution stack the index of * the argument in the command, and the * location data of the command. It is keyed @@ -1992,7 +1988,7 @@ typedef struct Interp { * and setup. */ struct TEOV_callback *atExitPtr; - /* Callbacks to be run after a command exited; + /* Callbacks to be run after a command exited; * this is only set for atProcExirt or * tailcalls that fall back out of tebc. */ @@ -2014,7 +2010,6 @@ typedef struct Interp { #define TclAsyncReady(iPtr) \ *((iPtr)->asyncReadyPtr) - /* * General list of interpreters. Doubly linked for easier removal of items * deep in the list. @@ -2061,9 +2056,9 @@ typedef struct InterpList { * other than these should be turned into errors. */ -#define TCL_ALLOW_EXCEPTIONS 4 -#define TCL_EVAL_FILE 2 -#define TCL_EVAL_CTX 8 +#define TCL_ALLOW_EXCEPTIONS 4 +#define TCL_EVAL_FILE 2 +#define TCL_EVAL_CTX 8 /* * Flag bits for Interp structures: @@ -2094,29 +2089,30 @@ typedef struct InterpList { * Makes it append instead of replacing and uses * different intermediate text. * CANCELED: Non-zero means that the script in progress should be - * canceled as soon as possible. This can be checked by + * canceled as soon as possible. This can be checked by * extensions (and the core itself) by calling * Tcl_Canceled and checking if TCL_ERROR is returned. * This is a one-shot flag that is reset immediately upon * being detected; however, if the TCL_CANCEL_UNWIND flag * is set Tcl_Canceled will continue to report that the * script in progress has been canceled thereby allowing - * the evaluation stack for the interp to be fully unwound. + * the evaluation stack for the interp to be fully + * unwound. * * WARNING: For the sake of some extensions that have made use of former * internal values, do not re-use the flag values 2 (formerly ERR_IN_PROGRESS) * or 8 (formerly ERROR_CODE_SET). */ -#define DELETED 1 -#define ERR_ALREADY_LOGGED 4 -#define DONT_COMPILE_CMDS_INLINE 0x20 -#define RAND_SEED_INITIALIZED 0x40 -#define SAFE_INTERP 0x80 -#define INTERP_TRACE_IN_PROGRESS 0x200 -#define INTERP_ALTERNATE_WRONG_ARGS 0x400 -#define ERR_LEGACY_COPY 0x800 -#define CANCELED 0x1000 +#define DELETED 1 +#define ERR_ALREADY_LOGGED 4 +#define DONT_COMPILE_CMDS_INLINE 0x20 +#define RAND_SEED_INITIALIZED 0x40 +#define SAFE_INTERP 0x80 +#define INTERP_TRACE_IN_PROGRESS 0x200 +#define INTERP_ALTERNATE_WRONG_ARGS 0x400 +#define ERR_LEGACY_COPY 0x800 +#define CANCELED 0x1000 /* * Maximum number of levels of nesting permitted in Tcl commands (used to @@ -2190,7 +2186,6 @@ struct LimitHandler { #define TCL_ALIGN(x) (((int)(x) + 7) & ~7) - /* * The following enum values are used to specify the runtime platform setting * of the tclPlatform variable. @@ -2346,7 +2341,7 @@ typedef struct List { */ #define TCL_FILESYSTEM_VERSION_2 ((Tcl_FSVersion) 0x2) -typedef ClientData (TclFSGetCwdProc2) (ClientData clientData); +typedef ClientData (TclFSGetCwdProc2)(ClientData clientData); /* * The following types are used for getting and storing platform-specific file @@ -2356,9 +2351,9 @@ typedef ClientData (TclFSGetCwdProc2) (ClientData clientData); * tclFCmd.c. */ -typedef int (TclGetFileAttrProc) (Tcl_Interp *interp, int objIndex, +typedef int (TclGetFileAttrProc)(Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attrObjPtrPtr); -typedef int (TclSetFileAttrProc) (Tcl_Interp *interp, int objIndex, +typedef int (TclSetFileAttrProc)(Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attrObjPtr); typedef struct TclFileAttrProcs { @@ -2396,9 +2391,9 @@ typedef enum Tcl_PathPart { *---------------------------------------------------------------- */ -typedef int (TclStatProc_) (const char *path, struct stat *buf); -typedef int (TclAccessProc_) (const char *path, int mode); -typedef Tcl_Channel (TclOpenFileChannelProc_) (Tcl_Interp *interp, +typedef int (TclStatProc_)(const char *path, struct stat *buf); +typedef int (TclAccessProc_)(const char *path, int mode); +typedef Tcl_Channel (TclOpenFileChannelProc_)(Tcl_Interp *interp, const char *fileName, const char *modeString, int permissions); /* @@ -2416,7 +2411,7 @@ typedef Tcl_ObjCmdProc *TclObjCmdProcType; *---------------------------------------------------------------- */ -typedef void (TclInitProcessGlobalValueProc) (char **valuePtr, int *lengthPtr, +typedef void (TclInitProcessGlobalValueProc)(char **valuePtr, int *lengthPtr, Tcl_Encoding *encodingPtr); /* @@ -2481,9 +2476,9 @@ typedef struct ProcessGlobalValue { *---------------------------------------------------------------- */ -MODULE_SCOPE char * tclNativeExecutableName; -MODULE_SCOPE int tclFindExecutableSearchDone; -MODULE_SCOPE char * tclMemDumpFileName; +MODULE_SCOPE char *tclNativeExecutableName; +MODULE_SCOPE int tclFindExecutableSearchDone; +MODULE_SCOPE char *tclMemDumpFileName; MODULE_SCOPE TclPlatformType tclPlatform; MODULE_SCOPE Tcl_NotifierProcs tclNotifierHooks; @@ -2492,9 +2487,9 @@ MODULE_SCOPE Tcl_NotifierProcs tclNotifierHooks; * Data for the time hooks, if any. */ -MODULE_SCOPE Tcl_GetTimeProc* tclGetTimeProcPtr; -MODULE_SCOPE Tcl_ScaleTimeProc* tclScaleTimeProcPtr; -MODULE_SCOPE ClientData tclTimeClientData; +MODULE_SCOPE Tcl_GetTimeProc *tclGetTimeProcPtr; +MODULE_SCOPE Tcl_ScaleTimeProc *tclScaleTimeProcPtr; +MODULE_SCOPE ClientData tclTimeClientData; /* * Variables denoting the Tcl object types defined in the core. @@ -2550,7 +2545,6 @@ MODULE_SCOPE long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS]; MODULE_SCOPE char * tclEmptyStringRep; MODULE_SCOPE char tclEmptyString; - /* *---------------------------------------------------------------- * Procedures shared among Tcl modules but not used by the outside world, @@ -2577,21 +2571,20 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; *---------------------------------------------------------------- */ -MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); - -MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, +MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); -MODULE_SCOPE void TclArgumentEnter(Tcl_Interp* interp, - Tcl_Obj* objv[], int objc, CmdFrame* cf); -MODULE_SCOPE void TclArgumentRelease(Tcl_Interp* interp, - Tcl_Obj* objv[], int objc); -MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp* interp, - void* codePtr, CmdFrame* cfPtr); -MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp* interp, - void* codePtr); -MODULE_SCOPE void TclArgumentGet(Tcl_Interp* interp, Tcl_Obj* obj, - CmdFrame** cfPtrPtr, int* wordPtr); +MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp, + Tcl_Obj *objv[], int objc, CmdFrame *cf); +MODULE_SCOPE void TclArgumentRelease(Tcl_Interp *interp, + Tcl_Obj *objv[], int objc); +MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp *interp, + void *codePtr, CmdFrame *cfPtr); +MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp *interp, + void *codePtr); +MODULE_SCOPE void TclArgumentGet(Tcl_Interp *interp, Tcl_Obj *obj, + CmdFrame **cfPtrPtr, int *wordPtr); MODULE_SCOPE int TclArraySet(Tcl_Interp *interp, Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj); MODULE_SCOPE double TclBignumToDouble(mp_int *bignum); @@ -2602,14 +2595,14 @@ MODULE_SCOPE double TclCeil(mp_int *a); MODULE_SCOPE int TclCheckBadOctal(Tcl_Interp *interp,const char *value); MODULE_SCOPE int TclChanCaughtErrorBypass(Tcl_Interp *interp, Tcl_Channel chan); -MODULE_SCOPE int TclClearRootEnsemble(ClientData data[], - Tcl_Interp *interp, int result); +MODULE_SCOPE int TclClearRootEnsemble(ClientData data[], + Tcl_Interp *interp, int result); MODULE_SCOPE void TclCleanupLiteralTable(Tcl_Interp *interp, LiteralTable *tablePtr); MODULE_SCOPE int TclDoubleDigits(char *buf, double value, int *signum); -MODULE_SCOPE void TclDeleteNamespaceVars(Namespace *nsPtr); +MODULE_SCOPE void TclDeleteNamespaceVars(Namespace *nsPtr); /* TIP #280 - Modified token based evulation, with line information */ -MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script, +MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script, int numBytes, int flags, int line); MODULE_SCOPE int TclFileAttrsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -2644,7 +2637,7 @@ MODULE_SCOPE double TclFloor(mp_int *a); MODULE_SCOPE void TclFormatNaN(double value, char *buffer); MODULE_SCOPE int TclFSFileAttrIndex(Tcl_Obj *pathPtr, const char *attributeName, int *indexPtr); -MODULE_SCOPE int * TclGetAsyncReadyPtr(void); +MODULE_SCOPE int * TclGetAsyncReadyPtr(void); MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp); MODULE_SCOPE int TclGetChannelFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Channel *chanPtr, @@ -2694,7 +2687,7 @@ MODULE_SCOPE Tcl_Obj * TclLindexList(Tcl_Interp *interp, MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, int indexCount, Tcl_Obj *const indexArray[]); /* TIP #280 */ -MODULE_SCOPE void TclListLines(const char *listStr, int line, int n, +MODULE_SCOPE void TclListLines(const char *listStr, int line, int n, int *lines); MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr); MODULE_SCOPE int TclLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, @@ -2710,16 +2703,16 @@ MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name, const EnsembleImplMap map[]); -MODULE_SCOPE int TclMarkList(Tcl_Interp *interp, const char *list, +MODULE_SCOPE int TclMarkList(Tcl_Interp *interp, const char *list, const char *end, int *argcPtr, const int **argszPtr, const char ***argvPtr); MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr, int *codePtr, int *levelPtr); MODULE_SCOPE int TclNokia770Doubles(); -MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr, - Tcl_Obj *part2Ptr, const char *operation, - const char *reason, int index); +MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr, + Tcl_Obj *part2Ptr, const char *operation, + const char *reason, int index); MODULE_SCOPE int TclObjInvokeNamespace(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Namespace *nsPtr, int flags); @@ -2772,14 +2765,14 @@ MODULE_SCOPE void TclpNativeJoinPath(Tcl_Obj *prefix, char *joining); MODULE_SCOPE Tcl_Obj * TclpNativeSplitPath(Tcl_Obj *pathPtr, int *lenPtr); MODULE_SCOPE Tcl_PathType TclpGetNativePathType(Tcl_Obj *pathPtr, int *driveNameLengthPtr, Tcl_Obj **driveNameRef); -MODULE_SCOPE int TclCrossFilesystemCopy(Tcl_Interp *interp, +MODULE_SCOPE int TclCrossFilesystemCopy(Tcl_Interp *interp, Tcl_Obj *source, Tcl_Obj *target); MODULE_SCOPE int TclpMatchInDirectory(Tcl_Interp *interp, Tcl_Obj *resultPtr, Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types); MODULE_SCOPE ClientData TclpGetNativeCwd(ClientData clientData); MODULE_SCOPE Tcl_FSDupInternalRepProc TclNativeDupInternalRep; -MODULE_SCOPE Tcl_Obj* TclpObjLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr, +MODULE_SCOPE Tcl_Obj * TclpObjLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkType); MODULE_SCOPE int TclpObjChdir(Tcl_Obj *pathPtr); MODULE_SCOPE Tcl_Obj * TclPathPart(Tcl_Interp *interp, Tcl_Obj *pathPtr, @@ -2830,7 +2823,7 @@ MODULE_SCOPE int TclpDlopen(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_FSUnloadFileProc **unloadProcPtr); MODULE_SCOPE int TclpUtime(Tcl_Obj *pathPtr, struct utimbuf *tval); #ifdef TCL_LOAD_FROM_MEMORY -MODULE_SCOPE void* TclpLoadMemoryGetBuffer(Tcl_Interp *interp, int size); +MODULE_SCOPE void * TclpLoadMemoryGetBuffer(Tcl_Interp *interp, int size); MODULE_SCOPE int TclpLoadMemory(Tcl_Interp *interp, void *buffer, int size, int codeSize, Tcl_LoadHandle *loadHandle, Tcl_FSUnloadFileProc **unloadProcPtr); @@ -2844,11 +2837,11 @@ MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks); #endif MODULE_SCOPE Tcl_Obj * TclDisassembleByteCodeObj(Tcl_Obj *objPtr); -MODULE_SCOPE void * TclpThreadCreateKey(void); -MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); -MODULE_SCOPE void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr); -MODULE_SCOPE void * TclpThreadGetMasterTSD(void *tsdKeyPtr); - +MODULE_SCOPE void * TclpThreadCreateKey(void); +MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); +MODULE_SCOPE void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr); +MODULE_SCOPE void * TclpThreadGetMasterTSD(void *tsdKeyPtr); + /* *---------------------------------------------------------------- * Command procedures in the generic core: @@ -3200,10 +3193,10 @@ MODULE_SCOPE int TclCompileLsetCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileNamespaceCmd(Tcl_Interp *interp, - Tcl_Parse *parsePtr, Command *cmdPtr, + Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileNoOp(Tcl_Interp *interp, - Tcl_Parse *parsePtr, Command *cmdPtr, + Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileRegexpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, @@ -3233,10 +3226,10 @@ MODULE_SCOPE int TclCompileSwitchCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileUpvarCmd(Tcl_Interp *interp, - Tcl_Parse *parsePtr, Command *cmdPtr, + Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileVariableCmd(Tcl_Interp *interp, - Tcl_Parse *parsePtr, Command *cmdPtr, + Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileWhileCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, @@ -3389,7 +3382,7 @@ MODULE_SCOPE int TclCompileStreqOpCmd(Tcl_Interp *interp, MODULE_SCOPE Var * TclObjLookupVarEx(Tcl_Interp * interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags, - const char * msg, const int createPart1, + const char *msg, const int createPart1, const int createPart2, Var **arrayPtrPtr); MODULE_SCOPE Var * TclLookupArrayElement(Tcl_Interp *interp, Tcl_Obj *arrayNamePtr, Tcl_Obj *elNamePtr, @@ -3407,8 +3400,8 @@ MODULE_SCOPE Tcl_Obj * TclPtrIncrObjVar(Tcl_Interp *interp, Var *varPtr, Var *arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr, const int flags, int index); -MODULE_SCOPE int TclPtrObjMakeUpvar(Tcl_Interp *interp, Var *otherPtr, - Tcl_Obj *myNamePtr, int myFlags, int index); +MODULE_SCOPE int TclPtrObjMakeUpvar(Tcl_Interp *interp, Var *otherPtr, + Tcl_Obj *myNamePtr, int myFlags, int index); MODULE_SCOPE void TclInvalidateNsPath(Namespace *nsPtr); /* @@ -3472,10 +3465,10 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr); #endif /* TCL_COMPILE_STATS */ # define TclAllocObjStorage(objPtr) \ - TclAllocObjStorageEx(NULL, (objPtr)) + TclAllocObjStorageEx(NULL, (objPtr)) # define TclFreeObjStorage(objPtr) \ - TclFreeObjStorageEx(NULL, (objPtr)) + TclFreeObjStorageEx(NULL, (objPtr)) #ifndef TCL_MEM_DEBUG # define TclNewObj(objPtr) \ @@ -3495,19 +3488,19 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr); */ # define TclDecrRefCount(objPtr) \ - if (--(objPtr)->refCount > 0) ; else { \ - if (!(objPtr)->typePtr || !(objPtr)->typePtr->freeIntRepProc) { \ - TCL_DTRACE_OBJ_FREE(objPtr); \ - if ((objPtr)->bytes \ - && ((objPtr)->bytes != tclEmptyStringRep)) { \ - ckfree((char *) (objPtr)->bytes); \ - } \ - (objPtr)->length = -1; \ - TclFreeObjStorage(objPtr); \ - TclIncrObjsFreed(); \ - } else { \ - TclFreeObj(objPtr); \ - } \ + if (--(objPtr)->refCount > 0) ; else { \ + if (!(objPtr)->typePtr || !(objPtr)->typePtr->freeIntRepProc) { \ + TCL_DTRACE_OBJ_FREE(objPtr); \ + if ((objPtr)->bytes \ + && ((objPtr)->bytes != tclEmptyStringRep)) { \ + ckfree((char *) (objPtr)->bytes); \ + } \ + (objPtr)->length = -1; \ + TclFreeObjStorage(objPtr); \ + TclIncrObjsFreed(); \ + } else { \ + TclFreeObj(objPtr); \ + } \ } #if defined(PURIFY) @@ -3519,10 +3512,10 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr); * track memory leaks */ -# define TclAllocObjStorageEx(interp, objPtr) \ +# define TclAllocObjStorageEx(interp, objPtr) \ (objPtr) = (Tcl_Obj *) Tcl_Alloc(sizeof(Tcl_Obj)) -# define TclFreeObjStorageEx(interp, objPtr) \ +# define TclFreeObjStorageEx(interp, objPtr) \ ckfree((char *) (objPtr)) #undef USE_THREAD_ALLOC @@ -3641,15 +3634,14 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr); */ #define TclInitStringRep(objPtr, bytePtr, len) \ - if ((len) == 0) { \ - (objPtr)->bytes = tclEmptyStringRep; \ - (objPtr)->length = 0; \ - } else { \ - (objPtr)->bytes = (char *) ckalloc((unsigned) ((len) + 1)); \ - memcpy((void *) (objPtr)->bytes, (void *) (bytePtr), \ - (unsigned) (len)); \ - (objPtr)->bytes[len] = '\0'; \ - (objPtr)->length = (len); \ + if ((len) == 0) { \ + (objPtr)->bytes = tclEmptyStringRep; \ + (objPtr)->length = 0; \ + } else { \ + (objPtr)->bytes = (char *) ckalloc((unsigned) ((len) + 1)); \ + memcpy((objPtr)->bytes, (bytePtr), (unsigned) (len)); \ + (objPtr)->bytes[len] = '\0'; \ + (objPtr)->length = (len); \ } /* @@ -3667,7 +3659,6 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr); #define TclGetString(objPtr) \ ((objPtr)->bytes? (objPtr)->bytes : Tcl_GetString((objPtr))) - #define TclGetStringFromObj(objPtr, lenPtr) \ ((objPtr)->bytes \ ? (*(lenPtr) = (objPtr)->length, (objPtr)->bytes) \ @@ -3699,18 +3690,18 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr); */ #define TclInvalidateStringRep(objPtr) \ - if (objPtr->bytes != NULL) { \ - if (objPtr->bytes != tclEmptyStringRep) {\ - ckfree((char *) objPtr->bytes);\ - }\ - objPtr->bytes = NULL;\ - }\ + if (objPtr->bytes != NULL) { \ + if (objPtr->bytes != tclEmptyStringRep) { \ + ckfree((char *) objPtr->bytes); \ + } \ + objPtr->bytes = NULL; \ + } /* *---------------------------------------------------------------- - * Macros used by the Tcl core to grow Tcl_Token arrays. They use - * the same growth algorithm as used in tclStringObj.c for growing - * strings. The ANSI C "prototype" for this macro is: + * Macros used by the Tcl core to grow Tcl_Token arrays. They use the same + * growth algorithm as used in tclStringObj.c for growing strings. The ANSI C + * "prototype" for this macro is: * * MODULE_SCOPE void TclGrowTokenArray(Tcl_Token *tokenPtr, int used, * int available, int append, @@ -3731,16 +3722,16 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr); if (oldPtr == (staticPtr)) { \ oldPtr = NULL; \ } \ - newPtr = (Tcl_Token *) attemptckrealloc( (char *) oldPtr, \ - (unsigned int) (allocated * sizeof(Tcl_Token))); \ + newPtr = (Tcl_Token *) attemptckrealloc((char *) oldPtr, \ + (unsigned) (allocated * sizeof(Tcl_Token))); \ if (newPtr == NULL) { \ allocated = needed + (append) + TCL_MIN_TOKEN_GROWTH; \ - newPtr = (Tcl_Token *) ckrealloc( (char *) oldPtr, \ - (unsigned int) (allocated * sizeof(Tcl_Token))); \ + newPtr = (Tcl_Token *) ckrealloc((char *) oldPtr, \ + (unsigned) (allocated * sizeof(Tcl_Token))); \ } \ (available) = allocated; \ if (oldPtr == NULL) { \ - memcpy((VOID *) newPtr, (VOID *) staticPtr, \ + memcpy(newPtr, staticPtr, \ (size_t) ((used) * sizeof(Tcl_Token))); \ } \ (tokenPtr) = newPtr; \ @@ -3756,7 +3747,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr); *---------------------------------------------------------------- * Macro used by the Tcl core get a unicode char from a utf string. It checks * to see if we have a one-byte utf char before calling the real - * Tcl_UtfToUniChar, as this will save a lot of time for primarily ascii + * Tcl_UtfToUniChar, as this will save a lot of time for primarily ASCII * string handling. The macro's expression result is 1 for the 1-byte case or * the result of Tcl_UtfToUniChar. The ANSI C "prototype" for this macro is: * @@ -3941,7 +3932,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, TCL_DTRACE_OBJ_CREATE(objPtr) #else /* TCL_MEM_DEBUG */ -#define TclNewIntObj(objPtr, i) \ +#define TclNewIntObj(objPtr, i) \ (objPtr) = Tcl_NewIntObj(i) #define TclNewLongObj(objPtr, l) \ @@ -3974,21 +3965,21 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, */ #ifdef _MSC_VER -# define TclIsInfinite(d) ( ! (_finite((d))) ) +# define TclIsInfinite(d) (!(_finite((d)))) # define TclIsNaN(d) (_isnan((d))) #else -# define TclIsInfinite(d) ( (d) > DBL_MAX || (d) < -DBL_MAX ) +# define TclIsInfinite(d) ((d) > DBL_MAX || (d) < -DBL_MAX) # ifdef NO_ISNAN -# define TclIsNaN(d) ((d) != (d)) +# define TclIsNaN(d) ((d) != (d)) # else -# define TclIsNaN(d) (isnan(d)) +# define TclIsNaN(d) (isnan(d)) # endif #endif /* * ---------------------------------------------------------------------- - * Macro to use to find the offset of a field in a structure. - * Computes number of bytes from beginning of structure to a given field. + * Macro to use to find the offset of a field in a structure. Computes number + * of bytes from beginning of structure to a given field. */ #ifdef offsetof @@ -4042,11 +4033,10 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, ((limit).granularityTicker % (limit).timeGranularity == 0)))\ ? 1 : 0))) - /* *---------------------------------------------------------------- - * Allocator for small structs (<=sizeof(Tcl_Obj)) using the Tcl_Obj - * pool. Only checked at compile time. + * Allocator for small structs (<=sizeof(Tcl_Obj)) using the Tcl_Obj pool. + * Only checked at compile time. * * ONLY USE FOR CONSTANT nBytes: if you do and nBytes is too large, the * compiler will error out with "duplicate case value" (thanks dkf!). If the @@ -4113,8 +4103,8 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, *---------------------------------------------------------------- */ -#define NRE_USE_SMALL_ALLOC 1 /* Only turn off for debugging purposes. */ -#define NRE_ENABLE_ASSERTS 1 +#define NRE_USE_SMALL_ALLOC 1 /* Only turn off for debugging purposes. */ +#define NRE_ENABLE_ASSERTS 1 /* * This is the main data struct for representing NR commands. It is designed @@ -4154,10 +4144,12 @@ typedef struct TEOV_callback { } #if NRE_USE_SMALL_ALLOC -#define TCLNR_ALLOC(interp, ptr) TclSmallAllocEx(interp, sizeof(TEOV_callback), (ptr)) +#define TCLNR_ALLOC(interp, ptr) \ + TclSmallAllocEx(interp, sizeof(TEOV_callback), (ptr)) #define TCLNR_FREE(interp, ptr) TclSmallFreeEx((interp), (ptr)) #else -#define TCLNR_ALLOC(interp, ptr) (ptr = ((ClientData) ckalloc(sizeof(TEOV_callback)))) +#define TCLNR_ALLOC(interp, ptr) \ + (ptr = ((ClientData) ckalloc(sizeof(TEOV_callback)))) #define TCLNR_FREE(interp, ptr) ckfree((char *) (ptr)) #endif @@ -4167,8 +4159,6 @@ typedef struct TEOV_callback { #define NRE_ASSERT(expr) #endif - - #include "tclPort.h" #include "tclIntDecls.h" #include "tclIntPlatDecls.h" diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 535f8cc..55f9200 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.175 2008/08/20 15:41:25 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.176 2008/08/23 11:35:54 dkf Exp $ */ #include "tclInt.h" @@ -6009,7 +6009,7 @@ TclMakeEnsemble( TclNewObj(mapDict); for (i=0 ; map[i].name != NULL ; i++) { Tcl_Obj *fromObj, *toObj; - Command *cmdPtr; + register Command *cmdPtr; fromObj = Tcl_NewStringObj(map[i].name, -1); TclNewStringObj(toObj, Tcl_DStringValue(&buf), @@ -6019,6 +6019,7 @@ TclMakeEnsemble( cmdPtr = (Command *) Tcl_CreateObjCommand(interp, TclGetString(toObj), map[i].proc, NULL, NULL); cmdPtr->compileProc = map[i].compileProc; + cmdPtr->nreProc = map[i].nreProc; compile |= (map[i].compileProc != NULL); } Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict); -- cgit v0.12 From 4f50d303e2352deed7b6020a08a095466f6306b8 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 23 Aug 2008 18:53:09 +0000 Subject: * generic/tclBasic.c: Removed unused var; fixed function * generic/tclOOInt.h: pointer declarations (why did gcc start * generic/tclOOMethod.c: complaining all of a sudden?) * generic/tclProc.c: --- ChangeLog | 7 +++++++ generic/tclBasic.c | 4 +--- generic/tclOOInt.h | 4 ++-- generic/tclOOMethod.c | 4 ++-- generic/tclProc.c | 4 ++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index c087901..c70f1d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-23 Miguel Sofer + + * generic/tclBasic.c: Removed unused var; fixed function + * generic/tclOOInt.h: pointer declarations (why did gcc start + * generic/tclOOMethod.c: complaining all of a sudden?) + * generic/tclProc.c: + 2008-08-23 Donal K. Fellows * generic/tclInt.h (EnsembleImplMap): Added extra field to make it diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 30631a5..3eb9908 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.361 2008/08/23 01:48:25 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.362 2008/08/23 18:53:09 msofer Exp $ */ #include "tclInt.h" @@ -8159,8 +8159,6 @@ static void PlugCoroutineChains( CoroutineData *corPtr) { - Tcl_Interp *interp = corPtr->eePtr->interp; - /* * Called to plug the coroutine's running environment into the caller's, * so that the frame chains are uninterrupted. Note that the levels and diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 6b10a40..056091d 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.6 2008/07/31 14:43:47 msofer Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.7 2008/08/23 18:53:11 msofer Exp $ */ #include @@ -76,7 +76,7 @@ typedef struct ProcedureMethod { ClientData clientData; TclOO_PmCDDeleteProc deleteClientdataProc; TclOO_PmCDCloneProc cloneClientdataProc; - ProcErrorProc errProc; /* Replacement error handler. */ + ProcErrorProc *errProc; /* Replacement error handler. */ TclOO_PreCallProc preCallProc; /* Callback to allow for additional setup * before the method executes. */ diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 67d67b5..75aef73 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.16 2008/08/21 10:36:57 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.17 2008/08/23 18:53:12 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -37,7 +37,7 @@ struct PNI { typedef struct { CallFrame *framePtr; /* Reference to the call frame itself (it's * actually allocated on the Tcl stack). */ - ProcErrorProc errProc; /* The error handler for the body. */ + ProcErrorProc *errProc; /* The error handler for the body. */ Tcl_Obj *nameObj; /* The "name" of the command. */ Command cmd; /* The command structure. Mostly bogus. */ ExtraFrameInfo efi; /* Extra information used for [info frame]. */ diff --git a/generic/tclProc.c b/generic/tclProc.c index 9b28fd5..bfe5891 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.162 2008/08/21 14:02:23 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.163 2008/08/23 18:53:12 msofer Exp $ */ #include "tclInt.h" @@ -1805,7 +1805,7 @@ InterpProcNR2( Proc *procPtr = iPtr->varFramePtr->procPtr; CallFrame *freePtr; Tcl_Obj *procNameObj = data[0]; - ProcErrorProc errorProc = data[1]; + ProcErrorProc *errorProc = data[1]; if (TCL_DTRACE_PROC_RETURN_ENABLED()) { int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; -- cgit v0.12 From 10f7f38db3ef37ee4c00c76e7c70b63a5b1eefb8 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 24 Aug 2008 14:38:06 +0000 Subject: NRE-enable non-compiled [foreach]. [Bug 2017632] --- ChangeLog | 85 ++++++++------- generic/tclBasic.c | 4 +- generic/tclCmdAH.c | 309 +++++++++++++++++++++++++++++++++++------------------ generic/tclInt.h | 3 +- 4 files changed, 257 insertions(+), 144 deletions(-) diff --git a/ChangeLog b/ChangeLog index c70f1d1..bdbda13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-24 Donal K. Fellows + + * generic/tclCmdAH.c (TclNRForeachCmd): Converted the [foreach] + command to have an NRE-aware non-compiled implementation. Part of the + [Bug 2017632] project. Also restructured the code so as to manage its + temporary memory more efficiently. + 2008-08-23 Miguel Sofer * generic/tclBasic.c: Removed unused var; fixed function @@ -27,19 +34,19 @@ * changes: Updates for 8.6a2 release. - * generic/tcl.h: Drop use of USE_COMPAT85_CONST. That added - indirection without value. Use -DCONST86="" to engage source compat + * generic/tcl.h: Drop use of USE_COMPAT85_CONST. That added + indirection without value. Use -DCONST86="" to engage source compat support for code written for 8.5 headers. * generic/tclUtil.c (TclReToGlob): Added missing set of the - *exactPtr value to really fix [Bug 2065115]. Also avoid possible + *exactPtr value to really fix [Bug 2065115]. Also avoid possible DString overflow. * tests/regexpComp.test: Correct duplicate test names. 2008-08-21 Miguel Sofer * generic/tclBasic.c: Previous fix, now done right. - * generic/tclCmdIL.c: + * generic/tclCmdIL.c: * generic/tclInt.h: * tests/unsupported.test: @@ -55,7 +62,7 @@ * generic/tcl.decls: the use of CONST86_RETURN to support source code compatibility with Tcl 8.5 on those public routines passing (Tcl_Filesystem *), (Tcl_Timer *), and (Tcl_Objtype *) values which - have been const-ified. What remains is the minimum configurability + have been const-ified. What remains is the minimum configurability needed to support code written for pre-8.6 headers via the new -DUSE_COMPAT85_CONST compiler directive. *** POTENTIAL INCOMPATIBILITY *** @@ -178,7 +185,7 @@ 2008-08-08 Don Porter S * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check - for bytecode validity. [Bug 2037727] + for bytecode validity. [Bug 2037727] * generic/tclProc.c (TclProcCompileProc): On recompile of a proc, clear away any entries on the CompiledLocal list from the @@ -365,9 +372,9 @@ * generic/tclBasic.c: Revised timing of the CmdFrame stack management * tests/info.test: in TclEvalEx so that the CmdFrame will still be on the stack at the time Tcl_LogCommandInfo is called to append - another level of -errorinfo information. Sets the stage to add - file and line data to the stack trace. Added test to check that - [info frame] functioning remains unchanged by the revision. + another level of -errorinfo information. Sets the stage to add file + and line data to the stack trace. Added test to check that [info + frame] functioning remains unchanged by the revision. 2008-07-31 Miguel Sofer @@ -961,7 +968,7 @@ * generic/tclPathObj.c: Fixed some internals management in the "path" Tcl_ObjType for the empty string value. Problem led to a crash in the - command [glob -dir {} a]. [Bug 1999176]. + command [glob -dir {} a]. [Bug 1999176] 2008-06-24 Pat Thoyts @@ -1475,7 +1482,7 @@ 2008-04-14 Kevin B. Kenny * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use of - 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197]. + 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197] * tests/clock.test (clock-33.5, clock-33.5a, clock-33.8, clock-33.8a): Added comments to the test that it can fail on a heavily loaded @@ -1512,10 +1519,10 @@ * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Added checking of -size value * tests/ioCmd.test (iocmd-15.{13,14}): to reject negative values, and - values overflowing 32-bit signed. [Bug 1557855]. Basic patch by - Alexandre Ferrieux , with - modifications from me to separate overflow from true negative value. - Extended testsuite. + values overflowing 32-bit signed. Basic patch by Alexandre Ferrieux + , with modifications from me to + separate overflow from true negative value. Extended testsuite. [Bug + 1557855] 2008-04-09 Daniel Steffen @@ -1549,8 +1556,8 @@ * generic/tclIO.c (BUSY_STATE, CheckChannelErrors, TclCopyChannel): New macro, and the places using it. This change allows for - bi-directional fcopy on channels. [Bug 1350564]. Thanks to Alexandre - Ferrieux for the patch. + bi-directional fcopy on channels. Thanks to Alexandre Ferrieux + for the patch. [Bug 1350564] 2008-04-07 Reinhard Max @@ -1664,7 +1671,7 @@ * generic/tclBasic.c: Revised stubs-generation tool and interp * tools/genStubs.tcl: creation so that "tclStubsPtr" is not present * unix/Makefile.in: in libtcl.so, but is present only in - * win/Makefile.in: libtclstub.a. This tightens up the rules for + * win/Makefile.in: libtclstub.a. This tightens up the rules for * win/makefile.bc: users of the stubs interfaces. [Bug 1819422] * win/makefile.vc: @@ -1802,10 +1809,10 @@ 2008-03-18 Andreas Kupries * library/tm.tcl (::tcl::tm::Defaults): Modified handling of - environment variables. See [Bug 1914604]. Solution slightly different - than proposed in the report. Using the underscored form TCLX_y_TM_PATH - even if TCLX.y_TM_PATH exists. Also using a loop to cut prevent code - replication. + environment variables. Solution slightly different than proposed in + the report. Using the underscored form TCLX_y_TM_PATH even if + TCLX.y_TM_PATH exists. Also using a loop to cut prevent code + replication. [Bug 1914604] 2008-03-16 Donal K. Fellows @@ -1992,7 +1999,7 @@ * generic/tclResult.c (Tcl_SetReturnOptions): Revised the refcount management of Tcl_SetReturnOptions to become that of a conventional - Consumer routine. Thanks to Peter Spjuth for pointing out the + Consumer routine. Thanks to Peter Spjuth for pointing out the difficulties calling Tcl_SetReturnOptions with non-0-count value for options. * generic/tclExecute.c (INST_RETURN_STK): Revised the one caller @@ -2018,7 +2025,7 @@ * unix/tclUnixChan.c, unix/tclUnixNotfy.c, unix/tclUnixPipe.c: Consolidate all code conditionalized on -DUSE_FIONBIO into one place. * unix/tclUnixPort.h, unix/tclUnixCompat.c: New routine - TclUnixSetBlockingMode() [Patch 1903339]. + TclUnixSetBlockingMode(). [Patch 1903339] 2008-02-28 Don Porter @@ -2059,7 +2066,7 @@ * generic/tclIOUtil.c, unix/tclUnixPort.h, unix/tclUnixChan.c: Remove dead/unused portability-related #defines and unused conditional - code. See [Patch 1901828] for discussion. + code. See [Patch 1901828] for discussion. 2008-02-26 Joe English @@ -2319,7 +2326,7 @@ 2007-12-21 Miguel Sofer - * generic/tclCmdIL.c: Speed patch for lsort [Patch 1856994]. + * generic/tclCmdIL.c: Speed patch for lsort. [Patch 1856994] 2007-12-21 Miguel Sofer @@ -2343,8 +2350,8 @@ * generic/tclCompCmds.c (TclCompileSwitchCmd): update switch -regexp * tests/switch.test-14.*: compilation to pass - the cflags to INST_REGEXP (changed on 12-07). Added tests for - switch -regexp compilation (need more). [Bug 1854399] + the cflags to INST_REGEXP (changed on 12-07). Added tests for switch + -regexp compilation (need more). [Bug 1854399] 2007-12-18 Don Porter @@ -2396,8 +2403,8 @@ 2007-12-12 Don Porter * doc/IntObj.3: Update docs for the Tcl_GetBignumAndClearObj() -> - Tcl_TakeBignumFromObj() revision [TIP 298]. Added docs for the - Tcl_InitBignumFromDouble() routine. [Bug 1446971]. + Tcl_TakeBignumFromObj() revision [TIP 298]. Added docs for the + Tcl_InitBignumFromDouble() routine. [Bug 1446971] * changes: Updated for 8.5.0 release. @@ -2472,11 +2479,11 @@ 2007-12-06 Don Porter * README: Remove mention of dead comp.lang.tcl.announce - newsgroup. [Bug 1846433]. + newsgroup. [Bug 1846433] * unix/README: Mention the stub library created by `make` and warn about the effect of embedded paths in the installed binaries. - Thanks to Larry Virden. [Bug 1794084] + Thanks to Larry Virden. [Bug 1794084] * doc/AddErrInfo.3: Documentation for the new routines in TIP 270. * doc/Interp.3: @@ -2509,7 +2516,7 @@ 2007-12-05 Jeff Hobbs * generic/tclIO.h: Create Tcl_Obj for Tcl channels to reduce - * generic/tclIO.c: overhead in lookup by Tcl_GetChannel. New + * generic/tclIO.c: overhead in lookup by Tcl_GetChannel. New * generic/tclIOCmd.c: TclGetChannelFromObj for internal use. * generic/tclIO.c (WriteBytes, WriteChars): add opt check to avoid EOL translation when not linebuffered or using lf. [Bug 1845092] @@ -4910,8 +4917,8 @@ * library/msgs/ja.msg: * tools/loadICU.tcl: Corrected several localisation faults in the Japanese locale (most notably, incorrect dates for the Emperors' - eras). [Bug 1637471]. Many thanks to SourceForge user 'nyademo' for - pointing this out and developing a fix. + eras). Many thanks to SourceForge user 'nyademo' for pointing this out + and developing a fix. [Bug 1637471] * generic/tclPathObj.c: Corrected a 'const'ness fault that caused bitter complaints from MSVC. * tests/clock.test (clock-40.1, clock-58.1, clock-59.1): Corrected a @@ -5987,7 +5994,7 @@ * tests/event.test (event-14.*): Corrected a bug where TclUnixWaitForFile would present select() with the wrong mask on an LP64 machine if a fd number exceeds 32. Thanks to Jean-Luc Fontaine - for reporting and diagnosing [Bug 1602208]. + for reporting and diagnosing. [Bug 1602208] 2006-11-27 Don Porter @@ -7496,9 +7503,9 @@ * generic/tclProc.c (ProcCompileProc): When a bump of the compile epoch forces the re-compile of a proc body, take care not to overwrite - any Proc struct that may be referred to on the active call stack. This - fixes [Bug 1482718]. Note that the fix will not be effective for code - that calls the private routine TclProcCompileProc() directly. + any Proc struct that may be referred to on the active call stack. Note + that the fix will not be effective for code that calls the private + routine TclProcCompileProc() directly. [Bug 1482718] 2006-05-13 Daniel Steffen diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3eb9908..68b32bb 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.362 2008/08/23 18:53:09 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.363 2008/08/24 14:38:08 dkf Exp $ */ #include "tclInt.h" @@ -177,7 +177,7 @@ static const CmdInfo builtInCmds[] = { {"eval", Tcl_EvalObjCmd, NULL, NULL, 1}, {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, NULL, 1}, {"for", Tcl_ForObjCmd, TclCompileForCmd, TclNRForObjCmd, 1}, - {"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, NULL, 1}, + {"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, TclNRForeachCmd, 1}, {"format", Tcl_FormatObjCmd, NULL, NULL, 1}, {"global", Tcl_GlobalObjCmd, TclCompileGlobalCmd, NULL, 1}, {"if", Tcl_IfObjCmd, TclCompileIfCmd, TclNRIfObjCmd, 1}, diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 8e26dcf..272cb20 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,13 +10,33 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.102 2008/08/17 19:37:11 msofer Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.103 2008/08/24 14:38:11 dkf Exp $ */ #include "tclInt.h" #include /* + * The state structure used by [foreach]. Note that the actual structure has + * all its working arrays appended afterwards so they can be allocated and + * freed in a single step. + */ + +struct ForeachState { + Tcl_Obj *bodyPtr; /* The script body of the command. */ + int bodyIdx; /* The argument index of the body. */ + int j, maxj; /* Number of loop iterations. */ + int numLists; /* Count of value lists. */ + int *index; /* Array of value list indices. */ + int *varcList; /* # loop variables per list. */ + Tcl_Obj ***varvList; /* Array of var name lists. */ + Tcl_Obj **vCopyList; /* Copies of var name list arguments. */ + int *argcList; /* Array of value list sizes. */ + Tcl_Obj ***argvList; /* Array of value lists. */ + Tcl_Obj **aCopyList; /* Copies of value list arguments. */ +}; + +/* * Prototypes for local procedures defined in this file: */ @@ -25,6 +45,10 @@ static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr, static int EncodingDirsObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +static inline int ForeachAssignments(Tcl_Interp *interp, + struct ForeachState *statePtr); +static inline void ForeachCleanup(Tcl_Interp *interp, + struct ForeachState *statePtr); static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_FSStatProc *statProc, Tcl_StatBuf *statPtr); static char * GetTypeFromMode(int mode); @@ -32,8 +56,7 @@ static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); static Tcl_NRPostProc CatchObjCmdCallback; static Tcl_NRPostProc ForNextCallback; - - +static Tcl_NRPostProc ForeachLoopStep; /* *---------------------------------------------------------------------- @@ -1639,7 +1662,6 @@ Tcl_ForObjCmd( return Tcl_NRCallObjProc(interp, TclNRForObjCmd, dummy, objc, objv); } - int TclNRForObjCmd( ClientData dummy, /* Not used. */ @@ -1760,7 +1782,7 @@ ForNextCallback( /* *---------------------------------------------------------------------- * - * Tcl_ForeachObjCmd -- + * Tcl_ForeachObjCmd, TclNRForeachCmd -- * * This object-based procedure is invoked to process the "foreach" Tcl * command. See the user documentation for details on what it does. @@ -1782,21 +1804,19 @@ Tcl_ForeachObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int result = TCL_OK; - int i; /* i selects a value list */ - int j, maxj; /* Number of loop iterations */ - int v; /* v selects a loop variable */ - int numLists = (objc-2)/2; /* Count of value lists */ - Tcl_Obj *bodyPtr; - Interp *iPtr = (Interp *) interp; + return Tcl_NRCallObjProc(interp, TclNRForeachCmd, dummy, objc, objv); +} - int *index; /* Array of value list indices */ - int *varcList; /* # loop variables per list */ - Tcl_Obj ***varvList; /* Array of var name lists */ - Tcl_Obj **vCopyList; /* Copies of var name list arguments */ - int *argcList; /* Array of value list sizes */ - Tcl_Obj ***argvList; /* Array of value lists */ - Tcl_Obj **aCopyList; /* Copies of value list arguments */ +int +TclNRForeachCmd( + ClientData dummy, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + int numLists = (objc-2) / 2; + register struct ForeachState *statePtr; + int i, j, result; if (objc < 4 || (objc%2 != 0)) { Tcl_WrongNumArgs(interp, 1, objv, @@ -1806,129 +1826,214 @@ Tcl_ForeachObjCmd( /* * Manage numList parallel value lists. - * argvList[i] is a value list counted by argcList[i]l; - * varvList[i] is the list of variables associated with the value list; - * varcList[i] is the number of variables associated with the value list; - * index[i] is the current pointer into the value list argvList[i]. + * statePtr->argvList[i] is a value list counted by statePtr->argcList[i]; + * statePtr->varvList[i] is the list of variables associated with the + * value list; + * statePtr->varcList[i] is the number of variables associated with the + * value list; + * statePtr->index[i] is the current pointer into the value list + * statePtr->argvList[i]. + * + * The setting up of all of these pointers is moderately messy, but allows + * the rest of this code to be simple and for us to use a single memory + * allocation for better performance. */ - index = (int *) TclStackAlloc(interp, 3 * numLists * sizeof(int)); - varcList = index + numLists; - argcList = varcList + numLists; - memset(index, 0, 3 * numLists * sizeof(int)); - - varvList = (Tcl_Obj ***) - TclStackAlloc(interp, 2 * numLists * sizeof(Tcl_Obj **)); - argvList = varvList + numLists; - memset(varvList, 0, 2 * numLists * sizeof(Tcl_Obj **)); - - vCopyList = (Tcl_Obj **) - TclStackAlloc(interp, 2 * numLists * sizeof(Tcl_Obj *)); - aCopyList = vCopyList + numLists; - memset(vCopyList, 0, 2 * numLists * sizeof(Tcl_Obj *)); + statePtr = TclStackAlloc(interp, + sizeof(struct ForeachState) + 3 * numLists * sizeof(int) + + 2 * numLists * (sizeof(Tcl_Obj **) + sizeof(Tcl_Obj *))); + memset(statePtr, 0, + sizeof(struct ForeachState) + 3 * numLists * sizeof(int) + + 2 * numLists * (sizeof(Tcl_Obj **) + sizeof(Tcl_Obj *))); + statePtr->varvList = (Tcl_Obj ***) (statePtr + 1); + statePtr->argvList = statePtr->varvList + numLists; + statePtr->vCopyList = (Tcl_Obj **) (statePtr->argvList + numLists); + statePtr->aCopyList = statePtr->vCopyList + numLists; + statePtr->index = (int *) (statePtr->aCopyList + numLists); + statePtr->varcList = statePtr->index + numLists; + statePtr->argcList = statePtr->varcList + numLists; + + statePtr->numLists = numLists; + statePtr->bodyPtr = objv[objc - 1]; + statePtr->bodyIdx = objc - 1; /* * Break up the value lists and variable lists into elements. */ - maxj = 0; for (i=0 ; ivCopyList[i] = TclListObjCopy(interp, objv[1+i*2]); + if (statePtr->vCopyList[i] == NULL) { result = TCL_ERROR; goto done; } - TclListObjGetElements(NULL, vCopyList[i], &varcList[i], &varvList[i]); - if (varcList[i] < 1) { + TclListObjGetElements(NULL, statePtr->vCopyList[i], + &statePtr->varcList[i], &statePtr->varvList[i]); + if (statePtr->varcList[i] < 1) { Tcl_AppendResult(interp, "foreach varlist is empty", NULL); result = TCL_ERROR; goto done; } - aCopyList[i] = TclListObjCopy(interp, objv[2+i*2]); - if (aCopyList[i] == NULL) { + statePtr->aCopyList[i] = TclListObjCopy(interp, objv[2+i*2]); + if (statePtr->aCopyList[i] == NULL) { result = TCL_ERROR; goto done; } - TclListObjGetElements(NULL, aCopyList[i], &argcList[i], &argvList[i]); + TclListObjGetElements(NULL, statePtr->aCopyList[i], + &statePtr->argcList[i], &statePtr->argvList[i]); - j = argcList[i] / varcList[i]; - if ((argcList[i] % varcList[i]) != 0) { + j = statePtr->argcList[i] / statePtr->varcList[i]; + if ((statePtr->argcList[i] % statePtr->varcList[i]) != 0) { j++; } - if (j > maxj) { - maxj = j; + if (j > statePtr->maxj) { + statePtr->maxj = j; } } /* - * Iterate maxj times through the lists in parallel. If some value lists - * run out of values, set loop vars to "" + * If there is any work to do, assign the variables and set things going + * non-recursively. */ - bodyPtr = objv[objc-1]; - for (j=0 ; jmaxj > 0) { + result = ForeachAssignments(interp, statePtr); + if (result == TCL_ERROR) { + goto done; + } - if (k < argcList[i]) { - valuePtr = argvList[i][k]; - } else { - valuePtr = Tcl_NewObj(); /* Empty string */ - } - varValuePtr = Tcl_ObjSetVar2(interp, varvList[i][v], NULL, - valuePtr, TCL_LEAVE_ERR_MSG); - if (varValuePtr == NULL) { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (setting foreach loop variable \"%s\")", - TclGetString(varvList[i][v]))); - result = TCL_ERROR; - goto done; - } - } + TclNRAddCallback(interp, ForeachLoopStep, statePtr, NULL, NULL, NULL); + return TclNREvalObjEx(interp, objv[objc-1], 0, + ((Interp *) interp)->cmdFramePtr, objc-1); + } + + /* + * This cleanup stage is only used when an error occurs during setup or if + * there is no work to do. + */ + + result = TCL_OK; + done: + ForeachCleanup(interp, statePtr); + return result; +} + +/* + * Post-body processing handler. + */ + +static int +ForeachLoopStep( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + register struct ForeachState *statePtr = data[0]; + + /* + * Process the result code from this run of the [foreach] body. Note that + * this switch uses fallthroughs in several places. Maintainer aware! + */ + + switch (result) { + case TCL_CONTINUE: + result = TCL_OK; + case TCL_OK: + break; + case TCL_BREAK: + result = TCL_OK; + goto done; + case TCL_ERROR: + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"foreach\" body line %d)", interp->errorLine)); + default: + goto done; + } + + /* + * Test if there is work still to be done. If so, do the next round of + * variable assignments, reschedule ourselves and run the body again. + */ + + if (statePtr->maxj > ++statePtr->j) { + result = ForeachAssignments(interp, statePtr); + if (result == TCL_ERROR) { + goto done; } - /* - * TIP #280. Make invoking context available to loop body. - */ + TclNRAddCallback(interp, ForeachLoopStep, statePtr, NULL, NULL, NULL); + return TclNREvalObjEx(interp, statePtr->bodyPtr, 0, + ((Interp *) interp)->cmdFramePtr, statePtr->bodyIdx); + } - result = TclEvalObjEx(interp, bodyPtr, 0, iPtr->cmdFramePtr, objc-1); - if (result != TCL_OK) { - if (result == TCL_CONTINUE) { - result = TCL_OK; - } else if (result == TCL_BREAK) { - result = TCL_OK; - break; - } else if (result == TCL_ERROR) { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"foreach\" body line %d)", - interp->errorLine)); - break; + /* + * We're done. Tidy up our work space and finish off. + */ + + Tcl_ResetResult(interp); + done: + ForeachCleanup(interp, statePtr); + return result; +} + +/* + * Factored out code to do the assignments in [foreach]. + */ + +static inline int +ForeachAssignments( + Tcl_Interp *interp, + struct ForeachState *statePtr) +{ + int i, v, k; + Tcl_Obj *valuePtr, *varValuePtr; + + for (i=0 ; inumLists ; i++) { + for (v=0 ; vvarcList[i] ; v++) { + k = statePtr->index[i]++; + + if (k < statePtr->argcList[i]) { + valuePtr = statePtr->argvList[i][k]; } else { - break; + TclNewObj(valuePtr); /* Empty string */ + } + + varValuePtr = Tcl_ObjSetVar2(interp, statePtr->varvList[i][v], + NULL, valuePtr, TCL_LEAVE_ERR_MSG); + + if (varValuePtr == NULL) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (setting foreach loop variable \"%s\")", + TclGetString(statePtr->varvList[i][v]))); + return TCL_ERROR; } } } - if (result == TCL_OK) { - Tcl_ResetResult(interp); - } - done: - for (i=0 ; inumLists ; i++) { + if (statePtr->vCopyList[i]) { + TclDecrRefCount(statePtr->vCopyList[i]); } - if (aCopyList[i]) { - Tcl_DecrRefCount(aCopyList[i]); + if (statePtr->aCopyList[i]) { + TclDecrRefCount(statePtr->aCopyList[i]); } } - TclStackFree(interp, vCopyList); /* Tcl_Obj * arrays */ - TclStackFree(interp, varvList); /* Tcl_Obj ** arrays */ - TclStackFree(interp, index); /* int arrays */ - return result; + TclStackFree(interp, statePtr); } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index f5b7ba5..f9a53a9 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.395 2008/08/23 11:35:52 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.396 2008/08/24 14:38:11 dkf Exp $ */ #ifndef _TCLINT @@ -2557,6 +2557,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRForeachCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; -- cgit v0.12 From 8b5d2c8a36daec851bfbc261d55c672a7afbc9bd Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 24 Aug 2008 14:42:41 +0000 Subject: Split off the ChangeLog entries for 2006-2007 into their own file. --- ChangeLog | 5921 +------------------------------------------------------- ChangeLog.2007 | 5921 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 5926 insertions(+), 5916 deletions(-) create mode 100644 ChangeLog.2007 diff --git a/ChangeLog b/ChangeLog index bdbda13..dd14c5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -451,7 +451,7 @@ * generic/tclProc.c: Uninit'd var warnings in TEBC with -O2, no * generic/tclTest.c: warnings otherwise. -2007-07-28 Jan Nijtmans +2008-07-28 Jan Nijtmans * doc/FileSystem.3: CONSTified many functions using * generic/tcl.decls: Tcl_FileSystem which all are supposed to be @@ -476,7 +476,7 @@ * generic/tclOOMethod.c (PushMethodCallFrame): Remove hack that should have gone when this code was merged into Tcl. -2007-07-27 Jan Nijtmans +2008-07-27 Jan Nijtmans * doc/Object.3: CONSTified 3 functions using Tcl_ObjType * doc/ObjectType.3: which all are supposed to be a constant, but @@ -517,7 +517,7 @@ to tcltest.tcl line number changes, remove knownBug constraint, fix expected result. [Bug 1605269] -2007-07-24 Jan Nijtmans +2008-07-24 Jan Nijtmans * doc/Notifier.3: CONSTified 4 functions in the Notifier which * doc/Thread.3: all have a Tcl_Time* in it which is supposed @@ -595,7 +595,7 @@ * generic/tclProc.c: * tests/info.test: -2007-07-21 Jan Nijtmans +2008-07-21 Jan Nijtmans * generic/*.c: fix [2021443] inconsistant "wrong # args" messages * win/tclWinReg.c @@ -2298,5919 +2298,8 @@ * unix/configure: autoconf (2.59) * win/configure: -2007-12-31 Donal K. Fellows - - * doc/dict.n: Clarified meaning of dictionary values following - discussion on comp.lang.tcl. - -2007-12-26 Miguel Sofer - - * generic/tclCmdIL.c: More [lsort] data handling streamlines. The - function MergeSort is gone, essentially inlined into Tcl_LsortObjCmd. - It is not a straight inlining, two loops over all lists elements where - merged in the process: the linked list elements are now built and - merged into the temporary sublists in the same pass. - -2007-12-25 Miguel Sofer - - * generic/tclCmdIL.c: More [lsort] data handling streamlines. Extra - mem reqs of latest patches removed, restored to previous mem profile. - Improved -unique handling, now eliminating repeated elems immediately - instead of marking them to avoid reinsertion at the end. - -2007-12-23 Jeff Hobbs - - * generic/tclCompCmds.c (TclCompileRegexpCmd): TCL_REG_NOSUB cannot - * tests/regexp.test (regexp-22.2): be used because it - * tests/regexpComp.test: [Bug 1857126] disallows backrefs. - -2007-12-21 Miguel Sofer - - * generic/tclCmdIL.c: Speed patch for lsort. [Patch 1856994] - -2007-12-21 Miguel Sofer - - * generic/tclCmdIL.c (Tcl_LsortObjCmd, Tcl_LsearchObjCmd): Avoid - calling SelectObjFromSublist when there are no sublists. - -2007-12-21 Miguel Sofer - - * generic/tclCmdIL.c (Tcl_LsortObjCmd): Preallocate a listObj of - sufficient length for the sorted list instead of growing it. Second - commit replaces calls to Tcl_ListObjAppenElement with direct access to - the internal rep. - -2007-12-19 Don Porter - - *** 8.5.0 TAGGED FOR RELEASE *** - - * changes: Updated for 8.5.0 release. - -2007-12-19 Jeff Hobbs - - * generic/tclCompCmds.c (TclCompileSwitchCmd): update switch -regexp - * tests/switch.test-14.*: compilation to pass - the cflags to INST_REGEXP (changed on 12-07). Added tests for switch - -regexp compilation (need more). [Bug 1854399] - -2007-12-18 Don Porter - - * changes: Updated for 8.5.0 release. - -2007-12-18 Donal K. Fellows - - * generic/regguts.h, generic/regc_color.c, generic/regc_nfa.c: - Fixes for problems created when processing regular expressions that - generate very large automata. An enormous number of thanks to Will - Drewry , Tavis Ormandy , - and Tom Lane from the Postgresql crowd for - their help in tracking these problems down. [Bug 1810264] - -2007-12-17 Don Porter - - * changes: Updated for 8.5.0 release. - -2007-12-17 Miguel Sofer - - * generic/tclAlloc.c: - * generic/tclExecute.c: - * generic/tclInt.h: - * generic/tclThreadAlloc.c: Fix alignment for memory returned by - TclStackAlloc; insure that all memory allocators align to 16-byte - boundaries on 64 bit platforms [Bug 1851832, 1851524] - -2007-12-14 Jeff Hobbs - - * generic/tclIOUtil.c (FsAddMountsToGlobResult): fix the tail - conversion of vfs mounts. [Bug 1602539] - - * win/README: updated notes - -2007-12-14 Pat Thoyts - - * tests/winFile.test: Fixed tests for win2k with long machine name - -2007-12-14 Pat Thoyts - - * win/nmakehlp.c: Support compilation with MSVC9 for AMD64. - * win/makefile.vc: - -2007-12-13 Donal K. Fellows - - * doc/trace.n: Clarified documentation of enterstep and leavestep - traces, including adding example. [Bug 614282, 1701540, 1755984] - -2007-12-12 Don Porter - - * doc/IntObj.3: Update docs for the Tcl_GetBignumAndClearObj() -> - Tcl_TakeBignumFromObj() revision [TIP 298]. Added docs for the - Tcl_InitBignumFromDouble() routine. [Bug 1446971] - - * changes: Updated for 8.5.0 release. - -2007-12-10 Jeff Hobbs - - * generic/tclUtil.c (TclReToGlob): reduce escapes in conversion - when not necessary - - * generic/tclInt.decls: move TclByteArrayMatch and TclReToGlob - * generic/tclIntDecls.h: to tclInt.h from stubs. - * generic/tclStubInit.c: Add flags var to TclByteArrayMatch for - * generic/tclInt.h: future extensibility - * generic/tcl.h: define TCL_MATCH_EXACT doc for Tcl_StringCaseMatch. - * doc/StrMatch.3: It is compatible with existing usage. - * generic/tclExecute.c (INST_STR_MATCH): flag for TclByteArrayMatch - * generic/tclUtil.c (TclByteArrayMatch, TclStringMatchObj): - * generic/tclRegexp.c (Tcl_RegExpExecObj): - * generic/tclCmdMZ.c (StringMatchCmd): Use TclStringMatchObj - * tests/string.test (11.9.* 11.10.*): more tests - -2007-12-10 Joe English - - * doc/string.n, doc/UniCharIsAlpha.3: Fix markup errors. - * doc/CrtCommand.3, doc/CrtMathFnc.3, doc/FileSystem.3, - * doc/GetStdChan.3, doc/OpenFileChnl.3, doc/SetChanErr.3, - * doc/eval.n, doc/filename.n: Consistency: Move "KEYWORDS" section - after "SEE ALSO". - -2007-12-10 Daniel Steffen - - * tools/genStubs.tcl: fix numerous issues handling 'macosx', - 'aqua' or 'x11' entries interleaved - with 'unix' entries [Bug 1834288]; add - genStubs::export command - [Tk FR 1716117]; cleanup formatting. - - * generic/tcl.decls: use new genstubs 'export' command to - * generic/tclInt.decls: mark exported symbols not in stubs - * generic/tclTomMath.decls: table [Tk FR 1716117]; cleanup - formatting. - - * generic/tclDecls.h: regen with new genStubs.tcl. - * generic/tclIntDecls.h: [Bug 1834288] - * generic/tclIntPlatDecls.h: - * generic/tclPlatDecls.h: - * generic/tclStubInit.c: - -2007-12-09 Jeff Hobbs - - * tests/io.test, tests/chanio.test (io-73.1): Make sure to invalidate - * generic/tclIO.c (SetChannelFromAny): internal rep only after - validating channel rep. [Bug 1847044] - -2007-12-08 Donal K. Fellows - - * doc/expr.n, doc/mathop.n: Improved the documentation of the - operators. [Bug 1823622] - - * generic/tclBasic.c (builtInCmds): Corrected list of hidden and - * doc/interp.n (SAFE INTERPRETERS): exposed commands so that the - documentation and reality now match. [Bug 1662436] - -2007-12-07 Jeff Hobbs - - * generic/tclExecute.c (TclExecuteByteCode INST_REGEXP): - * generic/tclCompCmds.c (TclCompileRegexpCmd): Pass correct RE - compile flags at compile time, and use TCL_REG_NOSUB. - - * generic/tclIOCmd.c (FinalizeIOCmdTSD, Tcl_PutsObjCmd): cache - stdout channel object for [puts $str] calls. - -2007-12-06 Don Porter - - * README: Remove mention of dead comp.lang.tcl.announce - newsgroup. [Bug 1846433] - - * unix/README: Mention the stub library created by `make` and warn - about the effect of embedded paths in the installed binaries. - Thanks to Larry Virden. [Bug 1794084] - - * doc/AddErrInfo.3: Documentation for the new routines in TIP 270. - * doc/Interp.3: - * doc/StringObj.3: - -2007-12-06 Don Porter - - * doc/namespace.n: Documentation for zero-argument form of - [namespace import] (TIP 261) [Bug 1596416] - -2007-12-06 Jeff Hobbs - - * generic/tclInt.h: add TclGetChannelFromObj decl - (TclMatchIsTrivial): simplify TclMatchIsTrivial to remove ] check. - -2007-12-06 Donal K. Fellows - - - * generic/tclBasic.c (Tcl_CreateInterp): Simplify the setting up of - * generic/tclIOCmd.c (TclInitChanCmd): the [chan] ensemble. This - * library/init.tcl: gets rid of quite a bit of - code and makes it possible to understand the whole with less effort. - - * generic/tclCompCmds.c (TclCompileEnsemble): Ensure that the right - number of tokens are copied. [Bug 1845320] - - * generic/tclNamesp.c (TclMakeEnsemble): Added missing release of a - DString. [Bug 1845397] - -2007-12-05 Jeff Hobbs - - * generic/tclIO.h: Create Tcl_Obj for Tcl channels to reduce - * generic/tclIO.c: overhead in lookup by Tcl_GetChannel. New - * generic/tclIOCmd.c: TclGetChannelFromObj for internal use. - * generic/tclIO.c (WriteBytes, WriteChars): add opt check to avoid - EOL translation when not linebuffered or using lf. [Bug 1845092] - -2007-12-05 Miguel Sofer - - * tests/stack.test: made the tests for stack overflow not care - about which mechanism caused the error (interp's recursion limit - or C-stack depth detector). - -2007-12-05 Jeff Hobbs - - * win/configure, win/tcl.m4 (LIBS_GUI): mingw needs -lole32 - -loleaut32 but not msvc for Tk's [send]. [Bug 1844749] - -2007-12-05 Donal K. Fellows - - * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Prevent shimmering crash - when -exact and -integer/-real are mixed. [Bug 1844789] - -2007-12-03 Donal K. Fellows - - * unix/tclUnixChan.c (CreateSocketAddress): Add extra #ifdef-fery to - make code compile on BSD 5. [Bug 1618235, again] - -2007-12-03 Don Porter - - * library/tcltest/tcltest.tcl: Bump tcltest to version 2.3.0 so that - * library/tcltest/pkgIndex.tcl: we release a stable tcltest with a - * unix/Makefile.in: stable Tcl. - * win/Makefile.in: - -2007-12-03 Jeff Hobbs - - * win/configure, win/tcl.m4 (LIBS_GUI): remove ole32.lib oleaut32.lib - -2007-12-03 Donal K. Fellows - - * generic/tclCompCmds.c (TclCompileSwitchCmd): Adjusted the [switch] - * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): command so that when - passed two arguments, no check for options are performed. This is OK - since in the two-arg case, detecting an option would definitely lead - to a syntax error. [Patch 1836519] - -2007-11-29 Jeff Hobbs - - * win/makefile.vc: add ws2_32.lib to baselibs - * win/configure, win/tcl.m4: add ws2_32.lib / -lws2_32 to build. - * win/tclWinSock.c: remove dyn loading of winsock, assume that it is - always available now. - -2007-11-29 Don Porter - - * generic/tclWinSock.c (InitializeHostName): Correct error in - buffer length tracking. After gethostname() writes into a buffer, - convert only the written string to internal encoding, not the whole - buffer. - -2007-11-28 Don Porter - - * generic/tclConfig.c: Corrected failure of the [::foo::pkgconfig] - command to clean up registered configuration data when the query - command is deleted from the interp. [Bug 983501] - - * generic/tclNamesp.c (Tcl_SetEnsembleMappingDict): Added checks - that the dict value passed in is in the format required to make the - internals of ensembles work. [Bug 1436096] - - * generic/tclIO.c: Simplify test and improve accuracy of error - message in latest changes. - -2007-11-28 Pat Thoyts - - * generic/tclIO.c: -eofchar must support no eofchar. - -2007-11-27 Miguel Sofer - - * generic/tclBasic.c: remove unneeded call in Tcl_CreateInterp, add - comments. - -2007-11-27 Don Porter - - * win/tclWinSock.c: Add mising encoding conversion of the [info - hostname] value from the system encoding to Tcl's internal encoding. - - * doc/chan.n: "Fix" the limitation on channel -eofchar - * doc/fconfigure.n: values to single byte characters by - * generic/tclIO.c: documenting it and making it fail loudly. - * tests/chan.test: Thanks to Stuart Cassoff for contributing the - fix. [Bug 800753] - -2007-11-26 Miguel Sofer - - * generic/tclBasic.c: - * generic/tclInt.h: - * unix/tclUnixInit.c: - * unix/tclUnixThrd.c: Fix stack checking via workaround for bug in - glibc's pthread_attr_get_np, patch from [Bug 1815573]. Many thanks to - Sergei Golovan (aka Teo) for detecting the bug and helping diagnose - and develop the fix. - -2007-11-24 Donal K. Fellows - - * generic/tclCompCmds.c (TclCompileDictAppendCmd): Fix bug in [dict - append] compiler which caused strange stack corruption. [Bug 1837392] - -2007-11-23 Andreas Kupries - - * generic/tclIORChan.c: Fixed a problem with reflected channels. 'chan - postevent' is defined to work only from within the interpreter - containing the handler command. Sensible, we want only handler - commands to use it. It identifies the channel by handle. The channel - moves to a different interpreter or thread. The interpreter containing - the handler command doesn't know the channel any longer. 'chan - postevent' fails, not finding the channel any longer. Uhm. - - Fixed by creating a second per-interpreter channel table, just for - reflected channels, where each interpreter remembers for which - reflected channels it has the handler command. This info does not move - with the channel itself. The table is updated by 'chan create', and - used by 'chan postevent'. - - * tests/ioCmd.test: Updated the testsuite. - -2007-11-23 Jeff Hobbs - - * generic/tclVar.c (Tcl_ArrayObjCmd): handle the right data for - * tests/var.test (var-14.2): [array names $var -glob $ptn] - -2007-11-23 Donal K. Fellows - - * generic/tclCmdMZ.c (String*Cmd, TclInitStringCmd): Rebuilt [string] - * generic/tclCompCmds.c (TclCompileString*Cmd): as an ensemble. - -2007-11-22 Donal K. Fellows - - * generic/tclDictObj.c (Dict*Cmd,TclInitDictCmd): Rebuilt the [dict] - * generic/tclCompCmds.c (TclCompileDict*Cmd): command as an ensemble. - -2007-11-22 Donal K. Fellows - - * generic/tclCmdMZ.c (Tcl_StringObjCmd): Rewrote the [string] and - * generic/tclDictObj.c (Tcl_DictObjCmd): [dict] implementations to be - ready for conversion to ensembles. - - * tests/string.test (string-12.22): Flag shimmering bug found in - [string range]. - -2007-11-21 Donal K. Fellows - - * generic/tclCompCmds.c (TclCompileEnsemble): Rewrote the ensemble - compiler to remove many of the limitations. Can now compile scripts - that use unique prefixes of subcommands, and which have mappings of a - command to multiple words (provided the first is a compilable command - of course). - -2007-11-21 Donal K. Fellows - - * generic/tclNamesp.c (TclMakeEnsemble): Factor out the code to set up - a core ensemble from a table of information about subcommands, ready - for reuse within the core. - - * generic/various: Start to return more useful Error codes, currently - mainly on assorted lookup failures. - -2007-11-20 Donal K. Fellows - - * generic/tclDictObj.c: Changed the underlying implementation of the - hash table used in dictionaries to additionally keep all entries in - the hash table in a linked list, which is only ever added to at the - end. This makes iteration over all entries in the dictionary in - key insertion order a trivial operation, and so cleans up a great deal - of complexity relating to dictionary representation and stability of - iteration order. - - ***POTENTIAL INCOMPATIBILITY*** - For any code that depended on the (strange) old iteration order. - - * generic/tclConfig.c (QueryConfigObjCmd): Correct usage of - Tcl_WrongNumArgs. - -2007-11-19 Don Porter - - *** 8.5b3 TAGGED FOR RELEASE *** - - * README: Bump version number to 8.5b3. - * generic/tcl.h: - * library/init.tcl: - * tools/tcl.wse.in: - * unix/configure.in: - * unix/tcl.spec: - * win/configure.in: - - * unix/configure: autoconf (2.59) - * win/configure: - - * changes: Updated for 8.5b3 release. - -2007-11-19 Kevin Kenny - - * library/tzdata/Africa/Cairo: - * library/tzdata/America/Campo_Grande: - * library/tzdata/America/Caracas: - * library/tzdata/America/Cuiaba: - * library/tzdata/America/Havana: - * library/tzdata/America/Sao_Paulo: - * library/tzdata/Asia/Damascus: - * library/tzdata/Asia/Gaza: - * library/tzdata/Asia/Tehran: Olson's tzdata2007i imported. - -2007-11-18 Daniel Steffen - - * generic/tclExecute.c (TclExecuteByteCode:INST_EXIST_*): Fix read - traces not firing on non-existent array elements. [Bug 1833522] - -2007-11-16 Donal K. Fellows - - * generic/tclCmdIL.c (TclInitInfoCmd): Rename the implementation - commands for [info] to be something more "expected". - - * generic/tclCompCmds.c (TclCompileInfoExistsCmd): Compiler for the - [info exists] subcommand. - (TclCompileEnsemble): Cleaned up version of ensemble compiler that was - in TclCompileInfoCmd, but which is now much more generally applicable. - - * generic/tclInt.h (ENSEMBLE_COMPILE): Added flag to allow for cleaner - turning on and off of ensemble bytecode compilation. - - * generic/tclCompile.c (TclCompileScript): Add the cmdPtr to the list - of arguments passed to command compilers. - -2007-11-15 Don Porter - - * generic/regc_nfa.c: Fixed infinite loop in the regexp compiler. - [Bug 1810038] - - * generic/regc_nfa.c: Corrected looping logic in fixempties() to - avoid wasting time walking a list of dead states. [Bug 1832612] - -2007-11-15 Donal K. Fellows - - * generic/tclNamesp.c (NamespaceEnsembleCmd): Must pass a non-NULL - interp to Tcl_SetEnsemble* functions. - - * doc/re_syntax.n: Try to make this easier to read. It's still a very - difficult manual page! - - * unix/tcl.m4 (SC_CONFIG_CFLAGS): Allow people to turn off the -rpath - option to their linker if they so desire. This is a configuration only - recommended for (some) vendors. Relates to [Patch 1231022]. - -2007-11-15 Pat Thoyts - - * win/tclWin32Dll.c: Prefer UINT_PTR to DWORD_PTR when casting - pointers to integer types for greater portability. [Bug 1831253] - -2007-11-15 Daniel Steffen - - * macosx/Tcl.xcodeproj/project.pbxproj: add new chanio.test. - * macosx/Tcl.xcode/project.pbxproj: - -2007-11-14 Donal K. Fellows - - * generic/tclCompile.c (TclCompileScript): Ensure that we get our - count in our INST_START_CMD calls right, even when there's a failure - to compile a command directly. - - * generic/tclNamesp.c (Tcl_SetEnsembleSubcommandList) - (Tcl_SetEnsembleMappingDict): Special code to make sure that - * generic/tclCmdIL.c (TclInitInfoCmd): [info exists] is compiled - right while not allowing changes to the ensemble to cause havok. - - * generic/tclCompCmds.c (TclCompileInfoCmd): Simple compiler for the - [info] command that only handles [info exists]. - - * generic/tclExecute.c (TclExecuteByteCode:INST_EXIST_*): New - instructions to allow the testing of whether a variable exists. - -2007-11-14 Andreas Kupries - - * tests/chanio.test: New file. This is essentially a duplicate of - 'io.test', with all channel commands converted to their 'chan xxx' - notation. - * tests/io.test: Fixed typo in test description. - -2007-11-14 Donal K. Fellows - - * generic/regc*.c: Eliminate multi-char collating element code - completely. Simplifies the code quite a bit. If people still want the - full code, it will remain on the 8.4 branch. [Bug 1831425] - -2007-11-13 Jeff Hobbs - - * generic/tclCompCmds.c (TclCompileRegexpCmd): clean up comments, only - free dstring on OK from TclReToGlob. - (TclCompileSwitchCmd): simplify TclReToGlob usage. - -2007-11-14 Donal K. Fellows - - * generic/regc*.c: #ifdef/comment out the code that deals with - multi-character collating elements, which have never been supported. - Cuts the memory consumption of the RE compiler. [Bug 1831425] - -2007-11-13 Donal K. Fellows - - * generic/tclCompCmds.c (TclCompileSwitchCmd, TclCompileRegexpCmd): - Extend [switch] compiler to handle regular expressions as long as - things are not too complex. Fix [regexp] compiler so that non-trivial - literal regexps get fed to INST_REGEXP. - - * doc/mathop.n: Clarify definitions of some operations. - -2007-11-13 Miguel Sofer - - * unix/tclUnixInit.c: the TCL_NO_STACK_CHECK was being incorrectly - undefined here; this should be set (or not) in the compile options, it - is used elsewhere and needs to be consistent. - -2007-11-13 Pat Thoyts - - * unix/tcl.m4: Added autoconf goo to detect and make use of - * unix/configure.in: getaddrinfo and friends. - * unix/configure: (regenerated) - -2007-11-13 Donal K. Fellows - - * unix/tclUnixCompat.c (TclpGetHostByName): The six-argument form of - getaddressbyname_r() uses the fifth argument to indicate whether the - lookup succeeded or not on at least one platform. [Bug 1618235] - -2007-11-13 Don Porter - - * generic/regcomp.c: Convert optst() from expensive no-op to a - cheap no-op. - -2007-11-13 Donal K. Fellows - - * unix/tclUnixChan.c (CreateSocketAddress): Rewrote to use the - thread-safe version of gethostbyname() by forward-porting the code - used in 8.4, and added rudimentary support for getaddrinfo() (not - enabled by default, as no autoconf-ery written). Part of fix for [Bug - 1618235]. - -2007-11-12 Jeff Hobbs - - * generic/tclGet.c (Tcl_Get, Tcl_GetInt): revert use of TclGet* macros - due to compiler warning. These cases won't save time either. - - * generic/tclUtil.c (TclReToGlob): add more comments, set interp - result if specified on error. - -2007-11-12 Miguel Sofer - - * generic/tclBasic.c: New macro TclResetResult, new iPtr - * generic/tclExecute.c: flag bit INTERP_RESULT_UNCLEAN: - * generic/tclInt.h: shortcut for Tcl_ResetResult for the - * generic/tclProc.c: "normal" case: TCL_OK, no return - * generic/tclResult.c: options, no errorCode nor errorInfo, - * generic/tclStubLib.c: return at normal level. [Patch - * generic/tclUtil.c: 1830184] - - THIS PATCH WAS REVERTED: initial (mis)measurements overstated the - perfomance wins, which turn out to be tiny. Not worth the - complication. - -2007-11-11 Jeff Hobbs - - * generic/tclCompCmds.c, generic/tclCompile.c, generic/tclCompile.h: - * generic/tclExecute.c, generic/tclInt.decls, generic/tclIntDecls.h: - * generic/tclRegexp.c, generic/tclRegexp.h: Add INST_REGEXP and fully - * generic/tclStubInit.c, generic/tclUtil.c: compiled [regexp] for the - * tests/regexpComp.test: [Bug 1830166] simple cases. Also added - TclReToGlob function to convert RE to glob patterns and use these in - the possible cases. - -2007-11-11 Miguel Sofer - - * generic/tclResult.c (ResetObjResult): clarify the logic. - - * generic/tclBasic.c: Increased usage of macros to detect - * generic/tclBinary.c: and take advantage of objTypes. Added - * generic/tclClock.c: macros TclGet(Int|Long)FromObj, - * generic/tclCmdAH.c: TclGetIntForIndexM & TclListObjLength, - * generic/tclCmdIL.c: modified TclListObjGetElements. - * generic/tclCmdMZ.c: - * generic/tclCompCmds.c: The TclGetInt* macros are only a - * generic/tclCompExpr.c: shortcut on platforms where 'long' is - * generic/tclCompile.c: 'int'; it may be worthwhile to extend - * generic/tclDictObj.c: their functionality to other cases. - * generic/tclExecute.c: - * generic/tclGet.c: As this patch touches many files it - * generic/tclIO.c: has been recorded as [Patch 1830038] - * generic/tclIOCmd.c: in order to facilitate reviewing. - * generic/tclIOGT.c: - * generic/tclIndexObj.c: - * generic/tclInt.h: - * generic/tclInterp.c: - * generic/tclListObj.c: - * generic/tclLiteral.c: - * generic/tclNamesp.c: - * generic/tclObj.c: - * generic/tclParse.c: - * generic/tclProc.c: - * generic/tclRegexp.c: - * generic/tclResult.c: - * generic/tclScan.c: - * generic/tclStringObj.c: - * generic/tclUtil.c: - * generic/tclVar.c: - -2007-11-11 Daniel Steffen - - * unix/tclUnixTime.c (TclpWideClicksToNanoseconds): Fix issues with - * generic/tclInt.h: int64_t overflow. - - * generic/tclBasic.c: Fix stack check failure case if stack grows up - * unix/tclUnixInit.c: Simplify non-crosscompiled case. - - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2007-11-10 Miguel Sofer - - * generic/tclExecute.c: Fast path for INST_LIST_INDEX when the index - is not a list. - - * generic/tclBasic.c: - * unix/configure.in: - * unix/tclUnixInit.c: Detect stack grwoth direction at compile time, - only fall to runtime detection when crosscompiling. - - * unix/configure: autoconf 2.61 - - * generic/tclBasic.c: - * generic/tclInt.h: - * tests/interp.test: - * unix/tclUnixInit.c: - * win/tclWin32Dll.c: Restore simpler behaviour for stack checking, not - adaptive to stack size changes after a thread is launched. Consensus - is that "nobody does that", and so it is not worth the cost. Improved - failure comments (mistachkin). - -2007-11-10 Kevin Kenny - - * win/tclWin32Dll.c: Rewrote the Windows stack checking algorithm to - use information from VirtualQuery to determine the bound of the stack. - This change fixes a bug where the guard page of the stack was never - restored after an overflow. It also eliminates a nasty piece of - assembly code for structured exception handling on mingw. It - introduces an assumption that the stack is a single memory arena - returned from VirtualAlloc, but the code in MSVCRT makes the same - assumption, so it should be fairly safe. - -2007-11-10 Miguel Sofer - - * generic/tclBasic.c: - * generic/tclInt.h: - * unix/tclUnixInit.c: - * unix/tclUnixPort.h: - * win/tclWin32Dll.c: Modify the stack checking algorithm to recheck in - case of failure. The working assumptions are now that (a) a thread's - stack is never moved, and (b) a thread's stack can grow but not - shrink. Port to windows - could be more efficient, but is already - cheaper than it was. - -2007-11-09 Miguel Sofer - - * generic/tclResult.c (ResetObjResult): new shortcut. - - * generic/tclAsync.c: - * generic/tclBasic.c: - * generic/tclExecute.c: - * generic/tclInt.h: - * generic/tclUnixInit.c: - * generic/tclUnixPort.h: New fields in interp (ekeko!) to cache TSD - data that is accessed at each command invocation, access macros to - replace Tcl_AsyncReady and TclpCheckStackSpace by much faster variants - [Patch 1829248] - -2007-11-09 Jeff Hobbs - - * generic/tclInt.decls, generic/tclIntDecls.h: Use unsigned char for - * generic/tclExecute.c, generic/tclUtil.c: TclByteArrayMatch and - don't allow a nocase option. [Bug 1828296] - For INST_STR_MATCH, ignore pattern type for TclByteArrayMatch case. - - * generic/tclBinary.c (Tcl_GetByteArrayFromObj): check type before - func jump (perf). - -2007-11-07 Jeff Hobbs - - * generic/tclStubInit.c: Added TclByteArrayMatch - * generic/tclInt.decls: for efficient glob - * generic/tclIntDecls.h: matching of ByteArray - * generic/tclUtil.c (TclByteArrayMatch): Tcl_Objs, used in - * generic/tclExecute.c (TclExecuteByteCode): INST_STR_MATCH. [Bug - 1827996] - - * generic/tclIO.c (TclGetsObjBinary): Add an efficient binary path for - [gets]. - (DoWriteChars): Special case for 1-byte channel write. - -2007-11-06 Miguel Sofer - - * generic/tclEncoding.c: Version of the embedded iso8859-1 encoding - handler that is faster (functions to do the encoding know exactly what - they're doing instead of pulling it from a table, though the table - itself has to be retained for use by shift encodings that depend on - iso8859-1). [Patch 1826906], committing for dkf. - -2007-11-05 Andreas Kupries - - * generic/tclConfig.c (Tcl_RegisterConfig): Modified to not extend the - config database if the encoding provided by the user is not found - (venc == NULL). Scripts expecting the data will error out, however we - neither crash nor provide bogus information. See [Bug 983509] for more - discussion. - - * unix/tclUnixChan.c (TtyGetOptionProc): Accepted [Patch 1823576] - provided by Stuart Cassof . The patch adds - the necessary utf/external conversions to the handling of the - arguments of option -xchar which will allow the use of \0 and similar - characters. - -2007-11-03 Miguel Sofer - - * generic/tclTest.c (TestSetCmd2): - * generic/tclVar.c (TclObjLookupVarEx): - * tests/set.test (set-5.1): Fix error branch when array name looks - like array element (code not normally exercised). - -2007-11-01 Donal K. Fellows - - * tools/tcltk-man2html.tcl (output-directive): Convert .DS/.DE pairs - into tables since that is now all that they are used for. - - * doc/RegExp.3: Clarified documentation of RE flags. [Bug 1167840] - - * doc/refchan.n: Adjust internal name to be consistent with the file - name for reduced user confusion. After comment by Dan Steffen. - - * generic/tclCmdMZ.c (Tcl_StringObjCmd, UniCharIsAscii): Remember, the - NUL character is in ASCII too. [Bug 1808258] - - * doc/file.n: Clarified use of [file normalize]. [Bug 1185154] - -2007-10-30 Don Porter - - * generic/tcl.h: Bump version number to 8.5b2.1 to distinguish - * library/init.tcl: CVS development snapshots from the 8.5b2 - * unix/configure.in: release. - * unix/tcl.spec: - * win/configure.in: - - * unix/configure: autoconf (2.59) - * win/configure: - -2007-10-30 Donal K. Fellows - - * doc/expr.n, doc/mathfunc.n: Improve documentation to try to make - clearer what is going on. - - * doc/interp.n: Shorten the basic descriptive text for some interp - subcommands so Solaris nroff doesn't truncate them. [Bug 1822268] - -2007-10-30 Donal K. Fellows - - * tools/tcltk-man2html.tcl (output-widget-options): Enhance the HTML - generator so that it can produce multi-line option descriptions. - -2007-10-28 Miguel Sofer - - * generic/tclUtil.c (Tcl_ConcatObj): optimise for some of the - concatenees being empty objs. [Bug 1447328] - -2007-10-28 Donal K. Fellows - - * generic/tclEncoding.c (TclInitEncodingSubsystem): Hard code the - iso8859-1 encoding, as it's needed for more than just text (especially - binary encodings...) Note that other encodings rely on the encoding - being a table encoding (!) so we can't use more efficient encoding - mapping functions. - -2007-10-27 Donal K. Fellows - - * generic/regc_lex.c (lexescape): Close off one of the problems - mentioned in [Bug 1810264]. - -2007-10-27 Miguel Sofer - - * generic/tclNamesp.c (Tcl_FindCommand): insure that FQ command names - are searched from the global namespace, ie, bypassing resolvers of the - current namespace. [Bug 1114355] - - * doc/apply.n: fixed example [Bug 1811791] - * doc/namespace.n: improved example [Bug 1788984] - * doc/AddErrInfo.3: typo [Bug 1715087] - * doc/CrtMathFnc.3: fixed Tcl_ListMathFuncs entry [Bug 1672219] - - * generic/tclCompile.h: - * generic/tclInt.h: moved declaration of TclSetCmdNameObj from - tclCompile.h to tclInt.h, reverting linker [Bug 1821159] caused by - commit of 2007-10-11 (both I and gcc missed one dep). - - * generic/tclVar.c: try to preserve Tcl_Objs when doing variable - lookups by name, partially addressing [Bug 1793601]. - -2007-10-27 Donal K. Fellows - - * tools/tcltk-man2html.tcl (make-man-pages, htmlize-text) - (process-text): Make the man->HTML scraper work better. - -2007-10-26 Don Porter - - *** 8.5b2 TAGGED FOR RELEASE *** - - * changes: Updated for 8.5b2 release. - - * doc/*.1: Revert doc changes that broke - * doc/*.3: `make html` so we can get the release - * doc/*.n: out the door. - - * README: Bump version number to 8.5b2. - * generic/tcl.h: - * library/init.tcl: - * tools/tcl.wse.in: - * unix/configure.in: - * unix/tcl.spec: - * win/configure.in: - - * unix/configure: autoconf (2.59) - * win/configure: - -2007-10-26 Donal K. Fellows - - * tools/man2help2.tcl, tools/man2tcl.c: Made some of the tooling code - to do man->other formats work better with current manpage set. Long - way still to go. - -2007-10-25 Zoran Vasiljevic - - * generic/tclThread.c: Added TclpMasterLock/Unlock arround calls to - ForgetSyncObject in Tcl_MutexFinalize and Tcl_ConditionFinalize to - prevent from garbling the internal lists that track sync objects. [Bug - 1726873] - -2007-10-24 Donal K. Fellows - - * tools/man2html2.tcl (macro): Added support for converting the new - macros into HTML. - - * doc/man.macros (QW,PQ,QR,MT): New macros that hide the ugly mess - needed to get proper GOOBE quoting in the manual pages. - * doc/*.n, doc/*.3, doc/*.1: Lots of changes to take advantage of the - new macros. - -2007-10-20 Miguel Sofer - - * generic/tclCompile.c: Fix comments. - * generic/tclExecute.c: - -2007-10-18 David Gravereaux - - * tools/mkdepend.tcl: sort the dep list for a more humanly readable - output. - -2007-10-18 Don Porter - - * generic/tclResult.c (TclMergeReturnOptions): Make sure any -code - values get pulled out of the dictionary, even if they are integer - valued. - - * generic/tclCompCmds.c (TclCompileReturnCmd): Added code to more - optimally compile [return -level 0 $x] to "push $x". [RFE 1794073] - - * compat/tmpnam.c (removed): The routine tmpnam() is no longer - * unix/Makefile.in: called by Tcl source code. Remove autogoo the - * unix/configure.in: supplied a replacement version on systems - * win/tcl.dsp: where the routine was not available. [RFE - 1811848] - - * unix/configure: autoconf-2.59 - - * generic/tcl.h: Remove TCL_LL_MODIFIER_SIZE. [RFE 1811837] - -2007-10-17 David Gravereaux - - * tools/mkdepend.tcl: Improved defense from malformed object list - infile. - -2007-10-17 Donal K. Fellows - - * tools/man2html2.tcl: Convert .DS/.DE into HTML tables, not - preformatted text. - -2007-10-17 Kevin B. Kenny - - * generic/tclCompExpr.c: Moved a misplaced declaration that blocked - compilation on VC++. - * generic/tclExecute.c: Silenced several VC++ compiler warnings about - converting 'long' to 'unsigned short'. - -2007-10-16 David Gravereaux - - * win/makefile.vc: removed old dependency cruft that is no longer - needed. - -2007-10-15 Don Porter - - * generic/tclIOCmd.c: Revise [open] so that it interprets leading - zero strings passed as the "permissions" argument as octal numbers, - even if Tcl itself no longer parses integers in that way. - - * unix/tclUnixFCmd.c: Revise the "-permissions" [file attribute] so - that it interprets leading zero strings as octal numbers, even if Tcl - itself no longer parses integers in that way. - - * generic/tclCompExpr.c: Corrections to code that produces - * generic/tclUtil.c: extended "bad octal" error messages. - - * tests/cmdAH.test: Test revisions so that tests pass whether or - * tests/cmdIL.test: not Tcl parses leading zero strings as octal. - * tests/compExpr-old.test: - * tests/compExpr.test: - * tests/compile.test: - * tests/expr-old.test: - * tests/expr.test: - * tests/incr.test: - * tests/io.test: - * tests/lindex.test: - * tests/link.test: - * tests/mathop.test: - * tests/parseExpr.test: - * tests/set.test: - * tests/string.test: - * tests/stringComp.test: - -2007-10-15 David Gravereaux - - * tools/mkdepend.tcl: Produces usable output. Include path problem - * win/makefile.vc: fixed. Never fight city hall when it comes to - levels of quoting issues. - -2007-10-15 Miguel Sofer - - * generic/tclParse.c (Tcl_ParseBraces): fix for possible read after - the end of buffer. [Bug 1813528] (Joe Mistachkin) - -2007-10-14 David Gravereaux - - * tools/mkdepend.tcl (new): Initial stab at generating automatic - * win/makefile.vc: dependencies. - -2007-10-12 Pat Thoyts - - * win/makefile.vc: Mine all version information from headers. - * win/rules.vc: Sync tcl and tk and bring extension versions - * win/nmakehlp.c: closer together. Try and avoid using tclsh to do - substitutions as we may cross compile. - * win/coffbase.txt: Added offsets for snack dlls. - -2007-10-11 David Gravereaux - - * win/makefile.vc: Fixed my bad spelling mistakes from years back. - Dedependency, duh! Rather funny. - -2007-10-11 Don Porter - - * generic/tclCmdMZ.c: Correct [string is (wide)integer] failure - * tests/string.test: to report correct failindex values for - non-decimal integer strings. [Bug 1805887] - - * compat/strtoll.c (removed): The routines strtoll() and strtoull() - * compat/strtoull.c (removed): are no longer called by the Tcl source - * generic/tcl.h: code. (Their functionality has been replaced - * unix/Makefile.in: by TclParseNumber().) Remove outdated comments - * unix/configure.in: and mountains of configury autogoo that - * unix/tclUnixPort.h: allegedly support the mythical systems where - * win/Makefile.in: these routines might not have been available. - * win/makefile.bc: - * win/makefile.vc: - * win/tclWinPort.h: - - * unix/configure: autoconf-2.59 - -2007-10-11 Miguel Sofer - - * generic/tclObj.c: remove superfluous #include of tclCompile.h - -2007-10-08 George Peter Staplin - - * doc/Hash.3: Correct the valid usage of the flags member for the - Tcl_HashKeyType. It should be 0 or more of the flags mentioned. - -2007-10-02 Jeff Hobbs - - * generic/tcl.h (Tcl_DecrRefCount): Update change from 2006-05-29 to - make macro more warning-robust in unbraced if code. - -2007-10-02 Don Porter - - [core-stabilizer-branch] - - * README: Bump version number to 8.5.0 - * generic/tcl.h: - * library/init.tcl: - * tools/tcl.wse.in: - * unix/configure.in: - * unix/tcl.spec: - * win/configure.in: - - * unix/configure: autoconf (2.59) - * win/configure: - -2007-10-02 Andreas Kupries - - * library/tclIndex: Added 'tcl::tm::path' to the tclIndex. This fixes - [Bug 1806422] reported by Don Porter. - -2007-09-25 Donal K. Fellows - - * generic/tclProc.c (Tcl_DisassembleObjCmd): Define a command, - ::tcl::unsupported::disassemble, which can disassemble procedures, - lambdas and general scripts. - * generic/tclCompile.c (TclDisassembleByteCodeObj): Split apart the - code to print disassemblies of bytecode so that there is reusable code - that spits it out in a Tcl_Obj and then that code is used when doing - tracing. - -2007-09-20 Don Porter - - *** 8.5b1 TAGGED FOR RELEASE *** - - * changes: updates for 8.5b1 release. - -2007-09-19 Don Porter - - * README: Bump version number to 8.5b1 - * generic/tcl.h: Merge from core-stabilizer-branch. - * library/init.tcl: Stabilizing toward 8.5b1 release now done on - * tools/tcl.wse.in: the HEAD. core-stabilizer-branch is now - * unix/configure.in: suspended. - * unix/tcl.spec: - * win/configure.in: - -2007-09-19 Pat Thoyts - - * generic/tclStubLib.: Replaced isdigit with internal implementation. - -2007-09-18 Don Porter - - * generic/tclStubLib.c: Remove C library calls from Tcl_InitStubs() so - * win/makefile.vc: that we don't need the C library linked in to - libtclStub. - -2007-09-17 Pat Thoyts - - * win/makefile.vc: Add crt flags for tclStubLib now it uses C-library - functions. - -2007-09-17 Joe English - - * tcl.m4: use '${CC} -shared' instead of 'ld -Bshareable' to build - shared libraries on current NetBSDs. [Bug 1749251] - * unix/configure: regenerated (autoconf-2.59). - -2007-09-17 Don Porter - - * unix/Makefile.in: Update `make dist` so that tclDTrace.d is - included in the source code distribution. - - * generic/tcl.h: Revised Tcl_InitStubs() to restore Tcl 8.4 - * generic/tclPkg.c: source compatibility with callers of - * generic/tclStubLib.c: Tcl_InitStubs(interp, TCL_VERSION, 1). [Bug - 1578344] - -2007-09-17 Donal K. Fellows - - * generic/tclTrace.c (Tcl_TraceObjCmd, TraceExecutionObjCmd) - (TraceCommandObjCmd, TraceVariableObjCmd): Generate literal values - * generic/tclNamesp.c (NamespaceCodeCmd): more efficiently using - * generic/tclFCmd.c (CopyRenameOneFile): TclNewLiteralStringObj - * generic/tclEvent.c (TclSetBgErrorHandler): macro. - -2007-09-15 Daniel Steffen - - * unix/tcl.m4: replace all direct references to compiler by ${CC} to - enable CC overriding at configure & make time; run - check for visibility "hidden" with all compilers; - quoting fixes from TEA tcl.m4. - (SunOS-5.1x): replace direct use of '/usr/ccs/bin/ld' in SHLIB_LD by - 'cc' compiler driver. - * unix/configure: autoconf-2.59 - -2007-09-14 Donal K. Fellows - - * generic/tclBasic.c (Tcl_CreateObjCommand): Only invalidate along the - namespace path once; that is enough. [Bug 1519940] - -2007-09-14 Daniel Steffen - - * generic/tclDTrace.d (new file): Add DTrace provider for Tcl; allows - * generic/tclCompile.h: tracing of proc and command entry & - * generic/tclBasic.c: return, bytecode execution, object - * generic/tclExecute.c: allocation and more; with - * generic/tclInt.h: essentially zero cost when tracing - * generic/tclObj.c: is inactive; enable with - * generic/tclProc.c: --enable-dtrace configure arg - * unix/Makefile.in: (disabled by default, will only - * unix/configure.in: enable if DTrace is present). [Patch - 1793984] - - * macosx/GNUmakefile: Enable DTrace support. - * macosx/Tcl-Common.xcconfig: - * macosx/Tcl.xcodeproj/project.pbxproj: - - * generic/tclCmdIL.c: Factor out core of InfoFrameCmd() into - internal TclInfoFrame() for use by DTrace - probes. - - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2007-09-12 Don Porter - - * unix/Makefile.in: Perform missing updates of the tcltest Tcl - * win/Makefile.in: Module installed filename that should have - been part of the bump to tcltest 2.3b1. Thanks Larry Virden. - -2007-09-12 Pat Thoyts - - * win/makefile.vc, win/rules.vc, win/nmakehlp.c: Use nmakehlp to - substitute values for tclConfig.sh (helps cross-compiling). - -2007-09-11 Don Porter - - * library/tcltest/tcltest.tcl: Accept underscores and colons in - * library/tcltest/pkgIndex.tcl: constraint names. Properly handle - constraint expressions that return non-numeric boolean results like - "false". Bump to tcltest 2.3b1. [Bug 1772989; RFE 1071322] - * tests/info.test: Disable fragile tests. - - * doc/package.n: Restored the functioning of [package require - * generic/tclPkg.c: -exact] to be compatible with Tcl 8.4. [Bug - * tests/pkg.test: 1578344] - -2007-09-11 Miguel Sofer - - * generic/tclCompCmds.c (TclCompileDictCmd-update): - * generic/tclCompile.c (tclInstructionTable): - * generic/tclExecute.c (INST_DICT_UPDATE_END): fix stack management in - compiled [dict update]. [Bug 1786481] - - ***POTENTIAL INCOMPATIBILITY*** - Scripts that were precompiled on earlier versions of 8.5 and use [dict - update] will crash. Workaround: recompile. - -2007-09-11 Kevin B. Kenny - - * generic/tclExecute.c: Corrected an off-by-one error in the setting - of MaxBaseWide for certain powers. [Bug 1767293 - problem reported in - comments when bug was reopened] - -2007-09-10 Jeff Hobbs - - * generic/tclLink.c (Tcl_UpdateLinkedVar): guard against var being - unlinked. [Bug 1740631] (maros) - -2007-09-10 Miguel Sofer - - * generic/tclCompile.c: fix tclInstructionTable entry for - dictUpdateEnd - - * generic/tclExecute.c: remove unneeded setting of 'cleanup' variable - before jumping to checkForCatch. - -2007-09-10 Don Porter - - * doc/package.n: Restored the document parallel syntax of the - * generic/tclPkg.c: [package present] and [package require] - * tests/pkg.test: commands. [Bug 1723675] - -2007-09-09 Don Porter - - * generic/tclInt.h: Removed the "nsName" Tcl_ObjType from the - * generic/tclNamesp.c: registered set. Revised the management of the - * generic/tclObj.c: intrep of that Tcl_ObjType. Revised the - * tests/obj.test: TclGetNamespaceFromObj() routine to return - TCL_ERROR and write a consistent error message when a namespace is not - found. [Bug 1588842. Patch 1686862] - - ***POTENTIAL INCOMPATIBILITY*** - For callers of Tcl_GetObjType() on the name "nsName". - - * generic/tclExecute.c: Update TclGetNamespaceFromObj() callers. - * generic/tclProc.c: - - * tests/apply.test: Updated tests to expect new consistent - * tests/namespace-old.test: error message when a namespace is not - * tests/namespace.test: found. - * tests/upvar.test: - - * generic/tclCompCmds.c: Use the new INST_REVERSE instruction - * tests/mathop.test: to correct the compiled versions of math - operator commands. [Bug 1724437] - - * generic/tclCompile.c: New bytecode instruction INST_REVERSE to - * generic/tclCompile.h: reverse the order of N items at the top of - * generic/tclExecute.c: stack. - - * generic/tclCompCmds.c (TclCompilePowOpCmd): Make a separate - routine to compile ** to account for its different associativity. - -2007-09-08 Miguel Sofer - - * generic/tclVar.c (Tcl_SetVar2, TclPtrSetVar): [Bug 1710710] fixed - correctly, reverted fix of 2007-05-01. - -2007-09-08 Donal K. Fellows - - * generic/tclDictObj.c (DictUpdateCmd, DictWithCmd): Plug a hole that - * generic/tclExecute.c (TEBC,INST_DICT_UPDATE_END): allowed a careful - * tests/dict.test (dict-21.16,21.17,22.11): attacker to craft a dict - containing a recursive link to itself, violating one of Tcl's - fundamental datatype assumptions and causing a stack crash when the - dict was converted to a string. [Bug 1786481] - -2007-09-07 Don Porter - - * generic/tclEvent.c ([::tcl::Bgerror]): Corrections to Tcl's - * tests/event.test: default [interp bgerror] handler so that when - it falls back to a hidden [bgerror] in a safe interp, it gets the - right error context data. [Bug 1790274] - -2007-09-07 Miguel Sofer - - * generic/tclProc.c (TclInitCompiledLocals): the refCount of resolved - variables was being managed without checking if they were Var or - VarInHash: itcl [Bug 1790184] - -2007-09-06 Don Porter - - * generic/tclResult.c (Tcl_GetReturnOptions): Take care that a - * tests/init.test: non-TCL_ERROR code doesn't cause existing - -errorinfo, -errorcode, and -errorline entries to be omitted. - * generic/tclEvent.c: With -errorInfo no longer lost, generate more - complete ::errorInfo when calling [bgerror] after a non-TCL_ERROR - background exception. - -2007-09-06 Don Porter - - * generic/tclInterp.c (Tcl_Init): Removed constraint on ability - to define a custom [tclInit] before calling Tcl_Init(). Until now the - custom command had to be a proc. Now it can be any command. - - * generic/tclInt.decls: New internal routine TclBackgroundException() - * generic/tclEvent.c: that for the first time permits non-TCL_ERROR - exceptions to trigger [interp bgerror] handling. Closes a gap in TIP - 221. When falling back to [bgerror] (which is designed only to handle - TCL_ERROR), convert exceptions into errors complaining about the - exception. - - * generic/tclInterp.c: Convert Tcl_BackgroundError() callers to call - * generic/tclIO.c: TclBackgroundException(). - * generic/tclIOCmd.c: - * generic/tclTimer.c: - - * generic/tclIntDecls.h: make genstubs - * generic/tclStubInit.c: - -2007-09-06 Daniel Steffen - - * macosx/Tcl.xcode/project.pbxproj: discontinue unmaintained support - * macosx/Tcl.xcode/default.pbxuser: for Xcode 1.5; replace by Xcode2 - project for use on Tiger (with Tcl.xcodeproj to be used on Leopard). - - * macosx/Tcl.xcodeproj/project.pbxproj: updates for Xcode 2.5 and 3.0. - * macosx/Tcl.xcodeproj/default.pbxuser: - * macosx/Tcl.xcode/project.pbxproj: - * macosx/Tcl.xcode/default.pbxuser: - * macosx/Tcl-Common.xcconfig: - - * macosx/README: document project changes. - -2007-09-05 Don Porter - - * generic/tclBasic.c: Removed support for the unmaintained - * generic/tclExecute.c: -DTCL_GENERIC_ONLY configuration. [Bug - * unix/Makefile.in: 1264623] - -2007-09-04 Don Porter - - * unix/Makefile.in: It's unreliable to count on the release - manager to remember to `make genstubs` before `make dist`. Let the - Makefile remember the dependency for us. - - * unix/Makefile.in: Corrections to `make dist` dependencies to be - sure that macosx/configure gets generated whenever it does not exist. - -2007-09-03 Kevin B, Kenny - - * library/tzdata/Africa/Cairo: - * library/tzdata/America/Grand_Turk: - * library/tzdata/America/Port-au-Prince: - * library/tzdata/America/Indiana/Petersburg: - * library/tzdata/America/Indiana/Tell_City: - * library/tzdata/America/Indiana/Vincennes: - * library/tzdata/Antarctica/McMurdo: - * library/tzdata/Australia/Adelaide: - * library/tzdata/Australia/Broken_Hill: - * library/tzdata/Australia/Currie: - * library/tzdata/Australia/Hobart: - * library/tzdata/Australia/Lord_Howe: - * library/tzdata/Australia/Melbourne: - * library/tzdata/Australia/Sydney: - * library/tzdata/Pacific/Auckland: - * library/tzdata/Pacific/Chatham: Olson's tzdata2007g. - - * generic/tclListObj.c (TclLindexFlat): - * tests/lindex.test (lindex-17.[01]): Added code to detect the error - when a script does [lindex {} end foo]; an overaggressive optimisation - caused this call to return an empty object rather than an error. - -2007-09-03 Daniel Steffen - - * generic/tclObj.c (TclInitObjSubsystem): restore registration of the - "wideInt" Tcl_ObjType for compatibility with 8.4 extensions that - access the tclWideIntType Tcl_ObjType; add setFromAnyProc for - tclWideIntType. - -2007-09-02 Donal K. Fellows - - * doc/lsearch.n: Added note that order of results with the -all option - is that of the input list. It always was, but this makes it crystal. - -2007-08-30 Don Porter - - * generic/tclCompile.c: Added fflush() calls following all callers of - * generic/tclExecute.c: TclPrintByteCodeObj() so that tcl_traceCompile - output is less likely to get mangled when writes to stdout interleave - with other code. - -2007-08-28 Don Porter - - * generic/tclCompExpr.c: Use a table lookup in ParseLexeme() to - determine lexemes with single-byte representations. - - * generic/tclBasic.c: Used unions to better clarify overloading of - * generic/tclCompExpr.c: the fields of the OpCmdInfo and - * generic/tclCompile.h: TclOpCmdClientData structs. - -2007-08-27 Don Porter - - * generic/tclCompExpr.c: Call TclCompileSyntaxError() when - expression syntax errors are found when compiling expressions. With - this in place, convert TclCompileExpr to return void, since there's no - longer any need to report TCL_ERROR. - * generic/tclCompile.c: Update callers. - * generic/tclExecute.c: - - * generic/tclCompCmds.c: New routine TclCompileSyntaxError() - * generic/tclCompile.h: to directly compile bytecodes that report a - * generic/tclCompile.c: syntax error, rather than (ab)use a call to - TclCompileReturnCmd. Also, undo the most recent commit that papered - over some issues with that (ab)use. New routine produces a new opcode - INST_SYNTAX, which is a minor variation of INST_RETURN_IMM. Also a bit - of constification. - - * generic/tclCompile.c: Move the deallocation of local LiteralTable - * generic/tclCompExpr.c: entries into TclFreeCompileEnv(). - * generic/tclExecute.c: Update callers. - - * generic/tclCompExpr.c: Force numeric and boolean literals in - expressions to register with their intreps intact, even if that means - overwriting existing intreps in already registered literals. - -2007-08-25 Kevin B. Kenny - - * generic/tclExecute.c (TclExecuteByteCode): Added code to handle - * tests/expr.test (expr-23.48-53) integer exponentiation - that results in 32- and 64-bit integer results, avoiding calls to wide - integer exponentiation routines in this common case. [Bug 1767293] - - * library/clock.tcl (ParseClockScanFormat): Modified code to allow - * tests/clock.test (clock-60.*): case-insensitive matching - of time zone and month names. [Bug 1781282] - -2007-08-24 Don Porter - - * generic/tclCompExpr.c: Register literals found in expressions - * tests/compExpr.test: to restore literal sharing. Preserve numeric - intreps when literals are created for the first time. Correct memleak - in ExecConstantExprTree() and add test for the leak. - -2007-08-24 Miguel Sofer - - * generic/tclCompile.c: replaced copy loop that tripped some compilers - with memmove. [Bug 1780870] - -2007-08-23 Don Porter - - * library/init.tcl ([auto_load_index]): Delete stray "]" that created - an expr syntax error (masked by a [catch]). - - * generic/tclCompCmds.c (TclCompileReturnCmd): Added crash protection - to handle callers other than TclCompileScript() failing to meet the - initialization assumptions of the TIP 280 code in CompileWord(). - - * generic/tclCompExpr.c: Suppress the attempt to convert to - numeric when pre-compiling a constant expresion indicates an error. - -2007-08-22 Miguel Sofer - - * generic/tclExecute.c (TEBC): disable the new shortcut to frequent - INSTs for debug builds. REVERTED (collision with alternative fix) - -2007-08-21 Don Porter - - * generic/tclMain.c: Corrected the logic of dropping the last - * tests/main.test: newline from an interactively typed command. - [Bug 1775878] - -2007-08-21 Pat Thoyts - - * tests/thread.test: thread-4.4: clear ::errorInfo in the thread as a - message is left here from init.tcl on windows due to no tcl_pkgPath. - -2007-08-20 Miguel Sofer - - * generic/tclExecute.c (INST_SUB): fix usage of the new macro for - overflow detection in sums, adapt to subtraction. Lengthy comment - added. - -2007-08-19 Donal K. Fellows - - * generic/tclExecute.c (Overflowing, TclIncrObj, TclExecuteByteCode): - Encapsulate Miguel's last change in a more mnemonic macro. - -2007-08-19 Miguel Sofer - - * generic/tclExecute.c: changed the check for overflow in sums, - reducing objsize, number of branches and cache misses (according to - cachegrind). Non-overflow for s=a+b: - previous - ((a >= 0 || b >= 0 || s < 0) && (s >= 0 || b < 0 || a < 0)) - now - (((a^s) >= 0) || ((a^b) < 0)) - This expresses: "a and s have the same sign or else a and b have - different sign". - -2007-08-19 Donal K. Fellows - - * doc/interp.n (RESOURCE LIMITS): Added text to better explain why - time limits are described using absolute times. [Bug 1752148] - -2007-08-16 Miguel Sofer - - * generic/tclVar.c: improved localVarNameType caching to leverage - the new availability of Tcl_Obj in variable names, avoiding string - comparisons to verify that the cached value is usable. - - * generic/tclExecute.c: check the two most frequent instructions - before the switch. Reduces both runtime and obj size a tiny bit. - -2007-08-16 Don Porter - - * generic/tclCompExpr.c: Added a "constant" field to the OpNode - struct (again "free" due to alignment requirements) to mark those - subexpressions that are completely known at compile time. Enhanced - CompileExprTree() and its callers to precompute these constant - subexpressions at compile time. This resolves the issue raised in [Bug - 1564517]. - -2007-08-15 Donal K. Fellows - - * generic/tclIOUtil.c (TclGetOpenModeEx): Only set the O_APPEND flag - * tests/ioUtil.test (ioUtil-4.1): on a channel for the 'a' - mode and not for 'a+'. [Bug 1773127] - -2007-08-14 Miguel Sofer - - * generic/tclExecute.c (INST_INVOKE*): peephole opt, do not get the - interp's result if it will be pushed/popped. - -2007-08-14 Don Porter - - * generic/tclBasic.c: Use fully qualified variable names for - * tests/thread.test: ::errorInfo and ::errorCode so that string - * tests/trace.test: reported to variable traces are fully - qualified in agreement with Tcl 8.4 operations. - -2007-08-14 Daniel Steffen - - * unix/tclLoadDyld.c: use dlfcn API on Mac OS X 10.4 and later; fix - issues with loading from memory on intel and 64bit; add debug messages - - * tests/load.test: add test load-10.1 for loading from vfs. - - * unix/dltest/pkga.c: whitespace & comment cleanup, remove - * unix/dltest/pkgb.c: unused pkgf.c. - * unix/dltest/pkgc.c: - * unix/dltest/pkge.c: - * unix/dltest/pkgf.c (removed): - * unix/dltest/pkgua.c: - * macosx/Tcl.xcodeproj/project.pbxproj: - -2007-08-13 Don Porter - - * generic/tclExecute.c: Provide DECACHE/CACHE protection to the - * tests/trace.test: Tcl_LogCommandInfo() call. [Bug 1773040] - -2007-08-12 Miguel Sofer - - * generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macro - instead of calling the function. - - * generic/tcl_Obj.c (TclAllocateFreeObjects): remove unneeded memset - to 0 of all allocated objects. - -2007-08-10 Miguel Sofer - - * generic/tclInt.h: remove redundant ops in TclNewStringObj macro. - -2007-08-10 Miguel Sofer - - * generic/tclInt.h: fix the TclSetVarNamespaceVar macro, was causing a - leak. - -2007-08-10 Don Porter - - * generic/tclCompExpr.c: Revise CompileExprTree() to use the - OpNode mark field scheme of tree traversal. This eliminates the need - to use magic values in the left and right fields for that purpose. - Also stop abusing the left field within ParseExpr() to store the - number of arguments in a parsed function call. CompileExprTree() now - determines that for itself at compile time. Then reorder code to - eliminate duplication. - -2007-08-09 Miguel Sofer - - * generic/tclProc.c (TclCreateProc): better comments on the required - varflag values when loading precompiled procs. - - * generic/tclExecute.c (INST_STORE_ARRAY): - * tests/trace.test (trace-2.6): whole array write traces on compiled - local variables were not firing. [Bug 1770591] - -2007-08-08 Jeff Hobbs - - * generic/tclProc.c (InitLocalCache): reference firstLocalPtr via - procPtr. codePtr->procPtr == NULL exposed by tbcload. - -2007-08-08 Don Porter - - * generic/tclExecute.c: Corrected failure to compile/link in the - -DNO_WIDE_TYPE configuration. - - * generic/tclExecute.c: Corrected improper use of bignum arguments to - * tests/expr.test: *SHIFT operations. [Bug 1770224] - -2007-08-07 Miguel Sofer - - * generic/tclInt.h: remove comments refering to VAR_SCALAR, as that - flag bit does not exist any longer. - * generic/tclProc.c (InitCompiledLocals): removed optimisation for - non-resolved case, as the function is never called in that case. - Renamed the function to InitResolvedLocals to calrify the point. - - * generic/tclInt.decls: Exporting via stubs to help xotcl adapt to - * generic/tclInt.h: VarReform. - * generic/tclIntDecls.h: - * generic/tclStubInit.c: - -2007-08-07 Daniel Steffen - - * generic/tclEnv.c: improve environ handling on Mac OS X (adapted - * unix/tclUnixPort.h: from Apple changes in Darwin tcl-64). - - * unix/Makefile.in: add support for compile flags specific to - object files linked directly into executables. - - * unix/configure.in (Darwin): only use -seg1addr flag when prebinding; - use -mdynamic-no-pic flag for object files linked directly into exes; - support overriding TCL_PACKAGE_PATH/TCL_MODULE_PATH in environment. - - * unix/configure: autoconf-2.59 - -2007-08-06 Don Porter - - * tests/parseExpr.test: Update source file name of expr parser code. - - * generic/tclCompExpr.c: Added a "mark" field to the OpNode - struct, which is used to guide tree traversal. This field costs - nothing since alignement requirements used the memory already. - Rewrote ConvertTreeToTokens() to use the new field, which permitted - consolidation of utility routines CopyTokens() and - GenerateTokensForLiteral(). - -2007-08-06 Kevin B. Kenny - - * generic/tclGetDate.y: Added a cast to the definition of YYFREE to - silence compiler warnings. - * generic/tclDate.c: Regenerated - * win/tclWinTest.c: Added a cast to GetSecurityDescriptorDacl call - to silence compiler warnings. - -2007-08-04 Miguel Sofer - - * generic/tclInt.decls: Exporting via stubs to help itcl adapt to - * generic/tclInt.h: VarReform. Added localCache initialization - * generic/tclIntDecls.h: to TclInitCompiledLocals (which only exists - * generic/tclProc.c: for itcl). - * generic/tclStubInit.c: - * generic/tclVar.c: - -2007-08-01 Donal K. Fellows - - * library/word.tcl: Rewrote for greater efficiency. [Bug 1764318] - -2007-08-01 Pat Thoyts - - * generic/tclInt.h: Added a TclOffset macro ala Tk_Offset to - * generic/tclVar.c: abstract out 'offsetof' which may not be - * generic/tclExceute.c: defined (eg: msvc6). - -2007-08-01 Miguel Sofer - - * generic/tclVar.c (TclCleanupVar): fix [Bug 1765225], thx Larry - Virden. - -2007-07-31 Miguel Sofer - - * doc/Hash.3: - * generic/tclHash.c: - * generic/tclObj.c: - * generic/tclThreadStorage.c: (changes part of the patch below) - Stop Tcl_CreateHashVar from resetting hPtr->clientData to NULL after - calling the allocEntryProc for a custom table. - - * generic/tcl.h: - * generic/tclBasic.c: - * generic/tclCmdIL.c: - * generic/tclCompCmds.c: - * generic/tclCompile.c: - * generic/tclCompile.h: - * generic/tclExecute.c: - * generic/tclHash.c: - * generic/tclInt.decls: - * generic/tclInt.h: - * generic/tclIntDecls.h: - * generic/tclLiteral.c: - * generic/tclNamesp.c: - * generic/tclObj.c: - * generic/tclProc.c: - * generic/tclThreadStorage.c: - * generic/tclTrace.c: - * generic/tclVar.c: VarReform [Patch 1750051] - - *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h) - Extensions that access internals defined in tclInt.h and/or - tclCompile.h may lose both binary and source compatibility. The - relevant changes are: - 1. 'struct Var' is completely changed, all acceses to its internals - (either direct or via the TclSetVar* and TclIsVar* macros) will - malfunction. Var flag values and semantics changed too. - 2. 'struct Bytecode' has an additional field that has to be - initialised to NULL - 3. 'struct Namespace' is larger, as the varTable is now one pointer - larger than a Tcl_HashTable. Direct access to its fields will - malfunction. - 4. 'struct CallFrame' grew one more field (the second such growth with - respect to Tcl8.4). - 5. API change for the functions TclFindCompiledLocal, TclDeleteVars - and many internal functions in tclVar.c - - Additionally, direct access to variable hash tables via the standard - Tcl_Hash* interface is to be considered as deprecated. It still works - in the present version, but will be broken by further specialisation - of these hash tables. This concerns especially the table of array - elements in an array, as well as the varTable field in the Namespace - struct. - -2007-07-31 Miguel Sofer - - * unix/configure.in: allow use of 'inline' in Tcl sources. [Patch - * win/configure.in: 1754128] - * win/makefile.vc: Regen with autoconf 2.61 - -2007-07-31 Donal K. Fellows - - * unix/tclUnixInit.c (TclpSetVariables): Use the thread-safe getpwuid - replacement to fill the tcl_platform(user) field as it is not subject - to spoofing. [Bug 681877] - - * unix/tclUnixCompat.c: Simplify the #ifdef logic. - - * unix/tclUnixChan.c (FileWatchProc): Fix test failures. - -2007-07-30 Donal K. Fellows - - * unix/tclUnixChan.c (SET_BITS, CLEAR_BITS): Added macros to make this - file clearer. - -2007-07-24 Miguel Sofer - - * generic/tclBasic.c (TEOvI, GetCommandSource): - * generic/tclExecute.c (TEBC, TclGetSrcInfoForCmd): - * generic/tclInt.h: - * generic/tclTrace.c (TclCheck(Interp|Execution)Traces): - Removed the need for TEBC to inspect the command before calling TEOvI, - leveraging the TIP 280 infrastructure. Moved the generation of a - correct nul-terminated command string away from the trace code, back - into TEOvI/GetCommandSource. - -2007-07-20 Andreas Kupries - - * library/platform/platform.tcl: Fixed bug in 'platform::patterns' - * library/platform/pkgIndex.tcl: where identifiers not matching - * unix/Makefile.in: the special linux and solaris forms would not - * win/Makefile.in: get 'tcl' as an acceptable platform added to - * doc/platform.n: the result. Bumped package to version 1.0.3 and - * doc/platform_shell.n: updated documentation and Makefiles. Also - fixed bad version info in the documentation of platform::shell. - -2007-07-19 Don Porter - - * generic/tclParse.c: In contexts where interp and parsePtr->interp - might be different, be sure to use the latter for error reporting. - Also pulled the interp argument back out of ParseTokens() since we - already had a parsePtr->interp to work with. - -2007-07-18 Don Porter - - * generic/tclCompExpr.c: Removed unused arguments and variables - -2007-07-17 Don Porter - - * generic/tclCompExpr.c (ParseExpr): While adding comments to - explain the operations of ParseExpr(), made significant revisions to - the code so it would be easier to explain, and in the process made the - code simpler and clearer as well. - -2007-07-15 Don Porter - - * generic/tclCompExpr.c: More commentary. - * tests/parseExpr.test: Several tests of syntax error messages - to check that when expression substrings are truncated they leave - visible the context relevant to the reported error. - -2007-07-12 Don Porter - - * generic/tclCompExpr.c: Factored out, corrected, and commented - common code for reporting syntax errors in LEAF elements. - -2007-07-11 Miguel Sofer - - * generic/tclCompCmds.c (TclCompileWhileCmd): - * generic/tclCompile.c (TclCompileScript): - Corrected faulty avoidance of INST_START_CMD when the first opcode in - a script is within a loop (as produced by 'while 1'), so that the - corresponding command is properly counted. [Bug 1752146] - -2007-07-11 Don Porter - - * generic/tclCompExpr.c: Added a "parseOnly" flag argument to - ParseExpr() to indicate whether the caller is Tcl_ParseExpr(), with an - end goal of filling a Tcl_Parse with Tcl_Tokens representing the - parsed expression, or TclCompileExpr() with the goal of compiling and - executing the expression. In the latter case, more aggressive - conversion of QUOTED and BRACED lexeme to literals is done. In the - former case, all such conversion is avoided, since Tcl_Token - production would revert it anyway. This enables simplifications to the - GenerateTokensForLiteral() routine as well. - -2007-07-10 Don Porter - - * generic/tclCompExpr.c: Added a field for operator precedence - to be stored directly in the parse tree. There's no memory cost to - this addition, since that memory would have been lost to alignment - issues anyway. Also, converted precedence definitions and lookup - tables to use symbolic constants instead of raw number for improved - readability, and continued extending/improving/correcting comments. - Removed some unused counter variables. Renamed some variables for - clarity and replaced some cryptic logic with more readable macros. - -2007-07-09 Don Porter - - * generic/tclCompExpr.c: Revision so that the END lexeme never - gets inserted into the parse tree. Later tree traversal never reaches - it since its location in the tree is not variable. Starting and - stopping with the START lexeme (node 0) is sufficient. Also finished - lexeme code commentary. - - * generic/tclCompExpr.c: Added missing creation and return of - the Tcl_Parse fields that indicate error conditions. [Bug 1749987] - -2007-07-05 Don Porter - - * library/init.tcl (unknown): Corrected inconsistent error message - in interactive [unknown] when empty command is invoked. [Bug 1743676] - -2007-07-05 Miguel Sofer - - * generic/tclNamesp.c (SetNsNameFromAny): - * generic/tclObj.c (SetCmdNameFromAny): Avoid unnecessary - ckfree/ckalloc when the old structs can be reused. - -2007-07-04 Miguel Sofer - - * generic/tclNamesp.c: Fix case where a FQ cmd or ns was being cached - * generic/tclObj.c: in a different interp, tkcon. [Bug 1747512] - -2007-07-03 Don Porter - - * generic/tclCompExpr.c: Revised #define values so that there - is now more expansion room to define more BINARY operators. - -2007-07-02 Donal K. Fellows - - * generic/tclHash.c (CompareStringKeys): Always use the strcmp() - version; the operation is functionally equivalent, the speed is - identical (up to measurement limitations), and yet the code is - simpler. [FRQ 951168] - -2007-07-02 Don Porter - - * generic/tcl.h: Removed TCL_PRESERVE_BINARY_COMPATIBILITY and - * generic/tclHash.c: any code enabled when it is set to 0. We will - * generic/tclStubInit.c: always want to preserve binary compat - of the structs that appear in the interface through the 8.* series of - releases, so it's pointless to drag around this never-enabled - alternative. - - * generic/tclIO.c: Removed dead code. - * unix/tclUnixChan.c: - - * generic/tclCompExpr.c: Removed dead code, old implementations - * generic/tclEvent.c: of expr parsing and compiling, including the - * generic/tclInt.h: routine TclFinalizeCompilation(). - -2007-06-30 Donal K. Fellows - - * generic/tclCmdIL.c (Tcl_LsortObjCmd): Plug a memory leak caused by a - missing Tcl_DecrRefCount on an error path. [Bug 1717186] - -2007-06-30 Zoran Vasiljevic - - * generic/tclThread.c: Prevent RemeberSyncObj() from growing the sync - object lists by reusing already free'd slots, if possible. See - discussion on Bug 1726873 for more information. - -2007-06-29 Donal K. Fellows - - * doc/DictObj.3 (Tcl_DictObjDone): Improved documentation of this - function to make it clearer how to use it. [Bug 1710795] - -2007-06-29 Daniel Steffen - - * generic/tclAlloc.c: on Darwin, ensure memory allocated by - * generic/tclThreadAlloc.c: the custom TclpAlloc()s is aligned to - 16 byte boundaries (as is the case with the Darwin system malloc). - - * generic/tclGetDate.y: use ckalloc/ckfree instead of malloc/free. - * generic/tclDate.c: bison 1.875e - - * generic/tclBasic.c (TclEvalEx): fix warnings. - - * macosx/Tcl.xcodeproj/project.pbxproj: better support for renamed tcl - * macosx/Tcl.xcodeproj/default.pbxuser: source dir; add 10.5 SDK build - * macosx/Tcl-Common.xcconfig: config; remove tclMathOp.c. - - * macosx/README: document Tcl.xcodeproj changes. - -2007-06-28 Don Porter - - * generic/tclBasic.c: Removed dead code, including the - * generic/tclExecute.c: entire file tclMathOp.c. - * generic/tclInt.h: - * generic/tclMathOp.c (removed): - * generic/tclTestObj.c: - * win/tclWinFile.c: - - * unix/Makefile.in: Updated to reflect deletion of tclMathOp.c. - * win/Makefile.in: - * win/makefile.bc: - * win/makefile.vc: - -2007-06-28 Pat Thoyts - - * generic/tclBasic.c: Silence constness warnings for TclStackFree - * generic/tclCompCmds.c: when building with msvc. - * generic/tclFCmd.c: - * generic/tclIOCmd.c: - * generic/tclTrace.c: - -2007-06-28 Miguel Sofer - - * generic/tclVar.c (UnsetVarStruct): fix possible segfault. - -2007-06-27 Don Porter - - * generic/tclTrace.c: Corrected broken trace reversal logic in - * generic/tclTest.c: TclCheckInterpTraces that led to infinite loop - * tests/trace.test: when multiple Tcl_CreateTrace traces were set - and one of them did not fire due to level restrictions. [Bug 1743931] - -2007-06-26 Don Porter - - * generic/tclBasic.c (TclEvalEx): Moved some arrays from the C - stack to the Tcl stack. - -2007-06-26 Miguel Sofer - - * generic/tclVar.c (UnsetVarStruct): more streamlining. - -2007-06-25 Don Porter - - * generic/tclExecute.c: Safety checks to avoid crashes in the - TclStack* routines when called with an incompletely initialized - interp. [Bug 1743302] - -2007-06-25 Miguel Sofer - - * generic/tclVar.c (UnsetVarStruct): fixing incomplete change, more - streamlining. - -2007-06-24 Miguel Sofer - - * generic/tclVar.c (TclDeleteCompiledLocalVars): removed inlining that - ended up not really optimising (limited benchmarks). Now calling - UnsetVarStruct (streamlined old code is #ifdef'ed out, in case better - benchmarks do show a difference). - - * generic/tclVar.c (UnsetVarStruct): fixed a leak introduced in last - commit. - -2007-06-23 Miguel Sofer - - * generic/tclVar.c (UnsetVarStruct, TclDeleteVars): made the logic - slightly clearer, eliminated some duplicated code. - - *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and Var struct users) - The core never builds VAR_LINK variable to have traces. Such a - "monster", should one exist, will now have its unset traces called - *before* it is unlinked. - -2007-06-23 Daniel Steffen - - * macosx/tclMacOSXNotify.c (AtForkChild): don't call CoreFoundation - APIs after fork() on systems where that would lead to an abort(). - -2007-06-22 Don Porter - - * generic/tclExecute.c: Revised TclStackRealloc() signature to better - * generic/tclInt.h: parallel (and fall back on) Tcl_Realloc. - - * generic/tclNamesp.c (TclResetShadowesCmdRefs): Replaced - ckrealloc based allocations with TclStackRealloc allocations. - - * generic/tclCmdIL.c: More conversions to use TclStackAlloc. - * generic/tclScan.c: - -2007-06-21 Don Porter - - * generic/tclBasic.c: Move most instances of the Tcl_Parse struct - * generic/tclCompExpr.c: off the C stack and onto the Tcl stack. This - * generic/tclCompile.c: is a rather large struct (> 3kB). - * generic/tclParse.c: - -2007-06-21 Miguel Sofer - - * generic/tclBasic.c (TEOvI): Made sure that leave traces - * generic/tclExecute.c (INST_INVOKE): that were created during - * tests/trace.test (trace-36.2): execution of an originally - untraced command do not fire [Bug 1740962], partial fix. - -2007-06-21 Donal K. Fellows - - * generic/tcl.h, generic/tclCompile.h, generic/tclCompile.c: Remove - references in comments to obsolete {expand} notation. [Bug 1740859] - -2007-06-20 Miguel Sofer - - * generic/tclVar.c: streamline namespace vars deletion: only compute - the variable's full name if the variable is traced. - -2007-06-20 Don Porter - - * generic/tclInt.decls: Revised the interfaces of the routines - * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them - easier for callers to use (or more precisely, harder to misuse). - TclStackFree now takes a (void *) argument which is the pointer - intended to be freed. TclStackFree will panic if that's not actually - the memory the call will free. TSA/TSF also now tolerate receiving - (interp == NULL), in which case they simply fall back to be calls to - Tcl_Alloc/Tcl_Free. - - * generic/tclIntDecls.h: make genstubs - - * generic/tclBasic.c: Updated callers - * generic/tclCmdAH.c: - * generic/tclCmdIL.c: - * generic/tclCompCmds.c: - * generic/tclCompExpr.c: - * generic/tclCompile.c: - * generic/tclFCmd.c: - * generic/tclFileName.c: - * generic/tclIOCmd.c: - * generic/tclIndexObj.c: - * generic/tclInterp.c: - * generic/tclNamesp.c: - * generic/tclProc.c: - * generic/tclTrace.c: - * unix/tclUnixPipe.c: - -2007-06-20 Jeff Hobbs - - * tools/tcltk-man2html.tcl: revamp of html doc output to use CSS, - standardized headers, subheaders, dictionary sorting of names. - -2007-06-18 Jeff Hobbs - - * tools/tcltk-man2html.tcl: clean up copyright merging and output. - clean up coding constructs. - -2007-06-18 Miguel Sofer - - * generic/tclCmdIL.c (InfoFrameCmd): - * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): - * generic/tclCompile.c (TclInitCompileEnv): - * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Moved the - CmdFrame off the C stack and onto the Tcl stack. - - * generic/tclExecute.c (TEBC): Moved the CmdFrame off the C stack and - onto the Tcl stack, between the catch and the execution stacks - -2007-06-18 Don Porter - - * generic/tclBasic.c (TclEvalEx,TclEvalObjEx): Moved the CmdFrame off - the C stack and onto the Tcl stack. - -2007-06-17 Donal K. Fellows - - * generic/tclProc.c (TclObjInterpProcCore): Minor fixes to make - * generic/tclExecute.c (TclExecuteByteCode): compilation debugging - builds work again. [Bug 1738542] - -2007-06-16 Donal K. Fellows - - * generic/tclProc.c (TclObjInterpProcCore): Use switch instead of a - chain of if's for a modest performance gain and a little more clarity. - -2007-06-15 Miguel Sofer - - * generic/tclCompCmds.c: Simplified [variable] compiler and executor. - * generic/tclExecute.c: Missed updates to "there is always a valid - frame". - - * generic/tclCompile.c: reverted TclEvalObjvInternal and INST_INVOKE - * generic/tclExecute.c: to essentially what they were previous to the - * generic/tclBasic.c: commit of 2007-04-03 [Patch 1693802] and the - subsequent optimisations, as they break the new trace tests described - below. - - * generic/trace.test: added tests 36 to 38 for dynamic trace creation - and addition. These tests expose a change in dynamics due to a recent - round of optimisations. The "correct" behaviour is not described in - docs nor TIP 62. - -2007-06-14 Miguel Sofer - - * generic/tclInt.decls: Modif to the internals of TclObjInterpProc - * generic/tclInt.h: to reduce stack consumption and improve task - * generic/tclIntDecls.h: separation. Changes the interface of - * generic/tclProc.c: TclObjInterpProcCore (patching TclOO - simultaneously). - - * generic/tclProc.c (TclObjInterpProcCore): simplified obj management - in wrongNumArgs calls. - -2007-06-14 Don Porter - - * generic/tclCompile.c: SetByteCodeFromAny() can no longer return any - * generic/tclExecute.c: code other than TCL_OK, so remove code that - * generic/tclProc.c: formerly handled exceptional codes. - -2007-06-13 Miguel Sofer - - * generic/tclExecute.c (TclCompEvalObj): missed update to "there is - always a valid frame". - - * generic/tclProc.c (TclObjInterpProcCore): call TEBC directly instead - of going through TclCompEvalObj - no need to check the compilation's - freshness, this has already been done. This improves speed and should - also provide some relief to [Bug 1066755]. - -2007-06-12 Donal K. Fellows - - * generic/tclBasic.c (Tcl_CreateInterp): Turn the [info] command into - * generic/tclCmdIL.c (TclInitInfoCmd): an ensemble, making it easier - for third-party code to plug into. - - * generic/tclIndexObj.c (Tcl_WrongNumArgs): - * generic/tclNamesp.c, generic/tclInt.h (tclEnsembleCmdType): Make - Tcl_WrongNumArgs do replacement correctly with ensembles and other - sorts of complex replacement strategies. - -2007-06-11 Miguel Sofer - - * generic/tclExecute.c: comments added to explain iPtr->numLevels - management. - - * generic/tclNamesp.c: tweaks to Tcl_GetCommandFromObj and - * generic/tclObj.c: TclGetNamespaceFromObj; modified the usage of - structs ResolvedCmdName and ResolvedNsname so that the field refNsPtr - is NULL for fully qualified names. - -2007-06-10 Miguel Sofer - - * generic/tclBasic.c: Further TEOvI split, creating a new - * generic/tclCompile.h: TclEvalObjvKnownCommand() function to handle - * generic/tclExecute.c: commands that are already known and are not - traced. INST_INVOKE now calls into this function instead of inlining - parts of TEOvI. Same perf, better isolation. - - ***POTENTIAL INCOMPAT*** There is a subtle issue with the timing of - execution traces that is changed here - first change appeared in my - commit of 2007-04-03 [Patch 1693802], which caused some divergence - between compiled and non-compiled code. - ***THIS CHANGE IS UNDER REVIEW*** - -2007-06-10 Jeff Hobbs - - * README: updated links. [Bug 1715081] - - * generic/tclExecute.c (TclExecuteByteCode): restore support for - INST_CALL_BUILTIN_FUNC1 and INST_CALL_FUNC1 bytecodes to support 8.4- - precompiled sources (math functions). [Bug 1720895] - -2007-06-10 Miguel Sofer - - * generic/tclInt.h: - * generic/tclNamesp.c: - * generic/tclObj.c: - * generic/tclvar.c: new macros TclGetCurrentNamespace() and - TclGetGlobalNamespace(); Tcl_GetCommandFromObj and - TclGetNamespaceFromObj rewritten to make the logic clearer; slightly - faster too. - -2007-06-09 Miguel Sofer - - * generic/tclExecute.c (INST_INVOKE): isolated two vars to the small - block where they are actually used. - - * generic/tclObj.c (Tcl_GetCommandFromObj): rewritten to make the - logic clearer; slightly faster too. - - * generic/tclBasic.c: Split TEOv in two, by separating a processor - for non-TCL_OK returns. Also split TEOvI in a full version that - handles non-existing and traced commands, and a separate shorter - version for the regular case. - - * generic/tclBasic.c: Moved the generation of command strings for - * generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now in - TclCheck[Interp|Execution]Traces(). Also insured that the strings are - properly NUL terminated at the correct length. [Bug 1693986] - - ***POTENTIAL INCOMPATIBILITY in internal API*** - The functions TclCheckInterpTraces() and TclCheckExecutionTraces() (in - internal stubs) used to be noops if the command string was NULL, this - is not true anymore: if the command string is NULL, they generate an - appropriate string from (objc,objv) and use it to call the traces. The - caller might as well not call them with a NULL string if he was - expecting a noop. - - * generic/tclBasic.c: Extend usage of TclLimitReady() and - * generic/tclExecute.c: (new) TclLimitExceeded() macros. - * generic/tclInt.h: - * generic/tclInterp.c: - - * generic/tclInt.h: New TclCleanupCommandMacro for core usage. - * generic/tclBasic.c: - * generic/tclExecute.c: - * generic/tclObj.c: - -2007-06-09 Daniel Steffen - - * macosx/Tcl.xcodeproj/project.pbxproj: add new Tclsh-Info.plist.in. - -2007-06-08 Donal K. Fellows - - * generic/tclCmdMZ.c (Tcl_StringObjCmd): Changed [string first] and - * doc/string.n: [string last] so that they have clearer descriptions - for those people who know the adage about needles and haystacks. This - follows suggestions on comp.lang.tcl... - -2007-06-06 Miguel Sofer - - * generic/tclParse.c: fix for uninit read. [Bug 1732414] - -2007-06-06 Daniel Steffen - - * macosx/Tcl.xcodeproj/project.pbxproj: add settings for Fix&Continue. - - * unix/configure.in (Darwin): add plist for tclsh; link the - * unix/Makefile.in (Darwin): Tcl and tclsh plists into - * macosx/Tclsh-Info.plist.in (new): their binaries in all cases. - * macosx/Tcl-Common.xcconfig: - - * unix/tcl.m4 (Darwin): fix CF checks in fat 32&64bit builds. - * unix/configure: autoconf-2.59 - -2007-06-05 Don Porter - - * generic/tclBasic.c: Added interp flag value ERR_LEGACY_COPY to - * generic/tclInt.h: control the timing with which the global - * generic/tclNamesp.c: variables ::errorCode and ::errorInfo get - * generic/tclProc.c: updated after an error. This keeps more - * generic/tclResult.c: precise compatibility with Tcl 8.4. - * tests/result.test (result-6.2): [Bug 1649062] - -2007-06-05 Miguel Sofer - - * generic/tclInt.h: - * generic/tclExecute.c: Tcl-stack reform, [Patch 1701202] - -2007-06-03 Daniel Steffen - - * unix/Makefile.in: add datarootdir to silence autoconf-2.6x warning. - -2007-05-30 Don Porter - - * generic/tclBasic.c: Removed code that dealt with - * generic/tclCompile.c: TCL_TOKEN_EXPAND_WORD tokens representing - * generic/tclCompile.h: expanded literal words. These sections were - mostly in place to enable [info frame] to discover line information in - expanded literals. Since the parser now generates a token for each - post-expansion word referring to the right location in the original - script string, [info frame] gets all the data it needs. - - * generic/tclInt.h: Revised the parser so that it never produces - * generic/tclParse.c: TCL_TOKEN_EXPAND_WORD tokens when parsing an - * tests/parse.test: expanded literal word; that is, something like - {*}{x y z}. Instead, generate the series of TCL_TOKEN_SIMPLE_WORD - tokens to represent the words that expansion of the literal string - produces. [RFE 1725186] - -2007-05-29 Jeff Hobbs - - * unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling of - pthread_join exit return code storage. [Bug 1712723] - -2007-05-22 Don Porter - - [core-stabilizer-branch] - - * unix/configure: autoconf-2.59 (FC6 fork) - * win/configure: - - * README: Bump version number to 8.5b1 - * generic/tcl.h: - * library/init.tcl: - * tools/tcl.wse.in: - * unix/configure.in: - * unix/tcl.spec: - * win/configure.in: - -2007-05-18 Don Porter - - * unix/configure: autoconf-2.59 (FC6 fork) - * win/configure: - - * README: Bump version number to 8.5a7 - * generic/tcl.h: - * library/init.tcl: - * tools/tcl.wse.in: - * unix/configure.in: - * unix/tcl.spec: - * win/configure.in: - - * generic/tclParse.c: Disable and remove the ALLOW_EXPAND sections - * tests/info.test: that continued to support the deprecated - * tests/mathop.test: {expand} syntax. Updated the few remaining - users of that syntax in the test suite. - -2007-05-17 Donal K. Fellows - - * generic/tclExecute.c (TclLimitReady): Created a macro version of - Tcl_LimitReady just for TEBC, to reduce the amount of times that the - bytecode engine calls out to external functions on the critical path. - * generic/tclInterp.c (Tcl_LimitReady): Added note to remind anyone - doing maintenance that there is a macro version to update. - -2007-05-17 Daniel Steffen - - * generic/tcl.decls: workaround 'make checkstubs' failures from - tclStubLib.c MODULE_SCOPE revert. [Bug 1716117] - -2007-05-16 Joe English - - * generic/tclStubLib.c: Change Tcl_InitStubs(), tclStubsPtr, and the - auxilliary stubs table pointers back to public visibility. - - These symbols need to be exported so that stub-enabled extensions may - be statically linked into an extended tclsh or Big Wish with a - dynamically-linked libtcl. [Bug 1716117] - -2007-05-15 Don Porter - - * win/configure: autoconf-2.59 (FC6 fork) - - * library/reg/pkgIndex.tcl: Bump to registry 1.2.1 to account for - * win/configure.in: [Bug 1682211] fix. - * win/makefile.bc: - * win/tclWinReg.c: - -2007-05-11 Pat Thoyts - - * generic/tclInt.h: Removed TclEvalObjEx and TclGetSrcInfoForPc from - tclInt.h now they are in the internal stubs table. - -2007-05-09 Don Porter - - * generic/tclInt.h: TclFinalizeThreadAlloc() is always defined, so - make sure it is also always declared (with MODULE_SCOPE). - -2007-05-09 Daniel Steffen - - * generic/tclInt.h: fix warning when building threaded with -DPURIFY. - - * macosx/Tcl.xcodeproj/project.pbxproj: add 'DebugUnthreaded' & - * macosx/Tcl.xcodeproj/default.pbxuser: 'DebugLeaks' configs and env - var settings needed to run the 'leaks' tool. - -2007-05-07 Don Porter - - [Tcl Bug 1706140] - - * generic/tclLink.c (LinkTraceProc): Update Tcl_VarTraceProcs so - * generic/tclNamesp.c (Error*Read): they call Tcl_InterpDeleted() - * generic/tclTrace.c (Trace*Proc): for themselves, and do not - * generic/tclUtil.c (TclPrecTraceProc): rely on (frequently buggy) - setting of the TCL_INTERP_DESTROYED flag by the trace core. - - * generic/tclVar.c: Update callers of TclCallVarTraces to not pass - in the TCL_INTERP_DESTROYED flag. Also apply filters so that public - routines only pass documented flag values down to lower level routines - - * generic/tclTrace.c (TclCallVarTraces): The setting of the - TCL_INTERP_DESTROYED flag is now done entirely within the - TclCallVarTraces routine, the only place it can be done right. - -2007-05-06 Donal K. Fellows - - * generic/tclInt.h (ExtraFrameInfo): Create a new mechanism for - * generic/tclCmdIL.c (InfoFrameCmd): conveying what information needs - to be added to the results of [info frame] to replace the hack that - was there before. - * generic/tclProc.c (Tcl_ApplyObjCmd): Use the new mechanism for the - [apply] command, the only part of Tcl itself that needs it (so far). - - * generic/tclInt.decls (TclEvalObjEx, TclGetSrcInfoForPc): Expose - these two functions through the internal stubs table, necessary for - extensions that need to integrate deeply with TIP#280. - -2007-05-05 Donal K. Fellows - - * win/tclWinFile.c (TclpGetUserHome): Squelch type-pun warnings in - * win/tclWinInit.c (TclpSetVariables): Win-specific code not found - * win/tclWinReg.c (AppendSystemError): during earlier work on Unix. - -2007-05-04 Kevin B. Kenny - - * generic/tclIO.c (TclFinalizeIOSubsystem): Added an initializer to - silence a spurious gcc warning about use of an uninitialized - variable. - * tests/encoding.test: Modified so that encoding tests happen in a - private namespace, to avoid polluting the global one. This problem was - discovered when running the test suite '-singleproc 1 -skip exec.test' - because the 'path' variable in encoding.test conflicted with the one - in io.test. - * tests/io.test: Made more of the working variables private to the - namespace. - -2007-05-02 Kevin B. Kenny - - * generic/tclTest.c (SimpleMatchInDirectory): Corrected a refcount - imbalance that affected the filesystem-[147]* tests in the test suite. - Thanks to Don Porter for the patch. [Bug 1710707] - * generic/tclPathObj.c (Tcl_FSJoinPath, Tcl_FSGetNormalizedPath): - Corrected several memory leaks that caused refcount imbalances - resulting in memory leaks on Windows. Thanks to Joe Mistachkin for the - patch. - -2007-05-01 Miguel Sofer - - * generic/tclVar.c (TclPtrSetVar): fixed leak whenever newvaluePtr had - refCount 0 and was used for appending (but not lappending). Thanks to - mistachkin and kbk. [Bug 1710710] - -2007-05-01 Kevin B. Kenny - - * generic/tclIO.c (DeleteChannelTable): Made changes so that - DeleteChannelTable tries to close all open channels, not just the - first. [Bug 1710285] - * generic/tclThread.c (TclFinalizeSynchronization): Make sure that TSD - blocks get freed on non-threaded builds. [Bug 1710825] - * tests/utf.test (utf-25.1--utf-25.4): Modified tests to clean up - after the 'testobj' extension to avoid spurious reports of memory - leaks. - -2007-05-01 Don Porter - - * generic/tclCmdMZ.c (STR_MAP): When [string map] has a pure dict map, - a missing Tcl_DictObjDone() call led to a memleak. [Bug 1710709] - -2007-04-30 Daniel Steffen - - * unix/Makefile.in: add 'tclsh' dependency to install targets that - rely on tclsh, fixes parallel 'make install' from empty build dir. - -2007-04-30 Andreas Kupries - - * generic/tclIO.c (FixLevelCode): Corrected reference count - mismanagement of newlevel, newcode. Changed to allocate the Tcl_Obj's - as late as possible, and only when actually needed. [Bug 1705778, leak - K29] - -2007-04-30 Kevin B. Kenny - - * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Corrected - reference count mismanagement on the name of the source file in the - TIP 280 code. [Bug 1705778, leak K02 among other manifestations] - -2007-04-25 Donal K. Fellows - - *** 8.5a6 TAGGED FOR RELEASE *** - - * generic/tclProc.c (TclObjInterpProcCore): Only allocate objects for - error message generation when associated with argument names that are - really used. [Bug 1705778, leak K15] - -2007-04-25 Kevin B. Kenny - - * generic/tclIOUtil.c (Tcl_FSChdir): Changed the memory management so - that the path returned from Tcl_FSGetNativePath is not duplicated - before being stored as the current directory, to avoid a memory leak. - [Bug 1705778, leak K01 among other manifestations] - -2007-04-25 Don Porter - - * generic/tclCompExpr.c (ParseExpr): Revised to be sure that an - error return doesn't prevent all literals getting placed on the - litList to be returned to the caller for freeing. Corrects some - memleaks. [Bug 1705778, leak K23] - -2007-04-25 Daniel Steffen - - * unix/Makefile.in (dist): add macosx/*.xcconfig files to src dist; - copy license.terms to dist macosx dir; fix autoheader bits. - -2007-04-24 Miguel Sofer - - * generic/tclListObj.c: reverting [Patch 738900] (committed on - 2007-04-20). Causes some Tk test breakage of unknown importance, but - the impact of the patch itself is likely to be so small that it does - not warrant investigation at this time. - -2007-04-24 Donal K. Fellows - - * generic/tclDictObj.c (DictKeysCmd): Rewrote so that the lock on the - internal representation of a dict is only set when necessary. [Bug - 1705778, leak K04] - (DictFilterCmd): Added code to drop the lock in the trivial match - case. [Bug 1705778, leak K05] - -2007-04-24 Kevin B. Kenny - - * generic/tclBinary.c: Addressed several code paths where the error - return from the 'binary format' command leaked the result buffer. - * generic/tclListObj.c (TclLsetFlat): Fixed a bug where the new list - under construction was leaked in the error case. [Bug 1705778, leaks - K13 and K14] - -2007-04-24 Jeff Hobbs - - * unix/Makefile.in (dist): add platform library package to src dist - -2007-04-24 Don Porter - - * generic/tclCompExpr.c (ParseExpr): Memory leak in error case; the - literal Tcl_Obj was not getting freed. [Bug 1705778, leak #1 (new)] - - * generic/tclNamesp.c (Tcl_DeleteNamespace): Corrected flaw in the - flag marking scheme to be sure that global namespaces are freed when - their interp is deleted. [Bug 1705778] - -2007-04-24 Kevin B. Kenny - - * generic/tclExecute.c (TclExecuteByteCode): Plugged six memory leaks - in bignum arithmetic. - * generic/tclIOCmd.c (Tcl_ReadObjCmd): Plugged a leak of the buffer - object if the physical read returned an error and the bypass area had - no message. - * generic/tclIORChan.c (TclChanCreateObjCmd): Plugged a leak of the - return value from the "initialize" method of a channel handler. - (All of the above under [Bug 1705778]) - -2007-04-23 Daniel Steffen - - * generic/tclCkalloc.c: fix warnings from gcc build configured with - * generic/tclCompile.c: --enable-64bit --enable-symbols=all. - * generic/tclExecute.c: - - * unix/tclUnixFCmd.c: add workaround for crashing bug in fts_open() - * unix/tclUnixInit.c: without FTS_NOSTAT on 64bit Darwin 8 or earlier. - - * unix/tclLoadDyld.c (TclpLoadMemory): fix (void*) arithmetic. - - * macosx/Tcl-Common.xcconfig: enable more warnings. - - * macosx/Tcl.xcodeproj/project.pbxproj: add 'DebugMemCompile' build - configuration that calls configure with --enable-symbols=all; override - configure check for __attribute__((__visibility__("hidden"))) in Debug - configuration to restore availability of ZeroLink. - - * macosx/tclMacOSXNotify.c: fix warnings. - - * macosx/tclMacOSXFCmd.c: const fixes. - - * macosx/Tcl-Common.xcconfig: fix whitespace. - * macosx/Tcl-Debug.xcconfig: - * macosx/Tcl-Release.xcconfig: - * macosx/README: - - * macosx/GNUmakefile: fix/add copyright and license refs. - * macosx/tclMacOSXBundle.c: - * macosx/Tcl-Info.plist.in: - * macosx/Tcl.xcode/project.pbxproj: - * macosx/Tcl.xcodeproj/project.pbxproj: - - * unix/configure.in: install license.terms into Tcl.framework. - * unix/configure: autoconf-2.59 - -2007-04-23 Don Porter - - * generic/tclVar.c (UnsetVarStruct): Make sure the - TCL_INTERP_DESTROYED flags gets passed to unset trace routines so they - can respond appropriately. [Bug 1705778, leak #9] - -2007-04-23 Miguel Sofer - - * generic/tclCompile.c (TclFreeCompileEnv): Tip 280's new field - extCmdMapPtr was not being freed. [Bug 1705778, leak #1] - -2007-04-23 Kevin B. Kenny - - * generic/tclCompCmds.c (TclCompileUpvarCmd): Plugged a memory leak in - 'upvar' when compiling (a) upvar outside a proc, (b) upvar with a - syntax error, or (c) upvar where the frame index is not known at - compile time. - * generic/tclCompExpr.c (ParseExpr): Plugged a memory leak when - parsing expressions that contain syntax errors. - * generic/tclEnv.c (ReplaceString): Clear memory correctly when - growing the cache to avoid reads of uninitialised data. - * generic/tclIORChan.c (TclChanCreateObjCmd, FreeReflectedChannel): - Plugged two memory leaks. - * generic/tclStrToD.c (AccumulateDecimalDigit): Fixed a mistake where - we'd run beyond the end of the 'pow10_wide' array if a number begins - with a string of more than 'maxpow10_wide' zeroes. - * generic/tclTest.c (Testregexpobjcmd): Removed an invalid access - beyond the end of 'objv' in 'testregexp -about'. - All of these issues reported under [Bug 1705778] - detected with the - existing test suite, no new regression tests required. - -2007-04-22 Miguel Sofer - - * generic/tclVar.c (TclDeleteNamespaceVars): fixed access to freed - memory detected by valgrind: Tcl_GetCurrentNamespace was being - called after freeing root CallFrame (on interp deletion). - -2007-04-20 Miguel Sofer - - * generic/tclListObj.c (SetListFromAny): avoid discarding internal - reps of objects converted to singleton lists. [Patch 738900] - -2007-04-20 Kevin B. Kenny - - * doc/clock.n: Corrected a silly error (transposed 'uppercase' and - 'lowercase' in clock.n. [Bug 1656002] - Clarified that [clock scan] does not recognize a locale's alternative - calendar. - Deleted an entirely superfluous (and also incorrect) remark about the - effect of Daylight Saving Time on relative times in [clock scan]. [Bug - 1582951] - * library/clock.tcl: Corrected an error in skipping over the %Ey field - on input. - * library/msgs/ja.msg: - * tools/loadICU.tcl: Corrected several localisation faults in the - Japanese locale (most notably, incorrect dates for the Emperors' - eras). Many thanks to SourceForge user 'nyademo' for pointing this out - and developing a fix. [Bug 1637471] - * generic/tclPathObj.c: Corrected a 'const'ness fault that caused - bitter complaints from MSVC. - * tests/clock.test (clock-40.1, clock-58.1, clock-59.1): Corrected a - test case that depended on ":localtime" being able to handle dates - prior to the Posix epoch. [Bug 1618445] Added a test case for the - dates of the Japanese emperors. [Bug 1637471] Added a regression test - for military time zone input conversion. [Bug 1586828] - * generic/tclGetDate.y (MilitaryTable): Fixed an ancient bug where the - military NZA time zones had the signs reversed. [Bug 1586828] - * generic/tclDate.c: Regenerated. - * doc/Notifier.3: Documented Tcl_SetNotifier and Tcl_ServiceModeHook. - Quite against my better judgment. [Bug 414933] - * generic/tclBasic.c, generic/tclCkalloc.c, generic/tclClock.c: - * generic/tclCmdIL.c, generic/tclCmdMZ.c, generic/tclFCmd.c: - * generic/tclFileName.c, generic/tclInterp.c, generic/tclIO.c: - * generic/tclIOUtil.c, generic/tclNamesp.c, generic/tclObj.c: - * generic/tclPathObj.c, generic/tclPipe.c, generic/tclPkg.c: - * generic/tclResult.c, generic/tclTest.c, generic/tclTestObj.c: - * generic/tclVar.c, unix/tclUnixChan.c, unix/tclUnixTest.c: - * win/tclWinLoad.c, win/tclWinSerial.c: Replaced commas in varargs - with string concatenation where possible. [Patch 1515234] - * library/tzdata/America/Tegucigalpa: - * library/tzdata/Asia/Damascus: Olson's tzdata 2007e. - -2007-04-19 Donal K. Fellows - - * generic/regcomp.c, generic/regc_cvec.c, generic/regc_lex.c, - * generic/regc_locale.c: Improve the const-correctness of the RE - compiler. - -2007-04-18 Miguel Sofer - - * generic/tclExecute.c (INST_LSHIFT): fixed a mistake introduced in - version 1.266 ('=' became '=='), which effectively turned the block - that handles native shifts into dead code. This explains why the - testsuite did not pick this mistake. Rewrote to make the intention - clear. - - * generic/tclInt.h (TclDecrRefCount): change the order of the - branches, use empty 'if ; else' to handle use in unbraced outer - if/else conditions (as already done in tcl.h) - - * generic/tclExecute.c: slight changes in Tcl_Obj management. - -2007-04-17 Kevin B. Kenny - - * library/clock.tcl: Fixed the naming of - ::tcl::clock::ReadZoneinfoFile because (yoicks!) it was in the global - namespace. - * doc/clock.n: Clarified the cases in which legacy time zone is - recognized. [Bug 1656002] - -2007-04-17 Miguel Sofer - - * generic/tclExecute.c: fixed checkInterp logic [Bug 1702212] - -2007-04-16 Donal K. Fellows - - * various (including generic/tclTest.c): Complete the purge of K&R - function definitions from manually-written code. - -2007-04-15 Kevin B. Kenny - - * generic/tclCompCmds.c: added a cast to silence a compiler error on - VC2005. - * library/clock.tcl: Restored unique-prefix matching of keywords on - the [clock] command. [Bug 1690041] - * tests/clock.test: Added rudimentary test cases for unique-prefix - matching of keywords. - -2007-04-14 Miguel Sofer - - * generic/tclExecute.c: removed some code at INST_EXPAND_SKTOP that - duplicates functionality already present at checkForCatch. - -2007-04-12 Miguel Sofer - - * generic/tclExecute.c: new macros OBJ_AT_TOS, OBJ_UNDER_TOS, - OBJ_AT_DEPTH(n) and CURR_DEPTH that remove all direct references to - tosPtr from TEBC (after initialisation and the code at the label - cleanupV_pushObjResultPtr). - -2007-04-11 Miguel Sofer - - * generic/tclCompCmds.c: moved all exceptDepth management to the - macros - the decreasing half was managed by hand. - -2007-04-10 Donal K. Fellows - - * generic/tclInt.h (TclNewLiteralStringObj): New macro to make - allocating literal string objects (i.e. objects whose value is a - constant string) easier and more efficient, by allowing the omission - of the length argument. Based on [Patch 1529526] (afredd) - * generic/*.c: Make use of this (in many files). - -2007-04-08 Miguel Sofer - - * generic/tclCompile (tclInstructionTable): Fixed bugs in description - of dict instructions. - -2007-04-07 Miguel Sofer - - * generic/tclCompile (tclInstructionTable): Fixed bug in description - of INST_START_COMMAND. - - * generic/tclExecute.c (TEBC): Small code reduction. - -2007-04-06 Miguel Sofer - - * generic/tclExecute.c (TEBC): - * generic/tclNamespace.c (NsEnsembleImplementationCmd): - * generic/tclProc.c (InitCompiledLocals, ObjInterpProcEx) - (TclObjInterpProcCore, ProcCompileProc): Code reordering to reduce - branching and improve branch prediction (assume that forward branches - are typically not taken). - -2007-04-03 Miguel Sofer - - * generic/tclExecute.c: INST_INVOKE optimisation. [Patch 1693802] - -2007-04-03 Don Porter - - * generic/tclNamesp.c: Revised ErrorCodeRead and ErrorInfoRead trace - routines so they guarantee the ::errorCode and ::errorInfo variable - always appear to exist. [Bug 1693252] - -2007-04-03 Miguel Sofer - - * generic/tclInt.decls: Moved TclGetNamespaceFromObj() to the - * generic/tclInt.h: internal stubs table; regen. - * generic/tclIntDecls.h: - * generic/tclStubInit.c: - -2007-04-02 Miguel Sofer - - * generic/tclBasic.c: Added bytecode compilers for the variable - * generic/tclCompCmds.c: linking commands: 'global', 'variable', - * generic/tclCompile.h: 'upvar', 'namespace upvar' [Patch 1688593] - * generic/tclExecute.c: - * generic/tclInt.h: - * generic/tclVar.c: - -2007-04-02 Don Porter - - * generic/tclBasic.c: Replace arrays on the C stack and ckalloc - * generic/tclExecute.c: calls with TclStackAlloc calls to use memory - * generic/tclFCmd.c: on Tcl's evaluation stack. - * generic/tclFileName.c: - * generic/tclIOCmd.c: - * generic/tclIndexObj.c: - * generic/tclInterp.c: - * generic/tclNamesp.c: - * generic/tclTrace.c: - * unix/tclUnixPipe.c: - -2007-04-01 Donal K. Fellows - - * generic/tclCompile.c (TclCompileScript, TclPrintInstruction): - * generic/tclExecute.c (TclExecuteByteCode): Changed the definition of - INST_START_CMD so that it knows how many commands start at the current - location. This makes the interpreter command counter correct without - requiring a large number of instructions to be issued. (See my change - from 2007-01-19 for what triggered this.) - -2007-03-30 Don Porter - - * generic/tclCompile.c: - * generic/tclCompExpr.c: - * generic/tclCompCmds.c: Replace arrays on the C stack and - ckalloc calls with TclStackAlloc calls to use memory on Tcl's - evaluation stack. - - * generic/tclCmdMZ.c: Revised [string to* $s $first $last] - implementation to reduce number of allocs/copies. - - * tests/string.test: More [string reverse] tests. - -2007-03-30 Miguel Sofer - - * generic/tclExecute.c: optimise the lookup of elements of indexed - arrays. - -2007-03-29 Miguel Sofer - - * generic/tclProc.c (Tcl_ApplyObjCmd): - * tests/apply.test (9.3): Fixed Tcl_Obj leak on error return; an - unneeded ref to lambdaPtr was being set and not released on an error - return path. - -2007-03-28 Don Porter - - * generic/tclCmdMZ.c (STR_REVERSE): Implement the actual [string - reverse] command in terms of the new TclStringObjReverse() routine. - - * generic/tclInt.h (TclStringObjReverse): New internal routine - * generic/tclStringObj.c (TclStringObjReverse): that implements the - [string reverse] operation, making use of knowledge/surgery of the - String intrep to minimize the number of allocs and copies needed to do - the job. - -2007-03-27 Don Porter - - * generic/tclCmdMZ.c (STR_MAP): Replace ckalloc calls with - TclStackAlloc calls. - -2007-03-24 Zoran Vasiljevic - - * win/tclWinThrd.c: Thread exit handler marks the current thread as - un-initialized. This allows exit handlers that are registered later to - re-initialize this subsystem in case they need to use some sync - primitives (cond variables) from this file again. - -2007-03-23 Miguel Sofer - - * generic/tclBasic.c (DeleteInterpProc): pop the root frame pointer - before deleting the global namespace [Bug 1658572] - -2007-03-23 Kevin B. Kenny - - * win/Makefile.in: Added code to keep a Cygwin path name from leaking - into LIBRARY_DIR when doing 'make test' or 'make runtest'. - -2007-03-22 Don Porter - - * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Replaced arrays on the - C stack and ckalloc calls with TclStackAlloc calls to use memory on - Tcl's evaluation stack. - - * generic/tclExecute.c: Revised GrowEvaluationStack to take an - argument specifying the growth required by the caller, so that a - single reallocation / copy is the most that will ever be needed even - when required growth is large. - -2007-03-21 Don Porter - - * generic/tclExecute.c: More ckalloc -> ckrealloc conversions. - * generic/tclLiteral.c: - * generic/tclNamesp.c: - * generic/tclParse.c: - * generic/tclPreserve.c: - * generic/tclStringObj.c: - * generic/tclUtil.c: - -2007-03-20 Don Porter - - * generic/tclEnv.c: Some more ckalloc -> ckrealloc replacements. - * generic/tclLink.c: - -2007-03-20 Kevin B. Kenny - - * generic/tclDate.c: Rebuilt, despite Donal Fellows's comment when - committing it that no rebuild was required. - * generic/tclGetDate.y: According to Donal Fellows, "Introduce modern - formatting standards; no need for rebuild of tclDate.c." - - * library/tzdata/America/Cambridge_Bay: - * library/tzdata/America/Havana: - * library/tzdata/America/Inuvik: - * library/tzdata/America/Iqaluit: - * library/tzdata/America/Pangnirtung: - * library/tzdata/America/Rankin_Inlet: - * library/tzdata/America/Resolute: - * library/tzdata/America/Yellowknife: - * library/tzdata/Asia/Choibalsan: - * library/tzdata/Asia/Dili: - * library/tzdata/Asia/Hovd: - * library/tzdata/Asia/Jakarta: - * library/tzdata/Asia/Jayapura: - * library/tzdata/Asia/Makassar: - * library/tzdata/Asia/Pontianak: - * library/tzdata/Asia/Ulaanbaatar: - * library/tzdata/Europe/Istanbul: Upgraded to Olson's tzdata2007d. - - * generic/tclListObj.c (TclLsetList, TclLsetFlat): - * tests/lset.test: Changes to deal with shared internal representation - for lists passed to the [lset] command. Thanks to Don Porter for - fixing this issue. [Bug 1677512] - -2007-03-19 Don Porter - - * generic/tclCompile.c: Revise the various expansion routines for - CompileEnv fields to use ckrealloc() where appropriate. - - * generic/tclBinary.c (Tcl_SetByteArrayLength): Replaced ckalloc() / - memcpy() sequence with ckrealloc() call. - - * generic/tclBasic.c (Tcl_CreateMathFunc): Replaced some calls to - * generic/tclEvent.c (Tcl_CreateThread): Tcl_Alloc() with calls - * generic/tclObj.c (UpdateStringOfBignum): to ckalloc(), which - * unix/tclUnixTime.c (SetTZIfNecessary): better supports memory - * win/tclAppInit.c (setargv): debugging. - -2007-03-19 Donal K. Fellows - - * doc/regsub.n: Corrected example so that it doesn't recommend - potentially unsafe practice. Many thanks to Konstantin Kushnir - for reporting this. - -2007-03-17 Kevin B. Kenny - - * win/tclWinReg.c (GetKeyNames): Size the buffer for enumerating key - names correctly, so that Unicode names exceeding 127 chars can be - retrieved without crashing. [Bug 1682211] - * tests/registry.test (registry-4.9): Added test case for the above - bug. - -2007-03-15 Mo DeJong - - * generic/tclIOUtil.c (Tcl_Stat): Reimplement workaround to avoid gcc - warning by using local variables. When the macro argument is of type - long long instead of long, the incorrect warning is not generated. - -2007-03-15 Mo DeJong - - * win/Makefile.in: Fully qualify LIBRARY_DIR so that `make test` does - not depend on working dir. - -2007-03-15 Mo DeJong - - * tests/parse.test: Add two backslash newline parse tests. - -2007-03-12 Don Porter - - * generic/tclExecute.c (INST_FOREACH_STEP4): Make private copy of - * tests/foreach.test (foreach-10.1): value list to be assigned to - variables so that shimmering of that list doesn't lead to invalid - pointers. [Bug 1671087] - - * generic/tclEvent.c (HandleBgErrors): Make efficient private copy - * tests/event.test (event-5.3): of the command prefix for the interp's - background error handling command to avoid panics due to pointers to - memory invalid after shimmering. [Bug 1670155] - - * generic/tclNamesp.c (NsEnsembleImplementationCmd): Make efficient - * tests/namespace.test (namespace-42.8): private copy of the - command prefix as we invoke the command appropriate to a particular - subcommand of a particular ensemble to avoid panic due to shimmering - of the List intrep. [Bug 1670091] - - * generic/tclVar.c (TclArraySet): Make efficient private copy of - * tests/var.test (var-17.1): the "list" argument to [array set] to - avoid crash due to shimmering invalidating pointers. [Bug 1669489] - -2007-03-12 Donal K. Fellows - - * generic/tclCmdIL.c (Tcl_LsortObjCmd): Fix problems with declaration - positioning and memory leaks. [Bug 1679072] - -2007-03-11 Donal K. Fellows - - * generic/tclCmdIL.c (Tcl_LreverseObjCmd): Ensure that a list is - correctly reversed even if its internal representation is shared - without the object itself being shared. [Bug 1675044] - -2007-03-10 Miguel Sofer - - * generic/tclCmdIL (Tcl_LsortObjCmd): changed fix to [Bug 1675116] to - use the cheaper TclListObjCopy() instead of Tcl_DuplicateObj(). - -2007-03-09 Andreas Kupries - - * library/platform/shell.tcl: Made more robust if an older platform - * library/platform/pkgIndex.tcl: package is present in the inspected - * unix/Makefile.in: shell. Package forget it to prevent errors. Bumped - * win/Makefile.in: package version to 1.1.3, and updated the Makefiles - installing it as Tcl Module. - -2007-03-09 Donal K. Fellows - - * generic/tclCmdIL.c (Tcl_LsortObjCmd): Handle tricky case with loss - * tests/cmdIL.test (cmdIL-1.29): of list rep during sorting due - to shimmering. [Bug 1675116] - -2007-03-09 Kevin B. Kenny - - * library/clock.tcl (ReadZoneinfoFile): Added Y2038 compliance to the - code for version-2 'zoneinfo' files. - * tests/clock.test (clock-56.3): Added a test case for Y2038 and - 'zoneinfo'. Modified test initialisation to use the - 'loadTestedCommands' function of tcltest to bring in the correct path - for the registry library. - -2007-03-08 Don Porter - - * generic/tclListObj.c (TclLsetList): Rewrite so that the routine - itself does not do any direct intrep surgery. Better isolates those - things into the implementation of the "list" Tcl_ObjType. - -2007-03-08 Donal K. Fellows - - * generic/tclListObj.c (TclLindexList, TclLindexFlat): Moved these - functions to tclListObj.c from tclCmdIL.c to mirror the way that the - equivalent functions for [lset]'s guts are arranged. - -2007-03-08 Kevin B. Kenny - - * library/clock.tcl: Further tweaks to the Windows time zone table - (restoring missing Mexican time zones). Added rudimentary handling of - version-2 'zoneinfo' files. Update US DST rules so that zones such as - 'EST5EDT' get the correct transition dates. - * tests/clock.test: Added rudimentary test cases for 'zoneinfo' - parsing. Adjusted several tests that depended on obsolete US DST - transition rules. - -2007-03-07 Daniel Steffen - - * macosx/tclMacOSXNotify.c: add spinlock debugging and sanity checks. - - * macosx/Tcl.xcodeproj/project.pbxproj: ensure gcc version used by - * macosx/Tcl.xcodeproj/default.pbxuser: Xcode and configure/make are - * macosx/Tcl-Common.xcconfig: consistent and independent of - gcc_select default and CC env var; fixes for Xcode 3.0. - - * unix/tcl.m4 (Darwin): s/CFLAGS/CPPFLAGS/ in macosx-version-min check - * unix/configure: autoconf-2.59 - -2007-03-07 Don Porter - - * generic/tclCmdIL.c (TclLindex*): Rewrites to make efficient - private copies of the list and indexlist arguments, so we can operate - on the list elements directly with no fear of shimmering effects. - Replaces defensive coding schemes that are otherwise required. End - result is that TclLindexList is entirely a wrapper around - TclLindexFlat, which is now the core engine of all [lindex] - operations. - - * generic/tclObj.c (Tcl_AppendAllObjTypes): Converted to simpler - list validity test. - -2007-03-07 Donal K. Fellows - - * generic/tclRegexp.c (TclRegAbout): Generate information about a - regexp as a Tcl_Obj instead of as a string, which is more efficient. - -2007-03-07 Kevin B. Kenny - - * library/clock.tcl: Adjusted Windows time zone table to handle new US - DST rules by locale rather than as Posix time zone spec. - * tests/clock.test (clock-39.6, clock-49.2, testclock::registry): - Adjusted tests to simulate new US rules. - * library/tzdata/America/Indiana/Winamac: - * library/tzdata/Europe/Istanbul: - * library/tzdata/Pacific/Easter: - Olson's tzdata2007c. - -2007-03-05 Andreas Kupries - - * library/platform/shell.tcl (::platform::shell::RUN): In the case of - * library/platform/pkgIndex.tcl: a failure put the captured stderr - * unix/Makefile.in: into the error message to aid in debugging. Bumped - * win/Makefile.in: package version to 1.1.2, and updated the makefiles - installing it as Tcl Module. - -2007-03-03 Donal K. Fellows - - * generic/tclLink.c (LinkedVar): Added macro to conceal at least some - of the pointer hackery. - -2007-03-02 Don Porter - - * generic/tclCmdIL.c (Tcl_LreverseObjCmd): Added missing - TclInvalidateStringRep() call when we directly manipulate the intrep - of an unshared "list" Tcl_Obj. [Bug 1672585] - - * generic/tclCmdIL.c (Tcl_JoinObjCmd): Revised [join] implementation - to append Tcl_Obj's instead of strings. [RFE 1669420] - - * generic/tclCmdIL.c (Info*Cmd): Code simplifications and - optimizations. - -2007-03-02 Donal K. Fellows - - * generic/tclCompile.c (TclPrintInstruction): Added a scheme to allow - * generic/tclCompile.h (AuxDataPrintProc): aux-data to be printed - * generic/tclCompCmds.c (Print*Info): out for debugging. For - this to work, immediate operands referring to aux-data must be - identified as such in the instruction descriptor table using - OPERAND_AUX4 (all are always 4 bytes). - - * generic/tclExecute.c (TclExecuteByteCode): Rewrote the compiled - * generic/tclCompCmds.c (TclCompileDictCmd): [dict update] so that it - * generic/tclCompile.h (DictUpdateInfo): stores critical - * tests/dict.test (dict-21.{14,15}): non-varying data in an - aux-data value instead of a (shimmerable) literal. [Bug 1671001] - -2007-03-01 Don Porter - - * generic/tclCmdIL.c (Tcl_LinsertObjCmd): Code simplifications - and optimizations. - - * generic/tclCmdIL.c (Tcl_LreplaceObjCmd): Code simplifications - and optimizations. - - * generic/tclCmdIL.c (Tcl_LrangeObjCmd): Rewrite in the same - spirit; avoid shimmer effects rather than react to them. - - * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Stop throwing away - * tests/foreach.test (foreach-1.14): useful error information when - loop variable sets fail. - - * generic/tclCmdIL.c (Tcl_LassignObjCmd): Rewrite to make an - efficient private copy of the list argument, so we can operate on the - list elements directly with no fear of shimmering effects. Replaces - defensive coding schemes that are otherwise required. - - * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Rewrite to make - efficient private copies of the variable and value lists, so we can - operate on them without any special shimmer defense coding schemes. - -2007-03-01 Donal K. Fellows - - * generic/tclCompCmds.c (TclCompileForeachCmd): Prevent an unexpected - * tests/foreach.test (foreach-9.1): infinite loop when the - variable list is empty and the foreach is compiled. [Bug 1671138] - -2007-02-26 Andreas Kupries - - * generic/tclIORChan.c (FreeReflectedChannel): Added the missing - refcount release between NewRC and FreeRC for the channel handle - object, spotted by Don Porter. [Bug 1667990] - -2007-02-26 Don Porter - - * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Removed surplus - copying of the objv array that used to be a workaround for [Bug - 404865]. That bug is long fixed. - -2007-02-24 Don Porter - - * generic/tclBasic.c: Use new interface in Tcl_EvalObjEx so that the - recounting logic of the List internal rep need not be repeated there. - Better encapsulation of internal details. - - * generic/tclInt.h: New internal routine TclListObjCopy() used - * generic/tclListObj.c: to efficiently do the equivalent of [lrange - $list 0 end]. After some experience with this, might be a good - candidate for exposure as a public interface. It's useful for callers - of Tcl_ListObjGetElements() who want to control the ongoing validity - of the returned objv pointer. - -2007-02-22 Andreas Kupries - - * tests/pkg.test: Added tests for the case of an alpha package - satisfying a require for the regular package, demonstrating a corner - case specified in TIP#280. More notes in the comments to the test. - -2007-02-20 Jan Nijtmans - - * generic/tclInt.decls: Added "const" specifiers in TclSockGetPort - * generic/tclIntDecls.h: regenerated - * generic/*.c: - * unix/tclUnixChan.c - * unix/tclUnixPipe.c - * win/tclWinPipe.c - * win/tclWinSock.c: Added many "const" specifiers in implementation. - -2007-02-20 Don Porter - - * doc/tcltest.n: Typo fix. [Bug 1663539] - -2007-02-20 Pat Thoyts - - * generic/tclFileName.c: Handle extended paths on Windows NT and - * generic/tclPathObj.c: above. These have a \\?\ prefix. [Bug - * win/tclWinFile.c: 1479814] - * tests/winFCmd.test: Tests for extended path handling. - -2007-02-19 Jeff Hobbs - - * unix/tcl.m4: use SHLIB_SUFFIX=".so" on HP-UX ia64 arch. - * unix/configure: autoconf-2.59 - - * generic/tclIOUtil.c (Tcl_FSEvalFileEx): safe incr of objPtr ref. - -2007-02-18 Donal K. Fellows - - * doc/chan.n, doc/clock.n, doc/eval.n, doc/exit.n, doc/expr.n: - * doc/interp.n, doc/open.n, doc/platform_shell.n, doc/pwd.n: - * doc/refchan.n, doc/regsub.n, doc/scan.n, doc/tclvars.n, doc/tm.n: - * doc/unload.n: Apply [Bug 1610310] to fix typos. Thanks to Larry - Virden for spotting them. - - * doc/interp.n: Partial fix of [Bug 1662436]; rest requires some - policy decisions on what should and shouldn't be safe commands from - the "new in 8.5" set. - -2007-02-13 Kevin B. Kenny - - * tools/fix_tommath_h.tcl: Further tweaking for the x86-64. The change - is to make 'mp_digit' be an 'unsigned int' on that platform; since - we're using only 32 bits of it, there's no reason to make it a 64-bit - 'unsigned long.' - * generic/tclTomMath.h: Regenerated. - -2007-02-13 Donal K. Fellows - - * doc/re_syntax.n: Corrected description of 'print' class [Bug - 1614687] and enhanced description of 'graph' class. - -2007-02-12 Kevin B. Kenny - - * tools/fix_tommath_h.tcl: Added code to patch out a check for - __x86_64__ that caused Tommath to use __attributes(TI)__ for the - mp_word type. Tetra-int's simply fail on too many gcc-glibc-OS - combinations to be ready for shipment today, even if they work for - some of us. This change allows reversion of das's change of 2006-08-18 - that accomplised the same thing on Darwin. [Bugs 1601380, 1603737, - 1609936, 1656265] - * generic/tclTomMath.h: Regenerated. - * library/tzdata/Africa/Asmara: - * library/tzdata/Africa/Asmera: - * library/tzdata/America/Nassau: - * library/tzdata/Atlantic/Faeroe: - * library/tzdata/Atlantic/Faroe: - * library/tzdata/Australia/Eucla: - * library/tzdata/Pacific/Easter: Rebuilt from Olson's tzdata2007b. - -2007-02-09 Joe Mistachkin - - * win/nmakehlp.c: Properly cleanup after nmakehlp, including the - * win/makefile.vc: vcX0.pch file. - -2007-02-08 Jeff Hobbs - - * unix/tclUnixInit.c (TclpCheckStackSpace): do stack size checks with - unsigned size_t to correctly validate stackSize in the 2^31+ range. - [Bug 1654104] - -2007-02-08 Don Porter - - * generic/tclNamesp.c: Corrected broken logic in Tcl_DeleteNamespace - * tests/namespace.test: introduced in Patch 1577278 that caused - [namespace delete ::] to be effective only at level #0. New test - namespace-7.7 should prevent similar error in the future [Bug 1655305] - -2007-02-06 Don Porter - - * generic/tclNamesp.c: Corrected broken implementation of the - * tests/namespace.test: TclMatchIsTrivial optimization on [namespace - children $namespace $pattern]. - -2007-02-04 Daniel Steffen - - * unix/tcl.m4: use gcc4's __attribute__((__visibility__("hidden"))) if - available to define MODULE_SCOPE effective on all platforms. - * unix/configure.in: add caching to -pipe and zoneinfo checks. - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2007-02-03 Joe Mistachkin - - * win/rules.vc: Fix platform specific file copy macros for downlevel - Windows. - -2007-01-29 Don Porter - - * generic/tclResult.c: Added optimization case to TclTransferResult to - cover common case where there's big savings over the fully general - path. Thanks to Peter MacDonald. [Bug 1626518] - - * generic/tclLink.c: Broken linked float logic corrected. Thanks to - Andy Goth. [Bug 1602538] - - * doc/fcopy.n: Typo fix. [Bug 1630627] - -2007-01-28 Daniel Steffen - - * macosx/Tcl.xcodeproj/project.pbxproj: extract build settings that - * macosx/Tcl.xcodeproj/default.pbxuser: were common to multiple - * macosx/Tcl-Common.xcconfig (new file): configurations into external - * macosx/Tcl-Debug.xcconfig (new file): xcconfig files; add extra - * macosx/Tcl-Release.xcconfig (new file): configurations for building - with SDKs and 64bit; convert legacy jam-based 'Tcl' target to native - target with single script phase; correct syntax of build setting - references to use $() throughout. - - * macosx/README: document new Tcl.xcodeproj configurations; other - minor updates/corrections. - - * generic/tcl.h: update location of version numbers in macosx files. - - * macosx/Tcl.xcode/project.pbxproj: restore 'tcltest' target to - * macosx/Tcl.xcode/default.pbxuser: working order by replicating - applicable changes to Tcl.xcodeproj since 2006-07-20. - -2007-01-25 Daniel Steffen - - * unix/tcl.m4: integrate CPPFLAGS into CFLAGS as late as possible and - move (rather than duplicate) -isysroot flags from CFLAGS to CPPFLAGS - to avoid errors about multiple -isysroot flags from some older gcc - builds. - - * unix/configure: autoconf-2.59 - -2007-01-22 Donal K. Fellows - - * compat/memcmp.c (memcmp): Reworked so that arithmetic is never - performed upon void pointers, since that is illegal. [Bug 1631017] - -2007-01-19 Donal K. Fellows - - * generic/tclCompile.c (TclCompileScript): Reduce the frequency with - which we issue INST_START_CMD, making bytecode both more compact and - somewhat faster. The optimized case is where we would otherwise be - issuing a sequence of those instructions; in those cases, it is only - ever the first one encountered that could possibly trigger. - -2007-01-19 Joe Mistachkin - - * tools/man2tcl.c: Include stdlib.h for exit() and improve comment - detection. - * win/nmakehlp.c: Update usage. - * win/makefile.vc: Properly build man2tcl.c for MSVC8. - -2007-01-19 Daniel Steffen - - * macosx/tclMacOSXFCmd.c (TclMacOSXSetFileAttribute): on some versions - of Mac OS X, truncate() fails on resource forks, in that case use - open() with O_TRUNC instead. - - * macosx/tclMacOSXNotify.c: accommodate changes to prototypes of - OSSpinLock(Un)Lock API. - - * macosx/Tcl.xcodeproj/project.pbxproj: ensure HOME and USER env vars - * macosx/Tcl.xcodeproj/default.pbxuser: are defined when running - testsuite from Xcode. - - * tests/env.test: add extra system env vars that need to be preserved - on some Mac OS X versions for testsuite to work. - - * unix/Makefile.in: Move libtommath defines into configure.in to - * unix/configure.in: avoid replicating them across multiple - * macosx/Tcl.xcodeproj/project.pbxproj: buildsystems. - - * unix/tcl.m4: ensure CPPFLAGS env var is used when set. [Bug 1586861] - (Darwin): add -isysroot and -mmacosx-version-min flags to CPPFLAGS - when present in CFLAGS to avoid discrepancies between what headers - configure sees during preprocessing tests and compiling tests. - - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2007-01-18 Donal K. Fellows - - * generic/tclCompile.c (TclCompileScript): Make sure that when parsing - an expanded literal fails, a correct bytecode sequence is still - issued. [Bug 1638414]. Also make sure that the start of the expansion - bytecode sequence falls inside the span of bytecodes for a command. - * tests/compile.test (compile-16.24): Added test for [Bug 1638414] - -2007-01-17 Donal K. Fellows - - * generic/tclIO.c: Added macros to make usage of ChannelBuffers - clearer. - -2007-01-11 Joe English - - * win/tcl.m4(CFLAGS_WARNING): Remove "-Wconversion". This was removed - from unix/tcl.m4 2004-07-16 but not from here. - * win/configure: Regenerated. - -2007-01-11 Pat Thoyts - - * win/makefile.vc: Fixes to work better on Win98. Read version numbers - * win/nmakehlp.c: from package index file to avoid keeping numbers in - * win/rules.vc: the makefile where they may become de-synchronized. - -2007-01-10 Donal K. Fellows - - * generic/regcomp.c (compile, freev): Define a strategy for - * generic/regexec.c (exec): managing the internal - * generic/regguts.h (AllocVars, FreeVars): vars of the RE engine to - * generic/regcustom.h (AllocVars, FreeVars): reduce C stack usage. - This will make Tcl as a whole much less likely to run out of stack - space... - -2007-01-09 Donal K. Fellows - - * generic/tclCompCmds.c (TclCompileLindexCmd): - * tests/lindex.test (lindex-9.2): Fix silly bug that ended up - sometimes compiling list arguments in the wrong order. [Bug 1631364] - -2007-01-03 Kevin B. Kenny - - * generic/tclDate.c: Regenerated to recover a lost fix from patthoyts. - [Bug 1618523] - -2006-12-26 Mo DeJong - - * generic/tclIO.c (Tcl_GetsObj): Avoid checking for for the LF in a - possible CRLF sequence when EOF has already been found. - -2006-12-26 Mo DeJong - - * generic/tclEncoding.c (EscapeFromUtfProc): Clear the - TCL_ENCODING_END flag when end bytes are written. This fix keep this - method from writing escape bytes for an encoding like iso2022-jp - multiple times when the escape byte overlap with the end of the IO - buffer. - * tests/io.test: Add test for escape byte overlap issue. - -2006-12-19 Donal K. Fellows - - * unix/tclUnixThrd.c (Tcl_GetAllocMutex, TclpNewAllocMutex): Add - intermediate variables to shut up unwanted warnings. [Bug 1618838] - -2006-12-19 Daniel Steffen - - * unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit. - - * unix/tcl.m4 (Darwin): --enable-64bit: verify linking with 64bit - -arch flag succeeds before enabling 64bit build. - * unix/configure: autoconf-2.59 - -2006-12-17 Daniel Steffen - - * tests/macOSXLoad.test (new file): add testing of .bundle loading and - * tests/load.test: unloading on Darwin (in addition - * tests/unload.test: to existing tests of .dylib - loading). - * macosx/Tcl.xcodeproj/project.pbxproj: add building of dltest - binaries so that testsuite run from Xcode can use them; fix testsuite - run script - * unix/configure.in: add support for building dltest binaries as - * unix/dltest/Makefile.in: .bundle (in addition to .dylib) on Darwin. - * unix/Makefile.in: add stub lib dependency to dltest target. - * unix/configure: autoconf-2.59 - - * tests/append.test: fix cleanup failure when all tests are skipped. - - * tests/chan.test (chan-16.9): cleanup chan event handler to avoid - causing error in event.test when running testsuite with -singleproc 1. - - * tests/info.test: add !singleTestInterp constraint to tests that fail - when running testsuite with -singleproc 1. [Bug 1605269] - -2006-12-14 Donal K. Fellows - - * doc/string.n: Fix example. [Bug 1615277] - -2006-12-12 Don Porter - - * generic/tclCompExpr.c: Now that the new internal structs are - in use to support operator commands, might as well make them the - default for [expr] as well and avoid passing every parsed expression - through the inefficient Tcl_Token array format. This addresses most - issues in [RFE 1517602]. Assuming no performance disasters result from - this, much dead code supporting the other implementation might now be - removed. - - * generic/tclBasic.c: Final step routing all direct evaluation forms - * generic/tclCompExpr.c: of the operator commands through TEBC, - * generic/tclCompile.h: dropping all the routines in tclMathOp.c. - * generic/tclMathOp.c: Still needs Engineering Manual attention. - -2006-12-11 Don Porter - - * generic/tclBasic.c: Another step with all sorting operator - * generic/tclCompExpr.c: commands now routing through TEBC via - * generic/tclCompile.h: TclSortingOpCmd(). - -2006-12-08 Don Porter - - * generic/tclBasic.c: Another step down the path of re-using - * generic/tclCompExpr.c: TclExecuteByteCode to implement the TIP 174 - * generic/tclCompile.h: commands instead of using a mass of code - * generic/tclMathOp.c: duplication. Now all operator commands that - * tests/mathop.test: demand exactly one operation are implemented - via TclSingleOpCmd and a call to TEBC. - - * generic/tclCompExpr.c: Revised implementation of TclInvertOpCmd to - * generic/tclMathOp.c: perform a bytecode compile / execute sequence. - This demonstrates a path toward avoiding mountains of code duplication - in tclMathOp.c and tclExecute.c. - - * generic/tclCompile.h: Change TclExecuteByteCode() from static to - * generic/tclExecute.c: MODULE_SCOPE so all files including - tclCompile.h may call it. - - * generic/tclMathOp.c: More revisions to make tests pass. - * tests/mathop.test: - -2006-12-08 Donal K. Fellows - - * generic/tclNamesp.c (TclTeardownNamespace): Ensure that dying - namespaces unstitch themselves from their referents. [Bug 1571056] - (NsEnsembleImplementationCmd): Silence GCC warning. - - * tests/mathop.test: Full tests for & | and ^ operators - -2006-12-08 Daniel Steffen - - * library/tcltest/tcltest.tcl: use [info frame] for "-verbose line". - -2006-12-07 Don Porter - - * generic/tclCompCmds.c: Additional commits correct most - * generic/tclExecute.c: failing tests illustrating bugs - * generic/tclMathOp.c: uncovered in [Patch 1578137]. - - * generic/tclBasic.c: Biggest source of TIP 174 failures was that - the commands were not [namespace export]ed from the ::tcl::mathop - namespace. More bits from [Patch 1578137] correct that. - - * tests/mathop.test: Commmitted several new tests from Peter Spjuth - found in [Patch 1578137]. Many failures now demonstrate issues to fix - in the TIP 174 implementation. - -2006-12-07 Donal K. Fellows - - * tests/mathop.test: Added tests for ! ~ eq operators. - * generic/tclMathOp.c (TclInvertOpCmd): Add in check for non-integral - numeric values. - * generic/tclCompCmds.c (CompileCompareOpCmd): Factor out the code - generation for the chained comparison operators. - -2006-12-07 Pat Thoyts - - * tests/exec.test: Fixed line endings (caused win32 problems). - -2006-12-06 Don Porter - - * generic/tclCompCmds.c: Revised and consolidated into utility - * tests/mathop.test: routines some of routines that compile - the new TIP 174 commands. This corrects some known bugs. More to come. - -2006-12-06 Kevin B. Kenny - - * tests/expr.test (expr-47.12): Improved error reporting in hopes of - having more information to pursue [Bug 1609936]. - -2006-12-05 Andreas Kupries - - TIP#291 IMPLEMENTATION - - * generic/tclBasic.c: Define tcl_platform element for pointerSize. - * doc/tclvars.n: - - * win/Makefile.in: Added installation instructions for the platform - * win/makefile.vc: package. Added the platform package. - * win/makefile.bc: - * unix/Makefile.in: - - * tests/platform.test: - * tests/safe.test: - - * library/platform/platform.tcl: - * library/platform/shell.tcl: - * library/platform/pkgIndex.tcl: - - * doc/platform.n: - * doc/platform_shell.n: - -2006-12-05 Don Porter - - * generic/tclPkg.c: When no requirements are supplied to a - * tests/pkg.test: [package require $pkg] and [package unknown] - is invoked to find a satisfying package, pass the requirement argument - "0-" (which means all versions are acceptable). This permits a - registered [package unknown] command to call [package vsatisfies - $testVersion {*}$args] without any special handling of the empty $args - case. This fixes/avoids a bug in [::tcl::tm::UnknownHandler] that was - causing old TM versions to be provided in preference to newer TM - versions. Thanks to Julian Noble for discovering the issue. - -2006-12-04 Donal K. Fellows - - TIP#267 IMPLEMENTATION - - * generic/tclIOCmd.c (Tcl_ExecObjCmd): Added -ignorestderr option, - * tests/exec.test, doc/exec.n: loosely from [Patch 1476191] - -2006-12-04 Don Porter - - * generic/tclCompExpr.c: Added implementation for the - CompileExprTree() routine that can produce expression bytecode - directly from internal structures with no need to pass through the - Tcl_Token array representation. Still disabled by default. #undef - USE_EXPR_TOKENS to try it out. - -2006-12-03 Don Porter - - * generic/tclCompExpr.c: Added expr parsing routines that - produce a different set of internal structures representing the parsed - expression, as well as routines that go on to convert those structures - into the traditional Tcl_Token array format. Use of these routines is - currently disabled. #undef PARSE_DIRECT_EXPR_TOKENS to enable them. - These routines will only become really useful when more routines that - compile directly from the new internal structures are completed. - -2006-12-02 Donal K. Fellows - - * doc/file.n: Clarification of [file pathtype] docs. [Bug 1606454] - -2006-12-01 Kevin B. Kenny - - * libtommath/bn_mp_add.c: Corrected the effects of a - * libtommath/bn_mp_div.c: bollixed 'cvs merge' operation - * libtommath/bncore.c: that inadvertently committed some - * libtommath/tommath_class.h: half-developed code. - - TIP#299 IMPLEMENTATION - - * doc/mathfunc.n: Added isqrt() function to docs - * generic/tclBasic.c: Added isqrt() math function (ExprIsqrtFunc) - * tests/expr.test (expr-47.*): Added tests for isqrt() - * tests/info.test (info-20.2): Added isqrt() to expected math funcs. - -2006-12-01 Don Porter - - * tests/chan.test: Correct timing sensitivity in new test. [Bug - 1606860] - - TIP#287 IMPLEMENTATION - - * doc/chan.n: New subcommand [chan pending]. - * generic/tclBasic.c: Thanks to Michael Cleverly for proposal - * generic/tclInt.h: and implementation. - * generic/tclIOCmd.c: - * library/init.tcl: - * tests/chan.test: - * tests/ioCmd.test: - - TIP#298 IMPLEMENTATION - - * generic/tcl.decls: Tcl_GetBignumAndClearObj -> Tcl_TakeBignumFromObj - * generic/tclObj.c: - - * generic/tclDecls.h: make genstubs - * generic/tclStubInit.c: - - * generic/tclExecute.c: Update callers. - * generic/tclMathOp.c: - -2006-11-30 Kevin B. Kenny - - * library/tzdata: Olson's tzdata2006p. - * libtommath/bn_mp_sqrt.c: Fixed a bug where the initial approximation - to the square root could be on the wrong side, causing failure of - convergence. - -2006-11-29 Don Porter - - * generic/tclBasic.c (Tcl_AppendObjToErrorInfo): Added - Tcl_DecrRefCount() on the objPtr argument to plug memory leaks. This - makes the routine a consumer, which makes it easiest to use. - -2006-11-28 Andreas Kupries - - * generic/tclBasic.c: TIP #280 implementation. - * generic/tclCmdAH.c: - * generic/tclCmdIL.c: - * generic/tclCmdMZ.c: - * generic/tclCompCmds.c: - * generic/tclCompExpr.c: - * generic/tclCompile.c: - * generic/tclCompile.h: - * generic/tclExecute.c: - * generic/tclIOUtil.c: - * generic/tclInt.h: - * generic/tclInterp.c: - * generic/tclNamesp.c: - * generic/tclObj.c: - * generic/tclProc.c: - * tests/compile.test: - * tests/info.test: - * tests/platform.test: - * tests/safe.test: - -2006-11-27 Kevin B. Kenny - - * unix/tclUnixChan.c (TclUnixWaitForFile): - * tests/event.test (event-14.*): Corrected a bug where - TclUnixWaitForFile would present select() with the wrong mask on an - LP64 machine if a fd number exceeds 32. Thanks to Jean-Luc Fontaine - for reporting and diagnosing. [Bug 1602208] - -2006-11-27 Don Porter - - * generic/tclExecute.c (TclIncrObj): Correct failure to detect - floating-point increment values. Thanks to William Coleda [Bug - 1602991] - -2006-11-26 Donal K. Fellows - - * tests/mathop.test, doc/mathop.n: More bits and pieces of the TIP#174 - implementation. Note that the test suite is not yet complete. - -2006-11-26 Daniel Steffen - - * unix/tcl.m4 (Linux): --enable-64bit support. [Patch 1597389] - * unix/configure: autoconf-2.59 [Bug 1230558] - -2006-11-25 Donal K. Fellows - - TIP#174 IMPLEMENTATION - - * generic/tclMathOp.c (new file): Completed the implementation of the - interpreted versions of all the tcl::mathop commands. Moved to a new - file to make tclCompCmds.c more focused in purpose. - -2006-11-23 Donal K. Fellows - - * generic/tclCompCmds.c (Tcl*OpCmd, TclCompile*OpCmd): - * generic/tclBasic.c (Tcl_CreateInterp): Partial implementation of - TIP#174; the commands are compiled, but (mostly) not interpreted yet. - -2006-11-22 Donal K. Fellows - - TIP#269 IMPLEMENTATION - - * generic/tclCmdMZ.c (Tcl_StringObjCmd): Implementation of the [string - * tests/string.test (string-25.*): is list] command, based on - * doc/string.n: work by Joe Mistachkin, with - enhancements by Donal Fellows for better failindex behaviour. - -2006-11-22 Don Porter - - * tools/genWinImage.tcl (removed): Removed two files used in - * win/README.binary (removed): production of binary distributions - for Windows, a task we no longer perform. [Bug 1476980] - * generic/tcl.h: Remove mention of win/README.binary in comment - - * generic/tcl.h: Moved TCL_REG_BOSONLY #define from tcl.h to - * generic/tclInt.h: tclInt.h. Only know user is Expect, which - already #include's tclInt.h. No need to continue greater exposure. - [Bug 926500] - -2006-11-20 Donal K. Fellows - - * generic/tclBasic.c (Tcl_CreateInterp, TclHideUnsafeCommands): - * library/init.tcl: Refactored the [chan] command's guts so that it - does not use aliases to global commands, making the code more robust. - -2006-11-17 Don Porter - - * generic/tclExecute.c (INST_EXPON): Corrected crash on - [expr 2**(1<<63)]. Was operating on cleared bignum Tcl_Obj. - -2006-11-16 Donal K. Fellows - - * doc/apply.n, doc/chan.n: Added examples. - -2006-11-15 Don Porter - - TIP#270 IMPLEMENTATION - - * generic/tcl.decls: New public routines Tcl_ObjPrintf, - * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, - * generic/tclInt.h: Tcl_AppendLimitedToObj, - Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal - versions removed. - - * generic/tclDecls.h: make genstubs - * generic/tclStubInit.c: - - * generic/tclBasic.c: Updated callers. - * generic/tclCkalloc.c: - * generic/tclCmdAH.c: - * generic/tclCmdIL.c: - * generic/tclCmdMZ.c: - * generic/tclCompExpr.c: - * generic/tclCompile.c: - * generic/tclDictObj.c: - * generic/tclExecute.c: - * generic/tclIORChan.c: - * generic/tclIOUtil.c: - * generic/tclMain.c: - * generic/tclNamesp.c: - * generic/tclObj.c: - * generic/tclPkg.c: - * generic/tclProc.c: - * generic/tclStrToD.c: - * generic/tclTimer.c: - * generic/tclUtil.c: - * unix/tclUnixFCmd.c: - - * tools/genStubs.tcl: Updated script to no longer produce the - _ANSI_ARGS_ wrapper in generated declarations. Also revised to accept - variadic prototypes with more than one fixed argument. (This is - possible since TCL_VARARGS and its limitations are no longer in use). - * generic/tcl.h: Some reordering so that macro definitions do - not interfere with the now _ANSI_ARGS_-less stub declarations. - - * generic/tclDecls.h: make genstubs - * generic/tclIntDecls.h: - * generic/tclIntPlatDecls.h: - * generic/tclPlatDecls.h: - * generic/tclTomMathDecls.h: - -2006-11-15 Donal K. Fellows - - * doc/ChnlStack.3, doc/CrtObjCmd.3, doc/GetIndex.3, doc/OpenTcp.3: - * doc/chan.n, doc/fconfigure.n, doc/fcopy.n, doc/foreach.n: - * doc/history.n, doc/http.n, doc/library.n, doc/lindex.n: - * doc/lrepeat.n, doc/lreverse.n, doc/pkgMkIndex.n, doc/re_syntax.n: - Convert \fP to \fR so that man-page scrapers have an easier time. - -2006-11-14 Don Porter - - TIP#261 IMPLEMENTATION - - * generic/tclNamesp.c: [namespace import] with 0 arguments - introspects the list of imported commands. - -2006-11-13 Kevin B. Kenny - - * generic/tclThreadStorage.c (Tcl_InitThreadStorage): - (Tcl_FinalizeThreadStorage): Silence a compiler warning about - presenting a volatile pointer to 'memset'. - -2006-11-13 Don Porter - - * generic/tclIO.c: When [gets] on a binary channel needs to use - the "iso8859-1" encoding, save a copy of that encoding per-thread to - avoid repeated freeing and re-loading of it from the file system. This - replaces the cached copy of this encoding that the platform - initialization code used to keep in pre-8.5 releases. - -2006-11-13 Daniel Steffen - - * generic/tclCompExpr.c: Fix gcc warnings about 'cast to/from - * generic/tclEncoding.c: pointer from/to integer of different - * generic/tclEvent.c: size' on 64-bit platforms by casting - * generic/tclExecute.c: to intermediate types - * generic/tclHash.c: intptr_t/uintptr_t via new PTR2INT(), - * generic/tclIO.c: INT2PTR(), PTR2UINT() and UINT2PTR() - * generic/tclInt.h: macros. [Patch 1592791] - * generic/tclProc.c: - * generic/tclTest.c: - * generic/tclThreadStorage.c: - * generic/tclTimer.c: - * generic/tclUtil.c: - * unix/configure.in: - * unix/tclUnixChan.c: - * unix/tclUnixPipe.c: - * unix/tclUnixPort.h: - * unix/tclUnixTest.c: - * unix/tclUnixThrd.c: - - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2006-11-12 Donal K. Fellows - - * generic/tclInt.h, generic/tclInt.decls: Transfer TclPtrMakeUpvar and - TclObjLookupVar to the internal stubs table. - -2006-11-10 Daniel Steffen - - * tests/fCmd.test (fCmd-6.26): fix failure when env(HOME) path - contains symlinks. - - * macosx/Tcl.xcodeproj/project.pbxproj: remove tclParseExpr.c; when - running testsuite from inside Xcdoe, skip stack-3.1 (it only fails - under those circumstances). - - * unix/tcl.m4 (Darwin): suppress linker arch warnings when building - universal for both 32 & 64 bit and no 64bit CoreFoundation is - available; sync with tk tcl.m4 change. - * unix/configure.in: whitespace. - * unix/configure: autoconf-2.59 - -2006-11-09 Don Porter - - * generic/tclParseExpr.c (removed): Moved all the code of - * generic/tclCompExpr.c: tclParseExpr.c into tclCompExpr.c. - * unix/Makefile.in: This sets the stage for expr compiling to work - * win/Makefile.in: directly with the full parse tree structures, - * win/makefile.bc: and not have to pass through the information - * win/makefile.vc: lossy format of an array of Tcl_Tokens. - * win/tcl.dsp: - -2006-11-09 Donal K. Fellows - - TIP#272 IMPLEMENTATION - - * generic/tclCmdMZ.c (Tcl_StringObjCmd): Implementation of the - * tests/string.test, tests/stringComp.test: [string reverse] command - * doc/string.n: from TIP#272. - - * generic/tclCmdIL.c (Tcl_LreverseObjCmd): Implementation of the - * generic/tclBasic.c, generic/tclInt.h: [lreverse] command from - * tests/cmdIL.test (cmdIL-7.*): TIP#272. - * doc/lreverse.n: - -2006-11-08 Donal K. Fellows - - * generic/tclIO.c, generic/tclPkg.c: Style & clarity rewrites. - -2006-11-07 Andreas Kupries - - * unix/tclUnixFCmd.c (CopyFile): Added code to fall back to a - hardwired default block size should the filesystem report a bogus - value. [Bug 1586470] - -2006-11-04 Don Porter - - * generic/tclStringObj.c: Changed Tcl_ObjPrintf() response to an - invalid format specifier string. No longer panics; now produces an - error message as output. - - TIP#274 IMPLEMENTATION - - * generic/tclParseExpr.c: Exponentiation operator is now right - * tests/expr.test: associative. [Patch 1556802] - -2006-11-03 Miguel Sofer - - * generic/tclBasic.c (TEOVI): fix por possible leak of a Command in - the presence of execution traces that delete it. - - * generic/tclBasic.c (TEOVI): - * tests/trace.test (trace-21.11): fix for [Bug 1590232], execution - traces may cause a second command resolution in the wrong namespace. - -2006-11-03 Donal K. Fellows - - * tests/event.test (event-11.5): Rewrote tests to stop Tcl from - * tests/io.test (multiple tests): opening sockets that are - * tests/ioCmd.test (iocmd-15.1,16,17): reachable from outside hosts - * tests/iogt.test (__echo_srv__.tcl): where not necessary. This is - * tests/socket.test (multiple tests): noticably annoying on some - * tests/unixInit.test (unixInit-1.2): systems (e.g., Windows). - -2006-11-02 Daniel Steffen - - * macosx/Tcl.xcodeproj/project.pbxproj: check autoconf/autoheader exit - status and stop build if they fail. - -2006-11-02 Jeff Hobbs - - * doc/ParseCmd.3, doc/Tcl.n, doc/eval.n, doc/exec.n: - * doc/fconfigure.n, doc/interp.n, doc/unknown.n: - * library/auto.tcl, library/init.tcl, library/package.tcl: - * library/safe.tcl, library/tm.tcl, library/msgcat/msgcat.tcl: - * tests/all.tcl, tests/basic.test, tests/cmdInfo.test: - * tests/compile.test, tests/encoding.test, tests/execute.test: - * tests/fCmd.test, tests/http.test, tests/init.test: - * tests/interp.test, tests/io.test, tests/ioUtil.test: - * tests/iogt.test, tests/namespace-old.test, tests/namespace.test: - * tests/parse.test, tests/pkg.test, tests/pkgMkIndex.test: - * tests/proc.test, tests/reg.test, tests/trace.test: - * tests/upvar.test, tests/winConsole.test, tests/winFCmd.test: - * tools/tclZIC.tcl: - * generic/tclParse.c (Tcl_ParseCommand): Replace {expand} with {*} - officially (TIP #293). Leave -DALLOW_EXPAND=0|1 option to keep - {expand} syntax for transition users. [Bug 1589629] - -2006-11-02 Donal K. Fellows - - * generic/tclBasic.c, generic/tclInterp.c, generic/tclProc.c: Silence - warnings from gcc over signed/unsigned and TclStackAlloc(). - * generic/tclCmdMZ.c: Update to more compact and clearer coding style. - -2006-11-02 Don Porter - - * generic/tclCmdAH.c: Further revisions to produce the routines - * generic/tclInt.h: TclFormat() and TclAppendFormatToObj() that - * generic/tclNamesp.c: accept (objc, objv) arguments rather than - * generic/tclStringObj.c: any varargs stuff. - - * generic/tclBasic.c: Further revised TclAppendPrintToObj() and - * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable - * generic/tclCmdAH.c: to complete their formatting operations, - * generic/tclCmdIL.c: rather than report an error message. This - * generic/tclCmdMZ.c: means an interp argument for error message - * generic/tclDictObj.c: recording is no longer needed, further - * generic/tclExecute.c: simplifying the interface for callers. - * generic/tclIORChan.c: - * generic/tclIOUtil.c: - * generic/tclInt.h: - * generic/tclMain.c: - * generic/tclNamesp.c: - * generic/tclParseExpr.c: - * generic/tclPkg.c: - * generic/tclProc.c: - * generic/tclStringObj.c: - * generic/tclTimer.c: - * generic/tclUtil.c: - * unix/tclUnixFCmd.c: - -2006-11-02 Donal K. Fellows - - * tests/winPipe.test (winpipe-4.[2345]): Made robust when run in - directory with spaces in its name. - - * generic/tclCmdAH.c: Clean up uses of cast NULLs. - - * generic/tclInterp.c (AliasObjCmd): Added more explanatory comments. - - * generic/tclBasic.c (TclEvalObjvInternal): Rewrote so that comments - are relevant and informative once more. Also made the unknown handler - processing use the Tcl execution stack for working space, and not the - general heap. - -2006-11-01 Daniel Steffen - - * unix/tclUnixPort.h: ensure MODULE_SCOPE is defined before use, so - that tclPort.h can once again be included without tclInt.h. - - * generic/tclEnv.c (Darwin): mark _environ symbol as unexported even - when MODULE_SCOPE != __private_extern__. - -2006-10-31 Don Porter - - * generic/tclBasic.c: Refactored and renamed the routines - * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and - * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of routines - * generic/tclCmdIL.c: TclAppendPrintfToObj, TclAppendFormatToObj, - * generic/tclCmdMZ.c: TclObjPrintf, and TclObjFormat, with the - * generic/tclDictObj.c: intent of making the latter list, plus - * generic/tclExecute.c: TclAppendLimitedToObj and - * generic/tclIORChan.c: TclAppendObjToErrorInfo, public via a revised - * generic/tclIOUtil.c: TIP 270. - * generic/tclInt.h: - * generic/tclMain.c: - * generic/tclNamesp.c: - * generic/tclParseExpr.c: - * generic/tclPkg.c: - * generic/tclProc.c: - * generic/tclStringObj.c: - * generic/tclTimer.c: - * generic/tclUtil.c: - * unix/tclUnixFCmd.c: - -2006-10-31 Miguel Sofer - - * generic/tclBasic.c, generic/tcl.h, generic/tclInterp.c: - * generic/tclNamesp.c: removing the flag bit TCL_EVAL_NOREWRITE, the - last remnant of the callObjc/v fiasco. It is not needed, as it is now - always set and checked or'ed with TCL_EVAL_INVOKE. - -2006-10-31 Pat Thoyts - - * win/rules.vc: Fix for [Bug 1582769] - options conflict with VC2003. - -2006-10-31 Donal K. Fellows - - * generic/tclBasic.c, generic/tclNamesp.c, generic/tclProc.c: - * generic/tclInt.h: Removed the callObjc and callObjv fields from the - Interp structure. They did not function correctly and made other parts - of the core amazingly complex, resulting in a substantive change to - [info level] behaviour. [Bug 1587618] - * library/clock.tcl: Removed use of [info level 0] for calculating the - command name as used by the user and replace with a literal. What's - there now is sucky, but at least appears to be right to most users. - * tests/namespace.test (namespace-42.7,namespace-47.1): Reverted - changes to these tests. - * tests/info.test (info-9.11,info-9.12): Added knownBug constraint - since these tests require a different behaviour of [info level] than - is possible because of other dependencies. - -2006-10-30 Jeff Hobbs - - * tools/tcltk-man2html.tcl (option-toc): handle any kind of options - defined toc section (needed for ttk docs) - -2006-10-30 Miguel Sofer - - * generic/tclBasic.c (TEOVI): insured that the interp's callObjc/v - fields are restored after traces run, as they be spoiled. This was - causing a segfault in tcllib's profiler tests. - -2006-10-30 Don Porter - - * generic/tclExecute.c (INST_MOD): Corrected improper testing of the - * tests/expr.test: sign of bignums when applying Tcl's - division rules. Thanks to Peter Spjuth. [Bug 1585704] - -2006-10-29 Miguel Sofer - - * generic/tclNamesp.c (EnsembleImplementationCmd): - * tests/namespace.test (47.7-8): reverted a wrong "optimisation" that - completely broke snit; added two tests. - -2006-10-28 Donal K. Fellows - - * generic/tclProc.c (ObjInterpProcEx, TclObjInterpProcCore): Split the - core of procedures to make it easier to build procedure-like code - without going through horrible contortions. This is the last critical - component to make advanced OO systems workable as simple loadable - extensions. TOIPC is now in the internal stub table. - (MakeProcError, MakeLambdaError): Refactored ProcessProcResultCode to - be simpler, some of which goes to TclObjInterpProcCore, and the rest - of which is now in these far simpler routines which just do errorInfo - stack generation for different types of procedure-like entity. - * tests/apply.test (apply-5.1): Updated to expect the more informative - form of message. - -2006-10-27 Donal K. Fellows - - * generic/tclVar.c (HasLocalVars): New macro to make various bits and - pieces cleaner. - - * generic/tclNamesp.c (TclSetNsPath): Expose SetNsPath() through - internal stubs table with semi-external name. - - * generic/tclInt.h (CallFrame): Add a field for handling context data - for extensions (like object systems) that should be tied to a call - frame (and not a command or interpreter). - - * generic/tclBasic.c (TclRenameCommand): Change to take CONST args; - they were only ever used in a constant way anyway, so this appears to - be a spot that was missed during TIP#27 work. - -2006-10-26 Miguel Sofer - - * generic/tclProc.c (SetLambdaFromAny): minor change, eliminate - redundant call to Tcl_GetString (thanks aku). - - * generic/tclInterp.c (ApplyObjCmd): - * generic/tclNamesp.c (EnsembleImplementationCmd): replaced ckalloc - (heap) with TclStackAlloc (execution stack). - -2006-10-24 Miguel Sofer - - * tests/info.test (info-9.11-12): tests for [Bug 1577492] - * tests/apply.test (apply-4.3-5): tests for [Bug 1574835] - - * generic/tclProc.c (ObjInterpProcEx): disable itcl hacks for calls - from ApplyObjCmd (islambda==1), as they mess apply's error messages - [Bug 1583266] - -2006-10-23 Miguel Sofer - - * generic/tclProc.c (ApplyObjCmd): fix wrong#args for apply by using - the ensemble rewrite engine. [Bug 1574835] - * generic/tclInterp.c (AliasObjCmd): previous commit missed usage of - TCL_EVAL_NOREWRITE for aliases. - - * generic/tclBasic.c (TclEvalObjvInternal): removed redundant check - for ensembles. [Bug 1577628] - - * library/clock.tcl (format, scan): corrected wrong # args messages to - * tests/clock.test (3.1, 34.1): make use of the new rewrite - capabilities of [info level] - - * generic/tcl.h: Lets TEOV update the iPtr->callObj[cv] new - * generic/tclBasic.c: fields, except when the flag bit - * generic/tclInt.h: TCL_EVAL_NOREWRITE is present. These values - * generic/tclNamesp.c: are used by Tcl_PushCallFrame to initialise - * generic/tclProc.c: the frame's obj[cv] fields, and allows - * tests/namespace.test: [info level] to know and use ensemble - rewrites. [Bug 1577492] - - ***POTENTIAL INCOMPATIBILITY*** - The return value from [info level 0] on interp alias calls is changed: - previously returned the target command (including curried values), now - returns the source - what was actually called. - -2006-10-23 Miguel Sofer - - * generic/tcl.h: Modified the Tcl call stack so there is - * generic/tclBasic.c: always a valid CallFrame, even at level 0 - * generic/tclCmdIL.c: [Patch 1577278]. Most of the changes - * generic/tclInt.h: involve removing tests for a NULL - * generic/tclNamesp.c: iPtr->(var)framePtr. There is now a - * generic/tclObj.c: CallFrame pushed at interp creation with a - * generic/tclProc.c: pointer to it stored in iPtr->rootFramePtr. - * generic/tclTrace.c: A second unused field in Interp is - * generic/tclVar.c: hijacked to enable further functionality, - currently unused (but with several FRQs depending on it). - - ***POTENTIAL INCOMPATIBILITY*** - Any user that includes tclInt.h and needs to determine if it is - running at level 0 should change (iPtr->varFramePtr == NULL) to - (iPtr->varFramePtr == iPtr->rootFramePtr). - -2006-10-23 Don Porter - - * README: Bump version number to 8.5a6 - * generic/tcl.h: - * tools/tcl.wse.in: - * unix/configure.in: - * unix/tcl.spec: - * win/README.binary: - * win/configure.in: - - * unix/configure: autoconf-2.59 - * win/configure: - -2006-10-21 Miguel Sofer - - * generic/tcl.h, generic/tclHash.c: Tcl_FindHashEntry now calls - Tcl_CreateHashEntry with a newPtr set to NULL: this would have caused - a segfault previously and eliminates duplicated code. A macro has been - added to tcl.h (only used when TCL_PRESERVE_BINARY_COMPATABALITY is - not set - i.e., not by default). - -2006-10-20 Reinhard Max - - * unix/configure.in: Added autodetection for OS-supplied timezone - * unix/Makefile.in: files and configure switches to override the - * unix/configure: detected default. - -2006-10-20 Daniel Steffen - - *** 8.5a5 TAGGED FOR RELEASE *** - - * tools/tcltk-man2html.tcl: add support for alpha & beta versions to - useversion glob pattern. [Bug 1579941] - -2006-10-18 Don Porter - - * changes: 8.5a5 release date set - - * doc/Encoding.3: Missing doc updates (mostly Table of - * doc/Ensemble.3: Contents) exposed by `make checkdoc` - * doc/FileSystem.3: - * doc/GetTime.3: - * doc/PkgRequire.3: - -2006-10-17 Miguel Sofer - - * generic/tclInterp.c (ApplyObjCmd): fixed bad error in 2006-10-12 - commit: interp released too early. Spotted by mistachkin. - -2006-10-16 Miguel Sofer - - * tclProc.c (SetLambdaFromAny): - * tests/apply.test (9.1-9.2): plugged intrep leak [Bug 1578454], - found by mjanssen. - -2006-10-16 Andreas Kupries - - * generic/tclBasic.c: Moved TIP#219 cleanup to DeleteInterpProc. - -2006-10-16 Daniel Steffen - - * changes: updates for 8.5a5 release. - - * unix/tclUnixThrd.c (TclpThreadGetStackSize): Darwin: fix for main - thread, where pthread_get_stacksize_np() returns incorrect info. - - * macosx/GNUmakefile: don't redo prebinding of non-prebound binaires. - -2006-10-16 Don Porter - - * generic/tclPkg.c (ExactRequirement): Plugged memory leak. Also - changed Tcl_Alloc()/Tcl_Free() calls to ckalloc()/ckfree() for easier - memory debugging in the future. [Bug 1568373] - - * library/tcltest/tcltest.tcl: Revise tcltest bump to 2.3a1. - * library/tcltest/pkgIndex.tcl: This permits more features to be - * unix/Makefile.in: added to tcltest before we reach version 2.3.0 - * win/Makefile.in: best timed to match the release of Tcl 8.5.0. - * win/makefile.vc: This also serves as a demo of TIP 268 features - -2006-10-13 Colin McCormack - - * win/tclWinFile.c: corrected erroneous attempt to protect against - NULL return from Tcl_FSGetNormalizedPath per [Bug 1548263] causing - [Bug 1575837]. - * win/tclWinFile.c: alfredd supplied patch to fix [Bug 1575837] - -2006-10-13 Daniel Steffen - - * unix/tclUnixThrd.c (TclpThreadGetStackSize): on Darwin, use - * unix/tcl.m4: pthread_get_stacksize_np() API to get thread stack size - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2006-10-12 Miguel Sofer - - * generic/tclInterp.c (ApplyObjCmd): - * tests/interp.test (interp-14.5-10): made [interp alias] use the - ensemble rewrite machinery to produce better error messages [Bug - 1576006] - -2006-10-12 David Gravereaux - - * win/nmakehlp.c: Replaced all wnsprintf() calls with snprintf(). - wnsprintf was not in my shwlapi header file (VC++6) - -2006-10-11 Don Porter - - * generic/tclPkg.c (Tcl_PackageRequireEx): Corrected crash when - argument version=NULL passed in. - -2006-10-10 Don Porter - - * changes: Updates for 8.5a5 release. - - * generic/tclNamespace.c (TclTeardownNamespace): After the - commandPathSourceList of a namespace is cleared, set the - commandPathSourceList to NULL so we don't try to walk the list a - second time, possibly after it is freed. [Bug 1566526] - * tests/namespace.test (namespace-51.16): Added test. - -2006-10-09 Miguel Sofer - - * doc/UpVar.3: brough the docs in accordance to the code. Ever since - 8.0, Tcl_UpVar(2)? accepts TCL_NAMESPACE_ONLY as a flag value, and - var-3.4 tests for proper behaviour. The docs only allowed 0 and - TCL_GLOBAL_ONLY. [Bug 1574099] - -2006-10-09 Miguel Sofer - - * tests/*.test: updated all tests to refer explicitly to the global - variables ::errorInfo, ::errorCode, ::env and ::tcl_platform: many - were relying on the alternative lookup in the global namespace, that - feature is tested specifically in namespace and variable tests. - - The modified testfiles are: apply.test, basic.test, case.test, - cmdIL.test, cmdMZ.test, compExpr-old.test, error.test, eval.test, - event.test, expr.test, fileSystem.test, for.test, http.test, if.test, - incr-old.test, incr.test, interp.test, io.test, ioCmd.test, load.test, - misc.test, namespace.test, parse.test, parseOld.test, pkg.test, - proc-old.test, set.test, switch.test, tcltest.test, thread.test, - var.test, while-old.test, while.test. - -2006-10-06 Pat Thoyts - - * win/rules.vc: [Bug 1571954] avoid /RTCc flag with MSVC8 - -2006-10-06 Pat Thoyts - - * doc/binary.n: TIP #275: Support unsigned values in binary - * generic/tclBinary.c: command. Tests and documentation updated. - * tests/binary.test: - -2006-10-05 Andreas Kupries - - * library/tm.tcl: Fixed bug in TIP #189 implementation, now allowing - '_' in module names. - -2006-10-05 Jeff Hobbs - - * library/http/http.tcl (http::geturl): only do geturl url rfc 3986 - validity checking if $::http::strict is true (default true for 8.5). - [Bug 1560506] - - * generic/tcl.h: note limitation on changing Tcl_UniChar size - * generic/tclEncoding.c (UtfToUnicodeProc, UnicodeToUtfProc): - * tests/encoding.test (encoding-16.1): fix alignment issues in - unicode <> utf conversion procs. [Bug 1122671] - -2006-10-05 Miguel Sofer - - * generic/tclVar.c (Tcl_LappendObjCmd): - * tests/append.test(4.21-22): fix for longstanding [Bug 1570718], - lappending nothing to non-list. Reported by lvirden - -2006-10-04 Kevin B. Kenny - - * tzdata/: Olson's tzdata2006m. - -2006-10-01 Kevin B. Kenny - - * tests/clock.test (clock-49.2): Removed a locale dependency that - caused a spurious failure in the German locale. [Bug 1567956] - -2006-10-01 Miguel Sofer - - * doc/Eval.3 (TclEvalObjv): added note on refCount management for the - elements of objv. [Bug 730244] - -2006-10-01 Pat Thoyts - - * win/tclWinFile.c: Handle possible missing define. - - * win/tclWinFile.c (TclpUtime): [Bug 1420432] file mtime fails for - * tests/cmdAH.test: directories on windows - - * tests/winFile.test: Handle Msys environment a little differently in - getuser function. [Bug 1567956] - -2006-09-30 Miguel Sofer - - * generic/tclUtil.c (Tcl_SplitList): optimisation, [Patch 1344747] by - dgp. - - * generic/tclInt.decls: - * generic/tclInt.h: - * generic/tclIntDecls.h: - * generic/tclObj.c: - * generic/tclStubInit.c: added an internal function TclObjBeingDeleted - to provide info as to the reason for the loss of an internal rep. [FR - 1512138] - - * generic/tclCompile.c: - * generic/tclHistory.c: - * generic/tclInt.h: - * generic/tclProc.c: made Tcl_RecordAndEvalObj not call "history" if - it has been redefined to an empty proc, in order to reduce the noise - when debugging [FR 1190441]. Moved TclCompileNoOp from tclProc.c to - tclCompile.c - -2006-09-28 Andreas Kupries - - * generic/tclPkg.c (CompareVersions): Bugfix. Check string lengths - * tests/pkg.test: before comparison. The shorter string is the smaller - number. Added testcases as well. Interestingly all existing test cases - for vcompare compared numbers of the same length with each other. [Bug - 1563836] - -2006-09-28 Miguel Sofer - - * generic/tclIO.c (Tcl_GetsObj): added two test'n'panic guards for - possible NULL derefs, [Bug 1566382] and coverity #33. - -2006-09-27 Don Porter - - * generic/tclExecute.c: Corrected error in INST_LSHIFT in the - * tests/expr.test: calculation done to determine whether a shift - in the (long int) type is possible. The calculation had literal value - "1" where it needed a value "1L" to compute the correct result. Error - detected via testing with the math::bigfloat package [Bug 1567222] - - * generic/tclPkg.c (CompareVersion): Flatten strcmp() results to - {-1, 0, 1} to match expectations of CompareVersion() callers. - -2006-09-27 Miguel Sofer - - * generic/regc_color.c (singleton): - * generic/regc_cvec.c (addmcce): - * generic/regcomp.c (compile, dovec): the static function addmcce does - nothing when called with two NULL pointers; the only call is by - compile with two NULL pointers (regcomp.c #includes regc_cvec.c). - Large parts (all?) the code for mcce (multi character collating - element) that we do not use is ifdef'ed out with the macro - REGEXP_MCCE_ENABLE. - This silences coverity bugs 7, 16, 80 - - * generic/regc_color.c (uncolorchain): - * generic/regc_nfa.c (freearc): changed tests and asserts to - equivalent formulation, designed to avoid an explicit comparison to - NULL and satisfy coverity that 6 and 9 are not bugs. - -2006-09-27 Andreas Kupries - - * tests/pkg.test: Added test for version comparison at the 32bit - boundary. [Bug 1563836] - - * generic/tclPkg.c: Rewrote CompareVersion to perform string - comparison instead of numeric. This breaks through the 32bit limit on - version numbers. See code for details (handling of leading zeros, - signs, etc.). un-CONSTed some arguments of CompareVersions, - RequirementSatisfied, and AllRequirementsSatisfied. The new compare - modifies the string (temporary string terminators). All callers use - heap-allocated ver-intreps, so we are good with that. [Bug 1563836] - -2006-09-27 Miguel Sofer - - * generic/tclFileName.c (TclGlob): added a panic for a call with - TCL_GLOBMODE_TAILS and pathPrefix==NULL. This would cause a segfault, - as found by coverity #26. - -2006-09-26 Kevin B. Kenny - - * doc/Encoding.3: Added covariant 'const' qualifier for the - * generic/tcl.decls: Tcl_EncodingType argument to - * generic/tclEncoding.c: Tcl_CreateEncoding. [Further TIP#27 work.] - * generic/tclDecls.h: Reran 'make genstubs'. - -2006-09-26 Pat Thoyts - - * win/makefile.vc: Additional compiler flags and amd64 support. - * win/nmakehlp.c: - * win/rules.vc: - -2006-09-26 Don Porter - - * generic/tcl.h: As 2006-09-22 commit from Donal K. Fellows - demonstrates, "#define NULL 0" is just wrong, and as a quotable chat - figure observed, "If NULL isn't defined, we're not using a C compiler" - Improper fallback definition of NULL removed. - -2006-09-25 Pat Thoyts - - * generic/tcl.h: More fixing which struct stat to refer to. - * generic/tclGetDate.y: Some casts from time_t to int required. - * generic/tclTimer.c: Tcl_Time structure members are longs. - * win/makefile.vc: Support for varying compiler options - * win/rules.vc: and build to platform-specific subdirs. - -2006-09-25 Andreas Kupries - - * generic/tclIO.c (Tcl_StackChannel): Fixed [Bug 1564642], aka - coverity #51. Extended loop condition, added checking for NULL to - prevent seg.fault. - -2006-09-25 Andreas Kupries - - * doc/package.n: Fixed nits reported by Daniel Steffen in the TIP#268 - changes. - -2006-09-25 Kevin B. Kenny - - * generic/tclNotify.c (Tcl_DeleteEvents): Simplified the code in hopes - of making the invariants clearer and proving to Coverity that the - event queue memory is managed correctly. - -2006-09-25 Donal K. Fellows - - * generic/tclNotify.c (Tcl_DeleteEvents): Make it clear what happens - when the event queue is mismanaged. [Bug 1564677], coverity bug #10. - -2006-09-24 Miguel Sofer - - * generic/tclParse.c (Tcl_ParseCommand): also return an error if - start==NULL and numBytes<0. This is coverity's bug #20 - - * generic/tclStringObj.c (STRING_SIZE): fix allocation for 0-length - strings. This is coverity's bugs #54-5 - -2006-09-22 Andreas Kupries - - * generic/tclInt.h: Moved TIP#268's field 'packagePrefer' to the end - of the structure, for better backward compatibility. - -2006-09-22 Andreas Kupries - - TIP#268 IMPLEMENTATION - - * generic/tclDecls.h: Regenerated from tcl.decls. - * generic/tclStubInit.c: - - * doc/PkgRequire.3: Documentation of extended API, extended testsuite. - * doc/package.n: - * tests/pkg.test: - - * generic/tcl.decls: Implementation. - * generic/tclBasic.c: - * generic/tclConfig.c: - * generic/tclInt.h: - * generic/tclPkg.c: - * generic/tclTest.c: - * generic/tclTomMathInterface.c: - * library/init.tcl: - * library/package.tcl: - * library/tm.tcl: - -2006-09-22 Donal K. Fellows - - * generic/tclThreadTest.c (TclCreateThread): Use NULL instead of 0 as - end-of-strings marker to Tcl_AppendResult; the difference matters on - 64-bit machines. [Bug 1562528] - -2006-09-21 Don Porter - - * generic/tclUtil.c: Dropped ParseInteger() routine. TclParseNumber - covers the task just fine. - -2006-09-19 Donal K. Fellows - - * generic/tclEvent.c (Tcl_VwaitObjCmd): Rewrite so that an exceeded - limit trapped in a vwait cannot cause a dangerous dangling trace. - -2006-09-19 Don Porter - - * generic/tclExecute.c (INST_EXPON): Native type overflow detection - * tests/expr.test: was completely broken. Falling back on use of - bignums for all non-trivial ** calculations until - native-type-constrained special cases can be done carefully and - correctly. [Bug 1561260] - -2006-09-15 Jeff Hobbs - - * library/http/http.tcl: Change " " -> "+" url encoding mapping - * library/http/pkgIndex.tcl: to " " -> "%20" as per RFC 3986. - * tests/http.test (http-5.1): bump http to 2.5.3 - * unix/Makefile.in: - * win/Makefile.in: - -2006-09-12 Andreas Kupries - - * unix/configure.in (HAVE_MTSAFE_GETHOST*): Modified to recognize - HP-UX 11.00 and beyond as having mt-safe implementations of the - gethost functions. - * unix/configure: Regenerated, using autoconf 2.59 - - * unix/tclUnixCompat.c (PadBuffer): Fixed bug in calculation of the - increment needed to align the pointer, and added documentation - explaining why the macro is implemented as it is. - -2006-09-11 Pat Thoyts - - * win/rules.vc: Updated to install http, tcltest and msgcat as - * win/makefile.vc: Tcl Modules (as per Makefile.in). - * win/makefile.vc: Added tommath_(super)class headers. - -2006-09-11 Andreas Kupries - - * unix/Makefile.in (install-libraries): Fixed typo tcltest 2.3.9 -> - 2.3.0. - -2006-09-11 Daniel Steffen - - * unix/tclUnixCompat.c: make compatLock static and only declare it - when it will actually be used; #ifdef parts of TSD that are not always - needed; adjust #ifdefs to cover all possible cases; fix whitespace. - -2006-09-11 Andreas Kupries - - * tests/msgcat.test: Bumped version in auxiliary files as well. - * doc/msgcat.n: - -2006-09-11 Kevin B. Kenny - - * unix/Makefile.in: Bumped msgcat version to 1.4.2 to be - * win/Makefile.in: consistent with dgp's commits of 2006-09-10. - -2006-09-11 Don Porter - - * library/msgcat/msgcat.tcl: Removed some unneeded [uplevel]s. - -2006-09-10 Don Porter - - * generic/tclExecute.c: Corrected INST_EXPON flaw that treated - * tests/expr.test: $x**1 as $x**3. [Bug 1555371] - - * doc/tcltest.n: Bump to version tcltest 2.3.0 to - * library/tcltest/pkgIndex.tcl: account for new "-verbose line" - * library/tcltest/tcltest.tcl: feature. - * unix/Makefile.in: - * win/Makefile.in: - * win/makefile.bc: - * win/makefile.vc: - - * library/msgcat/msgcat.tcl: Bump to version msgcat 1.4.2 to - * library/msgcat/pkgIndex.tcl: account for modifications. - -2006-09-10 Daniel Steffen - - * library/msgcat/msgcat.tcl (msgcat::Init): on Darwin, add fallback of - * tests/msgcat.test: default msgcat locale to - * unix/tclUnixInit.c (TclpSetVariables): current CFLocale - identifier if available (via private ::tcl::mac::locale global, set at - interp init when on Mac OS X 10.3 or later with CoreFoundation). - - * library/tcltest/tcltest.tcl: add 'line' verbose level: prints source - * doc/tcltest.n: file line information of failing tests. - - * macosx/Tcl.xcodeproj/project.pbxproj: add new tclUnixCompat.c file; - revise tests target to use new tcltest 'line' verbose level. - - * unix/configure.in: add descriptions to new AC_DEFINEs for MT-safe. - * unix/tcl.m4: add caching to new SC_TCL_* macros for MT-safe wrappers - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2006-09-08 Zoran Vasiljevic - - * unix/tclUnixCompat.c: Added fallback to gethostbyname() and - gethostbyaddr() if the implementation is known to be MT-safe - (currently for Darwin 6 or later only). - - * unix/configure.in: Assume gethostbyname() and gethostbyaddr() are - MT-safe starting with Darwin 6 (Mac OSX 10.2). - - * unix/configure: Regenerated with autoconf V2.59 - -2006-09-08 Andreas Kupries - - * unix/tclUnixCompat.c: Fixed conditions for CopyArray/CopyString, and - CopyHostent. Also fixed bad var names in TclpGetHostByName. - -2006-09-07 Zoran Vasiljevic - - * unix/tclUnixCompat.c: Added fallback to MT-unsafe library calls if - TCL_THREADS is not defined. - Fixed alignment of arrays copied by CopyArray() to be on the - sizeof(char *) boundary. - -2006-09-07 Zoran Vasiljevic - - * unix/tclUnixChan.c: Rewritten MT-safe wrappers to return ptrs to - * unix/tclUnixCompat.c: TSD storage making them all look like their - * unix/tclUnixFCmd.c: MT-unsafe pendants API-wise. - * unix/tclUnixPort.h: - * unix/tclUnixSock.c: - -2006-09-06 Zoran Vasiljevic - - * unix/tclUnixChan.c: Added TCL_THREADS ifdef'ed usage of MT-safe - * unix/tclUnixFCmd.c: calls like: getpwuid, getpwnam, getgrgid, - * unix/tclUnixSock.c: getgrnam, gethostbyname and gethostbyaddr. - * unix/tclUnixPort.h: See [Bug 999544] - * unix/Makefile.in: - * unix/configure.in: - * unix/tcl.m4: - * unix/configure: Regenerated. - - * unix/tclUnixCompat.c: New file containing MT-safe implementation of - some library calls. - -2006-09-04 Don Porter - - * generic/tclCompExpr.c: Removed much complexity that is no - longer needed. - - * tests/main.text (Tcl_Main-4.4): Test corrected to not be - timing sensitive to the Bug 1481986 fix. [Bug 1550858] - -2006-09-04 Jeff Hobbs - - * doc/package.n: correct package example - -2006-08-31 Don Porter - - * generic/tclCompExpr.c: Corrected flawed logic for disabling - the INST_TRY_CVT_TO_NUMERIC instruction at the end of an expression - when function arguments contain operators. [Bug 1541274] - - * tests/expr-old.test: The remaining failing tests reported in - * tests/expr.test: [Bug 1381715] are all new in Tcl 8.5, so - there's really no issue of compatibility with Tcl 8.4 result to deal - with. Fixed by updating tests to expect 8.5 results. - -2006-08-29 Don Porter - - * generic/tclParseExpr.c: Dropped the old expr parser. - -2006-08-30 Jeff Hobbs - - * generic/tclBasic.c (Tcl_CreateInterp): init iPtr->threadId - - * win/tclWinChan.c [Bug 819667] Improve logic for identifying COM - ports. - - * generic/tclIOGT.c (ExecuteCallback): - * generic/tclPkg.c (Tcl_PkgRequireEx): replace Tcl_GlobalEval(Obj) - with more efficient Tcl_Eval(Obj)Ex - - * unix/Makefile.in (valgrindshell): add valgrindshell target and - update default VALGRINDARGS. User can override, or add to it with - VALGRIND_OPTS env var. - - * generic/tclFileName.c (DoGlob): match incrs with decrs. - -2006-08-29 Don Porter - - * generic/tclParseExpr.c: Use the "parent" field of orphan - ExprNodes to store the closure of left pointers. This lets us avoid - repeated re-scanning leftward for the left boundary of subexpressions, - which in worst case led to near O(N^2) runtime. - -2006-08-29 Joe Mistachkin - - * unix/tclUnixInit.c: Fixed the issue (typo) that was causing - * unix/tclUnixThrd.c (TclpThreadGetStackSize): stack.test to fail on - FreeBSD (and possibly other Unix platforms). - -2006-08-29 Colin McCormack - - * generic/tclIOUtil.c: Added test for NULL return from - * generic/tclPathObj.c: Tcl_FSGetNormalizedPath which was causing - * unix/tclUnixFile.c: segv's per [Bug 1548263] - * win/tclWinFCmd.c: - * win/tclWinFile.c: - -2006-08-28 Kevin B. Kenny - - * library/tzdata/America/Havana: Regenerated from Olson's - * library/tzdata/America/Tegucigalpa: tzdata2006k. - * library/tzdata/Asia/Gaza: - -2006-08-28 Don Porter - - * generic/tclStringObj.c: Revised ObjPrintfVA to take care to - * generic/tclParseExpr.c: copy only whole characters when doing - %s formatting. This relieves callers of TclObjPrintf() and - TclFormatToErrorInfo() from needing to fix arguments to character - boundaries. Tcl_ParseExpr() simplified by taking advantage. [Bug - 1547786] - - * generic/tclStringObj.c: Corrected TclFormatObj's failure to - count up the number of arguments required by examining the format - string. [Bug 1547681] - -2006-08-27 Joe Mistachkin - - * generic/tclClock.c (ClockClicksObjCmd): Fix nested macro breakage - with TCL_MEM_DEBUG enabled. [Bug 1547662] - -2006-08-26 Miguel Sofer - - * doc/namespace.n: - * generic/tclNamesp.c: - * tests/upvar.test: bugfix, docs clarification and new tests for - [namespace upvar] as follow up to [Bug 1546833], reported by Will - Duquette. - -2006-08-24 Kevin B. Kenny - - * library/tzdata: Regenerated, including several new files, from - Olson's tzdata2006j. - * library/clock.tcl: - * tests/clock.test: Removed an early testing hack that allowed loading - 'registry' from the build tree rather than an installed one. This is a - workaround for [Bug 15232730], which remains open because it's a - symptom of a deeper underlying problem. - -2006-08-23 Don Porter - - * generic/tclParseExpr.c: Minimal collection of new tests - * tests/parseExpr.test: testing the error messages of the new - expr parser. Several bug fixes and code simplifications that appeared - during that effort. - -2006-08-21 Don Porter - - * generic/tclIOUtil.c: Revisions to complete the thread finalization - of the cwdPathPtr. [Bug 1536142] - - * generic/tclParseExpr.c: Revised mistaken call to - TclCheckBadOctal(), so both [expr 08] and [expr 08z] have same - additional info in error message. - - * tests/compExpr-old.test: Update existing tests to not fail with - * tests/compExpr.test: the new expr parser. - * tests/compile.test: - * tests/expr-old.test: - * tests/expr.test: - * tests/for.test: - * tests/if.test: - * tests/parseExpr.test: - * tests/while.test: - -2006-08-21 Donal K. Fellows - - * win/Makefile.in (gdb): Make this target work so that debugging an - msys build is possible. - -2006-08-21 Daniel Steffen - - * macosx/tclMacOSXNotify.c (Tcl_WaitForEvent): if the run loop is - already running (e.g. if Tcl_WaitForEvent was called recursively), - re-run it in a custom run loop mode containing only the source for the - notifier thread, otherwise wakeups from other sources added to the - common run loop modes might get lost. - - * unix/tclUnixNotfy.c (Tcl_WaitForEvent): on 64-bit Darwin, - pthread_cond_timedwait() appears to have a bug that causes it to wait - forever when passed an absolute time which has already been exceeded - by the system time; as a workaround, when given a very brief timeout, - just do a poll on that platform. [Bug 1457797] - - * generic/tclClock.c (ClockClicksObjCmd): add support for Darwin - * generic/tclCmdMZ.c (Tcl_TimeObjCmd): nanosecond resolution timer - * generic/tclInt.h: to [clock clicks] and [time] - * unix/configure.in (Darwin): when TCL_WIDE_CLICKS defined - * unix/tclUnixTime.c (TclpGetWideClicks, TclpWideClicksToNanoseconds): - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - - * unix/tclUnixPort.h (Darwin): override potentially faulty configure - detection of termios availability in all cases, since termios is known - to be present on all Mac OS X releases since 10.0. [Bug 497147] - -2006-08-18 Daniel Steffen - - * unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for - universal builds including x86_64, for 64-bit CoreFoundation on - Leopard and for use of -mmacosx-version-min instead of - MACOSX_DEPLOYMENT_TARGET - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - - * generic/tcl.h: add fixes for building on Leopard and - * unix/tclUnixPort.h: support for 64-bit CoreFoundation on Leopard - * macosx/tclMacOSXFCmd.c: - - * unix/tclUnixPort.h: on Darwin x86_64, disable use of vfork as it - causes execve to fail intermittently. (rdar://4685553) - - * generic/tclTomMath.h: on Darwin 64-bit, for now disable use of - 128-bit arithmetic through __attribute__ ((mode(TI))), as it leads to - link errors due to missing fallbacks. (rdar://4685527) - - * macosx/Tcl.xcodeproj/project.pbxproj: add x86_64 to universal build, - switch native release targets to use DWARF with dSYM, Xcode 3.0 - changes - * macosx/README: updates for x86_64 and Xcode 2.4. - - * macosx/Tcl.xcodeproj/default.pbxuser: add test suite target that - * macosx/Tcl.xcodeproj/project.pbxproj: runs the tcl test suite at - build time and shows clickable test suite errors in the GUI build - window. - - * tests/macOSXFCmd.test: fix use of deprecated resource fork paths. - - * unix/tclUnixInit.c (TclpInitLibraryPath): move code that is only - needed when TCL_LIBRARY is defined to run only in that case. - - * generic/tclLink.c (LinkTraceProc): fix 64-bit signed-with-unsigned - comparison warning from gcc4 -Wextra. - - * unix/tclUnixChan.c (TclUnixWaitForFile): with timeout < 0, if - select() returns early (e.g. due to a signal), call it again instead - of returning a timeout result. Fixes intermittent event-13.8 failures. - -2006-08-17 Don Porter - - * generic/tclCompile.c: Revised the new set of expression - * generic/tclParseExpr.c: parse error messages. - -2006-08-16 Don Porter - - * generic/tclParseExpr.c: Replace PrecedenceOf() function with - prec[] static array. - -2006-08-14 Donal K. Fellows - - * library/clock.tcl (::tcl::clock::add): Added missing braces to - clockval validation code. Pointed out on comp.lang.tcl. - -2006-08-11 Donal K. Fellows - - * generic/tclNamesp.c: Improvements in buffer management to make - namespace creation faster. Plus selected other minor improvements to - code quality. [Patch 1352382] - -2006-08-10 Donal K. Fellows - - Misc patches to make code more efficient. [Bug 1530474] (afredd) - * generic/*.c, macosx/tclMacOSXNotify.c, unix/tclUnixNotfy.c, - * win/tclWinThrd.c: Tidy up invokations of Tcl_Panic() to promote - string constant sharing and consistent style. - * generic/tclBasic.c (Tcl_CreateInterp): More efficient handling of - * generic/tclClock.c (TclClockInit): registration of commands not - in global namespace. - * generic/tclVar.c (Tcl_UnsetObjCmd): Remove unreachable clause. - -2006-08-09 Don Porter - - * generic/tclEncoding.c: Replace buffer copy in for loop with - call to memcpy(). Thanks to afredd. [Patch 1530262] - -2006-08-09 Donal K. Fellows - - * generic/tclCmdIL.c (Tcl_LassignObjCmd): Make the wrong#args message - a bit more consistent with those used elsewhere. [Bug 1534628] - - * generic/tclDictObj.c (DictForCmd): Stop crash when attempting to - iterate over an invalid dictionary. [Bug 1531184] - - * doc/ParseCmd.3, doc/expr.n, doc/set.n, doc/subst.n, doc/switch.n: - * doc/tclvars.n: Ensure that uses of [expr] in documentation examples - are also good style (with braces) unless otherwise necessary. [Bug - 1526581] - -2006-08-03 Daniel Steffen - - * unix/tclUnixPipe.c (TclpCreateProcess): for USE_VFORK: ensure - standard channels are initialized before vfork() so that the child - doesn't potentially corrupt global state in the parent's address space - - * tests/compExpr-old.test: add 'oldExprParser' constraint to all tests - * tests/compExpr.test: that depend on the exact format of the - * tests/compile.test: error messages of the pre-2006-07-05 - * tests/expr-old.test: expression parser. The constraint is on by - * tests/expr.test: default (i.e those tests still fail), but - * tests/for.test: can be turned off by passing '-constraints - * tests/if.test: newExprParser' to tcltest, which will skip - * tests/parseExpr.test: the 196 failing tests in the testsuite that - * tests/while.test: are caused by the new expression parser - error messages. - -2006-07-31 Kevin B. Kenny - - * generic/tclClock.c (ConvertLocalToUTCUsingC): Corrected a regression - that caused dates before 1969 to be one day off in the :localtime time - zone if TZ is not set. [Bug 1531530] - -2006-07-30 Kevin B. Kenny - - * generic/tclClock.c (GetJulianDayFromEraYearMonthDay): Corrected - several errors in converting dates before the Common Era [Bug 1426279] - * library/clock.tcl: Corrected syntax errors in generated code for %EC - %Ey, and %W format groups [Bug 1505383]. Corrected a bug in cache - management for format strings containing [glob] metacharacters [Bug - 1494664]. Corrected several errors in formatting/scanning of years - prior to the Common Era, and added the missing %EE format group to - indicate the era. - * tools/makeTestCases.tcl: Added code to make sure that %U and %V - format groups are included in the tests. (The code depends on %U and - %V formatting working correctly when 'makeTestCases.tcl' is run, - rather than making a completely independent check.) Added tests for - [glob] metacharacters in strings. Added tests for years prior to the - Common Era. - * tests/clock.test: Rebuilt with new test cases for all the above. - -2006-07-30 Joe English - - * doc/AppInit.3: Fix typo [Bug 1496886] - -2006-07-26 Don Porter - - * generic/tclExecute.c: Corrected flawed overflow detection in - * tests/expr.test: INST_EXPON that caused [expr 2**64] to return - 0 instead of the same value as [expr 1<<64]. - -2006-07-24 Don Porter - - * win/tclWinSock.c: Correct un-initialized Tcl_DString. Thanks to - afredd. [Bug 1518166] - -2006-07-21 Miguel Sofer - - * generic/tclExecute.c: - * tests/execute.test (execute-9.1): dgp's fix for [Bug 1522803]. - -2006-07-20 Daniel Steffen - - * macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): - create notifier thread lazily upon first call to Tcl_WaitForEvent() - rather than in Tcl_InitNotifier(). Allows calling exeve() in processes - where the event loop has not yet been run (Darwin's execve() fails in - processes with more than one thread), in particular allows embedders - to call fork() followed by execve(), previously the pthread_atfork() - child handler's call to Tcl_InitNotifier() would immediately recreate - the notifier thread in the child after a fork. - - * macosx/tclMacOSXFCmd.c (TclMacOSXCopyFileAttributes): add support - * macosx/tclMacOSXNotify.c (Tcl_InitNotifier): for weakly - * unix/tclUnixInit.c (Tcl_GetEncodingNameFromEnvironment): importing - symbols not available on OSX 10.2 or 10.3, enables binaires built on - later OSX versions to run on earlier ones. - * macosx/Tcl.xcodeproj/project.pbxproj: enable weak-linking; turn on - extra warnings. - * macosx/README: document how to enable weak-linking; cleanup. - * unix/tclUnixPort.h: add support for weak-linking; conditionalize - AvailabilityMacros.h inclusion; only disable realpath on 10.2 or - earlier when threads are enabled. - * unix/tclLoadDyld.c (TclpLoadMemoryGetBuffer): change runtime Darwin - * unix/tclUnixInit.c (TclpInitPlatform): release check to use - global initialized - once - * unix/tclUnixFCmd.c (DoRenameFile, TclpObjNormalizePath): add runtime - Darwin release check to determine if realpath is threadsafe. - * unix/configure.in: add check on Darwin for compiler support of weak - * unix/tcl.m4: import and for AvailabilityMacros.h header; move - Darwin specific checks & defines that are only relevant to the tcl - build out of tcl.m4; restrict framework option to Darwin; clean up - quoting and help messages. - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - - * generic/regc_locale.c (cclass): - * generic/tclExecute.c (TclExecuteByteCode): - * generic/tclIOCmd.c (Tcl_ExecObjCmd): - * generic/tclListObj.c (NewListIntRep): - * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj) - (FreeBignum, Tcl_SetBignumObj): - * generic/tclParseExpr.c (Tcl_ParseExpr): - * generic/tclStrToD.c (TclParseNumber): - * generic/tclStringObj.c (TclAppendFormattedObjs): - * unix/tclLoadDyld.c (TclpLoadMemory): - * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned - comparison and other warnings from gcc4 -Wextra. - -2006-07-13 Andreas Kupries - - * unix/tclUnixPort.h: Added the inclusion of . - The missing header caused the upcoming #if conditions to wrongly - exclude realpath, causing file normalize to ignore symbolic links in - the path. - -2006-07-11 Zoran Vasiljevic - - * generic/tclAsync.c: Made Tcl_AsyncDelete() more tolerant when called - after all thread TSD has been garbage-collected. - -2006-07-05 Don Porter - - * generic/tclParseExpr.c: Completely new expression parser that - builds a parse tree instead of operating with deep recursion. This - corrects reports of stack-blowing crashes parsing long expressions - [Bug 906201] and replaces a fundamentally O(N^2) algorithm with an - O(N) one [RFE 903765]. The new parser is better able to generate error - messages that clearly report both the nature and context of the syntax - error [Bugs 1029267, 1381715]. For now, the code for the old parser is - still present and can be activated with a "#define OLD_EXPR_PARSER - 1". This is for the sake of a clean implementation patch, and for ease - of benchmarking. The new parser is non-recursive, so much lighter in - stack consumption, but it does use more heap, so there may be cases - where parsing of long expressions that succeeded with the old parser - will lead to out of memory panics with the new one. There are still - more improvements possible on that point, though significant progress - may require changes to the Tcl_Token specifications documented for the - public Tcl_Parse*() routines. - ***POTENTIAL INCOMPATIBILITY*** for any callers that rely on the exact - (usually terrible) error messages generated by the old parser. This - includes a large number of tests in the test suite. - - * generic/tclInt.h: Replaced TclParseWhiteSpace() with - * generic/tclParse.c: TclParseAllWhiteSpace() which is what - * generic/tclParseExpr.c: all the callers really needed. - Breaking whitespace runs at newlines is useful only to the command - parsing function, and it can call the file scoped routine - ParseWhiteSpace() to do that. - - * tests/expr-old.test: Removed knownBug constraints that masked - * tests/expr.test: failures due to revised error messages. - * tests/parseExpr.test: - -2006-06-20 Don Porter - - * generic/tclIOUtil.c: Changed default configuration to - * generic/tclInt.decls: #undef USE_OBSOLETE_FS_HOOKS which disables - * generic/tclTest.c: access to the Tcl 8.3 internal routines for - hooking into filesystem operations. Everyone ought to have migrated to - Tcl_Filesystems by now. - ***POTENTIAL INCOMPATIBILITY*** for any code still stuck in the - pre-Tcl_Filesystem era. - - * generic/tclIntDecls.h: make genstubs - * generic/tclStubInit.c: - - * generic/tclStrToD.c: Removed dead code that permitted disabling of - recognition of the new 0b and 0o numeric formats. - - * generic/tclExecute.c: Removed dead code that implemented alternative - * generic/tclObj.c: design where numeric values did not - automatically narrow to the smallest Tcl_ObjType required to hold them - - * generic/tclCmdAH.c: Removed dead code that was old implementation - of [format]. - -2006-06-14 Daniel Steffen - - * unix/tclUnixPort.h (Darwin): support MAC_OS_X_VERSION_MAX_ALLOWED - define from AvailabilityMacros.h: override configure detection and - only use API available in the indicated OS version or earlier. - -2006-06-14 Donal K. Fellows - - * doc/format.n, doc/scan.n: Added examples for converting between - characters and their numeric interpretations following user prompting. - -2006-06-13 Donal K. Fellows - - * unix/tclLoadDl.c (TclpDlopen): Workaround for a compiler bug in Sun - Forte 6. [Bug 1503729] - -2006-06-06 Don Porter - - * doc/GetStdChan.3: Added recommendation that each call to - Tcl_SetStdChannel() be accompanied by a call to Tcl_RegisterChannel(). - -2006-06-05 Donal K. Fellows - - * doc/Alloc.3: Added documentation of promise that Tcl_Realloc(NULL,x) - is the same as Tcl_Alloc(x), as discussed in comp.lang.tcl. Also fixed - nonsense sentence to say something meaningful. - -2006-05-29 Jeff Hobbs - - * generic/tcl.h (Tcl_DecrRefCount): use if/else construct to allow - placement in unbraced outer if/else conditions. (jcw) - -2006-05-27 Daniel Steffen - - * macosx/tclMacOSXNotify.c: implemented pthread_atfork() handler that - * unix/tcl.m4 (Darwin): recreates CoreFoundation state and - notifier thread in the child after a fork(). Note that pthread_atfork - is available starting with Tiger only. Because vfork() is used by the - core on Darwin, [exec]/[open] are not affected by this fix, only - extensions or embedders that call fork() directly (such as TclX). - However, this only makes fork() safe from corefoundation tcl with - --disable-threads; as on all platforms, forked children may deadlock - in threaded tcl due to the potential for stale locked mutexes in the - child. [Patch 923072] - - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2006-05-24 Donal K. Fellows - - * unix/tcl.m4 (SC_CONFIG_SYSTEM): Fixed quoting of command script to - awk; it was a rarely used branch, but it was wrong. [Bug 1494160] - -2006-05-23 Donal K. Fellows - - * doc/chan.n, doc/refchan.n: Tighten up the documentation to follow a - slightly more consistent style with regard to argument capitalization. - -2006-05-13 Don Porter - - * generic/tclProc.c (ProcCompileProc): When a bump of the compile - epoch forces the re-compile of a proc body, take care not to overwrite - any Proc struct that may be referred to on the active call stack. Note - that the fix will not be effective for code that calls the private - routine TclProcCompileProc() directly. [Bug 1482718] - -2006-05-13 Daniel Steffen - - * generic/tclEvent.c (HandleBgErrors): fix leak. [Coverity issue 86] - -2006-05-05 Don Porter - - * generic/tclMain.c (Tcl_Main): Corrected flaw that required - * tests/main.test: (Tcl_Main-4.5): processing of one interactive - command before passing control to the loop routine registered with - Tcl_SetMainLoop(). [Bug 1481986] - -2006-05-04 Don Porter - - * README: Bump version number to 8.5a5 - * generic/tcl.h: - * tools/tcl.wse.in: - * unix/configure.in: - * unix/tcl.spec: - * win/README.binary: - * win/configure.in: - - * unix/configure: autoconf-2.59 - * win/configure: - - * generic/tclBasic.c (ExprSrandFunc): Restore acceptance of wide/big - * doc/mathfunc.n: integer values by srand(). [Bug 1480509] - -2006-04-26 Don Porter - - *** 8.5a4 TAGGED FOR RELEASE *** - - * changes: Updates for another RC. - - * generic/tclBinary.c: Revised the handling of the Q and q format - * generic/tclInt.h: specifiers for [binary] to account for the - * generic/tclStrToD.c: "middle endian" floating point format used in - Nokia N770. - -2006-04-25 Don Porter - - * doc/DoubleObj.3: More doc updates for TIP 237. - * doc/expr.n: - * doc/format.n: - * doc/mathfunc.n: - * doc/scan.n: - * doc/string.n: - - * generic/tclScan.c: [scan $s %u] is documented to accept only - * tests/scan.test: decimal formatted integers. Fixed to match. - -2006-04-19 Kevin B. Kenny - - * generic/tclStrToD.c: Added code to support the "middle endian" - floating point format used in the Nokia N770's software-based floating - point. Thanks to Bruce Johnson for reporting this bug, originally on - http://wiki.tcl.tk/15408. - * library/clock.tcl: Fixed a bug with Daylight Saving Time and Posix - time zone specifiers reported by Martin Lemburg in - http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/9a8b15a4dfc0b7a0 - (and not at SourceForge). - * tests/clock.test: Added test case for the above bug. - -2006-04-18 Donal K. Fellows - - * doc/IntObj.3: Minor review fixes, including better documentation of - the behaviour of Tcl_GetBignumAndClearObj. - -2006-04-17 Don Porter - - * doc/IntObj.3: Documentation changes to account for TIP 237 changes. - * doc/Object.3: [Bug 1446971] - -2006-04-12 Donal K. Fellows - - * generic/regc_locale.c (cclass): Redefined the meaning of [:print:] - to be exactly UNICODE letters, numbers, punctuation, symbols and - spaces (*not* whitespace). [Bug 1376892] - -2006-04-11 Don Porter - - * generic/tclTrace.c: Stop some interference between enter traces - * tests/trace.test: and enterstep traces. [Bug 1458266] - -2006-04-07 Don Porter - - * generic/tclPathObj.c: Yet another revised fix for the [Bug 1379287] - * tests/fileSystem.test: family of path normalization bugs. - -2006-04-06 Jeff Hobbs - - * generic/tclRegexp.c (FinalizeRegexp): full reset data to indicate - readiness for reinitialization. - -2006-04-06 Don Porter - - * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): It seems there - * tests/indexObj.test: are extensions that rely on the prior behavior - * doc/GetIndex.3: that the empty string cannot succeed as a - unique prefix matcher, so I'm restoring Donal Fellows's solution. - Added mention of this detail to the documentation. [Bug 1464039] - - * tests/compExpr-old.test: Updated testmathfunctions constraint - * tests/compExpr.test: to post-TIP-232 world. - * tests/expr-old.test: - * tests/expr.test: - * tests/info.test: - - * tests/indexObj.test: Corrected other test errors revealed by - * tests/upvar.test: testing outside the tcltest application. - - * generic/tclPathObj.c: Revised fix for the [Bug 1379287] family of - path normalization bugs. - -2006-04-06 Daniel Steffen - - * unix/tcl.m4: removed TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING - define on Darwin. [Bug 1457515] - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 - -2006-04-05 Don Porter - - * win/tclWinInit.c: More careful calls to Tcl_DStringSetLength() - * win/tclWinSock.c: to avoid creating invalid DString states. Bump - * win/tclWinDde.c: to version 1.3.2. [RFE 1366195] - * library/dde/pkgIndex.tcl: - - * library/reg/pkgIndex.tcl: Bump to registry 1.2 because - * win/tclWinReg.c: Registry_Unload() is a new public routine - * win/Makefile.in: compared to the 1.1.* releases. - - * win/configure.in: Bump package version numbers. - * win/configure: autoconf 2.59 - -2006-04-05 Donal K. Fellows - - * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Allow empty - strings to be matched by the Tcl_GetIndexFromObj machinery, in the - same manner as any other key. [Bug 1464039] - -2006-04-03 Andreas Kupries - - * generic/tclIO.c (ReadChars): Added check, panic and commentary to a - piece of code which relies on BUFFER_PADDING to create enough space at - the beginning of each buffer for the insertion of partial multibyte - data at the beginning of a buffer. Commentary explains why this code - is OK, and the panic is as a precaution if someone twiddled the - BUFFER_PADDING into uselessness. - - * generic/tclIO.c (ReadChars): Temporarily suppress the use of - TCL_ENCODING_END set when EOF was reached while the buffer we are - converting is not truly the last buffer in the queue. Together with - the Utf bug below it was possible to completely wreck the buffer data - structures, eventually crashing Tcl. [Bug 1462248] - - * generic/tclEncoding.c (UtfToUtfProc): Stop accessing memory beyond - the end of the input buffer when TCL_ENCODING_END is set and the last - bytes of the buffer start a multi-byte sequence. This bug contributed - to [Bug 1462248]. - -2006-03-30 Miguel Sofer - - * generic/tclExecute.c: remove unused var and silence gcc warning - -2006-03-29 Jeff Hobbs - - * win/Makefile.in: convert _NATIVE paths to use / to avoid ".\" - path-as-escape issue. - -2006-03-29 Don Porter - - * changes: Updates for another RC. - - * generic/tclPathObj.c: More fixes for path normalization when /../ - * tests/fileSystem.test: tries to go beyond root.[Bug 1379287] - - * generic/tclExecute.c: Revised INST_MOD implementation to do - calculations in native types as much as possible, moving to mp_ints - only when necessary. - -2006-03-28 Jeff Hobbs - - * win/tclWinPipe.c (TclpCreateProcess): change panics to Tcl errors - and do proper refcounting of noe objPtr. [Bug 1194429] - - * unix/tcl.m4, win/tcl.m4: []-quote AC_DEFUN functions. - -2006-03-28 Daniel Steffen - - * macosx/Tcl.xcode/default.pbxuser: add '-singleproc 1' cli arg to - * macosx/Tcl.xcodeproj/default.pbxuser: tcltest to ease test debugging - - * macosx/Tcl.xcode/project.pbxproj: removed $prefix/share from - * macosx/Tcl.xcodeproj/project.pbxproj: TCL_PACKAGE_PATH as per change - to unix/configure.in of 2006-03-13. - - * unix/tclUnixFCmd.c (TclpObjNormalizePath): deal with *BSD/Darwin - realpath() converting relative paths into absolute paths [Bug 1064247] - -2006-03-28 Vince Darley - - * generic/tclIOUtil.c: fix to nativeFilesystemRecord comparisons - (lesser part of [Bug 1064247]) - -2006-03-27 Pat Thoyts - - * win/tclWinTest.c: Fixes for [Bug 1456373] (mingw-gcc issue) - -2006-03-27 Andreas Kupries - - * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made it the - * generic/tcl.h: version where the "truncateProc" is defined at, - * generic/tclIO.c: and moved all channel drivers of Tcl to v5. - * generic/tclIOGT.c, generic/tclIORChan.c, unix/tclUnixChan.c: - * unix/tclUnixPipe.c, win/tclWinChan.c, win/tclWinConsole.c: - * win/tclWinPipe.c, win/tclWinSerial.c, win/tclWinSock.c: - -2006-03-27 Don Porter - - * generic/tclExecute.c: Merge INST_MOD computation in with the - INST_?SHIFT instructions, which also operate only on two integral - values. Also corrected flaw that made INST_BITNOT of wide values - require mp_int calculations. Also corrected type that missed optimized - handling of the tclBooleanType by the TclGetBooleanFromObj macro. - - * changes: Updates for another RC. - -2006-03-25 Don Porter - - * generic/tclExecute.c: Corrections to INST_EXPON detection of - overflow to use mp_int calculations. - -2006-03-24 Kevin B. Kenny - - * generic/tclExecute.c (TclExecuteByteCode): Added a couple of missing - casts to 'int' that were affecting compilablity on VC6. - -2006-03-24 Don Porter - - * generic/tclEncoding.c: Reverted latest change [Bug 506653] since it - reportedly killed test performance on Windows. - - * generic/tclExecute.c: Revised INST_EXPON implementation to do - calculations in native types as much as possible, moving to mp_ints - only when necessary. - -2006-03-23 Don Porter - - * generic/tclExecute.c: Merged INST_EXPON handling in with the other - binary operators that operate on all number types (INST_ADD, etc.). - - * tests/env.test: With case preserved (see 2006-03-21 commit) be sure - to do case-insensitive filtering. [Bug 1457065] - -2006-03-23 Reinhard Max - - * unix/tcl.spec: Cleaned up and completed the spec file. An RPM can - now be built from the tcl source distribution with "rpmbuild -tb - " - -2006-03-22 Reinhard Max - - * tests/stack.test: Run the stack tests in subshells, so that they are - reported as failed tests rather than bugs in the test suite if the - recursion causes a segfault. - -2006-03-21 Don Porter - - * changes: Updates for another RC. - - * generic/tclStrToD.c: One of the branches of AccumulateDecimalDigit - * tests/parseExpr.test: did not. [Bug 1451233] - - * tests/env.test: Preserve case of saved env vars. [Bug 1409272] - -2006-03-21 Daniel Steffen - - * generic/tclInt.decls: implement globbing for HFS creator & type - * macosx/tclMacOSXFCmd.c:codes and 'hidden' flag, as documented in - * tests/macOSXFCmd.test: glob.n; objectified OSType handling in [glob] - * unix/tclUnixFile.c: and [file attributes]; fix globbing for - hidden files with pattern==NULL arg. [Bug 823329] - * generic/tclIntPlatDecls.h: - * generic/tclStubInit.c: make genstubs - -2006-03-20 Andreas Kupries - - * win/Makefile.in (install-libraries): Generate tcl8/8.4 directory - under Windows as well (cygwin Makefile). Related entry: 2006-03-07, - dgp. This moved the installation of http from 8.2 to 8.4, partially. A - fix of the required directory creation was done for unix on Mar 10, - without entry in the Changelog. This entry is for the fix of the - directory creation under Windows. - - * unix/installManPage: There is always one even more broken "sed". - Moved the # comment starting character in the sed script to the - beginning of their respective lines. The AIX sed will not recognize - them as comments otherwise :( The actual text stays indented for - better association with the commands they belong to. - -2006-03-20 Donal K. Fellows - - * tests/cmdAH.test, tests/fCmd.test, tests/unixFCmd.test: - * tests/winFCmd.test: Cleanup of some test constraint handling, and a - few other minor issues. - -2006-03-18 Vince Darley - - * generic/tclFileName.c: - * doc/FileSystem.3: - * tests/fileName.test: Fix to [Bug 1084705] so that 'glob -nocomplain' - finally agrees with its documentation and doesn't swallow genuine - errors. - - ***POTENTIAL INCOMPATIBILITY*** for scripts that assumed '-nocomplain' - removes the need for 'catch' to deal with non-understood path names. - - Small optimisation to implementation of pattern==NULL case of TclGlob, - and clarification to the documentation. [Tclvfs bug 1405317] - -2006-03-18 Vince Darley - - * tests/fCmd.test: added knownBug test case for [Bug 1394972] - - * tests/winFCmd.test: - * tests/tcltest.test: corrected tests to better account for behaviour - of writable/non-writable directories on Windows 2000/XP. This, with - the previous patches, closes [Bug 1193497] - -2006-03-17 Andreas Kupries - - * doc/chan.n: Updated with documentation for the commands 'chan - create' and 'chan postevent' (TIP #219). - - * doc/refchan.n: New file. Documentation of the command handler API - for reflected channels (TIP #219). - -2006-03-17 Joe Mistachkin - - * unix/tclUnixPort.h: Include pthread.h prior to pthread_np.h [Bug - 1444692] - - * win/tclWinTest.c: Corrected typo of 'initializeMutex' that prevented - successful compilation. - -2006-03-16 Andreas Kupries - - * doc/open.n: Documented the changed behaviour of 'a'ppend mode. - - * tests/io.test (io-43.1 io-44.[1234]): Rewritten to be self-contained - with regard to setup and cleanup. [Bug 681793] - - * generic/tclIOUtil.c (TclGetOpenMode): Added the flag O_APPEND to the - list of POSIX modes used when opening a file for 'a'ppend. This - enables the proper automatic seek-to-end-on-write by the OS. See [Bug - 680143] for longer discussion. - - * tests/ioCmd.test (iocmd-13.7.*): Extended the testsuite to check the - new handling of 'a'. - -2006-03-15 Andreas Kupries - - * tests/socket.test: Extended the timeout in socket-11.11 from 10 to - 40 seconds to allow for really slow machines. Also extended - actual/expected results with value of variable 'done' to make it - clearer when a test fails due to a timeout. [Bug 792159] - -2006-03-15 Vince Darley - - * win/fCmd.test: add proper test constraints so the new tests don't - run on Unix. - -2006-03-14 Andreas Kupries - - * generic/tclPipe.c (TclCreatePipeline): Modified the processing of - pipebars to fail if the last bar is followed only by redirections. - [Bug 768659] - -2006-03-14 Andreas Kupries - - * doc/fconfigure.n: Clarified that -translation is binary is reported - as lf when queried, because it is identical to lf, except for the - special additional behaviour when setting it. [Bug 666770] - -2006-03-14 Andreas Kupries - - * doc/clock.n: Removed double-quotes around section title NAME; not - needed. - * unix/installManpage: Reverted part to handle double-quotes in - section NAME, chokes older sed installations. - -2006-03-14 Andreas Kupries - - * library/tm.tcl (::tcl::tm::Defaults): Fixed handling of environment - variable TCLX.y_TM_PATH, bad variable reference. Thanks to Julian - Noble. [Bug 1448251] - -2006-03-14 Vince Darley - - * win/tclWinFile.c: updated patch to deal with 'file writable' issues - on Windows XP/2000. - * generic/tclTest.c: - * unix/tclUnixTest.c: - * win/tclWinTest.c: - * tests/fCmd.test: updated test suite to deal with correct permissions - setting and differences between XP/2000 and 95/98 3 tests still fail; - to be dealt with shortly - -2006-03-13 Don Porter - - * generic/tclEncoding.c: Report error when an escape encoding is - missing one of its sub-encodings. [Bug 506653] - - * unix/configure.in: Revert change from 2005-07-26 that sometimes - * unix/configure: added $prefix/share to the tcl_pkgPath. See - [Patch 1231015]. autoconf-2.59. - -2006-03-10 Miguel Sofer - - * generic/tclProc.c (ObjInterpProcEx): - * tests/apply.test (apply-5.1): Fix [apply] error messages so that - they quote the lambda expression. [Bug 1447355] - -2006-03-10 Zoran Vasiljevic - - -- Summary of changes fixing [Bug 1437595] -- - - * generic/tclEvent.c: Cosmetic touches and identation - * generic/tclInt.h: Added TclpFinalizeSockets() call. - - * generic/tclIO.c: Calls TclpFinalizeSockets() as part of the - TclFinalizeIOSubsystem(). - - * unix/tclUnixSock.c: Added no-op TclpFinalizeSockets(). - - * win/tclWinPipe.c, win/tclWinSock.c: Finalization of sockets/pipes is - now solely done in TclpFinalizeSockets() and TclpFinalizePipes() and - not over the thread-exit handler, because the order of actions the Tcl - generic core will impose may result in cores/hangs if the thread exit - handler tears down corresponding subsystem(s) too early. - -2006-03-10 Vince Darley - - * win/tclWinFile.c: previous patch breaks tests, so removed. - -2006-03-09 Vince Darley - - * win/tclWinFile.c: fix to 'file writable' in certain XP directories. - Thanks to fvogel and jfg. [Patch 1344540] Modified patch to make use - of existing use of getSecurityProc. - -2006-03-08 Don Porter - - * generic/tclExecute.c: Complete missing bit of TIP 215 implementation - * tests/incr.test: - -2006-03-07 Joe English - - * unix/tcl.m4: Set SHLIB_LD_FLAGS='${LIBS}' on NetBSD, as per the - other *BSD variants. [Bug 1334613] - * unix/configure: Regenerated. - -2006-03-07 Don Porter - - * changes: Update in prep. for 8.5a4 release. - - * unix/Makefile.in: Package http 2.5.2 requires Tcl 8.4, so the - * win/Makefile.in: *.tm installation has to be placed in an "8.4" - directory, not an "8.2" directory. - -2006-03-06 Don Porter - - * generic/tclBasic.c: Revised handling of TCL_EVAL_* flags to - * tests/parse.test: simplify TclEvalObjvInternal and to correct - the auto-loading of alias targets (parse-8.12). [Bug 1444291] - -2006-03-03 Don Porter - - * generic/tclPathObj.c: Revised yesterday's fix for [Bug 1379287] to - work on Windows. - - * generic/tclObj.c: Compatibility support for existing code that - calls Tcl_GetObjType("boolean"). - -2006-03-02 Don Porter - - * generic/tclPathObj.c: Fix for failed normalization of paths - * tests/fileSystem.test: with /../ that lead back to the root - of the filesystem, like /foo/.. [Bug 1379287] - -2006-03-01 Reinhard Max - - * unix/installManPage: Fix the script for manpages that have quotes - around the .SH arguments, as doctools produces them. [Bug 1292145] - Some minor cleanups and improvements. - -2006-02-28 Don Porter - - * generic/tclBasic.c: Corrections to be sure that TCL_EVAL_GLOBAL - * tests/namespace.test: evaluations act the same as [uplevel #0] - * tests/parse.test: evaluations, even when execution traces or - * tests/trace.test: invocations of [::unknown] are present. [Bug - 1439836] - -2006-02-22 Don Porter - - * generic/tclBasic.c: Corrected a few bugs in how [namespace - * tests/namespace.test: unknown] interacts with TCL_EVAL_* flags. - [Patch 958222] - -2006-02-17 Don Porter - - * generic/tclIORChan.c: Revised error message generation and handling - * tests/ioCmd.test: of exceptional return codes in the channel - reflection layer. [Bug 1372348] - -2006-02-16 Don Porter - - * generic/tclIndexObj.c: Disallow the "ambiguous" error message - * tests/indexObj.test: when TCL_EXACT matching is requested. - * tests/ioCmd.test: - -2006-02-15 Don Porter - - * generic/tclIO.c: Made several routines tolerant of - * generic/tclIORChan.c: interp == NULL arguments. [Bug 1380662] - * generic/tclIOUtil.c: - -2006-02-09 Don Porter - - TIP#215 IMPLEMENTATION - - * doc/incr.n: Revised [incr] to auto-initialize when varName - * generic/tclExecute.c: argument is unset. [Patch 1413115] - * generic/tclVar.c: - * tests/compile.test: - * tests/incr-old.test: - * tests/incr.test: - * tests/set.test: - - * tests/main.test (Tcl_Main-6.7): Improved robustness of - command auto-completion test. [Bug 1422736] - -2006-02-08 Donal K. Fellows - - * doc/Encoding.3, doc/encoding.n: Updates due to review at request of - Don Porter. Mostly minor changes. - -2006-02-08 Don Porter - - TIP#258 IMPLEMENTATION - - * doc/Encoding.3: New subcommand [encoding dirs]. - * doc/encoding.n: New routine Tcl_GetEncodingNameFromEnvironment - * generic/tcl.decls: Made public: - * generic/tclBasic.c: TclGetEncodingFromObj - * generic/tclCmdAH.c: -> Tcl_GetEncodingFromObj - * generic/tclEncoding.c:TclGetEncodingSearchPath - * generic/tclInt.decls: -> Tcl_GetEncodingSearchPath - * generic/tclInt.h: TclSetEncodingSearchPath - * generic/tclTest.c: -> Tcl_SetEncodingSearchPath - * library/init.tcl: Removed commands: - * tests/cmdAH.test: [tcl::unsupported::EncodingDirs] - * tests/encoding.test: [testencoding path] (Tcltest) - * unix/tclUnixInit.c: [Patch 1413934] - * win/tclWinInit.c: - - * generic/tclDecls.h: make genstubs - * generic/tclIntDecls.h: - * generic/tclStubInit.c: - -2006-02-01 Miguel Sofer - - * generic/tclProc.c: minor improvements to [apply] - * tests/apply.test: new tests; apply-5.1 currently fails to indicate - missing work in error reporting - -2006-02-01 Don Porter - - TIP#194 IMPLEMENTATION - - * doc/apply.n: (New file) New command [apply]. [Patch 944803] - * doc/uplevel.n: - * generic/tclBasic.c: - * generic/tclInt.h: - * generic/tclProc.c: - * tests/apply.test: (New file) - * tests/proc-old.test: - * tests/proc.test: - - TIP#181 IMPLEMENTATION - - * doc/Namespace.3: New command [namespace unknown]. New public C - * doc/namespace.n: routines Tcl_(Get|Set)NamespaceUnknownHandler. - * doc/unknown.n: [Patch 958222] - * generic/tcl.decls: - * generic/tclBasic.c: - * generic/tclInt.h: - * generic/tclNamesp.c: - * tests/namespace.test: - - * generic/tclDecls.h: make genstubs - * generic/tclStubInit.c: - - TIP#250 IMPLEMENTATION - - * doc/namespace.n: New command [namespace upvar]. [Patch 1275435] - * generic/tclInt.h: - * generic/tclNamesp.c: - * generic/tclVar.c: - * tests/namespace.test: - * tests/upvar.test: - -2006-01-26 Donal K. Fellows - - * doc/dict.n: Fixed silly bug in example. Thanks to Heiner Marxen - for catching this! [Bug 1415725] - -2006-01-26 Donal K. Fellows - - * unix/tclUnixChan.c (TclpOpenFileChannel): Tidy up and comment the - mess to do with setting up serial channels. This (deliberately) breaks - a broken FreeBSD port, indicates what we're really doing, and reduces - the amount of conditional compilation sections for better maintenance. - -2006-01-25 Donal K. Fellows - - * unix/tclUnixInit.c (TclpInitPlatform): Improved conditions on when - to update the FP rounding mode on FreeBSD, taken from FreeBSD port. - -2006-01-23 Donal K. Fellows - - * tests/string.test (string-12.21): Added test for [Bug 1410553] based - on original bug report. - -2006-01-23 Miguel Sofer - - * generic/tclStringObj.c: fixed incorrect handling of internal rep in - Tcl_GetRange. Thanks to twylite and Peter Spjuth. [Bug 1410553] - - * generic/tclProc.c: fixed args handling for precompiled bodies [Bug - 1412695]; thanks to Uwe Traum. - -2006-01-16 Reinhard Max - - * generic/tclPipe.c (FileForRedirect): Prevent nameString from being - freed without having been initialized. - * tests/exec.test: Added a test for the above. - -2006-01-12 Zoran Vasiljevic - - * generic/tclPathObj.c (Tcl_FSGetInternalRep): backported patch from - core-8-4-branch. A freed pointer has been overwritten causing all - sorts of coredumps. - -2006-01-12 Vince Darley - - * win/tclWinFile.c: fix to sharing violation [Bug 1366227] - -2006-01-11 Don Porter - - * generic/tclBasic.c: Moved Tcl_LogCommandInfo from tclBasic.c to - * generic/tclNamesp.c: tclNamesp.c to get access to identifier with - * tests/error.test (error-7.0): file scope. Added check for traces on - ::errorInfo, and when present fall back to contruction of the stack - trace in the variable so that write trace notification timings are - compatible with earlier Tcl releases. This reduces, but does not - completely eliminate the ***POTENTIAL INCOMPATIBILITY*** created by - the 2004-10-15 commit. [Bug 1397843] - -2006-01-10 Daniel Steffen - - * unix/configure: add caching, use AC_CACHE_CHECK instead of - * unix/configure.in: AC_CACHE_VAL where possible, consistent message - * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes - and gratuitous formatting differences, fix SC_CONFIG_MANPAGES with - default argument, Darwin improvements to SC_LOAD_*CONFIG. - -2006-01-09 Don Porter - - * generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope] - * tests/namespace.test: commands were not reported by [info level]. - [Bug 1400572] - -2006-01-09 Donal K. Fellows - - * generic/tclTrace.c: Stop exporting the guts of the trace command; - nothing outside this file needs to see it. [Bug 971336] - -2006-01-05 Donal K. Fellows - - * unix/tcl.m4 (TCL_CONFIG_SYSTEM): Factor out the code to determine - the operating system version number, as it was replicated in several - places. - -2006-01-04 David Gravereaux - - * win/tclAppInit.c: WIN32 native console signal handler removed. This - was found to be interfering with TWAPI extension one. IMO, special - services such as signal handlers should best be done with extensions - to the core after discussions on c.l.t. about Roy Terry's tclsh - children of a real windows service shell. - ****************************************************************** + *** CHANGELOG ENTRIES FOR 2006-2007 IN "ChangeLog.2007" *** *** CHANGELOG ENTRIES FOR 2005 IN "ChangeLog.2005" *** *** CHANGELOG ENTRIES FOR 2004 IN "ChangeLog.2004" *** *** CHANGELOG ENTRIES FOR 2003 IN "ChangeLog.2003" *** diff --git a/ChangeLog.2007 b/ChangeLog.2007 new file mode 100644 index 0000000..5995956 --- /dev/null +++ b/ChangeLog.2007 @@ -0,0 +1,5921 @@ +2007-12-31 Donal K. Fellows + + * doc/dict.n: Clarified meaning of dictionary values following + discussion on comp.lang.tcl. + +2007-12-26 Miguel Sofer + + * generic/tclCmdIL.c: More [lsort] data handling streamlines. The + function MergeSort is gone, essentially inlined into Tcl_LsortObjCmd. + It is not a straight inlining, two loops over all lists elements where + merged in the process: the linked list elements are now built and + merged into the temporary sublists in the same pass. + +2007-12-25 Miguel Sofer + + * generic/tclCmdIL.c: More [lsort] data handling streamlines. Extra + mem reqs of latest patches removed, restored to previous mem profile. + Improved -unique handling, now eliminating repeated elems immediately + instead of marking them to avoid reinsertion at the end. + +2007-12-23 Jeff Hobbs + + * generic/tclCompCmds.c (TclCompileRegexpCmd): TCL_REG_NOSUB cannot + * tests/regexp.test (regexp-22.2): be used because it + * tests/regexpComp.test: [Bug 1857126] disallows backrefs. + +2007-12-21 Miguel Sofer + + * generic/tclCmdIL.c: Speed patch for lsort. [Patch 1856994] + +2007-12-21 Miguel Sofer + + * generic/tclCmdIL.c (Tcl_LsortObjCmd, Tcl_LsearchObjCmd): Avoid + calling SelectObjFromSublist when there are no sublists. + +2007-12-21 Miguel Sofer + + * generic/tclCmdIL.c (Tcl_LsortObjCmd): Preallocate a listObj of + sufficient length for the sorted list instead of growing it. Second + commit replaces calls to Tcl_ListObjAppenElement with direct access to + the internal rep. + +2007-12-19 Don Porter + + *** 8.5.0 TAGGED FOR RELEASE *** + + * changes: Updated for 8.5.0 release. + +2007-12-19 Jeff Hobbs + + * generic/tclCompCmds.c (TclCompileSwitchCmd): update switch -regexp + * tests/switch.test-14.*: compilation to pass + the cflags to INST_REGEXP (changed on 12-07). Added tests for switch + -regexp compilation (need more). [Bug 1854399] + +2007-12-18 Don Porter + + * changes: Updated for 8.5.0 release. + +2007-12-18 Donal K. Fellows + + * generic/regguts.h, generic/regc_color.c, generic/regc_nfa.c: + Fixes for problems created when processing regular expressions that + generate very large automata. An enormous number of thanks to Will + Drewry , Tavis Ormandy , + and Tom Lane from the Postgresql crowd for + their help in tracking these problems down. [Bug 1810264] + +2007-12-17 Don Porter + + * changes: Updated for 8.5.0 release. + +2007-12-17 Miguel Sofer + + * generic/tclAlloc.c: + * generic/tclExecute.c: + * generic/tclInt.h: + * generic/tclThreadAlloc.c: Fix alignment for memory returned by + TclStackAlloc; insure that all memory allocators align to 16-byte + boundaries on 64 bit platforms [Bug 1851832, 1851524] + +2007-12-14 Jeff Hobbs + + * generic/tclIOUtil.c (FsAddMountsToGlobResult): fix the tail + conversion of vfs mounts. [Bug 1602539] + + * win/README: updated notes + +2007-12-14 Pat Thoyts + + * tests/winFile.test: Fixed tests for win2k with long machine name + +2007-12-14 Pat Thoyts + + * win/nmakehlp.c: Support compilation with MSVC9 for AMD64. + * win/makefile.vc: + +2007-12-13 Donal K. Fellows + + * doc/trace.n: Clarified documentation of enterstep and leavestep + traces, including adding example. [Bug 614282, 1701540, 1755984] + +2007-12-12 Don Porter + + * doc/IntObj.3: Update docs for the Tcl_GetBignumAndClearObj() -> + Tcl_TakeBignumFromObj() revision [TIP 298]. Added docs for the + Tcl_InitBignumFromDouble() routine. [Bug 1446971] + + * changes: Updated for 8.5.0 release. + +2007-12-10 Jeff Hobbs + + * generic/tclUtil.c (TclReToGlob): reduce escapes in conversion + when not necessary + + * generic/tclInt.decls: move TclByteArrayMatch and TclReToGlob + * generic/tclIntDecls.h: to tclInt.h from stubs. + * generic/tclStubInit.c: Add flags var to TclByteArrayMatch for + * generic/tclInt.h: future extensibility + * generic/tcl.h: define TCL_MATCH_EXACT doc for Tcl_StringCaseMatch. + * doc/StrMatch.3: It is compatible with existing usage. + * generic/tclExecute.c (INST_STR_MATCH): flag for TclByteArrayMatch + * generic/tclUtil.c (TclByteArrayMatch, TclStringMatchObj): + * generic/tclRegexp.c (Tcl_RegExpExecObj): + * generic/tclCmdMZ.c (StringMatchCmd): Use TclStringMatchObj + * tests/string.test (11.9.* 11.10.*): more tests + +2007-12-10 Joe English + + * doc/string.n, doc/UniCharIsAlpha.3: Fix markup errors. + * doc/CrtCommand.3, doc/CrtMathFnc.3, doc/FileSystem.3, + * doc/GetStdChan.3, doc/OpenFileChnl.3, doc/SetChanErr.3, + * doc/eval.n, doc/filename.n: Consistency: Move "KEYWORDS" section + after "SEE ALSO". + +2007-12-10 Daniel Steffen + + * tools/genStubs.tcl: fix numerous issues handling 'macosx', + 'aqua' or 'x11' entries interleaved + with 'unix' entries [Bug 1834288]; add + genStubs::export command + [Tk FR 1716117]; cleanup formatting. + + * generic/tcl.decls: use new genstubs 'export' command to + * generic/tclInt.decls: mark exported symbols not in stubs + * generic/tclTomMath.decls: table [Tk FR 1716117]; cleanup + formatting. + + * generic/tclDecls.h: regen with new genStubs.tcl. + * generic/tclIntDecls.h: [Bug 1834288] + * generic/tclIntPlatDecls.h: + * generic/tclPlatDecls.h: + * generic/tclStubInit.c: + +2007-12-09 Jeff Hobbs + + * tests/io.test, tests/chanio.test (io-73.1): Make sure to invalidate + * generic/tclIO.c (SetChannelFromAny): internal rep only after + validating channel rep. [Bug 1847044] + +2007-12-08 Donal K. Fellows + + * doc/expr.n, doc/mathop.n: Improved the documentation of the + operators. [Bug 1823622] + + * generic/tclBasic.c (builtInCmds): Corrected list of hidden and + * doc/interp.n (SAFE INTERPRETERS): exposed commands so that the + documentation and reality now match. [Bug 1662436] + +2007-12-07 Jeff Hobbs + + * generic/tclExecute.c (TclExecuteByteCode INST_REGEXP): + * generic/tclCompCmds.c (TclCompileRegexpCmd): Pass correct RE + compile flags at compile time, and use TCL_REG_NOSUB. + + * generic/tclIOCmd.c (FinalizeIOCmdTSD, Tcl_PutsObjCmd): cache + stdout channel object for [puts $str] calls. + +2007-12-06 Don Porter + + * README: Remove mention of dead comp.lang.tcl.announce + newsgroup. [Bug 1846433] + + * unix/README: Mention the stub library created by `make` and warn + about the effect of embedded paths in the installed binaries. + Thanks to Larry Virden. [Bug 1794084] + + * doc/AddErrInfo.3: Documentation for the new routines in TIP 270. + * doc/Interp.3: + * doc/StringObj.3: + +2007-12-06 Don Porter + + * doc/namespace.n: Documentation for zero-argument form of + [namespace import] (TIP 261) [Bug 1596416] + +2007-12-06 Jeff Hobbs + + * generic/tclInt.h: add TclGetChannelFromObj decl + (TclMatchIsTrivial): simplify TclMatchIsTrivial to remove ] check. + +2007-12-06 Donal K. Fellows + + + * generic/tclBasic.c (Tcl_CreateInterp): Simplify the setting up of + * generic/tclIOCmd.c (TclInitChanCmd): the [chan] ensemble. This + * library/init.tcl: gets rid of quite a bit of + code and makes it possible to understand the whole with less effort. + + * generic/tclCompCmds.c (TclCompileEnsemble): Ensure that the right + number of tokens are copied. [Bug 1845320] + + * generic/tclNamesp.c (TclMakeEnsemble): Added missing release of a + DString. [Bug 1845397] + +2007-12-05 Jeff Hobbs + + * generic/tclIO.h: Create Tcl_Obj for Tcl channels to reduce + * generic/tclIO.c: overhead in lookup by Tcl_GetChannel. New + * generic/tclIOCmd.c: TclGetChannelFromObj for internal use. + * generic/tclIO.c (WriteBytes, WriteChars): add opt check to avoid + EOL translation when not linebuffered or using lf. [Bug 1845092] + +2007-12-05 Miguel Sofer + + * tests/stack.test: made the tests for stack overflow not care + about which mechanism caused the error (interp's recursion limit + or C-stack depth detector). + +2007-12-05 Jeff Hobbs + + * win/configure, win/tcl.m4 (LIBS_GUI): mingw needs -lole32 + -loleaut32 but not msvc for Tk's [send]. [Bug 1844749] + +2007-12-05 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Prevent shimmering crash + when -exact and -integer/-real are mixed. [Bug 1844789] + +2007-12-03 Donal K. Fellows + + * unix/tclUnixChan.c (CreateSocketAddress): Add extra #ifdef-fery to + make code compile on BSD 5. [Bug 1618235, again] + +2007-12-03 Don Porter + + * library/tcltest/tcltest.tcl: Bump tcltest to version 2.3.0 so that + * library/tcltest/pkgIndex.tcl: we release a stable tcltest with a + * unix/Makefile.in: stable Tcl. + * win/Makefile.in: + +2007-12-03 Jeff Hobbs + + * win/configure, win/tcl.m4 (LIBS_GUI): remove ole32.lib oleaut32.lib + +2007-12-03 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileSwitchCmd): Adjusted the [switch] + * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): command so that when + passed two arguments, no check for options are performed. This is OK + since in the two-arg case, detecting an option would definitely lead + to a syntax error. [Patch 1836519] + +2007-11-29 Jeff Hobbs + + * win/makefile.vc: add ws2_32.lib to baselibs + * win/configure, win/tcl.m4: add ws2_32.lib / -lws2_32 to build. + * win/tclWinSock.c: remove dyn loading of winsock, assume that it is + always available now. + +2007-11-29 Don Porter + + * generic/tclWinSock.c (InitializeHostName): Correct error in + buffer length tracking. After gethostname() writes into a buffer, + convert only the written string to internal encoding, not the whole + buffer. + +2007-11-28 Don Porter + + * generic/tclConfig.c: Corrected failure of the [::foo::pkgconfig] + command to clean up registered configuration data when the query + command is deleted from the interp. [Bug 983501] + + * generic/tclNamesp.c (Tcl_SetEnsembleMappingDict): Added checks + that the dict value passed in is in the format required to make the + internals of ensembles work. [Bug 1436096] + + * generic/tclIO.c: Simplify test and improve accuracy of error + message in latest changes. + +2007-11-28 Pat Thoyts + + * generic/tclIO.c: -eofchar must support no eofchar. + +2007-11-27 Miguel Sofer + + * generic/tclBasic.c: remove unneeded call in Tcl_CreateInterp, add + comments. + +2007-11-27 Don Porter + + * win/tclWinSock.c: Add mising encoding conversion of the [info + hostname] value from the system encoding to Tcl's internal encoding. + + * doc/chan.n: "Fix" the limitation on channel -eofchar + * doc/fconfigure.n: values to single byte characters by + * generic/tclIO.c: documenting it and making it fail loudly. + * tests/chan.test: Thanks to Stuart Cassoff for contributing the + fix. [Bug 800753] + +2007-11-26 Miguel Sofer + + * generic/tclBasic.c: + * generic/tclInt.h: + * unix/tclUnixInit.c: + * unix/tclUnixThrd.c: Fix stack checking via workaround for bug in + glibc's pthread_attr_get_np, patch from [Bug 1815573]. Many thanks to + Sergei Golovan (aka Teo) for detecting the bug and helping diagnose + and develop the fix. + +2007-11-24 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileDictAppendCmd): Fix bug in [dict + append] compiler which caused strange stack corruption. [Bug 1837392] + +2007-11-23 Andreas Kupries + + * generic/tclIORChan.c: Fixed a problem with reflected channels. 'chan + postevent' is defined to work only from within the interpreter + containing the handler command. Sensible, we want only handler + commands to use it. It identifies the channel by handle. The channel + moves to a different interpreter or thread. The interpreter containing + the handler command doesn't know the channel any longer. 'chan + postevent' fails, not finding the channel any longer. Uhm. + + Fixed by creating a second per-interpreter channel table, just for + reflected channels, where each interpreter remembers for which + reflected channels it has the handler command. This info does not move + with the channel itself. The table is updated by 'chan create', and + used by 'chan postevent'. + + * tests/ioCmd.test: Updated the testsuite. + +2007-11-23 Jeff Hobbs + + * generic/tclVar.c (Tcl_ArrayObjCmd): handle the right data for + * tests/var.test (var-14.2): [array names $var -glob $ptn] + +2007-11-23 Donal K. Fellows + + * generic/tclCmdMZ.c (String*Cmd, TclInitStringCmd): Rebuilt [string] + * generic/tclCompCmds.c (TclCompileString*Cmd): as an ensemble. + +2007-11-22 Donal K. Fellows + + * generic/tclDictObj.c (Dict*Cmd,TclInitDictCmd): Rebuilt the [dict] + * generic/tclCompCmds.c (TclCompileDict*Cmd): command as an ensemble. + +2007-11-22 Donal K. Fellows + + * generic/tclCmdMZ.c (Tcl_StringObjCmd): Rewrote the [string] and + * generic/tclDictObj.c (Tcl_DictObjCmd): [dict] implementations to be + ready for conversion to ensembles. + + * tests/string.test (string-12.22): Flag shimmering bug found in + [string range]. + +2007-11-21 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileEnsemble): Rewrote the ensemble + compiler to remove many of the limitations. Can now compile scripts + that use unique prefixes of subcommands, and which have mappings of a + command to multiple words (provided the first is a compilable command + of course). + +2007-11-21 Donal K. Fellows + + * generic/tclNamesp.c (TclMakeEnsemble): Factor out the code to set up + a core ensemble from a table of information about subcommands, ready + for reuse within the core. + + * generic/various: Start to return more useful Error codes, currently + mainly on assorted lookup failures. + +2007-11-20 Donal K. Fellows + + * generic/tclDictObj.c: Changed the underlying implementation of the + hash table used in dictionaries to additionally keep all entries in + the hash table in a linked list, which is only ever added to at the + end. This makes iteration over all entries in the dictionary in + key insertion order a trivial operation, and so cleans up a great deal + of complexity relating to dictionary representation and stability of + iteration order. + + ***POTENTIAL INCOMPATIBILITY*** + For any code that depended on the (strange) old iteration order. + + * generic/tclConfig.c (QueryConfigObjCmd): Correct usage of + Tcl_WrongNumArgs. + +2007-11-19 Don Porter + + *** 8.5b3 TAGGED FOR RELEASE *** + + * README: Bump version number to 8.5b3. + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf (2.59) + * win/configure: + + * changes: Updated for 8.5b3 release. + +2007-11-19 Kevin Kenny + + * library/tzdata/Africa/Cairo: + * library/tzdata/America/Campo_Grande: + * library/tzdata/America/Caracas: + * library/tzdata/America/Cuiaba: + * library/tzdata/America/Havana: + * library/tzdata/America/Sao_Paulo: + * library/tzdata/Asia/Damascus: + * library/tzdata/Asia/Gaza: + * library/tzdata/Asia/Tehran: Olson's tzdata2007i imported. + +2007-11-18 Daniel Steffen + + * generic/tclExecute.c (TclExecuteByteCode:INST_EXIST_*): Fix read + traces not firing on non-existent array elements. [Bug 1833522] + +2007-11-16 Donal K. Fellows + + * generic/tclCmdIL.c (TclInitInfoCmd): Rename the implementation + commands for [info] to be something more "expected". + + * generic/tclCompCmds.c (TclCompileInfoExistsCmd): Compiler for the + [info exists] subcommand. + (TclCompileEnsemble): Cleaned up version of ensemble compiler that was + in TclCompileInfoCmd, but which is now much more generally applicable. + + * generic/tclInt.h (ENSEMBLE_COMPILE): Added flag to allow for cleaner + turning on and off of ensemble bytecode compilation. + + * generic/tclCompile.c (TclCompileScript): Add the cmdPtr to the list + of arguments passed to command compilers. + +2007-11-15 Don Porter + + * generic/regc_nfa.c: Fixed infinite loop in the regexp compiler. + [Bug 1810038] + + * generic/regc_nfa.c: Corrected looping logic in fixempties() to + avoid wasting time walking a list of dead states. [Bug 1832612] + +2007-11-15 Donal K. Fellows + + * generic/tclNamesp.c (NamespaceEnsembleCmd): Must pass a non-NULL + interp to Tcl_SetEnsemble* functions. + + * doc/re_syntax.n: Try to make this easier to read. It's still a very + difficult manual page! + + * unix/tcl.m4 (SC_CONFIG_CFLAGS): Allow people to turn off the -rpath + option to their linker if they so desire. This is a configuration only + recommended for (some) vendors. Relates to [Patch 1231022]. + +2007-11-15 Pat Thoyts + + * win/tclWin32Dll.c: Prefer UINT_PTR to DWORD_PTR when casting + pointers to integer types for greater portability. [Bug 1831253] + +2007-11-15 Daniel Steffen + + * macosx/Tcl.xcodeproj/project.pbxproj: add new chanio.test. + * macosx/Tcl.xcode/project.pbxproj: + +2007-11-14 Donal K. Fellows + + * generic/tclCompile.c (TclCompileScript): Ensure that we get our + count in our INST_START_CMD calls right, even when there's a failure + to compile a command directly. + + * generic/tclNamesp.c (Tcl_SetEnsembleSubcommandList) + (Tcl_SetEnsembleMappingDict): Special code to make sure that + * generic/tclCmdIL.c (TclInitInfoCmd): [info exists] is compiled + right while not allowing changes to the ensemble to cause havok. + + * generic/tclCompCmds.c (TclCompileInfoCmd): Simple compiler for the + [info] command that only handles [info exists]. + + * generic/tclExecute.c (TclExecuteByteCode:INST_EXIST_*): New + instructions to allow the testing of whether a variable exists. + +2007-11-14 Andreas Kupries + + * tests/chanio.test: New file. This is essentially a duplicate of + 'io.test', with all channel commands converted to their 'chan xxx' + notation. + * tests/io.test: Fixed typo in test description. + +2007-11-14 Donal K. Fellows + + * generic/regc*.c: Eliminate multi-char collating element code + completely. Simplifies the code quite a bit. If people still want the + full code, it will remain on the 8.4 branch. [Bug 1831425] + +2007-11-13 Jeff Hobbs + + * generic/tclCompCmds.c (TclCompileRegexpCmd): clean up comments, only + free dstring on OK from TclReToGlob. + (TclCompileSwitchCmd): simplify TclReToGlob usage. + +2007-11-14 Donal K. Fellows + + * generic/regc*.c: #ifdef/comment out the code that deals with + multi-character collating elements, which have never been supported. + Cuts the memory consumption of the RE compiler. [Bug 1831425] + +2007-11-13 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileSwitchCmd, TclCompileRegexpCmd): + Extend [switch] compiler to handle regular expressions as long as + things are not too complex. Fix [regexp] compiler so that non-trivial + literal regexps get fed to INST_REGEXP. + + * doc/mathop.n: Clarify definitions of some operations. + +2007-11-13 Miguel Sofer + + * unix/tclUnixInit.c: the TCL_NO_STACK_CHECK was being incorrectly + undefined here; this should be set (or not) in the compile options, it + is used elsewhere and needs to be consistent. + +2007-11-13 Pat Thoyts + + * unix/tcl.m4: Added autoconf goo to detect and make use of + * unix/configure.in: getaddrinfo and friends. + * unix/configure: (regenerated) + +2007-11-13 Donal K. Fellows + + * unix/tclUnixCompat.c (TclpGetHostByName): The six-argument form of + getaddressbyname_r() uses the fifth argument to indicate whether the + lookup succeeded or not on at least one platform. [Bug 1618235] + +2007-11-13 Don Porter + + * generic/regcomp.c: Convert optst() from expensive no-op to a + cheap no-op. + +2007-11-13 Donal K. Fellows + + * unix/tclUnixChan.c (CreateSocketAddress): Rewrote to use the + thread-safe version of gethostbyname() by forward-porting the code + used in 8.4, and added rudimentary support for getaddrinfo() (not + enabled by default, as no autoconf-ery written). Part of fix for [Bug + 1618235]. + +2007-11-12 Jeff Hobbs + + * generic/tclGet.c (Tcl_Get, Tcl_GetInt): revert use of TclGet* macros + due to compiler warning. These cases won't save time either. + + * generic/tclUtil.c (TclReToGlob): add more comments, set interp + result if specified on error. + +2007-11-12 Miguel Sofer + + * generic/tclBasic.c: New macro TclResetResult, new iPtr + * generic/tclExecute.c: flag bit INTERP_RESULT_UNCLEAN: + * generic/tclInt.h: shortcut for Tcl_ResetResult for the + * generic/tclProc.c: "normal" case: TCL_OK, no return + * generic/tclResult.c: options, no errorCode nor errorInfo, + * generic/tclStubLib.c: return at normal level. [Patch + * generic/tclUtil.c: 1830184] + + THIS PATCH WAS REVERTED: initial (mis)measurements overstated the + perfomance wins, which turn out to be tiny. Not worth the + complication. + +2007-11-11 Jeff Hobbs + + * generic/tclCompCmds.c, generic/tclCompile.c, generic/tclCompile.h: + * generic/tclExecute.c, generic/tclInt.decls, generic/tclIntDecls.h: + * generic/tclRegexp.c, generic/tclRegexp.h: Add INST_REGEXP and fully + * generic/tclStubInit.c, generic/tclUtil.c: compiled [regexp] for the + * tests/regexpComp.test: [Bug 1830166] simple cases. Also added + TclReToGlob function to convert RE to glob patterns and use these in + the possible cases. + +2007-11-11 Miguel Sofer + + * generic/tclResult.c (ResetObjResult): clarify the logic. + + * generic/tclBasic.c: Increased usage of macros to detect + * generic/tclBinary.c: and take advantage of objTypes. Added + * generic/tclClock.c: macros TclGet(Int|Long)FromObj, + * generic/tclCmdAH.c: TclGetIntForIndexM & TclListObjLength, + * generic/tclCmdIL.c: modified TclListObjGetElements. + * generic/tclCmdMZ.c: + * generic/tclCompCmds.c: The TclGetInt* macros are only a + * generic/tclCompExpr.c: shortcut on platforms where 'long' is + * generic/tclCompile.c: 'int'; it may be worthwhile to extend + * generic/tclDictObj.c: their functionality to other cases. + * generic/tclExecute.c: + * generic/tclGet.c: As this patch touches many files it + * generic/tclIO.c: has been recorded as [Patch 1830038] + * generic/tclIOCmd.c: in order to facilitate reviewing. + * generic/tclIOGT.c: + * generic/tclIndexObj.c: + * generic/tclInt.h: + * generic/tclInterp.c: + * generic/tclListObj.c: + * generic/tclLiteral.c: + * generic/tclNamesp.c: + * generic/tclObj.c: + * generic/tclParse.c: + * generic/tclProc.c: + * generic/tclRegexp.c: + * generic/tclResult.c: + * generic/tclScan.c: + * generic/tclStringObj.c: + * generic/tclUtil.c: + * generic/tclVar.c: + +2007-11-11 Daniel Steffen + + * unix/tclUnixTime.c (TclpWideClicksToNanoseconds): Fix issues with + * generic/tclInt.h: int64_t overflow. + + * generic/tclBasic.c: Fix stack check failure case if stack grows up + * unix/tclUnixInit.c: Simplify non-crosscompiled case. + + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2007-11-10 Miguel Sofer + + * generic/tclExecute.c: Fast path for INST_LIST_INDEX when the index + is not a list. + + * generic/tclBasic.c: + * unix/configure.in: + * unix/tclUnixInit.c: Detect stack grwoth direction at compile time, + only fall to runtime detection when crosscompiling. + + * unix/configure: autoconf 2.61 + + * generic/tclBasic.c: + * generic/tclInt.h: + * tests/interp.test: + * unix/tclUnixInit.c: + * win/tclWin32Dll.c: Restore simpler behaviour for stack checking, not + adaptive to stack size changes after a thread is launched. Consensus + is that "nobody does that", and so it is not worth the cost. Improved + failure comments (mistachkin). + +2007-11-10 Kevin Kenny + + * win/tclWin32Dll.c: Rewrote the Windows stack checking algorithm to + use information from VirtualQuery to determine the bound of the stack. + This change fixes a bug where the guard page of the stack was never + restored after an overflow. It also eliminates a nasty piece of + assembly code for structured exception handling on mingw. It + introduces an assumption that the stack is a single memory arena + returned from VirtualAlloc, but the code in MSVCRT makes the same + assumption, so it should be fairly safe. + +2007-11-10 Miguel Sofer + + * generic/tclBasic.c: + * generic/tclInt.h: + * unix/tclUnixInit.c: + * unix/tclUnixPort.h: + * win/tclWin32Dll.c: Modify the stack checking algorithm to recheck in + case of failure. The working assumptions are now that (a) a thread's + stack is never moved, and (b) a thread's stack can grow but not + shrink. Port to windows - could be more efficient, but is already + cheaper than it was. + +2007-11-09 Miguel Sofer + + * generic/tclResult.c (ResetObjResult): new shortcut. + + * generic/tclAsync.c: + * generic/tclBasic.c: + * generic/tclExecute.c: + * generic/tclInt.h: + * generic/tclUnixInit.c: + * generic/tclUnixPort.h: New fields in interp (ekeko!) to cache TSD + data that is accessed at each command invocation, access macros to + replace Tcl_AsyncReady and TclpCheckStackSpace by much faster variants + [Patch 1829248] + +2007-11-09 Jeff Hobbs + + * generic/tclInt.decls, generic/tclIntDecls.h: Use unsigned char for + * generic/tclExecute.c, generic/tclUtil.c: TclByteArrayMatch and + don't allow a nocase option. [Bug 1828296] + For INST_STR_MATCH, ignore pattern type for TclByteArrayMatch case. + + * generic/tclBinary.c (Tcl_GetByteArrayFromObj): check type before + func jump (perf). + +2007-11-07 Jeff Hobbs + + * generic/tclStubInit.c: Added TclByteArrayMatch + * generic/tclInt.decls: for efficient glob + * generic/tclIntDecls.h: matching of ByteArray + * generic/tclUtil.c (TclByteArrayMatch): Tcl_Objs, used in + * generic/tclExecute.c (TclExecuteByteCode): INST_STR_MATCH. [Bug + 1827996] + + * generic/tclIO.c (TclGetsObjBinary): Add an efficient binary path for + [gets]. + (DoWriteChars): Special case for 1-byte channel write. + +2007-11-06 Miguel Sofer + + * generic/tclEncoding.c: Version of the embedded iso8859-1 encoding + handler that is faster (functions to do the encoding know exactly what + they're doing instead of pulling it from a table, though the table + itself has to be retained for use by shift encodings that depend on + iso8859-1). [Patch 1826906], committing for dkf. + +2007-11-05 Andreas Kupries + + * generic/tclConfig.c (Tcl_RegisterConfig): Modified to not extend the + config database if the encoding provided by the user is not found + (venc == NULL). Scripts expecting the data will error out, however we + neither crash nor provide bogus information. See [Bug 983509] for more + discussion. + + * unix/tclUnixChan.c (TtyGetOptionProc): Accepted [Patch 1823576] + provided by Stuart Cassof . The patch adds + the necessary utf/external conversions to the handling of the + arguments of option -xchar which will allow the use of \0 and similar + characters. + +2007-11-03 Miguel Sofer + + * generic/tclTest.c (TestSetCmd2): + * generic/tclVar.c (TclObjLookupVarEx): + * tests/set.test (set-5.1): Fix error branch when array name looks + like array element (code not normally exercised). + +2007-11-01 Donal K. Fellows + + * tools/tcltk-man2html.tcl (output-directive): Convert .DS/.DE pairs + into tables since that is now all that they are used for. + + * doc/RegExp.3: Clarified documentation of RE flags. [Bug 1167840] + + * doc/refchan.n: Adjust internal name to be consistent with the file + name for reduced user confusion. After comment by Dan Steffen. + + * generic/tclCmdMZ.c (Tcl_StringObjCmd, UniCharIsAscii): Remember, the + NUL character is in ASCII too. [Bug 1808258] + + * doc/file.n: Clarified use of [file normalize]. [Bug 1185154] + +2007-10-30 Don Porter + + * generic/tcl.h: Bump version number to 8.5b2.1 to distinguish + * library/init.tcl: CVS development snapshots from the 8.5b2 + * unix/configure.in: release. + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf (2.59) + * win/configure: + +2007-10-30 Donal K. Fellows + + * doc/expr.n, doc/mathfunc.n: Improve documentation to try to make + clearer what is going on. + + * doc/interp.n: Shorten the basic descriptive text for some interp + subcommands so Solaris nroff doesn't truncate them. [Bug 1822268] + +2007-10-30 Donal K. Fellows + + * tools/tcltk-man2html.tcl (output-widget-options): Enhance the HTML + generator so that it can produce multi-line option descriptions. + +2007-10-28 Miguel Sofer + + * generic/tclUtil.c (Tcl_ConcatObj): optimise for some of the + concatenees being empty objs. [Bug 1447328] + +2007-10-28 Donal K. Fellows + + * generic/tclEncoding.c (TclInitEncodingSubsystem): Hard code the + iso8859-1 encoding, as it's needed for more than just text (especially + binary encodings...) Note that other encodings rely on the encoding + being a table encoding (!) so we can't use more efficient encoding + mapping functions. + +2007-10-27 Donal K. Fellows + + * generic/regc_lex.c (lexescape): Close off one of the problems + mentioned in [Bug 1810264]. + +2007-10-27 Miguel Sofer + + * generic/tclNamesp.c (Tcl_FindCommand): insure that FQ command names + are searched from the global namespace, ie, bypassing resolvers of the + current namespace. [Bug 1114355] + + * doc/apply.n: fixed example [Bug 1811791] + * doc/namespace.n: improved example [Bug 1788984] + * doc/AddErrInfo.3: typo [Bug 1715087] + * doc/CrtMathFnc.3: fixed Tcl_ListMathFuncs entry [Bug 1672219] + + * generic/tclCompile.h: + * generic/tclInt.h: moved declaration of TclSetCmdNameObj from + tclCompile.h to tclInt.h, reverting linker [Bug 1821159] caused by + commit of 2007-10-11 (both I and gcc missed one dep). + + * generic/tclVar.c: try to preserve Tcl_Objs when doing variable + lookups by name, partially addressing [Bug 1793601]. + +2007-10-27 Donal K. Fellows + + * tools/tcltk-man2html.tcl (make-man-pages, htmlize-text) + (process-text): Make the man->HTML scraper work better. + +2007-10-26 Don Porter + + *** 8.5b2 TAGGED FOR RELEASE *** + + * changes: Updated for 8.5b2 release. + + * doc/*.1: Revert doc changes that broke + * doc/*.3: `make html` so we can get the release + * doc/*.n: out the door. + + * README: Bump version number to 8.5b2. + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf (2.59) + * win/configure: + +2007-10-26 Donal K. Fellows + + * tools/man2help2.tcl, tools/man2tcl.c: Made some of the tooling code + to do man->other formats work better with current manpage set. Long + way still to go. + +2007-10-25 Zoran Vasiljevic + + * generic/tclThread.c: Added TclpMasterLock/Unlock arround calls to + ForgetSyncObject in Tcl_MutexFinalize and Tcl_ConditionFinalize to + prevent from garbling the internal lists that track sync objects. [Bug + 1726873] + +2007-10-24 Donal K. Fellows + + * tools/man2html2.tcl (macro): Added support for converting the new + macros into HTML. + + * doc/man.macros (QW,PQ,QR,MT): New macros that hide the ugly mess + needed to get proper GOOBE quoting in the manual pages. + * doc/*.n, doc/*.3, doc/*.1: Lots of changes to take advantage of the + new macros. + +2007-10-20 Miguel Sofer + + * generic/tclCompile.c: Fix comments. + * generic/tclExecute.c: + +2007-10-18 David Gravereaux + + * tools/mkdepend.tcl: sort the dep list for a more humanly readable + output. + +2007-10-18 Don Porter + + * generic/tclResult.c (TclMergeReturnOptions): Make sure any -code + values get pulled out of the dictionary, even if they are integer + valued. + + * generic/tclCompCmds.c (TclCompileReturnCmd): Added code to more + optimally compile [return -level 0 $x] to "push $x". [RFE 1794073] + + * compat/tmpnam.c (removed): The routine tmpnam() is no longer + * unix/Makefile.in: called by Tcl source code. Remove autogoo the + * unix/configure.in: supplied a replacement version on systems + * win/tcl.dsp: where the routine was not available. [RFE + 1811848] + + * unix/configure: autoconf-2.59 + + * generic/tcl.h: Remove TCL_LL_MODIFIER_SIZE. [RFE 1811837] + +2007-10-17 David Gravereaux + + * tools/mkdepend.tcl: Improved defense from malformed object list + infile. + +2007-10-17 Donal K. Fellows + + * tools/man2html2.tcl: Convert .DS/.DE into HTML tables, not + preformatted text. + +2007-10-17 Kevin B. Kenny + + * generic/tclCompExpr.c: Moved a misplaced declaration that blocked + compilation on VC++. + * generic/tclExecute.c: Silenced several VC++ compiler warnings about + converting 'long' to 'unsigned short'. + +2007-10-16 David Gravereaux + + * win/makefile.vc: removed old dependency cruft that is no longer + needed. + +2007-10-15 Don Porter + + * generic/tclIOCmd.c: Revise [open] so that it interprets leading + zero strings passed as the "permissions" argument as octal numbers, + even if Tcl itself no longer parses integers in that way. + + * unix/tclUnixFCmd.c: Revise the "-permissions" [file attribute] so + that it interprets leading zero strings as octal numbers, even if Tcl + itself no longer parses integers in that way. + + * generic/tclCompExpr.c: Corrections to code that produces + * generic/tclUtil.c: extended "bad octal" error messages. + + * tests/cmdAH.test: Test revisions so that tests pass whether or + * tests/cmdIL.test: not Tcl parses leading zero strings as octal. + * tests/compExpr-old.test: + * tests/compExpr.test: + * tests/compile.test: + * tests/expr-old.test: + * tests/expr.test: + * tests/incr.test: + * tests/io.test: + * tests/lindex.test: + * tests/link.test: + * tests/mathop.test: + * tests/parseExpr.test: + * tests/set.test: + * tests/string.test: + * tests/stringComp.test: + +2007-10-15 David Gravereaux + + * tools/mkdepend.tcl: Produces usable output. Include path problem + * win/makefile.vc: fixed. Never fight city hall when it comes to + levels of quoting issues. + +2007-10-15 Miguel Sofer + + * generic/tclParse.c (Tcl_ParseBraces): fix for possible read after + the end of buffer. [Bug 1813528] (Joe Mistachkin) + +2007-10-14 David Gravereaux + + * tools/mkdepend.tcl (new): Initial stab at generating automatic + * win/makefile.vc: dependencies. + +2007-10-12 Pat Thoyts + + * win/makefile.vc: Mine all version information from headers. + * win/rules.vc: Sync tcl and tk and bring extension versions + * win/nmakehlp.c: closer together. Try and avoid using tclsh to do + substitutions as we may cross compile. + * win/coffbase.txt: Added offsets for snack dlls. + +2007-10-11 David Gravereaux + + * win/makefile.vc: Fixed my bad spelling mistakes from years back. + Dedependency, duh! Rather funny. + +2007-10-11 Don Porter + + * generic/tclCmdMZ.c: Correct [string is (wide)integer] failure + * tests/string.test: to report correct failindex values for + non-decimal integer strings. [Bug 1805887] + + * compat/strtoll.c (removed): The routines strtoll() and strtoull() + * compat/strtoull.c (removed): are no longer called by the Tcl source + * generic/tcl.h: code. (Their functionality has been replaced + * unix/Makefile.in: by TclParseNumber().) Remove outdated comments + * unix/configure.in: and mountains of configury autogoo that + * unix/tclUnixPort.h: allegedly support the mythical systems where + * win/Makefile.in: these routines might not have been available. + * win/makefile.bc: + * win/makefile.vc: + * win/tclWinPort.h: + + * unix/configure: autoconf-2.59 + +2007-10-11 Miguel Sofer + + * generic/tclObj.c: remove superfluous #include of tclCompile.h + +2007-10-08 George Peter Staplin + + * doc/Hash.3: Correct the valid usage of the flags member for the + Tcl_HashKeyType. It should be 0 or more of the flags mentioned. + +2007-10-02 Jeff Hobbs + + * generic/tcl.h (Tcl_DecrRefCount): Update change from 2006-05-29 to + make macro more warning-robust in unbraced if code. + +2007-10-02 Don Porter + + [core-stabilizer-branch] + + * README: Bump version number to 8.5.0 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf (2.59) + * win/configure: + +2007-10-02 Andreas Kupries + + * library/tclIndex: Added 'tcl::tm::path' to the tclIndex. This fixes + [Bug 1806422] reported by Don Porter. + +2007-09-25 Donal K. Fellows + + * generic/tclProc.c (Tcl_DisassembleObjCmd): Define a command, + ::tcl::unsupported::disassemble, which can disassemble procedures, + lambdas and general scripts. + * generic/tclCompile.c (TclDisassembleByteCodeObj): Split apart the + code to print disassemblies of bytecode so that there is reusable code + that spits it out in a Tcl_Obj and then that code is used when doing + tracing. + +2007-09-20 Don Porter + + *** 8.5b1 TAGGED FOR RELEASE *** + + * changes: updates for 8.5b1 release. + +2007-09-19 Don Porter + + * README: Bump version number to 8.5b1 + * generic/tcl.h: Merge from core-stabilizer-branch. + * library/init.tcl: Stabilizing toward 8.5b1 release now done on + * tools/tcl.wse.in: the HEAD. core-stabilizer-branch is now + * unix/configure.in: suspended. + * unix/tcl.spec: + * win/configure.in: + +2007-09-19 Pat Thoyts + + * generic/tclStubLib.: Replaced isdigit with internal implementation. + +2007-09-18 Don Porter + + * generic/tclStubLib.c: Remove C library calls from Tcl_InitStubs() so + * win/makefile.vc: that we don't need the C library linked in to + libtclStub. + +2007-09-17 Pat Thoyts + + * win/makefile.vc: Add crt flags for tclStubLib now it uses C-library + functions. + +2007-09-17 Joe English + + * tcl.m4: use '${CC} -shared' instead of 'ld -Bshareable' to build + shared libraries on current NetBSDs. [Bug 1749251] + * unix/configure: regenerated (autoconf-2.59). + +2007-09-17 Don Porter + + * unix/Makefile.in: Update `make dist` so that tclDTrace.d is + included in the source code distribution. + + * generic/tcl.h: Revised Tcl_InitStubs() to restore Tcl 8.4 + * generic/tclPkg.c: source compatibility with callers of + * generic/tclStubLib.c: Tcl_InitStubs(interp, TCL_VERSION, 1). [Bug + 1578344] + +2007-09-17 Donal K. Fellows + + * generic/tclTrace.c (Tcl_TraceObjCmd, TraceExecutionObjCmd) + (TraceCommandObjCmd, TraceVariableObjCmd): Generate literal values + * generic/tclNamesp.c (NamespaceCodeCmd): more efficiently using + * generic/tclFCmd.c (CopyRenameOneFile): TclNewLiteralStringObj + * generic/tclEvent.c (TclSetBgErrorHandler): macro. + +2007-09-15 Daniel Steffen + + * unix/tcl.m4: replace all direct references to compiler by ${CC} to + enable CC overriding at configure & make time; run + check for visibility "hidden" with all compilers; + quoting fixes from TEA tcl.m4. + (SunOS-5.1x): replace direct use of '/usr/ccs/bin/ld' in SHLIB_LD by + 'cc' compiler driver. + * unix/configure: autoconf-2.59 + +2007-09-14 Donal K. Fellows + + * generic/tclBasic.c (Tcl_CreateObjCommand): Only invalidate along the + namespace path once; that is enough. [Bug 1519940] + +2007-09-14 Daniel Steffen + + * generic/tclDTrace.d (new file): Add DTrace provider for Tcl; allows + * generic/tclCompile.h: tracing of proc and command entry & + * generic/tclBasic.c: return, bytecode execution, object + * generic/tclExecute.c: allocation and more; with + * generic/tclInt.h: essentially zero cost when tracing + * generic/tclObj.c: is inactive; enable with + * generic/tclProc.c: --enable-dtrace configure arg + * unix/Makefile.in: (disabled by default, will only + * unix/configure.in: enable if DTrace is present). [Patch + 1793984] + + * macosx/GNUmakefile: Enable DTrace support. + * macosx/Tcl-Common.xcconfig: + * macosx/Tcl.xcodeproj/project.pbxproj: + + * generic/tclCmdIL.c: Factor out core of InfoFrameCmd() into + internal TclInfoFrame() for use by DTrace + probes. + + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2007-09-12 Don Porter + + * unix/Makefile.in: Perform missing updates of the tcltest Tcl + * win/Makefile.in: Module installed filename that should have + been part of the bump to tcltest 2.3b1. Thanks Larry Virden. + +2007-09-12 Pat Thoyts + + * win/makefile.vc, win/rules.vc, win/nmakehlp.c: Use nmakehlp to + substitute values for tclConfig.sh (helps cross-compiling). + +2007-09-11 Don Porter + + * library/tcltest/tcltest.tcl: Accept underscores and colons in + * library/tcltest/pkgIndex.tcl: constraint names. Properly handle + constraint expressions that return non-numeric boolean results like + "false". Bump to tcltest 2.3b1. [Bug 1772989; RFE 1071322] + * tests/info.test: Disable fragile tests. + + * doc/package.n: Restored the functioning of [package require + * generic/tclPkg.c: -exact] to be compatible with Tcl 8.4. [Bug + * tests/pkg.test: 1578344] + +2007-09-11 Miguel Sofer + + * generic/tclCompCmds.c (TclCompileDictCmd-update): + * generic/tclCompile.c (tclInstructionTable): + * generic/tclExecute.c (INST_DICT_UPDATE_END): fix stack management in + compiled [dict update]. [Bug 1786481] + + ***POTENTIAL INCOMPATIBILITY*** + Scripts that were precompiled on earlier versions of 8.5 and use [dict + update] will crash. Workaround: recompile. + +2007-09-11 Kevin B. Kenny + + * generic/tclExecute.c: Corrected an off-by-one error in the setting + of MaxBaseWide for certain powers. [Bug 1767293 - problem reported in + comments when bug was reopened] + +2007-09-10 Jeff Hobbs + + * generic/tclLink.c (Tcl_UpdateLinkedVar): guard against var being + unlinked. [Bug 1740631] (maros) + +2007-09-10 Miguel Sofer + + * generic/tclCompile.c: fix tclInstructionTable entry for + dictUpdateEnd + + * generic/tclExecute.c: remove unneeded setting of 'cleanup' variable + before jumping to checkForCatch. + +2007-09-10 Don Porter + + * doc/package.n: Restored the document parallel syntax of the + * generic/tclPkg.c: [package present] and [package require] + * tests/pkg.test: commands. [Bug 1723675] + +2007-09-09 Don Porter + + * generic/tclInt.h: Removed the "nsName" Tcl_ObjType from the + * generic/tclNamesp.c: registered set. Revised the management of the + * generic/tclObj.c: intrep of that Tcl_ObjType. Revised the + * tests/obj.test: TclGetNamespaceFromObj() routine to return + TCL_ERROR and write a consistent error message when a namespace is not + found. [Bug 1588842. Patch 1686862] + + ***POTENTIAL INCOMPATIBILITY*** + For callers of Tcl_GetObjType() on the name "nsName". + + * generic/tclExecute.c: Update TclGetNamespaceFromObj() callers. + * generic/tclProc.c: + + * tests/apply.test: Updated tests to expect new consistent + * tests/namespace-old.test: error message when a namespace is not + * tests/namespace.test: found. + * tests/upvar.test: + + * generic/tclCompCmds.c: Use the new INST_REVERSE instruction + * tests/mathop.test: to correct the compiled versions of math + operator commands. [Bug 1724437] + + * generic/tclCompile.c: New bytecode instruction INST_REVERSE to + * generic/tclCompile.h: reverse the order of N items at the top of + * generic/tclExecute.c: stack. + + * generic/tclCompCmds.c (TclCompilePowOpCmd): Make a separate + routine to compile ** to account for its different associativity. + +2007-09-08 Miguel Sofer + + * generic/tclVar.c (Tcl_SetVar2, TclPtrSetVar): [Bug 1710710] fixed + correctly, reverted fix of 2007-05-01. + +2007-09-08 Donal K. Fellows + + * generic/tclDictObj.c (DictUpdateCmd, DictWithCmd): Plug a hole that + * generic/tclExecute.c (TEBC,INST_DICT_UPDATE_END): allowed a careful + * tests/dict.test (dict-21.16,21.17,22.11): attacker to craft a dict + containing a recursive link to itself, violating one of Tcl's + fundamental datatype assumptions and causing a stack crash when the + dict was converted to a string. [Bug 1786481] + +2007-09-07 Don Porter + + * generic/tclEvent.c ([::tcl::Bgerror]): Corrections to Tcl's + * tests/event.test: default [interp bgerror] handler so that when + it falls back to a hidden [bgerror] in a safe interp, it gets the + right error context data. [Bug 1790274] + +2007-09-07 Miguel Sofer + + * generic/tclProc.c (TclInitCompiledLocals): the refCount of resolved + variables was being managed without checking if they were Var or + VarInHash: itcl [Bug 1790184] + +2007-09-06 Don Porter + + * generic/tclResult.c (Tcl_GetReturnOptions): Take care that a + * tests/init.test: non-TCL_ERROR code doesn't cause existing + -errorinfo, -errorcode, and -errorline entries to be omitted. + * generic/tclEvent.c: With -errorInfo no longer lost, generate more + complete ::errorInfo when calling [bgerror] after a non-TCL_ERROR + background exception. + +2007-09-06 Don Porter + + * generic/tclInterp.c (Tcl_Init): Removed constraint on ability + to define a custom [tclInit] before calling Tcl_Init(). Until now the + custom command had to be a proc. Now it can be any command. + + * generic/tclInt.decls: New internal routine TclBackgroundException() + * generic/tclEvent.c: that for the first time permits non-TCL_ERROR + exceptions to trigger [interp bgerror] handling. Closes a gap in TIP + 221. When falling back to [bgerror] (which is designed only to handle + TCL_ERROR), convert exceptions into errors complaining about the + exception. + + * generic/tclInterp.c: Convert Tcl_BackgroundError() callers to call + * generic/tclIO.c: TclBackgroundException(). + * generic/tclIOCmd.c: + * generic/tclTimer.c: + + * generic/tclIntDecls.h: make genstubs + * generic/tclStubInit.c: + +2007-09-06 Daniel Steffen + + * macosx/Tcl.xcode/project.pbxproj: discontinue unmaintained support + * macosx/Tcl.xcode/default.pbxuser: for Xcode 1.5; replace by Xcode2 + project for use on Tiger (with Tcl.xcodeproj to be used on Leopard). + + * macosx/Tcl.xcodeproj/project.pbxproj: updates for Xcode 2.5 and 3.0. + * macosx/Tcl.xcodeproj/default.pbxuser: + * macosx/Tcl.xcode/project.pbxproj: + * macosx/Tcl.xcode/default.pbxuser: + * macosx/Tcl-Common.xcconfig: + + * macosx/README: document project changes. + +2007-09-05 Don Porter + + * generic/tclBasic.c: Removed support for the unmaintained + * generic/tclExecute.c: -DTCL_GENERIC_ONLY configuration. [Bug + * unix/Makefile.in: 1264623] + +2007-09-04 Don Porter + + * unix/Makefile.in: It's unreliable to count on the release + manager to remember to `make genstubs` before `make dist`. Let the + Makefile remember the dependency for us. + + * unix/Makefile.in: Corrections to `make dist` dependencies to be + sure that macosx/configure gets generated whenever it does not exist. + +2007-09-03 Kevin B, Kenny + + * library/tzdata/Africa/Cairo: + * library/tzdata/America/Grand_Turk: + * library/tzdata/America/Port-au-Prince: + * library/tzdata/America/Indiana/Petersburg: + * library/tzdata/America/Indiana/Tell_City: + * library/tzdata/America/Indiana/Vincennes: + * library/tzdata/Antarctica/McMurdo: + * library/tzdata/Australia/Adelaide: + * library/tzdata/Australia/Broken_Hill: + * library/tzdata/Australia/Currie: + * library/tzdata/Australia/Hobart: + * library/tzdata/Australia/Lord_Howe: + * library/tzdata/Australia/Melbourne: + * library/tzdata/Australia/Sydney: + * library/tzdata/Pacific/Auckland: + * library/tzdata/Pacific/Chatham: Olson's tzdata2007g. + + * generic/tclListObj.c (TclLindexFlat): + * tests/lindex.test (lindex-17.[01]): Added code to detect the error + when a script does [lindex {} end foo]; an overaggressive optimisation + caused this call to return an empty object rather than an error. + +2007-09-03 Daniel Steffen + + * generic/tclObj.c (TclInitObjSubsystem): restore registration of the + "wideInt" Tcl_ObjType for compatibility with 8.4 extensions that + access the tclWideIntType Tcl_ObjType; add setFromAnyProc for + tclWideIntType. + +2007-09-02 Donal K. Fellows + + * doc/lsearch.n: Added note that order of results with the -all option + is that of the input list. It always was, but this makes it crystal. + +2007-08-30 Don Porter + + * generic/tclCompile.c: Added fflush() calls following all callers of + * generic/tclExecute.c: TclPrintByteCodeObj() so that tcl_traceCompile + output is less likely to get mangled when writes to stdout interleave + with other code. + +2007-08-28 Don Porter + + * generic/tclCompExpr.c: Use a table lookup in ParseLexeme() to + determine lexemes with single-byte representations. + + * generic/tclBasic.c: Used unions to better clarify overloading of + * generic/tclCompExpr.c: the fields of the OpCmdInfo and + * generic/tclCompile.h: TclOpCmdClientData structs. + +2007-08-27 Don Porter + + * generic/tclCompExpr.c: Call TclCompileSyntaxError() when + expression syntax errors are found when compiling expressions. With + this in place, convert TclCompileExpr to return void, since there's no + longer any need to report TCL_ERROR. + * generic/tclCompile.c: Update callers. + * generic/tclExecute.c: + + * generic/tclCompCmds.c: New routine TclCompileSyntaxError() + * generic/tclCompile.h: to directly compile bytecodes that report a + * generic/tclCompile.c: syntax error, rather than (ab)use a call to + TclCompileReturnCmd. Also, undo the most recent commit that papered + over some issues with that (ab)use. New routine produces a new opcode + INST_SYNTAX, which is a minor variation of INST_RETURN_IMM. Also a bit + of constification. + + * generic/tclCompile.c: Move the deallocation of local LiteralTable + * generic/tclCompExpr.c: entries into TclFreeCompileEnv(). + * generic/tclExecute.c: Update callers. + + * generic/tclCompExpr.c: Force numeric and boolean literals in + expressions to register with their intreps intact, even if that means + overwriting existing intreps in already registered literals. + +2007-08-25 Kevin B. Kenny + + * generic/tclExecute.c (TclExecuteByteCode): Added code to handle + * tests/expr.test (expr-23.48-53) integer exponentiation + that results in 32- and 64-bit integer results, avoiding calls to wide + integer exponentiation routines in this common case. [Bug 1767293] + + * library/clock.tcl (ParseClockScanFormat): Modified code to allow + * tests/clock.test (clock-60.*): case-insensitive matching + of time zone and month names. [Bug 1781282] + +2007-08-24 Don Porter + + * generic/tclCompExpr.c: Register literals found in expressions + * tests/compExpr.test: to restore literal sharing. Preserve numeric + intreps when literals are created for the first time. Correct memleak + in ExecConstantExprTree() and add test for the leak. + +2007-08-24 Miguel Sofer + + * generic/tclCompile.c: replaced copy loop that tripped some compilers + with memmove. [Bug 1780870] + +2007-08-23 Don Porter + + * library/init.tcl ([auto_load_index]): Delete stray "]" that created + an expr syntax error (masked by a [catch]). + + * generic/tclCompCmds.c (TclCompileReturnCmd): Added crash protection + to handle callers other than TclCompileScript() failing to meet the + initialization assumptions of the TIP 280 code in CompileWord(). + + * generic/tclCompExpr.c: Suppress the attempt to convert to + numeric when pre-compiling a constant expresion indicates an error. + +2007-08-22 Miguel Sofer + + * generic/tclExecute.c (TEBC): disable the new shortcut to frequent + INSTs for debug builds. REVERTED (collision with alternative fix) + +2007-08-21 Don Porter + + * generic/tclMain.c: Corrected the logic of dropping the last + * tests/main.test: newline from an interactively typed command. + [Bug 1775878] + +2007-08-21 Pat Thoyts + + * tests/thread.test: thread-4.4: clear ::errorInfo in the thread as a + message is left here from init.tcl on windows due to no tcl_pkgPath. + +2007-08-20 Miguel Sofer + + * generic/tclExecute.c (INST_SUB): fix usage of the new macro for + overflow detection in sums, adapt to subtraction. Lengthy comment + added. + +2007-08-19 Donal K. Fellows + + * generic/tclExecute.c (Overflowing, TclIncrObj, TclExecuteByteCode): + Encapsulate Miguel's last change in a more mnemonic macro. + +2007-08-19 Miguel Sofer + + * generic/tclExecute.c: changed the check for overflow in sums, + reducing objsize, number of branches and cache misses (according to + cachegrind). Non-overflow for s=a+b: + previous + ((a >= 0 || b >= 0 || s < 0) && (s >= 0 || b < 0 || a < 0)) + now + (((a^s) >= 0) || ((a^b) < 0)) + This expresses: "a and s have the same sign or else a and b have + different sign". + +2007-08-19 Donal K. Fellows + + * doc/interp.n (RESOURCE LIMITS): Added text to better explain why + time limits are described using absolute times. [Bug 1752148] + +2007-08-16 Miguel Sofer + + * generic/tclVar.c: improved localVarNameType caching to leverage + the new availability of Tcl_Obj in variable names, avoiding string + comparisons to verify that the cached value is usable. + + * generic/tclExecute.c: check the two most frequent instructions + before the switch. Reduces both runtime and obj size a tiny bit. + +2007-08-16 Don Porter + + * generic/tclCompExpr.c: Added a "constant" field to the OpNode + struct (again "free" due to alignment requirements) to mark those + subexpressions that are completely known at compile time. Enhanced + CompileExprTree() and its callers to precompute these constant + subexpressions at compile time. This resolves the issue raised in [Bug + 1564517]. + +2007-08-15 Donal K. Fellows + + * generic/tclIOUtil.c (TclGetOpenModeEx): Only set the O_APPEND flag + * tests/ioUtil.test (ioUtil-4.1): on a channel for the 'a' + mode and not for 'a+'. [Bug 1773127] + +2007-08-14 Miguel Sofer + + * generic/tclExecute.c (INST_INVOKE*): peephole opt, do not get the + interp's result if it will be pushed/popped. + +2007-08-14 Don Porter + + * generic/tclBasic.c: Use fully qualified variable names for + * tests/thread.test: ::errorInfo and ::errorCode so that string + * tests/trace.test: reported to variable traces are fully + qualified in agreement with Tcl 8.4 operations. + +2007-08-14 Daniel Steffen + + * unix/tclLoadDyld.c: use dlfcn API on Mac OS X 10.4 and later; fix + issues with loading from memory on intel and 64bit; add debug messages + + * tests/load.test: add test load-10.1 for loading from vfs. + + * unix/dltest/pkga.c: whitespace & comment cleanup, remove + * unix/dltest/pkgb.c: unused pkgf.c. + * unix/dltest/pkgc.c: + * unix/dltest/pkge.c: + * unix/dltest/pkgf.c (removed): + * unix/dltest/pkgua.c: + * macosx/Tcl.xcodeproj/project.pbxproj: + +2007-08-13 Don Porter + + * generic/tclExecute.c: Provide DECACHE/CACHE protection to the + * tests/trace.test: Tcl_LogCommandInfo() call. [Bug 1773040] + +2007-08-12 Miguel Sofer + + * generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macro + instead of calling the function. + + * generic/tcl_Obj.c (TclAllocateFreeObjects): remove unneeded memset + to 0 of all allocated objects. + +2007-08-10 Miguel Sofer + + * generic/tclInt.h: remove redundant ops in TclNewStringObj macro. + +2007-08-10 Miguel Sofer + + * generic/tclInt.h: fix the TclSetVarNamespaceVar macro, was causing a + leak. + +2007-08-10 Don Porter + + * generic/tclCompExpr.c: Revise CompileExprTree() to use the + OpNode mark field scheme of tree traversal. This eliminates the need + to use magic values in the left and right fields for that purpose. + Also stop abusing the left field within ParseExpr() to store the + number of arguments in a parsed function call. CompileExprTree() now + determines that for itself at compile time. Then reorder code to + eliminate duplication. + +2007-08-09 Miguel Sofer + + * generic/tclProc.c (TclCreateProc): better comments on the required + varflag values when loading precompiled procs. + + * generic/tclExecute.c (INST_STORE_ARRAY): + * tests/trace.test (trace-2.6): whole array write traces on compiled + local variables were not firing. [Bug 1770591] + +2007-08-08 Jeff Hobbs + + * generic/tclProc.c (InitLocalCache): reference firstLocalPtr via + procPtr. codePtr->procPtr == NULL exposed by tbcload. + +2007-08-08 Don Porter + + * generic/tclExecute.c: Corrected failure to compile/link in the + -DNO_WIDE_TYPE configuration. + + * generic/tclExecute.c: Corrected improper use of bignum arguments to + * tests/expr.test: *SHIFT operations. [Bug 1770224] + +2007-08-07 Miguel Sofer + + * generic/tclInt.h: remove comments refering to VAR_SCALAR, as that + flag bit does not exist any longer. + * generic/tclProc.c (InitCompiledLocals): removed optimisation for + non-resolved case, as the function is never called in that case. + Renamed the function to InitResolvedLocals to calrify the point. + + * generic/tclInt.decls: Exporting via stubs to help xotcl adapt to + * generic/tclInt.h: VarReform. + * generic/tclIntDecls.h: + * generic/tclStubInit.c: + +2007-08-07 Daniel Steffen + + * generic/tclEnv.c: improve environ handling on Mac OS X (adapted + * unix/tclUnixPort.h: from Apple changes in Darwin tcl-64). + + * unix/Makefile.in: add support for compile flags specific to + object files linked directly into executables. + + * unix/configure.in (Darwin): only use -seg1addr flag when prebinding; + use -mdynamic-no-pic flag for object files linked directly into exes; + support overriding TCL_PACKAGE_PATH/TCL_MODULE_PATH in environment. + + * unix/configure: autoconf-2.59 + +2007-08-06 Don Porter + + * tests/parseExpr.test: Update source file name of expr parser code. + + * generic/tclCompExpr.c: Added a "mark" field to the OpNode + struct, which is used to guide tree traversal. This field costs + nothing since alignement requirements used the memory already. + Rewrote ConvertTreeToTokens() to use the new field, which permitted + consolidation of utility routines CopyTokens() and + GenerateTokensForLiteral(). + +2007-08-06 Kevin B. Kenny + + * generic/tclGetDate.y: Added a cast to the definition of YYFREE to + silence compiler warnings. + * generic/tclDate.c: Regenerated + * win/tclWinTest.c: Added a cast to GetSecurityDescriptorDacl call + to silence compiler warnings. + +2007-08-04 Miguel Sofer + + * generic/tclInt.decls: Exporting via stubs to help itcl adapt to + * generic/tclInt.h: VarReform. Added localCache initialization + * generic/tclIntDecls.h: to TclInitCompiledLocals (which only exists + * generic/tclProc.c: for itcl). + * generic/tclStubInit.c: + * generic/tclVar.c: + +2007-08-01 Donal K. Fellows + + * library/word.tcl: Rewrote for greater efficiency. [Bug 1764318] + +2007-08-01 Pat Thoyts + + * generic/tclInt.h: Added a TclOffset macro ala Tk_Offset to + * generic/tclVar.c: abstract out 'offsetof' which may not be + * generic/tclExceute.c: defined (eg: msvc6). + +2007-08-01 Miguel Sofer + + * generic/tclVar.c (TclCleanupVar): fix [Bug 1765225], thx Larry + Virden. + +2007-07-31 Miguel Sofer + + * doc/Hash.3: + * generic/tclHash.c: + * generic/tclObj.c: + * generic/tclThreadStorage.c: (changes part of the patch below) + Stop Tcl_CreateHashVar from resetting hPtr->clientData to NULL after + calling the allocEntryProc for a custom table. + + * generic/tcl.h: + * generic/tclBasic.c: + * generic/tclCmdIL.c: + * generic/tclCompCmds.c: + * generic/tclCompile.c: + * generic/tclCompile.h: + * generic/tclExecute.c: + * generic/tclHash.c: + * generic/tclInt.decls: + * generic/tclInt.h: + * generic/tclIntDecls.h: + * generic/tclLiteral.c: + * generic/tclNamesp.c: + * generic/tclObj.c: + * generic/tclProc.c: + * generic/tclThreadStorage.c: + * generic/tclTrace.c: + * generic/tclVar.c: VarReform [Patch 1750051] + + *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h) + Extensions that access internals defined in tclInt.h and/or + tclCompile.h may lose both binary and source compatibility. The + relevant changes are: + 1. 'struct Var' is completely changed, all acceses to its internals + (either direct or via the TclSetVar* and TclIsVar* macros) will + malfunction. Var flag values and semantics changed too. + 2. 'struct Bytecode' has an additional field that has to be + initialised to NULL + 3. 'struct Namespace' is larger, as the varTable is now one pointer + larger than a Tcl_HashTable. Direct access to its fields will + malfunction. + 4. 'struct CallFrame' grew one more field (the second such growth with + respect to Tcl8.4). + 5. API change for the functions TclFindCompiledLocal, TclDeleteVars + and many internal functions in tclVar.c + + Additionally, direct access to variable hash tables via the standard + Tcl_Hash* interface is to be considered as deprecated. It still works + in the present version, but will be broken by further specialisation + of these hash tables. This concerns especially the table of array + elements in an array, as well as the varTable field in the Namespace + struct. + +2007-07-31 Miguel Sofer + + * unix/configure.in: allow use of 'inline' in Tcl sources. [Patch + * win/configure.in: 1754128] + * win/makefile.vc: Regen with autoconf 2.61 + +2007-07-31 Donal K. Fellows + + * unix/tclUnixInit.c (TclpSetVariables): Use the thread-safe getpwuid + replacement to fill the tcl_platform(user) field as it is not subject + to spoofing. [Bug 681877] + + * unix/tclUnixCompat.c: Simplify the #ifdef logic. + + * unix/tclUnixChan.c (FileWatchProc): Fix test failures. + +2007-07-30 Donal K. Fellows + + * unix/tclUnixChan.c (SET_BITS, CLEAR_BITS): Added macros to make this + file clearer. + +2007-07-24 Miguel Sofer + + * generic/tclBasic.c (TEOvI, GetCommandSource): + * generic/tclExecute.c (TEBC, TclGetSrcInfoForCmd): + * generic/tclInt.h: + * generic/tclTrace.c (TclCheck(Interp|Execution)Traces): + Removed the need for TEBC to inspect the command before calling TEOvI, + leveraging the TIP 280 infrastructure. Moved the generation of a + correct nul-terminated command string away from the trace code, back + into TEOvI/GetCommandSource. + +2007-07-20 Andreas Kupries + + * library/platform/platform.tcl: Fixed bug in 'platform::patterns' + * library/platform/pkgIndex.tcl: where identifiers not matching + * unix/Makefile.in: the special linux and solaris forms would not + * win/Makefile.in: get 'tcl' as an acceptable platform added to + * doc/platform.n: the result. Bumped package to version 1.0.3 and + * doc/platform_shell.n: updated documentation and Makefiles. Also + fixed bad version info in the documentation of platform::shell. + +2007-07-19 Don Porter + + * generic/tclParse.c: In contexts where interp and parsePtr->interp + might be different, be sure to use the latter for error reporting. + Also pulled the interp argument back out of ParseTokens() since we + already had a parsePtr->interp to work with. + +2007-07-18 Don Porter + + * generic/tclCompExpr.c: Removed unused arguments and variables + +2007-07-17 Don Porter + + * generic/tclCompExpr.c (ParseExpr): While adding comments to + explain the operations of ParseExpr(), made significant revisions to + the code so it would be easier to explain, and in the process made the + code simpler and clearer as well. + +2007-07-15 Don Porter + + * generic/tclCompExpr.c: More commentary. + * tests/parseExpr.test: Several tests of syntax error messages + to check that when expression substrings are truncated they leave + visible the context relevant to the reported error. + +2007-07-12 Don Porter + + * generic/tclCompExpr.c: Factored out, corrected, and commented + common code for reporting syntax errors in LEAF elements. + +2007-07-11 Miguel Sofer + + * generic/tclCompCmds.c (TclCompileWhileCmd): + * generic/tclCompile.c (TclCompileScript): + Corrected faulty avoidance of INST_START_CMD when the first opcode in + a script is within a loop (as produced by 'while 1'), so that the + corresponding command is properly counted. [Bug 1752146] + +2007-07-11 Don Porter + + * generic/tclCompExpr.c: Added a "parseOnly" flag argument to + ParseExpr() to indicate whether the caller is Tcl_ParseExpr(), with an + end goal of filling a Tcl_Parse with Tcl_Tokens representing the + parsed expression, or TclCompileExpr() with the goal of compiling and + executing the expression. In the latter case, more aggressive + conversion of QUOTED and BRACED lexeme to literals is done. In the + former case, all such conversion is avoided, since Tcl_Token + production would revert it anyway. This enables simplifications to the + GenerateTokensForLiteral() routine as well. + +2007-07-10 Don Porter + + * generic/tclCompExpr.c: Added a field for operator precedence + to be stored directly in the parse tree. There's no memory cost to + this addition, since that memory would have been lost to alignment + issues anyway. Also, converted precedence definitions and lookup + tables to use symbolic constants instead of raw number for improved + readability, and continued extending/improving/correcting comments. + Removed some unused counter variables. Renamed some variables for + clarity and replaced some cryptic logic with more readable macros. + +2007-07-09 Don Porter + + * generic/tclCompExpr.c: Revision so that the END lexeme never + gets inserted into the parse tree. Later tree traversal never reaches + it since its location in the tree is not variable. Starting and + stopping with the START lexeme (node 0) is sufficient. Also finished + lexeme code commentary. + + * generic/tclCompExpr.c: Added missing creation and return of + the Tcl_Parse fields that indicate error conditions. [Bug 1749987] + +2007-07-05 Don Porter + + * library/init.tcl (unknown): Corrected inconsistent error message + in interactive [unknown] when empty command is invoked. [Bug 1743676] + +2007-07-05 Miguel Sofer + + * generic/tclNamesp.c (SetNsNameFromAny): + * generic/tclObj.c (SetCmdNameFromAny): Avoid unnecessary + ckfree/ckalloc when the old structs can be reused. + +2007-07-04 Miguel Sofer + + * generic/tclNamesp.c: Fix case where a FQ cmd or ns was being cached + * generic/tclObj.c: in a different interp, tkcon. [Bug 1747512] + +2007-07-03 Don Porter + + * generic/tclCompExpr.c: Revised #define values so that there + is now more expansion room to define more BINARY operators. + +2007-07-02 Donal K. Fellows + + * generic/tclHash.c (CompareStringKeys): Always use the strcmp() + version; the operation is functionally equivalent, the speed is + identical (up to measurement limitations), and yet the code is + simpler. [FRQ 951168] + +2007-07-02 Don Porter + + * generic/tcl.h: Removed TCL_PRESERVE_BINARY_COMPATIBILITY and + * generic/tclHash.c: any code enabled when it is set to 0. We will + * generic/tclStubInit.c: always want to preserve binary compat + of the structs that appear in the interface through the 8.* series of + releases, so it's pointless to drag around this never-enabled + alternative. + + * generic/tclIO.c: Removed dead code. + * unix/tclUnixChan.c: + + * generic/tclCompExpr.c: Removed dead code, old implementations + * generic/tclEvent.c: of expr parsing and compiling, including the + * generic/tclInt.h: routine TclFinalizeCompilation(). + +2007-06-30 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LsortObjCmd): Plug a memory leak caused by a + missing Tcl_DecrRefCount on an error path. [Bug 1717186] + +2007-06-30 Zoran Vasiljevic + + * generic/tclThread.c: Prevent RemeberSyncObj() from growing the sync + object lists by reusing already free'd slots, if possible. See + discussion on Bug 1726873 for more information. + +2007-06-29 Donal K. Fellows + + * doc/DictObj.3 (Tcl_DictObjDone): Improved documentation of this + function to make it clearer how to use it. [Bug 1710795] + +2007-06-29 Daniel Steffen + + * generic/tclAlloc.c: on Darwin, ensure memory allocated by + * generic/tclThreadAlloc.c: the custom TclpAlloc()s is aligned to + 16 byte boundaries (as is the case with the Darwin system malloc). + + * generic/tclGetDate.y: use ckalloc/ckfree instead of malloc/free. + * generic/tclDate.c: bison 1.875e + + * generic/tclBasic.c (TclEvalEx): fix warnings. + + * macosx/Tcl.xcodeproj/project.pbxproj: better support for renamed tcl + * macosx/Tcl.xcodeproj/default.pbxuser: source dir; add 10.5 SDK build + * macosx/Tcl-Common.xcconfig: config; remove tclMathOp.c. + + * macosx/README: document Tcl.xcodeproj changes. + +2007-06-28 Don Porter + + * generic/tclBasic.c: Removed dead code, including the + * generic/tclExecute.c: entire file tclMathOp.c. + * generic/tclInt.h: + * generic/tclMathOp.c (removed): + * generic/tclTestObj.c: + * win/tclWinFile.c: + + * unix/Makefile.in: Updated to reflect deletion of tclMathOp.c. + * win/Makefile.in: + * win/makefile.bc: + * win/makefile.vc: + +2007-06-28 Pat Thoyts + + * generic/tclBasic.c: Silence constness warnings for TclStackFree + * generic/tclCompCmds.c: when building with msvc. + * generic/tclFCmd.c: + * generic/tclIOCmd.c: + * generic/tclTrace.c: + +2007-06-28 Miguel Sofer + + * generic/tclVar.c (UnsetVarStruct): fix possible segfault. + +2007-06-27 Don Porter + + * generic/tclTrace.c: Corrected broken trace reversal logic in + * generic/tclTest.c: TclCheckInterpTraces that led to infinite loop + * tests/trace.test: when multiple Tcl_CreateTrace traces were set + and one of them did not fire due to level restrictions. [Bug 1743931] + +2007-06-26 Don Porter + + * generic/tclBasic.c (TclEvalEx): Moved some arrays from the C + stack to the Tcl stack. + +2007-06-26 Miguel Sofer + + * generic/tclVar.c (UnsetVarStruct): more streamlining. + +2007-06-25 Don Porter + + * generic/tclExecute.c: Safety checks to avoid crashes in the + TclStack* routines when called with an incompletely initialized + interp. [Bug 1743302] + +2007-06-25 Miguel Sofer + + * generic/tclVar.c (UnsetVarStruct): fixing incomplete change, more + streamlining. + +2007-06-24 Miguel Sofer + + * generic/tclVar.c (TclDeleteCompiledLocalVars): removed inlining that + ended up not really optimising (limited benchmarks). Now calling + UnsetVarStruct (streamlined old code is #ifdef'ed out, in case better + benchmarks do show a difference). + + * generic/tclVar.c (UnsetVarStruct): fixed a leak introduced in last + commit. + +2007-06-23 Miguel Sofer + + * generic/tclVar.c (UnsetVarStruct, TclDeleteVars): made the logic + slightly clearer, eliminated some duplicated code. + + *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and Var struct users) + The core never builds VAR_LINK variable to have traces. Such a + "monster", should one exist, will now have its unset traces called + *before* it is unlinked. + +2007-06-23 Daniel Steffen + + * macosx/tclMacOSXNotify.c (AtForkChild): don't call CoreFoundation + APIs after fork() on systems where that would lead to an abort(). + +2007-06-22 Don Porter + + * generic/tclExecute.c: Revised TclStackRealloc() signature to better + * generic/tclInt.h: parallel (and fall back on) Tcl_Realloc. + + * generic/tclNamesp.c (TclResetShadowesCmdRefs): Replaced + ckrealloc based allocations with TclStackRealloc allocations. + + * generic/tclCmdIL.c: More conversions to use TclStackAlloc. + * generic/tclScan.c: + +2007-06-21 Don Porter + + * generic/tclBasic.c: Move most instances of the Tcl_Parse struct + * generic/tclCompExpr.c: off the C stack and onto the Tcl stack. This + * generic/tclCompile.c: is a rather large struct (> 3kB). + * generic/tclParse.c: + +2007-06-21 Miguel Sofer + + * generic/tclBasic.c (TEOvI): Made sure that leave traces + * generic/tclExecute.c (INST_INVOKE): that were created during + * tests/trace.test (trace-36.2): execution of an originally + untraced command do not fire [Bug 1740962], partial fix. + +2007-06-21 Donal K. Fellows + + * generic/tcl.h, generic/tclCompile.h, generic/tclCompile.c: Remove + references in comments to obsolete {expand} notation. [Bug 1740859] + +2007-06-20 Miguel Sofer + + * generic/tclVar.c: streamline namespace vars deletion: only compute + the variable's full name if the variable is traced. + +2007-06-20 Don Porter + + * generic/tclInt.decls: Revised the interfaces of the routines + * generic/tclExecute.c: TclStackAlloc and TclStackFree to make them + easier for callers to use (or more precisely, harder to misuse). + TclStackFree now takes a (void *) argument which is the pointer + intended to be freed. TclStackFree will panic if that's not actually + the memory the call will free. TSA/TSF also now tolerate receiving + (interp == NULL), in which case they simply fall back to be calls to + Tcl_Alloc/Tcl_Free. + + * generic/tclIntDecls.h: make genstubs + + * generic/tclBasic.c: Updated callers + * generic/tclCmdAH.c: + * generic/tclCmdIL.c: + * generic/tclCompCmds.c: + * generic/tclCompExpr.c: + * generic/tclCompile.c: + * generic/tclFCmd.c: + * generic/tclFileName.c: + * generic/tclIOCmd.c: + * generic/tclIndexObj.c: + * generic/tclInterp.c: + * generic/tclNamesp.c: + * generic/tclProc.c: + * generic/tclTrace.c: + * unix/tclUnixPipe.c: + +2007-06-20 Jeff Hobbs + + * tools/tcltk-man2html.tcl: revamp of html doc output to use CSS, + standardized headers, subheaders, dictionary sorting of names. + +2007-06-18 Jeff Hobbs + + * tools/tcltk-man2html.tcl: clean up copyright merging and output. + clean up coding constructs. + +2007-06-18 Miguel Sofer + + * generic/tclCmdIL.c (InfoFrameCmd): + * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): + * generic/tclCompile.c (TclInitCompileEnv): + * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Moved the + CmdFrame off the C stack and onto the Tcl stack. + + * generic/tclExecute.c (TEBC): Moved the CmdFrame off the C stack and + onto the Tcl stack, between the catch and the execution stacks + +2007-06-18 Don Porter + + * generic/tclBasic.c (TclEvalEx,TclEvalObjEx): Moved the CmdFrame off + the C stack and onto the Tcl stack. + +2007-06-17 Donal K. Fellows + + * generic/tclProc.c (TclObjInterpProcCore): Minor fixes to make + * generic/tclExecute.c (TclExecuteByteCode): compilation debugging + builds work again. [Bug 1738542] + +2007-06-16 Donal K. Fellows + + * generic/tclProc.c (TclObjInterpProcCore): Use switch instead of a + chain of if's for a modest performance gain and a little more clarity. + +2007-06-15 Miguel Sofer + + * generic/tclCompCmds.c: Simplified [variable] compiler and executor. + * generic/tclExecute.c: Missed updates to "there is always a valid + frame". + + * generic/tclCompile.c: reverted TclEvalObjvInternal and INST_INVOKE + * generic/tclExecute.c: to essentially what they were previous to the + * generic/tclBasic.c: commit of 2007-04-03 [Patch 1693802] and the + subsequent optimisations, as they break the new trace tests described + below. + + * generic/trace.test: added tests 36 to 38 for dynamic trace creation + and addition. These tests expose a change in dynamics due to a recent + round of optimisations. The "correct" behaviour is not described in + docs nor TIP 62. + +2007-06-14 Miguel Sofer + + * generic/tclInt.decls: Modif to the internals of TclObjInterpProc + * generic/tclInt.h: to reduce stack consumption and improve task + * generic/tclIntDecls.h: separation. Changes the interface of + * generic/tclProc.c: TclObjInterpProcCore (patching TclOO + simultaneously). + + * generic/tclProc.c (TclObjInterpProcCore): simplified obj management + in wrongNumArgs calls. + +2007-06-14 Don Porter + + * generic/tclCompile.c: SetByteCodeFromAny() can no longer return any + * generic/tclExecute.c: code other than TCL_OK, so remove code that + * generic/tclProc.c: formerly handled exceptional codes. + +2007-06-13 Miguel Sofer + + * generic/tclExecute.c (TclCompEvalObj): missed update to "there is + always a valid frame". + + * generic/tclProc.c (TclObjInterpProcCore): call TEBC directly instead + of going through TclCompEvalObj - no need to check the compilation's + freshness, this has already been done. This improves speed and should + also provide some relief to [Bug 1066755]. + +2007-06-12 Donal K. Fellows + + * generic/tclBasic.c (Tcl_CreateInterp): Turn the [info] command into + * generic/tclCmdIL.c (TclInitInfoCmd): an ensemble, making it easier + for third-party code to plug into. + + * generic/tclIndexObj.c (Tcl_WrongNumArgs): + * generic/tclNamesp.c, generic/tclInt.h (tclEnsembleCmdType): Make + Tcl_WrongNumArgs do replacement correctly with ensembles and other + sorts of complex replacement strategies. + +2007-06-11 Miguel Sofer + + * generic/tclExecute.c: comments added to explain iPtr->numLevels + management. + + * generic/tclNamesp.c: tweaks to Tcl_GetCommandFromObj and + * generic/tclObj.c: TclGetNamespaceFromObj; modified the usage of + structs ResolvedCmdName and ResolvedNsname so that the field refNsPtr + is NULL for fully qualified names. + +2007-06-10 Miguel Sofer + + * generic/tclBasic.c: Further TEOvI split, creating a new + * generic/tclCompile.h: TclEvalObjvKnownCommand() function to handle + * generic/tclExecute.c: commands that are already known and are not + traced. INST_INVOKE now calls into this function instead of inlining + parts of TEOvI. Same perf, better isolation. + + ***POTENTIAL INCOMPAT*** There is a subtle issue with the timing of + execution traces that is changed here - first change appeared in my + commit of 2007-04-03 [Patch 1693802], which caused some divergence + between compiled and non-compiled code. + ***THIS CHANGE IS UNDER REVIEW*** + +2007-06-10 Jeff Hobbs + + * README: updated links. [Bug 1715081] + + * generic/tclExecute.c (TclExecuteByteCode): restore support for + INST_CALL_BUILTIN_FUNC1 and INST_CALL_FUNC1 bytecodes to support 8.4- + precompiled sources (math functions). [Bug 1720895] + +2007-06-10 Miguel Sofer + + * generic/tclInt.h: + * generic/tclNamesp.c: + * generic/tclObj.c: + * generic/tclvar.c: new macros TclGetCurrentNamespace() and + TclGetGlobalNamespace(); Tcl_GetCommandFromObj and + TclGetNamespaceFromObj rewritten to make the logic clearer; slightly + faster too. + +2007-06-09 Miguel Sofer + + * generic/tclExecute.c (INST_INVOKE): isolated two vars to the small + block where they are actually used. + + * generic/tclObj.c (Tcl_GetCommandFromObj): rewritten to make the + logic clearer; slightly faster too. + + * generic/tclBasic.c: Split TEOv in two, by separating a processor + for non-TCL_OK returns. Also split TEOvI in a full version that + handles non-existing and traced commands, and a separate shorter + version for the regular case. + + * generic/tclBasic.c: Moved the generation of command strings for + * generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now in + TclCheck[Interp|Execution]Traces(). Also insured that the strings are + properly NUL terminated at the correct length. [Bug 1693986] + + ***POTENTIAL INCOMPATIBILITY in internal API*** + The functions TclCheckInterpTraces() and TclCheckExecutionTraces() (in + internal stubs) used to be noops if the command string was NULL, this + is not true anymore: if the command string is NULL, they generate an + appropriate string from (objc,objv) and use it to call the traces. The + caller might as well not call them with a NULL string if he was + expecting a noop. + + * generic/tclBasic.c: Extend usage of TclLimitReady() and + * generic/tclExecute.c: (new) TclLimitExceeded() macros. + * generic/tclInt.h: + * generic/tclInterp.c: + + * generic/tclInt.h: New TclCleanupCommandMacro for core usage. + * generic/tclBasic.c: + * generic/tclExecute.c: + * generic/tclObj.c: + +2007-06-09 Daniel Steffen + + * macosx/Tcl.xcodeproj/project.pbxproj: add new Tclsh-Info.plist.in. + +2007-06-08 Donal K. Fellows + + * generic/tclCmdMZ.c (Tcl_StringObjCmd): Changed [string first] and + * doc/string.n: [string last] so that they have clearer descriptions + for those people who know the adage about needles and haystacks. This + follows suggestions on comp.lang.tcl... + +2007-06-06 Miguel Sofer + + * generic/tclParse.c: fix for uninit read. [Bug 1732414] + +2007-06-06 Daniel Steffen + + * macosx/Tcl.xcodeproj/project.pbxproj: add settings for Fix&Continue. + + * unix/configure.in (Darwin): add plist for tclsh; link the + * unix/Makefile.in (Darwin): Tcl and tclsh plists into + * macosx/Tclsh-Info.plist.in (new): their binaries in all cases. + * macosx/Tcl-Common.xcconfig: + + * unix/tcl.m4 (Darwin): fix CF checks in fat 32&64bit builds. + * unix/configure: autoconf-2.59 + +2007-06-05 Don Porter + + * generic/tclBasic.c: Added interp flag value ERR_LEGACY_COPY to + * generic/tclInt.h: control the timing with which the global + * generic/tclNamesp.c: variables ::errorCode and ::errorInfo get + * generic/tclProc.c: updated after an error. This keeps more + * generic/tclResult.c: precise compatibility with Tcl 8.4. + * tests/result.test (result-6.2): [Bug 1649062] + +2007-06-05 Miguel Sofer + + * generic/tclInt.h: + * generic/tclExecute.c: Tcl-stack reform, [Patch 1701202] + +2007-06-03 Daniel Steffen + + * unix/Makefile.in: add datarootdir to silence autoconf-2.6x warning. + +2007-05-30 Don Porter + + * generic/tclBasic.c: Removed code that dealt with + * generic/tclCompile.c: TCL_TOKEN_EXPAND_WORD tokens representing + * generic/tclCompile.h: expanded literal words. These sections were + mostly in place to enable [info frame] to discover line information in + expanded literals. Since the parser now generates a token for each + post-expansion word referring to the right location in the original + script string, [info frame] gets all the data it needs. + + * generic/tclInt.h: Revised the parser so that it never produces + * generic/tclParse.c: TCL_TOKEN_EXPAND_WORD tokens when parsing an + * tests/parse.test: expanded literal word; that is, something like + {*}{x y z}. Instead, generate the series of TCL_TOKEN_SIMPLE_WORD + tokens to represent the words that expansion of the literal string + produces. [RFE 1725186] + +2007-05-29 Jeff Hobbs + + * unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling of + pthread_join exit return code storage. [Bug 1712723] + +2007-05-22 Don Porter + + [core-stabilizer-branch] + + * unix/configure: autoconf-2.59 (FC6 fork) + * win/configure: + + * README: Bump version number to 8.5b1 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + +2007-05-18 Don Porter + + * unix/configure: autoconf-2.59 (FC6 fork) + * win/configure: + + * README: Bump version number to 8.5a7 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * generic/tclParse.c: Disable and remove the ALLOW_EXPAND sections + * tests/info.test: that continued to support the deprecated + * tests/mathop.test: {expand} syntax. Updated the few remaining + users of that syntax in the test suite. + +2007-05-17 Donal K. Fellows + + * generic/tclExecute.c (TclLimitReady): Created a macro version of + Tcl_LimitReady just for TEBC, to reduce the amount of times that the + bytecode engine calls out to external functions on the critical path. + * generic/tclInterp.c (Tcl_LimitReady): Added note to remind anyone + doing maintenance that there is a macro version to update. + +2007-05-17 Daniel Steffen + + * generic/tcl.decls: workaround 'make checkstubs' failures from + tclStubLib.c MODULE_SCOPE revert. [Bug 1716117] + +2007-05-16 Joe English + + * generic/tclStubLib.c: Change Tcl_InitStubs(), tclStubsPtr, and the + auxilliary stubs table pointers back to public visibility. + + These symbols need to be exported so that stub-enabled extensions may + be statically linked into an extended tclsh or Big Wish with a + dynamically-linked libtcl. [Bug 1716117] + +2007-05-15 Don Porter + + * win/configure: autoconf-2.59 (FC6 fork) + + * library/reg/pkgIndex.tcl: Bump to registry 1.2.1 to account for + * win/configure.in: [Bug 1682211] fix. + * win/makefile.bc: + * win/tclWinReg.c: + +2007-05-11 Pat Thoyts + + * generic/tclInt.h: Removed TclEvalObjEx and TclGetSrcInfoForPc from + tclInt.h now they are in the internal stubs table. + +2007-05-09 Don Porter + + * generic/tclInt.h: TclFinalizeThreadAlloc() is always defined, so + make sure it is also always declared (with MODULE_SCOPE). + +2007-05-09 Daniel Steffen + + * generic/tclInt.h: fix warning when building threaded with -DPURIFY. + + * macosx/Tcl.xcodeproj/project.pbxproj: add 'DebugUnthreaded' & + * macosx/Tcl.xcodeproj/default.pbxuser: 'DebugLeaks' configs and env + var settings needed to run the 'leaks' tool. + +2007-05-07 Don Porter + + [Tcl Bug 1706140] + + * generic/tclLink.c (LinkTraceProc): Update Tcl_VarTraceProcs so + * generic/tclNamesp.c (Error*Read): they call Tcl_InterpDeleted() + * generic/tclTrace.c (Trace*Proc): for themselves, and do not + * generic/tclUtil.c (TclPrecTraceProc): rely on (frequently buggy) + setting of the TCL_INTERP_DESTROYED flag by the trace core. + + * generic/tclVar.c: Update callers of TclCallVarTraces to not pass + in the TCL_INTERP_DESTROYED flag. Also apply filters so that public + routines only pass documented flag values down to lower level routines + + * generic/tclTrace.c (TclCallVarTraces): The setting of the + TCL_INTERP_DESTROYED flag is now done entirely within the + TclCallVarTraces routine, the only place it can be done right. + +2007-05-06 Donal K. Fellows + + * generic/tclInt.h (ExtraFrameInfo): Create a new mechanism for + * generic/tclCmdIL.c (InfoFrameCmd): conveying what information needs + to be added to the results of [info frame] to replace the hack that + was there before. + * generic/tclProc.c (Tcl_ApplyObjCmd): Use the new mechanism for the + [apply] command, the only part of Tcl itself that needs it (so far). + + * generic/tclInt.decls (TclEvalObjEx, TclGetSrcInfoForPc): Expose + these two functions through the internal stubs table, necessary for + extensions that need to integrate deeply with TIP#280. + +2007-05-05 Donal K. Fellows + + * win/tclWinFile.c (TclpGetUserHome): Squelch type-pun warnings in + * win/tclWinInit.c (TclpSetVariables): Win-specific code not found + * win/tclWinReg.c (AppendSystemError): during earlier work on Unix. + +2007-05-04 Kevin B. Kenny + + * generic/tclIO.c (TclFinalizeIOSubsystem): Added an initializer to + silence a spurious gcc warning about use of an uninitialized + variable. + * tests/encoding.test: Modified so that encoding tests happen in a + private namespace, to avoid polluting the global one. This problem was + discovered when running the test suite '-singleproc 1 -skip exec.test' + because the 'path' variable in encoding.test conflicted with the one + in io.test. + * tests/io.test: Made more of the working variables private to the + namespace. + +2007-05-02 Kevin B. Kenny + + * generic/tclTest.c (SimpleMatchInDirectory): Corrected a refcount + imbalance that affected the filesystem-[147]* tests in the test suite. + Thanks to Don Porter for the patch. [Bug 1710707] + * generic/tclPathObj.c (Tcl_FSJoinPath, Tcl_FSGetNormalizedPath): + Corrected several memory leaks that caused refcount imbalances + resulting in memory leaks on Windows. Thanks to Joe Mistachkin for the + patch. + +2007-05-01 Miguel Sofer + + * generic/tclVar.c (TclPtrSetVar): fixed leak whenever newvaluePtr had + refCount 0 and was used for appending (but not lappending). Thanks to + mistachkin and kbk. [Bug 1710710] + +2007-05-01 Kevin B. Kenny + + * generic/tclIO.c (DeleteChannelTable): Made changes so that + DeleteChannelTable tries to close all open channels, not just the + first. [Bug 1710285] + * generic/tclThread.c (TclFinalizeSynchronization): Make sure that TSD + blocks get freed on non-threaded builds. [Bug 1710825] + * tests/utf.test (utf-25.1--utf-25.4): Modified tests to clean up + after the 'testobj' extension to avoid spurious reports of memory + leaks. + +2007-05-01 Don Porter + + * generic/tclCmdMZ.c (STR_MAP): When [string map] has a pure dict map, + a missing Tcl_DictObjDone() call led to a memleak. [Bug 1710709] + +2007-04-30 Daniel Steffen + + * unix/Makefile.in: add 'tclsh' dependency to install targets that + rely on tclsh, fixes parallel 'make install' from empty build dir. + +2007-04-30 Andreas Kupries + + * generic/tclIO.c (FixLevelCode): Corrected reference count + mismanagement of newlevel, newcode. Changed to allocate the Tcl_Obj's + as late as possible, and only when actually needed. [Bug 1705778, leak + K29] + +2007-04-30 Kevin B. Kenny + + * generic/tclProc.c (Tcl_ProcObjCmd, SetLambdaFromAny): Corrected + reference count mismanagement on the name of the source file in the + TIP 280 code. [Bug 1705778, leak K02 among other manifestations] + +2007-04-25 Donal K. Fellows + + *** 8.5a6 TAGGED FOR RELEASE *** + + * generic/tclProc.c (TclObjInterpProcCore): Only allocate objects for + error message generation when associated with argument names that are + really used. [Bug 1705778, leak K15] + +2007-04-25 Kevin B. Kenny + + * generic/tclIOUtil.c (Tcl_FSChdir): Changed the memory management so + that the path returned from Tcl_FSGetNativePath is not duplicated + before being stored as the current directory, to avoid a memory leak. + [Bug 1705778, leak K01 among other manifestations] + +2007-04-25 Don Porter + + * generic/tclCompExpr.c (ParseExpr): Revised to be sure that an + error return doesn't prevent all literals getting placed on the + litList to be returned to the caller for freeing. Corrects some + memleaks. [Bug 1705778, leak K23] + +2007-04-25 Daniel Steffen + + * unix/Makefile.in (dist): add macosx/*.xcconfig files to src dist; + copy license.terms to dist macosx dir; fix autoheader bits. + +2007-04-24 Miguel Sofer + + * generic/tclListObj.c: reverting [Patch 738900] (committed on + 2007-04-20). Causes some Tk test breakage of unknown importance, but + the impact of the patch itself is likely to be so small that it does + not warrant investigation at this time. + +2007-04-24 Donal K. Fellows + + * generic/tclDictObj.c (DictKeysCmd): Rewrote so that the lock on the + internal representation of a dict is only set when necessary. [Bug + 1705778, leak K04] + (DictFilterCmd): Added code to drop the lock in the trivial match + case. [Bug 1705778, leak K05] + +2007-04-24 Kevin B. Kenny + + * generic/tclBinary.c: Addressed several code paths where the error + return from the 'binary format' command leaked the result buffer. + * generic/tclListObj.c (TclLsetFlat): Fixed a bug where the new list + under construction was leaked in the error case. [Bug 1705778, leaks + K13 and K14] + +2007-04-24 Jeff Hobbs + + * unix/Makefile.in (dist): add platform library package to src dist + +2007-04-24 Don Porter + + * generic/tclCompExpr.c (ParseExpr): Memory leak in error case; the + literal Tcl_Obj was not getting freed. [Bug 1705778, leak #1 (new)] + + * generic/tclNamesp.c (Tcl_DeleteNamespace): Corrected flaw in the + flag marking scheme to be sure that global namespaces are freed when + their interp is deleted. [Bug 1705778] + +2007-04-24 Kevin B. Kenny + + * generic/tclExecute.c (TclExecuteByteCode): Plugged six memory leaks + in bignum arithmetic. + * generic/tclIOCmd.c (Tcl_ReadObjCmd): Plugged a leak of the buffer + object if the physical read returned an error and the bypass area had + no message. + * generic/tclIORChan.c (TclChanCreateObjCmd): Plugged a leak of the + return value from the "initialize" method of a channel handler. + (All of the above under [Bug 1705778]) + +2007-04-23 Daniel Steffen + + * generic/tclCkalloc.c: fix warnings from gcc build configured with + * generic/tclCompile.c: --enable-64bit --enable-symbols=all. + * generic/tclExecute.c: + + * unix/tclUnixFCmd.c: add workaround for crashing bug in fts_open() + * unix/tclUnixInit.c: without FTS_NOSTAT on 64bit Darwin 8 or earlier. + + * unix/tclLoadDyld.c (TclpLoadMemory): fix (void*) arithmetic. + + * macosx/Tcl-Common.xcconfig: enable more warnings. + + * macosx/Tcl.xcodeproj/project.pbxproj: add 'DebugMemCompile' build + configuration that calls configure with --enable-symbols=all; override + configure check for __attribute__((__visibility__("hidden"))) in Debug + configuration to restore availability of ZeroLink. + + * macosx/tclMacOSXNotify.c: fix warnings. + + * macosx/tclMacOSXFCmd.c: const fixes. + + * macosx/Tcl-Common.xcconfig: fix whitespace. + * macosx/Tcl-Debug.xcconfig: + * macosx/Tcl-Release.xcconfig: + * macosx/README: + + * macosx/GNUmakefile: fix/add copyright and license refs. + * macosx/tclMacOSXBundle.c: + * macosx/Tcl-Info.plist.in: + * macosx/Tcl.xcode/project.pbxproj: + * macosx/Tcl.xcodeproj/project.pbxproj: + + * unix/configure.in: install license.terms into Tcl.framework. + * unix/configure: autoconf-2.59 + +2007-04-23 Don Porter + + * generic/tclVar.c (UnsetVarStruct): Make sure the + TCL_INTERP_DESTROYED flags gets passed to unset trace routines so they + can respond appropriately. [Bug 1705778, leak #9] + +2007-04-23 Miguel Sofer + + * generic/tclCompile.c (TclFreeCompileEnv): Tip 280's new field + extCmdMapPtr was not being freed. [Bug 1705778, leak #1] + +2007-04-23 Kevin B. Kenny + + * generic/tclCompCmds.c (TclCompileUpvarCmd): Plugged a memory leak in + 'upvar' when compiling (a) upvar outside a proc, (b) upvar with a + syntax error, or (c) upvar where the frame index is not known at + compile time. + * generic/tclCompExpr.c (ParseExpr): Plugged a memory leak when + parsing expressions that contain syntax errors. + * generic/tclEnv.c (ReplaceString): Clear memory correctly when + growing the cache to avoid reads of uninitialised data. + * generic/tclIORChan.c (TclChanCreateObjCmd, FreeReflectedChannel): + Plugged two memory leaks. + * generic/tclStrToD.c (AccumulateDecimalDigit): Fixed a mistake where + we'd run beyond the end of the 'pow10_wide' array if a number begins + with a string of more than 'maxpow10_wide' zeroes. + * generic/tclTest.c (Testregexpobjcmd): Removed an invalid access + beyond the end of 'objv' in 'testregexp -about'. + All of these issues reported under [Bug 1705778] - detected with the + existing test suite, no new regression tests required. + +2007-04-22 Miguel Sofer + + * generic/tclVar.c (TclDeleteNamespaceVars): fixed access to freed + memory detected by valgrind: Tcl_GetCurrentNamespace was being + called after freeing root CallFrame (on interp deletion). + +2007-04-20 Miguel Sofer + + * generic/tclListObj.c (SetListFromAny): avoid discarding internal + reps of objects converted to singleton lists. [Patch 738900] + +2007-04-20 Kevin B. Kenny + + * doc/clock.n: Corrected a silly error (transposed 'uppercase' and + 'lowercase' in clock.n. [Bug 1656002] + Clarified that [clock scan] does not recognize a locale's alternative + calendar. + Deleted an entirely superfluous (and also incorrect) remark about the + effect of Daylight Saving Time on relative times in [clock scan]. [Bug + 1582951] + * library/clock.tcl: Corrected an error in skipping over the %Ey field + on input. + * library/msgs/ja.msg: + * tools/loadICU.tcl: Corrected several localisation faults in the + Japanese locale (most notably, incorrect dates for the Emperors' + eras). Many thanks to SourceForge user 'nyademo' for pointing this out + and developing a fix. [Bug 1637471] + * generic/tclPathObj.c: Corrected a 'const'ness fault that caused + bitter complaints from MSVC. + * tests/clock.test (clock-40.1, clock-58.1, clock-59.1): Corrected a + test case that depended on ":localtime" being able to handle dates + prior to the Posix epoch. [Bug 1618445] Added a test case for the + dates of the Japanese emperors. [Bug 1637471] Added a regression test + for military time zone input conversion. [Bug 1586828] + * generic/tclGetDate.y (MilitaryTable): Fixed an ancient bug where the + military NZA time zones had the signs reversed. [Bug 1586828] + * generic/tclDate.c: Regenerated. + * doc/Notifier.3: Documented Tcl_SetNotifier and Tcl_ServiceModeHook. + Quite against my better judgment. [Bug 414933] + * generic/tclBasic.c, generic/tclCkalloc.c, generic/tclClock.c: + * generic/tclCmdIL.c, generic/tclCmdMZ.c, generic/tclFCmd.c: + * generic/tclFileName.c, generic/tclInterp.c, generic/tclIO.c: + * generic/tclIOUtil.c, generic/tclNamesp.c, generic/tclObj.c: + * generic/tclPathObj.c, generic/tclPipe.c, generic/tclPkg.c: + * generic/tclResult.c, generic/tclTest.c, generic/tclTestObj.c: + * generic/tclVar.c, unix/tclUnixChan.c, unix/tclUnixTest.c: + * win/tclWinLoad.c, win/tclWinSerial.c: Replaced commas in varargs + with string concatenation where possible. [Patch 1515234] + * library/tzdata/America/Tegucigalpa: + * library/tzdata/Asia/Damascus: Olson's tzdata 2007e. + +2007-04-19 Donal K. Fellows + + * generic/regcomp.c, generic/regc_cvec.c, generic/regc_lex.c, + * generic/regc_locale.c: Improve the const-correctness of the RE + compiler. + +2007-04-18 Miguel Sofer + + * generic/tclExecute.c (INST_LSHIFT): fixed a mistake introduced in + version 1.266 ('=' became '=='), which effectively turned the block + that handles native shifts into dead code. This explains why the + testsuite did not pick this mistake. Rewrote to make the intention + clear. + + * generic/tclInt.h (TclDecrRefCount): change the order of the + branches, use empty 'if ; else' to handle use in unbraced outer + if/else conditions (as already done in tcl.h) + + * generic/tclExecute.c: slight changes in Tcl_Obj management. + +2007-04-17 Kevin B. Kenny + + * library/clock.tcl: Fixed the naming of + ::tcl::clock::ReadZoneinfoFile because (yoicks!) it was in the global + namespace. + * doc/clock.n: Clarified the cases in which legacy time zone is + recognized. [Bug 1656002] + +2007-04-17 Miguel Sofer + + * generic/tclExecute.c: fixed checkInterp logic [Bug 1702212] + +2007-04-16 Donal K. Fellows + + * various (including generic/tclTest.c): Complete the purge of K&R + function definitions from manually-written code. + +2007-04-15 Kevin B. Kenny + + * generic/tclCompCmds.c: added a cast to silence a compiler error on + VC2005. + * library/clock.tcl: Restored unique-prefix matching of keywords on + the [clock] command. [Bug 1690041] + * tests/clock.test: Added rudimentary test cases for unique-prefix + matching of keywords. + +2007-04-14 Miguel Sofer + + * generic/tclExecute.c: removed some code at INST_EXPAND_SKTOP that + duplicates functionality already present at checkForCatch. + +2007-04-12 Miguel Sofer + + * generic/tclExecute.c: new macros OBJ_AT_TOS, OBJ_UNDER_TOS, + OBJ_AT_DEPTH(n) and CURR_DEPTH that remove all direct references to + tosPtr from TEBC (after initialisation and the code at the label + cleanupV_pushObjResultPtr). + +2007-04-11 Miguel Sofer + + * generic/tclCompCmds.c: moved all exceptDepth management to the + macros - the decreasing half was managed by hand. + +2007-04-10 Donal K. Fellows + + * generic/tclInt.h (TclNewLiteralStringObj): New macro to make + allocating literal string objects (i.e. objects whose value is a + constant string) easier and more efficient, by allowing the omission + of the length argument. Based on [Patch 1529526] (afredd) + * generic/*.c: Make use of this (in many files). + +2007-04-08 Miguel Sofer + + * generic/tclCompile (tclInstructionTable): Fixed bugs in description + of dict instructions. + +2007-04-07 Miguel Sofer + + * generic/tclCompile (tclInstructionTable): Fixed bug in description + of INST_START_COMMAND. + + * generic/tclExecute.c (TEBC): Small code reduction. + +2007-04-06 Miguel Sofer + + * generic/tclExecute.c (TEBC): + * generic/tclNamespace.c (NsEnsembleImplementationCmd): + * generic/tclProc.c (InitCompiledLocals, ObjInterpProcEx) + (TclObjInterpProcCore, ProcCompileProc): Code reordering to reduce + branching and improve branch prediction (assume that forward branches + are typically not taken). + +2007-04-03 Miguel Sofer + + * generic/tclExecute.c: INST_INVOKE optimisation. [Patch 1693802] + +2007-04-03 Don Porter + + * generic/tclNamesp.c: Revised ErrorCodeRead and ErrorInfoRead trace + routines so they guarantee the ::errorCode and ::errorInfo variable + always appear to exist. [Bug 1693252] + +2007-04-03 Miguel Sofer + + * generic/tclInt.decls: Moved TclGetNamespaceFromObj() to the + * generic/tclInt.h: internal stubs table; regen. + * generic/tclIntDecls.h: + * generic/tclStubInit.c: + +2007-04-02 Miguel Sofer + + * generic/tclBasic.c: Added bytecode compilers for the variable + * generic/tclCompCmds.c: linking commands: 'global', 'variable', + * generic/tclCompile.h: 'upvar', 'namespace upvar' [Patch 1688593] + * generic/tclExecute.c: + * generic/tclInt.h: + * generic/tclVar.c: + +2007-04-02 Don Porter + + * generic/tclBasic.c: Replace arrays on the C stack and ckalloc + * generic/tclExecute.c: calls with TclStackAlloc calls to use memory + * generic/tclFCmd.c: on Tcl's evaluation stack. + * generic/tclFileName.c: + * generic/tclIOCmd.c: + * generic/tclIndexObj.c: + * generic/tclInterp.c: + * generic/tclNamesp.c: + * generic/tclTrace.c: + * unix/tclUnixPipe.c: + +2007-04-01 Donal K. Fellows + + * generic/tclCompile.c (TclCompileScript, TclPrintInstruction): + * generic/tclExecute.c (TclExecuteByteCode): Changed the definition of + INST_START_CMD so that it knows how many commands start at the current + location. This makes the interpreter command counter correct without + requiring a large number of instructions to be issued. (See my change + from 2007-01-19 for what triggered this.) + +2007-03-30 Don Porter + + * generic/tclCompile.c: + * generic/tclCompExpr.c: + * generic/tclCompCmds.c: Replace arrays on the C stack and + ckalloc calls with TclStackAlloc calls to use memory on Tcl's + evaluation stack. + + * generic/tclCmdMZ.c: Revised [string to* $s $first $last] + implementation to reduce number of allocs/copies. + + * tests/string.test: More [string reverse] tests. + +2007-03-30 Miguel Sofer + + * generic/tclExecute.c: optimise the lookup of elements of indexed + arrays. + +2007-03-29 Miguel Sofer + + * generic/tclProc.c (Tcl_ApplyObjCmd): + * tests/apply.test (9.3): Fixed Tcl_Obj leak on error return; an + unneeded ref to lambdaPtr was being set and not released on an error + return path. + +2007-03-28 Don Porter + + * generic/tclCmdMZ.c (STR_REVERSE): Implement the actual [string + reverse] command in terms of the new TclStringObjReverse() routine. + + * generic/tclInt.h (TclStringObjReverse): New internal routine + * generic/tclStringObj.c (TclStringObjReverse): that implements the + [string reverse] operation, making use of knowledge/surgery of the + String intrep to minimize the number of allocs and copies needed to do + the job. + +2007-03-27 Don Porter + + * generic/tclCmdMZ.c (STR_MAP): Replace ckalloc calls with + TclStackAlloc calls. + +2007-03-24 Zoran Vasiljevic + + * win/tclWinThrd.c: Thread exit handler marks the current thread as + un-initialized. This allows exit handlers that are registered later to + re-initialize this subsystem in case they need to use some sync + primitives (cond variables) from this file again. + +2007-03-23 Miguel Sofer + + * generic/tclBasic.c (DeleteInterpProc): pop the root frame pointer + before deleting the global namespace [Bug 1658572] + +2007-03-23 Kevin B. Kenny + + * win/Makefile.in: Added code to keep a Cygwin path name from leaking + into LIBRARY_DIR when doing 'make test' or 'make runtest'. + +2007-03-22 Don Porter + + * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Replaced arrays on the + C stack and ckalloc calls with TclStackAlloc calls to use memory on + Tcl's evaluation stack. + + * generic/tclExecute.c: Revised GrowEvaluationStack to take an + argument specifying the growth required by the caller, so that a + single reallocation / copy is the most that will ever be needed even + when required growth is large. + +2007-03-21 Don Porter + + * generic/tclExecute.c: More ckalloc -> ckrealloc conversions. + * generic/tclLiteral.c: + * generic/tclNamesp.c: + * generic/tclParse.c: + * generic/tclPreserve.c: + * generic/tclStringObj.c: + * generic/tclUtil.c: + +2007-03-20 Don Porter + + * generic/tclEnv.c: Some more ckalloc -> ckrealloc replacements. + * generic/tclLink.c: + +2007-03-20 Kevin B. Kenny + + * generic/tclDate.c: Rebuilt, despite Donal Fellows's comment when + committing it that no rebuild was required. + * generic/tclGetDate.y: According to Donal Fellows, "Introduce modern + formatting standards; no need for rebuild of tclDate.c." + + * library/tzdata/America/Cambridge_Bay: + * library/tzdata/America/Havana: + * library/tzdata/America/Inuvik: + * library/tzdata/America/Iqaluit: + * library/tzdata/America/Pangnirtung: + * library/tzdata/America/Rankin_Inlet: + * library/tzdata/America/Resolute: + * library/tzdata/America/Yellowknife: + * library/tzdata/Asia/Choibalsan: + * library/tzdata/Asia/Dili: + * library/tzdata/Asia/Hovd: + * library/tzdata/Asia/Jakarta: + * library/tzdata/Asia/Jayapura: + * library/tzdata/Asia/Makassar: + * library/tzdata/Asia/Pontianak: + * library/tzdata/Asia/Ulaanbaatar: + * library/tzdata/Europe/Istanbul: Upgraded to Olson's tzdata2007d. + + * generic/tclListObj.c (TclLsetList, TclLsetFlat): + * tests/lset.test: Changes to deal with shared internal representation + for lists passed to the [lset] command. Thanks to Don Porter for + fixing this issue. [Bug 1677512] + +2007-03-19 Don Porter + + * generic/tclCompile.c: Revise the various expansion routines for + CompileEnv fields to use ckrealloc() where appropriate. + + * generic/tclBinary.c (Tcl_SetByteArrayLength): Replaced ckalloc() / + memcpy() sequence with ckrealloc() call. + + * generic/tclBasic.c (Tcl_CreateMathFunc): Replaced some calls to + * generic/tclEvent.c (Tcl_CreateThread): Tcl_Alloc() with calls + * generic/tclObj.c (UpdateStringOfBignum): to ckalloc(), which + * unix/tclUnixTime.c (SetTZIfNecessary): better supports memory + * win/tclAppInit.c (setargv): debugging. + +2007-03-19 Donal K. Fellows + + * doc/regsub.n: Corrected example so that it doesn't recommend + potentially unsafe practice. Many thanks to Konstantin Kushnir + for reporting this. + +2007-03-17 Kevin B. Kenny + + * win/tclWinReg.c (GetKeyNames): Size the buffer for enumerating key + names correctly, so that Unicode names exceeding 127 chars can be + retrieved without crashing. [Bug 1682211] + * tests/registry.test (registry-4.9): Added test case for the above + bug. + +2007-03-15 Mo DeJong + + * generic/tclIOUtil.c (Tcl_Stat): Reimplement workaround to avoid gcc + warning by using local variables. When the macro argument is of type + long long instead of long, the incorrect warning is not generated. + +2007-03-15 Mo DeJong + + * win/Makefile.in: Fully qualify LIBRARY_DIR so that `make test` does + not depend on working dir. + +2007-03-15 Mo DeJong + + * tests/parse.test: Add two backslash newline parse tests. + +2007-03-12 Don Porter + + * generic/tclExecute.c (INST_FOREACH_STEP4): Make private copy of + * tests/foreach.test (foreach-10.1): value list to be assigned to + variables so that shimmering of that list doesn't lead to invalid + pointers. [Bug 1671087] + + * generic/tclEvent.c (HandleBgErrors): Make efficient private copy + * tests/event.test (event-5.3): of the command prefix for the interp's + background error handling command to avoid panics due to pointers to + memory invalid after shimmering. [Bug 1670155] + + * generic/tclNamesp.c (NsEnsembleImplementationCmd): Make efficient + * tests/namespace.test (namespace-42.8): private copy of the + command prefix as we invoke the command appropriate to a particular + subcommand of a particular ensemble to avoid panic due to shimmering + of the List intrep. [Bug 1670091] + + * generic/tclVar.c (TclArraySet): Make efficient private copy of + * tests/var.test (var-17.1): the "list" argument to [array set] to + avoid crash due to shimmering invalidating pointers. [Bug 1669489] + +2007-03-12 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LsortObjCmd): Fix problems with declaration + positioning and memory leaks. [Bug 1679072] + +2007-03-11 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LreverseObjCmd): Ensure that a list is + correctly reversed even if its internal representation is shared + without the object itself being shared. [Bug 1675044] + +2007-03-10 Miguel Sofer + + * generic/tclCmdIL (Tcl_LsortObjCmd): changed fix to [Bug 1675116] to + use the cheaper TclListObjCopy() instead of Tcl_DuplicateObj(). + +2007-03-09 Andreas Kupries + + * library/platform/shell.tcl: Made more robust if an older platform + * library/platform/pkgIndex.tcl: package is present in the inspected + * unix/Makefile.in: shell. Package forget it to prevent errors. Bumped + * win/Makefile.in: package version to 1.1.3, and updated the Makefiles + installing it as Tcl Module. + +2007-03-09 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LsortObjCmd): Handle tricky case with loss + * tests/cmdIL.test (cmdIL-1.29): of list rep during sorting due + to shimmering. [Bug 1675116] + +2007-03-09 Kevin B. Kenny + + * library/clock.tcl (ReadZoneinfoFile): Added Y2038 compliance to the + code for version-2 'zoneinfo' files. + * tests/clock.test (clock-56.3): Added a test case for Y2038 and + 'zoneinfo'. Modified test initialisation to use the + 'loadTestedCommands' function of tcltest to bring in the correct path + for the registry library. + +2007-03-08 Don Porter + + * generic/tclListObj.c (TclLsetList): Rewrite so that the routine + itself does not do any direct intrep surgery. Better isolates those + things into the implementation of the "list" Tcl_ObjType. + +2007-03-08 Donal K. Fellows + + * generic/tclListObj.c (TclLindexList, TclLindexFlat): Moved these + functions to tclListObj.c from tclCmdIL.c to mirror the way that the + equivalent functions for [lset]'s guts are arranged. + +2007-03-08 Kevin B. Kenny + + * library/clock.tcl: Further tweaks to the Windows time zone table + (restoring missing Mexican time zones). Added rudimentary handling of + version-2 'zoneinfo' files. Update US DST rules so that zones such as + 'EST5EDT' get the correct transition dates. + * tests/clock.test: Added rudimentary test cases for 'zoneinfo' + parsing. Adjusted several tests that depended on obsolete US DST + transition rules. + +2007-03-07 Daniel Steffen + + * macosx/tclMacOSXNotify.c: add spinlock debugging and sanity checks. + + * macosx/Tcl.xcodeproj/project.pbxproj: ensure gcc version used by + * macosx/Tcl.xcodeproj/default.pbxuser: Xcode and configure/make are + * macosx/Tcl-Common.xcconfig: consistent and independent of + gcc_select default and CC env var; fixes for Xcode 3.0. + + * unix/tcl.m4 (Darwin): s/CFLAGS/CPPFLAGS/ in macosx-version-min check + * unix/configure: autoconf-2.59 + +2007-03-07 Don Porter + + * generic/tclCmdIL.c (TclLindex*): Rewrites to make efficient + private copies of the list and indexlist arguments, so we can operate + on the list elements directly with no fear of shimmering effects. + Replaces defensive coding schemes that are otherwise required. End + result is that TclLindexList is entirely a wrapper around + TclLindexFlat, which is now the core engine of all [lindex] + operations. + + * generic/tclObj.c (Tcl_AppendAllObjTypes): Converted to simpler + list validity test. + +2007-03-07 Donal K. Fellows + + * generic/tclRegexp.c (TclRegAbout): Generate information about a + regexp as a Tcl_Obj instead of as a string, which is more efficient. + +2007-03-07 Kevin B. Kenny + + * library/clock.tcl: Adjusted Windows time zone table to handle new US + DST rules by locale rather than as Posix time zone spec. + * tests/clock.test (clock-39.6, clock-49.2, testclock::registry): + Adjusted tests to simulate new US rules. + * library/tzdata/America/Indiana/Winamac: + * library/tzdata/Europe/Istanbul: + * library/tzdata/Pacific/Easter: + Olson's tzdata2007c. + +2007-03-05 Andreas Kupries + + * library/platform/shell.tcl (::platform::shell::RUN): In the case of + * library/platform/pkgIndex.tcl: a failure put the captured stderr + * unix/Makefile.in: into the error message to aid in debugging. Bumped + * win/Makefile.in: package version to 1.1.2, and updated the makefiles + installing it as Tcl Module. + +2007-03-03 Donal K. Fellows + + * generic/tclLink.c (LinkedVar): Added macro to conceal at least some + of the pointer hackery. + +2007-03-02 Don Porter + + * generic/tclCmdIL.c (Tcl_LreverseObjCmd): Added missing + TclInvalidateStringRep() call when we directly manipulate the intrep + of an unshared "list" Tcl_Obj. [Bug 1672585] + + * generic/tclCmdIL.c (Tcl_JoinObjCmd): Revised [join] implementation + to append Tcl_Obj's instead of strings. [RFE 1669420] + + * generic/tclCmdIL.c (Info*Cmd): Code simplifications and + optimizations. + +2007-03-02 Donal K. Fellows + + * generic/tclCompile.c (TclPrintInstruction): Added a scheme to allow + * generic/tclCompile.h (AuxDataPrintProc): aux-data to be printed + * generic/tclCompCmds.c (Print*Info): out for debugging. For + this to work, immediate operands referring to aux-data must be + identified as such in the instruction descriptor table using + OPERAND_AUX4 (all are always 4 bytes). + + * generic/tclExecute.c (TclExecuteByteCode): Rewrote the compiled + * generic/tclCompCmds.c (TclCompileDictCmd): [dict update] so that it + * generic/tclCompile.h (DictUpdateInfo): stores critical + * tests/dict.test (dict-21.{14,15}): non-varying data in an + aux-data value instead of a (shimmerable) literal. [Bug 1671001] + +2007-03-01 Don Porter + + * generic/tclCmdIL.c (Tcl_LinsertObjCmd): Code simplifications + and optimizations. + + * generic/tclCmdIL.c (Tcl_LreplaceObjCmd): Code simplifications + and optimizations. + + * generic/tclCmdIL.c (Tcl_LrangeObjCmd): Rewrite in the same + spirit; avoid shimmer effects rather than react to them. + + * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Stop throwing away + * tests/foreach.test (foreach-1.14): useful error information when + loop variable sets fail. + + * generic/tclCmdIL.c (Tcl_LassignObjCmd): Rewrite to make an + efficient private copy of the list argument, so we can operate on the + list elements directly with no fear of shimmering effects. Replaces + defensive coding schemes that are otherwise required. + + * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Rewrite to make + efficient private copies of the variable and value lists, so we can + operate on them without any special shimmer defense coding schemes. + +2007-03-01 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileForeachCmd): Prevent an unexpected + * tests/foreach.test (foreach-9.1): infinite loop when the + variable list is empty and the foreach is compiled. [Bug 1671138] + +2007-02-26 Andreas Kupries + + * generic/tclIORChan.c (FreeReflectedChannel): Added the missing + refcount release between NewRC and FreeRC for the channel handle + object, spotted by Don Porter. [Bug 1667990] + +2007-02-26 Don Porter + + * generic/tclCmdAH.c (Tcl_ForeachObjCmd): Removed surplus + copying of the objv array that used to be a workaround for [Bug + 404865]. That bug is long fixed. + +2007-02-24 Don Porter + + * generic/tclBasic.c: Use new interface in Tcl_EvalObjEx so that the + recounting logic of the List internal rep need not be repeated there. + Better encapsulation of internal details. + + * generic/tclInt.h: New internal routine TclListObjCopy() used + * generic/tclListObj.c: to efficiently do the equivalent of [lrange + $list 0 end]. After some experience with this, might be a good + candidate for exposure as a public interface. It's useful for callers + of Tcl_ListObjGetElements() who want to control the ongoing validity + of the returned objv pointer. + +2007-02-22 Andreas Kupries + + * tests/pkg.test: Added tests for the case of an alpha package + satisfying a require for the regular package, demonstrating a corner + case specified in TIP#280. More notes in the comments to the test. + +2007-02-20 Jan Nijtmans + + * generic/tclInt.decls: Added "const" specifiers in TclSockGetPort + * generic/tclIntDecls.h: regenerated + * generic/*.c: + * unix/tclUnixChan.c + * unix/tclUnixPipe.c + * win/tclWinPipe.c + * win/tclWinSock.c: Added many "const" specifiers in implementation. + +2007-02-20 Don Porter + + * doc/tcltest.n: Typo fix. [Bug 1663539] + +2007-02-20 Pat Thoyts + + * generic/tclFileName.c: Handle extended paths on Windows NT and + * generic/tclPathObj.c: above. These have a \\?\ prefix. [Bug + * win/tclWinFile.c: 1479814] + * tests/winFCmd.test: Tests for extended path handling. + +2007-02-19 Jeff Hobbs + + * unix/tcl.m4: use SHLIB_SUFFIX=".so" on HP-UX ia64 arch. + * unix/configure: autoconf-2.59 + + * generic/tclIOUtil.c (Tcl_FSEvalFileEx): safe incr of objPtr ref. + +2007-02-18 Donal K. Fellows + + * doc/chan.n, doc/clock.n, doc/eval.n, doc/exit.n, doc/expr.n: + * doc/interp.n, doc/open.n, doc/platform_shell.n, doc/pwd.n: + * doc/refchan.n, doc/regsub.n, doc/scan.n, doc/tclvars.n, doc/tm.n: + * doc/unload.n: Apply [Bug 1610310] to fix typos. Thanks to Larry + Virden for spotting them. + + * doc/interp.n: Partial fix of [Bug 1662436]; rest requires some + policy decisions on what should and shouldn't be safe commands from + the "new in 8.5" set. + +2007-02-13 Kevin B. Kenny + + * tools/fix_tommath_h.tcl: Further tweaking for the x86-64. The change + is to make 'mp_digit' be an 'unsigned int' on that platform; since + we're using only 32 bits of it, there's no reason to make it a 64-bit + 'unsigned long.' + * generic/tclTomMath.h: Regenerated. + +2007-02-13 Donal K. Fellows + + * doc/re_syntax.n: Corrected description of 'print' class [Bug + 1614687] and enhanced description of 'graph' class. + +2007-02-12 Kevin B. Kenny + + * tools/fix_tommath_h.tcl: Added code to patch out a check for + __x86_64__ that caused Tommath to use __attributes(TI)__ for the + mp_word type. Tetra-int's simply fail on too many gcc-glibc-OS + combinations to be ready for shipment today, even if they work for + some of us. This change allows reversion of das's change of 2006-08-18 + that accomplised the same thing on Darwin. [Bugs 1601380, 1603737, + 1609936, 1656265] + * generic/tclTomMath.h: Regenerated. + * library/tzdata/Africa/Asmara: + * library/tzdata/Africa/Asmera: + * library/tzdata/America/Nassau: + * library/tzdata/Atlantic/Faeroe: + * library/tzdata/Atlantic/Faroe: + * library/tzdata/Australia/Eucla: + * library/tzdata/Pacific/Easter: Rebuilt from Olson's tzdata2007b. + +2007-02-09 Joe Mistachkin + + * win/nmakehlp.c: Properly cleanup after nmakehlp, including the + * win/makefile.vc: vcX0.pch file. + +2007-02-08 Jeff Hobbs + + * unix/tclUnixInit.c (TclpCheckStackSpace): do stack size checks with + unsigned size_t to correctly validate stackSize in the 2^31+ range. + [Bug 1654104] + +2007-02-08 Don Porter + + * generic/tclNamesp.c: Corrected broken logic in Tcl_DeleteNamespace + * tests/namespace.test: introduced in Patch 1577278 that caused + [namespace delete ::] to be effective only at level #0. New test + namespace-7.7 should prevent similar error in the future [Bug 1655305] + +2007-02-06 Don Porter + + * generic/tclNamesp.c: Corrected broken implementation of the + * tests/namespace.test: TclMatchIsTrivial optimization on [namespace + children $namespace $pattern]. + +2007-02-04 Daniel Steffen + + * unix/tcl.m4: use gcc4's __attribute__((__visibility__("hidden"))) if + available to define MODULE_SCOPE effective on all platforms. + * unix/configure.in: add caching to -pipe and zoneinfo checks. + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2007-02-03 Joe Mistachkin + + * win/rules.vc: Fix platform specific file copy macros for downlevel + Windows. + +2007-01-29 Don Porter + + * generic/tclResult.c: Added optimization case to TclTransferResult to + cover common case where there's big savings over the fully general + path. Thanks to Peter MacDonald. [Bug 1626518] + + * generic/tclLink.c: Broken linked float logic corrected. Thanks to + Andy Goth. [Bug 1602538] + + * doc/fcopy.n: Typo fix. [Bug 1630627] + +2007-01-28 Daniel Steffen + + * macosx/Tcl.xcodeproj/project.pbxproj: extract build settings that + * macosx/Tcl.xcodeproj/default.pbxuser: were common to multiple + * macosx/Tcl-Common.xcconfig (new file): configurations into external + * macosx/Tcl-Debug.xcconfig (new file): xcconfig files; add extra + * macosx/Tcl-Release.xcconfig (new file): configurations for building + with SDKs and 64bit; convert legacy jam-based 'Tcl' target to native + target with single script phase; correct syntax of build setting + references to use $() throughout. + + * macosx/README: document new Tcl.xcodeproj configurations; other + minor updates/corrections. + + * generic/tcl.h: update location of version numbers in macosx files. + + * macosx/Tcl.xcode/project.pbxproj: restore 'tcltest' target to + * macosx/Tcl.xcode/default.pbxuser: working order by replicating + applicable changes to Tcl.xcodeproj since 2006-07-20. + +2007-01-25 Daniel Steffen + + * unix/tcl.m4: integrate CPPFLAGS into CFLAGS as late as possible and + move (rather than duplicate) -isysroot flags from CFLAGS to CPPFLAGS + to avoid errors about multiple -isysroot flags from some older gcc + builds. + + * unix/configure: autoconf-2.59 + +2007-01-22 Donal K. Fellows + + * compat/memcmp.c (memcmp): Reworked so that arithmetic is never + performed upon void pointers, since that is illegal. [Bug 1631017] + +2007-01-19 Donal K. Fellows + + * generic/tclCompile.c (TclCompileScript): Reduce the frequency with + which we issue INST_START_CMD, making bytecode both more compact and + somewhat faster. The optimized case is where we would otherwise be + issuing a sequence of those instructions; in those cases, it is only + ever the first one encountered that could possibly trigger. + +2007-01-19 Joe Mistachkin + + * tools/man2tcl.c: Include stdlib.h for exit() and improve comment + detection. + * win/nmakehlp.c: Update usage. + * win/makefile.vc: Properly build man2tcl.c for MSVC8. + +2007-01-19 Daniel Steffen + + * macosx/tclMacOSXFCmd.c (TclMacOSXSetFileAttribute): on some versions + of Mac OS X, truncate() fails on resource forks, in that case use + open() with O_TRUNC instead. + + * macosx/tclMacOSXNotify.c: accommodate changes to prototypes of + OSSpinLock(Un)Lock API. + + * macosx/Tcl.xcodeproj/project.pbxproj: ensure HOME and USER env vars + * macosx/Tcl.xcodeproj/default.pbxuser: are defined when running + testsuite from Xcode. + + * tests/env.test: add extra system env vars that need to be preserved + on some Mac OS X versions for testsuite to work. + + * unix/Makefile.in: Move libtommath defines into configure.in to + * unix/configure.in: avoid replicating them across multiple + * macosx/Tcl.xcodeproj/project.pbxproj: buildsystems. + + * unix/tcl.m4: ensure CPPFLAGS env var is used when set. [Bug 1586861] + (Darwin): add -isysroot and -mmacosx-version-min flags to CPPFLAGS + when present in CFLAGS to avoid discrepancies between what headers + configure sees during preprocessing tests and compiling tests. + + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2007-01-18 Donal K. Fellows + + * generic/tclCompile.c (TclCompileScript): Make sure that when parsing + an expanded literal fails, a correct bytecode sequence is still + issued. [Bug 1638414]. Also make sure that the start of the expansion + bytecode sequence falls inside the span of bytecodes for a command. + * tests/compile.test (compile-16.24): Added test for [Bug 1638414] + +2007-01-17 Donal K. Fellows + + * generic/tclIO.c: Added macros to make usage of ChannelBuffers + clearer. + +2007-01-11 Joe English + + * win/tcl.m4(CFLAGS_WARNING): Remove "-Wconversion". This was removed + from unix/tcl.m4 2004-07-16 but not from here. + * win/configure: Regenerated. + +2007-01-11 Pat Thoyts + + * win/makefile.vc: Fixes to work better on Win98. Read version numbers + * win/nmakehlp.c: from package index file to avoid keeping numbers in + * win/rules.vc: the makefile where they may become de-synchronized. + +2007-01-10 Donal K. Fellows + + * generic/regcomp.c (compile, freev): Define a strategy for + * generic/regexec.c (exec): managing the internal + * generic/regguts.h (AllocVars, FreeVars): vars of the RE engine to + * generic/regcustom.h (AllocVars, FreeVars): reduce C stack usage. + This will make Tcl as a whole much less likely to run out of stack + space... + +2007-01-09 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileLindexCmd): + * tests/lindex.test (lindex-9.2): Fix silly bug that ended up + sometimes compiling list arguments in the wrong order. [Bug 1631364] + +2007-01-03 Kevin B. Kenny + + * generic/tclDate.c: Regenerated to recover a lost fix from patthoyts. + [Bug 1618523] + +2006-12-26 Mo DeJong + + * generic/tclIO.c (Tcl_GetsObj): Avoid checking for for the LF in a + possible CRLF sequence when EOF has already been found. + +2006-12-26 Mo DeJong + + * generic/tclEncoding.c (EscapeFromUtfProc): Clear the + TCL_ENCODING_END flag when end bytes are written. This fix keep this + method from writing escape bytes for an encoding like iso2022-jp + multiple times when the escape byte overlap with the end of the IO + buffer. + * tests/io.test: Add test for escape byte overlap issue. + +2006-12-19 Donal K. Fellows + + * unix/tclUnixThrd.c (Tcl_GetAllocMutex, TclpNewAllocMutex): Add + intermediate variables to shut up unwanted warnings. [Bug 1618838] + +2006-12-19 Daniel Steffen + + * unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit. + + * unix/tcl.m4 (Darwin): --enable-64bit: verify linking with 64bit + -arch flag succeeds before enabling 64bit build. + * unix/configure: autoconf-2.59 + +2006-12-17 Daniel Steffen + + * tests/macOSXLoad.test (new file): add testing of .bundle loading and + * tests/load.test: unloading on Darwin (in addition + * tests/unload.test: to existing tests of .dylib + loading). + * macosx/Tcl.xcodeproj/project.pbxproj: add building of dltest + binaries so that testsuite run from Xcode can use them; fix testsuite + run script + * unix/configure.in: add support for building dltest binaries as + * unix/dltest/Makefile.in: .bundle (in addition to .dylib) on Darwin. + * unix/Makefile.in: add stub lib dependency to dltest target. + * unix/configure: autoconf-2.59 + + * tests/append.test: fix cleanup failure when all tests are skipped. + + * tests/chan.test (chan-16.9): cleanup chan event handler to avoid + causing error in event.test when running testsuite with -singleproc 1. + + * tests/info.test: add !singleTestInterp constraint to tests that fail + when running testsuite with -singleproc 1. [Bug 1605269] + +2006-12-14 Donal K. Fellows + + * doc/string.n: Fix example. [Bug 1615277] + +2006-12-12 Don Porter + + * generic/tclCompExpr.c: Now that the new internal structs are + in use to support operator commands, might as well make them the + default for [expr] as well and avoid passing every parsed expression + through the inefficient Tcl_Token array format. This addresses most + issues in [RFE 1517602]. Assuming no performance disasters result from + this, much dead code supporting the other implementation might now be + removed. + + * generic/tclBasic.c: Final step routing all direct evaluation forms + * generic/tclCompExpr.c: of the operator commands through TEBC, + * generic/tclCompile.h: dropping all the routines in tclMathOp.c. + * generic/tclMathOp.c: Still needs Engineering Manual attention. + +2006-12-11 Don Porter + + * generic/tclBasic.c: Another step with all sorting operator + * generic/tclCompExpr.c: commands now routing through TEBC via + * generic/tclCompile.h: TclSortingOpCmd(). + +2006-12-08 Don Porter + + * generic/tclBasic.c: Another step down the path of re-using + * generic/tclCompExpr.c: TclExecuteByteCode to implement the TIP 174 + * generic/tclCompile.h: commands instead of using a mass of code + * generic/tclMathOp.c: duplication. Now all operator commands that + * tests/mathop.test: demand exactly one operation are implemented + via TclSingleOpCmd and a call to TEBC. + + * generic/tclCompExpr.c: Revised implementation of TclInvertOpCmd to + * generic/tclMathOp.c: perform a bytecode compile / execute sequence. + This demonstrates a path toward avoiding mountains of code duplication + in tclMathOp.c and tclExecute.c. + + * generic/tclCompile.h: Change TclExecuteByteCode() from static to + * generic/tclExecute.c: MODULE_SCOPE so all files including + tclCompile.h may call it. + + * generic/tclMathOp.c: More revisions to make tests pass. + * tests/mathop.test: + +2006-12-08 Donal K. Fellows + + * generic/tclNamesp.c (TclTeardownNamespace): Ensure that dying + namespaces unstitch themselves from their referents. [Bug 1571056] + (NsEnsembleImplementationCmd): Silence GCC warning. + + * tests/mathop.test: Full tests for & | and ^ operators + +2006-12-08 Daniel Steffen + + * library/tcltest/tcltest.tcl: use [info frame] for "-verbose line". + +2006-12-07 Don Porter + + * generic/tclCompCmds.c: Additional commits correct most + * generic/tclExecute.c: failing tests illustrating bugs + * generic/tclMathOp.c: uncovered in [Patch 1578137]. + + * generic/tclBasic.c: Biggest source of TIP 174 failures was that + the commands were not [namespace export]ed from the ::tcl::mathop + namespace. More bits from [Patch 1578137] correct that. + + * tests/mathop.test: Commmitted several new tests from Peter Spjuth + found in [Patch 1578137]. Many failures now demonstrate issues to fix + in the TIP 174 implementation. + +2006-12-07 Donal K. Fellows + + * tests/mathop.test: Added tests for ! ~ eq operators. + * generic/tclMathOp.c (TclInvertOpCmd): Add in check for non-integral + numeric values. + * generic/tclCompCmds.c (CompileCompareOpCmd): Factor out the code + generation for the chained comparison operators. + +2006-12-07 Pat Thoyts + + * tests/exec.test: Fixed line endings (caused win32 problems). + +2006-12-06 Don Porter + + * generic/tclCompCmds.c: Revised and consolidated into utility + * tests/mathop.test: routines some of routines that compile + the new TIP 174 commands. This corrects some known bugs. More to come. + +2006-12-06 Kevin B. Kenny + + * tests/expr.test (expr-47.12): Improved error reporting in hopes of + having more information to pursue [Bug 1609936]. + +2006-12-05 Andreas Kupries + + TIP#291 IMPLEMENTATION + + * generic/tclBasic.c: Define tcl_platform element for pointerSize. + * doc/tclvars.n: + + * win/Makefile.in: Added installation instructions for the platform + * win/makefile.vc: package. Added the platform package. + * win/makefile.bc: + * unix/Makefile.in: + + * tests/platform.test: + * tests/safe.test: + + * library/platform/platform.tcl: + * library/platform/shell.tcl: + * library/platform/pkgIndex.tcl: + + * doc/platform.n: + * doc/platform_shell.n: + +2006-12-05 Don Porter + + * generic/tclPkg.c: When no requirements are supplied to a + * tests/pkg.test: [package require $pkg] and [package unknown] + is invoked to find a satisfying package, pass the requirement argument + "0-" (which means all versions are acceptable). This permits a + registered [package unknown] command to call [package vsatisfies + $testVersion {*}$args] without any special handling of the empty $args + case. This fixes/avoids a bug in [::tcl::tm::UnknownHandler] that was + causing old TM versions to be provided in preference to newer TM + versions. Thanks to Julian Noble for discovering the issue. + +2006-12-04 Donal K. Fellows + + TIP#267 IMPLEMENTATION + + * generic/tclIOCmd.c (Tcl_ExecObjCmd): Added -ignorestderr option, + * tests/exec.test, doc/exec.n: loosely from [Patch 1476191] + +2006-12-04 Don Porter + + * generic/tclCompExpr.c: Added implementation for the + CompileExprTree() routine that can produce expression bytecode + directly from internal structures with no need to pass through the + Tcl_Token array representation. Still disabled by default. #undef + USE_EXPR_TOKENS to try it out. + +2006-12-03 Don Porter + + * generic/tclCompExpr.c: Added expr parsing routines that + produce a different set of internal structures representing the parsed + expression, as well as routines that go on to convert those structures + into the traditional Tcl_Token array format. Use of these routines is + currently disabled. #undef PARSE_DIRECT_EXPR_TOKENS to enable them. + These routines will only become really useful when more routines that + compile directly from the new internal structures are completed. + +2006-12-02 Donal K. Fellows + + * doc/file.n: Clarification of [file pathtype] docs. [Bug 1606454] + +2006-12-01 Kevin B. Kenny + + * libtommath/bn_mp_add.c: Corrected the effects of a + * libtommath/bn_mp_div.c: bollixed 'cvs merge' operation + * libtommath/bncore.c: that inadvertently committed some + * libtommath/tommath_class.h: half-developed code. + + TIP#299 IMPLEMENTATION + + * doc/mathfunc.n: Added isqrt() function to docs + * generic/tclBasic.c: Added isqrt() math function (ExprIsqrtFunc) + * tests/expr.test (expr-47.*): Added tests for isqrt() + * tests/info.test (info-20.2): Added isqrt() to expected math funcs. + +2006-12-01 Don Porter + + * tests/chan.test: Correct timing sensitivity in new test. [Bug + 1606860] + + TIP#287 IMPLEMENTATION + + * doc/chan.n: New subcommand [chan pending]. + * generic/tclBasic.c: Thanks to Michael Cleverly for proposal + * generic/tclInt.h: and implementation. + * generic/tclIOCmd.c: + * library/init.tcl: + * tests/chan.test: + * tests/ioCmd.test: + + TIP#298 IMPLEMENTATION + + * generic/tcl.decls: Tcl_GetBignumAndClearObj -> Tcl_TakeBignumFromObj + * generic/tclObj.c: + + * generic/tclDecls.h: make genstubs + * generic/tclStubInit.c: + + * generic/tclExecute.c: Update callers. + * generic/tclMathOp.c: + +2006-11-30 Kevin B. Kenny + + * library/tzdata: Olson's tzdata2006p. + * libtommath/bn_mp_sqrt.c: Fixed a bug where the initial approximation + to the square root could be on the wrong side, causing failure of + convergence. + +2006-11-29 Don Porter + + * generic/tclBasic.c (Tcl_AppendObjToErrorInfo): Added + Tcl_DecrRefCount() on the objPtr argument to plug memory leaks. This + makes the routine a consumer, which makes it easiest to use. + +2006-11-28 Andreas Kupries + + * generic/tclBasic.c: TIP #280 implementation. + * generic/tclCmdAH.c: + * generic/tclCmdIL.c: + * generic/tclCmdMZ.c: + * generic/tclCompCmds.c: + * generic/tclCompExpr.c: + * generic/tclCompile.c: + * generic/tclCompile.h: + * generic/tclExecute.c: + * generic/tclIOUtil.c: + * generic/tclInt.h: + * generic/tclInterp.c: + * generic/tclNamesp.c: + * generic/tclObj.c: + * generic/tclProc.c: + * tests/compile.test: + * tests/info.test: + * tests/platform.test: + * tests/safe.test: + +2006-11-27 Kevin B. Kenny + + * unix/tclUnixChan.c (TclUnixWaitForFile): + * tests/event.test (event-14.*): Corrected a bug where + TclUnixWaitForFile would present select() with the wrong mask on an + LP64 machine if a fd number exceeds 32. Thanks to Jean-Luc Fontaine + for reporting and diagnosing. [Bug 1602208] + +2006-11-27 Don Porter + + * generic/tclExecute.c (TclIncrObj): Correct failure to detect + floating-point increment values. Thanks to William Coleda [Bug + 1602991] + +2006-11-26 Donal K. Fellows + + * tests/mathop.test, doc/mathop.n: More bits and pieces of the TIP#174 + implementation. Note that the test suite is not yet complete. + +2006-11-26 Daniel Steffen + + * unix/tcl.m4 (Linux): --enable-64bit support. [Patch 1597389] + * unix/configure: autoconf-2.59 [Bug 1230558] + +2006-11-25 Donal K. Fellows + + TIP#174 IMPLEMENTATION + + * generic/tclMathOp.c (new file): Completed the implementation of the + interpreted versions of all the tcl::mathop commands. Moved to a new + file to make tclCompCmds.c more focused in purpose. + +2006-11-23 Donal K. Fellows + + * generic/tclCompCmds.c (Tcl*OpCmd, TclCompile*OpCmd): + * generic/tclBasic.c (Tcl_CreateInterp): Partial implementation of + TIP#174; the commands are compiled, but (mostly) not interpreted yet. + +2006-11-22 Donal K. Fellows + + TIP#269 IMPLEMENTATION + + * generic/tclCmdMZ.c (Tcl_StringObjCmd): Implementation of the [string + * tests/string.test (string-25.*): is list] command, based on + * doc/string.n: work by Joe Mistachkin, with + enhancements by Donal Fellows for better failindex behaviour. + +2006-11-22 Don Porter + + * tools/genWinImage.tcl (removed): Removed two files used in + * win/README.binary (removed): production of binary distributions + for Windows, a task we no longer perform. [Bug 1476980] + * generic/tcl.h: Remove mention of win/README.binary in comment + + * generic/tcl.h: Moved TCL_REG_BOSONLY #define from tcl.h to + * generic/tclInt.h: tclInt.h. Only know user is Expect, which + already #include's tclInt.h. No need to continue greater exposure. + [Bug 926500] + +2006-11-20 Donal K. Fellows + + * generic/tclBasic.c (Tcl_CreateInterp, TclHideUnsafeCommands): + * library/init.tcl: Refactored the [chan] command's guts so that it + does not use aliases to global commands, making the code more robust. + +2006-11-17 Don Porter + + * generic/tclExecute.c (INST_EXPON): Corrected crash on + [expr 2**(1<<63)]. Was operating on cleared bignum Tcl_Obj. + +2006-11-16 Donal K. Fellows + + * doc/apply.n, doc/chan.n: Added examples. + +2006-11-15 Don Porter + + TIP#270 IMPLEMENTATION + + * generic/tcl.decls: New public routines Tcl_ObjPrintf, + * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, + * generic/tclInt.h: Tcl_AppendLimitedToObj, + Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal + versions removed. + + * generic/tclDecls.h: make genstubs + * generic/tclStubInit.c: + + * generic/tclBasic.c: Updated callers. + * generic/tclCkalloc.c: + * generic/tclCmdAH.c: + * generic/tclCmdIL.c: + * generic/tclCmdMZ.c: + * generic/tclCompExpr.c: + * generic/tclCompile.c: + * generic/tclDictObj.c: + * generic/tclExecute.c: + * generic/tclIORChan.c: + * generic/tclIOUtil.c: + * generic/tclMain.c: + * generic/tclNamesp.c: + * generic/tclObj.c: + * generic/tclPkg.c: + * generic/tclProc.c: + * generic/tclStrToD.c: + * generic/tclTimer.c: + * generic/tclUtil.c: + * unix/tclUnixFCmd.c: + + * tools/genStubs.tcl: Updated script to no longer produce the + _ANSI_ARGS_ wrapper in generated declarations. Also revised to accept + variadic prototypes with more than one fixed argument. (This is + possible since TCL_VARARGS and its limitations are no longer in use). + * generic/tcl.h: Some reordering so that macro definitions do + not interfere with the now _ANSI_ARGS_-less stub declarations. + + * generic/tclDecls.h: make genstubs + * generic/tclIntDecls.h: + * generic/tclIntPlatDecls.h: + * generic/tclPlatDecls.h: + * generic/tclTomMathDecls.h: + +2006-11-15 Donal K. Fellows + + * doc/ChnlStack.3, doc/CrtObjCmd.3, doc/GetIndex.3, doc/OpenTcp.3: + * doc/chan.n, doc/fconfigure.n, doc/fcopy.n, doc/foreach.n: + * doc/history.n, doc/http.n, doc/library.n, doc/lindex.n: + * doc/lrepeat.n, doc/lreverse.n, doc/pkgMkIndex.n, doc/re_syntax.n: + Convert \fP to \fR so that man-page scrapers have an easier time. + +2006-11-14 Don Porter + + TIP#261 IMPLEMENTATION + + * generic/tclNamesp.c: [namespace import] with 0 arguments + introspects the list of imported commands. + +2006-11-13 Kevin B. Kenny + + * generic/tclThreadStorage.c (Tcl_InitThreadStorage): + (Tcl_FinalizeThreadStorage): Silence a compiler warning about + presenting a volatile pointer to 'memset'. + +2006-11-13 Don Porter + + * generic/tclIO.c: When [gets] on a binary channel needs to use + the "iso8859-1" encoding, save a copy of that encoding per-thread to + avoid repeated freeing and re-loading of it from the file system. This + replaces the cached copy of this encoding that the platform + initialization code used to keep in pre-8.5 releases. + +2006-11-13 Daniel Steffen + + * generic/tclCompExpr.c: Fix gcc warnings about 'cast to/from + * generic/tclEncoding.c: pointer from/to integer of different + * generic/tclEvent.c: size' on 64-bit platforms by casting + * generic/tclExecute.c: to intermediate types + * generic/tclHash.c: intptr_t/uintptr_t via new PTR2INT(), + * generic/tclIO.c: INT2PTR(), PTR2UINT() and UINT2PTR() + * generic/tclInt.h: macros. [Patch 1592791] + * generic/tclProc.c: + * generic/tclTest.c: + * generic/tclThreadStorage.c: + * generic/tclTimer.c: + * generic/tclUtil.c: + * unix/configure.in: + * unix/tclUnixChan.c: + * unix/tclUnixPipe.c: + * unix/tclUnixPort.h: + * unix/tclUnixTest.c: + * unix/tclUnixThrd.c: + + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2006-11-12 Donal K. Fellows + + * generic/tclInt.h, generic/tclInt.decls: Transfer TclPtrMakeUpvar and + TclObjLookupVar to the internal stubs table. + +2006-11-10 Daniel Steffen + + * tests/fCmd.test (fCmd-6.26): fix failure when env(HOME) path + contains symlinks. + + * macosx/Tcl.xcodeproj/project.pbxproj: remove tclParseExpr.c; when + running testsuite from inside Xcdoe, skip stack-3.1 (it only fails + under those circumstances). + + * unix/tcl.m4 (Darwin): suppress linker arch warnings when building + universal for both 32 & 64 bit and no 64bit CoreFoundation is + available; sync with tk tcl.m4 change. + * unix/configure.in: whitespace. + * unix/configure: autoconf-2.59 + +2006-11-09 Don Porter + + * generic/tclParseExpr.c (removed): Moved all the code of + * generic/tclCompExpr.c: tclParseExpr.c into tclCompExpr.c. + * unix/Makefile.in: This sets the stage for expr compiling to work + * win/Makefile.in: directly with the full parse tree structures, + * win/makefile.bc: and not have to pass through the information + * win/makefile.vc: lossy format of an array of Tcl_Tokens. + * win/tcl.dsp: + +2006-11-09 Donal K. Fellows + + TIP#272 IMPLEMENTATION + + * generic/tclCmdMZ.c (Tcl_StringObjCmd): Implementation of the + * tests/string.test, tests/stringComp.test: [string reverse] command + * doc/string.n: from TIP#272. + + * generic/tclCmdIL.c (Tcl_LreverseObjCmd): Implementation of the + * generic/tclBasic.c, generic/tclInt.h: [lreverse] command from + * tests/cmdIL.test (cmdIL-7.*): TIP#272. + * doc/lreverse.n: + +2006-11-08 Donal K. Fellows + + * generic/tclIO.c, generic/tclPkg.c: Style & clarity rewrites. + +2006-11-07 Andreas Kupries + + * unix/tclUnixFCmd.c (CopyFile): Added code to fall back to a + hardwired default block size should the filesystem report a bogus + value. [Bug 1586470] + +2006-11-04 Don Porter + + * generic/tclStringObj.c: Changed Tcl_ObjPrintf() response to an + invalid format specifier string. No longer panics; now produces an + error message as output. + + TIP#274 IMPLEMENTATION + + * generic/tclParseExpr.c: Exponentiation operator is now right + * tests/expr.test: associative. [Patch 1556802] + +2006-11-03 Miguel Sofer + + * generic/tclBasic.c (TEOVI): fix por possible leak of a Command in + the presence of execution traces that delete it. + + * generic/tclBasic.c (TEOVI): + * tests/trace.test (trace-21.11): fix for [Bug 1590232], execution + traces may cause a second command resolution in the wrong namespace. + +2006-11-03 Donal K. Fellows + + * tests/event.test (event-11.5): Rewrote tests to stop Tcl from + * tests/io.test (multiple tests): opening sockets that are + * tests/ioCmd.test (iocmd-15.1,16,17): reachable from outside hosts + * tests/iogt.test (__echo_srv__.tcl): where not necessary. This is + * tests/socket.test (multiple tests): noticably annoying on some + * tests/unixInit.test (unixInit-1.2): systems (e.g., Windows). + +2006-11-02 Daniel Steffen + + * macosx/Tcl.xcodeproj/project.pbxproj: check autoconf/autoheader exit + status and stop build if they fail. + +2006-11-02 Jeff Hobbs + + * doc/ParseCmd.3, doc/Tcl.n, doc/eval.n, doc/exec.n: + * doc/fconfigure.n, doc/interp.n, doc/unknown.n: + * library/auto.tcl, library/init.tcl, library/package.tcl: + * library/safe.tcl, library/tm.tcl, library/msgcat/msgcat.tcl: + * tests/all.tcl, tests/basic.test, tests/cmdInfo.test: + * tests/compile.test, tests/encoding.test, tests/execute.test: + * tests/fCmd.test, tests/http.test, tests/init.test: + * tests/interp.test, tests/io.test, tests/ioUtil.test: + * tests/iogt.test, tests/namespace-old.test, tests/namespace.test: + * tests/parse.test, tests/pkg.test, tests/pkgMkIndex.test: + * tests/proc.test, tests/reg.test, tests/trace.test: + * tests/upvar.test, tests/winConsole.test, tests/winFCmd.test: + * tools/tclZIC.tcl: + * generic/tclParse.c (Tcl_ParseCommand): Replace {expand} with {*} + officially (TIP #293). Leave -DALLOW_EXPAND=0|1 option to keep + {expand} syntax for transition users. [Bug 1589629] + +2006-11-02 Donal K. Fellows + + * generic/tclBasic.c, generic/tclInterp.c, generic/tclProc.c: Silence + warnings from gcc over signed/unsigned and TclStackAlloc(). + * generic/tclCmdMZ.c: Update to more compact and clearer coding style. + +2006-11-02 Don Porter + + * generic/tclCmdAH.c: Further revisions to produce the routines + * generic/tclInt.h: TclFormat() and TclAppendFormatToObj() that + * generic/tclNamesp.c: accept (objc, objv) arguments rather than + * generic/tclStringObj.c: any varargs stuff. + + * generic/tclBasic.c: Further revised TclAppendPrintToObj() and + * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable + * generic/tclCmdAH.c: to complete their formatting operations, + * generic/tclCmdIL.c: rather than report an error message. This + * generic/tclCmdMZ.c: means an interp argument for error message + * generic/tclDictObj.c: recording is no longer needed, further + * generic/tclExecute.c: simplifying the interface for callers. + * generic/tclIORChan.c: + * generic/tclIOUtil.c: + * generic/tclInt.h: + * generic/tclMain.c: + * generic/tclNamesp.c: + * generic/tclParseExpr.c: + * generic/tclPkg.c: + * generic/tclProc.c: + * generic/tclStringObj.c: + * generic/tclTimer.c: + * generic/tclUtil.c: + * unix/tclUnixFCmd.c: + +2006-11-02 Donal K. Fellows + + * tests/winPipe.test (winpipe-4.[2345]): Made robust when run in + directory with spaces in its name. + + * generic/tclCmdAH.c: Clean up uses of cast NULLs. + + * generic/tclInterp.c (AliasObjCmd): Added more explanatory comments. + + * generic/tclBasic.c (TclEvalObjvInternal): Rewrote so that comments + are relevant and informative once more. Also made the unknown handler + processing use the Tcl execution stack for working space, and not the + general heap. + +2006-11-01 Daniel Steffen + + * unix/tclUnixPort.h: ensure MODULE_SCOPE is defined before use, so + that tclPort.h can once again be included without tclInt.h. + + * generic/tclEnv.c (Darwin): mark _environ symbol as unexported even + when MODULE_SCOPE != __private_extern__. + +2006-10-31 Don Porter + + * generic/tclBasic.c: Refactored and renamed the routines + * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and + * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of routines + * generic/tclCmdIL.c: TclAppendPrintfToObj, TclAppendFormatToObj, + * generic/tclCmdMZ.c: TclObjPrintf, and TclObjFormat, with the + * generic/tclDictObj.c: intent of making the latter list, plus + * generic/tclExecute.c: TclAppendLimitedToObj and + * generic/tclIORChan.c: TclAppendObjToErrorInfo, public via a revised + * generic/tclIOUtil.c: TIP 270. + * generic/tclInt.h: + * generic/tclMain.c: + * generic/tclNamesp.c: + * generic/tclParseExpr.c: + * generic/tclPkg.c: + * generic/tclProc.c: + * generic/tclStringObj.c: + * generic/tclTimer.c: + * generic/tclUtil.c: + * unix/tclUnixFCmd.c: + +2006-10-31 Miguel Sofer + + * generic/tclBasic.c, generic/tcl.h, generic/tclInterp.c: + * generic/tclNamesp.c: removing the flag bit TCL_EVAL_NOREWRITE, the + last remnant of the callObjc/v fiasco. It is not needed, as it is now + always set and checked or'ed with TCL_EVAL_INVOKE. + +2006-10-31 Pat Thoyts + + * win/rules.vc: Fix for [Bug 1582769] - options conflict with VC2003. + +2006-10-31 Donal K. Fellows + + * generic/tclBasic.c, generic/tclNamesp.c, generic/tclProc.c: + * generic/tclInt.h: Removed the callObjc and callObjv fields from the + Interp structure. They did not function correctly and made other parts + of the core amazingly complex, resulting in a substantive change to + [info level] behaviour. [Bug 1587618] + * library/clock.tcl: Removed use of [info level 0] for calculating the + command name as used by the user and replace with a literal. What's + there now is sucky, but at least appears to be right to most users. + * tests/namespace.test (namespace-42.7,namespace-47.1): Reverted + changes to these tests. + * tests/info.test (info-9.11,info-9.12): Added knownBug constraint + since these tests require a different behaviour of [info level] than + is possible because of other dependencies. + +2006-10-30 Jeff Hobbs + + * tools/tcltk-man2html.tcl (option-toc): handle any kind of options + defined toc section (needed for ttk docs) + +2006-10-30 Miguel Sofer + + * generic/tclBasic.c (TEOVI): insured that the interp's callObjc/v + fields are restored after traces run, as they be spoiled. This was + causing a segfault in tcllib's profiler tests. + +2006-10-30 Don Porter + + * generic/tclExecute.c (INST_MOD): Corrected improper testing of the + * tests/expr.test: sign of bignums when applying Tcl's + division rules. Thanks to Peter Spjuth. [Bug 1585704] + +2006-10-29 Miguel Sofer + + * generic/tclNamesp.c (EnsembleImplementationCmd): + * tests/namespace.test (47.7-8): reverted a wrong "optimisation" that + completely broke snit; added two tests. + +2006-10-28 Donal K. Fellows + + * generic/tclProc.c (ObjInterpProcEx, TclObjInterpProcCore): Split the + core of procedures to make it easier to build procedure-like code + without going through horrible contortions. This is the last critical + component to make advanced OO systems workable as simple loadable + extensions. TOIPC is now in the internal stub table. + (MakeProcError, MakeLambdaError): Refactored ProcessProcResultCode to + be simpler, some of which goes to TclObjInterpProcCore, and the rest + of which is now in these far simpler routines which just do errorInfo + stack generation for different types of procedure-like entity. + * tests/apply.test (apply-5.1): Updated to expect the more informative + form of message. + +2006-10-27 Donal K. Fellows + + * generic/tclVar.c (HasLocalVars): New macro to make various bits and + pieces cleaner. + + * generic/tclNamesp.c (TclSetNsPath): Expose SetNsPath() through + internal stubs table with semi-external name. + + * generic/tclInt.h (CallFrame): Add a field for handling context data + for extensions (like object systems) that should be tied to a call + frame (and not a command or interpreter). + + * generic/tclBasic.c (TclRenameCommand): Change to take CONST args; + they were only ever used in a constant way anyway, so this appears to + be a spot that was missed during TIP#27 work. + +2006-10-26 Miguel Sofer + + * generic/tclProc.c (SetLambdaFromAny): minor change, eliminate + redundant call to Tcl_GetString (thanks aku). + + * generic/tclInterp.c (ApplyObjCmd): + * generic/tclNamesp.c (EnsembleImplementationCmd): replaced ckalloc + (heap) with TclStackAlloc (execution stack). + +2006-10-24 Miguel Sofer + + * tests/info.test (info-9.11-12): tests for [Bug 1577492] + * tests/apply.test (apply-4.3-5): tests for [Bug 1574835] + + * generic/tclProc.c (ObjInterpProcEx): disable itcl hacks for calls + from ApplyObjCmd (islambda==1), as they mess apply's error messages + [Bug 1583266] + +2006-10-23 Miguel Sofer + + * generic/tclProc.c (ApplyObjCmd): fix wrong#args for apply by using + the ensemble rewrite engine. [Bug 1574835] + * generic/tclInterp.c (AliasObjCmd): previous commit missed usage of + TCL_EVAL_NOREWRITE for aliases. + + * generic/tclBasic.c (TclEvalObjvInternal): removed redundant check + for ensembles. [Bug 1577628] + + * library/clock.tcl (format, scan): corrected wrong # args messages to + * tests/clock.test (3.1, 34.1): make use of the new rewrite + capabilities of [info level] + + * generic/tcl.h: Lets TEOV update the iPtr->callObj[cv] new + * generic/tclBasic.c: fields, except when the flag bit + * generic/tclInt.h: TCL_EVAL_NOREWRITE is present. These values + * generic/tclNamesp.c: are used by Tcl_PushCallFrame to initialise + * generic/tclProc.c: the frame's obj[cv] fields, and allows + * tests/namespace.test: [info level] to know and use ensemble + rewrites. [Bug 1577492] + + ***POTENTIAL INCOMPATIBILITY*** + The return value from [info level 0] on interp alias calls is changed: + previously returned the target command (including curried values), now + returns the source - what was actually called. + +2006-10-23 Miguel Sofer + + * generic/tcl.h: Modified the Tcl call stack so there is + * generic/tclBasic.c: always a valid CallFrame, even at level 0 + * generic/tclCmdIL.c: [Patch 1577278]. Most of the changes + * generic/tclInt.h: involve removing tests for a NULL + * generic/tclNamesp.c: iPtr->(var)framePtr. There is now a + * generic/tclObj.c: CallFrame pushed at interp creation with a + * generic/tclProc.c: pointer to it stored in iPtr->rootFramePtr. + * generic/tclTrace.c: A second unused field in Interp is + * generic/tclVar.c: hijacked to enable further functionality, + currently unused (but with several FRQs depending on it). + + ***POTENTIAL INCOMPATIBILITY*** + Any user that includes tclInt.h and needs to determine if it is + running at level 0 should change (iPtr->varFramePtr == NULL) to + (iPtr->varFramePtr == iPtr->rootFramePtr). + +2006-10-23 Don Porter + + * README: Bump version number to 8.5a6 + * generic/tcl.h: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/README.binary: + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + +2006-10-21 Miguel Sofer + + * generic/tcl.h, generic/tclHash.c: Tcl_FindHashEntry now calls + Tcl_CreateHashEntry with a newPtr set to NULL: this would have caused + a segfault previously and eliminates duplicated code. A macro has been + added to tcl.h (only used when TCL_PRESERVE_BINARY_COMPATABALITY is + not set - i.e., not by default). + +2006-10-20 Reinhard Max + + * unix/configure.in: Added autodetection for OS-supplied timezone + * unix/Makefile.in: files and configure switches to override the + * unix/configure: detected default. + +2006-10-20 Daniel Steffen + + *** 8.5a5 TAGGED FOR RELEASE *** + + * tools/tcltk-man2html.tcl: add support for alpha & beta versions to + useversion glob pattern. [Bug 1579941] + +2006-10-18 Don Porter + + * changes: 8.5a5 release date set + + * doc/Encoding.3: Missing doc updates (mostly Table of + * doc/Ensemble.3: Contents) exposed by `make checkdoc` + * doc/FileSystem.3: + * doc/GetTime.3: + * doc/PkgRequire.3: + +2006-10-17 Miguel Sofer + + * generic/tclInterp.c (ApplyObjCmd): fixed bad error in 2006-10-12 + commit: interp released too early. Spotted by mistachkin. + +2006-10-16 Miguel Sofer + + * tclProc.c (SetLambdaFromAny): + * tests/apply.test (9.1-9.2): plugged intrep leak [Bug 1578454], + found by mjanssen. + +2006-10-16 Andreas Kupries + + * generic/tclBasic.c: Moved TIP#219 cleanup to DeleteInterpProc. + +2006-10-16 Daniel Steffen + + * changes: updates for 8.5a5 release. + + * unix/tclUnixThrd.c (TclpThreadGetStackSize): Darwin: fix for main + thread, where pthread_get_stacksize_np() returns incorrect info. + + * macosx/GNUmakefile: don't redo prebinding of non-prebound binaires. + +2006-10-16 Don Porter + + * generic/tclPkg.c (ExactRequirement): Plugged memory leak. Also + changed Tcl_Alloc()/Tcl_Free() calls to ckalloc()/ckfree() for easier + memory debugging in the future. [Bug 1568373] + + * library/tcltest/tcltest.tcl: Revise tcltest bump to 2.3a1. + * library/tcltest/pkgIndex.tcl: This permits more features to be + * unix/Makefile.in: added to tcltest before we reach version 2.3.0 + * win/Makefile.in: best timed to match the release of Tcl 8.5.0. + * win/makefile.vc: This also serves as a demo of TIP 268 features + +2006-10-13 Colin McCormack + + * win/tclWinFile.c: corrected erroneous attempt to protect against + NULL return from Tcl_FSGetNormalizedPath per [Bug 1548263] causing + [Bug 1575837]. + * win/tclWinFile.c: alfredd supplied patch to fix [Bug 1575837] + +2006-10-13 Daniel Steffen + + * unix/tclUnixThrd.c (TclpThreadGetStackSize): on Darwin, use + * unix/tcl.m4: pthread_get_stacksize_np() API to get thread stack size + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2006-10-12 Miguel Sofer + + * generic/tclInterp.c (ApplyObjCmd): + * tests/interp.test (interp-14.5-10): made [interp alias] use the + ensemble rewrite machinery to produce better error messages [Bug + 1576006] + +2006-10-12 David Gravereaux + + * win/nmakehlp.c: Replaced all wnsprintf() calls with snprintf(). + wnsprintf was not in my shwlapi header file (VC++6) + +2006-10-11 Don Porter + + * generic/tclPkg.c (Tcl_PackageRequireEx): Corrected crash when + argument version=NULL passed in. + +2006-10-10 Don Porter + + * changes: Updates for 8.5a5 release. + + * generic/tclNamespace.c (TclTeardownNamespace): After the + commandPathSourceList of a namespace is cleared, set the + commandPathSourceList to NULL so we don't try to walk the list a + second time, possibly after it is freed. [Bug 1566526] + * tests/namespace.test (namespace-51.16): Added test. + +2006-10-09 Miguel Sofer + + * doc/UpVar.3: brough the docs in accordance to the code. Ever since + 8.0, Tcl_UpVar(2)? accepts TCL_NAMESPACE_ONLY as a flag value, and + var-3.4 tests for proper behaviour. The docs only allowed 0 and + TCL_GLOBAL_ONLY. [Bug 1574099] + +2006-10-09 Miguel Sofer + + * tests/*.test: updated all tests to refer explicitly to the global + variables ::errorInfo, ::errorCode, ::env and ::tcl_platform: many + were relying on the alternative lookup in the global namespace, that + feature is tested specifically in namespace and variable tests. + + The modified testfiles are: apply.test, basic.test, case.test, + cmdIL.test, cmdMZ.test, compExpr-old.test, error.test, eval.test, + event.test, expr.test, fileSystem.test, for.test, http.test, if.test, + incr-old.test, incr.test, interp.test, io.test, ioCmd.test, load.test, + misc.test, namespace.test, parse.test, parseOld.test, pkg.test, + proc-old.test, set.test, switch.test, tcltest.test, thread.test, + var.test, while-old.test, while.test. + +2006-10-06 Pat Thoyts + + * win/rules.vc: [Bug 1571954] avoid /RTCc flag with MSVC8 + +2006-10-06 Pat Thoyts + + * doc/binary.n: TIP #275: Support unsigned values in binary + * generic/tclBinary.c: command. Tests and documentation updated. + * tests/binary.test: + +2006-10-05 Andreas Kupries + + * library/tm.tcl: Fixed bug in TIP #189 implementation, now allowing + '_' in module names. + +2006-10-05 Jeff Hobbs + + * library/http/http.tcl (http::geturl): only do geturl url rfc 3986 + validity checking if $::http::strict is true (default true for 8.5). + [Bug 1560506] + + * generic/tcl.h: note limitation on changing Tcl_UniChar size + * generic/tclEncoding.c (UtfToUnicodeProc, UnicodeToUtfProc): + * tests/encoding.test (encoding-16.1): fix alignment issues in + unicode <> utf conversion procs. [Bug 1122671] + +2006-10-05 Miguel Sofer + + * generic/tclVar.c (Tcl_LappendObjCmd): + * tests/append.test(4.21-22): fix for longstanding [Bug 1570718], + lappending nothing to non-list. Reported by lvirden + +2006-10-04 Kevin B. Kenny + + * tzdata/: Olson's tzdata2006m. + +2006-10-01 Kevin B. Kenny + + * tests/clock.test (clock-49.2): Removed a locale dependency that + caused a spurious failure in the German locale. [Bug 1567956] + +2006-10-01 Miguel Sofer + + * doc/Eval.3 (TclEvalObjv): added note on refCount management for the + elements of objv. [Bug 730244] + +2006-10-01 Pat Thoyts + + * win/tclWinFile.c: Handle possible missing define. + + * win/tclWinFile.c (TclpUtime): [Bug 1420432] file mtime fails for + * tests/cmdAH.test: directories on windows + + * tests/winFile.test: Handle Msys environment a little differently in + getuser function. [Bug 1567956] + +2006-09-30 Miguel Sofer + + * generic/tclUtil.c (Tcl_SplitList): optimisation, [Patch 1344747] by + dgp. + + * generic/tclInt.decls: + * generic/tclInt.h: + * generic/tclIntDecls.h: + * generic/tclObj.c: + * generic/tclStubInit.c: added an internal function TclObjBeingDeleted + to provide info as to the reason for the loss of an internal rep. [FR + 1512138] + + * generic/tclCompile.c: + * generic/tclHistory.c: + * generic/tclInt.h: + * generic/tclProc.c: made Tcl_RecordAndEvalObj not call "history" if + it has been redefined to an empty proc, in order to reduce the noise + when debugging [FR 1190441]. Moved TclCompileNoOp from tclProc.c to + tclCompile.c + +2006-09-28 Andreas Kupries + + * generic/tclPkg.c (CompareVersions): Bugfix. Check string lengths + * tests/pkg.test: before comparison. The shorter string is the smaller + number. Added testcases as well. Interestingly all existing test cases + for vcompare compared numbers of the same length with each other. [Bug + 1563836] + +2006-09-28 Miguel Sofer + + * generic/tclIO.c (Tcl_GetsObj): added two test'n'panic guards for + possible NULL derefs, [Bug 1566382] and coverity #33. + +2006-09-27 Don Porter + + * generic/tclExecute.c: Corrected error in INST_LSHIFT in the + * tests/expr.test: calculation done to determine whether a shift + in the (long int) type is possible. The calculation had literal value + "1" where it needed a value "1L" to compute the correct result. Error + detected via testing with the math::bigfloat package [Bug 1567222] + + * generic/tclPkg.c (CompareVersion): Flatten strcmp() results to + {-1, 0, 1} to match expectations of CompareVersion() callers. + +2006-09-27 Miguel Sofer + + * generic/regc_color.c (singleton): + * generic/regc_cvec.c (addmcce): + * generic/regcomp.c (compile, dovec): the static function addmcce does + nothing when called with two NULL pointers; the only call is by + compile with two NULL pointers (regcomp.c #includes regc_cvec.c). + Large parts (all?) the code for mcce (multi character collating + element) that we do not use is ifdef'ed out with the macro + REGEXP_MCCE_ENABLE. + This silences coverity bugs 7, 16, 80 + + * generic/regc_color.c (uncolorchain): + * generic/regc_nfa.c (freearc): changed tests and asserts to + equivalent formulation, designed to avoid an explicit comparison to + NULL and satisfy coverity that 6 and 9 are not bugs. + +2006-09-27 Andreas Kupries + + * tests/pkg.test: Added test for version comparison at the 32bit + boundary. [Bug 1563836] + + * generic/tclPkg.c: Rewrote CompareVersion to perform string + comparison instead of numeric. This breaks through the 32bit limit on + version numbers. See code for details (handling of leading zeros, + signs, etc.). un-CONSTed some arguments of CompareVersions, + RequirementSatisfied, and AllRequirementsSatisfied. The new compare + modifies the string (temporary string terminators). All callers use + heap-allocated ver-intreps, so we are good with that. [Bug 1563836] + +2006-09-27 Miguel Sofer + + * generic/tclFileName.c (TclGlob): added a panic for a call with + TCL_GLOBMODE_TAILS and pathPrefix==NULL. This would cause a segfault, + as found by coverity #26. + +2006-09-26 Kevin B. Kenny + + * doc/Encoding.3: Added covariant 'const' qualifier for the + * generic/tcl.decls: Tcl_EncodingType argument to + * generic/tclEncoding.c: Tcl_CreateEncoding. [Further TIP#27 work.] + * generic/tclDecls.h: Reran 'make genstubs'. + +2006-09-26 Pat Thoyts + + * win/makefile.vc: Additional compiler flags and amd64 support. + * win/nmakehlp.c: + * win/rules.vc: + +2006-09-26 Don Porter + + * generic/tcl.h: As 2006-09-22 commit from Donal K. Fellows + demonstrates, "#define NULL 0" is just wrong, and as a quotable chat + figure observed, "If NULL isn't defined, we're not using a C compiler" + Improper fallback definition of NULL removed. + +2006-09-25 Pat Thoyts + + * generic/tcl.h: More fixing which struct stat to refer to. + * generic/tclGetDate.y: Some casts from time_t to int required. + * generic/tclTimer.c: Tcl_Time structure members are longs. + * win/makefile.vc: Support for varying compiler options + * win/rules.vc: and build to platform-specific subdirs. + +2006-09-25 Andreas Kupries + + * generic/tclIO.c (Tcl_StackChannel): Fixed [Bug 1564642], aka + coverity #51. Extended loop condition, added checking for NULL to + prevent seg.fault. + +2006-09-25 Andreas Kupries + + * doc/package.n: Fixed nits reported by Daniel Steffen in the TIP#268 + changes. + +2006-09-25 Kevin B. Kenny + + * generic/tclNotify.c (Tcl_DeleteEvents): Simplified the code in hopes + of making the invariants clearer and proving to Coverity that the + event queue memory is managed correctly. + +2006-09-25 Donal K. Fellows + + * generic/tclNotify.c (Tcl_DeleteEvents): Make it clear what happens + when the event queue is mismanaged. [Bug 1564677], coverity bug #10. + +2006-09-24 Miguel Sofer + + * generic/tclParse.c (Tcl_ParseCommand): also return an error if + start==NULL and numBytes<0. This is coverity's bug #20 + + * generic/tclStringObj.c (STRING_SIZE): fix allocation for 0-length + strings. This is coverity's bugs #54-5 + +2006-09-22 Andreas Kupries + + * generic/tclInt.h: Moved TIP#268's field 'packagePrefer' to the end + of the structure, for better backward compatibility. + +2006-09-22 Andreas Kupries + + TIP#268 IMPLEMENTATION + + * generic/tclDecls.h: Regenerated from tcl.decls. + * generic/tclStubInit.c: + + * doc/PkgRequire.3: Documentation of extended API, extended testsuite. + * doc/package.n: + * tests/pkg.test: + + * generic/tcl.decls: Implementation. + * generic/tclBasic.c: + * generic/tclConfig.c: + * generic/tclInt.h: + * generic/tclPkg.c: + * generic/tclTest.c: + * generic/tclTomMathInterface.c: + * library/init.tcl: + * library/package.tcl: + * library/tm.tcl: + +2006-09-22 Donal K. Fellows + + * generic/tclThreadTest.c (TclCreateThread): Use NULL instead of 0 as + end-of-strings marker to Tcl_AppendResult; the difference matters on + 64-bit machines. [Bug 1562528] + +2006-09-21 Don Porter + + * generic/tclUtil.c: Dropped ParseInteger() routine. TclParseNumber + covers the task just fine. + +2006-09-19 Donal K. Fellows + + * generic/tclEvent.c (Tcl_VwaitObjCmd): Rewrite so that an exceeded + limit trapped in a vwait cannot cause a dangerous dangling trace. + +2006-09-19 Don Porter + + * generic/tclExecute.c (INST_EXPON): Native type overflow detection + * tests/expr.test: was completely broken. Falling back on use of + bignums for all non-trivial ** calculations until + native-type-constrained special cases can be done carefully and + correctly. [Bug 1561260] + +2006-09-15 Jeff Hobbs + + * library/http/http.tcl: Change " " -> "+" url encoding mapping + * library/http/pkgIndex.tcl: to " " -> "%20" as per RFC 3986. + * tests/http.test (http-5.1): bump http to 2.5.3 + * unix/Makefile.in: + * win/Makefile.in: + +2006-09-12 Andreas Kupries + + * unix/configure.in (HAVE_MTSAFE_GETHOST*): Modified to recognize + HP-UX 11.00 and beyond as having mt-safe implementations of the + gethost functions. + * unix/configure: Regenerated, using autoconf 2.59 + + * unix/tclUnixCompat.c (PadBuffer): Fixed bug in calculation of the + increment needed to align the pointer, and added documentation + explaining why the macro is implemented as it is. + +2006-09-11 Pat Thoyts + + * win/rules.vc: Updated to install http, tcltest and msgcat as + * win/makefile.vc: Tcl Modules (as per Makefile.in). + * win/makefile.vc: Added tommath_(super)class headers. + +2006-09-11 Andreas Kupries + + * unix/Makefile.in (install-libraries): Fixed typo tcltest 2.3.9 -> + 2.3.0. + +2006-09-11 Daniel Steffen + + * unix/tclUnixCompat.c: make compatLock static and only declare it + when it will actually be used; #ifdef parts of TSD that are not always + needed; adjust #ifdefs to cover all possible cases; fix whitespace. + +2006-09-11 Andreas Kupries + + * tests/msgcat.test: Bumped version in auxiliary files as well. + * doc/msgcat.n: + +2006-09-11 Kevin B. Kenny + + * unix/Makefile.in: Bumped msgcat version to 1.4.2 to be + * win/Makefile.in: consistent with dgp's commits of 2006-09-10. + +2006-09-11 Don Porter + + * library/msgcat/msgcat.tcl: Removed some unneeded [uplevel]s. + +2006-09-10 Don Porter + + * generic/tclExecute.c: Corrected INST_EXPON flaw that treated + * tests/expr.test: $x**1 as $x**3. [Bug 1555371] + + * doc/tcltest.n: Bump to version tcltest 2.3.0 to + * library/tcltest/pkgIndex.tcl: account for new "-verbose line" + * library/tcltest/tcltest.tcl: feature. + * unix/Makefile.in: + * win/Makefile.in: + * win/makefile.bc: + * win/makefile.vc: + + * library/msgcat/msgcat.tcl: Bump to version msgcat 1.4.2 to + * library/msgcat/pkgIndex.tcl: account for modifications. + +2006-09-10 Daniel Steffen + + * library/msgcat/msgcat.tcl (msgcat::Init): on Darwin, add fallback of + * tests/msgcat.test: default msgcat locale to + * unix/tclUnixInit.c (TclpSetVariables): current CFLocale + identifier if available (via private ::tcl::mac::locale global, set at + interp init when on Mac OS X 10.3 or later with CoreFoundation). + + * library/tcltest/tcltest.tcl: add 'line' verbose level: prints source + * doc/tcltest.n: file line information of failing tests. + + * macosx/Tcl.xcodeproj/project.pbxproj: add new tclUnixCompat.c file; + revise tests target to use new tcltest 'line' verbose level. + + * unix/configure.in: add descriptions to new AC_DEFINEs for MT-safe. + * unix/tcl.m4: add caching to new SC_TCL_* macros for MT-safe wrappers + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2006-09-08 Zoran Vasiljevic + + * unix/tclUnixCompat.c: Added fallback to gethostbyname() and + gethostbyaddr() if the implementation is known to be MT-safe + (currently for Darwin 6 or later only). + + * unix/configure.in: Assume gethostbyname() and gethostbyaddr() are + MT-safe starting with Darwin 6 (Mac OSX 10.2). + + * unix/configure: Regenerated with autoconf V2.59 + +2006-09-08 Andreas Kupries + + * unix/tclUnixCompat.c: Fixed conditions for CopyArray/CopyString, and + CopyHostent. Also fixed bad var names in TclpGetHostByName. + +2006-09-07 Zoran Vasiljevic + + * unix/tclUnixCompat.c: Added fallback to MT-unsafe library calls if + TCL_THREADS is not defined. + Fixed alignment of arrays copied by CopyArray() to be on the + sizeof(char *) boundary. + +2006-09-07 Zoran Vasiljevic + + * unix/tclUnixChan.c: Rewritten MT-safe wrappers to return ptrs to + * unix/tclUnixCompat.c: TSD storage making them all look like their + * unix/tclUnixFCmd.c: MT-unsafe pendants API-wise. + * unix/tclUnixPort.h: + * unix/tclUnixSock.c: + +2006-09-06 Zoran Vasiljevic + + * unix/tclUnixChan.c: Added TCL_THREADS ifdef'ed usage of MT-safe + * unix/tclUnixFCmd.c: calls like: getpwuid, getpwnam, getgrgid, + * unix/tclUnixSock.c: getgrnam, gethostbyname and gethostbyaddr. + * unix/tclUnixPort.h: See [Bug 999544] + * unix/Makefile.in: + * unix/configure.in: + * unix/tcl.m4: + * unix/configure: Regenerated. + + * unix/tclUnixCompat.c: New file containing MT-safe implementation of + some library calls. + +2006-09-04 Don Porter + + * generic/tclCompExpr.c: Removed much complexity that is no + longer needed. + + * tests/main.text (Tcl_Main-4.4): Test corrected to not be + timing sensitive to the Bug 1481986 fix. [Bug 1550858] + +2006-09-04 Jeff Hobbs + + * doc/package.n: correct package example + +2006-08-31 Don Porter + + * generic/tclCompExpr.c: Corrected flawed logic for disabling + the INST_TRY_CVT_TO_NUMERIC instruction at the end of an expression + when function arguments contain operators. [Bug 1541274] + + * tests/expr-old.test: The remaining failing tests reported in + * tests/expr.test: [Bug 1381715] are all new in Tcl 8.5, so + there's really no issue of compatibility with Tcl 8.4 result to deal + with. Fixed by updating tests to expect 8.5 results. + +2006-08-29 Don Porter + + * generic/tclParseExpr.c: Dropped the old expr parser. + +2006-08-30 Jeff Hobbs + + * generic/tclBasic.c (Tcl_CreateInterp): init iPtr->threadId + + * win/tclWinChan.c [Bug 819667] Improve logic for identifying COM + ports. + + * generic/tclIOGT.c (ExecuteCallback): + * generic/tclPkg.c (Tcl_PkgRequireEx): replace Tcl_GlobalEval(Obj) + with more efficient Tcl_Eval(Obj)Ex + + * unix/Makefile.in (valgrindshell): add valgrindshell target and + update default VALGRINDARGS. User can override, or add to it with + VALGRIND_OPTS env var. + + * generic/tclFileName.c (DoGlob): match incrs with decrs. + +2006-08-29 Don Porter + + * generic/tclParseExpr.c: Use the "parent" field of orphan + ExprNodes to store the closure of left pointers. This lets us avoid + repeated re-scanning leftward for the left boundary of subexpressions, + which in worst case led to near O(N^2) runtime. + +2006-08-29 Joe Mistachkin + + * unix/tclUnixInit.c: Fixed the issue (typo) that was causing + * unix/tclUnixThrd.c (TclpThreadGetStackSize): stack.test to fail on + FreeBSD (and possibly other Unix platforms). + +2006-08-29 Colin McCormack + + * generic/tclIOUtil.c: Added test for NULL return from + * generic/tclPathObj.c: Tcl_FSGetNormalizedPath which was causing + * unix/tclUnixFile.c: segv's per [Bug 1548263] + * win/tclWinFCmd.c: + * win/tclWinFile.c: + +2006-08-28 Kevin B. Kenny + + * library/tzdata/America/Havana: Regenerated from Olson's + * library/tzdata/America/Tegucigalpa: tzdata2006k. + * library/tzdata/Asia/Gaza: + +2006-08-28 Don Porter + + * generic/tclStringObj.c: Revised ObjPrintfVA to take care to + * generic/tclParseExpr.c: copy only whole characters when doing + %s formatting. This relieves callers of TclObjPrintf() and + TclFormatToErrorInfo() from needing to fix arguments to character + boundaries. Tcl_ParseExpr() simplified by taking advantage. [Bug + 1547786] + + * generic/tclStringObj.c: Corrected TclFormatObj's failure to + count up the number of arguments required by examining the format + string. [Bug 1547681] + +2006-08-27 Joe Mistachkin + + * generic/tclClock.c (ClockClicksObjCmd): Fix nested macro breakage + with TCL_MEM_DEBUG enabled. [Bug 1547662] + +2006-08-26 Miguel Sofer + + * doc/namespace.n: + * generic/tclNamesp.c: + * tests/upvar.test: bugfix, docs clarification and new tests for + [namespace upvar] as follow up to [Bug 1546833], reported by Will + Duquette. + +2006-08-24 Kevin B. Kenny + + * library/tzdata: Regenerated, including several new files, from + Olson's tzdata2006j. + * library/clock.tcl: + * tests/clock.test: Removed an early testing hack that allowed loading + 'registry' from the build tree rather than an installed one. This is a + workaround for [Bug 15232730], which remains open because it's a + symptom of a deeper underlying problem. + +2006-08-23 Don Porter + + * generic/tclParseExpr.c: Minimal collection of new tests + * tests/parseExpr.test: testing the error messages of the new + expr parser. Several bug fixes and code simplifications that appeared + during that effort. + +2006-08-21 Don Porter + + * generic/tclIOUtil.c: Revisions to complete the thread finalization + of the cwdPathPtr. [Bug 1536142] + + * generic/tclParseExpr.c: Revised mistaken call to + TclCheckBadOctal(), so both [expr 08] and [expr 08z] have same + additional info in error message. + + * tests/compExpr-old.test: Update existing tests to not fail with + * tests/compExpr.test: the new expr parser. + * tests/compile.test: + * tests/expr-old.test: + * tests/expr.test: + * tests/for.test: + * tests/if.test: + * tests/parseExpr.test: + * tests/while.test: + +2006-08-21 Donal K. Fellows + + * win/Makefile.in (gdb): Make this target work so that debugging an + msys build is possible. + +2006-08-21 Daniel Steffen + + * macosx/tclMacOSXNotify.c (Tcl_WaitForEvent): if the run loop is + already running (e.g. if Tcl_WaitForEvent was called recursively), + re-run it in a custom run loop mode containing only the source for the + notifier thread, otherwise wakeups from other sources added to the + common run loop modes might get lost. + + * unix/tclUnixNotfy.c (Tcl_WaitForEvent): on 64-bit Darwin, + pthread_cond_timedwait() appears to have a bug that causes it to wait + forever when passed an absolute time which has already been exceeded + by the system time; as a workaround, when given a very brief timeout, + just do a poll on that platform. [Bug 1457797] + + * generic/tclClock.c (ClockClicksObjCmd): add support for Darwin + * generic/tclCmdMZ.c (Tcl_TimeObjCmd): nanosecond resolution timer + * generic/tclInt.h: to [clock clicks] and [time] + * unix/configure.in (Darwin): when TCL_WIDE_CLICKS defined + * unix/tclUnixTime.c (TclpGetWideClicks, TclpWideClicksToNanoseconds): + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + + * unix/tclUnixPort.h (Darwin): override potentially faulty configure + detection of termios availability in all cases, since termios is known + to be present on all Mac OS X releases since 10.0. [Bug 497147] + +2006-08-18 Daniel Steffen + + * unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for + universal builds including x86_64, for 64-bit CoreFoundation on + Leopard and for use of -mmacosx-version-min instead of + MACOSX_DEPLOYMENT_TARGET + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + + * generic/tcl.h: add fixes for building on Leopard and + * unix/tclUnixPort.h: support for 64-bit CoreFoundation on Leopard + * macosx/tclMacOSXFCmd.c: + + * unix/tclUnixPort.h: on Darwin x86_64, disable use of vfork as it + causes execve to fail intermittently. (rdar://4685553) + + * generic/tclTomMath.h: on Darwin 64-bit, for now disable use of + 128-bit arithmetic through __attribute__ ((mode(TI))), as it leads to + link errors due to missing fallbacks. (rdar://4685527) + + * macosx/Tcl.xcodeproj/project.pbxproj: add x86_64 to universal build, + switch native release targets to use DWARF with dSYM, Xcode 3.0 + changes + * macosx/README: updates for x86_64 and Xcode 2.4. + + * macosx/Tcl.xcodeproj/default.pbxuser: add test suite target that + * macosx/Tcl.xcodeproj/project.pbxproj: runs the tcl test suite at + build time and shows clickable test suite errors in the GUI build + window. + + * tests/macOSXFCmd.test: fix use of deprecated resource fork paths. + + * unix/tclUnixInit.c (TclpInitLibraryPath): move code that is only + needed when TCL_LIBRARY is defined to run only in that case. + + * generic/tclLink.c (LinkTraceProc): fix 64-bit signed-with-unsigned + comparison warning from gcc4 -Wextra. + + * unix/tclUnixChan.c (TclUnixWaitForFile): with timeout < 0, if + select() returns early (e.g. due to a signal), call it again instead + of returning a timeout result. Fixes intermittent event-13.8 failures. + +2006-08-17 Don Porter + + * generic/tclCompile.c: Revised the new set of expression + * generic/tclParseExpr.c: parse error messages. + +2006-08-16 Don Porter + + * generic/tclParseExpr.c: Replace PrecedenceOf() function with + prec[] static array. + +2006-08-14 Donal K. Fellows + + * library/clock.tcl (::tcl::clock::add): Added missing braces to + clockval validation code. Pointed out on comp.lang.tcl. + +2006-08-11 Donal K. Fellows + + * generic/tclNamesp.c: Improvements in buffer management to make + namespace creation faster. Plus selected other minor improvements to + code quality. [Patch 1352382] + +2006-08-10 Donal K. Fellows + + Misc patches to make code more efficient. [Bug 1530474] (afredd) + * generic/*.c, macosx/tclMacOSXNotify.c, unix/tclUnixNotfy.c, + * win/tclWinThrd.c: Tidy up invokations of Tcl_Panic() to promote + string constant sharing and consistent style. + * generic/tclBasic.c (Tcl_CreateInterp): More efficient handling of + * generic/tclClock.c (TclClockInit): registration of commands not + in global namespace. + * generic/tclVar.c (Tcl_UnsetObjCmd): Remove unreachable clause. + +2006-08-09 Don Porter + + * generic/tclEncoding.c: Replace buffer copy in for loop with + call to memcpy(). Thanks to afredd. [Patch 1530262] + +2006-08-09 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LassignObjCmd): Make the wrong#args message + a bit more consistent with those used elsewhere. [Bug 1534628] + + * generic/tclDictObj.c (DictForCmd): Stop crash when attempting to + iterate over an invalid dictionary. [Bug 1531184] + + * doc/ParseCmd.3, doc/expr.n, doc/set.n, doc/subst.n, doc/switch.n: + * doc/tclvars.n: Ensure that uses of [expr] in documentation examples + are also good style (with braces) unless otherwise necessary. [Bug + 1526581] + +2006-08-03 Daniel Steffen + + * unix/tclUnixPipe.c (TclpCreateProcess): for USE_VFORK: ensure + standard channels are initialized before vfork() so that the child + doesn't potentially corrupt global state in the parent's address space + + * tests/compExpr-old.test: add 'oldExprParser' constraint to all tests + * tests/compExpr.test: that depend on the exact format of the + * tests/compile.test: error messages of the pre-2006-07-05 + * tests/expr-old.test: expression parser. The constraint is on by + * tests/expr.test: default (i.e those tests still fail), but + * tests/for.test: can be turned off by passing '-constraints + * tests/if.test: newExprParser' to tcltest, which will skip + * tests/parseExpr.test: the 196 failing tests in the testsuite that + * tests/while.test: are caused by the new expression parser + error messages. + +2006-07-31 Kevin B. Kenny + + * generic/tclClock.c (ConvertLocalToUTCUsingC): Corrected a regression + that caused dates before 1969 to be one day off in the :localtime time + zone if TZ is not set. [Bug 1531530] + +2006-07-30 Kevin B. Kenny + + * generic/tclClock.c (GetJulianDayFromEraYearMonthDay): Corrected + several errors in converting dates before the Common Era [Bug 1426279] + * library/clock.tcl: Corrected syntax errors in generated code for %EC + %Ey, and %W format groups [Bug 1505383]. Corrected a bug in cache + management for format strings containing [glob] metacharacters [Bug + 1494664]. Corrected several errors in formatting/scanning of years + prior to the Common Era, and added the missing %EE format group to + indicate the era. + * tools/makeTestCases.tcl: Added code to make sure that %U and %V + format groups are included in the tests. (The code depends on %U and + %V formatting working correctly when 'makeTestCases.tcl' is run, + rather than making a completely independent check.) Added tests for + [glob] metacharacters in strings. Added tests for years prior to the + Common Era. + * tests/clock.test: Rebuilt with new test cases for all the above. + +2006-07-30 Joe English + + * doc/AppInit.3: Fix typo [Bug 1496886] + +2006-07-26 Don Porter + + * generic/tclExecute.c: Corrected flawed overflow detection in + * tests/expr.test: INST_EXPON that caused [expr 2**64] to return + 0 instead of the same value as [expr 1<<64]. + +2006-07-24 Don Porter + + * win/tclWinSock.c: Correct un-initialized Tcl_DString. Thanks to + afredd. [Bug 1518166] + +2006-07-21 Miguel Sofer + + * generic/tclExecute.c: + * tests/execute.test (execute-9.1): dgp's fix for [Bug 1522803]. + +2006-07-20 Daniel Steffen + + * macosx/tclMacOSXNotify.c (Tcl_InitNotifier, Tcl_WaitForEvent): + create notifier thread lazily upon first call to Tcl_WaitForEvent() + rather than in Tcl_InitNotifier(). Allows calling exeve() in processes + where the event loop has not yet been run (Darwin's execve() fails in + processes with more than one thread), in particular allows embedders + to call fork() followed by execve(), previously the pthread_atfork() + child handler's call to Tcl_InitNotifier() would immediately recreate + the notifier thread in the child after a fork. + + * macosx/tclMacOSXFCmd.c (TclMacOSXCopyFileAttributes): add support + * macosx/tclMacOSXNotify.c (Tcl_InitNotifier): for weakly + * unix/tclUnixInit.c (Tcl_GetEncodingNameFromEnvironment): importing + symbols not available on OSX 10.2 or 10.3, enables binaires built on + later OSX versions to run on earlier ones. + * macosx/Tcl.xcodeproj/project.pbxproj: enable weak-linking; turn on + extra warnings. + * macosx/README: document how to enable weak-linking; cleanup. + * unix/tclUnixPort.h: add support for weak-linking; conditionalize + AvailabilityMacros.h inclusion; only disable realpath on 10.2 or + earlier when threads are enabled. + * unix/tclLoadDyld.c (TclpLoadMemoryGetBuffer): change runtime Darwin + * unix/tclUnixInit.c (TclpInitPlatform): release check to use + global initialized + once + * unix/tclUnixFCmd.c (DoRenameFile, TclpObjNormalizePath): add runtime + Darwin release check to determine if realpath is threadsafe. + * unix/configure.in: add check on Darwin for compiler support of weak + * unix/tcl.m4: import and for AvailabilityMacros.h header; move + Darwin specific checks & defines that are only relevant to the tcl + build out of tcl.m4; restrict framework option to Darwin; clean up + quoting and help messages. + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + + * generic/regc_locale.c (cclass): + * generic/tclExecute.c (TclExecuteByteCode): + * generic/tclIOCmd.c (Tcl_ExecObjCmd): + * generic/tclListObj.c (NewListIntRep): + * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj) + (FreeBignum, Tcl_SetBignumObj): + * generic/tclParseExpr.c (Tcl_ParseExpr): + * generic/tclStrToD.c (TclParseNumber): + * generic/tclStringObj.c (TclAppendFormattedObjs): + * unix/tclLoadDyld.c (TclpLoadMemory): + * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned + comparison and other warnings from gcc4 -Wextra. + +2006-07-13 Andreas Kupries + + * unix/tclUnixPort.h: Added the inclusion of . + The missing header caused the upcoming #if conditions to wrongly + exclude realpath, causing file normalize to ignore symbolic links in + the path. + +2006-07-11 Zoran Vasiljevic + + * generic/tclAsync.c: Made Tcl_AsyncDelete() more tolerant when called + after all thread TSD has been garbage-collected. + +2006-07-05 Don Porter + + * generic/tclParseExpr.c: Completely new expression parser that + builds a parse tree instead of operating with deep recursion. This + corrects reports of stack-blowing crashes parsing long expressions + [Bug 906201] and replaces a fundamentally O(N^2) algorithm with an + O(N) one [RFE 903765]. The new parser is better able to generate error + messages that clearly report both the nature and context of the syntax + error [Bugs 1029267, 1381715]. For now, the code for the old parser is + still present and can be activated with a "#define OLD_EXPR_PARSER + 1". This is for the sake of a clean implementation patch, and for ease + of benchmarking. The new parser is non-recursive, so much lighter in + stack consumption, but it does use more heap, so there may be cases + where parsing of long expressions that succeeded with the old parser + will lead to out of memory panics with the new one. There are still + more improvements possible on that point, though significant progress + may require changes to the Tcl_Token specifications documented for the + public Tcl_Parse*() routines. + ***POTENTIAL INCOMPATIBILITY*** for any callers that rely on the exact + (usually terrible) error messages generated by the old parser. This + includes a large number of tests in the test suite. + + * generic/tclInt.h: Replaced TclParseWhiteSpace() with + * generic/tclParse.c: TclParseAllWhiteSpace() which is what + * generic/tclParseExpr.c: all the callers really needed. + Breaking whitespace runs at newlines is useful only to the command + parsing function, and it can call the file scoped routine + ParseWhiteSpace() to do that. + + * tests/expr-old.test: Removed knownBug constraints that masked + * tests/expr.test: failures due to revised error messages. + * tests/parseExpr.test: + +2006-06-20 Don Porter + + * generic/tclIOUtil.c: Changed default configuration to + * generic/tclInt.decls: #undef USE_OBSOLETE_FS_HOOKS which disables + * generic/tclTest.c: access to the Tcl 8.3 internal routines for + hooking into filesystem operations. Everyone ought to have migrated to + Tcl_Filesystems by now. + ***POTENTIAL INCOMPATIBILITY*** for any code still stuck in the + pre-Tcl_Filesystem era. + + * generic/tclIntDecls.h: make genstubs + * generic/tclStubInit.c: + + * generic/tclStrToD.c: Removed dead code that permitted disabling of + recognition of the new 0b and 0o numeric formats. + + * generic/tclExecute.c: Removed dead code that implemented alternative + * generic/tclObj.c: design where numeric values did not + automatically narrow to the smallest Tcl_ObjType required to hold them + + * generic/tclCmdAH.c: Removed dead code that was old implementation + of [format]. + +2006-06-14 Daniel Steffen + + * unix/tclUnixPort.h (Darwin): support MAC_OS_X_VERSION_MAX_ALLOWED + define from AvailabilityMacros.h: override configure detection and + only use API available in the indicated OS version or earlier. + +2006-06-14 Donal K. Fellows + + * doc/format.n, doc/scan.n: Added examples for converting between + characters and their numeric interpretations following user prompting. + +2006-06-13 Donal K. Fellows + + * unix/tclLoadDl.c (TclpDlopen): Workaround for a compiler bug in Sun + Forte 6. [Bug 1503729] + +2006-06-06 Don Porter + + * doc/GetStdChan.3: Added recommendation that each call to + Tcl_SetStdChannel() be accompanied by a call to Tcl_RegisterChannel(). + +2006-06-05 Donal K. Fellows + + * doc/Alloc.3: Added documentation of promise that Tcl_Realloc(NULL,x) + is the same as Tcl_Alloc(x), as discussed in comp.lang.tcl. Also fixed + nonsense sentence to say something meaningful. + +2006-05-29 Jeff Hobbs + + * generic/tcl.h (Tcl_DecrRefCount): use if/else construct to allow + placement in unbraced outer if/else conditions. (jcw) + +2006-05-27 Daniel Steffen + + * macosx/tclMacOSXNotify.c: implemented pthread_atfork() handler that + * unix/tcl.m4 (Darwin): recreates CoreFoundation state and + notifier thread in the child after a fork(). Note that pthread_atfork + is available starting with Tiger only. Because vfork() is used by the + core on Darwin, [exec]/[open] are not affected by this fix, only + extensions or embedders that call fork() directly (such as TclX). + However, this only makes fork() safe from corefoundation tcl with + --disable-threads; as on all platforms, forked children may deadlock + in threaded tcl due to the potential for stale locked mutexes in the + child. [Patch 923072] + + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2006-05-24 Donal K. Fellows + + * unix/tcl.m4 (SC_CONFIG_SYSTEM): Fixed quoting of command script to + awk; it was a rarely used branch, but it was wrong. [Bug 1494160] + +2006-05-23 Donal K. Fellows + + * doc/chan.n, doc/refchan.n: Tighten up the documentation to follow a + slightly more consistent style with regard to argument capitalization. + +2006-05-13 Don Porter + + * generic/tclProc.c (ProcCompileProc): When a bump of the compile + epoch forces the re-compile of a proc body, take care not to overwrite + any Proc struct that may be referred to on the active call stack. Note + that the fix will not be effective for code that calls the private + routine TclProcCompileProc() directly. [Bug 1482718] + +2006-05-13 Daniel Steffen + + * generic/tclEvent.c (HandleBgErrors): fix leak. [Coverity issue 86] + +2006-05-05 Don Porter + + * generic/tclMain.c (Tcl_Main): Corrected flaw that required + * tests/main.test: (Tcl_Main-4.5): processing of one interactive + command before passing control to the loop routine registered with + Tcl_SetMainLoop(). [Bug 1481986] + +2006-05-04 Don Porter + + * README: Bump version number to 8.5a5 + * generic/tcl.h: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/README.binary: + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + + * generic/tclBasic.c (ExprSrandFunc): Restore acceptance of wide/big + * doc/mathfunc.n: integer values by srand(). [Bug 1480509] + +2006-04-26 Don Porter + + *** 8.5a4 TAGGED FOR RELEASE *** + + * changes: Updates for another RC. + + * generic/tclBinary.c: Revised the handling of the Q and q format + * generic/tclInt.h: specifiers for [binary] to account for the + * generic/tclStrToD.c: "middle endian" floating point format used in + Nokia N770. + +2006-04-25 Don Porter + + * doc/DoubleObj.3: More doc updates for TIP 237. + * doc/expr.n: + * doc/format.n: + * doc/mathfunc.n: + * doc/scan.n: + * doc/string.n: + + * generic/tclScan.c: [scan $s %u] is documented to accept only + * tests/scan.test: decimal formatted integers. Fixed to match. + +2006-04-19 Kevin B. Kenny + + * generic/tclStrToD.c: Added code to support the "middle endian" + floating point format used in the Nokia N770's software-based floating + point. Thanks to Bruce Johnson for reporting this bug, originally on + http://wiki.tcl.tk/15408. + * library/clock.tcl: Fixed a bug with Daylight Saving Time and Posix + time zone specifiers reported by Martin Lemburg in + http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/9a8b15a4dfc0b7a0 + (and not at SourceForge). + * tests/clock.test: Added test case for the above bug. + +2006-04-18 Donal K. Fellows + + * doc/IntObj.3: Minor review fixes, including better documentation of + the behaviour of Tcl_GetBignumAndClearObj. + +2006-04-17 Don Porter + + * doc/IntObj.3: Documentation changes to account for TIP 237 changes. + * doc/Object.3: [Bug 1446971] + +2006-04-12 Donal K. Fellows + + * generic/regc_locale.c (cclass): Redefined the meaning of [:print:] + to be exactly UNICODE letters, numbers, punctuation, symbols and + spaces (*not* whitespace). [Bug 1376892] + +2006-04-11 Don Porter + + * generic/tclTrace.c: Stop some interference between enter traces + * tests/trace.test: and enterstep traces. [Bug 1458266] + +2006-04-07 Don Porter + + * generic/tclPathObj.c: Yet another revised fix for the [Bug 1379287] + * tests/fileSystem.test: family of path normalization bugs. + +2006-04-06 Jeff Hobbs + + * generic/tclRegexp.c (FinalizeRegexp): full reset data to indicate + readiness for reinitialization. + +2006-04-06 Don Porter + + * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): It seems there + * tests/indexObj.test: are extensions that rely on the prior behavior + * doc/GetIndex.3: that the empty string cannot succeed as a + unique prefix matcher, so I'm restoring Donal Fellows's solution. + Added mention of this detail to the documentation. [Bug 1464039] + + * tests/compExpr-old.test: Updated testmathfunctions constraint + * tests/compExpr.test: to post-TIP-232 world. + * tests/expr-old.test: + * tests/expr.test: + * tests/info.test: + + * tests/indexObj.test: Corrected other test errors revealed by + * tests/upvar.test: testing outside the tcltest application. + + * generic/tclPathObj.c: Revised fix for the [Bug 1379287] family of + path normalization bugs. + +2006-04-06 Daniel Steffen + + * unix/tcl.m4: removed TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING + define on Darwin. [Bug 1457515] + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + +2006-04-05 Don Porter + + * win/tclWinInit.c: More careful calls to Tcl_DStringSetLength() + * win/tclWinSock.c: to avoid creating invalid DString states. Bump + * win/tclWinDde.c: to version 1.3.2. [RFE 1366195] + * library/dde/pkgIndex.tcl: + + * library/reg/pkgIndex.tcl: Bump to registry 1.2 because + * win/tclWinReg.c: Registry_Unload() is a new public routine + * win/Makefile.in: compared to the 1.1.* releases. + + * win/configure.in: Bump package version numbers. + * win/configure: autoconf 2.59 + +2006-04-05 Donal K. Fellows + + * generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Allow empty + strings to be matched by the Tcl_GetIndexFromObj machinery, in the + same manner as any other key. [Bug 1464039] + +2006-04-03 Andreas Kupries + + * generic/tclIO.c (ReadChars): Added check, panic and commentary to a + piece of code which relies on BUFFER_PADDING to create enough space at + the beginning of each buffer for the insertion of partial multibyte + data at the beginning of a buffer. Commentary explains why this code + is OK, and the panic is as a precaution if someone twiddled the + BUFFER_PADDING into uselessness. + + * generic/tclIO.c (ReadChars): Temporarily suppress the use of + TCL_ENCODING_END set when EOF was reached while the buffer we are + converting is not truly the last buffer in the queue. Together with + the Utf bug below it was possible to completely wreck the buffer data + structures, eventually crashing Tcl. [Bug 1462248] + + * generic/tclEncoding.c (UtfToUtfProc): Stop accessing memory beyond + the end of the input buffer when TCL_ENCODING_END is set and the last + bytes of the buffer start a multi-byte sequence. This bug contributed + to [Bug 1462248]. + +2006-03-30 Miguel Sofer + + * generic/tclExecute.c: remove unused var and silence gcc warning + +2006-03-29 Jeff Hobbs + + * win/Makefile.in: convert _NATIVE paths to use / to avoid ".\" + path-as-escape issue. + +2006-03-29 Don Porter + + * changes: Updates for another RC. + + * generic/tclPathObj.c: More fixes for path normalization when /../ + * tests/fileSystem.test: tries to go beyond root.[Bug 1379287] + + * generic/tclExecute.c: Revised INST_MOD implementation to do + calculations in native types as much as possible, moving to mp_ints + only when necessary. + +2006-03-28 Jeff Hobbs + + * win/tclWinPipe.c (TclpCreateProcess): change panics to Tcl errors + and do proper refcounting of noe objPtr. [Bug 1194429] + + * unix/tcl.m4, win/tcl.m4: []-quote AC_DEFUN functions. + +2006-03-28 Daniel Steffen + + * macosx/Tcl.xcode/default.pbxuser: add '-singleproc 1' cli arg to + * macosx/Tcl.xcodeproj/default.pbxuser: tcltest to ease test debugging + + * macosx/Tcl.xcode/project.pbxproj: removed $prefix/share from + * macosx/Tcl.xcodeproj/project.pbxproj: TCL_PACKAGE_PATH as per change + to unix/configure.in of 2006-03-13. + + * unix/tclUnixFCmd.c (TclpObjNormalizePath): deal with *BSD/Darwin + realpath() converting relative paths into absolute paths [Bug 1064247] + +2006-03-28 Vince Darley + + * generic/tclIOUtil.c: fix to nativeFilesystemRecord comparisons + (lesser part of [Bug 1064247]) + +2006-03-27 Pat Thoyts + + * win/tclWinTest.c: Fixes for [Bug 1456373] (mingw-gcc issue) + +2006-03-27 Andreas Kupries + + * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made it the + * generic/tcl.h: version where the "truncateProc" is defined at, + * generic/tclIO.c: and moved all channel drivers of Tcl to v5. + * generic/tclIOGT.c, generic/tclIORChan.c, unix/tclUnixChan.c: + * unix/tclUnixPipe.c, win/tclWinChan.c, win/tclWinConsole.c: + * win/tclWinPipe.c, win/tclWinSerial.c, win/tclWinSock.c: + +2006-03-27 Don Porter + + * generic/tclExecute.c: Merge INST_MOD computation in with the + INST_?SHIFT instructions, which also operate only on two integral + values. Also corrected flaw that made INST_BITNOT of wide values + require mp_int calculations. Also corrected type that missed optimized + handling of the tclBooleanType by the TclGetBooleanFromObj macro. + + * changes: Updates for another RC. + +2006-03-25 Don Porter + + * generic/tclExecute.c: Corrections to INST_EXPON detection of + overflow to use mp_int calculations. + +2006-03-24 Kevin B. Kenny + + * generic/tclExecute.c (TclExecuteByteCode): Added a couple of missing + casts to 'int' that were affecting compilablity on VC6. + +2006-03-24 Don Porter + + * generic/tclEncoding.c: Reverted latest change [Bug 506653] since it + reportedly killed test performance on Windows. + + * generic/tclExecute.c: Revised INST_EXPON implementation to do + calculations in native types as much as possible, moving to mp_ints + only when necessary. + +2006-03-23 Don Porter + + * generic/tclExecute.c: Merged INST_EXPON handling in with the other + binary operators that operate on all number types (INST_ADD, etc.). + + * tests/env.test: With case preserved (see 2006-03-21 commit) be sure + to do case-insensitive filtering. [Bug 1457065] + +2006-03-23 Reinhard Max + + * unix/tcl.spec: Cleaned up and completed the spec file. An RPM can + now be built from the tcl source distribution with "rpmbuild -tb + " + +2006-03-22 Reinhard Max + + * tests/stack.test: Run the stack tests in subshells, so that they are + reported as failed tests rather than bugs in the test suite if the + recursion causes a segfault. + +2006-03-21 Don Porter + + * changes: Updates for another RC. + + * generic/tclStrToD.c: One of the branches of AccumulateDecimalDigit + * tests/parseExpr.test: did not. [Bug 1451233] + + * tests/env.test: Preserve case of saved env vars. [Bug 1409272] + +2006-03-21 Daniel Steffen + + * generic/tclInt.decls: implement globbing for HFS creator & type + * macosx/tclMacOSXFCmd.c:codes and 'hidden' flag, as documented in + * tests/macOSXFCmd.test: glob.n; objectified OSType handling in [glob] + * unix/tclUnixFile.c: and [file attributes]; fix globbing for + hidden files with pattern==NULL arg. [Bug 823329] + * generic/tclIntPlatDecls.h: + * generic/tclStubInit.c: make genstubs + +2006-03-20 Andreas Kupries + + * win/Makefile.in (install-libraries): Generate tcl8/8.4 directory + under Windows as well (cygwin Makefile). Related entry: 2006-03-07, + dgp. This moved the installation of http from 8.2 to 8.4, partially. A + fix of the required directory creation was done for unix on Mar 10, + without entry in the Changelog. This entry is for the fix of the + directory creation under Windows. + + * unix/installManPage: There is always one even more broken "sed". + Moved the # comment starting character in the sed script to the + beginning of their respective lines. The AIX sed will not recognize + them as comments otherwise :( The actual text stays indented for + better association with the commands they belong to. + +2006-03-20 Donal K. Fellows + + * tests/cmdAH.test, tests/fCmd.test, tests/unixFCmd.test: + * tests/winFCmd.test: Cleanup of some test constraint handling, and a + few other minor issues. + +2006-03-18 Vince Darley + + * generic/tclFileName.c: + * doc/FileSystem.3: + * tests/fileName.test: Fix to [Bug 1084705] so that 'glob -nocomplain' + finally agrees with its documentation and doesn't swallow genuine + errors. + + ***POTENTIAL INCOMPATIBILITY*** for scripts that assumed '-nocomplain' + removes the need for 'catch' to deal with non-understood path names. + + Small optimisation to implementation of pattern==NULL case of TclGlob, + and clarification to the documentation. [Tclvfs bug 1405317] + +2006-03-18 Vince Darley + + * tests/fCmd.test: added knownBug test case for [Bug 1394972] + + * tests/winFCmd.test: + * tests/tcltest.test: corrected tests to better account for behaviour + of writable/non-writable directories on Windows 2000/XP. This, with + the previous patches, closes [Bug 1193497] + +2006-03-17 Andreas Kupries + + * doc/chan.n: Updated with documentation for the commands 'chan + create' and 'chan postevent' (TIP #219). + + * doc/refchan.n: New file. Documentation of the command handler API + for reflected channels (TIP #219). + +2006-03-17 Joe Mistachkin + + * unix/tclUnixPort.h: Include pthread.h prior to pthread_np.h [Bug + 1444692] + + * win/tclWinTest.c: Corrected typo of 'initializeMutex' that prevented + successful compilation. + +2006-03-16 Andreas Kupries + + * doc/open.n: Documented the changed behaviour of 'a'ppend mode. + + * tests/io.test (io-43.1 io-44.[1234]): Rewritten to be self-contained + with regard to setup and cleanup. [Bug 681793] + + * generic/tclIOUtil.c (TclGetOpenMode): Added the flag O_APPEND to the + list of POSIX modes used when opening a file for 'a'ppend. This + enables the proper automatic seek-to-end-on-write by the OS. See [Bug + 680143] for longer discussion. + + * tests/ioCmd.test (iocmd-13.7.*): Extended the testsuite to check the + new handling of 'a'. + +2006-03-15 Andreas Kupries + + * tests/socket.test: Extended the timeout in socket-11.11 from 10 to + 40 seconds to allow for really slow machines. Also extended + actual/expected results with value of variable 'done' to make it + clearer when a test fails due to a timeout. [Bug 792159] + +2006-03-15 Vince Darley + + * win/fCmd.test: add proper test constraints so the new tests don't + run on Unix. + +2006-03-14 Andreas Kupries + + * generic/tclPipe.c (TclCreatePipeline): Modified the processing of + pipebars to fail if the last bar is followed only by redirections. + [Bug 768659] + +2006-03-14 Andreas Kupries + + * doc/fconfigure.n: Clarified that -translation is binary is reported + as lf when queried, because it is identical to lf, except for the + special additional behaviour when setting it. [Bug 666770] + +2006-03-14 Andreas Kupries + + * doc/clock.n: Removed double-quotes around section title NAME; not + needed. + * unix/installManpage: Reverted part to handle double-quotes in + section NAME, chokes older sed installations. + +2006-03-14 Andreas Kupries + + * library/tm.tcl (::tcl::tm::Defaults): Fixed handling of environment + variable TCLX.y_TM_PATH, bad variable reference. Thanks to Julian + Noble. [Bug 1448251] + +2006-03-14 Vince Darley + + * win/tclWinFile.c: updated patch to deal with 'file writable' issues + on Windows XP/2000. + * generic/tclTest.c: + * unix/tclUnixTest.c: + * win/tclWinTest.c: + * tests/fCmd.test: updated test suite to deal with correct permissions + setting and differences between XP/2000 and 95/98 3 tests still fail; + to be dealt with shortly + +2006-03-13 Don Porter + + * generic/tclEncoding.c: Report error when an escape encoding is + missing one of its sub-encodings. [Bug 506653] + + * unix/configure.in: Revert change from 2005-07-26 that sometimes + * unix/configure: added $prefix/share to the tcl_pkgPath. See + [Patch 1231015]. autoconf-2.59. + +2006-03-10 Miguel Sofer + + * generic/tclProc.c (ObjInterpProcEx): + * tests/apply.test (apply-5.1): Fix [apply] error messages so that + they quote the lambda expression. [Bug 1447355] + +2006-03-10 Zoran Vasiljevic + + -- Summary of changes fixing [Bug 1437595] -- + + * generic/tclEvent.c: Cosmetic touches and identation + * generic/tclInt.h: Added TclpFinalizeSockets() call. + + * generic/tclIO.c: Calls TclpFinalizeSockets() as part of the + TclFinalizeIOSubsystem(). + + * unix/tclUnixSock.c: Added no-op TclpFinalizeSockets(). + + * win/tclWinPipe.c, win/tclWinSock.c: Finalization of sockets/pipes is + now solely done in TclpFinalizeSockets() and TclpFinalizePipes() and + not over the thread-exit handler, because the order of actions the Tcl + generic core will impose may result in cores/hangs if the thread exit + handler tears down corresponding subsystem(s) too early. + +2006-03-10 Vince Darley + + * win/tclWinFile.c: previous patch breaks tests, so removed. + +2006-03-09 Vince Darley + + * win/tclWinFile.c: fix to 'file writable' in certain XP directories. + Thanks to fvogel and jfg. [Patch 1344540] Modified patch to make use + of existing use of getSecurityProc. + +2006-03-08 Don Porter + + * generic/tclExecute.c: Complete missing bit of TIP 215 implementation + * tests/incr.test: + +2006-03-07 Joe English + + * unix/tcl.m4: Set SHLIB_LD_FLAGS='${LIBS}' on NetBSD, as per the + other *BSD variants. [Bug 1334613] + * unix/configure: Regenerated. + +2006-03-07 Don Porter + + * changes: Update in prep. for 8.5a4 release. + + * unix/Makefile.in: Package http 2.5.2 requires Tcl 8.4, so the + * win/Makefile.in: *.tm installation has to be placed in an "8.4" + directory, not an "8.2" directory. + +2006-03-06 Don Porter + + * generic/tclBasic.c: Revised handling of TCL_EVAL_* flags to + * tests/parse.test: simplify TclEvalObjvInternal and to correct + the auto-loading of alias targets (parse-8.12). [Bug 1444291] + +2006-03-03 Don Porter + + * generic/tclPathObj.c: Revised yesterday's fix for [Bug 1379287] to + work on Windows. + + * generic/tclObj.c: Compatibility support for existing code that + calls Tcl_GetObjType("boolean"). + +2006-03-02 Don Porter + + * generic/tclPathObj.c: Fix for failed normalization of paths + * tests/fileSystem.test: with /../ that lead back to the root + of the filesystem, like /foo/.. [Bug 1379287] + +2006-03-01 Reinhard Max + + * unix/installManPage: Fix the script for manpages that have quotes + around the .SH arguments, as doctools produces them. [Bug 1292145] + Some minor cleanups and improvements. + +2006-02-28 Don Porter + + * generic/tclBasic.c: Corrections to be sure that TCL_EVAL_GLOBAL + * tests/namespace.test: evaluations act the same as [uplevel #0] + * tests/parse.test: evaluations, even when execution traces or + * tests/trace.test: invocations of [::unknown] are present. [Bug + 1439836] + +2006-02-22 Don Porter + + * generic/tclBasic.c: Corrected a few bugs in how [namespace + * tests/namespace.test: unknown] interacts with TCL_EVAL_* flags. + [Patch 958222] + +2006-02-17 Don Porter + + * generic/tclIORChan.c: Revised error message generation and handling + * tests/ioCmd.test: of exceptional return codes in the channel + reflection layer. [Bug 1372348] + +2006-02-16 Don Porter + + * generic/tclIndexObj.c: Disallow the "ambiguous" error message + * tests/indexObj.test: when TCL_EXACT matching is requested. + * tests/ioCmd.test: + +2006-02-15 Don Porter + + * generic/tclIO.c: Made several routines tolerant of + * generic/tclIORChan.c: interp == NULL arguments. [Bug 1380662] + * generic/tclIOUtil.c: + +2006-02-09 Don Porter + + TIP#215 IMPLEMENTATION + + * doc/incr.n: Revised [incr] to auto-initialize when varName + * generic/tclExecute.c: argument is unset. [Patch 1413115] + * generic/tclVar.c: + * tests/compile.test: + * tests/incr-old.test: + * tests/incr.test: + * tests/set.test: + + * tests/main.test (Tcl_Main-6.7): Improved robustness of + command auto-completion test. [Bug 1422736] + +2006-02-08 Donal K. Fellows + + * doc/Encoding.3, doc/encoding.n: Updates due to review at request of + Don Porter. Mostly minor changes. + +2006-02-08 Don Porter + + TIP#258 IMPLEMENTATION + + * doc/Encoding.3: New subcommand [encoding dirs]. + * doc/encoding.n: New routine Tcl_GetEncodingNameFromEnvironment + * generic/tcl.decls: Made public: + * generic/tclBasic.c: TclGetEncodingFromObj + * generic/tclCmdAH.c: -> Tcl_GetEncodingFromObj + * generic/tclEncoding.c:TclGetEncodingSearchPath + * generic/tclInt.decls: -> Tcl_GetEncodingSearchPath + * generic/tclInt.h: TclSetEncodingSearchPath + * generic/tclTest.c: -> Tcl_SetEncodingSearchPath + * library/init.tcl: Removed commands: + * tests/cmdAH.test: [tcl::unsupported::EncodingDirs] + * tests/encoding.test: [testencoding path] (Tcltest) + * unix/tclUnixInit.c: [Patch 1413934] + * win/tclWinInit.c: + + * generic/tclDecls.h: make genstubs + * generic/tclIntDecls.h: + * generic/tclStubInit.c: + +2006-02-01 Miguel Sofer + + * generic/tclProc.c: minor improvements to [apply] + * tests/apply.test: new tests; apply-5.1 currently fails to indicate + missing work in error reporting + +2006-02-01 Don Porter + + TIP#194 IMPLEMENTATION + + * doc/apply.n: (New file) New command [apply]. [Patch 944803] + * doc/uplevel.n: + * generic/tclBasic.c: + * generic/tclInt.h: + * generic/tclProc.c: + * tests/apply.test: (New file) + * tests/proc-old.test: + * tests/proc.test: + + TIP#181 IMPLEMENTATION + + * doc/Namespace.3: New command [namespace unknown]. New public C + * doc/namespace.n: routines Tcl_(Get|Set)NamespaceUnknownHandler. + * doc/unknown.n: [Patch 958222] + * generic/tcl.decls: + * generic/tclBasic.c: + * generic/tclInt.h: + * generic/tclNamesp.c: + * tests/namespace.test: + + * generic/tclDecls.h: make genstubs + * generic/tclStubInit.c: + + TIP#250 IMPLEMENTATION + + * doc/namespace.n: New command [namespace upvar]. [Patch 1275435] + * generic/tclInt.h: + * generic/tclNamesp.c: + * generic/tclVar.c: + * tests/namespace.test: + * tests/upvar.test: + +2006-01-26 Donal K. Fellows + + * doc/dict.n: Fixed silly bug in example. Thanks to Heiner Marxen + for catching this! [Bug 1415725] + +2006-01-26 Donal K. Fellows + + * unix/tclUnixChan.c (TclpOpenFileChannel): Tidy up and comment the + mess to do with setting up serial channels. This (deliberately) breaks + a broken FreeBSD port, indicates what we're really doing, and reduces + the amount of conditional compilation sections for better maintenance. + +2006-01-25 Donal K. Fellows + + * unix/tclUnixInit.c (TclpInitPlatform): Improved conditions on when + to update the FP rounding mode on FreeBSD, taken from FreeBSD port. + +2006-01-23 Donal K. Fellows + + * tests/string.test (string-12.21): Added test for [Bug 1410553] based + on original bug report. + +2006-01-23 Miguel Sofer + + * generic/tclStringObj.c: fixed incorrect handling of internal rep in + Tcl_GetRange. Thanks to twylite and Peter Spjuth. [Bug 1410553] + + * generic/tclProc.c: fixed args handling for precompiled bodies [Bug + 1412695]; thanks to Uwe Traum. + +2006-01-16 Reinhard Max + + * generic/tclPipe.c (FileForRedirect): Prevent nameString from being + freed without having been initialized. + * tests/exec.test: Added a test for the above. + +2006-01-12 Zoran Vasiljevic + + * generic/tclPathObj.c (Tcl_FSGetInternalRep): backported patch from + core-8-4-branch. A freed pointer has been overwritten causing all + sorts of coredumps. + +2006-01-12 Vince Darley + + * win/tclWinFile.c: fix to sharing violation [Bug 1366227] + +2006-01-11 Don Porter + + * generic/tclBasic.c: Moved Tcl_LogCommandInfo from tclBasic.c to + * generic/tclNamesp.c: tclNamesp.c to get access to identifier with + * tests/error.test (error-7.0): file scope. Added check for traces on + ::errorInfo, and when present fall back to contruction of the stack + trace in the variable so that write trace notification timings are + compatible with earlier Tcl releases. This reduces, but does not + completely eliminate the ***POTENTIAL INCOMPATIBILITY*** created by + the 2004-10-15 commit. [Bug 1397843] + +2006-01-10 Daniel Steffen + + * unix/configure: add caching, use AC_CACHE_CHECK instead of + * unix/configure.in: AC_CACHE_VAL where possible, consistent message + * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes + and gratuitous formatting differences, fix SC_CONFIG_MANPAGES with + default argument, Darwin improvements to SC_LOAD_*CONFIG. + +2006-01-09 Don Porter + + * generic/tclNamesp.c (NamespaceInscopeCmd): [namespace inscope] + * tests/namespace.test: commands were not reported by [info level]. + [Bug 1400572] + +2006-01-09 Donal K. Fellows + + * generic/tclTrace.c: Stop exporting the guts of the trace command; + nothing outside this file needs to see it. [Bug 971336] + +2006-01-05 Donal K. Fellows + + * unix/tcl.m4 (TCL_CONFIG_SYSTEM): Factor out the code to determine + the operating system version number, as it was replicated in several + places. + +2006-01-04 David Gravereaux + + * win/tclAppInit.c: WIN32 native console signal handler removed. This + was found to be interfering with TWAPI extension one. IMO, special + services such as signal handlers should best be done with extensions + to the core after discussions on c.l.t. about Roy Terry's tclsh + children of a real windows service shell. + + ****************************************************************** + *** CHANGELOG ENTRIES FOR 2005 IN "ChangeLog.2005" *** + *** CHANGELOG ENTRIES FOR 2004 IN "ChangeLog.2004" *** + *** CHANGELOG ENTRIES FOR 2003 IN "ChangeLog.2003" *** + *** CHANGELOG ENTRIES FOR 2002 IN "ChangeLog.2002" *** + *** CHANGELOG ENTRIES FOR 2001 IN "ChangeLog.2001" *** + *** CHANGELOG ENTRIES FOR 2000 IN "ChangeLog.2000" *** + *** CHANGELOG ENTRIES FOR 1999 AND EARLIER IN "ChangeLog.1999" *** + ****************************************************************** -- cgit v0.12 From dc5e0c1a99d04f059e8399531b03ebe9654edd8f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 25 Aug 2008 13:22:01 +0000 Subject: * generic/tclBasic.c (NRInterpCoroutine): store the caller's eePtr, stop assuming the coroutine is invoked from the same execEnv where it was created. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd14c5e..8d7119e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-23 Miguel Sofer + + * generic/tclBasic.c (NRInterpCoroutine): store the caller's + eePtr, stop assuming the coroutine is invoked from the same + execEnv where it was created. + 2008-08-24 Donal K. Fellows * generic/tclCmdAH.c (TclNRForeachCmd): Converted the [foreach] diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 68b32bb..a710857 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.363 2008/08/24 14:38:08 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.364 2008/08/25 13:22:04 msofer Exp $ */ #include "tclInt.h" @@ -8260,7 +8260,6 @@ NRCoroutineExitCallback( NRE_ASSERT(TOP_CB(interp) == NULL); NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); NRE_ASSERT(!COR_IS_SUSPENDED(corPtr)); - NRE_ASSERT(TOP_CB(interp) == NULL); NRE_ASSERT((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineCallerCallback) || ((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineFirstCallback) && (corPtr->callerEEPtr->callbackPtr->nextPtr->procPtr == NRCoroutineCallerCallback))); @@ -8326,6 +8325,7 @@ NRInterpCoroutine( TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); + corPtr->callerEEPtr = iPtr->execEnvPtr; iPtr->execEnvPtr = corPtr->eePtr; return TclExecuteByteCode(interp, NULL); } -- cgit v0.12 From 15df1bf8a56a5077d263e50e009536d98d13ad19 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 26 Aug 2008 22:36:52 +0000 Subject: * generic/tclBasic.c (InfoCoroutine): * tests/unsupported.test: new command that returns the FQN of the currently executing coroutine. Lives as infoCoroutine under unsupported, but is designed to become a subcommand of [info] --- ChangeLog | 7 +++++++ generic/tclBasic.c | 33 ++++++++++++++++++++++++++++++++- tests/unsupported.test | 24 +++++++++++++++++++++++- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d7119e..2ea86ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-26 Miguel Sofer + + * generic/tclBasic.c (InfoCoroutine): + * tests/unsupported.test: new command that returns the + FQN of the currently executing coroutine. Lives as infoCoroutine + under unsupported, but is designed to become a subcommand of [info] + 2008-08-23 Miguel Sofer * generic/tclBasic.c (NRInterpCoroutine): store the caller's diff --git a/generic/tclBasic.c b/generic/tclBasic.c index a710857..68700c8 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.364 2008/08/25 13:22:04 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.365 2008/08/26 22:37:02 msofer Exp $ */ #include "tclInt.h" @@ -140,6 +140,9 @@ static Tcl_NRPostProc NRRunObjProc; static Tcl_NRPostProc AtProcExitCleanup; static Tcl_NRPostProc NRAtProcExitEval; +static int InfoCoroutineCmd(ClientData dummy, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); + /* * The following structure define the commands in the Tcl core. */ @@ -792,6 +795,8 @@ Tcl_CreateInterp(void) /*objProc*/ NULL, TclNRCoroutineObjCmd, NULL, NULL); Tcl_NRCreateCommand(interp, "::tcl::unsupported::yield", /*objProc*/ NULL, TclNRYieldObjCmd, NULL, NULL); + Tcl_NRCreateCommand(interp, "::tcl::unsupported::infoCoroutine", + /*objProc*/ NULL, InfoCoroutineCmd, NULL, NULL); #ifdef USE_DTRACE /* @@ -8459,6 +8464,32 @@ TclNRCoroutineObjCmd( return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); } + +/* + * This belongs in the [info] ensemble later on + */ + +static int +InfoCoroutineCmd( + ClientData dummy, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + CoroutineData *corPtr = ((Interp *)interp)->execEnvPtr->corPtr; + + if (corPtr) { + Tcl_Command cmd = (Tcl_Command) corPtr->cmdPtr; + Tcl_Obj *namePtr; + + TclNewObj(namePtr); + Tcl_GetCommandFullName(interp, cmd, namePtr); + Tcl_SetObjResult(interp, namePtr); + } + return TCL_OK; +} + + /* * Local Variables: diff --git a/tests/unsupported.test b/tests/unsupported.test index 94242fa..0267c58 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.6 2008/08/22 18:27:27 dgp Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.7 2008/08/26 22:37:05 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -746,6 +746,28 @@ test unsupported-C.3.2 {info frame computation} -constraints {coroutine} \ rename b {} } -result 1 +test unsupported-C.3.3 {info coroutine} -constraints {coroutine} \ +-setup { + proc a {} {infoCoroutine} + proc b {} a +} -body { + b +} -cleanup { + rename a {} + rename b {} +} -result {} + +test unsupported-C.3.4 {info coroutine} -constraints {coroutine} \ +-setup { + proc a {} {infoCoroutine} + proc b {} a +} -body { + coroutine foo b +} -cleanup { + rename a {} + rename b {} +} -result ::foo + # cleanup ::tcltest::cleanupTests -- cgit v0.12 From 2eb4084b98e69b63c340a30d844e135d3bd71427 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 27 Aug 2008 12:47:24 +0000 Subject: Added cross references to manual pages that discuss specific variables created by Tcl. --- ChangeLog | 5 +++++ doc/library.n | 4 ++-- doc/tclvars.n | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 60 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ea86ac..334593c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-27 Donal K. Fellows + + * doc/tclvars.n, doc/library.n: Ensured that these two manual pages + properly cross-reference each other. Issue reported on Tcler's Chat. + 2008-08-26 Miguel Sofer * generic/tclBasic.c (InfoCoroutine): diff --git a/doc/library.n b/doc/library.n index 7f75e67..9a9f47e 100644 --- a/doc/library.n +++ b/doc/library.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: library.n,v 1.22 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: library.n,v 1.23 2008/08/27 12:47:26 dkf Exp $ .so man.macros .TH library n "8.0" Tcl "Tcl Built-In Commands" .BS @@ -294,6 +294,6 @@ considered to be a word character. On Windows platforms, words are comprised of any character that is not a space, tab, or newline. Under Unix, words are comprised of numbers, letters or underscores. .SH "SEE ALSO" -info(n), re_syntax(n) +info(n), re_syntax(n), tclvars(n) .SH KEYWORDS auto-exec, auto-load, library, unknown, word, whitespace diff --git a/doc/tclvars.n b/doc/tclvars.n index 5d51f89..fffa786 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.36 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.37 2008/08/27 12:47:27 dkf Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" @@ -20,6 +20,25 @@ The following global variables are created and managed automatically by the Tcl library. Except where noted below, these variables should normally be treated as read-only by application-specific code and by users. .TP +\fBauto_path\fR +. +If set, then it must contain a valid Tcl list giving directories to +search during auto-load operations (including for package index +files when using the default \fBpackage unknown\fR handler). +This variable is initialized during startup to contain, in order: +the directories listed in the TCLLIBPATH environment variable, +the directory named by the $tcl_library variable, +the parent directory of $tcl_library, +the directories listed in the $tcl_pkgPath variable. +Additional locations to look for files and package indices should +normally be added to this variable using \fBlappend\fR. +.RS +.PP +Additional variables relating to package management exist. More +details are listed in the \fBVARIABLES\fR section of the \fBlibrary\fR +manual page. +.RE +.TP \fBenv\fR . This variable is maintained by Tcl as an array @@ -50,6 +69,38 @@ Tcl are left unmodified. Setting an env array variable to blank is the same as unsetting it as this is the behavior of the underlying Windows OS. It should be noted that relying on an existing and empty environment variable will not work on Windows and is discouraged for cross-platform usage. +.PP +The following elements of \fBenv\fR are special to Tcl: +.TP +\fBenv(HOME)\fR +. +This environment variable, if set, gives the location of the directory +considered to be the current user's home directory, and to which a +call of \fBcd\fR without arguments or with just +.QW ~ +as an argument will change into. Most platforms set this correctly by +default; it does not normally need to be set by user code. +.TP +\fBenv(TCL_LIBRARY)\fR +. +If set, then it specifies the location of the directory containing +library scripts (the value of this variable will be +assigned to the \fBtcl_library\fR variable and therefore returned by +the command \fBinfo library\fR). If this variable is not set then +a default value is used. +.RS +.PP +Note that this environment variable should \fInot\fR normally be set. +.RE +.TP +\fBenv(TCLLIBPATH)\fR +. +If set, then it must contain a valid Tcl list giving directories to +search during auto-load operations. Directories must be specified in +Tcl format, using +.QW / +as the path separator, regardless of platform. +This variable is only used when initializing the \fBauto_path\fR variable. .RE .TP \fBerrorCode\fR @@ -435,6 +486,6 @@ variable: If set, contains the user-supplied geometry specification to use for the main Tk window. .SH "SEE ALSO" -eval(n), tclsh(1), wish(1) +eval(n), library(n), tclsh(1), wish(1) .SH KEYWORDS arithmetic, bytecode, compiler, error, environment, POSIX, precision, subprocess, variables -- cgit v0.12 From d57c4553fbc59a63d396e9226a0fb2445f6d57ab Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 27 Aug 2008 20:29:48 +0000 Subject: typo --- doc/RegConfig.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/RegConfig.3 b/doc/RegConfig.3 index 83cc59c..51d4df2 100644 --- a/doc/RegConfig.3 +++ b/doc/RegConfig.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: RegConfig.3,v 1.9 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: RegConfig.3,v 1.10 2008/08/27 20:29:48 dgp Exp $ .so man.macros .TH Tcl_RegisterConfig 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -109,4 +109,4 @@ typedef struct Tcl_Config { .\" No cross references yet. .\" .SH "SEE ALSO" .SH KEYWORDS -embedding, configuration, bianry library +embedding, configuration, binary library -- cgit v0.12 From abfbb5817007d6610c0cc7352f1d2efcffdda1bc Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 28 Aug 2008 16:24:16 +0000 Subject: * README: Bump version number to 8.6a3 * generic/tcl.h: * library/init.tcl: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/configure.in: * unix/configure: autoconf-2.59 * win/configure: --- ChangeLog | 13 +++++++++++++ README | 4 ++-- generic/tcl.h | 6 +++--- library/init.tcl | 4 ++-- tools/tcl.wse.in | 2 +- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tcl.spec | 4 ++-- win/configure | 2 +- win/configure.in | 4 ++-- 10 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 334593c..4363bb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-08-28 Don Porter + + * README: Bump version number to 8.6a3 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + 2008-08-27 Donal K. Fellows * doc/tclvars.n, doc/library.n: Ensured that these two manual pages diff --git a/README b/README index de57917..2ef4941 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tcl - This is the Tcl 8.6a2 source distribution. + This is the Tcl 8.6a3 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.70 2008/08/12 15:10:32 dgp Exp $ +RCS: @(#) $Id: README,v 1.71 2008/08/28 16:24:16 dgp Exp $ Contents -------- diff --git a/generic/tcl.h b/generic/tcl.h index abde870..4e87df2 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.266 2008/08/22 18:16:44 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.267 2008/08/28 16:24:16 dgp Exp $ */ #ifndef _TCL @@ -60,10 +60,10 @@ extern "C" { #define TCL_MAJOR_VERSION 8 #define TCL_MINOR_VERSION 6 #define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TCL_RELEASE_SERIAL 2 +#define TCL_RELEASE_SERIAL 3 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6a2" +#define TCL_PATCH_LEVEL "8.6a3" /* * The following definitions set up the proper options for Windows compilers. diff --git a/library/init.tcl b/library/init.tcl index b02c3e5..c43475b 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.110 2008/08/12 15:10:36 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.111 2008/08/28 16:24:18 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6a2 +package require -exact Tcl 8.6a3 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in index cfaad3f..fcdd131 100644 --- a/tools/tcl.wse.in +++ b/tools/tcl.wse.in @@ -12,7 +12,7 @@ item: Global Log Pathname=%MAINDIR%\INSTALL.LOG Message Font=MS Sans Serif Font Size=8 - Disk Label=tcl8.6a2 + Disk Label=tcl8.6a3 Disk Filename=setup Patch Flags=0000000000000001 Patch Threshold=85 diff --git a/unix/configure b/unix/configure index f82fc19..71235e3 100755 --- a/unix/configure +++ b/unix/configure @@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a2" +TCL_PATCH_LEVEL="a3" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/configure.in b/unix/configure.in index 87ea9df..0c11513 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.187 2008/08/13 23:07:07 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.188 2008/08/28 16:24:19 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -27,7 +27,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a2" +TCL_PATCH_LEVEL="a3" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/tcl.spec b/unix/tcl.spec index 529fc1f..a02cbd6 100644 --- a/unix/tcl.spec +++ b/unix/tcl.spec @@ -1,11 +1,11 @@ -# $Id: tcl.spec,v 1.40 2008/08/12 15:10:40 dgp Exp $ +# $Id: tcl.spec,v 1.41 2008/08/28 16:24:20 dgp Exp $ # This file is the basis for a binary Tcl RPM for Linux. %{!?directory:%define directory /usr/local} Name: tcl Summary: Tcl scripting language development environment -Version: 8.6a2 +Version: 8.6a3 Release: 2 License: BSD Group: Development/Languages diff --git a/win/configure b/win/configure index ad83af3..58b2a2e 100755 --- a/win/configure +++ b/win/configure @@ -1272,7 +1272,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a2" +TCL_PATCH_LEVEL="a3" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index ba282da..0976218 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.107 2008/08/12 15:10:40 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.108 2008/08/28 16:24:20 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -16,7 +16,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a2" +TCL_PATCH_LEVEL="a3" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 -- cgit v0.12 From 4c5d518f5499a0a9f50e08bba0484cb6650b816a Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 29 Aug 2008 12:37:06 +0000 Subject: Ensure that all TclOO headers get installed. [Bug 2082299] --- ChangeLog | 7 +++++++ unix/Makefile.in | 4 +++- win/Makefile.in | 4 +++- win/makefile.bc | 2 ++ win/makefile.vc | 4 +++- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4363bb9..c9225ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-29 Donal K. Fellows + + * unix/Makefile.in: Ensure that all TclOO headers get installed. + * win/Makefile.in: [Bug 2082299] + * win/makefile.bc: + * win/makefile.vc: + 2008-08-28 Don Porter * README: Bump version number to 8.6a3 diff --git a/unix/Makefile.in b/unix/Makefile.in index 3ed9008..7ead8d7 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.245 2008/08/13 23:07:07 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.246 2008/08/29 12:37:16 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -782,6 +782,7 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs fi @echo "Installing header files"; @for i in $(GENERIC_DIR)/tcl.h $(GENERIC_DIR)/tclDecls.h \ + $(GENERIC_DIR)/tclOO.h $(GENERIC_DIR)/tclOODecls.h \ $(GENERIC_DIR)/tclPlatDecls.h \ $(GENERIC_DIR)/tclTomMath.h \ $(GENERIC_DIR)/tclTomMathDecls.h ; \ @@ -885,6 +886,7 @@ install-private-headers: libraries @echo "Installing private header files"; @for i in $(GENERIC_DIR)/tclInt.h $(GENERIC_DIR)/tclIntDecls.h \ $(GENERIC_DIR)/tclIntPlatDecls.h $(GENERIC_DIR)/tclPort.h \ + $(GENERIC_DIR)/tclOOInt.h $(GENERIC_DIR)/tclOOIntDecls.h \ $(UNIX_DIR)/tclUnixPort.h; \ do \ $(INSTALL_DATA) $$i "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ diff --git a/win/Makefile.in b/win/Makefile.in index 2f5df7c..53d4148 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.134 2008/08/11 21:58:09 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.135 2008/08/29 12:37:17 dkf Exp $ VERSION = @TCL_VERSION@ @@ -618,6 +618,7 @@ install-libraries: libraries install-tzdata install-msgs done; @echo "Installing header files"; @for i in "$(GENERIC_DIR)/tcl.h" "$(GENERIC_DIR)/tclDecls.h" \ + "$(GENERIC_DIR)/tclOO.h" "$(GENERIC_DIR)/tclOODecls.h" \ "$(GENERIC_DIR)/tclPlatDecls.h" \ "$(GENERIC_DIR)/tclTomMath.h" \ "$(GENERIC_DIR)/tclTomMathDecls.h" \ @@ -683,6 +684,7 @@ install-private-headers: libraries @echo "Installing private header files"; @for i in "$(GENERIC_DIR)/tclInt.h" "$(GENERIC_DIR)/tclIntDecls.h" \ "$(GENERIC_DIR)/tclIntPlatDecls.h" "$(GENERIC_DIR)/tclPort.h" \ + "$(GENERIC_DIR)/tclOOInt.h" "$(GENERIC_DIR)/tclOOIntDecls.h" \ "$(WIN_DIR)/tclWinPort.h" ; \ do \ $(COPY) "$$i" "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ diff --git a/win/makefile.bc b/win/makefile.bc index 69d6268..633eb53 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -462,6 +462,8 @@ install-libraries: @echo installing library files -@copy "$(GENERICDIR)\tcl.h" "$(INCLUDE_INSTALL_DIR)" -@copy "$(GENERICDIR)\tclDecls.h" "$(INCLUDE_INSTALL_DIR)" + -@copy "$(GENERICDIR)\tclOO.h" "$(INCLUDE_INSTALL_DIR)" + -@copy "$(GENERICDIR)\tclOODecls.h" "$(INCLUDE_INSTALL_DIR)" -@copy "$(GENERICDIR)\tclPlatDecls.h" "$(INCLUDE_INSTALL_DIR)" -@copy "$(ROOT)\library\history.tcl" "$(SCRIPT_INSTALL_DIR)" -@copy "$(ROOT)\library\init.tcl" "$(SCRIPT_INSTALL_DIR)" diff --git a/win/makefile.vc b/win/makefile.vc index 99698d5..fc9014e 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.188 2008/08/11 21:58:09 dgp Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.189 2008/08/29 12:37:18 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -1026,6 +1026,8 @@ install-libraries: tclConfig install-msgs install-tzdata @echo Installing header files @$(CPY) "$(GENERICDIR)\tcl.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tclDecls.h" "$(INCLUDE_INSTALL_DIR)\" + @$(CPY) "$(GENERICDIR)\tclOO.h" "$(INCLUDE_INSTALL_DIR)\" + @$(CPY) "$(GENERICDIR)\tclOODecls.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tclPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tclTomMath.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tclTomMathDecls.h" "$(INCLUDE_INSTALL_DIR)\" -- cgit v0.12 From 95660b09be94d6eb4b0482d33c78d8880e0c14cb Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Sep 2008 00:35:40 +0000 Subject: Improve the semantics of C-implemented destructors slightly. --- ChangeLog | 8 ++++++++ generic/tclOO.c | 49 +++++++++++++++++++++++++++++++------------------ generic/tclOOMethod.c | 12 +++++++++++- 3 files changed, 50 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9225ea..8f5fab5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-01 Donal K. Fellows + + * generic/tclOOMethod.c (InvokeProcedureMethod): + * generic/tclOO.c (ObjectRenamedTrace): Arrange for only methods that + involve callbacks into the Tcl interpreter to be skipped when the + interpreter is being torn down. Allows the semantics of destructors in + a dying interpreter to be more useful when they're implemented in C. + 2008-08-29 Donal K. Fellows * unix/Makefile.in: Ensure that all TclOO headers get installed. diff --git a/generic/tclOO.c b/generic/tclOO.c index 95926f2..b25f070 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.15 2008/08/20 15:41:26 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.16 2008/09/01 00:35:42 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -548,6 +548,7 @@ ObjectRenamedTrace( { Object *oPtr = clientData; Class *clsPtr; + CallContext *contextPtr; /* * If this is a rename and not a delete of the object, we just flush the @@ -570,24 +571,22 @@ ObjectRenamedTrace( AddRef(oPtr); oPtr->flags |= OBJECT_DELETED; - if (!Tcl_InterpDeleted(interp)) { - CallContext *contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); - if (contextPtr != NULL) { - int result; - Tcl_InterpState state; + contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); + if (contextPtr != NULL) { + int result; + Tcl_InterpState state; - contextPtr->callPtr->flags |= DESTRUCTOR; - contextPtr->skip = 0; - state = Tcl_SaveInterpState(interp, TCL_OK); - result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, - 0, NULL); - if (result != TCL_OK) { - Tcl_BackgroundError(interp); - } - Tcl_RestoreInterpState(interp, state); - TclOODeleteContext(contextPtr); + contextPtr->callPtr->flags |= DESTRUCTOR; + contextPtr->skip = 0; + state = Tcl_SaveInterpState(interp, TCL_OK); + result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, 0, + NULL); + if (result != TCL_OK) { + Tcl_BackgroundError(interp); } + Tcl_RestoreInterpState(interp, state); + TclOODeleteContext(contextPtr); } /* @@ -2134,11 +2133,18 @@ Tcl_ObjectContextInvokeNext( if (contextPtr->index+1 >= contextPtr->callPtr->numChain) { /* - * We're at the end of the chain; generate an error message. + * We're at the end of the chain; generate an error message unless the + * interpreter is being torn down, in which case we might be getting + * here because of methods/destructors doing a [next] (or equivalent) + * unexpectedly. */ const char *methodType; + if (Tcl_InterpDeleted(interp)) { + return TCL_OK; + } + if (contextPtr->callPtr->flags & CONSTRUCTOR) { methodType = "constructor"; } else if (contextPtr->callPtr->flags & DESTRUCTOR) { @@ -2195,11 +2201,18 @@ TclNRObjectContextInvokeNext( if (contextPtr->index+1 >= contextPtr->callPtr->numChain) { /* - * We're at the end of the chain; generate an error message. + * We're at the end of the chain; generate an error message unless the + * interpreter is being torn down, in which case we might be getting + * here because of methods/destructors doing a [next] (or equivalent) + * unexpectedly. */ const char *methodType; + if (Tcl_InterpDeleted(interp)) { + return TCL_OK; + } + if (contextPtr->callPtr->flags & CONSTRUCTOR) { methodType = "constructor"; } else if (contextPtr->callPtr->flags & DESTRUCTOR) { diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 75aef73..5371719 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.17 2008/08/23 18:53:12 msofer Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.18 2008/09/01 00:35:42 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -643,6 +643,16 @@ InvokeProcedureMethod( * call frame's lifetime). */ /* + * If the interpreter was deleted, we just skip to the next thing in the + * chain. + */ + + if (Tcl_InterpDeleted(interp)) { + return TclNRObjectContextInvokeNext(interp, context, objc, objv, + Tcl_ObjectContextSkippedArgs(context)); + } + + /* * Allocate the special frame data. */ -- cgit v0.12 From ba6dbcbada614e41a404b68b0b7edcca6f149f07 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 1 Sep 2008 12:28:04 +0000 Subject: * generic/tclCmdAH.c: nre-enabling [eval]; eval scripts are now * generic/tclOOBasic.c: bytecompiled. Adapted recursion limit tests * tests/interp.test: that were relying on eval not being * tests/nre.test: compiled. Part of the [Bug 2017632] project. * tests/unsupported.test: --- ChangeLog | 8 ++ generic/tclCmdAH.c | 49 ++++++++----- generic/tclOOBasic.c | 8 +- tests/interp.test | 196 ++++++++++++++++++++++++++++++++++++++++++++----- tests/nre.test | 22 +++++- tests/unsupported.test | 8 +- 6 files changed, 244 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f5fab5..0d462ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-01 Miguel Sofer + + * generic/tclCmdAH.c: nre-enabling [eval]; eval scripts are now + * generic/tclOOBasic.c: bytecompiled. Adapted recursion limit tests + * tests/interp.test: that were relying on eval not being + * tests/nre.test: compiled. Part of the [Bug 2017632] project. + * tests/unsupported.test: + 2008-09-01 Donal K. Fellows * generic/tclOOMethod.c (InvokeProcedureMethod): diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 272cb20..80aadeb 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.103 2008/08/24 14:38:11 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.104 2008/09/01 12:28:08 msofer Exp $ */ #include "tclInt.h" @@ -57,6 +57,7 @@ static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, static Tcl_NRPostProc CatchObjCmdCallback; static Tcl_NRPostProc ForNextCallback; static Tcl_NRPostProc ForeachLoopStep; +static Tcl_NRPostProc EvalCmdErrMsg; /* *---------------------------------------------------------------------- @@ -690,6 +691,21 @@ Tcl_ErrorObjCmd( */ /* ARGSUSED */ + +static int +EvalCmdErrMsg( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + if (result == TCL_ERROR) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"eval\" body line %d)", interp->errorLine)); + } + return result; +} + + int Tcl_EvalObjCmd( ClientData dummy, /* Not used. */ @@ -697,9 +713,10 @@ Tcl_EvalObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int result; register Tcl_Obj *objPtr; Interp *iPtr = (Interp *) interp; + CmdFrame* invoker = NULL; + int word = 0; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); @@ -711,32 +728,24 @@ Tcl_EvalObjCmd( * TIP #280. Make argument location available to eval'd script. */ - CmdFrame* invoker = iPtr->cmdFramePtr; - int word = 1; - TclArgumentGet (interp, objv[1], &invoker, &word); - - result = TclEvalObjEx(interp, objv[1], TCL_EVAL_DIRECT, - invoker, word); + invoker = iPtr->cmdFramePtr; + word = 1; + objPtr = objv[1]; + TclArgumentGet (interp, objPtr, &invoker, &word); } else { /* * More than one argument: concatenate them together with spaces * between, then evaluate the result. Tcl_EvalObjEx will delete the - * object when it decrements its refcount after eval'ing it. + * object when it decrements its refcount after eval'ing it. + * + * TIP #280. Make invoking context available to eval'd script, done + * with the default values. */ objPtr = Tcl_ConcatObj(objc-1, objv+1); - - /* - * TIP #280. Make invoking context available to eval'd script. - */ - - result = TclEvalObjEx(interp, objPtr, TCL_EVAL_DIRECT, NULL, 0); - } - if (result == TCL_ERROR) { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"eval\" body line %d)", interp->errorLine)); } - return result; + TclNRAddCallback(interp, EvalCmdErrMsg,NULL, NULL, NULL, NULL); + return TclNREvalObjEx(interp, objPtr, 0, invoker, word); } /* diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 28033cd..9df3907 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.9 2008/07/31 14:43:47 msofer Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.10 2008/09/01 12:28:09 msofer Exp $ */ #ifdef HAVE_CONFIG_H @@ -293,7 +293,7 @@ TclOO_Object_Eval( register const int skip = Tcl_ObjectContextSkippedArgs(context); CallFrame *framePtr, **framePtrPtr = &framePtr; Tcl_Obj *scriptPtr; - int result, flags; + int result; CmdFrame *invoker; if (objc-1 < skip) { @@ -329,11 +329,9 @@ TclOO_Object_Eval( if (objc != skip+1) { scriptPtr = Tcl_ConcatObj(objc-skip, objv+skip); - flags = TCL_EVAL_DIRECT; invoker = NULL; } else { scriptPtr = objv[skip]; - flags = 0; invoker = ((Interp *) interp)->cmdFramePtr; } @@ -343,7 +341,7 @@ TclOO_Object_Eval( */ TclNRAddCallback(interp, FinalizeEval, object, NULL, NULL, NULL); - return TclNREvalObjEx(interp, scriptPtr, flags, invoker, skip); + return TclNREvalObjEx(interp, scriptPtr, 0, invoker, skip); } static int diff --git a/tests/interp.test b/tests/interp.test index 33dfda9..01e3ca8 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.60 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: interp.test,v 1.61 2008/09/01 12:28:09 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -2623,7 +2623,12 @@ test interp-29.3.6 {recursion limit error reporting} { list $r1 $r2 } {0 ok} -test interp-29.3.7 {recursion limit error reporting} { +# +# Note that TEBC does not verify the interp's nesting level itself; the nesting +# level will only be verified when it invokes a non-bcc'd command. +# + +test interp-29.3.7a {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 5} set r1 [slave eval { @@ -2632,8 +2637,53 @@ test interp-29.3.7 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - update - set x ok + update + set x ok + } + } + } + } + } msg + }] + set r2 [slave eval { set msg }] + interp delete slave + list $r1 $r2 +} {0 ok} + +test interp-29.3.7b {recursion limit error reporting} { + interp create slave + after 0 {interp recursionlimit slave 5} + set r1 [slave eval { + catch { # nesting level 1 + eval { # 2 + eval { # 3 + eval { # 4 + update + eval { # 5 + set x ok + } + } + } + } + } msg + }] + set r2 [slave eval { set msg }] + interp delete slave + list $r1 $r2 +} {0 ok} + +test interp-29.3.7c {recursion limit error reporting} { + interp create slave + after 0 {interp recursionlimit slave 5} + set r1 [slave eval { + catch { # nesting level 1 + eval { # 2 + eval { # 3 + eval { # 4 + eval { # 5 + update + set set set + $set x ok } } } @@ -2645,7 +2695,7 @@ test interp-29.3.7 {recursion limit error reporting} { list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} -test interp-29.3.8 {recursion limit error reporting} { +test interp-29.3.8a {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 4} set r1 [slave eval { @@ -2654,8 +2704,30 @@ test interp-29.3.8 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - update - set x ok + update + set x ok + } + } + } + } + } msg + }] + set r2 [slave eval { set msg }] + interp delete slave + list $r1 $r2 +} {0 ok} + +test interp-29.3.8b {recursion limit error reporting} { + interp create slave + after 0 {interp recursionlimit slave 4} + set r1 [slave eval { + catch { # nesting level 1 + eval { # 2 + eval { # 3 + eval { # 4 + update + eval { # 5 + set x ok } } } @@ -2667,7 +2739,7 @@ test interp-29.3.8 {recursion limit error reporting} { list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} -test interp-29.3.9 {recursion limit error reporting} { +test interp-29.3.9a {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 6} set r1 [slave eval { @@ -2676,8 +2748,30 @@ test interp-29.3.9 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - update - set x ok + update + set x ok + } + } + } + } + } msg + }] + set r2 [slave eval { set msg }] + interp delete slave + list $r1 $r2 +} {0 ok} + +test interp-29.3.9b {recursion limit error reporting} { + interp create slave + after 0 {interp recursionlimit slave 6} + set r1 [slave eval { + catch { # nesting level 1 + eval { # 2 + eval { # 3 + eval { # 4 + eval { # 5 + set set set + $set x ok } } } @@ -2689,7 +2783,7 @@ test interp-29.3.9 {recursion limit error reporting} { list $r1 $r2 } {0 ok} -test interp-29.3.10 {recursion limit error reporting} { +test interp-29.3.10a {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 4} set r1 [slave eval { @@ -2709,9 +2803,31 @@ test interp-29.3.10 {recursion limit error reporting} { set r2 [slave eval { set msg }] interp delete slave list $r1 $r2 +} {0 ok} + +test interp-29.3.10b {recursion limit error reporting} { + interp create slave + after 0 {slave recursionlimit 4} + set r1 [slave eval { + catch { # nesting level 1 + eval { # 2 + eval { # 3 + eval { # 4 + update + eval { # 5 + set x ok + } + } + } + } + } msg + }] + set r2 [slave eval { set msg }] + interp delete slave + list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} -test interp-29.3.11 {recursion limit error reporting} { +test interp-29.3.11a {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 5} set r1 [slave eval { @@ -2720,8 +2836,31 @@ test interp-29.3.11 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - update - set x ok + update + set x ok + } + } + } + } + } msg + }] + set r2 [slave eval { set msg }] + interp delete slave + list $r1 $r2 +} {0 ok} + +test interp-29.3.11b {recursion limit error reporting} { + interp create slave + after 0 {slave recursionlimit 5} + set r1 [slave eval { + catch { # nesting level 1 + eval { # 2 + eval { # 3 + eval { # 4 + eval { # 5 + update + set set set + $set x ok } } } @@ -2733,7 +2872,7 @@ test interp-29.3.11 {recursion limit error reporting} { list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} -test interp-29.3.12 {recursion limit error reporting} { +test interp-29.3.12a {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 6} set r1 [slave eval { @@ -2742,8 +2881,31 @@ test interp-29.3.12 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - update - set x ok + update + set x ok + } + } + } + } + } msg + }] + set r2 [slave eval { set msg }] + interp delete slave + list $r1 $r2 +} {0 ok} + +test interp-29.3.12b {recursion limit error reporting} { + interp create slave + after 0 {slave recursionlimit 6} + set r1 [slave eval { + catch { # nesting level 1 + eval { # 2 + eval { # 3 + eval { # 4 + eval { # 5 + update + set set set + $set x ok } } } diff --git a/tests/nre.test b/tests/nre.test index cc15b13..c415150 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.4 2008/08/22 18:27:27 dgp Exp $ +# RCS: @(#) $Id: nre.test,v 1.5 2008/09/01 12:28:10 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -236,6 +236,26 @@ test nre-7.5 {[foreach] is not recursive} -constraints {knownBug} -setup { unset abs } -result {{0 2 2 0} 0} +test nre-7.6 {[eval] is not recursive} -setup { + proc a i [makebody {eval [list a $i]}] +} -body { + setabs + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 1} 0} + +test nre-7.7 {[eval] is not recursive} -setup { + proc a i [makebody {eval "a $i"}] +} -body { + setabs + a 0 +} -cleanup { + rename a {} + unset abs +} -result {{0 2 2 1} 0} + test nre-8.1 {nre and {*}} -body { # force an expansion that grows the evaluation stack, check that nre # adapts the bottomPtr. This crashes on failure. diff --git a/tests/unsupported.test b/tests/unsupported.test index 0267c58..37a9313 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.7 2008/08/26 22:37:05 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.8 2008/09/01 12:28:10 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -618,7 +618,7 @@ test unsupported-C.1.9 {yield in nested eval} -constraints {coroutine} \ } -cleanup { rename moo {} unset body res -} -returnCodes error -result {cannot yield: C stack busy} +} -result {0 10 20} test unsupported-C.1.10 {yield in nested eval} -constraints {coroutine} \ -setup { @@ -629,7 +629,7 @@ test unsupported-C.1.10 {yield in nested eval} -constraints {coroutine} \ yield while {$i < $imax} { - eval yield + eval yield [expr {$i*$stop}] incr i } } @@ -642,7 +642,7 @@ test unsupported-C.1.10 {yield in nested eval} -constraints {coroutine} \ set res } -cleanup { unset body res -} -returnCodes error -result {cannot yield: C stack busy} +} -result {0 10 20} test unsupported-C.1.11 {yield outside coroutine} -constraints {coroutine} \ -setup { -- cgit v0.12 From da0484ea856de0d8a7e42123267d14c53c5d432a Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 2 Sep 2008 15:49:14 +0000 Subject: Use tcltest2 better. --- ChangeLog | 4 + tests/socket.test | 814 ++++++++++++++++++++++++++---------------------------- 2 files changed, 399 insertions(+), 419 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d462ed..0b03adf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-09-02 Donal K. Fellows + + * tests/socket.test: Rewrote so as to use tcltest2 better. + 2008-09-01 Miguel Sofer * generic/tclCmdAH.c: nre-enabling [eval]; eval scripts are now diff --git a/tests/socket.test b/tests/socket.test index 421d359..abfe169 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -1,16 +1,16 @@ # Commands tested in this file: socket. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Ajuba Solutions. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: socket.test,v 1.41 2008/03/11 22:23:33 das Exp $ +# RCS: @(#) $Id: socket.test,v 1.42 2008/09/02 15:49:25 dkf Exp $ # Running socket tests with a remote server: # ------------------------------------------ @@ -43,8 +43,8 @@ # # When the server starts, it prints out a detailed message containing its # configuration information, and it will block until killed with a Ctrl-C. -# Once the remote server exists, you can run the tests in socket.test with -# the server by setting two Tcl variables: +# Once the remote server exists, you can run the tests in socket.test with the +# server by setting two Tcl variables: # # % set remoteServerIP # % set remoteServerPort 2048 @@ -69,8 +69,8 @@ namespace import -force ::tcltest::* testConstraint testthread [llength [info commands testthread]] testConstraint exec [llength [info commands exec]] -# If remoteServerIP or remoteServerPort are not set, check in the -# environment variables for externally set values. +# If remoteServerIP or remoteServerPort are not set, check in the environment +# variables for externally set values. # if {![info exists remoteServerIP]} { @@ -100,12 +100,12 @@ if {($doTestsWithRemoteServer == 1) && (![info exists remoteServerPort])} { set remoteServerPort 2048 } -# Attempt to connect to a remote server if one is already running. If it -# is not running or for some other reason the connect fails, attempt to -# start the remote server on the local host listening on port 2048. This -# is only done on platforms that support exec (i.e. not on the Mac). On -# platforms that do not support exec, the remote server must be started -# by the user before running the tests. +# Attempt to connect to a remote server if one is already running. If it is +# not running or for some other reason the connect fails, attempt to start the +# remote server on the local host listening on port 2048. This is only done on +# platforms that support exec (i.e. not on the Mac). On platforms that do not +# support exec, the remote server must be started by the user before running +# the tests. set remoteProcChan "" set commandSocket "" @@ -156,8 +156,7 @@ if {!$doTestsWithRemoteServer} { } # -# If we do the tests, define a command to send a command to the -# remote server. +# If we do the tests, define a command to send a command to the remote server. # if {[testConstraint doTestsWithRemoteServer]} { @@ -192,53 +191,55 @@ if {[testConstraint doTestsWithRemoteServer]} { } } } - -test socket-1.1 {arg parsing for socket command} {socket} { - list [catch {socket -server} msg] $msg -} {1 {no argument given for -server option}} -test socket-1.2 {arg parsing for socket command} {socket} { - list [catch {socket -server foo} msg] $msg -} {1 {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"}} -test socket-1.3 {arg parsing for socket command} {socket} { - list [catch {socket -myaddr} msg] $msg -} {1 {no argument given for -myaddr option}} -test socket-1.4 {arg parsing for socket command} {socket} { - list [catch {socket -myaddr 127.0.0.1} msg] $msg -} {1 {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"}} -test socket-1.5 {arg parsing for socket command} {socket} { - list [catch {socket -myport} msg] $msg -} {1 {no argument given for -myport option}} -test socket-1.6 {arg parsing for socket command} {socket} { - list [catch {socket -myport xxxx} msg] $msg -} {1 {expected integer but got "xxxx"}} -test socket-1.7 {arg parsing for socket command} {socket} { - list [catch {socket -myport 2522} msg] $msg -} {1 {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"}} -test socket-1.8 {arg parsing for socket command} {socket} { - list [catch {socket -froboz} msg] $msg -} {1 {bad option "-froboz": must be -async, -myaddr, -myport, or -server}} -test socket-1.9 {arg parsing for socket command} {socket} { - list [catch {socket -server foo -myport 2521 3333} msg] $msg -} {1 {option -myport is not valid for servers}} -test socket-1.10 {arg parsing for socket command} {socket} { - list [catch {socket host 2528 -junk} msg] $msg -} {1 {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"}} -test socket-1.11 {arg parsing for socket command} {socket} { - list [catch {socket -server callback 2520 --} msg] $msg -} {1 {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"}} -test socket-1.12 {arg parsing for socket command} {socket} { - list [catch {socket foo badport} msg] $msg -} {1 {expected integer but got "badport"}} -test socket-1.13 {arg parsing for socket command} {socket} { -list [catch {socket -async -server} msg] $msg -} {1 {cannot set -async option for server sockets}} -test socket-1.14 {arg parsing for socket command} {socket} { -list [catch {socket -server foo -async} msg] $msg -} {1 {cannot set -async option for server sockets}} + +# ---------------------------------------------------------------------- + +test socket-1.1 {arg parsing for socket command} -constraints socket -body { + socket -server +} -returnCodes error -result {no argument given for -server option} +test socket-1.2 {arg parsing for socket command} -constraints socket -body { + socket -server foo +} -returnCodes error -result {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"} +test socket-1.3 {arg parsing for socket command} -constraints socket -body { + socket -myaddr +} -returnCodes error -result {no argument given for -myaddr option} +test socket-1.4 {arg parsing for socket command} -constraints socket -body { + socket -myaddr 127.0.0.1 +} -returnCodes error -result {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"} +test socket-1.5 {arg parsing for socket command} -constraints socket -body { + socket -myport +} -returnCodes error -result {no argument given for -myport option} +test socket-1.6 {arg parsing for socket command} -constraints socket -body { + socket -myport xxxx +} -returnCodes error -result {expected integer but got "xxxx"} +test socket-1.7 {arg parsing for socket command} -constraints socket -body { + socket -myport 2522 +} -returnCodes error -result {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"} +test socket-1.8 {arg parsing for socket command} -constraints socket -body { + socket -froboz +} -returnCodes error -result {bad option "-froboz": must be -async, -myaddr, -myport, or -server} +test socket-1.9 {arg parsing for socket command} -constraints socket -body { + socket -server foo -myport 2521 3333 +} -returnCodes error -result {option -myport is not valid for servers} +test socket-1.10 {arg parsing for socket command} -constraints socket -body { + socket host 2528 -junk +} -returnCodes error -result {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"} +test socket-1.11 {arg parsing for socket command} -constraints socket -body { + socket -server callback 2520 -- +} -returnCodes error -result {wrong # args: should be "socket ?-myaddr addr? ?-myport myport? ?-async? host port" or "socket -server command ?-myaddr addr? port"} +test socket-1.12 {arg parsing for socket command} -constraints socket -body { + socket foo badport +} -returnCodes error -result {expected integer but got "badport"} +test socket-1.13 {arg parsing for socket command} -constraints socket -body { + socket -async -server +} -returnCodes error -result {cannot set -async option for server sockets} +test socket-1.14 {arg parsing for socket command} -constraints socket -body { + socket -server foo -async +} -returnCodes error -result {cannot set -async option for server sockets} set path(script) [makeFile {} script] -test socket-2.1 {tcp connection} {socket stdio} { +test socket-2.1 {tcp connection} -constraints {socket stdio} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -260,23 +261,21 @@ test socket-2.1 {tcp connection} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r] gets $f x gets $f listen - if {[catch {socket 127.0.0.1 $listen} msg]} { - set x $msg - } else { - lappend x [gets $f] - close $msg - } +} -body { + # $x == "ready" at this point + set sock [socket 127.0.0.1 $listen] lappend x [gets $f] + close $sock + lappend x [gets $f] +} -cleanup { close $f - set x -} {ready done {}} - -if [info exists port] { +} -result {ready done {}} +if {[info exists port]} { incr port } else { - set port [expr 2048 + [pid]%1024] + set port [expr {2048 + [pid]%1024}] } -test socket-2.2 {tcp connection with client port specified} {socket stdio} { +test socket-2.2 {tcp connection with client port specified} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -298,21 +297,20 @@ test socket-2.2 {tcp connection with client port specified} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r] gets $f x gets $f listen +} -constraints {socket stdio} -body { + # $x == "ready" at this point global port - if {[catch {socket -myport $port 127.0.0.1 $listen} sock]} { - set x $sock - close [socket 127.0.0.1 $listen] - puts stderr $sock - } else { - puts $sock hello - flush $sock - lappend x [gets $f] - close $sock - } + set sock [socket -myport $port 127.0.0.1 $listen] + puts $sock hello + flush $sock + lappend x [gets $f] + close $sock + return $x +} -cleanup { + catch {close [socket 127.0.0.1 $listen]} close $f - set x -} [list ready "hello $port"] -test socket-2.3 {tcp connection with client interface specified} {socket stdio} { +} -result [list ready "hello $port"] +test socket-2.3 {tcp connection with client interface specified} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -332,18 +330,18 @@ test socket-2.3 {tcp connection with client interface specified} {socket stdio} close $f set f [open "|[list [interpreter] $path(script)]" r] gets $f x - if {[catch {socket -myaddr 127.0.0.1 127.0.0.1 2830} sock]} { - set x $sock - } else { - puts $sock hello - flush $sock - lappend x [gets $f] - close $sock - } +} -constraints {socket stdio} -body { + # $x == "ready" at this point + set sock [socket -myaddr 127.0.0.1 127.0.0.1 2830] + puts $sock hello + flush $sock + lappend x [gets $f] + close $sock + return $x +} -cleanup { close $f - set x -} {ready {hello 127.0.0.1}} -test socket-2.4 {tcp connection with server interface specified} {socket stdio} { +} -result {ready {hello 127.0.0.1}} +test socket-2.4 {tcp connection with server interface specified} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -365,18 +363,18 @@ test socket-2.4 {tcp connection with server interface specified} {socket stdio} set f [open "|[list [interpreter] $path(script)]" r] gets $f x gets $f listen - if {[catch {socket 127.0.0.1 $listen} sock]} { - set x $sock - } else { - puts $sock hello - flush $sock - lappend x [gets $f] - close $sock - } +} -constraints {socket stdio} -body { + # $x == "ready" at this point + set sock [socket 127.0.0.1 $listen] + puts $sock hello + flush $sock + lappend x [gets $f] + close $sock + return $x +} -cleanup { close $f - set x -} {ready hello} -test socket-2.5 {tcp connection with redundant server port} {socket stdio} { +} -result {ready hello} +test socket-2.5 {tcp connection with redundant server port} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -398,18 +396,18 @@ test socket-2.5 {tcp connection with redundant server port} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r] gets $f x gets $f listen - if {[catch {socket 127.0.0.1 $listen} sock]} { - set x $sock - } else { - puts $sock hello - flush $sock - lappend x [gets $f] - close $sock - } +} -constraints {socket stdio} -body { + # $x == "ready" at this point + set sock [socket 127.0.0.1 $listen] + puts $sock hello + flush $sock + lappend x [gets $f] + close $sock + return $x +} -cleanup { close $f - set x -} {ready hello} -test socket-2.6 {tcp connection} {socket} { +} -result {ready hello} +test socket-2.6 {tcp connection} -constraints socket -body { set status ok if {![catch {set sock [socket 127.0.0.1 2833]}]} { if {![catch {gets $sock}]} { @@ -418,8 +416,8 @@ test socket-2.6 {tcp connection} {socket} { close $sock } set status -} ok -test socket-2.7 {echo server, one line} {socket stdio} { +} -result ok +test socket-2.7 {echo server, one line} -constraints {socket stdio} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -450,18 +448,19 @@ test socket-2.7 {echo server, one line} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r] gets $f gets $f listen +} -body { set s [socket 127.0.0.1 $listen] fconfigure $s -buffering line -translation lf puts $s "hello abcdefghijklmnop" after 1000 set x [gets $s] close $s - set y [gets $f] + list $x [gets $f] +} -cleanup { close $f - list $x $y -} {{hello abcdefghijklmnop} done} +} -result {{hello abcdefghijklmnop} done} removeFile script -test socket-2.8 {echo server, loop 50 times, single connection} -constraints {socket stdio} -setup { +test socket-2.8 {echo server, loop 50 times, single connection} -setup { set path(script) [makeFile { set f [socket -server accept 0] proc accept {s a p} { @@ -489,10 +488,10 @@ test socket-2.8 {echo server, loop 50 times, single connection} -constraints {so close $f puts "done $i" } script] -} -body { set f [open "|[list [interpreter] $path(script)]" r] gets $f gets $f listen +} -constraints {socket stdio} -body { set s [socket 127.0.0.1 $listen] fconfigure $s -buffering line catch { @@ -503,13 +502,13 @@ test socket-2.8 {echo server, loop 50 times, single connection} -constraints {so } close $s catch {set x [gets $f]} - close $f - set x + return $x } -cleanup { + close $f removeFile script } -result {done 50} set path(script) [makeFile {} script] -test socket-2.9 {socket conflict} {socket stdio} { +test socket-2.9 {socket conflict} -constraints {socket stdio} -body { set s [socket -server accept 0] file delete $path(script) set f [open $path(script) w] @@ -518,15 +517,14 @@ test socket-2.9 {socket conflict} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r] gets $f after 100 - set x [list [catch {close $f} msg]] - regsub "\n.*$" $msg {} msg ; # cut part of the error message containing the port number - lappend x $msg + close $f +} -returnCodes error -cleanup { close $s - set x -} {1 {couldn't open socket: address already in use}} -test socket-2.10 {close on accept, accepted socket lives} {socket} { +} -match glob -result {couldn't open socket: address already in use*} +test socket-2.10 {close on accept, accepted socket lives} -setup { set done 0 set timer [after 20000 "set done timed_out"] +} -constraints socket -body { set ss [socket -server accept 0] proc accept {s a p} { global ss @@ -544,17 +542,18 @@ test socket-2.10 {close on accept, accepted socket lives} {socket} { puts $cs hello close $cs vwait done + return $done +} -cleanup { after cancel $timer - set done -} 1 -test socket-2.11 {detecting new data} {socket} { +} -result 1 +test socket-2.11 {detecting new data} -constraints socket -setup { proc accept {s a p} { global sock set sock $s } - set s [socket -server accept 0] set sock "" +} -body { set s2 [socket 127.0.0.1 [lindex [fconfigure $s -sockname] 2]] vwait sock puts $s2 one @@ -569,15 +568,14 @@ test socket-2.11 {detecting new data} {socket} { after 500 fconfigure $sock -blocking 0 lappend result c:[gets $sock] +} -cleanup { fconfigure $sock -blocking 1 close $s2 close $s close $sock - set result -} {a:one b: c:two} +} -result {a:one b: c:two} - -test socket-3.1 {socket conflict} {socket stdio} { +test socket-3.1 {socket conflict} -constraints {socket stdio} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -591,13 +589,13 @@ test socket-3.1 {socket conflict} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r+] gets $f gets $f listen - set x [list [catch {socket -server accept -myaddr 127.0.0.1 $listen} msg] \ - $msg] +} -body { + socket -server accept -myaddr 127.0.0.1 $listen +} -cleanup { puts $f bye close $f - set x -} {1 {couldn't open socket: address already in use}} -test socket-3.2 {server with several clients} {socket stdio} { +} -returnCodes error -result {couldn't open socket: address already in use} +test socket-3.2 {server with several clients} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -635,6 +633,8 @@ test socket-3.2 {server with several clients} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r+] set x [gets $f] gets $f listen +} -constraints {socket stdio} -body { + # $x == "ready" here set s1 [socket 127.0.0.1 $listen] fconfigure $s1 -buffering line set s2 [socket 127.0.0.1 $listen] @@ -653,11 +653,11 @@ test socket-3.2 {server with several clients} {socket stdio} { close $s2 close $s3 lappend x [gets $f] +} -cleanup { close $f - set x -} {ready done} +} -result {ready done} -test socket-4.1 {server with several clients} {socket stdio} { +test socket-4.1 {server with several clients} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -679,6 +679,7 @@ test socket-4.1 {server with several clients} {socket stdio} { fconfigure $p2 -buffering line set p3 [open "|[list [interpreter] $path(script)]" r+] fconfigure $p3 -buffering line +} -constraints {socket stdio} -body { proc accept {s a p} { fconfigure $s -buffering line fileevent $s readable [list echo $s] @@ -712,50 +713,40 @@ test socket-4.1 {server with several clients} {socket stdio} { lappend l [list p1 [gets $p1] $x] lappend l [list p2 [gets $p2] $x] lappend l [list p3 [gets $p3] $x] +} -cleanup { puts $p1 bye puts $p2 bye puts $p3 bye close $p1 close $p2 close $p3 - set l -} {{p1 bye done} {p2 bye done} {p3 bye done}} -test socket-4.2 {byte order problems, socket numbers, htons} {socket} { - set x ok - if {[catch {socket -server dodo -myaddr 127.0.0.1 0x3000} msg]} { - set x $msg - } else { - close $msg - } - set x -} ok +} -result {{p1 bye done} {p2 bye done} {p3 bye done}} +test socket-4.2 {byte order problems, socket numbers, htons} -body { + close [socket -server dodo -myaddr 127.0.0.1 0x3000] + return ok +} -constraints socket -result ok -test socket-5.1 {byte order problems, socket numbers, htons} \ - {socket unix notRoot} { - set x {couldn't open socket: not owner} +test socket-5.1 {byte order problems, socket numbers, htons} -body { if {![catch {socket -server dodo 0x1} msg]} { - set x {htons problem, should be disallowed, are you running as SU?} close $msg + return {htons problem, should be disallowed, are you running as SU?} } - set x -} {couldn't open socket: not owner} -test socket-5.2 {byte order problems, socket numbers, htons} {socket} { - set x {couldn't open socket: port number too high} + return {couldn't open socket: not owner} +} -constraints {socket unix notRoot} -result {couldn't open socket: not owner} +test socket-5.2 {byte order problems, socket numbers, htons} -body { if {![catch {socket -server dodo 0x10000} msg]} { - set x {port resolution problem, should be disallowed} close $msg + return {port resolution problem, should be disallowed} } - set x -} {couldn't open socket: port number too high} -test socket-5.3 {byte order problems, socket numbers, htons} \ - {socket unix notRoot} { - set x {couldn't open socket: not owner} + return {couldn't open socket: port number too high} +} -constraints socket -result {couldn't open socket: port number too high} +test socket-5.3 {byte order problems, socket numbers, htons} -body { if {![catch {socket -server dodo 21} msg]} { - set x {htons problem, should be disallowed, are you running as SU?} close $msg + return {htons problem, should be disallowed, are you running as SU?} } - set x -} {couldn't open socket: not owner} + return {couldn't open socket: not owner} +} -constraints {socket unix notRoot} -result {couldn't open socket: not owner} test socket-6.1 {accept callback error} -constraints {socket stdio} -setup { proc myHandler {msg options} { @@ -780,12 +771,12 @@ test socket-6.1 {accept callback error} -constraints {socket stdio} -setup { vwait x after cancel $timer close $s - set x + return $x } -cleanup { interp bgerror {} $handler } -result {divide by zero} -test socket-7.1 {testing socket specific options} {socket stdio} { +test socket-7.1 {testing socket specific options} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -804,16 +795,18 @@ test socket-7.1 {testing socket specific options} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r] gets $f gets $f listen + set l "" +} -constraints {socket stdio} -body { set s [socket 127.0.0.1 $listen] set p [fconfigure $s -peername] close $s - close $f - set l "" lappend l [string compare [lindex $p 0] 127.0.0.1] lappend l [string compare [lindex $p 2] $listen] lappend l [llength $p] -} {0 0 3} -test socket-7.2 {testing socket specific options} {socket stdio} { +} -cleanup { + close $f +} -result {0 0 3} +test socket-7.2 {testing socket specific options} -setup { file delete $path(script) set f [open $path(script) w] puts $f { @@ -832,22 +825,27 @@ test socket-7.2 {testing socket specific options} {socket stdio} { set f [open "|[list [interpreter] $path(script)]" r] gets $f gets $f listen +} -constraints {socket stdio} -body { set s [socket 127.0.0.1 $listen] set p [fconfigure $s -sockname] close $s - close $f list [llength $p] \ [regexp {^(127\.0\.0\.1|0\.0\.0\.0)$} [lindex $p 0]] \ [expr {[lindex $p 2] == $listen}] -} {3 1 0} -test socket-7.3 {testing socket specific options} {socket} { +} -cleanup { + close $f +} -result {3 1 0} +test socket-7.3 {testing socket specific options} -constraints socket -body { set s [socket -server accept -myaddr 127.0.0.1 0] set l [fconfigure $s] close $s update llength $l -} 14 -test socket-7.4 {testing socket specific options} {socket} { +} -result 14 +test socket-7.4 {testing socket specific options} -constraints socket -setup { + set timer [after 10000 "set x timed_out"] + set l "" +} -body { set s [socket -server accept -myaddr 127.0.0.1 0] proc accept {s a p} { global x @@ -856,15 +854,17 @@ test socket-7.4 {testing socket specific options} {socket} { } set listen [lindex [fconfigure $s -sockname] 2] set s1 [socket 127.0.0.1 $listen] - set timer [after 10000 "set x timed_out"] vwait x + lappend l [expr {[lindex $x 2] == $listen}] [llength $x] +} -cleanup { after cancel $timer close $s close $s1 +} -result {1 3} +test socket-7.5 {testing socket specific options} -setup { + set timer [after 10000 "set x timed_out"] set l "" - lappend l [expr {[lindex $x 2] == $listen}] [llength $x] -} {1 3} -test socket-7.5 {testing socket specific options} {socket unixOrPc} { +} -constraints {socket unixOrPc} -body { set s [socket -server accept 0] proc accept {s a p} { global x @@ -873,18 +873,17 @@ test socket-7.5 {testing socket specific options} {socket unixOrPc} { } set listen [lindex [fconfigure $s -sockname] 2] set s1 [socket 127.0.0.1 $listen] - set timer [after 10000 "set x timed_out"] vwait x + lappend l [lindex $x 0] [expr {[lindex $x 2] == $listen}] [llength $x] +} -cleanup { after cancel $timer close $s close $s1 - set l "" - lappend l [lindex $x 0] [expr {[lindex $x 2] == $listen}] [llength $x] -} {127.0.0.1 1 3} +} -result {127.0.0.1 1 3} -test socket-8.1 {testing -async flag on sockets} {socket} { - # NOTE: This test may fail on some Solaris 2.4 systems. If it does, - # check that you have these patches installed (using showrev -p): +test socket-8.1 {testing -async flag on sockets} -constraints socket -body { + # NOTE: This test may fail on some Solaris 2.4 systems. If it does, check + # that you have these patches installed (using showrev -p): # # 101907-05, 101925-02, 101945-14, 101959-03, 101969-05, 101973-03, # 101977-03, 101981-02, 101985-01, 102001-03, 102003-01, 102007-01, @@ -893,10 +892,10 @@ test socket-8.1 {testing -async flag on sockets} {socket} { # 101878-03, 101879-01, 101880-03, 101933-01, 101950-01, 102030-01, # 102057-08, 102140-01, 101920-02, 101921-09, 101922-07, 101923-03 # - # If after installing these patches you are still experiencing a - # problem, please email jyl@eng.sun.com. We have not observed this - # failure on Solaris 2.5, so another option (instead of installing - # these patches) is to upgrade to Solaris 2.5. + # If after installing these patches you are still experiencing a problem, + # please email jyl@eng.sun.com. We have not observed this failure on + # Solaris 2.5, so another option (instead of installing these patches) is + # to upgrade to Solaris 2.5. set s [socket -server accept -myaddr 127.0.0.1 0] proc accept {s a p} { global x @@ -906,16 +905,18 @@ test socket-8.1 {testing -async flag on sockets} {socket} { } set s1 [socket -async 127.0.0.1 [lindex [fconfigure $s -sockname] 2]] vwait x - set z [gets $s1] + gets $s1 +} -cleanup { close $s close $s1 - set z -} bye +} -result bye -test socket-9.1 {testing spurious events} {socket} { +test socket-9.1 {testing spurious events} -constraints socket -setup { set len 0 set spurious 0 set done 0 + set timer [after 10000 "set done timed_out"] +} -body { proc readlittle {s} { global spurious done len set l [read $s 1] @@ -938,19 +939,20 @@ test socket-9.1 {testing spurious events} {socket} { set c [socket 127.0.0.1 [lindex [fconfigure $s -sockname] 2]] puts -nonewline $c 01234567890123456789012345678901234567890123456789 close $c - set timer [after 10000 "set done timed_out"] vwait done - after cancel $timer close $s list $spurious $len -} {0 50} -test socket-9.2 {testing async write, fileevents, flush on close} {socket} { +} -cleanup { + after cancel $timer +} -result {0 50} +test socket-9.2 {testing async write, fileevents, flush on close} -constraints socket -setup { set firstblock "" for {set i 0} {$i < 5} {incr i} {set firstblock "a$firstblock$firstblock"} set secondblock "" for {set i 0} {$i < 16} {incr i} { set secondblock "b$secondblock$secondblock" } + set timer [after 10000 "set done timed_out"] set l [socket -server accept -myaddr 127.0.0.1 0] proc accept {s a p} { fconfigure $s -blocking 0 -translation lf -buffersize 16384 \ @@ -972,6 +974,7 @@ test socket-9.2 {testing async write, fileevents, flush on close} {socket} { puts -nonewline $s $secondblock close $s } +} -body { set s [socket 127.0.0.1 [lindex [fconfigure $l -sockname] 2]] fconfigure $s -blocking 0 -trans lf -buffering line set count 0 @@ -986,15 +989,27 @@ test socket-9.2 {testing async write, fileevents, flush on close} {socket} { } } fileevent $s readable "readit $s" - set timer [after 10000 "set done timed_out"] vwait done - after cancel $timer + return $count +} -cleanup { close $l - set count -} 65566 -test socket-9.3 {testing EOF stickyness} {socket} { + after cancel $timer +} -result 65566 +test socket-9.3 {testing EOF stickyness} -constraints socket -setup { + set count 0 + set done false + proc write_then_close {s} { + puts $s bye + close $s + } + proc accept {s a p} { + fconfigure $s -buffering line -translation lf + fileevent $s writable "write_then_close $s" + } + set s [socket -server accept -myaddr 127.0.0.1 0] +} -body { proc count_to_eof {s} { - global count done timer + global count done set l [gets $s] if {[eof $s]} { incr count @@ -1002,35 +1017,25 @@ test socket-9.3 {testing EOF stickyness} {socket} { close $s set done true set count {eof is sticky} - after cancel $timer } } } - proc timerproc {} { - global done count c + proc timerproc {s} { + global done count set done true set count {timer went off, eof is not sticky} - close $c - } - set count 0 - set done false - proc write_then_close {s} { - puts $s bye close $s } - proc accept {s a p} { - fconfigure $s -buffering line -translation lf - fileevent $s writable "write_then_close $s" - } - set s [socket -server accept -myaddr 127.0.0.1 0] set c [socket 127.0.0.1 [lindex [fconfigure $s -sockname] 2]] fconfigure $c -blocking off -buffering line -translation lf fileevent $c readable "count_to_eof $c" - set timer [after 1000 timerproc] + set timer [after 1000 timerproc $c] vwait done + return $count +} -cleanup { close $s - set count -} {eof is sticky} + after cancel $timer +} -result {eof is sticky} removeFile script @@ -1050,12 +1055,12 @@ test socket-10.1 {testing socket accept callback error handling} -constraints { vwait goterror close $s close $c - set goterror + return $goterror } -cleanup { interp bgerror {} $handler } -result 1 -test socket-11.1 {tcp connection} {socket doTestsWithRemoteServer} { +test socket-11.1 {tcp connection} -setup { sendCommand { set socket9_1_test_server [socket -server accept 2834] proc accept {s a p} { @@ -1063,13 +1068,14 @@ test socket-11.1 {tcp connection} {socket doTestsWithRemoteServer} { close $s } } +} -constraints {socket doTestsWithRemoteServer} -body { set s [socket $remoteServerIP 2834] - set r [gets $s] + gets $s +} -cleanup { close $s sendCommand {close $socket9_1_test_server} - set r -} done -test socket-11.2 {client specifies its port} {socket doTestsWithRemoteServer} { +} -result done +test socket-11.2 {client specifies its port} -setup { if {[info exists port]} { incr port } else { @@ -1082,18 +1088,15 @@ test socket-11.2 {client specifies its port} {socket doTestsWithRemoteServer} { close $s } } +} -constraints {socket doTestsWithRemoteServer} -body { set s [socket -myport $port $remoteServerIP 2835] set r [gets $s] + expr {$r==$port ? "ok" : "broken: $r != $port"} +} -cleanup { close $s sendCommand {close $socket9_2_test_server} - if {$r == $port} { - set result ok - } else { - set result broken - } - set result -} ok -test socket-11.3 {trying to connect, no server} {socket doTestsWithRemoteServer} { +} -result ok +test socket-11.3 {trying to connect, no server} -body { set status ok if {![catch {set s [socket $remoteServerIp 2836]}]} { if {![catch {gets $s}]} { @@ -1101,9 +1104,9 @@ test socket-11.3 {trying to connect, no server} {socket doTestsWithRemoteServer} } close $s } - set status -} ok -test socket-11.4 {remote echo, one line} {socket doTestsWithRemoteServer} { + return $status +} -constraints {socket doTestsWithRemoteServer} -result ok +test socket-11.4 {remote echo, one line} -setup { sendCommand { set socket10_6_test_server [socket -server accept 2836] proc accept {s a p} { @@ -1119,15 +1122,16 @@ test socket-11.4 {remote echo, one line} {socket doTestsWithRemoteServer} { } } } +} -constraints {socket doTestsWithRemoteServer} -body { set f [socket $remoteServerIP 2836] fconfigure $f -translation crlf -buffering line puts $f hello - set r [gets $f] - close $f + gets $f +} -cleanup { + catch {close $f} sendCommand {close $socket10_6_test_server} - set r -} hello -test socket-11.5 {remote echo, 50 lines} {socket doTestsWithRemoteServer} { +} -result hello +test socket-11.5 {remote echo, 50 lines} -setup { sendCommand { set socket10_7_test_server [socket -server accept 2836] proc accept {s a p} { @@ -1143,30 +1147,29 @@ test socket-11.5 {remote echo, 50 lines} {socket doTestsWithRemoteServer} { } } } +} -constraints {socket doTestsWithRemoteServer} -body { set f [socket $remoteServerIP 2836] fconfigure $f -translation crlf -buffering line for {set cnt 0} {$cnt < 50} {incr cnt} { puts $f "hello, $cnt" - if {[string compare [gets $f] "hello, $cnt"] != 0} { + if {[gets $f] != "hello, $cnt"} { break } } + return $cnt +} -cleanup { close $f sendCommand {close $socket10_7_test_server} - set cnt -} 50 -test socket-11.6 {socket conflict} {socket doTestsWithRemoteServer} { +} -result 50 +test socket-11.6 {socket conflict} -setup { set s1 [socket -server accept -myaddr 127.0.0.1 2836] - if {[catch {set s2 [socket -server accept -myaddr 127.0.0.1 2836]} msg]} { - set result [list 1 $msg] - } else { - set result [list 0 [lindex [fconfigure $s2 -sockname] 2]] - close $s2 - } +} -constraints {socket doTestsWithRemoteServer} -body { + set s2 [socket -server accept -myaddr 127.0.0.1 2836] + list [lindex [fconfigure $s2 -sockname] 2] [close $s2] +} -cleanup { close $s1 - set result -} {1 {couldn't open socket: address already in use}} -test socket-11.7 {server with several clients} {socket doTestsWithRemoteServer} { +} -returnCodes error -result {couldn't open socket: address already in use} +test socket-11.7 {server with several clients} -setup { sendCommand { set socket10_9_test_server [socket -server accept 2836] proc accept {s a p} { @@ -1182,6 +1185,7 @@ test socket-11.7 {server with several clients} {socket doTestsWithRemoteServer} } } } +} -constraints {socket doTestsWithRemoteServer} -body { set s1 [socket $remoteServerIP 2836] fconfigure $s1 -buffering line set s2 [socket $remoteServerIP 2836] @@ -1196,13 +1200,14 @@ test socket-11.7 {server with several clients} {socket doTestsWithRemoteServer} puts $s3 hello,s3 gets $s3 } + return $i +} -cleanup { close $s1 close $s2 close $s3 sendCommand {close $socket10_9_test_server} - set i -} 100 -test socket-11.8 {client with several servers} {socket doTestsWithRemoteServer} { +} -result 100 +test socket-11.8 {client with several servers} -setup { sendCommand { set s1 [socket -server "accept 4003" 4003] set s2 [socket -server "accept 4004" 4004] @@ -1212,12 +1217,13 @@ test socket-11.8 {client with several servers} {socket doTestsWithRemoteServer} close $s } } +} -constraints {socket doTestsWithRemoteServer} -body { set s1 [socket $remoteServerIP 4003] set s2 [socket $remoteServerIP 4004] set s3 [socket $remoteServerIP 4005] - set l "" - lappend l [gets $s1] [gets $s1] [eof $s1] [gets $s2] [gets $s2] [eof $s2] \ + list [gets $s1] [gets $s1] [eof $s1] [gets $s2] [gets $s2] [eof $s2] \ [gets $s3] [gets $s3] [eof $s3] +} -cleanup { close $s1 close $s2 close $s3 @@ -1226,8 +1232,7 @@ test socket-11.8 {client with several servers} {socket doTestsWithRemoteServer} close $s2 close $s3 } - set l -} {4003 {} 1 4004 {} 1 4005 {} 1} +} -result {4003 {} 1 4004 {} 1 4005 {} 1} test socket-11.9 {accept callback error} -constraints { socket doTestsWithRemoteServer } -setup { @@ -1236,40 +1241,42 @@ test socket-11.9 {accept callback error} -constraints { } set handler [interp bgerror {}] interp bgerror {} [namespace which myHandler] + set timer [after 10000 "set x timed_out"] } -body { set s [socket -server accept 2836] proc accept {s a p} {expr 10 / 0} - if {[catch {sendCommand { + if {[catch { + sendCommand { set peername [fconfigure $callerSocket -peername] set s [socket [lindex $peername 0] 2836] close $s - }} msg]} { + } + } msg]} then { close $s error $msg } - set timer [after 10000 "set x timed_out"] vwait x - after cancel $timer - close $s - set x + return $x } -cleanup { + close $s + after cancel $timer interp bgerror {} $handler } -result {divide by zero} -test socket-11.10 {testing socket specific options} {socket doTestsWithRemoteServer} { +test socket-11.10 {testing socket specific options} -setup { sendCommand { set socket10_12_test_server [socket -server accept 2836] proc accept {s a p} {close $s} } +} -constraints {socket doTestsWithRemoteServer} -body { set s [socket $remoteServerIP 2836] set p [fconfigure $s -peername] set n [fconfigure $s -sockname] - set l "" - lappend l [lindex $p 2] [llength $p] [llength $p] + list [lindex $p 2] [llength $p] [llength $n] +} -cleanup { close $s sendCommand {close $socket10_12_test_server} - set l -} {2836 3 3} -test socket-11.11 {testing spurious events} {socket doTestsWithRemoteServer} { +} -result {2836 3 3} +test socket-11.11 {testing spurious events} -setup { sendCommand { set socket10_13_test_server [socket -server accept 2836] proc accept {s a p} { @@ -1286,6 +1293,8 @@ test socket-11.11 {testing spurious events} {socket doTestsWithRemoteServer} { set len 0 set spurious 0 set done 0 + set timer [after 40000 "set done timed_out"] +} -constraints {socket doTestsWithRemoteServer} -body { proc readlittle {s} { global spurious done len set l [read $s 1] @@ -1302,56 +1311,48 @@ test socket-11.11 {testing spurious events} {socket doTestsWithRemoteServer} { } set c [socket $remoteServerIP 2836] fileevent $c readable "readlittle $c" - set timer [after 40000 "set done timed_out"] vwait done + list $spurious $len $done +} -cleanup { after cancel $timer sendCommand {close $socket10_13_test_server} - list $spurious $len $done -} {0 2690 1} -test socket-11.12 {testing EOF stickyness} {socket doTestsWithRemoteServer} { +} -result {0 2690 1} +test socket-11.12 {testing EOF stickyness} -constraints {socket doTestsWithRemoteServer} -setup { set counter 0 set done 0 + sendCommand { + set socket10_14_test_server [socket -server accept 2836] + proc accept {s a p} { + after 100 close $s + } + } + proc timed_out {} { + global c done + set done {timed_out, EOF is not sticky} + close $c + } + set after_id [after 1000 timed_out] +} -body { proc count_up {s} { - global counter done after_id + global counter done set l [gets $s] if {[eof $s]} { incr counter if {$counter > 9} { set done {EOF is sticky} - after cancel $after_id close $s } } } - proc timed_out {} { - global c done - set done {timed_out, EOF is not sticky} - close $c - } - sendCommand { - set socket10_14_test_server [socket -server accept 2836] - proc accept {s a p} { - after 100 close $s - } - } set c [socket $remoteServerIP 2836] fileevent $c readable [list count_up $c] - set after_id [after 1000 timed_out] vwait done + return $done +} -cleanup { + after cancel $after_id sendCommand {close $socket10_14_test_server} - set done -} {EOF is sticky} -test socket-11.13 {testing async write, async flush, async close} \ - {socket doTestsWithRemoteServer} { - proc readit {s} { - global count done - set l [read $s] - incr count [string length $l] - if {[eof $s]} { - close $s - set done 1 - } - } +} -result {EOF is sticky} +test socket-11.13 {testing async write, async flush, async close} -setup { sendCommand { set firstblock "" for {set i 0} {$i < 5} {incr i} { @@ -1383,112 +1384,109 @@ test socket-11.13 {testing async write, async flush, async close} \ close $s } } + set timer [after 10000 "set done timed_out"] +} -constraints {socket doTestsWithRemoteServer} -body { + proc readit {s} { + global count done + set l [read $s] + incr count [string length $l] + if {[eof $s]} { + close $s + set done 1 + } + } set s [socket $remoteServerIP 2845] fconfigure $s -blocking 0 -trans lf -buffering line set count 0 puts $s hello fileevent $s readable "readit $s" - set timer [after 10000 "set done timed_out"] vwait done + return $count +} -cleanup { after cancel $timer sendCommand {close $l} - set count -} 65566 +} -result 65566 set path(script1) [makeFile {} script1] set path(script2) [makeFile {} script2] -test socket-12.1 {testing inheritance of server sockets} {socket stdio exec} { +test socket-12.1 {testing inheritance of server sockets} -setup { file delete $path(script1) file delete $path(script2) - - # Script1 is just a 10 second delay. If the server socket - # is inherited, it will be held open for 10 seconds - + # Script1 is just a 10 second delay. If the server socket is inherited, it + # will be held open for 10 seconds set f [open $path(script1) w] puts $f { after 10000 exit vwait forever } close $f - - # Script2 creates the server socket, launches script1, - # waits a second, and exits. The server socket will now - # be closed unless script1 inherited it. - + # Script2 creates the server socket, launches script1, waits a second, and + # exits. The server socket will now be closed unless script1 inherited it. set f [open $path(script2) w] puts $f [list set tcltest [interpreter]] - puts -nonewline $f { + puts $f [list set delay $path(script1)] + puts $f { set f [socket -server accept -myaddr 127.0.0.1 0] puts [lindex [fconfigure $f -sockname] 2] proc accept { file addr port } { close $file } - exec $tcltest } - puts $f [list $path(script1) &] - puts $f { + exec $tcltest $delay & close $f after 1000 exit vwait forever } close $f - +} -constraints {socket stdio exec} -body { # Launch script2 and wait 5 seconds - ### exec [interpreter] script2 & set p [open "|[list [interpreter] $path(script2)]" r] gets $p listen - after 5000 { set ok_to_proceed 1 } vwait ok_to_proceed - # If we can still connect to the server, the socket got inherited. - - if {[catch {socket 127.0.0.1 $listen} msg]} { - set x {server socket was not inherited} + if {[catch {close [socket 127.0.0.1 $listen]}]} { + return {server socket was not inherited} } else { - close $msg - set x {server socket was inherited} + return {server socket was inherited} } - +} -cleanup { close $p - set x -} {server socket was not inherited} -test socket-12.2 {testing inheritance of client sockets} {socket stdio exec} { +} -result {server socket was not inherited} +test socket-12.2 {testing inheritance of client sockets} -setup { file delete $path(script1) file delete $path(script2) - - # Script1 is just a 20 second delay. If the server socket - # is inherited, it will be held open for 10 seconds - + # Script1 is just a 20 second delay. If the server socket is inherited, it + # will be held open for 20 seconds set f [open $path(script1) w] puts $f { after 20000 exit vwait forever } close $f - - # Script2 opens the client socket and writes to it. It then - # launches script1 and exits. If the child process inherited the - # client socket, the socket will still be open. - + # Script2 opens the client socket and writes to it. It then launches + # script1 and exits. If the child process inherited the client socket, the + # socket will still be open. set f [open $path(script2) w] puts $f [list set tcltest [interpreter]] - puts -nonewline $f { + puts $f [list set delay $path(script1)] + puts $f { gets stdin port set f [socket 127.0.0.1 $port] - exec $tcltest } - puts $f [list $path(script1) &] - puts $f { + exec $tcltest $delay & puts $f testing flush $f after 1000 exit vwait forever } close $f - + # If the socket doesn't hit end-of-file in 10 seconds, the script1 process + # must have inherited the client. + set failed 0 + after 10000 [list set failed 1] +} -constraints {socket stdio exec} -body { # Create the server socket - set server [socket -server accept -myaddr 127.0.0.1 0] proc accept { file host port } { # When the client connects, establish the read handler @@ -1496,17 +1494,15 @@ test socket-12.2 {testing inheritance of client sockets} {socket stdio exec} { close $server fileevent $file readable [list getdata $file] fconfigure $file -buffering line -blocking 0 - return } proc getdata { file } { # Read handler on the accepted socket. - global x - global failed + global x failed set status [catch {read $file} data] if {$status != 0} { set x {read failed, error was $data} catch { close $file } - } elseif {[string compare {} $data]} { + } elseif {$data ne ""} { } elseif {[fblocked $file]} { } elseif {[eof $file]} { if {$failed} { @@ -1519,80 +1515,58 @@ test socket-12.2 {testing inheritance of client sockets} {socket stdio exec} { set x {impossible case} catch { close $file } } - return } - - # If the socket doesn't hit end-of-file in 10 seconds, the - # script1 process must have inherited the client. - - set failed 0 - after 10000 [list set failed 1] - # Launch the script2 process ### exec [interpreter] script2 & - set p [open "|[list [interpreter] $path(script2)]" w] puts $p [lindex [fconfigure $server -sockname] 2] ; flush $p - vwait x + return $x +} -cleanup { if {!$failed} { vwait failed } close $p - set x -} {client socket was not inherited} -test socket-12.3 {testing inheritance of accepted sockets} {socket stdio exec} { +} -result {client socket was not inherited} +test socket-12.3 {testing inheritance of accepted sockets} -setup { file delete $path(script1) file delete $path(script2) - set f [open $path(script1) w] puts $f { after 10000 exit vwait forever } close $f - set f [open $path(script2) w] puts $f [list set tcltest [interpreter]] - puts -nonewline $f { + puts $f [list set delay $path(script1)] + puts $f { set server [socket -server accept -myaddr 127.0.0.1 0] puts stdout [lindex [fconfigure $server -sockname] 2] - proc accept { file host port } } - puts $f \{ - puts -nonewline $f { - global tcltest + proc accept { file host port } { + global tcltest delay puts $file {test data on socket} - exec $tcltest } - puts $f [list $path(script1) &] - puts $f { + exec $tcltest $delay & after 1000 exit } - puts $f \} - puts $f { vwait forever } close $f - - # Launch the script2 process and connect to it. See how long - # the socket stays open - +} -constraints {socket stdio exec} -body { + # Launch the script2 process and connect to it. See how long the socket + # stays open ## exec [interpreter] script2 & set p [open "|[list [interpreter] $path(script2)]" r] gets $p listen - after 1000 set ok_to_proceed 1 vwait ok_to_proceed - set f [socket 127.0.0.1 $listen] fconfigure $f -buffering full -blocking 0 fileevent $f readable [list getdata $f] - - # If the socket is still open after 5 seconds, the script1 process - # must have inherited the accepted socket. - + # If the socket is still open after 5 seconds, the script1 process must + # have inherited the accepted socket. set failed 0 after 5000 set failed 1 - proc getdata { file } { # Read handler on the client socket. global x @@ -1616,15 +1590,13 @@ test socket-12.3 {testing inheritance of accepted sockets} {socket stdio exec} { } return } - vwait x + return $x +} -cleanup { + catch {close $p} +} -result {accepted socket was not inherited} - close $p - set x -} {accepted socket was not inherited} - -test socket-13.1 {Testing use of shared socket between two threads} \ - -constraints {socket testthread} -setup { +test socket-13.1 {Testing use of shared socket between two threads} -setup { threadReap set path(script) [makeFile { set f [socket -server accept -myaddr 127.0.0.1 0] @@ -1651,29 +1623,28 @@ test socket-13.1 {Testing use of shared socket between two threads} \ # thread cleans itself up. testthread exit } script] -} -body { +} -constraints {socket testthread} -body { # create a thread set serverthread [testthread create [list source $path(script) ] ] update set port [testthread send $serverthread {set listen}] update - after 1000 set s [socket 127.0.0.1 $port] fconfigure $s -buffering line - catch { puts $s "hello" gets $s result } close $s update - after 2000 - lappend result [threadReap] + append result " " [threadReap] } -cleanup { removeFile script } -result {hello 1} + +# ---------------------------------------------------------------------- removeFile script1 removeFile script2 @@ -1688,3 +1659,8 @@ catch {close $remoteProcChan} ::tcltest::cleanupTests flush stdout return + +# Local Variables: +# mode: tcl +# fill-column: 78 +# End: -- cgit v0.12 From d39d55ae2457b19db2df1d6a3d23504d28d62815 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 2 Sep 2008 20:56:05 +0000 Subject: * generic/tcl.h: Removed the conditional #define of _ANSI_ARGS_ that would support pre-prototype C compilers. Since _ANSI_ARGS_ is no longer used in tclDecls.h, it's clear no one compiling against Tcl 8.5 headers is making use of a -DNO_PROTOTYPES configuration. --- ChangeLog | 8 ++++++++ generic/tcl.h | 24 +++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b03adf..e6d26b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-02 Don Porter + + * generic/tcl.h: Removed the conditional #define of + _ANSI_ARGS_ that would support pre-prototype C compilers. Since + _ANSI_ARGS_ is no longer used in tclDecls.h, it's clear no one + compiling against Tcl 8.5 headers is making use of a -DNO_PROTOTYPES + configuration. + 2008-09-02 Donal K. Fellows * tests/socket.test: Rewrote so as to use tcltest2 better. diff --git a/generic/tcl.h b/generic/tcl.h index 4e87df2..d61e9bf 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.267 2008/08/28 16:24:16 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.268 2008/09/02 20:56:07 dgp Exp $ */ #ifndef _TCL @@ -223,11 +223,23 @@ extern "C" { #endif /* + * The following _ANSI_ARGS_ macro is to support old extensions + * written for older versions of Tcl where it permitted support + * for compilers written in the pre-prototype era of C. + * + * New code should use prototypes. + */ + +#ifndef TCL_NO_DEPRECATED +# undef _ANSI_ARGS_ +# define _ANSI_ARGS_(x) x +#endif + +/* * Definitions that allow this header file to be used either with or without - * ANSI C features like function prototypes. + * ANSI C features. */ -#undef _ANSI_ARGS_ #undef CONST #ifndef INLINE # define INLINE @@ -239,12 +251,6 @@ extern "C" { # define CONST #endif -#ifndef NO_PROTOTYPES -# define _ANSI_ARGS_(x) x -#else -# define _ANSI_ARGS_(x) () -#endif - #ifdef USE_NON_CONST # ifdef USE_COMPAT_CONST # error define at most one of USE_NON_CONST and USE_COMPAT_CONST -- cgit v0.12 From a8602e1abc63945cb101c7a028629b37326832ef Mon Sep 17 00:00:00 2001 From: das Date: Tue, 2 Sep 2008 22:55:32 +0000 Subject: unbreak the build with TCL_NO_DEPRECATED defined --- generic/tcl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic/tcl.h b/generic/tcl.h index d61e9bf..fbe26e5 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.268 2008/09/02 20:56:07 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.269 2008/09/02 22:55:32 das Exp $ */ #ifndef _TCL @@ -233,6 +233,8 @@ extern "C" { #ifndef TCL_NO_DEPRECATED # undef _ANSI_ARGS_ # define _ANSI_ARGS_(x) x +#else +# define _ANSI_ARGS_(x) x #endif /* -- cgit v0.12 From e72b23c2ef58f8fc0fe5d9f1b6fd9dc04caedefa Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 3 Sep 2008 05:43:22 +0000 Subject: * generic/tcl.h: Stripped "callers" of the _ANSI_ARGS_ macro * compat/dirent2.h: to support a TCL_NO_DEPRECATED build. * compat/dlfcn.h: * unix/tclUnixPort.h: --- ChangeLog | 5 + compat/dirent2.h | 8 +- compat/dlfcn.h | 14 +-- generic/tcl.h | 348 ++++++++++++++++++++++++----------------------------- unix/tclUnixPort.h | 5 +- 5 files changed, 176 insertions(+), 204 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6d26b3..0c86784 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-09-02 Don Porter + * generic/tcl.h: Stripped "callers" of the _ANSI_ARGS_ macro + * compat/dirent2.h: to support a TCL_NO_DEPRECATED build. + * compat/dlfcn.h: + * unix/tclUnixPort.h: + * generic/tcl.h: Removed the conditional #define of _ANSI_ARGS_ that would support pre-prototype C compilers. Since _ANSI_ARGS_ is no longer used in tclDecls.h, it's clear no one diff --git a/compat/dirent2.h b/compat/dirent2.h index 7c2406c..8deed91 100644 --- a/compat/dirent2.h +++ b/compat/dirent2.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: dirent2.h,v 1.2 1998/09/14 18:39:44 stanton Exp $ + * RCS: @(#) $Id: dirent2.h,v 1.3 2008/09/03 05:43:31 dgp Exp $ */ #ifndef _DIRENT @@ -52,8 +52,8 @@ typedef struct _dirdesc { * Procedures defined for reading directories: */ -extern void closedir _ANSI_ARGS_((DIR *dirp)); -extern DIR * opendir _ANSI_ARGS_((char *name)); -extern struct dirent * readdir _ANSI_ARGS_((DIR *dirp)); +extern void closedir (DIR *dirp); +extern DIR * opendir (char *name); +extern struct dirent * readdir (DIR *dirp); #endif /* _DIRENT */ diff --git a/compat/dlfcn.h b/compat/dlfcn.h index 1dee078..03d878a 100644 --- a/compat/dlfcn.h +++ b/compat/dlfcn.h @@ -17,7 +17,7 @@ * for any results of using the software, alterations are clearly marked * as such, and this notice is not modified. * - * RCS: @(#) $Id: dlfcn.h,v 1.2 1998/09/14 18:39:44 stanton Exp $ + * RCS: @(#) $Id: dlfcn.h,v 1.3 2008/09/03 05:43:31 dgp Exp $ */ /* @@ -49,14 +49,14 @@ extern "C" { * that contains functions to be called to initialize and terminate. */ struct dl_info { - void (*init) _ANSI_ARGS_((void)); - void (*fini) _ANSI_ARGS_((void)); + void (*init) (void); + void (*fini) (void); }; -VOID *dlopen _ANSI_ARGS_((const char *path, int mode)); -VOID *dlsym _ANSI_ARGS_((void *handle, const char *symbol)); -char *dlerror _ANSI_ARGS_((void)); -int dlclose _ANSI_ARGS_((void *handle)); +VOID *dlopen (const char *path, int mode); +VOID *dlsym (void *handle, const char *symbol); +char *dlerror (void); +int dlclose (void *handle); #ifdef __cplusplus } diff --git a/generic/tcl.h b/generic/tcl.h index fbe26e5..39c578a 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.269 2008/09/02 22:55:32 das Exp $ + * RCS: @(#) $Id: tcl.h,v 1.270 2008/09/03 05:43:31 dgp Exp $ */ #ifndef _TCL @@ -233,8 +233,6 @@ extern "C" { #ifndef TCL_NO_DEPRECATED # undef _ANSI_ARGS_ # define _ANSI_ARGS_(x) x -#else -# define _ANSI_ARGS_(x) x #endif /* @@ -462,7 +460,7 @@ typedef struct stat Tcl_StatBuf; typedef struct Tcl_Interp { char *result; /* If the last command returned a string * result, this points to it. */ - void (*freeProc) _ANSI_ARGS_((char *blockPtr)); + void (*freeProc) (char *blockPtr); /* Zero means the string result is statically * allocated. TCL_DYNAMIC means it was * allocated with ckalloc and should be freed @@ -503,9 +501,9 @@ typedef void *Tcl_ThreadDataKey; */ #if defined __WIN32__ -typedef unsigned (__stdcall Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); +typedef unsigned (__stdcall Tcl_ThreadCreateProc) (ClientData clientData); #else -typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_ThreadCreateProc) (ClientData clientData); #endif /* @@ -657,72 +655,64 @@ struct Tcl_Obj; * Function types defined by Tcl: */ -typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp)); -typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int code)); -typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask)); -typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data)); -typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData)); -typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int argc, CONST84 char *argv[])); -typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc, - ClientData cmdClientData, int argc, CONST84 char *argv[])); -typedef int (Tcl_CmdObjTraceProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int level, CONST char *command, - Tcl_Command commandInfo, int objc, struct Tcl_Obj * CONST * objv)); -typedef void (Tcl_CmdObjTraceDeleteProc) _ANSI_ARGS_((ClientData clientData)); -typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr, - struct Tcl_Obj *dupPtr)); -typedef int (Tcl_EncodingConvertProc)_ANSI_ARGS_((ClientData clientData, - CONST char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, - char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, - int *dstCharsPtr)); -typedef void (Tcl_EncodingFreeProc)_ANSI_ARGS_((ClientData clientData)); -typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags)); -typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData, - int flags)); -typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr, - ClientData clientData)); -typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData, - int flags)); -typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData)); -typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask)); -typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData)); -typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr)); -typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr)); -typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData)); -typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp)); -typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr)); -typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData)); -typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv)); -typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp)); -typedef int (Tcl_PackageUnloadProc) _ANSI_ARGS_((Tcl_Interp *interp, - int flags)); -typedef void (Tcl_PanicProc) _ANSI_ARGS_((CONST char *format, ...)); -typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData, - Tcl_Channel chan, char *address, int port)); -typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData)); -typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp, - struct Tcl_Obj *objPtr)); -typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr)); -typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, CONST84 char *part1, CONST84 char *part2, - int flags)); -typedef void (Tcl_CommandTraceProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, CONST char *oldName, CONST char *newName, - int flags)); -typedef void (Tcl_CreateFileHandlerProc) _ANSI_ARGS_((int fd, int mask, - Tcl_FileProc *proc, ClientData clientData)); -typedef void (Tcl_DeleteFileHandlerProc) _ANSI_ARGS_((int fd)); -typedef void (Tcl_AlertNotifierProc) _ANSI_ARGS_((ClientData clientData)); -typedef void (Tcl_ServiceModeHookProc) _ANSI_ARGS_((int mode)); -typedef ClientData (Tcl_InitNotifierProc) _ANSI_ARGS_((VOID)); -typedef void (Tcl_FinalizeNotifierProc) _ANSI_ARGS_((ClientData clientData)); -typedef void (Tcl_MainLoopProc) _ANSI_ARGS_((void)); +typedef int (Tcl_AppInitProc) (Tcl_Interp *interp); +typedef int (Tcl_AsyncProc) (ClientData clientData, Tcl_Interp *interp, + int code); +typedef void (Tcl_ChannelProc) (ClientData clientData, int mask); +typedef void (Tcl_CloseProc) (ClientData data); +typedef void (Tcl_CmdDeleteProc) (ClientData clientData); +typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp, + int argc, CONST84 char *argv[]); +typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp, + int level, char *command, Tcl_CmdProc *proc, + ClientData cmdClientData, int argc, CONST84 char *argv[]); +typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp, + int level, CONST char *command, Tcl_Command commandInfo, int objc, + struct Tcl_Obj * CONST * objv); +typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData); +typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr, + struct Tcl_Obj *dupPtr); +typedef int (Tcl_EncodingConvertProc) (ClientData clientData, CONST char *src, + int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, + int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); +typedef void (Tcl_EncodingFreeProc) (ClientData clientData); +typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags); +typedef void (Tcl_EventCheckProc) (ClientData clientData, int flags); +typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, ClientData clientData); +typedef void (Tcl_EventSetupProc) (ClientData clientData, int flags); +typedef void (Tcl_ExitProc) (ClientData clientData); +typedef void (Tcl_FileProc) (ClientData clientData, int mask); +typedef void (Tcl_FileFreeProc) (ClientData clientData); +typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr); +typedef void (Tcl_FreeProc) (char *blockPtr); +typedef void (Tcl_IdleProc) (ClientData clientData); +typedef void (Tcl_InterpDeleteProc) (ClientData clientData, + Tcl_Interp *interp); +typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp, + Tcl_Value *args, Tcl_Value *resultPtr); +typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData); +typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp, + int objc, struct Tcl_Obj * CONST * objv); +typedef int (Tcl_PackageInitProc) (Tcl_Interp *interp); +typedef int (Tcl_PackageUnloadProc) (Tcl_Interp *interp, int flags); +typedef void (Tcl_PanicProc) (CONST char *format, ...); +typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan, + char *address, int port); +typedef void (Tcl_TimerProc) (ClientData clientData); +typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr); +typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr); +typedef char *(Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp, + CONST84 char *part1, CONST84 char *part2, int flags); +typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp, + CONST char *oldName, CONST char *newName, int flags); +typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc, + ClientData clientData); +typedef void (Tcl_DeleteFileHandlerProc) (int fd); +typedef void (Tcl_AlertNotifierProc) (ClientData clientData); +typedef void (Tcl_ServiceModeHookProc) (int mode); +typedef ClientData (Tcl_InitNotifierProc) (VOID); +typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData); +typedef void (Tcl_MainLoopProc) (void); /* * The following structure represents a type of object, which is a particular @@ -802,9 +792,9 @@ typedef struct Tcl_Obj { * to compute or has side effects. */ -void Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr)); -void Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr)); -int Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr)); +void Tcl_IncrRefCount (Tcl_Obj *objPtr); +void Tcl_DecrRefCount (Tcl_Obj *objPtr); +int Tcl_IsShared (Tcl_Obj *objPtr); /* * The following structure contains the state needed by Tcl_SaveResult. No-one @@ -1098,13 +1088,11 @@ typedef struct Tcl_HashKeyType Tcl_HashKeyType; typedef struct Tcl_HashTable Tcl_HashTable; typedef struct Tcl_HashEntry Tcl_HashEntry; -typedef unsigned int (Tcl_HashKeyProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr, - VOID *keyPtr)); -typedef int (Tcl_CompareHashKeysProc) _ANSI_ARGS_((VOID *keyPtr, - Tcl_HashEntry *hPtr)); -typedef Tcl_HashEntry *(Tcl_AllocHashEntryProc) _ANSI_ARGS_(( - Tcl_HashTable *tablePtr, VOID *keyPtr)); -typedef void (Tcl_FreeHashEntryProc) _ANSI_ARGS_((Tcl_HashEntry *hPtr)); +typedef unsigned int (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, VOID *keyPtr); +typedef int (Tcl_CompareHashKeysProc) (VOID *keyPtr, Tcl_HashEntry *hPtr); +typedef Tcl_HashEntry *(Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr, + VOID *keyPtr); +typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr); /* * This flag controls whether the hash table stores the hash of a key, or @@ -1239,10 +1227,9 @@ struct Tcl_HashTable { * TCL_ONE_WORD_KEYS, or an integer giving the * number of ints that is the size of the * key. */ - Tcl_HashEntry *(*findProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr, - CONST char *key)); - Tcl_HashEntry *(*createProc) _ANSI_ARGS_((Tcl_HashTable *tablePtr, - CONST char *key, int *newPtr)); + Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, CONST char *key); + Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, CONST char *key, + int *newPtr); Tcl_HashKeyType *typePtr; /* Type of the keys used in the * Tcl_HashTable. */ }; @@ -1353,17 +1340,15 @@ typedef struct Tcl_Time { long usec; /* Microseconds. */ } Tcl_Time; -typedef void (Tcl_SetTimerProc) _ANSI_ARGS_((CONST86 Tcl_Time *timePtr)); -typedef int (Tcl_WaitForEventProc) _ANSI_ARGS_((CONST86 Tcl_Time *timePtr)); +typedef void (Tcl_SetTimerProc) (CONST86 Tcl_Time *timePtr); +typedef int (Tcl_WaitForEventProc) (CONST86 Tcl_Time *timePtr); /* * TIP #233 (Virtualized Time) */ -typedef void (Tcl_GetTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf, - ClientData clientData)); -typedef void (Tcl_ScaleTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf, - ClientData clientData)); +typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, ClientData clientData); +typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData); /* * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler to @@ -1421,45 +1406,41 @@ typedef void (Tcl_ScaleTimeProc) _ANSI_ARGS_((Tcl_Time *timebuf, * Typedefs for the various operations in a channel type: */ -typedef int (Tcl_DriverBlockModeProc) _ANSI_ARGS_(( - ClientData instanceData, int mode)); -typedef int (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData, - Tcl_Interp *interp)); -typedef int (Tcl_DriverClose2Proc) _ANSI_ARGS_((ClientData instanceData, - Tcl_Interp *interp, int flags)); -typedef int (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData, - char *buf, int toRead, int *errorCodePtr)); -typedef int (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData, - CONST84 char *buf, int toWrite, int *errorCodePtr)); -typedef int (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData, - long offset, int mode, int *errorCodePtr)); -typedef int (Tcl_DriverSetOptionProc) _ANSI_ARGS_(( - ClientData instanceData, Tcl_Interp *interp, - CONST char *optionName, CONST char *value)); -typedef int (Tcl_DriverGetOptionProc) _ANSI_ARGS_(( - ClientData instanceData, Tcl_Interp *interp, - CONST84 char *optionName, Tcl_DString *dsPtr)); -typedef void (Tcl_DriverWatchProc) _ANSI_ARGS_(( - ClientData instanceData, int mask)); -typedef int (Tcl_DriverGetHandleProc) _ANSI_ARGS_(( - ClientData instanceData, int direction, - ClientData *handlePtr)); -typedef int (Tcl_DriverFlushProc) _ANSI_ARGS_((ClientData instanceData)); -typedef int (Tcl_DriverHandlerProc) _ANSI_ARGS_(( - ClientData instanceData, int interestMask)); -typedef Tcl_WideInt (Tcl_DriverWideSeekProc) _ANSI_ARGS_(( - ClientData instanceData, Tcl_WideInt offset, - int mode, int *errorCodePtr)); +typedef int (Tcl_DriverBlockModeProc) (ClientData instanceData, int mode); +typedef int (Tcl_DriverCloseProc) (ClientData instanceData, + Tcl_Interp *interp); +typedef int (Tcl_DriverClose2Proc) (ClientData instanceData, + Tcl_Interp *interp, int flags); +typedef int (Tcl_DriverInputProc) (ClientData instanceData, char *buf, + int toRead, int *errorCodePtr); +typedef int (Tcl_DriverOutputProc) (ClientData instanceData, + CONST84 char *buf, int toWrite, int *errorCodePtr); +typedef int (Tcl_DriverSeekProc) (ClientData instanceData, long offset, + int mode, int *errorCodePtr); +typedef int (Tcl_DriverSetOptionProc) (ClientData instanceData, + Tcl_Interp *interp, CONST char *optionName, + CONST char *value); +typedef int (Tcl_DriverGetOptionProc) (ClientData instanceData, + Tcl_Interp *interp, CONST84 char *optionName, + Tcl_DString *dsPtr); +typedef void (Tcl_DriverWatchProc) (ClientData instanceData, int mask); +typedef int (Tcl_DriverGetHandleProc) (ClientData instanceData, + int direction, ClientData *handlePtr); +typedef int (Tcl_DriverFlushProc) (ClientData instanceData); +typedef int (Tcl_DriverHandlerProc) (ClientData instanceData, + int interestMask); +typedef Tcl_WideInt (Tcl_DriverWideSeekProc) (ClientData instanceData, + Tcl_WideInt offset, int mode, int *errorCodePtr); /* * TIP #218, Channel Thread Actions */ -typedef void (Tcl_DriverThreadActionProc) _ANSI_ARGS_ (( - ClientData instanceData, int action)); +typedef void (Tcl_DriverThreadActionProc) (ClientData instanceData, + int action); /* * TIP #208, File Truncation (etc.) */ -typedef int (Tcl_DriverTruncateProc) _ANSI_ARGS_(( - ClientData instanceData, Tcl_WideInt length)); +typedef int (Tcl_DriverTruncateProc) (ClientData instanceData, + Tcl_WideInt length); /* * struct Tcl_ChannelType: @@ -1605,59 +1586,48 @@ typedef struct Tcl_GlobTypeData { * Typedefs for the various filesystem operations: */ -typedef int (Tcl_FSStatProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, Tcl_StatBuf *buf)); -typedef int (Tcl_FSAccessProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, int mode)); -typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) _ANSI_ARGS_(( - Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode, int permissions)); -typedef int (Tcl_FSMatchInDirectoryProc) _ANSI_ARGS_((Tcl_Interp *interp, - Tcl_Obj *result, Tcl_Obj *pathPtr, CONST char *pattern, - Tcl_GlobTypeData * types)); -typedef Tcl_Obj * (Tcl_FSGetCwdProc) _ANSI_ARGS_((Tcl_Interp *interp)); -typedef int (Tcl_FSChdirProc) _ANSI_ARGS_((Tcl_Obj *pathPtr)); -typedef int (Tcl_FSLstatProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, - Tcl_StatBuf *buf)); -typedef int (Tcl_FSCreateDirectoryProc) _ANSI_ARGS_((Tcl_Obj *pathPtr)); -typedef int (Tcl_FSDeleteFileProc) _ANSI_ARGS_((Tcl_Obj *pathPtr)); -typedef int (Tcl_FSCopyDirectoryProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr, - Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr)); -typedef int (Tcl_FSCopyFileProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr, - Tcl_Obj *destPathPtr)); -typedef int (Tcl_FSRemoveDirectoryProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, - int recursive, Tcl_Obj **errorPtr)); -typedef int (Tcl_FSRenameFileProc) _ANSI_ARGS_((Tcl_Obj *srcPathPtr, - Tcl_Obj *destPathPtr)); -typedef void (Tcl_FSUnloadFileProc) _ANSI_ARGS_((Tcl_LoadHandle loadHandle)); -typedef Tcl_Obj * (Tcl_FSListVolumesProc) _ANSI_ARGS_((void)); +typedef int (Tcl_FSStatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); +typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode); +typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp, + Tcl_Obj *pathPtr, int mode, int permissions); +typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result, + Tcl_Obj *pathPtr, CONST char *pattern, Tcl_GlobTypeData * types); +typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp); +typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr); +typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); +typedef int (Tcl_FSCreateDirectoryProc) (Tcl_Obj *pathPtr); +typedef int (Tcl_FSDeleteFileProc) (Tcl_Obj *pathPtr); +typedef int (Tcl_FSCopyDirectoryProc) (Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); +typedef int (Tcl_FSCopyFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); +typedef int (Tcl_FSRemoveDirectoryProc) (Tcl_Obj *pathPtr, int recursive, + Tcl_Obj **errorPtr); +typedef int (Tcl_FSRenameFileProc) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); +typedef void (Tcl_FSUnloadFileProc) (Tcl_LoadHandle loadHandle); +typedef Tcl_Obj * (Tcl_FSListVolumesProc) (void); /* We have to declare the utime structure here. */ struct utimbuf; -typedef int (Tcl_FSUtimeProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, - struct utimbuf *tval)); -typedef int (Tcl_FSNormalizePathProc) _ANSI_ARGS_((Tcl_Interp *interp, - Tcl_Obj *pathPtr, int nextCheckpoint)); -typedef int (Tcl_FSFileAttrsGetProc) _ANSI_ARGS_((Tcl_Interp *interp, - int index, Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)); -typedef CONST char ** (Tcl_FSFileAttrStringsProc) _ANSI_ARGS_(( - Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)); -typedef int (Tcl_FSFileAttrsSetProc) _ANSI_ARGS_((Tcl_Interp *interp, - int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr)); -typedef Tcl_Obj * (Tcl_FSLinkProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, - Tcl_Obj *toPtr, int linkType)); -typedef int (Tcl_FSLoadFileProc) _ANSI_ARGS_((Tcl_Interp * interp, - Tcl_Obj *pathPtr, Tcl_LoadHandle *handlePtr, - Tcl_FSUnloadFileProc **unloadProcPtr)); -typedef int (Tcl_FSPathInFilesystemProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, - ClientData *clientDataPtr)); -typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) _ANSI_ARGS_(( - Tcl_Obj *pathPtr)); -typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) _ANSI_ARGS_(( - Tcl_Obj *pathPtr)); -typedef void (Tcl_FSFreeInternalRepProc) _ANSI_ARGS_((ClientData clientData)); -typedef ClientData (Tcl_FSDupInternalRepProc) _ANSI_ARGS_(( - ClientData clientData)); -typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) _ANSI_ARGS_(( - ClientData clientData)); -typedef ClientData (Tcl_FSCreateInternalRepProc) _ANSI_ARGS_(( - Tcl_Obj *pathPtr)); +typedef int (Tcl_FSUtimeProc) (Tcl_Obj *pathPtr, struct utimbuf *tval); +typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, + int nextCheckpoint); +typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index, + Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); +typedef CONST char ** (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr, + Tcl_Obj **objPtrRef); +typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index, + Tcl_Obj *pathPtr, Tcl_Obj *objPtr); +typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr, + int linkType); +typedef int (Tcl_FSLoadFileProc) (Tcl_Interp * interp, Tcl_Obj *pathPtr, + Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr); +typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr, + ClientData *clientDataPtr); +typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr); +typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr); +typedef void (Tcl_FSFreeInternalRepProc) (ClientData clientData); +typedef ClientData (Tcl_FSDupInternalRepProc) (ClientData clientData); +typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (ClientData clientData); +typedef ClientData (Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr); typedef struct Tcl_FSVersion_ *Tcl_FSVersion; @@ -2197,9 +2167,8 @@ typedef struct Tcl_Config { * command- or time-limit is exceeded by an interpreter. */ -typedef void (Tcl_LimitHandlerProc) _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp)); -typedef void (Tcl_LimitHandlerDeleteProc) _ANSI_ARGS_((ClientData clientData)); +typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp); +typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData); #ifndef MP_INT_DECLARED typedef struct mp_int mp_int; @@ -2227,11 +2196,10 @@ typedef unsigned long mp_digit; * main library in case an extension is statically linked into an application. */ -EXTERN CONST char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, - CONST char *version, int exact)); -EXTERN CONST char * TclTomMathInitializeStubs _ANSI_ARGS_(( - Tcl_Interp *interp, CONST char *version, - int epoch, int revision)); +EXTERN CONST char * Tcl_InitStubs (Tcl_Interp *interp, CONST char *version, + int exact); +EXTERN CONST char * TclTomMathInitializeStubs (Tcl_Interp *interp, + CONST char *version, int epoch, int revision); #ifndef USE_TCL_STUBS @@ -2254,12 +2222,12 @@ EXTERN CONST char * TclTomMathInitializeStubs _ANSI_ARGS_(( * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171] */ -EXTERN void Tcl_Main _ANSI_ARGS_((int argc, char **argv, - Tcl_AppInitProc *appInitProc)); -EXTERN CONST char * Tcl_PkgInitStubsCheck _ANSI_ARGS_((Tcl_Interp *interp, - CONST char *version, int exact)); +EXTERN void Tcl_Main (int argc, char **argv, + Tcl_AppInitProc *appInitProc); +EXTERN CONST char * Tcl_PkgInitStubsCheck (Tcl_Interp *interp, + CONST char *version, int exact); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) -EXTERN void Tcl_GetMemoryInfo _ANSI_ARGS_((Tcl_DString *dsPtr)); +EXTERN void Tcl_GetMemoryInfo (Tcl_DString *dsPtr); #endif @@ -2459,7 +2427,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS -EXTERN int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp)); +EXTERN int Tcl_AppInit (Tcl_Interp *interp); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 8fc6574..4b7d20b 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.67 2008/08/13 23:08:38 das Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.68 2008/09/03 05:43:32 dgp Exp $ */ #ifndef _TCLUNIXPORT @@ -251,8 +251,7 @@ MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode); #endif #ifdef GETTOD_NOT_DECLARED -EXTERN int gettimeofday _ANSI_ARGS_((struct timeval *tp, - struct timezone *tzp)); +EXTERN int gettimeofday(struct timeval *tp, struct timezone *tzp); #endif /* -- cgit v0.12 From dc278b028d2f80dcc48ee9cb4273d863d995bbae Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 4 Sep 2008 16:34:47 +0000 Subject: * generic/tclExecute.c (CACHE_STACK_INFO): * tests/unsupported.test: restore the execEnv's bottomPtr, fix for [Bug 2093188]. --- ChangeLog | 6 ++++++ generic/tclExecute.c | 5 +++-- tests/unsupported.test | 43 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c86784..6360fb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-04 Miguel Sofer + + * generic/tclExecute.c (CACHE_STACK_INFO): + * tests/unsupported.test: restore the execEnv's bottomPtr, fix + for [Bug 2093188]. + 2008-09-02 Don Porter * generic/tcl.h: Stripped "callers" of the _ANSI_ARGS_ macro diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 453be92..308806c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.408 2008/08/23 01:48:26 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.409 2008/09/04 16:34:52 msofer Exp $ */ #include "tclInt.h" @@ -313,7 +313,8 @@ VarHashCreateVar( checkInterp = 1 #define DECACHE_STACK_INFO() \ - esPtr->tosPtr = tosPtr + esPtr->tosPtr = tosPtr; \ + iPtr->execEnvPtr->bottomPtr = bottomPtr /* * Macros used to access items on the Tcl evaluation stack. PUSH_OBJECT diff --git a/tests/unsupported.test b/tests/unsupported.test index 37a9313..2c1a281 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.8 2008/09/01 12:28:10 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.9 2008/09/04 16:34:55 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -769,6 +769,47 @@ test unsupported-C.3.4 {info coroutine} -constraints {coroutine} \ } -result ::foo +test unsupported-C.4.1 {bug #2093188} -constraints {coroutine} \ +-setup { + proc foo {} { + set v 1 + trace add variable v {write unset} bar + yield + set v 2 + yield + set v 3 + } + proc bar args {lappend ::res $args} + coroutine a foo +} -body { + list [a] [a] $::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{} 3 {{v {} write} {v {} write} {v {} unset}}} + +test unsupported-C.4.2 {bug #2093188} -constraints {coroutine} \ +-setup { + proc foo {} { + set v 1 + trace add variable v {read unset} bar + yield + set v 2 + set v + yield + set v 3 + } + proc bar args {lappend ::res $args} + coroutine a foo +} -body { + list [a] [a] $::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{} 3 {{v {} read} {v {} unset}}} + # cleanup ::tcltest::cleanupTests -- cgit v0.12 From eab20b1515b9e3c6dfa404b57482ef34429d1a63 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 5 Sep 2008 01:19:55 +0000 Subject: * generic/tclTrace.test (TraceVarProc): * generic/unsupported.test: insure that unset traces are run even when the coroutine is unwinding [Bug 2093947] --- ChangeLog | 4 ++++ generic/tclTrace.c | 17 +++++++++++++++-- tests/unsupported.test | 27 ++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6360fb4..6e7a9d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-09-04 Miguel Sofer + * generic/tclTrace.test (TraceVarProc): + * generic/unsupported.test: insure that unset traces are run even + when the coroutine is unwinding [Bug 2093947] + * generic/tclExecute.c (CACHE_STACK_INFO): * tests/unsupported.test: restore the execEnv's bottomPtr, fix for [Bug 2093188]. diff --git a/generic/tclTrace.c b/generic/tclTrace.c index bb4dbfa..8f095b5 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.50 2008/08/07 22:29:09 nijtmans Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.51 2008/09/05 01:20:00 msofer Exp $ */ #include "tclInt.h" @@ -1947,7 +1947,8 @@ TraceVarProc( char *result; int code, destroy = 0; Tcl_DString cmd; - + int rewind = ((Interp *)interp)->execEnvPtr->rewind; + /* * We might call Tcl_Eval() below, and that might evaluate [trace vdelete] * which might try to free tvarPtr. We want to use tvarPtr until the end @@ -2008,8 +2009,20 @@ TraceVarProc( destroy = 1; tvarPtr->flags |= TCL_TRACE_DESTROYED; } + + /* + * Make sure that unset traces are rune even if the execEnv is + * rewinding (coroutine deletion, [Bug 2093947] + */ + + if (rewind && (flags & TCL_TRACE_UNSETS)) { + ((Interp *)interp)->execEnvPtr->rewind = 0; + } code = Tcl_EvalEx(interp, Tcl_DStringValue(&cmd), Tcl_DStringLength(&cmd), 0); + if (rewind) { + ((Interp *)interp)->execEnvPtr->rewind = rewind; + } if (code != TCL_OK) { /* copy error msg to result */ Tcl_Obj *errMsgObj = Tcl_GetObjResult(interp); Tcl_IncrRefCount(errMsgObj); diff --git a/tests/unsupported.test b/tests/unsupported.test index 2c1a281..74f91aa 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.9 2008/09/04 16:34:55 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.10 2008/09/05 01:20:01 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -810,6 +810,31 @@ test unsupported-C.4.2 {bug #2093188} -constraints {coroutine} \ unset ::res } -result {{} 3 {{v {} read} {v {} unset}}} +test unsupported-C.4.2 {bug #2093947} -constraints {coroutine} \ +-setup { + proc foo {} { + set v 1 + trace add variable v {write unset} bar + yield + set v 2 + yield + set v 3 + } + proc bar args {lappend ::res $args} +} -body { + coroutine a foo + a + a + coroutine a foo + a + rename a {} + set ::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{v {} write} {v {} write} {v {} unset} {v {} write} {v {} unset}} + # cleanup ::tcltest::cleanupTests -- cgit v0.12 From e1aef1ce6c36b4692bf0e62e24bcb3fc7e466473 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 7 Sep 2008 14:01:50 +0000 Subject: * doc/namespace.n: fix [Bug 2098441] --- ChangeLog | 4 ++++ doc/namespace.n | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e7a9d8..4b8c409 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-09-07 Miguel Sofer + + * doc/namespace.n: fix [Bug 2098441] + 2008-09-04 Miguel Sofer * generic/tclTrace.test (TraceVarProc): diff --git a/doc/namespace.n b/doc/namespace.n index 4a31500..0450659 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.31 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.32 2008/09/07 14:01:54 msofer Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -285,7 +285,7 @@ procedure to refer to variables in \fInamespace\fR. The namespace name is resolved as described in section \fBNAME RESOLUTION\fR. The command \fBnamespace upvar $ns a b\fR has the same behaviour as -\fBupvar 0 $ns::a b\fR, with the sole exception of the resolution rules +\fBupvar 0 ${ns}::a b\fR, with the sole exception of the resolution rules used for qualified namespace or variable names. \fBnamespace upvar\fR returns an empty string. .TP -- cgit v0.12 From 76a689aef30bb27f1e24881a16991f7209a15132 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 8 Sep 2008 03:55:18 +0000 Subject: * generic/tclCompile.c (TclCompileTokens): * generic/tclExecute.c (CompileExprObj): fix a perf bug (found by Alex Ferrieux) where some variables in the LVT where not being accessed by index. Fix missing localCache management in compiled expressions found while analyzing the bug. --- ChangeLog | 8 ++++++++ generic/tclCompile.c | 26 ++++++++++++-------------- generic/tclExecute.c | 14 +++++++------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b8c409..21faefc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-09-07 Miguel Sofer + * generic/tclCompile.c (TclCompileTokens): + * generic/tclExecute.c (CompileExprObj): fix a perf bug (found by + Alex Ferrieux) where some variables in the LVT where not being + accessed by index. Fix missing localCache management in compiled + expressions found while analyzing the bug. + +2008-09-07 Miguel Sofer + * doc/namespace.n: fix [Bug 2098441] 2008-09-04 Miguel Sofer diff --git a/generic/tclCompile.c b/generic/tclCompile.c index d79ba9d..a0ab92b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.155 2008/08/20 15:41:21 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.156 2008/09/08 03:55:18 msofer Exp $ */ #include "tclInt.h" @@ -1670,19 +1670,17 @@ TclCompileTokens( name = tokenPtr[1].start; nameBytes = tokenPtr[1].size; - localVarName = -1; - if (envPtr->procPtr != NULL) { - localVarName = 1; - for (i = 0, p = name; i < nameBytes; i++, p++) { - if ((*p == ':') && (i < nameBytes-1) && (*(p+1) == ':')) { - localVarName = -1; - break; - } else if ((*p == '(') - && (tokenPtr->numComponents == 1) - && (*(name + nameBytes - 1) == ')')) { - localVarName = 0; - break; - } + + localVarName = 1; + for (i = 0, p = name; i < nameBytes; i++, p++) { + if ((*p == ':') && (i < nameBytes-1) && (*(p+1) == ':')) { + localVarName = -1; + break; + } else if ((*p == '(') + && (tokenPtr->numComponents == 1) + && (*(name + nameBytes - 1) == ')')) { + localVarName = 0; + break; } } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 308806c..326cc18 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.409 2008/09/04 16:34:52 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.410 2008/09/08 03:55:21 msofer Exp $ */ #include "tclInt.h" @@ -1291,7 +1291,8 @@ CompileExprObj( if (((Interp *) *codePtr->interpHandle != iPtr) || (codePtr->compileEpoch != iPtr->compileEpoch) || (codePtr->nsPtr != namespacePtr) - || (codePtr->nsEpoch != namespacePtr->resolverEpoch)) { + || (codePtr->nsEpoch != namespacePtr->resolverEpoch) + || (codePtr->localCachePtr != iPtr->varFramePtr->localCachePtr)) { objPtr->typePtr->freeIntRepProc(objPtr); objPtr->typePtr = (Tcl_ObjType *) NULL; } @@ -1328,6 +1329,10 @@ CompileExprObj( objPtr->typePtr = &exprCodeType; TclFreeCompileEnv(&compEnv); codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr; + if (iPtr->varFramePtr->localCachePtr) { + codePtr->localCachePtr = iPtr->varFramePtr->localCachePtr; + codePtr->localCachePtr->refCount++; + } #ifdef TCL_COMPILE_DEBUG if (tclTraceCompile == 2) { TclPrintByteCodeObj(interp, objPtr); @@ -1522,11 +1527,6 @@ TclCompileObj( } codePtr->compileEpoch = iPtr->compileEpoch; } else { - /* - * This byteCode is invalid: free it and recompile. - */ - - objPtr->typePtr->freeIntRepProc(objPtr); goto recompileObj; } } -- cgit v0.12 From 15f99b3fa80902c78a829d71b3d6159e9769cac1 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 8 Sep 2008 10:48:56 +0000 Subject: Simplify test bodies using tcltest2 --- ChangeLog | 5 + tests/append.test | 158 +++++------ tests/appendComp.test | 163 ++++++------ tests/cmdAH.test | 725 +++++++++++++++++++++++++------------------------- 4 files changed, 529 insertions(+), 522 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21faefc..3e8dc18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-08 Donal K. Fellows + + * tests/append.test, appendComp.test, cmdAH.test: Use the powers of + tcltest2 to make these files simpler. + 2008-09-07 Miguel Sofer * generic/tclCompile.c (TclCompileTokens): diff --git a/tests/append.test b/tests/append.test index 14377fa..eb76c94 100644 --- a/tests/append.test +++ b/tests/append.test @@ -1,20 +1,20 @@ # Commands covered: append lappend # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: append.test,v 1.10 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: append.test,v 1.11 2008/09/08 10:49:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest + package require tcltest 2 namespace import -force ::tcltest::* } catch {unset x} @@ -44,17 +44,17 @@ test append-2.1 {long appends} { expr {$x == $y} } 1 -test append-3.1 {append errors} { - list [catch {append} msg] $msg -} {1 {wrong # args: should be "append varName ?value ...?"}} -test append-3.2 {append errors} { +test append-3.1 {append errors} -returnCodes error -body { + append +} -result {wrong # args: should be "append varName ?value ...?"} +test append-3.2 {append errors} -returnCodes error -body { set x "" - list [catch {append x(0) 44} msg] $msg -} {1 {can't set "x(0)": variable isn't array}} -test append-3.3 {append errors} { + append x(0) 44 +} -result {can't set "x(0)": variable isn't array} +test append-3.3 {append errors} -returnCodes error -body { catch {unset x} - list [catch {append x} msg] $msg -} {1 {can't read "x": no such variable}} + append x +} -result {can't read "x": no such variable} test append-4.1 {lappend command} { catch {unset x} @@ -64,17 +64,17 @@ test append-4.2 {lappend command} { set x "" list [lappend x first] [lappend x second] [lappend x third] $x } {first {first second} {first second third} {first second third}} -test append-4.3 {lappend command} { +test append-4.3 {lappend command} -body { proc foo {} { global x set x old unset x lappend x new } - set result [foo] + foo +} -cleanup { rename foo {} - set result -} {new} +} -result {new} test append-4.4 {lappend command} { set x {} lappend x \{\ abc @@ -95,22 +95,22 @@ test append-4.8 {lappend command} { set x "\\\{" lappend x abc } "\\{ abc" -test append-4.9 {lappend command} { +test append-4.9 {lappend command} -returnCodes error -body { set x " \{" - list [catch {lappend x abc} msg] $msg -} {1 {unmatched open brace in list}} -test append-4.10 {lappend command} { + lappend x abc +} -result {unmatched open brace in list} +test append-4.10 {lappend command} -returnCodes error -body { set x " \{" - list [catch {lappend x abc} msg] $msg -} {1 {unmatched open brace in list}} -test append-4.11 {lappend command} { + lappend x abc +} -result {unmatched open brace in list} +test append-4.11 {lappend command} -returnCodes error -body { set x "\{\{\{" - list [catch {lappend x abc} msg] $msg -} {1 {unmatched open brace in list}} -test append-4.12 {lappend command} { + lappend x abc +} -result {unmatched open brace in list} +test append-4.12 {lappend command} -returnCodes error -body { set x "x \{\{\{" - list [catch {lappend x abc} msg] $msg -} {1 {unmatched open brace in list}} + lappend x abc +} -result {unmatched open brace in list} test append-4.13 {lappend command} { set x "x\{\{\{" lappend x abc @@ -144,48 +144,52 @@ test append-4.20 {lappend command} { lappend x(0) abc } {abc} unset -nocomplain x -test append-4.21 {lappend command} { +test append-4.21 {lappend command} -returnCodes error -body { set x \" - list [catch {lappend x} msg] $msg -} {1 {unmatched open quote in list}} -test append-4.22 {lappend command} { + lappend x +} -result {unmatched open quote in list} +test append-4.22 {lappend command} -returnCodes error -body { set x \" - list [catch {lappend x abc} msg] $msg -} {1 {unmatched open quote in list}} + lappend x abc +} -result {unmatched open quote in list} -proc check {var size} { - set l [llength $var] - if {$l != $size} { - return "length mismatch: should have been $size, was $l" - } - for {set i 0} {$i < $size} {set i [expr $i+1]} { - set j [lindex $var $i] - if {$j != "item $i"} { - return "element $i should have been \"item $i\", was \"$j\"" +test append-5.1 {long lappends} -setup { + catch {unset x} + proc check {var size} { + set l [llength $var] + if {$l != $size} { + return "length mismatch: should have been $size, was $l" + } + for {set i 0} {$i < $size} {set i [expr $i+1]} { + set j [lindex $var $i] + if {$j ne "item $i"} { + return "element $i should have been \"item $i\", was \"$j\"" + } } + return ok } - return ok -} -test append-5.1 {long lappends} { - catch {unset x} +} -body { set x "" - for {set i 0} {$i < 300} {set i [expr $i+1]} { + for {set i 0} {$i < 300} {incr i} { lappend x "item $i" } check $x 300 -} ok +} -cleanup { + rename check {} +} -result ok -test append-6.1 {lappend errors} { - list [catch {lappend} msg] $msg -} {1 {wrong # args: should be "lappend varName ?value ...?"}} -test append-6.2 {lappend errors} { +test append-6.1 {lappend errors} -returnCodes error -body { + lappend +} -result {wrong # args: should be "lappend varName ?value ...?"} +test append-6.2 {lappend errors} -returnCodes error -body { set x "" - list [catch {lappend x(0) 44} msg] $msg -} {1 {can't set "x(0)": variable isn't array}} + lappend x(0) 44 +} -result {can't set "x(0)": variable isn't array} -test append-7.1 {lappend-created var and error in trace on that var} { +test append-7.1 {lappend-created var and error in trace on that var} -setup { catch {rename foo ""} catch {unset x} +} -body { trace variable x w foo proc foo {} {global x; unset x} catch {lappend x 1} @@ -194,47 +198,49 @@ test append-7.1 {lappend-created var and error in trace on that var} { set x lappend x 1 list [info exists x] [catch {set x} msg] $msg -} {0 1 {can't read "x": no such variable}} -test append-7.2 {lappend var triggers read trace} { +} -result {0 1 {can't read "x": no such variable}} +test append-7.2 {lappend var triggers read trace} -setup { catch {unset myvar} catch {unset ::result} +} -body { trace variable myvar r foo proc foo {args} {append ::result $args} lappend myvar a - list [catch {set ::result} msg] $msg -} {0 {myvar {} r}} -test append-7.3 {lappend var triggers read trace, array var} { - # The behavior of read triggers on lappend changed in 8.0 to - # not trigger them, and was changed back in 8.4. + return $::result +} -result {myvar {} r} +test append-7.3 {lappend var triggers read trace, array var} -setup { catch {unset myvar} catch {unset ::result} +} -body { + # The behavior of read triggers on lappend changed in 8.0 to not trigger + # them, and was changed back in 8.4. trace variable myvar r foo proc foo {args} {append ::result $args} lappend myvar(b) a - list [catch {set ::result} msg] $msg -} {0 {myvar b r}} -test append-7.4 {lappend var triggers read trace, array var exists} { + return $::result +} -result {myvar b r} +test append-7.4 {lappend var triggers read trace, array var exists} -setup { catch {unset myvar} catch {unset ::result} +} -body { set myvar(0) 1 trace variable myvar r foo proc foo {args} {append ::result $args} lappend myvar(b) a - list [catch {set ::result} msg] $msg -} {0 {myvar b r}} -test append-7.5 {append var does not trigger read trace} { + return $::result +} -result {myvar b r} +test append-7.5 {append var does not trigger read trace} -setup { catch {unset myvar} catch {unset ::result} +} -body { trace variable myvar r foo proc foo {args} {append ::result $args} append myvar a info exists ::result -} {0} - +} -result {0} catch {unset i x result y} catch {rename foo ""} -catch {rename check ""} # cleanup ::tcltest::cleanupTests diff --git a/tests/appendComp.test b/tests/appendComp.test index dd0b4d0..e912186 100644 --- a/tests/appendComp.test +++ b/tests/appendComp.test @@ -1,17 +1,17 @@ # Commands covered: append lappend # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: appendComp.test,v 1.10 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: appendComp.test,v 1.11 2008/09/08 10:49:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -54,24 +54,24 @@ test appendComp-2.1 {long appends} { foo } 1 -test appendComp-3.1 {append errors} { +test appendComp-3.1 {append errors} -returnCodes error -body { proc foo {} {append} - list [catch {foo} msg] $msg -} {1 {wrong # args: should be "append varName ?value ...?"}} -test appendComp-3.2 {append errors} { + foo +} -result {wrong # args: should be "append varName ?value ...?"} +test appendComp-3.2 {append errors} -returnCodes error -body { proc foo {} { set x "" append x(0) 44 } - list [catch {foo} msg] $msg -} {1 {can't set "x(0)": variable isn't array}} -test appendComp-3.3 {append errors} { + foo +} -result {can't set "x(0)": variable isn't array} +test appendComp-3.3 {append errors} -returnCodes error -body { proc foo {} { catch {unset x} append x } - list [catch {foo} msg] $msg -} {1 {can't read "x": no such variable}} + foo +} -result {can't read "x": no such variable} test appendComp-4.1 {lappend command} { proc foo {} { @@ -134,34 +134,34 @@ test appendComp-4.8 {lappend command} { } foo } "\\{ abc" -test appendComp-4.9 {lappend command} { +test appendComp-4.9 {lappend command} -returnCodes error -body { proc foo {} { set x " \{" - list [catch {lappend x abc} msg] $msg + lappend x abc } foo -} {1 {unmatched open brace in list}} -test appendComp-4.10 {lappend command} { +} -result {unmatched open brace in list} +test appendComp-4.10 {lappend command} -returnCodes error -body { proc foo {} { set x " \{" - list [catch {lappend x abc} msg] $msg + lappend x abc } foo -} {1 {unmatched open brace in list}} -test appendComp-4.11 {lappend command} { +} -result {unmatched open brace in list} +test appendComp-4.11 {lappend command} -returnCodes error -body { proc foo {} { set x "\{\{\{" - list [catch {lappend x abc} msg] $msg + lappend x abc } foo -} {1 {unmatched open brace in list}} -test appendComp-4.12 {lappend command} { +} -result {unmatched open brace in list} +test appendComp-4.12 {lappend command} -returnCodes error -body { proc foo {} { set x "x \{\{\{" - list [catch {lappend x abc} msg] $msg + lappend x abc } foo -} {1 {unmatched open brace in list}} +} -result {unmatched open brace in list} test appendComp-4.13 {lappend command} { proc foo {} { set x "x\{\{\{" @@ -229,23 +229,24 @@ test appendComp-5.1 {long lappends} { check $x 300 } ok -test appendComp-6.1 {lappend errors} { +test appendComp-6.1 {lappend errors} -returnCodes error -body { proc foo {} {lappend} - list [catch {foo} msg] $msg -} {1 {wrong # args: should be "lappend varName ?value ...?"}} -test appendComp-6.2 {lappend errors} { + foo +} -result {wrong # args: should be "lappend varName ?value ...?"} +test appendComp-6.2 {lappend errors} -returnCodes error -body { proc foo {} { set x "" lappend x(0) 44 } - list [catch {foo} msg] $msg -} {1 {can't set "x(0)": variable isn't array}} + foo +} -result {can't set "x(0)": variable isn't array} -test appendComp-7.1 {lappendComp-created var and error in trace on that var} { +test appendComp-7.1 {lappendComp-created var and error in trace on that var} -setup { + catch {rename foo ""} + catch {unset x} +} -body { proc bar {} { global x - catch {rename foo ""} - catch {unset x} trace variable x w foo proc foo {} {global x; unset x} catch {lappend x 1} @@ -256,100 +257,102 @@ test appendComp-7.1 {lappendComp-created var and error in trace on that var} { list [info exists x] [catch {set x} msg] $msg } bar -} {0 1 {can't read "x": no such variable}} -test appendComp-7.2 {lappend var triggers read trace, index var} { +} -result {0 1 {can't read "x": no such variable}} +test appendComp-7.2 {lappend var triggers read trace, index var} -setup { + catch {unset ::result} +} -body { proc bar {} { - catch {unset myvar} - catch {unset ::result} trace variable myvar r foo proc foo {args} {append ::result $args} lappend myvar a - list [catch {set ::result} msg] $msg + return $::result } bar -} {0 {myvar {} r}} -test appendComp-7.3 {lappend var triggers read trace, stack var} { +} -result {myvar {} r} +test appendComp-7.3 {lappend var triggers read trace, stack var} -setup { + catch {unset ::result} +} -body { proc bar {} { - catch {unset ::myvar} - catch {unset ::result} trace variable ::myvar r foo proc foo {args} {append ::result $args} lappend ::myvar a - list [catch {set ::result} msg] $msg + return $::result } bar -} {0 {::myvar {} r}} -test appendComp-7.4 {lappend var triggers read trace, array var} { - # The behavior of read triggers on lappend changed in 8.0 to - # not trigger them. Maybe not correct, but been there a while. +} -result {::myvar {} r} +test appendComp-7.4 {lappend var triggers read trace, array var} -setup { + catch {unset ::result} +} -body { + # The behavior of read triggers on lappend changed in 8.0 to not trigger + # them. Maybe not correct, but been there a while. proc bar {} { - catch {unset myvar} - catch {unset ::result} trace variable myvar r foo proc foo {args} {append ::result $args} lappend myvar(b) a - list [catch {set ::result} msg] $msg + return $::result } bar -} {0 {myvar b r}} -test appendComp-7.5 {lappend var triggers read trace, array var} { - # The behavior of read triggers on lappend changed in 8.0 to - # not trigger them. Maybe not correct, but been there a while. +} -result {myvar b r} +test appendComp-7.5 {lappend var triggers read trace, array var} -setup { + catch {unset ::result} +} -body { + # The behavior of read triggers on lappend changed in 8.0 to not trigger + # them. Maybe not correct, but been there a while. proc bar {} { - catch {unset myvar} - catch {unset ::result} trace variable myvar r foo proc foo {args} {append ::result $args} lappend myvar(b) a b - list [catch {set ::result} msg] $msg + return $::result } bar -} {0 {myvar b r}} -test appendComp-7.6 {lappend var triggers read trace, array var exists} { +} -result {myvar b r} +test appendComp-7.6 {lappend var triggers read trace, array var exists} -setup { + catch {unset ::result} +} -body { proc bar {} { - catch {unset myvar} - catch {unset ::result} set myvar(0) 1 trace variable myvar r foo proc foo {args} {append ::result $args} lappend myvar(b) a - list [catch {set ::result} msg] $msg + return $::result } bar -} {0 {myvar b r}} -test appendComp-7.7 {lappend var triggers read trace, array stack var} { +} -result {myvar b r} +test appendComp-7.7 {lappend var triggers read trace, array stack var} -setup { + catch {unset ::myvar} + catch {unset ::result} +} -body { proc bar {} { - catch {unset ::myvar} - catch {unset ::result} trace variable ::myvar r foo proc foo {args} {append ::result $args} lappend ::myvar(b) a - list [catch {set ::result} msg] $msg + return $::result } bar -} {0 {::myvar b r}} -test appendComp-7.8 {lappend var triggers read trace, array stack var} { +} -result {::myvar b r} +test appendComp-7.8 {lappend var triggers read trace, array stack var} -setup { + catch {unset ::myvar} + catch {unset ::result} +} -body { proc bar {} { - catch {unset ::myvar} - catch {unset ::result} trace variable ::myvar r foo proc foo {args} {append ::result $args} lappend ::myvar(b) a b - list [catch {set ::result} msg] $msg + return $::result } bar -} {0 {::myvar b r}} -test appendComp-7.9 {append var does not trigger read trace} { +} -result {::myvar b r} +test appendComp-7.9 {append var does not trigger read trace} -setup { + catch {unset ::result} +} -body { proc bar {} { - catch {unset myvar} - catch {unset ::result} trace variable myvar r foo proc foo {args} {append ::result $args} append myvar a info exists ::result } bar -} {0} +} -result {0} test appendComp-8.1 {defer error to runtime} -setup { interp create slave diff --git a/tests/cmdAH.test b/tests/cmdAH.test index be7cccf..94f422a 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.60 2008/06/20 20:48:49 dgp Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.61 2008/09/08 10:49:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -238,10 +238,9 @@ test cmdAH-7.1 {Tcl_FileObjCmd - file attrs} -setup { } -result {0} # dirname -test cmdAH-8.1 {Tcl_FileObjCmd: dirname} testsetplatform { - testsetplatform unix - list [catch {file dirname a b} msg] $msg -} {1 {wrong # args: should be "file dirname name"}} +test cmdAH-8.1 {Tcl_FileObjCmd: dirname} -returnCodes error -body { + file dirname a b +} -result {wrong # args: should be "file dirname name"} test cmdAH-8.2 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix file dirname /a/b @@ -276,125 +275,117 @@ test cmdAH-8.11 {Tcl_FileObjCmd: dirname} testsetplatform { } / test cmdAH-8.12 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname /} msg] $msg -} {0 /} + file dirname / +} / test cmdAH-8.13 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname /foo} msg] $msg -} {0 /} + file dirname /foo +} / test cmdAH-8.14 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname //foo} msg] $msg -} {0 /} + file dirname //foo +} / test cmdAH-8.15 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname //foo/bar} msg] $msg -} {0 /foo} + file dirname //foo/bar +} /foo test cmdAH-8.16 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname {//foo\/bar/baz}} msg] $msg -} {0 {/foo\/bar}} + file dirname {//foo\/bar/baz} +} {/foo\/bar} test cmdAH-8.17 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname {//foo\/bar/baz/blat}} msg] $msg -} {0 {/foo\/bar/baz}} + file dirname {//foo\/bar/baz/blat} +} {/foo\/bar/baz} test cmdAH-8.18 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname /foo//} msg] $msg -} {0 /} + file dirname /foo// +} / test cmdAH-8.19 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname ./a} msg] $msg -} {0 .} + file dirname ./a +} . test cmdAH-8.20 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname a/.a} msg] $msg -} {0 a} + file dirname a/.a +} a test cmdAH-8.21 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform windows - list [catch {file dirname c:foo} msg] $msg -} {0 c:} + file dirname c:foo +} c: test cmdAH-8.22 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform windows - list [catch {file dirname c:} msg] $msg -} {0 c:} + file dirname c: +} c: test cmdAH-8.23 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform windows - list [catch {file dirname c:/} msg] $msg -} {0 c:/} + file dirname c:/ +} c:/ test cmdAH-8.24 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform windows - list [catch {file dirname {c:\foo}} msg] $msg -} {0 c:/} + file dirname {c:\foo} +} c:/ test cmdAH-8.25 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform windows - list [catch {file dirname {//foo/bar/baz}} msg] $msg -} {0 //foo/bar} + file dirname {//foo/bar/baz} +} //foo/bar test cmdAH-8.26 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform windows - list [catch {file dirname {//foo/bar}} msg] $msg -} {0 //foo/bar} + file dirname {//foo/bar} +} //foo/bar test cmdAH-8.38 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname ~/foo} msg] $msg -} {0 ~} + file dirname ~/foo +} ~ test cmdAH-8.39 {Tcl_FileObjCmd: dirname} testsetplatform { testsetplatform unix - list [catch {file dirname ~bar/foo} msg] $msg -} {0 ~bar} -test cmdAH-8.43 {Tcl_FileObjCmd: dirname} testsetplatform { + file dirname ~bar/foo +} ~bar +test cmdAH-8.43 {Tcl_FileObjCmd: dirname} -setup { global env set temp $env(HOME) +} -constraints testsetplatform -body { set env(HOME) "/homewontexist/test" testsetplatform unix - set result [list [catch {file dirname ~} msg] $msg] + file dirname ~ +} -cleanup { set env(HOME) $temp - set result -} {0 /homewontexist} -test cmdAH-8.44 {Tcl_FileObjCmd: dirname} testsetplatform { +} -result /homewontexist +test cmdAH-8.44 {Tcl_FileObjCmd: dirname} -setup { global env set temp $env(HOME) +} -constraints testsetplatform -body { set env(HOME) "~" testsetplatform unix - set result [list [catch {file dirname ~} msg] $msg] + file dirname ~ +} -cleanup { set env(HOME) $temp - set result -} {0 ~} -test cmdAH-8.45 {Tcl_FileObjCmd: dirname} { - -constraints {win testsetplatform} - -match regexp - -setup { - set temp $::env(HOME) - } - -body { - set ::env(HOME) "/homewontexist/test" - testsetplatform windows - file dirname ~ - } - -cleanup { - set ::env(HOME) $temp - } - -result {([a-zA-Z]:?)/homewontexist} -} +} -result ~ +test cmdAH-8.45 {Tcl_FileObjCmd: dirname} -setup { + set temp $::env(HOME) +} -constraints {win testsetplatform} -match regexp -body { + set ::env(HOME) "/homewontexist/test" + testsetplatform windows + file dirname ~ +} -cleanup { + set ::env(HOME) $temp +} -result {([a-zA-Z]:?)/homewontexist} test cmdAH-8.46 {Tcl_FileObjCmd: dirname} { set f [file normalize [info nameof]] file exists $f set res1 [file dirname [file join $f foo/bar]] set res2 [file dirname "${f}/foo/bar"] if {$res1 eq $res2} { - set res "ok" - } else { - set res "file dirname problem, $res1, $res2 not equal" + return "ok" } - set res + return "file dirname problem, $res1, $res2 not equal" } {ok} # tail -test cmdAH-9.1 {Tcl_FileObjCmd: tail} testsetplatform { - testsetplatform unix - list [catch {file tail a b} msg] $msg -} {1 {wrong # args: should be "file tail name"}} +test cmdAH-9.1 {Tcl_FileObjCmd: tail} -returnCodes error -body { + file tail a b +} -result {wrong # args: should be "file tail name"} test cmdAH-9.2 {Tcl_FileObjCmd: tail} testsetplatform { testsetplatform unix file tail /a/b @@ -541,10 +532,9 @@ test cmdAH-9.51 {Tcl_FileObjCmd: tail} testsetplatform { # rootname -test cmdAH-10.1 {Tcl_FileObjCmd: rootname} testsetplatform { - testsetplatform unix - list [catch {file rootname a b} msg] $msg -} {1 {wrong # args: should be "file rootname name"}} +test cmdAH-10.1 {Tcl_FileObjCmd: rootname} -returnCodes error -body { + file rootname a b +} -result {wrong # args: should be "file rootname name"} test cmdAH-10.2 {Tcl_FileObjCmd: rootname} testsetplatform { testsetplatform unix file rootname {} @@ -643,10 +633,9 @@ foreach outer { {} a .a a. a.a } { # extension -test cmdAH-11.1 {Tcl_FileObjCmd: extension} testsetplatform { - testsetplatform unix - list [catch {file extension a b} msg] $msg -} {1 {wrong # args: should be "file extension name"}} +test cmdAH-11.1 {Tcl_FileObjCmd: extension} -returnCodes error -body { + file extension a b +} -result {wrong # args: should be "file extension name"} test cmdAH-11.2 {Tcl_FileObjCmd: extension} testsetplatform { testsetplatform unix file extension {} @@ -731,23 +720,27 @@ test cmdAH-11.34 {Tcl_FileObjCmd: extension} testsetplatform { testsetplatform windows file extension a\\b.c\\ } {} -set num 35 -foreach value {a..b a...b a.c..b ..b} result {.b .b .b .b} { - foreach p {unix windows} { - ;test cmdAH-11.$num {Tcl_FileObjCmd: extension} testsetplatform " - testsetplatform $p - file extension $value - " $result - incr num - } +foreach {test onPlatform value result} { + cmdAH-11.35 unix a..b .b + cmdAH-11.36 windows a..b .b + cmdAH-11.37 unix a...b .b + cmdAH-11.38 windows a...b .b + cmdAH-11.39 unix a.c..b .b + cmdAH-11.40 windows a.c..b .b + cmdAH-11.41 unix ..b .b + cmdAH-11.42 windows ..b .b +} { + test $test {Tcl_FileObjCmd: extension} testsetplatform " + testsetplatform $onPlatform + file extension $value + " $result } # pathtype -test cmdAH-12.1 {Tcl_FileObjCmd: pathtype} testsetplatform { - testsetplatform unix - list [catch {file pathtype a b} msg] $msg -} {1 {wrong # args: should be "file pathtype name"}} +test cmdAH-12.1 {Tcl_FileObjCmd: pathtype} -returnCodes error -body { + file pathtype a b +} -result {wrong # args: should be "file pathtype name"} test cmdAH-12.2 {Tcl_FileObjCmd: pathtype} testsetplatform { testsetplatform unix file pathtype /a @@ -763,10 +756,9 @@ test cmdAH-12.4 {Tcl_FileObjCmd: pathtype} testsetplatform { # split -test cmdAH-13.1 {Tcl_FileObjCmd: split} testsetplatform { - testsetplatform unix - list [catch {file split a b} msg] $msg -} {1 {wrong # args: should be "file split name"}} +test cmdAH-13.1 {Tcl_FileObjCmd: split} -returnCodes error -body { + file split a b +} -result {wrong # args: should be "file split name"} test cmdAH-13.2 {Tcl_FileObjCmd: split} testsetplatform { testsetplatform unix file split a @@ -793,10 +785,10 @@ test cmdAH-14.3 {Tcl_FileObjCmd: join} testsetplatform { # error handling of Tcl_TranslateFileName -test cmdAH-15.1 {Tcl_FileObjCmd} testsetplatform { +test cmdAH-15.1 {Tcl_FileObjCmd} -constraints testsetplatform -body { testsetplatform unix - list [catch {file atime ~_bad_user} msg] $msg -} {1 {user "_bad_user" doesn't exist}} + file atime ~_bad_user +} -returnCodes error -result {user "_bad_user" doesn't exist} catch {testsetplatform $platform} @@ -806,8 +798,9 @@ set gorpfile [makeFile abcde gorp.file] set dirfile [makeDirectory dir.file] test cmdAH-16.1 {Tcl_FileObjCmd: readable} { - -body {list [catch {file readable a b} msg] $msg} - -result {1 {wrong # args: should be "file readable name"}} + -returnCodes error + -body {file readable a b} + -result {wrong # args: should be "file readable name"} } test cmdAH-16.2 {Tcl_FileObjCmd: readable} { -constraints testchmod @@ -818,15 +811,16 @@ test cmdAH-16.2 {Tcl_FileObjCmd: readable} { test cmdAH-16.3 {Tcl_FileObjCmd: readable} { -constraints {unix notRoot testchmod} -setup {testchmod 0333 $gorpfile} - -body {file reada $gorpfile} + -body {file readable $gorpfile} -result 0 } # writable test cmdAH-17.1 {Tcl_FileObjCmd: writable} { - -body {list [catch {file writable a b} msg] $msg} - -result {1 {wrong # args: should be "file writable name"}} + -returnCodes error + -body {file writable a b} + -result {wrong # args: should be "file writable name"} } test cmdAH-17.2 {Tcl_FileObjCmd: writable} { -constraints {notRoot testchmod} @@ -841,7 +835,6 @@ test cmdAH-17.3 {Tcl_FileObjCmd: writable} { -result 1 } - # executable removeFile $gorpfile @@ -849,41 +842,36 @@ removeDirectory $dirfile set dirfile [makeDirectory dir.file] set gorpfile [makeFile abcde gorp.file] -test cmdAH-18.1 {Tcl_FileObjCmd: executable} {} { - list [catch {file executable a b} msg] $msg -} {1 {wrong # args: should be "file executable name"}} +test cmdAH-18.1 {Tcl_FileObjCmd: executable} -returnCodes error -body { + file executable a b +} -result {wrong # args: should be "file executable name"} test cmdAH-18.2 {Tcl_FileObjCmd: executable} {notRoot} { file executable $gorpfile } 0 test cmdAH-18.3 {Tcl_FileObjCmd: executable} {unix testchmod} { - # Only on unix will setting the execute bit on a regular file - # cause that file to be executable. - + # Only on unix will setting the execute bit on a regular file cause that + # file to be executable. testchmod 0775 $gorpfile file exe $gorpfile } 1 - -test cmdAH-18.5 {Tcl_FileObjCmd: executable} {win} { +test cmdAH-18.5 {Tcl_FileObjCmd: executable} -constraints {win} -body { # On pc, must be a .exe, .com, etc. - set x [file exe $gorpfile] set gorpexe [makeFile foo gorp.exe] lappend x [file exe $gorpexe] +} -cleanup { removeFile $gorpexe - set x -} {0 1} -test cmdAH-18.5.1 {Tcl_FileObjCmd: executable} {win} { +} -result {0 1} +test cmdAH-18.5.1 {Tcl_FileObjCmd: executable} -constraints {win} -body { # On pc, must be a .exe, .com, etc. - set x [file exe $gorpfile] set gorpexe [makeFile foo gorp.exe] lappend x [file exe [string toupper $gorpexe]] +} -cleanup { removeFile $gorpexe - set x -} {0 1} +} -result {0 1} test cmdAH-18.6 {Tcl_FileObjCmd: executable} {} { # Directories are always executable. - file exe $dirfile } 1 @@ -894,9 +882,9 @@ file delete $linkfile # exists -test cmdAH-19.1 {Tcl_FileObjCmd: exists} { - list [catch {file exists a b} msg] $msg -} {1 {wrong # args: should be "file exists name"}} +test cmdAH-19.1 {Tcl_FileObjCmd: exists} -returnCodes error -body { + file exists a b +} -result {wrong # args: should be "file exists name"} test cmdAH-19.2 {Tcl_FileObjCmd: exists} {file exists $gorpfile} 0 test cmdAH-19.3 {Tcl_FileObjCmd: exists} { file exists [file join [temporaryDirectory] dir.file gorp.file] @@ -914,14 +902,18 @@ test cmdAH-19.5 {Tcl_FileObjCmd: exists} { } 1 # nativename -test cmdAH-19.6 {Tcl_FileObjCmd: nativename} testsetplatform { +test cmdAH-19.6 {Tcl_FileObjCmd: nativename} -body { testsetplatform unix - list [catch {file nativename a/b} msg] $msg [testsetplatform $platform] -} {0 a/b {}} -test cmdAH-19.7 {Tcl_FileObjCmd: nativename} testsetplatform { + file nativename a/b +} -constraints testsetplatform -cleanup { + testsetplatform $platform +} -result a/b +test cmdAH-19.7 {Tcl_FileObjCmd: nativename} -body { testsetplatform windows - list [catch {file nativename a/b} msg] $msg [testsetplatform $platform] -} {0 {a\b} {}} + file nativename a/b +} -constraints testsetplatform -cleanup { + testsetplatform $platform +} -result {a\b} test cmdAH-19.9 {Tcl_FileObjCmd: ~ : exists} { file exists ~nOsUcHuSeR @@ -931,24 +923,23 @@ test cmdAH-19.10 {Tcl_FileObjCmd: ~ : nativename} { catch {file nativename ~nOsUcHuSeR} } 1 -# The test below has to be done in /tmp rather than the current -# directory in order to guarantee (?) a local file system: some -# NFS file systems won't do the stuff below correctly. +# The test below has to be done in /tmp rather than the current directory in +# order to guarantee (?) a local file system: some NFS file systems won't do +# the stuff below correctly. -test cmdAH-19.11 {Tcl_FileObjCmd: exists} {unix notRoot} { +test cmdAH-19.11 {Tcl_FileObjCmd: exists} -constraints {unix notRoot} -setup { file delete -force /tmp/tcl.foo.dir/file file delete -force /tmp/tcl.foo.dir +} -body { makeDirectory /tmp/tcl.foo.dir makeFile 12345 /tmp/tcl.foo.dir/file file attributes /tmp/tcl.foo.dir -permissions 0000 - - set result [file exists /tmp/tcl.foo.dir/file] - + file exists /tmp/tcl.foo.dir/file +} -cleanup { file attributes /tmp/tcl.foo.dir -permissions 0775 removeFile /tmp/tcl.foo.dir/file removeDirectory /tmp/tcl.foo.dir - set result -} 0 +} -result 0 # Stat related commands @@ -966,22 +957,23 @@ if {[testConstraint unix] && [file exists /tmp]} { set file [makeFile "data" touch.me] } -test cmdAH-20.1 {Tcl_FileObjCmd: atime} { - list [catch {file atime a b c} msg] $msg -} {1 {wrong # args: should be "file atime name ?time?"}} -test cmdAH-20.2 {Tcl_FileObjCmd: atime} { +test cmdAH-20.1 {Tcl_FileObjCmd: atime} -returnCodes error -body { + file atime a b c +} -result {wrong # args: should be "file atime name ?time?"} +test cmdAH-20.2 {Tcl_FileObjCmd: atime} -setup { catch {unset stat} +} -body { file stat $gorpfile stat list [expr {[file mtime $gorpfile] == $stat(mtime)}] \ [expr {[file atime $gorpfile] == $stat(atime)}] -} {1 1} +} -result {1 1} test cmdAH-20.3 {Tcl_FileObjCmd: atime} { string tolower [list [catch {file atime _bogus_} msg] \ $msg $errorCode] } {1 {could not read "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} -test cmdAH-20.4 {Tcl_FileObjCmd: atime} { - list [catch {file atime $file notint} msg] $msg -} {1 {expected integer but got "notint"}} +test cmdAH-20.4 {Tcl_FileObjCmd: atime} -returnCodes error -body { + file atime $file notint +} -result {expected integer but got "notint"} test cmdAH-20.5 {Tcl_FileObjCmd: atime touch} {unix} { set atime [file atime $file] after 1100; # pause a sec to notice change in atime @@ -989,13 +981,15 @@ test cmdAH-20.5 {Tcl_FileObjCmd: atime touch} {unix} { set modatime [file atime $file $newatime] expr {$newatime == $modatime ? 1 : "$newatime != $modatime"} } 1 -test cmdAH-20.6 {Tcl_FileObjCmd: atime touch} {win testvolumetype} { +test cmdAH-20.6 {Tcl_FileObjCmd: atime touch} -setup { set old [pwd] cd $::tcltest::temporaryDirectory - if {"NTFS" ne [testvolumetype]} { - # Windows FAT doesn't understand atime, but NTFS does - # May also fail for Windows on NFS mounted disks - cd $old + set volumetype [testvolumetype] + cd $old +} -constraints {win testvolumetype} -body { + if {"NTFS" ne $volumetype} { + # Windows FAT doesn't understand atime, but NTFS does. May also fail + # for Windows on NFS mounted disks. return 1 } cd $old @@ -1004,7 +998,7 @@ test cmdAH-20.6 {Tcl_FileObjCmd: atime touch} {win testvolumetype} { set newatime [clock seconds] set modatime [file atime $file $newatime] expr {$newatime == $modatime ? 1 : "$newatime != $modatime"} -} 1 +} -result 1 if {[testConstraint unix] && [file exists /tmp]} { removeFile touch.me /tmp @@ -1014,103 +1008,105 @@ if {[testConstraint unix] && [file exists /tmp]} { # isdirectory -test cmdAH-21.1 {Tcl_FileObjCmd: isdirectory} { - list [catch {file isdirectory a b} msg] $msg -} {1 {wrong # args: should be "file isdirectory name"}} -test cmdAH-21.2 {Tcl_FileObjCmd: isdirectory} { - file isdirectory $gorpfile -} 0 -test cmdAH-21.3 {Tcl_FileObjCmd: isdirectory} { - file isd $dirfile -} 1 +test cmdAH-21.1 {Tcl_FileObjCmd: isdirectory} -returnCodes error -body { + file isdirectory a b +} -result {wrong # args: should be "file isdirectory name"} +test cmdAH-21.2 {Tcl_FileObjCmd: isdirectory} {file isdirectory $gorpfile} 0 +test cmdAH-21.3 {Tcl_FileObjCmd: isdirectory} {file isdirectory $dirfile} 1 # isfile -test cmdAH-22.1 {Tcl_FileObjCmd: isfile} { - list [catch {file isfile a b} msg] $msg -} {1 {wrong # args: should be "file isfile name"}} +test cmdAH-22.1 {Tcl_FileObjCmd: isfile} -returnCodes error -body { + file isfile a b +} -result {wrong # args: should be "file isfile name"} test cmdAH-22.2 {Tcl_FileObjCmd: isfile} {file isfile $gorpfile} 1 test cmdAH-22.3 {Tcl_FileObjCmd: isfile} {file isfile $dirfile} 0 -# lstat and readlink: don't run these tests everywhere, since not all -# sites will have symbolic links +# lstat and readlink: don't run these tests everywhere, since not all sites +# will have symbolic links catch {file link -symbolic $linkfile $gorpfile} -test cmdAH-23.1 {Tcl_FileObjCmd: lstat} { - list [catch {file lstat a} msg] $msg -} {1 {wrong # args: should be "file lstat name varName"}} -test cmdAH-23.2 {Tcl_FileObjCmd: lstat} { - list [catch {file lstat a b c} msg] $msg -} {1 {wrong # args: should be "file lstat name varName"}} -test cmdAH-23.3 {Tcl_FileObjCmd: lstat} {unix nonPortable} { +test cmdAH-23.1 {Tcl_FileObjCmd: lstat} -returnCodes error -body { + file lstat a +} -result {wrong # args: should be "file lstat name varName"} +test cmdAH-23.2 {Tcl_FileObjCmd: lstat} -returnCodes error -body { + file lstat a b c +} -result {wrong # args: should be "file lstat name varName"} +test cmdAH-23.3 {Tcl_FileObjCmd: lstat} -setup { catch {unset stat} +} -constraints {unix nonPortable} -body { file lstat $linkfile stat lsort [array names stat] -} {atime ctime dev gid ino mode mtime nlink size type uid} -test cmdAH-23.4 {Tcl_FileObjCmd: lstat} {unix nonPortable} { +} -result {atime ctime dev gid ino mode mtime nlink size type uid} +test cmdAH-23.4 {Tcl_FileObjCmd: lstat} -setup { catch {unset stat} +} -constraints {unix nonPortable} -body { file lstat $linkfile stat list $stat(nlink) [expr $stat(mode)&0777] $stat(type) -} {1 511 link} +} -result {1 511 link} test cmdAH-23.5 {Tcl_FileObjCmd: lstat errors} {nonPortable} { - string tolower [list [catch {file lstat _bogus_ stat} msg] \ - $msg $errorCode] -} {1 {could not read "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} -test cmdAH-23.6 {Tcl_FileObjCmd: lstat errors} { + list [catch {file lstat _bogus_ stat} msg] [string tolower $msg] \ + $errorCode +} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} +test cmdAH-23.6 {Tcl_FileObjCmd: lstat errors} -setup { catch {unset x} +} -body { set x 44 list [catch {file lstat $gorpfile x} msg] $msg $errorCode -} {1 {can't set "x(dev)": variable isn't array} NONE} +} -result {1 {can't set "x(dev)": variable isn't array} NONE} catch {unset stat} # mkdir set dirA [file join [temporaryDirectory] a] set dirB [file join [temporaryDirectory] a] -test cmdAH-23.7 {Tcl_FileObjCmd: mkdir} { +test cmdAH-23.7 {Tcl_FileObjCmd: mkdir} -setup { catch {file delete -force $dirA} +} -body { file mkdir $dirA - set res [file isdirectory $dirA] + file isdirectory $dirA +} -cleanup { file delete $dirA - set res -} {1} -test cmdAH-23.8 {Tcl_FileObjCmd: mkdir} { +} -result {1} +test cmdAH-23.8 {Tcl_FileObjCmd: mkdir} -setup { catch {file delete -force $dirA} +} -body { file mkdir $dirA/b - set res [file isdirectory $dirA/b] + file isdirectory $dirA/b +} -cleanup { file delete -force $dirA - set res -} {1} -test cmdAH-23.9 {Tcl_FileObjCmd: mkdir} { +} -result {1} +test cmdAH-23.9 {Tcl_FileObjCmd: mkdir} -setup { catch {file delete -force $dirA} +} -body { file mkdir $dirA/b/c - set res [file isdirectory $dirA/b/c] + file isdirectory $dirA/b/c +} -cleanup { file delete -force $dirA - set res -} {1} -test cmdAH-23.10 {Tcl_FileObjCmd: mkdir} { +} -result {1} +test cmdAH-23.10 {Tcl_FileObjCmd: mkdir} -setup { catch {file delete -force $dirA} catch {file delete -force $dirB} +} -body { file mkdir $dirA/b $dirB/a/c - set res [list [file isdirectory $dirA/b] [file isdirectory $dirB/a/c]] + list [file isdirectory $dirA/b] [file isdirectory $dirB/a/c] +} -cleanup { file delete -force $dirA file delete -force $dirB - set res -} {1 1} +} -result {1 1} # mtime proc waitForEvenSecondForFAT {} { - # Windows 9x uses filesystems (the FAT* family of FSes) without - # enough data in its timestamps for even per-second-accurate - # timings. :^( + # Windows 9x uses filesystems (the FAT* family of FSes) without enough + # data in its timestamps for even per-second-accurate timings. :^( # This procedure based on work by Helmut Giese - if { [testConstraint win] && [lindex [file system [temporaryDirectory]] 1] ne "NTFS" } then { - # Assume non-NTFS means FAT{12,16,32} and hence in need of special help + # Assume non-NTFS means FAT{12,16,32} and hence in need of special + # help... set start [clock seconds] while {1} { set now [clock seconds] @@ -1123,18 +1119,19 @@ proc waitForEvenSecondForFAT {} { } set file [makeFile "data" touch.me] -test cmdAH-24.1 {Tcl_FileObjCmd: mtime} { - list [catch {file mtime a b c} msg] $msg -} {1 {wrong # args: should be "file mtime name ?time?"}} -# Check (allowing for clock-skew and OS interrupts as best we can) -# that the change in mtime on a file being written is the time elapsed -# between writes. Note that this can still fail on very busy systems -# if there are long preemptions between the writes and the reading of -# the clock, but there's not much you can do about that other than the -# completely horrible "keep on trying to write until you managed to do -# it all in less than a second." - DKF -test cmdAH-24.2 {Tcl_FileObjCmd: mtime} { +test cmdAH-24.1 {Tcl_FileObjCmd: mtime} -returnCodes error -body { + file mtime a b c +} -result {wrong # args: should be "file mtime name ?time?"} +test cmdAH-24.2 {Tcl_FileObjCmd: mtime} -setup { + # Check (allowing for clock-skew and OS interrupts as best we can) that + # the change in mtime on a file being written is the time elapsed between + # writes. Note that this can still fail on very busy systems if there are + # long preemptions between the writes and the reading of the clock, but + # there's not much you can do about that other than the completely + # horrible "keep on trying to write until you managed to do it all in less + # than a second." - DKF waitForEvenSecondForFAT +} -body { set f [open $gorpfile w] puts $f "More text" close $f @@ -1151,36 +1148,38 @@ test cmdAH-24.2 {Tcl_FileObjCmd: mtime} { (abs(($fileNew-$fileOld) - ($clockNew-$clockOld)) <= 1)) ? "1" : "file:($fileOld=>$fileNew) clock:($clockOld=>$clockNew)" } -} {1} -test cmdAH-24.3 {Tcl_FileObjCmd: mtime} { +} -result {1} +test cmdAH-24.3 {Tcl_FileObjCmd: mtime} -setup { catch {unset stat} +} -body { file stat $gorpfile stat list [expr {[file mtime $gorpfile] == $stat(mtime)}] \ [expr {[file atime $gorpfile] == $stat(atime)}] -} {1 1} +} -result {1 1} test cmdAH-24.4 {Tcl_FileObjCmd: mtime} { - string tolower [list [catch {file mtime _bogus_} msg] $msg \ - $errorCode] -} {1 {could not read "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} -test cmdAH-24.5 {Tcl_FileObjCmd: mtime} { - # Under Unix, use a file in /tmp to avoid clock skew due to NFS. - # On other platforms, just use a file in the local directory. + list [catch {file mtime _bogus_} msg] [string tolower $msg] \ + $errorCode +} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} +test cmdAH-24.5 {Tcl_FileObjCmd: mtime} -setup { + # Under Unix, use a file in /tmp to avoid clock skew due to NFS. On other + # platforms, just use a file in the local directory. if {[testConstraint unix]} { set name /tmp/tcl.test.[pid] } else { set name [file join [temporaryDirectory] tf] } - # Make sure that a new file's time is correct. 10 seconds variance - # is allowed used due to slow networks or clock skew on a network drive. +} -body { + # Make sure that a new file's time is correct. 10 seconds variance is + # allowed used due to slow networks or clock skew on a network drive. file delete -force $name close [open $name w] - set a [expr abs([clock seconds]-[file mtime $name])<10] + expr {abs([clock seconds]-[file mtime $name])<10} +} -cleanup { file delete $name - set a -} {1} -test cmdAH-24.7 {Tcl_FileObjCmd: mtime} { - list [catch {file mtime $file notint} msg] $msg -} {1 {expected integer but got "notint"}} +} -result {1} +test cmdAH-24.7 {Tcl_FileObjCmd: mtime} -returnCodes error -body { + file mtime $file notint +} -result {expected integer but got "notint"} test cmdAH-24.8 {Tcl_FileObjCmd: mtime touch} unix { set mtime [file mtime $file] after 1100; # pause a sec to notice change in mtime @@ -1188,8 +1187,9 @@ test cmdAH-24.8 {Tcl_FileObjCmd: mtime touch} unix { set modmtime [file mtime $file $newmtime] expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"} } 1 -test cmdAH-24.9 {Tcl_FileObjCmd: mtime touch with non-ascii chars} unix { +test cmdAH-24.9 {Tcl_FileObjCmd: mtime touch with non-ascii chars} -setup { set oldfile $file +} -constraints unix -body { # introduce some non-ascii characters. append file \u2022 file delete -force $file @@ -1197,24 +1197,24 @@ test cmdAH-24.9 {Tcl_FileObjCmd: mtime touch with non-ascii chars} unix { set mtime [file mtime $file] after 1100; # pause a sec to notice change in mtime set newmtime [clock seconds] - set err [catch {file mtime $file $newmtime} modmtime] - file rename $file $oldfile - if {$err} { - error $modmtime - } + set modmtime [file mtime $file $newmtime] expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"} -} 1 -test cmdAH-24.10 {Tcl_FileObjCmd: mtime touch} win { +} -cleanup { + file rename $file $oldfile +} -result 1 +test cmdAH-24.10 {Tcl_FileObjCmd: mtime touch} -constraints win -setup { waitForEvenSecondForFAT +} -body { set mtime [file mtime $file] after 2100; # pause two secs to notice change in mtime on FAT fs'es set newmtime [clock seconds] set modmtime [file mtime $file $newmtime] expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"} -} 1 -test cmdAH-24.11 {Tcl_FileObjCmd: mtime touch with non-ascii chars} win { +} -result 1 +test cmdAH-24.11 {Tcl_FileObjCmd: mtime touch with non-ascii chars} -setup { waitForEvenSecondForFAT set oldfile $file +} -constraints win -body { # introduce some non-ascii characters. append file \u2022 file delete -force $file @@ -1222,25 +1222,25 @@ test cmdAH-24.11 {Tcl_FileObjCmd: mtime touch with non-ascii chars} win { set mtime [file mtime $file] after 2100; # pause two secs to notice change in mtime on FAT fs'es set newmtime [clock seconds] - set err [catch {file mtime $file $newmtime} modmtime] - file rename $file $oldfile - if {$err} { - error $modmtime - } + set modmtime [file mtime $file $newmtime] expr {$newmtime == $modmtime ? 1 : "$newmtime != $modmtime"} -} 1 +} -cleanup { + file rename $file $oldfile +} -result 1 removeFile touch.me rename waitForEvenSecondForFAT {} -test cmdAH-24.12 {Tcl_FileObjCmd: mtime and daylight savings} { +test cmdAH-24.12 {Tcl_FileObjCmd: mtime and daylight savings} -setup { set name [file join [temporaryDirectory] clockchange] file delete -force $name close [open $name w] +} -body { set time [clock scan "21:00:00 October 30 2004 GMT"] file mtime $name $time set newmtime [file mtime $name] - file delete $name expr {$newmtime == $time ? 1 : "$newmtime != $time"} -} {1} +} -cleanup { + file delete $name +} -result {1} # bug 1420432: setting mtime fails for directories on windows. test cmdAH-24.13 {Tcl_FileObjCmd: directory mtime} -setup { set dirname [file join [temporaryDirectory] tmp[pid]] @@ -1257,9 +1257,9 @@ test cmdAH-24.13 {Tcl_FileObjCmd: directory mtime} -setup { # owned -test cmdAH-25.1 {Tcl_FileObjCmd: owned} { - list [catch {file owned a b} msg] $msg -} {1 {wrong # args: should be "file owned name"}} +test cmdAH-25.1 {Tcl_FileObjCmd: owned} -returnCodes error -body { + file owned a b +} -result {wrong # args: should be "file owned name"} test cmdAH-25.2 {Tcl_FileObjCmd: owned} -constraints win -body { file owned $gorpfile } -result 1 @@ -1277,26 +1277,24 @@ test cmdAH-25.3 {Tcl_FileObjCmd: owned} {unix notRoot} { # readlink -test cmdAH-26.1 {Tcl_FileObjCmd: readlink} { - list [catch {file readlink a b} msg] $msg -} {1 {wrong # args: should be "file readlink name"}} +test cmdAH-26.1 {Tcl_FileObjCmd: readlink} -returnCodes error -body { + file readlink a b +} -result {wrong # args: should be "file readlink name"} test cmdAH-26.2 {Tcl_FileObjCmd: readlink} {unix nonPortable} { file readlink $linkfile } $gorpfile test cmdAH-26.3 {Tcl_FileObjCmd: readlink errors} {unix nonPortable} { - list [catch {file readlink _bogus_} msg] [string tolower $msg] \ - [string tolower $errorCode] -} {1 {could not readlink "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} + list [catch {file readlink _bogus_} msg] [string tolower $msg] $errorCode +} {1 {could not readlink "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} test cmdAH-26.5 {Tcl_FileObjCmd: readlink errors} {win nonPortable} { - list [catch {file readlink _bogus_} msg] [string tolower $msg] \ - [string tolower $errorCode] -} {1 {could not readlink "_bogus_": invalid argument} {posix einval {invalid argument}}} + list [catch {file readlink _bogus_} msg] [string tolower $msg] $errorCode +} {1 {could not readlink "_bogus_": invalid argument} {POSIX EINVAL {invalid argument}}} # size -test cmdAH-27.1 {Tcl_FileObjCmd: size} { - list [catch {file size a b} msg] $msg -} {1 {wrong # args: should be "file size name"}} +test cmdAH-27.1 {Tcl_FileObjCmd: size} -returnCodes error -body { + file size a b +} -result {wrong # args: should be "file size name"} test cmdAH-27.2 {Tcl_FileObjCmd: size} { set oldsize [file size $gorpfile] set f [open $gorpfile a] @@ -1306,9 +1304,8 @@ test cmdAH-27.2 {Tcl_FileObjCmd: size} { expr {[file size $gorpfile] - $oldsize} } {10} test cmdAH-27.3 {Tcl_FileObjCmd: size} { - string tolower [list [catch {file size _bogus_} msg] $msg \ - $errorCode] -} {1 {could not read "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} + list [catch {file size _bogus_} msg] [string tolower $msg] $errorCode +} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} # stat @@ -1317,95 +1314,95 @@ removeFile $gorpfile set gorpfile [makeFile "Test string" gorp.file] catch {file attributes $gorpfile -permissions 0765} -test cmdAH-28.1 {Tcl_FileObjCmd: stat} { - list [catch {file stat _bogus_} msg] $msg $errorCode -} {1 {wrong # args: should be "file stat name varName"} NONE} -test cmdAH-28.2 {Tcl_FileObjCmd: stat} { - list [catch {file stat _bogus_ a b} msg] $msg $errorCode -} {1 {wrong # args: should be "file stat name varName"} NONE} -test cmdAH-28.3 {Tcl_FileObjCmd: stat} { +test cmdAH-28.1 {Tcl_FileObjCmd: stat} -returnCodes error -body { + file stat _bogus_ +} -result {wrong # args: should be "file stat name varName"} +test cmdAH-28.2 {Tcl_FileObjCmd: stat} -returnCodes error -body { + file stat _bogus_ a b +} -result {wrong # args: should be "file stat name varName"} +test cmdAH-28.3 {Tcl_FileObjCmd: stat} -setup { catch {unset stat} +} -body { file stat $gorpfile stat lsort [array names stat] -} {atime ctime dev gid ino mode mtime nlink size type uid} -test cmdAH-28.4 {Tcl_FileObjCmd: stat} { +} -result {atime ctime dev gid ino mode mtime nlink size type uid} +test cmdAH-28.4 {Tcl_FileObjCmd: stat} -setup { catch {unset stat} +} -body { file stat $gorpfile stat list $stat(nlink) $stat(size) $stat(type) -} {1 12 file} -test cmdAH-28.5 {Tcl_FileObjCmd: stat} {unix} { +} -result {1 12 file} +test cmdAH-28.5 {Tcl_FileObjCmd: stat} -constraints {unix} -setup { catch {unset stat} +} -body { file stat $gorpfile stat - expr $stat(mode)&0o777 -} {501} + expr {$stat(mode) & 0o777} +} -result {501} test cmdAH-28.6 {Tcl_FileObjCmd: stat} { - string tolower [list [catch {file stat _bogus_ stat} msg] \ - $msg $errorCode] -} {1 {could not read "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} -test cmdAH-28.7 {Tcl_FileObjCmd: stat} { + list [catch {file stat _bogus_ stat} msg] [string tolower $msg] $errorCode +} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} +test cmdAH-28.7 {Tcl_FileObjCmd: stat} -setup { catch {unset x} +} -returnCodes error -body { set x 44 - list [catch {file stat $gorpfile x} msg] $msg $errorCode -} {1 {can't set "x(dev)": variable isn't array} NONE} -test cmdAH-28.8 {Tcl_FileObjCmd: stat} { - # Sign extension of purported unsigned short to int. - + file stat $gorpfile x +} -result {can't set "x(dev)": variable isn't array} +test cmdAH-28.8 {Tcl_FileObjCmd: stat} -setup { set filename [makeFile "" foo.text] +} -body { + # Sign extension of purported unsigned short to int. file stat $filename stat - set x [expr {$stat(mode) > 0}] + expr {$stat(mode) > 0} +} -cleanup { removeFile $filename - set x -} 1 +} -result 1 test cmdAH-28.9 {Tcl_FileObjCmd: stat} win { - # stat of root directory was failing. - # don't care about answer, just that test runs. - - # relative paths that resolve to root + # stat of root directory was failing. Don't care about answer, just that + # test runs. Relative paths that resolve to root set old [pwd] cd c:/ file stat c: stat file stat c:. stat file stat . stat cd $old - file stat / stat file stat c:/ stat file stat c:/. stat } {} test cmdAH-28.10 {Tcl_FileObjCmd: stat} {win nonPortable} { - # stat of root directory was failing. - # don't care about answer, just that test runs. - + # stat of root directory was failing. Don't care about answer, just that + # test runs. file stat //pop/$env(USERNAME) stat file stat //pop/$env(USERNAME)/ stat file stat //pop/$env(USERNAME)/. stat } {} -test cmdAH-28.11 {Tcl_FileObjCmd: stat} {win nonPortable} { - # stat of network directory was returning id of current local drive. - +test cmdAH-28.11 {Tcl_FileObjCmd: stat} -setup { set old [pwd] +} -constraints {win nonPortable} -body { + # stat of network directory was returning id of current local drive. cd c:/ - file stat //pop/$env(USERNAME) stat - cd $old expr {$stat(dev) == 2} -} 0 -test cmdAH-28.12 {Tcl_FileObjCmd: stat} { - # stat(mode) with S_IFREG flag was returned as a negative number - # if mode_t was a short instead of an unsigned short. - +} -cleanup { + cd $old +} -result 0 +test cmdAH-28.12 {Tcl_FileObjCmd: stat} -setup { set filename [makeFile "" foo.test] +} -body { + # stat(mode) with S_IFREG flag was returned as a negative number if mode_t + # was a short instead of an unsigned short. file stat $filename stat - removeFile $filename expr {$stat(mode) > 0} -} 1 +} -cleanup { + removeFile $filename +} -result 1 catch {unset stat} # type -test cmdAH-29.1 {Tcl_FileObjCmd: type} { - list [catch {file size a b} msg] $msg -} {1 {wrong # args: should be "file size name"}} +test cmdAH-29.1 {Tcl_FileObjCmd: type} -returnCodes error -body { + file size a b +} -result {wrong # args: should be "file size name"} test cmdAH-29.2 {Tcl_FileObjCmd: type} { file type $dirfile } directory @@ -1418,79 +1415,79 @@ test cmdAH-29.3.0 {Tcl_FileObjCmd: delete removes link not file} {unix nonPortab test cmdAH-29.3 {Tcl_FileObjCmd: type} { file type $gorpfile } file -test cmdAH-29.4 {Tcl_FileObjCmd: type} {unix} { +test cmdAH-29.4 {Tcl_FileObjCmd: type} -constraints {unix} -setup { catch {file delete $linkfile} +} -body { # Unlike [exec ln -s], [file link] requires an existing target file link -symbolic $linkfile $gorpfile - set result [file type $linkfile] + file type $linkfile +} -cleanup { file delete $linkfile - set result -} link -test cmdAH-29.4.1 {Tcl_FileObjCmd: type} {linkDirectory} { +} -result link +test cmdAH-29.4.1 {Tcl_FileObjCmd: type} -constraints {linkDirectory} -setup { set tempdir [makeDirectory temp] +} -body { set linkdir [file join [temporaryDirectory] link.dir] file link -symbolic $linkdir $tempdir - set result [file type $linkdir] + file type $linkdir +} -cleanup { file delete $linkdir removeDirectory $tempdir - set result -} link +} -result link test cmdAH-29.5 {Tcl_FileObjCmd: type} { - string tolower [list [catch {file type _bogus_} msg] $msg $errorCode] -} {1 {could not read "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} + list [catch {file type _bogus_} msg] [string tolower $msg] $errorCode +} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} # Error conditions -test cmdAH-30.1 {Tcl_FileObjCmd: error conditions} { - list [catch {file gorp x} msg] $msg -} {1 {bad option "gorp": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-30.2 {Tcl_FileObjCmd: error conditions} { - list [catch {file ex x} msg] $msg -} {1 {ambiguous option "ex": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-30.3 {Tcl_FileObjCmd: error conditions} { - list [catch {file is x} msg] $msg -} {1 {ambiguous option "is": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-30.4 {Tcl_FileObjCmd: error conditions} { - list [catch {file z x} msg] $msg -} {1 {bad option "z": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-30.5 {Tcl_FileObjCmd: error conditions} { - list [catch {file read x} msg] $msg -} {1 {ambiguous option "read": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-30.6 {Tcl_FileObjCmd: error conditions} { - list [catch {file s x} msg] $msg -} {1 {ambiguous option "s": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-30.7 {Tcl_FileObjCmd: error conditions} { - list [catch {file t x} msg] $msg -} {1 {ambiguous option "t": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable}} -test cmdAH-30.8 {Tcl_FileObjCmd: error conditions} { - list [catch {file dirname ~woohgy} msg] $msg -} {1 {user "woohgy" doesn't exist}} +test cmdAH-30.1 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file gorp x +} -result {bad option "gorp": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable} +test cmdAH-30.2 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file ex x +} -match glob -result {ambiguous option "ex": must be *} +test cmdAH-30.3 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file is x +} -match glob -result {ambiguous option "is": must be *} +test cmdAH-30.4 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file z x +} -match glob -result {bad option "z": must be *} +test cmdAH-30.5 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file read x +} -match glob -result {ambiguous option "read": must be *} +test cmdAH-30.6 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file s x +} -match glob -result {ambiguous option "s": must be *} +test cmdAH-30.7 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file t x +} -match glob -result {ambiguous option "t": must be *} +test cmdAH-30.8 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { + file dirname ~woohgy +} -result {user "woohgy" doesn't exist} # channels -# In testing 'file channels', we need to make sure that a channel -# created in one interp isn't visible in another. +# In testing 'file channels', we need to make sure that a channel created in +# one interp isn't visible in another. interp create simpleInterp interp create -safe safeInterp interp create safeInterp expose file file -test cmdAH-31.1 {Tcl_FileObjCmd: channels, too many args} { - list [catch {file channels a b} msg] $msg -} {1 {wrong # args: should be "file channels ?pattern?"}} +test cmdAH-31.1 {Tcl_FileObjCmd: channels, too many args} -body { + file channels a b +} -returnCodes error -result {wrong # args: should be "file channels ?pattern?"} test cmdAH-31.2 {Tcl_FileObjCmd: channels, too many args} { # Normal interps start out with only the standard channels lsort [simpleInterp eval [list file chan]] -} [lsort {stderr stdout stdin}] +} {stderr stdin stdout} test cmdAH-31.3 {Tcl_FileObjCmd: channels, globbing} { string equal [file channels] [file channels *] } {1} test cmdAH-31.4 {Tcl_FileObjCmd: channels, globbing} { lsort [file channels std*] -} [lsort {stdout stderr stdin}] - +} {stderr stdin stdout} set newFileId [open $gorpfile w] - test cmdAH-31.5 {Tcl_FileObjCmd: channels} { set res [file channels $newFileId] string equal $newFileId $res @@ -1499,13 +1496,11 @@ test cmdAH-31.6 {Tcl_FileObjCmd: channels in other interp} { # Safe interps start out with no channels safeInterp eval [list file channels] } {} -test cmdAH-31.7 {Tcl_FileObjCmd: channels in other interp} { - list [catch {safeInterp eval [list puts $newFileId "hello"]} msg] $msg -} [list 1 "can not find channel named \"$newFileId\""] - +test cmdAH-31.7 {Tcl_FileObjCmd: channels in other interp} -body { + safeInterp eval [list puts $newFileId "hello"] +} -returnCodes error -result "can not find channel named \"$newFileId\"" interp share {} $newFileId safeInterp interp share {} stdout safeInterp - test cmdAH-31.8 {Tcl_FileObjCmd: channels in other interp} { # $newFileId should now be visible in both interps list [file channels $newFileId] \ @@ -1518,9 +1513,7 @@ test cmdAH-31.10 {Tcl_FileObjCmd: channels in other interp} { # we can now write to $newFileId from slave safeInterp eval [list puts $newFileId "hello"] } {} - interp transfer {} $newFileId safeInterp - test cmdAH-31.11 {Tcl_FileObjCmd: channels in other interp} { # $newFileId should now be visible only in safeInterp list [file channels $newFileId] \ -- cgit v0.12 From eb97dfe76d6d46cf1b3c040b8a907305e5300afe Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Sep 2008 13:03:02 +0000 Subject: Fix efficiency bug detected by Kieran Elby. --- ChangeLog | 7 +++++++ generic/tclListObj.c | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e8dc18..558d591 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-10 Donal K. Fellows + + * generic/tclListObj.c (Tcl_ListObjGetElements): Make this list->dict + transformation - encountered when using [foreach] with dicts - not as + expensive as it was before. Spotted by Kieran Elby and reported on + tcl-core. + 2008-09-08 Donal K. Fellows * tests/append.test, appendComp.test, cmdAH.test: Use the powers of diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 7505569..aebaee8 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.52 2008/08/23 10:54:24 dkf Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.53 2008/09/10 13:03:33 dkf Exp $ */ #include "tclInt.h" @@ -428,7 +428,16 @@ Tcl_ListObjGetElements( if (listPtr->typePtr != &tclListType) { int result, length; - (void) TclGetStringFromObj(listPtr, &length); + /* + * Don't get the string version of a dictionary; that transformation + * is not lossy, but is expensive. + */ + + if (listPtr->typePtr == &tclDictType) { + (void) Tcl_DictObjSize(NULL, listPtr, &length); + } else { + (void) TclGetStringFromObj(listPtr, &length); + } if (!length) { *objcPtr = 0; *objvPtr = NULL; -- cgit v0.12 From b2d9ed24c8428b9c2230515bf13aa76dcfdb607f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 10 Sep 2008 13:23:47 +0000 Subject: * tests/nre.test: add missing constraints; enable test of foreach recursion. * generic/tclBasic.c: * generic/tclCompile.h: * generic/tclExecute.c (INST_EVAL_STK): fix for [Bug 2102930], wrong numLevels when evaling a canonical list. --- ChangeLog | 10 ++++++++++ generic/tclBasic.c | 5 ++--- generic/tclCompile.h | 3 ++- generic/tclExecute.c | 9 ++++++++- tests/nre.test | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 68 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 558d591..5c412e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-09-10 Miguel Sofer + + * tests/nre.test: add missing constraints; enable test of foreach + recursion. + + * generic/tclBasic.c: + * generic/tclCompile.h: + * generic/tclExecute.c (INST_EVAL_STK): fix for [Bug 2102930], + wrong numLevels when evaling a canonical list. + 2008-09-10 Donal K. Fellows * generic/tclListObj.c (Tcl_ListObjGetElements): Make this list->dict diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 68700c8..1f80d43 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.365 2008/08/26 22:37:02 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.366 2008/09/10 13:24:00 msofer Exp $ */ #include "tclInt.h" @@ -134,7 +134,6 @@ static Tcl_NRPostProc TEOV_Error; static Tcl_NRPostProc TEOEx_ListCallback; static Tcl_NRPostProc TEOEx_ByteCodeCallback; -static Tcl_NRPostProc NRCommand; static Tcl_NRPostProc NRRunObjProc; static Tcl_NRPostProc AtProcExitCleanup; @@ -4228,7 +4227,7 @@ TclNRRunCallbacks( return result; } -static int +int NRCommand( ClientData data[], Tcl_Interp *interp, diff --git a/generic/tclCompile.h b/generic/tclCompile.h index c7539ba..ab8eef8 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.106 2008/08/17 19:37:11 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.107 2008/09/10 13:24:09 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -838,6 +838,7 @@ typedef struct { */ MODULE_SCOPE Tcl_NRPostProc NRCallTEBC; +MODULE_SCOPE Tcl_NRPostProc NRCommand; #define TCL_NR_BC_TYPE 0 #define TCL_NR_ATEXIT_TYPE 1 diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 326cc18..ba7bd62 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.410 2008/09/08 03:55:21 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.411 2008/09/10 13:24:12 msofer Exp $ */ #include "tclInt.h" @@ -2700,6 +2700,13 @@ TclExecuteByteCode( } objc = listRepPtr->elemCount; objv = &listRepPtr->elements; + + /* + * Fix for [Bug 2102930] + */ + + iPtr->numLevels++; + Tcl_NRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); goto doInvocationFromEval; } } diff --git a/tests/nre.test b/tests/nre.test index c415150..ef2802f 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.5 2008/09/01 12:28:10 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.6 2008/09/10 13:24:26 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -69,6 +69,8 @@ test nre-1.1 {self-recursive procs} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 1 1 1} 0} test nre-1.2 {self-recursive lambdas} -setup { @@ -78,6 +80,8 @@ test nre-1.2 {self-recursive lambdas} -setup { apply $a 0 } -cleanup { unset a abs +} -constraints { + testnrelevels } -result {{0 1 1 1} 0} test nre-1.3 {mutually recursive procs and lambdas} -setup { @@ -91,6 +95,8 @@ test nre-1.3 {mutually recursive procs and lambdas} -setup { } -cleanup { rename a {} unset b abs +} -constraints { + testnrelevels } -result {{0 2 2 2} 0} # @@ -107,6 +113,8 @@ test nre-2.1 {alias is not recursive} -setup { rename a {} rename b {} unset abs +} -constraints { + testnrelevels } -result {{0 2 1 1} 0} # @@ -125,6 +133,8 @@ test nre-3.1 {imports are not recursive} -setup { } -cleanup { rename a {} namespace delete ::foo +} -constraints { + testnrelevels } -result {{0 2 1 1} 0} test nre-4.1 {ensembles are not recursive} -setup { @@ -139,6 +149,8 @@ test nre-4.1 {ensembles are not recursive} -setup { rename a {} rename b {} unset abs +} -constraints { + testnrelevels } -result {{0 2 1 1} 0} test nre-5.1 {[namespace eval] is not recursive} -setup { @@ -150,6 +162,8 @@ test nre-5.1 {[namespace eval] is not recursive} -setup { ::foo::a 0 } -cleanup { namespace delete ::foo +} -constraints { + testnrelevels } -result {{0 2 2 2} 0} test nre-5.2 {[namespace eval] is not recursive} -setup { @@ -161,6 +175,8 @@ test nre-5.2 {[namespace eval] is not recursive} -setup { foo::a 0 } -cleanup { namespace delete ::foo +} -constraints { + testnrelevels } -result {{0 2 2 2} 0} test nre-6.1 {[uplevel] is not recursive} -setup { @@ -171,6 +187,8 @@ test nre-6.1 {[uplevel] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 2 2 0} 0} test nre-6.2 {[uplevel] is not recursive} -setup { @@ -181,6 +199,8 @@ test nre-6.2 {[uplevel] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 2 2 0} 0} test nre-7.1 {[catch] is not recursive} -setup { @@ -191,6 +211,8 @@ test nre-7.1 {[catch] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 3 3 0} 0} test nre-7.2 {[if] is not recursive} -setup { @@ -201,6 +223,8 @@ test nre-7.2 {[if] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 2 2 0} 0} test nre-7.3 {[while] is not recursive} -setup { @@ -211,6 +235,8 @@ test nre-7.3 {[while] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 2 2 0} 0} test nre-7.4 {[for] is not recursive} -setup { @@ -221,6 +247,8 @@ test nre-7.4 {[for] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 2 2 0} 0} test nre-7.5 {[foreach] is not recursive} -constraints {knownBug} -setup { @@ -234,7 +262,9 @@ test nre-7.5 {[foreach] is not recursive} -constraints {knownBug} -setup { } -cleanup { rename a {} unset abs -} -result {{0 2 2 0} 0} +} -constraints { + testnrelevels +} -result {{0 3 3 0} 0} test nre-7.6 {[eval] is not recursive} -setup { proc a i [makebody {eval [list a $i]}] @@ -244,6 +274,8 @@ test nre-7.6 {[eval] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 2 2 1} 0} test nre-7.7 {[eval] is not recursive} -setup { @@ -254,6 +286,8 @@ test nre-7.7 {[eval] is not recursive} -setup { } -cleanup { rename a {} unset abs +} -constraints { + testnrelevels } -result {{0 2 2 1} 0} test nre-8.1 {nre and {*}} -body { @@ -285,6 +319,8 @@ test nre-oo.1 {really deep calls in oo - direct} -setup { } -cleanup { foo destroy unset abs +} -constraints { + testnrelevels } -result {{0 1 1 1} 0} test nre-oo.2 {really deep calls in oo - call via [self]} -setup { @@ -296,6 +332,8 @@ test nre-oo.2 {really deep calls in oo - call via [self]} -setup { } -cleanup { foo destroy unset abs +} -constraints { + testnrelevels } -result {{0 1 1 1} 0} test nre-oo.3 {really deep calls in oo - private calls} -setup { @@ -307,6 +345,8 @@ test nre-oo.3 {really deep calls in oo - private calls} -setup { } -cleanup { foo destroy unset abs +} -constraints { + testnrelevels } -result {{0 1 1 1} 0} test nre-oo.4 {really deep calls in oo - overriding} -setup { @@ -323,6 +363,8 @@ test nre-oo.4 {really deep calls in oo - overriding} -setup { } -cleanup { foo destroy unset abs +} -constraints { + testnrelevels } -result {{0 1 1 1} 0} test nre-oo.5 {really deep calls in oo - forwards} -setup { @@ -338,6 +380,8 @@ test nre-oo.5 {really deep calls in oo - forwards} -setup { } -cleanup { foo destroy unset abs +} -constraints { + testnrelevels } -result {{0 2 1 1} 0} @@ -362,7 +406,6 @@ test nre-X.1 {eval in wrong interp} { set res } {::foo ::foo {} {}} - # cleanup ::tcltest::cleanupTests -- cgit v0.12 From a19fa7cdab3e5494e84dd29f64a39ccef1c7e138 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Sep 2008 13:50:03 +0000 Subject: Use the powers of tcltest2 for good! Also add basic testing of disassmbler (though not of its output format). --- ChangeLog | 7 + tests/binary.test | 1503 +++++++++++++++++++++++++------------------------ tests/cmdAH.test | 7 +- tests/cmdIL.test | 370 +++++------- tests/cmdMZ.test | 269 +++++---- tests/compile.test | 87 ++- tests/fileSystem.test | 598 +++++++++----------- 7 files changed, 1401 insertions(+), 1440 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c412e3..be63310 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-10 Donal K. Fellows + + * tests/binary.test,cmdAH.test,cmdIL.test,cmdMZ.test,fileSystem.test: + More use of tcltest2 to simplify the tests as exposed to people. + * tests/compile.test (compile-18.*): Added *some* tests of the + disassmbler, though not of its output format. + 2008-09-10 Miguel Sofer * tests/nre.test: add missing constraints; enable test of foreach diff --git a/tests/binary.test b/tests/binary.test index 7f41559..8b8a1ab 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -1,16 +1,16 @@ -# This file tests the tclBinary.c file and the "binary" Tcl command. +# This file tests the tclBinary.c file and the "binary" Tcl command. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1997 by Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.36 2008/07/23 23:19:33 ferrieux Exp $ +# RCS: @(#) $Id: binary.test,v 1.37 2008/09/10 13:50:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -19,35 +19,90 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint bigEndian [expr {$tcl_platform(byteOrder) eq "bigEndian"}] testConstraint littleEndian [expr {$tcl_platform(byteOrder) eq "littleEndian"}] +# Big test for correct ordering of data in [expr] +proc testIEEE {} { + variable ieeeValues + binary scan [binary format dd -1.0 1.0] c* c + switch -exact -- $c { + {0 0 0 0 0 0 -16 -65 0 0 0 0 0 0 -16 63} { + # little endian + binary scan \x00\x00\x00\x00\x00\x00\xf0\xff d \ + ieeeValues(-Infinity) + binary scan \x00\x00\x00\x00\x00\x00\xf0\xbf d \ + ieeeValues(-Normal) + binary scan \x00\x00\x00\x00\x00\x00\x08\x80 d \ + ieeeValues(-Subnormal) + binary scan \x00\x00\x00\x00\x00\x00\x00\x80 d \ + ieeeValues(-0) + binary scan \x00\x00\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(+0) + binary scan \x00\x00\x00\x00\x00\x00\x08\x00 d \ + ieeeValues(+Subnormal) + binary scan \x00\x00\x00\x00\x00\x00\xf0\x3f d \ + ieeeValues(+Normal) + binary scan \x00\x00\x00\x00\x00\x00\xf0\x7f d \ + ieeeValues(+Infinity) + binary scan \x00\x00\x00\x00\x00\x00\xf8\x7f d \ + ieeeValues(NaN) + set ieeeValues(littleEndian) 1 + return 1 + } + {-65 -16 0 0 0 0 0 0 63 -16 0 0 0 0 0 0} { + binary scan \xff\xf0\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(-Infinity) + binary scan \xbf\xf0\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(-Normal) + binary scan \x80\x08\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(-Subnormal) + binary scan \x80\x00\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(-0) + binary scan \x00\x00\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(+0) + binary scan \x00\x08\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(+Subnormal) + binary scan \x3f\xf0\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(+Normal) + binary scan \x7f\xf0\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(+Infinity) + binary scan \x7f\xf8\x00\x00\x00\x00\x00\x00 d \ + ieeeValues(NaN) + set ieeeValues(littleEndian) 0 + return 1 + } + default { + return 0 + } + } +} + +testConstraint ieeeFloatingPoint [testIEEE] + +# ---------------------------------------------------------------------- + test binary-0.1 {DupByteArrayInternalRep} { set hdr [binary format cc 0 0316] set buf hellomatt - set data $hdr append data $buf - string length $data } 11 test binary-1.1 {Tcl_BinaryObjCmd: bad args} -body { binary } -returnCodes error -match glob -result {wrong # args: *} -test binary-1.2 {Tcl_BinaryObjCmd: bad args} -body { +test binary-1.2 {Tcl_BinaryObjCmd: bad args} -returnCodes error -body { binary foo -} -returnCodes error -match glob -result {unknown or ambiguous subcommand "foo": *} - -test binary-1.3 {Tcl_BinaryObjCmd: format error} -body { +} -match glob -result {unknown or ambiguous subcommand "foo": *} +test binary-1.3 {Tcl_BinaryObjCmd: format error} -returnCodes error -body { binary f -} -returnCodes error \ - -result {wrong # args: should be "binary format formatString ?arg ...?"} +} -result {wrong # args: should be "binary format formatString ?arg ...?"} test binary-1.4 {Tcl_BinaryObjCmd: format} -body { binary format "" } -result {} - -test binary-2.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format a } msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-2.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format a +} -result {not enough arguments for all format specifiers} test binary-2.2 {Tcl_BinaryObjCmd: format} { binary format a0 foo } {} @@ -70,9 +125,9 @@ test binary-2.8 {Tcl_BinaryObjCmd: format} { binary format a*X3a2 foobar x } foox\x00r -test binary-3.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format A} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-3.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format A +} -result {not enough arguments for all format specifiers} test binary-3.2 {Tcl_BinaryObjCmd: format} { binary format A0 f } {} @@ -95,9 +150,9 @@ test binary-3.8 {Tcl_BinaryObjCmd: format} { binary format A*X3A2 foobar x } {foox r} -test binary-4.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format B} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-4.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format B +} -result {not enough arguments for all format specifiers} test binary-4.2 {Tcl_BinaryObjCmd: format} { binary format B0 1 } {} @@ -119,13 +174,13 @@ test binary-4.7 {Tcl_BinaryObjCmd: format} { test binary-4.8 {Tcl_BinaryObjCmd: format} { binary format B2B3 10 010 } \x80\x40 -test binary-4.9 {Tcl_BinaryObjCmd: format} { - list [catch {binary format B1B5 1 foo} msg] $msg -} {1 {expected binary string but got "foo" instead}} +test binary-4.9 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format B1B5 1 foo +} -result {expected binary string but got "foo" instead} -test binary-5.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format b} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-5.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format b +} -result {not enough arguments for all format specifiers} test binary-5.2 {Tcl_BinaryObjCmd: format} { binary format b0 1 } {} @@ -150,13 +205,13 @@ test binary-5.8 {Tcl_BinaryObjCmd: format} { test binary-5.9 {Tcl_BinaryObjCmd: format} { binary format b2b3 10 010 } \x01\x02 -test binary-5.10 {Tcl_BinaryObjCmd: format} { - list [catch {binary format b1b5 1 foo} msg] $msg -} {1 {expected binary string but got "foo" instead}} +test binary-5.10 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format b1b5 1 foo +} -result {expected binary string but got "foo" instead} -test binary-6.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format h} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-6.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format h +} -result {not enough arguments for all format specifiers} test binary-6.2 {Tcl_BinaryObjCmd: format} { binary format h0 1 } {} @@ -184,13 +239,13 @@ test binary-6.9 {Tcl_BinaryObjCmd: format} { test binary-6.10 {Tcl_BinaryObjCmd: format} { binary format h2h3 23 456 } \x32\x54\x06 -test binary-6.11 {Tcl_BinaryObjCmd: format} { - list [catch {binary format h2 foo} msg] $msg -} {1 {expected hexadecimal string but got "foo" instead}} +test binary-6.11 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format h2 foo +} -result {expected hexadecimal string but got "foo" instead} -test binary-7.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format H} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-7.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format H +} -result {not enough arguments for all format specifiers} test binary-7.2 {Tcl_BinaryObjCmd: format} { binary format H0 1 } {} @@ -218,16 +273,16 @@ test binary-7.9 {Tcl_BinaryObjCmd: format} { test binary-7.10 {Tcl_BinaryObjCmd: format} { binary format H2H3 23 456 } \x23\x45\x60 -test binary-7.11 {Tcl_BinaryObjCmd: format} { - list [catch {binary format H2 foo} msg] $msg -} {1 {expected hexadecimal string but got "foo" instead}} - -test binary-8.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format c} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-8.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format c blat} msg] $msg -} {1 {expected integer but got "blat"}} +test binary-7.11 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format H2 foo +} -result {expected hexadecimal string but got "foo" instead} + +test binary-8.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format c +} -result {not enough arguments for all format specifiers} +test binary-8.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format c blat +} -result {expected integer but got "blat"} test binary-8.3 {Tcl_BinaryObjCmd: format} { binary format c0 0x50 } {} @@ -246,24 +301,24 @@ test binary-8.7 {Tcl_BinaryObjCmd: format} { test binary-8.8 {Tcl_BinaryObjCmd: format} { binary format c* {0x50 0x52} } PR -test binary-8.9 {Tcl_BinaryObjCmd: format} { - list [catch {binary format c2 {0x50}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-8.10 {Tcl_BinaryObjCmd: format} { +test binary-8.9 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format c2 {0x50} +} -result {number of elements in list does not match count} +test binary-8.10 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {0x50 0x51} - list [catch {binary format c $a} msg] $msg -} [list 1 "expected integer but got \"0x50 0x51\""] + binary format c $a +} -result "expected integer but got \"0x50 0x51\"" test binary-8.11 {Tcl_BinaryObjCmd: format} { set a {0x50 0x51} binary format c1 $a } P -test binary-9.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format s} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-9.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format s blat} msg] $msg -} {1 {expected integer but got "blat"}} +test binary-9.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format s +} -result {not enough arguments for all format specifiers} +test binary-9.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format s blat +} -result {expected integer but got "blat"} test binary-9.3 {Tcl_BinaryObjCmd: format} { binary format s0 0x50 } {} @@ -285,24 +340,24 @@ test binary-9.8 {Tcl_BinaryObjCmd: format} { test binary-9.9 {Tcl_BinaryObjCmd: format} { binary format s2 {0x50 0x52 0x53} 0x54 } P\x00R\x00 -test binary-9.10 {Tcl_BinaryObjCmd: format} { - list [catch {binary format s2 {0x50}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-9.11 {Tcl_BinaryObjCmd: format} { +test binary-9.10 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format s2 {0x50} +} -result {number of elements in list does not match count} +test binary-9.11 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {0x50 0x51} - list [catch {binary format s $a} msg] $msg -} [list 1 "expected integer but got \"0x50 0x51\""] + binary format s $a +} -result "expected integer but got \"0x50 0x51\"" test binary-9.12 {Tcl_BinaryObjCmd: format} { set a {0x50 0x51} binary format s1 $a } P\x00 -test binary-10.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format S} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-10.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format S blat} msg] $msg -} {1 {expected integer but got "blat"}} +test binary-10.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format S +} -result {not enough arguments for all format specifiers} +test binary-10.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format S blat +} -result {expected integer but got "blat"} test binary-10.3 {Tcl_BinaryObjCmd: format} { binary format S0 0x50 } {} @@ -324,24 +379,24 @@ test binary-10.8 {Tcl_BinaryObjCmd: format} { test binary-10.9 {Tcl_BinaryObjCmd: format} { binary format S2 {0x50 0x52 0x53} 0x54 } \x00P\x00R -test binary-10.10 {Tcl_BinaryObjCmd: format} { - list [catch {binary format S2 {0x50}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-10.11 {Tcl_BinaryObjCmd: format} { +test binary-10.10 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format S2 {0x50} +} -result {number of elements in list does not match count} +test binary-10.11 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {0x50 0x51} - list [catch {binary format S $a} msg] $msg -} [list 1 "expected integer but got \"0x50 0x51\""] + binary format S $a +} -result "expected integer but got \"0x50 0x51\"" test binary-10.12 {Tcl_BinaryObjCmd: format} { set a {0x50 0x51} binary format S1 $a } \x00P -test binary-11.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format i} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-11.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format i blat} msg] $msg -} {1 {expected integer but got "blat"}} +test binary-11.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format i +} -result {not enough arguments for all format specifiers} +test binary-11.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format i blat +} -result {expected integer but got "blat"} test binary-11.3 {Tcl_BinaryObjCmd: format} { binary format i0 0x50 } {} @@ -366,24 +421,24 @@ test binary-11.9 {Tcl_BinaryObjCmd: format} { test binary-11.10 {Tcl_BinaryObjCmd: format} { binary format i* {0x50515253 0x52} } SRQPR\x00\x00\x00 -test binary-11.11 {Tcl_BinaryObjCmd: format} { - list [catch {binary format i2 {0x50}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-11.12 {Tcl_BinaryObjCmd: format} { +test binary-11.11 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format i2 {0x50} +} -result {number of elements in list does not match count} +test binary-11.12 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {0x50 0x51} - list [catch {binary format i $a} msg] $msg -} [list 1 "expected integer but got \"0x50 0x51\""] + binary format i $a +} -result "expected integer but got \"0x50 0x51\"" test binary-11.13 {Tcl_BinaryObjCmd: format} { set a {0x50 0x51} binary format i1 $a } P\x00\x00\x00 -test binary-12.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format I} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-12.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format I blat} msg] $msg -} {1 {expected integer but got "blat"}} +test binary-12.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format I +} -result {not enough arguments for all format specifiers} +test binary-12.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format I blat +} -result {expected integer but got "blat"} test binary-12.3 {Tcl_BinaryObjCmd: format} { binary format I0 0x50 } {} @@ -408,24 +463,24 @@ test binary-12.9 {Tcl_BinaryObjCmd: format} { test binary-12.10 {Tcl_BinaryObjCmd: format} { binary format I* {0x50515253 0x52} } PQRS\x00\x00\x00R -test binary-12.11 {Tcl_BinaryObjCmd: format} { - list [catch {binary format i2 {0x50}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-12.12 {Tcl_BinaryObjCmd: format} { +test binary-12.11 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format i2 {0x50} +} -result {number of elements in list does not match count} +test binary-12.12 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {0x50 0x51} - list [catch {binary format I $a} msg] $msg -} [list 1 "expected integer but got \"0x50 0x51\""] + binary format I $a +} -result "expected integer but got \"0x50 0x51\"" test binary-12.13 {Tcl_BinaryObjCmd: format} { set a {0x50 0x51} binary format I1 $a } \x00\x00\x00P -test binary-13.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format f} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-13.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format f blat} msg] $msg -} {1 {expected floating-point number but got "blat"}} +test binary-13.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format f +} -result {not enough arguments for all format specifiers} +test binary-13.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format f blat +} -result {expected floating-point number but got "blat"} test binary-13.3 {Tcl_BinaryObjCmd: format} { binary format f0 1.6 } {} @@ -465,13 +520,13 @@ test binary-13.14 {Tcl_BinaryObjCmd: float underflow} bigEndian { test binary-13.15 {Tcl_BinaryObjCmd: float underflow} littleEndian { binary format f -3.402825e-100 } \x00\x00\x00\x80 -test binary-13.16 {Tcl_BinaryObjCmd: format} { - list [catch {binary format f2 {1.6}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-13.17 {Tcl_BinaryObjCmd: format} { +test binary-13.16 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format f2 {1.6} +} -result {number of elements in list does not match count} +test binary-13.17 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {1.6 3.4} - list [catch {binary format f $a} msg] $msg -} [list 1 "expected floating-point number but got \"1.6 3.4\""] + binary format f $a +} -result "expected floating-point number but got \"1.6 3.4\"" test binary-13.18 {Tcl_BinaryObjCmd: format} bigEndian { set a {1.6 3.4} binary format f1 $a @@ -481,12 +536,12 @@ test binary-13.19 {Tcl_BinaryObjCmd: format} littleEndian { binary format f1 $a } \xcd\xcc\xcc\x3f -test binary-14.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format d} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-14.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format d blat} msg] $msg -} {1 {expected floating-point number but got "blat"}} +test binary-14.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format d +} -result {not enough arguments for all format specifiers} +test binary-14.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format d blat +} -result {expected floating-point number but got "blat"} test binary-14.3 {Tcl_BinaryObjCmd: format} { binary format d0 1.6 } {} @@ -514,13 +569,13 @@ test binary-14.10 {Tcl_BinaryObjCmd: format} bigEndian { test binary-14.11 {Tcl_BinaryObjCmd: format} littleEndian { binary format d2 {1.6 3.4 5.6} } \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 -test binary-14.14 {Tcl_BinaryObjCmd: format} { - list [catch {binary format d2 {1.6}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-14.15 {Tcl_BinaryObjCmd: format} { +test binary-14.14 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format d2 {1.6} +} -result {number of elements in list does not match count} +test binary-14.15 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {1.6 3.4} - list [catch {binary format d $a} msg] $msg -} [list 1 "expected floating-point number but got \"1.6 3.4\""] + binary format d $a +} -result "expected floating-point number but got \"1.6 3.4\"" test binary-14.16 {Tcl_BinaryObjCmd: format} bigEndian { set a {1.6 3.4} binary format d1 $a @@ -534,9 +589,9 @@ test binary-14.18 {FormatNumber: Bug 1116542} { set w } 1.25 -test binary-15.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format ax*a "y" "z"} msg] $msg -} {1 {cannot use "*" in format string with "x"}} +test binary-15.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format ax*a "y" "z" +} -result {cannot use "*" in format string with "x"} test binary-15.2 {Tcl_BinaryObjCmd: format} { binary format axa "y" "z" } y\x00z @@ -585,810 +640,840 @@ test binary-17.3 {Tcl_BinaryObjCmd: format} { binary format {a* @0 a2 @* a*} "foobar" "ab" "blat" } abobarblat -test binary-18.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format u0a3 abc abd} msg] $msg -} {1 {bad field specifier "u"}} +test binary-18.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format u0a3 abc abd +} -result {bad field specifier "u"} - -test binary-19.1 {Tcl_BinaryObjCmd: errors} { - list [catch {binary s} msg] $msg -} {1 {wrong # args: should be "binary scan value formatString ?varName ...?"}} -test binary-19.2 {Tcl_BinaryObjCmd: errors} { - list [catch {binary scan foo} msg] $msg -} {1 {wrong # args: should be "binary scan value formatString ?varName ...?"}} +test binary-19.1 {Tcl_BinaryObjCmd: errors} -returnCodes error -body { + binary s +} -result {wrong # args: should be "binary scan value formatString ?varName ...?"} +test binary-19.2 {Tcl_BinaryObjCmd: errors} -returnCodes error -body { + binary scan foo +} -result {wrong # args: should be "binary scan value formatString ?varName ...?"} test binary-19.3 {Tcl_BinaryObjCmd: scan} { binary scan {} {} } 0 -test binary-20.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc a} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-20.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-20.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc a +} -result {not enough arguments for all format specifiers} +test binary-20.2 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan abc a arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-20.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + binary scan abc a arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-20.3 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { set arg1 abc list [binary scan abc a0 arg1] $arg1 -} {1 {}} -test binary-20.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 {}} +test binary-20.4 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc a* arg1] $arg1 -} {1 abc} -test binary-20.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 abc} +test binary-20.5 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc a5 arg1] [info exists arg1] -} {0 0} +} -result {0 0} test binary-20.6 {Tcl_BinaryObjCmd: scan} { set arg1 foo list [binary scan abc a2 arg1] $arg1 } {1 ab} -test binary-20.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} +test binary-20.7 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 + unset -nocomplain arg2 +} -body { list [binary scan abcdef a2a2 arg1 arg2] $arg1 $arg2 -} {2 ab cd} -test binary-20.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {2 ab cd} +test binary-20.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc a2 arg1(a)] $arg1(a) -} {1 ab} -test binary-20.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 ab} +test binary-20.9 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc a arg1(a)] $arg1(a) -} {1 a} +} -result {1 a} -test binary-21.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc A} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-21.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-21.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc A +} -result {not enough arguments for all format specifiers} +test binary-21.2 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan abc A arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-21.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + binary scan abc A arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-21.3 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { set arg1 abc list [binary scan abc A0 arg1] $arg1 -} {1 {}} -test binary-21.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 {}} +test binary-21.4 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc A* arg1] $arg1 -} {1 abc} -test binary-21.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 abc} +test binary-21.5 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc A5 arg1] [info exists arg1] -} {0 0} +} -result {0 0} test binary-21.6 {Tcl_BinaryObjCmd: scan} { set arg1 foo list [binary scan abc A2 arg1] $arg1 } {1 ab} -test binary-21.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} +test binary-21.7 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 + unset -nocomplain arg2 +} -body { list [binary scan abcdef A2A2 arg1 arg2] $arg1 $arg2 -} {2 ab cd} -test binary-21.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {2 ab cd} +test binary-21.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc A2 arg1(a)] $arg1(a) -} {1 ab} -test binary-21.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 ab} +test binary-21.9 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc A2 arg1(a)] $arg1(a) -} {1 ab} -test binary-21.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 ab} +test binary-21.10 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan abc A arg1(a)] $arg1(a) -} {1 a} -test binary-21.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 a} +test binary-21.11 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan "abc def \x00 " A* arg1] $arg1 -} {1 {abc def}} -test binary-21.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +} -result {1 {abc def}} +test binary-21.12 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -body { list [binary scan "abc def \x00ghi " A* arg1] $arg1 -} [list 1 "abc def \x00ghi"] +} -result [list 1 "abc def \x00ghi"] -test binary-22.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc b} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-22.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc b +} -result {not enough arguments for all format specifiers} test binary-22.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 b* arg1] $arg1 } {1 0100101011001010} test binary-22.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x82\x53 b arg1] $arg1 } {1 0} test binary-22.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x82\x53 b1 arg1] $arg1 } {1 0} test binary-22.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x82\x53 b0 arg1] $arg1 } {1 {}} test binary-22.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 b5 arg1] $arg1 } {1 01001} test binary-22.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 b8 arg1] $arg1 } {1 01001010} test binary-22.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 b14 arg1] $arg1 } {1 01001010110010} test binary-22.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 b14 arg1] $arg1 } {0 foo} -test binary-22.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-22.10 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 b1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-22.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + binary scan \x52\x53 b1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-22.11 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 arg2 +} -body { set arg1 foo set arg2 bar list [binary scan \x07\x87\x05 b5b* arg1 arg2] $arg1 $arg2 -} {2 11100 1110000110100000} - +} -result {2 11100 1110000110100000} -test binary-23.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc B} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-23.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc B +} -result {not enough arguments for all format specifiers} test binary-23.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 B* arg1] $arg1 } {1 0101001001010011} test binary-23.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x82\x53 B arg1] $arg1 } {1 1} test binary-23.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x82\x53 B1 arg1] $arg1 } {1 1} test binary-23.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 B0 arg1] $arg1 } {1 {}} test binary-23.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 B5 arg1] $arg1 } {1 01010} test binary-23.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 B8 arg1] $arg1 } {1 01010010} test binary-23.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 B14 arg1] $arg1 } {1 01010010010100} test binary-23.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 B14 arg1] $arg1 } {0 foo} -test binary-23.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-23.10 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 B1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-23.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + binary scan \x52\x53 B1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-23.11 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 arg2 +} -body { set arg1 foo set arg2 bar list [binary scan \x70\x87\x05 B5B* arg1 arg2] $arg1 $arg2 -} {2 01110 1000011100000101} +} -result {2 01110 1000011100000101} -test binary-24.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc h} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-24.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc h +} -result {not enough arguments for all format specifiers} test binary-24.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 h* arg1] $arg1 } {1 253a} test binary-24.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xc2\xa3 h arg1] $arg1 } {1 2} test binary-24.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x82\x53 h1 arg1] $arg1 } {1 2} test binary-24.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 h0 arg1] $arg1 } {1 {}} test binary-24.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xf2\x53 h2 arg1] $arg1 } {1 2f} test binary-24.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 h3 arg1] $arg1 } {1 253} test binary-24.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 h3 arg1] $arg1 } {0 foo} -test binary-24.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-24.9 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 h1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-24.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + binary scan \x52\x53 h1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-24.10 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 arg2 +} -body { set arg1 foo set arg2 bar list [binary scan \x70\x87\x05 h2h* arg1 arg2] $arg1 $arg2 -} {2 07 7850} +} -result {2 07 7850} -test binary-25.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc H} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-25.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc H +} -result {not enough arguments for all format specifiers} test binary-25.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 H* arg1] $arg1 } {1 52a3} test binary-25.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xc2\xa3 H arg1] $arg1 } {1 c} test binary-25.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x82\x53 H1 arg1] $arg1 } {1 8} test binary-25.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 H0 arg1] $arg1 } {1 {}} test binary-25.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xf2\x53 H2 arg1] $arg1 } {1 f2} test binary-25.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\x53 H3 arg1] $arg1 } {1 525} test binary-25.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 H3 arg1] $arg1 } {0 foo} -test binary-25.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-25.9 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 H1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x52\x53 H1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-25.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x70\x87\x05 H2H* arg1 arg2] $arg1 $arg2 } {2 70 8705} -test binary-26.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc c} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-26.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc c +} -result {not enough arguments for all format specifiers} test binary-26.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 c* arg1] $arg1 } {1 {82 -93}} test binary-26.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 c arg1] $arg1 } {1 82} test binary-26.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 c1 arg1] $arg1 } {1 82} test binary-26.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 c0 arg1] $arg1 } {1 {}} test binary-26.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 c2 arg1] $arg1 } {1 {82 -93}} test binary-26.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xff c arg1] $arg1 } {1 -1} test binary-26.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 c3 arg1] $arg1 } {0 foo} -test binary-26.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-26.9 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 c1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x52\x53 c1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-26.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x70\x87\x05 c2c* arg1 arg2] $arg1 $arg2 } {2 {112 -121} 5} test binary-26.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 cu* arg1] $arg1 } {1 {82 163}} test binary-26.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 cu arg1] $arg1 } {1 82} test binary-26.13 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xff cu arg1] $arg1 } {1 255} test binary-26.14 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x80\x80 cuc arg1 arg2] $arg1 $arg2 } {2 128 -128} test binary-26.15 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x80\x80 ccu arg1 arg2] $arg1 $arg2 } {2 -128 128} -test binary-27.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc s} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-27.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc s +} -result {not enough arguments for all format specifiers} test binary-27.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 s* arg1] $arg1 } {1 {-23726 21587}} test binary-27.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 s arg1] $arg1 } {1 -23726} test binary-27.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 s1 arg1] $arg1 } {1 -23726} test binary-27.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 s0 arg1] $arg1 } {1 {}} test binary-27.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 s2 arg1] $arg1 } {1 {-23726 21587}} test binary-27.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 s1 arg1] $arg1 } {0 foo} -test binary-27.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-27.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 s1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x52\x53 s1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-27.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x05 s2c* arg1 arg2] $arg1 $arg2 } {2 {-23726 21587} 5} test binary-27.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 su* arg1] $arg1 } {1 {41810 21587}} test binary-27.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \xff\xff\xff\xff sus arg1 arg2] $arg1 $arg2 } {2 65535 -1} test binary-27.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \xff\xff\xff\xff ssu arg1 arg2] $arg1 $arg2 } {2 -1 65535} -test binary-28.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc S} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-28.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc S +} -result {not enough arguments for all format specifiers} test binary-28.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 S* arg1] $arg1 } {1 {21155 21332}} test binary-28.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 S arg1] $arg1 } {1 21155} test binary-28.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 S1 arg1] $arg1 } {1 21155} test binary-28.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 S0 arg1] $arg1 } {1 {}} test binary-28.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 S2 arg1] $arg1 } {1 {21155 21332}} test binary-28.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 S1 arg1] $arg1 } {0 foo} -test binary-28.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-28.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 S1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x52\x53 S1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-28.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x05 S2c* arg1 arg2] $arg1 $arg2 } {2 {21155 21332} 5} test binary-28.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 Su* arg1] $arg1 } {1 {21155 21332}} test binary-28.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xa3\x52\x54\x53 Su* arg1] $arg1 } {1 {41810 21587}} -test binary-29.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc i} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-29.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc i +} -result {not enough arguments for all format specifiers} test binary-29.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 i* arg1] $arg1 } {1 {1414767442 67305985}} test binary-29.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 i arg1] $arg1 } {1 1414767442} test binary-29.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 i1 arg1] $arg1 } {1 1414767442} test binary-29.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53 i0 arg1] $arg1 } {1 {}} test binary-29.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 i2 arg1] $arg1 } {1 {1414767442 67305985}} test binary-29.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 i1 arg1] $arg1 } {0 foo} -test binary-29.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-29.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53\x53\x54 i1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x52\x53\x53\x54 i1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-29.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04\x05 i2c* arg1 arg2] $arg1 $arg2 } {2 {1414767442 67305985} 5} test binary-29.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff iui arg1 arg2] $arg1 $arg2 } {2 4294967295 -1} test binary-29.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff iiu arg1 arg2] $arg1 $arg2 } {2 -1 4294967295} test binary-29.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan \x80\x00\x00\x00\x00\x00\x00\x80 iuiu arg1 arg2] $arg1 $arg2 } {2 128 2147483648} -test binary-30.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc I} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-30.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc I +} -result {not enough arguments for all format specifiers} test binary-30.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 I* arg1] $arg1 } {1 {1386435412 16909060}} test binary-30.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 I arg1] $arg1 } {1 1386435412} test binary-30.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 I1 arg1] $arg1 } {1 1386435412} test binary-30.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53 I0 arg1] $arg1 } {1 {}} test binary-30.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 I2 arg1] $arg1 } {1 {1386435412 16909060}} test binary-30.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 I1 arg1] $arg1 } {0 foo} -test binary-30.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-30.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53\x53\x54 I1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x52\x53\x53\x54 I1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-30.9 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04\x05 I2c* arg1 arg2] $arg1 $arg2 } {2 {1386435412 16909060} 5} test binary-30.10 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff IuI arg1 arg2] $arg1 $arg2 } {2 4294967295 -1} test binary-30.11 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff IIu arg1 arg2] $arg1 $arg2 } {2 -1 4294967295} test binary-30.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan \x80\x00\x00\x00\x00\x00\x00\x80 IuIu arg1 arg2] $arg1 $arg2 } {2 2147483648 128} -test binary-31.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc f} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-31.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc f +} -result {not enough arguments for all format specifiers} test binary-31.2 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a f* arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-31.3 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 f* arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-31.4 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a f arg1] $arg1 } {1 1.600000023841858} test binary-31.5 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 f arg1] $arg1 } {1 1.600000023841858} test binary-31.6 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd f1 arg1] $arg1 } {1 1.600000023841858} test binary-31.7 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f f1 arg1] $arg1 } {1 1.600000023841858} test binary-31.8 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd f0 arg1] $arg1 } {1 {}} test binary-31.9 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f f0 arg1] $arg1 } {1 {}} test binary-31.10 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a f2 arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-31.11 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 f2 arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-31.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 f1 arg1] $arg1 } {0 foo} -test binary-31.13 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-31.13 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x3f\xcc\xcc\xcd f1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x3f\xcc\xcc\xcd f1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-31.14 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a\x05 f2c* arg1 arg2] $arg1 $arg2 } {2 {1.600000023841858 3.4000000953674316} 5} test binary-31.15 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40\x05 f2c* arg1 arg2] $arg1 $arg2 } {2 {1.600000023841858 3.4000000953674316} 5} -test binary-32.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc d} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-32.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc d +} -result {not enough arguments for all format specifiers} test binary-32.2 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d* arg1] $arg1 } {1 {1.6 3.4}} test binary-32.3 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d* arg1] $arg1 } {1 {1.6 3.4}} test binary-32.4 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d arg1] $arg1 } {1 1.6} test binary-32.5 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d arg1] $arg1 } {1 1.6} test binary-32.6 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d1 arg1] $arg1 } {1 1.6} test binary-32.7 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f d1 arg1] $arg1 } {1 1.6} test binary-32.8 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d0 arg1] $arg1 } {1 {}} test binary-32.9 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f d0 arg1] $arg1 } {1 {}} test binary-32.10 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d2 arg1] $arg1 } {1 {1.6 3.4}} test binary-32.11 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d2 arg1] $arg1 } {1 {1.6 3.4}} test binary-32.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 d1 arg1] $arg1 } {0 foo} -test binary-32.13 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-32.13 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-32.14 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33\x05 d2c* arg1 arg2] $arg1 $arg2 } {2 {1.6 3.4} 5} test binary-32.15 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40\x05 d2c* arg1 arg2] $arg1 $arg2 } {2 {1.6 3.4} 5} test binary-33.1 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 list [binary scan abcdefg a2xa3 arg1 arg2] $arg1 $arg2 } {2 ab def} test binary-33.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 set arg2 foo list [binary scan abcdefg a3x*a3 arg1 arg2] $arg1 $arg2 } {1 abc foo} test binary-33.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 set arg2 foo list [binary scan abcdefg a3x20a3 arg1 arg2] $arg1 $arg2 } {1 abc foo} test binary-33.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 set arg2 foo list [binary scan abc a3x20a3 arg1 arg2] $arg1 $arg2 } {1 abc foo} test binary-33.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x1a1 arg1] $arg1 } {1 b} test binary-33.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x5a1 arg1] $arg1 } {1 f} test binary-33.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x0a1 arg1] $arg1 } {1 a} test binary-34.1 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 list [binary scan abcdefg a2Xa3 arg1 arg2] $arg1 $arg2 } {2 ab bcd} test binary-34.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 set arg2 foo list [binary scan abcdefg a3X*a3 arg1 arg2] $arg1 $arg2 } {2 abc abc} test binary-34.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 set arg2 foo list [binary scan abcdefg a3X20a3 arg1 arg2] $arg1 $arg2 } {2 abc abc} test binary-34.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abc X20a3 arg1] $arg1 } {1 abc} test binary-34.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x*X1a1 arg1] $arg1 } {1 f} test binary-34.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x*X5a1 arg1] $arg1 } {1 b} test binary-34.7 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x3X0a1 arg1] $arg1 } {1 d} -test binary-35.1 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} - list [catch {binary scan abcdefg a2@a3 arg1 arg2} msg] $msg -} {1 {missing count for "@" field specifier}} +test binary-35.1 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 + unset -nocomplain arg2 +} -returnCodes error -body { + binary scan abcdefg a2@a3 arg1 arg2 +} -result {missing count for "@" field specifier} test binary-35.2 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 set arg2 foo list [binary scan abcdefg a3@*a3 arg1 arg2] $arg1 $arg2 } {1 abc foo} test binary-35.3 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} - catch {unset arg2} + unset -nocomplain arg1 + unset -nocomplain arg2 set arg2 foo list [binary scan abcdefg a3@20a3 arg1 arg2] $arg1 $arg2 } {1 abc foo} test binary-35.4 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef @2a3 arg1] $arg1 } {1 cde} test binary-35.5 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x*@1a1 arg1] $arg1 } {1 b} test binary-35.6 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan abcdef x*@0a1 arg1] $arg1 } {1 a} -test binary-36.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abcdef u0a3} msg] $msg -} {1 {bad field specifier "u"}} +test binary-36.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abcdef u0a3 +} -result {bad field specifier "u"} -# GetFormatSpec is pretty thoroughly tested above, but there are a few -# cases we should text explicitly +# GetFormatSpec is pretty thoroughly tested above, but there are a few cases +# we should text explicitly test binary-37.1 {GetFormatSpec: whitespace} { binary format "a3 a5 a3" foo barblat baz @@ -1408,11 +1493,11 @@ test binary-37.5 {GetFormatSpec: whitespace} { test binary-37.6 {GetFormatSpec: whitespace} { binary format " a3 " foo } foo -test binary-37.7 {GetFormatSpec: numbers} { - list [catch {binary scan abcdef "x-1" foo} msg] $msg -} {1 {bad field specifier "-"}} +test binary-37.7 {GetFormatSpec: numbers} -returnCodes error -body { + binary scan abcdef "x-1" foo +} -result {bad field specifier "-"} test binary-37.8 {GetFormatSpec: numbers} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan abcdef "a0x3" arg1] $arg1 } {1 {}} @@ -1450,92 +1535,85 @@ test binary-38.8 {FormatNumber: word alignment} littleEndian { } \x01\xcd\xcc\xcc\x3f test binary-39.1 {ScanNumber: sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 c2 arg1] $arg1 } {1 {82 -93}} test binary-39.2 {ScanNumber: sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x02\x01\x81\x82\x01\x81\x82 s4 arg1] $arg1 } {1 {513 -32511 386 -32127}} test binary-39.3 {ScanNumber: sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x02\x01\x81\x82\x01\x81\x82 S4 arg1] $arg1 } {1 {258 385 -32255 -32382}} test binary-39.4 {ScanNumber: sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x01\x01\x02\x81\x01\x01\x01\x01\x82\x01\x01\x01\x01\x82\x01\x01\x01\x01\x81 i5 arg1] $arg1 } {1 {33620225 16843137 16876033 25297153 -2130640639}} test binary-39.5 {ScanNumber: sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x01\x01\x02\x81\x01\x01\x01\x01\x82\x01\x01\x01\x01\x82\x01\x01\x01\x01\x81 I5 arg1] $arg1 } {1 {16843010 -2130640639 25297153 16876033 16843137}} test binary-39.6 {ScanNumber: no sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 cu2 arg1] $arg1 } {1 {82 163}} test binary-39.7 {ScanNumber: no sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x02\x01\x81\x82\x01\x81\x82 su4 arg1] $arg1 } {1 {513 33025 386 33409}} test binary-39.8 {ScanNumber: no sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x02\x01\x81\x82\x01\x81\x82 Su4 arg1] $arg1 } {1 {258 385 33281 33154}} test binary-39.9 {ScanNumber: no sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x01\x01\x02\x81\x01\x01\x01\x01\x82\x01\x01\x01\x01\x82\x01\x01\x01\x01\x81 iu5 arg1] $arg1 } {1 {33620225 16843137 16876033 25297153 2164326657}} test binary-39.10 {ScanNumber: no sign extension} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x01\x01\x01\x02\x81\x01\x01\x01\x01\x82\x01\x01\x01\x01\x82\x01\x01\x01\x01\x81 Iu5 arg1] $arg1 } {1 {16843010 2164326657 25297153 16876033 16843137}} -test binary-40.3 {ScanNumber: NaN} \ - -body { - catch {unset arg1} - list [binary scan \xff\xff\xff\xff f1 arg1] $arg1 - } \ - -match glob \ - -result {1 -NaN*} - -test binary-40.4 {ScanNumber: NaN} \ - -body { - catch {unset arg1} - list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d arg1] $arg1 - } \ - -match glob \ - -result {1 -NaN*} +test binary-40.3 {ScanNumber: NaN} -body { + unset -nocomplain arg1 + list [binary scan \xff\xff\xff\xff f1 arg1] $arg1 +} -match glob -result {1 -NaN*} +test binary-40.4 {ScanNumber: NaN} -body { + unset -nocomplain arg1 + list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d arg1] $arg1 +} -match glob -result {1 -NaN*} test binary-41.1 {ScanNumber: word alignment} { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\x01\x00 c1s1 arg1 arg2] $arg1 $arg2 } {2 1 1} test binary-41.2 {ScanNumber: word alignment} { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\x00\x01 c1S1 arg1 arg2] $arg1 $arg2 } {2 1 1} test binary-41.3 {ScanNumber: word alignment} { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\x01\x00\x00\x00 c1i1 arg1 arg2] $arg1 $arg2 } {2 1 1} test binary-41.4 {ScanNumber: word alignment} { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\x00\x00\x00\x01 c1I1 arg1 arg2] $arg1 $arg2 } {2 1 1} test binary-41.5 {ScanNumber: word alignment} bigEndian { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\x3f\xcc\xcc\xcd c1f1 arg1 arg2] $arg1 $arg2 } {2 1 1.600000023841858} test binary-41.6 {ScanNumber: word alignment} littleEndian { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\xcd\xcc\xcc\x3f c1f1 arg1 arg2] $arg1 $arg2 } {2 1 1.600000023841858} test binary-41.7 {ScanNumber: word alignment} bigEndian { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\x3f\xf9\x99\x99\x99\x99\x99\x9a c1d1 arg1 arg2] $arg1 $arg2 } {2 1 1.6} test binary-41.8 {ScanNumber: word alignment} littleEndian { - catch {unset arg1; unset arg2} + unset -nocomplain arg1; unset arg2 list [binary scan \x01\x9a\x99\x99\x99\x99\x99\xf9\x3f c1d1 arg1 arg2] $arg1 $arg2 } {2 1 1.6} @@ -1568,23 +1646,23 @@ test binary-44.4 {Tcl_BinaryObjCmd: scan wide int with bit 31 set} {} { set x } 6442450944 test binary-43.5 {Tcl_BinaryObjCmd: scan wide int} {} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x80[string repeat \x00 7] W arg1] $arg1 } {1 -9223372036854775808} test binary-43.6 {Tcl_BinaryObjCmd: scan unsigned wide int} {} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x80[string repeat \x00 7] Wu arg1] $arg1 } {1 9223372036854775808} test binary-43.7 {Tcl_BinaryObjCmd: scan unsigned wide int} {} { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan [string repeat \x00 7]\x80 wu arg1] $arg1 } {1 9223372036854775808} test binary-43.8 {Tcl_BinaryObjCmd: scan unsigned wide int} {} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan \x80[string repeat \x00 7]\x80[string repeat \x00 7] WuW arg1 arg2] $arg1 $arg2 } {2 9223372036854775808 -9223372036854775808} test binary-43.9 {Tcl_BinaryObjCmd: scan unsigned wide int} {} { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 list [binary scan [string repeat \x00 7]\x80[string repeat \x00 7]\x80 wuw arg1 arg2] $arg1 $arg2 } {2 9223372036854775808 -9223372036854775808} @@ -1620,22 +1698,22 @@ test binary-46.5 {Tcl_BinaryObjCmd: handling of non-ISO8859-1 chars} { } "1 \u00a4 \u20ac" test binary-47.1 {Tcl_BinaryObjCmd: number cache reference count handling} { - # This test is only reliable when memory debugging is turned on, - # but without even memory debugging it should still generate the - # expected answers and might therefore still pick up memory corruption - # caused by [Bug 851747]. + # This test is only reliable when memory debugging is turned on, but + # without even memory debugging it should still generate the expected + # answers and might therefore still pick up memory corruption caused by + # [Bug 851747]. list [binary scan aba ccc x x x] $x } {3 97} ### TIP#129: endian specifiers ---- # format t -test binary-48.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format t} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-48.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format t blat} msg] $msg -} {1 {expected integer but got "blat"}} +test binary-48.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format t +} -result {not enough arguments for all format specifiers} +test binary-48.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format t blat +} -result {expected integer but got "blat"} test binary-48.3 {Tcl_BinaryObjCmd: format} { binary format S0 0x50 } {} @@ -1663,10 +1741,10 @@ test binary-48.10 {Tcl_BinaryObjCmd: format} bigEndian { test binary-48.11 {Tcl_BinaryObjCmd: format} littleEndian { binary format t2 {0x50 0x52} } P\x00R\x00 -test binary-48.12 {Tcl_BinaryObjCmd: format} bigEndian { +test binary-48.12 {Tcl_BinaryObjCmd: format} bigEndian { binary format t* {0x5051 0x52} } PQ\x00R -test binary-48.13 {Tcl_BinaryObjCmd: format} littleEndian { +test binary-48.13 {Tcl_BinaryObjCmd: format} littleEndian { binary format t* {0x5051 0x52} } QPR\x00 test binary-48.14 {Tcl_BinaryObjCmd: format} bigEndian { @@ -1675,13 +1753,13 @@ test binary-48.14 {Tcl_BinaryObjCmd: format} bigEndian { test binary-48.15 {Tcl_BinaryObjCmd: format} littleEndian { binary format t2 {0x50 0x52 0x53} 0x54 } P\x00R\x00 -test binary-48.16 {Tcl_BinaryObjCmd: format} { - list [catch {binary format t2 {0x50}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-48.17 {Tcl_BinaryObjCmd: format} { +test binary-48.16 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format t2 {0x50} +} -result {number of elements in list does not match count} +test binary-48.17 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {0x50 0x51} - list [catch {binary format t $a} msg] $msg -} [list 1 "expected integer but got \"0x50 0x51\""] + binary format t $a +} -result "expected integer but got \"0x50 0x51\"" test binary-48.18 {Tcl_BinaryObjCmd: format} bigEndian { set a {0x50 0x51} binary format t1 $a @@ -1692,12 +1770,12 @@ test binary-48.19 {Tcl_BinaryObjCmd: format} littleEndian { } P\x00 # format n -test binary-49.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format n} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-49.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format n blat} msg] $msg -} {1 {expected integer but got "blat"}} +test binary-49.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format n +} -result {not enough arguments for all format specifiers} +test binary-49.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format n blat +} -result {expected integer but got "blat"} test binary-49.3 {Tcl_BinaryObjCmd: format} { binary format n0 0x50 } {} @@ -1722,13 +1800,13 @@ test binary-49.9 {Tcl_BinaryObjCmd: format} littleEndian { test binary-49.10 {Tcl_BinaryObjCmd: format} littleEndian { binary format n* {0x50515253 0x52} } SRQPR\x00\x00\x00 -test binary-49.11 {Tcl_BinaryObjCmd: format} { - list [catch {binary format n2 {0x50}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-49.12 {Tcl_BinaryObjCmd: format} { +test binary-49.11 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format n2 {0x50} +} -result {number of elements in list does not match count} +test binary-49.12 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {0x50 0x51} - list [catch {binary format n $a} msg] $msg -} [list 1 "expected integer but got \"0x50 0x51\""] + binary format n $a +} -result "expected integer but got \"0x50 0x51\"" test binary-49.13 {Tcl_BinaryObjCmd: format} littleEndian { set a {0x50 0x51} binary format n1 $a @@ -1771,14 +1849,13 @@ test binary-50.4 {Tcl_BinaryObjCmd: scan wide int with bit 31 set} bigEndian { set x } 6442450944 - # format Q/q -test binary-51.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format Q} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-51.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format q blat} msg] $msg -} {1 {expected floating-point number but got "blat"}} +test binary-51.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format Q +} -result {not enough arguments for all format specifiers} +test binary-51.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format q blat +} -result {expected floating-point number but got "blat"} test binary-51.3 {Tcl_BinaryObjCmd: format} { binary format q0 1.6 } {} @@ -1806,13 +1883,13 @@ test binary-51.10 {Tcl_BinaryObjCmd: format} {} { test binary-51.11 {Tcl_BinaryObjCmd: format} {} { binary format q2 {1.6 3.4 5.6} } \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 -test binary-51.14 {Tcl_BinaryObjCmd: format} { - list [catch {binary format q2 {1.6}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-51.15 {Tcl_BinaryObjCmd: format} { +test binary-51.14 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format q2 {1.6} +} -result {number of elements in list does not match count} +test binary-51.15 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {1.6 3.4} - list [catch {binary format q $a} msg] $msg -} [list 1 "expected floating-point number but got \"1.6 3.4\""] + binary format q $a +} -result "expected floating-point number but got \"1.6 3.4\"" test binary-51.16 {Tcl_BinaryObjCmd: format} {} { set a {1.6 3.4} binary format Q1 $a @@ -1823,12 +1900,12 @@ test binary-51.17 {Tcl_BinaryObjCmd: format} {} { } \x9a\x99\x99\x99\x99\x99\xf9\x3f # format R/r -test binary-53.1 {Tcl_BinaryObjCmd: format} { - list [catch {binary format r} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-53.2 {Tcl_BinaryObjCmd: format} { - list [catch {binary format r blat} msg] $msg -} {1 {expected floating-point number but got "blat"}} +test binary-53.1 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format r +} -result {not enough arguments for all format specifiers} +test binary-53.2 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format r blat +} -result {expected floating-point number but got "blat"} test binary-53.3 {Tcl_BinaryObjCmd: format} { binary format f0 1.6 } {} @@ -1868,13 +1945,13 @@ test binary-53.14 {Tcl_BinaryObjCmd: float underflow} {} { test binary-53.15 {Tcl_BinaryObjCmd: float underflow} {} { binary format r -3.402825e-100 } \x00\x00\x00\x80 -test binary-53.16 {Tcl_BinaryObjCmd: format} { - list [catch {binary format r2 {1.6}} msg] $msg -} {1 {number of elements in list does not match count}} -test binary-53.17 {Tcl_BinaryObjCmd: format} { +test binary-53.16 {Tcl_BinaryObjCmd: format} -returnCodes error -body { + binary format r2 {1.6} +} -result {number of elements in list does not match count} +test binary-53.17 {Tcl_BinaryObjCmd: format} -returnCodes error -body { set a {1.6 3.4} - list [catch {binary format r $a} msg] $msg -} [list 1 "expected floating-point number but got \"1.6 3.4\""] + binary format r $a +} -result "expected floating-point number but got \"1.6 3.4\"" test binary-53.18 {Tcl_BinaryObjCmd: format} {} { set a {1.6 3.4} binary format R1 $a @@ -1885,346 +1962,352 @@ test binary-53.19 {Tcl_BinaryObjCmd: format} {} { } \xcd\xcc\xcc\x3f # scan t (s) -test binary-54.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc t} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-54.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc t +} -result {not enough arguments for all format specifiers} test binary-54.2 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 t* arg1] $arg1 } {1 {-23726 21587}} test binary-54.3 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 t arg1] $arg1 } {1 -23726} test binary-54.4 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 t1 arg1] $arg1 } {1 -23726} test binary-54.5 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3 t0 arg1] $arg1 } {1 {}} test binary-54.6 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 t2 arg1] $arg1 } {1 {-23726 21587}} test binary-54.7 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 t1 arg1] $arg1 } {0 foo} -test binary-54.8 {Tcl_BinaryObjCmd: scan} {} { - catch {unset arg1} +test binary-54.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 t1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x52\x53 t1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-54.9 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x05 t2c* arg1 arg2] $arg1 $arg2 } {2 {-23726 21587} 5} -test binary-54.10 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} +test binary-54.10 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x00\x80\x00\x80 tut arg1 arg2] $arg1 $arg2 } {2 32768 -32768} -test binary-54.11 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} +test binary-54.11 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x00\x80\x00\x80 ttu arg1 arg2] $arg1 $arg2 } {2 -32768 32768} # scan t (b) -test binary-55.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc t} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-55.2 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-55.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc t +} -result {not enough arguments for all format specifiers} +test binary-55.2 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 t* arg1] $arg1 } {1 {21155 21332}} -test binary-55.3 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-55.3 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 t arg1] $arg1 } {1 21155} -test binary-55.4 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-55.4 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3 t1 arg1] $arg1 } {1 21155} -test binary-55.5 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-55.5 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3 t0 arg1] $arg1 } {1 {}} -test binary-55.6 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-55.6 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 t2 arg1] $arg1 } {1 {21155 21332}} -test binary-55.7 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-55.7 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 t1 arg1] $arg1 } {0 foo} -test binary-55.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-55.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53 t1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-55.9 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} + binary scan \x52\x53 t1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-55.9 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x05 t2c* arg1 arg2] $arg1 $arg2 } {2 {21155 21332} 5} -test binary-55.10 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} +test binary-55.10 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x80\x00\x80\x00 tut arg1 arg2] $arg1 $arg2 } {2 32768 -32768} -test binary-55.11 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} +test binary-55.11 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x80\x00\x80\x00 ttu arg1 arg2] $arg1 $arg2 } {2 -32768 32768} # scan n (s) -test binary-56.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc n} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-56.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc n +} -result {not enough arguments for all format specifiers} test binary-56.2 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 n* arg1] $arg1 } {1 {1414767442 67305985}} -test binary-56.3 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} +test binary-56.3 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 n arg1] $arg1 } {1 1414767442} -test binary-56.4 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} +test binary-56.4 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 n1 arg1] $arg1 } {1 1414767442} -test binary-56.5 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} +test binary-56.5 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53 n0 arg1] $arg1 } {1 {}} -test binary-56.6 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} +test binary-56.6 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 n2 arg1] $arg1 } {1 {1414767442 67305985}} -test binary-56.7 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} +test binary-56.7 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 n1 arg1] $arg1 } {0 foo} -test binary-56.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-56.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53\x53\x54 n1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-56.9 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} + binary scan \x52\x53\x53\x54 n1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-56.9 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04\x05 n2c* arg1 arg2] $arg1 $arg2 } {2 {1414767442 67305985} 5} -test binary-56.10 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} +test binary-56.10 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x80\x00\x00\x00\x80\x00\x00\x00 nun arg1 arg2] $arg1 $arg2 } {2 128 128} -test binary-56.11 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} +test binary-56.11 {Tcl_BinaryObjCmd: scan} littleEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x00\x00\x00\x80\x00\x00\x00\x80 nun arg1 arg2] $arg1 $arg2 } {2 2147483648 -2147483648} # scan n (b) -test binary-57.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc n} msg] $msg -} {1 {not enough arguments for all format specifiers}} -test binary-57.2 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-57.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc n +} -result {not enough arguments for all format specifiers} +test binary-57.2 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 n* arg1] $arg1 } {1 {1386435412 16909060}} -test binary-57.3 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-57.3 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 n arg1] $arg1 } {1 1386435412} -test binary-57.4 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-57.4 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54 n1 arg1] $arg1 } {1 1386435412} -test binary-57.5 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-57.5 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53 n0 arg1] $arg1 } {1 {}} -test binary-57.6 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-57.6 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04 n2 arg1] $arg1 } {1 {1386435412 16909060}} -test binary-57.7 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} +test binary-57.7 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 n1 arg1] $arg1 } {0 foo} -test binary-57.8 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-57.8 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x52\x53\x53\x54 n1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} -test binary-57.9 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} + binary scan \x52\x53\x53\x54 n1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} +test binary-57.9 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x52\xa3\x53\x54\x01\x02\x03\x04\x05 n2c* arg1 arg2] $arg1 $arg2 } {2 {1386435412 16909060} 5} -test binary-57.10 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} +test binary-57.10 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x80\x00\x00\x00\x80\x00\x00\x00 nun arg1 arg2] $arg1 $arg2 } {2 2147483648 -2147483648} -test binary-57.11 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} +test binary-57.11 {Tcl_BinaryObjCmd: scan} bigEndian { + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x00\x00\x00\x80\x00\x00\x00\x80 nun arg1 arg2] $arg1 $arg2 } {2 128 128} # scan Q/q -test binary-58.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc q} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-58.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc q +} -result {not enough arguments for all format specifiers} test binary-58.2 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 Q* arg1] $arg1 } {1 {1.6 3.4}} test binary-58.3 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 q* arg1] $arg1 } {1 {1.6 3.4}} test binary-58.4 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 Q arg1] $arg1 } {1 1.6} test binary-58.5 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 q arg1] $arg1 } {1 1.6} test binary-58.6 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a Q1 arg1] $arg1 } {1 1.6} test binary-58.7 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f q1 arg1] $arg1 } {1 1.6} test binary-58.8 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a Q0 arg1] $arg1 } {1 {}} test binary-58.9 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f q0 arg1] $arg1 } {1 {}} test binary-58.10 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 Q2 arg1] $arg1 } {1 {1.6 3.4}} test binary-58.11 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 q2 arg1] $arg1 } {1 {1.6 3.4}} test binary-58.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 q1 arg1] $arg1 } {0 foo} -test binary-58.13 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-58.13 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a q1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a q1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-58.14 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33\x05 Q2c* arg1 arg2] $arg1 $arg2 } {2 {1.6 3.4} 5} test binary-58.15 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40\x05 q2c* arg1 arg2] $arg1 $arg2 } {2 {1.6 3.4} 5} # scan R/r -test binary-59.1 {Tcl_BinaryObjCmd: scan} { - list [catch {binary scan abc r} msg] $msg -} {1 {not enough arguments for all format specifiers}} +test binary-59.1 {Tcl_BinaryObjCmd: scan} -returnCodes error -body { + binary scan abc r +} -result {not enough arguments for all format specifiers} test binary-59.2 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a R* arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-59.3 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 r* arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-59.4 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a R arg1] $arg1 } {1 1.600000023841858} test binary-59.5 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 r arg1] $arg1 } {1 1.600000023841858} test binary-59.6 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd R1 arg1] $arg1 } {1 1.600000023841858} test binary-59.7 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f r1 arg1] $arg1 } {1 1.600000023841858} test binary-59.8 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd R0 arg1] $arg1 } {1 {}} test binary-59.9 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f r0 arg1] $arg1 } {1 {}} test binary-59.10 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a R2 arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-59.11 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1} + unset -nocomplain arg1 list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 r2 arg1] $arg1 } {1 {1.600000023841858 3.4000000953674316}} test binary-59.12 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} + unset -nocomplain arg1 set arg1 foo list [binary scan \x52 r1 arg1] $arg1 } {0 foo} -test binary-59.13 {Tcl_BinaryObjCmd: scan} { - catch {unset arg1} +test binary-59.13 {Tcl_BinaryObjCmd: scan} -setup { + unset -nocomplain arg1 +} -returnCodes error -body { set arg1 1 - list [catch {binary scan \x3f\xcc\xcc\xcd r1 arg1(a)} msg] $msg -} {1 {can't set "arg1(a)": variable isn't array}} + binary scan \x3f\xcc\xcc\xcd r1 arg1(a) +} -result {can't set "arg1(a)": variable isn't array} test binary-59.14 {Tcl_BinaryObjCmd: scan} bigEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a\x05 R2c* arg1 arg2] $arg1 $arg2 } {2 {1.600000023841858 3.4000000953674316} 5} test binary-59.15 {Tcl_BinaryObjCmd: scan} littleEndian { - catch {unset arg1 arg2} + unset -nocomplain arg1 arg2 set arg1 foo set arg2 bar list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40\x05 r2c* arg1 arg2] $arg1 $arg2 @@ -2245,7 +2328,7 @@ test binary-61.2 {Tcl_BinaryObjCmd: scan wide int} littleEndian { binary scan lcTolleH m x set x } 5216694956358656876 -test binary-61.3 {Tcl_BinaryObjCmd: scan wide int with bit 31 set} littleEndian { +test binary-61.3 {Tcl_BinaryObjCmd: scan wide int with bit 31 set} littleEndian { binary scan [binary format w [expr {wide(3) << 31}]] m x set x } 6442450944 @@ -2254,65 +2337,6 @@ test binary-61.4 {Tcl_BinaryObjCmd: scan wide int with bit 31 set} bigEndian { set x } 6442450944 -# Big test for correct ordering of data in [expr] - -proc testIEEE {} { - variable ieeeValues - binary scan [binary format dd -1.0 1.0] c* c - switch -exact -- $c { - {0 0 0 0 0 0 -16 -65 0 0 0 0 0 0 -16 63} { - # little endian - binary scan \x00\x00\x00\x00\x00\x00\xf0\xff d \ - ieeeValues(-Infinity) - binary scan \x00\x00\x00\x00\x00\x00\xf0\xbf d \ - ieeeValues(-Normal) - binary scan \x00\x00\x00\x00\x00\x00\x08\x80 d \ - ieeeValues(-Subnormal) - binary scan \x00\x00\x00\x00\x00\x00\x00\x80 d \ - ieeeValues(-0) - binary scan \x00\x00\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(+0) - binary scan \x00\x00\x00\x00\x00\x00\x08\x00 d \ - ieeeValues(+Subnormal) - binary scan \x00\x00\x00\x00\x00\x00\xf0\x3f d \ - ieeeValues(+Normal) - binary scan \x00\x00\x00\x00\x00\x00\xf0\x7f d \ - ieeeValues(+Infinity) - binary scan \x00\x00\x00\x00\x00\x00\xf8\x7f d \ - ieeeValues(NaN) - set ieeeValues(littleEndian) 1 - return 1 - } - {-65 -16 0 0 0 0 0 0 63 -16 0 0 0 0 0 0} { - binary scan \xff\xf0\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(-Infinity) - binary scan \xbf\xf0\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(-Normal) - binary scan \x80\x08\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(-Subnormal) - binary scan \x80\x00\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(-0) - binary scan \x00\x00\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(+0) - binary scan \x00\x08\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(+Subnormal) - binary scan \x3f\xf0\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(+Normal) - binary scan \x7f\xf0\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(+Infinity) - binary scan \x7f\xf8\x00\x00\x00\x00\x00\x00 d \ - ieeeValues(NaN) - set ieeeValues(littleEndian) 0 - return 1 - } - default { - return 0 - } - } -} - -testConstraint ieeeFloatingPoint [testIEEE] - # scan/format infinities test binary-62.1 {infinity} ieeeFloatingPoint { @@ -2358,20 +2382,15 @@ test binary-63.4 {NaN} ieeeFloatingPoint { binary scan [binary format q {NaN( 3123456789aBc)}] w w format 0x%016lx [expr {$w & 0xfff3ffffffffffff}] } 0x7ff3123456789abc -test binary-64.1 {NaN} \ - -constraints ieeeFloatingPoint \ - -body { - binary scan [binary format w 0x7ff8000000000000] q d - set d - } \ - -match glob -result NaN* -test binary-64.2 {NaN} \ - -constraints ieeeFloatingPoint \ - -body { - binary scan [binary format w 0x7ff0123456789aBc] q d - set d - } \ - -match glob -result NaN(*123456789abc) + +test binary-64.1 {NaN} -constraints ieeeFloatingPoint -body { + binary scan [binary format w 0x7ff8000000000000] q d + set d +} -match glob -result NaN* +test binary-64.2 {NaN} -constraints ieeeFloatingPoint -body { + binary scan [binary format w 0x7ff0123456789aBc] q d + set d +} -match glob -result NaN(*123456789abc) test binary-65.1 {largest significand} ieeeFloatingPoint { binary scan [binary format w 0x3fcfffffffffffff] q d diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 94f422a..73a8819 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.61 2008/09/08 10:49:04 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.62 2008/09/10 13:50:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -968,9 +968,8 @@ test cmdAH-20.2 {Tcl_FileObjCmd: atime} -setup { [expr {[file atime $gorpfile] == $stat(atime)}] } -result {1 1} test cmdAH-20.3 {Tcl_FileObjCmd: atime} { - string tolower [list [catch {file atime _bogus_} msg] \ - $msg $errorCode] -} {1 {could not read "_bogus_": no such file or directory} {posix enoent {no such file or directory}}} + list [catch {file atime _bogus_} msg] [string tolower $msg] $errorCode +} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} test cmdAH-20.4 {Tcl_FileObjCmd: atime} -returnCodes error -body { file atime $file notint } -result {expected integer but got "notint"} diff --git a/tests/cmdIL.test b/tests/cmdIL.test index cc1546e..ca9377a 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -1,14 +1,14 @@ -# This file contains a collection of tests for the procedures in the -# file tclCmdIL.c. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for the procedures in the file +# tclCmdIL.c. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdIL.test,v 1.39 2008/07/13 23:15:21 nijtmans Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.40 2008/09/10 13:50:05 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -17,22 +17,23 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Used for constraining memory leak tests testConstraint memory [llength [info commands memory]] +testConstraint testobj [llength [info commands testobj]] -test cmdIL-1.1 {Tcl_LsortObjCmd procedure} { - list [catch {lsort} msg] $msg -} {1 {wrong # args: should be "lsort ?-option value ...? list"}} -test cmdIL-1.2 {Tcl_LsortObjCmd procedure} { - list [catch {lsort -foo {1 3 2 5}} msg] $msg -} {1 {bad option "-foo": must be -ascii, -command, -decreasing, -dictionary, -increasing, -index, -indices, -integer, -nocase, -real, or -unique}} +test cmdIL-1.1 {Tcl_LsortObjCmd procedure} -returnCodes error -body { + lsort +} -result {wrong # args: should be "lsort ?-option value ...? list"} +test cmdIL-1.2 {Tcl_LsortObjCmd procedure} -returnCodes error -body { + lsort -foo {1 3 2 5} +} -result {bad option "-foo": must be -ascii, -command, -decreasing, -dictionary, -increasing, -index, -indices, -integer, -nocase, -real, or -unique} test cmdIL-1.3 {Tcl_LsortObjCmd procedure, default options} { lsort {d e c b a \{ d35 d300} } {a b c d d300 d35 e \{} test cmdIL-1.4 {Tcl_LsortObjCmd procedure, -ascii option} { lsort -integer -ascii {d e c b a d35 d300} } {a b c d d300 d35 e} -test cmdIL-1.5 {Tcl_LsortObjCmd procedure, -command option} { - list [catch {lsort -command {1 3 2 5}} msg] $msg -} {1 {"-command" option must be followed by comparison command}} +test cmdIL-1.5 {Tcl_LsortObjCmd procedure, -command option} -body { + lsort -command {1 3 2 5} +} -returnCodes error -result {"-command" option must be followed by comparison command} test cmdIL-1.6 {Tcl_LsortObjCmd procedure, -command option} -setup { proc cmp {a b} { expr {[string match x* $b] - [string match x* $a]} @@ -54,12 +55,12 @@ test cmdIL-1.9 {Tcl_LsortObjCmd procedure, -dictionary option} { test cmdIL-1.10 {Tcl_LsortObjCmd procedure, -increasing option} { lsort -decreasing -increasing {d e c b a d35 d300} } {a b c d d300 d35 e} -test cmdIL-1.11 {Tcl_LsortObjCmd procedure, -index option} { - list [catch {lsort -index {1 3 2 5}} msg] $msg -} {1 {"-index" option must be followed by list index}} -test cmdIL-1.12 {Tcl_LsortObjCmd procedure, -index option} { - list [catch {lsort -index foo {1 3 2 5}} msg] $msg -} {1 {bad index "foo": must be integer?[+-]integer? or end?[+-]integer?}} +test cmdIL-1.11 {Tcl_LsortObjCmd procedure, -index option} -body { + lsort -index {1 3 2 5} +} -returnCodes error -result {"-index" option must be followed by list index} +test cmdIL-1.12 {Tcl_LsortObjCmd procedure, -index option} -body { + lsort -index foo {1 3 2 5} +} -returnCodes error -result {bad index "foo": must be integer?[+-]integer? or end?[+-]integer?} test cmdIL-1.13 {Tcl_LsortObjCmd procedure, -index option} { lsort -index end -integer {{2 25} {10 20 50 100} {3 16 42} 1} } {1 {2 25} {3 16 42} {10 20 50 100}} @@ -69,15 +70,15 @@ test cmdIL-1.14 {Tcl_LsortObjCmd procedure, -index option} { test cmdIL-1.15 {Tcl_LsortObjCmd procedure, -integer option} { lsort -integer {24 6 300 18} } {6 18 24 300} -test cmdIL-1.16 {Tcl_LsortObjCmd procedure, -integer option} { - list [catch {lsort -integer {1 3 2.4}} msg] $msg -} {1 {expected integer but got "2.4"}} +test cmdIL-1.16 {Tcl_LsortObjCmd procedure, -integer option} -body { + lsort -integer {1 3 2.4} +} -returnCodes error -result {expected integer but got "2.4"} test cmdIL-1.17 {Tcl_LsortObjCmd procedure, -real option} { lsort -real {24.2 6e3 150e-1} } {150e-1 24.2 6e3} -test cmdIL-1.18 {Tcl_LsortObjCmd procedure, bogus list} { - list [catch {lsort "1 2 3 \{ 4"} msg] $msg -} {1 {unmatched open brace in list}} +test cmdIL-1.18 {Tcl_LsortObjCmd procedure, bogus list} -body { + lsort "1 2 3 \{ 4" +} -returnCodes error -result {unmatched open brace in list} test cmdIL-1.19 {Tcl_LsortObjCmd procedure, empty list} { lsort {} } {} @@ -93,22 +94,21 @@ test cmdIL-1.24 {Tcl_LsortObjCmd procedure, order of -index and -command} -setup proc testcmp {a b} {return [string compare $a $b]} } -body { set l [list [list a b] [list c d]] - list [catch {lsort -command testcmp -index 1 $l} msg] $msg + lsort -command testcmp -index 1 $l } -cleanup { rename testcmp "" -} -result [list 0 [list [list a b] [list c d]]] +} -result [list [list a b] [list c d]] test cmdIL-1.25 {Tcl_LsortObjCmd procedure, order of -index and -command} -setup { catch {rename 1 ""} proc testcmp {a b} {return [string compare $a $b]} } -body { set l [list [list a b] [list c d]] - list [catch {lsort -index 1 -command testcmp $l} msg] $msg + lsort -index 1 -command testcmp $l } -cleanup { rename testcmp "" -} -result [list 0 [list [list a b] [list c d]]] -# Note that the required order only exists in the end-1'th element; -# indexing using the end element or any fixed offset from the start -# will not work... +} -result [list [list a b] [list c d]] +# Note that the required order only exists in the end-1'th element; indexing +# using the end element or any fixed offset from the start will not work... test cmdIL-1.26 {Tcl_LsortObjCmd procedure, offset indexing from end} { lsort -index end-1 {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}} } {{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}} @@ -123,8 +123,8 @@ test cmdIL-1.29 {Tcl_LsortObjCmd procedure, loss of list rep during sorting} { string length [lsort -command {apply {args {string length $::l}}} $l] } 5 -# Can't think of any good tests for the MergeSort and MergeLists -# procedures, except a bunch of random lists to sort. +# Can't think of any good tests for the MergeSort and MergeLists procedures, +# except a bunch of random lists to sort. test cmdIL-2.1 {MergeSort and MergeLists procedures} -setup { set result {} @@ -154,34 +154,30 @@ test cmdIL-2.1 {MergeSort and MergeLists procedures} -setup { rename rand "" } -result {} -test cmdIL-3.1 {SortCompare procedure, skip comparisons after error} -setup { - proc cmp {a b} { - global x - incr x - error "error #$x" - } -} -body { - set x 0 - list [catch {lsort -integer -command cmp {48 6 28 190 16 2 3 6 1}} msg] \ - $msg $x -} -cleanup { - rename cmp "" +test cmdIL-3.1 {SortCompare procedure, skip comparisons after error} -body { + set ::x 0 + list [catch { + lsort -integer -command {apply {{a b} { + incr ::x + error "error #$::x" + }}} {48 6 28 190 16 2 3 6 1} + } msg] $msg $::x } -result {1 {error #1} 1} -test cmdIL-3.2 {SortCompare procedure, -index option} { - list [catch {lsort -integer -index 2 "\\\{ {30 40 50}"} msg] $msg -} {1 {unmatched open brace in list}} -test cmdIL-3.3 {SortCompare procedure, -index option} { - list [catch {lsort -integer -index 2 {{20 10} {15 30 40}}} msg] $msg -} {1 {element 2 missing from sublist "20 10"}} -test cmdIL-3.4 {SortCompare procedure, -index option} { - list [catch {lsort -integer -index 2 "{a b c} \\\{"} msg] $msg -} {1 {expected integer but got "c"}} -test cmdIL-3.4.1 {SortCompare procedure, -index option} { - list [catch {lsort -integer -index 2 "{1 2 3} \\\{"} msg] $msg -} {1 {unmatched open brace in list}} -test cmdIL-3.5 {SortCompare procedure, -index option} { - list [catch {lsort -integer -index 2 {{20 10 13} {15}}} msg] $msg -} {1 {element 2 missing from sublist "15"}} +test cmdIL-3.2 {SortCompare procedure, -index option} -body { + lsort -integer -index 2 "\\\{ {30 40 50}" +} -returnCodes error -result {unmatched open brace in list} +test cmdIL-3.3 {SortCompare procedure, -index option} -body { + lsort -integer -index 2 {{20 10} {15 30 40}} +} -returnCodes error -result {element 2 missing from sublist "20 10"} +test cmdIL-3.4 {SortCompare procedure, -index option} -body { + lsort -integer -index 2 "{a b c} \\\{" +} -returnCodes error -result {expected integer but got "c"} +test cmdIL-3.4.1 {SortCompare procedure, -index option} -body { + lsort -integer -index 2 "{1 2 3} \\\{" +} -returnCodes error -result {unmatched open brace in list} +test cmdIL-3.5 {SortCompare procedure, -index option} -body { + lsort -integer -index 2 {{20 10 13} {15}} +} -returnCodes error -result {element 2 missing from sublist "15"} test cmdIL-3.6 {SortCompare procedure, -index option} { lsort -integer -index 2 {{1 15 30} {2 5 25} {3 25 20}} } {{3 25 20} {2 5 25} {1 15 30}} @@ -191,21 +187,21 @@ test cmdIL-3.7 {SortCompare procedure, -ascii option} { test cmdIL-3.8 {SortCompare procedure, -dictionary option} { lsort -dictionary {d e c b a d35 d300 100 20} } {20 100 a b c d d35 d300 e} -test cmdIL-3.9 {SortCompare procedure, -integer option} { - list [catch {lsort -integer {x 3}} msg] $msg -} {1 {expected integer but got "x"}} -test cmdIL-3.10 {SortCompare procedure, -integer option} { - list [catch {lsort -integer {3 q}} msg] $msg -} {1 {expected integer but got "q"}} +test cmdIL-3.9 {SortCompare procedure, -integer option} -body { + lsort -integer {x 3} +} -returnCodes error -result {expected integer but got "x"} +test cmdIL-3.10 {SortCompare procedure, -integer option} -body { + lsort -integer {3 q} +} -returnCodes error -result {expected integer but got "q"} test cmdIL-3.11 {SortCompare procedure, -integer option} { lsort -integer {35 21 0x20 30 0o23 100 8} } {8 0o23 21 30 0x20 35 100} -test cmdIL-3.12 {SortCompare procedure, -real option} { - list [catch {lsort -real {6...4 3}} msg] $msg -} {1 {expected floating-point number but got "6...4"}} -test cmdIL-3.13 {SortCompare procedure, -real option} { - list [catch {lsort -real {3 1x7}} msg] $msg -} {1 {expected floating-point number but got "1x7"}} +test cmdIL-3.12 {SortCompare procedure, -real option} -body { + lsort -real {6...4 3} +} -returnCodes error -result {expected floating-point number but got "6...4"} +test cmdIL-3.13 {SortCompare procedure, -real option} -body { + lsort -real {3 1x7} +} -returnCodes error -result {expected floating-point number but got "1x7"} test cmdIL-3.14 {SortCompare procedure, -real option} { lsort -real {24 2.5e01 16.7 85e-1 10.004} } {85e-1 10.004 16.7 24 2.5e01} @@ -237,10 +233,10 @@ test cmdIL-3.17 {SortCompare procedure, -command option, non-integer result} -bo proc cmp {a b} { return foow } - list [catch {lsort -command cmp {48 6}} msg] $msg -} -cleanup { + lsort -command cmp {48 6} +} -returnCodes error -cleanup { rename cmp "" -} -result {1 {-compare command returned non-integer result}} +} -result {-compare command returned non-integer result} test cmdIL-3.18 {SortCompare procedure, -command option} -body { proc cmp {a b} { expr {$b - $a} @@ -440,108 +436,71 @@ test cmdIL-5.5 {lsort with list style index and sharing} -body { } # Compiled version -test cmdIL-6.1 {lassign command syntax} -body { - proc testLassign {} { - lassign - } - testLassign -} -returnCodes 1 -cleanup { - rename testLassign {} +test cmdIL-6.1 {lassign command syntax} -returnCodes error -body { + apply {{} { lassign }} } -result {wrong # args: should be "lassign list varName ?varName ...?"} -test cmdIL-6.2 {lassign command syntax} -body { - proc testLassign {} { - lassign x - } - testLassign -} -returnCodes 1 -cleanup { - rename testLassign {} +test cmdIL-6.2 {lassign command syntax} -returnCodes error -body { + apply {{} { lassign x }} } -result {wrong # args: should be "lassign list varName ?varName ...?"} test cmdIL-6.3 {lassign command} -body { - proc testLassign {} { + apply {{} { set x FAIL list [lassign a x] $x - } - testLassign -} -result {{} a} -cleanup { - rename testLassign {} -} + }} +} -result {{} a} test cmdIL-6.4 {lassign command} -body { - proc testLassign {} { + apply {{} { set x FAIL set y FAIL list [lassign a x y] $x $y - } - testLassign -} -result {{} a {}} -cleanup { - rename testLassign {} -} + }} +} -result {{} a {}} test cmdIL-6.5 {lassign command} -body { - proc testLassign {} { + apply {{} { set x FAIL set y FAIL list [lassign {a b} x y] $x $y - } - testLassign -} -result {{} a b} -cleanup { - rename testLassign {} -} + }} +} -result {{} a b} test cmdIL-6.6 {lassign command} -body { - proc testLassign {} { + apply {{} { set x FAIL set y FAIL list [lassign {a b c} x y] $x $y - } - testLassign -} -result {c a b} -cleanup { - rename testLassign {} -} + }} +} -result {c a b} test cmdIL-6.7 {lassign command} -body { - proc testLassign {} { + apply {{} { set x FAIL set y FAIL list [lassign {a b c d} x y] $x $y - } - testLassign -} -result {{c d} a b} -cleanup { - rename testLassign {} -} + }} +} -result {{c d} a b} test cmdIL-6.8 {lassign command - list format error} -body { - proc testLassign {} { + apply {{} { set x FAIL set y FAIL list [catch {lassign {a {b}c d} x y} msg] $msg $x $y - } - testLassign -} -result {1 {list element in braces followed by "c" instead of space} FAIL FAIL} -cleanup { - rename testLassign {} -} + }} +} -result {1 {list element in braces followed by "c" instead of space} FAIL FAIL} test cmdIL-6.9 {lassign command - assignment to arrays} -body { - proc testLassign {} { + apply {{} { list [lassign {a b} x(x)] $x(x) - } - testLassign -} -result {b a} -cleanup { - rename testLassign {} -} + }} +} -result {b a} test cmdIL-6.10 {lassign command - variable update error} -body { - proc testLassign {} { + apply {{} { set x(x) {} lassign a x - } - testLassign -} -returnCodes 1 -result {can't set "x": variable is array} -cleanup { - rename testLassign {} -} + }} +} -returnCodes error -result {can't set "x": variable is array} test cmdIL-6.11 {lassign command - variable update error} -body { - proc testLassign {} { + apply {{} { set x(x) {} set y FAIL list [catch {lassign a y x} msg] $msg $y - } - testLassign -} -result {1 {can't set "x": variable is array} a} -cleanup { - rename testLassign {} -} + }} +} -result {1 {can't set "x": variable is array} a} test cmdIL-6.12 {lassign command - memory leak testing} -setup { unset -nocomplain x y set x(x) {} @@ -570,119 +529,86 @@ test cmdIL-6.12 {lassign command - memory leak testing} -setup { rename stress {} } # Force non-compiled version -test cmdIL-6.13 {lassign command syntax} -body { - proc testLassign {} { +test cmdIL-6.13 {lassign command syntax} -returnCodes error -body { + apply {{} { set lassign lassign $lassign - } - testLassign -} -returnCodes 1 -cleanup { - rename testLassign {} + }} } -result {wrong # args: should be "lassign list varName ?varName ...?"} -test cmdIL-6.14 {lassign command syntax} -body { - proc testLassign {} { +test cmdIL-6.14 {lassign command syntax} -returnCodes error -body { + apply {{} { set lassign lassign $lassign x - } - testLassign -} -returnCodes 1 -cleanup { - rename testLassign {} + }} } -result {wrong # args: should be "lassign list varName ?varName ...?"} test cmdIL-6.15 {lassign command} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x FAIL list [$lassign a x] $x - } - testLassign -} -result {{} a} -cleanup { - rename testLassign {} -} + }} +} -result {{} a} test cmdIL-6.16 {lassign command} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x FAIL set y FAIL list [$lassign a x y] $x $y - } - testLassign -} -result {{} a {}} -cleanup { - rename testLassign {} -} + }} +} -result {{} a {}} test cmdIL-6.17 {lassign command} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x FAIL set y FAIL list [$lassign {a b} x y] $x $y - } - testLassign -} -result {{} a b} -cleanup { - rename testLassign {} -} + }} +} -result {{} a b} test cmdIL-6.18 {lassign command} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x FAIL set y FAIL list [$lassign {a b c} x y] $x $y - } - testLassign -} -result {c a b} -cleanup { - rename testLassign {} -} + }} +} -result {c a b} test cmdIL-6.19 {lassign command} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x FAIL set y FAIL list [$lassign {a b c d} x y] $x $y - } - testLassign -} -result {{c d} a b} -cleanup { - rename testLassign {} -} + }} +} -result {{c d} a b} test cmdIL-6.20 {lassign command - list format error} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x FAIL set y FAIL list [catch {$lassign {a {b}c d} x y} msg] $msg $x $y - } - testLassign -} -result {1 {list element in braces followed by "c" instead of space} FAIL FAIL} -cleanup { - rename testLassign {} -} + }} +} -result {1 {list element in braces followed by "c" instead of space} FAIL FAIL} test cmdIL-6.21 {lassign command - assignment to arrays} -body { - proc testLassign {} { + apply {{} { set lassign lassign list [$lassign {a b} x(x)] $x(x) - } - testLassign -} -result {b a} -cleanup { - rename testLassign {} -} + }} +} -result {b a} test cmdIL-6.22 {lassign command - variable update error} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x(x) {} $lassign a x - } - testLassign -} -returnCodes 1 -result {can't set "x": variable is array} -cleanup { - rename testLassign {} -} + }} +} -returnCodes 1 -result {can't set "x": variable is array} test cmdIL-6.23 {lassign command - variable update error} -body { - proc testLassign {} { + apply {{} { set lassign lassign set x(x) {} set y FAIL list [catch {$lassign a y x} msg] $msg $y - } - testLassign -} -result {1 {can't set "x": variable is array} a} -cleanup { - rename testLassign {} -} + }} +} -result {1 {can't set "x": variable is array} a} test cmdIL-6.24 {lassign command - memory leak testing} -setup { set x(x) {} set y FAIL @@ -712,24 +638,18 @@ test cmdIL-6.24 {lassign command - memory leak testing} -setup { } # Assorted shimmering problems test cmdIL-6.25 {lassign command - shimmering protection} -body { - proc testLassign {} { + apply {{} { set x {a b c} list [lassign $x $x y] $x [set $x] $y - } - testLassign -} -result {c {a b c} a b} -cleanup { - rename testLassign {} -} + }} +} -result {c {a b c} a b} test cmdIL-6.26 {lassign command - shimmering protection} -body { - proc testLassign {} { + apply {{} { set x {a b c} set lassign lassign list [$lassign $x $x y] $x [set $x] $y - } - testLassign -} -result {c {a b c} a b} -cleanup { - rename testLassign {} -} + }} +} -result {c {a b c} a b} test cmdIL-7.1 {lreverse command} -body { lreverse @@ -753,8 +673,6 @@ test cmdIL-7.6 {lreverse command - unshared object [Bug 1672585]} { test cmdIL-7.7 {lreverse command - empty object [Bug 1876793]} { lreverse [list] } {} - -testConstraint testobj [llength [info commands testobj]] test cmdIL-7.8 {lreverse command - shared intrep [Bug 1675044]} -setup { teststringobj set 1 {1 2 3} testobj convert 1 list diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 85b7bde..ae96301 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -1,17 +1,17 @@ # The tests in this file cover the procedures in tclCmdMZ.c. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdMZ.test,v 1.25 2006/10/09 19:15:44 msofer Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.26 2008/09/10 13:50:05 dkf Exp $ if {[catch {package require tcltest 2.1}]} { puts stderr "Skipping tests in [info script]. tcltest 2.1 required." @@ -26,49 +26,64 @@ namespace eval ::tcl::test::cmdMZ { namespace import ::tcltest::temporaryDirectory namespace import ::tcltest::test + proc ListGlobMatch {expected actual} { + if {[llength $expected] != [llength $actual]} { + return 0 + } + foreach e $expected a $actual { + if {![string match $e $a]} { + return 0 + } + } + return 1 + } + customMatch listGlob [namespace which ListGlobMatch] + # Tcl_PwdObjCmd -test cmdMZ-1.1 {Tcl_PwdObjCmd} { - list [catch {pwd a} msg] $msg -} {1 {wrong # args: should be "pwd"}} +test cmdMZ-1.1 {Tcl_PwdObjCmd} -returnCodes error -body { + pwd a +} -result {wrong # args: should be "pwd"} test cmdMZ-1.2 {Tcl_PwdObjCmd: simple pwd} { catch pwd } 0 -test cmdMZ-1.3 {Tcl_PwdObjCmd: simple pwd} { - expr [string length pwd]>0 -} 1 -test cmdMZ-1.4 {Tcl_PwdObjCmd: failure} {unix nonPortable} { - # This test fails on various unix platforms (eg Linux) where - # permissions caching causes this to fail. The caching is strictly - # incorrect, but we have no control over that. +test cmdMZ-1.3 {Tcl_PwdObjCmd: simple pwd} -body { + pwd +} -match glob -result {?*} +test cmdMZ-1.4 {Tcl_PwdObjCmd: failure} -setup { + set cwd [pwd] set foodir [file join [temporaryDirectory] foo] file delete -force $foodir file mkdir $foodir - set cwd [pwd] cd $foodir +} -constraints {unix nonPortable} -body { + # This test fails on various unix platforms (eg Linux) where permissions + # caching causes this to fail. The caching is strictly incorrect, but we + # have no control over that. file attr . -permissions 000 - set result [list [catch {pwd} msg] $msg] + pwd +} -returnCodes error -cleanup { cd $cwd file delete -force $foodir - set result -} {1 {error getting working directory name: permission denied}} +} -result {error getting working directory name: permission denied} # The tests for Tcl_RegexpObjCmd, Tcl_RegsubObjCmd are in regexp.test # Tcl_RenameObjCmd -test cmdMZ-2.1 {Tcl_RenameObjCmd: error conditions} { - list [catch {rename r1} msg] $msg $::errorCode -} {1 {wrong # args: should be "rename oldName newName"} NONE} -test cmdMZ-2.2 {Tcl_RenameObjCmd: error conditions} { - list [catch {rename r1 r2 r3} msg] $msg $::errorCode -} {1 {wrong # args: should be "rename oldName newName"} NONE} -test cmdMZ-2.3 {Tcl_RenameObjCmd: success} { +test cmdMZ-2.1 {Tcl_RenameObjCmd: error conditions} -returnCodes error -body { + rename r1 +} -result {wrong # args: should be "rename oldName newName"} +test cmdMZ-2.2 {Tcl_RenameObjCmd: error conditions} -returnCodes error -body { + rename r1 r2 r3 +} -result {wrong # args: should be "rename oldName newName"} +test cmdMZ-2.3 {Tcl_RenameObjCmd: success} -setup { catch {rename r2 {}} +} -body { proc r1 {} {return "r1"} rename r1 r2 r2 -} {r1} +} -result {r1} test cmdMZ-2.4 {Tcl_RenameObjCmd: success} { proc r1 {} {return "r1"} rename r1 {} @@ -88,17 +103,18 @@ test cmdMZ-return-1.2 {return checks for bad option values} -body { } -returnCodes error -match glob -result {bad completion code*} test cmdMZ-return-1.3 {return checks for bad option values} -body { return -level foo -} -returnCodes error -match glob -result {bad -level value:*} +} -returnCodes error -match glob -result {bad -level value: *} test cmdMZ-return-1.4 {return checks for bad option values} -body { return -level -1 -} -returnCodes error -match glob -result {bad -level value:*} +} -returnCodes error -match glob -result {bad -level value: *} test cmdMZ-return-1.5 {return checks for bad option values} -body { return -level 3.1415926 -} -returnCodes error -match glob -result {bad -level value:*} +} -returnCodes error -match glob -result {bad -level value: *} proc dictSort {d} { + set result {} foreach k [lsort [dict keys $d]] { - lappend result $k [dict get $d $k] + dict set result $k [dict get $d $k] } return $result } @@ -150,67 +166,61 @@ test cmdMZ-return-2.13 {return option handling} -body { test cmdMZ-return-2.14 {return option handling} -body { return -level 0 -code error -options {-code foo -options {-code break}} } -returnCodes break -result {} - test cmdMZ-return-2.15 {return opton handling} -setup { - proc p {} { - return -code error -errorcode {a b} c - } - } -body { - list [catch p result] $result $::errorCode - } -cleanup { - rename p {} - } -result {1 c {a b}} - + proc p {} { + return -code error -errorcode {a b} c + } +} -body { + list [catch p result] $result $::errorCode +} -cleanup { + rename p {} +} -result {1 c {a b}} test cmdMZ-return-2.16 {return opton handling} -setup { - proc p {} { - return -code error -errorcode [list a b] c - } - } -body { - list [catch p result] $result $::errorCode - } -cleanup { - rename p {} - } -result {1 c {a b}} - + proc p {} { + return -code error -errorcode [list a b] c + } +} -body { + list [catch p result] $result $::errorCode +} -cleanup { + rename p {} +} -result {1 c {a b}} test cmdMZ-return-2.17 {return opton handling} -setup { - proc p {} { - return -code error -errorcode a\ b c - } - } -body { - list [catch p result] $result $::errorCode - } -cleanup { - rename p {} - } -result {1 c {a b}} - + proc p {} { + return -code error -errorcode a\ b c + } +} -body { + list [catch p result] $result $::errorCode +} -cleanup { + rename p {} +} -result {1 c {a b}} # Check that the result of a [return -options $opts $result] is -# indistinguishable from that of the originally caught script, no -# matter what the script is/does. (TIP 90) -set i 0 -foreach script { - {} - {format x} - {set} - {set a 1} - {error} - {error foo} - {error foo bar} - {error foo bar baz} - {return -level 0} - {return -code error} - {return -code error -errorinfo foo} - {return -code error -errorinfo foo -errorcode bar} - {return -code error -errorinfo foo -errorcode bar -errorline 10} - {return -options {x y z 2}} - {return -level 3 -code break sdf} +# indistinguishable from that of the originally caught script, no matter what +# the script is/does. (TIP 90) +foreach {testid script} { + cmdMZ-return-3.0 {} + cmdMZ-return-3.1 {format x} + cmdMZ-return-3.2 {set} + cmdMZ-return-3.3 {set a 1} + cmdMZ-return-3.4 {error} + cmdMZ-return-3.5 {error foo} + cmdMZ-return-3.6 {error foo bar} + cmdMZ-return-3.7 {error foo bar baz} + cmdMZ-return-3.8 {return -level 0} + cmdMZ-return-3.9 {return -code error} + cmdMZ-return-3.10 {return -code error -errorinfo foo} + cmdMZ-return-3.11 {return -code error -errorinfo foo -errorcode bar} + cmdMZ-return-3.12 {return -code error -errorinfo foo -errorcode bar -errorline 10} + cmdMZ-return-3.13 {return -options {x y z 2}} + cmdMZ-return-3.14 {return -level 3 -code break sdf} } { - test cmdMZ-return-3.$i "check that return after a catch is same:\n$script" { + test $testid "check that return after a catch is same:\n$script" { set one [list [catch $script foo bar] $foo [dictSort $bar] \ $::errorCode $::errorInfo] set two [list [catch {return -options $bar $foo} foo2 bar2] \ $foo2 [dictSort $bar2] $::errorCode $::errorInfo] string equal $one $two } 1 - incr i } # The tests for Tcl_ScanObjCmd are in scan.test @@ -220,58 +230,44 @@ foreach script { test cmdMZ-3.3 {Tcl_SourceObjCmd: error conditions} -constraints { unixOrPc -} -body { - list [catch {source} msg] $msg -} -match glob -result {1 {wrong # args: should be "source*fileName"}} +} -returnCodes error -body { + source +} -match glob -result {wrong # args: should be "source*fileName"} test cmdMZ-3.4 {Tcl_SourceObjCmd: error conditions} -constraints { unixOrPc -} -body { - list [catch {source a b} msg] $msg -} -match glob -result {1 {wrong # args: should be "source*fileName"}} - -proc ListGlobMatch {expected actual} { - if {[llength $expected] != [llength $actual]} { - return 0 - } - foreach e $expected a $actual { - if {![string match $e $a]} { - return 0 - } - } - return 1 -} -customMatch listGlob [namespace which ListGlobMatch] - +} -returnCodes error -body { + source a b +} -match glob -result {wrong # args: should be "source*fileName"} test cmdMZ-3.5 {Tcl_SourceObjCmd: error in script} -body { set file [makeFile { set x 146 error "error in sourced file" set y $x } source.file] - set result [list [catch {source $file} msg] $msg $::errorInfo] + list [catch {source $file} msg] $msg $::errorInfo +} -cleanup { removeFile source.file - set result } -match listGlob -result {1 {error in sourced file} {error in sourced file while executing "error "error in sourced file"" (file "*" line 3) invoked from within "source $file"}} -test cmdMZ-3.6 {Tcl_SourceObjCmd: simple script} { - set file [makeFile {list result} source.file] - set result [source $file] +test cmdMZ-3.6 {Tcl_SourceObjCmd: simple script} -body { + set file [makeFile {list ok} source.file] + source $file +} -cleanup { removeFile source.file - set result -} result +} -result ok # Tcl_SplitObjCmd -test cmdMZ-4.1 {Tcl_SplitObjCmd: split errors} { - list [catch split msg] $msg $::errorCode -} {1 {wrong # args: should be "split string ?splitChars?"} NONE} -test cmdMZ-4.2 {Tcl_SplitObjCmd: split errors} { - list [catch {split a b c} msg] $msg $::errorCode -} {1 {wrong # args: should be "split string ?splitChars?"} NONE} +test cmdMZ-4.1 {Tcl_SplitObjCmd: split errors} -returnCodes error -body { + split +} -result {wrong # args: should be "split string ?splitChars?"} +test cmdMZ-4.2 {Tcl_SplitObjCmd: split errors} -returnCodes error -body { + split a b c +} -result {wrong # args: should be "split string ?splitChars?"} test cmdMZ-4.3 {Tcl_SplitObjCmd: basic split commands} { split "a\n b\t\r c\n " } {a {} b {} {} c {} {}} @@ -294,23 +290,22 @@ test cmdMZ-4.9 {Tcl_SplitObjCmd: basic split commands} { split { } } {{} {} {} {}} test cmdMZ-4.10 {Tcl_SplitObjCmd: basic split commands} { - proc foo {} { + apply {{} { set x {} foreach f [split {]\n} {}] { append x $f } - return $x - } - foo + return $x + }} } {]\n} test cmdMZ-4.11 {Tcl_SplitObjCmd: basic split commands} { - proc foo {} { + apply {{} { set x ab\000c set y [split $x {}] - return $y - } - foo -} "a b \000 c" + binary scan $y c* z + return $z + }} +} {97 32 98 32 0 32 99} test cmdMZ-4.12 {Tcl_SplitObjCmd: basic split commands} { split "a0ab1b2bbb3\000c4" ab\000c } {{} 0 {} 1 2 {} {} 3 {} 4} @@ -323,21 +318,21 @@ test cmdMZ-4.13 {Tcl_SplitObjCmd: basic split commands} { # The tests for Tcl_SubstObjCmd are in subst.test # The tests for Tcl_SwitchObjCmd are in switch.test -test cmdMZ-5.1 {Tcl_TimeObjCmd: basic format of command} { - list [catch {time} msg] $msg -} {1 {wrong # args: should be "time command ?count?"}} -test cmdMZ-5.2 {Tcl_TimeObjCmd: basic format of command} { - list [catch {time a b c} msg] $msg -} {1 {wrong # args: should be "time command ?count?"}} -test cmdMZ-5.3 {Tcl_TimeObjCmd: basic format of command} { - list [catch {time a b} msg] $msg -} {1 {expected integer but got "b"}} +test cmdMZ-5.1 {Tcl_TimeObjCmd: basic format of command} -body { + time +} -returnCodes error -result {wrong # args: should be "time command ?count?"} +test cmdMZ-5.2 {Tcl_TimeObjCmd: basic format of command} -body { + time a b c +} -returnCodes error -result {wrong # args: should be "time command ?count?"} +test cmdMZ-5.3 {Tcl_TimeObjCmd: basic format of command} -body { + time a b +} -returnCodes error -result {expected integer but got "b"} test cmdMZ-5.4 {Tcl_TimeObjCmd: nothing happens with negative iteration counts} { time bogusCmd -12456 } {0 microseconds per iteration} -test cmdMZ-5.5 {Tcl_TimeObjCmd: result format} { - regexp {^\d+ microseconds per iteration} [time {format 1}] -} 1 +test cmdMZ-5.5 {Tcl_TimeObjCmd: result format} -body { + time {format 1} +} -match regexp -result {^\d+ microseconds per iteration} test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} { expr {[lindex [time {after 2}] 0] < [lindex [time {after 1000}] 0]} } 1 @@ -356,3 +351,7 @@ cleanupTests } namespace delete ::tcl::test::cmdMZ return + +# Local Variables: +# mode: tcl +# End: diff --git a/tests/compile.test b/tests/compile.test index fe2deea..7d282ae 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compile.test,v 1.48 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: compile.test,v 1.49 2008/09/10 13:50:05 dkf Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -601,6 +601,91 @@ test compile-17.2 {Command interpretation binding for non-compiled code} -setup interp delete $i } -result substituted +# This tests the supported parts of the unsupported [disassemble] command. It +# does not check the format of disassembled bytecode though; that's liable to +# change without warning. + +test compile-18.1 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble +} -match glob -result {wrong # args: should be "*"} +test compile-18.2 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble ? +} -match glob -result {bad type "?": must be *} +test compile-18.3 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble lambda +} -match glob -result {wrong # args: should be "* lambda lambdaTerm"} +test compile-18.4 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble lambda \{ +} -result "can't interpret \"\{\" as a lambda expression" +test compile-18.5 {disassembler - basics} -body { + # Allow any string: the result format is not defined anywhere! + tcl::unsupported::disassemble lambda {{} {}} +} -match glob -result * +test compile-18.6 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble proc +} -match glob -result {wrong # args: should be "* proc procName"} +test compile-18.7 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble proc nosuchproc +} -result {"nosuchproc" isn't a procedure} +test compile-18.8 {disassembler - basics} -setup { + proc chewonthis {} {} +} -body { + # Allow any string: the result format is not defined anywhere! + tcl::unsupported::disassemble proc chewonthis +} -cleanup { + rename chewonthis {} +} -match glob -result * +test compile-18.9 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble script +} -match glob -result {wrong # args: should be "* script script"} +test compile-18.10 {disassembler - basics} -body { + # Allow any string: the result format is not defined anywhere! + tcl::unsupported::disassemble script {} +} -match glob -result * +test compile-18.11 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble method +} -match glob -result {wrong # args: should be "* method className methodName"} +test compile-18.12 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble method nosuchclass foo +} -result {nosuchclass does not refer to an object} +test compile-18.13 {disassembler - basics} -returnCodes error -setup { + oo::object create justanobject +} -body { + tcl::unsupported::disassemble method justanobject foo +} -cleanup { + justanobject destroy +} -result {"justanobject" is not a class} +test compile-18.14 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble method oo::object nosuchmethod +} -result {unknown method "nosuchmethod"} +test compile-18.15 {disassembler - basics} -setup { + oo::class create foo {method bar {} {}} +} -body { + # Allow any string: the result format is not defined anywhere! + tcl::unsupported::disassemble method foo bar +} -cleanup { + foo destroy +} -match glob -result * +test compile-18.16 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble objmethod +} -match glob -result {wrong # args: should be "* objmethod objectName methodName"} +test compile-18.17 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble objmethod nosuchobject foo +} -result {nosuchobject does not refer to an object} +test compile-18.18 {disassembler - basics} -returnCodes error -body { + tcl::unsupported::disassemble objmethod oo::object nosuchmethod +} -result {unknown method "nosuchmethod"} +test compile-18.19 {disassembler - basics} -setup { + oo::object create foo + oo::objdefine foo {method bar {} {}} +} -body { + # Allow any string: the result format is not defined anywhere! + tcl::unsupported::disassemble objmethod foo bar +} -cleanup { + foo destroy +} -match glob -result * +# TODO sometime - check that bytecode from tbcload is *not* disassembled. + # cleanup catch {rename p ""} catch {namespace delete test_ns_compile} diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 2acdbd2..9937618 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -1,13 +1,13 @@ # This file tests the filesystem and vfs internals. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 2002 Vincent Darley. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. package require tcltest 2 namespace eval ::tcl::test::fileSystem { @@ -88,6 +88,8 @@ testConstraint hasLinks [expr {![catch { if {[testConstraint testsetplatform]} { set platform [testgetplatform] } + +# ---------------------------------------------------------------------- test filesystem-1.0 {link normalisation} {hasLinks} { string equal [file normalize gorp.file] [file normalize link.file] @@ -112,16 +114,16 @@ test filesystem-1.5 {link normalisation} {hasLinks} { [file normalize [file join dir.dir linkinside.file]] } {1} test filesystem-1.6 {link normalisation} {hasLinks} { - string equal [file normalize [file join dir.dir linkinside.file]] \ - [file normalize [file join dir.link inside.file]] + string equal [file normalize [file join dir.dir linkinside.file]] \ + [file normalize [file join dir.link inside.file]] } {0} test filesystem-1.7 {link normalisation} {hasLinks unix} { testPathEqual [file normalize [file join dir.link linkinside.file foo]] \ [file normalize [file join dir.dir inside.file foo]] } {1} test filesystem-1.8 {link normalisation} {hasLinks} { - string equal [file normalize [file join dir.dir linkinside.filefoo]] \ - [file normalize [file join dir.link inside.filefoo]] + string equal [file normalize [file join dir.dir linkinside.filefoo]] \ + [file normalize [file join dir.link inside.filefoo]] } {0} test filesystem-1.9 {link normalisation} {unix hasLinks} { file delete -force dir.link @@ -203,12 +205,8 @@ test filesystem-1.26 {link normalisation: link and ..} {hasLinks} { file link dir2.link [file join dir2 foo bar] set res [list [file normalize [file join dir2 foo x]] \ [file normalize [file join dir2.link .. x]]] - if {![string equal [lindex $res 0] [lindex $res 1]]} { - set res "$res not equal" - } else { - set res "ok" - } -} {ok} + testPathEqual [lindex $res 0] [lindex $res 1] +} 1 test filesystem-1.27 {file normalisation: up and down with ..} { set dir [file join dir2 foo bar] file mkdir $dir @@ -229,12 +227,8 @@ test filesystem-1.28 {link normalisation: link with .. and ..} {hasLinks} { file link dir2.link $to set res [list [file normalize [file join dir2 foo x]] \ [file normalize [file join dir2.link .. x]]] - if {![string equal [lindex $res 0] [lindex $res 1]]} { - set res "$res not equal" - } else { - set res "ok" - } -} {ok} + testPathEqual [lindex $res 0] [lindex $res 1] +} 1 test filesystem-1.29 {link normalisation: link with ..} {hasLinks} { file delete -force dir2.link set dir [file join dir2 foo bar] @@ -242,11 +236,10 @@ test filesystem-1.29 {link normalisation: link with ..} {hasLinks} { set to [file join dir2 .. dir2 foo .. foo bar] file link dir2.link $to set res [file normalize [file join dir2.link x yyy z]] - if {[string first ".." $res] != -1} { - set res "$res must not contain '..'" - } else { - set res "ok" + if {[string match *..* $res]} { + return "$res must not contain '..'" } + return "ok" } {ok} test filesystem-1.29.1 {link normalisation with two consecutive links} {hasLinks} { testPathEqual [file normalize [file join dir.link dirinside.link abc]] \ @@ -260,9 +253,9 @@ file delete -force [file join dir.dir dirinside.link] removeFile [file join dir.dir inside.file] removeDirectory [file join dir.dir dirinside.dir] removeDirectory dir.dir -test filesystem-1.30 {normalisation of nonexistent user} { - list [catch {file normalize ~noonewiththisname} err] $err -} {1 {user "noonewiththisname" doesn't exist}} +test filesystem-1.30 {normalisation of nonexistent user} -body { + file normalize ~noonewiththisname +} -returnCodes error -result {user "noonewiththisname" doesn't exist} test filesystem-1.31 {link normalisation: link near filesystem root} {testsetplatform} { testsetplatform unix file normalize /foo/../bar @@ -275,8 +268,8 @@ test filesystem-1.33 {link normalisation: link near filesystem root} {testsetpla testsetplatform windows set res [file normalize C:/../bar] if {[testConstraint unix]} { - # Some unices go further in normalizing this -- not really - # a problem since this is a Windows test + # Some unices go further in normalizing this -- not really a problem + # since this is a Windows test. regexp {C:/bar$} $res res } set res @@ -346,7 +339,6 @@ test filesystem-1.39 {file normalisation with volume relative} {win} { test filesystem-1.40 {file normalisation with repeated separators} { set a [file norm foo////bar] set b [file norm foo/bar] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -356,7 +348,6 @@ test filesystem-1.40 {file normalisation with repeated separators} { test filesystem-1.41 {file normalisation with repeated separators} {win} { set a [file norm foo\\\\\\bar] set b [file norm foo/bar] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -366,7 +357,6 @@ test filesystem-1.41 {file normalisation with repeated separators} {win} { test filesystem-1.42 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /xxx/..] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -376,7 +366,6 @@ test filesystem-1.42 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.42.1 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /xxx/../] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -386,7 +375,6 @@ test filesystem-1.42.1 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.43 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /xxx/foo/../..] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -396,7 +384,6 @@ test filesystem-1.43 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.43.1 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /xxx/foo/../../] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -406,7 +393,6 @@ test filesystem-1.43.1 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.44 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /xxx/foo/../../bar] set b [file norm /bar] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -416,7 +402,6 @@ test filesystem-1.44 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.45 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /xxx/../../bar] set b [file norm /bar] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -426,7 +411,6 @@ test filesystem-1.45 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.46 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /xxx/../bar] set b [file norm /bar] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -436,7 +420,6 @@ test filesystem-1.46 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.47 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /..] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -446,7 +429,6 @@ test filesystem-1.47 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.48 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /../] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -456,7 +438,6 @@ test filesystem-1.48 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.49 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /.] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -466,7 +447,6 @@ test filesystem-1.49 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.50 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /./] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -476,7 +456,6 @@ test filesystem-1.50 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.51 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /../..] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -486,7 +465,6 @@ test filesystem-1.51 {file normalisation .. beyond root (Bug 1379287)} { test filesystem-1.51.1 {file normalisation .. beyond root (Bug 1379287)} { set a [file norm /../../] set b [file norm /] - if {![string equal $a $b]} { set res "Paths should be equal: $a , $b" } else { @@ -507,15 +485,12 @@ if {[testConstraint testfilesystem]} { while {![catch {testfilesystem 0}]} {} } -test filesystem-3.0 {Tcl_FSRegister} testfilesystem { - testfilesystem 1 -} {registered} -test filesystem-3.1 {Tcl_FSUnregister} testfilesystem { - testfilesystem 0 -} {unregistered} -test filesystem-3.2 {Tcl_FSUnregister} testfilesystem { - list [catch {testfilesystem 0} err] $err -} {1 failed} +test filesystem-3.1 {Tcl_FSRegister & Tcl_FSUnregister} testfilesystem { + set result {} + lappend result [testfilesystem 1] + lappend result [testfilesystem 0] + lappend result [catch {testfilesystem 0} msg] $msg +} {registered unregistered 1 failed} test filesystem-3.3 {Tcl_FSRegister} testfilesystem { testfilesystem 1 testfilesystem 1 @@ -531,274 +506,212 @@ test filesystem-3.5 {Tcl_FSUnregister} testfilesystem { lindex [file system bar] 0 } {native} -test filesystem-4.0 {testfilesystem} { - -constraints testfilesystem - -match glob - -body { - testfilesystem 1 - set filesystemReport {} - file exists foo - testfilesystem 0 - set filesystemReport - } - -result {*{access foo}} -} -test filesystem-4.1 {testfilesystem} { - -constraints testfilesystem - -match glob - -body { - testfilesystem 1 - set filesystemReport {} - catch {file stat foo bar} - testfilesystem 0 - set filesystemReport - } - -result {*{stat foo}} -} -test filesystem-4.2 {testfilesystem} { - -constraints testfilesystem - -match glob - -body { - testfilesystem 1 - set filesystemReport {} - catch {file lstat foo bar} - testfilesystem 0 - set filesystemReport - } - -result {*{lstat foo}} -} -test filesystem-4.3 {testfilesystem} { - -constraints testfilesystem - -match glob - -body { - testfilesystem 1 - set filesystemReport {} - catch {glob *} - testfilesystem 0 - set filesystemReport - } - -result {*{matchindirectory *}*} -} +test filesystem-4.0 {testfilesystem} -constraints testfilesystem -body { + testfilesystem 1 + set filesystemReport {} + file exists foo + testfilesystem 0 + set filesystemReport +} -match glob -result {*{access foo}} +test filesystem-4.1 {testfilesystem} -constraints testfilesystem -body { + testfilesystem 1 + set filesystemReport {} + catch {file stat foo bar} + testfilesystem 0 + set filesystemReport +} -match glob -result {*{stat foo}} +test filesystem-4.2 {testfilesystem} -constraints testfilesystem -body { + testfilesystem 1 + set filesystemReport {} + catch {file lstat foo bar} + testfilesystem 0 + set filesystemReport +} -match glob -result {*{lstat foo}} +test filesystem-4.3 {testfilesystem} -constraints testfilesystem -body { + testfilesystem 1 + set filesystemReport {} + catch {glob *} + testfilesystem 0 + set filesystemReport +} -match glob -result {*{matchindirectory *}*} -test filesystem-5.1 {cache and ~} { - -constraints testfilesystem - -match regexp - -body { - set orig $::env(HOME) - set ::env(HOME) /foo/bar/blah - set testdir ~ - set res1 "Parent of ~ (/foo/bar/blah) is [file dirname $testdir]" - set ::env(HOME) /a/b/c - set res2 "Parent of ~ (/a/b/c) is [file dirname $testdir]" - set ::env(HOME) $orig - list $res1 $res2 - } - -result {{Parent of ~ \(/foo/bar/blah\) is ([a-zA-Z]:)?(/foo/bar|foo:bar)} {Parent of ~ \(/a/b/c\) is ([a-zA-Z]:)?(/a/b|a:b)}} -} +test filesystem-5.1 {cache and ~} -constraints testfilesystem -setup { + set orig $::env(HOME) +} -body { + set ::env(HOME) /foo/bar/blah + set testdir ~ + set res1 "Parent of ~ (/foo/bar/blah) is [file dirname $testdir]" + set ::env(HOME) /a/b/c + set res2 "Parent of ~ (/a/b/c) is [file dirname $testdir]" + list $res1 $res2 +} -cleanup { + set ::env(HOME) $orig +} -match regexp -result {{Parent of ~ \(/foo/bar/blah\) is ([a-zA-Z]:)?(/foo/bar|foo:bar)} {Parent of ~ \(/a/b/c\) is ([a-zA-Z]:)?(/a/b|a:b)}} -test filesystem-6.1 {empty file name} { - list [catch {open ""} msg] $msg -} {1 {couldn't open "": no such file or directory}} -test filesystem-6.2 {empty file name} { - list [catch {file stat "" arr} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.3 {empty file name} { - list [catch {file atime ""} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.4 {empty file name} { - list [catch {file attributes ""} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.5 {empty file name} { - list [catch {file copy "" ""} msg] $msg -} {1 {error copying "": no such file or directory}} -test filesystem-6.6 {empty file name} { - list [catch {file delete ""} msg] $msg -} {0 {}} -test filesystem-6.7 {empty file name} { - list [catch {file dirname ""} msg] $msg -} {0 .} -test filesystem-6.8 {empty file name} { - list [catch {file executable ""} msg] $msg -} {0 0} -test filesystem-6.9 {empty file name} { - list [catch {file exists ""} msg] $msg -} {0 0} -test filesystem-6.10 {empty file name} { - list [catch {file extension ""} msg] $msg -} {0 {}} -test filesystem-6.11 {empty file name} { - list [catch {file isdirectory ""} msg] $msg -} {0 0} -test filesystem-6.12 {empty file name} { - list [catch {file isfile ""} msg] $msg -} {0 0} -test filesystem-6.13 {empty file name} { - list [catch {file join ""} msg] $msg -} {0 {}} -test filesystem-6.14 {empty file name} { - list [catch {file link ""} msg] $msg -} {1 {could not read link "": no such file or directory}} -test filesystem-6.15 {empty file name} { - list [catch {file lstat "" arr} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.16 {empty file name} { - list [catch {file mtime ""} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.17 {empty file name} { - list [catch {file mtime "" 0} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.18 {empty file name} { - list [catch {file mkdir ""} msg] $msg -} {1 {can't create directory "": no such file or directory}} -test filesystem-6.19 {empty file name} { - list [catch {file nativename ""} msg] $msg -} {0 {}} -test filesystem-6.20 {empty file name} { - list [catch {file normalize ""} msg] $msg -} {0 {}} -test filesystem-6.21 {empty file name} { - list [catch {file owned ""} msg] $msg -} {0 0} -test filesystem-6.22 {empty file name} { - list [catch {file pathtype ""} msg] $msg -} {0 relative} -test filesystem-6.23 {empty file name} { - list [catch {file readable ""} msg] $msg -} {0 0} -test filesystem-6.24 {empty file name} { - list [catch {file readlink ""} msg] $msg -} {1 {could not readlink "": no such file or directory}} -test filesystem-6.25 {empty file name} { - list [catch {file rename "" ""} msg] $msg -} {1 {error renaming "": no such file or directory}} -test filesystem-6.26 {empty file name} { - list [catch {file rootname ""} msg] $msg -} {0 {}} -test filesystem-6.27 {empty file name} { - list [catch {file separator ""} msg] $msg -} {1 {Unrecognised path}} -test filesystem-6.28 {empty file name} { - list [catch {file size ""} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.29 {empty file name} { - list [catch {file split ""} msg] $msg -} {0 {}} -test filesystem-6.30 {empty file name} { - list [catch {file system ""} msg] $msg -} {1 {Unrecognised path}} -test filesystem-6.31 {empty file name} { - list [catch {file tail ""} msg] $msg -} {0 {}} -test filesystem-6.32 {empty file name} { - list [catch {file type ""} msg] $msg -} {1 {could not read "": no such file or directory}} -test filesystem-6.33 {empty file name} { - list [catch {file writable ""} msg] $msg -} {0 0} +test filesystem-6.1 {empty file name} -returnCodes error -body { + open "" +} -result {couldn't open "": no such file or directory} +test filesystem-6.2 {empty file name} -returnCodes error -body { + file stat "" arr +} -result {could not read "": no such file or directory} +test filesystem-6.3 {empty file name} -returnCodes error -body { + file atime "" +} -result {could not read "": no such file or directory} +test filesystem-6.4 {empty file name} -returnCodes error -body { + file attributes "" +} -result {could not read "": no such file or directory} +test filesystem-6.5 {empty file name} -returnCodes error -body { + file copy "" "" +} -result {error copying "": no such file or directory} +test filesystem-6.6 {empty file name} {file delete ""} {} +test filesystem-6.7 {empty file name} {file dirname ""} . +test filesystem-6.8 {empty file name} {file executable ""} 0 +test filesystem-6.9 {empty file name} {file exists ""} 0 +test filesystem-6.10 {empty file name} {file extension ""} {} +test filesystem-6.11 {empty file name} {file isdirectory ""} 0 +test filesystem-6.12 {empty file name} {file isfile ""} 0 +test filesystem-6.13 {empty file name} {file join ""} {} +test filesystem-6.14 {empty file name} -returnCodes error -body { + file link "" +} -result {could not read link "": no such file or directory} +test filesystem-6.15 {empty file name} -returnCodes error -body { + file lstat "" arr +} -result {could not read "": no such file or directory} +test filesystem-6.16 {empty file name} -returnCodes error -body { + file mtime "" +} -result {could not read "": no such file or directory} +test filesystem-6.17 {empty file name} -returnCodes error -body { + file mtime "" 0 +} -result {could not read "": no such file or directory} +test filesystem-6.18 {empty file name} -returnCodes error -body { + file mkdir "" +} -result {can't create directory "": no such file or directory} +test filesystem-6.19 {empty file name} {file nativename ""} {} +test filesystem-6.20 {empty file name} {file normalize ""} {} +test filesystem-6.21 {empty file name} {file owned ""} 0 +test filesystem-6.22 {empty file name} {file pathtype ""} relative +test filesystem-6.23 {empty file name} {file readable ""} 0 +test filesystem-6.24 {empty file name} -returnCodes error -body { + file readlink "" +} -result {could not readlink "": no such file or directory} +test filesystem-6.25 {empty file name} -returnCodes error -body { + file rename "" "" +} -result {error renaming "": no such file or directory} +test filesystem-6.26 {empty file name} {file rootname ""} {} +test filesystem-6.27 {empty file name} -returnCodes error -body { + file separator "" +} -result {Unrecognised path} +test filesystem-6.28 {empty file name} -returnCodes error -body { + file size "" +} -result {could not read "": no such file or directory} +test filesystem-6.29 {empty file name} {file split ""} {} +test filesystem-6.30 {empty file name} -returnCodes error -body { + file system "" +} -result {Unrecognised path} +test filesystem-6.31 {empty file name} {file tail ""} {} +test filesystem-6.32 {empty file name} -returnCodes error -body { + file type "" +} -result {could not read "": no such file or directory} +test filesystem-6.33 {empty file name} {file writable ""} 0 # Make sure the testfilesystem hasn't been registered. if {[testConstraint testfilesystem]} { while {![catch {testfilesystem 0}]} {} } -test filesystem-7.1 {load from vfs} {win testsimplefilesystem} { - # This may cause a crash on exit +test filesystem-7.1 {load from vfs} -setup { set dir [pwd] +} -constraints {win testsimplefilesystem} -body { + # This may cause a crash on exit cd [file dirname [info nameof]] set dde [lindex [glob *dde*[info sharedlib]] 0] testsimplefilesystem 1 # This loads dde via a complex copy-to-temp operation load simplefs:/$dde dde testsimplefilesystem 0 - cd $dir - set res "ok" + return ok # The real result of this test is what happens when Tcl exits. -} {ok} -test filesystem-7.2 {cross-filesystem copy from vfs maintains mtime} \ - {testsimplefilesystem} { +} -cleanup { + cd $dir +} -result ok +test filesystem-7.2 {cross-filesystem copy from vfs maintains mtime} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] +} -constraints testsimplefilesystem -body { # We created this file several tests ago. set origtime [file mtime gorp.file] set res [file exists gorp.file] - if {[catch { - testsimplefilesystem 1 - file delete -force theCopy - file copy simplefs:/gorp.file theCopy - testsimplefilesystem 0 - set newtime [file mtime theCopy] - file delete theCopy - } err]} { - lappend res $err - set newtime "" - } + testsimplefilesystem 1 + file delete -force theCopy + file copy simplefs:/gorp.file theCopy + testsimplefilesystem 0 + set newtime [file mtime theCopy] + lappend res [expr {$origtime == $newtime ? 1 : "$origtime != $newtime"}] +} -cleanup { + catch {file delete theCopy} cd $dir - lappend res [expr {$origtime == $newtime}] -} {1 1} -test filesystem-7.3 {glob in simplefs} testsimplefilesystem { +} -result {1 1} +test filesystem-7.3 {glob in simplefs} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] +} -constraints testsimplefilesystem -body { file mkdir simpledir close [open [file join simpledir simplefile] w] testsimplefilesystem 1 - set res [glob -nocomplain -dir simplefs:/simpledir *] - testsimplefilesystem 0 + glob -nocomplain -dir simplefs:/simpledir * +} -cleanup { + catch {testsimplefilesystem 0} file delete -force simpledir cd $dir - set res -} {simplefs:/simpledir/simplefile} -test filesystem-7.3.1 {glob in simplefs: no path/dir} testsimplefilesystem { +} -result {simplefs:/simpledir/simplefile} +test filesystem-7.3.1 {glob in simplefs: no path/dir} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] +} -constraints testsimplefilesystem -body { file mkdir simpledir close [open [file join simpledir simplefile] w] testsimplefilesystem 1 set res [glob -nocomplain simplefs:/simpledir/*] - eval lappend res [glob -nocomplain simplefs:/simpledir] - testsimplefilesystem 0 + lappend res {*}[glob -nocomplain simplefs:/simpledir] +} -cleanup { + catch {testsimplefilesystem 0} file delete -force simpledir cd $dir - set res -} {simplefs:/simpledir/simplefile simplefs:/simpledir} -test filesystem-7.3.2 {glob in simplefs: no path/dir, no subdirectory} testsimplefilesystem { +} -result {simplefs:/simpledir/simplefile simplefs:/simpledir} +test filesystem-7.3.2 {glob in simplefs: no path/dir, no subdirectory} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] +} -constraints testsimplefilesystem -body { file mkdir simpledir close [open [file join simpledir simplefile] w] testsimplefilesystem 1 - set res [glob -nocomplain simplefs:/s*] - testsimplefilesystem 0 + glob -nocomplain simplefs:/s* +} -cleanup { + catch {testsimplefilesystem 0} file delete -force simpledir cd $dir - if {[llength $res] > 0} { - set res "ok" - } else { - set res "no files found with 'glob -nocomplain simplefs:/s*'" - } -} {ok} -test filesystem-7.3.3 {glob in simplefs: pattern is a volume} testsimplefilesystem { +} -match glob -result ?* +test filesystem-7.3.3 {glob in simplefs: pattern is a volume} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] +} -constraints testsimplefilesystem -body { file mkdir simpledir close [open [file join simpledir simplefile] w] testsimplefilesystem 1 - set res [glob -nocomplain simplefs:/*] + glob -nocomplain simplefs:/* +} -cleanup { testsimplefilesystem 0 file delete -force simpledir cd $dir - if {[llength $res] > 0} { - set res "ok" - } else { - set res "no files found with 'glob -nocomplain simplefs:/*'" - } -} {ok} -test filesystem-7.4 {cross-filesystem file copy with -force} testsimplefilesystem { +} -match glob -result ?* +test filesystem-7.4 {cross-filesystem file copy with -force} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] set fout [open [file join simplefile] w] puts -nonewline $fout "1234567890" close $fout testsimplefilesystem 1 +} -constraints testsimplefilesystem -body { # First copy should succeed set res [catch {file copy simplefs:/simplefile file2} err] lappend res $err @@ -809,19 +722,20 @@ test filesystem-7.4 {cross-filesystem file copy with -force} testsimplefilesyste lappend res [catch {file copy -force simplefs:/simplefile file2} err] lappend res $err lappend res [file exists file2] - testsimplefilesystem 0 +} -cleanup { + catch {testsimplefilesystem 0} file delete -force simplefile file delete -force file2 cd $dir - set res -} {0 10 1 {error copying "simplefs:/simplefile" to "file2": file already exists} 0 10 1} -test filesystem-7.5 {cross-filesystem file copy with -force} {testsimplefilesystem unix} { +} -result {0 10 1 {error copying "simplefs:/simplefile" to "file2": file already exists} 0 10 1} +test filesystem-7.5 {cross-filesystem file copy with -force} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] set fout [open [file join simplefile] w] puts -nonewline $fout "1234567890" close $fout testsimplefilesystem 1 +} -constraints {testsimplefilesystem unix} -body { # First copy should succeed set res [catch {file copy simplefs:/simplefile file2} err] lappend res $err @@ -833,13 +747,13 @@ test filesystem-7.5 {cross-filesystem file copy with -force} {testsimplefilesyst lappend res [catch {file copy -force simplefs:/simplefile file2} err] lappend res $err lappend res [file exists file2] +} -cleanup { testsimplefilesystem 0 file delete -force simplefile file delete -force file2 cd $dir - set res -} {0 10 1 {error copying "simplefs:/simplefile" to "file2": file already exists} 0 10 1} -test filesystem-7.6 {cross-filesystem dir copy with -force} testsimplefilesystem { +} -result {0 10 1 {error copying "simplefs:/simplefile" to "file2": file already exists} 0 10 1} +test filesystem-7.6 {cross-filesystem dir copy with -force} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] file delete -force simpledir @@ -849,6 +763,7 @@ test filesystem-7.6 {cross-filesystem dir copy with -force} testsimplefilesystem puts -nonewline $fout "1234567890" close $fout testsimplefilesystem 1 +} -constraints testsimplefilesystem -body { # First copy should succeed set res [catch {file copy simplefs:/simpledir dir2} err] lappend res $err @@ -860,13 +775,13 @@ test filesystem-7.6 {cross-filesystem dir copy with -force} testsimplefilesystem lappend res $err lappend res [file exists [file join dir2 simpledir]] \ [file exists [file join dir2 simpledir simplefile]] +} -cleanup { testsimplefilesystem 0 file delete -force simpledir file delete -force dir2 cd $dir - set res -} {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": file already exists} 0 {} 1 1} -test filesystem-7.7 {cross-filesystem dir copy with -force} {testsimplefilesystem unix} { +} -result {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": file already exists} 0 {} 1 1} +test filesystem-7.7 {cross-filesystem dir copy with -force} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] file delete -force simpledir @@ -876,6 +791,7 @@ test filesystem-7.7 {cross-filesystem dir copy with -force} {testsimplefilesyste puts -nonewline $fout "1234567890" close $fout testsimplefilesystem 1 +} -constraints {testsimplefilesystem unix} -body { # First copy should succeed set res [catch {file copy simplefs:/simpledir dir2} err] lappend res $err @@ -883,40 +799,41 @@ test filesystem-7.7 {cross-filesystem dir copy with -force} {testsimplefilesyste lappend res [catch {file copy simplefs:/simpledir dir2} err] lappend res $err # Third copy should succeed (-force) - # I've noticed on some Unices that this only succeeds - # intermittently (some runs work, some fail). This needs - # examining further. + # I've noticed on some Unices that this only succeeds intermittently (some + # runs work, some fail). This needs examining further. lappend res [catch {file copy -force simplefs:/simpledir dir2} err] lappend res $err lappend res [file exists [file join dir2 simpledir]] \ [file exists [file join dir2 simpledir simplefile]] +} -cleanup { testsimplefilesystem 0 file delete -force simpledir file delete -force dir2 cd $dir - set res -} {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": file already exists} 0 {} 1 1} +} -result {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": file already exists} 0 {} 1 1} removeFile gorp.file -test filesystem-7.8 {vfs cd} testsimplefilesystem { +test filesystem-7.8 {vfs cd} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] file delete -force simpledir file mkdir simpledir testsimplefilesystem 1 - # This can variously cause an infinite loop or simply have - # no effect at all (before certain bugs were fixed, of course). +} -constraints testsimplefilesystem -body { + # This can variously cause an infinite loop or simply have no effect at + # all (before certain bugs were fixed, of course). cd simplefs:/simpledir - set res [pwd] + pwd +} -cleanup { cd [tcltest::temporaryDirectory] testsimplefilesystem 0 file delete -force simpledir cd $dir - set res -} {simplefs:/simpledir} +} -result {simplefs:/simpledir} -test filesystem-8.1 {relative path objects and caching of pwd} { +test filesystem-8.1 {relative path objects and caching of pwd} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] +} -body { makeDirectory abc makeDirectory def makeFile "contents" [file join abc foo] @@ -927,30 +844,31 @@ test filesystem-8.1 {relative path objects and caching of pwd} { lappend res [file exists $f] cd .. cd def - # If we haven't cleared the object's cwd cache, Tcl - # will think it still exists. + # If we haven't cleared the object's cwd cache, Tcl will think it still + # exists. lappend res [file exists $f] lappend res [file exists $f] +} -cleanup { removeFile [file join abc foo] removeDirectory abc removeDirectory def cd $dir - set res -} {1 1 0 0} -test filesystem-8.2 {relative path objects and use of pwd} { +} -result {1 1 0 0} +test filesystem-8.2 {relative path objects and use of pwd} -setup { set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { set dir "abc" makeDirectory $dir makeFile "contents" [file join abc foo] cd $dir - set res [file exists [lindex [glob *] 0]] - cd .. + file exists [lindex [glob *] 0] +} -cleanup { + cd [tcltest::temporaryDirectory] removeFile [file join abc foo] removeDirectory abc cd $origdir - set res -} {1} +} -result 1 test filesystem-8.3 {path objects and empty string} { set anchor "" set dst foo @@ -966,7 +884,7 @@ proc TestFind1 {d f} { lappend res "is dir a dir? [file isdirectory $d]" set r2 [file exists [file join $d $f]] lappend res "[file join $d $f] found: $r2" - set res + return $res } proc TestFind2 {d f} { set r1 [file exists [file join $d $f]] @@ -974,67 +892,74 @@ proc TestFind2 {d f} { lappend res "is dir a dir? [file isdirectory [file join $d]]" set r2 [file exists [file join $d $f]] lappend res "[file join $d $f] found: $r2" - set res + return $res } -test filesystem-9.1 {path objects and join and object rep} { +test filesystem-9.1 {path objects and join and object rep} -setup { set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir [file join a b c] - set res [TestFind1 a [file join b . c]] + TestFind1 a [file join b . c] +} -cleanup { file delete -force a cd $origdir - set res -} {{a/b/./c found: 1} {is dir a dir? 1} {a/b/./c found: 1}} -test filesystem-9.2 {path objects and join and object rep} { +} -result {{a/b/./c found: 1} {is dir a dir? 1} {a/b/./c found: 1}} +test filesystem-9.2 {path objects and join and object rep} -setup { set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir [file join a b c] - set res [TestFind2 a [file join b . c]] + TestFind2 a [file join b . c] +} -cleanup { file delete -force a cd $origdir - set res -} {{a/b/./c found: 1} {is dir a dir? 1} {a/b/./c found: 1}} -test filesystem-9.2.1 {path objects and join and object rep} { +} -result {{a/b/./c found: 1} {is dir a dir? 1} {a/b/./c found: 1}} +test filesystem-9.2.1 {path objects and join and object rep} -setup { set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir [file join a b c] - set res [TestFind2 a [file join b .]] + TestFind2 a [file join b .] +} -cleanup { file delete -force a cd $origdir - set res -} {{a/b/. found: 1} {is dir a dir? 1} {a/b/. found: 1}} -test filesystem-9.3 {path objects and join and object rep} { +} -result {{a/b/. found: 1} {is dir a dir? 1} {a/b/. found: 1}} +test filesystem-9.3 {path objects and join and object rep} -setup { set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir [file join a b c] - set res [TestFind1 a [file join b .. b c]] + TestFind1 a [file join b .. b c] +} -cleanup { file delete -force a cd $origdir - set res -} {{a/b/../b/c found: 1} {is dir a dir? 1} {a/b/../b/c found: 1}} -test filesystem-9.4 {path objects and join and object rep} { +} -result {{a/b/../b/c found: 1} {is dir a dir? 1} {a/b/../b/c found: 1}} +test filesystem-9.4 {path objects and join and object rep} -setup { set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir [file join a b c] - set res [TestFind2 a [file join b .. b c]] + TestFind2 a [file join b .. b c] +} -cleanup { file delete -force a cd $origdir - set res -} {{a/b/../b/c found: 1} {is dir a dir? 1} {a/b/../b/c found: 1}} -test filesystem-9.5 {path objects and file tail and object rep} { +} -result {{a/b/../b/c found: 1} {is dir a dir? 1} {a/b/../b/c found: 1}} +test filesystem-9.5 {path objects and file tail and object rep} -setup { set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir dgp close [open dgp/test w] foreach relative [glob -nocomplain [file join * test]] { set absolute [file join [pwd] $relative] set res [list [file tail $absolute] "test"] } + return $res +} -cleanup { file delete -force dgp cd $origdir - set res -} {test test} +} -result {test test} test filesystem-9.6 {path objects and file tail and object rep} win { set res {} set p "C:\\toto" @@ -1042,10 +967,11 @@ test filesystem-9.6 {path objects and file tail and object rep} win { file isdirectory $p lappend res [file join $p toto] } {C:/toto/toto C:/toto/toto} -test filesystem-9.7 {path objects and glob and file tail and tilde} { +test filesystem-9.7 {path objects and glob and file tail and tilde} -setup { set res {} set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir tilde close [open tilde/~testNotExist w] cd tilde @@ -1054,15 +980,16 @@ test filesystem-9.7 {path objects and glob and file tail and tilde} { lappend res $file lappend res [file exists $file] [catch {file tail $file} r] $r lappend res [catch {file tail $file} r] $r - cd .. +} -cleanup { + cd [tcltest::temporaryDirectory] file delete -force tilde cd $origdir - set res -} {0 1 {user "testNotExist" doesn't exist} ~testNotExist 0 1 {user "testNotExist" doesn't exist} 1 {user "testNotExist" doesn't exist}} -test filesystem-9.8 {path objects and glob and file tail and tilde} { +} -result {0 1 {user "testNotExist" doesn't exist} ~testNotExist 0 1 {user "testNotExist" doesn't exist} 1 {user "testNotExist" doesn't exist}} +test filesystem-9.8 {path objects and glob and file tail and tilde} -setup { set res {} set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir tilde close [open tilde/~testNotExist w] cd tilde @@ -1071,15 +998,16 @@ test filesystem-9.8 {path objects and glob and file tail and tilde} { lappend res $file1 $file2 lappend res [catch {file tail $file1} r] $r lappend res [catch {file tail $file2} r] $r - cd .. +} -cleanup { + cd [tcltest::temporaryDirectory] file delete -force tilde cd $origdir - set res -} {~testNotExist ~testNotExist 1 {user "testNotExist" doesn't exist} 1 {user "testNotExist" doesn't exist}} -test filesystem-9.9 {path objects and glob and file tail and tilde} { +} -result {~testNotExist ~testNotExist 1 {user "testNotExist" doesn't exist} 1 {user "testNotExist" doesn't exist}} +test filesystem-9.9 {path objects and glob and file tail and tilde} -setup { set res {} set origdir [pwd] cd [tcltest::temporaryDirectory] +} -body { file mkdir tilde close [open tilde/~testNotExist w] cd tilde @@ -1088,14 +1016,20 @@ test filesystem-9.9 {path objects and glob and file tail and tilde} { lappend res [catch {file exists $file1} r] $r lappend res [catch {file exists $file2} r] $r lappend res [string equal $file1 $file2] - cd .. +} -cleanup { + cd [tcltest::temporaryDirectory] file delete -force tilde cd $origdir - set res -} {0 0 0 0 1} +} -result {0 0 0 0 1} + +# ---------------------------------------------------------------------- cleanupTests unset -nocomplain drive } namespace delete ::tcl::test::fileSystem return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 3b797b51b1cb45323e31deb42e2f9f95d0c877c0 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Sep 2008 22:48:41 +0000 Subject: Incomplete docs for [binary encode] and [binary decode]. --- ChangeLog | 3 +++ doc/binary.n | 24 ++++++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index be63310..99362ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-09-10 Donal K. Fellows + * doc/binary.n: Added partial documentation of [binary encode] and + [binary decode]. + * tests/binary.test,cmdAH.test,cmdIL.test,cmdMZ.test,fileSystem.test: More use of tcltest2 to simplify the tests as exposed to people. * tests/compile.test (compile-18.*): Added *some* tests of the diff --git a/doc/binary.n b/doc/binary.n index 95373fb..a850205 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: binary.n,v 1.39 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: binary.n,v 1.40 2008/09/10 22:48:41 dkf Exp $ '\" .so man.macros .TH binary n 8.0 Tcl "Tcl Built-In Commands" @@ -13,6 +13,12 @@ .SH NAME binary \- Insert and extract fields from binary strings .SH SYNOPSIS +.VS 8.6 +\fBbinary decode \fIformat\fR ?\fI-option value ...\fR? \fIdata\fR +.br +\fBbinary encode \fIformat\fR ?\fI-option value ...\fR? \fIdata\fR +.br +.VE 8.6 \fBbinary format \fIformatString \fR?\fIarg arg ...\fR? .br \fBbinary scan \fIstring formatString \fR?\fIvarName varName ...\fR? @@ -20,12 +26,22 @@ binary \- Insert and extract fields from binary strings .SH DESCRIPTION .PP This command provides facilities for manipulating binary data. The -first form, \fBbinary format\fR, creates a binary string from normal +subcommand \fBbinary format\fR creates a binary string from normal Tcl values. For example, given the values 16 and 22, on a 32-bit architecture, it might produce an 8-byte binary string consisting of -two 4-byte integers, one for each of the numbers. The second form of -the command, \fBbinary scan\fR, does the opposite: it extracts data +two 4-byte integers, one for each of the numbers. The subcommand +\fBbinary scan\fR, does the opposite: it extracts data from a binary string and returns it as ordinary Tcl string values. +.VS 8.6 +The \fBbinary encode\fR and \fBbinary decode\fR subcommands convert +binary data to or from string encodings such as base64 (used in MIME +messages for example). +.VE 8.6 +.SH "BINARY ENCODE AND DECODE" +.VS 8.6 +.PP +\fIFIXME!\fR +.VE 8.6 .SH "BINARY FORMAT" .PP The \fBbinary format\fR command generates a binary string whose layout -- cgit v0.12 From aeeead96a33d9d54f77f6beaa6e10b1bd2a8dd4f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 17 Sep 2008 00:01:44 +0000 Subject: * generic/tclBasic.c: move TclResetCancellation to be called on returning to level 0, as opposed to it being called on starting a command at level 0. Add a call on returning via Tcl_EvalObjEx to fix [Bug 2114165]. --- ChangeLog | 7 +++++++ generic/tclBasic.c | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99362ba..b228166 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-16 Miguel Sofer + + * generic/tclBasic.c: move TclResetCancellation to be called on + returning to level 0, as opposed to it being called on starting a + command at level 0. Add a call on returning via Tcl_EvalObjEx to + fix [Bug 2114165]. + 2008-09-10 Donal K. Fellows * doc/binary.n: Added partial documentation of [binary encode] and diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1f80d43..42cac49 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.366 2008/09/10 13:24:00 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.367 2008/09/17 00:01:48 msofer Exp $ */ #include "tclInt.h" @@ -4033,7 +4033,6 @@ TclNREvalObjv( TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); - TclResetCancellation(interp, 0); iPtr->numLevels++; result = TclInterpReady(interp); @@ -4411,6 +4410,14 @@ TEOV_Exception( result = TCL_ERROR; } } + + /* + * We are returning to level 0, so should process TclResetCancellation. As + * numLevels has not *yet* been decreased, do not call it: do the thing + * here directly. + */ + + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); return result; } @@ -5924,6 +5931,13 @@ TEOEx_ByteCodeCallback( script = Tcl_GetStringFromObj(objPtr, &numSrcBytes); Tcl_LogCommandInfo(interp, script, script, numSrcBytes); } + + /* + * We are returning to level 0, so should call TclResetCancellation. + * Let us just unset the flags inline. + */ + + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); } iPtr->evalFlags = 0; -- cgit v0.12 From 533c45a358ccd733b91eb08bd21db04a7b3be0b7 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Wed, 17 Sep 2008 02:15:32 +0000 Subject: * generic/tclParse.c: move TclResetCancellation to be called on returning to level 0, as opposed to it being called on starting a substitution at level 0. --- ChangeLog | 6 ++++++ generic/tclParse.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b228166..02aeadc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-16 Joe Mistachkin + + * generic/tclParse.c: move TclResetCancellation to be called on + returning to level 0, as opposed to it being called on starting a + substitution at level 0. + 2008-09-16 Miguel Sofer * generic/tclBasic.c: move TclResetCancellation to be called on diff --git a/generic/tclParse.c b/generic/tclParse.c index a71c831..787b556 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.71 2008/07/15 14:13:05 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.72 2008/09/17 02:15:32 mistachkin Exp $ */ #include "tclInt.h" @@ -2168,7 +2168,6 @@ TclSubstTokens( Interp *iPtr = (Interp *) interp; /* TIP #280: Transfer line information to nested command */ - TclResetCancellation(interp, 0); iPtr->numLevels++; code = TclInterpReady(interp); if (code == TCL_OK) { @@ -2176,6 +2175,7 @@ TclSubstTokens( 0, line); } iPtr->numLevels--; + TclResetCancellation(interp, 0); appendObj = Tcl_GetObjResult(interp); break; } -- cgit v0.12 From 988b6b7363ad3960973bce0c1bb8d6b3cefe289f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 17 Sep 2008 12:38:16 +0000 Subject: * library/init.tcl: export min and max commands from the mathfunc namespace [Bug 2116053] --- ChangeLog | 5 +++++ library/init.tcl | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 02aeadc..8dfb8b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-17 Miguel Sofer + + * library/init.tcl: export min and max commands from the mathfunc + namespace [Bug 2116053] + 2008-09-16 Joe Mistachkin * generic/tclParse.c: move TclResetCancellation to be called on diff --git a/library/init.tcl b/library/init.tcl index c43475b..9a52118 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.111 2008/08/28 16:24:18 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.112 2008/09/17 12:38:21 msofer Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -109,6 +109,7 @@ namespace eval tcl { } return $val } + namespace export min max } } -- cgit v0.12 From 68778453cedcc72078811676bbb0ae096624bb61 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 17 Sep 2008 18:11:31 +0000 Subject: * generic/tclInt.h: Correct the TclGetLongFromObj, TclGetIntFromObj, and TclGetIntForIndexM macros so that they retrieve the internalRep.longValue field instead of casting the internalRep.otherValuePtr field to type long. --- ChangeLog | 7 +++++++ generic/tclInt.h | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8dfb8b6..0858384 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-17 Don Porter + + * generic/tclInt.h: Correct the TclGetLongFromObj, + TclGetIntFromObj, and TclGetIntForIndexM macros so that they + retrieve the internalRep.longValue field instead of casting the + internalRep.otherValuePtr field to type long. + 2008-09-17 Miguel Sofer * library/init.tcl: export min and max commands from the mathfunc diff --git a/generic/tclInt.h b/generic/tclInt.h index f9a53a9..10deb4c 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.396 2008/08/24 14:38:11 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.397 2008/09/17 18:11:32 dgp Exp $ */ #ifndef _TCLINT @@ -2281,17 +2281,17 @@ typedef struct List { #define TclGetLongFromObj(interp, objPtr, longPtr) \ (((objPtr)->typePtr == &tclIntType) \ - ? ((*(longPtr) = (long) (objPtr)->internalRep.otherValuePtr), TCL_OK) \ + ? ((*(longPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ : Tcl_GetLongFromObj((interp), (objPtr), (longPtr))) #if (LONG_MAX == INT_MAX) #define TclGetIntFromObj(interp, objPtr, intPtr) \ (((objPtr)->typePtr == &tclIntType) \ - ? ((*(intPtr) = (long) (objPtr)->internalRep.otherValuePtr), TCL_OK) \ + ? ((*(intPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ : Tcl_GetIntFromObj((interp), (objPtr), (intPtr))) #define TclGetIntForIndexM(interp, objPtr, endValue, idxPtr) \ (((objPtr)->typePtr == &tclIntType) \ - ? ((*(idxPtr) = (long) (objPtr)->internalRep.otherValuePtr), TCL_OK) \ + ? ((*(idxPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ : TclGetIntForIndex((interp), (objPtr), (endValue), (idxPtr))) #else #define TclGetIntFromObj(interp, objPtr, intPtr) \ -- cgit v0.12 From 412f81264a0156c5c2b473db6adcfba85dc81ed6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 18 Sep 2008 15:43:10 +0000 Subject: * generic/tclExecute.c (NEXT_INST_F): * generic/tclInt.h (TCL_CT_ASSERT): new compile-time assertions, adapted from www.pixelbeat.org/programming/gcc/static_assert.html --- ChangeLog | 6 ++++++ generic/tclExecute.c | 46 ++++++++++++++++++++++++---------------------- generic/tclInt.h | 38 ++++++++++++++++++++------------------ 3 files changed, 50 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0858384..6df17e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-18 Miguel Sofer + + * generic/tclExecute.c (NEXT_INST_F): + * generic/tclInt.h (TCL_CT_ASSERT): new compile-time assertions, + adapted from www.pixelbeat.org/programming/gcc/static_assert.html + 2008-09-17 Don Porter * generic/tclInt.h: Correct the TclGetLongFromObj, diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ba7bd62..fd79931 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.411 2008/09/10 13:24:12 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.412 2008/09/18 15:43:15 msofer Exp $ */ #include "tclInt.h" @@ -257,35 +257,37 @@ VarHashCreateVar( * resultHandling: 0 indicates no object should be pushed on the stack; * otherwise, push objResultPtr. If (result < 0), objResultPtr already * has the correct reference count. + * + * We use the new compile-time assertions to cheack that nCleanup is constant + * and within range. */ #define NEXT_INST_F(pcAdjustment, nCleanup, resultHandling) \ - if (nCleanup == 0) {\ - if (resultHandling != 0) {\ - if ((resultHandling) > 0) {\ - PUSH_OBJECT(objResultPtr);\ - } else {\ - *(++tosPtr) = objResultPtr;\ - }\ - } \ - pc += (pcAdjustment);\ - goto cleanup0;\ - } else if (resultHandling != 0) {\ - if ((resultHandling) > 0) {\ - Tcl_IncrRefCount(objResultPtr);\ - }\ - pc += (pcAdjustment);\ - switch (nCleanup) {\ - case 1: goto cleanup1_pushObjResultPtr;\ - case 2: goto cleanup2_pushObjResultPtr;\ - default: Tcl_Panic("bad usage of macro NEXT_INST_F");\ + TCL_CT_ASSERT((nCleanup >= 0) && (nCleanup <= 2)); \ + if (nCleanup == 0) { \ + if (resultHandling != 0) { \ + if ((resultHandling) > 0) { \ + PUSH_OBJECT(objResultPtr); \ + } else { \ + *(++tosPtr) = objResultPtr; \ + } \ + } \ + pc += (pcAdjustment); \ + goto cleanup0; \ + } else if (resultHandling != 0) { \ + if ((resultHandling) > 0) { \ + Tcl_IncrRefCount(objResultPtr); \ + } \ + pc += (pcAdjustment); \ + switch (nCleanup) { \ + case 1: goto cleanup1_pushObjResultPtr; \ + case 2: goto cleanup2_pushObjResultPtr; \ }\ } else {\ pc += (pcAdjustment);\ switch (nCleanup) {\ case 1: goto cleanup1;\ case 2: goto cleanup2;\ - default: Tcl_Panic("bad usage of macro NEXT_INST_F");\ }\ } @@ -2399,7 +2401,7 @@ TclExecuteByteCode( TclNewObj(newObjResultPtr); Tcl_IncrRefCount(newObjResultPtr); iPtr->objResultPtr = newObjResultPtr; - NEXT_INST_V(opnd, 0, -1); + NEXT_INST_F(opnd, 0, -1); } case INST_DUP: diff --git a/generic/tclInt.h b/generic/tclInt.h index 10deb4c..d13efb4 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.397 2008/09/17 18:11:32 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.398 2008/09/18 15:43:21 msofer Exp $ */ #ifndef _TCLINT @@ -4035,13 +4035,27 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, ? 1 : 0))) /* + * Compile-time assertions: these produce a compile time error if + * the expression is not known to be true at compile time. + * If the assertion is known to be false, the compiler (or optimizer?) will + * error out with "division by zero". If the assertion cannot be evaluated at + * compile time, the compiler will error out with "non-static initializer". + * + * Adapted with permission from + * http://www.pixelbeat.org/programming/gcc/static_assert.html + */ + +#define TCL_ASSERT_CONCAT_(a, b) a##b +#define TCL_ASSERT_CONCAT(a, b) TCL_ASSERT_CONCAT_(a, b) +#define TCL_CT_ASSERT(e) \ + {enum { TCL_ASSERT_CONCAT(tclCtAssert_, __LINE__) = 1/(!!(e)) };} + +/* *---------------------------------------------------------------- * Allocator for small structs (<=sizeof(Tcl_Obj)) using the Tcl_Obj pool. * Only checked at compile time. * - * ONLY USE FOR CONSTANT nBytes: if you do and nBytes is too large, the - * compiler will error out with "duplicate case value" (thanks dkf!). If the - * size is dynamic, a panic will be compiled in for the wrong case. + * ONLY USE FOR CONSTANT nBytes. * * DO NOT LET THEM CROSS THREAD BOUNDARIES *---------------------------------------------------------------- @@ -4057,13 +4071,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #define TclSmallAllocEx(interp, nbytes, memPtr) \ { \ Tcl_Obj *objPtr; \ - switch ((nbytes)>sizeof(Tcl_Obj)) { \ - case (2 +((nbytes)>sizeof(Tcl_Obj))): \ - case 3: \ - case 1: \ - Tcl_Panic("TclSmallAlloc: nBytes too large!"); \ - case 0: (void)0; \ - } \ + TCL_CT_ASSERT((nbytes)<=sizeof(Tcl_Obj)); \ TclIncrObjsAllocated(); \ TclAllocObjStorageEx((interp), (objPtr)); \ memPtr = (ClientData) (objPtr); \ @@ -4077,13 +4085,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #define TclSmallAllocEx(interp, nbytes, memPtr) \ { \ Tcl_Obj *objPtr; \ - switch ((nbytes)>sizeof(Tcl_Obj)) { \ - case (2 +((nbytes)>sizeof(Tcl_Obj))): \ - case 3: \ - case 1: \ - Tcl_Panic("TclSmallAlloc: nBytes too large!"); \ - case 0: (void)0; \ - } \ + TCL_CT_ASSERT((nbytes)<=sizeof(Tcl_Obj)); \ TclNewObj(objPtr); \ memPtr = (ClientData) objPtr; \ } -- cgit v0.12 From 90f846c84d2ef23021a9142455aeebfc71f40139 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 18 Sep 2008 16:14:51 +0000 Subject: simplify TCL_CT_ASSERT --- generic/tclInt.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index d13efb4..0ed0192 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.398 2008/09/18 15:43:21 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.399 2008/09/18 16:14:51 msofer Exp $ */ #ifndef _TCLINT @@ -4045,10 +4045,8 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, * http://www.pixelbeat.org/programming/gcc/static_assert.html */ -#define TCL_ASSERT_CONCAT_(a, b) a##b -#define TCL_ASSERT_CONCAT(a, b) TCL_ASSERT_CONCAT_(a, b) #define TCL_CT_ASSERT(e) \ - {enum { TCL_ASSERT_CONCAT(tclCtAssert_, __LINE__) = 1/(!!(e)) };} + {enum { ct_assert_value = 1/(!!(e)) };} /* *---------------------------------------------------------------- -- cgit v0.12 From 404405c0976f47e28629ed9441feaa565cf85d99 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 22 Sep 2008 21:02:14 +0000 Subject: Clean up paragraph order in chan.n [chan pipe] --- ChangeLog | 4 ++++ doc/chan.n | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6df17e8..85c46a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-09-22 Alexandre Ferrieux + + * doc/chan.n: clean up paragraph order. + 2008-09-18 Miguel Sofer * generic/tclExecute.c (NEXT_INST_F): diff --git a/doc/chan.n b/doc/chan.n index a202b30..85d087f 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.18 2008/07/21 21:02:15 ferrieux Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.19 2008/09/22 21:02:39 ferrieux Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -516,6 +516,16 @@ a potential denial-of-service attack where a hostile user crafts an extremely long line that exceeds the available memory to buffer it). Returns -1 if the channel was not opened for the mode in question. .TP +\fBchan pipe\fR +. +Creates a standalone pipe whose read- and write-side channels are +returned as a 2-element list, the first element being the read side and +the second the write side. Can be useful e.g. to redirect +separately stderr and stdout from a subprocess. To do this, spawn with "2>@" or +">@" redirection operators onto the write side of a pipe, and then +immediately close it in the parent. This is necessary to get an EOF on +the read side once the child has exited or otherwise closed its output. +.TP \fBchan postevent \fIchannelId eventSpec\fR . This subcommand is used by command handlers specified with \fBchan @@ -697,16 +707,6 @@ Sets the byte length of the underlying data stream for the channel named \fIchannelId\fR to be \fIlength\fR (or to the current byte offset within the underlying data stream if \fIlength\fR is omitted). The channel is flushed before truncation. -.TP -\fBchan pipe\fR -. -Creates a standalone pipe whose read- and write-side channels are -returned as a 2-element list, the first element being the read side and -the second the write side. Can be useful e.g. to redirect -separately stderr and stdout from a subprocess. To do this, spawn with "2>@" or -">@" redirection operators onto the write side of a pipe, and then -immediately close it in the parent. This is necessary to get an EOF on -the read side once the child has exited or otherwise closed its output. . .SH EXAMPLE This opens a file using a known encoding (CP1252, a very common encoding -- cgit v0.12 From 282e134aeee90a7223dae8944b610c218aeaec78 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 23 Sep 2008 05:05:41 +0000 Subject: Implementation of TIP #320.#320.#320. --- ChangeLog | 275 ++++++++++++++++++++++++---------------------- doc/define.n | 28 ++++- doc/info.n | 24 +++- generic/tclOO.c | 22 +++- generic/tclOODefineCmds.c | 96 +++++++++++++++- generic/tclOOInfo.c | 116 ++++++++++++++----- generic/tclOOInt.h | 9 +- generic/tclOOMethod.c | 266 +++++++++++++++++++++++++++++++++++++++++++- tests/oo.test | 193 +++++++++++++++++++++++++++++++- 9 files changed, 856 insertions(+), 173 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85c46a1..8eea436 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,37 +1,55 @@ +2008-09-22 Donal K. Fellows + + TIP #320 IMPLEMENTATION + + * generic/tclOODefineCmds.c (TclOODefineVariablesObjCmd): + * generic/tclOOInfo.c (InfoObjectVariablesCmd, InfoClassVariablesCmd): + * generic/tclOOMethod.c (TclOOSetupVariableResolver, etc): + * doc/define.n, doc/ooInfo.n, benchmarks/cps.tcl: + * tests/oo.test (oo-26.*): Allow the declaration of the common + variables used in methods of a class or object. These are then mapped + in using a variable resolver. This makes many class declarations much + simpler overall, encourages good usage of variable names, and also + boosts speed a bit. + + * generic/tclOOMethod.c (TclOOGetMethodBody): Factor out the code to + get the body of a procedure-like method. Reduces the amount of "poking + inside the abstraction" that is done by the introspection code. + 2008-09-22 Alexandre Ferrieux - - * doc/chan.n: clean up paragraph order. + + * doc/chan.n: Clean up paragraph order. 2008-09-18 Miguel Sofer * generic/tclExecute.c (NEXT_INST_F): - * generic/tclInt.h (TCL_CT_ASSERT): new compile-time assertions, + * generic/tclInt.h (TCL_CT_ASSERT): New compile-time assertions, adapted from www.pixelbeat.org/programming/gcc/static_assert.html 2008-09-17 Don Porter - * generic/tclInt.h: Correct the TclGetLongFromObj, - TclGetIntFromObj, and TclGetIntForIndexM macros so that they - retrieve the internalRep.longValue field instead of casting the - internalRep.otherValuePtr field to type long. + * generic/tclInt.h: Correct the TclGetLongFromObj, TclGetIntFromObj, + and TclGetIntForIndexM macros so that they retrieve the longValue + field from the internalRep instead of casting the otherValuePtr field + to type long. 2008-09-17 Miguel Sofer * library/init.tcl: export min and max commands from the mathfunc - namespace [Bug 2116053] + namespace. [Bug 2116053] 2008-09-16 Joe Mistachkin - * generic/tclParse.c: move TclResetCancellation to be called on + * generic/tclParse.c: Move TclResetCancellation to be called on returning to level 0, as opposed to it being called on starting a substitution at level 0. 2008-09-16 Miguel Sofer - * generic/tclBasic.c: move TclResetCancellation to be called on + * generic/tclBasic.c: Move TclResetCancellation to be called on returning to level 0, as opposed to it being called on starting a - command at level 0. Add a call on returning via Tcl_EvalObjEx to - fix [Bug 2114165]. + command at level 0. Add a call on returning via Tcl_EvalObjEx to fix + [Bug 2114165]. 2008-09-10 Donal K. Fellows @@ -45,13 +63,13 @@ 2008-09-10 Miguel Sofer - * tests/nre.test: add missing constraints; enable test of foreach - recursion. + * tests/nre.test: Add missing constraints; enable test of foreach + recursion. * generic/tclBasic.c: * generic/tclCompile.h: - * generic/tclExecute.c (INST_EVAL_STK): fix for [Bug 2102930], - wrong numLevels when evaling a canonical list. + * generic/tclExecute.c (INST_EVAL_STK): Wrong numLevels when evaling a + canonical list. [Bug 2102930] 2008-09-10 Donal K. Fellows @@ -68,24 +86,23 @@ 2008-09-07 Miguel Sofer * generic/tclCompile.c (TclCompileTokens): - * generic/tclExecute.c (CompileExprObj): fix a perf bug (found by - Alex Ferrieux) where some variables in the LVT where not being - accessed by index. Fix missing localCache management in compiled - expressions found while analyzing the bug. - + * generic/tclExecute.c (CompileExprObj): Fix a perf bug (found by Alex + Ferrieux) where some variables in the LVT where not being accessed by + index. Fix missing localCache management in compiled expressions found + while analyzing the bug. + 2008-09-07 Miguel Sofer - * doc/namespace.n: fix [Bug 2098441] + * doc/namespace.n: Fix [Bug 2098441] 2008-09-04 Miguel Sofer * generic/tclTrace.test (TraceVarProc): - * generic/unsupported.test: insure that unset traces are run even - when the coroutine is unwinding [Bug 2093947] - - * generic/tclExecute.c (CACHE_STACK_INFO): - * tests/unsupported.test: restore the execEnv's bottomPtr, fix - for [Bug 2093188]. + * generic/unsupported.test: Insure that unset traces are run even when + the coroutine is unwinding. [Bug 2093947] + + * generic/tclExecute.c (CACHE_STACK_INFO): + * tests/unsupported.test: Restore execEnv's bottomPtr. [Bug 2093188] 2008-09-02 Don Porter @@ -106,15 +123,15 @@ 2008-09-01 Miguel Sofer - * generic/tclCmdAH.c: nre-enabling [eval]; eval scripts are now - * generic/tclOOBasic.c: bytecompiled. Adapted recursion limit tests - * tests/interp.test: that were relying on eval not being - * tests/nre.test: compiled. Part of the [Bug 2017632] project. + * generic/tclCmdAH.c: NRE-enabling [eval]; eval scripts are now + * generic/tclOOBasic.c: bytecompiled. Adapted recursion limit tests + * tests/interp.test: that were relying on eval not being + * tests/nre.test: compiled. Part of the [Bug 2017632] project. * tests/unsupported.test: 2008-09-01 Donal K. Fellows - * generic/tclOOMethod.c (InvokeProcedureMethod): + * generic/tclOOMethod.c (InvokeProcedureMethod): * generic/tclOO.c (ObjectRenamedTrace): Arrange for only methods that involve callbacks into the Tcl interpreter to be skipped when the interpreter is being torn down. Allows the semantics of destructors in @@ -124,8 +141,8 @@ * unix/Makefile.in: Ensure that all TclOO headers get installed. * win/Makefile.in: [Bug 2082299] - * win/makefile.bc: - * win/makefile.vc: + * win/makefile.bc: + * win/makefile.vc: 2008-08-28 Don Porter @@ -147,16 +164,16 @@ 2008-08-26 Miguel Sofer - * generic/tclBasic.c (InfoCoroutine): - * tests/unsupported.test: new command that returns the - FQN of the currently executing coroutine. Lives as infoCoroutine - under unsupported, but is designed to become a subcommand of [info] + * generic/tclBasic.c (InfoCoroutine): + * tests/unsupported.test: New command that returns the FQN of the + currently executing coroutine. Lives as infoCoroutine under + unsupported, but is designed to become a subcommand of [info] 2008-08-23 Miguel Sofer - * generic/tclBasic.c (NRInterpCoroutine): store the caller's - eePtr, stop assuming the coroutine is invoked from the same - execEnv where it was created. + * generic/tclBasic.c (NRInterpCoroutine): Store the caller's eePtr, + stop assuming the coroutine is invoked from the same execEnv where it + was created. 2008-08-24 Donal K. Fellows @@ -167,11 +184,11 @@ 2008-08-23 Miguel Sofer - * generic/tclBasic.c: Removed unused var; fixed function - * generic/tclOOInt.h: pointer declarations (why did gcc start - * generic/tclOOMethod.c: complaining all of a sudden?) + * generic/tclBasic.c: Removed unused var; fixed function pointer + * generic/tclOOInt.h: declarations (why did gcc start complaining + * generic/tclOOMethod.c: all of a sudden?) * generic/tclProc.c: - + 2008-08-23 Donal K. Fellows * generic/tclInt.h (EnsembleImplMap): Added extra field to make it @@ -184,7 +201,7 @@ 2008-08-22 Miguel Sofer - * generic/tclBasic.c: + * generic/tclBasic.c: * generic/tclExecute.c: Set special errocodes: COROUTINE_BUSY, COROUTINE_CANT_YIELD, COROUTINE_ILLEGAL_YIELD. @@ -198,28 +215,28 @@ indirection without value. Use -DCONST86="" to engage source compat support for code written for 8.5 headers. - * generic/tclUtil.c (TclReToGlob): Added missing set of the + * generic/tclUtil.c (TclReToGlob): Added missing set of the *exactPtr value to really fix [Bug 2065115]. Also avoid possible DString overflow. - * tests/regexpComp.test: Correct duplicate test names. + * tests/regexpComp.test: Correct duplicate test names. 2008-08-21 Miguel Sofer - * generic/tclBasic.c: Previous fix, now done right. + * generic/tclBasic.c: Previous fix, now done right. * generic/tclCmdIL.c: - * generic/tclInt.h: + * generic/tclInt.h: * tests/unsupported.test: 2008-08-21 Jeff Hobbs - * tests/regexp.test, tests/regexpComp.test: correct re2glob ***= - * generic/tclUtil.c (TclReToGlob): translation from exact + * tests/regexp.test, tests/regexpComp.test: Correct re2glob ***= + * generic/tclUtil.c (TclReToGlob): translation from exact to anywhere-in-string match. [Bug 2065115] 2008-08-21 Don Porter - * generic/tcl.h: Reduced the use of CONST86 and eliminated - * generic/tcl.decls: the use of CONST86_RETURN to support source + * generic/tcl.h: Reduced the use of CONST86 and eliminated + * generic/tcl.decls: the use of CONST86_RETURN to support source code compatibility with Tcl 8.5 on those public routines passing (Tcl_Filesystem *), (Tcl_Timer *), and (Tcl_Objtype *) values which have been const-ified. What remains is the minimum configurability @@ -233,7 +250,7 @@ * generic/tclBasic.c: Fix the cmdFrame level count in * generic/tclCmdIL.c: coroutines. Fix small bug on coroutine - * generic/tclInt.h: rewind. + * generic/tclInt.h: rewind. 2008-08-21 Donal K. Fellows @@ -243,7 +260,7 @@ 2008-08-21 Pat Thoyts * generic/tclOOMethod.c: Added casts to make MSVC happy - * generic/tclBasic.c: + * generic/tclBasic.c: 2008-08-20 Donal K. Fellows @@ -265,8 +282,8 @@ 2008-08-17 Miguel Sofer - * generic/tclBasic.c: Implementation of [coroutine] and [yield] - * generic/tclCmdAH.c: commands (in tcl::unsupported). + * generic/tclBasic.c: Implementation of [coroutine] and [yield] + * generic/tclCmdAH.c: commands (in tcl::unsupported). * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclInt.h: @@ -333,8 +350,8 @@ 2008-08-13 Don Porter - * generic/tclFileName.c: Fix for errors handling -types {} - * tests/fileName.test: option to [glob]. [Bug 1750300] + * generic/tclFileName.c: Fix for errors handling -types {} + * tests/fileName.test: option to [glob]. [Bug 1750300] Thanks to Matthias Kraft and George Peter Staplin. 2008-08-12 Jeff Hobbs @@ -389,17 +406,17 @@ 2008-08-11 Don Porter - * library/http/http.tcl: Bump http version to 2.7.1 to account - * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This - * unix/Makefile.in: release of http now requires a - * win/Makefile.in: dependency on Tcl 8.5 to be able to - * win/makefile.bc: use the unsigned formats in the - * win/makefile.vc: [binary scan] command. + * library/http/http.tcl: Bump http version to 2.7.1 to account + * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This + * unix/Makefile.in: release of http now requires a + * win/Makefile.in: dependency on Tcl 8.5 to be able to + * win/makefile.bc: use the unsigned formats in the + * win/makefile.vc: [binary scan] command. 2008-08-11 Pat Thoyts * library/http/http.tcl: CRC field from zlib data should be treated as - unsigned for 64bit support [Bug 2046846] + unsigned for 64bit support. [Bug 2046846] 2008-08-10 Miguel Sofer @@ -410,7 +427,7 @@ 2008-08-09 Miguel Sofer - * generic/tclBasic.c: Slight cleanup + * generic/tclBasic.c: Slight cleanup * generic/tclCompile.h: * generic/tclExecute.c: @@ -490,25 +507,25 @@ for [foreach] has been added and marked as knownbug, awaiting for it to be NR-enabled. - * generic/tclBasic.c: Made atProcExit commands run - * generic/tclCompile.h: inconditionally, streamlined - * generic/tclExecute.c: atProcExit/tailcall processing - * generic/tclProc.c: in TEBC. + * generic/tclBasic.c: Made atProcExit commands run + * generic/tclCompile.h: unconditionally, streamlined + * generic/tclExecute.c: atProcExit/tailcall processing in TEBC. + * generic/tclProc.c: * tests/unsupported.test: -2008-08-04 Don Porter +2008-08-04 Don Porter * generic/tclExecute.c: Stopped faulty double-logging of errors to - * tests/execute.test: stack trace when a compile epoch bump triggers + * tests/execute.test: stack trace when a compile epoch bump triggers fallback to direct evaluation of commands in a compiled script. [Bug 2037338] 2008-08-03 Miguel Sofer - * generic/tclBasic.c: New unsupported command atProcExit - * generic/tclCompile.h: that shares the implementation with - * generic/tclExecute.c: tailcall. Fixed a segfault in - * generic/tclInt.h: tailcalls. Tests added. + * generic/tclBasic.c: New unsupported command atProcExit that + * generic/tclCompile.h: shares the implementation with tailcall. + * generic/tclExecute.c: Fixed a segfault in tailcalls. Tests added. + * generic/tclInt.h: * generic/tclInterp.c: * generic/tclNamesp.c: * tests/unsupported.test: @@ -521,9 +538,9 @@ 2008-08-01 Jeff Hobbs - * doc/Exit.3: Do not call Tcl_Finalize implicitly - * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead - * win/tclWin32Dll.c (DllMain): to issues and the user should be + * doc/Exit.3: Do not call Tcl_Finalize implicitly + * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead + * win/tclWin32Dll.c (DllMain): to issues and the user should be explicitly calling Tcl_Finalize before unloading regardless. Clarify the docs to note the explicit need in embedded use. @@ -564,7 +581,7 @@ 2008-07-30 Miguel Sofer - * generic/tclBasic.c: Improved tailcalls. + * generic/tclBasic.c: Improved tailcalls. * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclTest.c: @@ -581,55 +598,53 @@ * tests/NRE.test: New tests that went MIA in the NRE revamping - * generic/tclBasic.c: Clean up + * generic/tclBasic.c: Clean up * generic/tclNRE.h: * generic/tclExecute.c: - * generic/tclBasic.c: Made use of the thread's alloc cache - * generic/tclInt.h: stored in the ekeko at interp creation - * generic/tclNRE.h: to avoid hitting the TSD each time an - * generic/tclThreadAlloc.c: NRE callback is pushed or pulled; the - approach is suitably general to extend to evry other obj - allocation where an interp is know; this is left for some other - time, requires a lot of grunt work. + * generic/tclBasic.c: Made use of the thread's alloc cache stored in + * generic/tclInt.h: the ekeko at interp creation to avoid hitting + * generic/tclNRE.h: the TSD each time an NRE callback is pushed or + * generic/tclThreadAlloc.c: pulled; the approach is suitably general + to extend to every other obj allocation where an interp is know; this + is left for some other time, requires a lot of grunt work. - * generic/tclExecute.c: Fix [Bug 2030670] that cause - TclStackRealloc to panic on rare corner cases. Thx ajpasadyn for - diagnose and patch. + * generic/tclExecute.c: Fix [Bug 2030670] that cause TclStackRealloc + to panic on rare corner cases. Thx ajpasadyn for diagnose and patch. - * generic/tcl.decls: Completely revamped NRE implementation, - * generic/tclBasic.c: with (almost) unchanged API. + * generic/tcl.decls: Completely revamped NRE implementation, with + * generic/tclBasic.c: (almost) unchanged API. * generic/tclCompile.h: - * generic/tclExecute.c: TEBC will require a bit of a facelift, - * generic/tclInt.decls: but TEOV at least looks great now. - * generic/tclInt.h: There are new tests (incomplete!) to verify - * generic/tclInterp.c: that execution is indeed in the same TEBC - * generic/tclNRE.h: instance, at the same level in all stacks - * generic/tclNamesp.c: involved. Tailcalls are still a bit leaky, - * generic/tclOOBasic.c: still deserving to be in tcl::unsupported. + * generic/tclExecute.c: TEBC will require a bit of a facelift, but + * generic/tclInt.decls: TEOV at least looks great now. There are new + * generic/tclInt.h: tests (incomplete!) to verify that execution + * generic/tclInterp.c: is indeed in the same TEBC instance, at the + * generic/tclNRE.h: same level in all stacks involved. Tailcalls + * generic/tclNamesp.c: are still a bit leaky, still deserving to be + * generic/tclOOBasic.c: in tcl::unsupported. * generic/tclOOMethod.c: - * generic/tclProc.c: Uninit'd var warnings in TEBC with -O2, no - * generic/tclTest.c: warnings otherwise. + * generic/tclProc.c: Uninit'd var warnings in TEBC with -O2, no + * generic/tclTest.c: warnings otherwise. 2008-07-28 Jan Nijtmans - * doc/FileSystem.3: CONSTified many functions using - * generic/tcl.decls: Tcl_FileSystem which all are supposed to be - * generic/tclDecls.h: a constant, but this was not reflected - * generic/tclFileSystem.h: in the API: Tcl_FSGetInternalRep, - * generic/tclIOUtil.c: Tcl_FSNewNativePath, Tcl_FSData, - * generic/tclPathObj.c: Tcl_FSRegister, Tcl_FSUnregister, - * generic/tclTest.c: Tcl_FSGetFileSystemForPath ... + * doc/FileSystem.3: CONSTified many functions using + * generic/tcl.decls: Tcl_FileSystem which all are supposed + * generic/tclDecls.h: to be a constant, but this was not + * generic/tclFileSystem.h: reflected in the API: Tcl_FSData, + * generic/tclIOUtil.c: Tcl_FSGetInternalRep, Tcl_FSRegister, + * generic/tclPathObj.c: Tcl_FSNewNativePath, Tcl_FSUnregister, + * generic/tclTest.c: Tcl_FSGetFileSystemForPath ... This change complies with TIP #27. ***POTENTIAL INCOMPATIBILITY*** 2008-07-28 Andreas Kupries - * generic/tclBasic.c: Added missing ref count when creating an - empty string as path (TclEvalEx). In 8.4 the missing code caused - panics in the testsuite. It doesn't in 8.5. I am guessing that the - code path with the missing the incr-refcount is not invoked any - longer. Because the bug in itself is certainly the same. + * generic/tclBasic.c: Added missing ref count when creating an empty + string as path (TclEvalEx). In 8.4 the missing code caused panics in + the testsuite. It doesn't in 8.5. I am guessing that the code path + with the missing the incr-refcount is not invoked any longer. Because + the bug in itself is certainly the same. 2008-07-27 Donal K. Fellows @@ -638,15 +653,15 @@ 2008-07-27 Jan Nijtmans - * doc/Object.3: CONSTified 3 functions using Tcl_ObjType - * doc/ObjectType.3: which all are supposed to be a constant, but - * generic/tcl.decls: this was not reflected in the API: - * generic/tcl.h: Tcl_ConvertToType, Tcl_GetObjType, - * generic/tclDecls.h: Tcl_RegisterObjType - * generic/tclObj.c: Introduced a CONST86_RETURN, so extensions + * doc/Object.3: CONSTified 3 functions using Tcl_ObjType + * doc/ObjectType.3: which all are supposed to be a constant, but + * generic/tcl.decls: this was not reflected in the API: + * generic/tcl.h: Tcl_RegisterObjType, Tcl_ConvertToType, + * generic/tclDecls.h: Tcl_GetObjType + * generic/tclObj.c: Introduced a CONST86_RETURN, so extensions * generic/tclCompCmds.c: which use Tcl_ObjType directly can be * generic/tclOOMethod.c: modified to compile against both Tcl 8.5 and - * generic/tclTestobj.c: Tcl 8.6. tclDecls.h regenerated + * generic/tclTestobj.c: Tcl 8.6. tclDecls.h regenerated This change complies with TIP #27. ***POTENTIAL INCOMPATIBILITY*** @@ -907,9 +922,9 @@ 2008-07-15 Miguel Sofer - * tests/NRE.test: Better constraint for testing the existence of - * tests/stack.test: teststacklimit, to insure that the test suite - runs under tclsh. + * tests/NRE.test: Better constraint for testing the existence of + * tests/stack.test: teststacklimit, to insure that the test suite + runs under tclsh. * generic/tclParse.c: fixing incomplete reversion of "fix" for [Bug 2017583], missing TclResetCancellation call. @@ -1686,17 +1701,17 @@ 2008-04-09 Daniel Steffen - * tests/chanio.test (chan-io-53.8,53.9,53.10): fix typo & quoting for + * tests/chanio.test (chan-io-53.8,53.9,53.10): Fix typo & quoting for * tests/io.test (io-53.8,53.9,53.10): spaces in builddir path 2008-04-08 Miguel Sofer - * generic/tclExecute.c: added comments to the alignment macros used in + * generic/tclExecute.c: Added comments to the alignment macros used in GrowEvaluationStack() and friends. 2008-04-08 Daniel Steffen - * tools/genStubs.tcl: revert erroneous 2008-04-02 change marking + * tools/genStubs.tcl: Revert erroneous 2008-04-02 change marking *StubsPtr as EXTERN instead of extern. * generic/tclDecls.h: make genstubs diff --git a/doc/define.n b/doc/define.n index a1a92bf..ddbf476 100644 --- a/doc/define.n +++ b/doc/define.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: define.n,v 1.1 2008/05/31 11:42:12 dkf Exp $ +'\" RCS: @(#) $Id: define.n,v 1.2 2008/09/23 05:05:47 dkf Exp $ '\" .so man.macros .TH define n 0.3 TclOO "TclOO Commands" @@ -157,6 +157,20 @@ but instead just through the \fBmy\fR command visible in each object's context) by the class being defined. Note that the methods themselves may be actually defined by a superclass; subclass unexports override superclass visibility, and may be overridden by instance unexports. +.TP +\fBvariable\fR ?\fIname ...\fR? +.VS +This arranges for each of the named variables to be automatically made +available in the methods, constructor and destructor declared by the class +being defined. Note that the list of variable names is the whole list of +variable names for the class. Each variable name must not have any namespace +separators and must not look like an array access. All variables will be +actually present in the instance object on which the method is executed. Note +that the variable lists declared by a superclass or subclass are completely +disjoint, as are variable lists declared by instances; the list of variable +names is just for methods (and constructors and destructors) declared by this +class. +.VE .SS "CONFIGURING OBJECTS" .PP The following commands are supported in the \fIdefScript\fR for @@ -233,6 +247,18 @@ This arranges for each of the named methods, \fIname\fR, to be not exported just through the \fBmy\fR command visible in the object's context) by the object being defined. Note that the methods themselves may be actually defined by a class; instance unexports override class visibility. +.TP +\fBvariable\fR ?\fIname ...\fR? +.VS +This arranges for each of the named variables to be automatically made +available in the methods declared by the object being defined. Note that the +list of variable names is the whole list of variable names for the object. +Each variable name must not have any namespace separators and must not look +like an array access. All variables will be actually present in the object on +which the method is executed. Note that the variable lists declared by the +classes and mixins of which the object is an instance are completely disjoint; +the list of variable names is just for methods declared by this object. +.VE .SH EXAMPLES This example demonstrates how to use both forms of the \fBoo::define\fR and \fBoo::objdefine\fR commands (they work in the same way), as well as diff --git a/doc/info.n b/doc/info.n index 0a53823..6200357 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.27 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: info.n,v 1.28 2008/09/23 05:05:47 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -453,6 +453,13 @@ match\fR. .VS 8.6 This subcommand returns a list of direct superclasses of class \fIclass\fR in inheritance precedence order. +.VE 8.6 +.TP +\fBinfo class variables\fI class\fR +.VS 8.6 +This subcommand returns a list of all variables that have been declared for +the class named \Iclass\fR (i.e. that are automatically present in the +class's methods, constructor and destructor). .SS "OBJECT INTROSPECTION" .PP The following \fIsubcommand\fR values are supported by \fBinfo object\fR: @@ -552,12 +559,23 @@ This subcommand returns a list of all classes that have been mixed into the object named \fIobject\fR. .VE 8.6 .TP +\fBinfo object variables\fI object\fR +.VS 8.6 +This subcommand returns a list of all variables that have been declared for +the object named \fIobject\fR (i.e. that are automatically present in the +object's methods). +.VE 8.6 +.TP \fBinfo object vars\fI object\fR ?\fIpattern\fR? .VS 8.6 This subcommand returns a list of all variables in the private namespace of the object named \fIobject\fR. If the optional \fIpattern\fR argument is given, it is a filter (in the syntax of a \fBstring match\fR glob pattern) -that constrains the list of variables returned. +that constrains the list of variables returned. Note that this is different +from the lit returned by \fBinfo object variables\fR; that can include +variables that are currently unset, whereas this can include variables that +are not automatically included by any of \fIobject\fR's methods (or those of +its class, superclasses or mixins). .VE 8.6 .SH EXAMPLES .PP @@ -617,7 +635,7 @@ proc getDef {obj method} { .VE 8.6 .SH "SEE ALSO" .VS 8.6 -global(n), oo::class(n), oo::object(n), proc(n), self(n) +global(n), oo::class(n), oo::define(n), oo::object(n), proc(n), self(n) .VE 8.6 .SH KEYWORDS command, information, interpreter, introspection, level, namespace, diff --git a/generic/tclOO.c b/generic/tclOO.c index b25f070..11a7cbd 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.16 2008/09/01 00:35:42 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.17 2008/09/23 05:05:48 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -38,6 +38,7 @@ static const struct { {"self", TclOODefineSelfObjCmd, 0}, {"superclass", TclOODefineSuperclassObjCmd, 0}, {"unexport", TclOODefineUnexportObjCmd, 0}, + {"variable", TclOODefineVariablesObjCmd, 0}, {NULL, NULL, 0} }, objdefCmds[] = { {"class", TclOODefineClassObjCmd, 1}, @@ -49,6 +50,7 @@ static const struct { {"mixin", TclOODefineMixinObjCmd, 1}, {"renamemethod", TclOODefineRenameMethodObjCmd, 1}, {"unexport", TclOODefineUnexportObjCmd, 1}, + {"variable", TclOODefineVariablesObjCmd, 1}, {NULL, NULL, 0} }; @@ -453,6 +455,7 @@ AllocObject( configNamespace: TclSetNsPath((Namespace *) oPtr->namespacePtr, 1, &fPtr->helpersNs); + TclOOSetupVariableResolver(oPtr->namespacePtr); /* * Suppress use of compiled versions of the commands in this object's @@ -761,7 +764,7 @@ ObjectNamespaceDeleted( FOREACH_HASH_DECLS; Class *clsPtr = oPtr->classPtr, *mixinPtr; Method *mPtr; - Tcl_Obj *filterObj; + Tcl_Obj *filterObj, *variableObj; int i, preserved = !(oPtr->flags & OBJECT_DELETED); /* @@ -808,6 +811,13 @@ ObjectNamespaceDeleted( ckfree((char *) oPtr->methodsPtr); } + FOREACH(variableObj, oPtr->variables) { + Tcl_DecrRefCount(variableObj); + } + if (i) { + ckfree((char *) oPtr->variables.list); + } + if (oPtr->chainCache) { TclOODeleteChainCache(oPtr->chainCache); } @@ -889,6 +899,14 @@ ObjectNamespaceDeleted( Tcl_DeleteHashTable(&clsPtr->classMethods); TclOODelMethodRef(clsPtr->constructorPtr); TclOODelMethodRef(clsPtr->destructorPtr); + + FOREACH(variableObj, clsPtr->variables) { + Tcl_DecrRefCount(variableObj); + } + if (i) { + ckfree((char *) clsPtr->variables.list); + } + DelRef(clsPtr); } diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 77f9970..fe7e8de 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.4 2008/05/31 11:42:18 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.5 2008/09/23 05:05:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1792,6 +1792,100 @@ TclOODefineUnexportObjCmd( return TCL_OK; } +/* + * ---------------------------------------------------------------------- + * + * TclOODefineVariablesObjCmd -- + * Implementation of the "variable" subcommand of the "oo::define" and + * "oo::objdefine" commands. + * + * ---------------------------------------------------------------------- + */ + +int +TclOODefineVariablesObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const *objv) +{ + int isInstanceVars = (clientData != NULL); + Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp); + Tcl_Obj *variableObj; + int i; + + if (oPtr == NULL) { + return TCL_ERROR; + } + if (!isInstanceVars && !oPtr->classPtr) { + Tcl_AppendResult(interp, "attempt to misuse API", NULL); + return TCL_ERROR; + } + + for (i=1 ; iclassPtr->variables) { + Tcl_DecrRefCount(variableObj); + } + if (i != objc-1) { + if (objc == 1) { + ckfree((char *) oPtr->classPtr->variables.list); + } else if (i) { + oPtr->classPtr->variables.list = (Tcl_Obj **) + ckrealloc((char *) oPtr->classPtr->variables.list, + sizeof(Tcl_Obj *) * (objc-1)); + } else { + oPtr->classPtr->variables.list = (Tcl_Obj **) + ckalloc(sizeof(Tcl_Obj *) * (objc-1)); + } + } + if (objc > 1) { + memcpy(oPtr->classPtr->variables.list, objv+1, + sizeof(Tcl_Obj *) * (objc-1)); + } + oPtr->classPtr->variables.num = objc-1; + } else { + FOREACH(variableObj, oPtr->variables) { + Tcl_DecrRefCount(variableObj); + } + if (i != objc-1) { + if (objc == 1) { + ckfree((char *) oPtr->variables.list); + } else if (i) { + oPtr->variables.list = (Tcl_Obj **) + ckrealloc((char *) oPtr->variables.list, + sizeof(Tcl_Obj *) * (objc-1)); + } else { + oPtr->variables.list = (Tcl_Obj **) + ckalloc(sizeof(Tcl_Obj *) * (objc-1)); + } + } + if (objc > 1) { + memcpy(oPtr->variables.list, objv+1, sizeof(Tcl_Obj *)*(objc-1)); + } + oPtr->variables.num = objc-1; + } + return TCL_OK; +} + void Tcl_ClassSetConstructor( Tcl_Interp *interp, diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index bc7b4fb..41d90a4 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.6 2008/08/12 23:19:15 hobbs Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.7 2008/09/23 05:05:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -26,6 +26,7 @@ static Tcl_ObjCmdProc InfoObjectIsACmd; static Tcl_ObjCmdProc InfoObjectMethodsCmd; static Tcl_ObjCmdProc InfoObjectMixinsCmd; static Tcl_ObjCmdProc InfoObjectVarsCmd; +static Tcl_ObjCmdProc InfoObjectVariablesCmd; static Tcl_ObjCmdProc InfoClassConstrCmd; static Tcl_ObjCmdProc InfoClassDefnCmd; static Tcl_ObjCmdProc InfoClassDestrCmd; @@ -36,6 +37,7 @@ static Tcl_ObjCmdProc InfoClassMethodsCmd; static Tcl_ObjCmdProc InfoClassMixinsCmd; static Tcl_ObjCmdProc InfoClassSubsCmd; static Tcl_ObjCmdProc InfoClassSupersCmd; +static Tcl_ObjCmdProc InfoClassVariablesCmd; struct NameProcMap { const char *name; Tcl_ObjCmdProc *proc; }; @@ -51,6 +53,7 @@ static const struct NameProcMap infoObjectCmds[] = { {"::oo::InfoObject::isa", InfoObjectIsACmd}, {"::oo::InfoObject::methods", InfoObjectMethodsCmd}, {"::oo::InfoObject::mixins", InfoObjectMixinsCmd}, + {"::oo::InfoObject::variables", InfoObjectVariablesCmd}, {"::oo::InfoObject::vars", InfoObjectVarsCmd}, {NULL, NULL} }; @@ -70,6 +73,7 @@ static const struct NameProcMap infoClassCmds[] = { {"::oo::InfoClass::mixins", InfoClassMixinsCmd}, {"::oo::InfoClass::subclasses", InfoClassSubsCmd}, {"::oo::InfoClass::superclasses", InfoClassSupersCmd}, + {"::oo::InfoClass::variables", InfoClassVariablesCmd}, {NULL, NULL} }; @@ -268,18 +272,8 @@ InfoObjectDefnCmd( } } Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); - - /* - * This is copied from the [info body] implementation. See the comments - * there for why this copy has to be done here. - */ - - if (procPtr->bodyPtr->bytes == NULL) { - (void) Tcl_GetString(procPtr->bodyPtr); - } Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj(procPtr->bodyPtr->bytes, - procPtr->bodyPtr->length)); + TclOOGetMethodBody(Tcl_GetHashValue(hPtr))); return TCL_OK; } @@ -617,6 +611,42 @@ InfoObjectMixinsCmd( /* * ---------------------------------------------------------------------- * + * InfoObjectVariablesCmd -- + * + * Implements [info object variables $objName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectVariablesCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Tcl_Obj *variableObj; + int i; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "objName"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + FOREACH(variableObj, oPtr->variables) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), variableObj); + } + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * * InfoObjectVarsCmd -- * * Implements [info object vars $objName ?$pattern?] @@ -739,12 +769,8 @@ InfoClassConstrCmd( } } Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); - if (procPtr->bodyPtr->bytes == NULL) { - (void) Tcl_GetString(procPtr->bodyPtr); - } Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj(procPtr->bodyPtr->bytes, - procPtr->bodyPtr->length)); + TclOOGetMethodBody(clsPtr->constructorPtr)); return TCL_OK; } @@ -816,12 +842,8 @@ InfoClassDefnCmd( } } Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); - if (procPtr->bodyPtr->bytes == NULL) { - (void) Tcl_GetString(procPtr->bodyPtr); - } Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj(procPtr->bodyPtr->bytes, - procPtr->bodyPtr->length)); + TclOOGetMethodBody(Tcl_GetHashValue(hPtr))); return TCL_OK; } @@ -871,12 +893,7 @@ InfoClassDestrCmd( return TCL_ERROR; } - if (procPtr->bodyPtr->bytes == NULL) { - (void) Tcl_GetString(procPtr->bodyPtr); - } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj(procPtr->bodyPtr->bytes, - procPtr->bodyPtr->length)); + Tcl_SetObjResult(interp, TclOOGetMethodBody(clsPtr->destructorPtr)); return TCL_OK; } @@ -1263,6 +1280,49 @@ InfoClassSupersCmd( } /* + * ---------------------------------------------------------------------- + * + * InfoClassVariablesCmd -- + * + * Implements [info class variables $clsName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassVariablesCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Class *clsPtr; + Tcl_Obj *variableObj; + int i; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "className"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), + "\" is not a class", NULL); + return TCL_ERROR; + } + clsPtr = oPtr->classPtr; + + FOREACH(variableObj, clsPtr->variables) { + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), variableObj); + } + return TCL_OK; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 056091d..dbd7df2 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.7 2008/08/23 18:53:11 msofer Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.8 2008/09/23 05:05:54 dkf Exp $ */ #include @@ -175,6 +175,7 @@ typedef struct Object { Tcl_ObjectMapMethodNameProc mapMethodNameProc; /* Function to allow remapping of method * names. For itcl-ng. */ + LIST_STATIC(Tcl_Obj *) variables; } Object; #define OBJECT_DELETED 1 /* Flag to say that an object has been @@ -248,6 +249,7 @@ typedef struct Class { * object doesn't override with its own mixins * (and filters and method implementations for * when getting method chains). */ + LIST_STATIC(Tcl_Obj *) variables; } Class; /* @@ -422,6 +424,9 @@ MODULE_SCOPE int TclOODefineSuperclassObjCmd(ClientData clientData, MODULE_SCOPE int TclOODefineUnexportObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); +MODULE_SCOPE int TclOODefineVariablesObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); MODULE_SCOPE int TclOODefineClassObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); @@ -492,6 +497,7 @@ MODULE_SCOPE CallContext *TclOOGetCallContext(Object *oPtr, MODULE_SCOPE Foundation *TclOOGetFoundation(Tcl_Interp *interp); MODULE_SCOPE Tcl_Obj * TclOOGetFwdFromMethod(Method *mPtr); MODULE_SCOPE Proc * TclOOGetProcFromMethod(Method *mPtr); +MODULE_SCOPE Tcl_Obj * TclOOGetMethodBody(Method *mPtr); MODULE_SCOPE int TclOOGetSortedClassMethodList(Class *clsPtr, int flags, const char ***stringsPtr); MODULE_SCOPE int TclOOGetSortedMethodList(Object *oPtr, int flags, @@ -514,6 +520,7 @@ MODULE_SCOPE void TclOORemoveFromSubclasses(Class *subPtr, Class *superPtr); MODULE_SCOPE void TclOOStashContext(Tcl_Obj *objPtr, CallContext *contextPtr); +MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr); /* * Include all the private API, generated from tclOO.decls. diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 5371719..dfd2d14 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.18 2008/09/01 00:35:42 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.19 2008/09/23 05:05:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -18,6 +18,12 @@ #include "tclOOInt.h" #include "tclCompile.h" +#if 0 +#define DBPRINT(format, ...) (fprintf(stderr, "DEBUG:" format "\n", __VA_ARGS__)) +#else +#define DBPRINT(format, ...) ((void) 0) +#endif + /* * Structure used to help delay computing names of objects or classes for * [info frame] until needed, making invokation faster in the normal case. @@ -46,6 +52,20 @@ typedef struct { } PMFrameData; /* + * Structure used to pass information about variable resolution to the + * on-the-ground resolvers used when working with resolved compiled variables. + */ + +typedef struct { + Tcl_ResolvedVarInfo info; /* "Type" information so that the compiled + * variable can be linked to the namespace + * variable at the right time. */ + Tcl_Obj *variableObj; /* The name of the variable. */ + Tcl_Var cachedObjectVar; /* TODO: When to flush this cache? Can class + * variables be cached? */ +} OOResVarInfo; + +/* * Function declarations for things defined in this file. */ @@ -81,6 +101,13 @@ static int InvokeForwardMethod(ClientData clientData, static void DeleteForwardMethod(ClientData clientData); static int CloneForwardMethod(Tcl_Interp *interp, ClientData clientData, ClientData *newClientData); +static int ProcedureMethodVarResolver(Tcl_Interp *interp, + const char *varName, Tcl_Namespace *contextNs, + int flags, Tcl_Var *varPtr); +static int ProcedureMethodCompiledVarResolver(Tcl_Interp *interp, + const char *varName, int length, + Tcl_Namespace *contextNs, + Tcl_ResolvedVarInfo **rPtrPtr); /* * The types of methods defined by the core OO system. @@ -94,6 +121,15 @@ static const Tcl_MethodType fwdMethodType = { TCL_OO_METHOD_VERSION_CURRENT, "forward", InvokeForwardMethod, DeleteForwardMethod, CloneForwardMethod }; + +/* + * Helper macros (derived from things private to tclVar.c) + */ + +#define TclVarTable(contextNs) \ + ((Tcl_HashTable *) (&((Namespace *) (contextNs))->varTable)) +#define TclVarHashGetValue(hPtr) \ + ((Tcl_Var) ((char *)hPtr - TclOffset(VarInHash, entry))) /* * ---------------------------------------------------------------------- @@ -319,6 +355,7 @@ TclOONewProcInstanceMethod( pmPtr->version = TCLOO_PROCEDURE_METHOD_VERSION; pmPtr->flags = flags & USE_DECLARER_NS; pmPtr->refCount = 1; + method = TclOOMakeProcInstanceMethod(interp, oPtr, flags, nameObj, argsObj, bodyObj, &procMethodType, pmPtr, &pmPtr->procPtr); if (method == NULL) { @@ -380,9 +417,8 @@ TclOONewProcMethod( pmPtr->flags = flags & USE_DECLARER_NS; pmPtr->refCount = 1; - method = TclOOMakeProcMethod(interp, clsPtr, flags, nameObj, - procName, argsObj, bodyObj, &procMethodType, pmPtr, - &pmPtr->procPtr); + method = TclOOMakeProcMethod(interp, clsPtr, flags, nameObj, procName, + argsObj, bodyObj, &procMethodType, pmPtr, &pmPtr->procPtr); if (argsLen == -1) { Tcl_DecrRefCount(argsObj); @@ -866,6 +902,213 @@ PushMethodCallFrame( /* * ---------------------------------------------------------------------- * + * TclOOSetupVariableResolver, etc. -- + * + * Variable resolution engine used to connect declared variables to local + * variables used in methods. The compiled variable resolver is more + * important, but both are needed as it is possible to have a variable + * that is only referred to in ways that aren't compilable and we can't + * force LVT presence. [TIP #320] + * + * ---------------------------------------------------------------------- + */ + +void +TclOOSetupVariableResolver( + Tcl_Namespace *nsPtr) +{ + Tcl_ResolverInfo info; + + Tcl_GetNamespaceResolvers(nsPtr, &info); + if (info.compiledVarResProc == NULL) { + Tcl_SetNamespaceResolvers(nsPtr, NULL, ProcedureMethodVarResolver, + ProcedureMethodCompiledVarResolver); + } +} + +static int +ProcedureMethodVarResolver( + Tcl_Interp *interp, + const char *varName, + Tcl_Namespace *contextNs, + int flags, + Tcl_Var *varPtr) +{ + Interp *iPtr = (Interp *) interp; + CallFrame *framePtr = iPtr->varFramePtr; + CallContext *contextPtr; + Tcl_Obj *variableObj; + Tcl_HashEntry *hPtr; + int i, isNew; + + /* + * Check that the variable is being requested in a context that is also a + * method call; if not (i.e. we're evaluating in the object's namespace or + * in a procedure of that namespace) then we do nothing. + */ + + if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) { + return TCL_CONTINUE; + } + contextPtr = framePtr->clientData; + + /* + * Check if the variable is one we want to resolve at all (i.e. whether it + * is in the list provided by the user). If not, we mustn't do anything + * either. + */ + + if (contextPtr->callPtr->chain[contextPtr->index] + .mPtr->declaringClassPtr != NULL) { + FOREACH(variableObj, contextPtr->callPtr->chain[contextPtr->index] + .mPtr->declaringClassPtr->variables) { + if (!strcmp(Tcl_GetString(variableObj), varName)) { + goto gotMatch; + } + } + } else { + FOREACH(variableObj, contextPtr->oPtr->variables) { + if (!strcmp(Tcl_GetString(variableObj), varName)) { + goto gotMatch; + } + } + } + return TCL_CONTINUE; + + /* + * It is a variable we want to resolve, so resolve it. + */ + + gotMatch: + hPtr = Tcl_CreateHashEntry(TclVarTable(contextNs), (char *) variableObj, + &isNew); + if (isNew) { + TclSetVarNamespaceVar((Var *) TclVarHashGetValue(hPtr)); + } + *varPtr = TclVarHashGetValue(hPtr); + return TCL_OK; +} + +static Tcl_Var +ProcedureMethodCompiledVarConnect( + Tcl_Interp *interp, + Tcl_ResolvedVarInfo *rPtr) +{ + OOResVarInfo *infoPtr = (OOResVarInfo *) rPtr; + Interp *iPtr = (Interp *) interp; + CallFrame *framePtr = iPtr->varFramePtr; + CallContext *contextPtr; + Tcl_Obj *variableObj; + Tcl_HashEntry *hPtr; + int i, isNew, cacheIt; + const char *varName = Tcl_GetString(infoPtr->variableObj); + + /* + * Check that the variable is being requested in a context that is also a + * method call; if not (i.e. we're evaluating in the object's namespace or + * in a procedure of that namespace) then we do nothing. + */ + + if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) { + return NULL; + } + contextPtr = framePtr->clientData; + + /* + * If we've done the work before (in a comparable context) then reuse that + * rather than performing resolution ourselves. + */ + + if (infoPtr->cachedObjectVar) { + return infoPtr->cachedObjectVar; + } + + /* + * Check if the variable is one we want to resolve at all (i.e. whether it + * is in the list provided by the user). If not, we mustn't do anything + * either. + */ + + if (contextPtr->callPtr->chain[contextPtr->index] + .mPtr->declaringClassPtr != NULL) { + FOREACH(variableObj, contextPtr->callPtr->chain[contextPtr->index] + .mPtr->declaringClassPtr->variables) { + if (!strcmp(Tcl_GetString(variableObj), varName)) { + cacheIt = 0; + goto gotMatch; + } + } + } else { + FOREACH(variableObj, contextPtr->oPtr->variables) { + if (!strcmp(Tcl_GetString(variableObj), varName)) { + cacheIt = 1; + goto gotMatch; + } + } + } + return NULL; + + /* + * It is a variable we want to resolve, so resolve it. + */ + + gotMatch: + hPtr = Tcl_CreateHashEntry(TclVarTable(contextPtr->oPtr->namespacePtr), + (char *) variableObj, &isNew); + if (isNew) { + TclSetVarNamespaceVar((Var *) TclVarHashGetValue(hPtr)); + } + if (cacheIt) { + infoPtr->cachedObjectVar = TclVarHashGetValue(hPtr); + } + return TclVarHashGetValue(hPtr); +} + +static void +ProcedureMethodCompiledVarDelete( + Tcl_ResolvedVarInfo *rPtr) +{ + OOResVarInfo *infoPtr = (OOResVarInfo *) rPtr; + + Tcl_DecrRefCount(infoPtr->variableObj); + ckfree((char *) infoPtr); +} + +static int +ProcedureMethodCompiledVarResolver( + Tcl_Interp *interp, + const char *varName, + int length, + Tcl_Namespace *contextNs, + Tcl_ResolvedVarInfo **rPtrPtr) +{ + OOResVarInfo *infoPtr; + Tcl_Obj *variableObj = Tcl_NewStringObj(varName, length); + + /* + * Do not create resolvers for cases that contain namespace separators or + * which look like array accesses. Both will lead us astray. + */ + + if (strstr(Tcl_GetString(variableObj), "::") != NULL || + Tcl_StringMatch(Tcl_GetString(variableObj), "*(*)")) { + Tcl_DecrRefCount(variableObj); + return TCL_CONTINUE; + } + + infoPtr = (OOResVarInfo *) ckalloc(sizeof(OOResVarInfo)); + infoPtr->info.fetchProc = ProcedureMethodCompiledVarConnect; + infoPtr->info.deleteProc = ProcedureMethodCompiledVarDelete; + infoPtr->cachedObjectVar = NULL; + infoPtr->variableObj = variableObj; + Tcl_IncrRefCount(variableObj); + *rPtrPtr = &infoPtr->info; + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * * RenderDeclarerName -- * * Returns the name of the entity (object or class) which declared a @@ -1244,6 +1487,21 @@ TclOOGetProcFromMethod( } Tcl_Obj * +TclOOGetMethodBody( + Method *mPtr) +{ + if (mPtr->typePtr == &procMethodType) { + ProcedureMethod *pmPtr = mPtr->clientData; + + if (pmPtr->procPtr->bodyPtr->bytes == NULL) { + (void) Tcl_GetString(pmPtr->procPtr->bodyPtr); + } + return pmPtr->procPtr->bodyPtr; + } + return NULL; +} + +Tcl_Obj * TclOOGetFwdFromMethod( Method *mPtr) { diff --git a/tests/oo.test b/tests/oo.test index 3575511..5b261f7 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.11 2008/08/20 15:41:26 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.12 2008/09/23 05:05:54 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1123,7 +1123,7 @@ test oo-16.2 {OO: object introspection} -body { } -returnCodes 1 -result {NOTANOBJECT does not refer to an object} test oo-16.3 {OO: object introspection} -body { info object gorp oo::object -} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, or vars} +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, variables, or vars} test oo-16.4 {OO: object introspection} -setup { oo::class create meta { superclass oo::class } [meta create instance1] create instance2 @@ -1228,7 +1228,7 @@ test oo-17.3 {OO: class introspection} -setup { } -result {"foo" is not a class} test oo-17.4 {OO: class introspection} -body { info class gorp oo::object -} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be constructor, definition, destructor, filters, forward, instances, methods, mixins, subclasses, or superclasses} +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be constructor, definition, destructor, filters, forward, instances, methods, mixins, subclasses, superclasses, or variables} test oo-17.5 {OO: class introspection} -setup { oo::class create testClass } -body { @@ -1830,6 +1830,193 @@ test oo-26.3 {Bug 2037727} -setup { example destroy } -result {{} nonempty} +test oo-26.1 {variables declaration - class introspection} -setup { + oo::class create foo +} -cleanup { + foo destroy +} -body { + oo::define foo variable a b c + info class variables foo +} -result {a b c} +test oo-26.2 {variables declaration - object introspection} -setup { + oo::object create foo +} -cleanup { + foo destroy +} -body { + oo::objdefine foo variable a b c + info object variables foo +} -result {a b c} +test oo-26.3 {variables declaration - basic behaviour} -setup { + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create foo { + superclass master + variable x! + constructor {} {set x! 1} + method y {} {incr x!} + } + foo create bar + bar y + bar y +} -result 3 +test oo-26.4 {variables declaration - destructors too} -setup { + oo::class create master + set result bad! +} -cleanup { + master destroy +} -body { + oo::class create foo { + superclass master + variable x! + constructor {} {set x! 1} + method y {} {incr x!} + destructor {set ::result ${x!}} + } + foo create bar + bar y + bar y + bar destroy + return $result +} -result 3 +test oo-26.5 {variables declaration - object-bound variables} -setup { + oo::object create foo +} -cleanup { + foo destroy +} -body { + oo::objdefine foo { + variable x! + method y {} {incr x!} + } + foo y + foo y +} -result 2 +test oo-26.6 {variables declaration - non-interference of levels} -setup { + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create foo { + superclass master + variable x! + constructor {} {set x! 1} + method y {} {incr x!} + } + foo create bar + oo::objdefine bar { + variable y! + method y {} {list [next] [incr y!] [info var] [info local]} + export eval + } + bar y + list [bar y] [lsort [info object vars bar]] [bar eval {info vars *!}] +} -result {{3 2 y! {}} {x! y!} {x! y!}} +test oo-26.7 {variables declaration - one underlying variable space} -setup { + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create foo { + superclass master + variable x! + constructor {} {set x! 1} + method y {} {incr x!} + } + oo::class create foo2 { + superclass foo + variable y! + constructor {} {set y! 42; next} + method x {} {incr y! -1} + } + foo2 create bar + oo::objdefine bar { + variable x! y! + method z {} {list ${x!} ${y!}} + } + bar y + bar x + list [bar y] [bar x] [bar z] +} -result {3 40 {3 40}} +test oo-26.8 {variables declaration - error cases - ns separators} -body { + oo::define oo::object variable bad::var +} -returnCodes error -result {invalid declared variable name "bad::var": must not contain namespace separators} +test oo-26.9 {variables declaration - error cases - arrays} -body { + oo::define oo::object variable bad(var) +} -returnCodes error -result {invalid declared variable name "bad(var)": must not refer to an array element} +test oo-26.10 {variables declaration - no instance var leaks with class resolvers} -setup { + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create foo { + superclass master + variable clsvar + constructor {} { + set clsvar 0 + } + method step {} { + incr clsvar + return + } + method value {} { + return $clsvar + } + } + foo create inst1 + inst1 step + foo create inst2 + inst2 step + inst1 step + inst2 step + inst1 step + list [inst1 value] [inst2 value] +} -result {3 2} +test oo-26.11 {variables declaration - no instance var leaks with class resolvers} -setup { + oo::class create master +} -cleanup { + master destroy +} -body { + oo::class create foo { + superclass master + variable clsvar + constructor {} { + set clsvar 0 + } + method step {} { + incr clsvar + return + } + method value {} { + return $clsvar + } + } + foo create inst1 + oo::objdefine inst1 { + variable clsvar + method reinit {} { + set clsvar 0 + } + } + foo create inst2 + oo::objdefine inst2 { + variable clsvar + method reinit {} { + set clsvar 0 + } + } + inst1 step + inst2 step + inst1 reinit + inst2 reinit + inst1 step + inst2 step + inst1 step + inst2 step + inst1 step + list [inst1 value] [inst2 value] +} -result {3 2} + cleanupTests return -- cgit v0.12 From 93cc89e95b9f7beacfffdc354a2096d7dcb96bd5 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 23 Sep 2008 13:22:09 +0000 Subject: Fix [Bug 2118123] --- ChangeLog | 6 ++++++ doc/lreverse.n | 7 +++++-- doc/mathop.n | 7 +++++-- doc/regexp.n | 6 ++++-- doc/regsub.n | 6 ++++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8eea436..8b5058b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-23 Donal K. Fellows + + * doc/lreverse.n, mathop.n, regexp.n, regsub.n: Make sure that the + initial line of the manpage includes nothing that chokes old versions + of man. [Bug 2118123] + 2008-09-22 Donal K. Fellows TIP #320 IMPLEMENTATION diff --git a/doc/lreverse.n b/doc/lreverse.n index b9996a4..efda2a5 100644 --- a/doc/lreverse.n +++ b/doc/lreverse.n @@ -1,10 +1,10 @@ -'\" -*- nroff -*- +'\" '\" Copyright (c) 2006 by Donal K. Fellows. All rights reserved. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lreverse.n,v 1.6 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: lreverse.n,v 1.7 2008/09/23 13:22:16 dkf Exp $ '\" .so man.macros .TH lreverse n 8.5 Tcl "Tcl Built-In Commands" @@ -31,3 +31,6 @@ list(n), lsearch(n), lsort(n) .SH KEYWORDS element, list, reverse +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/mathop.n b/doc/mathop.n index d65b236..9210430 100644 --- a/doc/mathop.n +++ b/doc/mathop.n @@ -1,10 +1,10 @@ -.\" -*- nroff -*- +.\" .\" Copyright (c) 2006-2007 Donal K. Fellows. .\" .\" See the file "license.terms" for information on usage and redistribution .\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. .\" -.\" RCS: @(#) $Id: mathop.n,v 1.10 2007/12/13 15:22:32 dgp Exp $ +.\" RCS: @(#) $Id: mathop.n,v 1.11 2008/09/23 13:22:18 dkf Exp $ .\" .so man.macros .TH mathop n 8.5 Tcl "Tcl Mathematical Operator Commands" @@ -298,3 +298,6 @@ set sorted [\fB<=\fR {*}$list] expr(n), mathfunc(n), namespace(n) .SH KEYWORDS command, expression, operator +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/regexp.n b/doc/regexp.n index e40b9c4..7da20eb 100644 --- a/doc/regexp.n +++ b/doc/regexp.n @@ -1,11 +1,10 @@ -'\" -*- nroff -*- '\" '\" Copyright (c) 1998 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: regexp.n,v 1.30 2008/07/07 08:29:14 dkf Exp $ +'\" RCS: @(#) $Id: regexp.n,v 1.31 2008/09/23 13:22:18 dkf Exp $ '\" .so man.macros .TH regexp n 8.3 Tcl "Tcl Built-In Commands" @@ -196,3 +195,6 @@ characters) in a string, and is useful as a more powerful version of the re_syntax(n), regsub(n), string(n) .SH KEYWORDS match, parsing, pattern, regular expression, splitting, string +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/regsub.n b/doc/regsub.n index 5686c1d..f3371e6 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -1,4 +1,3 @@ -'\" -*- nroff -*- '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -7,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.24 2008/07/07 08:29:14 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.25 2008/09/23 13:22:18 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -182,3 +181,6 @@ set quoted [subst [\fBregsub\fR -all $RE $string $substitution]] regexp(n), re_syntax(n), subst(n), string(n) .SH KEYWORDS match, pattern, quoting, regular expression, substitute +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 248065d3dd60aa512d6ec1ab9b4229b05af916b0 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 23 Sep 2008 14:27:19 +0000 Subject: Apply [Patch 2082450] --- ChangeLog | 2 ++ doc/Method.3 | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b5058b..8a6038c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-09-23 Donal K. Fellows + * doc/Method.3: Corrected documentation. [Patch 2082450] + * doc/lreverse.n, mathop.n, regexp.n, regsub.n: Make sure that the initial line of the manpage includes nothing that chokes old versions of man. [Bug 2118123] diff --git a/doc/Method.3 b/doc/Method.3 index a3a1af1..be7bab5 100644 --- a/doc/Method.3 +++ b/doc/Method.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Method.3,v 1.2 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Method.3,v 1.3 2008/09/23 14:27:25 dkf Exp $ '\" .so man.macros .TH Tcl_Method 3 0.1 TclOO "TclOO Library Functions" @@ -24,9 +24,9 @@ Tcl_Method \fBTcl_NewInstanceMethod\fR(\fIinterp, object, nameObj, isPublic, methodTypePtr, clientData\fR) .sp -\fBTcl_ClassSetConstructor\fR(\fIclass, method\fR) +\fBTcl_ClassSetConstructor\fR(\fIinterp, class, method\fR) .sp -\fBTcl_ClassSetDestructor\fR(\fIclass, method\fR) +\fBTcl_ClassSetDestructor\fR(\fIinterp, class, method\fR) .sp Tcl_Class \fBTcl_MethodDeclarerClass\fR(\fImethod\fR) @@ -113,8 +113,9 @@ assigning the per-method \fIclientData\fR to the variable pointed to by \fIclientDataPtr\fR if (that is non-NULL) if the type is matched. .SS "METHOD CREATION" .PP -Methods are created by \fBTcl_NewMethod\fR and \fBTcl_NewClassMethod\fR, which -create a method attached to an object or a class respectively. In both cases, +Methods are created by \fBTcl_NewMethod\fR and \fBTcl_NewInstanceMethod\fR, +which +create a method attached to a class or an object respectively. In both cases, the \fInameObj\fR argument gives the name of the method to create, the \fIisPublic\fR argument states whether the method should be exported initially, the \fImethodTypePtr\fR argument describes the implementation of @@ -122,7 +123,7 @@ the method (see the \fBMETHOD TYPES\fR section below) and the \fIclientData\fR argument gives some implementation-specific data that is passed on to the implementation of the method when it is called. .PP -When the \fInameObj\fR argument to \fBTcl_NewClassMethod\fR is NULL, an +When the \fInameObj\fR argument to \fBTcl_NewMethod\fR is NULL, an unnamed method is created, which is used for constructors and destructors. Constructors should be installed into their class using the \fBTcl_ClassSetConstructor\fR function, and destructors (which must not @@ -219,7 +220,7 @@ typedef void \fBTcl_MethodDeleteProc\fR( .PP The \fIclientData\fR argument to a Tcl_MethodDeleteProc will be the same as the value passed to the \fIclientData\fR argument to \fBTcl_NewMethod\fR or -\fBTcl_NewClassMethod\fR when the method was created. +\fBTcl_NewInstanceMethod\fR when the method was created. .SS "TCL_CLONEPROC FUNCTION SIGNATURE" .PP Functions matching this signature are used to copy a method when the object or -- cgit v0.12 From ecb1cd56121d11f50f3eaab72ffc83bcc7483749 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Sep 2008 09:41:08 +0000 Subject: Implement TIP #316. --- ChangeLog | 7 + doc/FileSystem.3 | 555 ++++++++++++++++++++++++++++---------------------- generic/tcl.decls | 43 +++- generic/tclDecls.h | 143 ++++++++++++- generic/tclFileName.c | 111 +++++++++- generic/tclStubInit.c | 15 +- 6 files changed, 630 insertions(+), 244 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a6038c..e67c879 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-24 Donal K. Fellows + + TIP #316 IMPLEMENTATION + + * generic/tcl.decls, generic/tclFileName.c (Tcl_GetSizeFromStat, etc): + * doc/FileSystem.3: Added reader functions for Tcl_StatBuf. + 2008-09-23 Donal K. Fellows * doc/Method.3: Corrected documentation. [Patch 2082450] diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index 9201d00..eef980b 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -1,16 +1,17 @@ '\" '\" Copyright (c) 2001 Vincent Darley +'\" Copyright (c) 2008 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.64 2008/07/28 21:31:13 nijtmans Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.65 2008/09/24 09:41:12 dkf Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_FSRegister, Tcl_FSUnregister, Tcl_FSData, Tcl_FSMountsChanged, Tcl_FSGetFileSystemForPath, Tcl_FSGetPathType, Tcl_FSCopyFile, Tcl_FSCopyDirectory, Tcl_FSCreateDirectory, Tcl_FSDeleteFile, Tcl_FSRemoveDirectory, Tcl_FSRenameFile, Tcl_FSListVolumes, Tcl_FSEvalFile, Tcl_FSEvalFileEx, Tcl_FSLoadFile, Tcl_FSMatchInDirectory, Tcl_FSLink, Tcl_FSLstat, Tcl_FSUtime, Tcl_FSFileAttrsGet, Tcl_FSFileAttrsSet, Tcl_FSFileAttrStrings, Tcl_FSStat, Tcl_FSAccess, Tcl_FSOpenFileChannel, Tcl_FSGetCwd, Tcl_FSChdir, Tcl_FSPathSeparator, Tcl_FSJoinPath, Tcl_FSSplitPath, Tcl_FSEqualPaths, Tcl_FSGetNormalizedPath, Tcl_FSJoinToPath, Tcl_FSConvertToPathType, Tcl_FSGetInternalRep, Tcl_FSGetTranslatedPath, Tcl_FSGetTranslatedStringPath, Tcl_FSNewNativePath, Tcl_FSGetNativePath, Tcl_FSFileSystemInfo, Tcl_AllocStatBuf \- procedures to interact with any filesystem +Tcl_FSRegister, Tcl_FSUnregister, Tcl_FSData, Tcl_FSMountsChanged, Tcl_FSGetFileSystemForPath, Tcl_FSGetPathType, Tcl_FSCopyFile, Tcl_FSCopyDirectory, Tcl_FSCreateDirectory, Tcl_FSDeleteFile, Tcl_FSRemoveDirectory, Tcl_FSRenameFile, Tcl_FSListVolumes, Tcl_FSEvalFile, Tcl_FSEvalFileEx, Tcl_FSLoadFile, Tcl_FSMatchInDirectory, Tcl_FSLink, Tcl_FSLstat, Tcl_FSUtime, Tcl_FSFileAttrsGet, Tcl_FSFileAttrsSet, Tcl_FSFileAttrStrings, Tcl_FSStat, Tcl_FSAccess, Tcl_FSOpenFileChannel, Tcl_FSGetCwd, Tcl_FSChdir, Tcl_FSPathSeparator, Tcl_FSJoinPath, Tcl_FSSplitPath, Tcl_FSEqualPaths, Tcl_FSGetNormalizedPath, Tcl_FSJoinToPath, Tcl_FSConvertToPathType, Tcl_FSGetInternalRep, Tcl_FSGetTranslatedPath, Tcl_FSGetTranslatedStringPath, Tcl_FSNewNativePath, Tcl_FSGetNativePath, Tcl_FSFileSystemInfo, Tcl_GetAccessTimeFromStat, Tcl_GetBlockSizeFromStat, Tcl_GetBlocksFromStat, Tcl_GetChangeTimeFromStat, Tcl_GetDeviceTypeFromStat, Tcl_GetFSDeviceFromStat, Tcl_GetFSInodeFromStat, Tcl_GetGroupIdFromStat, Tcl_GetLinkCountFromStat, Tcl_GetModeFromStat, Tcl_GetModificationTimeFromStat, Tcl_GetSizeFromStat, Tcl_GetUserIdFromStat, Tcl_AllocStatBuf \- procedures to interact with any filesystem .SH SYNOPSIS .nf \fB#include \fR @@ -141,14 +142,55 @@ Tcl_Obj * .sp Tcl_StatBuf * \fBTcl_AllocStatBuf\fR() +.sp +.VS 8.6 +Tcl_WideInt +\fBTcl_GetAccessTimeFromStat\fR(\fIstatPtr\fR) +.sp +unsigned +\fBTcl_GetBlockSizeFromStat\fR(\fIstatPtr\fR) +.sp +Tcl_WideUInt +\fBTcl_GetBlocksFromStat\fR(\fIstatPtr\fR) +.sp +Tcl_WideInt +\fBTcl_GetChangeTimeFromStat\fR(\fIstatPtr\fR) +.sp +int +\fBTcl_GetDeviceTypeFromStat\fR(\fIstatPtr\fR) +.sp +unsigned +\fBTcl_GetFSDeviceFromStat\fR(\fIstatPtr\fR) +.sp +unsigned +\fBTcl_GetFSInodeFromStat\fR(\fIstatPtr\fR) +.sp +int +\fBTcl_GetGroupIdFromStat\fR(\fIstatPtr\fR) +.sp +int +\fBTcl_GetLinkCountFromStat\fR(\fIstatPtr\fR) +.sp +unsigned +\fBTcl_GetModeFromStat\fR(\fIstatPtr\fR) +.sp +Tcl_WideInt +\fBTcl_GetModificationTimeFromStat\fR(\fIstatPtr\fR) +.sp +Tcl_WideUInt +\fBTcl_GetSizeFromStat\fR(\fIstatPtr\fR) +.sp +int +\fBTcl_GetUserIdFromStat\fR(\fIstatPtr\fR) +.VE 8.6 .SH ARGUMENTS -.AS Tcl_FSUnloadFileProc **unloadProcPtr out +.AS Tcl_GlobTypeData **srcPathPtr out .AP "const Tcl_Filesystem" *fsPtr in Points to a structure containing the addresses of procedures that can be called to perform the various filesystem operations. .AP Tcl_Obj *pathPtr in The path represented by this object is used for the operation in -question. If the object does not already have an internal \fBpath\fR +question. If the object does not already have an internal \fBpath\fR representation, it will be converted to have one. .AP Tcl_Obj *srcPathPtr in As for \fIpathPtr\fR, but used for the source file for a copy or @@ -163,23 +205,23 @@ file identified by \fIpathPtr\fR and to be evaluted. Only files or directories matching this pattern will be returned. .AP Tcl_GlobTypeData *types in Only files or directories matching the type descriptions contained in -this structure will be returned. This parameter may be NULL. +this structure will be returned. This parameter may be NULL. .AP Tcl_Interp *interp in Interpreter to use either for results, evaluation, or reporting error messages. .AP ClientData clientData in The native description of the path object to create. .AP Tcl_Obj *firstPtr in -The first of two path objects to compare. The object may be converted +The first of two path objects to compare. The object may be converted to \fBpath\fR type. .AP Tcl_Obj *secondPtr in -The second of two path objects to compare. The object may be converted +The second of two path objects to compare. The object may be converted to \fBpath\fR type. .AP Tcl_Obj *listObj in The list of path elements to operate on with a \fBjoin\fR operation. .AP int elements in If non-negative, the number of elements in the \fIlistObj\fR which should -be joined together. If negative, then all elements are joined. +be joined together. If negative, then all elements are joined. .AP Tcl_Obj **errorPtr out In the case of an error, filled with an object containing the name of the file which caused an error in the various copy/rename operations. @@ -190,9 +232,9 @@ Pre-allocated object in which to store (using \fBTcl_ListObjAppendElement\fR) the list of files or directories which are successfully matched. .AP int mode in -Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK, +Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK, W_OK and X_OK request checking whether the file exists and has read, -write and execute permissions, respectively. F_OK just requests +write and execute permissions, respectively. F_OK just requests checking for the existence of the file. .AP Tcl_StatBuf *statPtr out The structure that contains the result of a stat or lstat operation. @@ -215,15 +257,15 @@ Filled with the function to use to unload this piece of code. The access and modification times in this structure are read and used to set those values for a given file. .AP "const char" *modeString in -Specifies how the file is to be accessed. May have any of the values +Specifies how the file is to be accessed. May have any of the values allowed for the \fImode\fR argument to the Tcl \fBopen\fR command. .AP int permissions in -POSIX-style permission flags such as 0644. If a new file is created, these +POSIX-style permission flags such as 0644. If a new file is created, these permissions will be set on the created file. .AP int *lenPtr out If non-NULL, filled with the number of elements in the split path. .AP Tcl_Obj *basePtr in -The base path on to which to join the given elements. May be NULL. +The base path on to which to join the given elements. May be NULL. .AP int objc in The number of elements in \fIobjv\fR. .AP "Tcl_Obj *const" objv[] in @@ -243,27 +285,27 @@ symbolic links are preferred. .SH DESCRIPTION .PP There are several reasons for calling the \fBTcl_FS\fR API functions -(e.g. \fBTcl_FSAccess\fR and \fBTcl_FSStat\fR) +(e.g.\ \fBTcl_FSAccess\fR and \fBTcl_FSStat\fR) rather than calling system level functions like \fBaccess\fR and -\fBstat\fR directly. First, they will work cross-platform, so an +\fBstat\fR directly. First, they will work cross-platform, so an extension which calls them should work unmodified on Unix and -Windows. Second, the Windows implementation of some of these functions -fixes some bugs in the system level calls. Third, these function calls +Windows. Second, the Windows implementation of some of these functions +fixes some bugs in the system level calls. Third, these function calls deal with any .QW "Utf to platform-native" path conversions which may be required (and may cache the results of such conversions for greater -efficiency on subsequent calls). Fourth, and perhaps most importantly, +efficiency on subsequent calls). Fourth, and perhaps most importantly, all of these functions are .QW "virtual filesystem aware" . Any virtual filesystem (VFS for short) which has been registered (through \fBTcl_FSRegister\fR) may reroute file access to alternative -media or access methods. This means that all of these functions (and +media or access methods. This means that all of these functions (and therefore the corresponding \fBfile\fR, \fBglob\fR, \fBpwd\fR, \fBcd\fR, -\fBopen\fR, etc. Tcl commands) may be operate on +\fBopen\fR, etc.\ Tcl commands) may be operate on .QW files which are not -native files in the native filesystem. This also means that any Tcl +native files in the native filesystem. This also means that any Tcl extension which accesses the filesystem (FS for short) through this API is automatically .QW "virtual filesystem aware" . @@ -274,10 +316,10 @@ APIs, for example), then Tcl cannot intercept such calls. If appropriate VFSes have been registered, the .QW files may, to give two -examples, be remote (e.g. situated on a remote ftp server) or archived -(e.g. lying inside a .zip archive). Such registered filesystems provide +examples, be remote (e.g.\ situated on a remote ftp server) or archived +(e.g.\ lying inside a .zip archive). Such registered filesystems provide a lookup table of functions to implement all or some of the functionality -listed here. Finally, the \fBTcl_FSStat\fR and \fBTcl_FSLstat\fR calls +listed here. Finally, the \fBTcl_FSStat\fR and \fBTcl_FSLstat\fR calls abstract away from what the .QW "struct stat" buffer is actually @@ -285,9 +327,9 @@ declared to be, allowing the same code to be used both on systems with and systems without support for files larger than 2GB in size. .PP The \fBTcl_FS\fR API is objectified and may cache internal -representations and other path-related strings (e.g. the current working -directory). One side-effect of this is that one must not pass in objects -with a reference count of zero to any of these functions. If such calls were +representations and other path-related strings (e.g.\ the current working +directory). One side-effect of this is that one must not pass in objects +with a reference count of zero to any of these functions. If such calls were handled, they might result in memory leaks (under some circumstances, the filesystem code may wish to retain a reference to the passed in object, and so one must not assume @@ -296,21 +338,23 @@ zero - it may have been incremented) or in a direct segmentation fault (or other memory access error) due to the object being freed part way through the complex object manipulation required to ensure that the path is fully normalized and -absolute for filesystem determination. The practical lesson to learn +absolute for filesystem determination. The practical lesson to learn from this is that +.PP .CS Tcl_Obj *path = Tcl_NewStringObj(...); Tcl_FS\fIWhatever\fR(path); Tcl_DecrRefCount(path); .CE +.PP is wrong, and may cause memory errors. The \fIpath\fR must have its reference count incremented before passing it in, or -decrementing it. For this reason, objects with a reference count of zero are +decrementing it. For this reason, objects with a reference count of zero are considered not to be valid filesystem paths and calling any Tcl_FS API function with such an object will result in no action being taken. .SS "FS API FUNCTIONS" \fBTcl_FSCopyFile\fR attempts to copy the file given by \fIsrcPathPtr\fR to the -path name given by \fIdestPathPtr\fR. If the two paths given lie in the same +path name given by \fIdestPathPtr\fR. If the two paths given lie in the same filesystem (according to \fBTcl_FSGetFileSystemForPath\fR) then that filesystem's .QW "copy file" @@ -322,7 +366,7 @@ POSIX error code (which signifies a .QW "cross-domain link" ). .PP \fBTcl_FSCopyDirectory\fR attempts to copy the directory given by \fIsrcPathPtr\fR to the -path name given by \fIdestPathPtr\fR. If the two paths given lie in the same +path name given by \fIdestPathPtr\fR. If the two paths given lie in the same filesystem (according to \fBTcl_FSGetFileSystemForPath\fR) then that filesystem's .QW "copy file" @@ -349,11 +393,11 @@ function. function. .PP \fBTcl_FSRenameFile\fR attempts to rename the file or directory given by -\fIsrcPathPtr\fR to the path name given by \fIdestPathPtr\fR. If the two paths +\fIsrcPathPtr\fR to the path name given by \fIdestPathPtr\fR. If the two paths given lie in the same filesystem (according to \fBTcl_FSGetFileSystemForPath\fR) then that filesystem's .QW "rename file" -function is called (if it is non-NULL). Otherwise the function returns -1 +function is called (if it is non-NULL). Otherwise the function returns -1 and sets the \fBerrno\fR global C variable to the .QW EXDEV POSIX error code (which signifies a @@ -361,13 +405,13 @@ POSIX error code (which signifies a .PP \fBTcl_FSListVolumes\fR calls each filesystem which has a non-NULL .QW "list volumes" -function and asks them to return their list of root volumes. It +function and asks them to return their list of root volumes. It accumulates the return values in a list which is returned to the caller (with a reference count of 0). .PP \fBTcl_FSEvalFileEx\fR reads the file given by \fIpathPtr\fR using the encoding identified by \fIencodingName\fR and evaluates -its contents as a Tcl script. It returns the same information as +its contents as a Tcl script. It returns the same information as \fBTcl_EvalObjEx\fR. If \fIencodingName\fR is NULL, the system encoding is used for reading the file contents. @@ -390,67 +434,68 @@ when reading the file. .PP \fBTcl_FSLoadFile\fR dynamically loads a binary code file into memory and returns the addresses of two procedures within that file, if they are -defined. The appropriate function for the filesystem to which \fIpathPtr\fR -belongs will be called. If that filesystem does not implement this +defined. The appropriate function for the filesystem to which \fIpathPtr\fR +belongs will be called. If that filesystem does not implement this function (most virtual filesystems will not, because of OS limitations in dynamically loading binary code), Tcl will attempt to copy the file to a temporary directory and load that temporary file. .PP -Returns a standard Tcl completion code. If an error occurs, an error +Returns a standard Tcl completion code. If an error occurs, an error message is left in the \fIinterp\fR's result. .PP \fBTcl_FSMatchInDirectory\fR is used by the globbing code to search a -directory for all files which match a given pattern. The appropriate +directory for all files which match a given pattern. The appropriate function for the filesystem to which \fIpathPtr\fR belongs will be called. .PP The return value is a standard Tcl result indicating whether an error -occurred in globbing. Error messages are placed in interp (unless +occurred in globbing. Error messages are placed in interp (unless interp is NULL, which is allowed), but good results are placed in the resultPtr given. .PP Note that the \fBglob\fR code implements recursive patterns internally, so this function will only ever be passed simple patterns, which can be -matched using the logic of \fBstring match\fR. To handle recursion, Tcl +matched using the logic of \fBstring match\fR. To handle recursion, Tcl will call this function frequently asking only for directories to be -returned. A special case of being called with a NULL pattern indicates +returned. A special case of being called with a NULL pattern indicates that the path needs to be checked only for the correct type. .PP \fBTcl_FSLink\fR replaces the library version of \fBreadlink\fR, and -extends it to support the creation of links. The appropriate function +extends it to support the creation of links. The appropriate function for the filesystem to which \fIlinkNamePtr\fR belongs will be called. .PP If the \fItoPtr\fR is NULL, a .QW "read link" -action is performed. The result +action is performed. The result is a Tcl_Obj specifying the contents of the symbolic link given by -\fIlinkNamePtr\fR, or NULL if the link could not be read. The result is owned +\fIlinkNamePtr\fR, or NULL if the link could not be read. The result is owned by the caller, which should call Tcl_DecrRefCount when the result is no -longer needed. If the \fItoPtr\fR is not NULL, Tcl should create a link -of one of the types passed in in the \fIlinkAction\fR flag. This flag is +longer needed. If the \fItoPtr\fR is not NULL, Tcl should create a link +of one of the types passed in in the \fIlinkAction\fR flag. This flag is an ORed combination of \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR. -Where a choice exists (i.e. more than one flag is passed in), the Tcl -convention is to prefer symbolic links. When a link is successfully +Where a choice exists (i.e.\ more than one flag is passed in), the Tcl +convention is to prefer symbolic links. When a link is successfully created, the return value should be \fItoPtr\fR (which is therefore -already owned by the caller). If unsuccessful, NULL is returned. +already owned by the caller). If unsuccessful, NULL is returned. .PP -\fBTcl_FSLstat\fR fills the stat structure \fIstatPtr\fR with information -about the specified file. You do not need any access rights to the +\fBTcl_FSLstat\fR fills the \fITcl_StatBuf\fR structure \fIstatPtr\fR with +information about the specified file. You do not need any access rights to the file to get this information but you need search rights to all -directories named in the path leading to the file. The stat structure -includes info regarding device, inode (always 0 on Windows), +directories named in the path leading to the file. The \fITcl_StatBuf\fR +structure includes info regarding device, inode (always 0 on Windows), privilege mode, nlink (always 1 on Windows), user id (always 0 on Windows), group id (always 0 on Windows), rdev (same as device on Windows), size, last access time, last modification time, and creation -time. +time. See \fBPORTABLE STAT RESULT API\fR for a description of how to write +portable code to allocate and access the \fITcl_StatBuf\fR structure. .PP If \fIpath\fR exists, \fBTcl_FSLstat\fR returns 0 and the stat structure -is filled with data. Otherwise, -1 is returned, and no stat info is +is filled with data. Otherwise, -1 is returned, and no stat info is given. .PP \fBTcl_FSUtime\fR replaces the library version of utime. .PP This returns 0 on success and -1 on error (as per the \fButime\fR -documentation). If successful, the function +documentation). If successful, the function will update the .QW atime and @@ -458,7 +503,7 @@ and values of the file given. .PP \fBTcl_FSFileAttrsGet\fR implements read access for the hookable \fBfile -attributes\fR subcommand. The appropriate function for the filesystem to +attributes\fR subcommand. The appropriate function for the filesystem to which \fIpathPtr\fR belongs will be called. .PP If the result is \fBTCL_OK\fR, then an object was placed in @@ -466,43 +511,44 @@ If the result is \fBTCL_OK\fR, then an object was placed in will only be temporarily valid (unless \fBTcl_IncrRefCount\fR is called). .PP \fBTcl_FSFileAttrsSet\fR implements write access for the hookable \fBfile -attributes\fR subcommand. The appropriate function for the filesystem to +attributes\fR subcommand. The appropriate function for the filesystem to which \fIpathPtr\fR belongs will be called. .PP \fBTcl_FSFileAttrStrings\fR implements part of the hookable \fBfile -attributes\fR subcommand. The appropriate function for the filesystem +attributes\fR subcommand. The appropriate function for the filesystem to which \fIpathPtr\fR belongs will be called. .PP The called procedure may either return an array of strings, or may -instead return NULL and place a Tcl list into the given \fIobjPtrRef\fR. Tcl +instead return NULL and place a Tcl list into the given \fIobjPtrRef\fR. Tcl will take that list and first increment its reference count before using it. -On completion of that use, Tcl will decrement its reference count. Hence if +On completion of that use, Tcl will decrement its reference count. Hence if the list should be disposed of by Tcl when done, it should have a reference count of zero, and if the list should not be disposed of, the filesystem should ensure it retains a reference count to the object. .PP \fBTcl_FSAccess\fR checks whether the process would be allowed to read, write or test for existence of the file (or other filesystem object) -whose name is \fIpathname\fR. If \fIpathname\fR is a symbolic link on Unix, +whose name is \fIpathname\fR. If \fIpathname\fR is a symbolic link on Unix, then permissions of the file referred by this symbolic link are tested. .PP -On success (all requested permissions granted), zero is returned. On +On success (all requested permissions granted), zero is returned. On error (at least one bit in mode asked for a permission that is denied, or some other error occurred), -1 is returned. .PP -\fBTcl_FSStat\fR fills the stat structure \fIstatPtr\fR with information -about the specified file. You do not need any access rights to the +\fBTcl_FSStat\fR fills the \fITcl_StatBuf\fR structure \fIstatPtr\fR with +information about the specified file. You do not need any access rights to the file to get this information but you need search rights to all -directories named in the path leading to the file. The stat structure -includes info regarding device, inode (always 0 on Windows), +directories named in the path leading to the file. The \fITcl_StatBuf\fR +structure includes info regarding device, inode (always 0 on Windows), privilege mode, nlink (always 1 on Windows), user id (always 0 on Windows), group id (always 0 on Windows), rdev (same as device on Windows), size, last access time, last modification time, and creation -time. +time. See \fBPORTABLE STAT RESULT API\fR for a description of how to write +portable code to allocate and access the \fITcl_StatBuf\fR structure. .PP If \fIpath\fR exists, \fBTcl_FSStat\fR returns 0 and the stat structure -is filled with data. Otherwise, -1 is returned, and no stat info is +is filled with data. Otherwise, -1 is returned, and no stat info is given. .PP \fBTcl_FSOpenFileChannel\fR opens a file specified by \fIpathPtr\fR and @@ -525,42 +571,42 @@ replacement for the standard channel. .PP \fBTcl_FSGetCwd\fR replaces the library version of \fBgetcwd\fR. .PP -It returns the Tcl library's current working directory. This may be +It returns the Tcl library's current working directory. This may be different to the native platform's working directory, which happens when the current working directory is not in the native filesystem. .PP The result is a pointer to a Tcl_Obj specifying the current directory, -or NULL if the current directory could not be determined. If NULL is +or NULL if the current directory could not be determined. If NULL is returned, an error message is left in the \fIinterp\fR's result. .PP -The result already has its reference count incremented for the caller. When -it is no longer needed, that reference count should be decremented. This is +The result already has its reference count incremented for the caller. When +it is no longer needed, that reference count should be decremented. This is needed for thread-safety purposes, to allow multiple threads to access this and related functions, while ensuring the results are always valid. .PP -\fBTcl_FSChdir\fR replaces the library version of \fBchdir\fR. The path is -normalized and then passed to the filesystem which claims it. If that +\fBTcl_FSChdir\fR replaces the library version of \fBchdir\fR. The path is +normalized and then passed to the filesystem which claims it. If that filesystem does not implement this function, Tcl will fallback to a combination of \fBstat\fR and \fBaccess\fR to check whether the directory exists and has appropriate permissions. .PP -For results, see \fBchdir\fR documentation. If successful, we keep a +For results, see \fBchdir\fR documentation. If successful, we keep a record of the successful path in \fIcwdPathPtr\fR for subsequent calls to \fBTcl_FSGetCwd\fR. .PP \fBTcl_FSPathSeparator\fR returns the separator character to be used for -most specific element of the path specified by \fIpathPtr\fR (i.e. the last +most specific element of the path specified by \fIpathPtr\fR (i.e.\ the last part of the path). .PP The separator is returned as a Tcl_Obj containing a string of length -1. If the path is invalid, NULL is returned. +1. If the path is invalid, NULL is returned. .PP \fBTcl_FSJoinPath\fR takes the given Tcl_Obj, which must be a valid list (which is allowed to have a reference count of zero), and returns the path object given by considering the first \fIelements\fR elements as valid path segments (each path segment may be a complete path, a partial path or -just a single possible directory or file name). If any path segment is +just a single possible directory or file name). If any path segment is actually an absolute path, then all prior path segments are discarded. If \fIelements\fR is less than 0, we use the entire list. .PP @@ -570,8 +616,8 @@ reference count of the result before freeing the list. .PP The returned object, typically with a reference count of zero (but it could be shared -under some conditions), contains the joined path. The caller must -add a reference count to the object before using it. In particular, the +under some conditions), contains the joined path. The caller must +add a reference count to the object before using it. In particular, the returned object could be an element of the given list, so freeing the list might free the object prematurely if no reference count has been taken. If the number of elements is zero, then the returned object will be @@ -580,14 +626,14 @@ an empty-string Tcl_Obj. \fBTcl_FSSplitPath\fR takes the given Tcl_Obj, which should be a valid path, and returns a Tcl list object containing each segment of that path as an element. -It returns a list object with a reference count of zero. If the +It returns a list object with a reference count of zero. If the passed in \fIlenPtr\fR is non-NULL, the variable it points to will be updated to contain the number of elements in the returned list. .PP \fBTcl_FSEqualPaths\fR tests whether the two paths given represent the same filesystem object .PP -It returns 1 if the paths are equal, and 0 if they are different. If +It returns 1 if the paths are equal, and 0 if they are different. If either path is NULL, 0 is always returned. .PP \fBTcl_FSGetNormalizedPath\fR this important function attempts to extract @@ -599,7 +645,7 @@ was invalid or could otherwise not be successfully converted. Extraction of absolute, normalized paths is very efficient (because the filesystem operates on these representations internally), although the result when the filesystem contains numerous symbolic links may not be -the most user-friendly version of a path. The return value is owned by +the most user-friendly version of a path. The return value is owned by Tcl and has a lifetime equivalent to that of the \fIpathPtr\fR passed in (unless that is a relative path, in which case the normalized path object may be freed any time the cwd changes) - the caller can of @@ -610,8 +656,8 @@ valid path or NULL, and joins onto it the array of paths segments given. .PP Returns object, typically with refCount of zero (but it could be shared -under some conditions), containing the joined path. The caller must -add a refCount to the object before using it. If any of the objects +under some conditions), containing the joined path. The caller must +add a refCount to the object before using it. If any of the objects passed into this function (pathPtr or path elements) have a refCount of zero, they will be freed when this function returns. .PP @@ -624,49 +670,49 @@ The filename may begin with .QW ~ (to indicate any user's home directory). .PP -If the conversion succeeds (i.e. the object is a valid path in one of -the current filesystems), then \fBTCL_OK\fR is returned. Otherwise +If the conversion succeeds (i.e.\ the object is a valid path in one of +the current filesystems), then \fBTCL_OK\fR is returned. Otherwise \fBTCL_ERROR\fR is returned, and an error message may be left in the interpreter. .PP \fBTcl_FSGetInternalRep\fR extracts the internal representation of a given -path object, in the given filesystem. If the path object belongs to a +path object, in the given filesystem. If the path object belongs to a different filesystem, we return NULL. If the internal representation is currently NULL, we attempt to generate it, by calling the filesystem's \fBTcl_FSCreateInternalRepProc\fR. .PP -Returns NULL or a valid internal path representation. This internal +Returns NULL or a valid internal path representation. This internal representation is cached, so that repeated calls to this function will not require additional conversions. .PP \fBTcl_FSGetTranslatedPath\fR attempts to extract the translated path from the given Tcl_Obj. .PP -If the translation succeeds (i.e. the object is a valid path), then it is -returned. Otherwise NULL will be returned, and an error message may be -left in the interpreter. A +If the translation succeeds (i.e.\ the object is a valid path), then it is +returned. Otherwise NULL will be returned, and an error message may be +left in the interpreter. A .QW translated path is one which contains no .QW ~ or .QW ~user sequences (these have been expanded to their current -representation in the filesystem). The object returned is owned by the +representation in the filesystem). The object returned is owned by the caller, which must store it or call Tcl_DecrRefCount to ensure memory is -freed. This function is of little practical use, and +freed. This function is of little practical use, and \fBTcl_FSGetNormalizedPath\fR or \fBTcl_GetNativePath\fR are usually better functions to use for most purposes. .PP \fBTcl_FSGetTranslatedStringPath\fR does the same as \fBTcl_FSGetTranslatedPath\fR, but returns a character string or NULL. The string returned is dynamically allocated and owned by the caller, -which must store it or call \fBckfree\fR to ensure it is freed. Again, +which must store it or call \fBckfree\fR to ensure it is freed. Again, \fBTcl_FSGetNormalizedPath\fR or \fBTcl_GetNativePath\fR are usually better functions to use for most purposes. .PP \fBTcl_FSNewNativePath\fR performs something like the reverse of the -usual obj->path->nativerep conversions. If some code retrieves a path -in native form (from, e.g. \fBreadlink\fR or a native dialog), and that path +usual obj->path->nativerep conversions. If some code retrieves a path +in native form (from, e.g.\ \fBreadlink\fR or a native dialog), and that path is to be used at the Tcl level, then calling this function is an efficient way of creating the appropriate path object type. .PP @@ -677,29 +723,29 @@ a UTF-8 string representation if that is required by some Tcl code. .PP \fBTcl_FSGetNativePath\fR is for use by the Win/Unix native filesystems, so that they can easily retrieve the native (char* or -TCHAR*) representation of a path. This function is a convenience +TCHAR*) representation of a path. This function is a convenience wrapper around \fBTcl_FSGetInternalRep\fR, and assumes the native -representation is string-based. It may be desirable in the future to +representation is string-based. It may be desirable in the future to have non-string-based native representations (for example, on MacOSX, a representation using a fileSpec of FSRef structure would probably be -more efficient). On Windows a full Unicode representation would allow -for paths of unlimited length. Currently the representation is simply a +more efficient). On Windows a full Unicode representation would allow +for paths of unlimited length. Currently the representation is simply a character string which may contain either the relative path or a complete, absolute normalized path in the native encoding (complex conditions dictate which of these will be provided, so neither can be -relied upon, unless the path is known to be absolute). If you need a +relied upon, unless the path is known to be absolute). If you need a native path which must be absolute, then you should ask for the native -version of a normalized path. If for some reason a non-absolute, +version of a normalized path. If for some reason a non-absolute, non-normalized version of the path is needed, that must be constructed -separately (e.g. using \fBTcl_FSGetTranslatedPath\fR). +separately (e.g.\ using \fBTcl_FSGetTranslatedPath\fR). .PP The native representation is cached so that repeated calls to this -function will not require additional conversions. The return value is +function will not require additional conversions. The return value is owned by Tcl and has a lifetime equivalent to that of the \fIpathPtr\fR passed in (unless that is a relative path, in which case the native representation may be freed any time the cwd changes). .PP -\fBTcl_FSFileSystemInfo\fR returns a list of two elements. The first +\fBTcl_FSFileSystemInfo\fR returns a list of two elements. The first element is the name of the filesystem (e.g. .QW native , .QW vfs , @@ -707,7 +753,7 @@ element is the name of the filesystem (e.g. or .QW prowrap , perhaps), and the second is the particular type of the -given path within that filesystem (which is filesystem dependent). The +given path within that filesystem (which is filesystem dependent). The second element may be empty if the filesystem does not provide a further categorization of files. .PP @@ -725,12 +771,38 @@ absolute. .PP It returns one of \fBTCL_PATH_ABSOLUTE\fR, \fBTCL_PATH_RELATIVE\fR, or \fBTCL_PATH_VOLUME_RELATIVE\fR -.PP -\fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system -heap (which may be deallocated by being passed to \fBckfree\fR.) This -allows extensions to invoke \fBTcl_FSStat\fR and \fBTcl_FSLStat\fR -without being dependent on the size of the buffer. That in turn -depends on the flags used to build Tcl. +.SS "PORTABLE STAT RESULT API" +.PP +\fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system heap (which +may be deallocated by being passed to \fBckfree\fR). This allows extensions to +invoke \fBTcl_FSStat\fR and \fBTcl_FSLStat\fR without being dependent on the +size of the buffer. That in turn depends on the flags used to build Tcl. +.PP +.VS 8.6 +The portable fields of a \fITcl_StatBuf\fR may be read using the following +functions, each of which returns the value of the corresponding field listed +in the table below. Note that on some platforms there may be other fields in +the \fITcl_StatBuf\fR as it is an alias for a suitable system structure, but +only the portable ones are made available here. See your system documentation +for a full description of these fields. +.DS +.ta \w'\fBTcl_GetModificationTimeFromStat\fR\0\0\0\0'u +\fIAccess Function\fR \fIField\fR + \fBTcl_GetFSDeviceFromStat\fR st_dev + \fBTcl_GetFSInodeFromStat\fR st_ino + \fBTcl_GetModeFromStat\fR st_mode + \fBTcl_GetLinkCountFromStat\fR st_nlink + \fBTcl_GetUserIdFromStat\fR st_uid + \fBTcl_GetGroupIdFromStat\fR st_gid + \fBTcl_GetDeviceTypeFromStat\fR st_rdev + \fBTcl_GetAccessTimeFromStat\fR st_atime + \fBTcl_GetModificationTimeFromStat\fR st_mtime + \fBTcl_GetChangeTimeFromStat\fR st_ctime + \fBTcl_GetSizeFromStat\fR st_size + \fBTcl_GetBlocksFromStat\fR st_blocks + \fBTcl_GetBlockSizeFromStat\fR st_blksize +.DE +.VE 8.6 .SH "THE VIRTUAL FILESYSTEM API" .PP A filesystem provides a \fBTcl_Filesystem\fR structure that contains @@ -742,18 +814,18 @@ The \fBTcl_Filesystem\fR structures are manipulated using the following methods. .PP \fBTcl_FSRegister\fR takes a pointer to a filesystem structure and an -optional piece of data to associated with that filesystem. On calling +optional piece of data to associated with that filesystem. On calling this function, Tcl will attach the filesystem to the list of known -filesystems, and it will become fully functional immediately. Tcl does +filesystems, and it will become fully functional immediately. Tcl does not check if the same filesystem is registered multiple times (and in -general that is not a good thing to do). \fBTCL_OK\fR will be returned. +general that is not a good thing to do). \fBTCL_OK\fR will be returned. .PP \fBTcl_FSUnregister\fR removes the given filesystem structure from -the list of known filesystems, if it is known, and returns \fBTCL_OK\fR. If +the list of known filesystems, if it is known, and returns \fBTCL_OK\fR. If the filesystem is not currently registered, \fBTCL_ERROR\fR is returned. .PP \fBTcl_FSData\fR will return the ClientData associated with the given -filesystem, if that filesystem is registered. Otherwise it will +filesystem, if that filesystem is registered. Otherwise it will return NULL. .PP \fBTcl_FSMountsChanged\fR is used to inform the Tcl's core that @@ -763,6 +835,7 @@ longer be correct. .SS "THE TCL_FILESYSTEM STRUCTURE" .PP The \fBTcl_Filesystem\fR structure contains the following fields: +.PP .CS typedef struct Tcl_Filesystem { const char *\fItypeName\fR; @@ -810,7 +883,7 @@ implemented), operational functions (which must be implemented if a complete filesystem is provided), and efficiency functions (which need only be implemented if they can be done so efficiently, or if they have side-effects which are required by the filesystem; Tcl has less -efficient emulations it can fall back on). It is important to note +efficient emulations it can fall back on). It is important to note that, in the current version of Tcl, most of these fallbacks are only used to handle commands initiated in Tcl, not in C. What this means is, that if a \fBfile rename\fR command is issued in Tcl, and the relevant @@ -818,14 +891,14 @@ filesystem(s) do not implement their \fITcl_FSRenameFileProc\fR, Tcl's core will instead fallback on a combination of other filesystem functions (it will use \fITcl_FSCopyFileProc\fR followed by \fITcl_FSDeleteFileProc\fR, and if \fITcl_FSCopyFileProc\fR is not -implemented there is a further fallback). However, if a +implemented there is a further fallback). However, if a \fITcl_FSRenameFileProc\fR command is issued at the C level, no such -fallbacks occur. This is true except for the last four entries in the +fallbacks occur. This is true except for the last four entries in the filesystem table (\fBlstat\fR, \fBload\fR, \fBgetcwd\fR and \fBchdir\fR) for which fallbacks do in fact occur at the C level. .PP Any functions which take path names in Tcl_Obj form take -those names in UTF\-8 form. The filesystem infrastructure API is +those names in UTF\-8 form. The filesystem infrastructure API is designed to support efficient, cached conversion of these UTF\-8 paths to other native representations. .SS "EXAMPLE FILESYSTEM DEFINITION" @@ -833,6 +906,7 @@ to other native representations. Here is the filesystem lookup table used by the .QW vfs extension which allows filesystem actions to be implemented in Tcl. +.PP .CS static Tcl_Filesystem vfsFilesystem = { "tclvfs", @@ -912,15 +986,15 @@ The \fIversion\fR field should be set to \fBTCL_FILESYSTEM_VERSION_1\fR. .PP The \fIpathInFilesystemProc\fR field contains the address of a function which is called to determine whether a given path object belongs to this -filesystem or not. Tcl will only call the rest of the filesystem +filesystem or not. Tcl will only call the rest of the filesystem functions with a path for which this function has returned \fBTCL_OK\fR. If the path does not belong, -1 should be returned (the behaviour of Tcl -for any other return value is not defined). If \fBTCL_OK\fR is returned, +for any other return value is not defined). If \fBTCL_OK\fR is returned, then the optional \fIclientDataPtr\fR output parameter can be used to return an internal (filesystem specific) representation of the path, which will be cached inside the path object, and may be retrieved -efficiently by the other filesystem functions. Tcl will simultaneously -cache the fact that this path belongs to this filesystem. Such caches +efficiently by the other filesystem functions. Tcl will simultaneously +cache the fact that this path belongs to this filesystem. Such caches are invalidated when filesystem structures are added or removed from Tcl's internal list of known filesystems. .PP @@ -932,7 +1006,7 @@ typedef int \fBTcl_FSPathInFilesystemProc\fR( .SS DUPINTERNALREPPROC .PP This function makes a copy of a path's internal representation, and is -called when Tcl needs to duplicate a path object. If NULL, Tcl will +called when Tcl needs to duplicate a path object. If NULL, Tcl will simply not copy the internal representation, which may then need to be regenerated later. .PP @@ -941,8 +1015,8 @@ typedef ClientData \fBTcl_FSDupInternalRepProc\fR( ClientData \fIclientData\fR); .CE .SS FREEINTERNALREPPROC -Free the internal representation. This must be implemented if internal -representations need freeing (i.e. if some memory is allocated when an +Free the internal representation. This must be implemented if internal +representations need freeing (i.e.\ if some memory is allocated when an internal representation is generated), but may otherwise be NULL. .PP .CS @@ -951,9 +1025,9 @@ typedef void \fBTcl_FSFreeInternalRepProc\fR( .CE .SS INTERNALTONORMALIZEDPROC .PP -Function to convert internal representation to a normalized path. Only +Function to convert internal representation to a normalized path. Only required if the filesystem creates pure path objects with no string/path -representation. The return value is a Tcl object whose string +representation. The return value is a Tcl object whose string representation is the normalized path. .PP .CS @@ -964,7 +1038,7 @@ typedef Tcl_Obj *\fBTcl_FSInternalToNormalizedProc\fR( .PP Function to take a path object, and calculate an internal representation for it, and store that native representation in the -object. May be NULL if paths have no internal representation, or if +object. May be NULL if paths have no internal representation, or if the \fITcl_FSPathInFilesystemProc\fR for this filesystem always immediately creates an internal representation for paths it accepts. .PP @@ -974,28 +1048,28 @@ typedef ClientData \fBTcl_FSCreateInternalRepProc\fR( .CE .SS NORMALIZEPATHPROC .PP -Function to normalize a path. Should be implemented for all +Function to normalize a path. Should be implemented for all filesystems which can have multiple string representations for the same -path object. In Tcl, every +path object. In Tcl, every .QW path must have a single unique .QW normalized -string representation. Depending on the filesystem, +string representation. Depending on the filesystem, there may be more than one unnormalized string representation which -refers to that path (e.g. a relative path, a path with different +refers to that path (e.g.\ a relative path, a path with different character case if the filesystem is case insensitive, a path contain a reference to a home directory such as .QW ~ , a path containing symbolic -links, etc). If the very last component in the path is a symbolic +links, etc). If the very last component in the path is a symbolic link, it should not be converted into the object it points to (but -its case or other aspects should be made unique). All other path -components should be converted from symbolic links. This one +its case or other aspects should be made unique). All other path +components should be converted from symbolic links. This one exception is required to agree with Tcl's semantics with \fBfile delete\fR, \fBfile rename\fR, \fBfile copy\fR operating on symbolic links. This function may be called with \fInextCheckpoint\fR either -at the beginning of the path (i.e. zero), at the end of the path, or -at any intermediate file separator in the path. It will never +at the beginning of the path (i.e.\ zero), at the end of the path, or +at any intermediate file separator in the path. It will never point to any other arbitrary position in the path. In the last of the three valid cases, the implementation can assume that the path up to and including the file separator is known and normalized. @@ -1010,23 +1084,23 @@ typedef int \fBTcl_FSNormalizePathProc\fR( .PP The fields in this section of the structure contain addresses of functions which are called to carry out the basic filesystem -operations. A filesystem which expects to be used with the complete -standard Tcl command set must implement all of these. If some of +operations. A filesystem which expects to be used with the complete +standard Tcl command set must implement all of these. If some of them are not implemented, then certain Tcl commands may fail when -operating on paths within that filesystem. However, in some instances +operating on paths within that filesystem. However, in some instances this may be desirable (for example, a read-only filesystem should not implement the last four functions, and a filesystem which does not support symbolic links need not implement the \fBreadlink\fR function, -etc. The Tcl core expects filesystems to behave in this way). +etc. The Tcl core expects filesystems to behave in this way). .SS FILESYSTEMPATHTYPEPROC .PP -Function to determine the type of a path in this filesystem. May be +Function to determine the type of a path in this filesystem. May be NULL, in which case no type information will be available to users of -the filesystem. The +the filesystem. The .QW type is used only for informational purposes, and should be returned as the string representation of the Tcl_Obj -which is returned. A typical return value might be +which is returned. A typical return value might be .QW networked , .QW zip or @@ -1046,7 +1120,7 @@ This need only be implemented if the filesystem wishes to use a different separator than the standard string .QW / . Amongst other -uses, it is returned by the \fBfile separator\fR command. The +uses, it is returned by the \fBfile separator\fR command. The return value should be an object with refCount of zero. .PP .CS @@ -1055,9 +1129,9 @@ typedef Tcl_Obj *\fBTcl_FSFilesystemSeparatorProc\fR( .CE .SS STATPROC .PP -Function to process a \fBTcl_FSStat\fR call. Must be implemented for any +Function to process a \fBTcl_FSStat\fR call. Must be implemented for any reasonable filesystem, since many Tcl level commands depend crucially -upon it (e.g. \fBfile atime\fR, \fBfile isdirectory\fR, \fBfile size\fR, +upon it (e.g.\ \fBfile atime\fR, \fBfile isdirectory\fR, \fBfile size\fR, \fBglob\fR). .PP .CS @@ -1067,9 +1141,9 @@ typedef int \fBTcl_FSStatProc\fR( .CE .PP The \fBTcl_FSStatProc\fR fills the stat structure \fIstatPtr\fR with -information about the specified file. You do not need any access +information about the specified file. You do not need any access rights to the file to get this information but you need search rights -to all directories named in the path leading to the file. The stat +to all directories named in the path leading to the file. The stat structure includes info regarding device, inode (always 0 on Windows), privilege mode, nlink (always 1 on Windows), user id (always 0 on Windows), group id (always 0 on Windows), rdev (same as device on @@ -1078,12 +1152,12 @@ time. .PP If the file represented by \fIpathPtr\fR exists, the \fBTcl_FSStatProc\fR returns 0 and the stat structure is filled with -data. Otherwise, -1 is returned, and no stat info is given. +data. Otherwise, -1 is returned, and no stat info is given. .SS ACCESSPROC .PP -Function to process a \fBTcl_FSAccess\fR call. Must be implemented for +Function to process a \fBTcl_FSAccess\fR call. Must be implemented for any reasonable filesystem, since many Tcl level commands depend crucially -upon it (e.g. \fBfile exists\fR, \fBfile readable\fR). +upon it (e.g.\ \fBfile exists\fR, \fBfile readable\fR). .PP .CS typedef int \fBTcl_FSAccessProc\fR( @@ -1093,19 +1167,19 @@ typedef int \fBTcl_FSAccessProc\fR( .PP The \fBTcl_FSAccessProc\fR checks whether the process would be allowed to read, write or test for existence of the file (or other filesystem -object) whose name is in \fIpathPtr\fR. If the pathname refers to a +object) whose name is in \fIpathPtr\fR. If the pathname refers to a symbolic link, then the permissions of the file referred by this symbolic link should be tested. .PP -On success (all requested permissions granted), zero is returned. On +On success (all requested permissions granted), zero is returned. On error (at least one bit in mode asked for a permission that is denied, or some other error occurred), -1 is returned. .SS OPENFILECHANNELPROC .PP -Function to process a \fBTcl_FSOpenFileChannel\fR call. Must be +Function to process a \fBTcl_FSOpenFileChannel\fR call. Must be implemented for any reasonable filesystem, since any operations which require open or accessing a file's contents will use it -(e.g. \fBopen\fR, \fBencoding\fR, and many Tk commands). +(e.g.\ \fBopen\fR, \fBencoding\fR, and many Tk commands). .PP .CS typedef Tcl_Channel \fBTcl_FSOpenFileChannelProc\fR( @@ -1117,11 +1191,11 @@ typedef Tcl_Channel \fBTcl_FSOpenFileChannelProc\fR( .PP The \fBTcl_FSOpenFileChannelProc\fR opens a file specified by \fIpathPtr\fR and returns a channel handle that can be used to perform -input and output on the file. This API is modeled after the \fBfopen\fR -procedure of the Unix standard I/O library. The syntax and meaning of +input and output on the file. This API is modeled after the \fBfopen\fR +procedure of the Unix standard I/O library. The syntax and meaning of all arguments is similar to those given in the Tcl \fBopen\fR command when opening a file, where the \fImode\fR argument is a combination of -the POSIX flags O_RDONLY, O_WRONLY, etc. If an error occurs while +the POSIX flags O_RDONLY, O_WRONLY, etc. If an error occurs while opening the channel, the \fBTcl_FSOpenFileChannelProc\fR returns NULL and records a POSIX error code that can be retrieved with \fBTcl_GetErrno\fR. In addition, if \fIinterp\fR is non-NULL, the @@ -1135,7 +1209,7 @@ previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SS MATCHINDIRECTORYPROC .PP -Function to process a \fBTcl_FSMatchInDirectory\fR call. If not +Function to process a \fBTcl_FSMatchInDirectory\fR call. If not implemented, then glob and recursive copy functionality will be lacking in the filesystem (and this may impact commands like \fBencoding names\fR which use glob functionality internally). @@ -1151,22 +1225,22 @@ typedef int \fBTcl_FSMatchInDirectoryProc\fR( .PP The function should return all files or directories (or other filesystem objects) which match the given pattern and accord with the \fItypes\fR -specification given. There are two ways in which this function may be -called. If \fIpattern\fR is NULL, then \fIpathPtr\fR is a full path +specification given. There are two ways in which this function may be +called. If \fIpattern\fR is NULL, then \fIpathPtr\fR is a full path specification of a single file or directory which should be checked for -existence and correct type. Otherwise, \fIpathPtr\fR is a directory, the +existence and correct type. Otherwise, \fIpathPtr\fR is a directory, the contents of which the function should search for files or directories -which have the correct type. In either case, \fIpathPtr\fR can be -assumed to be both non-NULL and non-empty. It is not currently +which have the correct type. In either case, \fIpathPtr\fR can be +assumed to be both non-NULL and non-empty. It is not currently documented whether \fIpathPtr\fR will have a file separator at its end of not, so code should be flexible to both possibilities. .PP The return value is a standard Tcl result indicating whether an error -occurred in the matching process. Error messages are placed in +occurred in the matching process. Error messages are placed in \fIinterp\fR, unless \fIinterp\fR in NULL in which case no error message need be generated; on a \fBTCL_OK\fR result, results should be added to the \fIresultPtr\fR object given (which can be assumed to be a -valid unshared Tcl list). The matches added +valid unshared Tcl list). The matches added to \fIresultPtr\fR should include any path prefix given in \fIpathPtr\fR (this usually means they will be absolute path specifications). Note that if no matches are found, that simply leads to an empty @@ -1175,6 +1249,7 @@ problems which may occur during the matching process. .PP The \fBTcl_GlobTypeData\fR structure passed in the \fItypes\fR parameter contains the following fields: +.PP .CS typedef struct Tcl_GlobTypeData { /* Corresponds to bcdpfls as in 'find -t' */ @@ -1191,18 +1266,18 @@ typedef struct Tcl_GlobTypeData { There are two specific cases which it is important to handle correctly, both when \fItypes\fR is non-NULL. The two cases are when \fItypes->types & TCL_GLOB_TYPE_DIR\fR or \fItypes->types & TCL_GLOB_TYPE_MOUNT\fR are -true (and in particular when the other flags are false). In the first of -these cases, the function must list the contained directories. Tcl uses +true (and in particular when the other flags are false). In the first of +these cases, the function must list the contained directories. Tcl uses this to implement recursive globbing, so it is critical that filesystems -implement directory matching correctly. In the second of these cases, +implement directory matching correctly. In the second of these cases, with \fBTCL_GLOB_TYPE_MOUNT\fR, the filesystem must list the mount points which lie within the given \fIpathPtr\fR (and in this case, \fIpathPtr\fR need not lie within the same filesystem - different to all other cases in -which this function is called). Support for this is critical if Tcl is +which this function is called). Support for this is critical if Tcl is to have seamless transitions between from one filesystem to another. .SS UTIMEPROC .PP -Function to process a \fBTcl_FSUtime\fR call. Required to allow setting +Function to process a \fBTcl_FSUtime\fR call. Required to allow setting (not reading) of times with \fBfile mtime\fR, \fBfile atime\fR and the open-r/open-w/fcopy implementation of \fBfile copy\fR. .PP @@ -1219,7 +1294,7 @@ The return value should be 0 on success and -1 on an error, as with the system \fButime\fR. .SS LINKPROC .PP -Function to process a \fBTcl_FSLink\fR call. Should be implemented +Function to process a \fBTcl_FSLink\fR call. Should be implemented only if the filesystem supports links, and may otherwise be NULL. .PP .CS @@ -1230,15 +1305,15 @@ typedef Tcl_Obj *\fBTcl_FSLinkProc\fR( .CE .PP If \fItoPtr\fR is NULL, the function is being asked to read the -contents of a link. The result is a Tcl_Obj specifying the contents of +contents of a link. The result is a Tcl_Obj specifying the contents of the link given by \fIlinkNamePtr\fR, or NULL if the link could -not be read. The result is owned by the caller (and should therefore -have its ref count incremented before being returned). Any callers +not be read. The result is owned by the caller (and should therefore +have its ref count incremented before being returned). Any callers should call Tcl_DecrRefCount on this result when it is no longer needed. If \fItoPtr\fR is not NULL, the function should attempt to create a link. The result in this case should be \fItoPtr\fR if the link was successful -and NULL otherwise. In this case the result is not owned by the caller -(i.e. no ref count manipulation on either end is needed). See +and NULL otherwise. In this case the result is not owned by the caller +(i.e.\ no reference count manipulations on either end are needed). See the documentation for \fBTcl_FSLink\fR for the correct interpretation of the \fIlinkAction\fR flags. .SS LISTVOLUMESPROC @@ -1252,10 +1327,10 @@ typedef Tcl_Obj *\fBTcl_FSListVolumesProc\fR(void); .CE .PP The result should be a list of volumes added by this filesystem, or -NULL (or an empty list) if no volumes are provided. The result object +NULL (or an empty list) if no volumes are provided. The result object is considered to be owned by the filesystem (not by Tcl's core), but -should be given a refCount for Tcl. Tcl will use the contents of the -list and then decrement that refCount. This allows filesystems to +should be given a refCount for Tcl. Tcl will use the contents of the +list and then decrement that refCount. This allows filesystems to choose whether they actually want to retain a .QW "master list" of volumes @@ -1269,9 +1344,9 @@ Therefore, Tcl considers return values from this proc to be read-only. .SS FILEATTRSTRINGSPROC .PP Function to list all attribute strings which are valid for this -filesystem. If not implemented the filesystem will not support -the \fBfile attributes\fR command. This allows arbitrary additional -information to be attached to files in the filesystem. If it is +filesystem. If not implemented the filesystem will not support +the \fBfile attributes\fR command. This allows arbitrary additional +information to be attached to files in the filesystem. If it is not implemented, there is no need to implement the \fBget\fR and \fBset\fR methods. .PP @@ -1282,9 +1357,9 @@ typedef const char **\fBTcl_FSFileAttrStringsProc\fR( .CE .PP The called function may either return an array of strings, or may -instead return NULL and place a Tcl list into the given \fIobjPtrRef\fR. Tcl +instead return NULL and place a Tcl list into the given \fIobjPtrRef\fR. Tcl will take that list and first increment its reference count before using it. -On completion of that use, Tcl will decrement its reference count. Hence if +On completion of that use, Tcl will decrement its reference count. Hence if the list should be disposed of by Tcl when done, it should have a reference count of zero, and if the list should not be disposed of, the filesystem should ensure it returns an object with a refererence count @@ -1302,16 +1377,16 @@ typedef int \fBTcl_FSFileAttrsGetProc\fR( Tcl_Obj **\fIobjPtrRef\fR); .CE .PP -Returns a standard Tcl return code. The attribute value retrieved, +Returns a standard Tcl return code. The attribute value retrieved, which corresponds to the \fIindex\fR'th element in the list returned by the \fBTcl_FSFileAttrStringsProc\fR, is a Tcl_Obj placed in \fIobjPtrRef\fR (if -\fBTCL_OK\fR was returned) and is likely to have a reference count of zero. Either -way we must either store it somewhere (e.g. the Tcl result), or +\fBTCL_OK\fR was returned) and is likely to have a reference count of zero. Either +way we must either store it somewhere (e.g.\ the Tcl result), or Incr/Decr its reference count to ensure it is properly freed. .SS FILEATTRSSETPROC .PP Function to process a \fBTcl_FSFileAttrsSet\fR call, used by \fBfile -attributes\fR. If the filesystem is read-only, there is no need +attributes\fR. If the filesystem is read-only, there is no need to implement this. .PP .CS @@ -1326,7 +1401,7 @@ The attribute value of the \fIindex\fR'th element in the list returned by the Tcl_FSFileAttrStringsProc should be set to the \fIobjPtr\fR given. .SS CREATEDIRECTORYPROC .PP -Function to process a \fBTcl_FSCreateDirectory\fR call. Should be +Function to process a \fBTcl_FSCreateDirectory\fR call. Should be implemented unless the FS is read-only. .PP .CS @@ -1335,12 +1410,12 @@ typedef int \fBTcl_FSCreateDirectoryProc\fR( .CE .PP The return value is a standard Tcl result indicating whether an error -occurred in the process. If successful, a new directory should have +occurred in the process. If successful, a new directory should have been added to the filesystem in the location specified by \fIpathPtr\fR. .SS REMOVEDIRECTORYPROC .PP -Function to process a \fBTcl_FSRemoveDirectory\fR call. Should be +Function to process a \fBTcl_FSRemoveDirectory\fR call. Should be implemented unless the FS is read-only. .PP .CS @@ -1351,18 +1426,18 @@ typedef int \fBTcl_FSRemoveDirectoryProc\fR( .CE .PP The return value is a standard Tcl result indicating whether an error -occurred in the process. If successful, the directory specified by -\fIpathPtr\fR should have been removed from the filesystem. If the +occurred in the process. If successful, the directory specified by +\fIpathPtr\fR should have been removed from the filesystem. If the \fIrecursive\fR flag is given, then a non-empty directory should be -deleted without error. If this flag is not given, then and the +deleted without error. If this flag is not given, then and the directory is non-empty a POSIX .QW EEXIST -error should be signalled. If an +error should be signalled. If an error does occur, the name of the file or directory which caused the error should be placed in \fIerrorPtr\fR. .SS DELETEFILEPROC .PP -Function to process a \fBTcl_FSDeleteFile\fR call. Should be implemented +Function to process a \fBTcl_FSDeleteFile\fR call. Should be implemented unless the FS is read-only. .PP .CS @@ -1371,8 +1446,8 @@ typedef int \fBTcl_FSDeleteFileProc\fR( .CE .PP The return value is a standard Tcl result indicating whether an error -occurred in the process. If successful, the file specified by -\fIpathPtr\fR should have been removed from the filesystem. Note that, +occurred in the process. If successful, the file specified by +\fIpathPtr\fR should have been removed from the filesystem. Note that, if the filesystem supports symbolic links, Tcl will always call this function and not Tcl_FSRemoveDirectoryProc when needed to delete them (even if they are symbolic links to directories). @@ -1383,8 +1458,8 @@ because the core has a fallback implementation available. See each individual description for the consequences of leaving the field NULL. .SS LSTATPROC .PP -Function to process a \fBTcl_FSLstat\fR call. If not implemented, Tcl -will attempt to use the \fIstatProc\fR defined above instead. Therefore +Function to process a \fBTcl_FSLstat\fR call. If not implemented, Tcl +will attempt to use the \fIstatProc\fR defined above instead. Therefore it need only be implemented if a filesystem can differentiate between \fBstat\fR and \fBlstat\fR calls. .PP @@ -1400,7 +1475,7 @@ to a symbolic link, it returns information about the link, not about the target file. .SS COPYFILEPROC .PP -Function to process a \fBTcl_FSCopyFile\fR call. If not implemented Tcl +Function to process a \fBTcl_FSCopyFile\fR call. If not implemented Tcl will fall back on \fBopen\fR-r, \fBopen\fR-w and \fBfcopy\fR as a copying mechanism. Therefore it need only be implemented if the filesystem can perform @@ -1413,21 +1488,21 @@ typedef int \fBTcl_FSCopyFileProc\fR( .CE .PP The return value is a standard Tcl result indicating whether an error -occurred in the copying process. Note that, \fIdestPathPtr\fR is the +occurred in the copying process. Note that, \fIdestPathPtr\fR is the name of the file which should become the copy of \fIsrcPathPtr\fR. It is never the name of a directory into which \fIsrcPathPtr\fR could be -copied (i.e. the function is much simpler than the Tcl level \fBfile -copy\fR subcommand). Note that, +copied (i.e.\ the function is much simpler than the Tcl level \fBfile +copy\fR subcommand). Note that, if the filesystem supports symbolic links, Tcl will always call this function and not \fIcopyDirectoryProc\fR when needed to copy them -(even if they are symbolic links to directories). Finally, if the +(even if they are symbolic links to directories). Finally, if the filesystem determines it cannot support the \fBfile copy\fR action, calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR result will tell Tcl to use its standard fallback mechanisms. .SS RENAMEFILEPROC .PP -Function to process a \fBTcl_FSRenameFile\fR call. If not implemented, -Tcl will fall back on a copy and delete mechanism. Therefore it need +Function to process a \fBTcl_FSRenameFile\fR call. If not implemented, +Tcl will fall back on a copy and delete mechanism. Therefore it need only be implemented if the filesystem can perform that action more efficiently. .PP @@ -1438,15 +1513,15 @@ typedef int \fBTcl_FSRenameFileProc\fR( .CE .PP The return value is a standard Tcl result indicating whether an error -occurred in the renaming process. If the +occurred in the renaming process. If the filesystem determines it cannot support the \fBfile rename\fR action, calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR result will tell Tcl to use its standard fallback mechanisms. .SS COPYDIRECTORYPROC .PP -Function to process a \fBTcl_FSCopyDirectory\fR call. If not +Function to process a \fBTcl_FSCopyDirectory\fR call. If not implemented, Tcl will fall back on a recursive \fBfile mkdir\fR, \fBfile copy\fR -mechanism. Therefore it need only be implemented if the filesystem can +mechanism. Therefore it need only be implemented if the filesystem can perform that action more efficiently. .PP .CS @@ -1457,21 +1532,21 @@ typedef int \fBTcl_FSCopyDirectoryProc\fR( .CE .PP The return value is a standard Tcl result indicating whether an error -occurred in the copying process. If an error does occur, the name of +occurred in the copying process. If an error does occur, the name of the file or directory which caused the error should be placed in \fIerrorPtr\fR. Note that, \fIdestPathPtr\fR is the name of the directory-name which should become the mirror-image of \fIsrcPathPtr\fR. It is not the name of a directory into which -\fIsrcPathPtr\fR should be copied (i.e. the function is much simpler -than the Tcl level \fBfile copy\fR subcommand). Finally, if the +\fIsrcPathPtr\fR should be copied (i.e.\ the function is much simpler +than the Tcl level \fBfile copy\fR subcommand). Finally, if the filesystem determines it cannot support the directory copy action, calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR result will tell Tcl to use its standard fallback mechanisms. .SS LOADFILEPROC .PP -Function to process a \fBTcl_FSLoadFile\fR call. If not implemented, Tcl +Function to process a \fBTcl_FSLoadFile\fR call. If not implemented, Tcl will fall back on a copy to native-temp followed by a \fBTcl_FSLoadFile\fR on -that temporary copy. Therefore it need only be implemented if the +that temporary copy. Therefore it need only be implemented if the filesystem can load code directly, or it can be implemented simply to return \fBTCL_ERROR\fR to disable load functionality in this filesystem entirely. @@ -1484,23 +1559,23 @@ typedef int \fBTcl_FSLoadFileProc\fR( Tcl_FSUnloadFileProc *\fIunloadProcPtr\fR); .CE .PP -Returns a standard Tcl completion code. If an error occurs, an error -message is left in the \fIinterp\fR's result. The function dynamically loads a -binary code file into memory. On a successful load, the \fIhandlePtr\fR +Returns a standard Tcl completion code. If an error occurs, an error +message is left in the \fIinterp\fR's result. The function dynamically loads a +binary code file into memory. On a successful load, the \fIhandlePtr\fR should be filled with a token for the dynamically loaded file, and the \fIunloadProcPtr\fR should be filled in with the address of a procedure. The unload procedure will be called with the given \fBTcl_LoadHandle\fR as its -only parameter when Tcl needs to unload the file. For example, for the +only parameter when Tcl needs to unload the file. For example, for the native filesystem, the \fBTcl_LoadHandle\fR returned is currently a token which can be used in the private \fBTclpFindSymbol\fR to access functions -in the new code. Each filesystem is free to define the -\fBTcl_LoadHandle\fR as it requires. Finally, if the +in the new code. Each filesystem is free to define the +\fBTcl_LoadHandle\fR as it requires. Finally, if the filesystem determines it cannot support the file load action, calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR result will tell Tcl to use its standard fallback mechanisms. .SS UNLOADFILEPROC .PP -Function to unload a previously successfully loaded file. If load was +Function to unload a previously successfully loaded file. If load was implemented, then this should also be implemented, if there is any cleanup action required. .PP @@ -1510,9 +1585,9 @@ typedef void \fBTcl_FSUnloadFileProc\fR( .CE .SS GETCWDPROC .PP -Function to process a \fBTcl_FSGetCwd\fR call. Most filesystems need not -implement this. It will usually only be called once, if \fBgetcwd\fR is -called before \fBchdir\fR. May be NULL. +Function to process a \fBTcl_FSGetCwd\fR call. Most filesystems need not +implement this. It will usually only be called once, if \fBgetcwd\fR is +called before \fBchdir\fR. May be NULL. .PP .CS typedef Tcl_Obj *\fBTcl_FSGetCwdProc\fR( @@ -1522,19 +1597,19 @@ typedef Tcl_Obj *\fBTcl_FSGetCwdProc\fR( If the filesystem supports a native notion of a current working directory (which might perhaps change independent of Tcl), this function should return that cwd as the result, or NULL if the current -directory could not be determined (e.g. the user does not have -appropriate permissions on the cwd directory). If NULL is returned, an +directory could not be determined (e.g.\ the user does not have +appropriate permissions on the cwd directory). If NULL is returned, an error message is left in the \fIinterp\fR's result. .SS CHDIRPROC .PP -Function to process a \fBTcl_FSChdir\fR call. If filesystems do not +Function to process a \fBTcl_FSChdir\fR call. If filesystems do not implement this, it will be emulated by a series of directory access -checks. Otherwise, virtual filesystems which do implement it need only +checks. Otherwise, virtual filesystems which do implement it need only respond with a positive return result if the \fIpathPtr\fR is a valid, -accessible directory in their filesystem. They need not remember the +accessible directory in their filesystem. They need not remember the result, since that will be automatically remembered for use by \fBTcl_FSGetCwd\fR. -Real filesystems should carry out the correct action (i.e. call the +Real filesystems should carry out the correct action (i.e.\ call the correct system \fBchdir\fR API). .PP .CS @@ -1546,6 +1621,6 @@ The \fBTcl_FSChdirProc\fR changes the applications current working directory to the value specified in \fIpathPtr\fR. The function returns -1 on error or 0 on success. .SH "SEE ALSO" -cd(n), file(n), load(n), open(n), pwd(n), unload(n) +cd(n), file(n), filename(n), load(n), open(n), pwd(n), source(n), unload(n) .SH KEYWORDS stat, access, filesystem, vfs, virtual diff --git a/generic/tcl.decls b/generic/tcl.decls index 1351e02..0d8fea6 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.143 2008/08/21 21:35:37 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.144 2008/09/24 09:41:13 dkf Exp $ library tcl @@ -2146,6 +2146,47 @@ declare 588 generic { Tcl_Obj *CONST objv[]) } +# Tcl_StatBuf reader functions. [TIP #316] +declare 589 generic { + unsigned Tcl_GetFSDeviceFromStat(const Tcl_StatBuf *statPtr) +} +declare 590 generic { + unsigned Tcl_GetFSInodeFromStat(const Tcl_StatBuf *statPtr) +} +declare 591 generic { + unsigned Tcl_GetModeFromStat(const Tcl_StatBuf *statPtr) +} +declare 592 generic { + int Tcl_GetLinkCountFromStat(const Tcl_StatBuf *statPtr) +} +declare 593 generic { + int Tcl_GetUserIdFromStat(const Tcl_StatBuf *statPtr) +} +declare 594 generic { + int Tcl_GetGroupIdFromStat(const Tcl_StatBuf *statPtr) +} +declare 595 generic { + int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr) +} +declare 596 generic { + Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr) +} +declare 597 generic { + Tcl_WideInt Tcl_GetModificationTimeFromStat(const Tcl_StatBuf *statPtr) +} +declare 598 generic { + Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr) +} +declare 599 generic { + Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr) +} +declare 600 generic { + Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr) +} +declare 601 generic { + unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are diff --git a/generic/tclDecls.h b/generic/tclDecls.h index d80093a..96d1774 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.145 2008/08/21 21:35:38 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.146 2008/09/24 09:41:13 dkf Exp $ */ #ifndef _TCLDECLS @@ -3566,6 +3566,82 @@ EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); #endif +#ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED +#define Tcl_GetFSDeviceFromStat_TCL_DECLARED +/* 589 */ +EXTERN unsigned Tcl_GetFSDeviceFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetFSInodeFromStat_TCL_DECLARED +#define Tcl_GetFSInodeFromStat_TCL_DECLARED +/* 590 */ +EXTERN unsigned Tcl_GetFSInodeFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetModeFromStat_TCL_DECLARED +#define Tcl_GetModeFromStat_TCL_DECLARED +/* 591 */ +EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetLinkCountFromStat_TCL_DECLARED +#define Tcl_GetLinkCountFromStat_TCL_DECLARED +/* 592 */ +EXTERN int Tcl_GetLinkCountFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetUserIdFromStat_TCL_DECLARED +#define Tcl_GetUserIdFromStat_TCL_DECLARED +/* 593 */ +EXTERN int Tcl_GetUserIdFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetGroupIdFromStat_TCL_DECLARED +#define Tcl_GetGroupIdFromStat_TCL_DECLARED +/* 594 */ +EXTERN int Tcl_GetGroupIdFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetDeviceTypeFromStat_TCL_DECLARED +#define Tcl_GetDeviceTypeFromStat_TCL_DECLARED +/* 595 */ +EXTERN int Tcl_GetDeviceTypeFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetAccessTimeFromStat_TCL_DECLARED +#define Tcl_GetAccessTimeFromStat_TCL_DECLARED +/* 596 */ +EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetModificationTimeFromStat_TCL_DECLARED +#define Tcl_GetModificationTimeFromStat_TCL_DECLARED +/* 597 */ +EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetChangeTimeFromStat_TCL_DECLARED +#define Tcl_GetChangeTimeFromStat_TCL_DECLARED +/* 598 */ +EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetSizeFromStat_TCL_DECLARED +#define Tcl_GetSizeFromStat_TCL_DECLARED +/* 599 */ +EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetBlocksFromStat_TCL_DECLARED +#define Tcl_GetBlocksFromStat_TCL_DECLARED +/* 600 */ +EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif +#ifndef Tcl_GetBlockSizeFromStat_TCL_DECLARED +#define Tcl_GetBlockSizeFromStat_TCL_DECLARED +/* 601 */ +EXTERN unsigned Tcl_GetBlockSizeFromStat ( + const Tcl_StatBuf * statBufPtr); +#endif typedef struct TclStubHooks { CONST struct TclPlatStubs *tclPlatStubs; @@ -4214,6 +4290,19 @@ typedef struct TclStubs { int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[], int flags); /* 586 */ void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); /* 588 */ + unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statBufPtr); /* 589 */ + unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statBufPtr); /* 590 */ + unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statBufPtr); /* 591 */ + int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statBufPtr); /* 592 */ + int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statBufPtr); /* 593 */ + int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statBufPtr); /* 594 */ + int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statBufPtr); /* 595 */ + Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statBufPtr); /* 596 */ + Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statBufPtr); /* 597 */ + Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statBufPtr); /* 598 */ + Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statBufPtr); /* 599 */ + Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statBufPtr); /* 600 */ + unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statBufPtr); /* 601 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6642,6 +6731,58 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_NRCallObjProc \ (tclStubsPtr->tcl_NRCallObjProc) /* 588 */ #endif +#ifndef Tcl_GetFSDeviceFromStat +#define Tcl_GetFSDeviceFromStat \ + (tclStubsPtr->tcl_GetFSDeviceFromStat) /* 589 */ +#endif +#ifndef Tcl_GetFSInodeFromStat +#define Tcl_GetFSInodeFromStat \ + (tclStubsPtr->tcl_GetFSInodeFromStat) /* 590 */ +#endif +#ifndef Tcl_GetModeFromStat +#define Tcl_GetModeFromStat \ + (tclStubsPtr->tcl_GetModeFromStat) /* 591 */ +#endif +#ifndef Tcl_GetLinkCountFromStat +#define Tcl_GetLinkCountFromStat \ + (tclStubsPtr->tcl_GetLinkCountFromStat) /* 592 */ +#endif +#ifndef Tcl_GetUserIdFromStat +#define Tcl_GetUserIdFromStat \ + (tclStubsPtr->tcl_GetUserIdFromStat) /* 593 */ +#endif +#ifndef Tcl_GetGroupIdFromStat +#define Tcl_GetGroupIdFromStat \ + (tclStubsPtr->tcl_GetGroupIdFromStat) /* 594 */ +#endif +#ifndef Tcl_GetDeviceTypeFromStat +#define Tcl_GetDeviceTypeFromStat \ + (tclStubsPtr->tcl_GetDeviceTypeFromStat) /* 595 */ +#endif +#ifndef Tcl_GetAccessTimeFromStat +#define Tcl_GetAccessTimeFromStat \ + (tclStubsPtr->tcl_GetAccessTimeFromStat) /* 596 */ +#endif +#ifndef Tcl_GetModificationTimeFromStat +#define Tcl_GetModificationTimeFromStat \ + (tclStubsPtr->tcl_GetModificationTimeFromStat) /* 597 */ +#endif +#ifndef Tcl_GetChangeTimeFromStat +#define Tcl_GetChangeTimeFromStat \ + (tclStubsPtr->tcl_GetChangeTimeFromStat) /* 598 */ +#endif +#ifndef Tcl_GetSizeFromStat +#define Tcl_GetSizeFromStat \ + (tclStubsPtr->tcl_GetSizeFromStat) /* 599 */ +#endif +#ifndef Tcl_GetBlocksFromStat +#define Tcl_GetBlocksFromStat \ + (tclStubsPtr->tcl_GetBlocksFromStat) /* 600 */ +#endif +#ifndef Tcl_GetBlockSizeFromStat +#define Tcl_GetBlockSizeFromStat \ + (tclStubsPtr->tcl_GetBlockSizeFromStat) /* 601 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 999a685..00c7067 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.90 2008/08/13 18:14:44 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.91 2008/09/24 09:41:20 dkf Exp $ */ #include "tclInt.h" @@ -2527,6 +2527,115 @@ Tcl_AllocStatBuf(void) } /* + *--------------------------------------------------------------------------- + * + * Access functions for Tcl_StatBuf -- + * + * These functions provide portable read-only access to the portable + * fields of the Tcl_StatBuf structure (really a 'struct stat', 'struct + * stat64' or something else related). [TIP #316] + * + * Results: + * The value from the field being retrieved. + * + * Side effects: + * None. + * + *--------------------------------------------------------------------------- + */ + +unsigned +Tcl_GetFSDeviceFromStat( + const Tcl_StatBuf *statPtr) +{ + return (unsigned) statPtr->st_dev; +} + +unsigned +Tcl_GetFSInodeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (unsigned) statPtr->st_ino; +} + +unsigned +Tcl_GetModeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (unsigned) statPtr->st_mode; +} + +int +Tcl_GetLinkCountFromStat( + const Tcl_StatBuf *statPtr) +{ + return (int)statPtr->st_nlink; +} + +int +Tcl_GetUserIdFromStat( + const Tcl_StatBuf *statPtr) +{ + return (int) statPtr->st_uid; +} + +int +Tcl_GetGroupIdFromStat( + const Tcl_StatBuf *statPtr) +{ + return (int) statPtr->st_gid; +} + +int +Tcl_GetDeviceTypeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (int) statPtr->st_rdev; +} + +Tcl_WideInt +Tcl_GetAccessTimeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (Tcl_WideInt) statPtr->st_atime; +} + +Tcl_WideInt +Tcl_GetModificationTimeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (Tcl_WideInt) statPtr->st_mtime; +} + +Tcl_WideInt +Tcl_GetChangeTimeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (Tcl_WideInt) statPtr->st_ctime; +} + +Tcl_WideUInt +Tcl_GetSizeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (Tcl_WideUInt) statPtr->st_size; +} + +Tcl_WideUInt +Tcl_GetBlocksFromStat( + const Tcl_StatBuf *statPtr) +{ + return (Tcl_WideUInt) statPtr->st_blocks; +} + +unsigned +Tcl_GetBlockSizeFromStat( + const Tcl_StatBuf *statPtr) +{ + return (unsigned) statPtr->st_blksize; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 49f5029..5572326 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.162 2008/07/29 05:30:38 msofer Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.163 2008/09/24 09:41:20 dkf Exp $ */ #include "tclInt.h" @@ -1114,6 +1114,19 @@ static const TclStubs tclStubs = { Tcl_NRCmdSwap, /* 586 */ Tcl_NRAddCallback, /* 587 */ Tcl_NRCallObjProc, /* 588 */ + Tcl_GetFSDeviceFromStat, /* 589 */ + Tcl_GetFSInodeFromStat, /* 590 */ + Tcl_GetModeFromStat, /* 591 */ + Tcl_GetLinkCountFromStat, /* 592 */ + Tcl_GetUserIdFromStat, /* 593 */ + Tcl_GetGroupIdFromStat, /* 594 */ + Tcl_GetDeviceTypeFromStat, /* 595 */ + Tcl_GetAccessTimeFromStat, /* 596 */ + Tcl_GetModificationTimeFromStat, /* 597 */ + Tcl_GetChangeTimeFromStat, /* 598 */ + Tcl_GetSizeFromStat, /* 599 */ + Tcl_GetBlocksFromStat, /* 600 */ + Tcl_GetBlockSizeFromStat, /* 601 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From f07ede6c19ad5eed75e1dcbc9ffed8322eed5c3b Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Sep 2008 09:51:46 +0000 Subject: Remove obsolete debugging macro. [Bug 2124814] --- ChangeLog | 3 +++ generic/tclOOMethod.c | 8 +------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e67c879..150e93d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-09-24 Donal K. Fellows + * generic/tclOOMethod.c (DBPRINT): Remove obsolete debugging macro. + [Bug 2124814] + TIP #316 IMPLEMENTATION * generic/tcl.decls, generic/tclFileName.c (Tcl_GetSizeFromStat, etc): diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index dfd2d14..34a3172 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.19 2008/09/23 05:05:54 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.20 2008/09/24 09:51:47 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -18,12 +18,6 @@ #include "tclOOInt.h" #include "tclCompile.h" -#if 0 -#define DBPRINT(format, ...) (fprintf(stderr, "DEBUG:" format "\n", __VA_ARGS__)) -#else -#define DBPRINT(format, ...) ((void) 0) -#endif - /* * Structure used to help delay computing names of objects or classes for * [info frame] until needed, making invokation faster in the normal case. -- cgit v0.12 From 320d7eee6064ca0dd8cb639bd5be69ba1540090e Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 24 Sep 2008 19:31:22 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/file.n: Revise [file delete] and [file mkdir] to * generic/tclCmdAH.c: accept zero "pathname" arguments (the * generic/tclFCmd.c: no-op case). * tests/cmdAH.test: * tests/fCmd.test: --- ChangeLog | 10 ++++++++++ doc/file.n | 6 +++--- generic/tclCmdAH.c | 6 +----- generic/tclFCmd.c | 8 +------- tests/cmdAH.test | 6 +++++- tests/fCmd.test | 14 +++++++------- 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 150e93d..2f539a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-09-24 Don Porter + + TIP #323 IMPLEMENTATION (partial) + + * doc/file.n: Revise [file delete] and [file mkdir] to + * generic/tclCmdAH.c: accept zero "pathname" arguments (the + * generic/tclFCmd.c: no-op case). + * tests/cmdAH.test: + * tests/fCmd.test: + 2008-09-24 Donal K. Fellows * generic/tclOOMethod.c (DBPRINT): Remove obsolete debugging macro. diff --git a/doc/file.n b/doc/file.n index 0df79eb..be3cefa 100644 --- a/doc/file.n +++ b/doc/file.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: file.n,v 1.53 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: file.n,v 1.54 2008/09/24 19:31:28 dgp Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -111,7 +111,7 @@ specified, halting at the first error, if any. A \fB\-\|\-\fR marks the end of switches; the argument following the \fB\-\|\-\fR will be treated as a \fIsource\fR even if it starts with a \fB\-\fR. .TP -\fBfile delete \fR?\fB\-force\fR? ?\fB\-\|\-\fR? \fIpathname\fR ?\fIpathname\fR ... ? +\fBfile delete \fR?\fB\-force\fR? ?\fB\-\|\-\fR? ?\fIpathname\fR ... ? . Removes the file or directory specified by each \fIpathname\fR argument. Non-empty directories will be removed only if the @@ -251,7 +251,7 @@ is for the link rather than the file it refers to. On systems that do not support symbolic links this option behaves exactly the same as the \fBstat\fR option. .TP -\fBfile mkdir \fIdir\fR ?\fIdir\fR ...? +\fBfile mkdir ?\fIdir\fR ...? . Creates each directory specified. For each pathname \fIdir\fR specified, this command will create all non-existing parent directories as diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 80aadeb..19a743b 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.104 2008/09/01 12:28:08 msofer Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.105 2008/09/24 19:31:28 dgp Exp $ */ #include "tclInt.h" @@ -1239,10 +1239,6 @@ Tcl_FileObjCmd( GetTypeFromMode((unsigned short) buf.st_mode), -1)); return TCL_OK; case FCMD_MKDIR: - if (objc < 3) { - Tcl_WrongNumArgs(interp, 2, objv, "name ?name ...?"); - return TCL_ERROR; - } return TclFileMakeDirsCmd(interp, objc, objv); case FCMD_NATIVENAME: { const char *fileName; diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index dc13ef4..d385f8e 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.46 2008/07/21 14:42:57 patthoyts Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.47 2008/09/24 19:31:29 dgp Exp $ */ #include "tclInt.h" @@ -351,12 +351,6 @@ TclFileDeleteCmd( return TCL_ERROR; } i += 2; - if ((objc - i) < 1) { - Tcl_AppendResult(interp, "wrong # args: should be \"", - TclGetString(objv[0]), " ", TclGetString(objv[1]), - " ?-option value ...? file ?file ...?\"", NULL); - return TCL_ERROR; - } errfile = NULL; result = TCL_OK; diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 73a8819..cca533f 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.62 2008/09/10 13:50:04 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.63 2008/09/24 19:31:29 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1093,6 +1093,10 @@ test cmdAH-23.10 {Tcl_FileObjCmd: mkdir} -setup { file delete -force $dirA file delete -force $dirB } -result {1 1} +test cmdAH-23.11 {Tcl_FileObjCmd: mkdir} { + # Allow zero arguments (TIP 323) + file mkdir +} {} # mtime diff --git a/tests/fCmd.test b/tests/fCmd.test index 78c0270..78be937 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.64 2008/08/14 00:08:24 das Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.65 2008/09/24 19:31:40 dgp Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -363,9 +363,9 @@ test fCmd-4.16 {TclFileMakeDirsCmd: TclpCreateDirectory succeeds} -setup { test fCmd-5.1 {TclFileDeleteCmd: FileForceOption fails} -constraints {notRoot} -body { file delete -xyz } -returnCodes error -result {bad option "-xyz": should be -force or --} -test fCmd-5.2 {TclFileDeleteCmd: not enough args} -constraints {notRoot} -body { +test fCmd-5.2 {TclFileDeleteCmd: accept 0 files (TIP 323)} -body { file delete -force -force -} -returnCodes error -result {wrong # args: should be "file delete ?-option value ...? file ?file ...?"} +} -result {} test fCmd-5.3 {TclFileDeleteCmd: 1 file} -constraints {notRoot} -setup { cleanup } -body { @@ -1587,12 +1587,12 @@ test fCmd-16.3 {test bad option} -constraints {notRoot} -setup { } -cleanup { file delete tfa } -result {1} -test fCmd-16.4 {test not enough args} -constraints {notRoot} -body { +test fCmd-16.4 {accept zero files (TIP 323)} -body { file delete -} -returnCodes error -match glob -result "wrong \# args: should be *" -test fCmd-16.5 {test not enough args with options} -constraints {notRoot} -body { +} -result {} +test fCmd-16.5 {accept zero files (TIP 323)} -body { file delete -- -} -returnCodes error -match glob -result "wrong \# args: should be *" +} -result {} test fCmd-16.6 {delete: source filename translation failing} -setup { set temp $::env(HOME) } -constraints {notRoot} -body { -- cgit v0.12 From 06f91946030154decdc65de2088fe5633562dae0 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Sep 2008 10:13:21 +0000 Subject: Fix [Bug 2120903] --- ChangeLog | 6 ++++++ generic/tclOOCall.c | 17 ++++++++--------- tests/oo.test | 37 +++++++++++++++++++++++++------------ 3 files changed, 39 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f539a2..19d45a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-25 Donal K. Fellows + + * generic/tclOOCall.c (InitCallChain, IsStillValid): + * tests/oo.test (oo-25.2): Revise call chain cache management so that + it takes into account class-wide caching correctly. [Bug 212090] + 2008-09-24 Don Porter TIP #323 IMPLEMENTATION (partial) diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index e517d28..d4b1297 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.10 2008/07/18 23:29:44 msofer Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.11 2008/09/25 10:13:30 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -832,14 +832,17 @@ InitCallChain( Object *oPtr, int flags) { + callPtr->flags = flags & + (PUBLIC_METHOD | PRIVATE_METHOD | SPECIAL | FILTER_HANDLING); if (oPtr->flags & USE_CLASS_CACHE) { oPtr = oPtr->selfCls->thisPtr; + callPtr->flags |= USE_CLASS_CACHE; + } else { + callPtr->flags &= ~USE_CLASS_CACHE; } callPtr->epoch = oPtr->fPtr->epoch; callPtr->objectCreationEpoch = oPtr->creationEpoch; callPtr->objectEpoch = oPtr->epoch; - callPtr->flags = flags & - (PUBLIC_METHOD | PRIVATE_METHOD | SPECIAL | FILTER_HANDLING); callPtr->refCount = 1; callPtr->numChain = 0; callPtr->chain = callPtr->staticChain; @@ -869,12 +872,8 @@ IsStillValid( int mask) { if ((oPtr->flags & USE_CLASS_CACHE)) { - register Object *coPtr = oPtr->selfCls->thisPtr; - - return ((callPtr->objectCreationEpoch == coPtr->creationEpoch) - && (callPtr->epoch == coPtr->fPtr->epoch) - && (callPtr->objectEpoch == coPtr->epoch) - && ((callPtr->flags & mask) == (flags & mask))); + oPtr = oPtr->selfCls->thisPtr; + flags |= USE_CLASS_CACHE; } return ((callPtr->objectCreationEpoch == oPtr->creationEpoch) && (callPtr->epoch == oPtr->fPtr->epoch) diff --git a/tests/oo.test b/tests/oo.test index 5b261f7..f221e1f 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.12 2008/09/23 05:05:54 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.13 2008/09/25 10:13:33 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1786,6 +1786,19 @@ test oo-25.1 {call chain caching} -setup { oo::objdefine foo method ab {} {return good} lappend result [foo $m1] [bar $m2] } -result {ok ok ok ok ok ok good ok} +test oo-25.2 {call chain caching - Bug #2120903} -setup { + set c [oo::class create MyClass] + set o [$c new] +} -body { + oo::define MyClass { + method name {} {return ok} + method isa o {MyClass name $o} + self method name o {$o name} + } + list [$o name] [$c name $o] [$o isa $o] +} -cleanup { + $c destroy +} -result {ok ok ok} test oo-26.1 {Bug 2037727} -setup { proc succeed args {} @@ -1830,7 +1843,7 @@ test oo-26.3 {Bug 2037727} -setup { example destroy } -result {{} nonempty} -test oo-26.1 {variables declaration - class introspection} -setup { +test oo-27.1 {variables declaration - class introspection} -setup { oo::class create foo } -cleanup { foo destroy @@ -1838,7 +1851,7 @@ test oo-26.1 {variables declaration - class introspection} -setup { oo::define foo variable a b c info class variables foo } -result {a b c} -test oo-26.2 {variables declaration - object introspection} -setup { +test oo-27.2 {variables declaration - object introspection} -setup { oo::object create foo } -cleanup { foo destroy @@ -1846,7 +1859,7 @@ test oo-26.2 {variables declaration - object introspection} -setup { oo::objdefine foo variable a b c info object variables foo } -result {a b c} -test oo-26.3 {variables declaration - basic behaviour} -setup { +test oo-27.3 {variables declaration - basic behaviour} -setup { oo::class create master } -cleanup { master destroy @@ -1861,7 +1874,7 @@ test oo-26.3 {variables declaration - basic behaviour} -setup { bar y bar y } -result 3 -test oo-26.4 {variables declaration - destructors too} -setup { +test oo-27.4 {variables declaration - destructors too} -setup { oo::class create master set result bad! } -cleanup { @@ -1880,7 +1893,7 @@ test oo-26.4 {variables declaration - destructors too} -setup { bar destroy return $result } -result 3 -test oo-26.5 {variables declaration - object-bound variables} -setup { +test oo-27.5 {variables declaration - object-bound variables} -setup { oo::object create foo } -cleanup { foo destroy @@ -1892,7 +1905,7 @@ test oo-26.5 {variables declaration - object-bound variables} -setup { foo y foo y } -result 2 -test oo-26.6 {variables declaration - non-interference of levels} -setup { +test oo-27.6 {variables declaration - non-interference of levels} -setup { oo::class create master } -cleanup { master destroy @@ -1912,7 +1925,7 @@ test oo-26.6 {variables declaration - non-interference of levels} -setup { bar y list [bar y] [lsort [info object vars bar]] [bar eval {info vars *!}] } -result {{3 2 y! {}} {x! y!} {x! y!}} -test oo-26.7 {variables declaration - one underlying variable space} -setup { +test oo-27.7 {variables declaration - one underlying variable space} -setup { oo::class create master } -cleanup { master destroy @@ -1938,13 +1951,13 @@ test oo-26.7 {variables declaration - one underlying variable space} -setup { bar x list [bar y] [bar x] [bar z] } -result {3 40 {3 40}} -test oo-26.8 {variables declaration - error cases - ns separators} -body { +test oo-27.8 {variables declaration - error cases - ns separators} -body { oo::define oo::object variable bad::var } -returnCodes error -result {invalid declared variable name "bad::var": must not contain namespace separators} -test oo-26.9 {variables declaration - error cases - arrays} -body { +test oo-27.9 {variables declaration - error cases - arrays} -body { oo::define oo::object variable bad(var) } -returnCodes error -result {invalid declared variable name "bad(var)": must not refer to an array element} -test oo-26.10 {variables declaration - no instance var leaks with class resolvers} -setup { +test oo-27.10 {variables declaration - no instance var leaks with class resolvers} -setup { oo::class create master } -cleanup { master destroy @@ -1972,7 +1985,7 @@ test oo-26.10 {variables declaration - no instance var leaks with class resolver inst1 step list [inst1 value] [inst2 value] } -result {3 2} -test oo-26.11 {variables declaration - no instance var leaks with class resolvers} -setup { +test oo-27.11 {variables declaration - no instance var leaks with class resolvers} -setup { oo::class create master } -cleanup { master destroy -- cgit v0.12 From 2d31ebbd1bc8a4e30fe60d0da6fc679dcb967262 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Sep 2008 10:15:04 +0000 Subject: slightly more efficient --- generic/tclOOCall.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index d4b1297..8c6c15b 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.11 2008/09/25 10:13:30 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.12 2008/09/25 10:15:04 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -837,8 +837,6 @@ InitCallChain( if (oPtr->flags & USE_CLASS_CACHE) { oPtr = oPtr->selfCls->thisPtr; callPtr->flags |= USE_CLASS_CACHE; - } else { - callPtr->flags &= ~USE_CLASS_CACHE; } callPtr->epoch = oPtr->fPtr->epoch; callPtr->objectCreationEpoch = oPtr->creationEpoch; -- cgit v0.12 From 48db43a92ff221fa237f2c4d1d809ed0397c072c Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Sep 2008 10:17:18 +0000 Subject: correct bug number --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 19d45a8..bdcb0d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,7 @@ * generic/tclOOCall.c (InitCallChain, IsStillValid): * tests/oo.test (oo-25.2): Revise call chain cache management so that - it takes into account class-wide caching correctly. [Bug 212090] + it takes into account class-wide caching correctly. [Bug 2120903] 2008-09-24 Don Porter -- cgit v0.12 From 1056d12d5d7546c76677aeda3affb83316306329 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Sep 2008 14:30:09 +0000 Subject: Implement TIP #315. --- ChangeLog | 6 ++++++ doc/tclvars.n | 12 +++++++++++- unix/tclUnixInit.c | 8 +++++++- win/tclWinInit.c | 8 +++++++- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdcb0d7..7ae0b15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-09-25 Donal K. Fellows + TIP #315 IMPLEMENTATION + + * unix/tclUnixInit.c, win/tclWinInit.c (TclpSetVariables): + * doc/tclvars.n (tcl_platform): Define what character is used for + separating PATH-like lists. Forms part of the tcl_platform array. + * generic/tclOOCall.c (InitCallChain, IsStillValid): * tests/oo.test (oo-25.2): Revise call chain cache management so that it takes into account class-wide caching correctly. [Bug 2120903] diff --git a/doc/tclvars.n b/doc/tclvars.n index fffa786..6235011 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.37 2008/08/27 12:47:27 dkf Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.38 2008/09/25 14:30:23 dkf Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" @@ -305,6 +305,13 @@ On UNIX machines, this is the value returned by \fBuname -r\fR. On Windows 95, the version will be 4.0; on Windows 98, the version will be 4.10. .TP +\fBpathSeparator +.VS 8.6 +'\" Defined by TIP #315 +The character that should be used to \fBsplit\fR PATH-like environment +variables into their corresponding list of directory names. +.VE 8.6 +.TP \fBplatform\fR . Either \fBwindows\fR, or \fBunix\fR. This identifies the @@ -489,3 +496,6 @@ the main Tk window. eval(n), library(n), tclsh(1), wish(1) .SH KEYWORDS arithmetic, bytecode, compiler, error, environment, POSIX, precision, subprocess, variables +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 0b3cdc9..03c0cd6 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUnixInit.c,v 1.84 2008/07/13 09:03:41 msofer Exp $ + * RCS: @(#) $Id: tclUnixInit.c,v 1.85 2008/09/25 14:30:21 dkf Exp $ */ #include "tclInt.h" @@ -888,6 +888,12 @@ TclpSetVariables( Tcl_SetVar2(interp, "tcl_platform", "user", user, TCL_GLOBAL_ONLY); Tcl_DStringFree(&ds); } + + /* + * Define what the platform PATH separator is. [TIP #315] + */ + + Tcl_SetVar2(interp, "tcl_platform","pathSeparator", ":", TCL_GLOBAL_ONLY); } /* diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 4d25ec8..97bd9cf 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.76 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.77 2008/09/25 14:30:23 dkf Exp $ */ #include "tclWinInt.h" @@ -584,6 +584,12 @@ TclpSetVariables( Tcl_SetVar2(interp, "tcl_platform", "user", Tcl_DStringValue(&ds), TCL_GLOBAL_ONLY); Tcl_DStringFree(&ds); + + /* + * Define what the platform PATH separator is. [TIP #315] + */ + + Tcl_SetVar2(interp, "tcl_platform","pathSeparator", ";", TCL_GLOBAL_ONLY); } /* -- cgit v0.12 From 7bf6e2558f5324998ed7af4c9b24f2f4f3f4bb49 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 25 Sep 2008 14:37:59 +0000 Subject: overlooked 85 -> 86 bump --- tools/tcl.hpj.in | 4 ++-- win/README | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/tcl.hpj.in b/tools/tcl.hpj.in index 0d01f35..3bdccbe 100644 --- a/tools/tcl.hpj.in +++ b/tools/tcl.hpj.in @@ -5,9 +5,9 @@ HCW=0 LCID=0x409 0x0 0x0 ;English (United States) REPORT=Yes TITLE=Tcl/Tk Reference Manual -CNT=tcl85.cnt +CNT=tcl86.cnt COPYRIGHT=Copyright © 2000 Ajuba Solutions -HLP=tcl85.hlp +HLP=tcl86.hlp [FILES] tcl.rtf diff --git a/win/README b/win/README index 56ab134..73c5aec 100644 --- a/win/README +++ b/win/README @@ -1,6 +1,6 @@ Tcl 8.6 for Windows -RCS: @(#) $Id: README,v 1.39 2008/04/19 02:04:34 mdejong Exp $ +RCS: @(#) $Id: README,v 1.40 2008/09/25 14:37:59 dgp Exp $ 1. Introduction --------------- @@ -68,9 +68,9 @@ Use the Makefile "install" target to install Tcl. It will install it according to the prefix options you provided in the correct directory structure. -Note that in order to run tclsh85.exe, you must ensure that tcl85.dll is on +Note that in order to run tclsh86.exe, you must ensure that tcl86.dll is on your path, in the system directory, or in the directory containing -tclsh85.exe. +tclsh86.exe. Note: Tcl no longer provides support for Win32s. -- cgit v0.12 From f4151635b12b2c9b62d1b638b7096875bb65bc76 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 25 Sep 2008 18:06:17 +0000 Subject: * tests/platform.test: Update tests to expect revised results * tests/safe.test: corresponding to the TIP 315 change. --- ChangeLog | 3 +++ tests/platform.test | 2 +- tests/safe.test | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ae0b15..30b94f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ TIP #315 IMPLEMENTATION + * tests/platform.test: Update tests to expect revised results + * tests/safe.test: corresponding to the TIP 315 change. + * unix/tclUnixInit.c, win/tclWinInit.c (TclpSetVariables): * doc/tclvars.n (tcl_platform): Define what character is used for separating PATH-like lists. Forms part of the tcl_platform array. diff --git a/tests/platform.test b/tests/platform.test index 7eda53c..fd9ed66 100644 --- a/tests/platform.test +++ b/tests/platform.test @@ -25,7 +25,7 @@ test platform-1.1 {TclpSetVariables: tcl_platform} { set result [i eval {lsort [array names tcl_platform]}] interp delete i set result -} {byteOrder machine os osVersion platform pointerSize user wordSize} +} {byteOrder machine os osVersion pathSeparator platform pointerSize user wordSize} # Test assumes twos-complement arithmetic, which is true of virtually # everything these days. Note that this does *not* use wide(), and diff --git a/tests/safe.test b/tests/safe.test index fb66f8c..a97ea51 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.23 2008/06/25 17:40:05 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.test,v 1.24 2008/09/25 18:06:44 dgp Exp $ package require Tcl 8.5 @@ -184,7 +184,7 @@ test safe-6.3 {test safe interpreters knowledge of the world} { set r [lreplace $r $threaded $threaded] } set r -} {byteOrder platform pointerSize wordSize} +} {byteOrder pathSeparator platform pointerSize wordSize} # more test should be added to check that hostname, nameofexecutable, # aren't leaking infos, but they still do... -- cgit v0.12 From 5115781cfdf86915300c18ff4ec8e51c09a30219 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 25 Sep 2008 19:26:36 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/global.n: Revise [global] to accept zero variable names. * generic/tclVar.c: * tests/proc-old.test: * tests/var.test: * doc/global.n: Correct false claim about [info locals]. --- ChangeLog | 11 +++++++++++ doc/global.n | 9 +++++---- generic/tclVar.c | 7 +------ tests/proc-old.test | 5 +---- tests/var.test | 11 ++++++++++- 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30b94f0..4db062d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-09-25 Don Porter + + TIP #323 IMPLEMENTATION (partial) + + * doc/global.n: Revise [global] to accept zero variable names. + * generic/tclVar.c: + * tests/proc-old.test: + * tests/var.test: + + * doc/global.n: Correct false claim about [info locals]. + 2008-09-25 Donal K. Fellows TIP #315 IMPLEMENTATION diff --git a/doc/global.n b/doc/global.n index e330954..bcf4391 100644 --- a/doc/global.n +++ b/doc/global.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: global.n,v 1.12 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: global.n,v 1.13 2008/09/25 19:26:36 dgp Exp $ '\" .so man.macros .TH global n "" Tcl "Tcl Built-In Commands" @@ -14,15 +14,16 @@ .SH NAME global \- Access global variables .SH SYNOPSIS -\fBglobal \fIvarname \fR?\fIvarname ...\fR? +\fBglobal \fR?\fIvarname ...\fR? .BE .SH DESCRIPTION .PP This command has no effect unless executed in the context of a proc body. If the \fBglobal\fR command is executed in the context of a proc body, it -creates local variables linked to the corresponding global variables (and -therefore these variables are listed by info locals). +creates local variables linked to the corresponding global variables (though +these linked variables, like those created by \fBupvar\fR, are not included +in the list returned by \fBinfo locals\fR). .PP If \fIvarname\fR contains namespace qualifiers, the local variable's name is the unqualified name of the global variable, as determined by the diff --git a/generic/tclVar.c b/generic/tclVar.c index f4e1ad3..e609c70 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.166 2008/08/06 20:58:49 msofer Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.167 2008/09/25 19:26:38 dgp Exp $ */ #include "tclInt.h" @@ -3833,11 +3833,6 @@ Tcl_GlobalObjCmd( register char *tail; int result, i; - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "varName ?varName ...?"); - return TCL_ERROR; - } - /* * If we are not executing inside a Tcl procedure, just return. */ diff --git a/tests/proc-old.test b/tests/proc-old.test index d0a116e..29a0607 100644 --- a/tests/proc-old.test +++ b/tests/proc-old.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: proc-old.test,v 1.16 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: proc-old.test,v 1.17 2008/09/25 19:26:39 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -284,9 +284,6 @@ test proc-old-5.7 {error conditions} { test proc-old-5.8 {error conditions} { catch {return} } 2 -test proc-old-5.9 {error conditions} { - list [catch {global} msg] $msg -} {1 {wrong # args: should be "global varName ?varName ...?"}} proc tproc {} { set a 22 global a diff --git a/tests/var.test b/tests/var.test index 5797434..c160cbd 100644 --- a/tests/var.test +++ b/tests/var.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: var.test,v 1.32 2008/07/13 23:15:22 nijtmans Exp $ +# RCS: @(#) $Id: var.test,v 1.33 2008/09/25 19:26:40 dgp Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -352,6 +352,15 @@ test var-6.4 {Tcl_GlobalObjCmd, variable name matching :*} { p set :v } {fixed} +test var-6.5 {Tcl_GlobalObjCmd, no-op case (TIP 323)} { + global +} {} +test var-6.6 {Tcl_GlobalObjCmd, no-op case (TIP 323)} { + proc p {} { + global + } + p +} {} test var-7.1 {Tcl_VariableObjCmd, create and initialize one new ns variable} { catch {namespace delete test_ns_var} -- cgit v0.12 From bea1848e0fa6da616457fc0ce680644388a7e117 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 25 Sep 2008 19:51:26 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/global.n: Revise [global] to accept zero variable names. * doc/variable.n: Revise [variable] likewise. * generic/tclVar.c: * tests/proc-old.test: * tests/var.test: --- ChangeLog | 1 + doc/variable.n | 6 ++++-- generic/tclVar.c | 7 +------ tests/var.test | 14 +++++++------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4db062d..86b9324 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ TIP #323 IMPLEMENTATION (partial) * doc/global.n: Revise [global] to accept zero variable names. + * doc/variable.n: Revise [variable] likewise. * generic/tclVar.c: * tests/proc-old.test: * tests/var.test: diff --git a/doc/variable.n b/doc/variable.n index fa99930..6e5b5c4 100644 --- a/doc/variable.n +++ b/doc/variable.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: variable.n,v 1.8 2005/05/10 18:34:04 kennykb Exp $ +'\" RCS: @(#) $Id: variable.n,v 1.9 2008/09/25 19:51:28 dgp Exp $ '\" .so man.macros .TH variable n 8.0 Tcl "Tcl Built-In Commands" @@ -14,7 +14,9 @@ .SH NAME variable \- create and initialize a namespace variable .SH SYNOPSIS -\fBvariable \fR?\fIname value...\fR? \fIname \fR?\fIvalue\fR? +\fBvariable \fIname +.sp +\fBvariable \fR?\fIname value...\fR? .BE .SH DESCRIPTION diff --git a/generic/tclVar.c b/generic/tclVar.c index e609c70..15b1856 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.167 2008/09/25 19:26:38 dgp Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.168 2008/09/25 19:51:29 dgp Exp $ */ #include "tclInt.h" @@ -3938,11 +3938,6 @@ Tcl_VariableObjCmd( int i, result; Tcl_Obj *varNamePtr, *tailPtr; - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "?name value ...? name ?value?"); - return TCL_ERROR; - } - for (i=1 ; i Date: Fri, 26 Sep 2008 12:53:56 +0000 Subject: Bump the TclOO version. (Forgot when checking in TIP320 impl.) --- ChangeLog | 4 ++++ generic/tclOO.h | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86b9324..3c4d6a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-09-26 Donal K. Fellows + + * generic/tclOO.h (TCLOO_VERSION): Bump the version. + 2008-09-25 Don Porter TIP #323 IMPLEMENTATION (partial) diff --git a/generic/tclOO.h b/generic/tclOO.h index cc5c8ce..b16938b 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.h,v 1.5 2008/06/25 14:35:39 dgp Exp $ + * RCS: @(#) $Id: tclOO.h,v 1.6 2008/09/26 12:54:00 dkf Exp $ */ #ifndef TCLOO_H_INCLUDED @@ -24,10 +24,11 @@ #endif /* - * Must match version at top of ../configure.in + * Be careful when it comes to versioning; need to make sure that the + * standalone TclOO version matches... */ -#define TCLOO_VERSION "0.5" +#define TCLOO_VERSION "0.6" #define TCLOO_PATCHLEVEL TCLOO_VERSION /* -- cgit v0.12 From 7a8e8db83501823dbe441944d6107f249accb2e8 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 26 Sep 2008 19:12:35 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/lassign.n: Revise [lassign] to accept zero variable names. * generic/tclCmdIL.c: * tests/cmdIL.test: --- ChangeLog | 8 ++++++++ doc/lassign.n | 4 ++-- generic/tclCmdIL.c | 6 +++--- tests/cmdIL.test | 14 +++++++------- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c4d6a3..a033663 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-26 Don Porter + + TIP #323 IMPLEMENTATION (partial) + + * doc/lassign.n: Revise [lassign] to accept zero variable names. + * generic/tclCmdIL.c: + * tests/cmdIL.test: + 2008-09-26 Donal K. Fellows * generic/tclOO.h (TCLOO_VERSION): Bump the version. diff --git a/doc/lassign.n b/doc/lassign.n index 4d4a5af..57bd7b4 100644 --- a/doc/lassign.n +++ b/doc/lassign.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lassign.n,v 1.5 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: lassign.n,v 1.6 2008/09/26 19:12:40 dgp Exp $ '\" .so man.macros .TH lassign n 8.5 Tcl "Tcl Built-In Commands" @@ -14,7 +14,7 @@ .SH NAME lassign \- Assign list elements to variables .SH SYNOPSIS -\fBlassign \fIlist varName \fR?\fIvarName ...\fR? +\fBlassign \fIlist \fR?\fIvarName ...\fR? .BE .SH DESCRIPTION diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index a96f555..e1e15e1 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.151 2008/08/21 23:57:43 msofer Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.152 2008/09/26 19:12:42 dgp Exp $ */ #include "tclInt.h" @@ -2060,8 +2060,8 @@ Tcl_LassignObjCmd( int listObjc; /* The length of the list. */ int code = TCL_OK; - if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "list varName ?varName ...?"); + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "list ?varName ...?"); return TCL_ERROR; } diff --git a/tests/cmdIL.test b/tests/cmdIL.test index ca9377a..01fc09e 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdIL.test,v 1.40 2008/09/10 13:50:05 dkf Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.41 2008/09/26 19:12:42 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -438,10 +438,10 @@ test cmdIL-5.5 {lsort with list style index and sharing} -body { # Compiled version test cmdIL-6.1 {lassign command syntax} -returnCodes error -body { apply {{} { lassign }} -} -result {wrong # args: should be "lassign list varName ?varName ...?"} -test cmdIL-6.2 {lassign command syntax} -returnCodes error -body { +} -result {wrong # args: should be "lassign list ?varName ...?"} +test cmdIL-6.2 {lassign command syntax} { apply {{} { lassign x }} -} -result {wrong # args: should be "lassign list varName ?varName ...?"} +} x test cmdIL-6.3 {lassign command} -body { apply {{} { set x FAIL @@ -534,13 +534,13 @@ test cmdIL-6.13 {lassign command syntax} -returnCodes error -body { set lassign lassign $lassign }} -} -result {wrong # args: should be "lassign list varName ?varName ...?"} -test cmdIL-6.14 {lassign command syntax} -returnCodes error -body { +} -result {wrong # args: should be "lassign list ?varName ...?"} +test cmdIL-6.14 {lassign command syntax} { apply {{} { set lassign lassign $lassign x }} -} -result {wrong # args: should be "lassign list varName ?varName ...?"} +} x test cmdIL-6.15 {lassign command} -body { apply {{} { set lassign lassign -- cgit v0.12 From ed14e02fc83fc5a7dab826db93ce7e2d4e276a96 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 26 Sep 2008 19:36:47 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/namespace.n: Revise [namespace upvar] to accept zero * generic/tclNamesp.c: variable names. * tests/upvar.test: --- ChangeLog | 4 ++++ doc/namespace.n | 6 +++--- generic/tclNamesp.c | 6 +++--- tests/upvar.test | 15 ++++++++++++++- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a033663..1fca8c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ TIP #323 IMPLEMENTATION (partial) + * doc/namespace.n: Revise [namespace upvar] to accept zero + * generic/tclNamesp.c: variable names. + * tests/upvar.test: + * doc/lassign.n: Revise [lassign] to accept zero variable names. * generic/tclCmdIL.c: * tests/cmdIL.test: diff --git a/doc/namespace.n b/doc/namespace.n index 0450659..f2bc686 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.32 2008/09/07 14:01:54 msofer Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.33 2008/09/26 19:36:50 dgp Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -278,9 +278,9 @@ This command is the complement of the \fBnamespace qualifiers\fR command. It does not check whether the namespace names are, in fact, the names of currently defined namespaces. .TP -\fBnamespace upvar\fR \fInamespace\fR \fIotherVar myVar \fR?\fIotherVar myVar \fR... +\fBnamespace upvar\fR \fInamespace\fR ?\fIotherVar myVar \fR... . -This command arranges for one or more local variables in the current +This command arranges for zero or more local variables in the current procedure to refer to variables in \fInamespace\fR. The namespace name is resolved as described in section \fBNAME RESOLUTION\fR. The command diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 55f9200..e08ab4e 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.176 2008/08/23 11:35:54 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.177 2008/09/26 19:36:50 dgp Exp $ */ #include "tclInt.h" @@ -4495,9 +4495,9 @@ NamespaceUpvarCmd( Var *otherPtr, *arrayPtr; char *myName; - if (objc < 5 || !(objc & 1)) { + if (objc < 3 || !(objc & 1)) { Tcl_WrongNumArgs(interp, 2, objv, - "ns otherVar myVar ?otherVar myVar ...?"); + "ns ?otherVar myVar ...?"); return TCL_ERROR; } diff --git a/tests/upvar.test b/tests/upvar.test index bcad004..d774626 100644 --- a/tests/upvar.test +++ b/tests/upvar.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: upvar.test,v 1.16 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: upvar.test,v 1.17 2008/09/26 19:36:51 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -544,6 +544,19 @@ test upvar-NS-1.9 {nsupvar links to correct variable} \ -returnCodes error \ -cleanup {namespace delete test_ns_1} +test upvar-NS-2.1 {TIP 323} -returnCodes error -body { + namespace upvar +} -result {wrong # args: should be "namespace upvar ns ?otherVar myVar ...?"} + +test upvar-NS-2.1 {TIP 323} -setup { + namespace eval test_ns_1 {} +} -body { + namespace upvar test_ns_1 +} -cleanup { + namespace delete test_ns_1 +} -result {} + + # cleanup ::tcltest::cleanupTests -- cgit v0.12 From 030aaf8733e03063daa3c730c5b258575b9386ba Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 26 Sep 2008 19:54:56 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/tm.n: Revise [tcl::tm::path add] and * library/tm.tcl: [tcl::tm::path remove] to accept zero paths. * tests/tm.test: --- ChangeLog | 4 ++++ doc/tm.n | 6 +++--- library/tm.tcl | 8 ++++---- tests/tm.test | 10 +++++----- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1fca8c8..2f53284 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ TIP #323 IMPLEMENTATION (partial) + * doc/tm.n: Revise [tcl::tm::path add] and + * library/tm.tcl: [tcl::tm::path remove] to accept zero paths. + * tests/tm.test: + * doc/namespace.n: Revise [namespace upvar] to accept zero * generic/tclNamesp.c: variable names. * tests/upvar.test: diff --git a/doc/tm.n b/doc/tm.n index 883eb4c..3deca0f 100644 --- a/doc/tm.n +++ b/doc/tm.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tm.n,v 1.16 2008/06/25 18:18:37 dgp Exp $ +'\" RCS: @(#) $Id: tm.n,v 1.17 2008/09/26 19:54:56 dgp Exp $ '\" .so man.macros .TH tm n 8.5 Tcl "Tcl Built-In Commands" @@ -24,7 +24,7 @@ tm \- Facilities for locating and loading of Tcl Modules This document describes the facilities for locating and loading Tcl Modules. The following commands are supported: .TP -\fB::tcl::tm::path\fR \fBadd\fR \fIpath\fR... +\fB::tcl::tm::path\fR \fBadd \fR?\fIpath\fR...? . The paths are added at the head to the list of module paths, in order of appearance. This means that the last argument ends up as the new @@ -46,7 +46,7 @@ reverse order of addition. In other words, the paths added last are looked at first. .RE .TP -\fB::tcl::tm::path\fR \fBremove\fR \fIpath\fR... +\fB::tcl::tm::path\fR \fBremove \fR?\fIpath\fR...? . Removes the paths from the list of module paths. The command silently ignores all paths which are not on the list. diff --git a/library/tm.tcl b/library/tm.tcl index 4f8e09e..a58b2ea 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -79,7 +79,7 @@ namespace eval ::tcl::tm { # paths to search for Tcl Modules. The subcommand 'list' has no # sideeffects. -proc ::tcl::tm::add {path args} { +proc ::tcl::tm::add {args} { # PART OF THE ::tcl::tm::path ENSEMBLE # # The path is added at the head to the list of module paths. @@ -102,7 +102,7 @@ proc ::tcl::tm::add {path args} { # paths to the official state var. set newpaths $paths - foreach p [linsert $args 0 $path] { + foreach p $args { if {$p in $newpaths} { # Ignore a path already on the list. continue @@ -143,7 +143,7 @@ proc ::tcl::tm::add {path args} { return } -proc ::tcl::tm::remove {path args} { +proc ::tcl::tm::remove {args} { # PART OF THE ::tcl::tm::path ENSEMBLE # # Removes the path from the list of module paths. The command is @@ -151,7 +151,7 @@ proc ::tcl::tm::remove {path args} { variable paths - foreach p [linsert $args 0 $path] { + foreach p $args { set pos [lsearch -exact $paths $p] if {$pos >= 0} { set paths [lreplace $paths $pos $pos] diff --git a/tests/tm.test b/tests/tm.test index d2f88a2..72bcc72 100644 --- a/tests/tm.test +++ b/tests/tm.test @@ -6,7 +6,7 @@ # Copyright (c) 2004 by Donal K. Fellows. # All rights reserved. # -# RCS: @(#) $Id: tm.test,v 1.7 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: tm.test,v 1.8 2008/09/26 19:54:59 dgp Exp $ package require Tcl 8.5 if {"::tcltest" ni [namespace children]} { @@ -21,12 +21,12 @@ test tm-1.1 {tm: path command exists} { test tm-1.2 {tm: path command syntax} -returnCodes error -body { ::tcl::tm::path foo } -result {unknown or ambiguous subcommand "foo": must be add, list, or remove} -test tm-1.3 {tm: path command syntax} -returnCodes error -body { +test tm-1.3 {tm: path command syntax} { ::tcl::tm::path add -} -result "wrong # args: should be \"::tcl::tm::path add path ?arg ...?\"" -test tm-1.4 {tm: path command syntax} -returnCodes error -body { +} {} +test tm-1.4 {tm: path command syntax} { ::tcl::tm::path remove -} -result "wrong # args: should be \"::tcl::tm::path remove path ?arg ...?\"" +} {} test tm-1.5 {tm: path command syntax} -returnCodes error -body { ::tcl::tm::path list foobar } -result "wrong # args: should be \"::tcl::tm::path list\"" -- cgit v0.12 From 03fe58895ff5d2fff94410b80ecf3fd7907b7948 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 26 Sep 2008 20:16:38 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/object.n: Revise standard oo method [my variable] to * generic/tclOOBasic.c: accept zero variable names. * tests/oo.test: --- ChangeLog | 4 ++++ doc/object.n | 4 ++-- generic/tclOOBasic.c | 6 +++--- tests/oo.test | 12 +++++++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f53284..cbf1c85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ TIP #323 IMPLEMENTATION (partial) + * doc/object.n: Revise standard oo method [my variable] to + * generic/tclOOBasic.c: accept zero variable names. + * tests/oo.test: + * doc/tm.n: Revise [tcl::tm::path add] and * library/tm.tcl: [tcl::tm::path remove] to accept zero paths. * tests/tm.test: diff --git a/doc/object.n b/doc/object.n index eec3219..47acd04 100644 --- a/doc/object.n +++ b/doc/object.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: object.n,v 1.2 2008/06/28 23:43:45 dkf Exp $ +'\" RCS: @(#) $Id: object.n,v 1.3 2008/09/26 20:16:39 dgp Exp $ '\" .so man.macros .TH object n 0.1 TclOO "TclOO Commands" @@ -63,7 +63,7 @@ by the \fBoo::object\fR class) generates a suitable error, detailing what methods the object supports given whether the object was invoked by its public name or through the \fBmy\fR command. .TP -\fIobj \fBvariable \fIvarName \fR?\fIvarName ...\fR? +\fIobj \fBvariable \fR?\fIvarName ...\fR? . This method arranges for each variable called \fIvarName\fR to be linked from the object \fIobj\fR's unique namespace into the caller's context. Thus, if it diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 9df3907..2e3868d 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.10 2008/09/01 12:28:09 msofer Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.11 2008/09/26 20:16:39 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -467,9 +467,9 @@ TclOO_Object_LinkVar( Namespace *savedNsPtr; int i; - if (objc-Tcl_ObjectContextSkippedArgs(context) < 1) { + if (objc-Tcl_ObjectContextSkippedArgs(context) < 0) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, - "varName ?varName ...?"); + "?varName ...?"); return TCL_ERROR; } diff --git a/tests/oo.test b/tests/oo.test index f221e1f..7d328f6 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.13 2008/09/25 10:13:33 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.14 2008/09/26 20:16:39 dgp Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1542,6 +1542,16 @@ test oo-20.11 {OO: variable mustn't crash when recursing} -body { } -cleanup { catch {A destroy} } -match glob -result * +test oo-20.12 {OO: variable method accept zero args (TIP 323)} -setup { + oo::object create foo +} -cleanup { + foo destroy +} -body { + oo::objdefine foo method demo {} { + my variable + } + foo demo +} -result {} test oo-21.1 {OO: inheritance ordering} -setup { oo::class create A -- cgit v0.12 From 11a39b96c6ee19beca3ef9583139c4a8377bcaa9 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 26 Sep 2008 21:05:54 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/lrepeat.n: Revise [lrepeat] to accept both zero * generic/tclCmdIL.c: repetitions and zero elements to be repeated. * tests/lrepeat.test: --- ChangeLog | 4 ++++ doc/lrepeat.n | 15 +++++++-------- generic/tclCmdIL.c | 18 +++++++++--------- tests/lrepeat.test | 22 +++++++++++++--------- 4 files changed, 33 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbf1c85..b45d8e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ TIP #323 IMPLEMENTATION (partial) + * doc/lrepeat.n: Revise [lrepeat] to accept both zero + * generic/tclCmdIL.c: repetitions and zero elements to be repeated. + * tests/lrepeat.test: + * doc/object.n: Revise standard oo method [my variable] to * generic/tclOOBasic.c: accept zero variable names. * tests/oo.test: diff --git a/doc/lrepeat.n b/doc/lrepeat.n index 3088848..a8141e0 100644 --- a/doc/lrepeat.n +++ b/doc/lrepeat.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lrepeat.n,v 1.6 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: lrepeat.n,v 1.7 2008/09/26 21:05:57 dgp Exp $ '\" .so man.macros .TH lrepeat n 8.5 Tcl "Tcl Built-In Commands" @@ -13,16 +13,15 @@ .SH NAME lrepeat \- Build a list by repeating elements .SH SYNOPSIS -\fBlrepeat \fInumber element1 \fR?\fIelement2 element3 ...\fR? +\fBlrepeat \fIcount \fR?\fIelement ...\fR? .BE .SH DESCRIPTION .PP -The \fBlrepeat\fR command creates a list of size \fInumber * number of -elements\fR by repeating \fInumber\fR times the sequence of elements -\fIelement1 element2 ...\fR. \fInumber\fR must be a positive integer, -\fIelementn\fR can be any Tcl value. Note that \fBlrepeat 1 arg ...\fR -is identical to \fBlist arg ...\fR, though the \fIarg\fR is required -with \fBlrepeat\fR. +The \fBlrepeat\fR command creates a list of size \fIcount * number of +elements\fR by repeating \fIcount\fR times the sequence of elements +\fIelement ...\fR. \fIcount\fR must be a non-negative integer, +\fIelement\fR can be any Tcl value. Note that \fBlrepeat 1 element ...\fR +is identical to \fBlist element ...\fR. .SH EXAMPLES .CS \fBlrepeat\fR 3 a diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index e1e15e1..99a6cb5 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.152 2008/09/26 19:12:42 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.153 2008/09/26 21:05:57 dgp Exp $ */ #include "tclInt.h" @@ -2443,25 +2443,25 @@ Tcl_LrepeatObjCmd( register Tcl_Obj *const objv[]) /* The argument objects. */ { - int elementCount, i, result; + int elementCount, i; Tcl_Obj *listPtr, **dataArray; List *listRepPtr; /* * Check arguments for legality: - * lrepeat posInt value ?value ...? + * lrepeat count ?value ...? */ - if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "positiveCount value ?value ...?"); + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "count ?value ...?"); return TCL_ERROR; } - result = TclGetIntFromObj(interp, objv[1], &elementCount); - if (result == TCL_ERROR) { + if (TCL_OK != TclGetIntFromObj(interp, objv[1], &elementCount)) { return TCL_ERROR; } - if (elementCount < 1) { - Tcl_AppendResult(interp, "must have a count of at least 1", NULL); + if (elementCount < 0) { + Tcl_SetObjResult(interp, Tcl_Format(NULL, + "bad count \"%d\": must be integer >= 0", 1, objv+1)); return TCL_ERROR; } diff --git a/tests/lrepeat.test b/tests/lrepeat.test index f6888b1..a28dd27 100644 --- a/tests/lrepeat.test +++ b/tests/lrepeat.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lrepeat.test,v 1.2 2003/10/06 14:32:22 dgp Exp $ +# RCS: @(#) $Id: lrepeat.test,v 1.3 2008/09/26 21:05:57 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -22,14 +22,13 @@ test lrepeat-1.1 {error cases} { lrepeat } -returnCodes 1 - -result {wrong # args: should be "lrepeat positiveCount value ?value ...?"} + -result {wrong # args: should be "lrepeat count ?value ...?"} } -test lrepeat-1.2 {error cases} { +test lrepeat-1.2 {Accept zero elements(TIP 323)} { -body { lrepeat 1 } - -returnCodes 1 - -result {wrong # args: should be "lrepeat positiveCount value ?value ...?"} + -result {} } test lrepeat-1.3 {error cases} { -body { @@ -43,14 +42,13 @@ test lrepeat-1.4 {error cases} { lrepeat -3 1 } -returnCodes 1 - -result {must have a count of at least 1} + -result {bad count "-3": must be integer >= 0} } -test lrepeat-1.5 {error cases} { +test lrepeat-1.5 {Accept zero repetitions (TIP 323)} { -body { lrepeat 0 } - -returnCodes 1 - -result {wrong # args: should be "lrepeat positiveCount value ?value ...?"} + -result {} } test lrepeat-1.6 {error cases} { -body { @@ -59,6 +57,12 @@ test lrepeat-1.6 {error cases} { -returnCodes 1 -result {expected integer but got "3.5"} } +test lrepeat-1.7 {Accept zero repetitions (TIP 323)} { + -body { + lrepeat 0 a b c + } + -result {} +} ## Okay test lrepeat-2.1 {normal cases} { -- cgit v0.12 From c91b19f7bac0008bb4b74e40096663a5035c7b19 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Sep 2008 14:16:38 +0000 Subject: Fix [Bug 2130992]. --- ChangeLog | 6 ++++++ generic/tclCmdIL.c | 24 ++++++++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b45d8e5..19043f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-27 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LrepeatObjCmd): Improve the handling of the + case where the combination of number of elements and repeat count + causes the resulting list to be too large. [Bug 2130992] + 2008-09-26 Don Porter TIP #323 IMPLEMENTATION (partial) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 99a6cb5..73144f8 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.153 2008/09/26 21:05:57 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.154 2008/09/27 14:16:42 dkf Exp $ */ #include "tclInt.h" @@ -2443,7 +2443,7 @@ Tcl_LrepeatObjCmd( register Tcl_Obj *const objv[]) /* The argument objects. */ { - int elementCount, i; + int elementCount, i, totalElems; Tcl_Obj *listPtr, **dataArray; List *listRepPtr; @@ -2473,12 +2473,28 @@ Tcl_LrepeatObjCmd( objv += 2; /* + * Final sanity check. Total number of elements must fit in a signed + * integer. We also limit the number of elements to 512M-1 so allocations + * on 32-bit machines are guaranteed to be less than 2GB! [Bug 2130992] + */ + + totalElems = objc * elementCount; + if (totalElems/objc != elementCount || totalElems/elementCount != objc) { + Tcl_AppendResult(interp, "too many elements in result list", NULL); + return TCL_ERROR; + } + if (totalElems >= 0x20000000) { + Tcl_AppendResult(interp, "too many elements in result list", NULL); + return TCL_ERROR; + } + + /* * Get an empty list object that is allocated large enough to hold each * init value elementCount times. */ - listPtr = Tcl_NewListObj(elementCount*objc, NULL); - listRepPtr = (List *) listPtr->internalRep.twoPtrValue.ptr1; + listPtr = Tcl_NewListObj(totalElems, NULL); + listRepPtr = listPtr->internalRep.twoPtrValue.ptr1; listRepPtr->elemCount = elementCount*objc; dataArray = &listRepPtr->elements; -- cgit v0.12 From f275a7d75401fe7aca194722e9d20c7e58ec9169 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Sep 2008 19:34:59 +0000 Subject: Corrected sanity test in zero-element case --- generic/tclCmdIL.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 73144f8..af3c3bb 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.154 2008/09/27 14:16:42 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.155 2008/09/27 19:34:59 dkf Exp $ */ #include "tclInt.h" @@ -2479,7 +2479,8 @@ Tcl_LrepeatObjCmd( */ totalElems = objc * elementCount; - if (totalElems/objc != elementCount || totalElems/elementCount != objc) { + if (totalElems != 0 && (totalElems/objc != elementCount + || totalElems/elementCount != objc)) { Tcl_AppendResult(interp, "too many elements in result list", NULL); return TCL_ERROR; } -- cgit v0.12 From 415263df239b3d23328d8af5672477b6d5d7c77c Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Sep 2008 19:40:30 +0000 Subject: Stylistic improvements (consistent function separation standards, etc.) and some reduction in nesting in functions. --- generic/tclIOUtil.c | 644 ++++++++++++++++++++++++++-------------------------- 1 file changed, 320 insertions(+), 324 deletions(-) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 93bdc4b..b610af4 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.155 2008/07/28 21:31:15 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.156 2008/09/27 19:40:30 dkf Exp $ */ #include "tclInt.h" @@ -51,187 +51,7 @@ static void FsRecacheFilesystemList(void); MODULE_SCOPE const char * tclpFileAttrStrings[]; MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; - -/* - * The following functions are obsolete string based APIs, and should be - * removed in a future release (Tcl 9 would be a good time). - */ - - -/* Obsolete */ -int -Tcl_Stat( - const char *path, /* Path of file to stat (in current CP). */ - struct stat *oldStyleBuf) /* Filled with results of stat call. */ -{ - int ret; - Tcl_StatBuf buf; - Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); -#ifndef TCL_WIDE_INT_IS_LONG - Tcl_WideInt tmp1, tmp2; -#ifdef HAVE_ST_BLOCKS - Tcl_WideInt tmp3; -#endif -#endif - - Tcl_IncrRefCount(pathPtr); - ret = Tcl_FSStat(pathPtr, &buf); - Tcl_DecrRefCount(pathPtr); - if (ret != -1) { -#ifndef TCL_WIDE_INT_IS_LONG -# define OUT_OF_RANGE(x) \ - (((Tcl_WideInt)(x)) < Tcl_LongAsWide(LONG_MIN) || \ - ((Tcl_WideInt)(x)) > Tcl_LongAsWide(LONG_MAX)) -# define OUT_OF_URANGE(x) \ - (((Tcl_WideUInt)(x)) > ((Tcl_WideUInt)ULONG_MAX)) - - /* - * Perform the result-buffer overflow check manually. - * - * Note that ino_t/ino64_t is unsigned... - * - * Workaround gcc warning of "comparison is always false due to - * limited range of data type" by assigning to tmp var of type - * Tcl_WideInt. - */ - - tmp1 = (Tcl_WideInt) buf.st_ino; - tmp2 = (Tcl_WideInt) buf.st_size; -#ifdef HAVE_ST_BLOCKS - tmp3 = (Tcl_WideInt) buf.st_blocks; -#endif - - if (OUT_OF_URANGE(tmp1) || OUT_OF_RANGE(tmp2) -#ifdef HAVE_ST_BLOCKS - || OUT_OF_RANGE(tmp3) -#endif - ) { -#ifdef EFBIG - errno = EFBIG; -#else -# ifdef EOVERFLOW - errno = EOVERFLOW; -# else -# error "What status should be returned for file size out of range?" -# endif -#endif - return -1; - } - -# undef OUT_OF_RANGE -# undef OUT_OF_URANGE -#endif /* !TCL_WIDE_INT_IS_LONG */ - - /* - * Copy across all supported fields, with possible type coercions on - * those fields that change between the normal and lf64 versions of - * the stat structure (on Solaris at least). This is slow when the - * structure sizes coincide, but that's what you get for using an - * obsolete interface. - */ - - oldStyleBuf->st_mode = buf.st_mode; - oldStyleBuf->st_ino = (ino_t) buf.st_ino; - oldStyleBuf->st_dev = buf.st_dev; - oldStyleBuf->st_rdev = buf.st_rdev; - oldStyleBuf->st_nlink = buf.st_nlink; - oldStyleBuf->st_uid = buf.st_uid; - oldStyleBuf->st_gid = buf.st_gid; - oldStyleBuf->st_size = (off_t) buf.st_size; - oldStyleBuf->st_atime = buf.st_atime; - oldStyleBuf->st_mtime = buf.st_mtime; - oldStyleBuf->st_ctime = buf.st_ctime; -#ifdef HAVE_ST_BLOCKS - oldStyleBuf->st_blksize = buf.st_blksize; - oldStyleBuf->st_blocks = (blkcnt_t) buf.st_blocks; -#endif - } - return ret; -} - -/* Obsolete */ -int -Tcl_Access( - const char *path, /* Path of file to access (in current CP). */ - int mode) /* Permission setting. */ -{ - int ret; - Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); - - Tcl_IncrRefCount(pathPtr); - ret = Tcl_FSAccess(pathPtr,mode); - Tcl_DecrRefCount(pathPtr); - - return ret; -} - -/* Obsolete */ -Tcl_Channel -Tcl_OpenFileChannel( - Tcl_Interp *interp, /* Interpreter for error reporting; can be - * NULL. */ - const char *path, /* Name of file to open. */ - const char *modeString, /* A list of POSIX open modes or a string such - * as "rw". */ - int permissions) /* If the open involves creating a file, with - * what modes to create it? */ -{ - Tcl_Channel ret; - Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); - - Tcl_IncrRefCount(pathPtr); - ret = Tcl_FSOpenFileChannel(interp, pathPtr, modeString, permissions); - Tcl_DecrRefCount(pathPtr); - - return ret; -} - -/* Obsolete */ -int -Tcl_Chdir( - const char *dirName) -{ - int ret; - Tcl_Obj *pathPtr = Tcl_NewStringObj(dirName,-1); - Tcl_IncrRefCount(pathPtr); - ret = Tcl_FSChdir(pathPtr); - Tcl_DecrRefCount(pathPtr); - return ret; -} - -/* Obsolete */ -char * -Tcl_GetCwd( - Tcl_Interp *interp, - Tcl_DString *cwdPtr) -{ - Tcl_Obj *cwd = Tcl_FSGetCwd(interp); - - if (cwd == NULL) { - return NULL; - } - Tcl_DStringInit(cwdPtr); - Tcl_DStringAppend(cwdPtr, Tcl_GetString(cwd), -1); - Tcl_DecrRefCount(cwd); - return Tcl_DStringValue(cwdPtr); -} - -/* Obsolete */ -int -Tcl_EvalFile( - Tcl_Interp *interp, /* Interpreter in which to process file. */ - const char *fileName) /* Name of file to process. Tilde-substitution - * will be performed on this name. */ -{ - int ret; - Tcl_Obj *pathPtr = Tcl_NewStringObj(fileName,-1); - - Tcl_IncrRefCount(pathPtr); - ret = Tcl_FSEvalFile(interp, pathPtr); - Tcl_DecrRefCount(pathPtr); - return ret; -} - + /* * The 3 hooks for Stat, Access and OpenFileChannel are obsolete. The * complete, general hooked filesystem APIs should be used instead. This @@ -245,8 +65,6 @@ Tcl_EvalFile( * support, I suggest all these hooks are removed. */ - - /* * Declare the native filesystem support. These functions should be considered * private to Tcl, and should really not be called directly by any code other @@ -408,7 +226,186 @@ typedef struct FsDivertLoad { const Tcl_Filesystem *divertedFilesystem; ClientData divertedFileNativeRep; } FsDivertLoad; + +/* + * The following functions are obsolete string based APIs, and should be + * removed in a future release (Tcl 9 would be a good time). + */ + +/* Obsolete */ +int +Tcl_Stat( + const char *path, /* Path of file to stat (in current CP). */ + struct stat *oldStyleBuf) /* Filled with results of stat call. */ +{ + int ret; + Tcl_StatBuf buf; + Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); +#ifndef TCL_WIDE_INT_IS_LONG + Tcl_WideInt tmp1, tmp2; +#ifdef HAVE_ST_BLOCKS + Tcl_WideInt tmp3; +#endif +#endif + + Tcl_IncrRefCount(pathPtr); + ret = Tcl_FSStat(pathPtr, &buf); + Tcl_DecrRefCount(pathPtr); + if (ret != -1) { +#ifndef TCL_WIDE_INT_IS_LONG +# define OUT_OF_RANGE(x) \ + (((Tcl_WideInt)(x)) < Tcl_LongAsWide(LONG_MIN) || \ + ((Tcl_WideInt)(x)) > Tcl_LongAsWide(LONG_MAX)) +# define OUT_OF_URANGE(x) \ + (((Tcl_WideUInt)(x)) > ((Tcl_WideUInt)ULONG_MAX)) + + /* + * Perform the result-buffer overflow check manually. + * + * Note that ino_t/ino64_t is unsigned... + * + * Workaround gcc warning of "comparison is always false due to + * limited range of data type" by assigning to tmp var of type + * Tcl_WideInt. + */ + + tmp1 = (Tcl_WideInt) buf.st_ino; + tmp2 = (Tcl_WideInt) buf.st_size; +#ifdef HAVE_ST_BLOCKS + tmp3 = (Tcl_WideInt) buf.st_blocks; +#endif + + if (OUT_OF_URANGE(tmp1) || OUT_OF_RANGE(tmp2) +#ifdef HAVE_ST_BLOCKS + || OUT_OF_RANGE(tmp3) +#endif + ) { +#ifdef EFBIG + errno = EFBIG; +#else +# ifdef EOVERFLOW + errno = EOVERFLOW; +# else +# error "What status should be returned for file size out of range?" +# endif +#endif + return -1; + } + +# undef OUT_OF_RANGE +# undef OUT_OF_URANGE +#endif /* !TCL_WIDE_INT_IS_LONG */ + + /* + * Copy across all supported fields, with possible type coercions on + * those fields that change between the normal and lf64 versions of + * the stat structure (on Solaris at least). This is slow when the + * structure sizes coincide, but that's what you get for using an + * obsolete interface. + */ + oldStyleBuf->st_mode = buf.st_mode; + oldStyleBuf->st_ino = (ino_t) buf.st_ino; + oldStyleBuf->st_dev = buf.st_dev; + oldStyleBuf->st_rdev = buf.st_rdev; + oldStyleBuf->st_nlink = buf.st_nlink; + oldStyleBuf->st_uid = buf.st_uid; + oldStyleBuf->st_gid = buf.st_gid; + oldStyleBuf->st_size = (off_t) buf.st_size; + oldStyleBuf->st_atime = buf.st_atime; + oldStyleBuf->st_mtime = buf.st_mtime; + oldStyleBuf->st_ctime = buf.st_ctime; +#ifdef HAVE_ST_BLOCKS + oldStyleBuf->st_blksize = buf.st_blksize; + oldStyleBuf->st_blocks = (blkcnt_t) buf.st_blocks; +#endif + } + return ret; +} + +/* Obsolete */ +int +Tcl_Access( + const char *path, /* Path of file to access (in current CP). */ + int mode) /* Permission setting. */ +{ + int ret; + Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); + + Tcl_IncrRefCount(pathPtr); + ret = Tcl_FSAccess(pathPtr,mode); + Tcl_DecrRefCount(pathPtr); + + return ret; +} + +/* Obsolete */ +Tcl_Channel +Tcl_OpenFileChannel( + Tcl_Interp *interp, /* Interpreter for error reporting; can be + * NULL. */ + const char *path, /* Name of file to open. */ + const char *modeString, /* A list of POSIX open modes or a string such + * as "rw". */ + int permissions) /* If the open involves creating a file, with + * what modes to create it? */ +{ + Tcl_Channel ret; + Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); + + Tcl_IncrRefCount(pathPtr); + ret = Tcl_FSOpenFileChannel(interp, pathPtr, modeString, permissions); + Tcl_DecrRefCount(pathPtr); + + return ret; +} + +/* Obsolete */ +int +Tcl_Chdir( + const char *dirName) +{ + int ret; + Tcl_Obj *pathPtr = Tcl_NewStringObj(dirName,-1); + Tcl_IncrRefCount(pathPtr); + ret = Tcl_FSChdir(pathPtr); + Tcl_DecrRefCount(pathPtr); + return ret; +} + +/* Obsolete */ +char * +Tcl_GetCwd( + Tcl_Interp *interp, + Tcl_DString *cwdPtr) +{ + Tcl_Obj *cwd = Tcl_FSGetCwd(interp); + + if (cwd == NULL) { + return NULL; + } + Tcl_DStringInit(cwdPtr); + Tcl_DStringAppend(cwdPtr, Tcl_GetString(cwd), -1); + Tcl_DecrRefCount(cwd); + return Tcl_DStringValue(cwdPtr); +} + +/* Obsolete */ +int +Tcl_EvalFile( + Tcl_Interp *interp, /* Interpreter in which to process file. */ + const char *fileName) /* Name of file to process. Tilde-substitution + * will be performed on this name. */ +{ + int ret; + Tcl_Obj *pathPtr = Tcl_NewStringObj(fileName,-1); + + Tcl_IncrRefCount(pathPtr); + ret = Tcl_FSEvalFile(interp, pathPtr); + Tcl_DecrRefCount(pathPtr); + return ret; +} + /* * Now move on to the basic filesystem implementation */ @@ -446,7 +443,7 @@ FsThrExitProc( } tsdPtr->initialized = 0; } - + int TclFSCwdIsNative(void) { @@ -458,7 +455,7 @@ TclFSCwdIsNative(void) return 0; } } - + /* *---------------------------------------------------------------------- * @@ -542,7 +539,7 @@ TclFSCwdPointerEquals( } } } - + #ifdef TCL_THREADS static void FsRecacheFilesystemList(void) @@ -604,7 +601,7 @@ FsRecacheFilesystemList(void) } } #endif /* TCL_THREADS */ - + static FilesystemRecord * FsGetFirstFilesystem(void) { @@ -626,7 +623,7 @@ FsGetFirstFilesystem(void) #endif return fsRecPtr; } - + /* * The epoch can be changed both by filesystems being added or removed and by * env(HOME) changing. @@ -637,10 +634,11 @@ TclFSEpochOk( int filesystemEpoch) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey); + (void) FsGetFirstFilesystem(); return (filesystemEpoch == tsdPtr->filesystemEpoch); } - + /* * If non-NULL, clientData is owned by us and must be freed later. */ @@ -699,7 +697,7 @@ FsUpdateCwd( Tcl_IncrRefCount(tsdPtr->cwdPathPtr); } } - + /* *---------------------------------------------------------------------- * @@ -771,7 +769,7 @@ TclFinalizeFilesystem(void) TclWinEncodingsCleanup(); #endif } - + /* *---------------------------------------------------------------------- * @@ -807,7 +805,7 @@ TclResetFilesystem(void) TclWinResetInterfaces(); #endif } - + /* *---------------------------------------------------------------------- * @@ -841,7 +839,7 @@ TclResetFilesystem(void) int Tcl_FSRegister( ClientData clientData, /* Client specific data for this fs */ - const Tcl_Filesystem *fsPtr) /* The filesystem record for the new fs. */ + const Tcl_Filesystem *fsPtr)/* The filesystem record for the new fs. */ { FilesystemRecord *newFilesystemPtr; @@ -893,7 +891,7 @@ Tcl_FSRegister( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -969,7 +967,7 @@ Tcl_FSUnregister( Tcl_MutexUnlock(&filesystemMutex); return retVal; } - + /* *---------------------------------------------------------------------- * @@ -1053,8 +1051,8 @@ Tcl_FSMatchInDirectory( Tcl_SetErrno(ENOENT); return -1; } - ret = (*fsPtr->matchInDirectoryProc)(interp, resultPtr, pathPtr, - pattern, types); + ret = fsPtr->matchInDirectoryProc(interp, resultPtr, pathPtr, pattern, + types); if (ret == TCL_OK && pattern != NULL) { FsAddMountsToGlobResult(resultPtr, pathPtr, pattern, types); } @@ -1094,8 +1092,8 @@ Tcl_FSMatchInDirectory( if (fsPtr != NULL && fsPtr->matchInDirectoryProc != NULL) { TclNewObj(tmpResultPtr); Tcl_IncrRefCount(tmpResultPtr); - ret = (*fsPtr->matchInDirectoryProc)(interp, tmpResultPtr, cwd, - pattern, types); + ret = fsPtr->matchInDirectoryProc(interp, tmpResultPtr, cwd, pattern, + types); if (ret == TCL_OK) { FsAddMountsToGlobResult(tmpResultPtr, cwd, pattern, types); @@ -1115,7 +1113,7 @@ Tcl_FSMatchInDirectory( Tcl_DecrRefCount(cwd); return ret; } - + /* *---------------------------------------------------------------------- * @@ -1220,7 +1218,7 @@ FsAddMountsToGlobResult( endOfMounts: Tcl_DecrRefCount(mounts); } - + /* *---------------------------------------------------------------------- * @@ -1289,7 +1287,7 @@ Tcl_FSMountsChanged( theFilesystemEpoch++; Tcl_MutexUnlock(&filesystemMutex); } - + /* *---------------------------------------------------------------------- * @@ -1331,7 +1329,7 @@ Tcl_FSData( return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -1424,7 +1422,7 @@ TclFSNormalizeToUniquePath( return startAt; } - + /* *--------------------------------------------------------------------------- * @@ -1454,7 +1452,7 @@ TclGetOpenMode( int binary = 0; return TclGetOpenModeEx(interp, modeString, seekFlagPtr, &binary); } - + /* *--------------------------------------------------------------------------- * @@ -1661,27 +1659,14 @@ TclGetOpenModeEx( } return mode; } - -/* - * Tcl_FSEvalFile is Tcl_FSEvalFileEx without encoding argument. - */ - -int -Tcl_FSEvalFile( - Tcl_Interp *interp, /* Interpreter in which to process file. */ - Tcl_Obj *pathPtr) /* Path of file to process. Tilde-substitution - * will be performed on this name. */ -{ - return Tcl_FSEvalFileEx(interp, pathPtr, NULL); -} - + /* *---------------------------------------------------------------------- * - * Tcl_FSEvalFileEx -- + * Tcl_FSEvalFile, Tcl_FSEvalFileEx -- * * Read in a file and process the entire file as one gigantic Tcl - * command. + * command. Tcl_FSEvalFile is Tcl_FSEvalFileEx without encoding argument. * * Results: * A standard Tcl result, which is either the result of executing the @@ -1696,6 +1681,15 @@ Tcl_FSEvalFile( */ int +Tcl_FSEvalFile( + Tcl_Interp *interp, /* Interpreter in which to process file. */ + Tcl_Obj *pathPtr) /* Path of file to process. Tilde-substitution + * will be performed on this name. */ +{ + return Tcl_FSEvalFileEx(interp, pathPtr, NULL); +} + +int Tcl_FSEvalFileEx( Tcl_Interp *interp, /* Interpreter in which to process file. */ Tcl_Obj *pathPtr, /* Path of file to process. Tilde-substitution @@ -1807,7 +1801,7 @@ Tcl_FSEvalFileEx( Tcl_DecrRefCount(objPtr); return result; } - + /* *---------------------------------------------------------------------- * @@ -1837,13 +1831,15 @@ Tcl_GetErrno(void) return errno; } - + /* *---------------------------------------------------------------------- * * Tcl_SetErrno -- * - * Sets the Tcl error code variable to the supplied value. + * Sets the Tcl error code variable to the supplied value. On some saner + * platforms this is actually a thread-local (this is implemented in the + * C library) but this is *really* unsafe to assume! * * Results: * None. @@ -1865,7 +1861,7 @@ Tcl_SetErrno( errno = err; } - + /* *---------------------------------------------------------------------- * @@ -1899,7 +1895,7 @@ Tcl_PosixError( } return msg; } - + /* *---------------------------------------------------------------------- * @@ -1932,7 +1928,7 @@ Tcl_FSStat( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -1970,7 +1966,7 @@ Tcl_FSLstat( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2001,7 +1997,7 @@ Tcl_FSAccess( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2097,7 +2093,7 @@ Tcl_FSOpenFileChannel( } return NULL; } - + /* *---------------------------------------------------------------------- * @@ -2129,7 +2125,7 @@ Tcl_FSUtime( /* TODO: set errno here? Tcl_SetErrno(ENOENT); */ return -1; } - + /* *---------------------------------------------------------------------- * @@ -2157,7 +2153,7 @@ NativeFileAttrStrings( { return tclpFileAttrStrings; } - + /* *---------------------------------------------------------------------- * @@ -2187,10 +2183,9 @@ NativeFileAttrsGet( Tcl_Obj *pathPtr, /* path of file we are operating on. */ Tcl_Obj **objPtrRef) /* for output. */ { - return (*tclpFileAttrProcs[index].getProc)(interp, index, pathPtr, - objPtrRef); + return tclpFileAttrProcs[index].getProc(interp, index, pathPtr,objPtrRef); } - + /* *---------------------------------------------------------------------- * @@ -2217,9 +2212,9 @@ NativeFileAttrsSet( Tcl_Obj *pathPtr, /* path of file we are operating on. */ Tcl_Obj *objPtr) /* set to this value. */ { - return (*tclpFileAttrProcs[index].setProc)(interp, index, pathPtr, objPtr); + return tclpFileAttrProcs[index].setProc(interp, index, pathPtr, objPtr); } - + /* *---------------------------------------------------------------------- * @@ -2257,7 +2252,7 @@ Tcl_FSFileAttrStrings( Tcl_SetErrno(ENOENT); return NULL; } - + /* *---------------------------------------------------------------------- * @@ -2334,7 +2329,7 @@ TclFSFileAttrIndex( return TCL_ERROR; } } - + /* *---------------------------------------------------------------------- * @@ -2371,7 +2366,7 @@ Tcl_FSFileAttrsGet( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2405,7 +2400,7 @@ Tcl_FSFileAttrsSet( Tcl_SetErrno(ENOENT); return -1; } - + /* *---------------------------------------------------------------------- * @@ -2481,7 +2476,7 @@ Tcl_FSGetCwd( Tcl_Obj *norm; /* Looks like a new current directory */ - retVal = (*fsRecPtr->fsPtr->internalToNormalizedProc)(retCd); + retVal = fsRecPtr->fsPtr->internalToNormalizedProc(retCd); Tcl_IncrRefCount(retVal); norm = TclFSNormalizeAbsolutePath(interp,retVal,NULL); if (norm != NULL) { @@ -2500,7 +2495,7 @@ Tcl_FSGetCwd( FsUpdateCwd(norm, retCd); Tcl_DecrRefCount(norm); } else { - (*fsRecPtr->fsPtr->freeInternalRepProc)(retCd); + fsRecPtr->fsPtr->freeInternalRepProc(retCd); } Tcl_DecrRefCount(retVal); retVal = NULL; @@ -2667,7 +2662,7 @@ Tcl_FSGetCwd( return tsdPtr->cwdPathPtr; } - + /* *---------------------------------------------------------------------- * @@ -2815,7 +2810,7 @@ Tcl_FSChdir( return retVal; } - + /* *---------------------------------------------------------------------- * @@ -2898,7 +2893,7 @@ Tcl_FSLoadFile( *handlePtr = clientData; return res; } - + /* *---------------------------------------------------------------------- * @@ -3222,6 +3217,7 @@ TclLoadFile( } return TCL_OK; } + /* * This function used to be in the platform specific directories, but it has * now been made to work cross-platform @@ -3265,7 +3261,7 @@ TclpLoadFile( *proc2Ptr = TclpFindSymbol(interp, handle, sym2); return TCL_OK; } - + /* *--------------------------------------------------------------------------- * @@ -3310,7 +3306,7 @@ FSUnloadTempFile( */ if (tvdlPtr->unloadProcPtr != NULL) { - (*tvdlPtr->unloadProcPtr)(tvdlPtr->loadHandle); + tvdlPtr->unloadProcPtr(tvdlPtr->loadHandle); } if (tvdlPtr->divertedFilesystem == NULL) { @@ -3358,7 +3354,7 @@ FSUnloadTempFile( ckfree((char *) tvdlPtr); } - + /* *--------------------------------------------------------------------------- * @@ -3419,7 +3415,7 @@ Tcl_FSLink( #endif /* S_IFLNK */ return NULL; } - + /* *--------------------------------------------------------------------------- * @@ -3473,7 +3469,7 @@ Tcl_FSListVolumes(void) return resultPtr; } - + /* *--------------------------------------------------------------------------- * @@ -3523,7 +3519,7 @@ FsListMounts( return resultPtr; } - + /* *--------------------------------------------------------------------------- * @@ -3573,7 +3569,7 @@ Tcl_FSSplitPath( */ if (fsPtr->filesystemSeparatorProc != NULL) { - Tcl_Obj *sep = (*fsPtr->filesystemSeparatorProc)(pathPtr); + Tcl_Obj *sep = fsPtr->filesystemSeparatorProc(pathPtr); if (sep != NULL) { Tcl_IncrRefCount(sep); @@ -3653,9 +3649,9 @@ TclFSInternalToNormalized( || (fromFilesystem->internalToNormalizedProc == NULL)) { return NULL; } - return (*fromFilesystem->internalToNormalizedProc)(clientData); + return fromFilesystem->internalToNormalizedProc(clientData); } - + /* *---------------------------------------------------------------------- * @@ -3707,7 +3703,7 @@ TclGetPathType( } return type; } - + /* *---------------------------------------------------------------------- * @@ -3760,21 +3756,20 @@ TclFSNonnativePathType( while (fsRecPtr != NULL) { /* * We want to skip the native filesystem in this loop because - * otherwise we won't necessarily pass all the Tcl testsuite -- this - * is because some of the tests artificially change the current - * platform (between win, unix) but the list of volumes we get by - * calling fsRecPtr->fsPtr->listVolumesProc will reflect the current - * (real) platform only and this may cause some tests to fail. In - * particular, on Unix '/' will match the beginning of certain - * absolute Windows paths starting '//' and those tests will go wrong. + * otherwise we won't necessarily pass all the Tcl testsuite - this is + * because some of the tests artificially change the current platform + * (between win, unix) but the list of volumes we get by calling + * fsRecPtr->fsPtr->listVolumesProc will reflect the current (real) + * platform only and this may cause some tests to fail. In particular, + * on Unix '/' will match the beginning of certain absolute Windows + * paths starting '//' and those tests will go wrong. * * Besides these test-suite issues, there is one other reason to skip - * the native filesystem --- since the tclFilename.c code has nice - * fast 'absolute path' checkers, we don't want to waste time - * repeating that effort here, and this function is actually called - * quite often, so if we can save the overhead of the native - * filesystem returning us a list of volumes all the time, it is - * better. + * the native filesystem - since the tclFilename.c code has nice fast + * 'absolute path' checkers, we don't want to waste time repeating + * that effort here, and this function is actually called quite often, + * so if we can save the overhead of the native filesystem returning + * us a list of volumes all the time, it is better. */ if ((fsRecPtr->fsPtr != &tclNativeFilesystem) @@ -3837,7 +3832,7 @@ TclFSNonnativePathType( } return type; } - + /* *--------------------------------------------------------------------------- * @@ -3878,7 +3873,7 @@ Tcl_FSRenameFile( } return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -3920,7 +3915,7 @@ Tcl_FSCopyFile( } return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -3998,7 +3993,7 @@ TclCrossFilesystemCopy( done: return result; } - + /* *--------------------------------------------------------------------------- * @@ -4028,7 +4023,7 @@ Tcl_FSDeleteFile( Tcl_SetErrno(ENOENT); return -1; } - + /* *--------------------------------------------------------------------------- * @@ -4058,7 +4053,7 @@ Tcl_FSCreateDirectory( Tcl_SetErrno(ENOENT); return -1; } - + /* *--------------------------------------------------------------------------- * @@ -4100,7 +4095,7 @@ Tcl_FSCopyDirectory( } return retVal; } - + /* *--------------------------------------------------------------------------- * @@ -4131,46 +4126,47 @@ Tcl_FSRemoveDirectory( { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); - if (fsPtr != NULL && fsPtr->removeDirectoryProc != NULL) { - if (recursive) { - /* - * We check whether the cwd lies inside this directory and move it - * if it does. - */ + if (fsPtr == NULL || fsPtr->removeDirectoryProc == NULL) { + Tcl_SetErrno(ENOENT); + return -1; + } - Tcl_Obj *cwdPtr = Tcl_FSGetCwd(NULL); + /* + * When working recursively, we check whether the cwd lies inside this + * directory and move it if it does. + */ + + if (recursive) { + Tcl_Obj *cwdPtr = Tcl_FSGetCwd(NULL); - if (cwdPtr != NULL) { - char *cwdStr, *normPathStr; - int cwdLen, normLen; - Tcl_Obj *normPath = Tcl_FSGetNormalizedPath(NULL, pathPtr); + if (cwdPtr != NULL) { + char *cwdStr, *normPathStr; + int cwdLen, normLen; + Tcl_Obj *normPath = Tcl_FSGetNormalizedPath(NULL, pathPtr); - if (normPath != NULL) { - normPathStr = Tcl_GetStringFromObj(normPath, &normLen); - cwdStr = Tcl_GetStringFromObj(cwdPtr, &cwdLen); - if ((cwdLen >= normLen) && (strncmp(normPathStr, cwdStr, - (size_t) normLen) == 0)) { - /* - * The cwd is inside the directory, so we perform a - * 'cd [file dirname $path]'. - */ + if (normPath != NULL) { + normPathStr = Tcl_GetStringFromObj(normPath, &normLen); + cwdStr = Tcl_GetStringFromObj(cwdPtr, &cwdLen); + if ((cwdLen >= normLen) && (strncmp(normPathStr, cwdStr, + (size_t) normLen) == 0)) { + /* + * The cwd is inside the directory, so we perform a 'cd + * [file dirname $path]'. + */ - Tcl_Obj *dirPtr = TclPathPart(NULL, pathPtr, - TCL_PATH_DIRNAME); + Tcl_Obj *dirPtr = TclPathPart(NULL, pathPtr, + TCL_PATH_DIRNAME); - Tcl_FSChdir(dirPtr); - Tcl_DecrRefCount(dirPtr); - } + Tcl_FSChdir(dirPtr); + Tcl_DecrRefCount(dirPtr); } - Tcl_DecrRefCount(cwdPtr); } + Tcl_DecrRefCount(cwdPtr); } - return fsPtr->removeDirectoryProc(pathPtr, recursive, errorPtr); } - Tcl_SetErrno(ENOENT); - return -1; + return fsPtr->removeDirectoryProc(pathPtr, recursive, errorPtr); } - + /* *--------------------------------------------------------------------------- * @@ -4253,7 +4249,7 @@ Tcl_FSGetFileSystemForPath( return NULL; } - + /* *--------------------------------------------------------------------------- * @@ -4289,7 +4285,7 @@ Tcl_FSGetNativePath( { return (const char *) Tcl_FSGetInternalRep(pathPtr, &tclNativeFilesystem); } - + /* *--------------------------------------------------------------------------- * @@ -4312,7 +4308,7 @@ NativeFreeInternalRep( { ckfree((char *) clientData); } - + /* *--------------------------------------------------------------------------- * @@ -4356,7 +4352,7 @@ Tcl_FSFileSystemInfo( return resPtr; } - + /* *--------------------------------------------------------------------------- * @@ -4381,25 +4377,25 @@ Tcl_FSPathSeparator( Tcl_Obj *pathPtr) { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); + Tcl_Obj *resultObj; if (fsPtr == NULL) { return NULL; } + if (fsPtr->filesystemSeparatorProc != NULL) { - return (*fsPtr->filesystemSeparatorProc)(pathPtr); - } else { - Tcl_Obj *resultObj; + return fsPtr->filesystemSeparatorProc(pathPtr); + } - /* - * Allow filesystems not to provide a filesystemSeparatorProc if they - * wish to use the standard forward slash. - */ + /* + * Allow filesystems not to provide a filesystemSeparatorProc if they wish + * to use the standard forward slash. + */ - TclNewLiteralStringObj(resultObj, "/"); - return resultObj; - } + TclNewLiteralStringObj(resultObj, "/"); + return resultObj; } - + /* *--------------------------------------------------------------------------- * @@ -4422,6 +4418,7 @@ NativeFilesystemSeparator( Tcl_Obj *pathPtr) { const char *separator = NULL; /* lint */ + switch (tclPlatform) { case TCL_PLATFORM_UNIX: separator = "/"; @@ -4432,8 +4429,7 @@ NativeFilesystemSeparator( } return Tcl_NewStringObj(separator,1); } - - + /* * Local Variables: * mode: c -- cgit v0.12 From 8d3e26a08c2d3528276032ef2b4f40949bd3d08d Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Sep 2008 19:47:24 +0000 Subject: Fix [Bug 2130726]. --- ChangeLog | 4 ++++ generic/tclFileName.c | 25 ++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 19043f7..4c2e048 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-09-27 Donal K. Fellows + * generic/tclFileName.c (Tcl_GetBlock*FromStat): Made this work + acceptably when working with OSes that don't support reporting the + block size from the stat() call. [Bug 2130726] + * generic/tclCmdIL.c (Tcl_LrepeatObjCmd): Improve the handling of the case where the combination of number of elements and repeat count causes the resulting list to be too large. [Bug 2130992] diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 00c7067..9ff6c07 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.91 2008/09/24 09:41:20 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.92 2008/09/27 19:47:29 dkf Exp $ */ #include "tclInt.h" @@ -39,6 +39,16 @@ static Tcl_Obj * SplitUnixPath(const char *path); static int DoGlob(Tcl_Interp *interp, Tcl_Obj *resultPtr, const char *separators, Tcl_Obj *pathPtr, int flags, char *pattern, Tcl_GlobTypeData *types); + +/* + * When there is no support for getting the block size of a file in a stat() + * call, use this as a guess. Allow it to be overridden in the platform- + * specific files. + */ + +#if (!defined(HAVE_ST_BLOCKS) && !defined(GUESSED_BLOCK_SIZE)) +#define GUESSED_BLOCK_SIZE 1024 +#endif /* *---------------------------------------------------------------------- @@ -2625,14 +2635,27 @@ Tcl_WideUInt Tcl_GetBlocksFromStat( const Tcl_StatBuf *statPtr) { +#ifdef HAVE_ST_BLOCKS return (Tcl_WideUInt) statPtr->st_blocks; +#else + return ((Tcl_WideUInt) statPtr->st_size + + (GUESSED_BLOCK_SIZE-1)) / GUESSED_BLOCK_SIZE; +#endif } unsigned Tcl_GetBlockSizeFromStat( const Tcl_StatBuf *statPtr) { +#ifdef HAVE_ST_BLOCKS return (unsigned) statPtr->st_blksize; +#else + /* + * Not a great guess, but will do... + */ + + return GUESSED_BLOCK_SIZE; +#endif } /* -- cgit v0.12 From 0f26317d580254d922cc16f4e5586bce2c2d0a31 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Sep 2008 19:48:06 +0000 Subject: Reduce the magic number count --- unix/tclUnixFCmd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 1f1cf89..689f995 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.66 2008/04/27 22:21:34 dkf Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.67 2008/09/27 19:48:06 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -527,6 +527,8 @@ TclUnixCopyFile( #define BINMODE #endif +#define DEFAULT_COPY_BLOCK_SIZE 4069 + if ((srcFd = TclOSopen(src, O_RDONLY BINMODE, 0)) < 0) { /* INTL: Native */ return TCL_ERROR; } @@ -553,11 +555,11 @@ TclUnixCopyFile( if (fstatfs(srcFd, &fs, sizeof(fs), 0) == 0) { blockSize = fs.f_bsize; } else { - blockSize = 4096; + blockSize = DEFAULT_COPY_BLOCK_SIZE; } } #else - blockSize = 4096; + blockSize = DEFAULT_COPY_BLOCK_SIZE; #endif /* HAVE_ST_BLKSIZE */ /* @@ -568,7 +570,7 @@ TclUnixCopyFile( */ if (blockSize <= 0) { - blockSize = 4096; + blockSize = DEFAULT_COPY_BLOCK_SIZE; } buffer = ckalloc(blockSize); while (1) { -- cgit v0.12 From f382ac98486d875787dc6b708fc22216a0246c48 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 28 Sep 2008 13:46:07 +0000 Subject: * generic/tclBasic.c: Fix the numLevels computations on * generic/tclInt.h: coroutine yield/resume * tests/unsupported.test: --- ChangeLog | 6 ++++ generic/tclBasic.c | 18 ++++++++--- generic/tclInt.h | 5 ++- tests/unsupported.test | 88 +++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 111 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c2e048..9684e95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-28 Miguel Sofer + + * generic/tclBasic.c: Fix the numLevels computations on + * generic/tclInt.h: coroutine yield/resume + * tests/unsupported.test: + 2008-09-27 Donal K. Fellows * generic/tclFileName.c (Tcl_GetBlock*FromStat): Made this work diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 42cac49..1467523 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.367 2008/09/17 00:01:48 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.368 2008/09/28 13:46:09 msofer Exp $ */ #include "tclInt.h" @@ -8113,12 +8113,15 @@ TclNRYieldObjCmd( int objc, Tcl_Obj *const objv[]) { + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + int numLevels = iPtr->numLevels; + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?returnValue?"); return TCL_ERROR; } - if (!iPtr->execEnvPtr->corPtr) { + if (!corPtr) { Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); return TCL_ERROR; @@ -8128,6 +8131,9 @@ TclNRYieldObjCmd( Tcl_SetObjResult(interp, objv[1]); } + iPtr->numLevels = corPtr->auxNumLevels; + corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8312,7 +8318,8 @@ NRInterpCoroutine( Tcl_Obj *const objv[]) /* Argument objects. */ { CoroutineData *corPtr = clientData; - + int nestNumLevels = corPtr->auxNumLevels; + if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; @@ -8339,6 +8346,8 @@ NRInterpCoroutine( SAVE_CONTEXT(corPtr->caller); RESTORE_CONTEXT(corPtr->running); PlugCoroutineChains(corPtr); + corPtr->auxNumLevels = iPtr->numLevels; + iPtr->numLevels += nestNumLevels; TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); @@ -8472,7 +8481,8 @@ TclNRCoroutineObjCmd( iPtr->varFramePtr = iPtr->rootFramePtr; iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; - + corPtr->auxNumLevels = iPtr->numLevels; + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); diff --git a/generic/tclInt.h b/generic/tclInt.h index 0ed0192..cbb66b7 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.399 2008/09/18 16:14:51 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.400 2008/09/28 13:46:11 msofer Exp $ */ #ifndef _TCLINT @@ -1342,6 +1342,9 @@ typedef struct CoroutineData { CorContext running; CorContext base; int *stackLevel; + int auxNumLevels; /* While the coroutine is running the numLevels of the + * create/resume command is stored here; for suspended + * coroutines it holds the nesting numLevels at yield*/ } CoroutineData; typedef struct ExecEnv { diff --git a/tests/unsupported.test b/tests/unsupported.test index 74f91aa..553021b 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.10 2008/09/05 01:20:01 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.11 2008/09/28 13:46:12 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -835,6 +835,92 @@ test unsupported-C.4.2 {bug #2093947} -constraints {coroutine} \ unset ::res } -result {{v {} write} {v {} write} {v {} unset} {v {} write} {v {} unset}} +test unsupported-C.5.1 {right numLevels on coro return} -constraints {coroutine testnrelevels} \ +-setup { + proc nestedYield {{val {}}} { + yield $val + } + proc getNumLevel {} { + # remove the level for this proc's call + expr {[lindex [testnrelevels] 1] - 1} + } + proc relativeLevel base { + # remove the level for this proc's call + expr {[getNumLevel] - $base - 1} + } + proc foo {} { + while 1 { + nestedYield + } + } + set res {} +} -body { + set base [getNumLevel] + lappend res [relativeLevel $base] + eval {coroutine a foo} + + # back to base level + lappend res [relativeLevel $base] + a + lappend res [relativeLevel $base] + eval a + lappend res [relativeLevel $base] + eval {eval a} + lappend res [relativeLevel $base] + rename a {} + lappend res [relativeLevel $base] + set res +} -cleanup { + rename foo {} + rename nestedYield {} + rename getNumLevel {} + rename relativeLevel {} + unset res +} -result {0 0 0 0 0 0} + +test unsupported-C.5.2 {right numLevels within coro} -constraints {coroutine testnrelevels} \ +-setup { + proc nestedYield {{val {}}} { + yield $val + } + proc getNumLevel {} { + # remove the level for this proc's call + expr {[lindex [testnrelevels] 1] - 1} + } + proc relativeLevel base { + # remove the level for this proc's call + expr {[getNumLevel] - $base - 1} + } + proc foo base { + while 1 { + set base [nestedYield [relativeLevel $base]] + } + } + set res {} +} -body { + lappend res [eval {coroutine a foo [getNumLevel]}] + lappend res [a [getNumLevel]] + lappend res [eval {a [getNumLevel]}] + lappend res [eval {eval {a [getNumLevel]}}] + set base [lindex $res 0] + foreach x $res[set res {}] { + # REMARK: the first call is one level deeper due to [coroutine] being + # on the Tcl call stack: the proper result is a leading 0 and a + # sequence of -1s + lappend res [expr {$x-$base}] + } + set res +} -cleanup { + rename a {} + rename foo {} + rename nestedYield {} + rename getNumLevel {} + rename relativeLevel {} + unset res +} -result {0 -1 -1 -1} + + + # cleanup ::tcltest::cleanupTests -- cgit v0.12 From 58acf122398c693f3a99b458711b071301e10670 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 28 Sep 2008 20:39:08 +0000 Subject: Added test for [Bug 2130726]. --- tests/lrepeat.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/lrepeat.test b/tests/lrepeat.test index a28dd27..7789e2f 100644 --- a/tests/lrepeat.test +++ b/tests/lrepeat.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lrepeat.test,v 1.3 2008/09/26 21:05:57 dgp Exp $ +# RCS: @(#) $Id: lrepeat.test,v 1.4 2008/09/28 20:39:08 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -63,6 +63,9 @@ test lrepeat-1.7 {Accept zero repetitions (TIP 323)} { } -result {} } +test lrepeat-1.8 {Do not build enormous lists - Bug 2130992} -body { + lrepeat 0x10000000 a b c d e f g h +} -returnCodes error -result {too many elements in result list} ## Okay test lrepeat-2.1 {normal cases} { -- cgit v0.12 From d41bad2545ee171add61111b71b9d8c5c3e89173 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 28 Sep 2008 22:17:36 +0000 Subject: Implement TIP 314. [Patch 1901783] --- ChangeLog | 13 +++ doc/Ensemble.3 | 42 ++++++-- doc/namespace.n | 30 +++++- generic/tcl.decls | 13 ++- generic/tclCompCmds.c | 16 ++- generic/tclNamesp.c | 285 +++++++++++++++++++++++++++++++++++++++++++------- tests/namespace.test | 223 ++++++++++++++++++++++++++++++++++++++- 7 files changed, 569 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9684e95..f6b346e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-09-28 Donal K. Fellows + + TIP #314 IMPLEMENTATION + + * generic/tclCompCmds.c (TclCompileEnsemble) + * generic/tclNamesp.c (NamespaceEnsembleCmd) + (Tcl_SetEnsembleParameterList, Tcl_GetEnsembleParameterList) + (NsEnsembleImplementationCmdNR): + * generic/tcl.decls, doc/Ensemble.3, doc/namespace.n + * tests/namespace.test: Allow the handling of a (fixed) number of + formal parameters between an ensemble's command and subcommand at + invokation time. [Patch 1901783] + 2008-09-28 Miguel Sofer * generic/tclBasic.c: Fix the numLevels computations on diff --git a/doc/Ensemble.3 b/doc/Ensemble.3 index 5fbdea1..07e67db 100644 --- a/doc/Ensemble.3 +++ b/doc/Ensemble.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Ensemble.3,v 1.6 2008/04/20 02:52:29 georgeps Exp $ +'\" RCS: @(#) $Id: Ensemble.3,v 1.7 2008/09/28 22:17:37 dkf Exp $ '\" '\" This documents the C API introduced in TIP#235 '\" @@ -38,6 +38,14 @@ int int \fBTcl_SetEnsembleMappingDict\fR(\fIinterp, token, dictObj\fR) .sp +.VS 8.6 +int +\fBTcl_GetEnsembleParameterList\fR(\fIinterp, token, listObjPtr\fR) +.sp +int +\fBTcl_SetEnsembleParameterList\fR(\fIinterp, token, listObj\fR) +.VE 8.6 +.sp int \fBTcl_GetEnsembleSubcommandList\fR(\fIinterp, token, listObjPtr\fR) .sp @@ -88,17 +96,18 @@ dictionary is to be removed. Pointer to a variable into which to write the current ensemble mapping dictionary. .AP Tcl_Obj *listObj in -A list value to use for the defined list of subcommands in the -dictionary or the unknown subcommmand handler command prefix. May be -NULL if the subcommand list or unknown handler are to be removed. +A list value to use for the list of formal pre-subcommand parameters, the +defined list of subcommands in the dictionary or the unknown subcommmand +handler command prefix. May be NULL if the subcommand list or unknown handler +are to be removed. .AP Tcl_Obj **listObjPtr out -Pointer to a variable into which to write the current defined list of -subcommands or the current unknown handler prefix. +Pointer to a variable into which to write the current list of formal +pre-subcommand parameters, the defined list of subcommands or the current +unknown handler prefix. .AP Tcl_Namespace **namespacePtrPtr out Pointer to a variable into which to write the handle of the namespace to which the ensemble is bound. .BE - .SH DESCRIPTION An ensemble is a command, bound to some namespace, which consists of a collection of subcommands implemented by other Tcl commands. The first @@ -128,6 +137,7 @@ Every ensemble has four read-write properties and a read-only property. The properties are: .TP \fBflags\fR (read-write) +. The set of flags for the ensemble, expressed as a bit-field. Currently, the only public flag is TCL_ENSEMBLE_PREFIX which is set when unambiguous prefixes of subcommands are permitted to @@ -138,6 +148,7 @@ functions is a Tcl result code (TCL_OK, or TCL_ERROR if the token does not refer to an ensemble). .TP \fBmapping dictionary\fR (read-write) +. A dictionary containing a mapping from subcommand names to lists of words to use as a command prefix (replacing the first two words of the command which are the ensemble command itself and the subcommand @@ -151,7 +162,21 @@ ensemble) and the dictionary obtained from \fBTcl_GetEnsembleMappingDict\fR should always be treated as immutable even if it is unshared. .TP +\fBformal pre-subcommand parameter list\fR (read-write) +.VS 8.6 +A list of formal parameter names (the names only being used when generating +error messages) that come at invokation of the ensemble between the name of +the ensemble and the subcommand argument. NULL (the default) is equivalent to +the empty list. May be read and written using +\fBTcl_GetEnsembleParameterList\fR and \fBTcl_SetEnsembleParameterList\fR +respectively. The result of both of those functions is a Tcl result code +(TCL_OK, or TCL_ERROR if the token does not refer to an ensemble) and the +dictionary obtained from \fBTcl_GetEnsembleParameterList\fR should always be +treated as immutable even if it is unshared. +.VE 8.6 +.TP \fBsubcommand list\fR (read-write) +. A list of all the subcommand names for the ensemble, or NULL if this is to be derived from either the keys of the mapping dictionary (see above) or (if that is also NULL) from the set of commands exported by @@ -164,6 +189,7 @@ token does not refer to an ensemble) and the list obtained from immutable even if it is unshared. .TP \fBunknown subcommand handler command prefix\fR (read-write) +. A list of words to prepend on the front of any subcommand when the subcommand is unknown to the ensemble (according to the current prefix handling rule); see the \fBnamespace ensemble\fR command for more @@ -177,12 +203,12 @@ not refer to an ensemble) and the list obtained from immutable even if it is unshared. .TP \fBbound namespace\fR (read-only) +. The namespace to which the ensemble is bound; when the namespace is deleted, so too will the ensemble, and this namespace is also the namespace whose list of exported commands is used if both the mapping dictionary and the subcommand list properties are NULL. May be read using \fBTcl_GetEnsembleNamespace\fR which returns a Tcl result code (TCL_OK, or TCL_ERROR if the token does not refer to an ensemble). - .SH "SEE ALSO" namespace(n), Tcl_DeleteCommandFromToken(3) diff --git a/doc/namespace.n b/doc/namespace.n index f2bc686..faee9c8 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.33 2008/09/26 19:36:50 dgp Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.34 2008/09/28 22:17:39 dkf Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -731,6 +731,14 @@ name. Note that when this option is non-empty and the \fB\-subcommands\fR option is empty, the ensemble subcommand names will be exactly those words that have mappings in the dictionary. .TP +\fB\-parameters\fR +.VS 8.6 +This option gives a list of named arguments (the names being used during +generation of error messages) that are passed by the caller of the ensemble +between the name of the ensemble and the subcommand argument. By default, it +is the empty list. +.VE 8.6 +.TP \fB\-prefixes\fR . This option (which is enabled by default) controls whether the @@ -874,7 +882,27 @@ Remove all imported commands from the current namespace: .CS namespace forget {*}[namespace import] .CE +.PP +.VS 8.6 +Create an ensemble for simple working with numbers, using the +\fB\-parameters\fR option to allow the operator to be put between the first +and second arguments. +.CS +\fBnamespace eval\fR do { + \fBnamespace export\fR * + \fBnamespace ensemble\fR create -parameters x + proc plus {x y} {expr { $x + $y }} + proc minus {x y} {expr { $x - $y }} +} + +# In use, the ensemble works like this: +puts [do 1 plus [do 9 minus 7]] +.CE +.VE 8.6 .SH "SEE ALSO" interp(n), upvar(n), variable(n) .SH KEYWORDS command, ensemble, exported, internal, variable +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/generic/tcl.decls b/generic/tcl.decls index 0d8fea6..8a65b76 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.144 2008/09/24 09:41:13 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.145 2008/09/28 22:17:39 dkf Exp $ library tcl @@ -2187,6 +2187,17 @@ declare 601 generic { unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr) } +# TIP#314 (ensembles with parameters) +declare 602 generic { + int Tcl_SetEnsembleParameterList(Tcl_Interp *interp, Tcl_Command token, + Tcl_Obj *paramList) +} +declare 603 generic { + int Tcl_GetEnsembleParameterList(Tcl_Interp *interp, Tcl_Command token, + Tcl_Obj **paramListPtr) +} + + ############################################################################## # Define the platform specific public Tcl interface. These functions are diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index dae4417..877bb11 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.146 2008/07/27 22:18:22 nijtmans Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.147 2008/09/28 22:17:39 dkf Exp $ */ #include "tclInt.h" @@ -6219,6 +6219,20 @@ TclCompileEnsemble( } /* + * Also refuse to compile anything that uses a formal parameter list for + * now, on the grounds that it is too complex. + */ + + if (Tcl_GetEnsembleParameterList(NULL, ensemble, &listObj) != TCL_OK + || listObj != NULL) { + /* + * Figuring out how to compile this has become too much. Bail out. + */ + + return TCL_ERROR; + } + + /* * Next, get the flags. We need them on several code paths. */ diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index e08ab4e..c05913d 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.177 2008/09/26 19:36:50 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.178 2008/09/28 22:17:39 dkf Exp $ */ #include "tclInt.h" @@ -55,12 +55,12 @@ static Tcl_ThreadDataKey dataKey; */ typedef struct ResolvedNsName { - Namespace *nsPtr; /* A cached pointer to the Namespace that the - * name resolved to. */ - Namespace *refNsPtr; /* Points to the namespace context in which the - * name was resolved. NULL if the name is fully - * qualified and thus the resolution does not - * depend on the context. */ + Namespace *nsPtr; /* A cached pointer to the Namespace that the + * name resolved to. */ + Namespace *refNsPtr; /* Points to the namespace context in which + * the name was resolved. NULL if the name is + * fully qualified and thus the resolution + * does not depend on the context. */ int refCount; /* Reference count: 1 for each nsName object * that has a pointer to this ResolvedNsName * structure as its internal rep. This @@ -139,6 +139,11 @@ typedef struct EnsembleConfig { * subcommand will be reparsed by the ensemble * core, presumably because the ensemble * itself has been updated. */ + Tcl_Obj *parameterList; /* List of ensemble parameter names. */ + int numParameters; /* Cached number of parameters. This is either + * 0 (if the parameterList field is NULL) or + * the length of the list in the parameterList + * field. */ } EnsembleConfig; #define ENS_DEAD 0x1 /* Flag value to say that the ensemble is dead @@ -4807,16 +4812,19 @@ NamespaceEnsembleCmd( ENS_CONFIG, ENS_CREATE, ENS_EXISTS }; static const char *createOptions[] = { - "-command", "-map", "-prefixes", "-subcommands", "-unknown", NULL + "-command", "-map", "-parameters", "-prefixes", "-subcommands", + "-unknown", NULL }; enum EnsCreateOpts { - CRT_CMD, CRT_MAP, CRT_PREFIX, CRT_SUBCMDS, CRT_UNKNOWN + CRT_CMD, CRT_MAP, CRT_PARAM, CRT_PREFIX, CRT_SUBCMDS, CRT_UNKNOWN }; static const char *configOptions[] = { - "-map", "-namespace", "-prefixes", "-subcommands", "-unknown", NULL + "-map", "-namespace", "-parameters", "-prefixes", "-subcommands", + "-unknown", NULL }; enum EnsConfigOpts { - CONF_MAP, CONF_NAMESPACE, CONF_PREFIX, CONF_SUBCMDS, CONF_UNKNOWN + CONF_MAP, CONF_NAMESPACE, CONF_PARAM, CONF_PREFIX, CONF_SUBCMDS, + CONF_UNKNOWN }; int index; @@ -4851,6 +4859,7 @@ NamespaceEnsembleCmd( Tcl_Obj *mapObj = NULL; int permitPrefix = 1; Tcl_Obj *unknownObj = NULL; + Tcl_Obj *paramObj = NULL; objv += 3; objc -= 3; @@ -4891,6 +4900,15 @@ NamespaceEnsembleCmd( } subcmdObj = (len > 0 ? objv[1] : NULL); continue; + case CRT_PARAM: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + paramObj = (len > 0 ? objv[1] : NULL); + continue; case CRT_MAP: { Tcl_Obj *patchedDict = NULL, *subcmdObj; @@ -4997,6 +5015,7 @@ NamespaceEnsembleCmd( Tcl_SetEnsembleSubcommandList(interp, token, subcmdObj); Tcl_SetEnsembleMappingDict(interp, token, mapObj); Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); + Tcl_SetEnsembleParameterList(interp, token, paramObj); /* * Tricky! Must ensure that the result is not shared (command delete @@ -5020,7 +5039,8 @@ NamespaceEnsembleCmd( case ENS_CONFIG: if (objc < 4 || (objc != 5 && objc & 1)) { - Tcl_WrongNumArgs(interp, 3, objv, "cmdname ?-option value ...? ?arg ...?"); + Tcl_WrongNumArgs(interp, 3, objv, + "cmdname ?-option value ...? ?arg ...?"); return TCL_ERROR; } token = Tcl_FindEnsemble(interp, objv[3], TCL_LEAVE_ERR_MSG); @@ -5042,6 +5062,12 @@ NamespaceEnsembleCmd( Tcl_SetObjResult(interp, resultObj); } break; + case CONF_PARAM: + Tcl_GetEnsembleParameterList(NULL, token, &resultObj); + if (resultObj != NULL) { + Tcl_SetObjResult(interp, resultObj); + } + break; case CONF_MAP: Tcl_GetEnsembleMappingDict(NULL, token, &resultObj); if (resultObj != NULL) { @@ -5099,6 +5125,13 @@ NamespaceEnsembleCmd( Tcl_NewStringObj(((Namespace *)namespacePtr)->fullName, -1)); + /* -parameters option */ + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(configOptions[CONF_PARAM], -1)); + Tcl_GetEnsembleParameterList(NULL, token, &tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, + (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); + /* -prefix option */ Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj(configOptions[CONF_PREFIX], -1)); @@ -5126,12 +5159,13 @@ NamespaceEnsembleCmd( Tcl_DictSearch search; Tcl_Obj *listObj; int done, len, allocatedMapFlag = 0; - Tcl_Obj *subcmdObj = NULL, *mapObj = NULL, + Tcl_Obj *subcmdObj = NULL, *mapObj = NULL, *paramObj = NULL, *unknownObj = NULL; /* Defaults, silence gcc 4 warnings */ int permitPrefix, flags = 0; /* silence gcc 4 warning */ Tcl_GetEnsembleSubcommandList(NULL, token, &subcmdObj); Tcl_GetEnsembleMappingDict(NULL, token, &mapObj); + Tcl_GetEnsembleParameterList(NULL, token, ¶mObj); Tcl_GetEnsembleUnknownHandler(NULL, token, &unknownObj); Tcl_GetEnsembleFlags(NULL, token, &flags); permitPrefix = (flags & TCL_ENSEMBLE_PREFIX) != 0; @@ -5164,6 +5198,15 @@ NamespaceEnsembleCmd( } subcmdObj = (len > 0 ? objv[1] : NULL); continue; + case CONF_PARAM: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + paramObj = (len > 0 ? objv[1] : NULL); + continue; case CONF_MAP: { Tcl_Obj *patchedDict = NULL, *subcmdObj; @@ -5273,6 +5316,7 @@ NamespaceEnsembleCmd( : flags&~TCL_ENSEMBLE_PREFIX); Tcl_SetEnsembleSubcommandList(interp, token, subcmdObj); Tcl_SetEnsembleMappingDict(interp, token, mapObj); + Tcl_SetEnsembleParameterList(interp, token, paramObj); Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); Tcl_SetEnsembleFlags(interp, token, flags); return TCL_OK; @@ -5339,6 +5383,8 @@ Tcl_CreateEnsemble( ensemblePtr->subcmdList = NULL; ensemblePtr->subcommandDict = NULL; ensemblePtr->flags = flags; + ensemblePtr->numParameters = 0; + ensemblePtr->parameterList = NULL; ensemblePtr->unknownHandler = NULL; ensemblePtr->token = Tcl_NRCreateCommand(interp, name, NsEnsembleImplementationCmd, NsEnsembleImplementationCmdNR, @@ -5441,6 +5487,81 @@ Tcl_SetEnsembleSubcommandList( /* *---------------------------------------------------------------------- * + * Tcl_SetEnsembleParameterList -- + * + * Set the parameter list for a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an ensemble + * or the parameter list - if non-NULL - is not a list). + * + * Side effects: + * The ensemble is updated and marked for recompilation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_SetEnsembleParameterList( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj *paramList) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + Tcl_Obj *oldList; + int length; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + return TCL_ERROR; + } + if (paramList == NULL) { + length = 0; + } else { + if (TclListObjLength(interp, paramList, &length) != TCL_OK) { + return TCL_ERROR; + } + if (length < 1) { + paramList = NULL; + } + } + + ensemblePtr = cmdPtr->objClientData; + oldList = ensemblePtr->parameterList; + ensemblePtr->parameterList = paramList; + if (paramList != NULL) { + Tcl_IncrRefCount(paramList); + } + if (oldList != NULL) { + TclDecrRefCount(oldList); + } + ensemblePtr->numParameters = length; + + /* + * Trigger an eventual recomputation of the ensemble command set. Note + * that this is slightly tricky, as it means that we are not actually + * counting the number of namespace export actions, but it is the simplest + * way to go! + */ + + ensemblePtr->nsPtr->exportLookupEpoch++; + + /* + * Special hack to make compiling of [info exists] work when the + * dictionary is modified. + */ + + if (cmdPtr->compileProc != NULL) { + ((Interp *)interp)->compileEpoch++; + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_SetEnsembleMappingDict -- * * Set the mapping dictionary for a particular ensemble. @@ -5713,6 +5834,46 @@ Tcl_GetEnsembleSubcommandList( /* *---------------------------------------------------------------------- * + * Tcl_GetEnsembleParameterList -- + * + * Get the list of parameters associated with a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). The list of parameters is returned by updating the + * variable pointed to by the last parameter (NULL if there are + * no parameters). + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetEnsembleParameterList( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj **paramListPtr) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (interp != NULL) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + } + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + *paramListPtr = ensemblePtr->parameterList; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_GetEnsembleMappingDict -- * * Get the command mapping dictionary associated with a particular @@ -6083,12 +6244,39 @@ NsEnsembleImplementationCmdNR( * names. */ int reparseCount = 0; /* Number of reparses. */ - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); + /* + * Must recheck objc, since numParameters might have changed. Cf. test + * namespace-53.9. + */ + + restartEnsembleParse: + if (objc < 2 + ensemblePtr->numParameters) { + /* + * We don't have a subcommand argument. Make error message. + */ + + Tcl_DString buf; /* Message being built */ + Tcl_Obj **elemPtrs; /* Parameter names */ + int len; /* Number of parameters to append */ + + Tcl_DStringInit(&buf); + if (ensemblePtr->parameterList == NULL) { + len = 0; + } else if (TclListObjGetElements(NULL, ensemblePtr->parameterList, + &len, &elemPtrs) != TCL_OK) { + Tcl_Panic("List of ensemble parameters is not a list"); + } + for (; len>0; len--,elemPtrs++) { + Tcl_DStringAppend(&buf, Tcl_GetString(*elemPtrs), -1); + Tcl_DStringAppend(&buf, " ", -1); + } + Tcl_DStringAppend(&buf, "subcommand ?arg ...?", -1); + Tcl_WrongNumArgs(interp, 1, objv, Tcl_DStringValue(&buf)); + Tcl_DStringFree(&buf); + return TCL_ERROR; } - restartEnsembleParse: if (ensemblePtr->nsPtr->flags & NS_DYING) { /* * Don't know how we got here, but make things give up quickly. @@ -6114,8 +6302,9 @@ NsEnsembleImplementationCmdNR( * part where we do the invocation of the subcommand. */ - if (objv[1]->typePtr == &tclEnsembleCmdType) { - EnsembleCmdRep *ensembleCmd = objv[1]->internalRep.otherValuePtr; + if (objv[1+ensemblePtr->numParameters]->typePtr==&tclEnsembleCmdType){ + EnsembleCmdRep *ensembleCmd = objv[1+ensemblePtr->numParameters] + ->internalRep.otherValuePtr; if (ensembleCmd->nsPtr == ensemblePtr->nsPtr && ensembleCmd->epoch == ensemblePtr->epoch && @@ -6136,7 +6325,7 @@ NsEnsembleImplementationCmdNR( */ hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, - TclGetString(objv[1])); + TclGetString(objv[1 + ensemblePtr->numParameters])); if (hPtr != NULL) { char *fullName = Tcl_GetHashKey(&ensemblePtr->subcommandTable, hPtr); @@ -6146,7 +6335,8 @@ NsEnsembleImplementationCmdNR( * Cache for later in the subcommand object. */ - MakeCachedEnsembleCommand(objv[1], ensemblePtr, fullName, prefixObj); + MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], + ensemblePtr, fullName, prefixObj); } else if (!(ensemblePtr->flags & TCL_ENSEMBLE_PREFIX)) { /* * Could not map, no prefixing, go to unknown/error handling. @@ -6167,8 +6357,8 @@ NsEnsembleImplementationCmdNR( int stringLength, i; int tableLength = ensemblePtr->subcommandTable.numEntries; - subcmdName = TclGetString(objv[1]); - stringLength = objv[1]->length; + subcmdName = TclGetString(objv[1 + ensemblePtr->numParameters]); + stringLength = objv[1 + ensemblePtr->numParameters]->length; for (i=0 ; isubcommandArrayPtr[i], @@ -6214,7 +6404,8 @@ NsEnsembleImplementationCmdNR( * Cache for later in the subcommand object. */ - MakeCachedEnsembleCommand(objv[1], ensemblePtr, fullName, prefixObj); + MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], + ensemblePtr, fullName, prefixObj); } Tcl_IncrRefCount(prefixObj); @@ -6226,8 +6417,12 @@ NsEnsembleImplementationCmdNR( * number of arguments to this ensemble command), populating it and then * feeding it back through the main command-lookup engine. In theory, we * could look up the command in the namespace ourselves, as we already - * have the namespace in which it is guaranteed to exist, but we don't do - * that (the cacheing of the command object used should help with that.) + * have the namespace in which it is guaranteed to exist, + * + * ((Q: That's not true if the -map option is used, is it?)) + * + * but we don't do that (the cacheing of the command object used should + * help with that.) */ { @@ -6262,7 +6457,11 @@ NsEnsembleImplementationCmdNR( listRepPtr->elemCount = copyObjc; copyObjv = &listRepPtr->elements; memcpy(copyObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); - memcpy(copyObjv+prefixObjc, objv+2, sizeof(Tcl_Obj *) * (objc-2)); + memcpy(copyObjv+prefixObjc, objv+1, + sizeof(Tcl_Obj *) * ensemblePtr->numParameters); + memcpy(copyObjv+prefixObjc+ensemblePtr->numParameters, + objv+ensemblePtr->numParameters+2, + sizeof(Tcl_Obj *) * (objc-ensemblePtr->numParameters-2)); for (i=0; i < copyObjc; i++) { Tcl_IncrRefCount(copyObjv[i]); @@ -6272,20 +6471,25 @@ NsEnsembleImplementationCmdNR( /* * Record what arguments the script sent in so that things like - * Tcl_WrongNumArgs can give the correct error message. + * Tcl_WrongNumArgs can give the correct error message. Parameters + * count both as inserted and removed arguments. */ if (iPtr->ensembleRewrite.sourceObjs == NULL) { iPtr->ensembleRewrite.sourceObjs = objv; - iPtr->ensembleRewrite.numRemovedObjs = 2; - iPtr->ensembleRewrite.numInsertedObjs = prefixObjc; + iPtr->ensembleRewrite.numRemovedObjs = + 2 + ensemblePtr->numParameters; + iPtr->ensembleRewrite.numInsertedObjs = + prefixObjc + ensemblePtr->numParameters; TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } else { - register int ni = iPtr->ensembleRewrite.numInsertedObjs; - - if (ni < 2) { - iPtr->ensembleRewrite.numRemovedObjs += 2 - ni; + register int ni = 2 + ensemblePtr->numParameters + - iPtr->ensembleRewrite.numInsertedObjs; + /* Position in objv of new front of insertion + * relative to old one. */ + if (ni > 0) { + iPtr->ensembleRewrite.numRemovedObjs += ni; iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-1; } else { iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-2; @@ -6328,18 +6532,20 @@ NsEnsembleImplementationCmdNR( Tcl_ResetResult(interp); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENSEMBLE", - TclGetString(objv[1]), NULL); + TclGetString(objv[1+ensemblePtr->numParameters]), NULL); if (ensemblePtr->subcommandTable.numEntries == 0) { - Tcl_AppendResult(interp, "unknown subcommand \"",TclGetString(objv[1]), + Tcl_AppendResult(interp, "unknown subcommand \"", + TclGetString(objv[1+ensemblePtr->numParameters]), "\": namespace ", ensemblePtr->nsPtr->fullName, " does not export any commands", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", - TclGetString(objv[1]), NULL); + TclGetString(objv[1+ensemblePtr->numParameters]), NULL); return TCL_ERROR; } Tcl_AppendResult(interp, "unknown ", (ensemblePtr->flags & TCL_ENSEMBLE_PREFIX ? "or ambiguous " : ""), - "subcommand \"", TclGetString(objv[1]), "\": must be ", NULL); + "subcommand \"", TclGetString(objv[1+ensemblePtr->numParameters]), + "\": must be ", NULL); if (ensemblePtr->subcommandTable.numEntries == 1) { Tcl_AppendResult(interp, ensemblePtr->subcommandArrayPtr[0], NULL); } else { @@ -6353,7 +6559,7 @@ NsEnsembleImplementationCmdNR( ensemblePtr->subcommandArrayPtr[i], NULL); } Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", - TclGetString(objv[1]), NULL); + TclGetString(objv[1+ensemblePtr->numParameters]), NULL); return TCL_ERROR; } @@ -6650,6 +6856,9 @@ DeleteEnsembleConfig( if (ensemblePtr->subcmdList != NULL) { Tcl_DecrRefCount(ensemblePtr->subcmdList); } + if (ensemblePtr->parameterList != NULL) { + Tcl_DecrRefCount(ensemblePtr->parameterList); + } if (ensemblePtr->subcommandDict != NULL) { Tcl_DecrRefCount(ensemblePtr->subcommandDict); } diff --git a/tests/namespace.test b/tests/namespace.test index a0035e6..bf2156d 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.73 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: namespace.test,v 1.74 2008/09/28 22:17:40 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1700,7 +1700,7 @@ test namespace-45.1 {ensemble: introspection} { } namespace delete ns set result -} {-map {} -namespace ::ns -prefixes 1 -subcommands {} -unknown {}} +} {-map {} -namespace ::ns -parameters {} -prefixes 1 -subcommands {} -unknown {}} test namespace-45.2 {ensemble: introspection} { namespace eval ns { namespace export x @@ -1914,7 +1914,7 @@ test namespace-47.5 {ensemble: unknown handler} { lappend result [catch {foo bar} msg] $msg [namespace ensemble config foo] rename foo {} set result -} {{LOG ::foo bar} 1 {unknown subcommand "bar": namespace :: does not export any commands} {LOG ::foo bar} boo hoo 0 {{LOG ::foo bar} 1 {unknown subcommand "bar": namespace :: does not export any commands} {LOG ::foo bar} boo hoo} {-map {} -namespace :: -prefixes 1 -subcommands {} -unknown bar}} +} {{LOG ::foo bar} 1 {unknown subcommand "bar": namespace :: does not export any commands} {LOG ::foo bar} boo hoo 0 {{LOG ::foo bar} 1 {unknown subcommand "bar": namespace :: does not export any commands} {LOG ::foo bar} boo hoo} {-map {} -namespace :: -parameters {} -prefixes 1 -subcommands {} -unknown bar}} test namespace-47.6 {ensemble: unknown handler} { namespace ensemble create -command foo -unknown bar proc bar {args} { @@ -1981,7 +1981,7 @@ test namespace-48.1 {ensembles and namespace import: unknown handler} { bar z 789 namespace delete foo set result -} {{-map {} -namespace ::foo -prefixes 1 -subcommands x -unknown ::foo::u} XXX 123 ::foo::bar {y 456} YYY 456 ::foo::bar {z 789} ZZZ 789} +} {{-map {} -namespace ::foo -parameters {} -prefixes 1 -subcommands x -unknown ::foo::u} XXX 123 ::foo::bar {y 456} YYY 456 ::foo::bar {z 789} ZZZ 789} test namespace-48.2 {ensembles and namespace import: exists} { namespace eval foo { namespace ensemble create -command ::foo::bar @@ -2635,6 +2635,221 @@ test namespace-52.12 {unknown: error case must not reset handler} -body { namespace delete foo } -result ok +# TIP 314 - ensembles with parameters + +test namespace-53.1 {ensembles: parameters} { + namespace eval ns { + namespace export x + proc x {para} {list 1 $para} + namespace ensemble create -parameters {para1} + } + list [info command ns] [ns bar x] [namespace delete ns] [info command ns] +} {ns {1 bar} {} {}} + +test namespace-53.2 {ensembles: parameters} -setup { + namespace eval ns { + namespace export x + proc x {para} {list 1 $para} + namespace ensemble create + } +} -body { + namespace ensemble configure ns -parameters {para1} + rename ns foo + list [info command foo] [foo bar x] [namespace delete ns] [info command foo] +} -result {foo {1 bar} {} {}} + +test namespace-53.3 {ensembles: parameters} -setup { + namespace eval ns { + namespace export x* + proc x1 {para} {list 1 $para} + proc x2 {para} {list 2 $para} + namespace ensemble create -parameters param1 + } +} -body { + set result [list [ns x2 x1] [ns x1 x2]] + lappend result [catch {ns x} msg] $msg + lappend result [catch {ns x x} msg] $msg + rename ns {} + lappend result [info command ns::x1] + namespace delete ns + lappend result [info command ns::x1] +} -result\ + {{1 x2} {2 x1}\ + 1 {wrong # args: should be "ns param1 subcommand ?arg ...?"}\ + 1 {unknown or ambiguous subcommand "x": must be x1, or x2}\ + ::ns::x1 {}} + +test namespace-53.4 {ensembles: parameters} -setup { + namespace eval ns { + namespace export x* + proc x1 {a1 a2} {list 1 $a1 $a2} + proc x2 {a1 a2} {list 2 $a1 $a2} + proc x3 {a1 a2} {list 3 $a1 $a2} + namespace ensemble create + } +} -body { + set result {} + lappend result [ns x1 x2 x3] + namespace ensemble configure ns -parameters p1 + lappend result [ns x1 x2 x3] + namespace ensemble configure ns -parameters {p1 p2} + lappend result [ns x1 x2 x3] +} -cleanup { + namespace delete ns +} -result {{1 x2 x3} {2 x1 x3} {3 x1 x2}} + +test namespace-53.5 {ensembles: parameters} -setup { + namespace eval ns { + namespace export x* + proc x1 {para} {list 1 $para} + proc x2 {para} {list 2 $para} + proc x3 {para} {list 3 $para} + namespace ensemble create + } +} -body { + set result [list [catch {ns x x1} msg] $msg] + lappend result [catch {ns x1 x} msg] $msg + namespace ensemble configure ns -parameters p1 + lappend result [catch {ns x1 x} msg] $msg + lappend result [catch {ns x x1} msg] $msg +} -cleanup { + namespace delete ns +} -result\ + {1 {unknown or ambiguous subcommand "x": must be x1, x2, or x3}\ + 0 {1 x}\ + 1 {unknown or ambiguous subcommand "x": must be x1, x2, or x3}\ + 0 {1 x}} + +test namespace-53.6 {ensembles: nested} -setup { + namespace eval ns { + namespace export x* + namespace eval x0 { + proc z {args} {list 0 $args} + namespace export z + namespace ensemble create + } + proc x1 {args} {list 1 $args} + proc x2 {args} {list 2 $args} + proc x3 {args} {list 3 $args} + namespace ensemble create -parameters p + } +} -body { + list [ns z x0] [ns z x1] [ns z x2] [ns z x3] +} -cleanup { + namespace delete ns +} -result {{0 {}} {1 z} {2 z} {3 z}} + +test namespace-53.7 {ensembles: parameters & wrong # args} -setup { + namespace eval ns { + namespace export x* + proc x1 {a1 a2 a3 a4} {list x1 $a1 $a2 $a3 $a4} + namespace ensemble create -parameters p1 + } +} -body { + set result {} + lappend result [catch {ns} msg] $msg + lappend result [catch {ns x1} msg] $msg + lappend result [catch {ns x1 x1} msg] $msg + lappend result [catch {ns x1 x1 x1} msg] $msg + lappend result [catch {ns x1 x1 x1 x1} msg] $msg + lappend result [catch {ns x1 x1 x1 x1 x1} msg] $msg +} -cleanup { + namespace delete ns +} -result\ + {1 {wrong # args: should be "ns p1 subcommand ?arg ...?"}\ + 1 {wrong # args: should be "ns p1 subcommand ?arg ...?"}\ + 1 {wrong # args: should be "ns x1 x1 a2 a3 a4"}\ + 1 {wrong # args: should be "ns x1 x1 a2 a3 a4"}\ + 1 {wrong # args: should be "ns x1 x1 a2 a3 a4"}\ + 0 {x1 x1 x1 x1 x1}} + +test namespace-53.8 {ensemble: unknown handler changing -parameters} -setup { + namespace eval ns { + namespace export x* + proc x1 {a1} {list 1 $a1} + proc Magic {ensemble subcmd args} { + namespace ensemble configure $ensemble\ + -parameters [lrange p1 [llength [ + namespace ensemble configure $ensemble -parameters + ]] 0] + list + } + namespace ensemble create -unknown ::ns::Magic + } +} -body { + set result {} + lappend result [catch {ns x1 x2} msg] $msg [namespace ensemble configure ns -parameters] + lappend result [catch {ns x2 x1} msg] $msg [namespace ensemble configure ns -parameters] + lappend result [catch {ns x2 x3} msg] $msg [namespace ensemble configure ns -parameters] +} -cleanup { + namespace delete ns +} -result\ + {0 {1 x2} {}\ + 0 {1 x2} p1\ + 1 {unknown or ambiguous subcommand "x2": must be x1} {}} + +test namespace-53.9 {ensemble: unknown handler changing -parameters,\ + thereby eating all args} -setup { + namespace eval ns { + namespace export x* + proc x1 {args} {list 1 $args} + proc Magic {ensemble subcmd args} { + namespace ensemble configure $ensemble\ + -parameters {p1 p2 p3 p4 p5} + list + } + namespace ensemble create -unknown ::ns::Magic + } +} -body { + set result {} + lappend result [catch {ns x1 x2} msg] $msg [namespace ensemble configure ns -parameters] + lappend result [catch {ns x2 x1} msg] $msg [namespace ensemble configure ns -parameters] + lappend result [catch {ns a1 a2 a3 a4 a5 x1} msg] $msg [namespace ensemble configure ns -parameters] +} -cleanup { + namespace delete ns +} -result\ + {0 {1 x2} {}\ + 1 {wrong # args: should be "ns p1 p2 p3 p4 p5 subcommand ?arg ...?"} {p1 p2 p3 p4 p5}\ + 0 {1 {a1 a2 a3 a4 a5}} {p1 p2 p3 p4 p5}} + +test namespace-53.10 {ensembles: nested rewrite} -setup { + namespace eval ns { + namespace export x + namespace eval x { + proc z0 {} {list 0} + proc z1 {a1} {list 1 $a1} + proc z2 {a1 a2} {list 2 $a1 $a2} + proc z3 {a1 a2 a3} {list 3 $a1 $a2 $a3} + namespace export z* + namespace ensemble create + } + namespace ensemble create -parameters p + } +} -body { + set result {} + # In these cases, parsing the subensemble does not grab a new word. + lappend result [catch {ns z0 x} msg] $msg + lappend result [catch {ns z1 x} msg] $msg + lappend result [catch {ns z2 x} msg] $msg + lappend result [catch {ns z2 x v} msg] $msg + namespace ensemble configure ns::x -parameters q1 + # In these cases, parsing the subensemble grabs a new word. + lappend result [catch {ns v x z0} msg] $msg + lappend result [catch {ns v x z1} msg] $msg + lappend result [catch {ns v x z2} msg] $msg + lappend result [catch {ns v x z2 v2} msg] $msg +} -cleanup { + namespace delete ns +} -result\ + {0 0\ + 1 {wrong # args: should be "ns z1 x a1"}\ + 1 {wrong # args: should be "ns z2 x a1 a2"}\ + 1 {wrong # args: should be "ns z2 x a1 a2"}\ + 1 {wrong # args: should be "::ns::x::z0"}\ + 0 {1 v}\ + 1 {wrong # args: should be "ns v x z2 a2"}\ + 0 {2 v v2}} + # cleanup catch {rename cmd1 {}} catch {unset l} -- cgit v0.12 From 28e0461696908d8627af917607355d087a422c3d Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 28 Sep 2008 22:18:46 +0000 Subject: regen --- generic/tclDecls.h | 81 +++++++++++++++++++++++++++++++-------------------- generic/tclStubInit.c | 4 ++- 2 files changed, 52 insertions(+), 33 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 96d1774..bde068b 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.146 2008/09/24 09:41:13 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.147 2008/09/28 22:18:46 dkf Exp $ */ #ifndef _TCLDECLS @@ -3569,78 +3569,85 @@ EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, #ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED #define Tcl_GetFSDeviceFromStat_TCL_DECLARED /* 589 */ -EXTERN unsigned Tcl_GetFSDeviceFromStat ( - const Tcl_StatBuf * statBufPtr); +EXTERN unsigned Tcl_GetFSDeviceFromStat (const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetFSInodeFromStat_TCL_DECLARED #define Tcl_GetFSInodeFromStat_TCL_DECLARED /* 590 */ -EXTERN unsigned Tcl_GetFSInodeFromStat ( - const Tcl_StatBuf * statBufPtr); +EXTERN unsigned Tcl_GetFSInodeFromStat (const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetModeFromStat_TCL_DECLARED #define Tcl_GetModeFromStat_TCL_DECLARED /* 591 */ -EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statBufPtr); +EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetLinkCountFromStat_TCL_DECLARED #define Tcl_GetLinkCountFromStat_TCL_DECLARED /* 592 */ EXTERN int Tcl_GetLinkCountFromStat ( - const Tcl_StatBuf * statBufPtr); + const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetUserIdFromStat_TCL_DECLARED #define Tcl_GetUserIdFromStat_TCL_DECLARED /* 593 */ -EXTERN int Tcl_GetUserIdFromStat ( - const Tcl_StatBuf * statBufPtr); +EXTERN int Tcl_GetUserIdFromStat (const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetGroupIdFromStat_TCL_DECLARED #define Tcl_GetGroupIdFromStat_TCL_DECLARED /* 594 */ -EXTERN int Tcl_GetGroupIdFromStat ( - const Tcl_StatBuf * statBufPtr); +EXTERN int Tcl_GetGroupIdFromStat (const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetDeviceTypeFromStat_TCL_DECLARED #define Tcl_GetDeviceTypeFromStat_TCL_DECLARED /* 595 */ EXTERN int Tcl_GetDeviceTypeFromStat ( - const Tcl_StatBuf * statBufPtr); + const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetAccessTimeFromStat_TCL_DECLARED #define Tcl_GetAccessTimeFromStat_TCL_DECLARED /* 596 */ EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat ( - const Tcl_StatBuf * statBufPtr); + const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetModificationTimeFromStat_TCL_DECLARED #define Tcl_GetModificationTimeFromStat_TCL_DECLARED /* 597 */ EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat ( - const Tcl_StatBuf * statBufPtr); + const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetChangeTimeFromStat_TCL_DECLARED #define Tcl_GetChangeTimeFromStat_TCL_DECLARED /* 598 */ EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat ( - const Tcl_StatBuf * statBufPtr); + const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetSizeFromStat_TCL_DECLARED #define Tcl_GetSizeFromStat_TCL_DECLARED /* 599 */ -EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statBufPtr); +EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetBlocksFromStat_TCL_DECLARED #define Tcl_GetBlocksFromStat_TCL_DECLARED /* 600 */ -EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat ( - const Tcl_StatBuf * statBufPtr); +EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat (const Tcl_StatBuf * statPtr); #endif #ifndef Tcl_GetBlockSizeFromStat_TCL_DECLARED #define Tcl_GetBlockSizeFromStat_TCL_DECLARED /* 601 */ EXTERN unsigned Tcl_GetBlockSizeFromStat ( - const Tcl_StatBuf * statBufPtr); + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_SetEnsembleParameterList_TCL_DECLARED +#define Tcl_SetEnsembleParameterList_TCL_DECLARED +/* 602 */ +EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * paramList); +#endif +#ifndef Tcl_GetEnsembleParameterList_TCL_DECLARED +#define Tcl_GetEnsembleParameterList_TCL_DECLARED +/* 603 */ +EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** paramListPtr); #endif typedef struct TclStubHooks { @@ -4290,19 +4297,21 @@ typedef struct TclStubs { int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[], int flags); /* 586 */ void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); /* 588 */ - unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statBufPtr); /* 589 */ - unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statBufPtr); /* 590 */ - unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statBufPtr); /* 591 */ - int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statBufPtr); /* 592 */ - int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statBufPtr); /* 593 */ - int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statBufPtr); /* 594 */ - int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statBufPtr); /* 595 */ - Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statBufPtr); /* 596 */ - Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statBufPtr); /* 597 */ - Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statBufPtr); /* 598 */ - Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statBufPtr); /* 599 */ - Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statBufPtr); /* 600 */ - unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statBufPtr); /* 601 */ + unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statPtr); /* 589 */ + unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statPtr); /* 590 */ + unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statPtr); /* 591 */ + int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statPtr); /* 592 */ + int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statPtr); /* 593 */ + int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statPtr); /* 594 */ + int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statPtr); /* 595 */ + Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statPtr); /* 596 */ + Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statPtr); /* 597 */ + Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statPtr); /* 598 */ + Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statPtr); /* 599 */ + Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statPtr); /* 600 */ + unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ + int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ + int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6783,6 +6792,14 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_GetBlockSizeFromStat \ (tclStubsPtr->tcl_GetBlockSizeFromStat) /* 601 */ #endif +#ifndef Tcl_SetEnsembleParameterList +#define Tcl_SetEnsembleParameterList \ + (tclStubsPtr->tcl_SetEnsembleParameterList) /* 602 */ +#endif +#ifndef Tcl_GetEnsembleParameterList +#define Tcl_GetEnsembleParameterList \ + (tclStubsPtr->tcl_GetEnsembleParameterList) /* 603 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 5572326..07b6ca3 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.163 2008/09/24 09:41:20 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.164 2008/09/28 22:18:46 dkf Exp $ */ #include "tclInt.h" @@ -1127,6 +1127,8 @@ static const TclStubs tclStubs = { Tcl_GetSizeFromStat, /* 599 */ Tcl_GetBlocksFromStat, /* 600 */ Tcl_GetBlockSizeFromStat, /* 601 */ + Tcl_SetEnsembleParameterList, /* 602 */ + Tcl_GetEnsembleParameterList, /* 603 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 883a79a9d4ece9f76dbbcd5a9b7e8c6e5bd43b57 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 29 Sep 2008 08:19:47 +0000 Subject: Implement TIP 318. --- ChangeLog | 9 +++++++++ generic/tclCmdMZ.c | 22 +++++++++++++++------- tests/string.test | 11 ++++++++++- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6b346e..e3c731c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-29 Donal K. Fellows + + TIP #318 IMPLEMENTATION + + * generic/tclCmdMZ.c (StringTrimCmd,StringTrimLCmd,StringTrimRCmd): + Update the default set of trimmed characters to include some from + the larger UNICODE space. Factor out the default trim set into a + macro so that it is easier to keep them in synch. + 2008-09-28 Donal K. Fellows TIP #314 IMPLEMENTATION diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 227e7b8..dfeb59c 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.169 2008/07/31 20:01:40 msofer Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.170 2008/09/29 08:20:34 dkf Exp $ */ #include "tclInt.h" @@ -23,6 +23,14 @@ static int UniCharIsAscii(int character); +/* + * Default set of characters to trim in [string trim] and friends. This is a + * UTF-8 literal string containing space, tab, newline, carriage return, + * ethiopic wordspace (U+1361), ogham space mark (U+1680), and ideographic + * space (U+3000). [TIP #318] + */ + +#define DEFAULT_TRIM_SET " \t\n\r\xe1\x8d\xa1\xe1\x9a\x80\xe3\x80\x80" /* *---------------------------------------------------------------------- @@ -3069,8 +3077,8 @@ StringTrimCmd( if (objc == 3) { string2 = TclGetStringFromObj(objv[2], &length2); } else if (objc == 2) { - string2 = " \t\n\r"; - length2 = strlen(string2); + string2 = DEFAULT_TRIM_SET; + length2 = strlen(DEFAULT_TRIM_SET); } else { Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?"); return TCL_ERROR; @@ -3165,8 +3173,8 @@ StringTrimLCmd( if (objc == 3) { string2 = TclGetStringFromObj(objv[2], &length2); } else if (objc == 2) { - string2 = " \t\n\r"; - length2 = strlen(string2); + string2 = DEFAULT_TRIM_SET; + length2 = strlen(DEFAULT_TRIM_SET); } else { Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?"); return TCL_ERROR; @@ -3237,8 +3245,8 @@ StringTrimRCmd( if (objc == 3) { string2 = TclGetStringFromObj(objv[2], &length2); } else if (objc == 2) { - string2 = " \t\n\r"; - length2 = strlen(string2); + string2 = DEFAULT_TRIM_SET; + length2 = strlen(DEFAULT_TRIM_SET); } else { Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?"); return TCL_ERROR; diff --git a/tests/string.test b/tests/string.test index 64ec56f..c2ddfc8 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.73 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: string.test,v 1.74 2008/09/29 08:20:38 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1407,6 +1407,9 @@ test string-18.10 {string trim} { test string-18.11 {string trim, unicode} { string trim "\xe7\xe8 AB\xe7C \xe8\xe7" \xe7\xe8 } " AB\xe7C " +test string-18.12 {string trim, unicode default} { + string trim ABC\u1361\u1680\u3000 +} ABC test string-19.1 {string trimleft} { list [catch {string trimleft} msg] $msg @@ -1414,6 +1417,9 @@ test string-19.1 {string trimleft} { test string-19.2 {string trimleft} { string trimleft " XYZ " } {XYZ } +test string-19.3 {string trimleft, unicode default} { + string trimleft \u1361\u1680\u3000ABC +} ABC test string-20.1 {string trimright errors} { list [catch {string trimright} msg] $msg @@ -1430,6 +1436,9 @@ test string-20.4 {string trimright} { test string-20.5 {string trimright} { string trimright "" } {} +test string-20.6 {string trimright, unicode default} { + string trimright ABC\u1361\u1680\u3000 +} ABC test string-21.1 {string wordend} { list [catch {string wordend a} msg] $msg -- cgit v0.12 From da82965bf2c1b65b3e1bb8e1f82e944317f0a047 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 29 Sep 2008 12:25:18 +0000 Subject: TIP #313 IMPLEMENTATION --- ChangeLog | 7 +++++++ doc/lsearch.n | 16 +++++++++++++-- generic/tclCmdIL.c | 58 ++++++++++++++++++++++++++++++++++++------------------ tests/lsearch.test | 52 ++++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 108 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3c731c..2eed027 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-09-29 Donal K. Fellows + TIP #313 IMPLEMENTATION + + * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Added -bisect option to + * doc/lsearch.n, tests/lsearch.test: allow the finding of the + place to insert an element in a sorted list when that element is + not already there. [Patch 1894241] + TIP #318 IMPLEMENTATION * generic/tclCmdMZ.c (StringTrimCmd,StringTrimLCmd,StringTrimRCmd): diff --git a/doc/lsearch.n b/doc/lsearch.n index b5f950d..cd4363d 100644 --- a/doc/lsearch.n +++ b/doc/lsearch.n @@ -7,10 +7,10 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsearch.n,v 1.35 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: lsearch.n,v 1.36 2008/09/29 12:25:22 dkf Exp $ '\" .so man.macros -.TH lsearch n 8.5 Tcl "Tcl Built-In Commands" +.TH lsearch n 8.6 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME @@ -134,6 +134,17 @@ meaningful when used with \fB\-sorted\fR. . The list elements are sorted in increasing order. This option is only meaningful when used with \fB\-sorted\fR. +.TP +\fB\-bisect\fR +.VS 8.6 +Inexact search when the list elements are in sorted order. For an increasing +list the last index where the element is less than or equal to the pattern +is returned. For a decreasing list the last index where the element is greater +than or equal to the pattern is returned. If the pattern is before the first +element or the list is empty, -1 is returned. +This option implies \fB\-sorted\fR and cannot be used with either \fB\-all\fR +or \fB\-not\fR. +.VE 8.6 .SS "NESTED LIST OPTIONS" .PP These options are used to search lists of lists. They may be used @@ -199,6 +210,7 @@ foreach(n), list(n), lappend(n), lindex(n), linsert(n), llength(n), lset(n), lsort(n), lrange(n), lreplace(n), string(n) .SH KEYWORDS +binary search, linear search, list, match, pattern, regular expression, search, string '\" Local Variables: '\" mode: nroff diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index af3c3bb..a66eb0a 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.155 2008/09/27 19:34:59 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.156 2008/09/29 12:25:20 dkf Exp $ */ #include "tclInt.h" @@ -2749,7 +2749,7 @@ Tcl_LsearchObjCmd( Tcl_Obj *const objv[]) /* Argument values. */ { char *bytes, *patternBytes; - int i, match, mode, index, result, listc, length, elemLen; + int i, match, index, result, listc, length, elemLen, bisect; int dataType, isIncreasing, lower, upper, patInt, objInt, offset; int allMatches, inlineReturn, negatedMatch, returnSubindices, noCase; double patDouble, objDouble; @@ -2758,18 +2758,18 @@ Tcl_LsearchObjCmd( SortStrCmpFn_t strCmpFn = strcmp; Tcl_RegExp regexp = NULL; static const char *options[] = { - "-all", "-ascii", "-decreasing", "-dictionary", + "-all", "-ascii", "-bisect", "-decreasing", "-dictionary", "-exact", "-glob", "-increasing", "-index", "-inline", "-integer", "-nocase", "-not", "-real", "-regexp", "-sorted", "-start", "-subindices", NULL }; enum options { - LSEARCH_ALL, LSEARCH_ASCII, LSEARCH_DECREASING, LSEARCH_DICTIONARY, - LSEARCH_EXACT, LSEARCH_GLOB, LSEARCH_INCREASING, LSEARCH_INDEX, - LSEARCH_INLINE, LSEARCH_INTEGER, LSEARCH_NOCASE, LSEARCH_NOT, - LSEARCH_REAL, LSEARCH_REGEXP, LSEARCH_SORTED, LSEARCH_START, - LSEARCH_SUBINDICES + LSEARCH_ALL, LSEARCH_ASCII, LSEARCH_BISECT, LSEARCH_DECREASING, + LSEARCH_DICTIONARY, LSEARCH_EXACT, LSEARCH_GLOB, LSEARCH_INCREASING, + LSEARCH_INDEX, LSEARCH_INLINE, LSEARCH_INTEGER, LSEARCH_NOCASE, + LSEARCH_NOT, LSEARCH_REAL, LSEARCH_REGEXP, LSEARCH_SORTED, + LSEARCH_START, LSEARCH_SUBINDICES }; enum datatypes { ASCII, DICTIONARY, INTEGER, REAL @@ -2777,6 +2777,7 @@ Tcl_LsearchObjCmd( enum modes { EXACT, GLOB, REGEXP, SORTED }; + enum modes mode; mode = GLOB; dataType = ASCII; @@ -2785,6 +2786,7 @@ Tcl_LsearchObjCmd( inlineReturn = 0; returnSubindices = 0; negatedMatch = 0; + bisect = 0; listPtr = NULL; startPtr = NULL; offset = 0; @@ -2820,6 +2822,10 @@ Tcl_LsearchObjCmd( case LSEARCH_ASCII: /* -ascii */ dataType = ASCII; break; + case LSEARCH_BISECT: /* -bisect */ + mode = SORTED; + bisect = 1; + break; case LSEARCH_DECREASING: /* -decreasing */ isIncreasing = 0; sortInfo.isIncreasing = 0; @@ -2971,7 +2977,13 @@ Tcl_LsearchObjCmd( return TCL_ERROR; } - if ((enum modes) mode == REGEXP) { + if (bisect && (allMatches || negatedMatch)) { + Tcl_AppendResult(interp, + "-bisect is not compatible with -all or -not", NULL); + return TCL_ERROR; + } + + if (mode == REGEXP) { /* * We can shimmer regexp/list if listv[i] == pattern, so get the * regexp rep before the list rep. First time round, omit the interp @@ -3057,7 +3069,7 @@ Tcl_LsearchObjCmd( patObj = objv[objc - 1]; patternBytes = NULL; - if ((enum modes) mode == EXACT || (enum modes) mode == SORTED) { + if (mode == EXACT || mode == SORTED) { switch ((enum datatypes) dataType) { case ASCII: case DICTIONARY: @@ -3108,7 +3120,7 @@ Tcl_LsearchObjCmd( index = -1; match = 0; - if ((enum modes) mode == SORTED && !allMatches && !negatedMatch) { + if (mode == SORTED && !allMatches && !negatedMatch) { /* * If the data is sorted, we can do a more intelligent search. Note * that there is no point in being smart when -all was specified; in @@ -3186,10 +3198,16 @@ Tcl_LsearchObjCmd( * variation means that a search always makes log n * comparisons (normal binary search might "get lucky" with an * early comparison). + * + * In bisect mode though, we want the last of equals. */ index = i; - upper = i; + if (bisect) { + lower = i; + } else { + upper = i; + } } else if (match > 0) { if (isIncreasing) { lower = i; @@ -3204,7 +3222,9 @@ Tcl_LsearchObjCmd( } } } - + if (bisect && index < 0) { + index = lower; + } } else { /* * We need to do a linear search, because (at least one) of: @@ -3232,8 +3252,8 @@ Tcl_LsearchObjCmd( } else { itemPtr = listv[i]; } - - switch ((enum modes) mode) { + + switch (mode) { case SORTED: case EXACT: switch ((enum datatypes) dataType) { @@ -3849,16 +3869,16 @@ Tcl_LsortObjCmd( * The unified list of SortElement structures. * * Side effects: - * If infoPtr->unique is set then infoPtr->numElements may be updated. + * If infoPtr->unique is set then infoPtr->numElements may be updated. * Possibly others, if a user-defined comparison command does something - * weird. + * weird. * * Note: - * If infoPtr->unique is set, the merge assumes that there are no + * If infoPtr->unique is set, the merge assumes that there are no * "repeated" elements in each of the left and right lists. In that case, * if any element of the left list is equivalent to one in the right list * it is omitted from the merged list. - * This simplified mechanism works because of the special way + * This simplified mechanism works because of the special way * our MergeSort creates the sublists to be merged and will fail to * eliminate all repeats in the general case where they are already * present in either the left or right list. A general code would need to diff --git a/tests/lsearch.test b/tests/lsearch.test index 93e2117..634adda 100644 --- a/tests/lsearch.test +++ b/tests/lsearch.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lsearch.test,v 1.21 2008/07/13 23:15:22 nijtmans Exp $ +# RCS: @(#) $Id: lsearch.test,v 1.22 2008/09/29 12:25:21 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -61,7 +61,7 @@ test lsearch-2.9 {search modes} { } 1 test lsearch-2.10 {search modes} { list [catch {lsearch -glib {b.x bx xy bcx} b.x} msg] $msg -} {1 {bad option "-glib": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, or -subindices}} +} {1 {bad option "-glib": must be -all, -ascii, -bisect, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, or -subindices}} test lsearch-2.11 {search modes with -nocase} { lsearch -exact -nocase {a b c A B C} A } 0 @@ -89,10 +89,10 @@ test lsearch-3.2 {lsearch errors} { } {1 {wrong # args: should be "lsearch ?-option value ...? list pattern"}} test lsearch-3.3 {lsearch errors} { list [catch {lsearch a b c} msg] $msg -} {1 {bad option "a": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, or -subindices}} +} {1 {bad option "a": must be -all, -ascii, -bisect, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, or -subindices}} test lsearch-3.4 {lsearch errors} { list [catch {lsearch a b c d} msg] $msg -} {1 {bad option "a": must be -all, -ascii, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, or -subindices}} +} {1 {bad option "a": must be -all, -ascii, -bisect, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, or -subindices}} test lsearch-3.5 {lsearch errors} { list [catch {lsearch "\{" b} msg] $msg } {1 {unmatched open brace in list}} @@ -472,6 +472,46 @@ test lsearch-21.2 {lsearch shimmering crash} { lsearch -exact -real $x $x } 0 +test lsearch-22.1 {lsearch -bisect} -setup { + set res {} +} -body { + foreach i {0 1 5 6 7 8 15 16} { + lappend res [lsearch -bisect -integer {1 4 5 7 9 15} $i] + } + return $res +} -result {-1 0 2 2 3 3 5 5} +test lsearch-22.2 {lsearch -bisect, last of equals} -setup { + set res {} +} -body { + foreach i {0 1 2 3} { + lappend res [lsearch -bisect -integer {0 0 1 1 1 2 2 2 3 3 3} $i] + } + return $res +} -result {1 4 7 10} +test lsearch-22.3 {lsearch -bisect decreasing order} -setup { + set res {} +} -body { + foreach i {0 1 5 6 7 8 15 16} { + lappend res [lsearch -bisect -integer -decreasing {15 9 7 5 4 1} $i] + } + return $res +} -result {5 5 3 2 2 1 0 -1} +test lsearch-22.4 {lsearch -bisect, last of equals, decreasing} -setup { + set res {} +} -body { + foreach i {0 1 2 3} { + lappend res [lsearch -bisect -integer -decreasing \ + {3 3 3 2 2 2 1 1 1 0 0} $i] + } + return $res +} -result {10 8 5 2} +test lsearch-22.5 {lsearch -bisect, all equal} { + lsearch -bisect -integer {5 5 5 5} 5 +} {3} +test lsearch-22.6 {lsearch -sorted, all equal} { + lsearch -sorted -integer {5 5 5 5} 5 +} {0} + # cleanup catch {unset res} catch {unset increasingIntegers} @@ -484,3 +524,7 @@ catch {unset increasingDictionary} catch {unset decreasingDictionary} ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 7e9fde3466a3436d634d966a64f73d900e274d88 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 29 Sep 2008 13:32:55 +0000 Subject: TIP #326 IMPLEMENTATION --- ChangeLog | 6 +++ doc/lsort.n | 60 ++++++++++++++++++++++--- generic/tclCmdIL.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++------ tests/cmdIL.test | 24 ++++++++-- 4 files changed, 196 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2eed027..4a1c197 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-09-29 Donal K. Fellows + TIP #326 IMPLEMENTATION + + * generic/tclCmdIL.c (Tcl_LsortObjCmd): Added -stride option to carry + * doc/lsort.n, tests/cmdIL.test: out sorting of lists where the + elements are grouped. Adapted from [Patch 2082681] + TIP #313 IMPLEMENTATION * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Added -bisect option to diff --git a/doc/lsort.n b/doc/lsort.n index ec80885..6253a5e 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsort.n,v 1.30 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: lsort.n,v 1.31 2008/09/29 13:33:18 dkf Exp $ '\" .so man.macros .TH lsort n 8.5 Tcl "Tcl Built-In Commands" @@ -81,11 +81,11 @@ the values themselves. \fB\-index\0\fIindexList\fR . If this option is specified, each of the elements of \fIlist\fR must -itself be a proper Tcl sublist. Instead of sorting based on whole -sublists, \fBlsort\fR will extract the \fIindexList\fR'th element from -each sublist -(as if the overall element and the \fIindexList\fR were passed to -\fBlindex\fR) and sort based on the given element. +itself be a proper Tcl sublist (unless \fB-stride\fR is used). +Instead of sorting based on whole sublists, \fBlsort\fR will extract +the \fIindexList\fR'th element from each sublist (as if the overall +element and the \fIindexList\fR were passed to \fBlindex\fR) and sort +based on the given element. For example, .RS .CS @@ -115,6 +115,33 @@ This option is much more efficient than using \fB\-command\fR to achieve the same effect. .RE .TP 20 +\fB\-stride\0\fIstrideLength\fR +. +If this option is specified, the list is treated as consisting of +groups of \fIstrideLength\fR elements and the groups are sorted by +either their first element or, if the \fB\-index\fR option is used, +by the element within each group given by the first index passed to +\fB\-index\fR (which is then ignored by \fB\-index\fR). Elements +always remain in the same position within their group. +.RS +.PP +The list length must be an integer multiple of \fIstrideLength\fR, which +in turn must be at least 2. +.PP +For example, +.CS +lsort \-stride 2 {carrot 10 apple 50 banana 25} +.CE +returns +.QW "apple 50 banana 25 carrot 10" , +and +.CS +lsort \-stride 2 \-index 1 \-integer {carrot 10 apple 50 banana 25} +.CE +returns +.QW "carrot 10 banana 25 apple 50" . +.RE +.TP 20 \fB\-nocase\fR . Causes comparisons to be handled in a case-insensitive manner. Has no @@ -180,6 +207,24 @@ Sorting using indices: {e 1} {d 2} { c 3} {b 4} {a 5} .CE .PP +.VS 8.6 +Sorting a dictionary: +.CS +% set d [dict create c d a b h i f g c e] +c e a b h i f g +% \fBlsort\fR -stride 2 $d +a b c e f g h i +.CE +.PP +Sorting using striding and multiple indices: +.CS +% # Note the first index value is relative to the group +% \fBlsort\fR \-stride 3 \-index {0 1} \e + {{Bob Smith} 25 Audi {Jane Doe} 40 Ford} +{{Jane Doe} 40 Ford {Bob Smith} 25 Audi} +.CE +.VE 8.6 +.PP Stripping duplicate values using sorting: .CS % \fBlsort\fR -unique {a b c a b c a b c} @@ -207,3 +252,6 @@ list(n), lappend(n), lindex(n), linsert(n), llength(n), lsearch(n), lset(n), lrange(n), lreplace(n) .SH KEYWORDS element, list, order, sort +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index a66eb0a..4041512 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.156 2008/09/29 12:25:20 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.157 2008/09/29 13:33:16 dkf Exp $ */ #include "tclInt.h" @@ -3518,18 +3518,20 @@ Tcl_LsortObjCmd( Tcl_Obj *const objv[]) /* Argument values. */ { int i, j, index, unique, indices, length, nocase = 0, sortMode, indexc; + int group, groupSize, groupOffset, idx; Tcl_Obj *resultPtr, *cmdPtr, **listObjPtrs, *listObj, *indexPtr; SortElement *elementArray, *elementPtr; SortInfo sortInfo; /* Information about this sort that needs to * be passed to the comparison function. */ static const char *switches[] = { "-ascii", "-command", "-decreasing", "-dictionary", "-increasing", - "-index", "-indices", "-integer", "-nocase", "-real", "-unique", NULL + "-index", "-indices", "-integer", "-nocase", "-real", "-stride", + "-unique", NULL }; enum Lsort_Switches { LSORT_ASCII, LSORT_COMMAND, LSORT_DECREASING, LSORT_DICTIONARY, LSORT_INCREASING, LSORT_INDEX, LSORT_INDICES, LSORT_INTEGER, - LSORT_NOCASE, LSORT_REAL, LSORT_UNIQUE + LSORT_NOCASE, LSORT_REAL, LSORT_STRIDE, LSORT_UNIQUE }; /* @@ -3558,6 +3560,9 @@ Tcl_LsortObjCmd( cmdPtr = NULL; unique = 0; indices = 0; + group = 0; + groupSize = 1; + groupOffset = 0; for (i = 1; i < objc-1; i++) { if (Tcl_GetIndexFromObj(interp, objv[i], switches, "option", 0, &index) != TCL_OK) { @@ -3658,6 +3663,33 @@ Tcl_LsortObjCmd( case LSORT_INDICES: indices = 1; break; + case LSORT_STRIDE: + if (i == (objc-2)) { + if (sortInfo.indexc > 1) { + ckfree((char *) sortInfo.indexv); + } + Tcl_AppendResult(interp, + "\"-stride\" option must be followed by stride length", + NULL); + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(interp, objv[i+1], &groupSize) != TCL_OK) { + if (sortInfo.indexc > 1) { + ckfree((char *) sortInfo.indexv); + } + return TCL_ERROR; + } + if (groupSize < 2) { + if (sortInfo.indexc > 1) { + ckfree((char *) sortInfo.indexv); + } + Tcl_AppendResult(interp, "stride length must be at least 2", + NULL); + return TCL_ERROR; + } + group = 1; + i++; + break; } } if (nocase && (sortInfo.sortMode == SORTMODE_ASCII)) { @@ -3712,6 +3744,55 @@ Tcl_LsortObjCmd( if (sortInfo.resultCode != TCL_OK || length <= 0) { goto done; } + + /* + * Check for sanity when grouping elements of the overall list together + * because of the -stride option. [TIP #326] + */ + + if (group) { + if (length % groupSize) { + Tcl_AppendResult(interp, + "list size must be a multiple of the stride length", + NULL); + sortInfo.resultCode = TCL_ERROR; + goto done; + } + length = length / groupSize; + if (sortInfo.indexc > 0) { + /* + * Use the first value in the list supplied to -index as the + * offset of the element within each group by which to sort. + */ + + groupOffset = sortInfo.indexv[0]; + if (groupOffset <= SORTIDX_END) { + groupOffset = (groupOffset - SORTIDX_END) + groupSize - 1; + } + if (groupOffset < 0 || groupOffset >= groupSize) { + Tcl_AppendResult(interp, "when used with \"-stride\", the " + "leading \"-index\" value must be within the group", + NULL); + sortInfo.resultCode = TCL_ERROR; + goto done; + } + if (sortInfo.indexc == 1) { + sortInfo.indexc = 0; + sortInfo.indexv = NULL; + } else { + int *new_indexv; + + sortInfo.indexc--; + new_indexv = (int *) ckalloc(sizeof(int) * sortInfo.indexc); + for (i = 0; i < sortInfo.indexc; i++) { + new_indexv[i] = sortInfo.indexv[i+1]; + } + ckfree((char *) sortInfo.indexv); + sortInfo.indexv = new_indexv; + } + } + } + sortInfo.numElements = length; indexc = sortInfo.indexc; @@ -3743,16 +3824,17 @@ Tcl_LsortObjCmd( elementArray = (SortElement *) ckalloc( length * sizeof(SortElement)); for (i=0; i < length; i++){ + idx = groupSize * i + groupOffset; if (indexc) { /* * If this is an indexed sort, retrieve the corresponding element */ - indexPtr = SelectObjFromSublist(listObjPtrs[i], &sortInfo); + indexPtr = SelectObjFromSublist(listObjPtrs[idx], &sortInfo); if (sortInfo.resultCode != TCL_OK) { goto done1; } } else { - indexPtr = listObjPtrs[i]; + indexPtr = listObjPtrs[idx]; } /* @@ -3763,6 +3845,7 @@ Tcl_LsortObjCmd( elementArray[i].index.strValuePtr = TclGetString(indexPtr); } else if (sortMode == SORTMODE_INTEGER) { long a; + if (TclGetLongFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) { sortInfo.resultCode = TCL_ERROR; goto done1; @@ -3770,6 +3853,7 @@ Tcl_LsortObjCmd( elementArray[i].index.intValue = a; } else if (sortInfo.sortMode == SORTMODE_REAL) { double a; + if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) { sortInfo.resultCode = TCL_ERROR; goto done1; @@ -3784,7 +3868,11 @@ Tcl_LsortObjCmd( * the objPtr itself, or its index in the original list. */ - elementArray[i].objPtr = (indices ? INT2PTR(i) : listObjPtrs[i]); + if (indices || group) { + elementArray[i].objPtr = INT2PTR(idx); + } else { + elementArray[i].objPtr = listObjPtrs[idx]; + } /* * Merge this element in the pre-existing sublists (and merge together @@ -3812,7 +3900,6 @@ Tcl_LsortObjCmd( elementPtr = MergeLists(subList[j], elementPtr, &sortInfo); } - /* * Now store the sorted elements in the result list. */ @@ -3822,17 +3909,32 @@ Tcl_LsortObjCmd( Tcl_Obj **newArray, *objPtr; int i; - resultPtr = Tcl_NewListObj(sortInfo.numElements, NULL); - listRepPtr = (List *) resultPtr->internalRep.twoPtrValue.ptr1; + resultPtr = Tcl_NewListObj(sortInfo.numElements * groupSize, NULL); + listRepPtr = resultPtr->internalRep.twoPtrValue.ptr1; newArray = &listRepPtr->elements; - if (indices) { - for (i = 0; elementPtr != NULL ; elementPtr = elementPtr->nextPtr){ + if (group) { + for (i=0; elementPtr!=NULL ; elementPtr=elementPtr->nextPtr) { + idx = PTR2INT(elementPtr->objPtr); + for (j = 0; j < groupSize; j++) { + if (indices) { + objPtr = Tcl_NewIntObj(idx + j - groupOffset); + newArray[i++] = objPtr; + Tcl_IncrRefCount(objPtr); + } else { + objPtr = listObjPtrs[idx + j - groupOffset]; + newArray[i++] = objPtr; + Tcl_IncrRefCount(objPtr); + } + } + } + } else if (indices) { + for (i=0; elementPtr != NULL ; elementPtr = elementPtr->nextPtr) { objPtr = Tcl_NewIntObj(PTR2INT(elementPtr->objPtr)); newArray[i++] = objPtr; Tcl_IncrRefCount(objPtr); } } else { - for (i = 0; elementPtr != NULL ; elementPtr = elementPtr->nextPtr){ + for (i=0; elementPtr != NULL ; elementPtr = elementPtr->nextPtr) { objPtr = elementPtr->objPtr; newArray[i++] = objPtr; Tcl_IncrRefCount(objPtr); @@ -3843,7 +3945,7 @@ Tcl_LsortObjCmd( } done1: - ckfree((char *)elementArray); + ckfree((char *) elementArray); done: if (sortInfo.sortMode == SORTMODE_COMMAND) { diff --git a/tests/cmdIL.test b/tests/cmdIL.test index 01fc09e..17b0d9e 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdIL.test,v 1.41 2008/09/26 19:12:42 dgp Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.42 2008/09/29 13:33:17 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -24,7 +24,7 @@ test cmdIL-1.1 {Tcl_LsortObjCmd procedure} -returnCodes error -body { } -result {wrong # args: should be "lsort ?-option value ...? list"} test cmdIL-1.2 {Tcl_LsortObjCmd procedure} -returnCodes error -body { lsort -foo {1 3 2 5} -} -result {bad option "-foo": must be -ascii, -command, -decreasing, -dictionary, -increasing, -index, -indices, -integer, -nocase, -real, or -unique} +} -result {bad option "-foo": must be -ascii, -command, -decreasing, -dictionary, -increasing, -index, -indices, -integer, -nocase, -real, -stride, or -unique} test cmdIL-1.3 {Tcl_LsortObjCmd procedure, default options} { lsort {d e c b a \{ d35 d300} } {a b c d d300 d35 e \{} @@ -122,6 +122,24 @@ test cmdIL-1.29 {Tcl_LsortObjCmd procedure, loss of list rep during sorting} { set l {1 2 3} string length [lsort -command {apply {args {string length $::l}}} $l] } 5 +test cmdIL-1.30 {Tcl_LsortObjCmd procedure, -stride option} { + lsort -stride 2 {f e d c b a} +} {b a d c f e} +test cmdIL-1.31 {Tcl_LsortObjCmd procedure, -stride option} { + lsort -stride 3 {f e d c b a} +} {c b a f e d} +test cmdIL-1.32 {lsort -stride errors} -returnCodes error -body { + lsort -stride foo bar +} -result {expected integer but got "foo"} +test cmdIL-1.33 {lsort -stride errors} -returnCodes error -body { + lsort -stride 1 bar +} -result {stride length must be at least 2} +test cmdIL-1.34 {lsort -stride errors} -returnCodes error -body { + lsort -stride 2 {a b c} +} -result {list size must be a multiple of the stride length} +test cmdIL-1.35 {lsort -stride errors} -returnCodes error -body { + lsort -stride 2 -index 3 {a b c d} +} -result {when used with "-stride", the leading "-index" value must be within the group} # Can't think of any good tests for the MergeSort and MergeLists procedures, # except a bunch of random lists to sort. @@ -149,7 +167,7 @@ test cmdIL-2.1 {MergeSort and MergeLists procedures} -setup { set old $el } } - set result + string trim $result } -cleanup { rename rand "" } -result {} -- cgit v0.12 From f47fa38944c02518936f12a7bf883cb48b7feca8 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 29 Sep 2008 15:38:30 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/linsert.n: Revise [linsert] to accept zero elements. * generic/tclCmdIL.c: * tests/linsert.test: --- ChangeLog | 8 ++++++++ doc/linsert.n | 4 ++-- generic/tclCmdIL.c | 6 +++--- tests/linsert.test | 12 +++++++++--- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a1c197..03715da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-29 Don Porter + + TIP #323 IMPLEMENTATION (partial) + + * doc/linsert.n: Revise [linsert] to accept zero elements. + * generic/tclCmdIL.c: + * tests/linsert.test: + 2008-09-29 Donal K. Fellows TIP #326 IMPLEMENTATION diff --git a/doc/linsert.n b/doc/linsert.n index 79ec3ff..c552a54 100644 --- a/doc/linsert.n +++ b/doc/linsert.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: linsert.n,v 1.15 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: linsert.n,v 1.16 2008/09/29 15:38:32 dgp Exp $ '\" .so man.macros .TH linsert n 8.2 Tcl "Tcl Built-In Commands" @@ -15,7 +15,7 @@ .SH NAME linsert \- Insert elements into a list .SH SYNOPSIS -\fBlinsert \fIlist index element \fR?\fIelement element ...\fR? +\fBlinsert \fIlist index \fR?\fIelement element ...\fR? .BE .SH DESCRIPTION .PP diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 4041512..d479f81 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.157 2008/09/29 13:33:16 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.158 2008/09/29 15:38:32 dgp Exp $ */ #include "tclInt.h" @@ -2189,8 +2189,8 @@ Tcl_LinsertObjCmd( Tcl_Obj *listPtr; int index, len, result; - if (objc < 4) { - Tcl_WrongNumArgs(interp, 1, objv, "list index element ?element ...?"); + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "list index ?element ...?"); return TCL_ERROR; } diff --git a/tests/linsert.test b/tests/linsert.test index 3419c74..e9c545a 100644 --- a/tests/linsert.test +++ b/tests/linsert.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: linsert.test,v 1.10 2005/05/10 18:35:22 kennykb Exp $ +# RCS: @(#) $Id: linsert.test,v 1.11 2008/09/29 15:38:32 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -84,16 +84,22 @@ test linsert-1.20 {linsert command, use of end-int index} { test linsert-2.1 {linsert errors} { list [catch linsert msg] $msg -} {1 {wrong # args: should be "linsert list index element ?element ...?"}} +} {1 {wrong # args: should be "linsert list index ?element ...?"}} test linsert-2.2 {linsert errors} { list [catch {linsert a b} msg] $msg -} {1 {wrong # args: should be "linsert list index element ?element ...?"}} +} {1 {bad index "b": must be integer?[+-]integer? or end?[+-]integer?}} test linsert-2.3 {linsert errors} { list [catch {linsert a 12x 2} msg] $msg } {1 {bad index "12x": must be integer?[+-]integer? or end?[+-]integer?}} test linsert-2.4 {linsert errors} { list [catch {linsert \{ 12 2} msg] $msg } {1 {unmatched open brace in list}} +test linsert-2.5 {syntax (TIP 323)} { + linsert {a b c} 0 +} [list a b c] +test linsert-2.6 {syntax (TIP 323)} { + linsert "a\nb\nc" 0 +} [list a b c] test linsert-3.1 {linsert won't modify shared argument objects} { proc p {} { -- cgit v0.12 From a3e470a520e59549b32c105f2aa0234c30eac772 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 29 Sep 2008 16:03:27 +0000 Subject: TIP #323 IMPLEMENTATION (partial) * doc/glob.n: Revise [glob] to accept zero patterns. * generic/tclFileName.c: * tests fileName.test: --- ChangeLog | 4 ++++ doc/glob.n | 4 ++-- generic/tclFileName.c | 6 +----- tests/fileName.test | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03715da..ee5e0bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ TIP #323 IMPLEMENTATION (partial) + * doc/glob.n: Revise [glob] to accept zero patterns. + * generic/tclFileName.c: + * tests fileName.test: + * doc/linsert.n: Revise [linsert] to accept zero elements. * generic/tclCmdIL.c: * tests/linsert.test: diff --git a/doc/glob.n b/doc/glob.n index d2751d3..a7cf7ad 100644 --- a/doc/glob.n +++ b/doc/glob.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: glob.n,v 1.22 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: glob.n,v 1.23 2008/09/29 16:03:29 dgp Exp $ '\" .so man.macros .TH glob n 8.3 Tcl "Tcl Built-In Commands" @@ -14,7 +14,7 @@ .SH NAME glob \- Return names of files that match patterns .SH SYNOPSIS -\fBglob \fR?\fIswitches\fR? \fIpattern \fR?\fIpattern ...\fR? +\fBglob \fR?\fIswitches\fR? ?\fIpattern ...\fR? .BE .SH DESCRIPTION diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 9ff6c07..0c29459 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.92 2008/09/27 19:47:29 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.93 2008/09/29 16:03:30 dgp Exp $ */ #include "tclInt.h" @@ -1309,10 +1309,6 @@ Tcl_GlobObjCmd( } endOfForLoop: - if (objc - i < 1) { - Tcl_WrongNumArgs(interp, 1, objv, "?-switch ...? name ?name ...?"); - return TCL_ERROR; - } if ((globFlags & TCL_GLOBMODE_TAILS) && (pathOrDir == NULL)) { Tcl_AppendResult(interp, "\"-tails\" must be used with either " diff --git a/tests/fileName.test b/tests/fileName.test index 86a1b23..1d1f3ce 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.56 2008/08/14 13:09:50 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.57 2008/09/29 16:03:30 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -697,16 +697,16 @@ test filename-10.24 {Tcl_TranslateFileName} -body { test filename-11.1 {Tcl_GlobCmd} -returnCodes error -body { glob -} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} +} -result {no files matched glob patterns ""} test filename-11.2 {Tcl_GlobCmd} -returnCodes error -body { glob -gorp } -result {bad option "-gorp": must be -directory, -join, -nocomplain, -path, -tails, -types, or --} -test filename-11.3 {Tcl_GlobCmd} -returnCodes error -body { +test filename-11.3 {Tcl_GlobCmd} -body { glob -nocomplai -} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} -test filename-11.4 {Tcl_GlobCmd} -returnCodes error -body { +} -result {} +test filename-11.4 {Tcl_GlobCmd} -body { glob -nocomplain -} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} +} -result {} test filename-11.5 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplain * ~xyqrszzz } -result {user "xyqrszzz" doesn't exist} -- cgit v0.12 From ff1f43598ccc3d0a157e9bd32a7f48ecacf42331 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 30 Sep 2008 16:29:47 +0000 Subject: remove outdated comment --- generic/tclIOUtil.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index b610af4..d4e3325 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.156 2008/09/27 19:40:30 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.157 2008/09/30 16:29:47 dgp Exp $ */ #include "tclInt.h" @@ -53,19 +53,6 @@ MODULE_SCOPE const char * tclpFileAttrStrings[]; MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; /* - * The 3 hooks for Stat, Access and OpenFileChannel are obsolete. The - * complete, general hooked filesystem APIs should be used instead. This - * define decides whether to include the obsolete hooks and related code. If - * these are removed, we'll also want to remove them from stubs/tclInt. The - * only known users of these APIs are prowrap and mktclapp. New - * code/extensions should not use them, since they do not provide as full - * support as the full filesystem API. - * - * As soon as prowrap and mktclapp are updated to use the full filesystem - * support, I suggest all these hooks are removed. - */ - -/* * Declare the native filesystem support. These functions should be considered * private to Tcl, and should really not be called directly by any code other * than this file (i.e. neither by Tcl's core nor by extensions). Similarly, -- cgit v0.12 From 430612c9b1d9221b032c2c2dabbfed4a10570b50 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Thu, 2 Oct 2008 19:01:30 +0000 Subject: Fixes for [Bug 1934272, 2072891] --- ChangeLog | 13 +++++++++++++ doc/info.n | 4 ++-- doc/tclvars.n | 4 ++-- doc/variable.n | 4 ++-- tools/man2help2.tcl | 8 ++++++-- tools/man2tcl.c | 4 ++-- win/buildall.vc.bat | 4 ++-- win/makefile.vc | 5 ++--- 8 files changed, 31 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee5e0bd..b341eb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-10-02 Joe Mistachkin + + * doc/info.n: Fix unmatched font change. + * doc/tclvars.n: Fix unmatched font change. + * doc/variable.n: Fix unmatched font change. + * tools/man2help2.tcl: Integrated patch from Harald Oehlmann. + [Bug 1934272] + * tools/man2tcl.c: Increase MAX_LINE_SIZE to fix "Too long line" error. + * win/buildall.vc.bat: Prefer the HtmlHelp target over the WinHelp + target. [Bug 2072891] + * win/makefile.vc: Fix the HtmlHelp and WinHelp targets to not be + mutually exclusive. + 2008-09-29 Don Porter TIP #323 IMPLEMENTATION (partial) diff --git a/doc/info.n b/doc/info.n index 6200357..e1b877b 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.28 2008/09/23 05:05:47 dkf Exp $ +'\" RCS: @(#) $Id: info.n,v 1.29 2008/10/02 19:01:30 mistachkin Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -458,7 +458,7 @@ inheritance precedence order. \fBinfo class variables\fI class\fR .VS 8.6 This subcommand returns a list of all variables that have been declared for -the class named \Iclass\fR (i.e. that are automatically present in the +the class named \fIclass\fR (i.e. that are automatically present in the class's methods, constructor and destructor). .SS "OBJECT INTROSPECTION" .PP diff --git a/doc/tclvars.n b/doc/tclvars.n index 6235011..3e3f7ac 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.38 2008/09/25 14:30:23 dkf Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.39 2008/10/02 19:01:30 mistachkin Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" @@ -305,7 +305,7 @@ On UNIX machines, this is the value returned by \fBuname -r\fR. On Windows 95, the version will be 4.0; on Windows 98, the version will be 4.10. .TP -\fBpathSeparator +\fBpathSeparator\fR .VS 8.6 '\" Defined by TIP #315 The character that should be used to \fBsplit\fR PATH-like environment diff --git a/doc/variable.n b/doc/variable.n index 6e5b5c4..f94178d 100644 --- a/doc/variable.n +++ b/doc/variable.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: variable.n,v 1.9 2008/09/25 19:51:28 dgp Exp $ +'\" RCS: @(#) $Id: variable.n,v 1.10 2008/10/02 19:01:30 mistachkin Exp $ '\" .so man.macros .TH variable n 8.0 Tcl "Tcl Built-In Commands" @@ -14,7 +14,7 @@ .SH NAME variable \- create and initialize a namespace variable .SH SYNOPSIS -\fBvariable \fIname +\fBvariable \fIname\fR .sp \fBvariable \fR?\fIname value...\fR? .BE diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl index 7791add..20e86af 100644 --- a/tools/man2help2.tcl +++ b/tools/man2help2.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: man2help2.tcl,v 1.18 2008/06/13 05:45:15 mistachkin Exp $ +# RCS: @(#) $Id: man2help2.tcl,v 1.19 2008/10/02 19:01:30 mistachkin Exp $ # # Global variables used by these scripts: @@ -600,7 +600,7 @@ proc setTabs {tabList} { set relativeTo [expr {$state(leftMargin) \ + ($state(offset) * $state(nestingLevel))}] } - if {[regexp {^\w'(.*)'u$} $arg -> submatch]} { + if {[regexp {^\\w'([^']*)'u$} $arg -> submatch]} { # Magic factor! set distance [expr {[string length $submatch] * 86.4}] } else { @@ -976,6 +976,10 @@ proc getTwips {arg} { puts stderr "bad distance \"$arg\"" return 0 } + if {[string length $units] > 1} { + puts stderr "additional characters after unit \"$arg\"" + set units [string index $units 0] + } switch -- $units { c { set distance [expr {$distance * 567}] diff --git a/tools/man2tcl.c b/tools/man2tcl.c index 6622a5b..7940325 100644 --- a/tools/man2tcl.c +++ b/tools/man2tcl.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: man2tcl.c,v 1.14 2008/06/13 05:45:15 mistachkin Exp $ + * RCS: @(#) $Id: man2tcl.c,v 1.15 2008/10/02 19:01:30 mistachkin Exp $ */ static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08"; @@ -96,7 +96,7 @@ main( char **argv) /* Values of command-line arguments. */ { FILE *f; -#define MAX_LINE_SIZE 1000 +#define MAX_LINE_SIZE 4000 char line[MAX_LINE_SIZE]; char *p; diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat index 1201bb2..aff1bc6 100755 --- a/win/buildall.vc.bat +++ b/win/buildall.vc.bat @@ -3,7 +3,7 @@ :: edit this (or make your own) for your needs and wants using :: the instructions for calling makefile.vc found in makefile.vc :: -:: RCS: @(#) $Id: buildall.vc.bat,v 1.9 2005/10/14 12:31:39 patthoyts Exp $ +:: RCS: @(#) $Id: buildall.vc.bat,v 1.10 2008/10/02 19:01:30 mistachkin Exp $ set SYMBOLS= @@ -54,7 +54,7 @@ if "%INSTALLDIR%" == "" set INSTALLDIR=C:\Program Files\Tcl :: set OPTS=none if not %SYMBOLS%.==. set OPTS=symbols -nmake -nologo -f makefile.vc release winhelp OPTS=%OPTS% %1 +nmake -nologo -f makefile.vc release htmlhelp OPTS=%OPTS% %1 if errorlevel 1 goto error :: Build the static core, dlls and shell. diff --git a/win/makefile.vc b/win/makefile.vc index fc9014e..2811c90 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.189 2008/08/29 12:37:18 dkf Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.190 2008/10/02 19:01:30 mistachkin Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -761,13 +761,12 @@ install-docs: !if exist($(CHMFILE)) @echo Installing compiled html help @$(CPY) "$(CHMFILE)" "$(DOC_INSTALL_DIR)\" -!else +!endif !if exist($(HELPFILE)) @echo Installing Windows help @$(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\" @$(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\" !endif -!endif #" #--------------------------------------------------------------------- -- cgit v0.12 From 5e54f02d48ca1b26bb819e05b20b49b8012224d4 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Thu, 2 Oct 2008 19:18:12 +0000 Subject: forgot one missing unmatched font change --- doc/variable.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/variable.n b/doc/variable.n index f94178d..0bb7ce9 100644 --- a/doc/variable.n +++ b/doc/variable.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: variable.n,v 1.10 2008/10/02 19:01:30 mistachkin Exp $ +'\" RCS: @(#) $Id: variable.n,v 1.11 2008/10/02 19:18:12 mistachkin Exp $ '\" .so man.macros .TH variable n 8.0 Tcl "Tcl Built-In Commands" @@ -14,7 +14,7 @@ .SH NAME variable \- create and initialize a namespace variable .SH SYNOPSIS -\fBvariable \fIname\fR +\fBvariable \fR\fIname\fR .sp \fBvariable \fR?\fIname value...\fR? .BE -- cgit v0.12 From 1c72973d895e9efb23ecda2553cee0a5a901f650 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 2 Oct 2008 20:59:45 +0000 Subject: TIP #330 IMPLEMENTATION * generic/tcl.h: Remove the "result" and "freeProc" fields * generic/tclBasic.c: from the default public declaration of the * generic/tclResult.c: Tcl_Interp struct. Code should no longer * generic/tclStubLib.c: be accessing these fields. Access can be * generic/tclTest.c: restored by defining USE_INTERP_RESULT, but * generic/tclUtil.c: that should only be a temporary migration aid. *** POTENTIAL INCOMPATIBILITY *** --- ChangeLog | 12 ++++++++++++ generic/tcl.h | 8 +++++++- generic/tclBasic.c | 6 +++--- generic/tclResult.c | 7 ++++--- generic/tclStubLib.c | 6 +++--- generic/tclTest.c | 16 +++++++++------- generic/tclUtil.c | 11 ++++++----- 7 files changed, 44 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index b341eb9..9b547b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-10-02 Don Porter + + TIP #330 IMPLEMENTATION + + * generic/tcl.h: Remove the "result" and "freeProc" fields + * generic/tclBasic.c: from the default public declaration of the + * generic/tclResult.c: Tcl_Interp struct. Code should no longer + * generic/tclStubLib.c: be accessing these fields. Access can be + * generic/tclTest.c: restored by defining USE_INTERP_RESULT, but + * generic/tclUtil.c: that should only be a temporary migration aid. + *** POTENTIAL INCOMPATIBILITY *** + 2008-10-02 Joe Mistachkin * doc/info.n: Fix unmatched font change. diff --git a/generic/tcl.h b/generic/tcl.h index 39c578a..abe1157 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.270 2008/09/03 05:43:31 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.271 2008/10/02 20:59:45 dgp Exp $ */ #ifndef _TCL @@ -458,6 +458,8 @@ typedef struct stat Tcl_StatBuf; */ typedef struct Tcl_Interp { + /* TIP #330: Strongly discourage extensions from using the string result. */ +#ifdef USE_INTERP_RESULT char *result; /* If the last command returned a string * result, this points to it. */ void (*freeProc) (char *blockPtr); @@ -468,6 +470,10 @@ typedef struct Tcl_Interp { * of function to invoke to free the result. * Tcl_Eval must free it before executing next * command. */ +#else + char* unused3; + void (*unused4) (char*); +#endif int errorLine; /* When TCL_ERROR is returned, this gives the * line number within the command where the * error occurred (1 if first line). */ diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1467523..d0a8635 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.368 2008/09/28 13:46:09 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.369 2008/10/02 20:59:45 dgp Exp $ */ #include "tclInt.h" @@ -1445,7 +1445,7 @@ DeleteInterpProc( */ Tcl_FreeResult(interp); - interp->result = NULL; + iPtr->result = NULL; Tcl_DecrRefCount(iPtr->objResultPtr); iPtr->objResultPtr = NULL; Tcl_DecrRefCount(iPtr->ecVar); @@ -6558,7 +6558,7 @@ Tcl_AddObjErrorInfo( * interp->result completely. */ - iPtr->errorInfo = Tcl_NewStringObj(interp->result, -1); + iPtr->errorInfo = Tcl_NewStringObj(iPtr->result, -1); } else { iPtr->errorInfo = iPtr->objResultPtr; } diff --git a/generic/tclResult.c b/generic/tclResult.c index ea62946..b91d6ef 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.48 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.49 2008/10/02 20:59:45 dgp Exp $ */ #include "tclInt.h" @@ -471,11 +471,12 @@ Tcl_GetStringResult( * result, then reset the object result. */ - if (*(interp->result) == 0) { + Interp* iPtr = (Interp*) interp; + if (*(iPtr->result) == 0) { Tcl_SetResult(interp, TclGetString(Tcl_GetObjResult(interp)), TCL_VOLATILE); } - return interp->result; + return iPtr->result; } /* diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 168676f..9b8f390 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.26 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.27 2008/10/02 20:59:45 dgp Exp $ */ /* @@ -46,9 +46,9 @@ HasStubSupport( return iPtr->stubTable; } - interp->result = + iPtr->result = "This interpreter does not support stubs-enabled extensions."; - interp->freeProc = TCL_STATIC; + iPtr->freeProc = TCL_STATIC; return NULL; } diff --git a/generic/tclTest.c b/generic/tclTest.c index be7853e..b6230df 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.124 2008/08/20 13:14:41 dkf Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.125 2008/10/02 20:59:45 dgp Exp $ */ #define TCL_TEST @@ -1593,6 +1593,7 @@ TestdstringCmd( const char **argv) /* Argument strings. */ { int count; + Interp* iPtr = (Interp*) interp; if (argc < 2) { wrongNumArgs: @@ -1637,12 +1638,12 @@ TestdstringCmd( Tcl_SetResult(interp, "first0 first1 first2 first3 first4 first5 first6 first7 first8 first9\nsecond0 second1 second2 second3 second4 second5 second6 second7 second8 second9\nthird0 third1 third2 third3 third4 third5 third6 third7 third8 third9\nfourth0 fourth1 fourth2 fourth3 fourth4 fourth5 fourth6 fourth7 fourth8 fourth9\nfifth0 fifth1 fifth2 fifth3 fifth4 fifth5 fifth6 fifth7 fifth8 fifth9\nsixth0 sixth1 sixth2 sixth3 sixth4 sixth5 sixth6 sixth7 sixth8 sixth9\nseventh0 seventh1 seventh2 seventh3 seventh4 seventh5 seventh6 seventh7 seventh8 seventh9\n", TCL_STATIC); } else if (strcmp(argv[2], "free") == 0) { Tcl_SetResult(interp, (char *) ckalloc(100), TCL_DYNAMIC); - strcpy(interp->result, "This is a malloc-ed string"); + strcpy(iPtr->result, "This is a malloc-ed string"); } else if (strcmp(argv[2], "special") == 0) { - interp->result = (char *) ckalloc(100); - interp->result += 4; - interp->freeProc = SpecialFree; - strcpy(interp->result, "This is a specially-allocated string"); + iPtr->result = (char *) ckalloc(100); + iPtr->result += 4; + iPtr->freeProc = SpecialFree; + strcpy(iPtr->result, "This is a specially-allocated string"); } else { Tcl_AppendResult(interp, "bad gresult option \"", argv[2], "\": must be staticsmall, staticlarge, free, or special", @@ -4847,6 +4848,7 @@ TestsaveresultCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { + Interp* iPtr = (Interp*) interp; int discard, result, index; Tcl_SavedResult state; Tcl_Obj *objPtr; @@ -4915,7 +4917,7 @@ TestsaveresultCmd( switch ((enum options) index) { case RESULT_DYNAMIC: { - int present = interp->freeProc == TestsaveresultFree; + int present = iPtr->freeProc == TestsaveresultFree; int called = freeCount; Tcl_AppendElement(interp, called ? "called" : "notCalled"); diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 22b9e73..1a93a32 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.103 2008/08/22 18:01:00 dgp Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.104 2008/10/02 20:59:45 dgp Exp $ */ #include "tclInt.h" @@ -2065,14 +2065,15 @@ Tcl_DStringResult( Tcl_DString *dsPtr) /* Dynamic string that is to become the * result of interp. */ { + Interp* iPtr = (Interp*) interp; Tcl_ResetResult(interp); if (dsPtr->string != dsPtr->staticSpace) { - interp->result = dsPtr->string; - interp->freeProc = TCL_DYNAMIC; + iPtr->result = dsPtr->string; + iPtr->freeProc = TCL_DYNAMIC; } else if (dsPtr->length < TCL_RESULT_SIZE) { - interp->result = ((Interp *) interp)->resultSpace; - strcpy(interp->result, dsPtr->string); + iPtr->result = iPtr->resultSpace; + strcpy(iPtr->result, dsPtr->string); } else { Tcl_SetResult(interp, dsPtr->string, TCL_VOLATILE); } -- cgit v0.12 From 370d9d65a2415686b7f006ae6073e52fd9156b69 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 2 Oct 2008 22:55:58 +0000 Subject: * tests/info.test (info-22.8): Fixed [SF Bug 2129828]. Made pattern for file containing tcltest less specific to accept both .tcl and .tm variants of the file during matching. --- ChangeLog | 6 ++++++ tests/info.test | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b547b0..b049f4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-02 Andreas Kupries + + * tests/info.test (info-22.8): Fixed [SF Bug 2129828]. Made + pattern for file containing tcltest less specific to accept both + .tcl and .tm variants of the file during matching. + 2008-10-02 Don Porter TIP #330 IMPLEMENTATION diff --git a/tests/info.test b/tests/info.test index d51390f..7388e08 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.58 2008/08/01 17:07:48 dgp Exp $ +# RCS: @(#) $Id: info.test,v 1.59 2008/10/02 22:55:58 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -765,7 +765,7 @@ test info-22.8 {info frame, basic trace} -match glob -body { join [lrange [etrace] 0 2] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type source line 765 file info.test cmd etrace proc ::tcltest::RunTest} -* {type source line * file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}} +* {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::RunTest}} ## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 test info-23.0.0 {eval'd info frame} {!singleTestInterp} { -- cgit v0.12 From 0d2359a376086f55fc6219cc2801eb4e58069ad4 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 2 Oct 2008 23:03:58 +0000 Subject: * doc/info.n: Fixed [SF Bug 2134049]. Rephrased the documentation of 'info frame' for positive numbers as level argument. --- ChangeLog | 3 +++ doc/info.n | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b049f4a..3243dfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-10-02 Andreas Kupries + * doc/info.n: Fixed [SF Bug 2134049]. Rephrased the documentation + of 'info frame' for positive numbers as level argument. + * tests/info.test (info-22.8): Fixed [SF Bug 2129828]. Made pattern for file containing tcltest less specific to accept both .tcl and .tm variants of the file during matching. diff --git a/doc/info.n b/doc/info.n index e1b877b..66ec0c4 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.29 2008/10/02 19:01:30 mistachkin Exp $ +'\" RCS: @(#) $Id: info.n,v 1.30 2008/10/02 23:03:58 andreas_kupries Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -104,10 +104,11 @@ information for the command at the \fInumber\fRed level on the stack. .RS .PP If \fInumber\fR is positive (> 0) then it selects a particular stack -level (1 refers to the top-most active command, i.e., \fBinfo frame\fR -itself, 2 to the command it was called from, and so on); otherwise it -gives a level relative to the current command (0 refers to the current -command, i.e., \fBinfo frame\fR itself, -1 to its caller, and so on). +level (1 refers to the outer-most active command, 2 to the command it +called, and so on, up to the current frame level which refers to +\fBinfo frame\fR itself); otherwise it gives a level relative to the +current command (0 refers to the current command, i.e., \fBinfo +frame\fR itself, -1 to its caller, and so on). .PP This is similar to how \fBinfo level\fR works, except that this subcommand reports all frames, like \fBsource\fRd scripts, -- cgit v0.12 From a04fa2fcec1f882f780d333beb09284c89ff7bff Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 2 Oct 2008 23:20:30 +0000 Subject: * tests/info.test (info-23.3): See [SF Bug 2017632]. Updated output of the test to handle the NRE-enabled eval and the proper propagation of location information through it. --- ChangeLog | 4 ++++ tests/info.test | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3243dfd..56b863a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-10-02 Andreas Kupries + * tests/info.test (info-23.3): See [SF Bug 2017632]. Updated + output of the test to handle the NRE-enabled eval and the proper + propagation of location information through it. + * doc/info.n: Fixed [SF Bug 2134049]. Rephrased the documentation of 'info frame' for positive numbers as level argument. diff --git a/tests/info.test b/tests/info.test index 7388e08..9f94dd3 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.59 2008/10/02 22:55:58 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.60 2008/10/02 23:20:30 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -788,11 +788,11 @@ test info-23.2.1 {eval'd info frame, dynamic} -constraints {singleTestInterp} -m set script {info frame} eval $script } -result {1[12]} -test info-23.3 {eval'd info frame, literal} { +test info-23.3 {eval'd info frame, literal} -match glob -body { eval { info frame 0 } -} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} +} -result {type source line 793 file * cmd {info frame 0} proc ::tcltest::RunTest} test info-23.4 {eval'd info frame, semi-dynamic} { eval info frame 0 } {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} -- cgit v0.12 From b6d0e8df2a36c2c588369036359615f7156d1ba2 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 2 Oct 2008 23:32:13 +0000 Subject: Implement TIP #265. [FRQ 1446696] --- ChangeLog | 27 ++-- doc/ParseArgs.3 | 200 ++++++++++++++++++++++++++ generic/tcl.decls | 7 +- generic/tcl.h | 61 +++++++- generic/tclIndexObj.c | 382 +++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 665 insertions(+), 12 deletions(-) create mode 100644 doc/ParseArgs.3 diff --git a/ChangeLog b/ChangeLog index 56b863a..3332bd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,26 @@ +2008-10-03 Donal K. Fellows + + TIP #265 IMPLEMENTATION + + * generic/tclIndexObj.c (Tcl_ParseArgsObjv, PrintUsage): + * generic/tcl.h (Tcl_ArgvInfo): Added function for simple parsing of + * doc/ParseArgs.3 (new file): optional arguments to commands. Still + needs tests and the like. [FRQ 1446696] Note that some of the type + signatures are changed a bit from the proposed implementation so that + they better reflect codified good practice for argument order. + 2008-10-02 Andreas Kupries - * tests/info.test (info-23.3): See [SF Bug 2017632]. Updated - output of the test to handle the NRE-enabled eval and the proper - propagation of location information through it. + * tests/info.test (info-23.3): Updated output of the test to handle + the NRE-enabled eval and the proper propagation of location + information through it. [Bug 2017632] - * doc/info.n: Fixed [SF Bug 2134049]. Rephrased the documentation - of 'info frame' for positive numbers as level argument. + * doc/info.n: Rephrased the documentation of 'info frame' for positive + numbers as level argument. [Bug 2134049] - * tests/info.test (info-22.8): Fixed [SF Bug 2129828]. Made - pattern for file containing tcltest less specific to accept both - .tcl and .tm variants of the file during matching. + * tests/info.test (info-22.8): Made pattern for file containing + tcltest less specific to accept both .tcl and .tm variants of the file + during matching. [Bug 2129828] 2008-10-02 Don Porter diff --git a/doc/ParseArgs.3 b/doc/ParseArgs.3 new file mode 100644 index 0000000..524e2f2 --- /dev/null +++ b/doc/ParseArgs.3 @@ -0,0 +1,200 @@ +'\" +'\" Copyright (c) 2008 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: ParseArgs.3,v 1.1 2008/10/02 23:32:13 dkf Exp $ +'\" +.so man.macros +.TH Tcl_ParseArgsObjv 3 8.6 Tcl "Tcl Library Procedures" +.BS +.SH NAME +Tcl_ParseArgsObjv \- parse arguments according to a tabular description +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +int +\fBTcl_ParseArgsObjv\fR(\fIinterp, argTable, objcPtr, objv, remObjv\fR) +.SH ARGUMENTS +.AS "const Tcl_ArgvInfo" ***remObjv in/out +.AP Tcl_Interp *interp out +Where to store error messages. +.AP "const Tcl_ArgvInfo" *argTable in +Pointer to array of option descriptors. +.AP int *objcPtr in/out +A pointer to variable holding number of arguments in \fIobjv\fR. Will be +modified to hold number of arguments left in the unprocessed argument list +stored in \fIremObjv\fR. +.AP "Tcl_Obj *const" *objv in +The array of arguments to be parsed. +.AP Tcl_Obj ***remObjv out +Pointer to a variable that will hold the array of unprocessed arguments. +Should be NULL if no return of unprocessed arguments is required. If +\fIobjcPtr\fR is updated to a non-zero value, the array returned through this +must be deallocated using \fBckfree\fR. +.BE +.SH DESCRIPTION +.PP +The \fBTcl_ParseArgsObjv\fR function provides a system for parsing argument +lists of the form +.QW "\fB\-someName \fIsomeValue\fR ..." . +Such argument lists are commonly found both in the arguments to a program and +in the arguments to an individual Tcl command. This parser assumes that the +order of the arguments does not matter, other than in so far as later copies +of a duplicated option overriding earlier ones. +.PP +The argument array is described by the \fIobjcPtr\fR and \fIobjv\fR +parameters, and an array of unprocessed arguments is returned through the +\fIobjcPtr\fR and \fIremObjv\fR parameters; if no return of unprocessed +arguments is desired, the \fIremObjv\fR parameter should be NULL. If any +problems happen, including if the +.QW "generate help" +option is selected, an error message is left in the interpreter result and +TCL_ERROR is returned. Otherwise, the interpreter result is left unchanged and +TCL_OK is returned. +.PP +The collection of arguments to be parsed is described by the \fIargTable\fR +parameter. This points to a table of descriptor structures that is terminated +by an entry with the \fItype\fR field set to TCL_ARGV_END. As convenience, the +following prototypical entries are provided: +.TP +\fBTCL_ARGV_AUTO_HELP\fR +. +Enables the argument processor to provide help when passed the argument +.QW \fB\-help\fR . +.TP +\fBTCL_ARGV_AUTO_REST\fR +. +Instructs the argument processor that arguments after +.QW \fB\-\-\fR +are to be unprocessed. +.TP +\fBTCL_ARGV_TABLE_END\fR +. +Marks the end of the table of argument descriptors. +.SS "ARGUMENT DESCRIPTOR ENTRIES" +.PP +Each entry of the argument descriptor table must be a structure of type +\fBTcl_ArgvInfo\fR. The structure is defined as this: +.PP +.CS +typedef struct { + int \fItype\fR; + const char *\fIkeyStr\fR; + void *\fIsrcPtr\fR; + void *\fIdstPtr\fR; + const char *\fIhelpStr\fR; + ClientData \fIclientData\fR; +} \fBTcl_ArgvInfo\fR; +.CE +.PP +The \fIkeyStr\fR field contains the name of the option; by convention, this +will normally begin with a +.QW \fB\-\fR +character. The \fItype\fR, \fIsrcPtr\fR, \fIdstPtr\fR and \fIclientData\fR +fields describe the interpretation of the value of the argument, as described +below. The \fIhelpStr\fR field gives some text that is used to provide help to +users when they request it. +.PP +As noted above, the \fItype\fR field is used to describe the interpretation of +the argument's value. The following values are acceptable values for +\fItype\fR: +.TP +\fBTCL_ARGV_CONSTANT\fR +. +The argument does not take any following value argument. If this argument is +present, the int pointed to by the \fIsrcPtr\fR field is copied to the +\fIdstPtr\fR field. The \fIclientData\fR field is ignored. +.TP +\fBTCL_ARGV_END\fR +. +This value marks the end of all option descriptors in the table. All other +fields are ignored. +.TP +\fBTCL_ARGV_FLOAT\fR +. +This argument takes a following floating point value argument. The value (once +parsed by \fBTcl_GetDoubleFromObj\fR) will be stored as a double-precision +value in the variable pointed to by the \fIdstPtr\fR field. The \fIsrcPtr\fR +and \fIclientData\fR fields are ignored. +.TP +\fBTCL_ARGV_FUNC\fR +. +This argument optionally takes a following value argument; it is up to the +handler callback function passed in \fIsrcPtr\fR to decide. That function will +have the following signature: +.RS +.PP +.CS +typedef int (*\fBTcl_ArgvFuncProc\fR)( + ClientData \fIclientData\fR, + Tcl_Obj *\fIobjPtr\fR, + void *\fIdstPtr\fR); +.CE +.PP +The result is a boolean value indicating whether to consume the following +argument. The \fIclientData\fR is the value from the table entry, the +\fIobjPtr\fR is the object that represents the following argument or NULL if +there are no following arguments at all, and the \fIdstPtr\fR argument to the +\fBTcl_ArgvFuncProc\fR is the location to write the parsed value to. +.RE +.TP +\fBTCL_ARGV_GENFUNC\fR +. +This argument takes zero or more following arguments; the handler callback +function passed in \fIsrcPtr\fR returns how many (or a negative number to +signal an error, in which case it should also set the interpreter result). The +function will have the following signature: +.RS +.PP +.CS +typedef int (*\fBTcl_ArgvGenFuncProc\fR)( + ClientData \fIclientData\fR, + Tcl_Interp *\fIinterp\fR, + int \fIobjc\fR, + Tcl_Obj *const *\fIobjv\fR, + void *\fIdstPtr\fR); +.CE +.PP +The \fIclientData\fR is the value from the table entry, the \fIinterp\fR is +where to store any error messages, the \fIkeyStr\fR is the name of the +argument, \fIobjc\fR and \fIobjv\fR describe an array of all the remaining +arguments, and \fIdstPtr\fR argument to the \fBTcl_ArgvGenFuncProc\fR is the +location to write the parsed value (or values) to. +.RE +.TP +\fBTCL_ARGV_HELP\fR +. +This special argument does not take any following value argument, but instead +causes \fBTcl_ParseArgsObjv\fR to generate an error message describing the +arguments supported. All other fields except the \fIhelpStr\fR field are +ignored. +.TP +\fBTCL_ARGV_INT\fR +. +This argument takes a following integer value argument. The value (once parsed +by \fBTcl_GetIntFromObj\fR) will be stored as an int in the variable pointed +to by the \fIdstPtr\fR field. The \fIsrcPtr\fR field is ignored. +.TP +\fBTCL_ARGV_REST\fR +. +This special argument does not take any following value argument, but instead +marks all following arguments to be left unprocessed. The \fIsrcPtr\fR, +\fIdstPtr\fR and \fIclientData\fR fields are ignored. +.TP +\fBTCL_ARGV_STRING\fR +. +This argument takes a following string value argument. A pointer to the string +will be stored at \fIdstPtr\fR; the string inside will have a lifetime linked +to the lifetime of the string representation of the argument object that it +came from, and so should be copied if it needs to be retained. The +\fIsrcPtr\fR and \fIclientData\fR fields are ignored. +.SH "SEE ALSO" +Tcl_GetIndexFromObj(3), Tcl_Main(3), Tcl_CreateObjCommand(3) +.SH KEYWORDS +argument, parse +'\" Local Variables: +'\" fill-column: 78 +'\" End: diff --git a/generic/tcl.decls b/generic/tcl.decls index 8a65b76..a8bd083 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.145 2008/09/28 22:17:39 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.146 2008/10/02 23:32:13 dkf Exp $ library tcl @@ -2197,6 +2197,11 @@ declare 603 generic { Tcl_Obj **paramListPtr) } +# TIP#265 (option parser) +declare 604 generic { + int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, + int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv); +} ############################################################################## diff --git a/generic/tcl.h b/generic/tcl.h index abe1157..d7b5ec7 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.271 2008/10/02 20:59:45 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.272 2008/10/02 23:32:13 dkf Exp $ */ #ifndef _TCL @@ -2186,6 +2186,65 @@ typedef unsigned long mp_digit; #endif /* + *---------------------------------------------------------------------------- + * Definitions needed for Tcl_ParseArgvObj routines. + * Based on tkArgv.c. + * Modifications from the original are copyright (c) Sam Bromley 2006 + *---------------------------------------------------------------------------- + */ + +typedef struct { + int type; /* Indicates the option type; see below. */ + const char *keyStr; /* The key string that flags the option in the + * argv array. */ + void *srcPtr; /* Value to be used in setting dst; usage + * depends on type.*/ + void *dstPtr; /* Address of value to be modified; usage + * depends on type.*/ + const char *helpStr; /* Documentation message describing this + * option. */ + ClientData clientData; /* Word to pass to function callbacks. */ +} Tcl_ArgvInfo; + +/* + * Legal values for the type field of a Tcl_ArgInfo: see the user + * documentation for details. + */ + +#define TCL_ARGV_CONSTANT 15 +#define TCL_ARGV_INT 16 +#define TCL_ARGV_STRING 17 +#define TCL_ARGV_REST 18 +#define TCL_ARGV_FLOAT 19 +#define TCL_ARGV_FUNC 20 +#define TCL_ARGV_GENFUNC 21 +#define TCL_ARGV_HELP 22 +#define TCL_ARGV_END 23 + +/* + * Types of callback functions for the TCL_ARGV_FUNC and TCL_ARGV_GENFUNC + * argument types: + */ + +typedef int (*Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr, + void *dstPtr); +typedef int (*Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const *objv, void *dstPtr); + +/* + * Shorthand for commonly used argTable entries. + */ + +#define TCL_ARGV_AUTO_HELP \ + {TCL_ARGV_HELP, "-help", NULL, NULL, \ + "Print summary of command-line options and abort"} +#define TCL_ARGV_AUTO_REST \ + {TCL_ARGV_REST, "--", NULL, NULL, \ + "Marks the end of the options"} +#define TCL_ARGV_TABLE_END \ + {TCL_ARGV_END} + +/* * The following constant is used to test for older versions of Tcl in the * stubs tables. * diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 0633cfd..144503f 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -3,14 +3,16 @@ * * This file implements objects of type "index". This object type is used * to lookup a keyword in a table of valid values and cache the index of - * the matching entry. + * the matching entry. Also provides table-based argv/argc processing. * + * Copyright (c) 1990-1994 The Regents of the University of California. * Copyright (c) 1997 Sun Microsystems, Inc. + * Copyright (c) 2006 Sam Bromley. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.38 2007/12/13 15:23:18 dgp Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.39 2008/10/02 23:32:13 dkf Exp $ */ #include "tclInt.h" @@ -23,6 +25,8 @@ static int SetIndexFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void UpdateStringOfIndex(Tcl_Obj *objPtr); static void DupIndex(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); static void FreeIndex(Tcl_Obj *objPtr); +static void PrintUsage(Tcl_Interp *interp, + const Tcl_ArgvInfo *argTable); /* * The structure below defines the index Tcl object type by means of functions @@ -632,6 +636,380 @@ Tcl_WrongNumArgs( } /* + *---------------------------------------------------------------------- + * + * Tcl_ParseArgsObjv -- + * + * Process an objv array according to a table of expected command-line + * options. See the manual page for more details. + * + * Results: + * The return value is a standard Tcl return value. If an error occurs + * then an error message is left in the interp's result. Under normal + * conditions, both *objcPtr and *objv are modified to return the + * arguments that couldn't be processed here (they didn't match the + * option table, or followed an TCL_ARGV_REST argument). + * + * Side effects: + * Variables may be modified, or procedures may be called. It all depends + * on the arguments and their entries in argTable. See the user + * documentation for details. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_ParseArgsObjv( + Tcl_Interp *interp, /* Place to store error message. */ + const Tcl_ArgvInfo *argTable, + /* Array of option descriptions. */ + int *objcPtr, /* Number of arguments in objv. Modified to + * hold # args left in objv at end. */ + Tcl_Obj *const *objv, /* Array of arguments to be parsed. */ + Tcl_Obj ***remObjv) /* Pointer to array of arguments that were not + * processed here. Should be NULL if no return + * of arguments is desired. */ +{ + Tcl_Obj **leftovers; /* Array to write back to remObjv on + * successful exit. Will include the name of + * the command. */ + int nrem; /* Size of leftovers.*/ + register const Tcl_ArgvInfo *infoPtr; + /* Pointer to the current entry in the table + * of argument descriptions. */ + const Tcl_ArgvInfo *matchPtr; + /* Descriptor that matches current argument. */ + Tcl_Obj *curArg; /* Current argument */ + char *str = NULL; + register char c; /* Second character of current arg (used for + * quick check for matching; use 2nd char. + * because first char. will almost always be + * '-'). */ + int srcIndex; /* Location from which to read next argument + * from objv. */ + int dstIndex; /* Used to keep track of current arguments + * being processed, primarily for error + * reporting. */ + int objc; /* # arguments in objv still to process. */ + int length; /* Number of characters in current argument. */ + + if (remObjv != NULL) { + /* + * Then we should copy the name of the command (0th argument). + */ + + nrem = 1; + leftovers = (Tcl_Obj **) ckalloc((nrem+1) * sizeof(Tcl_Obj *)); + leftovers[nrem-1] = objv[0]; + leftovers[nrem] = NULL; + } else { + nrem = 0; + leftovers = NULL; + } + + /* + * OK, now start processing from the second element (1st argument). + */ + + srcIndex = dstIndex = 1; + objc = *objcPtr-1; + + while (objc > 0) { + curArg = objv[srcIndex]; + srcIndex++; + objc--; + str = Tcl_GetStringFromObj(curArg, &length); + if (length > 0) { + c = str[1]; + } else { + c = 0; + } + + /* + * Loop throught the argument descriptors searching for one with the + * matching key string. If found, leave a pointer to it in matchPtr. + */ + + matchPtr = NULL; + infoPtr = argTable; + for (; (infoPtr != NULL) && (infoPtr->type != TCL_ARGV_END); + infoPtr++) { + if (infoPtr->keyStr == NULL) { + continue; + } + if ((infoPtr->keyStr[1] != c) + || (strncmp(infoPtr->keyStr, str, length) != 0)) { + continue; + } + if (infoPtr->keyStr[length] == 0) { + matchPtr = infoPtr; + goto gotMatch; + } + if (matchPtr != NULL) { + Tcl_AppendResult(interp, "ambiguous option \"", str, "\"", + NULL); + goto error; + } + matchPtr = infoPtr; + } + if (matchPtr == NULL) { + /* + * Unrecognized argument. Just copy it down, unless the caller + * prefers an error to be registered. + */ + + if (remObjv == NULL) { + Tcl_AppendResult(interp, "unrecognized argument \"", str, + "\"", NULL); + goto error; + } + + dstIndex++; /* This argument is now handled */ + nrem++; + + /* + * Allocate nrem (+1 extra for NULL terminator) pointers. + */ + + leftovers = (Tcl_Obj **) ckrealloc((void *) leftovers, + (nrem+1) * sizeof(Tcl_Obj *)); + leftovers[nrem-1] = curArg; + continue; + } + + /* + * Take the appropriate action based on the option type + */ + + gotMatch: + infoPtr = matchPtr; + switch (infoPtr->type) { + case TCL_ARGV_CONSTANT: + *((int *) infoPtr->dstPtr) = (int) infoPtr->srcPtr; + break; + case TCL_ARGV_INT: + if (objc == 0) { + goto missingArg; + } + if (Tcl_GetIntFromObj(interp, objv[srcIndex], + (int *) infoPtr->dstPtr) == TCL_ERROR) { + Tcl_AppendResult(interp, "expected integer argument for \"", + infoPtr->keyStr, "\" but got \"", + Tcl_GetString(objv[srcIndex]), "\"", NULL); + goto error; + } + srcIndex++; + objc--; + break; + case TCL_ARGV_STRING: + if (objc == 0) { + goto missingArg; + } + *((const char **) infoPtr->dstPtr) = + Tcl_GetString(objv[srcIndex]); + srcIndex++; + objc--; + break; + case TCL_ARGV_REST: + *((int *) infoPtr->dstPtr) = dstIndex; + goto argsDone; + case TCL_ARGV_FLOAT: + if (objc == 0) { + goto missingArg; + } + if (Tcl_GetDoubleFromObj(interp, objv[srcIndex], + (double *) infoPtr->dstPtr) == TCL_ERROR) { + Tcl_AppendResult(interp, "expected floating-point argument ", + "for \"", infoPtr->keyStr, "\" but got \"", + Tcl_GetString((Tcl_Obj *) objv[srcIndex]),"\"", NULL); + goto error; + } + srcIndex++; + objc--; + break; + case TCL_ARGV_FUNC: { + Tcl_ArgvFuncProc handlerProc; + Tcl_Obj *argObj; + + if (objc == 0) { + argObj = NULL; + } else { + argObj = objv[srcIndex]; + } + handlerProc = (Tcl_ArgvFuncProc) infoPtr->srcPtr; + if (handlerProc(infoPtr->clientData, infoPtr->dstPtr, argObj)) { + srcIndex++; + objc--; + } + break; + } + case TCL_ARGV_GENFUNC: { + Tcl_ArgvGenFuncProc handlerProc; + + handlerProc = (Tcl_ArgvGenFuncProc) infoPtr->srcPtr; + objc = handlerProc(infoPtr->clientData, infoPtr->dstPtr, interp, + objc, &objv[srcIndex]); + if (objc < 0) { + goto error; + } + break; + } + case TCL_ARGV_HELP: + PrintUsage(interp, argTable); + goto error; + default: { + char buf[64 + TCL_INTEGER_SPACE]; + + sprintf(buf, "bad argument type %d in Tcl_ArgvInfo", + infoPtr->type); + Tcl_SetResult(interp, buf, TCL_VOLATILE); + goto error; + } + } + } + + /* + * If we broke out of the loop because of an OPT_REST argument, copy the + * remaining arguments down. + */ + + argsDone: + if (remObjv==NULL) { + /* + * Nothing to do. + */ + + return TCL_OK; + } + + if (objc > 0) { + leftovers = (Tcl_Obj **) ckrealloc((void *) leftovers, + (nrem+objc+1) * sizeof(Tcl_Obj*)); + while (objc) { + leftovers[nrem]=objv[srcIndex]; + nrem++; + srcIndex++; + objc--; + } + } else if (leftovers != NULL) { + ckfree((char *) leftovers); + } + leftovers[nrem] = NULL; + *objcPtr = nrem; + *remObjv = leftovers; + return TCL_OK; + + /* + * Make sure to handle freeing any temporary space we've allocated on the + * way to an error. + */ + + missingArg: + Tcl_AppendResult(interp, "\"", str, + "\" option requires an additional argument", NULL); + error: + if (leftovers != NULL) { + ckfree((char *) leftovers); + } + return TCL_ERROR; +} + +/* + *---------------------------------------------------------------------- + * + * PrintUsage -- + * + * Generate a help string describing command-line options. + * + * Results: + * The interp's result will be modified to hold a help string describing + * all the options in argTable. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +PrintUsage( + Tcl_Interp *interp, /* Place information in this interp's result + * area. */ + const Tcl_ArgvInfo *argTable) + /* Array of command-specific argument + * descriptions. */ +{ + register const Tcl_ArgvInfo *infoPtr; + int width, numSpaces; +#define NUM_SPACES 20 + static char spaces[] = " "; + char tmp[TCL_DOUBLE_SPACE]; + + /* + * First, compute the width of the widest option key, so that we can make + * everything line up. + */ + + width = 4; + for (infoPtr = argTable; infoPtr->type != TCL_ARGV_END; infoPtr++) { + int length; + + if (infoPtr->keyStr == NULL) { + continue; + } + length = strlen(infoPtr->keyStr); + if (length > width) { + width = length; + } + } + + /* + * Now add the option information, with pretty-printing. + */ + + Tcl_AppendResult(interp, "Command-specific options:", NULL); + for (infoPtr = argTable; infoPtr->type != TCL_ARGV_END; infoPtr++) { + if ((infoPtr->type == TCL_ARGV_HELP) && (infoPtr->keyStr == NULL)) { + Tcl_AppendResult(interp, "\n", infoPtr->helpStr, NULL); + continue; + } + Tcl_AppendResult(interp, "\n ", infoPtr->keyStr, ":", NULL); + numSpaces = width + 1 - strlen(infoPtr->keyStr); + while (numSpaces > 0) { + if (numSpaces >= NUM_SPACES) { + Tcl_AppendResult(interp, spaces, NULL); + } else { + Tcl_AppendResult(interp, spaces+NUM_SPACES-numSpaces, NULL); + } + numSpaces -= NUM_SPACES; + } + Tcl_AppendResult(interp, infoPtr->helpStr, NULL); + switch (infoPtr->type) { + case TCL_ARGV_INT: + sprintf(tmp, "%d", *((int *) infoPtr->dstPtr)); + Tcl_AppendResult(interp, "\n\t\tDefault value: ", tmp, NULL); + break; + case TCL_ARGV_FLOAT: + sprintf(tmp, "%g", *((double *) infoPtr->dstPtr)); + Tcl_AppendResult(interp, "\n\t\tDefault value: ", tmp, NULL); + break; + case TCL_ARGV_STRING: { + char *string; + + string = *((char **) infoPtr->dstPtr); + if (string != NULL) { + Tcl_AppendResult(interp, "\n\t\tDefault value: \"", string, + "\"", NULL); + } + break; + } + default: + break; + } + } +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 -- cgit v0.12 From 671e79779b468359afe18d0fafb3afe148ebe7cd Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 2 Oct 2008 23:36:12 +0000 Subject: Reduce the number of (pointless) type-casts. --- generic/tclMain.c | 77 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/generic/tclMain.c b/generic/tclMain.c index 726c28e..4326c3a 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMain.c,v 1.45 2008/04/27 22:21:31 dkf Exp $ + * RCS: @(#) $Id: tclMain.c,v 1.46 2008/10/02 23:36:12 dkf Exp $ */ #include "tclInt.h" @@ -294,7 +294,7 @@ Tcl_SourceRCFile( */ c = Tcl_OpenFileChannel(NULL, fullName, "r", 0); - if (c != (Tcl_Channel) NULL) { + if (c != NULL) { Tcl_Close(NULL, c); if (Tcl_EvalFile(interp, fullName) != TCL_OK) { errChannel = Tcl_GetStdChannel(TCL_STDERR); @@ -356,7 +356,6 @@ Tcl_Main( */ if (NULL == Tcl_GetStartupScript(NULL)) { - /* * Check whether first 3 args (argv[1] - argv[3]) look like * -encoding ENCODING FILENAME @@ -416,8 +415,8 @@ Tcl_Main( * Invoke application-specific initialization. */ - Tcl_Preserve((ClientData) interp); - if ((*appInitProc)(interp) != TCL_OK) { + Tcl_Preserve(interp); + if (appInitProc(interp) != TCL_OK) { errChannel = Tcl_GetStdChannel(TCL_STDERR); if (errChannel) { Tcl_WriteChars(errChannel, @@ -488,7 +487,7 @@ Tcl_Main( Tcl_LinkVar(interp, "tcl_interactive", (char *) &tty, TCL_LINK_BOOLEAN); inChannel = Tcl_GetStdChannel(TCL_STDIN); outChannel = Tcl_GetStdChannel(TCL_STDOUT); - while ((inChannel != (Tcl_Channel) NULL) && !Tcl_InterpDeleted(interp)) { + while ((inChannel != NULL) && !Tcl_InterpDeleted(interp)) { if (mainLoopProc == NULL) { if (tty) { Prompt(interp, &prompt); @@ -499,7 +498,7 @@ Tcl_Main( break; } inChannel = Tcl_GetStdChannel(TCL_STDIN); - if (inChannel == (Tcl_Channel) NULL) { + if (inChannel == NULL) { break; } } @@ -513,10 +512,10 @@ Tcl_Main( if (Tcl_InputBlocked(inChannel)) { /* * This can only happen if stdin has been set to - * non-blocking. In that case cycle back and try again. + * non-blocking. In that case cycle back and try again. * This sets up a tight polling loop (since we have no - * event loop running). If this causes bad CPU hogging, - * we might try toggling the blocking on stdin instead. + * event loop running). If this causes bad CPU hogging, we + * might try toggling the blocking on stdin instead. */ continue; @@ -530,9 +529,9 @@ Tcl_Main( } /* - * Add the newline removed by Tcl_GetsObj back to the string. - * Have to add it back before testing completeness, because - * it can make a difference. [Bug 1775878]. + * Add the newline removed by Tcl_GetsObj back to the string. Have + * to add it back before testing completeness, because it can make + * a difference. [Bug 1775878] */ if (Tcl_IsShared(commandPtr)) { @@ -547,10 +546,12 @@ Tcl_Main( } prompt = PROMPT_START; + /* - * The final newline is syntactically redundant, and causes - * some error messages troubles deeper in, so lop it back off. + * The final newline is syntactically redundant, and causes some + * error messages troubles deeper in, so lop it back off. */ + Tcl_GetStringFromObj(commandPtr, &length); Tcl_SetObjLength(commandPtr, --length); code = Tcl_RecordAndEvalObj(interp, commandPtr, TCL_EVAL_GLOBAL); @@ -589,7 +590,7 @@ Tcl_Main( Prompt(interp, &prompt); } isPtr = (InteractiveState *) - ckalloc((int) sizeof(InteractiveState)); + ckalloc(sizeof(InteractiveState)); isPtr->input = inChannel; isPtr->tty = tty; isPtr->commandPtr = commandPtr; @@ -601,10 +602,10 @@ Tcl_Main( TCL_LINK_BOOLEAN); Tcl_CreateChannelHandler(inChannel, TCL_READABLE, StdinProc, - (ClientData) isPtr); + isPtr); } - (*mainLoopProc)(); + mainLoopProc(); mainLoopProc = NULL; if (inChannel) { @@ -614,11 +615,10 @@ Tcl_Main( TCL_LINK_BOOLEAN); prompt = isPtr->prompt; commandPtr = isPtr->commandPtr; - if (isPtr->input != (Tcl_Channel) NULL) { - Tcl_DeleteChannelHandler(isPtr->input, StdinProc, - (ClientData) isPtr); + if (isPtr->input != NULL) { + Tcl_DeleteChannelHandler(isPtr->input, StdinProc, isPtr); } - ckfree((char *)isPtr); + ckfree((char *) isPtr); } inChannel = Tcl_GetStdChannel(TCL_STDIN); outChannel = Tcl_GetStdChannel(TCL_STDOUT); @@ -647,7 +647,7 @@ Tcl_Main( * this point. */ - (*mainLoopProc)(); + mainLoopProc(); mainLoopProc = NULL; } if (commandPtr != NULL) { @@ -663,6 +663,7 @@ Tcl_Main( if (!Tcl_InterpDeleted(interp)) { if (!Tcl_LimitExceeded(interp)) { Tcl_Obj *cmd = Tcl_ObjPrintf("exit %d", exitCode); + Tcl_IncrRefCount(cmd); Tcl_EvalObjEx(interp, cmd, TCL_EVAL_GLOBAL); Tcl_DecrRefCount(cmd); @@ -686,7 +687,7 @@ Tcl_Main( * destruction with the last matching Tcl_Release. */ - Tcl_Release((ClientData) interp); + Tcl_Release(interp); Tcl_Exit(exitCode); } @@ -739,7 +740,7 @@ StdinProc( ClientData clientData, /* The state of interactive cmd line */ int mask) /* Not used. */ { - InteractiveState *isPtr = (InteractiveState *) clientData; + InteractiveState *isPtr = clientData; Tcl_Channel chan = isPtr->input; Tcl_Obj *commandPtr = isPtr->commandPtr; Tcl_Interp *interp = isPtr->interp; @@ -764,7 +765,7 @@ StdinProc( Tcl_Exit(0); } - Tcl_DeleteChannelHandler(chan, StdinProc, (ClientData) isPtr); + Tcl_DeleteChannelHandler(chan, StdinProc, isPtr); return; } @@ -789,28 +790,29 @@ StdinProc( * things, this will trash the text of the command being evaluated. */ - Tcl_CreateChannelHandler(chan, 0, StdinProc, (ClientData) isPtr); + Tcl_CreateChannelHandler(chan, 0, StdinProc, isPtr); code = Tcl_RecordAndEvalObj(interp, commandPtr, TCL_EVAL_GLOBAL); isPtr->input = chan = Tcl_GetStdChannel(TCL_STDIN); Tcl_DecrRefCount(commandPtr); isPtr->commandPtr = commandPtr = Tcl_NewObj(); Tcl_IncrRefCount(commandPtr); - if (chan != (Tcl_Channel) NULL) { - Tcl_CreateChannelHandler(chan, TCL_READABLE, StdinProc, - (ClientData) isPtr); + if (chan != NULL) { + Tcl_CreateChannelHandler(chan, TCL_READABLE, StdinProc, isPtr); } if (code != TCL_OK) { Tcl_Channel errChannel = Tcl_GetStdChannel(TCL_STDERR); - if (errChannel != (Tcl_Channel) NULL) { + + if (errChannel != NULL) { Tcl_WriteObj(errChannel, Tcl_GetObjResult(interp)); Tcl_WriteChars(errChannel, "\n", 1); } } else if (isPtr->tty) { Tcl_Obj *resultPtr = Tcl_GetObjResult(interp); Tcl_Channel outChannel = Tcl_GetStdChannel(TCL_STDOUT); + Tcl_IncrRefCount(resultPtr); Tcl_GetStringFromObj(resultPtr, &length); - if ((length >0) && (outChannel != (Tcl_Channel) NULL)) { + if ((length >0) && (outChannel != NULL)) { Tcl_WriteObj(outChannel, resultPtr); Tcl_WriteChars(outChannel, "\n", 1); } @@ -822,8 +824,8 @@ StdinProc( */ prompt: - if (isPtr->tty && (isPtr->input != (Tcl_Channel) NULL)) { - Prompt(interp, &(isPtr->prompt)); + if (isPtr->tty && (isPtr->input != NULL)) { + Prompt(interp, &isPtr->prompt); isPtr->input = Tcl_GetStdChannel(TCL_STDIN); } } @@ -870,8 +872,7 @@ Prompt( if (promptCmdPtr == NULL) { defaultPrompt: outChannel = Tcl_GetStdChannel(TCL_STDOUT); - if ((*promptPtr == PROMPT_START) - && (outChannel != (Tcl_Channel) NULL)) { + if ((*promptPtr == PROMPT_START) && (outChannel != NULL)) { Tcl_WriteChars(outChannel, DEFAULT_PRIMARY_PROMPT, strlen(DEFAULT_PRIMARY_PROMPT)); } @@ -881,7 +882,7 @@ Prompt( Tcl_AddErrorInfo(interp, "\n (script that generates prompt)"); errChannel = Tcl_GetStdChannel(TCL_STDERR); - if (errChannel != (Tcl_Channel) NULL) { + if (errChannel != NULL) { Tcl_WriteObj(errChannel, Tcl_GetObjResult(interp)); Tcl_WriteChars(errChannel, "\n", 1); } @@ -890,7 +891,7 @@ Prompt( } outChannel = Tcl_GetStdChannel(TCL_STDOUT); - if (outChannel != (Tcl_Channel) NULL) { + if (outChannel != NULL) { Tcl_Flush(outChannel); } *promptPtr = PROMPT_NONE; -- cgit v0.12 From cfff639c9c08071cfdae47df0a73070c387255b7 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 2 Oct 2008 23:55:20 +0000 Subject: Regen --- generic/tclDecls.h | 9 ++++++++- generic/tclStubInit.c | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index bde068b..6484113 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.147 2008/09/28 22:18:46 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.148 2008/10/02 23:55:20 dkf Exp $ */ #ifndef _TCLDECLS @@ -3649,6 +3649,8 @@ EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); #endif +/* 604 */ +EXTERN int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj *** remObjv);; typedef struct TclStubHooks { CONST struct TclPlatStubs *tclPlatStubs; @@ -4312,6 +4314,7 @@ typedef struct TclStubs { unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ + int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj *** *remObjv);; /* 604 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6800,6 +6803,10 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_GetEnsembleParameterList \ (tclStubsPtr->tcl_GetEnsembleParameterList) /* 603 */ #endif +#ifndef remObjv); +#define remObjv); \ + (*tclStubsPtr->remObjv);) /* 604 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 07b6ca3..91a1050 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.164 2008/09/28 22:18:46 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.165 2008/10/02 23:55:20 dkf Exp $ */ #include "tclInt.h" @@ -1129,6 +1129,7 @@ static const TclStubs tclStubs = { Tcl_GetBlockSizeFromStat, /* 601 */ Tcl_SetEnsembleParameterList, /* 602 */ Tcl_GetEnsembleParameterList, /* 603 */ + &remObjv);, /* 604 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 5f4768a439995933c1aefee69f6753f04a9984c0 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 3 Oct 2008 00:01:35 +0000 Subject: Implemented TIP#195 - tcl::prefix command. [Patch 1040206] --- ChangeLog | 6 + doc/prefix.n | 93 +++++++++++ generic/tclBasic.c | 3 +- generic/tclIndexObj.c | 415 ++++++++++++++++++++++++++++++++++++++++++++++++-- generic/tclInt.h | 3 +- tests/string.test | 202 +++++++++++++++++++++++- 6 files changed, 710 insertions(+), 12 deletions(-) create mode 100644 doc/prefix.n diff --git a/ChangeLog b/ChangeLog index 3332bd0..f30ca11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-10-03 Donal K. Fellows + TIP #195 IMPLEMENTATION + + * generic/tclIndexObj.c (TclGetIndexFromObjList, PrefixMatchObjCmd) + * doc/prefix.n, tests/string.test: Added [tcl::prefix] command for + working with prefixes of strings at the Tcl level. [Patch 1040206] + TIP #265 IMPLEMENTATION * generic/tclIndexObj.c (Tcl_ParseArgsObjv, PrintUsage): diff --git a/doc/prefix.n b/doc/prefix.n new file mode 100644 index 0000000..02bd8ce --- /dev/null +++ b/doc/prefix.n @@ -0,0 +1,93 @@ +'\" +'\" Copyright (c) 2008 Peter Spjuth +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: prefix.n,v 1.1 2008/10/03 00:01:35 dkf Exp $ +'\" +.so man.macros +.TH prefix n 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +prefix \- Facilities for prefix matching +.SH SYNOPSIS +.nf +\fB::tcl::prefix all\fR \fItable\fR \fIstring\fR +\fB::tcl::prefix longest\fR \fItable\fR \fIstring\fR +\fB::tcl::prefix match\fR \fI?option ...?\fR \fItable\fR \fIstring\fR +.fi +.BE +.SH DESCRIPTION +This document describes commands looking up a prefix in a list of strings. +The following commands are supported: +.TP +\fB::tcl::prefix all\fR \fItable\fR \fIstring\fR +Returns a list of all elements in \fItable\fR that begins with +the prefix \fIstring\fR. +.TP +\fB::tcl::prefix longest\fR \fItable\fR \fIstring\fR +Returns the longest common prefix among all elements in \fItable\fR that +begins with the prefix \fIstring\fR. +.TP +\fB::tcl::prefix match\fR ?\fIoptions\fR? \fItable\fR \fIstring\fR +If \fIstring\fR equals one element in \fItable\fR or is a prefix to exactly +one element, the matched element is returned. If not, the result depends +on the -error option. +.TP 20 +\fB\-exact\fR +. +Accept only exact matches. +.TP 20 +\fB\-message\0\fIstring\fR +. +Use \fIstring\fR in the error message at a mismatch. Default is "option". +.TP 20 +\fB\-error\0\fIoptions\fR +. +The \fIoptions\fR are used when no match is found. +If \fIoptions\fR is empty, no error is generated and an empty string is returned. +Otherwise the \fIoptions\fR are used as \fBreturn\fR options when generating +the error message. The default corresponds to setting "-level 0". +Example: If \fB-error\fR "-errorcode MyError -level 1" is used, an error would +be generated as [return -errorcode MyError -level 1 -code error "ErrMsg"]. +.SH "EXAMPLES" +.PP +Basic use: +.CS +namespace import ::tcl::prefix +\fBprefix match\fR {apa bepa cepa} apa + \fI\(-> apa\fR +\fBprefix match\fR {apa bepa cepa} a + \fI\(-> apa\fR +\fBprefix match\fR -exact {apa bepa cepa} a + \fI\(-> bad option "a": must be apa, bepa, or cepa\fR +\fBprefix match\fR -message "switch" {apa ada bepa cepa} a + \fI\(-> ambiguous switch "a": must be apa, ada, bepa, or cepa\fR +\fBprefix longest\fR {fblocked fconfigure fcopy file fileevent flush} fc + \fI\(-> fco\fR +\fBprefix all\fR {fblocked fconfigure fcopy file fileevent flush} fc + \fI\(-> fconfigure fcopy\fR +.CE +.PP +Simplifying option matching: +.CS +array set opts {-apa 1 -bepa "" -cepa 0} +foreach {arg val} $args { + set opts([prefix match {-apa -bepa -cepa} $arg]) $val +} +.CE +.PP +Switch supporting prefixes: +.CS +switch [prefix match {apa bepa cepa} $arg] { + apa { } + bepa { } + cepa { } +} +.CE +.SH "SEE ALSO" +lsearch(n) +.SH "KEYWORDS" +prefix diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d0a8635..036707d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.369 2008/10/02 20:59:45 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.370 2008/10/03 00:01:35 dkf Exp $ */ #include "tclInt.h" @@ -750,6 +750,7 @@ Tcl_CreateInterp(void) TclInitDictCmd(interp); TclInitInfoCmd(interp); TclInitStringCmd(interp); + TclInitPrefixCmd(interp); /* * Register "clock" subcommands. These *do* go through diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 144503f..2d29adf 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.39 2008/10/02 23:32:13 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.40 2008/10/03 00:01:35 dkf Exp $ */ #include "tclInt.h" @@ -25,6 +25,15 @@ static int SetIndexFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void UpdateStringOfIndex(Tcl_Obj *objPtr); static void DupIndex(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); static void FreeIndex(Tcl_Obj *objPtr); +static int PrefixAllObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); +static int PrefixLongestObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); +static int PrefixMatchObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); static void PrintUsage(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable); @@ -50,9 +59,9 @@ static Tcl_ObjType indexType = { */ typedef struct { - void *tablePtr; /* Pointer to the table of strings */ - int offset; /* Offset between table entries */ - int index; /* Selected index into table. */ + void *tablePtr; /* Pointer to the table of strings */ + int offset; /* Offset between table entries */ + int index; /* Selected index into table. */ } IndexRep; /* @@ -76,7 +85,7 @@ typedef struct { * * Results: * If the value of objPtr is identical to or a unique abbreviation for - * one of the entries in objPtr, then the return value is TCL_OK and the + * one of the entries in tablePtr, then the return value is TCL_OK and the * index of the matching entry is stored at *indexPtr. If there isn't a * proper match, then TCL_ERROR is returned and an error message is left * in interp's result (unless interp is NULL). The msg argument is used @@ -131,6 +140,92 @@ Tcl_GetIndexFromObj( /* *---------------------------------------------------------------------- * + * TclGetIndexFromObjList -- + * + * This procedure looks up an object's value in a table of strings + * and returns the index of the matching string, if any. + * + * Results: + * If the value of objPtr is identical to or a unique abbreviation + * for one of the entries in tableObjPtr, then the return value is + * TCL_OK and the index of the matching entry is stored at + * *indexPtr. If there isn't a proper match, then TCL_ERROR is + * returned and an error message is left in interp's result (unless + * interp is NULL). The msg argument is used in the error + * message; for example, if msg has the value "option" then the + * error message will say something flag 'bad option "foo": must be + * ...' + * + * Side effects: + * The result of the lookup is cached as the internal rep of + * objPtr, so that repeated lookups can be done quickly. + * + *---------------------------------------------------------------------- + */ + +int +TclGetIndexFromObjList( + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Obj *objPtr, /* Object containing the string to lookup. */ + Tcl_Obj *tableObjPtr, /* List of strings to compare against the + * value of objPtr. */ + const char *msg, /* Identifying word to use in error + * messages. */ + int flags, /* 0 or TCL_EXACT */ + int *indexPtr) /* Place to store resulting integer index. */ +{ + + int objc, result, t; + Tcl_Obj **objv; + char **tablePtr; + + /* + * Use Tcl_GetIndexFromObjStruct to do the work to avoid duplicating + * most of the code there. This is a bit ineffiecient but simpler. + */ + + result = Tcl_ListObjGetElements(interp, tableObjPtr, &objc, &objv); + if (result != TCL_OK) { + return result; + } + + /* + * Build a string table from the list. + */ + + tablePtr = (char **) ckalloc((objc + 1) * sizeof(char *)); + for (t = 0; t < objc; t++) { + if (objv[t] == objPtr) { + /* + * An exact match is always chosen, so we can stop here. + */ + + ckfree((char *) tablePtr); + *indexPtr = t; + return TCL_OK; + } + + tablePtr[t] = Tcl_GetString(objv[t]); + } + tablePtr[objc] = NULL; + + result = Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, + sizeof(char *), msg, flags, indexPtr); + + /* + * The internal rep must be cleared since tablePtr will go away. + */ + + TclFreeIntRep(objPtr); + objPtr->typePtr = NULL; + ckfree((char *) tablePtr); + + return result; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_GetIndexFromObjStruct -- * * This function looks up an object's value given a starting string and @@ -139,7 +234,7 @@ Tcl_GetIndexFromObj( * * Results: * If the value of objPtr is identical to or a unique abbreviation for - * one of the entries in objPtr, then the return value is TCL_OK and the + * one of the entries in tablePtr, then the return value is TCL_OK and the * index of the matching entry is stored at *indexPtr. If there isn't a * proper match, then TCL_ERROR is returned and an error message is left * in interp's result (unless interp is NULL). The msg argument is used @@ -250,8 +345,8 @@ Tcl_GetIndexFromObjStruct( objPtr->typePtr = &indexType; } indexRep->tablePtr = (void *) tablePtr; - indexRep->offset = offset; - indexRep->index = index; + indexRep->offset = offset; + indexRep->index = index; *indexPtr = index; return TCL_OK; @@ -340,7 +435,7 @@ UpdateStringOfIndex( register char *buf; register unsigned len; register const char *indexStr = EXPAND_OF(indexRep); - + len = strlen(indexStr); buf = (char *) ckalloc(len + 1); memcpy(buf, indexStr, len+1); @@ -406,6 +501,308 @@ FreeIndex( /* *---------------------------------------------------------------------- * + * TclInitPrefixCmd -- + * + * This procedure creates the "prefix" Tcl command. See the user + * documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +Tcl_Command +TclInitPrefixCmd( + Tcl_Interp *interp) /* Current interpreter. */ +{ + static const EnsembleImplMap prefixImplMap[] = { + {"all", PrefixAllObjCmd, NULL}, + {"longest", PrefixLongestObjCmd, NULL}, + {"match", PrefixMatchObjCmd, NULL}, + {NULL} + }; + + return TclMakeEnsemble(interp, "tcl::prefix", prefixImplMap); +} + +/*---------------------------------------------------------------------- + * + * PrefixMatchObjCmd - + * + * This function implements the 'prefix match' Tcl command. Refer + * to the user documentation for details on what it does. + * + * Results: + * Returns a standard Tcl result. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +PrefixMatchObjCmd( + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int flags = 0, result, index; + int dummyLength, i, errorLength; + Tcl_Obj *errorPtr = NULL; + char *message = "option"; + Tcl_Obj *tablePtr, *objPtr, *resultPtr; + static const char *matchOptions[] = { + "-error", "-exact", "-message", (char *) NULL + }; + enum matchOptions { + PRFMATCH_ERROR, PRFMATCH_EXACT, PRFMATCH_MESSAGE + }; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "?options? table string"); + return TCL_ERROR; + } + + for (i = 1; i < (objc - 2); i++) { + if (Tcl_GetIndexFromObj(interp, objv[i], matchOptions, "option", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + switch ((enum matchOptions) index) { + case PRFMATCH_EXACT: + flags |= TCL_EXACT; + break; + case PRFMATCH_MESSAGE: + if (i > (objc - 4)) { + Tcl_AppendResult(interp, "missing message", NULL); + return TCL_ERROR; + } + i++; + message = Tcl_GetString(objv[i]); + break; + case PRFMATCH_ERROR: + if (i > (objc - 4)) { + Tcl_AppendResult(interp, "missing error options", NULL); + return TCL_ERROR; + } + i++; + result = Tcl_ListObjLength(interp, objv[i], &errorLength); + if (result != TCL_OK) { + return TCL_ERROR; + } + if ((errorLength % 2) != 0) { + Tcl_AppendResult(interp, "error options must have an even number of elements", NULL); + return TCL_ERROR; + } + errorPtr = objv[i]; + break; + } + } + + tablePtr = objv[objc-2]; + objPtr = objv[objc-1]; + + /* + * Check that table is a valid list first, since we want to handle + * that error case regardless of level. + */ + + result = Tcl_ListObjLength(interp, tablePtr, &dummyLength); + if (result != TCL_OK) { + return result; + } + + result = TclGetIndexFromObjList(interp, objPtr, tablePtr, message, flags, + &index); + if (result != TCL_OK) { + if (errorPtr != NULL && errorLength == 0) { + Tcl_ResetResult(interp); + return TCL_OK; + } else if (errorPtr == NULL) { + return TCL_ERROR; + } else { + if (Tcl_IsShared(errorPtr)) { + errorPtr = Tcl_DuplicateObj(errorPtr); + } + Tcl_ListObjAppendElement(interp, errorPtr, + Tcl_NewStringObj("-code", 5)); + Tcl_ListObjAppendElement(interp, errorPtr, Tcl_NewIntObj(result)); + + return Tcl_SetReturnOptions(interp, errorPtr); + } + } + + result = Tcl_ListObjIndex(interp, tablePtr, index, &resultPtr); + if (result != TCL_OK) { + return result; + } + Tcl_SetObjResult(interp, resultPtr); + return TCL_OK; +} + +/*---------------------------------------------------------------------- + * + * PrefixAllObjCmd - + * + * This function implements the 'prefix all' Tcl command. Refer + * to the user documentation for details on what it does. + * + * Results: + * Returns a standard Tcl result. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +PrefixAllObjCmd( + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int tableObjc, result, t, length, elemLength; + char *string, *elemString; + Tcl_Obj **tableObjv; + Tcl_Obj *resultPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "table string"); + return TCL_ERROR; + } + + result = Tcl_ListObjGetElements(interp, objv[1], &tableObjc, &tableObjv); + if (result != TCL_OK) { + return result; + } + resultPtr = Tcl_NewListObj(0, NULL); + string = Tcl_GetStringFromObj(objv[2], &length); + + for (t = 0; t < tableObjc; t++) { + elemString = Tcl_GetStringFromObj(tableObjv[t], &elemLength); + + /* + * A prefix cannot match if it is longest. + */ + + if (length <= elemLength) { + if (TclpUtfNcmp2(elemString, string, length) == 0) { + Tcl_ListObjAppendElement(interp, resultPtr, tableObjv[t]); + } + } + } + + Tcl_SetObjResult(interp, resultPtr); + return TCL_OK; +} + +/*---------------------------------------------------------------------- + * + * PrefixLongestObjCmd - + * + * This function implements the 'prefix longest' Tcl command. Refer + * to the user documentation for details on what it does. + * + * Results: + * Returns a standard Tcl result. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +PrefixLongestObjCmd( + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int tableObjc, result, i, t, length, elemLength, resultLength; + char *string, *elemString, *resultString; + Tcl_Obj **tableObjv; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "table string"); + return TCL_ERROR; + } + + result = Tcl_ListObjGetElements(interp, objv[1], &tableObjc, &tableObjv); + if (result != TCL_OK) { + return result; + } + string = Tcl_GetStringFromObj(objv[2], &length); + + resultString = NULL; + resultLength = 0; + + for (t = 0; t < tableObjc; t++) { + elemString = Tcl_GetStringFromObj(tableObjv[t], &elemLength); + + /* + * First check if the prefix string matches the element. + * A prefix cannot match if it is longest. + */ + + if ((length > elemLength) || + TclpUtfNcmp2(elemString, string, length) != 0) { + continue; + } + + if (resultString == NULL) { + /* + * If this is the first match, the longest common substring this + * far is the complete string. The result is part of this string + * so we only need to adjust the length later. + */ + + resultString = elemString; + resultLength = elemLength; + } else { + /* + * Longest common substring cannot be longer than shortest + * string. + */ + + if (elemLength < resultLength) { + resultLength = elemLength; + } + + /* + * Compare strings. + */ + + for (i = 0; i < resultLength; i++) { + if (resultString[i] != elemString[i]) { + /* + * Adjust in case we stopped in the middle of a UTF char. + */ + + resultLength = Tcl_UtfPrev(&resultString[i+1], + resultString) - resultString; + break; + } + } + } + } + if (resultLength > 0) { + Tcl_SetObjResult(interp, Tcl_NewStringObj(resultString, resultLength)); + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_WrongNumArgs -- * * This function generates a "wrong # args" error message in an diff --git a/generic/tclInt.h b/generic/tclInt.h index cbb66b7..4704927 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.400 2008/09/28 13:46:11 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.401 2008/10/03 00:01:35 dkf Exp $ */ #ifndef _TCLINT @@ -3035,6 +3035,7 @@ MODULE_SCOPE int Tcl_PackageObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_PidObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE Tcl_Command TclInitPrefixCmd(Tcl_Interp *interp); MODULE_SCOPE int Tcl_PutsObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/tests/string.test b/tests/string.test index c2ddfc8..27537d4 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.74 2008/09/29 08:20:38 dkf Exp $ +# RCS: @(#) $Id: string.test,v 1.75 2008/10/03 00:01:35 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -24,6 +24,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint testobj [expr {[info commands testobj] != {}}] testConstraint testindexobj [expr {[info commands testindexobj] != {}}] +# Used for constraining memory leak tests +testConstraint memory [llength [info commands memory]] + test string-1.1 {error conditions} { list [catch {string gorp a b} msg] $msg } {1 {unknown or ambiguous subcommand "gorp": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} @@ -1667,7 +1670,204 @@ test string-25.14 {string is list} { list [string is list -failindex x "\uabcd {b c}d e"] $x } {0 2} +test string-26.1 {tcl::prefix, too few args} -body { + tcl::prefix match a +} -returnCodes 1 -result {wrong # args: should be "tcl::prefix match ?options? table string"} +test string-26.2 {tcl::prefix, bad args} -body { + tcl::prefix match a b c +} -returnCodes 1 -result {bad option "a": must be -error, -exact, or -message} +test string-26.3 {tcl::prefix, bad args} -body { + tcl::prefix match -error "{}x" -exact str1 str2 +} -returnCodes 1 -result {list element in braces followed by "x" instead of space} +test string-26.3 {tcl::prefix, bad args} -body { + tcl::prefix match -error "x" -exact str1 str2 +} -returnCodes 1 -result {error options must have an even number of elements} +test string-26.3 {tcl::prefix, bad args} -body { + tcl::prefix match -error str1 str2 +} -returnCodes 1 -result {missing error options} +test string-26.4 {tcl::prefix, bad args} -body { + tcl::prefix match -message str1 str2 +} -returnCodes 1 -result {missing message} +test string-26.5 {tcl::prefix} { + tcl::prefix match {apa bepa cepa depa} cepa +} cepa +test string-26.6 {tcl::prefix} { + tcl::prefix match {apa bepa cepa depa} be +} bepa +test string-26.7 {tcl::prefix} -body { + tcl::prefix match -exact {apa bepa cepa depa} be +} -returnCodes 1 -result {bad option "be": must be apa, bepa, cepa, or depa} +test string-26.8 {tcl::prefix} -body { + tcl::prefix match -message switch {apa bepa bear depa} be +} -returnCodes 1 -result {ambiguous switch "be": must be apa, bepa, bear, or depa} +test string-26.9 {tcl::prefix} -body { + tcl::prefix match -error {} {apa bepa bear depa} be +} -returnCodes 0 -result {} +test string-26.10 {tcl::prefix} -body { + tcl::prefix match -error {-level 1} {apa bepa bear depa} be +} -returnCodes 2 -result {ambiguous option "be": must be apa, bepa, bear, or depa} +test string-26.10 {tcl::prefix} -setup { + proc _testprefix {args} { + array set opts {-a x -b y -c y} + foreach {opt val} $args { + set opt [tcl::prefix match -error {-level 1} {-a -b -c} $opt] + set opts($opt) $val + } + array get opts + } +} -body { + set a [catch {_testprefix -x u} result options] + dict get $options -errorinfo +} -cleanup { + rename _testprefix {} +} -result {bad option "-x": must be -a, -b, or -c + while executing +"_testprefix -x u"} + +# Helper for memory stress tests +# Repeat each body in a local space checking that memory does not increase +proc MemStress {args} { + set res {} + foreach body $args { + set end 0 + for {set i 0} {$i < 5} {incr i} { + proc MemStress_Body {} $body + uplevel 1 MemStress_Body + rename MemStress_Body {} + set tmp $end + set end [lindex [lindex [split [memory info] "\n"] 3] 3] + } + lappend res [expr {$end - $tmp}] + } + return $res +} + +test string-26.11 {tcl::prefix: testing for leaks} -body { + # This test is made to stress object reference management + MemStress { + set table {hejj miff gurk} + set item [lindex $table 1] + # If not careful, this can cause a circular reference + # that will cause a leak. + tcl::prefix match $table $item + } { + # A similar case with nested lists + set table2 {hejj {miff maff} gurk} + set item [lindex [lindex $table2 1] 0] + tcl::prefix match $table2 $item + } { + # A similar case with dict + set table3 {hejj {miff maff} gurk2} + set item [lindex [dict keys [lindex $table3 1]] 0] + tcl::prefix match $table3 $item + } +} -constraints memory -result {0 0 0} + +test string-26.12 {tcl::prefix: testing for leaks} -body { + # This is a memory leak test in a form that might actually happen + # in real code. The shared literal "miff" causes a connection + # between the item and the table. + MemStress { + proc stress1 {item} { + set table [list hejj miff gurk] + tcl::prefix match $table $item + } + proc stress2 {} { + stress1 miff + } + stress2 + rename stress1 {} + rename stress2 {} + } +} -constraints memory -result 0 + +test string-26.13 {tcl::prefix: testing for leaks} -body { + # This test is made to stress object reference management + MemStress { + set table [list hejj miff] + set item $table + set error $table + # Use the same objects in all places + catch { + tcl::prefix match -error $error $table $item + } + } +} -constraints memory -result {0} + +test string-27.1 {tcl::prefix all, too few args} -body { + tcl::prefix all a +} -returnCodes 1 -result {wrong # args: should be "tcl::prefix all table string"} +test string-27.2 {tcl::prefix all, bad args} -body { + tcl::prefix all a b c +} -returnCodes 1 -result {wrong # args: should be "tcl::prefix all table string"} +test string-27.3 {tcl::prefix all, bad args} -body { + tcl::prefix all "{}x" str2 +} -returnCodes 1 -result {list element in braces followed by "x" instead of space} +test string-27.4 {tcl::prefix all} { + tcl::prefix all {apa bepa cepa depa} c +} cepa +test string-27.5 {tcl::prefix all} { + tcl::prefix all {apa bepa cepa depa} cepa +} cepa +test string-27.6 {tcl::prefix all} { + tcl::prefix all {apa bepa cepa depa} cepax +} {} +test string-27.7 {tcl::prefix all} { + tcl::prefix all {apa aska appa} a +} {apa aska appa} +test string-27.8 {tcl::prefix all} { + tcl::prefix all {apa aska appa} ap +} {apa appa} +test string-27.9 {tcl::prefix all} { + tcl::prefix all {apa aska appa} p +} {} +test string-27.10 {tcl::prefix all} { + tcl::prefix all {apa aska appa} {} +} {apa aska appa} + +test string-28.1 {tcl::prefix longest, too few args} -body { + tcl::prefix longest a +} -returnCodes 1 -result {wrong # args: should be "tcl::prefix longest table string"} +test string-28.2 {tcl::prefix longest, bad args} -body { + tcl::prefix longest a b c +} -returnCodes 1 -result {wrong # args: should be "tcl::prefix longest table string"} +test string-28.3 {tcl::prefix longest, bad args} -body { + tcl::prefix longest "{}x" str2 +} -returnCodes 1 -result {list element in braces followed by "x" instead of space} +test string-28.4 {tcl::prefix longest} { + tcl::prefix longest {apa bepa cepa depa} c +} cepa +test string-28.5 {tcl::prefix longest} { + tcl::prefix longest {apa bepa cepa depa} cepa +} cepa +test string-28.6 {tcl::prefix longest} { + tcl::prefix longest {apa bepa cepa depa} cepax +} {} +test string-28.7 {tcl::prefix longest} { + tcl::prefix longest {apa aska appa} a +} a +test string-28.8 {tcl::prefix longest} { + tcl::prefix longest {apa aska appa} ap +} ap +test string-28.9 {tcl::prefix longest} { + tcl::prefix longest {apa bska appa} a +} ap +test string-28.10 {tcl::prefix longest} { + tcl::prefix longest {apa bska appa} {} +} {} +test string-28.11 {tcl::prefix longest} { + tcl::prefix longest {{} bska appa} {} +} {} +test string-28.12 {tcl::prefix longest} { + tcl::prefix longest {apa {} appa} {} +} {} +test string-28.13 {tcl::prefix longest} { + # Test UTF8 handling + tcl::prefix longest {ax\x90 bep ax\x91} a +} ax + # cleanup +rename MemStress {} ::tcltest::cleanupTests return -- cgit v0.12 From ea92bd3066f8e943efaaf49aa1482cb2520f06f1 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 3 Oct 2008 00:05:22 +0000 Subject: typo --- generic/tcl.decls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index a8bd083..03bde78 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.146 2008/10/02 23:32:13 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.147 2008/10/03 00:05:22 dkf Exp $ library tcl @@ -2200,7 +2200,7 @@ declare 603 generic { # TIP#265 (option parser) declare 604 generic { int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, - int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv); + int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv) } ############################################################################## -- cgit v0.12 From 1037681faceac7ffe7d44b096a1f52ffa1652bc4 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 3 Oct 2008 00:07:55 +0000 Subject: typofix --- generic/tclIndexObj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 2d29adf..4810933 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.40 2008/10/03 00:01:35 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.41 2008/10/03 00:07:55 dkf Exp $ */ #include "tclInt.h" @@ -1234,7 +1234,7 @@ Tcl_ParseArgsObjv( argObj = objv[srcIndex]; } handlerProc = (Tcl_ArgvFuncProc) infoPtr->srcPtr; - if (handlerProc(infoPtr->clientData, infoPtr->dstPtr, argObj)) { + if (handlerProc(infoPtr->clientData, argObj, infoPtr->dstPtr)) { srcIndex++; objc--; } @@ -1244,8 +1244,8 @@ Tcl_ParseArgsObjv( Tcl_ArgvGenFuncProc handlerProc; handlerProc = (Tcl_ArgvGenFuncProc) infoPtr->srcPtr; - objc = handlerProc(infoPtr->clientData, infoPtr->dstPtr, interp, - objc, &objv[srcIndex]); + objc = handlerProc(infoPtr->clientData, interp, objc, + &objv[srcIndex], infoPtr->dstPtr); if (objc < 0) { goto error; } -- cgit v0.12 From da3b75ab19403ebf3dde8622f08de1abb4b9d3d6 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 3 Oct 2008 00:09:43 +0000 Subject: regen again --- generic/tclDecls.h | 17 +++++++++++------ generic/tclStubInit.c | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 6484113..7a1510c 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.148 2008/10/02 23:55:20 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.149 2008/10/03 00:09:43 dkf Exp $ */ #ifndef _TCLDECLS @@ -3649,8 +3649,13 @@ EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); #endif +#ifndef Tcl_ParseArgsObjv_TCL_DECLARED +#define Tcl_ParseArgsObjv_TCL_DECLARED /* 604 */ -EXTERN int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj *** remObjv);; +EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, + const Tcl_ArgvInfo * argTable, int * objcPtr, + Tcl_Obj *const * objv, Tcl_Obj *** remObjv); +#endif typedef struct TclStubHooks { CONST struct TclPlatStubs *tclPlatStubs; @@ -4314,7 +4319,7 @@ typedef struct TclStubs { unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ - int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj *** *remObjv);; /* 604 */ + int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6803,9 +6808,9 @@ extern CONST TclStubs *tclStubsPtr; #define Tcl_GetEnsembleParameterList \ (tclStubsPtr->tcl_GetEnsembleParameterList) /* 603 */ #endif -#ifndef remObjv); -#define remObjv); \ - (*tclStubsPtr->remObjv);) /* 604 */ +#ifndef Tcl_ParseArgsObjv +#define Tcl_ParseArgsObjv \ + (tclStubsPtr->tcl_ParseArgsObjv) /* 604 */ #endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 91a1050..cdc66e7 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.165 2008/10/02 23:55:20 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.166 2008/10/03 00:09:43 dkf Exp $ */ #include "tclInt.h" @@ -1129,7 +1129,7 @@ static const TclStubs tclStubs = { Tcl_GetBlockSizeFromStat, /* 601 */ Tcl_SetEnsembleParameterList, /* 602 */ Tcl_GetEnsembleParameterList, /* 603 */ - &remObjv);, /* 604 */ + Tcl_ParseArgsObjv, /* 604 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 4efd75764dae30c0292b4fb4dc00aa2f9b2993e4 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 3 Oct 2008 08:13:14 +0000 Subject: Tidying up formatting --- generic/tclIndexObj.c | 146 +++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 4810933..ce5ba81 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.41 2008/10/03 00:07:55 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.42 2008/10/03 08:13:14 dkf Exp $ */ #include "tclInt.h" @@ -435,7 +435,7 @@ UpdateStringOfIndex( register char *buf; register unsigned len; register const char *indexStr = EXPAND_OF(indexRep); - + len = strlen(indexStr); buf = (char *) ckalloc(len + 1); memcpy(buf, indexStr, len+1); @@ -531,10 +531,10 @@ TclInitPrefixCmd( /*---------------------------------------------------------------------- * - * PrefixMatchObjCmd - + * PrefixMatchObjCmd -- * - * This function implements the 'prefix match' Tcl command. Refer - * to the user documentation for details on what it does. + * This function implements the 'prefix match' Tcl command. Refer to the + * user documentation for details on what it does. * * Results: * Returns a standard Tcl result. @@ -547,10 +547,10 @@ TclInitPrefixCmd( static int PrefixMatchObjCmd( - ClientData clientData, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int flags = 0, result, index; int dummyLength, i, errorLength; @@ -558,11 +558,11 @@ PrefixMatchObjCmd( char *message = "option"; Tcl_Obj *tablePtr, *objPtr, *resultPtr; static const char *matchOptions[] = { - "-error", "-exact", "-message", (char *) NULL + "-error", "-exact", "-message", NULL }; enum matchOptions { PRFMATCH_ERROR, PRFMATCH_EXACT, PRFMATCH_MESSAGE - }; + }; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "?options? table string"); @@ -571,46 +571,47 @@ PrefixMatchObjCmd( for (i = 1; i < (objc - 2); i++) { if (Tcl_GetIndexFromObj(interp, objv[i], matchOptions, "option", 0, - &index) != TCL_OK) { + &index) != TCL_OK) { return TCL_ERROR; } switch ((enum matchOptions) index) { - case PRFMATCH_EXACT: - flags |= TCL_EXACT; - break; - case PRFMATCH_MESSAGE: - if (i > (objc - 4)) { - Tcl_AppendResult(interp, "missing message", NULL); - return TCL_ERROR; - } - i++; - message = Tcl_GetString(objv[i]); - break; - case PRFMATCH_ERROR: - if (i > (objc - 4)) { - Tcl_AppendResult(interp, "missing error options", NULL); - return TCL_ERROR; - } - i++; - result = Tcl_ListObjLength(interp, objv[i], &errorLength); - if (result != TCL_OK) { - return TCL_ERROR; - } - if ((errorLength % 2) != 0) { - Tcl_AppendResult(interp, "error options must have an even number of elements", NULL); - return TCL_ERROR; - } - errorPtr = objv[i]; - break; + case PRFMATCH_EXACT: + flags |= TCL_EXACT; + break; + case PRFMATCH_MESSAGE: + if (i > (objc - 4)) { + Tcl_AppendResult(interp, "missing message", NULL); + return TCL_ERROR; + } + i++; + message = Tcl_GetString(objv[i]); + break; + case PRFMATCH_ERROR: + if (i > (objc - 4)) { + Tcl_AppendResult(interp, "missing error options", NULL); + return TCL_ERROR; + } + i++; + result = Tcl_ListObjLength(interp, objv[i], &errorLength); + if (result != TCL_OK) { + return TCL_ERROR; + } + if ((errorLength % 2) != 0) { + Tcl_AppendResult(interp, "error options must have an even" + " number of elements", NULL); + return TCL_ERROR; + } + errorPtr = objv[i]; + break; } } - tablePtr = objv[objc-2]; - objPtr = objv[objc-1]; + tablePtr = objv[objc - 2]; + objPtr = objv[objc - 1]; /* - * Check that table is a valid list first, since we want to handle - * that error case regardless of level. + * Check that table is a valid list first, since we want to handle that + * error case regardless of level. */ result = Tcl_ListObjLength(interp, tablePtr, &dummyLength); @@ -626,16 +627,16 @@ PrefixMatchObjCmd( return TCL_OK; } else if (errorPtr == NULL) { return TCL_ERROR; - } else { - if (Tcl_IsShared(errorPtr)) { - errorPtr = Tcl_DuplicateObj(errorPtr); - } - Tcl_ListObjAppendElement(interp, errorPtr, - Tcl_NewStringObj("-code", 5)); - Tcl_ListObjAppendElement(interp, errorPtr, Tcl_NewIntObj(result)); + } - return Tcl_SetReturnOptions(interp, errorPtr); + if (Tcl_IsShared(errorPtr)) { + errorPtr = Tcl_DuplicateObj(errorPtr); } + Tcl_ListObjAppendElement(interp, errorPtr, + Tcl_NewStringObj("-code", 5)); + Tcl_ListObjAppendElement(interp, errorPtr, Tcl_NewIntObj(result)); + + return Tcl_SetReturnOptions(interp, errorPtr); } result = Tcl_ListObjIndex(interp, tablePtr, index, &resultPtr); @@ -648,10 +649,10 @@ PrefixMatchObjCmd( /*---------------------------------------------------------------------- * - * PrefixAllObjCmd - + * PrefixAllObjCmd -- * - * This function implements the 'prefix all' Tcl command. Refer - * to the user documentation for details on what it does. + * This function implements the 'prefix all' Tcl command. Refer to the + * user documentation for details on what it does. * * Results: * Returns a standard Tcl result. @@ -664,15 +665,14 @@ PrefixMatchObjCmd( static int PrefixAllObjCmd( - ClientData clientData, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int tableObjc, result, t, length, elemLength; char *string, *elemString; - Tcl_Obj **tableObjv; - Tcl_Obj *resultPtr; + Tcl_Obj **tableObjv, *resultPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "table string"); @@ -706,10 +706,10 @@ PrefixAllObjCmd( /*---------------------------------------------------------------------- * - * PrefixLongestObjCmd - + * PrefixLongestObjCmd -- * - * This function implements the 'prefix longest' Tcl command. Refer - * to the user documentation for details on what it does. + * This function implements the 'prefix longest' Tcl command. Refer to + * the user documentation for details on what it does. * * Results: * Returns a standard Tcl result. @@ -722,10 +722,10 @@ PrefixAllObjCmd( static int PrefixLongestObjCmd( - ClientData clientData, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + ClientData clientData, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int tableObjc, result, i, t, length, elemLength, resultLength; char *string, *elemString, *resultString; @@ -749,8 +749,8 @@ PrefixLongestObjCmd( elemString = Tcl_GetStringFromObj(tableObjv[t], &elemLength); /* - * First check if the prefix string matches the element. - * A prefix cannot match if it is longest. + * First check if the prefix string matches the element. A prefix + * cannot match if it is longest. */ if ((length > elemLength) || @@ -761,7 +761,7 @@ PrefixLongestObjCmd( if (resultString == NULL) { /* * If this is the first match, the longest common substring this - * far is the complete string. The result is part of this string + * far is the complete string. The result is part of this string * so we only need to adjust the length later. */ @@ -769,8 +769,7 @@ PrefixLongestObjCmd( resultLength = elemLength; } else { /* - * Longest common substring cannot be longer than shortest - * string. + * Longest common substring cannot be longer than shortest string. */ if (elemLength < resultLength) { @@ -795,7 +794,8 @@ PrefixLongestObjCmd( } } if (resultLength > 0) { - Tcl_SetObjResult(interp, Tcl_NewStringObj(resultString, resultLength)); + Tcl_SetObjResult(interp, + Tcl_NewStringObj(resultString, resultLength)); } return TCL_OK; } -- cgit v0.12 From 82c993bd34c03e6c0d9e836e89a94cd48c01876a Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 3 Oct 2008 13:24:45 +0000 Subject: minor corrections --- doc/prefix.n | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/doc/prefix.n b/doc/prefix.n index 02bd8ce..f72c4be 100644 --- a/doc/prefix.n +++ b/doc/prefix.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: prefix.n,v 1.1 2008/10/03 00:01:35 dkf Exp $ +'\" RCS: @(#) $Id: prefix.n,v 1.2 2008/10/03 13:24:45 dkf Exp $ '\" .so man.macros .TH prefix n 8.6 Tcl "Tcl Built-In Commands" @@ -34,7 +34,7 @@ begins with the prefix \fIstring\fR. \fB::tcl::prefix match\fR ?\fIoptions\fR? \fItable\fR \fIstring\fR If \fIstring\fR equals one element in \fItable\fR or is a prefix to exactly one element, the matched element is returned. If not, the result depends -on the -error option. +on the \fB\-error\fR option. .TP 20 \fB\-exact\fR . @@ -46,12 +46,18 @@ Use \fIstring\fR in the error message at a mismatch. Default is "option". .TP 20 \fB\-error\0\fIoptions\fR . -The \fIoptions\fR are used when no match is found. -If \fIoptions\fR is empty, no error is generated and an empty string is returned. -Otherwise the \fIoptions\fR are used as \fBreturn\fR options when generating -the error message. The default corresponds to setting "-level 0". -Example: If \fB-error\fR "-errorcode MyError -level 1" is used, an error would -be generated as [return -errorcode MyError -level 1 -code error "ErrMsg"]. +The \fIoptions\fR are used when no match is found. If \fIoptions\fR is empty, +no error is generated and an empty string is returned. Otherwise the +\fIoptions\fR are used as \fBreturn\fR options when generating the error +message. The default corresponds to setting +.QW "\-level 0" . +Example: If \fB\-error\fR "\-errorcode MyError \-level 1" is used, an +error would be generated as: +.RS +.CS +return \-errorcode MyError \-level 1 \-code error "ErrMsg" +.CE +.RE .SH "EXAMPLES" .PP Basic use: @@ -61,9 +67,9 @@ namespace import ::tcl::prefix \fI\(-> apa\fR \fBprefix match\fR {apa bepa cepa} a \fI\(-> apa\fR -\fBprefix match\fR -exact {apa bepa cepa} a +\fBprefix match\fR \-exact {apa bepa cepa} a \fI\(-> bad option "a": must be apa, bepa, or cepa\fR -\fBprefix match\fR -message "switch" {apa ada bepa cepa} a +\fBprefix match\fR \-message "switch" {apa ada bepa cepa} a \fI\(-> ambiguous switch "a": must be apa, ada, bepa, or cepa\fR \fBprefix longest\fR {fblocked fconfigure fcopy file fileevent flush} fc \fI\(-> fco\fR @@ -73,9 +79,9 @@ namespace import ::tcl::prefix .PP Simplifying option matching: .CS -array set opts {-apa 1 -bepa "" -cepa 0} +array set opts {\-apa 1 \-bepa "" \-cepa 0} foreach {arg val} $args { - set opts([prefix match {-apa -bepa -cepa} $arg]) $val + set opts([prefix match {\-apa \-bepa \-cepa} $arg]) $val } .CE .PP @@ -91,3 +97,6 @@ switch [prefix match {apa bepa cepa} $arg] { lsearch(n) .SH "KEYWORDS" prefix +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 0f137db1b0ce02080631bf6fe5a86368df112ec4 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 3 Oct 2008 19:20:24 +0000 Subject: * tests/stack.test: * unix/tclUnixTest.c: removed test command teststacklimit and the corresponding constraint: it is not needed with NRE --- ChangeLog | 6 +++++ tests/stack.test | 52 +++++------------------------------------- unix/tclUnixTest.c | 66 +----------------------------------------------------- 3 files changed, 13 insertions(+), 111 deletions(-) diff --git a/ChangeLog b/ChangeLog index f30ca11..f83f5d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-03 Miguel Sofer + + * tests/stack.test: + * unix/tclUnixTest.c: removed test command teststacklimit and the + corresponding constraint: it is not needed with NRE + 2008-10-03 Donal K. Fellows TIP #195 IMPLEMENTATION diff --git a/tests/stack.test b/tests/stack.test index 7d7f816..da587b5 100644 --- a/tests/stack.test +++ b/tests/stack.test @@ -9,72 +9,32 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stack.test,v 1.24 2008/07/16 00:44:44 msofer Exp $ +# RCS: @(#) $Id: stack.test,v 1.25 2008/10/03 19:20:24 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* } -# Note that a failure in this test results in a crash of the executable. -# In order to avoid that, we do a basic check of the current stacksize. -# This size can be changed with ulimit (ksh/bash/sh) or limit (csh/tcsh). +# Note that a failure in this test may result in a crash of the executable. -# This doesn't catch all cases, for example threads of lower stacksize -# can still squeak through. A core check is really needed. -- JH - -testConstraint minStack2400 1 -testConstraint teststacklimit [llength [info commands teststacklimit]] - -if {[testConstraint unix]} { - if {[testConstraint teststacklimit]} { - set stackSize [teststacklimit] - } else { - set stackSize [exec /bin/sh -c "ulimit -s"] - } - if {($stackSize > -1) && ($stackSize < 2400)} { - puts stderr "WARNING: the default application stacksize of $stackSize\ - may cause Tcl to\ncrash due to stack overflow before the\ - recursion limit is reached.\nA minimum stacksize of 2400\ - kbytes is recommended.\nSkipping infinite recursion test." - testConstraint minStack2400 0 - } -} - -# -# Custom match to detect a stack overflow independently of the mechanism that -# triggered the error. -# - -customMatch stackOverflow StackOverflow -proc StackOverflow {- res} { - set msgList [list \ - "too many nested evaluations (infinite loop?)"\ - "out of stack space (infinite loop?)"] - expr {$res in $msgList} -} - -test stack-1.1 {maxNestingDepth reached on infinite recursion} -constraints { - minStack2400 -} -body { +test stack-1.1 {maxNestingDepth reached on infinite recursion} -body { # do this in a sub process in case it segfaults exec [interpreter] << { proc recurse {} { recurse } catch { recurse } rv puts $rv } -} -match stackOverflow +} -result {too many nested evaluations (infinite loop?)} -test stack-2.1 {maxNestingDepth reached on infinite recursion} -constraints { - minStack2400 -} -body { +test stack-2.1 {maxNestingDepth reached on infinite recursion} -body { # do this in a sub process in case it segfaults exec [interpreter] << { interp alias {} unknown {} notaknownproc catch { unknown } msg puts $msg } -} -match stackOverflow +} -result {too many nested evaluations (infinite loop?)} # Make sure that there is enough stack to run regexp even if we're # close to the recursion limit. [Bug 947070] [Patch 746378] diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index 0e4c4b6..469e00a 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.28 2008/07/13 09:03:41 msofer Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.29 2008/10/03 19:20:24 msofer Exp $ */ #include "tclInt.h" @@ -82,8 +82,6 @@ static int TestgotsigCmd(ClientData dummy, static void AlarmHandler(int signum); static int TestchmodCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); -static int TeststacklimitCmd(ClientData dummy, - Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- @@ -124,69 +122,7 @@ TclplatformtestInit( (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testgotsig", TestgotsigCmd, (ClientData) 0, NULL); - Tcl_CreateObjCommand(interp, "teststacklimit", TeststacklimitCmd, - (ClientData) 0, NULL); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TeststacklimitCmd -- - * - * This function implements the "teststacklimit" command. When called - * with no arguments is sets the interp result to the current stack - * limit. When called with an integer argument it will set the stack size - * to the requested number (or the hard limit if it is smaller) and set - * the interp's result to the stack size prevalent before the change. - * Stack sizes are expressed in kB, as in 'ulimit'. - * - * A size of -1 means "unlimited". - * - * Results: - * A standard Tcl result. - * - * Side effects: - * May change the C stack size limit. - * - *---------------------------------------------------------------------- - */ - -static int -TeststacklimitCmd( - ClientData dummy, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ -#define STACK_SCALE 1024 - struct rlimit rlim; - int prev_limit, new_limit, result; - - if (objc > 2) { - Tcl_WrongNumArgs(interp, 1, objv, " ?limit?\""); - return TCL_ERROR; - } - - getrlimit(RLIMIT_STACK, &rlim); - prev_limit = ((rlim.rlim_cur == RLIM_INFINITY) - ? -1 - : (int) (rlim.rlim_cur/STACK_SCALE)); - - if (objc == 2) { - result = Tcl_GetIntFromObj(interp, objv[1], &new_limit); - if (result != TCL_OK) { - return result; - } - rlim.rlim_cur = ((new_limit == -1) - ? RLIM_INFINITY - : STACK_SCALE * (rlim_t) new_limit); - setrlimit(RLIMIT_STACK, &rlim); - } - - Tcl_SetObjResult(interp, Tcl_NewIntObj(prev_limit)); return TCL_OK; -#undef STACK_SCALE } /* -- cgit v0.12 From 67aa8715c3ab84a6c636b90a48b5a565c1dcc162 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 4 Oct 2008 11:04:42 +0000 Subject: * doc/GetIndex.3: CONSTified the tablePtr argument * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. --- ChangeLog | 9 +++++++++ doc/GetIndex.3 | 4 ++-- generic/tcl.decls | 4 ++-- generic/tclDecls.h | 7 ++++--- generic/tclIndexObj.c | 6 +++--- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f83f5d2..79d990f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-10-4 Jan Nijtmans + + * doc/GetIndex.3: CONSTified the tablePtr argument + * generic/tcl.decls: of Tcl_GetIndexFromObj. + * generic/tclIndexObj.c + * ChangeLog + * generic/tclDecls.h: regenerated + This change complies with TIP #27. + 2008-10-03 Miguel Sofer * tests/stack.test: diff --git a/doc/GetIndex.3 b/doc/GetIndex.3 index 7a9f746..c0cf623 100644 --- a/doc/GetIndex.3 +++ b/doc/GetIndex.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetIndex.3,v 1.22 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: GetIndex.3,v 1.23 2008/10/04 11:04:42 nijtmans Exp $ '\" .so man.macros .TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures" @@ -31,7 +31,7 @@ provided on errors. The string value of this object is used to search through \fItablePtr\fR. The internal representation is modified to hold the index of the matching table entry. -.AP "const char" **tablePtr in +.AP "const char *const" *tablePtr in An array of null-terminated strings. The end of the array is marked by a NULL string pointer. .AP "const void" *structTablePtr in diff --git a/generic/tcl.decls b/generic/tcl.decls index 03bde78..8f9f46a 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.147 2008/10/03 00:05:22 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.148 2008/10/04 11:04:43 nijtmans Exp $ library tcl @@ -155,7 +155,7 @@ declare 35 generic { } declare 36 generic { int Tcl_GetIndexFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - CONST84 char **tablePtr, CONST char *msg, int flags, int *indexPtr) + CONST84 char *CONST *tablePtr, CONST char *msg, int flags, int *indexPtr) } declare 37 generic { int Tcl_GetInt(Tcl_Interp *interp, CONST char *src, int *intPtr) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 7a1510c..f015e4c 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.149 2008/10/03 00:09:43 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.150 2008/10/04 11:04:43 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -266,7 +266,8 @@ EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, #define Tcl_GetIndexFromObj_TCL_DECLARED /* 36 */ EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST84 char ** tablePtr, + Tcl_Obj * objPtr, + CONST84 char *CONST * tablePtr, CONST char * msg, int flags, int * indexPtr); #endif #ifndef Tcl_GetInt_TCL_DECLARED @@ -3719,7 +3720,7 @@ typedef struct TclStubs { unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *CONST * tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index ce5ba81..91b9e3d 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.42 2008/10/03 08:13:14 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.43 2008/10/04 11:04:43 nijtmans Exp $ */ #include "tclInt.h" @@ -104,7 +104,7 @@ int Tcl_GetIndexFromObj( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ - const char **tablePtr, /* Array of strings to compare against the + const char *const*tablePtr, /* Array of strings to compare against the * value of objPtr; last entry must be NULL * and there must not be duplicate entries. */ const char *msg, /* Identifying word to use in error @@ -557,7 +557,7 @@ PrefixMatchObjCmd( Tcl_Obj *errorPtr = NULL; char *message = "option"; Tcl_Obj *tablePtr, *objPtr, *resultPtr; - static const char *matchOptions[] = { + static const char *const matchOptions[] = { "-error", "-exact", "-message", NULL }; enum matchOptions { -- cgit v0.12 From cf24f0cc5f58ca91c49d46e631feeaf536162fb0 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 4 Oct 2008 11:34:19 +0000 Subject: * doc/RegConfig.3: CONSTified the configuration argument * generic/tcl.decls: of Tcl_RegisterConfig. * generic/tclConfig.c * generic/tclPkgConfig.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. --- ChangeLog | 10 ++++++++++ doc/RegConfig.3 | 4 ++-- generic/tcl.decls | 4 ++-- generic/tclConfig.c | 4 ++-- generic/tclDecls.h | 6 +++--- generic/tclPkgConfig.c | 4 ++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79d990f..0c6ad63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2008-10-4 Jan Nijtmans + * doc/RegConfig.3: CONSTified the configuration argument + * generic/tcl.decls: of Tcl_RegisterConfig. + * generic/tclConfig.c + * generic/tclPkgConfig.c + * ChangeLog + * generic/tclDecls.h: regenerated + This change complies with TIP #27. + +2008-10-4 Jan Nijtmans + * doc/GetIndex.3: CONSTified the tablePtr argument * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c diff --git a/doc/RegConfig.3 b/doc/RegConfig.3 index 51d4df2..19a7c7a 100644 --- a/doc/RegConfig.3 +++ b/doc/RegConfig.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: RegConfig.3,v 1.10 2008/08/27 20:29:48 dgp Exp $ +'\" RCS: @(#) $Id: RegConfig.3,v 1.11 2008/10/04 11:34:19 nijtmans Exp $ .so man.macros .TH Tcl_RegisterConfig 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -27,7 +27,7 @@ registered for. Must not be NULL. Contains the name of the package registering the embedded configuration as ASCII string. This means that this information is in UTF-8 too. Must not be NULL. -.AP Tcl_Config *configuration in +.AP "const Tcl_Config" *configuration in Refers to an array of Tcl_Config entries containing the information embedded in the binary library. Must not be NULL. The end of the array is signaled by either a key identical to NULL, or a key referring to diff --git a/generic/tcl.decls b/generic/tcl.decls index 8f9f46a..adcd936 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.148 2008/10/04 11:04:43 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.149 2008/10/04 11:34:19 nijtmans Exp $ library tcl @@ -1804,7 +1804,7 @@ declare 504 generic { # New export due to TIP#59 declare 505 generic { void Tcl_RegisterConfig(Tcl_Interp* interp, CONST char* pkgName, - Tcl_Config* configuration, CONST char* valEncoding) + CONST Tcl_Config* configuration, CONST char* valEncoding) } # Transferred from tclInt.decls due to TIP #139 diff --git a/generic/tclConfig.c b/generic/tclConfig.c index e0ee15a..2380430 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.22 2008/08/07 22:29:09 nijtmans Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.23 2008/10/04 11:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -73,7 +73,7 @@ Tcl_RegisterConfig( const char *pkgName, /* Name of the package registering the * embedded configuration. ASCII, thus in * UTF-8 too. */ - Tcl_Config *configuration, /* Embedded configuration. */ + const Tcl_Config *configuration, /* Embedded configuration. */ const char *valEncoding) /* Name of the encoding used to store the * configuration values, ASCII, thus UTF-8. */ { diff --git a/generic/tclDecls.h b/generic/tclDecls.h index f015e4c..68c220c 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.150 2008/10/04 11:04:43 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.151 2008/10/04 11:34:20 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -3063,7 +3063,7 @@ EXTERN Tcl_Obj * Tcl_DbNewDictObj (CONST char * file, int line); /* 505 */ EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, CONST char* pkgName, - Tcl_Config* configuration, + CONST Tcl_Config* configuration, CONST char* valEncoding); #endif #ifndef Tcl_CreateNamespace_TCL_DECLARED @@ -4221,7 +4221,7 @@ typedef struct TclStubs { int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv); /* 502 */ Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ Tcl_Obj * (*tcl_DbNewDictObj) (CONST char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ + void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, CONST Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ diff --git a/generic/tclPkgConfig.c b/generic/tclPkgConfig.c index 10ddc58..72a9b6b 100644 --- a/generic/tclPkgConfig.c +++ b/generic/tclPkgConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkgConfig.c,v 1.4 2005/11/07 15:14:09 dkf Exp $ + * RCS: @(#) $Id: tclPkgConfig.c,v 1.5 2008/10/04 11:34:19 nijtmans Exp $ */ /* Note, the definitions in this module are influenced by the following C @@ -90,7 +90,7 @@ # define CFG_PROFILED "0" #endif -static Tcl_Config cfg[] = { +static Tcl_Config const cfg[] = { {"debug", CFG_DEBUG}, {"threaded", CFG_THREADED}, {"profiled", CFG_PROFILED}, -- cgit v0.12 From 138d8b6e8ee88d292411bb993f613805dd975e07 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 4 Oct 2008 11:51:25 +0000 Subject: * doc/Hash.3: CONSTified the typePtr argument * generic/tcl.decls: of Tcl_InitCustomHashTable. * generic/tcl.h * generic/tclHash.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. --- ChangeLog | 8 ++++---- doc/Hash.3 | 4 ++-- generic/tcl.decls | 4 ++-- generic/tcl.h | 4 ++-- generic/tclDecls.h | 6 +++--- generic/tclHash.c | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c6ad63..8c71580 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,9 @@ 2008-10-4 Jan Nijtmans - * doc/RegConfig.3: CONSTified the configuration argument - * generic/tcl.decls: of Tcl_RegisterConfig. - * generic/tclConfig.c - * generic/tclPkgConfig.c + * doc/Hash.3: CONSTified the typePtr argument + * generic/tcl.decls: of Tcl_InitCustomHashTable. + * generic/tcl.h + * generic/tclHash.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. diff --git a/doc/Hash.3 b/doc/Hash.3 index 10d0d63..9ed9c1b 100644 --- a/doc/Hash.3 +++ b/doc/Hash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Hash.3,v 1.27 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Hash.3,v 1.28 2008/10/04 11:51:25 nijtmans Exp $ '\" .so man.macros .TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures" @@ -49,7 +49,7 @@ Tcl_HashEntry * const char * \fBTcl_HashStats\fR(\fItablePtr\fR) .SH ARGUMENTS -.AS Tcl_HashKeyType *searchPtr out +.AS "const Tcl_HashKeyType" *searchPtr out .AP Tcl_HashTable *tablePtr in Address of hash table structure (for all procedures but \fBTcl_InitHashTable\fR, this must have been initialized by diff --git a/generic/tcl.decls b/generic/tcl.decls index adcd936..335d09a 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.149 2008/10/04 11:34:19 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.150 2008/10/04 11:51:25 nijtmans Exp $ library tcl @@ -1503,7 +1503,7 @@ declare 422 generic { } declare 423 generic { void Tcl_InitCustomHashTable(Tcl_HashTable *tablePtr, int keyType, - Tcl_HashKeyType *typePtr) + CONST Tcl_HashKeyType *typePtr) } declare 424 generic { void Tcl_InitObjHashTable(Tcl_HashTable *tablePtr) diff --git a/generic/tcl.h b/generic/tcl.h index d7b5ec7..90b9d75 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.272 2008/10/02 23:32:13 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.273 2008/10/04 11:51:25 nijtmans Exp $ */ #ifndef _TCL @@ -1236,7 +1236,7 @@ struct Tcl_HashTable { Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, CONST char *key); Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, CONST char *key, int *newPtr); - Tcl_HashKeyType *typePtr; /* Type of the keys used in the + const Tcl_HashKeyType *typePtr; /* Type of the keys used in the * Tcl_HashTable. */ }; diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 68c220c..bf3aa3f 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.151 2008/10/04 11:34:20 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.152 2008/10/04 11:51:25 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -2572,7 +2572,7 @@ EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, #define Tcl_InitCustomHashTable_TCL_DECLARED /* 423 */ EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, - int keyType, Tcl_HashKeyType * typePtr); + int keyType, CONST Tcl_HashKeyType * typePtr); #endif #ifndef Tcl_InitObjHashTable_TCL_DECLARED #define Tcl_InitObjHashTable_TCL_DECLARED @@ -4139,7 +4139,7 @@ typedef struct TclStubs { int (*tcl_UniCharCaseMatch) (CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase); /* 420 */ Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, CONST char * key); /* 421 */ Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, CONST char * key, int * newPtr); /* 422 */ - void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr); /* 423 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, CONST Tcl_HashKeyType * typePtr); /* 423 */ void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ int (*tcl_TraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ diff --git a/generic/tclHash.c b/generic/tclHash.c index b4dd67d..bf1a87a 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.34 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.35 2008/10/04 11:51:25 nijtmans Exp $ */ #include "tclInt.h" @@ -138,7 +138,7 @@ Tcl_InitHashTable( * extended version by a macro. */ - Tcl_InitCustomHashTable(tablePtr, keyType, (Tcl_HashKeyType *) -1); + Tcl_InitCustomHashTable(tablePtr, keyType, (const Tcl_HashKeyType *) -1); } /* @@ -169,7 +169,7 @@ Tcl_InitCustomHashTable( * TCL_STRING_KEYS, TCL_ONE_WORD_KEYS, * TCL_CUSTOM_TYPE_KEYS, TCL_CUSTOM_PTR_KEYS, * or an integer >= 2. */ - Tcl_HashKeyType *typePtr) /* Pointer to structure which defines the + const Tcl_HashKeyType *typePtr) /* Pointer to structure which defines the * behaviour of this table. */ { #if (TCL_SMALL_HASH_TABLE != 4) -- cgit v0.12 From c2c40e8fd014a4c02f7bc7b27aaa7705132a9112 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 4 Oct 2008 12:00:25 +0000 Subject: Clean up result handling, factor out some duplicated code, share objects. --- ChangeLog | 12 ++- generic/tclOOBasic.c | 55 +++++------ generic/tclOOInfo.c | 273 ++++++++++++++++++++++----------------------------- 3 files changed, 152 insertions(+), 188 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c71580..5e772f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ -2008-10-4 Jan Nijtmans +2008-10-04 Donal K. Fellows + + * generic/tclOOInfo.c (GetClassFromObj): Factor out the code to parse + a Tcl_Obj and get a class. Also make result handling hygienic. + * generic/tclOOBasic.c (TclOOSelfObjCmd): Better hygiene of results, + and stop allocating quite so much memory by sharing special "method" + names. + +2008-10-04 Jan Nijtmans * doc/Hash.3: CONSTified the typePtr argument * generic/tcl.decls: of Tcl_InitCustomHashTable. @@ -8,8 +16,6 @@ * generic/tclDecls.h: regenerated This change complies with TIP #27. -2008-10-4 Jan Nijtmans - * doc/GetIndex.3: CONSTified the tablePtr argument * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 2e3868d..2d224dd 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.11 2008/09/26 20:16:39 dgp Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.12 2008/10/04 12:00:25 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -761,9 +761,9 @@ TclOOSelfObjCmd( } case SELF_METHOD: if (contextPtr->callPtr->flags & CONSTRUCTOR) { - Tcl_AppendResult(interp, "", NULL); + Tcl_SetObjResult(interp, contextPtr->oPtr->fPtr->constructorName); } else if (contextPtr->callPtr->flags & DESTRUCTOR) { - Tcl_AppendResult(interp, "", NULL); + Tcl_SetObjResult(interp, contextPtr->oPtr->fPtr->destructorName); } else { Tcl_SetObjResult(interp, CurrentlyInvoked(contextPtr).mPtr->namePtr); @@ -794,11 +794,15 @@ TclOOSelfObjCmd( return TCL_OK; } case SELF_CALLER: - if ((framePtr->callerVarPtr != NULL) && - (framePtr->callerVarPtr->isProcCallFrame & FRAME_IS_METHOD)) { + if ((framePtr->callerVarPtr == NULL) || + !(framePtr->callerVarPtr->isProcCallFrame & FRAME_IS_METHOD)){ + Tcl_AppendResult(interp, "caller is not an object", NULL); + return TCL_ERROR; + } else { CallContext *callerPtr = framePtr->callerVarPtr->clientData; Method *mPtr = callerPtr->callPtr->chain[callerPtr->index].mPtr; Object *declarerPtr; + Tcl_Obj *result[3]; if (mPtr->declaringClassPtr != NULL) { declarerPtr = mPtr->declaringClassPtr->thisPtr; @@ -813,30 +817,24 @@ TclOOSelfObjCmd( return TCL_ERROR; } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - TclOOObjectName(interp, declarerPtr)); - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - TclOOObjectName(interp, callerPtr->oPtr)); + result[0] = TclOOObjectName(interp, declarerPtr); + result[1] = TclOOObjectName(interp, callerPtr->oPtr); if (callerPtr->callPtr->flags & CONSTRUCTOR) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj("", -1)); + result[2] = declarerPtr->fPtr->constructorName; } else if (callerPtr->callPtr->flags & DESTRUCTOR) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj("", -1)); + result[2] = declarerPtr->fPtr->destructorName; } else { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - mPtr->namePtr); + result[2] = mPtr->namePtr; } + Tcl_SetObjResult(interp, Tcl_NewListObj(3, result)); return TCL_OK; - } else { - Tcl_AppendResult(interp, "caller is not an object", NULL); - return TCL_ERROR; } case SELF_NEXT: if (contextPtr->index < contextPtr->callPtr->numChain-1) { Method *mPtr = contextPtr->callPtr->chain[contextPtr->index+1].mPtr; Object *declarerPtr; + Tcl_Obj *result[2]; if (mPtr->declaringClassPtr != NULL) { declarerPtr = mPtr->declaringClassPtr->thisPtr; @@ -851,18 +849,15 @@ TclOOSelfObjCmd( return TCL_ERROR; } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - TclOOObjectName(interp, declarerPtr)); + result[0] = TclOOObjectName(interp, declarerPtr); if (contextPtr->callPtr->flags & CONSTRUCTOR) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj("", -1)); + result[1] = declarerPtr->fPtr->constructorName; } else if (contextPtr->callPtr->flags & DESTRUCTOR) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - Tcl_NewStringObj("", -1)); + result[1] = declarerPtr->fPtr->destructorName; } else { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - mPtr->namePtr); + result[1] = mPtr->namePtr; } + Tcl_SetObjResult(interp, Tcl_NewListObj(2, result)); } return TCL_OK; case SELF_TARGET: @@ -872,6 +867,7 @@ TclOOSelfObjCmd( } else { Method *mPtr; Object *declarerPtr; + Tcl_Obj *result[2]; int i; for (i=contextPtr->index ; icallPtr->numChain ; i++){ @@ -895,10 +891,9 @@ TclOOSelfObjCmd( Tcl_AppendResult(interp, "method without declarer!", NULL); return TCL_ERROR; } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - TclOOObjectName(interp, declarerPtr)); - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - mPtr->namePtr); + result[0] = TclOOObjectName(interp, declarerPtr); + result[1] = mPtr->namePtr; + Tcl_SetObjResult(interp, Tcl_NewListObj(2, result)); return TCL_OK; } } diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index 41d90a4..ee19373 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.7 2008/09/23 05:05:54 dkf Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.8 2008/10/04 12:00:25 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -18,6 +18,7 @@ #include "tclInt.h" #include "tclOOInt.h" +static inline Class * GetClassFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr); static Tcl_ObjCmdProc InfoObjectClassCmd; static Tcl_ObjCmdProc InfoObjectDefnCmd; static Tcl_ObjCmdProc InfoObjectFiltersCmd; @@ -149,6 +150,35 @@ TclOOInitInfo( /* * ---------------------------------------------------------------------- * + * GetClassFromObj -- + * + * How to correctly get a class from a Tcl_Obj. Just a wrapper round + * Tcl_GetObjectFromObj, but this is an idiom that was used heavily. + * + * ---------------------------------------------------------------------- + */ + +static inline Class * +GetClassFromObj( + Tcl_Interp *interp, + Tcl_Obj *objPtr) +{ + Object *oPtr = (Object *) Tcl_GetObjectFromObj(interp, objPtr); + + if (oPtr == NULL) { + return NULL; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, "\"", TclGetString(objPtr), + "\" is not a class", NULL); + return NULL; + } + return oPtr->classPtr; +} + +/* + * ---------------------------------------------------------------------- + * * InfoObjectClassCmd -- * * Implements [info object class $objName ?$className?] @@ -227,7 +257,7 @@ InfoObjectDefnCmd( Tcl_HashEntry *hPtr; Proc *procPtr; CompiledLocal *localPtr; - Tcl_Obj *argsObj; + Tcl_Obj *resultObjs[2]; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); @@ -256,7 +286,7 @@ InfoObjectDefnCmd( return TCL_ERROR; } - argsObj = Tcl_NewObj(); + resultObjs[0] = Tcl_NewObj(); for (localPtr=procPtr->firstLocalPtr; localPtr!=NULL; localPtr=localPtr->nextPtr) { if (TclIsVarArgument(localPtr)) { @@ -268,12 +298,11 @@ InfoObjectDefnCmd( if (localPtr->defValuePtr != NULL) { Tcl_ListObjAppendElement(NULL, argObj, localPtr->defValuePtr); } - Tcl_ListObjAppendElement(NULL, argsObj, argObj); + Tcl_ListObjAppendElement(NULL, resultObjs[0], argObj); } } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - TclOOGetMethodBody(Tcl_GetHashValue(hPtr))); + resultObjs[1] = TclOOGetMethodBody(Tcl_GetHashValue(hPtr)); + Tcl_SetObjResult(interp, Tcl_NewListObj(2, resultObjs)); return TCL_OK; } @@ -295,7 +324,7 @@ InfoObjectFiltersCmd( Tcl_Obj *const objv[]) { int i; - Tcl_Obj *filterObj; + Tcl_Obj *filterObj, *resultObj; Object *oPtr; if (objc != 2) { @@ -307,10 +336,12 @@ InfoObjectFiltersCmd( if (oPtr == NULL) { return TCL_ERROR; } + resultObj = Tcl_NewObj(); FOREACH(filterObj, oPtr->filters) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), filterObj); + Tcl_ListObjAppendElement(NULL, resultObj, filterObj); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -507,7 +538,7 @@ InfoObjectMethodsCmd( Object *oPtr; int flag = PUBLIC_METHOD, recurse = 0; FOREACH_HASH_DECLS; - Tcl_Obj *namePtr; + Tcl_Obj *namePtr, *resultObj; Method *mPtr; static const char *options[] = { "-all", "-localprivate", "-private", NULL @@ -546,28 +577,24 @@ InfoObjectMethodsCmd( } } + resultObj = Tcl_NewObj(); if (recurse) { const char **names; int i, numNames = TclOOGetSortedMethodList(oPtr, flag, &names); - Tcl_Obj *resultObj = Tcl_NewObj(); for (i=0 ; imethodsPtr) { + } else if (oPtr->methodsPtr) { FOREACH_HASH(namePtr, mPtr, oPtr->methodsPtr) { if (mPtr->typePtr != NULL && (mPtr->flags & flag) == flag) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - namePtr); + Tcl_ListObjAppendElement(NULL, resultObj, namePtr); } } } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -590,6 +617,7 @@ InfoObjectMixinsCmd( { Class *mixinPtr; Object *oPtr; + Tcl_Obj *resultObj; int i; if (objc != 2) { @@ -601,10 +629,12 @@ InfoObjectMixinsCmd( return TCL_ERROR; } + resultObj = Tcl_NewObj(); FOREACH(mixinPtr, oPtr->mixins) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_ListObjAppendElement(NULL, resultObj, TclOOObjectName(interp, mixinPtr->thisPtr)); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -626,7 +656,7 @@ InfoObjectVariablesCmd( Tcl_Obj *const objv[]) { Object *oPtr; - Tcl_Obj *variableObj; + Tcl_Obj *variableObj, *resultObj; int i; if (objc != 2) { @@ -638,9 +668,11 @@ InfoObjectVariablesCmd( return TCL_ERROR; } + resultObj = Tcl_NewObj(); FOREACH(variableObj, oPtr->variables) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), variableObj); + Tcl_ListObjAppendElement(NULL, resultObj, variableObj); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -724,25 +756,17 @@ InfoClassConstrCmd( { Proc *procPtr; CompiledLocal *localPtr; - Tcl_Obj *argsObj; - Object *oPtr; + Tcl_Obj *resultObjs[2]; Class *clsPtr; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - clsPtr = oPtr->classPtr; - if (clsPtr->constructorPtr == NULL) { return TCL_OK; } @@ -753,7 +777,7 @@ InfoClassConstrCmd( return TCL_ERROR; } - argsObj = Tcl_NewObj(); + resultObjs[0] = Tcl_NewObj(); for (localPtr=procPtr->firstLocalPtr; localPtr!=NULL; localPtr=localPtr->nextPtr) { if (TclIsVarArgument(localPtr)) { @@ -765,12 +789,11 @@ InfoClassConstrCmd( if (localPtr->defValuePtr != NULL) { Tcl_ListObjAppendElement(NULL, argObj, localPtr->defValuePtr); } - Tcl_ListObjAppendElement(NULL, argsObj, argObj); + Tcl_ListObjAppendElement(NULL, resultObjs[0], argObj); } } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - TclOOGetMethodBody(clsPtr->constructorPtr)); + resultObjs[1] = TclOOGetMethodBody(clsPtr->constructorPtr); + Tcl_SetObjResult(interp, Tcl_NewListObj(2, resultObjs)); return TCL_OK; } @@ -794,25 +817,17 @@ InfoClassDefnCmd( Tcl_HashEntry *hPtr; Proc *procPtr; CompiledLocal *localPtr; - Tcl_Obj *argsObj; - Object *oPtr; + Tcl_Obj *resultObjs[2]; Class *clsPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); - return TCL_ERROR; - } - clsPtr = oPtr->classPtr; - hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); if (hPtr == NULL) { Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), @@ -826,7 +841,7 @@ InfoClassDefnCmd( return TCL_ERROR; } - argsObj = Tcl_NewObj(); + resultObjs[0] = Tcl_NewObj(); for (localPtr=procPtr->firstLocalPtr; localPtr!=NULL; localPtr=localPtr->nextPtr) { if (TclIsVarArgument(localPtr)) { @@ -838,12 +853,11 @@ InfoClassDefnCmd( if (localPtr->defValuePtr != NULL) { Tcl_ListObjAppendElement(NULL, argObj, localPtr->defValuePtr); } - Tcl_ListObjAppendElement(NULL, argsObj, argObj); + Tcl_ListObjAppendElement(NULL, resultObjs[0], argObj); } } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), argsObj); - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), - TclOOGetMethodBody(Tcl_GetHashValue(hPtr))); + resultObjs[1] = TclOOGetMethodBody(Tcl_GetHashValue(hPtr)); + Tcl_SetObjResult(interp, Tcl_NewListObj(2, resultObjs)); return TCL_OK; } @@ -865,24 +879,13 @@ InfoClassDestrCmd( Tcl_Obj *const objv[]) { Proc *procPtr; - Object *oPtr; Class *clsPtr; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); - return TCL_ERROR; - } - clsPtr = oPtr->classPtr; - + clsPtr = GetClassFromObj(interp, objv[1]); if (clsPtr->destructorPtr == NULL) { return TCL_OK; } @@ -915,28 +918,23 @@ InfoClassFiltersCmd( Tcl_Obj *const objv[]) { int i; - Tcl_Obj *filterObj; - Object *oPtr; + Tcl_Obj *filterObj, *resultObj; Class *clsPtr; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - clsPtr = oPtr->classPtr; + resultObj = Tcl_NewObj(); FOREACH(filterObj, clsPtr->filters) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), filterObj); + Tcl_ListObjAppendElement(NULL, resultObj, filterObj); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -959,24 +957,16 @@ InfoClassForwardCmd( { Tcl_HashEntry *hPtr; Tcl_Obj *prefixObj; - Object *oPtr; Class *clsPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - clsPtr = oPtr->classPtr; - hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); if (hPtr == NULL) { Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), @@ -1016,33 +1006,30 @@ InfoClassInstancesCmd( Class *clsPtr; int i; const char *pattern = NULL; + Tcl_Obj *resultObj; if (objc != 2 && objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "className ?pattern?"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); - return TCL_ERROR; - } - clsPtr = oPtr->classPtr; if (objc == 3) { pattern = TclGetString(objv[2]); } + resultObj = Tcl_NewObj(); FOREACH(oPtr, clsPtr->instances) { Tcl_Obj *tmpObj = TclOOObjectName(interp, oPtr); if (pattern && !Tcl_StringMatch(TclGetString(tmpObj), pattern)) { continue; } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, tmpObj); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -1064,10 +1051,8 @@ InfoClassMethodsCmd( Tcl_Obj *const objv[]) { int flag = PUBLIC_METHOD, recurse = 0; - FOREACH_HASH_DECLS; - Tcl_Obj *namePtr; + Tcl_Obj *namePtr, *resultObj; Method *mPtr; - Object *oPtr; Class *clsPtr; static const char *options[] = { "-all", "-localprivate", "-private", NULL @@ -1080,16 +1065,10 @@ InfoClassMethodsCmd( Tcl_WrongNumArgs(interp, 1, objv, "className ?-option value ...?"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - clsPtr = oPtr->classPtr; if (objc != 2) { int i, idx; @@ -1112,25 +1091,26 @@ InfoClassMethodsCmd( } } + resultObj = Tcl_NewObj(); if (recurse) { const char **names; int i, numNames = TclOOGetSortedClassMethodList(clsPtr, flag, &names); - Tcl_Obj *resultObj = Tcl_NewObj(); for (i=0 ; iclassMethods) { - if (mPtr->typePtr != NULL && (mPtr->flags & flag) == flag) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), namePtr); + FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) { + if (mPtr->typePtr != NULL && (mPtr->flags & flag) == flag) { + Tcl_ListObjAppendElement(NULL, resultObj, namePtr); + } } } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -1151,29 +1131,25 @@ InfoClassMixinsCmd( int objc, Tcl_Obj *const objv[]) { - Object *oPtr; Class *clsPtr, *mixinPtr; + Tcl_Obj *resultObj; int i; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); - return TCL_ERROR; - } - clsPtr = oPtr->classPtr; + resultObj = Tcl_NewObj(); FOREACH(mixinPtr, clsPtr->mixins) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_ListObjAppendElement(NULL, resultObj, TclOOObjectName(interp, mixinPtr->thisPtr)); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -1194,8 +1170,8 @@ InfoClassSubsCmd( int objc, Tcl_Obj *const objv[]) { - Object *oPtr; Class *clsPtr, *subclassPtr; + Tcl_Obj *resultObj; int i; const char *pattern = NULL; @@ -1203,27 +1179,22 @@ InfoClassSubsCmd( Tcl_WrongNumArgs(interp, 1, objv, "className ?pattern?"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - clsPtr = oPtr->classPtr; if (objc == 3) { pattern = TclGetString(objv[2]); } + resultObj = Tcl_NewObj(); FOREACH(subclassPtr, clsPtr->subclasses) { Tcl_Obj *tmpObj = TclOOObjectName(interp, subclassPtr->thisPtr); if (pattern && !Tcl_StringMatch(TclGetString(tmpObj), pattern)) { continue; } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, tmpObj); } FOREACH(subclassPtr, clsPtr->mixinSubs) { Tcl_Obj *tmpObj = TclOOObjectName(interp, subclassPtr->thisPtr); @@ -1231,8 +1202,9 @@ InfoClassSubsCmd( if (pattern && !Tcl_StringMatch(TclGetString(tmpObj), pattern)) { continue; } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, tmpObj); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -1253,29 +1225,25 @@ InfoClassSupersCmd( int objc, Tcl_Obj *const objv[]) { - Object *oPtr; Class *clsPtr, *superPtr; + Tcl_Obj *resultObj; int i; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - clsPtr = oPtr->classPtr; + resultObj = Tcl_NewObj(); FOREACH(superPtr, clsPtr->superclasses) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + Tcl_ListObjAppendElement(NULL, resultObj, TclOOObjectName(interp, superPtr->thisPtr)); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -1296,29 +1264,24 @@ InfoClassVariablesCmd( int objc, Tcl_Obj *const objv[]) { - Object *oPtr; Class *clsPtr; - Tcl_Obj *variableObj; + Tcl_Obj *variableObj, *resultObj; int i; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } - oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (oPtr == NULL) { - return TCL_ERROR; - } - if (oPtr->classPtr == NULL) { - Tcl_AppendResult(interp, "\"", TclGetString(objv[1]), - "\" is not a class", NULL); + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { return TCL_ERROR; } - clsPtr = oPtr->classPtr; + resultObj = Tcl_NewObj(); FOREACH(variableObj, clsPtr->variables) { - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), variableObj); + Tcl_ListObjAppendElement(NULL, resultObj, variableObj); } + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } -- cgit v0.12 From 0cc58bcc1ebada2169f5e943bd09f446556c7ccf Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 4 Oct 2008 12:33:34 +0000 Subject: * doc/ChnlStack.3: CONSTified the typePtr argument * doc/CrtChannel.3: of Tcl_CreateChannel and Tcl_StackChannel * generic/tcl.decls and the return value of Tcl_GetChannelType * generic/tcl.h * generic/tclIO.h * generic/tclIO.c * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. --- doc/ChnlStack.3 | 4 ++-- doc/CrtChannel.3 | 10 +++++----- generic/tcl.decls | 11 ++++++----- generic/tcl.h | 4 ++-- generic/tclDecls.h | 14 +++++++------- generic/tclIO.c | 10 +++++----- generic/tclIO.h | 4 ++-- 7 files changed, 29 insertions(+), 28 deletions(-) diff --git a/doc/ChnlStack.3 b/doc/ChnlStack.3 index 092ead5..be22a88 100644 --- a/doc/ChnlStack.3 +++ b/doc/ChnlStack.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ChnlStack.3,v 1.8 2006/11/15 09:23:01 dkf Exp $ +'\" RCS: @(#) $Id: ChnlStack.3,v 1.9 2008/10/04 12:33:34 nijtmans Exp $ .so man.macros .TH Tcl_StackChannel 3 8.3 Tcl "Tcl Library Procedures" .BS @@ -32,7 +32,7 @@ Tcl_Channel .AS Tcl_ChannelType clientData .AP Tcl_Interp *interp in Interpreter for error reporting. -.AP Tcl_ChannelType *typePtr in +.AP "const Tcl_ChannelType" *typePtr in The new channel I/O procedures to use for \fIchannel\fR. .AP ClientData clientData in Arbitrary one-word value to pass to channel I/O procedures. diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index a4a6c4c..1aaf3be 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChannel.3,v 1.41 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: CrtChannel.3,v 1.42 2008/10/04 12:33:34 nijtmans Exp $ .so man.macros .TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -22,7 +22,7 @@ Tcl_Channel ClientData \fBTcl_GetChannelInstanceData\fR(\fIchannel\fR) .sp -Tcl_ChannelType * +const Tcl_ChannelType * \fBTcl_GetChannelType\fR(\fIchannel\fR) .sp const char * @@ -312,7 +312,7 @@ details about the old structure. The \fBTcl_ChannelType\fR structure contains the following fields: .CS typedef struct Tcl_ChannelType { - char *\fItypeName\fR; + const char *\fItypeName\fR; Tcl_ChannelTypeVersion \fIversion\fR; Tcl_DriverCloseProc *\fIcloseProc\fR; Tcl_DriverInputProc *\fIinputProc\fR; @@ -875,7 +875,7 @@ the following fields: .PP .CS typedef struct Tcl_ChannelType { - char *\fItypeName\fR; + const char *\fItypeName\fR; Tcl_DriverBlockModeProc *\fIblockModeProc\fR; Tcl_DriverCloseProc *\fIcloseProc\fR; Tcl_DriverInputProc *\fIinputProc\fR; @@ -901,7 +901,7 @@ contained the following fields: .PP .CS typedef struct Tcl_ChannelType { - char *\fItypeName\fR; + const char *\fItypeName\fR; Tcl_ChannelTypeVersion \fIversion\fR; Tcl_DriverCloseProc *\fIcloseProc\fR; Tcl_DriverInputProc *\fIinputProc\fR; diff --git a/generic/tcl.decls b/generic/tcl.decls index 335d09a..b64df6d 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.150 2008/10/04 11:51:25 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.151 2008/10/04 12:33:34 nijtmans Exp $ library tcl @@ -327,7 +327,7 @@ declare 87 generic { Tcl_Obj *CONST objv[]) } declare 88 generic { - Tcl_Channel Tcl_CreateChannel(Tcl_ChannelType *typePtr, + Tcl_Channel Tcl_CreateChannel(CONST Tcl_ChannelType *typePtr, CONST char *chanName, ClientData instanceData, int mask) } declare 89 generic { @@ -567,7 +567,7 @@ declare 157 generic { CONST char *optionName, Tcl_DString *dsPtr) } declare 158 generic { - Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan) + CONST86 Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan) } declare 159 generic { int Tcl_GetCommandInfo(Tcl_Interp *interp, CONST char *cmdName, @@ -1011,8 +1011,9 @@ declare 280 generic { # version into the new one). declare 281 generic { - Tcl_Channel Tcl_StackChannel(Tcl_Interp *interp, Tcl_ChannelType *typePtr, - ClientData instanceData, int mask, Tcl_Channel prevChan) + Tcl_Channel Tcl_StackChannel(Tcl_Interp *interp, + CONST Tcl_ChannelType *typePtr, ClientData instanceData, + int mask, Tcl_Channel prevChan) } declare 282 generic { int Tcl_UnstackChannel(Tcl_Interp *interp, Tcl_Channel chan) diff --git a/generic/tcl.h b/generic/tcl.h index 90b9d75..26187e3 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.273 2008/10/04 11:51:25 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.274 2008/10/04 12:33:34 nijtmans Exp $ */ #ifndef _TCL @@ -1460,7 +1460,7 @@ typedef int (Tcl_DriverTruncateProc) (ClientData instanceData, */ typedef struct Tcl_ChannelType { - char *typeName; /* The name of the channel type in Tcl + CONST char *typeName; /* The name of the channel type in Tcl * commands. This storage is owned by channel * type. */ Tcl_ChannelTypeVersion version; diff --git a/generic/tclDecls.h b/generic/tclDecls.h index bf3aa3f..2650172 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.152 2008/10/04 11:51:25 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.153 2008/10/04 12:33:34 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -563,7 +563,7 @@ EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, #ifndef Tcl_CreateChannel_TCL_DECLARED #define Tcl_CreateChannel_TCL_DECLARED /* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel (Tcl_ChannelType * typePtr, +EXTERN Tcl_Channel Tcl_CreateChannel (CONST Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); #endif @@ -998,7 +998,7 @@ EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, #ifndef Tcl_GetChannelType_TCL_DECLARED #define Tcl_GetChannelType_TCL_DECLARED /* 158 */ -EXTERN Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); +EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); #endif #ifndef Tcl_GetCommandInfo_TCL_DECLARED #define Tcl_GetCommandInfo_TCL_DECLARED @@ -1763,7 +1763,7 @@ EXTERN void Tcl_InitMemory (Tcl_Interp * interp); #define Tcl_StackChannel_TCL_DECLARED /* 281 */ EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, - Tcl_ChannelType * typePtr, + CONST Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); #endif @@ -3772,7 +3772,7 @@ typedef struct TclStubs { int (*tcl_ConvertCountedElement) (CONST char * src, int length, char * dst, int flags); /* 85 */ int (*tcl_CreateAlias) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * argv); /* 86 */ int (*tcl_CreateAliasObj) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[]); /* 87 */ - Tcl_Channel (*tcl_CreateChannel) (Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ + Tcl_Channel (*tcl_CreateChannel) (CONST Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ @@ -3850,7 +3850,7 @@ typedef struct TclStubs { int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr); /* 157 */ - Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ + CONST86 Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ int (*tcl_GetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ int (*tcl_GetErrno) (void); /* 161 */ @@ -3997,7 +3997,7 @@ typedef struct TclStubs { void (*tcl_PanicVA) (CONST char * format, va_list argList); /* 278 */ void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ - Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, CONST Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ diff --git a/generic/tclIO.c b/generic/tclIO.c index 08d73ec..c69a8e2 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.143 2008/05/23 21:00:44 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.144 2008/10/04 12:33:34 nijtmans Exp $ */ #include "tclInt.h" @@ -208,7 +208,7 @@ static int SetChannelFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void UpdateStringOfChannel(Tcl_Obj *objPtr); static void FreeChannelIntRep(Tcl_Obj *objPtr); -static Tcl_ObjType tclChannelType = { +static const Tcl_ObjType tclChannelType = { "channel", /* name for this type */ FreeChannelIntRep, /* freeIntRepProc */ DupChannelIntRep, /* dupIntRepProc */ @@ -1219,7 +1219,7 @@ TclGetChannelFromObj( Tcl_Channel Tcl_CreateChannel( - Tcl_ChannelType *typePtr, /* The channel type record. */ + const Tcl_ChannelType *typePtr, /* The channel type record. */ const char *chanName, /* Name of channel to record. */ ClientData instanceData, /* Instance specific data. */ int mask) /* TCL_READABLE & TCL_WRITABLE to indicate if @@ -1415,7 +1415,7 @@ Tcl_CreateChannel( Tcl_Channel Tcl_StackChannel( Tcl_Interp *interp, /* The interpreter we are working in */ - Tcl_ChannelType *typePtr, /* The channel type record for the new + const Tcl_ChannelType *typePtr, /* The channel type record for the new * channel. */ ClientData instanceData, /* Instance specific data for the new * channel. */ @@ -1909,7 +1909,7 @@ Tcl_GetChannelThread( *---------------------------------------------------------------------- */ -Tcl_ChannelType * +const Tcl_ChannelType * Tcl_GetChannelType( Tcl_Channel chan) /* The channel to return type for. */ { diff --git a/generic/tclIO.h b/generic/tclIO.h index 23e64a0..a90817b 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.13 2008/05/02 10:27:07 dkf Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.14 2008/10/04 12:33:34 nijtmans Exp $ */ /* @@ -132,7 +132,7 @@ typedef struct Channel { struct ChannelState *state; /* Split out state information */ ClientData instanceData; /* Instance-specific data provided by creator * of channel. */ - Tcl_ChannelType *typePtr; /* Pointer to channel type structure. */ + CONST86 Tcl_ChannelType *typePtr; /* Pointer to channel type structure. */ struct Channel *downChanPtr;/* Refers to channel this one was stacked * upon. This reference is NULL for normal * channels. See Tcl_StackChannel. */ -- cgit v0.12 From e0670e6da0fa957eff9b3e856c65fcd41eb9c711 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 4 Oct 2008 12:54:14 +0000 Subject: * generic/tclLoad.c: Make sure that any library which doesn't have an unloadproc is only really unloaded when no library code is executed yet. [Bug 2059262] --- ChangeLog | 31 +++++++++++++++++++++++++++++++ generic/tclLoad.c | 8 +++++--- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e772f7..8e47439 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-04 Jan Nijtmans + + * generic/tclLoad.c: Make sure that any library which + doesn't have an unloadproc is only really unloaded when + no library code is executed yet. [Bug 2059262] + 2008-10-04 Donal K. Fellows * generic/tclOOInfo.c (GetClassFromObj): Factor out the code to parse @@ -8,6 +14,18 @@ 2008-10-04 Jan Nijtmans + * doc/ChnlStack.3: CONSTified the typePtr argument + * doc/CrtChannel.3: of Tcl_CreateChannel and Tcl_StackChannel + * generic/tcl.decls and the return value of Tcl_GetChannelType + * generic/tcl.h + * generic/tclIO.h + * generic/tclIO.c + * ChangeLog + * generic/tclDecls.h: regenerated + This change complies with TIP #27. + +2008-10-4 Jan Nijtmans + * doc/Hash.3: CONSTified the typePtr argument * generic/tcl.decls: of Tcl_InitCustomHashTable. * generic/tcl.h @@ -16,6 +34,19 @@ * generic/tclDecls.h: regenerated This change complies with TIP #27. +2008-10-4 Jan Nijtmans + + * doc/RegConfig.3: CONSTified the configuration argument + * generic/tcl.decls: of Tcl_RegisterConfig. + * generic/tcl.h + * generic/tclConfig.c + * generic/tclPkgConfig.c + * ChangeLog + * generic/tclDecls.h: regenerated + This change complies with TIP #27. + +2008-10-4 Jan Nijtmans + * doc/GetIndex.3: CONSTified the tablePtr argument * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 6c1c483..479c1fb 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.18 2008/07/21 21:25:21 nijtmans Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.19 2008/10/04 12:54:14 nijtmans Exp $ */ #include "tclInt.h" @@ -791,7 +791,9 @@ Tcl_UnloadObjCmd( if (unLoadProcPtr != NULL) { Tcl_MutexLock(&packageMutex); - unLoadProcPtr(pkgPtr->loadHandle); + if (pkgPtr->unloadProc != NULL) { + unLoadProcPtr(pkgPtr->loadHandle); + } /* * Remove this library from the loaded library cache. @@ -1144,7 +1146,7 @@ TclFinalizeLoad(void) */ if (pkgPtr->fileName[0] != '\0') { - if (pkgPtr->unLoadProcPtr != NULL) { + if ((pkgPtr->unLoadProcPtr != NULL) && (pkgPtr->unloadProc != NULL)) { pkgPtr->unLoadProcPtr(pkgPtr->loadHandle); } } -- cgit v0.12 From 1b5fe3d675d4cc34efc61475912cff429a755b5b Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 4 Oct 2008 18:06:47 +0000 Subject: More result hygiene. --- ChangeLog | 11 ++++++++--- generic/tclCmdIL.c | 6 +++--- generic/tclRegexp.c | 10 ++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e47439..bd16f2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ +2008-10-04 Donal K. Fellows + + * generic/tclCmdIL.c (InfoFrameCmd): Improved hygiene of result + * generic/tclRegexp.c (TclRegAbout): handling. + 2008-10-04 Jan Nijtmans - * generic/tclLoad.c: Make sure that any library which - doesn't have an unloadproc is only really unloaded when - no library code is executed yet. [Bug 2059262] + * generic/tclLoad.c: Make sure that any library which doesn't have an + unloadproc is only really unloaded when no library code is executed + yet. [Bug 2059262] 2008-10-04 Donal K. Fellows diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index d479f81..cffc0dd 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.158 2008/09/29 15:38:32 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.159 2008/10/04 18:06:48 dkf Exp $ */ #include "tclInt.h" @@ -1082,8 +1082,8 @@ InfoFrameCmd( if ((level > topLevel) || (level <= - topLevel)) { levelError: - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad level \"", - TclGetString(objv[1]), "\"", NULL); + Tcl_AppendResult(interp, "bad level \"", TclGetString(objv[1]), "\"", + NULL); return TCL_ERROR; } diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 23a1c97..c82b474 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.c,v 1.28 2007/12/13 15:23:20 dgp Exp $ + * RCS: @(#) $Id: tclRegexp.c,v 1.29 2008/10/04 18:06:48 dkf Exp $ */ #include "tclInt.h" @@ -656,7 +656,7 @@ TclRegAbout( {0, NULL} }; const struct infoname *inf; - Tcl_Obj *infoObj; + Tcl_Obj *infoObj, *resultObj; /* * The reset here guarantees that the interpreter result is empty and @@ -672,7 +672,8 @@ TclRegAbout( * well and Tcl has other limits that constrain things as well... */ - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), + resultObj = Tcl_NewObj(); + Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewIntObj((int) regexpPtr->re.re_nsub)); /* @@ -686,7 +687,8 @@ TclRegAbout( Tcl_NewStringObj(inf->text, -1)); } } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), infoObj); + Tcl_ListObjAppendElement(NULL, resultObj, infoObj); + Tcl_SetObjResult(interp, resultObj); return 0; } -- cgit v0.12 From ef5db57dc9793243f18bbc2d687fdad7a5b22f72 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 5 Oct 2008 19:22:22 +0000 Subject: Fix [Bug 2144595] --- ChangeLog | 5 +++++ generic/tclIndexObj.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd16f2b..f77711a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-05 Donal K. Fellows + + * generic/tclIndexObj.c (TclInitPrefixCmd): Make the [tcl::prefix] + into an exported command. [Bug 2144595] + 2008-10-04 Donal K. Fellows * generic/tclCmdIL.c (InfoFrameCmd): Improved hygiene of result diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 91b9e3d..1ca2d3e 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.43 2008/10/04 11:04:43 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.44 2008/10/05 19:22:22 dkf Exp $ */ #include "tclInt.h" @@ -520,13 +520,17 @@ TclInitPrefixCmd( Tcl_Interp *interp) /* Current interpreter. */ { static const EnsembleImplMap prefixImplMap[] = { - {"all", PrefixAllObjCmd, NULL}, - {"longest", PrefixLongestObjCmd, NULL}, - {"match", PrefixMatchObjCmd, NULL}, + {"all", PrefixAllObjCmd}, + {"longest", PrefixLongestObjCmd}, + {"match", PrefixMatchObjCmd}, {NULL} }; + Tcl_Command prefixCmd; - return TclMakeEnsemble(interp, "tcl::prefix", prefixImplMap); + prefixCmd = TclMakeEnsemble(interp, "::tcl::prefix", prefixImplMap); + Tcl_Export(interp, Tcl_FindNamespace(interp, "::tcl", NULL, 0), + "prefix", 0); + return prefixCmd; } /*---------------------------------------------------------------------- -- cgit v0.12 From 19622ba06dd7658926d7bbe3b30ce0825a803792 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 5 Oct 2008 20:47:52 +0000 Subject: * generic/tclInt.decls: CONSTified the AuxDataType argument * generic/tclCompCmds.c: of TclCreateAuxData and * generic/tclCompile.c TclRegisterAuxDataType and the return * generic/tclCompile.h values of TclGetAuxDataType and * generic/tclExecute.c TclGetInstructionTable * ChangeLog * generic/tclIntDecls.h: regenerated This change complies with TIP #27 (even though it only involves internal function, so this is not even necessary). --- ChangeLog | 12 ++++++++++++ generic/tclCompCmds.c | 8 ++++---- generic/tclCompile.c | 24 ++++++++++++------------ generic/tclCompile.h | 20 ++++++++++---------- generic/tclExecute.c | 12 ++++++------ generic/tclInt.decls | 10 +++++----- generic/tclIntDecls.h | 10 +++++----- 7 files changed, 54 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index f77711a..6191d35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-10-04 Jan Nijtmans + + * generic/tclInt.decls: CONSTified the AuxDataType argument + * generic/tclCompCmds.c: of TclCreateAuxData and + * generic/tclCompile.c TclRegisterAuxDataType and the return + * generic/tclCompile.h values of TclGetAuxDataType and + * generic/tclExecute.c TclGetInstructionTable + * ChangeLog + * generic/tclIntDecls.h: regenerated + This change complies with TIP #27 (even though it only + involves internal function, so this is not even necessary). + 2008-10-05 Donal K. Fellows * generic/tclIndexObj.c (TclInitPrefixCmd): Make the [tcl::prefix] diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 877bb11..4f7f230 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.147 2008/09/28 22:17:39 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.148 2008/10/05 20:47:52 nijtmans Exp $ */ #include "tclInt.h" @@ -187,21 +187,21 @@ static void CompileReturnInternal(CompileEnv *envPtr, * The structures below define the AuxData types defined in this file. */ -AuxDataType tclForeachInfoType = { +const AuxDataType tclForeachInfoType = { "ForeachInfo", /* name */ DupForeachInfo, /* dupProc */ FreeForeachInfo, /* freeProc */ PrintForeachInfo /* printProc */ }; -AuxDataType tclJumptableInfoType = { +const AuxDataType tclJumptableInfoType = { "JumptableInfo", /* name */ DupJumptableInfo, /* dupProc */ FreeJumptableInfo, /* freeProc */ PrintJumptableInfo /* printProc */ }; -AuxDataType tclDictUpdateInfoType = { +const AuxDataType tclDictUpdateInfoType = { "DictUpdateInfo", /* name */ DupDictUpdateInfo, /* dupProc */ FreeDictUpdateInfo, /* freeProc */ diff --git a/generic/tclCompile.c b/generic/tclCompile.c index a0ab92b..c55258f 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.156 2008/09/08 03:55:18 msofer Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.157 2008/10/05 20:47:52 nijtmans Exp $ */ #include "tclInt.h" @@ -52,7 +52,7 @@ static int traceInitialized = 0; * existence of a procedure call frame to distinguish these. */ -InstructionDesc tclInstructionTable[] = { +InstructionDesc const tclInstructionTable[] = { /* Name Bytes stackEffect #Opnds Operand types */ {"done", 1, -1, 0, {OPERAND_NONE}}, /* Finish ByteCode execution and return stktop (top stack item) */ @@ -485,7 +485,7 @@ TclSetByteCodeFromAny( Interp *iPtr = (Interp *) interp; CompileEnv compEnv; /* Compilation environment structure allocated * in frame. */ - register AuxData *auxDataPtr; + register const AuxData *auxDataPtr; LiteralEntry *entryPtr; register int i; int length, result = TCL_OK; @@ -694,7 +694,7 @@ TclCleanupByteCode( int numLitObjects = codePtr->numLitObjects; int numAuxDataItems = codePtr->numAuxDataItems; register Tcl_Obj **objArrayPtr, *objPtr; - register AuxData *auxDataPtr; + register const AuxData *auxDataPtr; int i; #ifdef TCL_COMPILE_STATS @@ -2607,7 +2607,7 @@ int TclCreateAuxData( ClientData clientData, /* The compilation auxiliary data to store in * the new aux data record. */ - AuxDataType *typePtr, /* Pointer to the type to attach to this + const AuxDataType *typePtr, /* Pointer to the type to attach to this * AuxData */ register CompileEnv *envPtr)/* Points to the CompileEnv for which a new * aux data structure is to be allocated. */ @@ -2958,7 +2958,7 @@ TclFixupForwardJump( *---------------------------------------------------------------------- */ -void * /* == InstructionDesc* == */ +const void * /* == InstructionDesc* == */ TclGetInstructionTable(void) { return &tclInstructionTable[0]; @@ -2985,7 +2985,7 @@ TclGetInstructionTable(void) void TclRegisterAuxDataType( - AuxDataType *typePtr) /* Information about object type; storage must + const AuxDataType *typePtr) /* Information about object type; storage must * be statically allocated (must live forever; * will not be deallocated). */ { @@ -3034,12 +3034,12 @@ TclRegisterAuxDataType( *---------------------------------------------------------------------- */ -AuxDataType * +const AuxDataType * TclGetAuxDataType( - char *typeName) /* Name of AuxData type to look up. */ + const char *typeName) /* Name of AuxData type to look up. */ { register Tcl_HashEntry *hPtr; - AuxDataType *typePtr = NULL; + const AuxDataType *typePtr = NULL; Tcl_MutexLock(&tableMutex); if (!auxDataTypeTableInitialized) { @@ -3048,7 +3048,7 @@ TclGetAuxDataType( hPtr = Tcl_FindHashEntry(&auxDataTypeTable, typeName); if (hPtr != NULL) { - typePtr = (AuxDataType *) Tcl_GetHashValue(hPtr); + typePtr = (const AuxDataType *) Tcl_GetHashValue(hPtr); } Tcl_MutexUnlock(&tableMutex); @@ -3744,7 +3744,7 @@ FormatInstruction( { Proc *procPtr = codePtr->procPtr; unsigned char opCode = *pc; - register InstructionDesc *instDesc = &tclInstructionTable[opCode]; + register const InstructionDesc *instDesc = &tclInstructionTable[opCode]; unsigned char *codeStart = codePtr->codeStart; unsigned pcOffset = pc - codeStart; int opnd = 0, i, j, numBytes = 1; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index ab8eef8..f314937 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.107 2008/09/10 13:24:09 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.108 2008/10/05 20:47:52 nijtmans Exp $ */ #ifndef _TCLCOMPILATION @@ -177,7 +177,7 @@ typedef void (AuxDataPrintProc)(ClientData clientData, */ typedef struct AuxDataType { - char *name; /* The name of the type. Types can be + CONST86 char *name; /* The name of the type. Types can be * registered and found by name */ AuxDataDupProc *dupProc; /* Callback procedure to invoke when the aux * data is duplicated (e.g., when the ByteCode @@ -200,7 +200,7 @@ typedef struct AuxDataType { */ typedef struct AuxData { - AuxDataType *type; /* Pointer to the AuxData type associated with + CONST86 AuxDataType *type; /* Pointer to the AuxData type associated with * this ClientData. */ ClientData clientData; /* The compilation data itself. */ } AuxData; @@ -682,7 +682,7 @@ typedef enum InstOperandType { } InstOperandType; typedef struct InstructionDesc { - char *name; /* Name of instruction. */ + CONST86 char *name; /* Name of instruction. */ int numBytes; /* Total number of bytes for instruction. */ int stackEffect; /* The worst-case balance stack effect of the * instruction, used for stack requirements @@ -694,7 +694,7 @@ typedef struct InstructionDesc { /* The type of each operand. */ } InstructionDesc; -MODULE_SCOPE InstructionDesc tclInstructionTable[]; +MODULE_SCOPE InstructionDesc CONST86 tclInstructionTable[]; /* * Compilation of some Tcl constructs such as if commands and the logical or @@ -784,7 +784,7 @@ typedef struct ForeachInfo { * LAST FIELD IN THE STRUCTURE! */ } ForeachInfo; -MODULE_SCOPE AuxDataType tclForeachInfoType; +MODULE_SCOPE CONST86 AuxDataType tclForeachInfoType; /* * Structure used to hold information about a switch command that is needed @@ -797,7 +797,7 @@ typedef struct JumptableInfo { * offsets). */ } JumptableInfo; -MODULE_SCOPE AuxDataType tclJumptableInfoType; +MODULE_SCOPE CONST86 AuxDataType tclJumptableInfoType; /* * Structure used to hold information about a [dict update] command that is @@ -815,7 +815,7 @@ typedef struct { * STRUCTURE. */ } DictUpdateInfo; -MODULE_SCOPE AuxDataType tclDictUpdateInfoType; +MODULE_SCOPE CONST86 AuxDataType tclDictUpdateInfoType; /* * ClientData type used by the math operator commands. @@ -879,7 +879,7 @@ MODULE_SCOPE void TclCompileTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, CompileEnv *envPtr); MODULE_SCOPE int TclCreateAuxData(ClientData clientData, - AuxDataType *typePtr, CompileEnv *envPtr); + CONST AuxDataType *typePtr, CompileEnv *envPtr); MODULE_SCOPE int TclCreateExceptRange(ExceptionRangeType type, CompileEnv *envPtr); MODULE_SCOPE ExecEnv * TclCreateExecEnv(Tcl_Interp *interp); @@ -930,7 +930,7 @@ MODULE_SCOPE void TclPrintObject(FILE *outFile, Tcl_Obj *objPtr, int maxChars); MODULE_SCOPE void TclPrintSource(FILE *outFile, const char *string, int maxChars); -MODULE_SCOPE void TclRegisterAuxDataType(AuxDataType *typePtr); +MODULE_SCOPE void TclRegisterAuxDataType(CONST AuxDataType *typePtr); MODULE_SCOPE int TclRegisterLiteral(CompileEnv *envPtr, char *bytes, int length, int flags); MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index fd79931..1275aed 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.412 2008/09/18 15:43:15 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.413 2008/10/05 20:47:52 nijtmans Exp $ */ #include "tclInt.h" @@ -80,7 +80,7 @@ int tclTraceExec = 0; * disjoint for backward-compatability reasons. */ -static const char *operatorStrings[] = { +static const char *const operatorStrings[] = { "||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>", "+", "-", "*", "/", "%", "+", "-", "~", "!", "BUILTIN FUNCTION", "FUNCTION", @@ -93,7 +93,7 @@ static const char *operatorStrings[] = { */ #ifdef TCL_COMPILE_DEBUG -static const char *resultStrings[] = { +static const char *const resultStrings[] = { "TCL_OK", "TCL_ERROR", "TCL_RETURN", "TCL_BREAK", "TCL_CONTINUE" }; #endif @@ -123,7 +123,7 @@ long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS] = { 0, 0, 0, 0, 0 }; */ typedef struct { - char *name; /* Name of function. */ + const char *name; /* Name of function. */ int numArgs; /* Number of arguments for function. */ } BuiltinFunc; @@ -133,7 +133,7 @@ typedef struct { * operand byte. */ -static BuiltinFunc tclBuiltinFuncTable[] = { +static BuiltinFunc const tclBuiltinFuncTable[] = { {"acos", 1}, {"asin", 1}, {"atan", 1}, @@ -1820,7 +1820,7 @@ TclExecuteByteCode( int traceInstructions = (tclTraceExec == 3); char cmdNameBuf[21]; #endif - char *curInstName = NULL; + const char *curInstName = NULL; /* * The execution uses a unified stack: first a BottomData, immediately diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 8213109..3dfdfb7 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.127 2008/07/29 05:30:32 msofer Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.128 2008/10/05 20:47:52 nijtmans Exp $ library tcl @@ -576,7 +576,7 @@ declare 144 generic { int index) } declare 145 generic { - struct AuxDataType *TclGetAuxDataType(char *typeName) + CONST86 struct AuxDataType *TclGetAuxDataType(CONST char *typeName) } declare 146 generic { TclHandle TclHandleCreate(VOID *ptr) @@ -645,13 +645,13 @@ declare 162 generic { void TclChannelEventScriptInvoker(ClientData clientData, int flags) } -# ALERT: The result of 'TclGetInstructionTable' is actually an -# "InstructionDesc*" but we do not want to describe this structure in +# ALERT: The result of 'TclGetInstructionTable' is actually a +# "const InstructionDesc*" but we do not want to describe this structure in # "tclInt.h". It is described in "tclCompile.h". Use a cast to the # correct type when calling this procedure. declare 163 generic { - void *TclGetInstructionTable(void) + CONST86 void *TclGetInstructionTable(void) } # ALERT: The argument of 'TclExpandCodeArray' is actually a diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 2148ab6..b12fa91 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.123 2008/07/29 05:30:34 msofer Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.124 2008/10/05 20:47:52 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -681,7 +681,7 @@ EXTERN void TclHideLiteral (Tcl_Interp * interp, #ifndef TclGetAuxDataType_TCL_DECLARED #define TclGetAuxDataType_TCL_DECLARED /* 145 */ -EXTERN struct AuxDataType * TclGetAuxDataType (char * typeName); +EXTERN CONST86 struct AuxDataType * TclGetAuxDataType (CONST char * typeName); #endif #ifndef TclHandleCreate_TCL_DECLARED #define TclHandleCreate_TCL_DECLARED @@ -764,7 +764,7 @@ EXTERN void TclChannelEventScriptInvoker (ClientData clientData, #ifndef TclGetInstructionTable_TCL_DECLARED #define TclGetInstructionTable_TCL_DECLARED /* 163 */ -EXTERN void * TclGetInstructionTable (void); +EXTERN CONST86 void * TclGetInstructionTable (void); #endif #ifndef TclExpandCodeArray_TCL_DECLARED #define TclExpandCodeArray_TCL_DECLARED @@ -1278,7 +1278,7 @@ typedef struct TclIntStubs { int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ - struct AuxDataType * (*tclGetAuxDataType) (char * typeName); /* 145 */ + CONST86 struct AuxDataType * (*tclGetAuxDataType) (CONST char * typeName); /* 145 */ TclHandle (*tclHandleCreate) (VOID * ptr); /* 146 */ void (*tclHandleFree) (TclHandle handle); /* 147 */ TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ @@ -1296,7 +1296,7 @@ typedef struct TclIntStubs { void *reserved160; int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ - void * (*tclGetInstructionTable) (void); /* 163 */ + CONST86 void * (*tclGetInstructionTable) (void); /* 163 */ void (*tclExpandCodeArray) (void * envPtr); /* 164 */ void (*tclpSetInitialEncodings) (void); /* 165 */ int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ -- cgit v0.12 From d663ac8e9131b33c795b6a046e1114156c2062b8 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 5 Oct 2008 21:27:07 +0000 Subject: * libtommath/bn_mp_sqrt.c (bn_mp_sqrt): Handle the case where * tests/expr.test (expr-47.13): a number's square root is between n< + + * libtommath/bn_mp_sqrt.c (bn_mp_sqrt): Handle the case where + * tests/expr.test (expr-47.13): a number's square root + is between n< * generic/tclInt.decls: CONSTified the AuxDataType argument diff --git a/libtommath/bn_mp_sqrt.c b/libtommath/bn_mp_sqrt.c index 3aa0f38..0bba337 100644 --- a/libtommath/bn_mp_sqrt.c +++ b/libtommath/bn_mp_sqrt.c @@ -27,7 +27,7 @@ int mp_sqrt(mp_int *arg, mp_int *ret) mp_int t1,t2; int i, j, k; #ifndef NO_FLOATING_POINT - double d; + volatile double d; mp_digit dig; #endif @@ -64,12 +64,29 @@ int mp_sqrt(mp_int *arg, mp_int *ret) for (k = arg->used-1; k >= j; --k) { d = ldexp(d, DIGIT_BIT) + (double) (arg->dp[k]); } + + /* + * At this point, d is the nearest floating point number to the most + * significant 1 or 2 mp_digits of arg. Extract its square root. + */ + d = sqrt(d); + + /* dig is the most significant mp_digit of the square root */ + dig = (mp_digit) ldexp(d, -DIGIT_BIT); + + /* + * If the most significant digit is nonzero, find the next digit down + * by subtracting DIGIT_BIT times thie most significant digit. + * Subtract one from the result so that our initial estimate is always + * low. + */ + if (dig) { t1.used = i+2; d -= ldexp((double) dig, DIGIT_BIT); - if (d != 0.0) { + if (d >= 1.0) { t1.dp[i+1] = dig; t1.dp[i] = ((mp_digit) d) - 1; } else { @@ -126,5 +143,5 @@ E2: mp_clear(&t1); /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_sqrt.c,v $ */ /* Based on Tom's 1.3 */ -/* $Revision: 1.5 $ */ -/* $Date: 2006/12/01 05:48:23 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2008/10/05 21:27:07 $ */ diff --git a/tests/expr.test b/tests/expr.test index d0aaadb..e51e4c1 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.72 2008/03/10 16:18:55 dgp Exp $ +# RCS: @(#) $Id: expr.test,v 1.73 2008/10/05 21:27:07 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -6770,6 +6770,7 @@ test expr-47.11 {isqrt of zero} { test expr-47.12 {isqrt of various sizes of integer} { set faults 0 + set trouble {} for {set i 0} {$faults < 10 && $i <= 1024} {incr i} { set root [expr {1 << $i}] set rm1 [expr {$root - 1}] @@ -6796,6 +6797,26 @@ test expr-47.12 {isqrt of various sizes of integer} { set trouble } {} +test expr-47.13 {isqrt and floating point rounding (Bug 2143288)} { + set trouble {} + set faults 0 + for {set i 0} {$i < 29 && $faults < 10} {incr i} { + for {set j 0} {$j <= $i} {incr j} { + set k [expr {isqrt((1<<56)+(1<<$i)+(1<<$j))}] + if {$k != (1<<28)} { + append trouble "i = $i, j = $j, k = $k\n" + incr faults + } + } + set k [expr {isqrt((1<<56)+(1<<29)+(1<<$i))}] + if {$k != (1<<28)+1} { + append trouble "i = $i, k = $k\n" + incr faults + } + } + set trouble +} {} + test expr-48.1 {Bug 1770224} { expr {-0x8000000000000001 >> 0x8000000000000000} } -1 -- cgit v0.12 From c095ba4368ae987448c8141e73b12276031ed168 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 5 Oct 2008 22:12:20 +0000 Subject: TIP #331 IMPLEMENTATION * generic/tclListObj.c (TclLsetFlat): * tests/lset.test: Modified the [lset] command so that it allows for an index of 'end+1', which has the effect of appending an element to the list. --- ChangeLog | 7 +++++ generic/tclListObj.c | 25 ++++++++++++---- tests/lset.test | 84 +++++++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 99 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 324dfba..48873be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,13 @@ is between n< diff --git a/generic/tclListObj.c b/generic/tclListObj.c index aebaee8..68db503 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.53 2008/09/10 13:03:33 dkf Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.54 2008/10/05 22:12:20 kennykb Exp $ */ #include "tclInt.h" @@ -1271,7 +1271,7 @@ TclLsetFlat( /* Index args. */ Tcl_Obj *valuePtr) /* Value arg to 'lset'. */ { - int index, result; + int index, result, len; Tcl_Obj *subListPtr, *retValuePtr, *chainPtr; /* @@ -1335,7 +1335,7 @@ TclLsetFlat( } indexArray++; - if (index < 0 || index >= elemCount) { + if (index < 0 || index > elemCount) { /* ...the index points outside the sublist. */ Tcl_SetObjResult(interp, Tcl_NewStringObj("list index out of range", -1)); @@ -1352,7 +1352,11 @@ TclLsetFlat( result = TCL_OK; if (--indexCount) { parentList = subListPtr; - subListPtr = elemPtrs[index]; + if (index == elemCount) { + subListPtr = Tcl_NewObj(); + } else { + subListPtr = elemPtrs[index]; + } if (Tcl_IsShared(subListPtr)) { subListPtr = Tcl_DuplicateObj(subListPtr); } @@ -1366,7 +1370,11 @@ TclLsetFlat( * make and store another copy. */ - TclListObjSetElement(NULL, parentList, index, subListPtr); + if (index == elemCount) { + Tcl_ListObjAppendElement(NULL, parentList, subListPtr); + } else { + TclListObjSetElement(NULL, parentList, index, subListPtr); + } if (Tcl_IsShared(subListPtr)) { subListPtr = Tcl_DuplicateObj(subListPtr); TclListObjSetElement(NULL, parentList, index, subListPtr); @@ -1428,7 +1436,12 @@ TclLsetFlat( } /* Store valuePtr in proper sublist and return */ - TclListObjSetElement(NULL, subListPtr, index, valuePtr); + Tcl_ListObjLength(NULL, subListPtr, &len); + if (index == len) { + Tcl_ListObjAppendElement(NULL, subListPtr, valuePtr); + } else { + TclListObjSetElement(NULL, subListPtr, index, valuePtr); + } Tcl_InvalidateStringRep(subListPtr); Tcl_IncrRefCount(retValuePtr); return retValuePtr; diff --git a/tests/lset.test b/tests/lset.test index b6d8758..63c0975 100644 --- a/tests/lset.test +++ b/tests/lset.test @@ -100,13 +100,19 @@ test lset-4.3 {lset, not compiled, 3 args, index out of range} testevalex { test lset-4.4 {lset, not compiled, 3 args, index out of range} testevalex { set a {x y z} list [catch { - testevalex {lset a [list 3] w} + testevalex {lset a [list 4] w} } msg] $msg } {1 {list index out of range}} -test lset-4.5 {lset, not compiled, 3 args, index out of range} testevalex { +test lset-4.5a {lset, not compiled, 3 args, index out of range} testevalex { set a {x y z} list [catch { - testevalex {lset a [list end--1] w} + testevalex {lset a [list end--2] w} + } msg] $msg +} {1 {list index out of range}} +test lset-4.5b {lset, not compiled, 3 args, index out of range} testevalex { + set a {x y z} + list [catch { + testevalex {lset a [list end+2] w} } msg] $msg } {1 {list index out of range}} test lset-4.6 {lset, not compiled, 3 args, index out of range} testevalex { @@ -136,13 +142,19 @@ test lset-4.9 {lset, not compiled, 3 args, index out of range} testevalex { test lset-4.10 {lset, not compiled, 3 args, index out of range} testevalex { set a {x y z} list [catch { - testevalex {lset a 3 w} + testevalex {lset a 4 w} + } msg] $msg +} {1 {list index out of range}} +test lset-4.11a {lset, not compiled, 3 args, index out of range} testevalex { + set a {x y z} + list [catch { + testevalex {lset a end--2 w} } msg] $msg } {1 {list index out of range}} test lset-4.11 {lset, not compiled, 3 args, index out of range} testevalex { set a {x y z} list [catch { - testevalex {lset a end--1 w} + testevalex {lset a end+2 w} } msg] $msg } {1 {list index out of range}} test lset-4.12 {lset, not compiled, 3 args, index out of range} testevalex { @@ -275,19 +287,27 @@ test lset-8.6 {lset, not compiled, second index out of range} testevalex { } {1 {list index out of range}} test lset-8.7 {lset, not compiled, second index out of range} testevalex { set a {{b c} {d e} {f g}} - list [catch {testevalex {lset a 2 2 h}} msg] $msg + list [catch {testevalex {lset a 2 3 h}} msg] $msg } {1 {list index out of range}} test lset-8.8 {lset, not compiled, second index out of range} testevalex { set a {{b c} {d e} {f g}} - list [catch {testevalex {lset a {2 2} h}} msg] $msg + list [catch {testevalex {lset a {2 3} h}} msg] $msg +} {1 {list index out of range}} +test lset-8.9a {lset, not compiled, second index out of range} testevalex { + set a {{b c} {d e} {f g}} + list [catch {testevalex {lset a 2 end--2 h}} msg] $msg } {1 {list index out of range}} -test lset-8.9 {lset, not compiled, second index out of range} testevalex { +test lset-8.9b {lset, not compiled, second index out of range} testevalex { set a {{b c} {d e} {f g}} - list [catch {testevalex {lset a 2 end--1 h}} msg] $msg + list [catch {testevalex {lset a 2 end+2 h}} msg] $msg } {1 {list index out of range}} -test lset-8.10 {lset, not compiled, second index out of range} testevalex { +test lset-8.10a {lset, not compiled, second index out of range} testevalex { set a {{b c} {d e} {f g}} - list [catch {testevalex {lset a {2 end--1} h}} msg] $msg + list [catch {testevalex {lset a {2 end--2} h}} msg] $msg +} {1 {list index out of range}} +test lset-8.10b {lset, not compiled, second index out of range} testevalex { + set a {{b c} {d e} {f g}} + list [catch {testevalex {lset a {2 end+2} h}} msg] $msg } {1 {list index out of range}} test lset-8.11 {lset, not compiled, second index out of range} testevalex { set a {{b c} {d e} {f g}} @@ -407,6 +427,48 @@ test lset-15.1 {lset: shared intrep [Bug 1677512]} -setup { unset -nocomplain x l } -result 1 +test lset-16.1 {lset - grow a variable} testevalex { + set x {} + testevalex {lset x 0 {test 1}} + testevalex {lset x 1 {test 2}} + set x +} {{test 1} {test 2}} +test lset-16.2 {lset - multiple created sublists} testevalex { + set x {} + testevalex {lset x 0 0 {test 1}} +} {{{test 1}}} +test lset-16.3 {lset - sublists 3 deep} testevalex { + set x {} + testevalex {lset x 0 0 0 {test 1}} +} {{{{test 1}}}} +test lset-16.4 {lset - append to inner list} testevalex { + set x {test 1} + testevalex {lset x 1 1 2} + testevalex {lset x 1 2 3} + testevalex {lset x 1 2 1 4} +} {test {1 2 {3 4}}} + +test lset-16.5 {lset - grow a variable} testevalex { + set x {} + testevalex {lset x end+1 {test 1}} + testevalex {lset x end+1 {test 2}} + set x +} {{test 1} {test 2}} +test lset-16.6 {lset - multiple created sublists} testevalex { + set x {} + testevalex {lset x end+1 end+1 {test 1}} +} {{{test 1}}} +test lset-16.7 {lset - sublists 3 deep} testevalex { + set x {} + testevalex {lset x end+1 end+1 end+1 {test 1}} +} {{{{test 1}}}} +test lset-16.8 {lset - append to inner list} testevalex { + set x {test 1} + testevalex {lset x end end+1 2} + testevalex {lset x end end+1 3} + testevalex {lset x end end end+1 4} +} {test {1 2 {3 4}}} + catch {unset noRead} catch {unset noWrite} catch {rename failTrace {}} -- cgit v0.12 From 06d77e88c1820d6b44d1450d66d93d5950779ea8 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 5 Oct 2008 22:25:35 +0000 Subject: * doc/FileSystem.3: CONSTified Tcl_FSFileAttrStringsProc * generic/tclFCmd.c: and tclpFileAttrStrings. This allows * generic/tclIOUtil.c: FileSystems to report their attributes * generic/tclTest.c: as const strings, without worrying that * unix/tclUnixFCmd.c: Tcl modifies them (which Tcl should not * win/tclWinFCmd.c: do anyway, but the API didn't indicate that) * generic/tcl.decls * generic/tclDecls.h: regenerated * generic/tcl.h: make sure that if CONST84 is defined as empty, CONST86 should be defined as empty as well (unless overridden). This change complies with TIP #27 *** POTENTIAL INCOMPATIBILITY *** --- ChangeLog | 23 +++++++++++++++++------ doc/FileSystem.3 | 4 ++-- generic/tcl.decls | 4 ++-- generic/tcl.h | 6 +++--- generic/tclDecls.h | 6 +++--- generic/tclFCmd.c | 16 +++++++++------- generic/tclIOUtil.c | 10 +++++----- generic/tclTest.c | 6 +++--- unix/tclUnixFCmd.c | 8 ++++---- win/tclWinFCmd.c | 4 ++-- 10 files changed, 50 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48873be..085ee28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-10-05 Jan Nijtmans + + * doc/FileSystem.3: CONSTified Tcl_FSFileAttrStringsProc + * generic/tclFCmd.c: and tclpFileAttrStrings. This allows + * generic/tclIOUtil.c: FileSystems to report their attributes + * generic/tclTest.c: as const strings, without worrying that + * unix/tclUnixFCmd.c: Tcl modifies them (which Tcl should not + * win/tclWinFCmd.c: do anyway, but the API didn't indicate that) + * generic/tcl.decls + * generic/tclDecls.h: regenerated + * generic/tcl.h: make sure that if CONST84 is defined + as empty, CONST86 should be defined + as empty as well (unless overridden). + This change complies with TIP #27 + *** POTENTIAL INCOMPATIBILITY *** + 2008-10-05 Kevin B, Kenny * libtommath/bn_mp_sqrt.c (bn_mp_sqrt): Handle the case where @@ -13,14 +29,13 @@ for an index of 'end+1', which has the effect of appending an element to the list. -2008-10-04 Jan Nijtmans +2008-10-05 Jan Nijtmans * generic/tclInt.decls: CONSTified the AuxDataType argument * generic/tclCompCmds.c: of TclCreateAuxData and * generic/tclCompile.c TclRegisterAuxDataType and the return * generic/tclCompile.h values of TclGetAuxDataType and * generic/tclExecute.c TclGetInstructionTable - * ChangeLog * generic/tclIntDecls.h: regenerated This change complies with TIP #27 (even though it only involves internal function, so this is not even necessary). @@ -57,7 +72,6 @@ * generic/tcl.h * generic/tclIO.h * generic/tclIO.c - * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. @@ -67,7 +81,6 @@ * generic/tcl.decls: of Tcl_InitCustomHashTable. * generic/tcl.h * generic/tclHash.c - * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. @@ -78,7 +91,6 @@ * generic/tcl.h * generic/tclConfig.c * generic/tclPkgConfig.c - * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. @@ -87,7 +99,6 @@ * doc/GetIndex.3: CONSTified the tablePtr argument * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c - * ChangeLog * generic/tclDecls.h: regenerated This change complies with TIP #27. diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index eef980b..b3baf8f 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.65 2008/09/24 09:41:12 dkf Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.66 2008/10/05 22:25:35 nijtmans Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -1351,7 +1351,7 @@ not implemented, there is no need to implement the \fBget\fR and \fBset\fR methods. .PP .CS -typedef const char **\fBTcl_FSFileAttrStringsProc\fR( +typedef const char *const *\fBTcl_FSFileAttrStringsProc\fR( Tcl_Obj *\fIpathPtr\fR, Tcl_Obj **\fIobjPtrRef\fR); .CE diff --git a/generic/tcl.decls b/generic/tcl.decls index b64df6d..9290dcc 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.151 2008/10/04 12:33:34 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.152 2008/10/05 22:25:35 nijtmans Exp $ library tcl @@ -1613,7 +1613,7 @@ declare 452 generic { int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr) } declare 453 generic { - CONST char ** Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) + CONST char *CONST86 * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) } declare 454 generic { int Tcl_FSStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf) diff --git a/generic/tcl.h b/generic/tcl.h index 26187e3..909b9e8 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.274 2008/10/04 12:33:34 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.275 2008/10/05 22:25:35 nijtmans Exp $ */ #ifndef _TCL @@ -268,7 +268,7 @@ extern "C" { #endif #ifndef CONST86 -# define CONST86 CONST +# define CONST86 CONST84 #endif /* @@ -1618,7 +1618,7 @@ typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, int nextCheckpoint); typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); -typedef CONST char ** (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr, +typedef CONST char *CONST86 * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr); diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 2650172..8b7beaa 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.153 2008/10/04 12:33:34 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.154 2008/10/05 22:25:35 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -2760,7 +2760,7 @@ EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, #ifndef Tcl_FSFileAttrStrings_TCL_DECLARED #define Tcl_FSFileAttrStrings_TCL_DECLARED /* 453 */ -EXTERN CONST char ** Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, +EXTERN CONST char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); #endif #ifndef Tcl_FSStat_TCL_DECLARED @@ -4169,7 +4169,7 @@ typedef struct TclStubs { int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ - CONST char ** (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ + CONST char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions); /* 456 */ diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index d385f8e..6f92304 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.47 2008/09/24 19:31:29 dgp Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.48 2008/10/05 22:25:35 nijtmans Exp $ */ #include "tclInt.h" @@ -944,7 +944,8 @@ TclFileAttrsCmd( Tcl_Obj *const objv[]) /* The command line objects. */ { int result; - const char ** attributeStrings; + const char *const *attributeStrings; + const char **attributeStringsAllocated = NULL; Tcl_Obj *objStrings = NULL; int numObjStrings = -1; Tcl_Obj *filePtr; @@ -997,13 +998,14 @@ TclFileAttrsCmd( if (Tcl_ListObjLength(interp, objStrings, &numObjStrings) != TCL_OK) { goto end; } - attributeStrings = (const char **) + attributeStringsAllocated = (const char **) TclStackAlloc(interp, (1+numObjStrings) * sizeof(char *)); for (index = 0; index < numObjStrings; index++) { Tcl_ListObjIndex(interp, objStrings, index, &objPtr); - attributeStrings[index] = TclGetString(objPtr); + attributeStringsAllocated[index] = TclGetString(objPtr); } - attributeStrings[index] = NULL; + attributeStringsAllocated[index] = NULL; + attributeStrings = attributeStringsAllocated; } if (objc == 0) { /* @@ -1103,12 +1105,12 @@ TclFileAttrsCmd( result = TCL_OK; end: - if (numObjStrings != -1) { + if (attributeStringsAllocated != NULL) { /* * Free up the array we allocated. */ - TclStackFree(interp, (void *)attributeStrings); + TclStackFree(interp, attributeStringsAllocated); /* * We don't need this object that was passed to us any more. diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index d4e3325..077eb96 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.157 2008/09/30 16:29:47 dgp Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.158 2008/10/05 22:25:35 nijtmans Exp $ */ #include "tclInt.h" @@ -49,7 +49,7 @@ static void FsRecacheFilesystemList(void); * they are not (and should not be) used anywhere else. */ -MODULE_SCOPE const char * tclpFileAttrStrings[]; +MODULE_SCOPE const char *const tclpFileAttrStrings[]; MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; /* @@ -2133,7 +2133,7 @@ Tcl_FSUtime( *---------------------------------------------------------------------- */ -static const char ** +static const char *const * NativeFileAttrStrings( Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) @@ -2226,7 +2226,7 @@ NativeFileAttrsSet( *---------------------------------------------------------------------- */ -const char ** +const char *const * Tcl_FSFileAttrStrings( Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) @@ -2265,7 +2265,7 @@ TclFSFileAttrIndex( int *indexPtr) /* Where to write the found index. */ { Tcl_Obj *listObj = NULL; - const char **attrTable; + const char *const *attrTable; /* * Get the attribute table for the file. diff --git a/generic/tclTest.c b/generic/tclTest.c index b6230df..76252eb 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.125 2008/10/02 20:59:45 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.126 2008/10/05 22:25:35 nijtmans Exp $ */ #define TCL_TEST @@ -372,7 +372,7 @@ static int TestReportLoadFile(Tcl_Interp *interp, Tcl_FSUnloadFileProc **unloadProcPtr); static Tcl_Obj * TestReportLink(Tcl_Obj *path, Tcl_Obj *to, int linkType); -static const char ** TestReportFileAttrStrings( +static const char *const *TestReportFileAttrStrings( Tcl_Obj *fileName, Tcl_Obj **objPtrRef); static int TestReportFileAttrsGet(Tcl_Interp *interp, int index, Tcl_Obj *fileName, Tcl_Obj **objPtrRef); @@ -6173,7 +6173,7 @@ TestReportRemoveDirectory( errorPtr); } -static const char ** +static const char *const * TestReportFileAttrStrings( Tcl_Obj *fileName, Tcl_Obj **objPtrRef) diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 689f995..082449a 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.67 2008/09/27 19:48:06 dkf Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.68 2008/10/05 22:25:35 nijtmans Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -116,7 +116,7 @@ typedef int (TraversalProc)(Tcl_DString *srcPtr, Tcl_DString *dstPtr, */ extern TclFileAttrProcs tclpFileAttrProcs[]; -extern char *tclpFileAttrStrings[]; +extern const char *const tclpFileAttrStrings[]; #else enum { @@ -131,8 +131,8 @@ enum { UNIX_INVALID_ATTRIBUTE /* lint - last enum value needs no trailing , */ }; -MODULE_SCOPE const char *tclpFileAttrStrings[]; -const char *tclpFileAttrStrings[] = { +MODULE_SCOPE const char *const tclpFileAttrStrings[]; +const char *const tclpFileAttrStrings[] = { "-group", "-owner", "-permissions", #if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) "-readonly", diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 73fb8a1..92ef2e9 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.53 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.54 2008/10/05 22:25:35 nijtmans Exp $ */ #include "tclWinInt.h" @@ -56,7 +56,7 @@ static int attributeArray[] = {FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN, 0, FILE_ATTRIBUTE_READONLY, 0, FILE_ATTRIBUTE_SYSTEM}; -const char *tclpFileAttrStrings[] = { +const char *const tclpFileAttrStrings[] = { "-archive", "-hidden", "-longname", "-readonly", "-shortname", "-system", (char *) NULL }; -- cgit v0.12 From 1a00d8582f1c15d195130ae24310aea2acf2aedd Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 6 Oct 2008 04:25:24 +0000 Subject: missed commit of lset.n in TIP #331 changes. --- ChangeLog | 1 + doc/lset.n | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 085ee28..94fa784 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ TIP #331 IMPLEMENTATION + * doc/lset.n: * generic/tclListObj.c (TclLsetFlat): * tests/lset.test: Modified the [lset] command so that it allows for an index of 'end+1', which has the effect of appending an diff --git a/doc/lset.n b/doc/lset.n index 0e95353..e6966aa 100755 --- a/doc/lset.n +++ b/doc/lset.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lset.n,v 1.17 2008/07/13 23:15:23 nijtmans Exp $ +'\" RCS: @(#) $Id: lset.n,v 1.18 2008/10/06 04:25:24 kennykb Exp $ '\" .so man.macros .TH lset n 8.4 Tcl "Tcl Built-In Commands" @@ -49,9 +49,12 @@ replaced with \fInewValue\fR. This new list is stored in the variable \fIvarName\fR, and is also the return value from the \fBlset\fR command. .PP -If \fIindex\fR is negative or greater than or equal to the number +If \fIindex\fR is negative or greater than the number of elements in \fI$varName\fR, then an error occurs. .PP +If \fIindex\fR is equal to the numnber of elements in \fI$varName\fR, +then the given element is appended to the list. +.PP The interpretation of each simple \fIindex\fR value is the same as for the command \fBstring index\fR, supporting simple index arithmetic and indices relative to the end of the list. @@ -59,7 +62,8 @@ arithmetic and indices relative to the end of the list. If additional \fIindex\fR arguments are supplied, then each argument is used in turn to address an element within a sublist designated by the previous indexing operation, -allowing the script to alter elements in sublists. The command, +allowing the script to alter elements in sublists (or append elements +to sublists). The command, .CS lset a 1 2 newValue .CE @@ -71,9 +75,10 @@ replaces element 2 of sublist 1 with \fInewValue\fR. .PP The integer appearing in each \fIindex\fR argument must be greater than or equal to zero. The integer appearing in each \fIindex\fR -argument must be strictly less than the length of the corresponding -list. In other words, the \fBlset\fR command cannot change the size -of a list. If an index is outside the permitted range, an error is reported. +argument must be less than or equal to the length of the corresponding +list. In other words, the \fBlset\fR command can change the size +of a list only by appending an element (setting the one after the current +end). If an index is outside the permitted range, an error is reported. .SH EXAMPLES .PP In each of these examples, the initial value of \fIx\fR is: -- cgit v0.12 From 3053a0d10fc3b38c99ce4641bf28a9a9185b481c Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Mon, 6 Oct 2008 18:38:39 +0000 Subject: Fix for [Bug 1934200] --- ChangeLog | 5 +++++ tools/man2tcl.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 94fa784..1c677e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-06 Joe Mistachkin + + * tools/man2tcl.c: Added missing line from patch by Harald Oehlmann. + [Bug 1934200] + 2008-10-05 Jan Nijtmans * doc/FileSystem.3: CONSTified Tcl_FSFileAttrStringsProc diff --git a/tools/man2tcl.c b/tools/man2tcl.c index 7940325..a840f57 100644 --- a/tools/man2tcl.c +++ b/tools/man2tcl.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: man2tcl.c,v 1.15 2008/10/02 19:01:30 mistachkin Exp $ + * RCS: @(#) $Id: man2tcl.c,v 1.16 2008/10/06 18:38:39 mistachkin Exp $ */ static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08"; @@ -352,6 +352,7 @@ DoText( sscanf(p,"%d",&ch); PRINT(("text \\u%04x\n", ch)); while(*p&&*p!='\'') p++; + p++; } else if (*p != 0) { PRINT(("char {\\%c}\n", *p)); p++; -- cgit v0.12 From 214528104a75bc9ed80911e66d0f9f99a7ea69d1 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 6 Oct 2008 21:00:36 +0000 Subject: fixed constness of last commit for msvc --- ChangeLog | 4 ++++ generic/tclFCmd.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c677e6..df8d479 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-10-06 Pat Thoyts + + * generic/tclFCmd.c: Fix constness for msvc of last commit + 2008-10-06 Joe Mistachkin * tools/man2tcl.c: Added missing line from patch by Harald Oehlmann. diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 6f92304..0e78c4b 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.48 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.49 2008/10/06 21:00:37 patthoyts Exp $ */ #include "tclInt.h" @@ -1110,7 +1110,7 @@ TclFileAttrsCmd( * Free up the array we allocated. */ - TclStackFree(interp, attributeStringsAllocated); + TclStackFree(interp, (void *)attributeStringsAllocated); /* * We don't need this object that was passed to us any more. -- cgit v0.12 From 1586363b9e96784c9124092e4d4624d910812443 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 6 Oct 2008 21:27:05 +0000 Subject: Fixed up some erroneous tests that are failing on Vista/Server2008 systems --- ChangeLog | 1 + tests/winFCmd.test | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index df8d479..8750232 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2008-10-06 Pat Thoyts + * tests/winFCmd.test: Fixed some erroneous tests on Vista+. * generic/tclFCmd.c: Fix constness for msvc of last commit 2008-10-06 Joe Mistachkin diff --git a/tests/winFCmd.test b/tests/winFCmd.test index d9598b1..1199d65 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFCmd.test,v 1.44 2008/07/21 21:51:36 patthoyts Exp $ +# RCS: @(#) $Id: winFCmd.test,v 1.45 2008/10/06 21:27:05 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -20,6 +20,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Initialise the test constraints +testConstraint winVista 0 testConstraint win2000orXP 0 testConstraint winOlderThan2000 0 testConstraint testvolumetype [llength [info commands testvolumetype]] @@ -56,9 +57,13 @@ proc cleanup {args} { } if {[testConstraint winOnly]} { - if {[testConstraint nt] && [string index $tcl_platform(osVersion) 0]==5} { - # Warning: Win 6 will break this! - testConstraint win2000orXP 1 + set major [string index $tcl_platform(osVersion) 0] + if {[testConstraint nt] && $major > 4} { + if {$major > 5} { + testConstraint winVista 1 + } elseif {$major == 5} { + testConstraint win2000orXP 1 + } } else { testConstraint winOlderThan2000 1 } @@ -398,7 +403,8 @@ proc MakeFiles {dirname} { set inodes {} set ndx -1 while {1} { - if {$ndx > 10000} { + # upped to 50K for 64bit Server 2008 + if {$ndx > 50000} { return -code error "limit reached without finding a collistion." } set filename [file join $dirname Test[incr ndx]] @@ -1138,7 +1144,7 @@ test winFCmd-12.5 {ConvertFileNameFormat: absolute path} -body { } -constraints {win} -result {/ /} test winFCmd-12.6 {ConvertFileNameFormat: absolute path with drive} -setup { catch {file delete -force -- c:/td1} -} -constraints {win} -body { +} -constraints {win win2000orXP} -body { createfile c:/td1 {} string tolower [file attributes c:/td1 -longname] } -cleanup { -- cgit v0.12 From c3149ec5291e734cf63d2db8495775b1b56c833c Mon Sep 17 00:00:00 2001 From: das Date: Tue, 7 Oct 2008 01:15:34 +0000 Subject: fix warnings from 2008-10-05 constification --- generic/tclExecute.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 1275aed..a8c55fa 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.413 2008/10/05 20:47:52 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.414 2008/10/07 01:15:34 das Exp $ */ #include "tclInt.h" @@ -391,19 +391,21 @@ VarHashCreateVar( #define TCL_DTRACE_INST_NEXT() \ if (TCL_DTRACE_INST_DONE_ENABLED()) {\ if (curInstName) {\ - TCL_DTRACE_INST_DONE(curInstName, (int) CURR_DEPTH, tosPtr);\ + TCL_DTRACE_INST_DONE((char* ) curInstName, (int) CURR_DEPTH,\ + tosPtr);\ }\ curInstName = tclInstructionTable[*pc].name;\ if (TCL_DTRACE_INST_START_ENABLED()) {\ - TCL_DTRACE_INST_START(curInstName, (int) CURR_DEPTH, tosPtr);\ + TCL_DTRACE_INST_START((char*) curInstName, (int) CURR_DEPTH,\ + tosPtr);\ }\ } else if (TCL_DTRACE_INST_START_ENABLED()) {\ - TCL_DTRACE_INST_START(tclInstructionTable[*pc].name, (int) CURR_DEPTH,\ - tosPtr);\ + TCL_DTRACE_INST_START((char*) tclInstructionTable[*pc].name,\ + (int) CURR_DEPTH, tosPtr);\ } #define TCL_DTRACE_INST_LAST() \ if (TCL_DTRACE_INST_DONE_ENABLED() && curInstName) {\ - TCL_DTRACE_INST_DONE(curInstName, (int) CURR_DEPTH, tosPtr);\ + TCL_DTRACE_INST_DONE((char*) curInstName, (int) CURR_DEPTH, tosPtr);\ } /* -- cgit v0.12 From d840d15294bfb31000a42369bcbcda06f1c34557 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 7 Oct 2008 14:10:29 +0000 Subject: Documented channel transformations. --- ChangeLog | 5 ++ doc/chan.n | 37 ++++++++++--- doc/refchan.n | 8 +-- doc/transchan.n | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 201 insertions(+), 10 deletions(-) create mode 100644 doc/transchan.n diff --git a/ChangeLog b/ChangeLog index 8750232..aab2654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-07 Donal K. Fellows + + * doc/chan.n, doc/transchan.n: Documented the channel transformation + API of TIP #230. + 2008-10-06 Pat Thoyts * tests/winFCmd.test: Fixed some erroneous tests on Vista+. diff --git a/doc/chan.n b/doc/chan.n index 85d087f..4b7b041 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.19 2008/09/22 21:02:39 ferrieux Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.20 2008/10/07 14:10:29 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -330,7 +330,7 @@ This subcommand creates a new script level channel using the command prefix \fIcmdPrefix\fR as its handler. Any such channel is called a \fBreflected\fR channel. The specified command prefix, \fBcmdPrefix\fR, must be a non-empty list, and should provide the API described in the -\fBreflectedchan\fR manual page. The handle of the new channel is +\fBrefchan\fR manual page. The handle of the new channel is returned as the result of the \fBchan create\fR command, and the channel is open. Use either \fBclose\fR or \fBchan close\fR to remove the channel. @@ -349,7 +349,7 @@ mode, or an error is thrown. .PP The command prefix is executed in the global namespace, at the top of call stack, following the appending of arguments as described in the -\fBreflectedchan\fR manual page. Command resolution happens at the +\fBrefchan\fR manual page. Command resolution happens at the time of the call. Renaming the command, or destroying it means that the next call of a handler method may fail, causing the channel command invoking the handler to fail as well. Depending on the @@ -517,7 +517,7 @@ an extremely long line that exceeds the available memory to buffer it). Returns -1 if the channel was not opened for the mode in question. .TP \fBchan pipe\fR -. +.VS 8.6 Creates a standalone pipe whose read- and write-side channels are returned as a 2-element list, the first element being the read side and the second the write side. Can be useful e.g. to redirect @@ -525,6 +525,16 @@ separately stderr and stdout from a subprocess. To do this, spawn with "2>@" or ">@" redirection operators onto the write side of a pipe, and then immediately close it in the parent. This is necessary to get an EOF on the read side once the child has exited or otherwise closed its output. +.VE 8.6 +.TP +\fBchan pop \fIchannelId\fR +.VS 8.6 +Removes the topmost transformation from the channel \fIchannelId\fR, if there +is any. If there are no transformations added to \fIchannelId\fR, this is +equivalent to \fBchan close\fR of that channel. The result is normally the +empty string, but can be an error in some situations (i.e. where the +underlying system stream is closed and that results in an error). +.VE 8.6 .TP \fBchan postevent \fIchannelId eventSpec\fR . @@ -551,7 +561,7 @@ other interpreter will cause this subcommand to report an error. Another restriction is that it is not possible to post events that the I/O core has not registered an interest in. Trying to do so will cause the method to throw an error. See the command handler method -\fBwatch\fR described in \fBreflectedchan\fR, the document specifying +\fBwatch\fR described in \fBrefchan\fR, the document specifying the API of command handlers for reflected channels. .PP This command is \fBsafe\fR and made accessible to safe interpreters. @@ -562,6 +572,18 @@ a trusted interpreter. \fBChan event\fR handlers are \fIalways\fR executed in the interpreter that set them up. .RE .TP +\fBchan push \fIchannelId cmdPrefix\fR +.VS 8.6 +Adds a new transformation on top of the channel \fIchannelId\fR. The +\fIcmdPrefix\fR argument describes a list of one or more words which represent +a handler that will be used to implement the transformation. The command +prefix must provide the API described in the \fBtranschan\fR manual page. +The result of this subcommand is a handle to the transformation. Note that it +is important to make sure that the transformation is capable of supporting the +channel mode that it is used with or this can make the channel neither +readable nor writable. +.VE 8.6 +.TP \fBchan puts\fR ?\fB\-nonewline\fR? ?\fIchannelId\fR? \fIstring\fR . Writes \fIstring\fR to the channel named \fIchannelId\fR followed by a @@ -744,6 +766,9 @@ while {[\fBchan gets\fR $f line] >= 0} { .SH "SEE ALSO" close(n), eof(n), fblocked(n), fconfigure(n), fcopy(n), file(n), fileevent(n), flush(n), gets(n), open(n), puts(n), read(n), seek(n), -socket(n), tell(n), refchan(n) +socket(n), tell(n), refchan(n), transchan(n) .SH KEYWORDS channel, input, output, events, offset +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/refchan.n b/doc/refchan.n index d007c0f..4365512 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,13 +4,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.11 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.12 2008/10/07 14:10:29 dkf Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS .\" Note: do not modify the .SH NAME line immediately below! .SH NAME -refchan \- Command handler API of reflected channels, version 1 +refchan \- command handler API of reflected channels .SH SYNOPSIS \fBcmdPrefix \fIoption\fR ?\fIarg arg ...\fR? .BE @@ -273,6 +273,6 @@ sense either. This may be altered in the future (through extending the API defined here and changing its version number) should the function be used at some time in the future. .SH "SEE ALSO" -chan(n) +chan(n), transchan(n) .SH KEYWORDS -channel, reflection +API, channel, ensemble, prefix, reflection diff --git a/doc/transchan.n b/doc/transchan.n new file mode 100644 index 0000000..8cb5b57 --- /dev/null +++ b/doc/transchan.n @@ -0,0 +1,161 @@ +'\" +'\" Copyright (c) 2008 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: transchan.n,v 1.1 2008/10/07 14:10:29 dkf Exp $ +.so man.macros +.TH transchan n 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +transchan \- command handler API of channel transforms +.SH SYNOPSIS +\fBcmdPrefix \fIoption\fR ?\fIarg arg ...\fR? +.BE +.SH DESCRIPTION +.PP +The Tcl-level handler for a channel transformation has to be a command with +subcommands (termed an \fIensemble\fR despite not implying that it must be +created with \fBnamespace ensemble create\fR; this mechanism is not tied to +\fBnamespace ensemble\fR in any way). Note that \fIcmdPrefix\fR is whatever +was specified in the call to \fBchan push\fR, and may consist of multiple +arguments; this will be expanded to multiple words in place of the prefix. +.PP +Of all the possible subcommands, the handler \fImust\fR support +\fBinitialize\fR and \fBfinalize\fR. Transformations for writable channels +must also support \fBwrite\fR, and transformations for readable channels must +also support \fBread\fR. +.PP +Note that in the descriptions below \fIcmdPrefix\fR may be more than one word, +and \fIhandle\fR is the value returned by the \fBchan push\fR call used to +create the transformation. +.SS "GENERIC SUBCOMMANDS" +.PP +The following subcommands are relevant to all types of channel. +.TP +\fIcmdPrefix \fBfinalize \fIhandle\fR +. +This mandatory subcommand is called last for the given \fIhandle\fR, and then +never again, and it exists to allow for cleaning up any Tcl-level data +structures associated with the transformation. \fIWarning!\fR Any errors +thrown by this subcommand will be ignored. It is not guaranteed to be called +if the interpreter is deleted. +.TP +\fIcmdPrefix \fBclear \fIhandle\fR +. +This optional subcommand is called to signify to the transformation that any +data stored in internal buffers (either incoming or outgoing) must be +cleared. It is called when a \fBchan seek\fR is performed on the channel being +transformed. +.TP +\fIcmdPrefix \fBinitialize \fIhandle mode\fR +. +This mandatory subcommand is called first, and then never again (for the given +\fIhandle\fR). Its responsibility is to initialize all parts of the +transformation at the Tcl level. The \fImode\fR is a list containing any of +\fBread\fR and \fBwrite\fR. +.RS +.TP +\fBwrite\fR +. +implies that the channel is writable. +.TP +\fBread\fR +. +implies that the channel is readable. +.PP +The return value of the subcommand should be a list containing the names of +all subcommands supported by this handler. Any error thrown by the subcommand +will prevent the creation of the transformation. The thrown error will appear +as error thrown by \fBchan push\fR. +.RE +.SS "READ-RELATED SUBCOMMANDS" +.PP +These subcommands are used for handling transformations applied to readable +channels; though strictly \fBread\fR is optional, it must be supported if any +of the others is or the channel will be made non-readable. +.TP +\fIcmdPrefix \fBdrain \fIhandle\fR +. +This optional subcommand is called whenever data in the transformation input +(i.e. read) buffer has to be forced upward, i.e. towards the user or script. +The result returned by the method is taken as the \fIbinary\fR data to push +upward to the level above this transformation (the reader or a higher-level +transformation). +.RS +.PP +In other words, when this method is called the transformation cannot defer the +actual transformation operation anymore and has to transform all data waiting +in its internal read buffers and return the result of that action. +.RE +.TP +\fIcmdPrefix \fBlimit? \fIhandle\fR +. +This optional subcommand is called to allow the Tcl I/O engine to determine +how far ahead it should read. If present, it should return an integer number +greater than zero which indicates how many bytes ahead should be read, or an +integer less than zero to indicate that the I/O engine may read as far ahead +as it likes. +.TP +\fIcmdPrefix \fBread \fIhandle buffer\fR +. +This subcommand, which must be present if the transformation is to work with +readable channels, is called whenever the base channel, or a transformation +below this transformation, pushes data upward. The \fIbuffer\fR contains the +binary data which has been given to us from below. It is the responsibility of +this subcommand to actually transform the data. The result returned by the +subcommand is taken as the binary data to push further upward to the +transformation above this transformation. This can also be the user or script +that originally read from the channel. +.RS +.PP +Note that the result is allowed to be empty, or even less than the data we +received; the transformation is not required to transform everything given to +it right now. It is allowed to store incoming data in internal buffers and to +defer the actual transformation until it has more data. +.RE +.SS "WRITE-RELATED SUBCOMMANDS" +.PP +These subcommands are used for handling transformations applied to writable +channels; though strictly \fBwrite\fR is optional, it must be supported if any +of the others is or the channel will be made non-writable. +.TP +\fIcmdPrefix \fBflush \fIhandle\fR +. +This optional subcommand is called whenever data in the transformation 'write' +buffer has to be forced downward, i.e. towards the base channel. The result +returned by the subcommand is taken as the binary data to write to the +transformation below the current transformation. This can be the base channel +as well. +.RS +.PP +In other words, when this subcommand is called the transformation cannot defer +the actual transformation operation anymore and has to transform all data +waiting in its internal write buffers and return the result of that action. +.RE +.TP +\fIcmdPrefix \fBwrite \fIhandle buffer\fR +. +This subcommand, which must be present if the transformation is to work with +writable channels, is called whenever the user, or a transformation above this +transformation, writes data downward. The \fIbuffer\fR contains the binary +data which has been written to us. It is the responsibility of this subcommand +to actually transform the data. +.RS +.PP +The result returned by the subcommand is taken as the binary data to write to +the transformation below this transformation. This can be the base channel as +well. Note that the result is allowed to be empty, or less than the data we +got; the transformation is not required to transform everything which was +written to it right now. It is allowed to store this data in internal buffers +and to defer the actual transformation until it has more data. +.RE +.SH "SEE ALSO" +chan(n), refchan(n) +.SH KEYWORDS +API, channel, ensemble, prefix, transformation +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 35bac8b2387c036a6ac3ac6c699ddde95f050062 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 7 Oct 2008 15:00:10 +0000 Subject: Corrected order of subcommands in a section to be alphabetic --- doc/transchan.n | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/transchan.n b/doc/transchan.n index 8cb5b57..0716591 100644 --- a/doc/transchan.n +++ b/doc/transchan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: transchan.n,v 1.1 2008/10/07 14:10:29 dkf Exp $ +'\" RCS: @(#) $Id: transchan.n,v 1.2 2008/10/07 15:00:10 dkf Exp $ .so man.macros .TH transchan n 8.6 Tcl "Tcl Built-In Commands" .BS @@ -35,6 +35,13 @@ create the transformation. .PP The following subcommands are relevant to all types of channel. .TP +\fIcmdPrefix \fBclear \fIhandle\fR +. +This optional subcommand is called to signify to the transformation that any +data stored in internal buffers (either incoming or outgoing) must be +cleared. It is called when a \fBchan seek\fR is performed on the channel being +transformed. +.TP \fIcmdPrefix \fBfinalize \fIhandle\fR . This mandatory subcommand is called last for the given \fIhandle\fR, and then @@ -43,13 +50,6 @@ structures associated with the transformation. \fIWarning!\fR Any errors thrown by this subcommand will be ignored. It is not guaranteed to be called if the interpreter is deleted. .TP -\fIcmdPrefix \fBclear \fIhandle\fR -. -This optional subcommand is called to signify to the transformation that any -data stored in internal buffers (either incoming or outgoing) must be -cleared. It is called when a \fBchan seek\fR is performed on the channel being -transformed. -.TP \fIcmdPrefix \fBinitialize \fIhandle mode\fR . This mandatory subcommand is called first, and then never again (for the given -- cgit v0.12 From dbbfe378f614f96d7ab98c27bf89d733ba04d1b6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 7 Oct 2008 17:57:42 +0000 Subject: * generic/tclBasic.c: Move [tailcall], [coroutine] and * generic/tclCmdIL.c: [yield] out of ::tcl::unsupported * tests/info.test: and into global scope: TIPs #327 * tests/unsupported.test: and #328 --- ChangeLog | 7 +++ generic/tclBasic.c | 37 ++++++-------- generic/tclCmdIL.c | 3 +- generic/tclInt.h | 4 +- tests/info.test | 10 ++-- tests/unsupported.test | 128 ++++++++++++++++--------------------------------- 6 files changed, 74 insertions(+), 115 deletions(-) diff --git a/ChangeLog b/ChangeLog index aab2654..3fe1549 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-07 Miguel Sofer + + * generic/tclBasic.c: Move [tailcall], [coroutine] and + * generic/tclCmdIL.c: [yield] out of ::tcl::unsupported + * tests/info.test: and into global scope: TIPs #327 + * tests/unsupported.test: and #328 + 2008-10-07 Donal K. Fellows * doc/chan.n, doc/transchan.n: Documented the channel transformation diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 036707d..afddfb6 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.370 2008/10/03 00:01:35 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.371 2008/10/07 17:57:42 msofer Exp $ */ #include "tclInt.h" @@ -139,9 +139,6 @@ static Tcl_NRPostProc NRRunObjProc; static Tcl_NRPostProc AtProcExitCleanup; static Tcl_NRPostProc NRAtProcExitEval; -static int InfoCoroutineCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); - /* * The following structure define the commands in the Tcl core. */ @@ -216,7 +213,10 @@ static const CmdInfo builtInCmds[] = { {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1}, {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, TclNRWhileObjCmd, 1}, - + + {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1}, + {"yield", NULL, NULL, TclNRYieldObjCmd, 1}, + /* * Commands in the OS-interface. Note that many of these are unsafe. */ @@ -712,7 +712,8 @@ Tcl_CreateInterp(void) for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) { if ((cmdInfoPtr->objProc == NULL) - && (cmdInfoPtr->compileProc == NULL)) { + && (cmdInfoPtr->compileProc == NULL) + && (cmdInfoPtr->nreProc == NULL)) { Tcl_Panic("builtin command with NULL object command proc and a NULL compile proc"); } @@ -780,23 +781,16 @@ Tcl_CreateInterp(void) Tcl_DisassembleObjCmd, NULL, NULL); /* - * Create unsupported commands for tailcall, coroutine and yield - * Create unsupported commands for atProcExit and tailcall + * Create the 'tailcall' command an unsupported command for 'atProcExit' */ - Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit", - /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE), - NULL); - Tcl_NRCreateCommand(interp, "::tcl::unsupported::tailcall", + Tcl_NRCreateCommand(interp, "tailcall", /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_TAILCALL_TYPE), NULL); - Tcl_NRCreateCommand(interp, "::tcl::unsupported::coroutine", - /*objProc*/ NULL, TclNRCoroutineObjCmd, NULL, NULL); - Tcl_NRCreateCommand(interp, "::tcl::unsupported::yield", - /*objProc*/ NULL, TclNRYieldObjCmd, NULL, NULL); - Tcl_NRCreateCommand(interp, "::tcl::unsupported::infoCoroutine", - /*objProc*/ NULL, InfoCoroutineCmd, NULL, NULL); + Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit", + /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE), + NULL); #ifdef USE_DTRACE /* @@ -5626,7 +5620,6 @@ Tcl_EvalObj( { return Tcl_EvalObjEx(interp, objPtr, 0); } - #undef Tcl_GlobalEvalObj int Tcl_GlobalEvalObj( @@ -8490,11 +8483,11 @@ TclNRCoroutineObjCmd( } /* - * This belongs in the [info] ensemble later on + * This is used in the [info] ensemble */ -static int -InfoCoroutineCmd( +int +TclInfoCoroutineCmd( ClientData dummy, Tcl_Interp *interp, int objc, diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index cffc0dd..471560d 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.159 2008/10/04 18:06:48 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.160 2008/10/07 17:57:43 msofer Exp $ */ #include "tclInt.h" @@ -160,6 +160,7 @@ static const EnsembleImplMap defaultInfoMap[] = { {"cmdcount", InfoCmdCountCmd, NULL}, {"commands", InfoCommandsCmd, NULL}, {"complete", InfoCompleteCmd, NULL}, + {"coroutine", TclInfoCoroutineCmd, NULL}, {"default", InfoDefaultCmd, NULL}, {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd}, {"frame", InfoFrameCmd, NULL}, diff --git a/generic/tclInt.h b/generic/tclInt.h index 4704927..d33dd1d 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.401 2008/10/03 00:01:35 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.402 2008/10/07 17:57:43 msofer Exp $ */ #ifndef _TCLINT @@ -2663,6 +2663,8 @@ MODULE_SCOPE Tcl_Obj * TclIncrObjVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr, int flags); MODULE_SCOPE int TclInfoExistsCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int TclInfoCoroutineCmd(ClientData dummy, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); MODULE_SCOPE Tcl_Obj * TclInfoFrame(Tcl_Interp *interp, CmdFrame *framePtr); MODULE_SCOPE int TclInfoGlobalsCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/tests/info.test b/tests/info.test index 9f94dd3..1078536 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.60 2008/10/02 23:20:30 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.61 2008/10/07 17:57:43 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -675,16 +675,16 @@ test info-21.1 {miscellaneous error conditions} -returnCodes error -body { } -result {wrong # args: should be "info subcommand ?arg ...?"} test info-21.2 {miscellaneous error conditions} -returnCodes error -body { info gorp -} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.3 {miscellaneous error conditions} -returnCodes error -body { info c -} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.4 {miscellaneous error conditions} -returnCodes error -body { info l -} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.5 {miscellaneous error conditions} -returnCodes error -body { info s -} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} ## # ### ### ### ######### ######### ######### diff --git a/tests/unsupported.test b/tests/unsupported.test index 553021b..c41d4bc 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.11 2008/09/28 13:46:12 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.12 2008/10/07 17:57:43 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -18,8 +18,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint testnrelevels [llength [info commands testnrelevels]] testConstraint atProcExit [llength [info commands ::tcl::unsupported::atProcExit]] -testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]] -testConstraint coroutine [llength [info commands ::tcl::unsupported::yield]] if {[namespace exists tcl::unsupported]} { namespace eval tcl::unsupported namespace export * @@ -213,7 +211,7 @@ test unsupported-A9 {atProcExit and uplevel} -constraints {knownBug atProcExit} # Test tailcalls # -test unsupported-T.0 {tailcall is constant space} -constraints {tailcall} -setup { +test unsupported-T.0 {tailcall is constant space} -setup { proc a i { if {[incr i] > 10} { return [depthDiff] @@ -227,7 +225,7 @@ test unsupported-T.0 {tailcall is constant space} -constraints {tailcall} -setup rename a {} } -result {0 0 0 0 0 0} -test unsupported-T.1 {tailcall} -constraints {tailcall} -body { +test unsupported-T.1 {tailcall} -body { namespace eval a { variable x *::a proc xset {} { @@ -257,11 +255,11 @@ test unsupported-T.1 {tailcall} -constraints {tailcall} -body { } -result {1::b | 0:: *::a *::b | {{1 ::b::moo} {2 xset}}} -test unsupported-T.2 {tailcall in non-proc} -constraints {tailcall} -body { +test unsupported-T.2 {tailcall in non-proc} -body { namespace eval a [list tailcall set x 1] } -match glob -result *tailcall* -returnCodes error -test unsupported-T.3 {tailcall falls off tebc} -constraints {tailcall} -body { +test unsupported-T.3 {tailcall falls off tebc} -body { unset -nocomplain x proc foo {} {tailcall set x 1} list [catch foo msg] $msg [set x] @@ -270,7 +268,7 @@ test unsupported-T.3 {tailcall falls off tebc} -constraints {tailcall} -body { unset x } -result {0 1 1} -test unsupported-T.4 {tailcall falls off tebc} -constraints {tailcall} -body { +test unsupported-T.4 {tailcall falls off tebc} -body { set x 2 proc foo {} {tailcall set x 1} foo @@ -280,7 +278,7 @@ test unsupported-T.4 {tailcall falls off tebc} -constraints {tailcall} -body { unset x } -result 1 -test unsupported-T.5 {tailcall falls off tebc} -constraints {tailcall} -body { +test unsupported-T.5 {tailcall falls off tebc} -body { set x 2 namespace eval bar { variable x 3 @@ -293,7 +291,7 @@ test unsupported-T.5 {tailcall falls off tebc} -constraints {tailcall} -body { namespace delete bar } -result {1 3} -test unsupported-T.6 {tailcall does remove callframes} -constraints {tailcall} -body { +test unsupported-T.6 {tailcall does remove callframes} -body { proc foo {} {info level} proc moo {} {tailcall foo} proc boo {} {expr {[moo] - [info level]}} @@ -304,7 +302,7 @@ test unsupported-T.6 {tailcall does remove callframes} -constraints {tailcall} - rename boo {} } -result 1 -test unsupported-T.7 {tailcall does return} -constraints {tailcall} -setup { +test unsupported-T.7 {tailcall does return} -setup { namespace eval ::foo { variable res {} proc a {} { @@ -332,7 +330,7 @@ test unsupported-T.7 {tailcall does return} -constraints {tailcall} -setup { namespace delete ::foo } -result cbabc -test unsupported-T.8 {tailcall tailcall} -constraints {tailcall} -setup { +test unsupported-T.8 {tailcall tailcall} -setup { namespace eval ::foo { variable res {} proc a {} { @@ -360,7 +358,7 @@ test unsupported-T.8 {tailcall tailcall} -constraints {tailcall} -setup { namespace delete ::foo } -match glob -result *tailcall* -returnCodes error -test unsupported-T.9 {tailcall factorial} -constraints {tailcall} -setup { +test unsupported-T.9 {tailcall factorial} -setup { proc fact {n {b 1}} { if {$n == 1} { return $b @@ -400,7 +398,7 @@ test unsupported-T.11 {tailcall and uplevel} -constraints {knownBug atProcExit} # test unsupported-AT.1 {atProcExit and tailcall} -constraints { - atProcExit tailcall + atProcExit } -setup { variable x x y y proc a {} { @@ -424,11 +422,6 @@ test unsupported-AT.1 {atProcExit and tailcall} -constraints { # Test coroutines # -if {[testConstraint coroutine]} { - namespace import tcl::unsupported::coroutine - namespace import tcl::unsupported::yield -} - set lambda [list {{start 0} {stop 10}} { # init set i $start @@ -442,8 +435,7 @@ set lambda [list {{start 0} {stop 10}} { }] -test unsupported-C.1.1 {coroutine basic} -constraints {coroutine} \ --setup { +test unsupported-C.1.1 {coroutine basic} -setup { coroutine foo ::apply $lambda set res {} } -body { @@ -456,8 +448,7 @@ test unsupported-C.1.1 {coroutine basic} -constraints {coroutine} \ unset res } -result {0 10 20} -test unsupported-C.1.2 {coroutine basic} -constraints {coroutine} \ --setup { +test unsupported-C.1.2 {coroutine basic} -setup { coroutine foo ::apply $lambda 2 8 set res {} } -body { @@ -470,8 +461,7 @@ test unsupported-C.1.2 {coroutine basic} -constraints {coroutine} \ unset res } -result {16 24 32} -test unsupported-C.1.3 {yield returns new arg} -constraints {coroutine} \ --setup { +test unsupported-C.1.3 {yield returns new arg} -setup { set body { # init set i $start @@ -495,8 +485,7 @@ test unsupported-C.1.3 {yield returns new arg} -constraints {coroutine} \ unset res } -result {20 6 12} -test unsupported-C.1.4 {yield in nested proc} -constraints {coroutine} \ --setup { +test unsupported-C.1.4 {yield in nested proc} -setup { proc moo {} { upvar 1 i i stop stop yield [expr {$i*$stop}] @@ -525,24 +514,21 @@ test unsupported-C.1.4 {yield in nested proc} -constraints {coroutine} \ unset body res } -result {0 10 20} -test unsupported-C.1.5 {just yield} -constraints {coroutine} \ --body { +test unsupported-C.1.5 {just yield} -body { coroutine foo yield list [foo] [catch foo msg] $msg } -cleanup { unset msg } -result {{} 1 {invalid command name "foo"}} -test unsupported-C.1.6 {just yield} -constraints {coroutine} \ --body { +test unsupported-C.1.6 {just yield} -body { coroutine foo [list yield] list [foo] [catch foo msg] $msg } -cleanup { unset msg } -result {{} 1 {invalid command name "foo"}} -test unsupported-C.1.7 {yield in nested uplevel} -constraints {coroutine} \ --setup { +test unsupported-C.1.7 {yield in nested uplevel} -setup { set body { # init set i $start @@ -566,8 +552,7 @@ test unsupported-C.1.7 {yield in nested uplevel} -constraints {coroutine} \ unset body res } -result {0 10 20} -test unsupported-C.1.8 {yield in nested uplevel} -constraints {coroutine} \ --setup { +test unsupported-C.1.8 {yield in nested uplevel} -setup { set body { # init set i $start @@ -591,8 +576,7 @@ test unsupported-C.1.8 {yield in nested uplevel} -constraints {coroutine} \ unset body res } -result {0 10 20} -test unsupported-C.1.9 {yield in nested eval} -constraints {coroutine} \ --setup { +test unsupported-C.1.9 {yield in nested eval} -setup { proc moo {} { upvar 1 i i stop stop yield [expr {$i*$stop}] @@ -620,8 +604,7 @@ test unsupported-C.1.9 {yield in nested eval} -constraints {coroutine} \ unset body res } -result {0 10 20} -test unsupported-C.1.10 {yield in nested eval} -constraints {coroutine} \ --setup { +test unsupported-C.1.10 {yield in nested eval} -setup { set body { # init set i $start @@ -644,8 +627,7 @@ test unsupported-C.1.10 {yield in nested eval} -constraints {coroutine} \ unset body res } -result {0 10 20} -test unsupported-C.1.11 {yield outside coroutine} -constraints {coroutine} \ --setup { +test unsupported-C.1.11 {yield outside coroutine} -setup { proc moo {} { upvar 1 i i stop stop yield [expr {$i*$stop}] @@ -658,8 +640,7 @@ test unsupported-C.1.11 {yield outside coroutine} -constraints {coroutine} \ unset i stop } -returnCodes error -result {yield can only be called in a coroutine} -test unsupported-C.1.12 {proc as coroutine} -constraints {coroutine} \ --setup { +test unsupported-C.1.12 {proc as coroutine} -setup { set body { # init set i $start @@ -681,44 +662,37 @@ test unsupported-C.1.12 {proc as coroutine} -constraints {coroutine} \ rename foo {} } -result {16 24} -test unsupported-C.2.1 {self deletion on return} -constraints {coroutine} \ --body { +test unsupported-C.2.1 {self deletion on return} -body { coroutine foo set x 3 foo } -returnCodes error -result {invalid command name "foo"} -test unsupported-C.2.2 {self deletion on return} -constraints {coroutine} \ --body { +test unsupported-C.2.2 {self deletion on return} -body { coroutine foo ::apply [list {} {yield; yield 1; return 2}] list [foo] [foo] [catch foo msg] $msg } -result {1 2 1 {invalid command name "foo"}} -test unsupported-C.2.3 {self deletion on error return} -constraints {coroutine} \ --body { +test unsupported-C.2.3 {self deletion on error return} -body { coroutine foo ::apply [list {} {yield;yield 1; error ouch!}] list [foo] [catch foo msg] $msg [catch foo msg] $msg } -result {1 1 ouch! 1 {invalid command name "foo"}} -test unsupported-C.2.4 {self deletion on other return} -constraints {coroutine} \ --body { +test unsupported-C.2.4 {self deletion on other return} -body { coroutine foo ::apply [list {} {yield;yield 1; return -code 100 ouch!}] list [foo] [catch foo msg] $msg [catch foo msg] $msg } -result {1 100 ouch! 1 {invalid command name "foo"}} -test unsupported-C.2.5 {deletion of suspended coroutine} -constraints {coroutine} \ --body { +test unsupported-C.2.5 {deletion of suspended coroutine} -body { coroutine foo ::apply [list {} {yield; yield 1; return 2}] list [foo] [rename foo {}] [catch foo msg] $msg } -result {1 {} 1 {invalid command name "foo"}} -test unsupported-C.2.6 {deletion of running coroutine} -constraints {coroutine} \ --body { +test unsupported-C.2.6 {deletion of running coroutine} -body { coroutine foo ::apply [list {} {yield; rename foo {}; yield 1; return 2}] list [foo] [catch foo msg] $msg } -result {1 1 {invalid command name "foo"}} -test unsupported-C.3.1 {info level computation} -constraints {coroutine} \ --setup { +test unsupported-C.3.1 {info level computation} -setup { proc a {} {while 1 {yield [info level]}} proc b {} foo } -body { @@ -732,8 +706,7 @@ test unsupported-C.3.1 {info level computation} -constraints {coroutine} \ rename b {} } -result {1 1 1} -test unsupported-C.3.2 {info frame computation} -constraints {coroutine} \ --setup { +test unsupported-C.3.2 {info frame computation} -setup { proc a {} {while 1 {yield [info frame]}} proc b {} foo } -body { @@ -746,9 +719,8 @@ test unsupported-C.3.2 {info frame computation} -constraints {coroutine} \ rename b {} } -result 1 -test unsupported-C.3.3 {info coroutine} -constraints {coroutine} \ --setup { - proc a {} {infoCoroutine} +test unsupported-C.3.3 {info coroutine} -setup { + proc a {} {info coroutine} proc b {} a } -body { b @@ -757,9 +729,8 @@ test unsupported-C.3.3 {info coroutine} -constraints {coroutine} \ rename b {} } -result {} -test unsupported-C.3.4 {info coroutine} -constraints {coroutine} \ --setup { - proc a {} {infoCoroutine} +test unsupported-C.3.4 {info coroutine} -setup { + proc a {} {info coroutine} proc b {} a } -body { coroutine foo b @@ -769,8 +740,7 @@ test unsupported-C.3.4 {info coroutine} -constraints {coroutine} \ } -result ::foo -test unsupported-C.4.1 {bug #2093188} -constraints {coroutine} \ --setup { +test unsupported-C.4.1 {bug #2093188} -setup { proc foo {} { set v 1 trace add variable v {write unset} bar @@ -789,8 +759,7 @@ test unsupported-C.4.1 {bug #2093188} -constraints {coroutine} \ unset ::res } -result {{} 3 {{v {} write} {v {} write} {v {} unset}}} -test unsupported-C.4.2 {bug #2093188} -constraints {coroutine} \ --setup { +test unsupported-C.4.2 {bug #2093188} -setup { proc foo {} { set v 1 trace add variable v {read unset} bar @@ -810,8 +779,7 @@ test unsupported-C.4.2 {bug #2093188} -constraints {coroutine} \ unset ::res } -result {{} 3 {{v {} read} {v {} unset}}} -test unsupported-C.4.2 {bug #2093947} -constraints {coroutine} \ --setup { +test unsupported-C.4.2 {bug #2093947} -setup { proc foo {} { set v 1 trace add variable v {write unset} bar @@ -835,7 +803,7 @@ test unsupported-C.4.2 {bug #2093947} -constraints {coroutine} \ unset ::res } -result {{v {} write} {v {} write} {v {} unset} {v {} write} {v {} unset}} -test unsupported-C.5.1 {right numLevels on coro return} -constraints {coroutine testnrelevels} \ +test unsupported-C.5.1 {right numLevels on coro return} -constraints {testnrelevels} \ -setup { proc nestedYield {{val {}}} { yield $val @@ -878,7 +846,7 @@ test unsupported-C.5.1 {right numLevels on coro return} -constraints {coroutine unset res } -result {0 0 0 0 0 0} -test unsupported-C.5.2 {right numLevels within coro} -constraints {coroutine testnrelevels} \ +test unsupported-C.5.2 {right numLevels within coro} -constraints {testnrelevels} \ -setup { proc nestedYield {{val {}}} { yield $val @@ -904,9 +872,6 @@ test unsupported-C.5.2 {right numLevels within coro} -constraints {coroutine tes lappend res [eval {eval {a [getNumLevel]}}] set base [lindex $res 0] foreach x $res[set res {}] { - # REMARK: the first call is one level deeper due to [coroutine] being - # on the Tcl call stack: the proper result is a leading 0 and a - # sequence of -1s lappend res [expr {$x-$base}] } set res @@ -917,7 +882,7 @@ test unsupported-C.5.2 {right numLevels within coro} -constraints {coroutine tes rename getNumLevel {} rename relativeLevel {} unset res -} -result {0 -1 -1 -1} +} -result {0 0 0 0} @@ -927,19 +892,10 @@ test unsupported-C.5.2 {right numLevels within coro} -constraints {coroutine tes unset -nocomplain lambda -if {[testConstraint tailcall]} { - namespace forget tcl::unsupported::tailcall -} - if {[testConstraint atProcExit]} { namespace forget tcl::unsupported::atProcExit } -if {[testConstraint coroutine]} { - namespace forget tcl::unsupported::coroutine - namespace forget tcl::unsupported::yield -} - if {[testConstraint testnrelevels]} { namespace forget testnre::* namespace delete testnre -- cgit v0.12 From e495d8b0af42751258fbfd1c1b0e55cebc6c2dab Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 7 Oct 2008 17:58:32 +0000 Subject: fix ChangeLof entry --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 3fe1549..86ab1dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclBasic.c: Move [tailcall], [coroutine] and * generic/tclCmdIL.c: [yield] out of ::tcl::unsupported + * tclInt.h: * tests/info.test: and into global scope: TIPs #327 * tests/unsupported.test: and #328 -- cgit v0.12 From 094983988742832968355fbb8724e2f1f75059c8 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 7 Oct 2008 21:24:43 +0000 Subject: undo "fix warnings from 2008-10-05 constification" (tclExecute.c 1.414), but in stead modify two macro's in tclCompile.h with the same affect, but now without polluting C-code with type casts. --- generic/tclCompile.h | 6 +++--- generic/tclExecute.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/generic/tclCompile.h b/generic/tclCompile.h index f314937..ac4990e 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.108 2008/10/05 20:47:52 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.109 2008/10/07 21:24:43 nijtmans Exp $ */ #ifndef _TCLCOMPILATION @@ -1285,8 +1285,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TCL_DTRACE_INST_START_ENABLED() unlikely(TCL_INST_START_ENABLED()) #define TCL_DTRACE_INST_DONE_ENABLED() unlikely(TCL_INST_DONE_ENABLED()) -#define TCL_DTRACE_INST_START(a0, a1, a2) TCL_INST_START(a0, a1, a2) -#define TCL_DTRACE_INST_DONE(a0, a1, a2) TCL_INST_DONE(a0, a1, a2) +#define TCL_DTRACE_INST_START(a0, a1, a2) TCL_INST_START((char *)a0, a1, a2) +#define TCL_DTRACE_INST_DONE(a0, a1, a2) TCL_INST_DONE((char *)a0, a1, a2) #define TCL_DTRACE_TCL_PROBE_ENABLED() unlikely(TCL_TCL_PROBE_ENABLED()) #define TCL_DTRACE_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a8c55fa..c6bce03 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.414 2008/10/07 01:15:34 das Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.415 2008/10/07 21:24:43 nijtmans Exp $ */ #include "tclInt.h" @@ -391,21 +391,21 @@ VarHashCreateVar( #define TCL_DTRACE_INST_NEXT() \ if (TCL_DTRACE_INST_DONE_ENABLED()) {\ if (curInstName) {\ - TCL_DTRACE_INST_DONE((char* ) curInstName, (int) CURR_DEPTH,\ + TCL_DTRACE_INST_DONE(curInstName, (int) CURR_DEPTH,\ tosPtr);\ }\ curInstName = tclInstructionTable[*pc].name;\ if (TCL_DTRACE_INST_START_ENABLED()) {\ - TCL_DTRACE_INST_START((char*) curInstName, (int) CURR_DEPTH,\ + TCL_DTRACE_INST_START(curInstName, (int) CURR_DEPTH,\ tosPtr);\ }\ } else if (TCL_DTRACE_INST_START_ENABLED()) {\ - TCL_DTRACE_INST_START((char*) tclInstructionTable[*pc].name,\ + TCL_DTRACE_INST_START(tclInstructionTable[*pc].name,\ (int) CURR_DEPTH, tosPtr);\ } #define TCL_DTRACE_INST_LAST() \ if (TCL_DTRACE_INST_DONE_ENABLED() && curInstName) {\ - TCL_DTRACE_INST_DONE((char*) curInstName, (int) CURR_DEPTH, tosPtr);\ + TCL_DTRACE_INST_DONE(curInstName, (int) CURR_DEPTH, tosPtr);\ } /* -- cgit v0.12 From 7d339460289a90d64c36b4ed7fcb390572efb438 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 7 Oct 2008 22:31:41 +0000 Subject: Added better docs of [binary encode] and [binary decode] --- ChangeLog | 5 ++++ doc/binary.n | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 99 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86ab1dc..5bc3901 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-07 Donal K. Fellows + + * doc/binary.n: Added better documentation of the [binary encode] and + [binary decode] subcommands. + 2008-10-07 Miguel Sofer * generic/tclBasic.c: Move [tailcall], [coroutine] and diff --git a/doc/binary.n b/doc/binary.n index a850205..b3147cb 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -1,10 +1,11 @@ '\" '\" Copyright (c) 1997 by Sun Microsystems, Inc. +'\" Copyright (c) 2008 by Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: binary.n,v 1.40 2008/09/10 22:48:41 dkf Exp $ +'\" RCS: @(#) $Id: binary.n,v 1.41 2008/10/07 22:31:42 dkf Exp $ '\" .so man.macros .TH binary n 8.0 Tcl "Tcl Built-In Commands" @@ -40,7 +41,86 @@ messages for example). .SH "BINARY ENCODE AND DECODE" .VS 8.6 .PP -\fIFIXME!\fR +When encoding binary data as a readable string, the starting binary data is +passed to the \fBbinary encode\fR command, together with the name of the +encoding to use and any encoding-specific options desired. Data which has been +encoded can be converted back to binary form using \fBbinary decode\fR. The +following formats and options are supported. +.TP +\fBbase64\fR +. +The \fBbase64\fB binary encoding is commonly used in mail messages and XML +documents, and uses mostly upper and lower case letters and digits. It has the +distinction of being able to be rewrapped arbitrarily without losing +information. +.RS +.PP +During encoding, the following options are supported: +.TP +\fB\-maxlen \fIlength\fR +. +Indicates that the output should be split into lines of no more than +\fIlength\fR characters. By default, lines are not split. +.TP +\fB\-wrapchar \fIcharacter\fR +. +Indicates that, when lines are split because of the \fB\-maxlen\fR option, +\fIcharacter\fR should be used to separate lines. By default, this is a +newline character, +.QW \en . +.PP +During decoding, the following options are supported: +.TP +\fB\-strict\fR +. +Instructs the decoder to throw an error if it encounters any characters that +are not strictly part of the encoding itself. Otherwise it ignores them. +.RE +.TP +\fBhex\fR +. +The \fBhex\fR binary encoding converts each byte to a pair of hexadecimal +digits in big-endian form. +.RS +.PP +No options are supported during encoding. During decoding, the following +options are supported: +.TP +\fB\-strict\fR +. +Instructs the decoder to throw an error if it encounters any characters that +are not strictly part of the encoding itself. Otherwise it ignores them. +.RE +.TP +\fBuuencode\fR +. +The \fBuuencode\fR binary encoding used to be common for transfer of data +between Unix systems and on USENET, but is less common these days, having been +largely superceded by the \fBbase64\fR binary encoding. +.RS +.PP +During encoding, the following options are supported: +'\" This is wrong! The uuencode format had more complexity than this! +.TP +\fB\-maxlen \fIlength\fR +. +Indicates that the output should be split into lines of no more than +\fIlength\fR characters. By default, lines are not split. +.TP +\fB\-wrapchar \fIcharacter\fR +. +Indicates that, when lines are split because of the \fB\-maxlen\fR option, +\fIcharacter\fR should be used to separate lines. By default, this is a +newline character, +.QW \en . +.PP +During decoding, the following options are supported: +.TP +\fB\-strict\fR +. +Instructs the decoder to throw an error if it encounters any characters that +are not strictly part of the encoding itself. Otherwise it ignores them. +.RE .VE 8.6 .SH "BINARY FORMAT" .PP @@ -798,7 +878,19 @@ proc \fIreadString\fR {channel} { return [encoding convertfrom utf-8 $data] } .CE +.PP +This converts the contents of a file (named in the variable \fIfilename\fR) to +base64 and prints them: +.CS +set f [open $filename rb] +set data [read $f] +close $f +puts [\fBbinary encode\fR base64 \-maxlen 64 $data] +.CE .SH "SEE ALSO" format(n), scan(n), tclvars(n) .SH KEYWORDS binary, format, scan +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From ea51624d959bfd0e5e3da93cc4c454e57ee21a72 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 7 Oct 2008 22:58:38 +0000 Subject: Some cleaning up of the binary encode/decode engines --- generic/tclBinary.c | 281 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 160 insertions(+), 121 deletions(-) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 996812b..5df4099 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.46 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.47 2008/10/07 22:58:38 dkf Exp $ */ #include "tclInt.h" @@ -2241,17 +2241,16 @@ DeleteScanNumberCache( * * NOTES -- * - * Some measurements show that it is faster to use a table to - * to perform uuencode and base64 value encoding than to calculate - * the output (at least on intel P4 arch). + * Some measurements show that it is faster to use a table to to perform + * uuencode and base64 value encoding than to calculate the output (at + * least on intel P4 arch). * - * Conversely using a lookup table for the decoding is slower than - * just calculating the values. We therefore use the fastest of - * each method. + * Conversely using a lookup table for the decoding is slower than just + * calculating the values. We therefore use the fastest of each method. * - * Presumably this has to do with the size of the tables. The - * base64 decode table is 255 bytes while the encode table is only - * 65 bytes. The choice likely depends on CPU memory cache sizes. + * Presumably this has to do with the size of the tables. The base64 + * decode table is 255 bytes while the encode table is only 65 bytes. The + * choice likely depends on CPU memory cache sizes. */ /* @@ -2259,8 +2258,8 @@ DeleteScanNumberCache( * * BinaryEncodeHex -- * - * Implement the [binary encode hex] binary encoding. - * clientData must be a table to convert values to hexadecimal digits. + * Implement the [binary encode hex] binary encoding. clientData must be + * a table to convert values to hexadecimal digits. * * Results: * Interp result set to an encoded byte array object @@ -2272,8 +2271,11 @@ DeleteScanNumberCache( */ static int -BinaryEncodeHex(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]) +BinaryEncodeHex( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { Tcl_Obj *resultObj = NULL; unsigned char *data = NULL; @@ -2291,7 +2293,7 @@ BinaryEncodeHex(ClientData clientData, Tcl_Interp *interp, cursor = Tcl_SetByteArrayLength(resultObj, count * 2); for (offset = 0; offset < count; ++offset) { *cursor++ = digits[((data[offset] >> 4) & 0x0f)]; - *cursor++ = digits[( data[offset] & 0x0f)]; + *cursor++ = digits[(data[offset] & 0x0f)]; } Tcl_SetObjResult(interp, resultObj); return TCL_OK; @@ -2314,12 +2316,15 @@ BinaryEncodeHex(ClientData clientData, Tcl_Interp *interp, */ static int -BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]) +BinaryDecodeHex( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { Tcl_Obj *resultObj = NULL; unsigned char *data, *datastart, *dataend; - unsigned char *begin, *cursor; + unsigned char *begin, *cursor, c; int i, index, value, size, count = 0, cut = 0, strict = 0; enum {OPT_STRICT }; static const char *optStrings[] = { "-strict", NULL }; @@ -2329,40 +2334,36 @@ BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, return TCL_ERROR; } for (i = 1; i < objc-1; ++i) { - if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, - "option", TCL_EXACT, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option", + TCL_EXACT, &index) != TCL_OK) { return TCL_ERROR; } switch (index) { - case OPT_STRICT: - strict = 1; - break; + case OPT_STRICT: + strict = 1; + break; } } TclNewObj(resultObj); - datastart = data = (unsigned char *) TclGetStringFromObj(objv[objc-1], - &count); + datastart = data = (unsigned char *) + TclGetStringFromObj(objv[objc-1], &count); dataend = data + count; size = (count + 1) / 2; begin = cursor = Tcl_SetByteArrayLength(resultObj, size); while (data < dataend) { value = 0; - i = 0; - while (i < 2) { + for (i=0 ; i<2 ; i++) { if (data < dataend) { - unsigned char c = *data++; - if (!isxdigit((char)c)) { + c = *data++; + + if (!isxdigit((int) c)) { if (strict) { - char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; - sz[0] = c; - sprintf(pos, "%d", (int)(data - datastart - 1)); - TclDecrRefCount(resultObj); - Tcl_AppendResult(interp, "invalid hexadecimal digit \"", - sz, "\" at position ", pos, NULL); - return TCL_ERROR; + goto badChar; + } else { + i--; + continue; } - continue; } value <<= 4; c -= '0'; @@ -2377,14 +2378,20 @@ BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, value <<= 4; ++cut; } - ++i; } - *cursor++ = (unsigned char) value; + *cursor++ = UCHAR(value); value = 0; } Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; + + badChar: + TclDecrRefCount(resultObj); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "invalid hexadecimal digit \"%c\" at position %d", + c, (int) (data - datastart - 1))); + return TCL_ERROR; } /* @@ -2392,10 +2399,10 @@ BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, * * BinaryEncode64 -- * - * This implements a generic 6 bit binary encoding. Input is broken - * into 6 bit chunks and a lookup table passed in via clientData is - * used to turn these values into output characters. This is used - * to implement base64 and uuencode binary encodings. + * This implements a generic 6 bit binary encoding. Input is broken into + * 6 bit chunks and a lookup table passed in via clientData is used to + * turn these values into output characters. This is used to implement + * base64 and uuencode binary encodings. * * Results: * Interp result set to an encoded byte array object @@ -2406,21 +2413,28 @@ BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, *---------------------------------------------------------------------- */ -#define OUTPUT(c) \ - *cursor++ = (c); \ - ++outindex; \ - if (maxlen > 0 && cursor != limit) { \ - if (outindex == maxlen) { \ - memcpy(cursor, wrapchar, wrapcharlen); \ - cursor += wrapcharlen; \ - outindex = 0; \ +#define OUTPUT(c) \ + do { \ + *cursor++ = (c); \ + ++outindex; \ + if (maxlen > 0 && cursor != limit) { \ + if (outindex == maxlen) { \ + memcpy(cursor, wrapchar, wrapcharlen); \ + cursor += wrapcharlen; \ + outindex = 0; \ + } \ + } \ + if (cursor > limit) { \ + Tcl_Panic("limit hit\n"); \ } \ - } \ - if (cursor > limit) Tcl_Panic("limit hit\n"); + } while (0) static int -BinaryEncode64(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]) +BinaryEncode64( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { Tcl_Obj *resultObj; unsigned char *data, *cursor, *limit; @@ -2434,24 +2448,26 @@ BinaryEncode64(ClientData clientData, Tcl_Interp *interp, if (objc < 2 || objc%2 != 0) { Tcl_WrongNumArgs(interp, 1, objv, - "?-maxlen len? ?-wrapchar char? data"); + "?-maxlen len? ?-wrapchar char? data"); return TCL_ERROR; } for (i = 1; i < objc-1; i += 2) { - if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, - "option", TCL_EXACT, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option", + TCL_EXACT, &index) != TCL_OK) { return TCL_ERROR; } switch (index) { - case OPT_MAXLEN: - if (Tcl_GetIntFromObj(interp, objv[i+1], &maxlen) != TCL_OK) - return TCL_ERROR; - break; - case OPT_WRAPCHAR: - wrapchar = Tcl_GetStringFromObj(objv[i+1], NULL); - wrapcharlen = strlen(wrapchar); - if (wrapcharlen == 0) maxlen = 0; - break; + case OPT_MAXLEN: + if (Tcl_GetIntFromObj(interp, objv[i+1], &maxlen) != TCL_OK) { + return TCL_ERROR; + } + break; + case OPT_WRAPCHAR: + wrapchar = Tcl_GetStringFromObj(objv[i+1], &wrapcharlen); + if (wrapcharlen == 0) { + maxlen = 0; + } + break; } } @@ -2461,16 +2477,21 @@ BinaryEncode64(ClientData clientData, Tcl_Interp *interp, size = (((count * 4) / 3) + 3) & ~3; /* ensure 4 byte chunks */ if (maxlen > 0 && size > maxlen) { int adjusted = size + (wrapcharlen * (size / maxlen)); - if (size % maxlen == 0) adjusted -= wrapcharlen; + + if (size % maxlen == 0) { + adjusted -= wrapcharlen; + } size = adjusted; } cursor = Tcl_SetByteArrayLength(resultObj, size); limit = cursor + size; for (offset = 0; offset < count; offset+=3) { unsigned char d[3] = {0, 0, 0}; - for (i = 0; i < 3 && offset+i < count; ++i) + + for (i = 0; i < 3 && offset+i < count; ++i) { d[i] = data[offset + i]; - OUTPUT(digits[ d[0] >> 2]); + } + OUTPUT(digits[d[0] >> 2]); OUTPUT(digits[((d[0] & 0x03) << 4) | (d[1] >> 4)]); if (offset+1 < count) { OUTPUT(digits[((d[1] & 0x0f) << 2) | (d[2] >> 6)]); @@ -2478,7 +2499,7 @@ BinaryEncode64(ClientData clientData, Tcl_Interp *interp, OUTPUT(digits[64]); } if (offset+2 < count) { - OUTPUT(digits[ d[2] & 0x3f]); + OUTPUT(digits[d[2] & 0x3f]); } else { OUTPUT(digits[64]); } @@ -2506,13 +2527,17 @@ BinaryEncode64(ClientData clientData, Tcl_Interp *interp, */ static int -BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]) +BinaryDecodeUu( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { Tcl_Obj *resultObj = NULL; unsigned char *data, *datastart, *dataend; unsigned char *begin, *cursor; int i, index, size, count = 0, cut = 0, strict = 0; + char c; enum {OPT_STRICT }; static const char *optStrings[] = { "-strict", NULL }; @@ -2521,53 +2546,58 @@ BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, return TCL_ERROR; } for (i = 1; i < objc-1; ++i) { - if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, - "option", TCL_EXACT, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option", + TCL_EXACT, &index) != TCL_OK) { return TCL_ERROR; } switch (index) { - case OPT_STRICT: - strict = 1; - break; + case OPT_STRICT: + strict = 1; + break; } } TclNewObj(resultObj); - datastart = data = (unsigned char *) TclGetStringFromObj(objv[objc-1], - &count); + datastart = data = (unsigned char *) + TclGetStringFromObj(objv[objc-1], &count); dataend = data + count; size = ((count + 3) & ~3) * 3 / 4; begin = cursor = Tcl_SetByteArrayLength(resultObj, size); while (data < dataend) { char d[4] = {0, 0, 0, 0}; - i = 0; - while (i < 4) { + + for (i=0 ; i<4 ; i++) { if (data < dataend) { - d[i] = *data++; - if (d[i] < 33 || d[i] > 96) { + d[i] = c = *data++; + if (c < 33 || c > 96) { if (strict) { - char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; - sz[0] = d[i]; - sprintf(pos, "%d", (int)(data - datastart - 1)); - TclDecrRefCount(resultObj); - Tcl_AppendResult(interp, "invalid uuencode character \"", - sz, "\" at position ", pos, NULL); - return TCL_ERROR; + goto badUu; + } else { + i--; + continue; } - continue; } } else { ++cut; } - ++i; } - *cursor++ = (((d[0] - 0x20) & 0x3f) << 2) | (((d[1] - 0x20) & 0x3f) >> 4); - *cursor++ = (((d[1] - 0x20) & 0x3f) << 4) | (((d[2] - 0x20) & 0x3f) >> 2); - *cursor++ = (((d[2] - 0x20) & 0x3f) << 6) | (((d[3] - 0x20) & 0x3f) ); + *cursor++ = (((d[0] - 0x20) & 0x3f) << 2) + | (((d[1] - 0x20) & 0x3f) >> 4); + *cursor++ = (((d[1] - 0x20) & 0x3f) << 4) + | (((d[2] - 0x20) & 0x3f) >> 2); + *cursor++ = (((d[2] - 0x20) & 0x3f) << 6) + | (((d[3] - 0x20) & 0x3f)); } Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; + + badUu: + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "invalid uuencode character \"%c\" at position %d", + c, (int) (data - datastart - 1))); + TclDecrRefCount(resultObj); + return TCL_ERROR; } /* @@ -2587,11 +2617,14 @@ BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, */ static int -BinaryDecode64(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]) +BinaryDecode64( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { Tcl_Obj *resultObj = NULL; - unsigned char *data, *datastart, *dataend; + unsigned char *data, *datastart, *dataend, c; unsigned char *begin = NULL; unsigned char *cursor = NULL; int strict = 0; @@ -2604,29 +2637,31 @@ BinaryDecode64(ClientData clientData, Tcl_Interp *interp, return TCL_ERROR; } for (i = 1; i < objc-1; ++i) { - if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, - "option", TCL_EXACT, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option", + TCL_EXACT, &index) != TCL_OK) { return TCL_ERROR; } switch (index) { - case OPT_STRICT: - strict = 1; - break; + case OPT_STRICT: + strict = 1; + break; } } TclNewObj(resultObj); - datastart = data = (unsigned char *) TclGetStringFromObj(objv[objc-1], - &count); + datastart = data = (unsigned char *) + TclGetStringFromObj(objv[objc-1], &count); dataend = data + count; size = ((count + 3) & ~3) * 3 / 4; begin = cursor = Tcl_SetByteArrayLength(resultObj, size); while (data < dataend) { - int i = 0; + int i; unsigned long value = 0; - while (i < 4) { + + for (i=0 ; i<4 ; i++) { if (data < dataend) { - unsigned char c = *data++; + c = *data++; + if (c >= 'A' && c <= 'Z') { value = (value << 6) | ((c - 'A') & 0x3f); } else if (c >= 'a' && c <= 'z') { @@ -2639,33 +2674,37 @@ BinaryDecode64(ClientData clientData, Tcl_Interp *interp, value = (value << 6) | 0x3f; } else if (c == '=') { value <<= 6; - if (cut < 2) ++cut; + if (cut < 2) { + ++cut; + } } else { if (strict) { - char sz[2] = {0, 0}, pos[TCL_INTEGER_SPACE]; - sz[0] = c; - sprintf(pos, "%d", (int)(data - datastart - 1)); - TclDecrRefCount(resultObj); - Tcl_AppendResult(interp, "invalid base64 character \"", - sz, "\" at position ", pos, NULL); - return TCL_ERROR; + goto bad64; } + i--; continue; } } else { value <<= 6; ++cut; } - ++i; } - *cursor++ = (unsigned char)((value >> 16) & 0xff); - *cursor++ = (unsigned char)((value >> 8) & 0xff); - *cursor++ = (unsigned char)(value & 0xff); + *cursor++ = UCHAR((value >> 16) & 0xff); + *cursor++ = UCHAR((value >> 8) & 0xff); + *cursor++ = UCHAR(value & 0xff); } Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; + + bad64: + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "invalid base64 character \"%c\" at position %d", + (char) c, (int) (data - datastart - 1))); + TclDecrRefCount(resultObj); + return TCL_ERROR; } + /* * Local Variables: * mode: c -- cgit v0.12 From 7d5aead5703d324d80a98cf890f90b9a452cb9a2 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 8 Oct 2008 14:50:56 +0000 Subject: * generic/tclTrace.c: Corrected handling of errors returned by variable traces so that the errorInfo value contains the original error message. [Bug 2151707] * generic/tclVar.c: Revised implementation of TclObjVarErrMsg so that error message construction does not disturb an existing iPtr->errorInfo that may be in progress. --- ChangeLog | 10 +++++++++ generic/tclTrace.c | 60 ++++++++++++++++++++++-------------------------------- generic/tclVar.c | 13 +++++------- 3 files changed, 39 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5bc3901..6ab61fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-10-08 Don Porter + + * generic/tclTrace.c: Corrected handling of errors returned by + variable traces so that the errorInfo value contains the original + error message. [Bug 2151707] + + * generic/tclVar.c: Revised implementation of TclObjVarErrMsg + so that error message construction does not disturb an existing + iPtr->errorInfo that may be in progress. + 2008-10-07 Donal K. Fellows * doc/binary.n: Added better documentation of the [binary encode] and diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 8f095b5..6386f29 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.51 2008/09/05 01:20:00 msofer Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.52 2008/10/08 14:50:57 dgp Exp $ */ #include "tclInt.h" @@ -2672,53 +2672,41 @@ TclCallVarTraces( done: if (code == TCL_ERROR) { if (leaveErrMsg) { + const char *verb = ""; const char *type = ""; - Tcl_Obj *options = Tcl_GetReturnOptions((Tcl_Interp *)iPtr, code); - Tcl_Obj *errorInfoKey, *errorInfo; - - TclNewLiteralStringObj(errorInfoKey, "-errorinfo"); - Tcl_IncrRefCount(errorInfoKey); - Tcl_DictObjGet(NULL, options, errorInfoKey, &errorInfo); - Tcl_IncrRefCount(errorInfo); - Tcl_DictObjRemove(NULL, options, errorInfoKey); - if (Tcl_IsShared(errorInfo)) { - Tcl_DecrRefCount(errorInfo); - errorInfo = Tcl_DuplicateObj(errorInfo); - Tcl_IncrRefCount(errorInfo); - } - Tcl_AppendToObj(errorInfo, "\n (", -1); + switch (flags&(TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_ARRAY)) { case TCL_TRACE_READS: - type = "read"; - Tcl_AppendToObj(errorInfo, type, -1); + verb = "read"; + type = verb; break; case TCL_TRACE_WRITES: - type = "set"; - Tcl_AppendToObj(errorInfo, "write", -1); + verb = "set"; + type = "write"; break; case TCL_TRACE_ARRAY: - type = "trace array"; - Tcl_AppendToObj(errorInfo, "array", -1); + verb = "trace array"; + type = "array"; break; } + if (disposeFlags & TCL_TRACE_RESULT_OBJECT) { - TclVarErrMsg((Tcl_Interp *) iPtr, part1, part2, type, + Tcl_SetObjResult((Tcl_Interp *)iPtr, (Tcl_Obj *) result); + } else { + Tcl_SetResult((Tcl_Interp *)iPtr, result, TCL_STATIC); + } + Tcl_AddErrorInfo((Tcl_Interp *)iPtr, ""); + + Tcl_AppendObjToErrorInfo((Tcl_Interp *)iPtr, Tcl_ObjPrintf( + "\n (%s trace on \"%s%s%s%s\")", type, part1, + (part2 ? "(" : ""), (part2 ? part2 : ""), + (part2 ? ")" : "") )); + if (disposeFlags & TCL_TRACE_RESULT_OBJECT) { + TclVarErrMsg((Tcl_Interp *) iPtr, part1, part2, verb, Tcl_GetString((Tcl_Obj *) result)); } else { - TclVarErrMsg((Tcl_Interp *) iPtr, part1, part2, type, result); - } - Tcl_AppendToObj(errorInfo, " trace on \"", -1); - Tcl_AppendToObj(errorInfo, part1, -1); - if (part2 != NULL) { - Tcl_AppendToObj(errorInfo, "(", -1); - Tcl_AppendToObj(errorInfo, part1, -1); - Tcl_AppendToObj(errorInfo, ")", -1); - } - Tcl_AppendToObj(errorInfo, "\")", -1); - Tcl_DictObjPut(NULL, options, errorInfoKey, errorInfo); - Tcl_DecrRefCount(errorInfoKey); - Tcl_DecrRefCount(errorInfo); - code = Tcl_SetReturnOptions((Tcl_Interp *) iPtr, options); + TclVarErrMsg((Tcl_Interp *) iPtr, part1, part2, verb, result); + } iPtr->flags &= ~(ERR_ALREADY_LOGGED); Tcl_DiscardInterpState(state); } else { diff --git a/generic/tclVar.c b/generic/tclVar.c index 15b1856..a359711 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.168 2008/09/25 19:51:29 dgp Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.169 2008/10/08 14:50:57 dgp Exp $ */ #include "tclInt.h" @@ -4641,16 +4641,13 @@ TclObjVarErrMsg( * variable, or -1. Only used when part1Ptr is * NULL. */ { - Tcl_ResetResult(interp); if (!part1Ptr) { part1Ptr = localName(((Interp *)interp)->varFramePtr, index); } - Tcl_AppendResult(interp, "can't ", operation, " \"", - TclGetString(part1Ptr), NULL); - if (part2Ptr) { - Tcl_AppendResult(interp, "(", TclGetString(part2Ptr), ")", NULL); - } - Tcl_AppendResult(interp, "\": ", reason, NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf("can't %s \"%s%s%s%s\": %s", + operation, TclGetString(part1Ptr), (part2Ptr ? "(" : ""), + (part2Ptr ? TclGetString(part2Ptr) : ""), (part2Ptr ? ")" : ""), + reason)); } /* -- cgit v0.12 From 3dac24314a5483f488d9d5255b7fb6bbeba91b3b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 8 Oct 2008 15:10:30 +0000 Subject: * generic/tclBasic (TclInfoCoroutineCmd): * tests/unsupported.test: arrange for [info coroutine] to return {} when a coroutine is running but the resume command has been deleted [Bug 2153080] --- ChangeLog | 7 +++++++ generic/tclBasic.c | 13 ++++++++----- tests/unsupported.test | 12 +++++++++++- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ab61fc..fe284a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-08 Miguel Sofer + + * generic/tclBasic (TclInfoCoroutineCmd): + * tests/unsupported.test: arrange for [info coroutine] to return + {} when a coroutine is running but the resume command has been + deleted [Bug 2153080] + 2008-10-08 Don Porter * generic/tclTrace.c: Corrected handling of errors returned by diff --git a/generic/tclBasic.c b/generic/tclBasic.c index afddfb6..b2c9e7c 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.371 2008/10/07 17:57:42 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.372 2008/10/08 15:10:30 msofer Exp $ */ #include "tclInt.h" @@ -8498,10 +8498,13 @@ TclInfoCoroutineCmd( if (corPtr) { Tcl_Command cmd = (Tcl_Command) corPtr->cmdPtr; Tcl_Obj *namePtr; - - TclNewObj(namePtr); - Tcl_GetCommandFullName(interp, cmd, namePtr); - Tcl_SetObjResult(interp, namePtr); + int deleted = (((Command *)cmd)->flags & CMD_IS_DELETED); + + if (!deleted) { + TclNewObj(namePtr); + Tcl_GetCommandFullName(interp, cmd, namePtr); + Tcl_SetObjResult(interp, namePtr); + } } return TCL_OK; } diff --git a/tests/unsupported.test b/tests/unsupported.test index c41d4bc..7085be6 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.12 2008/10/07 17:57:43 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.13 2008/10/08 15:10:30 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -739,6 +739,16 @@ test unsupported-C.3.4 {info coroutine} -setup { rename b {} } -result ::foo +test unsupported-C.3.5 {info coroutine} -setup { + proc a {} {info coroutine} + proc b {} {rename [info coroutine] {}; a} +} -body { + coroutine foo b +} -cleanup { + rename a {} + rename b {} +} -result {} + test unsupported-C.4.1 {bug #2093188} -setup { proc foo {} { -- cgit v0.12 From 4ff44a77ace5e7a16b6a1313039cfa71a82d02f9 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 8 Oct 2008 21:35:17 +0000 Subject: * unix/tclUnixChan.c: fix minor compiler warning * unix/tcl.m4: fix for bug [2073255] * unix/configure: regenerated --- ChangeLog | 6 ++++++ unix/configure | 17 +++++++++-------- unix/tcl.m4 | 15 +++++++-------- unix/tclUnixChan.c | 4 ++-- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe284a2..ace9abe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-08 Jan Nijtmans + + * unix/tclUnixChan.c: fix minor compiler warning + * unix/tcl.m4: fix for bug [2073255] + * unix/configure: regenerated + 2008-10-08 Miguel Sofer * generic/tclBasic (TclInfoCoroutineCmd): diff --git a/unix/configure b/unix/configure index 71235e3..1348e0a 100755 --- a/unix/configure +++ b/unix/configure @@ -6722,14 +6722,12 @@ fi if test "$tcl_ok" = yes; then - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='-Wl,+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi @@ -6737,14 +6735,17 @@ fi if test "$GCC" = yes; then SHLIB_LD='${CC} -shared' - SHLIB_LD_LIBS='${LIBS}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} -fi +else + CFLAGS="$CFLAGS -z" + # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc + #CFLAGS="$CFLAGS +DAportable" + SHLIB_CFLAGS="+z" + SHLIB_LD="${CC} -Wl,-b" + +fi - # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc - #CFLAGS="$CFLAGS +DAportable" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes"; then diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c5be8f0..3e4979a 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1262,25 +1262,24 @@ dnl AC_CHECK_TOOL(AR, ar) ]) AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) AS_IF([test "$tcl_ok" = yes], [ - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='-Wl,+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" ]) AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' - SHLIB_LD_LIBS='${LIBS}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + ], [ + CFLAGS="$CFLAGS -z" + # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc + #CFLAGS="$CFLAGS +DAportable" + SHLIB_CFLAGS="+z" + SHLIB_LD="${CC} -Wl,-b" ]) - # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc - #CFLAGS="$CFLAGS +DAportable" - # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = "yes"], [ AS_IF([test "$GCC" = yes], [ diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 3e99c14..a80e7bb 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.94 2008/08/05 23:47:12 jenglish Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.95 2008/10/08 21:35:17 nijtmans Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -2800,7 +2800,7 @@ TclpGetDefaultStdChannel( Tcl_Channel channel = NULL; int fd = 0; /* Initializations needed to prevent */ int mode = 0; /* compiler warning (used before set). */ - char *bufMode = NULL; + const char *bufMode = NULL; /* * Some #def's to make the code a little clearer! -- cgit v0.12 From e4eba0a390e850e2150592a73bc88f1ee408bf99 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Oct 2008 04:02:00 +0000 Subject: fix warning --- generic/tclIndexObj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 1ca2d3e..bb9078b 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.44 2008/10/05 19:22:22 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.45 2008/10/10 04:02:00 das Exp $ */ #include "tclInt.h" @@ -1186,7 +1186,7 @@ Tcl_ParseArgsObjv( infoPtr = matchPtr; switch (infoPtr->type) { case TCL_ARGV_CONSTANT: - *((int *) infoPtr->dstPtr) = (int) infoPtr->srcPtr; + *((int *) infoPtr->dstPtr) = PTR2INT(infoPtr->srcPtr); break; case TCL_ARGV_INT: if (objc == 0) { -- cgit v0.12 From 5228c17959dbe7ad564041300de50f178267e99c Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Oct 2008 04:09:27 +0000 Subject: CONSTify char* DTrace probe arguments --- generic/tclCompile.h | 8 +++----- generic/tclDTrace.d | 54 ++++++++++++++++++++++++++++++---------------------- generic/tclInt.h | 5 ++++- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/generic/tclCompile.h b/generic/tclCompile.h index ac4990e..aba100a 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.109 2008/10/07 21:24:43 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.110 2008/10/10 04:09:27 das Exp $ */ #ifndef _TCLCOMPILATION @@ -1248,8 +1248,6 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #ifdef USE_DTRACE -#include "tclDTrace.h" - #if defined(__GNUC__) && __GNUC__ > 2 /* Use gcc branch prediction hint to minimize cost of DTrace ENABLED checks. */ #define unlikely(x) (__builtin_expect((x), 0)) @@ -1285,8 +1283,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TCL_DTRACE_INST_START_ENABLED() unlikely(TCL_INST_START_ENABLED()) #define TCL_DTRACE_INST_DONE_ENABLED() unlikely(TCL_INST_DONE_ENABLED()) -#define TCL_DTRACE_INST_START(a0, a1, a2) TCL_INST_START((char *)a0, a1, a2) -#define TCL_DTRACE_INST_DONE(a0, a1, a2) TCL_INST_DONE((char *)a0, a1, a2) +#define TCL_DTRACE_INST_START(a0, a1, a2) TCL_INST_START(a0, a1, a2) +#define TCL_DTRACE_INST_DONE(a0, a1, a2) TCL_INST_DONE(a0, a1, a2) #define TCL_DTRACE_TCL_PROBE_ENABLED() unlikely(TCL_TCL_PROBE_ENABLED()) #define TCL_DTRACE_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ diff --git a/generic/tclDTrace.d b/generic/tclDTrace.d index 65c804e..535a9ff 100644 --- a/generic/tclDTrace.d +++ b/generic/tclDTrace.d @@ -3,15 +3,16 @@ * * Tcl DTrace provider. * - * Copyright (c) 2007 Daniel A. Steffen + * Copyright (c) 2007-2008 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDTrace.d,v 1.3 2008/08/14 02:11:51 das Exp $ + * RCS: @(#) $Id: tclDTrace.d,v 1.4 2008/10/10 04:09:27 das Exp $ */ typedef struct Tcl_Obj Tcl_Obj; +typedef const char* TclDTraceStr; /* * Tcl DTrace probes @@ -26,14 +27,14 @@ provider tcl { * arg1: number of arguments (int) * arg2: array of proc argument objects (Tcl_Obj**) */ - probe proc__entry(char* name, int objc, Tcl_Obj **objv); + probe proc__entry(TclDTraceStr name, int objc, Tcl_Obj **objv); /* * tcl*:::proc-return probe * triggered immediately after proc bytecode execution * arg0: proc name (string) * arg1: return code (int) */ - probe proc__return(char* name, int code); + probe proc__return(TclDTraceStr name, int code); /* * tcl*:::proc-result probe * triggered after proc-return probe and result processing @@ -42,7 +43,8 @@ provider tcl { * arg2: proc result (string) * arg3: proc result object (Tcl_Obj*) */ - probe proc__result(char* name, int code, char* result, Tcl_Obj *resultobj); + probe proc__result(TclDTraceStr name, int code, TclDTraceStr result, + Tcl_Obj *resultobj); /* * tcl*:::proc-args probe * triggered before proc-entry probe, gives access to string @@ -50,9 +52,10 @@ provider tcl { * arg0: proc name (string) * arg1-arg9: proc arguments or NULL (strings) */ - probe proc__args(char* name, char* arg1, char* arg2, char* arg3, - char* arg4, char* arg5, char* arg6, char* arg7, char* arg8, - char* arg9); + probe proc__args(TclDTraceStr name, TclDTraceStr arg1, TclDTraceStr arg2, + TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5, + TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8, + TclDTraceStr arg9); /* * tcl*:::proc-info probe * triggered before proc-entry probe, gives access to TIP 280 @@ -66,8 +69,9 @@ provider tcl { * arg6: TclOO method (string) * arg7: TclOO class/object (string) */ - probe proc__info(char* cmd, char* type, char* proc, char* file, int line, - int level, char* method, char* class); + probe proc__info(TclDTraceStr cmd, TclDTraceStr type, TclDTraceStr proc, + TclDTraceStr file, int line, int level, TclDTraceStr method, + TclDTraceStr class); /***************************** cmd probes ******************************/ /* @@ -77,14 +81,14 @@ provider tcl { * arg1: number of arguments (int) * arg2: array of command argument objects (Tcl_Obj**) */ - probe cmd__entry(char* name, int objc, Tcl_Obj **objv); + probe cmd__entry(TclDTraceStr name, int objc, Tcl_Obj **objv); /* * tcl*:::cmd-return probe * triggered immediately after commmand execution * arg0: command name (string) * arg1: return code (int) */ - probe cmd__return(char* name, int code); + probe cmd__return(TclDTraceStr name, int code); /* * tcl*:::cmd-result probe * triggered after cmd-return probe and result processing @@ -93,7 +97,8 @@ provider tcl { * arg2: command result (string) * arg3: command result object (Tcl_Obj*) */ - probe cmd__result(char* name, int code, char* result, Tcl_Obj *resultobj); + probe cmd__result(TclDTraceStr name, int code, TclDTraceStr result, + Tcl_Obj *resultobj); /* * tcl*:::cmd-args probe * triggered before cmd-entry probe, gives access to string @@ -101,9 +106,10 @@ provider tcl { * arg0: command name (string) * arg1-arg9: command arguments or NULL (strings) */ - probe cmd__args(char* name, char* arg1, char* arg2, char* arg3, - char* arg4, char* arg5, char* arg6, char* arg7, char* arg8, - char* arg9); + probe cmd__args(TclDTraceStr name, TclDTraceStr arg1, TclDTraceStr arg2, + TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5, + TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8, + TclDTraceStr arg9); /* * tcl*:::cmd-info probe * triggered before cmd-entry probe, gives access to TIP 280 @@ -117,8 +123,9 @@ provider tcl { * arg6: TclOO method (string) * arg7: TclOO class/object (string) */ - probe cmd__info(char* cmd, char* type, char* proc, char* file, int line, - int level, char* method, char* class); + probe cmd__info(TclDTraceStr cmd, TclDTraceStr type, TclDTraceStr proc, + TclDTraceStr file, int line, int level, TclDTraceStr method, + TclDTraceStr class); /***************************** inst probes *****************************/ /* @@ -128,7 +135,7 @@ provider tcl { * arg1: depth of stack (int) * arg2: top of stack (Tcl_Obj**) */ - probe inst__start(char* name, int depth, Tcl_Obj **stack); + probe inst__start(TclDTraceStr name, int depth, Tcl_Obj **stack); /* * tcl*:::inst-done probe * triggered immediately after execution of a bytecode @@ -136,7 +143,7 @@ provider tcl { * arg1: depth of stack (int) * arg2: top of stack (Tcl_Obj**) */ - probe inst__done(char* name, int depth, Tcl_Obj **stack); + probe inst__done(TclDTraceStr name, int depth, Tcl_Obj **stack); /***************************** obj probes ******************************/ /* @@ -158,9 +165,10 @@ provider tcl { * triggered when the ::tcl::dtrace command is called * arg0-arg9: command arguments (strings) */ - probe tcl__probe(char* arg0, char* arg1, char* arg2, char* arg3, - char* arg4, char* arg5, char* arg6, char* arg7, char* arg8, - char* arg9); + probe tcl__probe(TclDTraceStr arg0, TclDTraceStr arg1, TclDTraceStr arg2, + TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5, + TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8, + TclDTraceStr arg9); }; /* diff --git a/generic/tclInt.h b/generic/tclInt.h index d33dd1d..2487b68 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.402 2008/10/07 17:57:43 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.403 2008/10/10 04:09:27 das Exp $ */ #ifndef _TCLINT @@ -3453,7 +3453,10 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr); */ #ifdef USE_DTRACE +#ifndef _TCLDTRACE_H +typedef const char* TclDTraceStr; #include "tclDTrace.h" +#endif #define TCL_DTRACE_OBJ_CREATE(objPtr) TCL_OBJ_CREATE(objPtr) #define TCL_DTRACE_OBJ_FREE(objPtr) TCL_OBJ_FREE(objPtr) #else /* USE_DTRACE */ -- cgit v0.12 From b819f831ae7faeea840b095764fee75fbf712894 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 10 Oct 2008 13:04:09 +0000 Subject: Fix [Bug 2155658] --- ChangeLog | 97 +++++++++++++++++++++++++---------------------- generic/tclOODefineCmds.c | 8 +++- tests/oo.test | 24 +++++++++++- 3 files changed, 82 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index ace9abe..bc30cc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,24 +1,30 @@ +2008-10-10 Donal K. Fellows + + * generic/tclOODefineCmds.c (TclOODefineUnexportObjCmd) + (TclOODefineExportObjCmd): Corrected export/unexport record synthesis. + [Bug 2155658] + 2008-10-08 Jan Nijtmans - * unix/tclUnixChan.c: fix minor compiler warning - * unix/tcl.m4: fix for bug [2073255] - * unix/configure: regenerated + * unix/tclUnixChan.c: Fix minor compiler warning. + * unix/tcl.m4: Fix for [Bug 2073255] + * unix/configure: Regenerated 2008-10-08 Miguel Sofer * generic/tclBasic (TclInfoCoroutineCmd): - * tests/unsupported.test: arrange for [info coroutine] to return - {} when a coroutine is running but the resume command has been - deleted [Bug 2153080] - + * tests/unsupported.test: Arrange for [info coroutine] to return {} + when a coroutine is running but the resume command has been deleted. + [Bug 2153080] + 2008-10-08 Don Porter * generic/tclTrace.c: Corrected handling of errors returned by variable traces so that the errorInfo value contains the original - error message. [Bug 2151707] + error message. [Bug 2151707] - * generic/tclVar.c: Revised implementation of TclObjVarErrMsg - so that error message construction does not disturb an existing + * generic/tclVar.c: Revised implementation of TclObjVarErrMsg so + that error message construction does not disturb an existing iPtr->errorInfo that may be in progress. 2008-10-07 Donal K. Fellows @@ -28,7 +34,9 @@ 2008-10-07 Miguel Sofer - * generic/tclBasic.c: Move [tailcall], [coroutine] and + TIP #327,#328 IMPLEMENTATIONS + + * generic/tclBasic.c: Move [tailcall], [coroutine] and * generic/tclCmdIL.c: [yield] out of ::tcl::unsupported * tclInt.h: * tests/info.test: and into global scope: TIPs #327 @@ -59,28 +67,27 @@ * win/tclWinFCmd.c: do anyway, but the API didn't indicate that) * generic/tcl.decls * generic/tclDecls.h: regenerated - * generic/tcl.h: make sure that if CONST84 is defined - as empty, CONST86 should be defined - as empty as well (unless overridden). - This change complies with TIP #27 + * generic/tcl.h: Make sure that if CONST84 is defined as empty, + CONST86 should be defined as empty as well + (unless overridden). This change complies with + TIP #27 *** POTENTIAL INCOMPATIBILITY *** 2008-10-05 Kevin B, Kenny - * libtommath/bn_mp_sqrt.c (bn_mp_sqrt): Handle the case where - * tests/expr.test (expr-47.13): a number's square root - is between n< * generic/tclInt.decls: CONSTified the AuxDataType argument @@ -89,8 +96,8 @@ * generic/tclCompile.h values of TclGetAuxDataType and * generic/tclExecute.c TclGetInstructionTable * generic/tclIntDecls.h: regenerated - This change complies with TIP #27 (even though it only - involves internal function, so this is not even necessary). + This change complies with TIP #27 (even though it only involves + internal function, so this is not even necessary). 2008-10-05 Donal K. Fellows @@ -118,46 +125,46 @@ 2008-10-04 Jan Nijtmans - * doc/ChnlStack.3: CONSTified the typePtr argument - * doc/CrtChannel.3: of Tcl_CreateChannel and Tcl_StackChannel - * generic/tcl.decls and the return value of Tcl_GetChannelType + * doc/ChnlStack.3: CONSTified the typePtr argument + * doc/CrtChannel.3: of Tcl_CreateChannel and Tcl_StackChannel + * generic/tcl.decls: and the return value of Tcl_GetChannelType * generic/tcl.h * generic/tclIO.h * generic/tclIO.c - * generic/tclDecls.h: regenerated + * generic/tclDecls.h: regenerated This change complies with TIP #27. 2008-10-4 Jan Nijtmans - * doc/Hash.3: CONSTified the typePtr argument - * generic/tcl.decls: of Tcl_InitCustomHashTable. + * doc/Hash.3: CONSTified the typePtr argument + * generic/tcl.decls: of Tcl_InitCustomHashTable. * generic/tcl.h * generic/tclHash.c - * generic/tclDecls.h: regenerated + * generic/tclDecls.h: regenerated This change complies with TIP #27. 2008-10-4 Jan Nijtmans - * doc/RegConfig.3: CONSTified the configuration argument - * generic/tcl.decls: of Tcl_RegisterConfig. + * doc/RegConfig.3: CONSTified the configuration argument + * generic/tcl.decls: of Tcl_RegisterConfig. * generic/tcl.h * generic/tclConfig.c * generic/tclPkgConfig.c - * generic/tclDecls.h: regenerated + * generic/tclDecls.h: regenerated This change complies with TIP #27. 2008-10-4 Jan Nijtmans - * doc/GetIndex.3: CONSTified the tablePtr argument - * generic/tcl.decls: of Tcl_GetIndexFromObj. + * doc/GetIndex.3: CONSTified the tablePtr argument + * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c - * generic/tclDecls.h: regenerated + * generic/tclDecls.h: regenerated This change complies with TIP #27. 2008-10-03 Miguel Sofer * tests/stack.test: - * unix/tclUnixTest.c: removed test command teststacklimit and the + * unix/tclUnixTest.c: Removed test command teststacklimit and the corresponding constraint: it is not needed with NRE 2008-10-03 Donal K. Fellows @@ -245,9 +252,9 @@ TIP #318 IMPLEMENTATION * generic/tclCmdMZ.c (StringTrimCmd,StringTrimLCmd,StringTrimRCmd): - Update the default set of trimmed characters to include some from - the larger UNICODE space. Factor out the default trim set into a - macro so that it is easier to keep them in synch. + Update the default set of trimmed characters to include some from the + larger UNICODE space. Factor out the default trim set into a macro so + that it is easier to keep them in synch. 2008-09-28 Donal K. Fellows @@ -256,7 +263,7 @@ * generic/tclCompCmds.c (TclCompileEnsemble) * generic/tclNamesp.c (NamespaceEnsembleCmd) (Tcl_SetEnsembleParameterList, Tcl_GetEnsembleParameterList) - (NsEnsembleImplementationCmdNR): + (NsEnsembleImplementationCmdNR): * generic/tcl.decls, doc/Ensemble.3, doc/namespace.n * tests/namespace.test: Allow the handling of a (fixed) number of formal parameters between an ensemble's command and subcommand at @@ -322,7 +329,7 @@ TIP #315 IMPLEMENTATION - * tests/platform.test: Update tests to expect revised results + * tests/platform.test: Update tests to expect revised results * tests/safe.test: corresponding to the TIP 315 change. * unix/tclUnixInit.c, win/tclWinInit.c (TclpSetVariables): diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index fe7e8de..4d680ea 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.5 2008/09/23 05:05:54 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.6 2008/10/10 13:04:09 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1305,6 +1305,9 @@ TclOODefineExportObjCmd( if (isNew) { mPtr = (Method *) ckalloc(sizeof(Method)); memset(mPtr, 0, sizeof(Method)); + mPtr->refCount = 1; + mPtr->namePtr = objv[i]; + Tcl_IncrRefCount(objv[i]); Tcl_SetHashValue(hPtr, mPtr); } else { mPtr = Tcl_GetHashValue(hPtr); @@ -1768,6 +1771,9 @@ TclOODefineUnexportObjCmd( if (isNew) { mPtr = (Method *) ckalloc(sizeof(Method)); memset(mPtr, 0, sizeof(Method)); + mPtr->refCount = 1; + mPtr->namePtr = objv[i]; + Tcl_IncrRefCount(objv[i]); Tcl_SetHashValue(hPtr, mPtr); } else { mPtr = Tcl_GetHashValue(hPtr); diff --git a/tests/oo.test b/tests/oo.test index 7d328f6..2df1d4d 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.14 2008/09/26 20:16:39 dgp Exp $ +# RCS: @(#) $Id: oo.test,v 1.15 2008/10/10 13:04:09 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -316,6 +316,28 @@ test oo-4.4 {exporting a class method from an object} -setup { oo::objdefine testObject export Good testObject Good } -result ok +test oo-4.5 {export creates proper method entries} -setup { + oo::class create testClass +} -body { + oo::define testClass { + export foo + method foo {} {return ok} + } + [testClass new] foo +} -cleanup { + testClass destroy +} -result ok +test oo-4.6 {export creates proper method entries} -setup { + oo::class create testClass +} -body { + oo::define testClass { + unexport foo + method foo {} {return ok} + } + [testClass new] foo +} -cleanup { + testClass destroy +} -result ok test oo-5.1 {OO: manipulation of classes as objects} -setup { set obj [oo::object new] -- cgit v0.12 From 53f354b956ca297d8b6f014b0397330b8bcc559f Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 10 Oct 2008 21:12:16 +0000 Subject: *** 8.6a3 TAGGED FOR RELEASE *** * changes: Updates for 8.6a3 release. --- ChangeLog | 12 ++++----- changes | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 88 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc30cc2..ab147f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-10 Don Porter + + *** 8.6a3 TAGGED FOR RELEASE *** + + * changes: Updates for 8.6a3 release. + 2008-10-10 Donal K. Fellows * generic/tclOODefineCmds.c (TclOODefineUnexportObjCmd) @@ -134,8 +140,6 @@ * generic/tclDecls.h: regenerated This change complies with TIP #27. -2008-10-4 Jan Nijtmans - * doc/Hash.3: CONSTified the typePtr argument * generic/tcl.decls: of Tcl_InitCustomHashTable. * generic/tcl.h @@ -143,8 +147,6 @@ * generic/tclDecls.h: regenerated This change complies with TIP #27. -2008-10-4 Jan Nijtmans - * doc/RegConfig.3: CONSTified the configuration argument * generic/tcl.decls: of Tcl_RegisterConfig. * generic/tcl.h @@ -153,8 +155,6 @@ * generic/tclDecls.h: regenerated This change complies with TIP #27. -2008-10-4 Jan Nijtmans - * doc/GetIndex.3: CONSTified the tablePtr argument * generic/tcl.decls: of Tcl_GetIndexFromObj. * generic/tclIndexObj.c diff --git a/changes b/changes index 9f6c3be..b5b041e 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.145 2008/08/22 19:41:47 dgp Exp $ +RCS: @(#) $Id: changes,v 1.146 2008/10/10 21:12:16 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7298,3 +7298,84 @@ in a deleted interp. (porter) 2008-08-21 (bug fix)[2065115] Restored ***= regexp functioning (hobbs,porter) --- Released 8.6a2, August 25, 2008 --- See ChangeLog for details --- + +2008-08-29 (bug fix)[2082299] Install TclOO header files (fellows) + +2008-09-01 oo methods called during interp deletion no longer skipped if +they do not need the dying interp (fellows) + +2008-09-02 (support) Dropped support for pre-ANSI compilers. (porter) + +2008-09-04 (bug fix)[2093947] var unset trace in coroutine (fellows,sofer) + +2008-09-10 (enhancement) efficient list->dict conversion (elby,fellows) + +2008-09-10 (bug fix)[2102930] faulty numLevels count (madden,sofer) + +2008-09-16 (bug fix)[2114165] eval failure following cancel (sofer) + +2008-09-17 (bug fix)[2116053] export [min] and [max] from tcl::mathfunc (sofer) + +2008-09-22 (new feature)[TIP 320] oo common variable declaration (fellows) + +2008-09-24 (new feature)[TIP 316] portable access to Tcl_StatBuf (fellows) + +2008-09-24 (new feature)[TIP 323] [file delete], [file mkdir] zero pathNames (porter) + +2008-09-25 (new feature)[TIP 315] new var: tcl_platform(pathSeparator) (vu,fellows) + +2008-09-25 (new feature)[TIP 323] [global], [variable] zero varNames (porter) + +2008-09-26 (new feature)[TIP 323] [lassign], [namespace upvar], [my variable] zero varNames (porter) + +2008-09-26 (new feature)[TIP 323] [tcl::tm::path add|remove] zero pathNames (porter) + +2008-09-26 (new feature)[TIP 323] [lrepeat] zero elements; zero repeats (porter) + +2008-09-27 (bug fix)[2130992] prevent overflow crash in [lrepeat] (fellows) + +2008-09-28 (new feature)[TIP 314] ensemble parameters before subcommand (hellström,fellows) + +2008-09-29 (new feature)[TIP 318] revised defaults for [string trim] (poser) + *** POTENTIAL INCOMPATIBILITY *** + +2008-09-29 (new feature)[TIP 313] [lsearch -bisect] (spjuth) + +2008-09-29 (new feature)[TIP 326] [lsort -stride] (elby) + +2008-09-29 (new feature)[TIP 323] [linsert] zero elements (porter) + +2008-09-29 (new feature)[TIP 323] [glob] zero patterns (porter) + +2008-10-02 (new feature)[TIP 330] interp->result access disabled (kenny) + *** POTENTIAL INCOMPATIBILITY *** + +2008-10-03 (new feature)[TIP 265] Tcl_ParseArgv() (bromley) + +2008-10-03 (new feature)[TIP 195] [tcl::prefix] (spjuth) + +2008-10-04 (new feature) CONST-ified Tcl routines Tcl_GetIndexFromObj, +Tcl_RegisterConfig, Tcl_InitCustomHashTable, and routines passing +(Tcl_ChannelType *). (nijtmans) + *** POTENTIAL INCOMPATIBILITY *** + +2008-10-04 (bug fix)[2059262] unload only libraries marked unloadable (nijtmans) + *** POTENTIAL INCOMPATIBILITY *** + +2008-10-05 (new feature)[TIP 331] [lset listVar end+1 $value] (kenny) + +2008-10-05 (bug fix)[2143288] correct bad isqrt() results (boffey,kenny) + +2008-10-05 (new feature) CONST-ified return value of the +Tcl_FSFileAttrStringsProc prototype. (nijtmans) + *** POTENTIAL INCOMPATIBILITY for Tcl_Filesystems *** + +2008-10-07 (new feature)[TIP 327] [tailcall] (sofer) + +2008-10-07 (new feature)[TIP 328] [coroutine],[yield],[info coroutine] (sofer) + +2008-10-08 (bug fix)[2151707] fix stack trace from variable trace (porter) + +2008-10-10 (bug fix)[2155658] crash in oo method export (fellows) + +--- Released 8.6a3, October 10, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 5c0c022b7d9b60ca496702f7cb865df85456c948 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 10 Oct 2008 21:45:37 +0000 Subject: typo --- doc/binary.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/binary.n b/doc/binary.n index b3147cb..78979ff 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: binary.n,v 1.41 2008/10/07 22:31:42 dkf Exp $ +'\" RCS: @(#) $Id: binary.n,v 1.42 2008/10/10 21:45:37 dgp Exp $ '\" .so man.macros .TH binary n 8.0 Tcl "Tcl Built-In Commands" @@ -49,7 +49,7 @@ following formats and options are supported. .TP \fBbase64\fR . -The \fBbase64\fB binary encoding is commonly used in mail messages and XML +The \fBbase64\fR binary encoding is commonly used in mail messages and XML documents, and uses mostly upper and lower case letters and digits. It has the distinction of being able to be rewrapped arbitrarily without losing information. -- cgit v0.12 From 73e618c2bec30116d7b413e8776a74a8fbf4427d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 12 Oct 2008 19:53:32 +0000 Subject: * generic/tclCompile.c: fix bug in srcDelta encoding within ByteCodes. The bug can only be triggered under conditions that cannot happen in Tcl, but were met during development of L. Thanks go to Robert Netzer for diagnose and fix. --- ChangeLog | 7 +++++++ generic/tclCompile.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab147f9..2bab9cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-12 Miguel Sofer + + * generic/tclCompile.c: fix bug in srcDelta encoding within + ByteCodes. The bug can only be triggered under conditions that + cannot happen in Tcl, but were met during development of L. Thanks + go to Robert Netzer for diagnose and fix. + 2008-10-10 Don Porter *** 8.6a3 TAGGED FOR RELEASE *** diff --git a/generic/tclCompile.c b/generic/tclCompile.c index c55258f..b347018 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.157 2008/10/05 20:47:52 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.158 2008/10/12 19:53:32 msofer Exp $ */ #include "tclInt.h" @@ -3177,7 +3177,7 @@ GetCmdLocEncodingSize( } srcDelta = (mapPtr[i].srcOffset - prevSrcOffset); - if ((-127 <= srcDelta) && (srcDelta <= 127)) { + if ((-127 <= srcDelta) && (srcDelta <= 127) && (srcDelta != -1)) { srcDeltaNext++; } else { srcDeltaNext += 5; /* 1 byte for 0xFF, 4 for delta */ @@ -3285,7 +3285,7 @@ EncodeCmdLocMap( prevOffset = 0; for (i = 0; i < numCmds; i++) { srcDelta = (mapPtr[i].srcOffset - prevOffset); - if ((-127 <= srcDelta) && (srcDelta <= 127)) { + if ((-127 <= srcDelta) && (srcDelta <= 127) && (srcDelta != -1)) { TclStoreInt1AtPtr(srcDelta, p); p++; } else { -- cgit v0.12 From 8ff3dfaf5a77d7ef96490cc9dc418979e505903f Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 13 Oct 2008 13:13:45 +0000 Subject: Added magic for Objective C. [Bug 2163447] --- ChangeLog | 5 +++++ generic/tclOOInt.h | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2bab9cd..d021174 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-13 Donal K. Fellows + + * generic/tclOOInt.h: Added macro magic to make things work with + Objective C. [Bug 2163447] + 2008-10-12 Miguel Sofer * generic/tclCompile.c: fix bug in srcDelta encoding within diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index dbd7df2..4b6b8a0 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,13 +9,26 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.8 2008/09/23 05:05:54 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.9 2008/10/13 13:13:45 dkf Exp $ */ +#ifndef TCL_OO_INTERNAL_H +#define TCL_OO_INTERNAL_H 1 + #include #include "tclOO.h" /* + * Hack to make things work with Objective C. Note that ObjC isn't really + * supported, but we don't want to to be actively hostile to it. [Bug 2163447] + */ + +#ifdef __OBJC__ +#define Class TclOOClass +#define Object TclOOObject +#endif /* __OBJC__ */ + +/* * Forward declarations. */ @@ -584,6 +597,8 @@ MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr); ckfree((char *) (ptr)); \ } \ } while(0) + +#endif /* TCL_OO_INTERNAL_H */ /* * Local Variables: -- cgit v0.12 From 609f145e4b123cb02812aa5f66ffc4992f4fb47c Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 13 Oct 2008 21:10:43 +0000 Subject: Handle error case [info class destructor]. --- ChangeLog | 2 ++ generic/tclOOInfo.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d021174..5ba5dcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-10-13 Donal K. Fellows + * generic/tclOOInfo.c (InfoClassDestrCmd): Handle error case. + * generic/tclOOInt.h: Added macro magic to make things work with Objective C. [Bug 2163447] diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index ee19373..d994e94 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.8 2008/10/04 12:00:25 dkf Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.9 2008/10/13 21:10:43 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -886,6 +886,10 @@ InfoClassDestrCmd( return TCL_ERROR; } clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { + return TCL_ERROR; + } + if (clsPtr->destructorPtr == NULL) { return TCL_OK; } -- cgit v0.12 From 14f6b32610b27825a293f10d6f449649f5109237 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 13 Oct 2008 22:05:59 +0000 Subject: set array of Tcl_Obj's to the right size. --- ChangeLog | 4 ++++ generic/tclTest.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ba5dcd..858ad7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-10-13 Pat Thoyts + + * generic/tclTest.c (TestNRELevels): set array to the right size + 2008-10-13 Donal K. Fellows * generic/tclOOInfo.c (InfoClassDestrCmd): Handle error case. diff --git a/generic/tclTest.c b/generic/tclTest.c index 76252eb..74d255e 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.126 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.127 2008/10/13 22:05:59 patthoyts Exp $ */ #define TCL_TEST @@ -6550,7 +6550,7 @@ TestNRELevels( Interp *iPtr = (Interp *) interp; static ptrdiff_t *refDepth = NULL; ptrdiff_t depth; - Tcl_Obj *levels[5]; + Tcl_Obj *levels[6]; int i = 0; TEOV_callback *cbPtr = ((Interp *) interp)->execEnvPtr->callbackPtr; -- cgit v0.12 From fd2a69c6c5b6780f4a47a26379b1c3a5f16b99f6 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 13 Oct 2008 22:51:31 +0000 Subject: We need to initialize the thread id variable to 0 as on 64 bit windows this is a pointer sized field while windows only fills it with a 32 bit value. The result is an inability to join the threads as the ids cannot be matched. --- ChangeLog | 6 ++++++ win/tclWinThrd.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 858ad7f..3353b04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-10-13 Pat Thoyts + * win/tclWinThrd.c (TclpThreadCreate): We need to initialize the + thread id variable to 0 as on 64 bit windows this is a pointer + sized field while windows only fills it with a 32 bit value. The + result is an inability to join the threads as the ids cannot be + matched. + * generic/tclTest.c (TestNRELevels): set array to the right size 2008-10-13 Donal K. Fellows diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 9667d7d..62a538b 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.48 2008/07/24 21:54:43 nijtmans Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.49 2008/10/13 22:51:31 patthoyts Exp $ */ #include "tclWinInt.h" @@ -155,6 +155,10 @@ TclpThreadCreate( EnterCriticalSection(&joinLock); + *idPtr = 0; /* must initialize as Tcl_Thread is a pointer and + * on WIN64 sizeof void* != sizeof unsigned + */ + #if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__BORLANDC__) tHandle = (HANDLE) _beginthreadex(NULL, (unsigned) stackSize, proc, clientData, 0, (unsigned *)idPtr); -- cgit v0.12 From 1a78806e6a2ff9b872b9462b68b37ebf2cb88472 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 14 Oct 2008 14:02:55 +0000 Subject: Made documentation *even more* clear... --- ChangeLog | 97 +++++++++++++++++++++++++++++--------------------------- doc/chan.n | 7 ++-- doc/fconfigure.n | 10 +++--- 3 files changed, 61 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3353b04..cd34ac7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,17 @@ +2008-10-14 Donal K. Fellows + + * doc/chan.n, doc/fconfigure.n: Added even more emphatic text to + direct people to the correct manual pages for specific channel types, + suitable for the hard-of-reading. Following discussion on tcl-core. + 2008-10-13 Pat Thoyts * win/tclWinThrd.c (TclpThreadCreate): We need to initialize the - thread id variable to 0 as on 64 bit windows this is a pointer - sized field while windows only fills it with a 32 bit value. The - result is an inability to join the threads as the ids cannot be - matched. + thread id variable to 0 as on 64 bit windows this is a pointer sized + field while windows only fills it with a 32 bit value. The result is + an inability to join the threads as the ids cannot be matched. - * generic/tclTest.c (TestNRELevels): set array to the right size + * generic/tclTest.c (TestNRELevels): Set array to the right size. 2008-10-13 Donal K. Fellows @@ -17,10 +22,10 @@ 2008-10-12 Miguel Sofer - * generic/tclCompile.c: fix bug in srcDelta encoding within - ByteCodes. The bug can only be triggered under conditions that - cannot happen in Tcl, but were met during development of L. Thanks - go to Robert Netzer for diagnose and fix. + * generic/tclCompile.c: Fix bug in srcDelta encoding within ByteCodes. + The bug can only be triggered under conditions that cannot happen in + Tcl, but were met during development of L. Thanks go to Robert Netzer + for diagnosis and fix. 2008-10-10 Don Porter @@ -429,7 +434,7 @@ 2008-09-17 Miguel Sofer - * library/init.tcl: export min and max commands from the mathfunc + * library/init.tcl: Export min and max commands from the mathfunc namespace. [Bug 2116053] 2008-09-16 Joe Mistachkin @@ -1126,7 +1131,7 @@ 2008-07-23 Miguel Sofer - * generic/tclBasic.c (GetCommandSource): added comment with + * generic/tclBasic.c (GetCommandSource): Added comment with explanation and warning for waintainers. 2008-07-22 Andreas Kupries @@ -1166,7 +1171,7 @@ 2008-07-21 Jan Nijtmans - * generic/*.c: fix [2021443] inconsistant "wrong # args" messages + * generic/*.c: Fix [2021443] inconsistant "wrong # args" messages * win/tclWinReg.c * win/tclWinTest.c * tests/*.test @@ -1175,12 +1180,12 @@ TIP #304 IMPLEMENTATION - * generic/tcl.decls: public API - * generic/tclIOCmds.c: generic part + * generic/tcl.decls: Public API + * generic/tclIOCmds.c: Generic part * unix/tclUnixPipe.c: OS part * win/tclWinPipe.c: OS part * tests/chan.test: [chan pipe] tests - * tests/ioCmd.test: modernized checks + * tests/ioCmd.test: Modernized checks * tests/ioTrans.test: 2008-07-21 Pat Thoyts @@ -1284,10 +1289,10 @@ 2008-07-18 Miguel Sofer - * generic/tclDictObj.c (DictWithCmd, DictUpdateCmd): fix refcounting + * generic/tclDictObj.c (DictWithCmd, DictUpdateCmd): Fix refcounting bugs that caused crashes [Bug 2017857]. - * generic/tclBasic.c (TclNREvalObjEx): streamline the management of + * generic/tclBasic.c (TclNREvalObjEx): Streamline the management of the command frame (opt). 2008-07-17 Donal K. Fellows @@ -1320,7 +1325,7 @@ * tests/stack.test: teststacklimit, to insure that the test suite runs under tclsh. - * generic/tclParse.c: fixing incomplete reversion of "fix" for [Bug + * generic/tclParse.c: Fixing incomplete reversion of "fix" for [Bug 2017583], missing TclResetCancellation call. 2008-07-15 Donal K. Fellows @@ -1357,9 +1362,9 @@ * generic/tclExecute.c: TclInterpReady(). * generic/tclParse.c: - * generic/tclVar.c: fix error message + * generic/tclVar.c: Fix error message - * generic/tclParse.c: remove unnecessary numLevel management + * generic/tclParse.c: Remove unnecessary numLevel management * tests/parse.test: [Bug 2017583] * generic/tclBasic.c.: NRE left too many calls to @@ -1370,7 +1375,7 @@ * generic/tclBasic.c: TclResetCancellation() calls were misplaced (merge mishap); stray //. Thanks patthoyts. - * generic/tclInt.h: the new macros TclSmallAlloc and TclSmallFree + * generic/tclInt.h: The new macros TclSmallAlloc and TclSmallFree were badly defined under mem debugging [Bug 2017240] (thx das) 2008-07-13 Miguel Sofer @@ -1530,8 +1535,8 @@ 2008-06-25 Pat Thoyts - * win/rules.vc: fix versions of dde and registry dlls - * win/makefile.vc: fix problem building with staticpkg option + * win/rules.vc: Fix versions of dde and registry dlls + * win/makefile.vc: Fix problem building with staticpkg option 2008-06-24 Don Porter @@ -1704,26 +1709,26 @@ 2008-06-12 Daniel Steffen - * unix/Makefile.in: add complete deps on tclDTrace.h. + * unix/Makefile.in: Add complete deps on tclDTrace.h. - * generic/tclOO.c: use TclOOStubs hooks field to retrieve + * generic/tclOO.c: Use TclOOStubs hooks field to retrieve * generic/tclOODecls.h: TclOOIntStubs pointer. [Bug 1980953] * generic/tclOOIntDecls.h: * generic/tclOOStubInit.c: * generic/tclOOStubLib.c: - * generic/tclIORTrans.c: fix signed <-> unsigned cast warnings. + * generic/tclIORTrans.c: Fix signed <-> unsigned cast warnings. - * unix/Makefile.in: clean generated tclDTrace.h file. - * unix/configure.in (SunOS): fix static DTrace-enabled build. + * unix/Makefile.in: Clean generated tclDTrace.h file. + * unix/configure.in (SunOS): Fix static DTrace-enabled build. - * unix/tcl.m4 (SunOS-5.11): fix 64bit amd64 support with gcc & Sun cc. + * unix/tcl.m4 (SunOS-5.11): Fix 64bit amd64 support with gcc & Sun cc. * unix/configure: autoconf-2.59 - * macosx/Tcl.xcodeproj/project.pbxproj: add tclIORTrans.c; updates and + * macosx/Tcl.xcodeproj/project.pbxproj: Add tclIORTrans.c; updates and cleanup for Xcode 3.1/Leopard. - * macosx/Tcl.xcode/project.pbxproj: sync Tcl.xcodeproj changes. - * macosx/README: document new build configs. + * macosx/Tcl.xcode/project.pbxproj: Sync Tcl.xcodeproj changes. + * macosx/README: Document new build configs. 2008-06-10 Joe English @@ -1836,27 +1841,27 @@ 2008-06-01 Daniel Steffen - * generic/tclOOStubLib.c: ensure use of tcl stubs; include in + * generic/tclOOStubLib.c: Ensure use of tcl stubs; include in * unix/Makefile.in: stub lib; disable broken tclOO genstubs - * generic/tclOO.c: make tclOO stubs tables 'static const' + * generic/tclOO.c: Make tclOO stubs tables 'static const' * generic/tclOODecls.h: and stub table pointers MODULE_SCOPE * generic/tclOOIntDecls.h: (change generated files manually * generic/tclOOStubInit.c: pending genstubs support for tclOO). * generic/tclOOStubLib.c: - * generic/tclOO.c: fix warnings for 'int<->ptr + * generic/tclOO.c: Fix warnings for 'int<->ptr * generic/tclOOCall.c: conversion' and 'signed vs unsigned * generic/tclOOMethod.c: comparison'. - * tests/msgcat.test: fix for ::tcl::mac::locale with @modifier. + * tests/msgcat.test: Fix for ::tcl::mac::locale with @modifier. - * tools/tsdPerf.tcl: use [info sharedlibextension] + * tools/tsdPerf.tcl: Use [info sharedlibextension] * unix/tclConfig.h.in: autoheader-2.59 - * macosx/Tcl.xcodeproj/project.pbxproj: add new tclOO files; add debug + * macosx/Tcl.xcodeproj/project.pbxproj: Add new tclOO files; add debug * macosx/README: configs with corefoundation disabled and with gcov; update to Xcode 3.1. @@ -1882,7 +1887,7 @@ 2008-05-26 Jeff Hobbs - * tests/io.test (io-53.9): need to close chan before removing file. + * tests/io.test (io-53.9): Need to close chan before removing file. 2008-05-26 Donal K. Fellows @@ -1924,7 +1929,7 @@ 2008-05-16 Miguel Sofer - * generic/tclCompile.c: fix crash with tcl_traceExec. Found and fixed + * generic/tclCompile.c: Fix crash with tcl_traceExec. Found and fixed by Alexander Pasadyn. [Bug 1964803] 2008-05-15 Pat Thoyts @@ -2021,14 +2026,14 @@ 2008-04-16 Daniel Steffen - * generic/tclInt.h: make stubs tables 'static const' and + * generic/tclInt.h: Make stubs tables 'static const' and * generic/tclStubInit.c: export only module-scope pointers to * generic/tclStubLib.c: the main stubs tables (for package * tools/genStubs.tcl: initialization). [Patch 1938497] * generic/tclBasic.c (Tcl_CreateInterp): * generic/tclTomMathInterface.c (TclTommath_Init): - * generic/tclInt.h: revise Tcl_SetNotifier() to use a + * generic/tclInt.h: Revise Tcl_SetNotifier() to use a * generic/tclNotify.c: module-scope hooks table instead of * generic/tclStubInit.c: runtime stubs-table modification; * macosx/tclMacOSXNotify.c: ensure all hookable notifier functions @@ -2045,7 +2050,7 @@ 2008-04-15 Daniel Steffen - * unix/Makefile.in: adjust tclDTrace.h dependencies for removal + * unix/Makefile.in: Adjust tclDTrace.h dependencies for removal of tclStubLib.o from TCL_OBJS. [Bug 1942795] 2008-04-14 Kevin B. Kenny @@ -2184,10 +2189,10 @@ 2008-04-02 Daniel Steffen - * generic/tcl.decls: remove 'export' declarations of symbols now + * generic/tcl.decls: Remove 'export' declarations of symbols now only in libtclstub and no longer in libtcl. - * generic/tclStubLib.c: make symbols in libtclstub.a MODULE_SCOPE to + * generic/tclStubLib.c: Make symbols in libtclstub.a MODULE_SCOPE to * tools/genStubs.tcl: avoid exporting them from libraries that link with -ltclstub; constify tcl*StubsPtr and stub table hook pointers. [Bug 1819422] @@ -2319,7 +2324,7 @@ 2008-03-27 Daniel Steffen - * unix/tcl.m4 (SunOS-5.1x): fix 64bit support for Sun cc. [Bug 1921166] + * unix/tcl.m4 (SunOS-5.1x): Fix 64bit support for Sun cc. [Bug 1921166] * unix/configure: autoconf-2.59 diff --git a/doc/chan.n b/doc/chan.n index 4b7b041..5277dff 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.20 2008/10/07 14:10:29 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.21 2008/10/14 14:02:55 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -89,8 +89,9 @@ The options described below are supported for all channels. In addition, each channel type may add options that only it supports. See the manual entry for the command that creates each type of channels for the options that that specific type of channel supports. For -example, see the manual entry for the \fBsocket\fR command for its -additional options. +example, see the manual entry for the \fBsocket\fR command for additional +options for sockets, and the \fBopen\fR command for additional options for +serial devices. .TP \fB\-blocking\fR \fIboolean\fR . diff --git a/doc/fconfigure.n b/doc/fconfigure.n index f3b878f..6df3037 100644 --- a/doc/fconfigure.n +++ b/doc/fconfigure.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fconfigure.n,v 1.20 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: fconfigure.n,v 1.21 2008/10/14 14:02:55 dkf Exp $ '\" .so man.macros .TH fconfigure n 8.3 Tcl "Tcl Built-In Commands" @@ -41,7 +41,8 @@ The options described below are supported for all channels. In addition, each channel type may add options that only it supports. See the manual entry for the command that creates each type of channels for the options that that specific type of channel supports. For example, see the manual -entry for the \fBsocket\fR command for its additional options. +entry for the \fBsocket\fR command for additional options for sockets, and +the \fBopen\fR command for additional options for serial devices. .TP \fB\-blocking\fR \fIboolean\fR The \fB\-blocking\fR option determines whether I/O operations on the @@ -274,12 +275,13 @@ set data [read $f $numDataBytes] close $f .CE - .SH "SEE ALSO" close(n), flush(n), gets(n), open(n), puts(n), read(n), socket(n), Tcl_StandardChannels(3) - .SH KEYWORDS blocking, buffering, carriage return, end of line, flushing, linemode, newline, nonblocking, platform, translation, encoding, filter, byte array, binary +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 43adceb175b78847d4d791e54f623da29c6ef708 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 14 Oct 2008 16:35:44 +0000 Subject: add missing constraints --- tests/info.test | 5 +++-- tests/unsupported.test | 4 ++-- tests/util.test | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/info.test b/tests/info.test index 1078536..71c4617 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.61 2008/10/07 17:57:43 msofer Exp $ +# RCS: @(#) $Id: info.test,v 1.62 2008/10/14 16:35:44 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1409,7 +1409,8 @@ test info-38.6 {location information for uplevel, ppl, proc-proc-literal} -match * {type source line 1342 file info.test cmd control proc ::datal level 1} * {type source line 1405 file info.test cmd datal proc ::tcltest::RunTest}} -test info-38.7 {location information for arg substitution} -match glob -body { +testConstraint testevalex [llength [info commands testevalex]] +test info-38.7 {location information for arg substitution} -constraints testevalex -match glob -body { join [lrange [testevalex {return -level 0 [etrace]}] 0 3] \n } -result {* {type source line 728 file info.test cmd {info frame \$level} proc ::etrace level 0} * {type eval line 1 cmd etrace proc ::tcltest::RunTest} diff --git a/tests/unsupported.test b/tests/unsupported.test index 7085be6..d4b11de 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.13 2008/10/08 15:10:30 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.14 2008/10/14 16:35:44 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -211,7 +211,7 @@ test unsupported-A9 {atProcExit and uplevel} -constraints {knownBug atProcExit} # Test tailcalls # -test unsupported-T.0 {tailcall is constant space} -setup { +test unsupported-T.0 {tailcall is constant space} -constraints testnrelevels -setup { proc a i { if {[incr i] > 10} { return [depthDiff] diff --git a/tests/util.test b/tests/util.test index 61e0fff..994fc0f 100644 --- a/tests/util.test +++ b/tests/util.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: util.test,v 1.19 2008/08/17 14:15:26 msofer Exp $ +# RCS: @(#) $Id: util.test,v 1.20 2008/10/14 16:35:44 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -15,6 +15,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testdstring [llength [info commands testdstring]] +testConstraint testconcatobj [llength [info commands testconcatobj]] # Big test for correct ordering of data in [expr] @@ -163,7 +164,7 @@ test util-4.6 {Tcl_ConcatObj - utf-8 sequence with "whitespace" char} { # Check for Bug #227512. If this violates C isspace, then it returns \xc3. concat \xe0 } \xe0 -test util-4.7 {Tcl_ConcatObj - refCount safety} { +test util-4.7 {Tcl_ConcatObj - refCount safety} testconcatobj { # Check for Bug #1447328 (actually, bugs in its original "fix"). One of the # symptoms was Bug #2055782. testconcatobj -- cgit v0.12 From d41581b7b69f7837fdb13c3ab6e6be98d08506a3 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 14 Oct 2008 16:48:11 +0000 Subject: oops --- tests/info.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/info.test b/tests/info.test index 71c4617..c062861 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.62 2008/10/14 16:35:44 dgp Exp $ +# RCS: @(#) $Id: info.test,v 1.63 2008/10/14 16:48:11 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1414,7 +1414,7 @@ test info-38.7 {location information for arg substitution} -constraints testeval join [lrange [testevalex {return -level 0 [etrace]}] 0 3] \n } -result {* {type source line 728 file info.test cmd {info frame \$level} proc ::etrace level 0} * {type eval line 1 cmd etrace proc ::tcltest::RunTest} -* {type source line 1413 file info.test cmd {testevalex {return -level 0 \[etrace]}} proc ::tcltest::RunTest} +* {type source line 1414 file info.test cmd {testevalex {return -level 0 \[etrace]}} proc ::tcltest::RunTest} * {type source line 2298 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}} # ------------------------------------------------------------------------- -- cgit v0.12 From 59cc2edf669e2269457e9750eb1f0e18aa34a503 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 14 Oct 2008 17:17:46 +0000 Subject: Make safe-7.2 more robust to different environments --- tests/safe.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/safe.test b/tests/safe.test index a97ea51..6368b83 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.24 2008/09/25 18:06:44 dgp Exp $ +# RCS: @(#) $Id: safe.test,v 1.25 2008/10/14 17:17:46 dgp Exp $ package require Tcl 8.5 @@ -213,7 +213,7 @@ test safe-7.2 {tests specific path and interpFind/AddToAccessPath} -body { [catch {interp eval $i {package require http 1}} msg] $msg \ [safe::interpConfigure $i]\ [safe::interpDelete $i] -} -match glob -result "{\$p(:0:)} {\$p(:17:)} 1 {can't find package http 1} {-accessPath {[list $tcl_library * /dummy/unixlike/test/path]} -statics 0 -nested 1 -deleteHook {}} {}" +} -match glob -result "{\$p(:0:)} {\$p(:[expr 1+[llength [tcl::tm::list]]]:)} 1 {can't find package http 1} {-accessPath {[list $tcl_library * /dummy/unixlike/test/path]} -statics 0 -nested 1 -deleteHook {}} {}" # test source control on file name -- cgit v0.12 From caf6b557c548d9156937bcb092d6107a66f4c3de Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 14 Oct 2008 18:49:47 +0000 Subject: Fix test flaws exposed by -singleproc 1 -debug 1 --- tests/appendComp.test | 5 +++-- tests/string.test | 8 ++++---- tests/unsupported.test | 4 ++-- tests/upvar.test | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/appendComp.test b/tests/appendComp.test index e912186..90b2af5 100644 --- a/tests/appendComp.test +++ b/tests/appendComp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: appendComp.test,v 1.11 2008/09/08 10:49:04 dkf Exp $ +# RCS: @(#) $Id: appendComp.test,v 1.12 2008/10/14 18:49:47 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -270,7 +270,8 @@ test appendComp-7.2 {lappend var triggers read trace, index var} -setup { bar } -result {myvar {} r} test appendComp-7.3 {lappend var triggers read trace, stack var} -setup { - catch {unset ::result} + unset -nocomplain ::result + unset -nocomplain ::myvar } -body { proc bar {} { trace variable ::myvar r foo diff --git a/tests/string.test b/tests/string.test index 27537d4..536189f 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.75 2008/10/03 00:01:35 dkf Exp $ +# RCS: @(#) $Id: string.test,v 1.76 2008/10/14 18:49:47 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1679,10 +1679,10 @@ test string-26.2 {tcl::prefix, bad args} -body { test string-26.3 {tcl::prefix, bad args} -body { tcl::prefix match -error "{}x" -exact str1 str2 } -returnCodes 1 -result {list element in braces followed by "x" instead of space} -test string-26.3 {tcl::prefix, bad args} -body { +test string-26.3.1 {tcl::prefix, bad args} -body { tcl::prefix match -error "x" -exact str1 str2 } -returnCodes 1 -result {error options must have an even number of elements} -test string-26.3 {tcl::prefix, bad args} -body { +test string-26.3.2 {tcl::prefix, bad args} -body { tcl::prefix match -error str1 str2 } -returnCodes 1 -result {missing error options} test string-26.4 {tcl::prefix, bad args} -body { @@ -1706,7 +1706,7 @@ test string-26.9 {tcl::prefix} -body { test string-26.10 {tcl::prefix} -body { tcl::prefix match -error {-level 1} {apa bepa bear depa} be } -returnCodes 2 -result {ambiguous option "be": must be apa, bepa, bear, or depa} -test string-26.10 {tcl::prefix} -setup { +test string-26.10.1 {tcl::prefix} -setup { proc _testprefix {args} { array set opts {-a x -b y -c y} foreach {opt val} $args { diff --git a/tests/unsupported.test b/tests/unsupported.test index d4b11de..0c706b8 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.14 2008/10/14 16:35:44 dgp Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.15 2008/10/14 18:49:47 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -789,7 +789,7 @@ test unsupported-C.4.2 {bug #2093188} -setup { unset ::res } -result {{} 3 {{v {} read} {v {} unset}}} -test unsupported-C.4.2 {bug #2093947} -setup { +test unsupported-C.4.3 {bug #2093947} -setup { proc foo {} { set v 1 trace add variable v {write unset} bar diff --git a/tests/upvar.test b/tests/upvar.test index d774626..9e1b2d9 100644 --- a/tests/upvar.test +++ b/tests/upvar.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: upvar.test,v 1.17 2008/09/26 19:36:51 dgp Exp $ +# RCS: @(#) $Id: upvar.test,v 1.18 2008/10/14 18:49:47 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -548,7 +548,7 @@ test upvar-NS-2.1 {TIP 323} -returnCodes error -body { namespace upvar } -result {wrong # args: should be "namespace upvar ns ?otherVar myVar ...?"} -test upvar-NS-2.1 {TIP 323} -setup { +test upvar-NS-2.2 {TIP 323} -setup { namespace eval test_ns_1 {} } -body { namespace upvar test_ns_1 -- cgit v0.12 From 32286f19cd1be9fcb882750e70838e31e18f9836 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 14 Oct 2008 19:26:59 +0000 Subject: * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all. * generic/tclCmdIL.c: Fix write to unallocated memory whenever [lrepeat] returns an empty list. --- ChangeLog | 7 +++++++ generic/tclCmdIL.c | 11 ++++++----- generic/tclExecute.c | 6 +++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd34ac7..364c2b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-14 Don Porter + + * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all. + + * generic/tclCmdIL.c: Fix write to unallocated memory whenever + [lrepeat] returns an empty list. + 2008-10-14 Donal K. Fellows * doc/chan.n, doc/fconfigure.n: Added even more emphatic text to diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 471560d..d1174ab 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.160 2008/10/07 17:57:43 msofer Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.161 2008/10/14 19:26:59 dgp Exp $ */ #include "tclInt.h" @@ -2446,7 +2446,6 @@ Tcl_LrepeatObjCmd( { int elementCount, i, totalElems; Tcl_Obj *listPtr, **dataArray; - List *listRepPtr; /* * Check arguments for legality: @@ -2496,9 +2495,11 @@ Tcl_LrepeatObjCmd( */ listPtr = Tcl_NewListObj(totalElems, NULL); - listRepPtr = listPtr->internalRep.twoPtrValue.ptr1; - listRepPtr->elemCount = elementCount*objc; - dataArray = &listRepPtr->elements; + if (totalElems) { + List *listRepPtr = listPtr->internalRep.twoPtrValue.ptr1; + listRepPtr->elemCount = elementCount*objc; + dataArray = &listRepPtr->elements; + } /* * Set the elements. Note that we handle the common degenerate case of a diff --git a/generic/tclExecute.c b/generic/tclExecute.c index c6bce03..674cd56 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.415 2008/10/07 21:24:43 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.416 2008/10/14 19:26:59 dgp Exp $ */ #include "tclInt.h" @@ -660,7 +660,7 @@ static int EvalStatsCmd(ClientData clientData, Tcl_Obj *const objv[]); #endif /* TCL_COMPILE_STATS */ #ifdef TCL_COMPILE_DEBUG -static char * GetOpcodeName(unsigned char *pc); +static CONST86 char * GetOpcodeName(unsigned char *pc); static void PrintByteCodeInfo(ByteCode *codePtr); static const char * StringForResultCode(int result); static void ValidatePcAndStackTop(ByteCode *codePtr, @@ -8431,7 +8431,7 @@ GetExceptRangeForPc( */ #ifdef TCL_COMPILE_DEBUG -static char * +static CONST86 char * GetOpcodeName( unsigned char *pc) /* Points to the instruction whose name should * be returned. */ -- cgit v0.12 From f99e837b5153c13e6a5f3e964366819709358ce7 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 14 Oct 2008 20:08:20 +0000 Subject: * README: Bump version number to 8.6a4 * generic/tcl.h: * library/init.tcl: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/configure.in: * unix/configure: autoconf-2.59 * win/configure: --- ChangeLog | 11 +++++++++++ README | 4 ++-- generic/tcl.h | 6 +++--- library/init.tcl | 4 ++-- tools/tcl.wse.in | 2 +- unix/configure | 2 +- unix/configure.in | 4 ++-- unix/tcl.spec | 4 ++-- win/configure | 2 +- win/configure.in | 4 ++-- 10 files changed, 27 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 364c2b3..4a0da39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2008-10-14 Don Porter + * README: Bump version number to 8.6a4 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all. * generic/tclCmdIL.c: Fix write to unallocated memory whenever diff --git a/README b/README index 2ef4941..203a614 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tcl - This is the Tcl 8.6a3 source distribution. + This is the Tcl 8.6a4 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.71 2008/08/28 16:24:16 dgp Exp $ +RCS: @(#) $Id: README,v 1.72 2008/10/14 20:08:20 dgp Exp $ Contents -------- diff --git a/generic/tcl.h b/generic/tcl.h index 909b9e8..d081eb5 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.275 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.276 2008/10/14 20:08:20 dgp Exp $ */ #ifndef _TCL @@ -60,10 +60,10 @@ extern "C" { #define TCL_MAJOR_VERSION 8 #define TCL_MINOR_VERSION 6 #define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TCL_RELEASE_SERIAL 3 +#define TCL_RELEASE_SERIAL 4 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6a3" +#define TCL_PATCH_LEVEL "8.6a4" /* * The following definitions set up the proper options for Windows compilers. diff --git a/library/init.tcl b/library/init.tcl index 9a52118..9b04f64 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.112 2008/09/17 12:38:21 msofer Exp $ +# RCS: @(#) $Id: init.tcl,v 1.113 2008/10/14 20:08:21 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6a3 +package require -exact Tcl 8.6a4 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in index fcdd131..01190b1 100644 --- a/tools/tcl.wse.in +++ b/tools/tcl.wse.in @@ -12,7 +12,7 @@ item: Global Log Pathname=%MAINDIR%\INSTALL.LOG Message Font=MS Sans Serif Font Size=8 - Disk Label=tcl8.6a3 + Disk Label=tcl8.6a4 Disk Filename=setup Patch Flags=0000000000000001 Patch Threshold=85 diff --git a/unix/configure b/unix/configure index 1348e0a..7accaff 100755 --- a/unix/configure +++ b/unix/configure @@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a3" +TCL_PATCH_LEVEL="a4" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/configure.in b/unix/configure.in index 0c11513..61153a5 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.188 2008/08/28 16:24:19 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.189 2008/10/14 20:08:21 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -27,7 +27,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a3" +TCL_PATCH_LEVEL="a4" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/tcl.spec b/unix/tcl.spec index a02cbd6..01fe6f5 100644 --- a/unix/tcl.spec +++ b/unix/tcl.spec @@ -1,11 +1,11 @@ -# $Id: tcl.spec,v 1.41 2008/08/28 16:24:20 dgp Exp $ +# $Id: tcl.spec,v 1.42 2008/10/14 20:08:21 dgp Exp $ # This file is the basis for a binary Tcl RPM for Linux. %{!?directory:%define directory /usr/local} Name: tcl Summary: Tcl scripting language development environment -Version: 8.6a3 +Version: 8.6a4 Release: 2 License: BSD Group: Development/Languages diff --git a/win/configure b/win/configure index 58b2a2e..54c8274 100755 --- a/win/configure +++ b/win/configure @@ -1272,7 +1272,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a3" +TCL_PATCH_LEVEL="a4" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index 0976218..7437dc4 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.108 2008/08/28 16:24:20 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.109 2008/10/14 20:08:21 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -16,7 +16,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a3" +TCL_PATCH_LEVEL="a4" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 -- cgit v0.12 From d2f63650246bf4b3ea03707677faa3d6243fe7be Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 14 Oct 2008 22:28:52 +0000 Subject: Use the environment variable for program files to find the html help compiler --- win/makefile.vc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 2811c90..2db853f 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.190 2008/10/02 19:01:30 mistachkin Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.191 2008/10/14 22:28:52 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -534,7 +534,7 @@ install: install-binaries install-libraries install-docs test: setup $(TCLTEST) dlls $(CAT32) set TCL_LIBRARY=$(ROOT)/library !if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE" - $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) -loadfile << + $(DEBUGGER) $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) -loadfile << set ::ddelib [file normalize $(TCLDDELIB:\=/)] set ::reglib [file normalize $(TCLREGLIB:\=/)] << @@ -663,7 +663,7 @@ gentommath_h: #--------------------------------------------------------------------- !ifndef HHC -HHC="C:\Program Files\HTML Help Workshop\hhc.exe" +HHC="%ProgramFiles%\HTML Help Workshop\hhc.exe" !endif HTMLDIR=$(ROOT)\html HTMLBASE=TclTk$(VERSION) @@ -672,7 +672,7 @@ CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm htmlhelp: chmsetup $(HHPFILE) $(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl - $(HHC) $(HHPFILE) >NUL + "$(HHC)" $(HHPFILE) >NUL chmsetup: @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR) -- cgit v0.12 From ea53c3ec3c87bc77531bc6965ab99a3a741e5789 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 14 Oct 2008 22:30:58 +0000 Subject: Fix a bit of formatting. --- ChangeLog | 4 ++++ doc/binary.n | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a0da39..2ee3eb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-10-14 Donal K. Fellows + + * doc/binary.n: Formatting fix. + 2008-10-14 Don Porter * README: Bump version number to 8.6a4 diff --git a/doc/binary.n b/doc/binary.n index 78979ff..c5e8a4e 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: binary.n,v 1.42 2008/10/10 21:45:37 dgp Exp $ +'\" RCS: @(#) $Id: binary.n,v 1.43 2008/10/14 22:30:59 dkf Exp $ '\" .so man.macros .TH binary n 8.0 Tcl "Tcl Built-In Commands" @@ -627,9 +627,10 @@ reverse (low-to-high) order within each byte. For example, .CE will return \fB2\fR with \fB706\fR stored in \fIvar1\fR and \fB502143\fR stored in \fIvar2\fR. -.RE +.PP Note that most code that wishes to parse the hexadecimal digits from multiple bytes in order should use the \fBH\fR format. +.RE .IP \fBc\fR 5 The data is turned into \fIcount\fR 8-bit signed integers and stored in the corresponding variable as a list. If \fIcount\fR is \fB*\fR, -- cgit v0.12 From 45c244cd8dcd109d144858140ce8c0c070c79f7e Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 14 Oct 2008 22:37:53 +0000 Subject: * generic/tclCmdAH.c: Fix minor compiler warnings when compiling * generic/tclCmdMZ.c: with -Wwrite-strings * generic/tclIndexObj.c: * generic/tclProc.c: * generic/tclStubLib.c: * generic/tclUtil.c: --- ChangeLog | 9 +++++++++ generic/tclCmdAH.c | 14 +++++++------- generic/tclCmdMZ.c | 19 ++++++++++--------- generic/tclIndexObj.c | 6 +++--- generic/tclProc.c | 6 +++--- generic/tclStubLib.c | 4 ++-- generic/tclUtil.c | 10 +++++----- 7 files changed, 39 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ee3eb9..d6fb10f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-10-14 Jan Nijtmans + + * generic/tclCmdAH.c: Fix minor compiler warnings when compiling + * generic/tclCmdMZ.c: with -Wwrite-strings + * generic/tclIndexObj.c: + * generic/tclProc.c: + * generic/tclStubLib.c: + * generic/tclUtil.c: + 2008-10-14 Donal K. Fellows * doc/binary.n: Formatting fix. diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 19a743b..342188e 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.105 2008/09/24 19:31:28 dgp Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.106 2008/10/14 22:37:53 nijtmans Exp $ */ #include "tclInt.h" @@ -51,7 +51,7 @@ static inline void ForeachCleanup(Tcl_Interp *interp, struct ForeachState *statePtr); static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_FSStatProc *statProc, Tcl_StatBuf *statPtr); -static char * GetTypeFromMode(int mode); +static const char *GetTypeFromMode(int mode); static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); static Tcl_NRPostProc CatchObjCmdCallback; @@ -487,7 +487,7 @@ Tcl_EncodingObjCmd( { int index; - static const char *optionStrings[] = { + static const char *const optionStrings[] = { "convertfrom", "convertto", "dirs", "names", "system", NULL }; @@ -884,7 +884,7 @@ Tcl_FileObjCmd( * This list of constants should match the fileOption string array below. */ - static const char *fileOptions[] = { + static const char *const fileOptions[] = { "atime", "attributes", "channels", "copy", "delete", "dirname", "executable", "exists", "extension", @@ -1101,7 +1101,7 @@ Tcl_FileObjCmd( * We have a '-linktype' argument. */ - static const char *linkTypes[] = { + static const char *const linkTypes[] = { "-symbolic", "-hard", NULL }; if (Tcl_GetIndexFromObj(interp, objv[2], linkTypes, "switch", @@ -1346,7 +1346,7 @@ Tcl_FileObjCmd( return TCL_ERROR; } if (objc == 2) { - char *separator = NULL; /* lint */ + const char *separator = NULL; /* lint */ switch (tclPlatform) { case TCL_PLATFORM_UNIX: @@ -1608,7 +1608,7 @@ StoreStatData( *---------------------------------------------------------------------- */ -static char * +static const char * GetTypeFromMode( int mode) { diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index dfeb59c..794b75b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.170 2008/09/29 08:20:34 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.171 2008/10/14 22:37:53 nijtmans Exp $ */ #include "tclInt.h" @@ -101,7 +101,7 @@ Tcl_RegexpObjCmd( Tcl_RegExp regExpr; Tcl_Obj *objPtr, *startIndex = NULL, *resultPtr = NULL; Tcl_RegExpInfo info; - static const char *options[] = { + static const char *const options[] = { "-all", "-about", "-indices", "-inline", "-expanded", "-line", "-linestop", "-lineanchor", "-nocase", "-start", "--", NULL @@ -453,7 +453,7 @@ Tcl_RegsubObjCmd( Tcl_Obj *resultPtr, *subPtr, *objPtr, *startIndex = NULL; Tcl_UniChar ch, *wsrc, *wfirstChar, *wstring, *wsubspec, *wend; - static const char *options[] = { + static const char *const options[] = { "-all", "-nocase", "-expanded", "-line", "-linestop", "-lineanchor", "-start", "--", NULL @@ -949,7 +949,7 @@ Tcl_SourceObjCmd( fileName = objv[objc-1]; if (objc == 4) { - static const char *options[] = { + static const char *const options[] = { "-encoding", NULL }; int index; @@ -990,7 +990,8 @@ Tcl_SplitObjCmd( { Tcl_UniChar ch; int len; - char *splitChars, *stringPtr, *end; + const char *splitChars; + char *stringPtr, *end; int splitCharLen, stringLen; Tcl_Obj *listPtr, *objPtr; @@ -1068,7 +1069,7 @@ Tcl_SplitObjCmd( TclNewStringObj(objPtr, stringPtr, end - stringPtr); Tcl_ListObjAppendElement(NULL, listPtr, objPtr); } else { - char *element, *p, *splitEnd; + const char *element, *p, *splitEnd; int splitLen; Tcl_UniChar splitChar; @@ -1401,7 +1402,7 @@ StringIsCmd( Tcl_Obj *objPtr, *failVarObj = NULL; Tcl_WideInt w; - static const char *isOptions[] = { + static const char *const isOptions[] = { "alnum", "alpha", "ascii", "control", "boolean", "digit", "double", "false", "graph", "integer", "list", "lower", @@ -3363,7 +3364,7 @@ Tcl_SubstObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *substOptions[] = { + static const char *const substOptions[] = { "-nobackslashes", "-nocommands", "-novariables", NULL }; enum substOptions { @@ -3459,7 +3460,7 @@ Tcl_SwitchObjCmd( * -glob, you *must* fix TclCompileSwitchCmd's option parser as well. */ - static const char *options[] = { + static const char *const options[] = { "-exact", "-glob", "-indexvar", "-matchvar", "-nocase", "-regexp", "--", NULL }; diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index bb9078b..f04db71 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.45 2008/10/10 04:02:00 das Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.46 2008/10/14 22:37:53 nijtmans Exp $ */ #include "tclInt.h" @@ -42,7 +42,7 @@ static void PrintUsage(Tcl_Interp *interp, * that can be invoked by generic object code. */ -static Tcl_ObjType indexType = { +static const Tcl_ObjType indexType = { "index", /* name */ FreeIndex, /* freeIntRepProc */ DupIndex, /* dupIntRepProc */ @@ -559,7 +559,7 @@ PrefixMatchObjCmd( int flags = 0, result, index; int dummyLength, i, errorLength; Tcl_Obj *errorPtr = NULL; - char *message = "option"; + const char *message = "option"; Tcl_Obj *tablePtr, *objPtr, *resultPtr; static const char *const matchOptions[] = { "-error", "-exact", "-message", NULL diff --git a/generic/tclProc.c b/generic/tclProc.c index bfe5891..423eb3b 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.163 2008/08/23 18:53:12 msofer Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.164 2008/10/14 22:37:53 nijtmans Exp $ */ #include "tclInt.h" @@ -83,7 +83,7 @@ Tcl_ObjType tclProcBodyType = { * rep; it's just a cache type. */ -static Tcl_ObjType levelReferenceType = { +static const Tcl_ObjType levelReferenceType = { "levelReference", NULL, NULL, NULL, NULL }; @@ -97,7 +97,7 @@ static Tcl_ObjType levelReferenceType = { * will execute within. */ -static Tcl_ObjType lambdaType = { +static const Tcl_ObjType lambdaType = { "lambdaExpr", /* name */ FreeLambdaInternalRep, /* freeIntRepProc */ DupLambdaInternalRep, /* dupIntRepProc */ diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 9b8f390..62869d4 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.27 2008/10/02 20:59:45 dgp Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.28 2008/10/14 22:37:53 nijtmans Exp $ */ /* @@ -47,7 +47,7 @@ HasStubSupport( } iPtr->result = - "This interpreter does not support stubs-enabled extensions."; + (char *)"This interpreter does not support stubs-enabled extensions."; iPtr->freeProc = TCL_STATIC; return NULL; } diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 1a93a32..71978d7 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.104 2008/10/02 20:59:45 dgp Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.105 2008/10/14 22:37:53 nijtmans Exp $ */ #include "tclInt.h" @@ -2423,13 +2423,13 @@ TclPrecTraceProc( */ if (Tcl_IsSafe(interp)) { - return "can't modify precision from a safe interpreter"; + return (char *)"can't modify precision from a safe interpreter"; } value = Tcl_GetVar2Ex(interp, name1, name2, flags & TCL_GLOBAL_ONLY); if (value == NULL || Tcl_GetIntFromObj((Tcl_Interp*) NULL, value, &prec) != TCL_OK || prec < 0 || prec > TCL_MAX_PREC) { - return "improper value for precision"; + return (char *)"improper value for precision"; } *precisionPtr = prec; return NULL; @@ -3269,8 +3269,8 @@ TclReToGlob( int *exactPtr) { int anchorLeft, anchorRight, lastIsStar; - char *dsStr, *dsStrStart, *msg; - const char *p, *strEnd; + char *dsStr, *dsStrStart; + const char *msg, *p, *strEnd; strEnd = reStr + reStrLen; Tcl_DStringInit(dsPtr); -- cgit v0.12 From de27d1ee5e8ba5ad01354e36be8914a8303bf45d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 14 Oct 2008 22:43:29 +0000 Subject: * win/tclWinChan.c: Fix minor compiler warnings when * win/tclWinDde.c: compiling wit -Wwrite-strings * win/tclWinInit.c: * win/tclWinReg.c: * win/tclWinSerial.c: --- ChangeLog | 5 +++++ win/tclWinChan.c | 4 ++-- win/tclWinDde.c | 34 +++++++++++++++++----------------- win/tclWinInit.c | 6 +++--- win/tclWinReg.c | 29 ++++++++++++++++------------- win/tclWinSerial.c | 4 ++-- 6 files changed, 45 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6fb10f..c23d21f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,11 @@ * generic/tclProc.c: * generic/tclStubLib.c: * generic/tclUtil.c: + * win/tclWinChan.c: + * win/tclWinDde.c: + * win/tclWinInit.c: + * win/tclWinReg.c: + * win/tclWinSerial.c: 2008-10-14 Donal K. Fellows diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 5d2a774..20f618d 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.51 2008/05/23 21:00:47 andreas_kupries Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.52 2008/10/14 22:43:30 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1221,7 +1221,7 @@ TclpGetDefaultStdChannel( Tcl_Channel channel; HANDLE handle; int mode = -1; - char *bufMode = NULL; + const char *bufMode = NULL; DWORD handleId = (DWORD)INVALID_HANDLE_VALUE; /* Standard handle to retrieve. */ diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 1622686..30f50ce 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.32 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.33 2008/10/14 22:43:29 nijtmans Exp $ */ #include "tclInt.h" @@ -98,7 +98,7 @@ static int DdeCreateClient(struct DdeEnumServices *es); static BOOL CALLBACK DdeEnumWindowsCallback(HWND hwndTarget, LPARAM lParam); static void DdeExitProc(ClientData clientData); static int DdeGetServicesList(Tcl_Interp *interp, - char *serviceName, char *topicName); + const char *serviceName, const char *topicName); static HDDEDATA CALLBACK DdeServerProc(UINT uType, UINT uFmt, HCONV hConv, HSZ ddeTopic, HSZ ddeItem, HDDEDATA hData, DWORD dwData1, DWORD dwData2); @@ -107,7 +107,7 @@ static LRESULT DdeServicesOnAck(HWND hwnd, WPARAM wParam, static void DeleteProc(ClientData clientData); static Tcl_Obj * ExecuteRemoteObject(RegisteredInterp *riPtr, Tcl_Obj *ddeObjectPtr); -static int MakeDdeConnection(Tcl_Interp *interp, char *name, +static int MakeDdeConnection(Tcl_Interp *interp, const char *name, HCONV *ddeConvPtr); static void SetDdeError(Tcl_Interp *interp); @@ -265,10 +265,10 @@ Initialize(void) *---------------------------------------------------------------------- */ -static char * +static const char * DdeSetServerName( Tcl_Interp *interp, - char *name, /* The name that will be used to refer to the + const char *name, /* The name that will be used to refer to the * interpreter in later "send" commands. Must * be globally unique. */ int exactName, /* Should we make a unique name? 0 = unique */ @@ -278,7 +278,7 @@ DdeSetServerName( int suffix, offset; RegisteredInterp *riPtr, *prevPtr; Tcl_DString dString; - char *actualName; + const char *actualName; Tcl_Obj *srvListPtr = NULL, **srvPtrPtr = NULL; int n, srvCount = 0, lastSuffix, r = TCL_OK; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -879,7 +879,7 @@ DdeExitProc( static int MakeDdeConnection( Tcl_Interp *interp, /* Used to report errors. */ - char *name, /* The connection to use. */ + const char *name, /* The connection to use. */ HCONV *ddeConvPtr) { HSZ ddeTopic, ddeService; @@ -1050,8 +1050,8 @@ DdeEnumWindowsCallback( static int DdeGetServicesList( Tcl_Interp *interp, - char *serviceName, - char *topicName) + const char *serviceName, + const char *topicName) { struct DdeEnumServices es; @@ -1098,7 +1098,7 @@ static void SetDdeError( Tcl_Interp *interp) /* The interp to put the message in. */ { - char *errorMessage; + const char *errorMessage; switch (DdeGetLastError(ddeInstance)) { case DMLERR_DATAACKTIMEOUT: @@ -1143,7 +1143,7 @@ Tcl_DdeObjCmd( int objc, /* Number of arguments */ Tcl_Obj *const * objv) /* The arguments */ { - static const char *ddeCommands[] = { + static const char *const ddeCommands[] = { "servername", "execute", "poke", "request", "services", "eval", (char *) NULL }; @@ -1151,16 +1151,16 @@ Tcl_DdeObjCmd( DDE_SERVERNAME, DDE_EXECUTE, DDE_POKE, DDE_REQUEST, DDE_SERVICES, DDE_EVAL }; - static const char *ddeSrvOptions[] = { + static const char *const ddeSrvOptions[] = { "-force", "-handler", "--", NULL }; enum DdeSrvOptions { DDE_SERVERNAME_EXACT, DDE_SERVERNAME_HANDLER, DDE_SERVERNAME_LAST, }; - static const char *ddeExecOptions[] = { + static const char *const ddeExecOptions[] = { "-async", NULL }; - static const char *ddeReqOptions[] = { + static const char *const ddeReqOptions[] = { "-binary", NULL }; @@ -1170,7 +1170,7 @@ Tcl_DdeObjCmd( HSZ ddeService = NULL, ddeTopic = NULL, ddeItem = NULL, ddeCookie = NULL; HDDEDATA ddeData = NULL, ddeItemData = NULL, ddeReturn; HCONV hConv = NULL; - char *serviceName = NULL, *topicName = NULL, *string; + const char *serviceName = NULL, *topicName = NULL, *string; DWORD ddeResult; Tcl_Obj *objPtr, *handlerPtr = NULL; @@ -1599,7 +1599,7 @@ Tcl_DdeObjCmd( objPtr = Tcl_ConcatObj(objc, objv); string = Tcl_GetStringFromObj(objPtr, &length); - ddeItemData = DdeCreateDataHandle(ddeInstance, string, + ddeItemData = DdeCreateDataHandle(ddeInstance, (char *)string, (DWORD) length+1, 0, 0, CF_TEXT, 0); if (async) { @@ -1642,7 +1642,7 @@ Tcl_DdeObjCmd( length = DdeGetData(ddeData, NULL, 0, 0); Tcl_SetObjLength(resultPtr, length); string = Tcl_GetString(resultPtr); - DdeGetData(ddeData, string, (DWORD) length, 0); + DdeGetData(ddeData, (char *)string, (DWORD) length, 0); Tcl_SetObjLength(resultPtr, (int) strlen(string)); if (Tcl_ListObjIndex(NULL, resultPtr, 0, &objPtr) != TCL_OK) { diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 97bd9cf..d47b2cb 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.77 2008/09/25 14:30:23 dkf Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.78 2008/10/14 22:43:30 nijtmans Exp $ */ #include "tclWinInt.h" @@ -85,12 +85,12 @@ typedef struct { #define NUMPLATFORMS 4 -static char *platforms[NUMPLATFORMS] = { +static const char *platforms[NUMPLATFORMS] = { "Win32s", "Windows 95", "Windows NT", "Windows CE" }; #define NUMPROCESSORS 11 -static char *processors[NUMPROCESSORS] = { +static const char *processors[NUMPROCESSORS] = { "intel", "mips", "alpha", "ppc", "shx", "arm", "ia64", "alpha64", "msil", "amd64", "ia32_on_win64" }; diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 75c5dd9..e46eb70 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.42 2008/07/19 22:50:43 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.43 2008/10/14 22:43:30 nijtmans Exp $ */ #include "tclInt.h" @@ -48,7 +48,7 @@ * system predefined keys. */ -static const char *rootKeyNames[] = { +static const char *const rootKeyNames[] = { "HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CLASSES_ROOT", "HKEY_CURRENT_USER", "HKEY_CURRENT_CONFIG", "HKEY_PERFORMANCE_DATA", "HKEY_DYN_DATA", NULL @@ -67,7 +67,7 @@ static const char REGISTRY_ASSOC_KEY[] = "registry::command"; * types so we don't need a separate table to hold the mapping. */ -static const char *typeNames[] = { +static const char *const typeNames[] = { "none", "sz", "expand_sz", "binary", "dword", "dword_big_endian", "link", "multi_sz", "resource_list", NULL }; @@ -335,9 +335,9 @@ RegistryObjCmd( Tcl_Obj *const objv[]) /* Argument values. */ { int index; - char *errString = NULL; + const char *errString = NULL; - static const char *subcommands[] = { + static const char *const subcommands[] = { "broadcast", "delete", "get", "keys", "set", "type", "values", NULL }; enum SubCmdIdx { @@ -1505,7 +1505,7 @@ AppendSystemError( { int length; WCHAR *wMsgPtr, **wMsgPtrPtr = &wMsgPtr; - char *msg; + const char *msg; char id[TCL_INTEGER_SPACE], msgBuf[24 + TCL_INTEGER_SPACE]; Tcl_DString ds; Tcl_Obj *resultPtr = Tcl_GetObjResult(interp); @@ -1533,32 +1533,35 @@ AppendSystemError( } if (length == 0) { if (error == ERROR_CALL_NOT_IMPLEMENTED) { - msg = "function not supported under Win32s"; + strcpy(msgBuf, "function not supported under Win32s"); } else { sprintf(msgBuf, "unknown error: %ld", error); - msg = msgBuf; } + msg = msgBuf; } else { Tcl_Encoding encoding; + char *msgPtr; encoding = Tcl_GetEncoding(NULL, "unicode"); Tcl_ExternalToUtfDString(encoding, (char *) wMsgPtr, -1, &ds); Tcl_FreeEncoding(encoding); LocalFree(wMsgPtr); - msg = Tcl_DStringValue(&ds); + msgPtr = Tcl_DStringValue(&ds); length = Tcl_DStringLength(&ds); /* * Trim the trailing CR/LF from the system message. */ - if (msg[length-1] == '\n') { - msg[--length] = 0; + if (msgPtr[length-1] == '\n') { + --length; } - if (msg[length-1] == '\r') { - msg[--length] = 0; + if (msgPtr[length-1] == '\r') { + --length; } + msgPtr[length] = 0; + msg = msgPtr; } sprintf(id, "%ld", error); diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 16a07af..9135d25 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.37 2008/04/27 22:21:37 dkf Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.38 2008/10/14 22:43:29 nijtmans Exp $ */ #include "tclWinInt.h" @@ -2056,7 +2056,7 @@ SerialGetOptionProc( } if (len==0 || (len>2 && (strncmp(optionName, "-mode", len) == 0))) { char parity; - char *stop; + const char *stop; char buf[2 * TCL_INTEGER_SPACE + 16]; if (!GetCommState(infoPtr->handle, &dcb)) { -- cgit v0.12 From 9621a454a0bde1f84cef51026947815d4eb244b6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 15 Oct 2008 06:17:03 +0000 Subject: Add "const" to many internal const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries. --- ChangeLog | 16 +++++++ generic/tclBinary.c | 118 ++++++++++++++++++++++++------------------------- generic/tclCompile.c | 8 ++-- generic/tclDictObj.c | 10 ++--- generic/tclHash.c | 8 ++-- generic/tclInt.h | 58 ++++++++++++------------ generic/tclListObj.c | 10 ++--- generic/tclNamesp.c | 66 +++++++++++++-------------- generic/tclObj.c | 18 ++++---- generic/tclProc.c | 6 +-- generic/tclRegexp.c | 4 +- generic/tclStringObj.c | 4 +- generic/tclUtil.c | 4 +- generic/tclVar.c | 18 ++++---- 14 files changed, 182 insertions(+), 166 deletions(-) diff --git a/ChangeLog b/ChangeLog index c23d21f..b2547c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-10-15 Jan Nijtmans + + * generic/tclInt.h: Add "const" to many internal + * generic/tclBinary.c: const tables, so those will be + * generic/tclCompile.c: put by the C-compiler in the + * generic/tclDictObj.c: TEXT segment in stead of the + * generic/tclHash.c: DATA segment. This makes those + * generic/tclListObj.c: table sharable in shared libraries. + * generic/tclNamesp.c: + * generic/tclObj.c: + * generic/tclProc.c: + * generic/tclRegexp.c: + * generic/tclStringObj.c: + * generic/tclUtil.c: + * generic/tclVar.c: + 2008-10-14 Jan Nijtmans * generic/tclCmdAH.c: Fix minor compiler warnings when compiling diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 5df4099..4073a61 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.47 2008/10/07 22:58:38 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.48 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -147,7 +147,7 @@ static const char B64Digits[65] = { * converting an arbitrary String to a ByteArray may be. */ -Tcl_ObjType tclByteArrayType = { +const Tcl_ObjType tclByteArrayType = { "bytearray", FreeByteArrayInternalRep, DupByteArrayInternalRep, @@ -613,7 +613,7 @@ TclInitBinaryCmd(Tcl_Interp *interp) Tcl_Obj *binDict, *encDict, *decDict; /* - * FIX ME: I so ugly - please make me pretty ... + * FIX ME: I so ugly - please make me pretty ... */ nsTclPtr = Tcl_FindNamespace(interp, "::tcl", @@ -634,9 +634,9 @@ TclInitBinaryCmd(Tcl_Interp *interp) if (nsEncPtr == NULL) { Tcl_Panic("unable to find or create ::tcl::binary::encode namespace!"); } - encEnsemble = Tcl_CreateEnsemble(interp, "encode", + encEnsemble = Tcl_CreateEnsemble(interp, "encode", nsBinPtr, 0); - + nsDecPtr = Tcl_FindNamespace(interp, "::tcl::binary::decode", NULL, TCL_CREATE_NS_IF_UNKNOWN); if (nsDecPtr == NULL) { @@ -659,7 +659,7 @@ TclInitBinaryCmd(Tcl_Interp *interp) Tcl_CreateObjCommand(interp, "::tcl::binary::scan", BinaryScanCmd, NULL, NULL); Tcl_SetEnsembleMappingDict(interp, binEnsemble, binDict); - + TclNewObj(encDict); Tcl_DictObjPut(NULL, encDict, Tcl_NewStringObj("hex",-1), Tcl_NewStringObj("::tcl::binary::encode::hex",-1)); @@ -744,7 +744,7 @@ BinaryFormatCmd( * first pass computes the size of the output buffer. The second pass * places the formatted data into the buffer. */ - + format = TclGetString(objv[1]); arg = 2; offset = 0; @@ -766,7 +766,7 @@ BinaryFormatCmd( * For string-type specifiers, the count corresponds to the * number of bytes in a single argument. */ - + if (arg >= objc) { goto badIndex; } @@ -830,14 +830,14 @@ BinaryFormatCmd( } else { int listc; Tcl_Obj **listv; - - /* The macro evals its args more than once: avoid arg++ */ + + /* The macro evals its args more than once: avoid arg++ */ if (TclListObjGetElements(interp, objv[arg], &listc, &listv) != TCL_OK) { return TCL_ERROR; } arg++; - + if (count == BINARY_ALL) { count = listc; } else if (count > listc) { @@ -849,7 +849,7 @@ BinaryFormatCmd( } offset += count*size; break; - + case 'x': if (count == BINARY_ALL) { Tcl_AppendResult(interp, @@ -896,16 +896,16 @@ BinaryFormatCmd( if (length == 0) { return TCL_OK; } - + /* * Prepare the result object by preallocating the caclulated number of * bytes and filling with nulls. */ - + resultPtr = Tcl_NewObj(); buffer = Tcl_SetByteArrayLength(resultPtr, length); memset(buffer, 0, (size_t) length); - + /* * Pack the data into the result object. Note that we can skip the * error checking during this pass, since we have already parsed the @@ -932,9 +932,9 @@ BinaryFormatCmd( case 'A': { char pad = (char) (cmd == 'a' ? '\0' : ' '); unsigned char *bytes; - + bytes = Tcl_GetByteArrayFromObj(objv[arg++], &length); - + if (count == BINARY_ALL) { count = length; } else if (count == BINARY_NOCOUNT) { @@ -952,7 +952,7 @@ BinaryFormatCmd( case 'b': case 'B': { unsigned char *last; - + str = TclGetStringFromObj(objv[arg], &length); arg++; if (count == BINARY_ALL) { @@ -1014,7 +1014,7 @@ BinaryFormatCmd( case 'H': { unsigned char *last; int c; - + str = TclGetStringFromObj(objv[arg], &length); arg++; if (count == BINARY_ALL) { @@ -1170,26 +1170,26 @@ BinaryFormatCmd( Tcl_AppendResult(interp, "expected ", errorString, " string but got \"", errorValue, "\" instead", NULL); return TCL_ERROR; - + badCount: errorString = "missing count for \"@\" field specifier"; goto error; - + badIndex: errorString = "not enough arguments for all format specifiers"; goto error; - + badField: { Tcl_UniChar ch; char buf[TCL_UTF_MAX + 1]; - + Tcl_UtfToUniChar(errorString, &ch); buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; Tcl_AppendResult(interp, "bad field specifier \"", buf, "\"", NULL); return TCL_ERROR; } - + error: Tcl_AppendResult(interp, errorString, NULL); return TCL_ERROR; @@ -1238,7 +1238,7 @@ BinaryScanCmd( Tcl_Obj *valuePtr, *elementPtr; Tcl_HashTable numberCacheHash; Tcl_HashTable *numberCachePtr; - + if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "value formatString ?varName ...?"); @@ -1261,7 +1261,7 @@ BinaryScanCmd( case 'a': case 'A': { unsigned char *src; - + if (arg >= objc) { DeleteScanNumberCache(numberCachePtr); goto badIndex; @@ -1276,14 +1276,14 @@ BinaryScanCmd( goto done; } } - + src = buffer + offset; size = count; - + /* * Trim trailing nulls and spaces, if necessary. */ - + if (cmd == 'A') { while (size > 0) { if (src[size-1] != '\0' && src[size-1] != ' ') { @@ -1292,7 +1292,7 @@ BinaryScanCmd( size--; } } - + /* * Have to do this #ifdef-fery because (as part of defining * Tcl_NewByteArrayObj) we removed the #def that hides this @@ -1533,36 +1533,36 @@ BinaryScanCmd( goto badField; } } - + /* * Set the result to the last position of the cursor. */ - + done: Tcl_SetObjResult(interp, Tcl_NewLongObj(arg - 3)); DeleteScanNumberCache(numberCachePtr); - + return TCL_OK; - + badCount: errorString = "missing count for \"@\" field specifier"; goto error; - + badIndex: errorString = "not enough arguments for all format specifiers"; goto error; - + badField: { Tcl_UniChar ch; char buf[TCL_UTF_MAX + 1]; - + Tcl_UtfToUniChar(errorString, &ch); buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; Tcl_AppendResult(interp, "bad field specifier \"", buf, "\"", NULL); return TCL_ERROR; } - + error: Tcl_AppendResult(interp, errorString, NULL); return TCL_ERROR; @@ -1755,7 +1755,7 @@ CopyNumber( int type) /* What type of thing are we copying? */ { switch (NeedReversing(type)) { - case 0: + case 0: memcpy(to, from, length); break; case 1: { @@ -2262,7 +2262,7 @@ DeleteScanNumberCache( * a table to convert values to hexadecimal digits. * * Results: - * Interp result set to an encoded byte array object + * Interp result set to an encoded byte array object * * Side effects: * None @@ -2273,7 +2273,7 @@ DeleteScanNumberCache( static int BinaryEncodeHex( ClientData clientData, - Tcl_Interp *interp, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { @@ -2282,7 +2282,7 @@ BinaryEncodeHex( unsigned char *cursor = NULL; const char *digits = clientData; int offset = 0, count = 0; - + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "data"); return TCL_ERROR; @@ -2307,7 +2307,7 @@ BinaryEncodeHex( * Implement the [binary decode hex] binary encoding. * * Results: - * Interp result set to an decoded byte array object + * Interp result set to an decoded byte array object * * Side effects: * None @@ -2318,7 +2318,7 @@ BinaryEncodeHex( static int BinaryDecodeHex( ClientData clientData, - Tcl_Interp *interp, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { @@ -2327,8 +2327,8 @@ BinaryDecodeHex( unsigned char *begin, *cursor, c; int i, index, value, size, count = 0, cut = 0, strict = 0; enum {OPT_STRICT }; - static const char *optStrings[] = { "-strict", NULL }; - + static const char *const optStrings[] = { "-strict", NULL }; + if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "data"); return TCL_ERROR; @@ -2339,7 +2339,7 @@ BinaryDecodeHex( return TCL_ERROR; } switch (index) { - case OPT_STRICT: + case OPT_STRICT: strict = 1; break; } @@ -2405,7 +2405,7 @@ BinaryDecodeHex( * base64 and uuencode binary encodings. * * Results: - * Interp result set to an encoded byte array object + * Interp result set to an encoded byte array object * * Side effects: * None @@ -2444,10 +2444,10 @@ BinaryEncode64( int wrapcharlen = 1; int offset, i, index, size, outindex = 0, count = 0; enum {OPT_MAXLEN, OPT_WRAPCHAR }; - static const char *optStrings[] = { "-maxlen", "-wrapchar", NULL }; + static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL }; if (objc < 2 || objc%2 != 0) { - Tcl_WrongNumArgs(interp, 1, objv, + Tcl_WrongNumArgs(interp, 1, objv, "?-maxlen len? ?-wrapchar char? data"); return TCL_ERROR; } @@ -2457,7 +2457,7 @@ BinaryEncode64( return TCL_ERROR; } switch (index) { - case OPT_MAXLEN: + case OPT_MAXLEN: if (Tcl_GetIntFromObj(interp, objv[i+1], &maxlen) != TCL_OK) { return TCL_ERROR; } @@ -2518,7 +2518,7 @@ BinaryEncode64( * Decode a uuencoded string. * * Results: - * Interp result set to an byte array object + * Interp result set to an byte array object * * Side effects: * None @@ -2539,8 +2539,8 @@ BinaryDecodeUu( int i, index, size, count = 0, cut = 0, strict = 0; char c; enum {OPT_STRICT }; - static const char *optStrings[] = { "-strict", NULL }; - + static const char *const optStrings[] = { "-strict", NULL }; + if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "data"); return TCL_ERROR; @@ -2551,7 +2551,7 @@ BinaryDecodeUu( return TCL_ERROR; } switch (index) { - case OPT_STRICT: + case OPT_STRICT: strict = 1; break; } @@ -2608,7 +2608,7 @@ BinaryDecodeUu( * Decode a base64 encoded string. * * Results: - * Interp result set to an byte array object + * Interp result set to an byte array object * * Side effects: * None @@ -2630,8 +2630,8 @@ BinaryDecode64( int strict = 0; int i, index, size, cut = 0, count = 0; enum {OPT_STRICT }; - static const char *optStrings[] = { "-strict", NULL }; - + static const char *const optStrings[] = { "-strict", NULL }; + if (objc < 2 || objc > 3) { Tcl_WrongNumArgs(interp, 1, objv, "data"); return TCL_ERROR; @@ -2642,7 +2642,7 @@ BinaryDecode64( return TCL_ERROR; } switch (index) { - case OPT_STRICT: + case OPT_STRICT: strict = 1; break; } diff --git a/generic/tclCompile.c b/generic/tclCompile.c index b347018..ddf3818 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.158 2008/10/12 19:53:32 msofer Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.159 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -441,7 +441,7 @@ static void EnterCmdWordIndex (ExtCmdLoc *eclPtr, Tcl_Obj* obj, * procedures that can be invoked by generic object code. */ -Tcl_ObjType tclByteCodeType = { +const Tcl_ObjType tclByteCodeType = { "bytecode", /* name */ FreeByteCodeInternalRep, /* freeIntRepProc */ DupByteCodeInternalRep, /* dupIntRepProc */ @@ -2147,7 +2147,7 @@ TclFindCompiledLocal( if (procPtr == NULL) { /* - * Compiling a non-body script: give it read access to the LVT in the + * Compiling a non-body script: give it read access to the LVT in the * current localCache */ @@ -2171,7 +2171,7 @@ TclFindCompiledLocal( } return -1; } - + if (name != NULL) { int localCt = procPtr->numCompiledLocals; diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 6253e43..2b87c01 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.68 2008/08/23 11:35:43 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.69 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -159,7 +159,7 @@ typedef struct Dict { * functions that can be invoked by generic object code. */ -Tcl_ObjType tclDictType = { +const Tcl_ObjType tclDictType = { "dict", FreeDictInternalRep, /* freeIntRepProc */ DupDictInternalRep, /* dupIntRepProc */ @@ -177,7 +177,7 @@ Tcl_ObjType tclDictType = { * *this* file. Everything else should use the dict iterator API. */ -static Tcl_HashKeyType chainHashType = { +static const Tcl_HashKeyType chainHashType = { TCL_HASH_KEY_TYPE_VERSION, 0, TclHashObjKey, @@ -2713,7 +2713,7 @@ DictFilterCmd( Tcl_Obj *const *objv) { Interp *iPtr = (Interp *) interp; - static const char *filters[] = { + static const char *const filters[] = { "key", "script", "value", NULL }; enum FilterTypes { @@ -3356,7 +3356,7 @@ TclInitDictCmd( { return TclMakeEnsemble(interp, "dict", implementationMap); } - + /* * Local Variables: * mode: c diff --git a/generic/tclHash.c b/generic/tclHash.c index bf1a87a..dd995f0 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.35 2008/10/04 11:51:25 nijtmans Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.36 2008/10/15 06:17:03 nijtmans Exp $ */ #include "tclInt.h" @@ -76,7 +76,7 @@ static Tcl_HashEntry * BogusCreate(Tcl_HashTable *tablePtr, const char *key, int *newPtr); static void RebuildTable(Tcl_HashTable *tablePtr); -Tcl_HashKeyType tclArrayHashKeyType = { +const Tcl_HashKeyType tclArrayHashKeyType = { TCL_HASH_KEY_TYPE_VERSION, /* version */ TCL_HASH_KEY_RANDOMIZE_HASH, /* flags */ HashArrayKey, /* hashKeyProc */ @@ -85,7 +85,7 @@ Tcl_HashKeyType tclArrayHashKeyType = { NULL /* freeEntryProc */ }; -Tcl_HashKeyType tclOneWordHashKeyType = { +const Tcl_HashKeyType tclOneWordHashKeyType = { TCL_HASH_KEY_TYPE_VERSION, /* version */ 0, /* flags */ NULL, /* HashOneWordKey, */ /* hashProc */ @@ -94,7 +94,7 @@ Tcl_HashKeyType tclOneWordHashKeyType = { NULL /* FreeOneWordKey, */ /* freeEntryProc */ }; -Tcl_HashKeyType tclStringHashKeyType = { +const Tcl_HashKeyType tclStringHashKeyType = { TCL_HASH_KEY_TYPE_VERSION, /* version */ 0, /* flags */ HashStringKey, /* hashKeyProc */ diff --git a/generic/tclInt.h b/generic/tclInt.h index 2487b68..551688d 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.403 2008/10/10 04:09:27 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.404 2008/10/15 06:17:03 nijtmans Exp $ */ #ifndef _TCLINT @@ -1350,7 +1350,7 @@ typedef struct CoroutineData { typedef struct ExecEnv { ExecStack *execStackPtr; /* Points to the first item in the evaluation * stack on the heap. */ - Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" objs. */ + Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" objs. */ struct Tcl_Interp *interp; struct TEOV_callback *callbackPtr; /* Top callback in TEOV's stack */ @@ -1994,7 +1994,7 @@ typedef struct Interp { /* Callbacks to be run after a command exited; * this is only set for atProcExirt or * tailcalls that fall back out of tebc. */ - + #ifdef TCL_COMPILE_STATS /* * Statistical information about the bytecode compiler and interpreter's @@ -2498,32 +2498,32 @@ MODULE_SCOPE ClientData tclTimeClientData; * Variables denoting the Tcl object types defined in the core. */ -MODULE_SCOPE Tcl_ObjType tclBignumType; -MODULE_SCOPE Tcl_ObjType tclBooleanType; -MODULE_SCOPE Tcl_ObjType tclByteArrayType; -MODULE_SCOPE Tcl_ObjType tclByteCodeType; -MODULE_SCOPE Tcl_ObjType tclDoubleType; -MODULE_SCOPE Tcl_ObjType tclEndOffsetType; -MODULE_SCOPE Tcl_ObjType tclIntType; -MODULE_SCOPE Tcl_ObjType tclListType; -MODULE_SCOPE Tcl_ObjType tclDictType; -MODULE_SCOPE Tcl_ObjType tclProcBodyType; -MODULE_SCOPE Tcl_ObjType tclStringType; -MODULE_SCOPE Tcl_ObjType tclArraySearchType; -MODULE_SCOPE Tcl_ObjType tclEnsembleCmdType; +MODULE_SCOPE const Tcl_ObjType tclBignumType; +MODULE_SCOPE const Tcl_ObjType tclBooleanType; +MODULE_SCOPE const Tcl_ObjType tclByteArrayType; +MODULE_SCOPE const Tcl_ObjType tclByteCodeType; +MODULE_SCOPE const Tcl_ObjType tclDoubleType; +MODULE_SCOPE const Tcl_ObjType tclEndOffsetType; +MODULE_SCOPE const Tcl_ObjType tclIntType; +MODULE_SCOPE const Tcl_ObjType tclListType; +MODULE_SCOPE const Tcl_ObjType tclDictType; +MODULE_SCOPE const Tcl_ObjType tclProcBodyType; +MODULE_SCOPE const Tcl_ObjType tclStringType; +MODULE_SCOPE const Tcl_ObjType tclArraySearchType; +MODULE_SCOPE const Tcl_ObjType tclEnsembleCmdType; #ifndef NO_WIDE_TYPE -MODULE_SCOPE Tcl_ObjType tclWideIntType; +MODULE_SCOPE const Tcl_ObjType tclWideIntType; #endif -MODULE_SCOPE Tcl_ObjType tclRegexpType; +MODULE_SCOPE const Tcl_ObjType tclRegexpType; /* * Variables denoting the hash key types defined in the core. */ -MODULE_SCOPE Tcl_HashKeyType tclArrayHashKeyType; -MODULE_SCOPE Tcl_HashKeyType tclOneWordHashKeyType; -MODULE_SCOPE Tcl_HashKeyType tclStringHashKeyType; -MODULE_SCOPE Tcl_HashKeyType tclObjHashKeyType; +MODULE_SCOPE const Tcl_HashKeyType tclArrayHashKeyType; +MODULE_SCOPE const Tcl_HashKeyType tclOneWordHashKeyType; +MODULE_SCOPE const Tcl_HashKeyType tclStringHashKeyType; +MODULE_SCOPE const Tcl_HashKeyType tclObjHashKeyType; /* * The head of the list of free Tcl objects, and the total number of Tcl @@ -3550,7 +3550,7 @@ MODULE_SCOPE void TclpFreeAllocCache(void *); * and TclThreadFreeObj(). * * Note that the optimiser should resolve the case (interp==NULL) at compile - * time. + * time. */ # define ALLOC_NOBJHIGH 1200 @@ -3568,7 +3568,7 @@ MODULE_SCOPE void TclpFreeAllocCache(void *); --cachePtr->numObjects; \ } \ } while (0) - + # define TclFreeObjStorageEx(interp, objPtr) \ do { \ AllocCache *cachePtr; \ @@ -4127,7 +4127,7 @@ typedef struct TEOV_callback { ClientData data[4]; struct TEOV_callback *nextPtr; } TEOV_callback; - + #define TOP_CB(iPtr) (((Interp *)(iPtr))->execEnvPtr->callbackPtr) /* @@ -4145,10 +4145,10 @@ typedef struct TEOV_callback { TEOV_callback *callbackPtr; \ TCLNR_ALLOC((interp), (callbackPtr)); \ callbackPtr->procPtr = (postProcPtr); \ - callbackPtr->data[0] = (data0); \ - callbackPtr->data[1] = (data1); \ - callbackPtr->data[2] = (data2); \ - callbackPtr->data[3] = (data3); \ + callbackPtr->data[0] = (ClientData)(data0);\ + callbackPtr->data[1] = (ClientData)(data1);\ + callbackPtr->data[2] = (ClientData)(data2);\ + callbackPtr->data[3] = (ClientData)(data3);\ callbackPtr->nextPtr = TOP_CB(interp); \ TOP_CB(interp) = callbackPtr; \ } diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 68db503..b8f9da7 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.54 2008/10/05 22:12:20 kennykb Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.55 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -38,7 +38,7 @@ static void UpdateStringOfList(Tcl_Obj *listPtr); * storage to avoid an auxiliary stack. */ -Tcl_ObjType tclListType = { +const Tcl_ObjType tclListType = { "list", /* name */ FreeListInternalRep, /* freeIntRepProc */ DupListInternalRep, /* dupIntRepProc */ @@ -1326,7 +1326,7 @@ TclLsetFlat( * WARNING: the macro TclGetIntForIndexM is not safe for * post-increments, avoid '*indexArray++' here. */ - + if (TclGetIntForIndexM(interp, *indexArray, elemCount - 1, &index) != TCL_OK) { /* ...the index we're trying to use isn't an index at all. */ @@ -1425,9 +1425,9 @@ TclLsetFlat( } if (result != TCL_OK) { - /* + /* * Error return; message is already in interp. Clean up - * any excess memory. + * any excess memory. */ if (retValuePtr != listPtr) { Tcl_DecrRefCount(retValuePtr); diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index c05913d..5ce7858 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.178 2008/09/28 22:17:39 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.179 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -143,7 +143,7 @@ typedef struct EnsembleConfig { int numParameters; /* Cached number of parameters. This is either * 0 (if the parameterList field is NULL) or * the length of the list in the parameterList - * field. */ + * field. */ } EnsembleConfig; #define ENS_DEAD 0x1 /* Flag value to say that the ensemble is dead @@ -245,7 +245,7 @@ static Tcl_NRPostProc NsEval_Callback; * the object. */ -static Tcl_ObjType nsNameType = { +static const Tcl_ObjType nsNameType = { "nsName", /* the type's name */ FreeNsNameInternalRep, /* freeIntRepProc */ DupNsNameInternalRep, /* dupIntRepProc */ @@ -260,7 +260,7 @@ static Tcl_ObjType nsNameType = { * that implements it. */ -Tcl_ObjType tclEnsembleCmdType = { +const Tcl_ObjType tclEnsembleCmdType = { "ensembleCommand", /* the type's name */ FreeEnsembleCmdRep, /* freeIntRepProc */ DupEnsembleCmdRep, /* dupIntRepProc */ @@ -2739,7 +2739,7 @@ GetNamespaceFromObj( if (objPtr->typePtr == &nsNameType) { /* - * Check that the ResolvedNsName is still valid; avoid letting the ref + * Check that the ResolvedNsName is still valid; avoid letting the ref * cross interps. */ @@ -2819,7 +2819,7 @@ TclNRNamespaceObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *subCmds[] = { + static const char *const subCmds[] = { "children", "code", "current", "delete", "ensemble", "eval", "exists", "export", "forget", "import", "inscope", "origin", "parent", "path", "qualifiers", @@ -3347,11 +3347,11 @@ NamespaceEvalCmd( invoker = NULL; word = 0; } - + /* * TIP #280: Make invoking context available to eval'd script. */ - + TclNRAddCallback(interp, NsEval_Callback, namespacePtr, "eval", NULL, NULL); return TclNREvalObjEx(interp, objPtr, 0, invoker, word); @@ -3364,13 +3364,13 @@ NsEval_Callback( int result) { Tcl_Namespace *namespacePtr = data[0]; - + if (result == TCL_ERROR) { int length = strlen(namespacePtr->fullName); int limit = 200; int overflow = (length > limit); char *cmd = data[1]; - + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (in namespace %s \"%.*s%s\" script line %d)", cmd, @@ -3384,7 +3384,7 @@ NsEval_Callback( TclPopStackFrame(interp); return result; -} +} /* *---------------------------------------------------------------------- @@ -4570,7 +4570,7 @@ NamespaceWhichCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *opts[] = { + static const char *const opts[] = { "-command", "-variable", NULL }; int lookupType = 0; @@ -4805,25 +4805,25 @@ NamespaceEnsembleCmd( { Namespace *nsPtr; Tcl_Command token; - static const char *subcommands[] = { + static const char *const subcommands[] = { "configure", "create", "exists", NULL }; enum EnsSubcmds { ENS_CONFIG, ENS_CREATE, ENS_EXISTS }; - static const char *createOptions[] = { - "-command", "-map", "-parameters", "-prefixes", "-subcommands", + static const char *const createOptions[] = { + "-command", "-map", "-parameters", "-prefixes", "-subcommands", "-unknown", NULL }; enum EnsCreateOpts { CRT_CMD, CRT_MAP, CRT_PARAM, CRT_PREFIX, CRT_SUBCMDS, CRT_UNKNOWN }; - static const char *configOptions[] = { - "-map", "-namespace", "-parameters", "-prefixes", "-subcommands", + static const char *const configOptions[] = { + "-map", "-namespace", "-parameters", "-prefixes", "-subcommands", "-unknown", NULL }; enum EnsConfigOpts { - CONF_MAP, CONF_NAMESPACE, CONF_PARAM, CONF_PREFIX, CONF_SUBCMDS, + CONF_MAP, CONF_NAMESPACE, CONF_PARAM, CONF_PREFIX, CONF_SUBCMDS, CONF_UNKNOWN }; int index; @@ -5841,7 +5841,7 @@ Tcl_GetEnsembleSubcommandList( * Results: * Tcl result code (error if command token does not indicate an * ensemble). The list of parameters is returned by updating the - * variable pointed to by the last parameter (NULL if there are + * variable pointed to by the last parameter (NULL if there are * no parameters). * * Side effects: @@ -6244,14 +6244,14 @@ NsEnsembleImplementationCmdNR( * names. */ int reparseCount = 0; /* Number of reparses. */ - /* + /* * Must recheck objc, since numParameters might have changed. Cf. test * namespace-53.9. */ - + restartEnsembleParse: if (objc < 2 + ensemblePtr->numParameters) { - /* + /* * We don't have a subcommand argument. Make error message. */ @@ -6262,7 +6262,7 @@ NsEnsembleImplementationCmdNR( Tcl_DStringInit(&buf); if (ensemblePtr->parameterList == NULL) { len = 0; - } else if (TclListObjGetElements(NULL, ensemblePtr->parameterList, + } else if (TclListObjGetElements(NULL, ensemblePtr->parameterList, &len, &elemPtrs) != TCL_OK) { Tcl_Panic("List of ensemble parameters is not a list"); } @@ -6335,7 +6335,7 @@ NsEnsembleImplementationCmdNR( * Cache for later in the subcommand object. */ - MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], + MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], ensemblePtr, fullName, prefixObj); } else if (!(ensemblePtr->flags & TCL_ENSEMBLE_PREFIX)) { /* @@ -6404,7 +6404,7 @@ NsEnsembleImplementationCmdNR( * Cache for later in the subcommand object. */ - MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], + MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], ensemblePtr, fullName, prefixObj); } @@ -6417,10 +6417,10 @@ NsEnsembleImplementationCmdNR( * number of arguments to this ensemble command), populating it and then * feeding it back through the main command-lookup engine. In theory, we * could look up the command in the namespace ourselves, as we already - * have the namespace in which it is guaranteed to exist, - * + * have the namespace in which it is guaranteed to exist, + * * ((Q: That's not true if the -map option is used, is it?)) - * + * * but we don't do that (the cacheing of the command object used should * help with that.) */ @@ -6457,10 +6457,10 @@ NsEnsembleImplementationCmdNR( listRepPtr->elemCount = copyObjc; copyObjv = &listRepPtr->elements; memcpy(copyObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); - memcpy(copyObjv+prefixObjc, objv+1, + memcpy(copyObjv+prefixObjc, objv+1, sizeof(Tcl_Obj *) * ensemblePtr->numParameters); - memcpy(copyObjv+prefixObjc+ensemblePtr->numParameters, - objv+ensemblePtr->numParameters+2, + memcpy(copyObjv+prefixObjc+ensemblePtr->numParameters, + objv+ensemblePtr->numParameters+2, sizeof(Tcl_Obj *) * (objc-ensemblePtr->numParameters-2)); for (i=0; i < copyObjc; i++) { @@ -6499,7 +6499,7 @@ NsEnsembleImplementationCmdNR( /* * Hand off to the target command. */ - + return Tcl_NREvalObj(interp, copyPtr, TCL_EVAL_INVOKE); } @@ -6544,7 +6544,7 @@ NsEnsembleImplementationCmdNR( } Tcl_AppendResult(interp, "unknown ", (ensemblePtr->flags & TCL_ENSEMBLE_PREFIX ? "or ambiguous " : ""), - "subcommand \"", TclGetString(objv[1+ensemblePtr->numParameters]), + "subcommand \"", TclGetString(objv[1+ensemblePtr->numParameters]), "\": must be ", NULL); if (ensemblePtr->subcommandTable.numEntries == 1) { Tcl_AppendResult(interp, ensemblePtr->subcommandArrayPtr[0], NULL); diff --git a/generic/tclObj.c b/generic/tclObj.c index f445f08..a92ea7e 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.142 2008/07/27 22:18:21 nijtmans Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.143 2008/10/15 06:17:03 nijtmans Exp $ */ #include "tclInt.h" @@ -206,28 +206,28 @@ static int SetCmdNameFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); * implementations. */ -static Tcl_ObjType oldBooleanType = { +static const Tcl_ObjType oldBooleanType = { "boolean", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ NULL, /* updateStringProc */ SetBooleanFromAny /* setFromAnyProc */ }; -Tcl_ObjType tclBooleanType = { +const Tcl_ObjType tclBooleanType = { "booleanString", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ NULL, /* updateStringProc */ SetBooleanFromAny /* setFromAnyProc */ }; -Tcl_ObjType tclDoubleType = { +const Tcl_ObjType tclDoubleType = { "double", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ UpdateStringOfDouble, /* updateStringProc */ SetDoubleFromAny /* setFromAnyProc */ }; -Tcl_ObjType tclIntType = { +const Tcl_ObjType tclIntType = { "int", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ @@ -235,7 +235,7 @@ Tcl_ObjType tclIntType = { SetIntFromAny /* setFromAnyProc */ }; #ifndef NO_WIDE_TYPE -Tcl_ObjType tclWideIntType = { +const Tcl_ObjType tclWideIntType = { "wideInt", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ @@ -243,7 +243,7 @@ Tcl_ObjType tclWideIntType = { SetWideIntFromAny /* setFromAnyProc */ }; #endif -Tcl_ObjType tclBignumType = { +const Tcl_ObjType tclBignumType = { "bignum", /* name */ FreeBignum, /* freeIntRepProc */ DupBignum, /* dupIntRepProc */ @@ -255,7 +255,7 @@ Tcl_ObjType tclBignumType = { * The structure below defines the Tcl obj hash key type. */ -Tcl_HashKeyType tclObjHashKeyType = { +const Tcl_HashKeyType tclObjHashKeyType = { TCL_HASH_KEY_TYPE_VERSION, /* version */ 0, /* flags */ TclHashObjKey, /* hashKeyProc */ @@ -279,7 +279,7 @@ Tcl_HashKeyType tclObjHashKeyType = { * own purposes. */ -static Tcl_ObjType tclCmdNameType = { +static const Tcl_ObjType tclCmdNameType = { "cmdName", /* name */ FreeCmdNameInternalRep, /* freeIntRepProc */ DupCmdNameInternalRep, /* dupIntRepProc */ diff --git a/generic/tclProc.c b/generic/tclProc.c index 423eb3b..a0a608b 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.164 2008/10/14 22:37:53 nijtmans Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.165 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -63,7 +63,7 @@ static Tcl_NRPostProc Uplevel_Callback; * The ProcBodyObjType type */ -Tcl_ObjType tclProcBodyType = { +const Tcl_ObjType tclProcBodyType = { "procbody", /* name for this type */ ProcBodyFree, /* FreeInternalRep function */ ProcBodyDup, /* DupInternalRep function */ @@ -2801,7 +2801,7 @@ Tcl_DisassembleObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *types[] = { + static const char *const types[] = { "lambda", "method", "objmethod", "proc", "script", NULL }; enum Types { diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index c82b474..4748e58 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.c,v 1.29 2008/10/04 18:06:48 dkf Exp $ + * RCS: @(#) $Id: tclRegexp.c,v 1.30 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -102,7 +102,7 @@ static int SetRegexpFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); * compiled form of the regular expression. */ -Tcl_ObjType tclRegexpType = { +const Tcl_ObjType tclRegexpType = { "regexp", /* name */ FreeRegexpInternalRep, /* freeIntRepProc */ DupRegexpInternalRep, /* dupIntRepProc */ diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 16a5bae..4a7d0f4 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.71 2008/04/07 15:23:10 rmax Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.72 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -64,7 +64,7 @@ static void UpdateStringOfString(Tcl_Obj *objPtr); * functions that can be invoked by generic object code. */ -Tcl_ObjType tclStringType = { +const Tcl_ObjType tclStringType = { "string", /* name */ FreeStringInternalRep, /* freeIntRepPro */ DupStringInternalRep, /* dupIntRepProc */ diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 71978d7..27a9248 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.105 2008/10/14 22:37:53 nijtmans Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.106 2008/10/15 06:17:04 nijtmans Exp $ */ #include "tclInt.h" @@ -80,7 +80,7 @@ static void UpdateStringOfEndOffset(Tcl_Obj* objPtr); * integer, so no memory management is required for it. */ -Tcl_ObjType tclEndOffsetType = { +const Tcl_ObjType tclEndOffsetType = { "end-offset", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ diff --git a/generic/tclVar.c b/generic/tclVar.c index a359711..a68c5d2 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.169 2008/10/08 14:50:57 dgp Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.170 2008/10/15 06:17:03 nijtmans Exp $ */ #include "tclInt.h" @@ -30,7 +30,7 @@ static void FreeVarEntry(Tcl_HashEntry *hPtr); static int CompareVarKeys(void *keyPtr, Tcl_HashEntry *hPtr); static unsigned int HashVarKey(Tcl_HashTable *tablePtr, void *keyPtr); -static Tcl_HashKeyType tclVarHashKeyType = { +static const Tcl_HashKeyType tclVarHashKeyType = { TCL_HASH_KEY_TYPE_VERSION, /* version */ 0, /* flags */ HashVarKey, /* hashKeyProc */ @@ -201,7 +201,7 @@ static Tcl_SetFromAnyProc PanicOnSetVarName; * Tcl_Obj), or NULL if it is a scalar variable */ -static Tcl_ObjType localVarNameType = { +static const Tcl_ObjType localVarNameType = { "localVarName", FreeLocalVarName, DupLocalVarName, PanicOnUpdateVarName, PanicOnSetVarName }; @@ -219,13 +219,13 @@ static Tcl_ObjType localVarNameType = { static Tcl_FreeInternalRepProc FreeNsVarName; static Tcl_DupInternalRepProc DupNsVarName; -static Tcl_ObjType tclNsVarNameType = { +static const Tcl_ObjType tclNsVarNameType = { "namespaceVarName", FreeNsVarName, DupNsVarName, PanicOnUpdateVarName, PanicOnSetVarName }; #endif -static Tcl_ObjType tclParsedVarNameType = { +static const Tcl_ObjType tclParsedVarNameType = { "parsedVarName", FreeParsedVarName, DupParsedVarName, UpdateParsedVarName, PanicOnSetVarName }; @@ -242,7 +242,7 @@ static Tcl_ObjType tclParsedVarNameType = { * as this can be safely copied. */ -Tcl_ObjType tclArraySearchType = { +const Tcl_ObjType tclArraySearchType = { "array search", NULL, NULL, NULL, SetArraySearchObj }; @@ -2723,7 +2723,7 @@ Tcl_ArrayObjCmd( ARRAY_NAMES, ARRAY_NEXTELEMENT, ARRAY_SET, ARRAY_SIZE, ARRAY_STARTSEARCH, ARRAY_STATISTICS, ARRAY_UNSET }; - static const char *arrayOptions[] = { + static const char *const arrayOptions[] = { "anymore", "donesearch", "exists", "get", "names", "nextelement", "set", "size", "startsearch", "statistics", "unset", NULL }; @@ -3051,7 +3051,7 @@ Tcl_ArrayObjCmd( char *name; Tcl_Obj *namePtr, *resultPtr, *patternPtr; int mode, matched = 0; - static const char *options[] = { + static const char *const options[] = { "-exact", "-glob", "-regexp", NULL }; enum options { OPT_EXACT, OPT_GLOB, OPT_REGEXP }; @@ -4351,7 +4351,7 @@ TclDeleteNamespaceVars( varPtr = VarHashFirstVar(tablePtr, &search)) { Tcl_Obj *objPtr = Tcl_NewObj(); Tcl_IncrRefCount(objPtr); - + VarHashRefCount(varPtr)++; /* Make sure we get to remove from * hash. */ Tcl_GetVariableFullName(interp, (Tcl_Var) varPtr, objPtr); -- cgit v0.12 From 89b27a8118e809ac322a0200fbda93fd65b03d15 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 15 Oct 2008 10:43:37 +0000 Subject: Lots of very minor formatting fixes. --- doc/AddErrInfo.3 | 3 ++- doc/AppInit.3 | 4 +++- doc/AssocData.3 | 4 +++- doc/Async.3 | 4 +++- doc/CallDel.3 | 14 ++++++++++---- doc/CrtCommand.3 | 6 +++++- doc/CrtFileHdlr.3 | 7 +++++-- doc/CrtObjCmd.3 | 10 ++++++++-- doc/CrtTimerHdlr.3 | 6 +++++- doc/CrtTrace.3 | 8 +++++++- doc/DoWhenIdle.3 | 6 +++++- doc/Encoding.3 | 4 +++- doc/Exit.3 | 4 +++- doc/FileSystem.3 | 4 ++-- doc/GetStdChan.3 | 4 +++- doc/GetTime.3 | 2 ++ doc/Hash.3 | 10 +++++++++- doc/Notifier.3 | 16 +++++++++++++++- doc/Object.3 | 12 +++++++++++- doc/Preserve.3 | 4 +++- doc/SetResult.3 | 4 +++- doc/SplitList.3 | 5 ++++- doc/SplitPath.3 | 5 ++++- doc/StaticPkg.3 | 4 +++- doc/StringObj.3 | 14 ++++++++++++-- doc/Tcl.n | 10 ++++++---- doc/TraceCmd.3 | 4 +++- doc/TraceVar.3 | 4 +++- doc/WrongNumArgs.3 | 12 +++++++----- doc/after.n | 17 +++++++++++++---- doc/append.n | 9 +++++---- doc/chan.n | 4 +++- doc/clock.n | 2 ++ doc/dict.n | 34 ++++++++++++++++++++++++++++++++-- doc/encoding.n | 4 +++- doc/error.n | 5 ++++- doc/eval.n | 6 +++++- doc/exec.n | 16 +++++++++++++++- doc/expr.n | 29 ++++++++++++++++++++++++++++- doc/file.n | 20 ++++++++++++++++++-- doc/fileevent.n | 9 +++++---- doc/glob.n | 11 ++++++++--- 42 files changed, 293 insertions(+), 67 deletions(-) diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index 161de0c..ae535d7 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.21 2008/06/29 22:28:21 dkf Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.22 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.5 Tcl "Tcl Library Procedures" @@ -140,6 +140,7 @@ if ((objc % 2) == 0) { /* explicit result argument */ } return Tcl_SetReturnOptions(interp, Tcl_NewListObj(objc-1, objv+1)); .CE +.PP (It is not really implemented that way. Internal access privileges allow for a more efficient alternative that meshes better with the bytecode compiler.) diff --git a/doc/AppInit.3 b/doc/AppInit.3 index 99e1555..15d5635 100644 --- a/doc/AppInit.3 +++ b/doc/AppInit.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AppInit.3,v 1.9 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: AppInit.3,v 1.10 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_AppInit 3 7.0 Tcl "Tcl Library Procedures" @@ -57,9 +57,11 @@ for the interpreter's result; otherwise the result is ignored. .PP In addition to \fBTcl_AppInit\fR, your application should also contain a procedure \fBmain\fR that calls \fBTcl_Main\fR as follows: +.PP .CS Tcl_Main(argc, argv, Tcl_AppInit); .CE +.PP The third argument to \fBTcl_Main\fR gives the address of the application-specific initialization procedure to invoke. This means that you do not have to use the name \fBTcl_AppInit\fR diff --git a/doc/AssocData.3 b/doc/AssocData.3 index 2b85137..6366cdf 100644 --- a/doc/AssocData.3 +++ b/doc/AssocData.3 @@ -5,7 +5,7 @@ '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" -'\" RCS: @(#) $Id: AssocData.3,v 1.8 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: AssocData.3,v 1.9 2008/10/15 10:43:37 dkf Exp $ .so man.macros .TH Tcl_SetAssocData 3 7.5 Tcl "Tcl Library Procedures" .BS @@ -63,11 +63,13 @@ If the \fIdeleteProc\fR argument is non-NULL it specifies the address of a procedure to invoke if the interpreter is deleted before the association is deleted. \fIDeleteProc\fR should have arguments and result that match the type \fBTcl_InterpDeleteProc\fR: +.PP .CS typedef void \fBTcl_InterpDeleteProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR); .CE +.PP When \fIdeleteProc\fR is invoked the \fIclientData\fR and \fIinterp\fR arguments will be the same as the corresponding arguments passed to \fBTcl_SetAssocData\fR. diff --git a/doc/Async.3 b/doc/Async.3 index 346a26c..dba4400 100644 --- a/doc/Async.3 +++ b/doc/Async.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Async.3,v 1.13 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: Async.3,v 1.14 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_AsyncCreate 3 7.0 Tcl "Tcl Library Procedures" @@ -83,12 +83,14 @@ the world is in a safe state, and \fIproc\fR can then carry out the actions associated with the asynchronous event. \fIProc\fR should have arguments and result that match the type \fBTcl_AsyncProc\fR: +.PP .CS typedef int \fBTcl_AsyncProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, int \fIcode\fR); .CE +.PP The \fIclientData\fR will be the same as the \fIclientData\fR argument passed to \fBTcl_AsyncCreate\fR when the handler was created. diff --git a/doc/CallDel.3 b/doc/CallDel.3 index 9c225e0..0dbed27 100644 --- a/doc/CallDel.3 +++ b/doc/CallDel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CallDel.3,v 1.7 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: CallDel.3,v 1.8 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_CallWhenDeleted 3 7.0 Tcl "Tcl Library Procedures" @@ -28,7 +28,6 @@ Procedure to call when \fIinterp\fR is deleted. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE - .SH DESCRIPTION .PP \fBTcl_CallWhenDeleted\fR arranges for \fIproc\fR to be called by @@ -38,11 +37,13 @@ is deleted, but the interpreter will still be valid at the time of the call. \fIProc\fR should have arguments and result that match the type \fBTcl_InterpDeleteProc\fR: +.PP .CS typedef void \fBTcl_InterpDeleteProc\fR( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR); .CE +.PP The \fIclientData\fR and \fIinterp\fR parameters are copies of the \fIclientData\fR and \fIinterp\fR arguments given to \fBTcl_CallWhenDeleted\fR. @@ -58,6 +59,11 @@ deleted. If there is no deletion callback that matches \fIinterp\fR, \fIproc\fR, and \fIclientData\fR then the call to \fBTcl_DontCallWhenDeleted\fR has no effect. - +.PP +Note that if the callback is being used to delete a resource that \fImust\fR +be released on exit, \fBTcl_CreateExitHandler\fR should be used to ensure that +a callback is received even if the application terminates without deleting the interpreter. +.SH "SEE ALSO" +Tcl_CreateExitHandler(3), Tcl_CreateThreadExitHandler(3) .SH KEYWORDS -callback, delete, interpreter +callback, cleanup, delete, interpreter diff --git a/doc/CrtCommand.3 b/doc/CrtCommand.3 index d9aab23..02081bf 100644 --- a/doc/CrtCommand.3 +++ b/doc/CrtCommand.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtCommand.3,v 1.15 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: CrtCommand.3,v 1.16 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_CreateCommand 3 "" Tcl "Tcl Library Procedures" @@ -76,6 +76,7 @@ the process of being deleted, then it does not create a new command and it returns NULL. \fIProc\fR should have arguments and result that match the type \fBTcl_CmdProc\fR: +.PP .CS typedef int \fBTcl_CmdProc\fR( ClientData \fIclientData\fR, @@ -83,6 +84,7 @@ typedef int \fBTcl_CmdProc\fR( int \fIargc\fR, const char *\fIargv\fR[]); .CE +.PP When \fIproc\fR is invoked the \fIclientData\fR and \fIinterp\fR parameters will be copies of the \fIclientData\fR and \fIinterp\fR arguments given to \fBTcl_CreateCommand\fR. @@ -130,10 +132,12 @@ or by replacing \fIcmdName\fR in another call to \fBTcl_CreateCommand\fR. application an opportunity to release any structures associated with the command. \fIDeleteProc\fR should have arguments and result that match the type \fBTcl_CmdDeleteProc\fR: +.PP .CS typedef void \fBTcl_CmdDeleteProc\fR( ClientData \fIclientData\fR); .CE +.PP The \fIclientData\fR argument will be the same as the \fIclientData\fR argument passed to \fBTcl_CreateCommand\fR. .SH "SEE ALSO" diff --git a/doc/CrtFileHdlr.3 b/doc/CrtFileHdlr.3 index 4b352ba..00a6a48 100644 --- a/doc/CrtFileHdlr.3 +++ b/doc/CrtFileHdlr.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtFileHdlr.3,v 1.9 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: CrtFileHdlr.3,v 1.10 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_CreateFileHandler 3 8.0 Tcl "Tcl Library Procedures" @@ -50,11 +50,13 @@ as \fBvwait\fR. .PP \fIProc\fR should have arguments and result that match the type \fBTcl_FileProc\fR: +.PP .CS typedef void \fBTcl_FileProc\fR( ClientData \fIclientData\fR, int \fImask\fR); .CE +.PP The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTcl_CreateFileHandler\fR when the callback @@ -65,7 +67,6 @@ of the requested conditions actually exists for the file; it will contain a subset of the bits in the \fImask\fR argument to \fBTcl_CreateFileHandler\fR. .PP -.PP There may exist only one handler for a given file at a given time. If \fBTcl_CreateFileHandler\fR is called when a handler already exists for \fIfd\fR, then the new callback replaces the information @@ -86,5 +87,7 @@ blocking or nonblocking mode as required. .PP Note that these interfaces are only supported by the Unix implementation of the Tcl notifier. +.SH "SEE ALSO" +fileevent(n), Tcl_CreateTimerHandler(3), Tcl_DoWhenIdle(3) .SH KEYWORDS callback, file, handler diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3 index 2e30de9..43a855b 100644 --- a/doc/CrtObjCmd.3 +++ b/doc/CrtObjCmd.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.18 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.19 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures" @@ -90,6 +90,7 @@ the process of being deleted, then it does not create a new command and it returns NULL. \fIproc\fR should have arguments and result that match the type \fBTcl_ObjCmdProc\fR: +.PP .CS typedef int \fBTcl_ObjCmdProc\fR( ClientData \fIclientData\fR, @@ -97,6 +98,7 @@ typedef int \fBTcl_ObjCmdProc\fR( int \fIobjc\fR, Tcl_Obj *const \fIobjv\fR[]); .CE +.PP When \fIproc\fR is invoked, the \fIclientData\fR and \fIinterp\fR parameters will be copies of the \fIclientData\fR and \fIinterp\fR arguments given to \fBTcl_CreateObjCommand\fR. Typically, \fIclientData\fR points to an @@ -161,10 +163,12 @@ or by replacing \fIname\fR in another call to \fBTcl_CreateObjCommand\fR. application an opportunity to release any structures associated with the command. \fIDeleteProc\fR should have arguments and result that match the type \fBTcl_CmdDeleteProc\fR: +.PP .CS typedef void \fBTcl_CmdDeleteProc\fR( ClientData \fIclientData\fR); .CE +.PP The \fIclientData\fR argument will be the same as the \fIclientData\fR argument passed to \fBTcl_CreateObjCommand\fR. .PP @@ -199,6 +203,7 @@ Otherwise it places information about the command in the \fBTcl_CmdInfo\fR structure pointed to by \fIinfoPtr\fR and returns 1. A \fBTcl_CmdInfo\fR structure has the following fields: +.PP .CS typedef struct Tcl_CmdInfo { int \fIisNativeObjectProc\fR; @@ -211,6 +216,7 @@ typedef struct Tcl_CmdInfo { Tcl_Namespace *\fInamespacePtr\fR; } \fBTcl_CmdInfo\fR; .CE +.PP The \fIisNativeObjectProc\fR field has the value 1 if \fBTcl_CreateObjCommand\fR was called to register the command; it is 0 if only \fBTcl_CreateCommand\fR was called. @@ -293,6 +299,6 @@ specified by the name in a \fBTcl_Obj\fR. The command name is resolved relative to the current namespace. Returns NULL if the command is not found. .SH "SEE ALSO" -Tcl_CreateCommand, Tcl_ResetResult, Tcl_SetObjResult +Tcl_CreateCommand(3), Tcl_ResetResult(3), Tcl_SetObjResult(3) .SH KEYWORDS bind, command, create, delete, namespace, object diff --git a/doc/CrtTimerHdlr.3 b/doc/CrtTimerHdlr.3 index 7e0368f..841b465 100644 --- a/doc/CrtTimerHdlr.3 +++ b/doc/CrtTimerHdlr.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtTimerHdlr.3,v 1.7 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: CrtTimerHdlr.3,v 1.8 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_CreateTimerHandler 3 7.5 Tcl "Tcl Library Procedures" @@ -50,10 +50,12 @@ are other pending events to process before the call to .PP \fIProc\fR should have arguments and return value that match the type \fBTcl_TimerProc\fR: +.PP .CS typedef void \fBTcl_TimerProc\fR( ClientData \fIclientData\fR); .CE +.PP The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTcl_CreateTimerHandler\fR when the callback @@ -70,5 +72,7 @@ has been invoked then \fBTcl_DeleteTimerHandler\fR does nothing. The tokens returned by \fBTcl_CreateTimerHandler\fR never have a value of NULL, so if NULL is passed to \fBTcl_DeleteTimerHandler\fR then the procedure does nothing. +.SH "SEE ALSO" +after(n), Tcl_CreateFileHandler(3), Tcl_DoWhenIdle(3) .SH KEYWORDS callback, clock, handler, timer diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3 index 1248619..0c02776 100644 --- a/doc/CrtTrace.3 +++ b/doc/CrtTrace.3 @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtTrace.3,v 1.15 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: CrtTrace.3,v 1.16 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_CreateTrace 3 "" Tcl "Tcl Library Procedures" @@ -65,6 +65,7 @@ interpreter. .PP \fIobjProc\fR should have arguments and result that match the type, \fBTcl_CmdObjTraceProc\fR: +.PP .CS typedef int \fBTcl_CmdObjTraceProc\fR( \fBClientData\fR \fIclientData\fR, @@ -75,6 +76,7 @@ typedef int \fBTcl_CmdObjTraceProc\fR( int \fIobjc\fR, \fBTcl_Obj\fR *const \fIobjv\fR[]); .CE +.PP The \fIclientData\fR and \fIinterp\fR parameters are copies of the corresponding arguments given to \fBTcl_CreateTrace\fR. \fIClientData\fR typically points to an application-specific data @@ -141,10 +143,12 @@ When \fBTcl_DeleteTrace\fR is called, the interpreter invokes the \fIdeleteProc\fR that was passed as a parameter to \fBTcl_CreateObjTrace\fR. The \fIdeleteProc\fR must match the type, \fBTcl_CmdObjTraceDeleteProc\fR: +.PP .CS typedef void \fBTcl_CmdObjTraceDeleteProc\fR( \fBClientData\fR \fIclientData\fR); .CE +.PP The \fIclientData\fR parameter will be the same as the \fIclientData\fR parameter that was originally passed to \fBTcl_CreateObjTrace\fR. @@ -155,6 +159,7 @@ compatibility with code that was developed for older versions of the Tcl interpreter. It is similar to \fBTcl_CreateObjTrace\fR, except that its \fIproc\fR parameter should have arguments and result that match the type \fBTcl_CmdTraceProc\fR: +.PP .CS typedef void \fBTcl_CmdTraceProc\fR( ClientData \fIclientData\fR, @@ -166,6 +171,7 @@ typedef void \fBTcl_CmdTraceProc\fR( int \fIargc\fR, const char *\fIargv\fR[]); .CE +.PP The parameters to the \fIproc\fR callback are similar to those of the \fIobjProc\fR callback above. The \fIcommandToken\fR is replaced with \fIcmdProc\fR, a pointer to the (string-based) command diff --git a/doc/DoWhenIdle.3 b/doc/DoWhenIdle.3 index b75de55..37b4cec 100644 --- a/doc/DoWhenIdle.3 +++ b/doc/DoWhenIdle.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: DoWhenIdle.3,v 1.6 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: DoWhenIdle.3,v 1.7 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_DoWhenIdle 3 7.5 Tcl "Tcl Library Procedures" @@ -42,10 +42,12 @@ use \fBTcl_DoOneEvent\fR to dispatch events. .PP \fIProc\fR should have arguments and result that match the type \fBTcl_IdleProc\fR: +.PP .CS typedef void \fBTcl_IdleProc\fR( ClientData \fIclientData\fR); .CE +.PP The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTcl_DoWhenIdle\fR. Typically, \fIclientData\fR points to a data structure containing application-specific information about @@ -81,5 +83,7 @@ continuously. This will interact badly with certain features of Tk that attempt to wait for all idle callbacks to complete. If you would like for an idle callback to reschedule itself continuously, it is better to use a timer handler with a zero timeout period. +.SH "SEE ALSO" +after(n), Tcl_CreateFileHandler(3), Tcl_CreateTimerHandler(3) .SH KEYWORDS callback, defer, idle callback diff --git a/doc/Encoding.3 b/doc/Encoding.3 index a824b2f..5fadc44 100644 --- a/doc/Encoding.3 +++ b/doc/Encoding.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Encoding.3,v 1.30 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Encoding.3,v 1.31 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures" @@ -282,6 +282,7 @@ and the interfaces when running on Windows 95, you would have to perform the following type of test over and over in your program (as represented in pseudo-code): +.PP .CS if (running NT) { encoding <- Tcl_GetEncoding("unicode"); @@ -291,6 +292,7 @@ if (running NT) { nativeBuffer <- Tcl_UtfToExternal(NULL, utfBuffer); } .CE +.PP \fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR automatically handle this test and use the proper encoding based on the current operating system. \fBTcl_WinUtfToTChar\fR returns a pointer to diff --git a/doc/Exit.3 b/doc/Exit.3 index 61fb222..f95a9d1 100644 --- a/doc/Exit.3 +++ b/doc/Exit.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Exit.3,v 1.8 2008/08/01 18:22:29 hobbs Exp $ +'\" RCS: @(#) $Id: Exit.3,v 1.9 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_Exit 3 8.5 Tcl "Tcl Library Procedures" @@ -92,10 +92,12 @@ by \fBTcl_FinalizeThread\fR and \fBTcl_ExitThread\fR. This provides a hook for cleanup operations such as flushing buffers and freeing global memory. \fIProc\fR should match the type \fBTcl_ExitProc\fR: +.PP .CS typedef void \fBTcl_ExitProc\fR( ClientData \fIclientData\fR); .CE +.PP The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTcl_CreateExitHandler\fR or \fBTcl_CreateThreadExitHandler\fR when diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index b3baf8f..bec5e23 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.66 2008/10/05 22:25:35 nijtmans Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.67 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -1583,7 +1583,7 @@ cleanup action required. typedef void \fBTcl_FSUnloadFileProc\fR( Tcl_LoadHandle \fIloadHandle\fR); .CE -.SS GETCWDPROC +.SS GETCWDPROC .PP Function to process a \fBTcl_FSGetCwd\fR call. Most filesystems need not implement this. It will usually only be called once, if \fBgetcwd\fR is diff --git a/doc/GetStdChan.3 b/doc/GetStdChan.3 index 074d237..fb91517 100644 --- a/doc/GetStdChan.3 +++ b/doc/GetStdChan.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetStdChan.3,v 1.8 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: GetStdChan.3,v 1.9 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_GetStdChannel 3 7.5 Tcl "Tcl Library Procedures" @@ -55,9 +55,11 @@ set to NULL. .PP If a non-NULL value for \fIchannel\fR is passed to \fBTcl_SetStdChannel\fR, then that same value should be passed to \fBTcl_RegisterChannel\fR, like so: +.PP .CS Tcl_RegisterChannel(NULL, channel); .CE +.PP This is a workaround for a misfeature in \fBTcl_SetStdChannel\fR that it fails to do some reference counting housekeeping. This misfeature cannot be corrected without contradicting the assumptions of some existing diff --git a/doc/GetTime.3 b/doc/GetTime.3 index c3f7134..a180860 100644 --- a/doc/GetTime.3 +++ b/doc/GetTime.3 @@ -80,6 +80,7 @@ of the OS. The arguments to the function are allowed to be NULL; and any argument which is NULL is ignored and not set. .PP The signatures of the handler functions are as follows: +.PP .CS typedef void \fBTcl_GetTimeProc\fR( Tcl_Time *\fItimebuf\fR, @@ -88,6 +89,7 @@ typedef void \fBTcl_ScaleTimeProc\fR( Tcl_Time *\fItimebuf\fR, ClientData \fIclientData\fR); .CE +.PP The \fItimebuf\fR fields contain the time to manipulate, and the \fIclientData\fR fields contain a pointer supplied at the time the handler functions were registered. diff --git a/doc/Hash.3 b/doc/Hash.3 index 9ed9c1b..13bfe3b 100644 --- a/doc/Hash.3 +++ b/doc/Hash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Hash.3,v 1.28 2008/10/04 11:51:25 nijtmans Exp $ +'\" RCS: @(#) $Id: Hash.3,v 1.29 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures" @@ -280,31 +280,37 @@ circular dependency. .PP The \fIhashKeyProc\fR member contains the address of a function called to calculate a hash value for the key. +.PP .CS typedef unsigned int \fBTcl_HashKeyProc\fR( Tcl_HashTable *\fItablePtr\fR, void *\fIkeyPtr\fR); .CE +.PP If this is NULL then \fIkeyPtr\fR is used and \fBTCL_HASH_KEY_RANDOMIZE_HASH\fR is assumed. .PP The \fIcompareKeysProc\fR member contains the address of a function called to compare two keys. +.PP .CS typedef int \fBTcl_CompareHashKeysProc\fR( void *\fIkeyPtr\fR, Tcl_HashEntry *\fIhPtr\fR); .CE +.PP If this is NULL then the \fIkeyPtr\fR pointers are compared. If the keys do not match then the function returns 0, otherwise it returns 1. .PP The \fIallocEntryProc\fR member contains the address of a function called to allocate space for an entry and initialize the key and clientData. +.PP .CS typedef Tcl_HashEntry *\fBTcl_AllocHashEntryProc\fR( Tcl_HashTable *\fItablePtr\fR, void *\fIkeyPtr\fR); .CE +.PP If this is NULL then Tcl_Alloc is used to allocate enough space for a Tcl_HashEntry, the key pointer is assigned to key.oneWordValue and the clientData is set to NULL. String keys and array keys use this function to @@ -316,10 +322,12 @@ object. .PP The \fIfreeEntryProc\fR member contains the address of a function called to free space for an entry. +.PP .CS typedef void \fBTcl_FreeHashEntryProc\fR( Tcl_HashEntry *\fIhPtr\fR); .CE +.PP If this is NULL then Tcl_Free is used to free the space for the entry. Tcl_Obj* keys use this function to decrement the reference count on the object. diff --git a/doc/Notifier.3 b/doc/Notifier.3 index 4eddc54..74aa77b 100644 --- a/doc/Notifier.3 +++ b/doc/Notifier.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Notifier.3,v 1.23 2008/07/24 21:54:43 nijtmans Exp $ +'\" RCS: @(#) $Id: Notifier.3,v 1.24 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Notifier 3 8.1 Tcl "Tcl Library Procedures" @@ -229,11 +229,13 @@ The procedure \fBTcl_CreateEventSource\fR creates a new event source. Its arguments specify the setup procedure and check procedure for the event source. \fISetupProc\fR should match the following prototype: +.PP .CS typedef void \fBTcl_EventSetupProc\fR( ClientData \fIclientData\fR, int \fIflags\fR); .CE +.PP The \fIclientData\fR argument will be the same as the \fIclientData\fR argument to \fBTcl_CreateEventSource\fR; it is typically used to point to private information managed by the event source. @@ -268,12 +270,14 @@ connection. The \fItimePtr\fR argument to \fBTcl_WaitForEvent\fR points to a structure that describes a time interval in seconds and microseconds: +.PP .CS typedef struct Tcl_Time { long \fIsec\fR; long \fIusec\fR; } \fBTcl_Time\fR; .CE +.PP The \fIusec\fR field should be less than 1000000. .PP Information provided to \fBTcl_SetMaxBlockTime\fR @@ -303,11 +307,13 @@ The second procedure provided by each event source is its check procedure, indicated by the \fIcheckProc\fR argument to \fBTcl_CreateEventSource\fR. \fICheckProc\fR must match the following prototype: +.PP .CS typedef void \fBTcl_EventCheckProc\fR( ClientData \fIclientData\fR, int \fIflags\fR); .CE +.PP The arguments to this procedure are the same as those for \fIsetupProc\fR. \fBCheckProc\fR is invoked by \fBTcl_DoOneEvent\fR after it has waited for events. Presumably at least one event source is now prepared to @@ -326,12 +332,14 @@ to that event source. However, the first element of the structure must be a structure of type \fBTcl_Event\fR, and the address of this structure is used when communicating between the event source and the rest of the notifier. A \fBTcl_Event\fR has the following definition: +.PP .CS typedef struct { Tcl_EventProc *\fIproc\fR; struct Tcl_Event *\fInextPtr\fR; } \fBTcl_Event\fR; .CE +.PP The event source must fill in the \fIproc\fR field of the event before calling \fBTcl_QueueEvent\fR. The \fInextPtr\fR is used to link together the events in the queue @@ -359,11 +367,13 @@ When it is time to handle an event from the queue (steps 1 and 4 above) \fBTcl_ServiceEvent\fR will invoke the \fIproc\fR specified in the first queued \fBTcl_Event\fR structure. \fIProc\fR must match the following prototype: +.PP .CS typedef int \fBTcl_EventProc\fR( Tcl_Event *\fIevPtr\fR, int \fIflags\fR); .CE +.PP The first argument to \fIproc\fR is a pointer to the event, which will be the same as the first argument to the \fBTcl_QueueEvent\fR call that added the event to the queue. @@ -416,11 +426,13 @@ events from the event queue. \fBTcl_DeleteEvents\fR calls \fIproc\fR for each event in the queue, deleting those for with the procedure returns 1. Events for which the procedure returns 0 are left in the queue. \fIProc\fR should match the following prototype: +.PP .CS typedef int \fBTcl_EventDeleteProc\fR( Tcl_Event *\fIevPtr\fR, ClientData \fIclientData\fR); .CE +.PP The \fIclientData\fR argument will be the same as the \fIclientData\fR argument to \fBTcl_DeleteEvents\fR; it is typically used to point to private information managed by the event source. The \fIevPtr\fR will @@ -537,6 +549,7 @@ to another program, such as a Web browser plugin. To do this, the extension makes a call to \fBTcl_SetNotifier\fR passing a pointer to a \fBTcl_NotifierProcs\fR data structure. The structure has the following layout: +.PP .CS typedef struct Tcl_NotifierProcs { Tcl_SetTimerProc *setTimerProc; @@ -549,6 +562,7 @@ typedef struct Tcl_NotifierProcs { Tcl_ServiceModeHookProc *serviceModeHookProc; } \fBTcl_NotifierProcs\fR; .CE +.PP Following the call to \fBTcl_SetNotifier\fR, the pointers given in the \fBTcl_NotifierProcs\fR structure replace whatever notifier had been installed in the process. diff --git a/doc/Object.3 b/doc/Object.3 index 3b6abc8..00b4cec 100644 --- a/doc/Object.3 +++ b/doc/Object.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Object.3,v 1.21 2008/07/27 22:18:21 nijtmans Exp $ +'\" RCS: @(#) $Id: Object.3,v 1.22 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_Obj 3 8.5 Tcl "Tcl Library Procedures" @@ -109,6 +109,7 @@ by defining their own \fBTcl_ObjType\fR structs. .PP Each Tcl object is represented by a \fBTcl_Obj\fR structure which is defined as follows. +.PP .CS typedef struct Tcl_Obj { int \fIrefCount\fR; @@ -131,6 +132,7 @@ typedef struct Tcl_Obj { } \fIinternalRep\fR; } \fBTcl_Obj\fR; .CE +.PP The \fIbytes\fR and the \fIlength\fR members together hold an object's UTF-8 string representation, which is a \fIcounted string\fR not containing null bytes (UTF-8 null @@ -232,20 +234,26 @@ to see how to create a new object type. .PP As an example of the lifetime of an object, consider the following sequence of commands: +.PP .CS \fBset x 123\fR .CE +.PP This assigns to \fIx\fR an untyped object whose \fIbytes\fR member points to \fB123\fR and \fIlength\fR member contains 3. The object's \fItypePtr\fR member is NULL. +.PP .CS \fBputs "x is $x"\fR .CE +.PP \fIx\fR's string representation is valid (since \fIbytes\fR is non-NULL) and is fetched for the command. +.PP .CS \fBincr x\fR .CE +.PP The \fBincr\fR command first gets an integer from \fIx\fR's object by calling \fBTcl_GetIntFromObj\fR. This procedure checks whether the object is already an integer object. @@ -260,9 +268,11 @@ then invalidates its string representation (by calling \fBTcl_InvalidateStringRep\fR) since the string representation no longer corresponds to the internal representation. +.PP .CS \fBputs "x is now $x"\fR .CE +.PP The string representation of \fIx\fR's object is needed and is recomputed. The string representation is now \fB124\fR diff --git a/doc/Preserve.3 b/doc/Preserve.3 index e4ae2dc..1a48a56 100644 --- a/doc/Preserve.3 +++ b/doc/Preserve.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Preserve.3,v 1.7 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Preserve.3,v 1.8 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_Preserve 3 7.5 Tcl "Tcl Library Procedures" @@ -79,10 +79,12 @@ calls to \fBTcl_Release\fR then \fIfreeProc\fR will be called by All the work of freeing the object is carried out by \fIfreeProc\fR. \fIFreeProc\fR must have arguments and result that match the type \fBTcl_FreeProc\fR: +.PP .CS typedef void \fBTcl_FreeProc\fR( char *\fIblockPtr\fR); .CE +.PP The \fIblockPtr\fR argument to \fIfreeProc\fR will be the same as the \fIclientData\fR argument to \fBTcl_EventuallyFree\fR. The type of \fIblockPtr\fR (\fBchar *\fR) is different than the type of the diff --git a/doc/SetResult.3 b/doc/SetResult.3 index 0c7f1ec..da3b3f9 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.19 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.20 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" @@ -215,10 +215,12 @@ This allows applications to use non-standard storage allocators. When Tcl no longer needs the storage for the string, it will call \fIfreeProc\fR. \fIFreeProc\fR should have arguments and result that match the type \fBTcl_FreeProc\fR: +.PP .CS typedef void \fBTcl_FreeProc\fR( char *\fIblockPtr\fR); .CE +.PP When \fIfreeProc\fR is called, its \fIblockPtr\fR will be set to the value of \fIresult\fR passed to \fBTcl_SetResult\fR. .SH "SEE ALSO" diff --git a/doc/SplitList.3 b/doc/SplitList.3 index 04986d5..e70199a 100644 --- a/doc/SplitList.3 +++ b/doc/SplitList.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SplitList.3,v 1.14 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: SplitList.3,v 1.15 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures" @@ -81,15 +81,18 @@ also holds copies of all the list elements. It is the caller's responsibility to free up all of this storage. For example, suppose that you have called \fBTcl_SplitList\fR with the following code: +.PP .CS int argc, code; char *string; char **argv; \&... code = Tcl_SplitList(interp, string, &argc, &argv); +.PP .CE Then you should eventually free the storage with a call like the following: +.PP .CS Tcl_Free((char *) argv); .CE diff --git a/doc/SplitPath.3 b/doc/SplitPath.3 index d7380de..e992db4 100644 --- a/doc/SplitPath.3 +++ b/doc/SplitPath.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SplitPath.3,v 1.9 2004/10/07 15:15:48 dkf Exp $ +'\" RCS: @(#) $Id: SplitPath.3,v 1.10 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_SplitPath 3 7.5 Tcl "Tcl Library Procedures" @@ -61,6 +61,7 @@ holds copies of all the path elements. It is the caller's responsibility to free all of this storage. For example, suppose that you have called \fBTcl_SplitPath\fR with the following code: +.PP .CS int argc; char *path; @@ -68,8 +69,10 @@ char **argv; \&... Tcl_SplitPath(string, &argc, &argv); .CE +.PP Then you should eventually free the storage with a call like the following: +.PP .CS Tcl_Free((char *) argv); .CE diff --git a/doc/StaticPkg.3 b/doc/StaticPkg.3 index ad50fa6..975b961 100644 --- a/doc/StaticPkg.3 +++ b/doc/StaticPkg.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StaticPkg.3,v 1.10 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: StaticPkg.3,v 1.11 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_StaticPackage 3 7.5 Tcl "Tcl Library Procedures" @@ -53,10 +53,12 @@ be invoked, depending on whether the target interpreter is safe or not. \fIinitProc\fR and \fIsafeInitProc\fR must both match the following prototype: +.PP .CS typedef int \fBTcl_PackageInitProc\fR( Tcl_Interp *\fIinterp\fR); .CE +.PP The \fIinterp\fR argument identifies the interpreter in which the package is to be loaded. The initialization procedure must return \fBTCL_OK\fR or \fBTCL_ERROR\fR to indicate whether or not it completed successfully; in diff --git a/doc/StringObj.3 b/doc/StringObj.3 index 99bfdfb..5e08d8e 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StringObj.3,v 1.28 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: StringObj.3,v 1.29 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures" @@ -275,9 +275,11 @@ bytes is necessary to append only whole multi-byte characters. \fBTcl_Format\fR is the C-level interface to the engine of the \fBformat\fR command. The actual command procedure for \fBformat\fR is little more than +.PP .CS Tcl_Format(interp, Tcl_GetString(objv[1]), objc-2, objv+2); .CE +.PP The \fIobjc\fR Tcl_Obj values in \fIobjv\fR are formatted into a string according to the conversion specification in \fIformat\fR argument, following the documentation for the \fBformat\fR command. The resulting formatted @@ -287,22 +289,26 @@ returned, and an error message is recorded in \fIinterp\fR, if \fIinterp\fR is non-NULL. .PP \fBTcl_AppendFormatToObj\fR is an appending alternative form -of \fBTcl_Format\fR with functionality equivalent to +of \fBTcl_Format\fR with functionality equivalent to: +.PP .CS Tcl_Obj *newPtr = Tcl_Format(interp, format, objc, objv); if (newPtr == NULL) return TCL_ERROR; Tcl_AppendObjToObj(objPtr, newPtr); return TCL_OK; .CE +.PP but with greater convenience and efficiency when the appending functionality is needed. .PP \fBTcl_ObjPrintf\fR serves as a replacement for the common sequence +.PP .CS char buf[SOME_SUITABLE_LENGTH]; sprintf(buf, format, ...); Tcl_NewStringObj(buf, -1); .CE +.PP but with greater convenience and no need to determine \fBSOME_SUITABLE_LENGTH\fR. The formatting is done with the same core formatting engine used by \fBTcl_Format\fR. This means the set of @@ -316,19 +322,23 @@ passing around than the number of encoded characters those bytes happen to represent. The variable number of arguments passed in should be of the types that would be suitable for passing to \fBsprintf\fR. Note in this example usage, \fIx\fR is of type \fBlong\fR. +.PP .CS long x = 5; Tcl_Obj *objPtr = Tcl_ObjPrintf("Value is %d", x); .CE +.PP If the value of \fIformat\fR contains internal inconsistencies or invalid specifier formats, the formatted string result produced by \fBTcl_ObjPrintf\fR will be an error message describing the error. .PP \fBTcl_AppendPrintfToObj\fR is an appending alternative form of \fBTcl_ObjPrintf\fR with functionality equivalent to +.PP .CS Tcl_AppendObjToObj(objPtr, Tcl_ObjPrintf(format, ...)); .CE +.PP but with greater convenience and efficiency when the appending functionality is needed. .PP diff --git a/doc/Tcl.n b/doc/Tcl.n index b62a6e9..e486869 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Tcl.n,v 1.20 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl n "8.5" Tcl "Tcl Built-In Commands" @@ -123,7 +123,7 @@ substitutions are performed on the characters of \fIindex\fR. . \fIName\fR is the name of a scalar variable. It may contain any characters whatsoever except for close braces. -.LP +.PP There may be any number of variable substitutions in a single word. Variable substitution is not performed on words enclosed in braces. .RE @@ -194,7 +194,7 @@ be 0. The hexadecimal digits \fIhhhh\fR (one, two, three, or four of them) give a sixteen-bit hexadecimal value for the Unicode character that will be inserted. -.LP +.PP Backslash substitution is not performed on words enclosed in braces, except for backslash-newline as described above. .RE @@ -219,13 +219,15 @@ no substitutions are performed before making the recursive call and no additional substitutions are performed on the result of the nested script. .RS -.LP +.PP Substitutions take place from left to right, and each substitution is evaluated completely before attempting to evaluate the next. Thus, a sequence like +.PP .CS set y [set x 0][incr x][incr x] .CE +.PP will always set the variable \fIy\fR to the value, \fI012\fR. .RE .IP "[12] \fBSubstitution and word boundaries.\fR" diff --git a/doc/TraceCmd.3 b/doc/TraceCmd.3 index 813f6a1..ee8198f 100644 --- a/doc/TraceCmd.3 +++ b/doc/TraceCmd.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" CVS: @(#) $Id: TraceCmd.3,v 1.12 2008/06/29 22:28:24 dkf Exp $ +'\" CVS: @(#) $Id: TraceCmd.3,v 1.13 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_TraceCommand 3 7.4 Tcl "Tcl Library Procedures" @@ -64,6 +64,7 @@ Invoke \fIproc\fR when the command is deleted. Whenever one of the specified operations occurs to the command, \fIproc\fR will be invoked. It should have arguments and result that match the type \fBTcl_CommandTraceProc\fR: +.PP .CS typedef void \fBTcl_CommandTraceProc\fR( ClientData \fIclientData\fR, @@ -72,6 +73,7 @@ typedef void \fBTcl_CommandTraceProc\fR( const char *\fInewName\fR, int \fIflags\fR); .CE +.PP The \fIclientData\fR and \fIinterp\fR parameters will have the same values as those passed to \fBTcl_TraceCommand\fR when the trace was created. \fIClientData\fR typically points to an application-specific diff --git a/doc/TraceVar.3 b/doc/TraceVar.3 index 02e4c0d..65fa9a7 100644 --- a/doc/TraceVar.3 +++ b/doc/TraceVar.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TraceVar.3,v 1.20 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: TraceVar.3,v 1.21 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_TraceVar 3 7.4 Tcl "Tcl Library Procedures" @@ -123,6 +123,7 @@ Whenever one of the specified operations occurs on the variable, \fIproc\fR will be invoked. It should have arguments and result that match the type \fBTcl_VarTraceProc\fR: +.PP .CS typedef char *\fBTcl_VarTraceProc\fR( ClientData \fIclientData\fR, @@ -131,6 +132,7 @@ typedef char *\fBTcl_VarTraceProc\fR( char *\fIname2\fR, int \fIflags\fR); .CE +.PP The \fIclientData\fR and \fIinterp\fR parameters will have the same values as those passed to \fBTcl_TraceVar\fR when the trace was created. diff --git a/doc/WrongNumArgs.3 b/doc/WrongNumArgs.3 index daa729c..323ad40 100644 --- a/doc/WrongNumArgs.3 +++ b/doc/WrongNumArgs.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: WrongNumArgs.3,v 1.12 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: WrongNumArgs.3,v 1.13 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH Tcl_WrongNumArgs 3 8.0 Tcl "Tcl Library Procedures" @@ -31,7 +31,6 @@ Additional error information to print after leading arguments from \fIobjv\fR. This typically gives the acceptable syntax of the command. This argument may be NULL. .BE - .SH DESCRIPTION .PP \fBTcl_WrongNumArgs\fR is a utility procedure that is invoked by @@ -45,13 +44,17 @@ elements of \fIobjv\fR plus \fImessage\fR. For example, if .QW "\fBfileName count\fR" then \fIinterp\fR's result object will be set to the following string: +.PP .CS wrong # args: should be "foo fileName count" .CE +.PP If \fIobjc\fR is 2, the result will be set to the following string: +.PP .CS wrong # args: should be "foo bar fileName count" .CE +.PP \fIObjc\fR is usually 1, but may be 2 or more for commands like \fBstring\fR and the Tk widget commands, which use the first argument as a subcommand. @@ -68,12 +71,11 @@ originally passed in. Using the above example, let us assume that \fIbar\fR is actually an abbreviation for \fIbarfly\fR and the object is now an indexObject because it was passed to \fBTcl_GetIndexFromObj\fR. In this case the error message would be: +.PP .CS wrong # args: should be "foo barfly fileName count" .CE - .SH "SEE ALSO" -Tcl_GetIndexFromObj - +Tcl_GetIndexFromObj(3) .SH KEYWORDS command, error message, wrong number of arguments diff --git a/doc/after.n b/doc/after.n index 4e5dfdd..e6d2dd0 100644 --- a/doc/after.n +++ b/doc/after.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: after.n,v 1.11 2008/06/13 05:45:07 mistachkin Exp $ +'\" RCS: @(#) $Id: after.n,v 1.12 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH after n 7.5 Tcl "Tcl Built-In Commands" @@ -26,7 +26,6 @@ after \- Execute a command after a time delay .sp \fBafter info \fR?\fIid\fR? .BE - .SH DESCRIPTION .PP This command is used to delay execution of the program or to execute @@ -34,12 +33,14 @@ a command in background sometime in the future. It has several forms, depending on the first argument to the command: .TP \fBafter \fIms\fR +. \fIMs\fR must be an integer giving a time in milliseconds. The command sleeps for \fIms\fR milliseconds and then returns. While the command is sleeping the application does not respond to events. .TP \fBafter \fIms \fR?\fIscript script script ...\fR? +. In this form the command returns immediately, but it arranges for a Tcl command to be executed \fIms\fR milliseconds later as an event handler. @@ -55,6 +56,7 @@ The \fBafter\fR command returns an identifier that can be used to cancel the delayed command using \fBafter cancel\fR. .TP \fBafter cancel \fIid\fR +. Cancels the execution of a delayed command that was previously scheduled. \fIId\fR indicates which command should be canceled; it must have @@ -63,6 +65,7 @@ If the command given by \fIid\fR has already been executed then the \fBafter cancel\fR command has no effect. .TP \fBafter cancel \fIscript script ...\fR +. This command also cancels the execution of a delayed command. The \fIscript\fR arguments are concatenated together with space separators (just as in the \fBconcat\fR command). @@ -71,6 +74,7 @@ canceled and will never be executed; if no such command is currently pending then the \fBafter cancel\fR command has no effect. .TP \fBafter idle \fIscript \fR?\fIscript script ...\fR? +. Concatenates the \fIscript\fR arguments together with space separators (just as in the \fBconcat\fR command), and arranges for the resulting script to be evaluated later as an idle callback. @@ -83,6 +87,7 @@ background error will be reported by the command registered with \fB interp bgerror\fR. .TP \fBafter info \fR?\fIid\fR? +. This command returns information about existing event handlers. If no \fIid\fR argument is supplied, the command returns a list of the identifiers for all existing @@ -106,6 +111,7 @@ and \fBupdate\fR commands. .SH "EXAMPLES" This defines a command to make Tcl do nothing at all for \fIN\fR seconds: +.PP .CS proc sleep {N} { \fBafter\fR [expr {int($N * 1000)}] @@ -114,6 +120,7 @@ proc sleep {N} { .PP This arranges for the command \fIwake_up\fR to be run in eight hours (providing the event loop is active at that time): +.PP .CS \fBafter\fR [expr {1000 * 60 * 60 * 8}] wake_up .CE @@ -128,6 +135,7 @@ processing steps (arranging for the next step to be done using an already-triggered timer event only when the event queue has been drained) and is useful when you want to ensure that a Tk GUI remains responsive during a slow task. +.PP .CS proc doOneStep {} { if {[::my_calc::one_step]} { @@ -136,9 +144,10 @@ proc doOneStep {} { } doOneStep .CE - .SH "SEE ALSO" concat(n), interp(n), update(n), vwait(n) - .SH KEYWORDS cancel, delay, idle callback, sleep, time +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/append.n b/doc/append.n index 5bf99e4..c044c08 100644 --- a/doc/append.n +++ b/doc/append.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: append.n,v 1.10 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: append.n,v 1.11 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH append n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ append \- Append to variable .SH SYNOPSIS \fBappend \fIvarName \fR?\fIvalue value value ...\fR? .BE - .SH DESCRIPTION .PP Append all of the \fIvalue\fR arguments to the current value @@ -34,6 +33,7 @@ is much more efficient than if \fB$a\fR is long. .SH EXAMPLE Building a string of comma-separated numbers piecemeal using a loop. +.PP .CS set var 0 for {set i 1} {$i<=10} {incr i} { @@ -42,9 +42,10 @@ for {set i 1} {$i<=10} {incr i} { puts $var # Prints 0,1,2,3,4,5,6,7,8,9,10 .CE - .SH "SEE ALSO" concat(n), lappend(n) - .SH KEYWORDS append, variable +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/chan.n b/doc/chan.n index 5277dff..d79c717 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.21 2008/10/14 14:02:55 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.22 2008/10/15 10:43:37 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -655,9 +655,11 @@ in which \fBchan configure\fR will alter input). .PP When reading from a serial port, most applications should configure the serial port channel to be nonblocking, like this: +.PP .CS \fBchan configure \fIchannelId \fB\-blocking \fI0\fR. .CE +.PP Then \fBchan read\fR behaves much like described above. Note that most serial ports are comparatively slow; it is entirely possible to get a \fBreadable\fR event for each character read from them. Care diff --git a/doc/clock.n b/doc/clock.n index 600722b..d4bb1b9 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -754,6 +754,7 @@ The C library's idea of the local time zone, as defined by the .PP In case [1] \fIonly,\fR the string is tested to see if it is one of the strings: +.PP .CS gmt ut utc bst wet wat at nft nst ndt ast adt est edt @@ -765,6 +766,7 @@ of the strings: cadt east eadt gst nzt nzst nzdt idle .CE +.PP If it is a string in the above list, it designates a known time zone, and is interpreted as such. .PP diff --git a/doc/dict.n b/doc/dict.n index f2ab912..308e367 100644 --- a/doc/dict.n +++ b/doc/dict.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dict.n,v 1.18 2007/12/31 00:17:44 dkf Exp $ +'\" RCS: @(#) $Id: dict.n,v 1.19 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH dict n 8.5 Tcl "Tcl Built-In Commands" @@ -23,33 +23,39 @@ below for a description), depending on \fIoption\fR. The legal \fIoption\fRs (which may be abbreviated) are: .TP \fBdict append \fIdictionaryVariable key \fR?\fIstring ...\fR? +. This appends the given string (or strings) to the value that the given key maps to in the dictionary value contained in the given variable, writing the resulting dictionary value back to that variable. Non-existent keys are treated as if they map to an empty string. .TP \fBdict create \fR?\fIkey value ...\fR? +. Create a new dictionary that contains each of the key/value mappings listed as arguments (keys and values alternating, with each key being followed by its associated value.) .TP \fBdict exists \fIdictionaryValue key \fR?\fIkey ...\fR? +. This returns a boolean value indicating whether the given key (or path of keys through a set of nested dictionaries) exists in the given dictionary value. This returns a true value exactly when \fBdict get\fR on that path will succeed. .TP \fBdict filter \fIdictionaryValue filterType arg \fR?\fIarg ...\fR? +. This takes a dictionary value and returns a new dictionary that contains just those key/value pairs that match the specified filter type (which may be abbreviated.) Supported filter types are: .RS .TP \fBdict filter \fIdictionaryValue \fBkey \fIglobPattern\fR +. The key rule only matches those key/value pairs whose keys match the given pattern (in the style of \fBstring match\fR.) .TP \fBdict filter \fIdictionaryValue \fBscript {\fIkeyVar valueVar\fB} \fIscript\fR +. The script rule tests for matching by assigning the key to the \fIkeyVar\fR and the value to the \fIvalueVar\fR, and then evaluating the given script which should return a boolean value (with the @@ -63,11 +69,13 @@ result. The key/value pairs are tested in the order in which the keys were inserted into the dictionary. .TP \fBdict filter \fIdictionaryValue \fBvalue \fIglobPattern\fR +. The value rule only matches those key/value pairs whose values match the given pattern (in the style of \fBstring match\fR.) .RE .TP \fBdict for {\fIkeyVar valueVar\fB} \fIdictionaryValue body\fR +. This command takes three arguments, the first a two-element list of variable names (for the key and value respectively of each mapping in the dictionary), the second the dictionary value to iterate across, @@ -82,6 +90,7 @@ normal \fBTCL_OK\fR result. The order of iteration is the order in which the keys were inserted into the dictionary. .TP \fBdict get \fIdictionaryValue \fR?\fIkey ...\fR? +. Given a dictionary value (first argument) and a key (second argument), this will retrieve the value for that key. Where several keys are supplied, the behaviour of the command shall be as if the result of @@ -90,20 +99,23 @@ supplied, the behaviour of the command shall be as if the result of subsequent) arguments. This facilitates lookups in nested dictionaries. For example, the following two commands are equivalent: .RS +.PP .CS dict get $dict foo bar spong dict get [dict get [dict get $dict foo] bar] spong .CE +.PP If no keys are provided, dict would return a list containing pairs of elements in a manner similar to \fBarray get\fR. That is, the first element of each pair would be the key and the second element would be the value for that key. - +.PP It is an error to attempt to retrieve a value for a key that is not present in the dictionary. .RE .TP \fBdict incr \fIdictionaryVariable key \fR?\fIincrement\fR? +. This adds the given increment value (an integer that defaults to 1 if not specified) to the value that the given key maps to in the dictionary value contained in the given variable, writing the @@ -112,6 +124,7 @@ are treated as if they map to 0. It is an error to increment a value for an existing key if that value is not an integer. .TP \fBdict info \fIdictionaryValue\fR +. This returns information (intended for display to people) about the given dictionary though the format of this data is dependent on the implementation of the dictionary. For dictionaries that are @@ -119,12 +132,14 @@ implemented by hash tables, it is expected that this will return the string produced by \fBTcl_HashStats\fR, similar to \fBarray info\fR. .TP \fBdict keys \fIdictionaryValue \fR?\fIglobPattern\fR? +. Return a list of all keys in the given dictionary value. If a pattern is supplied, only those keys that match it (according to the rules of \fBstring match\fR) will be returned. The returned keys will be in the order that they were inserted into the dictionary. .TP \fBdict lappend \fIdictionaryVariable key \fR?\fIvalue ...\fR? +. This appends the given items to the list value that the given key maps to in the dictionary value contained in the given variable, writing the resulting dictionary value back to that variable. Non-existent @@ -133,6 +148,7 @@ there to be no items to append to the list. It is an error for the value that the key maps to to not be representable as a list. .TP \fBdict merge \fR?\fIdictionaryValue ...\fR? +. Return a dictionary that contains the contents of each of the \fIdictionaryValue\fR arguments. Where two (or more) dictionaries contain a mapping for the same key, the resulting dictionary maps that @@ -140,6 +156,7 @@ key to the value according to the last dictionary on the command line containing a mapping for that key. .TP \fBdict remove \fIdictionaryValue \fR?\fIkey ...\fR? +. Return a new dictionary that is a copy of an old one passed in as first argument except without mappings for each of the keys listed. It is legal for there to be no keys to remove, and it also legal for @@ -147,6 +164,7 @@ any of the keys to be removed to not be present in the input dictionary in the first place. .TP \fBdict replace \fIdictionaryValue \fR?\fIkey value ...\fR? +. Return a new dictionary that is a copy of an old one passed in as first argument except with some values different or some extra key/value pairs added. It is legal for this command to be called with @@ -154,6 +172,7 @@ no key/value pairs, but illegal for this command to be called with a key but no value. .TP \fBdict set \fIdictionaryVariable key \fR?\fIkey ...\fR? \fIvalue\fR +. This operation takes the name of a variable containing a dictionary value and places an updated dictionary value in that variable containing a mapping from the given key to the given value. When @@ -161,9 +180,11 @@ multiple keys are present, this operation creates or updates a chain of nested dictionaries. .TP \fBdict size \fIdictionaryValue\fR +. Return the number of key/value mappings in the given dictionary value. .TP \fBdict unset \fIdictionaryVariable key \fR?\fIkey ...\fR? +. This operation (the companion to \fBdict set\fR) takes the name of a variable containing a dictionary value and places an updated dictionary value in that variable that does not contain a mapping for @@ -173,6 +194,7 @@ must be specified, but the last key on the key-path need not exist. All other components on the path must exist. .TP \fBdict update \fIdictionaryVariable key varName \fR?\fIkey varName ...\fR? \fIbody\fR +. Execute the Tcl script in \fIbody\fR with the value for each \fIkey\fR (as found by reading the dictionary value in \fIdictionaryVariable\fR) mapped to the variable \fIvarName\fR. There may be multiple @@ -189,6 +211,7 @@ does not use traces; changes to the \fIdictionaryVariable\fR's contents only happen when \fIbody\fR terminates. .TP \fBdict values \fIdictionaryValue \fR?\fIglobPattern\fR? +. Return a list of all values in the given dictionary value. If a pattern is supplied, only those values that match it (according to the rules of \fBstring match\fR) will be returned. The returned values @@ -196,6 +219,7 @@ will be in the order of that the keys associated with those values were inserted into the dictionary. .TP \fBdict with \fIdictionaryVariable \fR?\fIkey ...\fR? \fIbody\fR +. Execute the Tcl script in \fIbody\fR with the value for each key in \fIdictionaryVariable\fR mapped (in a manner similarly to \fBdict update\fR) to a variable with the same name. Where one or more @@ -229,7 +253,9 @@ and .QW "apple carrot apple banana" are equivalent dictionaries (with different string representations). .SH EXAMPLES +.PP Constructing and using nested dictionaries: +.PP .CS # Data for one employee \fBdict set\fR employeeInfo 12345-A forenames "Joe" @@ -263,6 +289,7 @@ foreach id [\fBdict keys\fR $employeeInfo] { .CE .PP A localizable version of \fBstring toupper\fR: +.PP .CS # Set up the basic C locale set capital [\fBdict create\fR C [\fBdict create\fR]] @@ -285,3 +312,6 @@ set upperCase [string map $upperCaseMap $string] append(n), array(n), foreach(n), incr(n), list(n), lappend(n), set(n) .SH KEYWORDS dictionary, create, update, lookup, iterate, filter +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/encoding.n b/doc/encoding.n index 1a6983d..c4c9637 100644 --- a/doc/encoding.n +++ b/doc/encoding.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: encoding.n,v 1.16 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: encoding.n,v 1.17 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH encoding n "8.1" Tcl "Tcl Built-In Commands" @@ -83,9 +83,11 @@ contain a sequence of Latin-1 characters that correspond to the bytes of the original string. The \fBencoding\fR command can be used to convert this string to the expected Japanese Unicode characters. For example, +.PP .CS set s [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"] .CE +.PP would return the Unicode string .QW "\eu306F" , which is the Hiragana letter HA. diff --git a/doc/error.n b/doc/error.n index ffc3ebb..5c81878 100644 --- a/doc/error.n +++ b/doc/error.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: error.n,v 1.11 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: error.n,v 1.12 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH error n "" Tcl "Tcl Built-In Commands" @@ -39,14 +39,17 @@ with the \fBcatch\fR command: if a caught error cannot be handled successfully, \fIinfo\fR can be used to return a stack trace reflecting the original point of occurrence of the error: +.PP .CS \fBcatch {...} errMsg set savedInfo $::errorInfo \&... error $errMsg $savedInfo\fR .CE +.PP When working with Tcl 8.5 or later, the following code should be used instead: +.PP .CS \fBcatch {...} errMsg options \&... diff --git a/doc/eval.n b/doc/eval.n index 5156360..1f32697 100644 --- a/doc/eval.n +++ b/doc/eval.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: eval.n,v 1.11 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: eval.n,v 1.12 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH eval n "" Tcl "Tcl Built-In Commands" @@ -27,11 +27,13 @@ evaluation (or any error generated by it). Note that the \fBlist\fR command quotes sequences of words in such a way that they are not further expanded by the \fBeval\fR command. .SH EXAMPLES +.PP Often, it is useful to store a fragment of a script in a variable and execute it later on with extra values appended. This technique is used in a number of places throughout the Tcl core (e.g. in \fBfcopy\fR, \fBlsort\fR and \fBtrace\fR command callbacks). This example shows how to do this using core Tcl commands: +.PP .CS set script { puts "logging now" @@ -57,6 +59,7 @@ easier to make robust in practice. The following procedure acts in a way that is analogous to the \fBlappend\fR command, except it inserts the argument values at the start of the list in the variable: +.PP .CS proc lprepend {varName args} { upvar 1 $varName var @@ -66,6 +69,7 @@ proc lprepend {varName args} { set var [\fBeval\fR [list linsert $var 0] $args] } .CE +.PP However, the last line would now normally be written without \fBeval\fR, like this: .CS diff --git a/doc/exec.n b/doc/exec.n index 6626835..c44ee29 100644 --- a/doc/exec.n +++ b/doc/exec.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: exec.n,v 1.24 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: exec.n,v 1.25 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH exec n 8.5 Tcl "Tcl Built-In Commands" @@ -366,9 +366,11 @@ console window is not available to them. . The \fBexec\fR command is fully functional and works as described. .SH "UNIX EXAMPLES" +.PP Here are some examples of the use of the \fBexec\fR command on Unix. .PP To execute a simple program and get its result: +.PP .CS \fBexec\fR uname -a .CE @@ -376,6 +378,7 @@ To execute a simple program and get its result: To execute a program that can return a non-zero result, you should wrap the call to \fBexec\fR in \fBcatch\fR and check the contents of the \fB\-errorcode\fR return option if you have an error: +.PP .CS set status 0 if {[catch {\fBexec\fR grep foo bar.txt} results options]} { @@ -391,10 +394,13 @@ if {[catch {\fBexec\fR grep foo bar.txt} results options]} { When translating a command from a Unix shell invocation, care should be taken over the fact that single quote characters have no special significance to Tcl. Thus: +.PP .CS awk '{sum += $1} END {print sum}' numbers.list .CE +.PP would be translated into something like: +.PP .CS \fBexec\fR awk {{sum += $1} END {print sum}} numbers.list .CE @@ -403,19 +409,23 @@ If you are converting invocations involving shell globbing, you should remember that Tcl does not handle globbing or expand things into multiple arguments by default. Instead you should write things like this: +.PP .CS \fBexec\fR ls -l {*}[glob *.tcl] .CE .SH "WINDOWS EXAMPLES" +.PP Here are some examples of the use of the \fBexec\fR command on Windows. .PP To start an instance of \fInotepad\fR editing a file without waiting for the user to finish editing the file: +.PP .CS \fBexec\fR notepad myfile.txt & .CE .PP To print a text file using \fInotepad\fR: +.PP .CS \fBexec\fR notepad /p myfile.txt .CE @@ -423,10 +433,13 @@ To print a text file using \fInotepad\fR: If a program calls other programs, such as is common with compilers, then you may need to resort to batch files to hide the console windows that sometimes pop up: +.PP .CS \fBexec\fR cmp.bat somefile.c -o somefile .CE +.PP With the file \fIcmp.bat\fR looking something like: +.PP .CS @gcc %1 %2 %3 %4 %5 %6 %7 %8 %9 .CE @@ -444,6 +457,7 @@ applies especially when you want to run commands like \fIdir\fR from a Tcl script (if you just want to list filenames, use the \fBglob\fR command.) To do that, use this: +.PP .CS \fBexec\fR {*}[auto_execok dir] *.tcl .CE diff --git a/doc/expr.n b/doc/expr.n index 613a3bc..b078873 100644 --- a/doc/expr.n +++ b/doc/expr.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: expr.n,v 1.35 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: expr.n,v 1.36 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH expr n 8.5 Tcl "Tcl Built-In Commands" @@ -28,9 +28,11 @@ as the corresponding C operators. Expressions almost always yield numeric results (integer or floating-point values). For example, the expression +.PP .CS \fBexpr 8.2 + 6\fR .CE +.PP evaluates to 14.2. Tcl expressions differ from C expressions in the way that operands are specified. Also, Tcl expressions support @@ -205,18 +207,22 @@ divide operators, and produces a result that is the same as the output of the \fBpow\fR function (after any type conversions.) All of the binary operators group left-to-right within the same precedence level. For example, the command +.PP .CS \fBexpr\fR {4*2 < 7} .CE +.PP returns 0. .PP The \fB&&\fR, \fB||\fR, and \fB?:\fR operators have .QW "lazy evaluation" , just as in C, which means that operands are not evaluated if they are not needed to determine the outcome. For example, in the command +.PP .CS \fBexpr {$v ? [a] : [b]}\fR .CE +.PP only one of .QW \fB[a]\fR or @@ -235,14 +241,19 @@ When the expression parser encounters a mathematical function such as \fBsin($x)\fR, it replaces it with a call to an ordinary Tcl function in the \fBtcl::mathfunc\fR namespace. The processing of an expression such as: +.PP .CS \fBexpr {sin($x+$y)}\fR .CE +.PP is the same in every way as the processing of: +.PP .CS \fBexpr {[tcl::mathfunc::sin [expr {$x+$y}]]}\fR .CE +.PP which in turn is the same as the processing of: +.PP .CS \fBtcl::mathfunc::sin [expr {$x+$y}]\fR .CE @@ -280,23 +291,29 @@ and string operands is done automatically as needed. For arithmetic computations, integers are used until some floating-point number is introduced, after which floating-point is used. For example, +.PP .CS \fBexpr\fR {5 / 4} .CE +.PP returns 1, while +.PP .CS \fBexpr\fR {5 / 4.0} \fBexpr\fR {5 / ( [string length "abcd"] + 0.0 )} .CE +.PP both return 1.25. Floating-point values are always returned with a .QW \fB.\fR or an .QW \fBe\fR so that they will not look like integer values. For example, +.PP .CS \fBexpr\fR {20.0/5.0} .CE +.PP returns \fB4.0\fR, not \fB4\fR. .SS "STRING OPERATIONS" .PP @@ -311,10 +328,12 @@ Canonical string representation for integer values is a decimal string format. Canonical string representation for floating-point values is that produced by the \fB%g\fR format specifier of Tcl's \fBformat\fR command. For example, the commands +.PP .CS \fBexpr {"0x03" > "2"}\fR \fBexpr {"0y" < "0x12"}\fR .CE +.PP both return 1. The first comparison is done using integer comparison, and the second is done using string comparison after the second operand is converted to the string \fB18\fR. @@ -332,11 +351,13 @@ This allows the Tcl bytecode compiler to generate the best code. As mentioned above, expressions are substituted twice: once by the Tcl parser and once by the \fBexpr\fR command. For example, the commands +.PP .CS \fBset a 3\fR \fBset b {$a + 2}\fR \fBexpr $b*4\fR .CE +.PP return 11, not a multiple of 4. This is because the Tcl parser will first substitute \fB$a + 2\fR for the variable \fBb\fR, @@ -362,6 +383,7 @@ operator, consider using the commands documented in the \fBmathfunc\fR(n) or Define a procedure that computes an .QW interesting mathematical function: +.PP .CS proc tcl::mathfunc::calc {x y} { \fBexpr\fR { ($x**2 - $y**2) / exp($x**2 + $y**2) } @@ -369,6 +391,7 @@ proc tcl::mathfunc::calc {x y} { .CE .PP Convert polar coordinates into cartesian coordinates: +.PP .CS # convert from ($radius,$angle) set x [\fBexpr\fR { $radius * cos($angle) }] @@ -376,6 +399,7 @@ set y [\fBexpr\fR { $radius * sin($angle) }] .CE .PP Convert cartesian coordinates into polar coordinates: +.PP .CS # convert from ($x,$y) set radius [\fBexpr\fR { hypot($y, $x) }] @@ -384,12 +408,14 @@ set angle [\fBexpr\fR { atan2($y, $x) }] .PP Print a message describing the relationship of two string values to each other: +.PP .CS puts "a and b are [\fBexpr\fR {$a eq $b ? {equal} : {different}}]" .CE .PP Set a variable to whether an environment variable is both defined at all and also set to a true boolean value: +.PP .CS set isTrue [\fBexpr\fR { [info exists ::env(SOME_ENV_VAR)] && @@ -398,6 +424,7 @@ set isTrue [\fBexpr\fR { .CE .PP Generate a random integer in the range 0..99 inclusive: +.PP .CS set randNum [\fBexpr\fR { int(100 * rand()) }] .CE diff --git a/doc/file.n b/doc/file.n index be3cefa..beeca80 100644 --- a/doc/file.n +++ b/doc/file.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: file.n,v 1.54 2008/09/24 19:31:28 dgp Exp $ +'\" RCS: @(#) $Id: file.n,v 1.55 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -138,20 +138,26 @@ only contains one path element, then returns If \fIname\fR refers to a root directory, then the root directory is returned. For example, .RS +.PP .CS \fBfile dirname c:/\fR .CE +.PP returns \fBc:/\fR. .PP Note that tilde substitution will only be performed if it is necessary to complete the command. For example, +.PP .CS \fBfile dirname ~/src/foo.c\fR .CE +.PP returns \fB~/src\fR, whereas +.PP .CS \fBfile dirname ~\fR .CE +.PP returns \fB/home\fR (or something similar). .RE .TP @@ -187,9 +193,11 @@ relative, then it will be joined to the previous file name argument. Otherwise, any earlier arguments will be discarded, and joining will proceed from the current argument. For example, .RS +.PP .CS \fBfile join a b /foo bar\fR .CE +.PP returns \fB/foo/bar\fR. .PP Note that any of the names can contain separators, and that the result @@ -372,10 +380,14 @@ All other elements will be relative. Path separators will be discarded unless they are needed ensure that an element is unambiguously relative. For example, under Unix .RS +.PP .CS file split /foo/~bar/baz .CE -returns \fB/\0\0foo\0\0./~bar\0\0baz\fR to ensure that later commands +.PP +returns +.QW \fB/\0\0foo\0\0./~bar\0\0baz\fR +to ensure that later commands that use the third component do not attempt to perform tilde substitution. .RE @@ -453,9 +465,11 @@ Returns \fB1\fR if file \fIname\fR is writable by the current user, These commands always operate using the real user and group identifiers, not the effective ones. .SH EXAMPLES +.PP This procedure shows how to search for C files in a given directory that have a correspondingly-named object file in the current directory: +.PP .CS proc findMatchingCFiles {dir} { set files {} @@ -479,6 +493,7 @@ proc findMatchingCFiles {dir} { .PP Rename a file and leave a symbolic link pointing from the old location to the new place: +.PP .CS set oldName foobar.txt set newName foo/bar.txt @@ -495,6 +510,7 @@ On Windows, a file can be easily enough (equivalent to double-clicking on it in the Explorer interface) but the name passed to the operating system must be in native format: +.PP .CS exec {*}[auto_execok start] {} [\fBfile nativename\fR ~/example.txt] .CE diff --git a/doc/fileevent.n b/doc/fileevent.n index ba35bdf..05d68f3 100644 --- a/doc/fileevent.n +++ b/doc/fileevent.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fileevent.n,v 1.14 2008/06/24 14:42:51 patthoyts Exp $ +'\" RCS: @(#) $Id: fileevent.n,v 1.15 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH fileevent n 7.5 Tcl "Tcl Built-In Commands" @@ -107,12 +107,14 @@ In addition, the file event handler is deleted if it ever returns an error; this is done in order to prevent infinite loops due to buggy handlers. .SH EXAMPLE +.PP In this setup \fBGetData\fR will be called with the channel as an argument whenever $chan becomes readable. The \fBread\fR call will read whatever binary data is currently available without blocking. Here the channel has the fileevent removed when an end of file occurs to avoid being continually called (see above). Alternatively the channel may be closed on this condition. +.PP .CS proc GetData {chan} { set data [read $chan] @@ -125,8 +127,10 @@ proc GetData {chan} { fconfigure $chan -blocking 0 -encoding binary fileevent $chan readable [list GetData $chan] .CE +.PP The next example demonstrates use of \fBgets\fR to read line-oriented data. +.PP .CS proc GetData {chan} { if {[gets $chan line] >= 0} { @@ -140,15 +144,12 @@ proc GetData {chan} { fconfigure $chan -blocking 0 -buffering line -translation crlf fileevent $chan readable [list GetData $chan] .CE - .SH CREDITS .PP \fBfileevent\fR is based on the \fBaddinput\fR command created by Mark Diekhans. - .SH "SEE ALSO" fconfigure(n), gets(n), interp(n), puts(n), read(n), Tcl_StandardChannels(3) - .SH KEYWORDS asynchronous I/O, blocking, channel, event handler, nonblocking, readable, script, writable. diff --git a/doc/glob.n b/doc/glob.n index a7cf7ad..e254e6d 100644 --- a/doc/glob.n +++ b/doc/glob.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: glob.n,v 1.23 2008/09/29 16:03:29 dgp Exp $ +'\" RCS: @(#) $Id: glob.n,v 1.24 2008/10/15 10:43:37 dkf Exp $ '\" .so man.macros .TH glob n 8.3 Tcl "Tcl Built-In Commands" @@ -98,11 +98,13 @@ The two forms may be mixed, so \fB\-types {d f r w}\fR will find all regular files OR directories that have both read AND write permissions. The following are equivalent: .RS +.PP .CS \fBglob \-type d *\fR \fBglob */\fR .CE .RE +.PP except that the first case doesn't return the trailing .QW / and is more platform independent. @@ -206,18 +208,22 @@ to use the Unix style forward slash as a path separator. Windows style paths can be converted to Unix style paths with the command \fBfile join $path\fR (or \fBfile normalize $path\fR in Tcl 8.4). .SH EXAMPLES +.PP Find all the Tcl files in the current directory: +.PP .CS \fBglob\fR *.tcl .CE .PP Find all the Tcl files in the user's home directory, irrespective of what the current directory is: +.PP .CS \fBglob\fR \-directory ~ *.tcl .CE .PP Find all subdirectories of the current directory: +.PP .CS \fBglob\fR \-type d * .CE @@ -228,12 +234,11 @@ a .QW b or the sequence .QW cde : +.PP .CS \fBglob\fR \-type f *{a,b,cde}* .CE - .SH "SEE ALSO" file(n) - .SH KEYWORDS exist, file, glob, pattern -- cgit v0.12 From c0fe0fb01cd4a52aca1ac071d98e7f78e96f5817 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 16 Oct 2008 16:08:09 +0000 Subject: * library/init.tcl: Revised [unknown] so that it carefully preserves the state of the ::errorInfo and ::errorCode variables at the start of auto-loading and restores that state before the autoloaded command is evaluated. [Bug 2140628] --- ChangeLog | 7 +++++++ library/init.tcl | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2547c9..91b88c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-16 Don Porter + + * library/init.tcl: Revised [unknown] so that it carefully + preserves the state of the ::errorInfo and ::errorCode variables + at the start of auto-loading and restores that state before the + autoloaded command is evaluated. [Bug 2140628] + 2008-10-15 Jan Nijtmans * generic/tclInt.h: Add "const" to many internal diff --git a/library/init.tcl b/library/init.tcl index 9b04f64..4fae191 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.113 2008/10/14 20:08:21 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.114 2008/10/16 16:08:09 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -262,8 +262,13 @@ proc unknown args { unset UnknownPending } if {$msg} { - catch {set ::errorCode $savedErrorCode} - catch {set ::errorInfo $savedErrorInfo} + unset -nocomplain ::errorCode ::errorInfo + if {[info exists savedErrorCode]} { + set ::errorCode $savedErrorCode + } + if {[info exists savedErrorInfo]} { + set ::errorInfo $savedErrorInfo + } set code [catch {uplevel 1 $args} msg opts] if {$code == 1} { # -- cgit v0.12 From 2b0bd4b76e50ee9f511c827309e0078efc6f537a Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 16 Oct 2008 17:04:58 +0000 Subject: * library/init.tcl: Revised [unknown] so that it carefully preserves the state of the ::errorInfo and ::errorCode variables at the start of auto-loading and restores that state before the autoloaded command is evaluated. [Bug 2140628] --- library/init.tcl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/library/init.tcl b/library/init.tcl index 4fae191..084ddbc 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.114 2008/10/16 16:08:09 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.115 2008/10/16 17:04:58 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -262,12 +262,15 @@ proc unknown args { unset UnknownPending } if {$msg} { - unset -nocomplain ::errorCode ::errorInfo if {[info exists savedErrorCode]} { set ::errorCode $savedErrorCode + } else { + unset -nocomplain ::errorCode } if {[info exists savedErrorInfo]} { set ::errorInfo $savedErrorInfo + } else { + unset -nocomplain ::errorInfo } set code [catch {uplevel 1 $args} msg opts] if {$code == 1} { -- cgit v0.12 From 8b464633a0f2df93912ad25af65a5724cd643da2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 16 Oct 2008 22:34:18 +0000 Subject: Add "const" to many internal const tables. No functional or API change. --- ChangeLog | 36 ++++++++++++++++++++++++++++++ generic/regc_locale.c | 6 ++--- generic/tclClock.c | 8 +++---- generic/tclCmdIL.c | 16 +++++++------- generic/tclConfig.c | 4 ++-- generic/tclDate.c | 6 ++--- generic/tclEncoding.c | 4 ++-- generic/tclEvent.c | 6 ++--- generic/tclExecute.c | 54 ++++++++++++++++++++++----------------------- generic/tclFileName.c | 10 ++++----- generic/tclGetDate.y | 8 +++---- generic/tclIO.c | 4 ++-- generic/tclIOCmd.c | 14 ++++++------ generic/tclIORChan.c | 10 ++++----- generic/tclIORTrans.c | 22 +++++++++---------- generic/tclInterp.c | 34 ++++++++++++++--------------- generic/tclLoad.c | 4 ++-- generic/tclOOBasic.c | 4 ++-- generic/tclOOCall.c | 4 ++-- generic/tclOOInfo.c | 8 +++---- generic/tclObj.c | 6 ++--- generic/tclPathObj.c | 4 ++-- generic/tclPkg.c | 6 ++--- generic/tclResult.c | 4 ++-- generic/tclStringObj.c | 4 ++-- generic/tclTest.c | 58 ++++++++++++++++++++++++------------------------- generic/tclTestObj.c | 8 +++---- generic/tclThreadTest.c | 6 ++--- generic/tclTimer.c | 8 +++---- generic/tclTrace.c | 14 ++++++------ macosx/tclMacOSXFCmd.c | 4 ++-- win/cat.c | 4 ++-- win/tclWinInit.c | 6 ++--- win/tclWinTest.c | 4 ++-- 34 files changed, 217 insertions(+), 181 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91b88c8..47d21d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,39 @@ +2008-10-16 Jan Nijtmans + + * generic/regc_locale.c: Add "const" to many internal + * generic/tclClock.c: const tables. No functional + * generic/tclCmdIL.c: or API change. + * generic/tclConfig.c + * generic/tclDate.c + * generic/tclEncoding.c + * generic/tclEvent.c + * generic/tclExecute.c + * generic/tclFileName.c + * generic/tclGetDate.y + * generic/tclInterp.c + * generic/tclIO.c + * generic/tclIOCmd.c + * generic/tclIORChan.c + * generic/tclIORTrans.c + * generic/tclLoad.c + * generic/tclObj.c + * generic/tclOOBasic.c + * generic/tclOOCall.c + * generic/tclOOInfo.c + * generic/tclPathObj.c + * generic/tclPkg.c + * generic/tclResult.c + * generic/tclStringObj.c + * generic/tclTest.c + * generic/tclTestObj.c + * generic/tclThreadTest.c + * generic/tclTimer.c + * generic/tclTrace.c + * macosx/tclMacOSXFCmd.c: + * win/cat.c + * win/tclWinInit.c + * win/tclWinTest.c + 2008-10-16 Don Porter * library/init.tcl: Revised [unknown] so that it carefully diff --git a/generic/regc_locale.c b/generic/regc_locale.c index b5a44c4..98df798 100644 --- a/generic/regc_locale.c +++ b/generic/regc_locale.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: regc_locale.c,v 1.20 2007/12/13 15:23:14 dgp Exp $ + * RCS: @(#) $Id: regc_locale.c,v 1.21 2008/10/16 22:34:18 nijtmans Exp $ */ /* ASCII character-name table */ @@ -790,14 +790,14 @@ cclass( struct cvec *cv = NULL; Tcl_DString ds; const char *np; - const char **namePtr; + const char *const *namePtr; int i, index; /* * The following arrays define the valid character class names. */ - static const char *classNames[] = { + static const char *const classNames[] = { "alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit", NULL }; diff --git a/generic/tclClock.c b/generic/tclClock.c index d32e786..8b2e259 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.70 2008/07/21 21:25:21 nijtmans Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.71 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -121,7 +121,7 @@ typedef struct TclDateFields { int iso8601Week; /* ISO8601 week number */ int dayOfWeek; /* Day of the week */ } TclDateFields; -static const char* eras[] = { "CE", "BCE", NULL }; +static const char *const eras[] = { "CE", "BCE", NULL }; /* * Thread specific data block holding a 'struct tm' for the 'gmtime' and @@ -1688,7 +1688,7 @@ ClockClicksObjCmd( int objc, /* Parameter count */ Tcl_Obj* const* objv) /* Parameter values */ { - static const char *clicksSwitches[] = { + static const char *const clicksSwitches[] = { "-milliseconds", "-microseconds", NULL }; enum ClicksSwitch { @@ -1849,7 +1849,7 @@ ClockParseformatargsObjCmd( /* Command line options expected */ - static const char* options[] = { + static const char *const options[] = { "-format", "-gmt", "-locale", "-timezone", NULL }; enum optionInd { diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index d1174ab..a6ee362 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.161 2008/10/14 19:26:59 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.162 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -209,7 +209,7 @@ Tcl_IfObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRIfObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRIfObjCmd, dummy, objc, objv); } int @@ -1087,7 +1087,7 @@ InfoFrameCmd( NULL); return TCL_ERROR; } - + /* * Let us convert to relative so that we know how many levels to go back */ @@ -1096,7 +1096,7 @@ InfoFrameCmd( level -= topLevel; } - framePtr = iPtr->cmdFramePtr; + framePtr = iPtr->cmdFramePtr; while (++level <= 0) { framePtr = framePtr->nextPtr; if (!framePtr) { @@ -1137,7 +1137,7 @@ TclInfoFrame( * This array is indexed by the TCL_LOCATION_... values, except * for _LAST. */ - static const char *typeString[TCL_LOCATION_LAST] = { + static const char *const typeString[TCL_LOCATION_LAST] = { "eval", "eval", "eval", "precompiled", "source", "proc" }; Tcl_Obj *tmpObj; @@ -2759,7 +2759,7 @@ Tcl_LsearchObjCmd( Tcl_Obj *patObj, **listv, *listPtr, *startPtr, *itemPtr; SortStrCmpFn_t strCmpFn = strcmp; Tcl_RegExp regexp = NULL; - static const char *options[] = { + static const char *const options[] = { "-all", "-ascii", "-bisect", "-decreasing", "-dictionary", "-exact", "-glob", "-increasing", "-index", "-inline", "-integer", "-nocase", "-not", @@ -3254,7 +3254,7 @@ Tcl_LsearchObjCmd( } else { itemPtr = listv[i]; } - + switch (mode) { case SORTED: case EXACT: @@ -3525,7 +3525,7 @@ Tcl_LsortObjCmd( SortElement *elementArray, *elementPtr; SortInfo sortInfo; /* Information about this sort that needs to * be passed to the comparison function. */ - static const char *switches[] = { + static const char *const switches[] = { "-ascii", "-command", "-decreasing", "-dictionary", "-increasing", "-index", "-indices", "-integer", "-nocase", "-real", "-stride", "-unique", NULL diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 2380430..b2d3fbb 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.23 2008/10/04 11:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.24 2008/10/16 22:34:18 nijtmans Exp $ */ #include "tclInt.h" @@ -214,7 +214,7 @@ QueryConfigObjCmd( Tcl_Obj *pkgName = cdPtr->pkg; Tcl_Obj *pDB, *pkgDict, *val, *listPtr; int n, index; - static const char *subcmdStrings[] = { + static const char *const subcmdStrings[] = { "get", "list", NULL }; enum subcmds { diff --git a/generic/tclDate.c b/generic/tclDate.c index 2b0636b..eabd37a 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -235,7 +235,7 @@ typedef struct DateInfo { */ typedef struct _TABLE { - char *name; + const char *name; int type; time_t value; } TABLE; @@ -261,7 +261,7 @@ typedef enum _MERIDIAN { */ static int LookupWord(char *buff); -static void TclDateerror(char *s); +static void TclDateerror(const char *s); static int TclDatelex(void *info); static time_t ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian); @@ -2451,7 +2451,7 @@ static TABLE MilitaryTable[] = { static void TclDateerror( - char *s) + const char *s) { } diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 456c8a4..a1b43cb 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.61 2008/06/11 01:30:11 jenglish Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.62 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -277,7 +277,7 @@ static int Iso88591ToUtfProc(ClientData clientData, * See concerns raised in [Bug 1077262]. */ -static Tcl_ObjType encodingType = { +static const Tcl_ObjType encodingType = { "encoding", FreeEncodingIntRep, DupEncodingIntRep, NULL, NULL }; diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 9e38f24..3d29cb5 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.83 2008/08/01 18:22:28 hobbs Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.84 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -416,7 +416,7 @@ TclDefaultBgErrorHandlerObjCmd( */ saved = Tcl_SaveInterpState(interp, code); - + /* Invoke the bgerror command. */ Tcl_AllowExceptions(interp); code = Tcl_EvalObjv(interp, 2, tempObjv, TCL_EVAL_GLOBAL); @@ -1325,7 +1325,7 @@ Tcl_UpdateObjCmd( { int optionIndex; int flags = 0; /* Initialized to avoid compiler warning. */ - static const char *updateOptions[] = {"idletasks", NULL}; + static const char *const updateOptions[] = {"idletasks", NULL}; enum updateOptions {REGEXP_IDLETASKS}; if (objc == 1) { diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 674cd56..2daa7ed 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.416 2008/10/14 19:26:59 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.417 2008/10/16 22:34:18 nijtmans Exp $ */ #include "tclInt.h" @@ -514,7 +514,7 @@ VarHashCreateVar( * be seen by user scripts. */ -static Tcl_ObjType dictIteratorType = { +static const Tcl_ObjType dictIteratorType = { "dictIterator", NULL, NULL, NULL, NULL }; @@ -689,7 +689,7 @@ static Tcl_Obj ** StackReallocWords(Tcl_Interp *interp, int numWords); * compiled bytecode for Tcl expressions. */ -static Tcl_ObjType exprCodeType = { +static const Tcl_ObjType exprCodeType = { "exprcode", FreeExprCodeInternalRep, /* freeIntRepProc */ DupExprCodeInternalRep, /* dupIntRepProc */ @@ -1851,7 +1851,7 @@ TclExecuteByteCode( initLevel = 0; nested = 1; - + oldBottomPtr = iPtr->execEnvPtr->bottomPtr; iPtr->execEnvPtr->corPtr->stackLevel = &initLevel; if (iPtr->execEnvPtr->rewind) { @@ -1859,7 +1859,7 @@ TclExecuteByteCode( } goto returnToCaller; } - + nonRecursiveCallStart: if (nested) { TEOV_callback *callbackPtr = TOP_CB(interp); @@ -1881,7 +1881,7 @@ TclExecuteByteCode( * A request to run a bytecode: record this level's state * variables, swap codePtr and start running the new one. */ - + codePtr = param; break; case TCL_NR_ATEXIT_TYPE: { @@ -1889,11 +1889,11 @@ TclExecuteByteCode( * A request to perform a command at exit: put it in the stack * and continue exec'ing the current bytecode */ - + TEOV_callback *newPtr = TOP_CB(interp); TOP_CB(interp) = newPtr->nextPtr; - + #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " atProcExit request received\n"); @@ -1909,9 +1909,9 @@ TclExecuteByteCode( * A request to perform a tailcall: put it at the front of the * atExit stack and abandon the current bytecode. */ - + TEOV_callback *newPtr = TOP_CB(interp); - + TOP_CB(interp) = newPtr->nextPtr; isTailcall = 1; #ifdef TCL_COMPILE_DEBUG @@ -1926,7 +1926,7 @@ TclExecuteByteCode( TCL_STATIC); goto checkForCatch; } - + newPtr->nextPtr = NULL; if (!bottomPtr->atExitPtr) { newPtr->nextPtr = NULL; @@ -1935,9 +1935,9 @@ TclExecuteByteCode( /* * There are already atExit callbacks: run last. */ - + TEOV_callback *tmpPtr = bottomPtr->atExitPtr; - + while (tmpPtr->nextPtr) { tmpPtr = tmpPtr->nextPtr; } @@ -1947,11 +1947,11 @@ TclExecuteByteCode( } case TCL_NR_YIELD_TYPE: { /*[yield] */ CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - + if (!corPtr) { Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); + Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); result = TCL_ERROR; goto checkForCatch; } @@ -1961,13 +1961,13 @@ TclExecuteByteCode( if (corPtr->stackLevel != &initLevel) { Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); + Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); result = TCL_ERROR; goto checkForCatch; } /* - * Save our state, restore the caller's execEnv and return + * Save our state, restore the caller's execEnv and return */ NR_DATA_BURY(); @@ -1992,7 +1992,7 @@ TclExecuteByteCode( auxObjList = NULL; initLevel = 1; NR_DATA_INIT(); /* record this level's data */ - + if (iPtr->execEnvPtr->corPtr && !iPtr->execEnvPtr->corPtr->stackLevel) { iPtr->execEnvPtr->corPtr->stackLevel = &initLevel; } @@ -2708,9 +2708,9 @@ TclExecuteByteCode( /* * Fix for [Bug 2102930] */ - + iPtr->numLevels++; - Tcl_NRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); goto doInvocationFromEval; } } @@ -2819,7 +2819,7 @@ TclExecuteByteCode( iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr->nextPtr); - + iPtr->execEnvPtr->bottomPtr = bottomPtr; if (result == TCL_OK) { @@ -7682,7 +7682,7 @@ TclExecuteByteCode( checkForCatch: if (iPtr->execEnvPtr->rewind) { goto abnormalReturn; - } + } if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { bytes = GetSrcInfoForPc(pc, codePtr, &length); if (bytes != NULL) { @@ -7902,18 +7902,18 @@ TclExecuteByteCode( NRE_ASSERT(result == TCL_OK); switch (type) { - case TCL_NR_BC_TYPE: + case TCL_NR_BC_TYPE: /* * One of the callbacks requested a new execution: a tailcall! * Start the new bytecode. */ - + goto nonRecursiveCallStart; case TCL_NR_ATEXIT_TYPE: case TCL_NR_TAILCALL_TYPE: TOP_CB(iPtr) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); - + Tcl_SetResult(interp, "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); result = TCL_ERROR; @@ -7930,7 +7930,7 @@ TclExecuteByteCode( /* save the interp state, arrange for restoring it after running the callbacks. Put the callback at the bottom of the atExit stack */ - + Tcl_InterpState state = Tcl_SaveInterpState(interp, result); TEOV_callback *lastPtr = atExitPtr; @@ -7938,7 +7938,7 @@ TclExecuteByteCode( lastPtr = lastPtr->nextPtr; } NRE_ASSERT(lastPtr->nextPtr == NULL); - + TclNRAddCallback(interp, NRRestoreInterpState, state, NULL, NULL, NULL); lastPtr->nextPtr = TOP_CB(iPtr); diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 0c29459..cca1a9b 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.93 2008/09/29 16:03:30 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.94 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -1212,7 +1212,7 @@ Tcl_GlobObjCmd( Tcl_Obj *typePtr, *resultPtr, *look; Tcl_Obj *pathOrDir = NULL; Tcl_DString prefix; - static const char *options[] = { + static const char *const options[] = { "-directory", "-join", "-nocomplain", "-path", "-tails", "-types", "--", NULL }; @@ -1897,7 +1897,7 @@ TclGlob( */ if (types == NULL) { - /* + /* * We just want to check for existence. In this case we make it * easy on Tcl_FSMatchInDirectory and its sub-implementations by * not bothering them (even though they should support this @@ -1910,7 +1910,7 @@ TclGlob( } result = TCL_OK; } else { - /* + /* * We want to check for the correct type. Tcl_FSMatchInDirectory * is documented to do this for us, if we give it a NULL pattern. */ @@ -1960,7 +1960,7 @@ TclGlob( if (pathPrefix == NULL) { Tcl_Panic("Called TclGlob with TCL_GLOBMODE_TAILS and pathPrefix==NULL"); } - + pre = Tcl_GetStringFromObj(pathPrefix, &prefixLen); if (prefixLen > 0 && (strchr(separators, pre[prefixLen-1]) == NULL)) { diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 119b406..af20a61 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.38 2007/12/13 15:23:17 dgp Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.39 2008/10/16 22:34:18 nijtmans Exp $ */ %{ @@ -132,7 +132,7 @@ typedef struct DateInfo { */ typedef struct _TABLE { - char *name; + const char *name; int type; time_t value; } TABLE; @@ -158,7 +158,7 @@ typedef enum _MERIDIAN { */ static int LookupWord(char *buff); -static void TclDateerror(char *s); +static void TclDateerror(const char *s); static int TclDatelex(void *info); static time_t ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian); @@ -675,7 +675,7 @@ static TABLE MilitaryTable[] = { static void TclDateerror( - char *s) + const char *s) { } diff --git a/generic/tclIO.c b/generic/tclIO.c index c69a8e2..7ec28c8 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.144 2008/10/04 12:33:34 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.145 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -8346,7 +8346,7 @@ Tcl_FileEventObjCmd( char *chanName; int modeIndex; /* Index of mode argument. */ int mask; - static const char *modeOptions[] = {"readable", "writable", NULL}; + static const char *const modeOptions[] = {"readable", "writable", NULL}; static int maskArray[] = {TCL_READABLE, TCL_WRITABLE}; if ((objc != 3) && (objc != 4)) { diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 6bbf780..dbc9bb1 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.58 2008/07/21 21:58:22 das Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.59 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -521,7 +521,7 @@ Tcl_SeekObjCmd( int mode; /* How to seek? */ Tcl_WideInt result; /* Of calling Tcl_Seek. */ int optionIndex; - static const char *originOptions[] = { + static const char *const originOptions[] = { "start", "current", "end", NULL }; static int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END}; @@ -841,7 +841,7 @@ Tcl_ExecObjCmd( Tcl_Channel chan; int argc, background, i, index, keepNewline, result, skip, length; int ignoreStderr; - static const char *options[] = { + static const char *const options[] = { "-ignorestderr", "-keepnewline", "--", NULL }; enum options { @@ -1418,7 +1418,7 @@ Tcl_SocketObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *socketOptions[] = { + static const char *const socketOptions[] = { "-async", "-myaddr", "-myport","-server", NULL }; enum socketOptions { @@ -1600,7 +1600,7 @@ Tcl_FcopyObjCmd( Tcl_Channel inChan, outChan; int mode, i, toRead, index; Tcl_Obj *cmdPtr; - static const char* switches[] = { "-size", "-command", NULL }; + static const char *const switches[] = { "-size", "-command", NULL }; enum { FcopySize, FcopyCommand }; if ((objc < 3) || (objc > 7) || (objc == 4) || (objc == 6)) { @@ -1691,7 +1691,7 @@ ChanPendingObjCmd( { Tcl_Channel chan; int index, mode; - static const char *options[] = {"input", "output", NULL}; + static const char *const options[] = {"input", "output", NULL}; enum options {PENDING_INPUT, PENDING_OUTPUT}; if (objc != 3) { @@ -1900,7 +1900,7 @@ TclInitChanCmd( {"truncate", ChanTruncateObjCmd}, /* TIP #208 */ {NULL} }; - static const char *extras[] = { + static const char *const extras[] = { "configure", "::fconfigure", "names", "::file channels", NULL diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index a30469b..679f393 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.34 2008/07/03 17:38:38 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.35 2008/10/16 22:34:19 nijtmans Exp $ */ #include @@ -161,7 +161,7 @@ typedef struct { * Event literals. ================================================== */ -static const char *eventOptions[] = { +static const char *const eventOptions[] = { "read", "write", NULL }; typedef enum { @@ -172,7 +172,7 @@ typedef enum { * Method literals. ================================================== */ -static const char *methodNames[] = { +static const char *const methodNames[] = { "blocking", /* OPT */ "cget", /* OPT \/ Together or none */ "cgetall", /* OPT /\ of these two */ @@ -2737,12 +2737,12 @@ ForwardProc( */ rcmPtr = GetReflectedChannelMap(interp); - hPtr = Tcl_FindHashEntry(&rcmPtr->map, + hPtr = Tcl_FindHashEntry(&rcmPtr->map, Tcl_GetChannelName(rcPtr->chan)); Tcl_DeleteHashEntry(hPtr); rcmPtr = GetThreadReflectedChannelMap(); - hPtr = Tcl_FindHashEntry(&rcmPtr->map, + hPtr = Tcl_FindHashEntry(&rcmPtr->map, Tcl_GetChannelName(rcPtr->chan)); Tcl_DeleteHashEntry(hPtr); diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 89af0d5..bb7aebd 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.3 2008/06/12 06:28:41 das Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.4 2008/10/16 22:34:19 nijtmans Exp $ */ #include @@ -187,7 +187,7 @@ typedef struct { * Method literals. ================================================== */ -static const char *methodNames[] = { +static const char *const methodNames[] = { "clear", /* OPT */ "drain", /* OPT, drain => read */ "finalize", /* */ @@ -987,7 +987,7 @@ ReflectClose( */ rtmPtr = GetReflectedTransformMap(interp); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, + hPtr = Tcl_FindHashEntry (&rtmPtr->map, Tcl_GetString(rtPtr->handle)); if (hPtr) { Tcl_DeleteHashEntry (hPtr); @@ -998,9 +998,9 @@ ReflectClose( * allow us to survive if the script level pulls the rug out under a * channel by deleting the owning thread. */ - + rtmPtr = GetThreadReflectedTransformMap(); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, + hPtr = Tcl_FindHashEntry (&rtmPtr->map, Tcl_GetString(rtPtr->handle)); if (hPtr) { Tcl_DeleteHashEntry (hPtr); @@ -1120,7 +1120,7 @@ ReflectInput( } *errorCodePtr = Tcl_GetErrno (); - return -1; + return -1; } if (read == 0) { @@ -1490,7 +1490,7 @@ ReflectSetOption( * level is not involved there is no need for thread forwarding. */ - Tcl_DriverSetOptionProc *setOptionProc = + Tcl_DriverSetOptionProc *setOptionProc = Tcl_ChannelSetOptionProc (Tcl_GetChannelType (rtPtr->parent)); if (setOptionProc != NULL) { @@ -1537,7 +1537,7 @@ ReflectGetOption( * specific option has to fail. */ - Tcl_DriverGetOptionProc *getOptionProc = + Tcl_DriverGetOptionProc *getOptionProc = Tcl_ChannelGetOptionProc (Tcl_GetChannelType (rtPtr->parent)); if (getOptionProc != NULL) { @@ -1725,7 +1725,7 @@ NewReflectedTransform( rtPtr->timer = (Tcl_TimerToken) NULL; rtPtr->mode = 0; rtPtr->readIsDrained = 0; - rtPtr->nonblocking = + rtPtr->nonblocking = (((Channel*) parentChan)->state->flags & CHANNEL_NONBLOCKING); /* Query parent for current blocking mode. */ @@ -2489,7 +2489,7 @@ ForwardProc( */ rtmPtr = GetReflectedTransformMap (interp); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, + hPtr = Tcl_FindHashEntry (&rtmPtr->map, Tcl_GetString(rtPtr->handle)); Tcl_DeleteHashEntry (hPtr); @@ -2500,7 +2500,7 @@ ForwardProc( */ rtmPtr = GetThreadReflectedTransformMap(); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, + hPtr = Tcl_FindHashEntry (&rtmPtr->map, Tcl_GetString(rtPtr->handle)); Tcl_DeleteHashEntry (hPtr); FreeReflectedTransform(rtPtr); diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 4f15134..84cc8d1 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.96 2008/08/03 17:33:12 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.97 2008/10/16 22:34:18 nijtmans Exp $ */ #include "tclInt.h" @@ -559,7 +559,7 @@ Tcl_InterpObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int index; - static const char *options[] = { + static const char *const options[] = { "alias", "aliases", "bgerror", "cancel", "create", "delete", "eval", "exists", "expose", "hide", "hidden", "issafe", @@ -645,7 +645,7 @@ Tcl_InterpObjCmd( int i, flags; Tcl_Interp *slaveInterp; Tcl_Obj *resultObjPtr; - static const char *options[] = { + static const char *const options[] = { "-unwind", "--", NULL }; enum option { @@ -686,7 +686,7 @@ Tcl_InterpObjCmd( /* * Did they specify a slave interp to cancel the script in - * progress in? If not, use the current interp. + * progress in? If not, use the current interp. */ if (i < objc) { @@ -714,7 +714,7 @@ Tcl_InterpObjCmd( int i, last, safe; Tcl_Obj *slavePtr; char buf[16 + TCL_INTEGER_SPACE]; - static const char *options[] = { + static const char *const options[] = { "-safe", "--", NULL }; enum option { @@ -876,7 +876,7 @@ Tcl_InterpObjCmd( int i, index; const char *namespaceName; Tcl_Interp *slaveInterp; - static const char *hiddenOptions[] = { + static const char *const hiddenOptions[] = { "-global", "-namespace", "--", NULL }; enum hiddenOption { @@ -919,7 +919,7 @@ Tcl_InterpObjCmd( } case OPT_LIMIT: { Tcl_Interp *slaveInterp; - static const char *limitTypes[] = { + static const char *const limitTypes[] = { "commands", "time", NULL }; enum LimitTypes { @@ -1487,7 +1487,7 @@ AliasCreate( if (slaveInterp == masterInterp) { aliasPtr->slaveCmd = Tcl_NRCreateCommand(slaveInterp, - TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, + TclGetString(namePtr), AliasObjCmd, AliasNRCmd, aliasPtr, AliasObjCmdDeleteProc); } else { aliasPtr->slaveCmd = Tcl_CreateObjCommand(slaveInterp, @@ -1762,7 +1762,7 @@ AliasNRCmd( Tcl_Obj *listPtr; List *listRep; int flags = TCL_EVAL_INVOKE; - + /* * Append the arguments to the command prefix and invoke the command in * the target interp's global namespace. @@ -1776,7 +1776,7 @@ AliasNRCmd( listRep = listPtr->internalRep.twoPtrValue.ptr1; listRep->elemCount = cmdc; cmdv = &listRep->elements; - + prefv = &aliasPtr->objPtr; memcpy(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *))); memcpy(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *))); @@ -2368,7 +2368,7 @@ SlaveObjCmd( { Tcl_Interp *slaveInterp = clientData; int index; - static const char *options[] = { + static const char *const options[] = { "alias", "aliases", "bgerror", "eval", "expose", "hide", "hidden", "issafe", "invokehidden", "limit", "marktrusted", "recursionlimit", NULL @@ -2455,7 +2455,7 @@ SlaveObjCmd( case OPT_INVOKEHIDDEN: { int i, index; const char *namespaceName; - static const char *hiddenOptions[] = { + static const char *const hiddenOptions[] = { "-global", "-namespace", "--", NULL }; enum hiddenOption { @@ -2493,7 +2493,7 @@ SlaveObjCmd( objc - i, objv + i); } case OPT_LIMIT: { - static const char *limitTypes[] = { + static const char *const limitTypes[] = { "commands", "time", NULL }; enum LimitTypes { @@ -2617,7 +2617,7 @@ SlaveEval( * * Do not let any intReps accross, with the exception of * bytecodes. The intrep spoiling is due to happen anyway when - * compiling. + * compiling. */ Interp *iPtr = (Interp *) interp; @@ -2634,7 +2634,7 @@ SlaveEval( } TclArgumentGet (interp, objPtr, &invoker, &word); - + result = TclEvalObjEx(slaveInterp, objPtr, 0, invoker, word); } else { objPtr = Tcl_ConcatObj(objc, objv); @@ -4152,7 +4152,7 @@ SlaveCommandLimitCmd( int objc, /* Total number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *options[] = { + static const char *const options[] = { "-command", "-granularity", "-value", NULL }; enum Options { @@ -4323,7 +4323,7 @@ SlaveTimeLimitCmd( int objc, /* Total number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *options[] = { + static const char *const options[] = { "-command", "-granularity", "-milliseconds", "-seconds", NULL }; enum Options { diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 479c1fb..36a61b0 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.19 2008/10/04 12:54:14 nijtmans Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.20 2008/10/16 22:34:18 nijtmans Exp $ */ #include "tclInt.h" @@ -506,7 +506,7 @@ Tcl_UnloadObjCmd( int trustedRefCount = -1, safeRefCount = -1; const char *fullFileName = ""; char *packageName; - static const char *options[] = { + static const char *const options[] = { "-nocomplain", "-keeplibrary", "--", NULL }; enum options { diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 2d224dd..cbece15 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.12 2008/10/04 12:00:25 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.13 2008/10/16 22:34:18 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -688,7 +688,7 @@ TclOOSelfObjCmd( int objc, Tcl_Obj *const *objv) { - static const char *subcmds[] = { + static const char *const subcmds[] = { "caller", "class", "filter", "method", "namespace", "next", "object", "target", NULL }; diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index 8c6c15b..c4b9ab2 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.12 2008/09/25 10:15:04 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.13 2008/10/16 22:34:18 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -81,7 +81,7 @@ static inline void StashCallChain(Tcl_Obj *objPtr, CallChain *callPtr); * Object type used to manage type caches attached to method names. */ -static Tcl_ObjType methodNameType = { +static const Tcl_ObjType methodNameType = { "TclOO method name", FreeMethodNameRep, DupMethodNameRep, diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index d994e94..583907b 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.9 2008/10/13 21:10:43 dkf Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.10 2008/10/16 22:34:18 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -415,7 +415,7 @@ InfoObjectIsACmd( int objc, Tcl_Obj *const objv[]) { - static const char *categories[] = { + static const char *const categories[] = { "class", "metaclass", "mixin", "object", "typeof", NULL }; enum IsACats { @@ -540,7 +540,7 @@ InfoObjectMethodsCmd( FOREACH_HASH_DECLS; Tcl_Obj *namePtr, *resultObj; Method *mPtr; - static const char *options[] = { + static const char *const options[] = { "-all", "-localprivate", "-private", NULL }; enum Options { @@ -1058,7 +1058,7 @@ InfoClassMethodsCmd( Tcl_Obj *namePtr, *resultObj; Method *mPtr; Class *clsPtr; - static const char *options[] = { + static const char *const options[] = { "-all", "-localprivate", "-private", NULL }; enum Options { diff --git a/generic/tclObj.c b/generic/tclObj.c index a92ea7e..c5fef11 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.143 2008/10/15 06:17:03 nijtmans Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.144 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -2227,7 +2227,7 @@ Tcl_GetLongFromObj( tooLarge: #endif if (interp != NULL) { - char *s = "integer value too large to represent"; + const char *s = "integer value too large to represent"; Tcl_Obj *msg = Tcl_NewStringObj(s, -1); Tcl_SetObjResult(interp, msg); @@ -2526,7 +2526,7 @@ Tcl_GetWideIntFromObj( } } if (interp != NULL) { - char *s = "integer value too large to represent"; + const char *s = "integer value too large to represent"; Tcl_Obj *msg = Tcl_NewStringObj(s, -1); Tcl_SetObjResult(interp, msg); diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 1ac1496..3839429 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.73 2008/07/28 21:31:19 nijtmans Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.74 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -34,7 +34,7 @@ static Tcl_Obj * GetExtension(Tcl_Obj *pathPtr); * internally. */ -static Tcl_ObjType tclFsPathType = { +static const Tcl_ObjType tclFsPathType = { "path", /* name */ FreeFsPathInternalRep, /* freeIntRepProc */ DupFsPathInternalRep, /* dupIntRepProc */ diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 346d113..558ccd9 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.37 2008/07/19 22:50:39 nijtmans Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.38 2008/10/16 22:34:18 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -742,7 +742,7 @@ Tcl_PackageObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - static const char *pkgOptions[] = { + static const char *const pkgOptions[] = { "forget", "ifneeded", "names", "prefer", "present", "provide", "require", "unknown", "vcompare", "versions", "vsatisfies", NULL @@ -1015,7 +1015,7 @@ Tcl_PackageObjCmd( break; } case PKG_PREFER: { - static const char *pkgPreferOptions[] = { + static const char *const pkgPreferOptions[] = { "latest", "stable", NULL }; diff --git a/generic/tclResult.c b/generic/tclResult.c index b91d6ef..b0a8836 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.49 2008/10/02 20:59:45 dgp Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.50 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -1336,7 +1336,7 @@ TclMergeReturnOptions( Tcl_DictObjGet(NULL, returnOpts, keys[KEY_CODE], &valuePtr); if ((valuePtr != NULL) && (TCL_ERROR == TclGetIntFromObj(NULL, valuePtr, &code))) { - static const char *returnCodes[] = { + static const char *const returnCodes[] = { "ok", "error", "return", "break", "continue", NULL }; diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 4a7d0f4..b017347 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.72 2008/10/15 06:17:04 nijtmans Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.73 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1702,7 +1702,7 @@ Tcl_AppendFormatToObj( int originalLength; static const char *mixedXPG = "cannot mix \"%\" and \"%n$\" conversion specifiers"; - static const char *badIndex[2] = { + static const char *const badIndex[2] = { "not enough arguments for all format specifiers", "\"%n$\" argument index out of range" }; diff --git a/generic/tclTest.c b/generic/tclTest.c index 74d255e..1ddfb5f 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.127 2008/10/13 22:05:59 patthoyts Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.128 2008/10/16 22:34:19 nijtmans Exp $ */ #define TCL_TEST @@ -527,7 +527,7 @@ Tcltest_Init( Tcl_Obj *listPtr; Tcl_Obj **objv; int objc, index; - static const char *specialOptions[] = { + static const char *const specialOptions[] = { "-appinitprocerror", "-appinitprocdeleteinterp", "-appinitprocclosestderr", "-appinitprocsetrcfile", NULL }; @@ -1726,7 +1726,7 @@ TestencodingObjCmd( int index, length; char *string; TclEncoding *encodingPtr; - static const char *optionStrings[] = { + static const char *const optionStrings[] = { "create", "delete", NULL }; enum options { @@ -1974,11 +1974,11 @@ TesteventObjCmd( int objc, /* Parameter count */ Tcl_Obj *const objv[]) /* Parameter vector */ { - static const char *subcommands[] = { /* Possible subcommands */ + static const char *const subcommands[] = { /* Possible subcommands */ "queue", "delete", NULL }; int subCmdIndex; /* Index of the chosen subcommand */ - static const char *positions[] = { /* Possible queue positions */ + static const char *const positions[] = { /* Possible queue positions */ "head", "tail", "mark", NULL }; int posIndex; /* Index of the chosen position */ @@ -2529,7 +2529,7 @@ TestgetplatformCmd( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - static const char *platformStrings[] = { "unix", "mac", "windows" }; + static const char *const platformStrings[] = { "unix", "mac", "windows" }; TclPlatformType *platform; platform = TclGetPlatform(); @@ -3082,7 +3082,7 @@ TestlocaleCmd( int index; char *locale; - static const char *optionStrings[] = { + static const char *const optionStrings[] = { "ctype", "numeric", "time", "collate", "monetary", "all", NULL }; @@ -3421,7 +3421,7 @@ PrintParse( Tcl_Parse *parsePtr) /* Parse structure to print out. */ { Tcl_Obj *objPtr; - char *typeString; + const char *typeString; Tcl_Token *tokenPtr; int i; @@ -3619,7 +3619,7 @@ TestregexpObjCmd( char *string; Tcl_Obj *objPtr; Tcl_RegExpInfo info; - static const char *options[] = { + static const char *const options[] = { "-indices", "-nocase", "-about", "-expanded", "-line", "-linestop", "-lineanchor", "-xflags", @@ -4852,7 +4852,7 @@ TestsaveresultCmd( int discard, result, index; Tcl_SavedResult state; Tcl_Obj *objPtr; - static const char *optionStrings[] = { + static const char *const optionStrings[] = { "append", "dynamic", "free", "object", "small", NULL }; enum options { @@ -5836,7 +5836,7 @@ TestGetIndexFromObjStructObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *ary[] = { + const char *const ary[] = { "a", "b", "c", "d", "e", "f", NULL, NULL }; int idx,target; @@ -5891,7 +5891,7 @@ TestFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - char *msg; + const char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6263,7 +6263,7 @@ TestSimpleFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - char *msg; + const char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6445,7 +6445,7 @@ TestHashSystemHashCmd( int objc, Tcl_Obj *const objv[]) { - static Tcl_HashKeyType hkType = { + static const Tcl_HashKeyType hkType = { TCL_HASH_KEY_TYPE_VERSION, TCL_HASH_KEY_SYSTEM_HASH, NULL, NULL, NULL, NULL }; @@ -6553,11 +6553,11 @@ TestNRELevels( Tcl_Obj *levels[6]; int i = 0; TEOV_callback *cbPtr = ((Interp *) interp)->execEnvPtr->callbackPtr; - + if (refDepth == NULL) { refDepth = &depth; } - + depth = (refDepth - &depth); levels[0] = Tcl_NewIntObj(depth); @@ -6572,7 +6572,7 @@ TestNRELevels( cbPtr = cbPtr->nextPtr; } levels[5] = Tcl_NewIntObj(i); - + Tcl_SetObjResult(interp, Tcl_NewListObj(6, levels)); return TCL_OK; } @@ -6611,19 +6611,19 @@ TestconcatobjCmd( * Set the start of the error message as obj result; it will be cleared at * the end if no errors were found. */ - + Tcl_SetObjResult(interp, Tcl_NewStringObj("Tcl_ConcatObj is unsafe:", -1)); - + emptyPtr = Tcl_NewObj(); - + list1Ptr = Tcl_NewStringObj("foo bar sum", -1); Tcl_ListObjLength(NULL, list1Ptr, &len); if (list1Ptr->bytes != NULL) { ckfree(list1Ptr->bytes); list1Ptr->bytes = NULL; } - + list2Ptr = Tcl_NewStringObj("eeny meeny", -1); Tcl_ListObjLength(NULL, list2Ptr, &len); if (list2Ptr->bytes != NULL) { @@ -6637,7 +6637,7 @@ TestconcatobjCmd( */ tmpPtr = Tcl_DuplicateObj(list1Ptr); - + objv[0] = tmpPtr; objv[1] = emptyPtr; concatPtr = Tcl_ConcatObj(2, objv); @@ -6721,7 +6721,7 @@ TestconcatobjCmd( objv[1] = tmpPtr; } Tcl_DecrRefCount(concatPtr); - + Tcl_IncrRefCount(tmpPtr); concatPtr = Tcl_ConcatObj(3, objv); if (concatPtr->refCount != 0) { @@ -6766,7 +6766,7 @@ TestconcatobjCmd( } if (concatPtr == tmpPtr) { int len; - + result = TCL_ERROR; Tcl_AppendResult(interp, "\n\t* (e) concatObj is not a new obj ", NULL); @@ -6781,7 +6781,7 @@ TestconcatobjCmd( if (Tcl_IsShared(tmpPtr)) { Tcl_DecrRefCount(tmpPtr); } - tmpPtr = Tcl_DuplicateObj(list1Ptr); + tmpPtr = Tcl_DuplicateObj(list1Ptr); objv[0] = tmpPtr; } Tcl_DecrRefCount(concatPtr); @@ -6796,7 +6796,7 @@ TestconcatobjCmd( } if (concatPtr == tmpPtr) { int len; - + result = TCL_ERROR; Tcl_AppendResult(interp, "\n\t* (f) concatObj is not a new obj ", NULL); @@ -6811,7 +6811,7 @@ TestconcatobjCmd( if (Tcl_IsShared(tmpPtr)) { Tcl_DecrRefCount(tmpPtr); } - tmpPtr = Tcl_DuplicateObj(list1Ptr); + tmpPtr = Tcl_DuplicateObj(list1Ptr); objv[0] = tmpPtr; } Tcl_DecrRefCount(concatPtr); @@ -6827,7 +6827,7 @@ TestconcatobjCmd( } if (concatPtr == tmpPtr) { int len; - + result = TCL_ERROR; Tcl_AppendResult(interp, "\n\t* (g) concatObj is not a new obj ", NULL); @@ -6843,7 +6843,7 @@ TestconcatobjCmd( if (Tcl_IsShared(tmpPtr)) { Tcl_DecrRefCount(tmpPtr); } - tmpPtr = Tcl_DuplicateObj(list1Ptr); + tmpPtr = Tcl_DuplicateObj(list1Ptr); objv[0] = tmpPtr; } Tcl_DecrRefCount(concatPtr); diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index c0d4f17..842cbd0 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.24 2008/07/27 22:18:23 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.25 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -129,7 +129,7 @@ TestbignumobjCmd( int objc, /* Argument count */ Tcl_Obj *const objv[]) /* Argument vector */ { - const char * subcmds[] = { + const char *const subcmds[] = { "set", "get", "mult10", "div10", NULL }; enum options { @@ -496,7 +496,7 @@ TestindexobjCmd( { int allowAbbrev, index, index2, setError, i, result; const char **argv; - static const char *tablePtr[] = {"a", "b", "check", NULL}; + static const char *const tablePtr[] = {"a", "b", "check", NULL}; /* * Keep this structure declaration in sync with tclIndexObj.c */ @@ -996,7 +996,7 @@ TeststringobjCmd( #define MAX_STRINGS 11 char *index, *string, *strings[MAX_STRINGS+1]; TestString *strPtr; - static const char *options[] = { + static const char *const options[] = { "append", "appendstrings", "get", "get2", "length", "length2", "set", "set2", "setlength", "ualloc", "getunicode", NULL }; diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 74398fe..eb3b855 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.26 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.27 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -219,7 +219,7 @@ Tcl_ThreadObjCmd( { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); int option; - static const char *threadOptions[] = { + static const char *const threadOptions[] = { "cancel", "create", "event", "exit", "id", "join", "names", "send", "wait", "errorproc", NULL @@ -984,7 +984,7 @@ TclThreadCancel( } /* - * Since Tcl_CancelEval can be safely called from any thread, + * Since Tcl_CancelEval can be safely called from any thread, * we do it now. */ diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 704d2bb..1e1fd73 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.34 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.35 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -786,7 +786,7 @@ Tcl_AfterObjCmd( int length; int index; char buf[16 + TCL_INTEGER_SPACE]; - static const char *afterSubCmds[] = { + static const char *const afterSubCmds[] = { "cancel", "idle", "info", NULL }; enum afterSubCmds {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO}; @@ -820,7 +820,7 @@ Tcl_AfterObjCmd( || objv[1]->typePtr == &tclWideIntType #endif || objv[1]->typePtr == &tclBignumType - || ( Tcl_GetIndexFromObj(NULL, objv[1], afterSubCmds, "", 0, + || ( Tcl_GetIndexFromObj(NULL, objv[1], afterSubCmds, "", 0, &index) != TCL_OK )) { index = -1; if (Tcl_GetWideIntFromObj(NULL, objv[1], &ms) != TCL_OK) { @@ -832,7 +832,7 @@ Tcl_AfterObjCmd( } } - /* + /* * At this point, either index = -1 and ms contains the number of ms * to wait, or else index is the index of a subcommand. */ diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 6386f29..7876eab 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.52 2008/10/08 14:50:57 dgp Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.53 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -109,7 +109,7 @@ static Tcl_TraceTypeObjCmd TraceExecutionObjCmd; * add to the list of supported trace types. */ -static const char *traceTypeOptions[] = { +static const char *const traceTypeOptions[] = { "execution", "command", "variable", NULL }; static Tcl_TraceTypeObjCmd *const traceSubCmds[] = { @@ -195,7 +195,7 @@ Tcl_TraceObjCmd( int optionIndex; char *name, *flagOps, *p; /* Main sub commands to 'trace' */ - static const char *traceOptions[] = { + static const char *const traceOptions[] = { "add", "info", "remove", #ifndef TCL_REMOVE_OBSOLETE_TRACES "variable", "vdelete", "vinfo", @@ -404,7 +404,7 @@ TraceExecutionObjCmd( enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE }; - static const char *opStrings[] = { + static const char *const opStrings[] = { "enter", "leave", "enterstep", "leavestep", NULL }; enum operations { @@ -651,7 +651,7 @@ TraceCommandObjCmd( char *name, *command; size_t length; enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE }; - static const char *opStrings[] = { "delete", "rename", NULL }; + static const char *const opStrings[] = { "delete", "rename", NULL }; enum operations { TRACE_CMD_DELETE, TRACE_CMD_RENAME }; switch ((enum traceOptions) optionIndex) { @@ -843,7 +843,7 @@ TraceVariableObjCmd( char *name, *command; size_t length; enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE }; - static const char *opStrings[] = { + static const char *const opStrings[] = { "array", "read", "unset", "write", NULL }; enum operations { @@ -1948,7 +1948,7 @@ TraceVarProc( int code, destroy = 0; Tcl_DString cmd; int rewind = ((Interp *)interp)->execEnvPtr->rewind; - + /* * We might call Tcl_Eval() below, and that might evaluate [trace vdelete] * which might try to free tvarPtr. We want to use tvarPtr until the end diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index d230f4a..31245f1 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.13 2008/04/27 22:21:33 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.14 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -74,7 +74,7 @@ static Tcl_Obj * NewOSTypeObj(const OSType newOSType); static int SetOSTypeFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void UpdateStringOfOSType(Tcl_Obj *objPtr); -static Tcl_ObjType tclOSTypeType = { +static const Tcl_ObjType tclOSTypeType = { "osType", /* name */ NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ diff --git a/win/cat.c b/win/cat.c index 91c38f4..d1a7338 100644 --- a/win/cat.c +++ b/win/cat.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: cat.c,v 1.3 2005/11/04 00:06:49 dkf Exp $ + * RCS: @(#) $Id: cat.c,v 1.4 2008/10/16 22:34:19 nijtmans Exp $ */ #include @@ -20,7 +20,7 @@ main(void) { char buf[1024]; int n; - char *err; + const char *err; while (1) { n = read(0, buf, sizeof(buf)); diff --git a/win/tclWinInit.c b/win/tclWinInit.c index d47b2cb..70170fe 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.78 2008/10/14 22:43:30 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.79 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclWinInt.h" @@ -85,12 +85,12 @@ typedef struct { #define NUMPLATFORMS 4 -static const char *platforms[NUMPLATFORMS] = { +static const char *const platforms[NUMPLATFORMS] = { "Win32s", "Windows 95", "Windows NT", "Windows CE" }; #define NUMPROCESSORS 11 -static const char *processors[NUMPROCESSORS] = { +static const char *const processors[NUMPROCESSORS] = { "intel", "mips", "alpha", "ppc", "shx", "arm", "ia64", "alpha64", "msil", "amd64", "ia32_on_win64" }; diff --git a/win/tclWinTest.c b/win/tclWinTest.c index eb2ccf8..29e4974 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTest.c,v 1.23 2008/07/19 22:16:57 nijtmans Exp $ + * RCS: @(#) $Id: tclWinTest.c,v 1.24 2008/10/16 22:34:19 nijtmans Exp $ */ #include "tclInt.h" @@ -421,7 +421,7 @@ TestExceptionCmd( int objc, /* Argument count */ Tcl_Obj *const objv[]) /* Argument vector */ { - static const char *cmds[] = { + static const char *const cmds[] = { "access_violation", "datatype_misalignment", "array_bounds", "float_denormal", "float_divbyzero", "float_inexact", "float_invalidop", "float_overflow", "float_stack", "float_underflow", -- cgit v0.12 From 842e3ff91428c72a2ce0d4df4889778af82f4b12 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 17 Oct 2008 10:22:24 +0000 Subject: Improve clarity of formatting. --- ChangeLog | 12 +++-- doc/AddErrInfo.3 | 4 +- doc/CrtChannel.3 | 3 +- doc/CrtChnlHdlr.3 | 3 +- doc/CrtMathFnc.3 | 4 +- doc/Encoding.3 | 5 +- doc/GetTime.3 | 1 + doc/Hash.3 | 3 +- doc/Namespace.3 | 3 +- doc/OpenTcp.3 | 3 +- doc/ParseCmd.3 | 3 +- doc/SplitList.3 | 4 +- doc/Tcl_Main.3 | 4 +- doc/apply.n | 3 ++ doc/bgerror.n | 3 +- doc/break.n | 4 +- doc/catch.n | 3 +- doc/cd.n | 8 +-- doc/class.n | 9 ++-- doc/clock.n | 8 +++ doc/close.n | 6 +-- doc/concat.n | 14 +++-- doc/continue.n | 7 ++- doc/copy.n | 7 +-- doc/dde.n | 5 +- doc/eof.n | 8 +-- doc/error.n | 6 +-- doc/eval.n | 3 +- doc/exit.n | 6 +-- doc/expr.n | 3 +- doc/fconfigure.n | 6 ++- doc/fcopy.n | 10 ++-- doc/flush.n | 7 ++- doc/for.n | 8 +-- doc/foreach.n | 7 ++- doc/format.n | 8 ++- doc/glob.n | 159 ++++++++++++++++++++++++++++++++---------------------- doc/global.n | 8 +-- doc/http.n | 94 +++++++++++++++++++++++++++++--- doc/if.n | 13 +++-- doc/incr.n | 8 ++- doc/info.n | 4 +- doc/interp.n | 8 ++- doc/join.n | 8 +-- doc/lappend.n | 7 ++- doc/lassign.n | 11 ++-- doc/library.n | 12 ++++- doc/lindex.n | 14 ++++- doc/linsert.n | 3 +- doc/list.n | 10 +++- doc/llength.n | 10 ++-- doc/load.n | 8 ++- doc/lrange.n | 7 ++- doc/lreplace.n | 6 ++- doc/lsearch.n | 7 ++- doc/lset.n | 20 ++++++- doc/lsort.n | 23 +++++++- doc/mathop.n | 5 +- doc/memory.n | 7 ++- doc/msgcat.n | 22 +++++++- doc/my.n | 6 ++- doc/namespace.n | 51 +++++++++++++++++- doc/next.n | 6 ++- doc/object.n | 8 +-- doc/open.n | 3 +- doc/package.n | 20 ++++++- doc/prefix.n | 10 +++- doc/proc.n | 8 +-- doc/puts.n | 10 ++-- doc/pwd.n | 6 +-- doc/read.n | 12 ++--- doc/regexp.n | 12 ++++- doc/regsub.n | 7 ++- doc/rename.n | 7 ++- doc/return.n | 11 +++- doc/scan.n | 8 ++- doc/seek.n | 15 +++--- doc/self.n | 6 +-- doc/set.n | 7 ++- doc/socket.n | 17 ++++-- doc/source.n | 4 +- doc/split.n | 16 +++--- doc/string.n | 15 +++++- doc/subst.n | 21 +++++++- doc/switch.n | 7 ++- doc/tclsh.1 | 5 +- doc/tcltest.n | 5 +- doc/tell.n | 7 ++- doc/time.n | 13 +++-- doc/tm.n | 16 +++++- doc/trace.n | 17 +++++- doc/unload.n | 9 +++- doc/unset.n | 4 +- doc/update.n | 7 ++- doc/uplevel.n | 10 +++- doc/upvar.n | 11 ++-- doc/variable.n | 9 ++-- doc/vwait.n | 8 +-- doc/while.n | 8 +-- 99 files changed, 816 insertions(+), 281 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47d21d2..f1e0cba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-17 Donal K. Fellows + + * doc/*: Many very small formatting fixes. + * doc/{glob,http,if}.n: More substantial reformatting for clarity. + * doc/split.n: Remove mention of defunct c.l.t.announce + 2008-10-16 Jan Nijtmans * generic/regc_locale.c: Add "const" to many internal @@ -37,9 +43,9 @@ 2008-10-16 Don Porter * library/init.tcl: Revised [unknown] so that it carefully - preserves the state of the ::errorInfo and ::errorCode variables - at the start of auto-loading and restores that state before the - autoloaded command is evaluated. [Bug 2140628] + preserves the state of the ::errorInfo and ::errorCode variables at + the start of auto-loading and restores that state before the + autoloaded command is evaluated. [Bug 2140628] 2008-10-15 Jan Nijtmans diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index ae535d7..0de0a0f 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.22 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.23 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.5 Tcl "Tcl Library Procedures" @@ -109,6 +109,7 @@ any entries in it, with the need to check for a shared object. A typical usage for \fBTcl_GetReturnOptions\fR is to retrieve the stack trace when script evaluation returns \fBTCL_ERROR\fR, like so: +.PP .CS int code = Tcl_Eval(interp, script); if (code == TCL_ERROR) { @@ -133,6 +134,7 @@ keys in \fIoptions\fR will be returned. As an example, Tcl's \fBreturn\fR command itself could be implemented in terms of \fBTcl_SetReturnOptions\fR like so: +.PP .CS if ((objc % 2) == 0) { /* explicit result argument */ objc--; diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index 1aaf3be..c5773a1 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChannel.3,v 1.42 2008/10/04 12:33:34 nijtmans Exp $ +'\" RCS: @(#) $Id: CrtChannel.3,v 1.43 2008/10/17 10:22:25 dkf Exp $ .so man.macros .TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -310,6 +310,7 @@ channel drivers. See the \fBOLD CHANNEL TYPES\fR section below for details about the old structure. .PP The \fBTcl_ChannelType\fR structure contains the following fields: +.PP .CS typedef struct Tcl_ChannelType { const char *\fItypeName\fR; diff --git a/doc/CrtChnlHdlr.3 b/doc/CrtChnlHdlr.3 index 5cb6b0c..08f419e 100644 --- a/doc/CrtChnlHdlr.3 +++ b/doc/CrtChnlHdlr.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChnlHdlr.3,v 1.7 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: CrtChnlHdlr.3,v 1.8 2008/10/17 10:22:25 dkf Exp $ .so man.macros .TH Tcl_CreateChannelHandler 3 7.5 Tcl "Tcl Library Procedures" .BS @@ -46,6 +46,7 @@ invoked are specified by the \fImask\fR argument. See the manual entry for \fBfileevent\fR for a precise description of what it means for a channel to be readable or writable. \fIProc\fR must conform to the following prototype: +.PP .CS typedef void \fBTcl_ChannelProc\fR( ClientData \fIclientData\fR, diff --git a/doc/CrtMathFnc.3 b/doc/CrtMathFnc.3 index 3ad4a00..3f4f7c0 100644 --- a/doc/CrtMathFnc.3 +++ b/doc/CrtMathFnc.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.18 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.19 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures" @@ -86,6 +86,7 @@ or any, respectively. Whenever the function is invoked in an expression Tcl will invoke \fIproc\fR. \fIProc\fR should have arguments and result that match the type \fBTcl_MathProc\fR: +.PP .CS typedef int \fBTcl_MathProc\fR( ClientData \fIclientData\fR, @@ -98,6 +99,7 @@ When \fIproc\fR is invoked the \fIclientData\fR and \fIinterp\fR arguments will be the same as those passed to \fBTcl_CreateMathFunc\fR. \fIArgs\fR will point to an array of \fInumArgs\fR Tcl_Value structures, which describe the actual arguments to the function: +.PP .CS typedef struct Tcl_Value { Tcl_ValueType \fItype\fR; diff --git a/doc/Encoding.3 b/doc/Encoding.3 index 5fadc44..1545c21 100644 --- a/doc/Encoding.3 +++ b/doc/Encoding.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Encoding.3,v 1.31 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Encoding.3,v 1.32 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures" @@ -414,6 +414,7 @@ procedure will be a non-NULL location. .PP The callback procedure \fIfreeProc\fR, if non-NULL, should match the type \fBTcl_EncodingFreeProc\fR: +.PP .CS typedef void \fBTcl_EncodingFreeProc\fR( ClientData \fIclientData\fR); @@ -490,6 +491,7 @@ Cases [1], [2], and [3] are collectively referred to as table-based encoding files. The lines in a table-based encoding file are in the same format as this example taken from the \fBshiftjis\fR encoding (this is not the complete file): +.PP .CS # Encoding file: shiftjis, multi-byte M @@ -555,6 +557,7 @@ If all characters on a page would map to 0000, that page can be omitted. Case [4] is the escape-sequence encoding file. The lines in an this type of file are in the same format as this example taken from the \fBiso2022-jp\fR encoding: +.PP .CS .ta 1.5i # Encoding file: iso2022-jp, escape-driven diff --git a/doc/GetTime.3 b/doc/GetTime.3 index a180860..6927c5e 100644 --- a/doc/GetTime.3 +++ b/doc/GetTime.3 @@ -43,6 +43,7 @@ Pointer to place the currently registered pass-through value into. The \fBTcl_GetTime\fR function retrieves the current time as a \fITcl_Time\fR structure in memory the caller provides. This structure has the following definition: +.PP .CS typedef struct Tcl_Time { long sec; diff --git a/doc/Hash.3 b/doc/Hash.3 index 13bfe3b..6e57cf3 100644 --- a/doc/Hash.3 +++ b/doc/Hash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Hash.3,v 1.29 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Hash.3,v 1.30 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures" @@ -247,6 +247,7 @@ Extension writers can define new hash key types by defining four procedures, initializing a \fBTcl_HashKeyType\fR structure to describe the type, and calling \fBTcl_InitCustomHashTable\fR. The \fBTcl_HashKeyType\fR structure is defined as follows: +.PP .CS typedef struct Tcl_HashKeyType { int \fIversion\fR; diff --git a/doc/Namespace.3 b/doc/Namespace.3 index 9f78b83..629eba9 100644 --- a/doc/Namespace.3 +++ b/doc/Namespace.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Namespace.3,v 1.10 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Namespace.3,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" '\" Note that some of these functions do not seem to belong, but they '\" were all introduced with the same TIP (#139) @@ -116,6 +116,7 @@ the global namespace.) .PP \fBTcl_CreateNamespace\fR creates a new namespace. The \fIdeleteProc\fR will have the following type signature: +.PP .CS typedef void \fBTcl_NamespaceDeleteProc\fR( ClientData \fIclientData\fR); diff --git a/doc/OpenTcp.3 b/doc/OpenTcp.3 index 6dd78f6..7224ec3 100644 --- a/doc/OpenTcp.3 +++ b/doc/OpenTcp.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenTcp.3,v 1.12 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: OpenTcp.3,v 1.13 2008/10/17 10:22:25 dkf Exp $ .so man.macros .TH Tcl_OpenTcpClient 3 8.0 Tcl "Tcl Library Procedures" .BS @@ -116,6 +116,7 @@ allow connections from any network interface. Each time a client connects to this socket, Tcl creates a channel for the new connection and invokes \fIproc\fR with information about the channel. \fIProc\fR must match the following prototype: +.PP .CS typedef void \fBTcl_TcpAcceptProc\fR( ClientData \fIclientData\fR, diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3 index a75262e..b134a1e 100644 --- a/doc/ParseCmd.3 +++ b/doc/ParseCmd.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ParseCmd.3,v 1.28 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: ParseCmd.3,v 1.29 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH Tcl_ParseCommand 3 8.3 Tcl "Tcl Library Procedures" @@ -208,6 +208,7 @@ of \fBTcl_EvalTokens\fR is deprecated. \fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR, \fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR return parse information in two data structures, Tcl_Parse and Tcl_Token: +.PP .CS typedef struct Tcl_Parse { const char *\fIcommentStart\fR; diff --git a/doc/SplitList.3 b/doc/SplitList.3 index e70199a..73ff969 100644 --- a/doc/SplitList.3 +++ b/doc/SplitList.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SplitList.3,v 1.15 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: SplitList.3,v 1.16 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures" @@ -88,8 +88,8 @@ char *string; char **argv; \&... code = Tcl_SplitList(interp, string, &argc, &argv); -.PP .CE +.PP Then you should eventually free the storage with a call like the following: .PP diff --git a/doc/Tcl_Main.3 b/doc/Tcl_Main.3 index edbe115..462a4de 100644 --- a/doc/Tcl_Main.3 +++ b/doc/Tcl_Main.3 @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl_Main.3,v 1.17 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Tcl_Main.3,v 1.18 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH Tcl_Main 3 8.4 Tcl "Tcl Library Procedures" @@ -98,6 +98,7 @@ for the application to perform its own initialization of the interpreter created by \fBTcl_Main\fR, such as defining application-specific commands. The procedure must have an interface that matches the type \fBTcl_AppInitProc\fR: +.PP .CS typedef int \fBTcl_AppInitProc\fR( Tcl_Interp *\fIinterp\fR); @@ -131,6 +132,7 @@ When the loop procedure returns in interactive mode, interactive operation will continue. The main loop procedure must have an interface that matches the type \fBTcl_MainLoopProc\fR: +.PP .CS typedef void \fBTcl_MainLoopProc\fR(void); .CE diff --git a/doc/apply.n b/doc/apply.n index 8a38aac..8fd568c 100644 --- a/doc/apply.n +++ b/doc/apply.n @@ -63,8 +63,10 @@ proc apply {fun args} { } .CE .SH EXAMPLES +.PP This shows how to make a simple general command that applies a transformation to each element of a list. +.PP .CS proc map {lambda list} { set result {} @@ -81,6 +83,7 @@ map {x {expr {$x**2 + 3*$x - 2}}} {-4 -3 -2 -1 0 1 2 3 4} .PP The \fBapply\fR command is also useful for defining callbacks for use in the \fBtrace\fR command: +.PP .CS set vbl "123abc" trace add variable vbl write {\fBapply\fR {{v1 v2 op} { diff --git a/doc/bgerror.n b/doc/bgerror.n index 5f09133..b71ed3d 100644 --- a/doc/bgerror.n +++ b/doc/bgerror.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bgerror.n,v 1.14 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: bgerror.n,v 1.15 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH bgerror n 7.5 Tcl "Tcl Built-In Commands" @@ -77,6 +77,7 @@ have trouble integrating your code. .SH "EXAMPLE" .PP This \fBbgerror\fR procedure appends errors to a file, with a timestamp. +.PP .CS proc bgerror {message} { set timestamp [clock format [clock seconds]] diff --git a/doc/break.n b/doc/break.n index bd63b3e..77a0d97 100644 --- a/doc/break.n +++ b/doc/break.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: break.n,v 1.10 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: break.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH break n "" Tcl "Tcl Built-In Commands" @@ -30,7 +30,9 @@ Break exceptions are also handled in a few other situations, such as the \fBcatch\fR command, Tk event bindings, and the outermost scripts of procedure bodies. .SH EXAMPLE +.PP Print a line for each of the integers from 0 to 5: +.PP .CS for {set x 0} {$x<10} {incr x} { if {$x > 5} { diff --git a/doc/catch.n b/doc/catch.n index b108565..bf302ba 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.20 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -79,6 +79,7 @@ above. .PP The \fBcatch\fR command may be used in an \fBif\fR to branch based on the success of a script. +.PP .CS if { [\fBcatch\fR {open $someFile w} fid] } { puts stderr "Could not open $someFile for writing\en$fid" diff --git a/doc/cd.n b/doc/cd.n index 2a4f1b5..5968446 100644 --- a/doc/cd.n +++ b/doc/cd.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: cd.n,v 1.9 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: cd.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH cd n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ cd \- Change working directory .SH SYNOPSIS \fBcd \fR?\fIdirName\fR? .BE - .SH DESCRIPTION .PP Change the current working directory to \fIdirName\fR, or to the @@ -27,19 +26,20 @@ Note that the current working directory is a per-process resource; the \fBcd\fR command changes the working directory for all interpreters and (in a threaded environment) all threads. .SH EXAMPLES +.PP Change to the home directory of the user \fBfred\fR: +.PP .CS \fBcd\fR ~fred .CE .PP Change to the directory \fBlib\fR that is a sibling directory of the current one: +.PP .CS \fBcd\fR ../lib .CE - .SH "SEE ALSO" filename(n), glob(n), pwd(n) - .SH KEYWORDS working directory diff --git a/doc/class.n b/doc/class.n index 02dfc46..ec06706 100644 --- a/doc/class.n +++ b/doc/class.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: class.n,v 1.1 2008/05/31 11:42:06 dkf Exp $ +'\" RCS: @(#) $Id: class.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH class n 0.1 TclOO "TclOO Commands" @@ -24,8 +24,8 @@ package require TclOO \(-> \fBoo::class\fR .fi .BE - .SH DESCRIPTION +.PP The \fBoo::class\fR class is the class of all classes; every class is an instance of this class, which is consequently an instance of itself. This class is a subclass of \fBoo::object\fR, so every class is also an object. @@ -34,6 +34,7 @@ by subclassing \fBoo::class\fR. Note that the \fBoo::class\fR object hides the \fBnew\fR method on itself, so new classes should always be made using the \fBcreate\fR method. .SS CONSTRUCTOR +.PP The constructor of the \fBoo::class\fR class takes an optional argument which, if present, is sent to the \fBoo::define\fR command (along with the name of the newly-created class) to allow the class to be conveniently configured at @@ -65,6 +66,7 @@ the result of this method call. Note that this method is not exported by the \fBoo::class\fR object itself, so classes should not be created using this method. .SS "NON-EXPORTED METHODS" +.PP The \fBoo::class\fR class supports the following non-exported methods: .TP \fIobj \fBcreateWithNamespace\fI name nsName\fR ?\fIarg ...\fR? @@ -79,9 +81,11 @@ internal namespace will be \fInsName\fR unless that namespace already exists (i.e. returns a non-OK result) then the object is destroyed and the error message is the result of this method call. .SH EXAMPLES +.PP This example defines a simple class hierarchy and creates a new instance of it. It then invokes a method of the object before destroying the hierarchy and showing that the destruction is transitive. +.PP .CS \fBoo::class create\fR fruit { method eat {} { @@ -119,7 +123,6 @@ $b eat \fI\(-> error "unknown command"\fR oo::define(n), oo::object(n) .SH KEYWORDS class, metaclass, object - .\" Local variables: .\" mode: nroff .\" fill-column: 78 diff --git a/doc/clock.n b/doc/clock.n index d4bb1b9..60042be 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -111,6 +111,7 @@ and their interpretation, are described under \fBFORMAT GROUPS\fR. .RS .PP On \fBclock format\fR, the default format is +.PP .CS %a %b %d %H:%M:%S %z %Y .CE @@ -195,6 +196,7 @@ absolute time means that it will add fixed amounts of time in time zones that observe summer time (Daylight Saving Time). For example, the following code sets the value of \fBx\fR to \fB04:00:00\fR because the clock has changed in the interval in question. +.PP .CS set s [\fBclock scan\fR {2004-10-30 05:00:00} \e -format {%Y-%m-%d %H:%M:%S} \e @@ -215,6 +217,7 @@ Adding and subtracting a given number of days across the point that the time changes at the start or end of summer time (Daylight Saving Time) results in the \fIsame local time\fR on the day in question. For instance, the following code sets the value of \fBx\fR to \fB05:00:00\fR. +.PP .CS set s [\fBclock scan\fR {2004-10-30 05:00:00} \e -format {%Y-%m-%d %H:%M:%S} \e @@ -230,6 +233,7 @@ yields an impossible time (for instance, 02:30 during the Spring Daylight Saving Time change using US rules), the time is converted as if the clock had not changed. Thus, the following code will set the value of \fBx\fR to \fB03:30:00\fR. +.PP .CS set s [\fBclock scan\fR {2004-04-03 02:30:00} \e -format {%Y-%m-%d %H:%M:%S} \e @@ -242,6 +246,7 @@ set x [\fBclock format\fR $a \e Adding a given number of days or weeks works correctly across the conversion between the Julian and Gregorian calendars; the omitted days are skipped. The following code sets \fBz\fR to \fB1752-09-14\fR. +.PP .CS set x [\fBclock scan\fR 1752-09-02 -format %Y-%m-%d -locale en_US] set y [\fBclock add\fR $x 1 day -locale en_US] @@ -901,3 +906,6 @@ msgcat(n) clock, date, time .SH "COPYRIGHT" Copyright (c) 2004 Kevin B. Kenny . All rights reserved. +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/close.n b/doc/close.n index bc5fa86..800ee8a 100644 --- a/doc/close.n +++ b/doc/close.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: close.n,v 1.13 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: close.n,v 1.14 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH close n 7.5 Tcl "Tcl Built-In Commands" @@ -57,9 +57,11 @@ an error occurs while flushing output. If a command in a command pipeline created with \fBopen\fR returns an error, \fBclose\fR generates an error (similar to the \fBexec\fR command.) .SH EXAMPLE +.PP This illustrates how you can use Tcl to ensure that files get closed even when errors happen by combining \fBcatch\fR, \fBclose\fR and \fBreturn\fR: +.PP .CS proc withOpenFile {filename channelVar script} { upvar 1 $channelVar chan @@ -71,9 +73,7 @@ proc withOpenFile {filename channelVar script} { return -options $options $result } .CE - .SH "SEE ALSO" file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3) - .SH KEYWORDS blocking, channel, close, nonblocking diff --git a/doc/concat.n b/doc/concat.n index c54f662..d34d48c 100644 --- a/doc/concat.n +++ b/doc/concat.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: concat.n,v 1.11 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: concat.n,v 1.12 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH concat n 8.3 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ concat \- Join lists together .SH SYNOPSIS \fBconcat\fI \fR?\fIarg arg ...\fR? .BE - .SH DESCRIPTION .PP This command joins each of its arguments together with spaces after @@ -27,32 +26,39 @@ It permits any number of arguments; if no \fIarg\fRs are supplied, the result is an empty string. .SH EXAMPLES Although \fBconcat\fR will concatenate lists (so the command: +.PP .CS \fBconcat\fR a b {c d e} {f {g h}} .CE +.PP will return .QW "\fBa b c d e f {g h}\fR" as its result), it will also concatenate things that are not lists, and hence the command: +.PP .CS \fBconcat\fR " a b {c " d " e} f" .CE +.PP will return .QW "\fBa b {c d e} f\fR" as its result. .PP Note that the concatenation does not remove spaces from the middle of its arguments, so the command: +.PP .CS \fBconcat\fR "a b c" { d e f } .CE +.PP will return .QW "\fBa b c d e f\fR" (i.e. with three spaces between the \fBa\fR, the \fBb\fR and the \fBc\fR). - .SH "SEE ALSO" append(n), eval(n) - .SH KEYWORDS concatenate, join, lists +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/continue.n b/doc/continue.n index ce7dc52..e98763c 100644 --- a/doc/continue.n +++ b/doc/continue.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: continue.n,v 1.10 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: continue.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH continue n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ continue \- Skip to the next iteration of a loop .SH SYNOPSIS \fBcontinue\fR .BE - .SH DESCRIPTION .PP This command is typically invoked inside the body of a looping command @@ -30,7 +29,9 @@ Catch exceptions are also handled in a few other situations, such as the \fBcatch\fR command and the outermost scripts of procedure bodies. .SH EXAMPLE +.PP Print a line for each of the integers from 0 to 10 \fIexcept\fR 5: +.PP .CS for {set x 0} {$x<10} {incr x} { if {$x == 5} { @@ -39,9 +40,7 @@ for {set x 0} {$x<10} {incr x} { puts "x is $x" } .CE - .SH "SEE ALSO" break(n), for(n), foreach(n), return(n), while(n) - .SH KEYWORDS continue, iteration, loop diff --git a/doc/copy.n b/doc/copy.n index 291d2fc..023a281 100644 --- a/doc/copy.n +++ b/doc/copy.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: copy.n,v 1.1 2008/05/31 11:42:12 dkf Exp $ +'\" RCS: @(#) $Id: copy.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH copy n 0.1 TclOO "TclOO Commands" @@ -19,8 +19,8 @@ package require TclOO \fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? .fi .BE - .SH DESCRIPTION +.PP The \fBoo::copy\fR command creates a copy of an object or class. It takes the name of the object or class to be copied, \fIsourceObject\fR, and optionally the name of the object or class to create, \fItargetObject\fR, which will be @@ -33,8 +33,10 @@ contents of the source object's private namespace \fIwill not\fR be copied; it is up to the caller to do this. The result of this command will be the fully-qualified name of the new object or class. .SH EXAMPLES +.PP This example creates an object, copies it, modifies the source object, and then demonstrates that the copied object is indeed a copy. +.PP .CS oo::object create src oo::define src method msg {} {puts foo} @@ -47,7 +49,6 @@ dst msg \fI\(-> prints "foo"\fR oo::class(n), oo::define(n), oo::object(n) .SH KEYWORDS clone, copy, duplication, object - .\" Local variables: .\" mode: nroff .\" fill-column: 78 diff --git a/doc/dde.n b/doc/dde.n index d5a6e78..7859de1 100644 --- a/doc/dde.n +++ b/doc/dde.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dde.n,v 1.24 2008/01/18 15:59:22 dkf Exp $ +'\" RCS: @(#) $Id: dde.n,v 1.25 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH dde n 1.3 dde "Tcl Bundled Packages" @@ -125,6 +125,7 @@ command returns an error message if the script did not run, unless the \fB\-async\fR flag was used, in which case the command returns immediately with no error. This command can be used to replace send on Windows. .SH "DDE AND TCL" +.PP A Tcl interpreter always has a service name of \fBTclEval\fR. Each different interpreter of all running Tcl applications must be given a unique @@ -157,8 +158,10 @@ If for any reason the event queue is not flushed, DDE commands may hang until the event queue is flushed. This can create a deadlock situation. .SH EXAMPLE +.PP This asks Internet Explorer (which must already be running) to go to a particularly important website: +.PP .CS package require dde \fBdde execute\fR iexplore WWW_OpenURL http://www.tcl.tk/ diff --git a/doc/eof.n b/doc/eof.n index 4601f82..bf492bc 100644 --- a/doc/eof.n +++ b/doc/eof.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: eof.n,v 1.9 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: eof.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH eof n 7.5 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ eof \- Check for end of file condition on channel .SH SYNOPSIS \fBeof \fIchannelId\fR .BE - .SH DESCRIPTION .PP Returns 1 if an end of file condition occurred during the most @@ -28,7 +27,9 @@ Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR), the return value from an invocation of \fBopen\fR or \fBsocket\fR, or the result of a channel creation command provided by a Tcl extension. .SH EXAMPLES +.PP Read and print out the contents of a file line-by-line: +.PP .CS set f [open somefile.txt] while {1} { @@ -42,6 +43,7 @@ while {1} { .CE .PP Read and print out the contents of a file by fixed-size records: +.PP .CS set f [open somefile.dat] fconfigure $f -translation binary @@ -55,9 +57,7 @@ while {1} { puts "Read record: $record" } .CE - .SH "SEE ALSO" file(n), open(n), close(n), fblocked(n), Tcl_StandardChannels(3) - .SH KEYWORDS channel, end of file diff --git a/doc/error.n b/doc/error.n index 5c81878..2ac0a65 100644 --- a/doc/error.n +++ b/doc/error.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: error.n,v 1.12 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: error.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH error n "" Tcl "Tcl Built-In Commands" @@ -63,15 +63,15 @@ of the error in cases where such information is available; see the \fBreturn\fR manual page for information on the proper format for this option's value. .SH EXAMPLE +.PP Generate an error if a basic mathematical operation fails: +.PP .CS if {1+2 != 3} { \fBerror\fR "something is very wrong with addition" } .CE - .SH "SEE ALSO" catch(n), return(n) - .SH KEYWORDS error diff --git a/doc/eval.n b/doc/eval.n index 1f32697..47a8aee 100644 --- a/doc/eval.n +++ b/doc/eval.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: eval.n,v 1.12 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: eval.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH eval n "" Tcl "Tcl Built-In Commands" @@ -72,6 +72,7 @@ proc lprepend {varName args} { .PP However, the last line would now normally be written without \fBeval\fR, like this: +.PP .CS set var [linsert $var 0 {*}$args] .CE diff --git a/doc/exit.n b/doc/exit.n index 9feb3ff..6fdc8eb 100644 --- a/doc/exit.n +++ b/doc/exit.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: exit.n,v 1.9 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: exit.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH exit n "" Tcl "Tcl Built-In Commands" @@ -24,10 +24,12 @@ system as the exit status. If \fIreturnCode\fR is not specified then it defaults to 0. .SH EXAMPLE +.PP Since non-zero exit codes are usually interpreted as error cases by the calling process, the \fBexit\fR command is an important part of signaling that something fatal has gone wrong. This code fragment is useful in scripts to act as a general problem trap: +.PP .CS proc main {} { # ... put the real main code in here ... @@ -45,9 +47,7 @@ if {[catch {main} msg options]} { \fBexit\fR 2 } .CE - .SH "SEE ALSO" exec(n) - .SH KEYWORDS exit, process diff --git a/doc/expr.n b/doc/expr.n index b078873..b3c80cc 100644 --- a/doc/expr.n +++ b/doc/expr.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: expr.n,v 1.36 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: expr.n,v 1.37 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH expr n 8.5 Tcl "Tcl Built-In Commands" @@ -105,6 +105,7 @@ For some examples of simple expressions, suppose the variable the variable \fBb\fR has the value 6. Then the command on the left side of each of the lines below will produce the value on the right side of the line: +.PP .CS .ta 6c \fBexpr\fR 3.1 + $a \fI6.1\fR diff --git a/doc/fconfigure.n b/doc/fconfigure.n index 6df3037..610c898 100644 --- a/doc/fconfigure.n +++ b/doc/fconfigure.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fconfigure.n,v 1.21 2008/10/14 14:02:55 dkf Exp $ +'\" RCS: @(#) $Id: fconfigure.n,v 1.22 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH fconfigure n 8.3 Tcl "Tcl Built-In Commands" @@ -216,14 +216,17 @@ If, for example, a Tcl application is started by the \fBinet\fR super-server common on Unix system its Tcl standard channels will be sockets and thus support the socket options. .SH EXAMPLES +.PP Instruct Tcl to always send output to \fBstdout\fR immediately, whether or not it is to a terminal: +.PP .CS \fBfconfigure\fR stdout -buffering none .CE .PP Open a socket and read lines from it without ever blocking the processing of other events: +.PP .CS set s [socket some.where.com 12345] \fBfconfigure\fR $s -blocking 0 @@ -244,6 +247,7 @@ proc readMe chan { .CE .PP Read a PPM-format image from a file: +.PP .CS # Open the file and put it into Unix ASCII mode set f [open teapot.ppm] diff --git a/doc/fcopy.n b/doc/fcopy.n index 2aa5276..c4eaae2 100644 --- a/doc/fcopy.n +++ b/doc/fcopy.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fcopy.n,v 1.17 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: fcopy.n,v 1.18 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH fcopy n 8.0 Tcl "Tcl Built-In Commands" @@ -92,13 +92,13 @@ the system will assume that the incoming bytes are valid UTF-8 characters and convert them according to the output encoding. The behaviour of the system for bytes which are not valid UTF-8 characters is undefined in this case. - .SH EXAMPLES .PP The first example transfers the contents of one channel exactly to another. Note that when copying one file to another, it is better to use \fBfile copy\fR which also copies file metadata (e.g. the file access permissions) where possible. +.PP .CS fconfigure $in -translation binary fconfigure $out -translation binary @@ -110,6 +110,7 @@ passed the number of bytes transferred. It also uses vwait to put the application into the event loop. Of course, this simplified example could be done without the command callback. +.PP .CS proc Cleanup {in out bytes {error {}}} { global total @@ -127,7 +128,8 @@ vwait total .CE .PP The third example copies in chunks and tests for end of file -in the command callback +in the command callback. +.PP .CS proc CopyMore {in out chunk bytes {error {}}} { global total done @@ -149,9 +151,7 @@ set total 0 -command [list CopyMore $in $out $chunk] vwait done .CE - .SH "SEE ALSO" eof(n), fblocked(n), fconfigure(n), file(n) - .SH KEYWORDS blocking, channel, end of line, end of file, nonblocking, read, translation diff --git a/doc/flush.n b/doc/flush.n index 8ee4870..288b8fc 100644 --- a/doc/flush.n +++ b/doc/flush.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: flush.n,v 1.8 2005/05/10 18:34:00 kennykb Exp $ +'\" RCS: @(#) $Id: flush.n,v 1.9 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH flush n 7.5 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ flush \- Flush buffered output for a channel .SH SYNOPSIS \fBflush \fIchannelId\fR .BE - .SH DESCRIPTION .PP Flushes any output that has been buffered for \fIchannelId\fR. @@ -33,16 +32,16 @@ nonblocking mode, the command may return before all buffered output has been flushed; the remainder will be flushed in the background as fast as the underlying file or device is able to absorb it. .SH EXAMPLE +.PP Prompt for the user to type some information in on the console: +.PP .CS puts -nonewline "Please type your name: " \fBflush\fR stdout gets stdin name puts "Hello there, $name!" .CE - .SH "SEE ALSO" file(n), open(n), socket(n), Tcl_StandardChannels(3) - .SH KEYWORDS blocking, buffer, channel, flush, nonblocking, output diff --git a/doc/for.n b/doc/for.n index 5999683..1931538 100644 --- a/doc/for.n +++ b/doc/for.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: for.n,v 1.9 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: for.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH for n "" Tcl "Tcl Built-In Commands" @@ -50,7 +50,9 @@ expression is evaluated (before each loop iteration), so changes in the variables will be visible. See below for an example: .SH EXAMPLES +.PP Print a line for each of the integers from 0 to 10: +.PP .CS for {set x 0} {$x<10} {incr x} { puts "x is $x" @@ -64,6 +66,7 @@ before the \fBfor\fR command is run and whether its value is a value that is less than or greater than/equal to ten, and this is because the expression will be substituted before the \fBfor\fR command is executed. +.PP .CS for {set x 0} $x<10 {incr x} { puts "x is $x" @@ -71,14 +74,13 @@ for {set x 0} $x<10 {incr x} { .CE .PP Print out the powers of two from 1 to 1024: +.PP .CS for {set x 1} {$x<=1024} {set x [expr {$x * 2}]} { puts "x is $x" } .CE - .SH "SEE ALSO" break, continue, foreach, while - .SH KEYWORDS for, iteration, looping diff --git a/doc/foreach.n b/doc/foreach.n index 949db4c..47488c7 100644 --- a/doc/foreach.n +++ b/doc/foreach.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: foreach.n,v 1.10 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: foreach.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH foreach n "" Tcl "Tcl Built-In Commands" @@ -51,8 +51,10 @@ The \fBbreak\fR and \fBcontinue\fR statements may be invoked inside \fIbody\fR, with the same effect as in the \fBfor\fR command. \fBForeach\fR returns an empty string. .SH EXAMPLES +.PP This loop prints every value in a list together with the square and cube of the value: +.PP .CS '\" Maintainers: notice the tab hacking below! .ta 3i @@ -65,6 +67,7 @@ puts "Value\etSquare\etCube" ;# Neat-looking header .PP The following loop uses i and j as loop variables to iterate over pairs of elements of a single list. +.PP .CS set x {} \fBforeach\fR {i j} {a b c d e f} { @@ -75,6 +78,7 @@ set x {} .CE .PP The next loop uses i and j to iterate over two lists in parallel. +.PP .CS set x {} \fBforeach\fR i {a b c} j {d e f g} { @@ -85,6 +89,7 @@ set x {} .CE .PP The two forms are combined in the following example. +.PP .CS set x {} \fBforeach\fR i {a b c} {j k} {d e f g} { diff --git a/doc/format.n b/doc/format.n index 1b5a44c..dab6b8b 100644 --- a/doc/format.n +++ b/doc/format.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: format.n,v 1.20 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: format.n,v 1.21 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH format n 8.1 Tcl "Tcl Built-In Commands" @@ -204,8 +204,10 @@ which will then be converted to the corresponding character value. The size modifiers are ignored when formatting floating-point values. The \fBll\fR modifier has no \fBsprintf\fR counterpart. .SH EXAMPLES +.PP Convert the numeric value of a UNICODE character to the character itself: +.PP .CS set value 120 set char [\fBformat\fR %c $value] @@ -213,12 +215,14 @@ set char [\fBformat\fR %c $value] .PP Convert the output of \fBtime\fR into seconds to an accuracy of hundredths of a second: +.PP .CS set us [lindex [time $someTclCode] 0] puts [\fBformat\fR "%.2f seconds to execute" [expr {$us / 1e6}]] .CE .PP Create a packed X11 literal color specification: +.PP .CS # Each color-component should be in range (0..255) set color [\fBformat\fR "#%02x%02x%02x" $r $g $b] @@ -227,6 +231,7 @@ set color [\fBformat\fR "#%02x%02x%02x" $r $g $b] Use XPG3 format codes to allow reordering of fields (a technique that is often used in localized message catalogs; see \fBmsgcat\fR) without reordering the data values passed to \fBformat\fR: +.PP .CS set fmt1 "Today, %d shares in %s were bought at $%.2f each" puts [\fBformat\fR $fmt1 123 "Global BigCorp" 19.37] @@ -236,6 +241,7 @@ puts [\fBformat\fR $fmt2 123 "Global BigCorp" 19.37] .CE .PP Print a small table of powers of three: +.PP .CS # Set up the column widths set w1 5 diff --git a/doc/glob.n b/doc/glob.n index e254e6d..101fee5 100644 --- a/doc/glob.n +++ b/doc/glob.n @@ -4,9 +4,9 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" -'\" RCS: @(#) $Id: glob.n,v 1.24 2008/10/15 10:43:37 dkf Exp $ -'\" +'\" +'\" RCS: @(#) $Id: glob.n,v 1.25 2008/10/17 10:22:25 dkf Exp $ +'\" .so man.macros .TH glob n 8.3 Tcl "Tcl Built-In Commands" .BS @@ -16,60 +16,71 @@ glob \- Return names of files that match patterns .SH SYNOPSIS \fBglob \fR?\fIswitches\fR? ?\fIpattern ...\fR? .BE - .SH DESCRIPTION .PP This command performs file name .QW globbing in a fashion similar to -the csh shell. It returns a list of the files whose names match any -of the \fIpattern\fR arguments. No particular order is guaranteed -in the list, so if a sorted list is required the caller should use +the csh shell or bash shell. +It returns a list of the files whose names match any +of the \fIpattern\fR arguments. No particular order is guaranteed +in the list, so if a sorted list is required the caller should use \fBlsort\fR. -.LP +.SS OPTIONS +.PP If the initial arguments to \fBglob\fR start with \fB\-\fR then -they are treated as switches. The following switches are +they are treated as switches. The following switches are currently supported: .TP \fB\-directory\fR \fIdirectory\fR +. Search for files which match the given patterns starting in the given -\fIdirectory\fR. This allows searching of directories whose name +\fIdirectory\fR. This allows searching of directories whose name contains glob-sensitive characters without the need to quote such -characters explicitly. This option may not be used in conjunction with +characters explicitly. This option may not be used in conjunction with \fB\-path\fR, which is used to allow searching for complete file paths whose names may contain glob-sensitive characters. .TP \fB\-join\fR +. The remaining pattern arguments are treated as a single pattern obtained by joining the arguments with directory separators. .TP \fB\-nocomplain\fR -Allows an empty list to be returned without error; without this +. +Allows an empty list to be returned without error; without this switch an error is returned if the result list would be empty. .TP \fB\-path\fR \fIpathPrefix\fR +. Search for files with the given \fIpathPrefix\fR where the rest of the name -matches the given patterns. This allows searching for files with names -similar to a given file (as opposed to a directory) even when the names -contain glob-sensitive -characters. This option may not be used in conjunction with -\fB\-directory\fR. For example, to find all files with the same root name -as $path, but differing extensions, you should use \fBglob --path [file rootname $path] .*\fR which will work even if $path contains +matches the given patterns. This allows searching for files with names +similar to a given file (as opposed to a directory) even when the names +contain glob-sensitive +characters. This option may not be used in conjunction with +\fB\-directory\fR. For example, to find all files with the same root name +as $path, but differing extensions, you should use +.QW "\fBglob \-path [file rootname $path] .*\fR" +which will work even if \fB$path\fR contains numerous glob-sensitive characters. .TP \fB\-tails\fR +. Only return the part of each file found which follows the last directory -named in any \fB\-directory\fR or \fB\-path\fR path specification. -Thus \fBglob -tails -directory $dir *\fR is equivalent to -\fBset pwd [pwd] ; cd $dir ; glob *; cd $pwd\fR. For -\fB\-path\fR specifications, the returned names will include the last -path segment, so \fBglob -tails -path [file rootname ~/foo.tex] .*\fR +named in any \fB\-directory\fR or \fB\-path\fR path specification. +Thus +.QW "\fBglob \-tails \-directory $dir *\fR" +is equivalent to +.QW "\fBset pwd [pwd]; cd $dir; glob *; cd $pwd\fR" . +For \fB\-path\fR specifications, the returned names will include the last +path segment, so +.QW "\fBglob \-tails \-path [file rootname ~/foo.tex] .*\fR" will return paths like \fBfoo.aux foo.bib foo.tex\fR etc. .TP \fB\-types\fR \fItypeList\fR +. Only list files or directories which match \fItypeList\fR, where the items -in the list have two forms. The first form is like the \-type option of +in the list have two forms. The first form is like the \-type option of the Unix find command: \fIb\fR (block special file), \fIc\fR (character special file), @@ -79,31 +90,29 @@ the Unix find command: \fIp\fR (named pipe), or \fIs\fR (socket), where multiple types may be specified in the list. \fBGlob\fR will return all files which match at least one of the types given. -Note that symbolic links will be returned both if \fB\-types l\fR is given, -or if the target of a link matches the requested type. So, a link to +Note that symbolic links will be returned both if \fB\-types l\fR is given, +or if the target of a link matches the requested type. So, a link to a directory will be returned if \fB\-types d\fR was specified. .RS .PP The second form specifies types where all the types given must match. These are \fIr\fR, \fIw\fR, \fIx\fR as file permissions, and -\fIreadonly\fR, \fIhidden\fR as special permission cases. On the +\fIreadonly\fR, \fIhidden\fR as special permission cases. On the Macintosh, MacOS types and creators are also supported, where any item which is four characters long is assumed to be a MacOS type -(e.g. \fBTEXT\fR). Items which are of the form \fI{macintosh type XXXX}\fR +(e.g. \fBTEXT\fR). Items which are of the form \fI{macintosh type XXXX}\fR or \fI{macintosh creator XXXX}\fR will match types or creators -respectively. Unrecognized types, or specifications of multiple MacOS +respectively. Unrecognized types, or specifications of multiple MacOS types/creators will signal an error. .PP The two forms may be mixed, so \fB\-types {d f r w}\fR will find all regular files OR directories that have both read AND write permissions. The following are equivalent: -.RS .PP .CS \fBglob \-type d *\fR \fBglob */\fR .CE -.RE .PP except that the first case doesn't return the trailing .QW / @@ -111,45 +120,53 @@ and is more platform independent. .RE .TP \fB\-\|\-\fR -Marks the end of switches. The argument following this one will +. +Marks the end of switches. The argument following this one will be treated as a \fIpattern\fR even if it starts with a \fB\-\fR. +.SS "GLOBBING PATTERNS" .PP The \fIpattern\fR arguments may contain any of the following -special characters: +special characters, which are a superset of those supported by +\fBstring match\fR: .TP 10 \fB?\fR +. Matches any single character. .TP 10 \fB*\fR +. Matches any sequence of zero or more characters. .TP 10 \fB[\fIchars\fB]\fR -Matches any single character in \fIchars\fR. If \fIchars\fR +. +Matches any single character in \fIchars\fR. If \fIchars\fR contains a sequence of the form \fIa\fB\-\fIb\fR then any character between \fIa\fR and \fIb\fR (inclusive) will match. .TP 10 \fB\e\fIx\fR +. Matches the character \fIx\fR. .TP 10 \fB{\fIa\fB,\fIb\fB,\fI...\fR} -Matches any of the strings \fIa\fR, \fIb\fR, etc. -.LP +. +Matches any of the sub-patterns \fIa\fR, \fIb\fR, etc. +.PP On Unix, as with csh, a -.QW . +.QW . \| at the beginning of a file's name or just after a .QW / must be matched explicitly or with a {} construct, unless the \fB\-types hidden\fR flag is given (since -.QW . -at the beginning of a file's name indicates that it is hidden). On +.QW . \| +at the beginning of a file's name indicates that it is hidden). On other platforms, files beginning with a -.QW . +.QW . \| are handled no differently to any others, except the special directories -.QW . +.QW . \| and -.QW .. +.QW .. \| which must be matched explicitly (this is to avoid a recursive pattern like -.QW "glob -join * * * *" +.QW "glob \-join * * * *" from recursing up the directory hierarchy as well as down). In addition, all .QW / characters must be matched explicitly. @@ -163,50 +180,61 @@ If the is followed immediately by .QW / then the value of the HOME environment variable is used. -.LP +.PP The \fBglob\fR command differs from csh globbing in two ways. First, it does not sort its result list (use the \fBlsort\fR command if you want the list sorted). Second, \fBglob\fR only returns the names of files that actually -exist; in csh no check for existence is made unless a pattern +exist; in csh no check for existence is made unless a pattern contains a ?, *, or [] construct. .LP When the \fBglob\fR command returns relative paths whose filenames start with a tilde .QW ~ -(for example through \fBglob *\fR or \fBglob -tails\fR, the returned +(for example through \fBglob *\fR or \fBglob \-tails\fR, the returned list will not quote the tilde with .QW ./ . This means care must be taken if those names are later to be used with \fBfile join\fR, to avoid them being interpreted as absolute paths pointing to a given user's home directory. -.SH "PORTABILITY ISSUES" +.SH "WINDOWS PORTABILITY ISSUES" .PP -\fBWindows\fR -. For Windows UNC names, the servername and sharename components of the path -may not contain ?, *, or [] constructs. On Windows NT, if \fIpattern\fR is +may not contain ?, *, or [] constructs. On Windows NT, if \fIpattern\fR is of the form .QW \fB~\fIusername\fB@\fIdomain\fR , it refers to the home directory of the user whose account information resides on the specified NT -domain server. Otherwise, user account information is obtained from -the local computer. On Windows 95 and 98, \fBglob\fR accepts patterns +domain server. Otherwise, user account information is obtained from +the local computer. On Windows 95 and 98, \fBglob\fR accepted patterns like .QW .../ and .QW ..../ -for successively higher up parent directories. -.PP -Since the backslash character has a special meaning to the glob -command, glob patterns containing Windows style path separators need -special care. The pattern \fIC:\e\efoo\e\e*\fR is interpreted as -\fIC:\efoo\e*\fR where \fI\ef\fR will match the single character \fIf\fR -and \fI\e*\fR will match the single character \fI*\fR and will not be -interpreted as a wildcard character. One solution to this problem is -to use the Unix style forward slash as a path separator. Windows style -paths can be converted to Unix style paths with the command \fBfile -join $path\fR (or \fBfile normalize $path\fR in Tcl 8.4). +for successively higher up parent directories, but later versions of +Windows do not accept these forms. +.PP +Since the backslash character has a special meaning to the glob +command, glob patterns containing Windows style path separators need +special care. The pattern +.QW \fIC:\e\efoo\e\e*\fR +is interpreted as +.QW \fIC:\efoo\e*\fR +where +.QW \fI\ef\fR +will match the single character +.QW \fIf\fR +and +.QW \fI\e*\fR +will match the single character +.QW \fI*\fR +and will not be +interpreted as a wildcard character. One solution to this problem is +to use the Unix style forward slash as a path separator. Windows style +paths can be converted to Unix style paths with the command +.QW "\fBfile join $path\fR" +or +.QW "\fBfile normalize $path\fR" . .SH EXAMPLES .PP Find all the Tcl files in the current directory: @@ -242,3 +270,6 @@ or the sequence file(n) .SH KEYWORDS exist, file, glob, pattern +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/global.n b/doc/global.n index bcf4391..5ccf587 100644 --- a/doc/global.n +++ b/doc/global.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: global.n,v 1.13 2008/09/25 19:26:36 dgp Exp $ +'\" RCS: @(#) $Id: global.n,v 1.14 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH global n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ global \- Access global variables .SH SYNOPSIS \fBglobal \fR?\fIvarname ...\fR? .BE - .SH DESCRIPTION .PP This command has no effect unless executed in the context of a proc body. @@ -33,7 +32,9 @@ the unqualified name of the global variable, as determined by the array element. An error is returned if the name looks like an array element, such as \fBa(b)\fR. .SH EXAMPLES +.PP This procedure sets the namespace variable \fI::a::x\fR +.PP .CS proc reset {} { \fBglobal\fR a::x @@ -46,15 +47,14 @@ buffer, separated by newlines. It is useful for situations when you want to build a message piece-by-piece (as if with \fBputs\fR) but send that full message in a single piece (e.g. over a connection opened with \fBsocket\fR or as part of a counted HTTP response). +.PP .CS proc accum {string} { \fBglobal\fR accumulator append accumulator $string \en } .CE - .SH "SEE ALSO" namespace(n), upvar(n), variable(n) - .SH KEYWORDS global, namespace, procedure, variable diff --git a/doc/http.n b/doc/http.n index 6cfb7cb..0c533b8 100644 --- a/doc/http.n +++ b/doc/http.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: http.n,v 1.37 2008/07/13 23:15:23 nijtmans Exp $ +'\" RCS: @(#) $Id: http.n,v 1.38 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH "http" n 2.7 http "Tcl Bundled Packages" @@ -78,6 +78,7 @@ applications, the caller can use \fB::http::wait\fR after calling .SH COMMANDS .TP \fB::http::config\fR ?\fIoptions\fR? +. The \fB::http::config\fR command is used to set and query the name of the proxy server and port, and the User-Agent name used in the HTTP requests. If no options are specified, then the current configuration @@ -88,6 +89,7 @@ flags and values that define the configuration: .RS .TP \fB\-accept\fR \fImimetypes\fR +. The Accept header of the request. The default is */*, which means that all types of documents are accepted. Otherwise you can supply a comma-separated list of mime type patterns that you are @@ -95,13 +97,16 @@ willing to receive. For example, .QW "image/gif, image/jpeg, text/*" . .TP \fB\-proxyhost\fR \fIhostname\fR +. The name of the proxy host, if any. If this value is the empty string, the URL host is contacted directly. .TP \fB\-proxyport\fR \fInumber\fR +. The proxy port number. .TP \fB\-proxyfilter\fR \fIcommand\fR +. The command is a callback that is made during \fB::http::geturl\fR to determine if a proxy is required for a given host. One argument, a @@ -113,6 +118,7 @@ an empty list. The default filter returns the values of the non-empty. .TP \fB\-urlencoding\fR \fIencoding\fR +. The \fIencoding\fR used for creating the x-url-encoded URLs with \fB::http::formatQuery\fR. The default is \fButf-8\fR, as specified by RFC 2718. Prior to http 2.5 this was unspecified, and that behavior can be @@ -122,11 +128,13 @@ returned by specifying the empty string (\fB{}\fR), although characters. .TP \fB\-useragent\fR \fIstring\fR +. The value of the User-Agent header in the HTTP request. The default is .QW "\fBTcl http client package 2.7\fR" . .RE .TP \fB::http::geturl\fR \fIurl\fR ?\fIoptions\fR? +. The \fB::http::geturl\fR command is the main procedure in the package. The \fB\-query\fR option causes a POST operation and the \fB\-validate\fR option causes a HEAD operation; @@ -141,21 +149,25 @@ that is invoked when the HTTP transaction completes. .RS .TP \fB\-binary\fR \fIboolean\fR +. Specifies whether to force interpreting the URL data as binary. Normally this is auto-detected (anything not beginning with a \fBtext\fR content type or whose content encoding is \fBgzip\fR or \fBcompress\fR is considered binary data). .TP \fB\-blocksize\fR \fIsize\fR +. The block size used when reading the URL. At most \fIsize\fR bytes are read at once. After each block, a call to the \fB\-progress\fR callback is made (if that option is specified). .TP \fB\-channel\fR \fIname\fR +. Copy the URL contents to channel \fIname\fR instead of saving it in \fBstate(body)\fR. .TP \fB\-command\fR \fIcallback\fR +. Invoke \fIcallback\fR after the HTTP transaction completes. This option causes \fB::http::geturl\fR to return immediately. The \fIcallback\fR gets an additional argument that is the \fItoken\fR returned @@ -163,6 +175,7 @@ from \fB::http::geturl\fR. This token is the name of an array that is described in the \fBSTATE ARRAY\fR section. Here is a template for the callback: .RS +.PP .CS proc httpCallback {token} { upvar #0 $token state @@ -172,6 +185,7 @@ proc httpCallback {token} { .RE .TP \fB\-handler\fR \fIcallback\fR +. Invoke \fIcallback\fR whenever HTTP data is available; if present, nothing else will be done with the HTTP data. This procedure gets two additional arguments: the socket for the HTTP data and the \fItoken\fR returned from @@ -180,6 +194,7 @@ described in the \fBSTATE ARRAY\fR section. The procedure is expected to return the number of bytes read from the socket. Here is a template for the callback: .RS +.PP .CS proc httpHandlerCallback {socket token} { upvar #0 $token state @@ -195,6 +210,7 @@ proc httpHandlerCallback {socket token} { .RE .TP \fB\-headers\fR \fIkeyvaluelist\fR +. This option is used to add extra headers to the HTTP request. The \fIkeyvaluelist\fR argument must be a list with an even number of elements that alternate between keys and values. The keys become @@ -202,24 +218,31 @@ header field names. Newlines are stripped from the values so the header cannot be corrupted. For example, if \fIkeyvaluelist\fR is \fBPragma no-cache\fR then the following header is included in the HTTP request: +.RS +.PP .CS Pragma: no-cache .CE +.RE .TP \fB\-keepalive\fR \fIboolean\fR +. If true, attempt to keep the connection open for servicing multiple requests. Default is 0. .TP \fB\-method\fR \fItype\fR +. Force the HTTP request method to \fItype\fR. \fB::http::geturl\fR will auto-select GET, POST or HEAD based on other options, but this option enables choices like PUT and DELETE for webdav support. .TP \fB\-myaddr\fR \fIaddress\fR +. Pass an specific local address to the underlying \fBsocket\fR call in case multiple interfaces are available. .TP \fB\-progress\fR \fIcallback\fR +. The \fIcallback\fR is made after each transfer of data from the URL. The callback gets three additional arguments: the \fItoken\fR from \fB::http::geturl\fR, the expected total size of the contents from the @@ -228,6 +251,7 @@ transferred so far. The expected total size may be unknown, in which case zero is passed to the callback. Here is a template for the progress callback: .RS +.PP .CS proc httpProgress {token total current} { upvar #0 $token state @@ -236,17 +260,20 @@ proc httpProgress {token total current} { .RE .TP \fB\-protocol\fR \fIversion\fR +. Select the HTTP protocol version to use. This should be 1.0 or 1.1 (the default). Should only be necessary for servers that do not understand or otherwise complain about HTTP/1.1. .TP \fB\-query\fR \fIquery\fR +. This flag causes \fB::http::geturl\fR to do a POST request that passes the \fIquery\fR to the server. The \fIquery\fR must be an x-url-encoding formatted query. The \fB::http::formatQuery\fR procedure can be used to do the formatting. .TP \fB\-queryblocksize\fR \fIsize\fR +. The block size used when posting query data to the URL. At most \fIsize\fR @@ -255,6 +282,7 @@ bytes are written at once. After each block, a call to the callback is made (if that option is specified). .TP \fB\-querychannel\fR \fIchannelID\fR +. This flag causes \fB::http::geturl\fR to do a POST request that passes the data contained in \fIchannelID\fR to the server. The data contained in \fIchannelID\fR must be an x-url-encoding @@ -265,14 +293,17 @@ in order to create that header. If it is unable to determine the size, it returns an error. .TP \fB\-queryprogress\fR \fIcallback\fR +. The \fIcallback\fR is made after each transfer of data to the URL (i.e. POST) and acts exactly like the \fB\-progress\fR option (the callback format is the same). .TP \fB\-strict\fR \fIboolean\fR +. Whether to enforce RFC 3986 URL validation on the request. Default is 1. .TP \fB\-timeout\fR \fImilliseconds\fR +. If \fImilliseconds\fR is non-zero, then \fB::http::geturl\fR sets up a timeout to occur after the specified number of milliseconds. A timeout results in a call to \fB::http::reset\fR and to @@ -281,11 +312,13 @@ The return value of \fB::http::status\fR is \fBtimeout\fR after a timeout has occurred. .TP \fB\-type\fR \fImime-type\fR +. Use \fImime-type\fR as the \fBContent-Type\fR value, instead of the default value (\fBapplication/x-www-form-urlencoded\fR) during a POST operation. .TP \fB\-validate\fR \fIboolean\fR +. If \fIboolean\fR is non-zero, then \fB::http::geturl\fR does an HTTP HEAD request. This request returns meta information about the URL, but the contents are not returned. The meta information is available in the @@ -294,6 +327,7 @@ contents are not returned. The meta information is available in the .RE .TP \fB::http::formatQuery\fR \fIkey value\fR ?\fIkey value\fR ...? +. This procedure does x-url-encoding of query data. It takes an even number of arguments that are the keys and values of the query. It encodes the keys and values, and generates one string that has the @@ -301,10 +335,13 @@ proper & and = separators. The result is suitable for the \fB\-query\fR value passed to \fB::http::geturl\fR. .TP \fB::http::reset\fR \fItoken\fR ?\fIwhy\fR? -This command resets the HTTP transaction identified by \fItoken\fR, if -any. This sets the \fBstate(status)\fR value to \fIwhy\fR, which defaults to \fBreset\fR, and then calls the registered \fB\-command\fR callback. +. +This command resets the HTTP transaction identified by \fItoken\fR, if any. +This sets the \fBstate(status)\fR value to \fIwhy\fR, which defaults to +\fBreset\fR, and then calls the registered \fB\-command\fR callback. .TP \fB::http::wait\fR \fItoken\fR +. This is a convenience procedure that blocks and waits for the transaction to complete. This only works in trusted code because it uses \fBvwait\fR. Also, it is not useful for the case where @@ -314,36 +351,44 @@ until the HTTP transaction is complete, and thus there is nothing to wait for. .TP \fB::http::data\fR \fItoken\fR +. This is a convenience procedure that returns the \fBbody\fR element (i.e., the URL data) of the state array. .TP \fB::http::error\fR \fItoken\fR +. This is a convenience procedure that returns the \fBerror\fR element of the state array. .TP \fB::http::status\fR \fItoken\fR +. This is a convenience procedure that returns the \fBstatus\fR element of the state array. .TP \fB::http::code\fR \fItoken\fR +. This is a convenience procedure that returns the \fBhttp\fR element of the state array. .TP \fB::http::ncode\fR \fItoken\fR +. This is a convenience procedure that returns just the numeric return code (200, 404, etc.) from the \fBhttp\fR element of the state array. .TP \fB::http::size\fR \fItoken\fR +. This is a convenience procedure that returns the \fBcurrentsize\fR element of the state array, which represents the number of bytes received from the URL in the \fB::http::geturl\fR call. .TP \fB::http::meta\fR \fItoken\fR +. This is a convenience procedure that returns the \fBmeta\fR element of the state array which contains the HTTP response headers. See below for an explanation of this element. .TP \fB::http::cleanup\fR \fItoken\fR +. This procedure cleans up the state associated with the connection identified by \fItoken\fR. After this call, the procedures like \fB::http::data\fR cannot be used to get information @@ -354,10 +399,12 @@ so will result in memory not being freed, and if your app calls performance hit...or worse. .TP \fB::http::register\fR \fIproto port command\fR +. This procedure allows one to provide custom HTTP transport types such as HTTPS, by registering a prefix, the default port, and the command to execute to create the Tcl \fBchannel\fR. E.g.: .RS +.PP .CS package require http package require tls @@ -369,6 +416,7 @@ set token [::http::geturl https://my.secure.site/] .RE .TP \fB::http::unregister\fR \fIproto\fR +. This procedure unregisters a protocol handler that was previously registered via \fB::http::register\fR. .SH ERRORS @@ -409,7 +457,8 @@ There are other possible results of the HTTP transaction determined by examining the status from \fB::http::status\fR. These are described below. .TP -ok +\fBok\fR +. If the HTTP transaction completes entirely, then status will be \fBok\fR. However, you should still check the \fB::http::code\fR value to get the HTTP status. The \fB::http::ncode\fR procedure provides just @@ -417,11 +466,13 @@ the numeric error (e.g., 200, 404 or 500) while the \fB::http::code\fR procedure returns a value like .QW "HTTP 404 File not found" . .TP -eof +\fBeof\fR +. If the server closes the socket without replying, then no error is raised, but the status of the transaction will be \fBeof\fR. .TP -error +\fBerror\fR +. The error message will also be stored in the \fBerror\fR status array element, accessible via \fB::http::error\fR. .PP @@ -438,9 +489,11 @@ an \fBeof\fR status. The \fB::http::geturl\fR procedure returns a \fItoken\fR that can be used to get to the state of the HTTP transaction in the form of a Tcl array. Use this construct to create an easy-to-use array variable: +.PP .CS upvar #0 $token state .CE +.PP Once the data associated with the URL is no longer needed, the state array should be unset to free up storage. The \fB::http::cleanup\fR procedure is provided for that purpose. @@ -449,33 +502,41 @@ the array are supported: .RS .TP \fBbody\fR +. The contents of the URL. This will be empty if the \fB\-channel\fR option has been specified. This value is returned by the \fB::http::data\fR command. .TP \fBcharset\fR +. The value of the charset attribute from the \fBContent-Type\fR meta-data value. If none was specified, this defaults to the RFC standard \fBiso8859-1\fR, or the value of \fB$::http::defaultCharset\fR. Incoming text data will be automatically converted from this charset to utf-8. .TP \fBcoding\fR +. A copy of the \fBContent-Encoding\fR meta-data value. .TP \fBcurrentsize\fR +. The current number of bytes fetched from the URL. This value is returned by the \fB::http::size\fR command. .TP \fBerror\fR +. If defined, this is the error string seen when the HTTP transaction was aborted. .TP \fBhttp\fR +. The HTTP status reply from the server. This value is returned by the \fB::http::code\fR command. The format of this value is: .RS +.PP .CS \fIHTTP/1.1 code string\fR .CE +.PP The \fIcode\fR is a three-digit number defined in the HTTP standard. A code of 200 is OK. Codes beginning with 4 or 5 indicate errors. Codes beginning with 3 are redirection errors. In this case the @@ -484,52 +545,66 @@ requested information. .RE .TP \fBmeta\fR +. The HTTP protocol returns meta-data that describes the URL contents. The \fBmeta\fR element of the state array is a list of the keys and values of the meta-data. This is in a format useful for initializing an array that just contains the meta-data: .RS +.PP .CS array set meta $state(meta) .CE +.PP Some of the meta-data keys are listed below, but the HTTP standard defines more, and servers are free to add their own. .TP \fBContent-Type\fR +. The type of the URL contents. Examples include \fBtext/html\fR, \fBimage/gif,\fR \fBapplication/postscript\fR and \fBapplication/x-tcl\fR. .TP \fBContent-Length\fR +. The advertised size of the contents. The actual size obtained by \fB::http::geturl\fR is available as \fBstate(size)\fR. .TP \fBLocation\fR +. An alternate URL that contains the requested data. .RE .TP \fBposterror\fR +. The error, if any, that occurred while writing the post query data to the server. .TP \fBstatus\fR +. Either \fBok\fR, for successful completion, \fBreset\fR for user-reset, \fBtimeout\fR if a timeout occurred before the transaction could complete, or \fBerror\fR for an error condition. During the transaction this value is the empty string. .TP \fBtotalsize\fR +. A copy of the \fBContent-Length\fR meta-data value. .TP \fBtype\fR +. A copy of the \fBContent-Type\fR meta-data value. .TP \fBurl\fR +. The requested URL. .RE .SH EXAMPLE +.PP +This example creates a procedure to copy a URL to a file while printing a +progress meter, and prints the meta-data associated with the URL. +.PP .CS -# Copy a URL to a file and print meta-data proc httpcopy { url file {chunk 4096} } { set out [open $file w] set token [\fB::http::geturl\fR $url -channel $out \e @@ -566,4 +641,7 @@ proc httpCopyProgress {args} { .SH "SEE ALSO" safe(n), socket(n), safesock(n) .SH KEYWORDS -security policy, socket +internet, security policy, socket, www +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/if.n b/doc/if.n index 524f7a6..d80c684 100644 --- a/doc/if.n +++ b/doc/if.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: if.n,v 1.9 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: if.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH if n "" Tcl "Tcl Built-In Commands" @@ -40,12 +40,15 @@ The return value from the command is the result of the body script that was executed, or an empty string if none of the expressions was non-zero and there was no \fIbodyN\fR. .SH EXAMPLES +.PP A simple conditional: +.PP .CS \fBif\fR {$vbl == 1} { puts "vbl is one" } .CE .PP With an \fBelse\fR-clause: +.PP .CS \fBif\fR {$vbl == 1} { puts "vbl is one" @@ -55,6 +58,7 @@ With an \fBelse\fR-clause: .CE .PP With an \fBelseif\fR-clause too: +.PP .CS \fBif\fR {$vbl == 1} { puts "vbl is one" @@ -67,16 +71,17 @@ With an \fBelseif\fR-clause too: .PP Remember, expressions can be multi-line, but in that case it can be a good idea to use the optional \fBthen\fR keyword for clarity: +.PP .CS \fBif\fR { - $vbl == 1 || $vbl == 2 || $vbl == 3 + $vbl == 1 + || $vbl == 2 + || $vbl == 3 } \fBthen\fR { puts "vbl is one, two or three" } .CE - .SH "SEE ALSO" expr(n), for(n), foreach(n) - .SH KEYWORDS boolean, conditional, else, false, if, true diff --git a/doc/incr.n b/doc/incr.n index e7587a6..972f78b 100644 --- a/doc/incr.n +++ b/doc/incr.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: incr.n,v 1.7 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: incr.n,v 1.8 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH incr n "" Tcl "Tcl Built-In Commands" @@ -32,17 +32,20 @@ the value \fIincrement\fR or to the default increment value of \fB1\fR. .SH EXAMPLES .PP Add one to the contents of the variable \fIx\fR: +.PP .CS \fBincr\fR x .CE .PP Add 42 to the contents of the variable \fIx\fR: +.PP .CS \fBincr\fR x 42 .CE .PP Add the contents of the variable \fIy\fR to the contents of the variable \fIx\fR: +.PP .CS \fBincr\fR x $y .CE @@ -50,10 +53,11 @@ variable \fIx\fR: Add nothing at all to the variable \fIx\fR (often useful for checking whether an argument to a procedure is actually integral and generating an error if it is not): +.PP .CS \fBincr\fR x 0 .CE .SH "SEE ALSO" -expr(n) +expr(n), set(n) .SH KEYWORDS add, increment, variable, value diff --git a/doc/info.n b/doc/info.n index 66ec0c4..a5a3eaa 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.30 2008/10/02 23:03:58 andreas_kupries Exp $ +'\" RCS: @(#) $Id: info.n,v 1.31 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -604,6 +604,7 @@ proc printProc {procName} { .PP Every object necessarily knows what its class is; this information is trivially extractable through introspection: +.PP .CS oo::class create c c create o @@ -615,6 +616,7 @@ puts [\fBinfo object class\fR c] .PP The introspection capabilities can be used to discover what class implements a method and get how it is defined. This procedure illustrates how: +.PP .CS proc getDef {obj method} { if {$method in [\fBinfo object methods\fR $obj]} { diff --git a/doc/interp.n b/doc/interp.n index bd7b276..c986519 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: interp.n,v 1.40 2008/06/29 13:50:49 dkf Exp $ +'\" RCS: @(#) $Id: interp.n,v 1.41 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH interp n 8.6 Tcl "Tcl Built-In Commands" @@ -350,9 +350,11 @@ new Tcl command is created in the master interpreter with the same name as the new interpreter. This command may be used to invoke various operations on the interpreter. It has the following general form: +.PP .CS \fIslave command \fR?\fIarg arg ...\fR? .CE +.PP \fISlave\fR is the name of the interpreter, and \fIcommand\fR and the \fIarg\fRs determine the exact behavior of the command. The valid forms of this command are: @@ -811,7 +813,9 @@ performed. The safe interpreter mechanism is based on the Safe-Tcl prototype implemented by Nathaniel Borenstein and Marshall Rose. .SH EXAMPLES +.PP Creating and using an alias for a command in the current interpreter: +.PP .CS \fBinterp alias\fR {} getIndex {} lsearch {alpha beta gamma delta} set idx [getIndex delta] @@ -819,6 +823,7 @@ set idx [getIndex delta] .PP Executing an arbitrary command in a safe interpreter where every invocation of \fBlappend\fR is logged: +.PP .CS set i [\fBinterp create\fR -safe] \fBinterp hide\fR $i lappend @@ -832,6 +837,7 @@ proc loggedLappend {i args} { .PP Setting a resource limit on an interpreter so that an infinite loop terminates. +.PP .CS set i [\fBinterp create\fR] \fBinterp limit\fR $i command -value 1000 diff --git a/doc/join.n b/doc/join.n index 086ed7d..e0583ef 100644 --- a/doc/join.n +++ b/doc/join.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: join.n,v 1.9 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: join.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH join n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ join \- Create a string by joining together list elements .SH SYNOPSIS \fBjoin \fIlist \fR?\fIjoinString\fR? .BE - .SH DESCRIPTION .PP The \fIlist\fR argument must be a valid Tcl list. @@ -25,7 +24,9 @@ formed by joining all of the elements of \fIlist\fR together with \fIjoinString\fR separating each adjacent pair of elements. The \fIjoinString\fR argument defaults to a space character. .SH EXAMPLES +.PP Making a comma-separated list: +.PP .CS set data {1 2 3 4 5} \fBjoin\fR $data ", " @@ -33,14 +34,13 @@ set data {1 2 3 4 5} .CE .PP Using \fBjoin\fR to flatten a list by a single level: +.PP .CS set data {1 {2 3} 4 {5 {6 7} 8}} \fBjoin\fR $data \fB\(-> 1 2 3 4 5 {6 7} 8\fR .CE - .SH "SEE ALSO" list(n), lappend(n), split(n) - .SH KEYWORDS element, join, list, separator diff --git a/doc/lappend.n b/doc/lappend.n index a3c40cf..3a31a57 100644 --- a/doc/lappend.n +++ b/doc/lappend.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lappend.n,v 1.16 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: lappend.n,v 1.17 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lappend n "" Tcl "Tcl Built-In Commands" @@ -17,7 +17,6 @@ lappend \- Append list elements onto a variable .SH SYNOPSIS \fBlappend \fIvarName \fR?\fIvalue value value ...\fR? .BE - .SH DESCRIPTION .PP This command treats the variable given by \fIvarName\fR as a list @@ -34,7 +33,9 @@ is much more efficient than .QW "\fBset a [concat $a [list $b]]\fR" when \fB$a\fR is long. .SH EXAMPLE +.PP Using \fBlappend\fR to build up a list of numbers. +.PP .CS % set var 1 1 @@ -43,10 +44,8 @@ Using \fBlappend\fR to build up a list of numbers. % \fBlappend\fR var 3 4 5 1 2 3 4 5 .CE - .SH "SEE ALSO" list(n), lindex(n), linsert(n), llength(n), lset(n), lsort(n), lrange(n) - .SH KEYWORDS append, element, list, variable diff --git a/doc/lassign.n b/doc/lassign.n index 57bd7b4..f2bfcda 100644 --- a/doc/lassign.n +++ b/doc/lassign.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lassign.n,v 1.6 2008/09/26 19:12:40 dgp Exp $ +'\" RCS: @(#) $Id: lassign.n,v 1.7 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lassign n 8.5 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ lassign \- Assign list elements to variables .SH SYNOPSIS \fBlassign \fIlist \fR?\fIvarName ...\fR? .BE - .SH DESCRIPTION .PP This command treats the value \fIlist\fR as a list and assigns @@ -26,8 +25,10 @@ than list elements, the remaining variables are set to the empty string. If there are more list elements than variables, a list of unassigned elements is returned. .SH EXAMPLES +.PP An illustration of how multiple assignment works, and what happens when there are either too few or too many elements. +.PP .CS lassign {a b c} x y z ;# Empty return puts $x ;# Prints "a" @@ -43,15 +44,19 @@ lassign {f g h i} x y ;# Returns "h i" puts $x ;# Prints "f" puts $y ;# Prints "g" .CE +.PP The \fBlassign\fR command has other uses. It can be used to create the analogue of the .QW shift command in many shell languages like this: +.PP .CS set ::argv [lassign $::argv argumentToReadOff] .CE .SH "SEE ALSO" lindex(n), list(n), lset(n), set(n) - .SH KEYWORDS assign, element, list, multiple, set, variable +'\"Local Variables: +'\"mode: nroff +'\"End: diff --git a/doc/library.n b/doc/library.n index 9a9f47e..98c578c 100644 --- a/doc/library.n +++ b/doc/library.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: library.n,v 1.23 2008/08/27 12:47:26 dkf Exp $ +'\" RCS: @(#) $Id: library.n,v 1.24 2008/10/17 10:22:25 dkf Exp $ .so man.macros .TH library n "8.0" Tcl "Tcl Built-In Commands" .BS @@ -45,9 +45,11 @@ For example, the location of the Tk library is kept in the variable To access the procedures in the Tcl library, an application should source the file \fBinit.tcl\fR in the library, for example with the Tcl command +.PP .CS \fBsource [file join [info library] init.tcl]\fR .CE +.PP If the library procedure \fBTcl_Init\fR is invoked from an application's \fBTcl_AppInit\fR procedure, this happens automatically. The code in \fBinit.tcl\fR will define the \fBunknown\fR procedure @@ -106,6 +108,7 @@ cached index information may be deleted with the command reload the index database from disk. .TP \fBauto_mkindex \fIdir pattern pattern ...\fR +. Generates an index suitable for use by \fBauto_load\fR. The command searches \fIdir\fR for all files whose names match any of the \fIpattern\fR arguments (matching is done with the \fBglob\fR @@ -114,10 +117,11 @@ in all the matching files, and stores the index information in a file named \fBtclIndex\fR in \fIdir\fR. If no pattern is given a pattern of \fB*.tcl\fR will be assumed. For example, the command .RS +.PP .CS \fBauto_mkindex foo *.tcl\fR .CE -.LP +.PP will read all the \fB.tcl\fR files in subdirectory \fBfoo\fR and generate a new index file \fBfoo/tclIndex\fR. .PP @@ -143,6 +147,7 @@ code or procedure names with special characters like \fB$\fR, .RE .TP \fBauto_reset\fR +. Destroys all the information cached by \fBauto_execok\fR and \fBauto_load\fR. This information will be re-read from disk the next time it is needed. \fBAuto_reset\fR also deletes any procedures @@ -297,3 +302,6 @@ Unix, words are comprised of numbers, letters or underscores. info(n), re_syntax(n), tclvars(n) .SH KEYWORDS auto-exec, auto-load, library, unknown, word, whitespace +'\"Local Variables: +'\"mode: nroff +'\"End: diff --git a/doc/lindex.n b/doc/lindex.n index 3214cc7..4eac53a 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lindex.n,v 1.20 2008/07/13 23:15:23 nijtmans Exp $ +'\" RCS: @(#) $Id: lindex.n,v 1.21 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lindex n 8.4 Tcl "Tcl Built-In Commands" @@ -26,13 +26,17 @@ command line, or grouped in a Tcl list and presented as a single argument. .PP If no indices are presented, the command takes the form: +.PP .CS lindex list .CE +.PP or +.PP .CS lindex list {} .CE +.PP In this case, the return value of \fBlindex\fR is simply the value of the \fIlist\fR parameter. .PP @@ -53,14 +57,19 @@ arithmetic and indices relative to the end of the list. If additional \fIindex\fR arguments are supplied, then each argument is used in turn to select an element from the previous indexing operation, allowing the script to select elements from sublists. The command, +.PP .CS lindex $a 1 2 3 .CE +.PP or +.PP .CS lindex $a {1 2 3} .CE +.PP is synonymous with +.PP .CS lindex [lindex [lindex $a 1] 2] 3 .CE @@ -113,3 +122,6 @@ lset(n), lsort(n), lrange(n), lreplace(n), string(n) .SH KEYWORDS element, index, list +'\"Local Variables: +'\"mode: nroff +'\"End: diff --git a/doc/linsert.n b/doc/linsert.n index c552a54..22ad6ae 100644 --- a/doc/linsert.n +++ b/doc/linsert.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: linsert.n,v 1.16 2008/09/29 15:38:32 dgp Exp $ +'\" RCS: @(#) $Id: linsert.n,v 1.17 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH linsert n 8.2 Tcl "Tcl Built-In Commands" @@ -31,6 +31,7 @@ arithmetic and indices relative to the end of the list. .PP Putting some values into a list, first indexing from the start and then indexing from the end, and then chaining them together: +.PP .CS set oldList {the fox jumps over the dog} set midList [\fBlinsert\fR $oldList 1 quick] diff --git a/doc/list.n b/doc/list.n index 87cdcd6..6ec1b7c 100644 --- a/doc/list.n +++ b/doc/list.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: list.n,v 1.12 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: list.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH list n "" Tcl "Tcl Built-In Commands" @@ -31,14 +31,19 @@ the list, while \fBlist\fR works directly from the original arguments. .SH EXAMPLE .PP The command +.PP .CS \fBlist\fR a b "c d e " " f {g h}" .CE +.PP will return +.PP .CS \fBa b {c d e } { f {g h}}\fR .CE +.PP while \fBconcat\fR with the same arguments will return +.PP .CS \fBa b c d e f {g h}\fR .CE @@ -48,3 +53,6 @@ lrepeat(n), lreplace(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS element, list +'\"Local Variables: +'\"mode: nroff +'\"End: diff --git a/doc/llength.n b/doc/llength.n index 282bd8b..e050ed9 100644 --- a/doc/llength.n +++ b/doc/llength.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: llength.n,v 1.14 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: llength.n,v 1.15 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH llength n "" Tcl "Tcl Built-In Commands" @@ -17,14 +17,14 @@ llength \- Count the number of elements in a list .SH SYNOPSIS \fBllength \fIlist\fR .BE - .SH DESCRIPTION .PP Treats \fIlist\fR as a list and returns a decimal string giving the number of elements in it. - .SH EXAMPLES +.PP The result is the number of elements: +.PP .CS % \fBllength\fR {a b c d e} 5 @@ -36,6 +36,7 @@ The result is the number of elements: .PP Elements are not guaranteed to be exactly words in a dictionary sense of course, especially when quoting is used: +.PP .CS % \fBllength\fR {a b {c d} e} 4 @@ -44,14 +45,13 @@ of course, especially when quoting is used: .CE .PP An empty list is not necessarily an empty string: +.PP .CS % set var { }; puts "[string length $var],[\fBllength\fR $var]" 1,0 .CE - .SH "SEE ALSO" list(n), lappend(n), lindex(n), linsert(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n) - .SH KEYWORDS element, list, length diff --git a/doc/load.n b/doc/load.n index 4982c96..08adefb 100644 --- a/doc/load.n +++ b/doc/load.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: load.n,v 1.23 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: load.n,v 1.24 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH load n 7.5 Tcl "Tcl Built-In Commands" @@ -57,10 +57,12 @@ by the package that is safe for use by untrusted code. For more information on Safe\-Tcl, see the \fBsafe\fR manual entry. .PP The initialization procedure must match the following prototype: +.PP .CS typedef int \fBTcl_PackageInitProc\fR( Tcl_Interp *\fIinterp\fR); .CE +.PP The \fIinterp\fR argument identifies the interpreter in which the package is to be loaded. The initialization procedure must return \fBTCL_OK\fR or \fBTCL_ERROR\fR to indicate whether or not it completed @@ -119,6 +121,7 @@ When loading a DLL in the current directory, Windows will ignore .QW ./ as a path specifier and use a search heuristic to find the DLL instead. To avoid this, load the DLL with: +.PP .CS \fBload\fR [file join [pwd] mylib.DLL] .CE @@ -172,3 +175,6 @@ foo info sharedlibextension, Tcl_StaticPackage(3), safe(n) .SH KEYWORDS binary code, loading, safe interpreter, shared library +'\"Local Variables: +'\"mode: nroff +'\"End: diff --git a/doc/lrange.n b/doc/lrange.n index 830d7fa..bf67022 100644 --- a/doc/lrange.n +++ b/doc/lrange.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lrange.n,v 1.18 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: lrange.n,v 1.19 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lrange n 7.4 Tcl "Tcl Built-In Commands" @@ -39,19 +39,23 @@ does not always produce the same result as braces); it does, however, produce exactly the same results as .QW "\fBlist [lindex \fIlist first\fB]\fR" .SH EXAMPLES +.PP Selecting the first two elements: +.PP .CS % \fBlrange\fR {a b c d e} 0 1 a b .CE .PP Selecting the last three elements: +.PP .CS % \fBlrange\fR {a b c d e} end-2 end c d e .CE .PP Selecting everything except the first and last element: +.PP .CS % \fBlrange\fR {a b c d e} 1 end-1 b c d @@ -59,6 +63,7 @@ b c d .PP Selecting a single element with \fBlrange\fR is not the same as doing so with \fBlindex\fR: +.PP .CS % set var {some {elements to} select} some {elements to} select diff --git a/doc/lreplace.n b/doc/lreplace.n index 605e46f..5509367 100644 --- a/doc/lreplace.n +++ b/doc/lreplace.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lreplace.n,v 1.20 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: lreplace.n,v 1.21 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lreplace n 7.4 Tcl "Tcl Built-In Commands" @@ -49,18 +49,21 @@ is empty, any \fIelement\fR arguments are added to the end of the list. .SH EXAMPLES .PP Replacing an element of a list with another: +.PP .CS % \fBlreplace\fR {a b c d e} 1 1 foo a foo c d e .CE .PP Replacing two elements of a list with three: +.PP .CS % \fBlreplace\fR {a b c d e} 1 2 three more elements a three more elements d e .CE .PP Deleting the last element from a list in a variable: +.PP .CS % set var {a b c d e} a b c d e @@ -69,6 +72,7 @@ a b c d .CE .PP A procedure to delete a given element from a list: +.PP .CS proc lremove {listVariable value} { upvar 1 $listVariable var diff --git a/doc/lsearch.n b/doc/lsearch.n index cd4363d..1caf479 100644 --- a/doc/lsearch.n +++ b/doc/lsearch.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsearch.n,v 1.36 2008/09/29 12:25:22 dkf Exp $ +'\" RCS: @(#) $Id: lsearch.n,v 1.37 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lsearch n 8.6 Tcl "Tcl Built-In Commands" @@ -167,6 +167,7 @@ overall list to the term found. This option has no effect unless the .SH EXAMPLES .PP Basic searching: +.PP .CS \fBlsearch\fR {a b c d e} c \fI\(-> 2\fR @@ -175,6 +176,7 @@ Basic searching: .CE .PP Using \fBlsearch\fR to filter lists: +.PP .CS \fBlsearch\fR -inline {a20 b35 c47} b* \fI\(-> b35\fR @@ -189,18 +191,21 @@ Using \fBlsearch\fR to filter lists: This can even do a .QW set-like removal operation: +.PP .CS \fBlsearch\fR -all -inline -not -exact {a b c a d e a f g a} a \fI\(-> b c d e f g\fR .CE .PP Searching may start part-way through the list: +.PP .CS \fBlsearch\fR -start 3 {a b c a b c} c \fI\(-> 5\fR .CE .PP It is also possible to search inside elements: +.PP .CS \fBlsearch\fR -index 1 -all -inline {{a abc} {b bcd} {c cde}} *bc* \fI\(-> {a abc} {b bcd}\fR diff --git a/doc/lset.n b/doc/lset.n index e6966aa..74d47e6 100755 --- a/doc/lset.n +++ b/doc/lset.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lset.n,v 1.18 2008/10/06 04:25:24 kennykb Exp $ +'\" RCS: @(#) $Id: lset.n,v 1.19 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lset n 8.4 Tcl "Tcl Built-In Commands" @@ -26,13 +26,17 @@ Tcl list and presented as a single argument. Finally, it accepts a new value for an element of \fIvarName\fR. .PP If no indices are presented, the command takes the form: +.PP .CS lset varName newValue .CE +.PP or +.PP .CS lset varName {} newValue .CE +.PP In this case, \fInewValue\fR replaces the old value of the variable \fIvarName\fR. .PP @@ -64,13 +68,17 @@ used in turn to address an element within a sublist designated by the previous indexing operation, allowing the script to alter elements in sublists (or append elements to sublists). The command, +.PP .CS lset a 1 2 newValue .CE +.PP or +.PP .CS lset a {1 2} newValue .CE +.PP replaces element 2 of sublist 1 with \fInewValue\fR. .PP The integer appearing in each \fIindex\fR argument must be greater @@ -82,13 +90,16 @@ end). If an index is outside the permitted range, an error is reported. .SH EXAMPLES .PP In each of these examples, the initial value of \fIx\fR is: +.PP .CS set x [list [list a b c] [list d e f] [list g h i]] \fI\(-> {a b c} {d e f} {g h i}\fR .CE +.PP The indicated return value also becomes the new value of \fIx\fR (except in the last case, which is an error which leaves the value of \fIx\fR unchanged.) +.PP .CS \fBlset\fR x {j k l} \fI\(-> j k l\fR @@ -109,13 +120,17 @@ The indicated return value also becomes the new value of \fIx\fR \fBlset\fR x {2 3} j \fI\(-> list index out of range\fR .CE +.PP In the following examples, the initial value of \fIx\fR is: +.PP .CS set x [list [list [list a b] [list c d]] \e [list [list e f] [list g h]]] \fI\(-> {{a b} {c d}} {{e f} {g h}}\fR .CE +.PP The indicated return value also becomes the new value of \fIx\fR. +.PP .CS \fBlset\fR x 1 1 0 j \fI\(-> {{a b} {c d}} {{e f} {j h}}\fR @@ -128,3 +143,6 @@ lsort(n), lrange(n), lreplace(n), string(n) .SH KEYWORDS element, index, list, replace, set +'\"Local Variables: +'\"mode: nroff +'\"End: diff --git a/doc/lsort.n b/doc/lsort.n index 6253a5e..f83ace5 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsort.n,v 1.31 2008/09/29 13:33:18 dkf Exp $ +'\" RCS: @(#) $Id: lsort.n,v 1.32 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH lsort n 8.5 Tcl "Tcl Built-In Commands" @@ -88,11 +88,14 @@ element and the \fIindexList\fR were passed to \fBlindex\fR) and sort based on the given element. For example, .RS +.PP .CS lsort -integer -index 1 \e {{First 24} {Second 18} {Third 30}} .CE -returns \fB{Second 18} {First 24} {Third 30}\fR, and +.PP +returns \fB{Second 18} {First 24} {Third 30}\fR, +.PP '\" '\" This example is from the test suite! '\" @@ -100,8 +103,10 @@ returns \fB{Second 18} {First 24} {Third 30}\fR, and lsort -index end-1 \e {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}} .CE +.PP returns \fB{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}\fR, and +.PP .CS lsort -index {0 1} { {{b i g} 12345} @@ -109,6 +114,7 @@ lsort -index {0 1} { {{c o d e} 54321} } .CE +.PP returns \fB{{d e m o} 34512} {{b i g} 12345} {{c o d e} 54321}\fR (because \fBe\fR sorts before \fBi\fR which sorts before \fBo\fR.) This option is much more efficient than using \fB\-command\fR @@ -129,15 +135,19 @@ The list length must be an integer multiple of \fIstrideLength\fR, which in turn must be at least 2. .PP For example, +.PP .CS lsort \-stride 2 {carrot 10 apple 50 banana 25} .CE +.PP returns .QW "apple 50 banana 25 carrot 10" , and +.PP .CS lsort \-stride 2 \-index 1 \-integer {carrot 10 apple 50 banana 25} .CE +.PP returns .QW "carrot 10 banana 25 apple 50" . .RE @@ -169,18 +179,21 @@ option. .SH "EXAMPLES" .PP Sorting a list using ASCII sorting: +.PP .CS % \fBlsort\fR {a10 B2 b1 a1 a2} B2 a1 a10 a2 b1 .CE .PP Sorting a list using Dictionary sorting: +.PP .CS % \fBlsort\fR -dictionary {a10 B2 b1 a1 a2} a1 a2 a10 b1 B2 .CE .PP Sorting lists of integers: +.PP .CS % \fBlsort\fR -integer {5 3 1 2 11 4} 1 2 3 4 5 11 @@ -189,6 +202,7 @@ Sorting lists of integers: .CE .PP Sorting lists of floating-point numbers: +.PP .CS % \fBlsort\fR -real {5 3 1 2 11 4} 1 2 3 4 5 11 @@ -197,6 +211,7 @@ Sorting lists of floating-point numbers: .CE .PP Sorting using indices: +.PP .CS % # Note the space character before the c % \fBlsort\fR {{a 5} { c 3} {b 4} {e 1} {d 2}} @@ -209,6 +224,7 @@ Sorting using indices: .PP .VS 8.6 Sorting a dictionary: +.PP .CS % set d [dict create c d a b h i f g c e] c e a b h i f g @@ -217,6 +233,7 @@ a b c e f g h i .CE .PP Sorting using striding and multiple indices: +.PP .CS % # Note the first index value is relative to the group % \fBlsort\fR \-stride 3 \-index {0 1} \e @@ -226,12 +243,14 @@ Sorting using striding and multiple indices: .VE 8.6 .PP Stripping duplicate values using sorting: +.PP .CS % \fBlsort\fR -unique {a b c a b c a b c} a b c .CE .PP More complex sorting using a comparison function: +.PP .CS % proc compare {a b} { set a0 [lindex $a 0] diff --git a/doc/mathop.n b/doc/mathop.n index 9210430..ac3212d 100644 --- a/doc/mathop.n +++ b/doc/mathop.n @@ -4,7 +4,7 @@ .\" See the file "license.terms" for information on usage and redistribution .\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. .\" -.\" RCS: @(#) $Id: mathop.n,v 1.11 2008/09/23 13:22:18 dkf Exp $ +.\" RCS: @(#) $Id: mathop.n,v 1.12 2008/10/17 10:22:25 dkf Exp $ .\" .so man.macros .TH mathop n 8.5 Tcl "Tcl Mathematical Operator Commands" @@ -133,6 +133,7 @@ Each \fInumber\fR must have an integral value. Note that Tcl defines this operation exactly even for negative numbers, so that the following equality holds true: .RS +.PP .CS (\fIx \fB/ \fIy\fR) \fB* \fIy \fB== \fIx \fB-\fR (\fIx \fB% \fIy\fR) .CE @@ -272,9 +273,11 @@ Returns whether the value \fIarg\fR is present in the list \fIlist\fR Returns whether the value \fIarg\fR is not present in the list \fIlist\fR (according to exact string comparison of elements). .SH EXAMPLES +.PP The simplest way to use the operators is often by using \fBnamespace path\fR to make the commands available. This has the advantage of not affecting the set of commands defined by the current namespace. +.PP .CS namespace path {\fB::tcl::mathop\fR ::tcl::mathfunc} diff --git a/doc/memory.n b/doc/memory.n index 7e49882..0bc1b64 100644 --- a/doc/memory.n +++ b/doc/memory.n @@ -3,7 +3,7 @@ '\" Copyright (c) 2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: memory.n,v 1.12 2008/01/18 15:51:08 dkf Exp $ +'\" RCS: @(#) $Id: memory.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH memory n 8.1 Tcl "Tcl Built-In Commands" @@ -69,9 +69,11 @@ to \fBckalloc\fR causes a line of trace information to be written to address returned, the amount of memory allocated, and the C filename and line number of the code performing the allocation. For example: .RS +.PP .CS ckalloc 40e478 98 tclProc.c 1406 .CE +.PP Calls to \fBckfree\fR are traced in the same manner. .RE .TP @@ -103,3 +105,6 @@ occur long after the overwrite occurred. ckalloc, ckfree, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory, TCL_MEM_DEBUG .SH KEYWORDS memory, debug +'\"Local Variables: +'\"mode: nroff +'\"End: diff --git a/doc/msgcat.n b/doc/msgcat.n index 4ed83eb..a212b2f 100644 --- a/doc/msgcat.n +++ b/doc/msgcat.n @@ -165,14 +165,18 @@ according to the user's environment. The variables \fBenv(LC_ALL)\fR, \fBenv(LC_MESSAGES)\fR, and \fBenv(LANG)\fR are examined in order. The first of them to have a non-empty value is used to determine the initial locale. The value is parsed according to the XPG4 pattern +.PP .CS language[_country][.codeset][@modifier] .CE +.PP to extract its parts. The initial locale is then set by calling \fB::msgcat::mclocale\fR with the argument +.PP .CS language[_country][_modifier] .CE +.PP On Windows, if none of those environment variables is set, msgcat will attempt to extract locale information from the registry. If all these attempts to discover an initial locale @@ -204,6 +208,7 @@ source string to be shorter and less prone to typographical error. .PP For example, executing the code +.PP .CS \fB::msgcat::mcset\fR en hello "hello from ::" namespace eval foo { @@ -212,7 +217,9 @@ namespace eval foo { puts [\fB::msgcat::mc\fR hello] namespace eval foo {puts [\fB::msgcat::mc\fR hello]} .CE +.PP will print +.PP .CS hello from :: hello from ::foo @@ -228,6 +235,7 @@ messages from their parent namespace. For example, executing (in the .QW en locale) the code +.PP .CS \fB::msgcat::mcset\fR en m1 ":: message1" \fB::msgcat::mcset\fR en m2 ":: message2" @@ -244,7 +252,9 @@ puts "[\fBmc\fR m1]; [\fBmc\fR m2]; [\fBmc\fR m3]" namespace eval ::foo {puts "[\fBmc\fR m1]; [\fBmc\fR m2]; [\fBmc\fR m3]"} namespace eval ::foo::bar {puts "[\fBmc\fR m1]; [\fBmc\fR m2]; [\fBmc\fR m3]"} .CE +.PP will print +.PP .CS :: message1; :: message2; :: message3 :: message1; ::foo message2; ::foo message3 @@ -260,10 +270,12 @@ All message files for a package are in the same directory. The message file name is a msgcat locale specifier (all lowercase) followed by .QW .msg . For example: +.PP .CS es.msg \(em spanish en_gb.msg \(em United Kingdom English .CE +.PP \fIException:\fR The message file for the root locale .MT is called @@ -278,6 +290,7 @@ The file contains a series of calls to \fBmcset\fR and for the language, likely enclosed in a \fBnamespace eval\fR so that all source strings are tied to the namespace of the package. For example, a short \fBes.msg\fR might contain: +.PP .CS namespace eval ::mypackage { \fB::msgcat::mcset\fR es "Free Beer!" "Cerveza Gracias!" @@ -294,8 +307,8 @@ During package installation, create a subdirectory .IP [2] Copy your *.msg files into that directory. .IP [3] - Add the following command to your package -initialization script: +Add the following command to your package initialization script: +.PP .CS # load language files, stored in msgs subdirectory \fB::msgcat::mcload\fR [file join [file dirname [info script]] msgs] @@ -307,6 +320,7 @@ to \fBformat\fR might have positionally dependent parameters that might need to be repositioned. For example, it might be syntactically desirable to rearrange the sentence structure while translating. +.PP .CS format "We produced %d units in location %s" $num $city format "In location %s we produced %d units" $city $num @@ -314,6 +328,7 @@ format "In location %s we produced %d units" $city $num .PP This can be handled by using the positional parameters: +.PP .CS format "We produced %1\e$d units in location %2\e$s" $num $city format "In location %2\e$s we produced %1\e$d units" $num $city @@ -328,3 +343,6 @@ The message catalog code was developed by Mark Harrison. format(n), scan(n), namespace(n), package(n) .SH KEYWORDS internationalization, i18n, localization, l10n, message, text, translation +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/my.n b/doc/my.n index 75d7bac..fed03d6 100644 --- a/doc/my.n +++ b/doc/my.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: my.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" RCS: @(#) $Id: my.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH my n 0.1 TclOO "TclOO Commands" @@ -19,8 +19,8 @@ package require TclOO \fBmy\fI methodName\fR ?\fIarg ...\fR? .fi .BE - .SH DESCRIPTION +.PP The \fBmy\fR command is used to allow methods of objects to invoke any method of the object (or its class). In particular, the set of valid values for \fImethodName\fR is the set of all methods supported by an object and its @@ -31,8 +31,10 @@ method is invoked is always the one that is the current context of the method .PP Each object has its own \fBmy\fR command, contained in its unique namespace. .SH EXAMPLES +.PP This example shows basic use of \fBmy\fR to use the \fBvariables\fR method of the \fBoo::object\fR class, which is not publically visible by default: +.PP .CS oo::class create c { method count {} { diff --git a/doc/namespace.n b/doc/namespace.n index faee9c8..dfd0467 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.34 2008/09/28 22:17:39 dkf Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.35 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -216,10 +216,13 @@ as proper list elements. .CS \fBnamespace inscope ::foo $script $x $y $z\fR .CE +.PP is equivalent to +.PP .CS \fBnamespace eval ::foo [concat $script [list $x $y $z]]\fR .CE +.PP thus additional arguments will not undergo a second round of substitution, as is the case with \fBnamespace eval\fR. .RE @@ -326,6 +329,7 @@ which we refer to as the \fIglobal namespace\fR. The global namespace holds all global variables and commands. The \fBnamespace eval\fR command lets you create new namespaces. For example, +.PP .CS \fBnamespace eval\fR Counter { \fBnamespace export\fR bump @@ -337,6 +341,7 @@ For example, } } .CE +.PP creates a new namespace containing the variable \fBnum\fR and the procedure \fBbump\fR. The commands and variables in this namespace are separate from @@ -356,6 +361,7 @@ so you can build up the contents of a namespace over time using a series of \fBnamespace eval\fR commands. For example, the following series of commands has the same effect as the namespace definition shown above: +.PP .CS \fBnamespace eval\fR Counter { variable num 0 @@ -373,6 +379,7 @@ as the namespace definition shown above: rename test "" } .CE +.PP Note that the \fBtest\fR procedure is added to the \fBCounter\fR namespace, and later removed via the \fBrename\fR command. .PP @@ -404,19 +411,24 @@ you must use some extra syntax. Names must be qualified by the namespace that contains them. From the global namespace, we might access the \fBCounter\fR procedures like this: +.PP .CS Counter::bump 5 Counter::Reset .CE +.PP We could access the current count like this: +.PP .CS puts "count = $Counter::num" .CE +.PP When one namespace contains another, you may need more than one qualifier to reach its elements. If we had a namespace \fBFoo\fR that contained the namespace \fBCounter\fR, you could invoke its \fBbump\fR procedure from the global namespace like this: +.PP .CS Foo::Counter::bump 3 .CE @@ -424,10 +436,13 @@ Foo::Counter::bump 3 You can also use qualified names when you create and rename commands. For example, you could add a procedure to the \fBFoo\fR namespace like this: +.PP .CS proc Foo::Test {args} {return $args} .CE +.PP And you could move the same procedure to another namespace like this: +.PP .CS rename Foo::Test Bar::Test .CE @@ -467,18 +482,21 @@ Namespace names, on the other hand, are always resolved by looking in only the current namespace. .PP In the following example, +.PP .CS set traceLevel 0 \fBnamespace eval\fR Debug { printTrace $traceLevel } .CE +.PP Tcl looks for \fBtraceLevel\fR in the namespace \fBDebug\fR and then in the global namespace. It looks up the command \fBprintTrace\fR in the same way. If a variable or command name is not found in either context, the name is undefined. To make this point absolutely clear, consider the following example: +.PP .CS set traceLevel 0 \fBnamespace eval\fR Foo { @@ -489,6 +507,7 @@ set traceLevel 0 } } .CE +.PP Here Tcl looks for \fBtraceLevel\fR first in the namespace \fBFoo::Debug\fR. Since it is not found there, Tcl then looks for it in the global namespace. @@ -498,14 +517,18 @@ during the name resolution process. You can use the \fBnamespace which\fR command to clear up any question about name resolution. For example, the command: +.PP .CS \fBnamespace eval\fR Foo::Debug {\fBnamespace which\fR \-variable traceLevel} .CE +.PP returns \fB::traceLevel\fR. On the other hand, the command, +.PP .CS \fBnamespace eval\fR Foo {\fBnamespace which\fR \-variable traceLevel} .CE +.PP returns \fB::Foo::traceLevel\fR. .PP As mentioned above, @@ -543,23 +566,29 @@ that it is a nuisance to type their qualified names. For example, suppose that all of the commands in a package like BLT are contained in a namespace called \fBBlt\fR. Then you might access these commands like this: +.PP .CS Blt::graph .g \-background red Blt::table . .g 0,0 .CE +.PP If you use the \fBgraph\fR and \fBtable\fR commands frequently, you may want to access them without the \fBBlt::\fR prefix. You can do this by importing the commands into the current namespace, like this: +.PP .CS \fBnamespace import\fR Blt::* .CE +.PP This adds all exported commands from the \fBBlt\fR namespace into the current namespace context, so you can write code like this: +.PP .CS graph .g \-background red table . .g 0,0 .CE +.PP The \fBnamespace import\fR command only imports commands from a namespace that that namespace exported with a \fBnamespace export\fR command. @@ -568,9 +597,11 @@ Importing \fIevery\fR command from a namespace is generally a bad idea since you do not know what you will get. It is better to import just the specific commands you need. For example, the command +.PP .CS \fBnamespace import\fR Blt::graph Blt::table .CE +.PP imports only the \fBgraph\fR and \fBtable\fR commands into the current context. .PP @@ -581,26 +612,33 @@ you may want to get around this restriction. You may want to reissue the \fBnamespace import\fR command to pick up new commands that have appeared in a namespace. In that case, you can use the \fB\-force\fR option, and existing commands will be silently overwritten: +.PP .CS \fBnamespace import\fR \-force Blt::graph Blt::table .CE +.PP If for some reason, you want to stop using the imported commands, you can remove them with a \fBnamespace forget\fR command, like this: +.PP .CS \fBnamespace forget\fR Blt::* .CE +.PP This searches the current namespace for any commands imported from \fBBlt\fR. If it finds any, it removes them. Otherwise, it does nothing. After this, the \fBBlt\fR commands must be accessed with the \fBBlt::\fR prefix. .PP When you delete a command from the exporting namespace like this: +.PP .CS rename Blt::graph "" .CE +.PP the command is automatically removed from all namespaces that import it. .SH "EXPORTING COMMANDS" You can export commands from a namespace like this: +.PP .CS \fBnamespace eval\fR Counter { \fBnamespace export\fR bump reset @@ -626,12 +664,15 @@ You can export commands from a namespace like this: } } .CE +.PP The procedures \fBbump\fR and \fBreset\fR are exported, so they are included when you import from the \fBCounter\fR namespace, like this: +.PP .CS \fBnamespace import\fR Counter::* .CE +.PP However, the \fBCheck\fR procedure is not exported, so it is ignored by the import operation. .PP @@ -648,6 +689,7 @@ was created. It is used most often to create event handlers, Tk bindings, and traces for evaluation in the global context. For instance, the following code indicates how to direct a variable trace callback into the current namespace: +.PP .CS \fBnamespace eval\fR a { variable b @@ -660,7 +702,9 @@ namespace: } set a::b c .CE +.PP When executed, it prints the message: +.PP .CS the value of a::b has changed to c .CE @@ -837,6 +881,7 @@ reparsing. It is also an error for an \fB\-unknown\fR handler to delete its namespace. .SH EXAMPLES Create a namespace containing a variable and an exported command: +.PP .CS \fBnamespace eval\fR foo { variable bar 0 @@ -849,6 +894,7 @@ Create a namespace containing a variable and an exported command: .CE .PP Call the command defined in the previous example in various ways. +.PP .CS # Direct call ::foo::grill @@ -874,11 +920,13 @@ foobar grill .CE .PP Look up where the command imported in the previous example came from: +.PP .CS puts "grill came from [\fBnamespace origin\fR grill]" .CE .PP Remove all imported commands from the current namespace: +.PP .CS namespace forget {*}[namespace import] .CE @@ -887,6 +935,7 @@ namespace forget {*}[namespace import] Create an ensemble for simple working with numbers, using the \fB\-parameters\fR option to allow the operator to be put between the first and second arguments. +.PP .CS \fBnamespace eval\fR do { \fBnamespace export\fR * diff --git a/doc/next.n b/doc/next.n index 898b79b..1240c1b 100644 --- a/doc/next.n +++ b/doc/next.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: next.n,v 1.2 2008/06/19 21:29:03 dkf Exp $ +'\" RCS: @(#) $Id: next.n,v 1.3 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH next n 0.1 TclOO "TclOO Commands" @@ -94,6 +94,7 @@ invoking either constructors or destructors. .PP This example demonstrates how to use the \fBnext\fR command to call the (super)class's implementation of a method. The script: +.PP .CS oo::class create theSuperclass { method example {args} { @@ -117,7 +118,9 @@ oo::define obj method example args { } obj example 1 2 3 .CE +.PP prints the following: +.PP .CS per-object method, args = 1 2 3 before chaining from subclass, args = x 1 2 3 y @@ -188,7 +191,6 @@ puts [demo compute 1 2 3] \fI\(-> prints "7" after delay\fR oo::class(n), oo::define(n), oo::object(n), self(n) .SH KEYWORDS call, method, method chain - .\" Local variables: .\" mode: nroff .\" fill-column: 78 diff --git a/doc/object.n b/doc/object.n index 47acd04..0836728 100644 --- a/doc/object.n +++ b/doc/object.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: object.n,v 1.3 2008/09/26 20:16:39 dgp Exp $ +'\" RCS: @(#) $Id: object.n,v 1.4 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH object n 0.1 TclOO "TclOO Commands" @@ -23,8 +23,8 @@ package require TclOO \fBoo::object\fR .fi .BE - .SH DESCRIPTION +.PP The \fBoo::object\fR class is the root class of the object hierarchy; every object (and hence every class) is an instance of this class. Objects are always referred to by their name, and may be \fBrename\fRd while maintaining @@ -46,6 +46,7 @@ any destructors on the object's class in the process. It is equivalent to using \fBrename\fR to delete the object command. The result of this method is always the empty string. .SS "NON-EXPORTED METHODS" +.PP The \fBoo::object\fR class supports the following non-exported methods: .TP \fIobj \fBeval\fR ?\fIarg ...\fR? @@ -76,7 +77,9 @@ must not have any namespace separators in it. The result is the empty string. This method returns the globally qualified name of the variable \fIvarName\fR in the unique namespace for the object \fIobj\fR. .SH EXAMPLES +.PP This example demonstrates basic use of an object. +.PP .CS set obj [\fBoo::object\fR new] $obj foo \fI\(-> error "unknown method foo"\fR @@ -94,7 +97,6 @@ $obj foo \fI\(-> error "unknown command obj"\fR my(n), oo::class(n) .SH KEYWORDS base class, class, object, root class - .\" Local variables: .\" mode: nroff .\" fill-column: 78 diff --git a/doc/open.n b/doc/open.n index 3b26d21..285103b 100644 --- a/doc/open.n +++ b/doc/open.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: open.n,v 1.35 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: open.n,v 1.36 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH open n 8.3 Tcl "Tcl Built-In Commands" @@ -446,6 +446,7 @@ applications on the various platforms .SH "EXAMPLE" .PP Open a command pipeline and catch any errors: +.PP .CS set fl [\fBopen\fR "| ls this_file_does_not_exist"] set data [read $fl] diff --git a/doc/package.n b/doc/package.n index aafce5e..913d3af 100644 --- a/doc/package.n +++ b/doc/package.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: package.n,v 1.22 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: package.n,v 1.23 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH package n 7.5 Tcl "Tcl Built-In Commands" @@ -29,7 +29,6 @@ package \- Facilities for package loading and version control \fBpackage prefer \fR?\fBlatest\fR|\fBstable\fR? .fi .BE - .SH DESCRIPTION .PP This command keeps a simple database of the packages available for @@ -47,11 +46,13 @@ The behavior of the \fBpackage\fR command is determined by its first argument. The following forms are permitted: .TP \fBpackage forget ?\fIpackage package ...\fR? +. Removes all information about each specified package from this interpreter, including information provided by both \fBpackage ifneeded\fR and \fBpackage provide\fR. .TP \fBpackage ifneeded \fIpackage version\fR ?\fIscript\fR? +. This command typically appears only in system configuration scripts to set up the package database. It indicates that a particular version of @@ -73,6 +74,7 @@ or an empty string if no \fBpackage ifneeded\fR command has been invoked for this \fIpackage\fR and \fIversion\fR. .TP \fBpackage names\fR +. Returns a list of the names of all packages in the interpreter for which a version has been provided (via \fBpackage provide\fR) or for which a \fBpackage ifneeded\fR @@ -80,10 +82,12 @@ script is available. The order of elements in the list is arbitrary. .TP \fBpackage present\fR +. This command is equivalent to \fBpackage require\fR except that it does not try and load the package if it is not already loaded. .TP \fBpackage provide \fIpackage \fR?\fIversion\fR? +. This command is invoked to indicate that version \fIversion\fR of package \fIpackage\fR is now present in the interpreter. It is typically invoked once as part of an \fBifneeded\fR script, @@ -96,6 +100,7 @@ empty string if no \fBpackage provide\fR command has been invoked for \fIpackage\fR in this interpreter. .TP \fBpackage require \fR\fIpackage \fR?\fIrequirement...\fR? +. This command is typically invoked by Tcl code that wishes to use a particular version of a particular package. The arguments indicate which package is wanted, and the command ensures that @@ -141,11 +146,13 @@ package, then the command returns an error. .RE .TP \fBpackage require \-exact \fIpackage version\fR +. This form of the command is used when only the given \fIversion\fR of \fIpackage\fR is acceptable to the caller. This command is equivalent to \fBpackage require \fIpackage version\fR-\fIversion\fR. .TP \fBpackage unknown \fR?\fIcommand\fR? +. This command supplies a .QW "last resort" command to invoke during @@ -167,30 +174,36 @@ If \fIcommand\fR is specified as an empty string, then the current \fBpackage unknown\fR script is removed, if there is one. .TP \fBpackage vcompare \fIversion1 version2\fR +. Compares the two version numbers given by \fIversion1\fR and \fIversion2\fR. Returns -1 if \fIversion1\fR is an earlier version than \fIversion2\fR, 0 if they are equal, and 1 if \fIversion1\fR is later than \fBversion2\fR. .TP \fBpackage versions \fIpackage\fR +. Returns a list of all the version numbers of \fIpackage\fR for which information has been provided by \fBpackage ifneeded\fR commands. .TP \fBpackage vsatisfies \fIversion requirement...\fR +. Returns 1 if the \fIversion\fR satisfies at least one of the given requirements, and 0 otherwise. Each \fIrequirement\fR is allowed to have any of the forms: .RS .TP min +. This form is called .QW min-bounded . .TP min- +. This form is called .QW min-unbound . .TP min-max +. This form is called .QW bounded . .RE @@ -329,8 +342,10 @@ Once you have done this, packages will be loaded automatically in response to \fBpackage require\fR commands. See the documentation for \fBpkg_mkIndex\fR for details. .SH EXAMPLES +.PP To state that a Tcl script requires the Tk and http packages, put this at the top of the script: +.PP .CS \fBpackage require\fR Tk \fBpackage require\fR http @@ -339,6 +354,7 @@ at the top of the script: To test to see if the Snack package is available and load if it is (often useful for optional enhancements to programs where the loss of the functionality is not critical) do this: +.PP .CS if {[catch {\fBpackage require\fR Snack}]} { # Error thrown - package not found. diff --git a/doc/prefix.n b/doc/prefix.n index f72c4be..6247583 100644 --- a/doc/prefix.n +++ b/doc/prefix.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: prefix.n,v 1.2 2008/10/03 13:24:45 dkf Exp $ +'\" RCS: @(#) $Id: prefix.n,v 1.3 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH prefix n 8.6 Tcl "Tcl Built-In Commands" @@ -20,18 +20,22 @@ prefix \- Facilities for prefix matching .fi .BE .SH DESCRIPTION +.PP This document describes commands looking up a prefix in a list of strings. The following commands are supported: .TP \fB::tcl::prefix all\fR \fItable\fR \fIstring\fR +. Returns a list of all elements in \fItable\fR that begins with the prefix \fIstring\fR. .TP \fB::tcl::prefix longest\fR \fItable\fR \fIstring\fR +. Returns the longest common prefix among all elements in \fItable\fR that begins with the prefix \fIstring\fR. .TP \fB::tcl::prefix match\fR ?\fIoptions\fR? \fItable\fR \fIstring\fR +. If \fIstring\fR equals one element in \fItable\fR or is a prefix to exactly one element, the matched element is returned. If not, the result depends on the \fB\-error\fR option. @@ -54,6 +58,7 @@ message. The default corresponds to setting Example: If \fB\-error\fR "\-errorcode MyError \-level 1" is used, an error would be generated as: .RS +.PP .CS return \-errorcode MyError \-level 1 \-code error "ErrMsg" .CE @@ -61,6 +66,7 @@ return \-errorcode MyError \-level 1 \-code error "ErrMsg" .SH "EXAMPLES" .PP Basic use: +.PP .CS namespace import ::tcl::prefix \fBprefix match\fR {apa bepa cepa} apa @@ -78,6 +84,7 @@ namespace import ::tcl::prefix .CE .PP Simplifying option matching: +.PP .CS array set opts {\-apa 1 \-bepa "" \-cepa 0} foreach {arg val} $args { @@ -86,6 +93,7 @@ foreach {arg val} $args { .CE .PP Switch supporting prefixes: +.PP .CS switch [prefix match {apa bepa cepa} $arg] { apa { } diff --git a/doc/proc.n b/doc/proc.n index 30b8bba..bed20a0 100644 --- a/doc/proc.n +++ b/doc/proc.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: proc.n,v 1.10 2008/01/17 00:56:49 msofer Exp $ +'\" RCS: @(#) $Id: proc.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH proc n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ proc \- Create a Tcl procedure .SH SYNOPSIS \fBproc \fIname args body\fR .BE - .SH DESCRIPTION .PP The \fBproc\fR command creates a new Tcl procedure named @@ -76,8 +75,10 @@ executed in the procedure's body. If an error occurs while executing the procedure body, then the procedure-as-a-whole will return that same error. .SH EXAMPLES +.PP This is a procedure that accepts arbitrarily many arguments and prints them out, one by one. +.PP .CS \fBproc\fR printArguments args { foreach arg $args { @@ -89,15 +90,14 @@ them out, one by one. This procedure is a bit like the \fBincr\fR command, except it multiplies the contents of the named variable by the value, which defaults to \fB2\fR: +.PP .CS \fBproc\fR mult {varName {multiplier 2}} { upvar 1 $varName var set var [expr {$var * $multiplier}] } .CE - .SH "SEE ALSO" info(n), unknown(n) - .SH KEYWORDS argument, procedure diff --git a/doc/puts.n b/doc/puts.n index ac579c9..45e67b7 100644 --- a/doc/puts.n +++ b/doc/puts.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: puts.n,v 1.13 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: puts.n,v 1.14 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH puts n 7.5 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ puts \- Write to a channel .SH SYNOPSIS \fBputs \fR?\fB\-nonewline\fR? ?\fIchannelId\fR? \fIstring\fR .BE - .SH DESCRIPTION .PP Writes the characters given by \fIstring\fR to the channel given @@ -66,33 +65,36 @@ be used in an event-driven fashion with the \fBfileevent\fR command (do not invoke \fBputs\fR unless you have recently been notified via a file event that the channel is ready for more output data). .SH EXAMPLES +.PP Write a short message to the console (or wherever \fBstdout\fR is directed): +.PP .CS \fBputs\fR "Hello, World!" .CE .PP Print a message in several parts: +.PP .CS \fBputs\fR -nonewline "Hello, " \fBputs\fR "World!" .CE .PP Print a message to the standard error channel: +.PP .CS \fBputs\fR stderr "Hello, World!" .CE .PP Append a log message to a file: +.PP .CS set chan [open my.log a] set timestamp [clock format [clock seconds]] \fBputs\fR $chan "$timestamp - Hello, World!" close $chan .CE - .SH "SEE ALSO" file(n), fileevent(n), Tcl_StandardChannels(3) - .SH KEYWORDS channel, newline, output, write diff --git a/doc/pwd.n b/doc/pwd.n index aeb94c5..7761aab 100644 --- a/doc/pwd.n +++ b/doc/pwd.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: pwd.n,v 1.7 2007/02/18 18:42:55 dkf Exp $ +'\" RCS: @(#) $Id: pwd.n,v 1.8 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH pwd n "" Tcl "Tcl Built-In Commands" @@ -16,17 +16,18 @@ pwd \- Return the absolute path of the current working directory .SH SYNOPSIS \fBpwd\fR .BE - .SH DESCRIPTION .PP Returns the absolute path name of the current working directory. .SH EXAMPLE +.PP Sometimes it is useful to change to a known directory when running some external command using \fBexec\fR, but it is important to keep the application usually running in the directory that it was started in (unless the user specifies otherwise) since that minimizes user confusion. The way to do this is to save the current directory while the external command is being run: +.PP .CS set tarFile [file normalize somefile.tar] set savedDir [\fBpwd\fR] @@ -36,6 +37,5 @@ cd $savedDir .CE .SH "SEE ALSO" file(n), cd(n), glob(n), filename(n) - .SH KEYWORDS working directory diff --git a/doc/read.n b/doc/read.n index 7465f10..72db6ed 100644 --- a/doc/read.n +++ b/doc/read.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: read.n,v 1.15 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: read.n,v 1.16 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH read n 8.1 Tcl "Tcl Built-In Commands" @@ -18,7 +18,6 @@ read \- Read from a channel .sp \fBread \fIchannelId numChars\fR .BE - .SH DESCRIPTION .PP In the first form, the \fBread\fR command reads all of the data from @@ -53,36 +52,37 @@ newline characters according to the \fB\-translation\fR option for the channel. See the \fBfconfigure\fR manual entry for a discussion on ways in which \fBfconfigure\fR will alter input. - .SH "USE WITH SERIAL PORTS" '\" Note: this advice actually applies to many versions of Tcl - +.PP For most applications a channel connected to a serial port should be configured to be nonblocking: \fBfconfigure \fIchannelId \fB\-blocking \fI0\fR. Then \fBread\fR behaves much like described above. Care must be taken when using \fBread\fR on blocking serial ports: .TP \fBread \fIchannelId numChars\fR +. In this form \fBread\fR blocks until \fInumChars\fR have been received from the serial port. .TP \fBread \fIchannelId\fR +. In this form \fBread\fR blocks until the reception of the end-of-file character, see \fBfconfigure -eofchar\fR. If there no end-of-file character has been configured for the channel, then \fBread\fR will block forever. .SH "EXAMPLE" +.PP This example code reads a file all at once, and splits it into a list, with each line in the file corresponding to an element in the list: +.PP .CS set fl [open /proc/meminfo] set data [\fBread\fR $fl] close $fl set lines [split $data \en] .CE - .SH "SEE ALSO" file(n), eof(n), fblocked(n), fconfigure(n), Tcl_StandardChannels(3) - .SH KEYWORDS blocking, channel, end of line, end of file, nonblocking, read, translation, encoding diff --git a/doc/regexp.n b/doc/regexp.n index 7da20eb..4bdf467 100644 --- a/doc/regexp.n +++ b/doc/regexp.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regexp.n,v 1.31 2008/09/23 13:22:18 dkf Exp $ +'\" RCS: @(#) $Id: regexp.n,v 1.32 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH regexp n 8.3 Tcl "Tcl Built-In Commands" @@ -122,12 +122,15 @@ list will be concatenated at each iteration, such that a flat list is always returned. For each match iteration, the command will append the overall match data, plus one element for each subexpression in the regular expression. Examples are: +.RS +.PP .CS \fBregexp\fR -inline -- {\ew(\ew)} " inlined " \fI\(-> in n\fR \fBregexp\fR -all -inline -- {\ew(\ew)} " inlined " \fI\(-> in n li i ne e\fR .CE +.RE .TP 15 \fB\-start\fR \fIindex\fR . @@ -160,9 +163,11 @@ if \fB\-indices\fR has been specified or to an empty string otherwise. Find the first occurrence of a word starting with \fBfoo\fR in a string that is not actually an instance of \fBfoobar\fR, and get the letters following it up to the end of the word into a variable: +.PP .CS \fBregexp\fR {\emfoo(?!bar\eM)(\ew*)} $string \-> restOfWord .CE +.PP Note that the whole matched substring has been placed in the variable .QW \fB\->\fR , which is a name chosen to look nice given that we are not @@ -170,17 +175,21 @@ actually interested in its contents. .PP Find the index of the word \fBbadger\fR (in any case) within a string and store that in the variable \fBlocation\fR: +.PP .CS \fBregexp\fR \-indices {(?i)\embadger\eM} $string location .CE +.PP This could also be written as a \fIbasic\fR regular expression (as opposed to using the default syntax of \fIadvanced\fR regular expressions) match by prefixing the expression with a suitable flag: +.PP .CS \fBregexp\fR \-indices {(?ib)\e} $string location .CE .PP This counts the number of octal digits in a string: +.PP .CS \fBregexp\fR \-all {[0\-7]} $string .CE @@ -188,6 +197,7 @@ This counts the number of octal digits in a string: This lists all words (consisting of all sequences of non-whitespace characters) in a string, and is useful as a more powerful version of the \fBsplit\fR command: +.PP .CS \fBregexp\fR \-all \-inline {\eS+} $string .CE diff --git a/doc/regsub.n b/doc/regsub.n index f3371e6..33a2e6f 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.25 2008/09/23 13:22:18 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.26 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -148,24 +148,29 @@ of regular expressions. .PP Replace (in the string in variable \fIstring\fR) every instance of \fBfoo\fR which is a word by itself with \fBbar\fR: +.PP .CS \fBregsub\fR -all {\emfoo\eM} $string bar string .CE +.PP or (using the .QW "basic regular expression" syntax): +.PP .CS \fBregsub\fR -all {(?b)\e} $string bar string .CE .PP Insert double-quotes around the first instance of the word \fBinteresting\fR, however it is capitalized. +.PP .CS \fBregsub\fR -nocase {\eyinteresting\ey} $string {"&"} string .CE .PP Convert all non-ASCII and Tcl-significant characters into \eu escape sequences by using \fBregsub\fR and \fBsubst\fR in combination: +.PP .CS # This RE is just a character class for everything "bad" set RE {[][{};#\e\e\e$\es\eu0080-\euffff]} diff --git a/doc/rename.n b/doc/rename.n index fde6d1c..7852937 100644 --- a/doc/rename.n +++ b/doc/rename.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: rename.n,v 1.5 2004/10/27 14:24:37 dkf Exp $ +'\" RCS: @(#) $Id: rename.n,v 1.6 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH rename n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ rename \- Rename or delete a command .SH SYNOPSIS \fBrename \fIoldName newName\fR .BE - .SH DESCRIPTION .PP Rename the command that used to be called \fIoldName\fR so that it @@ -28,9 +27,11 @@ If a command is renamed into a different namespace, future invocations of it will execute in the new namespace. The \fBrename\fR command returns an empty string as result. .SH EXAMPLE +.PP The \fBrename\fR command can be used to wrap the standard Tcl commands with your own monitoring machinery. For example, you might wish to count how often the \fBsource\fR command is called: +.PP .CS \fBrename\fR ::source ::theRealSource set sourceCount 0 @@ -40,9 +41,7 @@ proc ::source args { uplevel 1 ::theRealSource $args } .CE - .SH "SEE ALSO" namespace(n), proc(n) - .SH KEYWORDS command, delete, namespace, rename diff --git a/doc/return.n b/doc/return.n index 7432491..5630206 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.20 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: return.n,v 1.21 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -211,6 +211,7 @@ to be \fBTCL_RETURN\fR, triggering a return from the enclosing procedure. .PP First, a simple example of using \fBreturn\fR to return from a procedure, interrupting the procedure body. +.PP .CS proc printOneLine {} { puts "line 1" ;# This line will be printed. @@ -221,6 +222,7 @@ proc printOneLine {} { .PP Next, an example of using \fBreturn\fR to set the value returned by the procedure. +.PP .CS proc returnX {} {\fBreturn\fR X} puts [returnX] ;# prints "X" @@ -228,6 +230,7 @@ puts [returnX] ;# prints "X" .PP Next, a more complete example, using \fBreturn -code error\fR to report invalid arguments. +.PP .CS proc factorial {n} { if {![string is integer $n] || ($n < 0)} { @@ -253,6 +256,7 @@ proc factorial {n} { .CE .PP Next, a procedure replacement for \fBbreak\fR. +.PP .CS proc myBreak {} { \fBreturn\fR -code break @@ -260,13 +264,15 @@ proc myBreak {} { .CE .PP With the \fB\-level 0\fR option, \fBreturn\fR itself can serve -as a replacement for \fBbreak\fR. +as a replacement for \fBbreak\fR, with the help of \fBinterp alias\fR. +.PP .CS interp alias {} Break {} \fBreturn\fR -level 0 -code break .CE .PP An example of using \fBcatch\fR and \fBreturn -options\fR to re-raise a caught error: +.PP .CS proc doSomething {} { set resource [allocate] @@ -281,6 +287,7 @@ proc doSomething {} { .PP Finally an example of advanced use of the \fBreturn\fR options to create a procedure replacement for \fBreturn\fR itself: +.PP .CS proc myReturn {args} { set result "" diff --git a/doc/scan.n b/doc/scan.n index 621e919..4612467 100644 --- a/doc/scan.n +++ b/doc/scan.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scan.n,v 1.25 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: scan.n,v 1.26 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH scan n 8.4 Tcl "Tcl Built-In Commands" @@ -205,6 +205,7 @@ performed and no variables are given, an empty string is returned. .SH EXAMPLES .PP Convert a UNICODE character to its numeric value: +.PP .CS set char "x" set value [\fBscan\fR $char %c] @@ -212,6 +213,7 @@ set value [\fBscan\fR $char %c] .PP Parse a simple color specification of the form \fI#RRGGBB\fR using hexadecimal conversions with substring sizes: +.PP .CS set string "#08D03F" \fBscan\fR $string "#%2x%2x%2x" r g b @@ -220,6 +222,7 @@ set string "#08D03F" Parse a \fIHH:MM\fR time string, noting that this avoids problems with octal numbers by forcing interpretation as decimals (if we did not care, we would use the \fB%i\fR conversion instead): +.PP .CS set string "08:08" ;# *Not* octal! if {[\fBscan\fR $string "%d:%d" hours minutes] != 2} { @@ -234,6 +237,7 @@ if {$minutes < 0 || $minutes > 59} { Break a string up into sequences of non-whitespace characters (note the use of the \fB%n\fR conversion so that we get skipping over leading whitespace correct): +.PP .CS set string " a string {with braced words} + leading space " set words {} @@ -245,6 +249,7 @@ while {[\fBscan\fR $string %s%n word length] == 2} { .PP Parse a simple coordinate string, checking that it is complete by looking for the terminating character explicitly: +.PP .CS set string "(5.2,-4e-2)" # Note that the spaces before the literal parts of @@ -261,6 +266,7 @@ puts "X=$x, Y=$y" .PP An interactive session demonstrating the truncation of integer values determined by size modifiers: +.PP .CS % set tcl_platform(wordSize) 4 diff --git a/doc/seek.n b/doc/seek.n index 6883b98..9bc0923 100644 --- a/doc/seek.n +++ b/doc/seek.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: seek.n,v 1.9 2005/05/10 18:34:03 kennykb Exp $ +'\" RCS: @(#) $Id: seek.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH seek n 8.1 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ seek \- Change the access position for an open channel .SH SYNOPSIS \fBseek \fIchannelId offset \fR?\fIorigin\fR? .BE - .SH DESCRIPTION .PP Changes the current access position for \fIchannelId\fR. @@ -32,20 +31,23 @@ for \fIchannelId\fR. \fIOffset\fR must be an integer (which may be negative) and \fIorigin\fR must be one of the following: .TP 10 \fBstart\fR +. The new access position will be \fIoffset\fR bytes from the start of the underlying file or device. .TP 10 \fBcurrent\fR +. The new access position will be \fIoffset\fR bytes from the current access position; a negative \fIoffset\fR moves the access position backwards in the underlying file or device. .TP 10 \fBend\fR +. The new access position will be \fIoffset\fR bytes from the end of the file or device. A negative \fIoffset\fR places the access position before the end of file, and a positive \fIoffset\fR places the access position after the end of file. -.LP +.PP The \fIorigin\fR argument defaults to \fBstart\fR. .PP The command flushes all buffered output for the channel before the command @@ -59,17 +61,20 @@ Note that \fIoffset\fR values are byte offsets, not character offsets. Both \fBseek\fR and \fBtell\fR operate in terms of bytes, not characters, unlike \fBread\fR. .SH EXAMPLES +.PP Read a file twice: +.PP .CS set f [open file.txt] set data1 [read $f] \fBseek\fR $f 0 set data2 [read $f] close $f -# $data1 == $data2 if the file wasn't updated +# $data1 eq $data2 if the file wasn't updated .CE .PP Read the last 10 bytes from a file: +.PP .CS set f [open file.data] # This is guaranteed to work with binary data but @@ -79,9 +84,7 @@ fconfigure $f -translation binary set data [read $f 10] close $f .CE - .SH "SEE ALSO" file(n), open(n), close(n), gets(n), tell(n), Tcl_StandardChannels(3) - .SH KEYWORDS access position, file, seek diff --git a/doc/self.n b/doc/self.n index 2c66edb..7e564b7 100644 --- a/doc/self.n +++ b/doc/self.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: self.n,v 1.1 2008/05/31 11:42:13 dkf Exp $ +'\" RCS: @(#) $Id: self.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH self n 0.1 TclOO "TclOO Commands" @@ -19,7 +19,6 @@ package require TclOO \fBself\fR ?\fIsubcommand\fR? .fi .BE - .SH DESCRIPTION The \fBself\fR command, which should only be used from within the context of a call to a method (i.e. inside a method, constructor or destructor body) is @@ -87,8 +86,10 @@ element list describing the method being filtered. The first element will be the name of the declarer of the method, and the second element will be the actual name of the method. .SH EXAMPLES +.PP This example shows basic use of \fBself\fR to provide information about the current object: +.PP .CS oo::class create c { method foo {} { @@ -104,7 +105,6 @@ b foo \fI\(-> prints "this is the ::b object"\fR info(n), next(n) .SH KEYWORDS call, introspection, object - .\" Local variables: .\" mode: nroff .\" fill-column: 78 diff --git a/doc/set.n b/doc/set.n index b99e4fb..e964425 100644 --- a/doc/set.n +++ b/doc/set.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: set.n,v 1.9 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: set.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH set n "" Tcl "Tcl Built-In Commands" @@ -41,17 +41,21 @@ If a procedure is active and \fIvarName\fR is unqualified, then unless \fIvarName\fR was declared to resolve differently through one of the \fBglobal\fR, \fBvariable\fR or \fBupvar\fR commands. .SH EXAMPLES +.PP Store a random number in the variable \fIr\fR: +.PP .CS \fBset\fR r [expr {rand()}] .CE .PP Store a short message in an array element: +.PP .CS \fBset\fR anAry(msg) "Hello, World!" .CE .PP Store a short message in an array element specified by a variable: +.PP .CS \fBset\fR elemName "msg" \fBset\fR anAry($elemName) "Hello, World!" @@ -60,6 +64,7 @@ Store a short message in an array element specified by a variable: Copy a value into the variable \fIout\fR from a variable whose name is stored in the \fIvbl\fR (note that it is often easier to use arrays in practice instead of doing double-dereferencing): +.PP .CS \fBset\fR in0 "small random" \fBset\fR in1 "large random" diff --git a/doc/socket.n b/doc/socket.n index bb14993..45e2986 100644 --- a/doc/socket.n +++ b/doc/socket.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: socket.n,v 1.15 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: socket.n,v 1.16 2008/10/17 10:22:25 dkf Exp $ .so man.macros .TH socket n 8.0 Tcl "Tcl Built-In Commands" .BS @@ -18,7 +18,6 @@ socket \- Open a TCP network connection .sp \fBsocket\fR \fB\-server \fIcommand\fR ?\fIoptions\fR? \fIport\fR .BE - .SH DESCRIPTION .PP This command opens a network socket and returns a channel @@ -54,6 +53,7 @@ The following options may also be present before \fIhost\fR to specify additional information about the connection: .TP \fB\-myaddr\fI addr\fR +. \fIAddr\fR gives the domain-style name or numerical IP address of the client-side network interface to use for the connection. This option may be useful if the client machine has multiple network @@ -61,6 +61,7 @@ interfaces. If the option is omitted then the client-side interface will be chosen by the system software. .TP \fB\-myport\fI port\fR +. \fIPort\fR specifies an integer port number (or service name, where supported and understood by the host operating system) to use for the client's @@ -68,6 +69,7 @@ side of the connection. If this option is omitted, the client's port number will be chosen at random by the system software. .TP \fB\-async\fR +. The \fB\-async\fR option will cause the client socket to be connected asynchronously. This means that the socket will be created immediately but may not yet be connected to the server, when the call to \fBsocket\fR @@ -80,6 +82,7 @@ returns immediately and \fBfblocked\fR on the socket returns 1. Synchronous client sockets may be switched (after they have connected) to operating in asynchronous mode using: .RS +.PP .CS \fBfconfigure \fIchan \fB\-blocking 0\fR .CE @@ -104,6 +107,7 @@ the client's port number. The following additional option may also be specified before \fIhost\fR: .TP \fB\-myaddr\fI addr\fR +. \fIAddr\fR gives the domain-style name or numerical IP address of the server-side network interface to use for the connection. This option may be useful if the server machine has multiple network @@ -129,22 +133,26 @@ allocated may be retrieved from the created server socket using the \fBfconfigure\fR command to retrieve the \fB\-sockname\fR option as described below. .SH "CONFIGURATION OPTIONS" +.PP The \fBfconfigure\fR command can be used to query several readonly configuration options for socket channels: .TP \fB\-error\fR +. This option gets the current error status of the given socket. This is useful when you need to determine if an asynchronous connect operation succeeded. If there was an error, the error message is returned. If there was no error, an empty string is returned. .TP \fB\-sockname\fR +. This option returns a list of three elements, the address, the host name and the port number for the socket. If the host name cannot be computed, the second element is identical to the address, the first element of the list. .TP \fB\-peername\fR +. This option is not supported by server sockets. For client and accepted sockets, this option returns a list of three elements; these are the address, the host name and the port to which the peer socket is connected @@ -152,7 +160,9 @@ or bound. If the host name cannot be computed, the second element of the list is identical to the address, its first element. .PP .SH "EXAMPLES" +.PP Here is a very simple time server: +.PP .CS proc Server {channel clientaddr clientport} { puts "Connection from $clientaddr registered" @@ -165,6 +175,7 @@ vwait forever .CE .PP And here is the corresponding client to talk to the server: +.PP .CS set server localhost set sockChan [\fBsocket\fR $server 9900] @@ -172,9 +183,7 @@ gets $sockChan line close $sockChan puts "The time on $server is $line" .CE - .SH "SEE ALSO" fconfigure(n), flush(n), open(n), read(n) - .SH KEYWORDS bind, channel, connection, domain name, host, network address, socket, tcp diff --git a/doc/source.n b/doc/source.n index 6428d80..49ecbf7 100644 --- a/doc/source.n +++ b/doc/source.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: source.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: source.n,v 1.20 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH source n "" Tcl "Tcl Built-In Commands" @@ -52,12 +52,14 @@ is omitted, the system encoding is assumed. .PP Run the script in the file \fBfoo.tcl\fR and then the script in the file \fBbar.tcl\fR: +.PP .CS \fBsource\fR foo.tcl \fBsource\fR bar.tcl .CE .PP Alternatively: +.PP .CS foreach scriptFile {foo.tcl bar.tcl} { \fBsource\fR $scriptFile diff --git a/doc/split.n b/doc/split.n index 4defc5c..ef5470b 100644 --- a/doc/split.n +++ b/doc/split.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: split.n,v 1.10 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: split.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH split n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ split \- Split a string into a proper Tcl list .SH SYNOPSIS \fBsplit \fIstring \fR?\fIsplitChars\fR? .BE - .SH DESCRIPTION .PP Returns a list created by splitting \fIstring\fR at each character @@ -31,34 +30,41 @@ If \fIsplitChars\fR is an empty string then each character of \fIstring\fR becomes a separate element of the result list. \fISplitChars\fR defaults to the standard white-space characters. .SH EXAMPLES +.PP Divide up a USENET group name into its hierarchical components: +.PP .CS -\fBsplit\fR "comp.lang.tcl.announce" . - \fI\(-> comp lang tcl announce\fR +\fBsplit\fR "comp.lang.tcl" . + \fI\(-> comp lang tcl\fR .CE .PP See how the \fBsplit\fR command splits on \fIevery\fR character in \fIsplitChars\fR, which can result in information loss if you are not careful: +.PP .CS \fBsplit\fR "alpha beta gamma" "temp" \fI\(-> al {ha b} {} {a ga} {} a\fR .CE .PP Extract the list words from a string that is not a well-formed list: +.PP .CS \fBsplit\fR "Example with {unbalanced brace character" \fI\(-> Example with \e{unbalanced brace character\fR .CE .PP Split a string into its constituent characters +.PP .CS \fBsplit\fR "Hello world" {} \fI\(-> H e l l o { } w o r l d\fR .CE .SS "PARSING RECORD-ORIENTED FILES" +.PP Parse a Unix /etc/passwd file, which consists of one entry per line, with each line consisting of a colon-separated list of fields: +.PP .CS ## Read the file set fid [open /etc/passwd] @@ -80,9 +86,7 @@ foreach rec $records { puts "$longName uses [file tail $shell] for a login shell" } .CE - .SH "SEE ALSO" join(n), list(n), string(n) - .SH KEYWORDS list, split, string diff --git a/doc/string.n b/doc/string.n index d0cb8d8..6e4a8a4 100644 --- a/doc/string.n +++ b/doc/string.n @@ -5,7 +5,7 @@ .\" See the file "license.terms" for information on usage and redistribution .\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. .\" -.\" RCS: @(#) $Id: string.n,v 1.44 2008/06/29 22:28:24 dkf Exp $ +.\" RCS: @(#) $Id: string.n,v 1.45 2008/10/17 10:22:25 dkf Exp $ .\" .so man.macros .TH string n 8.1 Tcl "Tcl Built-In Commands" @@ -61,13 +61,17 @@ forms accepted by the \fBindex\fR method), then the search is constrained to start with the character in \fIhaystackString\fR specified by the index. For example, .RS +.PP .CS \fBstring first a 0a23456789abcdef 5\fR .CE +.PP will return \fB10\fR, but +.PP .CS \fBstring first a 0123456789abcdef 11\fR .CE +.PP will return \fB\-1\fR. .RE .TP @@ -207,13 +211,17 @@ of the forms accepted by the \fBindex\fR method), then only the characters in \fIhaystackString\fR at or before the specified \fIlastIndex\fR will be considered by the search. For example, .RS +.PP .CS \fBstring last a 0a23456789abcdef 15\fR .CE +.PP will return \fB10\fR, but +.PP .CS \fBstring last a 0a23456789abcdef 9\fR .CE +.PP will return \fB1\fR. .RE .TP @@ -238,17 +246,21 @@ appearing first in the list will be checked first, and so on. \fIstring\fR is only iterated over once, so earlier key replacements will have no affect for later key matches. For example, .RS +.PP .CS \fBstring map {abc 1 ab 2 a 3 1 0} 1abcaababcabababc\fR .CE +.PP will return the string \fB01321221\fR. .PP Note that if an earlier \fIkey\fR is a prefix of a later one, it will completely mask the later one. So if the previous example is reordered like this, +.PP .CS \fBstring map {1 0 ab 2 a 3 abc 1} 1abcaababcabababc\fR .CE +.PP it will return the string \fB02c322c222c\fR. .RE .TP @@ -392,6 +404,7 @@ single character other than these. .PP Test if the string in the variable \fIstring\fR is a proper non-empty prefix of the string \fBfoobar\fR. +.PP .CS set length [\fBstring length\fR $string] if {$length == 0} { diff --git a/doc/subst.n b/doc/subst.n index 75fe00f..3685c0f 100644 --- a/doc/subst.n +++ b/doc/subst.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: subst.n,v 1.16 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: subst.n,v 1.17 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH subst n 7.4 Tcl "Tcl Built-In Commands" @@ -64,19 +64,23 @@ itself will either return an error, or will complete successfully. When it performs its substitutions, \fIsubst\fR does not give any special treatment to double quotes or curly braces (except within command substitutions) so the script +.PP .CS set a 44 \fBsubst\fR {xyz {$a}} .CE +.PP returns .QW "\fBxyz {44}\fR" , not .QW "\fBxyz {$a}\fR" and the script +.PP .CS set a "p\e} q \e{r" \fBsubst\fR {xyz {$a}} .CE +.PP returns .QW "\fBxyz {p} q {r}\fR" , not @@ -84,10 +88,12 @@ not .PP When command substitution is performed, it includes any variable substitution necessary to evaluate the script. +.PP .CS set a 44 \fBsubst\fR -novariables {$a [format $a]} .CE +.PP returns .QW "\fB$a 44\fR" , not @@ -95,11 +101,13 @@ not Similarly, when variable substitution is performed, it includes any command substitution necessary to retrieve the value of the variable. +.PP .CS proc b {} {return c} array set a {c c [b] tricky} \fBsubst\fR -nocommands {[b] $a([b])} .CE +.PP returns .QW "\fB[b] c\fR" , not @@ -109,34 +117,42 @@ The continue and break exceptions allow command substitutions to prevent substitution of the rest of the command substitution and the rest of \fIstring\fR respectively, giving script authors more options when processing text using \fIsubst\fR. For example, the script +.PP .CS \fBsubst\fR {abc,[break],def} .CE +.PP returns .QW \fBabc,\fR , not .QW \fBabc,,def\fR and the script +.PP .CS \fBsubst\fR {abc,[continue;expr {1+2}],def} .CE +.PP returns .QW \fBabc,,def\fR , not .QW \fBabc,3,def\fR . .PP Other exceptional return codes substitute the returned value +.PP .CS \fBsubst\fR {abc,[return foo;expr {1+2}],def} .CE +.PP returns .QW \fBabc,foo,def\fR , not .QW \fBabc,3,def\fR and +.PP .CS \fBsubst\fR {abc,[return -code 10 foo;expr {1+2}],def} .CE +.PP also returns .QW \fBabc,foo,def\fR , not @@ -145,3 +161,6 @@ not Tcl(n), eval(n), break(n), continue(n) .SH KEYWORDS backslash substitution, command substitution, variable substitution +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/switch.n b/doc/switch.n index 21ecfc2..2f638de 100644 --- a/doc/switch.n +++ b/doc/switch.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: switch.n,v 1.19 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: switch.n,v 1.20 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH switch n 8.5 Tcl "Tcl Built-In Commands" @@ -124,8 +124,10 @@ Beware of how you place comments in \fBswitch\fR commands. Comments should only be placed \fBinside\fR the execution body of one of the patterns, and not intermingled with the patterns. .SH "EXAMPLES" +.PP The \fBswitch\fR command can match against variables and not just literals, as shown here (the result is \fI2\fR): +.PP .CS set foo "abc" \fBswitch\fR abc a \- b {expr {1}} $foo {expr {2}} default {expr {3}} @@ -134,6 +136,7 @@ set foo "abc" Using glob matching and the fall-through body is an alternative to writing regular expressions with alternations, as can be seen here (this returns \fI1\fR): +.PP .CS \fBswitch\fR \-glob aaab { a*b \- @@ -145,6 +148,7 @@ writing regular expressions with alternations, as can be seen here .PP Whenever nothing matches, the \fBdefault\fR clause (which must be last) is taken. This example has a result of \fI3\fR: +.PP .CS \fBswitch\fR xyz { a \- @@ -163,6 +167,7 @@ last) is taken. This example has a result of \fI3\fR: .PP When matching against regular expressions, information about what exactly matched is easily obtained using the \fB\-matchvar\fR option: +.PP .CS \fBswitch\fR \-regexp \-matchvar foo \-\- $bar { a(b*)c { diff --git a/doc/tclsh.1 b/doc/tclsh.1 index 71932e1..db07346 100644 --- a/doc/tclsh.1 +++ b/doc/tclsh.1 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclsh.1,v 1.15 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: tclsh.1,v 1.16 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH tclsh 1 "" Tcl "Tcl Applications" @@ -55,9 +55,11 @@ of a script file is presented on the \fBtclsh\fR command line, but the script file can always \fBsource\fR it if desired. .PP If you create a Tcl script in a file whose first line is +.PP .CS \fB#!/usr/local/bin/tclsh\fR .CE +.PP then you can invoke the script file directly from your shell if you mark the file as executable. This assumes that \fBtclsh\fR has been installed in the default @@ -69,6 +71,7 @@ executable can be accessed with a short file name. .PP An even better approach is to start your script files with the following three lines: +.PP .CS \fB#!/bin/sh # the next line restarts using tclsh \e diff --git a/doc/tcltest.n b/doc/tcltest.n index 88320cc..82691f9 100644 --- a/doc/tcltest.n +++ b/doc/tcltest.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tcltest.n,v 1.56 2008/07/13 23:15:23 nijtmans Exp $ +'\" RCS: @(#) $Id: tcltest.n,v 1.57 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH "tcltest" n 2.3 tcltest "Tcl Bundled Packages" @@ -1128,3 +1128,6 @@ options to \fBtest\fR is useful only for pure Tcl applications that use \fB::puts\fR to produce output. .SH KEYWORDS test, test harness, test suite +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/tell.n b/doc/tell.n index a25b111..c62b22a 100644 --- a/doc/tell.n +++ b/doc/tell.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tell.n,v 1.9 2005/05/10 18:34:03 kennykb Exp $ +'\" RCS: @(#) $Id: tell.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH tell n 8.1 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ tell \- Return current access position for an open channel .SH SYNOPSIS \fBtell \fIchannelId\fR .BE - .SH DESCRIPTION .PP Returns an integer string giving the current access position in @@ -31,7 +30,9 @@ Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR), the return value from an invocation of \fBopen\fR or \fBsocket\fR, or the result of a channel creation command provided by a Tcl extension. .SH EXAMPLE +.PP Read a line from a file channel only if it starts with \fBfoobar\fR: +.PP .CS # Save the offset in case we need to undo the read... set offset [\fBtell\fR $chan] @@ -43,9 +44,7 @@ if {[read $chan 6] eq "foobar"} { seek $chan $offset } .CE - .SH "SEE ALSO" file(n), open(n), close(n), gets(n), seek(n), Tcl_StandardChannels(3) - .SH KEYWORDS access position, channel, seeking diff --git a/doc/time.n b/doc/time.n index fff9274..9d7aa5f 100644 --- a/doc/time.n +++ b/doc/time.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: time.n,v 1.9 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: time.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH time n "" Tcl "Tcl Built-In Commands" @@ -16,21 +16,23 @@ time \- Time the execution of a script .SH SYNOPSIS \fBtime \fIscript\fR ?\fIcount\fR? .BE - .SH DESCRIPTION .PP This command will call the Tcl interpreter \fIcount\fR times to evaluate \fIscript\fR (or once if \fIcount\fR is not specified). It will then return a string of the form +.PP .CS -\fB503 microseconds per iteration\fR +\fB503.2 microseconds per iteration\fR .CE +.PP which indicates the average amount of time required per iteration, in microseconds. Time is measured in elapsed time, not CPU time. .SH EXAMPLE Estimate how long it takes for a simple Tcl \fBfor\fR loop to count to a thousand: +.PP .CS time { for {set i 0} {$i<1000} {incr i} { @@ -38,9 +40,10 @@ time { } } .CE - .SH "SEE ALSO" clock(n) - .SH KEYWORDS script, time +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/tm.n b/doc/tm.n index 3deca0f..59980f0 100644 --- a/doc/tm.n +++ b/doc/tm.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tm.n,v 1.17 2008/09/26 19:54:56 dgp Exp $ +'\" RCS: @(#) $Id: tm.n,v 1.18 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH tm n 8.5 Tcl "Tcl Built-In Commands" @@ -79,6 +79,7 @@ additional root paths beyond those described by this document. A Tcl Module is a Tcl Package contained in a single file, and no other files required by it. This file has to be \fBsource\fRable. In other words, a Tcl Module is always imported via: +.PP .CS source module_file .CE @@ -92,6 +93,7 @@ attached data in any it chooses to fully import and activate the package. .PP The name of a module file has to match the regular expression: +.PP .CS ([[:alpha:]][:[:alnum:]]*)-([[:digit:]].*)\e.tm .CE @@ -100,11 +102,12 @@ The first capturing parentheses provides the name of the package, the second clause its version. In addition to matching the pattern, the extracted version number must not raise an error when used in the command: +.PP .CS package vcompare $version 0 .CE -.PP .SH "FINDING MODULES" +.PP The directory tree for storing Tcl modules is separate from other parts of the filesystem and independent of \fBauto_path\fR. .PP @@ -165,10 +168,13 @@ Note that packages in module form have \fIno\fR control over the \fIindex\fR and \fIprovide script\fRs entered into the package database for them. For a module file \fBMF\fR the \fIindex script\fR is always: +.PP .CS package ifneeded \fBPNAME PVERSION\fR [list source \fBMF\fR] .CE +.PP and the \fIprovide script\fR embedded in the above is: +.PP .CS source \fBMF\fR .CE @@ -176,6 +182,7 @@ source \fBMF\fR Both package name \fBPNAME\fR and package version \fBPVERSION\fR are extracted from the filename \fBMF\fR according to the definition below: +.PP .CS \fBMF\fR = /module_path/\fBPNAME\(fm\fR-\fBPVERSION\fR.tm .CE @@ -224,6 +231,7 @@ to the minor version of the interpreter. .RS .PP For example for Tcl 8.4 the paths searched are: +.PP .CS \fB[info library]/../tcl8/8.4\fR \fB[info library]/../tcl8/8.3\fR @@ -277,6 +285,7 @@ These paths are seen and therefore shared by all Tcl shells in the Note that \fIX\fR and \fIy\fR follow the general rules set out above. In other words, Tcl 8.4, for example, will look at these 5 environment variables: +.PP .CS \fB$::env(TCL8.4_TM_PATH)\fR \fB$::env(TCL8_4_TM_PATH)\fR \fB$::env(TCL8.3_TM_PATH)\fR \fB$::env(TCL8_3_TM_PATH)\fR @@ -292,3 +301,6 @@ package(n), Tcl Improvement Proposal #189 (online at http://tip.tcl.tk/190.html) .SH "KEYWORDS" modules, package +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/trace.n b/doc/trace.n index 88a9e81..37e5532 100644 --- a/doc/trace.n +++ b/doc/trace.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: trace.n,v 1.26 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: trace.n,v 1.27 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH trace n "8.4" Tcl "Tcl Built-In Commands" @@ -56,9 +56,11 @@ execute them. When the trace triggers, depending on the operations being traced, a number of arguments are appended to \fIcommandPrefix\fR so that the actual command is as follows: +.PP .CS \fIcommandPrefix oldName newName op\fR .CE +.PP \fIOldName\fR and \fInewName\fR give the traced command's current (old) name, and the name to which it is being renamed (the empty string if this is a .QW delete @@ -123,9 +125,11 @@ number of arguments are appended to \fIcommandPrefix\fR so that the actual command is as follows: .PP For \fBenter\fR and \fBenterstep\fR operations: +.PP .CS \fIcommandPrefix command-string op\fR .CE +.PP \fICommand-string\fR gives the complete current command being executed (the traced command for a \fBenter\fR operation, an arbitrary command for a \fBenterstep\fR operation), including @@ -139,9 +143,11 @@ course when the command is subsequently executed, an error will occur. .PP For \fBleave\fR and \fBleavestep\fR operations: +.PP .CS \fIcommand command-string code result op\fR .CE +.PP \fICommand-string\fR gives the complete current command being executed (the traced command for a \fBenter\fR operation, an arbitrary command for a \fBenterstep\fR operation), including @@ -219,9 +225,11 @@ interpreter in which to execute them. .PP When the trace triggers, three arguments are appended to \fIcommandPrefix\fR so that the actual command is as follows: +.PP .CS \fIcommandPrefix name1 name2 op\fR .CE +.PP \fIName1\fR and \fIname2\fR give the name(s) for the variable being accessed: if the variable is a scalar then \fIname1\fR gives the variable's name and \fIname2\fR is an empty string; @@ -370,9 +378,11 @@ future version of Tcl. They use an older syntax in which \fBarray\fR, list, but simply a string concatenation of the operations, such as \fBrwua\fR. .SH EXAMPLES +.PP Print a message whenever either of the global variables \fBfoo\fR and \fBbar\fR are updated, even if they have a different local name at the time (which can be done with the \fBupvar\fR command): +.PP .CS proc tracer {varname args} { upvar #0 $varname var @@ -384,6 +394,7 @@ proc tracer {varname args} { .PP Ensure that the global variable \fBfoobar\fR always contains the product of the global variables \fBfoo\fR and \fBbar\fR: +.PP .CS proc doMult args { global foo bar foobar @@ -395,6 +406,7 @@ proc doMult args { .PP Print a trace of what commands are executed during the processing of a Tcl procedure: +.PP .CS proc x {} { y } proc y {} { z } @@ -411,3 +423,6 @@ x set(n), unset(n) .SH KEYWORDS read, command, rename, variable, write, trace, unset +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/unload.n b/doc/unload.n index b02c124..965149a 100644 --- a/doc/unload.n +++ b/doc/unload.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: unload.n,v 1.12 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: unload.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH unload n 8.5 Tcl "Tcl Built-In Commands" @@ -90,6 +90,7 @@ detached from the process. .SS "UNLOAD HOOK PROTOTYPE" .PP The unload procedure must match the following prototype: +.PP .CS typedef int \fBTcl_PackageUnloadProc\fR( Tcl_Interp *\fIinterp\fR, @@ -149,10 +150,13 @@ from the application while some interpreters will continue to use it). .PP If an unloadable module in the file \fBfoobar.dll\fR had been loaded using the \fBload\fR command like this (on Windows): +.PP .CS load c:/some/dir/foobar.dll .CE +.PP then it would be unloaded like this: +.PP .CS \fBunload\fR c:/some/dir/foobar.dll .CE @@ -165,3 +169,6 @@ without having to shut down the overall Tcl process. info sharedlibextension, load(n), safe(n) .SH KEYWORDS binary code, unloading, safe interpreter, shared library +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/unset.n b/doc/unset.n index ab8e4e1..2608051 100644 --- a/doc/unset.n +++ b/doc/unset.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: unset.n,v 1.13 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: unset.n,v 1.14 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH unset n 8.4 Tcl "Tcl Built-In Commands" @@ -37,8 +37,10 @@ deleted. An error can occur when the named variable does not exist, or the name refers to an array element but the variable is a scalar, or the name refers to a variable in a non-existent namespace. .SH EXAMPLE +.PP Create an array containing a mapping from some numbers to their squares and remove the array elements for non-prime numbers: +.PP .CS array set squares { 1 1 6 36 diff --git a/doc/update.n b/doc/update.n index 2738782..91f329c 100644 --- a/doc/update.n +++ b/doc/update.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: update.n,v 1.10 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: update.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH update n 7.5 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ update \- Process pending events and idle callbacks .SH SYNOPSIS \fBupdate\fR ?\fBidletasks\fR? .BE - .SH DESCRIPTION .PP This command is used to bring the application @@ -45,7 +44,9 @@ the application to respond to events such as user interactions; if you occasionally call \fBupdate\fR then user input will be processed during the next call to \fBupdate\fR. .SH EXAMPLE +.PP Run computations for about a second and then finish: +.PP .CS set x 1000 set done 0 @@ -60,9 +61,7 @@ while {!$done} { \fBupdate\fR } .CE - .SH "SEE ALSO" after(n), interp(n) - .SH KEYWORDS event, flush, handler, idle, update diff --git a/doc/uplevel.n b/doc/uplevel.n index d1e5dc1..f4a26e7 100644 --- a/doc/uplevel.n +++ b/doc/uplevel.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: uplevel.n,v 1.10 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: uplevel.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH uplevel n "" Tcl "Tcl Built-In Commands" @@ -42,16 +42,20 @@ at top-level (only global variables will be visible). The \fBuplevel\fR command causes the invoking procedure to disappear from the procedure calling stack while the command is being executed. In the above example, suppose \fBc\fR invokes the command +.PP .CS \fBuplevel\fR 1 {set x 43; d} .CE +.PP where \fBd\fR is another Tcl procedure. The \fBset\fR command will modify the variable \fBx\fR in \fBb\fR's context, and \fBd\fR will execute at level 3, as if called from \fBb\fR. If it in turn executes the command +.PP .CS \fBuplevel\fR {set x 42} .CE +.PP then the \fBset\fR command will modify the same variable \fBx\fR in \fBb\fR's context: the procedure \fBc\fR does not appear to be on the call stack when \fBd\fR is executing. The \fBinfo level\fR command may @@ -77,6 +81,7 @@ control constructs. This example shows how (without error handling) it can be used to create a \fBdo\fR command that is the counterpart of \fBwhile\fR except for always performing the test after running the loop body: +.PP .CS proc do {body while condition} { if {$while ne "while"} { @@ -95,3 +100,6 @@ proc do {body while condition} { apply(n), namespace(n), upvar(n) .SH KEYWORDS context, level, namespace, stack frame, variables +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/upvar.n b/doc/upvar.n index 214aea9..8242a43 100644 --- a/doc/upvar.n +++ b/doc/upvar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: upvar.n,v 1.16 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: upvar.n,v 1.17 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH upvar n "" Tcl "Tcl Built-In Commands" @@ -45,12 +45,14 @@ The \fBupvar\fR command simplifies the implementation of call-by-name procedure calling and also makes it easier to build new control constructs as Tcl procedures. For example, consider the following procedure: +.PP .CS proc \fIadd2\fR name { \fBupvar\fR $name x set x [expr {$x + 2}] } .CE +.PP If \fIadd2\fR is invoked with an argument giving the name of a variable, it adds two to the value of that variable. Although \fIadd2\fR could have been implemented using \fBuplevel\fR @@ -85,6 +87,7 @@ will be .QW "\fIlocalVar\fR" rather than .QW "\fIoriginalVar\fR" : +.PP .CS proc \fItraceproc\fR { name index op } { puts $name @@ -106,15 +109,17 @@ made to \fImyVar\fR will not be passed to subprocesses correctly. .SH EXAMPLE A \fBdecr\fR command that works like \fBincr\fR except it subtracts the value from the variable instead of adding it: +.PP .CS proc decr {varName {decrement 1}} { \fBupvar\fR 1 $varName var incr var [expr {-$decrement}] } .CE - .SH "SEE ALSO" global(n), namespace(n), uplevel(n), variable(n) - .SH KEYWORDS context, frame, global, level, namespace, procedure, variable +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/doc/variable.n b/doc/variable.n index 0bb7ce9..5497977 100644 --- a/doc/variable.n +++ b/doc/variable.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: variable.n,v 1.11 2008/10/02 19:18:12 mistachkin Exp $ +'\" RCS: @(#) $Id: variable.n,v 1.12 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH variable n 8.0 Tcl "Tcl Built-In Commands" @@ -18,7 +18,6 @@ variable \- create and initialize a namespace variable .sp \fBvariable \fR?\fIname value...\fR? .BE - .SH DESCRIPTION .PP This command is normally used within a @@ -61,7 +60,9 @@ After the variable has been declared, elements within the array can be set using ordinary \fBset\fR or \fBarray\fR commands. .SH EXAMPLES +.PP Create a variable in a namespace: +.PP .CS namespace eval foo { \fBvariable\fR bar 12345 @@ -69,6 +70,7 @@ namespace eval foo { .CE .PP Create an array in a namespace: +.PP .CS namespace eval someNS { \fBvariable\fR someAry @@ -80,6 +82,7 @@ namespace eval someNS { .CE .PP Access variables in namespaces from a procedure: +.PP .CS namespace eval foo { proc spong {} { @@ -93,9 +96,7 @@ namespace eval foo { } } .CE - .SH "SEE ALSO" global(n), namespace(n), upvar(n) - .SH KEYWORDS global, namespace, procedure, variable diff --git a/doc/vwait.n b/doc/vwait.n index 1982c9a..89796c6 100644 --- a/doc/vwait.n +++ b/doc/vwait.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: vwait.n,v 1.7 2008/01/09 08:09:56 georgeps Exp $ +'\" RCS: @(#) $Id: vwait.n,v 1.8 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH vwait n 8.0 Tcl "Tcl Built-In Commands" @@ -15,7 +15,6 @@ vwait \- Process events until a variable is written .SH SYNOPSIS \fBvwait\fR \fIvarName\fR .BE - .SH DESCRIPTION .PP This command enters the Tcl event loop to process events, blocking @@ -36,15 +35,18 @@ for a long time. During this time the top-level \fBvwait\fR is blocked waiting for the event handler to complete, so it cannot return either. .SH EXAMPLES +.PP Run the event-loop continually until some event calls \fBexit\fR. (You can use any variable not mentioned elsewhere, but the name \fIforever\fR reminds you at a glance of the intent.) +.PP .CS \fBvwait\fR forever .CE .PP Wait five seconds for a connection to a server socket, otherwise close the socket and continue running the script: +.PP .CS # Initialise the state after 5000 set state timeout @@ -73,9 +75,7 @@ switch $state { } } .CE - .SH "SEE ALSO" global(n), update(n) - .SH KEYWORDS event, variable, wait diff --git a/doc/while.n b/doc/while.n index bd74f45..cc4921c 100644 --- a/doc/while.n +++ b/doc/while.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: while.n,v 1.5 2004/10/27 14:43:54 dkf Exp $ +'\" RCS: @(#) $Id: while.n,v 1.6 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH while n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ while \- Execute script repeatedly as long as a condition is met .SH SYNOPSIS \fBwhile \fItest body\fR .BE - .SH DESCRIPTION .PP The \fBwhile\fR command evaluates \fItest\fR as an expression @@ -43,6 +42,7 @@ expression is evaluated (before each loop iteration), so changes in the variables will be visible. For an example, try the following script with and without the braces around \fB$x<10\fR: +.PP .CS set x 0 \fBwhile\fR {$x<10} { @@ -51,17 +51,17 @@ set x 0 } .CE .SH EXAMPLE +.PP Read lines from a channel until we get to the end of the stream, and print them out with a line-number prepended: +.PP .CS set lineCount 0 \fBwhile\fR {[gets $chan line] >= 0} { puts "[incr lineCount]: $line" } .CE - .SH "SEE ALSO" break(n), continue(n), for(n), foreach(n) - .SH KEYWORDS boolean value, loop, test, while -- cgit v0.12 From c7737419286a172921b8edcbf3b4f40c02e02dae Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 17 Oct 2008 16:32:57 +0000 Subject: * generic/tclCompile.h: Declare the internal tclInstructionTable * generic/tclExecute.c: to simply be "const", not CONST86. * generic/tclCmdAH.c: whitespace. * generic/tclCmdIL.c: Uninitialized variable warning. * generic/tclTest.c: const correctness warning. --- ChangeLog | 9 +++++++++ generic/tclCmdAH.c | 4 ++-- generic/tclCmdIL.c | 4 ++-- generic/tclCompile.h | 4 ++-- generic/tclExecute.c | 6 +++--- generic/tclTest.c | 6 +++--- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1e0cba..68f0d8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-10-17 Don Porter + + * generic/tclCompile.h: Declare the internal tclInstructionTable + * generic/tclExecute.c: to simply be "const", not CONST86. + + * generic/tclCmdAH.c: whitespace. + * generic/tclCmdIL.c: Uninitialized variable warning. + * generic/tclTest.c: const correctness warning. + 2008-10-17 Donal K. Fellows * doc/*: Many very small formatting fixes. diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 342188e..2e9b5b9 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.106 2008/10/14 22:37:53 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.107 2008/10/17 16:32:58 dgp Exp $ */ #include "tclInt.h" @@ -51,7 +51,7 @@ static inline void ForeachCleanup(Tcl_Interp *interp, struct ForeachState *statePtr); static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_FSStatProc *statProc, Tcl_StatBuf *statPtr); -static const char *GetTypeFromMode(int mode); +static const char * GetTypeFromMode(int mode); static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); static Tcl_NRPostProc CatchObjCmdCallback; diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index a6ee362..cd82228 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.162 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.163 2008/10/17 16:32:58 dgp Exp $ */ #include "tclInt.h" @@ -2445,7 +2445,7 @@ Tcl_LrepeatObjCmd( /* The argument objects. */ { int elementCount, i, totalElems; - Tcl_Obj *listPtr, **dataArray; + Tcl_Obj *listPtr, **dataArray = NULL; /* * Check arguments for legality: diff --git a/generic/tclCompile.h b/generic/tclCompile.h index aba100a..102a9ec 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.110 2008/10/10 04:09:27 das Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.111 2008/10/17 16:32:58 dgp Exp $ */ #ifndef _TCLCOMPILATION @@ -694,7 +694,7 @@ typedef struct InstructionDesc { /* The type of each operand. */ } InstructionDesc; -MODULE_SCOPE InstructionDesc CONST86 tclInstructionTable[]; +MODULE_SCOPE InstructionDesc const tclInstructionTable[]; /* * Compilation of some Tcl constructs such as if commands and the logical or diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 2daa7ed..99f16db 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.417 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.418 2008/10/17 16:32:58 dgp Exp $ */ #include "tclInt.h" @@ -660,7 +660,7 @@ static int EvalStatsCmd(ClientData clientData, Tcl_Obj *const objv[]); #endif /* TCL_COMPILE_STATS */ #ifdef TCL_COMPILE_DEBUG -static CONST86 char * GetOpcodeName(unsigned char *pc); +static const char * GetOpcodeName(unsigned char *pc); static void PrintByteCodeInfo(ByteCode *codePtr); static const char * StringForResultCode(int result); static void ValidatePcAndStackTop(ByteCode *codePtr, @@ -8431,7 +8431,7 @@ GetExceptRangeForPc( */ #ifdef TCL_COMPILE_DEBUG -static CONST86 char * +static const char * GetOpcodeName( unsigned char *pc) /* Points to the instruction whose name should * be returned. */ diff --git a/generic/tclTest.c b/generic/tclTest.c index 1ddfb5f..d8c00b6 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.128 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.129 2008/10/17 16:32:58 dgp Exp $ */ #define TCL_TEST @@ -5891,7 +5891,7 @@ TestFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - const char *msg; + char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6263,7 +6263,7 @@ TestSimpleFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - const char *msg; + char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); -- cgit v0.12 From 65253d4d79e601e5e539cf92e633a4f242358c39 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 17 Oct 2008 18:06:08 +0000 Subject: * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removed debug output in C++ comment. --- ChangeLog | 5 +++++ generic/tclIORTrans.c | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68f0d8e..db92ad8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-17 Andreas Kupries + + * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removed + debug output in C++ comment. + 2008-10-17 Don Porter * generic/tclCompile.h: Declare the internal tclInstructionTable diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index bb7aebd..55d0807 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.4 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.5 2008/10/17 18:06:08 andreas_kupries Exp $ */ #include @@ -2100,10 +2100,6 @@ DeleteReflectedTransformMap( hPtr != NULL; hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch)) { rtPtr = (ReflectedTransform *) Tcl_GetHashValue (hPtr); - - //fprintf(stdout,"[%ld] dd t-rcm %p /h %p /rt %p\n", (long)Tcl_GetCurrentThread(),rtmPtr,hPtr,rtPtr);fflush(stdout); - - rtPtr->interp = NULL; Tcl_DeleteHashEntry(hPtr); } -- cgit v0.12 From 6da2631675df15f4060dcb66bf536114fbe49e53 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 17 Oct 2008 18:42:12 +0000 Subject: CONST -> const --- ChangeLog | 6 ++++++ generic/tclOO.decls | 44 ++++++++++++++++++++++---------------------- generic/tclOODecls.h | 48 ++++++++++++++++++++++++------------------------ generic/tclOOIntDecls.h | 36 ++++++++++++++++++------------------ 4 files changed, 70 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index db92ad8..a5fcbed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-17 Jan Nijtmans + + * generic/tclOO.decls: CONST -> const. + * generic/tclOODecls.h: (regenerated) + * generic/tclOOIntDecls.h: (regenerated) + 2008-10-17 Andreas Kupries * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removed diff --git a/generic/tclOO.decls b/generic/tclOO.decls index 1868397..dd33f14 100644 --- a/generic/tclOO.decls +++ b/generic/tclOO.decls @@ -1,5 +1,5 @@ # -*- tcl -*- -# $Id: tclOO.decls,v 1.3 2008/07/24 22:57:56 nijtmans Exp $ +# $Id: tclOO.decls,v 1.4 2008/10/17 18:42:12 nijtmans Exp $ # public API library tclOO @@ -8,8 +8,8 @@ hooks tclOOInt declare 0 generic { Tcl_Object Tcl_CopyObjectInstance(Tcl_Interp *interp, - Tcl_Object sourceObject, CONST char *targetName, - CONST char *targetNamespaceName) + Tcl_Object sourceObject, const char *targetName, + const char *targetNamespaceName) } declare 1 generic { Tcl_Object Tcl_GetClassAsObject(Tcl_Class clazz) @@ -36,7 +36,7 @@ declare 8 generic { int Tcl_MethodIsPublic(Tcl_Method method) } declare 9 generic { - int Tcl_MethodIsType(Tcl_Method method, CONST Tcl_MethodType *typePtr, + int Tcl_MethodIsType(Tcl_Method method, const Tcl_MethodType *typePtr, ClientData *clientDataPtr) } declare 10 generic { @@ -44,18 +44,18 @@ declare 10 generic { } declare 11 generic { Tcl_Method Tcl_NewInstanceMethod(Tcl_Interp *interp, Tcl_Object object, - Tcl_Obj *nameObj, int isPublic, CONST Tcl_MethodType *typePtr, + Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, ClientData clientData) } declare 12 generic { Tcl_Method Tcl_NewMethod(Tcl_Interp *interp, Tcl_Class cls, - Tcl_Obj *nameObj, int isPublic, CONST Tcl_MethodType *typePtr, + Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, ClientData clientData) } declare 13 generic { Tcl_Object Tcl_NewObjectInstance(Tcl_Interp *interp, Tcl_Class cls, - CONST char *nameStr, CONST char *nsNameStr, int objc, - Tcl_Obj *CONST *objv, int skip) + const char *nameStr, const char *nsNameStr, int objc, + Tcl_Obj *const *objv, int skip) } declare 14 generic { int Tcl_ObjectDeleted(Tcl_Object object) @@ -74,23 +74,23 @@ declare 18 generic { } declare 19 generic { ClientData Tcl_ClassGetMetadata(Tcl_Class clazz, - CONST Tcl_ObjectMetadataType *typePtr) + const Tcl_ObjectMetadataType *typePtr) } declare 20 generic { void Tcl_ClassSetMetadata(Tcl_Class clazz, - CONST Tcl_ObjectMetadataType *typePtr, ClientData metadata) + const Tcl_ObjectMetadataType *typePtr, ClientData metadata) } declare 21 generic { ClientData Tcl_ObjectGetMetadata(Tcl_Object object, - CONST Tcl_ObjectMetadataType *typePtr) + const Tcl_ObjectMetadataType *typePtr) } declare 22 generic { void Tcl_ObjectSetMetadata(Tcl_Object object, - CONST Tcl_ObjectMetadataType *typePtr, ClientData metadata) + const Tcl_ObjectMetadataType *typePtr, ClientData metadata) } declare 23 generic { int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp, - Tcl_ObjectContext context, int objc, Tcl_Obj *CONST *objv, + Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, int skip) } declare 24 generic { @@ -118,13 +118,13 @@ declare 0 generic { declare 1 generic { Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, - CONST Tcl_MethodType *typePtr, ClientData clientData, + const Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr) } declare 2 generic { Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp, Class *clsPtr, - int flags, Tcl_Obj *nameObj, CONST char *namePtr, - Tcl_Obj *argsObj, Tcl_Obj *bodyObj, CONST Tcl_MethodType *typePtr, + int flags, Tcl_Obj *nameObj, const char *namePtr, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr) } declare 3 generic { @@ -139,7 +139,7 @@ declare 4 generic { } declare 5 generic { int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST *objv, int publicOnly, Class *startCls) + Tcl_Obj *const *objv, int publicOnly, Class *startCls) } declare 6 generic { int TclOOIsReachable(Class *targetPtr, Class *startPtr) @@ -169,21 +169,21 @@ declare 10 generic { declare 11 generic { int TclOOInvokeObject(Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, - Tcl_Obj *CONST *objv) + Tcl_Obj *const *objv) } declare 12 generic { void TclOOObjectSetFilters(Object *oPtr, int numFilters, - Tcl_Obj *CONST *filters) + Tcl_Obj *const *filters) } declare 13 generic { void TclOOClassSetFilters(Tcl_Interp *interp, Class *classPtr, - int numFilters, Tcl_Obj *CONST *filters) + int numFilters, Tcl_Obj *const *filters) } declare 14 generic { void TclOOObjectSetMixins(Object *oPtr, int numMixins, - Class *CONST *mixins) + Class *const *mixins) } declare 15 generic { void TclOOClassSetMixins(Tcl_Interp *interp, Class *classPtr, - int numMixins, Class *CONST *mixins) + int numMixins, Class *const *mixins) } diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index c86267c..31f807d 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.8 2008/07/24 22:57:57 nijtmans Exp $ + * $Id: tclOODecls.h,v 1.9 2008/10/17 18:42:12 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -46,8 +46,8 @@ extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); /* 0 */ EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, Tcl_Object sourceObject, - CONST char * targetName, - CONST char * targetNamespaceName); + const char * targetName, + const char * targetNamespaceName); #endif #ifndef Tcl_GetClassAsObject_TCL_DECLARED #define Tcl_GetClassAsObject_TCL_DECLARED @@ -94,7 +94,7 @@ EXTERN int Tcl_MethodIsPublic (Tcl_Method method); #define Tcl_MethodIsType_TCL_DECLARED /* 9 */ EXTERN int Tcl_MethodIsType (Tcl_Method method, - CONST Tcl_MethodType * typePtr, + const Tcl_MethodType * typePtr, ClientData * clientDataPtr); #endif #ifndef Tcl_MethodName_TCL_DECLARED @@ -107,7 +107,7 @@ EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); /* 11 */ EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, - int isPublic, CONST Tcl_MethodType * typePtr, + int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); #endif #ifndef Tcl_NewMethod_TCL_DECLARED @@ -115,16 +115,16 @@ EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, /* 12 */ EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, - CONST Tcl_MethodType * typePtr, + const Tcl_MethodType * typePtr, ClientData clientData); #endif #ifndef Tcl_NewObjectInstance_TCL_DECLARED #define Tcl_NewObjectInstance_TCL_DECLARED /* 13 */ EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, - Tcl_Class cls, CONST char * nameStr, - CONST char * nsNameStr, int objc, - Tcl_Obj *CONST * objv, int skip); + Tcl_Class cls, const char * nameStr, + const char * nsNameStr, int objc, + Tcl_Obj *const * objv, int skip); #endif #ifndef Tcl_ObjectDeleted_TCL_DECLARED #define Tcl_ObjectDeleted_TCL_DECLARED @@ -157,26 +157,26 @@ EXTERN int Tcl_ObjectContextSkippedArgs ( #define Tcl_ClassGetMetadata_TCL_DECLARED /* 19 */ EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, - CONST Tcl_ObjectMetadataType * typePtr); + const Tcl_ObjectMetadataType * typePtr); #endif #ifndef Tcl_ClassSetMetadata_TCL_DECLARED #define Tcl_ClassSetMetadata_TCL_DECLARED /* 20 */ EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, - CONST Tcl_ObjectMetadataType * typePtr, + const Tcl_ObjectMetadataType * typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectGetMetadata_TCL_DECLARED #define Tcl_ObjectGetMetadata_TCL_DECLARED /* 21 */ EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, - CONST Tcl_ObjectMetadataType * typePtr); + const Tcl_ObjectMetadataType * typePtr); #endif #ifndef Tcl_ObjectSetMetadata_TCL_DECLARED #define Tcl_ObjectSetMetadata_TCL_DECLARED /* 22 */ EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, - CONST Tcl_ObjectMetadataType * typePtr, + const Tcl_ObjectMetadataType * typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED @@ -184,7 +184,7 @@ EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, /* 23 */ EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, - Tcl_Obj *CONST * objv, int skip); + Tcl_Obj *const * objv, int skip); #endif #ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED #define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED @@ -219,7 +219,7 @@ typedef struct TclOOStubs { int magic; CONST struct TclOOStubHooks *hooks; - Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, CONST char * targetName, CONST char * targetNamespaceName); /* 0 */ + Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ @@ -228,21 +228,21 @@ typedef struct TclOOStubs { Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ - int (*tcl_MethodIsType) (Tcl_Method method, CONST Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ + int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ - Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, CONST Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ - Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, CONST Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ - Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, CONST char * nameStr, CONST char * nsNameStr, int objc, Tcl_Obj *CONST * objv, int skip); /* 13 */ + Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ + Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ + Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ - ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, CONST Tcl_ObjectMetadataType * typePtr); /* 19 */ - void (*tcl_ClassSetMetadata) (Tcl_Class clazz, CONST Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ - ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, CONST Tcl_ObjectMetadataType * typePtr); /* 21 */ - void (*tcl_ObjectSetMetadata) (Tcl_Object object, CONST Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ - int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *CONST * objv, int skip); /* 23 */ + ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ + void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ + ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ + void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ + int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index 680aa61..49aa7de 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.8 2008/07/24 22:57:57 nijtmans Exp $ + * $Id: tclOOIntDecls.h,v 1.9 2008/10/17 18:42:12 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -41,7 +41,7 @@ EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - CONST Tcl_MethodType * typePtr, + const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); #endif #ifndef TclOOMakeProcMethod_TCL_DECLARED @@ -49,9 +49,9 @@ EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, /* 2 */ EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, - CONST char * namePtr, Tcl_Obj * argsObj, + const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - CONST Tcl_MethodType * typePtr, + const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); #endif #ifndef TclOONewProcInstanceMethod_TCL_DECLARED @@ -75,7 +75,7 @@ EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, /* 5 */ EXTERN int TclOOObjectCmdCore (Object * oPtr, Tcl_Interp * interp, int objc, - Tcl_Obj *CONST * objv, int publicOnly, + Tcl_Obj *const * objv, int publicOnly, Class * startCls); #endif #ifndef TclOOIsReachable_TCL_DECLARED @@ -128,33 +128,33 @@ EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, EXTERN int TclOOInvokeObject (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, - Tcl_Obj *CONST * objv); + Tcl_Obj *const * objv); #endif #ifndef TclOOObjectSetFilters_TCL_DECLARED #define TclOOObjectSetFilters_TCL_DECLARED /* 12 */ EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, - Tcl_Obj *CONST * filters); + Tcl_Obj *const * filters); #endif #ifndef TclOOClassSetFilters_TCL_DECLARED #define TclOOClassSetFilters_TCL_DECLARED /* 13 */ EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, Class * classPtr, int numFilters, - Tcl_Obj *CONST * filters); + Tcl_Obj *const * filters); #endif #ifndef TclOOObjectSetMixins_TCL_DECLARED #define TclOOObjectSetMixins_TCL_DECLARED /* 14 */ EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, - Class *CONST * mixins); + Class *const * mixins); #endif #ifndef TclOOClassSetMixins_TCL_DECLARED #define TclOOClassSetMixins_TCL_DECLARED /* 15 */ EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, Class * classPtr, int numMixins, - Class *CONST * mixins); + Class *const * mixins); #endif typedef struct TclOOIntStubs { @@ -162,21 +162,21 @@ typedef struct TclOOIntStubs { CONST struct TclOOIntStubHooks *hooks; Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ - Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, CONST Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ - Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, CONST char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, CONST Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ + Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ + Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ - int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *CONST * objv, int publicOnly, Class * startCls); /* 5 */ + int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ - int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *CONST * objv); /* 11 */ - void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *CONST * filters); /* 12 */ - void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *CONST * filters); /* 13 */ - void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *CONST * mixins); /* 14 */ - void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *CONST * mixins); /* 15 */ + int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ + void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ + void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ + void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ + void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ } TclOOIntStubs; #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) -- cgit v0.12 From 5942e4e3e68b72b0b2137148ea4905db765c360d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 17 Oct 2008 20:08:45 +0000 Subject: fix missing "-Wl," prefix in HP-UX build --- unix/configure | 2 +- unix/tcl.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/configure b/unix/configure index 7accaff..f4638a1 100755 --- a/unix/configure +++ b/unix/configure @@ -6727,7 +6727,7 @@ fi DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='-Wl,+s +b ${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='-Wl,+s -Wl,+b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 3e4979a..c1dc401 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1267,7 +1267,7 @@ dnl AC_CHECK_TOOL(AR, ar) DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='-Wl,+s +b ${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='-Wl,+s -Wl,+b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" ]) AS_IF([test "$GCC" = yes], [ -- cgit v0.12 From 103fdf84aa05fef3d37b5a2178fc75eefe64375b Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 17 Oct 2008 20:14:16 +0000 Subject: fix missing "-Wl," prefix in HP-UX build --- unix/configure | 2 +- unix/tcl.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/configure b/unix/configure index f4638a1..3e4bf79 100755 --- a/unix/configure +++ b/unix/configure @@ -6727,7 +6727,7 @@ fi DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='-Wl,+s -Wl,+b ${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c1dc401..14db6a4 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1267,7 +1267,7 @@ dnl AC_CHECK_TOOL(AR, ar) DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='-Wl,+s -Wl,+b ${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" ]) AS_IF([test "$GCC" = yes], [ -- cgit v0.12 From 89675f56467f3a8c563caaf05cbd38f46feabfe2 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 19 Oct 2008 16:22:20 +0000 Subject: Improve documentation of [tcl::prefix]. --- ChangeLog | 5 +++++ doc/GetIndex.3 | 7 ++----- doc/prefix.n | 50 +++++++++++++++++++++++++++++--------------------- 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5fcbed..9f20624 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-19 Donal K. Fellows + + * doc/prefix.n: Improved the documentation by fixing formatting, + adding good-practice recommendations and cross-references, etc. + 2008-10-17 Jan Nijtmans * generic/tclOO.decls: CONST -> const. diff --git a/doc/GetIndex.3 b/doc/GetIndex.3 index c0cf623..7d138eb 100644 --- a/doc/GetIndex.3 +++ b/doc/GetIndex.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetIndex.3,v 1.23 2008/10/04 11:04:42 nijtmans Exp $ +'\" RCS: @(#) $Id: GetIndex.3,v 1.24 2008/10/19 16:22:20 dkf Exp $ '\" .so man.macros .TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures" @@ -51,7 +51,6 @@ operation. The only bit that is currently defined is \fBTCL_EXACT\fR. The index of the string in \fItablePtr\fR that matches the value of \fIobjPtr\fR is returned here. .BE - .SH DESCRIPTION .PP This procedure provides an efficient way for looking up keywords, @@ -95,9 +94,7 @@ array of characters at \fItablePtr\fR+\fIoffset\fR bytes, etc.) This is particularly useful when processing things like \fBTk_ConfigurationSpec\fR, whose string keys are in the same place in each of several array elements. - .SH "SEE ALSO" -Tcl_WrongNumArgs - +prefix(n), Tcl_WrongNumArgs(3) .SH KEYWORDS index, object, table lookup diff --git a/doc/prefix.n b/doc/prefix.n index 6247583..927318a 100644 --- a/doc/prefix.n +++ b/doc/prefix.n @@ -4,14 +4,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: prefix.n,v 1.3 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: prefix.n,v 1.4 2008/10/19 16:22:20 dkf Exp $ '\" .so man.macros .TH prefix n 8.6 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -prefix \- Facilities for prefix matching +prefix \- facilities for prefix matching .SH SYNOPSIS .nf \fB::tcl::prefix all\fR \fItable\fR \fIstring\fR @@ -26,28 +26,33 @@ The following commands are supported: .TP \fB::tcl::prefix all\fR \fItable\fR \fIstring\fR . -Returns a list of all elements in \fItable\fR that begins with -the prefix \fIstring\fR. +Returns a list of all elements in \fItable\fR that begin with the prefix +\fIstring\fR. .TP \fB::tcl::prefix longest\fR \fItable\fR \fIstring\fR . -Returns the longest common prefix among all elements in \fItable\fR that -begins with the prefix \fIstring\fR. +Returns the longest common prefix of all elements in \fItable\fR that +begin with the prefix \fIstring\fR. .TP \fB::tcl::prefix match\fR ?\fIoptions\fR? \fItable\fR \fIstring\fR . If \fIstring\fR equals one element in \fItable\fR or is a prefix to exactly -one element, the matched element is returned. If not, the result depends -on the \fB\-error\fR option. -.TP 20 -\fB\-exact\fR +one element, the matched element is returned. If not, the result depends +on the \fB\-error\fR option. (It is recommended that the \fItable\fR be sorted +before use with this subcommand, so that the list of matches presented in the +error message also becomes sorted, though this is not strictly necessary for +the operation of this subcommand itself.) +.RS +.TP +\fB\-exact\fR\0 . Accept only exact matches. -.TP 20 +.TP \fB\-message\0\fIstring\fR . -Use \fIstring\fR in the error message at a mismatch. Default is "option". -.TP 20 +Use \fIstring\fR in the error message at a mismatch. Default is +.QW option . +.TP \fB\-error\0\fIoptions\fR . The \fIoptions\fR are used when no match is found. If \fIoptions\fR is empty, @@ -55,14 +60,17 @@ no error is generated and an empty string is returned. Otherwise the \fIoptions\fR are used as \fBreturn\fR options when generating the error message. The default corresponds to setting .QW "\-level 0" . -Example: If \fB\-error\fR "\-errorcode MyError \-level 1" is used, an -error would be generated as: +Example: If +.QW "\fB\-error\fR {\-errorcode MyError \-level 1}" +is used, an error would be generated as: .RS .PP .CS -return \-errorcode MyError \-level 1 \-code error "ErrMsg" +return \-errorcode MyError \-level 1 \-code error \e + "ambiguous option ..." .CE .RE +.RE .SH "EXAMPLES" .PP Basic use: @@ -88,23 +96,23 @@ Simplifying option matching: .CS array set opts {\-apa 1 \-bepa "" \-cepa 0} foreach {arg val} $args { - set opts([prefix match {\-apa \-bepa \-cepa} $arg]) $val + set opts([\fBprefix match\fR {\-apa \-bepa \-cepa} $arg]) $val } .CE .PP -Switch supporting prefixes: +Creating a \fBswitch\fR that supports prefixes: .PP .CS -switch [prefix match {apa bepa cepa} $arg] { +switch [\fBprefix match\fR {apa bepa cepa} $arg] { apa { } bepa { } cepa { } } .CE .SH "SEE ALSO" -lsearch(n) +lsearch(n), namespace(n), string(n), Tcl_GetIndexFromObj(3) .SH "KEYWORDS" -prefix +prefix, table lookup '\" Local Variables: '\" mode: nroff '\" End: -- cgit v0.12 From 0aae1d13f15af2e36636d02db11784d0884d59d7 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 19 Oct 2008 16:27:58 +0000 Subject: Document [info coroutine]. --- ChangeLog | 2 ++ doc/info.n | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9f20624..52b3507 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-10-19 Donal K. Fellows + * doc/info.n: Added documentation of [info coroutine]. + * doc/prefix.n: Improved the documentation by fixing formatting, adding good-practice recommendations and cross-references, etc. diff --git a/doc/info.n b/doc/info.n index a5a3eaa..58bf428 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.31 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: info.n,v 1.32 2008/10/19 16:27:58 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -79,6 +79,13 @@ to allow users to type in commands that span multiple lines; if the command is not complete, the script can delay evaluating it until additional lines have been typed to complete the command. .TP +\fBinfo coroutine\fR +.VS 8.6 +Returns the name of the currently executing coroutine, or the empty string if +either no coroutine is currently executing, or the current coroutine has been +deleted (but has not yet returned or yielded since deletion). +.VE 8.6 +.TP \fBinfo default \fIprocname arg varname\fR . \fIProcname\fR must be the name of a Tcl command procedure and \fIarg\fR -- cgit v0.12 From 16612f43c29a1083805afc944354b3e07311e161 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 19 Oct 2008 16:52:18 +0000 Subject: Check syntax of [info coroutine] args, i.e. there are none. --- ChangeLog | 3 +++ generic/tclBasic.c | 75 ++++++++++++++++++++++++++---------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52b3507..ba96f3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-10-19 Donal K. Fellows + * generic/tclBasic.c (TclInfoCoroutineCmd): Added code to make this + check for being invoked in a syntactically correct way. + * doc/info.n: Added documentation of [info coroutine]. * doc/prefix.n: Improved the documentation by fixing formatting, diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b2c9e7c..7c42f4a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.372 2008/10/08 15:10:30 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.373 2008/10/19 16:52:18 dkf Exp $ */ #include "tclInt.h" @@ -2267,7 +2267,7 @@ TclInvokeStringCommand( * Invoke the command's string-based Tcl_CmdProc. */ - result = (*cmdPtr->proc)(cmdPtr->clientData, interp, objc, argv); + result = cmdPtr->proc(cmdPtr->clientData, interp, objc, argv); TclStackFree(interp, (char **)argv); return result; @@ -2318,7 +2318,7 @@ TclInvokeObjectCommand( * Invoke the command's object-based Tcl_ObjCmdProc. */ - result = (*cmdPtr->objProc)(cmdPtr->objClientData, interp, argc, objv); + result = cmdPtr->objProc(cmdPtr->objClientData, interp, argc, objv); /* * Move the interpreter's object result to the string result, then reset @@ -2951,9 +2951,7 @@ Tcl_DeleteCommandFromToken( * created when a command was imported into a namespace, this client * data will be a pointer to a ImportedCmdData structure describing * the "real" command that this imported command refers to. - */ - - /* + * * If you are getting a crash during the call to deleteProc and * cmdPtr->deleteProc is a pointer to the function free(), the most * likely cause is that your extension allocated memory for the @@ -2963,7 +2961,7 @@ Tcl_DeleteCommandFromToken( * that calls ckfree(). */ - (*cmdPtr->deleteProc)(cmdPtr->deleteData); + cmdPtr->deleteProc(cmdPtr->deleteData); } /* @@ -3084,8 +3082,8 @@ CallCommandTraces( if (state == NULL) { state = Tcl_SaveInterpState((Tcl_Interp *) iPtr, TCL_OK); } - (*tracePtr->traceProc)(tracePtr->clientData, - (Tcl_Interp *) iPtr, oldName, newName, flags); + tracePtr->traceProc(tracePtr->clientData, (Tcl_Interp *) iPtr, + oldName, newName, flags); cmdPtr->flags &= ~tracePtr->flags; if ((--tracePtr->refCount) <= 0) { ckfree((char *) tracePtr); @@ -3439,7 +3437,7 @@ OldMathFuncProc( */ errno = 0; - result = (*dataPtr->proc)(dataPtr->clientData, interp, args, &funcResult); + result = dataPtr->proc(dataPtr->clientData, interp, args, &funcResult); ckfree((char *) args); if (result != TCL_OK) { return result; @@ -4205,7 +4203,7 @@ TclNRRunCallbacks( */ TOP_CB(interp) = callbackPtr->nextPtr; - result = (procPtr)(callbackPtr->data, interp, result); + result = procPtr(callbackPtr->data, interp, result); TCLNR_FREE(interp, callbackPtr); } if (iPtr->atExitPtr) { @@ -4267,7 +4265,7 @@ NRRunObjProc( Tcl_Obj **objv = data[3]; if (result == TCL_OK) { - return (*objProc)(objClientData, interp, objc, objv); + return objProc(objClientData, interp, objc, objv); } return result; } @@ -7049,7 +7047,7 @@ ExprUnaryFunc( return TCL_ERROR; } errno = 0; - return CheckDoubleResult(interp, (*func)(d)); + return CheckDoubleResult(interp, func(d)); } static int @@ -7120,7 +7118,7 @@ ExprBinaryFunc( return TCL_ERROR; } errno = 0; - return CheckDoubleResult(interp, (*func)(d1, d2)); + return CheckDoubleResult(interp, func(d1, d2)); } static int @@ -7833,7 +7831,7 @@ Tcl_NRCallObjProc( TCL_DTRACE_CMD_ENTRY(TclGetString(objv[0]), objc - 1, (Tcl_Obj **)(objv + 1)); } - result = (*objProc)(clientData, interp, objc, objv); + result = objProc(clientData, interp, objc, objv); return TclNRRunCallbacks(interp, result, rootPtr, 0); } @@ -8099,7 +8097,7 @@ static const CorContext NULL_CONTEXT = {NULL, NULL, NULL}; iPtr->cmdFramePtr = (context).cmdFramePtr #define iPtr ((Interp *) interp) - + int TclNRYieldObjCmd( ClientData clientData, @@ -8132,7 +8130,7 @@ TclNRYieldObjCmd( NULL, NULL, NULL); return TCL_OK; } - + static int RewindCoroutine( CoroutineData *corPtr, @@ -8159,20 +8157,20 @@ RewindCoroutine( result = Tcl_RestoreInterpState(interp, state); return result; } - + static void DeleteCoroutine( ClientData clientData) { - CoroutineData *corPtr = (CoroutineData *) clientData; + CoroutineData *corPtr = clientData; Tcl_Interp *interp = corPtr->eePtr->interp; TEOV_callback *rootPtr = TOP_CB(interp); if (COR_IS_SUSPENDED(corPtr)) { - (void) TclNRRunCallbacks(interp, RewindCoroutine(corPtr, TCL_OK), rootPtr, 0); + TclNRRunCallbacks(interp, RewindCoroutine(corPtr,TCL_OK), rootPtr, 0); } } - + static void PlugCoroutineChains( CoroutineData *corPtr) @@ -8192,7 +8190,7 @@ PlugCoroutineChains( corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; } - + static int NRCoroutineFirstCallback( ClientData data[], @@ -8212,7 +8210,7 @@ NRCoroutineFirstCallback( return result; } - + static int NRCoroutineCallerCallback( ClientData data[], @@ -8258,7 +8256,7 @@ NRCoroutineCallerCallback( return result; } - + static int NRCoroutineExitCallback( ClientData data[], @@ -8303,7 +8301,7 @@ NRCoroutineExitCallback( return result; } - + static int NRInterpCoroutine( ClientData clientData, @@ -8350,7 +8348,7 @@ NRInterpCoroutine( iPtr->execEnvPtr = corPtr->eePtr; return TclExecuteByteCode(interp, NULL); } - + int TclNRCoroutineObjCmd( ClientData dummy, /* Not used. */ @@ -8481,7 +8479,7 @@ TclNRCoroutineObjCmd( return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); } - + /* * This is used in the [info] ensemble */ @@ -8493,23 +8491,22 @@ TclInfoCoroutineCmd( int objc, Tcl_Obj *const objv[]) { - CoroutineData *corPtr = ((Interp *)interp)->execEnvPtr->corPtr; + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - if (corPtr) { - Tcl_Command cmd = (Tcl_Command) corPtr->cmdPtr; + if (objc != 1) { + Tcl_WrongNumArgs(interp, 1, objv, NULL); + return TCL_ERROR; + } + + if (corPtr && !(corPtr->cmdPtr->flags & CMD_IS_DELETED)) { Tcl_Obj *namePtr; - int deleted = (((Command *)cmd)->flags & CMD_IS_DELETED); - - if (!deleted) { - TclNewObj(namePtr); - Tcl_GetCommandFullName(interp, cmd, namePtr); - Tcl_SetObjResult(interp, namePtr); - } + + TclNewObj(namePtr); + Tcl_GetCommandFullName(interp, (Tcl_Command) corPtr->cmdPtr, namePtr); + Tcl_SetObjResult(interp, namePtr); } return TCL_OK; } - - /* * Local Variables: -- cgit v0.12 From 7f623a9fc32a746e0fe85c9f913cbb1f81e92f8a Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 19 Oct 2008 19:55:37 +0000 Subject: * generic/tclProc.c: Reset -level and -code values to defaults after they are used. [Bug 2152286]. --- ChangeLog | 5 +++++ generic/tclProc.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ba96f3e..65cc478 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-19 Don Porter + + * generic/tclProc.c: Reset -level and -code values to defaults + after they are used. [Bug 2152286]. + 2008-10-19 Donal K. Fellows * generic/tclBasic.c (TclInfoCoroutineCmd): Added code to make this diff --git a/generic/tclProc.c b/generic/tclProc.c index a0a608b..e116e92 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.165 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.166 2008/10/19 19:55:37 dgp Exp $ */ #include "tclInt.h" @@ -2239,9 +2239,14 @@ TclUpdateReturnInfo( if (iPtr->returnLevel == 0) { /* * Now we've reached the level to return the requested -code. + * Since iPtr->returnLevel and iPtr->returnCode have completed + * their task, we now reset them to default values so that any + * bare "return TCL_RETURN" that may follow will work [Bug 2152286]. */ code = iPtr->returnCode; + iPtr->returnLevel = 1; + iPtr->returnCode = TCL_OK; if (code == TCL_ERROR) { iPtr->flags |= ERR_LEGACY_COPY; } -- cgit v0.12 From 1598402d198ca92b97f5b62e7ea54b72bdd09ccf Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 22 Oct 2008 20:23:59 +0000 Subject: Letting CONST die a slow and graceful death, since NO_CONST was broken since 8.4 and no-one complained about it. --- ChangeLog | 20 + generic/tcl.decls | 570 +++++++------- generic/tcl.h | 78 +- generic/tclCompile.h | 8 +- generic/tclDecls.h | 1792 ++++++++++++++++++++++----------------------- generic/tclEncoding.c | 4 +- generic/tclInt.decls | 210 +++--- generic/tclIntDecls.h | 474 ++++++------ generic/tclIntPlatDecls.h | 144 ++-- generic/tclOODecls.h | 60 +- generic/tclOOIntDecls.h | 98 +-- generic/tclPlatDecls.h | 28 +- generic/tclStubInit.c | 6 +- generic/tclStubLib.c | 4 +- generic/tclTomMath.decls | 6 +- generic/tclTomMathDecls.h | 28 +- tools/genStubs.tcl | 14 +- 17 files changed, 1783 insertions(+), 1761 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65cc478..1b89232 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2008-10-22 Jan Nijtmans + + * generic/tcl.h: CONST -> const and white-spacing + * generic/tclCompile.h: + * generic/tclEncoding.c: + * generic/tclStubInit.c: + * generic/tclStubLib.c: + * generic/tcl.decls + * generic/tclInt.decls + * generic/tclTomMath.decls + * generic/tclDecls.h: (regenerated) + * generic/tclIntDecls.h: (regenerated) + * generic/tclIntPlatDecls.h: (regenerated) + * generic/tclOODecls.h: (regenerated) + * generic/tclOOIntDecls.h: (regenerated) + * generic/tclPlatDecls.h: (regenerated) + * generic/tclTomMathDecls.h: (regenerated) + * generic/tclIntDecls.h: (regenerated) + * tools/genStubs.tcl: CONST -> const and white-spacing + 2008-10-19 Don Porter * generic/tclProc.c: Reset -level and -code values to defaults diff --git a/generic/tcl.decls b/generic/tcl.decls index 9290dcc..53604a6 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.152 2008/10/05 22:25:35 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.153 2008/10/22 20:23:59 nijtmans Exp $ library tcl @@ -29,16 +29,16 @@ hooks {tclPlat tclInt tclIntPlat} # to preserve backwards compatibility. declare 0 generic { - int Tcl_PkgProvideEx(Tcl_Interp* interp, CONST char* name, - CONST char* version, ClientData clientData) + int Tcl_PkgProvideEx(Tcl_Interp* interp, const char* name, + const char* version, ClientData clientData) } declare 1 generic { CONST84_RETURN char * Tcl_PkgRequireEx(Tcl_Interp *interp, - CONST char *name, CONST char *version, int exact, + const char *name, const char *version, int exact, ClientData *clientDataPtr) } declare 2 generic { - void Tcl_Panic(CONST char *format, ...) + void Tcl_Panic(const char *format, ...) } declare 3 generic { char * Tcl_Alloc(unsigned int size) @@ -50,14 +50,14 @@ declare 5 generic { char * Tcl_Realloc(char *ptr, unsigned int size) } declare 6 generic { - char * Tcl_DbCkalloc(unsigned int size, CONST char *file, int line) + char * Tcl_DbCkalloc(unsigned int size, const char *file, int line) } declare 7 generic { - int Tcl_DbCkfree(char *ptr, CONST char *file, int line) + int Tcl_DbCkfree(char *ptr, const char *file, int line) } declare 8 generic { char * Tcl_DbCkrealloc(char *ptr, unsigned int size, - CONST char *file, int line) + const char *file, int line) } # Tcl_CreateFileHandler and Tcl_DeleteFileHandler are only available on unix, @@ -72,13 +72,13 @@ declare 10 unix { void Tcl_DeleteFileHandler(int fd) } declare 11 generic { - void Tcl_SetTimer(CONST Tcl_Time *timePtr) + void Tcl_SetTimer(const Tcl_Time *timePtr) } declare 12 generic { void Tcl_Sleep(int ms) } declare 13 generic { - int Tcl_WaitForEvent(CONST Tcl_Time *timePtr) + int Tcl_WaitForEvent(const Tcl_Time *timePtr) } declare 14 generic { int Tcl_AppendAllObjTypes(Tcl_Interp *interp, Tcl_Obj *objPtr) @@ -87,48 +87,48 @@ declare 15 generic { void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...) } declare 16 generic { - void Tcl_AppendToObj(Tcl_Obj* objPtr, CONST char* bytes, int length) + void Tcl_AppendToObj(Tcl_Obj* objPtr, const char* bytes, int length) } declare 17 generic { - Tcl_Obj * Tcl_ConcatObj(int objc, Tcl_Obj *CONST objv[]) + Tcl_Obj * Tcl_ConcatObj(int objc, Tcl_Obj *const objv[]) } declare 18 generic { int Tcl_ConvertToType(Tcl_Interp *interp, Tcl_Obj *objPtr, - CONST Tcl_ObjType *typePtr) + const Tcl_ObjType *typePtr) } declare 19 generic { - void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, CONST char *file, int line) + void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, const char *file, int line) } declare 20 generic { - void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, CONST char *file, int line) + void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, const char *file, int line) } declare 21 generic { - int Tcl_DbIsShared(Tcl_Obj *objPtr, CONST char *file, int line) + int Tcl_DbIsShared(Tcl_Obj *objPtr, const char *file, int line) } declare 22 generic { - Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, CONST char *file, int line) + Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, const char *file, int line) } declare 23 generic { - Tcl_Obj * Tcl_DbNewByteArrayObj(CONST unsigned char *bytes, int length, - CONST char *file, int line) + Tcl_Obj * Tcl_DbNewByteArrayObj(const unsigned char *bytes, int length, + const char *file, int line) } declare 24 generic { Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue, - CONST char *file, int line) + const char *file, int line) } declare 25 generic { - Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *CONST *objv, - CONST char *file, int line) + Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv, + const char *file, int line) } declare 26 generic { - Tcl_Obj * Tcl_DbNewLongObj(long longValue, CONST char *file, int line) + Tcl_Obj * Tcl_DbNewLongObj(long longValue, const char *file, int line) } declare 27 generic { - Tcl_Obj * Tcl_DbNewObj(CONST char *file, int line) + Tcl_Obj * Tcl_DbNewObj(const char *file, int line) } declare 28 generic { - Tcl_Obj * Tcl_DbNewStringObj(CONST char *bytes, int length, - CONST char *file, int line) + Tcl_Obj * Tcl_DbNewStringObj(const char *bytes, int length, + const char *file, int line) } declare 29 generic { Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr) @@ -137,7 +137,7 @@ declare 30 generic { void TclFreeObj(Tcl_Obj *objPtr) } declare 31 generic { - int Tcl_GetBoolean(Tcl_Interp *interp, CONST char *src, int *boolPtr) + int Tcl_GetBoolean(Tcl_Interp *interp, const char *src, int *boolPtr) } declare 32 generic { int Tcl_GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -147,7 +147,7 @@ declare 33 generic { unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *lengthPtr) } declare 34 generic { - int Tcl_GetDouble(Tcl_Interp *interp, CONST char *src, double *doublePtr) + int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr) } declare 35 generic { int Tcl_GetDoubleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -155,10 +155,10 @@ declare 35 generic { } declare 36 generic { int Tcl_GetIndexFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - CONST84 char *CONST *tablePtr, CONST char *msg, int flags, int *indexPtr) + CONST84 char *const *tablePtr, const char *msg, int flags, int *indexPtr) } declare 37 generic { - int Tcl_GetInt(Tcl_Interp *interp, CONST char *src, int *intPtr) + int Tcl_GetInt(Tcl_Interp *interp, const char *src, int *intPtr) } declare 38 generic { int Tcl_GetIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr) @@ -167,7 +167,7 @@ declare 39 generic { int Tcl_GetLongFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr) } declare 40 generic { - CONST86 Tcl_ObjType * Tcl_GetObjType(CONST char *typeName) + CONST86 Tcl_ObjType * Tcl_GetObjType(const char *typeName) } declare 41 generic { char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr) @@ -197,13 +197,13 @@ declare 47 generic { } declare 48 generic { int Tcl_ListObjReplace(Tcl_Interp *interp, Tcl_Obj *listPtr, int first, - int count, int objc, Tcl_Obj *CONST objv[]) + int count, int objc, Tcl_Obj *const objv[]) } declare 49 generic { Tcl_Obj *Tcl_NewBooleanObj(int boolValue) } declare 50 generic { - Tcl_Obj *Tcl_NewByteArrayObj(CONST unsigned char* bytes, int length) + Tcl_Obj *Tcl_NewByteArrayObj(const unsigned char* bytes, int length) } declare 51 generic { Tcl_Obj * Tcl_NewDoubleObj(double doubleValue) @@ -212,7 +212,7 @@ declare 52 generic { Tcl_Obj * Tcl_NewIntObj(int intValue) } declare 53 generic { - Tcl_Obj * Tcl_NewListObj(int objc, Tcl_Obj *CONST objv[]) + Tcl_Obj * Tcl_NewListObj(int objc, Tcl_Obj *const objv[]) } declare 54 generic { Tcl_Obj * Tcl_NewLongObj(long longValue) @@ -221,7 +221,7 @@ declare 55 generic { Tcl_Obj * Tcl_NewObj(void) } declare 56 generic { - Tcl_Obj *Tcl_NewStringObj(CONST char *bytes, int length) + Tcl_Obj *Tcl_NewStringObj(const char *bytes, int length) } declare 57 generic { void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue) @@ -230,7 +230,7 @@ declare 58 generic { unsigned char * Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int length) } declare 59 generic { - void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, CONST unsigned char *bytes, + void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, const unsigned char *bytes, int length) } declare 60 generic { @@ -240,7 +240,7 @@ declare 61 generic { void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue) } declare 62 generic { - void Tcl_SetListObj(Tcl_Obj *objPtr, int objc, Tcl_Obj *CONST objv[]) + void Tcl_SetListObj(Tcl_Obj *objPtr, int objc, Tcl_Obj *const objv[]) } declare 63 generic { void Tcl_SetLongObj(Tcl_Obj *objPtr, long longValue) @@ -249,20 +249,20 @@ declare 64 generic { void Tcl_SetObjLength(Tcl_Obj *objPtr, int length) } declare 65 generic { - void Tcl_SetStringObj(Tcl_Obj* objPtr, CONST char* bytes, int length) + void Tcl_SetStringObj(Tcl_Obj* objPtr, const char* bytes, int length) } declare 66 generic { - void Tcl_AddErrorInfo(Tcl_Interp *interp, CONST char *message) + void Tcl_AddErrorInfo(Tcl_Interp *interp, const char *message) } declare 67 generic { - void Tcl_AddObjErrorInfo(Tcl_Interp *interp, CONST char *message, + void Tcl_AddObjErrorInfo(Tcl_Interp *interp, const char *message, int length) } declare 68 generic { void Tcl_AllowExceptions(Tcl_Interp *interp) } declare 69 generic { - void Tcl_AppendElement(Tcl_Interp *interp, CONST char *element) + void Tcl_AppendElement(Tcl_Interp *interp, const char *element) } declare 70 generic { void Tcl_AppendResult(Tcl_Interp *interp, ...) @@ -287,11 +287,11 @@ declare 76 generic { void Tcl_BackgroundError(Tcl_Interp *interp) } declare 77 generic { - char Tcl_Backslash(CONST char *src, int *readPtr) + char Tcl_Backslash(const char *src, int *readPtr) } declare 78 generic { - int Tcl_BadChannelOption(Tcl_Interp *interp, CONST char *optionName, - CONST char *optionList) + int Tcl_BadChannelOption(Tcl_Interp *interp, const char *optionName, + const char *optionList) } declare 79 generic { void Tcl_CallWhenDeleted(Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, @@ -304,31 +304,31 @@ declare 81 generic { int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan) } declare 82 generic { - int Tcl_CommandComplete(CONST char *cmd) + int Tcl_CommandComplete(const char *cmd) } declare 83 generic { - char * Tcl_Concat(int argc, CONST84 char * CONST *argv) + char * Tcl_Concat(int argc, CONST84 char * const *argv) } declare 84 generic { - int Tcl_ConvertElement(CONST char *src, char *dst, int flags) + int Tcl_ConvertElement(const char *src, char *dst, int flags) } declare 85 generic { - int Tcl_ConvertCountedElement(CONST char *src, int length, char *dst, + int Tcl_ConvertCountedElement(const char *src, int length, char *dst, int flags) } declare 86 generic { - int Tcl_CreateAlias(Tcl_Interp *slave, CONST char *slaveCmd, - Tcl_Interp *target, CONST char *targetCmd, int argc, - CONST84 char * CONST *argv) + int Tcl_CreateAlias(Tcl_Interp *slave, const char *slaveCmd, + Tcl_Interp *target, const char *targetCmd, int argc, + CONST84 char * const *argv) } declare 87 generic { - int Tcl_CreateAliasObj(Tcl_Interp *slave, CONST char *slaveCmd, - Tcl_Interp *target, CONST char *targetCmd, int objc, - Tcl_Obj *CONST objv[]) + int Tcl_CreateAliasObj(Tcl_Interp *slave, const char *slaveCmd, + Tcl_Interp *target, const char *targetCmd, int objc, + Tcl_Obj *const objv[]) } declare 88 generic { - Tcl_Channel Tcl_CreateChannel(CONST Tcl_ChannelType *typePtr, - CONST char *chanName, ClientData instanceData, int mask) + Tcl_Channel Tcl_CreateChannel(const Tcl_ChannelType *typePtr, + const char *chanName, ClientData instanceData, int mask) } declare 89 generic { void Tcl_CreateChannelHandler(Tcl_Channel chan, int mask, @@ -339,7 +339,7 @@ declare 90 generic { ClientData clientData) } declare 91 generic { - Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp, CONST char *cmdName, + Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc) } @@ -354,18 +354,18 @@ declare 94 generic { Tcl_Interp * Tcl_CreateInterp(void) } declare 95 generic { - void Tcl_CreateMathFunc(Tcl_Interp *interp, CONST char *name, + void Tcl_CreateMathFunc(Tcl_Interp *interp, const char *name, int numArgs, Tcl_ValueType *argTypes, Tcl_MathProc *proc, ClientData clientData) } declare 96 generic { Tcl_Command Tcl_CreateObjCommand(Tcl_Interp *interp, - CONST char *cmdName, + const char *cmdName, Tcl_ObjCmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc) } declare 97 generic { - Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp, CONST char *slaveName, + Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp, const char *slaveName, int isSafe) } declare 98 generic { @@ -377,7 +377,7 @@ declare 99 generic { Tcl_CmdTraceProc *proc, ClientData clientData) } declare 100 generic { - void Tcl_DeleteAssocData(Tcl_Interp *interp, CONST char *name) + void Tcl_DeleteAssocData(Tcl_Interp *interp, const char *name) } declare 101 generic { void Tcl_DeleteChannelHandler(Tcl_Channel chan, Tcl_ChannelProc *proc, @@ -388,7 +388,7 @@ declare 102 generic { ClientData clientData) } declare 103 generic { - int Tcl_DeleteCommand(Tcl_Interp *interp, CONST char *cmdName) + int Tcl_DeleteCommand(Tcl_Interp *interp, const char *cmdName) } declare 104 generic { int Tcl_DeleteCommandFromToken(Tcl_Interp *interp, Tcl_Command command) @@ -432,10 +432,10 @@ declare 116 generic { void Tcl_DoWhenIdle(Tcl_IdleProc *proc, ClientData clientData) } declare 117 generic { - char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *bytes, int length) + char * Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, int length) } declare 118 generic { - char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, CONST char *element) + char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, const char *element) } declare 119 generic { void Tcl_DStringEndSublist(Tcl_DString *dsPtr) @@ -468,11 +468,11 @@ declare 128 generic { CONST84_RETURN char * Tcl_ErrnoMsg(int err) } declare 129 generic { - int Tcl_Eval(Tcl_Interp *interp, CONST char *script) + int Tcl_Eval(Tcl_Interp *interp, const char *script) } # This is obsolete, use Tcl_FSEvalFile declare 130 generic { - int Tcl_EvalFile(Tcl_Interp *interp, CONST char *fileName) + int Tcl_EvalFile(Tcl_Interp *interp, const char *fileName) } declare 131 generic { int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr) @@ -484,23 +484,23 @@ declare 133 generic { void Tcl_Exit(int status) } declare 134 generic { - int Tcl_ExposeCommand(Tcl_Interp *interp, CONST char *hiddenCmdToken, - CONST char *cmdName) + int Tcl_ExposeCommand(Tcl_Interp *interp, const char *hiddenCmdToken, + const char *cmdName) } declare 135 generic { - int Tcl_ExprBoolean(Tcl_Interp *interp, CONST char *expr, int *ptr) + int Tcl_ExprBoolean(Tcl_Interp *interp, const char *expr, int *ptr) } declare 136 generic { int Tcl_ExprBooleanObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *ptr) } declare 137 generic { - int Tcl_ExprDouble(Tcl_Interp *interp, CONST char *expr, double *ptr) + int Tcl_ExprDouble(Tcl_Interp *interp, const char *expr, double *ptr) } declare 138 generic { int Tcl_ExprDoubleObj(Tcl_Interp *interp, Tcl_Obj *objPtr, double *ptr) } declare 139 generic { - int Tcl_ExprLong(Tcl_Interp *interp, CONST char *expr, long *ptr) + int Tcl_ExprLong(Tcl_Interp *interp, const char *expr, long *ptr) } declare 140 generic { int Tcl_ExprLongObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *ptr) @@ -510,13 +510,13 @@ declare 141 generic { Tcl_Obj **resultPtrPtr) } declare 142 generic { - int Tcl_ExprString(Tcl_Interp *interp, CONST char *expr) + int Tcl_ExprString(Tcl_Interp *interp, const char *expr) } declare 143 generic { void Tcl_Finalize(void) } declare 144 generic { - void Tcl_FindExecutable(CONST char *argv0) + void Tcl_FindExecutable(const char *argv0) } declare 145 generic { Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr, @@ -529,21 +529,21 @@ declare 147 generic { void Tcl_FreeResult(Tcl_Interp *interp) } declare 148 generic { - int Tcl_GetAlias(Tcl_Interp *interp, CONST char *slaveCmd, + int Tcl_GetAlias(Tcl_Interp *interp, const char *slaveCmd, Tcl_Interp **targetInterpPtr, CONST84 char **targetCmdPtr, int *argcPtr, CONST84 char ***argvPtr) } declare 149 generic { - int Tcl_GetAliasObj(Tcl_Interp *interp, CONST char *slaveCmd, + int Tcl_GetAliasObj(Tcl_Interp *interp, const char *slaveCmd, Tcl_Interp **targetInterpPtr, CONST84 char **targetCmdPtr, int *objcPtr, Tcl_Obj ***objv) } declare 150 generic { - ClientData Tcl_GetAssocData(Tcl_Interp *interp, CONST char *name, + ClientData Tcl_GetAssocData(Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc **procPtr) } declare 151 generic { - Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp, CONST char *chanName, + Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp, const char *chanName, int *modePtr) } declare 152 generic { @@ -564,13 +564,13 @@ declare 156 generic { } declare 157 generic { int Tcl_GetChannelOption(Tcl_Interp *interp, Tcl_Channel chan, - CONST char *optionName, Tcl_DString *dsPtr) + const char *optionName, Tcl_DString *dsPtr) } declare 158 generic { CONST86 Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan) } declare 159 generic { - int Tcl_GetCommandInfo(Tcl_Interp *interp, CONST char *cmdName, + int Tcl_GetCommandInfo(Tcl_Interp *interp, const char *cmdName, Tcl_CmdInfo *infoPtr) } declare 160 generic { @@ -590,7 +590,7 @@ declare 164 generic { Tcl_Interp * Tcl_GetMaster(Tcl_Interp *interp) } declare 165 generic { - CONST char * Tcl_GetNameOfExecutable(void) + const char * Tcl_GetNameOfExecutable(void) } declare 166 generic { Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp) @@ -600,13 +600,13 @@ declare 166 generic { # generic interface, so we inlcude it here for compatibility reasons. declare 167 unix { - int Tcl_GetOpenFile(Tcl_Interp *interp, CONST char *chanID, int forWriting, + int Tcl_GetOpenFile(Tcl_Interp *interp, const char *chanID, int forWriting, int checkUsage, ClientData *filePtr) } # Obsolete. Should now use Tcl_FSGetPathType which is objectified # and therefore usually faster. declare 168 generic { - Tcl_PathType Tcl_GetPathType(CONST char *path) + Tcl_PathType Tcl_GetPathType(const char *path) } declare 169 generic { int Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr) @@ -618,7 +618,7 @@ declare 171 generic { int Tcl_GetServiceMode(void) } declare 172 generic { - Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp, CONST char *slaveName) + Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp, const char *slaveName) } declare 173 generic { Tcl_Channel Tcl_GetStdChannel(int type) @@ -627,22 +627,22 @@ declare 174 generic { CONST84_RETURN char * Tcl_GetStringResult(Tcl_Interp *interp) } declare 175 generic { - CONST84_RETURN char * Tcl_GetVar(Tcl_Interp *interp, CONST char *varName, + CONST84_RETURN char * Tcl_GetVar(Tcl_Interp *interp, const char *varName, int flags) } declare 176 generic { - CONST84_RETURN char * Tcl_GetVar2(Tcl_Interp *interp, CONST char *part1, - CONST char *part2, int flags) + CONST84_RETURN char * Tcl_GetVar2(Tcl_Interp *interp, const char *part1, + const char *part2, int flags) } declare 177 generic { - int Tcl_GlobalEval(Tcl_Interp *interp, CONST char *command) + int Tcl_GlobalEval(Tcl_Interp *interp, const char *command) } declare 178 generic { int Tcl_GlobalEvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr) } declare 179 generic { - int Tcl_HideCommand(Tcl_Interp *interp, CONST char *cmdName, - CONST char *hiddenCmdToken) + int Tcl_HideCommand(Tcl_Interp *interp, const char *cmdName, + const char *hiddenCmdToken) } declare 180 generic { int Tcl_Init(Tcl_Interp *interp) @@ -664,11 +664,11 @@ declare 185 generic { } # Obsolete, use Tcl_FSJoinPath declare 186 generic { - char * Tcl_JoinPath(int argc, CONST84 char * CONST *argv, + char * Tcl_JoinPath(int argc, CONST84 char * const *argv, Tcl_DString *resultPtr) } declare 187 generic { - int Tcl_LinkVar(Tcl_Interp *interp, CONST char *varName, char *addr, + int Tcl_LinkVar(Tcl_Interp *interp, const char *varName, char *addr, int type) } @@ -687,7 +687,7 @@ declare 191 generic { Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket) } declare 192 generic { - char * Tcl_Merge(int argc, CONST84 char * CONST *argv) + char * Tcl_Merge(int argc, CONST84 char * const *argv) } declare 193 generic { Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr) @@ -709,16 +709,16 @@ declare 197 {unix win} { } # This is obsolete, use Tcl_FSOpenFileChannel declare 198 generic { - Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp, CONST char *fileName, - CONST char *modeString, int permissions) + Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp, const char *fileName, + const char *modeString, int permissions) } declare 199 generic { Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port, - CONST char *address, CONST char *myaddr, int myport, int async) + const char *address, const char *myaddr, int myport, int async) } declare 200 generic { Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port, - CONST char *host, Tcl_TcpAcceptProc *acceptProc, + const char *host, Tcl_TcpAcceptProc *acceptProc, ClientData callbackData) } declare 201 generic { @@ -728,7 +728,7 @@ declare 202 generic { void Tcl_PrintDouble(Tcl_Interp *interp, double value, char *dst) } declare 203 generic { - int Tcl_PutEnv(CONST char *assignment) + int Tcl_PutEnv(const char *assignment) } declare 204 generic { CONST84_RETURN char * Tcl_PosixError(Tcl_Interp *interp) @@ -743,7 +743,7 @@ declare 207 {unix win} { void Tcl_ReapDetachedProcs(void) } declare 208 generic { - int Tcl_RecordAndEval(Tcl_Interp *interp, CONST char *cmd, int flags) + int Tcl_RecordAndEval(Tcl_Interp *interp, const char *cmd, int flags) } declare 209 generic { int Tcl_RecordAndEvalObj(Tcl_Interp *interp, Tcl_Obj *cmdPtr, int flags) @@ -752,18 +752,18 @@ declare 210 generic { void Tcl_RegisterChannel(Tcl_Interp *interp, Tcl_Channel chan) } declare 211 generic { - void Tcl_RegisterObjType(CONST Tcl_ObjType *typePtr) + void Tcl_RegisterObjType(const Tcl_ObjType *typePtr) } declare 212 generic { - Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, CONST char *pattern) + Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, const char *pattern) } declare 213 generic { int Tcl_RegExpExec(Tcl_Interp *interp, Tcl_RegExp regexp, - CONST char *text, CONST char *start) + const char *text, const char *start) } declare 214 generic { - int Tcl_RegExpMatch(Tcl_Interp *interp, CONST char *text, - CONST char *pattern) + int Tcl_RegExpMatch(Tcl_Interp *interp, const char *text, + const char *pattern) } declare 215 generic { void Tcl_RegExpRange(Tcl_RegExp regexp, int index, @@ -776,10 +776,10 @@ declare 217 generic { void Tcl_ResetResult(Tcl_Interp *interp) } declare 218 generic { - int Tcl_ScanElement(CONST char *str, int *flagPtr) + int Tcl_ScanElement(const char *str, int *flagPtr) } declare 219 generic { - int Tcl_ScanCountedElement(CONST char *str, int length, int *flagPtr) + int Tcl_ScanCountedElement(const char *str, int length, int *flagPtr) } # Obsolete declare 220 generic { @@ -792,7 +792,7 @@ declare 222 generic { int Tcl_ServiceEvent(int flags) } declare 223 generic { - void Tcl_SetAssocData(Tcl_Interp *interp, CONST char *name, + void Tcl_SetAssocData(Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc *proc, ClientData clientData) } declare 224 generic { @@ -800,11 +800,11 @@ declare 224 generic { } declare 225 generic { int Tcl_SetChannelOption(Tcl_Interp *interp, Tcl_Channel chan, - CONST char *optionName, CONST char *newValue) + const char *optionName, const char *newValue) } declare 226 generic { - int Tcl_SetCommandInfo(Tcl_Interp *interp, CONST char *cmdName, - CONST Tcl_CmdInfo *infoPtr) + int Tcl_SetCommandInfo(Tcl_Interp *interp, const char *cmdName, + const Tcl_CmdInfo *infoPtr) } declare 227 generic { void Tcl_SetErrno(int err) @@ -813,7 +813,7 @@ declare 228 generic { void Tcl_SetErrorCode(Tcl_Interp *interp, ...) } declare 229 generic { - void Tcl_SetMaxBlockTime(CONST Tcl_Time *timePtr) + void Tcl_SetMaxBlockTime(const Tcl_Time *timePtr) } declare 230 generic { void Tcl_SetPanicProc(Tcl_PanicProc *panicProc) @@ -838,12 +838,12 @@ declare 236 generic { void Tcl_SetStdChannel(Tcl_Channel channel, int type) } declare 237 generic { - CONST84_RETURN char * Tcl_SetVar(Tcl_Interp *interp, CONST char *varName, - CONST char *newValue, int flags) + CONST84_RETURN char * Tcl_SetVar(Tcl_Interp *interp, const char *varName, + const char *newValue, int flags) } declare 238 generic { - CONST84_RETURN char * Tcl_SetVar2(Tcl_Interp *interp, CONST char *part1, - CONST char *part2, CONST char *newValue, int flags) + CONST84_RETURN char * Tcl_SetVar2(Tcl_Interp *interp, const char *part1, + const char *part2, const char *newValue, int flags) } declare 239 generic { CONST84_RETURN char * Tcl_SignalId(int sig) @@ -855,96 +855,96 @@ declare 241 generic { void Tcl_SourceRCFile(Tcl_Interp *interp) } declare 242 generic { - int Tcl_SplitList(Tcl_Interp *interp, CONST char *listStr, int *argcPtr, + int Tcl_SplitList(Tcl_Interp *interp, const char *listStr, int *argcPtr, CONST84 char ***argvPtr) } # Obsolete, use Tcl_FSSplitPath declare 243 generic { - void Tcl_SplitPath(CONST char *path, int *argcPtr, CONST84 char ***argvPtr) + void Tcl_SplitPath(const char *path, int *argcPtr, CONST84 char ***argvPtr) } declare 244 generic { - void Tcl_StaticPackage(Tcl_Interp *interp, CONST char *pkgName, + void Tcl_StaticPackage(Tcl_Interp *interp, const char *pkgName, Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc) } declare 245 generic { - int Tcl_StringMatch(CONST char *str, CONST char *pattern) + int Tcl_StringMatch(const char *str, const char *pattern) } # Obsolete declare 246 generic { int Tcl_TellOld(Tcl_Channel chan) } declare 247 generic { - int Tcl_TraceVar(Tcl_Interp *interp, CONST char *varName, int flags, + int Tcl_TraceVar(Tcl_Interp *interp, const char *varName, int flags, Tcl_VarTraceProc *proc, ClientData clientData) } declare 248 generic { - int Tcl_TraceVar2(Tcl_Interp *interp, CONST char *part1, CONST char *part2, + int Tcl_TraceVar2(Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, ClientData clientData) } declare 249 generic { - char * Tcl_TranslateFileName(Tcl_Interp *interp, CONST char *name, + char * Tcl_TranslateFileName(Tcl_Interp *interp, const char *name, Tcl_DString *bufferPtr) } declare 250 generic { - int Tcl_Ungets(Tcl_Channel chan, CONST char *str, int len, int atHead) + int Tcl_Ungets(Tcl_Channel chan, const char *str, int len, int atHead) } declare 251 generic { - void Tcl_UnlinkVar(Tcl_Interp *interp, CONST char *varName) + void Tcl_UnlinkVar(Tcl_Interp *interp, const char *varName) } declare 252 generic { int Tcl_UnregisterChannel(Tcl_Interp *interp, Tcl_Channel chan) } declare 253 generic { - int Tcl_UnsetVar(Tcl_Interp *interp, CONST char *varName, int flags) + int Tcl_UnsetVar(Tcl_Interp *interp, const char *varName, int flags) } declare 254 generic { - int Tcl_UnsetVar2(Tcl_Interp *interp, CONST char *part1, CONST char *part2, + int Tcl_UnsetVar2(Tcl_Interp *interp, const char *part1, const char *part2, int flags) } declare 255 generic { - void Tcl_UntraceVar(Tcl_Interp *interp, CONST char *varName, int flags, + void Tcl_UntraceVar(Tcl_Interp *interp, const char *varName, int flags, Tcl_VarTraceProc *proc, ClientData clientData) } declare 256 generic { - void Tcl_UntraceVar2(Tcl_Interp *interp, CONST char *part1, - CONST char *part2, int flags, Tcl_VarTraceProc *proc, + void Tcl_UntraceVar2(Tcl_Interp *interp, const char *part1, + const char *part2, int flags, Tcl_VarTraceProc *proc, ClientData clientData) } declare 257 generic { - void Tcl_UpdateLinkedVar(Tcl_Interp *interp, CONST char *varName) + void Tcl_UpdateLinkedVar(Tcl_Interp *interp, const char *varName) } declare 258 generic { - int Tcl_UpVar(Tcl_Interp *interp, CONST char *frameName, - CONST char *varName, CONST char *localName, int flags) + int Tcl_UpVar(Tcl_Interp *interp, const char *frameName, + const char *varName, const char *localName, int flags) } declare 259 generic { - int Tcl_UpVar2(Tcl_Interp *interp, CONST char *frameName, CONST char *part1, - CONST char *part2, CONST char *localName, int flags) + int Tcl_UpVar2(Tcl_Interp *interp, const char *frameName, const char *part1, + const char *part2, const char *localName, int flags) } declare 260 generic { int Tcl_VarEval(Tcl_Interp *interp, ...) } declare 261 generic { - ClientData Tcl_VarTraceInfo(Tcl_Interp *interp, CONST char *varName, + ClientData Tcl_VarTraceInfo(Tcl_Interp *interp, const char *varName, int flags, Tcl_VarTraceProc *procPtr, ClientData prevClientData) } declare 262 generic { - ClientData Tcl_VarTraceInfo2(Tcl_Interp *interp, CONST char *part1, - CONST char *part2, int flags, Tcl_VarTraceProc *procPtr, + ClientData Tcl_VarTraceInfo2(Tcl_Interp *interp, const char *part1, + const char *part2, int flags, Tcl_VarTraceProc *procPtr, ClientData prevClientData) } declare 263 generic { - int Tcl_Write(Tcl_Channel chan, CONST char *s, int slen) + int Tcl_Write(Tcl_Channel chan, const char *s, int slen) } declare 264 generic { void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[], CONST char *message) + Tcl_Obj *const objv[], const char *message) } declare 265 generic { - int Tcl_DumpActiveMemory(CONST char *fileName) + int Tcl_DumpActiveMemory(const char *fileName) } declare 266 generic { - void Tcl_ValidateAllMemory(CONST char *file, int line) + void Tcl_ValidateAllMemory(const char *file, int line) } declare 267 generic { void Tcl_AppendResultVA(Tcl_Interp *interp, va_list argList) @@ -956,26 +956,26 @@ declare 269 generic { CONST84_RETURN char * Tcl_HashStats(Tcl_HashTable *tablePtr) } declare 270 generic { - CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, CONST char *start, + CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, const char *start, CONST84 char **termPtr) } declare 271 generic { - CONST84_RETURN char * Tcl_PkgPresent(Tcl_Interp *interp, CONST char *name, - CONST char *version, int exact) + CONST84_RETURN char * Tcl_PkgPresent(Tcl_Interp *interp, const char *name, + const char *version, int exact) } declare 272 generic { CONST84_RETURN char * Tcl_PkgPresentEx(Tcl_Interp *interp, - CONST char *name, CONST char *version, int exact, + const char *name, const char *version, int exact, ClientData *clientDataPtr) } declare 273 generic { - int Tcl_PkgProvide(Tcl_Interp *interp, CONST char *name, - CONST char *version) + int Tcl_PkgProvide(Tcl_Interp *interp, const char *name, + const char *version) } # TIP #268: The internally used new Require function is in slot 573. declare 274 generic { - CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp, CONST char *name, - CONST char *version, int exact) + CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp, const char *name, + const char *version, int exact) } declare 275 generic { void Tcl_SetErrorCodeVA(Tcl_Interp *interp, va_list argList) @@ -987,7 +987,7 @@ declare 277 generic { Tcl_Pid Tcl_WaitPid(Tcl_Pid pid, int *statPtr, int options) } declare 278 generic { - void Tcl_PanicVA(CONST char *format, va_list argList) + void Tcl_PanicVA(const char *format, va_list argList) } declare 279 generic { void Tcl_GetVersion(int *major, int *minor, int *patchLevel, int *type) @@ -1012,7 +1012,7 @@ declare 280 generic { declare 281 generic { Tcl_Channel Tcl_StackChannel(Tcl_Interp *interp, - CONST Tcl_ChannelType *typePtr, ClientData instanceData, + const Tcl_ChannelType *typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan) } declare 282 generic { @@ -1038,7 +1038,7 @@ declare 286 generic { void Tcl_AppendObjToObj(Tcl_Obj *objPtr, Tcl_Obj *appendObjPtr) } declare 287 generic { - Tcl_Encoding Tcl_CreateEncoding(CONST Tcl_EncodingType *typePtr) + Tcl_Encoding Tcl_CreateEncoding(const Tcl_EncodingType *typePtr) } declare 288 generic { void Tcl_CreateThreadExitHandler(Tcl_ExitProc *proc, ClientData clientData) @@ -1050,11 +1050,11 @@ declare 290 generic { void Tcl_DiscardResult(Tcl_SavedResult *statePtr) } declare 291 generic { - int Tcl_EvalEx(Tcl_Interp *interp, CONST char *script, int numBytes, + int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes, int flags) } declare 292 generic { - int Tcl_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], + int Tcl_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags) } declare 293 generic { @@ -1065,13 +1065,13 @@ declare 294 generic { } declare 295 generic { int Tcl_ExternalToUtf(Tcl_Interp *interp, Tcl_Encoding encoding, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr) } declare 296 generic { char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding, - CONST char *src, int srcLen, Tcl_DString *dsPtr) + const char *src, int srcLen, Tcl_DString *dsPtr) } declare 297 generic { void Tcl_FinalizeThread(void) @@ -1086,7 +1086,7 @@ declare 300 generic { Tcl_ThreadId Tcl_GetCurrentThread(void) } declare 301 generic { - Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, CONST char *name) + Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, const char *name) } declare 302 generic { CONST84_RETURN char * Tcl_GetEncodingName(Tcl_Encoding encoding) @@ -1096,15 +1096,15 @@ declare 303 generic { } declare 304 generic { int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr, - CONST VOID *tablePtr, int offset, CONST char *msg, int flags, + const VOID *tablePtr, int offset, const char *msg, int flags, int *indexPtr) } declare 305 generic { VOID * Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size) } declare 306 generic { - Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, CONST char *part1, - CONST char *part2, int flags) + Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1, + const char *part2, int flags) } declare 307 generic { ClientData Tcl_InitNotifier(void) @@ -1120,10 +1120,10 @@ declare 310 generic { } declare 311 generic { void Tcl_ConditionWait(Tcl_Condition *condPtr, Tcl_Mutex *mutexPtr, - CONST Tcl_Time *timePtr) + const Tcl_Time *timePtr) } declare 312 generic { - int Tcl_NumUtfChars(CONST char *src, int length) + int Tcl_NumUtfChars(const char *src, int length) } declare 313 generic { int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr, int charsToRead, @@ -1136,11 +1136,11 @@ declare 315 generic { void Tcl_SaveResult(Tcl_Interp *interp, Tcl_SavedResult *statePtr) } declare 316 generic { - int Tcl_SetSystemEncoding(Tcl_Interp *interp, CONST char *name) + int Tcl_SetSystemEncoding(Tcl_Interp *interp, const char *name) } declare 317 generic { - Tcl_Obj * Tcl_SetVar2Ex(Tcl_Interp *interp, CONST char *part1, - CONST char *part2, Tcl_Obj *newValuePtr, int flags) + Tcl_Obj * Tcl_SetVar2Ex(Tcl_Interp *interp, const char *part1, + const char *part2, Tcl_Obj *newValuePtr, int flags) } declare 318 generic { void Tcl_ThreadAlert(Tcl_ThreadId threadId) @@ -1150,7 +1150,7 @@ declare 319 generic { Tcl_QueuePosition position) } declare 320 generic { - Tcl_UniChar Tcl_UniCharAtIndex(CONST char *src, int index) + Tcl_UniChar Tcl_UniCharAtIndex(const char *src, int index) } declare 321 generic { Tcl_UniChar Tcl_UniCharToLower(int ch) @@ -1165,35 +1165,35 @@ declare 324 generic { int Tcl_UniCharToUtf(int ch, char *buf) } declare 325 generic { - CONST84_RETURN char * Tcl_UtfAtIndex(CONST char *src, int index) + CONST84_RETURN char * Tcl_UtfAtIndex(const char *src, int index) } declare 326 generic { - int Tcl_UtfCharComplete(CONST char *src, int length) + int Tcl_UtfCharComplete(const char *src, int length) } declare 327 generic { - int Tcl_UtfBackslash(CONST char *src, int *readPtr, char *dst) + int Tcl_UtfBackslash(const char *src, int *readPtr, char *dst) } declare 328 generic { - CONST84_RETURN char * Tcl_UtfFindFirst(CONST char *src, int ch) + CONST84_RETURN char * Tcl_UtfFindFirst(const char *src, int ch) } declare 329 generic { - CONST84_RETURN char * Tcl_UtfFindLast(CONST char *src, int ch) + CONST84_RETURN char * Tcl_UtfFindLast(const char *src, int ch) } declare 330 generic { - CONST84_RETURN char * Tcl_UtfNext(CONST char *src) + CONST84_RETURN char * Tcl_UtfNext(const char *src) } declare 331 generic { - CONST84_RETURN char * Tcl_UtfPrev(CONST char *src, CONST char *start) + CONST84_RETURN char * Tcl_UtfPrev(const char *src, const char *start) } declare 332 generic { int Tcl_UtfToExternal(Tcl_Interp *interp, Tcl_Encoding encoding, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr) } declare 333 generic { char * Tcl_UtfToExternalDString(Tcl_Encoding encoding, - CONST char *src, int srcLen, Tcl_DString *dsPtr) + const char *src, int srcLen, Tcl_DString *dsPtr) } declare 334 generic { int Tcl_UtfToLower(char *src) @@ -1202,13 +1202,13 @@ declare 335 generic { int Tcl_UtfToTitle(char *src) } declare 336 generic { - int Tcl_UtfToUniChar(CONST char *src, Tcl_UniChar *chPtr) + int Tcl_UtfToUniChar(const char *src, Tcl_UniChar *chPtr) } declare 337 generic { int Tcl_UtfToUpper(char *src) } declare 338 generic { - int Tcl_WriteChars(Tcl_Channel chan, CONST char *src, int srcLen) + int Tcl_WriteChars(Tcl_Channel chan, const char *src, int srcLen) } declare 339 generic { int Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr) @@ -1220,7 +1220,7 @@ declare 341 generic { CONST84_RETURN char * Tcl_GetDefaultEncodingDir(void) } declare 342 generic { - void Tcl_SetDefaultEncodingDir(CONST char *path) + void Tcl_SetDefaultEncodingDir(const char *path) } declare 343 generic { void Tcl_AlertNotifier(ClientData clientData) @@ -1250,18 +1250,18 @@ declare 351 generic { int Tcl_UniCharIsWordChar(int ch) } declare 352 generic { - int Tcl_UniCharLen(CONST Tcl_UniChar *uniStr) + int Tcl_UniCharLen(const Tcl_UniChar *uniStr) } declare 353 generic { - int Tcl_UniCharNcmp(CONST Tcl_UniChar *ucs, CONST Tcl_UniChar *uct, + int Tcl_UniCharNcmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned long numChars) } declare 354 generic { - char * Tcl_UniCharToUtfDString(CONST Tcl_UniChar *uniStr, + char * Tcl_UniCharToUtfDString(const Tcl_UniChar *uniStr, int uniLength, Tcl_DString *dsPtr) } declare 355 generic { - Tcl_UniChar * Tcl_UtfToUniCharDString(CONST char *src, + Tcl_UniChar * Tcl_UtfToUniCharDString(const char *src, int length, Tcl_DString *dsPtr) } declare 356 generic { @@ -1276,28 +1276,28 @@ declare 358 generic { void Tcl_FreeParse(Tcl_Parse *parsePtr) } declare 359 generic { - void Tcl_LogCommandInfo(Tcl_Interp *interp, CONST char *script, - CONST char *command, int length) + void Tcl_LogCommandInfo(Tcl_Interp *interp, const char *script, + const char *command, int length) } declare 360 generic { - int Tcl_ParseBraces(Tcl_Interp *interp, CONST char *start, int numBytes, + int Tcl_ParseBraces(Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr, int append, CONST84 char **termPtr) } declare 361 generic { - int Tcl_ParseCommand(Tcl_Interp *interp, CONST char *start, int numBytes, + int Tcl_ParseCommand(Tcl_Interp *interp, const char *start, int numBytes, int nested, Tcl_Parse *parsePtr) } declare 362 generic { - int Tcl_ParseExpr(Tcl_Interp *interp, CONST char *start, int numBytes, + int Tcl_ParseExpr(Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr) } declare 363 generic { - int Tcl_ParseQuotedString(Tcl_Interp *interp, CONST char *start, + int Tcl_ParseQuotedString(Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr, int append, CONST84 char **termPtr) } declare 364 generic { - int Tcl_ParseVarName(Tcl_Interp *interp, CONST char *start, int numBytes, + int Tcl_ParseVarName(Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr, int append) } # These 4 functions are obsolete, use Tcl_FSGetCwd, Tcl_FSChdir, @@ -1306,22 +1306,22 @@ declare 365 generic { char *Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr) } declare 366 generic { - int Tcl_Chdir(CONST char *dirName) + int Tcl_Chdir(const char *dirName) } declare 367 generic { - int Tcl_Access(CONST char *path, int mode) + int Tcl_Access(const char *path, int mode) } declare 368 generic { - int Tcl_Stat(CONST char *path, struct stat *bufPtr) + int Tcl_Stat(const char *path, struct stat *bufPtr) } declare 369 generic { - int Tcl_UtfNcmp(CONST char *s1, CONST char *s2, unsigned long n) + int Tcl_UtfNcmp(const char *s1, const char *s2, unsigned long n) } declare 370 generic { - int Tcl_UtfNcasecmp(CONST char *s1, CONST char *s2, unsigned long n) + int Tcl_UtfNcasecmp(const char *s1, const char *s2, unsigned long n) } declare 371 generic { - int Tcl_StringCaseMatch(CONST char *str, CONST char *pattern, int nocase) + int Tcl_StringCaseMatch(const char *str, const char *pattern, int nocase) } declare 372 generic { int Tcl_UniCharIsControl(int ch) @@ -1343,10 +1343,10 @@ declare 377 generic { void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr) } declare 378 generic { - Tcl_Obj * Tcl_NewUnicodeObj(CONST Tcl_UniChar *unicode, int numChars) + Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode, int numChars) } declare 379 generic { - void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, CONST Tcl_UniChar *unicode, + void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars) } declare 380 generic { @@ -1362,7 +1362,7 @@ declare 383 generic { Tcl_Obj * Tcl_GetRange(Tcl_Obj *objPtr, int first, int last) } declare 384 generic { - void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr, CONST Tcl_UniChar *unicode, + void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int length) } declare 385 generic { @@ -1379,11 +1379,11 @@ declare 388 generic { int Tcl_GetChannelNames(Tcl_Interp *interp) } declare 389 generic { - int Tcl_GetChannelNamesEx(Tcl_Interp *interp, CONST char *pattern) + int Tcl_GetChannelNamesEx(Tcl_Interp *interp, const char *pattern) } declare 390 generic { int Tcl_ProcObjCmd(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]) + int objc, Tcl_Obj *const objv[]) } declare 391 generic { void Tcl_ConditionFinalize(Tcl_Condition *condPtr) @@ -1401,7 +1401,7 @@ declare 394 generic { int Tcl_ReadRaw(Tcl_Channel chan, char *dst, int bytesToRead) } declare 395 generic { - int Tcl_WriteRaw(Tcl_Channel chan, CONST char *src, int srcLen) + int Tcl_WriteRaw(Tcl_Channel chan, const char *src, int srcLen) } declare 396 generic { Tcl_Channel Tcl_GetTopChannel(Tcl_Channel chan) @@ -1410,59 +1410,59 @@ declare 397 generic { int Tcl_ChannelBuffered(Tcl_Channel chan) } declare 398 generic { - CONST84_RETURN char * Tcl_ChannelName(CONST Tcl_ChannelType *chanTypePtr) + CONST84_RETURN char * Tcl_ChannelName(const Tcl_ChannelType *chanTypePtr) } declare 399 generic { Tcl_ChannelTypeVersion Tcl_ChannelVersion( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 400 generic { Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 401 generic { Tcl_DriverCloseProc * Tcl_ChannelCloseProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 402 generic { Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 403 generic { Tcl_DriverInputProc * Tcl_ChannelInputProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 404 generic { Tcl_DriverOutputProc * Tcl_ChannelOutputProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 405 generic { Tcl_DriverSeekProc * Tcl_ChannelSeekProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 406 generic { Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 407 generic { Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 408 generic { Tcl_DriverWatchProc * Tcl_ChannelWatchProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 409 generic { Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 410 generic { Tcl_DriverFlushProc * Tcl_ChannelFlushProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } declare 411 generic { Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } # Introduced in 8.4a2 @@ -1485,55 +1485,55 @@ declare 417 generic { void Tcl_ClearChannelHandlers(Tcl_Channel channel) } declare 418 generic { - int Tcl_IsChannelExisting(CONST char* channelName) + int Tcl_IsChannelExisting(const char* channelName) } declare 419 generic { - int Tcl_UniCharNcasecmp(CONST Tcl_UniChar *ucs, CONST Tcl_UniChar *uct, + int Tcl_UniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned long numChars) } declare 420 generic { - int Tcl_UniCharCaseMatch(CONST Tcl_UniChar *uniStr, - CONST Tcl_UniChar *uniPattern, int nocase) + int Tcl_UniCharCaseMatch(const Tcl_UniChar *uniStr, + const Tcl_UniChar *uniPattern, int nocase) } declare 421 generic { - Tcl_HashEntry *Tcl_FindHashEntry(Tcl_HashTable *tablePtr, CONST char *key) + Tcl_HashEntry *Tcl_FindHashEntry(Tcl_HashTable *tablePtr, const char *key) } declare 422 generic { Tcl_HashEntry *Tcl_CreateHashEntry(Tcl_HashTable *tablePtr, - CONST char *key, int *newPtr) + const char *key, int *newPtr) } declare 423 generic { void Tcl_InitCustomHashTable(Tcl_HashTable *tablePtr, int keyType, - CONST Tcl_HashKeyType *typePtr) + const Tcl_HashKeyType *typePtr) } declare 424 generic { void Tcl_InitObjHashTable(Tcl_HashTable *tablePtr) } declare 425 generic { - ClientData Tcl_CommandTraceInfo(Tcl_Interp *interp, CONST char *varName, + ClientData Tcl_CommandTraceInfo(Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *procPtr, ClientData prevClientData) } declare 426 generic { - int Tcl_TraceCommand(Tcl_Interp *interp, CONST char *varName, int flags, + int Tcl_TraceCommand(Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, ClientData clientData) } declare 427 generic { - void Tcl_UntraceCommand(Tcl_Interp *interp, CONST char *varName, + void Tcl_UntraceCommand(Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, ClientData clientData) } declare 428 generic { char * Tcl_AttemptAlloc(unsigned int size) } declare 429 generic { - char * Tcl_AttemptDbCkalloc(unsigned int size, CONST char *file, int line) + char * Tcl_AttemptDbCkalloc(unsigned int size, const char *file, int line) } declare 430 generic { char * Tcl_AttemptRealloc(char *ptr, unsigned int size) } declare 431 generic { char * Tcl_AttemptDbCkrealloc(char *ptr, unsigned int size, - CONST char *file, int line) + const char *file, int line) } declare 432 generic { int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length) @@ -1546,12 +1546,12 @@ declare 434 generic { Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr) } declare 435 generic { - int Tcl_GetMathFuncInfo(Tcl_Interp *interp, CONST char *name, + int Tcl_GetMathFuncInfo(Tcl_Interp *interp, const char *name, int *numArgsPtr, Tcl_ValueType **argTypesPtr, Tcl_MathProc **procPtr, ClientData *clientDataPtr) } declare 436 generic { - Tcl_Obj * Tcl_ListMathFuncs(Tcl_Interp *interp, CONST char *pattern) + Tcl_Obj * Tcl_ListMathFuncs(Tcl_Interp *interp, const char *pattern) } declare 437 generic { Tcl_Obj * Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) @@ -1578,7 +1578,7 @@ declare 443 generic { } declare 444 generic { int Tcl_FSLoadFile(Tcl_Interp * interp, - Tcl_Obj *pathPtr, CONST char * sym1, CONST char * sym2, + Tcl_Obj *pathPtr, const char * sym1, const char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, @@ -1586,7 +1586,7 @@ declare 444 generic { } declare 445 generic { int Tcl_FSMatchInDirectory(Tcl_Interp *interp, Tcl_Obj *result, - Tcl_Obj *pathPtr, CONST char *pattern, Tcl_GlobTypeData *types) + Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types) } declare 446 generic { Tcl_Obj * Tcl_FSLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkAction) @@ -1613,7 +1613,7 @@ declare 452 generic { int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr) } declare 453 generic { - CONST char *CONST86 * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) + const char *CONST86 * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) } declare 454 generic { int Tcl_FSStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf) @@ -1623,7 +1623,7 @@ declare 455 generic { } declare 456 generic { Tcl_Channel Tcl_FSOpenFileChannel(Tcl_Interp *interp, Tcl_Obj *pathPtr, - CONST char *modeString, int permissions) + const char *modeString, int permissions) } declare 457 generic { Tcl_Obj* Tcl_FSGetCwd(Tcl_Interp *interp) @@ -1648,11 +1648,11 @@ declare 463 generic { } declare 464 generic { Tcl_Obj* Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *const objv[]) } declare 465 generic { ClientData Tcl_FSGetInternalRep(Tcl_Obj* pathPtr, - CONST Tcl_Filesystem *fsPtr) + const Tcl_Filesystem *fsPtr) } declare 466 generic { Tcl_Obj* Tcl_FSGetTranslatedPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) @@ -1661,11 +1661,11 @@ declare 467 generic { int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName) } declare 468 generic { - Tcl_Obj* Tcl_FSNewNativePath(CONST Tcl_Filesystem* fromFilesystem, + Tcl_Obj* Tcl_FSNewNativePath(const Tcl_Filesystem* fromFilesystem, ClientData clientData) } declare 469 generic { - CONST char* Tcl_FSGetNativePath(Tcl_Obj* pathPtr) + const char* Tcl_FSGetNativePath(Tcl_Obj* pathPtr) } declare 470 generic { Tcl_Obj* Tcl_FSFileSystemInfo(Tcl_Obj* pathPtr) @@ -1677,16 +1677,16 @@ declare 472 generic { Tcl_Obj* Tcl_FSListVolumes(void) } declare 473 generic { - int Tcl_FSRegister(ClientData clientData, CONST Tcl_Filesystem *fsPtr) + int Tcl_FSRegister(ClientData clientData, const Tcl_Filesystem *fsPtr) } declare 474 generic { - int Tcl_FSUnregister(CONST Tcl_Filesystem *fsPtr) + int Tcl_FSUnregister(const Tcl_Filesystem *fsPtr) } declare 475 generic { - ClientData Tcl_FSData(CONST Tcl_Filesystem *fsPtr) + ClientData Tcl_FSData(const Tcl_Filesystem *fsPtr) } declare 476 generic { - CONST char* Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, + const char* Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) } declare 477 generic { @@ -1700,7 +1700,7 @@ declare 479 generic { int Tcl_OutputBuffered(Tcl_Channel chan) } declare 480 generic { - void Tcl_FSMountsChanged(CONST Tcl_Filesystem *fsPtr) + void Tcl_FSMountsChanged(const Tcl_Filesystem *fsPtr) } # New function due to TIP#56 declare 481 generic { @@ -1725,13 +1725,13 @@ declare 484 generic { } declare 485 generic { int Tcl_SetCommandInfoFromToken(Tcl_Command token, - CONST Tcl_CmdInfo* infoPtr) + const Tcl_CmdInfo* infoPtr) } ### New functions on 64-bit dev branch ### declare 486 generic { Tcl_Obj * Tcl_DbNewWideIntObj(Tcl_WideInt wideValue, - CONST char *file, int line) + const char *file, int line) } declare 487 generic { int Tcl_GetWideIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -1756,7 +1756,7 @@ declare 492 generic { # New export due to TIP#91 declare 493 generic { Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } # DICTIONARIES - TIP#111 @@ -1789,28 +1789,28 @@ declare 500 generic { } declare 501 generic { int Tcl_DictObjPutKeyList(Tcl_Interp *interp, Tcl_Obj *dictPtr, - int keyc, Tcl_Obj *CONST *keyv, Tcl_Obj *valuePtr) + int keyc, Tcl_Obj *const *keyv, Tcl_Obj *valuePtr) } declare 502 generic { int Tcl_DictObjRemoveKeyList(Tcl_Interp *interp, Tcl_Obj *dictPtr, - int keyc, Tcl_Obj *CONST *keyv) + int keyc, Tcl_Obj *const *keyv) } declare 503 generic { Tcl_Obj *Tcl_NewDictObj(void) } declare 504 generic { - Tcl_Obj *Tcl_DbNewDictObj(CONST char *file, int line) + Tcl_Obj *Tcl_DbNewDictObj(const char *file, int line) } # New export due to TIP#59 declare 505 generic { - void Tcl_RegisterConfig(Tcl_Interp* interp, CONST char* pkgName, - CONST Tcl_Config* configuration, CONST char* valEncoding) + void Tcl_RegisterConfig(Tcl_Interp* interp, const char* pkgName, + const Tcl_Config* configuration, const char* valEncoding) } # Transferred from tclInt.decls due to TIP #139 declare 506 generic { - Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, const char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc) } declare 507 generic { @@ -1822,15 +1822,15 @@ declare 508 generic { } declare 509 generic { int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, - CONST char *pattern, int resetListFirst) + const char *pattern, int resetListFirst) } declare 510 generic { int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr, - CONST char *pattern, int allowOverwrite) + const char *pattern, int allowOverwrite) } declare 511 generic { int Tcl_ForgetImport(Tcl_Interp *interp, Tcl_Namespace *nsPtr, - CONST char *pattern) + const char *pattern) } declare 512 generic { Tcl_Namespace *Tcl_GetCurrentNamespace(Tcl_Interp *interp) @@ -1839,11 +1839,11 @@ declare 513 generic { Tcl_Namespace *Tcl_GetGlobalNamespace(Tcl_Interp *interp) } declare 514 generic { - Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags) } declare 515 generic { - Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, CONST char *name, + Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags) } declare 516 generic { @@ -1857,7 +1857,7 @@ declare 517 generic { # New export due to TIP#137 declare 518 generic { int Tcl_FSEvalFileEx(Tcl_Interp *interp, Tcl_Obj *fileName, - CONST char *encodingName) + const char *encodingName) } # New export due to TIP#121 @@ -1936,7 +1936,7 @@ declare 540 generic { int Tcl_IsEnsemble(Tcl_Command token) } declare 541 generic { - Tcl_Command Tcl_CreateEnsemble(Tcl_Interp *interp, CONST char *name, + Tcl_Command Tcl_CreateEnsemble(Tcl_Interp *interp, const char *name, Tcl_Namespace *namespacePtr, int flags) } declare 542 generic { @@ -1992,7 +1992,7 @@ declare 553 generic { # TIP#218 (Driver Thread Actions) davygrvy/akupries ChannelType ver 4 declare 554 generic { Tcl_DriverThreadActionProc *Tcl_ChannelThreadActionProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } # TIP#237 (Arbitrary-precision Integers) kevin kenny @@ -2001,7 +2001,7 @@ declare 555 generic { Tcl_Obj* Tcl_NewBignumObj(mp_int* value) } declare 556 generic { - Tcl_Obj* Tcl_DbNewBignumObj(mp_int* value, CONST char* file, int line) + Tcl_Obj* Tcl_DbNewBignumObj(mp_int* value, const char* file, int line) } declare 557 generic { void Tcl_SetBignumObj(Tcl_Obj* obj, mp_int* value) @@ -2019,7 +2019,7 @@ declare 560 generic { } declare 561 generic { Tcl_DriverTruncateProc *Tcl_ChannelTruncateProc( - CONST Tcl_ChannelType *chanTypePtr) + const Tcl_ChannelType *chanTypePtr) } # TIP#219 (Tcl Channel Reflection API) akupries @@ -2068,13 +2068,13 @@ declare 571 generic { int Tcl_SetEncodingSearchPath(Tcl_Obj* searchPath) } declare 572 generic { - CONST char *Tcl_GetEncodingNameFromEnvironment(Tcl_DString* bufPtr) + const char *Tcl_GetEncodingNameFromEnvironment(Tcl_DString* bufPtr) } # TIP#268: Extended version numbers and requirements declare 573 generic { - int Tcl_PkgRequireProc(Tcl_Interp *interp, CONST char *name, - int objc, Tcl_Obj *CONST objv[], ClientData *clientDataPtr) + int Tcl_PkgRequireProc(Tcl_Interp *interp, const char *name, + int objc, Tcl_Obj *const objv[], ClientData *clientDataPtr) } # TIP#270 Utility C Routines for String Formatting @@ -2082,22 +2082,22 @@ declare 574 generic { void Tcl_AppendObjToErrorInfo(Tcl_Interp *interp, Tcl_Obj *objPtr) } declare 575 generic { - void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr, CONST char *bytes, int length, - int limit, CONST char *ellipsis) + void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr, const char *bytes, int length, + int limit, const char *ellipsis) } declare 576 generic { - Tcl_Obj * Tcl_Format(Tcl_Interp *interp, CONST char *format, int objc, - Tcl_Obj * CONST objv[]) + Tcl_Obj * Tcl_Format(Tcl_Interp *interp, const char *format, int objc, + Tcl_Obj * const objv[]) } declare 577 generic { int Tcl_AppendFormatToObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - CONST char *format, int objc, Tcl_Obj * CONST objv[]) + const char *format, int objc, Tcl_Obj * const objv[]) } declare 578 generic { - Tcl_Obj * Tcl_ObjPrintf(CONST char *format, ...) + Tcl_Obj * Tcl_ObjPrintf(const char *format, ...) } declare 579 generic { - void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, CONST char *format, ...) + void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, const char *format, ...) } # TIP #285: Script cancellation support. @@ -2117,34 +2117,34 @@ declare 582 generic { # TIP #322 (NRE public interface) declare 583 generic { - Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, - CONST char *cmdName, Tcl_ObjCmdProc *proc, - Tcl_ObjCmdProc *nreProc, ClientData clientData, + Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, + const char *cmdName, Tcl_ObjCmdProc *proc, + Tcl_ObjCmdProc *nreProc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc) } declare 584 generic { int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) } declare 585 generic { - int Tcl_NREvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], + int Tcl_NREvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags) } declare 586 generic { - int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc, - Tcl_Obj *CONST objv[], int flags) + int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc, + Tcl_Obj *const objv[], int flags) } declare 587 generic { - void Tcl_NRAddCallback(Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, + void Tcl_NRAddCallback(Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3) } # For use by NR extenders, to have a simple way to also provide a (required!) -# classic objProc +# classic objProc declare 588 generic { int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData, int objc, - Tcl_Obj *CONST objv[]) + Tcl_Obj *const objv[]) } # Tcl_StatBuf reader functions. [TIP #316] @@ -2221,10 +2221,10 @@ interface tclPlat # Added in Tcl 8.1 declare 0 win { - TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len, Tcl_DString *dsPtr) + TCHAR * Tcl_WinUtfToTChar(const char *str, int len, Tcl_DString *dsPtr) } declare 1 win { - char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len, Tcl_DString *dsPtr) + char * Tcl_WinTCharToUtf(const TCHAR *str, int len, Tcl_DString *dsPtr) } ################################ @@ -2232,15 +2232,15 @@ declare 1 win { declare 0 macosx { int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp, - CONST char *bundleName, + const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath) } declare 1 macosx { int Tcl_MacOSXOpenVersionedBundleResources(Tcl_Interp *interp, - CONST char *bundleName, - CONST char *bundleVersion, + const char *bundleName, + const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath) @@ -2255,7 +2255,7 @@ export { void Tcl_Main(int argc, char **argv, Tcl_AppInitProc *appInitProc) } export { - CONST char *Tcl_PkgInitStubsCheck(Tcl_Interp *interp, CONST char *version, + const char *Tcl_PkgInitStubsCheck(Tcl_Interp *interp, const char *version, int exact) } export { diff --git a/generic/tcl.h b/generic/tcl.h index d081eb5..b418aa7 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.276 2008/10/14 20:08:20 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.277 2008/10/22 20:23:59 nijtmans Exp $ */ #ifndef _TCL @@ -240,15 +240,17 @@ extern "C" { * ANSI C features. */ -#undef CONST #ifndef INLINE # define INLINE #endif -#ifndef NO_CONST +#ifdef NO_CONST +# ifndef const +# define const +# endif +#endif +#ifndef CONST # define CONST const -#else -# define CONST #endif #ifdef USE_NON_CONST @@ -260,10 +262,10 @@ extern "C" { #else # ifdef USE_COMPAT_CONST # define CONST84 -# define CONST84_RETURN CONST +# define CONST84_RETURN const # else -# define CONST84 CONST -# define CONST84_RETURN CONST +# define CONST84 const +# define CONST84_RETURN const # endif #endif @@ -673,12 +675,12 @@ typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc, ClientData cmdClientData, int argc, CONST84 char *argv[]); typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp, - int level, CONST char *command, Tcl_Command commandInfo, int objc, - struct Tcl_Obj * CONST * objv); + int level, const char *command, Tcl_Command commandInfo, int objc, + struct Tcl_Obj * const* objv); typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData); typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr, struct Tcl_Obj *dupPtr); -typedef int (Tcl_EncodingConvertProc) (ClientData clientData, CONST char *src, +typedef int (Tcl_EncodingConvertProc) (ClientData clientData, const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); typedef void (Tcl_EncodingFreeProc) (ClientData clientData); @@ -698,10 +700,10 @@ typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr); typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData); typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp, - int objc, struct Tcl_Obj * CONST * objv); + int objc, struct Tcl_Obj * const* objv); typedef int (Tcl_PackageInitProc) (Tcl_Interp *interp); typedef int (Tcl_PackageUnloadProc) (Tcl_Interp *interp, int flags); -typedef void (Tcl_PanicProc) (CONST char *format, ...); +typedef void (Tcl_PanicProc) (const char *format, ...); typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan, char *address, int port); typedef void (Tcl_TimerProc) (ClientData clientData); @@ -710,7 +712,7 @@ typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr); typedef char *(Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp, CONST84 char *part1, CONST84 char *part2, int flags); typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp, - CONST char *oldName, CONST char *newName, int flags); + const char *oldName, const char *newName, int flags); typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc, ClientData clientData); typedef void (Tcl_DeleteFileHandlerProc) (int fd); @@ -727,7 +729,7 @@ typedef void (Tcl_MainLoopProc) (void); */ typedef struct Tcl_ObjType { - CONST char *name; /* Name of the type, e.g. "int". */ + const char *name; /* Name of the type, e.g. "int". */ Tcl_FreeInternalRepProc *freeIntRepProc; /* Called to free any storage for the type's * internal rep. NULL if the internal rep does @@ -765,7 +767,7 @@ typedef struct Tcl_Obj { * array as a readonly value. */ int length; /* The number of bytes at *bytes, not * including the terminating null. */ - CONST Tcl_ObjType *typePtr; /* Denotes the object's type. Always + const Tcl_ObjType *typePtr; /* Denotes the object's type. Always * corresponds to the type of the object's * internal rep. NULL indicates the object has * no internal rep (has no type). */ @@ -1233,8 +1235,8 @@ struct Tcl_HashTable { * TCL_ONE_WORD_KEYS, or an integer giving the * number of ints that is the size of the * key. */ - Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, CONST char *key); - Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, CONST char *key, + Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, const char *key); + Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, const char *key, int *newPtr); const Tcl_HashKeyType *typePtr; /* Type of the keys used in the * Tcl_HashTable. */ @@ -1424,8 +1426,8 @@ typedef int (Tcl_DriverOutputProc) (ClientData instanceData, typedef int (Tcl_DriverSeekProc) (ClientData instanceData, long offset, int mode, int *errorCodePtr); typedef int (Tcl_DriverSetOptionProc) (ClientData instanceData, - Tcl_Interp *interp, CONST char *optionName, - CONST char *value); + Tcl_Interp *interp, const char *optionName, + const char *value); typedef int (Tcl_DriverGetOptionProc) (ClientData instanceData, Tcl_Interp *interp, CONST84 char *optionName, Tcl_DString *dsPtr); @@ -1460,7 +1462,7 @@ typedef int (Tcl_DriverTruncateProc) (ClientData instanceData, */ typedef struct Tcl_ChannelType { - CONST char *typeName; /* The name of the channel type in Tcl + const char *typeName; /* The name of the channel type in Tcl * commands. This storage is owned by channel * type. */ Tcl_ChannelTypeVersion version; @@ -1597,7 +1599,7 @@ typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode); typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode, int permissions); typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result, - Tcl_Obj *pathPtr, CONST char *pattern, Tcl_GlobTypeData * types); + Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData * types); typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp); typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr); typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); @@ -1618,7 +1620,7 @@ typedef int (Tcl_FSNormalizePathProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, int nextCheckpoint); typedef int (Tcl_FSFileAttrsGetProc) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); -typedef CONST char *CONST86 * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr, +typedef const char *CONST86 * (Tcl_FSFileAttrStringsProc) (Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr); @@ -1662,7 +1664,7 @@ typedef struct Tcl_FSVersion_ *Tcl_FSVersion; */ typedef struct Tcl_Filesystem { - CONST char *typeName; /* The name of the filesystem. */ + const char *typeName; /* The name of the filesystem. */ int structureLength; /* Length of this structure, so future binary * compatibility can be assured. */ Tcl_FSVersion version; /* Version of the filesystem type. */ @@ -1845,7 +1847,7 @@ typedef struct Tcl_NotifierProcs { */ typedef struct Tcl_EncodingType { - CONST char *encodingName; /* The name of the encoding, e.g. "euc-jp". + const char *encodingName; /* The name of the encoding, e.g. "euc-jp". * This name is the unique key for this * encoding type. */ Tcl_EncodingConvertProc *toUtfProc; @@ -1913,7 +1915,7 @@ typedef struct Tcl_EncodingType { typedef struct Tcl_Token { int type; /* Type of token, such as TCL_TOKEN_WORD; see * below for valid types. */ - CONST char *start; /* First character in token. */ + const char *start; /* First character in token. */ int size; /* Number of bytes in token. */ int numComponents; /* If this token is composed of other tokens, * this field tells how many of them there are @@ -2027,13 +2029,13 @@ typedef struct Tcl_Token { #define NUM_STATIC_TOKENS 20 typedef struct Tcl_Parse { - CONST char *commentStart; /* Pointer to # that begins the first of one + const char *commentStart; /* Pointer to # that begins the first of one * or more comments preceding the command. */ int commentSize; /* Number of bytes in comments (up through * newline character that terminates the last * comment). If there were no comments, this * field is 0. */ - CONST char *commandStart; /* First character in first word of + const char *commandStart; /* First character in first word of * command. */ int commandSize; /* Number of bytes in command, including first * character of first word, up through the @@ -2057,13 +2059,13 @@ typedef struct Tcl_Parse { * They should not be used by functions that invoke Tcl_ParseCommand. */ - CONST char *string; /* The original command string passed to + const char *string; /* The original command string passed to * Tcl_ParseCommand. */ - CONST char *end; /* Points to the character just after the last + const char *end; /* Points to the character just after the last * one in the command string. */ Tcl_Interp *interp; /* Interpreter to use for error reporting, or * NULL. */ - CONST char *term; /* Points to character in string that + const char *term; /* Points to character in string that * terminated most recent token. Filled in by * ParseTokens. If an error occurs, points to * beginning of region where the error @@ -2154,9 +2156,9 @@ typedef unsigned short Tcl_UniChar; */ typedef struct Tcl_Config { - CONST char *key; /* Configuration key to register. ASCII + const char *key; /* Configuration key to register. ASCII * encoded, thus UTF-8 */ - CONST char *value; /* The value associated with the key. System + const char *value; /* The value associated with the key. System * encoding */ } Tcl_Config; @@ -2261,10 +2263,10 @@ typedef int (*Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, * main library in case an extension is statically linked into an application. */ -EXTERN CONST char * Tcl_InitStubs (Tcl_Interp *interp, CONST char *version, +EXTERN const char * Tcl_InitStubs (Tcl_Interp *interp, const char *version, int exact); -EXTERN CONST char * TclTomMathInitializeStubs (Tcl_Interp *interp, - CONST char *version, int epoch, int revision); +EXTERN const char * TclTomMathInitializeStubs (Tcl_Interp *interp, + const char *version, int epoch, int revision); #ifndef USE_TCL_STUBS @@ -2289,8 +2291,8 @@ EXTERN CONST char * TclTomMathInitializeStubs (Tcl_Interp *interp, EXTERN void Tcl_Main (int argc, char **argv, Tcl_AppInitProc *appInitProc); -EXTERN CONST char * Tcl_PkgInitStubsCheck (Tcl_Interp *interp, - CONST char *version, int exact); +EXTERN const char * Tcl_PkgInitStubsCheck (Tcl_Interp *interp, + const char *version, int exact); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) EXTERN void Tcl_GetMemoryInfo (Tcl_DString *dsPtr); #endif diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 102a9ec..2ef278f 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.111 2008/10/17 16:32:58 dgp Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.112 2008/10/22 20:23:59 nijtmans Exp $ */ #ifndef _TCLCOMPILATION @@ -879,7 +879,7 @@ MODULE_SCOPE void TclCompileTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, CompileEnv *envPtr); MODULE_SCOPE int TclCreateAuxData(ClientData clientData, - CONST AuxDataType *typePtr, CompileEnv *envPtr); + const AuxDataType *typePtr, CompileEnv *envPtr); MODULE_SCOPE int TclCreateExceptRange(ExceptionRangeType type, CompileEnv *envPtr); MODULE_SCOPE ExecEnv * TclCreateExecEnv(Tcl_Interp *interp); @@ -930,7 +930,7 @@ MODULE_SCOPE void TclPrintObject(FILE *outFile, Tcl_Obj *objPtr, int maxChars); MODULE_SCOPE void TclPrintSource(FILE *outFile, const char *string, int maxChars); -MODULE_SCOPE void TclRegisterAuxDataType(CONST AuxDataType *typePtr); +MODULE_SCOPE void TclRegisterAuxDataType(const AuxDataType *typePtr); MODULE_SCOPE int TclRegisterLiteral(CompileEnv *envPtr, char *bytes, int length, int flags); MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr); @@ -1233,7 +1233,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, * If the second macro is defined, logging to file starts immediately, * otherwise only after the first call to [tcl::dtrace]. Note that the debug * probe data is always computed, even when it is not logged to file. - * + * * Defining the third macro enables debug logging of inst probes (disabled * by default due to the significant performance impact). */ diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 8b7beaa..784f1ca 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.154 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.155 2008/10/22 20:23:59 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -40,21 +40,21 @@ #ifndef Tcl_PkgProvideEx_TCL_DECLARED #define Tcl_PkgProvideEx_TCL_DECLARED /* 0 */ -EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, - CONST char* name, CONST char* version, +EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, + const char* name, const char* version, ClientData clientData); #endif #ifndef Tcl_PkgRequireEx_TCL_DECLARED #define Tcl_PkgRequireEx_TCL_DECLARED /* 1 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, - CONST char * name, CONST char * version, +EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, + const char * name, const char * version, int exact, ClientData * clientDataPtr); #endif #ifndef Tcl_Panic_TCL_DECLARED #define Tcl_Panic_TCL_DECLARED /* 2 */ -EXTERN void Tcl_Panic (CONST char * format, ...); +EXTERN void Tcl_Panic (const char * format, ...); #endif #ifndef Tcl_Alloc_TCL_DECLARED #define Tcl_Alloc_TCL_DECLARED @@ -74,26 +74,26 @@ EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); #ifndef Tcl_DbCkalloc_TCL_DECLARED #define Tcl_DbCkalloc_TCL_DECLARED /* 6 */ -EXTERN char * Tcl_DbCkalloc (unsigned int size, CONST char * file, +EXTERN char * Tcl_DbCkalloc (unsigned int size, const char * file, int line); #endif #ifndef Tcl_DbCkfree_TCL_DECLARED #define Tcl_DbCkfree_TCL_DECLARED /* 7 */ -EXTERN int Tcl_DbCkfree (char * ptr, CONST char * file, +EXTERN int Tcl_DbCkfree (char * ptr, const char * file, int line); #endif #ifndef Tcl_DbCkrealloc_TCL_DECLARED #define Tcl_DbCkrealloc_TCL_DECLARED /* 8 */ -EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, - CONST char * file, int line); +EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, + const char * file, int line); #endif #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef Tcl_CreateFileHandler_TCL_DECLARED #define Tcl_CreateFileHandler_TCL_DECLARED /* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, +EXTERN void Tcl_CreateFileHandler (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); #endif #endif /* UNIX */ @@ -101,7 +101,7 @@ EXTERN void Tcl_CreateFileHandler (int fd, int mask, #ifndef Tcl_CreateFileHandler_TCL_DECLARED #define Tcl_CreateFileHandler_TCL_DECLARED /* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, +EXTERN void Tcl_CreateFileHandler (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); #endif #endif /* MACOSX */ @@ -122,7 +122,7 @@ EXTERN void Tcl_DeleteFileHandler (int fd); #ifndef Tcl_SetTimer_TCL_DECLARED #define Tcl_SetTimer_TCL_DECLARED /* 11 */ -EXTERN void Tcl_SetTimer (CONST Tcl_Time * timePtr); +EXTERN void Tcl_SetTimer (const Tcl_Time * timePtr); #endif #ifndef Tcl_Sleep_TCL_DECLARED #define Tcl_Sleep_TCL_DECLARED @@ -132,12 +132,12 @@ EXTERN void Tcl_Sleep (int ms); #ifndef Tcl_WaitForEvent_TCL_DECLARED #define Tcl_WaitForEvent_TCL_DECLARED /* 13 */ -EXTERN int Tcl_WaitForEvent (CONST Tcl_Time * timePtr); +EXTERN int Tcl_WaitForEvent (const Tcl_Time * timePtr); #endif #ifndef Tcl_AppendAllObjTypes_TCL_DECLARED #define Tcl_AppendAllObjTypes_TCL_DECLARED /* 14 */ -EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, +EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, Tcl_Obj * objPtr); #endif #ifndef Tcl_AppendStringsToObj_TCL_DECLARED @@ -148,79 +148,79 @@ EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); #ifndef Tcl_AppendToObj_TCL_DECLARED #define Tcl_AppendToObj_TCL_DECLARED /* 16 */ -EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, CONST char* bytes, +EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, const char* bytes, int length); #endif #ifndef Tcl_ConcatObj_TCL_DECLARED #define Tcl_ConcatObj_TCL_DECLARED /* 17 */ -EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *CONST objv[]); +EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_ConvertToType_TCL_DECLARED #define Tcl_ConvertToType_TCL_DECLARED /* 18 */ -EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, - Tcl_Obj * objPtr, - CONST Tcl_ObjType * typePtr); +EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, + Tcl_Obj * objPtr, + const Tcl_ObjType * typePtr); #endif #ifndef Tcl_DbDecrRefCount_TCL_DECLARED #define Tcl_DbDecrRefCount_TCL_DECLARED /* 19 */ -EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, - CONST char * file, int line); +EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, + const char * file, int line); #endif #ifndef Tcl_DbIncrRefCount_TCL_DECLARED #define Tcl_DbIncrRefCount_TCL_DECLARED /* 20 */ -EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, - CONST char * file, int line); +EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, + const char * file, int line); #endif #ifndef Tcl_DbIsShared_TCL_DECLARED #define Tcl_DbIsShared_TCL_DECLARED /* 21 */ -EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, CONST char * file, +EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, const char * file, int line); #endif #ifndef Tcl_DbNewBooleanObj_TCL_DECLARED #define Tcl_DbNewBooleanObj_TCL_DECLARED /* 22 */ -EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, - CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, + const char * file, int line); #endif #ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED #define Tcl_DbNewByteArrayObj_TCL_DECLARED /* 23 */ -EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (CONST unsigned char * bytes, - int length, CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (const unsigned char * bytes, + int length, const char * file, int line); #endif #ifndef Tcl_DbNewDoubleObj_TCL_DECLARED #define Tcl_DbNewDoubleObj_TCL_DECLARED /* 24 */ -EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, - CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, + const char * file, int line); #endif #ifndef Tcl_DbNewListObj_TCL_DECLARED #define Tcl_DbNewListObj_TCL_DECLARED /* 25 */ -EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *CONST * objv, - CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *const * objv, + const char * file, int line); #endif #ifndef Tcl_DbNewLongObj_TCL_DECLARED #define Tcl_DbNewLongObj_TCL_DECLARED /* 26 */ -EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, CONST char * file, +EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, const char * file, int line); #endif #ifndef Tcl_DbNewObj_TCL_DECLARED #define Tcl_DbNewObj_TCL_DECLARED /* 27 */ -EXTERN Tcl_Obj * Tcl_DbNewObj (CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewObj (const char * file, int line); #endif #ifndef Tcl_DbNewStringObj_TCL_DECLARED #define Tcl_DbNewStringObj_TCL_DECLARED /* 28 */ -EXTERN Tcl_Obj * Tcl_DbNewStringObj (CONST char * bytes, int length, - CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewStringObj (const char * bytes, int length, + const char * file, int line); #endif #ifndef Tcl_DuplicateObj_TCL_DECLARED #define Tcl_DuplicateObj_TCL_DECLARED @@ -235,68 +235,68 @@ EXTERN void TclFreeObj (Tcl_Obj * objPtr); #ifndef Tcl_GetBoolean_TCL_DECLARED #define Tcl_GetBoolean_TCL_DECLARED /* 31 */ -EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, - CONST char * src, int * boolPtr); +EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, + const char * src, int * boolPtr); #endif #ifndef Tcl_GetBooleanFromObj_TCL_DECLARED #define Tcl_GetBooleanFromObj_TCL_DECLARED /* 32 */ -EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, +EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); #endif #ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED #define Tcl_GetByteArrayFromObj_TCL_DECLARED /* 33 */ -EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, +EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, int * lengthPtr); #endif #ifndef Tcl_GetDouble_TCL_DECLARED #define Tcl_GetDouble_TCL_DECLARED /* 34 */ -EXTERN int Tcl_GetDouble (Tcl_Interp * interp, CONST char * src, +EXTERN int Tcl_GetDouble (Tcl_Interp * interp, const char * src, double * doublePtr); #endif #ifndef Tcl_GetDoubleFromObj_TCL_DECLARED #define Tcl_GetDoubleFromObj_TCL_DECLARED /* 35 */ -EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, +EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); #endif #ifndef Tcl_GetIndexFromObj_TCL_DECLARED #define Tcl_GetIndexFromObj_TCL_DECLARED /* 36 */ -EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, - CONST84 char *CONST * tablePtr, - CONST char * msg, int flags, int * indexPtr); +EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, + CONST84 char *const * tablePtr, + const char * msg, int flags, int * indexPtr); #endif #ifndef Tcl_GetInt_TCL_DECLARED #define Tcl_GetInt_TCL_DECLARED /* 37 */ -EXTERN int Tcl_GetInt (Tcl_Interp * interp, CONST char * src, +EXTERN int Tcl_GetInt (Tcl_Interp * interp, const char * src, int * intPtr); #endif #ifndef Tcl_GetIntFromObj_TCL_DECLARED #define Tcl_GetIntFromObj_TCL_DECLARED /* 38 */ -EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, +EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); #endif #ifndef Tcl_GetLongFromObj_TCL_DECLARED #define Tcl_GetLongFromObj_TCL_DECLARED /* 39 */ -EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, +EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); #endif #ifndef Tcl_GetObjType_TCL_DECLARED #define Tcl_GetObjType_TCL_DECLARED /* 40 */ -EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (CONST char * typeName); +EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (const char * typeName); #endif #ifndef Tcl_GetStringFromObj_TCL_DECLARED #define Tcl_GetStringFromObj_TCL_DECLARED /* 41 */ -EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, +EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, int * lengthPtr); #endif #ifndef Tcl_InvalidateStringRep_TCL_DECLARED @@ -307,41 +307,41 @@ EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); #ifndef Tcl_ListObjAppendList_TCL_DECLARED #define Tcl_ListObjAppendList_TCL_DECLARED /* 43 */ -EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, +EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); #endif #ifndef Tcl_ListObjAppendElement_TCL_DECLARED #define Tcl_ListObjAppendElement_TCL_DECLARED /* 44 */ -EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, +EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); #endif #ifndef Tcl_ListObjGetElements_TCL_DECLARED #define Tcl_ListObjGetElements_TCL_DECLARED /* 45 */ -EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * objcPtr, +EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); #endif #ifndef Tcl_ListObjIndex_TCL_DECLARED #define Tcl_ListObjIndex_TCL_DECLARED /* 46 */ -EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, +EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); #endif #ifndef Tcl_ListObjLength_TCL_DECLARED #define Tcl_ListObjLength_TCL_DECLARED /* 47 */ -EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, +EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); #endif #ifndef Tcl_ListObjReplace_TCL_DECLARED #define Tcl_ListObjReplace_TCL_DECLARED /* 48 */ -EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, - Tcl_Obj * listPtr, int first, int count, - int objc, Tcl_Obj *CONST objv[]); +EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, + Tcl_Obj * listPtr, int first, int count, + int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_NewBooleanObj_TCL_DECLARED #define Tcl_NewBooleanObj_TCL_DECLARED @@ -351,7 +351,7 @@ EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); #ifndef Tcl_NewByteArrayObj_TCL_DECLARED #define Tcl_NewByteArrayObj_TCL_DECLARED /* 50 */ -EXTERN Tcl_Obj * Tcl_NewByteArrayObj (CONST unsigned char* bytes, +EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char* bytes, int length); #endif #ifndef Tcl_NewDoubleObj_TCL_DECLARED @@ -367,7 +367,7 @@ EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); #ifndef Tcl_NewListObj_TCL_DECLARED #define Tcl_NewListObj_TCL_DECLARED /* 53 */ -EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *CONST objv[]); +EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_NewLongObj_TCL_DECLARED #define Tcl_NewLongObj_TCL_DECLARED @@ -382,7 +382,7 @@ EXTERN Tcl_Obj * Tcl_NewObj (void); #ifndef Tcl_NewStringObj_TCL_DECLARED #define Tcl_NewStringObj_TCL_DECLARED /* 56 */ -EXTERN Tcl_Obj * Tcl_NewStringObj (CONST char * bytes, int length); +EXTERN Tcl_Obj * Tcl_NewStringObj (const char * bytes, int length); #endif #ifndef Tcl_SetBooleanObj_TCL_DECLARED #define Tcl_SetBooleanObj_TCL_DECLARED @@ -397,13 +397,13 @@ EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); #ifndef Tcl_SetByteArrayObj_TCL_DECLARED #define Tcl_SetByteArrayObj_TCL_DECLARED /* 59 */ -EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, - CONST unsigned char * bytes, int length); +EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, + const unsigned char * bytes, int length); #endif #ifndef Tcl_SetDoubleObj_TCL_DECLARED #define Tcl_SetDoubleObj_TCL_DECLARED /* 60 */ -EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, +EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, double doubleValue); #endif #ifndef Tcl_SetIntObj_TCL_DECLARED @@ -414,8 +414,8 @@ EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); #ifndef Tcl_SetListObj_TCL_DECLARED #define Tcl_SetListObj_TCL_DECLARED /* 62 */ -EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, - Tcl_Obj *CONST objv[]); +EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, + Tcl_Obj *const objv[]); #endif #ifndef Tcl_SetLongObj_TCL_DECLARED #define Tcl_SetLongObj_TCL_DECLARED @@ -430,20 +430,20 @@ EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); #ifndef Tcl_SetStringObj_TCL_DECLARED #define Tcl_SetStringObj_TCL_DECLARED /* 65 */ -EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, CONST char* bytes, +EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, const char* bytes, int length); #endif #ifndef Tcl_AddErrorInfo_TCL_DECLARED #define Tcl_AddErrorInfo_TCL_DECLARED /* 66 */ -EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, - CONST char * message); +EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, + const char * message); #endif #ifndef Tcl_AddObjErrorInfo_TCL_DECLARED #define Tcl_AddObjErrorInfo_TCL_DECLARED /* 67 */ -EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, - CONST char * message, int length); +EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, + const char * message, int length); #endif #ifndef Tcl_AllowExceptions_TCL_DECLARED #define Tcl_AllowExceptions_TCL_DECLARED @@ -453,8 +453,8 @@ EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); #ifndef Tcl_AppendElement_TCL_DECLARED #define Tcl_AppendElement_TCL_DECLARED /* 69 */ -EXTERN void Tcl_AppendElement (Tcl_Interp * interp, - CONST char * element); +EXTERN void Tcl_AppendElement (Tcl_Interp * interp, + const char * element); #endif #ifndef Tcl_AppendResult_TCL_DECLARED #define Tcl_AppendResult_TCL_DECLARED @@ -464,7 +464,7 @@ EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); #ifndef Tcl_AsyncCreate_TCL_DECLARED #define Tcl_AsyncCreate_TCL_DECLARED /* 71 */ -EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, +EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, ClientData clientData); #endif #ifndef Tcl_AsyncDelete_TCL_DECLARED @@ -495,26 +495,26 @@ EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); #ifndef Tcl_Backslash_TCL_DECLARED #define Tcl_Backslash_TCL_DECLARED /* 77 */ -EXTERN char Tcl_Backslash (CONST char * src, int * readPtr); +EXTERN char Tcl_Backslash (const char * src, int * readPtr); #endif #ifndef Tcl_BadChannelOption_TCL_DECLARED #define Tcl_BadChannelOption_TCL_DECLARED /* 78 */ -EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, - CONST char * optionName, - CONST char * optionList); +EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, + const char * optionName, + const char * optionList); #endif #ifndef Tcl_CallWhenDeleted_TCL_DECLARED #define Tcl_CallWhenDeleted_TCL_DECLARED /* 79 */ -EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, +EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, ClientData clientData); #endif #ifndef Tcl_CancelIdleCall_TCL_DECLARED #define Tcl_CancelIdleCall_TCL_DECLARED /* 80 */ -EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, +EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, ClientData clientData); #endif #ifndef Tcl_Close_TCL_DECLARED @@ -525,81 +525,81 @@ EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); #ifndef Tcl_CommandComplete_TCL_DECLARED #define Tcl_CommandComplete_TCL_DECLARED /* 82 */ -EXTERN int Tcl_CommandComplete (CONST char * cmd); +EXTERN int Tcl_CommandComplete (const char * cmd); #endif #ifndef Tcl_Concat_TCL_DECLARED #define Tcl_Concat_TCL_DECLARED /* 83 */ -EXTERN char * Tcl_Concat (int argc, CONST84 char * CONST * argv); +EXTERN char * Tcl_Concat (int argc, CONST84 char * const * argv); #endif #ifndef Tcl_ConvertElement_TCL_DECLARED #define Tcl_ConvertElement_TCL_DECLARED /* 84 */ -EXTERN int Tcl_ConvertElement (CONST char * src, char * dst, +EXTERN int Tcl_ConvertElement (const char * src, char * dst, int flags); #endif #ifndef Tcl_ConvertCountedElement_TCL_DECLARED #define Tcl_ConvertCountedElement_TCL_DECLARED /* 85 */ -EXTERN int Tcl_ConvertCountedElement (CONST char * src, +EXTERN int Tcl_ConvertCountedElement (const char * src, int length, char * dst, int flags); #endif #ifndef Tcl_CreateAlias_TCL_DECLARED #define Tcl_CreateAlias_TCL_DECLARED /* 86 */ -EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, - CONST char * slaveCmd, Tcl_Interp * target, - CONST char * targetCmd, int argc, - CONST84 char * CONST * argv); +EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, + const char * slaveCmd, Tcl_Interp * target, + const char * targetCmd, int argc, + CONST84 char * const * argv); #endif #ifndef Tcl_CreateAliasObj_TCL_DECLARED #define Tcl_CreateAliasObj_TCL_DECLARED /* 87 */ -EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, - CONST char * slaveCmd, Tcl_Interp * target, - CONST char * targetCmd, int objc, - Tcl_Obj *CONST objv[]); +EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, + const char * slaveCmd, Tcl_Interp * target, + const char * targetCmd, int objc, + Tcl_Obj *const objv[]); #endif #ifndef Tcl_CreateChannel_TCL_DECLARED #define Tcl_CreateChannel_TCL_DECLARED /* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel (CONST Tcl_ChannelType * typePtr, - CONST char * chanName, +EXTERN Tcl_Channel Tcl_CreateChannel (const Tcl_ChannelType * typePtr, + const char * chanName, ClientData instanceData, int mask); #endif #ifndef Tcl_CreateChannelHandler_TCL_DECLARED #define Tcl_CreateChannelHandler_TCL_DECLARED /* 89 */ -EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, - Tcl_ChannelProc * proc, +EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, + Tcl_ChannelProc * proc, ClientData clientData); #endif #ifndef Tcl_CreateCloseHandler_TCL_DECLARED #define Tcl_CreateCloseHandler_TCL_DECLARED /* 90 */ -EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, +EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); #endif #ifndef Tcl_CreateCommand_TCL_DECLARED #define Tcl_CreateCommand_TCL_DECLARED /* 91 */ -EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_CmdProc * proc, - ClientData clientData, +EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_CmdProc * proc, + ClientData clientData, Tcl_CmdDeleteProc * deleteProc); #endif #ifndef Tcl_CreateEventSource_TCL_DECLARED #define Tcl_CreateEventSource_TCL_DECLARED /* 92 */ EXTERN void Tcl_CreateEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, ClientData clientData); #endif #ifndef Tcl_CreateExitHandler_TCL_DECLARED #define Tcl_CreateExitHandler_TCL_DECLARED /* 93 */ -EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, ClientData clientData); #endif #ifndef Tcl_CreateInterp_TCL_DECLARED @@ -610,87 +610,87 @@ EXTERN Tcl_Interp * Tcl_CreateInterp (void); #ifndef Tcl_CreateMathFunc_TCL_DECLARED #define Tcl_CreateMathFunc_TCL_DECLARED /* 95 */ -EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, - CONST char * name, int numArgs, - Tcl_ValueType * argTypes, +EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, + const char * name, int numArgs, + Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); #endif #ifndef Tcl_CreateObjCommand_TCL_DECLARED #define Tcl_CreateObjCommand_TCL_DECLARED /* 96 */ -EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_ObjCmdProc * proc, - ClientData clientData, +EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_ObjCmdProc * proc, + ClientData clientData, Tcl_CmdDeleteProc * deleteProc); #endif #ifndef Tcl_CreateSlave_TCL_DECLARED #define Tcl_CreateSlave_TCL_DECLARED /* 97 */ -EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, - CONST char * slaveName, int isSafe); +EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, + const char * slaveName, int isSafe); #endif #ifndef Tcl_CreateTimerHandler_TCL_DECLARED #define Tcl_CreateTimerHandler_TCL_DECLARED /* 98 */ -EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, +EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); #endif #ifndef Tcl_CreateTrace_TCL_DECLARED #define Tcl_CreateTrace_TCL_DECLARED /* 99 */ -EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, - Tcl_CmdTraceProc * proc, +EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, + Tcl_CmdTraceProc * proc, ClientData clientData); #endif #ifndef Tcl_DeleteAssocData_TCL_DECLARED #define Tcl_DeleteAssocData_TCL_DECLARED /* 100 */ -EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, - CONST char * name); +EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, + const char * name); #endif #ifndef Tcl_DeleteChannelHandler_TCL_DECLARED #define Tcl_DeleteChannelHandler_TCL_DECLARED /* 101 */ -EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, - Tcl_ChannelProc * proc, +EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, + Tcl_ChannelProc * proc, ClientData clientData); #endif #ifndef Tcl_DeleteCloseHandler_TCL_DECLARED #define Tcl_DeleteCloseHandler_TCL_DECLARED /* 102 */ -EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, +EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); #endif #ifndef Tcl_DeleteCommand_TCL_DECLARED #define Tcl_DeleteCommand_TCL_DECLARED /* 103 */ -EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, - CONST char * cmdName); +EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, + const char * cmdName); #endif #ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED #define Tcl_DeleteCommandFromToken_TCL_DECLARED /* 104 */ -EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, +EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, Tcl_Command command); #endif #ifndef Tcl_DeleteEvents_TCL_DECLARED #define Tcl_DeleteEvents_TCL_DECLARED /* 105 */ -EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, +EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, ClientData clientData); #endif #ifndef Tcl_DeleteEventSource_TCL_DECLARED #define Tcl_DeleteEventSource_TCL_DECLARED /* 106 */ EXTERN void Tcl_DeleteEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, ClientData clientData); #endif #ifndef Tcl_DeleteExitHandler_TCL_DECLARED #define Tcl_DeleteExitHandler_TCL_DECLARED /* 107 */ -EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, ClientData clientData); #endif #ifndef Tcl_DeleteHashEntry_TCL_DECLARED @@ -737,14 +737,14 @@ EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); #ifndef Tcl_DeleteTrace_TCL_DECLARED #define Tcl_DeleteTrace_TCL_DECLARED /* 113 */ -EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, +EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, Tcl_Trace trace); #endif #ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED #define Tcl_DontCallWhenDeleted_TCL_DECLARED /* 114 */ -EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, +EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, ClientData clientData); #endif #ifndef Tcl_DoOneEvent_TCL_DECLARED @@ -755,20 +755,20 @@ EXTERN int Tcl_DoOneEvent (int flags); #ifndef Tcl_DoWhenIdle_TCL_DECLARED #define Tcl_DoWhenIdle_TCL_DECLARED /* 116 */ -EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, +EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, ClientData clientData); #endif #ifndef Tcl_DStringAppend_TCL_DECLARED #define Tcl_DStringAppend_TCL_DECLARED /* 117 */ -EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, - CONST char * bytes, int length); +EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, + const char * bytes, int length); #endif #ifndef Tcl_DStringAppendElement_TCL_DECLARED #define Tcl_DStringAppendElement_TCL_DECLARED /* 118 */ -EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, - CONST char * element); +EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, + const char * element); #endif #ifndef Tcl_DStringEndSublist_TCL_DECLARED #define Tcl_DStringEndSublist_TCL_DECLARED @@ -783,7 +783,7 @@ EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); #ifndef Tcl_DStringGetResult_TCL_DECLARED #define Tcl_DStringGetResult_TCL_DECLARED /* 121 */ -EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, +EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, Tcl_DString * dsPtr); #endif #ifndef Tcl_DStringInit_TCL_DECLARED @@ -794,13 +794,13 @@ EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); #ifndef Tcl_DStringResult_TCL_DECLARED #define Tcl_DStringResult_TCL_DECLARED /* 123 */ -EXTERN void Tcl_DStringResult (Tcl_Interp * interp, +EXTERN void Tcl_DStringResult (Tcl_Interp * interp, Tcl_DString * dsPtr); #endif #ifndef Tcl_DStringSetLength_TCL_DECLARED #define Tcl_DStringSetLength_TCL_DECLARED /* 124 */ -EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, +EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, int length); #endif #ifndef Tcl_DStringStartSublist_TCL_DECLARED @@ -826,13 +826,13 @@ EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); #ifndef Tcl_Eval_TCL_DECLARED #define Tcl_Eval_TCL_DECLARED /* 129 */ -EXTERN int Tcl_Eval (Tcl_Interp * interp, CONST char * script); +EXTERN int Tcl_Eval (Tcl_Interp * interp, const char * script); #endif #ifndef Tcl_EvalFile_TCL_DECLARED #define Tcl_EvalFile_TCL_DECLARED /* 130 */ -EXTERN int Tcl_EvalFile (Tcl_Interp * interp, - CONST char * fileName); +EXTERN int Tcl_EvalFile (Tcl_Interp * interp, + const char * fileName); #endif #ifndef Tcl_EvalObj_TCL_DECLARED #define Tcl_EvalObj_TCL_DECLARED @@ -842,7 +842,7 @@ EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); #ifndef Tcl_EventuallyFree_TCL_DECLARED #define Tcl_EventuallyFree_TCL_DECLARED /* 132 */ -EXTERN void Tcl_EventuallyFree (ClientData clientData, +EXTERN void Tcl_EventuallyFree (ClientData clientData, Tcl_FreeProc * freeProc); #endif #ifndef Tcl_Exit_TCL_DECLARED @@ -853,57 +853,57 @@ EXTERN void Tcl_Exit (int status); #ifndef Tcl_ExposeCommand_TCL_DECLARED #define Tcl_ExposeCommand_TCL_DECLARED /* 134 */ -EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, - CONST char * hiddenCmdToken, - CONST char * cmdName); +EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, + const char * hiddenCmdToken, + const char * cmdName); #endif #ifndef Tcl_ExprBoolean_TCL_DECLARED #define Tcl_ExprBoolean_TCL_DECLARED /* 135 */ -EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, - CONST char * expr, int * ptr); +EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, + const char * expr, int * ptr); #endif #ifndef Tcl_ExprBooleanObj_TCL_DECLARED #define Tcl_ExprBooleanObj_TCL_DECLARED /* 136 */ -EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, +EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); #endif #ifndef Tcl_ExprDouble_TCL_DECLARED #define Tcl_ExprDouble_TCL_DECLARED /* 137 */ -EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, - CONST char * expr, double * ptr); +EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, + const char * expr, double * ptr); #endif #ifndef Tcl_ExprDoubleObj_TCL_DECLARED #define Tcl_ExprDoubleObj_TCL_DECLARED /* 138 */ -EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, +EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); #endif #ifndef Tcl_ExprLong_TCL_DECLARED #define Tcl_ExprLong_TCL_DECLARED /* 139 */ -EXTERN int Tcl_ExprLong (Tcl_Interp * interp, CONST char * expr, +EXTERN int Tcl_ExprLong (Tcl_Interp * interp, const char * expr, long * ptr); #endif #ifndef Tcl_ExprLongObj_TCL_DECLARED #define Tcl_ExprLongObj_TCL_DECLARED /* 140 */ -EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, +EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); #endif #ifndef Tcl_ExprObj_TCL_DECLARED #define Tcl_ExprObj_TCL_DECLARED /* 141 */ -EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); #endif #ifndef Tcl_ExprString_TCL_DECLARED #define Tcl_ExprString_TCL_DECLARED /* 142 */ -EXTERN int Tcl_ExprString (Tcl_Interp * interp, - CONST char * expr); +EXTERN int Tcl_ExprString (Tcl_Interp * interp, + const char * expr); #endif #ifndef Tcl_Finalize_TCL_DECLARED #define Tcl_Finalize_TCL_DECLARED @@ -913,12 +913,12 @@ EXTERN void Tcl_Finalize (void); #ifndef Tcl_FindExecutable_TCL_DECLARED #define Tcl_FindExecutable_TCL_DECLARED /* 144 */ -EXTERN void Tcl_FindExecutable (CONST char * argv0); +EXTERN void Tcl_FindExecutable (const char * argv0); #endif #ifndef Tcl_FirstHashEntry_TCL_DECLARED #define Tcl_FirstHashEntry_TCL_DECLARED /* 145 */ -EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, +EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); #endif #ifndef Tcl_Flush_TCL_DECLARED @@ -934,33 +934,33 @@ EXTERN void Tcl_FreeResult (Tcl_Interp * interp); #ifndef Tcl_GetAlias_TCL_DECLARED #define Tcl_GetAlias_TCL_DECLARED /* 148 */ -EXTERN int Tcl_GetAlias (Tcl_Interp * interp, - CONST char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * argcPtr, +EXTERN int Tcl_GetAlias (Tcl_Interp * interp, + const char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); #endif #ifndef Tcl_GetAliasObj_TCL_DECLARED #define Tcl_GetAliasObj_TCL_DECLARED /* 149 */ -EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, - CONST char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * objcPtr, +EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, + const char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); #endif #ifndef Tcl_GetAssocData_TCL_DECLARED #define Tcl_GetAssocData_TCL_DECLARED /* 150 */ -EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, - CONST char * name, +EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, + const char * name, Tcl_InterpDeleteProc ** procPtr); #endif #ifndef Tcl_GetChannel_TCL_DECLARED #define Tcl_GetChannel_TCL_DECLARED /* 151 */ -EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, - CONST char * chanName, int * modePtr); +EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, + const char * chanName, int * modePtr); #endif #ifndef Tcl_GetChannelBufferSize_TCL_DECLARED #define Tcl_GetChannelBufferSize_TCL_DECLARED @@ -970,7 +970,7 @@ EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); #ifndef Tcl_GetChannelHandle_TCL_DECLARED #define Tcl_GetChannelHandle_TCL_DECLARED /* 153 */ -EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, +EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, int direction, ClientData * handlePtr); #endif #ifndef Tcl_GetChannelInstanceData_TCL_DECLARED @@ -991,8 +991,8 @@ EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); #ifndef Tcl_GetChannelOption_TCL_DECLARED #define Tcl_GetChannelOption_TCL_DECLARED /* 157 */ -EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, CONST char * optionName, +EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, const char * optionName, Tcl_DString * dsPtr); #endif #ifndef Tcl_GetChannelType_TCL_DECLARED @@ -1003,13 +1003,13 @@ EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); #ifndef Tcl_GetCommandInfo_TCL_DECLARED #define Tcl_GetCommandInfo_TCL_DECLARED /* 159 */ -EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, - CONST char * cmdName, Tcl_CmdInfo * infoPtr); +EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, + const char * cmdName, Tcl_CmdInfo * infoPtr); #endif #ifndef Tcl_GetCommandName_TCL_DECLARED #define Tcl_GetCommandName_TCL_DECLARED /* 160 */ -EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, +EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, Tcl_Command command); #endif #ifndef Tcl_GetErrno_TCL_DECLARED @@ -1025,7 +1025,7 @@ EXTERN CONST84_RETURN char * Tcl_GetHostName (void); #ifndef Tcl_GetInterpPath_TCL_DECLARED #define Tcl_GetInterpPath_TCL_DECLARED /* 163 */ -EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, +EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); #endif #ifndef Tcl_GetMaster_TCL_DECLARED @@ -1036,7 +1036,7 @@ EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); #ifndef Tcl_GetNameOfExecutable_TCL_DECLARED #define Tcl_GetNameOfExecutable_TCL_DECLARED /* 165 */ -EXTERN CONST char * Tcl_GetNameOfExecutable (void); +EXTERN const char * Tcl_GetNameOfExecutable (void); #endif #ifndef Tcl_GetObjResult_TCL_DECLARED #define Tcl_GetObjResult_TCL_DECLARED @@ -1047,8 +1047,8 @@ EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); #ifndef Tcl_GetOpenFile_TCL_DECLARED #define Tcl_GetOpenFile_TCL_DECLARED /* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - CONST char * chanID, int forWriting, +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); #endif #endif /* UNIX */ @@ -1056,15 +1056,15 @@ EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, #ifndef Tcl_GetOpenFile_TCL_DECLARED #define Tcl_GetOpenFile_TCL_DECLARED /* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - CONST char * chanID, int forWriting, +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); #endif #endif /* MACOSX */ #ifndef Tcl_GetPathType_TCL_DECLARED #define Tcl_GetPathType_TCL_DECLARED /* 168 */ -EXTERN Tcl_PathType Tcl_GetPathType (CONST char * path); +EXTERN Tcl_PathType Tcl_GetPathType (const char * path); #endif #ifndef Tcl_Gets_TCL_DECLARED #define Tcl_Gets_TCL_DECLARED @@ -1084,8 +1084,8 @@ EXTERN int Tcl_GetServiceMode (void); #ifndef Tcl_GetSlave_TCL_DECLARED #define Tcl_GetSlave_TCL_DECLARED /* 172 */ -EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, - CONST char * slaveName); +EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, + const char * slaveName); #endif #ifndef Tcl_GetStdChannel_TCL_DECLARED #define Tcl_GetStdChannel_TCL_DECLARED @@ -1100,34 +1100,34 @@ EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); #ifndef Tcl_GetVar_TCL_DECLARED #define Tcl_GetVar_TCL_DECLARED /* 175 */ -EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, - CONST char * varName, int flags); +EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, + const char * varName, int flags); #endif #ifndef Tcl_GetVar2_TCL_DECLARED #define Tcl_GetVar2_TCL_DECLARED /* 176 */ -EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, +EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, int flags); #endif #ifndef Tcl_GlobalEval_TCL_DECLARED #define Tcl_GlobalEval_TCL_DECLARED /* 177 */ -EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, - CONST char * command); +EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, + const char * command); #endif #ifndef Tcl_GlobalEvalObj_TCL_DECLARED #define Tcl_GlobalEvalObj_TCL_DECLARED /* 178 */ -EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, +EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); #endif #ifndef Tcl_HideCommand_TCL_DECLARED #define Tcl_HideCommand_TCL_DECLARED /* 179 */ -EXTERN int Tcl_HideCommand (Tcl_Interp * interp, - CONST char * cmdName, - CONST char * hiddenCmdToken); +EXTERN int Tcl_HideCommand (Tcl_Interp * interp, + const char * cmdName, + const char * hiddenCmdToken); #endif #ifndef Tcl_Init_TCL_DECLARED #define Tcl_Init_TCL_DECLARED @@ -1137,7 +1137,7 @@ EXTERN int Tcl_Init (Tcl_Interp * interp); #ifndef Tcl_InitHashTable_TCL_DECLARED #define Tcl_InitHashTable_TCL_DECLARED /* 181 */ -EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, +EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, int keyType); #endif #ifndef Tcl_InputBlocked_TCL_DECLARED @@ -1163,14 +1163,14 @@ EXTERN int Tcl_IsSafe (Tcl_Interp * interp); #ifndef Tcl_JoinPath_TCL_DECLARED #define Tcl_JoinPath_TCL_DECLARED /* 186 */ -EXTERN char * Tcl_JoinPath (int argc, CONST84 char * CONST * argv, +EXTERN char * Tcl_JoinPath (int argc, CONST84 char * const * argv, Tcl_DString * resultPtr); #endif #ifndef Tcl_LinkVar_TCL_DECLARED #define Tcl_LinkVar_TCL_DECLARED /* 187 */ -EXTERN int Tcl_LinkVar (Tcl_Interp * interp, - CONST char * varName, char * addr, int type); +EXTERN int Tcl_LinkVar (Tcl_Interp * interp, + const char * varName, char * addr, int type); #endif /* Slot 188 is reserved */ #ifndef Tcl_MakeFileChannel_TCL_DECLARED @@ -1191,7 +1191,7 @@ EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); #ifndef Tcl_Merge_TCL_DECLARED #define Tcl_Merge_TCL_DECLARED /* 192 */ -EXTERN char * Tcl_Merge (int argc, CONST84 char * CONST * argv); +EXTERN char * Tcl_Merge (int argc, CONST84 char * const * argv); #endif #ifndef Tcl_NextHashEntry_TCL_DECLARED #define Tcl_NextHashEntry_TCL_DECLARED @@ -1206,22 +1206,22 @@ EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); #ifndef Tcl_ObjGetVar2_TCL_DECLARED #define Tcl_ObjGetVar2_TCL_DECLARED /* 195 */ -EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, +EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); #endif #ifndef Tcl_ObjSetVar2_TCL_DECLARED #define Tcl_ObjSetVar2_TCL_DECLARED /* 196 */ -EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, +EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); #endif #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef Tcl_OpenCommandChannel_TCL_DECLARED #define Tcl_OpenCommandChannel_TCL_DECLARED /* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); #endif #endif /* UNIX */ @@ -1229,7 +1229,7 @@ EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, #ifndef Tcl_OpenCommandChannel_TCL_DECLARED #define Tcl_OpenCommandChannel_TCL_DECLARED /* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); #endif #endif /* WIN */ @@ -1237,30 +1237,30 @@ EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, #ifndef Tcl_OpenCommandChannel_TCL_DECLARED #define Tcl_OpenCommandChannel_TCL_DECLARED /* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); #endif #endif /* MACOSX */ #ifndef Tcl_OpenFileChannel_TCL_DECLARED #define Tcl_OpenFileChannel_TCL_DECLARED /* 198 */ -EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, - CONST char * fileName, - CONST char * modeString, int permissions); +EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, + const char * fileName, + const char * modeString, int permissions); #endif #ifndef Tcl_OpenTcpClient_TCL_DECLARED #define Tcl_OpenTcpClient_TCL_DECLARED /* 199 */ -EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, - CONST char * address, CONST char * myaddr, +EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, + const char * address, const char * myaddr, int myport, int async); #endif #ifndef Tcl_OpenTcpServer_TCL_DECLARED #define Tcl_OpenTcpServer_TCL_DECLARED /* 200 */ -EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, - CONST char * host, - Tcl_TcpAcceptProc * acceptProc, +EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, + const char * host, + Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); #endif #ifndef Tcl_Preserve_TCL_DECLARED @@ -1271,13 +1271,13 @@ EXTERN void Tcl_Preserve (ClientData data); #ifndef Tcl_PrintDouble_TCL_DECLARED #define Tcl_PrintDouble_TCL_DECLARED /* 202 */ -EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, +EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, char * dst); #endif #ifndef Tcl_PutEnv_TCL_DECLARED #define Tcl_PutEnv_TCL_DECLARED /* 203 */ -EXTERN int Tcl_PutEnv (CONST char * assignment); +EXTERN int Tcl_PutEnv (const char * assignment); #endif #ifndef Tcl_PosixError_TCL_DECLARED #define Tcl_PosixError_TCL_DECLARED @@ -1287,13 +1287,13 @@ EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); #ifndef Tcl_QueueEvent_TCL_DECLARED #define Tcl_QueueEvent_TCL_DECLARED /* 205 */ -EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, +EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, Tcl_QueuePosition position); #endif #ifndef Tcl_Read_TCL_DECLARED #define Tcl_Read_TCL_DECLARED /* 206 */ -EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, +EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, int toRead); #endif #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ @@ -1320,50 +1320,50 @@ EXTERN void Tcl_ReapDetachedProcs (void); #ifndef Tcl_RecordAndEval_TCL_DECLARED #define Tcl_RecordAndEval_TCL_DECLARED /* 208 */ -EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, - CONST char * cmd, int flags); +EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, + const char * cmd, int flags); #endif #ifndef Tcl_RecordAndEvalObj_TCL_DECLARED #define Tcl_RecordAndEvalObj_TCL_DECLARED /* 209 */ -EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, +EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); #endif #ifndef Tcl_RegisterChannel_TCL_DECLARED #define Tcl_RegisterChannel_TCL_DECLARED /* 210 */ -EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, +EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, Tcl_Channel chan); #endif #ifndef Tcl_RegisterObjType_TCL_DECLARED #define Tcl_RegisterObjType_TCL_DECLARED /* 211 */ -EXTERN void Tcl_RegisterObjType (CONST Tcl_ObjType * typePtr); +EXTERN void Tcl_RegisterObjType (const Tcl_ObjType * typePtr); #endif #ifndef Tcl_RegExpCompile_TCL_DECLARED #define Tcl_RegExpCompile_TCL_DECLARED /* 212 */ -EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, - CONST char * pattern); +EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, + const char * pattern); #endif #ifndef Tcl_RegExpExec_TCL_DECLARED #define Tcl_RegExpExec_TCL_DECLARED /* 213 */ -EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, - Tcl_RegExp regexp, CONST char * text, - CONST char * start); +EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, + Tcl_RegExp regexp, const char * text, + const char * start); #endif #ifndef Tcl_RegExpMatch_TCL_DECLARED #define Tcl_RegExpMatch_TCL_DECLARED /* 214 */ -EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, - CONST char * text, CONST char * pattern); +EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, + const char * text, const char * pattern); #endif #ifndef Tcl_RegExpRange_TCL_DECLARED #define Tcl_RegExpRange_TCL_DECLARED /* 215 */ -EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, - CONST84 char ** startPtr, +EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, + CONST84 char ** startPtr, CONST84 char ** endPtr); #endif #ifndef Tcl_Release_TCL_DECLARED @@ -1379,12 +1379,12 @@ EXTERN void Tcl_ResetResult (Tcl_Interp * interp); #ifndef Tcl_ScanElement_TCL_DECLARED #define Tcl_ScanElement_TCL_DECLARED /* 218 */ -EXTERN int Tcl_ScanElement (CONST char * str, int * flagPtr); +EXTERN int Tcl_ScanElement (const char * str, int * flagPtr); #endif #ifndef Tcl_ScanCountedElement_TCL_DECLARED #define Tcl_ScanCountedElement_TCL_DECLARED /* 219 */ -EXTERN int Tcl_ScanCountedElement (CONST char * str, int length, +EXTERN int Tcl_ScanCountedElement (const char * str, int length, int * flagPtr); #endif #ifndef Tcl_SeekOld_TCL_DECLARED @@ -1405,9 +1405,9 @@ EXTERN int Tcl_ServiceEvent (int flags); #ifndef Tcl_SetAssocData_TCL_DECLARED #define Tcl_SetAssocData_TCL_DECLARED /* 223 */ -EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, - CONST char * name, - Tcl_InterpDeleteProc * proc, +EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, + const char * name, + Tcl_InterpDeleteProc * proc, ClientData clientData); #endif #ifndef Tcl_SetChannelBufferSize_TCL_DECLARED @@ -1418,16 +1418,16 @@ EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); #ifndef Tcl_SetChannelOption_TCL_DECLARED #define Tcl_SetChannelOption_TCL_DECLARED /* 225 */ -EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, CONST char * optionName, - CONST char * newValue); +EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, const char * optionName, + const char * newValue); #endif #ifndef Tcl_SetCommandInfo_TCL_DECLARED #define Tcl_SetCommandInfo_TCL_DECLARED /* 226 */ -EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, - CONST char * cmdName, - CONST Tcl_CmdInfo * infoPtr); +EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, + const char * cmdName, + const Tcl_CmdInfo * infoPtr); #endif #ifndef Tcl_SetErrno_TCL_DECLARED #define Tcl_SetErrno_TCL_DECLARED @@ -1442,7 +1442,7 @@ EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); #ifndef Tcl_SetMaxBlockTime_TCL_DECLARED #define Tcl_SetMaxBlockTime_TCL_DECLARED /* 229 */ -EXTERN void Tcl_SetMaxBlockTime (CONST Tcl_Time * timePtr); +EXTERN void Tcl_SetMaxBlockTime (const Tcl_Time * timePtr); #endif #ifndef Tcl_SetPanicProc_TCL_DECLARED #define Tcl_SetPanicProc_TCL_DECLARED @@ -1452,13 +1452,13 @@ EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); #ifndef Tcl_SetRecursionLimit_TCL_DECLARED #define Tcl_SetRecursionLimit_TCL_DECLARED /* 231 */ -EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, +EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, int depth); #endif #ifndef Tcl_SetResult_TCL_DECLARED #define Tcl_SetResult_TCL_DECLARED /* 232 */ -EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, +EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); #endif #ifndef Tcl_SetServiceMode_TCL_DECLARED @@ -1469,13 +1469,13 @@ EXTERN int Tcl_SetServiceMode (int mode); #ifndef Tcl_SetObjErrorCode_TCL_DECLARED #define Tcl_SetObjErrorCode_TCL_DECLARED /* 234 */ -EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, +EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); #endif #ifndef Tcl_SetObjResult_TCL_DECLARED #define Tcl_SetObjResult_TCL_DECLARED /* 235 */ -EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, +EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); #endif #ifndef Tcl_SetStdChannel_TCL_DECLARED @@ -1486,16 +1486,16 @@ EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); #ifndef Tcl_SetVar_TCL_DECLARED #define Tcl_SetVar_TCL_DECLARED /* 237 */ -EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, - CONST char * varName, CONST char * newValue, +EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, + const char * varName, const char * newValue, int flags); #endif #ifndef Tcl_SetVar2_TCL_DECLARED #define Tcl_SetVar2_TCL_DECLARED /* 238 */ -EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - CONST char * newValue, int flags); +EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + const char * newValue, int flags); #endif #ifndef Tcl_SignalId_TCL_DECLARED #define Tcl_SignalId_TCL_DECLARED @@ -1515,29 +1515,29 @@ EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); #ifndef Tcl_SplitList_TCL_DECLARED #define Tcl_SplitList_TCL_DECLARED /* 242 */ -EXTERN int Tcl_SplitList (Tcl_Interp * interp, - CONST char * listStr, int * argcPtr, +EXTERN int Tcl_SplitList (Tcl_Interp * interp, + const char * listStr, int * argcPtr, CONST84 char *** argvPtr); #endif #ifndef Tcl_SplitPath_TCL_DECLARED #define Tcl_SplitPath_TCL_DECLARED /* 243 */ -EXTERN void Tcl_SplitPath (CONST char * path, int * argcPtr, +EXTERN void Tcl_SplitPath (const char * path, int * argcPtr, CONST84 char *** argvPtr); #endif #ifndef Tcl_StaticPackage_TCL_DECLARED #define Tcl_StaticPackage_TCL_DECLARED /* 244 */ -EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, - CONST char * pkgName, - Tcl_PackageInitProc * initProc, +EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, + const char * pkgName, + Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); #endif #ifndef Tcl_StringMatch_TCL_DECLARED #define Tcl_StringMatch_TCL_DECLARED /* 245 */ -EXTERN int Tcl_StringMatch (CONST char * str, - CONST char * pattern); +EXTERN int Tcl_StringMatch (const char * str, + const char * pattern); #endif #ifndef Tcl_TellOld_TCL_DECLARED #define Tcl_TellOld_TCL_DECLARED @@ -1547,91 +1547,91 @@ EXTERN int Tcl_TellOld (Tcl_Channel chan); #ifndef Tcl_TraceVar_TCL_DECLARED #define Tcl_TraceVar_TCL_DECLARED /* 247 */ -EXTERN int Tcl_TraceVar (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * proc, +EXTERN int Tcl_TraceVar (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * proc, ClientData clientData); #endif #ifndef Tcl_TraceVar2_TCL_DECLARED #define Tcl_TraceVar2_TCL_DECLARED /* 248 */ -EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * proc, +EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * proc, ClientData clientData); #endif #ifndef Tcl_TranslateFileName_TCL_DECLARED #define Tcl_TranslateFileName_TCL_DECLARED /* 249 */ -EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, - CONST char * name, Tcl_DString * bufferPtr); +EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, + const char * name, Tcl_DString * bufferPtr); #endif #ifndef Tcl_Ungets_TCL_DECLARED #define Tcl_Ungets_TCL_DECLARED /* 250 */ -EXTERN int Tcl_Ungets (Tcl_Channel chan, CONST char * str, +EXTERN int Tcl_Ungets (Tcl_Channel chan, const char * str, int len, int atHead); #endif #ifndef Tcl_UnlinkVar_TCL_DECLARED #define Tcl_UnlinkVar_TCL_DECLARED /* 251 */ -EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, - CONST char * varName); +EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, + const char * varName); #endif #ifndef Tcl_UnregisterChannel_TCL_DECLARED #define Tcl_UnregisterChannel_TCL_DECLARED /* 252 */ -EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, +EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, Tcl_Channel chan); #endif #ifndef Tcl_UnsetVar_TCL_DECLARED #define Tcl_UnsetVar_TCL_DECLARED /* 253 */ -EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, - CONST char * varName, int flags); +EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, + const char * varName, int flags); #endif #ifndef Tcl_UnsetVar2_TCL_DECLARED #define Tcl_UnsetVar2_TCL_DECLARED /* 254 */ -EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, +EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, int flags); #endif #ifndef Tcl_UntraceVar_TCL_DECLARED #define Tcl_UntraceVar_TCL_DECLARED /* 255 */ -EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * proc, +EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * proc, ClientData clientData); #endif #ifndef Tcl_UntraceVar2_TCL_DECLARED #define Tcl_UntraceVar2_TCL_DECLARED /* 256 */ -EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * proc, +EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * proc, ClientData clientData); #endif #ifndef Tcl_UpdateLinkedVar_TCL_DECLARED #define Tcl_UpdateLinkedVar_TCL_DECLARED /* 257 */ -EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, - CONST char * varName); +EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, + const char * varName); #endif #ifndef Tcl_UpVar_TCL_DECLARED #define Tcl_UpVar_TCL_DECLARED /* 258 */ -EXTERN int Tcl_UpVar (Tcl_Interp * interp, - CONST char * frameName, CONST char * varName, - CONST char * localName, int flags); +EXTERN int Tcl_UpVar (Tcl_Interp * interp, + const char * frameName, const char * varName, + const char * localName, int flags); #endif #ifndef Tcl_UpVar2_TCL_DECLARED #define Tcl_UpVar2_TCL_DECLARED /* 259 */ -EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, - CONST char * frameName, CONST char * part1, - CONST char * part2, CONST char * localName, +EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, + const char * frameName, const char * part1, + const char * part2, const char * localName, int flags); #endif #ifndef Tcl_VarEval_TCL_DECLARED @@ -1642,51 +1642,51 @@ EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); #ifndef Tcl_VarTraceInfo_TCL_DECLARED #define Tcl_VarTraceInfo_TCL_DECLARED /* 261 */ -EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_VarTraceProc * procPtr, +EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * procPtr, ClientData prevClientData); #endif #ifndef Tcl_VarTraceInfo2_TCL_DECLARED #define Tcl_VarTraceInfo2_TCL_DECLARED /* 262 */ -EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, Tcl_VarTraceProc * procPtr, +EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); #endif #ifndef Tcl_Write_TCL_DECLARED #define Tcl_Write_TCL_DECLARED /* 263 */ -EXTERN int Tcl_Write (Tcl_Channel chan, CONST char * s, +EXTERN int Tcl_Write (Tcl_Channel chan, const char * s, int slen); #endif #ifndef Tcl_WrongNumArgs_TCL_DECLARED #define Tcl_WrongNumArgs_TCL_DECLARED /* 264 */ -EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], CONST char * message); +EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], const char * message); #endif #ifndef Tcl_DumpActiveMemory_TCL_DECLARED #define Tcl_DumpActiveMemory_TCL_DECLARED /* 265 */ -EXTERN int Tcl_DumpActiveMemory (CONST char * fileName); +EXTERN int Tcl_DumpActiveMemory (const char * fileName); #endif #ifndef Tcl_ValidateAllMemory_TCL_DECLARED #define Tcl_ValidateAllMemory_TCL_DECLARED /* 266 */ -EXTERN void Tcl_ValidateAllMemory (CONST char * file, int line); +EXTERN void Tcl_ValidateAllMemory (const char * file, int line); #endif #ifndef Tcl_AppendResultVA_TCL_DECLARED #define Tcl_AppendResultVA_TCL_DECLARED /* 267 */ -EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, +EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, va_list argList); #endif #ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED #define Tcl_AppendStringsToObjVA_TCL_DECLARED /* 268 */ -EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, +EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, va_list argList); #endif #ifndef Tcl_HashStats_TCL_DECLARED @@ -1697,40 +1697,40 @@ EXTERN CONST84_RETURN char * Tcl_HashStats (Tcl_HashTable * tablePtr); #ifndef Tcl_ParseVar_TCL_DECLARED #define Tcl_ParseVar_TCL_DECLARED /* 270 */ -EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, - CONST char * start, CONST84 char ** termPtr); +EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, + const char * start, CONST84 char ** termPtr); #endif #ifndef Tcl_PkgPresent_TCL_DECLARED #define Tcl_PkgPresent_TCL_DECLARED /* 271 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, - CONST char * name, CONST char * version, +EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, + const char * name, const char * version, int exact); #endif #ifndef Tcl_PkgPresentEx_TCL_DECLARED #define Tcl_PkgPresentEx_TCL_DECLARED /* 272 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, - CONST char * name, CONST char * version, +EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, + const char * name, const char * version, int exact, ClientData * clientDataPtr); #endif #ifndef Tcl_PkgProvide_TCL_DECLARED #define Tcl_PkgProvide_TCL_DECLARED /* 273 */ -EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, - CONST char * name, CONST char * version); +EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, + const char * name, const char * version); #endif #ifndef Tcl_PkgRequire_TCL_DECLARED #define Tcl_PkgRequire_TCL_DECLARED /* 274 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, - CONST char * name, CONST char * version, +EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, + const char * name, const char * version, int exact); #endif #ifndef Tcl_SetErrorCodeVA_TCL_DECLARED #define Tcl_SetErrorCodeVA_TCL_DECLARED /* 275 */ -EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, +EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, va_list argList); #endif #ifndef Tcl_VarEvalVA_TCL_DECLARED @@ -1746,12 +1746,12 @@ EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); #ifndef Tcl_PanicVA_TCL_DECLARED #define Tcl_PanicVA_TCL_DECLARED /* 278 */ -EXTERN void Tcl_PanicVA (CONST char * format, va_list argList); +EXTERN void Tcl_PanicVA (const char * format, va_list argList); #endif #ifndef Tcl_GetVersion_TCL_DECLARED #define Tcl_GetVersion_TCL_DECLARED /* 279 */ -EXTERN void Tcl_GetVersion (int * major, int * minor, +EXTERN void Tcl_GetVersion (int * major, int * minor, int * patchLevel, int * type); #endif #ifndef Tcl_InitMemory_TCL_DECLARED @@ -1762,15 +1762,15 @@ EXTERN void Tcl_InitMemory (Tcl_Interp * interp); #ifndef Tcl_StackChannel_TCL_DECLARED #define Tcl_StackChannel_TCL_DECLARED /* 281 */ -EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, - CONST Tcl_ChannelType * typePtr, - ClientData instanceData, int mask, +EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, + const Tcl_ChannelType * typePtr, + ClientData instanceData, int mask, Tcl_Channel prevChan); #endif #ifndef Tcl_UnstackChannel_TCL_DECLARED #define Tcl_UnstackChannel_TCL_DECLARED /* 282 */ -EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, +EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, Tcl_Channel chan); #endif #ifndef Tcl_GetStackedChannel_TCL_DECLARED @@ -1787,24 +1787,24 @@ EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); #ifndef Tcl_AppendObjToObj_TCL_DECLARED #define Tcl_AppendObjToObj_TCL_DECLARED /* 286 */ -EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, +EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); #endif #ifndef Tcl_CreateEncoding_TCL_DECLARED #define Tcl_CreateEncoding_TCL_DECLARED /* 287 */ -EXTERN Tcl_Encoding Tcl_CreateEncoding (CONST Tcl_EncodingType * typePtr); +EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); #endif #ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED #define Tcl_CreateThreadExitHandler_TCL_DECLARED /* 288 */ -EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, ClientData clientData); #endif #ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED #define Tcl_DeleteThreadExitHandler_TCL_DECLARED /* 289 */ -EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, ClientData clientData); #endif #ifndef Tcl_DiscardResult_TCL_DECLARED @@ -1815,19 +1815,19 @@ EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); #ifndef Tcl_EvalEx_TCL_DECLARED #define Tcl_EvalEx_TCL_DECLARED /* 291 */ -EXTERN int Tcl_EvalEx (Tcl_Interp * interp, CONST char * script, +EXTERN int Tcl_EvalEx (Tcl_Interp * interp, const char * script, int numBytes, int flags); #endif #ifndef Tcl_EvalObjv_TCL_DECLARED #define Tcl_EvalObjv_TCL_DECLARED /* 292 */ -EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); +EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags); #endif #ifndef Tcl_EvalObjEx_TCL_DECLARED #define Tcl_EvalObjEx_TCL_DECLARED /* 293 */ -EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); #endif #ifndef Tcl_ExitThread_TCL_DECLARED @@ -1838,18 +1838,18 @@ EXTERN void Tcl_ExitThread (int status); #ifndef Tcl_ExternalToUtf_TCL_DECLARED #define Tcl_ExternalToUtf_TCL_DECLARED /* 295 */ -EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, - Tcl_Encoding encoding, CONST char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, +EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, + Tcl_Encoding encoding, const char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); #endif #ifndef Tcl_ExternalToUtfDString_TCL_DECLARED #define Tcl_ExternalToUtfDString_TCL_DECLARED /* 296 */ -EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, - CONST char * src, int srcLen, +EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, + const char * src, int srcLen, Tcl_DString * dsPtr); #endif #ifndef Tcl_FinalizeThread_TCL_DECLARED @@ -1875,8 +1875,8 @@ EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); #ifndef Tcl_GetEncoding_TCL_DECLARED #define Tcl_GetEncoding_TCL_DECLARED /* 301 */ -EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, - CONST char * name); +EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, + const char * name); #endif #ifndef Tcl_GetEncodingName_TCL_DECLARED #define Tcl_GetEncodingName_TCL_DECLARED @@ -1891,22 +1891,22 @@ EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); #ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED #define Tcl_GetIndexFromObjStruct_TCL_DECLARED /* 304 */ -EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST VOID * tablePtr, - int offset, CONST char * msg, int flags, +EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, + Tcl_Obj * objPtr, const VOID * tablePtr, + int offset, const char * msg, int flags, int * indexPtr); #endif #ifndef Tcl_GetThreadData_TCL_DECLARED #define Tcl_GetThreadData_TCL_DECLARED /* 305 */ -EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, +EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, int size); #endif #ifndef Tcl_GetVar2Ex_TCL_DECLARED #define Tcl_GetVar2Ex_TCL_DECLARED /* 306 */ -EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, +EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, + const char * part1, const char * part2, int flags); #endif #ifndef Tcl_InitNotifier_TCL_DECLARED @@ -1932,44 +1932,44 @@ EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); #ifndef Tcl_ConditionWait_TCL_DECLARED #define Tcl_ConditionWait_TCL_DECLARED /* 311 */ -EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, - Tcl_Mutex * mutexPtr, - CONST Tcl_Time * timePtr); +EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, + Tcl_Mutex * mutexPtr, + const Tcl_Time * timePtr); #endif #ifndef Tcl_NumUtfChars_TCL_DECLARED #define Tcl_NumUtfChars_TCL_DECLARED /* 312 */ -EXTERN int Tcl_NumUtfChars (CONST char * src, int length); +EXTERN int Tcl_NumUtfChars (const char * src, int length); #endif #ifndef Tcl_ReadChars_TCL_DECLARED #define Tcl_ReadChars_TCL_DECLARED /* 313 */ -EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, +EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); #endif #ifndef Tcl_RestoreResult_TCL_DECLARED #define Tcl_RestoreResult_TCL_DECLARED /* 314 */ -EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, +EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, Tcl_SavedResult * statePtr); #endif #ifndef Tcl_SaveResult_TCL_DECLARED #define Tcl_SaveResult_TCL_DECLARED /* 315 */ -EXTERN void Tcl_SaveResult (Tcl_Interp * interp, +EXTERN void Tcl_SaveResult (Tcl_Interp * interp, Tcl_SavedResult * statePtr); #endif #ifndef Tcl_SetSystemEncoding_TCL_DECLARED #define Tcl_SetSystemEncoding_TCL_DECLARED /* 316 */ -EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, - CONST char * name); +EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, + const char * name); #endif #ifndef Tcl_SetVar2Ex_TCL_DECLARED #define Tcl_SetVar2Ex_TCL_DECLARED /* 317 */ -EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, +EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, + const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); #endif #ifndef Tcl_ThreadAlert_TCL_DECLARED @@ -1980,13 +1980,13 @@ EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); #ifndef Tcl_ThreadQueueEvent_TCL_DECLARED #define Tcl_ThreadQueueEvent_TCL_DECLARED /* 319 */ -EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, +EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); #endif #ifndef Tcl_UniCharAtIndex_TCL_DECLARED #define Tcl_UniCharAtIndex_TCL_DECLARED /* 320 */ -EXTERN Tcl_UniChar Tcl_UniCharAtIndex (CONST char * src, int index); +EXTERN Tcl_UniChar Tcl_UniCharAtIndex (const char * src, int index); #endif #ifndef Tcl_UniCharToLower_TCL_DECLARED #define Tcl_UniCharToLower_TCL_DECLARED @@ -2011,55 +2011,55 @@ EXTERN int Tcl_UniCharToUtf (int ch, char * buf); #ifndef Tcl_UtfAtIndex_TCL_DECLARED #define Tcl_UtfAtIndex_TCL_DECLARED /* 325 */ -EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (CONST char * src, int index); +EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (const char * src, int index); #endif #ifndef Tcl_UtfCharComplete_TCL_DECLARED #define Tcl_UtfCharComplete_TCL_DECLARED /* 326 */ -EXTERN int Tcl_UtfCharComplete (CONST char * src, int length); +EXTERN int Tcl_UtfCharComplete (const char * src, int length); #endif #ifndef Tcl_UtfBackslash_TCL_DECLARED #define Tcl_UtfBackslash_TCL_DECLARED /* 327 */ -EXTERN int Tcl_UtfBackslash (CONST char * src, int * readPtr, +EXTERN int Tcl_UtfBackslash (const char * src, int * readPtr, char * dst); #endif #ifndef Tcl_UtfFindFirst_TCL_DECLARED #define Tcl_UtfFindFirst_TCL_DECLARED /* 328 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (CONST char * src, int ch); +EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (const char * src, int ch); #endif #ifndef Tcl_UtfFindLast_TCL_DECLARED #define Tcl_UtfFindLast_TCL_DECLARED /* 329 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindLast (CONST char * src, int ch); +EXTERN CONST84_RETURN char * Tcl_UtfFindLast (const char * src, int ch); #endif #ifndef Tcl_UtfNext_TCL_DECLARED #define Tcl_UtfNext_TCL_DECLARED /* 330 */ -EXTERN CONST84_RETURN char * Tcl_UtfNext (CONST char * src); +EXTERN CONST84_RETURN char * Tcl_UtfNext (const char * src); #endif #ifndef Tcl_UtfPrev_TCL_DECLARED #define Tcl_UtfPrev_TCL_DECLARED /* 331 */ -EXTERN CONST84_RETURN char * Tcl_UtfPrev (CONST char * src, - CONST char * start); +EXTERN CONST84_RETURN char * Tcl_UtfPrev (const char * src, + const char * start); #endif #ifndef Tcl_UtfToExternal_TCL_DECLARED #define Tcl_UtfToExternal_TCL_DECLARED /* 332 */ -EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, - Tcl_Encoding encoding, CONST char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, +EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, + Tcl_Encoding encoding, const char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); #endif #ifndef Tcl_UtfToExternalDString_TCL_DECLARED #define Tcl_UtfToExternalDString_TCL_DECLARED /* 333 */ -EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, - CONST char * src, int srcLen, +EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, + const char * src, int srcLen, Tcl_DString * dsPtr); #endif #ifndef Tcl_UtfToLower_TCL_DECLARED @@ -2075,7 +2075,7 @@ EXTERN int Tcl_UtfToTitle (char * src); #ifndef Tcl_UtfToUniChar_TCL_DECLARED #define Tcl_UtfToUniChar_TCL_DECLARED /* 336 */ -EXTERN int Tcl_UtfToUniChar (CONST char * src, +EXTERN int Tcl_UtfToUniChar (const char * src, Tcl_UniChar * chPtr); #endif #ifndef Tcl_UtfToUpper_TCL_DECLARED @@ -2086,7 +2086,7 @@ EXTERN int Tcl_UtfToUpper (char * src); #ifndef Tcl_WriteChars_TCL_DECLARED #define Tcl_WriteChars_TCL_DECLARED /* 338 */ -EXTERN int Tcl_WriteChars (Tcl_Channel chan, CONST char * src, +EXTERN int Tcl_WriteChars (Tcl_Channel chan, const char * src, int srcLen); #endif #ifndef Tcl_WriteObj_TCL_DECLARED @@ -2107,7 +2107,7 @@ EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); #ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED #define Tcl_SetDefaultEncodingDir_TCL_DECLARED /* 342 */ -EXTERN void Tcl_SetDefaultEncodingDir (CONST char * path); +EXTERN void Tcl_SetDefaultEncodingDir (const char * path); #endif #ifndef Tcl_AlertNotifier_TCL_DECLARED #define Tcl_AlertNotifier_TCL_DECLARED @@ -2157,37 +2157,37 @@ EXTERN int Tcl_UniCharIsWordChar (int ch); #ifndef Tcl_UniCharLen_TCL_DECLARED #define Tcl_UniCharLen_TCL_DECLARED /* 352 */ -EXTERN int Tcl_UniCharLen (CONST Tcl_UniChar * uniStr); +EXTERN int Tcl_UniCharLen (const Tcl_UniChar * uniStr); #endif #ifndef Tcl_UniCharNcmp_TCL_DECLARED #define Tcl_UniCharNcmp_TCL_DECLARED /* 353 */ -EXTERN int Tcl_UniCharNcmp (CONST Tcl_UniChar * ucs, - CONST Tcl_UniChar * uct, +EXTERN int Tcl_UniCharNcmp (const Tcl_UniChar * ucs, + const Tcl_UniChar * uct, unsigned long numChars); #endif #ifndef Tcl_UniCharToUtfDString_TCL_DECLARED #define Tcl_UniCharToUtfDString_TCL_DECLARED /* 354 */ -EXTERN char * Tcl_UniCharToUtfDString (CONST Tcl_UniChar * uniStr, +EXTERN char * Tcl_UniCharToUtfDString (const Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); #endif #ifndef Tcl_UtfToUniCharDString_TCL_DECLARED #define Tcl_UtfToUniCharDString_TCL_DECLARED /* 355 */ -EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (CONST char * src, +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (const char * src, int length, Tcl_DString * dsPtr); #endif #ifndef Tcl_GetRegExpFromObj_TCL_DECLARED #define Tcl_GetRegExpFromObj_TCL_DECLARED /* 356 */ -EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, +EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); #endif #ifndef Tcl_EvalTokens_TCL_DECLARED #define Tcl_EvalTokens_TCL_DECLARED /* 357 */ -EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, +EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); #endif #ifndef Tcl_FreeParse_TCL_DECLARED @@ -2198,85 +2198,85 @@ EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); #ifndef Tcl_LogCommandInfo_TCL_DECLARED #define Tcl_LogCommandInfo_TCL_DECLARED /* 359 */ -EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, - CONST char * script, CONST char * command, +EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, + const char * script, const char * command, int length); #endif #ifndef Tcl_ParseBraces_TCL_DECLARED #define Tcl_ParseBraces_TCL_DECLARED /* 360 */ -EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append, +EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); #endif #ifndef Tcl_ParseCommand_TCL_DECLARED #define Tcl_ParseCommand_TCL_DECLARED /* 361 */ -EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, - CONST char * start, int numBytes, int nested, +EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, + const char * start, int numBytes, int nested, Tcl_Parse * parsePtr); #endif #ifndef Tcl_ParseExpr_TCL_DECLARED #define Tcl_ParseExpr_TCL_DECLARED /* 362 */ -EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, - CONST char * start, int numBytes, +EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, + const char * start, int numBytes, Tcl_Parse * parsePtr); #endif #ifndef Tcl_ParseQuotedString_TCL_DECLARED #define Tcl_ParseQuotedString_TCL_DECLARED /* 363 */ -EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, - CONST char * start, int numBytes, - Tcl_Parse * parsePtr, int append, +EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); #endif #ifndef Tcl_ParseVarName_TCL_DECLARED #define Tcl_ParseVarName_TCL_DECLARED /* 364 */ -EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, - CONST char * start, int numBytes, +EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, + const char * start, int numBytes, Tcl_Parse * parsePtr, int append); #endif #ifndef Tcl_GetCwd_TCL_DECLARED #define Tcl_GetCwd_TCL_DECLARED /* 365 */ -EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, +EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, Tcl_DString * cwdPtr); #endif #ifndef Tcl_Chdir_TCL_DECLARED #define Tcl_Chdir_TCL_DECLARED /* 366 */ -EXTERN int Tcl_Chdir (CONST char * dirName); +EXTERN int Tcl_Chdir (const char * dirName); #endif #ifndef Tcl_Access_TCL_DECLARED #define Tcl_Access_TCL_DECLARED /* 367 */ -EXTERN int Tcl_Access (CONST char * path, int mode); +EXTERN int Tcl_Access (const char * path, int mode); #endif #ifndef Tcl_Stat_TCL_DECLARED #define Tcl_Stat_TCL_DECLARED /* 368 */ -EXTERN int Tcl_Stat (CONST char * path, struct stat * bufPtr); +EXTERN int Tcl_Stat (const char * path, struct stat * bufPtr); #endif #ifndef Tcl_UtfNcmp_TCL_DECLARED #define Tcl_UtfNcmp_TCL_DECLARED /* 369 */ -EXTERN int Tcl_UtfNcmp (CONST char * s1, CONST char * s2, +EXTERN int Tcl_UtfNcmp (const char * s1, const char * s2, unsigned long n); #endif #ifndef Tcl_UtfNcasecmp_TCL_DECLARED #define Tcl_UtfNcasecmp_TCL_DECLARED /* 370 */ -EXTERN int Tcl_UtfNcasecmp (CONST char * s1, CONST char * s2, +EXTERN int Tcl_UtfNcasecmp (const char * s1, const char * s2, unsigned long n); #endif #ifndef Tcl_StringCaseMatch_TCL_DECLARED #define Tcl_StringCaseMatch_TCL_DECLARED /* 371 */ -EXTERN int Tcl_StringCaseMatch (CONST char * str, - CONST char * pattern, int nocase); +EXTERN int Tcl_StringCaseMatch (const char * str, + const char * pattern, int nocase); #endif #ifndef Tcl_UniCharIsControl_TCL_DECLARED #define Tcl_UniCharIsControl_TCL_DECLARED @@ -2301,27 +2301,27 @@ EXTERN int Tcl_UniCharIsPunct (int ch); #ifndef Tcl_RegExpExecObj_TCL_DECLARED #define Tcl_RegExpExecObj_TCL_DECLARED /* 376 */ -EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, - Tcl_RegExp regexp, Tcl_Obj * textObj, +EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, + Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); #endif #ifndef Tcl_RegExpGetInfo_TCL_DECLARED #define Tcl_RegExpGetInfo_TCL_DECLARED /* 377 */ -EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, +EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); #endif #ifndef Tcl_NewUnicodeObj_TCL_DECLARED #define Tcl_NewUnicodeObj_TCL_DECLARED /* 378 */ -EXTERN Tcl_Obj * Tcl_NewUnicodeObj (CONST Tcl_UniChar * unicode, +EXTERN Tcl_Obj * Tcl_NewUnicodeObj (const Tcl_UniChar * unicode, int numChars); #endif #ifndef Tcl_SetUnicodeObj_TCL_DECLARED #define Tcl_SetUnicodeObj_TCL_DECLARED /* 379 */ -EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, - CONST Tcl_UniChar * unicode, int numChars); +EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, + const Tcl_UniChar * unicode, int numChars); #endif #ifndef Tcl_GetCharLength_TCL_DECLARED #define Tcl_GetCharLength_TCL_DECLARED @@ -2346,13 +2346,13 @@ EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); #ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED #define Tcl_AppendUnicodeToObj_TCL_DECLARED /* 384 */ -EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, - CONST Tcl_UniChar * unicode, int length); +EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, + const Tcl_UniChar * unicode, int length); #endif #ifndef Tcl_RegExpMatchObj_TCL_DECLARED #define Tcl_RegExpMatchObj_TCL_DECLARED /* 385 */ -EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, +EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); #endif #ifndef Tcl_SetNotifier_TCL_DECLARED @@ -2373,15 +2373,15 @@ EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); #ifndef Tcl_GetChannelNamesEx_TCL_DECLARED #define Tcl_GetChannelNamesEx_TCL_DECLARED /* 389 */ -EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, - CONST char * pattern); +EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, + const char * pattern); #endif #ifndef Tcl_ProcObjCmd_TCL_DECLARED #define Tcl_ProcObjCmd_TCL_DECLARED /* 390 */ -EXTERN int Tcl_ProcObjCmd (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); +EXTERN int Tcl_ProcObjCmd (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[]); #endif #ifndef Tcl_ConditionFinalize_TCL_DECLARED #define Tcl_ConditionFinalize_TCL_DECLARED @@ -2396,21 +2396,21 @@ EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); #ifndef Tcl_CreateThread_TCL_DECLARED #define Tcl_CreateThread_TCL_DECLARED /* 393 */ -EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, - Tcl_ThreadCreateProc proc, - ClientData clientData, int stackSize, +EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, + Tcl_ThreadCreateProc proc, + ClientData clientData, int stackSize, int flags); #endif #ifndef Tcl_ReadRaw_TCL_DECLARED #define Tcl_ReadRaw_TCL_DECLARED /* 394 */ -EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, +EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, int bytesToRead); #endif #ifndef Tcl_WriteRaw_TCL_DECLARED #define Tcl_WriteRaw_TCL_DECLARED /* 395 */ -EXTERN int Tcl_WriteRaw (Tcl_Channel chan, CONST char * src, +EXTERN int Tcl_WriteRaw (Tcl_Channel chan, const char * src, int srcLen); #endif #ifndef Tcl_GetTopChannel_TCL_DECLARED @@ -2427,85 +2427,85 @@ EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); #define Tcl_ChannelName_TCL_DECLARED /* 398 */ EXTERN CONST84_RETURN char * Tcl_ChannelName ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelVersion_TCL_DECLARED #define Tcl_ChannelVersion_TCL_DECLARED /* 399 */ EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED #define Tcl_ChannelBlockModeProc_TCL_DECLARED /* 400 */ EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelCloseProc_TCL_DECLARED #define Tcl_ChannelCloseProc_TCL_DECLARED /* 401 */ EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelClose2Proc_TCL_DECLARED #define Tcl_ChannelClose2Proc_TCL_DECLARED /* 402 */ EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelInputProc_TCL_DECLARED #define Tcl_ChannelInputProc_TCL_DECLARED /* 403 */ EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelOutputProc_TCL_DECLARED #define Tcl_ChannelOutputProc_TCL_DECLARED /* 404 */ EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelSeekProc_TCL_DECLARED #define Tcl_ChannelSeekProc_TCL_DECLARED /* 405 */ EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED #define Tcl_ChannelSetOptionProc_TCL_DECLARED /* 406 */ EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED #define Tcl_ChannelGetOptionProc_TCL_DECLARED /* 407 */ EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelWatchProc_TCL_DECLARED #define Tcl_ChannelWatchProc_TCL_DECLARED /* 408 */ EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED #define Tcl_ChannelGetHandleProc_TCL_DECLARED /* 409 */ EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelFlushProc_TCL_DECLARED #define Tcl_ChannelFlushProc_TCL_DECLARED /* 410 */ EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_ChannelHandlerProc_TCL_DECLARED #define Tcl_ChannelHandlerProc_TCL_DECLARED /* 411 */ EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_JoinThread_TCL_DECLARED #define Tcl_JoinThread_TCL_DECLARED @@ -2520,7 +2520,7 @@ EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); #ifndef Tcl_IsChannelRegistered_TCL_DECLARED #define Tcl_IsChannelRegistered_TCL_DECLARED /* 414 */ -EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, +EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, Tcl_Channel channel); #endif #ifndef Tcl_CutChannel_TCL_DECLARED @@ -2541,38 +2541,38 @@ EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); #ifndef Tcl_IsChannelExisting_TCL_DECLARED #define Tcl_IsChannelExisting_TCL_DECLARED /* 418 */ -EXTERN int Tcl_IsChannelExisting (CONST char* channelName); +EXTERN int Tcl_IsChannelExisting (const char* channelName); #endif #ifndef Tcl_UniCharNcasecmp_TCL_DECLARED #define Tcl_UniCharNcasecmp_TCL_DECLARED /* 419 */ -EXTERN int Tcl_UniCharNcasecmp (CONST Tcl_UniChar * ucs, - CONST Tcl_UniChar * uct, +EXTERN int Tcl_UniCharNcasecmp (const Tcl_UniChar * ucs, + const Tcl_UniChar * uct, unsigned long numChars); #endif #ifndef Tcl_UniCharCaseMatch_TCL_DECLARED #define Tcl_UniCharCaseMatch_TCL_DECLARED /* 420 */ -EXTERN int Tcl_UniCharCaseMatch (CONST Tcl_UniChar * uniStr, - CONST Tcl_UniChar * uniPattern, int nocase); +EXTERN int Tcl_UniCharCaseMatch (const Tcl_UniChar * uniStr, + const Tcl_UniChar * uniPattern, int nocase); #endif #ifndef Tcl_FindHashEntry_TCL_DECLARED #define Tcl_FindHashEntry_TCL_DECLARED /* 421 */ -EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, - CONST char * key); +EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, + const char * key); #endif #ifndef Tcl_CreateHashEntry_TCL_DECLARED #define Tcl_CreateHashEntry_TCL_DECLARED /* 422 */ -EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, - CONST char * key, int * newPtr); +EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, + const char * key, int * newPtr); #endif #ifndef Tcl_InitCustomHashTable_TCL_DECLARED #define Tcl_InitCustomHashTable_TCL_DECLARED /* 423 */ -EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, - int keyType, CONST Tcl_HashKeyType * typePtr); +EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, + int keyType, const Tcl_HashKeyType * typePtr); #endif #ifndef Tcl_InitObjHashTable_TCL_DECLARED #define Tcl_InitObjHashTable_TCL_DECLARED @@ -2582,25 +2582,25 @@ EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); #ifndef Tcl_CommandTraceInfo_TCL_DECLARED #define Tcl_CommandTraceInfo_TCL_DECLARED /* 425 */ -EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * procPtr, +EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * procPtr, ClientData prevClientData); #endif #ifndef Tcl_TraceCommand_TCL_DECLARED #define Tcl_TraceCommand_TCL_DECLARED /* 426 */ -EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * proc, +EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * proc, ClientData clientData); #endif #ifndef Tcl_UntraceCommand_TCL_DECLARED #define Tcl_UntraceCommand_TCL_DECLARED /* 427 */ -EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, - CONST char * varName, int flags, - Tcl_CommandTraceProc * proc, +EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * proc, ClientData clientData); #endif #ifndef Tcl_AttemptAlloc_TCL_DECLARED @@ -2611,8 +2611,8 @@ EXTERN char * Tcl_AttemptAlloc (unsigned int size); #ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED #define Tcl_AttemptDbCkalloc_TCL_DECLARED /* 429 */ -EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, - CONST char * file, int line); +EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, + const char * file, int line); #endif #ifndef Tcl_AttemptRealloc_TCL_DECLARED #define Tcl_AttemptRealloc_TCL_DECLARED @@ -2622,14 +2622,14 @@ EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); #ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED #define Tcl_AttemptDbCkrealloc_TCL_DECLARED /* 431 */ -EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, - unsigned int size, CONST char * file, +EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, + unsigned int size, const char * file, int line); #endif #ifndef Tcl_AttemptSetObjLength_TCL_DECLARED #define Tcl_AttemptSetObjLength_TCL_DECLARED /* 432 */ -EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, +EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, int length); #endif #ifndef Tcl_GetChannelThread_TCL_DECLARED @@ -2640,34 +2640,34 @@ EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); #ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED #define Tcl_GetUnicodeFromObj_TCL_DECLARED /* 434 */ -EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, int * lengthPtr); #endif #ifndef Tcl_GetMathFuncInfo_TCL_DECLARED #define Tcl_GetMathFuncInfo_TCL_DECLARED /* 435 */ -EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, - CONST char * name, int * numArgsPtr, - Tcl_ValueType ** argTypesPtr, - Tcl_MathProc ** procPtr, +EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, + const char * name, int * numArgsPtr, + Tcl_ValueType ** argTypesPtr, + Tcl_MathProc ** procPtr, ClientData * clientDataPtr); #endif #ifndef Tcl_ListMathFuncs_TCL_DECLARED #define Tcl_ListMathFuncs_TCL_DECLARED /* 436 */ -EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, - CONST char * pattern); +EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, + const char * pattern); #endif #ifndef Tcl_SubstObj_TCL_DECLARED #define Tcl_SubstObj_TCL_DECLARED /* 437 */ -EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); #endif #ifndef Tcl_DetachChannel_TCL_DECLARED #define Tcl_DetachChannel_TCL_DECLARED /* 438 */ -EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, +EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, Tcl_Channel channel); #endif #ifndef Tcl_IsStandardChannel_TCL_DECLARED @@ -2678,13 +2678,13 @@ EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); #ifndef Tcl_FSCopyFile_TCL_DECLARED #define Tcl_FSCopyFile_TCL_DECLARED /* 440 */ -EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, +EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); #endif #ifndef Tcl_FSCopyDirectory_TCL_DECLARED #define Tcl_FSCopyDirectory_TCL_DECLARED /* 441 */ -EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, +EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); #endif #ifndef Tcl_FSCreateDirectory_TCL_DECLARED @@ -2700,38 +2700,38 @@ EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); #ifndef Tcl_FSLoadFile_TCL_DECLARED #define Tcl_FSLoadFile_TCL_DECLARED /* 444 */ -EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, - Tcl_Obj * pathPtr, CONST char * sym1, - CONST char * sym2, - Tcl_PackageInitProc ** proc1Ptr, - Tcl_PackageInitProc ** proc2Ptr, - Tcl_LoadHandle * handlePtr, +EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, + Tcl_Obj * pathPtr, const char * sym1, + const char * sym2, + Tcl_PackageInitProc ** proc1Ptr, + Tcl_PackageInitProc ** proc2Ptr, + Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); #endif #ifndef Tcl_FSMatchInDirectory_TCL_DECLARED #define Tcl_FSMatchInDirectory_TCL_DECLARED /* 445 */ -EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, - Tcl_Obj * result, Tcl_Obj * pathPtr, - CONST char * pattern, +EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, + Tcl_Obj * result, Tcl_Obj * pathPtr, + const char * pattern, Tcl_GlobTypeData * types); #endif #ifndef Tcl_FSLink_TCL_DECLARED #define Tcl_FSLink_TCL_DECLARED /* 446 */ -EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, +EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); #endif #ifndef Tcl_FSRemoveDirectory_TCL_DECLARED #define Tcl_FSRemoveDirectory_TCL_DECLARED /* 447 */ -EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, +EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); #endif #ifndef Tcl_FSRenameFile_TCL_DECLARED #define Tcl_FSRenameFile_TCL_DECLARED /* 448 */ -EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, +EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); #endif #ifndef Tcl_FSLstat_TCL_DECLARED @@ -2742,25 +2742,25 @@ EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); #ifndef Tcl_FSUtime_TCL_DECLARED #define Tcl_FSUtime_TCL_DECLARED /* 450 */ -EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, +EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, struct utimbuf * tval); #endif #ifndef Tcl_FSFileAttrsGet_TCL_DECLARED #define Tcl_FSFileAttrsGet_TCL_DECLARED /* 451 */ -EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, +EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); #endif #ifndef Tcl_FSFileAttrsSet_TCL_DECLARED #define Tcl_FSFileAttrsSet_TCL_DECLARED /* 452 */ -EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, +EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); #endif #ifndef Tcl_FSFileAttrStrings_TCL_DECLARED #define Tcl_FSFileAttrStrings_TCL_DECLARED /* 453 */ -EXTERN CONST char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, +EXTERN const char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); #endif #ifndef Tcl_FSStat_TCL_DECLARED @@ -2776,8 +2776,8 @@ EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); #ifndef Tcl_FSOpenFileChannel_TCL_DECLARED #define Tcl_FSOpenFileChannel_TCL_DECLARED /* 456 */ -EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, CONST char * modeString, +EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, const char * modeString, int permissions); #endif #ifndef Tcl_FSGetCwd_TCL_DECLARED @@ -2793,7 +2793,7 @@ EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); #ifndef Tcl_FSConvertToPathType_TCL_DECLARED #define Tcl_FSConvertToPathType_TCL_DECLARED /* 459 */ -EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, +EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSJoinPath_TCL_DECLARED @@ -2809,50 +2809,50 @@ EXTERN Tcl_Obj* Tcl_FSSplitPath (Tcl_Obj* pathPtr, int * lenPtr); #ifndef Tcl_FSEqualPaths_TCL_DECLARED #define Tcl_FSEqualPaths_TCL_DECLARED /* 462 */ -EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, +EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); #endif #ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED #define Tcl_FSGetNormalizedPath_TCL_DECLARED /* 463 */ -EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, +EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, Tcl_Obj* pathPtr); #endif #ifndef Tcl_FSJoinToPath_TCL_DECLARED #define Tcl_FSJoinToPath_TCL_DECLARED /* 464 */ -EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, - Tcl_Obj *CONST objv[]); +EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, + Tcl_Obj *const objv[]); #endif #ifndef Tcl_FSGetInternalRep_TCL_DECLARED #define Tcl_FSGetInternalRep_TCL_DECLARED /* 465 */ -EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, - CONST Tcl_Filesystem * fsPtr); +EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, + const Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED #define Tcl_FSGetTranslatedPath_TCL_DECLARED /* 466 */ -EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, +EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, Tcl_Obj* pathPtr); #endif #ifndef Tcl_FSEvalFile_TCL_DECLARED #define Tcl_FSEvalFile_TCL_DECLARED /* 467 */ -EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, +EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, Tcl_Obj * fileName); #endif #ifndef Tcl_FSNewNativePath_TCL_DECLARED #define Tcl_FSNewNativePath_TCL_DECLARED /* 468 */ EXTERN Tcl_Obj* Tcl_FSNewNativePath ( - CONST Tcl_Filesystem* fromFilesystem, + const Tcl_Filesystem* fromFilesystem, ClientData clientData); #endif #ifndef Tcl_FSGetNativePath_TCL_DECLARED #define Tcl_FSGetNativePath_TCL_DECLARED /* 469 */ -EXTERN CONST char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); +EXTERN const char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); #endif #ifndef Tcl_FSFileSystemInfo_TCL_DECLARED #define Tcl_FSFileSystemInfo_TCL_DECLARED @@ -2872,23 +2872,23 @@ EXTERN Tcl_Obj* Tcl_FSListVolumes (void); #ifndef Tcl_FSRegister_TCL_DECLARED #define Tcl_FSRegister_TCL_DECLARED /* 473 */ -EXTERN int Tcl_FSRegister (ClientData clientData, - CONST Tcl_Filesystem * fsPtr); +EXTERN int Tcl_FSRegister (ClientData clientData, + const Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSUnregister_TCL_DECLARED #define Tcl_FSUnregister_TCL_DECLARED /* 474 */ -EXTERN int Tcl_FSUnregister (CONST Tcl_Filesystem * fsPtr); +EXTERN int Tcl_FSUnregister (const Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSData_TCL_DECLARED #define Tcl_FSData_TCL_DECLARED /* 475 */ -EXTERN ClientData Tcl_FSData (CONST Tcl_Filesystem * fsPtr); +EXTERN ClientData Tcl_FSData (const Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED #define Tcl_FSGetTranslatedStringPath_TCL_DECLARED /* 476 */ -EXTERN CONST char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, +EXTERN const char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, Tcl_Obj* pathPtr); #endif #ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED @@ -2909,12 +2909,12 @@ EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); #ifndef Tcl_FSMountsChanged_TCL_DECLARED #define Tcl_FSMountsChanged_TCL_DECLARED /* 480 */ -EXTERN void Tcl_FSMountsChanged (CONST Tcl_Filesystem * fsPtr); +EXTERN void Tcl_FSMountsChanged (const Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_EvalTokensStandard_TCL_DECLARED #define Tcl_EvalTokensStandard_TCL_DECLARED /* 481 */ -EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, +EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); #endif #ifndef Tcl_GetTime_TCL_DECLARED @@ -2925,33 +2925,33 @@ EXTERN void Tcl_GetTime (Tcl_Time* timeBuf); #ifndef Tcl_CreateObjTrace_TCL_DECLARED #define Tcl_CreateObjTrace_TCL_DECLARED /* 483 */ -EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, - int flags, Tcl_CmdObjTraceProc* objProc, - ClientData clientData, +EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, + int flags, Tcl_CmdObjTraceProc* objProc, + ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); #endif #ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED #define Tcl_GetCommandInfoFromToken_TCL_DECLARED /* 484 */ -EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, +EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, Tcl_CmdInfo* infoPtr); #endif #ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED #define Tcl_SetCommandInfoFromToken_TCL_DECLARED /* 485 */ -EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, - CONST Tcl_CmdInfo* infoPtr); +EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, + const Tcl_CmdInfo* infoPtr); #endif #ifndef Tcl_DbNewWideIntObj_TCL_DECLARED #define Tcl_DbNewWideIntObj_TCL_DECLARED /* 486 */ -EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, - CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, + const char * file, int line); #endif #ifndef Tcl_GetWideIntFromObj_TCL_DECLARED #define Tcl_GetWideIntFromObj_TCL_DECLARED /* 487 */ -EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, +EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); #endif #ifndef Tcl_NewWideIntObj_TCL_DECLARED @@ -2962,7 +2962,7 @@ EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); #ifndef Tcl_SetWideIntObj_TCL_DECLARED #define Tcl_SetWideIntObj_TCL_DECLARED /* 489 */ -EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, +EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, Tcl_WideInt wideValue); #endif #ifndef Tcl_AllocStatBuf_TCL_DECLARED @@ -2973,7 +2973,7 @@ EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); #ifndef Tcl_Seek_TCL_DECLARED #define Tcl_Seek_TCL_DECLARED /* 491 */ -EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, +EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, int mode); #endif #ifndef Tcl_Tell_TCL_DECLARED @@ -2985,48 +2985,48 @@ EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); #define Tcl_ChannelWideSeekProc_TCL_DECLARED /* 493 */ EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_DictObjPut_TCL_DECLARED #define Tcl_DictObjPut_TCL_DECLARED /* 494 */ -EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, +EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); #endif #ifndef Tcl_DictObjGet_TCL_DECLARED #define Tcl_DictObjGet_TCL_DECLARED /* 495 */ -EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, +EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); #endif #ifndef Tcl_DictObjRemove_TCL_DECLARED #define Tcl_DictObjRemove_TCL_DECLARED /* 496 */ -EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, +EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); #endif #ifndef Tcl_DictObjSize_TCL_DECLARED #define Tcl_DictObjSize_TCL_DECLARED /* 497 */ -EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, +EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); #endif #ifndef Tcl_DictObjFirst_TCL_DECLARED #define Tcl_DictObjFirst_TCL_DECLARED /* 498 */ -EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, - Tcl_Obj * dictPtr, - Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, +EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, + Tcl_Obj * dictPtr, + Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); #endif #ifndef Tcl_DictObjNext_TCL_DECLARED #define Tcl_DictObjNext_TCL_DECLARED /* 499 */ -EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, +EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); #endif #ifndef Tcl_DictObjDone_TCL_DECLARED @@ -3037,16 +3037,16 @@ EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); #ifndef Tcl_DictObjPutKeyList_TCL_DECLARED #define Tcl_DictObjPutKeyList_TCL_DECLARED /* 501 */ -EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); +EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); #endif #ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED #define Tcl_DictObjRemoveKeyList_TCL_DECLARED /* 502 */ -EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *CONST * keyv); +EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *const * keyv); #endif #ifndef Tcl_NewDictObj_TCL_DECLARED #define Tcl_NewDictObj_TCL_DECLARED @@ -3056,21 +3056,21 @@ EXTERN Tcl_Obj * Tcl_NewDictObj (void); #ifndef Tcl_DbNewDictObj_TCL_DECLARED #define Tcl_DbNewDictObj_TCL_DECLARED /* 504 */ -EXTERN Tcl_Obj * Tcl_DbNewDictObj (CONST char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewDictObj (const char * file, int line); #endif #ifndef Tcl_RegisterConfig_TCL_DECLARED #define Tcl_RegisterConfig_TCL_DECLARED /* 505 */ -EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, - CONST char* pkgName, - CONST Tcl_Config* configuration, - CONST char* valEncoding); +EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, + const char* pkgName, + const Tcl_Config* configuration, + const char* valEncoding); #endif #ifndef Tcl_CreateNamespace_TCL_DECLARED #define Tcl_CreateNamespace_TCL_DECLARED /* 506 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - CONST char * name, ClientData clientData, +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); #endif #ifndef Tcl_DeleteNamespace_TCL_DECLARED @@ -3081,28 +3081,28 @@ EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); #ifndef Tcl_AppendExportList_TCL_DECLARED #define Tcl_AppendExportList_TCL_DECLARED /* 508 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); #endif #ifndef Tcl_Export_TCL_DECLARED #define Tcl_Export_TCL_DECLARED /* 509 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); #endif #ifndef Tcl_Import_TCL_DECLARED #define Tcl_Import_TCL_DECLARED /* 510 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); #endif #ifndef Tcl_ForgetImport_TCL_DECLARED #define Tcl_ForgetImport_TCL_DECLARED /* 511 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern); +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern); #endif #ifndef Tcl_GetCurrentNamespace_TCL_DECLARED #define Tcl_GetCurrentNamespace_TCL_DECLARED @@ -3117,35 +3117,35 @@ EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); #ifndef Tcl_FindNamespace_TCL_DECLARED #define Tcl_FindNamespace_TCL_DECLARED /* 514 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - CONST char * name, +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + const char * name, Tcl_Namespace * contextNsPtr, int flags); #endif #ifndef Tcl_FindCommand_TCL_DECLARED #define Tcl_FindCommand_TCL_DECLARED /* 515 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - CONST char * name, +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + const char * name, Tcl_Namespace * contextNsPtr, int flags); #endif #ifndef Tcl_GetCommandFromObj_TCL_DECLARED #define Tcl_GetCommandFromObj_TCL_DECLARED /* 516 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr); #endif #ifndef Tcl_GetCommandFullName_TCL_DECLARED #define Tcl_GetCommandFullName_TCL_DECLARED /* 517 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); #endif #ifndef Tcl_FSEvalFileEx_TCL_DECLARED #define Tcl_FSEvalFileEx_TCL_DECLARED /* 518 */ -EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, - Tcl_Obj * fileName, - CONST char * encodingName); +EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, + Tcl_Obj * fileName, + const char * encodingName); #endif #ifndef Tcl_SetExitProc_TCL_DECLARED #define Tcl_SetExitProc_TCL_DECLARED @@ -3155,16 +3155,16 @@ EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); #ifndef Tcl_LimitAddHandler_TCL_DECLARED #define Tcl_LimitAddHandler_TCL_DECLARED /* 520 */ -EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, - Tcl_LimitHandlerProc * handlerProc, - ClientData clientData, +EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, + Tcl_LimitHandlerProc * handlerProc, + ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); #endif #ifndef Tcl_LimitRemoveHandler_TCL_DECLARED #define Tcl_LimitRemoveHandler_TCL_DECLARED /* 521 */ -EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, - int type, Tcl_LimitHandlerProc * handlerProc, +EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, + int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); #endif #ifndef Tcl_LimitReady_TCL_DECLARED @@ -3185,19 +3185,19 @@ EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); #ifndef Tcl_LimitSetCommands_TCL_DECLARED #define Tcl_LimitSetCommands_TCL_DECLARED /* 525 */ -EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, +EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, int commandLimit); #endif #ifndef Tcl_LimitSetTime_TCL_DECLARED #define Tcl_LimitSetTime_TCL_DECLARED /* 526 */ -EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, +EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); #endif #ifndef Tcl_LimitSetGranularity_TCL_DECLARED #define Tcl_LimitSetGranularity_TCL_DECLARED /* 527 */ -EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, +EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, int type, int granularity); #endif #ifndef Tcl_LimitTypeEnabled_TCL_DECLARED @@ -3228,13 +3228,13 @@ EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); #ifndef Tcl_LimitGetTime_TCL_DECLARED #define Tcl_LimitGetTime_TCL_DECLARED /* 533 */ -EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, +EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); #endif #ifndef Tcl_LimitGetGranularity_TCL_DECLARED #define Tcl_LimitGetGranularity_TCL_DECLARED /* 534 */ -EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, +EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, int type); #endif #ifndef Tcl_SaveInterpState_TCL_DECLARED @@ -3245,7 +3245,7 @@ EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); #ifndef Tcl_RestoreInterpState_TCL_DECLARED #define Tcl_RestoreInterpState_TCL_DECLARED /* 536 */ -EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, +EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, Tcl_InterpState state); #endif #ifndef Tcl_DiscardInterpState_TCL_DECLARED @@ -3256,13 +3256,13 @@ EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); #ifndef Tcl_SetReturnOptions_TCL_DECLARED #define Tcl_SetReturnOptions_TCL_DECLARED /* 538 */ -EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, +EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, Tcl_Obj * options); #endif #ifndef Tcl_GetReturnOptions_TCL_DECLARED #define Tcl_GetReturnOptions_TCL_DECLARED /* 539 */ -EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, +EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, int result); #endif #ifndef Tcl_IsEnsemble_TCL_DECLARED @@ -3273,90 +3273,90 @@ EXTERN int Tcl_IsEnsemble (Tcl_Command token); #ifndef Tcl_CreateEnsemble_TCL_DECLARED #define Tcl_CreateEnsemble_TCL_DECLARED /* 541 */ -EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, - CONST char * name, +EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, + const char * name, Tcl_Namespace * namespacePtr, int flags); #endif #ifndef Tcl_FindEnsemble_TCL_DECLARED #define Tcl_FindEnsemble_TCL_DECLARED /* 542 */ -EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, +EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); #endif #ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED #define Tcl_SetEnsembleSubcommandList_TCL_DECLARED /* 543 */ -EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, +EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); #endif #ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED #define Tcl_SetEnsembleMappingDict_TCL_DECLARED /* 544 */ -EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, +EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); #endif #ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED #define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED /* 545 */ -EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, +EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); #endif #ifndef Tcl_SetEnsembleFlags_TCL_DECLARED #define Tcl_SetEnsembleFlags_TCL_DECLARED /* 546 */ -EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, +EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, Tcl_Command token, int flags); #endif #ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED #define Tcl_GetEnsembleSubcommandList_TCL_DECLARED /* 547 */ -EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, +EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); #endif #ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED #define Tcl_GetEnsembleMappingDict_TCL_DECLARED /* 548 */ -EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, +EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); #endif #ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED #define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED /* 549 */ -EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, +EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); #endif #ifndef Tcl_GetEnsembleFlags_TCL_DECLARED #define Tcl_GetEnsembleFlags_TCL_DECLARED /* 550 */ -EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, +EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); #endif #ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED #define Tcl_GetEnsembleNamespace_TCL_DECLARED /* 551 */ -EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, - Tcl_Command token, +EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, + Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); #endif #ifndef Tcl_SetTimeProc_TCL_DECLARED #define Tcl_SetTimeProc_TCL_DECLARED /* 552 */ -EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, - Tcl_ScaleTimeProc* scaleProc, +EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, + Tcl_ScaleTimeProc* scaleProc, ClientData clientData); #endif #ifndef Tcl_QueryTimeProc_TCL_DECLARED #define Tcl_QueryTimeProc_TCL_DECLARED /* 553 */ -EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, - Tcl_ScaleTimeProc** scaleProc, +EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, + Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); #endif #ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED #define Tcl_ChannelThreadActionProc_TCL_DECLARED /* 554 */ EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_NewBignumObj_TCL_DECLARED #define Tcl_NewBignumObj_TCL_DECLARED @@ -3366,7 +3366,7 @@ EXTERN Tcl_Obj* Tcl_NewBignumObj (mp_int* value); #ifndef Tcl_DbNewBignumObj_TCL_DECLARED #define Tcl_DbNewBignumObj_TCL_DECLARED /* 556 */ -EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, CONST char* file, +EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, const char* file, int line); #endif #ifndef Tcl_SetBignumObj_TCL_DECLARED @@ -3377,37 +3377,37 @@ EXTERN void Tcl_SetBignumObj (Tcl_Obj* obj, mp_int* value); #ifndef Tcl_GetBignumFromObj_TCL_DECLARED #define Tcl_GetBignumFromObj_TCL_DECLARED /* 558 */ -EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, +EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); #endif #ifndef Tcl_TakeBignumFromObj_TCL_DECLARED #define Tcl_TakeBignumFromObj_TCL_DECLARED /* 559 */ -EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, +EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); #endif #ifndef Tcl_TruncateChannel_TCL_DECLARED #define Tcl_TruncateChannel_TCL_DECLARED /* 560 */ -EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, +EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, Tcl_WideInt length); #endif #ifndef Tcl_ChannelTruncateProc_TCL_DECLARED #define Tcl_ChannelTruncateProc_TCL_DECLARED /* 561 */ EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( - CONST Tcl_ChannelType * chanTypePtr); + const Tcl_ChannelType * chanTypePtr); #endif #ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED #define Tcl_SetChannelErrorInterp_TCL_DECLARED /* 562 */ -EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, +EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, Tcl_Obj* msg); #endif #ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED #define Tcl_GetChannelErrorInterp_TCL_DECLARED /* 563 */ -EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, +EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, Tcl_Obj** msg); #endif #ifndef Tcl_SetChannelError_TCL_DECLARED @@ -3423,25 +3423,25 @@ EXTERN void Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj** msg); #ifndef Tcl_InitBignumFromDouble_TCL_DECLARED #define Tcl_InitBignumFromDouble_TCL_DECLARED /* 566 */ -EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, +EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, double initval, mp_int * toInit); #endif #ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED #define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED /* 567 */ -EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, +EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, Tcl_Namespace * nsPtr); #endif #ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED #define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED /* 568 */ -EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, +EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); #endif #ifndef Tcl_GetEncodingFromObj_TCL_DECLARED #define Tcl_GetEncodingFromObj_TCL_DECLARED /* 569 */ -EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, +EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); #endif #ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED @@ -3457,59 +3457,59 @@ EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj* searchPath); #ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED #define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED /* 572 */ -EXTERN CONST char * Tcl_GetEncodingNameFromEnvironment ( +EXTERN const char * Tcl_GetEncodingNameFromEnvironment ( Tcl_DString* bufPtr); #endif #ifndef Tcl_PkgRequireProc_TCL_DECLARED #define Tcl_PkgRequireProc_TCL_DECLARED /* 573 */ -EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, - CONST char * name, int objc, - Tcl_Obj *CONST objv[], +EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, + const char * name, int objc, + Tcl_Obj *const objv[], ClientData * clientDataPtr); #endif #ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED #define Tcl_AppendObjToErrorInfo_TCL_DECLARED /* 574 */ -EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, +EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, Tcl_Obj * objPtr); #endif #ifndef Tcl_AppendLimitedToObj_TCL_DECLARED #define Tcl_AppendLimitedToObj_TCL_DECLARED /* 575 */ -EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, - CONST char * bytes, int length, int limit, - CONST char * ellipsis); +EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, + const char * bytes, int length, int limit, + const char * ellipsis); #endif #ifndef Tcl_Format_TCL_DECLARED #define Tcl_Format_TCL_DECLARED /* 576 */ -EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, CONST char * format, - int objc, Tcl_Obj * CONST objv[]); +EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, const char * format, + int objc, Tcl_Obj * const objv[]); #endif #ifndef Tcl_AppendFormatToObj_TCL_DECLARED #define Tcl_AppendFormatToObj_TCL_DECLARED /* 577 */ -EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, CONST char * format, - int objc, Tcl_Obj * CONST objv[]); +EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, const char * format, + int objc, Tcl_Obj * const objv[]); #endif #ifndef Tcl_ObjPrintf_TCL_DECLARED #define Tcl_ObjPrintf_TCL_DECLARED /* 578 */ -EXTERN Tcl_Obj * Tcl_ObjPrintf (CONST char * format, ...); +EXTERN Tcl_Obj * Tcl_ObjPrintf (const char * format, ...); #endif #ifndef Tcl_AppendPrintfToObj_TCL_DECLARED #define Tcl_AppendPrintfToObj_TCL_DECLARED /* 579 */ -EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, - CONST char * format, ...); +EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, + const char * format, ...); #endif #ifndef Tcl_CancelEval_TCL_DECLARED #define Tcl_CancelEval_TCL_DECLARED /* 580 */ -EXTERN int Tcl_CancelEval (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr, +EXTERN int Tcl_CancelEval (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr, ClientData clientData, int flags); #endif #ifndef Tcl_Canceled_TCL_DECLARED @@ -3520,52 +3520,52 @@ EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); #ifndef Tcl_CreatePipe_TCL_DECLARED #define Tcl_CreatePipe_TCL_DECLARED /* 582 */ -EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, - Tcl_Channel * rchan, Tcl_Channel * wchan, +EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, + Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); #endif #ifndef Tcl_NRCreateCommand_TCL_DECLARED #define Tcl_NRCreateCommand_TCL_DECLARED /* 583 */ -EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, - CONST char * cmdName, Tcl_ObjCmdProc * proc, - Tcl_ObjCmdProc * nreProc, - ClientData clientData, +EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_ObjCmdProc * proc, + Tcl_ObjCmdProc * nreProc, + ClientData clientData, Tcl_CmdDeleteProc * deleteProc); #endif #ifndef Tcl_NREvalObj_TCL_DECLARED #define Tcl_NREvalObj_TCL_DECLARED /* 584 */ -EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); #endif #ifndef Tcl_NREvalObjv_TCL_DECLARED #define Tcl_NREvalObjv_TCL_DECLARED /* 585 */ -EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); +EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags); #endif #ifndef Tcl_NRCmdSwap_TCL_DECLARED #define Tcl_NRCmdSwap_TCL_DECLARED /* 586 */ -EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, - int objc, Tcl_Obj *CONST objv[], int flags); +EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, + int objc, Tcl_Obj *const objv[], int flags); #endif #ifndef Tcl_NRAddCallback_TCL_DECLARED #define Tcl_NRAddCallback_TCL_DECLARED /* 587 */ -EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, - Tcl_NRPostProc * postProcPtr, - ClientData data0, ClientData data1, +EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, + Tcl_NRPostProc * postProcPtr, + ClientData data0, ClientData data1, ClientData data2, ClientData data3); #endif #ifndef Tcl_NRCallObjProc_TCL_DECLARED #define Tcl_NRCallObjProc_TCL_DECLARED /* 588 */ -EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, - Tcl_ObjCmdProc * objProc, - ClientData clientData, int objc, - Tcl_Obj *CONST objv[]); +EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, + Tcl_ObjCmdProc * objProc, + ClientData clientData, int objc, + Tcl_Obj *const objv[]); #endif #ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED #define Tcl_GetFSDeviceFromStat_TCL_DECLARED @@ -3641,42 +3641,42 @@ EXTERN unsigned Tcl_GetBlockSizeFromStat ( #ifndef Tcl_SetEnsembleParameterList_TCL_DECLARED #define Tcl_SetEnsembleParameterList_TCL_DECLARED /* 602 */ -EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, +EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); #endif #ifndef Tcl_GetEnsembleParameterList_TCL_DECLARED #define Tcl_GetEnsembleParameterList_TCL_DECLARED /* 603 */ -EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, +EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); #endif #ifndef Tcl_ParseArgsObjv_TCL_DECLARED #define Tcl_ParseArgsObjv_TCL_DECLARED /* 604 */ -EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, - const Tcl_ArgvInfo * argTable, int * objcPtr, +EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, + const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); #endif typedef struct TclStubHooks { - CONST struct TclPlatStubs *tclPlatStubs; - CONST struct TclIntStubs *tclIntStubs; - CONST struct TclIntPlatStubs *tclIntPlatStubs; + const struct TclPlatStubs *tclPlatStubs; + const struct TclIntStubs *tclIntStubs; + const struct TclIntPlatStubs *tclIntPlatStubs; } TclStubHooks; typedef struct TclStubs { int magic; - CONST struct TclStubHooks *hooks; + const struct TclStubHooks *hooks; - int (*tcl_PkgProvideEx) (Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData); /* 0 */ - CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 1 */ - void (*tcl_Panic) (CONST char * format, ...); /* 2 */ + int (*tcl_PkgProvideEx) (Tcl_Interp* interp, const char* name, const char* version, ClientData clientData); /* 0 */ + CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 1 */ + void (*tcl_Panic) (const char * format, ...); /* 2 */ char * (*tcl_Alloc) (unsigned int size); /* 3 */ void (*tcl_Free) (char * ptr); /* 4 */ char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ - char * (*tcl_DbCkalloc) (unsigned int size, CONST char * file, int line); /* 6 */ - int (*tcl_DbCkfree) (char * ptr, CONST char * file, int line); /* 7 */ - char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 8 */ + char * (*tcl_DbCkalloc) (unsigned int size, const char * file, int line); /* 6 */ + int (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ + char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 8 */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ #endif /* UNIX */ @@ -3695,36 +3695,36 @@ typedef struct TclStubs { #ifdef MAC_OSX_TCL /* MACOSX */ void (*tcl_DeleteFileHandler) (int fd); /* 10 */ #endif /* MACOSX */ - void (*tcl_SetTimer) (CONST Tcl_Time * timePtr); /* 11 */ + void (*tcl_SetTimer) (const Tcl_Time * timePtr); /* 11 */ void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (CONST Tcl_Time * timePtr); /* 13 */ + int (*tcl_WaitForEvent) (const Tcl_Time * timePtr); /* 13 */ int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ - void (*tcl_AppendToObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 16 */ - Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *CONST objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST Tcl_ObjType * typePtr); /* 18 */ - void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 19 */ - void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, CONST char * file, int line); /* 20 */ - int (*tcl_DbIsShared) (Tcl_Obj * objPtr, CONST char * file, int line); /* 21 */ - Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, CONST char * file, int line); /* 22 */ - Tcl_Obj * (*tcl_DbNewByteArrayObj) (CONST unsigned char * bytes, int length, CONST char * file, int line); /* 23 */ - Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, CONST char * file, int line); /* 24 */ - Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *CONST * objv, CONST char * file, int line); /* 25 */ - Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, CONST char * file, int line); /* 26 */ - Tcl_Obj * (*tcl_DbNewObj) (CONST char * file, int line); /* 27 */ - Tcl_Obj * (*tcl_DbNewStringObj) (CONST char * bytes, int length, CONST char * file, int line); /* 28 */ + void (*tcl_AppendToObj) (Tcl_Obj* objPtr, const char* bytes, int length); /* 16 */ + Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *const objv[]); /* 17 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, const Tcl_ObjType * typePtr); /* 18 */ + void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 19 */ + void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 20 */ + int (*tcl_DbIsShared) (Tcl_Obj * objPtr, const char * file, int line); /* 21 */ + Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, const char * file, int line); /* 22 */ + Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char * bytes, int length, const char * file, int line); /* 23 */ + Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char * file, int line); /* 24 */ + Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const * objv, const char * file, int line); /* 25 */ + Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char * file, int line); /* 26 */ + Tcl_Obj * (*tcl_DbNewObj) (const char * file, int line); /* 27 */ + Tcl_Obj * (*tcl_DbNewStringObj) (const char * bytes, int length, const char * file, int line); /* 28 */ Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ - int (*tcl_GetBoolean) (Tcl_Interp * interp, CONST char * src, int * boolPtr); /* 31 */ + int (*tcl_GetBoolean) (Tcl_Interp * interp, const char * src, int * boolPtr); /* 31 */ int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ - int (*tcl_GetDouble) (Tcl_Interp * interp, CONST char * src, double * doublePtr); /* 34 */ + int (*tcl_GetDouble) (Tcl_Interp * interp, const char * src, double * doublePtr); /* 34 */ int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *CONST * tablePtr, CONST char * msg, int flags, int * indexPtr); /* 36 */ - int (*tcl_GetInt) (Tcl_Interp * interp, CONST char * src, int * intPtr); /* 37 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *const * tablePtr, const char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetInt) (Tcl_Interp * interp, const char * src, int * intPtr); /* 37 */ int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - CONST86 Tcl_ObjType * (*tcl_GetObjType) (CONST char * typeName); /* 40 */ + CONST86 Tcl_ObjType * (*tcl_GetObjType) (const char * typeName); /* 40 */ char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ @@ -3732,28 +3732,28 @@ typedef struct TclStubs { int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ - int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[]); /* 48 */ + int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ - Tcl_Obj * (*tcl_NewByteArrayObj) (CONST unsigned char* bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char* bytes, int length); /* 50 */ Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ - Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *CONST objv[]); /* 53 */ + Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */ Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ - Tcl_Obj * (*tcl_NewStringObj) (CONST char * bytes, int length); /* 56 */ + Tcl_Obj * (*tcl_NewStringObj) (const char * bytes, int length); /* 56 */ void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ - void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, CONST unsigned char * bytes, int length); /* 59 */ + void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, const unsigned char * bytes, int length); /* 59 */ void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ - void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[]); /* 62 */ + void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ - void (*tcl_SetStringObj) (Tcl_Obj* objPtr, CONST char* bytes, int length); /* 65 */ - void (*tcl_AddErrorInfo) (Tcl_Interp * interp, CONST char * message); /* 66 */ - void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, CONST char * message, int length); /* 67 */ + void (*tcl_SetStringObj) (Tcl_Obj* objPtr, const char* bytes, int length); /* 65 */ + void (*tcl_AddErrorInfo) (Tcl_Interp * interp, const char * message); /* 66 */ + void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, const char * message, int length); /* 67 */ void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ - void (*tcl_AppendElement) (Tcl_Interp * interp, CONST char * element); /* 69 */ + void (*tcl_AppendElement) (Tcl_Interp * interp, const char * element); /* 69 */ void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ @@ -3761,33 +3761,33 @@ typedef struct TclStubs { void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ int (*tcl_AsyncReady) (void); /* 75 */ void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ - char (*tcl_Backslash) (CONST char * src, int * readPtr); /* 77 */ - int (*tcl_BadChannelOption) (Tcl_Interp * interp, CONST char * optionName, CONST char * optionList); /* 78 */ + char (*tcl_Backslash) (const char * src, int * readPtr); /* 77 */ + int (*tcl_BadChannelOption) (Tcl_Interp * interp, const char * optionName, const char * optionList); /* 78 */ void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ - int (*tcl_CommandComplete) (CONST char * cmd); /* 82 */ - char * (*tcl_Concat) (int argc, CONST84 char * CONST * argv); /* 83 */ - int (*tcl_ConvertElement) (CONST char * src, char * dst, int flags); /* 84 */ - int (*tcl_ConvertCountedElement) (CONST char * src, int length, char * dst, int flags); /* 85 */ - int (*tcl_CreateAlias) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, CONST84 char * CONST * argv); /* 86 */ - int (*tcl_CreateAliasObj) (Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[]); /* 87 */ - Tcl_Channel (*tcl_CreateChannel) (CONST Tcl_ChannelType * typePtr, CONST char * chanName, ClientData instanceData, int mask); /* 88 */ + int (*tcl_CommandComplete) (const char * cmd); /* 82 */ + char * (*tcl_Concat) (int argc, CONST84 char * const * argv); /* 83 */ + int (*tcl_ConvertElement) (const char * src, char * dst, int flags); /* 84 */ + int (*tcl_ConvertCountedElement) (const char * src, int length, char * dst, int flags); /* 85 */ + int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char * const * argv); /* 86 */ + int (*tcl_CreateAliasObj) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ + Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType * typePtr, const char * chanName, ClientData instanceData, int mask); /* 88 */ void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ - Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ + Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ - void (*tcl_CreateMathFunc) (Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ - Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ - Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, CONST char * slaveName, int isSafe); /* 97 */ + void (*tcl_CreateMathFunc) (Tcl_Interp * interp, const char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ + Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ + Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, const char * slaveName, int isSafe); /* 97 */ Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ - void (*tcl_DeleteAssocData) (Tcl_Interp * interp, CONST char * name); /* 100 */ + void (*tcl_DeleteAssocData) (Tcl_Interp * interp, const char * name); /* 100 */ void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ - int (*tcl_DeleteCommand) (Tcl_Interp * interp, CONST char * cmdName); /* 103 */ + int (*tcl_DeleteCommand) (Tcl_Interp * interp, const char * cmdName); /* 103 */ int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ @@ -3809,8 +3809,8 @@ typedef struct TclStubs { void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ int (*tcl_DoOneEvent) (int flags); /* 115 */ void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ - char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, CONST char * bytes, int length); /* 117 */ - char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, CONST char * element); /* 118 */ + char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, const char * bytes, int length); /* 117 */ + char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, const char * element); /* 118 */ void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ @@ -3821,78 +3821,78 @@ typedef struct TclStubs { int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ - int (*tcl_Eval) (Tcl_Interp * interp, CONST char * script); /* 129 */ - int (*tcl_EvalFile) (Tcl_Interp * interp, CONST char * fileName); /* 130 */ + int (*tcl_Eval) (Tcl_Interp * interp, const char * script); /* 129 */ + int (*tcl_EvalFile) (Tcl_Interp * interp, const char * fileName); /* 130 */ int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ void (*tcl_Exit) (int status); /* 133 */ - int (*tcl_ExposeCommand) (Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName); /* 134 */ - int (*tcl_ExprBoolean) (Tcl_Interp * interp, CONST char * expr, int * ptr); /* 135 */ + int (*tcl_ExposeCommand) (Tcl_Interp * interp, const char * hiddenCmdToken, const char * cmdName); /* 134 */ + int (*tcl_ExprBoolean) (Tcl_Interp * interp, const char * expr, int * ptr); /* 135 */ int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ - int (*tcl_ExprDouble) (Tcl_Interp * interp, CONST char * expr, double * ptr); /* 137 */ + int (*tcl_ExprDouble) (Tcl_Interp * interp, const char * expr, double * ptr); /* 137 */ int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ - int (*tcl_ExprLong) (Tcl_Interp * interp, CONST char * expr, long * ptr); /* 139 */ + int (*tcl_ExprLong) (Tcl_Interp * interp, const char * expr, long * ptr); /* 139 */ int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ - int (*tcl_ExprString) (Tcl_Interp * interp, CONST char * expr); /* 142 */ + int (*tcl_ExprString) (Tcl_Interp * interp, const char * expr); /* 142 */ void (*tcl_Finalize) (void); /* 143 */ - void (*tcl_FindExecutable) (CONST char * argv0); /* 144 */ + void (*tcl_FindExecutable) (const char * argv0); /* 144 */ Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ - int (*tcl_GetAlias) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ - int (*tcl_GetAliasObj) (Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ - ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ - Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, CONST char * chanName, int * modePtr); /* 151 */ + int (*tcl_GetAlias) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ + int (*tcl_GetAliasObj) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ + ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ + Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, const char * chanName, int * modePtr); /* 151 */ int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ - int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, Tcl_DString * dsPtr); /* 157 */ + int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, Tcl_DString * dsPtr); /* 157 */ CONST86 Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ - int (*tcl_GetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ + int (*tcl_GetCommandInfo) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ int (*tcl_GetErrno) (void); /* 161 */ CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ - CONST char * (*tcl_GetNameOfExecutable) (void); /* 165 */ + const char * (*tcl_GetNameOfExecutable) (void); /* 165 */ Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ void *reserved167; #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ #endif /* MACOSX */ - Tcl_PathType (*tcl_GetPathType) (CONST char * path); /* 168 */ + Tcl_PathType (*tcl_GetPathType) (const char * path); /* 168 */ int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ int (*tcl_GetServiceMode) (void); /* 171 */ - Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, CONST char * slaveName); /* 172 */ + Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, const char * slaveName); /* 172 */ Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ - CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 175 */ - CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 176 */ - int (*tcl_GlobalEval) (Tcl_Interp * interp, CONST char * command); /* 177 */ + CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 175 */ + CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 176 */ + int (*tcl_GlobalEval) (Tcl_Interp * interp, const char * command); /* 177 */ int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ - int (*tcl_HideCommand) (Tcl_Interp * interp, CONST char * cmdName, CONST char * hiddenCmdToken); /* 179 */ + int (*tcl_HideCommand) (Tcl_Interp * interp, const char * cmdName, const char * hiddenCmdToken); /* 179 */ int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ - char * (*tcl_JoinPath) (int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr); /* 186 */ - int (*tcl_LinkVar) (Tcl_Interp * interp, CONST char * varName, char * addr, int type); /* 187 */ + char * (*tcl_JoinPath) (int argc, CONST84 char * const * argv, Tcl_DString * resultPtr); /* 186 */ + int (*tcl_LinkVar) (Tcl_Interp * interp, const char * varName, char * addr, int type); /* 187 */ void *reserved188; Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ - char * (*tcl_Merge) (int argc, CONST84 char * CONST * argv); /* 192 */ + char * (*tcl_Merge) (int argc, CONST84 char * const * argv); /* 192 */ Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ @@ -3906,12 +3906,12 @@ typedef struct TclStubs { #ifdef MAC_OSX_TCL /* MACOSX */ Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ #endif /* MACOSX */ - Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions); /* 198 */ - Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async); /* 199 */ - Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ + Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */ + Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */ + Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ void (*tcl_Preserve) (ClientData data); /* 201 */ void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ - int (*tcl_PutEnv) (CONST char * assignment); /* 203 */ + int (*tcl_PutEnv) (const char * assignment); /* 203 */ CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ @@ -3924,28 +3924,28 @@ typedef struct TclStubs { #ifdef MAC_OSX_TCL /* MACOSX */ void (*tcl_ReapDetachedProcs) (void); /* 207 */ #endif /* MACOSX */ - int (*tcl_RecordAndEval) (Tcl_Interp * interp, CONST char * cmd, int flags); /* 208 */ + int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */ int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (CONST Tcl_ObjType * typePtr); /* 211 */ - Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, CONST char * pattern); /* 212 */ - int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start); /* 213 */ - int (*tcl_RegExpMatch) (Tcl_Interp * interp, CONST char * text, CONST char * pattern); /* 214 */ + void (*tcl_RegisterObjType) (const Tcl_ObjType * typePtr); /* 211 */ + Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, const char * pattern); /* 212 */ + int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, const char * text, const char * start); /* 213 */ + int (*tcl_RegExpMatch) (Tcl_Interp * interp, const char * text, const char * pattern); /* 214 */ void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ void (*tcl_Release) (ClientData clientData); /* 216 */ void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ - int (*tcl_ScanElement) (CONST char * str, int * flagPtr); /* 218 */ - int (*tcl_ScanCountedElement) (CONST char * str, int length, int * flagPtr); /* 219 */ + int (*tcl_ScanElement) (const char * str, int * flagPtr); /* 218 */ + int (*tcl_ScanCountedElement) (const char * str, int length, int * flagPtr); /* 219 */ int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ int (*tcl_ServiceAll) (void); /* 221 */ int (*tcl_ServiceEvent) (int flags); /* 222 */ - void (*tcl_SetAssocData) (Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ + void (*tcl_SetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ - int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, CONST char * optionName, CONST char * newValue); /* 225 */ - int (*tcl_SetCommandInfo) (Tcl_Interp * interp, CONST char * cmdName, CONST Tcl_CmdInfo * infoPtr); /* 226 */ + int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, const char * newValue); /* 225 */ + int (*tcl_SetCommandInfo) (Tcl_Interp * interp, const char * cmdName, const Tcl_CmdInfo * infoPtr); /* 226 */ void (*tcl_SetErrno) (int err); /* 227 */ void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (CONST Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetMaxBlockTime) (const Tcl_Time * timePtr); /* 229 */ void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ @@ -3953,112 +3953,112 @@ typedef struct TclStubs { void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ - CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, CONST char * varName, CONST char * newValue, int flags); /* 237 */ - CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * newValue, int flags); /* 238 */ + CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, const char * varName, const char * newValue, int flags); /* 237 */ + CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, const char * newValue, int flags); /* 238 */ CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ - int (*tcl_SplitList) (Tcl_Interp * interp, CONST char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ - void (*tcl_SplitPath) (CONST char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ - void (*tcl_StaticPackage) (Tcl_Interp * interp, CONST char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ - int (*tcl_StringMatch) (CONST char * str, CONST char * pattern); /* 245 */ + int (*tcl_SplitList) (Tcl_Interp * interp, const char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ + void (*tcl_SplitPath) (const char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ + void (*tcl_StaticPackage) (Tcl_Interp * interp, const char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ + int (*tcl_StringMatch) (const char * str, const char * pattern); /* 245 */ int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ - int (*tcl_TraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ - int (*tcl_TraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ - char * (*tcl_TranslateFileName) (Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr); /* 249 */ - int (*tcl_Ungets) (Tcl_Channel chan, CONST char * str, int len, int atHead); /* 250 */ - void (*tcl_UnlinkVar) (Tcl_Interp * interp, CONST char * varName); /* 251 */ + int (*tcl_TraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ + int (*tcl_TraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ + char * (*tcl_TranslateFileName) (Tcl_Interp * interp, const char * name, Tcl_DString * bufferPtr); /* 249 */ + int (*tcl_Ungets) (Tcl_Channel chan, const char * str, int len, int atHead); /* 250 */ + void (*tcl_UnlinkVar) (Tcl_Interp * interp, const char * varName); /* 251 */ int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ - int (*tcl_UnsetVar) (Tcl_Interp * interp, CONST char * varName, int flags); /* 253 */ - int (*tcl_UnsetVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 254 */ - void (*tcl_UntraceVar) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ - void (*tcl_UntraceVar2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ - void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, CONST char * varName); /* 257 */ - int (*tcl_UpVar) (Tcl_Interp * interp, CONST char * frameName, CONST char * varName, CONST char * localName, int flags); /* 258 */ - int (*tcl_UpVar2) (Tcl_Interp * interp, CONST char * frameName, CONST char * part1, CONST char * part2, CONST char * localName, int flags); /* 259 */ + int (*tcl_UnsetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 253 */ + int (*tcl_UnsetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 254 */ + void (*tcl_UntraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ + void (*tcl_UntraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ + void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, const char * varName); /* 257 */ + int (*tcl_UpVar) (Tcl_Interp * interp, const char * frameName, const char * varName, const char * localName, int flags); /* 258 */ + int (*tcl_UpVar2) (Tcl_Interp * interp, const char * frameName, const char * part1, const char * part2, const char * localName, int flags); /* 259 */ int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ - ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ - ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ - int (*tcl_Write) (Tcl_Channel chan, CONST char * s, int slen); /* 263 */ - void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message); /* 264 */ - int (*tcl_DumpActiveMemory) (CONST char * fileName); /* 265 */ - void (*tcl_ValidateAllMemory) (CONST char * file, int line); /* 266 */ + ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ + ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ + int (*tcl_Write) (Tcl_Channel chan, const char * s, int slen); /* 263 */ + void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], const char * message); /* 264 */ + int (*tcl_DumpActiveMemory) (const char * fileName); /* 265 */ + void (*tcl_ValidateAllMemory) (const char * file, int line); /* 266 */ void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ CONST84_RETURN char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ - CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, CONST char * start, CONST84 char ** termPtr); /* 270 */ - CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 271 */ - CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr); /* 272 */ - int (*tcl_PkgProvide) (Tcl_Interp * interp, CONST char * name, CONST char * version); /* 273 */ - CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, CONST char * name, CONST char * version, int exact); /* 274 */ + CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, const char * start, CONST84 char ** termPtr); /* 270 */ + CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 271 */ + CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 272 */ + int (*tcl_PkgProvide) (Tcl_Interp * interp, const char * name, const char * version); /* 273 */ + CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 274 */ void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ - void (*tcl_PanicVA) (CONST char * format, va_list argList); /* 278 */ + void (*tcl_PanicVA) (const char * format, va_list argList); /* 278 */ void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ - Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, CONST Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, const Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ void *reserved285; void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ - Tcl_Encoding (*tcl_CreateEncoding) (CONST Tcl_EncodingType * typePtr); /* 287 */ + Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ - int (*tcl_EvalEx) (Tcl_Interp * interp, CONST char * script, int numBytes, int flags); /* 291 */ - int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 292 */ + int (*tcl_EvalEx) (Tcl_Interp * interp, const char * script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ void (*tcl_ExitThread) (int status); /* 294 */ - int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ - char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ + int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ + char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ void (*tcl_FinalizeThread) (void); /* 297 */ void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ - Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, CONST char * name); /* 301 */ + Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, const char * name); /* 301 */ CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ - int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST VOID * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr); /* 304 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const VOID * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ - Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags); /* 306 */ + Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 306 */ ClientData (*tcl_InitNotifier) (void); /* 307 */ void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, CONST Tcl_Time * timePtr); /* 311 */ - int (*tcl_NumUtfChars) (CONST char * src, int length); /* 312 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, const Tcl_Time * timePtr); /* 311 */ + int (*tcl_NumUtfChars) (const char * src, int length); /* 312 */ int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ - int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, CONST char * name); /* 316 */ - Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ + int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, const char * name); /* 316 */ + Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); /* 319 */ - Tcl_UniChar (*tcl_UniCharAtIndex) (CONST char * src, int index); /* 320 */ + Tcl_UniChar (*tcl_UniCharAtIndex) (const char * src, int index); /* 320 */ Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ - CONST84_RETURN char * (*tcl_UtfAtIndex) (CONST char * src, int index); /* 325 */ - int (*tcl_UtfCharComplete) (CONST char * src, int length); /* 326 */ - int (*tcl_UtfBackslash) (CONST char * src, int * readPtr, char * dst); /* 327 */ - CONST84_RETURN char * (*tcl_UtfFindFirst) (CONST char * src, int ch); /* 328 */ - CONST84_RETURN char * (*tcl_UtfFindLast) (CONST char * src, int ch); /* 329 */ - CONST84_RETURN char * (*tcl_UtfNext) (CONST char * src); /* 330 */ - CONST84_RETURN char * (*tcl_UtfPrev) (CONST char * src, CONST char * start); /* 331 */ - int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ - char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ + CONST84_RETURN char * (*tcl_UtfAtIndex) (const char * src, int index); /* 325 */ + int (*tcl_UtfCharComplete) (const char * src, int length); /* 326 */ + int (*tcl_UtfBackslash) (const char * src, int * readPtr, char * dst); /* 327 */ + CONST84_RETURN char * (*tcl_UtfFindFirst) (const char * src, int ch); /* 328 */ + CONST84_RETURN char * (*tcl_UtfFindLast) (const char * src, int ch); /* 329 */ + CONST84_RETURN char * (*tcl_UtfNext) (const char * src); /* 330 */ + CONST84_RETURN char * (*tcl_UtfPrev) (const char * src, const char * start); /* 331 */ + int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ + char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ int (*tcl_UtfToLower) (char * src); /* 334 */ int (*tcl_UtfToTitle) (char * src); /* 335 */ - int (*tcl_UtfToUniChar) (CONST char * src, Tcl_UniChar * chPtr); /* 336 */ + int (*tcl_UtfToUniChar) (const char * src, Tcl_UniChar * chPtr); /* 336 */ int (*tcl_UtfToUpper) (char * src); /* 337 */ - int (*tcl_WriteChars) (Tcl_Channel chan, CONST char * src, int srcLen); /* 338 */ + int (*tcl_WriteChars) (Tcl_Channel chan, const char * src, int srcLen); /* 338 */ int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ - void (*tcl_SetDefaultEncodingDir) (CONST char * path); /* 342 */ + void (*tcl_SetDefaultEncodingDir) (const char * path); /* 342 */ void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ void (*tcl_ServiceModeHook) (int mode); /* 344 */ int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ @@ -4068,91 +4068,91 @@ typedef struct TclStubs { int (*tcl_UniCharIsSpace) (int ch); /* 349 */ int (*tcl_UniCharIsUpper) (int ch); /* 350 */ int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ - int (*tcl_UniCharLen) (CONST Tcl_UniChar * uniStr); /* 352 */ - int (*tcl_UniCharNcmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 353 */ - char * (*tcl_UniCharToUtfDString) (CONST Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ - Tcl_UniChar * (*tcl_UtfToUniCharDString) (CONST char * src, int length, Tcl_DString * dsPtr); /* 355 */ + int (*tcl_UniCharLen) (const Tcl_UniChar * uniStr); /* 352 */ + int (*tcl_UniCharNcmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 353 */ + char * (*tcl_UniCharToUtfDString) (const Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) (const char * src, int length, Tcl_DString * dsPtr); /* 355 */ Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ - void (*tcl_LogCommandInfo) (Tcl_Interp * interp, CONST char * script, CONST char * command, int length); /* 359 */ - int (*tcl_ParseBraces) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ - int (*tcl_ParseCommand) (Tcl_Interp * interp, CONST char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ - int (*tcl_ParseExpr) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ - int (*tcl_ParseQuotedString) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ - int (*tcl_ParseVarName) (Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ + void (*tcl_LogCommandInfo) (Tcl_Interp * interp, const char * script, const char * command, int length); /* 359 */ + int (*tcl_ParseBraces) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ + int (*tcl_ParseCommand) (Tcl_Interp * interp, const char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ + int (*tcl_ParseExpr) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ + int (*tcl_ParseQuotedString) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ + int (*tcl_ParseVarName) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ - int (*tcl_Chdir) (CONST char * dirName); /* 366 */ - int (*tcl_Access) (CONST char * path, int mode); /* 367 */ - int (*tcl_Stat) (CONST char * path, struct stat * bufPtr); /* 368 */ - int (*tcl_UtfNcmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 369 */ - int (*tcl_UtfNcasecmp) (CONST char * s1, CONST char * s2, unsigned long n); /* 370 */ - int (*tcl_StringCaseMatch) (CONST char * str, CONST char * pattern, int nocase); /* 371 */ + int (*tcl_Chdir) (const char * dirName); /* 366 */ + int (*tcl_Access) (const char * path, int mode); /* 367 */ + int (*tcl_Stat) (const char * path, struct stat * bufPtr); /* 368 */ + int (*tcl_UtfNcmp) (const char * s1, const char * s2, unsigned long n); /* 369 */ + int (*tcl_UtfNcasecmp) (const char * s1, const char * s2, unsigned long n); /* 370 */ + int (*tcl_StringCaseMatch) (const char * str, const char * pattern, int nocase); /* 371 */ int (*tcl_UniCharIsControl) (int ch); /* 372 */ int (*tcl_UniCharIsGraph) (int ch); /* 373 */ int (*tcl_UniCharIsPrint) (int ch); /* 374 */ int (*tcl_UniCharIsPunct) (int ch); /* 375 */ int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ - Tcl_Obj * (*tcl_NewUnicodeObj) (CONST Tcl_UniChar * unicode, int numChars); /* 378 */ - void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars); /* 379 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar * unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int numChars); /* 379 */ int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ - void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length); /* 384 */ + void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int length); /* 384 */ int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ - int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, CONST char * pattern); /* 389 */ - int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 390 */ + int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, const char * pattern); /* 389 */ + int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 390 */ void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ - int (*tcl_WriteRaw) (Tcl_Channel chan, CONST char * src, int srcLen); /* 395 */ + int (*tcl_WriteRaw) (Tcl_Channel chan, const char * src, int srcLen); /* 395 */ Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ - CONST84_RETURN char * (*tcl_ChannelName) (CONST Tcl_ChannelType * chanTypePtr); /* 398 */ - Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (CONST Tcl_ChannelType * chanTypePtr); /* 399 */ - Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (CONST Tcl_ChannelType * chanTypePtr); /* 400 */ - Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (CONST Tcl_ChannelType * chanTypePtr); /* 401 */ - Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (CONST Tcl_ChannelType * chanTypePtr); /* 402 */ - Tcl_DriverInputProc * (*tcl_ChannelInputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 403 */ - Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (CONST Tcl_ChannelType * chanTypePtr); /* 404 */ - Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 405 */ - Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 406 */ - Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 407 */ - Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (CONST Tcl_ChannelType * chanTypePtr); /* 408 */ - Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (CONST Tcl_ChannelType * chanTypePtr); /* 409 */ - Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (CONST Tcl_ChannelType * chanTypePtr); /* 410 */ - Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (CONST Tcl_ChannelType * chanTypePtr); /* 411 */ + CONST84_RETURN char * (*tcl_ChannelName) (const Tcl_ChannelType * chanTypePtr); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType * chanTypePtr); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType * chanTypePtr); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (const Tcl_ChannelType * chanTypePtr); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType * chanTypePtr); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType * chanTypePtr); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType * chanTypePtr); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType * chanTypePtr); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType * chanTypePtr); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType * chanTypePtr); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType * chanTypePtr); /* 411 */ int (*tcl_JoinThread) (Tcl_ThreadId threadId, int* result); /* 412 */ int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ int (*tcl_IsChannelRegistered) (Tcl_Interp* interp, Tcl_Channel channel); /* 414 */ void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ - int (*tcl_IsChannelExisting) (CONST char* channelName); /* 418 */ - int (*tcl_UniCharNcasecmp) (CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars); /* 419 */ - int (*tcl_UniCharCaseMatch) (CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase); /* 420 */ - Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, CONST char * key); /* 421 */ - Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, CONST char * key, int * newPtr); /* 422 */ - void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, CONST Tcl_HashKeyType * typePtr); /* 423 */ + int (*tcl_IsChannelExisting) (const char* channelName); /* 418 */ + int (*tcl_UniCharNcasecmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 419 */ + int (*tcl_UniCharCaseMatch) (const Tcl_UniChar * uniStr, const Tcl_UniChar * uniPattern, int nocase); /* 420 */ + Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, const char * key); /* 421 */ + Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, const char * key, int * newPtr); /* 422 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, const Tcl_HashKeyType * typePtr); /* 423 */ void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ - ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ - int (*tcl_TraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ - void (*tcl_UntraceCommand) (Tcl_Interp * interp, CONST char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ + ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ + int (*tcl_TraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ + void (*tcl_UntraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ - char * (*tcl_AttemptDbCkalloc) (unsigned int size, CONST char * file, int line); /* 429 */ + char * (*tcl_AttemptDbCkalloc) (unsigned int size, const char * file, int line); /* 429 */ char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ - char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, CONST char * file, int line); /* 431 */ + char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 431 */ int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ - int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, CONST char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ - Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, CONST char * pattern); /* 436 */ + int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, const char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ + Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, const char * pattern); /* 436 */ Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ int (*tcl_DetachChannel) (Tcl_Interp* interp, Tcl_Channel channel); /* 438 */ int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ @@ -4160,8 +4160,8 @@ typedef struct TclStubs { int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ - int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * sym1, CONST char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ - int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, CONST char * pattern, Tcl_GlobTypeData * types); /* 445 */ + int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * sym1, const char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ + int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, const char * pattern, Tcl_GlobTypeData * types); /* 445 */ Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ @@ -4169,10 +4169,10 @@ typedef struct TclStubs { int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ - CONST char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ + const char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ - Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions); /* 456 */ + Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * modeString, int permissions); /* 456 */ Tcl_Obj* (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ @@ -4180,36 +4180,36 @@ typedef struct TclStubs { Tcl_Obj* (*tcl_FSSplitPath) (Tcl_Obj* pathPtr, int * lenPtr); /* 461 */ int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ - Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *CONST objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, CONST Tcl_Filesystem * fsPtr); /* 465 */ + Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj* (*tcl_FSNewNativePath) (CONST Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ - CONST char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ + Tcl_Obj* (*tcl_FSNewNativePath) (const Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ + const char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, CONST Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (CONST Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (CONST Tcl_Filesystem * fsPtr); /* 475 */ - CONST char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ + int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (const Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (const Tcl_Filesystem * fsPtr); /* 475 */ + const char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ CONST86 Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (CONST Tcl_Filesystem * fsPtr); /* 480 */ + void (*tcl_FSMountsChanged) (const Tcl_Filesystem * fsPtr); /* 480 */ int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo* infoPtr); /* 484 */ - int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, CONST Tcl_CmdInfo* infoPtr); /* 485 */ - Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, CONST char * file, int line); /* 486 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo* infoPtr); /* 485 */ + Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char * file, int line); /* 486 */ int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ - Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (CONST Tcl_ChannelType * chanTypePtr); /* 493 */ + Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 493 */ int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ @@ -4217,24 +4217,24 @@ typedef struct TclStubs { int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ - int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv, Tcl_Obj * valuePtr); /* 501 */ - int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *CONST * keyv); /* 502 */ + int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); /* 501 */ + int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv); /* 502 */ Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ - Tcl_Obj * (*tcl_DbNewDictObj) (CONST char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp* interp, CONST char* pkgName, CONST Tcl_Config* configuration, CONST char* valEncoding); /* 505 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ + Tcl_Obj * (*tcl_DbNewDictObj) (const char * file, int line); /* 504 */ + void (*tcl_RegisterConfig) (Tcl_Interp* interp, const char* pkgName, const Tcl_Config* configuration, const char* valEncoding); /* 505 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 509 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 510 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 511 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 509 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 510 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 511 */ Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ - int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, CONST char * encodingName); /* 518 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, const char * encodingName); /* 518 */ Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ @@ -4257,7 +4257,7 @@ typedef struct TclStubs { int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ - Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ + Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, const char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ @@ -4270,14 +4270,14 @@ typedef struct TclStubs { int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ void (*tcl_SetTimeProc) (Tcl_GetTimeProc* getProc, Tcl_ScaleTimeProc* scaleProc, ClientData clientData); /* 552 */ void (*tcl_QueryTimeProc) (Tcl_GetTimeProc** getProc, Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); /* 553 */ - Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (CONST Tcl_ChannelType * chanTypePtr); /* 554 */ + Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType * chanTypePtr); /* 554 */ Tcl_Obj* (*tcl_NewBignumObj) (mp_int* value); /* 555 */ - Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, CONST char* file, int line); /* 556 */ + Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, const char* file, int line); /* 556 */ void (*tcl_SetBignumObj) (Tcl_Obj* obj, mp_int* value); /* 557 */ int (*tcl_GetBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 558 */ int (*tcl_TakeBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 559 */ int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ - Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (CONST Tcl_ChannelType * chanTypePtr); /* 561 */ + Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType * chanTypePtr); /* 561 */ void (*tcl_SetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj* msg); /* 562 */ void (*tcl_GetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj** msg); /* 563 */ void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj* msg); /* 564 */ @@ -4288,23 +4288,23 @@ typedef struct TclStubs { int (*tcl_GetEncodingFromObj) (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); /* 569 */ Tcl_Obj* (*tcl_GetEncodingSearchPath) (void); /* 570 */ int (*tcl_SetEncodingSearchPath) (Tcl_Obj* searchPath); /* 571 */ - CONST char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ - int (*tcl_PkgRequireProc) (Tcl_Interp * interp, CONST char * name, int objc, Tcl_Obj *CONST objv[], ClientData * clientDataPtr); /* 573 */ + const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ + int (*tcl_PkgRequireProc) (Tcl_Interp * interp, const char * name, int objc, Tcl_Obj *const objv[], ClientData * clientDataPtr); /* 573 */ void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ - void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, CONST char * bytes, int length, int limit, CONST char * ellipsis); /* 575 */ - Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 576 */ - int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char * format, int objc, Tcl_Obj * CONST objv[]); /* 577 */ - Tcl_Obj * (*tcl_ObjPrintf) (CONST char * format, ...); /* 578 */ - void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, CONST char * format, ...); /* 579 */ + void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, const char * bytes, int length, int limit, const char * ellipsis); /* 575 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj * const objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj * const objv[]); /* 577 */ + Tcl_Obj * (*tcl_ObjPrintf) (const char * format, ...); /* 578 */ + void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, const char * format, ...); /* 579 */ int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 582 */ - Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 584 */ - int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 585 */ - int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *CONST objv[], int flags); /* 586 */ + int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 585 */ + int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); /* 586 */ void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *CONST objv[]); /* 588 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 588 */ unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statPtr); /* 589 */ unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statPtr); /* 590 */ unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statPtr); /* 591 */ @@ -4324,7 +4324,7 @@ typedef struct TclStubs { } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclStubs *tclStubsPtr; +extern const TclStubs *tclStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index a1b43cb..7378e49 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.62 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.63 2008/10/22 20:23:59 nijtmans Exp $ */ #include "tclInt.h" @@ -1670,7 +1670,7 @@ LoadTableEncoding( * sequences in the encoding files. */ - static char staticHex[] = { + static const char staticHex[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 ... 15 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16 ... 31 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 32 ... 47 */ diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 3dfdfb7..221fb34 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.128 2008/10/05 20:47:52 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.129 2008/10/22 20:23:59 nijtmans Exp $ library tcl @@ -28,7 +28,7 @@ interface tclInt # Replaced by Tcl_FSAccess in 8.4: #declare 0 generic { -# int TclAccess(CONST char *path, int mode) +# int TclAccess(const char *path, int mode) #} #declare 1 generic { # int TclAccessDeleteProc(TclAccessProc_ *proc) @@ -51,7 +51,7 @@ declare 6 generic { void TclCleanupCommand(Command *cmdPtr) } declare 7 generic { - int TclCopyAndCollapse(int count, CONST char *src, char *dst) + int TclCopyAndCollapse(int count, const char *src, char *dst) } declare 8 generic { int TclCopyChannel(Tcl_Interp *interp, Tcl_Channel inChan, @@ -61,13 +61,13 @@ declare 8 generic { # TclCreatePipeline unofficially exported for use by BLT. declare 9 {unix win} { - int TclCreatePipeline(Tcl_Interp *interp, int argc, CONST char **argv, + int TclCreatePipeline(Tcl_Interp *interp, int argc, const char **argv, Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr, TclFile *errFilePtr) } declare 10 generic { int TclCreateProc(Tcl_Interp *interp, Namespace *nsPtr, - CONST char *procName, + const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Proc **procPtrPtr) } declare 11 generic { @@ -93,7 +93,7 @@ declare 16 generic { } # Removed in 8.4 #declare 17 generic { -# int TclFileAttrsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) +# int TclFileAttrsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) #} #declare 18 generic { # int TclFileCopyCmd(Tcl_Interp *interp, int argc, char **argv) @@ -108,12 +108,12 @@ declare 16 generic { # int TclFileRenameCmd(Tcl_Interp *interp, int argc, char **argv) #} declare 22 generic { - int TclFindElement(Tcl_Interp *interp, CONST char *listStr, - int listLength, CONST char **elementPtr, CONST char **nextPtr, + int TclFindElement(Tcl_Interp *interp, const char *listStr, + int listLength, const char **elementPtr, const char **nextPtr, int *sizePtr, int *bracePtr) } declare 23 generic { - Proc *TclFindProc(Interp *iPtr, CONST char *procName) + Proc *TclFindProc(Interp *iPtr, const char *procName) } # Replaced with macro (see tclInt.h) in Tcl 8.5 #declare 24 generic { @@ -139,15 +139,15 @@ declare 28 generic { # Tcl_Obj *TclGetElementOfIndexedArray(Tcl_Interp *interp, # int localIndex, Tcl_Obj *elemPtr, int flags) #} -# Replaced by char *TclGetEnv(CONST char *name, Tcl_DString *valuePtr) in 8.1: +# Replaced by char *TclGetEnv(const char *name, Tcl_DString *valuePtr) in 8.1: # declare 30 generic { -# char *TclGetEnv(CONST char *name) +# char *TclGetEnv(const char *name) # } declare 31 generic { - CONST char *TclGetExtension(CONST char *name) + const char *TclGetExtension(const char *name) } declare 32 generic { - int TclGetFrame(Tcl_Interp *interp, CONST char *str, + int TclGetFrame(Tcl_Interp *interp, const char *str, CallFrame **framePtrPtr) } # Removed in Tcl 8.5 @@ -165,28 +165,28 @@ declare 34 generic { #} # Removed in 8.6a2 #declare 36 generic { -# int TclGetLong(Tcl_Interp *interp, CONST char *str, long *longPtr) +# int TclGetLong(Tcl_Interp *interp, const char *str, long *longPtr) #} declare 37 generic { int TclGetLoadedPackages(Tcl_Interp *interp, char *targetName) } declare 38 generic { - int TclGetNamespaceForQualName(Tcl_Interp *interp, CONST char *qualName, + int TclGetNamespaceForQualName(Tcl_Interp *interp, const char *qualName, Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr, Namespace **altNsPtrPtr, Namespace **actualCxtPtrPtr, - CONST char **simpleNamePtr) + const char **simpleNamePtr) } declare 39 generic { TclObjCmdProcType TclGetObjInterpProc(void) } declare 40 generic { - int TclGetOpenMode(Tcl_Interp *interp, CONST char *str, int *seekFlagPtr) + int TclGetOpenMode(Tcl_Interp *interp, const char *str, int *seekFlagPtr) } declare 41 generic { Tcl_Command TclGetOriginalCommand(Tcl_Command command) } declare 42 generic { - char *TclpGetUserHome(CONST char *name, Tcl_DString *bufferPtr) + char *TclpGetUserHome(const char *name, Tcl_DString *bufferPtr) } # Removed in Tcl 8.5a2 #declare 43 generic { @@ -194,7 +194,7 @@ declare 42 generic { # int flags) #} declare 44 generic { - int TclGuessPackageName(CONST char *fileName, Tcl_DString *bufPtr) + int TclGuessPackageName(const char *fileName, Tcl_DString *bufPtr) } declare 45 generic { int TclHideUnsafeCommands(Tcl_Interp *interp) @@ -234,7 +234,7 @@ declare 53 generic { } declare 54 generic { int TclInvokeStringCommand(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]) + int objc, Tcl_Obj *const objv[]) } declare 55 generic { Proc *TclIsProc(Command *cmdPtr) @@ -250,8 +250,8 @@ declare 55 generic { # int TclLooksLikeInt(char *p) # } declare 58 generic { - Var *TclLookupVar(Tcl_Interp *interp, CONST char *part1, CONST char *part2, - int flags, CONST char *msg, int createPart1, int createPart2, + Var *TclLookupVar(Tcl_Interp *interp, const char *part1, const char *part2, + int flags, const char *msg, int createPart1, int createPart2, Var **arrayPtrPtr) } # Replaced by Tcl_FSMatchInDirectory in 8.4 @@ -260,7 +260,7 @@ declare 58 generic { # Tcl_DString *dirPtr, char *pattern, char *tail) #} declare 60 generic { - int TclNeedSpace(CONST char *start, CONST char *end) + int TclNeedSpace(const char *start, const char *end) } declare 61 generic { Tcl_Obj *TclNewProcBodyObj(Proc *procPtr) @@ -270,16 +270,16 @@ declare 62 generic { } declare 63 generic { int TclObjInterpProc(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]) + int objc, Tcl_Obj *const objv[]) } declare 64 generic { - int TclObjInvoke(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], + int TclObjInvoke(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags) } # Removed in Tcl 8.5a2 #declare 65 generic { # int TclObjInvokeGlobal(Tcl_Interp *interp, int objc, -# Tcl_Obj *CONST objv[], int flags) +# Tcl_Obj *const objv[], int flags) #} #declare 66 generic { # int TclOpenFileChannelDeleteProc(TclOpenFileChannelProc_ *proc) @@ -289,23 +289,23 @@ declare 64 generic { #} # Replaced by Tcl_FSAccess in 8.4: #declare 68 generic { -# int TclpAccess(CONST char *path, int mode) +# int TclpAccess(const char *path, int mode) #} declare 69 generic { char *TclpAlloc(unsigned int size) } #declare 70 generic { -# int TclpCopyFile(CONST char *source, CONST char *dest) +# int TclpCopyFile(const char *source, const char *dest) #} #declare 71 generic { -# int TclpCopyDirectory(CONST char *source, CONST char *dest, +# int TclpCopyDirectory(const char *source, const char *dest, # Tcl_DString *errorPtr) #} #declare 72 generic { -# int TclpCreateDirectory(CONST char *path) +# int TclpCreateDirectory(const char *path) #} #declare 73 generic { -# int TclpDeleteFile(CONST char *path) +# int TclpDeleteFile(const char *path) #} declare 74 generic { void TclpFree(char *ptr) @@ -337,11 +337,11 @@ declare 81 generic { char *TclpRealloc(char *ptr, unsigned int size) } #declare 82 generic { -# int TclpRemoveDirectory(CONST char *path, int recursive, +# int TclpRemoveDirectory(const char *path, int recursive, # Tcl_DString *errorPtr) #} #declare 83 generic { -# int TclpRenameFile(CONST char *source, CONST char *dest) +# int TclpRenameFile(const char *source, const char *dest) #} # Removed in 8.1: # declare 84 generic { @@ -361,7 +361,7 @@ declare 81 generic { # } declare 88 generic { char *TclPrecTraceProc(ClientData clientData, Tcl_Interp *interp, - CONST char *name1, CONST char *name2, int flags) + const char *name1, const char *name2, int flags) } declare 89 generic { int TclPreventAliasLoop(Tcl_Interp *interp, Tcl_Interp *cmdInterp, @@ -376,8 +376,8 @@ declare 91 generic { } declare 92 generic { int TclProcCompileProc(Tcl_Interp *interp, Proc *procPtr, - Tcl_Obj *bodyPtr, Namespace *nsPtr, CONST char *description, - CONST char *procName) + Tcl_Obj *bodyPtr, Namespace *nsPtr, const char *description, + const char *procName) } declare 93 generic { void TclProcDeleteProc(ClientData clientData) @@ -389,11 +389,11 @@ declare 93 generic { #} # Replaced by Tcl_FSStat in 8.4: #declare 95 generic { -# int TclpStat(CONST char *path, Tcl_StatBuf *buf) +# int TclpStat(const char *path, Tcl_StatBuf *buf) #} declare 96 generic { - int TclRenameCommand(Tcl_Interp *interp, CONST char *oldName, - CONST char *newName) + int TclRenameCommand(Tcl_Interp *interp, const char *oldName, + const char *newName) } declare 97 generic { void TclResetShadowedCmdRefs(Tcl_Interp *interp, Command *newCmdPtr) @@ -418,7 +418,7 @@ declare 102 generic { void TclSetupEnv(Tcl_Interp *interp) } declare 103 generic { - int TclSockGetPort(Tcl_Interp *interp, CONST char *str, CONST char *proto, + int TclSockGetPort(Tcl_Interp *interp, const char *str, const char *proto, int *portPtr) } declare 104 {unix win} { @@ -426,7 +426,7 @@ declare 104 {unix win} { } # Replaced by Tcl_FSStat in 8.4: #declare 105 generic { -# int TclStat(CONST char *path, Tcl_StatBuf *buf) +# int TclStat(const char *path, Tcl_StatBuf *buf) #} #declare 106 generic { # int TclStatDeleteProc(TclStatProc_ *proc) @@ -449,7 +449,7 @@ declare 109 generic { # defined here instead of in tcl.decls since they are not stable yet. declare 111 generic { - void Tcl_AddInterpResolvers(Tcl_Interp *interp, CONST char *name, + void Tcl_AddInterpResolvers(Tcl_Interp *interp, const char *name, Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, Tcl_ResolveCompiledVarProc *compiledVarProc) } @@ -458,7 +458,7 @@ declare 112 generic { Tcl_Obj *objPtr) } declare 113 generic { - Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, const char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc) } declare 114 generic { @@ -466,18 +466,18 @@ declare 114 generic { } declare 115 generic { int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, - CONST char *pattern, int resetListFirst) + const char *pattern, int resetListFirst) } declare 116 generic { - Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, CONST char *name, + Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags) } declare 117 generic { - Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags) } declare 118 generic { - int Tcl_GetInterpResolvers(Tcl_Interp *interp, CONST char *name, + int Tcl_GetInterpResolvers(Tcl_Interp *interp, const char *name, Tcl_ResolverInfo *resInfo) } declare 119 generic { @@ -485,12 +485,12 @@ declare 119 generic { Tcl_ResolverInfo *resInfo) } declare 120 generic { - Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp, CONST char *name, + Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags) } declare 121 generic { int Tcl_ForgetImport(Tcl_Interp *interp, Tcl_Namespace *nsPtr, - CONST char *pattern) + const char *pattern) } declare 122 generic { Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr) @@ -511,7 +511,7 @@ declare 126 generic { } declare 127 generic { int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr, - CONST char *pattern, int allowOverwrite) + const char *pattern, int allowOverwrite) } declare 128 generic { void Tcl_PopCallFrame(Tcl_Interp *interp) @@ -521,7 +521,7 @@ declare 129 generic { Tcl_Namespace *nsPtr, int isProcCallFrame) } declare 130 generic { - int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, CONST char *name) + int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, const char *name) } declare 131 generic { void Tcl_SetNamespaceResolvers(Tcl_Namespace *namespacePtr, @@ -532,12 +532,12 @@ declare 132 generic { int TclpHasSockets(Tcl_Interp *interp) } declare 133 generic { - struct tm *TclpGetDate(CONST time_t *time, int useGMT) + struct tm *TclpGetDate(const time_t *time, int useGMT) } # Removed in 8.5 #declare 134 generic { -# size_t TclpStrftime(char *s, size_t maxsize, CONST char *format, -# CONST struct tm *t, int useGMT) +# size_t TclpStrftime(char *s, size_t maxsize, const char *format, +# const struct tm *t, int useGMT) #} #declare 135 generic { # int TclpCheckStackSpace(void) @@ -546,10 +546,10 @@ declare 133 generic { # Added in 8.1: #declare 137 generic { -# int TclpChdir(CONST char *dirName) +# int TclpChdir(const char *dirName) #} declare 138 generic { - CONST84_RETURN char *TclGetEnv(CONST char *name, Tcl_DString *valuePtr) + CONST84_RETURN char *TclGetEnv(const char *name, Tcl_DString *valuePtr) } #declare 139 generic { # int TclpLoadFile(Tcl_Interp *interp, char *fileName, char *sym1, @@ -557,7 +557,7 @@ declare 138 generic { # Tcl_PackageInitProc **proc2Ptr, ClientData *clientDataPtr) #} #declare 140 generic { -# int TclLooksLikeInt(CONST char *bytes, int length) +# int TclLooksLikeInt(const char *bytes, int length) #} # This is used by TclX, but should otherwise be considered private declare 141 generic { @@ -576,7 +576,7 @@ declare 144 generic { int index) } declare 145 generic { - CONST86 struct AuxDataType *TclGetAuxDataType(CONST char *typeName) + CONST86 struct AuxDataType *TclGetAuxDataType(const char *typeName) } declare 146 generic { TclHandle TclHandleCreate(VOID *ptr) @@ -618,14 +618,14 @@ declare 153 generic { #} declare 156 generic { - void TclRegError(Tcl_Interp *interp, CONST char *msg, + void TclRegError(Tcl_Interp *interp, const char *msg, int status) } declare 157 generic { - Var *TclVarTraceExists(Tcl_Interp *interp, CONST char *varName) + Var *TclVarTraceExists(Tcl_Interp *interp, const char *varName) } declare 158 generic { - void TclSetStartupScriptFileName(CONST char *filename) + void TclSetStartupScriptFileName(const char *filename) } declare 159 generic { CONST84_RETURN char *TclGetStartupScriptFileName(void) @@ -682,17 +682,17 @@ declare 168 generic { } # variant of Tcl_UtfNCmp that takes n as bytes, not chars declare 169 generic { - int TclpUtfNcmp2(CONST char *s1, CONST char *s2, unsigned long n) + int TclpUtfNcmp2(const char *s1, const char *s2, unsigned long n) } declare 170 generic { - int TclCheckInterpTraces(Tcl_Interp *interp, CONST char *command, + int TclCheckInterpTraces(Tcl_Interp *interp, const char *command, int numChars, Command *cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]) + int objc, Tcl_Obj *const objv[]) } declare 171 generic { - int TclCheckExecutionTraces(Tcl_Interp *interp, CONST char *command, + int TclCheckExecutionTraces(Tcl_Interp *interp, const char *command, int numChars, Command *cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]) + int objc, Tcl_Obj *const objv[]) } declare 172 generic { int TclInThreadExit(void) @@ -701,8 +701,8 @@ declare 172 generic { # added for 8.4.2 declare 173 generic { - int TclUniCharMatch(CONST Tcl_UniChar *string, int strLen, - CONST Tcl_UniChar *pattern, int ptnLen, int flags) + int TclUniCharMatch(const Tcl_UniChar *string, int strLen, + const Tcl_UniChar *pattern, int ptnLen, int flags) } # added for 8.4.3 @@ -716,20 +716,20 @@ declare 173 generic { declare 175 generic { int TclCallVarTraces(Interp *iPtr, Var *arrayPtr, Var *varPtr, - CONST char *part1, CONST char *part2, int flags, int leaveErrMsg) + const char *part1, const char *part2, int flags, int leaveErrMsg) } declare 176 generic { void TclCleanupVar(Var *varPtr, Var *arrayPtr) } declare 177 generic { - void TclVarErrMsg(Tcl_Interp *interp, CONST char *part1, CONST char *part2, - CONST char *operation, CONST char *reason) + void TclVarErrMsg(Tcl_Interp *interp, const char *part1, const char *part2, + const char *operation, const char *reason) } declare 178 generic { - void Tcl_SetStartupScript(Tcl_Obj *pathPtr, CONST char* encodingName) + void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char* encodingName) } declare 179 generic { - Tcl_Obj *Tcl_GetStartupScript(CONST char **encodingNamePtr) + Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr) } # REMOVED @@ -739,16 +739,16 @@ declare 179 generic { # } #declare 181 generic { # Tcl_Obj *TclDbNewListObjDirect(int objc, Tcl_Obj **objv, -# CONST char *file, int line) +# const char *file, int line) #} # TclpGmtime and TclpLocaltime promoted to the generic interface from unix declare 182 generic { - struct tm *TclpLocaltime(CONST time_t *clock) + struct tm *TclpLocaltime(const time_t *clock) } declare 183 generic { - struct tm *TclpGmtime(CONST time_t *clock) + struct tm *TclpGmtime(const time_t *clock) } # For the new "Thread Storage" subsystem. @@ -802,7 +802,7 @@ declare 183 generic { # #declare 197 generic { # int TclCompEvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, -# CONST CmdFrame* invoker, int word) +# const CmdFrame* invoker, int word) #} declare 198 generic { int TclObjGetFrame(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -810,7 +810,7 @@ declare 198 generic { } #declare 199 generic { -# int TclMatchIsTrivial(CONST char *pattern) +# int TclMatchIsTrivial(const char *pattern) #} # 200-208 exported for use by the test suite [Bug 1054748] @@ -852,10 +852,10 @@ declare 208 generic { # int TclSetEncodingSearchPath(Tcl_Obj *searchPath) #} #declare 211 generic { -# CONST char * TclpGetEncodingNameFromEnvironment(Tcl_DString *bufPtr) +# const char * TclpGetEncodingNameFromEnvironment(Tcl_DString *bufPtr) #} declare 212 generic { - void TclpFindExecutable(CONST char *argv0) + void TclpFindExecutable(const char *argv0) } declare 213 generic { Tcl_Obj * TclGetObjNameOfExecutable(void) @@ -885,7 +885,7 @@ declare 224 generic { # declare 225 generic { Tcl_Obj *TclTraceDictPath(Tcl_Interp *interp, Tcl_Obj *rootPtr, - int keyc, Tcl_Obj *CONST keyv[], int flags) + int keyc, Tcl_Obj *const keyv[], int flags) } declare 226 generic { int TclObjBeingDeleted(Tcl_Obj *objPtr) @@ -902,12 +902,12 @@ declare 227 generic { # } declare 229 generic { int TclPtrMakeUpvar(Tcl_Interp *interp, Var *otherP1Ptr, - CONST char *myName, int myFlags, int index) + const char *myName, int myFlags, int index) } declare 230 generic { Var *TclObjLookupVar(Tcl_Interp *interp, Tcl_Obj *part1Ptr, - CONST char *part2, int flags, CONST char *msg, - CONST int createPart1, CONST int createPart2, Var **arrayPtrPtr) + const char *part2, int flags, const char *msg, + const int createPart1, const int createPart2, Var **arrayPtrPtr) } declare 231 generic { int TclGetNamespaceFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -917,7 +917,7 @@ declare 231 generic { # Bits and pieces of TIP#280's guts declare 232 generic { int TclEvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, - CONST CmdFrame *invoker, int word) + const CmdFrame *invoker, int word) } declare 233 generic { void TclGetSrcInfoForPc(CmdFrame *contextPtr) @@ -925,7 +925,7 @@ declare 233 generic { # Exports for VarReform compat: Itcl, XOTcl like to peek into our varTables :( declare 234 generic { - Var *TclVarHashCreateVar(TclVarHashTable *tablePtr, CONST char *key, + Var *TclVarHashCreateVar(TclVarHashTable *tablePtr, const char *key, int *newPtr) } declare 235 generic { @@ -946,7 +946,7 @@ declare 237 generic { # include NRE.h too. declare 238 generic { int TclNRInterpProc(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]) + int objc, Tcl_Obj *const objv[]) } declare 239 generic { int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj, @@ -958,7 +958,7 @@ declare 240 generic { } declare 241 generic { int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, - CONST CmdFrame *invoker, int word) + const CmdFrame *invoker, int word) } declare 242 generic { int TclNREvalObjv(Tcl_Interp *interp, int objc, @@ -981,8 +981,8 @@ declare 1 win { void TclWinConvertWSAError(DWORD errCode) } declare 2 win { - struct servent *TclWinGetServByName(CONST char *nm, - CONST char *proto) + struct servent *TclWinGetServByName(const char *nm, + const char *proto) } declare 3 win { int TclWinGetSockOpt(int s, int level, int optname, @@ -1000,7 +1000,7 @@ declare 6 win { } declare 7 win { int TclWinSetSockOpt(int s, int level, int optname, - CONST char FAR *optval, int optlen) + const char FAR *optval, int optlen) } declare 8 win { unsigned long TclpGetPid(Tcl_Pid pid) @@ -1029,7 +1029,7 @@ declare 14 win { int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) } declare 15 win { - int TclpCreateProcess(Tcl_Interp *interp, int argc, CONST char **argv, + int TclpCreateProcess(Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr) } @@ -1044,7 +1044,7 @@ declare 18 win { TclFile TclpMakeFile(Tcl_Channel channel, int direction) } declare 19 win { - TclFile TclpOpenFile(CONST char *fname, int mode) + TclFile TclpOpenFile(const char *fname, int mode) } declare 20 win { void TclWinAddProcess(HANDLE hProcess, DWORD id) @@ -1057,7 +1057,7 @@ declare 20 win { # Added in 8.1: declare 22 win { - TclFile TclpCreateTempFile(CONST char *contents) + TclFile TclpCreateTempFile(const char *contents) } declare 23 win { char *TclpGetTZName(int isdst) @@ -1107,7 +1107,7 @@ declare 3 unix { int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) } declare 4 unix { - int TclpCreateProcess(Tcl_Interp *interp, int argc, CONST char **argv, + int TclpCreateProcess(Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr) } @@ -1119,7 +1119,7 @@ declare 6 unix { TclFile TclpMakeFile(Tcl_Channel channel, int direction) } declare 7 unix { - TclFile TclpOpenFile(CONST char *fname, int mode) + TclFile TclpOpenFile(const char *fname, int mode) } declare 8 unix { int TclUnixWaitForFile(int fd, int mask, int timeout) @@ -1128,7 +1128,7 @@ declare 8 unix { # Added in 8.1: declare 9 unix { - TclFile TclpCreateTempFile(CONST char *contents) + TclFile TclpCreateTempFile(const char *contents) } # Added in 8.4: @@ -1139,10 +1139,10 @@ declare 10 unix { # Slots 11 and 12 are forwarders for functions that were promoted to # generic Stubs declare 11 unix { - struct tm *TclpLocaltime_unix(CONST time_t *clock) + struct tm *TclpLocaltime_unix(const time_t *clock) } declare 12 unix { - struct tm *TclpGmtime_unix(CONST time_t *clock) + struct tm *TclpGmtime_unix(const time_t *clock) } declare 13 unix { char *TclpInetNtoa(struct in_addr addr) @@ -1151,8 +1151,8 @@ declare 13 unix { # Added in 8.5: declare 14 unix { - int TclUnixCopyFile(CONST char *src, CONST char *dst, - CONST Tcl_StatBuf *statBufPtr, int dontCopyAtts) + int TclUnixCopyFile(const char *src, const char *dst, + const Tcl_StatBuf *statBufPtr, int dontCopyAtts) } ################################ @@ -1167,11 +1167,11 @@ declare 16 macosx { Tcl_Obj *fileName, Tcl_Obj *attributePtr) } declare 17 macosx { - int TclMacOSXCopyFileAttributes(CONST char *src, CONST char *dst, - CONST Tcl_StatBuf *statBufPtr) + int TclMacOSXCopyFileAttributes(const char *src, const char *dst, + const Tcl_StatBuf *statBufPtr) } declare 18 macosx { - int TclMacOSXMatchType(Tcl_Interp *interp, CONST char *pathName, - CONST char *fileName, Tcl_StatBuf *statBufPtr, + int TclMacOSXMatchType(Tcl_Interp *interp, const char *pathName, + const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types) } diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index b12fa91..ab08e3b 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.124 2008/10/05 20:47:52 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.125 2008/10/22 20:23:59 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -55,7 +55,7 @@ EXTERN void TclAllocateFreeObjects (void); #ifndef TclCleanupChildren_TCL_DECLARED #define TclCleanupChildren_TCL_DECLARED /* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); #endif #endif /* UNIX */ @@ -63,7 +63,7 @@ EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, #ifndef TclCleanupChildren_TCL_DECLARED #define TclCleanupChildren_TCL_DECLARED /* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); #endif #endif /* WIN */ @@ -71,7 +71,7 @@ EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, #ifndef TclCleanupChildren_TCL_DECLARED #define TclCleanupChildren_TCL_DECLARED /* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, +EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); #endif #endif /* MACOSX */ @@ -83,23 +83,23 @@ EXTERN void TclCleanupCommand (Command * cmdPtr); #ifndef TclCopyAndCollapse_TCL_DECLARED #define TclCopyAndCollapse_TCL_DECLARED /* 7 */ -EXTERN int TclCopyAndCollapse (int count, CONST char * src, +EXTERN int TclCopyAndCollapse (int count, const char * src, char * dst); #endif #ifndef TclCopyChannel_TCL_DECLARED #define TclCopyChannel_TCL_DECLARED /* 8 */ -EXTERN int TclCopyChannel (Tcl_Interp * interp, - Tcl_Channel inChan, Tcl_Channel outChan, +EXTERN int TclCopyChannel (Tcl_Interp * interp, + Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); #endif #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef TclCreatePipeline_TCL_DECLARED #define TclCreatePipeline_TCL_DECLARED /* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + const char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); #endif #endif /* UNIX */ @@ -107,9 +107,9 @@ EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, #ifndef TclCreatePipeline_TCL_DECLARED #define TclCreatePipeline_TCL_DECLARED /* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + const char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); #endif #endif /* WIN */ @@ -117,30 +117,30 @@ EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, #ifndef TclCreatePipeline_TCL_DECLARED #define TclCreatePipeline_TCL_DECLARED /* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - CONST char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, +EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, + const char ** argv, Tcl_Pid ** pidArrayPtr, + TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); #endif #endif /* MACOSX */ #ifndef TclCreateProc_TCL_DECLARED #define TclCreateProc_TCL_DECLARED /* 10 */ -EXTERN int TclCreateProc (Tcl_Interp * interp, - Namespace * nsPtr, CONST char * procName, - Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, +EXTERN int TclCreateProc (Tcl_Interp * interp, + Namespace * nsPtr, const char * procName, + Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); #endif #ifndef TclDeleteCompiledLocalVars_TCL_DECLARED #define TclDeleteCompiledLocalVars_TCL_DECLARED /* 11 */ -EXTERN void TclDeleteCompiledLocalVars (Interp * iPtr, +EXTERN void TclDeleteCompiledLocalVars (Interp * iPtr, CallFrame * framePtr); #endif #ifndef TclDeleteVars_TCL_DECLARED #define TclDeleteVars_TCL_DECLARED /* 12 */ -EXTERN void TclDeleteVars (Interp * iPtr, +EXTERN void TclDeleteVars (Interp * iPtr, TclVarHashTable * tablePtr); #endif /* Slot 13 is reserved */ @@ -163,16 +163,16 @@ EXTERN void TclExprFloatError (Tcl_Interp * interp, double value); #ifndef TclFindElement_TCL_DECLARED #define TclFindElement_TCL_DECLARED /* 22 */ -EXTERN int TclFindElement (Tcl_Interp * interp, - CONST char * listStr, int listLength, - CONST char ** elementPtr, - CONST char ** nextPtr, int * sizePtr, +EXTERN int TclFindElement (Tcl_Interp * interp, + const char * listStr, int listLength, + const char ** elementPtr, + const char ** nextPtr, int * sizePtr, int * bracePtr); #endif #ifndef TclFindProc_TCL_DECLARED #define TclFindProc_TCL_DECLARED /* 23 */ -EXTERN Proc * TclFindProc (Interp * iPtr, CONST char * procName); +EXTERN Proc * TclFindProc (Interp * iPtr, const char * procName); #endif /* Slot 24 is reserved */ #ifndef TclFreePackageInfo_TCL_DECLARED @@ -192,20 +192,20 @@ EXTERN Tcl_Channel TclpGetDefaultStdChannel (int type); #ifndef TclGetExtension_TCL_DECLARED #define TclGetExtension_TCL_DECLARED /* 31 */ -EXTERN CONST char * TclGetExtension (CONST char * name); +EXTERN const char * TclGetExtension (const char * name); #endif #ifndef TclGetFrame_TCL_DECLARED #define TclGetFrame_TCL_DECLARED /* 32 */ -EXTERN int TclGetFrame (Tcl_Interp * interp, CONST char * str, +EXTERN int TclGetFrame (Tcl_Interp * interp, const char * str, CallFrame ** framePtrPtr); #endif /* Slot 33 is reserved */ #ifndef TclGetIntForIndex_TCL_DECLARED #define TclGetIntForIndex_TCL_DECLARED /* 34 */ -EXTERN int TclGetIntForIndex (Tcl_Interp * interp, - Tcl_Obj * objPtr, int endValue, +EXTERN int TclGetIntForIndex (Tcl_Interp * interp, + Tcl_Obj * objPtr, int endValue, int * indexPtr); #endif /* Slot 35 is reserved */ @@ -213,18 +213,18 @@ EXTERN int TclGetIntForIndex (Tcl_Interp * interp, #ifndef TclGetLoadedPackages_TCL_DECLARED #define TclGetLoadedPackages_TCL_DECLARED /* 37 */ -EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, +EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, char * targetName); #endif #ifndef TclGetNamespaceForQualName_TCL_DECLARED #define TclGetNamespaceForQualName_TCL_DECLARED /* 38 */ -EXTERN int TclGetNamespaceForQualName (Tcl_Interp * interp, - CONST char * qualName, Namespace * cxtNsPtr, - int flags, Namespace ** nsPtrPtr, - Namespace ** altNsPtrPtr, - Namespace ** actualCxtPtrPtr, - CONST char ** simpleNamePtr); +EXTERN int TclGetNamespaceForQualName (Tcl_Interp * interp, + const char * qualName, Namespace * cxtNsPtr, + int flags, Namespace ** nsPtrPtr, + Namespace ** altNsPtrPtr, + Namespace ** actualCxtPtrPtr, + const char ** simpleNamePtr); #endif #ifndef TclGetObjInterpProc_TCL_DECLARED #define TclGetObjInterpProc_TCL_DECLARED @@ -234,8 +234,8 @@ EXTERN TclObjCmdProcType TclGetObjInterpProc (void); #ifndef TclGetOpenMode_TCL_DECLARED #define TclGetOpenMode_TCL_DECLARED /* 40 */ -EXTERN int TclGetOpenMode (Tcl_Interp * interp, - CONST char * str, int * seekFlagPtr); +EXTERN int TclGetOpenMode (Tcl_Interp * interp, + const char * str, int * seekFlagPtr); #endif #ifndef TclGetOriginalCommand_TCL_DECLARED #define TclGetOriginalCommand_TCL_DECLARED @@ -245,14 +245,14 @@ EXTERN Tcl_Command TclGetOriginalCommand (Tcl_Command command); #ifndef TclpGetUserHome_TCL_DECLARED #define TclpGetUserHome_TCL_DECLARED /* 42 */ -EXTERN char * TclpGetUserHome (CONST char * name, +EXTERN char * TclpGetUserHome (const char * name, Tcl_DString * bufferPtr); #endif /* Slot 43 is reserved */ #ifndef TclGuessPackageName_TCL_DECLARED #define TclGuessPackageName_TCL_DECLARED /* 44 */ -EXTERN int TclGuessPackageName (CONST char * fileName, +EXTERN int TclGuessPackageName (const char * fileName, Tcl_DString * bufPtr); #endif #ifndef TclHideUnsafeCommands_TCL_DECLARED @@ -271,7 +271,7 @@ EXTERN int TclInExit (void); #ifndef TclInitCompiledLocals_TCL_DECLARED #define TclInitCompiledLocals_TCL_DECLARED /* 50 */ -EXTERN void TclInitCompiledLocals (Tcl_Interp * interp, +EXTERN void TclInitCompiledLocals (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); #endif #ifndef TclInterpInit_TCL_DECLARED @@ -283,16 +283,16 @@ EXTERN int TclInterpInit (Tcl_Interp * interp); #ifndef TclInvokeObjectCommand_TCL_DECLARED #define TclInvokeObjectCommand_TCL_DECLARED /* 53 */ -EXTERN int TclInvokeObjectCommand (ClientData clientData, - Tcl_Interp * interp, int argc, +EXTERN int TclInvokeObjectCommand (ClientData clientData, + Tcl_Interp * interp, int argc, CONST84 char ** argv); #endif #ifndef TclInvokeStringCommand_TCL_DECLARED #define TclInvokeStringCommand_TCL_DECLARED /* 54 */ -EXTERN int TclInvokeStringCommand (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); +EXTERN int TclInvokeStringCommand (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[]); #endif #ifndef TclIsProc_TCL_DECLARED #define TclIsProc_TCL_DECLARED @@ -304,16 +304,16 @@ EXTERN Proc * TclIsProc (Command * cmdPtr); #ifndef TclLookupVar_TCL_DECLARED #define TclLookupVar_TCL_DECLARED /* 58 */ -EXTERN Var * TclLookupVar (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - int flags, CONST char * msg, int createPart1, +EXTERN Var * TclLookupVar (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, const char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); #endif /* Slot 59 is reserved */ #ifndef TclNeedSpace_TCL_DECLARED #define TclNeedSpace_TCL_DECLARED /* 60 */ -EXTERN int TclNeedSpace (CONST char * start, CONST char * end); +EXTERN int TclNeedSpace (const char * start, const char * end); #endif #ifndef TclNewProcBodyObj_TCL_DECLARED #define TclNewProcBodyObj_TCL_DECLARED @@ -328,15 +328,15 @@ EXTERN int TclObjCommandComplete (Tcl_Obj * cmdPtr); #ifndef TclObjInterpProc_TCL_DECLARED #define TclObjInterpProc_TCL_DECLARED /* 63 */ -EXTERN int TclObjInterpProc (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); +EXTERN int TclObjInterpProc (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[]); #endif #ifndef TclObjInvoke_TCL_DECLARED #define TclObjInvoke_TCL_DECLARED /* 64 */ -EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[], int flags); +EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags); #endif /* Slot 65 is reserved */ /* Slot 66 is reserved */ @@ -392,14 +392,14 @@ EXTERN char * TclpRealloc (char * ptr, unsigned int size); #ifndef TclPrecTraceProc_TCL_DECLARED #define TclPrecTraceProc_TCL_DECLARED /* 88 */ -EXTERN char * TclPrecTraceProc (ClientData clientData, - Tcl_Interp * interp, CONST char * name1, - CONST char * name2, int flags); +EXTERN char * TclPrecTraceProc (ClientData clientData, + Tcl_Interp * interp, const char * name1, + const char * name2, int flags); #endif #ifndef TclPreventAliasLoop_TCL_DECLARED #define TclPreventAliasLoop_TCL_DECLARED /* 89 */ -EXTERN int TclPreventAliasLoop (Tcl_Interp * interp, +EXTERN int TclPreventAliasLoop (Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd); #endif /* Slot 90 is reserved */ @@ -411,10 +411,10 @@ EXTERN void TclProcCleanupProc (Proc * procPtr); #ifndef TclProcCompileProc_TCL_DECLARED #define TclProcCompileProc_TCL_DECLARED /* 92 */ -EXTERN int TclProcCompileProc (Tcl_Interp * interp, - Proc * procPtr, Tcl_Obj * bodyPtr, - Namespace * nsPtr, CONST char * description, - CONST char * procName); +EXTERN int TclProcCompileProc (Tcl_Interp * interp, + Proc * procPtr, Tcl_Obj * bodyPtr, + Namespace * nsPtr, const char * description, + const char * procName); #endif #ifndef TclProcDeleteProc_TCL_DECLARED #define TclProcDeleteProc_TCL_DECLARED @@ -426,13 +426,13 @@ EXTERN void TclProcDeleteProc (ClientData clientData); #ifndef TclRenameCommand_TCL_DECLARED #define TclRenameCommand_TCL_DECLARED /* 96 */ -EXTERN int TclRenameCommand (Tcl_Interp * interp, - CONST char * oldName, CONST char * newName); +EXTERN int TclRenameCommand (Tcl_Interp * interp, + const char * oldName, const char * newName); #endif #ifndef TclResetShadowedCmdRefs_TCL_DECLARED #define TclResetShadowedCmdRefs_TCL_DECLARED /* 97 */ -EXTERN void TclResetShadowedCmdRefs (Tcl_Interp * interp, +EXTERN void TclResetShadowedCmdRefs (Tcl_Interp * interp, Command * newCmdPtr); #endif #ifndef TclServiceIdle_TCL_DECLARED @@ -455,8 +455,8 @@ EXTERN void TclSetupEnv (Tcl_Interp * interp); #ifndef TclSockGetPort_TCL_DECLARED #define TclSockGetPort_TCL_DECLARED /* 103 */ -EXTERN int TclSockGetPort (Tcl_Interp * interp, - CONST char * str, CONST char * proto, +EXTERN int TclSockGetPort (Tcl_Interp * interp, + const char * str, const char * proto, int * portPtr); #endif #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ @@ -497,23 +497,23 @@ EXTERN int TclUpdateReturnInfo (Interp * iPtr); #ifndef Tcl_AddInterpResolvers_TCL_DECLARED #define Tcl_AddInterpResolvers_TCL_DECLARED /* 111 */ -EXTERN void Tcl_AddInterpResolvers (Tcl_Interp * interp, - CONST char * name, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, +EXTERN void Tcl_AddInterpResolvers (Tcl_Interp * interp, + const char * name, + Tcl_ResolveCmdProc * cmdProc, + Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); #endif #ifndef Tcl_AppendExportList_TCL_DECLARED #define Tcl_AppendExportList_TCL_DECLARED /* 112 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); #endif #ifndef Tcl_CreateNamespace_TCL_DECLARED #define Tcl_CreateNamespace_TCL_DECLARED /* 113 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - CONST char * name, ClientData clientData, +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); #endif #ifndef Tcl_DeleteNamespace_TCL_DECLARED @@ -524,61 +524,61 @@ EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); #ifndef Tcl_Export_TCL_DECLARED #define Tcl_Export_TCL_DECLARED /* 115 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); #endif #ifndef Tcl_FindCommand_TCL_DECLARED #define Tcl_FindCommand_TCL_DECLARED /* 116 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - CONST char * name, +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + const char * name, Tcl_Namespace * contextNsPtr, int flags); #endif #ifndef Tcl_FindNamespace_TCL_DECLARED #define Tcl_FindNamespace_TCL_DECLARED /* 117 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - CONST char * name, +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + const char * name, Tcl_Namespace * contextNsPtr, int flags); #endif #ifndef Tcl_GetInterpResolvers_TCL_DECLARED #define Tcl_GetInterpResolvers_TCL_DECLARED /* 118 */ -EXTERN int Tcl_GetInterpResolvers (Tcl_Interp * interp, - CONST char * name, +EXTERN int Tcl_GetInterpResolvers (Tcl_Interp * interp, + const char * name, Tcl_ResolverInfo * resInfo); #endif #ifndef Tcl_GetNamespaceResolvers_TCL_DECLARED #define Tcl_GetNamespaceResolvers_TCL_DECLARED /* 119 */ EXTERN int Tcl_GetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, + Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo); #endif #ifndef Tcl_FindNamespaceVar_TCL_DECLARED #define Tcl_FindNamespaceVar_TCL_DECLARED /* 120 */ -EXTERN Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp * interp, - CONST char * name, +EXTERN Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp * interp, + const char * name, Tcl_Namespace * contextNsPtr, int flags); #endif #ifndef Tcl_ForgetImport_TCL_DECLARED #define Tcl_ForgetImport_TCL_DECLARED /* 121 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern); +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern); #endif #ifndef Tcl_GetCommandFromObj_TCL_DECLARED #define Tcl_GetCommandFromObj_TCL_DECLARED /* 122 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr); #endif #ifndef Tcl_GetCommandFullName_TCL_DECLARED #define Tcl_GetCommandFullName_TCL_DECLARED /* 123 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); #endif #ifndef Tcl_GetCurrentNamespace_TCL_DECLARED @@ -594,14 +594,14 @@ EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); #ifndef Tcl_GetVariableFullName_TCL_DECLARED #define Tcl_GetVariableFullName_TCL_DECLARED /* 126 */ -EXTERN void Tcl_GetVariableFullName (Tcl_Interp * interp, +EXTERN void Tcl_GetVariableFullName (Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr); #endif #ifndef Tcl_Import_TCL_DECLARED #define Tcl_Import_TCL_DECLARED /* 127 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, CONST char * pattern, +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); #endif #ifndef Tcl_PopCallFrame_TCL_DECLARED @@ -612,23 +612,23 @@ EXTERN void Tcl_PopCallFrame (Tcl_Interp * interp); #ifndef Tcl_PushCallFrame_TCL_DECLARED #define Tcl_PushCallFrame_TCL_DECLARED /* 129 */ -EXTERN int Tcl_PushCallFrame (Tcl_Interp * interp, - Tcl_CallFrame * framePtr, +EXTERN int Tcl_PushCallFrame (Tcl_Interp * interp, + Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame); #endif #ifndef Tcl_RemoveInterpResolvers_TCL_DECLARED #define Tcl_RemoveInterpResolvers_TCL_DECLARED /* 130 */ -EXTERN int Tcl_RemoveInterpResolvers (Tcl_Interp * interp, - CONST char * name); +EXTERN int Tcl_RemoveInterpResolvers (Tcl_Interp * interp, + const char * name); #endif #ifndef Tcl_SetNamespaceResolvers_TCL_DECLARED #define Tcl_SetNamespaceResolvers_TCL_DECLARED /* 131 */ EXTERN void Tcl_SetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, + Tcl_Namespace * namespacePtr, + Tcl_ResolveCmdProc * cmdProc, + Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); #endif #ifndef TclpHasSockets_TCL_DECLARED @@ -639,7 +639,7 @@ EXTERN int TclpHasSockets (Tcl_Interp * interp); #ifndef TclpGetDate_TCL_DECLARED #define TclpGetDate_TCL_DECLARED /* 133 */ -EXTERN struct tm * TclpGetDate (CONST time_t * time, int useGMT); +EXTERN struct tm * TclpGetDate (const time_t * time, int useGMT); #endif /* Slot 134 is reserved */ /* Slot 135 is reserved */ @@ -648,7 +648,7 @@ EXTERN struct tm * TclpGetDate (CONST time_t * time, int useGMT); #ifndef TclGetEnv_TCL_DECLARED #define TclGetEnv_TCL_DECLARED /* 138 */ -EXTERN CONST84_RETURN char * TclGetEnv (CONST char * name, +EXTERN CONST84_RETURN char * TclGetEnv (const char * name, Tcl_DString * valuePtr); #endif /* Slot 139 is reserved */ @@ -656,32 +656,32 @@ EXTERN CONST84_RETURN char * TclGetEnv (CONST char * name, #ifndef TclpGetCwd_TCL_DECLARED #define TclpGetCwd_TCL_DECLARED /* 141 */ -EXTERN CONST84_RETURN char * TclpGetCwd (Tcl_Interp * interp, +EXTERN CONST84_RETURN char * TclpGetCwd (Tcl_Interp * interp, Tcl_DString * cwdPtr); #endif #ifndef TclSetByteCodeFromAny_TCL_DECLARED #define TclSetByteCodeFromAny_TCL_DECLARED /* 142 */ -EXTERN int TclSetByteCodeFromAny (Tcl_Interp * interp, - Tcl_Obj * objPtr, CompileHookProc * hookProc, +EXTERN int TclSetByteCodeFromAny (Tcl_Interp * interp, + Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); #endif #ifndef TclAddLiteralObj_TCL_DECLARED #define TclAddLiteralObj_TCL_DECLARED /* 143 */ -EXTERN int TclAddLiteralObj (struct CompileEnv * envPtr, +EXTERN int TclAddLiteralObj (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); #endif #ifndef TclHideLiteral_TCL_DECLARED #define TclHideLiteral_TCL_DECLARED /* 144 */ -EXTERN void TclHideLiteral (Tcl_Interp * interp, +EXTERN void TclHideLiteral (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); #endif #ifndef TclGetAuxDataType_TCL_DECLARED #define TclGetAuxDataType_TCL_DECLARED /* 145 */ -EXTERN CONST86 struct AuxDataType * TclGetAuxDataType (CONST char * typeName); +EXTERN CONST86 struct AuxDataType * TclGetAuxDataType (const char * typeName); #endif #ifndef TclHandleCreate_TCL_DECLARED #define TclHandleCreate_TCL_DECLARED @@ -711,7 +711,7 @@ EXTERN int TclRegAbout (Tcl_Interp * interp, Tcl_RegExp re); #ifndef TclRegExpRangeUniChar_TCL_DECLARED #define TclRegExpRangeUniChar_TCL_DECLARED /* 151 */ -EXTERN void TclRegExpRangeUniChar (Tcl_RegExp re, int index, +EXTERN void TclRegExpRangeUniChar (Tcl_RegExp re, int index, int * startPtr, int * endPtr); #endif #ifndef TclSetLibraryPath_TCL_DECLARED @@ -729,19 +729,19 @@ EXTERN Tcl_Obj * TclGetLibraryPath (void); #ifndef TclRegError_TCL_DECLARED #define TclRegError_TCL_DECLARED /* 156 */ -EXTERN void TclRegError (Tcl_Interp * interp, CONST char * msg, +EXTERN void TclRegError (Tcl_Interp * interp, const char * msg, int status); #endif #ifndef TclVarTraceExists_TCL_DECLARED #define TclVarTraceExists_TCL_DECLARED /* 157 */ -EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, - CONST char * varName); +EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, + const char * varName); #endif #ifndef TclSetStartupScriptFileName_TCL_DECLARED #define TclSetStartupScriptFileName_TCL_DECLARED /* 158 */ -EXTERN void TclSetStartupScriptFileName (CONST char * filename); +EXTERN void TclSetStartupScriptFileName (const char * filename); #endif #ifndef TclGetStartupScriptFileName_TCL_DECLARED #define TclGetStartupScriptFileName_TCL_DECLARED @@ -752,13 +752,13 @@ EXTERN CONST84_RETURN char * TclGetStartupScriptFileName (void); #ifndef TclChannelTransform_TCL_DECLARED #define TclChannelTransform_TCL_DECLARED /* 161 */ -EXTERN int TclChannelTransform (Tcl_Interp * interp, +EXTERN int TclChannelTransform (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); #endif #ifndef TclChannelEventScriptInvoker_TCL_DECLARED #define TclChannelEventScriptInvoker_TCL_DECLARED /* 162 */ -EXTERN void TclChannelEventScriptInvoker (ClientData clientData, +EXTERN void TclChannelEventScriptInvoker (ClientData clientData, int flags); #endif #ifndef TclGetInstructionTable_TCL_DECLARED @@ -779,8 +779,8 @@ EXTERN void TclpSetInitialEncodings (void); #ifndef TclListObjSetElement_TCL_DECLARED #define TclListObjSetElement_TCL_DECLARED /* 166 */ -EXTERN int TclListObjSetElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, +EXTERN int TclListObjSetElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); #endif #ifndef TclSetStartupScriptPath_TCL_DECLARED @@ -796,24 +796,24 @@ EXTERN Tcl_Obj * TclGetStartupScriptPath (void); #ifndef TclpUtfNcmp2_TCL_DECLARED #define TclpUtfNcmp2_TCL_DECLARED /* 169 */ -EXTERN int TclpUtfNcmp2 (CONST char * s1, CONST char * s2, +EXTERN int TclpUtfNcmp2 (const char * s1, const char * s2, unsigned long n); #endif #ifndef TclCheckInterpTraces_TCL_DECLARED #define TclCheckInterpTraces_TCL_DECLARED /* 170 */ -EXTERN int TclCheckInterpTraces (Tcl_Interp * interp, - CONST char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]); +EXTERN int TclCheckInterpTraces (Tcl_Interp * interp, + const char * command, int numChars, + Command * cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *const objv[]); #endif #ifndef TclCheckExecutionTraces_TCL_DECLARED #define TclCheckExecutionTraces_TCL_DECLARED /* 171 */ -EXTERN int TclCheckExecutionTraces (Tcl_Interp * interp, - CONST char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, - int objc, Tcl_Obj *CONST objv[]); +EXTERN int TclCheckExecutionTraces (Tcl_Interp * interp, + const char * command, int numChars, + Command * cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *const objv[]); #endif #ifndef TclInThreadExit_TCL_DECLARED #define TclInThreadExit_TCL_DECLARED @@ -823,17 +823,17 @@ EXTERN int TclInThreadExit (void); #ifndef TclUniCharMatch_TCL_DECLARED #define TclUniCharMatch_TCL_DECLARED /* 173 */ -EXTERN int TclUniCharMatch (CONST Tcl_UniChar * string, - int strLen, CONST Tcl_UniChar * pattern, +EXTERN int TclUniCharMatch (const Tcl_UniChar * string, + int strLen, const Tcl_UniChar * pattern, int ptnLen, int flags); #endif /* Slot 174 is reserved */ #ifndef TclCallVarTraces_TCL_DECLARED #define TclCallVarTraces_TCL_DECLARED /* 175 */ -EXTERN int TclCallVarTraces (Interp * iPtr, Var * arrayPtr, - Var * varPtr, CONST char * part1, - CONST char * part2, int flags, +EXTERN int TclCallVarTraces (Interp * iPtr, Var * arrayPtr, + Var * varPtr, const char * part1, + const char * part2, int flags, int leaveErrMsg); #endif #ifndef TclCleanupVar_TCL_DECLARED @@ -844,32 +844,32 @@ EXTERN void TclCleanupVar (Var * varPtr, Var * arrayPtr); #ifndef TclVarErrMsg_TCL_DECLARED #define TclVarErrMsg_TCL_DECLARED /* 177 */ -EXTERN void TclVarErrMsg (Tcl_Interp * interp, - CONST char * part1, CONST char * part2, - CONST char * operation, CONST char * reason); +EXTERN void TclVarErrMsg (Tcl_Interp * interp, + const char * part1, const char * part2, + const char * operation, const char * reason); #endif #ifndef Tcl_SetStartupScript_TCL_DECLARED #define Tcl_SetStartupScript_TCL_DECLARED /* 178 */ -EXTERN void Tcl_SetStartupScript (Tcl_Obj * pathPtr, - CONST char* encodingName); +EXTERN void Tcl_SetStartupScript (Tcl_Obj * pathPtr, + const char* encodingName); #endif #ifndef Tcl_GetStartupScript_TCL_DECLARED #define Tcl_GetStartupScript_TCL_DECLARED /* 179 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript (CONST char ** encodingNamePtr); +EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingNamePtr); #endif /* Slot 180 is reserved */ /* Slot 181 is reserved */ #ifndef TclpLocaltime_TCL_DECLARED #define TclpLocaltime_TCL_DECLARED /* 182 */ -EXTERN struct tm * TclpLocaltime (CONST time_t * clock); +EXTERN struct tm * TclpLocaltime (const time_t * clock); #endif #ifndef TclpGmtime_TCL_DECLARED #define TclpGmtime_TCL_DECLARED /* 183 */ -EXTERN struct tm * TclpGmtime (CONST time_t * clock); +EXTERN struct tm * TclpGmtime (const time_t * clock); #endif /* Slot 184 is reserved */ /* Slot 185 is reserved */ @@ -888,20 +888,20 @@ EXTERN struct tm * TclpGmtime (CONST time_t * clock); #ifndef TclObjGetFrame_TCL_DECLARED #define TclObjGetFrame_TCL_DECLARED /* 198 */ -EXTERN int TclObjGetFrame (Tcl_Interp * interp, +EXTERN int TclObjGetFrame (Tcl_Interp * interp, Tcl_Obj * objPtr, CallFrame ** framePtrPtr); #endif /* Slot 199 is reserved */ #ifndef TclpObjRemoveDirectory_TCL_DECLARED #define TclpObjRemoveDirectory_TCL_DECLARED /* 200 */ -EXTERN int TclpObjRemoveDirectory (Tcl_Obj * pathPtr, +EXTERN int TclpObjRemoveDirectory (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); #endif #ifndef TclpObjCopyDirectory_TCL_DECLARED #define TclpObjCopyDirectory_TCL_DECLARED /* 201 */ -EXTERN int TclpObjCopyDirectory (Tcl_Obj * srcPathPtr, +EXTERN int TclpObjCopyDirectory (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); #endif #ifndef TclpObjCreateDirectory_TCL_DECLARED @@ -917,13 +917,13 @@ EXTERN int TclpObjDeleteFile (Tcl_Obj * pathPtr); #ifndef TclpObjCopyFile_TCL_DECLARED #define TclpObjCopyFile_TCL_DECLARED /* 204 */ -EXTERN int TclpObjCopyFile (Tcl_Obj * srcPathPtr, +EXTERN int TclpObjCopyFile (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); #endif #ifndef TclpObjRenameFile_TCL_DECLARED #define TclpObjRenameFile_TCL_DECLARED /* 205 */ -EXTERN int TclpObjRenameFile (Tcl_Obj * srcPathPtr, +EXTERN int TclpObjRenameFile (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); #endif #ifndef TclpObjStat_TCL_DECLARED @@ -939,7 +939,7 @@ EXTERN int TclpObjAccess (Tcl_Obj * pathPtr, int mode); #ifndef TclpOpenFileChannel_TCL_DECLARED #define TclpOpenFileChannel_TCL_DECLARED /* 208 */ -EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, +EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions); #endif /* Slot 209 is reserved */ @@ -948,7 +948,7 @@ EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, #ifndef TclpFindExecutable_TCL_DECLARED #define TclpFindExecutable_TCL_DECLARED /* 212 */ -EXTERN void TclpFindExecutable (CONST char * argv0); +EXTERN void TclpFindExecutable (const char * argv0); #endif #ifndef TclGetObjNameOfExecutable_TCL_DECLARED #define TclGetObjNameOfExecutable_TCL_DECLARED @@ -958,7 +958,7 @@ EXTERN Tcl_Obj * TclGetObjNameOfExecutable (void); #ifndef TclSetObjNameOfExecutable_TCL_DECLARED #define TclSetObjNameOfExecutable_TCL_DECLARED /* 214 */ -EXTERN void TclSetObjNameOfExecutable (Tcl_Obj * name, +EXTERN void TclSetObjNameOfExecutable (Tcl_Obj * name, Tcl_Encoding encoding); #endif #ifndef TclStackAlloc_TCL_DECLARED @@ -974,9 +974,9 @@ EXTERN void TclStackFree (Tcl_Interp * interp, void * freePtr); #ifndef TclPushStackFrame_TCL_DECLARED #define TclPushStackFrame_TCL_DECLARED /* 217 */ -EXTERN int TclPushStackFrame (Tcl_Interp * interp, - Tcl_CallFrame ** framePtrPtr, - Tcl_Namespace * namespacePtr, +EXTERN int TclPushStackFrame (Tcl_Interp * interp, + Tcl_CallFrame ** framePtrPtr, + Tcl_Namespace * namespacePtr, int isProcCallFrame); #endif #ifndef TclPopStackFrame_TCL_DECLARED @@ -997,9 +997,9 @@ EXTERN TclPlatformType * TclGetPlatform (void); #ifndef TclTraceDictPath_TCL_DECLARED #define TclTraceDictPath_TCL_DECLARED /* 225 */ -EXTERN Tcl_Obj * TclTraceDictPath (Tcl_Interp * interp, - Tcl_Obj * rootPtr, int keyc, - Tcl_Obj *CONST keyv[], int flags); +EXTERN Tcl_Obj * TclTraceDictPath (Tcl_Interp * interp, + Tcl_Obj * rootPtr, int keyc, + Tcl_Obj *const keyv[], int flags); #endif #ifndef TclObjBeingDeleted_TCL_DECLARED #define TclObjBeingDeleted_TCL_DECLARED @@ -1009,37 +1009,37 @@ EXTERN int TclObjBeingDeleted (Tcl_Obj * objPtr); #ifndef TclSetNsPath_TCL_DECLARED #define TclSetNsPath_TCL_DECLARED /* 227 */ -EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, +EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); #endif /* Slot 228 is reserved */ #ifndef TclPtrMakeUpvar_TCL_DECLARED #define TclPtrMakeUpvar_TCL_DECLARED /* 229 */ -EXTERN int TclPtrMakeUpvar (Tcl_Interp * interp, - Var * otherP1Ptr, CONST char * myName, +EXTERN int TclPtrMakeUpvar (Tcl_Interp * interp, + Var * otherP1Ptr, const char * myName, int myFlags, int index); #endif #ifndef TclObjLookupVar_TCL_DECLARED #define TclObjLookupVar_TCL_DECLARED /* 230 */ -EXTERN Var * TclObjLookupVar (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, CONST char * part2, - int flags, CONST char * msg, - CONST int createPart1, CONST int createPart2, +EXTERN Var * TclObjLookupVar (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, const char * part2, + int flags, const char * msg, + const int createPart1, const int createPart2, Var ** arrayPtrPtr); #endif #ifndef TclGetNamespaceFromObj_TCL_DECLARED #define TclGetNamespaceFromObj_TCL_DECLARED /* 231 */ -EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, +EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); #endif #ifndef TclEvalObjEx_TCL_DECLARED #define TclEvalObjEx_TCL_DECLARED /* 232 */ -EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags, CONST CmdFrame * invoker, +EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags, const CmdFrame * invoker, int word); #endif #ifndef TclGetSrcInfoForPc_TCL_DECLARED @@ -1050,19 +1050,19 @@ EXTERN void TclGetSrcInfoForPc (CmdFrame * contextPtr); #ifndef TclVarHashCreateVar_TCL_DECLARED #define TclVarHashCreateVar_TCL_DECLARED /* 234 */ -EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, - CONST char * key, int * newPtr); +EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, + const char * key, int * newPtr); #endif #ifndef TclInitVarHashTable_TCL_DECLARED #define TclInitVarHashTable_TCL_DECLARED /* 235 */ -EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, +EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, Namespace * nsPtr); #endif #ifndef TclBackgroundException_TCL_DECLARED #define TclBackgroundException_TCL_DECLARED /* 236 */ -EXTERN void TclBackgroundException (Tcl_Interp * interp, +EXTERN void TclBackgroundException (Tcl_Interp * interp, int code); #endif #ifndef TclResetCancellation_TCL_DECLARED @@ -1073,41 +1073,41 @@ EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); #ifndef TclNRInterpProc_TCL_DECLARED #define TclNRInterpProc_TCL_DECLARED /* 238 */ -EXTERN int TclNRInterpProc (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *CONST objv[]); +EXTERN int TclNRInterpProc (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[]); #endif #ifndef TclNRInterpProcCore_TCL_DECLARED #define TclNRInterpProcCore_TCL_DECLARED /* 239 */ -EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, - Tcl_Obj * procNameObj, int skip, +EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, + Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); #endif #ifndef TclNRRunCallbacks_TCL_DECLARED #define TclNRRunCallbacks_TCL_DECLARED /* 240 */ -EXTERN int TclNRRunCallbacks (Tcl_Interp * interp, int result, +EXTERN int TclNRRunCallbacks (Tcl_Interp * interp, int result, struct TEOV_callback * rootPtr, int tebcCall); #endif #ifndef TclNREvalObjEx_TCL_DECLARED #define TclNREvalObjEx_TCL_DECLARED /* 241 */ -EXTERN int TclNREvalObjEx (Tcl_Interp * interp, - Tcl_Obj * objPtr, int flags, - CONST CmdFrame * invoker, int word); +EXTERN int TclNREvalObjEx (Tcl_Interp * interp, + Tcl_Obj * objPtr, int flags, + const CmdFrame * invoker, int word); #endif #ifndef TclNREvalObjv_TCL_DECLARED #define TclNREvalObjv_TCL_DECLARED /* 242 */ -EXTERN int TclNREvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], int flags, +EXTERN int TclNREvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags, Command * cmdPtr); #endif typedef struct TclIntStubs { int magic; - CONST struct TclIntStubHooks *hooks; + const struct TclIntStubHooks *hooks; void *reserved0; void *reserved1; @@ -1124,18 +1124,18 @@ typedef struct TclIntStubs { int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ #endif /* MACOSX */ void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */ - int (*tclCopyAndCollapse) (int count, CONST char * src, char * dst); /* 7 */ + int (*tclCopyAndCollapse) (int count, const char * src, char * dst); /* 7 */ int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ + int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ #endif /* MACOSX */ - int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, CONST char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ + int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, const char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */ void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */ void *reserved13; @@ -1147,8 +1147,8 @@ typedef struct TclIntStubs { void *reserved19; void *reserved20; void *reserved21; - int (*tclFindElement) (Tcl_Interp * interp, CONST char * listStr, int listLength, CONST char ** elementPtr, CONST char ** nextPtr, int * sizePtr, int * bracePtr); /* 22 */ - Proc * (*tclFindProc) (Interp * iPtr, CONST char * procName); /* 23 */ + int (*tclFindElement) (Tcl_Interp * interp, const char * listStr, int listLength, const char ** elementPtr, const char ** nextPtr, int * sizePtr, int * bracePtr); /* 22 */ + Proc * (*tclFindProc) (Interp * iPtr, const char * procName); /* 23 */ void *reserved24; void (*tclFreePackageInfo) (Interp * iPtr); /* 25 */ void *reserved26; @@ -1156,20 +1156,20 @@ typedef struct TclIntStubs { Tcl_Channel (*tclpGetDefaultStdChannel) (int type); /* 28 */ void *reserved29; void *reserved30; - CONST char * (*tclGetExtension) (CONST char * name); /* 31 */ - int (*tclGetFrame) (Tcl_Interp * interp, CONST char * str, CallFrame ** framePtrPtr); /* 32 */ + const char * (*tclGetExtension) (const char * name); /* 31 */ + int (*tclGetFrame) (Tcl_Interp * interp, const char * str, CallFrame ** framePtrPtr); /* 32 */ void *reserved33; int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ void *reserved35; void *reserved36; int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */ - int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr); /* 38 */ + int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, const char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, const char ** simpleNamePtr); /* 38 */ TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ - int (*tclGetOpenMode) (Tcl_Interp * interp, CONST char * str, int * seekFlagPtr); /* 40 */ + int (*tclGetOpenMode) (Tcl_Interp * interp, const char * str, int * seekFlagPtr); /* 40 */ Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ - char * (*tclpGetUserHome) (CONST char * name, Tcl_DString * bufferPtr); /* 42 */ + char * (*tclpGetUserHome) (const char * name, Tcl_DString * bufferPtr); /* 42 */ void *reserved43; - int (*tclGuessPackageName) (CONST char * fileName, Tcl_DString * bufPtr); /* 44 */ + int (*tclGuessPackageName) (const char * fileName, Tcl_DString * bufPtr); /* 44 */ int (*tclHideUnsafeCommands) (Tcl_Interp * interp); /* 45 */ int (*tclInExit) (void); /* 46 */ void *reserved47; @@ -1179,17 +1179,17 @@ typedef struct TclIntStubs { int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ void *reserved52; int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ - int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 54 */ + int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 54 */ Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ void *reserved56; void *reserved57; - Var * (*tclLookupVar) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, int flags, CONST char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); /* 58 */ + Var * (*tclLookupVar) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, const char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); /* 58 */ void *reserved59; - int (*tclNeedSpace) (CONST char * start, CONST char * end); /* 60 */ + int (*tclNeedSpace) (const char * start, const char * end); /* 60 */ Tcl_Obj * (*tclNewProcBodyObj) (Proc * procPtr); /* 61 */ int (*tclObjCommandComplete) (Tcl_Obj * cmdPtr); /* 62 */ - int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 63 */ - int (*tclObjInvoke) (Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], int flags); /* 64 */ + int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 63 */ + int (*tclObjInvoke) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 64 */ void *reserved65; void *reserved66; void *reserved67; @@ -1213,22 +1213,22 @@ typedef struct TclIntStubs { void *reserved85; void *reserved86; void *reserved87; - char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp * interp, CONST char * name1, CONST char * name2, int flags); /* 88 */ + char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp * interp, const char * name1, const char * name2, int flags); /* 88 */ int (*tclPreventAliasLoop) (Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd); /* 89 */ void *reserved90; void (*tclProcCleanupProc) (Proc * procPtr); /* 91 */ - int (*tclProcCompileProc) (Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, CONST char * description, CONST char * procName); /* 92 */ + int (*tclProcCompileProc) (Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, const char * description, const char * procName); /* 92 */ void (*tclProcDeleteProc) (ClientData clientData); /* 93 */ void *reserved94; void *reserved95; - int (*tclRenameCommand) (Tcl_Interp * interp, CONST char * oldName, CONST char * newName); /* 96 */ + int (*tclRenameCommand) (Tcl_Interp * interp, const char * oldName, const char * newName); /* 96 */ void (*tclResetShadowedCmdRefs) (Tcl_Interp * interp, Command * newCmdPtr); /* 97 */ int (*tclServiceIdle) (void); /* 98 */ void *reserved99; void *reserved100; char * (*tclSetPreInitScript) (char * string); /* 101 */ void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ - int (*tclSockGetPort) (Tcl_Interp * interp, CONST char * str, CONST char * proto, int * portPtr); /* 103 */ + int (*tclSockGetPort) (Tcl_Interp * interp, const char * str, const char * proto, int * portPtr); /* 103 */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ #endif /* UNIX */ @@ -1244,41 +1244,41 @@ typedef struct TclIntStubs { void (*tclTeardownNamespace) (Namespace * nsPtr); /* 108 */ int (*tclUpdateReturnInfo) (Interp * iPtr); /* 109 */ void *reserved110; - void (*tcl_AddInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 111 */ + void (*tcl_AddInterpResolvers) (Tcl_Interp * interp, const char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 111 */ int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 112 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 113 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 113 */ void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 114 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst); /* 115 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 116 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 117 */ - int (*tcl_GetInterpResolvers) (Tcl_Interp * interp, CONST char * name, Tcl_ResolverInfo * resInfo); /* 118 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 115 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 116 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 117 */ + int (*tcl_GetInterpResolvers) (Tcl_Interp * interp, const char * name, Tcl_ResolverInfo * resInfo); /* 118 */ int (*tcl_GetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo); /* 119 */ - Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags); /* 120 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern); /* 121 */ + Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 120 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 121 */ Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 122 */ void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 123 */ Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 124 */ Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 125 */ void (*tcl_GetVariableFullName) (Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr); /* 126 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite); /* 127 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 127 */ void (*tcl_PopCallFrame) (Tcl_Interp * interp); /* 128 */ int (*tcl_PushCallFrame) (Tcl_Interp * interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame); /* 129 */ - int (*tcl_RemoveInterpResolvers) (Tcl_Interp * interp, CONST char * name); /* 130 */ + int (*tcl_RemoveInterpResolvers) (Tcl_Interp * interp, const char * name); /* 130 */ void (*tcl_SetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 131 */ int (*tclpHasSockets) (Tcl_Interp * interp); /* 132 */ - struct tm * (*tclpGetDate) (CONST time_t * time, int useGMT); /* 133 */ + struct tm * (*tclpGetDate) (const time_t * time, int useGMT); /* 133 */ void *reserved134; void *reserved135; void *reserved136; void *reserved137; - CONST84_RETURN char * (*tclGetEnv) (CONST char * name, Tcl_DString * valuePtr); /* 138 */ + CONST84_RETURN char * (*tclGetEnv) (const char * name, Tcl_DString * valuePtr); /* 138 */ void *reserved139; void *reserved140; CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ - CONST86 struct AuxDataType * (*tclGetAuxDataType) (CONST char * typeName); /* 145 */ + CONST86 struct AuxDataType * (*tclGetAuxDataType) (const char * typeName); /* 145 */ TclHandle (*tclHandleCreate) (VOID * ptr); /* 146 */ void (*tclHandleFree) (TclHandle handle); /* 147 */ TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ @@ -1289,9 +1289,9 @@ typedef struct TclIntStubs { Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */ void *reserved154; void *reserved155; - void (*tclRegError) (Tcl_Interp * interp, CONST char * msg, int status); /* 156 */ - Var * (*tclVarTraceExists) (Tcl_Interp * interp, CONST char * varName); /* 157 */ - void (*tclSetStartupScriptFileName) (CONST char * filename); /* 158 */ + void (*tclRegError) (Tcl_Interp * interp, const char * msg, int status); /* 156 */ + Var * (*tclVarTraceExists) (Tcl_Interp * interp, const char * varName); /* 157 */ + void (*tclSetStartupScriptFileName) (const char * filename); /* 158 */ CONST84_RETURN char * (*tclGetStartupScriptFileName) (void); /* 159 */ void *reserved160; int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ @@ -1302,21 +1302,21 @@ typedef struct TclIntStubs { int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ void (*tclSetStartupScriptPath) (Tcl_Obj * pathPtr); /* 167 */ Tcl_Obj * (*tclGetStartupScriptPath) (void); /* 168 */ - int (*tclpUtfNcmp2) (CONST char * s1, CONST char * s2, unsigned long n); /* 169 */ - int (*tclCheckInterpTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 170 */ - int (*tclCheckExecutionTraces) (Tcl_Interp * interp, CONST char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *CONST objv[]); /* 171 */ + int (*tclpUtfNcmp2) (const char * s1, const char * s2, unsigned long n); /* 169 */ + int (*tclCheckInterpTraces) (Tcl_Interp * interp, const char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 170 */ + int (*tclCheckExecutionTraces) (Tcl_Interp * interp, const char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 171 */ int (*tclInThreadExit) (void); /* 172 */ - int (*tclUniCharMatch) (CONST Tcl_UniChar * string, int strLen, CONST Tcl_UniChar * pattern, int ptnLen, int flags); /* 173 */ + int (*tclUniCharMatch) (const Tcl_UniChar * string, int strLen, const Tcl_UniChar * pattern, int ptnLen, int flags); /* 173 */ void *reserved174; - int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, CONST char * part1, CONST char * part2, int flags, int leaveErrMsg); /* 175 */ + int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, const char * part1, const char * part2, int flags, int leaveErrMsg); /* 175 */ void (*tclCleanupVar) (Var * varPtr, Var * arrayPtr); /* 176 */ - void (*tclVarErrMsg) (Tcl_Interp * interp, CONST char * part1, CONST char * part2, CONST char * operation, CONST char * reason); /* 177 */ - void (*tcl_SetStartupScript) (Tcl_Obj * pathPtr, CONST char* encodingName); /* 178 */ - Tcl_Obj * (*tcl_GetStartupScript) (CONST char ** encodingNamePtr); /* 179 */ + void (*tclVarErrMsg) (Tcl_Interp * interp, const char * part1, const char * part2, const char * operation, const char * reason); /* 177 */ + void (*tcl_SetStartupScript) (Tcl_Obj * pathPtr, const char* encodingName); /* 178 */ + Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingNamePtr); /* 179 */ void *reserved180; void *reserved181; - struct tm * (*tclpLocaltime) (CONST time_t * clock); /* 182 */ - struct tm * (*tclpGmtime) (CONST time_t * clock); /* 183 */ + struct tm * (*tclpLocaltime) (const time_t * clock); /* 182 */ + struct tm * (*tclpGmtime) (const time_t * clock); /* 183 */ void *reserved184; void *reserved185; void *reserved186; @@ -1345,7 +1345,7 @@ typedef struct TclIntStubs { void *reserved209; void *reserved210; void *reserved211; - void (*tclpFindExecutable) (CONST char * argv0); /* 212 */ + void (*tclpFindExecutable) (const char * argv0); /* 212 */ Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */ void (*tclSetObjNameOfExecutable) (Tcl_Obj * name, Tcl_Encoding encoding); /* 214 */ void * (*tclStackAlloc) (Tcl_Interp * interp, int numBytes); /* 215 */ @@ -1358,28 +1358,28 @@ typedef struct TclIntStubs { void *reserved222; void *reserved223; TclPlatformType * (*tclGetPlatform) (void); /* 224 */ - Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *CONST keyv[], int flags); /* 225 */ + Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *const keyv[], int flags); /* 225 */ int (*tclObjBeingDeleted) (Tcl_Obj * objPtr); /* 226 */ void (*tclSetNsPath) (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); /* 227 */ void *reserved228; - int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, CONST char * myName, int myFlags, int index); /* 229 */ - Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, CONST char * part2, int flags, CONST char * msg, CONST int createPart1, CONST int createPart2, Var ** arrayPtrPtr); /* 230 */ + int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, const char * myName, int myFlags, int index); /* 229 */ + Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, const char * part2, int flags, const char * msg, const int createPart1, const int createPart2, Var ** arrayPtrPtr); /* 230 */ int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ - int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, CONST CmdFrame * invoker, int word); /* 232 */ + int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 232 */ void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ - Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, CONST char * key, int * newPtr); /* 234 */ + Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ - int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[]); /* 238 */ + int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 238 */ int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 239 */ int (*tclNRRunCallbacks) (Tcl_Interp * interp, int result, struct TEOV_callback * rootPtr, int tebcCall); /* 240 */ - int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, CONST CmdFrame * invoker, int word); /* 241 */ + int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 241 */ int (*tclNREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags, Command * cmdPtr); /* 242 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclIntStubs *tclIntStubsPtr; +extern const TclIntStubs *tclIntStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 2ca2b2c..35c7e52 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.37 2008/07/22 23:01:37 das Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.38 2008/10/22 20:23:59 nijtmans Exp $ */ #ifndef _TCLINTPLATDECLS @@ -42,7 +42,7 @@ #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, Tcl_Channel chan); #endif #ifndef TclpCloseFile_TCL_DECLARED @@ -53,22 +53,22 @@ EXTERN int TclpCloseFile (TclFile file); #ifndef TclpCreateCommandChannel_TCL_DECLARED #define TclpCreateCommandChannel_TCL_DECLARED /* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); #endif #ifndef TclpCreatePipe_TCL_DECLARED #define TclpCreatePipe_TCL_DECLARED /* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, +EXTERN int TclpCreatePipe (TclFile * readPipe, TclFile * writePipe); #endif #ifndef TclpCreateProcess_TCL_DECLARED #define TclpCreateProcess_TCL_DECLARED /* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + const char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); #endif /* Slot 5 is reserved */ @@ -80,7 +80,7 @@ EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); #ifndef TclpOpenFile_TCL_DECLARED #define TclpOpenFile_TCL_DECLARED /* 7 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +EXTERN TclFile TclpOpenFile (const char * fname, int mode); #endif #ifndef TclUnixWaitForFile_TCL_DECLARED #define TclUnixWaitForFile_TCL_DECLARED @@ -90,7 +90,7 @@ EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); #ifndef TclpCreateTempFile_TCL_DECLARED #define TclpCreateTempFile_TCL_DECLARED /* 9 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); +EXTERN TclFile TclpCreateTempFile (const char * contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED @@ -100,12 +100,12 @@ EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED /* 11 */ -EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); +EXTERN struct tm * TclpLocaltime_unix (const time_t * clock); #endif #ifndef TclpGmtime_unix_TCL_DECLARED #define TclpGmtime_unix_TCL_DECLARED /* 12 */ -EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); +EXTERN struct tm * TclpGmtime_unix (const time_t * clock); #endif #ifndef TclpInetNtoa_TCL_DECLARED #define TclpInetNtoa_TCL_DECLARED @@ -115,8 +115,8 @@ EXTERN char * TclpInetNtoa (struct in_addr addr); #ifndef TclUnixCopyFile_TCL_DECLARED #define TclUnixCopyFile_TCL_DECLARED /* 14 */ -EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, - CONST Tcl_StatBuf * statBufPtr, +EXTERN int TclUnixCopyFile (const char * src, const char * dst, + const Tcl_StatBuf * statBufPtr, int dontCopyAtts); #endif #endif /* UNIX */ @@ -134,13 +134,13 @@ EXTERN void TclWinConvertWSAError (DWORD errCode); #ifndef TclWinGetServByName_TCL_DECLARED #define TclWinGetServByName_TCL_DECLARED /* 2 */ -EXTERN struct servent * TclWinGetServByName (CONST char * nm, - CONST char * proto); +EXTERN struct servent * TclWinGetServByName (const char * nm, + const char * proto); #endif #ifndef TclWinGetSockOpt_TCL_DECLARED #define TclWinGetSockOpt_TCL_DECLARED /* 3 */ -EXTERN int TclWinGetSockOpt (int s, int level, int optname, +EXTERN int TclWinGetSockOpt (int s, int level, int optname, char FAR * optval, int FAR * optlen); #endif #ifndef TclWinGetTclInstance_TCL_DECLARED @@ -157,8 +157,8 @@ EXTERN u_short TclWinNToHS (u_short ns); #ifndef TclWinSetSockOpt_TCL_DECLARED #define TclWinSetSockOpt_TCL_DECLARED /* 7 */ -EXTERN int TclWinSetSockOpt (int s, int level, int optname, - CONST char FAR * optval, int optlen); +EXTERN int TclWinSetSockOpt (int s, int level, int optname, + const char FAR * optval, int optlen); #endif #ifndef TclpGetPid_TCL_DECLARED #define TclpGetPid_TCL_DECLARED @@ -174,7 +174,7 @@ EXTERN int TclWinGetPlatformId (void); #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 11 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, Tcl_Channel chan); #endif #ifndef TclpCloseFile_TCL_DECLARED @@ -185,22 +185,22 @@ EXTERN int TclpCloseFile (TclFile file); #ifndef TclpCreateCommandChannel_TCL_DECLARED #define TclpCreateCommandChannel_TCL_DECLARED /* 13 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); #endif #ifndef TclpCreatePipe_TCL_DECLARED #define TclpCreatePipe_TCL_DECLARED /* 14 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, +EXTERN int TclpCreatePipe (TclFile * readPipe, TclFile * writePipe); #endif #ifndef TclpCreateProcess_TCL_DECLARED #define TclpCreateProcess_TCL_DECLARED /* 15 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + const char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); #endif /* Slot 16 is reserved */ @@ -213,7 +213,7 @@ EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); #ifndef TclpOpenFile_TCL_DECLARED #define TclpOpenFile_TCL_DECLARED /* 19 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +EXTERN TclFile TclpOpenFile (const char * fname, int mode); #endif #ifndef TclWinAddProcess_TCL_DECLARED #define TclWinAddProcess_TCL_DECLARED @@ -224,7 +224,7 @@ EXTERN void TclWinAddProcess (HANDLE hProcess, DWORD id); #ifndef TclpCreateTempFile_TCL_DECLARED #define TclpCreateTempFile_TCL_DECLARED /* 22 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); +EXTERN TclFile TclpCreateTempFile (const char * contents); #endif #ifndef TclpGetTZName_TCL_DECLARED #define TclpGetTZName_TCL_DECLARED @@ -262,7 +262,7 @@ EXTERN int TclWinCPUID (unsigned int index, unsigned int * regs); #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, Tcl_Channel chan); #endif #ifndef TclpCloseFile_TCL_DECLARED @@ -273,22 +273,22 @@ EXTERN int TclpCloseFile (TclFile file); #ifndef TclpCreateCommandChannel_TCL_DECLARED #define TclpCreateCommandChannel_TCL_DECLARED /* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, - TclFile writeFile, TclFile errorFile, +EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, + TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); #endif #ifndef TclpCreatePipe_TCL_DECLARED #define TclpCreatePipe_TCL_DECLARED /* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, +EXTERN int TclpCreatePipe (TclFile * readPipe, TclFile * writePipe); #endif #ifndef TclpCreateProcess_TCL_DECLARED #define TclpCreateProcess_TCL_DECLARED /* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - CONST char ** argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, +EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, + const char ** argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); #endif /* Slot 5 is reserved */ @@ -300,7 +300,7 @@ EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); #ifndef TclpOpenFile_TCL_DECLARED #define TclpOpenFile_TCL_DECLARED /* 7 */ -EXTERN TclFile TclpOpenFile (CONST char * fname, int mode); +EXTERN TclFile TclpOpenFile (const char * fname, int mode); #endif #ifndef TclUnixWaitForFile_TCL_DECLARED #define TclUnixWaitForFile_TCL_DECLARED @@ -310,7 +310,7 @@ EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); #ifndef TclpCreateTempFile_TCL_DECLARED #define TclpCreateTempFile_TCL_DECLARED /* 9 */ -EXTERN TclFile TclpCreateTempFile (CONST char * contents); +EXTERN TclFile TclpCreateTempFile (const char * contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED @@ -320,12 +320,12 @@ EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED /* 11 */ -EXTERN struct tm * TclpLocaltime_unix (CONST time_t * clock); +EXTERN struct tm * TclpLocaltime_unix (const time_t * clock); #endif #ifndef TclpGmtime_unix_TCL_DECLARED #define TclpGmtime_unix_TCL_DECLARED /* 12 */ -EXTERN struct tm * TclpGmtime_unix (CONST time_t * clock); +EXTERN struct tm * TclpGmtime_unix (const time_t * clock); #endif #ifndef TclpInetNtoa_TCL_DECLARED #define TclpInetNtoa_TCL_DECLARED @@ -335,71 +335,71 @@ EXTERN char * TclpInetNtoa (struct in_addr addr); #ifndef TclUnixCopyFile_TCL_DECLARED #define TclUnixCopyFile_TCL_DECLARED /* 14 */ -EXTERN int TclUnixCopyFile (CONST char * src, CONST char * dst, - CONST Tcl_StatBuf * statBufPtr, +EXTERN int TclUnixCopyFile (const char * src, const char * dst, + const Tcl_StatBuf * statBufPtr, int dontCopyAtts); #endif #ifndef TclMacOSXGetFileAttribute_TCL_DECLARED #define TclMacOSXGetFileAttribute_TCL_DECLARED /* 15 */ -EXTERN int TclMacOSXGetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, +EXTERN int TclMacOSXGetFileAttribute (Tcl_Interp * interp, + int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr); #endif #ifndef TclMacOSXSetFileAttribute_TCL_DECLARED #define TclMacOSXSetFileAttribute_TCL_DECLARED /* 16 */ -EXTERN int TclMacOSXSetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, +EXTERN int TclMacOSXSetFileAttribute (Tcl_Interp * interp, + int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); #endif #ifndef TclMacOSXCopyFileAttributes_TCL_DECLARED #define TclMacOSXCopyFileAttributes_TCL_DECLARED /* 17 */ -EXTERN int TclMacOSXCopyFileAttributes (CONST char * src, - CONST char * dst, - CONST Tcl_StatBuf * statBufPtr); +EXTERN int TclMacOSXCopyFileAttributes (const char * src, + const char * dst, + const Tcl_StatBuf * statBufPtr); #endif #ifndef TclMacOSXMatchType_TCL_DECLARED #define TclMacOSXMatchType_TCL_DECLARED /* 18 */ -EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, - CONST char * pathName, CONST char * fileName, - Tcl_StatBuf * statBufPtr, +EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, + const char * pathName, const char * fileName, + Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); #endif #endif /* MACOSX */ typedef struct TclIntPlatStubs { int magic; - CONST struct TclIntPlatStubHooks *hooks; + const struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ int (*tclpCloseFile) (TclFile file); /* 1 */ Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, const char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ void *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ + TclFile (*tclpOpenFile) (const char * fname, int mode); /* 7 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ + TclFile (*tclpCreateTempFile) (const char * contents); /* 9 */ Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ + struct tm * (*tclpLocaltime_unix) (const time_t * clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (const time_t * clock); /* 12 */ char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ + int (*tclUnixCopyFile) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ void (*tclWinConvertError) (DWORD errCode); /* 0 */ void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ - struct servent * (*tclWinGetServByName) (CONST char * nm, CONST char * proto); /* 2 */ + struct servent * (*tclWinGetServByName) (const char * nm, const char * proto); /* 2 */ int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ void *reserved5; u_short (*tclWinNToHS) (u_short ns); /* 6 */ - int (*tclWinSetSockOpt) (int s, int level, int optname, CONST char FAR * optval, int optlen); /* 7 */ + int (*tclWinSetSockOpt) (int s, int level, int optname, const char FAR * optval, int optlen); /* 7 */ unsigned long (*tclpGetPid) (Tcl_Pid pid); /* 8 */ int (*tclWinGetPlatformId) (void); /* 9 */ void *reserved10; @@ -407,14 +407,14 @@ typedef struct TclIntPlatStubs { int (*tclpCloseFile) (TclFile file); /* 12 */ Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 13 */ int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 14 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 15 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, const char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 15 */ void *reserved16; void *reserved17; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 19 */ + TclFile (*tclpOpenFile) (const char * fname, int mode); /* 19 */ void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */ void *reserved21; - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 22 */ + TclFile (*tclpCreateTempFile) (const char * contents); /* 22 */ char * (*tclpGetTZName) (int isdst); /* 23 */ char * (*tclWinNoBackslash) (char * path); /* 24 */ void *reserved25; @@ -428,26 +428,26 @@ typedef struct TclIntPlatStubs { int (*tclpCloseFile) (TclFile file); /* 1 */ Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, const char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ void *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (CONST char * fname, int mode); /* 7 */ + TclFile (*tclpOpenFile) (const char * fname, int mode); /* 7 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (CONST char * contents); /* 9 */ + TclFile (*tclpCreateTempFile) (const char * contents); /* 9 */ Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (CONST time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (CONST time_t * clock); /* 12 */ + struct tm * (*tclpLocaltime_unix) (const time_t * clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (const time_t * clock); /* 12 */ char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ + int (*tclUnixCopyFile) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ int (*tclMacOSXGetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr); /* 15 */ int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ - int (*tclMacOSXCopyFileAttributes) (CONST char * src, CONST char * dst, CONST Tcl_StatBuf * statBufPtr); /* 17 */ - int (*tclMacOSXMatchType) (Tcl_Interp * interp, CONST char * pathName, CONST char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ + int (*tclMacOSXCopyFileAttributes) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr); /* 17 */ + int (*tclMacOSXMatchType) (Tcl_Interp * interp, const char * pathName, const char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ #endif /* MACOSX */ } TclIntPlatStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclIntPlatStubs *tclIntPlatStubsPtr; +extern const TclIntPlatStubs *tclIntPlatStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 31f807d..4cdd515 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.9 2008/10/17 18:42:12 nijtmans Exp $ + * $Id: tclOODecls.h,v 1.10 2008/10/22 20:23:59 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -44,9 +44,9 @@ extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); #ifndef Tcl_CopyObjectInstance_TCL_DECLARED #define Tcl_CopyObjectInstance_TCL_DECLARED /* 0 */ -EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, - Tcl_Object sourceObject, - const char * targetName, +EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, + Tcl_Object sourceObject, + const char * targetName, const char * targetNamespaceName); #endif #ifndef Tcl_GetClassAsObject_TCL_DECLARED @@ -67,7 +67,7 @@ EXTERN Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); #ifndef Tcl_GetObjectFromObj_TCL_DECLARED #define Tcl_GetObjectFromObj_TCL_DECLARED /* 4 */ -EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, +EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, Tcl_Obj * objPtr); #endif #ifndef Tcl_GetObjectNamespace_TCL_DECLARED @@ -93,8 +93,8 @@ EXTERN int Tcl_MethodIsPublic (Tcl_Method method); #ifndef Tcl_MethodIsType_TCL_DECLARED #define Tcl_MethodIsType_TCL_DECLARED /* 9 */ -EXTERN int Tcl_MethodIsType (Tcl_Method method, - const Tcl_MethodType * typePtr, +EXTERN int Tcl_MethodIsType (Tcl_Method method, + const Tcl_MethodType * typePtr, ClientData * clientDataPtr); #endif #ifndef Tcl_MethodName_TCL_DECLARED @@ -105,25 +105,25 @@ EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); #ifndef Tcl_NewInstanceMethod_TCL_DECLARED #define Tcl_NewInstanceMethod_TCL_DECLARED /* 11 */ -EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, - Tcl_Object object, Tcl_Obj * nameObj, - int isPublic, const Tcl_MethodType * typePtr, +EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, + Tcl_Object object, Tcl_Obj * nameObj, + int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); #endif #ifndef Tcl_NewMethod_TCL_DECLARED #define Tcl_NewMethod_TCL_DECLARED /* 12 */ -EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, - Tcl_Obj * nameObj, int isPublic, - const Tcl_MethodType * typePtr, +EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, + Tcl_Obj * nameObj, int isPublic, + const Tcl_MethodType * typePtr, ClientData clientData); #endif #ifndef Tcl_NewObjectInstance_TCL_DECLARED #define Tcl_NewObjectInstance_TCL_DECLARED /* 13 */ -EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, - Tcl_Class cls, const char * nameStr, - const char * nsNameStr, int objc, +EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, + Tcl_Class cls, const char * nameStr, + const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); #endif #ifndef Tcl_ObjectDeleted_TCL_DECLARED @@ -156,34 +156,34 @@ EXTERN int Tcl_ObjectContextSkippedArgs ( #ifndef Tcl_ClassGetMetadata_TCL_DECLARED #define Tcl_ClassGetMetadata_TCL_DECLARED /* 19 */ -EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, +EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); #endif #ifndef Tcl_ClassSetMetadata_TCL_DECLARED #define Tcl_ClassSetMetadata_TCL_DECLARED /* 20 */ -EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr, +EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, + const Tcl_ObjectMetadataType * typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectGetMetadata_TCL_DECLARED #define Tcl_ObjectGetMetadata_TCL_DECLARED /* 21 */ -EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, +EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); #endif #ifndef Tcl_ObjectSetMetadata_TCL_DECLARED #define Tcl_ObjectSetMetadata_TCL_DECLARED /* 22 */ -EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr, +EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, + const Tcl_ObjectMetadataType * typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED #define Tcl_ObjectContextInvokeNext_TCL_DECLARED /* 23 */ -EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, - Tcl_ObjectContext context, int objc, +EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, + Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); #endif #ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED @@ -195,29 +195,29 @@ EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( #ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED #define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED /* 25 */ -EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, +EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); #endif #ifndef Tcl_ClassSetConstructor_TCL_DECLARED #define Tcl_ClassSetConstructor_TCL_DECLARED /* 26 */ -EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, +EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); #endif #ifndef Tcl_ClassSetDestructor_TCL_DECLARED #define Tcl_ClassSetDestructor_TCL_DECLARED /* 27 */ -EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, +EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); #endif typedef struct TclOOStubHooks { - CONST struct TclOOIntStubs *tclOOIntStubs; + const struct TclOOIntStubs *tclOOIntStubs; } TclOOStubHooks; typedef struct TclOOStubs { int magic; - CONST struct TclOOStubHooks *hooks; + const struct TclOOStubHooks *hooks; Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ @@ -250,7 +250,7 @@ typedef struct TclOOStubs { } TclOOStubs; #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) -extern CONST TclOOStubs *tclOOStubsPtr; +extern const TclOOStubs *tclOOStubsPtr; #endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index 49aa7de..807c333 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.9 2008/10/17 18:42:12 nijtmans Exp $ + * $Id: tclOOIntDecls.h,v 1.10 2008/10/22 20:23:59 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -38,128 +38,128 @@ EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); #ifndef TclOOMakeProcInstanceMethod_TCL_DECLARED #define TclOOMakeProcInstanceMethod_TCL_DECLARED /* 1 */ -EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, +EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); #endif #ifndef TclOOMakeProcMethod_TCL_DECLARED #define TclOOMakeProcMethod_TCL_DECLARED /* 2 */ -EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - const char * namePtr, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, +EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + const char * namePtr, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, + const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); #endif #ifndef TclOONewProcInstanceMethod_TCL_DECLARED #define TclOONewProcInstanceMethod_TCL_DECLARED /* 3 */ -EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, +EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); #endif #ifndef TclOONewProcMethod_TCL_DECLARED #define TclOONewProcMethod_TCL_DECLARED /* 4 */ -EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, +EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, + Class * clsPtr, int flags, Tcl_Obj * nameObj, + Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); #endif #ifndef TclOOObjectCmdCore_TCL_DECLARED #define TclOOObjectCmdCore_TCL_DECLARED /* 5 */ -EXTERN int TclOOObjectCmdCore (Object * oPtr, - Tcl_Interp * interp, int objc, - Tcl_Obj *const * objv, int publicOnly, +EXTERN int TclOOObjectCmdCore (Object * oPtr, + Tcl_Interp * interp, int objc, + Tcl_Obj *const * objv, int publicOnly, Class * startCls); #endif #ifndef TclOOIsReachable_TCL_DECLARED #define TclOOIsReachable_TCL_DECLARED /* 6 */ -EXTERN int TclOOIsReachable (Class * targetPtr, +EXTERN int TclOOIsReachable (Class * targetPtr, Class * startPtr); #endif #ifndef TclOONewForwardMethod_TCL_DECLARED #define TclOONewForwardMethod_TCL_DECLARED /* 7 */ -EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, - Class * clsPtr, int isPublic, +EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, + Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); #endif #ifndef TclOONewForwardInstanceMethod_TCL_DECLARED #define TclOONewForwardInstanceMethod_TCL_DECLARED /* 8 */ -EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int isPublic, +EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, + Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); #endif #ifndef TclOONewProcInstanceMethodEx_TCL_DECLARED #define TclOONewProcInstanceMethodEx_TCL_DECLARED /* 9 */ -EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, - Tcl_Object oPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, +EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, + Tcl_Object oPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); #endif #ifndef TclOONewProcMethodEx_TCL_DECLARED #define TclOONewProcMethodEx_TCL_DECLARED /* 10 */ -EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, - Tcl_Class clsPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, +EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, + Tcl_Class clsPtr, + TclOO_PreCallProc preCallPtr, + TclOO_PostCallProc postCallPtr, + ProcErrorProc errProc, ClientData clientData, + Tcl_Obj * nameObj, Tcl_Obj * argsObj, + Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); #endif #ifndef TclOOInvokeObject_TCL_DECLARED #define TclOOInvokeObject_TCL_DECLARED /* 11 */ -EXTERN int TclOOInvokeObject (Tcl_Interp * interp, - Tcl_Object object, Tcl_Class startCls, - int publicPrivate, int objc, +EXTERN int TclOOInvokeObject (Tcl_Interp * interp, + Tcl_Object object, Tcl_Class startCls, + int publicPrivate, int objc, Tcl_Obj *const * objv); #endif #ifndef TclOOObjectSetFilters_TCL_DECLARED #define TclOOObjectSetFilters_TCL_DECLARED /* 12 */ -EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, +EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, Tcl_Obj *const * filters); #endif #ifndef TclOOClassSetFilters_TCL_DECLARED #define TclOOClassSetFilters_TCL_DECLARED /* 13 */ -EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, - Class * classPtr, int numFilters, +EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, + Class * classPtr, int numFilters, Tcl_Obj *const * filters); #endif #ifndef TclOOObjectSetMixins_TCL_DECLARED #define TclOOObjectSetMixins_TCL_DECLARED /* 14 */ -EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, +EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, Class *const * mixins); #endif #ifndef TclOOClassSetMixins_TCL_DECLARED #define TclOOClassSetMixins_TCL_DECLARED /* 15 */ -EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, - Class * classPtr, int numMixins, +EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, + Class * classPtr, int numMixins, Class *const * mixins); #endif typedef struct TclOOIntStubs { int magic; - CONST struct TclOOIntStubHooks *hooks; + const struct TclOOIntStubHooks *hooks; Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ @@ -180,7 +180,7 @@ typedef struct TclOOIntStubs { } TclOOIntStubs; #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) -extern CONST TclOOIntStubs *tclOOIntStubsPtr; +extern const TclOOIntStubs *tclOOIntStubsPtr; #endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index b7e49b5..a868584 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.32 2008/07/22 23:01:43 das Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.33 2008/10/22 20:23:59 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -51,13 +51,13 @@ #ifndef Tcl_WinUtfToTChar_TCL_DECLARED #define Tcl_WinUtfToTChar_TCL_DECLARED /* 0 */ -EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len, +EXTERN TCHAR * Tcl_WinUtfToTChar (const char * str, int len, Tcl_DString * dsPtr); #endif #ifndef Tcl_WinTCharToUtf_TCL_DECLARED #define Tcl_WinTCharToUtf_TCL_DECLARED /* 1 */ -EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len, +EXTERN char * Tcl_WinTCharToUtf (const TCHAR * str, int len, Tcl_DString * dsPtr); #endif #endif /* WIN */ @@ -65,37 +65,37 @@ EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len, #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED /* 0 */ -EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, - CONST char * bundleName, int hasResourceFile, +EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, + const char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); #endif #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED /* 1 */ EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( - Tcl_Interp * interp, CONST char * bundleName, - CONST char * bundleVersion, - int hasResourceFile, int maxPathLen, + Tcl_Interp * interp, const char * bundleName, + const char * bundleVersion, + int hasResourceFile, int maxPathLen, char * libraryPath); #endif #endif /* MACOSX */ typedef struct TclPlatStubs { int magic; - CONST struct TclPlatStubHooks *hooks; + const struct TclPlatStubHooks *hooks; #ifdef __WIN32__ /* WIN */ - TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */ - char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ + TCHAR * (*tcl_WinUtfToTChar) (const char * str, int len, Tcl_DString * dsPtr); /* 0 */ + char * (*tcl_WinTCharToUtf) (const TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ - int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ + int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, const char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ + int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, const char * bundleName, const char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ #endif /* MACOSX */ } TclPlatStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclPlatStubs *tclPlatStubsPtr; +extern const TclPlatStubs *tclPlatStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index cdc66e7..a95f056 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1,4 +1,4 @@ -/* +/* * tclStubInit.c -- * * This file contains the initializers for the Tcl stub vectors. @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.166 2008/10/03 00:09:43 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.167 2008/10/22 20:23:59 nijtmans Exp $ */ #include "tclInt.h" @@ -1134,7 +1134,7 @@ static const TclStubs tclStubs = { /* !END!: Do not edit above this line. */ -/* +/* * Module-scope pointers to the main static stubs tables, used for package * initialization via Tcl_PkgProvideEx(). */ diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 62869d4..24eef57 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.28 2008/10/14 22:37:53 nijtmans Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.29 2008/10/22 20:23:59 nijtmans Exp $ */ /* @@ -173,7 +173,7 @@ TclTomMathInitializeStubs( const char *packageName = "tcl::tommath"; const char *errMsg = NULL; ClientData pkgClientData = NULL; - const char *actualVersion = + const char *actualVersion = Tcl_PkgRequireEx(interp, packageName, version, exact, &pkgClientData); TclTomMathStubs *stubsPtr = pkgClientData; diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls index 9ace7fd..ec91aad 100644 --- a/generic/tclTomMath.decls +++ b/generic/tclTomMath.decls @@ -12,8 +12,8 @@ # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: tclTomMath.decls,v 1.4 2008/07/24 22:57:56 nijtmans Exp $ +# +# RCS: @(#) $Id: tclTomMath.decls,v 1.5 2008/10/22 20:23:59 nijtmans Exp $ library tcl @@ -134,7 +134,7 @@ declare 35 generic { int TclBN_mp_radix_size(mp_int* a, int radix, int* size) } declare 36 generic { - int TclBN_mp_read_radix(mp_int* a, CONST char* str, int radix) + int TclBN_mp_read_radix(mp_int* a, const char* str, int radix) } declare 37 generic { void TclBN_mp_rshd(mp_int * a, int shift) diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 203e90c..68521ca 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.8 2008/07/24 22:57:57 nijtmans Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.9 2008/10/22 20:23:59 nijtmans Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -205,13 +205,13 @@ EXTERN int TclBN_mp_count_bits (mp_int* a); #ifndef TclBN_mp_div_TCL_DECLARED #define TclBN_mp_div_TCL_DECLARED /* 13 */ -EXTERN int TclBN_mp_div (mp_int* a, mp_int* b, mp_int* q, +EXTERN int TclBN_mp_div (mp_int* a, mp_int* b, mp_int* q, mp_int* r); #endif #ifndef TclBN_mp_div_d_TCL_DECLARED #define TclBN_mp_div_d_TCL_DECLARED /* 14 */ -EXTERN int TclBN_mp_div_d (mp_int* a, mp_digit b, mp_int* q, +EXTERN int TclBN_mp_div_d (mp_int* a, mp_digit b, mp_int* q, mp_digit* r); #endif #ifndef TclBN_mp_div_2_TCL_DECLARED @@ -222,7 +222,7 @@ EXTERN int TclBN_mp_div_2 (mp_int* a, mp_int* q); #ifndef TclBN_mp_div_2d_TCL_DECLARED #define TclBN_mp_div_2d_TCL_DECLARED /* 16 */ -EXTERN int TclBN_mp_div_2d (mp_int* a, int b, mp_int* q, +EXTERN int TclBN_mp_div_2d (mp_int* a, int b, mp_int* q, mp_int* r); #endif #ifndef TclBN_mp_div_3_TCL_DECLARED @@ -323,7 +323,7 @@ EXTERN int TclBN_mp_radix_size (mp_int* a, int radix, int* size); #ifndef TclBN_mp_read_radix_TCL_DECLARED #define TclBN_mp_read_radix_TCL_DECLARED /* 36 */ -EXTERN int TclBN_mp_read_radix (mp_int* a, CONST char* str, +EXTERN int TclBN_mp_read_radix (mp_int* a, const char* str, int radix); #endif #ifndef TclBN_mp_rshd_TCL_DECLARED @@ -364,19 +364,19 @@ EXTERN int TclBN_mp_sub_d (mp_int* a, mp_digit b, mp_int* c); #ifndef TclBN_mp_to_unsigned_bin_TCL_DECLARED #define TclBN_mp_to_unsigned_bin_TCL_DECLARED /* 44 */ -EXTERN int TclBN_mp_to_unsigned_bin (mp_int* a, +EXTERN int TclBN_mp_to_unsigned_bin (mp_int* a, unsigned char* b); #endif #ifndef TclBN_mp_to_unsigned_bin_n_TCL_DECLARED #define TclBN_mp_to_unsigned_bin_n_TCL_DECLARED /* 45 */ -EXTERN int TclBN_mp_to_unsigned_bin_n (mp_int* a, +EXTERN int TclBN_mp_to_unsigned_bin_n (mp_int* a, unsigned char* b, unsigned long* outlen); #endif #ifndef TclBN_mp_toradix_n_TCL_DECLARED #define TclBN_mp_toradix_n_TCL_DECLARED /* 46 */ -EXTERN int TclBN_mp_toradix_n (mp_int* a, char* str, int radix, +EXTERN int TclBN_mp_toradix_n (mp_int* a, char* str, int radix, int maxlen); #endif #ifndef TclBN_mp_unsigned_bin_size_TCL_DECLARED @@ -402,7 +402,7 @@ EXTERN void TclBN_reverse (unsigned char* s, int len); #ifndef TclBN_fast_s_mp_mul_digs_TCL_DECLARED #define TclBN_fast_s_mp_mul_digs_TCL_DECLARED /* 51 */ -EXTERN int TclBN_fast_s_mp_mul_digs (mp_int * a, mp_int * b, +EXTERN int TclBN_fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs); #endif #ifndef TclBN_fast_s_mp_sqr_TCL_DECLARED @@ -413,7 +413,7 @@ EXTERN int TclBN_fast_s_mp_sqr (mp_int* a, mp_int* b); #ifndef TclBN_mp_karatsuba_mul_TCL_DECLARED #define TclBN_mp_karatsuba_mul_TCL_DECLARED /* 53 */ -EXTERN int TclBN_mp_karatsuba_mul (mp_int* a, mp_int* b, +EXTERN int TclBN_mp_karatsuba_mul (mp_int* a, mp_int* b, mp_int* c); #endif #ifndef TclBN_mp_karatsuba_sqr_TCL_DECLARED @@ -439,7 +439,7 @@ EXTERN int TclBN_s_mp_add (mp_int* a, mp_int* b, mp_int* c); #ifndef TclBN_s_mp_mul_digs_TCL_DECLARED #define TclBN_s_mp_mul_digs_TCL_DECLARED /* 58 */ -EXTERN int TclBN_s_mp_mul_digs (mp_int* a, mp_int* b, mp_int* c, +EXTERN int TclBN_s_mp_mul_digs (mp_int* a, mp_int* b, mp_int* c, int digs); #endif #ifndef TclBN_s_mp_sqr_TCL_DECLARED @@ -455,7 +455,7 @@ EXTERN int TclBN_s_mp_sub (mp_int* a, mp_int* b, mp_int* c); typedef struct TclTomMathStubs { int magic; - CONST struct TclTomMathStubHooks *hooks; + const struct TclTomMathStubHooks *hooks; int (*tclBN_epoch) (void); /* 0 */ int (*tclBN_revision) (void); /* 1 */ @@ -493,7 +493,7 @@ typedef struct TclTomMathStubs { int (*tclBN_mp_neg) (mp_int* a, mp_int* b); /* 33 */ int (*tclBN_mp_or) (mp_int* a, mp_int* b, mp_int* c); /* 34 */ int (*tclBN_mp_radix_size) (mp_int* a, int radix, int* size); /* 35 */ - int (*tclBN_mp_read_radix) (mp_int* a, CONST char* str, int radix); /* 36 */ + int (*tclBN_mp_read_radix) (mp_int* a, const char* str, int radix); /* 36 */ void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ int (*tclBN_mp_shrink) (mp_int* a); /* 38 */ void (*tclBN_mp_set) (mp_int* a, mp_digit b); /* 39 */ @@ -521,7 +521,7 @@ typedef struct TclTomMathStubs { } TclTomMathStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern CONST TclTomMathStubs *tclTomMathStubsPtr; +extern const TclTomMathStubs *tclTomMathStubsPtr; #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 5172a73..17fb4ac 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.28 2008/05/23 21:05:13 andreas_kupries Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.29 2008/10/22 20:24:00 nijtmans Exp $ package require Tcl 8.4 @@ -440,7 +440,7 @@ proc genStubs::makeDecl {name decl index} { [lindex $arg 2] if {[string length $line] + [string length $next] \ + $pad > 76} { - append text $line \n + append text [string trimright $line] \n set line "\t\t\t\t" set pad 28 } @@ -458,7 +458,7 @@ proc genStubs::makeDecl {name decl index} { [lindex $arg 2] if {[string length $line] + [string length $next] \ + $pad > 76} { - append text $line \n + append text [string trimright $line] \n set line "\t\t\t\t" set pad 28 } @@ -984,13 +984,13 @@ proc genStubs::emitHeader {name} { foreach hook $hooks($name) { set capHook [string toupper [string index $hook 0]] append capHook [string range $hook 1 end] - append text " CONST struct ${capHook}Stubs *${hook}Stubs;\n" + append text " const struct ${capHook}Stubs *${hook}Stubs;\n" } append text "} ${capName}StubHooks;\n" } append text "\ntypedef struct ${capName}Stubs {\n" append text " int magic;\n" - append text " CONST struct ${capName}StubHooks *hooks;\n\n" + append text " const struct ${capName}StubHooks *hooks;\n\n" emitSlots $name text @@ -998,7 +998,7 @@ proc genStubs::emitHeader {name} { set upName [string toupper $libraryName] append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n" - append text "extern CONST ${capName}Stubs *${name}StubsPtr;" + append text "extern const ${capName}Stubs *${name}StubsPtr;" append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n" emitMacros $name text @@ -1157,7 +1157,7 @@ proc genStubs::init {} { if {[string length [namespace which lassign]] == 0} { proc lassign {valueList args} { if {[llength $args] == 0} { - error "wrong # args: lassign list varname ?varname..?" + error "wrong # args: should be \"lassign list varName ?varName ...?\"" } uplevel [list foreach $args $valueList {break}] return [lrange $valueList [llength $args] end] -- cgit v0.12 From 2c7191c9a51dde1c2cd6c52ad41426d4e60377f8 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 23 Oct 2008 03:28:09 +0000 Subject: * generic/tclCmdAH.c (ForNextCallback): handle TCL_CONTINUE in the for body [Bug 2186888]. --- ChangeLog | 5 +++++ generic/tclCmdAH.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b89232..16d31b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-23 Miguel Sofer + + * generic/tclCmdAH.c (ForNextCallback): handle TCL_CONTINUE in + the for body [Bug 2186888]. + 2008-10-22 Jan Nijtmans * generic/tcl.h: CONST -> const and white-spacing diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 2e9b5b9..724e80b 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.107 2008/10/17 16:32:58 dgp Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.108 2008/10/23 03:28:09 msofer Exp $ */ #include "tclInt.h" @@ -1763,7 +1763,7 @@ ForNextCallback( char *msg = data[3]; - if (result == TCL_OK) { + if ((result == TCL_OK) || (result == TCL_CONTINUE)) { /* * TIP #280. Make invoking context available to next script. * -- cgit v0.12 From a5a02e5016e0e63058f91dbf21fd31419a9d00d1 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 23 Oct 2008 12:18:47 +0000 Subject: only create test.dat file on windows, it is never used on unix and creation may fail due to insufficient permissions --- tests/winFile.test | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/winFile.test b/tests/winFile.test index 1c33004..d502b30 100644 --- a/tests/winFile.test +++ b/tests/winFile.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFile.test,v 1.21 2008/04/10 00:21:02 dkf Exp $ +# RCS: @(#) $Id: winFile.test,v 1.22 2008/10/23 12:18:47 das Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -158,13 +158,15 @@ proc test_access {fname read writ} { return "Problem [join $problem \n]\nActual rights are: [cacls $fname]" } -# Create the test file -# NOTE: [tcltest::makeFile] not used. Presumably to force file -# creation in a particular filesystem? If not, try [makeFile] -# in a -setup script. -set fname test.dat -file delete $fname -close [open $fname w] +if {[testConstraint win]} { + # Create the test file + # NOTE: [tcltest::makeFile] not used. Presumably to force file + # creation in a particular filesystem? If not, try [makeFile] + # in a -setup script. + set fname test.dat + file delete $fname + close [open $fname w] +} test winFile-4.0 { Enhanced NTFS user/group permissions: test no acccess @@ -230,7 +232,9 @@ test winFile-4.4 { test_access $fname 1 1 } -result {} -file delete $fname +if {[testConstraint win]} { + file delete $fname +} # cleanup cleanupTests -- cgit v0.12 From 6e17c8ff854c2c7d06c9bd399e3d24f3891d18e6 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Thu, 23 Oct 2008 23:17:38 +0000 Subject: Fixed a failure to read SHOUTcast streams with the new 2.7 package. Introduced a new intial state as the first response may not be HTTP*. --- ChangeLog | 6 ++++++ library/http/http.tcl | 17 ++++++++++------- library/http/pkgIndex.tcl | 2 +- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16d31b3..1c2f9b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-24 Pat Thoyts + + * library/http/http.tcl: Fixed a failure to read SHOUTcast streams + with the new 2.7 package. Introduced a new intial state as the + first response may not be HTTP*. + 2008-10-23 Miguel Sofer * generic/tclCmdAH.c (ForNextCallback): handle TCL_CONTINUE in diff --git a/library/http/http.tcl b/library/http/http.tcl index 046329b..fab054f 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,12 +8,12 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.71 2008/08/11 21:58:07 dgp Exp $ +# RCS: @(#) $Id: http.tcl,v 1.72 2008/10/23 23:17:38 patthoyts Exp $ package require Tcl 8.4 # Keep this in sync with pkgIndex.tcl and with the install directories # in Makefiles -package provide http 2.7.1 +package provide http 2.7.2 namespace eval http { # Allow resourcing to not clobber existing data @@ -319,7 +319,7 @@ proc http::geturl { url args } { -queryprogress {} -protocol 1.1 binary 0 - state header + state connecting meta {} coding {} currentsize 0 @@ -942,7 +942,12 @@ proc http::Event {sock token} { CloseSocket $sock return } - if {$state(state) eq "header"} { + if {$state(state) eq "connecting"} { + set state(state) "header" + if {[catch {gets $sock state(http)} n]} { + return [Finish $token $n] + } + } elseif {$state(state) eq "header"} { if {[catch {gets $sock line} n]} { return [Finish $token $n] } elseif {$n == 0} { @@ -985,7 +990,7 @@ proc http::Event {sock token} { fconfigure $state(-channel) -translation binary } } - if {[info exists state(-channel)] && + if {[info exists state(-channel)] && ![info exists state(-handler)]} { # Initiate a sequence of background fcopies fileevent $sock readable {} @@ -1019,8 +1024,6 @@ proc http::Event {sock token} { } } lappend state(meta) $key [string trim $value] - } elseif {[string match HTTP* $line]} { - set state(http) $line } } } else { diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 932017a..6badcea 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,4 +1,4 @@ # Tcl package index file, version 1.1 if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded http 2.7.1 [list tclPkgSetup $dir http 2.7.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.7.2 [list tclPkgSetup $dir http 2.7.2 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in index 7ead8d7..afe0eec 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.246 2008/08/29 12:37:16 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.247 2008/10/23 23:17:38 patthoyts Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -800,8 +800,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.7.1 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.1.tm; + @echo "Installing package http 2.7.2 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.2.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index 53d4148..1be741a 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.135 2008/08/29 12:37:17 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.136 2008/10/23 23:17:38 patthoyts Exp $ VERSION = @TCL_VERSION@ @@ -637,8 +637,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.7.1 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.1.tm; + @echo "Installing package http 2.7.2 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.2.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ -- cgit v0.12 From fa1e0944fbc80713ec2e806311d2aa6bdbbcbffb Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 24 Oct 2008 00:40:08 +0000 Subject: Removed a rogue ^M from the end of a line --- tools/man2tcl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/man2tcl.c b/tools/man2tcl.c index a840f57..3169177 100644 --- a/tools/man2tcl.c +++ b/tools/man2tcl.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: man2tcl.c,v 1.16 2008/10/06 18:38:39 mistachkin Exp $ + * RCS: @(#) $Id: man2tcl.c,v 1.17 2008/10/24 00:40:08 patthoyts Exp $ */ static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08"; @@ -352,7 +352,7 @@ DoText( sscanf(p,"%d",&ch); PRINT(("text \\u%04x\n", ch)); while(*p&&*p!='\'') p++; - p++; + p++; } else if (*p != 0) { PRINT(("char {\\%c}\n", *p)); p++; -- cgit v0.12 From c2a4f7e6129491089c0fa4d0202ed91617d29591 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 26 Oct 2008 12:45:04 +0000 Subject: Style improvements - invoking callbacks without visual junk. --- unix/tclLoadAix.c | 10 +++++----- unix/tclUnixChan.c | 4 ++-- unix/tclUnixEvent.c | 4 ++-- unix/tclUnixFCmd.c | 10 +++++----- unix/tclUnixNotfy.c | 6 +++--- unix/tclUnixTime.c | 10 +++++----- unix/tclXtNotify.c | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c index d238e9a..b0dc640 100644 --- a/unix/tclLoadAix.c +++ b/unix/tclLoadAix.c @@ -17,7 +17,7 @@ * for any results of using the software, alterations are clearly marked * as such, and this notice is not modified. * - * RCS: @(#) $Id: tclLoadAix.c,v 1.6 2007/04/16 13:36:36 dkf Exp $ + * RCS: @(#) $Id: tclLoadAix.c,v 1.7 2008/10/26 12:45:04 dkf Exp $ * * Note: this file has been altered from the original in a few ways in order * to work properly with Tcl. @@ -213,7 +213,7 @@ dlopen( if (mp->info = (struct dl_info *)dlsym(mp, "dl_info")) { if (mp->info->init) { - (*mp->info->init)(); + mp->info->init(); } } else { errvalid = 0; @@ -226,7 +226,7 @@ dlopen( if (mp->cdtors = (CdtorPtr) dlsym(mp, "__cdtors")) { while (mp->cdtors->init) { - (*mp->cdtors->init)(); + mp->cdtors->init(); mp->cdtors++; } } else { @@ -328,12 +328,12 @@ dlclose( } if (mp->info && mp->info->fini) { - (*mp->info->fini)(); + mp->info->fini(); } if (mp->cdtors) { while (mp->cdtors->term) { - (*mp->cdtors->term)(); + mp->cdtors->term(); mp->cdtors++; } } diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index a80e7bb..653f223 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.95 2008/10/08 21:35:17 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.96 2008/10/26 12:45:04 dkf Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -2770,7 +2770,7 @@ TcpAccept( "auto crlf"); if (sockState->acceptProc != NULL) { - (*sockState->acceptProc)(sockState->acceptProcData, + sockState->acceptProc(sockState->acceptProcData, newSockState->channel, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); } diff --git a/unix/tclUnixEvent.c b/unix/tclUnixEvent.c index 214bf4c..a5edb3a 100644 --- a/unix/tclUnixEvent.c +++ b/unix/tclUnixEvent.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixEvent.c,v 1.9 2005/11/02 23:26:50 dkf Exp $ + * RCS: @(#) $Id: tclUnixEvent.c,v 1.10 2008/10/26 12:45:04 dkf Exp $ */ #include "tclInt.h" @@ -64,7 +64,7 @@ Tcl_Sleep( } if ((vdelay.sec != 0) || (vdelay.usec != 0)) { - (*tclScaleTimeProcPtr) (&vdelay, tclTimeClientData); + tclScaleTimeProcPtr(&vdelay, tclTimeClientData); } delay.tv_sec = vdelay.sec; diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 082449a..868e98e 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.68 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.69 2008/10/26 12:45:04 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -948,7 +948,7 @@ TraverseUnixTree( * Process the regular file */ - return (*traverseProc)(sourcePtr, targetPtr, &statBuf, DOTREE_F, + return traverseProc(sourcePtr, targetPtr, &statBuf, DOTREE_F, errorPtr); } #ifndef HAVE_FTS @@ -961,7 +961,7 @@ TraverseUnixTree( errfile = source; goto end; } - result = (*traverseProc)(sourcePtr, targetPtr, &statBuf, DOTREE_PRED, + result = traverseProc(sourcePtr, targetPtr, &statBuf, DOTREE_PRED, errorPtr); if (result != TCL_OK) { closedir(dirPtr); @@ -1035,7 +1035,7 @@ TraverseUnixTree( * that directory. */ - result = (*traverseProc)(sourcePtr, targetPtr, &statBuf, DOTREE_POSTD, + result = traverseProc(sourcePtr, targetPtr, &statBuf, DOTREE_POSTD, errorPtr); } #else /* HAVE_FTS */ @@ -1089,7 +1089,7 @@ TraverseUnixTree( statBufPtr = (Tcl_StatBuf *) ent->fts_statp; } } - result = (*traverseProc)(sourcePtr, targetPtr, statBufPtr, type, + result = traverseProc(sourcePtr, targetPtr, statBufPtr, type, errorPtr); if (result != TCL_OK) { break; diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index e285f03..eae0ee9 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.36 2008/07/24 21:54:42 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.37 2008/10/26 12:45:04 dkf Exp $ */ #include "tclInt.h" @@ -642,7 +642,7 @@ FileHandlerEventProc( mask = filePtr->readyMask & filePtr->mask; filePtr->readyMask = 0; if (mask != 0) { - (*filePtr->proc)(filePtr->clientData, mask); + filePtr->proc(filePtr->clientData, mask); } break; } @@ -710,7 +710,7 @@ Tcl_WaitForEvent( myTime.usec = timePtr->usec; if (myTime.sec != 0 || myTime.usec != 0) { - (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); + tclScaleTimeProcPtr(&myTime, tclTimeClientData); } #ifdef TCL_THREADS diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index 4f40980..d3ec43e 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTime.c,v 1.35 2008/04/27 22:21:35 dkf Exp $ + * RCS: @(#) $Id: tclUnixTime.c,v 1.36 2008/10/26 12:45:04 dkf Exp $ */ #include "tclInt.h" @@ -114,7 +114,7 @@ TclpGetClicks(void) if (tclGetTimeProcPtr != NativeGetTime) { Tcl_Time time; - (*tclGetTimeProcPtr) (&time, tclTimeClientData); + tclGetTimeProcPtr(&time, tclTimeClientData); now = time.sec*1000000 + time.usec; } else { /* @@ -127,7 +127,7 @@ TclpGetClicks(void) #else Tcl_Time time; - (*tclGetTimeProcPtr) (&time, tclTimeClientData); + tclGetTimeProcPtr(&time, tclTimeClientData); now = time.sec*1000000 + time.usec; #endif @@ -162,7 +162,7 @@ TclpGetWideClicks(void) if (tclGetTimeProcPtr != NativeGetTime) { Tcl_Time time; - (*tclGetTimeProcPtr) (&time, tclTimeClientData); + tclGetTimeProcPtr(&time, tclTimeClientData); now = (Tcl_WideInt) (time.sec*1000000 + time.usec); } else { #ifdef MAC_OSX_TCL @@ -363,7 +363,7 @@ void Tcl_GetTime( Tcl_Time *timePtr) /* Location to store time information. */ { - (*tclGetTimeProcPtr) (timePtr, tclTimeClientData); + tclGetTimeProcPtr(timePtr, tclTimeClientData); } /* diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index f21e938..46f5657 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtNotify.c,v 1.9 2007/04/16 13:36:36 dkf Exp $ + * RCS: @(#) $Id: tclXtNotify.c,v 1.10 2008/10/26 12:45:04 dkf Exp $ */ #include @@ -596,7 +596,7 @@ FileHandlerEventProc( mask = filePtr->readyMask & filePtr->mask; filePtr->readyMask = 0; if (mask != 0) { - (*filePtr->proc)(filePtr->clientData, mask); + filePtr->proc(filePtr->clientData, mask); } break; } -- cgit v0.12 From d84707cdee0b26bca07af2756cb4e234e11a6195 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 26 Oct 2008 18:34:03 +0000 Subject: Style improvements - invoking callbacks without visual junk. --- generic/regexec.c | 2 +- generic/tclAsync.c | 4 +- generic/tclBinary.c | 98 +++-- generic/tclClock.c | 409 ++++++++++---------- generic/tclCmdAH.c | 4 +- generic/tclCompExpr.c | 4 +- generic/tclCompile.c | 18 +- generic/tclEncoding.c | 84 ++--- generic/tclEvent.c | 11 +- generic/tclExecute.c | 15 +- generic/tclHistory.c | 4 +- generic/tclIO.c | 98 +++-- generic/tclIORTrans.c | 994 +++++++++++++++++++++++++------------------------ generic/tclNamesp.c | 8 +- generic/tclNotify.c | 14 +- generic/tclObj.c | 22 +- generic/tclPanic.c | 6 +- generic/tclParse.c | 8 +- generic/tclPathObj.c | 14 +- generic/tclPreserve.c | 6 +- generic/tclResult.c | 14 +- generic/tclStringObj.c | 9 +- generic/tclTimer.c | 8 +- generic/tclTrace.c | 18 +- generic/tclUtil.c | 19 +- generic/tclVar.c | 10 +- win/tclWin32Dll.c | 6 +- win/tclWinChan.c | 8 +- win/tclWinFCmd.c | 120 +++--- win/tclWinFile.c | 116 +++--- win/tclWinInit.c | 4 +- win/tclWinLoad.c | 6 +- win/tclWinNotify.c | 8 +- win/tclWinPipe.c | 31 +- win/tclWinReg.c | 44 +-- win/tclWinSerial.c | 8 +- win/tclWinSock.c | 8 +- win/tclWinTime.c | 8 +- 38 files changed, 1132 insertions(+), 1136 deletions(-) diff --git a/generic/regexec.c b/generic/regexec.c index 24edb41..ed6ceec 100644 --- a/generic/regexec.c +++ b/generic/regexec.c @@ -1132,7 +1132,7 @@ cbrdissect( i = 0; for (p = begin; p <= stop && (i < max || max == INFINITY); p += len) { - if ((*v->g->compare)(paren, p, len) != 0) { + if (v->g->compare(paren, p, len) != 0) { break; } i++; diff --git a/generic/tclAsync.c b/generic/tclAsync.c index 1e5733e..175eaad 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAsync.c,v 1.16 2008/05/03 19:31:07 das Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.17 2008/10/26 18:34:03 dkf Exp $ */ #include "tclInt.h" @@ -237,7 +237,7 @@ Tcl_AsyncInvoke( } asyncPtr->ready = 0; Tcl_MutexUnlock(&tsdPtr->asyncMutex); - code = (*asyncPtr->proc)(asyncPtr->clientData, interp, code); + code = asyncPtr->proc(asyncPtr->clientData, interp, code); Tcl_MutexLock(&tsdPtr->asyncMutex); } tsdPtr->asyncActive = 0; diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 4073a61..680ef41 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.48 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.49 2008/10/26 18:34:03 dkf Exp $ */ #include "tclInt.h" @@ -71,7 +71,7 @@ static void UpdateStringOfByteArray(Tcl_Obj *listPtr); static void DeleteScanNumberCache(Tcl_HashTable *numberCachePtr); static int NeedReversing(int format); static void CopyNumber(const void *from, void *to, - unsigned int length, int type); + unsigned length, int type); /* Binary ensemble commands */ static int BinaryFormatCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -452,7 +452,7 @@ SetByteArrayFromAny( byteArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length)); for (dst = byteArrayPtr->bytes; src < srcEnd; ) { src += Tcl_UtfToUniChar(src, &ch); - *dst++ = (unsigned char) ch; + *dst++ = UCHAR(ch); } byteArrayPtr->used = dst - byteArrayPtr->bytes; @@ -977,7 +977,7 @@ BinaryFormatCmd( goto badValue; } if (((offset + 1) % 8) == 0) { - *cursor++ = (unsigned char) value; + *cursor++ = UCHAR(value); value = 0; } } @@ -992,7 +992,7 @@ BinaryFormatCmd( goto badValue; } if (!((offset + 1) % 8)) { - *cursor++ = (unsigned char) value; + *cursor++ = UCHAR(value); value = 0; } } @@ -1003,7 +1003,7 @@ BinaryFormatCmd( } else { value >>= 8 - (offset % 8); } - *cursor++ = (unsigned char) value; + *cursor++ = UCHAR(value); } while (cursor < last) { *cursor++ = '\0'; @@ -1067,7 +1067,7 @@ BinaryFormatCmd( } value |= ((c << 4) & 0xf0); if (offset % 2) { - *cursor++ = (unsigned char)(value & 0xff); + *cursor++ = UCHAR(value & 0xff); value = 0; } } @@ -1078,7 +1078,7 @@ BinaryFormatCmd( } else { value >>= 4; } - *cursor++ = (unsigned char) value; + *cursor++ = UCHAR(value); } while (cursor < last) { @@ -1751,7 +1751,7 @@ static void CopyNumber( const void *from, /* source */ void *to, /* destination */ - unsigned int length, /* Number of bytes to copy */ + unsigned length, /* Number of bytes to copy */ int type) /* What type of thing are we copying? */ { switch (NeedReversing(type)) { @@ -1904,23 +1904,23 @@ FormatNumber( return TCL_ERROR; } if (NeedReversing(type)) { - *(*cursorPtr)++ = (unsigned char) wvalue; - *(*cursorPtr)++ = (unsigned char) (wvalue >> 8); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 16); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 24); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 32); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 40); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 48); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 56); + *(*cursorPtr)++ = UCHAR(wvalue); + *(*cursorPtr)++ = UCHAR(wvalue >> 8); + *(*cursorPtr)++ = UCHAR(wvalue >> 16); + *(*cursorPtr)++ = UCHAR(wvalue >> 24); + *(*cursorPtr)++ = UCHAR(wvalue >> 32); + *(*cursorPtr)++ = UCHAR(wvalue >> 40); + *(*cursorPtr)++ = UCHAR(wvalue >> 48); + *(*cursorPtr)++ = UCHAR(wvalue >> 56); } else { - *(*cursorPtr)++ = (unsigned char) (wvalue >> 56); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 48); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 40); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 32); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 24); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 16); - *(*cursorPtr)++ = (unsigned char) (wvalue >> 8); - *(*cursorPtr)++ = (unsigned char) wvalue; + *(*cursorPtr)++ = UCHAR(wvalue >> 56); + *(*cursorPtr)++ = UCHAR(wvalue >> 48); + *(*cursorPtr)++ = UCHAR(wvalue >> 40); + *(*cursorPtr)++ = UCHAR(wvalue >> 32); + *(*cursorPtr)++ = UCHAR(wvalue >> 24); + *(*cursorPtr)++ = UCHAR(wvalue >> 16); + *(*cursorPtr)++ = UCHAR(wvalue >> 8); + *(*cursorPtr)++ = UCHAR(wvalue); } return TCL_OK; @@ -1934,15 +1934,15 @@ FormatNumber( return TCL_ERROR; } if (NeedReversing(type)) { - *(*cursorPtr)++ = (unsigned char) value; - *(*cursorPtr)++ = (unsigned char) (value >> 8); - *(*cursorPtr)++ = (unsigned char) (value >> 16); - *(*cursorPtr)++ = (unsigned char) (value >> 24); + *(*cursorPtr)++ = UCHAR(value); + *(*cursorPtr)++ = UCHAR(value >> 8); + *(*cursorPtr)++ = UCHAR(value >> 16); + *(*cursorPtr)++ = UCHAR(value >> 24); } else { - *(*cursorPtr)++ = (unsigned char) (value >> 24); - *(*cursorPtr)++ = (unsigned char) (value >> 16); - *(*cursorPtr)++ = (unsigned char) (value >> 8); - *(*cursorPtr)++ = (unsigned char) value; + *(*cursorPtr)++ = UCHAR(value >> 24); + *(*cursorPtr)++ = UCHAR(value >> 16); + *(*cursorPtr)++ = UCHAR(value >> 8); + *(*cursorPtr)++ = UCHAR(value); } return TCL_OK; @@ -1956,11 +1956,11 @@ FormatNumber( return TCL_ERROR; } if (NeedReversing(type)) { - *(*cursorPtr)++ = (unsigned char) value; - *(*cursorPtr)++ = (unsigned char) (value >> 8); + *(*cursorPtr)++ = UCHAR(value); + *(*cursorPtr)++ = UCHAR(value >> 8); } else { - *(*cursorPtr)++ = (unsigned char) (value >> 8); - *(*cursorPtr)++ = (unsigned char) value; + *(*cursorPtr)++ = UCHAR(value >> 8); + *(*cursorPtr)++ = UCHAR(value); } return TCL_OK; @@ -1971,7 +1971,7 @@ FormatNumber( if (TclGetLongFromObj(interp, src, &value) != TCL_OK) { return TCL_ERROR; } - *(*cursorPtr)++ = (unsigned char) value; + *(*cursorPtr)++ = UCHAR(value); return TCL_OK; default: @@ -2076,7 +2076,7 @@ ScanNumber( value = (long) (buffer[3] + (buffer[2] << 8) + (buffer[1] << 16) - + (((long)buffer[0]) << 24)); + + (((long) buffer[0]) << 24)); } /* @@ -2089,9 +2089,9 @@ ScanNumber( if (flags & BINARY_UNSIGNED) { return Tcl_NewWideIntObj((Tcl_WideInt)(unsigned long)value); } - if ((value & (((unsigned int)1)<<31)) && (value > 0)) { - value -= (((unsigned int)1)<<31); - value -= (((unsigned int)1)<<31); + if ((value & (((unsigned) 1)<<31)) && (value > 0)) { + value -= (((unsigned) 1)<<31); + value -= (((unsigned) 1)<<31); } returnNumericObject: @@ -2104,13 +2104,13 @@ ScanNumber( hPtr = Tcl_CreateHashEntry(tablePtr, (char *)value, &isNew); if (!isNew) { - return (Tcl_Obj *) Tcl_GetHashValue(hPtr); + return Tcl_GetHashValue(hPtr); } if (tablePtr->numEntries <= BINARY_SCAN_MAX_CACHE) { register Tcl_Obj *objPtr = Tcl_NewLongObj(value); Tcl_IncrRefCount(objPtr); - Tcl_SetHashValue(hPtr, (ClientData) objPtr); + Tcl_SetHashValue(hPtr, objPtr); return objPtr; } @@ -2360,10 +2360,9 @@ BinaryDecodeHex( if (!isxdigit((int) c)) { if (strict) { goto badChar; - } else { - i--; - continue; } + i--; + continue; } value <<= 4; c -= '0'; @@ -2572,10 +2571,9 @@ BinaryDecodeUu( if (c < 33 || c > 96) { if (strict) { goto badUu; - } else { - i--; - continue; } + i--; + continue; } } else { ++cut; diff --git a/generic/tclClock.c b/generic/tclClock.c index 8b2e259..7b445ca 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -7,12 +7,12 @@ * * Copyright 1991-1995 Karl Lehenbauer and Mark Diekhans. * Copyright (c) 1995 Sun Microsystems, Inc. - * Copyright (c) 2004 by Kevin B. Kenny. All rights reserved. + * Copyright (c) 2004 by Kevin B. Kenny. All rights reserved. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.71 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.72 2008/10/26 18:34:03 dkf Exp $ */ #include "tclInt.h" @@ -33,12 +33,12 @@ #define SECONDS_PER_DAY 86400 #define JULIAN_SEC_POSIX_EPOCH (((Tcl_WideInt) JULIAN_DAY_POSIX_EPOCH) \ * SECONDS_PER_DAY) -#define FOUR_CENTURIES 146097 /* days */ +#define FOUR_CENTURIES 146097 /* days */ #define JDAY_1_JAN_1_CE_JULIAN 1721424 #define JDAY_1_JAN_1_CE_GREGORIAN 1721426 -#define ONE_CENTURY_GREGORIAN 36524 /* days */ -#define FOUR_YEARS 1461 /* days */ -#define ONE_YEAR 365 /* days */ +#define ONE_CENTURY_GREGORIAN 36524 /* days */ +#define FOUR_YEARS 1461 /* days */ +#define ONE_YEAR 365 /* days */ /* * Table of the days in each month, leap and common years @@ -94,8 +94,8 @@ static const char *const literals[] = { */ typedef struct ClockClientData { - int refCount; /* Number of live references */ - Tcl_Obj** literals; /* Pool of object literals */ + int refCount; /* Number of live references. */ + Tcl_Obj **literals; /* Pool of object literals. */ } ClockClientData; /* @@ -109,7 +109,7 @@ typedef struct TclDateFields { * from the Posix epoch */ int tzOffset; /* Time zone offset in seconds east of * Greenwich */ - Tcl_Obj* tzName; /* Time zone name */ + Tcl_Obj *tzName; /* Time zone name */ int julianDay; /* Julian Day Number in local time zone */ enum {BCE=1, CE=0} era; /* Era */ int gregorian; /* Flag == 1 if the date is Gregorian */ @@ -141,26 +141,26 @@ TCL_DECLARE_MUTEX(clockMutex) * Function prototypes for local procedures in this file: */ -static int ConvertUTCToLocal(Tcl_Interp*, - TclDateFields*, Tcl_Obj*, int); -static int ConvertUTCToLocalUsingTable(Tcl_Interp*, - TclDateFields*, int, Tcl_Obj *const[]); -static int ConvertUTCToLocalUsingC(Tcl_Interp*, - TclDateFields*, int); -static int ConvertLocalToUTC(Tcl_Interp*, - TclDateFields*, Tcl_Obj*, int); -static int ConvertLocalToUTCUsingTable(Tcl_Interp*, - TclDateFields*, int, Tcl_Obj *const[]); -static int ConvertLocalToUTCUsingC(Tcl_Interp*, - TclDateFields*, int); -static Tcl_Obj* LookupLastTransition(Tcl_Interp*, Tcl_WideInt, +static int ConvertUTCToLocal(Tcl_Interp *, + TclDateFields *, Tcl_Obj *, int); +static int ConvertUTCToLocalUsingTable(Tcl_Interp *, + TclDateFields *, int, Tcl_Obj *const[]); +static int ConvertUTCToLocalUsingC(Tcl_Interp *, + TclDateFields *, int); +static int ConvertLocalToUTC(Tcl_Interp *, + TclDateFields *, Tcl_Obj *, int); +static int ConvertLocalToUTCUsingTable(Tcl_Interp *, + TclDateFields *, int, Tcl_Obj *const[]); +static int ConvertLocalToUTCUsingC(Tcl_Interp *, + TclDateFields *, int); +static Tcl_Obj * LookupLastTransition(Tcl_Interp *, Tcl_WideInt, int, Tcl_Obj *const *); -static void GetYearWeekDay(TclDateFields*, int); -static void GetGregorianEraYearDay(TclDateFields*, int); -static void GetMonthDay(TclDateFields*); -static void GetJulianDayFromEraYearWeekDay(TclDateFields*, int); -static void GetJulianDayFromEraYearMonthDay(TclDateFields*, int); -static int IsGregorianLeapYear(TclDateFields*); +static void GetYearWeekDay(TclDateFields *, int); +static void GetGregorianEraYearDay(TclDateFields *, int); +static void GetMonthDay(TclDateFields *); +static void GetJulianDayFromEraYearWeekDay(TclDateFields *, int); +static void GetJulianDayFromEraYearMonthDay(TclDateFields *, int); +static int IsGregorianLeapYear(TclDateFields *); static int WeekdayOnOrBefore(int, int); static int ClockClicksObjCmd( ClientData clientData, Tcl_Interp *interp, @@ -187,7 +187,7 @@ static int ClockMillisecondsObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ClockParseformatargsObjCmd( - ClientData clientData, Tcl_Interp* interp, + ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ClockSecondsObjCmd( ClientData clientData, Tcl_Interp *interp, @@ -225,7 +225,7 @@ static const struct ClockCommand clockCommands[] = { { "ParseFormatArgs", ClockParseformatargsObjCmd }, { NULL, NULL } }; - + /* *---------------------------------------------------------------------- * @@ -261,7 +261,7 @@ TclClockInit( data = (ClockClientData *) ckalloc(sizeof(ClockClientData)); data->refCount = 0; - data->literals = (Tcl_Obj**) ckalloc(LIT__END * sizeof(Tcl_Obj*)); + data->literals = (Tcl_Obj **) ckalloc(LIT__END * sizeof(Tcl_Obj*)); for (i = 0; i < LIT__END; ++i) { data->literals[i] = Tcl_NewStringObj(literals[i], -1); Tcl_IncrRefCount(data->literals[i]); @@ -280,7 +280,7 @@ TclClockInit( ClockDeleteCmdProc); } } - + /* *---------------------------------------------------------------------- * @@ -310,15 +310,15 @@ TclClockInit( static int ClockConvertlocaltoutcObjCmd( - ClientData clientData, /* Client data */ - Tcl_Interp* interp, /* Tcl interpreter */ + ClientData clientData, /* Client data */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter vector */ { - ClockClientData* data = (ClockClientData*) clientData; - Tcl_Obj* const * literals = data->literals; - Tcl_Obj* secondsObj; - Tcl_Obj* dict; + ClockClientData *data = clientData; + Tcl_Obj *const *literals = data->literals; + Tcl_Obj *secondsObj; + Tcl_Obj *dict; int changeover; TclDateFields fields; int created = 0; @@ -334,16 +334,16 @@ ClockConvertlocaltoutcObjCmd( } dict = objv[1]; if (Tcl_DictObjGet(interp, dict, literals[LIT_LOCALSECONDS], - &secondsObj)!= TCL_OK) { + &secondsObj)!= TCL_OK) { return TCL_ERROR; } if (secondsObj == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("key \"localseconds\" not " - "found in dictionary", -1)); + "found in dictionary", -1)); return TCL_ERROR; } if ((Tcl_GetWideIntFromObj(interp, secondsObj, - &(fields.localSeconds)) != TCL_OK) + &fields.localSeconds) != TCL_OK) || (TclGetIntFromObj(interp, objv[3], &changeover) != TCL_OK) || ConvertLocalToUTC(interp, &fields, objv[2], changeover)) { return TCL_ERROR; @@ -369,7 +369,7 @@ ClockConvertlocaltoutcObjCmd( } return status; } - + /* *---------------------------------------------------------------------- * @@ -383,16 +383,16 @@ ClockConvertlocaltoutcObjCmd( * * Parameters: * seconds - Time expressed in seconds from the Posix epoch. - * tzdata - Time zone data of the time zone in which time is to - * be expressed. + * tzdata - Time zone data of the time zone in which time is to be + * expressed. * changeover - Julian Day Number at which the current locale adopted * the Gregorian calendar * * Results: * Returns a dictonary populated with the fields: * seconds - Seconds from the Posix epoch - * localSeconds - Nominal seconds from the Posix epoch in - * the local time zone. + * localSeconds - Nominal seconds from the Posix epoch in the + * local time zone. * tzOffset - Time zone offset in seconds east of Greenwich * tzName - Time zone name * julianDay - Julian Day Number in the local time zone @@ -403,14 +403,14 @@ ClockConvertlocaltoutcObjCmd( int ClockGetdatefieldsObjCmd( ClientData clientData, /* Opaque pointer to literal pool, etc. */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter vector */ { TclDateFields fields; - Tcl_Obj* dict; - ClockClientData* data = (ClockClientData*) clientData; - Tcl_Obj* const * literals = data->literals; + Tcl_Obj *dict; + ClockClientData *data = clientData; + Tcl_Obj *const *literals = data->literals; int changeover; /* @@ -421,14 +421,14 @@ ClockGetdatefieldsObjCmd( Tcl_WrongNumArgs(interp, 1, objv, "seconds tzdata changeover"); return TCL_ERROR; } - if (Tcl_GetWideIntFromObj(interp, objv[1], &(fields.seconds)) != TCL_OK + if (Tcl_GetWideIntFromObj(interp, objv[1], &fields.seconds) != TCL_OK || TclGetIntFromObj(interp, objv[3], &changeover) != TCL_OK) { return TCL_ERROR; } /* - * fields.seconds could be an unsigned number that overflowed. Make - * sure that it isn't. + * fields.seconds could be an unsigned number that overflowed. Make sure + * that it isn't. */ if (objv[1]->typePtr == &tclBignumType) { @@ -492,7 +492,7 @@ ClockGetdatefieldsObjCmd( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -515,17 +515,17 @@ ClockGetdatefieldsObjCmd( */ static int -ClockGetjuliandayfromerayearmonthdayObjCmd ( +ClockGetjuliandayfromerayearmonthdayObjCmd( ClientData clientData, /* Opaque pointer to literal pool, etc. */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter vector */ { TclDateFields fields; - Tcl_Obj* dict; - ClockClientData* data = (ClockClientData*) clientData; - Tcl_Obj* const * literals = data->literals; - Tcl_Obj* fieldPtr; + Tcl_Obj *dict; + ClockClientData *data = clientData; + Tcl_Obj *const *literals = data->literals; + Tcl_Obj *fieldPtr; int changeover; int copied = 0; int status; @@ -545,14 +545,13 @@ ClockGetjuliandayfromerayearmonthdayObjCmd ( &era) != TCL_OK || Tcl_DictObjGet(interp, dict, literals[LIT_YEAR], &fieldPtr) != TCL_OK - || TclGetIntFromObj(interp, fieldPtr, &(fields.year)) != TCL_OK + || TclGetIntFromObj(interp, fieldPtr, &fields.year) != TCL_OK || Tcl_DictObjGet(interp, dict, literals[LIT_MONTH], &fieldPtr) != TCL_OK - || TclGetIntFromObj(interp, fieldPtr, &(fields.month)) != TCL_OK + || TclGetIntFromObj(interp, fieldPtr, &fields.month) != TCL_OK || Tcl_DictObjGet(interp, dict, literals[LIT_DAYOFMONTH], &fieldPtr) != TCL_OK - || TclGetIntFromObj(interp, fieldPtr, - &(fields.dayOfMonth)) != TCL_OK + || TclGetIntFromObj(interp, fieldPtr, &fields.dayOfMonth)!=TCL_OK || TclGetIntFromObj(interp, objv[2], &changeover) != TCL_OK) { return TCL_ERROR; } @@ -583,7 +582,7 @@ ClockGetjuliandayfromerayearmonthdayObjCmd ( } return status; } - + /* *---------------------------------------------------------------------- * @@ -606,17 +605,17 @@ ClockGetjuliandayfromerayearmonthdayObjCmd ( */ static int -ClockGetjuliandayfromerayearweekdayObjCmd ( +ClockGetjuliandayfromerayearweekdayObjCmd( ClientData clientData, /* Opaque pointer to literal pool, etc. */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj *const *objv) /* Parameter vector */ { TclDateFields fields; - Tcl_Obj* dict; - ClockClientData* data = (ClockClientData*) clientData; - Tcl_Obj* const * literals = data->literals; - Tcl_Obj* fieldPtr; + Tcl_Obj *dict; + ClockClientData *data = clientData; + Tcl_Obj *const *literals = data->literals; + Tcl_Obj *fieldPtr; int changeover; int copied = 0; int status; @@ -636,16 +635,13 @@ ClockGetjuliandayfromerayearweekdayObjCmd ( &era) != TCL_OK || Tcl_DictObjGet(interp, dict, literals[LIT_ISO8601YEAR], &fieldPtr) != TCL_OK - || TclGetIntFromObj(interp, fieldPtr, - &(fields.iso8601Year)) != TCL_OK + || TclGetIntFromObj(interp, fieldPtr, &fields.iso8601Year)!=TCL_OK || Tcl_DictObjGet(interp, dict, literals[LIT_ISO8601WEEK], &fieldPtr) != TCL_OK - || TclGetIntFromObj(interp, fieldPtr, - &(fields.iso8601Week)) != TCL_OK + || TclGetIntFromObj(interp, fieldPtr, &fields.iso8601Week)!=TCL_OK || Tcl_DictObjGet(interp, dict, literals[LIT_DAYOFWEEK], &fieldPtr) != TCL_OK - || TclGetIntFromObj(interp, fieldPtr, - &(fields.dayOfWeek)) != TCL_OK + || TclGetIntFromObj(interp, fieldPtr, &fields.dayOfWeek) != TCL_OK || TclGetIntFromObj(interp, objv[2], &changeover) != TCL_OK) { return TCL_ERROR; } @@ -676,7 +672,7 @@ ClockGetjuliandayfromerayearweekdayObjCmd ( } return status; } - + /* *---------------------------------------------------------------------- * @@ -697,13 +693,13 @@ ClockGetjuliandayfromerayearweekdayObjCmd ( static int ConvertLocalToUTC( - Tcl_Interp* interp, /* Tcl interpreter */ - TclDateFields* fields, /* Fields of the time */ - Tcl_Obj* tzdata, /* Time zone data */ + Tcl_Interp *interp, /* Tcl interpreter */ + TclDateFields *fields, /* Fields of the time */ + Tcl_Obj *tzdata, /* Time zone data */ int changeover) /* Julian Day of the Gregorian transition */ { int rowc; /* Number of rows in tzdata */ - Tcl_Obj** rowv; /* Pointers to the rows */ + Tcl_Obj **rowv; /* Pointers to the rows */ /* * Unpack the tz data. @@ -724,7 +720,7 @@ ConvertLocalToUTC( return ConvertLocalToUTCUsingTable(interp, fields, rowc, rowv); } } - + /* *---------------------------------------------------------------------- * @@ -745,14 +741,14 @@ ConvertLocalToUTC( static int ConvertLocalToUTCUsingTable( - Tcl_Interp* interp, /* Tcl interpreter */ - TclDateFields* fields, /* Time to convert, with 'seconds' filled in */ + Tcl_Interp *interp, /* Tcl interpreter */ + TclDateFields *fields, /* Time to convert, with 'seconds' filled in */ int rowc, /* Number of points at which time changes */ Tcl_Obj *const rowv[]) /* Points at which time changes */ { - Tcl_Obj* row; + Tcl_Obj *row; int cellc; - Tcl_Obj** cellv; + Tcl_Obj **cellv; int have[8]; int nHave = 0; int i; @@ -777,7 +773,7 @@ ConvertLocalToUTCUsingTable( || TclListObjGetElements(interp, row, &cellc, &cellv) != TCL_OK || TclGetIntFromObj(interp, cellv[1], - &(fields->tzOffset)) != TCL_OK) { + &fields->tzOffset) != TCL_OK) { return TCL_ERROR; } found = 0; @@ -800,7 +796,7 @@ ConvertLocalToUTCUsingTable( fields->seconds = fields->localSeconds - fields->tzOffset; return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -821,8 +817,8 @@ ConvertLocalToUTCUsingTable( static int ConvertLocalToUTCUsingC( - Tcl_Interp* interp, /* Tcl interpreter */ - TclDateFields* fields, /* Time to convert, with 'seconds' filled in */ + Tcl_Interp *interp, /* Tcl interpreter */ + TclDateFields *fields, /* Time to convert, with 'seconds' filled in */ int changeover) /* Julian Day of the Gregorian transition */ { struct tm timeVal; @@ -882,7 +878,7 @@ ConvertLocalToUTCUsingC( } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -901,13 +897,13 @@ ConvertLocalToUTCUsingC( static int ConvertUTCToLocal( - Tcl_Interp* interp, /* Tcl interpreter */ - TclDateFields* fields, /* Fields of the time */ - Tcl_Obj* tzdata, /* Time zone data */ + Tcl_Interp *interp, /* Tcl interpreter */ + TclDateFields *fields, /* Fields of the time */ + Tcl_Obj *tzdata, /* Time zone data */ int changeover) /* Julian Day of the Gregorian transition */ { int rowc; /* Number of rows in tzdata */ - Tcl_Obj** rowv; /* Pointers to the rows */ + Tcl_Obj **rowv; /* Pointers to the rows */ /* * Unpack the tz data. @@ -928,7 +924,7 @@ ConvertUTCToLocal( return ConvertUTCToLocalUsingTable(interp, fields, rowc, rowv); } } - + /* *---------------------------------------------------------------------- * @@ -949,15 +945,15 @@ ConvertUTCToLocal( static int ConvertUTCToLocalUsingTable( - Tcl_Interp* interp, /* Tcl interpreter */ - TclDateFields* fields, /* Fields of the date */ + Tcl_Interp *interp, /* Tcl interpreter */ + TclDateFields *fields, /* Fields of the date */ int rowc, /* Number of rows in the conversion table * (>= 1) */ Tcl_Obj *const rowv[]) /* Rows of the conversion table */ { - Tcl_Obj* row; /* Row containing the current information */ + Tcl_Obj *row; /* Row containing the current information */ int cellc; /* Count of cells in the row (must be 4) */ - Tcl_Obj** cellv; /* Pointers to the cells */ + Tcl_Obj **cellv; /* Pointers to the cells */ /* * Look up the nearest transition time. @@ -966,7 +962,7 @@ ConvertUTCToLocalUsingTable( row = LookupLastTransition(interp, fields->seconds, rowc, rowv); if (row == NULL || TclListObjGetElements(interp, row, &cellc, &cellv) != TCL_OK || - TclGetIntFromObj(interp,cellv[1],&(fields->tzOffset)) != TCL_OK) { + TclGetIntFromObj(interp, cellv[1], &fields->tzOffset) != TCL_OK) { return TCL_ERROR; } @@ -979,7 +975,7 @@ ConvertUTCToLocalUsingTable( fields->localSeconds = fields->seconds + fields->tzOffset; return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1001,12 +997,12 @@ ConvertUTCToLocalUsingTable( static int ConvertUTCToLocalUsingC( - Tcl_Interp* interp, /* Tcl interpreter */ - TclDateFields* fields, /* Time to convert, with 'seconds' filled in */ + Tcl_Interp *interp, /* Tcl interpreter */ + TclDateFields *fields, /* Time to convert, with 'seconds' filled in */ int changeover) /* Julian Day of the Gregorian transition */ { time_t tock; - struct tm* timeVal; /* Time after conversion */ + struct tm *timeVal; /* Time after conversion */ int diff; /* Time zone diff local-Greenwich */ char buffer[8]; /* Buffer for time zone name */ @@ -1072,7 +1068,7 @@ ConvertUTCToLocalUsingC( Tcl_IncrRefCount(fields->tzName); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1087,16 +1083,16 @@ ConvertUTCToLocalUsingC( *---------------------------------------------------------------------- */ -static Tcl_Obj* +static Tcl_Obj * LookupLastTransition( - Tcl_Interp* interp, /* Interpreter for error messages */ + Tcl_Interp *interp, /* Interpreter for error messages */ Tcl_WideInt tick, /* Time from the epoch */ int rowc, /* Number of rows of tzdata */ Tcl_Obj *const *rowv) /* Rows in tzdata */ { int l; int u; - Tcl_Obj* compObj; + Tcl_Obj *compObj; Tcl_WideInt compVal; /* @@ -1138,7 +1134,7 @@ LookupLastTransition( } return rowv[l]; } - + /* *---------------------------------------------------------------------- * @@ -1159,7 +1155,7 @@ LookupLastTransition( static void GetYearWeekDay( - TclDateFields* fields, /* Date to convert, must have 'julianDay' */ + TclDateFields *fields, /* Date to convert, must have 'julianDay' */ int changeover) /* Julian Day Number of the Gregorian * transition */ { @@ -1205,7 +1201,7 @@ GetYearWeekDay( fields->dayOfWeek += 7; } } - + /* *---------------------------------------------------------------------- * @@ -1226,7 +1222,7 @@ GetYearWeekDay( static void GetGregorianEraYearDay( - TclDateFields* fields, /* Date fields containing 'julianDay' */ + TclDateFields *fields, /* Date fields containing 'julianDay' */ int changeover) /* Gregorian transition date */ { int jday = fields->julianDay; @@ -1272,7 +1268,6 @@ GetGregorianEraYearDay( day += ONE_CENTURY_GREGORIAN; } year += 100 * n; - } else { /* * Julian calendar. @@ -1281,7 +1276,6 @@ GetGregorianEraYearDay( fields->gregorian = 0; year = 1; day = jday - JDAY_1_JAN_1_CE_JULIAN; - } /* @@ -1325,7 +1319,7 @@ GetGregorianEraYearDay( } fields->dayOfYear = day + 1; } - + /* *---------------------------------------------------------------------- * @@ -1344,11 +1338,11 @@ GetGregorianEraYearDay( static void GetMonthDay( - TclDateFields* fields) /* Date to convert */ + TclDateFields *fields) /* Date to convert */ { int day = fields->dayOfYear; int month; - const int* h = hath[IsGregorianLeapYear(fields)]; + const int *h = hath[IsGregorianLeapYear(fields)]; for (month = 0; month < 12 && day > h[month]; ++month) { day -= h[month]; @@ -1356,7 +1350,7 @@ GetMonthDay( fields->month = month+1; fields->dayOfMonth = day; } - + /* *---------------------------------------------------------------------- * @@ -1376,18 +1370,18 @@ GetMonthDay( static void GetJulianDayFromEraYearWeekDay( - TclDateFields* fields, /* Date to convert */ + TclDateFields *fields, /* Date to convert */ int changeover) /* Julian Day Number of the Gregorian * transition */ { int firstMonday; /* Julian day number of week 1, day 1 in the * given year */ + TclDateFields firstWeek; /* * Find January 4 in the ISO8601 year, which will always be in week 1. */ - TclDateFields firstWeek; firstWeek.era = fields->era; firstWeek.year = fields->iso8601Year; firstWeek.month = 1; @@ -1407,7 +1401,7 @@ GetJulianDayFromEraYearWeekDay( fields->julianDay = firstMonday + 7 * (fields->iso8601Week - 1) + fields->dayOfWeek - 1; } - + /* *---------------------------------------------------------------------- * @@ -1427,13 +1421,10 @@ GetJulianDayFromEraYearWeekDay( static void GetJulianDayFromEraYearMonthDay( - TclDateFields* fields, /* Date to convert */ + TclDateFields *fields, /* Date to convert */ int changeover) /* Gregorian transition date as a Julian Day */ { - int year; int ym1; - int month; int mm1; - int q; int r; - int ym1o4; int ym1o100; int ym1o400; + int year, ym1, month, mm1, q, r, ym1o4, ym1o100, ym1o400; if (fields->era == BCE) { year = 1 - fields->year; @@ -1505,10 +1496,10 @@ GetJulianDayFromEraYearMonthDay( + fields->dayOfMonth + daysInPriorMonths[year%4 == 0][month - 1] + (365 * ym1) - + ym1o4; + + ym1o4; } } - + /* *---------------------------------------------------------------------- * @@ -1525,7 +1516,7 @@ GetJulianDayFromEraYearMonthDay( static int IsGregorianLeapYear( - TclDateFields* fields) /* Date to test */ + TclDateFields *fields) /* Date to test */ { int year; @@ -1546,7 +1537,7 @@ IsGregorianLeapYear( return 1; } } - + /* *---------------------------------------------------------------------- * @@ -1572,7 +1563,7 @@ WeekdayOnOrBefore( } return julianDay - ((julianDay - k) % 7); } - + /* *---------------------------------------------------------------------- * @@ -1597,12 +1588,12 @@ WeekdayOnOrBefore( int ClockGetenvObjCmd( ClientData clientData, - Tcl_Interp* interp, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - const char* varName; - const char* varValue; + const char *varName; + const char *varValue; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); @@ -1616,7 +1607,7 @@ ClockGetenvObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj(varValue, -1)); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1643,8 +1634,7 @@ ThreadSafeLocalTime( * Get a thread-local buffer to hold the returned time. */ - struct tm *tmPtr = (struct tm *) - Tcl_GetThreadData(&tmKey, (int) sizeof(struct tm)); + struct tm *tmPtr = Tcl_GetThreadData(&tmKey, (int) sizeof(struct tm)); #ifdef HAVE_LOCALTIME_R localtime_r(timePtr, tmPtr); #else @@ -1655,14 +1645,13 @@ ThreadSafeLocalTime( if (sysTmPtr == NULL) { Tcl_MutexUnlock(&clockMutex); return NULL; - } else { - memcpy((void *) tmPtr, (void *) localtime(timePtr), sizeof(struct tm)); - Tcl_MutexUnlock(&clockMutex); } + memcpy(tmPtr, localtime(timePtr), sizeof(struct tm)); + Tcl_MutexUnlock(&clockMutex); #endif return tmPtr; } - + /*---------------------------------------------------------------------- * * ClockClicksObjCmd -- @@ -1684,18 +1673,19 @@ ThreadSafeLocalTime( int ClockClicksObjCmd( ClientData clientData, /* Client data is unused */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ - Tcl_Obj* const* objv) /* Parameter values */ + Tcl_Obj *const *objv) /* Parameter values */ { static const char *const clicksSwitches[] = { "-milliseconds", "-microseconds", NULL }; enum ClicksSwitch { - CLICKS_MILLIS, CLICKS_MICROS, CLICKS_NATIVE + CLICKS_MILLIS, CLICKS_MICROS, CLICKS_NATIVE }; int index = CLICKS_NATIVE; Tcl_Time now; + Tcl_WideInt clicks = 0; switch (objc) { case 1: @@ -1714,28 +1704,25 @@ ClockClicksObjCmd( switch (index) { case CLICKS_MILLIS: Tcl_GetTime(&now); - Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) - now.sec * 1000 + now.usec / 1000)); + clicks = (Tcl_WideInt) now.sec * 1000 + now.usec / 1000; break; - case CLICKS_NATIVE: { -#ifndef TCL_WIDE_CLICKS - unsigned long clicks = TclpGetClicks(); + case CLICKS_NATIVE: +#ifdef TCL_WIDE_CLICKS + clicks = TclpGetWideClicks(); #else - Tcl_WideInt clicks = TclpGetWideClicks(); + clicks = (Tcl_WideInt) TclpGetClicks(); #endif - Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) clicks)); break; - } case CLICKS_MICROS: Tcl_GetTime(&now); - Tcl_SetObjResult(interp, Tcl_NewWideIntObj( - ((Tcl_WideInt) now.sec * 1000000) + now.usec)); + clicks = ((Tcl_WideInt) now.sec * 1000000) + now.usec; break; } + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(clicks)); return TCL_OK; } - + /*---------------------------------------------------------------------- * * ClockMillisecondsObjCmd - @@ -1757,9 +1744,9 @@ ClockClicksObjCmd( int ClockMillisecondsObjCmd( ClientData clientData, /* Client data is unused */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ - Tcl_Obj* const* objv) /* Parameter values */ + Tcl_Obj *const *objv) /* Parameter values */ { Tcl_Time now; @@ -1768,11 +1755,11 @@ ClockMillisecondsObjCmd( return TCL_ERROR; } Tcl_GetTime(&now); - Tcl_SetObjResult(interp, Tcl_NewWideIntObj( (Tcl_WideInt) + Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) now.sec * 1000 + now.usec / 1000)); return TCL_OK; } - + /*---------------------------------------------------------------------- * * ClockMicrosecondsObjCmd - @@ -1794,9 +1781,9 @@ ClockMillisecondsObjCmd( int ClockMicrosecondsObjCmd( ClientData clientData, /* Client data is unused */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ - Tcl_Obj* const* objv) /* Parameter values */ + Tcl_Obj *const *objv) /* Parameter values */ { Tcl_Time now; @@ -1809,7 +1796,7 @@ ClockMicrosecondsObjCmd( ((Tcl_WideInt) now.sec * 1000000) + now.usec)); return TCL_OK; } - + /* *----------------------------------------------------------------------------- * @@ -1818,12 +1805,12 @@ ClockMicrosecondsObjCmd( * Parses the arguments for [clock format]. * * Results: - * Returns a standard Tcl result, whose value is a four-element - * list comprising the time format, the locale, and the timezone. + * Returns a standard Tcl result, whose value is a four-element list + * comprising the time format, the locale, and the timezone. * * This function exists because the loop that parses the [clock format] - * options is a known performance "hot spot", and is implemented in an - * effort to speed that particular code up. + * options is a known performance "hot spot", and is implemented in an effort + * to speed that particular code up. * *----------------------------------------------------------------------------- */ @@ -1831,56 +1818,53 @@ ClockMicrosecondsObjCmd( static int ClockParseformatargsObjCmd( ClientData clientData, /* Client data containing literal pool */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ - Tcl_Obj *const objv[] /* Parameter vector */ -) { - - ClockClientData* dataPtr = (ClockClientData*) clientData; - Tcl_Obj** litPtr = dataPtr->literals; - - /* Format, locale and timezone */ - - Tcl_Obj* results[3]; + Tcl_Obj *const objv[]) /* Parameter vector */ +{ + ClockClientData *dataPtr = clientData; + Tcl_Obj **litPtr = dataPtr->literals; + Tcl_Obj *results[3]; /* Format, locale and timezone */ #define formatObj results[0] #define localeObj results[1] #define timezoneObj results[2] int gmtFlag = 0; - - /* Command line options expected */ - - static const char *const options[] = { - "-format", "-gmt", "-locale", - "-timezone", NULL }; + static const char *const options[] = { /* Command line options expected */ + "-format", "-gmt", "-locale", + "-timezone", NULL }; enum optionInd { CLOCK_FORMAT_FORMAT, CLOCK_FORMAT_GMT, CLOCK_FORMAT_LOCALE, CLOCK_FORMAT_TIMEZONE }; - int optionIndex; /* Index of an option */ - int saw = 0; /* Flag == 1 if option was seen already */ - Tcl_WideInt clockVal; /* Clock value - just used to parse */ + int optionIndex; /* Index of an option. */ + int saw = 0; /* Flag == 1 if option was seen already. */ + Tcl_WideInt clockVal; /* Clock value - just used to parse. */ int i; - /* Args consist of a time followed by keyword-value pairs */ + /* + * Args consist of a time followed by keyword-value pairs. + */ if (objc < 2 || (objc % 2) != 0) { Tcl_WrongNumArgs(interp, 0, objv, - "clock format clockval ?-format string? " - "?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"); + "clock format clockval ?-format string? " + "?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"); Tcl_SetErrorCode(interp, "CLOCK", "wrongNumArgs", NULL); return TCL_ERROR; } - /* Extract values for the keywords */ + /* + * Extract values for the keywords. + */ formatObj = litPtr[LIT__DEFAULT_FORMAT]; localeObj = litPtr[LIT_C]; timezoneObj = litPtr[LIT__NIL]; for (i = 2; i < objc; i+=2) { if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, - &optionIndex) != TCL_OK) { + &optionIndex) != TCL_OK) { Tcl_SetErrorCode(interp, "CLOCK", "badSwitch", - Tcl_GetString(objv[i]), NULL); + Tcl_GetString(objv[i]), NULL); return TCL_ERROR; } switch (optionIndex) { @@ -1888,7 +1872,7 @@ ClockParseformatargsObjCmd( formatObj = objv[i+1]; break; case CLOCK_FORMAT_GMT: - if (Tcl_GetBooleanFromObj(interp, objv[i+1], &gmtFlag) != TCL_OK) { + if (Tcl_GetBooleanFromObj(interp, objv[i+1], &gmtFlag) != TCL_OK){ return TCL_ERROR; } break; @@ -1899,16 +1883,18 @@ ClockParseformatargsObjCmd( timezoneObj = objv[i+1]; break; } - saw |= (1 << optionIndex); + saw |= 1 << optionIndex; } - /* Check options */ + /* + * Check options. + */ if (Tcl_GetWideIntFromObj(interp, objv[1], &clockVal) != TCL_OK) { return TCL_ERROR; } if ((saw & (1 << CLOCK_FORMAT_GMT)) - && (saw & (1 << CLOCK_FORMAT_TIMEZONE))) { + && (saw & (1 << CLOCK_FORMAT_TIMEZONE))) { Tcl_SetObjResult(interp, litPtr[LIT_CANNOT_USE_GMT_AND_TIMEZONE]); Tcl_SetErrorCode(interp, "CLOCK", "gmtWithTimezone", NULL); return TCL_ERROR; @@ -1917,7 +1903,9 @@ ClockParseformatargsObjCmd( timezoneObj = litPtr[LIT_GMT]; } - /* Return options as a list */ + /* + * Return options as a list. + */ Tcl_SetObjResult(interp, Tcl_NewListObj(3, results)); return TCL_OK; @@ -1925,9 +1913,8 @@ ClockParseformatargsObjCmd( #undef timezoneObj #undef localeObj #undef formatObj - } - + /*---------------------------------------------------------------------- * * ClockSecondsObjCmd - @@ -1949,9 +1936,9 @@ ClockParseformatargsObjCmd( int ClockSecondsObjCmd( ClientData clientData, /* Client data is unused */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Parameter count */ - Tcl_Obj* const* objv) /* Parameter values */ + Tcl_Obj *const *objv) /* Parameter values */ { Tcl_Time now; @@ -1963,7 +1950,7 @@ ClockSecondsObjCmd( Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) now.sec)); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1984,9 +1971,9 @@ ClockSecondsObjCmd( static void TzsetIfNecessary(void) { - static char* tzWas = NULL; /* Previous value of TZ, protected by + static char *tzWas = NULL; /* Previous value of TZ, protected by * clockMutex. */ - const char* tzIsNow; /* Current value of TZ */ + const char *tzIsNow; /* Current value of TZ */ Tcl_MutexLock(&clockMutex); tzIsNow = getenv("TZ"); @@ -2004,7 +1991,7 @@ TzsetIfNecessary(void) } Tcl_MutexUnlock(&clockMutex); } - + /* *---------------------------------------------------------------------- * @@ -2023,19 +2010,19 @@ static void ClockDeleteCmdProc( ClientData clientData) /* Opaque pointer to the client data */ { - ClockClientData *data = (ClockClientData*) clientData; + ClockClientData *data = clientData; int i; - --(data->refCount); + --data->refCount; if (data->refCount == 0) { for (i = 0; i < LIT__END; ++i) { Tcl_DecrRefCount(data->literals[i]); } - ckfree((char*) (data->literals)); - ckfree((char*) data); + ckfree((char *) data->literals); + ckfree((char *) data); } } - + /* * Local Variables: * mode: c diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 724e80b..df24e16 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.108 2008/10/23 03:28:09 msofer Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.109 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1506,7 +1506,7 @@ GetStatBuf( return TCL_ERROR; } - status = (*statProc)(pathPtr, statPtr); + status = statProc(pathPtr, statPtr); if (status < 0) { if (interp != NULL) { diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index f6ef042..9c1ee74 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.97 2008/02/28 20:40:24 dgp Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.98 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1823,7 +1823,7 @@ ParseLexeme( *lexemePtr = END; return 0; } - byte = (unsigned char)(*start); + byte = UCHAR(*start); if (byte < sizeof(Lexeme) && Lexeme[byte] != 0) { *lexemePtr = Lexeme[byte]; return 1; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index ddf3818..adaa38b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.159 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.160 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1396,8 +1396,8 @@ TclCompileScript( update = 1; } - code = (cmdPtr->compileProc)(interp, parsePtr, - cmdPtr, envPtr); + code = cmdPtr->compileProc(interp, parsePtr, cmdPtr, + envPtr); if (code == TCL_OK) { if (update) { @@ -1457,7 +1457,7 @@ TclCompileScript( /* * Single word script: unshare the command name to * avoid shimmering between bytecode and cmdName - * representations [Bug 458361] + * representations. [Bug 458361] */ TclHideLiteral(interp, envPtr, objIndex); @@ -2452,7 +2452,7 @@ EnterCmdWordData( size_t newElems = (currElems ? 2*currElems : 1); size_t newBytes = newElems * sizeof(ECL); - eclPtr->loc = (ECL *) ckrealloc((char *)(eclPtr->loc), newBytes); + eclPtr->loc = (ECL *) ckrealloc((char *) eclPtr->loc, newBytes); eclPtr->nloc = newElems; } @@ -2553,7 +2553,7 @@ TclCreateExceptRange( if (envPtr->mallocedExceptArray) { envPtr->exceptArrayPtr = (ExceptionRange *) - ckrealloc((char *)(envPtr->exceptArrayPtr), newBytes); + ckrealloc((char *) envPtr->exceptArrayPtr, newBytes); } else { /* * envPtr->exceptArrayPtr isn't a ckalloc'd pointer, so we must @@ -2630,7 +2630,7 @@ TclCreateAuxData( if (envPtr->mallocedAuxDataArray) { envPtr->auxDataArrayPtr = (AuxData *) - ckrealloc((char *)(envPtr->auxDataArrayPtr), newBytes); + ckrealloc((char *) envPtr->auxDataArrayPtr, newBytes); } else { /* * envPtr->auxDataArrayPtr isn't a ckalloc'd pointer, so we must @@ -2718,7 +2718,7 @@ TclExpandJumpFixupArray( if (fixupArrayPtr->mallocedArray) { fixupArrayPtr->fixup = (JumpFixup *) - ckrealloc((char *)(fixupArrayPtr->fixup), newBytes); + ckrealloc((char *) fixupArrayPtr->fixup, newBytes); } else { /* * fixupArrayPtr->fixup isn't a ckalloc'd pointer, so we must @@ -3952,7 +3952,7 @@ RecordByteCodeStats( statsPtr->currentByteCodeBytes += (double) codePtr->structureSize; statsPtr->srcCount[TclLog2(codePtr->numSrcBytes)]++; - statsPtr->byteCodeCount[TclLog2((int)(codePtr->structureSize))]++; + statsPtr->byteCodeCount[TclLog2((int) codePtr->structureSize)]++; statsPtr->currentInstBytes += (double) codePtr->numCodeBytes; statsPtr->currentLitBytes += (double) diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 7378e49..9ef937f 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.63 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.64 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -94,7 +94,7 @@ typedef struct TableEncodingData { */ typedef struct EscapeSubTable { - unsigned int sequenceLen; /* Length of following string. */ + unsigned sequenceLen; /* Length of following string. */ char sequence[16]; /* Escape code that marks this encoding. */ char name[32]; /* Name for encoding. */ Encoding *encodingPtr; /* Encoding loaded using above name, or NULL @@ -106,10 +106,10 @@ typedef struct EscapeEncodingData { int fallback; /* Character (in this encoding) to substitute * when this encoding cannot represent a UTF-8 * character. */ - unsigned int initLen; /* Length of following string. */ + unsigned initLen; /* Length of following string. */ char init[16]; /* String to emit or expect before first char * in conversion. */ - unsigned int finalLen; /* Length of following string. */ + unsigned finalLen; /* Length of following string. */ char final[16]; /* String to emit or expect after last char in * conversion. */ char prefixBytes[256]; /* If a byte in the input stream is the first @@ -848,7 +848,7 @@ FreeEncoding( encodingPtr->refCount--; if (encodingPtr->refCount == 0) { if (encodingPtr->freeProc != NULL) { - (*encodingPtr->freeProc)(encodingPtr->clientData); + encodingPtr->freeProc(encodingPtr->clientData); } if (encodingPtr->hPtr != NULL) { Tcl_DeleteHashEntry(encodingPtr->hPtr); @@ -1128,15 +1128,14 @@ Tcl_ExternalToUtfDString( if (src == NULL) { srcLen = 0; } else if (srcLen < 0) { - srcLen = (*encodingPtr->lengthProc)(src); + srcLen = encodingPtr->lengthProc(src); } flags = TCL_ENCODING_START | TCL_ENCODING_END; while (1) { - result = (*encodingPtr->toUtfProc)(encodingPtr->clientData, src, - srcLen, flags, &state, dst, dstLen, &srcRead, &dstWrote, - &dstChars); + result = encodingPtr->toUtfProc(encodingPtr->clientData, src, srcLen, + flags, &state, dst, dstLen, &srcRead, &dstWrote, &dstChars); soFar = dst + dstWrote - Tcl_DStringValue(dstPtr); if (result != TCL_CONVERT_NOSPACE) { @@ -1216,7 +1215,7 @@ Tcl_ExternalToUtf( if (src == NULL) { srcLen = 0; } else if (srcLen < 0) { - srcLen = (*encodingPtr->lengthProc)(src); + srcLen = encodingPtr->lengthProc(src); } if (statePtr == NULL) { flags |= TCL_ENCODING_START | TCL_ENCODING_END; @@ -1239,7 +1238,7 @@ Tcl_ExternalToUtf( */ dstLen--; - result = (*encodingPtr->toUtfProc)(encodingPtr->clientData, src, srcLen, + result = encodingPtr->toUtfProc(encodingPtr->clientData, src, srcLen, flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr, dstCharsPtr); dst[*dstWrotePtr] = '\0'; @@ -1299,7 +1298,7 @@ Tcl_UtfToExternalDString( } flags = TCL_ENCODING_START | TCL_ENCODING_END; while (1) { - result = (*encodingPtr->fromUtfProc)(encodingPtr->clientData, src, + result = encodingPtr->fromUtfProc(encodingPtr->clientData, src, srcLen, flags, &state, dst, dstLen, &srcRead, &dstWrote, &dstChars); soFar = dst + dstWrote - Tcl_DStringValue(dstPtr); @@ -1401,7 +1400,7 @@ Tcl_UtfToExternal( } dstLen -= encodingPtr->nullSize; - result = (*encodingPtr->fromUtfProc)(encodingPtr->clientData, src, srcLen, + result = encodingPtr->fromUtfProc(encodingPtr->clientData, src, srcLen, flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr, dstCharsPtr); if (encodingPtr->nullSize == 2) { @@ -1660,7 +1659,7 @@ LoadTableEncoding( char *line; int i, hi, lo, numPages, symbol, fallback; unsigned char used[256]; - unsigned int size; + unsigned size; TableEncodingData *dataPtr; unsigned short *pageMemPtr; Tcl_EncodingType encType; @@ -1937,7 +1936,7 @@ LoadEscapeEncoding( Tcl_Channel chan) /* File containing new encoding. */ { int i; - unsigned int size; + unsigned size; Tcl_DString escapeData; char init[16], final[16]; EscapeEncodingData *dataPtr; @@ -2981,7 +2980,7 @@ EscapeToUtfProc( * correspond to the bytes stored in the * output buffer. */ { - EscapeEncodingData *dataPtr; + EscapeEncodingData *dataPtr = clientData; char *prefixBytes, *tablePrefixBytes; unsigned short **tableToUnicode; Encoding *encodingPtr; @@ -2990,11 +2989,8 @@ EscapeToUtfProc( char *dstStart, *dstEnd; result = TCL_OK; - tablePrefixBytes = NULL; /* lint. */ tableToUnicode = NULL; /* lint. */ - - dataPtr = (EscapeEncodingData *) clientData; prefixBytes = dataPtr->prefixBytes; encodingPtr = NULL; @@ -3018,7 +3014,7 @@ EscapeToUtfProc( } byte = *((unsigned char *) src); if (prefixBytes[byte]) { - unsigned int left, len, longest; + unsigned left, len, longest; int checked, i; EscapeSubTable *subTablePtr; @@ -3118,7 +3114,7 @@ EscapeToUtfProc( TableEncodingData *tableDataPtr; encodingPtr = GetTableEncoding(dataPtr, state); - tableDataPtr = (TableEncodingData *) encodingPtr->clientData; + tableDataPtr = encodingPtr->clientData; tablePrefixBytes = tableDataPtr->prefixBytes; tableToUnicode = tableDataPtr->toUnicode; } @@ -3195,7 +3191,7 @@ EscapeFromUtfProc( * correspond to the bytes stored in the * output buffer. */ { - EscapeEncodingData *dataPtr; + EscapeEncodingData *dataPtr = clientData; Encoding *encodingPtr; const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd; @@ -3206,8 +3202,6 @@ EscapeFromUtfProc( result = TCL_OK; - dataPtr = (EscapeEncodingData *) clientData; - srcStart = src; srcEnd = src + srcLen; srcClose = srcEnd; @@ -3219,7 +3213,7 @@ EscapeFromUtfProc( dstEnd = dst + dstLen - 1; /* - * RFC1468 states that the text starts in ASCII, and switches to Japanese + * RFC 1468 states that the text starts in ASCII, and switches to Japanese * characters, and that the text must end in ASCII. [Patch 474358] */ @@ -3237,12 +3231,12 @@ EscapeFromUtfProc( } encodingPtr = GetTableEncoding(dataPtr, state); - tableDataPtr = (TableEncodingData *) encodingPtr->clientData; + tableDataPtr = encodingPtr->clientData; tablePrefixBytes = tableDataPtr->prefixBytes; tableFromUnicode = tableDataPtr->fromUnicode; for (numChars = 0; src < srcEnd; numChars++) { - unsigned int len; + unsigned len; int word; Tcl_UniChar ch; @@ -3265,7 +3259,7 @@ EscapeFromUtfProc( oldState = state; for (state = 0; state < dataPtr->numSubTables; state++) { encodingPtr = GetTableEncoding(dataPtr, state); - tableDataPtr = (TableEncodingData *) encodingPtr->clientData; + tableDataPtr = encodingPtr->clientData; word = tableDataPtr->fromUnicode[(ch >> 8)][ch & 0xff]; if (word != 0) { break; @@ -3279,7 +3273,7 @@ EscapeFromUtfProc( break; } encodingPtr = GetTableEncoding(dataPtr, state); - tableDataPtr = (TableEncodingData *) encodingPtr->clientData; + tableDataPtr = encodingPtr->clientData; word = tableDataPtr->fallback; } @@ -3332,22 +3326,22 @@ EscapeFromUtfProc( } if ((result == TCL_OK) && (flags & TCL_ENCODING_END)) { - unsigned int len = dataPtr->subTables[0].sequenceLen; + unsigned len = dataPtr->subTables[0].sequenceLen; + /* - * Certain encodings like iso2022-jp need to write - * an escape sequence after all characters have - * been converted. This logic checks that enough - * room is available in the buffer for the escape bytes. - * The TCL_ENCODING_END flag is cleared after a final - * escape sequence has been added to the buffer so - * that another call to this method does not attempt - * to append escape bytes a second time. + * Certain encodings like iso2022-jp need to write an escape sequence + * after all characters have been converted. This logic checks that + * enough room is available in the buffer for the escape bytes. The + * TCL_ENCODING_END flag is cleared after a final escape sequence has + * been added to the buffer so that another call to this method does + * not attempt to append escape bytes a second time. */ + if ((dst + dataPtr->finalLen + (state?len:0)) > dstEnd) { result = TCL_CONVERT_NOSPACE; } else { if (state) { - memcpy(dst, dataPtr->subTables[0].sequence, (size_t) len); + memcpy(dst, dataPtr->subTables[0].sequence, len); dst += len; } memcpy(dst, dataPtr->final, (size_t) dataPtr->finalLen); @@ -3385,11 +3379,10 @@ EscapeFreeProc( ClientData clientData) /* EscapeEncodingData that specifies * encoding. */ { - EscapeEncodingData *dataPtr; + EscapeEncodingData *dataPtr = clientData; EscapeSubTable *subTablePtr; int i; - dataPtr = (EscapeEncodingData *) clientData; if (dataPtr == NULL) { return; } @@ -3426,11 +3419,8 @@ GetTableEncoding( EscapeEncodingData *dataPtr,/* Contains names of encodings. */ int state) /* Index in dataPtr of desired Encoding. */ { - EscapeSubTable *subTablePtr; - Encoding *encodingPtr; - - subTablePtr = &dataPtr->subTables[state]; - encodingPtr = subTablePtr->encodingPtr; + EscapeSubTable *subTablePtr = &dataPtr->subTables[state]; + Encoding *encodingPtr = subTablePtr->encodingPtr; if (encodingPtr == NULL) { encodingPtr = (Encoding *) Tcl_GetEncoding(NULL, subTablePtr->name); @@ -3539,7 +3529,7 @@ InitializeEncodingSearchPath( bytes = Tcl_GetStringFromObj(searchPath, &numBytes); *lengthPtr = numBytes; - *valuePtr = ckalloc((unsigned int) numBytes + 1); + *valuePtr = ckalloc((unsigned) numBytes + 1); memcpy(*valuePtr, bytes, (size_t) numBytes + 1); Tcl_DecrRefCount(searchPath); } diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 3d29cb5..203dc5a 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.84 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.85 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -947,7 +947,7 @@ Tcl_Finalize(void) firstExitPtr = exitPtr->nextPtr; Tcl_MutexUnlock(&exitMutex); - (*exitPtr->proc)(exitPtr->clientData); + exitPtr->proc(exitPtr->clientData); ckfree((char *) exitPtr); Tcl_MutexLock(&exitMutex); } @@ -1135,7 +1135,7 @@ Tcl_FinalizeThread(void) */ tsdPtr->firstExitPtr = exitPtr->nextPtr; - (*exitPtr->proc)(exitPtr->clientData); + exitPtr->proc(exitPtr->clientData); ckfree((char *) exitPtr); } TclFinalizeIOSubsystem(); @@ -1388,16 +1388,15 @@ static Tcl_ThreadCreateType NewThreadProc( ClientData clientData) { - ThreadClientData *cdPtr; + ThreadClientData *cdPtr = clientData; ClientData threadClientData; Tcl_ThreadCreateProc *threadProc; - cdPtr = (ThreadClientData *) clientData; threadProc = cdPtr->proc; threadClientData = cdPtr->clientData; ckfree((char *) clientData); /* Allocated in Tcl_CreateThread() */ - (*threadProc)(threadClientData); + threadProc(threadClientData); TCL_THREAD_CREATE_RETURN; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 99f16db..d1ff368 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.418 2008/10/17 16:32:58 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.419 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -6208,6 +6208,7 @@ TclExecuteByteCode( / sizeof(unsigned short)) - 1)) { unsigned short base = Exp32Index[l1-3] + (unsigned short) l2 - 9; + if (base < Exp32Index[l1-2]) { /* * 32-bit number raised to intermediate power, done by @@ -6225,14 +6226,14 @@ TclExecuteByteCode( NEXT_INST_F(1, 1, 0); } } - if (-l1 >= 3 - && (unsigned long)(-l1) < (sizeof(Exp32Index) - / sizeof(unsigned short)) - 1) { - unsigned short base - = Exp32Index[-l1-3] + (unsigned short) l2 - 9; + if (-l1 >= 3 && (unsigned long)(-l1) < + (sizeof(Exp32Index) / sizeof(unsigned short)) - 1) { + unsigned short base = + Exp32Index[-l1-3] + (unsigned short) l2 - 9; + if (base < Exp32Index[-l1-2]) { long lResult = (oddExponent) ? - -Exp32Value[base] : Exp32Value[base]; + -Exp32Value[base] : Exp32Value[base]; /* * 32-bit number raised to intermediate power, done by diff --git a/generic/tclHistory.c b/generic/tclHistory.c index ea1a8ff..48739ad 100644 --- a/generic/tclHistory.c +++ b/generic/tclHistory.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHistory.c,v 1.12 2008/07/13 09:03:33 msofer Exp $ + * RCS: @(#) $Id: tclHistory.c,v 1.13 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -124,7 +124,7 @@ Tcl_RecordAndEvalObj( result = Tcl_GetCommandInfo(interp, "history", &info); if (result && (info.deleteProc == TclProcDeleteProc)) { - Proc *procPtr = (Proc *)(info.objClientData); + Proc *procPtr = (Proc *) info.objClientData; call = (procPtr->cmdPtr->compileProc != TclCompileNoOp); } diff --git a/generic/tclIO.c b/generic/tclIO.c index 7ec28c8..d7524fe 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.145 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.146 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -350,10 +350,10 @@ TclFinalizeIOSubsystem(void) */ if (chanPtr->typePtr->closeProc != TCL_CLOSE2PROC) { - (chanPtr->typePtr->closeProc)(chanPtr->instanceData, NULL); + chanPtr->typePtr->closeProc(chanPtr->instanceData, NULL); } else { - (chanPtr->typePtr->close2Proc)(chanPtr->instanceData, - NULL, 0); + chanPtr->typePtr->close2Proc(chanPtr->instanceData, NULL, + 0); } /* @@ -932,7 +932,7 @@ Tcl_UnregisterChannel( IsBufferReady(statePtr->curOutPtr)) { SetFlag(statePtr, BUFFER_READY); } - Tcl_Preserve((ClientData)statePtr); + Tcl_Preserve(statePtr); if (!(statePtr->flags & BG_FLUSH_SCHEDULED)) { /* * We don't want to re-enter Tcl_Close(). @@ -941,13 +941,13 @@ Tcl_UnregisterChannel( if (!(statePtr->flags & CHANNEL_CLOSED)) { if (Tcl_Close(interp, chan) != TCL_OK) { SetFlag(statePtr, CHANNEL_CLOSED); - Tcl_Release((ClientData)statePtr); + Tcl_Release(statePtr); return TCL_ERROR; } } } SetFlag(statePtr, CHANNEL_CLOSED); - Tcl_Release((ClientData)statePtr); + Tcl_Release(statePtr); } return TCL_OK; } @@ -1573,7 +1573,7 @@ Tcl_StackChannel( threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); if (threadActionProc != NULL) { - (*threadActionProc)(chanPtr->instanceData, TCL_CHANNEL_THREAD_INSERT); + threadActionProc(chanPtr->instanceData, TCL_CHANNEL_THREAD_INSERT); } return (Tcl_Channel) chanPtr; @@ -1710,8 +1710,7 @@ Tcl_UnstackChannel( threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); if (threadActionProc != NULL) { - (*threadActionProc)(chanPtr->instanceData, - TCL_CHANNEL_THREAD_REMOVE); + threadActionProc(chanPtr->instanceData,TCL_CHANNEL_THREAD_REMOVE); } statePtr->topChanPtr = downChanPtr; @@ -1727,10 +1726,10 @@ Tcl_UnstackChannel( */ if (chanPtr->typePtr->closeProc != TCL_CLOSE2PROC) { - result = (chanPtr->typePtr->closeProc)(chanPtr->instanceData, + result = chanPtr->typePtr->closeProc(chanPtr->instanceData, interp); } else { - result = (chanPtr->typePtr->close2Proc)(chanPtr->instanceData, + result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, 0); } @@ -2002,8 +2001,8 @@ Tcl_GetChannelHandle( int result; chanPtr = ((Channel *) chan)->state->bottomChanPtr; - result = (chanPtr->typePtr->getHandleProc)(chanPtr->instanceData, - direction, &handle); + result = chanPtr->typePtr->getHandleProc(chanPtr->instanceData, direction, + &handle); if (handlePtr) { *handlePtr = handle; } @@ -2302,7 +2301,7 @@ FlushChannel( */ toWrite = BytesLeft(bufPtr); - written = (chanPtr->typePtr->outputProc)(chanPtr->instanceData, + written = chanPtr->typePtr->outputProc(chanPtr->instanceData, RemovePoint(bufPtr), toWrite, &errorCode); /* @@ -2438,7 +2437,7 @@ FlushChannel( return errorCode; } else if (statePtr->outQueueHead == NULL) { ResetFlag(statePtr, BG_FLUSH_SCHEDULED); - (chanPtr->typePtr->watchProc)(chanPtr->instanceData, + chanPtr->typePtr->watchProc(chanPtr->instanceData, statePtr->interestMask); } } @@ -2529,7 +2528,7 @@ CloseChannel( int dummy; char c = (char) statePtr->outEofChar; - (chanPtr->typePtr->outputProc)(chanPtr->instanceData, &c, 1, &dummy); + chanPtr->typePtr->outputProc(chanPtr->instanceData, &c, 1, &dummy); } /* @@ -2558,10 +2557,10 @@ CloseChannel( */ if (chanPtr->typePtr->closeProc != TCL_CLOSE2PROC) { - result = (chanPtr->typePtr->closeProc)(chanPtr->instanceData, interp); + result = chanPtr->typePtr->closeProc(chanPtr->instanceData, interp); } else { - result = (chanPtr->typePtr->close2Proc)(chanPtr->instanceData, - interp, 0); + result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, + 0); } /* @@ -2715,7 +2714,7 @@ CutChannel( threadActionProc = Tcl_ChannelThreadActionProc(Tcl_GetChannelType(chan)); if (threadActionProc != NULL) { - (*threadActionProc)(Tcl_GetChannelInstanceData(chan), + threadActionProc(Tcl_GetChannelInstanceData(chan), TCL_CHANNEL_THREAD_REMOVE); } } @@ -2763,8 +2762,7 @@ Tcl_CutChannel( while (chanPtr) { threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); if (threadActionProc != NULL) { - (*threadActionProc)(chanPtr->instanceData, - TCL_CHANNEL_THREAD_REMOVE); + threadActionProc(chanPtr->instanceData,TCL_CHANNEL_THREAD_REMOVE); } chanPtr= chanPtr->upChanPtr; } @@ -2826,7 +2824,7 @@ SpliceChannel( threadActionProc = Tcl_ChannelThreadActionProc(Tcl_GetChannelType(chan)); if (threadActionProc != NULL) { - (*threadActionProc) (Tcl_GetChannelInstanceData(chan), + threadActionProc(Tcl_GetChannelInstanceData(chan), TCL_CHANNEL_THREAD_INSERT); } } @@ -2864,8 +2862,7 @@ Tcl_SpliceChannel( while (chanPtr) { threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); if (threadActionProc != NULL) { - (*threadActionProc)(chanPtr->instanceData, - TCL_CHANNEL_THREAD_INSERT); + threadActionProc(chanPtr->instanceData,TCL_CHANNEL_THREAD_INSERT); } chanPtr= chanPtr->upChanPtr; } @@ -2976,7 +2973,7 @@ Tcl_Close( while (statePtr->closeCbPtr != NULL) { cbPtr = statePtr->closeCbPtr; statePtr->closeCbPtr = cbPtr->nextPtr; - (cbPtr->proc)(cbPtr->clientData); + cbPtr->proc(cbPtr->clientData); ckfree((char *) cbPtr); } @@ -2996,7 +2993,7 @@ Tcl_Close( */ if (chanPtr->typePtr->closeProc == TCL_CLOSE2PROC) { - result = (chanPtr->typePtr->close2Proc)(chanPtr->instanceData, interp, + result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, TCL_CLOSE_READ); } else { result = 0; @@ -3229,8 +3226,8 @@ Tcl_WriteRaw( * The code was stolen from 'FlushChannel'. */ - written = (chanPtr->typePtr->outputProc) (chanPtr->instanceData, - src, srcLen, &errorCode); + written = chanPtr->typePtr->outputProc(chanPtr->instanceData, src, + srcLen, &errorCode); if (written < 0) { Tcl_SetErrno(errorCode); @@ -5036,7 +5033,7 @@ Tcl_ReadRaw( * The case of 'bytesToRead == 0' at this point cannot happen. */ - nread = (chanPtr->typePtr->inputProc)(chanPtr->instanceData, + nread = chanPtr->typePtr->inputProc(chanPtr->instanceData, bufPtr + copied, bytesToRead - copied, &result); #ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING @@ -6196,7 +6193,7 @@ GetInput( } else { #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ - nread = (chanPtr->typePtr->inputProc)(chanPtr->instanceData, + nread = chanPtr->typePtr->inputProc(chanPtr->instanceData, InsertPoint(bufPtr), toRead, &result); #ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING @@ -6394,14 +6391,14 @@ Tcl_Seek( if (HaveVersion(chanPtr->typePtr, TCL_CHANNEL_VERSION_3) && chanPtr->typePtr->wideSeekProc != NULL) { - curPos = (chanPtr->typePtr->wideSeekProc) (chanPtr->instanceData, + curPos = chanPtr->typePtr->wideSeekProc(chanPtr->instanceData, offset, mode, &result); } else if (offset < Tcl_LongAsWide(LONG_MIN) || offset > Tcl_LongAsWide(LONG_MAX)) { result = EOVERFLOW; curPos = Tcl_LongAsWide(-1); } else { - curPos = Tcl_LongAsWide((chanPtr->typePtr->seekProc) ( + curPos = Tcl_LongAsWide(chanPtr->typePtr->seekProc( chanPtr->instanceData, Tcl_WideAsLong(offset), mode, &result)); } @@ -6512,10 +6509,10 @@ Tcl_Tell( if (HaveVersion(chanPtr->typePtr, TCL_CHANNEL_VERSION_3) && chanPtr->typePtr->wideSeekProc != NULL) { - curPos = (chanPtr->typePtr->wideSeekProc) (chanPtr->instanceData, + curPos = chanPtr->typePtr->wideSeekProc(chanPtr->instanceData, Tcl_LongAsWide(0), SEEK_CUR, &result); } else { - curPos = Tcl_LongAsWide((chanPtr->typePtr->seekProc) ( + curPos = Tcl_LongAsWide(chanPtr->typePtr->seekProc( chanPtr->instanceData, 0, SEEK_CUR, &result)); } if (curPos == Tcl_LongAsWide(-1)) { @@ -7275,8 +7272,8 @@ Tcl_GetChannelOption( * and message. */ - return (chanPtr->typePtr->getOptionProc) (chanPtr->instanceData, - interp, optionName, dsPtr); + return chanPtr->typePtr->getOptionProc(chanPtr->instanceData, interp, + optionName, dsPtr); } else { /* * No driver specific options case. @@ -7577,8 +7574,8 @@ Tcl_SetChannelOption( ckfree((char *) argv); return TCL_OK; } else if (chanPtr->typePtr->setOptionProc != NULL) { - return (*chanPtr->typePtr->setOptionProc)(chanPtr->instanceData, - interp, optionName, newValue); + return chanPtr->typePtr->setOptionProc(chanPtr->instanceData, interp, + optionName, newValue); } else { return Tcl_BadChannelOption(interp, optionName, NULL); } @@ -7735,7 +7732,7 @@ Tcl_NotifyChannel( upTypePtr = upChanPtr->typePtr; upHandlerProc = Tcl_ChannelHandlerProc(upTypePtr); if (upHandlerProc != NULL) { - mask = (*upHandlerProc) (upChanPtr->instanceData, mask); + mask = upHandlerProc(upChanPtr->instanceData, mask); } /* @@ -7796,7 +7793,7 @@ Tcl_NotifyChannel( if ((chPtr->mask & mask) != 0) { nh.nextHandlerPtr = chPtr->nextPtr; - (*(chPtr->proc))(chPtr->clientData, mask); + chPtr->proc(chPtr->clientData, mask); chPtr = nh.nextHandlerPtr; } else { chPtr = chPtr->nextPtr; @@ -7912,7 +7909,7 @@ UpdateInterest( } } } - (chanPtr->typePtr->watchProc)(chanPtr->instanceData, mask); + chanPtr->typePtr->watchProc(chanPtr->instanceData, mask); } /* @@ -9508,7 +9505,7 @@ StackSetBlockMode( while (chanPtr != NULL) { blockModeProc = Tcl_ChannelBlockModeProc(chanPtr->typePtr); if (blockModeProc != NULL) { - result = (*blockModeProc) (chanPtr->instanceData, mode); + result = blockModeProc(chanPtr->instanceData, mode); if (result != 0) { Tcl_SetErrno(result); return result; @@ -9935,7 +9932,7 @@ Tcl_ChannelBlockModeProc( * The v1 structure had the blockModeProc in a different place. */ - return (Tcl_DriverBlockModeProc *) (chanTypePtr->version); + return (Tcl_DriverBlockModeProc *) chanTypePtr->version; } } @@ -10610,8 +10607,9 @@ DupChannelIntRep( * currently have an internal rep.*/ { ChannelState *statePtr = GET_CHANNELSTATE(srcPtr); + SET_CHANNELSTATE(copyPtr, statePtr); - Tcl_Preserve((ClientData) statePtr); + Tcl_Preserve(statePtr); copyPtr->typePtr = &tclChannelType; } @@ -10647,7 +10645,7 @@ SetChannelFromAny( statePtr = GET_CHANNELSTATE(objPtr); if (statePtr->flags & (CHANNEL_TAINTED|CHANNEL_CLOSED)) { ResetFlag(statePtr, CHANNEL_TAINTED); - Tcl_Release((ClientData) statePtr); + Tcl_Release(statePtr); UpdateStringOfChannel(objPtr); objPtr->typePtr = NULL; } @@ -10669,8 +10667,8 @@ SetChannelFromAny( } TclFreeIntRep(objPtr); - statePtr = ((Channel *)chan)->state; - Tcl_Preserve((ClientData) statePtr); + statePtr = ((Channel *) chan)->state; + Tcl_Preserve(statePtr); SET_CHANNELSTATE(objPtr, statePtr); objPtr->typePtr = &tclChannelType; } @@ -10734,7 +10732,7 @@ static void FreeChannelIntRep( Tcl_Obj *objPtr) /* Object with internal rep to free. */ { - Tcl_Release((ClientData) GET_CHANNELSTATE(objPtr)); + Tcl_Release(GET_CHANNELSTATE(objPtr)); } #if 0 diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 55d0807..b550675 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.5 2008/10/17 18:06:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.6 2008/10/26 18:34:04 dkf Exp $ */ #include @@ -56,32 +56,32 @@ static int ReflectSetOption(ClientData clientData, Tcl_Interp *interp, const char *optionName, const char *newValue); static int ReflectHandle(ClientData clientData, int direction, - ClientData* handle); + ClientData *handle); static int ReflectNotify(ClientData clientData, int mask); /* - * The C layer channel type/driver definition used by the reflection. This is - * a version 3 structure. + * The C layer channel type/driver definition used by the reflection. */ static Tcl_ChannelType tclRTransformType = { - "tclrtransform", /* Type name. */ - TCL_CHANNEL_VERSION_5, /* v5 channel */ - ReflectClose, /* Close channel, clean instance data */ - ReflectInput, /* Handle read request */ - ReflectOutput, /* Handle write request */ - ReflectSeek, /* Move location of access point. */ - ReflectSetOption, /* Set options. */ - ReflectGetOption, /* Get options. */ - ReflectWatch, /* Initialize notifier */ - ReflectHandle, /* Get OS handle from the channel. */ - NULL, /* No close2 support. NULL'able */ - ReflectBlock, /* Set blocking/nonblocking. */ - NULL, /* Flush channel. Not used by core. NULL'able */ - ReflectNotify, /* Handle events. */ - ReflectSeekWide, /* Move access point (64 bit). */ - NULL, /* thread action */ - NULL, /* truncate */ + "tclrtransform", /* Type name. */ + TCL_CHANNEL_VERSION_5, /* v5 channel. */ + ReflectClose, /* Close channel, clean instance data. */ + ReflectInput, /* Handle read request. */ + ReflectOutput, /* Handle write request. */ + ReflectSeek, /* Move location of access point. */ + ReflectSetOption, /* Set options. */ + ReflectGetOption, /* Get options. */ + ReflectWatch, /* Initialize notifier. */ + ReflectHandle, /* Get OS handle from the channel. */ + NULL, /* No close2 support. NULL'able */ + ReflectBlock, /* Set blocking/nonblocking. */ + NULL, /* Flush channel. Not used by core. + * NULL'able. */ + ReflectNotify, /* Handle events. */ + ReflectSeekWide, /* Move access point (64 bit). */ + NULL, /* thread action */ + NULL, /* truncate */ }; /* @@ -90,18 +90,21 @@ static Tcl_ChannelType tclRTransformType = { */ typedef struct _ResultBuffer_ { - unsigned char* buf; /* Reference to the buffer area */ - int allocated; /* Allocated size of the buffer area */ - int used; /* Number of bytes in the buffer, <= allocated */ + unsigned char *buf; /* Reference to the buffer area. */ + int allocated; /* Allocated size of the buffer area. */ + int used; /* Number of bytes in the buffer, + * <= allocated. */ } ResultBuffer; #define ResultLength(r) ((r)->used) -/* static int ResultLength (ResultBuffer* r); */ +/* static int ResultLength (ResultBuffer *r); */ -static void ResultClear (ResultBuffer* r); -static void ResultInit (ResultBuffer* r); -static void ResultAdd (ResultBuffer* r, unsigned char* buf, int toWrite); -static int ResultCopy (ResultBuffer* r, unsigned char* buf, int toRead); +static void ResultClear(ResultBuffer *r); +static void ResultInit(ResultBuffer *r); +static void ResultAdd(ResultBuffer *r, unsigned char *buf, + int toWrite); +static int ResultCopy(ResultBuffer *r, unsigned char *buf, + int toRead); #define RB_INCREMENT (512) @@ -118,15 +121,14 @@ static int ResultCopy (ResultBuffer* r, unsigned char* buf, int toRe typedef struct { Tcl_Channel chan; /* Back reference to the channel of the * transformation itself. */ - Tcl_Channel parent; /* Reference to the channel the transformation + Tcl_Channel parent; /* Reference to the channel the transformation * was pushed on. */ Tcl_Interp *interp; /* Reference to the interpreter containing the * Tcl level part of the channel. */ - Tcl_Obj *handle; /* Reference to transform handle. Also stored + Tcl_Obj *handle; /* Reference to transform handle. Also stored * in the argv, see below. The separate field * gives us direct access, needed when working - * with the reflection maps. - */ + * with the reflection maps. */ #ifdef TCL_THREADS Tcl_ThreadId thread; /* Thread the 'interp' belongs to. */ #endif @@ -144,14 +146,14 @@ typedef struct { * CT = Belongs to the 'Command handler Thread'. */ - int argc; /* Number of preallocated words - 2 */ + int argc; /* Number of preallocated words - 2. */ Tcl_Obj **argv; /* Preallocated array for calling the handler. * args[0] is placeholder for cmd word. * Followed by the arguments in the prefix, * plus 4 placeholders for method, channel, * and at most two varying (method specific) * words. */ - int methods; /* Bitmask of supported methods */ + int methods; /* Bitmask of supported methods. */ /* * NOTE (9): Should we have predefined shared literals for the method @@ -159,11 +161,9 @@ typedef struct { */ int mode; /* Mask of R/W mode */ - int nonblocking; /* Flag: Channel is blocking or not */ - int readIsDrained; /* Flag: Read buffers are flushed*/ - + int nonblocking; /* Flag: Channel is blocking or not. */ + int readIsDrained; /* Flag: Read buffers are flushed. */ ResultBuffer result; - } ReflectedTransform; /* @@ -243,9 +243,9 @@ typedef enum { /* * Event used to forward driver invocations to the thread actually managing - * the channel. We cannot construct the command to execute and forward - * that. Because then it will contain a mixture of Tcl_Obj's belonging to both - * the command handler thread (CT), and the thread managing the channel (MT), + * the channel. We cannot construct the command to execute and forward that. + * Because then it will contain a mixture of Tcl_Obj's belonging to both the + * command handler thread (CT), and the thread managing the channel (MT), * executed in CT. Tcl_Obj's are not allowed to cross thread boundaries. So we * forward an operation code, the argument details, and reference to results. * The command is assembled in the CT and belongs fully to that thread. No @@ -284,7 +284,7 @@ struct ForwardParamLimit { typedef union ForwardParam { ForwardParamBase base; struct ForwardParamTransform transform; - struct ForwardParamLimit limit; + struct ForwardParamLimit limit; } ForwardParam; /* @@ -333,7 +333,7 @@ typedef struct ThreadSpecificData { * Table of all reflected transformations owned by this thread. */ - ReflectedTransformMap* rtmPtr; + ReflectedTransformMap *rtmPtr; } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; @@ -358,7 +358,7 @@ TCL_DECLARE_MUTEX(rtForwardMutex) */ static void ForwardOpToOwnerThread(ReflectedTransform *rtPtr, - ForwardedOperation op, const VOID *param); + ForwardedOperation op, const void *param); static int ForwardProc(Tcl_Event *evPtr, int mask); static void SrcExitProc(ClientData clientData); @@ -424,41 +424,50 @@ static void DeleteReflectedTransformMap(ClientData clientData, * list-quoting to keep the words of the message together. See also [x]. */ -static const char *msg_read_badlimit = "{Tcl driver returned bad read limit '0'}"; +static const char *msg_read_badlimit = + "{Tcl driver returned bad read limit '0'}"; static const char *msg_read_unsup = "{read not supported by Tcl driver}"; static const char *msg_write_unsup = "{write not supported by Tcl driver}"; #ifdef TCL_THREADS static const char *msg_send_originlost = "{Channel thread lost}"; static const char *msg_send_dstlost = "{Owner lost}"; #endif /* TCL_THREADS */ -static const char *msg_dstlost = "-code 1 -level 0 -errorcode NONE -errorinfo {} -errorline 1 {Owner lost}"; +static const char *msg_dstlost = + "-code 1 -level 0 -errorcode NONE -errorinfo {} -errorline 1 {Owner lost}"; /* * Timer management (flushing out buffered data via artificial events). */ /* - * Number of milliseconds to wait before firing an event to try to - * flush out information waiting in buffers (fileevent support). + * Number of milliseconds to wait before firing an event to try to flush out + * information waiting in buffers (fileevent support). */ #define FLUSH_DELAY (5) -static void TimerKill (ReflectedTransform* rtPtr); -static void TimerSetup (ReflectedTransform* rtPtr); -static void TimerRun (ClientData clientData); +static void TimerKill(ReflectedTransform* rtPtr); +static void TimerSetup(ReflectedTransform* rtPtr); +static void TimerRun(ClientData clientData); /* * Helper functions encapsulating some of the thread forwarding to make the * control flow in callers easier. */ -static int TransformRead (ReflectedTransform* rtPtr, int* errorCodePtr, unsigned char* buf, int toRead); -static int TransformWrite (ReflectedTransform* rtPtr, int* errorCodePtr, unsigned char* buf, int toWrite); -static int TransformDrain (ReflectedTransform* rtPtr, int* errorCodePtr); -static int TransformFlush (ReflectedTransform* rtPtr, int* errorCodePtr, int op); -static void TransformClear (ReflectedTransform* rtPtr); -static int TransformLimit (ReflectedTransform* rtPtr, int* errorCodePtr, int* maxPtr); +static int TransformRead(ReflectedTransform *rtPtr, + int *errorCodePtr, unsigned char *buf, + int toRead); +static int TransformWrite(ReflectedTransform *rtPtr, + int *errorCodePtr, unsigned char *buf, + int toWrite); +static int TransformDrain(ReflectedTransform *rtPtr, + int *errorCodePtr); +static int TransformFlush(ReflectedTransform *rtPtr, + int *errorCodePtr, int op); +static void TransformClear(ReflectedTransform *rtPtr); +static int TransformLimit(ReflectedTransform *rtPtr, + int *errorCodePtr, int *maxPtr); /* op'codes for TransformFlush */ #define FLUSH_WRITE 1 @@ -467,14 +476,14 @@ static int TransformLimit (ReflectedTransform* rtPtr, int* errorCodePtr, int* m /* * Main methods to plug into the 'chan' ensemble'. ================== */ - + /* *---------------------------------------------------------------------- * * TclChanPushObjCmd -- * - * This function is invoked to process the "chan push" Tcl command. - * See the user documentation for details on what it does. + * This function is invoked to process the "chan push" Tcl command. See + * the user documentation for details on what it does. * * Results: * A standard Tcl result. The handle of the new channel is placed in the @@ -493,17 +502,17 @@ TclChanPushObjCmd( int objc, Tcl_Obj *const *objv) { - ReflectedTransform *rtPtr; /* Instance data of the new (transform) channel */ - Tcl_Obj* chanObj; /* Handle of parent channel */ - Tcl_Channel parentChan; /* Token of parent channel */ - int mode; /* R/W mode of parent, later the new - * channel. Has to match the abilities of the - * handler commands */ + ReflectedTransform *rtPtr; /* Instance data of the new (transform) + * channel. */ + Tcl_Obj *chanObj; /* Handle of parent channel */ + Tcl_Channel parentChan; /* Token of parent channel */ + int mode; /* R/W mode of parent, later the new channel. + * Has to match the abilities of the handler + * commands */ Tcl_Obj *cmdObj; /* Command prefix, list of words */ Tcl_Obj *cmdNameObj; /* Command name */ Tcl_Obj *rtId; /* Handle of the new transform (channel) */ Tcl_Obj *modeObj; /* mode in obj form for method call */ - int listc; /* Result of 'initialize', and of */ Tcl_Obj **listv; /* its sublist in the 2nd element */ int methIndex; /* Encoded method name */ @@ -512,8 +521,8 @@ TclChanPushObjCmd( int methods; /* Bitmask for supported methods. */ Tcl_Obj *err; /* Error message */ ReflectedTransformMap *rtmPtr; - /* Map of reflected transforms with handlers in - * this interp. */ + /* Map of reflected transforms with handlers + * in this interp. */ Tcl_HashEntry *hPtr; /* Entry in the above map */ int isNew; /* Placeholder. */ @@ -541,16 +550,16 @@ TclChanPushObjCmd( * First argument is a channel handle. */ - chanObj = objv[CHAN]; - parentChan = Tcl_GetChannel (interp, Tcl_GetString (chanObj), &mode); + chanObj = objv[CHAN]; + parentChan = Tcl_GetChannel(interp, Tcl_GetString(chanObj), &mode); if (parentChan == NULL) { return TCL_ERROR; } - parentChan = Tcl_GetTopChannel (parentChan); + parentChan = Tcl_GetTopChannel(parentChan); /* * Second argument is command prefix, i.e. list of words, first word is - * name of handler command, other words are fixed arguments. Run + * name of handler command, other words are fixed arguments. Run the * 'initialize' method to get the list of supported methods. Validate * this. */ @@ -588,9 +597,8 @@ TclChanPushObjCmd( /* * Verify the result. - * - List, of method names. Convert to mask. - * Check for non-optionals through the mask. - * Compare open mode against optional r/w. + * - List, of method names. Convert to mask. Check for non-optionals + * through the mask. Compare open mode against optional r/w. */ if (Tcl_ListObjGetElements(NULL, resObj, &listc, &listv) != TCL_OK) { @@ -637,8 +645,12 @@ TclChanPushObjCmd( * also be supported by the handler, by design of the check. */ - if (!HAS(methods, METH_READ)) { mode &= ~TCL_READABLE; } - if (!HAS(methods, METH_WRITE)) { mode &= ~TCL_WRITABLE; } + if (!HAS(methods, METH_READ)) { + mode &= ~TCL_READABLE; + } + if (!HAS(methods, METH_WRITE)) { + mode &= ~TCL_WRITABLE; + } if (!mode) { TclNewLiteralStringObj(err, "chan handler \""); @@ -675,27 +687,24 @@ TclChanPushObjCmd( */ rtPtr->methods = methods; - rtPtr->mode = mode; - rtPtr->chan = Tcl_StackChannel (interp, &tclRTransformType, - (ClientData) rtPtr, mode, - rtPtr->parent); + rtPtr->mode = mode; + rtPtr->chan = Tcl_StackChannel(interp, &tclRTransformType, rtPtr, mode, + rtPtr->parent); /* * Register the transform in our our map for proper handling of deleted * interpreters and/or threads. */ - rtmPtr = GetReflectedTransformMap (interp); - hPtr = Tcl_CreateHashEntry(&rtmPtr->map, Tcl_GetString(rtId), - &isNew); + rtmPtr = GetReflectedTransformMap(interp); + hPtr = Tcl_CreateHashEntry(&rtmPtr->map, Tcl_GetString(rtId), &isNew); if (!isNew && rtPtr != Tcl_GetHashValue(hPtr)) { Tcl_Panic("TclChanPushObjCmd: duplicate transformation handle"); } Tcl_SetHashValue(hPtr, rtPtr); #ifdef TCL_THREADS rtmPtr = GetThreadReflectedTransformMap(); - hPtr = Tcl_CreateHashEntry(&rtmPtr->map, Tcl_GetString(rtId), - &isNew); + hPtr = Tcl_CreateHashEntry(&rtmPtr->map, Tcl_GetString(rtId), &isNew); Tcl_SetHashValue(hPtr, rtPtr); #endif @@ -703,11 +712,10 @@ TclChanPushObjCmd( * Return the channel as the result of the command. */ - Tcl_AppendResult (interp, Tcl_GetChannelName (rtPtr->chan), - (char*) NULL); + Tcl_AppendResult(interp, Tcl_GetChannelName(rtPtr->chan), NULL); return TCL_OK; - error: + error: /* * We are not going through ReflectClose as we never had a channel * structure. @@ -725,8 +733,8 @@ TclChanPushObjCmd( * * TclChanPopObjCmd -- * - * This function is invoked to process the "chan pop" Tcl command. - * See the user documentation for details on what it does. + * This function is invoked to process the "chan pop" Tcl command. See + * the user documentation for details on what it does. * * Results: * A standard Tcl result. @@ -757,7 +765,7 @@ TclChanPopObjCmd( const char *chanId; /* Tcl level channel handle */ Tcl_Channel chan; /* Channel associated to the handle */ - int mode; /* Channel r/w mode */ + int mode; /* Channel r/w mode */ /* * Number of arguments... @@ -774,13 +782,14 @@ TclChanPopObjCmd( */ chanId = TclGetString(objv[CHAN]); - chan = Tcl_GetChannel(interp, chanId, &mode); + chan = Tcl_GetChannel(interp, chanId, &mode); if (chan == NULL) { return TCL_ERROR; } - /* Removing transformations is generic, and not restricted to reflected + /* + * Removing transformations is generic, and not restricted to reflected * transformations. */ @@ -794,7 +803,7 @@ TclChanPopObjCmd( * Channel error message marshalling utilities. */ -static Tcl_Obj* +static Tcl_Obj * MarshallError( Tcl_Interp *interp) { @@ -848,8 +857,8 @@ UnmarshallErrorResult( Tcl_SetObjResult(interp, lv[lc-1]); } - (void) Tcl_SetReturnOptions(interp, Tcl_NewListObj(numOptions, lv)); - ((Interp *)interp)->flags &= ~ERR_ALREADY_LOGGED; + Tcl_SetReturnOptions(interp, Tcl_NewListObj(numOptions, lv)); + ((Interp *) interp)->flags &= ~ERR_ALREADY_LOGGED; } /* @@ -878,11 +887,12 @@ ReflectClose( ClientData clientData, Tcl_Interp *interp) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; int result; /* Result code for 'close' */ Tcl_Obj *resObj; /* Result data for 'close' */ - ReflectedTransformMap *rtmPtr;/* Map of reflected transforms with handlers in - * this interp */ + ReflectedTransformMap *rtmPtr; + /* Map of reflected transforms with handlers + * in this interp. */ Tcl_HashEntry *hPtr; /* Entry in the above map */ if (interp == NULL) { @@ -933,16 +943,18 @@ ReflectClose( * that check is not necessary. We always go through 'finalize'. */ - if (HAS(rtPtr->methods, METH_DRAIN) && (!rtPtr->readIsDrained)) { + if (HAS(rtPtr->methods, METH_DRAIN) && !rtPtr->readIsDrained) { int errorCode; - if (!TransformDrain (rtPtr, &errorCode)) { + + if (!TransformDrain(rtPtr, &errorCode)) { return errorCode; } } if (HAS(rtPtr->methods, METH_FLUSH)) { int errorCode; - if (!TransformFlush (rtPtr, &errorCode, FLUSH_WRITE)) { + + if (!TransformFlush(rtPtr, &errorCode, FLUSH_WRITE)) { return errorCode; } } @@ -965,52 +977,55 @@ ReflectClose( if (result != TCL_OK) { PassReceivedErrorInterp(interp, &p); + return EINVAL; } - } else { + return EOK; + } #endif - result = InvokeTclMethod(rtPtr, "finalize", NULL, NULL, &resObj); - if ((result != TCL_OK) && (interp != NULL)) { - Tcl_SetChannelErrorInterp(interp, resObj); - } - Tcl_DecrRefCount(resObj); /* Remove reference we held from the - * invoke */ + /* + * Do the actual invokation of "finalize" now; we're in the right thread. + */ - /* - * Remove the transform from the map before releasing the memory, to - * prevent future accesses from finding and dereferencing a dangling - * pointer. - * - * NOTE: The transform may not be in the map. This is ok, that happens - * when the transform was created in a different interpreter and/or - * thread and then was moved here. - */ + result = InvokeTclMethod(rtPtr, "finalize", NULL, NULL, &resObj); + if ((result != TCL_OK) && (interp != NULL)) { + Tcl_SetChannelErrorInterp(interp, resObj); + } - rtmPtr = GetReflectedTransformMap(interp); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, - Tcl_GetString(rtPtr->handle)); - if (hPtr) { - Tcl_DeleteHashEntry (hPtr); - } -#ifdef TCL_THREADS - /* - * In a threaded interpreter we manage a per-thread map as well, to - * allow us to survive if the script level pulls the rug out under a - * channel by deleting the owning thread. - */ + Tcl_DecrRefCount(resObj); /* Remove reference we held from the + * invoke. */ - rtmPtr = GetThreadReflectedTransformMap(); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, - Tcl_GetString(rtPtr->handle)); - if (hPtr) { - Tcl_DeleteHashEntry (hPtr); - } -#endif + /* + * Remove the transform from the map before releasing the memory, to + * prevent future accesses from finding and dereferencing a dangling + * pointer. + * + * NOTE: The transform may not be in the map. This is ok, that happens + * when the transform was created in a different interpreter and/or thread + * and then was moved here. + */ + + rtmPtr = GetReflectedTransformMap(interp); + hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); + if (hPtr) { + Tcl_DeleteHashEntry(hPtr); + } + + /* + * In a threaded interpreter we manage a per-thread map as well, to allow + * us to survive if the script level pulls the rug out under a channel by + * deleting the owning thread. + */ - FreeReflectedTransform(rtPtr); #ifdef TCL_THREADS + rtmPtr = GetThreadReflectedTransformMap(); + hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); + if (hPtr) { + Tcl_DeleteHashEntry(hPtr); } #endif + + FreeReflectedTransform(rtPtr); return (result == TCL_OK) ? EOK : EINVAL; } @@ -1032,12 +1047,12 @@ ReflectClose( static int ReflectInput( - ClientData clientData, - char *buf, - int toRead, - int *errorCodePtr) + ClientData clientData, + char *buf, + int toRead, + int *errorCodePtr) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; int gotBytes, copied, read; /* @@ -1055,13 +1070,14 @@ ReflectInput( gotBytes = 0; while (toRead > 0) { - /* Loop until the request is satisfied (or no data available from + /* + * Loop until the request is satisfied (or no data available from * below, possibly EOF). */ - copied = ResultCopy (&rtPtr->result, UCHARP(buf), toRead); - toRead -= copied; - buf += copied; + copied = ResultCopy(&rtPtr->result, UCHARP(buf), toRead); + toRead -= copied; + buf += copied; gotBytes += copied; if (toRead == 0) { @@ -1073,9 +1089,7 @@ ReflectInput( * have to go to the underlying channel, get more bytes and then * transform them for delivery. We may not get what we want (full EOF * or temporarily out of data). - */ - - /* + * * Length (rtPtr->result) == 0, toRead > 0 here. Use 'buf'! as target * to store the intermediary information read from the parent channel. * @@ -1088,7 +1102,8 @@ ReflectInput( if ((rtPtr->methods & FLAG(METH_LIMIT))) { int maxRead = -1; - if (!TransformLimit (rtPtr, errorCodePtr, &maxRead)) { + + if (!TransformLimit(rtPtr, errorCodePtr, &maxRead)) { return -1; } if (maxRead == 0) { @@ -1105,22 +1120,24 @@ ReflectInput( return gotBytes; } - read = Tcl_ReadRaw (rtPtr->parent, buf, toRead); + read = Tcl_ReadRaw(rtPtr->parent, buf, toRead); if (read < 0) { - /* Report errors to caller. - * The state of the seek system is unchanged! + /* + * Report errors to caller. The state of the seek system is + * unchanged! */ - if ((Tcl_GetErrno () == EAGAIN) && (gotBytes > 0)) { - /* EAGAIN is a special situation. If we had some data - * before we report that instead of the request to re-try. + if ((Tcl_GetErrno() == EAGAIN) && (gotBytes > 0)) { + /* + * EAGAIN is a special situation. If we had some data before + * we report that instead of the request to re-try. */ return gotBytes; } - *errorCodePtr = Tcl_GetErrno (); - return -1; + *errorCodePtr = Tcl_GetErrno(); + return -1; } if (read == 0) { @@ -1134,17 +1151,21 @@ ReflectInput( * convert and flush all waiting partial data. */ - if (!Tcl_Eof (rtPtr->parent)) { - /* The state of the seek system is unchanged! */ + if (!Tcl_Eof(rtPtr->parent)) { + /* + * The state of the seek system is unchanged! + */ if ((gotBytes == 0) && rtPtr->nonblocking) { *errorCodePtr = EWOULDBLOCK; return -1; - } else { - return gotBytes; } + return gotBytes; } else { - /* Eof in parent */ + /* + * Eof in parent. + */ + if (rtPtr->readIsDrained) { return gotBytes; } @@ -1155,18 +1176,24 @@ ReflectInput( */ if (HAS(rtPtr->methods, METH_DRAIN)) { - if(!TransformDrain (rtPtr, errorCodePtr)) { + if (!TransformDrain(rtPtr, errorCodePtr)) { return -1; } } - if (ResultLength (&rtPtr->result) == 0) { - /* The drain delivered nothing */ + if (ResultLength(&rtPtr->result) == 0) { + /* + * The drain delivered nothing. + */ + return gotBytes; } - /* Reset eof, force caller to drain result buffer */ - ((Channel*) rtPtr->parent)->state->flags &= ~CHANNEL_EOF; + /* + * Reset eof, force caller to drain result buffer. + */ + + ((Channel *) rtPtr->parent)->state->flags &= ~CHANNEL_EOF; continue; /* at: while (toRead > 0) */ } } /* read == 0 */ @@ -1177,13 +1204,12 @@ ReflectInput( * iteration will put it into the result. */ - if (!TransformRead (rtPtr, errorCodePtr, UCHARP(buf), read)) { + if (!TransformRead(rtPtr, errorCodePtr, UCHARP(buf), read)) { return -1; } } /* while toRead > 0 */ return gotBytes; - } /* @@ -1209,7 +1235,7 @@ ReflectOutput( int toWrite, int *errorCodePtr) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; /* * The following check can be done before thread redirection, because we @@ -1224,8 +1250,10 @@ ReflectOutput( } if (toWrite == 0) { - /* Nothing came in to write, ignore the call + /* + * Nothing came in to write, ignore the call */ + return 0; } @@ -1235,7 +1263,7 @@ ReflectOutput( */ if ((rtPtr->methods & FLAG(METH_CLEAR))) { - TransformClear (rtPtr); + TransformClear(rtPtr); } /* @@ -1244,7 +1272,7 @@ ReflectOutput( * parent channel for further processing. */ - if (!TransformWrite (rtPtr, errorCodePtr, UCHARP(buf), toWrite)) { + if (!TransformWrite(rtPtr, errorCodePtr, UCHARP(buf), toWrite)) { return -1; } @@ -1263,7 +1291,8 @@ ReflectOutput( * The new location of the access point. * * Side effects: - * Allocates memory. Arbitrary, per the parent channel, and the called scripts. + * Allocates memory. Arbitrary, per the parent channel, and the called + * scripts. * *---------------------------------------------------------------------- */ @@ -1275,12 +1304,12 @@ ReflectSeekWide( int seekMode, int *errorCodePtr) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; - Channel* parent = (Channel*) rtPtr->parent; + ReflectedTransform *rtPtr = clientData; + Channel *parent = (Channel *) rtPtr->parent; Tcl_WideInt curPos; /* Position on the device. */ - Tcl_DriverSeekProc *seekProc = - Tcl_ChannelSeekProc(Tcl_GetChannelType (rtPtr->parent)); + Tcl_DriverSeekProc *seekProc = + Tcl_ChannelSeekProc(Tcl_GetChannelType(rtPtr->parent)); /* * Fail if the parent channel is not seekable. @@ -1298,19 +1327,16 @@ ReflectSeekWide( * request down and the result back up unchanged. */ - if ( - ((seekMode != SEEK_CUR) || (offset != 0)) && - (HAS(rtPtr->methods, METH_CLEAR) || - HAS(rtPtr->methods, METH_FLUSH)) - ) { + if (((seekMode != SEEK_CUR) || (offset != 0)) && + (HAS(rtPtr->methods,METH_CLEAR) || HAS(rtPtr->methods,METH_FLUSH))){ /* - * Neither a tell request, nor clear/flush both not supported. We - * have to go through the Tcl level to clear and/or flush the + * Neither a tell request, nor clear/flush both not supported. We have + * to go through the Tcl level to clear and/or flush the * transformation. */ if ((rtPtr->methods & FLAG(METH_CLEAR))) { - TransformClear (rtPtr); + TransformClear(rtPtr); } /* @@ -1321,7 +1347,7 @@ ReflectSeekWide( */ if (HAS(rtPtr->methods, METH_FLUSH)) { - if (!TransformFlush (rtPtr, errorCodePtr, FLUSH_DISCARD)) { + if (!TransformFlush(rtPtr, errorCodePtr, FLUSH_DISCARD)) { return -1; } } @@ -1335,14 +1361,14 @@ ReflectSeekWide( if (HaveVersion(parent->typePtr, TCL_CHANNEL_VERSION_3) && parent->typePtr->wideSeekProc != NULL) { - curPos = (parent->typePtr->wideSeekProc) (parent->instanceData, - offset, seekMode, errorCodePtr); + curPos = parent->typePtr->wideSeekProc(parent->instanceData, offset, + seekMode, errorCodePtr); } else if (offset < Tcl_LongAsWide(LONG_MIN) || offset > Tcl_LongAsWide(LONG_MAX)) { *errorCodePtr = EOVERFLOW; curPos = Tcl_LongAsWide(-1); } else { - curPos = Tcl_LongAsWide((parent->typePtr->seekProc) ( + curPos = Tcl_LongAsWide(parent->typePtr->seekProc( parent->instanceData, Tcl_WideAsLong(offset), seekMode, errorCodePtr)); } @@ -1394,12 +1420,11 @@ ReflectWatch( ClientData clientData, int mask) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; - Tcl_DriverWatchProc* watchProc; + ReflectedTransform *rtPtr = clientData; + Tcl_DriverWatchProc *watchProc; - watchProc = Tcl_ChannelWatchProc (Tcl_GetChannelType (rtPtr->parent)); - (*watchProc) (Tcl_GetChannelInstanceData(rtPtr->parent), - mask); + watchProc = Tcl_ChannelWatchProc(Tcl_GetChannelType(rtPtr->parent)); + watchProc(Tcl_GetChannelInstanceData(rtPtr->parent), mask); /* * Management of the internal timer. @@ -1408,11 +1433,11 @@ ReflectWatch( if (!(mask & TCL_READABLE) || (ResultLength(&rtPtr->result) == 0)) { /* * A pending timer may exist, but either is there no (more) interest - * in the events it generates or nothing is available for - * reading. Remove it, if existing. + * in the events it generates or nothing is available for reading. + * Remove it, if existing. */ - TimerKill (rtPtr); + TimerKill(rtPtr); } else { /* * There might be no pending timer, but there is interest in readable @@ -1420,7 +1445,7 @@ ReflectWatch( * flush that if it does not exist. */ - TimerSetup (rtPtr); + TimerSetup(rtPtr); } } @@ -1446,7 +1471,7 @@ ReflectBlock( ClientData clientData, int nonblocking) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; /* * Transformations simply record the blocking mode in their C level @@ -1481,7 +1506,7 @@ ReflectSetOption( const char *optionName, /* Name of requested option */ const char *newValue) /* The new value */ { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; /* * Transformations have no options. Thus the call is passed down unchanged @@ -1490,15 +1515,14 @@ ReflectSetOption( * level is not involved there is no need for thread forwarding. */ - Tcl_DriverSetOptionProc *setOptionProc = - Tcl_ChannelSetOptionProc (Tcl_GetChannelType (rtPtr->parent)); + Tcl_DriverSetOptionProc *setOptionProc = + Tcl_ChannelSetOptionProc(Tcl_GetChannelType(rtPtr->parent)); - if (setOptionProc != NULL) { - return (*setOptionProc) (Tcl_GetChannelInstanceData (rtPtr->parent), - interp, optionName, newValue); - } else { - return TCL_ERROR; + if (setOptionProc == NULL) { + return TCL_ERROR; } + return setOptionProc(Tcl_GetChannelInstanceData(rtPtr->parent), interp, + optionName, newValue); } /* @@ -1524,7 +1548,7 @@ ReflectGetOption( const char *optionName, /* Name of reuqested option */ Tcl_DString *dsPtr) /* String to place the result into */ { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; /* * Transformations have no options. Thus the call is passed down unchanged @@ -1537,16 +1561,16 @@ ReflectGetOption( * specific option has to fail. */ - Tcl_DriverGetOptionProc *getOptionProc = - Tcl_ChannelGetOptionProc (Tcl_GetChannelType (rtPtr->parent)); + Tcl_DriverGetOptionProc *getOptionProc = + Tcl_ChannelGetOptionProc(Tcl_GetChannelType(rtPtr->parent)); if (getOptionProc != NULL) { - return (*getOptionProc) (Tcl_GetChannelInstanceData (rtPtr->parent), - interp, optionName, dsPtr); - } else if (optionName == (char*) NULL) { - return TCL_OK; + return getOptionProc(Tcl_GetChannelInstanceData(rtPtr->parent), + interp, optionName, dsPtr); + } else if (optionName == NULL) { + return TCL_OK; } else { - return TCL_ERROR; + return TCL_ERROR; } } @@ -1568,11 +1592,11 @@ ReflectGetOption( static int ReflectHandle( - ClientData clientData, - int direction, - ClientData* handlePtr) + ClientData clientData, + int direction, + ClientData *handlePtr) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; /* * Transformations have no handle of their own. As such we simply query @@ -1584,7 +1608,7 @@ ReflectHandle( * involved no forwarding is required. */ - return Tcl_GetChannelHandle (rtPtr->parent, direction, handlePtr); + return Tcl_GetChannelHandle(rtPtr->parent, direction, handlePtr); } /* *---------------------------------------------------------------------- @@ -1604,10 +1628,10 @@ ReflectHandle( static int ReflectNotify( - ClientData clientData, - int mask) + ClientData clientData, + int mask) { - ReflectedTransform *rtPtr = (ReflectedTransform *) clientData; + ReflectedTransform *rtPtr = clientData; /* * An event occured in the underlying channel. @@ -1618,7 +1642,7 @@ ReflectNotify( * us to recreate the timer (in ReflectWatch). */ - TimerKill (rtPtr); + TimerKill(rtPtr); /* * Pass to higher layers. @@ -1722,14 +1746,17 @@ NewReflectedTransform( rtPtr->interp = interp; rtPtr->handle = handleObj; Tcl_IncrRefCount(handleObj); - rtPtr->timer = (Tcl_TimerToken) NULL; + rtPtr->timer = NULL; rtPtr->mode = 0; rtPtr->readIsDrained = 0; - rtPtr->nonblocking = - (((Channel*) parentChan)->state->flags & CHANNEL_NONBLOCKING); - /* Query parent for current blocking mode. */ + rtPtr->nonblocking = + (((Channel *) parentChan)->state->flags & CHANNEL_NONBLOCKING); - ResultInit (&rtPtr->result); + /* + * Query parent for current blocking mode. + */ + + ResultInit(&rtPtr->result); /* * Method placeholder. @@ -1750,7 +1777,7 @@ NewReflectedTransform( */ rtPtr->argc = listc + 2; - rtPtr->argv = (Tcl_Obj**) ckalloc(sizeof(Tcl_Obj*) * (listc+4)); + rtPtr->argv = (Tcl_Obj **) ckalloc(sizeof(Tcl_Obj *) * (listc+4)); /* * Duplicate object references. @@ -1758,6 +1785,7 @@ NewReflectedTransform( for (i=0; iargv[i] = listv[i]; + Tcl_IncrRefCount(word); } @@ -1828,8 +1856,8 @@ FreeReflectedTransform( { int i, n; - TimerKill (rtPtr); - ResultClear (&rtPtr->result); + TimerKill(rtPtr); + ResultClear(&rtPtr->result); Tcl_DecrRefCount(rtPtr->handle); rtPtr->handle = NULL; @@ -2039,7 +2067,8 @@ GetReflectedTransformMap( ReflectedTransformMap *rtmPtr = Tcl_GetAssocData(interp, RTMKEY, NULL); if (rtmPtr == NULL) { - rtmPtr = (ReflectedTransformMap *) ckalloc(sizeof(ReflectedTransformMap)); + rtmPtr = (ReflectedTransformMap *) + ckalloc(sizeof(ReflectedTransformMap)); Tcl_InitHashTable(&rtmPtr->map, TCL_STRING_KEYS); Tcl_SetAssocData(interp, RTMKEY, (Tcl_InterpDeleteProc *) DeleteReflectedTransformMap, rtmPtr); @@ -2076,7 +2105,6 @@ DeleteReflectedTransformMap( Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ ReflectedTransform *rtPtr; - #ifdef TCL_THREADS ForwardingResult *resultPtr; ForwardingEvent *evPtr; @@ -2099,7 +2127,7 @@ DeleteReflectedTransformMap( for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch); hPtr != NULL; hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch)) { - rtPtr = (ReflectedTransform *) Tcl_GetHashValue (hPtr); + rtPtr = Tcl_GetHashValue(hPtr); rtPtr->interp = NULL; Tcl_DeleteHashEntry(hPtr); } @@ -2119,8 +2147,7 @@ DeleteReflectedTransformMap( Tcl_MutexLock(&rtForwardMutex); - for (resultPtr = forwardList; - resultPtr != NULL; + for (resultPtr = forwardList; resultPtr != NULL; resultPtr = resultPtr->nextPtr) { if (resultPtr->dsti != interp) { /* @@ -2158,7 +2185,7 @@ DeleteReflectedTransformMap( for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch); hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { - rtPtr = (ReflectedTransform *) Tcl_GetHashValue (hPtr); + rtPtr = Tcl_GetHashValue(hPtr); if (rtPtr->interp != interp) { /* @@ -2250,8 +2277,7 @@ DeleteThreadReflectedTransformMap( Tcl_MutexLock(&rtForwardMutex); - for (resultPtr = forwardList; - resultPtr != NULL; + for (resultPtr = forwardList; resultPtr != NULL; resultPtr = resultPtr->nextPtr) { ForwardingEvent *evPtr; ForwardParam *paramPtr; @@ -2291,7 +2317,7 @@ DeleteThreadReflectedTransformMap( for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch); hPtr != NULL; hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch)) { - ReflectedTransform *rtPtr = (ReflectedTransform *) Tcl_GetHashValue(hPtr); + ReflectedTransform *rtPtr = Tcl_GetHashValue(hPtr); rtPtr->interp = NULL; Tcl_DeleteHashEntry(hPtr); @@ -2304,7 +2330,7 @@ static void ForwardOpToOwnerThread( ReflectedTransform *rtPtr, /* Channel instance */ ForwardedOperation op, /* Forwarded driver operation */ - const VOID *param) /* Arguments */ + const void *param) /* Arguments */ { Tcl_ThreadId dst = rtPtr->thread; ForwardingEvent *evPtr; @@ -2363,13 +2389,13 @@ ForwardOpToOwnerThread( * (see above) for. */ - Tcl_CreateThreadExitHandler(SrcExitProc, (ClientData) evPtr); + Tcl_CreateThreadExitHandler(SrcExitProc, evPtr); /* * Queue the event and poke the other thread's notifier. */ - Tcl_ThreadQueueEvent(dst, (Tcl_Event *)evPtr, TCL_QUEUE_TAIL); + Tcl_ThreadQueueEvent(dst, (Tcl_Event *) evPtr, TCL_QUEUE_TAIL); Tcl_ThreadAlert(dst); /* @@ -2411,7 +2437,7 @@ ForwardOpToOwnerThread( * notifier, after it serviced the event. */ - Tcl_DeleteThreadExitHandler(SrcExitProc, (ClientData) evPtr); + Tcl_DeleteThreadExitHandler(SrcExitProc, evPtr); result = resultPtr->result; ckfree((char*) resultPtr); @@ -2441,8 +2467,10 @@ ForwardProc( Tcl_Interp *interp = rtPtr->interp; ForwardParam *paramPtr = evPtr->param; Tcl_Obj *resObj = NULL; /* Interp result of InvokeTclMethod */ - ReflectedTransformMap* rtmPtr; /* Map of reflected channels with handlers in this interp */ - Tcl_HashEntry* hPtr; /* Entry in the above map */ + ReflectedTransformMap *rtmPtr; + /* Map of reflected channels with handlers in + * this interp. */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ /* * Ignore the event if no one is waiting for its result anymore. @@ -2468,7 +2496,8 @@ ForwardProc( * No parameters/results. */ - if (InvokeTclMethod(rtPtr, "finalize", NULL, NULL, &resObj) != TCL_OK) { + if (InvokeTclMethod(rtPtr, "finalize", NULL, NULL, + &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); } @@ -2484,10 +2513,9 @@ ForwardProc( * dereferencing a dangling pointer. */ - rtmPtr = GetReflectedTransformMap (interp); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, - Tcl_GetString(rtPtr->handle)); - Tcl_DeleteHashEntry (hPtr); + rtmPtr = GetReflectedTransformMap(interp); + hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); + Tcl_DeleteHashEntry(hPtr); /* * In a threaded interpreter we manage a per-thread map as well, to @@ -2496,15 +2524,14 @@ ForwardProc( */ rtmPtr = GetThreadReflectedTransformMap(); - hPtr = Tcl_FindHashEntry (&rtmPtr->map, - Tcl_GetString(rtPtr->handle)); - Tcl_DeleteHashEntry (hPtr); + hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); + Tcl_DeleteHashEntry(hPtr); FreeReflectedTransform(rtPtr); break; case ForwardedInput: { - Tcl_Obj *bufObj = Tcl_NewByteArrayObj((unsigned char *) paramPtr->transform.buf, - paramPtr->transform.size); + Tcl_Obj *bufObj = Tcl_NewByteArrayObj((unsigned char *) + paramPtr->transform.buf, paramPtr->transform.size); if (InvokeTclMethod(rtPtr, "read", bufObj, NULL, &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); @@ -2516,14 +2543,15 @@ ForwardProc( */ int bytec; /* Number of returned bytes */ - unsigned char *bytev; /* Array of returned bytes */ + unsigned char *bytev; + /* Array of returned bytes */ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); paramPtr->transform.size = bytec; if (bytec > 0) { - paramPtr->transform.buf = ckalloc (bytec); + paramPtr->transform.buf = ckalloc(bytec); memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); } else { paramPtr->transform.buf = NULL; @@ -2533,8 +2561,8 @@ ForwardProc( } case ForwardedOutput: { - Tcl_Obj *bufObj = Tcl_NewByteArrayObj((unsigned char *) paramPtr->transform.buf, - paramPtr->transform.size); + Tcl_Obj *bufObj = Tcl_NewByteArrayObj((unsigned char *) + paramPtr->transform.buf, paramPtr->transform.size); if (InvokeTclMethod(rtPtr, "write", bufObj, NULL, &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); @@ -2546,14 +2574,15 @@ ForwardProc( */ int bytec; /* Number of returned bytes */ - unsigned char *bytev; /* Array of returned bytes */ + unsigned char *bytev; + /* Array of returned bytes */ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); paramPtr->transform.size = bytec; if (bytec > 0) { - paramPtr->transform.buf = ckalloc (bytec); + paramPtr->transform.buf = ckalloc(bytec); memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); } else { paramPtr->transform.buf = NULL; @@ -2580,7 +2609,7 @@ ForwardProc( paramPtr->transform.size = bytec; if (bytec > 0) { - paramPtr->transform.buf = ckalloc (bytec); + paramPtr->transform.buf = ckalloc(bytec); memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); } else { paramPtr->transform.buf = NULL; @@ -2600,14 +2629,15 @@ ForwardProc( */ int bytec; /* Number of returned bytes */ - unsigned char *bytev; /* Array of returned bytes */ + unsigned char *bytev; + /* Array of returned bytes */ bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); paramPtr->transform.size = bytec; if (bytec > 0) { - paramPtr->transform.buf = ckalloc (bytec); + paramPtr->transform.buf = ckalloc(bytec); memcpy(paramPtr->transform.buf, bytev, (size_t)bytec); } else { paramPtr->transform.buf = NULL; @@ -2627,7 +2657,8 @@ ForwardProc( if (InvokeTclMethod(rtPtr, "limit?", NULL, NULL, &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); paramPtr->limit.max = -1; - } else if (Tcl_GetIntFromObj(interp, resObj, ¶mPtr->limit.max) != TCL_OK) { + } else if (Tcl_GetIntFromObj(interp, resObj, + ¶mPtr->limit.max) != TCL_OK) { ForwardSetObjError(paramPtr, MarshallError(interp)); paramPtr->limit.max = -1; } @@ -2673,7 +2704,7 @@ static void SrcExitProc( ClientData clientData) { - ForwardingEvent *evPtr = (ForwardingEvent *) clientData; + ForwardingEvent *evPtr = clientData; ForwardingResult *resultPtr; ForwardParam *paramPtr; @@ -2734,265 +2765,270 @@ ForwardSetObjError( /* *---------------------------------------------------------------------- * - * TimerKill -- + * TimerKill -- * - * Timer management. Removes the internal timer - * if it exists. + * Timer management. Removes the internal timer if it exists. * - * Sideeffects: - * See above. + * Side effects: + * See above. * - * Result: - * None. + * Result: + * None. * *---------------------------------------------------------------------- */ static void -TimerKill (ReflectedTransform* rtPtr) +TimerKill( + ReflectedTransform *rtPtr) { - if (rtPtr->timer == (Tcl_TimerToken) NULL) return; + if (rtPtr->timer == NULL) { + return; + } - /* Delete an existing flush-out timer, prevent it from firing on a + /* + * Delete an existing flush-out timer, prevent it from firing on a * removed/dead channel. */ - Tcl_DeleteTimerHandler (rtPtr->timer); - rtPtr->timer = (Tcl_TimerToken) NULL; + Tcl_DeleteTimerHandler(rtPtr->timer); + rtPtr->timer = NULL; } /* *---------------------------------------------------------------------- * - * TimerSetup -- + * TimerSetup -- * - * Timer management. Creates the internal timer - * if it does not exist. + * Timer management. Creates the internal timer if it does not exist. * - * Sideeffects: - * See above. + * Side effects: + * See above. * - * Result: - * None. + * Result: + * None. * *---------------------------------------------------------------------- */ static void -TimerSetup (ReflectedTransform* rtPtr) +TimerSetup( + ReflectedTransform *rtPtr) { - if (rtPtr->timer != (Tcl_TimerToken) NULL) return; + if (rtPtr->timer != NULL) { + return; + } - rtPtr->timer = Tcl_CreateTimerHandler (FLUSH_DELAY, TimerRun, - (ClientData) rtPtr); + rtPtr->timer = Tcl_CreateTimerHandler(FLUSH_DELAY, TimerRun, rtPtr); } /* *---------------------------------------------------------------------- * - * TimerRun -- + * TimerRun -- * - * Called by the notifier (-> timer) to flush out - * information waiting in channel buffers. + * Called by the notifier (-> timer) to flush out information waiting in + * channel buffers. * - * Sideeffects: - * As of 'Tcl_NotifyChannel'. + * Side effects: + * As of 'Tcl_NotifyChannel'. * - * Result: - * None. + * Result: + * None. * *---------------------------------------------------------------------- */ static void -TimerRun (ClientData clientData) +TimerRun( + ClientData clientData) { - ReflectedTransform* rtPtr = (ReflectedTransform*) clientData; + ReflectedTransform *rtPtr = clientData; - rtPtr->timer = (Tcl_TimerToken) NULL; - Tcl_NotifyChannel (rtPtr->chan, TCL_READABLE); + rtPtr->timer = NULL; + Tcl_NotifyChannel(rtPtr->chan, TCL_READABLE); } - /* *---------------------------------------------------------------------- * - * ResultInit -- + * ResultInit -- * - * Initializes the specified buffer structure. The - * structure will contain valid information for an - * emtpy buffer. + * Initializes the specified buffer structure. The structure will contain + * valid information for an emtpy buffer. * - * Sideeffects: - * See above. + * Side effects: + * See above. * - * Result: - * None. + * Result: + * None. * *---------------------------------------------------------------------- */ static void -ResultInit (ResultBuffer* r) /* Reference to the structure to initialize */ +ResultInit( + ResultBuffer *rPtr) /* Reference to the structure to + * initialize. */ { - r->used = 0; - r->allocated = 0; - r->buf = NULL; + rPtr->used = 0; + rPtr->allocated = 0; + rPtr->buf = NULL; } /* *---------------------------------------------------------------------- * - * ResultClear -- + * ResultClear -- * * Deallocates any memory allocated by 'ResultAdd'. * - * Sideeffects: - * See above. + * Side effects: + * See above. * - * Result: - * None. + * Result: + * None. * *---------------------------------------------------------------------- */ static void -ResultClear (ResultBuffer* r) /* Reference to the buffer to clear out */ +ResultClear( + ResultBuffer *rPtr) /* Reference to the buffer to clear out */ { - r->used = 0; + rPtr->used = 0; - if (!r->allocated) return; + if (!rPtr->allocated) { + return; + } - Tcl_Free ((char*) r->buf); - r->buf = NULL; - r->allocated = 0; + Tcl_Free((char *) rPtr->buf); + rPtr->buf = NULL; + rPtr->allocated = 0; } /* *---------------------------------------------------------------------- * - * ResultAdd -- + * ResultAdd -- * - * Adds the bytes in the specified array to the - * buffer, by appending it. + * Adds the bytes in the specified array to the buffer, by appending it. * - * Sideeffects: - * See above. + * Side effects: + * See above. * - * Result: - * None. + * Result: + * None. * *---------------------------------------------------------------------- */ static void -ResultAdd (r, buf, toWrite) - ResultBuffer* r; /* The buffer to extend */ - unsigned char* buf; /* The buffer to read from */ - int toWrite; /* The number of bytes in 'buf' */ +ResultAdd( + ResultBuffer *rPtr, /* The buffer to extend */ + unsigned char *buf, /* The buffer to read from */ + int toWrite) /* The number of bytes in 'buf' */ { - if ((r->used + toWrite + 1) > r->allocated) { - /* Extension of the internal buffer is required. + if ((rPtr->used + toWrite + 1) > rPtr->allocated) { + /* + * Extension of the internal buffer is required. * NOTE: Currently linear. Should be doubling to amortize. */ - if (r->allocated == 0) { - r->allocated = toWrite + RB_INCREMENT; - r->buf = UCHARP(Tcl_Alloc (r->allocated)); + if (rPtr->allocated == 0) { + rPtr->allocated = toWrite + RB_INCREMENT; + rPtr->buf = UCHARP(Tcl_Alloc(rPtr->allocated)); } else { - r->allocated += toWrite + RB_INCREMENT; - r->buf = UCHARP(Tcl_Realloc((char*) r->buf, r->allocated)); + rPtr->allocated += toWrite + RB_INCREMENT; + rPtr->buf = UCHARP(Tcl_Realloc((char *) rPtr->buf, + rPtr->allocated)); } } - /* now copy data */ - memcpy (r->buf + r->used, buf, toWrite); - r->used += toWrite; + /* + * Now copy data. + */ + + memcpy(rPtr->buf + rPtr->used, buf, toWrite); + rPtr->used += toWrite; } /* *---------------------------------------------------------------------- * - * ResultCopy -- + * ResultCopy -- * - * Copies the requested number of bytes from the - * buffer into the specified array and removes them - * from the buffer afterward. Copies less if there - * is not enough data in the buffer. + * Copies the requested number of bytes from the buffer into the + * specified array and removes them from the buffer afterward. Copies + * less if there is not enough data in the buffer. * - * Sideeffects: - * See above. + * Side effects: + * See above. * - * Result: - * The number of actually copied bytes, - * possibly less than 'toRead'. + * Result: + * The number of actually copied bytes, possibly less than 'toRead'. * *---------------------------------------------------------------------- */ static int -ResultCopy (ResultBuffer* r, /* The buffer to read from */ - unsigned char* buf, /* The buffer to copy into */ - int toRead) /* Number of requested bytes */ +ResultCopy( + ResultBuffer *rPtr, /* The buffer to read from */ + unsigned char *buf, /* The buffer to copy into */ + int toRead) /* Number of requested bytes */ { int copied; - if (r->used == 0) { - /* Nothing to copy in the case of an empty buffer. + if (rPtr->used == 0) { + /* + * Nothing to copy in the case of an empty buffer. */ copied = 0; - goto done; - } + } else if (rPtr->used == toRead) { + /* + * We have just enough. Copy everything to the caller. + */ - if (r->used == toRead) { - /* We have just enough. Copy everything to the caller. + memcpy(buf, rPtr->buf, toRead); + rPtr->used = 0; + copied = toRead; + } else if (rPtr->used > toRead) { + /* + * The internal buffer contains more than requested. Copy the + * requested subset to the caller, and shift the remaining bytes down. */ - memcpy ((VOID*) buf, (VOID*) r->buf, toRead); - r->used = 0; - copied = toRead; - goto done; - } + memcpy(buf, rPtr->buf, toRead); + memmove(rPtr->buf, rPtr->buf + toRead, rPtr->used - toRead); - if (r->used > toRead) { - /* The internal buffer contains more than requested. - * Copy the requested subset to the caller, and shift - * the remaining bytes down. + rPtr->used -= toRead; + copied = toRead; + } else { + /* + * There is not enough in the buffer to satisfy the caller, so take + * everything. */ - memcpy ((VOID*) buf, (VOID*) r->buf, toRead); - memmove ((VOID*) r->buf, (VOID*) (r->buf + toRead), r->used - toRead); - - r->used -= toRead; - copied = toRead; - goto done; + memcpy(buf, rPtr->buf, rPtr->used); + toRead = rPtr->used; + rPtr->used = 0; + copied = toRead; } - /* There is not enough in the buffer to satisfy the caller, so - * take everything. - */ - - memcpy ((VOID*) buf, (VOID*) r->buf, r->used); - toRead = r->used; - r->used = 0; - copied = toRead; - /* -- common postwork code ------- */ - done: return copied; } - static int -TransformRead ( - ReflectedTransform* rtPtr, - int* errorCodePtr, - unsigned char* buf, - int toRead) +TransformRead( + ReflectedTransform *rtPtr, + int *errorCodePtr, + unsigned char *buf, + int toRead) { - Tcl_Obj* bufObj; - Tcl_Obj* resObj; + Tcl_Obj *bufObj; + Tcl_Obj *resObj; int bytec; /* Number of returned bytes */ unsigned char *bytev; /* Array of returned bytes */ @@ -3004,7 +3040,7 @@ TransformRead ( if (rtPtr->thread != Tcl_GetCurrentThread()) { ForwardParam p; - p.transform.buf = (char*) buf; + p.transform.buf = (char *) buf; p.transform.size = toRead; ForwardOpToOwnerThread(rtPtr, ForwardedInput, &p); @@ -3013,41 +3049,38 @@ TransformRead ( PassReceivedError(rtPtr->chan, &p); *errorCodePtr = EINVAL; return 0; - } else { - *errorCodePtr = EOK; } - ResultAdd (&rtPtr->result, UCHARP(p.transform.buf), p.transform.size); - ckfree (p.transform.buf); - } else { + *errorCodePtr = EOK; + ResultAdd(&rtPtr->result, UCHARP(p.transform.buf), p.transform.size); + ckfree(p.transform.buf); + return 1; + } #endif - /* ASSERT: rtPtr->method & FLAG(METH_READ) */ - /* ASSERT: rtPtr->mode & TCL_READABLE */ - bufObj = Tcl_NewByteArrayObj((unsigned char *) buf, toRead); - if (InvokeTclMethod(rtPtr, "read", bufObj, NULL, &resObj) != TCL_OK) { - Tcl_SetChannelError(rtPtr->chan, resObj); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - *errorCodePtr = EINVAL; - return 0; - } + /* ASSERT: rtPtr->method & FLAG(METH_READ) */ + /* ASSERT: rtPtr->mode & TCL_READABLE */ - bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); - ResultAdd (&rtPtr->result, bytev, bytec); + bufObj = Tcl_NewByteArrayObj((unsigned char *) buf, toRead); + if (InvokeTclMethod(rtPtr, "read", bufObj, NULL, &resObj) != TCL_OK) { + Tcl_SetChannelError(rtPtr->chan, resObj); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ -#ifdef TCL_THREADS + *errorCodePtr = EINVAL; + return 0; } -#endif + bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); + ResultAdd(&rtPtr->result, bytev, bytec); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ return 1; } static int -TransformWrite ( - ReflectedTransform* rtPtr, - int* errorCodePtr, - unsigned char* buf, - int toWrite) +TransformWrite( + ReflectedTransform *rtPtr, + int *errorCodePtr, + unsigned char *buf, + int toWrite) { Tcl_Obj *bufObj; Tcl_Obj *resObj; @@ -3063,7 +3096,7 @@ TransformWrite ( if (rtPtr->thread != Tcl_GetCurrentThread()) { ForwardParam p; - p.transform.buf = (char*) buf; + p.transform.buf = (char *) buf; p.transform.size = toWrite; ForwardOpToOwnerThread(rtPtr, ForwardedOutput, &p); @@ -3072,15 +3105,15 @@ TransformWrite ( PassReceivedError(rtPtr->chan, &p); *errorCodePtr = EINVAL; return 0; - } else { - *errorCodePtr = EOK; } - res = Tcl_WriteRaw (rtPtr->parent, - (char*) p.transform.buf, p.transform.size); - ckfree (p.transform.buf); - } else { + *errorCodePtr = EOK; + res = Tcl_WriteRaw(rtPtr->parent, (char *) p.transform.buf, + p.transform.size); + ckfree(p.transform.buf); + } else #endif + { /* ASSERT: rtPtr->method & FLAG(METH_WRITE) */ /* ASSERT: rtPtr->mode & TCL_WRITABLE */ @@ -3095,11 +3128,9 @@ TransformWrite ( *errorCodePtr = EOK; bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); - res = Tcl_WriteRaw (rtPtr->parent, (char*) bytev, bytec); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ -#ifdef TCL_THREADS + res = Tcl_WriteRaw(rtPtr->parent, (char *) bytev, bytec); + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ } -#endif if (res < 0) { *errorCodePtr = EINVAL; @@ -3109,14 +3140,12 @@ TransformWrite ( return 1; } - - static int TransformDrain( - ReflectedTransform* rtPtr, - int* errorCodePtr) + ReflectedTransform *rtPtr, + int *errorCodePtr) { - Tcl_Obj* resObj; + Tcl_Obj *resObj; int bytec; /* Number of returned bytes */ unsigned char *bytev; /* Array of returned bytes */ @@ -3134,14 +3163,14 @@ TransformDrain( PassReceivedError(rtPtr->chan, &p); *errorCodePtr = EINVAL; return 0; - } else { - *errorCodePtr = EOK; } - ResultAdd (&rtPtr->result, UCHARP(p.transform.buf), p.transform.size); - ckfree (p.transform.buf); - } else { + *errorCodePtr = EOK; + ResultAdd(&rtPtr->result, UCHARP(p.transform.buf), p.transform.size); + ckfree(p.transform.buf); + } else #endif + { if (InvokeTclMethod(rtPtr, "drain", NULL, NULL, &resObj)!=TCL_OK) { Tcl_SetChannelError(rtPtr->chan, resObj); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ @@ -3150,24 +3179,20 @@ TransformDrain( } bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); - ResultAdd (&rtPtr->result, bytev, bytec); + ResultAdd(&rtPtr->result, bytev, bytec); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - -#ifdef TCL_THREADS } -#endif rtPtr->readIsDrained = 1; return 1; } - static int TransformFlush( - ReflectedTransform* rtPtr, - int* errorCodePtr, - int op) + ReflectedTransform *rtPtr, + int *errorCodePtr, + int op) { Tcl_Obj* resObj; int bytec; /* Number of returned bytes */ @@ -3188,19 +3213,19 @@ TransformFlush( PassReceivedError(rtPtr->chan, &p); *errorCodePtr = EINVAL; return 0; - } else { - *errorCodePtr = EOK; } + *errorCodePtr = EOK; if (op == FLUSH_WRITE) { - res = Tcl_WriteRaw (rtPtr->parent, - (char*) p.transform.buf, p.transform.size); + res = Tcl_WriteRaw(rtPtr->parent, (char *) p.transform.buf, + p.transform.size); } else { res = 0; } ckfree(p.transform.buf); - } else { + } else #endif + { if (InvokeTclMethod(rtPtr, "flush", NULL, NULL, &resObj)!=TCL_OK) { Tcl_SetChannelError(rtPtr->chan, resObj); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ @@ -3210,15 +3235,13 @@ TransformFlush( if (op == FLUSH_WRITE) { bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); - res = Tcl_WriteRaw (rtPtr->parent, (char*) bytev, bytec); + res = Tcl_WriteRaw(rtPtr->parent, (char *) bytev, bytec); } else { res = 0; } Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - -#ifdef TCL_THREADS } -#endif + if (res < 0) { *errorCodePtr = EINVAL; return 0; @@ -3228,8 +3251,8 @@ TransformFlush( } static void -TransformClear ( - ReflectedTransform* rtPtr) +TransformClear( + ReflectedTransform *rtPtr) { /* * Are we in the correct thread? @@ -3241,28 +3264,25 @@ TransformClear ( ForwardOpToOwnerThread(rtPtr, ForwardedClear, &p); return; - } else { + } #endif - /* ASSERT: rtPtr->method & FLAG(METH_READ) */ - /* ASSERT: rtPtr->mode & TCL_READABLE */ - (void) InvokeTclMethod(rtPtr, "clear", NULL, NULL, NULL); + /* ASSERT: rtPtr->method & FLAG(METH_READ) */ + /* ASSERT: rtPtr->mode & TCL_READABLE */ -#ifdef TCL_THREADS - } -#endif + (void) InvokeTclMethod(rtPtr, "clear", NULL, NULL, NULL); rtPtr->readIsDrained = 0; - ResultClear (&rtPtr->result); + ResultClear(&rtPtr->result); } static int -TransformLimit ( - ReflectedTransform* rtPtr, - int* errorCodePtr, - int* maxPtr) +TransformLimit( + ReflectedTransform *rtPtr, + int *errorCodePtr, + int *maxPtr) { - Tcl_Obj* resObj; + Tcl_Obj *resObj; Tcl_InterpState sr; /* State of handler interp */ /* @@ -3279,11 +3299,11 @@ TransformLimit ( PassReceivedError(rtPtr->chan, &p); *errorCodePtr = EINVAL; return 0; - } else { - *errorCodePtr = EOK; - *maxPtr = p.limit.max; - return 1; } + + *errorCodePtr = EOK; + *maxPtr = p.limit.max; + return 1; } #endif @@ -3337,7 +3357,7 @@ HaveVersion( { Tcl_ChannelTypeVersion actualVersion = Tcl_ChannelVersion(chanTypePtr); - return (PTR2INT(actualVersion)) >= (PTR2INT(minimumVersion)); + return PTR2INT(actualVersion) >= PTR2INT(minimumVersion); } /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 5ce7858..6485831 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.179 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.180 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1182,7 +1182,7 @@ TclTeardownNamespace( */ if (nsPtr->deleteProc != NULL) { - (*nsPtr->deleteProc)(nsPtr->clientData); + nsPtr->deleteProc(nsPtr->clientData); } nsPtr->deleteProc = NULL; nsPtr->clientData = NULL; @@ -2425,7 +2425,7 @@ Tcl_FindCommand( Tcl_Command cmd; if (cxtNsPtr->cmdResProc) { - result = (*cxtNsPtr->cmdResProc)(interp, name, + result = cxtNsPtr->cmdResProc(interp, name, (Tcl_Namespace *) cxtNsPtr, flags, &cmd); } else { result = TCL_CONTINUE; @@ -2433,7 +2433,7 @@ Tcl_FindCommand( while (result == TCL_CONTINUE && resPtr) { if (resPtr->cmdResProc) { - result = (*resPtr->cmdResProc)(interp, name, + result = resPtr->cmdResProc(interp, name, (Tcl_Namespace *) cxtNsPtr, flags, &cmd); } resPtr = resPtr->nextPtr; diff --git a/generic/tclNotify.c b/generic/tclNotify.c index e6c4d40..53ef23e 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNotify.c,v 1.28 2008/07/24 21:54:38 nijtmans Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.29 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -535,7 +535,7 @@ Tcl_DeleteEvents( prevPtr = NULL; evPtr = tsdPtr->firstEventPtr; while (evPtr != NULL) { - if ((*proc)(evPtr, clientData) == 1) { + if (proc(evPtr, clientData) == 1) { /* * This event should be deleted. Unlink it. */ @@ -667,7 +667,7 @@ Tcl_ServiceEvent( */ Tcl_MutexUnlock(&(tsdPtr->queueMutex)); - result = (*proc)(evPtr, flags); + result = proc(evPtr, flags); Tcl_MutexLock(&(tsdPtr->queueMutex)); if (result) { @@ -931,7 +931,7 @@ Tcl_DoOneEvent( for (sourcePtr = tsdPtr->firstEventSourcePtr; sourcePtr != NULL; sourcePtr = sourcePtr->nextPtr) { if (sourcePtr->setupProc) { - (sourcePtr->setupProc)(sourcePtr->clientData, flags); + sourcePtr->setupProc(sourcePtr->clientData, flags); } } tsdPtr->inTraversal = 0; @@ -960,7 +960,7 @@ Tcl_DoOneEvent( for (sourcePtr = tsdPtr->firstEventSourcePtr; sourcePtr != NULL; sourcePtr = sourcePtr->nextPtr) { if (sourcePtr->checkProc) { - (sourcePtr->checkProc)(sourcePtr->clientData, flags); + sourcePtr->checkProc(sourcePtr->clientData, flags); } } @@ -1070,13 +1070,13 @@ Tcl_ServiceAll(void) for (sourcePtr = tsdPtr->firstEventSourcePtr; sourcePtr != NULL; sourcePtr = sourcePtr->nextPtr) { if (sourcePtr->setupProc) { - (sourcePtr->setupProc)(sourcePtr->clientData, TCL_ALL_EVENTS); + sourcePtr->setupProc(sourcePtr->clientData, TCL_ALL_EVENTS); } } for (sourcePtr = tsdPtr->firstEventSourcePtr; sourcePtr != NULL; sourcePtr = sourcePtr->nextPtr) { if (sourcePtr->checkProc) { - (sourcePtr->checkProc)(sourcePtr->clientData, TCL_ALL_EVENTS); + sourcePtr->checkProc(sourcePtr->clientData, TCL_ALL_EVENTS); } } diff --git a/generic/tclObj.c b/generic/tclObj.c index c5fef11..ae3f909 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.144 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.145 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1024,7 +1024,7 @@ Tcl_DuplicateObj( dupPtr->internalRep = objPtr->internalRep; dupPtr->typePtr = typePtr; } else { - (*typePtr->dupIntRepProc)(objPtr, dupPtr); + typePtr->dupIntRepProc(objPtr, dupPtr); } } return dupPtr; @@ -1064,7 +1064,7 @@ Tcl_GetString( Tcl_Panic("UpdateStringProc should not be invoked for type %s", objPtr->typePtr->name); } - (*objPtr->typePtr->updateStringProc)(objPtr); + objPtr->typePtr->updateStringProc(objPtr); return objPtr->bytes; } @@ -1104,7 +1104,7 @@ Tcl_GetStringFromObj( Tcl_Panic("UpdateStringProc should not be invoked for type %s", objPtr->typePtr->name); } - (*objPtr->typePtr->updateStringProc)(objPtr); + objPtr->typePtr->updateStringProc(objPtr); } if (lengthPtr != NULL) { @@ -2206,7 +2206,7 @@ Tcl_GetLongFromObj( mp_int big; UNPACK_BIGNUM(objPtr, big); - if ((size_t)(big.used) <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) + if ((size_t) big.used <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT) { unsigned long value = 0, numBytes = sizeof(long); long scratch; @@ -2506,7 +2506,7 @@ Tcl_GetWideIntFromObj( mp_int big; UNPACK_BIGNUM(objPtr, big); - if ((size_t)(big.used) <= (CHAR_BIT * sizeof(Tcl_WideInt) + if ((size_t) big.used <= (CHAR_BIT * sizeof(Tcl_WideInt) + DIGIT_BIT - 1) / DIGIT_BIT) { Tcl_WideUInt value = 0; unsigned long numBytes = sizeof(Tcl_WideInt); @@ -2587,7 +2587,7 @@ FreeBignum( UNPACK_BIGNUM(objPtr, toFree); mp_clear(&toFree); - if ((long)(objPtr->internalRep.ptrAndLongRep.value) < 0) { + if ((long) objPtr->internalRep.ptrAndLongRep.value < 0) { ckfree((char *) objPtr->internalRep.ptrAndLongRep.ptr); } } @@ -2927,11 +2927,12 @@ Tcl_SetBignumObj( if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetBignumObj"); } - if ((size_t)(bignumValue->used) + if ((size_t) bignumValue->used <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT) { unsigned long value = 0, numBytes = sizeof(long); long scratch; - unsigned char *bytes = (unsigned char *)&scratch; + unsigned char *bytes = (unsigned char *) &scratch; + if (mp_to_unsigned_bin_n(bignumValue, bytes, &numBytes) != MP_OKAY) { goto tooLargeForLong; } @@ -2951,12 +2952,13 @@ Tcl_SetBignumObj( } tooLargeForLong: #ifndef NO_WIDE_TYPE - if ((size_t)(bignumValue->used) + if ((size_t) bignumValue->used <= (CHAR_BIT * sizeof(Tcl_WideInt) + DIGIT_BIT - 1) / DIGIT_BIT) { Tcl_WideUInt value = 0; unsigned long numBytes = sizeof(Tcl_WideInt); Tcl_WideInt scratch; unsigned char *bytes = (unsigned char *)&scratch; + if (mp_to_unsigned_bin_n(bignumValue, bytes, &numBytes) != MP_OKAY) { goto tooLargeForWide; } diff --git a/generic/tclPanic.c b/generic/tclPanic.c index dec5ed4..0a63076 100644 --- a/generic/tclPanic.c +++ b/generic/tclPanic.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPanic.c,v 1.11 2008/04/27 22:21:31 dkf Exp $ + * RCS: @(#) $Id: tclPanic.c,v 1.12 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -90,9 +90,9 @@ Tcl_PanicVA( arg8 = va_arg(argList, char *); if (panicProc != NULL) { - (*panicProc)(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + panicProc(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); } else if (platformPanicProc != NULL) { - (*platformPanicProc)(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + platformPanicProc(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); } else { fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, diff --git a/generic/tclParse.c b/generic/tclParse.c index 787b556..c730eaa 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.72 2008/09/17 02:15:32 mistachkin Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.73 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -878,21 +878,21 @@ TclParseBackslash( */ if (isdigit(UCHAR(*p)) && (UCHAR(*p) < '8')) { /* INTL: digit */ - result = (unsigned char)(*p - '0'); + result = UCHAR(*p - '0'); p++; if ((numBytes == 2) || !isdigit(UCHAR(*p)) /* INTL: digit */ || (UCHAR(*p) >= '8')) { break; } count = 3; - result = (unsigned char)((result << 3) + (*p - '0')); + result = UCHAR((result << 3) + (*p - '0')); p++; if ((numBytes == 3) || !isdigit(UCHAR(*p)) /* INTL: digit */ || (UCHAR(*p) >= '8')) { break; } count = 4; - result = (unsigned char)((result << 3) + (*p - '0')); + result = UCHAR((result << 3) + (*p - '0')); break; } diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 3839429..436eea4 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.74 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.75 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1047,7 +1047,7 @@ Tcl_FSJoinPath( int needsSep = 0; if (fsPtr->filesystemSeparatorProc != NULL) { - Tcl_Obj *sep = (*fsPtr->filesystemSeparatorProc)(res); + Tcl_Obj *sep = fsPtr->filesystemSeparatorProc(res); if (sep != NULL) { separator = TclGetString(sep)[0]; @@ -1961,7 +1961,7 @@ Tcl_FSGetNormalizedPath( (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL)); if (0 && (clientData != NULL)) { fsPathPtr->nativePathPtr = - (*fsPathPtr->fsRecPtr->fsPtr->dupInternalRepProc)(clientData); + fsPathPtr->fsRecPtr->fsPtr->dupInternalRepProc(clientData); } /* @@ -2099,7 +2099,7 @@ Tcl_FSGetInternalRep( return NULL; } - nativePathPtr = (*proc)(pathPtr); + nativePathPtr = proc(pathPtr); srcFsPathPtr = PATHOBJ(pathPtr); srcFsPathPtr->nativePathPtr = nativePathPtr; } @@ -2512,8 +2512,9 @@ FreeFsPathInternalRep( if (fsPathPtr->nativePathPtr != NULL && fsPathPtr->fsRecPtr != NULL) { Tcl_FSFreeInternalRepProc *freeProc = fsPathPtr->fsRecPtr->fsPtr->freeInternalRepProc; + if (freeProc != NULL) { - (*freeProc)(fsPathPtr->nativePathPtr); + freeProc(fsPathPtr->nativePathPtr); fsPathPtr->nativePathPtr = NULL; } } @@ -2572,9 +2573,10 @@ DupFsPathInternalRep( && srcFsPathPtr->nativePathPtr != NULL) { Tcl_FSDupInternalRepProc *dupProc = srcFsPathPtr->fsRecPtr->fsPtr->dupInternalRepProc; + if (dupProc != NULL) { copyFsPathPtr->nativePathPtr = - (*dupProc)(srcFsPathPtr->nativePathPtr); + dupProc(srcFsPathPtr->nativePathPtr); } else { copyFsPathPtr->nativePathPtr = NULL; } diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c index 3c991ea..9cc79a5 100644 --- a/generic/tclPreserve.c +++ b/generic/tclPreserve.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPreserve.c,v 1.10 2007/03/21 18:02:51 dgp Exp $ + * RCS: @(#) $Id: tclPreserve.c,v 1.11 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -229,7 +229,7 @@ Tcl_Release( if (freeProc == TCL_DYNAMIC) { ckfree((char *) clientData); } else { - (*freeProc)((char *) clientData); + freeProc((char *) clientData); } } return; @@ -297,7 +297,7 @@ Tcl_EventuallyFree( if (freeProc == TCL_DYNAMIC) { ckfree((char *) clientData); } else { - (*freeProc)((char *)clientData); + freeProc((char *)clientData); } } diff --git a/generic/tclResult.c b/generic/tclResult.c index b0a8836..40f0cba 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.50 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.51 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -368,7 +368,7 @@ Tcl_DiscardResult( if (statePtr->freeProc == TCL_DYNAMIC) { ckfree(statePtr->result); } else { - (*statePtr->freeProc)(statePtr->result); + statePtr->freeProc(statePtr->result); } } } @@ -434,7 +434,7 @@ Tcl_SetResult( if (oldFreeProc == TCL_DYNAMIC) { ckfree(oldResult); } else { - (*oldFreeProc)(oldResult); + oldFreeProc(oldResult); } } @@ -526,7 +526,7 @@ Tcl_SetObjResult( if (iPtr->freeProc == TCL_DYNAMIC) { ckfree(iPtr->result); } else { - (*iPtr->freeProc)(iPtr->result); + iPtr->freeProc(iPtr->result); } iPtr->freeProc = 0; } @@ -579,7 +579,7 @@ Tcl_GetObjResult( if (iPtr->freeProc == TCL_DYNAMIC) { ckfree(iPtr->result); } else { - (*iPtr->freeProc)(iPtr->result); + iPtr->freeProc(iPtr->result); } iPtr->freeProc = 0; } @@ -861,7 +861,7 @@ Tcl_FreeResult( if (iPtr->freeProc == TCL_DYNAMIC) { ckfree(iPtr->result); } else { - (*iPtr->freeProc)(iPtr->result); + iPtr->freeProc(iPtr->result); } iPtr->freeProc = 0; } @@ -899,7 +899,7 @@ Tcl_ResetResult( if (iPtr->freeProc == TCL_DYNAMIC) { ckfree(iPtr->result); } else { - (*iPtr->freeProc)(iPtr->result); + iPtr->freeProc(iPtr->result); } iPtr->freeProc = 0; } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index b017347..6d5f96a 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.73 2008/10/16 22:34:19 nijtmans Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.74 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -883,13 +883,12 @@ Tcl_AttemptSetObjLength( */ if (objPtr->bytes != tclEmptyStringRep) { - newBytes = attemptckrealloc(objPtr->bytes, - (unsigned)(length + 1)); + newBytes = attemptckrealloc(objPtr->bytes, (unsigned) length+1); if (newBytes == NULL) { return 0; } } else { - newBytes = attemptckalloc((unsigned) (length + 1)); + newBytes = attemptckalloc((unsigned) length+1); if (newBytes == NULL) { return 0; } @@ -2027,7 +2026,7 @@ Tcl_AppendFormatToObj( const char *bytes; if (useShort) { - pure = Tcl_NewIntObj((int)(s)); + pure = Tcl_NewIntObj((int) s); } else if (useWide) { pure = Tcl_NewWideIntObj(w); } else if (useBig) { diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 1e1fd73..e254830 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.35 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.36 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -584,8 +584,8 @@ TimerHandlerEventProc( * potential reentrancy problems. */ - (*nextPtrPtr) = timerHandlerPtr->nextPtr; - (*timerHandlerPtr->proc)(timerHandlerPtr->clientData); + *nextPtrPtr = timerHandlerPtr->nextPtr; + timerHandlerPtr->proc(timerHandlerPtr->clientData); ckfree((char *) timerHandlerPtr); } TimerSetupProc(NULL, TCL_TIMER_EVENTS); @@ -743,7 +743,7 @@ TclServiceIdle(void) if (tsdPtr->idleList == NULL) { tsdPtr->lastIdlePtr = NULL; } - (*idlePtr->proc)(idlePtr->clientData); + idlePtr->proc(idlePtr->clientData); ckfree((char *) idlePtr); } if (tsdPtr->idleList) { diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 7876eab..e411488 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.53 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.54 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -238,7 +238,7 @@ Tcl_TraceObjCmd( 0, &typeIndex) != TCL_OK) { return TCL_ERROR; } - return (traceSubCmds[typeIndex])(interp, optionIndex, objc, objv); + return traceSubCmds[typeIndex](interp, optionIndex, objc, objv); } case TRACE_INFO: { /* @@ -261,7 +261,7 @@ Tcl_TraceObjCmd( 0, &typeIndex) != TCL_OK) { return TCL_ERROR; } - return (traceSubCmds[typeIndex])(interp, optionIndex, objc, objv); + return traceSubCmds[typeIndex](interp, optionIndex, objc, objv); break; } @@ -305,9 +305,9 @@ Tcl_TraceObjCmd( memcpy(copyObjv+1, objv, objc*sizeof(Tcl_Obj *)); copyObjv[4] = opsList; if (optionIndex == TRACE_OLD_VARIABLE) { - code = (traceSubCmds[2])(interp, TRACE_ADD, objc+1, copyObjv); + code = traceSubCmds[2](interp, TRACE_ADD, objc+1, copyObjv); } else { - code = (traceSubCmds[2])(interp, TRACE_REMOVE, objc+1, copyObjv); + code = traceSubCmds[2](interp, TRACE_REMOVE, objc+1, copyObjv); } Tcl_DecrRefCount(opsList); return code; @@ -1580,9 +1580,9 @@ TclCheckInterpTraces( tcmdPtr->curFlags = traceFlags; tcmdPtr->curCode = code; } - traceCode = (tracePtr->proc)(tracePtr->clientData, - interp, curLevel, command, (Tcl_Command) cmdPtr, - objc, objv); + traceCode = tracePtr->proc(tracePtr->clientData, interp, + curLevel, command, (Tcl_Command) cmdPtr, objc, + objv); } } else { /* @@ -2365,7 +2365,7 @@ Tcl_DeleteTrace( */ if (tracePtr->delProc != NULL) { - (tracePtr->delProc)(tracePtr->clientData); + tracePtr->delProc(tracePtr->clientData); } /* diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 27a9248..3b8ddf5 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.106 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.107 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -2129,9 +2129,9 @@ Tcl_DStringGetResult( dsPtr->string = iPtr->result; dsPtr->spaceAvl = dsPtr->length+1; } else { - dsPtr->string = (char *) ckalloc((unsigned) (dsPtr->length+1)); + dsPtr->string = (char *) ckalloc((unsigned) dsPtr->length+1); memcpy(dsPtr->string, iPtr->result, (unsigned) dsPtr->length+1); - (*iPtr->freeProc)(iPtr->result); + iPtr->freeProc(iPtr->result); } dsPtr->spaceAvl = dsPtr->length+1; iPtr->freeProc = NULL; @@ -2140,7 +2140,7 @@ Tcl_DStringGetResult( dsPtr->string = dsPtr->staticSpace; dsPtr->spaceAvl = TCL_DSTRING_STATIC_SIZE; } else { - dsPtr->string = (char *) ckalloc((unsigned) (dsPtr->length + 1)); + dsPtr->string = (char *) ckalloc((unsigned) dsPtr->length+1); dsPtr->spaceAvl = dsPtr->length + 1; } memcpy(dsPtr->string, iPtr->result, (unsigned) dsPtr->length+1); @@ -3052,7 +3052,7 @@ TclGetProcessGlobalValue( Tcl_DStringLength(&native), &newValue); Tcl_DStringFree(&native); ckfree(pgvPtr->value); - pgvPtr->value = ckalloc((unsigned int) + pgvPtr->value = ckalloc((unsigned) Tcl_DStringLength(&newValue) + 1); memcpy(pgvPtr->value, Tcl_DStringValue(&newValue), (size_t) Tcl_DStringLength(&newValue) + 1); @@ -3085,12 +3085,11 @@ TclGetProcessGlobalValue( Tcl_MutexLock(&pgvPtr->mutex); if ((NULL == pgvPtr->value) && (pgvPtr->proc)) { pgvPtr->epoch++; - (*(pgvPtr->proc))(&pgvPtr->value, &pgvPtr->numBytes, - &pgvPtr->encoding); + pgvPtr->proc(&pgvPtr->value,&pgvPtr->numBytes,&pgvPtr->encoding); if (pgvPtr->value == NULL) { Tcl_Panic("PGV Initializer did not initialize"); } - Tcl_CreateExitHandler(FreeProcessGlobalValue, (ClientData)pgvPtr); + Tcl_CreateExitHandler(FreeProcessGlobalValue, pgvPtr); } /* @@ -3101,10 +3100,10 @@ TclGetProcessGlobalValue( hPtr = Tcl_CreateHashEntry(cacheMap, (char *) INT2PTR(pgvPtr->epoch), &dummy); Tcl_MutexUnlock(&pgvPtr->mutex); - Tcl_SetHashValue(hPtr, (ClientData) value); + Tcl_SetHashValue(hPtr, value); Tcl_IncrRefCount(value); } - return (Tcl_Obj *) Tcl_GetHashValue(hPtr); + return Tcl_GetHashValue(hPtr); } /* diff --git a/generic/tclVar.c b/generic/tclVar.c index a68c5d2..dc35f69 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.170 2008/10/15 06:17:03 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.171 2008/10/26 18:34:04 dkf Exp $ */ #include "tclInt.h" @@ -894,7 +894,7 @@ TclLookupSimpleVar( && !(flags & AVOID_RESOLVERS)) { resPtr = iPtr->resolverPtr; if (cxtNsPtr->varResProc) { - result = (*cxtNsPtr->varResProc)(interp, varName, + result = cxtNsPtr->varResProc(interp, varName, (Tcl_Namespace *) cxtNsPtr, flags, &var); } else { result = TCL_CONTINUE; @@ -902,7 +902,7 @@ TclLookupSimpleVar( while (result == TCL_CONTINUE && resPtr) { if (resPtr->varResProc) { - result = (*resPtr->varResProc)(interp, varName, + result = resPtr->varResProc(interp, varName, (Tcl_Namespace *) cxtNsPtr, flags, &var); } resPtr = resPtr->nextPtr; @@ -4941,7 +4941,7 @@ ObjFindNamespaceVar( resPtr = iPtr->resolverPtr; if (cxtNsPtr->varResProc) { - result = (*cxtNsPtr->varResProc)(interp, name, + result = cxtNsPtr->varResProc(interp, name, (Tcl_Namespace *) cxtNsPtr, flags, &var); } else { result = TCL_CONTINUE; @@ -4949,7 +4949,7 @@ ObjFindNamespaceVar( while (result == TCL_CONTINUE && resPtr) { if (resPtr->varResProc) { - result = (*resPtr->varResProc)(interp, name, + result = resPtr->varResProc(interp, name, (Tcl_Namespace *) cxtNsPtr, flags, &var); } resPtr = resPtr->nextPtr; diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index ac04198..8b7387f 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.57 2008/08/01 18:22:29 hobbs Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.58 2008/10/26 18:43:26 dkf Exp $ */ #include "tclWinInt.h" @@ -660,7 +660,7 @@ TclWinDriveLetterForVolMountPoint( * Try to read the volume mount point and see where it points. */ - if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR *) drive, + if (tclWinProcs->getVolumeNameForVMPProc((TCHAR *) drive, (TCHAR *) Target, 55) != 0) { if (wcscmp((WCHAR *) dlIter->volumeName, Target) == 0) { /* @@ -719,7 +719,7 @@ TclWinDriveLetterForVolMountPoint( * Try to read the volume mount point and see where it points. */ - if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR *) drive, + if (tclWinProcs->getVolumeNameForVMPProc((TCHAR *) drive, (TCHAR *) Target, 55) != 0) { int alreadyStored = 0; diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 20f618d..6079887 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.52 2008/10/14 22:43:30 nijtmans Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.53 2008/10/26 18:43:26 dkf Exp $ */ #include "tclWinInt.h" @@ -915,7 +915,7 @@ TclpOpenFileChannel( flags = FILE_ATTRIBUTE_READONLY; } } else { - flags = (*tclWinProcs->getFileAttributesProc)(nativeName); + flags = tclWinProcs->getFileAttributesProc(nativeName); if (flags == 0xFFFFFFFF) { flags = 0; } @@ -931,8 +931,8 @@ TclpOpenFileChannel( * Now we get to create the file. */ - handle = (*tclWinProcs->createFileProc)(nativeName, accessMode, - shareMode, NULL, createMode, flags, (HANDLE) NULL); + handle = tclWinProcs->createFileProc(nativeName, accessMode, shareMode, + NULL, createMode, flags, (HANDLE) NULL); if (handle == INVALID_HANDLE_VALUE) { DWORD err = GetLastError(); diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 92ef2e9..93ea1bc 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.54 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.55 2008/10/26 18:43:26 dkf Exp $ */ #include "tclWinInt.h" @@ -201,7 +201,7 @@ DoRenameFile( #ifndef HAVE_NO_SEH __try { - if ((*tclWinProcs->moveFileProc)(nativeSrc, nativeDst) != FALSE) { + if (tclWinProcs->moveFileProc(nativeSrc, nativeDst) != FALSE) { retval = TCL_OK; } } __except (EXCEPTION_EXECUTE_HANDLER) {} @@ -299,10 +299,10 @@ DoRenameFile( TclWinConvertError(GetLastError()); - srcAttr = (*tclWinProcs->getFileAttributesProc)(nativeSrc); - dstAttr = (*tclWinProcs->getFileAttributesProc)(nativeDst); + srcAttr = tclWinProcs->getFileAttributesProc(nativeSrc); + dstAttr = tclWinProcs->getFileAttributesProc(nativeDst); if (srcAttr == 0xffffffff) { - if ((*tclWinProcs->getFullPathNameProc)(nativeSrc, 0, NULL, + if (tclWinProcs->getFullPathNameProc(nativeSrc, 0, NULL, NULL) >= MAX_PATH) { errno = ENAMETOOLONG; return TCL_ERROR; @@ -310,7 +310,7 @@ DoRenameFile( srcAttr = 0; } if (dstAttr == 0xffffffff) { - if ((*tclWinProcs->getFullPathNameProc)(nativeDst, 0, NULL, + if (tclWinProcs->getFullPathNameProc(nativeDst, 0, NULL, NULL) >= MAX_PATH) { errno = ENAMETOOLONG; return TCL_ERROR; @@ -333,18 +333,18 @@ DoRenameFile( Tcl_DString srcString, dstString; const char *src, *dst; - size = (*tclWinProcs->getFullPathNameProc)(nativeSrc, MAX_PATH, + size = tclWinProcs->getFullPathNameProc(nativeSrc, MAX_PATH, nativeSrcPath, &nativeSrcRest); if ((size == 0) || (size > MAX_PATH)) { return TCL_ERROR; } - size = (*tclWinProcs->getFullPathNameProc)(nativeDst, MAX_PATH, + size = tclWinProcs->getFullPathNameProc(nativeDst, MAX_PATH, nativeDstPath, &nativeDstRest); if ((size == 0) || (size > MAX_PATH)) { return TCL_ERROR; } - (*tclWinProcs->charLowerProc)((TCHAR *) nativeSrcPath); - (*tclWinProcs->charLowerProc)((TCHAR *) nativeDstPath); + tclWinProcs->charLowerProc((TCHAR *) nativeSrcPath); + tclWinProcs->charLowerProc((TCHAR *) nativeDstPath); src = Tcl_WinTCharToUtf((TCHAR *) nativeSrcPath, -1, &srcString); dst = Tcl_WinTCharToUtf((TCHAR *) nativeDstPath, -1, &dstString); @@ -426,7 +426,7 @@ DoRenameFile( * directory back, for completeness. */ - if ((*tclWinProcs->moveFileProc)(nativeSrc, + if (tclWinProcs->moveFileProc(nativeSrc, nativeDst) != FALSE) { return TCL_OK; } @@ -437,8 +437,8 @@ DoRenameFile( */ TclWinConvertError(GetLastError()); - (*tclWinProcs->createDirectoryProc)(nativeDst, NULL); - (*tclWinProcs->setFileAttributesProc)(nativeDst, dstAttr); + tclWinProcs->createDirectoryProc(nativeDst, NULL); + tclWinProcs->setFileAttributesProc(nativeDst, dstAttr); if (Tcl_GetErrno() == EACCES) { /* * Decode the EACCES to a more meaningful error. @@ -467,7 +467,7 @@ DoRenameFile( int result, size; WCHAR tempBuf[MAX_PATH]; - size = (*tclWinProcs->getFullPathNameProc)(nativeDst, MAX_PATH, + size = tclWinProcs->getFullPathNameProc(nativeDst, MAX_PATH, tempBuf, &nativeRest); if ((size == 0) || (size > MAX_PATH) || (nativeRest == NULL)) { return TCL_ERROR; @@ -479,8 +479,8 @@ DoRenameFile( result = TCL_ERROR; nativePrefix = (tclWinProcs->useWide) ? (TCHAR *) L"tclr" : (TCHAR *) "tclr"; - if ((*tclWinProcs->getTempFileNameProc)(nativeTmp, - nativePrefix, 0, tempBuf) != 0) { + if (tclWinProcs->getTempFileNameProc(nativeTmp, nativePrefix, + 0, tempBuf) != 0) { /* * Strictly speaking, need the following DeleteFile and * MoveFile to be joined as an atomic operation so no @@ -489,18 +489,18 @@ DoRenameFile( */ nativeTmp = (TCHAR *) tempBuf; - (*tclWinProcs->deleteFileProc)(nativeTmp); - if ((*tclWinProcs->moveFileProc)(nativeDst, + tclWinProcs->deleteFileProc(nativeTmp); + if (tclWinProcs->moveFileProc(nativeDst, nativeTmp) != FALSE) { - if ((*tclWinProcs->moveFileProc)(nativeSrc, + if (tclWinProcs->moveFileProc(nativeSrc, nativeDst) != FALSE) { - (*tclWinProcs->setFileAttributesProc)(nativeTmp, + tclWinProcs->setFileAttributesProc(nativeTmp, FILE_ATTRIBUTE_NORMAL); - (*tclWinProcs->deleteFileProc)(nativeTmp); + tclWinProcs->deleteFileProc(nativeTmp); return TCL_OK; } else { - (*tclWinProcs->deleteFileProc)(nativeDst); - (*tclWinProcs->moveFileProc)(nativeTmp, nativeDst); + tclWinProcs->deleteFileProc(nativeDst); + tclWinProcs->moveFileProc(nativeTmp, nativeDst); } } @@ -589,7 +589,7 @@ DoCopyFile( #ifndef HAVE_NO_SEH __try { - if ((*tclWinProcs->copyFileProc)(nativeSrc, nativeDst, 0) != FALSE) { + if (tclWinProcs->copyFileProc(nativeSrc, nativeDst, 0) != FALSE) { retval = TCL_OK; } } __except (EXCEPTION_EXECUTE_HANDLER) {} @@ -695,8 +695,8 @@ DoCopyFile( if (Tcl_GetErrno() == EACCES) { DWORD srcAttr, dstAttr; - srcAttr = (*tclWinProcs->getFileAttributesProc)(nativeSrc); - dstAttr = (*tclWinProcs->getFileAttributesProc)(nativeDst); + srcAttr = tclWinProcs->getFileAttributesProc(nativeSrc); + dstAttr = tclWinProcs->getFileAttributesProc(nativeDst); if (srcAttr != 0xffffffff) { if (dstAttr == 0xffffffff) { dstAttr = 0; @@ -712,9 +712,9 @@ DoCopyFile( Tcl_SetErrno(EISDIR); } if (dstAttr & FILE_ATTRIBUTE_READONLY) { - (*tclWinProcs->setFileAttributesProc)(nativeDst, + tclWinProcs->setFileAttributesProc(nativeDst, dstAttr & ~((DWORD)FILE_ATTRIBUTE_READONLY)); - if ((*tclWinProcs->copyFileProc)(nativeSrc, nativeDst, + if (tclWinProcs->copyFileProc(nativeSrc, nativeDst, 0) != FALSE) { return TCL_OK; } @@ -725,7 +725,7 @@ DoCopyFile( */ TclWinConvertError(GetLastError()); - (*tclWinProcs->setFileAttributesProc)(nativeDst, dstAttr); + tclWinProcs->setFileAttributesProc(nativeDst, dstAttr); } } } @@ -780,13 +780,13 @@ TclpDeleteFile( return TCL_ERROR; } - if ((*tclWinProcs->deleteFileProc)(nativePath) != FALSE) { + if (tclWinProcs->deleteFileProc(nativePath) != FALSE) { return TCL_OK; } TclWinConvertError(GetLastError()); if (Tcl_GetErrno() == EACCES) { - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr != 0xffffffff) { if (attr & FILE_ATTRIBUTE_DIRECTORY) { if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { @@ -807,21 +807,21 @@ TclpDeleteFile( Tcl_SetErrno(EISDIR); } else if (attr & FILE_ATTRIBUTE_READONLY) { - int res = (*tclWinProcs->setFileAttributesProc)(nativePath, - attr & ~((DWORD)FILE_ATTRIBUTE_READONLY)); + int res = tclWinProcs->setFileAttributesProc(nativePath, + attr & ~((DWORD) FILE_ATTRIBUTE_READONLY)); - if ((res != 0) && ((*tclWinProcs->deleteFileProc)(nativePath) - != FALSE)) { + if ((res != 0) && + (tclWinProcs->deleteFileProc(nativePath) != FALSE)) { return TCL_OK; } TclWinConvertError(GetLastError()); if (res != 0) { - (*tclWinProcs->setFileAttributesProc)(nativePath, attr); + tclWinProcs->setFileAttributesProc(nativePath, attr); } } } } else if (Tcl_GetErrno() == ENOENT) { - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr != 0xffffffff) { if (attr & FILE_ATTRIBUTE_DIRECTORY) { /* @@ -880,9 +880,9 @@ static int DoCreateDirectory( const TCHAR *nativePath) /* Pathname of directory to create (native). */ { - DWORD error; - if ((*tclWinProcs->createDirectoryProc)(nativePath, NULL) == 0) { - error = GetLastError(); + if (tclWinProcs->createDirectoryProc(nativePath, NULL) == 0) { + DWORD error = GetLastError(); + TclWinConvertError(error); return TCL_ERROR; } @@ -1049,7 +1049,7 @@ DoRemoveJustDirectory( goto end; } - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { /* @@ -1063,7 +1063,7 @@ DoRemoveJustDirectory( * Ordinary directory. */ - if ((*tclWinProcs->removeDirectoryProc)(nativePath) != FALSE) { + if (tclWinProcs->removeDirectoryProc(nativePath) != FALSE) { return TCL_OK; } } @@ -1071,7 +1071,7 @@ DoRemoveJustDirectory( TclWinConvertError(GetLastError()); if (Tcl_GetErrno() == EACCES) { - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr != 0xffffffff) { if ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0) { /* @@ -1095,15 +1095,15 @@ DoRemoveJustDirectory( if (attr & FILE_ATTRIBUTE_READONLY) { attr &= ~FILE_ATTRIBUTE_READONLY; - if ((*tclWinProcs->setFileAttributesProc)(nativePath, + if (tclWinProcs->setFileAttributesProc(nativePath, attr) == FALSE) { goto end; } - if ((*tclWinProcs->removeDirectoryProc)(nativePath) != FALSE) { + if (tclWinProcs->removeDirectoryProc(nativePath) != FALSE) { return TCL_OK; } TclWinConvertError(GetLastError()); - (*tclWinProcs->setFileAttributesProc)(nativePath, + tclWinProcs->setFileAttributesProc(nativePath, attr | FILE_ATTRIBUTE_READONLY); } @@ -1253,7 +1253,7 @@ TraverseWinTree( (targetPtr == NULL ? NULL : Tcl_DStringValue(targetPtr)); oldSourceLen = Tcl_DStringLength(sourcePtr); - sourceAttr = (*tclWinProcs->getFileAttributesProc)(nativeSource); + sourceAttr = tclWinProcs->getFileAttributesProc(nativeSource); if (sourceAttr == 0xffffffff) { nativeErrfile = nativeSource; goto end; @@ -1264,7 +1264,7 @@ TraverseWinTree( * Process the symbolic link */ - return (*traverseProc)(nativeSource, nativeTarget, DOTREE_LINK, + return traverseProc(nativeSource, nativeTarget, DOTREE_LINK, errorPtr); } @@ -1273,7 +1273,7 @@ TraverseWinTree( * Process the regular file */ - return (*traverseProc)(nativeSource, nativeTarget, DOTREE_F, errorPtr); + return traverseProc(nativeSource, nativeTarget, DOTREE_F, errorPtr); } if (tclWinProcs->useWide) { @@ -1284,7 +1284,7 @@ TraverseWinTree( } nativeSource = (TCHAR *) Tcl_DStringValue(sourcePtr); - handle = (*tclWinProcs->findFirstFileProc)(nativeSource, &data); + handle = tclWinProcs->findFirstFileProc(nativeSource, &data); if (handle == INVALID_HANDLE_VALUE) { /* * Can't read directory. @@ -1297,7 +1297,7 @@ TraverseWinTree( nativeSource[oldSourceLen + 1] = '\0'; Tcl_DStringSetLength(sourcePtr, oldSourceLen); - result = (*traverseProc)(nativeSource, nativeTarget, DOTREE_PRED, + result = traverseProc(nativeSource, nativeTarget, DOTREE_PRED, errorPtr); if (result != TCL_OK) { FindClose(handle); @@ -1329,7 +1329,7 @@ TraverseWinTree( } found = 1; - for (; found; found = (*tclWinProcs->findNextFileProc)(handle, &data)) { + for (; found; found = tclWinProcs->findNextFileProc(handle, &data)) { TCHAR *nativeName; int len; @@ -1400,7 +1400,7 @@ TraverseWinTree( * files in that directory. */ - result = (*traverseProc)(Tcl_DStringValue(sourcePtr), + result = traverseProc(Tcl_DStringValue(sourcePtr), (targetPtr == NULL ? NULL : Tcl_DStringValue(targetPtr)), DOTREE_POSTD, errorPtr); } @@ -1455,9 +1455,9 @@ TraversalCopy( break; case DOTREE_PRED: if (DoCreateDirectory(nativeDst) == TCL_OK) { - DWORD attr = (tclWinProcs->getFileAttributesProc)(nativeSrc); + DWORD attr = tclWinProcs->getFileAttributesProc(nativeSrc); - if ((tclWinProcs->setFileAttributesProc)(nativeDst, + if (tclWinProcs->setFileAttributesProc(nativeDst, attr) != FALSE) { return TCL_OK; } @@ -1593,7 +1593,7 @@ GetWinFileAttributes( int attr; nativeName = Tcl_FSGetNativePath(fileName); - result = (*tclWinProcs->getFileAttributesProc)(nativeName); + result = tclWinProcs->getFileAttributesProc(nativeName); if (result == 0xffffffff) { StatError(interp, fileName); @@ -1739,7 +1739,7 @@ ConvertFileNameFormat( tempString = Tcl_GetStringFromObj(tempPath,&tempLen); nativeName = Tcl_WinUtfToTChar(tempString, tempLen, &ds); Tcl_DecrRefCount(tempPath); - handle = (*tclWinProcs->findFirstFileProc)(nativeName, &data); + handle = tclWinProcs->findFirstFileProc(nativeName, &data); if (handle == INVALID_HANDLE_VALUE) { /* * FindFirstFile() doesn't like root directories. We would @@ -1748,7 +1748,7 @@ ConvertFileNameFormat( * root directory */ - attr = (*tclWinProcs->getFileAttributesProc)(nativeName); + attr = tclWinProcs->getFileAttributesProc(nativeName); if ((attr!=0xFFFFFFFF) && (attr & FILE_ATTRIBUTE_DIRECTORY)) { Tcl_DStringFree(&ds); goto simple; @@ -1932,7 +1932,7 @@ SetWinFileAttributes( const TCHAR *nativeName; nativeName = Tcl_FSGetNativePath(fileName); - fileAttributes = (*tclWinProcs->getFileAttributesProc)(nativeName); + fileAttributes = tclWinProcs->getFileAttributesProc(nativeName); if (fileAttributes == 0xffffffff) { StatError(interp, fileName); @@ -1950,7 +1950,7 @@ SetWinFileAttributes( fileAttributes &= ~(attributeArray[objIndex]); } - if (!(*tclWinProcs->setFileAttributesProc)(nativeName, fileAttributes)) { + if (!tclWinProcs->setFileAttributesProc(nativeName, fileAttributes)) { StatError(interp, fileName); return TCL_ERROR; } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index f5f8d5d..bdbad41 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.96 2008/04/05 23:25:15 kennykb Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.97 2008/10/26 18:43:27 dkf Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -232,7 +232,7 @@ WinLink( * Get the full path referenced by the target. */ - if (!(*tclWinProcs->getFullPathNameProc)(linkTargetPath, MAX_PATH, + if (!tclWinProcs->getFullPathNameProc(linkTargetPath, MAX_PATH, tempFileName, &tempFilePart)) { /* * Invalid file. @@ -246,7 +246,7 @@ WinLink( * Make sure source file doesn't exist. */ - attr = (*tclWinProcs->getFileAttributesProc)(linkSourcePath); + attr = tclWinProcs->getFileAttributesProc(linkSourcePath); if (attr != 0xffffffff) { Tcl_SetErrno(EEXIST); return -1; @@ -256,7 +256,7 @@ WinLink( * Get the full path referenced by the source file/directory. */ - if (!(*tclWinProcs->getFullPathNameProc)(linkSourcePath, MAX_PATH, + if (!tclWinProcs->getFullPathNameProc(linkSourcePath, MAX_PATH, tempFileName, &tempFilePart)) { /* * Invalid file. @@ -270,7 +270,7 @@ WinLink( * Check the target. */ - attr = (*tclWinProcs->getFileAttributesProc)(linkTargetPath); + attr = tclWinProcs->getFileAttributesProc(linkTargetPath); if (attr == 0xffffffff) { /* * The target doesn't exist. @@ -290,7 +290,7 @@ WinLink( } if (linkAction & TCL_CREATE_HARD_LINK) { - if (!(*tclWinProcs->createHardLinkProc)(linkSourcePath, + if (!tclWinProcs->createHardLinkProc(linkSourcePath, linkTargetPath, NULL)) { TclWinConvertError(GetLastError()); return -1; @@ -353,7 +353,7 @@ WinReadLink( * Get the full path referenced by the target. */ - if (!(*tclWinProcs->getFullPathNameProc)(linkSourcePath, MAX_PATH, + if (!tclWinProcs->getFullPathNameProc(linkSourcePath, MAX_PATH, tempFileName, &tempFilePart)) { /* * Invalid file. @@ -367,7 +367,7 @@ WinReadLink( * Make sure source file does exist. */ - attr = (*tclWinProcs->getFileAttributesProc)(linkSourcePath); + attr = tclWinProcs->getFileAttributesProc(linkSourcePath); if (attr == 0xffffffff) { /* * The source doesn't exist. @@ -524,9 +524,9 @@ TclWinSymLinkDelete( memset(reparseBuffer, 0, sizeof(DUMMY_REPARSE_BUFFER)); reparseBuffer->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; - hFile = (*tclWinProcs->createFileProc)(linkOrigPath, GENERIC_WRITE, 0, - NULL, OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + hFile = tclWinProcs->createFileProc(linkOrigPath, GENERIC_WRITE, 0, NULL, + OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT + | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (hFile != INVALID_HANDLE_VALUE) { if (!DeviceIoControl(hFile, FSCTL_DELETE_REPARSE_POINT, reparseBuffer, @@ -540,7 +540,7 @@ TclWinSymLinkDelete( } else { CloseHandle(hFile); if (!linkOnly) { - (*tclWinProcs->removeDirectoryProc)(linkOrigPath); + tclWinProcs->removeDirectoryProc(linkOrigPath); } return 0; } @@ -580,7 +580,7 @@ WinReadLinkDirectory( Tcl_DString ds; const char *copy; - attr = (*tclWinProcs->getFileAttributesProc)(linkDirPath); + attr = tclWinProcs->getFileAttributesProc(linkDirPath); if (!(attr & FILE_ATTRIBUTE_REPARSE_POINT)) { goto invalidError; } @@ -708,9 +708,9 @@ NativeReadReparse( HANDLE hFile; DWORD returnedLength; - hFile = (*tclWinProcs->createFileProc)(linkDirPath, GENERIC_READ, 0, - NULL, OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + hFile = tclWinProcs->createFileProc(linkDirPath, GENERIC_READ, 0, NULL, + OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT + | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (hFile == INVALID_HANDLE_VALUE) { /* @@ -768,7 +768,7 @@ NativeWriteReparse( * Create the directory - it must not already exist. */ - if ((*tclWinProcs->createDirectoryProc)(linkDirPath, NULL) == 0) { + if (tclWinProcs->createDirectoryProc(linkDirPath, NULL) == 0) { /* * Error creating directory. */ @@ -776,9 +776,9 @@ NativeWriteReparse( TclWinConvertError(GetLastError()); return -1; } - hFile = (*tclWinProcs->createFileProc)(linkDirPath, GENERIC_WRITE, 0, - NULL, OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + hFile = tclWinProcs->createFileProc(linkDirPath, GENERIC_WRITE, 0, NULL, + OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT + | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (hFile == INVALID_HANDLE_VALUE) { /* * Error creating directory. @@ -801,7 +801,7 @@ NativeWriteReparse( TclWinConvertError(GetLastError()); CloseHandle(hFile); - (*tclWinProcs->removeDirectoryProc)(linkDirPath); + tclWinProcs->removeDirectoryProc(linkDirPath); return -1; } CloseHandle(hFile); @@ -911,13 +911,14 @@ TclpMatchInDirectory( native = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); if (tclWinProcs->getFileAttributesExProc == NULL) { - attr = (*tclWinProcs->getFileAttributesProc)(native); + attr = tclWinProcs->getFileAttributesProc(native); if (attr == 0xffffffff) { return TCL_OK; } } else { WIN32_FILE_ATTRIBUTE_DATA data; - if ((*tclWinProcs->getFileAttributesExProc)(native, + + if (tclWinProcs->getFileAttributesExProc(native, GetFileExInfoStandard, &data) != TRUE) { return TCL_OK; } @@ -961,7 +962,7 @@ TclpMatchInDirectory( if (native == NULL) { return TCL_OK; } - attr = (*tclWinProcs->getFileAttributesProc)(native); + attr = tclWinProcs->getFileAttributesProc(native); if ((attr == 0xffffffff) || ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0)) { return TCL_OK; @@ -1004,13 +1005,13 @@ TclpMatchInDirectory( native = Tcl_WinUtfToTChar(dirName, -1, &ds); if (tclWinProcs->findFirstFileExProc == NULL || (types == NULL) || (types->type != TCL_GLOB_TYPE_DIR)) { - handle = (*tclWinProcs->findFirstFileProc)(native, &data); + handle = tclWinProcs->findFirstFileProc(native, &data); } else { /* * We can be more efficient, for pure directory requests. */ - handle = (*tclWinProcs->findFirstFileExProc)(native, + handle = tclWinProcs->findFirstFileExProc(native, FindExInfoStandard, &data, FindExSearchLimitToDirectories, NULL, 0); } @@ -1140,7 +1141,7 @@ TclpMatchInDirectory( */ Tcl_DStringFree(&ds); - } while ((*tclWinProcs->findNextFileProc)(handle, &data) == TRUE); + } while (tclWinProcs->findNextFileProc(handle, &data) == TRUE); FindClose(handle); Tcl_DStringFree(&dsOrig); @@ -1438,6 +1439,7 @@ TclpGetUserHome( GetProcAddress(netapiInst, "NetGetDCName"); netUserGetInfoProc = (NETUSERGETINFOPROC *) GetProcAddress(netapiInst, "NetUserGetInfo"); + if ((netUserGetInfoProc != NULL) && (netGetDCNameProc != NULL) && (netApiBufferFreeProc != NULL)) { USER_INFO_1 *uiPtr, **uiPtrPtr = &uiPtr; @@ -1454,7 +1456,7 @@ TclpGetUserHome( if (domain != NULL) { Tcl_DStringInit(&ds); wName = Tcl_UtfToUniCharDString(domain + 1, -1, &ds); - badDomain = (netGetDCNameProc)(NULL, wName, + badDomain = netGetDCNameProc(NULL, wName, (LPBYTE *) wDomainPtr); Tcl_DStringFree(&ds); nameLen = domain - name; @@ -1462,7 +1464,7 @@ TclpGetUserHome( if (badDomain == 0) { Tcl_DStringInit(&ds); wName = Tcl_UtfToUniCharDString(name, nameLen, &ds); - if ((netUserGetInfoProc)(wDomain, wName, 1, + if (netUserGetInfoProc(wDomain, wName, 1, (LPBYTE *) uiPtrPtr) == 0) { wHomeDir = uiPtr->usri1_home_dir; if ((wHomeDir != NULL) && (wHomeDir[0] != L'\0')) { @@ -1479,12 +1481,12 @@ TclpGetUserHome( Tcl_DStringAppend(bufferPtr, "/users/default", -1); } result = Tcl_DStringValue(bufferPtr); - (*netApiBufferFreeProc)((void *) uiPtr); + netApiBufferFreeProc((void *) uiPtr); } Tcl_DStringFree(&ds); } if (wDomain != NULL) { - (*netApiBufferFreeProc)((void *) wDomain); + netApiBufferFreeProc((void *) wDomain); } } FreeLibrary(netapiInst); @@ -1543,7 +1545,7 @@ NativeAccess( { DWORD attr; - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr == 0xffffffff) { /* @@ -1603,11 +1605,11 @@ NativeAccess( int error; /* - * First find out how big the buffer needs to be + * First find out how big the buffer needs to be. */ size = 0; - (*tclWinProcs->getFileSecurityProc)(nativePath, + tclWinProcs->getFileSecurityProc(nativePath, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, 0, 0, &size); @@ -1627,7 +1629,7 @@ NativeAccess( } /* - * Now size contains the size of buffer needed + * Now size contains the size of buffer needed. */ sdPtr = (SECURITY_DESCRIPTOR *) HeapAlloc(GetProcessHeap(), 0, size); @@ -1637,10 +1639,10 @@ NativeAccess( } /* - * Call GetFileSecurity() for real + * Call GetFileSecurity() for real. */ - if (!(*tclWinProcs->getFileSecurityProc)(nativePath, + if (!tclWinProcs->getFileSecurityProc(nativePath, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, sdPtr, size, &size)) { /* @@ -1655,14 +1657,14 @@ NativeAccess( * thread token. */ - if (!(*tclWinProcs->impersonateSelfProc)(SecurityImpersonation)) { + if (!tclWinProcs->impersonateSelfProc(SecurityImpersonation)) { /* * Unable to perform security impersonation. */ goto accessError; } - if (!(*tclWinProcs->openThreadTokenProc)(GetCurrentThread(), + if (!tclWinProcs->openThreadTokenProc(GetCurrentThread(), TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken)) { /* * Unable to get current thread's token. @@ -1671,7 +1673,7 @@ NativeAccess( goto accessError; } - (*tclWinProcs->revertToSelfProc)(); + tclWinProcs->revertToSelfProc(); /* * Setup desiredAccess according to the access priveleges we are @@ -1698,7 +1700,7 @@ NativeAccess( * Perform access check using the token. */ - if (!(*tclWinProcs->accessCheckProc)(sdPtr, hToken, desiredAccess, + if (!tclWinProcs->accessCheckProc(sdPtr, hToken, desiredAccess, &genMap, &privSet, &privSetSize, &grantedAccess, &accessYesNo)) { /* @@ -1852,7 +1854,7 @@ TclpObjChdir( result = (chdir(posixPath) == 0 ? 1 : 0); Tcl_DStringFree(&ds); #else /* __CYGWIN__ */ - result = (*tclWinProcs->setCurrentDirectoryProc)(nativePath); + result = tclWinProcs->setCurrentDirectoryProc(nativePath); #endif /* __CYGWIN__ */ if (result == 0) { @@ -1938,7 +1940,7 @@ TclpGetCwd( WCHAR buffer[MAX_PATH]; char *p; - if ((*tclWinProcs->getCurrentDirectoryProc)(MAX_PATH, buffer) == 0) { + if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) { TclWinConvertError(GetLastError()); if (interp != NULL) { Tcl_AppendResult(interp, "error getting working directory name: ", @@ -2043,7 +2045,7 @@ NativeStat( * simpler routines. */ - fileHandle = (tclWinProcs->createFileProc)(nativePath, GENERIC_READ, + fileHandle = tclWinProcs->createFileProc(nativePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); @@ -2089,7 +2091,7 @@ NativeStat( WIN32_FILE_ATTRIBUTE_DATA data; - if ((*tclWinProcs->getFileAttributesExProc)(nativePath, + if (tclWinProcs->getFileAttributesExProc(nativePath, GetFileExInfoStandard, &data) != TRUE) { Tcl_SetErrno(ENOENT); return -1; @@ -2111,14 +2113,14 @@ NativeStat( WIN32_FIND_DATAT data; HANDLE handle; - handle = (*tclWinProcs->findFirstFileProc)(nativePath, &data); + handle = tclWinProcs->findFirstFileProc(nativePath, &data); if (handle == INVALID_HANDLE_VALUE) { /* * FindFirstFile() doesn't work on root directories, so call * GetFileAttributes() to see if the specified file exists. */ - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr == INVALID_FILE_ATTRIBUTES) { Tcl_SetErrno(ENOENT); return -1; @@ -2177,8 +2179,8 @@ NativeDev( TCHAR *nativePart; const char *fullPath; - (*tclWinProcs->getFullPathNameProc)(nativePath, MAX_PATH, - nativeFullPath, &nativePart); + tclWinProcs->getFullPathNameProc(nativePath, MAX_PATH, nativeFullPath, + &nativePart); fullPath = Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds); @@ -2203,8 +2205,8 @@ NativeDev( } nativeVol = Tcl_WinUtfToTChar(fullPath, p - fullPath, &volString); dw = (DWORD) -1; - (*tclWinProcs->getVolumeInformationProc)(nativeVol, NULL, 0, &dw, - NULL, NULL, NULL, 0); + tclWinProcs->getVolumeInformationProc(nativeVol, NULL, 0, &dw, NULL, + NULL, NULL, 0); /* * GetFullPathName() turns special devices like "NUL" into "\\.\NUL", @@ -2349,7 +2351,7 @@ TclpGetNativeCwd( { WCHAR buffer[MAX_PATH]; - if ((*tclWinProcs->getCurrentDirectoryProc)(MAX_PATH, buffer) == 0) { + if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) { TclWinConvertError(GetLastError()); return NULL; } @@ -2729,7 +2731,7 @@ TclpObjNormalizePath( const char *nativePath = Tcl_WinUtfToTChar(path, currentPathEndPosition - path, &ds); - if ((*tclWinProcs->getFileAttributesExProc)(nativePath, + if (tclWinProcs->getFileAttributesExProc(nativePath, GetFileExInfoStandard, &data) != TRUE) { /* * File doesn't exist. @@ -2922,8 +2924,8 @@ TclpObjNormalizePath( WCHAR wpath[MAX_PATH]; const char *nativePath = Tcl_WinUtfToTChar(path, lastValidPathEnd - path, &ds); - DWORD wpathlen = (*tclWinProcs->getLongPathNameProc)( - nativePath, (TCHAR *) wpath, MAX_PATH); + DWORD wpathlen = tclWinProcs->getLongPathNameProc(nativePath, + (TCHAR *) wpath, MAX_PATH); /* * We have to make the drive letter uppercase. @@ -3309,7 +3311,7 @@ TclpUtime( native = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); - attr = (*tclWinProcs->getFileAttributesProc)(native); + attr = tclWinProcs->getFileAttributesProc(native); if (attr != INVALID_FILE_ATTRIBUTES && attr & FILE_ATTRIBUTE_DIRECTORY) { flags = FILE_FLAG_BACKUP_SEMANTICS; @@ -3320,7 +3322,7 @@ TclpUtime( * savings complications that utime gets wrong. */ - fileHandle = (tclWinProcs->createFileProc)(native, FILE_WRITE_ATTRIBUTES, + fileHandle = tclWinProcs->createFileProc(native, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, flags, NULL); if (fileHandle == INVALID_HANDLE_VALUE || diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 70170fe..f1e72de 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.79 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.80 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -210,7 +210,7 @@ TclpInitLibraryPath( *encodingPtr = NULL; bytes = Tcl_GetStringFromObj(pathPtr, lengthPtr); - *valuePtr = ckalloc((unsigned int)(*lengthPtr)+1); + *valuePtr = ckalloc((unsigned)(*lengthPtr)+1); memcpy(*valuePtr, bytes, (size_t)(*lengthPtr)+1); Tcl_DecrRefCount(pathPtr); } diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 33233bb..7202b24 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.21 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.22 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -57,7 +57,7 @@ TclpDlopen( */ nativeName = Tcl_FSGetNativePath(pathPtr); - handle = (*tclWinProcs->loadLibraryProc)(nativeName); + handle = tclWinProcs->loadLibraryProc(nativeName); if (handle == NULL) { /* * Let the OS loader examine the binary search path for whatever @@ -69,7 +69,7 @@ TclpDlopen( char *fileName = Tcl_GetString(pathPtr); nativeName = Tcl_WinUtfToTChar(fileName, -1, &ds); - handle = (*tclWinProcs->loadLibraryProc)(nativeName); + handle = tclWinProcs->loadLibraryProc(nativeName); Tcl_DStringFree(&ds); } diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 436d333..47ad88f 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.24 2008/07/24 21:54:43 nijtmans Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.25 2008/10/26 18:43:27 dkf Exp $ */ #include "tclInt.h" @@ -457,7 +457,7 @@ Tcl_WaitForEvent( myTime.usec = timePtr->usec; if (myTime.sec != 0 || myTime.usec != 0) { - (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); + tclScaleTimeProcPtr(&myTime, tclTimeClientData); } timeout = myTime.sec * 1000 + myTime.usec / 1000; @@ -580,7 +580,7 @@ Tcl_Sleep( * TIP #233: Scale delay from virtual to real-time. */ - (*tclScaleTimeProcPtr) (&vdelay, tclTimeClientData); + tclScaleTimeProcPtr(&vdelay, tclTimeClientData); sleepTime = vdelay.sec * 1000 + vdelay.usec / 1000; for (;;) { @@ -595,7 +595,7 @@ Tcl_Sleep( vdelay.sec = desired.sec - now.sec; vdelay.usec = desired.usec - now.usec; - (*tclScaleTimeProcPtr) (&vdelay, tclTimeClientData); + tclScaleTimeProcPtr(&vdelay, tclTimeClientData); sleepTime = vdelay.sec * 1000 + vdelay.usec / 1000; } } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index c24875f..db484db 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.66 2008/07/21 21:02:20 ferrieux Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.67 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -482,8 +482,8 @@ TempFileName( TCHAR *prefix; prefix = (tclWinProcs->useWide) ? (TCHAR *) L"TCL" : (TCHAR *) "TCL"; - if ((*tclWinProcs->getTempPathProc)(MAX_PATH, name) != 0) { - if ((*tclWinProcs->getTempFileNameProc)((TCHAR *) name, prefix, 0, + if (tclWinProcs->getTempPathProc(MAX_PATH, name) != 0) { + if (tclWinProcs->getTempFileNameProc((TCHAR *) name, prefix, 0, name) != 0) { return 1; } @@ -495,8 +495,7 @@ TempFileName( ((char *) name)[0] = '.'; ((char *) name)[1] = '\0'; } - return (*tclWinProcs->getTempFileNameProc)((TCHAR *) name, prefix, 0, - name); + return tclWinProcs->getTempFileNameProc((TCHAR *) name, prefix, 0, name); } /* @@ -608,7 +607,7 @@ TclpOpenFile( flags = 0; if (!(mode & O_CREAT)) { - flags = (*tclWinProcs->getFileAttributesProc)(nativePath); + flags = tclWinProcs->getFileAttributesProc(nativePath); if (flags == 0xFFFFFFFF) { flags = 0; } @@ -624,8 +623,8 @@ TclpOpenFile( * Now we get to create the file. */ - handle = (*tclWinProcs->createFileProc)(nativePath, accessMode, - shareMode, NULL, createMode, flags, NULL); + handle = tclWinProcs->createFileProc(nativePath, accessMode, shareMode, + NULL, createMode, flags, NULL); Tcl_DStringFree(&ds); if (handle == INVALID_HANDLE_VALUE) { @@ -681,7 +680,7 @@ TclpCreateTempFile( return NULL; } - handle = (*tclWinProcs->createFileProc)((TCHAR *) name, + handle = tclWinProcs->createFileProc((TCHAR *) name, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE, NULL); if (handle == INVALID_HANDLE_VALUE) { @@ -741,7 +740,7 @@ TclpCreateTempFile( TclWinConvertError(GetLastError()); CloseHandle(handle); - (*tclWinProcs->deleteFileProc)((TCHAR *) name); + tclWinProcs->deleteFileProc((TCHAR *) name); return NULL; } @@ -1245,7 +1244,7 @@ TclpCreateProcess( BuildCommandLine(execPath, argc, argv, &cmdLine); - if ((*tclWinProcs->createProcessProc)(NULL, + if (tclWinProcs->createProcessProc(NULL, (TCHAR *) Tcl_DStringValue(&cmdLine), NULL, NULL, TRUE, (DWORD) createFlags, NULL, NULL, &startInfo, &procInfo) == 0) { TclWinConvertError(GetLastError()); @@ -1404,8 +1403,8 @@ ApplicationType( Tcl_DStringAppend(&nameBuf, extensions[i], -1); nativeName = Tcl_WinUtfToTChar(Tcl_DStringValue(&nameBuf), Tcl_DStringLength(&nameBuf), &ds); - found = (*tclWinProcs->searchPathProc)(NULL, nativeName, NULL, - MAX_PATH, nativeFullPath, &rest); + found = tclWinProcs->searchPathProc(NULL, nativeName, NULL, MAX_PATH, + nativeFullPath, &rest); Tcl_DStringFree(&ds); if (found == 0) { continue; @@ -1416,7 +1415,7 @@ ApplicationType( * known type. */ - attr = (*tclWinProcs->getFileAttributesProc)((TCHAR *) nativeFullPath); + attr = tclWinProcs->getFileAttributesProc((TCHAR *) nativeFullPath); if ((attr == 0xffffffff) || (attr & FILE_ATTRIBUTE_DIRECTORY)) { continue; } @@ -1429,7 +1428,7 @@ ApplicationType( break; } - hFile = (*tclWinProcs->createFileProc)((TCHAR *) nativeFullPath, + hFile = tclWinProcs->createFileProc((TCHAR *) nativeFullPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { @@ -1509,7 +1508,7 @@ ApplicationType( * application name from the arguments. */ - (*tclWinProcs->getShortPathNameProc)((TCHAR *) nativeFullPath, + tclWinProcs->getShortPathNameProc((TCHAR *) nativeFullPath, nativeFullPath, MAX_PATH); strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); diff --git a/win/tclWinReg.c b/win/tclWinReg.c index e46eb70..c695b94 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.43 2008/10/14 22:43:30 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.44 2008/10/26 18:43:27 dkf Exp $ */ #include "tclInt.h" @@ -549,7 +549,7 @@ DeleteValue( valueName = Tcl_GetStringFromObj(valueNameObj, &length); Tcl_WinUtfToTChar(valueName, length, &ds); - result = (*regWinProcs->regDeleteValueProc)(key, Tcl_DStringValue(&ds)); + result = regWinProcs->regDeleteValueProc(key, Tcl_DStringValue(&ds)); Tcl_DStringFree(&ds); if (result != ERROR_SUCCESS) { Tcl_AppendResult(interp, "unable to delete value \"", @@ -726,7 +726,7 @@ GetType( valueName = Tcl_GetStringFromObj(valueNameObj, &length); nativeValue = Tcl_WinUtfToTChar(valueName, length, &ds); - result = (*regWinProcs->regQueryValueExProc)(key, nativeValue, NULL, &type, + result = regWinProcs->regQueryValueExProc(key, nativeValue, NULL, &type, NULL, NULL); Tcl_DStringFree(&ds); RegCloseKey(key); @@ -807,7 +807,7 @@ GetValue( valueName = Tcl_GetStringFromObj(valueNameObj, &nameLen); nativeValue = Tcl_WinUtfToTChar(valueName, nameLen, &buf); - result = (*regWinProcs->regQueryValueExProc)(key, nativeValue, NULL, &type, + result = regWinProcs->regQueryValueExProc(key, nativeValue, NULL, &type, (BYTE *) Tcl_DStringValue(&data), &length); while (result == ERROR_MORE_DATA) { /* @@ -818,7 +818,7 @@ GetValue( length *= 2; Tcl_DStringSetLength(&data, (int) length); - result = (*regWinProcs->regQueryValueExProc)(key, (char *) nativeValue, + result = regWinProcs->regQueryValueExProc(key, (char *) nativeValue, NULL, &type, (BYTE *) Tcl_DStringValue(&data), &length); } Tcl_DStringFree(&buf); @@ -929,7 +929,7 @@ GetValueNames( * largest value name plus the terminating null. */ - result = (*regWinProcs->regQueryInfoKeyProc)(key, NULL, NULL, NULL, NULL, + result = regWinProcs->regQueryInfoKeyProc(key, NULL, NULL, NULL, NULL, NULL, NULL, &index, &maxSize, NULL, NULL, NULL); if (result != ERROR_SUCCESS) { Tcl_AppendResult(interp, "unable to query key \"", @@ -961,10 +961,8 @@ GetValueNames( */ size = maxSize; - while ((*regWinProcs->regEnumValueProc)(key, index, - Tcl_DStringValue(&buffer), &size, NULL, NULL, NULL, NULL) - == ERROR_SUCCESS) { - + while (regWinProcs->regEnumValueProc(key,index, Tcl_DStringValue(&buffer), + &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { if (regWinProcs->useWide) { size *= 2; } @@ -1080,7 +1078,7 @@ OpenSubKey( if (hostName) { hostName = (char *) Tcl_WinUtfToTChar(hostName, -1, &buf); - result = (*regWinProcs->regConnectRegistryProc)(hostName, rootKey, + result = regWinProcs->regConnectRegistryProc(hostName, rootKey, &rootKey); Tcl_DStringFree(&buf); if (result != ERROR_SUCCESS) { @@ -1096,17 +1094,19 @@ OpenSubKey( keyName = (char *) Tcl_WinUtfToTChar(keyName, -1, &buf); if (flags & REG_CREATE) { DWORD create; - result = (*regWinProcs->regCreateKeyExProc)(rootKey, keyName, 0, NULL, + + result = regWinProcs->regCreateKeyExProc(rootKey, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, mode, NULL, keyPtr, &create); } else if (rootKey == HKEY_PERFORMANCE_DATA) { /* * Here we fudge it for this special root key. See MSDN for more info * on HKEY_PERFORMANCE_DATA and the peculiarities surrounding it. */ + *keyPtr = HKEY_PERFORMANCE_DATA; result = ERROR_SUCCESS; } else { - result = (*regWinProcs->regOpenKeyExProc)(rootKey, keyName, 0, mode, + result = regWinProcs->regOpenKeyExProc(rootKey, keyName, 0, mode, keyPtr); } Tcl_DStringFree(&buf); @@ -1238,12 +1238,12 @@ RecursiveDeleteKey( return ERROR_BADKEY; } - result = (*regWinProcs->regOpenKeyExProc)(startKey, keyName, 0, + result = regWinProcs->regOpenKeyExProc(startKey, keyName, 0, KEY_ENUMERATE_SUB_KEYS | DELETE | KEY_QUERY_VALUE, &hKey); if (result != ERROR_SUCCESS) { return result; } - result = (*regWinProcs->regQueryInfoKeyProc)(hKey, NULL, NULL, NULL, NULL, + result = regWinProcs->regQueryInfoKeyProc(hKey, NULL, NULL, NULL, NULL, &maxSize, NULL, NULL, NULL, NULL, NULL, NULL); maxSize++; if (result != ERROR_SUCCESS) { @@ -1260,10 +1260,10 @@ RecursiveDeleteKey( */ size = maxSize; - result=(*regWinProcs->regEnumKeyExProc)(hKey, 0, + result = regWinProcs->regEnumKeyExProc(hKey, 0, Tcl_DStringValue(&subkey), &size, NULL, NULL, NULL, NULL); if (result == ERROR_NO_MORE_ITEMS) { - result = (*regWinProcs->regDeleteKeyProc)(startKey, keyName); + result = regWinProcs->regDeleteKeyProc(startKey, keyName); break; } else if (result == ERROR_SUCCESS) { result = RecursiveDeleteKey(hKey, Tcl_DStringValue(&subkey)); @@ -1333,7 +1333,7 @@ SetValue( } value = ConvertDWORD((DWORD)type, (DWORD)value); - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) &value, sizeof(DWORD)); } else if (type == REG_MULTI_SZ) { Tcl_DString data, buf; @@ -1368,7 +1368,7 @@ SetValue( Tcl_WinUtfToTChar(Tcl_DStringValue(&data), Tcl_DStringLength(&data)+1, &buf); - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) Tcl_DStringValue(&buf), (DWORD) Tcl_DStringLength(&buf)); Tcl_DStringFree(&data); @@ -1388,7 +1388,7 @@ SetValue( } length = Tcl_DStringLength(&buf) + 1; - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) data, (DWORD) length); Tcl_DStringFree(&buf); } else { @@ -1399,7 +1399,7 @@ SetValue( */ data = Tcl_GetByteArrayFromObj(dataObj, &length); - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) data, (DWORD) length); } @@ -1603,7 +1603,7 @@ ConvertDWORD( * Check to see if the low bit is in the first byte. */ - localType = (*((char*)(&order)) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; + localType = (*((char*) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; return (type != localType) ? SWAPLONG(value) : value; } diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 9135d25..94d2863 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.38 2008/10/14 22:43:29 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.39 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -1450,8 +1450,8 @@ TclWinSerialReopen( if (CloseHandle(handle) == FALSE) { return INVALID_HANDLE_VALUE; } - handle = (*tclWinProcs->createFileProc)(name, access, 0, 0, - OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); + handle = tclWinProcs->createFileProc(name, access, 0, 0, OPEN_EXISTING, + FILE_FLAG_OVERLAPPED, 0); return handle; } @@ -1685,7 +1685,7 @@ SerialSetOptionProc( return TCL_ERROR; } native = Tcl_WinUtfToTChar(value, -1, &ds); - result = (*tclWinProcs->buildCommDCBProc)(native, &dcb); + result = tclWinProcs->buildCommDCBProc(native, &dcb); Tcl_DStringFree(&ds); if (result == FALSE) { diff --git a/win/tclWinSock.c b/win/tclWinSock.c index ff94767..df04b8e 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.62 2008/02/22 11:50:54 patthoyts Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.63 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -1472,7 +1472,7 @@ TcpAccept( */ if (infoPtr->acceptProc != NULL) { - (infoPtr->acceptProc) (infoPtr->acceptProcData, newInfoPtr->channel, + infoPtr->acceptProc(infoPtr->acceptProcData, newInfoPtr->channel, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); } } @@ -2121,7 +2121,7 @@ SocketThread( LPVOID arg) { MSG msg; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *)(arg); + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) arg; /* * Create a dummy window receiving socket events. @@ -2362,7 +2362,7 @@ InitializeHostName( DWORD length = sizeof(wbuf) / sizeof(WCHAR); Tcl_DString ds; - if ((*tclWinProcs->getComputerNameProc)(wbuf, &length) != 0) { + if (tclWinProcs->getComputerNameProc(wbuf, &length) != 0) { /* * Convert string from native to UTF then change to lowercase. */ diff --git a/win/tclWinTime.c b/win/tclWinTime.c index c185c4c..6fa0017 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.34 2008/04/27 22:21:37 dkf Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.35 2008/10/26 18:43:27 dkf Exp $ */ #include "tclInt.h" @@ -158,7 +158,7 @@ TclpGetSeconds(void) { Tcl_Time t; - (*tclGetTimeProcPtr) (&t, tclTimeClientData); /* Tcl_GetTime inlined. */ + tclGetTimeProcPtr(&t, tclTimeClientData); /* Tcl_GetTime inlined. */ return t.sec; } @@ -192,7 +192,7 @@ TclpGetClicks(void) Tcl_Time now; /* Current Tcl time */ unsigned long retval; /* Value to return */ - (*tclGetTimeProcPtr) (&now, tclTimeClientData); /* Tcl_GetTime inlined */ + tclGetTimeProcPtr(&now, tclTimeClientData); /* Tcl_GetTime inlined */ retval = (now.sec * 1000000) + now.usec; return retval; @@ -254,7 +254,7 @@ void Tcl_GetTime( Tcl_Time *timePtr) /* Location to store time information. */ { - (*tclGetTimeProcPtr) (timePtr, tclTimeClientData); + tclGetTimeProcPtr(timePtr, tclTimeClientData); } /* -- cgit v0.12 From e2a86ffb4d1c3d4ec5f674f22f705f13567939d8 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 26 Oct 2008 18:50:06 +0000 Subject: Style improvements - invoking callbacks without visual junk. --- macosx/tclMacOSXFCmd.c | 14 +++++++------- macosx/tclMacOSXNotify.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 31245f1..c902a28 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.14 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.15 2008/10/26 18:50:06 dkf Exp $ */ #include "tclInt.h" @@ -132,8 +132,8 @@ TclMacOSXGetFileAttribute( Tcl_StatBuf statBuf; struct attrlist alist; fileinfobuf finfo; - finderinfo *finder = (finderinfo*)(&finfo.data); - off_t *rsrcForkSize = (off_t*)(&finfo.data); + finderinfo *finder = (finderinfo *) &finfo.data; + off_t *rsrcForkSize = (off_t *) &finfo.data; const char *native; result = TclpObjStat(fileName, &statBuf); @@ -224,8 +224,8 @@ TclMacOSXSetFileAttribute( Tcl_StatBuf statBuf; struct attrlist alist; fileinfobuf finfo; - finderinfo *finder = (finderinfo*)(&finfo.data); - off_t *rsrcForkSize = (off_t*)(&finfo.data); + finderinfo *finder = (finderinfo *) &finfo.data; + off_t *rsrcForkSize = (off_t *) &finfo.data; const char *native; result = TclpObjStat(fileName, &statBuf); @@ -405,7 +405,7 @@ TclMacOSXCopyFileAttributes( #ifdef HAVE_GETATTRLIST struct attrlist alist; fileinfobuf finfo; - off_t *rsrcForkSize = (off_t*)(&finfo.data); + off_t *rsrcForkSize = (off_t *) &finfo.data; bzero(&alist, sizeof(struct attrlist)); alist.bitmapcount = ATTR_BIT_MAP_COUNT; @@ -497,7 +497,7 @@ TclMacOSXMatchType( #ifdef HAVE_GETATTRLIST struct attrlist alist; fileinfobuf finfo; - finderinfo *finder = (finderinfo*)(&finfo.data); + finderinfo *finder = (finderinfo *) &finfo.data; OSType osType; bzero(&alist, sizeof(struct attrlist)); diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 125307e..b67ef3e 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.20 2008/07/24 21:54:43 nijtmans Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.21 2008/10/26 18:50:07 dkf Exp $ */ #include "tclInt.h" @@ -876,7 +876,7 @@ FileHandlerEventProc( mask = filePtr->readyMask & filePtr->mask; filePtr->readyMask = 0; if (mask != 0) { - (*filePtr->proc)(filePtr->clientData, mask); + filePtr->proc(filePtr->clientData, mask); } break; } @@ -933,7 +933,7 @@ Tcl_WaitForEvent( myTime.usec = timePtr->usec; if (myTime.sec != 0 || myTime.usec != 0) { - (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); + tclScaleTimeProcPtr(&myTime, tclTimeClientData); } myTimePtr = &myTime; -- cgit v0.12 From 1a13bcfa51bd2ef9f1fef875680257ac38fc7e85 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 27 Oct 2008 19:08:53 +0000 Subject: * generic/tclEncoding.c: Use "iso8859-1" and not "identity" as the default and original [encoding system] value. Since "iso8859-1" is built in to the C source code for Tcl now, there's no availability issue, and it has the good feature of "identity" that we must have ("bytes in" == "bytes out") without the bad feature of "identity" ("broken as designed") that makes us want to abandon it. [RFE 2008609] *** POTENTIAL INCOMPATIBILITY for older releases of Tclkit and any other code expecting a particular value for Tcl's default system encoding *** --- ChangeLog | 13 +++++++++++++ generic/tclEncoding.c | 9 ++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c2f9b8..d3c5542 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-10-27 Don Porter + + * generic/tclEncoding.c: Use "iso8859-1" and not "identity" + as the default and original [encoding system] value. Since + "iso8859-1" is built in to the C source code for Tcl now, there's no + availability issue, and it has the good feature of "identity" that + we must have ("bytes in" == "bytes out") without the bad feature of + "identity" ("broken as designed") that makes us want to abandon it. + [RFE 2008609] + *** POTENTIAL INCOMPATIBILITY for older releases of Tclkit and + any other code expecting a particular value for Tcl's default + system encoding *** + 2008-10-24 Pat Thoyts * library/http/http.tcl: Fixed a failure to read SHOUTcast streams diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 9ef937f..843d46c 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.64 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.65 2008/10/27 19:08:53 dgp Exp $ */ #include "tclInt.h" @@ -565,9 +565,7 @@ TclInitEncodingSubsystem(void) type.freeProc = NULL; type.nullSize = 1; type.clientData = NULL; - - defaultEncoding = Tcl_CreateEncoding(&type); - systemEncoding = Tcl_GetEncoding(NULL, type.encodingName); + Tcl_CreateEncoding(&type); type.encodingName = "utf-8"; type.toUtfProc = UtfExtToUtfIntProc; @@ -626,7 +624,8 @@ TclInitEncodingSubsystem(void) type.freeProc = TableFreeProc; type.nullSize = 1; type.clientData = dataPtr; - Tcl_CreateEncoding(&type); + defaultEncoding = Tcl_CreateEncoding(&type); + systemEncoding = Tcl_GetEncoding(NULL, type.encodingName); } encodingsInitialized = 1; -- cgit v0.12 From e53905d94a0952de627b0d26c1ee06b56bb9b349 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 28 Oct 2008 23:29:54 +0000 Subject: CONSTify TclDTraceInfo Eliminate some -Wstrings-write warnings --- ChangeLog | 8 ++++++++ generic/tclBasic.c | 34 +++++++++++++++++----------------- generic/tclCompile.h | 6 +++--- generic/tclEnv.c | 4 ++-- generic/tclLink.c | 36 ++++++++++++++++++------------------ generic/tclProc.c | 4 ++-- 6 files changed, 50 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3c5542..f02fe4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-22 Jan Nijtmans + + * generic/tclCompile.h: CONSTify TclDTraceInfo + * generic/tclBasic.c + * generic/tclProc.c + * generic/tclEnv.c: Eliminate some -Wstrings-write warnings + * generic/tclLink.c + 2008-10-27 Don Porter * generic/tclEncoding.c: Use "iso8859-1" and not "identity" diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7c42f4a..dbcaecd 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.373 2008/10/19 16:52:18 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.374 2008/10/28 23:29:54 nijtmans Exp $ */ #include "tclInt.h" @@ -213,10 +213,10 @@ static const CmdInfo builtInCmds[] = { {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1}, {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, TclNRWhileObjCmd, 1}, - + {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1}, {"yield", NULL, NULL, TclNRYieldObjCmd, 1}, - + /* * Commands in the OS-interface. Note that many of these are unsafe. */ @@ -4115,7 +4115,7 @@ TclNREvalObjv( } if (TCL_DTRACE_CMD_INFO_ENABLED() && iPtr->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, iPtr->cmdFramePtr); - char *a[6]; int i[2]; + const char *a[6]; int i[2]; TclDTraceInfo(info, a, i); TCL_DTRACE_CMD_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); @@ -4409,8 +4409,8 @@ TEOV_Exception( * numLevels has not *yet* been decreased, do not call it: do the thing * here directly. */ - - iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); + + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); return result; } @@ -5925,10 +5925,10 @@ TEOEx_ByteCodeCallback( } /* - * We are returning to level 0, so should call TclResetCancellation. + * We are returning to level 0, so should call TclResetCancellation. * Let us just unset the flags inline. */ - + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); } iPtr->evalFlags = 0; @@ -7695,7 +7695,7 @@ DTraceObjCmd( void TclDTraceInfo( Tcl_Obj *info, - char **args, + const char **args, int *argsi) { static Tcl_Obj *keys[10] = { NULL }; @@ -7817,7 +7817,7 @@ Tcl_NRCallObjProc( } if (TCL_DTRACE_CMD_INFO_ENABLED() && ((Interp *) interp)->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, ((Interp *) interp)->cmdFramePtr); - char *a[6]; int i[2]; + const char *a[6]; int i[2]; TclDTraceInfo(info, a, i); TCL_DTRACE_CMD_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); @@ -8107,7 +8107,7 @@ TclNRYieldObjCmd( { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; int numLevels = iPtr->numLevels; - + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?returnValue?"); return TCL_ERROR; @@ -8125,7 +8125,7 @@ TclNRYieldObjCmd( iPtr->numLevels = corPtr->auxNumLevels; corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; - + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8165,7 +8165,7 @@ DeleteCoroutine( CoroutineData *corPtr = clientData; Tcl_Interp *interp = corPtr->eePtr->interp; TEOV_callback *rootPtr = TOP_CB(interp); - + if (COR_IS_SUSPENDED(corPtr)) { TclNRRunCallbacks(interp, RewindCoroutine(corPtr,TCL_OK), rootPtr, 0); } @@ -8311,7 +8311,7 @@ NRInterpCoroutine( { CoroutineData *corPtr = clientData; int nestNumLevels = corPtr->auxNumLevels; - + if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; @@ -8408,7 +8408,7 @@ TclNRCoroutineObjCmd( * On first run just set a 0 level-offset, the natural numbering is * correct. The offset will be fixed for later runs. */ - + Tcl_DStringInit(&ds); if (nsPtr != iPtr->globalNsPtr) { Tcl_DStringAppend(&ds, nsPtr->fullName, -1); @@ -8474,7 +8474,7 @@ TclNRCoroutineObjCmd( iPtr->varFramePtr = iPtr->rootFramePtr; iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; corPtr->auxNumLevels = iPtr->numLevels; - + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); @@ -8498,7 +8498,7 @@ TclInfoCoroutineCmd( return TCL_ERROR; } - if (corPtr && !(corPtr->cmdPtr->flags & CMD_IS_DELETED)) { + if (corPtr && !(corPtr->cmdPtr->flags & CMD_IS_DELETED)) { Tcl_Obj *namePtr; TclNewObj(namePtr); diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 2ef278f..f42247d 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.112 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.113 2008/10/28 23:29:54 nijtmans Exp $ */ #ifndef _TCLCOMPILATION @@ -1292,7 +1292,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TCL_DTRACE_DEBUG_LOG() -MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); +MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, int *argsi); #else /* USE_DTRACE */ @@ -1347,7 +1347,7 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); MODULE_SCOPE int tclDTraceDebugEnabled, tclDTraceDebugIndent; MODULE_SCOPE FILE *tclDTraceDebugLog; MODULE_SCOPE void TclDTraceOpenDebugLog(void); -MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, char **args, int *argsi); +MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, int *argsi); #define TCL_DTRACE_DEBUG_LOG() \ int tclDTraceDebugEnabled = TCL_DTRACE_DEBUG_LOG_ENABLED;\ diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 49238a2..3a7a3c8 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.37 2007/12/13 15:23:16 dgp Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.38 2008/10/28 23:29:54 nijtmans Exp $ */ #include "tclInt.h" @@ -562,7 +562,7 @@ EnvTraceProc( const char *value = TclGetEnv(name2, &valueString); if (value == NULL) { - return "no such variable"; + return (char *) "no such variable"; } Tcl_SetVar2(interp, name1, name2, value, 0); Tcl_DStringFree(&valueString); diff --git a/generic/tclLink.c b/generic/tclLink.c index d4a7f38..b2d236b 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLink.c,v 1.25 2008/04/27 22:21:30 dkf Exp $ + * RCS: @(#) $Id: tclLink.c,v 1.26 2008/10/28 23:29:54 nijtmans Exp $ */ #include "tclInt.h" @@ -337,7 +337,7 @@ LinkTraceProc( changed = 1; break; default: - return "internal error: bad linked variable type"; + return (char *) "internal error: bad linked variable type"; } if (changed) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), @@ -358,7 +358,7 @@ LinkTraceProc( if (linkPtr->flags & LINK_READ_ONLY) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "linked variable is read-only"; + return (char *) "linked variable is read-only"; } valueObj = Tcl_ObjGetVar2(interp, linkPtr->varName,NULL, TCL_GLOBAL_ONLY); if (valueObj == NULL) { @@ -366,7 +366,7 @@ LinkTraceProc( * This shouldn't ever happen. */ - return "internal error: linked variable couldn't be read"; + return (char *) "internal error: linked variable couldn't be read"; } switch (linkPtr->type) { @@ -375,7 +375,7 @@ LinkTraceProc( != TCL_OK) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have integer value"; + return (char *) "variable must have integer value"; } LinkedVar(int) = linkPtr->lastValue.i; break; @@ -385,7 +385,7 @@ LinkTraceProc( != TCL_OK) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have integer value"; + return (char *) "variable must have integer value"; } LinkedVar(Tcl_WideInt) = linkPtr->lastValue.w; break; @@ -398,7 +398,7 @@ LinkTraceProc( #endif Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have real value"; + return (char *) "variable must have real value"; #ifdef ACCEPT_NAN } linkPtr->lastValue.d = valueObj->internalRep.doubleValue; @@ -412,7 +412,7 @@ LinkTraceProc( != TCL_OK) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have boolean value"; + return (char *) "variable must have boolean value"; } LinkedVar(int) = linkPtr->lastValue.i; break; @@ -422,7 +422,7 @@ LinkTraceProc( || valueInt < SCHAR_MIN || valueInt > SCHAR_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have char value"; + return (char *) "variable must have char value"; } linkPtr->lastValue.c = (char)valueInt; LinkedVar(char) = linkPtr->lastValue.c; @@ -433,7 +433,7 @@ LinkTraceProc( || valueInt < 0 || valueInt > UCHAR_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have unsigned char value"; + return (char *) "variable must have unsigned char value"; } linkPtr->lastValue.uc = (unsigned char) valueInt; LinkedVar(unsigned char) = linkPtr->lastValue.uc; @@ -444,7 +444,7 @@ LinkTraceProc( || valueInt < SHRT_MIN || valueInt > SHRT_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have short value"; + return (char *) "variable must have short value"; } linkPtr->lastValue.s = (short)valueInt; LinkedVar(short) = linkPtr->lastValue.s; @@ -455,7 +455,7 @@ LinkTraceProc( || valueInt < 0 || valueInt > USHRT_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have unsigned short value"; + return (char *) "variable must have unsigned short value"; } linkPtr->lastValue.us = (unsigned short)valueInt; LinkedVar(unsigned short) = linkPtr->lastValue.us; @@ -466,7 +466,7 @@ LinkTraceProc( || valueWide < 0 || valueWide > UINT_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have unsigned int value"; + return (char *) "variable must have unsigned int value"; } linkPtr->lastValue.ui = (unsigned int)valueWide; LinkedVar(unsigned int) = linkPtr->lastValue.ui; @@ -477,7 +477,7 @@ LinkTraceProc( || valueWide < LONG_MIN || valueWide > LONG_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have long value"; + return (char *) "variable must have long value"; } linkPtr->lastValue.l = (long)valueWide; LinkedVar(long) = linkPtr->lastValue.l; @@ -488,7 +488,7 @@ LinkTraceProc( || valueWide < 0 || (Tcl_WideUInt) valueWide > ULONG_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have unsigned long value"; + return (char *) "variable must have unsigned long value"; } linkPtr->lastValue.ul = (unsigned long)valueWide; LinkedVar(unsigned long) = linkPtr->lastValue.ul; @@ -501,7 +501,7 @@ LinkTraceProc( if (Tcl_GetWideIntFromObj(interp, valueObj, &valueWide) != TCL_OK) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have unsigned wide int value"; + return (char *) "variable must have unsigned wide int value"; } linkPtr->lastValue.uw = (Tcl_WideUInt)valueWide; LinkedVar(Tcl_WideUInt) = linkPtr->lastValue.uw; @@ -512,7 +512,7 @@ LinkTraceProc( || valueDouble < -FLT_MAX || valueDouble > FLT_MAX) { Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr), TCL_GLOBAL_ONLY); - return "variable must have float value"; + return (char *) "variable must have float value"; } linkPtr->lastValue.f = (float)valueDouble; LinkedVar(float) = linkPtr->lastValue.f; @@ -528,7 +528,7 @@ LinkTraceProc( break; default: - return "internal error: bad linked variable type"; + return (char *) "internal error: bad linked variable type"; } return NULL; } diff --git a/generic/tclProc.c b/generic/tclProc.c index e116e92..a7e9531 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.166 2008/10/19 19:55:37 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.167 2008/10/28 23:29:54 nijtmans Exp $ */ #include "tclInt.h" @@ -1766,7 +1766,7 @@ TclNRInterpProcCore( } if (TCL_DTRACE_PROC_INFO_ENABLED() && iPtr->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, iPtr->cmdFramePtr); - char *a[6]; int i[2]; + const char *a[6]; int i[2]; TclDTraceInfo(info, a, i); TCL_DTRACE_PROC_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); -- cgit v0.12 From 031a9bda7717f94ece3cbe7bca2b8a89de61e340 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 28 Oct 2008 23:30:31 +0000 Subject: CONSTify TclDTraceInfo Eliminate some -Wstrings-write warnings --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f02fe4b..e2d4608 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2008-10-22 Jan Nijtmans +2008-10-28 Jan Nijtmans * generic/tclCompile.h: CONSTify TclDTraceInfo * generic/tclBasic.c -- cgit v0.12 From ea04b9849eb076f206c65efacd0a6a3aba6f4325 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 31 Oct 2008 22:08:32 +0000 Subject: Fix [Bug 2200824] and make class constructor error handling much more robust. --- ChangeLog | 46 ++++++++++++++-------- generic/tclOO.c | 18 ++++++--- generic/tclOOBasic.c | 71 +++++++++++++++++++++++++++++++++- generic/tclOODefineCmds.c | 98 +++++++++++++++++++++++++++++++---------------- generic/tclOOInt.h | 7 +++- tests/oo.test | 51 +++++++++++++++++++++++- 6 files changed, 233 insertions(+), 58 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2d4608..6880855 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2008-10-31 Donal K. Fellows + + * generic/tclOOBasic.c (TclOONRUpcatch): Reworked the code that does + * generic/tclOO.c (InitFoundation): class constructor handling so + that it is more robust and runs the constructor call in the context of + the caller of the class's constructor method. Needed because the + previously used code did not work at all after applying the fix below; + no Tcl existing command could reliably do what was needed any more. + + * generic/tclOODefineCmds.c (GetClassInOuterContext): Rework and + factor out the code to resolve class names in definitions so that + classes are resolved from the perspective of the caller of the + [oo::define] command, rather than from the oo::define namespace! This + makes much code simpler by reducing how often fully-qualified names + are required (previously always in practice, so no back-compat issues + exist). [Bug 2200824] + 2008-10-28 Jan Nijtmans * generic/tclCompile.h: CONSTify TclDTraceInfo @@ -8,27 +25,26 @@ 2008-10-27 Don Porter - * generic/tclEncoding.c: Use "iso8859-1" and not "identity" - as the default and original [encoding system] value. Since - "iso8859-1" is built in to the C source code for Tcl now, there's no - availability issue, and it has the good feature of "identity" that - we must have ("bytes in" == "bytes out") without the bad feature of - "identity" ("broken as designed") that makes us want to abandon it. - [RFE 2008609] - *** POTENTIAL INCOMPATIBILITY for older releases of Tclkit and - any other code expecting a particular value for Tcl's default - system encoding *** + * generic/tclEncoding.c: Use "iso8859-1" and not "identity" as + the default and original [encoding system] value. Since "iso8859-1" is + built in to the C source code for Tcl now, there's no availability + issue, and it has the good feature of "identity" that we must have + ("bytes in" == "bytes out") without the bad feature of "identity" + ("broken as designed") that makes us want to abandon it. [RFE 2008609] + *** POTENTIAL INCOMPATIBILITY for older releases of Tclkit and any + other code expecting a particular value for Tcl's default system + encoding *** 2008-10-24 Pat Thoyts * library/http/http.tcl: Fixed a failure to read SHOUTcast streams - with the new 2.7 package. Introduced a new intial state as the - first response may not be HTTP*. + with the new 2.7 package. Introduced a new intial state as the first + response may not be HTTP*. 2008-10-23 Miguel Sofer - * generic/tclCmdAH.c (ForNextCallback): handle TCL_CONTINUE in - the for body [Bug 2186888]. + * generic/tclCmdAH.c (ForNextCallback): handle TCL_CONTINUE in the for + body [Bug 2186888]. 2008-10-22 Jan Nijtmans @@ -53,7 +69,7 @@ 2008-10-19 Don Porter * generic/tclProc.c: Reset -level and -code values to defaults - after they are used. [Bug 2152286]. + after they are used. [Bug 2152286] 2008-10-19 Donal K. Fellows diff --git a/generic/tclOO.c b/generic/tclOO.c index 11a7cbd..e161563 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.17 2008/09/23 05:05:48 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.18 2008/10/31 22:08:32 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -246,6 +246,8 @@ InitFoundation( Tcl_IncrRefCount(fPtr->unknownMethodNameObj); Tcl_IncrRefCount(fPtr->constructorName); Tcl_IncrRefCount(fPtr->destructorName); + Tcl_NRCreateCommand(interp, "::oo::UpCatch", TclOOUpcatchCmd, + TclOONRUpcatch, NULL, NULL); Tcl_CreateObjCommand(interp, "::oo::UnknownDefinition", TclOOUnknownDefinition, NULL, NULL); namePtr = Tcl_NewStringObj("::oo::UnknownDefinition", -1); @@ -309,6 +311,10 @@ InitFoundation( * Finish setting up the class of classes by marking the 'new' method as * private; classes, unlike general objects, must have explicit names. We * also need to create the constructor for classes. + * + * The 0xDeadBeef is a special signal to the errorInfo logger that is used + * by constructors that stops it from generating extra error information + * that is confusing. */ namePtr = Tcl_NewStringObj("new", -1); @@ -318,12 +324,12 @@ InitFoundation( argsPtr = Tcl_NewStringObj("{definitionScript {}}", -1); Tcl_IncrRefCount(argsPtr); bodyPtr = Tcl_NewStringObj( - "if {[catch {define [self] $definitionScript} msg opt]} {\n" - "set ei [split [dict get $opt -errorinfo] \\n]\n" - "dict set opt -errorinfo [join [lrange $ei 0 end-2] \\n]\n" - "dict set opt -errorline 0xdeadbeef\n" + "set script [list ::oo::define [self] $definitionScript];" + "lassign [::oo::UpCatch $script] msg opts\n" + "if {[dict get $opts -code] == 1} {" + " dict set opts -errorline 0xDeadBeef\n" "}\n" - "return -options $opt $msg", -1); + "return -options $opts $msg", -1); fPtr->classCls->constructorPtr = TclOONewProcMethod(interp, fPtr->classCls, 0, NULL, argsPtr, bodyPtr, NULL); Tcl_DecrRefCount(argsPtr); diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index cbece15..394ea60 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.13 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.14 2008/10/31 22:08:32 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -975,6 +975,75 @@ TclOOCopyObjectCmd( } /* + * ---------------------------------------------------------------------- + * + * TclOOUpcatchCmd -- + * + * Implementation of the [oo::UpCatch] command, which is a combination of + * [uplevel 1] and [catch] that makes it easier to write transparent + * error handling in scripts. + * + * ---------------------------------------------------------------------- + */ + +int +TclOOUpcatchCmd( + ClientData ignored, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + return Tcl_NRCallObjProc(interp, TclOONRUpcatch, NULL, objc, objv); +} + +static int +UpcatchCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + CallFrame *savedFramePtr = data[0]; + Tcl_Obj *resultObj[2]; + int rewind = iPtr->execEnvPtr->rewind; + + iPtr->varFramePtr = savedFramePtr; + if (rewind || Tcl_LimitExceeded(interp)) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"UpCatch\" body line %d)", interp->errorLine)); + return TCL_ERROR; + } + resultObj[0] = Tcl_GetObjResult(interp); + resultObj[1] = Tcl_GetReturnOptions(interp, result); + Tcl_SetObjResult(interp, Tcl_NewListObj(2, resultObj)); + return TCL_OK; +} + +int +TclOONRUpcatch( + ClientData ignored, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + CallFrame *savedFramePtr = iPtr->varFramePtr; + Tcl_Obj *scriptObj; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "script"); + return TCL_ERROR; + } + if (iPtr->varFramePtr->callerVarPtr != NULL) { + iPtr->varFramePtr = iPtr->varFramePtr->callerVarPtr; + } + + Tcl_NRAddCallback(interp, UpcatchCallback, savedFramePtr, NULL,NULL,NULL); + return TclNREvalObjEx(interp, objv[1], TCL_EVAL_NOERR, + iPtr->cmdFramePtr, 1); +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 4d680ea..a96d267 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.6 2008/10/10 13:04:09 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.7 2008/10/31 22:08:32 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -25,6 +25,8 @@ static inline void BumpGlobalEpoch(Tcl_Interp *interp, Class *classPtr); static Tcl_Command FindCommand(Tcl_Interp *interp, Tcl_Obj *stringObj, Tcl_Namespace *const namespacePtr); +static inline Class * GetClassInOuterContext(Tcl_Interp *interp, + Tcl_Obj *className, const char *errMsg); static inline int InitDefineContext(Tcl_Interp *interp, Tcl_Namespace *namespacePtr, Object *oPtr, int objc, Tcl_Obj *const objv[]); @@ -605,6 +607,46 @@ TclOOGetDefineCmdContext( /* * ---------------------------------------------------------------------- * + * GetClassInOuterContext -- + * Wrapper round Tcl_GetObjectFromObj to perform the lookup in the + * context that called oo::define (or equivalent). Note that this may + * have to go up multiple levels to get the level that we started doing + * definitions at. + * + * ---------------------------------------------------------------------- + */ + +static inline Class * +GetClassInOuterContext( + Tcl_Interp *interp, + Tcl_Obj *className, + const char *errMsg) +{ + Interp *iPtr = (Interp *) interp; + Object *oPtr; + CallFrame *savedFramePtr = iPtr->varFramePtr; + + while (iPtr->varFramePtr->isProcCallFrame == FRAME_IS_OO_DEFINE) { + if (iPtr->varFramePtr->callerVarPtr == NULL) { + Tcl_Panic("getting outer context when already in global context"); + } + iPtr->varFramePtr = iPtr->varFramePtr->callerVarPtr; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, className); + iPtr->varFramePtr = savedFramePtr; + if (oPtr == NULL) { + return NULL; + } + if (oPtr->classPtr == NULL) { + Tcl_AppendResult(interp, errMsg, NULL); + return NULL; + } + return oPtr->classPtr; +} + +/* + * ---------------------------------------------------------------------- + * * TclOODefineObjCmd -- * Implementation of the "oo::define" command. Works by effectively doing * the same as 'namespace eval', but with extra magic applied so that the @@ -982,7 +1024,8 @@ TclOODefineClassObjCmd( int objc, Tcl_Obj *const *objv) { - Object *oPtr, *o2Ptr; + Object *oPtr; + Class *clsPtr; Foundation *fPtr = TclOOGetFoundation(interp); /* @@ -1012,13 +1055,9 @@ TclOODefineClassObjCmd( Tcl_WrongNumArgs(interp, 1, objv, "className"); return TCL_ERROR; } - o2Ptr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); - if (o2Ptr == NULL) { - return TCL_ERROR; - } - if (o2Ptr->classPtr == NULL) { - Tcl_AppendResult(interp, "the class of an object must be a class", - NULL); + clsPtr = GetClassInOuterContext(interp, objv[1], + "the class of an object must be a class"); + if (clsPtr == NULL) { return TCL_ERROR; } @@ -1028,8 +1067,7 @@ TclOODefineClassObjCmd( * produce an error if any attempt is made to swap from one to the other. */ - if ((oPtr->classPtr == NULL) == TclOOIsReachable(fPtr->classCls, - o2Ptr->classPtr)) { + if ((oPtr->classPtr==NULL) == TclOOIsReachable(fPtr->classCls, clsPtr)) { Tcl_AppendResult(interp, "may not change a ", (oPtr->classPtr==NULL ? "non-" : ""), "class object into a ", (oPtr->classPtr==NULL ? "" : "non-"), "class object", NULL); @@ -1040,9 +1078,9 @@ TclOODefineClassObjCmd( * Set the object's class. */ - if (oPtr->selfCls != o2Ptr->classPtr) { + if (oPtr->selfCls != clsPtr) { TclOORemoveFromInstances(oPtr, oPtr->selfCls); - oPtr->selfCls = o2Ptr->classPtr; + oPtr->selfCls = clsPtr; TclOOAddToInstances(oPtr, oPtr->selfCls); if (oPtr->classPtr != NULL) { BumpGlobalEpoch(interp, oPtr->classPtr); @@ -1513,23 +1551,17 @@ TclOODefineMixinObjCmd( mixins = TclStackAlloc(interp, sizeof(Class *) * (objc-1)); for (i=1 ; iclassPtr == NULL) { - Tcl_AppendResult(interp, "may only mix in classes; \"", - TclGetString(objv[i]), "\" is not a class", NULL); + if (clsPtr == NULL) { goto freeAndError; } - if (!isInstanceMixin && - TclOOIsReachable(oPtr->classPtr,o2Ptr->classPtr)){ + if (!isInstanceMixin && TclOOIsReachable(oPtr->classPtr, clsPtr)) { Tcl_AppendResult(interp, "may not mix a class into itself", NULL); goto freeAndError; } - mixins[i-1] = o2Ptr->classPtr; + mixins[i-1] = clsPtr; } if (isInstanceMixin) { @@ -1617,7 +1649,7 @@ TclOODefineSuperclassObjCmd( int objc, Tcl_Obj *const *objv) { - Object *oPtr, *o2Ptr; + Object *oPtr; Foundation *fPtr = TclOOGetFoundation(interp); Class **superclasses, *superPtr; int i, j; @@ -1657,29 +1689,27 @@ TclOODefineSuperclassObjCmd( */ for (i=0 ; iclassPtr == NULL) { - Tcl_AppendResult(interp, "only a class can be a superclass",NULL); + Class *clsPtr = GetClassInOuterContext(interp, objv[i+1], + "only a class can be a superclass"); + + if (clsPtr == NULL) { goto failedAfterAlloc; } for (j=0 ; jclassPtr) { + if (superclasses[j] == clsPtr) { Tcl_AppendResult(interp, "class should only be a direct superclass once",NULL); goto failedAfterAlloc; } } - if (TclOOIsReachable(oPtr->classPtr, o2Ptr->classPtr)) { + if (TclOOIsReachable(oPtr->classPtr, clsPtr)) { Tcl_AppendResult(interp, "attempt to form circular dependency graph", NULL); failedAfterAlloc: ckfree((char *) superclasses); return TCL_ERROR; } - superclasses[i] = o2Ptr->classPtr; + superclasses[i] = clsPtr; } /* diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 4b6b8a0..3221fcc 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.9 2008/10/13 13:13:45 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.10 2008/10/31 22:08:32 dkf Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -525,6 +525,8 @@ MODULE_SCOPE int TclNRObjectContextInvokeNext(Tcl_Interp *interp, Tcl_Obj *const *objv, int skip); MODULE_SCOPE void TclOONewBasicMethod(Tcl_Interp *interp, Class *clsPtr, const DeclaredClassMethod *dcm); +MODULE_SCOPE int TclOONRUpcatch(ClientData ignored, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); MODULE_SCOPE Tcl_Obj * TclOOObjectName(Tcl_Interp *interp, Object *oPtr); MODULE_SCOPE void TclOORemoveFromInstances(Object *oPtr, Class *clsPtr); MODULE_SCOPE void TclOORemoveFromMixinSubs(Class *subPtr, @@ -534,6 +536,9 @@ MODULE_SCOPE void TclOORemoveFromSubclasses(Class *subPtr, MODULE_SCOPE void TclOOStashContext(Tcl_Obj *objPtr, CallContext *contextPtr); MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr); +MODULE_SCOPE int TclOOUpcatchCmd(ClientData ignored, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); /* * Include all the private API, generated from tclOO.decls. diff --git a/tests/oo.test b/tests/oo.test index 2df1d4d..ff2f79f 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.15 2008/10/10 13:04:09 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.16 2008/10/31 22:08:32 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -594,6 +594,25 @@ test oo-7.8 {OO: next at the end of the method chain} -setup { } lappend result [catch {[foo2 new] bar} msg] $msg } -result {foo2 foo 1 {no next method implementation}} +test oo-7.9 {OO: defining inheritance in namespaces} -setup { + set ::result {} + oo::class create ::master + namespace eval ::foo { + oo::class create mixin {superclass ::master} + } +} -cleanup { + ::master destroy + namespace delete ::foo +} -body { + namespace eval ::foo { + oo::class create bar {superclass master} + oo::class create boo + oo::define boo {superclass bar} + oo::define boo {mixin mixin} + oo::class create spong {superclass boo} + return + } +} -result {} test oo-8.1 {OO: global must work in methods} { oo::object create foo @@ -1324,6 +1343,36 @@ test oo-18.3 {OO: define command support} { (in definition script for object "::foo" line 1) invoked from within "oo::class create foo {error bar}"}} +test oo-18.3a {OO: define command support} { + list [catch {oo::class create foo { + error bar +}} msg] $msg $errorInfo +} {1 bar {bar + while executing +"error bar" + (in definition script for object "::foo" line 2) + invoked from within +"oo::class create foo { + error bar +}"}} +test oo-18.3b {OO: define command support} { + list [catch {oo::class create foo { + eval eval error bar +}} msg] $msg $errorInfo +} {1 bar {bar + while executing +"error bar" + ("eval" body line 1) + invoked from within +"eval error bar" + ("eval" body line 1) + invoked from within +"eval eval error bar" + (in definition script for object "::foo" line 2) + invoked from within +"oo::class create foo { + eval eval error bar +}"}} test oo-18.4 {OO: more error traces from the guts} -setup { oo::object create obj } -body { -- cgit v0.12 From ca1d8afc2cf45b6fd42204a7ed0e295991666205 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 1 Nov 2008 00:04:26 +0000 Subject: remove unused variable --- generic/tclOOBasic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 394ea60..b52f90c 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.14 2008/10/31 22:08:32 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.15 2008/11/01 00:04:26 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1028,7 +1028,6 @@ TclOONRUpcatch( { Interp *iPtr = (Interp *) interp; CallFrame *savedFramePtr = iPtr->varFramePtr; - Tcl_Obj *scriptObj; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "script"); -- cgit v0.12 From fee39e2a56df0c5d1f3bc91f5189f6d1e3b6e573 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 1 Nov 2008 08:05:49 +0000 Subject: Version bump of TclOO --- ChangeLog | 4 ++++ generic/tclOO.h | 4 ++-- tests/oo.test | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6880855..425fdd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-11-01 Donal K. Fellows + + * generic/tclOO.h (TCLOO_VERSION): Bump version of TclOO. + 2008-10-31 Donal K. Fellows * generic/tclOOBasic.c (TclOONRUpcatch): Reworked the code that does diff --git a/generic/tclOO.h b/generic/tclOO.h index b16938b..7bcb4a7 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.h,v 1.6 2008/09/26 12:54:00 dkf Exp $ + * RCS: @(#) $Id: tclOO.h,v 1.7 2008/11/01 08:05:49 dkf Exp $ */ #ifndef TCLOO_H_INCLUDED @@ -28,7 +28,7 @@ * standalone TclOO version matches... */ -#define TCLOO_VERSION "0.6" +#define TCLOO_VERSION "0.6.1" #define TCLOO_PATCHLEVEL TCLOO_VERSION /* diff --git a/tests/oo.test b/tests/oo.test index ff2f79f..5c105b8 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,9 +7,9 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.16 2008/10/31 22:08:32 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.17 2008/11/01 08:05:49 dkf Exp $ -package require TclOO 0.4 ;# Must match value in configure.in +package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* -- cgit v0.12 From 5f1da59e1ccac3b890ca539bc9780d97a2bdbff8 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 1 Nov 2008 15:03:28 +0000 Subject: fix typo: s/ZoneinfoFile/LoadZoneinfoFile/ --- library/clock.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/clock.tcl b/library/clock.tcl index c657234..75edb1c 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.47 2008/02/27 02:08:27 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.48 2008/11/01 15:03:28 das Exp $ # #---------------------------------------------------------------------- @@ -3214,7 +3214,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { # again with a time zone file - this time without a colon if { [catch { LoadTimeZoneFile $timezone }] - && [catch { ZoneinfoFile $timezone } - opts] } { + && [catch { LoadZoneinfoFile $timezone } - opts] } { dict unset opts -errorinfo return -options $opts "time zone $timezone not found" } -- cgit v0.12 From df2152c1d6f0dc3b0e0aa8de8c0e1cd2730ea6d5 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 4 Nov 2008 23:57:41 +0000 Subject: * generic/tclPort.h: remove the ../win/ header dir as the build system already has it, and it confuses builds when used with private headers installed. --- ChangeLog | 6 ++++++ generic/tclPort.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 425fdd3..a62cda2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-04 Jeff Hobbs + + * generic/tclPort.h: remove the ../win/ header dir as the build + system already has it, and it confuses builds when used with + private headers installed. + 2008-11-01 Donal K. Fellows * generic/tclOO.h (TCLOO_VERSION): Bump version of TclOO. diff --git a/generic/tclPort.h b/generic/tclPort.h index ad98823..d145468 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPort.h,v 1.15 2005/05/10 18:34:47 kennykb Exp $ + * RCS: @(#) $Id: tclPort.h,v 1.16 2008/11/04 23:57:41 hobbs Exp $ */ #ifndef _TCLPORT @@ -22,7 +22,7 @@ #include "tcl.h" #if defined(__WIN32__) -# include "../win/tclWinPort.h" +# include "tclWinPort.h" #else # include "tclUnixPort.h" #endif -- cgit v0.12 From e2049a58b3ae85b4fdd0e585a75194984bbf6232 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 6 Nov 2008 21:47:36 +0000 Subject: add "-Wno-implicit-int" for gcc, as on UNIX eliminate an 'array index out of bounds' warning on HP-UX' --- ChangeLog | 9 ++++++++- generic/tclIO.c | 6 +++--- win/configure | 2 +- win/tcl.m4 | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a62cda2..1b40350 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-06 Jan Nijtmans + + * win/tcl.m4: add "-Wno-implicit-int" flag for gcc, as on UNIX + * win/configure (regenerated) + * generic/tclIO.c eliminate an 'array index out of bounds' + warning on HP-UX + 2008-11-04 Jeff Hobbs * generic/tclPort.h: remove the ../win/ header dir as the build @@ -30,7 +37,7 @@ * generic/tclCompile.h: CONSTify TclDTraceInfo * generic/tclBasic.c * generic/tclProc.c - * generic/tclEnv.c: Eliminate some -Wstrings-write warnings + * generic/tclEnv.c: Eliminate some -Wwrite-strings warnings * generic/tclLink.c 2008-10-27 Don Porter diff --git a/generic/tclIO.c b/generic/tclIO.c index d7524fe..d2017e8 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.146 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.147 2008/11/06 21:47:36 nijtmans Exp $ */ #include "tclInt.h" @@ -4730,7 +4730,7 @@ FilterInputBytes( statePtr->inQueueTail = nextPtr; } extra = rawLen - gsPtr->rawRead; - memcpy(nextPtr->buf + BUFFER_PADDING - extra, + memcpy(nextPtr->buf + (BUFFER_PADDING - extra), raw + gsPtr->rawRead, (size_t) extra); nextPtr->nextRemoved -= extra; bufPtr->nextAdded -= extra; @@ -4879,7 +4879,7 @@ CommonGetsCleanup( extra = SpaceLeft(bufPtr); if (extra > 0) { memcpy(InsertPoint(bufPtr), - nextPtr->buf + BUFFER_PADDING - extra, + nextPtr->buf + (BUFFER_PADDING - extra), (size_t) extra); bufPtr->nextAdded += extra; nextPtr->nextRemoved = BUFFER_PADDING; diff --git a/win/configure b/win/configure index 54c8274..d627b5e 100755 --- a/win/configure +++ b/win/configure @@ -3886,7 +3886,7 @@ echo "$as_me: error: ${CC} does not support the -shared option. CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall" + CFLAGS_WARNING="-Wall -Wno-implicit-int" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= diff --git a/win/tcl.m4 b/win/tcl.m4 index 1a46527..f76fbf8 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -529,7 +529,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall" + CFLAGS_WARNING="-Wall -Wno-implicit-int" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= -- cgit v0.12 From fce9e95f9fcaf90587b556ee2de2ba36a2d81f42 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 7 Nov 2008 20:10:18 +0000 Subject: patch #2215022: clean up the binary ensemble initialization code Applied a patch from Duoas which extends the TclMakeEnsemble command to handle sub-ensembles from tables. Cleaned up the original patch a bit. --- ChangeLog | 7 +++ doc/ByteArrObj.3 | 12 +++-- generic/tclBinary.c | 128 ++++++++++++++++------------------------------------ generic/tclInt.h | 11 +++-- generic/tclNamesp.c | 102 +++++++++++++++++++++++++++-------------- 5 files changed, 127 insertions(+), 133 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b40350..982bd40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-07 Pat Thoyts + + * generic/tclInt.h: Applied patch #2215022 from Duoas to clean up + * generic/tclBinary.c: the binary ensemble initiailization code. + * generic/tclNamesp.c: Extends the TclMakeEnsemble to do + * doc/ByteArrObj.3: sub-ensembles from tables. + 2008-11-06 Jan Nijtmans * win/tcl.m4: add "-Wno-implicit-int" flag for gcc, as on UNIX diff --git a/doc/ByteArrObj.3 b/doc/ByteArrObj.3 index e7cc023..6d0822d 100644 --- a/doc/ByteArrObj.3 +++ b/doc/ByteArrObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ByteArrObj.3,v 1.6 2004/10/07 15:15:35 dkf Exp $ +'\" RCS: @(#) $Id: ByteArrObj.3,v 1.7 2008/11/07 20:10:19 patthoyts Exp $ '\" .so man.macros .TH Tcl_ByteArrayObj 3 8.1 Tcl "Tcl Library Procedures" @@ -29,7 +29,8 @@ unsigned char * .SH ARGUMENTS .AS "const unsigned char" *lengthPtr in/out .AP "const unsigned char" *bytes in -The array of bytes used to initialize or set a byte-array object. +The array of bytes used to initialize or set a byte-array object. May be NULL +even if \fIlength\fR is non-zero. .AP int length in The length of the array of bytes. It must be >= 0. .AP Tcl_Obj *objPtr in/out @@ -55,7 +56,7 @@ byte-array or to convert an arbitrary object to a byte-array. Obtaining the string representation of a byte-array object (by calling \fBTcl_GetStringFromObj\fR) produces a properly formed UTF-8 sequence with a one-to-one mapping between the bytes in the internal representation and the -UTF-8 characters in the string representation. +UTF-8 characters in the string representation. .PP \fBTcl_NewByteArrayObj\fR and \fBTcl_SetByteArrayObj\fR will create a new object of byte-array type or modify an existing object to have a @@ -65,7 +66,8 @@ array of bytes given by \fIbytes\fR. \fBTcl_NewByteArrayObj\fR returns a pointer to a newly allocated object with a reference count of zero. \fBTcl_SetByteArrayObj\fR invalidates any old string representation and, if the object is not already a byte-array object, frees any old internal -representation. +representation. If \fIbytes\fR is NULL then the new byte array contains +arbitrary values. .PP \fBTcl_GetByteArrayFromObj\fR converts a Tcl object to byte-array type and returns a pointer to the object's new internal representation as an array of @@ -73,7 +75,7 @@ bytes. The length of this array is stored in \fIlengthPtr\fR if \fIlengthPtr\fR is non-NULL. The storage for the array of bytes is owned by the object and should not be freed. The contents of the array may be modified by the caller only if the object is not shared and the caller -invalidates the string representation. +invalidates the string representation. .PP \fBTcl_SetByteArrayLength\fR converts the Tcl object to byte-array type and changes the length of the object's internal representation as an diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 680ef41..70ed12f 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.49 2008/10/26 18:34:03 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.50 2008/11/07 20:10:19 patthoyts Exp $ */ #include "tclInt.h" @@ -312,9 +312,9 @@ void Tcl_SetByteArrayObj( Tcl_Obj *objPtr, /* Object to initialize as a ByteArray. */ const unsigned char *bytes, /* The array of bytes to use as the new - * value. */ - int length) /* Length of the array of bytes, which must be - * >= 0. */ + value. May be NULL even if length > 0. */ + int length) /* Length of the array of bytes, which must + be >= 0. */ { ByteArray *byteArrayPtr; @@ -324,10 +324,14 @@ Tcl_SetByteArrayObj( TclFreeIntRep(objPtr); Tcl_InvalidateStringRep(objPtr); + length = (length < 0) ? 0 : length; byteArrayPtr = (ByteArray *) ckalloc(BYTEARRAY_SIZE(length)); + memset(byteArrayPtr, 0, BYTEARRAY_SIZE(length)); byteArrayPtr->used = length; byteArrayPtr->allocated = length; - memcpy(byteArrayPtr->bytes, bytes, (size_t) length); + if (bytes && length) { + memcpy(byteArrayPtr->bytes, bytes, (size_t) length); + } objPtr->typePtr = &tclByteArrayType; SET_BYTEARRAY(objPtr, byteArrayPtr); @@ -593,8 +597,8 @@ UpdateStringOfByteArray( * * TclInitBinaryCmd -- * - * This function is called to create the "binary" Tcl command. See the user - * documentation for details on what it does. + * This function is called to create the "binary" Tcl command. See the + * user documentation for details on what it does. * * Results: * A command token for the new command. @@ -608,89 +612,32 @@ UpdateStringOfByteArray( Tcl_Command TclInitBinaryCmd(Tcl_Interp *interp) { - Tcl_Namespace *nsTclPtr, *nsBinPtr, *nsEncPtr, *nsDecPtr; - Tcl_Command binEnsemble, encEnsemble, decEnsemble; - Tcl_Obj *binDict, *encDict, *decDict; - - /* - * FIX ME: I so ugly - please make me pretty ... - */ - - nsTclPtr = Tcl_FindNamespace(interp, "::tcl", - NULL, TCL_CREATE_NS_IF_UNKNOWN); - if (nsTclPtr == NULL) { - Tcl_Panic("unable to find or create ::tcl namespace!"); - } - nsBinPtr = Tcl_FindNamespace(interp, "::tcl::binary", - NULL, TCL_CREATE_NS_IF_UNKNOWN); - if (nsBinPtr == NULL) { - Tcl_Panic("unable to find or create ::tcl::binary namespace!"); - } - binEnsemble = Tcl_CreateEnsemble(interp, "::binary", - nsBinPtr, TCL_ENSEMBLE_PREFIX); - - nsEncPtr = Tcl_FindNamespace(interp, "::tcl::binary::encode", - NULL, TCL_CREATE_NS_IF_UNKNOWN); - if (nsEncPtr == NULL) { - Tcl_Panic("unable to find or create ::tcl::binary::encode namespace!"); - } - encEnsemble = Tcl_CreateEnsemble(interp, "encode", - nsBinPtr, 0); - - nsDecPtr = Tcl_FindNamespace(interp, "::tcl::binary::decode", - NULL, TCL_CREATE_NS_IF_UNKNOWN); - if (nsDecPtr == NULL) { - Tcl_Panic("unable to find or create ::tcl::binary::decode namespace!"); - } - decEnsemble = Tcl_CreateEnsemble(interp, "decode", - nsBinPtr, 0); - - TclNewObj(binDict); - Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("format",-1), - Tcl_NewStringObj("::tcl::binary::format",-1)); - Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("scan",-1), - Tcl_NewStringObj("::tcl::binary::scan",-1)); - Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("encode",-1), - Tcl_NewStringObj("::tcl::binary::encode",-1)); - Tcl_DictObjPut(NULL, binDict, Tcl_NewStringObj("decode",-1), - Tcl_NewStringObj("::tcl::binary::decode",-1)); - Tcl_CreateObjCommand(interp, "::tcl::binary::format", - BinaryFormatCmd, NULL, NULL); - Tcl_CreateObjCommand(interp, "::tcl::binary::scan", - BinaryScanCmd, NULL, NULL); - Tcl_SetEnsembleMappingDict(interp, binEnsemble, binDict); - - TclNewObj(encDict); - Tcl_DictObjPut(NULL, encDict, Tcl_NewStringObj("hex",-1), - Tcl_NewStringObj("::tcl::binary::encode::hex",-1)); - Tcl_DictObjPut(NULL, encDict, Tcl_NewStringObj("uuencode",-1), - Tcl_NewStringObj("::tcl::binary::encode::uuencode",-1)); - Tcl_DictObjPut(NULL, encDict, Tcl_NewStringObj("base64",-1), - Tcl_NewStringObj("::tcl::binary::encode::base64",-1)); - Tcl_CreateObjCommand(interp, "::tcl::binary::encode::hex", - BinaryEncodeHex, (ClientData)HexDigits, NULL); - Tcl_CreateObjCommand(interp, "::tcl::binary::encode::uuencode", - BinaryEncode64, (ClientData)UueDigits, NULL); - Tcl_CreateObjCommand(interp, "::tcl::binary::encode::base64", - BinaryEncode64, (ClientData)B64Digits, NULL); - Tcl_SetEnsembleMappingDict(interp, encEnsemble, encDict); - - TclNewObj(decDict); - Tcl_DictObjPut(NULL, decDict, Tcl_NewStringObj("hex",-1), - Tcl_NewStringObj("::tcl::binary::decode::hex",-1)); - Tcl_DictObjPut(NULL, decDict, Tcl_NewStringObj("uuencode",-1), - Tcl_NewStringObj("::tcl::binary::decode::uuencode",-1)); - Tcl_DictObjPut(NULL, decDict, Tcl_NewStringObj("base64",-1), - Tcl_NewStringObj("::tcl::binary::decode::base64",-1)); - Tcl_CreateObjCommand(interp, "::tcl::binary::decode::hex", - BinaryDecodeHex, (ClientData)NULL, NULL); - Tcl_CreateObjCommand(interp, "::tcl::binary::decode::uuencode", - BinaryDecodeUu, (ClientData)NULL, NULL); - Tcl_CreateObjCommand(interp, "::tcl::binary::decode::base64", - BinaryDecode64, (ClientData)NULL, NULL); - Tcl_SetEnsembleMappingDict(interp, decEnsemble, decDict); - - return binEnsemble; + const EnsembleImplMap binaryMap[] = { + { "format", BinaryFormatCmd, NULL }, + { "scan", BinaryScanCmd, NULL }, + { "encode", NULL, NULL }, + { "decode", NULL, NULL }, + { NULL, NULL, NULL } + }; + const EnsembleImplMap encodeMap[] = { + { "hex", BinaryEncodeHex, NULL, NULL, (ClientData)HexDigits }, + { "uuencode", BinaryEncode64, NULL, NULL, (ClientData)UueDigits }, + { "base64", BinaryEncode64, NULL, NULL, (ClientData)B64Digits }, + { NULL, NULL, NULL } + }; + const EnsembleImplMap decodeMap[] = { + { "hex", BinaryDecodeHex, NULL }, + { "uuencode", BinaryDecodeUu, NULL }, + { "base64", BinaryDecode64, NULL }, + { NULL, NULL, NULL } + }; + + Tcl_Command binaryEnsemble; + + binaryEnsemble = TclMakeEnsemble(interp, "binary", binaryMap); + TclMakeEnsemble(interp, "binary encode", encodeMap); + TclMakeEnsemble(interp, "binary decode", decodeMap); + return binaryEnsemble; } /* @@ -2710,3 +2657,4 @@ BinaryDecode64( * fill-column: 78 * End: */ + diff --git a/generic/tclInt.h b/generic/tclInt.h index 551688d..f0c922f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.404 2008/10/15 06:17:03 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.405 2008/11/07 20:10:19 patthoyts Exp $ */ #ifndef _TCLINT @@ -1455,10 +1455,11 @@ typedef struct ByteCodeStats { */ typedef struct { - const char *name; /* The name of the subcommand. */ - Tcl_ObjCmdProc *proc; /* The implementation of the subcommand. */ - CompileProc *compileProc; /* The compiler for the subcommand. */ - Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */ + const char *name; /* The name of the subcommand */ + Tcl_ObjCmdProc *proc; /* The implementation of the subcommand */ + CompileProc *compileProc; /* The compiler for the subcommand */ + Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */ + ClientData clientData; /* Any clientData to give the command */ } EnsembleImplMap; /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 6485831..10e3fd6 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.180 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.181 2008/11/07 20:10:19 patthoyts Exp $ */ #include "tclInt.h" @@ -6127,11 +6127,17 @@ Tcl_IsEnsemble( * ensemble will be subject to (limited) compilation if any of the * implementation commands are compilable. * + * The 'name' parameter may be a single command name or a list if + * creating an ensemble subcommand (see the binary implementation). + * + * Currently, the TCL_ENSEMBLE_PREFIX ensemble flag is only used on + * top-level ensemble commands. + * * Results: - * Handle for the ensemble, or NULL if creation of it fails. + * Handle for the new ensemble, or NULL on failure. * * Side effects: - * May advance bytecode compilation epoch. + * May advance the bytecode compilation epoch. * *---------------------------------------------------------------------- */ @@ -6139,58 +6145,88 @@ Tcl_IsEnsemble( Tcl_Command TclMakeEnsemble( Tcl_Interp *interp, - const char *name, - const EnsembleImplMap map[]) + const char *name, /* The ensemble name (as explained above) */ + const EnsembleImplMap map[]) /* The subcommands to create */ { - Tcl_Command ensemble; /* The overall ensemble. */ - Tcl_Namespace *tclNsPtr; /* Reference to the "::tcl" namespace. */ + Tcl_Command ensemble; + Tcl_Namespace *ns; Tcl_DString buf; + char **nameParts; + const char *cmdname; + int i, nameCount = 0, ensembleFlags = 0; - tclNsPtr = Tcl_FindNamespace(interp, "::tcl", NULL, - TCL_CREATE_NS_IF_UNKNOWN); - if (tclNsPtr == NULL) { - Tcl_Panic("unable to find or create ::tcl namespace!"); - } + /* + * Construct the path for the ensemble namespace and create it + */ + Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, "::tcl::", -1); - Tcl_DStringAppend(&buf, name, -1); - tclNsPtr = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), NULL, - TCL_CREATE_NS_IF_UNKNOWN); - if (tclNsPtr == NULL) { + Tcl_DStringAppend(&buf, "::tcl", -1); + + if (Tcl_SplitList(NULL, name, &nameCount, &nameParts) != TCL_OK) { + Tcl_Panic("invalid ensemble name '%s'", name); + } + + for (i = 0; i < nameCount; ++i) { + Tcl_DStringAppend(&buf, "::", 2); + Tcl_DStringAppend(&buf, nameParts[i], -1); + } + + ns = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), + NULL, TCL_CREATE_NS_IF_UNKNOWN); + if (!ns) { Tcl_Panic("unable to find or create %s namespace!", - Tcl_DStringValue(&buf)); + Tcl_DStringValue(&buf)); + } + + /* + * Create the named ensemble in the correct namespace + */ + + if (nameCount == 1) { + ensembleFlags = TCL_ENSEMBLE_PREFIX; + cmdname = Tcl_DStringValue(&buf) + 5; + } else { + ns = ns->parentPtr; + cmdname = nameParts[nameCount - 1]; } - ensemble = Tcl_CreateEnsemble(interp, Tcl_DStringValue(&buf)+5, tclNsPtr, - TCL_ENSEMBLE_PREFIX); - Tcl_DStringAppend(&buf, "::", -1); + ensemble = Tcl_CreateEnsemble(interp, cmdname, ns, ensembleFlags); + + /* + * Create the ensemble mapping dictionary and the ensemble command procs + */ + if (ensemble != NULL) { Tcl_Obj *mapDict; - int i, compile = 0; + Tcl_DStringAppend(&buf, "::", 2); TclNewObj(mapDict); for (i=0 ; map[i].name != NULL ; i++) { Tcl_Obj *fromObj, *toObj; - register Command *cmdPtr; + Command *cmdPtr; fromObj = Tcl_NewStringObj(map[i].name, -1); TclNewStringObj(toObj, Tcl_DStringValue(&buf), - Tcl_DStringLength(&buf)); + Tcl_DStringLength(&buf)); Tcl_AppendToObj(toObj, map[i].name, -1); Tcl_DictObjPut(NULL, mapDict, fromObj, toObj); - cmdPtr = (Command *) Tcl_CreateObjCommand(interp, - TclGetString(toObj), map[i].proc, NULL, NULL); - cmdPtr->compileProc = map[i].compileProc; - cmdPtr->nreProc = map[i].nreProc; - compile |= (map[i].compileProc != NULL); + if (map[i].proc) { + cmdPtr = (Command *)Tcl_CreateObjCommand(interp, + TclGetString(toObj), map[i].proc, + map[i].clientData, NULL); + cmdPtr->compileProc = map[i].compileProc; + cmdPtr->nreProc = map[i].nreProc; + if (map[i].compileProc != NULL) + ensembleFlags |= ENSEMBLE_COMPILE; + } } Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict); - if (compile) { - Tcl_SetEnsembleFlags(interp, ensemble, - TCL_ENSEMBLE_PREFIX | ENSEMBLE_COMPILE); + if (ensembleFlags & ENSEMBLE_COMPILE) { + Tcl_SetEnsembleFlags(interp, ensemble, ensembleFlags); } } - Tcl_DStringFree(&buf); + Tcl_DStringFree(&buf); + Tcl_Free((char *)nameParts); return ensemble; } -- cgit v0.12 From 5712fecd971bc4528ae335bd91d588df88d5ef82 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 10 Nov 2008 17:57:30 +0000 Subject: * doc/platform_shell.n: Fixed [Bug 2255235], reported by Ulrich * library/platform/pkgIndex.tcl: Ring . * library/platform/shell.tcl: Updated the LOCATE command in the * library/tm.tcl: package 'platform::shell' to handle the new form * unix/Makefile.in: of 'provide' commands generated by tm.tcl. Bumped * win/Makefile.in: package to version 1.1.4. Added cross-references to the relevant parts of the code to avoid future desynchronization. --- ChangeLog | 10 ++++++++++ doc/platform_shell.n | 8 ++++---- library/platform/pkgIndex.tcl | 2 +- library/platform/shell.tcl | 6 ++++-- library/tm.tcl | 10 ++++++++++ unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 7 files changed, 35 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 982bd40..b35f999 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-11-10 Andreas Kupries + + * doc/platform_shell.n: Fixed [Bug 2255235], reported by Ulrich + * library/platform/pkgIndex.tcl: Ring . + * library/platform/shell.tcl: Updated the LOCATE command in the + * library/tm.tcl: package 'platform::shell' to handle the new form + * unix/Makefile.in: of 'provide' commands generated by tm.tcl. Bumped + * win/Makefile.in: package to version 1.1.4. Added cross-references + to the relevant parts of the code to avoid future desynchronization. + 2008-11-07 Pat Thoyts * generic/tclInt.h: Applied patch #2215022 from Duoas to clean up diff --git a/doc/platform_shell.n b/doc/platform_shell.n index 995467e..16fa364 100644 --- a/doc/platform_shell.n +++ b/doc/platform_shell.n @@ -1,20 +1,20 @@ '\" -'\" Copyright (c) 2006 ActiveState Software Inc +'\" Copyright (c) 2006-2008 ActiveState Software Inc '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: platform_shell.n,v 1.6 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: platform_shell.n,v 1.7 2008/11/10 17:57:30 andreas_kupries Exp $ '\" .so man.macros -.TH "platform::shell" n 1.1.3 platform::shell "Tcl Bundled Packages" +.TH "platform::shell" n 1.1.4 platform::shell "Tcl Bundled Packages" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME platform::shell \- System identification support code and utilities .SH SYNOPSIS .nf -\fBpackage require platform::shell ?1.1.3?\fR +\fBpackage require platform::shell ?1.1.4?\fR .sp \fBplatform::shell::generic \fIshell\fR \fBplatform::shell::identify \fIshell\fR diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 68924cb..27d596f 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ package ifneeded platform 1.0.3 [list source [file join $dir platform.tcl]] -package ifneeded platform::shell 1.1.3 [list source [file join $dir shell.tcl]] +package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl index b007666..407e639 100644 --- a/library/platform/shell.tcl +++ b/library/platform/shell.tcl @@ -104,8 +104,10 @@ proc ::platform::shell::LOCATE {bv ov} { # here. If the found package is wrapped we copy the code somewhere # where the spawned shell will be able to read it. + # Note: This code depends on the form of the 'provide' command + # generated by tm.tcl. Keep them in sync. See Bug 2255235. set pl [package ifneeded platform [package require platform]] - foreach {cmd base} $pl break + set base [lindex $pl end] set out 0 if {[lindex [file system $base]] ne "native"} { @@ -233,4 +235,4 @@ proc ::platform::shell::DIR {} { # ### ### ### ######### ######### ######### ## Ready -package provide platform::shell 1.1.3 +package provide platform::shell 1.1.4 diff --git a/library/tm.tcl b/library/tm.tcl index a58b2ea..a2476ce 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -254,6 +254,16 @@ proc ::tcl::tm::UnknownHandler {original name args} { # means something else without the namespace # specifier. + # NOTE. When making changes to the format of the + # provide command generated below CHECK that the + # 'LOCATE' procedure in core file + # 'platform/shell.tcl' still understands it, or, + # if not, update its implementation appropriately. + # + # Right now LOCATE's implementation assumes that + # the path of the package file is the last element + # in the list. + package ifneeded $pkgname $pkgversion \ "[::list package provide $pkgname $pkgversion];[::list source -encoding utf-8 $file]" diff --git a/unix/Makefile.in b/unix/Makefile.in index afe0eec..cf31632 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.247 2008/10/23 23:17:38 patthoyts Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.248 2008/11/10 17:57:30 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -814,8 +814,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package platform 1.0.3 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.3.tm; - @echo "Installing package platform::shell 1.1.3 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.3.tm; + @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing library encoding directory"; @for i in $(TOP_DIR)/library/encoding/*.enc ; do \ diff --git a/win/Makefile.in b/win/Makefile.in index 1be741a..b940c21 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.136 2008/10/23 23:17:38 patthoyts Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.137 2008/11/10 17:57:30 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -650,8 +650,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.0.tm; @echo "Installing package platform 1.0.3 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.3.tm; - @echo "Installing package platform::shell 1.1.3 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.3.tm; + @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; @for i in $(ROOT_DIR)/library/encoding/*.enc ; do \ $(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)/encoding"; \ -- cgit v0.12 From 3204e89f4e57ec3a5ae382db506743fdb6ce3429 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 11 Nov 2008 21:54:06 +0000 Subject: Eliminate warning: passing arg 4 of `Tcl_SplitList' from incompatible pointer type reverted change from 2008-11-06 (was under the impression that "-Wno-implicit-int" added an extra warning) --- ChangeLog | 8 ++++++++ generic/tclNamesp.c | 12 ++++++------ win/configure | 2 +- win/tcl.m4 | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b35f999..d1767bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-28 Jan Nijtmans + + * generic/tclNamesp.c: Eliminate warning: passing arg 4 of `Tcl_SplitList' + from incompatible pointer type + * win/tcl.m4: reverted change from 2008-11-06 (was under the impression + that "-Wno-implicit-int" added an extra warning) + * win/configure (regenerated) + 2008-11-10 Andreas Kupries * doc/platform_shell.n: Fixed [Bug 2255235], reported by Ulrich diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 10e3fd6..a88d140 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.181 2008/11/07 20:10:19 patthoyts Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.182 2008/11/11 21:54:06 nijtmans Exp $ */ #include "tclInt.h" @@ -6151,17 +6151,17 @@ TclMakeEnsemble( Tcl_Command ensemble; Tcl_Namespace *ns; Tcl_DString buf; - char **nameParts; + const char **nameParts; const char *cmdname; int i, nameCount = 0, ensembleFlags = 0; /* * Construct the path for the ensemble namespace and create it */ - + Tcl_DStringInit(&buf); Tcl_DStringAppend(&buf, "::tcl", -1); - + if (Tcl_SplitList(NULL, name, &nameCount, &nameParts) != TCL_OK) { Tcl_Panic("invalid ensemble name '%s'", name); } @@ -6170,7 +6170,7 @@ TclMakeEnsemble( Tcl_DStringAppend(&buf, "::", 2); Tcl_DStringAppend(&buf, nameParts[i], -1); } - + ns = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), NULL, TCL_CREATE_NS_IF_UNKNOWN); if (!ns) { @@ -6181,7 +6181,7 @@ TclMakeEnsemble( /* * Create the named ensemble in the correct namespace */ - + if (nameCount == 1) { ensembleFlags = TCL_ENSEMBLE_PREFIX; cmdname = Tcl_DStringValue(&buf) + 5; diff --git a/win/configure b/win/configure index d627b5e..54c8274 100755 --- a/win/configure +++ b/win/configure @@ -3886,7 +3886,7 @@ echo "$as_me: error: ${CC} does not support the -shared option. CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wno-implicit-int" + CFLAGS_WARNING="-Wall" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= diff --git a/win/tcl.m4 b/win/tcl.m4 index f76fbf8..1a46527 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -529,7 +529,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wno-implicit-int" + CFLAGS_WARNING="-Wall" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= -- cgit v0.12 From 266da04f1825ce88dda184f559448bed8890db38 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 11 Nov 2008 21:55:46 +0000 Subject: Eliminate warning: passing arg 4 of `Tcl_SplitList' from incompatible pointer type reverted change from 2008-11-06 (was under the impression that "-Wno-implicit-int" added an extra warning) --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d1767bb..133ff17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2008-10-28 Jan Nijtmans +2008-11-11 Jan Nijtmans * generic/tclNamesp.c: Eliminate warning: passing arg 4 of `Tcl_SplitList' from incompatible pointer type -- cgit v0.12 From 39004ac11e0fbfb55fc1890b75012eeef0ad530d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 12 Nov 2008 00:31:43 +0000 Subject: Use -O2 as gcc optimization compiler flag, and get rid of -Wno-implicit-int for UNIX --- ChangeLog | 3 +++ unix/configure | 10 +++++++--- unix/tcl.m4 | 9 ++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 133ff17..00a4b25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ * win/tcl.m4: reverted change from 2008-11-06 (was under the impression that "-Wno-implicit-int" added an extra warning) * win/configure (regenerated) + * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and get + rid of -Wno-implicit-int for UNIX + * unix/configure (regenerated) 2008-11-10 Andreas Kupries diff --git a/unix/configure b/unix/configure index 3e4bf79..7f0869a 100755 --- a/unix/configure +++ b/unix/configure @@ -6255,13 +6255,16 @@ fi ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O if test "$GCC" = yes; then - CFLAGS_WARNING="-Wall -Wno-implicit-int" + CFLAGS_OPTIMIZE="-O2" + CFLAGS_WARNING="-Wall" else - CFLAGS_WARNING="" + + CFLAGS_OPTIMIZE=-O + CFLAGS_WARNING="" + fi TCL_NEEDS_EXP_FILE=0 @@ -6739,6 +6742,7 @@ fi else CFLAGS="$CFLAGS -z" + CFLAGS_WARNING="$CFLAGS_WARNING +w1 +W392000" # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" SHLIB_CFLAGS="+z" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 14db6a4..f7c2e59 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1101,10 +1101,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O AS_IF([test "$GCC" = yes], [ - CFLAGS_WARNING="-Wall -Wno-implicit-int" - ], [CFLAGS_WARNING=""]) + CFLAGS_OPTIMIZE="-O2" + CFLAGS_WARNING="-Wall" + ], [ + CFLAGS_OPTIMIZE=-O + CFLAGS_WARNING="" + ]) TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" -- cgit v0.12 From e1dd76f8cbed9c460c1787cd88d0a058a6d46c7c Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 12 Nov 2008 13:32:27 +0000 Subject: Use HKEY_CURRENT_USER instead of HKEY_CLASSES_ROOT during tests. Writing to HKCR requires administrative access on many systems but HKLM is always available to the current user --- ChangeLog | 14 +- tests/registry.test | 476 ++++++++++++++++++++++++++-------------------------- 2 files changed, 248 insertions(+), 242 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00a4b25..5ecb8b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,15 @@ +2008-11-12 Pat Thoyts + + * tests/registry.test: Use HKCU to avoid requiring admin access + for registry testing on vista/server2008 + 2008-11-11 Jan Nijtmans - * generic/tclNamesp.c: Eliminate warning: passing arg 4 of `Tcl_SplitList' - from incompatible pointer type - * win/tcl.m4: reverted change from 2008-11-06 (was under the impression - that "-Wno-implicit-int" added an extra warning) + * generic/tclNamesp.c: Eliminate warning: passing arg 4 of + `Tcl_SplitList' from incompatible pointer type + * win/tcl.m4: reverted change from 2008-11-06 (was under the + impression that "-Wno-implicit-int" added an + extra warning) * win/configure (regenerated) * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and get rid of -Wno-implicit-int for UNIX diff --git a/tests/registry.test b/tests/registry.test index bf32e68..46b49ba 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -10,7 +10,7 @@ # Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# RCS: @(#) $Id: registry.test,v 1.22 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: registry.test,v 1.23 2008/11/12 13:32:28 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -122,397 +122,397 @@ test registry-2.3 {DeleteKey: bad key} {win reg} { list [catch {registry delete HKEY_CLASSES_ROOT\\} msg] $msg } {1 {bad key: cannot delete root keys}} test registry-2.4 {DeleteKey: subkey at root level} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry keys HKEY_CLASSES_ROOT TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry keys HKEY_CURRENT_USER TclFoobar } {} test registry-2.5 {DeleteKey: subkey below root level} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\test - set result [registry keys HKEY_CLASSES_ROOT TclFoobar\\test] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test + registry delete HKEY_CURRENT_USER\\TclFoobar\\test + set result [registry keys HKEY_CURRENT_USER TclFoobar\\test] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-2.6 {DeleteKey: recursive delete} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1 - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3 - registry delete HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT TclFoobar] + registry set HKEY_CURRENT_USER\\TclFoobar\\test1 + registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 + registry delete HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER TclFoobar] set result } {} test registry-2.7 {DeleteKey: trailing backslashes} {win reg english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz - list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar\\} msg] $msg + registry set HKEY_CURRENT_USER\\TclFoobar\\baz + list [catch {registry delete HKEY_CURRENT_USER\\TclFoobar\\} msg] $msg } {1 {unable to delete key: The configuration registry key is invalid.}} test registry-2.8 {DeleteKey: failure} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar } {} test registry-2.9 {DeleteKey: unicode} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar\\a - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar\\b - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar - set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test\u00c7bar\\a + registry set HKEY_CURRENT_USER\\TclFoobar\\test\u00c7bar\\b + registry delete HKEY_CURRENT_USER\\TclFoobar\\test\u00c7bar + set result [registry keys HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-3.1 {DeleteValue} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test1 blort - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test2 blat - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\baz test1 - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar\\baz] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz test1 blort + registry set HKEY_CURRENT_USER\\TclFoobar\\baz test2 blat + registry delete HKEY_CURRENT_USER\\TclFoobar\\baz test1 + set result [registry values HKEY_CURRENT_USER\\TclFoobar\\baz] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } test2 test registry-3.2 {DeleteValue: bad key} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar test} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry delete HKEY_CURRENT_USER\\TclFoobar test} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-3.3 {DeleteValue: bad value} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test2 blort - set result [list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar test1} msg] $msg] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz test2 blort + set result [list [catch {registry delete HKEY_CURRENT_USER\\TclFoobar test1} msg] $msg] + registry delete HKEY_CURRENT_USER\\TclFoobar set result -} {1 {unable to delete value "test1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}} +} {1 {unable to delete value "test1" from key "HKEY_CURRENT_USER\TclFoobar": The system cannot find the file specified.}} test registry-3.4 {DeleteValue: Unicode} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz \u00c7test1 blort - registry set HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz test2 blat - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz \u00c7test1 - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz \u00c7test1 blort + registry set HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz test2 blat + registry delete HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz \u00c7test1 + set result [registry values HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } test2 test registry-4.1 {GetKeyNames: bad key} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry keys HKEY_CURRENT_USER\\TclFoobar} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-4.2 {GetKeyNames} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz - set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz + set result [registry keys HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {baz} test registry-4.3 {GetKeyNames: remote key} {win reg nonPortable english} { set hostname [info hostname] - registry set \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar\\baz - set result [registry keys \\\\gaspode\\HKEY_CLASSES_ROOT\\TclFoobar] - registry delete \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar + registry set \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar\\baz + set result [registry keys \\\\gaspode\\HKEY_CURRENT_USER\\TclFoobar] + registry delete \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar set result } {baz} test registry-4.4 {GetKeyNames: empty key} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-4.5 {GetKeyNames: patterns} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {baz blat} test registry-4.6 {GetKeyNames: names with spaces} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\ bar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz\ bar + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{baz bar} blat} test registry-4.7 {GetKeyNames: Unicode} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\u00c7bar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz\u00c7bar + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "baz\u00c7bar blat" test registry-4.8 {GetKeyNames: Unicode} {win reg nt} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\u30b7bar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz\u30b7bar + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "baz\u30b7bar blat" test registry-4.9 {GetKeyNames: very long key [Bug 1682211]} {*}{ -constraints {win reg} -setup { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\a - registry set HKEY_CLASSES_ROOT\\TclFoobar\\b[string repeat x 254] - registry set HKEY_CLASSES_ROOT\\TclFoobar\\c + registry set HKEY_CURRENT_USER\\TclFoobar\\a + registry set HKEY_CURRENT_USER\\TclFoobar\\b[string repeat x 254] + registry set HKEY_CURRENT_USER\\TclFoobar\\c } -body { - lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar] + lsort [registry keys HKEY_CURRENT_USER\\TclFoobar] } -cleanup { - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar }} \ -result [list a b[string repeat x 254] c] test registry-5.1 {GetType} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry type HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry type HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-5.2 {GetType} {win reg english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry type HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg -} {1 {unable to get type of value "val1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}} + registry set HKEY_CURRENT_USER\\TclFoobar + list [catch {registry type HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg +} {1 {unable to get type of value "val1" from key "HKEY_CURRENT_USER\TclFoobar": The system cannot find the file specified.}} test registry-5.3 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar none - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar none + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } none test registry-5.4 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } sz test registry-5.5 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar sz - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar sz + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } sz test registry-5.6 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar expand_sz - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar expand_sz + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } expand_sz test registry-5.7 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 binary - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 binary + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } binary test registry-5.8 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 dword - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 dword + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } dword test registry-5.9 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 dword_big_endian - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 dword_big_endian + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } dword_big_endian test registry-5.10 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 link - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 link + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } link test registry-5.11 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar multi_sz - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar multi_sz + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } multi_sz test registry-5.12 {GetType} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 resource_list - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 resource_list + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } resource_list test registry-5.13 {GetType: unknown types} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 24 - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 24 + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 24 test registry-5.14 {GetType: Unicode} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar va\u00c7l1 1 24 - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar va\u00c7l1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar va\u00c7l1 1 24 + set result [registry type HKEY_CURRENT_USER\\TclFoobar va\u00c7l1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 24 test registry-6.1 {GetValue} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry get HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry get HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-6.2 {GetValue} {win reg english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry get HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg -} {1 {unable to get value "val1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}} + registry set HKEY_CURRENT_USER\\TclFoobar + list [catch {registry get HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg +} {1 {unable to get value "val1" from key "HKEY_CURRENT_USER\TclFoobar": The system cannot find the file specified.}} test registry-6.3 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar none - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar none + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.4 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.5 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.6 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar expand_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar expand_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.7 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 binary - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 binary + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.8 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 0x20 dword - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 0x20 dword + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 32 test registry-6.9 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 0x20 dword_big_endian - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 0x20 dword_big_endian + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 32 test registry-6.10 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 link - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 link + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.11 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.12 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo\ bar baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo\ bar baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{foo bar} baz} test registry-6.13 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-6.14 {GetValue: truncation of multivalues with null elements} \ {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {a {} b} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {a {} b} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } a test registry-6.15 {GetValue} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 resource_list - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 resource_list + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.16 {GetValue: unknown types} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 24 - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 24 + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.17 {GetValue: Unicode value names} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val\u00c71 foobar multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val\u00c71] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val\u00c71 foobar multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val\u00c71] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.18 {GetValue: values with Unicode strings} {win reg nt} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u30b7r baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo ba\u30b7r baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "foo ba\u30b7r baz" test registry-6.19 {GetValue: values with Unicode strings} {win reg english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u00c7r baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo ba\u00c7r baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "foo ba\u00c7r baz" test registry-6.20 {GetValue: values with Unicode strings with embedded nulls} {win reg} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u0000r baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo ba\u0000r baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "foo ba r baz" test registry-7.1 {GetValueNames: bad key} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry values HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry values HKEY_CURRENT_USER\\TclFoobar} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-7.2 {GetValueNames} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz foobar + set result [registry values HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } baz test registry-7.3 {GetValueNames} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar1 - registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2 - registry set HKEY_CLASSES_ROOT\\TclFoobar {} foobar3 - set result [lsort [registry values HKEY_CLASSES_ROOT\\TclFoobar]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz foobar1 + registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 + registry set HKEY_CURRENT_USER\\TclFoobar {} foobar3 + set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{} baz blat} test registry-7.4 {GetValueNames: remote key} {win reg nonPortable english} { set hostname [info hostname] - registry set \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar baz blat - set result [registry values \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar] - registry delete \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar + registry set \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar baz blat + set result [registry values \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar] + registry delete \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar set result } baz test registry-7.5 {GetValueNames: empty key} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + set result [registry values HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-7.6 {GetValueNames: patterns} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar1 - registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2 - registry set HKEY_CLASSES_ROOT\\TclFoobar foo foobar3 - set result [lsort [registry values HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz foobar1 + registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 + registry set HKEY_CURRENT_USER\\TclFoobar foo foobar3 + set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {baz blat} test registry-7.7 {GetValueNames: names with spaces} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz\ bar foobar1 - registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2 - registry set HKEY_CLASSES_ROOT\\TclFoobar foo foobar3 - set result [lsort [registry values HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz\ bar foobar1 + registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 + registry set HKEY_CURRENT_USER\\TclFoobar foo foobar3 + set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{baz bar} blat} @@ -522,15 +522,15 @@ test registry-8.1 {OpenSubKey} {win reg nonPortable english} { list [catch {registry keys {\\mom\HKEY_LOCAL_MACHINE}} msg] $msg } {1 {unable to open key: Access is denied.}} test registry-8.2 {OpenSubKey} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } TclFoobar test registry-8.3 {OpenSubKey} {win reg english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry keys HKEY_CURRENT_USER\\TclFoobar} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-9.1 {ParseKeyName: bad keys} {win reg} { @@ -562,37 +562,37 @@ test registry-9.9 {ParseKeyName: null keys} {win reg english} { } {1 {unable to open key: The system cannot find the file specified.}} test registry-10.1 {RecursiveDeleteKey} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1 - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3 - registry delete HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test1 + registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 + registry delete HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER TclFoobar] set result } {} test registry-10.2 {RecursiveDeleteKey} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1 - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3 - set result [registry delete HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test4] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test1 + registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 + set result [registry delete HKEY_CURRENT_USER\\TclFoobar\\test2\\test4] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-11.1 {SetValue: recursive creation} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat foobar - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar\\baz blat] + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar + set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] } foobar test registry-11.2 {SetValue: modification} {win reg} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat foobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat frob - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar\\baz blat] + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat frob + set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] } frob test registry-11.3 {SetValue: failure} {win reg nonPortable english} { # This test will only succeed if the current user does not have registry # access on the specified machine. - list [catch {registry set {\\mom\HKEY_CLASSES_ROOT\TclFoobar} bar foobar} msg] $msg + list [catch {registry set {\\mom\HKEY_CURRENT_USER\TclFoobar} bar foobar} msg] $msg } {1 {unable to open key: Access is denied.}} test registry-12.1 {BroadcastValue} {win reg} { -- cgit v0.12 From 1dc34345abbeeb394c746abc809889b36af93584 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 13 Nov 2008 22:34:33 +0000 Subject: rename static function FSUnloadTempFile to TclFSUnloadTempFile, needed in tclLoad.c Fixed [Bug 2269431]: load of shared objects leaves temporary files on windows --- ChangeLog | 8 ++++++++ generic/tclIOUtil.c | 16 +++++----------- generic/tclInt.h | 3 ++- generic/tclLoad.c | 11 +++++++---- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ecb8b7..c4b6d82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-13 Jan Nijtmans + + * generic/tclInt.h: rename static function FSUnloadTempFile to + * generic/tclIOUtil.c TclFSUnloadTempFile, needed in tclLoad.c + + * generic/tclLoad.c Fixed [Bug 2269431]: load of shared + objects leaves temporary files on windows + 2008-11-12 Pat Thoyts * tests/registry.test: Use HKCU to avoid requiring admin access diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 077eb96..607397e 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.158 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.159 2008/11/13 22:34:33 nijtmans Exp $ */ #include "tclInt.h" @@ -192,12 +192,6 @@ TCL_DECLARE_MUTEX(cwdMutex) Tcl_ThreadDataKey tclFsDataKey; /* - * Declare fallback support function and information for Tcl_FSLoadFile - */ - -static Tcl_FSUnloadFileProc FSUnloadTempFile; - -/* * One of these structures is used each time we successfully load a file from * a file system by way of making a temporary copy of the file on the native * filesystem. We need to store both the actual unloadProc/clientData @@ -3187,7 +3181,7 @@ TclLoadFile( copyToPtr = NULL; *handlePtr = newLoadHandle; *clientDataPtr = tvdlPtr; - *unloadProcPtr = &FSUnloadTempFile; + *unloadProcPtr = TclFSUnloadTempFile; Tcl_ResetResult(interp); return retVal; @@ -3252,7 +3246,7 @@ TclpLoadFile( /* *--------------------------------------------------------------------------- * - * FSUnloadTempFile -- + * TclFSUnloadTempFile -- * * This function is called when we loaded a library of code via an * intermediate temporary file. This function ensures the library is @@ -3268,8 +3262,8 @@ TclpLoadFile( *--------------------------------------------------------------------------- */ -static void -FSUnloadTempFile( +void +TclFSUnloadTempFile( Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to * Tcl_FSLoadFile(). The loadHandle is a token * that represents the loaded file. */ diff --git a/generic/tclInt.h b/generic/tclInt.h index f0c922f..027e93e 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.405 2008/11/07 20:10:19 patthoyts Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.406 2008/11/13 22:34:33 nijtmans Exp $ */ #ifndef _TCLINT @@ -2642,6 +2642,7 @@ MODULE_SCOPE double TclFloor(mp_int *a); MODULE_SCOPE void TclFormatNaN(double value, char *buffer); MODULE_SCOPE int TclFSFileAttrIndex(Tcl_Obj *pathPtr, const char *attributeName, int *indexPtr); +MODULE_SCOPE void TclFSUnloadTempFile(Tcl_LoadHandle loadHandle); MODULE_SCOPE int * TclGetAsyncReadyPtr(void); MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp); MODULE_SCOPE int TclGetChannelFromObj(Tcl_Interp *interp, diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 36a61b0..c2a677b 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.20 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.21 2008/11/13 22:34:33 nijtmans Exp $ */ #include "tclInt.h" @@ -791,7 +791,7 @@ Tcl_UnloadObjCmd( if (unLoadProcPtr != NULL) { Tcl_MutexLock(&packageMutex); - if (pkgPtr->unloadProc != NULL) { + if ((pkgPtr->unloadProc != NULL) || (unLoadProcPtr == TclFSUnloadTempFile)) { unLoadProcPtr(pkgPtr->loadHandle); } @@ -1146,8 +1146,11 @@ TclFinalizeLoad(void) */ if (pkgPtr->fileName[0] != '\0') { - if ((pkgPtr->unLoadProcPtr != NULL) && (pkgPtr->unloadProc != NULL)) { - pkgPtr->unLoadProcPtr(pkgPtr->loadHandle); + Tcl_FSUnloadFileProc *unLoadProcPtr = pkgPtr->unLoadProcPtr; + if ((unLoadProcPtr != NULL) + && ((pkgPtr->unloadProc != NULL) + || (unLoadProcPtr == TclFSUnloadTempFile))) { + unLoadProcPtr(pkgPtr->loadHandle); } } #endif -- cgit v0.12 From b50d1b7d4bc3badecfe621f5fc464b0fd365a97c Mon Sep 17 00:00:00 2001 From: das Date: Fri, 14 Nov 2008 13:00:31 +0000 Subject: remove -Wno-implicit-int --- macosx/Tcl-Common.xcconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/Tcl-Common.xcconfig b/macosx/Tcl-Common.xcconfig index c26b991..9f7f1b4 100644 --- a/macosx/Tcl-Common.xcconfig +++ b/macosx/Tcl-Common.xcconfig @@ -9,7 +9,7 @@ // See the file "license.terms" for information on usage and redistribution // of this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.11 2008/04/01 16:23:42 dgp Exp $ +// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.12 2008/11/14 13:00:31 das Exp $ // HEADER_SEARCH_PATHS = "$(DERIVED_FILE_DIR)/tcl" $(HEADER_SEARCH_PATHS) @@ -24,7 +24,7 @@ GCC = $(DEVELOPER_DIR)/usr/bin/gcc GCC_VERSION = 4.0 CC = $(GCC)-$(GCC_VERSION) LD = $(CC) -WARNING_CFLAGS_GCC3 = -Wall -Wno-implicit-int -Wno-unused-parameter -Wno-deprecated-declarations +WARNING_CFLAGS_GCC3 = -Wall -Wno-unused-parameter -Wno-deprecated-declarations WARNING_CFLAGS = -Wextra -Wno-missing-field-initializers -Winit-self -Wpointer-arith -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS_GCC3) $(WARNING_CFLAGS) BINDIR = $(PREFIX)/bin CFLAGS = $(CFLAGS) -- cgit v0.12 From 6ff3c3c441fa2cb37d39c2f0604ffa9160e12e76 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 16 Nov 2008 17:17:44 +0000 Subject: Tidy up formatting. --- generic/tclBinary.c | 1207 +++++++++++++++++++++++++-------------------------- 1 file changed, 595 insertions(+), 612 deletions(-) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 70ed12f..18c12fa 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.50 2008/11/07 20:10:19 patthoyts Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.51 2008/11/16 17:17:44 dkf Exp $ */ #include "tclInt.h" @@ -73,20 +73,27 @@ static int NeedReversing(int format); static void CopyNumber(const void *from, void *to, unsigned length, int type); /* Binary ensemble commands */ -static int BinaryFormatCmd(ClientData clientData, Tcl_Interp *interp, +static int BinaryFormatCmd(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int BinaryScanCmd(ClientData clientData, Tcl_Interp *interp, +static int BinaryScanCmd(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* Binary encoding sub-ensemble commands */ -static int BinaryEncodeHex(ClientData clientData, Tcl_Interp *interp, +static int BinaryEncodeHex(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int BinaryDecodeHex(ClientData clientData, Tcl_Interp *interp, +static int BinaryDecodeHex(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int BinaryEncode64(ClientData clientData, Tcl_Interp *interp, +static int BinaryEncode64(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int BinaryDecodeUu(ClientData clientData, Tcl_Interp *interp, +static int BinaryDecodeUu(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int BinaryDecode64(ClientData clientData, Tcl_Interp *interp, +static int BinaryDecode64(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* @@ -178,7 +185,6 @@ typedef struct ByteArray { ((ByteArray *) (objPtr)->internalRep.otherValuePtr) #define SET_BYTEARRAY(objPtr, baPtr) \ (objPtr)->internalRep.otherValuePtr = (void *) (baPtr) - /* *---------------------------------------------------------------------- @@ -198,7 +204,6 @@ typedef struct ByteArray { *---------------------------------------------------------------------- */ -#ifdef TCL_MEM_DEBUG #undef Tcl_NewByteArrayObj Tcl_Obj * @@ -208,25 +213,16 @@ Tcl_NewByteArrayObj( int length) /* Length of the array of bytes, which must be * >= 0. */ { +#ifdef TCL_MEM_DEBUG return Tcl_DbNewByteArrayObj(bytes, length, "unknown", 0); -} - #else /* if not TCL_MEM_DEBUG */ - -Tcl_Obj * -Tcl_NewByteArrayObj( - const unsigned char *bytes, /* The array of bytes used to initialize the - * new object. */ - int length) /* Length of the array of bytes, which must be - * >= 0. */ -{ Tcl_Obj *objPtr; TclNewObj(objPtr); Tcl_SetByteArrayObj(objPtr, bytes, length); return objPtr; -} #endif /* TCL_MEM_DEBUG */ +} /* *---------------------------------------------------------------------- @@ -253,8 +249,6 @@ Tcl_NewByteArrayObj( *---------------------------------------------------------------------- */ -#ifdef TCL_MEM_DEBUG - Tcl_Obj * Tcl_DbNewByteArrayObj( const unsigned char *bytes, /* The array of bytes used to initialize the @@ -266,30 +260,17 @@ Tcl_DbNewByteArrayObj( int line) /* Line number in the source file; used for * debugging. */ { +#ifdef TCL_MEM_DEBUG Tcl_Obj *objPtr; TclDbNewObj(objPtr, file, line); Tcl_SetByteArrayObj(objPtr, bytes, length); return objPtr; -} - #else /* if not TCL_MEM_DEBUG */ - -Tcl_Obj * -Tcl_DbNewByteArrayObj( - const unsigned char *bytes, /* The array of bytes used to initialize the - * new object. */ - int length, /* Length of the array of bytes, which must be - * >= 0. */ - const char *file, /* The name of the source file calling this - * procedure; used for debugging. */ - int line) /* Line number in the source file; used for - * debugging. */ -{ return Tcl_NewByteArrayObj(bytes, length); -} #endif /* TCL_MEM_DEBUG */ - +} + /* *--------------------------------------------------------------------------- * @@ -412,8 +393,8 @@ Tcl_SetByteArrayLength( byteArrayPtr = GET_BYTEARRAY(objPtr); if (length > byteArrayPtr->allocated) { - byteArrayPtr = (ByteArray *) ckrealloc( - (char *) byteArrayPtr, BYTEARRAY_SIZE(length)); + byteArrayPtr = (ByteArray *) + ckrealloc((char *) byteArrayPtr, BYTEARRAY_SIZE(length)); byteArrayPtr->allocated = length; SET_BYTEARRAY(objPtr, byteArrayPtr); } @@ -610,7 +591,8 @@ UpdateStringOfByteArray( */ Tcl_Command -TclInitBinaryCmd(Tcl_Interp *interp) +TclInitBinaryCmd( + Tcl_Interp *interp) { const EnsembleImplMap binaryMap[] = { { "format", BinaryFormatCmd, NULL }, @@ -703,138 +685,141 @@ BinaryFormatCmd( break; } switch (cmd) { - case 'a': - case 'A': - case 'b': - case 'B': - case 'h': - case 'H': - /* - * For string-type specifiers, the count corresponds to the - * number of bytes in a single argument. - */ + case 'a': + case 'A': + case 'b': + case 'B': + case 'h': + case 'H': + /* + * For string-type specifiers, the count corresponds to the number + * of bytes in a single argument. + */ - if (arg >= objc) { - goto badIndex; - } - if (count == BINARY_ALL) { - Tcl_GetByteArrayFromObj(objv[arg], &count); - } else if (count == BINARY_NOCOUNT) { - count = 1; - } + if (arg >= objc) { + goto badIndex; + } + if (count == BINARY_ALL) { + Tcl_GetByteArrayFromObj(objv[arg], &count); + } else if (count == BINARY_NOCOUNT) { + count = 1; + } + arg++; + if (cmd == 'a' || cmd == 'A') { + offset += count; + } else if (cmd == 'b' || cmd == 'B') { + offset += (count + 7) / 8; + } else { + offset += (count + 1) / 2; + } + break; + case 'c': + size = 1; + goto doNumbers; + case 't': + case 's': + case 'S': + size = 2; + goto doNumbers; + case 'n': + case 'i': + case 'I': + size = 4; + goto doNumbers; + case 'm': + case 'w': + case 'W': + size = 8; + goto doNumbers; + case 'r': + case 'R': + case 'f': + size = sizeof(float); + goto doNumbers; + case 'q': + case 'Q': + case 'd': + size = sizeof(double); + + doNumbers: + if (arg >= objc) { + goto badIndex; + } + + /* + * For number-type specifiers, the count corresponds to the number + * of elements in the list stored in a single argument. If no + * count is specified, then the argument is taken as a single + * non-list value. + */ + + if (count == BINARY_NOCOUNT) { arg++; - if (cmd == 'a' || cmd == 'A') { - offset += count; - } else if (cmd == 'b' || cmd == 'B') { - offset += (count + 7) / 8; - } else { - offset += (count + 1) / 2; - } - break; - case 'c': - size = 1; - goto doNumbers; - case 't': - case 's': - case 'S': - size = 2; - goto doNumbers; - case 'n': - case 'i': - case 'I': - size = 4; - goto doNumbers; - case 'm': - case 'w': - case 'W': - size = 8; - goto doNumbers; - case 'r': - case 'R': - case 'f': - size = sizeof(float); - goto doNumbers; - case 'q': - case 'Q': - case 'd': - size = sizeof(double); - - doNumbers: - if (arg >= objc) { - goto badIndex; - } + count = 1; + } else { + int listc; + Tcl_Obj **listv; /* - * For number-type specifiers, the count corresponds to the - * number of elements in the list stored in a single argument. - * If no count is specified, then the argument is taken as a - * single non-list value. + * The macro evals its args more than once: avoid arg++ */ - if (count == BINARY_NOCOUNT) { - arg++; - count = 1; - } else { - int listc; - Tcl_Obj **listv; - - /* The macro evals its args more than once: avoid arg++ */ - if (TclListObjGetElements(interp, objv[arg], &listc, - &listv) != TCL_OK) { - return TCL_ERROR; - } - arg++; + if (TclListObjGetElements(interp, objv[arg], &listc, + &listv) != TCL_OK) { + return TCL_ERROR; + } + arg++; - if (count == BINARY_ALL) { - count = listc; - } else if (count > listc) { - Tcl_AppendResult(interp, + if (count == BINARY_ALL) { + count = listc; + } else if (count > listc) { + Tcl_AppendResult(interp, "number of elements in list does not match count", NULL); - return TCL_ERROR; - } + return TCL_ERROR; } - offset += count*size; - break; + } + offset += count*size; + break; - case 'x': - if (count == BINARY_ALL) { - Tcl_AppendResult(interp, + case 'x': + if (count == BINARY_ALL) { + Tcl_AppendResult(interp, "cannot use \"*\" in format string with \"x\"", NULL); - return TCL_ERROR; - } else if (count == BINARY_NOCOUNT) { - count = 1; - } - offset += count; - break; - case 'X': - if (count == BINARY_NOCOUNT) { - count = 1; - } - if ((count > offset) || (count == BINARY_ALL)) { - count = offset; - } - if (offset > length) { - length = offset; - } - offset -= count; - break; - case '@': - if (offset > length) { - length = offset; - } - if (count == BINARY_ALL) { - offset = length; - } else if (count == BINARY_NOCOUNT) { - goto badCount; - } else { - offset = count; - } - break; - default: - errorString = str; - goto badField; + return TCL_ERROR; + } else if (count == BINARY_NOCOUNT) { + count = 1; + } + offset += count; + break; + case 'X': + if (count == BINARY_NOCOUNT) { + count = 1; + } + if ((count > offset) || (count == BINARY_ALL)) { + count = offset; + } + if (offset > length) { + length = offset; + } + offset -= count; + break; + case '@': + if (offset > length) { + length = offset; + } + if (count == BINARY_ALL) { + offset = length; + } else if (count == BINARY_NOCOUNT) { + goto badCount; + } else { + offset = count; + } + break; + default: + errorString = str; + goto badField; } } if (offset > length) { @@ -875,238 +860,237 @@ BinaryFormatCmd( continue; } switch (cmd) { - case 'a': - case 'A': { - char pad = (char) (cmd == 'a' ? '\0' : ' '); - unsigned char *bytes; + case 'a': + case 'A': { + char pad = (char) (cmd == 'a' ? '\0' : ' '); + unsigned char *bytes; - bytes = Tcl_GetByteArrayFromObj(objv[arg++], &length); + bytes = Tcl_GetByteArrayFromObj(objv[arg++], &length); - if (count == BINARY_ALL) { - count = length; - } else if (count == BINARY_NOCOUNT) { - count = 1; - } - if (length >= count) { - memcpy(cursor, bytes, (size_t) count); - } else { - memcpy(cursor, bytes, (size_t) length); - memset(cursor + length, pad, (size_t) (count - length)); - } - cursor += count; - break; + if (count == BINARY_ALL) { + count = length; + } else if (count == BINARY_NOCOUNT) { + count = 1; } - case 'b': - case 'B': { - unsigned char *last; - - str = TclGetStringFromObj(objv[arg], &length); - arg++; - if (count == BINARY_ALL) { - count = length; - } else if (count == BINARY_NOCOUNT) { - count = 1; - } - last = cursor + ((count + 7) / 8); - if (count > length) { - count = length; - } - value = 0; - errorString = "binary"; - if (cmd == 'B') { - for (offset = 0; offset < count; offset++) { - value <<= 1; - if (str[offset] == '1') { - value |= 1; - } else if (str[offset] != '0') { - errorValue = str; - Tcl_DecrRefCount(resultPtr); - goto badValue; - } - if (((offset + 1) % 8) == 0) { - *cursor++ = UCHAR(value); - value = 0; - } + if (length >= count) { + memcpy(cursor, bytes, (size_t) count); + } else { + memcpy(cursor, bytes, (size_t) length); + memset(cursor + length, pad, (size_t) (count - length)); + } + cursor += count; + break; + } + case 'b': + case 'B': { + unsigned char *last; + + str = TclGetStringFromObj(objv[arg], &length); + arg++; + if (count == BINARY_ALL) { + count = length; + } else if (count == BINARY_NOCOUNT) { + count = 1; + } + last = cursor + ((count + 7) / 8); + if (count > length) { + count = length; + } + value = 0; + errorString = "binary"; + if (cmd == 'B') { + for (offset = 0; offset < count; offset++) { + value <<= 1; + if (str[offset] == '1') { + value |= 1; + } else if (str[offset] != '0') { + errorValue = str; + Tcl_DecrRefCount(resultPtr); + goto badValue; } - } else { - for (offset = 0; offset < count; offset++) { - value >>= 1; - if (str[offset] == '1') { - value |= 128; - } else if (str[offset] != '0') { - errorValue = str; - Tcl_DecrRefCount(resultPtr); - goto badValue; - } - if (!((offset + 1) % 8)) { - *cursor++ = UCHAR(value); - value = 0; - } + if (((offset + 1) % 8) == 0) { + *cursor++ = UCHAR(value); + value = 0; } } - if ((offset % 8) != 0) { - if (cmd == 'B') { - value <<= 8 - (offset % 8); - } else { - value >>= 8 - (offset % 8); + } else { + for (offset = 0; offset < count; offset++) { + value >>= 1; + if (str[offset] == '1') { + value |= 128; + } else if (str[offset] != '0') { + errorValue = str; + Tcl_DecrRefCount(resultPtr); + goto badValue; + } + if (!((offset + 1) % 8)) { + *cursor++ = UCHAR(value); + value = 0; } - *cursor++ = UCHAR(value); - } - while (cursor < last) { - *cursor++ = '\0'; } - break; } - case 'h': - case 'H': { - unsigned char *last; - int c; - - str = TclGetStringFromObj(objv[arg], &length); - arg++; - if (count == BINARY_ALL) { - count = length; - } else if (count == BINARY_NOCOUNT) { - count = 1; - } - last = cursor + ((count + 1) / 2); - if (count > length) { - count = length; + if ((offset % 8) != 0) { + if (cmd == 'B') { + value <<= 8 - (offset % 8); + } else { + value >>= 8 - (offset % 8); } - value = 0; - errorString = "hexadecimal"; - if (cmd == 'H') { - for (offset = 0; offset < count; offset++) { - value <<= 4; - if (!isxdigit(UCHAR(str[offset]))) { /* INTL: digit */ - errorValue = str; - Tcl_DecrRefCount(resultPtr); - goto badValue; - } - c = str[offset] - '0'; - if (c > 9) { - c += ('0' - 'A') + 10; - } - if (c > 16) { - c += ('A' - 'a'); - } - value |= (c & 0xf); - if (offset % 2) { - *cursor++ = (char) value; - value = 0; - } + *cursor++ = UCHAR(value); + } + while (cursor < last) { + *cursor++ = '\0'; + } + break; + } + case 'h': + case 'H': { + unsigned char *last; + int c; + + str = TclGetStringFromObj(objv[arg], &length); + arg++; + if (count == BINARY_ALL) { + count = length; + } else if (count == BINARY_NOCOUNT) { + count = 1; + } + last = cursor + ((count + 1) / 2); + if (count > length) { + count = length; + } + value = 0; + errorString = "hexadecimal"; + if (cmd == 'H') { + for (offset = 0; offset < count; offset++) { + value <<= 4; + if (!isxdigit(UCHAR(str[offset]))) { /* INTL: digit */ + errorValue = str; + Tcl_DecrRefCount(resultPtr); + goto badValue; } - } else { - for (offset = 0; offset < count; offset++) { - value >>= 4; - - if (!isxdigit(UCHAR(str[offset]))) { /* INTL: digit */ - errorValue = str; - Tcl_DecrRefCount(resultPtr); - goto badValue; - } - c = str[offset] - '0'; - if (c > 9) { - c += ('0' - 'A') + 10; - } - if (c > 16) { - c += ('A' - 'a'); - } - value |= ((c << 4) & 0xf0); - if (offset % 2) { - *cursor++ = UCHAR(value & 0xff); - value = 0; - } + c = str[offset] - '0'; + if (c > 9) { + c += ('0' - 'A') + 10; } - } - if (offset % 2) { - if (cmd == 'H') { - value <<= 4; - } else { - value >>= 4; + if (c > 16) { + c += ('A' - 'a'); } - *cursor++ = UCHAR(value); - } - - while (cursor < last) { - *cursor++ = '\0'; - } - break; - } - case 'c': - case 't': - case 's': - case 'S': - case 'n': - case 'i': - case 'I': - case 'm': - case 'w': - case 'W': - case 'r': - case 'R': - case 'd': - case 'q': - case 'Q': - case 'f': { - int listc, i; - Tcl_Obj **listv; - - if (count == BINARY_NOCOUNT) { - /* - * Note that we are casting away the const-ness of objv, - * but this is safe since we aren't going to modify the - * array. - */ - - listv = (Tcl_Obj**)(objv + arg); - listc = 1; - count = 1; - } else { - TclListObjGetElements(interp, objv[arg], &listc, &listv); - if (count == BINARY_ALL) { - count = listc; + value |= (c & 0xf); + if (offset % 2) { + *cursor++ = (char) value; + value = 0; } } - arg++; - for (i = 0; i < count; i++) { - if (FormatNumber(interp, cmd, listv[i], &cursor)!=TCL_OK) { + } else { + for (offset = 0; offset < count; offset++) { + value >>= 4; + + if (!isxdigit(UCHAR(str[offset]))) { /* INTL: digit */ + errorValue = str; Tcl_DecrRefCount(resultPtr); - return TCL_ERROR; + goto badValue; + } + c = str[offset] - '0'; + if (c > 9) { + c += ('0' - 'A') + 10; + } + if (c > 16) { + c += ('A' - 'a'); + } + value |= ((c << 4) & 0xf0); + if (offset % 2) { + *cursor++ = UCHAR(value & 0xff); + value = 0; } } - break; } - case 'x': - if (count == BINARY_NOCOUNT) { - count = 1; - } - memset(cursor, 0, (size_t) count); - cursor += count; - break; - case 'X': - if (cursor > maxPos) { - maxPos = cursor; - } - if (count == BINARY_NOCOUNT) { - count = 1; - } - if ((count == BINARY_ALL) || (count > (cursor - buffer))) { - cursor = buffer; + if (offset % 2) { + if (cmd == 'H') { + value <<= 4; } else { - cursor -= count; - } - break; - case '@': - if (cursor > maxPos) { - maxPos = cursor; + value >>= 4; } + *cursor++ = UCHAR(value); + } + + while (cursor < last) { + *cursor++ = '\0'; + } + break; + } + case 'c': + case 't': + case 's': + case 'S': + case 'n': + case 'i': + case 'I': + case 'm': + case 'w': + case 'W': + case 'r': + case 'R': + case 'd': + case 'q': + case 'Q': + case 'f': { + int listc, i; + Tcl_Obj **listv; + + if (count == BINARY_NOCOUNT) { + /* + * Note that we are casting away the const-ness of objv, but + * this is safe since we aren't going to modify the array. + */ + + listv = (Tcl_Obj**)(objv + arg); + listc = 1; + count = 1; + } else { + TclListObjGetElements(interp, objv[arg], &listc, &listv); if (count == BINARY_ALL) { - cursor = maxPos; - } else { - cursor = buffer + count; + count = listc; } - break; + } + arg++; + for (i = 0; i < count; i++) { + if (FormatNumber(interp, cmd, listv[i], &cursor)!=TCL_OK) { + Tcl_DecrRefCount(resultPtr); + return TCL_ERROR; + } + } + break; + } + case 'x': + if (count == BINARY_NOCOUNT) { + count = 1; + } + memset(cursor, 0, (size_t) count); + cursor += count; + break; + case 'X': + if (cursor > maxPos) { + maxPos = cursor; + } + if (count == BINARY_NOCOUNT) { + count = 1; + } + if ((count == BINARY_ALL) || (count > (cursor - buffer))) { + cursor = buffer; + } else { + cursor -= count; + } + break; + case '@': + if (cursor > maxPos) { + maxPos = cursor; + } + if (count == BINARY_ALL) { + cursor = maxPos; + } else { + cursor = buffer + count; + } + break; } } Tcl_SetObjResult(interp, resultPtr); @@ -1188,7 +1172,7 @@ BinaryScanCmd( if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, - "value formatString ?varName ...?"); + "value formatString ?varName ...?"); return TCL_ERROR; } numberCachePtr = &numberCacheHash; @@ -1205,279 +1189,278 @@ BinaryScanCmd( goto done; } switch (cmd) { - case 'a': - case 'A': { - unsigned char *src; + case 'a': + case 'A': { + unsigned char *src; - if (arg >= objc) { - DeleteScanNumberCache(numberCachePtr); - goto badIndex; + if (arg >= objc) { + DeleteScanNumberCache(numberCachePtr); + goto badIndex; + } + if (count == BINARY_ALL) { + count = length - offset; + } else { + if (count == BINARY_NOCOUNT) { + count = 1; } - if (count == BINARY_ALL) { - count = length - offset; - } else { - if (count == BINARY_NOCOUNT) { - count = 1; - } - if (count > (length - offset)) { - goto done; - } + if (count > (length - offset)) { + goto done; } + } - src = buffer + offset; - size = count; + src = buffer + offset; + size = count; - /* - * Trim trailing nulls and spaces, if necessary. - */ + /* + * Trim trailing nulls and spaces, if necessary. + */ - if (cmd == 'A') { - while (size > 0) { - if (src[size-1] != '\0' && src[size-1] != ' ') { - break; - } - size--; + if (cmd == 'A') { + while (size > 0) { + if (src[size-1] != '\0' && src[size-1] != ' ') { + break; } + size--; } + } - /* - * Have to do this #ifdef-fery because (as part of defining - * Tcl_NewByteArrayObj) we removed the #def that hides this - * stuff normally. If this code ever gets copied to another - * file, it should be changed back to the simpler version. - */ + /* + * Have to do this #ifdef-fery because (as part of defining + * Tcl_NewByteArrayObj) we removed the #def that hides this stuff + * normally. If this code ever gets copied to another file, it + * should be changed back to the simpler version. + */ #ifdef TCL_MEM_DEBUG - valuePtr = Tcl_DbNewByteArrayObj(src, size, __FILE__,__LINE__); + valuePtr = Tcl_DbNewByteArrayObj(src, size, __FILE__, __LINE__); #else - valuePtr = Tcl_NewByteArrayObj(src, size); + valuePtr = Tcl_NewByteArrayObj(src, size); #endif /* TCL_MEM_DEBUG */ - resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, - TCL_LEAVE_ERR_MSG); - arg++; - if (resultPtr == NULL) { - DeleteScanNumberCache(numberCachePtr); - return TCL_ERROR; - } - offset += count; - break; + resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, + TCL_LEAVE_ERR_MSG); + arg++; + if (resultPtr == NULL) { + DeleteScanNumberCache(numberCachePtr); + return TCL_ERROR; } - case 'b': - case 'B': { - unsigned char *src; - char *dest; + offset += count; + break; + } + case 'b': + case 'B': { + unsigned char *src; + char *dest; - if (arg >= objc) { - DeleteScanNumberCache(numberCachePtr); - goto badIndex; - } - if (count == BINARY_ALL) { - count = (length - offset) * 8; - } else { - if (count == BINARY_NOCOUNT) { - count = 1; - } - if (count > (length - offset) * 8) { - goto done; - } + if (arg >= objc) { + DeleteScanNumberCache(numberCachePtr); + goto badIndex; + } + if (count == BINARY_ALL) { + count = (length - offset) * 8; + } else { + if (count == BINARY_NOCOUNT) { + count = 1; } - src = buffer + offset; - valuePtr = Tcl_NewObj(); - Tcl_SetObjLength(valuePtr, count); - dest = TclGetString(valuePtr); - - if (cmd == 'b') { - for (i = 0; i < count; i++) { - if (i % 8) { - value >>= 1; - } else { - value = *src++; - } - *dest++ = (char) ((value & 1) ? '1' : '0'); - } - } else { - for (i = 0; i < count; i++) { - if (i % 8) { - value <<= 1; - } else { - value = *src++; - } - *dest++ = (char) ((value & 0x80) ? '1' : '0'); - } + if (count > (length - offset) * 8) { + goto done; } + } + src = buffer + offset; + valuePtr = Tcl_NewObj(); + Tcl_SetObjLength(valuePtr, count); + dest = TclGetString(valuePtr); - resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, - TCL_LEAVE_ERR_MSG); - arg++; - if (resultPtr == NULL) { - DeleteScanNumberCache(numberCachePtr); - return TCL_ERROR; - } - offset += (count + 7) / 8; - break; - } - case 'h': - case 'H': { - char *dest; - unsigned char *src; - int i; - static const char hexdigit[] = "0123456789abcdef"; - - if (arg >= objc) { - DeleteScanNumberCache(numberCachePtr); - goto badIndex; - } - if (count == BINARY_ALL) { - count = (length - offset)*2; - } else { - if (count == BINARY_NOCOUNT) { - count = 1; - } - if (count > (length - offset)*2) { - goto done; + if (cmd == 'b') { + for (i = 0; i < count; i++) { + if (i % 8) { + value >>= 1; + } else { + value = *src++; } + *dest++ = (char) ((value & 1) ? '1' : '0'); } - src = buffer + offset; - valuePtr = Tcl_NewObj(); - Tcl_SetObjLength(valuePtr, count); - dest = TclGetString(valuePtr); - - if (cmd == 'h') { - for (i = 0; i < count; i++) { - if (i % 2) { - value >>= 4; - } else { - value = *src++; - } - *dest++ = hexdigit[value & 0xf]; - } - } else { - for (i = 0; i < count; i++) { - if (i % 2) { - value <<= 4; - } else { - value = *src++; - } - *dest++ = hexdigit[(value >> 4) & 0xf]; + } else { + for (i = 0; i < count; i++) { + if (i % 8) { + value <<= 1; + } else { + value = *src++; } + *dest++ = (char) ((value & 0x80) ? '1' : '0'); } + } - resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, - TCL_LEAVE_ERR_MSG); - arg++; - if (resultPtr == NULL) { - DeleteScanNumberCache(numberCachePtr); - return TCL_ERROR; + resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, + TCL_LEAVE_ERR_MSG); + arg++; + if (resultPtr == NULL) { + DeleteScanNumberCache(numberCachePtr); + return TCL_ERROR; + } + offset += (count + 7) / 8; + break; + } + case 'h': + case 'H': { + char *dest; + unsigned char *src; + int i; + static const char hexdigit[] = "0123456789abcdef"; + + if (arg >= objc) { + DeleteScanNumberCache(numberCachePtr); + goto badIndex; + } + if (count == BINARY_ALL) { + count = (length - offset)*2; + } else { + if (count == BINARY_NOCOUNT) { + count = 1; } - offset += (count + 1) / 2; - break; - } - case 'c': - size = 1; - goto scanNumber; - case 't': - case 's': - case 'S': - size = 2; - goto scanNumber; - case 'n': - case 'i': - case 'I': - size = 4; - goto scanNumber; - case 'm': - case 'w': - case 'W': - size = 8; - goto scanNumber; - case 'r': - case 'R': - case 'f': - size = sizeof(float); - goto scanNumber; - case 'q': - case 'Q': - case 'd': { - unsigned char *src; - - size = sizeof(double); - /* fall through */ - - scanNumber: - if (arg >= objc) { - DeleteScanNumberCache(numberCachePtr); - goto badIndex; + if (count > (length - offset)*2) { + goto done; } - if (count == BINARY_NOCOUNT) { - if ((length - offset) < size) { - goto done; - } - valuePtr = ScanNumber(buffer+offset, cmd, flags, - &numberCachePtr); - offset += size; - } else { - if (count == BINARY_ALL) { - count = (length - offset) / size; - } - if ((length - offset) < (count * size)) { - goto done; + } + src = buffer + offset; + valuePtr = Tcl_NewObj(); + Tcl_SetObjLength(valuePtr, count); + dest = TclGetString(valuePtr); + + if (cmd == 'h') { + for (i = 0; i < count; i++) { + if (i % 2) { + value >>= 4; + } else { + value = *src++; } - valuePtr = Tcl_NewObj(); - src = buffer+offset; - for (i = 0; i < count; i++) { - elementPtr = ScanNumber(src, cmd, flags, - &numberCachePtr); - src += size; - Tcl_ListObjAppendElement(NULL, valuePtr, elementPtr); + *dest++ = hexdigit[value & 0xf]; + } + } else { + for (i = 0; i < count; i++) { + if (i % 2) { + value <<= 4; + } else { + value = *src++; } - offset += count*size; + *dest++ = hexdigit[(value >> 4) & 0xf]; } + } - resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, - TCL_LEAVE_ERR_MSG); - arg++; - if (resultPtr == NULL) { - DeleteScanNumberCache(numberCachePtr); - return TCL_ERROR; - } - break; + resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, + TCL_LEAVE_ERR_MSG); + arg++; + if (resultPtr == NULL) { + DeleteScanNumberCache(numberCachePtr); + return TCL_ERROR; } - case 'x': - if (count == BINARY_NOCOUNT) { - count = 1; - } - if ((count == BINARY_ALL) || (count > (length - offset))) { - offset = length; - } else { - offset += count; - } - break; - case 'X': - if (count == BINARY_NOCOUNT) { - count = 1; + offset += (count + 1) / 2; + break; + } + case 'c': + size = 1; + goto scanNumber; + case 't': + case 's': + case 'S': + size = 2; + goto scanNumber; + case 'n': + case 'i': + case 'I': + size = 4; + goto scanNumber; + case 'm': + case 'w': + case 'W': + size = 8; + goto scanNumber; + case 'r': + case 'R': + case 'f': + size = sizeof(float); + goto scanNumber; + case 'q': + case 'Q': + case 'd': { + unsigned char *src; + + size = sizeof(double); + /* fall through */ + + scanNumber: + if (arg >= objc) { + DeleteScanNumberCache(numberCachePtr); + goto badIndex; + } + if (count == BINARY_NOCOUNT) { + if ((length - offset) < size) { + goto done; } - if ((count == BINARY_ALL) || (count > offset)) { - offset = 0; - } else { - offset -= count; + valuePtr = ScanNumber(buffer+offset, cmd, flags, + &numberCachePtr); + offset += size; + } else { + if (count == BINARY_ALL) { + count = (length - offset) / size; } - break; - case '@': - if (count == BINARY_NOCOUNT) { - DeleteScanNumberCache(numberCachePtr); - goto badCount; + if ((length - offset) < (count * size)) { + goto done; } - if ((count == BINARY_ALL) || (count > length)) { - offset = length; - } else { - offset = count; + valuePtr = Tcl_NewObj(); + src = buffer + offset; + for (i = 0; i < count; i++) { + elementPtr = ScanNumber(src, cmd, flags, &numberCachePtr); + src += size; + Tcl_ListObjAppendElement(NULL, valuePtr, elementPtr); } - break; - default: + offset += count * size; + } + + resultPtr = Tcl_ObjSetVar2(interp, objv[arg], NULL, valuePtr, + TCL_LEAVE_ERR_MSG); + arg++; + if (resultPtr == NULL) { DeleteScanNumberCache(numberCachePtr); - errorString = str; - goto badField; + return TCL_ERROR; + } + break; + } + case 'x': + if (count == BINARY_NOCOUNT) { + count = 1; + } + if ((count == BINARY_ALL) || (count > (length - offset))) { + offset = length; + } else { + offset += count; + } + break; + case 'X': + if (count == BINARY_NOCOUNT) { + count = 1; + } + if ((count == BINARY_ALL) || (count > offset)) { + offset = 0; + } else { + offset -= count; + } + break; + case '@': + if (count == BINARY_NOCOUNT) { + DeleteScanNumberCache(numberCachePtr); + goto badCount; + } + if ((count == BINARY_ALL) || (count > length)) { + offset = length; + } else { + offset = count; + } + break; + default: + DeleteScanNumberCache(numberCachePtr); + errorString = str; + goto badField; } } @@ -1567,15 +1550,15 @@ GetFormatSpec( (*formatPtr)++; if (**formatPtr == 'u') { (*formatPtr)++; - (*flagsPtr) |= BINARY_UNSIGNED; + *flagsPtr |= BINARY_UNSIGNED; } if (**formatPtr == '*') { (*formatPtr)++; - (*countPtr) = BINARY_ALL; + *countPtr = BINARY_ALL; } else if (isdigit(UCHAR(**formatPtr))) { /* INTL: digit */ - (*countPtr) = strtoul(*formatPtr, formatPtr, 10); + *countPtr = strtoul(*formatPtr, formatPtr, 10); } else { - (*countPtr) = BINARY_NOCOUNT; + *countPtr = BINARY_NOCOUNT; } return 1; } -- cgit v0.12 From 97cffdf748033bc48656674844a82e30d9aae794 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 16 Nov 2008 22:22:11 +0000 Subject: change two Tcl_SetResult calls to Tcl_SetObjResult, as simplification for the TIP #340 patch. --- ChangeLog | 6 ++++++ generic/tclTest.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4b6d82..dea3c40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-16 Jan Nijtmans + + * generic/tclTest.c: replace two times Tcl_SetResult with + Tcl_SetObjResult, a little simplification + in preparation for the TIP #340 patch. + 2008-11-13 Jan Nijtmans * generic/tclInt.h: rename static function FSUnloadTempFile to diff --git a/generic/tclTest.c b/generic/tclTest.c index d8c00b6..515d922 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.129 2008/10/17 16:32:58 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.130 2008/11/16 22:22:11 nijtmans Exp $ */ #define TCL_TEST @@ -5891,7 +5891,7 @@ TestFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - char *msg; + const char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -5907,7 +5907,7 @@ TestFilesystemObjCmd( res = Tcl_FSUnregister(&testReportingFilesystem); msg = (res == TCL_OK) ? "unregistered" : "failed"; } - Tcl_SetResult(interp, msg, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(msg , -1)); return res; } @@ -6263,7 +6263,7 @@ TestSimpleFilesystemObjCmd( Tcl_Obj *const objv[]) { int res, boolVal; - char *msg; + const char *msg; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "boolean"); @@ -6279,7 +6279,7 @@ TestSimpleFilesystemObjCmd( res = Tcl_FSUnregister(&simpleFilesystem); msg = (res == TCL_OK) ? "unregistered" : "failed"; } - Tcl_SetResult(interp, msg, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(msg , -1)); return res; } -- cgit v0.12 From 984e58b8dfc72a94b8827802e7234f66ce8aa7e4 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 17 Nov 2008 08:11:45 +0000 Subject: Check for uncompiled-for-continue [Bug 2186888] fixed earlier. --- ChangeLog | 5 +++++ tests/for.test | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dea3c40..81ce5f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-17 Alexandre Ferrieux + + * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] + fixed earlier. + 2008-11-16 Jan Nijtmans * generic/tclTest.c: replace two times Tcl_SetResult with diff --git a/tests/for.test b/tests/for.test index 8665df6..04aed84 100644 --- a/tests/for.test +++ b/tests/for.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: for.test,v 1.16 2006/10/09 19:15:44 msofer Exp $ +# RCS: @(#) $Id: for.test,v 1.17 2008/11/17 08:11:45 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -199,6 +199,19 @@ test for-2.6 {continue tests, long command body} { } set a } {1 3} +test for-2.7 {continue tests, uncompiled [for]} -body { + set file [makeFile { + set guard 0 + for {set i 20} {$i > 0} {incr i -1} { + if {[incr guard]>30} {return BAD} + continue + } + return GOOD + } source.file] + source $file +} -cleanup { + removeFile source.file +} -result GOOD # Check "for" and "break". -- cgit v0.12 From db2e6bf825388498ab5798bbeca26fce23d4286f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 17 Nov 2008 22:15:34 +0000 Subject: Fix signature and implementation of Tcl_HashStats, such that it conforms to the documentation. --- ChangeLog | 9 +++++++++ doc/Hash.3 | 4 ++-- generic/tcl.decls | 4 ++-- generic/tclDecls.h | 6 +++--- generic/tclDictObj.c | 11 +++++------ generic/tclHash.c | 10 +++------- generic/tclVar.c | 4 ++-- 7 files changed, 26 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81ce5f8..3f01f47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-11-16 Jan Nijtmans + + * generic/tcl.decls: Fix signature and implementation of + * generic/tclDecls.h: Tcl_HashStats, such that it conforms + * generic/tclHash.c: to the documentation. + * generic/tclVar.c: + * doc/Hash.3 + * generic/tclDictObj.c Convert Tcl_SetResult call to Tcl_SetObjResult. + 2008-11-17 Alexandre Ferrieux * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] diff --git a/doc/Hash.3 b/doc/Hash.3 index 6e57cf3..f2e5228 100644 --- a/doc/Hash.3 +++ b/doc/Hash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Hash.3,v 1.30 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: Hash.3,v 1.31 2008/11/17 22:15:34 nijtmans Exp $ '\" .so man.macros .TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures" @@ -46,7 +46,7 @@ Tcl_HashEntry * Tcl_HashEntry * \fBTcl_NextHashEntry\fR(\fIsearchPtr\fR) .sp -const char * +char * \fBTcl_HashStats\fR(\fItablePtr\fR) .SH ARGUMENTS .AS "const Tcl_HashKeyType" *searchPtr out diff --git a/generic/tcl.decls b/generic/tcl.decls index 53604a6..715c2ad 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.153 2008/10/22 20:23:59 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.154 2008/11/17 22:15:34 nijtmans Exp $ library tcl @@ -953,7 +953,7 @@ declare 268 generic { void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList) } declare 269 generic { - CONST84_RETURN char * Tcl_HashStats(Tcl_HashTable *tablePtr) + char * Tcl_HashStats(Tcl_HashTable *tablePtr) } declare 270 generic { CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, const char *start, diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 784f1ca..2578df2 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.155 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.156 2008/11/17 22:15:34 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -1692,7 +1692,7 @@ EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, #ifndef Tcl_HashStats_TCL_DECLARED #define Tcl_HashStats_TCL_DECLARED /* 269 */ -EXTERN CONST84_RETURN char * Tcl_HashStats (Tcl_HashTable * tablePtr); +EXTERN char * Tcl_HashStats (Tcl_HashTable * tablePtr); #endif #ifndef Tcl_ParseVar_TCL_DECLARED #define Tcl_ParseVar_TCL_DECLARED @@ -3985,7 +3985,7 @@ typedef struct TclStubs { void (*tcl_ValidateAllMemory) (const char * file, int line); /* 266 */ void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ - CONST84_RETURN char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ + char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, const char * start, CONST84 char ** termPtr); /* 270 */ CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 271 */ CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 272 */ diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 2b87c01..75e1478 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.69 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.70 2008/11/17 22:15:34 nijtmans Exp $ */ #include "tclInt.h" @@ -2061,6 +2061,7 @@ DictInfoCmd( { Tcl_Obj *dictPtr; Dict *dict; + char *buf; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary"); @@ -2076,11 +2077,9 @@ DictInfoCmd( } dict = dictPtr->internalRep.otherValuePtr; - /* - * This next cast is actually OK. - */ - - Tcl_SetResult(interp, (char *) Tcl_HashStats(&dict->table), TCL_DYNAMIC); + buf = Tcl_HashStats(&dict->table); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); + ckfree(buf); return TCL_OK; } diff --git a/generic/tclHash.c b/generic/tclHash.c index dd995f0..89fbb6f 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.36 2008/10/15 06:17:03 nijtmans Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.37 2008/11/17 22:15:34 nijtmans Exp $ */ #include "tclInt.h" @@ -614,7 +614,7 @@ Tcl_NextHashEntry( *---------------------------------------------------------------------- */ -const char * +char * Tcl_HashStats( Tcl_HashTable *tablePtr) /* Table for which to produce stats. */ { @@ -665,11 +665,7 @@ Tcl_HashStats( * Print out the histogram and a few other pieces of information. */ - if (typePtr->flags & TCL_HASH_KEY_SYSTEM_HASH) { - result = (char *) TclpSysAlloc((unsigned) (NUM_COUNTERS*60) + 300, 0); - } else { - result = (char *) ckalloc((unsigned) (NUM_COUNTERS*60) + 300); - } + result = (char *) ckalloc((unsigned) (NUM_COUNTERS*60) + 300); sprintf(result, "%d entries in table, %d buckets\n", tablePtr->numEntries, tablePtr->numBuckets); p = result + strlen(result); diff --git a/generic/tclVar.c b/generic/tclVar.c index dc35f69..34d3741 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.171 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.172 2008/11/17 22:15:34 nijtmans Exp $ */ #include "tclInt.h" @@ -3214,7 +3214,7 @@ Tcl_ArrayObjCmd( } case ARRAY_STATISTICS: { - const char *stats; + char *stats; if (notArray) { goto error; -- cgit v0.12 From dee5b7a791b4b64cdfe7ae6c9981aff8d85848d5 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 17 Nov 2008 22:26:53 +0000 Subject: Fix [Bug 2251175]: missing backslash substitution on expanded literals. --- ChangeLog | 6 ++++++ generic/tcl.h | 3 ++- generic/tclCompCmds.c | 8 +++---- generic/tclCompile.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++----- generic/tclParse.c | 39 +++++++++++++++++++++++++++++++--- generic/tclTest.c | 5 ++++- 6 files changed, 106 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f01f47..13cc2a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,12 @@ * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] fixed earlier. + * generic/tcl.h: Fix [Bug 2251175]: missing backslash + * generic/tclCompCmds.c substitution on expanded literals. + * generic/tclCompile.c + * generic/tclParse.c + * generic/tclTest.c + 2008-11-16 Jan Nijtmans * generic/tclTest.c: replace two times Tcl_SetResult with diff --git a/generic/tcl.h b/generic/tcl.h index b418aa7..e20964c 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.277 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.278 2008/11/17 22:26:53 ferrieux Exp $ */ #ifndef _TCL @@ -2004,6 +2004,7 @@ typedef struct Tcl_Token { #define TCL_TOKEN_SUB_EXPR 64 #define TCL_TOKEN_OPERATOR 128 #define TCL_TOKEN_EXPAND_WORD 256 +#define TCL_TOKEN_UNCOLLAPSED_TEXT 512 /* * Parsing error types. On any parsing error, one of these values will be diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 4f7f230..e36d546 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.148 2008/10/05 20:47:52 nijtmans Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.149 2008/11/17 22:26:53 ferrieux Exp $ */ #include "tclInt.h" @@ -4438,7 +4438,7 @@ TclCompileSwitchCmd( * Keep in sync with TclCompileRegexpCmd. */ - if (bodyToken[i]->type == TCL_TOKEN_TEXT) { + if (bodyToken[i]->type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT)) { Tcl_DString ds; if (bodyToken[i]->size == 0) { @@ -4983,8 +4983,8 @@ PushVarName( } } } else if (((n = varTokenPtr->numComponents) > 1) - && (varTokenPtr[1].type == TCL_TOKEN_TEXT) - && (varTokenPtr[n].type == TCL_TOKEN_TEXT) + && (varTokenPtr[1].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT)) + && (varTokenPtr[n].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT)) && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) { /* diff --git a/generic/tclCompile.c b/generic/tclCompile.c index adaa38b..fe282d4 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.160 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.161 2008/11/17 22:26:53 ferrieux Exp $ */ #include "tclInt.h" @@ -1077,6 +1077,7 @@ TclWordKnownAtCompileTime( { int numComponents = tokenPtr->numComponents; Tcl_Obj *tempPtr = NULL; + char *collapsed=NULL; if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { if (valuePtr != NULL) { @@ -1100,6 +1101,17 @@ TclWordKnownAtCompileTime( } break; + case TCL_TOKEN_UNCOLLAPSED_TEXT: + if (tempPtr != NULL) { + if (collapsed) + collapsed=ckrealloc(collapsed,tokenPtr->size); + else + collapsed=ckalloc(tokenPtr->size); + Tcl_AppendToObj(tempPtr, collapsed, TclCopyAndCollapse(tokenPtr->size,tokenPtr->start,collapsed)); + } + break; + + case TCL_TOKEN_BS: if (tempPtr != NULL) { char utfBuf[TCL_UTF_MAX]; @@ -1110,12 +1122,14 @@ TclWordKnownAtCompileTime( default: if (tempPtr != NULL) { + if (collapsed) ckfree(collapsed); Tcl_DecrRefCount(tempPtr); } return 0; } tokenPtr++; } + if (collapsed) ckfree(collapsed); if (valuePtr != NULL) { Tcl_AppendObjToObj(valuePtr, tempPtr); Tcl_DecrRefCount(tempPtr); @@ -1447,8 +1461,20 @@ TclCompileScript( * namespaces to reduce shimmering. */ - objIndex = TclRegisterNewNSLiteral(envPtr, - tokenPtr[1].start, tokenPtr[1].size); + if (tokenPtr[1].type & TCL_TOKEN_UNCOLLAPSED_TEXT) + { + char *s; + int n; + + s=ckalloc(tokenPtr[1].size); + n=TclCopyAndCollapse(tokenPtr[1].size,tokenPtr[1].start,s); + objIndex = TclRegisterLiteral(envPtr,s,n,LITERAL_NS_SCOPE|LITERAL_ON_HEAP); + } + else + { + objIndex = TclRegisterNewNSLiteral(envPtr, + tokenPtr[1].start, tokenPtr[1].size); + } if (cmdPtr != NULL) { TclSetCmdNameObj(interp, envPtr->literalArrayPtr[objIndex].objPtr,cmdPtr); @@ -1471,8 +1497,20 @@ TclCompileScript( * unmodified. We care only if the we are in a context * which already allows absolute counting. */ - objIndex = TclRegisterNewLiteral(envPtr, - tokenPtr[1].start, tokenPtr[1].size); + if (tokenPtr[1].type & TCL_TOKEN_UNCOLLAPSED_TEXT) + { + char *s; + int n; + + s=ckalloc(tokenPtr[1].size); + n=TclCopyAndCollapse(tokenPtr[1].size,tokenPtr[1].start,s); + objIndex = TclRegisterLiteral(envPtr,s,n,LITERAL_ON_HEAP); + } + else + { + objIndex = TclRegisterNewLiteral(envPtr, + tokenPtr[1].start, tokenPtr[1].size); + } if (eclPtr->type == TCL_LOCATION_SOURCE) { EnterCmdWordIndex(eclPtr, @@ -1609,6 +1647,7 @@ TclCompileTokens( int numObjsToConcat, nameBytes, localVarName, localVar; int length, i; unsigned char *entryCodeNext = envPtr->codeNext; + char *collapsed=NULL; Tcl_DStringInit(&textBuffer); numObjsToConcat = 0; @@ -1618,6 +1657,14 @@ TclCompileTokens( Tcl_DStringAppend(&textBuffer, tokenPtr->start, tokenPtr->size); break; + case TCL_TOKEN_UNCOLLAPSED_TEXT: + if (collapsed) + collapsed=ckrealloc(collapsed,tokenPtr->size); + else + collapsed=ckalloc(tokenPtr->size); + Tcl_DStringAppend(&textBuffer, collapsed, TclCopyAndCollapse(tokenPtr->size,tokenPtr->start,collapsed)); + break; + case TCL_TOKEN_BS: length = Tcl_UtfBackslash(tokenPtr->start, NULL, buffer); Tcl_DStringAppend(&textBuffer, buffer, length); @@ -1733,6 +1780,8 @@ TclCompileTokens( } } + if (collapsed) ckfree(collapsed); + /* * Push any accumulated characters appearing at the end. */ diff --git a/generic/tclParse.c b/generic/tclParse.c index c730eaa..e1278a0 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.73 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.74 2008/11/17 22:26:54 ferrieux Exp $ */ #include "tclInt.h" @@ -532,6 +532,28 @@ Tcl_ParseCommand( tokenPtr[-1].size += (isspace(UCHAR( tokenPtr->start[tokenPtr->size])) == 0); } + if (tokenPtr[-1].start[0]!='{') + { + const char *s; + int n; + + for(n=tokenPtr->size,s=tokenPtr->start;n>0;n--,s++) + { + if ((*s)=='\\') { + tokenPtr->type = TCL_TOKEN_UNCOLLAPSED_TEXT; + /* + * In this case we also demote the + * enclosing token from + * SIMPLE_WORD to WORD in order to + * preserve the simplicity of all + * shortcuts made on SIMPLE_WORDs + * in clients. + */ + tokenPtr[-1].type = TCL_TOKEN_WORD; + break; + } + } + } tokenPtr++; } @@ -546,7 +568,7 @@ Tcl_ParseCommand( tokenPtr->type = TCL_TOKEN_EXPAND_WORD; } } else if ((tokenPtr->numComponents == 1) - && (tokenPtr[1].type == TCL_TOKEN_TEXT)) { + && (tokenPtr[1].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT))) { tokenPtr->type = TCL_TOKEN_SIMPLE_WORD; } @@ -1961,7 +1983,7 @@ Tcl_SubstObj( if (varTokenPtr->type != TCL_TOKEN_VARIABLE) { Tcl_Panic("Tcl_SubstObj: programming error"); } - if (varTokenPtr[1].type != TCL_TOKEN_TEXT) { + if (!(varTokenPtr[1].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT))) { Tcl_Panic("Tcl_SubstObj: programming error"); } parsePtr->numTokens -= 2; @@ -2134,6 +2156,7 @@ TclSubstTokens( { Tcl_Obj *result; int code = TCL_OK; + char *collapsed = NULL; /* * Each pass through this loop will substitute one token, and its @@ -2158,6 +2181,15 @@ TclSubstTokens( appendByteLength = tokenPtr->size; break; + case TCL_TOKEN_UNCOLLAPSED_TEXT: + if (collapsed) + collapsed=ckrealloc(collapsed,tokenPtr->size); + else + collapsed=ckalloc(tokenPtr->size); + appendByteLength=TclCopyAndCollapse(tokenPtr->size,tokenPtr->start,collapsed); + append=collapsed; + break; + case TCL_TOKEN_BS: appendByteLength = Tcl_UtfBackslash(tokenPtr->start, NULL, utfCharBytes); @@ -2270,6 +2302,7 @@ TclSubstTokens( } } } + if (collapsed) ckfree(collapsed); if (code != TCL_ERROR) { /* Keep error message in result! */ if (result != NULL) { diff --git a/generic/tclTest.c b/generic/tclTest.c index 515d922..c097363 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.130 2008/11/16 22:22:11 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.131 2008/11/17 22:26:54 ferrieux Exp $ */ #define TCL_TEST @@ -3452,6 +3452,9 @@ PrintParse( case TCL_TOKEN_TEXT: typeString = "text"; break; + case TCL_TOKEN_UNCOLLAPSED_TEXT: + typeString = "text-to-collapse"; + break; case TCL_TOKEN_BS: typeString = "backslash"; break; -- cgit v0.12 From 8d22f1cfcc45e63e40c4af4d1489164f50826274 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 17 Nov 2008 22:37:36 +0000 Subject: Fix [Bug 2251175]: missing backslash generic/tclCompCmds.c substitution on expanded literals. --- tests/compile.test | 9 ++++++++- tests/parse.test | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/compile.test b/tests/compile.test index 7d282ae..557b3b5 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compile.test,v 1.49 2008/09/10 13:50:05 dkf Exp $ +# RCS: @(#) $Id: compile.test,v 1.50 2008/11/17 22:37:36 ferrieux Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -568,6 +568,13 @@ test compile-16.24.$noComp { } -constraints $constraints -body { run "{*}\"\{foo bar\"" } -returnCodes error -result {unmatched open brace in list} +test compile-16.25.$noComp {TclCompileScript: word expansion, naked backslashes} $constraints { + run {list {*}{a \n b}} +} {a { +} b} +test compile-16.26.$noComp {TclCompileScript: word expansion, protected backslashes} $constraints { + run {list {*}{a {\n} b}} +} {a {\n} b} } ;# End of noComp loop # These tests are messy because it wrecks the interpreter it runs in! diff --git a/tests/parse.test b/tests/parse.test index 2220e22..404f0a8 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.34 2008/07/14 20:29:41 msofer Exp $ +# RCS: @(#) $Id: parse.test,v 1.35 2008/11/17 22:37:36 ferrieux Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -229,6 +229,12 @@ test parse-5.26 {Tcl_ParseCommand: {*} parsing} testparser { test parse-5.27 {Tcl_ParseCommand: {*} parsing} testparser { testparser "{*}\\\n foo bar" 0 } {- \{*\}\\\n\ foo\ bar 3 simple {{*}} 1 text * 0 simple foo 1 text foo 0 simple bar 1 text bar 0 {}} +test parse-5.28 {Tcl_ParseCommand: {*} parsing, expanded literals} testparser { + testparser {{*}{a b}} 0 +} {- {{*}{a b}} 2 simple a 1 text a 0 simple b 1 text b 0 {}} +test parse-5.29 {Tcl_ParseCommand: {*} parsing, expanded literals, naked backslashes} testparser { + testparser {{*}{a \n b}} 0 +} {- {{*}{a \n b}} 3 simple a 1 text a 0 word {\n} 1 text-to-collapse {\n} 0 simple b 1 text b 0 {}} test parse-6.1 {ParseTokens procedure, empty word} testparser { testparser {""} 0 -- cgit v0.12 From 840dea9a4af85a85a9112523d15fe80ba40077df Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 17 Nov 2008 22:39:13 +0000 Subject: Fix [Bug 2251175]: missing backslash substitution on expanded literals. --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 13cc2a4..52321a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ * generic/tclCompile.c * generic/tclParse.c * generic/tclTest.c + * tests/compile.test + * tests/parse.test 2008-11-16 Jan Nijtmans -- cgit v0.12 From 7101dee3d37069077777424ac90b183db88d57bf Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 18 Nov 2008 06:35:01 +0000 Subject: Fix signature and implementation of Tcl_HashStats, such that it conforms to the documentation. --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52321a4..488b24d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,9 @@ -2008-11-16 Jan Nijtmans +2008-11-17 Jan Nijtmans * generic/tcl.decls: Fix signature and implementation of * generic/tclDecls.h: Tcl_HashStats, such that it conforms * generic/tclHash.c: to the documentation. - * generic/tclVar.c: + * generic/tclVar.c: [Bug 2308236] * doc/Hash.3 * generic/tclDictObj.c Convert Tcl_SetResult call to Tcl_SetObjResult. -- cgit v0.12 From 3f59149579bd66510f70ecdd2cb420bb1e45e614 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 19 Nov 2008 00:00:20 +0000 Subject: Simplification of expanded-literals handling after analysis of dead branches --- generic/tclCompCmds.c | 8 ++++---- generic/tclCompile.c | 34 +++++----------------------------- generic/tclParse.c | 6 +++--- 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index e36d546..74dceac 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.149 2008/11/17 22:26:53 ferrieux Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.150 2008/11/19 00:00:20 ferrieux Exp $ */ #include "tclInt.h" @@ -4438,7 +4438,7 @@ TclCompileSwitchCmd( * Keep in sync with TclCompileRegexpCmd. */ - if (bodyToken[i]->type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT)) { + if (bodyToken[i]->type == TCL_TOKEN_TEXT) { Tcl_DString ds; if (bodyToken[i]->size == 0) { @@ -4983,8 +4983,8 @@ PushVarName( } } } else if (((n = varTokenPtr->numComponents) > 1) - && (varTokenPtr[1].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT)) - && (varTokenPtr[n].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT)) + && (varTokenPtr[1].type == TCL_TOKEN_TEXT) + && (varTokenPtr[n].type == TCL_TOKEN_TEXT) && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) { /* diff --git a/generic/tclCompile.c b/generic/tclCompile.c index fe282d4..c73be7d 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.161 2008/11/17 22:26:53 ferrieux Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.162 2008/11/19 00:00:20 ferrieux Exp $ */ #include "tclInt.h" @@ -1461,20 +1461,8 @@ TclCompileScript( * namespaces to reduce shimmering. */ - if (tokenPtr[1].type & TCL_TOKEN_UNCOLLAPSED_TEXT) - { - char *s; - int n; - - s=ckalloc(tokenPtr[1].size); - n=TclCopyAndCollapse(tokenPtr[1].size,tokenPtr[1].start,s); - objIndex = TclRegisterLiteral(envPtr,s,n,LITERAL_NS_SCOPE|LITERAL_ON_HEAP); - } - else - { - objIndex = TclRegisterNewNSLiteral(envPtr, - tokenPtr[1].start, tokenPtr[1].size); - } + objIndex = TclRegisterNewNSLiteral(envPtr, + tokenPtr[1].start, tokenPtr[1].size); if (cmdPtr != NULL) { TclSetCmdNameObj(interp, envPtr->literalArrayPtr[objIndex].objPtr,cmdPtr); @@ -1497,20 +1485,8 @@ TclCompileScript( * unmodified. We care only if the we are in a context * which already allows absolute counting. */ - if (tokenPtr[1].type & TCL_TOKEN_UNCOLLAPSED_TEXT) - { - char *s; - int n; - - s=ckalloc(tokenPtr[1].size); - n=TclCopyAndCollapse(tokenPtr[1].size,tokenPtr[1].start,s); - objIndex = TclRegisterLiteral(envPtr,s,n,LITERAL_ON_HEAP); - } - else - { - objIndex = TclRegisterNewLiteral(envPtr, - tokenPtr[1].start, tokenPtr[1].size); - } + objIndex = TclRegisterNewLiteral(envPtr, + tokenPtr[1].start, tokenPtr[1].size); if (eclPtr->type == TCL_LOCATION_SOURCE) { EnterCmdWordIndex(eclPtr, diff --git a/generic/tclParse.c b/generic/tclParse.c index e1278a0..9f10e76 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.74 2008/11/17 22:26:54 ferrieux Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.75 2008/11/19 00:00:20 ferrieux Exp $ */ #include "tclInt.h" @@ -568,7 +568,7 @@ Tcl_ParseCommand( tokenPtr->type = TCL_TOKEN_EXPAND_WORD; } } else if ((tokenPtr->numComponents == 1) - && (tokenPtr[1].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT))) { + && (tokenPtr[1].type == TCL_TOKEN_TEXT)) { tokenPtr->type = TCL_TOKEN_SIMPLE_WORD; } @@ -1983,7 +1983,7 @@ Tcl_SubstObj( if (varTokenPtr->type != TCL_TOKEN_VARIABLE) { Tcl_Panic("Tcl_SubstObj: programming error"); } - if (!(varTokenPtr[1].type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT))) { + if (!(varTokenPtr[1].type == TCL_TOKEN_TEXT)) { Tcl_Panic("Tcl_SubstObj: programming error"); } parsePtr->numTokens -= 2; -- cgit v0.12 From 718ed7c6446b39172357c0d70f17e914f5a4c1d4 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 19 Nov 2008 00:04:49 +0000 Subject: Convert Tcl_SetResult(......, TCL_DYNAMIC) to Tcl_SetResult(......, TCL_VOLATILE), in preparation for TIP #340 --- ChangeLog | 6 ++++++ generic/tclThreadTest.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 488b24d..3e858e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-19 Jan Nijtmans + + * generic/tclThreadTest.c Convert Tcl_SetResult(......, TCL_DYNAMIC) to + Tcl_SetResult(......, TCL_VOLATILE), in preparation + for TIP #340 + 2008-11-17 Jan Nijtmans * generic/tcl.decls: Fix signature and implementation of diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index eb3b855..82485ff 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.27 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.28 2008/11/19 00:04:49 nijtmans Exp $ */ #include "tclInt.h" @@ -929,7 +929,8 @@ TclThreadSend( ckfree(resultPtr->errorInfo); } } - Tcl_SetResult(interp, resultPtr->result, TCL_DYNAMIC); + Tcl_SetResult(interp, resultPtr->result, TCL_VOLATILE); + ckfree(resultPtr->result); Tcl_ConditionFinalize(&resultPtr->done); code = resultPtr->code; -- cgit v0.12 From 974a49e4500d766dfd050097ec752d5b712245ec Mon Sep 17 00:00:00 2001 From: ferrieux Date: Sun, 23 Nov 2008 18:05:30 +0000 Subject: Fix IsChannelExisting name comparison [Bug 2333466] --- generic/tclIO.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index d2017e8..4547a36 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.147 2008/11/06 21:47:36 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.148 2008/11/23 18:05:30 ferrieux Exp $ */ #include "tclInt.h" @@ -9808,7 +9808,7 @@ Tcl_IsChannelExisting( } if ((*chanName == *name) && - (memcmp(name, chanName, (size_t) chanNameLen) == 0)) { + (memcmp(name, chanName, (size_t) chanNameLen + 1) == 0)) { return 1; } } -- cgit v0.12 From 7a7f3cd3492455ecfeb0c513c9e9c860e32b39f1 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 24 Nov 2008 10:02:43 +0000 Subject: Converter script improvements. [Bug 2330040] --- ChangeLog | 41 +++++++++++++++++------------- tools/tcltk-man2html.tcl | 66 ++++++++++++++++++++++++++++-------------------- 2 files changed, 62 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e858e9..1b34877 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,22 @@ +2008-11-24 Donal K. Fellows + + * tools/tcltk-man2html.tcl: Improvements to tackle tricky aspects of + cross references and new entities to map. [Bug 2330040] + 2008-11-19 Jan Nijtmans - * generic/tclThreadTest.c Convert Tcl_SetResult(......, TCL_DYNAMIC) to - Tcl_SetResult(......, TCL_VOLATILE), in preparation - for TIP #340 + * generic/tclThreadTest.c: Convert Tcl_SetResult(......, TCL_DYNAMIC) + to Tcl_SetResult(......, TCL_VOLATILE), in preparation for TIP #340 2008-11-17 Jan Nijtmans - * generic/tcl.decls: Fix signature and implementation of - * generic/tclDecls.h: Tcl_HashStats, such that it conforms - * generic/tclHash.c: to the documentation. - * generic/tclVar.c: [Bug 2308236] - * doc/Hash.3 - * generic/tclDictObj.c Convert Tcl_SetResult call to Tcl_SetObjResult. + * generic/tcl.decls: Fix signature and implementation of + * generic/tclDecls.h: Tcl_HashStats, such that it conforms to the + * generic/tclHash.c: documentation. [Bug 2308236] + * generic/tclVar.c: + * doc/Hash.3: + * generic/tclDictObj.c: Convert Tcl_SetResult call to + Tcl_SetObjResult. 2008-11-17 Alexandre Ferrieux @@ -28,13 +33,13 @@ 2008-11-16 Jan Nijtmans - * generic/tclTest.c: replace two times Tcl_SetResult with - Tcl_SetObjResult, a little simplification - in preparation for the TIP #340 patch. + * generic/tclTest.c: Replace two times Tcl_SetResult with + Tcl_SetObjResult, a little simplification in preparation for the TIP + #340 patch. 2008-11-13 Jan Nijtmans - * generic/tclInt.h: rename static function FSUnloadTempFile to + * generic/tclInt.h: Rename static function FSUnloadTempFile to * generic/tclIOUtil.c TclFSUnloadTempFile, needed in tclLoad.c * generic/tclLoad.c Fixed [Bug 2269431]: load of shared @@ -42,19 +47,19 @@ 2008-11-12 Pat Thoyts - * tests/registry.test: Use HKCU to avoid requiring admin access - for registry testing on vista/server2008 + * tests/registry.test: Use HKCU to avoid requiring admin access for + registry testing on Vista/Server2008 2008-11-11 Jan Nijtmans * generic/tclNamesp.c: Eliminate warning: passing arg 4 of `Tcl_SplitList' from incompatible pointer type - * win/tcl.m4: reverted change from 2008-11-06 (was under the + * win/tcl.m4: Reverted change from 2008-11-06 (was under the impression that "-Wno-implicit-int" added an extra warning) * win/configure (regenerated) - * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and get - rid of -Wno-implicit-int for UNIX + * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and + get rid of -Wno-implicit-int for UNIX. * unix/configure (regenerated) 2008-11-10 Andreas Kupries diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index e846a00..8ed5e08 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -344,21 +344,23 @@ proc htmlize-text {text {charmap {}}} { proc process-text {text} { global manual - # preprocess text + # preprocess text; note that this is an incomplete map, and will probably + # need to have things added to it as the manuals expand to use them. set charmap [list \ - {\&} "\t" \ - {\%} {} \ - "\\\n" "\n" \ - {\(+-} "±" \ - {\(co} "©" \ - {\(em} "—" \ - {\(fm} "′" \ - {\(mu} "×" \ - {\(->} "" \ - {\fP} {\fR} \ - {\.} . \ - {\(bu} "•" \ - ] + {\&} "\t" \ + {\%} {} \ + "\\\n" "\n" \ + {\(+-} "±" \ + {\(co} "©" \ + {\(em} "—" \ + {\(fm} "′" \ + {\(mu} "×" \ + {\(mi} "−" \ + {\(->} "" \ + {\fP} {\fR} \ + {\.} . \ + {\(bu} "•" \ + ] lappend charmap {\o'o^'} {ô} ; # o-circumflex in re_syntax.n lappend charmap {\-\|\-} -- ; # two hyphens lappend charmap {\-} - ; # a hyphen @@ -516,7 +518,8 @@ proc long-toc {text} { proc option-toc {name class switch} { global manual if {[string match "*OPTIONS" $manual(section)]} { - if {$manual(name) ne "ttk_widget"} { + if {$manual(name) ne "ttk_widget" && ($manual(name) ne "ttk_entry" || + ![string match validate* $name])} { # link the defined option into the long table of contents set link [long-toc "$switch, $name, $class"] regsub -- "$switch, $name, $class" $link "$switch" link @@ -1254,20 +1257,29 @@ proc output-directive {line} { return } .SO { - set targetPage $rest - if {[match-text @stuff .SE]} { - output-directive {.SH STANDARD OPTIONS} - set opts [split $stuff \n\t] - man-puts
- lappend manual(section-toc)
- foreach option [lsort -dictionary $opts] { - man-puts "
[std-option-toc $option $targetPage]" + # When there's a sequence of multiple .SO chunks, process into one + set optslist {} + while 1 { + if {[match-text @stuff .SE]} { + foreach opt [split $stuff \n\t] { + lappend optslist [list $opt $rest] + } + } else { + manerror "unexpected .SO format:\n[expand-next-text 2]" } - man-puts
- lappend manual(section-toc)
- } else { - manerror "unexpected .SO format:\n[expand-next-text 2]" + if {![next-op-is .SO rest]} { + break + } + } + output-directive {.SH STANDARD OPTIONS} + man-puts
+ lappend manual(section-toc)
+ foreach optionpair [lsort -dictionary -index 0 $optslist] { + lassign $optionpair option targetPage + man-puts "
[std-option-toc $option $targetPage]" } + man-puts
+ lappend manual(section-toc)
} .OP { output-widget-options $rest -- cgit v0.12 From ae28ec005aac5ac5ea4d47605ec14d1486fe3fe1 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 25 Nov 2008 06:48:01 +0000 Subject: don't assume that Tcl_SetResult sets interp->result, especially not in a dstring test --- ChangeLog | 6 ++++++ generic/tclTest.c | 17 ++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b34877..35d8214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-25 Jan Nijtmans + + * generic/tclTest.c: Don't assume that Tcl_SetResult + sets interp->result, especially not in a dstring test, + in preparation for TIP #340 + 2008-11-24 Donal K. Fellows * tools/tcltk-man2html.tcl: Improvements to tackle tricky aspects of diff --git a/generic/tclTest.c b/generic/tclTest.c index c097363..1093d8c 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.131 2008/11/17 22:26:54 ferrieux Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.132 2008/11/25 06:48:01 nijtmans Exp $ */ #define TCL_TEST @@ -1593,7 +1593,6 @@ TestdstringCmd( const char **argv) /* Argument strings. */ { int count; - Interp* iPtr = (Interp*) interp; if (argc < 2) { wrongNumArgs: @@ -1637,13 +1636,13 @@ TestdstringCmd( } else if (strcmp(argv[2], "staticlarge") == 0) { Tcl_SetResult(interp, "first0 first1 first2 first3 first4 first5 first6 first7 first8 first9\nsecond0 second1 second2 second3 second4 second5 second6 second7 second8 second9\nthird0 third1 third2 third3 third4 third5 third6 third7 third8 third9\nfourth0 fourth1 fourth2 fourth3 fourth4 fourth5 fourth6 fourth7 fourth8 fourth9\nfifth0 fifth1 fifth2 fifth3 fifth4 fifth5 fifth6 fifth7 fifth8 fifth9\nsixth0 sixth1 sixth2 sixth3 sixth4 sixth5 sixth6 sixth7 sixth8 sixth9\nseventh0 seventh1 seventh2 seventh3 seventh4 seventh5 seventh6 seventh7 seventh8 seventh9\n", TCL_STATIC); } else if (strcmp(argv[2], "free") == 0) { - Tcl_SetResult(interp, (char *) ckalloc(100), TCL_DYNAMIC); - strcpy(iPtr->result, "This is a malloc-ed string"); + char *s = (char *) ckalloc(100); + strcpy(s, "This is a malloc-ed string"); + Tcl_SetResult(interp, s, TCL_DYNAMIC); } else if (strcmp(argv[2], "special") == 0) { - iPtr->result = (char *) ckalloc(100); - iPtr->result += 4; - iPtr->freeProc = SpecialFree; - strcpy(iPtr->result, "This is a specially-allocated string"); + char *s = (char *) ckalloc(100) + 16; + strcpy(s, "This is a specially-allocated string"); + Tcl_SetResult(interp, s, SpecialFree); } else { Tcl_AppendResult(interp, "bad gresult option \"", argv[2], "\": must be staticsmall, staticlarge, free, or special", @@ -1694,7 +1693,7 @@ TestdstringCmd( static void SpecialFree(blockPtr) char *blockPtr; /* Block to free. */ { - ckfree(blockPtr - 4); + ckfree(blockPtr - 16); } /* -- cgit v0.12 From 27413e2e6be699ec19189b0c87894f786205deb5 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 25 Nov 2008 22:13:33 +0000 Subject: * generic/tclIO.c (TclFinalizeIOSubsystem): Applied Alexandre Ferrieux's patch for [Bug 2270477] to prevent infinite looping during finalization of channels not bound to interpreters. --- ChangeLog | 6 ++++++ generic/tclIO.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35d8214..e645581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-25 Andreas Kupries + + * generic/tclIO.c (TclFinalizeIOSubsystem): Applied Alexandre + Ferrieux's patch for [Bug 2270477] to prevent infinite looping + during finalization of channels not bound to interpreters. + 2008-11-25 Jan Nijtmans * generic/tclTest.c: Don't assume that Tcl_SetResult diff --git a/generic/tclIO.c b/generic/tclIO.c index 4547a36..b7c7b02 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.148 2008/11/23 18:05:30 ferrieux Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.149 2008/11/25 22:13:34 andreas_kupries Exp $ */ #include "tclInt.h" @@ -364,8 +364,8 @@ TclFinalizeIOSubsystem(void) */ chanPtr->instanceData = NULL; - SetFlag(statePtr, CHANNEL_DEAD); } + SetFlag(statePtr, CHANNEL_DEAD); } } -- cgit v0.12 From 00452d9d7d4d961a4659fc21e69febb307d184f0 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 25 Nov 2008 23:19:01 +0000 Subject: Eliminate 3 calls to Tcl_SetResult, as examples how it should have been done. purpose: contribute in the TIP #340 discussion. --- ChangeLog | 6 ++++++ generic/tclIO.c | 11 ++--------- generic/tclIndexObj.c | 4 ++-- generic/tclTestObj.c | 5 ++--- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index e645581..a1199bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-25 Jan Nijtmans + + * generic/tclIndexObj.c: Eliminate 3 calls to Tcl_SetResult, as + * generic/tclIO.c examples how it should have been done. + * generic/tclTestObj.c purpose: contribute in the TIP #340 discussion. + 2008-11-25 Andreas Kupries * generic/tclIO.c (TclFinalizeIOSubsystem): Applied Alexandre diff --git a/generic/tclIO.c b/generic/tclIO.c index b7c7b02..fdd6cba 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.149 2008/11/25 22:13:34 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.150 2008/11/25 23:19:01 nijtmans Exp $ */ #include "tclInt.h" @@ -2383,14 +2383,7 @@ FlushChannel( Tcl_SetErrno(errorCode); if (interp != NULL && !TclChanCaughtErrorBypass(interp, (Tcl_Channel) chanPtr)) { - /* - * Casting away const here is safe because the - * TCL_VOLATILE flag guarantees const treatment of the - * Posix error string. - */ - - Tcl_SetResult(interp, (char *) Tcl_PosixError(interp), - TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_PosixError(interp), -1)); } /* diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index f04db71..d0fb382 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.46 2008/10/14 22:37:53 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.47 2008/11/25 23:19:02 nijtmans Exp $ */ #include "tclInt.h" @@ -1263,7 +1263,7 @@ Tcl_ParseArgsObjv( sprintf(buf, "bad argument type %d in Tcl_ArgvInfo", infoPtr->type); - Tcl_SetResult(interp, buf, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); goto error; } } diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 842cbd0..c643822 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.25 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.26 2008/11/25 23:19:02 nijtmans Exp $ */ #include "tclInt.h" @@ -930,8 +930,7 @@ TestobjCmd( if (CheckIfVarUnset(interp, varIndex)) { return TCL_ERROR; } - TclFormatInt(buf, varPtr[varIndex]->refCount); - Tcl_SetResult(interp, buf, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewIntObj(varPtr[varIndex]->refCount)); } else if (strcmp(subCmd, "type") == 0) { if (objc != 3) { goto wrongNumArgs; -- cgit v0.12 From 41e3dc4923b40c7f7d921681de5daa1fab6918d8 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Wed, 26 Nov 2008 19:19:16 +0000 Subject: * library/tclIndex: Removed reference to no-longer-extant procedure 'tclLdAout'. * doc/library.n: Corrected mention of 'auto_exec' to 'auto_execok'. [Patch 2114900] thanks to Stu Cassoff --- ChangeLog | 7 +++++++ doc/library.n | 4 ++-- library/tclIndex | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1199bd..9191fa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-26 Kevin B. Kenny + + * library/tclIndex: Removed reference to no-longer-extant procedure + 'tclLdAout'. + * doc/library.n: Corrected mention of 'auto_exec' to 'auto_execok'. + [Patch 2114900] thanks to Stu Cassoff + 2008-11-25 Jan Nijtmans * generic/tclIndexObj.c: Eliminate 3 calls to Tcl_SetResult, as diff --git a/doc/library.n b/doc/library.n index 98c578c..572c0eb 100644 --- a/doc/library.n +++ b/doc/library.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: library.n,v 1.24 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: library.n,v 1.25 2008/11/26 19:19:16 kennykb Exp $ .so man.macros .TH library n "8.0" Tcl "Tcl Built-In Commands" .BS @@ -67,7 +67,7 @@ named by \fIcmd\fR. If not, it returns an empty string. This command examines the directories in the current search path (given by the PATH environment variable) in its search for an executable file named \fIcmd\fR. On Windows platforms, the search is expanded with the same -directories and file extensions as used by \fBexec\fR. \fBAuto_exec\fR +directories and file extensions as used by \fBexec\fR. \fBAuto_execok\fR remembers information about previous searches in an array named \fBauto_execs\fR; this avoids the path search in future calls for the same \fIcmd\fR. The command \fBauto_reset\fR may be used to force diff --git a/library/tclIndex b/library/tclIndex index 2fcf4a5..010616f 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -27,7 +27,6 @@ set auto_index(::tcl::HistRedo) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistIndex) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistEvent) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistChange) [list source [file join $dir history.tcl]] -set auto_index(tclLdAout) [list source [file join $dir ldAout.tcl]] set auto_index(pkg_mkIndex) [list source [file join $dir package.tcl]] set auto_index(tclPkgSetup) [list source [file join $dir package.tcl]] set auto_index(tclPkgUnknown) [list source [file join $dir package.tcl]] -- cgit v0.12 From 12370b2c306d55d85724b508ddc18bf631b9d46a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 26 Nov 2008 23:09:34 +0000 Subject: Eliminate warning: unused variable --- ChangeLog | 4 ++++ generic/tclTestObj.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9191fa2..8c9bed3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-11-26 Jan Nijtmans + + * generic/tclIndexObj.c: Eliminate warning: unused variable + 2008-11-26 Kevin B. Kenny * library/tclIndex: Removed reference to no-longer-extant procedure diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index c643822..c88a519 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.26 2008/11/25 23:19:02 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.27 2008/11/26 23:09:34 nijtmans Exp $ */ #include "tclInt.h" @@ -918,8 +918,6 @@ TestobjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj(typeName, -1)); } } else if (strcmp(subCmd, "refcount") == 0) { - char buf[TCL_INTEGER_SPACE]; - if (objc != 3) { goto wrongNumArgs; } -- cgit v0.12 From af5fd80ac65755d299d93e203c672f974594e42d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 26 Nov 2008 23:44:59 +0000 Subject: A few more (harmless) Tcl_SetResult eliminations --- ChangeLog | 1 + generic/tclTest.c | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c9bed3..fe6cef8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2008-11-26 Jan Nijtmans * generic/tclIndexObj.c: Eliminate warning: unused variable + * generic/tclTest.c: A few more (harmless) Tcl_SetResult eliminations 2008-11-26 Kevin B. Kenny diff --git a/generic/tclTest.c b/generic/tclTest.c index 1093d8c..f93857a 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.132 2008/11/25 06:48:01 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.133 2008/11/26 23:44:59 nijtmans Exp $ */ #define TCL_TEST @@ -743,7 +743,6 @@ TestasyncCmd( TestAsyncHandler *asyncPtr, *prevPtr; int id, code; static int nextId = 1; - char buf[TCL_INTEGER_SPACE]; if (argc < 2) { wrongNumArgs: @@ -763,8 +762,7 @@ TestasyncCmd( strcpy(asyncPtr->command, argv[2]); asyncPtr->nextPtr = firstHandler; firstHandler = asyncPtr; - TclFormatInt(buf, asyncPtr->id); - Tcl_SetResult(interp, buf, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewIntObj(asyncPtr->id)); } else if (strcmp(argv[1], "delete") == 0) { if (argc == 2) { while (firstHandler != NULL) { @@ -812,7 +810,7 @@ TestasyncCmd( break; } } - Tcl_SetResult(interp, (char *)argv[3], TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewStringObj(argv[3], -1)); return code; #ifdef TCL_THREADS } else if (strcmp(argv[1], "marklater") == 0) { @@ -985,9 +983,9 @@ TestcmdinfoCmd( info.deleteProc = CmdDelProc2; info.deleteData = (ClientData) "new_delete_data"; if (Tcl_SetCommandInfo(interp, argv[2], &info) == 0) { - Tcl_SetResult(interp, "0", TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); } else { - Tcl_SetResult(interp, "1", TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewIntObj(1)); } } else { Tcl_AppendResult(interp, "bad option \"", argv[1], @@ -1651,13 +1649,11 @@ TestdstringCmd( } Tcl_DStringGetResult(interp, &dstring); } else if (strcmp(argv[1], "length") == 0) { - char buf[TCL_INTEGER_SPACE]; if (argc != 2) { goto wrongNumArgs; } - TclFormatInt(buf, Tcl_DStringLength(&dstring)); - Tcl_SetResult(interp, buf, TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewIntObj(Tcl_DStringLength(&dstring))); } else if (strcmp(argv[1], "result") == 0) { if (argc != 2) { goto wrongNumArgs; @@ -4893,7 +4889,7 @@ TestsaveresultCmd( break; } case RESULT_DYNAMIC: - Tcl_SetResult(interp, "dynamic result", TestsaveresultFree); + Tcl_SetResult(interp, (char *)"dynamic result", TestsaveresultFree); break; case RESULT_OBJECT: objPtr = Tcl_NewStringObj("object result", -1); @@ -6528,7 +6524,6 @@ TestgetintCmd( return TCL_ERROR; } else { int val, i, total=0; - char buf[TCL_INTEGER_SPACE]; for (i=1 ; i Date: Thu, 27 Nov 2008 08:23:51 +0000 Subject: Alternate fix for[Bug 2251175]: missing backslash substitution on expanded literals. --- ChangeLog | 8 +++++++ generic/tcl.h | 3 +-- generic/tclCompile.c | 31 +++--------------------- generic/tclParse.c | 66 ++++++++++++++++++---------------------------------- generic/tclTest.c | 5 +--- tests/parse.test | 4 ++-- 6 files changed, 38 insertions(+), 79 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe6cef8..be37c31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-27 Alexandre Ferrieux + + * generic/tcl.h: Alternate fix for[Bug 2251175]: missing + * generic/tclCompile.c backslash substitution on expanded literals. + * generic/tclParse.c + * generic/tclTest.c + * tests/parse.test + 2008-11-26 Jan Nijtmans * generic/tclIndexObj.c: Eliminate warning: unused variable diff --git a/generic/tcl.h b/generic/tcl.h index e20964c..5354a70 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.278 2008/11/17 22:26:53 ferrieux Exp $ + * RCS: @(#) $Id: tcl.h,v 1.279 2008/11/27 08:23:51 ferrieux Exp $ */ #ifndef _TCL @@ -2004,7 +2004,6 @@ typedef struct Tcl_Token { #define TCL_TOKEN_SUB_EXPR 64 #define TCL_TOKEN_OPERATOR 128 #define TCL_TOKEN_EXPAND_WORD 256 -#define TCL_TOKEN_UNCOLLAPSED_TEXT 512 /* * Parsing error types. On any parsing error, one of these values will be diff --git a/generic/tclCompile.c b/generic/tclCompile.c index c73be7d..94e3c61 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.162 2008/11/19 00:00:20 ferrieux Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.163 2008/11/27 08:23:51 ferrieux Exp $ */ #include "tclInt.h" @@ -1077,7 +1077,6 @@ TclWordKnownAtCompileTime( { int numComponents = tokenPtr->numComponents; Tcl_Obj *tempPtr = NULL; - char *collapsed=NULL; if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { if (valuePtr != NULL) { @@ -1101,17 +1100,6 @@ TclWordKnownAtCompileTime( } break; - case TCL_TOKEN_UNCOLLAPSED_TEXT: - if (tempPtr != NULL) { - if (collapsed) - collapsed=ckrealloc(collapsed,tokenPtr->size); - else - collapsed=ckalloc(tokenPtr->size); - Tcl_AppendToObj(tempPtr, collapsed, TclCopyAndCollapse(tokenPtr->size,tokenPtr->start,collapsed)); - } - break; - - case TCL_TOKEN_BS: if (tempPtr != NULL) { char utfBuf[TCL_UTF_MAX]; @@ -1122,14 +1110,12 @@ TclWordKnownAtCompileTime( default: if (tempPtr != NULL) { - if (collapsed) ckfree(collapsed); Tcl_DecrRefCount(tempPtr); } return 0; } tokenPtr++; } - if (collapsed) ckfree(collapsed); if (valuePtr != NULL) { Tcl_AppendObjToObj(valuePtr, tempPtr); Tcl_DecrRefCount(tempPtr); @@ -1462,7 +1448,7 @@ TclCompileScript( */ objIndex = TclRegisterNewNSLiteral(envPtr, - tokenPtr[1].start, tokenPtr[1].size); + tokenPtr[1].start, tokenPtr[1].size); if (cmdPtr != NULL) { TclSetCmdNameObj(interp, envPtr->literalArrayPtr[objIndex].objPtr,cmdPtr); @@ -1486,7 +1472,7 @@ TclCompileScript( * which already allows absolute counting. */ objIndex = TclRegisterNewLiteral(envPtr, - tokenPtr[1].start, tokenPtr[1].size); + tokenPtr[1].start, tokenPtr[1].size); if (eclPtr->type == TCL_LOCATION_SOURCE) { EnterCmdWordIndex(eclPtr, @@ -1623,7 +1609,6 @@ TclCompileTokens( int numObjsToConcat, nameBytes, localVarName, localVar; int length, i; unsigned char *entryCodeNext = envPtr->codeNext; - char *collapsed=NULL; Tcl_DStringInit(&textBuffer); numObjsToConcat = 0; @@ -1633,14 +1618,6 @@ TclCompileTokens( Tcl_DStringAppend(&textBuffer, tokenPtr->start, tokenPtr->size); break; - case TCL_TOKEN_UNCOLLAPSED_TEXT: - if (collapsed) - collapsed=ckrealloc(collapsed,tokenPtr->size); - else - collapsed=ckalloc(tokenPtr->size); - Tcl_DStringAppend(&textBuffer, collapsed, TclCopyAndCollapse(tokenPtr->size,tokenPtr->start,collapsed)); - break; - case TCL_TOKEN_BS: length = Tcl_UtfBackslash(tokenPtr->start, NULL, buffer); Tcl_DStringAppend(&textBuffer, buffer, length); @@ -1756,8 +1733,6 @@ TclCompileTokens( } } - if (collapsed) ckfree(collapsed); - /* * Push any accumulated characters appearing at the end. */ diff --git a/generic/tclParse.c b/generic/tclParse.c index 9f10e76..be66a60 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,6 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.75 2008/11/19 00:00:20 ferrieux Exp $ */ #include "tclInt.h" @@ -435,7 +434,7 @@ Tcl_ParseCommand( } if (isLiteral) { - int elemCount = 0, code = TCL_OK; + int elemCount = 0, code = TCL_OK, nakedbs = 0; const char *nextElem, *listEnd, *elemStart; /* @@ -457,20 +456,36 @@ Tcl_ParseCommand( */ while (nextElem < listEnd) { + int size,brace; + code = TclFindElement(NULL, nextElem, listEnd - nextElem, - &elemStart, &nextElem, NULL, NULL); + &elemStart, &nextElem, &size, &brace); if (code != TCL_OK) break; + if (!brace) + { + const char *s; + + for(s=elemStart;size>0;s++,size--) + { + if ((*s)=='\\') + { + nakedbs=1; + break; + } + } + } if (elemStart < listEnd) { elemCount++; } } - if (code != TCL_OK) { + if ((code != TCL_OK) || nakedbs) { /* - * Some list element could not be parsed. This means the - * literal string was not in fact a valid list. Defer the - * handling of this to compile/eval time, where code is - * already in place to report the "attempt to expand a + * Some list element could not be parsed, or contained + * naked backslashes. This means the literal string was + * not in fact a valid nor canonical list. Defer the + * handling of this to compile/eval time, where code is + * already in place to report the "attempt to expand a * non-list" error. */ @@ -532,29 +547,6 @@ Tcl_ParseCommand( tokenPtr[-1].size += (isspace(UCHAR( tokenPtr->start[tokenPtr->size])) == 0); } - if (tokenPtr[-1].start[0]!='{') - { - const char *s; - int n; - - for(n=tokenPtr->size,s=tokenPtr->start;n>0;n--,s++) - { - if ((*s)=='\\') { - tokenPtr->type = TCL_TOKEN_UNCOLLAPSED_TEXT; - /* - * In this case we also demote the - * enclosing token from - * SIMPLE_WORD to WORD in order to - * preserve the simplicity of all - * shortcuts made on SIMPLE_WORDs - * in clients. - */ - tokenPtr[-1].type = TCL_TOKEN_WORD; - break; - } - } - } - tokenPtr++; } } @@ -2156,7 +2148,6 @@ TclSubstTokens( { Tcl_Obj *result; int code = TCL_OK; - char *collapsed = NULL; /* * Each pass through this loop will substitute one token, and its @@ -2181,15 +2172,6 @@ TclSubstTokens( appendByteLength = tokenPtr->size; break; - case TCL_TOKEN_UNCOLLAPSED_TEXT: - if (collapsed) - collapsed=ckrealloc(collapsed,tokenPtr->size); - else - collapsed=ckalloc(tokenPtr->size); - appendByteLength=TclCopyAndCollapse(tokenPtr->size,tokenPtr->start,collapsed); - append=collapsed; - break; - case TCL_TOKEN_BS: appendByteLength = Tcl_UtfBackslash(tokenPtr->start, NULL, utfCharBytes); @@ -2302,8 +2284,6 @@ TclSubstTokens( } } } - if (collapsed) ckfree(collapsed); - if (code != TCL_ERROR) { /* Keep error message in result! */ if (result != NULL) { Tcl_SetObjResult(interp, result); diff --git a/generic/tclTest.c b/generic/tclTest.c index f93857a..3648f94 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.133 2008/11/26 23:44:59 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.134 2008/11/27 08:23:51 ferrieux Exp $ */ #define TCL_TEST @@ -3447,9 +3447,6 @@ PrintParse( case TCL_TOKEN_TEXT: typeString = "text"; break; - case TCL_TOKEN_UNCOLLAPSED_TEXT: - typeString = "text-to-collapse"; - break; case TCL_TOKEN_BS: typeString = "backslash"; break; diff --git a/tests/parse.test b/tests/parse.test index 404f0a8..9427254 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.35 2008/11/17 22:37:36 ferrieux Exp $ +# RCS: @(#) $Id: parse.test,v 1.36 2008/11/27 08:23:52 ferrieux Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -234,7 +234,7 @@ test parse-5.28 {Tcl_ParseCommand: {*} parsing, expanded literals} testparser { } {- {{*}{a b}} 2 simple a 1 text a 0 simple b 1 text b 0 {}} test parse-5.29 {Tcl_ParseCommand: {*} parsing, expanded literals, naked backslashes} testparser { testparser {{*}{a \n b}} 0 -} {- {{*}{a \n b}} 3 simple a 1 text a 0 word {\n} 1 text-to-collapse {\n} 0 simple b 1 text b 0 {}} +} {- {{*}{a \n b}} 1 expand {{*}{a \n b}} 1 text {a \n b} 0 {}} test parse-6.1 {ParseTokens procedure, empty word} testparser { testparser {""} 0 -- cgit v0.12 From c8e7eb6d47e9cd382589a64d04200b61344351eb Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 29 Nov 2008 12:15:30 +0000 Subject: Improvements to the general readability of the TSD implementation. --- ChangeLog | 54 ++++---- generic/tclThreadStorage.c | 309 +++++++++++++++++++++++++++------------------ 2 files changed, 220 insertions(+), 143 deletions(-) diff --git a/ChangeLog b/ChangeLog index be37c31..9e5f936 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,22 @@ +2008-11-29 Donal K. Fellows + + * generic/tclThreadStorage.c: General revisions to make code clearer + and more like the style used in the rest of the core. Includes adding + more comments and explanation of what is going on. + 2008-11-27 Alexandre Ferrieux - * generic/tcl.h: Alternate fix for[Bug 2251175]: missing - * generic/tclCompile.c backslash substitution on expanded literals. - * generic/tclParse.c - * generic/tclTest.c - * tests/parse.test + * generic/tcl.h: Alternate fix for [Bug 2251175]: missing + * generic/tclCompile.c: backslash substitution on expanded literals. + * generic/tclParse.c: + * generic/tclTest.c: + * tests/parse.test: 2008-11-26 Jan Nijtmans * generic/tclIndexObj.c: Eliminate warning: unused variable - * generic/tclTest.c: A few more (harmless) Tcl_SetResult eliminations + * generic/tclTest.c: A few more (harmless) Tcl_SetResult + eliminations. 2008-11-26 Kevin B. Kenny @@ -22,19 +29,20 @@ * generic/tclIndexObj.c: Eliminate 3 calls to Tcl_SetResult, as * generic/tclIO.c examples how it should have been done. - * generic/tclTestObj.c purpose: contribute in the TIP #340 discussion. + * generic/tclTestObj.c purpose: contribute in the TIP #340 + discussion. 2008-11-25 Andreas Kupries * generic/tclIO.c (TclFinalizeIOSubsystem): Applied Alexandre - Ferrieux's patch for [Bug 2270477] to prevent infinite looping - during finalization of channels not bound to interpreters. + Ferrieux's patch for [Bug 2270477] to prevent infinite looping during + finalization of channels not bound to interpreters. 2008-11-25 Jan Nijtmans - * generic/tclTest.c: Don't assume that Tcl_SetResult - sets interp->result, especially not in a dstring test, - in preparation for TIP #340 + * generic/tclTest.c: Don't assume that Tcl_SetResult sets + interp->result, especially not in a dstring test, in preparation for + TIP #340 2008-11-24 Donal K. Fellows @@ -1048,17 +1056,17 @@ 2008-08-14 Daniel Steffen - * generic/tclBasic.c (TclNREvalObjv, Tcl_NRCallObjProc): DTrace probes - * generic/tclProc.c (TclNRInterpProcCore, InterpProcNR2): for NRE. - [Bug 2017160] + * generic/tclBasic.c (TclNREvalObjv, Tcl_NRCallObjProc): + * generic/tclProc.c (TclNRInterpProcCore, InterpProcNR2): + DTrace probes for NRE. [Bug 2017160] * generic/tclBasic.c (TclDTraceInfo): Add two extra arguments to * generic/tclCompile.h: DTrace 'info' probes for tclOO * generic/tclDTrace.d: method & class/object info. - * generic/tclCompile.h: Add support for debug logging of DTrace - * generic/tclBasic.c: 'proc', 'cmd' and 'inst' probes (does - _not_ require a platform with DTrace). + * generic/tclCompile.h: Add support for debug logging of DTrace + * generic/tclBasic.c: 'proc', 'cmd' and 'inst' probes (does _not_ + require a platform with DTrace). * generic/tclCmdIL.c (TclInfoFrame): Check fPtr->line before dereferencing as line info may @@ -1285,11 +1293,11 @@ 2008-08-01 Don Porter - * generic/tclBasic.c: Revised timing of the CmdFrame stack management - * tests/info.test: in TclEvalEx so that the CmdFrame will still - be on the stack at the time Tcl_LogCommandInfo is called to append - another level of -errorinfo information. Sets the stage to add file - and line data to the stack trace. Added test to check that [info + * generic/tclBasic.c: Revised timing of the CmdFrame stack + * tests/info.test: management in TclEvalEx so that the CmdFrame + will still be on the stack at the time Tcl_LogCommandInfo is called to + append another level of -errorinfo information. Sets the stage to add + file and line data to the stack trace. Added test to check that [info frame] functioning remains unchanged by the revision. 2008-07-31 Miguel Sofer diff --git a/generic/tclThreadStorage.c b/generic/tclThreadStorage.c index d0fdeec..71fa1e9 100644 --- a/generic/tclThreadStorage.c +++ b/generic/tclThreadStorage.c @@ -1,78 +1,117 @@ /* * tclThreadStorage.c -- * - * This file implements platform independent thread storage operations. + * This file implements platform independent thread storage operations to + * work around system limits on the number of thread-specific variables. * * Copyright (c) 2003-2004 by Joe Mistachkin * Copyright (c) 2008 by George Peter Staplin * - * The primary idea is that we create one platform-specific TSD slot, and - * use it for storing a table pointer. - * - * Each Tcl_ThreadDataKey has an offset into the table of TSD values. - * - * We don't use more than 1 platform-specific TSD slot, because there is - * a hard limit on the number of TSD slots. - * - * Valid key offsets are > 0. 0 is for the initialized Tcl_ThreadDataKey. - * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadStorage.c,v 1.16 2008/05/09 04:58:54 georgeps Exp $ + * RCS: @(#) $Id: tclThreadStorage.c,v 1.17 2008/11/29 12:15:30 dkf Exp $ */ #include "tclInt.h" + +#ifdef TCL_THREADS #include -#if defined(TCL_THREADS) +/* + * IMPLEMENTATION NOTES: + * + * The primary idea is that we create one platform-specific TSD slot, and use + * it for storing a table pointer. Each Tcl_ThreadDataKey has an offset into + * the table of TSD values. We don't use more than 1 platform-specific TSD + * slot, because there is a hard limit on the number of TSD slots. Valid key + * offsets are greater than 0; 0 is for the initialized Tcl_ThreadDataKey. + */ + +/* + * The master collection of information about TSDs. This is shared across the + * whole process, and includes the mutex used to protect it. + */ + +static struct TSDMaster { + void *key; /* Key into the system TSD structure. The + * collection of Tcl TSD values for a + * particular thread will hang off the + * back-end of this. */ + sig_atomic_t counter; /* The number of different Tcl TSDs used + * across *all* threads. This is a strictly + * increasing value. */ + Tcl_Mutex mutex; /* Protection for the rest of this structure, + * which holds per-process data. */ +} tsdMaster = { NULL, 0 }; -static void *tclTsdKey = NULL; -static Tcl_Mutex tclTsdMutex; -static sig_atomic_t tclTsdCounter = 0; +/* + * The type of the data held per thread in a system TSD. + */ typedef struct TSDTable { - sig_atomic_t allocated; - void **table; + ClientData *tablePtr; /* The table of Tcl TSDs. */ + sig_atomic_t allocated; /* The size of the table in the current + * thread. */ } TSDTable; -typedef union { - void *ptr; +/* + * The actual type of Tcl_ThreadDataKey. + */ + +typedef union TSDUnion { volatile sig_atomic_t offset; + /* The type is really an offset into the + * thread-local table of TSDs, which is this + * field. */ + void *ptr; /* For alignment purposes only. Not actually + * accessed through this. */ } TSDUnion; -static TSDTable *TSDTableCreate(void); -static void TSDTableDelete(TSDTable *t); -static void TSDTableGrow(TSDTable *t, sig_atomic_t atLeast); +/* + * Forward declarations of functions in this file. + */ +static TSDTable * TSDTableCreate(void); +static void TSDTableDelete(TSDTable *tsdTablePtr); +static void TSDTableGrow(TSDTable *tsdTablePtr, + sig_atomic_t atLeast); +/* + * Allocator and deallocator for a TSDTable structure. + */ + static TSDTable * -TSDTableCreate(void) { - TSDTable *t; +TSDTableCreate(void) +{ + TSDTable *tsdTablePtr; sig_atomic_t i; - t = TclpSysAlloc(sizeof *t, 0); - if (NULL == t) { + tsdTablePtr = TclpSysAlloc(sizeof(TSDTable), 0); + if (tsdTablePtr == NULL) { Tcl_Panic("unable to allocate TSDTable"); } - t->allocated = 8; - t->table = TclpSysAlloc(sizeof (*(t->table)) * t->allocated, 0); - if (NULL == t->table) { + tsdTablePtr->allocated = 8; + tsdTablePtr->tablePtr = + TclpSysAlloc(sizeof(void *) * tsdTablePtr->allocated, 0); + if (tsdTablePtr->tablePtr == NULL) { Tcl_Panic("unable to allocate TSDTable"); } - for (i = 0; i < t->allocated; ++i) { - t->table[i] = NULL; + for (i = 0; i < tsdTablePtr->allocated; ++i) { + tsdTablePtr->tablePtr[i] = NULL; } - return t; + return tsdTablePtr; } - + static void -TSDTableDelete(TSDTable *t) { - TclpSysFree(t->table); - TclpSysFree(t); +TSDTableDelete( + TSDTable *tsdTablePtr) +{ + TclpSysFree(tsdTablePtr->tablePtr); + TclpSysFree(tsdTablePtr); } /* @@ -80,34 +119,43 @@ TSDTableDelete(TSDTable *t) { * * TSDTableGrow -- * - * This procedure makes the passed TSDTable grow to fit the atLeast value. + * This procedure makes the passed TSDTable grow to fit the atLeast + * value. * - * Side effects: The table is enlarged. + * Results: + * None. + * + * Side effects: + * The table is enlarged. * *---------------------------------------------------------------------- */ + static void -TSDTableGrow(TSDTable *t, sig_atomic_t atLeast) { - sig_atomic_t newAllocated = t->allocated * 2; - void **newTablePtr; +TSDTableGrow( + TSDTable *tsdTablePtr, + sig_atomic_t atLeast) +{ + sig_atomic_t newAllocated = tsdTablePtr->allocated * 2; + ClientData *newTablePtr; sig_atomic_t i; if (newAllocated <= atLeast) { newAllocated = atLeast + 10; } - newTablePtr = TclpSysRealloc(t->table, sizeof (*newTablePtr) * newAllocated); - - if (NULL == newTablePtr) { + newTablePtr = TclpSysRealloc(tsdTablePtr->tablePtr, + sizeof(ClientData) * newAllocated); + if (newTablePtr == NULL) { Tcl_Panic("unable to reallocate TSDTable"); } - - for (i = t->allocated; i < newAllocated; ++i) { + + for (i = tsdTablePtr->allocated; i < newAllocated; ++i) { newTablePtr[i] = NULL; } - - t->allocated = newAllocated; - t->table = newTablePtr; + + tsdTablePtr->allocated = newAllocated; + tsdTablePtr->tablePtr = newTablePtr; } /* @@ -117,25 +165,28 @@ TSDTableGrow(TSDTable *t, sig_atomic_t atLeast) { * * This procedure gets the value associated with the passed key. * - * Results: A pointer value associated with the Tcl_ThreadDataKey or NULL. + * Results: + * A pointer value associated with the Tcl_ThreadDataKey or NULL. + * + * Side effects: + * None. * *---------------------------------------------------------------------- */ + void * -TclThreadStorageKeyGet(Tcl_ThreadDataKey *dataKeyPtr) { - TSDTable *t = TclpThreadGetMasterTSD(tclTsdKey); - void *resultPtr = NULL; - TSDUnion *keyPtr = (TSDUnion *)dataKeyPtr; +TclThreadStorageKeyGet( + Tcl_ThreadDataKey *dataKeyPtr) +{ + TSDTable *tsdTablePtr = TclpThreadGetMasterTSD(tsdMaster.key); + ClientData resultPtr = NULL; + TSDUnion *keyPtr = (TSDUnion *) dataKeyPtr; sig_atomic_t offset = keyPtr->offset; - - if (t == NULL) { - return NULL; - } - if (offset && offset > 0 && offset < t->allocated) { - resultPtr = t->table[offset]; + if ((tsdTablePtr != NULL) && (offset > 0) + && (offset < tsdTablePtr->allocated)) { + resultPtr = tsdTablePtr->tablePtr[offset]; } - return resultPtr; } @@ -144,53 +195,62 @@ TclThreadStorageKeyGet(Tcl_ThreadDataKey *dataKeyPtr) { * * TclThreadStorageKeySet -- * - * This procedure set an association of value with the key passed. - * The associated value may be retrieved with TclThreadDataKeyGet(). + * This procedure set an association of value with the key passed. The + * associated value may be retrieved with TclThreadDataKeyGet(). * - * Side effects: The thread-specific table may be created or reallocated. + * Results: + * None. + * + * Side effects: + * The thread-specific table may be created or reallocated. * *---------------------------------------------------------------------- */ void -TclThreadStorageKeySet(Tcl_ThreadDataKey *dataKeyPtr, void *value) { - TSDTable *t = TclpThreadGetMasterTSD(tclTsdKey); - TSDUnion *keyPtr = (TSDUnion *)dataKeyPtr; +TclThreadStorageKeySet( + Tcl_ThreadDataKey *dataKeyPtr, + void *value) +{ + TSDTable *tsdTablePtr = TclpThreadGetMasterTSD(tsdMaster.key); + TSDUnion *keyPtr = (TSDUnion *) dataKeyPtr; - if (NULL == t) { - t = TSDTableCreate(); - TclpThreadSetMasterTSD(tclTsdKey, t); + if (tsdTablePtr == NULL) { + tsdTablePtr = TSDTableCreate(); + TclpThreadSetMasterTSD(tsdMaster.key, tsdTablePtr); } - Tcl_MutexLock(&tclTsdMutex); + /* + * Get the lock while we check if this TSD is new or not. Note that this + * is the only place where Tcl_ThreadDataKey values are set. + */ - if (0 == keyPtr->offset) { + Tcl_MutexLock(&tsdMaster.mutex); + if (keyPtr->offset == 0) { /* - * The Tcl_ThreadDataKey hasn't been used yet. + * The Tcl_ThreadDataKey hasn't been used yet. Make a new one. */ - ++tclTsdCounter; - - if (tclTsdCounter >= t->allocated) { - TSDTableGrow(t, tclTsdCounter); - } - - keyPtr->offset = tclTsdCounter; - t->table[tclTsdCounter] = value; - } else { + keyPtr->offset = ++tsdMaster.counter; + } + Tcl_MutexUnlock(&tsdMaster.mutex); - if (keyPtr->offset >= t->allocated) { - /* - * This is the first time this Tcl_ThreadDataKey has been - * used with the current thread. - */ - TSDTableGrow(t, keyPtr->offset); - } + /* + * Check if this is the first time this Tcl_ThreadDataKey has been used + * with the current thread. Note that we don't need to hold a lock when + * doing this, as we are *definitely* the only point accessing this + * tsdTablePtr right now; it's thread-local. + */ - t->table[keyPtr->offset] = value; + if (keyPtr->offset >= tsdTablePtr->allocated) { + TSDTableGrow(tsdTablePtr, keyPtr->offset); } - Tcl_MutexUnlock(&tclTsdMutex); + /* + * Set the value in the Tcl thread-local variable. + */ + + tsdTablePtr->tablePtr[keyPtr->offset] = value; } /* @@ -198,23 +258,26 @@ TclThreadStorageKeySet(Tcl_ThreadDataKey *dataKeyPtr, void *value) { * * TclFinalizeThreadDataThread -- * - * This procedure finalizes the data for a single thread. - * + * This procedure finalizes the data for a single thread. + * + * Results: + * None. + * + * Side effects: + * The TSDTable is deleted/freed. * - * Side effects: The TSDTable is deleted/freed. *---------------------------------------------------------------------- */ + void -TclFinalizeThreadDataThread(void) { - TSDTable *t = TclpThreadGetMasterTSD(tclTsdKey); +TclFinalizeThreadDataThread(void) +{ + TSDTable *tsdTablePtr = TclpThreadGetMasterTSD(tsdMaster.key); - if (NULL == t) { - return; + if (tsdTablePtr != NULL) { + TSDTableDelete(tsdTablePtr); + TclpThreadSetMasterTSD(tsdMaster.key, NULL); } - - TSDTableDelete(t); - - TclpThreadSetMasterTSD(tclTsdKey, NULL); } /* @@ -222,14 +285,22 @@ TclFinalizeThreadDataThread(void) { * * TclInitializeThreadStorage -- * - * This procedure initializes the TSD subsystem with per-platform - * code. This should be called before any Tcl threads are created. + * This procedure initializes the TSD subsystem with per-platform code. + * This should be called before any Tcl threads are created. + * + * Results: + * None. + * + * Side effects: + * Allocates a system TSD. * *---------------------------------------------------------------------- */ + void -TclInitThreadStorage(void) { - tclTsdKey = TclpThreadCreateKey(); +TclInitThreadStorage(void) +{ + tsdMaster.key = TclpThreadCreateKey(); } /* @@ -237,27 +308,26 @@ TclInitThreadStorage(void) { * * TclFinalizeThreadStorage -- * - * This procedure cleans up the thread storage data key for all - * threads. - * - * IMPORTANT: All Tcl threads must be finalized before calling this! + * This procedure cleans up the thread storage data key for all threads. + * IMPORTANT: All Tcl threads must be finalized before calling this! * * Results: - * None. + * None. * * Side effects: - * Releases the thread data key. + * Releases the thread data key. * *---------------------------------------------------------------------- */ + void -TclFinalizeThreadStorage(void) { - TclpThreadDeleteKey(tclTsdKey); - tclTsdKey = NULL; +TclFinalizeThreadStorage(void) +{ + TclpThreadDeleteKey(tsdMaster.key); + tsdMaster.key = NULL; } -#else /* !defined(TCL_THREADS) */ - +#else /* !TCL_THREADS */ /* * Stub functions for non-threaded builds */ @@ -276,8 +346,7 @@ void TclFinalizeThreadStorage(void) { } - -#endif /* defined(TCL_THREADS) && defined(USE_THREAD_STORAGE) */ +#endif /* TCL_THREADS */ /* * Local Variables: -- cgit v0.12 From a083198d1f3f7108b6455c4dad72ac0d85a2015a Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 29 Nov 2008 12:18:34 +0000 Subject: Code now simple enough that we can improve its performance by applying the double-checked locking pattern. --- ChangeLog | 3 ++- generic/tclThreadStorage.c | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e5f936..e9cafe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,8 @@ * generic/tclThreadStorage.c: General revisions to make code clearer and more like the style used in the rest of the core. Includes adding - more comments and explanation of what is going on. + more comments and explanation of what is going on. Reduce the amount + of locking required. 2008-11-27 Alexandre Ferrieux diff --git a/generic/tclThreadStorage.c b/generic/tclThreadStorage.c index 71fa1e9..1568998 100644 --- a/generic/tclThreadStorage.c +++ b/generic/tclThreadStorage.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadStorage.c,v 1.17 2008/11/29 12:15:30 dkf Exp $ + * RCS: @(#) $Id: tclThreadStorage.c,v 1.18 2008/11/29 12:18:35 dkf Exp $ */ #include "tclInt.h" @@ -222,18 +222,23 @@ TclThreadStorageKeySet( /* * Get the lock while we check if this TSD is new or not. Note that this - * is the only place where Tcl_ThreadDataKey values are set. + * is the only place where Tcl_ThreadDataKey values are set. We use a + * double-checked lock to try to avoid having to grab this lock a lot, + * since it is on quite a few critical paths and will only get set once in + * each location. */ - Tcl_MutexLock(&tsdMaster.mutex); if (keyPtr->offset == 0) { - /* - * The Tcl_ThreadDataKey hasn't been used yet. Make a new one. - */ - - keyPtr->offset = ++tsdMaster.counter; + Tcl_MutexLock(&tsdMaster.mutex); + if (keyPtr->offset == 0) { + /* + * The Tcl_ThreadDataKey hasn't been used yet. Make a new one. + */ + + keyPtr->offset = ++tsdMaster.counter; + } + Tcl_MutexUnlock(&tsdMaster.mutex); } - Tcl_MutexUnlock(&tsdMaster.mutex); /* * Check if this is the first time this Tcl_ThreadDataKey has been used -- cgit v0.12 From c2e6687a1fb90743f1c56b21cde68e1344b202cc Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 29 Nov 2008 14:44:24 +0000 Subject: Moved a number of tests to the newer style. --- tests/registry.test | 224 ++++++++++++++++++++++++++++------------------------ 1 file changed, 122 insertions(+), 102 deletions(-) diff --git a/tests/registry.test b/tests/registry.test index 46b49ba..62c9d84 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -10,7 +10,7 @@ # Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# RCS: @(#) $Id: registry.test,v 1.23 2008/11/12 13:32:28 patthoyts Exp $ +# RCS: @(#) $Id: registry.test,v 1.24 2008/11/29 14:44:24 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -463,153 +463,173 @@ test registry-6.20 {GetValue: values with Unicode strings with embedded nulls} { set result } "foo ba r baz" -test registry-7.1 {GetValueNames: bad key} {win reg english} { +test registry-7.1 {GetValueNames: bad key} -constraints {win reg english} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar - list [catch {registry values HKEY_CURRENT_USER\\TclFoobar} msg] $msg -} {1 {unable to open key: The system cannot find the file specified.}} -test registry-7.2 {GetValueNames} {win reg} { +} -body { + registry values HKEY_CURRENT_USER\\TclFoobar +} -returnCodes error -result {unable to open key: The system cannot find the file specified.} +test registry-7.2 {GetValueNames} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar registry set HKEY_CURRENT_USER\\TclFoobar baz foobar - set result [registry values HKEY_CURRENT_USER\\TclFoobar] +} -body { + registry values HKEY_CURRENT_USER\\TclFoobar +} -cleanup { registry delete HKEY_CURRENT_USER\\TclFoobar - set result -} baz -test registry-7.3 {GetValueNames} {win reg} { +} -result baz +test registry-7.3 {GetValueNames} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar registry set HKEY_CURRENT_USER\\TclFoobar baz foobar1 registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 registry set HKEY_CURRENT_USER\\TclFoobar {} foobar3 - set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar]] +} -body { + lsort [registry values HKEY_CURRENT_USER\\TclFoobar] +} -cleanup { registry delete HKEY_CURRENT_USER\\TclFoobar - set result -} {{} baz blat} -test registry-7.4 {GetValueNames: remote key} {win reg nonPortable english} { +} -result {{} baz blat} +test registry-7.4 {GetValueNames: remote key} -constraints {win reg nonPortable english} -body { set hostname [info hostname] registry set \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar baz blat set result [registry values \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar] registry delete \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar set result -} baz -test registry-7.5 {GetValueNames: empty key} {win reg} { +} -result baz +test registry-7.5 {GetValueNames: empty key} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar registry set HKEY_CURRENT_USER\\TclFoobar - set result [registry values HKEY_CURRENT_USER\\TclFoobar] +} -body { + registry values HKEY_CURRENT_USER\\TclFoobar +} -cleanup { registry delete HKEY_CURRENT_USER\\TclFoobar - set result -} {} -test registry-7.6 {GetValueNames: patterns} {win reg} { +} -result {} +test registry-7.6 {GetValueNames: patterns} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar registry set HKEY_CURRENT_USER\\TclFoobar baz foobar1 registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 registry set HKEY_CURRENT_USER\\TclFoobar foo foobar3 - set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*]] +} -body { + lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*] +} -cleanup { registry delete HKEY_CURRENT_USER\\TclFoobar - set result -} {baz blat} -test registry-7.7 {GetValueNames: names with spaces} {win reg} { +} -result {baz blat} +test registry-7.7 {GetValueNames: names with spaces} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar registry set HKEY_CURRENT_USER\\TclFoobar baz\ bar foobar1 registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 registry set HKEY_CURRENT_USER\\TclFoobar foo foobar3 - set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*]] +} -body { + lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*] +} -cleanup { registry delete HKEY_CURRENT_USER\\TclFoobar - set result -} {{baz bar} blat} +} -result {{baz bar} blat} -test registry-8.1 {OpenSubKey} {win reg nonPortable english} { - # This test will only succeed if the current user does not have registry - # access on the specified machine. - list [catch {registry keys {\\mom\HKEY_LOCAL_MACHINE}} msg] $msg -} {1 {unable to open key: Access is denied.}} -test registry-8.2 {OpenSubKey} {win reg} { +test registry-8.1 {OpenSubKey} -constraints {win reg nonPortable english} \ + -body { + # This test will only succeed if the current user does not have + # registry access on the specified machine. + registry keys {\\mom\HKEY_LOCAL_MACHINE} + } -returnCodes error -result "unable to open key: Access is denied." +test registry-8.2 {OpenSubKey} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar registry set HKEY_CURRENT_USER\\TclFoobar - set result [registry keys HKEY_CURRENT_USER TclFoobar] +} -body { + registry keys HKEY_CURRENT_USER TclFoobar +} -cleanup { registry delete HKEY_CURRENT_USER\\TclFoobar - set result -} TclFoobar -test registry-8.3 {OpenSubKey} {win reg english} { +} -result {TclFoobar} +test registry-8.3 {OpenSubKey} -constraints {win reg english} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar - list [catch {registry keys HKEY_CURRENT_USER\\TclFoobar} msg] $msg -} {1 {unable to open key: The system cannot find the file specified.}} +} -body { + registry keys HKEY_CURRENT_USER\\TclFoobar +} -returnCodes error \ + -result "unable to open key: The system cannot find the file specified." -test registry-9.1 {ParseKeyName: bad keys} {win reg} { - list [catch {registry values \\} msg] $msg -} "1 {bad key \"\\\": must start with a valid root}" -test registry-9.2 {ParseKeyName: bad keys} {win reg} { - list [catch {registry values \\foobar} msg] $msg -} {1 {bad key "\foobar": must start with a valid root}} -test registry-9.3 {ParseKeyName: bad keys} {win reg} { - list [catch {registry values \\\\} msg] $msg -} {1 {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}} -test registry-9.4 {ParseKeyName: bad keys} {win reg} { - list [catch {registry values \\\\\\} msg] $msg -} {1 {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}} -test registry-9.5 {ParseKeyName: bad keys} {win reg english nt} { - list [catch {registry values \\\\\\HKEY_CLASSES_ROOT} msg] $msg -} {1 {unable to open key: The network address is invalid.}} -test registry-9.6 {ParseKeyName: bad keys} {win reg} { - list [catch {registry values \\\\gaspode} msg] $msg -} {1 {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}} -test registry-9.7 {ParseKeyName: bad keys} {win reg} { - list [catch {registry values foobar} msg] $msg -} {1 {bad root name "foobar": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}} -test registry-9.8 {ParseKeyName: null keys} {win reg} { - list [catch {registry delete HKEY_CLASSES_ROOT\\} msg] $msg -} {1 {bad key: cannot delete root keys}} -test registry-9.9 {ParseKeyName: null keys} {win reg english} { - list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar\\baz} msg] $msg -} {1 {unable to open key: The system cannot find the file specified.}} +test registry-9.1 {ParseKeyName: bad keys} -constraints {win reg} -body { + registry values \\ +} -returnCodes error -result "bad key \"\\\": must start with a valid root" +test registry-9.2 {ParseKeyName: bad keys} -constraints {win reg} -body { + registry values \\foobar +} -returnCodes error -result {bad key "\foobar": must start with a valid root} +test registry-9.3 {ParseKeyName: bad keys} -constraints {win reg} -body { + registry values \\\\ +} -returnCodes error -result {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA} +test registry-9.4 {ParseKeyName: bad keys} -constraints {win reg} -body { + registry values \\\\\\ +} -returnCodes error -result {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA} +test registry-9.5 {ParseKeyName: bad keys} -constraints {win reg english nt} -body { + registry values \\\\\\HKEY_CLASSES_ROOT +} -returnCodes error -result {unable to open key: The network address is invalid.} +test registry-9.6 {ParseKeyName: bad keys} -constraints {win reg} -body { + registry values \\\\gaspode +} -returnCodes error -result {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA} +test registry-9.7 {ParseKeyName: bad keys} -constraints {win reg} -body { + registry values foobar +} -returnCodes error -result {bad root name "foobar": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA} +test registry-9.8 {ParseKeyName: null keys} -constraints {win reg} -body { + registry delete HKEY_CLASSES_ROOT\\ +} -returnCodes error -result {bad key: cannot delete root keys} +test registry-9.9 {ParseKeyName: null keys} \ + -constraints {win reg english} \ + -body {registry keys HKEY_CLASSES_ROOT\\TclFoobar\\baz} \ + -returnCodes error \ + -result {unable to open key: The system cannot find the file specified.} -test registry-10.1 {RecursiveDeleteKey} {win reg} { +test registry-10.1 {RecursiveDeleteKey} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar +} -body { registry set HKEY_CURRENT_USER\\TclFoobar\\test1 registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 registry delete HKEY_CURRENT_USER\\TclFoobar set result [registry keys HKEY_CURRENT_USER TclFoobar] set result -} {} -test registry-10.2 {RecursiveDeleteKey} {win reg} { +} -result {} +test registry-10.2 {RecursiveDeleteKey} -constraints {win reg} -setup { registry delete HKEY_CURRENT_USER\\TclFoobar registry set HKEY_CURRENT_USER\\TclFoobar\\test1 registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 - set result [registry delete HKEY_CURRENT_USER\\TclFoobar\\test2\\test4] +} -body { + registry delete HKEY_CURRENT_USER\\TclFoobar\\test2\\test4 +} -cleanup { registry delete HKEY_CURRENT_USER\\TclFoobar - set result -} {} +} -result {} -test registry-11.1 {SetValue: recursive creation} {win reg} { - registry delete HKEY_CURRENT_USER\\TclFoobar - registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar - set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] -} foobar -test registry-11.2 {SetValue: modification} {win reg} { - registry delete HKEY_CURRENT_USER\\TclFoobar - registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar - registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat frob - set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] -} frob -test registry-11.3 {SetValue: failure} {win reg nonPortable english} { - # This test will only succeed if the current user does not have registry - # access on the specified machine. - list [catch {registry set {\\mom\HKEY_CURRENT_USER\TclFoobar} bar foobar} msg] $msg -} {1 {unable to open key: Access is denied.}} +test registry-11.1 {SetValue: recursive creation} \ + -constraints {win reg} -setup { + registry delete HKEY_CURRENT_USER\\TclFoobar + } -body { + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar + set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] + } -result {foobar} +test registry-11.2 {SetValue: modification} -constraints {win reg} \ + -setup { + registry delete HKEY_CURRENT_USER\\TclFoobar + } -body { + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat frob + set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] + } -result {frob} +test registry-11.3 {SetValue: failure} \ + -constraints {win reg nonPortable english} \ + -body { + # This test will only succeed if the current user does not have + # registry access on the specified machine. + registry set {\\mom\HKEY_CURRENT_USER\TclFoobar} bar foobar + } -returnCodes error -result {unable to open key: Access is denied.} -test registry-12.1 {BroadcastValue} {win reg} { - list [catch {registry broadcast} msg] $msg -} {1 {wrong # args: should be "registry broadcast keyName ?-timeout millisecs?"}} -test registry-12.2 {BroadcastValue} {win reg} { - list [catch {registry broadcast "" -time} msg] $msg -} {1 {wrong # args: should be "registry broadcast keyName ?-timeout millisecs?"}} -test registry-12.3 {BroadcastValue} {win reg} { - list [catch {registry broadcast "" - 500} msg] $msg -} {1 {wrong # args: should be "registry broadcast keyName ?-timeout millisecs?"}} -test registry-12.4 {BroadcastValue} {win reg} { - list [catch {registry broadcast {Environment}} msg] $msg -} {0 {1 0}} -test registry-12.5 {BroadcastValue} {win reg} { - list [catch {registry b {}} msg] $msg -} {0 {1 0}} +test registry-12.1 {BroadcastValue} -constraints {win reg} -body { + registry broadcast +} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout millisecs?\"" +test registry-12.2 {BroadcastValue} -constraints {win reg} -body { + registry broadcast "" -time +} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout millisecs?\"" +test registry-12.3 {BroadcastValue} -constraints {win reg} -body { + registry broadcast "" - 500 +} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout millisecs?\"" +test registry-12.4 {BroadcastValue} -constraints {win reg} -body { + registry broadcast {Environment} +} -result {1 0} +test registry-12.5 {BroadcastValue} -constraints {win reg} -body { + registry b {} +} -result {1 0} # cleanup ::tcltest::cleanupTests -- cgit v0.12 From d4fe85608c6a720a326e2fcf70e24364f8af4119 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 29 Nov 2008 18:17:19 +0000 Subject: Implementation of TIP #210. --- ChangeLog | 9 +++ doc/file.n | 19 ++++++- generic/tclCmdAH.c | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++-- generic/tclInt.h | 5 +- tests/cmdAH.test | 53 +++++++++++++++++- unix/configure.in | 33 ++++++----- unix/tclUnixFCmd.c | 123 ++++++++++++++++++++++++++++++++++++++++- win/tclWinPipe.c | 122 ++++++++++++++++++++++++++++------------ 8 files changed, 459 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9cafe5..3e7289e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2008-11-29 Donal K. Fellows + TIP #210 IMPLEMENTATION + + * generic/tclCmdAH.c (FileTempfileCmd): + * unix/tclUnixFCmd.c (TclpOpenTemporaryFile, DefaultTempDir): + * win/tclWinPipe.c (TclpOpenTemporaryFile): + * doc/file.n, tests/cmdAH.test: Implementation of [file tempfile]. I + do not claim that this is a brilliant implementation, especially on + Windows, but it covers the main points. + * generic/tclThreadStorage.c: General revisions to make code clearer and more like the style used in the rest of the core. Includes adding more comments and explanation of what is going on. Reduce the amount diff --git a/doc/file.n b/doc/file.n index beeca80..eb51450 100644 --- a/doc/file.n +++ b/doc/file.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: file.n,v 1.55 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: file.n,v 1.56 2008/11/29 18:17:19 dkf Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -435,6 +435,19 @@ If \fIname\fR contains no separators then returns \fIname\fR. So, \fBfile tail a/b\fR, \fBfile tail a/b/\fR and \fBfile tail b\fR all return \fBb\fR. .TP +\fBfile tempfile\fR ?\fInameVar\fR? ?\fItemplate\fR? +'\" TIP #210 +.VS 8.6 +Creates a temporary file and returns a read-write channel opened on that file. +If the \fInameVar\fR is given, it specifies a variable that the name of the +temporary file will be written into; if absent, Tcl will attempt to arrange +for the temporary file to be deleted once it is no longer required. If the +\fItemplate\fR is present, it specifies parts of the template of the filename +to use when creating it (such as the directory, base-name or extension) though +some platforms may ignore some or all of these parts and use a built-in +default instead. +.VE 8.6 +.TP \fBfile type \fIname\fR . Returns a string giving the type of file \fIname\fR, which will be one of @@ -519,3 +532,7 @@ filename(n), open(n), close(n), eof(n), gets(n), tell(n), seek(n), fblocked(n), flush(n) .SH KEYWORDS attributes, copy files, delete files, directory, file, move files, name, rename files, stat +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index df24e16..19ef57e 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.109 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.110 2008/11/29 18:17:20 dkf Exp $ */ #include "tclInt.h" @@ -45,6 +45,8 @@ static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr, static int EncodingDirsObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +static int FileTempfileCmd(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); static inline int ForeachAssignments(Tcl_Interp *interp, struct ForeachState *statePtr); static inline void ForeachCleanup(Tcl_Interp *interp, @@ -893,8 +895,8 @@ Tcl_FileObjCmd( "normalize", "owned", "pathtype", "readable", "readlink", "rename", "rootname", "separator", "size", "split", - "stat", "system", - "tail", "type", "volumes", "writable", + "stat", "system", "tail", "tempfile", + "type", "volumes", "writable", NULL }; enum options { @@ -906,8 +908,8 @@ Tcl_FileObjCmd( FCMD_NORMALIZE, FCMD_OWNED, FCMD_PATHTYPE, FCMD_READABLE, FCMD_READLINK, FCMD_RENAME, FCMD_ROOTNAME, FCMD_SEPARATOR, FCMD_SIZE, FCMD_SPLIT, - FCMD_STAT, FCMD_SYSTEM, - FCMD_TAIL, FCMD_TYPE, FCMD_VOLUMES, FCMD_WRITABLE + FCMD_STAT, FCMD_SYSTEM, FCMD_TAIL, FCMD_TEMPFILE, + FCMD_TYPE, FCMD_VOLUMES, FCMD_WRITABLE }; if (objc < 2) { @@ -1414,6 +1416,8 @@ Tcl_FileObjCmd( Tcl_DecrRefCount(dirPtr); return TCL_OK; } + case FCMD_TEMPFILE: + return FileTempfileCmd(interp, objc, objv); case FCMD_VOLUMES: if (objc != 2) { Tcl_WrongNumArgs(interp, 2, objv, NULL); @@ -1635,6 +1639,151 @@ GetTypeFromMode( } /* + *--------------------------------------------------------------------------- + * + * FileTempfileCmd + * + * This function implements the "tempfile" subcommand of the "file" + * command. + * + * Results: + * Returns a standard Tcl result. + * + * Side effects: + * Creates a temporary file. Opens a channel to that file and puts the + * name of that channel in the result. *Might* register suitable exit + * handlers to ensure that the temporary file gets deleted. Might write + * to a variable, so reentrancy is a potential issue. + * + *--------------------------------------------------------------------------- + */ + +static int +FileTempfileCmd( + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Tcl_Obj *nameVarObj = NULL; /* Variable to store the name of the temporary + * file in. */ + Tcl_Obj *nameObj = NULL; /* Object that will contain the filename. */ + Tcl_Channel chan; /* The channel opened (RDWR) on the temporary + * file, or NULL if there's an error. */ + Tcl_Obj *tempDirObj = NULL, *tempBaseObj = NULL, *tempExtObj = NULL; + /* Pieces of template. Each piece is NULL if + * it is omitted. The platform temporary file + * engine might ignore some pieces. */ + + if (objc < 2 || objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "?nameVar? ?template?"); + return TCL_ERROR; + } + + if (objc > 2) { + nameVarObj = objv[2]; + TclNewObj(nameObj); + } + if (objc > 3) { + int length; + const char *string = TclGetStringFromObj(objv[3], &length); + + /* + * Treat an empty string as if it wasn't there. + */ + + if (length == 0) { + goto makeTemporary; + } + + /* + * The template only gives a directory if there is a directory + * separator in it. + */ + + if (strchr(string, '/') != NULL + || (tclPlatform == TCL_PLATFORM_WINDOWS + && strchr(string, '\\') != NULL)) { + tempDirObj = TclPathPart(interp, objv[3], TCL_PATH_DIRNAME); + } + + /* + * The template only gives the filename if the last character isn't a + * directory separator. + */ + + if (string[length-1] != '/' && (tclPlatform != TCL_PLATFORM_WINDOWS + || string[length-1] != '\\')) { + Tcl_Obj *tailObj = TclPathPart(interp, objv[3], TCL_PATH_TAIL); + + tempBaseObj = TclPathPart(interp, tailObj, TCL_PATH_ROOT); + tempExtObj = TclPathPart(interp, tailObj, TCL_PATH_EXTENSION); + TclDecrRefCount(tailObj); + } + } + + /* + * Convert empty parts of the template into unspecified parts. + */ + + if (tempDirObj && !TclGetString(tempDirObj)[0]) { + TclDecrRefCount(tempDirObj); + tempDirObj = NULL; + } + if (tempBaseObj && !TclGetString(tempBaseObj)[0]) { + TclDecrRefCount(tempBaseObj); + tempBaseObj = NULL; + } + if (tempExtObj && !TclGetString(tempExtObj)[0]) { + TclDecrRefCount(tempExtObj); + tempExtObj = NULL; + } + + /* + * Create and open the temporary file. + */ + + makeTemporary: + chan = TclpOpenTemporaryFile(tempDirObj,tempBaseObj,tempExtObj, nameObj); + + /* + * If we created pieces of template, get rid of them now. + */ + + if (tempDirObj) { + TclDecrRefCount(tempDirObj); + } + if (tempBaseObj) { + TclDecrRefCount(tempBaseObj); + } + if (tempExtObj) { + TclDecrRefCount(tempExtObj); + } + + /* + * Deal with results. + */ + + if (chan == NULL) { + if (nameVarObj) { + TclDecrRefCount(nameObj); + } + Tcl_AppendResult(interp, "can't create temporary file: ", + Tcl_PosixError(interp), NULL); + return TCL_ERROR; + } + Tcl_RegisterChannel(interp, chan); + if (nameVarObj != NULL) { + if (Tcl_ObjSetVar2(interp, nameVarObj, NULL, nameObj, + TCL_LEAVE_ERR_MSG) == NULL) { + Tcl_UnregisterChannel(interp, chan); + return TCL_ERROR; + } + } + Tcl_AppendResult(interp, Tcl_GetChannelName(chan), NULL); + return TCL_OK; +} + +/* *---------------------------------------------------------------------- * * Tcl_ForObjCmd -- diff --git a/generic/tclInt.h b/generic/tclInt.h index 027e93e..85c8c00 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.406 2008/11/13 22:34:33 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.407 2008/11/29 18:17:20 dkf Exp $ */ #ifndef _TCLINT @@ -2783,6 +2783,9 @@ MODULE_SCOPE Tcl_FSDupInternalRepProc TclNativeDupInternalRep; MODULE_SCOPE Tcl_Obj * TclpObjLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkType); MODULE_SCOPE int TclpObjChdir(Tcl_Obj *pathPtr); +MODULE_SCOPE Tcl_Channel TclpOpenTemporaryFile(Tcl_Obj *dirObj, + Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, + Tcl_Obj *resultingNameObj); MODULE_SCOPE Tcl_Obj * TclPathPart(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_PathPart portion); MODULE_SCOPE void TclpPanic(const char *format, ...); diff --git a/tests/cmdAH.test b/tests/cmdAH.test index cca533f..b5408dd 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.63 2008/09/24 19:31:29 dgp Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.64 2008/11/29 18:17:19 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -201,7 +201,7 @@ test cmdAH-5.1 {Tcl_FileObjCmd} -returnCodes error -body { } -result {wrong # args: should be "file option ?arg ...?"} test cmdAH-5.2 {Tcl_FileObjCmd} -returnCodes error -body { file x -} -result {bad option "x": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable} +} -result {bad option "x": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, tempfile, type, volumes, or writable} test cmdAH-5.3 {Tcl_FileObjCmd} -returnCodes error -body { file exists } -result {wrong # args: should be "file exists name"} @@ -1445,7 +1445,7 @@ test cmdAH-29.5 {Tcl_FileObjCmd: type} { test cmdAH-30.1 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { file gorp x -} -result {bad option "gorp": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, type, volumes, or writable} +} -result {bad option "gorp": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, tempfile, type, volumes, or writable} test cmdAH-30.2 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { file ex x } -match glob -result {ambiguous option "ex": must be *} @@ -1530,6 +1530,53 @@ test cmdAH-31.13 {Tcl_FileObjCmd: channels in other interp} { safeInterp eval [list file channels] } {stdout} +# Temp files (TIP#210) +test cmdAH-32.1 {file tempfile - usage} -returnCodes error -body { + file tempfile a b c +} -result {wrong # args: should be "file tempfile ?nameVar? ?template?"} +test cmdAH-32.2 {file tempfile - returns a read/write channel} -body { + set f [file tempfile] + puts $f ok + seek $f 0 + gets $f +} -cleanup { + catch {close $f} +} -result ok +test cmdAH-32.3 {file tempfile - makes filenames} -setup { + catch {unset name} +} -body { + set result [info exists name] + set f [file tempfile name] + lappend result [info exists name] [file exists $name] + close $f + lappend result [file exists $name] +} -cleanup { + catch {close $f} + catch {file delete $name} +} -result {0 1 1 1} +# We try to obey the template on Unix, but don't (currently) bother on Win +test cmdAH-32.4 {file tempfile - templates} -constraints unix -body { + close [file tempfile name foo] + expr {[string match foo* [file tail $name]] ? "ok" : "foo produced $name"} +} -cleanup { + catch {file delete $name} +} -result ok +test cmdAH-32.5 {file tempfile - templates} -constraints unix -body { + set template [file join $dirfile foo] + close [file tempfile name $template] + expr {[string match $template* $name] ? "ok" : "$template produced $name"} +} -cleanup { + catch {file delete $name} +} -result ok +test cmdAH-32.6 {file tempfile - templates} -constraints unix -body { + set template [file join $dirfile foo] + close [file tempfile name $template.bar] + expr {[string match $template*.bar $name] ? "ok" : + "$template.bar produced $name"} +} -cleanup { + catch {file delete $name} +} -result ok + # This shouldn't work, but just in case a test above failed... catch {close $newFileId} diff --git a/unix/configure.in b/unix/configure.in index 61153a5..e5dc12b 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.189 2008/10/14 20:08:21 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.190 2008/11/29 18:17:19 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -244,24 +244,24 @@ fi SC_TIME_HANDLER #-------------------------------------------------------------------- -# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field -# in struct stat. But we might be able to use fstatfs instead. +# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field in struct +# stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- AC_STRUCT_ST_BLKSIZE AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])]) #-------------------------------------------------------------------- -# Some system have no memcmp or it does not work with 8 bit -# data, this checks it and add memcmp.o to LIBOBJS if needed +# Some system have no memcmp or it does not work with 8 bit data, this +# checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- AC_FUNC_MEMCMP #-------------------------------------------------------------------- -# Some system like SunOS 4 and other BSD like systems -# have no memmove (we assume they have bcopy instead). -# {The replacement define is in compat/string.h} +# Some system like SunOS 4 and other BSD like systems have no memmove +# (we assume they have bcopy instead). {The replacement define is in +# compat/string.h} #-------------------------------------------------------------------- AC_CHECK_FUNC(memmove, , [ @@ -269,8 +269,8 @@ AC_CHECK_FUNC(memmove, , [ AC_DEFINE(NO_STRING_H, 1, [Do we have ?]) ]) #-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even -# even if the original string is empty. +# On some systems strstr is broken: it returns a pointer even even if +# the original string is empty. #-------------------------------------------------------------------- SC_TCL_CHECK_BROKEN_FUNC(strstr, [ @@ -486,10 +486,10 @@ fi SC_ENABLE_LANGINFO #-------------------------------------------------------------------- -# Check for support of chflags function +# Check for support of chflags and mkstemps functions #-------------------------------------------------------------------- -AC_CHECK_FUNCS(chflags) +AC_CHECK_FUNCS(chflags mkstemps) #-------------------------------------------------------------------- # Check for support of isnan() function or macro @@ -552,7 +552,7 @@ else fi #-------------------------------------------------------------------- -# Check for support of fts functions (readdir replacement) +# Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- AC_CACHE_CHECK([for fts], tcl_cv_api_fts, [ @@ -570,10 +570,9 @@ if test $tcl_cv_api_fts = yes; then fi #-------------------------------------------------------------------- -# The statements below check for systems where POSIX-style -# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. -# On these systems (mostly older ones), use the old BSD-style -# FIONBIO approach instead. +# The statements below check for systems where POSIX-style non-blocking +# I/O (O_NONBLOCK) doesn't work or is unimplemented. On these systems +# (mostly older ones), use the old BSD-style FIONBIO approach instead. #-------------------------------------------------------------------- SC_BLOCKING_STYLE diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 868e98e..442c6d6 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.69 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.70 2008/11/29 18:17:19 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -181,6 +181,7 @@ const TclFileAttrProcs tclpFileAttrProcs[] = { static int CopyFileAtts(const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); +static const char * DefaultTempDir(void); static int DoCopyFile(const char *srcPtr, const char *dstPtr, const Tcl_StatBuf *statBufPtr); static int DoCreateDirectory(const char *pathPtr); @@ -2090,6 +2091,126 @@ TclpObjNormalizePath( return nextCheckpoint; } +/* + *---------------------------------------------------------------------- + * + * TclpOpenTemporaryFile -- + * + * Creates a temporary file, possibly based on the supplied bits and + * pieces of template supplied in the first three arguments. If the + * fourth argument is non-NULL, it contains a Tcl_Obj to store the name + * of the temporary file in (and it is caller's responsibility to clean + * up). If the fourth argument is NULL, try to arrange for the temporary + * file to go away once it is no longer needed. + * + * Results: + * A read-write Tcl Channel open on the file. + * + *---------------------------------------------------------------------- + */ + +Tcl_Channel +TclpOpenTemporaryFile( + Tcl_Obj *dirObj, + Tcl_Obj *basenameObj, + Tcl_Obj *extensionObj, + Tcl_Obj *resultingNameObj) +{ + Tcl_Channel chan; + Tcl_DString template, tmp; + const char *string; + int len, fd; + + if (dirObj) { + string = Tcl_GetStringFromObj(dirObj, &len); + Tcl_UtfToExternalDString(NULL, string, len, &template); + } else { + Tcl_DStringInit(&template); + Tcl_DStringAppend(&template, DefaultTempDir(), -1); /* INTL: native */ + } + + Tcl_DStringAppend(&template, "/", -1); + + if (basenameObj) { + string = Tcl_GetStringFromObj(basenameObj, &len); + Tcl_UtfToExternalDString(NULL, string, len, &tmp); + Tcl_DStringAppend(&template, Tcl_DStringValue(&tmp), -1); + Tcl_DStringFree(&tmp); + } else { + Tcl_DStringAppend(&template, "tcl", -1); + } + + Tcl_DStringAppend(&template, "_XXXXXX", -1); + +#ifdef HAVE_MKSTEMPS + if (extensionObj) { + string = Tcl_GetStringFromObj(extensionObj, &len); + Tcl_UtfToExternalDString(NULL, string, len, &tmp); + Tcl_DStringAppend(&template, Tcl_DStringValue(&tmp), -1); + fd = mkstemps(Tcl_DStringValue(&template), Tcl_DStringLength(&tmp)); + Tcl_DStringFree(&tmp); + } else +#endif + { + fd = mkstemp(Tcl_DStringValue(&template)); + } + + if (fd == -1) { + return NULL; + } + chan = Tcl_MakeFileChannel(INT2PTR(fd), TCL_READABLE|TCL_WRITABLE); + if (resultingNameObj) { + Tcl_ExternalToUtfDString(NULL, Tcl_DStringValue(&template), + Tcl_DStringLength(&template), &tmp); + Tcl_SetStringObj(resultingNameObj, Tcl_DStringValue(&tmp), + Tcl_DStringLength(&tmp)); + Tcl_DStringFree(&tmp); + } else { + /* + * Try to delete the file immediately since we're not reporting the + * name to anyone. Note that we're *not* handling any errors from + * this! + */ + + unlink(Tcl_DStringValue(&template)); + errno = 0; + } + Tcl_DStringFree(&template); + + return chan; +} + +/* + * Helper that does *part* of what tempnam() does. + */ + +static const char * +DefaultTempDir(void) +{ + const char *dir; + struct stat buf; + + dir = getenv("TMPDIR"); + if (dir && dir[0] && stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) + && access(dir, W_OK)) { + return dir; + } + +#ifdef P_tmpdir + dir = P_tmpdir; + if (stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)) { + return dir; + } +#endif + + /* + * Assume that "/tmp" is always an existing writable directory; we've no + * recovery mechanism if it isn't. + */ + + return "/tmp"; +} + #if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) /* *---------------------------------------------------------------------- diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index db484db..ad9e6d8 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.67 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.68 2008/11/29 18:17:20 dkf Exp $ */ #include "tclWinInt.h" @@ -1573,6 +1573,7 @@ BuildCommandLine( } else { int count; Tcl_UniChar ch; + for (start = arg; *start != '\0'; start += count) { count = Tcl_UtfToUniChar(start, &ch); if (Tcl_UniCharIsSpace(ch)) { /* INTL: ISO space. */ @@ -1673,18 +1674,18 @@ TclpCreateCommandChannel( infoPtr->writeBuf = 0; infoPtr->writeBufLen = 0; infoPtr->writeError = 0; - infoPtr->channel = (Tcl_Channel) NULL; + infoPtr->channel = NULL; /* * Use one of the fds associated with the channel as the channel id. */ if (readFile) { - channelId = (int) ((WinFile*)readFile)->handle; + channelId = (int) ((WinFile *) readFile)->handle; } else if (writeFile) { - channelId = (int) ((WinFile*)writeFile)->handle; + channelId = (int) ((WinFile *) writeFile)->handle; } else if (errorFile) { - channelId = (int) ((WinFile*)errorFile)->handle; + channelId = (int) ((WinFile *) errorFile)->handle; } else { channelId = 0; } @@ -1731,7 +1732,7 @@ TclpCreateCommandChannel( wsprintfA(channelName, "file%lx", infoPtr); infoPtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName, - (ClientData) infoPtr, infoPtr->validMask); + infoPtr, infoPtr->validMask); /* * Pipes have AUTO translation mode on Windows and ^Z eof char, which @@ -1739,10 +1740,8 @@ TclpCreateCommandChannel( * Windows programs that expect a ^Z at EOF. */ - Tcl_SetChannelOption((Tcl_Interp *) NULL, infoPtr->channel, - "-translation", "auto"); - Tcl_SetChannelOption((Tcl_Interp *) NULL, infoPtr->channel, - "-eofchar", "\032 {}"); + Tcl_SetChannelOption(NULL, infoPtr->channel, "-translation", "auto"); + Tcl_SetChannelOption(NULL, infoPtr->channel, "-eofchar", "\032 {}"); return infoPtr->channel; } @@ -1754,22 +1753,18 @@ TclpCreateCommandChannel( * System dependent interface to create a pipe for the [chan pipe] * command. Stolen from TclX. * - * Parameters: - * o interp - Errors returned in result. - * o rchan, wchan - Returned read and write side. - * o flags - Reserved for future use. * Results: - * TCL_OK or TCL_ERROR. + * TCL_OK or TCL_ERROR. * *---------------------------------------------------------------------- */ + int -Tcl_CreatePipe ( - Tcl_Interp *interp, - Tcl_Channel *rchan, - Tcl_Channel *wchan, - int flags - ) +Tcl_CreatePipe( + Tcl_Interp *interp, /* Errors returned in result.*/ + Tcl_Channel *rchan, /* Where to return the read side. */ + Tcl_Channel *wchan, /* Where to return the write side. */ + int flags) /* Reserved for future use. */ { HANDLE readHandle, writeHandle; SECURITY_ATTRIBUTES sec; @@ -1778,24 +1773,21 @@ Tcl_CreatePipe ( sec.lpSecurityDescriptor = NULL; sec.bInheritHandle = FALSE; - if (!CreatePipe (&readHandle, &writeHandle, &sec, 0)) { - TclWinConvertError (GetLastError ()); - Tcl_AppendResult (interp, "pipe creation failed: ", - Tcl_PosixError (interp), (char *) NULL); - return TCL_ERROR; + if (!CreatePipe(&readHandle, &writeHandle, &sec, 0)) { + TclWinConvertError(GetLastError()); + Tcl_AppendResult(interp, "pipe creation failed: ", + Tcl_PosixError(interp), NULL); + return TCL_ERROR; } - - *rchan = Tcl_MakeFileChannel ((ClientData) readHandle, - TCL_READABLE); - Tcl_RegisterChannel (interp, *rchan); - *wchan = Tcl_MakeFileChannel ((ClientData) writeHandle, - TCL_WRITABLE); - Tcl_RegisterChannel (interp, *wchan); + *rchan = Tcl_MakeFileChannel((ClientData) readHandle, TCL_READABLE); + Tcl_RegisterChannel(interp, *rchan); + + *wchan = Tcl_MakeFileChannel((ClientData) writeHandle, TCL_WRITABLE); + Tcl_RegisterChannel(interp, *wchan); return TCL_OK; } - /* *---------------------------------------------------------------------- @@ -2100,9 +2092,8 @@ PipeClose2Proc( */ if (pipePtr->errorFile) { - WinFile *filePtr; + WinFile *filePtr = (WinFile *) pipePtr->errorFile; - filePtr = (WinFile*)pipePtr->errorFile; errChan = Tcl_MakeFileChannel((ClientData) filePtr->handle, TCL_READABLE); ckfree((char *) filePtr); @@ -3159,6 +3150,65 @@ PipeThreadActionProc( } /* + *---------------------------------------------------------------------- + * + * TclpOpenTemporaryFile -- + * + * Creates a temporary file, possibly based on the supplied bits and + * pieces of template supplied in the first three arguments. If the + * fourth argument is non-NULL, it contains a Tcl_Obj to store the name + * of the temporary file in (and it is caller's responsibility to clean + * up). If the fourth argument is NULL, try to arrange for the temporary + * file to go away once it is no longer needed. + * + * Results: + * A read-write Tcl Channel open on the file. + * + *---------------------------------------------------------------------- + */ + +Tcl_Channel +TclpOpenTemporaryFile( + Tcl_Obj *dirObj, + Tcl_Obj *basenameObj, + Tcl_Obj *extensionObj, + Tcl_Obj *resultingNameObj) +{ + WCHAR name[MAX_PATH]; + HANDLE handle; + DWORD flags = FILE_ATTRIBUTE_TEMPORARY; + + if (!resultingNameObj) { + flags |= FILE_FLAG_DELETE_ON_CLOSE; + } + + do { + if (TempFileName(name) == 0) { + TclWinConvertError(GetLastError()); + return NULL; + } + + handle = tclWinProcs->createFileProc((TCHAR *) name, + GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, flags, NULL); + } while (handle == INVALID_HANDLE_VALUE + && GetLastError() == ERROR_FILE_EXISTS); + if (handle == INVALID_HANDLE_VALUE) { + TclWinConvertError(GetLastError()); + return NULL; + } + + if (resultingNameObj) { + Tcl_Obj *tmpObj = TclpNativeToNormalized(name); + + Tcl_AppendObjToObj(resultingNameObj, tmpObj); + TclDecrRefCount(tmpObj); + } + + return Tcl_MakeFileChannel((ClientData) handle, + TCL_READABLE|TCL_WRITABLE); +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 -- cgit v0.12 From 99d7ee217cf3b720c3781056a7a423bd1170595c Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 29 Nov 2008 18:18:30 +0000 Subject: regen --- unix/configure | 12336 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 6176 insertions(+), 6160 deletions(-) diff --git a/unix/configure b/unix/configure index 7f0869a..48a92a1 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,176 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +775,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +838,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +903,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +933,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1007,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1069,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1113,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1133,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1172,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1270,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1287,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1353,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1460,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1474,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1496,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1506,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1528,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1539,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1553,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1591,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1624,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1672,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1698,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1711,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1740,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1757,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1781,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1357,24 +1817,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1383,36 +1842,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1435,8 +1895,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1449,32 +1909,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1487,36 +1949,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1529,74 +2006,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1610,7 +2047,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1621,6 +2058,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1638,22 +2076,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1666,36 +2105,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1708,29 +2149,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1743,21 +2200,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1782,47 +2253,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1834,19 +2335,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1865,22 +2368,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1891,9 +2399,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1907,14 +2414,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1934,14 +2441,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1959,12 +2472,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1987,50 +2500,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2046,38 +2558,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2093,12 +2685,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2132,12 +2724,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2152,266 +2749,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2444,8 +2891,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2479,24 +2926,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2505,9 +2950,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2517,24 +2963,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2545,6 +2989,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2562,8 +3007,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2586,24 +3031,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2612,9 +3055,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2624,24 +3068,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2652,6 +3094,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2674,23 +3117,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2714,35 +3304,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2798,6 +3384,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2817,18 +3404,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2841,12 +3437,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2869,9 +3467,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2885,38 +3483,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2928,8 +3523,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2969,39 +3564,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3012,17 +3604,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3033,41 +3625,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3076,24 +3664,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3101,9 +3687,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3127,25 +3714,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3160,17 +3740,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3181,41 +3761,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3224,24 +3800,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3249,9 +3823,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3275,25 +3850,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3308,17 +3876,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3329,41 +3897,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3372,24 +3936,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3397,9 +3959,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3423,25 +3986,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3460,17 +4016,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3481,41 +4037,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3524,24 +4076,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3549,9 +4099,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3575,25 +4126,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3662,17 +4206,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3683,41 +4227,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3726,24 +4266,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3751,9 +4289,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3777,25 +4316,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3852,17 +4384,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3873,41 +4405,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3916,24 +4444,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3941,9 +4467,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3967,25 +4494,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4000,17 +4520,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4021,41 +4541,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4064,24 +4580,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4089,9 +4603,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4115,25 +4630,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4153,18 +4661,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4175,41 +4684,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4218,24 +4723,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4243,9 +4746,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4269,25 +4773,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4307,8 +4805,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4330,39 +4828,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4373,13 +4867,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4411,8 +4905,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4425,56 +4919,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4487,8 +4978,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4501,56 +4992,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4563,8 +5051,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4577,56 +5065,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4637,8 +5122,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4651,56 +5136,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4708,8 +5190,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4722,56 +5204,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4796,9 +5275,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4824,68 +5303,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4898,8 +5369,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4907,15 +5378,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -4927,11 +5398,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4960,8 +5431,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4988,76 +5459,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5074,46 +5536,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5124,8 +5583,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5142,62 +5601,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5208,41 +5664,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5251,24 +5703,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5276,9 +5726,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5302,25 +5753,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5353,8 +5797,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5381,68 +5825,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5450,8 +5885,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5478,73 +5913,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5557,56 +5983,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5619,8 +6042,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5647,68 +6070,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5716,8 +6130,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5744,73 +6158,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5823,56 +6228,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5885,15 +6287,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5903,12 +6305,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5927,8 +6329,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5941,32 +6343,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5979,27 +6383,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6008,31 +6426,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6042,8 +6460,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6067,40 +6485,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6114,24 +6529,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6158,16 +6573,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6180,56 +6595,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6272,8 +6684,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6286,25 +6698,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6330,8 +6744,8 @@ fi CC=${CC}_r ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6409,12 +6823,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6434,8 +6846,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6448,56 +6860,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6529,8 +6938,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6543,56 +6952,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -6653,8 +7059,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6667,56 +7073,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -6742,7 +7145,6 @@ fi else CFLAGS="$CFLAGS -z" - CFLAGS_WARNING="$CFLAGS_WARNING +w1 +W392000" # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" SHLIB_CFLAGS="+z" @@ -6788,8 +7190,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6802,56 +7204,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -6983,8 +7382,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7007,40 +7406,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7129,8 +7525,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7156,8 +7552,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7188,8 +7584,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7215,8 +7611,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7280,8 +7676,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7304,40 +7700,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7346,8 +7739,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7370,40 +7763,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7429,8 +7819,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7453,40 +7843,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7505,8 +7892,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7529,40 +7916,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7589,21 +7973,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7637,35 +8021,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -7676,8 +8057,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -7693,8 +8074,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7718,42 +8099,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8089,25 +8467,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8118,41 +8496,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8161,24 +8535,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8186,9 +8558,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8212,25 +8585,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8239,8 +8605,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8315,8 +8681,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8339,40 +8705,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8407,13 +8770,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8558,22 +8921,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8583,8 +8946,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -8619,11 +8982,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -8644,8 +9007,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -8667,33 +9030,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8710,37 +9068,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -8772,33 +9127,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8815,37 +9165,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -8877,33 +9224,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8920,37 +9262,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -8963,17 +9302,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8996,35 +9335,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9046,34 +9381,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9082,20 +9414,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9117,38 +9449,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9157,8 +9485,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9180,38 +9508,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9225,9 +9549,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9253,68 +9577,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9323,8 +9639,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9346,35 +9662,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9385,11 +9697,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9399,8 +9711,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9417,7 +9729,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9426,27 +9739,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9469,40 +9777,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9512,11 +9816,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9527,27 +9831,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -9563,8 +9862,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9572,27 +9873,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9605,13 +9920,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -9640,9 +9958,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9668,68 +9986,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9753,9 +10063,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9781,88 +10091,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9889,68 +10189,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -9961,8 +10252,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9989,68 +10280,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10061,8 +10343,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10089,68 +10371,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10161,8 +10434,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10189,68 +10462,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10268,8 +10532,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10296,68 +10560,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10369,8 +10624,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10397,72 +10652,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10490,38 +10736,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10539,8 +10781,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10567,72 +10809,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10663,38 +10896,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -10703,8 +10932,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10735,38 +10964,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -10786,8 +11011,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10814,72 +11039,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10910,38 +11126,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -10950,8 +11162,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10982,38 +11194,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11033,8 +11241,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11061,72 +11269,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11157,38 +11356,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11197,8 +11392,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11229,38 +11424,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11280,8 +11471,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11308,72 +11499,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11404,38 +11586,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11444,8 +11622,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11476,38 +11654,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11560,8 +11734,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11588,72 +11762,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11684,38 +11849,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -11724,8 +11885,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11756,38 +11917,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -11796,8 +11953,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11826,38 +11983,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -11878,8 +12031,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11906,72 +12059,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12005,38 +12149,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12045,8 +12185,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12080,38 +12220,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12145,18 +12281,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12167,41 +12304,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12210,24 +12343,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12235,9 +12366,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12261,25 +12393,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12291,8 +12417,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12320,13 +12446,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12339,8 +12474,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12364,13 +12501,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12383,8 +12529,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12410,13 +12558,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12429,8 +12586,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12458,13 +12617,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12477,8 +12645,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12505,13 +12675,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12524,8 +12703,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12553,13 +12734,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12572,12 +12762,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12607,8 +12799,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12629,42 +12821,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12687,8 +12875,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -12710,8 +12898,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12727,44 +12915,42 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -12778,18 +12964,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12800,41 +12987,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12843,24 +13026,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12868,9 +13049,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12894,25 +13076,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12924,8 +13100,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12949,38 +13125,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -12989,8 +13161,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13015,33 +13187,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13062,40 +13229,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13112,8 +13276,77 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13124,52 +13357,49 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#if !HAVE_DECL_TZNAME +extern char *tzname[]; #endif int main () { -atoi(*tzname); +return tzname[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_var_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -13186,9 +13416,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13214,68 +13444,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13285,8 +13507,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13307,38 +13529,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13347,8 +13565,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13369,38 +13587,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13413,8 +13627,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13437,38 +13651,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13479,8 +13689,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13503,38 +13713,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13546,13 +13752,12 @@ _ACEOF #-------------------------------------------------------------------- -# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field -# in struct stat. But we might be able to use fstatfs instead. +# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field in struct +# stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13574,33 +13779,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13618,40 +13818,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -13666,8 +13863,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13694,68 +13891,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -13768,12 +13956,12 @@ fi #-------------------------------------------------------------------- -# Some system have no memcmp or it does not work with 8 bit -# data, this checks it and add memcmp.o to LIBOBJS if needed +# Some system have no memcmp or it does not work with 8 bit data, this +# checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13792,9 +13980,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -13810,9 +13998,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -13820,13 +14008,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13839,29 +14036,29 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac #-------------------------------------------------------------------- -# Some system like SunOS 4 and other BSD like systems -# have no memmove (we assume they have bcopy instead). -# {The replacement define is in compat/string.h} +# Some system like SunOS 4 and other BSD like systems have no memmove +# (we assume they have bcopy instead). {The replacement define is in +# compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13888,68 +14085,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -13968,13 +14156,13 @@ fi #-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even -# even if the original string is empty. +# On some systems strstr is broken: it returns a pointer even even if +# the original string is empty. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14001,68 +14189,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14070,8 +14249,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14090,13 +14269,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14109,11 +14297,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14121,12 +14311,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14140,8 +14328,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14168,68 +14356,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14237,8 +14416,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14258,13 +14437,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14277,11 +14465,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14289,12 +14479,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14307,8 +14495,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14335,68 +14523,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14404,8 +14583,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14425,13 +14604,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14444,11 +14632,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14456,12 +14646,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14476,8 +14664,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14504,68 +14692,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14573,8 +14752,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14610,13 +14789,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14629,18 +14817,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14658,8 +14846,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14670,50 +14858,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -14724,8 +14909,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14736,50 +14921,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -14790,8 +14972,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14802,62 +14984,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14879,8 +15058,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -14895,8 +15074,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14922,38 +15101,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -14962,8 +15137,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14974,50 +15149,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15027,8 +15199,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15053,40 +15225,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15097,8 +15265,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15109,50 +15277,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15162,8 +15327,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15189,40 +15354,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15241,8 +15402,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15269,68 +15430,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15350,8 +15502,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15377,39 +15529,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15424,8 +15573,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15452,68 +15601,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15521,8 +15661,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15535,56 +15675,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15593,8 +15730,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15607,56 +15744,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -15665,12 +15799,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15687,8 +15819,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15715,68 +15847,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -15785,8 +15908,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15813,68 +15936,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -15888,8 +16002,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15912,8 +16026,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -15929,8 +16043,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15952,38 +16066,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -15991,8 +16101,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16016,38 +16126,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16060,8 +16166,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16096,13 +16202,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16115,11 +16230,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16133,28 +16250,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16165,41 +16282,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16208,24 +16321,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16233,9 +16344,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16259,25 +16371,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16288,8 +16393,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16311,39 +16416,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16352,22 +16453,23 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi #-------------------------------------------------------------------- -# Check for support of chflags function +# Check for support of chflags and mkstemps functions #-------------------------------------------------------------------- -for ac_func in chflags + +for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16393,68 +16495,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16468,8 +16562,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16492,39 +16586,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16542,9 +16633,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16570,68 +16661,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16644,18 +16727,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16666,41 +16750,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16709,24 +16789,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16734,9 +16812,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16760,25 +16839,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -16794,9 +16867,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16822,68 +16895,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16897,18 +16962,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16919,41 +16985,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16962,24 +17024,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16987,9 +17047,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17013,25 +17074,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17047,9 +17102,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17075,68 +17130,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17149,9 +17196,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17177,68 +17224,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17272,18 +17311,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17294,41 +17334,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17337,24 +17373,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17362,9 +17396,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17388,25 +17423,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17419,8 +17448,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17451,40 +17480,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17502,11 +17528,11 @@ else fi #-------------------------------------------------------------------- -# Check for support of fts functions (readdir replacement) +# Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17535,39 +17561,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17577,10 +17600,9 @@ _ACEOF fi #-------------------------------------------------------------------- -# The statements below check for systems where POSIX-style -# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. -# On these systems (mostly older ones), use the old BSD-style -# FIONBIO approach instead. +# The statements below check for systems where POSIX-style non-blocking +# I/O (O_NONBLOCK) doesn't work or is unimplemented. On these systems +# (mostly older ones), use the old BSD-style FIONBIO approach instead. #-------------------------------------------------------------------- @@ -17588,18 +17610,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17610,41 +17633,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17653,24 +17672,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17678,9 +17695,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17704,25 +17722,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17738,18 +17750,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17760,41 +17773,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17803,24 +17812,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17828,9 +17835,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17854,25 +17862,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17885,8 +17887,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17913,12 +17915,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -17931,8 +17933,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -17940,27 +17942,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -17968,8 +17970,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -17977,24 +17979,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18018,8 +18020,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18032,8 +18034,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18041,26 +18043,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18071,41 +18073,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18114,24 +18112,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18139,9 +18135,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18165,25 +18162,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18197,8 +18187,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18214,31 +18204,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18262,8 +18253,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18292,15 +18283,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18314,16 +18305,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18335,7 +18326,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18348,7 +18339,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18516,7 +18507,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18536,39 +18527,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18577,52 +18587,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -18651,17 +18645,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -18671,8 +18693,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -18686,18 +18743,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -18705,159 +18763,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -18866,7 +18885,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18875,31 +18915,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18907,30 +18930,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -18938,7 +18950,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -18952,18 +18964,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -18974,60 +18988,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19043,40 +19039,52 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19087,369 +19095,477 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19457,152 +19573,52 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 1f9fea3af39eecdba2e1abbc05a09746c9a6d0c5 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 30 Nov 2008 19:24:00 +0000 Subject: * library/clock.tcl (format, ParseClockScanFormat): Added a [string map] to get rid of namespace delimiters before caching a scan or format procedure [Bug 2362156]. * tests/clock.test (clock-64.[12]): Added test cases for the bug that was tickled by a namespace delimiter inside a format string. --- ChangeLog | 9 +++++++++ library/clock.tcl | 8 +++++--- tests/clock.test | 15 ++++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e7289e..806fb77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-11-30 Kevin B. Kenny + + * library/clock.tcl (format, ParseClockScanFormat): Added a + [string map] to get rid of namespace delimiters before caching a + scan or format procedure [Bug 2362156]. + * tests/clock.test (clock-64.[12]): Added test cases for the bug + that was tickled by a namespace delimiter inside a format string. + + 2008-11-29 Donal K. Fellows TIP #210 IMPLEMENTATION diff --git a/library/clock.tcl b/library/clock.tcl index 75edb1c..e4a21e3 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.48 2008/11/01 15:03:28 das Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.49 2008/11/30 19:24:00 kennykb Exp $ # #---------------------------------------------------------------------- @@ -687,7 +687,8 @@ proc ::tcl::clock::format { args } { # name in the 'FormatProc' array to avoid losing its internal # representation, which contains the name resolution. - set procName ::tcl::clock::formatproc'$format'$locale + set procName formatproc'$format'$locale + set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName] if {[info exists FormatProc($procName)]} { set procName $FormatProc($procName) } else { @@ -1531,7 +1532,8 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { # Check whether the format has been parsed previously, and return # the existing recognizer if it has. - set procName [namespace current]::scanproc'$formatString'$locale + set procName scanproc'$formatString'$locale + set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName] if { [namespace which $procName] != {} } { return $procName } diff --git a/tests/clock.test b/tests/clock.test index a2c0fda..6f2afdd 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.86 2008/07/21 21:25:22 nijtmans Exp $ +# RCS: @(#) $Id: clock.test,v 1.87 2008/11/30 19:24:00 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36644,6 +36644,19 @@ test clock-63.1 {Incorrect use of internal ConvertLocalToUTC command} {*}{ -result {key "localseconds" not found in dictionary} } +test clock-64.1 {:: in format string [Bug 2362156]} {*}{ + -body { + clock scan 2001-02-03::04:05:06 -gmt 1 -format %Y-%m-%d::%H:%M:%S + } + -result 981173106 +} +test clock-64.2 {:: in format string [Bug 2362156]} {*}{ + -body { + clock format 981173106 -gmt 1 -format %Y-%m-%d::%H:%M:%S + } + -result 2001-02-03::04:05:06 +} + # cleanup namespace delete ::testClock -- cgit v0.12 From d19643edeec99cd9f43fbcce18c431e73266b03f Mon Sep 17 00:00:00 2001 From: das Date: Mon, 1 Dec 2008 09:54:07 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index d68948e..341e47f 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -121,6 +121,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `mkstemps' function. */ +#undef HAVE_MKSTEMPS + /* Define to 1 if you have the `mktime' function. */ #undef HAVE_MKTIME -- cgit v0.12 From 356517f22ce69c8aed7a5a9f6792be1065112f75 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 1 Dec 2008 09:55:32 +0000 Subject: autoconf-2.59 --- unix/configure | 12317 +++++++++++++++++++++++++++---------------------------- 1 file changed, 6150 insertions(+), 6167 deletions(-) diff --git a/unix/configure b/unix/configure index 48a92a1..01309cc 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,176 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -775,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -838,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -903,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -933,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1007,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1069,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1113,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1133,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1172,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1270,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1287,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1353,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1460,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1474,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1496,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1506,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1528,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1539,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1553,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1591,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1624,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1672,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1698,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1711,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1740,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1757,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1781,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1817,23 +1357,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } - - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1842,37 +1383,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1895,8 +1435,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1909,34 +1449,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1949,51 +1487,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2006,34 +1529,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2047,7 +1610,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2058,7 +1621,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2076,23 +1638,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2105,38 +1666,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2149,45 +1708,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2200,35 +1743,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2253,77 +1782,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2335,21 +1834,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2368,27 +1865,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2399,8 +1891,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2414,14 +1907,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2441,20 +1934,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2472,12 +1959,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2500,49 +1987,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2558,118 +2046,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2685,12 +2093,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2724,17 +2132,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2749,116 +2152,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +continue fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2891,8 +2444,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2926,22 +2479,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2950,10 +2505,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2963,22 +2517,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2989,7 +2545,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3007,8 +2562,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3031,22 +2586,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3055,10 +2612,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3068,22 +2624,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3094,7 +2652,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3117,170 +2674,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3304,31 +2714,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3384,7 +2798,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3404,27 +2817,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3437,14 +2841,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3467,9 +2869,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3483,35 +2885,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3523,8 +2928,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3564,36 +2969,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3604,17 +3012,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3625,37 +3033,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3664,22 +3076,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3687,10 +3101,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3714,18 +3127,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3740,17 +3160,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3761,37 +3181,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3800,22 +3224,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3823,10 +3249,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3850,18 +3275,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3876,17 +3308,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3897,37 +3329,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3936,22 +3372,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3959,10 +3397,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3986,18 +3423,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4016,17 +3460,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4037,37 +3481,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4076,22 +3524,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4099,10 +3549,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4126,18 +3575,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4206,17 +3662,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4227,37 +3683,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4266,22 +3726,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4289,10 +3751,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4316,18 +3777,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4384,17 +3852,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4405,37 +3873,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4444,22 +3916,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4467,10 +3941,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4494,18 +3967,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4520,17 +4000,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4541,37 +4021,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4580,22 +4064,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4603,10 +4089,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4630,18 +4115,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4661,19 +4153,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4684,37 +4175,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4723,22 +4218,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4746,10 +4243,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4773,19 +4269,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4805,8 +4307,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4828,35 +4330,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4867,13 +4373,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4905,8 +4411,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4919,53 +4425,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4978,8 +4487,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4992,53 +4501,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5051,8 +4563,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5065,53 +4577,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5122,8 +4637,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5136,53 +4651,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5190,8 +4708,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5204,53 +4722,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5275,9 +4796,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5303,60 +4824,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5369,8 +4898,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5378,15 +4907,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5398,11 +4927,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5431,8 +4960,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5459,67 +4988,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5536,43 +5074,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5583,8 +5124,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5601,59 +5142,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5664,37 +5208,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5703,22 +5251,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5726,10 +5276,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5753,18 +5302,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -5797,8 +5353,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5825,59 +5381,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5885,8 +5450,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5913,64 +5478,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5983,53 +5557,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6042,8 +5619,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6070,59 +5647,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6130,8 +5716,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6158,64 +5744,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6228,53 +5823,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6287,15 +5885,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6305,12 +5903,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6329,8 +5927,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6343,34 +5941,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6383,41 +5979,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6426,31 +6008,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6460,8 +6042,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6485,37 +6067,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6529,24 +6114,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6573,16 +6158,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6595,53 +6180,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6684,8 +6272,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6698,27 +6286,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6744,8 +6330,8 @@ fi CC=${CC}_r ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -6823,10 +6409,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -6846,8 +6434,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6860,53 +6448,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6938,8 +6529,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6952,53 +6543,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7059,8 +6653,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7073,53 +6667,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7190,8 +6787,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7204,53 +6801,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7382,8 +6982,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7406,37 +7006,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7525,8 +7128,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7552,8 +7155,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7584,8 +7187,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7611,8 +7214,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7676,8 +7279,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7700,37 +7303,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7739,8 +7345,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7763,37 +7369,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7819,8 +7428,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7843,37 +7452,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7892,8 +7504,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7916,37 +7528,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7973,21 +7588,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8021,32 +7636,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8057,8 +7675,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8074,8 +7692,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8099,39 +7717,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8467,25 +8088,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8496,37 +8117,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8535,22 +8160,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8558,10 +8185,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8585,18 +8211,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -8605,8 +8238,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -8681,8 +8314,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8705,37 +8338,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8770,13 +8406,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8921,22 +8557,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8946,8 +8582,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -8982,11 +8618,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9007,8 +8643,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9030,28 +8666,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9068,34 +8709,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9127,28 +8771,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9165,34 +8814,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9224,28 +8876,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9262,34 +8919,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9302,17 +8962,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9335,31 +8995,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9381,31 +9045,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9414,20 +9081,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9449,34 +9116,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9485,8 +9156,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9508,34 +9179,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9549,9 +9224,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9577,60 +9252,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9639,8 +9322,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9662,31 +9345,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9697,11 +9384,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -9711,8 +9398,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9729,8 +9416,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -9739,22 +9425,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9777,36 +9468,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9816,11 +9511,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9831,23 +9526,28 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then @@ -9862,10 +9562,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9873,41 +9571,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9920,16 +9604,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -9958,9 +9639,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9986,60 +9667,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10063,9 +9752,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10091,78 +9780,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10189,59 +9888,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10252,8 +9960,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10280,59 +9988,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10343,8 +10060,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10371,59 +10088,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10434,8 +10160,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10462,59 +10188,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -10532,8 +10267,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10560,59 +10295,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -10624,8 +10368,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10652,63 +10396,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10736,34 +10489,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10781,8 +10538,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10809,63 +10566,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10896,34 +10662,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -10932,8 +10702,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10964,34 +10734,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11011,8 +10785,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11039,63 +10813,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11126,34 +10909,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11162,8 +10949,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11194,34 +10981,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11241,8 +11032,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11269,63 +11060,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11356,34 +11156,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11392,8 +11196,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11424,34 +11228,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11471,8 +11279,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11499,63 +11307,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11586,34 +11403,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11622,8 +11443,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11654,34 +11475,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11734,8 +11559,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11762,63 +11587,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; #endif - -int +#ifdef __cplusplus +} +#endif + +int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11849,34 +11683,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -11885,8 +11723,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11917,34 +11755,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -11953,8 +11795,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11983,34 +11825,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12031,8 +11877,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12059,63 +11905,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12149,34 +12004,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12185,8 +12044,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12220,34 +12079,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12281,19 +12144,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12304,37 +12166,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12343,22 +12209,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12366,10 +12234,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12393,19 +12260,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12417,8 +12290,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12446,22 +12319,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12474,10 +12338,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12501,22 +12363,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12529,10 +12382,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12558,22 +12409,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12586,10 +12428,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12617,22 +12457,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12645,10 +12476,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12675,22 +12504,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12703,10 +12523,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12734,22 +12552,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12762,14 +12571,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12799,8 +12606,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12821,38 +12628,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12875,8 +12686,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -12898,8 +12709,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12915,42 +12726,44 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h +ac_cv_struct_tm=sys/time.h fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -12964,19 +12777,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12987,37 +12799,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13026,22 +12842,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13049,10 +12867,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13076,19 +12893,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13100,8 +12923,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13125,34 +12948,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13161,8 +12988,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13187,28 +13014,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13229,37 +13061,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_tm_tm_zone=no +ac_cv_member_struct_tm_tm_zone=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13276,77 +13111,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -#ifndef tzname - (void) tzname; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF - - -fi - - - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6 if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13357,49 +13123,52 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif int main () { -return tzname[0][0]; +atoi(*tzname); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_var_tzname=no +ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -13416,9 +13185,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13444,60 +13213,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13507,8 +13284,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13529,34 +13306,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13565,8 +13346,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13587,34 +13368,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13627,8 +13412,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13651,34 +13436,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13689,8 +13478,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13713,34 +13502,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13756,8 +13549,9 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } + +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13779,28 +13573,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13818,37 +13617,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -13863,8 +13665,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13891,59 +13693,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -13960,8 +13771,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13980,9 +13791,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -13998,9 +13809,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14008,22 +13819,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14036,17 +13838,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14057,8 +13859,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14085,59 +13887,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14161,8 +13972,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14189,59 +14000,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14249,8 +14069,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14269,22 +14089,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14297,13 +14108,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14311,10 +14120,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14328,8 +14139,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14356,59 +14167,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14416,8 +14236,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14437,22 +14257,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14465,13 +14276,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14479,10 +14288,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14495,8 +14306,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14523,59 +14334,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14583,8 +14403,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14604,22 +14424,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14632,13 +14443,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14646,10 +14455,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -14664,8 +14475,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14692,59 +14503,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14752,8 +14572,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14789,22 +14609,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14817,18 +14628,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -14846,8 +14657,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14858,47 +14669,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -14909,8 +14723,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14921,47 +14735,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -14972,8 +14789,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14984,59 +14801,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15058,8 +14878,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15074,8 +14894,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15101,34 +14921,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15137,8 +14961,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15149,47 +14973,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15199,8 +15026,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15225,36 +15052,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15265,8 +15096,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15277,47 +15108,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15327,8 +15161,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15354,36 +15188,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15402,8 +15240,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15430,59 +15268,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15502,8 +15349,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15529,36 +15376,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15573,8 +15423,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15601,59 +15451,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15661,8 +15520,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15675,53 +15534,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15730,8 +15592,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15744,53 +15606,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -15799,10 +15664,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -15819,8 +15686,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15847,59 +15714,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -15908,8 +15784,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15936,59 +15812,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_gettimeofday=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gettimeofday=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16002,8 +15887,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16026,8 +15911,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16043,8 +15928,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16066,34 +15951,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16101,8 +15990,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16126,34 +16015,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16166,8 +16059,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16202,22 +16095,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16230,13 +16114,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16250,28 +16132,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16282,37 +16164,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16321,22 +16207,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16344,10 +16232,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16371,18 +16258,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16393,8 +16287,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16416,35 +16310,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16453,8 +16351,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16467,9 +16365,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16495,60 +16393,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16562,8 +16468,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16586,36 +16492,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16633,9 +16542,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16661,60 +16570,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16727,19 +16644,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16750,37 +16666,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16789,22 +16709,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16812,10 +16734,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16839,19 +16760,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -16867,9 +16794,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16895,60 +16822,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16962,19 +16897,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16985,37 +16919,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17024,22 +16962,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17047,10 +16987,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17074,19 +17013,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17102,9 +17047,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17130,60 +17075,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17196,9 +17149,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17224,60 +17177,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17311,19 +17272,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17334,37 +17294,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17373,22 +17337,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17396,10 +17362,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17423,19 +17388,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17448,8 +17419,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17480,37 +17451,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17531,8 +17505,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17561,36 +17535,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17610,19 +17587,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17633,37 +17609,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17672,22 +17652,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17695,10 +17677,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17722,19 +17703,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17750,19 +17737,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17773,37 +17759,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17812,22 +17802,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17835,10 +17827,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17862,19 +17853,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17887,8 +17884,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17915,12 +17912,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -17933,8 +17930,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -17942,27 +17939,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -17970,8 +17967,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -17979,24 +17976,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18020,8 +18017,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18034,8 +18031,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18043,26 +18040,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18073,37 +18070,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18112,22 +18113,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18135,10 +18138,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18162,18 +18164,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18187,8 +18196,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18204,32 +18213,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18253,8 +18261,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18283,15 +18291,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18305,16 +18313,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18326,7 +18334,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18339,7 +18347,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18507,7 +18515,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18527,58 +18535,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18587,36 +18576,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -18645,45 +18650,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -18693,43 +18670,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -18743,19 +18685,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -18763,120 +18704,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -18885,28 +18865,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18915,14 +18874,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18930,19 +18906,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -18950,7 +18937,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -18964,20 +18951,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -18988,42 +18973,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19039,52 +19042,40 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19095,477 +19086,369 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - case $ac_mode in - :F) - # - # CONFIG_FILE - # +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19573,52 +19456,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 1d77ae594ff85f4e2d248e6b99102d5c9265c8a1 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Dec 2008 15:22:54 +0000 Subject: Fix [Bug 2371623] with a constraint. --- ChangeLog | 18 +++++++++++------- tests/cmdAH.test | 7 ++++--- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 806fb77..ae26270 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,16 @@ +2008-12-01 Donal K. Fellows + + * tests/cmdAH.test (cmdAH-32.6): Test was not portable; depended on a + C API function not universally available. [Bug 2371623] + 2008-11-30 Kevin B. Kenny - * library/clock.tcl (format, ParseClockScanFormat): Added a - [string map] to get rid of namespace delimiters before caching a - scan or format procedure [Bug 2362156]. - * tests/clock.test (clock-64.[12]): Added test cases for the bug - that was tickled by a namespace delimiter inside a format string. - - + * library/clock.tcl (format, ParseClockScanFormat): Added a [string + map] to get rid of namespace delimiters before caching a scan or + format procedure. [Bug 2362156] + * tests/clock.test (clock-64.[12]): Added test cases for the bug that + was tickled by a namespace delimiter inside a format string. + 2008-11-29 Donal K. Fellows TIP #210 IMPLEMENTATION diff --git a/tests/cmdAH.test b/tests/cmdAH.test index b5408dd..da554ce 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.64 2008/11/29 18:17:19 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.65 2008/12/01 15:22:55 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1568,12 +1568,13 @@ test cmdAH-32.5 {file tempfile - templates} -constraints unix -body { } -cleanup { catch {file delete $name} } -result ok -test cmdAH-32.6 {file tempfile - templates} -constraints unix -body { +# Not portable; not all unix systems have mkstemps() +test cmdAH-32.6 {file tempfile - templates} -body { set template [file join $dirfile foo] close [file tempfile name $template.bar] expr {[string match $template*.bar $name] ? "ok" : "$template.bar produced $name"} -} -cleanup { +} -constraints {unix nonPortable} -cleanup { catch {file delete $name} } -result ok -- cgit v0.12 From e6d9dee6e2c834ae1e8010b08931692f25e6c3b4 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 1 Dec 2008 22:29:53 +0000 Subject: * generic/tclParse.c: Coding standards fixups. --- ChangeLog | 4 ++++ generic/tclParse.c | 36 +++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae26270..c7c9f9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-01 Don Porter + + * generic/tclParse.c: Coding standards fixups. + 2008-12-01 Donal K. Fellows * tests/cmdAH.test (cmdAH-32.6): Test was not portable; depended on a diff --git a/generic/tclParse.c b/generic/tclParse.c index be66a60..db64728 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -456,24 +456,23 @@ Tcl_ParseCommand( */ while (nextElem < listEnd) { - int size,brace; + int size, brace; code = TclFindElement(NULL, nextElem, listEnd - nextElem, &elemStart, &nextElem, &size, &brace); - if (code != TCL_OK) break; - if (!brace) - { - const char *s; - - for(s=elemStart;size>0;s++,size--) - { - if ((*s)=='\\') - { - nakedbs=1; - break; - } - } + if (code != TCL_OK) { + break; + } + if (!brace) { + const char *s; + + for(s=elemStart;size>0;s++,size--) { + if ((*s)=='\\') { + nakedbs=1; + break; + } } + } if (elemStart < listEnd) { elemCount++; } @@ -486,7 +485,8 @@ Tcl_ParseCommand( * not in fact a valid nor canonical list. Defer the * handling of this to compile/eval time, where code is * already in place to report the "attempt to expand a - * non-list" error. + * non-list" error or expand lists that require + * substitution. */ tokenPtr->type = TCL_TOKEN_EXPAND_WORD; @@ -547,6 +547,7 @@ Tcl_ParseCommand( tokenPtr[-1].size += (isspace(UCHAR( tokenPtr->start[tokenPtr->size])) == 0); } + tokenPtr++; } } @@ -560,7 +561,7 @@ Tcl_ParseCommand( tokenPtr->type = TCL_TOKEN_EXPAND_WORD; } } else if ((tokenPtr->numComponents == 1) - && (tokenPtr[1].type == TCL_TOKEN_TEXT)) { + && (tokenPtr[1].type == TCL_TOKEN_TEXT)) { tokenPtr->type = TCL_TOKEN_SIMPLE_WORD; } @@ -1975,7 +1976,7 @@ Tcl_SubstObj( if (varTokenPtr->type != TCL_TOKEN_VARIABLE) { Tcl_Panic("Tcl_SubstObj: programming error"); } - if (!(varTokenPtr[1].type == TCL_TOKEN_TEXT)) { + if (varTokenPtr[1].type != TCL_TOKEN_TEXT) { Tcl_Panic("Tcl_SubstObj: programming error"); } parsePtr->numTokens -= 2; @@ -2284,6 +2285,7 @@ TclSubstTokens( } } } + if (code != TCL_ERROR) { /* Keep error message in result! */ if (result != NULL) { Tcl_SetObjResult(interp, result); -- cgit v0.12 From 2dfd8ade3922490eb358d6d3d64d6f6f19c5192c Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 2 Dec 2008 18:23:25 +0000 Subject: * generic/tclIO.c (TclFinalizeIOSubsystem): Replaced Alexandre Ferrieux's first patch for [Bug 2270477] with a gentler version, also supplied by him. --- ChangeLog | 6 ++++++ generic/tclIO.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7c9f9a..c61aa8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-02 Andreas Kupries + + * generic/tclIO.c (TclFinalizeIOSubsystem): Replaced Alexandre + Ferrieux's first patch for [Bug 2270477] with a gentler version, + also supplied by him. + 2008-12-01 Don Porter * generic/tclParse.c: Coding standards fixups. diff --git a/generic/tclIO.c b/generic/tclIO.c index fdd6cba..e6e11d0 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.150 2008/11/25 23:19:01 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.151 2008/12/02 18:23:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -299,7 +299,7 @@ TclFinalizeIOSubsystem(void) statePtr != NULL; statePtr = statePtr->nextCSPtr) { chanPtr = statePtr->topChanPtr; - if (!(statePtr->flags & CHANNEL_DEAD)) { + if (!(statePtr->flags & (CHANNEL_INCLOSE|CHANNEL_CLOSED|CHANNEL_DEAD))) { active = 1; break; } @@ -364,8 +364,8 @@ TclFinalizeIOSubsystem(void) */ chanPtr->instanceData = NULL; + SetFlag(statePtr, CHANNEL_DEAD); } - SetFlag(statePtr, CHANNEL_DEAD); } } -- cgit v0.12 From 46ba97a82bfb00034073d7334903cc1417a836dc Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 2 Dec 2008 19:40:40 +0000 Subject: TIP #336 IMPLEMENTATION * generic/tcl.decls: New routines Tcl_(Get|Set)ErrorLine. * generic/tcl.h: Dropped default access to interp->errorLine. * generic/tclCmdAH.c: Restore it with -DUSE_INTERP_ERRORLINE. * generic/tclCmdMZ.c: Updated callers. * generic/tclDictObj.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclOOBasic.c: * generic/tclOODefinedCmds.c: * generic/tclOOMethod.c: * generic/tclProc.c: * generic/tclResult.c: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: --- ChangeLog | 20 ++++++++++++++++++++ generic/tcl.decls | 10 +++++++++- generic/tcl.h | 6 +++++- generic/tclCmdAH.c | 13 +++++++------ generic/tclCmdMZ.c | 4 ++-- generic/tclDecls.h | 22 +++++++++++++++++++++- generic/tclDictObj.c | 7 ++++--- generic/tclIOUtil.c | 4 ++-- generic/tclNamesp.c | 4 ++-- generic/tclOOBasic.c | 8 ++++---- generic/tclOODefineCmds.c | 8 ++++---- generic/tclOOMethod.c | 10 +++++----- generic/tclProc.c | 8 ++++---- generic/tclResult.c | 41 ++++++++++++++++++++++++++++++++++++++++- generic/tclStubInit.c | 4 +++- 15 files changed, 132 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index c61aa8e..6b27c8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2008-12-02 Don Porter + + TIP #336 IMPLEMENTATION + + * generic/tcl.decls: New routines Tcl_(Get|Set)ErrorLine. + * generic/tcl.h: Dropped default access to interp->errorLine. + * generic/tclCmdAH.c: Restore it with -DUSE_INTERP_ERRORLINE. + * generic/tclCmdMZ.c: Updated callers. + * generic/tclDictObj.c: + * generic/tclIOUtil.c: + * generic/tclNamesp.c: + * generic/tclOOBasic.c: + * generic/tclOODefinedCmds.c: + * generic/tclOOMethod.c: + * generic/tclProc.c: + * generic/tclResult.c: + + * generic/tclDecls.h: make genstubs + * generic/tclStubInit.c: + 2008-12-02 Andreas Kupries * generic/tclIO.c (TclFinalizeIOSubsystem): Replaced Alexandre diff --git a/generic/tcl.decls b/generic/tcl.decls index 715c2ad..b294b91 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.154 2008/11/17 22:15:34 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.155 2008/12/02 19:40:40 dgp Exp $ library tcl @@ -2204,6 +2204,14 @@ declare 604 generic { int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv) } +# TIP 335 +declare 605 generic { + int Tcl_GetErrorLine(Tcl_Interp *interp) +} +declare 606 generic { + void Tcl_SetErrorLine(Tcl_Interp *interp, int value) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are diff --git a/generic/tcl.h b/generic/tcl.h index 5354a70..c99ad44 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.279 2008/11/27 08:23:51 ferrieux Exp $ + * RCS: @(#) $Id: tcl.h,v 1.280 2008/12/02 19:40:41 dgp Exp $ */ #ifndef _TCL @@ -476,9 +476,13 @@ typedef struct Tcl_Interp { char* unused3; void (*unused4) (char*); #endif +#ifdef USE_INTERP_ERRORLINE int errorLine; /* When TCL_ERROR is returned, this gives the * line number within the command where the * error occurred (1 if first line). */ +#else + int unused5; +#endif } Tcl_Interp; typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler; diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 19ef57e..ead9384 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.110 2008/11/29 18:17:20 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.111 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -221,7 +221,7 @@ Tcl_CaseObjCmd( if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (\"%.50s\" arm line %d)", - TclGetString(armPtr), interp->errorLine)); + TclGetString(armPtr), Tcl_GetErrorLine(interp))); } return result; } @@ -312,7 +312,7 @@ CatchObjCmdCallback( if (rewind || Tcl_LimitExceeded(interp)) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"catch\" body line %d)", interp->errorLine)); + "\n (\"catch\" body line %d)", Tcl_GetErrorLine(interp))); return TCL_ERROR; } @@ -702,7 +702,7 @@ EvalCmdErrMsg( { if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"eval\" body line %d)", interp->errorLine)); + "\n (\"eval\" body line %d)", Tcl_GetErrorLine(interp))); } return result; } @@ -1894,7 +1894,8 @@ TclNRForIterCallback( Tcl_ResetResult(interp); break; case TCL_ERROR: - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(msg, interp->errorLine)); + Tcl_AppendObjToErrorInfo(interp, + Tcl_ObjPrintf(msg, Tcl_GetErrorLine(interp))); } return result; } @@ -2100,7 +2101,7 @@ ForeachLoopStep( goto done; case TCL_ERROR: Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"foreach\" body line %d)", interp->errorLine)); + "\n (\"foreach\" body line %d)", Tcl_GetErrorLine(interp))); default: goto done; } diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 794b75b..c42370c 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.171 2008/10/14 22:37:53 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.172 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -3892,7 +3892,7 @@ Tcl_SwitchObjCmd( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (\"%.*s%s\" arm line %d)", (overflow ? limit : patternLength), pattern, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } TclStackFree(interp, ctxPtr); return result; diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 2578df2..f75b63e 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.156 2008/11/17 22:15:34 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.157 2008/12/02 19:40:41 dgp Exp $ */ #ifndef _TCLDECLS @@ -3657,6 +3657,16 @@ EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); #endif +#ifndef Tcl_GetErrorLine_TCL_DECLARED +#define Tcl_GetErrorLine_TCL_DECLARED +/* 605 */ +EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); +#endif +#ifndef Tcl_SetErrorLine_TCL_DECLARED +#define Tcl_SetErrorLine_TCL_DECLARED +/* 606 */ +EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int value); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4321,6 +4331,8 @@ typedef struct TclStubs { int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ + int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ + void (*tcl_SetErrorLine) (Tcl_Interp * interp, int value); /* 606 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6813,6 +6825,14 @@ extern const TclStubs *tclStubsPtr; #define Tcl_ParseArgsObjv \ (tclStubsPtr->tcl_ParseArgsObjv) /* 604 */ #endif +#ifndef Tcl_GetErrorLine +#define Tcl_GetErrorLine \ + (tclStubsPtr->tcl_GetErrorLine) /* 605 */ +#endif +#ifndef Tcl_SetErrorLine +#define Tcl_SetErrorLine \ + (tclStubsPtr->tcl_SetErrorLine) /* 606 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 75e1478..bcdc404 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.70 2008/11/17 22:15:34 nijtmans Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.71 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -2508,7 +2508,8 @@ DictForLoopCallback( result = TCL_OK; } else if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"dict for\" body line %d)", interp->errorLine)); + "\n (\"dict for\" body line %d)", + Tcl_GetErrorLine(interp))); } goto done; } @@ -2904,7 +2905,7 @@ DictFilterCmd( case TCL_ERROR: Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (\"dict filter\" script line %d)", - interp->errorLine)); + Tcl_GetErrorLine(interp))); default: goto abnormalResult; } diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 607397e..7b6a4c8 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.159 2008/11/13 22:34:33 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.160 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -1775,7 +1775,7 @@ Tcl_FSEvalFileEx( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (file \"%.*s%s\" line %d)", (overflow ? limit : length), pathString, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } end: diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index a88d140..3703118 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.182 2008/11/11 21:54:06 nijtmans Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.183 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -3375,7 +3375,7 @@ NsEval_Callback( "\n (in namespace %s \"%.*s%s\" script line %d)", cmd, (overflow ? limit : length), namespacePtr->fullName, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } /* diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index b52f90c..887e80c 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.15 2008/11/01 00:04:26 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.16 2008/12/02 19:40:41 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -358,11 +358,11 @@ FinalizeEval( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (in \"%s eval\" script line %d)", - TclGetString(objnameObj), interp->errorLine)); + TclGetString(objnameObj), Tcl_GetErrorLine(interp))); } else { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (in \"my eval\" script line %d)", - interp->errorLine)); + Tcl_GetErrorLine(interp))); } } @@ -1010,7 +1010,7 @@ UpcatchCallback( iPtr->varFramePtr = savedFramePtr; if (rewind || Tcl_LimitExceeded(interp)) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"UpCatch\" body line %d)", interp->errorLine)); + "\n (\"UpCatch\" body line %d)", Tcl_GetErrorLine(interp))); return TCL_ERROR; } resultObj[0] = Tcl_GetObjResult(interp); diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index a96d267..5b1f354 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.7 2008/10/31 22:08:32 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.8 2008/12/02 19:40:41 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -706,7 +706,7 @@ TclOODefineObjCmd( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (in definition script for object \"%.*s%s\" line %d)", (overflow ? limit : length), objName, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } } else { Tcl_Obj *objPtr, *obj2Ptr, **objs; @@ -825,7 +825,7 @@ TclOOObjDefObjCmd( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (in definition script for object \"%.*s%s\" line %d)", (overflow ? limit : length), objName, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } } else { Tcl_Obj *objPtr, *obj2Ptr, **objs; @@ -945,7 +945,7 @@ TclOODefineSelfObjCmd( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (in definition script for object \"%.*s%s\" line %d)", (overflow ? limit : length), objName, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } } else { Tcl_Obj *objPtr, *obj2Ptr, **objs; diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 34a3172..2606f0a 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.20 2008/09/24 09:51:47 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.21 2008/12/02 19:40:41 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -1173,7 +1173,7 @@ MethodErrorHandler( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.*s%s\" method \"%.*s%s\" line %d)", kindName, ELLIPSIFY(objectName, objectNameLen), - ELLIPSIFY(methodName, nameLen), interp->errorLine)); + ELLIPSIFY(methodName, nameLen), Tcl_GetErrorLine(interp))); } static void @@ -1187,7 +1187,7 @@ ConstructorErrorHandler( const char *objectName, *kindName; int objectNameLen; - if (interp->errorLine == (int) 0xDEADBEEF) { + if (Tcl_GetErrorLine(interp) == (int) 0xDEADBEEF) { /* * Horrible hack to deal with certain constructors that must not add * information to the error trace. @@ -1211,7 +1211,7 @@ ConstructorErrorHandler( &objectNameLen); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.*s%s\" constructor line %d)", kindName, - ELLIPSIFY(objectName, objectNameLen), interp->errorLine)); + ELLIPSIFY(objectName, objectNameLen), Tcl_GetErrorLine(interp))); } static void @@ -1240,7 +1240,7 @@ DestructorErrorHandler( &objectNameLen); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.*s%s\" destructor line %d)", kindName, - ELLIPSIFY(objectName, objectNameLen), interp->errorLine)); + ELLIPSIFY(objectName, objectNameLen), Tcl_GetErrorLine(interp))); } /* diff --git a/generic/tclProc.c b/generic/tclProc.c index a7e9531..80c792c 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.167 2008/10/28 23:29:54 nijtmans Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.168 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -903,7 +903,7 @@ Uplevel_Callback( if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (\"uplevel\" body line %d)", interp->errorLine)); + "\n (\"uplevel\" body line %d)", Tcl_GetErrorLine(interp))); } /* @@ -2091,7 +2091,7 @@ MakeProcError( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (procedure \"%.*s%s\" line %d)", (overflow ? limit : nameLen), procName, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } /* @@ -2783,7 +2783,7 @@ MakeLambdaError( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (lambda term \"%.*s%s\" line %d)", (overflow ? limit : nameLen), procName, - (overflow ? "..." : ""), interp->errorLine)); + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } /* diff --git a/generic/tclResult.c b/generic/tclResult.c index 40f0cba..8e85035 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.51 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.52 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -1084,6 +1084,45 @@ Tcl_SetObjErrorCode( /* *---------------------------------------------------------------------- * + * Tcl_GetErrorLine -- + * + * Results: + * + * Side effects: + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetErrorLine( + Tcl_Interp *interp) +{ + return ((Interp *) interp)->errorLine; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_SetErrorLine -- + * + * Results: + * + * Side effects: + * + *---------------------------------------------------------------------- + */ + +void +Tcl_SetErrorLine( + Tcl_Interp *interp, + int value) +{ + ((Interp *) interp)->errorLine = value; +} + +/* + *---------------------------------------------------------------------- + * * GetKeys -- * * Returns a Tcl_Obj * array of the standard keys used in the return diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index a95f056..15cfa2d 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.167 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.168 2008/12/02 19:40:41 dgp Exp $ */ #include "tclInt.h" @@ -1130,6 +1130,8 @@ static const TclStubs tclStubs = { Tcl_SetEnsembleParameterList, /* 602 */ Tcl_GetEnsembleParameterList, /* 603 */ Tcl_ParseArgsObjv, /* 604 */ + Tcl_GetErrorLine, /* 605 */ + Tcl_SetErrorLine, /* 606 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 45d2e7298dcad1a8d3c598fef8a2446d3a77310b Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 2 Dec 2008 19:45:14 +0000 Subject: note incompa --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6b27c8e..5d6d1ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,8 @@ * generic/tclOOMethod.c: * generic/tclProc.c: * generic/tclResult.c: + *** POTENTIAL INCOMPATIBILITY for C code directly using the + interp->errorLine field *** * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: -- cgit v0.12 From 6098a1e4066549ea5b34b4d51586fe5182111487 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 3 Dec 2008 07:08:44 +0000 Subject: * generic/tclFileName.c (DoGlob): One of the Tcl_FSMatchInDirectory() calls did not have its return code checked. This caused error messages returned by some Tcl_Filesystem drivers to be swallowed. --- ChangeLog | 7 +++++++ generic/tclFileName.c | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d6d1ec..0b4f6cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-03 Don Porter + + * generic/tclFileName.c (DoGlob): One of the + Tcl_FSMatchInDirectory() calls did not have its return code checked. + This caused error messages returned by some Tcl_Filesystem drivers + to be swallowed. + 2008-12-02 Don Porter TIP #336 IMPLEMENTATION diff --git a/generic/tclFileName.c b/generic/tclFileName.c index cca1a9b..2d62414 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.94 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.95 2008/12/03 07:08:44 dgp Exp $ */ #include "tclInt.h" @@ -2464,9 +2464,10 @@ DoGlob( } Tcl_IncrRefCount(joinedPtr); Tcl_DStringFree(&append); - Tcl_FSMatchInDirectory(interp, matchesObj, joinedPtr, NULL, types); + result = Tcl_FSMatchInDirectory(interp, matchesObj, joinedPtr, NULL, + types); Tcl_DecrRefCount(joinedPtr); - return TCL_OK; + return result; } /* -- cgit v0.12 From 03df1c4fdcf3eba690c937f14950f18d6817dc51 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 3 Dec 2008 09:51:45 +0000 Subject: Fix [Bug 2380318] --- ChangeLog | 16 ++++++++++------ win/tclWinPipe.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 60 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b4f6cb..9d5a363 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,13 @@ +2008-12-03 Donal K. Fellows + + * win/tclWinPipe.c (TclpOpenTemporaryFile): Avoid an infinite loop due + to GetTempFileName/CreateFile interaction. [Bug 2380318] + 2008-12-03 Don Porter - * generic/tclFileName.c (DoGlob): One of the - Tcl_FSMatchInDirectory() calls did not have its return code checked. - This caused error messages returned by some Tcl_Filesystem drivers - to be swallowed. + * generic/tclFileName.c (DoGlob): One of the Tcl_FSMatchInDirectory + calls did not have its return code checked. This caused error messages + returned by some Tcl_Filesystem drivers to be swallowed. 2008-12-02 Don Porter @@ -30,8 +34,8 @@ 2008-12-02 Andreas Kupries * generic/tclIO.c (TclFinalizeIOSubsystem): Replaced Alexandre - Ferrieux's first patch for [Bug 2270477] with a gentler version, - also supplied by him. + Ferrieux's first patch for [Bug 2270477] with a gentler version, also + supplied by him. 2008-12-01 Don Porter diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index ad9e6d8..10caad7 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.68 2008/11/29 18:17:20 dkf Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.69 2008/12/03 09:51:45 dkf Exp $ */ #include "tclWinInt.h" @@ -3175,26 +3175,66 @@ TclpOpenTemporaryFile( Tcl_Obj *resultingNameObj) { WCHAR name[MAX_PATH]; + char *namePtr; HANDLE handle; DWORD flags = FILE_ATTRIBUTE_TEMPORARY; + int length, counter, counter2; + Tcl_DString buf; if (!resultingNameObj) { flags |= FILE_FLAG_DELETE_ON_CLOSE; } + namePtr = (char *) name; + length = tclWinProcs->getTempPathProc(MAX_PATH, name); + if (length == 0) { + goto gotError; + } + if (tclWinProcs->useWide) { + namePtr += length * sizeof(WCHAR); + } else { + namePtr += length; + } + if (basenameObj) { + const char *string = Tcl_GetStringFromObj(basenameObj, &length); + + Tcl_WinUtfToTChar(string, length, &buf); + memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); + namePtr += Tcl_DStringLength(&buf); + Tcl_DStringFree(&buf); + } else { + TCHAR *baseStr = tclWinProcs->useWide ? + (TCHAR *) L"TCL" : (TCHAR *) "TCL"; + int length = tclWinProcs->useWide ? 3*sizeof(WCHAR) : 3; + + memcpy(namePtr, baseStr, length); + namePtr += length; + } + counter = TclpGetClicks() % 65533; + counter2 = 1024; /* Only try this many times! Prevents + * an infinite loop. */ + do { - if (TempFileName(name) == 0) { - TclWinConvertError(GetLastError()); - return NULL; + char number[TCL_INTEGER_SPACE + 4]; + + sprintf(number, "%d.TMP", counter); + counter = (unsigned short) (counter + 1); + Tcl_WinUtfToTChar(number, strlen(number), &buf); + memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); + if (tclWinProcs->useWide) { + *(WCHAR *)(namePtr + Tcl_DStringLength(&buf) + 1) = '\0'; + } else { + namePtr[Tcl_DStringLength(&buf) + 1] = '\0'; } + Tcl_DStringFree(&buf); handle = tclWinProcs->createFileProc((TCHAR *) name, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, flags, NULL); } while (handle == INVALID_HANDLE_VALUE + && --counter2 > 0 && GetLastError() == ERROR_FILE_EXISTS); if (handle == INVALID_HANDLE_VALUE) { - TclWinConvertError(GetLastError()); - return NULL; + goto gotError; } if (resultingNameObj) { @@ -3206,6 +3246,10 @@ TclpOpenTemporaryFile( return Tcl_MakeFileChannel((ClientData) handle, TCL_READABLE|TCL_WRITABLE); + + gotError: + TclWinConvertError(GetLastError()); + return NULL; } /* -- cgit v0.12 From a59513000fb2307fa6951642beb7bed484cd06ca Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 4 Dec 2008 17:45:52 +0000 Subject: * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added another flag value TCLPATH_NEEDNORM to mark those intreps which need more complete normalization attention for correct results. [Bug 2385549] --- ChangeLog | 6 ++++ generic/tclPathObj.c | 89 ++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 82 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d5a363..2287721 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-04 Don Porter + + * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added another + flag value TCLPATH_NEEDNORM to mark those intreps which need more + complete normalization attention for correct results. [Bug 2385549] + 2008-12-03 Donal K. Fellows * win/tclWinPipe.c (TclpOpenTemporaryFile): Avoid an infinite loop due diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 436eea4..7e4c4ff 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.75 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.76 2008/12/04 17:45:52 dgp Exp $ */ #include "tclInt.h" @@ -103,6 +103,7 @@ typedef struct FsPath { */ #define TCLPATH_APPENDED 1 +#define TCLPATH_NEEDNORM 4 /* * Define some macros to give us convenient access to path-object specific @@ -1246,6 +1247,8 @@ TclNewFSPathObj( FsPath *fsPathPtr; Tcl_Obj *pathPtr; ThreadSpecificData *tsdPtr; + const char *p; + int state = 0, count = 0; tsdPtr = TCL_TSD_INIT(&tclFsDataKey); @@ -1271,6 +1274,45 @@ TclNewFSPathObj( pathPtr->bytes = NULL; pathPtr->length = 0; + /* + * Look for path components made up of only "." + * This is overly conservative analysis to keep simple. It may + * mark some things as needing more aggressive normalization + * that don't actually need it. No harm done. + */ + for (p = addStrRep; len > 0; p++, len--) { + switch (state) { + case 0: /* So far only "." since last dirsep or start */ + switch (*p) { + case '.': + count++; + break; + case '/': + case '\\': + case ':': + if (count) { + PATHFLAGS(pathPtr) |= TCLPATH_NEEDNORM; + len = 0; + } + break; + default: + count = 0; + state = 1; + } + case 1: /* Scanning for next dirsep */ + switch (*p) { + case '/': + case '\\': + case ':': + state = 0; + break; + } + } + } + if (len == 0 && count) { + PATHFLAGS(pathPtr) |= TCLPATH_NEEDNORM; + } + return pathPtr; } @@ -1755,20 +1797,36 @@ Tcl_FSGetNormalizedPath( } Tcl_AppendObjToObj(copy, fsPathPtr->normPathPtr); - /* - * Normalize the combined string, but only starting after the end of - * the previously normalized 'dir'. This should be much faster! We use - * 'cwdLen-1' so that we are already pointing at the dir-separator - * that we know about. The normalization code will actually start off - * directly after that separator. - */ + /* Normalize the combined string. */ - TclFSNormalizeToUniquePath(interp, copy, cwdLen-1, - (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL)); + if (PATHFLAGS(pathPtr) & TCLPATH_NEEDNORM) { + /* + * If the "tail" part has components (like /../) that cause + * the combined path to need more complete normalizing, + * call on the more powerful routine to accomplish that so + * we avoid [Bug 2385549] ... + */ - /* - * Now we need to construct the new path object - */ + Tcl_Obj *newCopy = TclFSNormalizeAbsolutePath(interp, copy, NULL); + Tcl_DecrRefCount(copy); + copy = newCopy; + } else { + /* + * ... but in most cases where we join a trouble free tail + * to a normalized head, we can more efficiently normalize the + * combined path by passing over only the unnormalized tail + * portion. When this is sufficient, prior developers claim + * this should be much faster. We use 'cwdLen-1' so that we are + * already pointing at the dir-separator that we know about. + * The normalization code will actually start off directly + * after that separator. + */ + + TclFSNormalizeToUniquePath(interp, copy, cwdLen-1, + (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL)); + } + + /* Now we need to construct the new path object. */ if (pathType == TCL_PATH_RELATIVE) { Tcl_Obj *origDir = fsPathPtr->cwdPtr; @@ -1809,6 +1867,11 @@ Tcl_FSGetNormalizedPath( TclDecrRefCount(dir); } if (clientData != NULL) { + /* + * This may be unnecessary. It appears that the + * TclFSNormalizeToUniquePath call above should have already + * set this up. Not changing out of fear of the unknown. + */ fsPathPtr->nativePathPtr = clientData; } PATHFLAGS(pathPtr) = 0; -- cgit v0.12 From ce2d0cb7086d505a6a8bab25315b986de0c0250f Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Dec 2008 14:27:35 +0000 Subject: Implement TIP#307. --- ChangeLog | 12 +- doc/SetResult.3 | 38 ++++- generic/tcl.decls | 403 ++++++++++++++++++++++++++-------------------------- generic/tclInt.h | 4 +- generic/tclInterp.c | 18 +-- generic/tclLoad.c | 6 +- generic/tclResult.c | 6 +- 7 files changed, 256 insertions(+), 231 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2287721..10f7d0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,16 @@ +2008-12-05 Donal K. Fellows + + TIP #307 IMPLEMENTATION + + * generic/tclResult.c (Tcl_TransferResult): Renamed function from + * generic/tcl.decls: TclTransferResult. Added + * doc/SetResult.3: to public stubs table. + 2008-12-04 Don Porter - * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added another + * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added another flag value TCLPATH_NEEDNORM to mark those intreps which need more - complete normalization attention for correct results. [Bug 2385549] + complete normalization attention for correct results. [Bug 2385549] 2008-12-03 Donal K. Fellows diff --git a/doc/SetResult.3 b/doc/SetResult.3 index da3b3f9..2a17dac 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.20 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.21 2008/12/05 14:27:36 dkf Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult, Tcl_FreeResult \- manipulate Tcl result +Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult, Tcl_FreeResult \- manipulate Tcl result .SH SYNOPSIS .nf \fB#include \fR @@ -30,13 +30,17 @@ const char * .sp \fBTcl_AppendResultVA\fR(\fIinterp, argList\fR) .sp -\fBTcl_AppendElement\fR(\fIinterp, element\fR) -.sp \fBTcl_ResetResult\fR(\fIinterp\fR) .sp +.VS 8.6 +\fBTcl_TransferResult\fR(\fIsourceInterp, result, targetInterp\fR) +.VE 8.6 +.sp +\fBTcl_AppendElement\fR(\fIinterp, element\fR) +.sp \fBTcl_FreeResult\fR(\fIinterp\fR) .SH ARGUMENTS -.AS Tcl_FreeProc freeProc out +.AS Tcl_FreeProc sourceInterp out .AP Tcl_Interp *interp out Interpreter whose result is to be modified or read. .AP Tcl_Obj *objPtr in @@ -54,6 +58,19 @@ Address of procedure to call to release storage at .AP va_list argList in An argument list which must have been initialized using \fBva_start\fR, and cleared using \fBva_end\fR. +.AP Tcl_Interp *sourceInterp in +.VS 8.6 +Interpreter that the result and error information should be copied from. +.VE 8.6 +.AP Tcl_Interp *targetInterp in +.VS 8.6 +Interpreter that the result and error information should be copied to. +.VE 8.6 +.AP int result in +.VS 8.6 +If \fBTCL_OK\fR, only copy the result. If \fBTCL_ERROR\fR, copy the error +information as well. +.VE 8.6 .BE .SH DESCRIPTION .PP @@ -139,7 +156,14 @@ call; the last argument in the list must be a NULL pointer. .PP \fBTcl_AppendResultVA\fR is the same as \fBTcl_AppendResult\fR except that instead of taking a variable number of arguments it takes an argument list. -.SH "OLD STRING PROCEDURES" +.PP +.VS 8.6 +\fBTcl_TransferResult\fR moves a result from one interpreter to another, +optionally (dependent on the \fIresult\fR parameter) including the error +information as well. The interpreters must be in the same thread. +.VE 8.6 +.SH "DEPRECATED INTERFACES" +.SS "OLD STRING PROCEDURES" .PP Use of the following procedures (is deprecated since they manipulate the Tcl result as a string. @@ -174,7 +198,7 @@ It also sets \fIinterp->freeProc\fR to zero, but does not change \fIinterp->result\fR or clear error state. \fBTcl_FreeResult\fR is most commonly used when a procedure is about to replace one result value with another. -.SH "DIRECT ACCESS TO INTERP->RESULT IS DEPRECATED" +.SS "DIRECT ACCESS TO INTERP->RESULT IS DEPRECATED" .PP It used to be legal for programs to directly read and write \fIinterp->result\fR diff --git a/generic/tcl.decls b/generic/tcl.decls index b294b91..abd9ed7 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.155 2008/12/02 19:40:40 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.156 2008/12/05 14:27:36 dkf Exp $ library tcl @@ -29,11 +29,11 @@ hooks {tclPlat tclInt tclIntPlat} # to preserve backwards compatibility. declare 0 generic { - int Tcl_PkgProvideEx(Tcl_Interp* interp, const char* name, - const char* version, ClientData clientData) + int Tcl_PkgProvideEx(Tcl_Interp *interp, const char *name, + const char *version, ClientData clientData) } declare 1 generic { - CONST84_RETURN char * Tcl_PkgRequireEx(Tcl_Interp *interp, + CONST84_RETURN char *Tcl_PkgRequireEx(Tcl_Interp *interp, const char *name, const char *version, int exact, ClientData *clientDataPtr) } @@ -41,22 +41,22 @@ declare 2 generic { void Tcl_Panic(const char *format, ...) } declare 3 generic { - char * Tcl_Alloc(unsigned int size) + char *Tcl_Alloc(unsigned int size) } declare 4 generic { void Tcl_Free(char *ptr) } declare 5 generic { - char * Tcl_Realloc(char *ptr, unsigned int size) + char *Tcl_Realloc(char *ptr, unsigned int size) } declare 6 generic { - char * Tcl_DbCkalloc(unsigned int size, const char *file, int line) + char *Tcl_DbCkalloc(unsigned int size, const char *file, int line) } declare 7 generic { int Tcl_DbCkfree(char *ptr, const char *file, int line) } declare 8 generic { - char * Tcl_DbCkrealloc(char *ptr, unsigned int size, + char *Tcl_DbCkrealloc(char *ptr, unsigned int size, const char *file, int line) } @@ -87,10 +87,10 @@ declare 15 generic { void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...) } declare 16 generic { - void Tcl_AppendToObj(Tcl_Obj* objPtr, const char* bytes, int length) + void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes, int length) } declare 17 generic { - Tcl_Obj * Tcl_ConcatObj(int objc, Tcl_Obj *const objv[]) + Tcl_Obj *Tcl_ConcatObj(int objc, Tcl_Obj *const objv[]) } declare 18 generic { int Tcl_ConvertToType(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -106,32 +106,32 @@ declare 21 generic { int Tcl_DbIsShared(Tcl_Obj *objPtr, const char *file, int line) } declare 22 generic { - Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, const char *file, int line) + Tcl_Obj *Tcl_DbNewBooleanObj(int boolValue, const char *file, int line) } declare 23 generic { - Tcl_Obj * Tcl_DbNewByteArrayObj(const unsigned char *bytes, int length, + Tcl_Obj *Tcl_DbNewByteArrayObj(const unsigned char *bytes, int length, const char *file, int line) } declare 24 generic { - Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue, - const char *file, int line) + Tcl_Obj *Tcl_DbNewDoubleObj(double doubleValue, const char *file, + int line) } declare 25 generic { - Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv, + Tcl_Obj *Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv, const char *file, int line) } declare 26 generic { - Tcl_Obj * Tcl_DbNewLongObj(long longValue, const char *file, int line) + Tcl_Obj *Tcl_DbNewLongObj(long longValue, const char *file, int line) } declare 27 generic { - Tcl_Obj * Tcl_DbNewObj(const char *file, int line) + Tcl_Obj *Tcl_DbNewObj(const char *file, int line) } declare 28 generic { - Tcl_Obj * Tcl_DbNewStringObj(const char *bytes, int length, + Tcl_Obj *Tcl_DbNewStringObj(const char *bytes, int length, const char *file, int line) } declare 29 generic { - Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr) + Tcl_Obj *Tcl_DuplicateObj(Tcl_Obj *objPtr) } declare 30 generic { void TclFreeObj(Tcl_Obj *objPtr) @@ -144,7 +144,7 @@ declare 32 generic { int *boolPtr) } declare 33 generic { - unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *lengthPtr) + unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *lengthPtr) } declare 34 generic { int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr) @@ -167,10 +167,10 @@ declare 39 generic { int Tcl_GetLongFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr) } declare 40 generic { - CONST86 Tcl_ObjType * Tcl_GetObjType(const char *typeName) + CONST86 Tcl_ObjType *Tcl_GetObjType(const char *typeName) } declare 41 generic { - char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr) + char *Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr) } declare 42 generic { void Tcl_InvalidateStringRep(Tcl_Obj *objPtr) @@ -203,22 +203,22 @@ declare 49 generic { Tcl_Obj *Tcl_NewBooleanObj(int boolValue) } declare 50 generic { - Tcl_Obj *Tcl_NewByteArrayObj(const unsigned char* bytes, int length) + Tcl_Obj *Tcl_NewByteArrayObj(const unsigned char *bytes, int length) } declare 51 generic { - Tcl_Obj * Tcl_NewDoubleObj(double doubleValue) + Tcl_Obj *Tcl_NewDoubleObj(double doubleValue) } declare 52 generic { - Tcl_Obj * Tcl_NewIntObj(int intValue) + Tcl_Obj *Tcl_NewIntObj(int intValue) } declare 53 generic { - Tcl_Obj * Tcl_NewListObj(int objc, Tcl_Obj *const objv[]) + Tcl_Obj *Tcl_NewListObj(int objc, Tcl_Obj *const objv[]) } declare 54 generic { - Tcl_Obj * Tcl_NewLongObj(long longValue) + Tcl_Obj *Tcl_NewLongObj(long longValue) } declare 55 generic { - Tcl_Obj * Tcl_NewObj(void) + Tcl_Obj *Tcl_NewObj(void) } declare 56 generic { Tcl_Obj *Tcl_NewStringObj(const char *bytes, int length) @@ -227,7 +227,7 @@ declare 57 generic { void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue) } declare 58 generic { - unsigned char * Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int length) + unsigned char *Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int length) } declare 59 generic { void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, const unsigned char *bytes, @@ -249,7 +249,7 @@ declare 64 generic { void Tcl_SetObjLength(Tcl_Obj *objPtr, int length) } declare 65 generic { - void Tcl_SetStringObj(Tcl_Obj* objPtr, const char* bytes, int length) + void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes, int length) } declare 66 generic { void Tcl_AddErrorInfo(Tcl_Interp *interp, const char *message) @@ -307,7 +307,7 @@ declare 82 generic { int Tcl_CommandComplete(const char *cmd) } declare 83 generic { - char * Tcl_Concat(int argc, CONST84 char * const *argv) + char *Tcl_Concat(int argc, CONST84 char *const *argv) } declare 84 generic { int Tcl_ConvertElement(const char *src, char *dst, int flags) @@ -319,7 +319,7 @@ declare 85 generic { declare 86 generic { int Tcl_CreateAlias(Tcl_Interp *slave, const char *slaveCmd, Tcl_Interp *target, const char *targetCmd, int argc, - CONST84 char * const *argv) + CONST84 char *const *argv) } declare 87 generic { int Tcl_CreateAliasObj(Tcl_Interp *slave, const char *slaveCmd, @@ -351,7 +351,7 @@ declare 93 generic { void Tcl_CreateExitHandler(Tcl_ExitProc *proc, ClientData clientData) } declare 94 generic { - Tcl_Interp * Tcl_CreateInterp(void) + Tcl_Interp *Tcl_CreateInterp(void) } declare 95 generic { void Tcl_CreateMathFunc(Tcl_Interp *interp, const char *name, @@ -365,7 +365,7 @@ declare 96 generic { Tcl_CmdDeleteProc *deleteProc) } declare 97 generic { - Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp, const char *slaveName, + Tcl_Interp *Tcl_CreateSlave(Tcl_Interp *interp, const char *slaveName, int isSafe) } declare 98 generic { @@ -432,10 +432,10 @@ declare 116 generic { void Tcl_DoWhenIdle(Tcl_IdleProc *proc, ClientData clientData) } declare 117 generic { - char * Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, int length) + char *Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, int length) } declare 118 generic { - char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, const char *element) + char *Tcl_DStringAppendElement(Tcl_DString *dsPtr, const char *element) } declare 119 generic { void Tcl_DStringEndSublist(Tcl_DString *dsPtr) @@ -462,10 +462,10 @@ declare 126 generic { int Tcl_Eof(Tcl_Channel chan) } declare 127 generic { - CONST84_RETURN char * Tcl_ErrnoId(void) + CONST84_RETURN char *Tcl_ErrnoId(void) } declare 128 generic { - CONST84_RETURN char * Tcl_ErrnoMsg(int err) + CONST84_RETURN char *Tcl_ErrnoMsg(int err) } declare 129 generic { int Tcl_Eval(Tcl_Interp *interp, const char *script) @@ -519,7 +519,7 @@ declare 144 generic { void Tcl_FindExecutable(const char *argv0) } declare 145 generic { - Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr, + Tcl_HashEntry *Tcl_FirstHashEntry(Tcl_HashTable *tablePtr, Tcl_HashSearch *searchPtr) } declare 146 generic { @@ -560,40 +560,40 @@ declare 155 generic { int Tcl_GetChannelMode(Tcl_Channel chan) } declare 156 generic { - CONST84_RETURN char * Tcl_GetChannelName(Tcl_Channel chan) + CONST84_RETURN char *Tcl_GetChannelName(Tcl_Channel chan) } declare 157 generic { int Tcl_GetChannelOption(Tcl_Interp *interp, Tcl_Channel chan, const char *optionName, Tcl_DString *dsPtr) } declare 158 generic { - CONST86 Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan) + CONST86 Tcl_ChannelType *Tcl_GetChannelType(Tcl_Channel chan) } declare 159 generic { int Tcl_GetCommandInfo(Tcl_Interp *interp, const char *cmdName, Tcl_CmdInfo *infoPtr) } declare 160 generic { - CONST84_RETURN char * Tcl_GetCommandName(Tcl_Interp *interp, + CONST84_RETURN char *Tcl_GetCommandName(Tcl_Interp *interp, Tcl_Command command) } declare 161 generic { int Tcl_GetErrno(void) } declare 162 generic { - CONST84_RETURN char * Tcl_GetHostName(void) + CONST84_RETURN char *Tcl_GetHostName(void) } declare 163 generic { int Tcl_GetInterpPath(Tcl_Interp *askInterp, Tcl_Interp *slaveInterp) } declare 164 generic { - Tcl_Interp * Tcl_GetMaster(Tcl_Interp *interp) + Tcl_Interp *Tcl_GetMaster(Tcl_Interp *interp) } declare 165 generic { - const char * Tcl_GetNameOfExecutable(void) + const char *Tcl_GetNameOfExecutable(void) } declare 166 generic { - Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp) + Tcl_Obj *Tcl_GetObjResult(Tcl_Interp *interp) } # Tcl_GetOpenFile is only available on unix, but it is a part of the old @@ -618,20 +618,20 @@ declare 171 generic { int Tcl_GetServiceMode(void) } declare 172 generic { - Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp, const char *slaveName) + Tcl_Interp *Tcl_GetSlave(Tcl_Interp *interp, const char *slaveName) } declare 173 generic { Tcl_Channel Tcl_GetStdChannel(int type) } declare 174 generic { - CONST84_RETURN char * Tcl_GetStringResult(Tcl_Interp *interp) + CONST84_RETURN char *Tcl_GetStringResult(Tcl_Interp *interp) } declare 175 generic { - CONST84_RETURN char * Tcl_GetVar(Tcl_Interp *interp, const char *varName, + CONST84_RETURN char *Tcl_GetVar(Tcl_Interp *interp, const char *varName, int flags) } declare 176 generic { - CONST84_RETURN char * Tcl_GetVar2(Tcl_Interp *interp, const char *part1, + CONST84_RETURN char *Tcl_GetVar2(Tcl_Interp *interp, const char *part1, const char *part2, int flags) } declare 177 generic { @@ -664,7 +664,7 @@ declare 185 generic { } # Obsolete, use Tcl_FSJoinPath declare 186 generic { - char * Tcl_JoinPath(int argc, CONST84 char * const *argv, + char *Tcl_JoinPath(int argc, CONST84 char *const *argv, Tcl_DString *resultPtr) } declare 187 generic { @@ -674,7 +674,7 @@ declare 187 generic { # This slot is reserved for use by the plus patch: # declare 188 generic { -# Tcl_MainLoop +# Tcl_MainLoop # } declare 189 generic { @@ -687,20 +687,20 @@ declare 191 generic { Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket) } declare 192 generic { - char * Tcl_Merge(int argc, CONST84 char * const *argv) + char *Tcl_Merge(int argc, CONST84 char *const *argv) } declare 193 generic { - Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr) + Tcl_HashEntry *Tcl_NextHashEntry(Tcl_HashSearch *searchPtr) } declare 194 generic { void Tcl_NotifyChannel(Tcl_Channel channel, int mask) } declare 195 generic { - Tcl_Obj * Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, + Tcl_Obj *Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags) } declare 196 generic { - Tcl_Obj * Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, + Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags) } declare 197 {unix win} { @@ -731,7 +731,7 @@ declare 203 generic { int Tcl_PutEnv(const char *assignment) } declare 204 generic { - CONST84_RETURN char * Tcl_PosixError(Tcl_Interp *interp) + CONST84_RETURN char *Tcl_PosixError(Tcl_Interp *interp) } declare 205 generic { void Tcl_QueueEvent(Tcl_Event *evPtr, Tcl_QueuePosition position) @@ -838,18 +838,18 @@ declare 236 generic { void Tcl_SetStdChannel(Tcl_Channel channel, int type) } declare 237 generic { - CONST84_RETURN char * Tcl_SetVar(Tcl_Interp *interp, const char *varName, + CONST84_RETURN char *Tcl_SetVar(Tcl_Interp *interp, const char *varName, const char *newValue, int flags) } declare 238 generic { - CONST84_RETURN char * Tcl_SetVar2(Tcl_Interp *interp, const char *part1, + CONST84_RETURN char *Tcl_SetVar2(Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags) } declare 239 generic { - CONST84_RETURN char * Tcl_SignalId(int sig) + CONST84_RETURN char *Tcl_SignalId(int sig) } declare 240 generic { - CONST84_RETURN char * Tcl_SignalMsg(int sig) + CONST84_RETURN char *Tcl_SignalMsg(int sig) } declare 241 generic { void Tcl_SourceRCFile(Tcl_Interp *interp) @@ -882,7 +882,7 @@ declare 248 generic { int flags, Tcl_VarTraceProc *proc, ClientData clientData) } declare 249 generic { - char * Tcl_TranslateFileName(Tcl_Interp *interp, const char *name, + char *Tcl_TranslateFileName(Tcl_Interp *interp, const char *name, Tcl_DString *bufferPtr) } declare 250 generic { @@ -953,18 +953,18 @@ declare 268 generic { void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList) } declare 269 generic { - char * Tcl_HashStats(Tcl_HashTable *tablePtr) + char *Tcl_HashStats(Tcl_HashTable *tablePtr) } declare 270 generic { - CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, const char *start, + CONST84_RETURN char *Tcl_ParseVar(Tcl_Interp *interp, const char *start, CONST84 char **termPtr) } declare 271 generic { - CONST84_RETURN char * Tcl_PkgPresent(Tcl_Interp *interp, const char *name, + CONST84_RETURN char *Tcl_PkgPresent(Tcl_Interp *interp, const char *name, const char *version, int exact) } declare 272 generic { - CONST84_RETURN char * Tcl_PkgPresentEx(Tcl_Interp *interp, + CONST84_RETURN char *Tcl_PkgPresentEx(Tcl_Interp *interp, const char *name, const char *version, int exact, ClientData *clientDataPtr) } @@ -974,7 +974,7 @@ declare 273 generic { } # TIP #268: The internally used new Require function is in slot 573. declare 274 generic { - CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp, const char *name, + CONST84_RETURN char *Tcl_PkgRequire(Tcl_Interp *interp, const char *name, const char *version, int exact) } declare 275 generic { @@ -1070,7 +1070,7 @@ declare 295 generic { int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr) } declare 296 generic { - char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding, + char *Tcl_ExternalToUtfDString(Tcl_Encoding encoding, const char *src, int srcLen, Tcl_DString *dsPtr) } declare 297 generic { @@ -1089,7 +1089,7 @@ declare 301 generic { Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, const char *name) } declare 302 generic { - CONST84_RETURN char * Tcl_GetEncodingName(Tcl_Encoding encoding) + CONST84_RETURN char *Tcl_GetEncodingName(Tcl_Encoding encoding) } declare 303 generic { void Tcl_GetEncodingNames(Tcl_Interp *interp) @@ -1100,10 +1100,10 @@ declare 304 generic { int *indexPtr) } declare 305 generic { - VOID * Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size) + VOID *Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size) } declare 306 generic { - Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1, + Tcl_Obj *Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1, const char *part2, int flags) } declare 307 generic { @@ -1139,14 +1139,14 @@ declare 316 generic { int Tcl_SetSystemEncoding(Tcl_Interp *interp, const char *name) } declare 317 generic { - Tcl_Obj * Tcl_SetVar2Ex(Tcl_Interp *interp, const char *part1, - const char *part2, Tcl_Obj *newValuePtr, int flags) + Tcl_Obj *Tcl_SetVar2Ex(Tcl_Interp *interp, const char *part1, + const char *part2, Tcl_Obj *newValuePtr, int flags) } declare 318 generic { void Tcl_ThreadAlert(Tcl_ThreadId threadId) } declare 319 generic { - void Tcl_ThreadQueueEvent(Tcl_ThreadId threadId, Tcl_Event* evPtr, + void Tcl_ThreadQueueEvent(Tcl_ThreadId threadId, Tcl_Event *evPtr, Tcl_QueuePosition position) } declare 320 generic { @@ -1165,7 +1165,7 @@ declare 324 generic { int Tcl_UniCharToUtf(int ch, char *buf) } declare 325 generic { - CONST84_RETURN char * Tcl_UtfAtIndex(const char *src, int index) + CONST84_RETURN char *Tcl_UtfAtIndex(const char *src, int index) } declare 326 generic { int Tcl_UtfCharComplete(const char *src, int length) @@ -1174,16 +1174,16 @@ declare 327 generic { int Tcl_UtfBackslash(const char *src, int *readPtr, char *dst) } declare 328 generic { - CONST84_RETURN char * Tcl_UtfFindFirst(const char *src, int ch) + CONST84_RETURN char *Tcl_UtfFindFirst(const char *src, int ch) } declare 329 generic { - CONST84_RETURN char * Tcl_UtfFindLast(const char *src, int ch) + CONST84_RETURN char *Tcl_UtfFindLast(const char *src, int ch) } declare 330 generic { - CONST84_RETURN char * Tcl_UtfNext(const char *src) + CONST84_RETURN char *Tcl_UtfNext(const char *src) } declare 331 generic { - CONST84_RETURN char * Tcl_UtfPrev(const char *src, const char *start) + CONST84_RETURN char *Tcl_UtfPrev(const char *src, const char *start) } declare 332 generic { int Tcl_UtfToExternal(Tcl_Interp *interp, Tcl_Encoding encoding, @@ -1192,7 +1192,7 @@ declare 332 generic { int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr) } declare 333 generic { - char * Tcl_UtfToExternalDString(Tcl_Encoding encoding, + char *Tcl_UtfToExternalDString(Tcl_Encoding encoding, const char *src, int srcLen, Tcl_DString *dsPtr) } declare 334 generic { @@ -1214,10 +1214,10 @@ declare 339 generic { int Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr) } declare 340 generic { - char * Tcl_GetString(Tcl_Obj *objPtr) + char *Tcl_GetString(Tcl_Obj *objPtr) } declare 341 generic { - CONST84_RETURN char * Tcl_GetDefaultEncodingDir(void) + CONST84_RETURN char *Tcl_GetDefaultEncodingDir(void) } declare 342 generic { void Tcl_SetDefaultEncodingDir(const char *path) @@ -1257,11 +1257,11 @@ declare 353 generic { unsigned long numChars) } declare 354 generic { - char * Tcl_UniCharToUtfDString(const Tcl_UniChar *uniStr, + char *Tcl_UniCharToUtfDString(const Tcl_UniChar *uniStr, int uniLength, Tcl_DString *dsPtr) } declare 355 generic { - Tcl_UniChar * Tcl_UtfToUniCharDString(const char *src, + Tcl_UniChar *Tcl_UtfToUniCharDString(const char *src, int length, Tcl_DString *dsPtr) } declare 356 generic { @@ -1343,7 +1343,7 @@ declare 377 generic { void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr) } declare 378 generic { - Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode, int numChars) + Tcl_Obj *Tcl_NewUnicodeObj(const Tcl_UniChar *unicode, int numChars) } declare 379 generic { void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, @@ -1356,10 +1356,10 @@ declare 381 generic { Tcl_UniChar Tcl_GetUniChar(Tcl_Obj *objPtr, int index) } declare 382 generic { - Tcl_UniChar * Tcl_GetUnicode(Tcl_Obj *objPtr) + Tcl_UniChar *Tcl_GetUnicode(Tcl_Obj *objPtr) } declare 383 generic { - Tcl_Obj * Tcl_GetRange(Tcl_Obj *objPtr, int first, int last) + Tcl_Obj *Tcl_GetRange(Tcl_Obj *objPtr, int first, int last) } declare 384 generic { void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, @@ -1373,7 +1373,7 @@ declare 386 generic { void Tcl_SetNotifier(Tcl_NotifierProcs *notifierProcPtr) } declare 387 generic { - Tcl_Mutex * Tcl_GetAllocMutex(void) + Tcl_Mutex *Tcl_GetAllocMutex(void) } declare 388 generic { int Tcl_GetChannelNames(Tcl_Interp *interp) @@ -1410,70 +1410,70 @@ declare 397 generic { int Tcl_ChannelBuffered(Tcl_Channel chan) } declare 398 generic { - CONST84_RETURN char * Tcl_ChannelName(const Tcl_ChannelType *chanTypePtr) + CONST84_RETURN char *Tcl_ChannelName(const Tcl_ChannelType *chanTypePtr) } declare 399 generic { Tcl_ChannelTypeVersion Tcl_ChannelVersion( const Tcl_ChannelType *chanTypePtr) } declare 400 generic { - Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc( + Tcl_DriverBlockModeProc *Tcl_ChannelBlockModeProc( const Tcl_ChannelType *chanTypePtr) } declare 401 generic { - Tcl_DriverCloseProc * Tcl_ChannelCloseProc( + Tcl_DriverCloseProc *Tcl_ChannelCloseProc( const Tcl_ChannelType *chanTypePtr) } declare 402 generic { - Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc( + Tcl_DriverClose2Proc *Tcl_ChannelClose2Proc( const Tcl_ChannelType *chanTypePtr) } declare 403 generic { - Tcl_DriverInputProc * Tcl_ChannelInputProc( + Tcl_DriverInputProc *Tcl_ChannelInputProc( const Tcl_ChannelType *chanTypePtr) } declare 404 generic { - Tcl_DriverOutputProc * Tcl_ChannelOutputProc( + Tcl_DriverOutputProc *Tcl_ChannelOutputProc( const Tcl_ChannelType *chanTypePtr) } declare 405 generic { - Tcl_DriverSeekProc * Tcl_ChannelSeekProc( + Tcl_DriverSeekProc *Tcl_ChannelSeekProc( const Tcl_ChannelType *chanTypePtr) } declare 406 generic { - Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc( + Tcl_DriverSetOptionProc *Tcl_ChannelSetOptionProc( const Tcl_ChannelType *chanTypePtr) } declare 407 generic { - Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc( + Tcl_DriverGetOptionProc *Tcl_ChannelGetOptionProc( const Tcl_ChannelType *chanTypePtr) } declare 408 generic { - Tcl_DriverWatchProc * Tcl_ChannelWatchProc( + Tcl_DriverWatchProc *Tcl_ChannelWatchProc( const Tcl_ChannelType *chanTypePtr) } declare 409 generic { - Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc( + Tcl_DriverGetHandleProc *Tcl_ChannelGetHandleProc( const Tcl_ChannelType *chanTypePtr) } declare 410 generic { - Tcl_DriverFlushProc * Tcl_ChannelFlushProc( + Tcl_DriverFlushProc *Tcl_ChannelFlushProc( const Tcl_ChannelType *chanTypePtr) } declare 411 generic { - Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc( + Tcl_DriverHandlerProc *Tcl_ChannelHandlerProc( const Tcl_ChannelType *chanTypePtr) } # Introduced in 8.4a2 declare 412 generic { - int Tcl_JoinThread(Tcl_ThreadId threadId, int* result) + int Tcl_JoinThread(Tcl_ThreadId threadId, int *result) } declare 413 generic { int Tcl_IsChannelShared(Tcl_Channel channel) } declare 414 generic { - int Tcl_IsChannelRegistered(Tcl_Interp* interp, Tcl_Channel channel) + int Tcl_IsChannelRegistered(Tcl_Interp *interp, Tcl_Channel channel) } declare 415 generic { void Tcl_CutChannel(Tcl_Channel channel) @@ -1485,7 +1485,7 @@ declare 417 generic { void Tcl_ClearChannelHandlers(Tcl_Channel channel) } declare 418 generic { - int Tcl_IsChannelExisting(const char* channelName) + int Tcl_IsChannelExisting(const char *channelName) } declare 419 generic { int Tcl_UniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, @@ -1523,16 +1523,16 @@ declare 427 generic { int flags, Tcl_CommandTraceProc *proc, ClientData clientData) } declare 428 generic { - char * Tcl_AttemptAlloc(unsigned int size) + char *Tcl_AttemptAlloc(unsigned int size) } declare 429 generic { - char * Tcl_AttemptDbCkalloc(unsigned int size, const char *file, int line) + char *Tcl_AttemptDbCkalloc(unsigned int size, const char *file, int line) } declare 430 generic { - char * Tcl_AttemptRealloc(char *ptr, unsigned int size) + char *Tcl_AttemptRealloc(char *ptr, unsigned int size) } declare 431 generic { - char * Tcl_AttemptDbCkrealloc(char *ptr, unsigned int size, + char *Tcl_AttemptDbCkrealloc(char *ptr, unsigned int size, const char *file, int line) } declare 432 generic { @@ -1543,7 +1543,7 @@ declare 433 generic { } # introduced in 8.4a3 declare 434 generic { - Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr) + Tcl_UniChar *Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr) } declare 435 generic { int Tcl_GetMathFuncInfo(Tcl_Interp *interp, const char *name, @@ -1551,13 +1551,13 @@ declare 435 generic { Tcl_MathProc **procPtr, ClientData *clientDataPtr) } declare 436 generic { - Tcl_Obj * Tcl_ListMathFuncs(Tcl_Interp *interp, const char *pattern) + Tcl_Obj *Tcl_ListMathFuncs(Tcl_Interp *interp, const char *pattern) } declare 437 generic { - Tcl_Obj * Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) + Tcl_Obj *Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) } declare 438 generic { - int Tcl_DetachChannel(Tcl_Interp* interp, Tcl_Channel channel) + int Tcl_DetachChannel(Tcl_Interp *interp, Tcl_Channel channel) } declare 439 generic { int Tcl_IsStandardChannel(Tcl_Channel channel) @@ -1577,11 +1577,9 @@ declare 443 generic { int Tcl_FSDeleteFile(Tcl_Obj *pathPtr) } declare 444 generic { - int Tcl_FSLoadFile(Tcl_Interp * interp, - Tcl_Obj *pathPtr, const char * sym1, const char * sym2, - Tcl_PackageInitProc ** proc1Ptr, - Tcl_PackageInitProc ** proc2Ptr, - Tcl_LoadHandle * handlePtr, + int Tcl_FSLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *sym1, + const char *sym2, Tcl_PackageInitProc **proc1Ptr, + Tcl_PackageInitProc **proc2Ptr, Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr) } declare 445 generic { @@ -1589,7 +1587,7 @@ declare 445 generic { Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types) } declare 446 generic { - Tcl_Obj * Tcl_FSLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkAction) + Tcl_Obj *Tcl_FSLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkAction) } declare 447 generic { int Tcl_FSRemoveDirectory(Tcl_Obj *pathPtr, @@ -1613,7 +1611,8 @@ declare 452 generic { int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr) } declare 453 generic { - const char *CONST86 * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef) + const char *CONST86 *Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, + Tcl_Obj **objPtrRef) } declare 454 generic { int Tcl_FSStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf) @@ -1626,7 +1625,7 @@ declare 456 generic { const char *modeString, int permissions) } declare 457 generic { - Tcl_Obj* Tcl_FSGetCwd(Tcl_Interp *interp) + Tcl_Obj *Tcl_FSGetCwd(Tcl_Interp *interp) } declare 458 generic { int Tcl_FSChdir(Tcl_Obj *pathPtr) @@ -1635,46 +1634,46 @@ declare 459 generic { int Tcl_FSConvertToPathType(Tcl_Interp *interp, Tcl_Obj *pathPtr) } declare 460 generic { - Tcl_Obj* Tcl_FSJoinPath(Tcl_Obj *listObj, int elements) + Tcl_Obj *Tcl_FSJoinPath(Tcl_Obj *listObj, int elements) } declare 461 generic { - Tcl_Obj* Tcl_FSSplitPath(Tcl_Obj* pathPtr, int *lenPtr) + Tcl_Obj *Tcl_FSSplitPath(Tcl_Obj *pathPtr, int *lenPtr) } declare 462 generic { - int Tcl_FSEqualPaths(Tcl_Obj* firstPtr, Tcl_Obj* secondPtr) + int Tcl_FSEqualPaths(Tcl_Obj *firstPtr, Tcl_Obj *secondPtr) } declare 463 generic { - Tcl_Obj* Tcl_FSGetNormalizedPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) + Tcl_Obj *Tcl_FSGetNormalizedPath(Tcl_Interp *interp, Tcl_Obj *pathPtr) } declare 464 generic { - Tcl_Obj* Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc, + Tcl_Obj *Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc, Tcl_Obj *const objv[]) } declare 465 generic { - ClientData Tcl_FSGetInternalRep(Tcl_Obj* pathPtr, + ClientData Tcl_FSGetInternalRep(Tcl_Obj *pathPtr, const Tcl_Filesystem *fsPtr) } declare 466 generic { - Tcl_Obj* Tcl_FSGetTranslatedPath(Tcl_Interp *interp, Tcl_Obj* pathPtr) + Tcl_Obj *Tcl_FSGetTranslatedPath(Tcl_Interp *interp, Tcl_Obj *pathPtr) } declare 467 generic { int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName) } declare 468 generic { - Tcl_Obj* Tcl_FSNewNativePath(const Tcl_Filesystem* fromFilesystem, + Tcl_Obj *Tcl_FSNewNativePath(const Tcl_Filesystem *fromFilesystem, ClientData clientData) } declare 469 generic { - const char* Tcl_FSGetNativePath(Tcl_Obj* pathPtr) + const char *Tcl_FSGetNativePath(Tcl_Obj *pathPtr) } declare 470 generic { - Tcl_Obj* Tcl_FSFileSystemInfo(Tcl_Obj* pathPtr) + Tcl_Obj *Tcl_FSFileSystemInfo(Tcl_Obj *pathPtr) } declare 471 generic { - Tcl_Obj* Tcl_FSPathSeparator(Tcl_Obj* pathPtr) + Tcl_Obj *Tcl_FSPathSeparator(Tcl_Obj *pathPtr) } declare 472 generic { - Tcl_Obj* Tcl_FSListVolumes(void) + Tcl_Obj *Tcl_FSListVolumes(void) } declare 473 generic { int Tcl_FSRegister(ClientData clientData, const Tcl_Filesystem *fsPtr) @@ -1686,15 +1685,16 @@ declare 475 generic { ClientData Tcl_FSData(const Tcl_Filesystem *fsPtr) } declare 476 generic { - const char* Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, - Tcl_Obj* pathPtr) + const char *Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, + Tcl_Obj *pathPtr) } declare 477 generic { - CONST86 Tcl_Filesystem* Tcl_FSGetFileSystemForPath(Tcl_Obj* pathPtr) + CONST86 Tcl_Filesystem *Tcl_FSGetFileSystemForPath(Tcl_Obj *pathPtr) } declare 478 generic { Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr) } + # New function due to TIP#49 declare 479 generic { int Tcl_OutputBuffered(Tcl_Channel chan) @@ -1710,27 +1710,26 @@ declare 481 generic { # New export due to TIP#73 declare 482 generic { - void Tcl_GetTime(Tcl_Time* timeBuf) + void Tcl_GetTime(Tcl_Time *timeBuf) } # New exports due to TIP#32 - declare 483 generic { - Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp* interp, int level, int flags, - Tcl_CmdObjTraceProc* objProc, ClientData clientData, - Tcl_CmdObjTraceDeleteProc* delProc) + Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, int level, int flags, + Tcl_CmdObjTraceProc *objProc, ClientData clientData, + Tcl_CmdObjTraceDeleteProc *delProc) } declare 484 generic { - int Tcl_GetCommandInfoFromToken(Tcl_Command token, Tcl_CmdInfo* infoPtr) + int Tcl_GetCommandInfoFromToken(Tcl_Command token, Tcl_CmdInfo *infoPtr) } declare 485 generic { int Tcl_SetCommandInfoFromToken(Tcl_Command token, - const Tcl_CmdInfo* infoPtr) + const Tcl_CmdInfo *infoPtr) } ### New functions on 64-bit dev branch ### declare 486 generic { - Tcl_Obj * Tcl_DbNewWideIntObj(Tcl_WideInt wideValue, + Tcl_Obj *Tcl_DbNewWideIntObj(Tcl_WideInt wideValue, const char *file, int line) } declare 487 generic { @@ -1738,13 +1737,13 @@ declare 487 generic { Tcl_WideInt *widePtr) } declare 488 generic { - Tcl_Obj * Tcl_NewWideIntObj(Tcl_WideInt wideValue) + Tcl_Obj *Tcl_NewWideIntObj(Tcl_WideInt wideValue) } declare 489 generic { void Tcl_SetWideIntObj(Tcl_Obj *objPtr, Tcl_WideInt wideValue) } declare 490 generic { - Tcl_StatBuf * Tcl_AllocStatBuf(void) + Tcl_StatBuf *Tcl_AllocStatBuf(void) } declare 491 generic { Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset, int mode) @@ -1755,7 +1754,7 @@ declare 492 generic { # New export due to TIP#91 declare 493 generic { - Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc( + Tcl_DriverWideSeekProc *Tcl_ChannelWideSeekProc( const Tcl_ChannelType *chanTypePtr) } @@ -1804,8 +1803,8 @@ declare 504 generic { # New export due to TIP#59 declare 505 generic { - void Tcl_RegisterConfig(Tcl_Interp* interp, const char* pkgName, - const Tcl_Config* configuration, const char* valEncoding) + void Tcl_RegisterConfig(Tcl_Interp *interp, const char *pkgName, + const Tcl_Config *configuration, const char *valEncoding) } # Transferred from tclInt.decls due to TIP #139 @@ -1857,7 +1856,7 @@ declare 517 generic { # New export due to TIP#137 declare 518 generic { int Tcl_FSEvalFileEx(Tcl_Interp *interp, Tcl_Obj *fileName, - const char *encodingName) + const char *encodingName) } # New export due to TIP#121 @@ -1980,14 +1979,14 @@ declare 551 generic { } # TIP#233 (Virtualized Time) declare 552 generic { - void Tcl_SetTimeProc(Tcl_GetTimeProc* getProc, - Tcl_ScaleTimeProc* scaleProc, + void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc, + Tcl_ScaleTimeProc *scaleProc, ClientData clientData) } declare 553 generic { - void Tcl_QueryTimeProc(Tcl_GetTimeProc** getProc, - Tcl_ScaleTimeProc** scaleProc, - ClientData* clientData) + void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc, + Tcl_ScaleTimeProc **scaleProc, + ClientData *clientData) } # TIP#218 (Driver Thread Actions) davygrvy/akupries ChannelType ver 4 declare 554 generic { @@ -1998,19 +1997,19 @@ declare 554 generic { # TIP#237 (Arbitrary-precision Integers) kevin kenny declare 555 generic { - Tcl_Obj* Tcl_NewBignumObj(mp_int* value) + Tcl_Obj *Tcl_NewBignumObj(mp_int *value) } declare 556 generic { - Tcl_Obj* Tcl_DbNewBignumObj(mp_int* value, const char* file, int line) + Tcl_Obj *Tcl_DbNewBignumObj(mp_int *value, const char *file, int line) } declare 557 generic { - void Tcl_SetBignumObj(Tcl_Obj* obj, mp_int* value) + void Tcl_SetBignumObj(Tcl_Obj *obj, mp_int *value) } declare 558 generic { - int Tcl_GetBignumFromObj(Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value) + int Tcl_GetBignumFromObj(Tcl_Interp *interp, Tcl_Obj *obj, mp_int *value) } declare 559 generic { - int Tcl_TakeBignumFromObj(Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value) + int Tcl_TakeBignumFromObj(Tcl_Interp *interp, Tcl_Obj *obj, mp_int *value) } # TIP #208 ('chan' Command) jeffh @@ -2023,52 +2022,48 @@ declare 561 generic { } # TIP#219 (Tcl Channel Reflection API) akupries - declare 562 generic { - void Tcl_SetChannelErrorInterp(Tcl_Interp* interp, Tcl_Obj* msg) + void Tcl_SetChannelErrorInterp(Tcl_Interp *interp, Tcl_Obj *msg) } declare 563 generic { - void Tcl_GetChannelErrorInterp(Tcl_Interp* interp, Tcl_Obj** msg) + void Tcl_GetChannelErrorInterp(Tcl_Interp *interp, Tcl_Obj **msg) } declare 564 generic { - void Tcl_SetChannelError(Tcl_Channel chan, Tcl_Obj* msg) + void Tcl_SetChannelError(Tcl_Channel chan, Tcl_Obj *msg) } declare 565 generic { - void Tcl_GetChannelError(Tcl_Channel chan, Tcl_Obj** msg) + void Tcl_GetChannelError(Tcl_Channel chan, Tcl_Obj **msg) } # TIP #237 (Additional conversion functions for bignum support) - declare 566 generic { - int Tcl_InitBignumFromDouble(Tcl_Interp* interp, double initval, - mp_int *toInit) + int Tcl_InitBignumFromDouble(Tcl_Interp *interp, double initval, + mp_int *toInit) } # TIP#181 (namespace unknown Command) declare 567 generic { Tcl_Obj *Tcl_GetNamespaceUnknownHandler(Tcl_Interp *interp, - Tcl_Namespace *nsPtr) + Tcl_Namespace *nsPtr) } declare 568 generic { - int Tcl_SetNamespaceUnknownHandler( - Tcl_Interp *interp, Tcl_Namespace *nsPtr, - Tcl_Obj *handlerPtr) + int Tcl_SetNamespaceUnknownHandler(Tcl_Interp *interp, + Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr) } # TIP#258 (Enhanced Interface for Encodings) - declare 569 generic { - int Tcl_GetEncodingFromObj(Tcl_Interp* interp, Tcl_Obj* objPtr, - Tcl_Encoding* encodingPtr) + int Tcl_GetEncodingFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, + Tcl_Encoding *encodingPtr) } declare 570 generic { - Tcl_Obj* Tcl_GetEncodingSearchPath(void) + Tcl_Obj *Tcl_GetEncodingSearchPath(void) } declare 571 generic { - int Tcl_SetEncodingSearchPath(Tcl_Obj* searchPath) + int Tcl_SetEncodingSearchPath(Tcl_Obj *searchPath) } declare 572 generic { - const char *Tcl_GetEncodingNameFromEnvironment(Tcl_DString* bufPtr) + const char *Tcl_GetEncodingNameFromEnvironment(Tcl_DString *bufPtr) } # TIP#268: Extended version numbers and requirements @@ -2086,15 +2081,15 @@ declare 575 generic { int limit, const char *ellipsis) } declare 576 generic { - Tcl_Obj * Tcl_Format(Tcl_Interp *interp, const char *format, int objc, - Tcl_Obj * const objv[]) + Tcl_Obj *Tcl_Format(Tcl_Interp *interp, const char *format, int objc, + Tcl_Obj *const objv[]) } declare 577 generic { int Tcl_AppendFormatToObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - const char *format, int objc, Tcl_Obj * const objv[]) + const char *format, int objc, Tcl_Obj *const objv[]) } declare 578 generic { - Tcl_Obj * Tcl_ObjPrintf(const char *format, ...) + Tcl_Obj *Tcl_ObjPrintf(const char *format, ...) } declare 579 generic { void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, const char *format, ...) @@ -2110,17 +2105,17 @@ declare 581 generic { } # TIP#304 (chan pipe) - declare 582 generic { - int Tcl_CreatePipe (Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags) + int Tcl_CreatePipe (Tcl_Interp *interp, Tcl_Channel *rchan, + Tcl_Channel *wchan, int flags) } # TIP #322 (NRE public interface) declare 583 generic { Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, - const char *cmdName, Tcl_ObjCmdProc *proc, - Tcl_ObjCmdProc *nreProc, ClientData clientData, - Tcl_CmdDeleteProc *deleteProc) + const char *cmdName, Tcl_ObjCmdProc *proc, + Tcl_ObjCmdProc *nreProc, ClientData clientData, + Tcl_CmdDeleteProc *deleteProc) } declare 584 generic { int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) @@ -2131,20 +2126,19 @@ declare 585 generic { } declare 586 generic { int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc, - Tcl_Obj *const objv[], int flags) + Tcl_Obj *const objv[], int flags) } declare 587 generic { void Tcl_NRAddCallback(Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, - ClientData data0, ClientData data1, - ClientData data2, ClientData data3) + ClientData data0, ClientData data1, ClientData data2, + ClientData data3) } # For use by NR extenders, to have a simple way to also provide a (required!) # classic objProc declare 588 generic { int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, - ClientData clientData, int objc, - Tcl_Obj *const objv[]) + ClientData clientData, int objc, Tcl_Obj *const objv[]) } # Tcl_StatBuf reader functions. [TIP #316] @@ -2212,10 +2206,16 @@ declare 606 generic { void Tcl_SetErrorLine(Tcl_Interp *interp, int value) } +# TIP#307 (expose this function!) +declare 607 generic { + void Tcl_TransferResult(Tcl_Interp *sourceInterp, int result, + Tcl_Interp *targetInterp) +} + ############################################################################## -# Define the platform specific public Tcl interface. These functions are -# only available on the designated platform. +# Define the platform specific public Tcl interface. These functions are only +# available on the designated platform. interface tclPlat @@ -2229,10 +2229,10 @@ interface tclPlat # Added in Tcl 8.1 declare 0 win { - TCHAR * Tcl_WinUtfToTChar(const char *str, int len, Tcl_DString *dsPtr) + TCHAR *Tcl_WinUtfToTChar(const char *str, int len, Tcl_DString *dsPtr) } declare 1 win { - char * Tcl_WinTCharToUtf(const TCHAR *str, int len, Tcl_DString *dsPtr) + char *Tcl_WinTCharToUtf(const TCHAR *str, int len, Tcl_DString *dsPtr) } ################################ @@ -2240,18 +2240,13 @@ declare 1 win { declare 0 macosx { int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp, - const char *bundleName, - int hasResourceFile, - int maxPathLen, - char *libraryPath) + const char *bundleName, int hasResourceFile, + int maxPathLen, char *libraryPath) } declare 1 macosx { int Tcl_MacOSXOpenVersionedBundleResources(Tcl_Interp *interp, - const char *bundleName, - const char *bundleVersion, - int hasResourceFile, - int maxPathLen, - char *libraryPath) + const char *bundleName, const char *bundleVersion, + int hasResourceFile, int maxPathLen, char *libraryPath) } diff --git a/generic/tclInt.h b/generic/tclInt.h index 85c8c00..73a8bab 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.407 2008/11/29 18:17:20 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.408 2008/12/05 14:27:36 dkf Exp $ */ #ifndef _TCLINT @@ -2823,8 +2823,6 @@ MODULE_SCOPE int TclStringMatchObj(Tcl_Obj *stringObj, MODULE_SCOPE Tcl_Obj * TclStringObjReverse(Tcl_Obj *objPtr); MODULE_SCOPE int TclSubstTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, int *tokensLeftPtr, int line); -MODULE_SCOPE void TclTransferResult(Tcl_Interp *sourceInterp, int result, - Tcl_Interp *targetInterp); MODULE_SCOPE Tcl_Obj * TclpNativeToNormalized(ClientData clientData); MODULE_SCOPE Tcl_Obj * TclpFilesystemPathType(Tcl_Obj *pathPtr); MODULE_SCOPE Tcl_PackageInitProc *TclpFindSymbol(Tcl_Interp *interp, diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 84cc8d1..939d3a0 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.97 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.98 2008/12/05 14:27:36 dkf Exp $ */ #include "tclInt.h" @@ -1011,7 +1011,7 @@ Tcl_InterpObjCmd( } chan = Tcl_GetChannel(masterInterp, TclGetString(objv[3]), NULL); if (chan == NULL) { - TclTransferResult(masterInterp, TCL_OK, interp); + Tcl_TransferResult(masterInterp, TCL_OK, interp); return TCL_ERROR; } slaveInterp = GetInterp(interp, objv[4]); @@ -1026,7 +1026,7 @@ Tcl_InterpObjCmd( */ if (Tcl_UnregisterChannel(masterInterp, chan) != TCL_OK) { - TclTransferResult(masterInterp, TCL_OK, interp); + Tcl_TransferResult(masterInterp, TCL_OK, interp); return TCL_ERROR; } } @@ -1896,7 +1896,7 @@ AliasObjCmd( */ if (targetInterp != interp) { - TclTransferResult(targetInterp, result, interp); + Tcl_TransferResult(targetInterp, result, interp); Tcl_Release(targetInterp); } @@ -2335,7 +2335,7 @@ SlaveCreate( return slaveInterp; error: - TclTransferResult(slaveInterp, TCL_ERROR, interp); + Tcl_TransferResult(slaveInterp, TCL_ERROR, interp); error2: Tcl_DeleteInterp(slaveInterp); @@ -2642,7 +2642,7 @@ SlaveEval( result = Tcl_EvalObjEx(slaveInterp, objPtr, 0); Tcl_DecrRefCount(objPtr); } - TclTransferResult(slaveInterp, result, interp); + Tcl_TransferResult(slaveInterp, result, interp); Tcl_Release(slaveInterp); return result; @@ -2684,7 +2684,7 @@ SlaveExpose( name = TclGetString(objv[(objc == 1) ? 0 : 1]); if (Tcl_ExposeCommand(slaveInterp, TclGetString(objv[0]), name) != TCL_OK) { - TclTransferResult(slaveInterp, TCL_ERROR, interp); + Tcl_TransferResult(slaveInterp, TCL_ERROR, interp); return TCL_ERROR; } return TCL_OK; @@ -2782,7 +2782,7 @@ SlaveHide( name = TclGetString(objv[(objc == 1) ? 0 : 1]); if (Tcl_HideCommand(slaveInterp, TclGetString(objv[0]), name) != TCL_OK) { - TclTransferResult(slaveInterp, TCL_ERROR, interp); + Tcl_TransferResult(slaveInterp, TCL_ERROR, interp); return TCL_ERROR; } return TCL_OK; @@ -2880,7 +2880,7 @@ SlaveInvokeHidden( } } - TclTransferResult(slaveInterp, result, interp); + Tcl_TransferResult(slaveInterp, result, interp); Tcl_Release(slaveInterp); return result; diff --git a/generic/tclLoad.c b/generic/tclLoad.c index c2a677b..0f64137 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.21 2008/11/13 22:34:33 nijtmans Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.22 2008/12/05 14:27:36 dkf Exp $ */ #include "tclInt.h" @@ -460,7 +460,7 @@ Tcl_LoadObjCmd( ipPtr->nextPtr = ipFirstPtr; Tcl_SetAssocData(target, "tclLoad", LoadCleanupProc, ipPtr); } else { - TclTransferResult(target, code, interp); + Tcl_TransferResult(target, code, interp); } done: @@ -736,7 +736,7 @@ Tcl_UnloadObjCmd( } code = unloadProc(target, code); if (code != TCL_OK) { - TclTransferResult(target, code, interp); + Tcl_TransferResult(target, code, interp); goto done; } diff --git a/generic/tclResult.c b/generic/tclResult.c index 8e85035..debb3f4 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.52 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.53 2008/12/05 14:27:36 dkf Exp $ */ #include "tclInt.h" @@ -1556,7 +1556,7 @@ Tcl_SetReturnOptions( /* *------------------------------------------------------------------------- * - * TclTransferResult -- + * Tcl_TransferResult -- * * Copy the result (and error information) from one interp to another. * Used when one interp has caused another interp to evaluate a script @@ -1582,7 +1582,7 @@ Tcl_SetReturnOptions( */ void -TclTransferResult( +Tcl_TransferResult( Tcl_Interp *sourceInterp, /* Interp whose result and error information * should be moved to the target interp. * After moving result, this interp's result -- cgit v0.12 From d576a102feda0e480a2d14fe0bcc65448a4ff17e Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Dec 2008 14:28:10 +0000 Subject: regen --- generic/tclDecls.h | 264 ++++++++++++++++++++++++++------------------------ generic/tclStubInit.c | 3 +- 2 files changed, 141 insertions(+), 126 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index f75b63e..bec1668 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.157 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.158 2008/12/05 14:28:10 dkf Exp $ */ #ifndef _TCLDECLS @@ -40,8 +40,8 @@ #ifndef Tcl_PkgProvideEx_TCL_DECLARED #define Tcl_PkgProvideEx_TCL_DECLARED /* 0 */ -EXTERN int Tcl_PkgProvideEx (Tcl_Interp* interp, - const char* name, const char* version, +EXTERN int Tcl_PkgProvideEx (Tcl_Interp * interp, + const char * name, const char * version, ClientData clientData); #endif #ifndef Tcl_PkgRequireEx_TCL_DECLARED @@ -148,8 +148,8 @@ EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); #ifndef Tcl_AppendToObj_TCL_DECLARED #define Tcl_AppendToObj_TCL_DECLARED /* 16 */ -EXTERN void Tcl_AppendToObj (Tcl_Obj* objPtr, const char* bytes, - int length); +EXTERN void Tcl_AppendToObj (Tcl_Obj * objPtr, + const char * bytes, int length); #endif #ifndef Tcl_ConcatObj_TCL_DECLARED #define Tcl_ConcatObj_TCL_DECLARED @@ -351,7 +351,7 @@ EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); #ifndef Tcl_NewByteArrayObj_TCL_DECLARED #define Tcl_NewByteArrayObj_TCL_DECLARED /* 50 */ -EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char* bytes, +EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char * bytes, int length); #endif #ifndef Tcl_NewDoubleObj_TCL_DECLARED @@ -430,8 +430,8 @@ EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); #ifndef Tcl_SetStringObj_TCL_DECLARED #define Tcl_SetStringObj_TCL_DECLARED /* 65 */ -EXTERN void Tcl_SetStringObj (Tcl_Obj* objPtr, const char* bytes, - int length); +EXTERN void Tcl_SetStringObj (Tcl_Obj * objPtr, + const char * bytes, int length); #endif #ifndef Tcl_AddErrorInfo_TCL_DECLARED #define Tcl_AddErrorInfo_TCL_DECLARED @@ -530,7 +530,7 @@ EXTERN int Tcl_CommandComplete (const char * cmd); #ifndef Tcl_Concat_TCL_DECLARED #define Tcl_Concat_TCL_DECLARED /* 83 */ -EXTERN char * Tcl_Concat (int argc, CONST84 char * const * argv); +EXTERN char * Tcl_Concat (int argc, CONST84 char *const * argv); #endif #ifndef Tcl_ConvertElement_TCL_DECLARED #define Tcl_ConvertElement_TCL_DECLARED @@ -550,7 +550,7 @@ EXTERN int Tcl_ConvertCountedElement (const char * src, EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, - CONST84 char * const * argv); + CONST84 char *const * argv); #endif #ifndef Tcl_CreateAliasObj_TCL_DECLARED #define Tcl_CreateAliasObj_TCL_DECLARED @@ -1163,7 +1163,7 @@ EXTERN int Tcl_IsSafe (Tcl_Interp * interp); #ifndef Tcl_JoinPath_TCL_DECLARED #define Tcl_JoinPath_TCL_DECLARED /* 186 */ -EXTERN char * Tcl_JoinPath (int argc, CONST84 char * const * argv, +EXTERN char * Tcl_JoinPath (int argc, CONST84 char *const * argv, Tcl_DString * resultPtr); #endif #ifndef Tcl_LinkVar_TCL_DECLARED @@ -1191,7 +1191,7 @@ EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); #ifndef Tcl_Merge_TCL_DECLARED #define Tcl_Merge_TCL_DECLARED /* 192 */ -EXTERN char * Tcl_Merge (int argc, CONST84 char * const * argv); +EXTERN char * Tcl_Merge (int argc, CONST84 char *const * argv); #endif #ifndef Tcl_NextHashEntry_TCL_DECLARED #define Tcl_NextHashEntry_TCL_DECLARED @@ -1981,7 +1981,8 @@ EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); #define Tcl_ThreadQueueEvent_TCL_DECLARED /* 319 */ EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, - Tcl_Event* evPtr, Tcl_QueuePosition position); + Tcl_Event * evPtr, + Tcl_QueuePosition position); #endif #ifndef Tcl_UniCharAtIndex_TCL_DECLARED #define Tcl_UniCharAtIndex_TCL_DECLARED @@ -2510,7 +2511,7 @@ EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( #ifndef Tcl_JoinThread_TCL_DECLARED #define Tcl_JoinThread_TCL_DECLARED /* 412 */ -EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int* result); +EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int * result); #endif #ifndef Tcl_IsChannelShared_TCL_DECLARED #define Tcl_IsChannelShared_TCL_DECLARED @@ -2520,7 +2521,7 @@ EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); #ifndef Tcl_IsChannelRegistered_TCL_DECLARED #define Tcl_IsChannelRegistered_TCL_DECLARED /* 414 */ -EXTERN int Tcl_IsChannelRegistered (Tcl_Interp* interp, +EXTERN int Tcl_IsChannelRegistered (Tcl_Interp * interp, Tcl_Channel channel); #endif #ifndef Tcl_CutChannel_TCL_DECLARED @@ -2541,7 +2542,7 @@ EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); #ifndef Tcl_IsChannelExisting_TCL_DECLARED #define Tcl_IsChannelExisting_TCL_DECLARED /* 418 */ -EXTERN int Tcl_IsChannelExisting (const char* channelName); +EXTERN int Tcl_IsChannelExisting (const char * channelName); #endif #ifndef Tcl_UniCharNcasecmp_TCL_DECLARED #define Tcl_UniCharNcasecmp_TCL_DECLARED @@ -2667,7 +2668,7 @@ EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, #ifndef Tcl_DetachChannel_TCL_DECLARED #define Tcl_DetachChannel_TCL_DECLARED /* 438 */ -EXTERN int Tcl_DetachChannel (Tcl_Interp* interp, +EXTERN int Tcl_DetachChannel (Tcl_Interp * interp, Tcl_Channel channel); #endif #ifndef Tcl_IsStandardChannel_TCL_DECLARED @@ -2783,7 +2784,7 @@ EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, #ifndef Tcl_FSGetCwd_TCL_DECLARED #define Tcl_FSGetCwd_TCL_DECLARED /* 457 */ -EXTERN Tcl_Obj* Tcl_FSGetCwd (Tcl_Interp * interp); +EXTERN Tcl_Obj * Tcl_FSGetCwd (Tcl_Interp * interp); #endif #ifndef Tcl_FSChdir_TCL_DECLARED #define Tcl_FSChdir_TCL_DECLARED @@ -2799,42 +2800,42 @@ EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, #ifndef Tcl_FSJoinPath_TCL_DECLARED #define Tcl_FSJoinPath_TCL_DECLARED /* 460 */ -EXTERN Tcl_Obj* Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); +EXTERN Tcl_Obj * Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); #endif #ifndef Tcl_FSSplitPath_TCL_DECLARED #define Tcl_FSSplitPath_TCL_DECLARED /* 461 */ -EXTERN Tcl_Obj* Tcl_FSSplitPath (Tcl_Obj* pathPtr, int * lenPtr); +EXTERN Tcl_Obj * Tcl_FSSplitPath (Tcl_Obj * pathPtr, int * lenPtr); #endif #ifndef Tcl_FSEqualPaths_TCL_DECLARED #define Tcl_FSEqualPaths_TCL_DECLARED /* 462 */ -EXTERN int Tcl_FSEqualPaths (Tcl_Obj* firstPtr, - Tcl_Obj* secondPtr); +EXTERN int Tcl_FSEqualPaths (Tcl_Obj * firstPtr, + Tcl_Obj * secondPtr); #endif #ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED #define Tcl_FSGetNormalizedPath_TCL_DECLARED /* 463 */ -EXTERN Tcl_Obj* Tcl_FSGetNormalizedPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); +EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSJoinToPath_TCL_DECLARED #define Tcl_FSJoinToPath_TCL_DECLARED /* 464 */ -EXTERN Tcl_Obj* Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, +EXTERN Tcl_Obj * Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_FSGetInternalRep_TCL_DECLARED #define Tcl_FSGetInternalRep_TCL_DECLARED /* 465 */ -EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj* pathPtr, +EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj * pathPtr, const Tcl_Filesystem * fsPtr); #endif #ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED #define Tcl_FSGetTranslatedPath_TCL_DECLARED /* 466 */ -EXTERN Tcl_Obj* Tcl_FSGetTranslatedPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); +EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSEvalFile_TCL_DECLARED #define Tcl_FSEvalFile_TCL_DECLARED @@ -2845,29 +2846,29 @@ EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, #ifndef Tcl_FSNewNativePath_TCL_DECLARED #define Tcl_FSNewNativePath_TCL_DECLARED /* 468 */ -EXTERN Tcl_Obj* Tcl_FSNewNativePath ( - const Tcl_Filesystem* fromFilesystem, +EXTERN Tcl_Obj * Tcl_FSNewNativePath ( + const Tcl_Filesystem * fromFilesystem, ClientData clientData); #endif #ifndef Tcl_FSGetNativePath_TCL_DECLARED #define Tcl_FSGetNativePath_TCL_DECLARED /* 469 */ -EXTERN const char* Tcl_FSGetNativePath (Tcl_Obj* pathPtr); +EXTERN const char * Tcl_FSGetNativePath (Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSFileSystemInfo_TCL_DECLARED #define Tcl_FSFileSystemInfo_TCL_DECLARED /* 470 */ -EXTERN Tcl_Obj* Tcl_FSFileSystemInfo (Tcl_Obj* pathPtr); +EXTERN Tcl_Obj * Tcl_FSFileSystemInfo (Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSPathSeparator_TCL_DECLARED #define Tcl_FSPathSeparator_TCL_DECLARED /* 471 */ -EXTERN Tcl_Obj* Tcl_FSPathSeparator (Tcl_Obj* pathPtr); +EXTERN Tcl_Obj * Tcl_FSPathSeparator (Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSListVolumes_TCL_DECLARED #define Tcl_FSListVolumes_TCL_DECLARED /* 472 */ -EXTERN Tcl_Obj* Tcl_FSListVolumes (void); +EXTERN Tcl_Obj * Tcl_FSListVolumes (void); #endif #ifndef Tcl_FSRegister_TCL_DECLARED #define Tcl_FSRegister_TCL_DECLARED @@ -2888,13 +2889,14 @@ EXTERN ClientData Tcl_FSData (const Tcl_Filesystem * fsPtr); #ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED #define Tcl_FSGetTranslatedStringPath_TCL_DECLARED /* 476 */ -EXTERN const char* Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, - Tcl_Obj* pathPtr); +EXTERN const char * Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED #define Tcl_FSGetFileSystemForPath_TCL_DECLARED /* 477 */ -EXTERN CONST86 Tcl_Filesystem* Tcl_FSGetFileSystemForPath (Tcl_Obj* pathPtr); +EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath ( + Tcl_Obj * pathPtr); #endif #ifndef Tcl_FSGetPathType_TCL_DECLARED #define Tcl_FSGetPathType_TCL_DECLARED @@ -2920,27 +2922,27 @@ EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, #ifndef Tcl_GetTime_TCL_DECLARED #define Tcl_GetTime_TCL_DECLARED /* 482 */ -EXTERN void Tcl_GetTime (Tcl_Time* timeBuf); +EXTERN void Tcl_GetTime (Tcl_Time * timeBuf); #endif #ifndef Tcl_CreateObjTrace_TCL_DECLARED #define Tcl_CreateObjTrace_TCL_DECLARED /* 483 */ -EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp* interp, int level, - int flags, Tcl_CmdObjTraceProc* objProc, +EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp * interp, int level, + int flags, Tcl_CmdObjTraceProc * objProc, ClientData clientData, - Tcl_CmdObjTraceDeleteProc* delProc); + Tcl_CmdObjTraceDeleteProc * delProc); #endif #ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED #define Tcl_GetCommandInfoFromToken_TCL_DECLARED /* 484 */ EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, - Tcl_CmdInfo* infoPtr); + Tcl_CmdInfo * infoPtr); #endif #ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED #define Tcl_SetCommandInfoFromToken_TCL_DECLARED /* 485 */ EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, - const Tcl_CmdInfo* infoPtr); + const Tcl_CmdInfo * infoPtr); #endif #ifndef Tcl_DbNewWideIntObj_TCL_DECLARED #define Tcl_DbNewWideIntObj_TCL_DECLARED @@ -3061,10 +3063,10 @@ EXTERN Tcl_Obj * Tcl_DbNewDictObj (const char * file, int line); #ifndef Tcl_RegisterConfig_TCL_DECLARED #define Tcl_RegisterConfig_TCL_DECLARED /* 505 */ -EXTERN void Tcl_RegisterConfig (Tcl_Interp* interp, - const char* pkgName, - const Tcl_Config* configuration, - const char* valEncoding); +EXTERN void Tcl_RegisterConfig (Tcl_Interp * interp, + const char * pkgName, + const Tcl_Config * configuration, + const char * valEncoding); #endif #ifndef Tcl_CreateNamespace_TCL_DECLARED #define Tcl_CreateNamespace_TCL_DECLARED @@ -3341,16 +3343,16 @@ EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, #ifndef Tcl_SetTimeProc_TCL_DECLARED #define Tcl_SetTimeProc_TCL_DECLARED /* 552 */ -EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc* getProc, - Tcl_ScaleTimeProc* scaleProc, +EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc * getProc, + Tcl_ScaleTimeProc * scaleProc, ClientData clientData); #endif #ifndef Tcl_QueryTimeProc_TCL_DECLARED #define Tcl_QueryTimeProc_TCL_DECLARED /* 553 */ -EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc** getProc, - Tcl_ScaleTimeProc** scaleProc, - ClientData* clientData); +EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc ** getProc, + Tcl_ScaleTimeProc ** scaleProc, + ClientData * clientData); #endif #ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED #define Tcl_ChannelThreadActionProc_TCL_DECLARED @@ -3361,30 +3363,30 @@ EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( #ifndef Tcl_NewBignumObj_TCL_DECLARED #define Tcl_NewBignumObj_TCL_DECLARED /* 555 */ -EXTERN Tcl_Obj* Tcl_NewBignumObj (mp_int* value); +EXTERN Tcl_Obj * Tcl_NewBignumObj (mp_int * value); #endif #ifndef Tcl_DbNewBignumObj_TCL_DECLARED #define Tcl_DbNewBignumObj_TCL_DECLARED /* 556 */ -EXTERN Tcl_Obj* Tcl_DbNewBignumObj (mp_int* value, const char* file, - int line); +EXTERN Tcl_Obj * Tcl_DbNewBignumObj (mp_int * value, + const char * file, int line); #endif #ifndef Tcl_SetBignumObj_TCL_DECLARED #define Tcl_SetBignumObj_TCL_DECLARED /* 557 */ -EXTERN void Tcl_SetBignumObj (Tcl_Obj* obj, mp_int* value); +EXTERN void Tcl_SetBignumObj (Tcl_Obj * obj, mp_int * value); #endif #ifndef Tcl_GetBignumFromObj_TCL_DECLARED #define Tcl_GetBignumFromObj_TCL_DECLARED /* 558 */ -EXTERN int Tcl_GetBignumFromObj (Tcl_Interp* interp, - Tcl_Obj* obj, mp_int* value); +EXTERN int Tcl_GetBignumFromObj (Tcl_Interp * interp, + Tcl_Obj * obj, mp_int * value); #endif #ifndef Tcl_TakeBignumFromObj_TCL_DECLARED #define Tcl_TakeBignumFromObj_TCL_DECLARED /* 559 */ -EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp* interp, - Tcl_Obj* obj, mp_int* value); +EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp * interp, + Tcl_Obj * obj, mp_int * value); #endif #ifndef Tcl_TruncateChannel_TCL_DECLARED #define Tcl_TruncateChannel_TCL_DECLARED @@ -3401,29 +3403,30 @@ EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( #ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED #define Tcl_SetChannelErrorInterp_TCL_DECLARED /* 562 */ -EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp* interp, - Tcl_Obj* msg); +EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp * interp, + Tcl_Obj * msg); #endif #ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED #define Tcl_GetChannelErrorInterp_TCL_DECLARED /* 563 */ -EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp* interp, - Tcl_Obj** msg); +EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp * interp, + Tcl_Obj ** msg); #endif #ifndef Tcl_SetChannelError_TCL_DECLARED #define Tcl_SetChannelError_TCL_DECLARED /* 564 */ -EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj* msg); +EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj * msg); #endif #ifndef Tcl_GetChannelError_TCL_DECLARED #define Tcl_GetChannelError_TCL_DECLARED /* 565 */ -EXTERN void Tcl_GetChannelError (Tcl_Channel chan, Tcl_Obj** msg); +EXTERN void Tcl_GetChannelError (Tcl_Channel chan, + Tcl_Obj ** msg); #endif #ifndef Tcl_InitBignumFromDouble_TCL_DECLARED #define Tcl_InitBignumFromDouble_TCL_DECLARED /* 566 */ -EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp* interp, +EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp * interp, double initval, mp_int * toInit); #endif #ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED @@ -3441,24 +3444,24 @@ EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, #ifndef Tcl_GetEncodingFromObj_TCL_DECLARED #define Tcl_GetEncodingFromObj_TCL_DECLARED /* 569 */ -EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp* interp, - Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); +EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); #endif #ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED #define Tcl_GetEncodingSearchPath_TCL_DECLARED /* 570 */ -EXTERN Tcl_Obj* Tcl_GetEncodingSearchPath (void); +EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath (void); #endif #ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED #define Tcl_SetEncodingSearchPath_TCL_DECLARED /* 571 */ -EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj* searchPath); +EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj * searchPath); #endif #ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED #define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED /* 572 */ EXTERN const char * Tcl_GetEncodingNameFromEnvironment ( - Tcl_DString* bufPtr); + Tcl_DString * bufPtr); #endif #ifndef Tcl_PkgRequireProc_TCL_DECLARED #define Tcl_PkgRequireProc_TCL_DECLARED @@ -3485,14 +3488,14 @@ EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, #define Tcl_Format_TCL_DECLARED /* 576 */ EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, const char * format, - int objc, Tcl_Obj * const objv[]); + int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_AppendFormatToObj_TCL_DECLARED #define Tcl_AppendFormatToObj_TCL_DECLARED /* 577 */ EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, - int objc, Tcl_Obj * const objv[]); + int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_ObjPrintf_TCL_DECLARED #define Tcl_ObjPrintf_TCL_DECLARED @@ -3667,6 +3670,12 @@ EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); /* 606 */ EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int value); #endif +#ifndef Tcl_TransferResult_TCL_DECLARED +#define Tcl_TransferResult_TCL_DECLARED +/* 607 */ +EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, + int result, Tcl_Interp * targetInterp); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -3678,7 +3687,7 @@ typedef struct TclStubs { int magic; const struct TclStubHooks *hooks; - int (*tcl_PkgProvideEx) (Tcl_Interp* interp, const char* name, const char* version, ClientData clientData); /* 0 */ + int (*tcl_PkgProvideEx) (Tcl_Interp * interp, const char * name, const char * version, ClientData clientData); /* 0 */ CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 1 */ void (*tcl_Panic) (const char * format, ...); /* 2 */ char * (*tcl_Alloc) (unsigned int size); /* 3 */ @@ -3710,7 +3719,7 @@ typedef struct TclStubs { int (*tcl_WaitForEvent) (const Tcl_Time * timePtr); /* 13 */ int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ - void (*tcl_AppendToObj) (Tcl_Obj* objPtr, const char* bytes, int length); /* 16 */ + void (*tcl_AppendToObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 16 */ Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *const objv[]); /* 17 */ int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, const Tcl_ObjType * typePtr); /* 18 */ void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 19 */ @@ -3744,7 +3753,7 @@ typedef struct TclStubs { int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ - Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char* bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char * bytes, int length); /* 50 */ Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */ @@ -3759,7 +3768,7 @@ typedef struct TclStubs { void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ - void (*tcl_SetStringObj) (Tcl_Obj* objPtr, const char* bytes, int length); /* 65 */ + void (*tcl_SetStringObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 65 */ void (*tcl_AddErrorInfo) (Tcl_Interp * interp, const char * message); /* 66 */ void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, const char * message, int length); /* 67 */ void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ @@ -3777,10 +3786,10 @@ typedef struct TclStubs { void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ int (*tcl_CommandComplete) (const char * cmd); /* 82 */ - char * (*tcl_Concat) (int argc, CONST84 char * const * argv); /* 83 */ + char * (*tcl_Concat) (int argc, CONST84 char *const * argv); /* 83 */ int (*tcl_ConvertElement) (const char * src, char * dst, int flags); /* 84 */ int (*tcl_ConvertCountedElement) (const char * src, int length, char * dst, int flags); /* 85 */ - int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char * const * argv); /* 86 */ + int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char *const * argv); /* 86 */ int (*tcl_CreateAliasObj) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType * typePtr, const char * chanName, ClientData instanceData, int mask); /* 88 */ void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ @@ -3896,13 +3905,13 @@ typedef struct TclStubs { int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ - char * (*tcl_JoinPath) (int argc, CONST84 char * const * argv, Tcl_DString * resultPtr); /* 186 */ + char * (*tcl_JoinPath) (int argc, CONST84 char *const * argv, Tcl_DString * resultPtr); /* 186 */ int (*tcl_LinkVar) (Tcl_Interp * interp, const char * varName, char * addr, int type); /* 187 */ void *reserved188; Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ - char * (*tcl_Merge) (int argc, CONST84 char * const * argv); /* 192 */ + char * (*tcl_Merge) (int argc, CONST84 char *const * argv); /* 192 */ Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ @@ -4045,7 +4054,7 @@ typedef struct TclStubs { int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, const char * name); /* 316 */ Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ - void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event* evPtr, Tcl_QueuePosition position); /* 319 */ + void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event * evPtr, Tcl_QueuePosition position); /* 319 */ Tcl_UniChar (*tcl_UniCharAtIndex) (const char * src, int index); /* 320 */ Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ @@ -4138,13 +4147,13 @@ typedef struct TclStubs { Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType * chanTypePtr); /* 409 */ Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType * chanTypePtr); /* 410 */ Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType * chanTypePtr); /* 411 */ - int (*tcl_JoinThread) (Tcl_ThreadId threadId, int* result); /* 412 */ + int (*tcl_JoinThread) (Tcl_ThreadId threadId, int * result); /* 412 */ int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ - int (*tcl_IsChannelRegistered) (Tcl_Interp* interp, Tcl_Channel channel); /* 414 */ + int (*tcl_IsChannelRegistered) (Tcl_Interp * interp, Tcl_Channel channel); /* 414 */ void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ - int (*tcl_IsChannelExisting) (const char* channelName); /* 418 */ + int (*tcl_IsChannelExisting) (const char * channelName); /* 418 */ int (*tcl_UniCharNcasecmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 419 */ int (*tcl_UniCharCaseMatch) (const Tcl_UniChar * uniStr, const Tcl_UniChar * uniPattern, int nocase); /* 420 */ Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, const char * key); /* 421 */ @@ -4164,7 +4173,7 @@ typedef struct TclStubs { int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, const char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, const char * pattern); /* 436 */ Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ - int (*tcl_DetachChannel) (Tcl_Interp* interp, Tcl_Channel channel); /* 438 */ + int (*tcl_DetachChannel) (Tcl_Interp * interp, Tcl_Channel channel); /* 438 */ int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ @@ -4183,35 +4192,35 @@ typedef struct TclStubs { int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * modeString, int permissions); /* 456 */ - Tcl_Obj* (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ + Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ - Tcl_Obj* (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ - Tcl_Obj* (*tcl_FSSplitPath) (Tcl_Obj* pathPtr, int * lenPtr); /* 461 */ - int (*tcl_FSEqualPaths) (Tcl_Obj* firstPtr, Tcl_Obj* secondPtr); /* 462 */ - Tcl_Obj* (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 463 */ - Tcl_Obj* (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj* pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ - Tcl_Obj* (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 466 */ + Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ + Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj * pathPtr, int * lenPtr); /* 461 */ + int (*tcl_FSEqualPaths) (Tcl_Obj * firstPtr, Tcl_Obj * secondPtr); /* 462 */ + Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 463 */ + Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj * pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ + Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 466 */ int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj* (*tcl_FSNewNativePath) (const Tcl_Filesystem* fromFilesystem, ClientData clientData); /* 468 */ - const char* (*tcl_FSGetNativePath) (Tcl_Obj* pathPtr); /* 469 */ - Tcl_Obj* (*tcl_FSFileSystemInfo) (Tcl_Obj* pathPtr); /* 470 */ - Tcl_Obj* (*tcl_FSPathSeparator) (Tcl_Obj* pathPtr); /* 471 */ - Tcl_Obj* (*tcl_FSListVolumes) (void); /* 472 */ + Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem * fromFilesystem, ClientData clientData); /* 468 */ + const char * (*tcl_FSGetNativePath) (Tcl_Obj * pathPtr); /* 469 */ + Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj * pathPtr); /* 470 */ + Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj * pathPtr); /* 471 */ + Tcl_Obj * (*tcl_FSListVolumes) (void); /* 472 */ int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem * fsPtr); /* 473 */ int (*tcl_FSUnregister) (const Tcl_Filesystem * fsPtr); /* 474 */ ClientData (*tcl_FSData) (const Tcl_Filesystem * fsPtr); /* 475 */ - const char* (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj* pathPtr); /* 476 */ - CONST86 Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) (Tcl_Obj* pathPtr); /* 477 */ + const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 476 */ + CONST86 Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj * pathPtr); /* 477 */ Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ void (*tcl_FSMountsChanged) (const Tcl_Filesystem * fsPtr); /* 480 */ int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ - void (*tcl_GetTime) (Tcl_Time* timeBuf); /* 482 */ - Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp* interp, int level, int flags, Tcl_CmdObjTraceProc* objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc* delProc); /* 483 */ - int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo* infoPtr); /* 484 */ - int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo* infoPtr); /* 485 */ + void (*tcl_GetTime) (Tcl_Time * timeBuf); /* 482 */ + Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp * interp, int level, int flags, Tcl_CmdObjTraceProc * objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc * delProc); /* 483 */ + int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo * infoPtr); /* 484 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo * infoPtr); /* 485 */ Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char * file, int line); /* 486 */ int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ @@ -4231,7 +4240,7 @@ typedef struct TclStubs { int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv); /* 502 */ Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ Tcl_Obj * (*tcl_DbNewDictObj) (const char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp* interp, const char* pkgName, const Tcl_Config* configuration, const char* valEncoding); /* 505 */ + void (*tcl_RegisterConfig) (Tcl_Interp * interp, const char * pkgName, const Tcl_Config * configuration, const char * valEncoding); /* 505 */ Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ @@ -4278,32 +4287,32 @@ typedef struct TclStubs { int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ - void (*tcl_SetTimeProc) (Tcl_GetTimeProc* getProc, Tcl_ScaleTimeProc* scaleProc, ClientData clientData); /* 552 */ - void (*tcl_QueryTimeProc) (Tcl_GetTimeProc** getProc, Tcl_ScaleTimeProc** scaleProc, ClientData* clientData); /* 553 */ + void (*tcl_SetTimeProc) (Tcl_GetTimeProc * getProc, Tcl_ScaleTimeProc * scaleProc, ClientData clientData); /* 552 */ + void (*tcl_QueryTimeProc) (Tcl_GetTimeProc ** getProc, Tcl_ScaleTimeProc ** scaleProc, ClientData * clientData); /* 553 */ Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType * chanTypePtr); /* 554 */ - Tcl_Obj* (*tcl_NewBignumObj) (mp_int* value); /* 555 */ - Tcl_Obj* (*tcl_DbNewBignumObj) (mp_int* value, const char* file, int line); /* 556 */ - void (*tcl_SetBignumObj) (Tcl_Obj* obj, mp_int* value); /* 557 */ - int (*tcl_GetBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 558 */ - int (*tcl_TakeBignumFromObj) (Tcl_Interp* interp, Tcl_Obj* obj, mp_int* value); /* 559 */ + Tcl_Obj * (*tcl_NewBignumObj) (mp_int * value); /* 555 */ + Tcl_Obj * (*tcl_DbNewBignumObj) (mp_int * value, const char * file, int line); /* 556 */ + void (*tcl_SetBignumObj) (Tcl_Obj * obj, mp_int * value); /* 557 */ + int (*tcl_GetBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 558 */ + int (*tcl_TakeBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 559 */ int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType * chanTypePtr); /* 561 */ - void (*tcl_SetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj* msg); /* 562 */ - void (*tcl_GetChannelErrorInterp) (Tcl_Interp* interp, Tcl_Obj** msg); /* 563 */ - void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj* msg); /* 564 */ - void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj** msg); /* 565 */ - int (*tcl_InitBignumFromDouble) (Tcl_Interp* interp, double initval, mp_int * toInit); /* 566 */ + void (*tcl_SetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj * msg); /* 562 */ + void (*tcl_GetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj ** msg); /* 563 */ + void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj * msg); /* 564 */ + void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj ** msg); /* 565 */ + int (*tcl_InitBignumFromDouble) (Tcl_Interp * interp, double initval, mp_int * toInit); /* 566 */ Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ - int (*tcl_GetEncodingFromObj) (Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr); /* 569 */ - Tcl_Obj* (*tcl_GetEncodingSearchPath) (void); /* 570 */ - int (*tcl_SetEncodingSearchPath) (Tcl_Obj* searchPath); /* 571 */ - const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString* bufPtr); /* 572 */ + int (*tcl_GetEncodingFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); /* 569 */ + Tcl_Obj * (*tcl_GetEncodingSearchPath) (void); /* 570 */ + int (*tcl_SetEncodingSearchPath) (Tcl_Obj * searchPath); /* 571 */ + const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString * bufPtr); /* 572 */ int (*tcl_PkgRequireProc) (Tcl_Interp * interp, const char * name, int objc, Tcl_Obj *const objv[], ClientData * clientDataPtr); /* 573 */ void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, const char * bytes, int length, int limit, const char * ellipsis); /* 575 */ - Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj * const objv[]); /* 576 */ - int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj * const objv[]); /* 577 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj *const objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj *const objv[]); /* 577 */ Tcl_Obj * (*tcl_ObjPrintf) (const char * format, ...); /* 578 */ void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, const char * format, ...); /* 579 */ int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ @@ -4333,6 +4342,7 @@ typedef struct TclStubs { int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ void (*tcl_SetErrorLine) (Tcl_Interp * interp, int value); /* 606 */ + void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6833,6 +6843,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_SetErrorLine \ (tclStubsPtr->tcl_SetErrorLine) /* 606 */ #endif +#ifndef Tcl_TransferResult +#define Tcl_TransferResult \ + (tclStubsPtr->tcl_TransferResult) /* 607 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 15cfa2d..bb41803 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.168 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.169 2008/12/05 14:28:10 dkf Exp $ */ #include "tclInt.h" @@ -1132,6 +1132,7 @@ static const TclStubs tclStubs = { Tcl_ParseArgsObjv, /* 604 */ Tcl_GetErrorLine, /* 605 */ Tcl_SetErrorLine, /* 606 */ + Tcl_TransferResult, /* 607 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 3ead0718e84c105802d523230c4d24df972eaa44 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Dec 2008 15:21:37 +0000 Subject: minor improvements derived from [Patch 1723738] --- doc/SetResult.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/SetResult.3 b/doc/SetResult.3 index 2a17dac..e29c6b1 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.21 2008/12/05 14:27:36 dkf Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.22 2008/12/05 15:21:37 dkf Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" @@ -160,7 +160,8 @@ instead of taking a variable number of arguments it takes an argument list. .VS 8.6 \fBTcl_TransferResult\fR moves a result from one interpreter to another, optionally (dependent on the \fIresult\fR parameter) including the error -information as well. The interpreters must be in the same thread. +information dictionary as well. The interpreters must be in the same thread. +The source interpreter will have its result reset by this operation. .VE 8.6 .SH "DEPRECATED INTERFACES" .SS "OLD STRING PROCEDURES" -- cgit v0.12 From 4efb1a0f47c957eb324a55b4e51e7a4207002aa1 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 5 Dec 2008 16:01:01 +0000 Subject: fix Tcl_AppendElement documentation: signature in doc did not match with real signature in header file --- doc/SetResult.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/SetResult.3 b/doc/SetResult.3 index e29c6b1..d19bd998 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.22 2008/12/05 15:21:37 dkf Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.23 2008/12/05 16:01:01 nijtmans Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" @@ -48,7 +48,7 @@ Object value to become result for \fIinterp\fR. .AP char *result in String value to become result for \fIinterp\fR or to be appended to the existing result. -.AP char *element in +.AP "const char" *element in String value to append as a list element to the existing result of \fIinterp\fR. .AP Tcl_FreeProc *freeProc in -- cgit v0.12 From 0ab0d532e146a573c487c7e5e4c66282136b7b57 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Dec 2008 21:38:47 +0000 Subject: Implement TIP#335 --- ChangeLog | 5 +++++ doc/CrtInterp.3 | 25 +++++++++++++++++++++++-- generic/tcl.decls | 11 ++++++++--- generic/tclBasic.c | 26 +++++++++++++++++++++++++- 4 files changed, 61 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10f7d0e..1ed290d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-12-05 Donal K. Fellows + TIP #335 IMPLEMENTATION + + * generic/tclBasic.c (Tcl_InterpActive): Added function for working + * doc/CrtInterp.3: out if an interp is in use. + TIP #307 IMPLEMENTATION * generic/tclResult.c (Tcl_TransferResult): Renamed function from diff --git a/doc/CrtInterp.3 b/doc/CrtInterp.3 index 14679a6..d751f75 100644 --- a/doc/CrtInterp.3 +++ b/doc/CrtInterp.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtInterp.3,v 1.8 2008/07/08 12:34:58 dkf Exp $ +'\" RCS: @(#) $Id: CrtInterp.3,v 1.9 2008/12/05 21:38:47 dkf Exp $ '\" .so man.macros .TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures" @@ -23,10 +23,15 @@ Tcl_Interp * .sp int \fBTcl_InterpDeleted\fR(\fIinterp\fR) +.sp +.VS 8.6 +int +\fBTcl_InterpActive\fR(\fIinterp\fR) +.VE 8.6 .SH ARGUMENTS .AS Tcl_Interp *interp .AP Tcl_Interp *interp in -Token for interpreter to be destroyed. +Token for interpreter to be destroyed or queried. .BE .SH DESCRIPTION .PP @@ -65,6 +70,15 @@ between when only the memory the callback is responsible for is being deleted and when the whole interpreter is being deleted. In the former case the callback may recreate the data being deleted, but this would lead to an infinite loop if the interpreter were being deleted. +.PP +.VS 8.6 +\fBTcl_InterpActive\fR is useful for determining whether there is any +execution of scripts ongoing in an interpreter, which is a useful piece of +information when Tcl is embedded in a garbage-collected environment and it +becomes necessary to determine whether the interpreter is a candidate for +deletion. The function returns a true value if the interpreter has at least +one active execution running inside it, and a false value otherwise. +.VE 8.6 .SH "INTERPRETERS AND MEMORY MANAGEMENT" .PP \fBTcl_DeleteInterp\fR can be called at any time on an interpreter that may @@ -124,6 +138,13 @@ reused. All uses of interpreters in Tcl and Tk have already been protected. Extension writers should ensure that their code also properly protects any additional interpreters used, as described above. +.PP +.VS 8.6 +Note that the protection mechanisms do not work well with conventional garbage +collection systems. When in such a managed environment, \fBTcl_InterpActive\fR +should be used to determine when an interpreter is a candidate for deletion +due to inactivity. +.VE 8.6 .SH "SEE ALSO" Tcl_Preserve(3), Tcl_Release(3) .SH KEYWORDS diff --git a/generic/tcl.decls b/generic/tcl.decls index abd9ed7..bdfe02c 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.156 2008/12/05 14:27:36 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.157 2008/12/05 21:38:47 dkf Exp $ library tcl @@ -2198,7 +2198,7 @@ declare 604 generic { int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv) } -# TIP 335 +# TIP 336 (manipulate the error line) declare 605 generic { int Tcl_GetErrorLine(Tcl_Interp *interp) } @@ -2206,12 +2206,17 @@ declare 606 generic { void Tcl_SetErrorLine(Tcl_Interp *interp, int value) } -# TIP#307 (expose this function!) +# TIP#307 (move results between interpreters) declare 607 generic { void Tcl_TransferResult(Tcl_Interp *sourceInterp, int result, Tcl_Interp *targetInterp) } +# TIP#335 (detect if interpreter in use) +declare 608 generic { + int Tcl_InterpActive(Tcl_Interp *interp) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are only diff --git a/generic/tclBasic.c b/generic/tclBasic.c index dbcaecd..cf618c7 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.374 2008/10/28 23:29:54 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.375 2008/12/05 21:38:47 dkf Exp $ */ #include "tclInt.h" @@ -3955,6 +3955,30 @@ Tcl_CancelEval( /* *---------------------------------------------------------------------- * + * Tcl_InterpActive -- + * + * Returns non-zero if the specified interpreter is in use, i.e. if there + * is an evaluation currently active in the interpreter. + * + * Results: + * See above. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_InterpActive( + Tcl_Interp *interp) +{ + return ((Interp *) interp)->numLevels > 0; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_EvalObjv -- * * This function evaluates a Tcl command that has already been parsed -- cgit v0.12 From 63ab1f0c5d57ba9b4583d3c5029d900df034a628 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Dec 2008 21:40:38 +0000 Subject: regen --- generic/tclDecls.h | 12 +++++++++++- generic/tclStubInit.c | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index bec1668..7e1c6fd 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.158 2008/12/05 14:28:10 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.159 2008/12/05 21:40:38 dkf Exp $ */ #ifndef _TCLDECLS @@ -3676,6 +3676,11 @@ EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int value); EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); #endif +#ifndef Tcl_InterpActive_TCL_DECLARED +#define Tcl_InterpActive_TCL_DECLARED +/* 608 */ +EXTERN int Tcl_InterpActive (Tcl_Interp * interp); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4343,6 +4348,7 @@ typedef struct TclStubs { int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ void (*tcl_SetErrorLine) (Tcl_Interp * interp, int value); /* 606 */ void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ + int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6847,6 +6853,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_TransferResult \ (tclStubsPtr->tcl_TransferResult) /* 607 */ #endif +#ifndef Tcl_InterpActive +#define Tcl_InterpActive \ + (tclStubsPtr->tcl_InterpActive) /* 608 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index bb41803..6fdbc0d 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.169 2008/12/05 14:28:10 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.170 2008/12/05 21:40:38 dkf Exp $ */ #include "tclInt.h" @@ -1133,6 +1133,7 @@ static const TclStubs tclStubs = { Tcl_GetErrorLine, /* 605 */ Tcl_SetErrorLine, /* 606 */ Tcl_TransferResult, /* 607 */ + Tcl_InterpActive, /* 608 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 7fc0aa09838f76717549f48315fd2dad8c0a1176 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 6 Dec 2008 20:12:26 +0000 Subject: Partial fix for [Bug 2388866] --- ChangeLog | 7 +++++++ generic/tclCmdAH.c | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1ed290d..35d07d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-06 Donal K. Fellows + + * generic/tclCmdAH.c (FileTempfileCmd): Force temporary files to be + created in the native filesystem. Attempting to provide a template + that puts it elsewhere will result in the directory part of the + template being ignored. Partial address of [Bug 2388866] concerns. + 2008-12-05 Donal K. Fellows TIP #335 IMPLEMENTATION diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index ead9384..bc02f16 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.111 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.112 2008/12/06 20:12:27 dkf Exp $ */ #include "tclInt.h" @@ -1704,6 +1704,18 @@ FileTempfileCmd( || (tclPlatform == TCL_PLATFORM_WINDOWS && strchr(string, '\\') != NULL)) { tempDirObj = TclPathPart(interp, objv[3], TCL_PATH_DIRNAME); + + /* + * Only allow creation of temporary files in the native filesystem + * since they are frequently used for integration with external + * tools or system libraries. [Bug 2388866] + */ + + if (Tcl_FSGetFileSystemForPath(tempDirObj) + != &tclNativeFilesystem) { + TclDecrRefCount(tempDirObj); + tempDirObj = NULL; + } } /* -- cgit v0.12 From 4c8967407f0115958f2a1001c759bcbd65655b99 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 6 Dec 2008 20:42:13 +0000 Subject: oops --- generic/tclCmdAH.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index bc02f16..8396463 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,11 +10,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.112 2008/12/06 20:12:27 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.113 2008/12/06 20:42:13 dkf Exp $ */ #include "tclInt.h" #include +#include "tclFileSystem.h" /* * The state structure used by [foreach]. Note that the actual structure has -- cgit v0.12 From 0b24fb67d14cb4d0ddbf252eb14f5d4c6a9485e7 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 7 Dec 2008 16:28:15 +0000 Subject: Fix warnings with assertions enabled --- generic/regc_color.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/regc_color.c b/generic/regc_color.c index 7a98dcb..b7a571c 100644 --- a/generic/regc_color.c +++ b/generic/regc_color.c @@ -320,7 +320,7 @@ freecolor( cm->free = cm->cd[cm->free].sub; } if (cm->free > 0) { - assert(cm->free < cm->max); + assert((size_t)cm->free < cm->max); pco = cm->free; nco = cm->cd[pco].sub; while (nco > 0) { @@ -332,7 +332,7 @@ freecolor( nco = cm->cd[nco].sub; cm->cd[pco].sub = nco; } else { - assert(nco < cm->max); + assert((size_t)nco < cm->max); pco = nco; nco = cm->cd[pco].sub; } -- cgit v0.12 From 60065d3056a7581a4479d0a0aed5fe461a674098 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 7 Dec 2008 16:28:44 +0000 Subject: Tcl_MacOSXOpenVersionedBundleResources: Fix leak, simplify logic --- macosx/tclMacOSXBundle.c | 64 +++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 6b0b6f7..14be2f0 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -48,7 +48,7 @@ * permission to use and distribute the software in accordance with the * terms specified in this license. * - * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.12 2008/04/27 22:21:33 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.13 2008/12/07 16:28:44 das Exp $ */ #include "tclPort.h" @@ -121,7 +121,7 @@ Tcl_MacOSXOpenVersionedBundleResources( char *libraryPath) { #ifdef HAVE_COREFOUNDATION - CFBundleRef bundleRef; + CFBundleRef bundleRef, versionedBundleRef = NULL; CFStringRef bundleNameRef; CFURLRef libURL; @@ -138,41 +138,46 @@ Tcl_MacOSXOpenVersionedBundleResources( * Create bundle from bundleVersion subdirectory of 'Versions'. */ - CFBundleRef versionedBundleRef = NULL; - CFURLRef versionedBundleURL = NULL; - CFStringRef bundleVersionRef = CFStringCreateWithCString(NULL, - bundleVersion, kCFStringEncodingUTF8); CFURLRef bundleURL = CFBundleCopyBundleURL(bundleRef); if (bundleURL) { - CFStringRef bundleTailRef = CFURLCopyLastPathComponent(bundleURL); + CFStringRef bundleVersionRef = CFStringCreateWithCString(NULL, + bundleVersion, kCFStringEncodingUTF8); - if (bundleTailRef) { - if (CFStringCompare(bundleTailRef, bundleVersionRef, 0) == - kCFCompareEqualTo) { - versionedBundleRef = bundleRef; - } - CFRelease(bundleTailRef); - } - } + if (bundleVersionRef) { + CFStringRef bundleTailRef = CFURLCopyLastPathComponent( + bundleURL); - if (bundleURL && !versionedBundleRef) { - CFURLRef versURL = CFURLCreateCopyAppendingPathComponent(NULL, - bundleURL, CFSTR("Versions"), TRUE); - - if (versURL) { - versionedBundleURL = CFURLCreateCopyAppendingPathComponent( - NULL, versURL, bundleVersionRef, TRUE); - CFRelease(versURL); + if (bundleTailRef) { + if (CFStringCompare(bundleTailRef, bundleVersionRef, 0) == + kCFCompareEqualTo) { + versionedBundleRef = (CFBundleRef) CFRetain(bundleRef); + } + CFRelease(bundleTailRef); + } + if (!versionedBundleRef) { + CFURLRef versURL = CFURLCreateCopyAppendingPathComponent( + NULL, bundleURL, CFSTR("Versions"), TRUE); + + if (versURL) { + CFURLRef versionedBundleURL = + CFURLCreateCopyAppendingPathComponent( + NULL, versURL, bundleVersionRef, TRUE); + if (versionedBundleURL) { + versionedBundleRef = CFBundleCreate(NULL, + versionedBundleURL); + CFRelease(versionedBundleURL); + } + CFRelease(versURL); + } + } + CFRelease(bundleVersionRef); } CFRelease(bundleURL); } - CFRelease(bundleVersionRef); - if (versionedBundleURL) { - versionedBundleRef = CFBundleCreate(NULL, versionedBundleURL); - CFRelease(versionedBundleURL); + if (versionedBundleRef) { + bundleRef = versionedBundleRef; } - bundleRef = versionedBundleRef; } if (bundleRef) { @@ -219,6 +224,9 @@ Tcl_MacOSXOpenVersionedBundleResources( (unsigned char*) libraryPath, maxPathLen); CFRelease(libURL); } + if (versionedBundleRef) { + CFRelease(versionedBundleRef); + } } if (libraryPath[0]) { -- cgit v0.12 From bf5bd60be593f40dbbce0627ef593839cde67a5b Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 9 Dec 2008 14:09:14 +0000 Subject: A bit more readability refactoring. --- ChangeLog | 6 + generic/tclIO.c | 572 +++++++++++++++++++++++++++++--------------------------- 2 files changed, 300 insertions(+), 278 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35d07d8..fd9fdef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-09 Donal K. Fellows + + * generic/tclIO.c (ChanClose,ChanRead,...): Factored out some of the + code to connect to channel drivers that was common in multiple + locations so as to make code more readable. + 2008-12-06 Donal K. Fellows * generic/tclCmdAH.c (FileTempfileCmd): Force temporary files to be diff --git a/generic/tclIO.c b/generic/tclIO.c index e6e11d0..1a2bbfb 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.151 2008/12/02 18:23:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.152 2008/12/09 14:09:14 dkf Exp $ */ #include "tclInt.h" @@ -162,21 +162,21 @@ static void CutChannel(Tcl_Channel chan); * -------------------------------------------------------------------------- */ -#define BytesLeft(bufPtr) ((bufPtr)->nextAdded - (bufPtr)->nextRemoved) +#define BytesLeft(bufPtr) ((bufPtr)->nextAdded - (bufPtr)->nextRemoved) -#define SpaceLeft(bufPtr) ((bufPtr)->bufLength - (bufPtr)->nextAdded) +#define SpaceLeft(bufPtr) ((bufPtr)->bufLength - (bufPtr)->nextAdded) -#define IsBufferReady(bufPtr) ((bufPtr)->nextAdded > (bufPtr)->nextRemoved) +#define IsBufferReady(bufPtr) ((bufPtr)->nextAdded > (bufPtr)->nextRemoved) -#define IsBufferEmpty(bufPtr) ((bufPtr)->nextAdded == (bufPtr)->nextRemoved) +#define IsBufferEmpty(bufPtr) ((bufPtr)->nextAdded == (bufPtr)->nextRemoved) -#define IsBufferFull(bufPtr) ((bufPtr)->nextAdded >= (bufPtr)->bufLength) +#define IsBufferFull(bufPtr) ((bufPtr)->nextAdded >= (bufPtr)->bufLength) -#define IsBufferOverflowing(bufPtr) ((bufPtr)->nextAdded > (bufPtr)->bufLength) +#define IsBufferOverflowing(bufPtr) ((bufPtr)->nextAdded>(bufPtr)->bufLength) -#define InsertPoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextAdded) +#define InsertPoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextAdded) -#define RemovePoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextRemoved) +#define RemovePoint(bufPtr) ((bufPtr)->buf + (bufPtr)->nextRemoved) /* * For working with channel state flag bits. @@ -184,6 +184,7 @@ static void CutChannel(Tcl_Channel chan); #define SetFlag(statePtr, flag) ((statePtr)->flags |= (flag)) #define ResetFlag(statePtr, flag) ((statePtr)->flags &= ~(flag)) +#define GotFlag(statePtr, flag) ((statePtr)->flags & (flag)) /* * Macro for testing whether a string (in optionName, length len) matches a @@ -204,7 +205,8 @@ static void CutChannel(Tcl_Channel chan); */ static void DupChannelIntRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); -static int SetChannelFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); +static int SetChannelFromAny(Tcl_Interp *interp, + Tcl_Obj *objPtr); static void UpdateStringOfChannel(Tcl_Obj *objPtr); static void FreeChannelIntRep(Tcl_Obj *objPtr); @@ -230,6 +232,100 @@ static const Tcl_ObjType tclChannelType = { /* *--------------------------------------------------------------------------- * + * ChanClose, ChanRead, ChanSeek, ChanThreadAction, ChanWatch, ChanWrite -- + * + * Simplify the access to selected channel driver "methods" that are used + * in multiple places in a stereotypical fashion. These are just thin + * wrappers around the driver functions. + * + *--------------------------------------------------------------------------- + */ + +static inline int +ChanClose( + Channel *chanPtr, + Tcl_Interp *interp) +{ + if (chanPtr->typePtr->closeProc != TCL_CLOSE2PROC) { + return chanPtr->typePtr->closeProc(chanPtr->instanceData, interp); + } else { + return chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, 0); + } +} + +static inline int +ChanRead( + Channel *chanPtr, + char *dst, + int dstSize, + int *errnoPtr) +{ + return chanPtr->typePtr->inputProc(chanPtr->instanceData, dst, dstSize, + errnoPtr); +} + +static inline Tcl_WideInt +ChanSeek( + Channel *chanPtr, + Tcl_WideInt offset, + int mode, + int *errnoPtr) +{ + /* + * Note that we prefer the wideSeekProc if that field is available in the + * type and non-NULL. + */ + + if (HaveVersion(chanPtr->typePtr, TCL_CHANNEL_VERSION_3) && + chanPtr->typePtr->wideSeekProc != NULL) { + return chanPtr->typePtr->wideSeekProc(chanPtr->instanceData, + offset, mode, errnoPtr); + } + + if (offsetTcl_LongAsWide(LONG_MAX)) { + *errnoPtr = EOVERFLOW; + return Tcl_LongAsWide(-1); + } + + return Tcl_LongAsWide(chanPtr->typePtr->seekProc(chanPtr->instanceData, + Tcl_WideAsLong(offset), mode, errnoPtr)); +} + +static inline void +ChanThreadAction( + Channel *chanPtr, + int action) +{ + Tcl_DriverThreadActionProc *threadActionProc = + Tcl_ChannelThreadActionProc(chanPtr->typePtr); + + if (threadActionProc != NULL) { + threadActionProc(chanPtr->instanceData, action); + } +} + +static inline void +ChanWatch( + Channel *chanPtr, + int mask) +{ + chanPtr->typePtr->watchProc(chanPtr->instanceData, mask); +} + +static inline int +ChanWrite( + Channel *chanPtr, + const char *src, + int srcLen, + int *errnoPtr) +{ + return chanPtr->typePtr->outputProc(chanPtr->instanceData, src, srcLen, + errnoPtr); +} + +/* + *--------------------------------------------------------------------------- + * * TclInitIOSubsystem -- * * Initialize all resources used by this subsystem on a per-process @@ -299,7 +395,8 @@ TclFinalizeIOSubsystem(void) statePtr != NULL; statePtr = statePtr->nextCSPtr) { chanPtr = statePtr->topChanPtr; - if (!(statePtr->flags & (CHANNEL_INCLOSE|CHANNEL_CLOSED|CHANNEL_DEAD))) { + if (!GotFlag(statePtr, CHANNEL_INCLOSE | CHANNEL_CLOSED | + CHANNEL_DEAD)) { active = 1; break; } @@ -349,12 +446,7 @@ TclFinalizeIOSubsystem(void) * device for this channel. */ - if (chanPtr->typePtr->closeProc != TCL_CLOSE2PROC) { - chanPtr->typePtr->closeProc(chanPtr->instanceData, NULL); - } else { - chanPtr->typePtr->close2Proc(chanPtr->instanceData, NULL, - 0); - } + (void) ChanClose(chanPtr, NULL); /* * Finally, we clean up the fields in the channel data @@ -396,6 +488,7 @@ Tcl_SetStdChannel( int type) /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + switch (type) { case TCL_STDIN: tsdPtr->stdinInitialized = 1; @@ -687,7 +780,7 @@ DeleteChannelTable( } Tcl_DeleteChannelHandler((Tcl_Channel) chanPtr, - TclChannelEventScriptInvoker, (ClientData) sPtr); + TclChannelEventScriptInvoker, sPtr); TclDecrRefCount(sPtr->scriptPtr); ckfree((char *) sPtr); @@ -707,7 +800,7 @@ DeleteChannelTable( SetFlag(statePtr, CHANNEL_TAINTED); statePtr->refCount--; if (statePtr->refCount <= 0) { - if (!(statePtr->flags & BG_FLUSH_SCHEDULED)) { + if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { (void) Tcl_Close(interp, (Tcl_Channel) chanPtr); } } @@ -746,21 +839,19 @@ CheckForStdChannelsBeingClosed( ChannelState *statePtr = ((Channel *) chan)->state; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - if ((chan == tsdPtr->stdinChannel) && (tsdPtr->stdinInitialized)) { + if ((chan == tsdPtr->stdinChannel) && tsdPtr->stdinInitialized) { if (statePtr->refCount < 2) { statePtr->refCount = 0; tsdPtr->stdinChannel = NULL; return; } - } else if ((chan == tsdPtr->stdoutChannel) - && (tsdPtr->stdoutInitialized)) { + } else if ((chan == tsdPtr->stdoutChannel) && tsdPtr->stdoutInitialized) { if (statePtr->refCount < 2) { statePtr->refCount = 0; tsdPtr->stdoutChannel = NULL; return; } - } else if ((chan == tsdPtr->stderrChannel) - && (tsdPtr->stderrInitialized)) { + } else if ((chan == tsdPtr->stderrChannel) && tsdPtr->stderrInitialized) { if (statePtr->refCount < 2) { statePtr->refCount = 0; tsdPtr->stderrChannel = NULL; @@ -894,7 +985,7 @@ Tcl_UnregisterChannel( statePtr = ((Channel *) chan)->state->bottomChanPtr->state; - if (statePtr->flags & CHANNEL_INCLOSE) { + if (GotFlag(statePtr, CHANNEL_INCLOSE)) { if (interp != NULL) { Tcl_AppendResult(interp, "Illegal recursive call to close " "through close-handler of channel", NULL); @@ -933,12 +1024,12 @@ Tcl_UnregisterChannel( SetFlag(statePtr, BUFFER_READY); } Tcl_Preserve(statePtr); - if (!(statePtr->flags & BG_FLUSH_SCHEDULED)) { + if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { /* * We don't want to re-enter Tcl_Close(). */ - if (!(statePtr->flags & CHANNEL_CLOSED)) { + if (!GotFlag(statePtr, CHANNEL_CLOSED)) { if (Tcl_Close(interp, chan) != TCL_OK) { SetFlag(statePtr, CHANNEL_CLOSED); Tcl_Release(statePtr); @@ -1147,7 +1238,7 @@ Tcl_GetChannel( chanPtr = Tcl_GetHashValue(hPtr); chanPtr = chanPtr->state->bottomChanPtr; if (modePtr != NULL) { - *modePtr = (chanPtr->state->flags & (TCL_READABLE|TCL_WRITABLE)); + *modePtr = chanPtr->state->flags & (TCL_READABLE|TCL_WRITABLE); } return (Tcl_Channel) chanPtr; @@ -1192,10 +1283,10 @@ TclGetChannelFromObj( } statePtr = GET_CHANNELSTATE(objPtr); - *channelPtr = (Tcl_Channel) (statePtr->bottomChanPtr); + *channelPtr = (Tcl_Channel) statePtr->bottomChanPtr; if (modePtr != NULL) { - *modePtr = (statePtr->flags & (TCL_READABLE|TCL_WRITABLE)); + *modePtr = statePtr->flags & (TCL_READABLE|TCL_WRITABLE); } return TCL_OK; @@ -1241,7 +1332,7 @@ Tcl_CreateChannel( * as well. */ - assert(sizeof(Tcl_ChannelTypeVersion) == sizeof(Tcl_DriverBlockModeProc*)); + assert(sizeof(Tcl_ChannelTypeVersion)==sizeof(Tcl_DriverBlockModeProc *)); /* * JH: We could subsequently memset these to 0 to avoid the numerous @@ -1322,9 +1413,8 @@ Tcl_CreateChannel( statePtr->csPtrW = NULL; statePtr->outputStage = NULL; - if ((statePtr->encoding != NULL) && (statePtr->flags & TCL_WRITABLE)) { - statePtr->outputStage = (char *) - ckalloc((unsigned) (statePtr->bufSize + 2)); + if ((statePtr->encoding != NULL) && GotFlag(statePtr, TCL_WRITABLE)) { + statePtr->outputStage = ckalloc((unsigned) statePtr->bufSize + 2); } /* @@ -1415,7 +1505,8 @@ Tcl_CreateChannel( Tcl_Channel Tcl_StackChannel( Tcl_Interp *interp, /* The interpreter we are working in */ - const Tcl_ChannelType *typePtr, /* The channel type record for the new + const Tcl_ChannelType *typePtr, + /* The channel type record for the new * channel. */ ClientData instanceData, /* Instance specific data for the new * channel. */ @@ -1426,7 +1517,6 @@ Tcl_StackChannel( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); Channel *chanPtr, *prevChanPtr; ChannelState *statePtr; - Tcl_DriverThreadActionProc *threadActionProc; /* * Find the given channel (prevChan) in the list of all channels. If we do @@ -1480,13 +1570,10 @@ Tcl_StackChannel( */ if ((mask & TCL_WRITABLE) != 0) { - CopyState *csPtrR; - CopyState *csPtrW; + CopyState *csPtrR = statePtr->csPtrR; + CopyState *csPtrW = statePtr->csPtrW; - csPtrR = statePtr->csPtrR; statePtr->csPtrR = NULL; - - csPtrW = statePtr->csPtrW; statePtr->csPtrW = NULL; if (Tcl_Flush((Tcl_Channel) prevChanPtr) != TCL_OK) { @@ -1571,10 +1658,7 @@ Tcl_StackChannel( * time, mangling it. */ - threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); - if (threadActionProc != NULL) { - threadActionProc(chanPtr->instanceData, TCL_CHANNEL_THREAD_INSERT); - } + ChanThreadAction(chanPtr, TCL_CHANNEL_THREAD_INSERT); return (Tcl_Channel) chanPtr; } @@ -1605,7 +1689,6 @@ Tcl_UnstackChannel( Channel *chanPtr = (Channel *) chan; ChannelState *statePtr = chanPtr->state; int result = 0; - Tcl_DriverThreadActionProc *threadActionProc; /* * This operation should occur at the top of a channel stack. @@ -1631,14 +1714,11 @@ Tcl_UnstackChannel( * CheckForChannelErrors inside. */ - if (statePtr->flags & TCL_WRITABLE) { - CopyState *csPtrR; - CopyState *csPtrW; + if (GotFlag(statePtr, TCL_WRITABLE)) { + CopyState *csPtrR = statePtr->csPtrR; + CopyState *csPtrW = statePtr->csPtrW; - csPtrR = statePtr->csPtrR; statePtr->csPtrR = NULL; - - csPtrW = statePtr->csPtrW; statePtr->csPtrW = NULL; if (Tcl_Flush((Tcl_Channel) chanPtr) != TCL_OK) { @@ -1675,16 +1755,14 @@ Tcl_UnstackChannel( * 'DiscardInputQueued' on that. */ - if ((((statePtr->flags & TCL_READABLE) != 0)) && + if (GotFlag(statePtr, TCL_READABLE) && ((statePtr->inQueueHead != NULL) || (chanPtr->inQueueHead != NULL))) { - if ((statePtr->inQueueHead != NULL) && (chanPtr->inQueueHead != NULL)) { statePtr->inQueueTail->nextPtr = chanPtr->inQueueHead; statePtr->inQueueTail = chanPtr->inQueueTail; statePtr->inQueueHead = statePtr->inQueueTail; - } else if (chanPtr->inQueueHead != NULL) { statePtr->inQueueHead = chanPtr->inQueueHead; statePtr->inQueueTail = chanPtr->inQueueTail; @@ -1708,10 +1786,7 @@ Tcl_UnstackChannel( * the state which are still active. */ - threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); - if (threadActionProc != NULL) { - threadActionProc(chanPtr->instanceData,TCL_CHANNEL_THREAD_REMOVE); - } + ChanThreadAction(chanPtr, TCL_CHANNEL_THREAD_REMOVE); statePtr->topChanPtr = downChanPtr; downChanPtr->upChanPtr = NULL; @@ -1725,14 +1800,7 @@ Tcl_UnstackChannel( * Close and free the channel driver state. */ - if (chanPtr->typePtr->closeProc != TCL_CLOSE2PROC) { - result = chanPtr->typePtr->closeProc(chanPtr->instanceData, - interp); - } else { - result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, - interp, 0); - } - + result = ChanClose(chanPtr, interp); chanPtr->typePtr = NULL; /* @@ -1967,9 +2035,9 @@ const char * Tcl_GetChannelName( Tcl_Channel chan) /* The channel for which to return the name. */ { - ChannelState *statePtr; /* State of actual channel. */ + ChannelState *statePtr = ((Channel *) chan)->state; + /* State of actual channel. */ - statePtr = ((Channel *) chan)->state; return statePtr->channelName; } @@ -2099,7 +2167,7 @@ RecycleBuffer( * Only save buffers for the input queue if the channel is readable. */ - if (statePtr->flags & TCL_READABLE) { + if (GotFlag(statePtr, TCL_READABLE)) { if (statePtr->inQueueHead == NULL) { statePtr->inQueueHead = bufPtr; statePtr->inQueueTail = bufPtr; @@ -2115,7 +2183,7 @@ RecycleBuffer( * Only save buffers for the output queue if the channel is writable. */ - if (statePtr->flags & TCL_WRITABLE) { + if (GotFlag(statePtr, TCL_WRITABLE)) { if (statePtr->curOutPtr == NULL) { statePtr->curOutPtr = bufPtr; goto keepBuffer; @@ -2188,15 +2256,16 @@ CheckForDeadChannel( Tcl_Interp *interp, /* For error reporting (can be NULL) */ ChannelState *statePtr) /* The channel state to check. */ { - if (statePtr->flags & CHANNEL_DEAD) { - Tcl_SetErrno(EINVAL); - if (interp) { - Tcl_AppendResult(interp, - "unable to access channel: invalid channel", NULL); - } - return 1; + if (!GotFlag(statePtr, CHANNEL_DEAD)) { + return 0; } - return 0; + + Tcl_SetErrno(EINVAL); + if (interp) { + Tcl_AppendResult(interp, "unable to access channel: invalid channel", + NULL); + } + return 1; } /* @@ -2264,7 +2333,7 @@ FlushChannel( if (((statePtr->curOutPtr != NULL) && IsBufferFull(statePtr->curOutPtr)) - || ((statePtr->flags & BUFFER_READY) && + || (GotFlag(statePtr, BUFFER_READY) && (statePtr->outQueueHead == NULL))) { ResetFlag(statePtr, BUFFER_READY); statePtr->curOutPtr->nextPtr = NULL; @@ -2283,8 +2352,7 @@ FlushChannel( * is active, we just return without producing any output. */ - if ((!calledFromAsyncFlush) && - (statePtr->flags & BG_FLUSH_SCHEDULED)) { + if (!calledFromAsyncFlush && GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { return 0; } @@ -2293,7 +2361,7 @@ FlushChannel( */ if (bufPtr == NULL) { - break; /* Out of the "while (1)". */ + break; /* Out of the "while (1)". */ } /* @@ -2301,8 +2369,7 @@ FlushChannel( */ toWrite = BytesLeft(bufPtr); - written = chanPtr->typePtr->outputProc(chanPtr->instanceData, - RemovePoint(bufPtr), toWrite, &errorCode); + written = ChanWrite(chanPtr, RemovePoint(bufPtr),toWrite, &errorCode); /* * If the write failed completely attempt to start the asynchronous @@ -2333,7 +2400,7 @@ FlushChannel( * it's a tty channel (dup'ed underneath) */ - if (!(statePtr->flags & BG_FLUSH_SCHEDULED)) { + if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { SetFlag(statePtr, BG_FLUSH_SCHEDULED); UpdateInterest(chanPtr); } @@ -2383,7 +2450,8 @@ FlushChannel( Tcl_SetErrno(errorCode); if (interp != NULL && !TclChanCaughtErrorBypass(interp, (Tcl_Channel) chanPtr)) { - Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_PosixError(interp), -1)); + Tcl_SetObjResult(interp, + Tcl_NewStringObj(Tcl_PosixError(interp), -1)); } /* @@ -2425,13 +2493,12 @@ FlushChannel( * data has been flushed at the system level. */ - if (statePtr->flags & BG_FLUSH_SCHEDULED) { + if (GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { if (wroteSome) { return errorCode; } else if (statePtr->outQueueHead == NULL) { ResetFlag(statePtr, BG_FLUSH_SCHEDULED); - chanPtr->typePtr->watchProc(chanPtr->instanceData, - statePtr->interestMask); + ChanWatch(chanPtr, statePtr->interestMask); } } @@ -2441,7 +2508,7 @@ FlushChannel( * current output buffer. */ - if ((statePtr->flags & CHANNEL_CLOSED) && (statePtr->refCount <= 0) && + if (GotFlag(statePtr, CHANNEL_CLOSED) && (statePtr->refCount <= 0) && (statePtr->outQueueHead == NULL) && ((statePtr->curOutPtr == NULL) || IsBufferEmpty(statePtr->curOutPtr))) { @@ -2517,11 +2584,11 @@ CloseChannel( * device. */ - if ((statePtr->outEofChar != 0) && (statePtr->flags & TCL_WRITABLE)) { + if ((statePtr->outEofChar != 0) && GotFlag(statePtr, TCL_WRITABLE)) { int dummy; char c = (char) statePtr->outEofChar; - chanPtr->typePtr->outputProc(chanPtr->instanceData, &c, 1, &dummy); + (void) ChanWrite(chanPtr, &c, 1, &dummy); } /* @@ -2549,12 +2616,7 @@ CloseChannel( * This may leave a TIP #219 error message in the interp. */ - if (chanPtr->typePtr->closeProc != TCL_CLOSE2PROC) { - result = chanPtr->typePtr->closeProc(chanPtr->instanceData, interp); - } else { - result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, - 0); - } + result = ChanClose(chanPtr, interp); /* * Some resources can be cleared only if the bottom channel in a stack is @@ -2678,7 +2740,6 @@ CutChannel( * the list on close. */ ChannelState *statePtr = ((Channel *) chan)->state; /* State of the channel stack. */ - Tcl_DriverThreadActionProc *threadActionProc; /* * Remove this channel from of the list of all channels (in the current @@ -2705,11 +2766,7 @@ CutChannel( * TIP #218, Channel Thread Actions */ - threadActionProc = Tcl_ChannelThreadActionProc(Tcl_GetChannelType(chan)); - if (threadActionProc != NULL) { - threadActionProc(Tcl_GetChannelInstanceData(chan), - TCL_CHANNEL_THREAD_REMOVE); - } + ChanThreadAction((Channel *) chan, TCL_CHANNEL_THREAD_REMOVE); } void @@ -2724,7 +2781,6 @@ Tcl_CutChannel( * the list on close. */ ChannelState *statePtr = chanPtr->state; /* State of the channel stack. */ - Tcl_DriverThreadActionProc *threadActionProc; /* * Remove this channel from of the list of all channels (in the current @@ -2752,12 +2808,8 @@ Tcl_CutChannel( * For all transformations and the base channel. */ - while (chanPtr) { - threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); - if (threadActionProc != NULL) { - threadActionProc(chanPtr->instanceData,TCL_CHANNEL_THREAD_REMOVE); - } - chanPtr= chanPtr->upChanPtr; + for (; chanPtr != NULL ; chanPtr = chanPtr->upChanPtr) { + ChanThreadAction(chanPtr, TCL_CHANNEL_THREAD_REMOVE); } } @@ -2794,7 +2846,6 @@ SpliceChannel( { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); ChannelState *statePtr = ((Channel *) chan)->state; - Tcl_DriverThreadActionProc *threadActionProc; if (statePtr->nextCSPtr != NULL) { Tcl_Panic("SpliceChannel: trying to add channel used in different list"); @@ -2815,11 +2866,7 @@ SpliceChannel( * TIP #218, Channel Thread Actions */ - threadActionProc = Tcl_ChannelThreadActionProc(Tcl_GetChannelType(chan)); - if (threadActionProc != NULL) { - threadActionProc(Tcl_GetChannelInstanceData(chan), - TCL_CHANNEL_THREAD_INSERT); - } + ChanThreadAction((Channel *) chan, TCL_CHANNEL_THREAD_INSERT); } void @@ -2830,7 +2877,6 @@ Tcl_SpliceChannel( Channel *chanPtr = ((Channel *) chan)->state->bottomChanPtr; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); ChannelState *statePtr = chanPtr->state; - Tcl_DriverThreadActionProc *threadActionProc; if (statePtr->nextCSPtr != NULL) { Tcl_Panic("SpliceChannel: trying to add channel used in different list"); @@ -2852,12 +2898,8 @@ Tcl_SpliceChannel( * For all transformations and the base channel. */ - while (chanPtr) { - threadActionProc = Tcl_ChannelThreadActionProc(chanPtr->typePtr); - if (threadActionProc != NULL) { - threadActionProc(chanPtr->instanceData,TCL_CHANNEL_THREAD_INSERT); - } - chanPtr= chanPtr->upChanPtr; + for (; chanPtr != NULL ; chanPtr = chanPtr->upChanPtr) { + ChanThreadAction(chanPtr, TCL_CHANNEL_THREAD_INSERT); } } @@ -2923,7 +2965,7 @@ Tcl_Close( Tcl_Panic("called Tcl_Close on channel with refCount > 0"); } - if (statePtr->flags & CHANNEL_INCLOSE) { + if (GotFlag(statePtr, CHANNEL_INCLOSE)) { if (interp) { Tcl_AppendResult(interp, "Illegal recursive call to close " "through close-handler of channel", NULL); @@ -3219,9 +3261,7 @@ Tcl_WriteRaw( * The code was stolen from 'FlushChannel'. */ - written = chanPtr->typePtr->outputProc(chanPtr->instanceData, src, - srcLen, &errorCode); - + written = ChanWrite(chanPtr, src, srcLen, &errorCode); if (written < 0) { Tcl_SetErrno(errorCode); } @@ -3322,12 +3362,13 @@ DoWriteChars( * be extended to more efficient translation of the src string. */ - int result; + int result; if ((len == 1) && (UCHAR(*src) < 0xC0)) { result = WriteBytes(chanPtr, src, len); } else { Tcl_Obj *objPtr = Tcl_NewStringObj(src, len); + src = (char *) Tcl_GetByteArrayFromObj(objPtr, &len); result = WriteBytes(chanPtr, src, len); TclDecrRefCount(objPtr); @@ -3427,8 +3468,8 @@ WriteBytes( total = 0; sawLF = 0; savedLF = 0; - translate = (statePtr->flags & CHANNEL_LINEBUFFERED) - || (statePtr->outputTranslation != TCL_TRANSLATE_LF); + translate = GotFlag(statePtr, CHANNEL_LINEBUFFERED) + || (statePtr->outputTranslation != TCL_TRANSLATE_LF); /* * Loop over all bytes in src, storing them in output buffer with proper @@ -3537,8 +3578,8 @@ WriteChars( endEncoding = ((statePtr->outputEncodingFlags & TCL_ENCODING_END) != 0); - translate = (statePtr->flags & CHANNEL_LINEBUFFERED) - || (statePtr->outputTranslation != TCL_TRANSLATE_LF); + translate = GotFlag(statePtr, CHANNEL_LINEBUFFERED) + || (statePtr->outputTranslation != TCL_TRANSLATE_LF); /* * Loop over all UTF-8 characters in src, storing them in staging buffer @@ -3561,16 +3602,17 @@ WriteChars( if (savedLF) { /* * A '\n' was left over from last call to TranslateOutputEOL() - * and we need to store it in the staging buffer. If the channel - * is line-based, we will need to flush the output buffer (after - * translating the staging buffer). + * and we need to store it in the staging buffer. If the + * channel is line-based, we will need to flush the output + * buffer (after translating the staging buffer). */ *stage++ = '\n'; stageLen--; sawLF++; } - if (TranslateOutputEOL(statePtr, stage, src, &stageLen, &toWrite)) { + if (TranslateOutputEOL(statePtr, stage, src, &stageLen, + &toWrite)) { sawLF++; } @@ -3863,18 +3905,18 @@ CheckFlush( * 3. if it contains any output and this channel is unbuffered. */ - if ((statePtr->flags & BUFFER_READY) == 0) { + if (!GotFlag(statePtr, BUFFER_READY)) { if (IsBufferFull(bufPtr)) { SetFlag(statePtr, BUFFER_READY); - } else if (statePtr->flags & CHANNEL_LINEBUFFERED) { + } else if (GotFlag(statePtr, CHANNEL_LINEBUFFERED)) { if (newlineFlag != 0) { SetFlag(statePtr, BUFFER_READY); } - } else if (statePtr->flags & CHANNEL_UNBUFFERED) { + } else if (GotFlag(statePtr, CHANNEL_UNBUFFERED)) { SetFlag(statePtr, BUFFER_READY); } } - if (statePtr->flags & BUFFER_READY) { + if (GotFlag(statePtr, BUFFER_READY)) { if (FlushChannel(NULL, chanPtr, 0) != 0) { return -1; } @@ -4125,7 +4167,7 @@ Tcl_GetsObj( case TCL_TRANSLATE_AUTO: eol = dst; skip = 1; - if (statePtr->flags & INPUT_SAW_CR) { + if (GotFlag(statePtr, INPUT_SAW_CR)) { ResetFlag(statePtr, INPUT_SAW_CR); if ((eol < dstEnd) && (*eol == '\n')) { /* @@ -4193,7 +4235,7 @@ Tcl_GetsObj( SetFlag(statePtr, CHANNEL_EOF | CHANNEL_STICKY_EOF); statePtr->inputEncodingFlags |= TCL_ENCODING_END; } - if (statePtr->flags & CHANNEL_EOF) { + if (GotFlag(statePtr, CHANNEL_EOF)) { skip = 0; eol = dstEnd; if (eol == objPtr->bytes + oldLength) { @@ -4350,7 +4392,11 @@ TclGetsObjBinary( skip = 0; eof = NULL; inEofChar = statePtr->inEofChar; - /* Only handle TCL_TRANSLATE_LF and TCL_TRANSLATE_CR */ + + /* + * Only handle TCL_TRANSLATE_LF and TCL_TRANSLATE_CR. + */ + eolChar = (statePtr->inputTranslation == TCL_TRANSLATE_LF) ? '\n' : '\r'; while (1) { @@ -4373,8 +4419,8 @@ TclGetsObjBinary( * device. Side effect is to allocate another channel buffer. */ - if (statePtr->flags & CHANNEL_BLOCKED) { - if (statePtr->flags & CHANNEL_NONBLOCKING) { + if (GotFlag(statePtr, CHANNEL_BLOCKED)) { + if (GotFlag(statePtr, CHANNEL_NONBLOCKING)) { goto restore; } ResetFlag(statePtr, CHANNEL_BLOCKED); @@ -4425,7 +4471,7 @@ TclGetsObjBinary( SetFlag(statePtr, CHANNEL_EOF | CHANNEL_STICKY_EOF); statePtr->inputEncodingFlags |= TCL_ENCODING_END; } - if (statePtr->flags & CHANNEL_EOF) { + if (GotFlag(statePtr, CHANNEL_EOF)) { skip = 0; eol = dstEnd; if ((dst == dstEnd) && (byteLen == oldLength)) { @@ -4624,8 +4670,8 @@ FilterInputBytes( */ read: - if (statePtr->flags & CHANNEL_BLOCKED) { - if (statePtr->flags & CHANNEL_NONBLOCKING) { + if (GotFlag(statePtr, CHANNEL_BLOCKED)) { + if (GotFlag(statePtr, CHANNEL_NONBLOCKING)) { gsPtr->charsWrote = 0; gsPtr->rawRead = 0; return -1; @@ -4701,7 +4747,7 @@ FilterInputBytes( * returning those UTF-8 characters because a EOL might be * present in them. */ - } else if (statePtr->flags & CHANNEL_EOF) { + } else if (GotFlag(statePtr, CHANNEL_EOF)) { /* * There was a partial character followed by EOF on the * device. Fall through, returning that nothing was found. @@ -4790,7 +4836,7 @@ PeekAhead( goto cleanup; } - if ((statePtr->flags & CHANNEL_NONBLOCKING) == 0) { + if (!GotFlag(statePtr, CHANNEL_NONBLOCKING)) { blockModeProc = Tcl_ChannelBlockModeProc(chanPtr->typePtr); if (blockModeProc == NULL) { /* @@ -4986,11 +5032,11 @@ Tcl_ReadRaw( copiedNow = CopyBuffer(chanPtr, bufPtr + copied, bytesToRead - copied); if (copiedNow == 0) { - if (statePtr->flags & CHANNEL_EOF) { + if (GotFlag(statePtr, CHANNEL_EOF)) { goto done; } - if (statePtr->flags & CHANNEL_BLOCKED) { - if (statePtr->flags & CHANNEL_NONBLOCKING) { + if (GotFlag(statePtr, CHANNEL_BLOCKED)) { + if (GotFlag(statePtr, CHANNEL_NONBLOCKING)) { goto done; } ResetFlag(statePtr, CHANNEL_BLOCKED); @@ -5004,9 +5050,9 @@ Tcl_ReadRaw( * and only if we are sure to have data. */ - if ((statePtr->flags & CHANNEL_NONBLOCKING) && + if (GotFlag(statePtr, CHANNEL_NONBLOCKING) && (Tcl_ChannelBlockModeProc(chanPtr->typePtr) == NULL) && - !(statePtr->flags & CHANNEL_HAS_MORE_DATA)) { + !GotFlag(statePtr, CHANNEL_HAS_MORE_DATA)) { /* * We bypass the driver; it would block as no data is * available. @@ -5014,9 +5060,9 @@ Tcl_ReadRaw( nread = -1; result = EWOULDBLOCK; - } else { + } else #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ - + { /* * Now go to the driver to get as much as is possible to fill * the remaining request. Do all the error handling by @@ -5026,12 +5072,9 @@ Tcl_ReadRaw( * The case of 'bytesToRead == 0' at this point cannot happen. */ - nread = chanPtr->typePtr->inputProc(chanPtr->instanceData, - bufPtr + copied, bytesToRead - copied, &result); - -#ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING + nread = ChanRead(chanPtr, bufPtr + copied, + bytesToRead - copied, &result); } -#endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ if (nread > 0) { /* @@ -5055,7 +5098,6 @@ Tcl_ReadRaw( ResetFlag(statePtr, CHANNEL_HAS_MORE_DATA); } #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ - } else if (nread == 0) { SetFlag(statePtr, CHANNEL_EOF); statePtr->inputEncodingFlags |= TCL_ENCODING_END; @@ -5231,9 +5273,8 @@ DoReadChars( bufPtr = statePtr->inQueueHead; if (IsBufferEmpty(bufPtr)) { - ChannelBuffer *nextPtr; + ChannelBuffer *nextPtr = bufPtr->nextPtr; - nextPtr = bufPtr->nextPtr; RecycleBuffer(statePtr, bufPtr, 0); statePtr->inQueueHead = nextPtr; if (nextPtr == NULL) { @@ -5243,11 +5284,11 @@ DoReadChars( } if (copiedNow < 0) { - if (statePtr->flags & CHANNEL_EOF) { + if (GotFlag(statePtr, CHANNEL_EOF)) { break; } - if (statePtr->flags & CHANNEL_BLOCKED) { - if (statePtr->flags & CHANNEL_NONBLOCKING) { + if (GotFlag(statePtr, CHANNEL_BLOCKED)) { + if (GotFlag(statePtr, CHANNEL_NONBLOCKING)) { break; } ResetFlag(statePtr, CHANNEL_BLOCKED); @@ -5359,7 +5400,7 @@ ReadBytes( } dst += offset; - if (statePtr->flags & INPUT_NEED_NL) { + if (GotFlag(statePtr, INPUT_NEED_NL)) { ResetFlag(statePtr, INPUT_NEED_NL); if ((srcLen == 0) || (*src != '\n')) { *dst = '\r'; @@ -5449,7 +5490,7 @@ ReadChars( srcLen = BytesLeft(bufPtr); toRead = charsToRead; - if ((unsigned)toRead > (unsigned)srcLen) { + if ((unsigned) toRead > (unsigned) srcLen) { toRead = srcLen; } @@ -5534,7 +5575,7 @@ ReadChars( } oldState = statePtr->inputEncodingState; - if (statePtr->flags & INPUT_NEED_NL) { + if (GotFlag(statePtr, INPUT_NEED_NL)) { /* * We want a '\n' because the last character we saw was '\r'. */ @@ -5650,16 +5691,15 @@ ReadChars( * '\n' in dst. */ - numChars -= (dstRead - dstWrote); + numChars -= dstRead - dstWrote; if ((unsigned) numChars > (unsigned) toRead) { /* * Got too many chars. */ - const char *eof; + const char *eof = Tcl_UtfAtIndex(dst, toRead); - eof = Tcl_UtfAtIndex(dst, toRead); statePtr->inputEncodingState = oldState; Tcl_ExternalToUtf(NULL, statePtr->encoding, src, srcLen, statePtr->inputEncodingFlags, &statePtr->inputEncodingState, @@ -5727,9 +5767,8 @@ TranslateInputEOL( * buffer. */ - const char *src, *srcMax; + const char *src, *srcMax = srcStart + *srcLenPtr; - srcMax = srcStart + *srcLenPtr; for (src = srcStart; src < srcMax; src++) { if (*src == inEofChar) { eof = src; @@ -5800,7 +5839,7 @@ TranslateInputEOL( srcEnd = srcStart + dstLen; srcMax = srcStart + *srcLenPtr; - if ((statePtr->flags & INPUT_SAW_CR) && (src < srcMax)) { + if (GotFlag(statePtr, INPUT_SAW_CR) && (src < srcMax)) { if (*src == '\n') { src++; } @@ -5905,7 +5944,7 @@ Tcl_Ungets( * bit. We want to discover these conditions anew in each operation. */ - if (statePtr->flags & CHANNEL_STICKY_EOF) { + if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) { goto done; } ResetFlag(statePtr, CHANNEL_BLOCKED | CHANNEL_EOF); @@ -6162,7 +6201,7 @@ GetInput( * platforms it is impossible to read from a device after EOF. */ - if (statePtr->flags & CHANNEL_EOF) { + if (GotFlag(statePtr, CHANNEL_EOF)) { return 0; } @@ -6174,24 +6213,20 @@ GetInput( * sure to have data. */ - if ((statePtr->flags & CHANNEL_NONBLOCKING) && + if (GotFlag(statePtr, CHANNEL_NONBLOCKING) && (Tcl_ChannelBlockModeProc(chanPtr->typePtr) == NULL) && - !(statePtr->flags & CHANNEL_HAS_MORE_DATA)) { + !GotFlag(statePtr, CHANNEL_HAS_MORE_DATA)) { /* * Bypass the driver, it would block, as no data is available */ nread = -1; result = EWOULDBLOCK; - } else { + } else #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ - - nread = chanPtr->typePtr->inputProc(chanPtr->instanceData, - InsertPoint(bufPtr), toRead, &result); - -#ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING + { + nread = ChanRead(chanPtr, InsertPoint(bufPtr), toRead, &result); } -#endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ if (nread > 0) { bufPtr->nextAdded += nread; @@ -6217,7 +6252,6 @@ GetInput( ResetFlag(statePtr, CHANNEL_HAS_MORE_DATA); } #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ - } else if (nread == 0) { SetFlag(statePtr, CHANNEL_EOF); statePtr->inputEncodingFlags |= TCL_ENCODING_END; @@ -6333,8 +6367,8 @@ Tcl_Seek( * point. Also clear CR related flags. */ - statePtr->flags &= - ~(CHANNEL_EOF | CHANNEL_STICKY_EOF | CHANNEL_BLOCKED | INPUT_SAW_CR); + ResetFlag(statePtr, CHANNEL_EOF | CHANNEL_STICKY_EOF | CHANNEL_BLOCKED | + INPUT_SAW_CR); /* * If the channel is in asynchronous output mode, switch it back to @@ -6344,14 +6378,14 @@ Tcl_Seek( */ wasAsync = 0; - if (statePtr->flags & CHANNEL_NONBLOCKING) { + if (GotFlag(statePtr, CHANNEL_NONBLOCKING)) { wasAsync = 1; result = StackSetBlockMode(chanPtr, TCL_MODE_BLOCKING); if (result != 0) { return Tcl_LongAsWide(-1); } ResetFlag(statePtr, CHANNEL_NONBLOCKING); - if (statePtr->flags & BG_FLUSH_SCHEDULED) { + if (GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { ResetFlag(statePtr, BG_FLUSH_SCHEDULED); } } @@ -6378,23 +6412,10 @@ Tcl_Seek( } else { /* * Now seek to the new position in the channel as requested by the - * caller. Note that we prefer the wideSeekProc if that is available - * and non-NULL... + * caller. */ - if (HaveVersion(chanPtr->typePtr, TCL_CHANNEL_VERSION_3) && - chanPtr->typePtr->wideSeekProc != NULL) { - curPos = chanPtr->typePtr->wideSeekProc(chanPtr->instanceData, - offset, mode, &result); - } else if (offset < Tcl_LongAsWide(LONG_MIN) || - offset > Tcl_LongAsWide(LONG_MAX)) { - result = EOVERFLOW; - curPos = Tcl_LongAsWide(-1); - } else { - curPos = Tcl_LongAsWide(chanPtr->typePtr->seekProc( - chanPtr->instanceData, Tcl_WideAsLong(offset), mode, - &result)); - } + curPos = ChanSeek(chanPtr, offset, mode, &result); if (curPos == Tcl_LongAsWide(-1)) { Tcl_SetErrno(result); } @@ -6500,14 +6521,7 @@ Tcl_Tell( * wideSeekProc if that is available and non-NULL... */ - if (HaveVersion(chanPtr->typePtr, TCL_CHANNEL_VERSION_3) && - chanPtr->typePtr->wideSeekProc != NULL) { - curPos = chanPtr->typePtr->wideSeekProc(chanPtr->instanceData, - Tcl_LongAsWide(0), SEEK_CUR, &result); - } else { - curPos = Tcl_LongAsWide(chanPtr->typePtr->seekProc( - chanPtr->instanceData, 0, SEEK_CUR, &result)); - } + curPos = ChanSeek(chanPtr, Tcl_LongAsWide(0), SEEK_CUR, &result); if (curPos == Tcl_LongAsWide(-1)) { Tcl_SetErrno(result); return Tcl_LongAsWide(-1); @@ -6545,19 +6559,18 @@ Tcl_SeekOld( { Tcl_WideInt wOffset, wResult; - wOffset = Tcl_LongAsWide((long)offset); + wOffset = Tcl_LongAsWide((long) offset); wResult = Tcl_Seek(chan, wOffset, mode); - return (int)Tcl_WideAsLong(wResult); + return (int) Tcl_WideAsLong(wResult); } int Tcl_TellOld( Tcl_Channel chan) /* The channel to return pos for. */ { - Tcl_WideInt wResult; + Tcl_WideInt wResult = Tcl_Tell(chan); - wResult = Tcl_Tell(chan); - return (int)Tcl_WideAsLong(wResult); + return (int) Tcl_WideAsLong(wResult); } /* @@ -6598,7 +6611,7 @@ Tcl_TruncateChannel( return TCL_ERROR; } - if (!(chanPtr->state->flags & TCL_WRITABLE)) { + if (!GotFlag(chanPtr->state, TCL_WRITABLE)) { /* * We require that the file was opened of writing. Do that check now * so that we only flush if we think we're going to succeed. @@ -6613,7 +6626,7 @@ Tcl_TruncateChannel( * pre-read input data. */ - if (Tcl_Seek(chan, (Tcl_WideInt)0, SEEK_CUR) == Tcl_LongAsWide(-1)) { + if (Tcl_Seek(chan, (Tcl_WideInt) 0, SEEK_CUR) == Tcl_LongAsWide(-1)) { return TCL_ERROR; } @@ -6684,8 +6697,7 @@ CheckChannelErrors( * order to drain data from stacked channels. */ - if ((statePtr->flags & CHANNEL_CLOSED) && - ((flags & CHANNEL_RAW_MODE) == 0)) { + if (GotFlag(statePtr, CHANNEL_CLOSED) && !(flags & CHANNEL_RAW_MODE)) { Tcl_SetErrno(EACCES); return -1; } @@ -6720,7 +6732,7 @@ CheckChannelErrors( * discover these conditions anew in each operation. */ - if ((statePtr->flags & CHANNEL_STICKY_EOF) == 0) { + if (!GotFlag(statePtr, CHANNEL_STICKY_EOF)) { ResetFlag(statePtr, CHANNEL_EOF); } ResetFlag(statePtr, CHANNEL_BLOCKED | CHANNEL_NEED_MORE_DATA); @@ -6752,8 +6764,8 @@ Tcl_Eof( ChannelState *statePtr = ((Channel *) chan)->state; /* State of real channel structure. */ - return ((statePtr->flags & CHANNEL_STICKY_EOF) || - ((statePtr->flags & CHANNEL_EOF) && + return (GotFlag(statePtr, CHANNEL_STICKY_EOF) || + (GotFlag(statePtr, CHANNEL_EOF) && (Tcl_InputBuffered(chan) == 0))) ? 1 : 0; } @@ -6780,7 +6792,7 @@ Tcl_InputBlocked( ChannelState *statePtr = ((Channel *) chan)->state; /* State of real channel structure. */ - return (statePtr->flags & CHANNEL_BLOCKED) ? 1 : 0; + return GotFlag(statePtr, CHANNEL_BLOCKED) ? 1 : 0; } /* @@ -6933,9 +6945,9 @@ Tcl_SetChannelBufferSize( */ if (sz < 1) { - sz = 1; + sz = 1; } else if (sz > MAX_CHANNEL_BUFFER_SIZE) { - sz = MAX_CHANNEL_BUFFER_SIZE; + sz = MAX_CHANNEL_BUFFER_SIZE; } statePtr = ((Channel *) chan)->state; @@ -6945,9 +6957,8 @@ Tcl_SetChannelBufferSize( ckfree((char *) statePtr->outputStage); statePtr->outputStage = NULL; } - if ((statePtr->encoding != NULL) && (statePtr->flags & TCL_WRITABLE)) { - statePtr->outputStage = (char *) - ckalloc((unsigned) (statePtr->bufSize + 2)); + if ((statePtr->encoding != NULL) && GotFlag(statePtr, TCL_WRITABLE)) { + statePtr->outputStage = ckalloc((unsigned) statePtr->bufSize + 2); } } @@ -7103,9 +7114,9 @@ Tcl_GetChannelOption( */ if (statePtr->csPtrR) { - flags = statePtr->csPtrR->readFlags; + flags = statePtr->csPtrR->readFlags; } else if (statePtr->csPtrW) { - flags = statePtr->csPtrW->writeFlags; + flags = statePtr->csPtrW->writeFlags; } else { flags = statePtr->flags; } @@ -7357,8 +7368,7 @@ Tcl_SetChannelOption( } else if (HaveOpt(7, "-buffering")) { len = strlen(newValue); if ((newValue[0] == 'f') && (strncmp(newValue, "full", len) == 0)) { - statePtr->flags &= - ~(CHANNEL_UNBUFFERED|CHANNEL_LINEBUFFERED); + ResetFlag(statePtr, CHANNEL_UNBUFFERED | CHANNEL_LINEBUFFERED); } else if ((newValue[0] == 'l') && (strncmp(newValue, "line", len) == 0)) { ResetFlag(statePtr, CHANNEL_UNBUFFERED); @@ -7423,6 +7433,7 @@ Tcl_SetChannelOption( int outIndex = (argc - 1); int inValue = (int) argv[0][0]; int outValue = (int) argv[outIndex][0]; + if (inValue & 0x80 || outValue & 0x80) { if (interp) { Tcl_AppendResult(interp, "bad value for -eofchar: ", @@ -7431,10 +7442,10 @@ Tcl_SetChannelOption( ckfree((char *) argv); return TCL_ERROR; } - if (statePtr->flags & TCL_READABLE) { + if (GotFlag(statePtr, TCL_READABLE)) { statePtr->inEofChar = inValue; } - if (statePtr->flags & TCL_WRITABLE) { + if (GotFlag(statePtr, TCL_WRITABLE)) { statePtr->outEofChar = outValue; } } else { @@ -7456,9 +7467,7 @@ Tcl_SetChannelOption( * ahead'. Ditto for blocked. */ - statePtr->flags &= - ~(CHANNEL_EOF | CHANNEL_STICKY_EOF | CHANNEL_BLOCKED); - + ResetFlag(statePtr, CHANNEL_EOF|CHANNEL_STICKY_EOF|CHANNEL_BLOCKED); return TCL_OK; } else if (HaveOpt(1, "-translation")) { const char *readMode, *writeMode; @@ -7468,11 +7477,11 @@ Tcl_SetChannelOption( } if (argc == 1) { - readMode = (statePtr->flags & TCL_READABLE) ? argv[0] : NULL; - writeMode = (statePtr->flags & TCL_WRITABLE) ? argv[0] : NULL; + readMode = GotFlag(statePtr, TCL_READABLE) ? argv[0] : NULL; + writeMode = GotFlag(statePtr, TCL_WRITABLE) ? argv[0] : NULL; } else if (argc == 2) { - readMode = (statePtr->flags & TCL_READABLE) ? argv[0] : NULL; - writeMode = (statePtr->flags & TCL_WRITABLE) ? argv[1] : NULL; + readMode = GotFlag(statePtr, TCL_READABLE) ? argv[0] : NULL; + writeMode = GotFlag(statePtr, TCL_WRITABLE) ? argv[1] : NULL; } else { if (interp) { Tcl_AppendResult(interp, @@ -7485,6 +7494,7 @@ Tcl_SetChannelOption( if (readMode) { TclEolTranslation translation; + if (*readMode == '\0') { translation = statePtr->inputTranslation; } else if (strcmp(readMode, "auto") == 0) { @@ -7597,7 +7607,7 @@ Tcl_SetChannelOption( ckfree(statePtr->outputStage); statePtr->outputStage = NULL; } - if ((statePtr->encoding != NULL) && (statePtr->flags & TCL_WRITABLE)) { + if ((statePtr->encoding != NULL) && GotFlag(statePtr, TCL_WRITABLE)) { statePtr->outputStage = ckalloc((unsigned) (statePtr->bufSize + 2)); } return TCL_OK; @@ -7699,9 +7709,9 @@ Tcl_NotifyChannel( */ if ((mask & TCL_READABLE) && - (statePtr->flags & CHANNEL_NONBLOCKING) && + GotFlag(statePtr, CHANNEL_NONBLOCKING) && (Tcl_ChannelBlockModeProc(chanPtr->typePtr) == NULL) && - !(statePtr->flags & CHANNEL_TIMER_FEV)) { + !GotFlag(statePtr, CHANNEL_TIMER_FEV)) { SetFlag(statePtr, CHANNEL_HAS_MORE_DATA); } #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ @@ -7718,7 +7728,7 @@ Tcl_NotifyChannel( * their own events and pass them upward. */ - while (mask && (chanPtr->upChanPtr != (NULL))) { + while (mask && (chanPtr->upChanPtr != NULL)) { Tcl_DriverHandlerProc *upHandlerProc; upChanPtr = chanPtr->upChanPtr; @@ -7764,7 +7774,7 @@ Tcl_NotifyChannel( * don't call any write handlers before the flush is complete. */ - if ((statePtr->flags & BG_FLUSH_SCHEDULED) && (mask & TCL_WRITABLE)) { + if (GotFlag(statePtr, BG_FLUSH_SCHEDULED) && (mask & TCL_WRITABLE)) { FlushChannel(NULL, chanPtr, 1); mask &= ~TCL_WRITABLE; } @@ -7839,7 +7849,7 @@ UpdateInterest( * watch for the channel to become writable. */ - if (statePtr->flags & BG_FLUSH_SCHEDULED) { + if (GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { mask |= TCL_WRITABLE; } @@ -7851,7 +7861,7 @@ UpdateInterest( */ if (mask & TCL_READABLE) { - if (!(statePtr->flags & CHANNEL_NEED_MORE_DATA) + if (!GotFlag(statePtr, CHANNEL_NEED_MORE_DATA) && (statePtr->inQueueHead != NULL) && IsBufferReady(statePtr->inQueueHead)) { mask &= ~TCL_READABLE; @@ -7902,7 +7912,7 @@ UpdateInterest( } } } - chanPtr->typePtr->watchProc(chanPtr->instanceData, mask); + ChanWatch(chanPtr, mask); } /* @@ -7930,7 +7940,7 @@ ChannelTimerProc( ChannelState *statePtr = chanPtr->state; /* State info for channel */ - if (!(statePtr->flags & CHANNEL_NEED_MORE_DATA) + if (!GotFlag(statePtr, CHANNEL_NEED_MORE_DATA) && (statePtr->interestMask & TCL_READABLE) && (statePtr->inQueueHead != NULL) && IsBufferReady(statePtr->inQueueHead)) { @@ -7950,8 +7960,8 @@ ChannelTimerProc( * similar test is done in "PeekAhead". */ - if ((statePtr->flags & CHANNEL_NONBLOCKING) && - (Tcl_ChannelBlockModeProc(chanPtr->typePtr) == NULL)) { + if (GotFlag(statePtr, CHANNEL_NONBLOCKING) && + (Tcl_ChannelBlockModeProc(chanPtr->typePtr) == NULL)) { SetFlag(statePtr, CHANNEL_TIMER_FEV); } #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ @@ -8368,6 +8378,7 @@ Tcl_FileEventObjCmd( if (objc == 3) { EventScriptRecord *esPtr; + for (esPtr = statePtr->scriptRecordPtr; esPtr != NULL; esPtr = esPtr->nextPtr) { if ((esPtr->interp == interp) && (esPtr->mask == mask)) { @@ -8480,8 +8491,8 @@ TclCopyChannel( * Make sure the output side is unbuffered. */ - outStatePtr->flags = (outStatePtr->flags & ~(CHANNEL_LINEBUFFERED)) - | CHANNEL_UNBUFFERED; + outStatePtr->flags = (outStatePtr->flags & ~CHANNEL_LINEBUFFERED) + | CHANNEL_UNBUFFERED; /* * Allocate a new CopyState to maintain info about the current copy in @@ -8593,7 +8604,7 @@ CopyData( * underflow instead to prime the readable fileevent. */ - size = 0; + size = 0; underflow = 1; } else { /* @@ -8732,7 +8743,7 @@ CopyData( * therefore we don't need a writable handler. */ - if (!underflow && (outStatePtr->flags & BG_FLUSH_SCHEDULED)) { + if (!underflow && GotFlag(outStatePtr, BG_FLUSH_SCHEDULED)) { if (!(mask & TCL_WRITABLE)) { if (mask & TCL_READABLE) { Tcl_DeleteChannelHandler(inChan, CopyEventProc, csPtr); @@ -8783,6 +8794,7 @@ CopyData( total = csPtr->total; if (cmdPtr && interp) { int code; + /* * Get a private copy of the command so we can mutate it by adding * arguments. Note that StopCopy frees our saved reference to the @@ -8859,7 +8871,7 @@ DoRead( * operation. */ - if (!(statePtr->flags & CHANNEL_STICKY_EOF)) { + if (!GotFlag(statePtr, CHANNEL_STICKY_EOF)) { ResetFlag(statePtr, CHANNEL_EOF); } ResetFlag(statePtr, CHANNEL_BLOCKED | CHANNEL_NEED_MORE_DATA); @@ -8868,11 +8880,11 @@ DoRead( copiedNow = CopyAndTranslateBuffer(statePtr, bufPtr + copied, toRead - copied); if (copiedNow == 0) { - if (statePtr->flags & CHANNEL_EOF) { + if (GotFlag(statePtr, CHANNEL_EOF)) { goto done; } - if (statePtr->flags & CHANNEL_BLOCKED) { - if (statePtr->flags & CHANNEL_NONBLOCKING) { + if (GotFlag(statePtr, CHANNEL_BLOCKED)) { + if (GotFlag(statePtr, CHANNEL_NONBLOCKING)) { goto done; } ResetFlag(statePtr, CHANNEL_BLOCKED); @@ -9026,7 +9038,7 @@ CopyAndTranslateBuffer( curByte = *src; if (curByte == '\n') { ResetFlag(statePtr, INPUT_SAW_CR); - } else if (statePtr->flags & INPUT_SAW_CR) { + } else if (GotFlag(statePtr, INPUT_SAW_CR)) { ResetFlag(statePtr, INPUT_SAW_CR); *dst = '\r'; dst++; @@ -9069,7 +9081,7 @@ CopyAndTranslateBuffer( *dst = '\n'; dst++; } else { - if ((curByte != '\n') || !(statePtr->flags & INPUT_SAW_CR)) { + if ((curByte != '\n') || !GotFlag(statePtr, INPUT_SAW_CR)) { *dst = (char) curByte; dst++; } @@ -9338,10 +9350,10 @@ DoWrite( */ outBufPtr->nextAdded += destCopied; - if (!(statePtr->flags & BUFFER_READY)) { + if (!GotFlag(statePtr, BUFFER_READY)) { if (IsBufferFull(outBufPtr)) { SetFlag(statePtr, BUFFER_READY); - } else if (statePtr->flags & CHANNEL_LINEBUFFERED) { + } else if (GotFlag(statePtr, CHANNEL_LINEBUFFERED)) { for (sPtr = src, i = 0, foundNewline = 0; (i < srcCopied) && (!foundNewline); i++, sPtr++) { @@ -9353,7 +9365,7 @@ DoWrite( if (foundNewline) { SetFlag(statePtr, BUFFER_READY); } - } else if (statePtr->flags & CHANNEL_UNBUFFERED) { + } else if (GotFlag(statePtr, CHANNEL_UNBUFFERED)) { SetFlag(statePtr, BUFFER_READY); } } @@ -9362,7 +9374,7 @@ DoWrite( src += srcCopied; srcLen -= srcCopied; - if (statePtr->flags & BUFFER_READY) { + if (GotFlag(statePtr, BUFFER_READY)) { if (FlushChannel(NULL, chanPtr, 0) != 0) { return -1; } @@ -9433,19 +9445,19 @@ StopCopy( * Restore the old blocking mode and output buffering mode. */ - nonBlocking = (csPtr->readFlags & CHANNEL_NONBLOCKING); + nonBlocking = csPtr->readFlags & CHANNEL_NONBLOCKING; if (nonBlocking != (inStatePtr->flags & CHANNEL_NONBLOCKING)) { SetBlockMode(NULL, csPtr->readPtr, nonBlocking ? TCL_MODE_NONBLOCKING : TCL_MODE_BLOCKING); } if (csPtr->readPtr != csPtr->writePtr) { - nonBlocking = (csPtr->writeFlags & CHANNEL_NONBLOCKING); + nonBlocking = csPtr->writeFlags & CHANNEL_NONBLOCKING; if (nonBlocking != (outStatePtr->flags & CHANNEL_NONBLOCKING)) { SetBlockMode(NULL, csPtr->writePtr, nonBlocking ? TCL_MODE_NONBLOCKING : TCL_MODE_BLOCKING); } } - outStatePtr->flags &= ~(CHANNEL_LINEBUFFERED | CHANNEL_UNBUFFERED); + ResetFlag(outStatePtr, CHANNEL_LINEBUFFERED | CHANNEL_UNBUFFERED); outStatePtr->flags |= csPtr->writeFlags & (CHANNEL_LINEBUFFERED | CHANNEL_UNBUFFERED); @@ -10635,8 +10647,9 @@ SetChannelFromAny( * The channel is valid until any call to DetachChannel occurs. * Ensure consistency checks are done. */ + statePtr = GET_CHANNELSTATE(objPtr); - if (statePtr->flags & (CHANNEL_TAINTED|CHANNEL_CLOSED)) { + if (GotFlag(statePtr, CHANNEL_TAINTED|CHANNEL_CLOSED)) { ResetFlag(statePtr, CHANNEL_TAINTED); Tcl_Release(statePtr); UpdateStringOfChannel(objPtr); @@ -10650,6 +10663,7 @@ SetChannelFromAny( * We need a valid string with which to check for a valid channel, but * make sure not to free internal rep until validated. [Bug 1847044] */ + if ((objPtr->typePtr != NULL) && (objPtr->bytes == NULL)) { objPtr->typePtr->updateStringProc(objPtr); } @@ -10693,8 +10707,10 @@ UpdateStringOfChannel( if (objPtr->bytes == NULL) { ChannelState *statePtr = GET_CHANNELSTATE(objPtr); const char *name = statePtr->channelName; + if (name) { size_t len = strlen(name); + objPtr->bytes = (char *) ckalloc(len + 1); objPtr->length = len; memcpy(objPtr->bytes, name, len); -- cgit v0.12 From d50d702634fc6eb5493a179a01cd0f9c1e57c9c9 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 9 Dec 2008 20:16:29 +0000 Subject: TIP #337 IMPLEMENTATION * doc/BackgdErr.3: Converted internal routine * doc/interp.n: TclBackgroundException() into public routine * generic/tcl.decls: Tcl_BackgroundException(). * generic/tclEvent.c: * generic/tclInt.decls: * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclIO.c: Update callers. * generic/tclIOCmd.c: * generic/tclInterp.c: * generic/tclTimer.c: *** POTENTIAL INCOMPATIBILITY only for extensions using the converted internal routine *** --- ChangeLog | 21 +++++++++++++++++++++ doc/BackgdErr.3 | 51 ++++++++++++++++++++++++++++++++++----------------- doc/interp.n | 46 ++++++++++++++++++++++++---------------------- generic/tcl.decls | 7 ++++++- generic/tclDecls.h | 13 ++++++++++++- generic/tclEvent.c | 8 ++++---- generic/tclIO.c | 6 +++--- generic/tclIOCmd.c | 4 ++-- generic/tclInt.decls | 9 +++++---- generic/tclIntDecls.h | 16 ++++------------ generic/tclInterp.c | 6 +++--- generic/tclStubInit.c | 5 +++-- generic/tclTimer.c | 4 ++-- 13 files changed, 123 insertions(+), 73 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd9fdef..41a3132 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2008-12-09 Don Porter + + TIP #337 IMPLEMENTATION + + * doc/BackgdErr.3: Converted internal routine + * doc/interp.n: TclBackgroundException() into public routine + * generic/tcl.decls: Tcl_BackgroundException(). + * generic/tclEvent.c: + * generic/tclInt.decls: + + * generic/tclDecls.h: make genstubs + * generic/tclIntDecls.h: + * generic/tclStubInit.c: + + * generic/tclIO.c: Update callers. + * generic/tclIOCmd.c: + * generic/tclInterp.c: + * generic/tclTimer.c: + *** POTENTIAL INCOMPATIBILITY only for extensions using the converted + internal routine *** + 2008-12-09 Donal K. Fellows * generic/tclIO.c (ChanClose,ChanRead,...): Factored out some of the diff --git a/doc/BackgdErr.3 b/doc/BackgdErr.3 index 3309d25..ba53dc6 100644 --- a/doc/BackgdErr.3 +++ b/doc/BackgdErr.3 @@ -5,59 +5,76 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: BackgdErr.3,v 1.8 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: BackgdErr.3,v 1.9 2008/12/09 20:16:29 dgp Exp $ '\" .so man.macros .TH Tcl_BackgroundError 3 7.5 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_BackgroundError \- report Tcl error that occurred in background processing +Tcl_BackgroundException, Tcl_BackgroundError \- report Tcl exception that occurred in background processing .SH SYNOPSIS .nf \fB#include \fR .sp +\fBTcl_BackgroundException\fR(\fIinterp, code\fR) +.sp \fBTcl_BackgroundError\fR(\fIinterp\fR) .SH ARGUMENTS .AS Tcl_Interp *interp .AP Tcl_Interp *interp in -Interpreter in which the error occurred. +Interpreter in which the exception occurred. +.AP int code in +The exceptional return code to be reported. .BE .SH DESCRIPTION .PP -This procedure is typically invoked when a Tcl error occurs during +This procedure is typically invoked when a Tcl exception (any +return code other than TCL_OK) occurs during .QW "background processing" such as executing an event handler. -When such an error occurs, the error condition is reported to Tcl +When such an exception occurs, the condition is reported to Tcl or to a widget or some other C code, and there is not usually any -obvious way for that code to report the error to the user. -In these cases the code calls \fBTcl_BackgroundError\fR with an +obvious way for that code to report the exception to the user. +In these cases the code calls \fBTcl_BackgroundException\fR with an \fIinterp\fR argument identifying the interpreter in which the -error occurred. At the time \fBTcl_BackgroundError\fR is invoked, -the interpreter's result is expected to contain an error message. -\fBTcl_BackgroundError\fR will invoke the command registered +exception occurred, and a \fIcode\fR argument holding the return +code value of the exception. The state of the interpreter, including +any error message in the interpreter result, and the values of +any entries in the return options dictionary, is captured and +saved. \fBTcl_BackgroundException\fR then arranges for the event +loop to invoke at some later time the command registered in that interpreter to handle background errors by the -\fBinterp bgerror\fR command. -The registered handler command is meant to report the error +\fBinterp bgerror\fR command, passing the captured values as +arguments. +The registered handler command is meant to report the exception in an application-specific fashion. The handler command receives two arguments, the result of the interp, and the return options of the interp at the time the error occurred. If the application registers no handler command, the default handler command will attempt to call \fBbgerror\fR to report the error. If an error condition arises while invoking the -handler command, then \fBTcl_BackgroundError\fR reports the +handler command, then \fBTcl_BackgroundException\fR reports the error itself by printing a message on the standard error file. .PP -\fBTcl_BackgroundError\fR does not invoke the handler command immediately +\fBTcl_BackgroundException\fR does not invoke the handler command immediately because this could potentially interfere with scripts that are in process at the time the error occurred. Instead, it invokes the handler command later as an idle callback. .PP -It is possible for many background errors to accumulate before -the handler command is invoked. When this happens, each of the errors -is processed in order. However, if the handle command returns a +It is possible for many background exceptions to accumulate before +the handler command is invoked. When this happens, each of the exceptions +is processed in order. However, if the handler command returns a break exception, then all remaining error reports for the interpreter are skipped. +.PP +The \fBTcl_BackgroundError\fR routine is an older and simpler interface +useful when the exception code reported is \fBTCL_ERROR\fR. It is +equivalent to: +.PP +.CS +Tcl_BackgroundException(interp, TCL_ERROR); +.CE .SH KEYWORDS background, bgerror, error, interp diff --git a/doc/interp.n b/doc/interp.n index c986519..8e06fd3 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: interp.n,v 1.41 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: interp.n,v 1.42 2008/12/09 20:16:29 dgp Exp $ '\" .so man.macros .TH interp n 8.6 Tcl "Tcl Built-In Commands" @@ -138,12 +138,12 @@ as the current names of the commands). .TP \fBinterp bgerror \fIpath\fR ?\fIcmdPrefix\fR? . -This command either gets or sets the current background error handler +This command either gets or sets the current background exception handler for the interpreter identified by \fIpath\fR. If \fIcmdPrefix\fR is -absent, the current background error handler is returned, and if it is +absent, the current background exception handler is returned, and if it is present, it is a list of words (of minimum length one) that describes -what to set the interpreter's background error to. See the -\fBBACKGROUND ERROR HANDLING\fR section for more details. +what to set the interpreter's background exception handler to. See the +\fBBACKGROUND EXCEPTION HANDLING\fR section for more details. .TP \fBinterp\fR \fBcancel \fR?\fB\-unwind\fR? ?\fB\-\|\-\fR? ?\fIpath\fR? ?\fIresult\fR? .VS 8.6 @@ -395,12 +395,12 @@ does not have to be equal to \fIsrcCmd\fR. .TP \fIslave \fBbgerror\fR ?\fIcmdPrefix\fR? . -This command either gets or sets the current background error handler +This command either gets or sets the current background exception handler for the \fIslave\fR interpreter. If \fIcmdPrefix\fR is -absent, the current background error handler is returned, and if it is +absent, the current background exception handler is returned, and if it is present, it is a list of words (of minimum length one) that describes -what to set the interpreter's background error to. See the -\fBBACKGROUND ERROR HANDLING\fR section for more details. +what to set the interpreter's background exception handler to. See the +\fBBACKGROUND EXCEPTION HANDLING\fR section for more details. .TP \fIslave \fBeval \fIarg \fR?\fIarg ..\fR? . @@ -748,8 +748,8 @@ This option (common for all limit types) specifies (if non-empty) a Tcl script to be executed in the global namespace of the interpreter reading and writing the option when the particular limit in the limited interpreter is exceeded. The callback may modify the limit on the interpreter if it wishes the limited -interpreter to continue executing. If the callback generates an error, it is -reported through the background error mechanism (see \fBBACKGROUND ERROR +interpreter to continue executing. If the callback generates an exception, it is +reported through the background exception mechanism (see \fBBACKGROUND EXCEPTION HANDLING\fR). Note that the callbacks defined by one interpreter are completely isolated from the callbacks defined by another, and that the order in which those callbacks are called is undefined. @@ -792,21 +792,23 @@ these conditions, it should hide the \fBinterp\fR command in the child and then use aliases and the \fBinterp invokehidden\fR subcommand to provide such access as it chooses to the \fBinterp\fR command to the limited master as necessary. -.SH "BACKGROUND ERROR HANDLING" +.SH "BACKGROUND EXCEPTION HANDLING" .PP -When an error happens in a situation where it cannot be reported directly up +When an exception happens in a situation where it cannot be reported directly up the stack (e.g. when processing events in an \fBupdate\fR or \fBvwait\fR call) -the error is instead reported through the background error handling mechanism. -Every interpreter has a background error handler registered; the default error +the exception is instead reported through the background exception handling mechanism. +Every interpreter has a background exception handler registered; the default exception handler arranges for the \fBbgerror\fR command in the interpreter's global -namespace to be called, but other error handlers may be installed and process -background errors in substantially different ways. +namespace to be called, but other exception handlers may be installed and process +background exceptions in substantially different ways. .PP -A background error handler consists of a non-empty list of words to which will +A background exception handler consists of a non-empty list of words to which will be appended two further words at invocation time. The first word will be the -error message string, and the second will a dictionary of return options (this -is also the sort of information that can be obtained by trapping a normal -error using \fBcatch\fR of course.) The resulting list will then be executed +interpreter result at time of the exception, typically an error message, +and the second will be the dictionary of return options at the time of +the exception. These are the same values that \fBcatch\fR can capture +when it controls script evaluation in a non-background situation. +The resulting list will then be executed in the interpreter's global namespace without further substitutions being performed. .SH CREDITS @@ -849,7 +851,7 @@ set i [\fBinterp create\fR] } .CE .SH "SEE ALSO" -bgerror(n), load(n), safe(n), Tcl_CreateSlave(3), Tcl_Eval(3) +bgerror(n), load(n), safe(n), Tcl_CreateSlave(3), Tcl_Eval(3), Tcl_BackgroundException(3) .SH KEYWORDS alias, master interpreter, safe interpreter, slave interpreter '\"Local Variables: diff --git a/generic/tcl.decls b/generic/tcl.decls index bdfe02c..9bf31ff 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.157 2008/12/05 21:38:47 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.158 2008/12/09 20:16:29 dgp Exp $ library tcl @@ -2217,6 +2217,11 @@ declare 608 generic { int Tcl_InterpActive(Tcl_Interp *interp) } +# TIP 337 +declare 609 generic { + void Tcl_BackgroundException(Tcl_Interp *interp, int code) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are only diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 7e1c6fd..525b613 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.159 2008/12/05 21:40:38 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.160 2008/12/09 20:16:29 dgp Exp $ */ #ifndef _TCLDECLS @@ -3681,6 +3681,12 @@ EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, /* 608 */ EXTERN int Tcl_InterpActive (Tcl_Interp * interp); #endif +#ifndef Tcl_BackgroundException_TCL_DECLARED +#define Tcl_BackgroundException_TCL_DECLARED +/* 609 */ +EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, + int code); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4349,6 +4355,7 @@ typedef struct TclStubs { void (*tcl_SetErrorLine) (Tcl_Interp * interp, int value); /* 606 */ void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ + void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6857,6 +6864,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_InterpActive \ (tclStubsPtr->tcl_InterpActive) /* 608 */ #endif +#ifndef Tcl_BackgroundException +#define Tcl_BackgroundException \ + (tclStubsPtr->tcl_BackgroundException) /* 609 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 203dc5a..cbb0aad 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.85 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.86 2008/12/09 20:16:29 dgp Exp $ */ #include "tclInt.h" @@ -140,10 +140,10 @@ Tcl_BackgroundError( Tcl_Interp *interp) /* Interpreter in which an error has * occurred. */ { - TclBackgroundException(interp, TCL_ERROR); + Tcl_BackgroundException(interp, TCL_ERROR); } void -TclBackgroundException( +Tcl_BackgroundException( Tcl_Interp *interp, /* Interpreter in which an exception has * occurred. */ int code) /* The exception code value */ @@ -353,7 +353,7 @@ TclDefaultBgErrorHandlerObjCmd( if (code == TCL_OK) { /* * Somehow we got to exception handling with no exception. - * (Pass TCL_OK to TclBackgroundException()?) + * (Pass TCL_OK to Tcl_BackgroundException()?) * Just return without doing anything. */ return TCL_OK; diff --git a/generic/tclIO.c b/generic/tclIO.c index 1a2bbfb..09ca6fa 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.152 2008/12/09 14:09:14 dkf Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.153 2008/12/09 20:16:29 dgp Exp $ */ #include "tclInt.h" @@ -8307,7 +8307,7 @@ TclChannelEventScriptInvoker( if (chanPtr->typePtr != NULL) { DeleteScriptRecord(interp, chanPtr, mask); } - TclBackgroundException(interp, result); + Tcl_BackgroundException(interp, result); } Tcl_Release(interp); } @@ -8812,7 +8812,7 @@ CopyData( } code = Tcl_EvalObjEx(interp, cmdPtr, TCL_EVAL_GLOBAL); if (code != TCL_OK) { - TclBackgroundException(interp, code); + Tcl_BackgroundException(interp, code); result = TCL_ERROR; } TclDecrRefCount(cmdPtr); diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index dbc9bb1..dbf6b2c 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.59 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.60 2008/12/09 20:16:29 dgp Exp $ */ #include "tclInt.h" @@ -1334,7 +1334,7 @@ AcceptCallbackProc( result = Tcl_VarEval(interp, script, " ", Tcl_GetChannelName(chan), " ", address, " ", portBuf, NULL); if (result != TCL_OK) { - TclBackgroundException(interp, result); + Tcl_BackgroundException(interp, result); Tcl_UnregisterChannel(interp, chan); } diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 221fb34..1853c5c 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.129 2008/10/22 20:23:59 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.130 2008/12/09 20:16:29 dgp Exp $ library tcl @@ -933,9 +933,10 @@ declare 235 generic { } -declare 236 generic { - void TclBackgroundException(Tcl_Interp *interp, int code) -} +# TIP 337 made this one public +#declare 236 generic { +# void TclBackgroundException(Tcl_Interp *interp, int code) +#} # TIP #285: Script cancellation support. declare 237 generic { diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index ab08e3b..a511988 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.125 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.126 2008/12/09 20:16:30 dgp Exp $ */ #ifndef _TCLINTDECLS @@ -1059,12 +1059,7 @@ EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, Namespace * nsPtr); #endif -#ifndef TclBackgroundException_TCL_DECLARED -#define TclBackgroundException_TCL_DECLARED -/* 236 */ -EXTERN void TclBackgroundException (Tcl_Interp * interp, - int code); -#endif +/* Slot 236 is reserved */ #ifndef TclResetCancellation_TCL_DECLARED #define TclResetCancellation_TCL_DECLARED /* 237 */ @@ -1369,7 +1364,7 @@ typedef struct TclIntStubs { void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ - void (*tclBackgroundException) (Tcl_Interp * interp, int code); /* 236 */ + void *reserved236; int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 238 */ int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 239 */ @@ -2110,10 +2105,7 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclInitVarHashTable \ (tclIntStubsPtr->tclInitVarHashTable) /* 235 */ #endif -#ifndef TclBackgroundException -#define TclBackgroundException \ - (tclIntStubsPtr->tclBackgroundException) /* 236 */ -#endif +/* Slot 236 is reserved */ #ifndef TclResetCancellation #define TclResetCancellation \ (tclIntStubsPtr->tclResetCancellation) /* 237 */ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 939d3a0..ac8cbb9 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.98 2008/12/05 14:27:36 dkf Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.99 2008/12/09 20:16:30 dgp Exp $ */ #include "tclInt.h" @@ -3765,7 +3765,7 @@ TimeLimitCallback( code = Tcl_LimitCheck(interp); if (code != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (while waiting for event)"); - TclBackgroundException(interp, code); + Tcl_BackgroundException(interp, code); } Tcl_Release(interp); } @@ -3933,7 +3933,7 @@ CallScriptLimitCallback( code = Tcl_EvalObjEx(limitCBPtr->interp, limitCBPtr->scriptObj, TCL_EVAL_GLOBAL); if (code != TCL_OK && !Tcl_InterpDeleted(limitCBPtr->interp)) { - TclBackgroundException(limitCBPtr->interp, code); + Tcl_BackgroundException(limitCBPtr->interp, code); } Tcl_Release(limitCBPtr->interp); } diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 6fdbc0d..f858b14 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.170 2008/12/05 21:40:38 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.171 2008/12/09 20:16:30 dgp Exp $ */ #include "tclInt.h" @@ -305,7 +305,7 @@ static const TclIntStubs tclIntStubs = { TclGetSrcInfoForPc, /* 233 */ TclVarHashCreateVar, /* 234 */ TclInitVarHashTable, /* 235 */ - TclBackgroundException, /* 236 */ + NULL, /* 236 */ TclResetCancellation, /* 237 */ TclNRInterpProc, /* 238 */ TclNRInterpProcCore, /* 239 */ @@ -1134,6 +1134,7 @@ static const TclStubs tclStubs = { Tcl_SetErrorLine, /* 606 */ Tcl_TransferResult, /* 607 */ Tcl_InterpActive, /* 608 */ + Tcl_BackgroundException, /* 609 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclTimer.c b/generic/tclTimer.c index e254830..03e01fa 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.36 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.37 2008/12/09 20:16:30 dgp Exp $ */ #include "tclInt.h" @@ -1177,7 +1177,7 @@ AfterProc( result = Tcl_EvalObjEx(interp, afterPtr->commandPtr, TCL_EVAL_GLOBAL); if (result != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (\"after\" script)"); - TclBackgroundException(interp, result); + Tcl_BackgroundException(interp, result); } Tcl_Release((ClientData) interp); -- cgit v0.12 From c42fcde9e93845b5883b6be8dd4f24a8d5b0b742 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 9 Dec 2008 21:47:08 +0000 Subject: restore source and binary compatibility for TIP #337 implementation. (when it's _that_ simple, there is no excuse not to do it) :-) --- ChangeLog | 8 ++++++++ generic/tclInt.decls | 8 ++++---- generic/tclIntDecls.h | 19 +++++++++++++++---- generic/tclStubInit.c | 4 ++-- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41a3132..13455f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-09 Jan Nijtmans + + * generic/tclInt.decls: restore source and binary compatibility + for TIP #337 implementation. (when it's _that_ + simple, there is no excuse not to do it) :-) + * generic/tclIntDecls.h: make genstubs + * generic/tclStubInit.c: + 2008-12-09 Don Porter TIP #337 IMPLEMENTATION diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 1853c5c..bdc71ad 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.130 2008/12/09 20:16:29 dgp Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.131 2008/12/09 21:47:08 nijtmans Exp $ library tcl @@ -934,9 +934,9 @@ declare 235 generic { # TIP 337 made this one public -#declare 236 generic { -# void TclBackgroundException(Tcl_Interp *interp, int code) -#} +declare 236 generic { + void Tcl_BackgroundException(Tcl_Interp *interp, int code) +} # TIP #285: Script cancellation support. declare 237 generic { diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index a511988..b2f45b1 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.126 2008/12/09 20:16:30 dgp Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.127 2008/12/09 21:47:08 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -30,6 +30,9 @@ # endif #endif +/* restore source compatibility for TIP #337 */ +#define TclBackgroundException Tcl_BackgroundException + /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made @@ -1059,7 +1062,12 @@ EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, Namespace * nsPtr); #endif -/* Slot 236 is reserved */ +#ifndef Tcl_BackgroundException_TCL_DECLARED +#define Tcl_BackgroundException_TCL_DECLARED +/* 236 */ +EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, + int code); +#endif #ifndef TclResetCancellation_TCL_DECLARED #define TclResetCancellation_TCL_DECLARED /* 237 */ @@ -1364,7 +1372,7 @@ typedef struct TclIntStubs { void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ - void *reserved236; + void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 236 */ int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 238 */ int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 239 */ @@ -2105,7 +2113,10 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclInitVarHashTable \ (tclIntStubsPtr->tclInitVarHashTable) /* 235 */ #endif -/* Slot 236 is reserved */ +#ifndef Tcl_BackgroundException +#define Tcl_BackgroundException \ + (tclIntStubsPtr->tcl_BackgroundException) /* 236 */ +#endif #ifndef TclResetCancellation #define TclResetCancellation \ (tclIntStubsPtr->tclResetCancellation) /* 237 */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f858b14..b5ea1b6 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.171 2008/12/09 20:16:30 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.172 2008/12/09 21:47:08 nijtmans Exp $ */ #include "tclInt.h" @@ -305,7 +305,7 @@ static const TclIntStubs tclIntStubs = { TclGetSrcInfoForPc, /* 233 */ TclVarHashCreateVar, /* 234 */ TclInitVarHashTable, /* 235 */ - NULL, /* 236 */ + Tcl_BackgroundException, /* 236 */ TclResetCancellation, /* 237 */ TclNRInterpProc, /* 238 */ TclNRInterpProcCore, /* 239 */ -- cgit v0.12 From b60afa29d8fe051ce6ede085d2855c228b66740e Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 9 Dec 2008 22:38:05 +0000 Subject: Set the file channel to binary for size comparison on windows --- tests/http.test | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/http.test b/tests/http.test index 18cf75a..dfc884c 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.48 2008/03/12 09:51:39 hobbs Exp $ +# RCS: @(#) $Id: http.test,v 1.49 2008/12/09 22:38:05 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -335,7 +335,7 @@ test http-4.1 {http::Event} { set token [http::geturl $url -keepalive 0] upvar #0 $token data array set meta $data(meta) - expr ($data(totalsize) == $meta(Content-Length)) + expr {($data(totalsize) == $meta(Content-Length))} } 1 test http-4.2 {http::Event} { set token [http::geturl $url] @@ -364,11 +364,12 @@ test http-4.4 {http::Event} { test http-4.5 {http::Event} { set testfile [makeFile "" testfile] set out [open $testfile w] + fconfigure $out -translation lf set token [http::geturl $url -channel $out] close $out upvar #0 $token data removeFile $testfile - expr $data(currentsize) == $data(totalsize) + expr {$data(currentsize) == $data(totalsize)} } 1 test http-4.6 {http::Event} { set testfile [makeFile "" testfile] -- cgit v0.12 From 418c8071f2eaf8ed93cf80189e6b775369dba84b Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Dec 2008 11:15:05 +0000 Subject: Implement TIP#341. --- ChangeLog | 14 +++++++--- doc/dict.n | 18 +++++++------ generic/tclDictObj.c | 72 ++++++++++++++++++++++++++++++++++------------------ tests/dict.test | 32 +++++++++++++---------- 4 files changed, 88 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13455f0..27d1f3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,16 @@ +2008-12-10 Donal K. Fellows + + TIP #341 IMPLEMENTATION + + * generic/tclDictObj.c (DictFilterCmd): Made key and value filtering + * tests/dict.test, doc/dict.n: accept arbitrary numbers of + glob arguments. + 2008-12-09 Jan Nijtmans - * generic/tclInt.decls: restore source and binary compatibility - for TIP #337 implementation. (when it's _that_ - simple, there is no excuse not to do it) :-) + * generic/tclInt.decls: Restore source and binary compatibility for + TIP #337 implementation. (When it is _that_ + simple, there is no excuse not to do it! :-)) * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: diff --git a/doc/dict.n b/doc/dict.n index 308e367..4bbfedc 100644 --- a/doc/dict.n +++ b/doc/dict.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dict.n,v 1.19 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: dict.n,v 1.20 2008/12/10 11:15:05 dkf Exp $ '\" .so man.macros .TH dict n 8.5 Tcl "Tcl Built-In Commands" @@ -49,10 +49,11 @@ contains just those key/value pairs that match the specified filter type (which may be abbreviated.) Supported filter types are: .RS .TP -\fBdict filter \fIdictionaryValue \fBkey \fIglobPattern\fR -. -The key rule only matches those key/value pairs whose keys match the -given pattern (in the style of \fBstring match\fR.) +\fBdict filter \fIdictionaryValue \fBkey\fR ?\fIglobPattern ...\fR? +.VS 8.6 +The key rule only matches those key/value pairs whose keys match any +of the given patterns (in the style of \fBstring match\fR.) +.VE 8.6 .TP \fBdict filter \fIdictionaryValue \fBscript {\fIkeyVar valueVar\fB} \fIscript\fR . @@ -69,9 +70,10 @@ result. The key/value pairs are tested in the order in which the keys were inserted into the dictionary. .TP \fBdict filter \fIdictionaryValue \fBvalue \fIglobPattern\fR -. -The value rule only matches those key/value pairs whose values match -the given pattern (in the style of \fBstring match\fR.) +.VS 8.6 +The value rule only matches those key/value pairs whose values match any +of the given patterns (in the style of \fBstring match\fR.) +.VE 8.6 .RE .TP \fBdict for {\fIkeyVar valueVar\fB} \fIdictionaryValue body\fR diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index bcdc404..f895555 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.71 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.72 2008/12/10 11:15:05 dkf Exp $ */ #include "tclInt.h" @@ -2736,11 +2736,6 @@ DictFilterCmd( switch ((enum FilterTypes) index) { case FILTER_KEYS: - if (objc != 4) { - Tcl_WrongNumArgs(interp, 1, objv, "dictionary key globPattern"); - return TCL_ERROR; - } - /* * Create a dictionary whose keys all match a certain pattern. */ @@ -2749,23 +2744,52 @@ DictFilterCmd( &keyObj, &valueObj, &done) != TCL_OK) { return TCL_ERROR; } - pattern = TclGetString(objv[3]); - resultObj = Tcl_NewDictObj(); - if (TclMatchIsTrivial(pattern)) { + if (objc == 3) { /* - * Must release the search lock here to prevent a memory leak - * since we are not exhausing the search. [Bug 1705778, leak K05] + * Nothing to match, so return nothing (== empty dictionary). */ Tcl_DictObjDone(&search); - Tcl_DictObjGet(interp, objv[1], objv[3], &valueObj); - if (valueObj != NULL) { - Tcl_DictObjPut(interp, resultObj, objv[3], valueObj); + return TCL_OK; + } else if (objc == 4) { + pattern = TclGetString(objv[3]); + resultObj = Tcl_NewDictObj(); + if (TclMatchIsTrivial(pattern)) { + /* + * Must release the search lock here to prevent a memory leak + * since we are not exhausing the search. [Bug 1705778, leak + * K05] + */ + + Tcl_DictObjDone(&search); + Tcl_DictObjGet(interp, objv[1], objv[3], &valueObj); + if (valueObj != NULL) { + Tcl_DictObjPut(interp, resultObj, objv[3], valueObj); + } + } else { + while (!done) { + if (Tcl_StringMatch(TclGetString(keyObj), pattern)) { + Tcl_DictObjPut(interp, resultObj, keyObj, valueObj); + } + Tcl_DictObjNext(&search, &keyObj, &valueObj, &done); + } } } else { + /* + * Can't optimize this match for trivial globbing: would disturb + * order. + */ + + resultObj = Tcl_NewDictObj(); while (!done) { - if (Tcl_StringMatch(TclGetString(keyObj), pattern)) { - Tcl_DictObjPut(interp, resultObj, keyObj, valueObj); + int i; + + for (i=3 ; i Date: Wed, 10 Dec 2008 18:21:46 +0000 Subject: TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan] --- ChangeLog | 13 +++++++++++++ doc/format.n | 8 +++++++- doc/scan.n | 8 +++++++- generic/tclInt.h | 4 +++- generic/tclScan.c | 7 ++++++- generic/tclStrToD.c | 12 +++++++++--- generic/tclStringObj.c | 17 ++++++++++++----- tests/format.test | 5 ++++- tests/scan.test | 10 +++++++--- 9 files changed, 68 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27d1f3c..ea3da59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-12-10 Alexandre Ferrieux + + TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan] + + * doc/format.n + * doc/scan.n + * generic/tclInt.h + * generic/tclScan.c + * generic/tclStrToD.c + * generic/tclStringObj.c + * tests/format.test + * tests/scan.test + 2008-12-10 Donal K. Fellows TIP #341 IMPLEMENTATION diff --git a/doc/format.n b/doc/format.n index dab6b8b..efb3a4d 100644 --- a/doc/format.n +++ b/doc/format.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: format.n,v 1.21 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: format.n,v 1.22 2008/12/10 18:21:46 ferrieux Exp $ '\" .so man.macros .TH format n 8.1 Tcl "Tcl Built-In Commands" @@ -87,6 +87,8 @@ Requests an alternate output form. For \fBo\fR and \fBO\fR conversions it guarantees that the first digit is always \fB0\fR. For \fBx\fR or \fBX\fR conversions, \fB0x\fR or \fB0X\fR (respectively) will be added to the beginning of the result unless it is zero. +For \fBb\fR conversions, \fB0b\fR +will be added to the beginning of the result unless it is zero. For all floating-point conversions (\fBe\fR, \fBE\fR, \fBf\fR, \fBg\fR, and \fBG\fR) it guarantees that the result always has a decimal point. @@ -161,6 +163,9 @@ for \fBx\fR and .QW 0123456789ABCDEF for \fBX\fR). .TP 10 +\fBb\fR +Convert integer to binary string, using digits 0 and 1. +.TP 10 \fBc\fR Convert integer to the Unicode character it represents. .TP 10 @@ -203,6 +208,7 @@ which will then be converted to the corresponding character value. .IP [3] The size modifiers are ignored when formatting floating-point values. The \fBll\fR modifier has no \fBsprintf\fR counterpart. +The \fBb\fR specifier has no \fBsprintf\fR counterpart. .SH EXAMPLES .PP Convert the numeric value of a UNICODE character to the character diff --git a/doc/scan.n b/doc/scan.n index 4612467..f37ca59 100644 --- a/doc/scan.n +++ b/doc/scan.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scan.n,v 1.26 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: scan.n,v 1.27 2008/12/10 18:21:46 ferrieux Exp $ '\" .so man.macros .TH scan n 8.4 Tcl "Tcl Built-In Commands" @@ -104,6 +104,12 @@ The input substring must be a hexadecimal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. .TP 10 +\fBb\fR +. +The input substring must be a binary integer. +It is read in and the integer value is stored in the variable, +truncated as required by the size modifier value. +.TP 10 \fBu\fR . The input substring must be a decimal integer. diff --git a/generic/tclInt.h b/generic/tclInt.h index 73a8bab..e373a6c 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.408 2008/12/05 14:27:36 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.409 2008/12/10 18:21:47 ferrieux Exp $ */ #ifndef _TCLINT @@ -2461,6 +2461,8 @@ typedef struct ProcessGlobalValue { /* Use [scan] rules dealing with 0? prefixes */ #define TCL_PARSE_NO_WHITESPACE 32 /* Reject leading/trailing whitespace */ +#define TCL_PARSE_BINARY_ONLY 64 + /* Parse binary even without prefix */ /* *---------------------------------------------------------------------- diff --git a/generic/tclScan.c b/generic/tclScan.c index a732b67..d05cb8f 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.29 2008/07/19 22:50:42 nijtmans Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.30 2008/12/10 18:21:47 ferrieux Exp $ */ #include "tclInt.h" @@ -405,6 +405,7 @@ ValidateFormat( case 'i': case 'o': case 'x': + case 'b': break; case 'u': if (flags & SCAN_BIG) { @@ -732,6 +733,10 @@ Tcl_ScanObjCmd( op = 'i'; parseFlag |= TCL_PARSE_HEXADECIMAL_ONLY; break; + case 'b': + op = 'i'; + parseFlag |= TCL_PARSE_BINARY_ONLY; + break; case 'u': op = 'i'; parseFlag |= TCL_PARSE_DECIMAL_ONLY; diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 2b4cde7..8eec7b4 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.34 2008/04/01 20:08:22 andreas_kupries Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.35 2008/12/10 18:21:47 ferrieux Exp $ * *---------------------------------------------------------------------- */ @@ -369,6 +369,8 @@ TclParseNumber( break; } else if (flags & TCL_PARSE_HEXADECIMAL_ONLY) { goto zerox; + } else if (flags & TCL_PARSE_BINARY_ONLY) { + goto zerob; } else if (flags & TCL_PARSE_OCTAL_ONLY) { goto zeroo; } else if (isdigit(UCHAR(c))) { @@ -395,9 +397,9 @@ TclParseNumber( case ZERO: /* * Scanned a leading zero (perhaps with a + or -). Acceptable - * inputs are digits, period, X, and E. If 8 or 9 is encountered, + * inputs are digits, period, X, b, and E. If 8 or 9 is encountered, * the number can't be octal. This state and the OCTAL state - * differ only in whether they recognize 'X'. + * differ only in whether they recognize 'X' and 'b'. */ acceptState = state; @@ -417,6 +419,9 @@ TclParseNumber( state = ZERO_B; break; } + if (flags & TCL_PARSE_BINARY_ONLY) { + goto zerob; + } if (c == 'o' || c == 'O') { explicitOctal = 1; state = ZERO_O; @@ -602,6 +607,7 @@ TclParseNumber( acceptPoint = p; acceptLen = len; case ZERO_B: + zerob: if (c == '0') { ++numTrailZeros; state = BINARY; diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 6d5f96a..1930ad0 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.74 2008/10/26 18:34:04 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.75 2008/12/10 18:21:47 ferrieux Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1943,7 +1943,8 @@ Tcl_AppendFormatToObj( case 'd': case 'o': case 'x': - case 'X': { + case 'X': + case 'b': { short int s = 0; /* Silence compiler warning; only defined and * used when useShort is true. */ long l; @@ -2016,6 +2017,9 @@ Tcl_AppendFormatToObj( case 'X': Tcl_AppendToObj(segment, "0x", 2); break; + case 'b': + Tcl_AppendToObj(segment, "0b", 2); + break; } } @@ -2074,7 +2078,8 @@ Tcl_AppendFormatToObj( case 'u': case 'o': case 'x': - case 'X': { + case 'X': + case 'b': { Tcl_WideUInt bits = (Tcl_WideUInt)0; int length, numBits = 4, numDigits = 0, base = 16; int index = 0, shift = 0; @@ -2083,10 +2088,12 @@ Tcl_AppendFormatToObj( if (ch == 'u') { base = 10; - } - if (ch == 'o') { + } else if (ch == 'o') { base = 8; numBits = 3; + } else if (ch=='b') { + base = 2; + numBits = 1; } if (useShort) { unsigned short int us = (unsigned short int) s; diff --git a/tests/format.test b/tests/format.test index 1b8869a..d2cbcde 100644 --- a/tests/format.test +++ b/tests/format.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: format.test,v 1.27 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: format.test,v 1.28 2008/12/10 18:21:47 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -77,6 +77,9 @@ test format-1.11 {integer formatting} longIs32bit { test format-1.11.1 {integer formatting} longIs64bit { format "%-#20o %#-20o %#-20o %#-20o" 6 34 16923 -12 -1 } {06 042 041033 01777777777777777777764} +test format-1.12 {integer formatting} { + format "%b %#b %llb" 5 5 [expr {2**100}] +} {101 0b101 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000} test format-2.1 {string formatting} { format "%s %s %c %s" abcd {This is a very long test string.} 120 x diff --git a/tests/scan.test b/tests/scan.test index ef40d4b..4296366 100644 --- a/tests/scan.test +++ b/tests/scan.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: scan.test,v 1.22 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: scan.test,v 1.23 2008/12/10 18:21:47 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -248,10 +248,14 @@ test scan-4.40.2 {Tcl_ScanObjCmd, base-16 integer scanning} { catch {unset x} list [scan {xF} {%x} x] [info exists x] } {0 0} +test scan-4.40.3 {Tcl_ScanObjCmd, base-2 integer scanning} { + set x {} + list [scan {1001 0b101 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000} {%b %b %llb} x y z] $x $y $z +} {3 9 5 340282366920938463463374607431768211456} test scan-4.41 {Tcl_ScanObjCmd, base-unknown integer scanning} { set x {} - list [scan {10 010 0x10} {%i%i%i} x y z] $x $y $z -} {3 10 8 16} + list [scan {10 010 0x10 0b10} {%i%i%i%i} x y z t] $x $y $z $t +} {4 10 8 16 0} test scan-4.42 {Tcl_ScanObjCmd, base-unknown integer scanning} { set x {} list [scan {10 010 0X10} {%i%i%i} x y z] $x $y $z -- cgit v0.12 From 9a623e586804e09002c18013b7e993cf3abfd5fc Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Wed, 10 Dec 2008 19:00:53 +0000 Subject: library/tzdata/*: Update from Olson's tzdata2008i. --- ChangeLog | 4 + library/tzdata/Africa/Casablanca | 2 +- library/tzdata/America/Argentina/Buenos_Aires | 184 ++++++++++++------------ library/tzdata/America/Argentina/Catamarca | 184 +----------------------- library/tzdata/America/Argentina/Cordoba | 184 ++++++++++++------------ library/tzdata/America/Argentina/Jujuy | 184 +----------------------- library/tzdata/America/Argentina/La_Rioja | 184 +----------------------- library/tzdata/America/Argentina/Mendoza | 184 +----------------------- library/tzdata/America/Argentina/Rio_Gallegos | 184 +----------------------- library/tzdata/America/Argentina/Salta | 66 +++++++++ library/tzdata/America/Argentina/San_Juan | 184 +----------------------- library/tzdata/America/Argentina/Tucuman | 184 ++++++++++++------------ library/tzdata/America/Argentina/Ushuaia | 184 +----------------------- library/tzdata/America/Campo_Grande | 196 +++++++++++++------------- library/tzdata/America/Cuiaba | 196 +++++++++++++------------- library/tzdata/America/Sao_Paulo | 196 +++++++++++++------------- library/tzdata/Asia/Damascus | 184 ++++++++++++------------ library/tzdata/Asia/Gaza | 184 ++++++++++++------------ library/tzdata/Asia/Karachi | 2 +- library/tzdata/Indian/Mauritius | 183 +++++++++++++++++++++++- 20 files changed, 1015 insertions(+), 2038 deletions(-) create mode 100644 library/tzdata/America/Argentina/Salta diff --git a/ChangeLog b/ChangeLog index ea3da59..2de955a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-10 Kevin B. Kenny + + * library/tzdata/*: Update from Olson's tzdata2008i. + 2008-12-10 Alexandre Ferrieux TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan] diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca index 15613fb..da64c44 100644 --- a/library/tzdata/Africa/Casablanca +++ b/library/tzdata/Africa/Casablanca @@ -22,5 +22,5 @@ set TZData(:Africa/Casablanca) { {448243200 3600 0 CET} {504918000 0 0 WET} {1212278400 3600 1 WEST} - {1222556400 0 0 WET} + {1220223600 0 0 WET} } diff --git a/library/tzdata/America/Argentina/Buenos_Aires b/library/tzdata/America/Argentina/Buenos_Aires index bb9df31..beccff3 100644 --- a/library/tzdata/America/Argentina/Buenos_Aires +++ b/library/tzdata/America/Argentina/Buenos_Aires @@ -62,187 +62,187 @@ set TZData(:America/Argentina/Buenos_Aires) { {952056000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} + {1224385200 -7200 1 ARST} {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} + {1255834800 -7200 1 ARST} {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} + {1287284400 -7200 1 ARST} {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} + {1318734000 -7200 1 ARST} {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} + {1350788400 -7200 1 ARST} {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} + {1382238000 -7200 1 ARST} {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} + {1413687600 -7200 1 ARST} {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} + {1445137200 -7200 1 ARST} {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} + {1476586800 -7200 1 ARST} {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} + {1508036400 -7200 1 ARST} {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} + {1540090800 -7200 1 ARST} {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} + {1571540400 -7200 1 ARST} {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} + {1602990000 -7200 1 ARST} {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} + {1634439600 -7200 1 ARST} {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} + {1665889200 -7200 1 ARST} {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} + {1697338800 -7200 1 ARST} {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} + {1729393200 -7200 1 ARST} {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} + {1760842800 -7200 1 ARST} {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} + {1792292400 -7200 1 ARST} {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} + {1823742000 -7200 1 ARST} {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} + {1855191600 -7200 1 ARST} {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} + {1887246000 -7200 1 ARST} {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} + {1918695600 -7200 1 ARST} {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} + {1950145200 -7200 1 ARST} {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} + {1981594800 -7200 1 ARST} {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} + {2013044400 -7200 1 ARST} {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} + {2044494000 -7200 1 ARST} {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} + {2076548400 -7200 1 ARST} {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} + {2107998000 -7200 1 ARST} {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} + {2139447600 -7200 1 ARST} {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} + {2170897200 -7200 1 ARST} {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} + {2202346800 -7200 1 ARST} {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} + {2234401200 -7200 1 ARST} {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} + {2265850800 -7200 1 ARST} {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} + {2297300400 -7200 1 ARST} {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} + {2328750000 -7200 1 ARST} {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} + {2360199600 -7200 1 ARST} {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} + {2391649200 -7200 1 ARST} {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} + {2423703600 -7200 1 ARST} {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} + {2455153200 -7200 1 ARST} {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} + {2486602800 -7200 1 ARST} {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} + {2518052400 -7200 1 ARST} {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} + {2549502000 -7200 1 ARST} {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} + {2580951600 -7200 1 ARST} {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} + {2613006000 -7200 1 ARST} {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} + {2644455600 -7200 1 ARST} {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} + {2675905200 -7200 1 ARST} {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} + {2707354800 -7200 1 ARST} {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} + {2738804400 -7200 1 ARST} {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} + {2770858800 -7200 1 ARST} {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} + {2802308400 -7200 1 ARST} {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} + {2833758000 -7200 1 ARST} {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} + {2865207600 -7200 1 ARST} {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} + {2896657200 -7200 1 ARST} {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} + {2928106800 -7200 1 ARST} {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} + {2960161200 -7200 1 ARST} {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} + {2991610800 -7200 1 ARST} {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} + {3023060400 -7200 1 ARST} {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} + {3054510000 -7200 1 ARST} {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} + {3085959600 -7200 1 ARST} {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} + {3118014000 -7200 1 ARST} {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} + {3149463600 -7200 1 ARST} {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} + {3180913200 -7200 1 ARST} {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} + {3212362800 -7200 1 ARST} {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} + {3243812400 -7200 1 ARST} {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} + {3275262000 -7200 1 ARST} {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} + {3307316400 -7200 1 ARST} {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} + {3338766000 -7200 1 ARST} {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} + {3370215600 -7200 1 ARST} {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} + {3401665200 -7200 1 ARST} {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} + {3433114800 -7200 1 ARST} {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} + {3464564400 -7200 1 ARST} {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} + {3496618800 -7200 1 ARST} {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} + {3528068400 -7200 1 ARST} {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} + {3559518000 -7200 1 ARST} {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} + {3590967600 -7200 1 ARST} {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} + {3622417200 -7200 1 ARST} {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} + {3654471600 -7200 1 ARST} {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} + {3685921200 -7200 1 ARST} {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} + {3717370800 -7200 1 ARST} {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} + {3748820400 -7200 1 ARST} {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} + {3780270000 -7200 1 ARST} {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} + {3811719600 -7200 1 ARST} {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} + {3843774000 -7200 1 ARST} {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} + {3875223600 -7200 1 ARST} {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} + {3906673200 -7200 1 ARST} {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} + {3938122800 -7200 1 ARST} {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} + {3969572400 -7200 1 ARST} {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} + {4001626800 -7200 1 ARST} {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} + {4033076400 -7200 1 ARST} {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} + {4064526000 -7200 1 ARST} {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {4095975600 -7200 1 ARST} } diff --git a/library/tzdata/America/Argentina/Catamarca b/library/tzdata/America/Argentina/Catamarca index fde4553..7739203 100644 --- a/library/tzdata/America/Argentina/Catamarca +++ b/library/tzdata/America/Argentina/Catamarca @@ -64,187 +64,5 @@ set TZData(:America/Argentina/Catamarca) { {1087704000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} - {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {1224295200 -10800 0 ART} } diff --git a/library/tzdata/America/Argentina/Cordoba b/library/tzdata/America/Argentina/Cordoba index 97469b8..798ee86 100644 --- a/library/tzdata/America/Argentina/Cordoba +++ b/library/tzdata/America/Argentina/Cordoba @@ -62,187 +62,187 @@ set TZData(:America/Argentina/Cordoba) { {952056000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} + {1224385200 -7200 1 ARST} {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} + {1255834800 -7200 1 ARST} {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} + {1287284400 -7200 1 ARST} {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} + {1318734000 -7200 1 ARST} {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} + {1350788400 -7200 1 ARST} {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} + {1382238000 -7200 1 ARST} {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} + {1413687600 -7200 1 ARST} {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} + {1445137200 -7200 1 ARST} {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} + {1476586800 -7200 1 ARST} {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} + {1508036400 -7200 1 ARST} {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} + {1540090800 -7200 1 ARST} {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} + {1571540400 -7200 1 ARST} {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} + {1602990000 -7200 1 ARST} {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} + {1634439600 -7200 1 ARST} {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} + {1665889200 -7200 1 ARST} {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} + {1697338800 -7200 1 ARST} {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} + {1729393200 -7200 1 ARST} {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} + {1760842800 -7200 1 ARST} {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} + {1792292400 -7200 1 ARST} {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} + {1823742000 -7200 1 ARST} {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} + {1855191600 -7200 1 ARST} {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} + {1887246000 -7200 1 ARST} {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} + {1918695600 -7200 1 ARST} {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} + {1950145200 -7200 1 ARST} {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} + {1981594800 -7200 1 ARST} {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} + {2013044400 -7200 1 ARST} {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} + {2044494000 -7200 1 ARST} {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} + {2076548400 -7200 1 ARST} {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} + {2107998000 -7200 1 ARST} {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} + {2139447600 -7200 1 ARST} {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} + {2170897200 -7200 1 ARST} {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} + {2202346800 -7200 1 ARST} {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} + {2234401200 -7200 1 ARST} {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} + {2265850800 -7200 1 ARST} {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} + {2297300400 -7200 1 ARST} {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} + {2328750000 -7200 1 ARST} {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} + {2360199600 -7200 1 ARST} {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} + {2391649200 -7200 1 ARST} {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} + {2423703600 -7200 1 ARST} {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} + {2455153200 -7200 1 ARST} {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} + {2486602800 -7200 1 ARST} {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} + {2518052400 -7200 1 ARST} {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} + {2549502000 -7200 1 ARST} {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} + {2580951600 -7200 1 ARST} {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} + {2613006000 -7200 1 ARST} {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} + {2644455600 -7200 1 ARST} {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} + {2675905200 -7200 1 ARST} {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} + {2707354800 -7200 1 ARST} {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} + {2738804400 -7200 1 ARST} {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} + {2770858800 -7200 1 ARST} {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} + {2802308400 -7200 1 ARST} {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} + {2833758000 -7200 1 ARST} {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} + {2865207600 -7200 1 ARST} {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} + {2896657200 -7200 1 ARST} {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} + {2928106800 -7200 1 ARST} {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} + {2960161200 -7200 1 ARST} {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} + {2991610800 -7200 1 ARST} {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} + {3023060400 -7200 1 ARST} {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} + {3054510000 -7200 1 ARST} {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} + {3085959600 -7200 1 ARST} {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} + {3118014000 -7200 1 ARST} {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} + {3149463600 -7200 1 ARST} {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} + {3180913200 -7200 1 ARST} {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} + {3212362800 -7200 1 ARST} {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} + {3243812400 -7200 1 ARST} {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} + {3275262000 -7200 1 ARST} {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} + {3307316400 -7200 1 ARST} {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} + {3338766000 -7200 1 ARST} {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} + {3370215600 -7200 1 ARST} {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} + {3401665200 -7200 1 ARST} {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} + {3433114800 -7200 1 ARST} {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} + {3464564400 -7200 1 ARST} {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} + {3496618800 -7200 1 ARST} {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} + {3528068400 -7200 1 ARST} {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} + {3559518000 -7200 1 ARST} {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} + {3590967600 -7200 1 ARST} {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} + {3622417200 -7200 1 ARST} {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} + {3654471600 -7200 1 ARST} {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} + {3685921200 -7200 1 ARST} {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} + {3717370800 -7200 1 ARST} {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} + {3748820400 -7200 1 ARST} {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} + {3780270000 -7200 1 ARST} {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} + {3811719600 -7200 1 ARST} {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} + {3843774000 -7200 1 ARST} {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} + {3875223600 -7200 1 ARST} {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} + {3906673200 -7200 1 ARST} {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} + {3938122800 -7200 1 ARST} {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} + {3969572400 -7200 1 ARST} {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} + {4001626800 -7200 1 ARST} {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} + {4033076400 -7200 1 ARST} {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} + {4064526000 -7200 1 ARST} {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {4095975600 -7200 1 ARST} } diff --git a/library/tzdata/America/Argentina/Jujuy b/library/tzdata/America/Argentina/Jujuy index b6a57d4..4f95f8a 100644 --- a/library/tzdata/America/Argentina/Jujuy +++ b/library/tzdata/America/Argentina/Jujuy @@ -63,187 +63,5 @@ set TZData(:America/Argentina/Jujuy) { {952056000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} - {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {1224295200 -10800 0 ART} } diff --git a/library/tzdata/America/Argentina/La_Rioja b/library/tzdata/America/Argentina/La_Rioja index a9b9bd8..835e29d 100644 --- a/library/tzdata/America/Argentina/La_Rioja +++ b/library/tzdata/America/Argentina/La_Rioja @@ -65,187 +65,5 @@ set TZData(:America/Argentina/La_Rioja) { {1087704000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} - {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {1224295200 -10800 0 ART} } diff --git a/library/tzdata/America/Argentina/Mendoza b/library/tzdata/America/Argentina/Mendoza index a74b660..2c6fb58 100644 --- a/library/tzdata/America/Argentina/Mendoza +++ b/library/tzdata/America/Argentina/Mendoza @@ -64,187 +64,5 @@ set TZData(:America/Argentina/Mendoza) { {1096171200 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} - {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {1224295200 -10800 0 ART} } diff --git a/library/tzdata/America/Argentina/Rio_Gallegos b/library/tzdata/America/Argentina/Rio_Gallegos index 83089d3..91d37dd 100644 --- a/library/tzdata/America/Argentina/Rio_Gallegos +++ b/library/tzdata/America/Argentina/Rio_Gallegos @@ -64,187 +64,5 @@ set TZData(:America/Argentina/Rio_Gallegos) { {1087704000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} - {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {1224295200 -10800 0 ART} } diff --git a/library/tzdata/America/Argentina/Salta b/library/tzdata/America/Argentina/Salta new file mode 100644 index 0000000..a5a7010 --- /dev/null +++ b/library/tzdata/America/Argentina/Salta @@ -0,0 +1,66 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:America/Argentina/Salta) { + {-9223372036854775808 -15700 0 LMT} + {-2372096300 -15408 0 CMT} + {-1567453392 -14400 0 ART} + {-1233432000 -10800 0 ARST} + {-1222981200 -14400 0 ART} + {-1205956800 -10800 1 ARST} + {-1194037200 -14400 0 ART} + {-1172865600 -10800 1 ARST} + {-1162501200 -14400 0 ART} + {-1141329600 -10800 1 ARST} + {-1130965200 -14400 0 ART} + {-1109793600 -10800 1 ARST} + {-1099429200 -14400 0 ART} + {-1078257600 -10800 1 ARST} + {-1067806800 -14400 0 ART} + {-1046635200 -10800 1 ARST} + {-1036270800 -14400 0 ART} + {-1015099200 -10800 1 ARST} + {-1004734800 -14400 0 ART} + {-983563200 -10800 1 ARST} + {-973198800 -14400 0 ART} + {-952027200 -10800 1 ARST} + {-941576400 -14400 0 ART} + {-931032000 -10800 1 ARST} + {-900882000 -14400 0 ART} + {-890337600 -10800 1 ARST} + {-833749200 -14400 0 ART} + {-827265600 -10800 1 ARST} + {-752274000 -14400 0 ART} + {-733780800 -10800 1 ARST} + {-197326800 -14400 0 ART} + {-190843200 -10800 1 ARST} + {-184194000 -14400 0 ART} + {-164491200 -10800 1 ARST} + {-152658000 -14400 0 ART} + {-132955200 -10800 1 ARST} + {-121122000 -14400 0 ART} + {-101419200 -10800 1 ARST} + {-86821200 -14400 0 ART} + {-71092800 -10800 1 ARST} + {-54766800 -14400 0 ART} + {-39038400 -10800 1 ARST} + {-23317200 -14400 0 ART} + {-7588800 -10800 0 ART} + {128142000 -7200 1 ARST} + {136605600 -10800 0 ART} + {596948400 -7200 1 ARST} + {605066400 -10800 0 ART} + {624423600 -7200 1 ARST} + {636516000 -10800 0 ART} + {656478000 -7200 1 ARST} + {667965600 -14400 0 WART} + {687931200 -7200 0 ARST} + {699415200 -10800 0 ART} + {719377200 -7200 1 ARST} + {731469600 -10800 0 ART} + {938916000 -10800 0 ART} + {938919600 -10800 1 ARST} + {952056000 -10800 0 ART} + {1198983600 -7200 1 ARST} + {1205632800 -10800 0 ART} + {1224295200 -10800 0 ART} +} diff --git a/library/tzdata/America/Argentina/San_Juan b/library/tzdata/America/Argentina/San_Juan index 784bc24..417e234 100644 --- a/library/tzdata/America/Argentina/San_Juan +++ b/library/tzdata/America/Argentina/San_Juan @@ -65,187 +65,5 @@ set TZData(:America/Argentina/San_Juan) { {1090728000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} - {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {1224295200 -10800 0 ART} } diff --git a/library/tzdata/America/Argentina/Tucuman b/library/tzdata/America/Argentina/Tucuman index 14da17d..6d12cb6 100644 --- a/library/tzdata/America/Argentina/Tucuman +++ b/library/tzdata/America/Argentina/Tucuman @@ -64,187 +64,187 @@ set TZData(:America/Argentina/Tucuman) { {1087099200 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} + {1224385200 -7200 1 ARST} {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} + {1255834800 -7200 1 ARST} {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} + {1287284400 -7200 1 ARST} {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} + {1318734000 -7200 1 ARST} {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} + {1350788400 -7200 1 ARST} {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} + {1382238000 -7200 1 ARST} {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} + {1413687600 -7200 1 ARST} {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} + {1445137200 -7200 1 ARST} {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} + {1476586800 -7200 1 ARST} {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} + {1508036400 -7200 1 ARST} {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} + {1540090800 -7200 1 ARST} {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} + {1571540400 -7200 1 ARST} {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} + {1602990000 -7200 1 ARST} {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} + {1634439600 -7200 1 ARST} {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} + {1665889200 -7200 1 ARST} {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} + {1697338800 -7200 1 ARST} {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} + {1729393200 -7200 1 ARST} {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} + {1760842800 -7200 1 ARST} {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} + {1792292400 -7200 1 ARST} {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} + {1823742000 -7200 1 ARST} {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} + {1855191600 -7200 1 ARST} {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} + {1887246000 -7200 1 ARST} {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} + {1918695600 -7200 1 ARST} {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} + {1950145200 -7200 1 ARST} {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} + {1981594800 -7200 1 ARST} {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} + {2013044400 -7200 1 ARST} {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} + {2044494000 -7200 1 ARST} {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} + {2076548400 -7200 1 ARST} {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} + {2107998000 -7200 1 ARST} {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} + {2139447600 -7200 1 ARST} {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} + {2170897200 -7200 1 ARST} {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} + {2202346800 -7200 1 ARST} {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} + {2234401200 -7200 1 ARST} {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} + {2265850800 -7200 1 ARST} {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} + {2297300400 -7200 1 ARST} {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} + {2328750000 -7200 1 ARST} {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} + {2360199600 -7200 1 ARST} {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} + {2391649200 -7200 1 ARST} {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} + {2423703600 -7200 1 ARST} {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} + {2455153200 -7200 1 ARST} {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} + {2486602800 -7200 1 ARST} {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} + {2518052400 -7200 1 ARST} {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} + {2549502000 -7200 1 ARST} {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} + {2580951600 -7200 1 ARST} {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} + {2613006000 -7200 1 ARST} {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} + {2644455600 -7200 1 ARST} {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} + {2675905200 -7200 1 ARST} {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} + {2707354800 -7200 1 ARST} {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} + {2738804400 -7200 1 ARST} {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} + {2770858800 -7200 1 ARST} {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} + {2802308400 -7200 1 ARST} {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} + {2833758000 -7200 1 ARST} {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} + {2865207600 -7200 1 ARST} {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} + {2896657200 -7200 1 ARST} {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} + {2928106800 -7200 1 ARST} {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} + {2960161200 -7200 1 ARST} {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} + {2991610800 -7200 1 ARST} {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} + {3023060400 -7200 1 ARST} {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} + {3054510000 -7200 1 ARST} {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} + {3085959600 -7200 1 ARST} {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} + {3118014000 -7200 1 ARST} {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} + {3149463600 -7200 1 ARST} {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} + {3180913200 -7200 1 ARST} {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} + {3212362800 -7200 1 ARST} {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} + {3243812400 -7200 1 ARST} {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} + {3275262000 -7200 1 ARST} {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} + {3307316400 -7200 1 ARST} {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} + {3338766000 -7200 1 ARST} {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} + {3370215600 -7200 1 ARST} {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} + {3401665200 -7200 1 ARST} {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} + {3433114800 -7200 1 ARST} {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} + {3464564400 -7200 1 ARST} {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} + {3496618800 -7200 1 ARST} {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} + {3528068400 -7200 1 ARST} {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} + {3559518000 -7200 1 ARST} {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} + {3590967600 -7200 1 ARST} {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} + {3622417200 -7200 1 ARST} {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} + {3654471600 -7200 1 ARST} {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} + {3685921200 -7200 1 ARST} {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} + {3717370800 -7200 1 ARST} {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} + {3748820400 -7200 1 ARST} {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} + {3780270000 -7200 1 ARST} {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} + {3811719600 -7200 1 ARST} {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} + {3843774000 -7200 1 ARST} {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} + {3875223600 -7200 1 ARST} {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} + {3906673200 -7200 1 ARST} {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} + {3938122800 -7200 1 ARST} {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} + {3969572400 -7200 1 ARST} {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} + {4001626800 -7200 1 ARST} {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} + {4033076400 -7200 1 ARST} {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} + {4064526000 -7200 1 ARST} {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {4095975600 -7200 1 ARST} } diff --git a/library/tzdata/America/Argentina/Ushuaia b/library/tzdata/America/Argentina/Ushuaia index d6ce9f5..4fcf92d 100644 --- a/library/tzdata/America/Argentina/Ushuaia +++ b/library/tzdata/America/Argentina/Ushuaia @@ -64,187 +64,5 @@ set TZData(:America/Argentina/Ushuaia) { {1087704000 -10800 0 ART} {1198983600 -7200 1 ARST} {1205632800 -10800 0 ART} - {1223175600 -7200 1 ARST} - {1237082400 -10800 0 ART} - {1254625200 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1286074800 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1317524400 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1349578800 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1381028400 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1412478000 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1443927600 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1475377200 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1506826800 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1538881200 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1570330800 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1601780400 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1633230000 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1664679600 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1696129200 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1728183600 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1759633200 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1791082800 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1822532400 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1853982000 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1886036400 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1917486000 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1948935600 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1980385200 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2011834800 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2043284400 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2075338800 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2106788400 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2138238000 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2169687600 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2201137200 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2233191600 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2264641200 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2296090800 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2327540400 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2358990000 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2390439600 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2422494000 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2453943600 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2485393200 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2516842800 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2548292400 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2579742000 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2611796400 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2643246000 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2674695600 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2706145200 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2737594800 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2769649200 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2801098800 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2832548400 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2863998000 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2895447600 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2926897200 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2958951600 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2990401200 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3021850800 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3053300400 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3084750000 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3116804400 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3148254000 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3179703600 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3211153200 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3242602800 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3274052400 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3306106800 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3337556400 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3369006000 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3400455600 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3431905200 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3463354800 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3495409200 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3526858800 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3558308400 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3589758000 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3621207600 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3653262000 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3684711600 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3716161200 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3747610800 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3779060400 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3810510000 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3842564400 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3874014000 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3905463600 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3936913200 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3968362800 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4000417200 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4031866800 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4063316400 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4094766000 -7200 1 ARST} + {1224295200 -10800 0 ART} } diff --git a/library/tzdata/America/Campo_Grande b/library/tzdata/America/Campo_Grande index ced6197..2cafe14 100644 --- a/library/tzdata/America/Campo_Grande +++ b/library/tzdata/America/Campo_Grande @@ -71,187 +71,187 @@ set TZData(:America/Campo_Grande) { {1172372400 -14400 0 AMT} {1192334400 -10800 1 AMST} {1203217200 -14400 0 AMT} - {1223784000 -10800 1 AMST} + {1224388800 -10800 1 AMST} {1234666800 -14400 0 AMT} - {1255233600 -10800 1 AMST} + {1255838400 -10800 1 AMST} {1266721200 -14400 0 AMT} - {1286683200 -10800 1 AMST} + {1287288000 -10800 1 AMST} {1298170800 -14400 0 AMT} - {1318132800 -10800 1 AMST} - {1329620400 -14400 0 AMT} - {1350187200 -10800 1 AMST} + {1318737600 -10800 1 AMST} + {1330225200 -14400 0 AMT} + {1350792000 -10800 1 AMST} {1361070000 -14400 0 AMT} - {1381636800 -10800 1 AMST} + {1382241600 -10800 1 AMST} {1392519600 -14400 0 AMT} - {1413086400 -10800 1 AMST} - {1423969200 -14400 0 AMT} - {1444536000 -10800 1 AMST} + {1413691200 -10800 1 AMST} + {1424574000 -14400 0 AMT} + {1445140800 -10800 1 AMST} {1456023600 -14400 0 AMT} - {1475985600 -10800 1 AMST} + {1476590400 -10800 1 AMST} {1487473200 -14400 0 AMT} - {1507435200 -10800 1 AMST} + {1508040000 -10800 1 AMST} {1518922800 -14400 0 AMT} - {1539489600 -10800 1 AMST} + {1540094400 -10800 1 AMST} {1550372400 -14400 0 AMT} - {1570939200 -10800 1 AMST} + {1571544000 -10800 1 AMST} {1581822000 -14400 0 AMT} - {1602388800 -10800 1 AMST} + {1602993600 -10800 1 AMST} {1613876400 -14400 0 AMT} - {1633838400 -10800 1 AMST} + {1634443200 -10800 1 AMST} {1645326000 -14400 0 AMT} - {1665288000 -10800 1 AMST} - {1676775600 -14400 0 AMT} - {1696737600 -10800 1 AMST} + {1665892800 -10800 1 AMST} + {1677380400 -14400 0 AMT} + {1697342400 -10800 1 AMST} {1708225200 -14400 0 AMT} - {1728792000 -10800 1 AMST} + {1729396800 -10800 1 AMST} {1739674800 -14400 0 AMT} - {1760241600 -10800 1 AMST} - {1771124400 -14400 0 AMT} - {1791691200 -10800 1 AMST} + {1760846400 -10800 1 AMST} + {1771729200 -14400 0 AMT} + {1792296000 -10800 1 AMST} {1803178800 -14400 0 AMT} - {1823140800 -10800 1 AMST} + {1823745600 -10800 1 AMST} {1834628400 -14400 0 AMT} - {1854590400 -10800 1 AMST} + {1855195200 -10800 1 AMST} {1866078000 -14400 0 AMT} - {1886644800 -10800 1 AMST} + {1887249600 -10800 1 AMST} {1897527600 -14400 0 AMT} - {1918094400 -10800 1 AMST} + {1918699200 -10800 1 AMST} {1928977200 -14400 0 AMT} - {1949544000 -10800 1 AMST} + {1950148800 -10800 1 AMST} {1960426800 -14400 0 AMT} - {1980993600 -10800 1 AMST} + {1981598400 -10800 1 AMST} {1992481200 -14400 0 AMT} - {2012443200 -10800 1 AMST} - {2023930800 -14400 0 AMT} - {2043892800 -10800 1 AMST} + {2013048000 -10800 1 AMST} + {2024535600 -14400 0 AMT} + {2044497600 -10800 1 AMST} {2055380400 -14400 0 AMT} - {2075947200 -10800 1 AMST} + {2076552000 -10800 1 AMST} {2086830000 -14400 0 AMT} - {2107396800 -10800 1 AMST} - {2118279600 -14400 0 AMT} - {2138846400 -10800 1 AMST} + {2108001600 -10800 1 AMST} + {2118884400 -14400 0 AMT} + {2139451200 -10800 1 AMST} {2150334000 -14400 0 AMT} - {2170296000 -10800 1 AMST} + {2170900800 -10800 1 AMST} {2181783600 -14400 0 AMT} - {2201745600 -10800 1 AMST} + {2202350400 -10800 1 AMST} {2213233200 -14400 0 AMT} - {2233800000 -10800 1 AMST} + {2234404800 -10800 1 AMST} {2244682800 -14400 0 AMT} - {2265249600 -10800 1 AMST} + {2265854400 -10800 1 AMST} {2276132400 -14400 0 AMT} - {2296699200 -10800 1 AMST} + {2297304000 -10800 1 AMST} {2307582000 -14400 0 AMT} - {2328148800 -10800 1 AMST} + {2328753600 -10800 1 AMST} {2339636400 -14400 0 AMT} - {2359598400 -10800 1 AMST} + {2360203200 -10800 1 AMST} {2371086000 -14400 0 AMT} - {2391048000 -10800 1 AMST} + {2391652800 -10800 1 AMST} {2402535600 -14400 0 AMT} - {2423102400 -10800 1 AMST} + {2423707200 -10800 1 AMST} {2433985200 -14400 0 AMT} - {2454552000 -10800 1 AMST} + {2455156800 -10800 1 AMST} {2465434800 -14400 0 AMT} - {2486001600 -10800 1 AMST} + {2486606400 -10800 1 AMST} {2497489200 -14400 0 AMT} - {2517451200 -10800 1 AMST} + {2518056000 -10800 1 AMST} {2528938800 -14400 0 AMT} - {2548900800 -10800 1 AMST} + {2549505600 -10800 1 AMST} {2560388400 -14400 0 AMT} - {2580350400 -10800 1 AMST} + {2580955200 -10800 1 AMST} {2591838000 -14400 0 AMT} - {2612404800 -10800 1 AMST} + {2613009600 -10800 1 AMST} {2623287600 -14400 0 AMT} - {2643854400 -10800 1 AMST} + {2644459200 -10800 1 AMST} {2654737200 -14400 0 AMT} - {2675304000 -10800 1 AMST} + {2675908800 -10800 1 AMST} {2686791600 -14400 0 AMT} - {2706753600 -10800 1 AMST} + {2707358400 -10800 1 AMST} {2718241200 -14400 0 AMT} - {2738203200 -10800 1 AMST} + {2738808000 -10800 1 AMST} {2749690800 -14400 0 AMT} - {2770257600 -10800 1 AMST} + {2770862400 -10800 1 AMST} {2781140400 -14400 0 AMT} - {2801707200 -10800 1 AMST} + {2802312000 -10800 1 AMST} {2812590000 -14400 0 AMT} - {2833156800 -10800 1 AMST} + {2833761600 -10800 1 AMST} {2844039600 -14400 0 AMT} - {2864606400 -10800 1 AMST} + {2865211200 -10800 1 AMST} {2876094000 -14400 0 AMT} - {2896056000 -10800 1 AMST} + {2896660800 -10800 1 AMST} {2907543600 -14400 0 AMT} - {2927505600 -10800 1 AMST} + {2928110400 -10800 1 AMST} {2938993200 -14400 0 AMT} - {2959560000 -10800 1 AMST} + {2960164800 -10800 1 AMST} {2970442800 -14400 0 AMT} - {2991009600 -10800 1 AMST} + {2991614400 -10800 1 AMST} {3001892400 -14400 0 AMT} - {3022459200 -10800 1 AMST} + {3023064000 -10800 1 AMST} {3033946800 -14400 0 AMT} - {3053908800 -10800 1 AMST} + {3054513600 -10800 1 AMST} {3065396400 -14400 0 AMT} - {3085358400 -10800 1 AMST} + {3085963200 -10800 1 AMST} {3096846000 -14400 0 AMT} - {3117412800 -10800 1 AMST} + {3118017600 -10800 1 AMST} {3128295600 -14400 0 AMT} - {3148862400 -10800 1 AMST} + {3149467200 -10800 1 AMST} {3159745200 -14400 0 AMT} - {3180312000 -10800 1 AMST} + {3180916800 -10800 1 AMST} {3191194800 -14400 0 AMT} - {3211761600 -10800 1 AMST} + {3212366400 -10800 1 AMST} {3223249200 -14400 0 AMT} - {3243211200 -10800 1 AMST} + {3243816000 -10800 1 AMST} {3254698800 -14400 0 AMT} - {3274660800 -10800 1 AMST} + {3275265600 -10800 1 AMST} {3286148400 -14400 0 AMT} - {3306715200 -10800 1 AMST} + {3307320000 -10800 1 AMST} {3317598000 -14400 0 AMT} - {3338164800 -10800 1 AMST} + {3338769600 -10800 1 AMST} {3349047600 -14400 0 AMT} - {3369614400 -10800 1 AMST} + {3370219200 -10800 1 AMST} {3381102000 -14400 0 AMT} - {3401064000 -10800 1 AMST} + {3401668800 -10800 1 AMST} {3412551600 -14400 0 AMT} - {3432513600 -10800 1 AMST} + {3433118400 -10800 1 AMST} {3444001200 -14400 0 AMT} - {3463963200 -10800 1 AMST} + {3464568000 -10800 1 AMST} {3475450800 -14400 0 AMT} - {3496017600 -10800 1 AMST} + {3496622400 -10800 1 AMST} {3506900400 -14400 0 AMT} - {3527467200 -10800 1 AMST} + {3528072000 -10800 1 AMST} {3538350000 -14400 0 AMT} - {3558916800 -10800 1 AMST} + {3559521600 -10800 1 AMST} {3570404400 -14400 0 AMT} - {3590366400 -10800 1 AMST} + {3590971200 -10800 1 AMST} {3601854000 -14400 0 AMT} - {3621816000 -10800 1 AMST} + {3622420800 -10800 1 AMST} {3633303600 -14400 0 AMT} - {3653870400 -10800 1 AMST} + {3654475200 -10800 1 AMST} {3664753200 -14400 0 AMT} - {3685320000 -10800 1 AMST} + {3685924800 -10800 1 AMST} {3696202800 -14400 0 AMT} - {3716769600 -10800 1 AMST} + {3717374400 -10800 1 AMST} {3727652400 -14400 0 AMT} - {3748219200 -10800 1 AMST} + {3748824000 -10800 1 AMST} {3759706800 -14400 0 AMT} - {3779668800 -10800 1 AMST} + {3780273600 -10800 1 AMST} {3791156400 -14400 0 AMT} - {3811118400 -10800 1 AMST} + {3811723200 -10800 1 AMST} {3822606000 -14400 0 AMT} - {3843172800 -10800 1 AMST} + {3843777600 -10800 1 AMST} {3854055600 -14400 0 AMT} - {3874622400 -10800 1 AMST} + {3875227200 -10800 1 AMST} {3885505200 -14400 0 AMT} - {3906072000 -10800 1 AMST} + {3906676800 -10800 1 AMST} {3917559600 -14400 0 AMT} - {3937521600 -10800 1 AMST} + {3938126400 -10800 1 AMST} {3949009200 -14400 0 AMT} - {3968971200 -10800 1 AMST} + {3969576000 -10800 1 AMST} {3980458800 -14400 0 AMT} - {4001025600 -10800 1 AMST} + {4001630400 -10800 1 AMST} {4011908400 -14400 0 AMT} - {4032475200 -10800 1 AMST} + {4033080000 -10800 1 AMST} {4043358000 -14400 0 AMT} - {4063924800 -10800 1 AMST} + {4064529600 -10800 1 AMST} {4074807600 -14400 0 AMT} - {4095374400 -10800 1 AMST} + {4095979200 -10800 1 AMST} } diff --git a/library/tzdata/America/Cuiaba b/library/tzdata/America/Cuiaba index fb63ee8..0301862 100644 --- a/library/tzdata/America/Cuiaba +++ b/library/tzdata/America/Cuiaba @@ -71,187 +71,187 @@ set TZData(:America/Cuiaba) { {1172372400 -14400 0 AMT} {1192334400 -10800 1 AMST} {1203217200 -14400 0 AMT} - {1223784000 -10800 1 AMST} + {1224388800 -10800 1 AMST} {1234666800 -14400 0 AMT} - {1255233600 -10800 1 AMST} + {1255838400 -10800 1 AMST} {1266721200 -14400 0 AMT} - {1286683200 -10800 1 AMST} + {1287288000 -10800 1 AMST} {1298170800 -14400 0 AMT} - {1318132800 -10800 1 AMST} - {1329620400 -14400 0 AMT} - {1350187200 -10800 1 AMST} + {1318737600 -10800 1 AMST} + {1330225200 -14400 0 AMT} + {1350792000 -10800 1 AMST} {1361070000 -14400 0 AMT} - {1381636800 -10800 1 AMST} + {1382241600 -10800 1 AMST} {1392519600 -14400 0 AMT} - {1413086400 -10800 1 AMST} - {1423969200 -14400 0 AMT} - {1444536000 -10800 1 AMST} + {1413691200 -10800 1 AMST} + {1424574000 -14400 0 AMT} + {1445140800 -10800 1 AMST} {1456023600 -14400 0 AMT} - {1475985600 -10800 1 AMST} + {1476590400 -10800 1 AMST} {1487473200 -14400 0 AMT} - {1507435200 -10800 1 AMST} + {1508040000 -10800 1 AMST} {1518922800 -14400 0 AMT} - {1539489600 -10800 1 AMST} + {1540094400 -10800 1 AMST} {1550372400 -14400 0 AMT} - {1570939200 -10800 1 AMST} + {1571544000 -10800 1 AMST} {1581822000 -14400 0 AMT} - {1602388800 -10800 1 AMST} + {1602993600 -10800 1 AMST} {1613876400 -14400 0 AMT} - {1633838400 -10800 1 AMST} + {1634443200 -10800 1 AMST} {1645326000 -14400 0 AMT} - {1665288000 -10800 1 AMST} - {1676775600 -14400 0 AMT} - {1696737600 -10800 1 AMST} + {1665892800 -10800 1 AMST} + {1677380400 -14400 0 AMT} + {1697342400 -10800 1 AMST} {1708225200 -14400 0 AMT} - {1728792000 -10800 1 AMST} + {1729396800 -10800 1 AMST} {1739674800 -14400 0 AMT} - {1760241600 -10800 1 AMST} - {1771124400 -14400 0 AMT} - {1791691200 -10800 1 AMST} + {1760846400 -10800 1 AMST} + {1771729200 -14400 0 AMT} + {1792296000 -10800 1 AMST} {1803178800 -14400 0 AMT} - {1823140800 -10800 1 AMST} + {1823745600 -10800 1 AMST} {1834628400 -14400 0 AMT} - {1854590400 -10800 1 AMST} + {1855195200 -10800 1 AMST} {1866078000 -14400 0 AMT} - {1886644800 -10800 1 AMST} + {1887249600 -10800 1 AMST} {1897527600 -14400 0 AMT} - {1918094400 -10800 1 AMST} + {1918699200 -10800 1 AMST} {1928977200 -14400 0 AMT} - {1949544000 -10800 1 AMST} + {1950148800 -10800 1 AMST} {1960426800 -14400 0 AMT} - {1980993600 -10800 1 AMST} + {1981598400 -10800 1 AMST} {1992481200 -14400 0 AMT} - {2012443200 -10800 1 AMST} - {2023930800 -14400 0 AMT} - {2043892800 -10800 1 AMST} + {2013048000 -10800 1 AMST} + {2024535600 -14400 0 AMT} + {2044497600 -10800 1 AMST} {2055380400 -14400 0 AMT} - {2075947200 -10800 1 AMST} + {2076552000 -10800 1 AMST} {2086830000 -14400 0 AMT} - {2107396800 -10800 1 AMST} - {2118279600 -14400 0 AMT} - {2138846400 -10800 1 AMST} + {2108001600 -10800 1 AMST} + {2118884400 -14400 0 AMT} + {2139451200 -10800 1 AMST} {2150334000 -14400 0 AMT} - {2170296000 -10800 1 AMST} + {2170900800 -10800 1 AMST} {2181783600 -14400 0 AMT} - {2201745600 -10800 1 AMST} + {2202350400 -10800 1 AMST} {2213233200 -14400 0 AMT} - {2233800000 -10800 1 AMST} + {2234404800 -10800 1 AMST} {2244682800 -14400 0 AMT} - {2265249600 -10800 1 AMST} + {2265854400 -10800 1 AMST} {2276132400 -14400 0 AMT} - {2296699200 -10800 1 AMST} + {2297304000 -10800 1 AMST} {2307582000 -14400 0 AMT} - {2328148800 -10800 1 AMST} + {2328753600 -10800 1 AMST} {2339636400 -14400 0 AMT} - {2359598400 -10800 1 AMST} + {2360203200 -10800 1 AMST} {2371086000 -14400 0 AMT} - {2391048000 -10800 1 AMST} + {2391652800 -10800 1 AMST} {2402535600 -14400 0 AMT} - {2423102400 -10800 1 AMST} + {2423707200 -10800 1 AMST} {2433985200 -14400 0 AMT} - {2454552000 -10800 1 AMST} + {2455156800 -10800 1 AMST} {2465434800 -14400 0 AMT} - {2486001600 -10800 1 AMST} + {2486606400 -10800 1 AMST} {2497489200 -14400 0 AMT} - {2517451200 -10800 1 AMST} + {2518056000 -10800 1 AMST} {2528938800 -14400 0 AMT} - {2548900800 -10800 1 AMST} + {2549505600 -10800 1 AMST} {2560388400 -14400 0 AMT} - {2580350400 -10800 1 AMST} + {2580955200 -10800 1 AMST} {2591838000 -14400 0 AMT} - {2612404800 -10800 1 AMST} + {2613009600 -10800 1 AMST} {2623287600 -14400 0 AMT} - {2643854400 -10800 1 AMST} + {2644459200 -10800 1 AMST} {2654737200 -14400 0 AMT} - {2675304000 -10800 1 AMST} + {2675908800 -10800 1 AMST} {2686791600 -14400 0 AMT} - {2706753600 -10800 1 AMST} + {2707358400 -10800 1 AMST} {2718241200 -14400 0 AMT} - {2738203200 -10800 1 AMST} + {2738808000 -10800 1 AMST} {2749690800 -14400 0 AMT} - {2770257600 -10800 1 AMST} + {2770862400 -10800 1 AMST} {2781140400 -14400 0 AMT} - {2801707200 -10800 1 AMST} + {2802312000 -10800 1 AMST} {2812590000 -14400 0 AMT} - {2833156800 -10800 1 AMST} + {2833761600 -10800 1 AMST} {2844039600 -14400 0 AMT} - {2864606400 -10800 1 AMST} + {2865211200 -10800 1 AMST} {2876094000 -14400 0 AMT} - {2896056000 -10800 1 AMST} + {2896660800 -10800 1 AMST} {2907543600 -14400 0 AMT} - {2927505600 -10800 1 AMST} + {2928110400 -10800 1 AMST} {2938993200 -14400 0 AMT} - {2959560000 -10800 1 AMST} + {2960164800 -10800 1 AMST} {2970442800 -14400 0 AMT} - {2991009600 -10800 1 AMST} + {2991614400 -10800 1 AMST} {3001892400 -14400 0 AMT} - {3022459200 -10800 1 AMST} + {3023064000 -10800 1 AMST} {3033946800 -14400 0 AMT} - {3053908800 -10800 1 AMST} + {3054513600 -10800 1 AMST} {3065396400 -14400 0 AMT} - {3085358400 -10800 1 AMST} + {3085963200 -10800 1 AMST} {3096846000 -14400 0 AMT} - {3117412800 -10800 1 AMST} + {3118017600 -10800 1 AMST} {3128295600 -14400 0 AMT} - {3148862400 -10800 1 AMST} + {3149467200 -10800 1 AMST} {3159745200 -14400 0 AMT} - {3180312000 -10800 1 AMST} + {3180916800 -10800 1 AMST} {3191194800 -14400 0 AMT} - {3211761600 -10800 1 AMST} + {3212366400 -10800 1 AMST} {3223249200 -14400 0 AMT} - {3243211200 -10800 1 AMST} + {3243816000 -10800 1 AMST} {3254698800 -14400 0 AMT} - {3274660800 -10800 1 AMST} + {3275265600 -10800 1 AMST} {3286148400 -14400 0 AMT} - {3306715200 -10800 1 AMST} + {3307320000 -10800 1 AMST} {3317598000 -14400 0 AMT} - {3338164800 -10800 1 AMST} + {3338769600 -10800 1 AMST} {3349047600 -14400 0 AMT} - {3369614400 -10800 1 AMST} + {3370219200 -10800 1 AMST} {3381102000 -14400 0 AMT} - {3401064000 -10800 1 AMST} + {3401668800 -10800 1 AMST} {3412551600 -14400 0 AMT} - {3432513600 -10800 1 AMST} + {3433118400 -10800 1 AMST} {3444001200 -14400 0 AMT} - {3463963200 -10800 1 AMST} + {3464568000 -10800 1 AMST} {3475450800 -14400 0 AMT} - {3496017600 -10800 1 AMST} + {3496622400 -10800 1 AMST} {3506900400 -14400 0 AMT} - {3527467200 -10800 1 AMST} + {3528072000 -10800 1 AMST} {3538350000 -14400 0 AMT} - {3558916800 -10800 1 AMST} + {3559521600 -10800 1 AMST} {3570404400 -14400 0 AMT} - {3590366400 -10800 1 AMST} + {3590971200 -10800 1 AMST} {3601854000 -14400 0 AMT} - {3621816000 -10800 1 AMST} + {3622420800 -10800 1 AMST} {3633303600 -14400 0 AMT} - {3653870400 -10800 1 AMST} + {3654475200 -10800 1 AMST} {3664753200 -14400 0 AMT} - {3685320000 -10800 1 AMST} + {3685924800 -10800 1 AMST} {3696202800 -14400 0 AMT} - {3716769600 -10800 1 AMST} + {3717374400 -10800 1 AMST} {3727652400 -14400 0 AMT} - {3748219200 -10800 1 AMST} + {3748824000 -10800 1 AMST} {3759706800 -14400 0 AMT} - {3779668800 -10800 1 AMST} + {3780273600 -10800 1 AMST} {3791156400 -14400 0 AMT} - {3811118400 -10800 1 AMST} + {3811723200 -10800 1 AMST} {3822606000 -14400 0 AMT} - {3843172800 -10800 1 AMST} + {3843777600 -10800 1 AMST} {3854055600 -14400 0 AMT} - {3874622400 -10800 1 AMST} + {3875227200 -10800 1 AMST} {3885505200 -14400 0 AMT} - {3906072000 -10800 1 AMST} + {3906676800 -10800 1 AMST} {3917559600 -14400 0 AMT} - {3937521600 -10800 1 AMST} + {3938126400 -10800 1 AMST} {3949009200 -14400 0 AMT} - {3968971200 -10800 1 AMST} + {3969576000 -10800 1 AMST} {3980458800 -14400 0 AMT} - {4001025600 -10800 1 AMST} + {4001630400 -10800 1 AMST} {4011908400 -14400 0 AMT} - {4032475200 -10800 1 AMST} + {4033080000 -10800 1 AMST} {4043358000 -14400 0 AMT} - {4063924800 -10800 1 AMST} + {4064529600 -10800 1 AMST} {4074807600 -14400 0 AMT} - {4095374400 -10800 1 AMST} + {4095979200 -10800 1 AMST} } diff --git a/library/tzdata/America/Sao_Paulo b/library/tzdata/America/Sao_Paulo index 2f07b61..8d70063 100644 --- a/library/tzdata/America/Sao_Paulo +++ b/library/tzdata/America/Sao_Paulo @@ -72,187 +72,187 @@ set TZData(:America/Sao_Paulo) { {1172368800 -10800 0 BRT} {1192330800 -7200 1 BRST} {1203213600 -10800 0 BRT} - {1223780400 -7200 1 BRST} + {1224385200 -7200 1 BRST} {1234663200 -10800 0 BRT} - {1255230000 -7200 1 BRST} + {1255834800 -7200 1 BRST} {1266717600 -10800 0 BRT} - {1286679600 -7200 1 BRST} + {1287284400 -7200 1 BRST} {1298167200 -10800 0 BRT} - {1318129200 -7200 1 BRST} - {1329616800 -10800 0 BRT} - {1350183600 -7200 1 BRST} + {1318734000 -7200 1 BRST} + {1330221600 -10800 0 BRT} + {1350788400 -7200 1 BRST} {1361066400 -10800 0 BRT} - {1381633200 -7200 1 BRST} + {1382238000 -7200 1 BRST} {1392516000 -10800 0 BRT} - {1413082800 -7200 1 BRST} - {1423965600 -10800 0 BRT} - {1444532400 -7200 1 BRST} + {1413687600 -7200 1 BRST} + {1424570400 -10800 0 BRT} + {1445137200 -7200 1 BRST} {1456020000 -10800 0 BRT} - {1475982000 -7200 1 BRST} + {1476586800 -7200 1 BRST} {1487469600 -10800 0 BRT} - {1507431600 -7200 1 BRST} + {1508036400 -7200 1 BRST} {1518919200 -10800 0 BRT} - {1539486000 -7200 1 BRST} + {1540090800 -7200 1 BRST} {1550368800 -10800 0 BRT} - {1570935600 -7200 1 BRST} + {1571540400 -7200 1 BRST} {1581818400 -10800 0 BRT} - {1602385200 -7200 1 BRST} + {1602990000 -7200 1 BRST} {1613872800 -10800 0 BRT} - {1633834800 -7200 1 BRST} + {1634439600 -7200 1 BRST} {1645322400 -10800 0 BRT} - {1665284400 -7200 1 BRST} - {1676772000 -10800 0 BRT} - {1696734000 -7200 1 BRST} + {1665889200 -7200 1 BRST} + {1677376800 -10800 0 BRT} + {1697338800 -7200 1 BRST} {1708221600 -10800 0 BRT} - {1728788400 -7200 1 BRST} + {1729393200 -7200 1 BRST} {1739671200 -10800 0 BRT} - {1760238000 -7200 1 BRST} - {1771120800 -10800 0 BRT} - {1791687600 -7200 1 BRST} + {1760842800 -7200 1 BRST} + {1771725600 -10800 0 BRT} + {1792292400 -7200 1 BRST} {1803175200 -10800 0 BRT} - {1823137200 -7200 1 BRST} + {1823742000 -7200 1 BRST} {1834624800 -10800 0 BRT} - {1854586800 -7200 1 BRST} + {1855191600 -7200 1 BRST} {1866074400 -10800 0 BRT} - {1886641200 -7200 1 BRST} + {1887246000 -7200 1 BRST} {1897524000 -10800 0 BRT} - {1918090800 -7200 1 BRST} + {1918695600 -7200 1 BRST} {1928973600 -10800 0 BRT} - {1949540400 -7200 1 BRST} + {1950145200 -7200 1 BRST} {1960423200 -10800 0 BRT} - {1980990000 -7200 1 BRST} + {1981594800 -7200 1 BRST} {1992477600 -10800 0 BRT} - {2012439600 -7200 1 BRST} - {2023927200 -10800 0 BRT} - {2043889200 -7200 1 BRST} + {2013044400 -7200 1 BRST} + {2024532000 -10800 0 BRT} + {2044494000 -7200 1 BRST} {2055376800 -10800 0 BRT} - {2075943600 -7200 1 BRST} + {2076548400 -7200 1 BRST} {2086826400 -10800 0 BRT} - {2107393200 -7200 1 BRST} - {2118276000 -10800 0 BRT} - {2138842800 -7200 1 BRST} + {2107998000 -7200 1 BRST} + {2118880800 -10800 0 BRT} + {2139447600 -7200 1 BRST} {2150330400 -10800 0 BRT} - {2170292400 -7200 1 BRST} + {2170897200 -7200 1 BRST} {2181780000 -10800 0 BRT} - {2201742000 -7200 1 BRST} + {2202346800 -7200 1 BRST} {2213229600 -10800 0 BRT} - {2233796400 -7200 1 BRST} + {2234401200 -7200 1 BRST} {2244679200 -10800 0 BRT} - {2265246000 -7200 1 BRST} + {2265850800 -7200 1 BRST} {2276128800 -10800 0 BRT} - {2296695600 -7200 1 BRST} + {2297300400 -7200 1 BRST} {2307578400 -10800 0 BRT} - {2328145200 -7200 1 BRST} + {2328750000 -7200 1 BRST} {2339632800 -10800 0 BRT} - {2359594800 -7200 1 BRST} + {2360199600 -7200 1 BRST} {2371082400 -10800 0 BRT} - {2391044400 -7200 1 BRST} + {2391649200 -7200 1 BRST} {2402532000 -10800 0 BRT} - {2423098800 -7200 1 BRST} + {2423703600 -7200 1 BRST} {2433981600 -10800 0 BRT} - {2454548400 -7200 1 BRST} + {2455153200 -7200 1 BRST} {2465431200 -10800 0 BRT} - {2485998000 -7200 1 BRST} + {2486602800 -7200 1 BRST} {2497485600 -10800 0 BRT} - {2517447600 -7200 1 BRST} + {2518052400 -7200 1 BRST} {2528935200 -10800 0 BRT} - {2548897200 -7200 1 BRST} + {2549502000 -7200 1 BRST} {2560384800 -10800 0 BRT} - {2580346800 -7200 1 BRST} + {2580951600 -7200 1 BRST} {2591834400 -10800 0 BRT} - {2612401200 -7200 1 BRST} + {2613006000 -7200 1 BRST} {2623284000 -10800 0 BRT} - {2643850800 -7200 1 BRST} + {2644455600 -7200 1 BRST} {2654733600 -10800 0 BRT} - {2675300400 -7200 1 BRST} + {2675905200 -7200 1 BRST} {2686788000 -10800 0 BRT} - {2706750000 -7200 1 BRST} + {2707354800 -7200 1 BRST} {2718237600 -10800 0 BRT} - {2738199600 -7200 1 BRST} + {2738804400 -7200 1 BRST} {2749687200 -10800 0 BRT} - {2770254000 -7200 1 BRST} + {2770858800 -7200 1 BRST} {2781136800 -10800 0 BRT} - {2801703600 -7200 1 BRST} + {2802308400 -7200 1 BRST} {2812586400 -10800 0 BRT} - {2833153200 -7200 1 BRST} + {2833758000 -7200 1 BRST} {2844036000 -10800 0 BRT} - {2864602800 -7200 1 BRST} + {2865207600 -7200 1 BRST} {2876090400 -10800 0 BRT} - {2896052400 -7200 1 BRST} + {2896657200 -7200 1 BRST} {2907540000 -10800 0 BRT} - {2927502000 -7200 1 BRST} + {2928106800 -7200 1 BRST} {2938989600 -10800 0 BRT} - {2959556400 -7200 1 BRST} + {2960161200 -7200 1 BRST} {2970439200 -10800 0 BRT} - {2991006000 -7200 1 BRST} + {2991610800 -7200 1 BRST} {3001888800 -10800 0 BRT} - {3022455600 -7200 1 BRST} + {3023060400 -7200 1 BRST} {3033943200 -10800 0 BRT} - {3053905200 -7200 1 BRST} + {3054510000 -7200 1 BRST} {3065392800 -10800 0 BRT} - {3085354800 -7200 1 BRST} + {3085959600 -7200 1 BRST} {3096842400 -10800 0 BRT} - {3117409200 -7200 1 BRST} + {3118014000 -7200 1 BRST} {3128292000 -10800 0 BRT} - {3148858800 -7200 1 BRST} + {3149463600 -7200 1 BRST} {3159741600 -10800 0 BRT} - {3180308400 -7200 1 BRST} + {3180913200 -7200 1 BRST} {3191191200 -10800 0 BRT} - {3211758000 -7200 1 BRST} + {3212362800 -7200 1 BRST} {3223245600 -10800 0 BRT} - {3243207600 -7200 1 BRST} + {3243812400 -7200 1 BRST} {3254695200 -10800 0 BRT} - {3274657200 -7200 1 BRST} + {3275262000 -7200 1 BRST} {3286144800 -10800 0 BRT} - {3306711600 -7200 1 BRST} + {3307316400 -7200 1 BRST} {3317594400 -10800 0 BRT} - {3338161200 -7200 1 BRST} + {3338766000 -7200 1 BRST} {3349044000 -10800 0 BRT} - {3369610800 -7200 1 BRST} + {3370215600 -7200 1 BRST} {3381098400 -10800 0 BRT} - {3401060400 -7200 1 BRST} + {3401665200 -7200 1 BRST} {3412548000 -10800 0 BRT} - {3432510000 -7200 1 BRST} + {3433114800 -7200 1 BRST} {3443997600 -10800 0 BRT} - {3463959600 -7200 1 BRST} + {3464564400 -7200 1 BRST} {3475447200 -10800 0 BRT} - {3496014000 -7200 1 BRST} + {3496618800 -7200 1 BRST} {3506896800 -10800 0 BRT} - {3527463600 -7200 1 BRST} + {3528068400 -7200 1 BRST} {3538346400 -10800 0 BRT} - {3558913200 -7200 1 BRST} + {3559518000 -7200 1 BRST} {3570400800 -10800 0 BRT} - {3590362800 -7200 1 BRST} + {3590967600 -7200 1 BRST} {3601850400 -10800 0 BRT} - {3621812400 -7200 1 BRST} + {3622417200 -7200 1 BRST} {3633300000 -10800 0 BRT} - {3653866800 -7200 1 BRST} + {3654471600 -7200 1 BRST} {3664749600 -10800 0 BRT} - {3685316400 -7200 1 BRST} + {3685921200 -7200 1 BRST} {3696199200 -10800 0 BRT} - {3716766000 -7200 1 BRST} + {3717370800 -7200 1 BRST} {3727648800 -10800 0 BRT} - {3748215600 -7200 1 BRST} + {3748820400 -7200 1 BRST} {3759703200 -10800 0 BRT} - {3779665200 -7200 1 BRST} + {3780270000 -7200 1 BRST} {3791152800 -10800 0 BRT} - {3811114800 -7200 1 BRST} + {3811719600 -7200 1 BRST} {3822602400 -10800 0 BRT} - {3843169200 -7200 1 BRST} + {3843774000 -7200 1 BRST} {3854052000 -10800 0 BRT} - {3874618800 -7200 1 BRST} + {3875223600 -7200 1 BRST} {3885501600 -10800 0 BRT} - {3906068400 -7200 1 BRST} + {3906673200 -7200 1 BRST} {3917556000 -10800 0 BRT} - {3937518000 -7200 1 BRST} + {3938122800 -7200 1 BRST} {3949005600 -10800 0 BRT} - {3968967600 -7200 1 BRST} + {3969572400 -7200 1 BRST} {3980455200 -10800 0 BRT} - {4001022000 -7200 1 BRST} + {4001626800 -7200 1 BRST} {4011904800 -10800 0 BRT} - {4032471600 -7200 1 BRST} + {4033076400 -7200 1 BRST} {4043354400 -10800 0 BRT} - {4063921200 -7200 1 BRST} + {4064526000 -7200 1 BRST} {4074804000 -10800 0 BRT} - {4095370800 -7200 1 BRST} + {4095975600 -7200 1 BRST} } diff --git a/library/tzdata/Asia/Damascus b/library/tzdata/Asia/Damascus index 56b5e7d..4cfeee7 100644 --- a/library/tzdata/Asia/Damascus +++ b/library/tzdata/Asia/Damascus @@ -94,187 +94,187 @@ set TZData(:Asia/Damascus) { {1175205600 10800 1 EEST} {1193950800 7200 0 EET} {1207260000 10800 1 EEST} - {1222808400 7200 0 EET} + {1225486800 7200 0 EET} {1238709600 10800 1 EEST} - {1254344400 7200 0 EET} + {1257022800 7200 0 EET} {1270159200 10800 1 EEST} - {1285880400 7200 0 EET} + {1288558800 7200 0 EET} {1301608800 10800 1 EEST} - {1317416400 7200 0 EET} + {1320094800 7200 0 EET} {1333663200 10800 1 EEST} - {1349038800 7200 0 EET} + {1351717200 7200 0 EET} {1365112800 10800 1 EEST} - {1380574800 7200 0 EET} + {1383253200 7200 0 EET} {1396562400 10800 1 EEST} - {1412110800 7200 0 EET} + {1414789200 7200 0 EET} {1428012000 10800 1 EEST} - {1443646800 7200 0 EET} + {1446325200 7200 0 EET} {1459461600 10800 1 EEST} - {1475269200 7200 0 EET} + {1477947600 7200 0 EET} {1491516000 10800 1 EEST} - {1506805200 7200 0 EET} + {1509483600 7200 0 EET} {1522965600 10800 1 EEST} - {1538341200 7200 0 EET} + {1541019600 7200 0 EET} {1554415200 10800 1 EEST} - {1569877200 7200 0 EET} + {1572555600 7200 0 EET} {1585864800 10800 1 EEST} - {1601499600 7200 0 EET} + {1604178000 7200 0 EET} {1617314400 10800 1 EEST} - {1633035600 7200 0 EET} + {1635714000 7200 0 EET} {1648764000 10800 1 EEST} - {1664571600 7200 0 EET} + {1667250000 7200 0 EET} {1680818400 10800 1 EEST} - {1696107600 7200 0 EET} + {1698786000 7200 0 EET} {1712268000 10800 1 EEST} - {1727730000 7200 0 EET} + {1730408400 7200 0 EET} {1743717600 10800 1 EEST} - {1759266000 7200 0 EET} + {1761944400 7200 0 EET} {1775167200 10800 1 EEST} - {1790802000 7200 0 EET} + {1793480400 7200 0 EET} {1806616800 10800 1 EEST} - {1822338000 7200 0 EET} + {1825016400 7200 0 EET} {1838671200 10800 1 EEST} - {1853960400 7200 0 EET} + {1856638800 7200 0 EET} {1870120800 10800 1 EEST} - {1885496400 7200 0 EET} + {1888174800 7200 0 EET} {1901570400 10800 1 EEST} - {1917032400 7200 0 EET} + {1919710800 7200 0 EET} {1933020000 10800 1 EEST} - {1948568400 7200 0 EET} + {1951246800 7200 0 EET} {1964469600 10800 1 EEST} - {1980190800 7200 0 EET} + {1982869200 7200 0 EET} {1995919200 10800 1 EEST} - {2011726800 7200 0 EET} + {2014405200 7200 0 EET} {2027973600 10800 1 EEST} - {2043262800 7200 0 EET} + {2045941200 7200 0 EET} {2059423200 10800 1 EEST} - {2074798800 7200 0 EET} + {2077477200 7200 0 EET} {2090872800 10800 1 EEST} - {2106421200 7200 0 EET} + {2109099600 7200 0 EET} {2122322400 10800 1 EEST} - {2137957200 7200 0 EET} + {2140635600 7200 0 EET} {2153772000 10800 1 EEST} - {2169493200 7200 0 EET} + {2172171600 7200 0 EET} {2185221600 10800 1 EEST} - {2201029200 7200 0 EET} + {2203707600 7200 0 EET} {2217276000 10800 1 EEST} - {2232651600 7200 0 EET} + {2235330000 7200 0 EET} {2248725600 10800 1 EEST} - {2264187600 7200 0 EET} + {2266866000 7200 0 EET} {2280175200 10800 1 EEST} - {2295723600 7200 0 EET} + {2298402000 7200 0 EET} {2311624800 10800 1 EEST} - {2327259600 7200 0 EET} + {2329938000 7200 0 EET} {2343074400 10800 1 EEST} - {2358882000 7200 0 EET} + {2361560400 7200 0 EET} {2375128800 10800 1 EEST} - {2390418000 7200 0 EET} + {2393096400 7200 0 EET} {2406578400 10800 1 EEST} - {2421954000 7200 0 EET} + {2424632400 7200 0 EET} {2438028000 10800 1 EEST} - {2453490000 7200 0 EET} + {2456168400 7200 0 EET} {2469477600 10800 1 EEST} - {2485112400 7200 0 EET} + {2487790800 7200 0 EET} {2500927200 10800 1 EEST} - {2516648400 7200 0 EET} + {2519326800 7200 0 EET} {2532376800 10800 1 EEST} - {2548184400 7200 0 EET} + {2550862800 7200 0 EET} {2564431200 10800 1 EEST} - {2579720400 7200 0 EET} + {2582398800 7200 0 EET} {2595880800 10800 1 EEST} - {2611342800 7200 0 EET} + {2614021200 7200 0 EET} {2627330400 10800 1 EEST} - {2642878800 7200 0 EET} + {2645557200 7200 0 EET} {2658780000 10800 1 EEST} - {2674414800 7200 0 EET} + {2677093200 7200 0 EET} {2690229600 10800 1 EEST} - {2705950800 7200 0 EET} + {2708629200 7200 0 EET} {2722284000 10800 1 EEST} - {2737573200 7200 0 EET} + {2740251600 7200 0 EET} {2753733600 10800 1 EEST} - {2769109200 7200 0 EET} + {2771787600 7200 0 EET} {2785183200 10800 1 EEST} - {2800645200 7200 0 EET} + {2803323600 7200 0 EET} {2816632800 10800 1 EEST} - {2832181200 7200 0 EET} + {2834859600 7200 0 EET} {2848082400 10800 1 EEST} - {2863803600 7200 0 EET} + {2866482000 7200 0 EET} {2879532000 10800 1 EEST} - {2895339600 7200 0 EET} + {2898018000 7200 0 EET} {2911586400 10800 1 EEST} - {2926875600 7200 0 EET} + {2929554000 7200 0 EET} {2943036000 10800 1 EEST} - {2958411600 7200 0 EET} + {2961090000 7200 0 EET} {2974485600 10800 1 EEST} - {2990034000 7200 0 EET} + {2992712400 7200 0 EET} {3005935200 10800 1 EEST} - {3021570000 7200 0 EET} + {3024248400 7200 0 EET} {3037384800 10800 1 EEST} - {3053106000 7200 0 EET} + {3055784400 7200 0 EET} {3068834400 10800 1 EEST} - {3084642000 7200 0 EET} + {3087320400 7200 0 EET} {3100888800 10800 1 EEST} - {3116264400 7200 0 EET} + {3118942800 7200 0 EET} {3132338400 10800 1 EEST} - {3147800400 7200 0 EET} + {3150478800 7200 0 EET} {3163788000 10800 1 EEST} - {3179336400 7200 0 EET} + {3182014800 7200 0 EET} {3195237600 10800 1 EEST} - {3210872400 7200 0 EET} + {3213550800 7200 0 EET} {3226687200 10800 1 EEST} - {3242494800 7200 0 EET} + {3245173200 7200 0 EET} {3258741600 10800 1 EEST} - {3274030800 7200 0 EET} + {3276709200 7200 0 EET} {3290191200 10800 1 EEST} - {3305566800 7200 0 EET} + {3308245200 7200 0 EET} {3321640800 10800 1 EEST} - {3337102800 7200 0 EET} + {3339781200 7200 0 EET} {3353090400 10800 1 EEST} - {3368725200 7200 0 EET} + {3371403600 7200 0 EET} {3384540000 10800 1 EEST} - {3400261200 7200 0 EET} + {3402939600 7200 0 EET} {3415989600 10800 1 EEST} - {3431797200 7200 0 EET} + {3434475600 7200 0 EET} {3448044000 10800 1 EEST} - {3463333200 7200 0 EET} + {3466011600 7200 0 EET} {3479493600 10800 1 EEST} - {3494955600 7200 0 EET} + {3497634000 7200 0 EET} {3510943200 10800 1 EEST} - {3526491600 7200 0 EET} + {3529170000 7200 0 EET} {3542392800 10800 1 EEST} - {3558027600 7200 0 EET} + {3560706000 7200 0 EET} {3573842400 10800 1 EEST} - {3589563600 7200 0 EET} + {3592242000 7200 0 EET} {3605896800 10800 1 EEST} - {3621186000 7200 0 EET} + {3623864400 7200 0 EET} {3637346400 10800 1 EEST} - {3652722000 7200 0 EET} + {3655400400 7200 0 EET} {3668796000 10800 1 EEST} - {3684258000 7200 0 EET} + {3686936400 7200 0 EET} {3700245600 10800 1 EEST} - {3715794000 7200 0 EET} + {3718472400 7200 0 EET} {3731695200 10800 1 EEST} - {3747416400 7200 0 EET} + {3750094800 7200 0 EET} {3763144800 10800 1 EEST} - {3778952400 7200 0 EET} + {3781630800 7200 0 EET} {3795199200 10800 1 EEST} - {3810488400 7200 0 EET} + {3813166800 7200 0 EET} {3826648800 10800 1 EEST} - {3842024400 7200 0 EET} + {3844702800 7200 0 EET} {3858098400 10800 1 EEST} - {3873646800 7200 0 EET} + {3876325200 7200 0 EET} {3889548000 10800 1 EEST} - {3905182800 7200 0 EET} + {3907861200 7200 0 EET} {3920997600 10800 1 EEST} - {3936718800 7200 0 EET} + {3939397200 7200 0 EET} {3952447200 10800 1 EEST} - {3968254800 7200 0 EET} + {3970933200 7200 0 EET} {3984501600 10800 1 EEST} - {3999877200 7200 0 EET} + {4002555600 7200 0 EET} {4015951200 10800 1 EEST} - {4031413200 7200 0 EET} + {4034091600 7200 0 EET} {4047400800 10800 1 EEST} - {4062949200 7200 0 EET} + {4065627600 7200 0 EET} {4078850400 10800 1 EEST} - {4094485200 7200 0 EET} + {4097163600 7200 0 EET} } diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index 5995729..80f53c9 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -89,187 +89,187 @@ set TZData(:Asia/Gaza) { {1175378400 10800 1 EEST} {1189638000 7200 0 EET} {1207000800 10800 1 EEST} - {1221087600 7200 0 EET} + {1219878000 7200 0 EET} {1238536800 10800 1 EEST} - {1252537200 7200 0 EET} + {1251327600 7200 0 EET} {1270072800 10800 1 EEST} - {1283986800 7200 0 EET} + {1282777200 7200 0 EET} {1301608800 10800 1 EEST} - {1315436400 7200 0 EET} + {1314226800 7200 0 EET} {1333231200 10800 1 EEST} - {1347490800 7200 0 EET} + {1346281200 7200 0 EET} {1364767200 10800 1 EEST} - {1378940400 7200 0 EET} + {1377730800 7200 0 EET} {1396303200 10800 1 EEST} - {1410390000 7200 0 EET} + {1409180400 7200 0 EET} {1427839200 10800 1 EEST} - {1441839600 7200 0 EET} + {1440630000 7200 0 EET} {1459461600 10800 1 EEST} - {1473289200 7200 0 EET} + {1472079600 7200 0 EET} {1490997600 10800 1 EEST} - {1505343600 7200 0 EET} + {1504134000 7200 0 EET} {1522533600 10800 1 EEST} - {1536793200 7200 0 EET} + {1535583600 7200 0 EET} {1554069600 10800 1 EEST} - {1568242800 7200 0 EET} + {1567033200 7200 0 EET} {1585692000 10800 1 EEST} - {1599692400 7200 0 EET} + {1598482800 7200 0 EET} {1617228000 10800 1 EEST} - {1631142000 7200 0 EET} + {1629932400 7200 0 EET} {1648764000 10800 1 EEST} - {1662591600 7200 0 EET} + {1661382000 7200 0 EET} {1680300000 10800 1 EEST} - {1694646000 7200 0 EET} + {1693436400 7200 0 EET} {1711922400 10800 1 EEST} - {1726095600 7200 0 EET} + {1724886000 7200 0 EET} {1743458400 10800 1 EEST} - {1757545200 7200 0 EET} + {1756335600 7200 0 EET} {1774994400 10800 1 EEST} - {1788994800 7200 0 EET} + {1787785200 7200 0 EET} {1806530400 10800 1 EEST} - {1820444400 7200 0 EET} + {1819234800 7200 0 EET} {1838152800 10800 1 EEST} - {1852498800 7200 0 EET} + {1851289200 7200 0 EET} {1869688800 10800 1 EEST} - {1883948400 7200 0 EET} + {1882738800 7200 0 EET} {1901224800 10800 1 EEST} - {1915398000 7200 0 EET} + {1914188400 7200 0 EET} {1932760800 10800 1 EEST} - {1946847600 7200 0 EET} + {1945638000 7200 0 EET} {1964383200 10800 1 EEST} - {1978297200 7200 0 EET} + {1977087600 7200 0 EET} {1995919200 10800 1 EEST} - {2009746800 7200 0 EET} + {2008537200 7200 0 EET} {2027455200 10800 1 EEST} - {2041801200 7200 0 EET} + {2040591600 7200 0 EET} {2058991200 10800 1 EEST} - {2073250800 7200 0 EET} + {2072041200 7200 0 EET} {2090613600 10800 1 EEST} - {2104700400 7200 0 EET} + {2103490800 7200 0 EET} {2122149600 10800 1 EEST} - {2136150000 7200 0 EET} + {2134940400 7200 0 EET} {2153685600 10800 1 EEST} - {2167599600 7200 0 EET} + {2166390000 7200 0 EET} {2185221600 10800 1 EEST} - {2199049200 7200 0 EET} + {2197839600 7200 0 EET} {2216844000 10800 1 EEST} - {2231103600 7200 0 EET} + {2229894000 7200 0 EET} {2248380000 10800 1 EEST} - {2262553200 7200 0 EET} + {2261343600 7200 0 EET} {2279916000 10800 1 EEST} - {2294002800 7200 0 EET} + {2292793200 7200 0 EET} {2311452000 10800 1 EEST} - {2325452400 7200 0 EET} + {2324242800 7200 0 EET} {2343074400 10800 1 EEST} - {2356902000 7200 0 EET} + {2355692400 7200 0 EET} {2374610400 10800 1 EEST} - {2388956400 7200 0 EET} + {2387746800 7200 0 EET} {2406146400 10800 1 EEST} - {2420406000 7200 0 EET} + {2419196400 7200 0 EET} {2437682400 10800 1 EEST} - {2451855600 7200 0 EET} + {2450646000 7200 0 EET} {2469304800 10800 1 EEST} - {2483305200 7200 0 EET} + {2482095600 7200 0 EET} {2500840800 10800 1 EEST} - {2514754800 7200 0 EET} + {2513545200 7200 0 EET} {2532376800 10800 1 EEST} - {2546204400 7200 0 EET} + {2544994800 7200 0 EET} {2563912800 10800 1 EEST} - {2578258800 7200 0 EET} + {2577049200 7200 0 EET} {2595535200 10800 1 EEST} - {2609708400 7200 0 EET} + {2608498800 7200 0 EET} {2627071200 10800 1 EEST} - {2641158000 7200 0 EET} + {2639948400 7200 0 EET} {2658607200 10800 1 EEST} - {2672607600 7200 0 EET} + {2671398000 7200 0 EET} {2690143200 10800 1 EEST} - {2704057200 7200 0 EET} + {2702847600 7200 0 EET} {2721765600 10800 1 EEST} - {2736111600 7200 0 EET} + {2734902000 7200 0 EET} {2753301600 10800 1 EEST} - {2767561200 7200 0 EET} + {2766351600 7200 0 EET} {2784837600 10800 1 EEST} - {2799010800 7200 0 EET} + {2797801200 7200 0 EET} {2816373600 10800 1 EEST} - {2830460400 7200 0 EET} + {2829250800 7200 0 EET} {2847996000 10800 1 EEST} - {2861910000 7200 0 EET} + {2860700400 7200 0 EET} {2879532000 10800 1 EEST} - {2893359600 7200 0 EET} + {2892150000 7200 0 EET} {2911068000 10800 1 EEST} - {2925414000 7200 0 EET} + {2924204400 7200 0 EET} {2942604000 10800 1 EEST} - {2956863600 7200 0 EET} + {2955654000 7200 0 EET} {2974226400 10800 1 EEST} - {2988313200 7200 0 EET} + {2987103600 7200 0 EET} {3005762400 10800 1 EEST} - {3019762800 7200 0 EET} + {3018553200 7200 0 EET} {3037298400 10800 1 EEST} - {3051212400 7200 0 EET} + {3050002800 7200 0 EET} {3068834400 10800 1 EEST} - {3082662000 7200 0 EET} + {3081452400 7200 0 EET} {3100456800 10800 1 EEST} - {3114716400 7200 0 EET} + {3113506800 7200 0 EET} {3131992800 10800 1 EEST} - {3146166000 7200 0 EET} + {3144956400 7200 0 EET} {3163528800 10800 1 EEST} - {3177615600 7200 0 EET} + {3176406000 7200 0 EET} {3195064800 10800 1 EEST} - {3209065200 7200 0 EET} + {3207855600 7200 0 EET} {3226687200 10800 1 EEST} - {3240514800 7200 0 EET} + {3239305200 7200 0 EET} {3258223200 10800 1 EEST} - {3272569200 7200 0 EET} + {3271359600 7200 0 EET} {3289759200 10800 1 EEST} - {3304018800 7200 0 EET} + {3302809200 7200 0 EET} {3321295200 10800 1 EEST} - {3335468400 7200 0 EET} + {3334258800 7200 0 EET} {3352917600 10800 1 EEST} - {3366918000 7200 0 EET} + {3365708400 7200 0 EET} {3384453600 10800 1 EEST} - {3398367600 7200 0 EET} + {3397158000 7200 0 EET} {3415989600 10800 1 EEST} - {3429817200 7200 0 EET} + {3428607600 7200 0 EET} {3447525600 10800 1 EEST} - {3461871600 7200 0 EET} + {3460662000 7200 0 EET} {3479148000 10800 1 EEST} - {3493321200 7200 0 EET} + {3492111600 7200 0 EET} {3510684000 10800 1 EEST} - {3524770800 7200 0 EET} + {3523561200 7200 0 EET} {3542220000 10800 1 EEST} - {3556220400 7200 0 EET} + {3555010800 7200 0 EET} {3573756000 10800 1 EEST} - {3587670000 7200 0 EET} + {3586460400 7200 0 EET} {3605378400 10800 1 EEST} - {3619724400 7200 0 EET} + {3618514800 7200 0 EET} {3636914400 10800 1 EEST} - {3651174000 7200 0 EET} + {3649964400 7200 0 EET} {3668450400 10800 1 EEST} - {3682623600 7200 0 EET} + {3681414000 7200 0 EET} {3699986400 10800 1 EEST} - {3714073200 7200 0 EET} + {3712863600 7200 0 EET} {3731608800 10800 1 EEST} - {3745522800 7200 0 EET} + {3744313200 7200 0 EET} {3763144800 10800 1 EEST} - {3776972400 7200 0 EET} + {3775762800 7200 0 EET} {3794680800 10800 1 EEST} - {3809026800 7200 0 EET} + {3807817200 7200 0 EET} {3826216800 10800 1 EEST} - {3840476400 7200 0 EET} + {3839266800 7200 0 EET} {3857839200 10800 1 EEST} - {3871926000 7200 0 EET} + {3870716400 7200 0 EET} {3889375200 10800 1 EEST} - {3903375600 7200 0 EET} + {3902166000 7200 0 EET} {3920911200 10800 1 EEST} - {3934825200 7200 0 EET} + {3933615600 7200 0 EET} {3952447200 10800 1 EEST} - {3966274800 7200 0 EET} + {3965065200 7200 0 EET} {3984069600 10800 1 EEST} - {3998329200 7200 0 EET} + {3997119600 7200 0 EET} {4015605600 10800 1 EEST} - {4029778800 7200 0 EET} + {4028569200 7200 0 EET} {4047141600 10800 1 EEST} - {4061228400 7200 0 EET} + {4060018800 7200 0 EET} {4078677600 10800 1 EEST} - {4092678000 7200 0 EET} + {4091468400 7200 0 EET} } diff --git a/library/tzdata/Asia/Karachi b/library/tzdata/Asia/Karachi index 5e1c63e..9db002c 100644 --- a/library/tzdata/Asia/Karachi +++ b/library/tzdata/Asia/Karachi @@ -10,5 +10,5 @@ set TZData(:Asia/Karachi) { {1018119660 21600 1 PKST} {1033840860 18000 0 PKT} {1212260400 21600 1 PKST} - {1220205600 18000 0 PKT} + {1225476000 18000 0 PKT} } diff --git a/library/tzdata/Indian/Mauritius b/library/tzdata/Indian/Mauritius index 430bad4..69fe8fe 100644 --- a/library/tzdata/Indian/Mauritius +++ b/library/tzdata/Indian/Mauritius @@ -6,5 +6,186 @@ set TZData(:Indian/Mauritius) { {403041600 18000 1 MUST} {417034800 14400 0 MUT} {1224972000 18000 1 MUST} - {1238104800 14400 0 MUT} + {1238277600 14400 0 MUT} + {1256421600 18000 1 MUST} + {1269727200 14400 0 MUT} + {1288476000 18000 1 MUST} + {1301176800 14400 0 MUT} + {1319925600 18000 1 MUST} + {1332626400 14400 0 MUT} + {1351375200 18000 1 MUST} + {1364680800 14400 0 MUT} + {1382824800 18000 1 MUST} + {1396130400 14400 0 MUT} + {1414274400 18000 1 MUST} + {1427580000 14400 0 MUT} + {1445724000 18000 1 MUST} + {1459029600 14400 0 MUT} + {1477778400 18000 1 MUST} + {1490479200 14400 0 MUT} + {1509228000 18000 1 MUST} + {1521928800 14400 0 MUT} + {1540677600 18000 1 MUST} + {1553983200 14400 0 MUT} + {1572127200 18000 1 MUST} + {1585432800 14400 0 MUT} + {1603576800 18000 1 MUST} + {1616882400 14400 0 MUT} + {1635631200 18000 1 MUST} + {1648332000 14400 0 MUT} + {1667080800 18000 1 MUST} + {1679781600 14400 0 MUT} + {1698530400 18000 1 MUST} + {1711836000 14400 0 MUT} + {1729980000 18000 1 MUST} + {1743285600 14400 0 MUT} + {1761429600 18000 1 MUST} + {1774735200 14400 0 MUT} + {1792879200 18000 1 MUST} + {1806184800 14400 0 MUT} + {1824933600 18000 1 MUST} + {1837634400 14400 0 MUT} + {1856383200 18000 1 MUST} + {1869084000 14400 0 MUT} + {1887832800 18000 1 MUST} + {1901138400 14400 0 MUT} + {1919282400 18000 1 MUST} + {1932588000 14400 0 MUT} + {1950732000 18000 1 MUST} + {1964037600 14400 0 MUT} + {1982786400 18000 1 MUST} + {1995487200 14400 0 MUT} + {2014236000 18000 1 MUST} + {2026936800 14400 0 MUT} + {2045685600 18000 1 MUST} + {2058386400 14400 0 MUT} + {2077135200 18000 1 MUST} + {2090440800 14400 0 MUT} + {2108584800 18000 1 MUST} + {2121890400 14400 0 MUT} + {2140034400 18000 1 MUST} + {2153340000 14400 0 MUT} + {2172088800 18000 1 MUST} + {2184789600 14400 0 MUT} + {2203538400 18000 1 MUST} + {2216239200 14400 0 MUT} + {2234988000 18000 1 MUST} + {2248293600 14400 0 MUT} + {2266437600 18000 1 MUST} + {2279743200 14400 0 MUT} + {2297887200 18000 1 MUST} + {2311192800 14400 0 MUT} + {2329336800 18000 1 MUST} + {2342642400 14400 0 MUT} + {2361391200 18000 1 MUST} + {2374092000 14400 0 MUT} + {2392840800 18000 1 MUST} + {2405541600 14400 0 MUT} + {2424290400 18000 1 MUST} + {2437596000 14400 0 MUT} + {2455740000 18000 1 MUST} + {2469045600 14400 0 MUT} + {2487189600 18000 1 MUST} + {2500495200 14400 0 MUT} + {2519244000 18000 1 MUST} + {2531944800 14400 0 MUT} + {2550693600 18000 1 MUST} + {2563394400 14400 0 MUT} + {2582143200 18000 1 MUST} + {2595448800 14400 0 MUT} + {2613592800 18000 1 MUST} + {2626898400 14400 0 MUT} + {2645042400 18000 1 MUST} + {2658348000 14400 0 MUT} + {2676492000 18000 1 MUST} + {2689797600 14400 0 MUT} + {2708546400 18000 1 MUST} + {2721247200 14400 0 MUT} + {2739996000 18000 1 MUST} + {2752696800 14400 0 MUT} + {2771445600 18000 1 MUST} + {2784751200 14400 0 MUT} + {2802895200 18000 1 MUST} + {2816200800 14400 0 MUT} + {2834344800 18000 1 MUST} + {2847650400 14400 0 MUT} + {2866399200 18000 1 MUST} + {2879100000 14400 0 MUT} + {2897848800 18000 1 MUST} + {2910549600 14400 0 MUT} + {2929298400 18000 1 MUST} + {2941999200 14400 0 MUT} + {2960748000 18000 1 MUST} + {2974053600 14400 0 MUT} + {2992197600 18000 1 MUST} + {3005503200 14400 0 MUT} + {3023647200 18000 1 MUST} + {3036952800 14400 0 MUT} + {3055701600 18000 1 MUST} + {3068402400 14400 0 MUT} + {3087151200 18000 1 MUST} + {3099852000 14400 0 MUT} + {3118600800 18000 1 MUST} + {3131906400 14400 0 MUT} + {3150050400 18000 1 MUST} + {3163356000 14400 0 MUT} + {3181500000 18000 1 MUST} + {3194805600 14400 0 MUT} + {3212949600 18000 1 MUST} + {3226255200 14400 0 MUT} + {3245004000 18000 1 MUST} + {3257704800 14400 0 MUT} + {3276453600 18000 1 MUST} + {3289154400 14400 0 MUT} + {3307903200 18000 1 MUST} + {3321208800 14400 0 MUT} + {3339352800 18000 1 MUST} + {3352658400 14400 0 MUT} + {3370802400 18000 1 MUST} + {3384108000 14400 0 MUT} + {3402856800 18000 1 MUST} + {3415557600 14400 0 MUT} + {3434306400 18000 1 MUST} + {3447007200 14400 0 MUT} + {3465756000 18000 1 MUST} + {3479061600 14400 0 MUT} + {3497205600 18000 1 MUST} + {3510511200 14400 0 MUT} + {3528655200 18000 1 MUST} + {3541960800 14400 0 MUT} + {3560104800 18000 1 MUST} + {3573410400 14400 0 MUT} + {3592159200 18000 1 MUST} + {3604860000 14400 0 MUT} + {3623608800 18000 1 MUST} + {3636309600 14400 0 MUT} + {3655058400 18000 1 MUST} + {3668364000 14400 0 MUT} + {3686508000 18000 1 MUST} + {3699813600 14400 0 MUT} + {3717957600 18000 1 MUST} + {3731263200 14400 0 MUT} + {3750012000 18000 1 MUST} + {3762712800 14400 0 MUT} + {3781461600 18000 1 MUST} + {3794162400 14400 0 MUT} + {3812911200 18000 1 MUST} + {3825612000 14400 0 MUT} + {3844360800 18000 1 MUST} + {3857666400 14400 0 MUT} + {3875810400 18000 1 MUST} + {3889116000 14400 0 MUT} + {3907260000 18000 1 MUST} + {3920565600 14400 0 MUT} + {3939314400 18000 1 MUST} + {3952015200 14400 0 MUT} + {3970764000 18000 1 MUST} + {3983464800 14400 0 MUT} + {4002213600 18000 1 MUST} + {4015519200 14400 0 MUT} + {4033663200 18000 1 MUST} + {4046968800 14400 0 MUT} + {4065112800 18000 1 MUST} + {4078418400 14400 0 MUT} + {4096562400 18000 1 MUST} } -- cgit v0.12 From 540cbc7ddbd0d20c638a9cc9dbcb1b608b661f0e Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 01:21:52 +0000 Subject: First hack at TIP#234 --- ChangeLog | 11 +- generic/tcl.decls | 53 +- generic/tcl.h | 46 +- generic/tclBasic.c | 6 +- generic/tclInt.h | 3 +- generic/tclZlib.c | 2567 ++++++++++++++++++++++++++++++++++++++++++++++++++++ unix/Makefile.in | 13 +- unix/configure.in | 8 +- 8 files changed, 2695 insertions(+), 12 deletions(-) create mode 100644 generic/tclZlib.c diff --git a/ChangeLog b/ChangeLog index 2de955a..dd16b6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-12-11 Donal K. Fellows + + TIP #234 IMPLEMENTATION + + * generic/tclZlib.c: A very preliminary hack at an interface to the + zlib library, based on code from Pascal Scheffers. + WARNING! The C API may be subect to change without much warning! USE + AT YOUR OWN RISK! + 2008-12-10 Kevin B. Kenny * library/tzdata/*: Update from Olson's tzdata2008i. @@ -15,7 +24,7 @@ * tests/format.test * tests/scan.test -2008-12-10 Donal K. Fellows +2008-12-10 Donal K. Fellows TIP #341 IMPLEMENTATION diff --git a/generic/tcl.decls b/generic/tcl.decls index 9bf31ff..8f6a438 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.158 2008/12/09 20:16:29 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.159 2008/12/11 01:21:52 dkf Exp $ library tcl @@ -2198,7 +2198,7 @@ declare 604 generic { int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv) } -# TIP 336 (manipulate the error line) +# TIP#336 (manipulate the error line) declare 605 generic { int Tcl_GetErrorLine(Tcl_Interp *interp) } @@ -2217,11 +2217,54 @@ declare 608 generic { int Tcl_InterpActive(Tcl_Interp *interp) } -# TIP 337 +# TIP#337 (log exception for background processing) declare 609 generic { void Tcl_BackgroundException(Tcl_Interp *interp, int code) } +# TIP#234 (zlib interface) +declare 610 generic { + int Tcl_ZlibDeflate(Tcl_Interp *interp, int format, Tcl_Obj *data, + int level); +} +declare 611 generic { + int Tcl_ZlibInflate(Tcl_Interp *interp, int format, Tcl_Obj *data, + int buffersize); +} +declare 612 generic { + unsigned int Tcl_ZlibCRC32(unsigned int crc, const char *buf, + unsigned int len); +} +declare 613 generic { + unsigned int Tcl_ZlibAdler32(unsigned int adler, const char *buf, + unsigned int len); +} +declare 614 generic { + int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode, int format, + int level, Tcl_ZlibStream *zshandle); +} +declare 615 generic { + Tcl_Obj *Tcl_ZlibStreamGetCommandName(Tcl_ZlibStream zshandle); +} +declare 616 generic { + int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle); +} +declare 617 generic { + int Tcl_ZlibStreamAdler32(Tcl_ZlibStream zshandle); +} +declare 618 generic { + int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle, Tcl_Obj *data, int flush); +} +declare 619 generic { + int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle, Tcl_Obj *data, int count); +} +declare 620 generic { + int Tcl_ZlibStreamClose(Tcl_ZlibStream zshandle); +} +declare 621 generic { + int Tcl_ZlibStreamReset(Tcl_ZlibStream zshandle); +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are only @@ -2274,3 +2317,7 @@ export { export { void Tcl_GetMemoryInfo(Tcl_DString *dsPtr) } + +# Local Variables: +# mode: tcl +# End: diff --git a/generic/tcl.h b/generic/tcl.h index c99ad44..7ff25c7 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.280 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.281 2008/12/11 01:21:52 dkf Exp $ */ #ifndef _TCL @@ -503,6 +503,7 @@ typedef struct Tcl_ThreadId_ *Tcl_ThreadId; typedef struct Tcl_TimerToken_ *Tcl_TimerToken; typedef struct Tcl_Trace_ *Tcl_Trace; typedef struct Tcl_Var_ *Tcl_Var; +typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream; typedef void *Tcl_ThreadDataKey; @@ -2251,6 +2252,49 @@ typedef int (*Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, {TCL_ARGV_END} /* + *---------------------------------------------------------------------------- + * Definitions needed for Tcl_Zlib routines. [TIP #234] + *---------------------------------------------------------------------------- + * + * Constants for the format flags describing what sort of data format is + * desired/expected for the Tcl_ZlibDeflate, Tcl_ZlibInflate and + * Tcl_ZlibStreamInit functions. + */ + +#define TCL_ZLIB_FORMAT_RAW 1 +#define TCL_ZLIB_FORMAT_ZLIB 2 +#define TCL_ZLIB_FORMAT_GZIP 4 +#define TCL_ZLIB_FORMAT_AUTO 8 + +/* + * Constants that describe whether the stream is to operate in compressing or + * decompressing mode. The scripted level doesn't use pass-through mode. + */ + +#define TCL_ZLIB_STREAM_PASS 0 +#define TCL_ZLIB_STREAM_DEFLATE 16 +#define TCL_ZLIB_STREAM_INFLATE 32 + +/* + * Constants giving compression levels. Use of TCL_ZLIB_COMPRESS_DEFAULT is + * recommended. + */ + +#define TCL_ZLIB_COMPRESS_NONE 0 +#define TCL_ZLIB_COMPRESS_FAST 1 +#define TCL_ZLIB_COMPRESS_BEST 9 +#define TCL_ZLIB_COMPRESS_DEFAULT (-1) + +/* + * Constants for types of flushing, used with Tcl_ZlibFlush. + */ + +#define TCL_ZLIB_NO_FLUSH 0 +#define TCL_ZLIB_FLUSH 2 +#define TCL_ZLIB_FULLFLUSH 3 +#define TCL_ZLIB_FINALIZE 4 + +/* * The following constant is used to test for older versions of Tcl in the * stubs tables. * diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cf618c7..c8928ec 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.375 2008/12/05 21:38:47 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.376 2008/12/11 01:21:52 dkf Exp $ */ #include "tclInt.h" @@ -914,6 +914,10 @@ Tcl_CreateInterp(void) Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); } + if (TclZlibInit(interp) != TCL_OK) { + Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); + } + TOP_CB(iPtr) = NULL; return interp; } diff --git a/generic/tclInt.h b/generic/tclInt.h index e373a6c..7e3d1e4 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.409 2008/12/10 18:21:47 ferrieux Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.410 2008/12/11 01:21:52 dkf Exp $ */ #ifndef _TCLINT @@ -2847,6 +2847,7 @@ MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void); MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks); #endif MODULE_SCOPE Tcl_Obj * TclDisassembleByteCodeObj(Tcl_Obj *objPtr); +MODULE_SCOPE int TclZlibInit(Tcl_Interp *interp); MODULE_SCOPE void * TclpThreadCreateKey(void); MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); diff --git a/generic/tclZlib.c b/generic/tclZlib.c new file mode 100644 index 0000000..bdccaeb --- /dev/null +++ b/generic/tclZlib.c @@ -0,0 +1,2567 @@ +/* + * tclZlib.c -- + * + * This file provides the interface to the Zlib library. + * + * Copyright (C) 2004, 2005 Pascal Scheffers + * Copyright (C) 2005 Unitas Software B.V. + * Copyright (c) 2008 Donal K. Fellows + * + * Parts written by Jean-Claude Wippler, as part of Tclkit, placed in the + * public domain March 2003. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclZlib.c,v 1.1 2008/12/11 01:21:52 dkf Exp $ + */ + +#if 0 +#include "tclInt.h" +#include + +typedef struct { + z_stream stream; + gz_header header; + Tcl_Interp *interp; + Tcl_Command cmd; + +} StreamInfo; +typedef struct ThreadSpecificData { + int counter; +} ThreadSpecificData; +static Tcl_ThreadDataKey tsdKey; + +static void ConvertError(Tcl_Interp *interp, int code); +static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, + gz_header *headerPtr); +static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); +static int ZlibStream(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static void DeleteStream(ClientData clientData); +// TODO: Write streaming C API +// TODO: Write Tcl API + +static void +ConvertError( + Tcl_Interp *interp, + int code) +{ + if (interp == NULL) { + return; + } + + if (code == Z_ERRNO) { + Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_PosixError(interp),-1)); + } else { + const char *codeStr; + char codeStr2[TCL_INTEGER_SPACE]; + + switch (code) { + case Z_STREAM_ERROR: codeStr = "STREAM"; break; + case Z_DATA_ERROR: codeStr = "DATA"; break; + case Z_MEM_ERROR: codeStr = "MEM"; break; + case Z_BUF_ERROR: codeStr = "BUF"; break; + case Z_VERSION_ERROR: codeStr = "VERSION"; break; + default: + codeStr = "unknown"; + sprintf(codeStr2, "%d", code); + break; + } + Tcl_SetObjResult(interp, Tcl_NewStringObj(zError(code), -1)); + Tcl_SetErrorCode(interp, "TCL", "ZLIB", codeStr, codeStr2, NULL); + } +} + +static inline int +GetValue( + Tcl_Interp *interp, + Tcl_Obj *dictObj, + const char *nameStr, + Tcl_Obj **valuePtrPtr) +{ + Tcl_Obj *name = Tcl_NewStringObj(nameStr, -1); + int result = Tcl_DictObjGet(interp, dictObj, name, valuePtrPtr); + + TclDecrRefCount(name); + return result; +} + +static int +GenerateHeader( + Tcl_Interp *interp, + Tcl_Obj *dictObj, + gz_header *headerPtr) +{ + Tcl_Obj *value; + static const char *types[] = { + "binary", "text" + }; + + if (GetValue(interp, dictObj, "comment", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL) { + headerPtr->comment = (Bytef *) Tcl_GetString(value); + } + + if (GetValue(interp, dictObj, "crc", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL && + Tcl_GetBooleanFromObj(interp, value, &headerPtr->hcrc)) { + return TCL_ERROR; + } + + if (GetValue(interp, dictObj, "filename", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL) { + headerPtr->name = (Bytef *) Tcl_GetString(value); + } + + if (GetValue(interp, dictObj, "os", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL && + Tcl_GetIntFromObj(interp, value, &headerPtr->os) != TCL_OK) { + return TCL_ERROR; + } + + /* + * Ignore the 'size' field. + */ + + if (GetValue(interp, dictObj, "time", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL && Tcl_GetLongFromObj(interp, value, + (long *) &headerPtr->time) != TCL_OK) { + return TCL_ERROR; + } + + if (GetValue(interp, dictObj, "type", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL && Tcl_GetIndexFromObj(interp, value, types, + "type", TCL_EXACT, &headerPtr->text) != TCL_OK) { + return TCL_ERROR; + } + + return TCL_OK; +} + +static inline void +SetValue( + Tcl_Obj *dictObj, + const char *key, + Tcl_Obj *value) +{ + Tcl_Obj *keyObj = Tcl_NewStringObj(key, -1); + + Tcl_IncrRefCount(keyObj); + Tcl_DictObjPut(NULL, dictObj, keyObj, value); + TclDecrRefCount(keyObj); +} + +static void +ExtractHeader( + gz_header *headerPtr, + Tcl_Obj *dictObj) +{ + if (headerPtr->comment != Z_NULL) { + SetValue(dictObj, "comment", + Tcl_NewStringObj((char *) headerPtr->comment, -1)); + } + SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc)); + if (headerPtr->name != Z_NULL) { + SetValue(dictObj, "filename", + Tcl_NewStringObj((char *) headerPtr->name, -1)); + } + if (headerPtr->os != 255) { + SetValue(dictObj, "os", Tcl_NewIntObj(headerPtr->os)); + } + if (headerPtr->time != 0 /* magic - no time */) { + SetValue(dictObj, "time", Tcl_NewLongObj((long) headerPtr->time)); + } + if (headerPtr->text != Z_UNKNOWN) { + SetValue(dictObj, "type", + Tcl_NewStringObj(headerPtr->text ? "text" : "binary", -1)); + } +} + +Tcl_Obj * +Tcl_ZlibDeflate( + Tcl_Interp *interp, + int format, + Tcl_Obj *dataObj, + int level, + Tcl_Obj *dictObj) +{ + int rawLength; + unsigned char *rawBytes = Tcl_GetByteArrayFromObj(dataObj, &rawLength); + z_stream stream; + gz_header header, *headerPtr = NULL; + Tcl_Obj *outObj = Tcl_NewObj(); + int code, bits; + + switch (format) { + case TCL_ZLIB_FORMAT_RAW: + bits = -15; + break; + case TCL_ZLIB_FORMAT_ZLIB: + bits = 15; + break; + case TCL_ZLIB_FORMAT_GZIP: + bits = 15 | /* gzip magic */ 16; + if (dictObj != NULL) { + headerPtr = &header; + memset(headerPtr, 0, sizeof(gz_header)); + if (GenerateHeader(interp, dictObj, headerPtr) != TCL_OK) { + Tcl_DecrRefCount(outObj); + return NULL; + } + } + break; + default: + Tcl_Panic("bad compression format: %d", format); + return NULL; + } + + stream.avail_in = (uInt) rawLength; + stream.next_in = rawBytes; + stream.avail_out = (uInt) rawLength + rawLength/1000 + 12; + stream.next_out = Tcl_SetByteArrayLength(outObj, stream.avail_out); + stream.zalloc = NULL; + stream.zfree = NULL; + stream.opaque = NULL; + + code = deflateInit2(&stream, level, Z_DEFLATED, bits, MAX_MEM_LEVEL, + Z_DEFAULT_STRATEGY); + if (code != Z_OK) { + goto error; + } + if (headerPtr != NULL) { + deflateSetHeader(&stream, headerPtr); + if (code != Z_OK) { + goto error; + } + } + code = deflate(&stream, Z_FINISH); + if (code != Z_STREAM_END) { + deflateEnd(&stream); + if (code == Z_OK) { + code = Z_BUF_ERROR; + } + } else { + code = deflateEnd(&stream); + } + + if (code == Z_OK) { + Tcl_SetByteArrayLength(outObj, stream.total_out); + return outObj; + } + + error: + Tcl_DecrRefCount(outObj); + ConvertError(interp, code); + return NULL; +} + +Tcl_Obj * +Tcl_ZlibInflate( + Tcl_Interp *interp, + int format, + Tcl_Obj *dataObj, + Tcl_Obj *dictObj) +{ + int compressedLength; + unsigned char *compressedBytes = + Tcl_GetByteArrayFromObj(dataObj, &compressedLength); + z_stream stream; + gz_header header, *headerPtr = NULL; + Tcl_Obj *outObj = Tcl_NewObj(); + unsigned int outSize = 16 * 1024; + int code = Z_BUF_ERROR, bits; + char *nameBuf = NULL, *commentBuf = NULL; + + stream.avail_in = (uInt) compressedLength + 1; + stream.next_in = compressedBytes; + stream.opaque = NULL; + + switch (format) { + case TCL_ZLIB_FORMAT_RAW: + bits = -15; + break; + case TCL_ZLIB_FORMAT_ZLIB: + bits = 15; + break; + case TCL_ZLIB_FORMAT_GZIP: + bits = 15 | /* gzip magic */ 16; + if (dictObj != NULL) { + goto allocHeader; + } + break; + case TCL_ZLIB_FORMAT_AUTO: + bits = 15 | /* auto magic */ 32; + if (dictObj != NULL) { + allocHeader: + headerPtr = &header; + memset(headerPtr, 0, sizeof(gz_header)); + nameBuf = ckalloc(PATH_MAX); + header.name = (void *) nameBuf; + header.name_max = PATH_MAX; + commentBuf = ckalloc(256); + header.comment = (void *) commentBuf; + header.comm_max = 256; + } + break; + default: + Tcl_Panic("unrecognized format: %d", format); + return NULL; + } + + /* + * Loop trying to decompress until we've got enough space. Inefficient, + * but works. + */ + + for (; (outSize > 1024) && (code == Z_BUF_ERROR) ; outSize *= 2) { + stream.zalloc = NULL; + stream.zfree = NULL; + stream.avail_out = (uInt) outSize; + stream.next_out = Tcl_SetByteArrayLength(outObj, outSize); + + code = inflateInit2(&stream, bits); + if (code != Z_OK) { + goto error; + } + + if (headerPtr != NULL) { + inflateGetHeader(&stream, headerPtr); + if (code != Z_OK) { + goto error; + } + } + + code = inflate(&stream, Z_FINISH); + + if (code != Z_STREAM_END) { + inflateEnd(&stream); + if (code == Z_OK) { + code = Z_BUF_ERROR; + } + } else { + code = inflateEnd(&stream); + } + } + + if (code == Z_OK) { + if (headerPtr != NULL) { + ExtractHeader(headerPtr, dictObj); + SetValue(dictObj, "size", Tcl_NewLongObj((long)stream.total_out)); + ckfree(nameBuf); + ckfree(commentBuf); + } + Tcl_SetByteArrayLength(outObj, stream.total_out); + return outObj; + } + + error: + Tcl_DecrRefCount(outObj); + if (headerPtr != NULL) { + ckfree(nameBuf); + ckfree(commentBuf); + } + ConvertError(interp, code); + return NULL; +} + +unsigned int +Tcl_ZlibCRC32( + const char *bytes, + int length) +{ + unsigned int initValue = crc32(0, NULL, 0); + + return crc32(initValue, (unsigned char *) bytes, (unsigned) length); +} + +unsigned int +Tcl_ZlibAdler32( + const char *bytes, + int length) +{ + unsigned int initValue = adler32(0, NULL, 0); + + return adler32(initValue, (unsigned char *) bytes, (unsigned) length); +} + +int +Tcl_ZlibStreamInit( + Tcl_Interp *interp, + int mode, + int format, + int level, + Tcl_Obj *dictObj, + Tcl_ZlibStream *zshandlePtr) +{ + StreamInfo *siPtr = (StreamInfo *) ckalloc(sizeof(StreamInfo)); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tsdKey); + char buf[TCL_INTEGER_SPACE+8]; + + memset(&siPtr->stream, 0, sizeof(z_stream)); + memset(&siPtr->header, 0, sizeof(gz_header)); + + siPtr->interp = interp; + sprintf(buf, "zstream%d", tsdPtr->counter++); + siPtr->cmd = Tcl_CreateObjCommand(interp, buf, ZlibStream, siPtr, + DeleteStream); + + Tcl_Panic("unimplemented"); + + *zshandlePtr = (Tcl_ZlibStream) siPtr; + return TCL_OK; +} + +Tcl_Obj * +Tcl_ZlibStreamGetCommandName( + Tcl_ZlibStream zshandle) +{ + StreamInfo *siPtr = (StreamInfo *) zshandle; + Tcl_Obj *cmdnameObj = Tcl_NewObj(); + + Tcl_GetCommandFullName(siPtr->interp, siPtr->cmd, cmdnameObj); + return cmdnameObj; +} + +int +Tcl_ZlibStreamEof( + Tcl_ZlibStream zshandle) +{ + StreamInfo *siPtr = (StreamInfo *) zshandle; + Tcl_Panic("unimplemented"); + return -1; +} + +int +Tcl_ZlibStreamClose( + Tcl_ZlibStream zshandle) +{ + StreamInfo *siPtr = (StreamInfo *) zshandle; + int code = -1; + + Tcl_Panic("unimplemented"); + + if (siPtr->cmd) { + /* + * Must be last in this function! + */ + + register Tcl_Command cmd = siPtr->cmd; + + siPtr->cmd = NULL; + Tcl_DeleteCommandFromToken(siPtr->interp, cmd); + } + return code; +} + +int +Tcl_ZlibStreamAdler32( + Tcl_ZlibStream zshandle) +{ + StreamInfo *siPtr = (StreamInfo *) zshandle; + Tcl_Panic("unimplemented"); + return -1; +} + +int +Tcl_ZlibStreamPut( + Tcl_ZlibStream zshandle, + const char *bytes, + int length, + int flush) +{ + StreamInfo *siPtr = (StreamInfo *) zshandle; + Tcl_Panic("unimplemented"); + return -1; +} + +int +Tcl_ZlibStreamGet( + Tcl_ZlibStream zshandle, + const char *bytes, + int length) +{ + StreamInfo *siPtr = (StreamInfo *) zshandle; + Tcl_Panic("unimplemented"); + return -1; +} + +static void +DeleteStream( + ClientData clientData) +{ + register StreamInfo *siPtr = clientData; + + if (siPtr->cmd) { + siPtr->cmd = NULL; + Tcl_ZlibStreamClose(clientData); + } + ckfree(clientData); +} + +static int +ZlibStream( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + StreamInfo *siPtr = clientData; + static const char *subcmds[] = { + "adler32", "close", "eof", "finalize", "flush", "fullflush", "get", + "put", NULL + }; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ..."); + return TCL_ERROR; + } + Tcl_SetResult(interp, "unimplemented", TCL_STATIC); + return TCL_ERROR; +} + +#else /* !REIMPLEMENT */ + +#include "tcl.h" +#include +#include + +/* + * Structure used for the Tcl_ZlibStream* commands and [zlib stream ...] + */ + +typedef struct { + Tcl_Interp *interp; + z_stream stream; + int streamend; + Tcl_Obj *indata, *outdata; /* Input / output buffers (lists) */ + Tcl_Obj *current_input; /* Pointer to what is currently being + * inflated. */ + int inpos, outpos; + int mode; /* ZLIB_DEFLATE || ZLIB_INFLATE */ + int format; /* ZLIB_FORMAT_* */ + int level; /* Default 5, 0-9 */ + int flush; /* Stores the flush param for deferred the + * decompression. */ + int wbits; + Tcl_Obj *cmdname; /* Name of the associated Tcl command */ +} zlibStreamHandle; + + +/* + * Prototypes for private procedures defined later in this file: + */ + +static int ZlibCmd(ClientData dummy, Tcl_Interp *ip, int objc, + Tcl_Obj *const objv[]); +static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static void ZlibStreamCmdDelete(ClientData cd); +static void ZlibStreamCleanup(zlibStreamHandle *zsh); + +/* + * Prototypes for private procedures used by channel stacking: + */ + +#ifdef ENABLE_CHANSTACKING +static int ChanClose(ClientData instanceData, + Tcl_Interp *interp); +static int ChanInput(ClientData instanceData, char *buf, + int toRead, int *errorCodePtr); +static int ChanOutput(ClientData instanceData, const char *buf, + int toWrite, int*errorCodePtr); +static int ChanSeek(ClientData instanceData, long offset, + int mode, int *errorCodePtr); +static int ChanSetOption(ClientData instanceData, + Tcl_Interp *interp, const char *optionName, + const char *value); +static int ChanGetOption(ClientData instanceData, + Tcl_Interp *interp, const char *optionName, + Tcl_DString *dsPtr); +static void ChanWatch(ClientData instanceData, int mask); +static int ChanGetHandle(ClientData instanceData, int direction, + ClientData *handlePtr); +static int ChanClose2(ClientData instanceData, + Tcl_Interp *interp, int flags); +static int ChanBlockMode(ClientData instanceData, int mode); +static int ChanFlush(ClientData instanceData); +static int ChanHandler(ClientData instanceData, + int interestMask); +static Tcl_WideInt ChanWideSeek(ClientData instanceData, + Tcl_WideInt offset, int mode, int *errorCodePtr); + +static Tcl_ChannelType zlibChannelType = { + "zlib", + TCL_CHANNEL_VERSION_3, + ChanClose, + ChanInput, + ChanOutput, + NULL, /* ChanSeek, */ + NULL, /* ChanSetOption, */ + NULL, /* ChanGetOption, */ + ChanWatch, + ChanGetHandle, + NULL, /* ChanClose2, */ + ChanBlockMode, + ChanFlush, + ChanHandler, + NULL /* ChanWideSeek */ +}; + +typedef struct { + /* Generic channel info */ + Tcl_Channel channel; + Tcl_TimerToken timer; + int flags; + int mask; + + /* Zlib specific channel state */ + int inFormat; + int outFormat; + z_stream instream; + z_stream outstream; + char *inbuffer; + int inAllocated, inUsed, inPos; + char *outbuffer; + int outAllocated, outUsed, outPos; +} Zlib_ChannelData; + +/* Flag values */ +#define ASYNC 1 +#endif /* ENABLE_CHANSTACKING */ + +#ifdef TCLKIT_BUILD +/* + * Structure for the old zlib sdeflate/sdecompress commands + * Deprecated! + */ + +typedef struct { + z_stream stream; + Tcl_Obj *indata; +} zlibstream; + +static int +zstreamincmd( + ClientData cd, + Tcl_Interp *ip, + int objc, + Tcl_Obj *const objv[]) +{ + zlibstream *zp = cd; + int count = 0; + int e, index; + Tcl_Obj *obj; + + static const char* cmds[] = { "fill", "drain", NULL, }; + + if (Tcl_GetIndexFromObj(ip, objv[1], cmds, "option", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + + switch (index) { + case 0: /* fill ?data? */ + if (objc >= 3) { + Tcl_IncrRefCount(objv[2]); + Tcl_DecrRefCount(zp->indata); + zp->indata = objv[2]; + zp->stream.next_in = + Tcl_GetByteArrayFromObj(zp->indata, &zp->stream.avail_in); + } + Tcl_SetObjResult(ip, Tcl_NewIntObj(zp->stream.avail_in)); + break; + case 1: /* drain count */ + if (objc != 3) { + Tcl_WrongNumArgs(ip, 2, objv, "count"); + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(ip, objv[2], &count) != TCL_OK) { + return TCL_ERROR; + } + obj = Tcl_GetObjResult(ip); + Tcl_SetByteArrayLength(obj, count); + zp->stream.next_out = + Tcl_GetByteArrayFromObj(obj, &zp->stream.avail_out); + e = inflate(&zp->stream, Z_NO_FLUSH); + if (e != Z_OK && e != Z_STREAM_END) { + Tcl_SetResult(ip, (char *) zError(e), TCL_STATIC); + return TCL_ERROR; + } + Tcl_SetByteArrayLength(obj, count - zp->stream.avail_out); + break; + } + return TCL_OK; +} + +static void +zstreamdelproc( + ClientData cd) +{ + zlibstream *zp = cd; + + inflateEnd(&zp->stream); + Tcl_DecrRefCount(zp->indata); + ckfree((void*) zp); +} + +static int +ZlibCmdO( + ClientData dummy, + Tcl_Interp *ip, + int objc, + Tcl_Obj *const objv[]) +{ + int e = TCL_OK, index, dlen, wbits = -MAX_WBITS; + unsigned flag; + Byte *data; + z_stream stream; + Tcl_Obj *obj = Tcl_GetObjResult(ip); + + static const char* cmds[] = { + "adler32", "crc32", "compress", "deflate", "decompress", "inflate", + "sdecompress", "sinflate", NULL, + }; + + if (objc < 3 || objc > 4) { + Tcl_WrongNumArgs(ip, 1, objv, "option data ?...?"); + return TCL_ERROR; + } + + if (Tcl_GetIndexFromObj(ip, objv[1], cmds, "option", 0, + &index) != TCL_OK || (objc > 3 && + Tcl_GetIntFromObj(ip, objv[3], &flag)) != TCL_OK) { + return TCL_ERROR; + } + + data = Tcl_GetByteArrayFromObj(objv[2], &dlen); + + switch (index) { + case 0: /* adler32 str ?start? -> checksum */ + if (objc < 4) { + flag = adler32(0, 0, 0); + } + Tcl_SetIntObj(obj, adler32(flag, data, dlen)); + return TCL_OK; + case 1: /* crc32 str ?start? -> checksum */ + if (objc < 4) { + flag = crc32(0, 0, 0); + } + Tcl_SetIntObj(obj, crc32(flag, data, dlen)); + return TCL_OK; + case 2: /* compress data ?level? -> data */ + wbits = MAX_WBITS; + case 3: /* deflate data ?level? -> data */ + if (objc < 4) { + flag = Z_DEFAULT_COMPRESSION; + } + + stream.avail_in = (uInt) dlen; + stream.next_in = data; + + stream.avail_out = (uInt) dlen + dlen / 1000 + 12; + Tcl_SetByteArrayLength(obj, stream.avail_out); + stream.next_out = Tcl_GetByteArrayFromObj(obj, NULL); + + stream.zalloc = 0; + stream.zfree = 0; + stream.opaque = 0; + + e = deflateInit2(&stream, flag, Z_DEFLATED, wbits, + MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + if (e != Z_OK) { + break; + } + + e = deflate(&stream, Z_FINISH); + if (e != Z_STREAM_END) { + deflateEnd(&stream); + if (e == Z_OK) { + e = Z_BUF_ERROR; + } + } else { + e = deflateEnd(&stream); + } + break; + case 4: /* decompress data ?bufsize? -> data */ + wbits = MAX_WBITS; + case 5: /* inflate data ?bufsize? -> data */ + if (objc < 4) { + flag = 16 * 1024; + } + + for (;;) { + stream.zalloc = 0; + stream.zfree = 0; + + /* + * +1 because ZLIB can "over-request" input (but ignore it) + */ + + stream.avail_in = (uInt) dlen + 1; + stream.next_in = data; + + stream.avail_out = (uInt) flag; + Tcl_SetByteArrayLength(obj, stream.avail_out); + stream.next_out = Tcl_GetByteArrayFromObj(obj, NULL); + + /* + * Negative value suppresses ZLIB header + */ + + e = inflateInit2(&stream, wbits); + if (e == Z_OK) { + e = inflate(&stream, Z_FINISH); + if (e != Z_STREAM_END) { + inflateEnd(&stream); + if (e == Z_OK) { + e = Z_BUF_ERROR; + } + } else { + e = inflateEnd(&stream); + } + } + + if (e == Z_OK || e != Z_BUF_ERROR) { + break; + } + + Tcl_SetByteArrayLength(obj, 0); + flag *= 2; + } + break; + case 6: /* sdecompress cmdname -> */ + wbits = MAX_WBITS; + case 7: { /* sinflate cmdname -> */ + zlibstream *zp = (zlibstream *) ckalloc(sizeof(zlibstream)); + + zp->indata = Tcl_NewObj(); + Tcl_IncrRefCount(zp->indata); + zp->stream.zalloc = 0; + zp->stream.zfree = 0; + zp->stream.opaque = 0; + zp->stream.next_in = 0; + zp->stream.avail_in = 0; + inflateInit2(&zp->stream, wbits); + Tcl_CreateObjCommand(ip, Tcl_GetStringFromObj(objv[2], 0), + zstreamincmd, (ClientData) zp, zstreamdelproc); + return TCL_OK; + } + } + + if (e != Z_OK) { + Tcl_SetResult(ip, (char*) zError(e), TCL_STATIC); + return TCL_ERROR; + } + + Tcl_SetByteArrayLength(obj, stream.total_out); + return TCL_OK; +} +#endif /* TCLKIT_BUILD */ + +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamInit -- + * + * This command initializes a (de)compression context/handle for + * (de)compressing data in chunks. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * zshandle is initialised and memory allocated for internal state. + * Additionally, if interp is not null, a Tcl command is created and its + * name placed in the interp result obj. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_ZlibStreamInit( + Tcl_Interp *interp, + int mode, /* ZLIB_INFLATE || ZLIB_DEFLATE */ + int format, /* ZLIB_FORMAT_* */ + int level, /* 0-9 or ZLIB_DEFAULT_COMPRESSION */ + Tcl_ZlibStream *zshandle) +{ + int wbits = 0; + int e; + zlibStreamHandle *zsh = NULL; + Tcl_DString cmdname; + Tcl_CmdInfo cmdinfo; + + if (mode == TCL_ZLIB_STREAM_DEFLATE) { + /* + * Compressed format is specified by the wbits parameter. See zlib.h + * for details. + */ + + if (format == TCL_ZLIB_FORMAT_RAW) { + wbits = -MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_GZIP) { + wbits = MAX_WBITS+16; + } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + wbits = MAX_WBITS; + } else { + Tcl_Panic("incorrect zlib data format, must be " + "TCL_ZLIB_FORMAT_ZLIB, TCL_ZLIB_FORMAT_GZIP or " + "TCL_ZLIB_FORMAT_RAW"); + } + if (level < -1 || level > 9) { + if (interp) { + Tcl_SetResult(interp, "Compression level should be between " + "0 (no compression) and 9 (best compression) or -1 " + "for default compression level.", TCL_STATIC); + } + return TCL_ERROR; + } + } else { + /* + * mode == ZLIB_INFLATE + * wbits are the same as DEFLATE, but FORMAT_AUTO is valid too. + */ + + if (format == TCL_ZLIB_FORMAT_RAW) { + wbits = -MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_GZIP) { + wbits = MAX_WBITS+16; + } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + wbits = MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_AUTO) { + wbits = MAX_WBITS+32; + } else { + Tcl_Panic("incorrect zlib data format, must be " + "TCL_ZLIB_FORMAT_ZLIB, TCL_ZLIB_FORMAT_GZIP, " + "TCL_ZLIB_FORMAT_RAW or TCL_ZLIB_FORMAT_AUTO"); + } + } + + zsh = (zlibStreamHandle *) ckalloc(sizeof(zlibStreamHandle)); + zsh->interp = interp; + zsh->mode = mode; + zsh->format = format; + zsh->level = level; + zsh->wbits = wbits; + zsh->current_input = NULL; + zsh->streamend = 0; + zsh->stream.avail_in = 0; + zsh->stream.next_in = 0; + zsh->stream.zalloc = 0; + zsh->stream.zfree = 0; + zsh->stream.opaque = 0; /* Must be initialized before calling + * (de|in)flateInit2 */ + + /* + * No output buffer available yet + */ + + zsh->stream.avail_out = 0; + zsh->stream.next_out = NULL; + + if (mode == TCL_ZLIB_STREAM_DEFLATE) { + e = deflateInit2(&zsh->stream, level, Z_DEFLATED, wbits, + MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } else { + e = inflateInit2(&zsh->stream, wbits); + } + + if (e != Z_OK) { + if (interp) { + Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + } + goto error; + } + + /* + * I could do all this in C, but this is easier. + */ + + if (interp != NULL) { + if (Tcl_Eval(interp, "incr ::zlib::cmdcounter") != TCL_OK) { + goto error; + } + Tcl_DStringInit(&cmdname); + Tcl_DStringAppend(&cmdname, "::zlib::streamcmd-", -1); + Tcl_DStringAppend(&cmdname, Tcl_GetString(Tcl_GetObjResult(interp)), + -1); + if (Tcl_GetCommandInfo(interp, Tcl_DStringValue(&cmdname), + &cmdinfo) == 1 ) { + Tcl_SetResult(interp, + "BUG: Stream command name already exists", TCL_STATIC); + goto error; + } + Tcl_ResetResult(interp); + + /* + * Create the command. + */ + + Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdname), + ZlibStreamCmd, zsh, ZlibStreamCmdDelete); + + /* + * Create the cmdname obj for future reference. + */ + + zsh->cmdname = Tcl_NewStringObj(Tcl_DStringValue(&cmdname), + Tcl_DStringLength(&cmdname)); + Tcl_IncrRefCount(zsh->cmdname); + Tcl_DStringFree(&cmdname); + } else { + zsh->cmdname = NULL; + } + + /* + * Prepare the buffers for use. + */ + + zsh->indata = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(zsh->indata); + zsh->outdata = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(zsh->outdata); + + zsh->inpos = 0; + zsh->outpos = 0; + + /* + * Now set the int pointed to by *zshandle to the pointer to the zsh + * struct. + */ + + if (zshandle) { + *zshandle = (Tcl_ZlibStream) zsh; + } + + return TCL_OK; + error: + ckfree((char *) zsh); + return TCL_ERROR; +} + +/* + *---------------------------------------------------------------------- + * + * ZlibStreamCmdDelete -- + * + * This is the delete command which Tcl invokes when a zlibstream command + * is deleted from the interpreter (on stream close, usually). + * + * Results: + * None + * + * Side effects: + * Invalidates the zlib stream handle as obtained from Tcl_ZlibStreamInit + * + *---------------------------------------------------------------------- + */ + +static void +ZlibStreamCmdDelete( + ClientData cd) +{ + zlibStreamHandle *zsh = cd; + + ZlibStreamCleanup(zsh); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamClose -- + * + * This procedure must be called after (de)compression is done to ensure + * memory is freed and the command is deleted from the interpreter (if + * any). + * + * Results: + * A standard Tcl result. + * + * Side effects: + * Invalidates the zlib stream handle as obtained from Tcl_ZlibStreamInit + * + *---------------------------------------------------------------------- + */ + +int +Tcl_ZlibStreamClose( + Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit. */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + + /* + * If the interp is set, deleting the command will trigger + * ZlibStreamCleanup in ZlibStreamCmdDelete. If no interp is set, call + * ZlibStreamCleanup directly. + */ + + if (zsh->interp && zsh->cmdname) { + Tcl_DeleteCommand(zsh->interp, + Tcl_GetStringFromObj(zsh->cmdname, NULL)); + } else { + ZlibStreamCleanup(zsh); + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ZlibStreamCleanup -- + * + * This procedure is called by either Tcl_ZlibStreamClose or + * ZlibStreamCmdDelete to cleanup the stream context. + * + * Results: + * None + * + * Side effects: + * Invalidates the zlib stream handle. + * + *---------------------------------------------------------------------- + */ + +void +ZlibStreamCleanup( + zlibStreamHandle *zsh) +{ + if (!zsh->streamend) { + if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { + deflateEnd(&zsh->stream); + } else { + inflateEnd(&zsh->stream); + } + } + + if (zsh->indata) { + Tcl_DecrRefCount(zsh->indata); + } + if (zsh->outdata) { + Tcl_DecrRefCount(zsh->outdata); + } + if (zsh->cmdname) { + Tcl_DecrRefCount(zsh->cmdname); + } + if (zsh->current_input) { + Tcl_DecrRefCount(zsh->current_input); + } + + ckfree((void *) zsh); +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamReset -- + * + * This procedure will reinitialize an existing stream handle. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * Any data left in the (de)compression buffer is lost. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_ZlibStreamReset( + Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + int e; + + if (!zsh->streamend) { + if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { + deflateEnd(&zsh->stream); + } else { + inflateEnd(&zsh->stream); + } + } + Tcl_SetByteArrayLength(zsh->indata, 0); + Tcl_SetByteArrayLength(zsh->outdata, 0); + if (zsh->current_input) { + Tcl_DecrRefCount(zsh->current_input); + zsh->current_input=NULL; + } + + zsh->inpos = 0; + zsh->outpos = 0; + zsh->streamend = 0; + zsh->stream.avail_in = 0; + zsh->stream.next_in = 0; + zsh->stream.zalloc = 0; + zsh->stream.zfree = 0; + zsh->stream.opaque = 0; /* Must be initialized before calling + * (de|in)flateInit2 */ + + /* No output buffer available yet */ + zsh->stream.avail_out = 0; + zsh->stream.next_out = NULL; + + if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { + e = deflateInit2(&zsh->stream, zsh->level, Z_DEFLATED, zsh->wbits, + MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } else { + e = inflateInit2(&zsh->stream, zsh->wbits); + } + + if ( e != Z_OK ) { + if (zsh->interp) { + Tcl_SetResult(zsh->interp, (char*) zError(e), TCL_STATIC); + } + /* TODOcleanup */ + return TCL_ERROR; + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamGetCommandName -- + * + * This procedure will return the command name associated with the + * stream. + * + * Results: + * A Tcl_Obj with the name of the Tcl command or NULL if no command is + * associated with the stream. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_Obj * +Tcl_ZlibStreamGetCommandName( + Tcl_ZlibStream zshandle) /* as obtained from Tcl_ZlibStreamInit */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + + return zsh->cmdname; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamEof -- + * + * This procedure This function returns 0 or 1 depending on the state of + * the (de)compressor. For decompression, eof is reached when the entire + * compressed stream has been decompressed. For compression, eof is + * reached when the stream has been flushed with ZLIB_FINALIZE. + * + * Results: + * Integer. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_ZlibStreamEof( + Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + + return zsh->streamend; +} + +int +Tcl_ZlibStreamAdler32( + Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + + return zsh->stream.adler; +} + +#ifdef DISABLED_CODE +int +Tcl_ZlibStreamAdd( + Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ + char *data, /* Data to compress/decompress */ + int size, /* Byte length of data */ + int flush, /* 0, ZLIB_FLUSH, ZLIB_FULLFLUSH, + * ZLIB_FINALIZE */ + Tcl_Obj *outdata, /* An object to append the compressed data + * to. */ + int buffersize) /* Hint of the expected output size of + * inflate/deflate */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + char *datatmp=0, *outptr=0; + int e, outsize; + + zsh->stream.next_in = data; + zsh->stream.avail_in = size; + + if (zsh->mode == ZLIB_DEFLATE) { + if (buffersize < 6) { + /* + * The 6 comes from the zlib.h description of deflate. If the + * suggested buffer size is below 6, use deflateBound to get the + * minimum number of bytes needed from zlib. + */ + + zsh->stream.avail_out = + deflateBound(&zsh->stream, zsh->stream.avail_in); + } else { + zsh->stream.avail_out=buffersize; + } + datatmp = ckalloc(zsh->stream.avail_out); + zsh->stream.next_out = datatmp; + e = deflate(&zsh->stream, flush); + while ((e==Z_OK || e==Z_BUF_ERROR) && zsh->stream.avail_out==0) { + /* Output buffer too small */ + Tcl_Panic("StreamAdd/Deflate - Buffer growing not implemented yet"); + } + + /* + * Now append the (de)compressed data to outdata. + */ + + Tcl_GetByteArrayFromObj(outdata, &outsize); + outptr = Tcl_SetByteArrayLength(outdata, + outsize + zsh->stream.total_out); + memcpy(&outptr[outsize], datatmp, zsh->stream.total_out); + } else { + if (buffersize == 0) { + /* Start with a buffer 3 times the size of the input data */ + /* TODO: integer bounds/overflow check */ + buffersize = 3*zsh->stream.avail_in; + } + Tcl_Panic("StreamAdd/Inflate - not implemented yet"); + } + return TCL_OK; +} +#endif /* DISABLED_CODE */ + +int +Tcl_ZlibStreamPut( + Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ + Tcl_Obj *data, /* Data to compress/decompress */ + int flush) /* 0, ZLIB_FLUSH, ZLIB_FULLFLUSH, + * ZLIB_FINALIZE */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + char *datatmp = 0; + int e, size, outsize; + Tcl_Obj *obj; + + if (zsh->streamend) { + if (zsh->interp) { + Tcl_SetResult(zsh->interp, "already past compressed stream end", + TCL_STATIC); + } + return TCL_ERROR; + } + + if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { + zsh->stream.next_in = Tcl_GetByteArrayFromObj(data, &size); + zsh->stream.avail_in = size; + + /* + * Deflatebound doesn't seem to take various header sizes into + * account, so we add 100 extra bytes. + */ + + outsize = deflateBound(&zsh->stream, zsh->stream.avail_in) + 100; + zsh->stream.avail_out = outsize; + datatmp = ckalloc(zsh->stream.avail_out); + zsh->stream.next_out = (Bytef *) datatmp; + + e = deflate(&zsh->stream, flush); + if ((e==Z_OK || e==Z_BUF_ERROR) && (zsh->stream.avail_out == 0)) { + if (outsize - zsh->stream.avail_out > 0) { + /* + * Output buffer too small. + */ + + obj = Tcl_NewByteArrayObj((unsigned char *) datatmp, + outsize - zsh->stream.avail_out); + /* + * Now append the compressed data to the outbuffer. + */ + Tcl_ListObjAppendElement(zsh->interp, zsh->outdata, obj); + } + if (outsize < 0xFFFF) { + outsize = 0xFFFF; /* There may be *lots* of data left to + * output... */ + ckfree(datatmp); + datatmp = ckalloc(outsize); + } + zsh->stream.avail_out = outsize; + zsh->stream.next_out = (Bytef *) datatmp; + + e = deflate(&zsh->stream, flush); + } + + /* + * And append the final data block. + */ + + if (outsize - zsh->stream.avail_out > 0) { + obj = Tcl_NewByteArrayObj((unsigned char *) datatmp, + outsize - zsh->stream.avail_out); + + /* + * Now append the compressed data to the outbuffer. + */ + + Tcl_ListObjAppendElement(zsh->interp, zsh->outdata, obj); + } + } else { + /* + * This is easy. Just append to inbuffer. + */ + + Tcl_ListObjAppendElement(zsh->interp, zsh->indata, data); + + /* + * and we'll need the flush parameter for the Inflate call. + */ + + zsh->flush = flush; + } + + return TCL_OK; +} + +int +Tcl_ZlibStreamGet( + Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ + Tcl_Obj *data, /* A place to put the data */ + int count) /* Number of bytes to grab as a maximum, you + * may get less! */ +{ + zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + int e, i; + int llength, itemlen, datapos=0; + Tcl_Obj *lobj; + unsigned char *dataptr, *itemptr; + + /* + * Getting beyond the of stream, just return empty string. + */ + + if (zsh->streamend) { + return TCL_OK; + } + + if (zsh->mode == TCL_ZLIB_STREAM_INFLATE) { + if (count == -1) { + /* + * The only safe thing to do is restict to 65k. We might cause a + * panic for out of memory if we just kept growing the buffer. + */ + + count = 65536; + } + + /* + * Prepare the place to store the data. + */ + + dataptr = Tcl_SetByteArrayLength(data, count); + + zsh->stream.next_out = dataptr; + zsh->stream.avail_out = count; + if (zsh->stream.avail_in == 0) { + /* + * zlib will probably need more data to decompress. + */ + + if (zsh->current_input) { + Tcl_DecrRefCount(zsh->current_input); + zsh->current_input=0; + } + if (Tcl_ListObjLength(zsh->interp, zsh->indata, + &llength) != TCL_OK) { + return TCL_ERROR; + } + if (llength > 0) { + /* + * There is more input available, get it from the list and + * give it to zlib. + */ + + if (Tcl_ListObjIndex(zsh->interp, zsh->indata, 0, + &lobj) != TCL_OK) { + return TCL_ERROR; + } + itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); + Tcl_IncrRefCount(lobj); + zsh->current_input = lobj; + zsh->stream.next_in = itemptr; + zsh->stream.avail_in = itemlen; + + /* + * And remove it from the list + */ + + Tcl_ListObjReplace(NULL, zsh->indata, 0, 1, 0, NULL); + llength--; + } + } + + e = inflate(&zsh->stream, zsh->flush); + if (Tcl_ListObjLength(zsh->interp, zsh->indata, &llength) != TCL_OK) { + return TCL_ERROR; + } + + /*printf("llength %d, e==%d, avail_out %d\n", llength, e, zsh->stream.avail_out);*/ + while ((zsh->stream.avail_out > 0) && (e==Z_OK || e==Z_BUF_ERROR) + && (llength > 0)) { + /* + * State: We have not satisfied the request yet and there may be + * more to inflate. + */ + + if (zsh->stream.avail_in > 0) { + if (zsh->interp) { + Tcl_SetResult(zsh->interp, + "Unexpected zlib internal state during decompression", + TCL_STATIC); + } + return TCL_ERROR; + } + + if (zsh->current_input) { + Tcl_DecrRefCount(zsh->current_input); + zsh->current_input = 0; + } + + if (Tcl_ListObjIndex(zsh->interp, zsh->indata, 0, + &lobj) != TCL_OK) { + return TCL_ERROR; + } + itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); + Tcl_IncrRefCount(lobj); + zsh->current_input = lobj; + zsh->stream.next_in = itemptr; + zsh->stream.avail_in = itemlen; + + /* + * And remove it from the list. + */ + + Tcl_ListObjReplace(NULL, zsh->indata, 0, 1, 0, NULL); + llength--; + + /* + * And call inflate again + */ + + e = inflate(&zsh->stream, zsh->flush); + } + if (zsh->stream.avail_out > 0) { + Tcl_SetByteArrayLength(data, count - zsh->stream.avail_out); + } + if (!(e==Z_OK || e==Z_STREAM_END || e==Z_BUF_ERROR)) { + if (zsh->interp) { + Tcl_SetResult(zsh->interp, zsh->stream.msg, TCL_VOLATILE); + } + return TCL_ERROR; + } + if (e == Z_STREAM_END) { + zsh->streamend = 1; + if (zsh->current_input) { + Tcl_DecrRefCount(zsh->current_input); + zsh->current_input = 0; + } + inflateEnd(&zsh->stream); + } + } else { + if (Tcl_ListObjLength(zsh->interp, zsh->outdata, + &llength) != TCL_OK) { + return TCL_ERROR; + } + + if (count == -1) { + count = 0; + for (i=0; iinterp, zsh->outdata, i, + &lobj) != TCL_OK) { + return TCL_ERROR; + } + itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); + if (i == 0) { + count += itemlen - zsh->outpos; + } else { + count += itemlen; + } + } + } + + /* + * Prepare the place to store the data. + */ + + dataptr = Tcl_SetByteArrayLength(data, count); + + while ((count > datapos) && (Tcl_ListObjLength(zsh->interp, + zsh->outdata, &llength) == TCL_OK) && (llength > 0)) { + Tcl_ListObjIndex(zsh->interp, zsh->outdata, 0, &lobj); + itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); + if (itemlen-zsh->outpos >= count-datapos) { + memcpy(dataptr+datapos, itemptr+zsh->outpos, count-datapos); + zsh->outpos += count - datapos; + datapos += count-datapos; + if (zsh->outpos == itemlen) { + zsh->outpos = 0; + } + } else { + memcpy(dataptr+datapos, itemptr+zsh->outpos, + itemlen-zsh->outpos); + datapos += itemlen- zsh->outpos; + zsh->outpos = 0; + } + if (zsh->outpos == 0) { + Tcl_ListObjReplace(NULL, zsh->outdata, 0, 1, 0, NULL); + } + } + Tcl_SetByteArrayLength(data, datapos); + } + return TCL_OK; +} + +/* + * Deflate the contents of Tcl_Obj *data with compression level in output + * format. + */ + +int +Tcl_ZlibDeflate( + Tcl_Interp *interp, + int format, + Tcl_Obj *data, + int level) +{ + int wbits = 0, bdlen = 0, e = 0; + Byte *bdata = 0; + z_stream stream; + Tcl_Obj *obj; + + /* + * We pass the data back in the interp result obj... + */ + + if (!interp) { + return TCL_ERROR; + } + obj = Tcl_GetObjResult(interp); + + /* + * Compressed format is specified by the wbits parameter. See zlib.h for + * details. + */ + + if (format == TCL_ZLIB_FORMAT_RAW) { + wbits = -MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_GZIP) { + wbits = MAX_WBITS + 16; + } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + wbits = MAX_WBITS; + } else { + Tcl_Panic("incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, " + "TCL_ZLIB_FORMAT_GZIP or TCL_ZLIB_FORMAT_ZLIB"); + } + + if (level < -1 || level > 9) { + Tcl_Panic("compression level should be between 0 (uncompressed) and " + "9 (best compression) or -1 for default compression level"); + } + + /* + * Obtain the pointer to the byte array, we'll pass this pointer straight + * to the deflate command. + */ + + bdata = Tcl_GetByteArrayFromObj(data, &bdlen); + stream.avail_in = (uInt) bdlen; + stream.next_in = bdata; + stream.zalloc = 0; + stream.zfree = 0; + stream.opaque = 0; /* Must be initialized before calling + * deflateInit2 */ + + /* + * No output buffer available yet, will alloc after deflateInit2. + */ + + stream.avail_out = 0; + stream.next_out = NULL; + + e = deflateInit2(&stream, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, + Z_DEFAULT_STRATEGY); + + if (e != Z_OK) { + Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + return TCL_ERROR; + } + + /* + * Allocate the output buffer from the value of deflateBound(). This is + * probably too much space. Before returning to the caller, we will reduce + * it back to the actual compressed size. + */ + + stream.avail_out = deflateBound(&stream, bdlen); + /* TODO: What happens if this next call fails? */ + Tcl_SetByteArrayLength(obj, stream.avail_out); + + /* + * And point the output buffer to the obj buffer. + */ + + stream.next_out = Tcl_GetByteArrayFromObj(obj, NULL); + + /* + * Perform the compression, Z_FINISH means do it in one go. + */ + + e = deflate(&stream, Z_FINISH); + + if (e != Z_STREAM_END) { + deflateEnd(&stream); + + /* + * deflateEnd() returns Z_OK when there are bytes left to compress, at + * this point we consider that an error, although we could continue by + * allocating more memory and calling deflate() again. + */ + + if (e == Z_OK) { + e = Z_BUF_ERROR; + } + } else { + e = deflateEnd(&stream); + } + + if (e != Z_OK) { + Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + return TCL_ERROR; + } + + /* + * Reduce the BA length to the actual data length produced by deflate. + */ + + Tcl_SetByteArrayLength(obj, stream.total_out); + + return TCL_OK; +} + +int +Tcl_ZlibInflate( + Tcl_Interp *interp, + int format, + Tcl_Obj *data, + int buffersize) +{ + int wbits = 0 , inlen = 0, e = 0, newbuffersize; + Byte *indata = NULL, *outdata = NULL, *newoutdata = NULL; + z_stream stream; + Tcl_Obj *obj; + + /* + * We pass the data back in the interp result obj... + */ + + if (!interp) { + return TCL_ERROR; + } + obj = Tcl_GetObjResult(interp); + + /* + * Compressed format is specified by the wbits parameter. See zlib.h for + * details. + */ + + if (format == TCL_ZLIB_FORMAT_RAW) { + wbits = -MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_GZIP) { + wbits = MAX_WBITS+16; + } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + wbits = MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_AUTO) { + wbits = MAX_WBITS+32; + } else { + Tcl_Panic("incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, " + "TCL_ZLIB_FORMAT_GZIP, TCL_ZLIB_FORMAT_RAW or ZLIB_FORMAT_AUTO"); + } + + indata = Tcl_GetByteArrayFromObj(data,&inlen); + if (buffersize == 0) { + /* + * Start with a buffer 3 times the size of the input data. + * + * TODO: integer bounds/overflow check + */ + + buffersize = 3*inlen; + } + + outdata = Tcl_SetByteArrayLength(obj, buffersize); + stream.zalloc = 0; + stream.zfree = 0; + stream.avail_in = (uInt) inlen+1; /* +1 because ZLIB can "over-request" + * input (but ignore it!) */ + stream.next_in = indata; + stream.avail_out = buffersize; + stream.next_out = outdata; + + /* + * Start the decompression cycle. + */ + + e = inflateInit2(&stream, wbits); + if (e != Z_OK) { + Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + return TCL_ERROR; + } + while (1) { + e = inflate(&stream, Z_FINISH); + if (e != Z_BUF_ERROR) { + break; + } + + /* + * Not enough room in the output buffer. Increase it by five times the + * bytes still in the input buffer. (Because 3 times didn't do the + * trick before, 5 times is what we do next.) Further optimization + * should be done by the user, specify the decompressed size! + */ + + if ((stream.avail_in == 0) && (stream.avail_out > 0)) { + Tcl_SetResult(interp, "decompression failed, input truncated?", + TCL_STATIC); + return TCL_ERROR; + } + newbuffersize = buffersize + 5 * stream.avail_in; + if (newbuffersize == buffersize) { + newbuffersize = buffersize+1000; + } + newoutdata = Tcl_SetByteArrayLength(obj, newbuffersize); + + /* + * Set next out to the same offset in the new location. + */ + + stream.next_out = newoutdata + stream.total_out; + + /* + * And increase avail_out with the number of new bytes allocated. + */ + + stream.avail_out += newbuffersize - buffersize; + outdata = newoutdata; + buffersize = newbuffersize; + } + + if (e != Z_STREAM_END) { + inflateEnd(&stream); + Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + return TCL_ERROR; + } + + e = inflateEnd(&stream); + if (e != Z_OK) { + Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + return TCL_ERROR; + } + + /* + * Reduce the BA length to the actual data length produced by deflate. + */ + + Tcl_SetByteArrayLength(obj, stream.total_out); + return TCL_OK; +} + +unsigned int +Tcl_ZlibCRC32( + unsigned int crc, + const char *buf, + unsigned int len) +{ + /* Nothing much to do, just wrap the crc32(). */ + return crc32(crc, (Bytef *) buf, len); +} + +unsigned int +Tcl_ZlibAdler32( + unsigned int adler, + const char *buf, + unsigned int len) +{ + return adler32(adler, (Bytef *) buf, len); +} + +static int +ZlibCmd( + ClientData notUsed, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + int command, dlen, mode, format; +#ifdef TCLKIT_BUILD + int wbits = -MAX_WBITS; +#endif + unsigned start, level = -1, buffersize = 0; + Tcl_ZlibStream zh; + Byte *data; + Tcl_Obj *obj = Tcl_GetObjResult(interp); + static const char *commands[] = { + "adler32", "compress", "crc32", "decompress", "deflate", "gunzip", + "gzip", "inflate", +#ifdef TCLKIT_BUILD + "sdecompress", "sinflate", +#endif + "stack", "stream", "unstack", + NULL + }; + enum zlibCommands { + z_adler32, z_compress, z_crc32, z_decompress, z_deflate, z_gunzip, + z_gzip, z_inflate, +#ifdef TCLKIT_BUILD + z_sdecompress, z_sinflate, +#endif + z_stack, z_stream, z_unstack + }; + static const char *stream_formats[] = { + "compress", "decompress", "deflate", "gunzip", "gzip", "inflate", + NULL + }; + enum zlibFormats { + f_compress, f_decompress, f_deflate, f_gunzip, f_gzip, f_inflate + }; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "command arg ?...?"); + return TCL_ERROR; + } + if (Tcl_GetIndexFromObj(interp, objv[1], commands, "command", 0, + &command) != TCL_OK) { + return TCL_ERROR; + } + + switch ((enum zlibCommands) command) { + case z_adler32: /* adler32 str ?startvalue? -> checksum */ + if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], + (int *) &start) != TCL_OK) { + return TCL_ERROR; + } + if (objc < 4) { + start = Tcl_ZlibAdler32(0, 0, 0); + } + data = Tcl_GetByteArrayFromObj(objv[2], &dlen); + Tcl_SetIntObj(obj, (int) + Tcl_ZlibAdler32(start, (const char *) data, dlen)); + return TCL_OK; + case z_crc32: /* crc32 str ?startvalue? -> checksum */ + if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], + (int *) &start) != TCL_OK) { + return TCL_ERROR; + } + if (objc < 4) { + start = Tcl_ZlibCRC32(0, 0, 0); + } + data = Tcl_GetByteArrayFromObj(objv[2],&dlen); + Tcl_SetIntObj(obj, (int) + Tcl_ZlibCRC32(start, (const char *) data, dlen)); + return TCL_OK; + case z_deflate: /* deflate data ?level? -> rawCompressedData */ + if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], + (int *) &level) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], level); + case z_compress: /* compress data ?level? -> zlibCompressedData */ + if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], + (int *) &level) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], level); + case z_gzip: /* gzip data ?level? -> gzippedCompressedData */ + if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], + (int *) &level) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], level); + case z_inflate: /* inflate rawcomprdata ?bufferSize? -> decompressedData */ + if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], + (int *) &buffersize) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], + buffersize); + case z_decompress: /* decompress zlibcomprdata ?bufferSize? -> decompressedData */ + /* We rely on TCL_ZLIB_FORMAT_AUTO to determine type. */ + case z_gunzip: /* gunzip gzippeddata ?bufferSize? -> decompressedData */ + if (objc > 3 && Tcl_GetIntFromObj(interp, objv[3], + (int *) &buffersize) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_AUTO, objv[2], + buffersize); + case z_stream: /* stream deflate/inflate/...gunzip ?level?*/ + if (Tcl_GetIndexFromObj(interp, objv[2], stream_formats, + "stream format", 0, &format) != TCL_OK) { + Tcl_AppendResult(interp, "format error: integer", NULL); + return TCL_ERROR; + } + mode = TCL_ZLIB_STREAM_INFLATE; + switch ((enum zlibFormats) format) { + case f_deflate: + mode = TCL_ZLIB_STREAM_DEFLATE; + case f_inflate: + format = TCL_ZLIB_FORMAT_RAW; + break; + case f_compress: + mode = TCL_ZLIB_STREAM_DEFLATE; + case f_decompress: + format = TCL_ZLIB_FORMAT_ZLIB; + break; + case f_gzip: + mode = TCL_ZLIB_STREAM_DEFLATE; + case f_gunzip: + format = TCL_ZLIB_FORMAT_GZIP; + break; + } + if (objc >= 4) { + if (Tcl_GetIntFromObj(interp, objv[3], + (int *) &level) != TCL_OK) { + Tcl_AppendResult(interp, "level error: integer", NULL); + return TCL_ERROR; + } + } else { + level = Z_DEFAULT_COMPRESSION; + } + if (Tcl_ZlibStreamInit(interp, mode, format, level, &zh) != TCL_OK) { + Tcl_AppendResult(interp, "stream init error: integer", NULL); + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_ZlibStreamGetCommandName(zh)); + return TCL_OK; + case z_stack: /* stack */ + break; + case z_unstack: /* unstack */ + break; +#ifdef TCLKIT_BUILD + case z_sdecompress: /* sdecompress cmdname -> */ + wbits = MAX_WBITS; + case z_sinflate: {/* sinflate cmdname -> */ + zlibstream *zp = (zlibstream *) ckalloc(sizeof(zlibstream)); + + zp->indata = Tcl_NewObj(); + Tcl_IncrRefCount(zp->indata); + zp->stream.zalloc = 0; + zp->stream.zfree = 0; + zp->stream.opaque = 0; + zp->stream.next_in = 0; + zp->stream.avail_in = 0; + inflateInit2(&zp->stream, wbits); + Tcl_CreateObjCommand(interp, Tcl_GetStringFromObj(objv[2], 0), + zstreamincmd, zp, zstreamdelproc); + return TCL_OK; + } +#endif /* TCLKIT_BUILD */ + }; + + return TCL_ERROR; +} + +static int +ZlibStreamCmd( + ClientData cd, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Tcl_ZlibStream zstream = cd; + int command, index, count; + Tcl_Obj *obj = Tcl_GetObjResult(interp); + int buffersize; + int flush = -1, i; + static const char *cmds[] = { + "add", "adler32", "close", "eof", "finalize", "flush", + "fullflush", "get", "put", "reset", + NULL + }; + enum zlibStreamCommands { + zs_add, zs_adler32, zs_close, zs_eof, zs_finalize, zs_flush, + zs_fullflush, zs_get, zs_put, zs_reset + }; + static const char *add_options[] = { + "-buffer", "-finalize", "-flush", "-fullflush", NULL + }; + enum addOptions { + ao_buffer, ao_finalize, ao_flush, ao_fullflush + }; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "option data ?...?"); + return TCL_ERROR; + } + + if (Tcl_GetIndexFromObj(interp, objv[1], cmds, "option", 0, + &command) != TCL_OK) { + return TCL_ERROR; + } + + switch ((enum zlibStreamCommands) command) { + case zs_add: /* add ?-flush|-fullflush|-finalize? /data/ */ + for (i=2; i -1) { + flush = -2; + } else { + flush = Z_SYNC_FLUSH; + } + break; + case ao_fullflush: /* -fullflush */ + if (flush > -1) { + flush = -2; + } else { + flush = Z_FULL_FLUSH; + } + break; + case ao_finalize: /* -finalize */ + if (flush > -1) { + flush = -2; + } else { + flush = Z_FINISH; + } + break; + case ao_buffer: /* -buffer */ + if (i == objc-2) { + Tcl_AppendResult(interp, "\"-buffer\" option must be " + "followed by integer decompression buffersize", + NULL); + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(interp, objv[i+1], + &buffersize) != TCL_OK) { + return TCL_ERROR; + } + } + + if (flush == -2) { + Tcl_AppendResult(interp, "\"-flush\", \"-fullflush\" and " + "\"-finalize\" options are mutually exclusive", NULL); + return TCL_ERROR; + } + } + if (flush == -1) { + flush = 0; + } + + if (Tcl_ZlibStreamPut(zstream, objv[objc-1], + flush) != TCL_OK) { + return TCL_ERROR; + } + return Tcl_ZlibStreamGet(zstream, obj, -1); + + case zs_put: /* put ?-flush|-fullflush|-finalize? /data/ */ + for (i=2; i -1) { + flush = -2; + } else { + flush = Z_SYNC_FLUSH; + } + break; + case ao_fullflush: /* -fullflush */ + if (flush > -1) { + flush = -2; + } else { + flush = Z_FULL_FLUSH; + } + break; + case ao_finalize: /* -finalize */ + if (flush > -1) { + flush = -2; + } else { + flush = Z_FINISH; + } + break; + case ao_buffer: + Tcl_AppendResult(interp, + "\"-buffer\" option not supported here", NULL); + return TCL_ERROR; + } + if (flush == -2) { + Tcl_AppendResult(interp, "\"-flush\", \"-fullflush\" and " + "\"-finalize\" options are mutually exclusive", NULL); + return TCL_ERROR; + } + } + if (flush == -1) { + flush = 0; + } + return Tcl_ZlibStreamPut(zstream, objv[objc-1], flush); + + case zs_get: /* get ?count? */ + count = -1; + if (objc >= 3) { + if (Tcl_GetIntFromObj(interp, objv[2], &count) != TCL_OK) { + return TCL_ERROR; + } + } + return Tcl_ZlibStreamGet(zstream, obj, count); + case zs_flush: /* flush */ + Tcl_SetObjLength(obj, 0); + return Tcl_ZlibStreamPut(zstream, obj, Z_SYNC_FLUSH); + case zs_fullflush: /* fullflush */ + Tcl_SetObjLength(obj, 0); + return Tcl_ZlibStreamPut(zstream, obj, Z_FULL_FLUSH); + case zs_finalize: /* finalize */ + /* + * The flush commands slightly abuse the empty result obj as input + * data. + */ + + Tcl_SetObjLength(obj, 0); + return Tcl_ZlibStreamPut(zstream, obj, Z_FINISH); + case zs_close: /* close */ + return Tcl_ZlibStreamClose(zstream); + case zs_eof: /* eof */ + Tcl_SetIntObj(obj, Tcl_ZlibStreamEof(zstream)); + return TCL_OK; + case zs_adler32: /* adler32 */ + Tcl_SetIntObj(obj, Tcl_ZlibStreamAdler32(zstream)); + return TCL_OK; + case zs_reset: /* reset */ + return Tcl_ZlibStreamReset(zstream); + } + + return TCL_OK; +} + +#ifdef ENABLE_CHANSTACKING + /* + * Set of functions to support channel stacking + */ + +static int +ChanClose( + ClientData instanceData, + Tcl_Interp *interp) +{ + Zlib_ChannelData *cd = instanceData; + Tcl_Channel parent; + int e; + + parent = Tcl_GetStackedChannel(cd->channel); + + if (cd->inFormat != ZLIB_PASSTHROUGH) { + if (cd->inFormat && ZLIB_INFLATE) { + e = inflateEnd(&cd->instream); + } else { + e = deflateEnd(&cd->instream); + } + } + + if (cd->outFormat != ZLIB_PASSTHROUGH) { + if (cd->outFormat && ZLIB_INFLATE) { + e = inflateEnd(&cd->outstream); + } else { + e = deflateEnd(&cd->outstream); + } + } + + if (cd->inbuffer) { + ckfree(cd->inbuffer); + cd->inbuffer = NULL; + } + + if (cd->outbuffer) { + ckfree(cd->outbuffer); + cd->outbuffer = NULL; + } + return TCL_OK; +} + +static int +ChanInput( + ClientData instanceData, + char *buf, + int toRead, + int *errorCodePtr) +{ + Zlib_ChannelData *cd = instanceData; + + return TCL_OK; +} + +static int +ChanOutput( + ClientData instanceData, + const char *buf, + int toWrite, + int *errorCodePtr) +{ + Zlib_ChannelData *cd = instanceData; + + return TCL_OK; +} + +static int +ChanSeek( + ClientData instanceData, + long offset, + int mode, + int *errorCodePtr) +{ + Zlib_ChannelData *cd = instanceData; + + return TCL_OK; +} + +static int +ChanSetOption( /* not used */ + ClientData instanceData, + Tcl_Interp *interp, + const char *optionName, + const char *value) +{ + Zlib_ChannelData *cd = instanceData; + Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); + Tcl_DriverSetOptionProc *setOptionProc = + Tcl_ChannelSetOptionProc(Tcl_GetChannelType(parent)); + + if (setOptionProc == NULL) { + return TCL_ERROR; + } + + return setOptionProc(Tcl_GetChannelInstanceData(parent), interp, + optionName, value); +} + +static int +ChanGetOption( /* not used */ + ClientData instanceData, + Tcl_Interp *interp, + const char *optionName, + Tcl_DString *dsPtr) +{ + return TCL_OK; +} + +static void +ChanWatch( + ClientData instanceData, + int mask) +{ + return; +} + +static int +ChanGetHandle( + ClientData instanceData, + int direction, + ClientData *handlePtr) +{ + /* + * No such thing as an OS handle for Zlib. + */ + + return 0; +} + +static int +ChanClose2( /* not used */ + ClientData instanceData, + Tcl_Interp *interp, + int flags) +{ + return TCL_OK; +} + +static int +ChanBlockMode( + ClientData instanceData, + int mode) +{ + Zlib_ChannelData *cd = instanceData; + + if (mode == TCL_MODE_NONBLOCKING) { + cd->flags |= ASYNC; + } else { + cd->flags &= ~ASYNC; + } + return TCL_OK; +} + +static int +ChanFlush( + ClientData instanceData) +{ + Zlib_ChannelData *cd = instanceData; + + return TCL_OK; +} + +static int +ChanHandler( + ClientData instanceData, + int interestMask) +{ + Zlib_ChannelData *cd = instanceData; + + return TCL_OK; +} + +Tcl_WideInt +ChanWideSeek( /* not used */ + ClientData instanceData, + Tcl_WideInt offset, + int mode, + int *errorCodePtr) +{ + return TCL_OK; +} + +Tcl_Channel +Tcl_ZlibStackChannel( + Tcl_Interp *interp, + int inFormat, + int inLevel, + int outFormat, + int outLevel, + Tcl_Channel channel) +{ + Zlib_ChannelData *cd; + int outwbits = 0, inwbits = 0; + int e; + + if (inFormat & ZLIB_FORMAT_RAW) { + inwbits = -MAX_WBITS; + } else if (inFormat & ZLIB_FORMAT_GZIP) { + inwbits = MAX_WBITS+16; + } else if (inFormat & ZLIB_FORMAT_ZLIB) { + inwbits = MAX_WBITS; + } else if ((inFormat & ZLIB_FORMAT_AUTO) && (inFormat & ZLIB_INFLATE)) { + inwbits = MAX_WBITS+32; + } else if (inFormat != ZLIB_PASSTHROUGH) { + Tcl_SetResult(interp, "Incorrect zlib read/input data format, must " + "be ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " + "ZLIB_FORMAT_AUTO (only for inflate).", TCL_STATIC); + return NULL; + } + + if (outFormat & ZLIB_FORMAT_RAW) { + outwbits = -MAX_WBITS; + } else if (outFormat & ZLIB_FORMAT_GZIP) { + outwbits = MAX_WBITS+16; + } else if (outFormat & ZLIB_FORMAT_ZLIB) { + outwbits = MAX_WBITS; + } else if ((outFormat & ZLIB_FORMAT_AUTO) && (outFormat & ZLIB_INFLATE)) { + outwbits = MAX_WBITS+32; + } else if (outFormat != ZLIB_PASSTHROUGH) { + Tcl_SetResult(interp, "Incorrect zlib write/output data format, must " + "be ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " + "ZLIB_FORMAT_AUTO (only for inflate).", TCL_STATIC); + return NULL; + } + + cd = (Zlib_ChannelData *) ckalloc(sizeof(Zlib_ChannelData)); + cd->inFormat = inFormat; + cd->outFormat = outFormat; + + cd->instream.zalloc = 0; + cd->instream.zfree = 0; + cd->instream.opaque = 0; + cd->instream.avail_in = 0; + cd->instream.next_in = NULL; + cd->instream.avail_out = 0; + cd->instream.next_out = NULL; + + cd->outstream.zalloc = 0; + cd->outstream.zfree = 0; + cd->outstream.opaque = 0; + cd->outstream.avail_in = 0; + cd->outstream.next_in = NULL; + cd->outstream.avail_out = 0; + cd->outstream.next_out = NULL; + + if (inFormat != ZLIB_PASSTHROUGH) { + if (inFormat & ZLIB_INFLATE) { + /* Initialize for Inflate */ + e = inflateInit2(&cd->instream, inwbits); + } else { + /* Initialize for Deflate */ + e = deflateInit2(&cd->instream, inLevel, Z_DEFLATED, inwbits, + MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } + } + + if (outFormat != ZLIB_PASSTHROUGH) { + if (outFormat && ZLIB_INFLATE) { + /* Initialize for Inflate */ + e = inflateInit2(&cd->outstream, outwbits); + } else { + /* Initialize for Deflate */ + e = deflateInit2(&cd->outstream, outLevel, Z_DEFLATED, outwbits, + MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } + } + + cd->channel = Tcl_StackChannel(interp, &zlibChannelType, cd, + TCL_READABLE | TCL_WRITABLE | TCL_EXCEPTION, channel); + Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetChannelName(channel), + -1)); + return channel; +} + +#endif /* ENABLE_CHANSTACKING */ + +/* + * Finaly, the TclZlibInit function. Used to install the zlib API. + */ + +int +TclZlibInit( + Tcl_Interp *interp) +{ + Tcl_Eval(interp, "namespace eval ::zlib {variable cmdcounter 0}"); + Tcl_CreateObjCommand(interp, "zlib", ZlibCmd, 0, 0); + return TCL_OK; +} +#endif /* REIMPLEMENT */ + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/unix/Makefile.in b/unix/Makefile.in index cf31632..415535c 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.248 2008/11/10 17:57:30 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.249 2008/12/11 01:21:52 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -283,7 +283,8 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclCompile.o tclConfig.o tclDate.o tclDictObj.o tclEncoding.o \ tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o \ tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o \ - tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o tclListObj.o \ + tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o \ + tclLink.o tclListObj.o \ tclLiteral.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o \ tclObj.o tclPanic.o tclParse.o tclPathObj.o tclPipe.o \ tclPkg.o tclPkgConfig.o tclPosixStr.o \ @@ -291,7 +292,7 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclResolve.o tclResult.o tclScan.o tclStringObj.o \ tclStrToD.o tclThread.o \ tclThreadAlloc.o tclThreadJoin.o tclThreadStorage.o tclStubInit.o \ - tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o \ + tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o tclZlib.o \ tclTomMathInterface.o OO_OBJS = tclOO.o tclOOBasic.o tclOOCall.o tclOODefineCmds.o tclOOInfo.o \ @@ -429,7 +430,8 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclTimer.c \ $(GENERIC_DIR)/tclTrace.c \ $(GENERIC_DIR)/tclUtil.c \ - $(GENERIC_DIR)/tclVar.c + $(GENERIC_DIR)/tclVar.c \ + $(GENERIC_DIR)/tclZlib.c OO_SRCS = \ $(GENERIC_DIR)/tclOO.c \ @@ -1230,6 +1232,9 @@ tclUtf.o: $(GENERIC_DIR)/tclUtf.c $(GENERIC_DIR)/tclUniData.c tclVar.o: $(GENERIC_DIR)/tclVar.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclVar.c +tclZlib.o: $(GENERIC_DIR)/tclZlib.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclZlib.c + tclTest.o: $(GENERIC_DIR)/tclTest.c $(IOHDR) $(TCLREHDRS) $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tclTest.c diff --git a/unix/configure.in b/unix/configure.in index e5dc12b..c18c603 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.190 2008/11/29 18:17:19 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.191 2008/12/11 01:21:52 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -113,6 +113,12 @@ LIBS="$LIBS$THREADS_LIBS" SC_ENABLE_SHARED +#------------------------------------------------------------------------ +# Add stuff for zlib +#------------------------------------------------------------------------ + +LIBS="$LIBS -lz" + #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called -- cgit v0.12 From b008803bf2feb7fa0c43d9890e57d94007b5f304 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 11 Dec 2008 05:21:21 +0000 Subject: add TIP #234 files --- macosx/Tcl.xcodeproj/project.pbxproj | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 6565987..66a9799 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -17,6 +17,8 @@ F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C30DF1F78800E04F67 /* tclOOStubInit.c */; }; F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */; }; F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */; }; + F96437CA0EF0D4B2003F468E /* tclZlib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96437C90EF0D4B2003F468E /* tclZlib.c */; }; + F96437E70EF0D652003F468E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F96437E60EF0D652003F468E /* libz.dylib */; }; F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07408F2820D005CB29B /* CoreFoundation.framework */; }; F96D456F08F272BB004A47F5 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED008F272A7004A47F5 /* regcomp.c */; }; F96D457208F272BB004A47F5 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED308F272A7004A47F5 /* regerror.c */; }; @@ -215,6 +217,8 @@ F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = ""; }; F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORTrans.c; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = ""; }; + F96437C90EF0D4B2003F468E /* tclZlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclZlib.c; sourceTree = ""; }; + F96437E60EF0D652003F468E /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = ""; }; F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; F96D3DFA08F272A4004A47F5 /* ChangeLog */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = ChangeLog; sourceTree = ""; }; F96D3DFB08F272A4004A47F5 /* changes */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = changes; sourceTree = ""; }; @@ -956,6 +960,7 @@ buildActionMask = 2147483647; files = ( F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */, + F96437E70EF0D652003F468E /* libz.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -969,7 +974,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.40 2008/08/03 10:19:29 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.41 2008/12/11 05:21:21 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -989,6 +994,7 @@ isa = PBXGroup; children = ( F966C07408F2820D005CB29B /* CoreFoundation.framework */, + F96437E60EF0D652003F468E /* libz.dylib */, ); name = Frameworks; sourceTree = ""; @@ -1359,6 +1365,7 @@ F96D3F3408F272A7004A47F5 /* tclUtf.c */, F96D3F3508F272A7004A47F5 /* tclUtil.c */, F96D3F3608F272A7004A47F5 /* tclVar.c */, + F96437C90EF0D4B2003F468E /* tclZlib.c */, F96D3F3708F272A7004A47F5 /* tommath.h */, ); path = generic; @@ -2145,6 +2152,7 @@ F96D45D308F272BC004A47F5 /* tclUtf.c in Sources */, F96D45D408F272BC004A47F5 /* tclUtil.c in Sources */, F96D45D508F272BC004A47F5 /* tclVar.c in Sources */, + F96437CA0EF0D4B2003F468E /* tclZlib.c in Sources */, F96D48E208F272C3004A47F5 /* bn_fast_s_mp_mul_digs.c in Sources */, F96D48E408F272C3004A47F5 /* bn_fast_s_mp_sqr.c in Sources */, F96D48E708F272C3004A47F5 /* bn_mp_add.c in Sources */, -- cgit v0.12 From 07779703b451dce687221a6608d0bef01e3afde0 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 11 Dec 2008 14:01:59 +0000 Subject: Fallback to European time zone DST rules, when the timezone is between 0 and -12 [Bug 2207436]. --- ChangeLog | 7 +++++++ library/clock.tcl | 33 ++++++++++++++++++++++++++------- tests/clock.test | 24 +++++++++++++++++++++++- 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd16b6e..dd1c8e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-11 Jan Nijtmans + + * library/clock.tcl (ProcessPosixTimeZone): Fallback to + European time zone DST rules, when the timezone is + between 0 and -12 [Bug 2207436]. + * tests/clock.test (clock-64.[12]): Test cases for [Bug 2207436] + 2008-12-11 Donal K. Fellows TIP #234 IMPLEMENTATION diff --git a/library/clock.tcl b/library/clock.tcl index e4a21e3..bfac4e6 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.49 2008/11/30 19:24:00 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.50 2008/12/11 14:01:59 nijtmans Exp $ # #---------------------------------------------------------------------- @@ -3885,23 +3885,42 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { * $dstSignum }] } - # Fill in defaults for US DST rules + # Fill in defaults for European or US DST rules if { [dict get $z startDayOfYear] eq {} && [dict get $z startMonth] eq {} } { + if {($stdHours>=0) && ($stdHours<=12)} { + dict set z startWeekOfMonth 5 + if {$stdHours>1} { + dict set z startHours 2 + } else { + dict set z startHours [expr {$stdHours+1}] + } + } else { + dict set z startWeekOfMonth 2 + dict set z startHours 2 + } dict set z startMonth 3 - dict set z startWeekOfMonth 2 dict set z startDayOfWeek 0 - dict set z startHours 2 dict set z startMinutes 0 dict set z startSeconds 0 } if { [dict get $z endDayOfYear] eq {} && [dict get $z endMonth] eq {} } { - dict set z endMonth 11 - dict set z endWeekOfMonth 1 + if {($stdHours>=0) && ($stdHours<=12)} { + dict set z endMonth 10 + dict set z endWeekOfMonth 5 + if {$stdHours>1} { + dict set z endHours 3 + } else { + dict set z endHours [expr {$stdHours+2}] + } + } else { + dict set z endMonth 11 + dict set z endWeekOfMonth 1 + dict set z endHours 2 + } dict set z endDayOfWeek 0 - dict set z endHours 2 dict set z endMinutes 0 dict set z endSeconds 0 } diff --git a/tests/clock.test b/tests/clock.test index 6f2afdd..b1fcfb6 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.87 2008/11/30 19:24:00 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.88 2008/12/11 14:01:59 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36083,6 +36083,28 @@ test clock-52.1 {Posix timezone and conversion on last Sunday} { set result } {01:59:59 01:59:59 03:00:00 03:00:00} +test clock-52.2 {correct conversion of times in Europe} { + # [Bug 2207436] + set result {} + foreach t [list 1206838799 1206838800 1224982799 1224982800] { + lappend result [clock format $t -format %H:%M:%S \ + -timezone MET-1METDST] + lappend result [clock format $t -format %H:%M:%S \ + -timezone MET0METDST] + } + set result +} {01:59:59 00:59:59 03:00:00 02:00:00 02:59:59 01:59:59 02:00:00 01:00:00} + +test clock-52.3 {correct conversion of times in Russia} { + # [Bug 2207436] + set result {} + foreach t [list 1206799199 1206799200 1224943199 1224943200] { + lappend result [clock format $t -format %H:%M:%S \ + -timezone WST-12WSTDST] + } + set result +} {01:59:59 03:00:00 02:59:59 02:00:00} + # Regression test for Bug # 1505383 test clock-53.1 {%EC %Ey} { -- cgit v0.12 From 936a7590ee71857bd3d31be363540e25cf74a346 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 14:13:33 +0000 Subject: Added basic test suite for zlib --- ChangeLog | 9 +++-- tests/zlib.test | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 tests/zlib.test diff --git a/ChangeLog b/ChangeLog index dd1c8e2..2b3d782 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ +2008-12-11 Donal K. Fellows + + * tests/zlib.test: Start of test suite for zlib command. + 2008-12-11 Jan Nijtmans - * library/clock.tcl (ProcessPosixTimeZone): Fallback to - European time zone DST rules, when the timezone is - between 0 and -12 [Bug 2207436]. + * library/clock.tcl (ProcessPosixTimeZone): Fallback to European time + zone DST rules, when the timezone is between 0 and -12. [Bug 2207436] * tests/clock.test (clock-64.[12]): Test cases for [Bug 2207436] 2008-12-11 Donal K. Fellows diff --git a/tests/zlib.test b/tests/zlib.test new file mode 100644 index 0000000..2e66530 --- /dev/null +++ b/tests/zlib.test @@ -0,0 +1,104 @@ +# The file tests the tclZlib.c file. +# +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. +# +# Copyright (c) 1996-1998 by Sun Microsystems, Inc. +# Copyright (c) 1998-1999 by Scriptics Corporation. +# +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: zlib.test,v 1.1 2008/12/11 14:13:33 dkf Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest 2.1 + namespace import -force ::tcltest::* +} + +test zlib-1.1 {zlib basics} -returnCodes error -body { + zlib +} -result {wrong # args: should be "zlib command arg ?...?"} +test zlib-1.2 {zlib basics} -returnCodes error -body { + zlib ? {} +} -result {bad command "?": must be adler32, compress, crc32, decompress, deflate, gunzip, gzip, inflate, stack, stream, or unstack} + +test zlib-2.1 {zlib compress/decompress} { + zlib decompress [zlib compress abcdefghijklm] +} abcdefghijklm + +test zlib-3.1 {zlib deflate/inflate} { + zlib inflate [zlib deflate abcdefghijklm] +} abcdefghijklm + +test zlib-4.1 {zlib gzip/gunzip} { + zlib gunzip [zlib gzip abcdefghijklm] +} abcdefghijklm + +test zlib-5.1 {zlib adler32} { + format %x [zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde] +} b3b50b9b +test zlib-5.2 {zlib adler32} { + format %x [zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde 42] +} b8830bc4 +test zlib-5.3 {zlib adler32} -returnCodes error -body { + zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde 42 x +} -result {wrong # args: should be "zlib adler32 data ?startValue?"} + +test zlib-6.1 {zlib crc32} { + format %x [zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde] +} 6f73e901 +test zlib-6.2 {zlib crc32} { + format %x [zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42] +} ce1c4914 +test zlib-6.3 {zlib crc32} -returnCodes error -body { + zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42 x +} -result {wrong # args: should be "zlib crc32 data ?startValue?"} + +test zlib-7.0 {zlib stream} -returnCodes error -setup { + set s [zlib stream compress] +} -body { + $s ? +} -cleanup { + $s close +} -result {bad option "?": must be add, adler32, close, eof, finalize, flush, fullflush, get, put, or reset} +test zlib-7.1 {zlib stream} { + set s [zlib stream compress] + $s put -finalize abcdeEDCBA + set data [$s get] + set result [list [$s get] [format %x [$s adler32]]] + $s close + lappend result [zlib decompress $data] +} {{} 136f033f abcdeEDCBA} +test zlib-7.2 {zlib stream} { + set s [zlib stream decompress] + $s put -finalize [zlib compress abcdeEDCBA] + set data [$s get] + set result [list [$s get] [format %x [$s adler32]]] + $s close + lappend result $data +} {{} 136f033f abcdeEDCBA} +test zlib-7.3 {zlib stream} { + set s [zlib stream deflate] + $s put -finalize abcdeEDCBA + set data [$s get] + set result [list [$s get] [format %x [$s adler32]]] + $s close + lappend result [zlib inflate $data] +} {{} 1 abcdeEDCBA} +test zlib-7.4 {zlib stream} { + set s [zlib stream inflate] + $s put -finalize [zlib deflate abcdeEDCBA] + set data [$s get] + set result [list [$s get] [format %x [$s adler32]]] + $s close + lappend result $data +} {{} 1 abcdeEDCBA} + +::tcltest::cleanupTests +return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 061506df27139e5bb86419bf227198af1ae4ff52 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 14:16:41 +0000 Subject: Corrections --- generic/tcl.decls | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 8f6a438..9cd8da6 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.159 2008/12/11 01:21:52 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.160 2008/12/11 14:16:41 dkf Exp $ library tcl @@ -2225,44 +2225,42 @@ declare 609 generic { # TIP#234 (zlib interface) declare 610 generic { int Tcl_ZlibDeflate(Tcl_Interp *interp, int format, Tcl_Obj *data, - int level); + int level, Tcl_Obj *gzipHeaderDictObj) } declare 611 generic { int Tcl_ZlibInflate(Tcl_Interp *interp, int format, Tcl_Obj *data, - int buffersize); + int buffersize, Tcl_Obj *gzipHeaderDictObj) } declare 612 generic { - unsigned int Tcl_ZlibCRC32(unsigned int crc, const char *buf, - unsigned int len); + unsigned int Tcl_ZlibCRC32(unsigned int crc, const char *buf, int len) } declare 613 generic { - unsigned int Tcl_ZlibAdler32(unsigned int adler, const char *buf, - unsigned int len); + unsigned int Tcl_ZlibAdler32(unsigned int adler, const char *buf, int len) } declare 614 generic { int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode, int format, - int level, Tcl_ZlibStream *zshandle); + int level, Tcl_Obj *dictObj, Tcl_ZlibStream *zshandle) } declare 615 generic { - Tcl_Obj *Tcl_ZlibStreamGetCommandName(Tcl_ZlibStream zshandle); + Tcl_Obj *Tcl_ZlibStreamGetCommandName(Tcl_ZlibStream zshandle) } declare 616 generic { - int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle); + int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle) } declare 617 generic { - int Tcl_ZlibStreamAdler32(Tcl_ZlibStream zshandle); + int Tcl_ZlibStreamAdler32(Tcl_ZlibStream zshandle) } declare 618 generic { - int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle, Tcl_Obj *data, int flush); + int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle, Tcl_Obj *data, int flush) } declare 619 generic { - int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle, Tcl_Obj *data, int count); + int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle, Tcl_Obj *data, int count) } declare 620 generic { - int Tcl_ZlibStreamClose(Tcl_ZlibStream zshandle); + int Tcl_ZlibStreamClose(Tcl_ZlibStream zshandle) } declare 621 generic { - int Tcl_ZlibStreamReset(Tcl_ZlibStream zshandle); + int Tcl_ZlibStreamReset(Tcl_ZlibStream zshandle) } ############################################################################## -- cgit v0.12 From 6f25f950eeb02f5f136b2f306c52db1593d2430f Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 14:17:23 +0000 Subject: regen --- generic/tclDecls.h | 133 +++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclStubInit.c | 14 +++++- 2 files changed, 145 insertions(+), 2 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 525b613..45805f2 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.160 2008/12/09 20:16:29 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.161 2008/12/11 14:17:23 dkf Exp $ */ #ifndef _TCLDECLS @@ -3687,6 +3687,77 @@ EXTERN int Tcl_InterpActive (Tcl_Interp * interp); EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, int code); #endif +#ifndef Tcl_ZlibDeflate_TCL_DECLARED +#define Tcl_ZlibDeflate_TCL_DECLARED +/* 610 */ +EXTERN int Tcl_ZlibDeflate (Tcl_Interp * interp, int format, + Tcl_Obj * data, int level, + Tcl_Obj * gzipHeaderDictObj); +#endif +#ifndef Tcl_ZlibInflate_TCL_DECLARED +#define Tcl_ZlibInflate_TCL_DECLARED +/* 611 */ +EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format, + Tcl_Obj * data, int buffersize, + Tcl_Obj * gzipHeaderDictObj); +#endif +#ifndef Tcl_ZlibCRC32_TCL_DECLARED +#define Tcl_ZlibCRC32_TCL_DECLARED +/* 612 */ +EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, const char * buf, + int len); +#endif +#ifndef Tcl_ZlibAdler32_TCL_DECLARED +#define Tcl_ZlibAdler32_TCL_DECLARED +/* 613 */ +EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler, + const char * buf, int len); +#endif +#ifndef Tcl_ZlibStreamInit_TCL_DECLARED +#define Tcl_ZlibStreamInit_TCL_DECLARED +/* 614 */ +EXTERN int Tcl_ZlibStreamInit (Tcl_Interp * interp, int mode, + int format, int level, Tcl_Obj * dictObj, + Tcl_ZlibStream * zshandle); +#endif +#ifndef Tcl_ZlibStreamGetCommandName_TCL_DECLARED +#define Tcl_ZlibStreamGetCommandName_TCL_DECLARED +/* 615 */ +EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName ( + Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamEof_TCL_DECLARED +#define Tcl_ZlibStreamEof_TCL_DECLARED +/* 616 */ +EXTERN int Tcl_ZlibStreamEof (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamAdler32_TCL_DECLARED +#define Tcl_ZlibStreamAdler32_TCL_DECLARED +/* 617 */ +EXTERN int Tcl_ZlibStreamAdler32 (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamPut_TCL_DECLARED +#define Tcl_ZlibStreamPut_TCL_DECLARED +/* 618 */ +EXTERN int Tcl_ZlibStreamPut (Tcl_ZlibStream zshandle, + Tcl_Obj * data, int flush); +#endif +#ifndef Tcl_ZlibStreamGet_TCL_DECLARED +#define Tcl_ZlibStreamGet_TCL_DECLARED +/* 619 */ +EXTERN int Tcl_ZlibStreamGet (Tcl_ZlibStream zshandle, + Tcl_Obj * data, int count); +#endif +#ifndef Tcl_ZlibStreamClose_TCL_DECLARED +#define Tcl_ZlibStreamClose_TCL_DECLARED +/* 620 */ +EXTERN int Tcl_ZlibStreamClose (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamReset_TCL_DECLARED +#define Tcl_ZlibStreamReset_TCL_DECLARED +/* 621 */ +EXTERN int Tcl_ZlibStreamReset (Tcl_ZlibStream zshandle); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4356,6 +4427,18 @@ typedef struct TclStubs { void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ + int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */ + int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */ + unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const char * buf, int len); /* 612 */ + unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const char * buf, int len); /* 613 */ + int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ + Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ + int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ + int (*tcl_ZlibStreamAdler32) (Tcl_ZlibStream zshandle); /* 617 */ + int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int flush); /* 618 */ + int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ + int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ + int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6868,6 +6951,54 @@ extern const TclStubs *tclStubsPtr; #define Tcl_BackgroundException \ (tclStubsPtr->tcl_BackgroundException) /* 609 */ #endif +#ifndef Tcl_ZlibDeflate +#define Tcl_ZlibDeflate \ + (tclStubsPtr->tcl_ZlibDeflate) /* 610 */ +#endif +#ifndef Tcl_ZlibInflate +#define Tcl_ZlibInflate \ + (tclStubsPtr->tcl_ZlibInflate) /* 611 */ +#endif +#ifndef Tcl_ZlibCRC32 +#define Tcl_ZlibCRC32 \ + (tclStubsPtr->tcl_ZlibCRC32) /* 612 */ +#endif +#ifndef Tcl_ZlibAdler32 +#define Tcl_ZlibAdler32 \ + (tclStubsPtr->tcl_ZlibAdler32) /* 613 */ +#endif +#ifndef Tcl_ZlibStreamInit +#define Tcl_ZlibStreamInit \ + (tclStubsPtr->tcl_ZlibStreamInit) /* 614 */ +#endif +#ifndef Tcl_ZlibStreamGetCommandName +#define Tcl_ZlibStreamGetCommandName \ + (tclStubsPtr->tcl_ZlibStreamGetCommandName) /* 615 */ +#endif +#ifndef Tcl_ZlibStreamEof +#define Tcl_ZlibStreamEof \ + (tclStubsPtr->tcl_ZlibStreamEof) /* 616 */ +#endif +#ifndef Tcl_ZlibStreamAdler32 +#define Tcl_ZlibStreamAdler32 \ + (tclStubsPtr->tcl_ZlibStreamAdler32) /* 617 */ +#endif +#ifndef Tcl_ZlibStreamPut +#define Tcl_ZlibStreamPut \ + (tclStubsPtr->tcl_ZlibStreamPut) /* 618 */ +#endif +#ifndef Tcl_ZlibStreamGet +#define Tcl_ZlibStreamGet \ + (tclStubsPtr->tcl_ZlibStreamGet) /* 619 */ +#endif +#ifndef Tcl_ZlibStreamClose +#define Tcl_ZlibStreamClose \ + (tclStubsPtr->tcl_ZlibStreamClose) /* 620 */ +#endif +#ifndef Tcl_ZlibStreamReset +#define Tcl_ZlibStreamReset \ + (tclStubsPtr->tcl_ZlibStreamReset) /* 621 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index b5ea1b6..d953edf 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.172 2008/12/09 21:47:08 nijtmans Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.173 2008/12/11 14:17:23 dkf Exp $ */ #include "tclInt.h" @@ -1135,6 +1135,18 @@ static const TclStubs tclStubs = { Tcl_TransferResult, /* 607 */ Tcl_InterpActive, /* 608 */ Tcl_BackgroundException, /* 609 */ + Tcl_ZlibDeflate, /* 610 */ + Tcl_ZlibInflate, /* 611 */ + Tcl_ZlibCRC32, /* 612 */ + Tcl_ZlibAdler32, /* 613 */ + Tcl_ZlibStreamInit, /* 614 */ + Tcl_ZlibStreamGetCommandName, /* 615 */ + Tcl_ZlibStreamEof, /* 616 */ + Tcl_ZlibStreamAdler32, /* 617 */ + Tcl_ZlibStreamPut, /* 618 */ + Tcl_ZlibStreamGet, /* 619 */ + Tcl_ZlibStreamClose, /* 620 */ + Tcl_ZlibStreamReset, /* 621 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From e37c9ffc33c68abdb5a7f559d8eab679382baad7 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 14:24:01 +0000 Subject: Fixed prototypes --- generic/tclZlib.c | 264 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 172 insertions(+), 92 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index bdccaeb..cb205cb 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.1 2008/12/11 01:21:52 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.2 2008/12/11 14:24:01 dkf Exp $ */ #if 0 @@ -890,6 +890,7 @@ Tcl_ZlibStreamInit( int mode, /* ZLIB_INFLATE || ZLIB_DEFLATE */ int format, /* ZLIB_FORMAT_* */ int level, /* 0-9 or ZLIB_DEFAULT_COMPRESSION */ + Tcl_Obj *dictObj, /* Headers for gzip */ Tcl_ZlibStream *zshandle) { int wbits = 0; @@ -1358,8 +1359,8 @@ Tcl_ZlibStreamPut( * ZLIB_FINALIZE */ { zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; - char *datatmp = 0; - int e, size, outsize; + char *dataTmp = NULL; + int e, size, outSize; Tcl_Obj *obj; if (zsh->streamend) { @@ -1379,33 +1380,34 @@ Tcl_ZlibStreamPut( * account, so we add 100 extra bytes. */ - outsize = deflateBound(&zsh->stream, zsh->stream.avail_in) + 100; - zsh->stream.avail_out = outsize; - datatmp = ckalloc(zsh->stream.avail_out); - zsh->stream.next_out = (Bytef *) datatmp; + outSize = deflateBound(&zsh->stream, zsh->stream.avail_in) + 100; + zsh->stream.avail_out = outSize; + dataTmp = ckalloc(zsh->stream.avail_out); + zsh->stream.next_out = (Bytef *) dataTmp; e = deflate(&zsh->stream, flush); if ((e==Z_OK || e==Z_BUF_ERROR) && (zsh->stream.avail_out == 0)) { - if (outsize - zsh->stream.avail_out > 0) { + if (outSize - zsh->stream.avail_out > 0) { /* * Output buffer too small. */ - obj = Tcl_NewByteArrayObj((unsigned char *) datatmp, - outsize - zsh->stream.avail_out); + obj = Tcl_NewByteArrayObj((unsigned char *) dataTmp, + outSize - zsh->stream.avail_out); /* * Now append the compressed data to the outbuffer. */ + Tcl_ListObjAppendElement(zsh->interp, zsh->outdata, obj); } - if (outsize < 0xFFFF) { - outsize = 0xFFFF; /* There may be *lots* of data left to + if (outSize < 0xFFFF) { + outSize = 0xFFFF; /* There may be *lots* of data left to * output... */ - ckfree(datatmp); - datatmp = ckalloc(outsize); + ckfree(dataTmp); + dataTmp = ckalloc(outSize); } - zsh->stream.avail_out = outsize; - zsh->stream.next_out = (Bytef *) datatmp; + zsh->stream.avail_out = outSize; + zsh->stream.next_out = (Bytef *) dataTmp; e = deflate(&zsh->stream, flush); } @@ -1414,9 +1416,9 @@ Tcl_ZlibStreamPut( * And append the final data block. */ - if (outsize - zsh->stream.avail_out > 0) { - obj = Tcl_NewByteArrayObj((unsigned char *) datatmp, - outsize - zsh->stream.avail_out); + if (outSize - zsh->stream.avail_out > 0) { + obj = Tcl_NewByteArrayObj((unsigned char *) dataTmp, + outSize - zsh->stream.avail_out); /* * Now append the compressed data to the outbuffer. @@ -1449,10 +1451,9 @@ Tcl_ZlibStreamGet( * may get less! */ { zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; - int e, i; - int llength, itemlen, datapos=0; - Tcl_Obj *lobj; - unsigned char *dataptr, *itemptr; + int e, i, listLen, itemLen, dataPos = 0; + Tcl_Obj *itemObj; + unsigned char *dataPtr, *itemPtr; /* * Getting beyond the of stream, just return empty string. @@ -1476,9 +1477,9 @@ Tcl_ZlibStreamGet( * Prepare the place to store the data. */ - dataptr = Tcl_SetByteArrayLength(data, count); + dataPtr = Tcl_SetByteArrayLength(data, count); - zsh->stream.next_out = dataptr; + zsh->stream.next_out = dataPtr; zsh->stream.avail_out = count; if (zsh->stream.avail_in == 0) { /* @@ -1490,42 +1491,42 @@ Tcl_ZlibStreamGet( zsh->current_input=0; } if (Tcl_ListObjLength(zsh->interp, zsh->indata, - &llength) != TCL_OK) { + &listLen) != TCL_OK) { return TCL_ERROR; } - if (llength > 0) { + if (listLen > 0) { /* * There is more input available, get it from the list and * give it to zlib. */ if (Tcl_ListObjIndex(zsh->interp, zsh->indata, 0, - &lobj) != TCL_OK) { + &itemObj) != TCL_OK) { return TCL_ERROR; } - itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); - Tcl_IncrRefCount(lobj); - zsh->current_input = lobj; - zsh->stream.next_in = itemptr; - zsh->stream.avail_in = itemlen; + itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); + Tcl_IncrRefCount(itemObj); + zsh->current_input = itemObj; + zsh->stream.next_in = itemPtr; + zsh->stream.avail_in = itemLen; /* * And remove it from the list */ Tcl_ListObjReplace(NULL, zsh->indata, 0, 1, 0, NULL); - llength--; + listLen--; } } e = inflate(&zsh->stream, zsh->flush); - if (Tcl_ListObjLength(zsh->interp, zsh->indata, &llength) != TCL_OK) { + if (Tcl_ListObjLength(zsh->interp, zsh->indata, &listLen) != TCL_OK) { return TCL_ERROR; } - /*printf("llength %d, e==%d, avail_out %d\n", llength, e, zsh->stream.avail_out);*/ + /*printf("listLen %d, e==%d, avail_out %d\n", listLen, e, zsh->stream.avail_out);*/ while ((zsh->stream.avail_out > 0) && (e==Z_OK || e==Z_BUF_ERROR) - && (llength > 0)) { + && (listLen > 0)) { /* * State: We have not satisfied the request yet and there may be * more to inflate. @@ -1546,21 +1547,21 @@ Tcl_ZlibStreamGet( } if (Tcl_ListObjIndex(zsh->interp, zsh->indata, 0, - &lobj) != TCL_OK) { + &itemObj) != TCL_OK) { return TCL_ERROR; } - itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); - Tcl_IncrRefCount(lobj); - zsh->current_input = lobj; - zsh->stream.next_in = itemptr; - zsh->stream.avail_in = itemlen; + itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); + Tcl_IncrRefCount(itemObj); + zsh->current_input = itemObj; + zsh->stream.next_in = itemPtr; + zsh->stream.avail_in = itemLen; /* * And remove it from the list. */ Tcl_ListObjReplace(NULL, zsh->indata, 0, 1, 0, NULL); - llength--; + listLen--; /* * And call inflate again @@ -1587,22 +1588,22 @@ Tcl_ZlibStreamGet( } } else { if (Tcl_ListObjLength(zsh->interp, zsh->outdata, - &llength) != TCL_OK) { + &listLen) != TCL_OK) { return TCL_ERROR; } if (count == -1) { count = 0; - for (i=0; iinterp, zsh->outdata, i, - &lobj) != TCL_OK) { + &itemObj) != TCL_OK) { return TCL_ERROR; } - itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); + itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); if (i == 0) { - count += itemlen - zsh->outpos; + count += itemLen - zsh->outpos; } else { - count += itemlen; + count += itemLen; } } } @@ -1611,30 +1612,34 @@ Tcl_ZlibStreamGet( * Prepare the place to store the data. */ - dataptr = Tcl_SetByteArrayLength(data, count); - - while ((count > datapos) && (Tcl_ListObjLength(zsh->interp, - zsh->outdata, &llength) == TCL_OK) && (llength > 0)) { - Tcl_ListObjIndex(zsh->interp, zsh->outdata, 0, &lobj); - itemptr = Tcl_GetByteArrayFromObj(lobj, &itemlen); - if (itemlen-zsh->outpos >= count-datapos) { - memcpy(dataptr+datapos, itemptr+zsh->outpos, count-datapos); - zsh->outpos += count - datapos; - datapos += count-datapos; - if (zsh->outpos == itemlen) { + dataPtr = Tcl_SetByteArrayLength(data, count); + + while ((count > dataPos) && (Tcl_ListObjLength(zsh->interp, + zsh->outdata, &listLen) == TCL_OK) && (listLen > 0)) { + Tcl_ListObjIndex(zsh->interp, zsh->outdata, 0, &itemObj); + itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); + if (itemLen-zsh->outpos >= count-dataPos) { + unsigned len = count - dataPos; + + memcpy(dataPtr + dataPos, itemPtr + zsh->outpos, len); + zsh->outpos += len; + dataPos += len; + if (zsh->outpos == itemLen) { zsh->outpos = 0; } } else { - memcpy(dataptr+datapos, itemptr+zsh->outpos, - itemlen-zsh->outpos); - datapos += itemlen- zsh->outpos; + unsigned len = itemLen - zsh->outpos; + + memcpy(dataPtr + dataPos, itemPtr + zsh->outpos, len); + dataPos += len; zsh->outpos = 0; } if (zsh->outpos == 0) { Tcl_ListObjReplace(NULL, zsh->outdata, 0, 1, 0, NULL); + listLen--; } } - Tcl_SetByteArrayLength(data, datapos); + Tcl_SetByteArrayLength(data, dataPos); } return TCL_OK; } @@ -1649,7 +1654,8 @@ Tcl_ZlibDeflate( Tcl_Interp *interp, int format, Tcl_Obj *data, - int level) + int level, + Tcl_Obj *gzipHeaderDictObj) { int wbits = 0, bdlen = 0, e = 0; Byte *bdata = 0; @@ -1771,7 +1777,8 @@ Tcl_ZlibInflate( Tcl_Interp *interp, int format, Tcl_Obj *data, - int buffersize) + int buffersize, + Tcl_Obj *gzipHeaderDictObj) { int wbits = 0 , inlen = 0, e = 0, newbuffersize; Byte *indata = NULL, *outdata = NULL, *newoutdata = NULL; @@ -1897,19 +1904,19 @@ unsigned int Tcl_ZlibCRC32( unsigned int crc, const char *buf, - unsigned int len) + int len) { /* Nothing much to do, just wrap the crc32(). */ - return crc32(crc, (Bytef *) buf, len); + return crc32(crc, (Bytef *) buf, (unsigned) len); } unsigned int Tcl_ZlibAdler32( unsigned int adler, const char *buf, - unsigned int len) + int len) { - return adler32(adler, (Bytef *) buf, len); + return adler32(adler, (Bytef *) buf, (unsigned) len); } static int @@ -1963,6 +1970,10 @@ ZlibCmd( switch ((enum zlibCommands) command) { case z_adler32: /* adler32 str ?startvalue? -> checksum */ + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); + return TCL_ERROR; + } if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], (int *) &start) != TCL_OK) { return TCL_ERROR; @@ -1975,6 +1986,10 @@ ZlibCmd( Tcl_ZlibAdler32(start, (const char *) data, dlen)); return TCL_OK; case z_crc32: /* crc32 str ?startvalue? -> checksum */ + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); + return TCL_ERROR; + } if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], (int *) &start) != TCL_OK) { return TCL_ERROR; @@ -1987,40 +2002,94 @@ ZlibCmd( Tcl_ZlibCRC32(start, (const char *) data, dlen)); return TCL_OK; case z_deflate: /* deflate data ?level? -> rawCompressedData */ - if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], - (int *) &level) != TCL_OK) { + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); return TCL_ERROR; } - return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], level); + if (objc > 3) { + if (Tcl_GetIntFromObj(interp, objv[3], (int *)&level) != TCL_OK) { + return TCL_ERROR; + } + if (level < 0 || level > 9) { + goto badLevel; + } + } + return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], level, + NULL); case z_compress: /* compress data ?level? -> zlibCompressedData */ - if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], - (int *) &level) != TCL_OK) { + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); return TCL_ERROR; } - return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], level); + if (objc > 3) { + if (Tcl_GetIntFromObj(interp, objv[3], (int *)&level) != TCL_OK) { + return TCL_ERROR; + } + if (level < 0 || level > 9) { + goto badLevel; + } + } + return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], level, + NULL); case z_gzip: /* gzip data ?level? -> gzippedCompressedData */ - if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], - (int *) &level) != TCL_OK) { + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); return TCL_ERROR; } - return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], level); - case z_inflate: /* inflate rawcomprdata ?bufferSize? -> decompressedData */ - if (objc>3 && Tcl_GetIntFromObj(interp, objv[3], - (int *) &buffersize) != TCL_OK) { + if (objc > 3) { + if (Tcl_GetIntFromObj(interp, objv[3], (int *)&level) != TCL_OK) { + return TCL_ERROR; + } + if (level < 0 || level > 9) { + goto badLevel; + } + } + return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], level, + NULL); + case z_inflate: /* inflate rawcomprdata ?bufferSize? + * -> decompressedData */ + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); return TCL_ERROR; } + if (objc > 3) { + if (Tcl_GetIntFromObj(interp, objv[3], + (int *) &buffersize) != TCL_OK) { + return TCL_ERROR; + } + if (buffersize < 16 || buffersize > 65536) { + goto badBuffer; + } + } return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], - buffersize); - case z_decompress: /* decompress zlibcomprdata ?bufferSize? -> decompressedData */ - /* We rely on TCL_ZLIB_FORMAT_AUTO to determine type. */ - case z_gunzip: /* gunzip gzippeddata ?bufferSize? -> decompressedData */ - if (objc > 3 && Tcl_GetIntFromObj(interp, objv[3], - (int *) &buffersize) != TCL_OK) { + buffersize, NULL); + case z_decompress: /* decompress zlibcomprdata ?bufferSize? + * -> decompressedData */ + /* + * We rely on TCL_ZLIB_FORMAT_AUTO to determine type. + */ + case z_gunzip: /* gunzip gzippeddata ?bufferSize? + * -> decompressedData */ + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); return TCL_ERROR; } + if (objc > 3) { + if (Tcl_GetIntFromObj(interp, objv[3], + (int *) &buffersize) != TCL_OK) { + return TCL_ERROR; + } + if (buffersize < 16 || buffersize > 65536) { + goto badBuffer; + } + } return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_AUTO, objv[2], - buffersize); + buffersize, NULL); case z_stream: /* stream deflate/inflate/...gunzip ?level?*/ + if (objc > 4) { + Tcl_WrongNumArgs(interp, 2, objv, "mode ?level?"); + return TCL_ERROR; + } if (Tcl_GetIndexFromObj(interp, objv[2], stream_formats, "stream format", 0, &format) != TCL_OK) { Tcl_AppendResult(interp, "format error: integer", NULL); @@ -2044,16 +2113,20 @@ ZlibCmd( format = TCL_ZLIB_FORMAT_GZIP; break; } - if (objc >= 4) { + if (objc == 4) { if (Tcl_GetIntFromObj(interp, objv[3], (int *) &level) != TCL_OK) { Tcl_AppendResult(interp, "level error: integer", NULL); return TCL_ERROR; } + if (level < 0 || level > 9) { + goto badLevel; + } } else { level = Z_DEFAULT_COMPRESSION; } - if (Tcl_ZlibStreamInit(interp, mode, format, level, &zh) != TCL_OK) { + if (Tcl_ZlibStreamInit(interp, mode, format, level, NULL, + &zh) != TCL_OK) { Tcl_AppendResult(interp, "stream init error: integer", NULL); return TCL_ERROR; } @@ -2085,6 +2158,13 @@ ZlibCmd( }; return TCL_ERROR; + + badLevel: + Tcl_AppendResult(interp, "level must be 0 to 9", NULL); + return TCL_ERROR; + badBuffer: + Tcl_AppendResult(interp, "buffer size must be 32 to 65536", NULL); + return TCL_ERROR; } static int -- cgit v0.12 From 5b666291abb11e496bc0915ee0cb4718c8bae64c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 11 Dec 2008 14:32:34 +0000 Subject: *** empty log message *** --- ChangeLog | 6 ++++++ win/Makefile.in | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b3d782..e6bafec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-11 Jan Nijtmans + + * win/Makefile.in: fix Windows build (mingw) for TIP #234 implementation + (additionally, first make sure that zlib is available, and rename the + standard zdll.lib to libz.a, but at least this works so far.) + 2008-12-11 Donal K. Fellows * tests/zlib.test: Start of test suite for zlib command. diff --git a/win/Makefile.in b/win/Makefile.in index b940c21..16d7474 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.137 2008/11/10 17:57:30 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.138 2008/12/11 14:32:34 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -177,7 +177,7 @@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(LIBS) SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ -LIBS = @LIBS@ +LIBS = @LIBS@ -lz RMDIR = rm -rf MKDIR = mkdir -p @@ -284,7 +284,8 @@ GENERIC_OBJS = \ tclTrace.$(OBJEXT) \ tclUtf.$(OBJEXT) \ tclUtil.$(OBJEXT) \ - tclVar.$(OBJEXT) + tclVar.$(OBJEXT) \ + tclZlib.$(OBJEXT) TOMMATH_OBJS = \ bncore.${OBJEXT} \ -- cgit v0.12 From 7b78ea6e8daefdb529ab591513dd5804bc6fa5f7 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 14:42:44 +0000 Subject: Slightly less lame configure detection for zlib; still not really right --- unix/configure.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/unix/configure.in b/unix/configure.in index c18c603..9dfba00 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.191 2008/12/11 01:21:52 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.192 2008/12/11 14:42:44 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -117,7 +117,17 @@ SC_ENABLE_SHARED # Add stuff for zlib #------------------------------------------------------------------------ -LIBS="$LIBS -lz" +zlib_ok=yes +AC_CHECK_HEADER([zlib.h],[],[ + zlib_ok=no + echo TODO: Add -I$srcdir/compat/zlib/include to compile lines... +]) +AC_SEARCH_LIBS([adler32],[z],[],[ + zlib_ok=no +]) +if test $zlib_ok = yes; then + AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) +fi #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This -- cgit v0.12 From 06751fe9a09fc304e1321413375cb4ec1d334b91 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 14:43:05 +0000 Subject: regen --- unix/configure | 12540 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 6396 insertions(+), 6144 deletions(-) diff --git a/unix/configure b/unix/configure index 01309cc..1950caf 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,176 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +775,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +838,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +903,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +933,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1007,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1069,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1113,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1133,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1172,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1270,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1287,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1353,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1460,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1474,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1496,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1506,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1528,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1539,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1553,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1591,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1624,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1672,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1698,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1711,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1740,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1757,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1781,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1357,24 +1817,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1383,36 +1842,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1435,8 +1895,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1449,32 +1909,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1487,36 +1949,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1529,74 +2006,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1610,7 +2047,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1621,6 +2058,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1638,22 +2076,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1666,36 +2105,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1708,29 +2149,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1743,21 +2200,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1782,47 +2253,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1834,19 +2335,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1865,22 +2368,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1891,9 +2399,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1907,14 +2414,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1934,14 +2441,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1959,12 +2472,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1987,50 +2500,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2046,38 +2558,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2093,12 +2685,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2132,12 +2724,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2152,266 +2749,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2444,8 +2891,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2479,24 +2926,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2505,9 +2950,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2517,24 +2963,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2545,6 +2989,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2562,8 +3007,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2586,24 +3031,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2612,9 +3055,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2624,24 +3068,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2652,6 +3094,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2674,23 +3117,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2714,35 +3304,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2798,6 +3384,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2817,18 +3404,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2841,12 +3437,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2869,9 +3467,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2885,38 +3483,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2928,8 +3523,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2969,39 +3564,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3012,17 +3604,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3033,41 +3625,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3076,24 +3664,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3101,9 +3687,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3127,25 +3714,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3160,17 +3740,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3181,41 +3761,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3224,24 +3800,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3249,9 +3823,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3275,25 +3850,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3308,17 +3876,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3329,41 +3897,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3372,24 +3936,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3397,9 +3959,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3423,25 +3986,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3460,17 +4016,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3481,41 +4037,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3524,24 +4076,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3549,9 +4099,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3575,25 +4126,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3662,17 +4206,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3683,41 +4227,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3726,24 +4266,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3751,9 +4289,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3777,25 +4316,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3852,17 +4384,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3873,41 +4405,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3916,24 +4444,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3941,9 +4467,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3967,25 +4494,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4000,17 +4520,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4021,41 +4541,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4064,24 +4580,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4089,9 +4603,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4115,25 +4630,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4153,18 +4661,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4175,41 +4684,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4218,24 +4723,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4243,9 +4746,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4269,25 +4773,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4307,8 +4805,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4330,39 +4828,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4373,13 +4867,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4411,8 +4905,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4425,56 +4919,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4487,8 +4978,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4501,56 +4992,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4563,8 +5051,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4577,56 +5065,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4637,8 +5122,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4651,56 +5136,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4708,8 +5190,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4722,56 +5204,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4796,9 +5275,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4824,68 +5303,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4898,8 +5369,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4907,15 +5378,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -4927,11 +5398,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4960,8 +5431,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4988,76 +5459,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5074,46 +5536,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5124,8 +5583,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5142,62 +5601,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5208,41 +5664,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5251,24 +5703,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5276,9 +5726,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5302,25 +5753,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5353,8 +5797,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5381,68 +5825,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5450,8 +5885,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5478,73 +5913,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5557,56 +5983,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5619,8 +6042,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5647,68 +6070,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5716,8 +6130,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5744,73 +6158,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5823,56 +6228,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5885,15 +6287,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5903,12 +6305,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5918,7 +6320,242 @@ _ACEOF fi -#-------------------------------------------------------------------- +#------------------------------------------------------------------------ +# Add stuff for zlib +#------------------------------------------------------------------------ + +zlib_ok=yes +if test "${ac_cv_header_zlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } + +fi +if test $ac_cv_header_zlib_h = yes; then + : +else + + zlib_ok=no + echo TODO: Add -I$srcdir/compat/zlib/include to compile lines... + +fi + + +{ echo "$as_me:$LINENO: checking for library containing adler32" >&5 +echo $ECHO_N "checking for library containing adler32... $ECHO_C" >&6; } +if test "${ac_cv_search_adler32+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char adler32 (); +int +main () +{ +return adler32 (); + ; + return 0; +} +_ACEOF +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_adler32=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_adler32+set}" = set; then + break +fi +done +if test "${ac_cv_search_adler32+set}" = set; then + : +else + ac_cv_search_adler32=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_adler32" >&5 +echo "${ECHO_T}$ac_cv_search_adler32" >&6; } +ac_res=$ac_cv_search_adler32 +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + + zlib_ok=no + +fi + +if test $zlib_ok = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB 1 +_ACEOF + +fi + +#-------------------------------------------------------------------- # The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called # after SC_ENABLE_SHARED checks the configure switches. @@ -5927,8 +6564,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5941,32 +6578,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5979,27 +6618,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6008,31 +6661,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6042,8 +6695,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6067,40 +6720,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6114,24 +6764,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6158,16 +6808,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6180,56 +6830,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6272,8 +6919,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6286,25 +6933,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6330,8 +6979,8 @@ fi CC=${CC}_r ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6409,12 +7058,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6434,8 +7081,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6448,56 +7095,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6529,8 +7173,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6543,56 +7187,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -6653,8 +7294,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6667,56 +7308,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -6787,8 +7425,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6801,56 +7439,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -6982,8 +7617,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7006,40 +7641,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7128,8 +7760,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7155,8 +7787,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7187,8 +7819,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7214,8 +7846,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7279,8 +7911,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7303,40 +7935,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7345,8 +7974,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7369,40 +7998,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7428,8 +8054,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7452,40 +8078,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7504,8 +8127,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7528,40 +8151,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7588,21 +8208,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7636,35 +8256,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -7675,8 +8292,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -7692,8 +8309,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7717,42 +8334,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8088,25 +8702,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8117,41 +8731,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8160,34 +8770,33 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8211,25 +8820,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8238,8 +8840,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8314,8 +8916,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8338,40 +8940,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8406,13 +9005,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8557,22 +9156,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8582,8 +9181,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -8618,11 +9217,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -8643,8 +9242,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -8666,33 +9265,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8709,37 +9303,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -8771,33 +9362,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8814,37 +9400,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -8876,33 +9459,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8919,37 +9497,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -8962,17 +9537,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8995,35 +9570,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9045,34 +9616,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9081,20 +9649,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9116,38 +9684,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9156,8 +9720,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9179,38 +9743,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9224,9 +9784,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9252,68 +9812,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9322,8 +9874,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9345,35 +9897,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9384,11 +9932,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9398,8 +9946,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9416,7 +9964,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9425,27 +9974,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9468,40 +10012,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9511,11 +10051,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9526,27 +10066,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -9562,8 +10097,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9571,27 +10108,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9604,13 +10155,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -9639,9 +10193,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9667,68 +10221,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9752,9 +10298,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9780,88 +10326,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9888,68 +10424,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -9960,8 +10487,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9988,68 +10515,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10060,8 +10578,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10088,68 +10606,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10160,8 +10669,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10188,68 +10697,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10267,8 +10767,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10295,68 +10795,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10368,8 +10859,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10396,72 +10887,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10489,38 +10971,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10538,8 +11016,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10566,72 +11044,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10662,38 +11131,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -10702,8 +11167,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10734,38 +11199,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -10785,8 +11246,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10813,72 +11274,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10909,38 +11361,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -10949,8 +11397,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10981,38 +11429,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11032,8 +11476,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11060,72 +11504,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11156,38 +11591,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11196,8 +11627,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11228,38 +11659,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11279,8 +11706,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11307,72 +11734,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11403,38 +11821,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11443,8 +11857,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11475,38 +11889,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11559,8 +11969,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11587,72 +11997,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11683,38 +12084,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -11723,8 +12120,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11755,38 +12152,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -11795,8 +12188,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11825,38 +12218,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -11877,8 +12266,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11905,72 +12294,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12004,38 +12384,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12044,8 +12420,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12079,38 +12455,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12144,18 +12516,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12166,41 +12539,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12209,24 +12578,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12234,9 +12601,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12260,25 +12628,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12290,8 +12652,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12319,13 +12681,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12338,8 +12709,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12363,13 +12736,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12382,8 +12764,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12409,13 +12793,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12428,8 +12821,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12457,13 +12852,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12476,8 +12880,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12504,13 +12910,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12523,8 +12938,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12552,13 +12969,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12571,12 +12997,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12606,8 +13034,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12628,42 +13056,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12686,8 +13110,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -12709,8 +13133,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12726,44 +13150,42 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -12777,18 +13199,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12799,41 +13222,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12842,24 +13261,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12867,9 +13284,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12893,25 +13311,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12923,8 +13335,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12948,38 +13360,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -12988,8 +13396,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13014,33 +13422,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13061,40 +13464,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13111,8 +13511,77 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13123,52 +13592,49 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#if !HAVE_DECL_TZNAME +extern char *tzname[]; #endif int main () { -atoi(*tzname); +return tzname[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_var_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -13185,9 +13651,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13213,68 +13679,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13284,8 +13742,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13306,38 +13764,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13346,8 +13800,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13368,38 +13822,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13412,8 +13862,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13436,38 +13886,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13478,8 +13924,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13502,38 +13948,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13549,9 +13991,8 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13573,33 +14014,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13617,40 +14053,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -13665,8 +14098,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13693,68 +14126,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -13771,8 +14195,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13791,9 +14215,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -13809,9 +14233,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -13819,13 +14243,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13838,17 +14271,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -13859,8 +14292,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13887,68 +14320,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -13972,8 +14396,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14000,68 +14424,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14069,8 +14484,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14089,13 +14504,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14108,11 +14532,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14120,12 +14546,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14139,8 +14563,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14167,68 +14591,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14236,8 +14651,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14257,13 +14672,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14276,11 +14700,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14288,12 +14714,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14306,8 +14730,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14334,68 +14758,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14403,8 +14818,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14424,13 +14839,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14443,11 +14867,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14455,12 +14881,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14475,8 +14899,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14503,68 +14927,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14572,8 +14987,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14609,13 +15024,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14628,18 +15052,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14657,8 +15081,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14669,50 +15093,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -14723,8 +15144,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14735,50 +15156,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -14789,8 +15207,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14801,62 +15219,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14878,8 +15293,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -14894,8 +15309,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14921,38 +15336,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -14961,8 +15372,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14973,50 +15384,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15026,8 +15434,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15052,40 +15460,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15096,8 +15500,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15108,50 +15512,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15161,8 +15562,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15188,40 +15589,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15240,8 +15637,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15268,68 +15665,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15349,8 +15737,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15376,39 +15764,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15423,8 +15808,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15451,68 +15836,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15520,8 +15896,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15534,56 +15910,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15592,8 +15965,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15606,56 +15979,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -15664,12 +16034,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15686,8 +16054,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15714,68 +16082,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -15784,8 +16143,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15812,68 +16171,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -15887,8 +16237,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15911,8 +16261,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -15928,8 +16278,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15951,38 +16301,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -15990,8 +16336,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16015,38 +16361,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16059,8 +16401,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16095,13 +16437,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16114,11 +16465,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16132,28 +16485,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16164,41 +16517,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16207,24 +16556,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16232,9 +16579,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16258,25 +16606,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16287,8 +16628,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16310,39 +16651,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16351,8 +16688,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16365,9 +16702,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16393,68 +16730,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16468,8 +16797,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16492,39 +16821,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16542,9 +16868,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16570,68 +16896,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16644,18 +16962,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16666,41 +16985,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16709,24 +17024,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16734,9 +17047,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16760,25 +17074,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -16794,9 +17102,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16822,68 +17130,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16897,18 +17197,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16919,41 +17220,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16962,24 +17259,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16987,9 +17282,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17013,25 +17309,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17047,9 +17337,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17075,68 +17365,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17149,9 +17431,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17177,68 +17459,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17272,18 +17546,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17294,41 +17569,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17337,24 +17608,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17362,9 +17631,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17388,25 +17658,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17419,8 +17683,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17451,40 +17715,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17505,8 +17766,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17535,39 +17796,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17587,18 +17845,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17609,41 +17868,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17652,24 +17907,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17677,9 +17930,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17703,25 +17957,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17737,18 +17985,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17759,41 +18008,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17802,24 +18047,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17827,9 +18070,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17853,25 +18097,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17884,8 +18122,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17912,12 +18150,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -17930,8 +18168,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -17939,27 +18177,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -17967,8 +18205,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -17976,24 +18214,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18017,8 +18255,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18031,8 +18269,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18040,26 +18278,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18070,41 +18308,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18113,24 +18347,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18138,9 +18370,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18164,25 +18397,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18196,8 +18422,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18213,31 +18439,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18261,8 +18488,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18291,15 +18518,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18313,16 +18540,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18334,7 +18561,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18347,7 +18574,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18515,7 +18742,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18535,39 +18762,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18576,52 +18822,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -18650,17 +18880,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -18670,8 +18928,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -18685,18 +18978,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -18704,159 +18998,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -18865,7 +19120,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18874,31 +19150,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18906,30 +19165,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -18937,7 +19185,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -18951,18 +19199,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -18973,60 +19223,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19042,40 +19274,52 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19086,522 +19330,530 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 9fe067cb7d0f4ec8efab849f111555dd54efebf7 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 14:45:22 +0000 Subject: start of zlib support for windows --- win/configure.in | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/win/configure.in b/win/configure.in index 7437dc4..c3a760f 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.109 2008/10/14 20:08:21 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.110 2008/12/11 14:45:22 dkf Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -336,6 +336,22 @@ SC_TCL_CFG_ENCODING SC_ENABLE_SHARED +#------------------------------------------------------------------------ +# Add stuff for zlib +#------------------------------------------------------------------------ + +zlib_ok=yes +AC_CHECK_HEADER([zlib.h],[],[ + zlib_ok=no + echo TODO: Add -I$srcdir/compat/zlib/include to compile lines... +]) +AC_SEARCH_LIBS([adler32],[z],[],[ + zlib_ok=no +]) +if test $zlib_ok = yes; then + AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) +fi + #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called -- cgit v0.12 From 3329ef058527a8da6bd82989598b9b34e85dfe07 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 16:50:51 +0000 Subject: Document the zlib command. Not yet complete! --- ChangeLog | 4 +++ doc/zlib.n | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 doc/zlib.n diff --git a/ChangeLog b/ChangeLog index e6bafec..86f4048 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-11 Donal K. Fellows + + * doc/zlib.n: Added a start at the documentation. Still very rough. + 2008-12-11 Jan Nijtmans * win/Makefile.in: fix Windows build (mingw) for TIP #234 implementation diff --git a/doc/zlib.n b/doc/zlib.n new file mode 100644 index 0000000..256efec --- /dev/null +++ b/doc/zlib.n @@ -0,0 +1,102 @@ +'\" +'\" Copyright (c) 2008 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: zlib.n,v 1.1 2008/12/11 16:50:51 dkf Exp $ +'\" +.so man.macros +.TH zlib n 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +zlib \- compression and decompression operations +.SH SYNOPSIS +.nf +\fBzlib \fIsubcommand arg ...\fR +.fi +.BE +.SH DESCRIPTION +.PP +The \fBzlib\fR command provides access to the compression facilities of the +Zlib library. It has the following subcommands +.TP +\fBzlib adler32\fI string\fR ?\fIinitValue\fR? +. +.TP +\fBzlib compress\fI string\fR ?\fIlevel\fR? +. +.TP +\fBzlib crc32\fI string\fR ?\fIinitValue\fR? +. +.TP +\fBzlib decompress\fI string\fR ?\fIbufferSize\fR? +. +.TP +\fBzlib deflate\fI string\fR ?\fIlevel\fR? +. +.TP +\fBzlib gunzip\fI string\fR ?\fIbufferSize\fR? +. +.TP +\fBzlib gzip\fI string\fR ?\fIlevel\fR? +. +.TP +\fBzlib inflate\fI string\fR ?\fIbufferSize\fR? +. +.TP +\fBzlib stack\fI channel\fR +. +.TP +\fBzlib stream\fI mode\fR ?\fIlevel\fR? +. +Creates a streaming compression or decompression command based on the +\fImode\fR, and return the name of the command. For a description of how that +command works, see \fBSTREAMING COMMAND\fR below. The following modes are +supported: +.RS +.TP +\fBzlib stream compress\fR +. +.TP +\fBzlib stream decompress\fR +. +.TP +\fBzlib stream deflate\fR +. +.TP +\fBzlib stream gunzip\fR +. +.TP +\fBzlib stream gzip\fR +. +.TP +\fBzlib stream inflate\fR +. +.RE +.TP +\fBzlib unstack\fI channel\fR +. +Reverses the effects of \fBzlib stack\fR on the channel called \fIchannel\fR. +.SH EXAMPLES +.PP +To compress a Tcl string, it should be first converted to a particular charset +encoding since the \fBzlib\fR command always operates on binary strings. +.PP +.CS +set compressed [\fBzlib deflate\fR [encoding convertto utf8 $string]] +.CE +.PP +When converting back, it is also important to reverse the charset encoding: +.PP +.CS +set string [encoding convertfrom utf8 [\fBzlib inflate\fR $compressed]] +.CE +.SH "SEE ALSO" +binary(n), chan(n), encoding(n) +.SH "KEYWORDS" +compress, decompress, deflate, gzip, inflate +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 1e9af660c1936aa10a345ac8f0ee41f74143c698 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Dec 2008 16:57:13 +0000 Subject: Factor out the code to turn zlib errors into Tcl errors. --- ChangeLog | 10 ++++-- generic/tclZlib.c | 106 +++++++++++++++++++++++++++++------------------------- 2 files changed, 64 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86f4048..9a39202 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,16 @@ 2008-12-11 Donal K. Fellows + * generic/tclZlib.c (ConvertError): Factor out code to turn zlib + errors into Tcl errors. + * doc/zlib.n: Added a start at the documentation. Still very rough. 2008-12-11 Jan Nijtmans - * win/Makefile.in: fix Windows build (mingw) for TIP #234 implementation - (additionally, first make sure that zlib is available, and rename the - standard zdll.lib to libz.a, but at least this works so far.) + * win/Makefile.in: fix Windows build (mingw) for TIP #234 + implementation (additionally, first make sure that zlib is available, + and rename the standard zdll.lib to libz.a, but at least this works so + far). 2008-12-11 Donal K. Fellows diff --git a/generic/tclZlib.c b/generic/tclZlib.c index cb205cb..548e941 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -3,7 +3,7 @@ * * This file provides the interface to the Zlib library. * - * Copyright (C) 2004, 2005 Pascal Scheffers + * Copyright (C) 2004-2005 Pascal Scheffers * Copyright (C) 2005 Unitas Software B.V. * Copyright (c) 2008 Donal K. Fellows * @@ -13,39 +13,35 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.2 2008/12/11 14:24:01 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.3 2008/12/11 16:57:13 dkf Exp $ */ -#if 0 #include "tclInt.h" #include -typedef struct { - z_stream stream; - gz_header header; - Tcl_Interp *interp; - Tcl_Command cmd; - -} StreamInfo; -typedef struct ThreadSpecificData { - int counter; -} ThreadSpecificData; -static Tcl_ThreadDataKey tsdKey; - static void ConvertError(Tcl_Interp *interp, int code); -static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, - gz_header *headerPtr); -static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); -static int ZlibStream(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static void DeleteStream(ClientData clientData); -// TODO: Write streaming C API -// TODO: Write Tcl API +/* + *---------------------------------------------------------------------- + * + * ConvertError -- + * + * Utility function for converting a zlib error into a Tcl error. + * + * Results: + * None. + * + * Side effects: + * Updates the interpreter result and errorcode. + * + *---------------------------------------------------------------------- + */ + static void ConvertError( - Tcl_Interp *interp, - int code) + Tcl_Interp *interp, /* Interpreter to store the error in. May be + * NULL, in which case nothing happens. */ + int code) /* The zlib error code. */ { if (interp == NULL) { return; @@ -54,8 +50,8 @@ ConvertError( if (code == Z_ERRNO) { Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_PosixError(interp),-1)); } else { - const char *codeStr; - char codeStr2[TCL_INTEGER_SPACE]; + const char *codeStr, *codeStr2 = NULL; + char codeStrBuf[TCL_INTEGER_SPACE]; switch (code) { case Z_STREAM_ERROR: codeStr = "STREAM"; break; @@ -65,7 +61,7 @@ ConvertError( case Z_VERSION_ERROR: codeStr = "VERSION"; break; default: codeStr = "unknown"; - sprintf(codeStr2, "%d", code); + sprintf(codeStr2 = codeStrBuf, "%d", code); break; } Tcl_SetObjResult(interp, Tcl_NewStringObj(zError(code), -1)); @@ -73,6 +69,28 @@ ConvertError( } } +#if 0 +typedef struct { + z_stream stream; + gz_header header; + Tcl_Interp *interp; + Tcl_Command cmd; + +} StreamInfo; +typedef struct ThreadSpecificData { + int counter; +} ThreadSpecificData; +static Tcl_ThreadDataKey tsdKey; + +static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, + gz_header *headerPtr); +static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); +static int ZlibStream(ClientData clientData, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static void DeleteStream(ClientData clientData); +// TODO: Write streaming C API +// TODO: Write Tcl API + static inline int GetValue( Tcl_Interp *interp, @@ -528,10 +546,6 @@ ZlibStream( #else /* !REIMPLEMENT */ -#include "tcl.h" -#include -#include - /* * Structure used for the Tcl_ZlibStream* commands and [zlib stream ...] */ @@ -691,7 +705,7 @@ zstreamincmd( Tcl_GetByteArrayFromObj(obj, &zp->stream.avail_out); e = inflate(&zp->stream, Z_NO_FLUSH); if (e != Z_OK && e != Z_STREAM_END) { - Tcl_SetResult(ip, (char *) zError(e), TCL_STATIC); + ConvertError(ip, e); return TCL_ERROR; } Tcl_SetByteArrayLength(obj, count - zp->stream.avail_out); @@ -856,7 +870,7 @@ ZlibCmdO( } if (e != Z_OK) { - Tcl_SetResult(ip, (char*) zError(e), TCL_STATIC); + ConvertError(ip, e); return TCL_ERROR; } @@ -975,9 +989,7 @@ Tcl_ZlibStreamInit( } if (e != Z_OK) { - if (interp) { - Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); - } + ConvertError(interp, e); goto error; } @@ -1215,10 +1227,8 @@ Tcl_ZlibStreamReset( e = inflateInit2(&zsh->stream, zsh->wbits); } - if ( e != Z_OK ) { - if (zsh->interp) { - Tcl_SetResult(zsh->interp, (char*) zError(e), TCL_STATIC); - } + if (e != Z_OK) { + ConvertError(zsh->interp, e); /* TODOcleanup */ return TCL_ERROR; } @@ -1573,9 +1583,7 @@ Tcl_ZlibStreamGet( Tcl_SetByteArrayLength(data, count - zsh->stream.avail_out); } if (!(e==Z_OK || e==Z_STREAM_END || e==Z_BUF_ERROR)) { - if (zsh->interp) { - Tcl_SetResult(zsh->interp, zsh->stream.msg, TCL_VOLATILE); - } + ConvertError(zsh->interp, e); return TCL_ERROR; } if (e == Z_STREAM_END) { @@ -1716,7 +1724,7 @@ Tcl_ZlibDeflate( Z_DEFAULT_STRATEGY); if (e != Z_OK) { - Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + ConvertError(interp, e); return TCL_ERROR; } @@ -1759,7 +1767,7 @@ Tcl_ZlibDeflate( } if (e != Z_OK) { - Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + ConvertError(interp, e); return TCL_ERROR; } @@ -1838,7 +1846,7 @@ Tcl_ZlibInflate( e = inflateInit2(&stream, wbits); if (e != Z_OK) { - Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + ConvertError(interp, e); return TCL_ERROR; } while (1) { @@ -1882,13 +1890,13 @@ Tcl_ZlibInflate( if (e != Z_STREAM_END) { inflateEnd(&stream); - Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + ConvertError(interp, e); return TCL_ERROR; } e = inflateEnd(&stream); if (e != Z_OK) { - Tcl_SetResult(interp, (char*) zError(e), TCL_STATIC); + ConvertError(interp, e); return TCL_ERROR; } -- cgit v0.12 From 6cb99f7bf8a960b9c8db1d06c4509fea270989b1 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 11 Dec 2008 17:30:18 +0000 Subject: * generic/tclIO.c (SetChannelFromAny and related): Modified the * tests/io.test: internal representation of the tclChannelType to contain not only the ChannelState pointer, but also a reference to the interpreter it was made in. Invalidate and recompute the internal representation when it is used in a different interpreter (Like cmdName intrep's). Added testcase. [Bug 2407783]. --- ChangeLog | 9 +++++++++ generic/tclIO.c | 17 +++++++++++++++-- tests/io.test | 12 +++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a39202..07439cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-12-11 Andreas Kupries + + * generic/tclIO.c (SetChannelFromAny and related): Modified the + * tests/io.test: internal representation of the tclChannelType to + contain not only the ChannelState pointer, but also a reference to + the interpreter it was made in. Invalidate and recompute the + internal representation when it is used in a different interpreter + (Like cmdName intrep's). Added testcase. [Bug 2407783]. + 2008-12-11 Donal K. Fellows * generic/tclZlib.c (ConvertError): Factor out code to turn zlib diff --git a/generic/tclIO.c b/generic/tclIO.c index 09ca6fa..12905de 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.153 2008/12/09 20:16:29 dgp Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.154 2008/12/11 17:30:18 andreas_kupries Exp $ */ #include "tclInt.h" @@ -222,6 +222,10 @@ static const Tcl_ObjType tclChannelType = { ((ChannelState *) (objPtr)->internalRep.otherValuePtr) #define SET_CHANNELSTATE(objPtr, storePtr) \ ((objPtr)->internalRep.otherValuePtr = (void *) (storePtr)) +#define GET_CHANNELINTERP(objPtr) \ + ((Interp *) (objPtr)->internalRep.twoPtrValue.ptr2) +#define SET_CHANNELINTERP(objPtr, storePtr) \ + ((objPtr)->internalRep.twoPtrValue.ptr2 = (void *) (storePtr)) #define BUSY_STATE(st,fl) \ ((((st)->csPtrR) && ((fl) & TCL_READABLE)) || \ @@ -10611,9 +10615,11 @@ DupChannelIntRep( register Tcl_Obj *copyPtr) /* Object with internal rep to set. Must not * currently have an internal rep.*/ { - ChannelState *statePtr = GET_CHANNELSTATE(srcPtr); + ChannelState *statePtr = GET_CHANNELSTATE(srcPtr); + Interp *interpPtr = GET_CHANNELINTERP(srcPtr); SET_CHANNELSTATE(copyPtr, statePtr); + SET_CHANNELINTERP(copyPtr, interpPtr); Tcl_Preserve(statePtr); copyPtr->typePtr = &tclChannelType; } @@ -10641,6 +10647,7 @@ SetChannelFromAny( register Tcl_Obj *objPtr) /* The object to convert. */ { ChannelState *statePtr; + Interp *interpPtr; if (objPtr->typePtr == &tclChannelType) { /* @@ -10649,11 +10656,16 @@ SetChannelFromAny( */ statePtr = GET_CHANNELSTATE(objPtr); + interpPtr = GET_CHANNELINTERP(objPtr); if (GotFlag(statePtr, CHANNEL_TAINTED|CHANNEL_CLOSED)) { ResetFlag(statePtr, CHANNEL_TAINTED); Tcl_Release(statePtr); UpdateStringOfChannel(objPtr); objPtr->typePtr = NULL; + } else if (interpPtr != (Interp*) interp) { + Tcl_Release(statePtr); + UpdateStringOfChannel(objPtr); + objPtr->typePtr = NULL; } } if (objPtr->typePtr != &tclChannelType) { @@ -10677,6 +10689,7 @@ SetChannelFromAny( statePtr = ((Channel *) chan)->state; Tcl_Preserve(statePtr); SET_CHANNELSTATE(objPtr, statePtr); + SET_CHANNELINTERP(objPtr, interp); objPtr->typePtr = &tclChannelType; } return TCL_OK; diff --git a/tests/io.test b/tests/io.test index d6ed830..9f41db0 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.91 2008/06/20 20:48:49 dgp Exp $ +# RCS: @(#) $Id: io.test,v 1.92 2008/12/11 17:30:18 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7695,6 +7695,16 @@ test io-73.1 {channel Tcl_Obj SetChannelFromAny} {} { catch {close [lreplace [list a] 0 end]} } {1} +test io-73.2 {channel Tcl_Obj SetChannelFromAny, bug 2407783} {} { + # Invalidate intrep of 'channel' Tcl_Obj when transiting between interpreters. + interp create foo + set f [open [info script] r] + seek $f 0 + set code [catch {interp eval foo [list seek $f 0]} msg] + # The string map converts the changing channel handle to a fixed string + list $code [string map [list $f @@] $msg] +} {1 {can not find channel named "@@"}} + # ### ### ### ######### ######### ######### # cleanup -- cgit v0.12 From 85aba5fb4879a9d1e77e993796d21973453a20cd Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 11 Dec 2008 22:30:31 +0000 Subject: Eliminate warning: different 'const' qualifiers with msvc compiler. A few more 'const' optimizations. fix Windows build (msvc) for TIP #234 implementation --- ChangeLog | 8 ++++++++ generic/tclZlib.c | 21 +++++++++++---------- win/Makefile.in | 4 ++-- win/configure | 4 ++-- win/tcl.m4 | 4 ++-- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07439cc..2567688 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-11 Jan Nijtmans + + * generic/tclZlib.c: Eliminate warning: different 'const' qualifiers + with msvc compiler. A few more 'const' optimizations. + * win/tcl.m4: fix Windows build (msvc) for TIP #234 implementation + * win/Makefile.in: + * win/configure: + 2008-12-11 Andreas Kupries * generic/tclIO.c (SetChannelFromAny and related): Modified the diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 548e941..5632640 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.3 2008/12/11 16:57:13 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.4 2008/12/11 22:30:32 nijtmans Exp $ */ #include "tclInt.h" @@ -61,7 +61,8 @@ ConvertError( case Z_VERSION_ERROR: codeStr = "VERSION"; break; default: codeStr = "unknown"; - sprintf(codeStr2 = codeStrBuf, "%d", code); + codeStr2 = codeStrBuf; + sprintf(codeStrBuf, "%d", code); break; } Tcl_SetObjResult(interp, Tcl_NewStringObj(zError(code), -1)); @@ -112,7 +113,7 @@ GenerateHeader( gz_header *headerPtr) { Tcl_Obj *value; - static const char *types[] = { + static const char *const types[] = { "binary", "text" }; @@ -531,7 +532,7 @@ ZlibStream( Tcl_Obj *const objv[]) { StreamInfo *siPtr = clientData; - static const char *subcmds[] = { + static const char *const subcmds[] = { "adler32", "close", "eof", "finalize", "flush", "fullflush", "get", "put", NULL }; @@ -673,7 +674,7 @@ zstreamincmd( int e, index; Tcl_Obj *obj; - static const char* cmds[] = { "fill", "drain", NULL, }; + static const char *const cmds[] = { "fill", "drain", NULL, }; if (Tcl_GetIndexFromObj(ip, objv[1], cmds, "option", 0, &index) != TCL_OK) { @@ -738,7 +739,7 @@ ZlibCmdO( z_stream stream; Tcl_Obj *obj = Tcl_GetObjResult(ip); - static const char* cmds[] = { + static const char *const cmds[] = { "adler32", "crc32", "compress", "deflate", "decompress", "inflate", "sdecompress", "sinflate", NULL, }; @@ -1942,7 +1943,7 @@ ZlibCmd( Tcl_ZlibStream zh; Byte *data; Tcl_Obj *obj = Tcl_GetObjResult(interp); - static const char *commands[] = { + static const char *const commands[] = { "adler32", "compress", "crc32", "decompress", "deflate", "gunzip", "gzip", "inflate", #ifdef TCLKIT_BUILD @@ -1959,7 +1960,7 @@ ZlibCmd( #endif z_stack, z_stream, z_unstack }; - static const char *stream_formats[] = { + static const char *const stream_formats[] = { "compress", "decompress", "deflate", "gunzip", "gzip", "inflate", NULL }; @@ -2187,7 +2188,7 @@ ZlibStreamCmd( Tcl_Obj *obj = Tcl_GetObjResult(interp); int buffersize; int flush = -1, i; - static const char *cmds[] = { + static const char *const cmds[] = { "add", "adler32", "close", "eof", "finalize", "flush", "fullflush", "get", "put", "reset", NULL @@ -2196,7 +2197,7 @@ ZlibStreamCmd( zs_add, zs_adler32, zs_close, zs_eof, zs_finalize, zs_flush, zs_fullflush, zs_get, zs_put, zs_reset }; - static const char *add_options[] = { + static const char *const add_options[] = { "-buffer", "-finalize", "-flush", "-fullflush", NULL }; enum addOptions { diff --git a/win/Makefile.in b/win/Makefile.in index 16d7474..ebe7f5c 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.138 2008/12/11 14:32:34 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.139 2008/12/11 22:30:31 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -177,7 +177,7 @@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(LIBS) SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ -LIBS = @LIBS@ -lz +LIBS = @LIBS@ RMDIR = rm -rf MKDIR = mkdir -p diff --git a/win/configure b/win/configure index 54c8274..40a48f8 100755 --- a/win/configure +++ b/win/configure @@ -3798,7 +3798,7 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} fi SHLIB_LD="" SHLIB_LD_LIBS="" - LIBS="-lws2_32" + LIBS="-lws2_32 -lz" # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" STLIB_LD='${AR} cr' @@ -3976,7 +3976,7 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 fi fi - LIBS="user32.lib advapi32.lib ws2_32.lib" + LIBS="user32.lib advapi32.lib ws2_32.lib zdll.lib" if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the diff --git a/win/tcl.m4 b/win/tcl.m4 index 1a46527..872b955 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -446,7 +446,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi SHLIB_LD="" SHLIB_LD_LIBS="" - LIBS="-lws2_32" + LIBS="-lws2_32 -lz" # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" STLIB_LD='${AR} cr' @@ -614,7 +614,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi fi - LIBS="user32.lib advapi32.lib ws2_32.lib" + LIBS="user32.lib advapi32.lib ws2_32.lib zdll.lib" if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the -- cgit v0.12 From 9b95ee41939ebc97bbe2ac53b6af4506509776c3 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 12 Dec 2008 04:38:12 +0000 Subject: TIP #322 IMPLEMENTATION * doc/NRE.3 (new file): Added documentation of the published API for Non-Recursive Evaluation (NRE). --- ChangeLog | 7 ++ doc/NRE.3 | 303 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 310 insertions(+) create mode 100644 doc/NRE.3 diff --git a/ChangeLog b/ChangeLog index 2567688..c8a736e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-12 Kevin Kenny + + TIP #322 IMPLEMENTATION + + * doc/NRE.3 (new file): Added documentation of the published + API for Non-Recursive Evaluation (NRE). + 2008-12-11 Jan Nijtmans * generic/tclZlib.c: Eliminate warning: different 'const' qualifiers diff --git a/doc/NRE.3 b/doc/NRE.3 new file mode 100644 index 0000000..edddd7b --- /dev/null +++ b/doc/NRE.3 @@ -0,0 +1,303 @@ +.\" +.\" Copyright (c) 2008 by Kevin B. Eknny. +.\" + +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: NRE.3,v 1.1 2008/12/12 04:38:12 kennykb Exp $ +'\" +.so man.macros +.TH NRE 3 8.6 Tcl "Tcl Library Procedures" +.BS +.SH NAME +Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmdSwap, Tcl_NRAddCallback \- Non-Recursive (stackless) evaluation of Tcl scripts. +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +Tcl_Command +\fBTcl_NRCreateCommand\fR(\fIinterp, cmdName, proc, nreProc, clientData, deleteProc\fR) +.sp +int +\fBTcl_NRCallObjProc\fR(\fIinterp, nreProc, clientData, objc, objv\fR) +.sp +int +\fBTcl_NREvalObj\fR(\fIinterp, objPtr, flags\fR) +.sp +int +\fBTcl_NREvalObjv\fR(\fIinterp, objc, objv, flags\fR) +.sp +int +\fBTcl_NRCmdSwap\fR(\fIinterp, cmd, objc, objv, flags\fR) +.sp +void +\fBTcl_NRAddCallback\fR(\fIinterp, postProcPtr, data0, data1, data2, data3\fR) +.fi +.SH ARGUMENTS +.AS Tcl_CmdDeleteProc *postProcPtr in +.AP Tcl_Interp *interp in +Interpreter in which to create or evaluate a command. +.AP char *cmdName in +Name of a new command to create. +.AP Tcl_ObjCmdProc *proc in +Implementation of a command that will be called whenever \fIcmdName\fR +is invoked as a command in the unoptimized way. +.AP Tcl_ObjCmdProc *nreProc in +Implementation of a command that will be called whenever \fIcmdName\fR +is invoked and requested to conserve the C stack. +.AP ClientData clientData in +Arbitrary one-word value that will be passed to \fIproc\fR, \fInreProc\fR, +\fIdeleteProc\fR and \fIobjProc\fR. +.AP Tcl_CmdDeleteProc *deleteProc in/out +Procedure to call before \fIcmdName\fR is deleted from the interpreter. +This procedure allows for command-specific cleanup. If \fIdeletProc\fR +is \fBNULL\fR, then no procedure is called before the command is deleted. +.AP int objc in +Count of parameters provided to the implementation of a command. +.AP Tcl_Obj **objv in +Pointer to an array of Tcl objects. Each object holds the value of a +single word in the command to execute. +.AP Tcl_Obj *objPtr in +Pointer to a Tcl_Obj whose value is a script to execute. +.AP int flags in +ORed combination of flag bits that specify additional options. +\fBTCL_EVAL_GLOBAL\fR is the only flag that is currently supported. +.\" TODO: This is a lie. But kbk didn't grasp TCL_EVAL_INVOKE and +.\" TCL_EVAL_NOERR well enough to document them. +.AP Tcl_Command cmd in +.AP Tcl_NRPostProc *postProcPtr in +Pointer to a function that will be invoked when the command currently +executing in the interpreter designated by \fIinterp\fR completes. +.AP ClientData data0 in +.AP ClientData data1 in +.AP ClientData data2 in +.AP ClientData data3 in +\fIdata0\fR through \fIdata3\fR are four one-word values that will be passed +to the function designated by \fIpostProcPtr\fR when it is invoked. +.BE +.SH DESCRIPTION +.PP +This series of C functions provides an interface whereby commands that +are implemented in C can be evaluated, and invoke Tcl commands scripts +and scripts, without consuming space on the C stack. The non-recursive +evaluation is done by installing a \fItrampoline\fR, a small piece of +code that invokes a command or script, and then executes a series of +callbacks when the command or script returns. +.PP +The \fBTcl_NRCreateCommand\fR function creates a Tcl command in the +interpreter designated by \fIinterp\fR that is prepared to handle +nonrecursive evaluation with a trampoline. The \fIcmdName\fR argument +gives the name of the new command. If \fIcmdName\fR contains any +namespace qualifiers, then the new command is added to the specified +namespace; otherwise, it is added to the global namespace. \fIproc\fR +gives the procedure that will be called when the interpreter wishes to +evaluate the command in an unoptimized manner, and \fInreProc\fR is +the procedure that will be called when the interpreter wishes to +evaluate the command using a trampoline. \fIdeleteProc\fR is a +function that will be called before the command is deleted from the +interpreter. When any of the three functions is invoked, it is passed +the \fIclientData\fR parameter. +.PP +\fBTcl_NRCreateCommand\fR deletes any existing command +\fIname\fR already associated with the interpreter +(however see below for an exception where the existing command +is not deleted). +It returns a token that may be used to refer +to the command in subsequent calls to \fBTcl_GetCommandName\fR. +If \fBTcl_NRCreateCommand\fR is called for an interpreter that is in +the process of being deleted, then it does not create a new command, +does not delete any existing command of the same name, and returns NULL. +.PP +The \fIproc\fR and \fInreProc\fR function are expected to conform to +all the rules set forth for the \fIproc\fR argument to +\fBTcl_CreateObjCommand\fR(3) (\Iq.v.\fR). +.PP +When a command that is written to cope with evaluation via trampoline +is invoked without a trampoline on the stack, it will usually respond +to the invocation by creating a trampoline and calling the +trampoline-enabled implementation of the same command. This call is done by +means of \fBTcl_NRCallObjProc\fR. In the call to +\fBTcl_NRCallObjProc\fR, the \fIinterp\fR, \fIclientData\fR, +\fIobjc\fR and \fIobjv\fR parameters should be the same ones that were +passed to \fIproc\fR. The \fInreProc\fR parameter should designate the +trampoline-enabled implementation of the command. +.PP +\fBTcl_NREvalObj\fR arranges for the script contained in \fIobjPtr\fR +to be evaluated in the interpreter designated by \fIinterp\fR after +the current command (which must be trampoline-enabled) returns. It is +the method by which a command may invoke a script without consuming +space on the C stack. Similarly, \fBTcl_NREvalObjv\fR arranges to +invoke a single Tcl command whose words have already been separated +and substituted. The \fIobjc\fR and \fIobjv\fR parameters give the +words of the command to be evaluated when execution reaches the +trampoline. +.PP +\fBTcl_NRCmdSwap allows for trampoline evaluation of a command whose +resolution is already known. The \fIcmd\fR parameter gives a +\fBTcl_Command\fR object (returned from \fBTcl_CreateObjCmd\fR or +\fBTcl_GetCommandFromObj\fR) identifying the command to be invoked in +the trampoline; this command must match the word in \fIobjv[0]\fR. +The remaining arguments are as for \fBTcl_NREvalObj\fR. +.PP +\fBTcl_NREvalObj\fR, \fBTcl_NREvalObjv\fR and \fBTcl_NRCmdSwap\fR +all accept a \fIflags\fR parameter, which is an OR-ed-together set of +bits to control evaluation. At the present time, the only flag +available to callers is \fBTCL_EVAL_GLOBAL\fR. +.\" TODO: Again, this is a lie. Do we want to explain TCL_EVAL_INVOKE +.\" and TCL_EVAL_NOERR? +If the \fBTCL_EVAL_GLOBAL\fR flag is set, the script or command is +evaluated in the global namespace. If it is not set, it is evaluated +in the current namespace. +.PP +All three of the routines return \fBTCL_OK\fR if command invocation +has been scheduled successfully. If for any reason command invocation +cannot be scheduled (for example, if the interpreter is unable to find +the requested command), they return \fBTCL_ERROR\fR with an +appropriate message left in the interpreter's result. +.PP +\fBTcl_NRAddCallback\fR arranges to have a C function called when the +current trampoline-enabled command in the Tcl interpreter designated +by \fIinterp\fR returns. The \fIpostProcPtr\fR argument is a pointer +to the callback function, which must have arguments and return value +consistent with the \fBTcl_NRPostProc\fR data type: +.PP +.CS +typedef int +\fBTcl_NRPostProc\fR( + \fBClientData\fR \fIdata\fR[], + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIresult\fR); +.CE +.PP +When the trampoline invokes the callback function, the \fIdata\fR +parameter will point to an array containing the four one-word +quantities that were passed to \fBTcl_NRAddCallback\fR in the +\fIdata0\fR through \fIdata3\fR parameters. The Tcl interpreter will +be designated by the \fIinterp\fR parameter, and the \fIresult\fR +parameter will contain the result (\fBTCL_OK\fR, \fBTCL_ERROR\fR, +\fBTCL_RETURN\fR, \fBTCL_BREAK\fR or \fBTCL_CONTINUE\fR) that was +returned by the command evaluation. The callback function is expected, +in turn, either to return a \fIresult\fR to control further evaluation. +.PP +Multiple \fBTcl_NRAddCallback\fR invocations may request multiple +callbacks, which may be to the same or different callback +functions. If multiple callbacks are requested, they are executed in +last-in, first-out order, that is, the most recently requested +callback is executed first. +.SH EXAMPLE +.PP +The usual pattern for Tcl commands that invoke other Tcl commands +is something like: +.PP +.CS +int \fITheCmdObjProc\fR( + \fBClientData\fR \fIclientData\fR, + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIobjc\fR, + \fBTcl_Obj\fR *const \fIobjv\fR[]) +{ + int \fIresult\fR; + \fBTcl_Obj\fR *\fIobjPtr\fR; + \fI... preparation ...\fR + \fIresult\fR = \fBTcl_EvalObjEx\fR(\fIinterp\fR, \fIobjPtr\fR, 0); + \fI... postprocessing ...\fR + return \fIresult\fR; +} +\fBTcl_CreateObjCommand\fR(\fIinterp\fR, "theCommand", + \fITheCmdObjProc\fR, \fIclientData\fR, + \fITheCmdDeleteProc\fR); +.CE +.PP +To enable a command like this one for trampoline-based evaluation, +it must be split into three pieces: +.IP \(bu +A non-trampoline implementation, \fITheCmdNewObjProc\fR, +which will simply create a trampoline +and invoke the trampoline-based implementation. +.IP \(bu +A trampoline-enabled implementation, \fITheCmdNRObjProc\fR. This +function will perform the initialization, request that the trampoline +call the postprocessing routine after command evaluation, and finally, +request that the trampoline call the inner command. +.IP \(bu +A postprocessing routine, \fITheCmdPostProc\fR. This function will +perform the postprocessing formerly done after the return from the +inner command in \fITheCmdObjProc\fR. +.PP +The non-trampoline implementation is simple and stylized, containing +a single statement: +.PP +.CS +int +TheCmdNewObjProc + \fBClientData\fR \fIclientData\fR, + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIobjc\fR, + \fBTcl_Obj\fR *const \fIobjv\fR[]) +{ + return \fBTcl_NRCallObjProc\fR(\fIinterp, name,\fR + \fITheCmdNRObjProc, clientData, objc, objv\fR); +} +.CE +.PP +The trampoline-enabled implementation requests postprocessing, +and returns to the trampoline requesting command evaluation. +.PP +.CS +int +TheCmdNRObjProc + \fBClientData\fR \fIclientData\fR, + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIobjc\fR, + \fBTcl_Obj\fR *const \fIobjv\fR[]) +{ + \fI... preparation ...\fR + \fBTcl_NRAddCallback\fR(\fIinterp, TheCmdPostProc,\fR + \fIdata0, data1, data2, data3\fR); + /* \fIdata0 .. data3\fR are up to four one-word items + * to pass to the postprocessing procedure */ + return \fBTcl_NREvalObj\fR(\fIinterp, objPtr, 0\fR); +} +.CE +.PP +The postprocessing procedure does whatever the original command did +upon return from the inner evaluation. +.PP +.CS +int +TheCmdNRPostProc + \fBClientData\fR \fIdata\fR[], + \fBTcl_Interp\fR *\fIinterp\fR, + int \fRresult\fR +{ + /* \fIdata[0] .. data[4]\fR are the four words of data + * passed to \fBTcl_NREvalObj\fR */ + \fI... postprocessing ...\fR + return result; +} +.CE +.PP +If \fItheCommand\fR is a command that results in multiple commands or +scripts being evaluated, its postprocessing routine may schedule +additional postprocessing and then request another command evaluation +by means of \fBTcl_NREvalObj\fR or one of the other evaluation +routines. Looping and sequencing constructs may be implemented in this way. +.PP +Finally, to install a trampoline-enabled command in the interpreter, +\fBTcl_NRCreateCommand\fR is used in place of +\fBTcl_CreateObjCommand\fR. It accepts two command procedures instead +of one. The first is for use when no trampoline is yet on the stack, +and the second is for use when there is already a trampoline in place. +.PP +.CS +\fBTcl_NRCreateCommand\fR(\fIinterp\fR, "theCommand", + \fITheCmdObjProc\fR, \fITheCmdNRObjProc\fR, \fIclientData\fR, + \fITheCmdDeleteProc\fR); +.CE +.SH "SEE ALSO" +Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandFromObj(3) +.SH KEYWORDS +stackless, nonrecursive, execute, command, global, object, result, script +.SH COPYRIGHT +Copyright (c) 2008 by Kevin B. Kenny \ No newline at end of file -- cgit v0.12 From 4c5f0b77fc5722c46b40a90eef3b036f035d292a Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 12 Dec 2008 11:59:22 +0000 Subject: Fix [Bug 2419061] --- ChangeLog | 5 + generic/tclZlib.c | 1133 ++++++++++++++++++++++------------------------------- 2 files changed, 463 insertions(+), 675 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8a736e..1de4b4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-12 Donal K. Fellows + + * generic/tclZlib.c (Tcl_ZlibDeflate): Add a bit of extra space for + the gzip header. [Bug 2419061] + 2008-12-12 Kevin Kenny TIP #322 IMPLEMENTATION diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 5632640..c29fe46 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,13 +13,128 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.4 2008/12/11 22:30:32 nijtmans Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.5 2008/12/12 11:59:23 dkf Exp $ */ #include "tclInt.h" #include +#define GZIP_MAGIC_FLAG 16 +#define AUTO_MAGIC_FLAG 32 + +/* + * Structure used for the Tcl_ZlibStream* commands and [zlib stream ...] + */ + +typedef struct { + Tcl_Interp *interp; + z_stream stream; + int streamend; + Tcl_Obj *indata, *outdata; /* Input / output buffers (lists) */ + Tcl_Obj *current_input; /* Pointer to what is currently being + * inflated. */ + int inpos, outpos; + int mode; /* ZLIB_DEFLATE || ZLIB_INFLATE */ + int format; /* ZLIB_FORMAT_* */ + int level; /* Default 5, 0-9 */ + int flush; /* Stores the flush param for deferred the + * decompression. */ + int wbits; + Tcl_Command cmd; /* Token for the associated Tcl command. */ +} zlibStreamHandle; + +/* + * Prototypes for private procedures defined later in this file: + */ + static void ConvertError(Tcl_Interp *interp, int code); +static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); +static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, + gz_header *headerPtr, int *extraSizePtr); +static int ZlibCmd(ClientData dummy, Tcl_Interp *ip, int objc, + Tcl_Obj *const objv[]); +static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static void ZlibStreamCmdDelete(ClientData cd); +static void ZlibStreamCleanup(zlibStreamHandle *zsh); + +/* + * Prototypes for private procedures used by channel stacking: + */ + +#ifdef ENABLE_CHANSTACKING +static int ChanClose(ClientData instanceData, + Tcl_Interp *interp); +static int ChanInput(ClientData instanceData, char *buf, + int toRead, int *errorCodePtr); +static int ChanOutput(ClientData instanceData, const char *buf, + int toWrite, int*errorCodePtr); +static int ChanSetOption(ClientData instanceData, + Tcl_Interp *interp, const char *optionName, + const char *value); +static int ChanGetOption(ClientData instanceData, + Tcl_Interp *interp, const char *optionName, + Tcl_DString *dsPtr); +static void ChanWatch(ClientData instanceData, int mask); +static int ChanGetHandle(ClientData instanceData, int direction, + ClientData *handlePtr); +static int ChanClose2(ClientData instanceData, + Tcl_Interp *interp, int flags); +static int ChanBlockMode(ClientData instanceData, int mode); +static int ChanFlush(ClientData instanceData); +static int ChanHandler(ClientData instanceData, + int interestMask); + +static const Tcl_ChannelType zlibChannelType = { + "zlib", + TCL_CHANNEL_VERSION_3, + ChanClose, + ChanInput, + ChanOutput, + NULL, /* seekProc */ + NULL, /* ChanSetOption, */ + NULL, /* ChanGetOption, */ + ChanWatch, + ChanGetHandle, + NULL, /* ChanClose2, */ + ChanBlockMode, + ChanFlush, + ChanHandler, + NULL /* wideSeekProc */ +}; + +typedef struct { + /* Generic channel info */ + Tcl_Channel channel; + int flags; + int mask; + + /* Zlib specific channel state */ + int inFormat; + int outFormat; + z_stream instream; + z_stream outstream; + char *inbuffer; + int inAllocated, inUsed, inPos; + char *outbuffer; + int outAllocated, outUsed, outPos; +} ZlibChannelData; + +/* Flag values */ +#define ASYNC 1 +#endif /* ENABLE_CHANSTACKING */ + +#ifdef TCLKIT_BUILD +/* + * Structure for the old zlib sdeflate/sdecompress commands + * Deprecated! + */ + +typedef struct { + z_stream stream; + Tcl_Obj *indata; +} zlibstream; +#endif /* TCLKIT_BUILD */ /* *---------------------------------------------------------------------- @@ -70,28 +185,25 @@ ConvertError( } } -#if 0 -typedef struct { - z_stream stream; - gz_header header; - Tcl_Interp *interp; - Tcl_Command cmd; - -} StreamInfo; -typedef struct ThreadSpecificData { - int counter; -} ThreadSpecificData; -static Tcl_ThreadDataKey tsdKey; +/* + *---------------------------------------------------------------------- + * + * GenerateHeader -- + * + * Function for creating a gzip header from the contents of a dictionary + * (as described in the documentation). GetValue is a helper function. + * + * Results: + * A Tcl result code. + * + * Side effects: + * Updates the fields of the given gz_header structure. Adds amount of + * extra space required for the header to the variable referenced by the + * extraSizePtr argument. + * + *---------------------------------------------------------------------- + */ -static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, - gz_header *headerPtr); -static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); -static int ZlibStream(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static void DeleteStream(ClientData clientData); -// TODO: Write streaming C API -// TODO: Write Tcl API - static inline int GetValue( Tcl_Interp *interp, @@ -108,11 +220,15 @@ GetValue( static int GenerateHeader( - Tcl_Interp *interp, - Tcl_Obj *dictObj, - gz_header *headerPtr) + Tcl_Interp *interp, /* Where to put error messages. */ + Tcl_Obj *dictObj, /* The dictionary whose contents are to be + * parsed. */ + gz_header *headerPtr, /* Where to store the parsed-out values. */ + int *extraSizePtr) /* Variable to add the length of header + * strings (filename, comment) to. */ { Tcl_Obj *value; + int extra; static const char *const types[] = { "binary", "text" }; @@ -120,7 +236,8 @@ GenerateHeader( if (GetValue(interp, dictObj, "comment", &value) != TCL_OK) { return TCL_ERROR; } else if (value != NULL) { - headerPtr->comment = (Bytef *) Tcl_GetString(value); + headerPtr->comment = (Bytef *) Tcl_GetStringFromObj(value, &extra); + *extraSizePtr += extra; } if (GetValue(interp, dictObj, "crc", &value) != TCL_OK) { @@ -133,535 +250,96 @@ GenerateHeader( if (GetValue(interp, dictObj, "filename", &value) != TCL_OK) { return TCL_ERROR; } else if (value != NULL) { - headerPtr->name = (Bytef *) Tcl_GetString(value); + headerPtr->name = (Bytef *) Tcl_GetStringFromObj(value, &extra); + *extraSizePtr += extra; } if (GetValue(interp, dictObj, "os", &value) != TCL_OK) { return TCL_ERROR; } else if (value != NULL && Tcl_GetIntFromObj(interp, value, &headerPtr->os) != TCL_OK) { - return TCL_ERROR; - } - - /* - * Ignore the 'size' field. - */ - - if (GetValue(interp, dictObj, "time", &value) != TCL_OK) { - return TCL_ERROR; - } else if (value != NULL && Tcl_GetLongFromObj(interp, value, - (long *) &headerPtr->time) != TCL_OK) { - return TCL_ERROR; - } - - if (GetValue(interp, dictObj, "type", &value) != TCL_OK) { - return TCL_ERROR; - } else if (value != NULL && Tcl_GetIndexFromObj(interp, value, types, - "type", TCL_EXACT, &headerPtr->text) != TCL_OK) { - return TCL_ERROR; - } - - return TCL_OK; -} - -static inline void -SetValue( - Tcl_Obj *dictObj, - const char *key, - Tcl_Obj *value) -{ - Tcl_Obj *keyObj = Tcl_NewStringObj(key, -1); - - Tcl_IncrRefCount(keyObj); - Tcl_DictObjPut(NULL, dictObj, keyObj, value); - TclDecrRefCount(keyObj); -} - -static void -ExtractHeader( - gz_header *headerPtr, - Tcl_Obj *dictObj) -{ - if (headerPtr->comment != Z_NULL) { - SetValue(dictObj, "comment", - Tcl_NewStringObj((char *) headerPtr->comment, -1)); - } - SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc)); - if (headerPtr->name != Z_NULL) { - SetValue(dictObj, "filename", - Tcl_NewStringObj((char *) headerPtr->name, -1)); - } - if (headerPtr->os != 255) { - SetValue(dictObj, "os", Tcl_NewIntObj(headerPtr->os)); - } - if (headerPtr->time != 0 /* magic - no time */) { - SetValue(dictObj, "time", Tcl_NewLongObj((long) headerPtr->time)); - } - if (headerPtr->text != Z_UNKNOWN) { - SetValue(dictObj, "type", - Tcl_NewStringObj(headerPtr->text ? "text" : "binary", -1)); - } -} - -Tcl_Obj * -Tcl_ZlibDeflate( - Tcl_Interp *interp, - int format, - Tcl_Obj *dataObj, - int level, - Tcl_Obj *dictObj) -{ - int rawLength; - unsigned char *rawBytes = Tcl_GetByteArrayFromObj(dataObj, &rawLength); - z_stream stream; - gz_header header, *headerPtr = NULL; - Tcl_Obj *outObj = Tcl_NewObj(); - int code, bits; - - switch (format) { - case TCL_ZLIB_FORMAT_RAW: - bits = -15; - break; - case TCL_ZLIB_FORMAT_ZLIB: - bits = 15; - break; - case TCL_ZLIB_FORMAT_GZIP: - bits = 15 | /* gzip magic */ 16; - if (dictObj != NULL) { - headerPtr = &header; - memset(headerPtr, 0, sizeof(gz_header)); - if (GenerateHeader(interp, dictObj, headerPtr) != TCL_OK) { - Tcl_DecrRefCount(outObj); - return NULL; - } - } - break; - default: - Tcl_Panic("bad compression format: %d", format); - return NULL; - } - - stream.avail_in = (uInt) rawLength; - stream.next_in = rawBytes; - stream.avail_out = (uInt) rawLength + rawLength/1000 + 12; - stream.next_out = Tcl_SetByteArrayLength(outObj, stream.avail_out); - stream.zalloc = NULL; - stream.zfree = NULL; - stream.opaque = NULL; - - code = deflateInit2(&stream, level, Z_DEFLATED, bits, MAX_MEM_LEVEL, - Z_DEFAULT_STRATEGY); - if (code != Z_OK) { - goto error; - } - if (headerPtr != NULL) { - deflateSetHeader(&stream, headerPtr); - if (code != Z_OK) { - goto error; - } - } - code = deflate(&stream, Z_FINISH); - if (code != Z_STREAM_END) { - deflateEnd(&stream); - if (code == Z_OK) { - code = Z_BUF_ERROR; - } - } else { - code = deflateEnd(&stream); - } - - if (code == Z_OK) { - Tcl_SetByteArrayLength(outObj, stream.total_out); - return outObj; - } - - error: - Tcl_DecrRefCount(outObj); - ConvertError(interp, code); - return NULL; -} - -Tcl_Obj * -Tcl_ZlibInflate( - Tcl_Interp *interp, - int format, - Tcl_Obj *dataObj, - Tcl_Obj *dictObj) -{ - int compressedLength; - unsigned char *compressedBytes = - Tcl_GetByteArrayFromObj(dataObj, &compressedLength); - z_stream stream; - gz_header header, *headerPtr = NULL; - Tcl_Obj *outObj = Tcl_NewObj(); - unsigned int outSize = 16 * 1024; - int code = Z_BUF_ERROR, bits; - char *nameBuf = NULL, *commentBuf = NULL; - - stream.avail_in = (uInt) compressedLength + 1; - stream.next_in = compressedBytes; - stream.opaque = NULL; - - switch (format) { - case TCL_ZLIB_FORMAT_RAW: - bits = -15; - break; - case TCL_ZLIB_FORMAT_ZLIB: - bits = 15; - break; - case TCL_ZLIB_FORMAT_GZIP: - bits = 15 | /* gzip magic */ 16; - if (dictObj != NULL) { - goto allocHeader; - } - break; - case TCL_ZLIB_FORMAT_AUTO: - bits = 15 | /* auto magic */ 32; - if (dictObj != NULL) { - allocHeader: - headerPtr = &header; - memset(headerPtr, 0, sizeof(gz_header)); - nameBuf = ckalloc(PATH_MAX); - header.name = (void *) nameBuf; - header.name_max = PATH_MAX; - commentBuf = ckalloc(256); - header.comment = (void *) commentBuf; - header.comm_max = 256; - } - break; - default: - Tcl_Panic("unrecognized format: %d", format); - return NULL; - } - - /* - * Loop trying to decompress until we've got enough space. Inefficient, - * but works. - */ - - for (; (outSize > 1024) && (code == Z_BUF_ERROR) ; outSize *= 2) { - stream.zalloc = NULL; - stream.zfree = NULL; - stream.avail_out = (uInt) outSize; - stream.next_out = Tcl_SetByteArrayLength(outObj, outSize); - - code = inflateInit2(&stream, bits); - if (code != Z_OK) { - goto error; - } - - if (headerPtr != NULL) { - inflateGetHeader(&stream, headerPtr); - if (code != Z_OK) { - goto error; - } - } - - code = inflate(&stream, Z_FINISH); - - if (code != Z_STREAM_END) { - inflateEnd(&stream); - if (code == Z_OK) { - code = Z_BUF_ERROR; - } - } else { - code = inflateEnd(&stream); - } - } - - if (code == Z_OK) { - if (headerPtr != NULL) { - ExtractHeader(headerPtr, dictObj); - SetValue(dictObj, "size", Tcl_NewLongObj((long)stream.total_out)); - ckfree(nameBuf); - ckfree(commentBuf); - } - Tcl_SetByteArrayLength(outObj, stream.total_out); - return outObj; - } - - error: - Tcl_DecrRefCount(outObj); - if (headerPtr != NULL) { - ckfree(nameBuf); - ckfree(commentBuf); - } - ConvertError(interp, code); - return NULL; -} - -unsigned int -Tcl_ZlibCRC32( - const char *bytes, - int length) -{ - unsigned int initValue = crc32(0, NULL, 0); - - return crc32(initValue, (unsigned char *) bytes, (unsigned) length); -} - -unsigned int -Tcl_ZlibAdler32( - const char *bytes, - int length) -{ - unsigned int initValue = adler32(0, NULL, 0); - - return adler32(initValue, (unsigned char *) bytes, (unsigned) length); -} - -int -Tcl_ZlibStreamInit( - Tcl_Interp *interp, - int mode, - int format, - int level, - Tcl_Obj *dictObj, - Tcl_ZlibStream *zshandlePtr) -{ - StreamInfo *siPtr = (StreamInfo *) ckalloc(sizeof(StreamInfo)); - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tsdKey); - char buf[TCL_INTEGER_SPACE+8]; - - memset(&siPtr->stream, 0, sizeof(z_stream)); - memset(&siPtr->header, 0, sizeof(gz_header)); - - siPtr->interp = interp; - sprintf(buf, "zstream%d", tsdPtr->counter++); - siPtr->cmd = Tcl_CreateObjCommand(interp, buf, ZlibStream, siPtr, - DeleteStream); - - Tcl_Panic("unimplemented"); - - *zshandlePtr = (Tcl_ZlibStream) siPtr; - return TCL_OK; -} - -Tcl_Obj * -Tcl_ZlibStreamGetCommandName( - Tcl_ZlibStream zshandle) -{ - StreamInfo *siPtr = (StreamInfo *) zshandle; - Tcl_Obj *cmdnameObj = Tcl_NewObj(); - - Tcl_GetCommandFullName(siPtr->interp, siPtr->cmd, cmdnameObj); - return cmdnameObj; -} - -int -Tcl_ZlibStreamEof( - Tcl_ZlibStream zshandle) -{ - StreamInfo *siPtr = (StreamInfo *) zshandle; - Tcl_Panic("unimplemented"); - return -1; -} - -int -Tcl_ZlibStreamClose( - Tcl_ZlibStream zshandle) -{ - StreamInfo *siPtr = (StreamInfo *) zshandle; - int code = -1; - - Tcl_Panic("unimplemented"); - - if (siPtr->cmd) { - /* - * Must be last in this function! - */ - - register Tcl_Command cmd = siPtr->cmd; - - siPtr->cmd = NULL; - Tcl_DeleteCommandFromToken(siPtr->interp, cmd); - } - return code; -} - -int -Tcl_ZlibStreamAdler32( - Tcl_ZlibStream zshandle) -{ - StreamInfo *siPtr = (StreamInfo *) zshandle; - Tcl_Panic("unimplemented"); - return -1; -} - -int -Tcl_ZlibStreamPut( - Tcl_ZlibStream zshandle, - const char *bytes, - int length, - int flush) -{ - StreamInfo *siPtr = (StreamInfo *) zshandle; - Tcl_Panic("unimplemented"); - return -1; -} - -int -Tcl_ZlibStreamGet( - Tcl_ZlibStream zshandle, - const char *bytes, - int length) -{ - StreamInfo *siPtr = (StreamInfo *) zshandle; - Tcl_Panic("unimplemented"); - return -1; -} - -static void -DeleteStream( - ClientData clientData) -{ - register StreamInfo *siPtr = clientData; - - if (siPtr->cmd) { - siPtr->cmd = NULL; - Tcl_ZlibStreamClose(clientData); - } - ckfree(clientData); -} - -static int -ZlibStream( - ClientData clientData, - Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) -{ - StreamInfo *siPtr = clientData; - static const char *const subcmds[] = { - "adler32", "close", "eof", "finalize", "flush", "fullflush", "get", - "put", NULL - }; - - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "subcommand ..."); - return TCL_ERROR; - } - Tcl_SetResult(interp, "unimplemented", TCL_STATIC); - return TCL_ERROR; -} - -#else /* !REIMPLEMENT */ - -/* - * Structure used for the Tcl_ZlibStream* commands and [zlib stream ...] - */ - -typedef struct { - Tcl_Interp *interp; - z_stream stream; - int streamend; - Tcl_Obj *indata, *outdata; /* Input / output buffers (lists) */ - Tcl_Obj *current_input; /* Pointer to what is currently being - * inflated. */ - int inpos, outpos; - int mode; /* ZLIB_DEFLATE || ZLIB_INFLATE */ - int format; /* ZLIB_FORMAT_* */ - int level; /* Default 5, 0-9 */ - int flush; /* Stores the flush param for deferred the - * decompression. */ - int wbits; - Tcl_Obj *cmdname; /* Name of the associated Tcl command */ -} zlibStreamHandle; - - -/* - * Prototypes for private procedures defined later in this file: - */ - -static int ZlibCmd(ClientData dummy, Tcl_Interp *ip, int objc, - Tcl_Obj *const objv[]); -static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static void ZlibStreamCmdDelete(ClientData cd); -static void ZlibStreamCleanup(zlibStreamHandle *zsh); - -/* - * Prototypes for private procedures used by channel stacking: - */ - -#ifdef ENABLE_CHANSTACKING -static int ChanClose(ClientData instanceData, - Tcl_Interp *interp); -static int ChanInput(ClientData instanceData, char *buf, - int toRead, int *errorCodePtr); -static int ChanOutput(ClientData instanceData, const char *buf, - int toWrite, int*errorCodePtr); -static int ChanSeek(ClientData instanceData, long offset, - int mode, int *errorCodePtr); -static int ChanSetOption(ClientData instanceData, - Tcl_Interp *interp, const char *optionName, - const char *value); -static int ChanGetOption(ClientData instanceData, - Tcl_Interp *interp, const char *optionName, - Tcl_DString *dsPtr); -static void ChanWatch(ClientData instanceData, int mask); -static int ChanGetHandle(ClientData instanceData, int direction, - ClientData *handlePtr); -static int ChanClose2(ClientData instanceData, - Tcl_Interp *interp, int flags); -static int ChanBlockMode(ClientData instanceData, int mode); -static int ChanFlush(ClientData instanceData); -static int ChanHandler(ClientData instanceData, - int interestMask); -static Tcl_WideInt ChanWideSeek(ClientData instanceData, - Tcl_WideInt offset, int mode, int *errorCodePtr); - -static Tcl_ChannelType zlibChannelType = { - "zlib", - TCL_CHANNEL_VERSION_3, - ChanClose, - ChanInput, - ChanOutput, - NULL, /* ChanSeek, */ - NULL, /* ChanSetOption, */ - NULL, /* ChanGetOption, */ - ChanWatch, - ChanGetHandle, - NULL, /* ChanClose2, */ - ChanBlockMode, - ChanFlush, - ChanHandler, - NULL /* ChanWideSeek */ -}; + return TCL_ERROR; + } -typedef struct { - /* Generic channel info */ - Tcl_Channel channel; - Tcl_TimerToken timer; - int flags; - int mask; + /* + * Ignore the 'size' field, since that is controlled by the size of the + * input data. + */ - /* Zlib specific channel state */ - int inFormat; - int outFormat; - z_stream instream; - z_stream outstream; - char *inbuffer; - int inAllocated, inUsed, inPos; - char *outbuffer; - int outAllocated, outUsed, outPos; -} Zlib_ChannelData; + if (GetValue(interp, dictObj, "time", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL && Tcl_GetLongFromObj(interp, value, + (long *) &headerPtr->time) != TCL_OK) { + return TCL_ERROR; + } -/* Flag values */ -#define ASYNC 1 -#endif /* ENABLE_CHANSTACKING */ + if (GetValue(interp, dictObj, "type", &value) != TCL_OK) { + return TCL_ERROR; + } else if (value != NULL && Tcl_GetIndexFromObj(interp, value, types, + "type", TCL_EXACT, &headerPtr->text) != TCL_OK) { + return TCL_ERROR; + } + + return TCL_OK; +} -#ifdef TCLKIT_BUILD /* - * Structure for the old zlib sdeflate/sdecompress commands - * Deprecated! + *---------------------------------------------------------------------- + * + * ExtractHeader -- + * + * Take the values out of a gzip header and store them in a dictionary. + * SetValue is a helper function. + * + * Results: + * None. + * + * Side effects: + * Updates the dictionary, which must be writable (i.e. refCount < 2). + * + *---------------------------------------------------------------------- */ -typedef struct { - z_stream stream; - Tcl_Obj *indata; -} zlibstream; +static inline void +SetValue( + Tcl_Obj *dictObj, + const char *key, + Tcl_Obj *value) +{ + Tcl_Obj *keyObj = Tcl_NewStringObj(key, -1); + + Tcl_IncrRefCount(keyObj); + Tcl_DictObjPut(NULL, dictObj, keyObj, value); + TclDecrRefCount(keyObj); +} +static void +ExtractHeader( + gz_header *headerPtr, /* The gzip header to extract from. */ + Tcl_Obj *dictObj) /* The dictionary to store in. */ +{ + if (headerPtr->comment != Z_NULL) { + SetValue(dictObj, "comment", + Tcl_NewStringObj((char *) headerPtr->comment, -1)); + } + SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc)); + if (headerPtr->name != Z_NULL) { + SetValue(dictObj, "filename", + Tcl_NewStringObj((char *) headerPtr->name, -1)); + } + if (headerPtr->os != 255) { + SetValue(dictObj, "os", Tcl_NewIntObj(headerPtr->os)); + } + if (headerPtr->time != 0 /* magic - no time */) { + SetValue(dictObj, "time", Tcl_NewLongObj((long) headerPtr->time)); + } + if (headerPtr->text != Z_UNKNOWN) { + SetValue(dictObj, "type", + Tcl_NewStringObj(headerPtr->text ? "text" : "binary", -1)); + } +} + +#ifdef TCLKIT_BUILD static int zstreamincmd( ClientData cd, @@ -914,50 +592,61 @@ Tcl_ZlibStreamInit( Tcl_DString cmdname; Tcl_CmdInfo cmdinfo; - if (mode == TCL_ZLIB_STREAM_DEFLATE) { + switch (mode) { + case TCL_ZLIB_STREAM_DEFLATE: /* * Compressed format is specified by the wbits parameter. See zlib.h * for details. */ - if (format == TCL_ZLIB_FORMAT_RAW) { + switch (format) { + case TCL_ZLIB_FORMAT_RAW: wbits = -MAX_WBITS; - } else if (format == TCL_ZLIB_FORMAT_GZIP) { - wbits = MAX_WBITS+16; - } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + break; + case TCL_ZLIB_FORMAT_GZIP: + wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + break; + case TCL_ZLIB_FORMAT_ZLIB: wbits = MAX_WBITS; - } else { + break; + default: Tcl_Panic("incorrect zlib data format, must be " "TCL_ZLIB_FORMAT_ZLIB, TCL_ZLIB_FORMAT_GZIP or " "TCL_ZLIB_FORMAT_RAW"); } if (level < -1 || level > 9) { - if (interp) { - Tcl_SetResult(interp, "Compression level should be between " - "0 (no compression) and 9 (best compression) or -1 " - "for default compression level.", TCL_STATIC); - } - return TCL_ERROR; + Tcl_Panic("compression level should be between 0 (no compression)" + " and 9 (best compression) or -1 for default compression " + "level"); } - } else { + break; + case TCL_ZLIB_STREAM_INFLATE: /* - * mode == ZLIB_INFLATE * wbits are the same as DEFLATE, but FORMAT_AUTO is valid too. */ - if (format == TCL_ZLIB_FORMAT_RAW) { + switch (format) { + case TCL_ZLIB_FORMAT_RAW: wbits = -MAX_WBITS; - } else if (format == TCL_ZLIB_FORMAT_GZIP) { - wbits = MAX_WBITS+16; - } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + break; + case TCL_ZLIB_FORMAT_GZIP: + wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + break; + case TCL_ZLIB_FORMAT_ZLIB: wbits = MAX_WBITS; - } else if (format == TCL_ZLIB_FORMAT_AUTO) { - wbits = MAX_WBITS+32; - } else { + break; + case TCL_ZLIB_FORMAT_AUTO: + wbits = MAX_WBITS | AUTO_MAGIC_FLAG; + break; + default: Tcl_Panic("incorrect zlib data format, must be " "TCL_ZLIB_FORMAT_ZLIB, TCL_ZLIB_FORMAT_GZIP, " "TCL_ZLIB_FORMAT_RAW or TCL_ZLIB_FORMAT_AUTO"); } + break; + default: + Tcl_Panic("bad mode, must be TCL_ZLIB_STREAM_DEFLATE or" + " TCL_ZLIB_STREAM_INFLATE"); } zsh = (zlibStreamHandle *) ckalloc(sizeof(zlibStreamHandle)); @@ -1007,9 +696,10 @@ Tcl_ZlibStreamInit( Tcl_DStringAppend(&cmdname, Tcl_GetString(Tcl_GetObjResult(interp)), -1); if (Tcl_GetCommandInfo(interp, Tcl_DStringValue(&cmdname), - &cmdinfo) == 1 ) { + &cmdinfo) == 1) { Tcl_SetResult(interp, "BUG: Stream command name already exists", TCL_STATIC); + Tcl_DStringFree(&cmdname); goto error; } Tcl_ResetResult(interp); @@ -1018,19 +708,14 @@ Tcl_ZlibStreamInit( * Create the command. */ - Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdname), + zsh->cmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdname), ZlibStreamCmd, zsh, ZlibStreamCmdDelete); - - /* - * Create the cmdname obj for future reference. - */ - - zsh->cmdname = Tcl_NewStringObj(Tcl_DStringValue(&cmdname), - Tcl_DStringLength(&cmdname)); - Tcl_IncrRefCount(zsh->cmdname); Tcl_DStringFree(&cmdname); + if (zsh->cmd == NULL) { + goto error; + } } else { - zsh->cmdname = NULL; + zsh->cmd = NULL; } /* @@ -1083,6 +768,7 @@ ZlibStreamCmdDelete( { zlibStreamHandle *zsh = cd; + zsh->cmd = NULL; ZlibStreamCleanup(zsh); } @@ -1116,9 +802,8 @@ Tcl_ZlibStreamClose( * ZlibStreamCleanup directly. */ - if (zsh->interp && zsh->cmdname) { - Tcl_DeleteCommand(zsh->interp, - Tcl_GetStringFromObj(zsh->cmdname, NULL)); + if (zsh->interp && zsh->cmd) { + Tcl_DeleteCommandFromToken(zsh->interp, zsh->cmd); } else { ZlibStreamCleanup(zsh); } @@ -1160,9 +845,6 @@ ZlibStreamCleanup( if (zsh->outdata) { Tcl_DecrRefCount(zsh->outdata); } - if (zsh->cmdname) { - Tcl_DecrRefCount(zsh->cmdname); - } if (zsh->current_input) { Tcl_DecrRefCount(zsh->current_input); } @@ -1259,9 +941,11 @@ Tcl_Obj * Tcl_ZlibStreamGetCommandName( Tcl_ZlibStream zshandle) /* as obtained from Tcl_ZlibStreamInit */ { - zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + Tcl_Obj *objPtr = Tcl_NewObj(); - return zsh->cmdname; + Tcl_GetCommandFullName(zsh->interp, zsh->cmd, objPtr); + return objPtr; } /* @@ -1666,9 +1350,10 @@ Tcl_ZlibDeflate( int level, Tcl_Obj *gzipHeaderDictObj) { - int wbits = 0, bdlen = 0, e = 0; + int wbits = 0, bdlen = 0, e = 0, extraSize = 0; Byte *bdata = 0; z_stream stream; + gz_header header, *headerPtr = NULL; Tcl_Obj *obj; /* @@ -1688,7 +1373,24 @@ Tcl_ZlibDeflate( if (format == TCL_ZLIB_FORMAT_RAW) { wbits = -MAX_WBITS; } else if (format == TCL_ZLIB_FORMAT_GZIP) { - wbits = MAX_WBITS + 16; + wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + + /* + * Need to allocate extra space for the gzip header and footer. The + * amount of space is (a bit less than) 32 bytes, plus a byte for each + * byte of string that we add. Note that over-allocation is not a + * problem. [Bug 2419061] + */ + + extraSize = 32; + if (gzipHeaderDictObj) { + headerPtr = &header; + memset(headerPtr, 0, sizeof(gz_header)); + if (GenerateHeader(interp, gzipHeaderDictObj, + headerPtr, &extraSize) != TCL_OK) { + return TCL_ERROR; + } + } } else if (format == TCL_ZLIB_FORMAT_ZLIB) { wbits = MAX_WBITS; } else { @@ -1723,27 +1425,27 @@ Tcl_ZlibDeflate( e = deflateInit2(&stream, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); - if (e != Z_OK) { ConvertError(interp, e); return TCL_ERROR; } + if (headerPtr != NULL) { + e = deflateSetHeader(&stream, headerPtr); + if (e != Z_OK) { + ConvertError(interp, e); + return TCL_ERROR; + } + } + /* * Allocate the output buffer from the value of deflateBound(). This is * probably too much space. Before returning to the caller, we will reduce * it back to the actual compressed size. */ - stream.avail_out = deflateBound(&stream, bdlen); - /* TODO: What happens if this next call fails? */ - Tcl_SetByteArrayLength(obj, stream.avail_out); - - /* - * And point the output buffer to the obj buffer. - */ - - stream.next_out = Tcl_GetByteArrayFromObj(obj, NULL); + stream.avail_out = deflateBound(&stream, bdlen) + extraSize; + stream.next_out = Tcl_SetByteArrayLength(obj, stream.avail_out); /* * Perform the compression, Z_FINISH means do it in one go. @@ -1752,7 +1454,7 @@ Tcl_ZlibDeflate( e = deflate(&stream, Z_FINISH); if (e != Z_STREAM_END) { - deflateEnd(&stream); + e = deflateEnd(&stream); /* * deflateEnd() returns Z_OK when there are bytes left to compress, at @@ -1792,7 +1494,9 @@ Tcl_ZlibInflate( int wbits = 0 , inlen = 0, e = 0, newbuffersize; Byte *indata = NULL, *outdata = NULL, *newoutdata = NULL; z_stream stream; + gz_header header, *headerPtr = NULL; Tcl_Obj *obj; + char *nameBuf = NULL, *commentBuf = NULL; /* * We pass the data back in the interp result obj... @@ -1808,15 +1512,34 @@ Tcl_ZlibInflate( * details. */ - if (format == TCL_ZLIB_FORMAT_RAW) { + switch (format) { + case TCL_ZLIB_FORMAT_RAW: wbits = -MAX_WBITS; - } else if (format == TCL_ZLIB_FORMAT_GZIP) { - wbits = MAX_WBITS+16; - } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + break; + case TCL_ZLIB_FORMAT_GZIP: + wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + break; + case TCL_ZLIB_FORMAT_ZLIB: wbits = MAX_WBITS; - } else if (format == TCL_ZLIB_FORMAT_AUTO) { - wbits = MAX_WBITS+32; - } else { + if (gzipHeaderDictObj) { + goto allocHeader; + } + break; + case TCL_ZLIB_FORMAT_AUTO: + wbits = MAX_WBITS | AUTO_MAGIC_FLAG; + if (gzipHeaderDictObj) { + allocHeader: + headerPtr = &header; + memset(headerPtr, 0, sizeof(gz_header)); + nameBuf = ckalloc(PATH_MAX); + header.name = (void *) nameBuf; + header.name_max = PATH_MAX; + commentBuf = ckalloc(256); + header.comment = (void *) commentBuf; + header.comm_max = 256; + } + break; + default: Tcl_Panic("incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, " "TCL_ZLIB_FORMAT_GZIP, TCL_ZLIB_FORMAT_RAW or ZLIB_FORMAT_AUTO"); } @@ -1842,14 +1565,24 @@ Tcl_ZlibInflate( stream.next_out = outdata; /* - * Start the decompression cycle. + * Initialize zlib for decompression. */ e = inflateInit2(&stream, wbits); if (e != Z_OK) { - ConvertError(interp, e); - return TCL_ERROR; + goto error; + } + if (headerPtr) { + inflateGetHeader(&stream, headerPtr); + if (e != Z_OK) { + goto error; + } } + + /* + * Start the decompression cycle. + */ + while (1) { e = inflate(&stream, Z_FINISH); if (e != Z_BUF_ERROR) { @@ -1864,9 +1597,8 @@ Tcl_ZlibInflate( */ if ((stream.avail_in == 0) && (stream.avail_out > 0)) { - Tcl_SetResult(interp, "decompression failed, input truncated?", - TCL_STATIC); - return TCL_ERROR; + e = Z_STREAM_ERROR; + goto error; } newbuffersize = buffersize + 5 * stream.avail_in; if (newbuffersize == buffersize) { @@ -1891,14 +1623,12 @@ Tcl_ZlibInflate( if (e != Z_STREAM_END) { inflateEnd(&stream); - ConvertError(interp, e); - return TCL_ERROR; + goto error; } e = inflateEnd(&stream); if (e != Z_OK) { - ConvertError(interp, e); - return TCL_ERROR; + goto error; } /* @@ -1906,7 +1636,24 @@ Tcl_ZlibInflate( */ Tcl_SetByteArrayLength(obj, stream.total_out); + if (headerPtr != NULL) { + ExtractHeader(&header, gzipHeaderDictObj); + SetValue(gzipHeaderDictObj, "size", + Tcl_NewLongObj((long) stream.total_out)); + ckfree(nameBuf); + ckfree(commentBuf); + } return TCL_OK; + + error: + ConvertError(interp, e); + if (nameBuf) { + ckfree(nameBuf); + } + if (commentBuf) { + ckfree(commentBuf); + } + return TCL_ERROR; } unsigned int @@ -1935,7 +1682,7 @@ ZlibCmd( int objc, Tcl_Obj *const objv[]) { - int command, dlen, mode, format; + int command, dlen, mode, format, i, option; #ifdef TCLKIT_BUILD int wbits = -MAX_WBITS; #endif @@ -1943,6 +1690,7 @@ ZlibCmd( Tcl_ZlibStream zh; Byte *data; Tcl_Obj *obj = Tcl_GetObjResult(interp); + Tcl_Obj *headerDictObj, *headerVarObj; static const char *const commands[] = { "adler32", "compress", "crc32", "decompress", "deflate", "gunzip", "gzip", "inflate", @@ -2041,20 +1789,38 @@ ZlibCmd( return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], level, NULL); case z_gzip: /* gzip data ?level? -> gzippedCompressedData */ - if (objc > 4) { - Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); + if (objc > 7 || ((objc & 1) == 0)) { + Tcl_WrongNumArgs(interp, 2, objv, + "data ?-level level? ?-header header?"); return TCL_ERROR; } - if (objc > 3) { - if (Tcl_GetIntFromObj(interp, objv[3], (int *)&level) != TCL_OK) { + headerDictObj = NULL; + for (i=3 ; i 9) { - goto badLevel; + switch (option) { + case 0: + headerDictObj = objv[i+1]; + break; + case 1: + if (Tcl_GetIntFromObj(interp, objv[i+1], + (int *)&level) != TCL_OK) { + return TCL_ERROR; + } + if (level < 0 || level > 9) { + goto badLevel; + } + break; } } return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], level, - NULL); + headerDictObj); case z_inflate: /* inflate rawcomprdata ?bufferSize? * -> decompressedData */ if (objc > 4) { @@ -2074,11 +1840,6 @@ ZlibCmd( buffersize, NULL); case z_decompress: /* decompress zlibcomprdata ?bufferSize? * -> decompressedData */ - /* - * We rely on TCL_ZLIB_FORMAT_AUTO to determine type. - */ - case z_gunzip: /* gunzip gzippeddata ?bufferSize? - * -> decompressedData */ if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); return TCL_ERROR; @@ -2092,8 +1853,55 @@ ZlibCmd( goto badBuffer; } } - return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_AUTO, objv[2], + return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], buffersize, NULL); + case z_gunzip: /* gunzip gzippeddata ?bufferSize? + * -> decompressedData */ + if (objc > 5 || ((objc & 1) == 0)) { + Tcl_WrongNumArgs(interp, 2, objv, "data ?-headerVar varName?"); + return TCL_ERROR; + } + headerDictObj = headerVarObj = NULL; + for (i=3 ; i 65536) { + goto badBuffer; + } + break; + case 1: + headerVarObj = objv[i+1]; + headerDictObj = Tcl_NewObj(); + break; + } + } + if (Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], + buffersize, headerDictObj) != TCL_OK) { + if (headerDictObj) { + TclDecrRefCount(headerDictObj); + } + return TCL_ERROR; + } + if (headerVarObj != NULL && Tcl_ObjSetVar2(interp, headerVarObj, NULL, + headerDictObj, TCL_LEAVE_ERR_MSG) == NULL) { + if (headerDictObj) { + TclDecrRefCount(headerDictObj); + } + return TCL_ERROR; + } + return TCL_OK; case z_stream: /* stream deflate/inflate/...gunzip ?level?*/ if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "mode ?level?"); @@ -2356,16 +2164,16 @@ ZlibStreamCmd( } #ifdef ENABLE_CHANSTACKING - /* - * Set of functions to support channel stacking - */ +/* + * Set of functions to support channel stacking. + */ static int ChanClose( ClientData instanceData, Tcl_Interp *interp) { - Zlib_ChannelData *cd = instanceData; + ZlibChannelData *cd = instanceData; Tcl_Channel parent; int e; @@ -2406,7 +2214,7 @@ ChanInput( int toRead, int *errorCodePtr) { - Zlib_ChannelData *cd = instanceData; + ZlibChannelData *cd = instanceData; return TCL_OK; } @@ -2418,19 +2226,7 @@ ChanOutput( int toWrite, int *errorCodePtr) { - Zlib_ChannelData *cd = instanceData; - - return TCL_OK; -} - -static int -ChanSeek( - ClientData instanceData, - long offset, - int mode, - int *errorCodePtr) -{ - Zlib_ChannelData *cd = instanceData; + ZlibChannelData *cd = instanceData; return TCL_OK; } @@ -2442,7 +2238,7 @@ ChanSetOption( /* not used */ const char *optionName, const char *value) { - Zlib_ChannelData *cd = instanceData; + ZlibChannelData *cd = instanceData; Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); Tcl_DriverSetOptionProc *setOptionProc = Tcl_ChannelSetOptionProc(Tcl_GetChannelType(parent)); @@ -2500,7 +2296,7 @@ ChanBlockMode( ClientData instanceData, int mode) { - Zlib_ChannelData *cd = instanceData; + ZlibChannelData *cd = instanceData; if (mode == TCL_MODE_NONBLOCKING) { cd->flags |= ASYNC; @@ -2514,7 +2310,7 @@ static int ChanFlush( ClientData instanceData) { - Zlib_ChannelData *cd = instanceData; + ZlibChannelData *cd = instanceData; return TCL_OK; } @@ -2524,18 +2320,8 @@ ChanHandler( ClientData instanceData, int interestMask) { - Zlib_ChannelData *cd = instanceData; - - return TCL_OK; -} + ZlibChannelData *cd = instanceData; -Tcl_WideInt -ChanWideSeek( /* not used */ - ClientData instanceData, - Tcl_WideInt offset, - int mode, - int *errorCodePtr) -{ return TCL_OK; } @@ -2546,43 +2332,42 @@ Tcl_ZlibStackChannel( int inLevel, int outFormat, int outLevel, - Tcl_Channel channel) + Tcl_Channel channel, + Tcl_Obj *gzipHeaderDictPtr) { - Zlib_ChannelData *cd; + ZlibChannelData *cd; int outwbits = 0, inwbits = 0; int e; if (inFormat & ZLIB_FORMAT_RAW) { inwbits = -MAX_WBITS; } else if (inFormat & ZLIB_FORMAT_GZIP) { - inwbits = MAX_WBITS+16; + inwbits = MAX_WBITS | GZIP_MAGIC_FLAG; } else if (inFormat & ZLIB_FORMAT_ZLIB) { inwbits = MAX_WBITS; } else if ((inFormat & ZLIB_FORMAT_AUTO) && (inFormat & ZLIB_INFLATE)) { - inwbits = MAX_WBITS+32; + inwbits = MAX_WBITS | AUTO_MAGIC_FLAG; } else if (inFormat != ZLIB_PASSTHROUGH) { - Tcl_SetResult(interp, "Incorrect zlib read/input data format, must " - "be ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " - "ZLIB_FORMAT_AUTO (only for inflate).", TCL_STATIC); - return NULL; + Tcl_Panic("incorrect zlib read/input data format, must be " + "ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " + "ZLIB_FORMAT_AUTO (only for inflate)"); } if (outFormat & ZLIB_FORMAT_RAW) { outwbits = -MAX_WBITS; } else if (outFormat & ZLIB_FORMAT_GZIP) { - outwbits = MAX_WBITS+16; + outwbits = MAX_WBITS | GZIP_MAGIC_FLAG; } else if (outFormat & ZLIB_FORMAT_ZLIB) { outwbits = MAX_WBITS; } else if ((outFormat & ZLIB_FORMAT_AUTO) && (outFormat & ZLIB_INFLATE)) { - outwbits = MAX_WBITS+32; + outwbits = MAX_WBITS | AUTO_MAGIC_FLAG; } else if (outFormat != ZLIB_PASSTHROUGH) { - Tcl_SetResult(interp, "Incorrect zlib write/output data format, must " - "be ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " - "ZLIB_FORMAT_AUTO (only for inflate).", TCL_STATIC); - return NULL; + Tcl_Panic("incorrect zlib write/output data format, must be " + "ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " + "ZLIB_FORMAT_AUTO (only for inflate)"); } - cd = (Zlib_ChannelData *) ckalloc(sizeof(Zlib_ChannelData)); + cd = (ZlibChannelData *) ckalloc(sizeof(ZlibChannelData)); cd->inFormat = inFormat; cd->outFormat = outFormat; @@ -2630,11 +2415,10 @@ Tcl_ZlibStackChannel( -1)); return channel; } - #endif /* ENABLE_CHANSTACKING */ /* - * Finaly, the TclZlibInit function. Used to install the zlib API. + * Finally, the TclZlibInit function. Used to install the zlib API. */ int @@ -2645,7 +2429,6 @@ TclZlibInit( Tcl_CreateObjCommand(interp, "zlib", ZlibCmd, 0, 0); return TCL_OK; } -#endif /* REIMPLEMENT */ /* * Local Variables: -- cgit v0.12 From 7fc6444f30a8f79bd34b84365947628bcb7f3be3 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 12 Dec 2008 15:00:01 +0000 Subject: Added test for gzip header access --- tests/zlib.test | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/zlib.test b/tests/zlib.test index 2e66530..7ce56f2 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.1 2008/12/11 14:13:33 dkf Exp $ +# RCS: @(#) $Id: zlib.test,v 1.2 2008/12/12 15:00:01 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -35,6 +35,11 @@ test zlib-3.1 {zlib deflate/inflate} { test zlib-4.1 {zlib gzip/gunzip} { zlib gunzip [zlib gzip abcdefghijklm] } abcdefghijklm +test zlib-4.2 {zlib gzip/gunzip} { + set s [string repeat abcdef 5] + list [zlib gunzip [zlib gzip $s -header {comment gorp}] -header head] \ + [dict get $head comment] [dict get $head size] +} {abcdefabcdefabcdefabcdefabcdef gorp 30} test zlib-5.1 {zlib adler32} { format %x [zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde] -- cgit v0.12 From 6ebb11823238d9bf5e8b20524bacc6c72450693f Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 12 Dec 2008 15:06:09 +0000 Subject: Let code extract gzip headers --- ChangeLog | 2 + generic/tclZlib.c | 594 +++++++++++++----------------------------------------- 2 files changed, 142 insertions(+), 454 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1de4b4e..43a5a64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * generic/tclZlib.c (Tcl_ZlibDeflate): Add a bit of extra space for the gzip header. [Bug 2419061] + (Tcl_ZlibInflate): Ensure that gzip header extraction is done + correctly. 2008-12-12 Kevin Kenny diff --git a/generic/tclZlib.c b/generic/tclZlib.c index c29fe46..0daea04 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.5 2008/12/12 11:59:23 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.6 2008/12/12 15:06:10 dkf Exp $ */ #include "tclInt.h" @@ -29,11 +29,11 @@ typedef struct { Tcl_Interp *interp; z_stream stream; - int streamend; - Tcl_Obj *indata, *outdata; /* Input / output buffers (lists) */ - Tcl_Obj *current_input; /* Pointer to what is currently being + int streamEnd; + Tcl_Obj *inData, *outData; /* Input / output buffers (lists) */ + Tcl_Obj *currentInput; /* Pointer to what is currently being * inflated. */ - int inpos, outpos; + int inPos, outPos; int mode; /* ZLIB_DEFLATE || ZLIB_INFLATE */ int format; /* ZLIB_FORMAT_* */ int level; /* Default 5, 0-9 */ @@ -123,18 +123,6 @@ typedef struct { /* Flag values */ #define ASYNC 1 #endif /* ENABLE_CHANSTACKING */ - -#ifdef TCLKIT_BUILD -/* - * Structure for the old zlib sdeflate/sdecompress commands - * Deprecated! - */ - -typedef struct { - z_stream stream; - Tcl_Obj *indata; -} zlibstream; -#endif /* TCLKIT_BUILD */ /* *---------------------------------------------------------------------- @@ -339,225 +327,6 @@ ExtractHeader( } } -#ifdef TCLKIT_BUILD -static int -zstreamincmd( - ClientData cd, - Tcl_Interp *ip, - int objc, - Tcl_Obj *const objv[]) -{ - zlibstream *zp = cd; - int count = 0; - int e, index; - Tcl_Obj *obj; - - static const char *const cmds[] = { "fill", "drain", NULL, }; - - if (Tcl_GetIndexFromObj(ip, objv[1], cmds, "option", 0, - &index) != TCL_OK) { - return TCL_ERROR; - } - - switch (index) { - case 0: /* fill ?data? */ - if (objc >= 3) { - Tcl_IncrRefCount(objv[2]); - Tcl_DecrRefCount(zp->indata); - zp->indata = objv[2]; - zp->stream.next_in = - Tcl_GetByteArrayFromObj(zp->indata, &zp->stream.avail_in); - } - Tcl_SetObjResult(ip, Tcl_NewIntObj(zp->stream.avail_in)); - break; - case 1: /* drain count */ - if (objc != 3) { - Tcl_WrongNumArgs(ip, 2, objv, "count"); - return TCL_ERROR; - } - if (Tcl_GetIntFromObj(ip, objv[2], &count) != TCL_OK) { - return TCL_ERROR; - } - obj = Tcl_GetObjResult(ip); - Tcl_SetByteArrayLength(obj, count); - zp->stream.next_out = - Tcl_GetByteArrayFromObj(obj, &zp->stream.avail_out); - e = inflate(&zp->stream, Z_NO_FLUSH); - if (e != Z_OK && e != Z_STREAM_END) { - ConvertError(ip, e); - return TCL_ERROR; - } - Tcl_SetByteArrayLength(obj, count - zp->stream.avail_out); - break; - } - return TCL_OK; -} - -static void -zstreamdelproc( - ClientData cd) -{ - zlibstream *zp = cd; - - inflateEnd(&zp->stream); - Tcl_DecrRefCount(zp->indata); - ckfree((void*) zp); -} - -static int -ZlibCmdO( - ClientData dummy, - Tcl_Interp *ip, - int objc, - Tcl_Obj *const objv[]) -{ - int e = TCL_OK, index, dlen, wbits = -MAX_WBITS; - unsigned flag; - Byte *data; - z_stream stream; - Tcl_Obj *obj = Tcl_GetObjResult(ip); - - static const char *const cmds[] = { - "adler32", "crc32", "compress", "deflate", "decompress", "inflate", - "sdecompress", "sinflate", NULL, - }; - - if (objc < 3 || objc > 4) { - Tcl_WrongNumArgs(ip, 1, objv, "option data ?...?"); - return TCL_ERROR; - } - - if (Tcl_GetIndexFromObj(ip, objv[1], cmds, "option", 0, - &index) != TCL_OK || (objc > 3 && - Tcl_GetIntFromObj(ip, objv[3], &flag)) != TCL_OK) { - return TCL_ERROR; - } - - data = Tcl_GetByteArrayFromObj(objv[2], &dlen); - - switch (index) { - case 0: /* adler32 str ?start? -> checksum */ - if (objc < 4) { - flag = adler32(0, 0, 0); - } - Tcl_SetIntObj(obj, adler32(flag, data, dlen)); - return TCL_OK; - case 1: /* crc32 str ?start? -> checksum */ - if (objc < 4) { - flag = crc32(0, 0, 0); - } - Tcl_SetIntObj(obj, crc32(flag, data, dlen)); - return TCL_OK; - case 2: /* compress data ?level? -> data */ - wbits = MAX_WBITS; - case 3: /* deflate data ?level? -> data */ - if (objc < 4) { - flag = Z_DEFAULT_COMPRESSION; - } - - stream.avail_in = (uInt) dlen; - stream.next_in = data; - - stream.avail_out = (uInt) dlen + dlen / 1000 + 12; - Tcl_SetByteArrayLength(obj, stream.avail_out); - stream.next_out = Tcl_GetByteArrayFromObj(obj, NULL); - - stream.zalloc = 0; - stream.zfree = 0; - stream.opaque = 0; - - e = deflateInit2(&stream, flag, Z_DEFLATED, wbits, - MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); - if (e != Z_OK) { - break; - } - - e = deflate(&stream, Z_FINISH); - if (e != Z_STREAM_END) { - deflateEnd(&stream); - if (e == Z_OK) { - e = Z_BUF_ERROR; - } - } else { - e = deflateEnd(&stream); - } - break; - case 4: /* decompress data ?bufsize? -> data */ - wbits = MAX_WBITS; - case 5: /* inflate data ?bufsize? -> data */ - if (objc < 4) { - flag = 16 * 1024; - } - - for (;;) { - stream.zalloc = 0; - stream.zfree = 0; - - /* - * +1 because ZLIB can "over-request" input (but ignore it) - */ - - stream.avail_in = (uInt) dlen + 1; - stream.next_in = data; - - stream.avail_out = (uInt) flag; - Tcl_SetByteArrayLength(obj, stream.avail_out); - stream.next_out = Tcl_GetByteArrayFromObj(obj, NULL); - - /* - * Negative value suppresses ZLIB header - */ - - e = inflateInit2(&stream, wbits); - if (e == Z_OK) { - e = inflate(&stream, Z_FINISH); - if (e != Z_STREAM_END) { - inflateEnd(&stream); - if (e == Z_OK) { - e = Z_BUF_ERROR; - } - } else { - e = inflateEnd(&stream); - } - } - - if (e == Z_OK || e != Z_BUF_ERROR) { - break; - } - - Tcl_SetByteArrayLength(obj, 0); - flag *= 2; - } - break; - case 6: /* sdecompress cmdname -> */ - wbits = MAX_WBITS; - case 7: { /* sinflate cmdname -> */ - zlibstream *zp = (zlibstream *) ckalloc(sizeof(zlibstream)); - - zp->indata = Tcl_NewObj(); - Tcl_IncrRefCount(zp->indata); - zp->stream.zalloc = 0; - zp->stream.zfree = 0; - zp->stream.opaque = 0; - zp->stream.next_in = 0; - zp->stream.avail_in = 0; - inflateInit2(&zp->stream, wbits); - Tcl_CreateObjCommand(ip, Tcl_GetStringFromObj(objv[2], 0), - zstreamincmd, (ClientData) zp, zstreamdelproc); - return TCL_OK; - } - } - - if (e != Z_OK) { - ConvertError(ip, e); - return TCL_ERROR; - } - - Tcl_SetByteArrayLength(obj, stream.total_out); - return TCL_OK; -} -#endif /* TCLKIT_BUILD */ - /* *---------------------------------------------------------------------- * @@ -655,8 +424,8 @@ Tcl_ZlibStreamInit( zsh->format = format; zsh->level = level; zsh->wbits = wbits; - zsh->current_input = NULL; - zsh->streamend = 0; + zsh->currentInput = NULL; + zsh->streamEnd = 0; zsh->stream.avail_in = 0; zsh->stream.next_in = 0; zsh->stream.zalloc = 0; @@ -688,11 +457,11 @@ Tcl_ZlibStreamInit( */ if (interp != NULL) { - if (Tcl_Eval(interp, "incr ::zlib::cmdcounter") != TCL_OK) { + if (Tcl_Eval(interp, "incr ::tcl::zlib::cmdcounter") != TCL_OK) { goto error; } Tcl_DStringInit(&cmdname); - Tcl_DStringAppend(&cmdname, "::zlib::streamcmd-", -1); + Tcl_DStringAppend(&cmdname, "::tcl::zlib::streamcmd_", -1); Tcl_DStringAppend(&cmdname, Tcl_GetString(Tcl_GetObjResult(interp)), -1); if (Tcl_GetCommandInfo(interp, Tcl_DStringValue(&cmdname), @@ -722,13 +491,13 @@ Tcl_ZlibStreamInit( * Prepare the buffers for use. */ - zsh->indata = Tcl_NewListObj(0, NULL); - Tcl_IncrRefCount(zsh->indata); - zsh->outdata = Tcl_NewListObj(0, NULL); - Tcl_IncrRefCount(zsh->outdata); + zsh->inData = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(zsh->inData); + zsh->outData = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(zsh->outData); - zsh->inpos = 0; - zsh->outpos = 0; + zsh->inPos = 0; + zsh->outPos = 0; /* * Now set the int pointed to by *zshandle to the pointer to the zsh @@ -831,7 +600,7 @@ void ZlibStreamCleanup( zlibStreamHandle *zsh) { - if (!zsh->streamend) { + if (!zsh->streamEnd) { if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { deflateEnd(&zsh->stream); } else { @@ -839,14 +608,14 @@ ZlibStreamCleanup( } } - if (zsh->indata) { - Tcl_DecrRefCount(zsh->indata); + if (zsh->inData) { + Tcl_DecrRefCount(zsh->inData); } - if (zsh->outdata) { - Tcl_DecrRefCount(zsh->outdata); + if (zsh->outData) { + Tcl_DecrRefCount(zsh->outData); } - if (zsh->current_input) { - Tcl_DecrRefCount(zsh->current_input); + if (zsh->currentInput) { + Tcl_DecrRefCount(zsh->currentInput); } ckfree((void *) zsh); @@ -875,23 +644,23 @@ Tcl_ZlibStreamReset( zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; int e; - if (!zsh->streamend) { + if (!zsh->streamEnd) { if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { deflateEnd(&zsh->stream); } else { inflateEnd(&zsh->stream); } } - Tcl_SetByteArrayLength(zsh->indata, 0); - Tcl_SetByteArrayLength(zsh->outdata, 0); - if (zsh->current_input) { - Tcl_DecrRefCount(zsh->current_input); - zsh->current_input=NULL; + Tcl_SetByteArrayLength(zsh->inData, 0); + Tcl_SetByteArrayLength(zsh->outData, 0); + if (zsh->currentInput) { + Tcl_DecrRefCount(zsh->currentInput); + zsh->currentInput = NULL; } - zsh->inpos = 0; - zsh->outpos = 0; - zsh->streamend = 0; + zsh->inPos = 0; + zsh->outPos = 0; + zsh->streamEnd = 0; zsh->stream.avail_in = 0; zsh->stream.next_in = 0; zsh->stream.zalloc = 0; @@ -973,7 +742,7 @@ Tcl_ZlibStreamEof( { zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; - return zsh->streamend; + return zsh->streamEnd; } int @@ -985,67 +754,6 @@ Tcl_ZlibStreamAdler32( return zsh->stream.adler; } -#ifdef DISABLED_CODE -int -Tcl_ZlibStreamAdd( - Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ - char *data, /* Data to compress/decompress */ - int size, /* Byte length of data */ - int flush, /* 0, ZLIB_FLUSH, ZLIB_FULLFLUSH, - * ZLIB_FINALIZE */ - Tcl_Obj *outdata, /* An object to append the compressed data - * to. */ - int buffersize) /* Hint of the expected output size of - * inflate/deflate */ -{ - zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; - char *datatmp=0, *outptr=0; - int e, outsize; - - zsh->stream.next_in = data; - zsh->stream.avail_in = size; - - if (zsh->mode == ZLIB_DEFLATE) { - if (buffersize < 6) { - /* - * The 6 comes from the zlib.h description of deflate. If the - * suggested buffer size is below 6, use deflateBound to get the - * minimum number of bytes needed from zlib. - */ - - zsh->stream.avail_out = - deflateBound(&zsh->stream, zsh->stream.avail_in); - } else { - zsh->stream.avail_out=buffersize; - } - datatmp = ckalloc(zsh->stream.avail_out); - zsh->stream.next_out = datatmp; - e = deflate(&zsh->stream, flush); - while ((e==Z_OK || e==Z_BUF_ERROR) && zsh->stream.avail_out==0) { - /* Output buffer too small */ - Tcl_Panic("StreamAdd/Deflate - Buffer growing not implemented yet"); - } - - /* - * Now append the (de)compressed data to outdata. - */ - - Tcl_GetByteArrayFromObj(outdata, &outsize); - outptr = Tcl_SetByteArrayLength(outdata, - outsize + zsh->stream.total_out); - memcpy(&outptr[outsize], datatmp, zsh->stream.total_out); - } else { - if (buffersize == 0) { - /* Start with a buffer 3 times the size of the input data */ - /* TODO: integer bounds/overflow check */ - buffersize = 3*zsh->stream.avail_in; - } - Tcl_Panic("StreamAdd/Inflate - not implemented yet"); - } - return TCL_OK; -} -#endif /* DISABLED_CODE */ - int Tcl_ZlibStreamPut( Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ @@ -1058,7 +766,7 @@ Tcl_ZlibStreamPut( int e, size, outSize; Tcl_Obj *obj; - if (zsh->streamend) { + if (zsh->streamEnd) { if (zsh->interp) { Tcl_SetResult(zsh->interp, "already past compressed stream end", TCL_STATIC); @@ -1093,7 +801,7 @@ Tcl_ZlibStreamPut( * Now append the compressed data to the outbuffer. */ - Tcl_ListObjAppendElement(zsh->interp, zsh->outdata, obj); + Tcl_ListObjAppendElement(zsh->interp, zsh->outData, obj); } if (outSize < 0xFFFF) { outSize = 0xFFFF; /* There may be *lots* of data left to @@ -1119,14 +827,14 @@ Tcl_ZlibStreamPut( * Now append the compressed data to the outbuffer. */ - Tcl_ListObjAppendElement(zsh->interp, zsh->outdata, obj); + Tcl_ListObjAppendElement(zsh->interp, zsh->outData, obj); } } else { /* * This is easy. Just append to inbuffer. */ - Tcl_ListObjAppendElement(zsh->interp, zsh->indata, data); + Tcl_ListObjAppendElement(zsh->interp, zsh->inData, data); /* * and we'll need the flush parameter for the Inflate call. @@ -1154,7 +862,7 @@ Tcl_ZlibStreamGet( * Getting beyond the of stream, just return empty string. */ - if (zsh->streamend) { + if (zsh->streamEnd) { return TCL_OK; } @@ -1181,11 +889,11 @@ Tcl_ZlibStreamGet( * zlib will probably need more data to decompress. */ - if (zsh->current_input) { - Tcl_DecrRefCount(zsh->current_input); - zsh->current_input=0; + if (zsh->currentInput) { + Tcl_DecrRefCount(zsh->currentInput); + zsh->currentInput = NULL; } - if (Tcl_ListObjLength(zsh->interp, zsh->indata, + if (Tcl_ListObjLength(zsh->interp, zsh->inData, &listLen) != TCL_OK) { return TCL_ERROR; } @@ -1195,13 +903,13 @@ Tcl_ZlibStreamGet( * give it to zlib. */ - if (Tcl_ListObjIndex(zsh->interp, zsh->indata, 0, + if (Tcl_ListObjIndex(zsh->interp, zsh->inData, 0, &itemObj) != TCL_OK) { return TCL_ERROR; } itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); Tcl_IncrRefCount(itemObj); - zsh->current_input = itemObj; + zsh->currentInput = itemObj; zsh->stream.next_in = itemPtr; zsh->stream.avail_in = itemLen; @@ -1209,13 +917,13 @@ Tcl_ZlibStreamGet( * And remove it from the list */ - Tcl_ListObjReplace(NULL, zsh->indata, 0, 1, 0, NULL); + Tcl_ListObjReplace(NULL, zsh->inData, 0, 1, 0, NULL); listLen--; } } e = inflate(&zsh->stream, zsh->flush); - if (Tcl_ListObjLength(zsh->interp, zsh->indata, &listLen) != TCL_OK) { + if (Tcl_ListObjLength(zsh->interp, zsh->inData, &listLen) != TCL_OK) { return TCL_ERROR; } @@ -1236,18 +944,18 @@ Tcl_ZlibStreamGet( return TCL_ERROR; } - if (zsh->current_input) { - Tcl_DecrRefCount(zsh->current_input); - zsh->current_input = 0; + if (zsh->currentInput) { + Tcl_DecrRefCount(zsh->currentInput); + zsh->currentInput = 0; } - if (Tcl_ListObjIndex(zsh->interp, zsh->indata, 0, + if (Tcl_ListObjIndex(zsh->interp, zsh->inData, 0, &itemObj) != TCL_OK) { return TCL_ERROR; } itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); Tcl_IncrRefCount(itemObj); - zsh->current_input = itemObj; + zsh->currentInput = itemObj; zsh->stream.next_in = itemPtr; zsh->stream.avail_in = itemLen; @@ -1255,7 +963,7 @@ Tcl_ZlibStreamGet( * And remove it from the list. */ - Tcl_ListObjReplace(NULL, zsh->indata, 0, 1, 0, NULL); + Tcl_ListObjReplace(NULL, zsh->inData, 0, 1, 0, NULL); listLen--; /* @@ -1272,15 +980,15 @@ Tcl_ZlibStreamGet( return TCL_ERROR; } if (e == Z_STREAM_END) { - zsh->streamend = 1; - if (zsh->current_input) { - Tcl_DecrRefCount(zsh->current_input); - zsh->current_input = 0; + zsh->streamEnd = 1; + if (zsh->currentInput) { + Tcl_DecrRefCount(zsh->currentInput); + zsh->currentInput = 0; } inflateEnd(&zsh->stream); } } else { - if (Tcl_ListObjLength(zsh->interp, zsh->outdata, + if (Tcl_ListObjLength(zsh->interp, zsh->outData, &listLen) != TCL_OK) { return TCL_ERROR; } @@ -1288,13 +996,13 @@ Tcl_ZlibStreamGet( if (count == -1) { count = 0; for (i=0; iinterp, zsh->outdata, i, + if (Tcl_ListObjIndex(zsh->interp, zsh->outData, i, &itemObj) != TCL_OK) { return TCL_ERROR; } itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); if (i == 0) { - count += itemLen - zsh->outpos; + count += itemLen - zsh->outPos; } else { count += itemLen; } @@ -1308,27 +1016,27 @@ Tcl_ZlibStreamGet( dataPtr = Tcl_SetByteArrayLength(data, count); while ((count > dataPos) && (Tcl_ListObjLength(zsh->interp, - zsh->outdata, &listLen) == TCL_OK) && (listLen > 0)) { - Tcl_ListObjIndex(zsh->interp, zsh->outdata, 0, &itemObj); + zsh->outData, &listLen) == TCL_OK) && (listLen > 0)) { + Tcl_ListObjIndex(zsh->interp, zsh->outData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); - if (itemLen-zsh->outpos >= count-dataPos) { + if (itemLen-zsh->outPos >= count-dataPos) { unsigned len = count - dataPos; - memcpy(dataPtr + dataPos, itemPtr + zsh->outpos, len); - zsh->outpos += len; + memcpy(dataPtr + dataPos, itemPtr + zsh->outPos, len); + zsh->outPos += len; dataPos += len; - if (zsh->outpos == itemLen) { - zsh->outpos = 0; + if (zsh->outPos == itemLen) { + zsh->outPos = 0; } } else { - unsigned len = itemLen - zsh->outpos; + unsigned len = itemLen - zsh->outPos; - memcpy(dataPtr + dataPos, itemPtr + zsh->outpos, len); + memcpy(dataPtr + dataPos, itemPtr + zsh->outPos, len); dataPos += len; - zsh->outpos = 0; + zsh->outPos = 0; } - if (zsh->outpos == 0) { - Tcl_ListObjReplace(NULL, zsh->outdata, 0, 1, 0, NULL); + if (zsh->outPos == 0) { + Tcl_ListObjReplace(NULL, zsh->outData, 0, 1, 0, NULL); listLen--; } } @@ -1350,8 +1058,8 @@ Tcl_ZlibDeflate( int level, Tcl_Obj *gzipHeaderDictObj) { - int wbits = 0, bdlen = 0, e = 0, extraSize = 0; - Byte *bdata = 0; + int wbits = 0, inLen = 0, e = 0, extraSize = 0; + Byte *inData = NULL; z_stream stream; gz_header header, *headerPtr = NULL; Tcl_Obj *obj; @@ -1408,9 +1116,9 @@ Tcl_ZlibDeflate( * to the deflate command. */ - bdata = Tcl_GetByteArrayFromObj(data, &bdlen); - stream.avail_in = (uInt) bdlen; - stream.next_in = bdata; + inData = Tcl_GetByteArrayFromObj(data, &inLen); + stream.avail_in = (uInt) inLen; + stream.next_in = inData; stream.zalloc = 0; stream.zfree = 0; stream.opaque = 0; /* Must be initialized before calling @@ -1426,15 +1134,13 @@ Tcl_ZlibDeflate( e = deflateInit2(&stream, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); if (e != Z_OK) { - ConvertError(interp, e); - return TCL_ERROR; + goto error; } if (headerPtr != NULL) { e = deflateSetHeader(&stream, headerPtr); if (e != Z_OK) { - ConvertError(interp, e); - return TCL_ERROR; + goto error; } } @@ -1444,7 +1150,7 @@ Tcl_ZlibDeflate( * it back to the actual compressed size. */ - stream.avail_out = deflateBound(&stream, bdlen) + extraSize; + stream.avail_out = deflateBound(&stream, inLen) + extraSize; stream.next_out = Tcl_SetByteArrayLength(obj, stream.avail_out); /* @@ -1470,17 +1176,20 @@ Tcl_ZlibDeflate( } if (e != Z_OK) { - ConvertError(interp, e); - return TCL_ERROR; + goto error; } /* - * Reduce the BA length to the actual data length produced by deflate. + * Reduce the bytearray length to the actual data length produced by + * deflate. */ Tcl_SetByteArrayLength(obj, stream.total_out); - return TCL_OK; + + error: + ConvertError(interp, e); + return TCL_ERROR; } int @@ -1488,11 +1197,11 @@ Tcl_ZlibInflate( Tcl_Interp *interp, int format, Tcl_Obj *data, - int buffersize, + int bufferSize, Tcl_Obj *gzipHeaderDictObj) { - int wbits = 0 , inlen = 0, e = 0, newbuffersize; - Byte *indata = NULL, *outdata = NULL, *newoutdata = NULL; + int wbits = 0, inLen = 0, e = 0, newBufferSize; + Byte *inData = NULL, *outData = NULL, *newOutData = NULL; z_stream stream; gz_header header, *headerPtr = NULL; Tcl_Obj *obj; @@ -1515,54 +1224,57 @@ Tcl_ZlibInflate( switch (format) { case TCL_ZLIB_FORMAT_RAW: wbits = -MAX_WBITS; - break; - case TCL_ZLIB_FORMAT_GZIP: - wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + gzipHeaderDictObj = NULL; break; case TCL_ZLIB_FORMAT_ZLIB: wbits = MAX_WBITS; - if (gzipHeaderDictObj) { - goto allocHeader; - } + gzipHeaderDictObj = NULL; + break; + case TCL_ZLIB_FORMAT_GZIP: + wbits = MAX_WBITS | GZIP_MAGIC_FLAG; break; case TCL_ZLIB_FORMAT_AUTO: wbits = MAX_WBITS | AUTO_MAGIC_FLAG; - if (gzipHeaderDictObj) { - allocHeader: - headerPtr = &header; - memset(headerPtr, 0, sizeof(gz_header)); - nameBuf = ckalloc(PATH_MAX); - header.name = (void *) nameBuf; - header.name_max = PATH_MAX; - commentBuf = ckalloc(256); - header.comment = (void *) commentBuf; - header.comm_max = 256; - } break; default: Tcl_Panic("incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, " "TCL_ZLIB_FORMAT_GZIP, TCL_ZLIB_FORMAT_RAW or ZLIB_FORMAT_AUTO"); } - indata = Tcl_GetByteArrayFromObj(data,&inlen); - if (buffersize == 0) { + if (gzipHeaderDictObj) { + headerPtr = &header; + memset(headerPtr, 0, sizeof(gz_header)); + nameBuf = ckalloc(PATH_MAX); + header.name = (void *) nameBuf; + header.name_max = PATH_MAX; + commentBuf = ckalloc(256); + header.comment = (void *) commentBuf; + header.comm_max = 256; + } + + inData = Tcl_GetByteArrayFromObj(data, &inLen); + if (bufferSize < 1) { /* - * Start with a buffer 3 times the size of the input data. - * - * TODO: integer bounds/overflow check + * Start with a buffer (up to) 3 times the size of the input data. */ - buffersize = 3*inlen; + if (inLen < 32*1024*1024) { + bufferSize = 3*inLen; + } else if (inLen < 256*1024*1024) { + bufferSize = 2*inLen; + } else { + bufferSize = inLen; + } } - outdata = Tcl_SetByteArrayLength(obj, buffersize); + outData = Tcl_SetByteArrayLength(obj, bufferSize); stream.zalloc = 0; stream.zfree = 0; - stream.avail_in = (uInt) inlen+1; /* +1 because ZLIB can "over-request" + stream.avail_in = (uInt) inLen+1; /* +1 because ZLIB can "over-request" * input (but ignore it!) */ - stream.next_in = indata; - stream.avail_out = buffersize; - stream.next_out = outdata; + stream.next_in = inData; + stream.avail_out = bufferSize; + stream.next_out = outData; /* * Initialize zlib for decompression. @@ -1600,25 +1312,25 @@ Tcl_ZlibInflate( e = Z_STREAM_ERROR; goto error; } - newbuffersize = buffersize + 5 * stream.avail_in; - if (newbuffersize == buffersize) { - newbuffersize = buffersize+1000; + newBufferSize = bufferSize + 5 * stream.avail_in; + if (newBufferSize == bufferSize) { + newBufferSize = bufferSize+1000; } - newoutdata = Tcl_SetByteArrayLength(obj, newbuffersize); + newOutData = Tcl_SetByteArrayLength(obj, newBufferSize); /* * Set next out to the same offset in the new location. */ - stream.next_out = newoutdata + stream.total_out; + stream.next_out = newOutData + stream.total_out; /* * And increase avail_out with the number of new bytes allocated. */ - stream.avail_out += newbuffersize - buffersize; - outdata = newoutdata; - buffersize = newbuffersize; + stream.avail_out += newBufferSize - bufferSize; + outData = newOutData; + bufferSize = newBufferSize; } if (e != Z_STREAM_END) { @@ -1683,9 +1395,6 @@ ZlibCmd( Tcl_Obj *const objv[]) { int command, dlen, mode, format, i, option; -#ifdef TCLKIT_BUILD - int wbits = -MAX_WBITS; -#endif unsigned start, level = -1, buffersize = 0; Tcl_ZlibStream zh; Byte *data; @@ -1693,20 +1402,12 @@ ZlibCmd( Tcl_Obj *headerDictObj, *headerVarObj; static const char *const commands[] = { "adler32", "compress", "crc32", "decompress", "deflate", "gunzip", - "gzip", "inflate", -#ifdef TCLKIT_BUILD - "sdecompress", "sinflate", -#endif - "stack", "stream", "unstack", + "gzip", "inflate", "stack", "stream", "unstack", NULL }; enum zlibCommands { z_adler32, z_compress, z_crc32, z_decompress, z_deflate, z_gunzip, - z_gzip, z_inflate, -#ifdef TCLKIT_BUILD - z_sdecompress, z_sinflate, -#endif - z_stack, z_stream, z_unstack + z_gzip, z_inflate, z_stack, z_stream, z_unstack }; static const char *const stream_formats[] = { "compress", "decompress", "deflate", "gunzip", "gzip", "inflate", @@ -1726,7 +1427,8 @@ ZlibCmd( } switch ((enum zlibCommands) command) { - case z_adler32: /* adler32 str ?startvalue? -> checksum */ + case z_adler32: /* adler32 str ?startvalue? + * -> checksum */ if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); return TCL_ERROR; @@ -1742,7 +1444,8 @@ ZlibCmd( Tcl_SetIntObj(obj, (int) Tcl_ZlibAdler32(start, (const char *) data, dlen)); return TCL_OK; - case z_crc32: /* crc32 str ?startvalue? -> checksum */ + case z_crc32: /* crc32 str ?startvalue? + * -> checksum */ if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); return TCL_ERROR; @@ -1758,7 +1461,8 @@ ZlibCmd( Tcl_SetIntObj(obj, (int) Tcl_ZlibCRC32(start, (const char *) data, dlen)); return TCL_OK; - case z_deflate: /* deflate data ?level? -> rawCompressedData */ + case z_deflate: /* deflate data ?level? + * -> rawCompressedData */ if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); return TCL_ERROR; @@ -1773,7 +1477,8 @@ ZlibCmd( } return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], level, NULL); - case z_compress: /* compress data ?level? -> zlibCompressedData */ + case z_compress: /* compress data ?level? + * -> zlibCompressedData */ if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); return TCL_ERROR; @@ -1788,7 +1493,8 @@ ZlibCmd( } return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], level, NULL); - case z_gzip: /* gzip data ?level? -> gzippedCompressedData */ + case z_gzip: /* gzip data ?level? + * -> gzippedCompressedData */ if (objc > 7 || ((objc & 1) == 0)) { Tcl_WrongNumArgs(interp, 2, objv, "data ?-level level? ?-header header?"); @@ -1909,7 +1615,6 @@ ZlibCmd( } if (Tcl_GetIndexFromObj(interp, objv[2], stream_formats, "stream format", 0, &format) != TCL_OK) { - Tcl_AppendResult(interp, "format error: integer", NULL); return TCL_ERROR; } mode = TCL_ZLIB_STREAM_INFLATE; @@ -1953,25 +1658,6 @@ ZlibCmd( break; case z_unstack: /* unstack */ break; -#ifdef TCLKIT_BUILD - case z_sdecompress: /* sdecompress cmdname -> */ - wbits = MAX_WBITS; - case z_sinflate: {/* sinflate cmdname -> */ - zlibstream *zp = (zlibstream *) ckalloc(sizeof(zlibstream)); - - zp->indata = Tcl_NewObj(); - Tcl_IncrRefCount(zp->indata); - zp->stream.zalloc = 0; - zp->stream.zfree = 0; - zp->stream.opaque = 0; - zp->stream.next_in = 0; - zp->stream.avail_in = 0; - inflateInit2(&zp->stream, wbits); - Tcl_CreateObjCommand(interp, Tcl_GetStringFromObj(objv[2], 0), - zstreamincmd, zp, zstreamdelproc); - return TCL_OK; - } -#endif /* TCLKIT_BUILD */ }; return TCL_ERROR; @@ -2425,7 +2111,7 @@ int TclZlibInit( Tcl_Interp *interp) { - Tcl_Eval(interp, "namespace eval ::zlib {variable cmdcounter 0}"); + Tcl_Eval(interp, "namespace eval ::tcl::zlib {variable cmdcounter 0}"); Tcl_CreateObjCommand(interp, "zlib", ZlibCmd, 0, 0); return TCL_OK; } -- cgit v0.12 From 93b82f20898aee2279608c81083e429192114e7a Mon Sep 17 00:00:00 2001 From: ferrieux Date: Fri, 12 Dec 2008 16:07:17 +0000 Subject: Fix missing CLOEXEC on internal pipes [2417695] and [chan pipe] fds. --- ChangeLog | 5 +++++ unix/tclUnixNotfy.c | 8 +++++++- unix/tclUnixPipe.c | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43a5a64..39e3769 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-12 Alexandre Ferrieux + + * unix/tclUnixNotfy.c Fix missing CLOEXEC on internal pipes [2417695] + * unix/tclUnixPipe.c Fix missing CLOEXEC on [chan pipe] fds. + 2008-12-12 Donal K. Fellows * generic/tclZlib.c (Tcl_ZlibDeflate): Add a bit of extra space for diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index eae0ee9..434ae84 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.37 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.38 2008/12/12 16:07:18 ferrieux Exp $ */ #include "tclInt.h" @@ -937,6 +937,12 @@ NotifierThreadProc( if (TclUnixSetBlockingMode(fds[1], TCL_MODE_NONBLOCKING) < 0) { Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking"); } + if (fcntl(receivePipe, F_SETFD, FD_CLOEXEC) < 0) { + Tcl_Panic("NotifierThreadProc: could not make receive pipe close-on-exec"); + } + if (fcntl(fds[1], F_SETFD, FD_CLOEXEC) < 0) { + Tcl_Panic("NotifierThreadProc: could not make trigger pipe close-on-exec"); + } /* * Install the write end of the pipe into the global variable. diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index a243889..967d633 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.44 2008/07/21 21:46:47 das Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.45 2008/12/12 16:07:18 ferrieux Exp $ */ #include "tclInt.h" @@ -798,6 +798,9 @@ Tcl_CreatePipe( return TCL_ERROR; } + fcntl(fileNums[0], F_SETFD, FD_CLOEXEC); + fcntl(fileNums[1], F_SETFD, FD_CLOEXEC); + *rchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[0]), TCL_READABLE); Tcl_RegisterChannel(interp, *rchan); -- cgit v0.12 From a5fbabae01fb74139bbfe1c34061e2458395cba5 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 12 Dec 2008 16:18:09 +0000 Subject: Make a bad zlib install less fatal to rest of Tcl for now. --- ChangeLog | 6 +++ generic/tclBasic.c | 9 ++++- generic/tclZlib.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++- unix/configure.in | 15 ++++--- 4 files changed, 135 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39e3769..51f4989 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-12 Donal K. Fellows + + * generic/tclZlib.c, unix/configure.in: Added stubs to use when the + version of zlib is not capable enough, and automagic to detect when + that is the case. + 2008-12-12 Alexandre Ferrieux * unix/tclUnixNotfy.c Fix missing CLOEXEC on internal pipes [2417695] diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c8928ec..cfc88cc 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.376 2008/12/11 01:21:52 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.377 2008/12/12 16:18:09 dkf Exp $ */ #include "tclInt.h" @@ -914,9 +914,16 @@ Tcl_CreateInterp(void) Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); } + /* + * Only build in zlib support if we've successfully detected a library to + * compile and link against. + */ + +#ifdef HAVE_ZLIB if (TclZlibInit(interp) != TCL_OK) { Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); } +#endif TOP_CB(iPtr) = NULL; return interp; diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 0daea04..ab38696 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,10 +13,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.6 2008/12/12 15:06:10 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.7 2008/12/12 16:18:09 dkf Exp $ */ #include "tclInt.h" +#ifdef HAVE_ZLIB #include #define GZIP_MAGIC_FLAG 16 @@ -2115,6 +2116,115 @@ TclZlibInit( Tcl_CreateObjCommand(interp, "zlib", ZlibCmd, 0, 0); return TCL_OK; } +#else /* HAVE_ZLIB */ +int +Tcl_ZlibStreamInit( + Tcl_Interp *interp, + int mode, + int format, + int level, + Tcl_Obj *dictObj, + Tcl_ZlibStream *zshandle) +{ + Tcl_SetResult(interp, "unimplemented", TCL_STATIC); + return TCL_ERROR; +} + +int +Tcl_ZlibStreamClose( + Tcl_ZlibStream zshandle) +{ + return TCL_OK; +} + +int +Tcl_ZlibStreamReset( + Tcl_ZlibStream zshandle) +{ + return TCL_OK; +} + +Tcl_Obj * +Tcl_ZlibStreamGetCommandName( + Tcl_ZlibStream zshandle) +{ + return NULL; +} + +int +Tcl_ZlibStreamEof( + Tcl_ZlibStream zshandle) +{ + return 1; +} + +int +Tcl_ZlibStreamAdler32( + Tcl_ZlibStream zshandle) +{ + return 0; +} + +int +Tcl_ZlibStreamPut( + Tcl_ZlibStream zshandle, + Tcl_Obj *data, + int flush) +{ + return TCL_OK; +} + +int +Tcl_ZlibStreamGet( + Tcl_ZlibStream zshandle, + Tcl_Obj *data, + int count) +{ + return TCL_OK; +} + +int +Tcl_ZlibDeflate( + Tcl_Interp *interp, + int format, + Tcl_Obj *data, + int level, + Tcl_Obj *gzipHeaderDictObj) +{ + Tcl_SetResult(interp, "unimplemented", TCL_STATIC); + return TCL_ERROR; +} + +int +Tcl_ZlibInflate( + Tcl_Interp *interp, + int format, + Tcl_Obj *data, + int bufferSize, + Tcl_Obj *gzipHeaderDictObj) +{ + Tcl_SetResult(interp, "unimplemented", TCL_STATIC); + return TCL_ERROR; +} + +unsigned int +Tcl_ZlibCRC32( + unsigned int crc, + const char *buf, + int len) +{ + return 0; +} + +unsigned int +Tcl_ZlibAdler32( + unsigned int adler, + const char *buf, + int len) +{ + return 0; +} +#endif /* HAVE_ZLIB */ /* * Local Variables: diff --git a/unix/configure.in b/unix/configure.in index 9dfba00..339b845 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.192 2008/12/11 14:42:44 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.193 2008/12/12 16:18:09 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -118,12 +118,17 @@ SC_ENABLE_SHARED #------------------------------------------------------------------------ zlib_ok=yes -AC_CHECK_HEADER([zlib.h],[],[ +AC_CHECK_HEADER([zlib.h],[ + AC_CHECK_TYPE([gz_header],[],[ zlib_ok=no - echo TODO: Add -I$srcdir/compat/zlib/include to compile lines... -]) -AC_SEARCH_LIBS([adler32],[z],[],[ + AC_DIAGNOSE([],[TODO: Add -I$srcdir/compat/zlib/include to compile lines]) + ],[#include ])],[ + zlib_ok=no + AC_DIAGNOSE([],[TODO: Add -I$srcdir/compat/zlib/include to compile lines]) + ]) +AC_SEARCH_LIBS([deflateSetHeader],[z],[],[ zlib_ok=no + AC_DIAGNOSE([],[TODO: Add $srcdir/compat/zlib to list of things to build]) ]) if test $zlib_ok = yes; then AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) -- cgit v0.12 From ff69d9baf12d894d871342b00a357c8008b68704 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 12 Dec 2008 16:22:57 +0000 Subject: regen/fix blunders --- unix/configure | 93 +++++++++++++++++++++++++++++++++++++++++++++++-------- unix/configure.in | 8 ++--- 2 files changed, 84 insertions(+), 17 deletions(-) diff --git a/unix/configure b/unix/configure index 1950caf..720be48 100755 --- a/unix/configure +++ b/unix/configure @@ -6451,18 +6451,83 @@ echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then + + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } +if test "${ac_cv_type_gz_header+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +typedef gz_header ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_gz_header=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_gz_header=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +if test $ac_cv_type_gz_header = yes; then : else zlib_ok=no - echo TODO: Add -I$srcdir/compat/zlib/include to compile lines... + { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 +echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} + +fi + +else + + zlib_ok=no + { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 +echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} fi -{ echo "$as_me:$LINENO: checking for library containing adler32" >&5 -echo $ECHO_N "checking for library containing adler32... $ECHO_C" >&6; } -if test "${ac_cv_search_adler32+set}" = set; then +{ echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } +if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS @@ -6479,11 +6544,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char adler32 (); +char deflateSetHeader (); int main () { -return adler32 (); +return deflateSetHeader (); ; return 0; } @@ -6513,7 +6578,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_search_adler32=$ac_res + ac_cv_search_deflateSetHeader=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -6523,27 +6588,29 @@ fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext - if test "${ac_cv_search_adler32+set}" = set; then + if test "${ac_cv_search_deflateSetHeader+set}" = set; then break fi done -if test "${ac_cv_search_adler32+set}" = set; then +if test "${ac_cv_search_deflateSetHeader+set}" = set; then : else - ac_cv_search_adler32=no + ac_cv_search_deflateSetHeader=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_adler32" >&5 -echo "${ECHO_T}$ac_cv_search_adler32" >&6; } -ac_res=$ac_cv_search_adler32 +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else zlib_ok=no + { echo "$as_me:$LINENO: WARNING: todo: Add compat/zlib to list of things to build" >&5 +echo "$as_me: WARNING: todo: Add compat/zlib to list of things to build" >&2;} fi diff --git a/unix/configure.in b/unix/configure.in index 339b845..5f6d0c9 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.193 2008/12/12 16:18:09 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.194 2008/12/12 16:22:57 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -121,14 +121,14 @@ zlib_ok=yes AC_CHECK_HEADER([zlib.h],[ AC_CHECK_TYPE([gz_header],[],[ zlib_ok=no - AC_DIAGNOSE([],[TODO: Add -I$srcdir/compat/zlib/include to compile lines]) + AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) ],[#include ])],[ zlib_ok=no - AC_DIAGNOSE([],[TODO: Add -I$srcdir/compat/zlib/include to compile lines]) + AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) ]) AC_SEARCH_LIBS([deflateSetHeader],[z],[],[ zlib_ok=no - AC_DIAGNOSE([],[TODO: Add $srcdir/compat/zlib to list of things to build]) + AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) ]) if test $zlib_ok = yes; then AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) -- cgit v0.12 From 6dfd3f4dec3ab26eb1ed5f12080e1c803946ea32 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 12 Dec 2008 16:34:45 +0000 Subject: Added some more docs --- doc/zlib.n | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/zlib.n b/doc/zlib.n index 256efec..d1f1eed 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.1 2008/12/11 16:50:51 dkf Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.2 2008/12/12 16:34:45 dkf Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -24,12 +24,16 @@ Zlib library. It has the following subcommands .TP \fBzlib adler32\fI string\fR ?\fIinitValue\fR? . +Compute a checksum of binary string \fIstring\fR using the Adler-32 algorithm. +If given, \fIinitValue\fR is used to initialize the checksum engine. .TP \fBzlib compress\fI string\fR ?\fIlevel\fR? . .TP \fBzlib crc32\fI string\fR ?\fIinitValue\fR? . +Compute a checksum of binary string \fIstring\fR using the CRC-32 algorithm. +If given, \fIinitValue\fR is used to initialize the checksum engine. .TP \fBzlib decompress\fI string\fR ?\fIbufferSize\fR? . @@ -37,11 +41,22 @@ Zlib library. It has the following subcommands \fBzlib deflate\fI string\fR ?\fIlevel\fR? . .TP -\fBzlib gunzip\fI string\fR ?\fIbufferSize\fR? +\fBzlib gunzip\fI string\fR ?\fB\-headerVar \fIvarName\fR? . +Return the uncompressed contents of binary string \fIstring\fR, which must +have been in gzip format. If \fB\-headerVar\fR is given, store a dictionary +describing the contents of the gzip header in the variable called +\fIvarName\fR. +'\" TODO: describe dict fields .TP -\fBzlib gzip\fI string\fR ?\fIlevel\fR? +\fBzlib gzip\fI string\fR ?\fB\-level \fIlevel\fR? ?\fB\-header \fIdict\fR? . +Return the compressed contents of binary string \fIstring\fR in gzip format. +If \fB\-level\fR is given, \fIlevel\fR gives the compression level to use +(from 0, which is uncompressed, to 9, maximally compressed). If \fB\-header\fR +is given, \fIdict\fR is a dictionary containing values used for the gzip +header. +'\" TODO: describe dict fields .TP \fBzlib inflate\fI string\fR ?\fIbufferSize\fR? . -- cgit v0.12 From 5e59751a50b0e27533ef93600fe6c7e84d6e25bf Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 12 Dec 2008 17:42:52 +0000 Subject: Document new DST fallback rules. Fix time change in Eastern Europe (not 3:00 but 4:00 local time) [Bug 2207436] --- ChangeLog | 8 +++++++- doc/clock.n | 17 +++++++++++++++++ library/clock.tcl | 6 +++--- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51f4989..796d294 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-12 Jan Nijtmans + + * doc/clock.n: Document new DST fallback rules. + * library/clock.tcl (ProcessPosixTimeZone): Fix time change + in Eastern Europe (not 3:00 but 4:00 local time) [Bug 2207436] + 2008-12-12 Donal K. Fellows * generic/tclZlib.c, unix/configure.in: Added stubs to use when the @@ -62,7 +68,7 @@ * library/clock.tcl (ProcessPosixTimeZone): Fallback to European time zone DST rules, when the timezone is between 0 and -12. [Bug 2207436] - * tests/clock.test (clock-64.[12]): Test cases for [Bug 2207436] + * tests/clock.test (clock-52.[23]): Test cases for [Bug 2207436] 2008-12-11 Donal K. Fellows diff --git a/doc/clock.n b/doc/clock.n index 60042be..f4c3805 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -805,6 +805,23 @@ environment variable will be recognized. The specification may be found at \fIhttp://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html\fR. .PP +If the Posix time zone string contains a DST (Daylight Savings Time) +part, but doesn't contain a rule stating when DST starts or ends, +then default rules are used. For Timezones with an offset between 0 +and +12, the current European/Russian rules are used, otherwise the +current US rules are used. In Europe (offset +0 to +2) the switch +to summertime is done each last Sunday in March at 1:00 GMT, and +the switch back is each last Sunday in October at 2:00 GMT. In +Russia (offset +3 to +12), the switch dates are the same, only +the switch to summertime is at 2:00 local time, and the switch +back is at 3:00 local time in all time zones. The US switch to +summertime takes place each second Sunday in March at 2:00 local +time, and the switch back is each first Sunday in November at +3:00 local time. These default rules mean that in all European, +Russian and US (or compatible) time zones, DST calculations will +be correct for dates in 2007 and later, unless in the future the +rules change again. +.PP Any other time zone string is processed by prefixing a colon and attempting to use it as a location name, as above. .SH "LOCALIZATION" diff --git a/library/clock.tcl b/library/clock.tcl index bfac4e6..d972955 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.50 2008/12/11 14:01:59 nijtmans Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.51 2008/12/12 17:42:52 nijtmans Exp $ # #---------------------------------------------------------------------- @@ -3891,7 +3891,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { && [dict get $z startMonth] eq {} } { if {($stdHours>=0) && ($stdHours<=12)} { dict set z startWeekOfMonth 5 - if {$stdHours>1} { + if {$stdHours>2} { dict set z startHours 2 } else { dict set z startHours [expr {$stdHours+1}] @@ -3910,7 +3910,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { if {($stdHours>=0) && ($stdHours<=12)} { dict set z endMonth 10 dict set z endWeekOfMonth 5 - if {$stdHours>1} { + if {$stdHours>2} { dict set z endHours 3 } else { dict set z endHours [expr {$stdHours+2}] -- cgit v0.12 From 0e20b42f4918cc0b87663f858ce500d659b340e0 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 12 Dec 2008 21:43:35 +0000 Subject: change PATH_MAX to MAXPATHLEN (msvc doesn't have PATH_MAX) --- ChangeLog | 1 + generic/tclZlib.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 796d294..a322c94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2008-12-12 Jan Nijtmans + * generic/tclZlib.c change PATH_MAX to MAXPATHLEN (msvc doesn't have PATH_MAX) * doc/clock.n: Document new DST fallback rules. * library/clock.tcl (ProcessPosixTimeZone): Fix time change in Eastern Europe (not 3:00 but 4:00 local time) [Bug 2207436] diff --git a/generic/tclZlib.c b/generic/tclZlib.c index ab38696..75aea90 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.7 2008/12/12 16:18:09 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.8 2008/12/12 21:43:35 nijtmans Exp $ */ #include "tclInt.h" @@ -1090,7 +1090,7 @@ Tcl_ZlibDeflate( * byte of string that we add. Note that over-allocation is not a * problem. [Bug 2419061] */ - + extraSize = 32; if (gzipHeaderDictObj) { headerPtr = &header; @@ -1245,9 +1245,9 @@ Tcl_ZlibInflate( if (gzipHeaderDictObj) { headerPtr = &header; memset(headerPtr, 0, sizeof(gz_header)); - nameBuf = ckalloc(PATH_MAX); + nameBuf = ckalloc(MAXPATHLEN); header.name = (void *) nameBuf; - header.name_max = PATH_MAX; + header.name_max = MAXPATHLEN; commentBuf = ckalloc(256); header.comment = (void *) commentBuf; header.comm_max = 256; @@ -1286,7 +1286,7 @@ Tcl_ZlibInflate( goto error; } if (headerPtr) { - inflateGetHeader(&stream, headerPtr); + e = inflateGetHeader(&stream, headerPtr); if (e != Z_OK) { goto error; } -- cgit v0.12 From e383ee2adaf83682c1807fd8677281af8e14a7b4 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 13 Dec 2008 09:19:06 +0000 Subject: Many improvements to docs --- ChangeLog | 18 ++-- doc/zlib.n | 249 ++++++++++++++++++++++++++++++++++++++++++++++++------ generic/tclZlib.c | 127 +++++++++++++++++++++++++--- tests/zlib.test | 4 +- 4 files changed, 354 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index a322c94..dac080a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,17 @@ +2008-12-13 Donal K. Fellows + + * doc/zlib.n: Substantially improve documentation of Tcl-level API. + * generic/tclZlib.c (ZlibCmd): Flesh out the argument parsing for the + command to integrate with channels. + 2008-12-12 Jan Nijtmans - * generic/tclZlib.c change PATH_MAX to MAXPATHLEN (msvc doesn't have PATH_MAX) + * generic/tclZlib.c (Tcl_ZlibInflate): Change PATH_MAX to MAXPATHLEN, + since MSVC doesn't have PATH_MAX. + * doc/clock.n: Document new DST fallback rules. - * library/clock.tcl (ProcessPosixTimeZone): Fix time change - in Eastern Europe (not 3:00 but 4:00 local time) [Bug 2207436] + * library/clock.tcl (ProcessPosixTimeZone): Fix time change in Eastern + Europe (not 3:00 but 4:00 local time). [Bug 2207436] 2008-12-12 Donal K. Fellows @@ -27,8 +35,8 @@ TIP #322 IMPLEMENTATION - * doc/NRE.3 (new file): Added documentation of the published - API for Non-Recursive Evaluation (NRE). + * doc/NRE.3 (new file): Added documentation of the published API for + Non-Recursive Evaluation (NRE). 2008-12-11 Jan Nijtmans diff --git a/doc/zlib.n b/doc/zlib.n index d1f1eed..8937e78 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.2 2008/12/12 16:34:45 dkf Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.3 2008/12/13 09:19:06 dkf Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -19,35 +19,69 @@ zlib \- compression and decompression operations .BE .SH DESCRIPTION .PP -The \fBzlib\fR command provides access to the compression facilities of the -Zlib library. It has the following subcommands -.TP -\fBzlib adler32\fI string\fR ?\fIinitValue\fR? -. -Compute a checksum of binary string \fIstring\fR using the Adler-32 algorithm. -If given, \fIinitValue\fR is used to initialize the checksum engine. +The \fBzlib\fR command provides access to the compression and check-summing +facilities of the Zlib library by Jean-loup Gailly and Mark Adler. It has the +following subcommands. +.SS "COMPRESSION SUBCOMMANDS" .TP \fBzlib compress\fI string\fR ?\fIlevel\fR? . -.TP -\fBzlib crc32\fI string\fR ?\fIinitValue\fR? -. -Compute a checksum of binary string \fIstring\fR using the CRC-32 algorithm. -If given, \fIinitValue\fR is used to initialize the checksum engine. +Returns the zlib-format compressed binary data of the binary string in +\fIstring\fR. If present, \fIlevel\fR gives the compression level to use (from +0, which is uncompressed, to 9, maximally compressed). .TP \fBzlib decompress\fI string\fR ?\fIbufferSize\fR? . +Returns the uncompressed version of the raw compressed binary data in +\fIstring\fR. If present, \fIbufferSize\fR is a hint as to what size of buffer +is to be used to receive the data. .TP \fBzlib deflate\fI string\fR ?\fIlevel\fR? . +Returns the raw compressed binary data of the binary string in \fIstring\fR. +If present, \fIlevel\fR gives the compression level to use (from 0, which is +uncompressed, to 9, maximally compressed). .TP \fBzlib gunzip\fI string\fR ?\fB\-headerVar \fIvarName\fR? . Return the uncompressed contents of binary string \fIstring\fR, which must have been in gzip format. If \fB\-headerVar\fR is given, store a dictionary describing the contents of the gzip header in the variable called -\fIvarName\fR. -'\" TODO: describe dict fields +\fIvarName\fR. The keys of the dictionary that may be present are: +.RS +.TP +\fBcomment\fR +. +The comment field from the header, if present. +.TP +\fBcrc\fR +. +A boolean value describing whether a CRC of the header is computed. +.TP +\fBfilename\fR +. +The filename field from the header, if present. +.TP +\fBos\fR +. +The operating system type code field from the header (if not the +QW unknown +value). See RFC 1952 for the meaning of these codes. +.TP +\fBsize\fR +. +The size of the uncompressed data. +.TP +\fBtime\fR +. +The time field from the header if non-zero, expected to be time that the file +named by the \fBfilename\fR field was modified. Suitable for use with \fBclock +format\fR. +.TP +\fBtype\fR +. +The type of the uncompressed data (\fBbinary\fR or \fBtext\fR) if known. +.RE .TP \fBzlib gzip\fI string\fR ?\fB\-level \fIlevel\fR? ?\fB\-header \fIdict\fR? . @@ -55,61 +89,222 @@ Return the compressed contents of binary string \fIstring\fR in gzip format. If \fB\-level\fR is given, \fIlevel\fR gives the compression level to use (from 0, which is uncompressed, to 9, maximally compressed). If \fB\-header\fR is given, \fIdict\fR is a dictionary containing values used for the gzip -header. -'\" TODO: describe dict fields +header. The following keys may be defined: +.RS +.TP +\fBcomment\fR +. +Add the given comment to the header of the gzip-format data. +.TP +\fBcrc\fR +. +A boolean saying whether to compute a CRC of the header. Note that if the data +is to be interchanged with the \fBgzip\fR program, a header CRC should +\fInot\fR be computed. +.TP +\fBfilename\fR +. +The name of the file that the data to be compressed came from. +.TP +\fBos\fR +. +The operating system type code, which should be one of the values described in +RFC 1952. +.TP +\fBtime\fR +. +The time that the file named in the \fBfilename\fR key was last modified. This +will be in the same as is returned by \fBclock seconds\fR or \fBfile mtime\fR. +.TP +\fBtype\fR +. +The type of the data being compressed, being \fBbinary\fR or \fBtext\fR. +.RE .TP \fBzlib inflate\fI string\fR ?\fIbufferSize\fR? . +Returns the uncompressed version of the raw compressed binary data in +\fIstring\fR. If present, \fIbufferSize\fR is a hint as to what size of buffer +is to be used to receive the data. +.SS "STREAMING AND CHANNEL SUBCOMMANDS" .TP -\fBzlib stack\fI channel\fR +\fBzlib push\fI mode channel\fR ?\fIoptions ...\fR . +\fITODO: not yet implemented!\fR .TP \fBzlib stream\fI mode\fR ?\fIlevel\fR? . Creates a streaming compression or decompression command based on the \fImode\fR, and return the name of the command. For a description of how that -command works, see \fBSTREAMING COMMAND\fR below. The following modes are -supported: +command works, see \fBSTREAMING INSTANCE COMMAND\fR below. The following modes +are supported: .RS .TP -\fBzlib stream compress\fR +\fBzlib stream compress\fR ?\fIlevel\fR? . +The stream will be a compressing stream that produces zlib-format output, +using compression level \fIlevel\fR (if specified) which will be an integer +from 0 to 9. .TP \fBzlib stream decompress\fR . +The stream will be a decompressing stream that takes zlib-format input and +produces uncompressed output. .TP -\fBzlib stream deflate\fR +\fBzlib stream deflate\fR ?\fIlevel\fR? . +The stream will be a compressing stream that produces raw output, using +compression level \fIlevel\fR (if specified) which will be an integer from 0 +to 9. .TP \fBzlib stream gunzip\fR . +The stream will be a decompressing stream that takes gzip-format input and +produces uncompressed output. .TP -\fBzlib stream gzip\fR +\fBzlib stream gzip\fR ?\fIlevel\fR? . +The stream will be a compressing stream that produces gzip-format output, +using compression level \fIlevel\fR (if specified) which will be an integer +from 0 to 9. +'\" TODO: Header dictionary! .TP \fBzlib stream inflate\fR . +The stream will be a decompressing stream that takes raw compressed input and +produces uncompressed output. +.RE +.SS "CHECKSUMMING SUBCOMMANDS" +.TP +\fBzlib adler32\fI string\fR ?\fIinitValue\fR? +. +Compute a checksum of binary string \fIstring\fR using the Adler-32 algorithm. +If given, \fIinitValue\fR is used to initialize the checksum engine. +.TP +\fBzlib crc32\fI string\fR ?\fIinitValue\fR? +. +Compute a checksum of binary string \fIstring\fR using the CRC-32 algorithm. +If given, \fIinitValue\fR is used to initialize the checksum engine. +.SH "STREAMING INSTANCE COMMAND" +.PP +Streaming compression instance commands are produced by the \fBzlib stream\fR +command. They are used by calling their \fBput\fR subcommand one or more times +to load data in, and their \fBget\fR subcommand one or more times to extract +the transformed data. +.PP +The full set of subcommands supported by a streaming instance command, +\fIstream\fR, is as follows: +.TP +\fIstream \fBadd\fR ?\fIoption\fR? \Idata\fR +. +A short-cut for +.QW "\fIstream \fBput \fIoption data\fR" +followed by +.QW "\fIstream \fBget\fR" . +.TP +\fIstream \fBadler32\fR +. +'\" Change name? +Returns the checksum of the uncompressed data seen so far by this stream. +.TP +\fIstream \fBclose\fR +. +Deletes this stream and frees up all resources associated with it. +.TP +\fIstream \fBeof\fR +. +Returns a boolean indicating whether the end of the stream (as determined by +the compressed data itself) has been reached. Not all formats support +detection of the end of the stream. +.TP +\fIstream \fBfinalize\fR +. +A short-cut for +.QW "\fIstream \fBput \-finalize {}\fR" . +.TP +\fIstream \fBflush\fR +. +A short-cut for +.QW "\fIstream \fBput \-flush {}\fR" . +.TP +\fIstream \fBfullflush\fR +. +A short-cut for +.QW "\fIstream \fBput \-fullflush {}\fR" . +.TP +\fIstream \fBget \fR?\fIcount\fR? +. +Return up to \fIcount\fR bytes from \fIstream\fR's internal buffers with the +transformation applied. If \fIcount\fR is omitted, the entire contents of the +buffers are returned. +.TP +\fIstream \fBput\fR ?\fIoption\fR? \fIdata\fR +. +Append the contents of the binary string \fIdata\fR to \fIstream\fR's internal +buffers while applying the transformation. If present, \fIoption\fR must be +one of the following (or an unambiguous prefix) which are used to modify the +way in which the transformation is applied: +.RS +.TP +\fB\-finalize\fR +. +Mark the stream as finished, ensuring that all bytes have been wholly +compressed or decompressed. For gzip streams, this also ensures that the +footer is written to the stream. The stream will need to be reset before +having more data written to it after this, though data can still be read out +of the stream with the \fBget\fR subcommand. +.TP +\fB\-flush\fR +. +Ensure that a decompressor consuming the bytes that the current (compressing) +stream is producing will be able to produce all the bytes that have been +compressed so far, at some performance penalty. +.TP +\fB\-fullflush\fR +. +Ensure that not only can a decompressor handle all the bytes produced so far +(as with \fB\-flush\fR above) but also that it can restart from this point if +it detects that the stream is partially corrupt. This incurs a substantial +performance penalty. .RE .TP -\fBzlib unstack\fI channel\fR +\fIstream \fBreset\fR . -Reverses the effects of \fBzlib stack\fR on the channel called \fIchannel\fR. +Puts any stream, including those that have been finalized or that have reached +eof, back into a state where it can process more data. Throws away all +internally buffered data. .SH EXAMPLES .PP To compress a Tcl string, it should be first converted to a particular charset encoding since the \fBzlib\fR command always operates on binary strings. .PP .CS -set compressed [\fBzlib deflate\fR [encoding convertto utf8 $string]] +set binData [encoding convertto utf-8 $string] +set compData [\fBzlib compress\fR $binData] .CE .PP When converting back, it is also important to reverse the charset encoding: .PP .CS -set string [encoding convertfrom utf8 [\fBzlib inflate\fR $compressed]] +set binData [\fBzlib decompress\fR $compData] +set string [encoding convertfrom utf-8 $binData] +.CE +.PP +The compression operation from above can also be done with streams, which is +especially helpful when you want to accumulate the data by stages: +.PP +.CS +set strm [\fBzlib stream\fR compress] +$\fIstrm \fBput\fR [encoding convertto utf-8 $string] +# ... +$\fIstrm \fBfinalize\fR +set compData [$\fIstrm \fBget\fR] +$\fIstrm \fBclose\fR .CE .SH "SEE ALSO" binary(n), chan(n), encoding(n) +.br +RFC1950 \- RFC1952 .SH "KEYWORDS" compress, decompress, deflate, gzip, inflate '\" Local Variables: diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 75aea90..6f40744 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.8 2008/12/12 21:43:35 nijtmans Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.9 2008/12/13 09:19:06 dkf Exp $ */ #include "tclInt.h" @@ -1401,14 +1401,15 @@ ZlibCmd( Byte *data; Tcl_Obj *obj = Tcl_GetObjResult(interp); Tcl_Obj *headerDictObj, *headerVarObj; + const char *extraInfoStr = NULL; static const char *const commands[] = { "adler32", "compress", "crc32", "decompress", "deflate", "gunzip", - "gzip", "inflate", "stack", "stream", "unstack", + "gzip", "inflate", "push", "stream", NULL }; enum zlibCommands { z_adler32, z_compress, z_crc32, z_decompress, z_deflate, z_gunzip, - z_gzip, z_inflate, z_stack, z_stream, z_unstack + z_gzip, z_inflate, z_push, z_stream, }; static const char *const stream_formats[] = { "compress", "decompress", "deflate", "gunzip", "gzip", "inflate", @@ -1521,6 +1522,7 @@ ZlibCmd( return TCL_ERROR; } if (level < 0 || level > 9) { + extraInfoStr = "\n (in -level option)"; goto badLevel; } break; @@ -1614,8 +1616,8 @@ ZlibCmd( Tcl_WrongNumArgs(interp, 2, objv, "mode ?level?"); return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[2], stream_formats, - "stream format", 0, &format) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[2], stream_formats, "mode", 0, + &format) != TCL_OK) { return TCL_ERROR; } mode = TCL_ZLIB_STREAM_INFLATE; @@ -1639,7 +1641,6 @@ ZlibCmd( if (objc == 4) { if (Tcl_GetIntFromObj(interp, objv[3], (int *) &level) != TCL_OK) { - Tcl_AppendResult(interp, "level error: integer", NULL); return TCL_ERROR; } if (level < 0 || level > 9) { @@ -1650,21 +1651,127 @@ ZlibCmd( } if (Tcl_ZlibStreamInit(interp, mode, format, level, NULL, &zh) != TCL_OK) { - Tcl_AppendResult(interp, "stream init error: integer", NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_ZlibStreamGetCommandName(zh)); return TCL_OK; - case z_stack: /* stack */ - break; - case z_unstack: /* unstack */ + case z_push: { /* push mode channel options...*/ + Tcl_Channel chan; + int chanMode; + static const char *pushOptions[] = { + "-header", "-headerVar", "-level", "-limit", + NULL + }; + enum pushOptions {poHeader, poHeadVar, poLevel, poLimit}; + Tcl_Obj *headerObj = NULL, *varObj = NULL; + int limit = 1, dummy; + + if (objc < 4) { + Tcl_WrongNumArgs(interp, 2, objv, "mode channel ?options...?"); + return TCL_ERROR; + } + + if (Tcl_GetIndexFromObj(interp, objv[2], stream_formats, "mode", 0, + &format) != TCL_OK) { + return TCL_ERROR; + } + mode = TCL_ZLIB_STREAM_INFLATE; + switch ((enum zlibFormats) format) { + case f_deflate: + mode = TCL_ZLIB_STREAM_DEFLATE; + case f_inflate: + format = TCL_ZLIB_FORMAT_RAW; + break; + case f_compress: + mode = TCL_ZLIB_STREAM_DEFLATE; + case f_decompress: + format = TCL_ZLIB_FORMAT_ZLIB; + break; + case f_gzip: + mode = TCL_ZLIB_STREAM_DEFLATE; + case f_gunzip: + format = TCL_ZLIB_FORMAT_GZIP; + break; + } + + if (TclGetChannelFromObj(interp, objv[3], &chan, &chanMode, + 0) != TCL_OK) { + return TCL_ERROR; + } + + level = Z_DEFAULT_COMPRESSION; + for (i=4 ; i objc-1) { + Tcl_AppendResult(interp, + "value missing for -header option", NULL); + return TCL_ERROR; + } + headerObj = objv[i]; + if (Tcl_DictObjSize(interp, headerObj, &dummy) != TCL_OK) { + Tcl_AddErrorInfo(interp, "\n (in -header option)"); + return TCL_ERROR; + } + break; + case poHeadVar: + if (++i > objc-1) { + Tcl_AppendResult(interp, + "value missing for -headerVar option", NULL); + return TCL_ERROR; + } + varObj = objv[i]; + break; + case poLevel: + if (++i > objc-1) { + Tcl_AppendResult(interp, + "value missing for -level option", NULL); + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(interp, objv[i], + (int *) &level) != TCL_OK) { + Tcl_AddErrorInfo(interp, "\n (in -level option)"); + return TCL_ERROR; + } + if (level < 0 || level > 9) { + extraInfoStr = "\n (in -level option)"; + goto badLevel; + } + break; + case poLimit: + if (++i > objc-1) { + Tcl_AppendResult(interp, + "value missing for -limit option", NULL); + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(interp, objv[i], + (int *) &limit) != TCL_OK) { + Tcl_AddErrorInfo(interp, "\n (in -limit option)"); + return TCL_ERROR; + } + if (limit < 1) { + limit = 1; + } + break; + } + } + + Tcl_AppendResult(interp, "not yet implemented", NULL); break; + } }; return TCL_ERROR; badLevel: Tcl_AppendResult(interp, "level must be 0 to 9", NULL); + if (extraInfoStr) { + Tcl_AddErrorInfo(interp, extraInfoStr); + } return TCL_ERROR; badBuffer: Tcl_AppendResult(interp, "buffer size must be 32 to 65536", NULL); diff --git a/tests/zlib.test b/tests/zlib.test index 7ce56f2..3f88565 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.2 2008/12/12 15:00:01 dkf Exp $ +# RCS: @(#) $Id: zlib.test,v 1.3 2008/12/13 09:19:06 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -22,7 +22,7 @@ test zlib-1.1 {zlib basics} -returnCodes error -body { } -result {wrong # args: should be "zlib command arg ?...?"} test zlib-1.2 {zlib basics} -returnCodes error -body { zlib ? {} -} -result {bad command "?": must be adler32, compress, crc32, decompress, deflate, gunzip, gzip, inflate, stack, stream, or unstack} +} -result {bad command "?": must be adler32, compress, crc32, decompress, deflate, gunzip, gzip, inflate, push, or stream} test zlib-2.1 {zlib compress/decompress} { zlib decompress [zlib compress abcdefghijklm] -- cgit v0.12 From d93221cfa2fbdaff58a321663559371cd0f27894 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 13 Dec 2008 09:29:30 +0000 Subject: Added missing bug numbe --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dac080a..7f57ec1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,7 +17,7 @@ * generic/tclZlib.c, unix/configure.in: Added stubs to use when the version of zlib is not capable enough, and automagic to detect when - that is the case. + that is the case. [Bug 2421265] 2008-12-12 Alexandre Ferrieux -- cgit v0.12 From a2110892447b53f535fd7d7aba9786904a82abf8 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 13 Dec 2008 17:36:34 +0000 Subject: Improve docs, start working towards implementing [zlib push] --- ChangeLog | 1 + doc/TclZlib.3 | 148 +++++++++++++++++++++++++++++++++++++++++++++++ doc/zlib.n | 40 ++++++++++++- generic/tclZlib.c | 169 +++++++++++++++++++++++++++++++++++------------------- 4 files changed, 296 insertions(+), 62 deletions(-) create mode 100644 doc/TclZlib.3 diff --git a/ChangeLog b/ChangeLog index 7f57ec1..6122e8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2008-12-13 Donal K. Fellows + * doc/TclZlib.3: Basic documentation of the C-level API. * doc/zlib.n: Substantially improve documentation of Tcl-level API. * generic/tclZlib.c (ZlibCmd): Flesh out the argument parsing for the command to integrate with channels. diff --git a/doc/TclZlib.3 b/doc/TclZlib.3 new file mode 100644 index 0000000..103f2e8 --- /dev/null +++ b/doc/TclZlib.3 @@ -0,0 +1,148 @@ +'\" +'\" Copyright (c) 2008 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: TclZlib.3,v 1.1 2008/12/13 17:36:34 dkf Exp $ +'\" +.so man.macros +.TH TclZlib 3 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +Tcl_ZlibAdler32, Tcl_ZlibCRC32, Tcl_ZlibDeflate, Tcl_ZlibInflate, Tcl_ZlibStreamAdler32, Tcl_ZlibStreamClose, Tcl_ZlibStreamEof, Tcl_ZlibStreamGet, Tcl_ZlibStreamGetCommandName, Tcl_ZlibStreamInit, Tcl_ZlibStreamPut \- compression and decompression functions +.SH SYNOPSIS +.nf +#include +.sp +Tcl_Obj * +\fBTcl_ZlibDeflate\fR(\fIinterp, format, dataObj, level, dictObj\fR) +.sp +Tcl_Obj * +\fBTcl_ZlibInflate\fR(\fIinterp, format, dataObj, dictObj\fR) +.sp +unsigned int +\fBTcl_ZlibCRC32\fR(\fIinitValue, bytes, length\fR) +.sp +unsigned int +\fBTcl_ZlibAdler32\fR(\fIinitValue, bytes, length\fR) +.sp +int +\fBTcl_ZlibStreamInit\fR(\fIinterp, mode, format, level, dictObj, zshandlePtr\fR) +.sp +Tcl_Obj * +\fBTcl_ZlibStreamGetCommandName\fR(\fIzshandle\fR) +.sp +int +\fBTcl_ZlibStreamEof\fR(\fIzshandle\fR) +.sp +int +\fBTcl_ZlibStreamClose\fR(\fIzshandle\fR) +.sp +int +\fBTcl_ZlibStreamAdler32\fR(\fIzshandle\fR) +.sp +int +\fBTcl_ZlibStreamPut\fR(\fIzshandle, dataObj, flush\fR) +.sp +int +\fBTcl_ZlibStreamGet\fR(\fIzshandle, dataObj, count\fR) +.fi +.SH ARGUMENTS +.AS Tcl_ZlibStream *zshandlePtr out +.AP Tcl_Interp *interp in +The interpreter to store resulting compressed or uncompressed data in. Also +where any error messages are written. +.AP int format in +What format of compressed data to work with. Must be one of +\fBTCL_ZLIB_FORMAT_ZLIB\fR for zlib-format data, \fBTCL_ZLIB_FORMAT_GZIP\fR +for gzip-format data, or \fBTCL_ZLIB_FORMAT_RAW\fR for raw compressed data. In +addition, for decompression only, \fBTCL_ZLIB_FORMAT_AUTO\fR may also be +chosen which can automatically detect whether the compressed data was in zlib +or gzip format. +.AP Tcl_Obj *dataObj in/out +A byte-array object containing the data to be compressed or decompressed, or +which is set to the data extracted from the stream when passed to +\fBTcl_ZlibStreamGet\fR. +.AP int level in +What level of compression to use. Should be a number from 0 to 9 or one of the +following: \fBTCL_ZLIB_COMPRESS_NONE\fR for no compression, +\fBTCL_ZLIB_COMPRESS_FAST\fR for fast but inefficient compression, +\fBTCL_ZLIB_COMPRESS_BEST\fR for slow but maximal compression, or +\fBTCL_ZLIB_COMPRESS_DEFAULT\fR for the level recommended by the zlib library. +.AP Tcl_Obj *dictObj in/out +A dictionary that contains, or which will be updated to contain, a description +of the gzip header associated with the compressed data. Only useful when the +\fIformat\fR is \fBTCL_ZLIB_FORMAT_GZIP\fR or \fBTCL_ZLIB_FORMAT_AUTO\fR. If +a NULL is passed, a default header will be used on compression and the header +will be ignored (apart from integrity checks) on decompression. +.AP "unsigned int" initValue in +The initial value for the checksum algorithm. +.AP "unsigned char" *bytes in +An array of bytes to run the checksum algorithm over, or NULL to get the +recommended initial value for the checksum algorithm. +.AP int length in +The number of bytes in the array. +.AP int mode in +What mode to operate the stream in. Should be either +\fBTCL_ZLIB_STREAM_DEFLATE\fR for a compressing stream or +\fBTCL_ZLIB_STREAM_INFLATE\fR for a decompressing stream. +.AP Tcl_ZlibStream *zshandlePtr out +A pointer to a variable in which to write the abstract token for the stream +upon successful creation. +.AP Tcl_ZlibStream zshandle in +The abstract token for the stream to operate on. +.AP int flush in +Whether and how to flush the stream after writing the data to it. Must be one +of: \fBTCL_ZLIB_NO_FLUSH\fR if no flushing is to be done, \fBTCL_ZLIB_FLUSH\fR +if the currently compressed data must be made available for access using +\fBTcl_ZlibStreamGet\fR, \fBTCL_ZLIB_FULLFLUSH\fR if the stream must be put +into a state where the decompressor can recover from on corruption, or +\fBTCL_ZLIB_FINALIZE\fR to ensure that the stream is finished and that any +trailer demanded by the format is written. +.AP int count in +The maximum number of bytes to get from the stream, or -1 to get all remaining +bytes from the stream's buffers. +.BE +.SH DESCRIPTION +These functions form the interface from the Tcl library to the Zlib +library by Jean-loup Gailly and Mark Adler. +.PP +\fBTcl_ZlibDeflate\fR and \fBTcl_ZlibInflate\fR compress and decompress data +respectively. Upon success, they leave the resulting compressed or +decompressed data in a byte-array object that is the Tcl interpreter's +result. Note that the \fIdictObj\fR parameter is only used when the +\fIformat\fR parameter is \fBTCL_ZLIB_FORMAT_GZIP\fR or +\fBTCL_ZLIB_FORMAT_AUTO\fR. +.PP +\fBTcl_ZlibAdler32\fR and \fBTcl_ZlibCRC32\fR compute checksums on arrays of +bytes. Typical usage is: +.PP +.CS +checksum = Tcl_ZlibCRC32(Tcl_ZlibCRC32(0,NULL,0), data, length); +.CE +.PP +\fBTcl_ZlibStreamInit\fR creates a compressing or decompressing stream that is +linked to a Tcl command, according to its arguments, and provides an abstract +token for the stream; \fBTcl_ZlibStreamGetCommandName\fR returns the name of +that command given the stream token. Once a stream has been constructed, +\fBTcl_ZlibStreamPut\fR is used to add data to the stream and +\fBTcl_ZlibStreamGet\fR is used to retrieve data from the stream after +processing. \fBTcl_ZlibStreamAdler32\fR returns the checksum computed over the +uncompressed data, and \fBTcl_ZlibStreamEof\fR returns whether the end of the +uncompressed data has been reached. Finally, \fBTcl_ZlibStreamClose\fR will +clean up the stream and delete the associated command: using +\fBTcl_DeleteCommand\fR on the stream's command is equivalent. +.SH "PORTABILITY NOTES" +These functions will fail gracefully if Tcl is not linked with the zlib +library. +.SH "SEE ALSO" +Tcl_NewByteArrayObj(3), zlib(n) +'\"Tcl_StackChannel(3) +.SH "KEYWORDS" +compress, decompress, deflate, gzip, inflate +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: diff --git a/doc/zlib.n b/doc/zlib.n index 8937e78..b010eb4 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.3 2008/12/13 09:19:06 dkf Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.4 2008/12/13 17:36:34 dkf Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -130,7 +130,43 @@ is to be used to receive the data. .TP \fBzlib push\fI mode channel\fR ?\fIoptions ...\fR . +Pushes a compressing or decompressing transformation onto the channel +\fIchannel\fR. The \fImode\fR argument determines what type of transformation +is pushed; the following are supported: +.RS +.TP +\fBcompress\fR +. +The transformation will be a compressing transformation that produces +zlib-format data on \fIchannel\fR, which must be writable. +.TP +\fBdecompress\fR +. +The transformation will be a decompressing transformation that reads +zlib-format data from \fIchannel\R, which must be readable. +.TP +\fBdeflate\fR +. +The transformation will be a compressing transformation that produces raw +compressed data on \fIchannel\fR, which must be writable. +.TP +\fBgunzip\fR +. +The transformation will be a decompressing transformation that reads +gzip-format data from \fIchannel\R, which must be readable. +.TP +\fBgzip\fR +. +The transformation will be a compressing transformation that produces +gzip-format data on \fIchannel\fR, which must be writable. +.TP +\fBinflate\fR +. +The transformation will be a decompressing transformation that reads raw +compressed data from \fIchannel\R, which must be readable. +.PP \fITODO: not yet implemented!\fR +.RE .TP \fBzlib stream\fI mode\fR ?\fIlevel\fR? . @@ -302,7 +338,7 @@ set compData [$\fIstrm \fBget\fR] $\fIstrm \fBclose\fR .CE .SH "SEE ALSO" -binary(n), chan(n), encoding(n) +binary(n), chan(n), encoding(n), Tcl_ZlibDeflate(3) .br RFC1950 \- RFC1952 .SH "KEYWORDS" diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 6f40744..00d54e6 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.9 2008/12/13 09:19:06 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.10 2008/12/13 17:36:34 dkf Exp $ */ #include "tclInt.h" @@ -79,8 +79,6 @@ static int ChanGetOption(ClientData instanceData, static void ChanWatch(ClientData instanceData, int mask); static int ChanGetHandle(ClientData instanceData, int direction, ClientData *handlePtr); -static int ChanClose2(ClientData instanceData, - Tcl_Interp *interp, int flags); static int ChanBlockMode(ClientData instanceData, int mode); static int ChanFlush(ClientData instanceData); static int ChanHandler(ClientData instanceData, @@ -94,10 +92,10 @@ static const Tcl_ChannelType zlibChannelType = { ChanOutput, NULL, /* seekProc */ NULL, /* ChanSetOption, */ - NULL, /* ChanGetOption, */ + ChanGetOption, ChanWatch, ChanGetHandle, - NULL, /* ChanClose2, */ + NULL, /* close2Proc, */ ChanBlockMode, ChanFlush, ChanHandler, @@ -113,12 +111,19 @@ typedef struct { /* Zlib specific channel state */ int inFormat; int outFormat; - z_stream instream; - z_stream outstream; - char *inbuffer; + z_stream inStream; + z_stream outStream; + char *inBuffer; int inAllocated, inUsed, inPos; - char *outbuffer; + char *outBuffer; int outAllocated, outUsed, outPos; + + gz_header inHeader; + char inFilenameBuffer[MAXPATHLEN]; + char inCommentBuffer[256]; + gz_header outHeader; + Tcl_DString outFilenameDString; + Tcl_DString outCommentDString; } ZlibChannelData; /* Flag values */ @@ -225,6 +230,7 @@ GenerateHeader( if (GetValue(interp, dictObj, "comment", &value) != TCL_OK) { return TCL_ERROR; } else if (value != NULL) { + /* TODO: Convert to external */ headerPtr->comment = (Bytef *) Tcl_GetStringFromObj(value, &extra); *extraSizePtr += extra; } @@ -239,6 +245,7 @@ GenerateHeader( if (GetValue(interp, dictObj, "filename", &value) != TCL_OK) { return TCL_ERROR; } else if (value != NULL) { + /* TODO: Convert to external */ headerPtr->name = (Bytef *) Tcl_GetStringFromObj(value, &extra); *extraSizePtr += extra; } @@ -308,11 +315,13 @@ ExtractHeader( Tcl_Obj *dictObj) /* The dictionary to store in. */ { if (headerPtr->comment != Z_NULL) { + /* TODO: Convert from external */ SetValue(dictObj, "comment", Tcl_NewStringObj((char *) headerPtr->comment, -1)); } SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc)); if (headerPtr->name != Z_NULL) { + /* TODO: Convert from external */ SetValue(dictObj, "filename", Tcl_NewStringObj((char *) headerPtr->name, -1)); } @@ -799,7 +808,7 @@ Tcl_ZlibStreamPut( obj = Tcl_NewByteArrayObj((unsigned char *) dataTmp, outSize - zsh->stream.avail_out); /* - * Now append the compressed data to the outbuffer. + * Now append the compressed data to the outData list. */ Tcl_ListObjAppendElement(zsh->interp, zsh->outData, obj); @@ -825,14 +834,14 @@ Tcl_ZlibStreamPut( outSize - zsh->stream.avail_out); /* - * Now append the compressed data to the outbuffer. + * Now append the compressed data to the outData list. */ Tcl_ListObjAppendElement(zsh->interp, zsh->outData, obj); } } else { /* - * This is easy. Just append to inbuffer. + * This is easy. Just append to the inData list. */ Tcl_ListObjAppendElement(zsh->interp, zsh->inData, data); @@ -1760,7 +1769,11 @@ ZlibCmd( } } +#if 0 + Tcl_ZlibStackChannel(interp, 0/*inFormat*/,level,0/*outFormat*/,level, chan, headerObj); +#else Tcl_AppendResult(interp, "not yet implemented", NULL); +#endif break; } }; @@ -1968,35 +1981,33 @@ ChanClose( Tcl_Interp *interp) { ZlibChannelData *cd = instanceData; - Tcl_Channel parent; + Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); int e; - parent = Tcl_GetStackedChannel(cd->channel); - if (cd->inFormat != ZLIB_PASSTHROUGH) { - if (cd->inFormat && ZLIB_INFLATE) { - e = inflateEnd(&cd->instream); + if (cd->inFormat & ZLIB_INFLATE) { + e = inflateEnd(&cd->inStream); } else { - e = deflateEnd(&cd->instream); + e = deflateEnd(&cd->inStream); } } if (cd->outFormat != ZLIB_PASSTHROUGH) { - if (cd->outFormat && ZLIB_INFLATE) { - e = inflateEnd(&cd->outstream); + if (cd->outFormat & ZLIB_INFLATE) { + e = inflateEnd(&cd->outStream); } else { - e = deflateEnd(&cd->outstream); + e = deflateEnd(&cd->outStream); } } - if (cd->inbuffer) { - ckfree(cd->inbuffer); - cd->inbuffer = NULL; + if (cd->inBuffer) { + ckfree(cd->inBuffer); + cd->inBuffer = NULL; } - if (cd->outbuffer) { - ckfree(cd->outbuffer); - cd->outbuffer = NULL; + if (cd->outBuffer) { + ckfree(cd->outBuffer); + cd->outBuffer = NULL; } return TCL_OK; } @@ -2009,7 +2020,16 @@ ChanInput( int *errorCodePtr) { ZlibChannelData *cd = instanceData; + Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); + Tcl_DriverInputProc *inProc = + Tcl_ChannelInputProc(Tcl_GetChannelType(parent)); + if (!(cd->flags & TCL_READABLE)) { + return inProc(Tcl_GetChannelInstanceData(parent), buf, toRead, + errorCodePtr); + } + + // TODO return TCL_OK; } @@ -2021,7 +2041,16 @@ ChanOutput( int *errorCodePtr) { ZlibChannelData *cd = instanceData; + Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); + Tcl_DriverOutputProc *outProc = + Tcl_ChannelOutputProc(Tcl_GetChannelType(parent)); + + if (!(cd->flags & TCL_WRITABLE)) { + return outProc(Tcl_GetChannelInstanceData(parent), buf, toWrite, + errorCodePtr); + } + // TODO return TCL_OK; } @@ -2046,12 +2075,42 @@ ChanSetOption( /* not used */ } static int -ChanGetOption( /* not used */ +ChanGetOption( ClientData instanceData, Tcl_Interp *interp, const char *optionName, Tcl_DString *dsPtr) { + ZlibChannelData *cd = instanceData; + Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); + Tcl_DriverSetOptionProc *getOptionProc = + Tcl_ChannelGetOptionProc(Tcl_GetChannelType(parent)); + + if (strcmp(optionName, "-crc") == 0) { + uLong crc; + char buf[12]; + + if (cd->flags & TCL_WRITABLE) { + crc = cd->outStream.adler; + } else { + crc = cd->inStream.adler; + } + + sprintf(buf, "0x%lx", crc); + Tcl_DStringAppend(dsPtr, buf, -1); + return TCL_OK; + } + + if (getOptionProc && getOptionProc(Tcl_GetChannelInstanceData(parent), + interp, optionName, dsPtr) != TCL_OK) { + return TCL_ERROR; + } else if (optionName != NULL) { + return TCL_ERROR; + } + + if (optionName == NULL) { + Tcl_DStringAppendElement(dsPtr, "-crc"); + } return TCL_OK; } @@ -2069,20 +2128,10 @@ ChanGetHandle( int direction, ClientData *handlePtr) { - /* - * No such thing as an OS handle for Zlib. - */ - - return 0; -} + ZlibChannelData *cd = instanceData; + Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); -static int -ChanClose2( /* not used */ - ClientData instanceData, - Tcl_Interp *interp, - int flags) -{ - return TCL_OK; + return Tcl_GetChannelHandle(parent, direction, handlePtr); } static int @@ -2165,29 +2214,29 @@ Tcl_ZlibStackChannel( cd->inFormat = inFormat; cd->outFormat = outFormat; - cd->instream.zalloc = 0; - cd->instream.zfree = 0; - cd->instream.opaque = 0; - cd->instream.avail_in = 0; - cd->instream.next_in = NULL; - cd->instream.avail_out = 0; - cd->instream.next_out = NULL; - - cd->outstream.zalloc = 0; - cd->outstream.zfree = 0; - cd->outstream.opaque = 0; - cd->outstream.avail_in = 0; - cd->outstream.next_in = NULL; - cd->outstream.avail_out = 0; - cd->outstream.next_out = NULL; + cd->inStream.zalloc = 0; + cd->inStream.zfree = 0; + cd->inStream.opaque = 0; + cd->inStream.avail_in = 0; + cd->inStream.next_in = NULL; + cd->inStream.avail_out = 0; + cd->inStream.next_out = NULL; + + cd->outStream.zalloc = 0; + cd->outStream.zfree = 0; + cd->outStream.opaque = 0; + cd->outStream.avail_in = 0; + cd->outStream.next_in = NULL; + cd->outStream.avail_out = 0; + cd->outStream.next_out = NULL; if (inFormat != ZLIB_PASSTHROUGH) { if (inFormat & ZLIB_INFLATE) { /* Initialize for Inflate */ - e = inflateInit2(&cd->instream, inwbits); + e = inflateInit2(&cd->inStream, inwbits); } else { /* Initialize for Deflate */ - e = deflateInit2(&cd->instream, inLevel, Z_DEFLATED, inwbits, + e = deflateInit2(&cd->inStream, inLevel, Z_DEFLATED, inwbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); } } @@ -2195,10 +2244,10 @@ Tcl_ZlibStackChannel( if (outFormat != ZLIB_PASSTHROUGH) { if (outFormat && ZLIB_INFLATE) { /* Initialize for Inflate */ - e = inflateInit2(&cd->outstream, outwbits); + e = inflateInit2(&cd->outStream, outwbits); } else { /* Initialize for Deflate */ - e = deflateInit2(&cd->outstream, outLevel, Z_DEFLATED, outwbits, + e = deflateInit2(&cd->outStream, outLevel, Z_DEFLATED, outwbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); } } -- cgit v0.12 From 9b6fa1e54afb4f824ac6366f8e89439a3ec3be8e Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 14 Dec 2008 13:32:11 +0000 Subject: Improve build rules on Win w.r.t. zlib Improve autoconf magic on Unix and Win --- ChangeLog | 8 ++++++++ unix/configure.in | 20 ++++++++++---------- win/configure.in | 35 ++++++++++++++++++++--------------- win/makefile.bc | 4 +++- win/makefile.vc | 4 +++- win/tcl.m4 | 2 +- 6 files changed, 45 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6122e8b..be7db49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-14 Donal K. Fellows + + * unix/configure.in, win/configure.in: Improve the autodetection code. + * win/tcl.m4 (SC_CONFIG_CFLAGS): Remove the assumption of the presence + of zlib library on Windows. + * win/makefile.vc, win/makefile.bc: Add support for building tclZlib.o + but only in stubbed-out mode for now. + 2008-12-13 Donal K. Fellows * doc/TclZlib.3: Basic documentation of the C-level API. diff --git a/unix/configure.in b/unix/configure.in index 5f6d0c9..3b73135 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.194 2008/12/12 16:22:57 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.195 2008/12/14 13:32:11 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -117,22 +117,22 @@ SC_ENABLE_SHARED # Add stuff for zlib #------------------------------------------------------------------------ -zlib_ok=yes +tcl_ok=yes AC_CHECK_HEADER([zlib.h],[ AC_CHECK_TYPE([gz_header],[],[ - zlib_ok=no + tcl_ok=no AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) ],[#include ])],[ - zlib_ok=no + tcl_ok=no AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) ]) -AC_SEARCH_LIBS([deflateSetHeader],[z],[],[ - zlib_ok=no +AS_IF([test $tcl_ok = yes], [ + AC_SEARCH_LIBS([deflateSetHeader],[z],[],[ + tcl_ok=no AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) -]) -if test $zlib_ok = yes; then - AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) -fi + ])]) +AS_IF([test $tcl_ok = yes], [ + AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])]) #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This diff --git a/win/configure.in b/win/configure.in index c3a760f..a057344 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.110 2008/12/11 14:45:22 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.111 2008/12/14 13:32:11 dkf Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -147,7 +147,7 @@ fi # # Check to see if the excpt.h include file provided contains the # definition for EXCEPTION_DISPOSITION; if not, which is the case -# with Cygwin's version as of 2002-04-10, define it to be int, +# with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files, @@ -340,20 +340,25 @@ SC_ENABLE_SHARED # Add stuff for zlib #------------------------------------------------------------------------ -zlib_ok=yes -AC_CHECK_HEADER([zlib.h],[],[ - zlib_ok=no - echo TODO: Add -I$srcdir/compat/zlib/include to compile lines... -]) -AC_SEARCH_LIBS([adler32],[z],[],[ - zlib_ok=no -]) -if test $zlib_ok = yes; then - AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) -fi +tcl_ok=yes +AC_CHECK_HEADER([zlib.h],[ + AC_CHECK_TYPE([gz_header],[],[ + tcl_ok=no + AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) + ],[#include ])],[ + tcl_ok=no + AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) + ]) +AS_IF([test $tcl_ok = yes], [ + AC_SEARCH_LIBS([deflateSetHeader],[z Z zlib Zlib ZLIB],[],[ + tcl_ok=no + AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) + ])]) +AS_IF([test $tcl_ok = yes], [ + AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])]) #-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This +# The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called # after SC_ENABLE_SHARED checks the configure switches. #-------------------------------------------------------------------- @@ -361,7 +366,7 @@ fi SC_CONFIG_CFLAGS #-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols +# Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. #-------------------------------------------------------------------- diff --git a/win/makefile.bc b/win/makefile.bc index 633eb53..46d7ec3 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -272,7 +272,8 @@ TCLOBJS = \ $(TMPDIR)\tclWinPipe.obj \ $(TMPDIR)\tclWinSock.obj \ $(TMPDIR)\tclWinThrd.obj \ - $(TMPDIR)\tclWinTime.obj + $(TMPDIR)\tclWinTime.obj \ + $(TMPDIR)\tclZlib.obj TCLSTUBOBJS = \ $(TMPDIR)\tclStubLib.obj \ @@ -285,6 +286,7 @@ TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" TCL_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) $(SYMDEFINES) \ $(PROFDEFINES) $(OPTDEFINES) $(SIXFOURDEFINES) \ -DTCL_CFGVAL_ENCODING=${CFG_ENCODING} +### TODO: Add -DHAVE_ZLIB=1 ###################################################################### # Compiler flags diff --git a/win/makefile.vc b/win/makefile.vc index 2db853f..d08f802 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.191 2008/10/14 22:28:52 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.192 2008/12/14 13:32:11 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -338,6 +338,7 @@ TCLOBJS = \ $(TMP_DIR)\tclWinSock.obj \ $(TMP_DIR)\tclWinThrd.obj \ $(TMP_DIR)\tclWinTime.obj \ + $(TMP_DIR)\tclZlib.obj \ $(TMP_DIR)\bncore.obj \ $(TMP_DIR)\bn_reverse.obj \ $(TMP_DIR)\bn_fast_s_mp_mul_digs.obj \ @@ -457,6 +458,7 @@ crt = -MT TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)" TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline +### TODO: Add -DHAVE_ZLIB=1 BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES) CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES) diff --git a/win/tcl.m4 b/win/tcl.m4 index 872b955..f27720c 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -446,7 +446,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi SHLIB_LD="" SHLIB_LD_LIBS="" - LIBS="-lws2_32 -lz" + LIBS="-lws2_32" # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" STLIB_LD='${AR} cr' -- cgit v0.12 From 0d6964f92c0fcf8e8390396f81b070ac7dc0c1f5 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 14 Dec 2008 13:42:30 +0000 Subject: tidy up --- ChangeLog | 300 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 150 insertions(+), 150 deletions(-) diff --git a/ChangeLog b/ChangeLog index be7db49..8b3c128 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ * generic/tclZlib.c (Tcl_ZlibInflate): Change PATH_MAX to MAXPATHLEN, since MSVC doesn't have PATH_MAX. - * doc/clock.n: Document new DST fallback rules. + * doc/clock.n: Document new DST fallback rules. * library/clock.tcl (ProcessPosixTimeZone): Fix time change in Eastern Europe (not 3:00 but 4:00 local time). [Bug 2207436] @@ -28,11 +28,11 @@ version of zlib is not capable enough, and automagic to detect when that is the case. [Bug 2421265] -2008-12-12 Alexandre Ferrieux +2008-12-12 Alexandre Ferrieux + + * unix/tclUnixNotfy.c: Fix missing CLOEXEC on internal pipes [2417695] + * unix/tclUnixPipe.c: Fix missing CLOEXEC on [chan pipe] fds. - * unix/tclUnixNotfy.c Fix missing CLOEXEC on internal pipes [2417695] - * unix/tclUnixPipe.c Fix missing CLOEXEC on [chan pipe] fds. - 2008-12-12 Donal K. Fellows * generic/tclZlib.c (Tcl_ZlibDeflate): Add a bit of extra space for @@ -40,13 +40,13 @@ (Tcl_ZlibInflate): Ensure that gzip header extraction is done correctly. -2008-12-12 Kevin Kenny +2008-12-12 Kevin Kenny TIP #322 IMPLEMENTATION * doc/NRE.3 (new file): Added documentation of the published API for Non-Recursive Evaluation (NRE). - + 2008-12-11 Jan Nijtmans * generic/tclZlib.c: Eliminate warning: different 'const' qualifiers @@ -55,7 +55,7 @@ * win/Makefile.in: * win/configure: -2008-12-11 Andreas Kupries +2008-12-11 Andreas Kupries * generic/tclIO.c (SetChannelFromAny and related): Modified the * tests/io.test: internal representation of the tclChannelType to @@ -87,7 +87,7 @@ * library/clock.tcl (ProcessPosixTimeZone): Fallback to European time zone DST rules, when the timezone is between 0 and -12. [Bug 2207436] * tests/clock.test (clock-52.[23]): Test cases for [Bug 2207436] - + 2008-12-11 Donal K. Fellows TIP #234 IMPLEMENTATION @@ -100,8 +100,8 @@ 2008-12-10 Kevin B. Kenny * library/tzdata/*: Update from Olson's tzdata2008i. - -2008-12-10 Alexandre Ferrieux + +2008-12-10 Alexandre Ferrieux TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan] @@ -113,7 +113,7 @@ * generic/tclStringObj.c * tests/format.test * tests/scan.test - + 2008-12-10 Donal K. Fellows TIP #341 IMPLEMENTATION @@ -130,7 +130,7 @@ * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: -2008-12-09 Don Porter +2008-12-09 Don Porter TIP #337 IMPLEMENTATION @@ -177,7 +177,7 @@ * generic/tcl.decls: TclTransferResult. Added * doc/SetResult.3: to public stubs table. -2008-12-04 Don Porter +2008-12-04 Don Porter * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added another flag value TCLPATH_NEEDNORM to mark those intreps which need more @@ -188,13 +188,13 @@ * win/tclWinPipe.c (TclpOpenTemporaryFile): Avoid an infinite loop due to GetTempFileName/CreateFile interaction. [Bug 2380318] -2008-12-03 Don Porter +2008-12-03 Don Porter * generic/tclFileName.c (DoGlob): One of the Tcl_FSMatchInDirectory calls did not have its return code checked. This caused error messages returned by some Tcl_Filesystem drivers to be swallowed. -2008-12-02 Don Porter +2008-12-02 Don Porter TIP #336 IMPLEMENTATION @@ -216,13 +216,13 @@ * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: -2008-12-02 Andreas Kupries +2008-12-02 Andreas Kupries * generic/tclIO.c (TclFinalizeIOSubsystem): Replaced Alexandre Ferrieux's first patch for [Bug 2270477] with a gentler version, also supplied by him. -2008-12-01 Don Porter +2008-12-01 Don Porter * generic/tclParse.c: Coding standards fixups. @@ -243,9 +243,9 @@ TIP #210 IMPLEMENTATION - * generic/tclCmdAH.c (FileTempfileCmd): - * unix/tclUnixFCmd.c (TclpOpenTemporaryFile, DefaultTempDir): - * win/tclWinPipe.c (TclpOpenTemporaryFile): + * generic/tclCmdAH.c (FileTempfileCmd): + * unix/tclUnixFCmd.c (TclpOpenTemporaryFile, DefaultTempDir): + * win/tclWinPipe.c (TclpOpenTemporaryFile): * doc/file.n, tests/cmdAH.test: Implementation of [file tempfile]. I do not claim that this is a brilliant implementation, especially on Windows, but it covers the main points. @@ -255,9 +255,9 @@ more comments and explanation of what is going on. Reduce the amount of locking required. -2008-11-27 Alexandre Ferrieux +2008-11-27 Alexandre Ferrieux - * generic/tcl.h: Alternate fix for [Bug 2251175]: missing + * generic/tcl.h: Alternate fix for [Bug 2251175]: missing * generic/tclCompile.c: backslash substitution on expanded literals. * generic/tclParse.c: * generic/tclTest.c: @@ -266,21 +266,21 @@ 2008-11-26 Jan Nijtmans * generic/tclIndexObj.c: Eliminate warning: unused variable - * generic/tclTest.c: A few more (harmless) Tcl_SetResult + * generic/tclTest.c: A few more (harmless) Tcl_SetResult eliminations. 2008-11-26 Kevin B. Kenny * library/tclIndex: Removed reference to no-longer-extant procedure - 'tclLdAout'. + 'tclLdAout'. * doc/library.n: Corrected mention of 'auto_exec' to 'auto_execok'. [Patch 2114900] thanks to Stu Cassoff - + 2008-11-25 Jan Nijtmans * generic/tclIndexObj.c: Eliminate 3 calls to Tcl_SetResult, as - * generic/tclIO.c examples how it should have been done. - * generic/tclTestObj.c purpose: contribute in the TIP #340 + * generic/tclIO.c: examples how it should have been done. + * generic/tclTestObj.c: purpose: contribute in the TIP #340 discussion. 2008-11-25 Andreas Kupries @@ -315,12 +315,12 @@ * generic/tclDictObj.c: Convert Tcl_SetResult call to Tcl_SetObjResult. -2008-11-17 Alexandre Ferrieux +2008-11-17 Alexandre Ferrieux * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] fixed earlier. - * generic/tcl.h: Fix [Bug 2251175]: missing backslash + * generic/tcl.h: Fix [Bug 2251175]: missing backslash * generic/tclCompCmds.c substitution on expanded literals. * generic/tclCompile.c * generic/tclParse.c @@ -336,13 +336,13 @@ 2008-11-13 Jan Nijtmans - * generic/tclInt.h: Rename static function FSUnloadTempFile to - * generic/tclIOUtil.c TclFSUnloadTempFile, needed in tclLoad.c + * generic/tclInt.h: Rename static function FSUnloadTempFile to + * generic/tclIOUtil.c TclFSUnloadTempFile, needed in tclLoad.c - * generic/tclLoad.c Fixed [Bug 2269431]: load of shared - objects leaves temporary files on windows + * generic/tclLoad.c Fixed [Bug 2269431]: load of shared + objects leaves temporary files on windows -2008-11-12 Pat Thoyts +2008-11-12 Pat Thoyts * tests/registry.test: Use HKCU to avoid requiring admin access for registry testing on Vista/Server2008 @@ -350,14 +350,14 @@ 2008-11-11 Jan Nijtmans * generic/tclNamesp.c: Eliminate warning: passing arg 4 of - `Tcl_SplitList' from incompatible pointer type - * win/tcl.m4: Reverted change from 2008-11-06 (was under the - impression that "-Wno-implicit-int" added an - extra warning) - * win/configure (regenerated) - * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and - get rid of -Wno-implicit-int for UNIX. - * unix/configure (regenerated) + `Tcl_SplitList' from incompatible pointer type. + * win/tcl.m4: Reverted change from 2008-11-06 (was under the + impression that "-Wno-implicit-int" added an + extra warning) + * win/configure: (regenerated) + * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and + get rid of -Wno-implicit-int for UNIX. + * unix/configure: (regenerated) 2008-11-10 Andreas Kupries @@ -369,21 +369,21 @@ * win/Makefile.in: package to version 1.1.4. Added cross-references to the relevant parts of the code to avoid future desynchronization. -2008-11-07 Pat Thoyts +2008-11-07 Pat Thoyts - * generic/tclInt.h: Applied patch #2215022 from Duoas to clean up + * generic/tclInt.h: Applied [Patch 2215022] from Duoas to clean up * generic/tclBinary.c: the binary ensemble initiailization code. * generic/tclNamesp.c: Extends the TclMakeEnsemble to do * doc/ByteArrObj.3: sub-ensembles from tables. 2008-11-06 Jan Nijtmans - * win/tcl.m4: add "-Wno-implicit-int" flag for gcc, as on UNIX - * win/configure (regenerated) - * generic/tclIO.c eliminate an 'array index out of bounds' - warning on HP-UX + * win/tcl.m4: Add "-Wno-implicit-int" flag for gcc, as on UNIX + * win/configure: (regenerated) + * generic/tclIO.c: Eliminate an 'array index out of bounds' warning + on HP-UX. -2008-11-04 Jeff Hobbs +2008-11-04 Jeff Hobbs * generic/tclPort.h: remove the ../win/ header dir as the build system already has it, and it confuses builds when used with @@ -412,13 +412,13 @@ 2008-10-28 Jan Nijtmans - * generic/tclCompile.h: CONSTify TclDTraceInfo - * generic/tclBasic.c - * generic/tclProc.c - * generic/tclEnv.c: Eliminate some -Wwrite-strings warnings - * generic/tclLink.c + * generic/tclCompile.h: CONSTify TclDTraceInfo + * generic/tclBasic.c: + * generic/tclProc.c: + * generic/tclEnv.c: Eliminate some -Wwrite-strings warnings + * generic/tclLink.c: -2008-10-27 Don Porter +2008-10-27 Don Porter * generic/tclEncoding.c: Use "iso8859-1" and not "identity" as the default and original [encoding system] value. Since "iso8859-1" is @@ -430,7 +430,7 @@ other code expecting a particular value for Tcl's default system encoding *** -2008-10-24 Pat Thoyts +2008-10-24 Pat Thoyts * library/http/http.tcl: Fixed a failure to read SHOUTcast streams with the new 2.7 package. Introduced a new intial state as the first @@ -443,7 +443,7 @@ 2008-10-22 Jan Nijtmans - * generic/tcl.h: CONST -> const and white-spacing + * generic/tcl.h: CONST -> const and white-spacing * generic/tclCompile.h: * generic/tclEncoding.c: * generic/tclStubInit.c: @@ -451,19 +451,19 @@ * generic/tcl.decls * generic/tclInt.decls * generic/tclTomMath.decls - * generic/tclDecls.h: (regenerated) + * generic/tclDecls.h: (regenerated) * generic/tclIntDecls.h: (regenerated) * generic/tclIntPlatDecls.h: (regenerated) - * generic/tclOODecls.h: (regenerated) + * generic/tclOODecls.h: (regenerated) * generic/tclOOIntDecls.h: (regenerated) * generic/tclPlatDecls.h: (regenerated) * generic/tclTomMathDecls.h: (regenerated) * generic/tclIntDecls.h: (regenerated) - * tools/genStubs.tcl: CONST -> const and white-spacing + * tools/genStubs.tcl: CONST -> const and white-spacing -2008-10-19 Don Porter +2008-10-19 Don Porter - * generic/tclProc.c: Reset -level and -code values to defaults + * generic/tclProc.c: Reset -level and -code values to defaults after they are used. [Bug 2152286] 2008-10-19 Donal K. Fellows @@ -478,8 +478,8 @@ 2008-10-17 Jan Nijtmans - * generic/tclOO.decls: CONST -> const. - * generic/tclOODecls.h: (regenerated) + * generic/tclOO.decls: CONST -> const. + * generic/tclOODecls.h: (regenerated) * generic/tclOOIntDecls.h: (regenerated) 2008-10-17 Andreas Kupries @@ -487,7 +487,7 @@ * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removed debug output in C++ comment. -2008-10-17 Don Porter +2008-10-17 Don Porter * generic/tclCompile.h: Declare the internal tclInstructionTable * generic/tclExecute.c: to simply be "const", not CONST86. @@ -505,8 +505,8 @@ 2008-10-16 Jan Nijtmans * generic/regc_locale.c: Add "const" to many internal - * generic/tclClock.c: const tables. No functional - * generic/tclCmdIL.c: or API change. + * generic/tclClock.c: const tables. No functional + * generic/tclCmdIL.c: or API change. * generic/tclConfig.c * generic/tclDate.c * generic/tclEncoding.c @@ -538,21 +538,21 @@ * win/tclWinInit.c * win/tclWinTest.c -2008-10-16 Don Porter +2008-10-16 Don Porter - * library/init.tcl: Revised [unknown] so that it carefully + * library/init.tcl: Revised [unknown] so that it carefully preserves the state of the ::errorInfo and ::errorCode variables at the start of auto-loading and restores that state before the autoloaded command is evaluated. [Bug 2140628] 2008-10-15 Jan Nijtmans - * generic/tclInt.h: Add "const" to many internal - * generic/tclBinary.c: const tables, so those will be - * generic/tclCompile.c: put by the C-compiler in the - * generic/tclDictObj.c: TEXT segment in stead of the - * generic/tclHash.c: DATA segment. This makes those - * generic/tclListObj.c: table sharable in shared libraries. + * generic/tclInt.h: Add "const" to many internal + * generic/tclBinary.c: const tables, so those will be + * generic/tclCompile.c: put by the C-compiler in the + * generic/tclDictObj.c: TEXT segment in stead of the + * generic/tclHash.c: DATA segment. This makes those + * generic/tclListObj.c: table sharable in shared libraries. * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: @@ -563,8 +563,8 @@ 2008-10-14 Jan Nijtmans - * generic/tclCmdAH.c: Fix minor compiler warnings when compiling - * generic/tclCmdMZ.c: with -Wwrite-strings + * generic/tclCmdAH.c: Fix minor compiler warnings when compiling + * generic/tclCmdMZ.c: with -Wwrite-strings * generic/tclIndexObj.c: * generic/tclProc.c: * generic/tclStubLib.c: @@ -579,7 +579,7 @@ * doc/binary.n: Formatting fix. -2008-10-14 Don Porter +2008-10-14 Don Porter * README: Bump version number to 8.6a4 * generic/tcl.h: @@ -603,7 +603,7 @@ direct people to the correct manual pages for specific channel types, suitable for the hard-of-reading. Following discussion on tcl-core. -2008-10-13 Pat Thoyts +2008-10-13 Pat Thoyts * win/tclWinThrd.c (TclpThreadCreate): We need to initialize the thread id variable to 0 as on 64 bit windows this is a pointer sized @@ -626,7 +626,7 @@ Tcl, but were met during development of L. Thanks go to Robert Netzer for diagnosis and fix. -2008-10-10 Don Porter +2008-10-10 Don Porter *** 8.6a3 TAGGED FOR RELEASE *** @@ -640,9 +640,9 @@ 2008-10-08 Jan Nijtmans - * unix/tclUnixChan.c: Fix minor compiler warning. - * unix/tcl.m4: Fix for [Bug 2073255] - * unix/configure: Regenerated + * unix/tclUnixChan.c: Fix minor compiler warning. + * unix/tcl.m4: Fix for [Bug 2073255] + * unix/configure: Regenerated 2008-10-08 Miguel Sofer @@ -651,7 +651,7 @@ when a coroutine is running but the resume command has been deleted. [Bug 2153080] -2008-10-08 Don Porter +2008-10-08 Don Porter * generic/tclTrace.c: Corrected handling of errors returned by variable traces so that the errorInfo value contains the original @@ -670,10 +670,10 @@ TIP #327,#328 IMPLEMENTATIONS - * generic/tclBasic.c: Move [tailcall], [coroutine] and - * generic/tclCmdIL.c: [yield] out of ::tcl::unsupported + * generic/tclBasic.c: Move [tailcall], [coroutine] and + * generic/tclCmdIL.c: [yield] out of ::tcl::unsupported * tclInt.h: - * tests/info.test: and into global scope: TIPs #327 + * tests/info.test: and into global scope: TIPs #327 * tests/unsupported.test: and #328 2008-10-07 Donal K. Fellows @@ -681,7 +681,7 @@ * doc/chan.n, doc/transchan.n: Documented the channel transformation API of TIP #230. -2008-10-06 Pat Thoyts +2008-10-06 Pat Thoyts * tests/winFCmd.test: Fixed some erroneous tests on Vista+. * generic/tclFCmd.c: Fix constness for msvc of last commit @@ -693,15 +693,15 @@ 2008-10-05 Jan Nijtmans - * doc/FileSystem.3: CONSTified Tcl_FSFileAttrStringsProc - * generic/tclFCmd.c: and tclpFileAttrStrings. This allows - * generic/tclIOUtil.c: FileSystems to report their attributes - * generic/tclTest.c: as const strings, without worrying that - * unix/tclUnixFCmd.c: Tcl modifies them (which Tcl should not - * win/tclWinFCmd.c: do anyway, but the API didn't indicate that) + * doc/FileSystem.3: CONSTified Tcl_FSFileAttrStringsProc + * generic/tclFCmd.c: and tclpFileAttrStrings. This allows + * generic/tclIOUtil.c: FileSystems to report their attributes + * generic/tclTest.c: as const strings, without worrying that + * unix/tclUnixFCmd.c: Tcl modifies them (which Tcl should not + * win/tclWinFCmd.c: do anyway, but the API didn't indicate that) * generic/tcl.decls - * generic/tclDecls.h: regenerated - * generic/tcl.h: Make sure that if CONST84 is defined as empty, + * generic/tclDecls.h: regenerated + * generic/tcl.h: Make sure that if CONST84 is defined as empty, CONST86 should be defined as empty as well (unless overridden). This change complies with TIP #27 @@ -710,7 +710,7 @@ 2008-10-05 Kevin B, Kenny * libtommath/bn_mp_sqrt.c (bn_mp_sqrt): Handle the case where a - * tests/expr.test (expr-47.13): number's square root is + * tests/expr.test (expr-47.13): number's square root is between n< - * generic/tclInt.decls: CONSTified the AuxDataType argument + * generic/tclInt.decls: CONSTified the AuxDataType argument * generic/tclCompCmds.c: of TclCreateAuxData and - * generic/tclCompile.c TclRegisterAuxDataType and the return - * generic/tclCompile.h values of TclGetAuxDataType and - * generic/tclExecute.c TclGetInstructionTable + * generic/tclCompile.c: TclRegisterAuxDataType and the return + * generic/tclCompile.h: values of TclGetAuxDataType and + * generic/tclExecute.c: TclGetInstructionTable * generic/tclIntDecls.h: regenerated This change complies with TIP #27 (even though it only involves internal function, so this is not even necessary). @@ -825,7 +825,7 @@ tcltest less specific to accept both .tcl and .tm variants of the file during matching. [Bug 2129828] -2008-10-02 Don Porter +2008-10-02 Don Porter TIP #330 IMPLEMENTATION @@ -850,7 +850,7 @@ * win/makefile.vc: Fix the HtmlHelp and WinHelp targets to not be mutually exclusive. -2008-09-29 Don Porter +2008-09-29 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -899,8 +899,8 @@ 2008-09-28 Miguel Sofer - * generic/tclBasic.c: Fix the numLevels computations on - * generic/tclInt.h: coroutine yield/resume + * generic/tclBasic.c: Fix the numLevels computations on + * generic/tclInt.h: coroutine yield/resume * tests/unsupported.test: 2008-09-27 Donal K. Fellows @@ -913,7 +913,7 @@ case where the combination of number of elements and repeat count causes the resulting list to be too large. [Bug 2130992] -2008-09-26 Don Porter +2008-09-26 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -941,7 +941,7 @@ * generic/tclOO.h (TCLOO_VERSION): Bump the version. -2008-09-25 Don Porter +2008-09-25 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -968,7 +968,7 @@ * tests/oo.test (oo-25.2): Revise call chain cache management so that it takes into account class-wide caching correctly. [Bug 2120903] -2008-09-24 Don Porter +2008-09-24 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -1014,7 +1014,7 @@ get the body of a procedure-like method. Reduces the amount of "poking inside the abstraction" that is done by the introspection code. -2008-09-22 Alexandre Ferrieux +2008-09-22 Alexandre Ferrieux * doc/chan.n: Clean up paragraph order. @@ -1024,7 +1024,7 @@ * generic/tclInt.h (TCL_CT_ASSERT): New compile-time assertions, adapted from www.pixelbeat.org/programming/gcc/static_assert.html -2008-09-17 Don Porter +2008-09-17 Don Porter * generic/tclInt.h: Correct the TclGetLongFromObj, TclGetIntFromObj, and TclGetIntForIndexM macros so that they retrieve the longValue @@ -1102,7 +1102,7 @@ * generic/tclExecute.c (CACHE_STACK_INFO): * tests/unsupported.test: Restore execEnv's bottomPtr. [Bug 2093188] -2008-09-02 Don Porter +2008-09-02 Don Porter * generic/tcl.h: Stripped "callers" of the _ANSI_ARGS_ macro * compat/dirent2.h: to support a TCL_NO_DEPRECATED build. @@ -1142,7 +1142,7 @@ * win/makefile.bc: * win/makefile.vc: -2008-08-28 Don Porter +2008-08-28 Don Porter * README: Bump version number to 8.6a3 * generic/tcl.h: @@ -1203,7 +1203,7 @@ * generic/tclExecute.c: Set special errocodes: COROUTINE_BUSY, COROUTINE_CANT_YIELD, COROUTINE_ILLEGAL_YIELD. -2008-08-22 Don Porter +2008-08-22 Don Porter *** 8.6a2 TAGGED FOR RELEASE *** @@ -1225,13 +1225,13 @@ * generic/tclInt.h: * tests/unsupported.test: -2008-08-21 Jeff Hobbs +2008-08-21 Jeff Hobbs * tests/regexp.test, tests/regexpComp.test: Correct re2glob ***= * generic/tclUtil.c (TclReToGlob): translation from exact to anywhere-in-string match. [Bug 2065115] -2008-08-21 Don Porter +2008-08-21 Don Porter * generic/tcl.h: Reduced the use of CONST86 and eliminated * generic/tcl.decls: the use of CONST86_RETURN to support source @@ -1242,12 +1242,12 @@ -DUSE_COMPAT85_CONST compiler directive. *** POTENTIAL INCOMPATIBILITY *** - * generic/tclDecls.h: make genstubs + * generic/tclDecls.h: make genstubs 2008-08-21 Miguel Sofer - * generic/tclBasic.c: Fix the cmdFrame level count in - * generic/tclCmdIL.c: coroutines. Fix small bug on coroutine + * generic/tclBasic.c: Fix the cmdFrame level count in + * generic/tclCmdIL.c: coroutines. Fix small bug on coroutine * generic/tclInt.h: rewind. 2008-08-21 Donal K. Fellows @@ -1255,7 +1255,7 @@ * generic/tclProc.c (Tcl_DisassembleObjCmd): Added ability to disassemble TclOO methods. The code to do this is very ugly. -2008-08-21 Pat Thoyts +2008-08-21 Pat Thoyts * generic/tclOOMethod.c: Added casts to make MSVC happy * generic/tclBasic.c: @@ -1300,9 +1300,9 @@ * generic/tclExecute.c: Better cmdFrame management -2008-08-14 Don Porter +2008-08-14 Don Porter - * tests/fileName.test: Revise new tests for portability to case + * tests/fileName.test: Revise new tests for portability to case insensitive filesystems. 2008-08-14 Daniel Steffen @@ -1339,25 +1339,25 @@ * unix/tcl.m4 (SC_PATH_X): Check for libX11.dylib in addition to libX11.so et al. - * unix/configure: autoconf-2.59 - * unix/tclConfig.h.in: autoheader-2.59 + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 2008-08-13 Miguel Sofer * tests/nre.test: Added test for large {*}-expansion effects -2008-08-13 Don Porter +2008-08-13 Don Porter * generic/tclFileName.c: Fix for errors handling -types {} * tests/fileName.test: option to [glob]. [Bug 1750300] Thanks to Matthias Kraft and George Peter Staplin. -2008-08-12 Jeff Hobbs +2008-08-12 Jeff Hobbs * generic/tclOOInfo.c (InfoObjectDefnCmd, InfoObjectMixinsCmd): Fix # args displayed. [Bug 2048676] -2008-08-08 Don Porter S +2008-08-08 Don Porter S * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check for bytecode validity. [Bug 2037727] @@ -1380,7 +1380,7 @@ * changes: Updates for 8.6a2 release. -2008-08-11 Pat Thoyts +2008-08-11 Pat Thoyts * library/http/http.tcl: Remove 8.5 requirement. * library/http/pkgIndex.tcl: @@ -1402,7 +1402,7 @@ test case demonstrating the leak before the fix. Fixed a few spelling errors in test descriptions as well. -2008-08-11 Don Porter +2008-08-11 Don Porter * library/http/http.tcl: Bump http version to 2.7.1 to account * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This @@ -1411,7 +1411,7 @@ * win/makefile.bc: use the unsigned formats in the * win/makefile.vc: [binary scan] command. -2008-08-11 Pat Thoyts +2008-08-11 Pat Thoyts * library/http/http.tcl: CRC field from zlib data should be treated as unsigned for 64bit support. [Bug 2046846] @@ -1438,11 +1438,11 @@ * tests/lrange.test (lrange-1.17): Add test cleanup; whitespace. -2008-08-08 Don Porter +2008-08-08 Don Porter * changes: Updates for 8.6a2 release. -2008-08-08 Kevin Kenny +2008-08-08 Kevin Kenny * library/tzdata/CET: * library/tzdata/MET: @@ -1460,11 +1460,11 @@ 2008-08-07 Miguel Sofer - * generic/tclBasic.c: Fix tailcalls falling out of tebc into + * generic/tclBasic.c: Fix tailcalls falling out of tebc into * generic/tclExecute.c: Tcl_EvalEx. [Bug 2017946] * generic/tclInt.h: -2008-08-06 Don Porter S +2008-08-06 Don Porter S * generic/tclOO.c: Revised TclOO's check for an interp being deleted during handling of object command deletion. The old code was @@ -1490,7 +1490,7 @@ else load the tiny script in that patch by themselves (rewrite ::unknown). Note that it is a script-only patch. -2008-08-05 Joe English +2008-08-05 Joe English * unix/tclUnixChan.c: Streamline async connect logic [Patch 1994512] @@ -1534,7 +1534,7 @@ * tests/nre.test (new): separating core functionality from the * tests/unsupported.test (new): experimental commands. -2008-08-01 Jeff Hobbs +2008-08-01 Jeff Hobbs * doc/Exit.3: Do not call Tcl_Finalize implicitly * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead @@ -1557,14 +1557,14 @@ tests that actually measure the C-stack depth. This makes them bearable again (even under memdebug) and avoid crashing on failure. - * generic/tclBasic.c: NR-enabling [catch], [if] and [for] and - * generic/tclCmdAH.c: [while] (the script, not the tests) + * generic/tclBasic.c: NR-enabling [catch], [if] and [for] and + * generic/tclCmdAH.c: [while] (the script, not the tests) * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclInt.h: * tests/NRE.test: - * generic/tclBasic.c: Moved the few remaining defs from tclNRE.h to + * generic/tclBasic.c: Moved the few remaining defs from tclNRE.h to * generic/tclDictObj.c: tclInt.h, eliminated inclusion of tclNRE.h * generic/tclExecute.c: everywhere. * generic/tclInt.h: @@ -1607,7 +1607,7 @@ to extend to every other obj allocation where an interp is know; this is left for some other time, requires a lot of grunt work. - * generic/tclExecute.c: Fix [Bug 2030670] that cause TclStackRealloc + * generic/tclExecute.c: Fix [Bug 2030670] that cause TclStackRealloc to panic on rare corner cases. Thx ajpasadyn for diagnose and patch. * generic/tcl.decls: Completely revamped NRE implementation, with @@ -2365,7 +2365,7 @@ * generic/tclCompCmds.c: non-body compiled scripts to access the * generic/tclCompile.c: LVT (but not to extend it) and enable the * generic/tclCompile.h: canonical list opt to sidestep the - * generic/tclExecute.c: compiler. This is [Patch 1973096] + * generic/tclExecute.c: compiler. [Patch 1973096] * generic/tclProc.c: * tests/uplevel.test: @@ -2421,14 +2421,13 @@ * generic/tclOODecls.h: Added the swizzling of DLLEXPORT and * generic/tclOOIntDecls.h: DLLIMPORT needed to make EXTERN work. - * generic/tclDictObj.c: Added missing initializers to the ensemble - map to silence a compiler warning. Thanks - to George Peter Staplin for the report. + * generic/tclDictObj.c: Added missing initializers to the ensemble + map to silence a compiler warning. Thanks to + George Peter Staplin for the report. - * generic/tclOOMethod.c: Fix a bug where the refcount of a method - was reset if the method was redefined while - there was an active invocation. - [Bug 1981001] + * generic/tclOOMethod.c: Fix a bug where the refcount of a method was + reset if the method was redefined while there + was an active invocation. [Bug 1981001] 2008-06-01 Donal K. Fellows @@ -2537,9 +2536,10 @@ * win/rules.vc: builds. Added 'tclalloc' option to disable. 2008-05-09 George Peter Staplin - * tools/tsdPerf.c A loadable Tcl extension for testing TSD + + * tools/tsdPerf.c: A loadable Tcl extension for testing TSD performance. - * tools/tsdPerf.tcl A simplistic tool that uses the thread + * tools/tsdPerf.tcl: A simplistic tool that uses the thread extension and tsdPerf.so to get some performance metrics by, simulating, simple TSD contention. -- cgit v0.12 From 52bfe7018d1a7f4cb93fc25ea27e958bb6fed544 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 14 Dec 2008 13:44:47 +0000 Subject: regen --- unix/configure | 18 +- win/configure | 4956 ++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 3062 insertions(+), 1912 deletions(-) diff --git a/unix/configure b/unix/configure index 720be48..eadc6fa 100755 --- a/unix/configure +++ b/unix/configure @@ -6324,7 +6324,7 @@ _ACEOF # Add stuff for zlib #------------------------------------------------------------------------ -zlib_ok=yes +tcl_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then { echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } @@ -6510,7 +6510,7 @@ if test $ac_cv_type_gz_header = yes; then : else - zlib_ok=no + tcl_ok=no { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} @@ -6518,14 +6518,16 @@ fi else - zlib_ok=no + tcl_ok=no { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} fi -{ echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +if test $tcl_ok = yes; then + + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -6608,13 +6610,16 @@ if test "$ac_res" != no; then else - zlib_ok=no + tcl_ok=no { echo "$as_me:$LINENO: WARNING: todo: Add compat/zlib to list of things to build" >&5 echo "$as_me: WARNING: todo: Add compat/zlib to list of things to build" >&2;} fi -if test $zlib_ok = yes; then +fi + +if test $tcl_ok = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_ZLIB 1 @@ -6622,6 +6627,7 @@ _ACEOF fi + #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called diff --git a/win/configure b/win/configure index 40a48f8..fb30189 100755 --- a/win/configure +++ b/win/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.61. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -272,8 +577,181 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../generic/tcl.h" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +AR +RANLIB +RC +SET_MAKE +TCL_THREADS +CYGPATH +CELIB_DIR +DL_LIBS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_DLL_FILE +TCL_SRC_DIR +TCL_BIN_DIR +TCL_DBGX +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +EXTRA_CFLAGS +DEPARG +CC_OBJNAME +CC_EXENAME +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +LDFLAGS_CONSOLE +LDFLAGS_WINDOW +STLIB_LD +SHLIB_LD +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +TCL_SHARED_BUILD +LIBS_GUI +DLLSUFFIX +LIBPREFIX +LIBSUFFIX +EXESUFFIX +LIBRARIES +MAKE_LIB +POST_MAKE_LIB +MAKE_DLL +MAKE_EXE +TCL_BUILD_LIB_SPEC +TCL_LD_SEARCH_FLAGS +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_PACKAGE_PATH +TCL_DDE_VERSION +TCL_DDE_MAJOR_VERSION +TCL_DDE_MINOR_VERSION +TCL_DDE_PATCH_LEVEL +TCL_REG_VERSION +TCL_REG_MAJOR_VERSION +TCL_REG_MINOR_VERSION +TCL_REG_PATCH_LEVEL +RC_OUT +RC_TYPE +RC_INCLUDE +RC_DEFINE +RC_DEFINES +RES +LIBOBJS +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -300,34 +778,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -349,33 +841,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -402,6 +906,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -426,13 +936,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -497,6 +1010,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -549,24 +1072,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -597,8 +1116,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -618,27 +1136,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -665,74 +1175,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -761,9 +1273,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -781,15 +1290,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -820,126 +1336,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -958,7 +1443,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -972,6 +1457,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -993,7 +1479,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1004,7 +1489,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1026,9 +1511,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1039,8 +1522,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1053,20 +1536,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1077,22 +1574,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1104,26 +1607,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1154,14 +1655,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1177,8 +1681,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1190,12 +1694,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1220,8 +1723,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1238,12 +1740,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1260,6 +1756,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1318,8 +1819,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1332,32 +1833,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1370,36 +1873,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1412,74 +1930,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1493,7 +1971,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1504,6 +1982,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1521,22 +2000,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1549,36 +2029,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1591,29 +2073,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1626,21 +2124,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1665,47 +2177,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1717,19 +2259,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1748,22 +2292,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1774,9 +2323,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1790,14 +2338,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1817,14 +2365,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1842,12 +2396,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1870,50 +2424,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -1929,38 +2482,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -1976,12 +2609,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2015,12 +2648,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2035,266 +2673,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifndef __cplusplus - choke me +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2317,8 +2805,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2352,24 +2840,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2378,9 +2864,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2390,24 +2877,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2418,6 +2903,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2435,8 +2921,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2459,24 +2945,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2485,9 +2969,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2497,24 +2982,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2525,6 +3008,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2547,23 +3031,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2587,35 +3218,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2671,6 +3298,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2690,18 +3318,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2714,12 +3351,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2739,8 +3378,8 @@ fi if test "${GCC}" = "yes" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2753,29 +3392,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2788,29 +3429,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2823,26 +3466,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RC="windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then - echo "$as_me:$LINENO: result: $RC" >&5 -echo "${ECHO_T}$RC" >&6 + { echo "$as_me:$LINENO: result: $RC" >&5 +echo "${ECHO_T}$RC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = "" ; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;} @@ -2864,32 +3509,33 @@ fi # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2899,8 +3545,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 -echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 +echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6; } if test "${ac_cv_cygwin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2924,39 +3570,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_cygwin=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_cygwin=yes + ac_cv_cygwin=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 -echo "${ECHO_T}$ac_cv_cygwin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 +echo "${ECHO_T}$ac_cv_cygwin" >&6; } if test "$ac_cv_cygwin" = "yes" ; then { { echo "$as_me:$LINENO: error: Compiling under Cygwin is not currently supported. A maintainer for the Cygwin port of Tcl/Tk is needed. See the README @@ -2968,8 +3610,8 @@ file for information about building with Mingw." >&2;} fi -echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 -echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 +echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6; } if test "${tcl_cv_seh+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3000,13 +3642,22 @@ int main(int argc, char** argv) { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3019,12 +3670,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_seh=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 -echo "${ECHO_T}$tcl_cv_seh" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 +echo "${ECHO_T}$tcl_cv_seh" >&6; } if test "$tcl_cv_seh" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3039,8 +3692,8 @@ fi # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # -echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 -echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 +echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6; } if test "${tcl_cv_eh_disposition+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3066,39 +3719,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_eh_disposition=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_eh_disposition=no + tcl_cv_eh_disposition=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 -echo "${ECHO_T}$tcl_cv_eh_disposition" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 +echo "${ECHO_T}$tcl_cv_eh_disposition" >&6; } if test "$tcl_cv_eh_disposition" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3111,8 +3760,8 @@ fi # Check to see if the winsock2.h include file provided contains # typedefs like LPFN_ACCEPT and friends. # -echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 -echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 +echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6; } if test "${tcl_cv_lpfn_decls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3139,39 +3788,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_lpfn_decls=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lpfn_decls=no + tcl_cv_lpfn_decls=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 -echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 +echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6; } if test "$tcl_cv_lpfn_decls" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3184,8 +3829,8 @@ fi # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. -echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 -echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 +echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6; } if test "${tcl_cv_winnt_ignore_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3214,39 +3859,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_winnt_ignore_void=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_winnt_ignore_void=no + tcl_cv_winnt_ignore_void=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 -echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 +echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6; } if test "$tcl_cv_winnt_ignore_void" = "yes" ; then cat >>confdefs.h <<\_ACEOF @@ -3265,8 +3906,8 @@ fi # register and not on the stack. Instead, we just # call it from inline asm code. -echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 -echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 +echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6; } if test "${tcl_cv_malloc_decl_alloca+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3293,39 +3934,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_malloc_decl_alloca=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_malloc_decl_alloca=no + tcl_cv_malloc_decl_alloca=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 -echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 +echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6; } if test "$tcl_cv_malloc_decl_alloca" = "no" && test "${GCC}" = "yes" ; then @@ -3339,8 +3976,8 @@ fi # This is used to stop gcc from printing a compiler # warning when initializing a union member. -echo "$as_me:$LINENO: checking for cast to union support" >&5 -echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for cast to union support" >&5 +echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6; } if test "${tcl_cv_cast_to_union+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3363,39 +4000,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cast_to_union=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cast_to_union=no + tcl_cv_cast_to_union=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 -echo "${ECHO_T}$tcl_cv_cast_to_union" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 +echo "${ECHO_T}$tcl_cv_cast_to_union" >&6; } if test "$tcl_cv_cast_to_union" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -3409,8 +4042,8 @@ fi # missing from winbase.h. This is known to be # a problem with VC++ 5.2. -echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 -echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 +echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6; } if test "${tcl_cv_findex_enums+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3437,39 +4070,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_findex_enums=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_findex_enums=no + tcl_cv_findex_enums=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 -echo "${ECHO_T}$tcl_cv_findex_enums" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 +echo "${ECHO_T}$tcl_cv_findex_enums" >&6; } if test "$tcl_cv_findex_enums" = "no"; then cat >>confdefs.h <<\_ACEOF @@ -3481,8 +4110,8 @@ fi # See if MWMO_ALERTABLE is missing from winuser.h # This is known to be a problem with Mingw. -echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 -echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 +echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6; } if test "${tcl_cv_mwmo_alertable+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3508,39 +4137,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_mwmo_alertable=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_mwmo_alertable=no + tcl_cv_mwmo_alertable=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 -echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 +echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6; } if test "$tcl_cv_mwmo_alertable" = "no"; then cat >>confdefs.h <<\_ACEOF @@ -3561,19 +4186,19 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 - # Check whether --enable-threads or --disable-threads was given. + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } TCL_THREADS=1 cat >>confdefs.h <<\_ACEOF #define TCL_THREADS 1 @@ -3587,8 +4212,8 @@ _ACEOF else TCL_THREADS=0 - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -3599,11 +4224,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then cat >>confdefs.h <<_ACEOF @@ -3625,15 +4250,15 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -3643,12 +4268,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF #define STATIC_BUILD 1 @@ -3657,201 +4282,580 @@ _ACEOF fi -#-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This -# macro depends on the value of SHARED_BUILD, and should be called -# after SC_ENABLE_SHARED checks the configure switches. -#-------------------------------------------------------------------- +#------------------------------------------------------------------------ +# Add stuff for zlib +#------------------------------------------------------------------------ +tcl_ok=yes +# On IRIX 5.3, sys/types and inttypes.h are conflicting. - # Step 0: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. -if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval -else - do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 - # Cross-compiling options for Windows/CE builds - echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 -echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6 - # Check whether --enable-wince or --disable-wince was given. -if test "${enable_wince+set}" = set; then - enableval="$enable_wince" - doWince=$enableval -else - doWince=no -fi; - echo "$as_me:$LINENO: result: $doWince" >&5 -echo "${ECHO_T}$doWince" >&6 - echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 -echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6 -# Check whether --with-celib or --without-celib was given. -if test "${with_celib+set}" = set; then - withval="$with_celib" - CELIB_DIR=$withval -else - CELIB_DIR=NO_CELIB -fi; - echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 -echo "${ECHO_T}$CELIB_DIR" >&6 - # Set some defaults (may get changed below) - EXTRA_CFLAGS="" - # Extract the first word of "cygpath", so it can be a program name with args. -set dummy cygpath; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CYGPATH+set}" = set; then +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$CYGPATH"; then - ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CYGPATH="cygpath -w" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" + eval "$as_ac_Header=no" fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -CYGPATH=$ac_cv_prog_CYGPATH -if test -n "$CYGPATH"; then - echo "$as_me:$LINENO: result: $CYGPATH" >&5 -echo "${ECHO_T}$CYGPATH" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi +done - SHLIB_SUFFIX=".dll" - # Check for a bug in gcc's windres that causes the - # compile to fail when a Windows native path is - # passed into windres. The mingw toolchain requires - # Windows native paths while Cygwin should work - # with both. Avoid the bug by passing a POSIX - # path when using the Cygwin toolchain. +if test "${ac_cv_header_zlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then - conftest=/tmp/conftest.rc - echo "STRINGTABLE BEGIN" > $conftest - echo "101 \"name\"" >> $conftest - echo "END" >> $conftest + ac_header_compiler=no +fi - echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 -echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6 - cyg_conftest=`$CYGPATH $conftest` - if { ac_try='$RC -o conftest.res.o $cyg_conftest' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } ; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - CYGPATH=echo - fi - conftest= - cyg_conftest= - fi - - if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then - DEPARG='"$<"' - else - DEPARG='"$(shell $(CYGPATH) $<)"' - fi + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # set various compiler flags depending on whether we are using gcc or cl + ac_header_preproc=no +fi - echo "$as_me:$LINENO: checking compiler flags" >&5 -echo $ECHO_N "checking compiler flags... $ECHO_C" >&6 - if test "${GCC}" = "yes" ; then - if test "$do64bit" != "no" ; then - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on Windows" >&5 -echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} - fi - SHLIB_LD="" - SHLIB_LD_LIBS="" - LIBS="-lws2_32 -lz" - # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't - LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" - STLIB_LD='${AR} cr' - RC_OUT=-o - RC_TYPE= - RC_INCLUDE=--include - RC_DEFINE=--define - RES=res.o - MAKE_LIB="\${STLIB_LD} \$@" - POST_MAKE_LIB="\${RANLIB} \$@" - MAKE_EXE="\${CC} -o \$@" - LIBPREFIX="lib" +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - #if test "$ac_cv_cygwin" = "yes"; then - # extra_cflags="-mno-cygwin" - # extra_ldflags="-mno-cygwin" - #else - # extra_cflags="" - # extra_ldflags="" - #fi + ;; +esac +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } - if test "$ac_cv_cygwin" = "yes"; then - touch ac$$.c - if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then - case "$extra_cflags" in - *-mwin32*) ;; - *) extra_cflags="-mwin32 $extra_cflags" ;; - esac - case "$extra_ldflags" in - *-mwin32*) ;; - *) extra_ldflags="-mwin32 $extra_ldflags" ;; - esac - fi - rm -f ac$$.o ac$$.c - else - extra_cflags='' - extra_ldflags='' - fi +fi +if test $ac_cv_header_zlib_h = yes; then - if test "${SHARED_BUILD}" = "0" ; then - # static - echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6 - runtime= - MAKE_DLL="echo " - LIBSUFFIX="s\${DBGX}.a" + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } +if test "${ac_cv_type_gz_header+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +typedef gz_header ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_gz_header=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_gz_header=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +if test $ac_cv_type_gz_header = yes; then + : +else + + tcl_ok=no + { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 +echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} + +fi + +else + + tcl_ok=no + { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 +echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} + +fi + + +if test $tcl_ok = yes; then + + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char deflateSetHeader (); +int +main () +{ +return deflateSetHeader (); + ; + return 0; +} +_ACEOF +for ac_lib in '' z Z zlib Zlib ZLIB; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_deflateSetHeader=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then + break +fi +done +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + : +else + ac_cv_search_deflateSetHeader=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + + tcl_ok=no + { echo "$as_me:$LINENO: WARNING: todo: Add compat/zlib to list of things to build" >&5 +echo "$as_me: WARNING: todo: Add compat/zlib to list of things to build" >&2;} + +fi + +fi + +if test $tcl_ok = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB 1 +_ACEOF + +fi + + +#-------------------------------------------------------------------- +# The statements below define a collection of compile flags. This +# macro depends on the value of SHARED_BUILD, and should be called +# after SC_ENABLE_SHARED checks the configure switches. +#-------------------------------------------------------------------- + + + + # Step 0: Enable 64 bit support? + + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. +if test "${enable_64bit+set}" = set; then + enableval=$enable_64bit; do64bit=$enableval +else + do64bit=no +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } + + # Cross-compiling options for Windows/CE builds + + { echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 +echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; } + # Check whether --enable-wince was given. +if test "${enable_wince+set}" = set; then + enableval=$enable_wince; doWince=$enableval +else + doWince=no +fi + + { echo "$as_me:$LINENO: result: $doWince" >&5 +echo "${ECHO_T}$doWince" >&6; } + + { echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 +echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; } + +# Check whether --with-celib was given. +if test "${with_celib+set}" = set; then + withval=$with_celib; CELIB_DIR=$withval +else + CELIB_DIR=NO_CELIB +fi + + { echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 +echo "${ECHO_T}$CELIB_DIR" >&6; } + + # Set some defaults (may get changed below) + EXTRA_CFLAGS="" + + # Extract the first word of "cygpath", so it can be a program name with args. +set dummy cygpath; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CYGPATH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CYGPATH"; then + ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CYGPATH="cygpath -w" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" +fi +fi +CYGPATH=$ac_cv_prog_CYGPATH +if test -n "$CYGPATH"; then + { echo "$as_me:$LINENO: result: $CYGPATH" >&5 +echo "${ECHO_T}$CYGPATH" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + SHLIB_SUFFIX=".dll" + + # Check for a bug in gcc's windres that causes the + # compile to fail when a Windows native path is + # passed into windres. The mingw toolchain requires + # Windows native paths while Cygwin should work + # with both. Avoid the bug by passing a POSIX + # path when using the Cygwin toolchain. + + if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then + conftest=/tmp/conftest.rc + echo "STRINGTABLE BEGIN" > $conftest + echo "101 \"name\"" >> $conftest + echo "END" >> $conftest + + { echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 +echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6; } + cyg_conftest=`$CYGPATH $conftest` + if { ac_try='$RC -o conftest.res.o $cyg_conftest' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } ; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + CYGPATH=echo + fi + conftest= + cyg_conftest= + fi + + if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then + DEPARG='"$<"' + else + DEPARG='"$(shell $(CYGPATH) $<)"' + fi + + # set various compiler flags depending on whether we are using gcc or cl + + { echo "$as_me:$LINENO: checking compiler flags" >&5 +echo $ECHO_N "checking compiler flags... $ECHO_C" >&6; } + if test "${GCC}" = "yes" ; then + if test "$do64bit" != "no" ; then + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on Windows" >&5 +echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} + fi + SHLIB_LD="" + SHLIB_LD_LIBS="" + LIBS="-lws2_32" + # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't + LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" + STLIB_LD='${AR} cr' + RC_OUT=-o + RC_TYPE= + RC_INCLUDE=--include + RC_DEFINE=--define + RES=res.o + MAKE_LIB="\${STLIB_LD} \$@" + POST_MAKE_LIB="\${RANLIB} \$@" + MAKE_EXE="\${CC} -o \$@" + LIBPREFIX="lib" + + #if test "$ac_cv_cygwin" = "yes"; then + # extra_cflags="-mno-cygwin" + # extra_ldflags="-mno-cygwin" + #else + # extra_cflags="" + # extra_ldflags="" + #fi + + if test "$ac_cv_cygwin" = "yes"; then + touch ac$$.c + if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then + case "$extra_cflags" in + *-mwin32*) ;; + *) extra_cflags="-mwin32 $extra_cflags" ;; + esac + case "$extra_ldflags" in + *-mwin32*) ;; + *) extra_ldflags="-mwin32 $extra_ldflags" ;; + esac + fi + rm -f ac$$.o ac$$.c + else + extra_cflags='' + extra_ldflags='' + fi + + if test "${SHARED_BUILD}" = "0" ; then + # static + { echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6; } + runtime= + MAKE_DLL="echo " + LIBSUFFIX="s\${DBGX}.a" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else # dynamic - echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6 + { echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6; } # ad-hoc check to see if CC supports -shared. if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then @@ -3916,8 +4920,8 @@ echo "$as_me: error: ${CC} does not support the -shared option. else if test "${SHARED_BUILD}" = "0" ; then # static - echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6 + { echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6; } runtime=-MT MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" @@ -3927,8 +4931,8 @@ echo "${ECHO_T}using static flags" >&6 SHLIB_LD_LIBS="" else # dynamic - echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6 + { echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6; } runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" @@ -3971,8 +4975,8 @@ echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} do64bit="no" else - echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 -echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 + { echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 +echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6; } fi fi @@ -4166,22 +5170,22 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -4192,8 +5196,8 @@ _ACEOF LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' DBGX=g if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -4223,11 +5227,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -4399,7 +5403,8 @@ fi - ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" +ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -4418,39 +5423,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -4459,63 +5483,48 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -4546,17 +5555,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -4566,8 +5603,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -4581,18 +5653,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -4600,159 +5673,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -4761,7 +5795,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -4770,31 +5825,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -4802,30 +5840,18 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -4833,7 +5859,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -4844,18 +5870,20 @@ Configuration files: $config_files Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -4866,60 +5894,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -4935,30 +5945,44 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 - - - +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; - "tcl.hpj" ) CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; + "tcl.hpj") CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -4968,399 +5992,519 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@AR@,$AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@RC@,$RC,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@CYGPATH@,$CYGPATH,;t t -s,@CELIB_DIR@,$CELIB_DIR,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_DLL_FILE@,$TCL_DLL_FILE,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t -s,@TCL_DBGX@,$TCL_DBGX,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t -s,@DEPARG@,$DEPARG,;t t -s,@CC_OBJNAME@,$CC_OBJNAME,;t t -s,@CC_EXENAME@,$CC_EXENAME,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@LDFLAGS_CONSOLE@,$LDFLAGS_CONSOLE,;t t -s,@LDFLAGS_WINDOW@,$LDFLAGS_WINDOW,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LIBS_GUI@,$LIBS_GUI,;t t -s,@DLLSUFFIX@,$DLLSUFFIX,;t t -s,@LIBPREFIX@,$LIBPREFIX,;t t -s,@LIBSUFFIX@,$LIBSUFFIX,;t t -s,@EXESUFFIX@,$EXESUFFIX,;t t -s,@LIBRARIES@,$LIBRARIES,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@POST_MAKE_LIB@,$POST_MAKE_LIB,;t t -s,@MAKE_DLL@,$MAKE_DLL,;t t -s,@MAKE_EXE@,$MAKE_EXE,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_LD_SEARCH_FLAGS@,$TCL_LD_SEARCH_FLAGS,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_DDE_VERSION@,$TCL_DDE_VERSION,;t t -s,@TCL_DDE_MAJOR_VERSION@,$TCL_DDE_MAJOR_VERSION,;t t -s,@TCL_DDE_MINOR_VERSION@,$TCL_DDE_MINOR_VERSION,;t t -s,@TCL_DDE_PATCH_LEVEL@,$TCL_DDE_PATCH_LEVEL,;t t -s,@TCL_REG_VERSION@,$TCL_REG_VERSION,;t t -s,@TCL_REG_MAJOR_VERSION@,$TCL_REG_MAJOR_VERSION,;t t -s,@TCL_REG_MINOR_VERSION@,$TCL_REG_MINOR_VERSION,;t t -s,@TCL_REG_PATCH_LEVEL@,$TCL_REG_PATCH_LEVEL,;t t -s,@RC_OUT@,$RC_OUT,;t t -s,@RC_TYPE@,$RC_TYPE,;t t -s,@RC_INCLUDE@,$RC_INCLUDE,;t t -s,@RC_DEFINE@,$RC_DEFINE,;t t -s,@RC_DEFINES@,$RC_DEFINES,;t t -s,@RES@,$RES,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF +if test -n "$CONFIG_FILES"; then _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +RC!$RC$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +CYGPATH!$CYGPATH$ac_delim +CELIB_DIR!$CELIB_DIR$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_DLL_FILE!$TCL_DLL_FILE$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim +TCL_DBGX!$TCL_DBGX$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +EXTRA_CFLAGS!$EXTRA_CFLAGS$ac_delim +DEPARG!$DEPARG$ac_delim +CC_OBJNAME!$CC_OBJNAME$ac_delim +CC_EXENAME!$CC_EXENAME$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +LDFLAGS_CONSOLE!$LDFLAGS_CONSOLE$ac_delim +LDFLAGS_WINDOW!$LDFLAGS_WINDOW$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LIBS_GUI!$LIBS_GUI$ac_delim +DLLSUFFIX!$DLLSUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +LIBPREFIX!$LIBPREFIX$ac_delim +LIBSUFFIX!$LIBSUFFIX$ac_delim +EXESUFFIX!$EXESUFFIX$ac_delim +LIBRARIES!$LIBRARIES$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +POST_MAKE_LIB!$POST_MAKE_LIB$ac_delim +MAKE_DLL!$MAKE_DLL$ac_delim +MAKE_EXE!$MAKE_EXE$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_LD_SEARCH_FLAGS!$TCL_LD_SEARCH_FLAGS$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_DDE_VERSION!$TCL_DDE_VERSION$ac_delim +TCL_DDE_MAJOR_VERSION!$TCL_DDE_MAJOR_VERSION$ac_delim +TCL_DDE_MINOR_VERSION!$TCL_DDE_MINOR_VERSION$ac_delim +TCL_DDE_PATCH_LEVEL!$TCL_DDE_PATCH_LEVEL$ac_delim +TCL_REG_VERSION!$TCL_REG_VERSION$ac_delim +TCL_REG_MAJOR_VERSION!$TCL_REG_MAJOR_VERSION$ac_delim +TCL_REG_MINOR_VERSION!$TCL_REG_MINOR_VERSION$ac_delim +TCL_REG_PATCH_LEVEL!$TCL_REG_PATCH_LEVEL$ac_delim +RC_OUT!$RC_OUT$ac_delim +RC_TYPE!$RC_TYPE$ac_delim +RC_INCLUDE!$RC_INCLUDE$ac_delim +RC_DEFINE!$RC_DEFINE$ac_delim +RC_DEFINES!$RC_DEFINES$ac_delim +RES!$RES$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF + + esac + +done # for ac_tag + { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 007218ef3654c34fefcef0a00be1ee7619292f5c Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 14 Dec 2008 13:51:29 +0000 Subject: Added constraints --- ChangeLog | 3 +++ tests/zlib.test | 38 ++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b3c128..4cac956 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-12-14 Donal K. Fellows + * tests/zlib.test: Added constraint so that tests don't fail where + they cannot work due to zlib support being missing. + * unix/configure.in, win/configure.in: Improve the autodetection code. * win/tcl.m4 (SC_CONFIG_CFLAGS): Remove the assumption of the presence of zlib library on Windows. diff --git a/tests/zlib.test b/tests/zlib.test index 3f88565..1cb1676 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,65 +10,67 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.3 2008/12/13 09:19:06 dkf Exp $ +# RCS: @(#) $Id: zlib.test,v 1.4 2008/12/14 13:51:29 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 namespace import -force ::tcltest::* } + +testConstraint zlib [llength [info commands zlib]] -test zlib-1.1 {zlib basics} -returnCodes error -body { +test zlib-1.1 {zlib basics} -constraints zlib -returnCodes error -body { zlib } -result {wrong # args: should be "zlib command arg ?...?"} -test zlib-1.2 {zlib basics} -returnCodes error -body { +test zlib-1.2 {zlib basics} -constraints zlib -returnCodes error -body { zlib ? {} } -result {bad command "?": must be adler32, compress, crc32, decompress, deflate, gunzip, gzip, inflate, push, or stream} -test zlib-2.1 {zlib compress/decompress} { +test zlib-2.1 {zlib compress/decompress} zlib { zlib decompress [zlib compress abcdefghijklm] } abcdefghijklm -test zlib-3.1 {zlib deflate/inflate} { +test zlib-3.1 {zlib deflate/inflate} zlib { zlib inflate [zlib deflate abcdefghijklm] } abcdefghijklm -test zlib-4.1 {zlib gzip/gunzip} { +test zlib-4.1 {zlib gzip/gunzip} zlib { zlib gunzip [zlib gzip abcdefghijklm] } abcdefghijklm -test zlib-4.2 {zlib gzip/gunzip} { +test zlib-4.2 {zlib gzip/gunzip} zlib { set s [string repeat abcdef 5] list [zlib gunzip [zlib gzip $s -header {comment gorp}] -header head] \ [dict get $head comment] [dict get $head size] } {abcdefabcdefabcdefabcdefabcdef gorp 30} -test zlib-5.1 {zlib adler32} { +test zlib-5.1 {zlib adler32} zlib { format %x [zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde] } b3b50b9b -test zlib-5.2 {zlib adler32} { +test zlib-5.2 {zlib adler32} zlib { format %x [zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde 42] } b8830bc4 -test zlib-5.3 {zlib adler32} -returnCodes error -body { +test zlib-5.3 {zlib adler32} -constraints zlib -returnCodes error -body { zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde 42 x } -result {wrong # args: should be "zlib adler32 data ?startValue?"} -test zlib-6.1 {zlib crc32} { +test zlib-6.1 {zlib crc32} zlib { format %x [zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde] } 6f73e901 -test zlib-6.2 {zlib crc32} { +test zlib-6.2 {zlib crc32} zlib { format %x [zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42] } ce1c4914 -test zlib-6.3 {zlib crc32} -returnCodes error -body { +test zlib-6.3 {zlib crc32} -constraints zlib -returnCodes error -body { zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42 x } -result {wrong # args: should be "zlib crc32 data ?startValue?"} -test zlib-7.0 {zlib stream} -returnCodes error -setup { +test zlib-7.0 {zlib stream} -constraints zlib -returnCodes error -setup { set s [zlib stream compress] } -body { $s ? } -cleanup { $s close } -result {bad option "?": must be add, adler32, close, eof, finalize, flush, fullflush, get, put, or reset} -test zlib-7.1 {zlib stream} { +test zlib-7.1 {zlib stream} zlib { set s [zlib stream compress] $s put -finalize abcdeEDCBA set data [$s get] @@ -76,7 +78,7 @@ test zlib-7.1 {zlib stream} { $s close lappend result [zlib decompress $data] } {{} 136f033f abcdeEDCBA} -test zlib-7.2 {zlib stream} { +test zlib-7.2 {zlib stream} zlib { set s [zlib stream decompress] $s put -finalize [zlib compress abcdeEDCBA] set data [$s get] @@ -84,7 +86,7 @@ test zlib-7.2 {zlib stream} { $s close lappend result $data } {{} 136f033f abcdeEDCBA} -test zlib-7.3 {zlib stream} { +test zlib-7.3 {zlib stream} zlib { set s [zlib stream deflate] $s put -finalize abcdeEDCBA set data [$s get] @@ -92,7 +94,7 @@ test zlib-7.3 {zlib stream} { $s close lappend result [zlib inflate $data] } {{} 1 abcdeEDCBA} -test zlib-7.4 {zlib stream} { +test zlib-7.4 {zlib stream} zlib { set s [zlib stream inflate] $s put -finalize [zlib deflate abcdeEDCBA] set data [$s get] -- cgit v0.12 From c29cb5899da9fe432c45c9f06e40725978f7e3ec Mon Sep 17 00:00:00 2001 From: das Date: Sun, 14 Dec 2008 15:10:22 +0000 Subject: fix warnings --- generic/tclZlib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 00d54e6..305bcd9 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.10 2008/12/13 17:36:34 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.11 2008/12/14 15:10:22 das Exp $ */ #include "tclInt.h" @@ -1404,8 +1404,8 @@ ZlibCmd( int objc, Tcl_Obj *const objv[]) { - int command, dlen, mode, format, i, option; - unsigned start, level = -1, buffersize = 0; + int command, dlen, mode, format, i, option, level = -1; + unsigned start, buffersize = 0; Tcl_ZlibStream zh; Byte *data; Tcl_Obj *obj = Tcl_GetObjResult(interp); @@ -1479,7 +1479,7 @@ ZlibCmd( return TCL_ERROR; } if (objc > 3) { - if (Tcl_GetIntFromObj(interp, objv[3], (int *)&level) != TCL_OK) { + if (Tcl_GetIntFromObj(interp, objv[3], &level) != TCL_OK) { return TCL_ERROR; } if (level < 0 || level > 9) { @@ -1495,7 +1495,7 @@ ZlibCmd( return TCL_ERROR; } if (objc > 3) { - if (Tcl_GetIntFromObj(interp, objv[3], (int *)&level) != TCL_OK) { + if (Tcl_GetIntFromObj(interp, objv[3], &level) != TCL_OK) { return TCL_ERROR; } if (level < 0 || level > 9) { @@ -1527,7 +1527,7 @@ ZlibCmd( break; case 1: if (Tcl_GetIntFromObj(interp, objv[i+1], - (int *)&level) != TCL_OK) { + &level) != TCL_OK) { return TCL_ERROR; } if (level < 0 || level > 9) { -- cgit v0.12 From bd55b3a2a17cc2836db9251377e84a5cdeb49936 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 14 Dec 2008 15:10:38 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 341e47f..c665bda 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -244,6 +244,9 @@ /* Is weak import available? */ #undef HAVE_WEAK_IMPORT +/* Is there an installed zlib? */ +#undef HAVE_ZLIB + /* Is this a Mac I see before me? */ #undef MAC_OSX_TCL -- cgit v0.12 From a9acaa7613d6dc4d271a5af9d80f4a36b647b898 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 14 Dec 2008 15:10:56 +0000 Subject: add new zlib files --- macosx/Tcl.xcodeproj/project.pbxproj | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 66a9799..de97a9c 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -187,6 +187,8 @@ /* Begin PBXFileReference section */ 8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; }; + F915432A0EF201CF0032D1E8 /* zlib.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = zlib.test; sourceTree = ""; }; + F915432D0EF201EE0032D1E8 /* zlib.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = zlib.n; sourceTree = ""; }; F91DC23C0E44C51B002CB8D1 /* nre.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = nre.test; sourceTree = ""; }; F91DC23D0E44C530002CB8D1 /* unsupported.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unsupported.test; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; @@ -940,6 +942,7 @@ F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Debug.xcconfig"; sourceTree = ""; }; F9903CAF094FAADA004613E9 /* tclTomMath.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclTomMath.decls; sourceTree = ""; }; F9903CB0094FAADA004613E9 /* tclTomMathDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclTomMathDecls.h; sourceTree = ""; }; + F99D61180EF5573A00BBFE01 /* TclZlib.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TclZlib.3; sourceTree = ""; }; F9A3084B08F2D4CE00BAE1AB /* tclsh */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tclsh; sourceTree = BUILT_PRODUCTS_DIR; }; F9A3084E08F2D4F400BAE1AB /* Tcl.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = Tcl.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F9A493240CEBF38300B78AE2 /* chanio.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = chanio.test; sourceTree = ""; }; @@ -974,7 +977,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.41 2008/12/11 05:21:21 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.42 2008/12/14 15:10:56 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1210,6 +1213,7 @@ F96D3EAB08F272A7004A47F5 /* SubstObj.3 */, F96D3EAC08F272A7004A47F5 /* switch.n */, F96D3EAD08F272A7004A47F5 /* Tcl.n */, + F99D61180EF5573A00BBFE01 /* TclZlib.3 */, F96D3EAE08F272A7004A47F5 /* Tcl_Main.3 */, F96D3EAF08F272A7004A47F5 /* TCL_MEM_DEBUG.3 */, F96D3EB008F272A7004A47F5 /* tclsh.1 */, @@ -1237,6 +1241,7 @@ F96D3EC608F272A7004A47F5 /* vwait.n */, F96D3EC708F272A7004A47F5 /* while.n */, F96D3EC808F272A7004A47F5 /* WrongNumArgs.3 */, + F915432D0EF201EE0032D1E8 /* zlib.n */, ); path = doc; sourceTree = ""; @@ -1755,6 +1760,7 @@ F96D43CD08F272B7004A47F5 /* winNotify.test */, F96D43CE08F272B7004A47F5 /* winPipe.test */, F96D43CF08F272B7004A47F5 /* winTime.test */, + F915432A0EF201CF0032D1E8 /* zlib.test */, ); path = tests; sourceTree = ""; -- cgit v0.12 From f846544ae625a6ea36e4a75e8f5f6caf47d6242c Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 15 Dec 2008 15:48:33 +0000 Subject: TIP #338 IMPLEMENTATION * doc/AppInit.c: Made routines Tcl_SetStartupScript and * doc/Tcl_Main.3: Tcl_GetStartupScript public. Removed all * generic/tcl.h: internal stub access to Tcl*Startup* routines, * generic/tclInt.decls: and removed their implementations. Their * generic/tclMain.c: function can now be completely performed with the new public interface. *** POTENTIAL INCOMPATIBILITY for callers of the internal Tcl*Startup* routines. *** * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: --- ChangeLog | 18 ++++++- doc/AppInit.3 | 10 +++- doc/Tcl_Main.3 | 82 +++++++++++++++++++++------- generic/tcl.h | 5 +- generic/tclInt.decls | 43 ++++++++------- generic/tclIntDecls.h | 81 +++++++--------------------- generic/tclMain.c | 147 ++++++++++---------------------------------------- generic/tclStubInit.c | 14 ++--- 8 files changed, 172 insertions(+), 228 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4cac956..5aa4aa3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-12-15 Don Porter + + TIP #338 IMPLEMENTATION + + * doc/AppInit.c: Made routines Tcl_SetStartupScript and + * doc/Tcl_Main.3: Tcl_GetStartupScript public. Removed all + * generic/tcl.h: internal stub access to Tcl*Startup* routines, + * generic/tclInt.decls: and removed their implementations. Their + * generic/tclMain.c: function can now be completely performed with + the new public interface. + *** POTENTIAL INCOMPATIBILITY for callers of the internal + Tcl*Startup* routines. *** + + * generic/tclIntDecls.h: make genstubs + * generic/tclStubInit.c: + 2008-12-14 Donal K. Fellows * tests/zlib.test: Added constraint so that tests don't fail where @@ -152,7 +168,7 @@ * generic/tclInterp.c: * generic/tclTimer.c: *** POTENTIAL INCOMPATIBILITY only for extensions using the converted - internal routine *** + internal routine *** 2008-12-09 Donal K. Fellows diff --git a/doc/AppInit.3 b/doc/AppInit.3 index 15d5635..bd3c665 100644 --- a/doc/AppInit.3 +++ b/doc/AppInit.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AppInit.3,v 1.10 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: AppInit.3,v 1.11 2008/12/15 15:48:33 dgp Exp $ '\" .so man.macros .TH Tcl_AppInit 3 7.0 Tcl "Tcl Library Procedures" @@ -50,6 +50,11 @@ Process command-line arguments, which can be accessed from the Tcl variables \fBargv\fR and \fBargv0\fR in \fIinterp\fR. .IP [3] Invoke a startup script to initialize the application. +.IP [4] +Use the routines \fBTcl_SetStartupScript\fR and +\fBTcl_GetStartupScript\fR to set or query the file and encoding +that the active \fBTcl_Main\fR or \fBTk_Main\fR routine will +use as a startup script. .LP \fBTcl_AppInit\fR returns \fBTCL_OK\fR or \fBTCL_ERROR\fR. If it returns \fBTCL_ERROR\fR then it must leave an error message in @@ -73,5 +78,8 @@ The best way to get started is to make a copy of the file It already contains a \fBmain\fR procedure and a template for \fBTcl_AppInit\fR that you can modify for your application. +.SH "SEE ALSO" +Tcl_Main(3) + .SH KEYWORDS application, argument, command, initialization, interpreter diff --git a/doc/Tcl_Main.3 b/doc/Tcl_Main.3 index 462a4de..cca8158 100644 --- a/doc/Tcl_Main.3 +++ b/doc/Tcl_Main.3 @@ -6,19 +6,24 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl_Main.3,v 1.18 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: Tcl_Main.3,v 1.19 2008/12/15 15:48:33 dgp Exp $ '\" .so man.macros .TH Tcl_Main 3 8.4 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_Main, Tcl_SetMainLoop \- main program and event loop definition for Tcl-based applications +Tcl_Main, Tcl_SetStartupScript, Tcl_GetStartupScript, Tcl_SetMainLoop \- main program, startup script, and event loop definition for Tcl-based applications .SH SYNOPSIS .nf \fB#include \fR .sp \fBTcl_Main\fR(\fIargc, argv, appInitProc\fR) .sp +\fBTcl_SetStartupScript\fR(\fIpath, encoding\fR) +.sp +Tcl_Obj * +\fBTcl_GetStartupScript\fR(\fIencodingPtr\fR) +.sp \fBTcl_SetMainLoop\fR(\fImainLoopProc\fR) .SH ARGUMENTS .AS Tcl_MainLoopProc *mainLoopProc @@ -29,6 +34,13 @@ Array of strings containing command-line arguments. .AP Tcl_AppInitProc *appInitProc in Address of an application-specific initialization procedure. The value for this argument is usually \fBTcl_AppInit\fR. +.AP Tcl_Obj *path in +Name of file to use as startup script, or NULL. +.AP "const char" *encoding in +Encoding of file to use as startup script, or NULL. +.AP "const char" **encodingPtr out +If non-NULL, location to write a copy of the (const char *) +pointing to the encoding name. .AP Tcl_MainLoopProc *mainLoopProc in Address of an application-specific event loop procedure. .BE @@ -76,17 +88,46 @@ restriction is not a problem with normal use described above. channels to their default values. See \fBTcl_StandardChannels\fR for more information. .PP -\fBTcl_Main\fR supports two modes of operation, depending on the -values of \fIargc\fR and \fIargv\fR. If the first few arguments -in \fIargv\fR match ?\fB\-encoding \fIname\fR? ?\fIfileName\fR?, +\fBTcl_Main\fR supports two modes of operation, depending on +whether the filename and encoding of a startup script has been +established. The routines \fBTcl_SetStartupScript\fR and +\fBTcl_GetStartupScript\fR are the tools for controlling this +configuration of \fBTcl_Main\fR. +.PP +\fBTcl_SetStartupScript\fR registers the value \fIpath\fR +as the name of the file for \fBTcl_Main\fR to evaluate as +its startup script. The value \fIencoding\fR is Tcl's name +for the encoding used to store the text in that file. A +value of \fBNULL\fR for \fIencoding\fR is a signal to use +the system encoding. A value of \fBNULL\fR for \fIpath\fR +erases any existing registration so that \fBTcl_Main\fR +will not evaluate any startup script. +.PP +\fBTcl_GetStartupScript\fR queries the registered file name +and encoding set by the most recent \fBTcl_SetStartupScript\fR +call in the same thread. The stored file name is returned, +and the stored encoding name is written to space pointed to +by \fIencodingPtr\fR, when that is not NULL. +.PP +The file name and encoding values managed by the routines +\fBTcl_SetStartupScript\fR and \fBTcl_GetStartupScript\fR +are stored per-thread. Although the storage and retrieval +functions of these routines work in any thread, only those +calls in the same master thread as \fBTcl_Main\fR can have +any influence on it. +.PP +The caller of \fBTcl_Main\fR may call \fBTcl_SetStartupScript\fR +first to establish its desired startup script. If \fBTcl_Main\fR +finds that no such startup script has been established, it consults +the first few arguments in \fIargv\fR. If they match +?\fB\-encoding \fIname\fR? \fIfileName\fR, where \fIfileName\fR does not begin with the character \fI\-\fR, then \fIfileName\fR is taken to be the name of a file containing a \fIstartup script\fR, and \fIname\fR is taken to be the name -of the encoding of the contents of that file, which \fBTcl_Main\fR -will attempt to evaluate. Otherwise, \fBTcl_Main\fR will enter an -interactive mode. +of the encoding of the contents of that file. \fBTcl_Main\fR +then calls \fRTcl_SetStartupScript\fR with these values. .PP -In either mode, \fBTcl_Main\fR will define in its master interpreter +\fBTcl_Main\fR then defines in its master interpreter the Tcl variables \fIargc\fR, \fIargv\fR, \fIargv0\fR, and \fItcl_interactive\fR, as described in the documentation for \fBtclsh\fR. .PP @@ -96,8 +137,10 @@ commands, \fBTcl_Main\fR calls the procedure given by the .QW hook for the application to perform its own initialization of the interpreter created by \fBTcl_Main\fR, such as defining application-specific -commands. The procedure must have an interface that matches the -type \fBTcl_AppInitProc\fR: +commands. The application initialization routine might also +call \fBTcl_SetStartupScript\fR to (re-)set the file and encoding +to be used as a startup script. The procedure must have an interface +that matches the type \fBTcl_AppInitProc\fR: .PP .CS typedef int \fBTcl_AppInitProc\fR( @@ -107,13 +150,14 @@ typedef int \fBTcl_AppInitProc\fR( \fIAppInitProc\fR is almost always a pointer to \fBTcl_AppInit\fR; for more details on this procedure, see the documentation for \fBTcl_AppInit\fR. .PP -When the \fIappInitProc\fR is finished, \fBTcl_Main\fR enters one -of its two modes. If a startup script has been provided, \fBTcl_Main\fR -attempts to evaluate it. Otherwise, interactive mode begins with -examination of the variable \fItcl_rcFileName\fR in the master -interpreter. If that variable exists and holds the name of a readable -file, the contents of that file are evaluated in the master interpreter. -Then interactive operations begin, +When the \fIappInitProc\fR is finished, \fBTcl_Main\fR calls +\fBTcl_GetStartupScript\fR to determine what startup script has +been requested, if any. If a startup script has been provided, +\fBTcl_Main\fR attempts to evaluate it. Otherwise, interactive +mode begins with examination of the variable \fItcl_rcFileName\fR +in the master interpreter. If that variable exists and holds the +name of a readable file, the contents of that file are evaluated +in the master interpreter. Then interactive operations begin, with prompts and command evaluation results written to the standard output channel, and commands read from the standard input channel and then evaluated. The prompts written to the standard output @@ -148,6 +192,6 @@ procedure (if any) returns, \fBTcl_Main\fR will also evaluate the \fBexit\fR command. .SH "SEE ALSO" tclsh(1), Tcl_GetStdChannel(3), Tcl_StandardChannels(3), Tcl_AppInit(3), -exit(n) +exit(n), encoding(n) .SH KEYWORDS application-specific initialization, command-line arguments, main program diff --git a/generic/tcl.h b/generic/tcl.h index 7ff25c7..844dbcb 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.281 2008/12/11 01:21:52 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.282 2008/12/15 15:48:33 dgp Exp $ */ #ifndef _TCL @@ -2339,6 +2339,9 @@ EXTERN const char * TclTomMathInitializeStubs (Tcl_Interp *interp, EXTERN void Tcl_Main (int argc, char **argv, Tcl_AppInitProc *appInitProc); +EXTERN void Tcl_SetStartupScript(Tcl_Obj *path, + const char *encoding); +EXTERN Tcl_Obj * Tcl_GetStartupScript(const char **encodingPtr); EXTERN const char * Tcl_PkgInitStubsCheck (Tcl_Interp *interp, const char *version, int exact); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index bdc71ad..54f8948 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.131 2008/12/09 21:47:08 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.132 2008/12/15 15:48:33 dgp Exp $ library tcl @@ -624,12 +624,14 @@ declare 156 generic { declare 157 generic { Var *TclVarTraceExists(Tcl_Interp *interp, const char *varName) } -declare 158 generic { - void TclSetStartupScriptFileName(const char *filename) -} -declare 159 generic { - CONST84_RETURN char *TclGetStartupScriptFileName(void) -} +# REMOVED - use public Tcl_SetStartupPath() +#declare 158 generic { +# void TclSetStartupScriptFileName(const char *filename) +#} +# REMOVED - use public Tcl_GetStartupPath() +#declare 159 generic { +# CONST84_RETURN char *TclGetStartupScriptFileName(void) +#} #declare 160 generic { # int TclpMatchFilesTypes(Tcl_Interp *interp, char *separators, # Tcl_DString *dirPtr, char *pattern, char *tail, @@ -674,12 +676,14 @@ declare 166 generic { } # VFS-aware versions of Tcl*StartupScriptFileName (158 and 159 above) -declare 167 generic { - void TclSetStartupScriptPath(Tcl_Obj *pathPtr) -} -declare 168 generic { - Tcl_Obj *TclGetStartupScriptPath(void) -} +# REMOVED - use public Tcl_SetStartupPath() +#declare 167 generic { +# void TclSetStartupScriptPath(Tcl_Obj *pathPtr) +#} +# REMOVED - use public Tcl_GetStartupPath() +#declare 168 generic { +# Tcl_Obj *TclGetStartupScriptPath(void) +#} # variant of Tcl_UtfNCmp that takes n as bytes, not chars declare 169 generic { int TclpUtfNcmp2(const char *s1, const char *s2, unsigned long n) @@ -725,12 +729,13 @@ declare 177 generic { void TclVarErrMsg(Tcl_Interp *interp, const char *part1, const char *part2, const char *operation, const char *reason) } -declare 178 generic { - void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char* encodingName) -} -declare 179 generic { - Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr) -} +# TIP 338 made these public - now declared in tcl.h +#declare 178 generic { +# void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char* encodingName) +#} +#declare 179 generic { +# Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr) +#} # REMOVED # Allocate lists without copying arrays diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index b2f45b1..6367064 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.127 2008/12/09 21:47:08 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.128 2008/12/15 15:48:33 dgp Exp $ */ #ifndef _TCLINTDECLS @@ -741,16 +741,8 @@ EXTERN void TclRegError (Tcl_Interp * interp, const char * msg, EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, const char * varName); #endif -#ifndef TclSetStartupScriptFileName_TCL_DECLARED -#define TclSetStartupScriptFileName_TCL_DECLARED -/* 158 */ -EXTERN void TclSetStartupScriptFileName (const char * filename); -#endif -#ifndef TclGetStartupScriptFileName_TCL_DECLARED -#define TclGetStartupScriptFileName_TCL_DECLARED -/* 159 */ -EXTERN CONST84_RETURN char * TclGetStartupScriptFileName (void); -#endif +/* Slot 158 is reserved */ +/* Slot 159 is reserved */ /* Slot 160 is reserved */ #ifndef TclChannelTransform_TCL_DECLARED #define TclChannelTransform_TCL_DECLARED @@ -786,16 +778,8 @@ EXTERN int TclListObjSetElement (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); #endif -#ifndef TclSetStartupScriptPath_TCL_DECLARED -#define TclSetStartupScriptPath_TCL_DECLARED -/* 167 */ -EXTERN void TclSetStartupScriptPath (Tcl_Obj * pathPtr); -#endif -#ifndef TclGetStartupScriptPath_TCL_DECLARED -#define TclGetStartupScriptPath_TCL_DECLARED -/* 168 */ -EXTERN Tcl_Obj * TclGetStartupScriptPath (void); -#endif +/* Slot 167 is reserved */ +/* Slot 168 is reserved */ #ifndef TclpUtfNcmp2_TCL_DECLARED #define TclpUtfNcmp2_TCL_DECLARED /* 169 */ @@ -851,17 +835,8 @@ EXTERN void TclVarErrMsg (Tcl_Interp * interp, const char * part1, const char * part2, const char * operation, const char * reason); #endif -#ifndef Tcl_SetStartupScript_TCL_DECLARED -#define Tcl_SetStartupScript_TCL_DECLARED -/* 178 */ -EXTERN void Tcl_SetStartupScript (Tcl_Obj * pathPtr, - const char* encodingName); -#endif -#ifndef Tcl_GetStartupScript_TCL_DECLARED -#define Tcl_GetStartupScript_TCL_DECLARED -/* 179 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingNamePtr); -#endif +/* Slot 178 is reserved */ +/* Slot 179 is reserved */ /* Slot 180 is reserved */ /* Slot 181 is reserved */ #ifndef TclpLocaltime_TCL_DECLARED @@ -1294,8 +1269,8 @@ typedef struct TclIntStubs { void *reserved155; void (*tclRegError) (Tcl_Interp * interp, const char * msg, int status); /* 156 */ Var * (*tclVarTraceExists) (Tcl_Interp * interp, const char * varName); /* 157 */ - void (*tclSetStartupScriptFileName) (const char * filename); /* 158 */ - CONST84_RETURN char * (*tclGetStartupScriptFileName) (void); /* 159 */ + void *reserved158; + void *reserved159; void *reserved160; int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ @@ -1303,8 +1278,8 @@ typedef struct TclIntStubs { void (*tclExpandCodeArray) (void * envPtr); /* 164 */ void (*tclpSetInitialEncodings) (void); /* 165 */ int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ - void (*tclSetStartupScriptPath) (Tcl_Obj * pathPtr); /* 167 */ - Tcl_Obj * (*tclGetStartupScriptPath) (void); /* 168 */ + void *reserved167; + void *reserved168; int (*tclpUtfNcmp2) (const char * s1, const char * s2, unsigned long n); /* 169 */ int (*tclCheckInterpTraces) (Tcl_Interp * interp, const char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 170 */ int (*tclCheckExecutionTraces) (Tcl_Interp * interp, const char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 171 */ @@ -1314,8 +1289,8 @@ typedef struct TclIntStubs { int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, const char * part1, const char * part2, int flags, int leaveErrMsg); /* 175 */ void (*tclCleanupVar) (Var * varPtr, Var * arrayPtr); /* 176 */ void (*tclVarErrMsg) (Tcl_Interp * interp, const char * part1, const char * part2, const char * operation, const char * reason); /* 177 */ - void (*tcl_SetStartupScript) (Tcl_Obj * pathPtr, const char* encodingName); /* 178 */ - Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingNamePtr); /* 179 */ + void *reserved178; + void *reserved179; void *reserved180; void *reserved181; struct tm * (*tclpLocaltime) (const time_t * clock); /* 182 */ @@ -1885,14 +1860,8 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclVarTraceExists \ (tclIntStubsPtr->tclVarTraceExists) /* 157 */ #endif -#ifndef TclSetStartupScriptFileName -#define TclSetStartupScriptFileName \ - (tclIntStubsPtr->tclSetStartupScriptFileName) /* 158 */ -#endif -#ifndef TclGetStartupScriptFileName -#define TclGetStartupScriptFileName \ - (tclIntStubsPtr->tclGetStartupScriptFileName) /* 159 */ -#endif +/* Slot 158 is reserved */ +/* Slot 159 is reserved */ /* Slot 160 is reserved */ #ifndef TclChannelTransform #define TclChannelTransform \ @@ -1918,14 +1887,8 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclListObjSetElement \ (tclIntStubsPtr->tclListObjSetElement) /* 166 */ #endif -#ifndef TclSetStartupScriptPath -#define TclSetStartupScriptPath \ - (tclIntStubsPtr->tclSetStartupScriptPath) /* 167 */ -#endif -#ifndef TclGetStartupScriptPath -#define TclGetStartupScriptPath \ - (tclIntStubsPtr->tclGetStartupScriptPath) /* 168 */ -#endif +/* Slot 167 is reserved */ +/* Slot 168 is reserved */ #ifndef TclpUtfNcmp2 #define TclpUtfNcmp2 \ (tclIntStubsPtr->tclpUtfNcmp2) /* 169 */ @@ -1959,14 +1922,8 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclVarErrMsg \ (tclIntStubsPtr->tclVarErrMsg) /* 177 */ #endif -#ifndef Tcl_SetStartupScript -#define Tcl_SetStartupScript \ - (tclIntStubsPtr->tcl_SetStartupScript) /* 178 */ -#endif -#ifndef Tcl_GetStartupScript -#define Tcl_GetStartupScript \ - (tclIntStubsPtr->tcl_GetStartupScript) /* 179 */ -#endif +/* Slot 178 is reserved */ +/* Slot 179 is reserved */ /* Slot 180 is reserved */ /* Slot 181 is reserved */ #ifndef TclpLocaltime diff --git a/generic/tclMain.c b/generic/tclMain.c index 4326c3a..f735493 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMain.c,v 1.46 2008/10/02 23:36:12 dkf Exp $ + * RCS: @(#) $Id: tclMain.c,v 1.47 2008/12/15 15:48:33 dgp Exp $ */ #include "tclInt.h" @@ -32,8 +32,15 @@ extern CRTIMPORT int isatty(int fd); -static Tcl_Obj *tclStartupScriptPath = NULL; -static Tcl_Obj *tclStartupScriptEncoding = NULL; +typedef struct StartupScript { + Tcl_Obj *path; /* The filename of the script for *_Main() routines + * to [source] as a startup script, or NULL for + * none set, meaning enter interactive mode. */ + Tcl_Obj *encoding; /* The encoding of the startup script file. */ +} StartupScript; + +static Tcl_ThreadDataKey startupScriptKey; + static Tcl_MainLoopProc *mainLoopProc = NULL; /* @@ -89,25 +96,28 @@ Tcl_SetStartupScript( Tcl_Obj *path, /* Filesystem path of startup script file */ const char *encoding) /* Encoding of the data in that file */ { + StartupScript *scriptPtr = Tcl_GetThreadData(&startupScriptKey, + (int) sizeof(StartupScript)); Tcl_Obj *newEncoding = NULL; + if (encoding != NULL) { newEncoding = Tcl_NewStringObj(encoding, -1); } - if (tclStartupScriptPath != NULL) { - Tcl_DecrRefCount(tclStartupScriptPath); + if (scriptPtr->path != NULL) { + Tcl_DecrRefCount(scriptPtr->path); } - tclStartupScriptPath = path; - if (tclStartupScriptPath != NULL) { - Tcl_IncrRefCount(tclStartupScriptPath); + scriptPtr->path = path; + if (scriptPtr->path != NULL) { + Tcl_IncrRefCount(scriptPtr->path); } - if (tclStartupScriptEncoding != NULL) { - Tcl_DecrRefCount(tclStartupScriptEncoding); + if (scriptPtr->encoding != NULL) { + Tcl_DecrRefCount(scriptPtr->encoding); } - tclStartupScriptEncoding = newEncoding; - if (tclStartupScriptEncoding != NULL) { - Tcl_IncrRefCount(tclStartupScriptEncoding); + scriptPtr->encoding = newEncoding; + if (scriptPtr->encoding != NULL) { + Tcl_IncrRefCount(scriptPtr->encoding); } } @@ -138,116 +148,17 @@ Tcl_GetStartupScript( * registered encoding name for the startup * script */ { + StartupScript *scriptPtr = Tcl_GetThreadData(&startupScriptKey, + (int) sizeof(StartupScript)); + if (encodingPtr != NULL) { - if (tclStartupScriptEncoding == NULL) { + if (scriptPtr->encoding == NULL) { *encodingPtr = NULL; } else { - *encodingPtr = Tcl_GetString(tclStartupScriptEncoding); + *encodingPtr = Tcl_GetString(scriptPtr->encoding); } } - return tclStartupScriptPath; -} - -/* - *---------------------------------------------------------------------- - * - * TclSetStartupScriptPath -- - * - * Primes the startup script VFS path, used to override the command line - * processing. - * - * Results: - * None. - * - * Side effects: - * This function initializes the VFS path of the Tcl script to run at - * startup. - * - *---------------------------------------------------------------------- - */ - -void -TclSetStartupScriptPath( - Tcl_Obj *path) -{ - Tcl_SetStartupScript(path, NULL); -} - -/* - *---------------------------------------------------------------------- - * - * TclGetStartupScriptPath -- - * - * Gets the startup script VFS path, used to override the command line - * processing. - * - * Results: - * The startup script VFS path, NULL if none has been set. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -Tcl_Obj * -TclGetStartupScriptPath(void) -{ - return Tcl_GetStartupScript(NULL); -} - -/* - *---------------------------------------------------------------------- - * - * TclSetStartupScriptFileName -- - * - * Primes the startup script file name, used to override the command line - * processing. - * - * Results: - * None. - * - * Side effects: - * This function initializes the file name of the Tcl script to run at - * startup. - * - *---------------------------------------------------------------------- - */ - -void -TclSetStartupScriptFileName( - const char *fileName) -{ - Tcl_Obj *path = Tcl_NewStringObj(fileName,-1); - Tcl_SetStartupScript(path, NULL); -} - -/* - *---------------------------------------------------------------------- - * - * TclGetStartupScriptFileName -- - * - * Gets the startup script file name, used to override the command line - * processing. - * - * Results: - * The startup script file name, NULL if none has been set. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -const char * -TclGetStartupScriptFileName(void) -{ - Tcl_Obj *path = Tcl_GetStartupScript(NULL); - - if (path == NULL) { - return NULL; - } - return Tcl_GetString(path); + return scriptPtr->path; } /*---------------------------------------------------------------------- diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index d953edf..d64f061 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.173 2008/12/11 14:17:23 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.174 2008/12/15 15:48:33 dgp Exp $ */ #include "tclInt.h" @@ -227,8 +227,8 @@ static const TclIntStubs tclIntStubs = { NULL, /* 155 */ TclRegError, /* 156 */ TclVarTraceExists, /* 157 */ - TclSetStartupScriptFileName, /* 158 */ - TclGetStartupScriptFileName, /* 159 */ + NULL, /* 158 */ + NULL, /* 159 */ NULL, /* 160 */ TclChannelTransform, /* 161 */ TclChannelEventScriptInvoker, /* 162 */ @@ -236,8 +236,8 @@ static const TclIntStubs tclIntStubs = { TclExpandCodeArray, /* 164 */ TclpSetInitialEncodings, /* 165 */ TclListObjSetElement, /* 166 */ - TclSetStartupScriptPath, /* 167 */ - TclGetStartupScriptPath, /* 168 */ + NULL, /* 167 */ + NULL, /* 168 */ TclpUtfNcmp2, /* 169 */ TclCheckInterpTraces, /* 170 */ TclCheckExecutionTraces, /* 171 */ @@ -247,8 +247,8 @@ static const TclIntStubs tclIntStubs = { TclCallVarTraces, /* 175 */ TclCleanupVar, /* 176 */ TclVarErrMsg, /* 177 */ - Tcl_SetStartupScript, /* 178 */ - Tcl_GetStartupScript, /* 179 */ + NULL, /* 178 */ + NULL, /* 179 */ NULL, /* 180 */ NULL, /* 181 */ TclpLocaltime, /* 182 */ -- cgit v0.12 From dde8810e8f2c4a89922d0d36deea83b18e1f93dc Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 15 Dec 2008 17:11:33 +0000 Subject: Fix [Bug 2380293]. Redefine non-strict decoding to ignore only whitespace. --- ChangeLog | 6 ++++++ doc/binary.n | 11 ++++------- generic/tclBinary.c | 9 +++++---- tests/binary.test | 10 +++++++++- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5aa4aa3..0454c6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-15 Alexandre Ferrieux + + * generic/tclBinary.c: Fix [Bug 2380293]. Redefine non-strict + * doc/binary.n: decoding to ignore only whitespace. + * tests/binary.test: + 2008-12-15 Don Porter TIP #338 IMPLEMENTATION diff --git a/doc/binary.n b/doc/binary.n index c5e8a4e..e038fb5 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: binary.n,v 1.43 2008/10/14 22:30:59 dkf Exp $ +'\" RCS: @(#) $Id: binary.n,v 1.44 2008/12/15 17:11:33 ferrieux Exp $ '\" .so man.macros .TH binary n 8.0 Tcl "Tcl Built-In Commands" @@ -73,8 +73,7 @@ During decoding, the following options are supported: .TP \fB\-strict\fR . -Instructs the decoder to throw an error if it encounters any characters that -are not strictly part of the encoding itself. Otherwise it ignores them. +Instructs the decoder to throw an error if it encounters whitespace characters. Otherwise it ignores them. .RE .TP \fBhex\fR @@ -88,8 +87,7 @@ options are supported: .TP \fB\-strict\fR . -Instructs the decoder to throw an error if it encounters any characters that -are not strictly part of the encoding itself. Otherwise it ignores them. +Instructs the decoder to throw an error if it encounters whitespace characters. Otherwise it ignores them. .RE .TP \fBuuencode\fR @@ -118,8 +116,7 @@ During decoding, the following options are supported: .TP \fB\-strict\fR . -Instructs the decoder to throw an error if it encounters any characters that -are not strictly part of the encoding itself. Otherwise it ignores them. +Instructs the decoder to throw an error if it encounters whitespace characters. Otherwise it ignores them. .RE .VE 8.6 .SH "BINARY FORMAT" diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 18c12fa..5e86653 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.51 2008/11/16 17:17:44 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.52 2008/12/15 17:11:34 ferrieux Exp $ */ #include "tclInt.h" @@ -2288,7 +2288,7 @@ BinaryDecodeHex( c = *data++; if (!isxdigit((int) c)) { - if (strict) { + if (strict || !isspace(c)) { goto badChar; } i--; @@ -2499,7 +2499,7 @@ BinaryDecodeUu( if (data < dataend) { d[i] = c = *data++; if (c < 33 || c > 96) { - if (strict) { + if (strict || !isspace(c)) { goto badUu; } i--; @@ -2509,6 +2509,7 @@ BinaryDecodeUu( ++cut; } } + if (cut>3) cut=3; *cursor++ = (((d[0] - 0x20) & 0x3f) << 2) | (((d[1] - 0x20) & 0x3f) >> 4); *cursor++ = (((d[1] - 0x20) & 0x3f) << 4) @@ -2606,7 +2607,7 @@ BinaryDecode64( ++cut; } } else { - if (strict) { + if (strict || !isspace(c)) { goto bad64; } i--; diff --git a/tests/binary.test b/tests/binary.test index 8b8a1ab..b23548e 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.37 2008/09/10 13:50:04 dkf Exp $ +# RCS: @(#) $Id: binary.test,v 1.38 2008/12/15 17:11:34 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -2718,6 +2718,14 @@ test binary-75.23 {binary decode uuencode} -body { set r [binary decode uuencode 86)C] list [string length $r] $r } -result {3 abc} +test binary-75.24 {binary decode uuencode} -body { + set s "04)\# " + binary decode uuencode $s +} -result ABC +test binary-75.25 {binary decode uuencode} -body { + set s "04)\#z" + binary decode uuencode $s +} -returnCodes error -match glob -result {invalid uuencode character "z" at position 4} test binary-76.1 {byte array concat speed} -body { set b1 [binary format H* [string repeat E9 1000000]] -- cgit v0.12 From fc8e6478bfb02d60c1dc8c861dd80af63e036481 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 15 Dec 2008 17:28:54 +0000 Subject: fix 'make checkstubs' failure: make TclGetIndexFromObjList static --- generic/tclIndexObj.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index d0fb382..0915092 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.47 2008/11/25 23:19:02 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.48 2008/12/15 17:28:54 das Exp $ */ #include "tclInt.h" @@ -21,6 +21,9 @@ * Prototypes for functions defined later in this file: */ +static int GetIndexFromObjList(Tcl_Interp *interp, + Tcl_Obj *objPtr, Tcl_Obj *tableObjPtr, + const char *msg, int flags, int *indexPtr); static int SetIndexFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void UpdateStringOfIndex(Tcl_Obj *objPtr); static void DupIndex(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); @@ -140,7 +143,7 @@ Tcl_GetIndexFromObj( /* *---------------------------------------------------------------------- * - * TclGetIndexFromObjList -- + * GetIndexFromObjList -- * * This procedure looks up an object's value in a table of strings * and returns the index of the matching string, if any. @@ -164,7 +167,7 @@ Tcl_GetIndexFromObj( */ int -TclGetIndexFromObjList( +GetIndexFromObjList( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ Tcl_Obj *tableObjPtr, /* List of strings to compare against the @@ -623,7 +626,7 @@ PrefixMatchObjCmd( return result; } - result = TclGetIndexFromObjList(interp, objPtr, tablePtr, message, flags, + result = GetIndexFromObjList(interp, objPtr, tablePtr, message, flags, &index); if (result != TCL_OK) { if (errorPtr != NULL && errorLength == 0) { -- cgit v0.12 From 4a44a570aada5b04e9ffdee9b9f82f7fa34cfe6c Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 15 Dec 2008 18:33:24 +0000 Subject: * doc/AddErrInfo.3: Documented Tcl_(Set|Get)ErrorLine (TIP 336). * doc/CrtCommand.3: Various other documentation updates to * doc/CrtInterp.3: reflect the lack of access to Tcl_Interp fields * doc/Interp.3: by default. * doc/SetResult.3: * doc/tcl.decls: --- ChangeLog | 8 ++++++++ doc/AddErrInfo.3 | 23 +++++++++++++++++++---- doc/CrtCommand.3 | 8 +++----- doc/CrtInterp.3 | 10 +++++----- doc/Interp.3 | 28 +++++++++++++++++++--------- doc/SetResult.3 | 19 +++++++++++-------- generic/tcl.decls | 4 ++-- generic/tclDecls.h | 6 +++--- 8 files changed, 70 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0454c6e..40fcd76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,13 @@ 2008-12-15 Don Porter + * doc/AddErrInfo.3: Documented Tcl_(Set|Get)ErrorLine (TIP 336). + * doc/CrtCommand.3: Various other documentation updates to + * doc/CrtInterp.3: reflect the lack of access to Tcl_Interp fields + * doc/Interp.3: by default. + * doc/SetResult.3: + * doc/tcl.decls: + TIP #338 IMPLEMENTATION * doc/AppInit.c: Made routines Tcl_SetStartupScript and @@ -19,6 +26,7 @@ * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: + * generic/tclDecls.h: 2008-12-14 Donal K. Fellows diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index 0de0a0f..ae136ce 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.23 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.24 2008/12/15 18:33:24 dgp Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.5 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options +Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_SetErrorLine, Tcl_GetErrorLine, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options .SH SYNOPSIS .nf \fB#include \fR @@ -34,6 +34,10 @@ int .sp \fBTcl_SetErrorCodeVA\fR(\fIinterp, argList\fR) .sp +\fBTcl_GetErrorLine\fR(\fIinterp\fR) +.sp +\fBTcl_SetErrorLine\fR(\fIinterp, lineNum\fR) +.sp const char * \fBTcl_PosixError\fR(\fIinterp\fR) .sp @@ -70,6 +74,8 @@ Last \fIelement\fR argument must be NULL. .AP va_list argList in An argument list which must have been initialized using \fBva_start\fR, and cleared using \fBva_end\fR. +.AP int lineNum +The line number of a script where an error occurred. .AP "const char" *script in Pointer to first character in script containing command (must be <= command) .AP "const char" *command in @@ -157,8 +163,12 @@ to set any collection of return options, there are a handful of return options that are very frequently used. Most notably the \fB\-errorinfo\fR and \fB\-errorcode\fR return options should be set properly when the command procedure -of a command returns \fBTCL_ERROR\fR. Tcl provides several -simpler interfaces to more directly set these return options. +of a command returns \fBTCL_ERROR\fR. The \fB\-errorline\fR +return option is also read by commands that evaluate scripts +and wish to supply detailed error location information in +the stack trace text they append to the \fB\-errorinfo\fR option. +Tcl provides several simpler interfaces to more directly set +these return options. .PP The \fB\-errorinfo\fR option holds a stack trace of the operations that were in progress when an error occurred, @@ -235,6 +245,11 @@ record instead of an object. Otherwise, it is similar to \fBTcl_SetErrorCodeVA\fR is the same as \fBTcl_SetErrorCode\fR except that instead of taking a variable number of arguments it takes an argument list. .PP +The procedure \fBTcl_GetErrorLine\fR is used to read the integer value +of the \fB\-errorline\fR return option without the overhead of a full +call to \fBTcl_GetReturnOptions\fR. Likewise, \fBTcl_SetErrorLine\fR +sets the \fB\-errorline\fR return option value. +.PP \fBTcl_PosixError\fR sets the \fB\-errorcode\fR variable after an error in a POSIX kernel call. It reads the value of the \fBerrno\fR C variable and calls diff --git a/doc/CrtCommand.3 b/doc/CrtCommand.3 index 02081bf..4e8daaf 100644 --- a/doc/CrtCommand.3 +++ b/doc/CrtCommand.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtCommand.3,v 1.16 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: CrtCommand.3,v 1.17 2008/12/15 18:33:25 dgp Exp $ '\" .so man.macros .TH Tcl_CreateCommand 3 "" Tcl "Tcl Library Procedures" @@ -54,9 +54,7 @@ Also, Tcl's interpreter now uses objects internally. In order to invoke a string-based command procedure registered by \fBTcl_CreateCommand\fR, it must generate and fetch a string representation -from each argument object before the call -and create a new Tcl object to hold the string result returned by the -string-based command procedure. +from each argument object before the call. New commands should be defined using \fBTcl_CreateObjCommand\fR. We support \fBTcl_CreateCommand\fR for backwards compatibility. .PP @@ -108,7 +106,7 @@ version 8.1 of Tcl. \fBTCL_CONTINUE\fR. See the Tcl overview man page for details on what these codes mean. Most normal commands will only return \fBTCL_OK\fR or \fBTCL_ERROR\fR. In addition, \fIproc\fR must set -the interpreter result to point to a string value; +the interpreter result; in the case of a \fBTCL_OK\fR return code this gives the result of the command, and in the case of \fBTCL_ERROR\fR it gives an error message. The \fBTcl_SetResult\fR procedure provides an easy interface for setting diff --git a/doc/CrtInterp.3 b/doc/CrtInterp.3 index d751f75..158b3b8 100644 --- a/doc/CrtInterp.3 +++ b/doc/CrtInterp.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtInterp.3,v 1.9 2008/12/05 21:38:47 dkf Exp $ +'\" RCS: @(#) $Id: CrtInterp.3,v 1.10 2008/12/15 18:33:25 dgp Exp $ '\" .so man.macros .TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures" @@ -38,10 +38,10 @@ Token for interpreter to be destroyed or queried. \fBTcl_CreateInterp\fR creates a new interpreter structure and returns a token for it. The token is required in calls to most other Tcl procedures, such as \fBTcl_CreateCommand\fR, \fBTcl_Eval\fR, and -\fBTcl_DeleteInterp\fR. -Clients are only allowed to access a few of the fields of -Tcl_Interp structures; see the \fBTcl_Interp\fR -and \fBTcl_CreateCommand\fR man pages for details. +\fBTcl_DeleteInterp\fR. The token returned by \fBTcl_CreateInterp\fR +may only be passed to Tcl routines called from the same thread as +the original \fBTcl_CreateInterp\fR call. It is not safe for multiple +threads to pass the same token to Tcl's routines. The new interpreter is initialized with the built-in Tcl commands and with the variables documented in tclvars(n). To bind in additional commands, call \fBTcl_CreateCommand\fR. diff --git a/doc/Interp.3 b/doc/Interp.3 index 29c2c65..4f0a250 100644 --- a/doc/Interp.3 +++ b/doc/Interp.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Interp.3,v 1.14 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Interp.3,v 1.15 2008/12/15 18:33:25 dgp Exp $ '\" .so man.macros .TH Tcl_Interp 3 7.5 Tcl "Tcl Library Procedures" @@ -28,15 +28,25 @@ typedef void \fBTcl_FreeProc\fR( .SH DESCRIPTION .PP The \fBTcl_CreateInterp\fR procedure returns a pointer to a Tcl_Interp -structure. This pointer is then passed into other Tcl procedures -to process commands in the interpreter and perform other operations -on the interpreter. Interpreter structures contain many fields -that are used by Tcl, but only three that may be accessed by -clients: \fIresult\fR, \fIfreeProc\fR, and \fIerrorLine\fR. +structure. Callers of \fBTcl_CreateInterp\fR should use this pointer +as an opaque token, suitable for nothing other than passing back to +other routines in the Tcl interface. Accessing fields directly through +the pointer as described below is no longer supported. The supported +public routines \fBTcl_SetResult\fR, \fBTcl_GetResult\fR, +\fBTcl_SetErrorLine\fR, \fBTcl_GetErrorLine\fR must be used instead. .PP -\fBNote that access to all three fields, \fIresult\fB, \fIfreeProc\fB and -\fIerrorLine\fB is deprecated.\fR Use \fBTcl_SetResult\fR, -\fBTcl_GetResult\fR, and \fBTcl_GetReturnOptions\fR instead. +For legacy programs and extensions no longer being maintained, compiles +against the Tcl 8.6 header files are only possible with the compiler +directives +.CS +#define USE_INTERP_RESULT +.CE +and/or +.CS +#define USE_INTERP_ERRORLINE +.CE +depending on which fields of the \fBTcl_Interp\fR struct are accessed. +These directives may be embedded in code or supplied via compiler options. .PP The \fIresult\fR and \fIfreeProc\fR fields are used to return results or error messages from commands. diff --git a/doc/SetResult.3 b/doc/SetResult.3 index d19bd998..12ccc90 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.23 2008/12/05 16:01:01 nijtmans Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.24 2008/12/15 18:33:25 dgp Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" @@ -199,16 +199,19 @@ It also sets \fIinterp->freeProc\fR to zero, but does not change \fIinterp->result\fR or clear error state. \fBTcl_FreeResult\fR is most commonly used when a procedure is about to replace one result value with another. -.SS "DIRECT ACCESS TO INTERP->RESULT IS DEPRECATED" +.SS "DIRECT ACCESS TO INTERP->RESULT" .PP It used to be legal for programs to directly read and write \fIinterp->result\fR -to manipulate the interpreter result. -Direct access to \fIinterp->result\fR is now strongly deprecated -because it can make the result's string and object forms inconsistent. -Programs should always read the result -using the procedures \fBTcl_GetObjResult\fR or \fBTcl_GetStringResult\fR, -and write the result using \fBTcl_SetObjResult\fR or \fBTcl_SetResult\fR. +to manipulate the interpreter result. The Tcl headers no longer +permit this access by default, and C code still doing this must +be updated to use supported routines \fBTcl_GetObjResult\fR, +\fBTcl_GetStringResult\fR, \fBTcl_SetObjResult\fR, and \fBTcl_SetResult\fR. +As a migration aid, access can be restored with the compiler directive +.CS +#define USE_INTERP_RESULT +.CE +but this is meant only to offer life support to otherwise dead code. .SH "THE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT" .PP \fBTcl_SetResult\fR's \fIfreeProc\fR argument specifies how diff --git a/generic/tcl.decls b/generic/tcl.decls index 9cd8da6..334f004 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.160 2008/12/11 14:16:41 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.161 2008/12/15 18:33:25 dgp Exp $ library tcl @@ -2203,7 +2203,7 @@ declare 605 generic { int Tcl_GetErrorLine(Tcl_Interp *interp) } declare 606 generic { - void Tcl_SetErrorLine(Tcl_Interp *interp, int value) + void Tcl_SetErrorLine(Tcl_Interp *interp, int lineNum) } # TIP#307 (move results between interpreters) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 45805f2..8c58b9c 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.161 2008/12/11 14:17:23 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.162 2008/12/15 18:33:25 dgp Exp $ */ #ifndef _TCLDECLS @@ -3668,7 +3668,7 @@ EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); #ifndef Tcl_SetErrorLine_TCL_DECLARED #define Tcl_SetErrorLine_TCL_DECLARED /* 606 */ -EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int value); +EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int lineNum); #endif #ifndef Tcl_TransferResult_TCL_DECLARED #define Tcl_TransferResult_TCL_DECLARED @@ -4423,7 +4423,7 @@ typedef struct TclStubs { int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ - void (*tcl_SetErrorLine) (Tcl_Interp * interp, int value); /* 606 */ + void (*tcl_SetErrorLine) (Tcl_Interp * interp, int lineNum); /* 606 */ void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ -- cgit v0.12 From e1f26eae948241e7c888279806dc6ee91c80b482 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 15 Dec 2008 22:07:27 +0000 Subject: Working towards zlib-based channel transforms --- generic/tclZlib.c | 517 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 340 insertions(+), 177 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 305bcd9..e8a37a4 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.11 2008/12/14 15:10:22 das Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.12 2008/12/15 22:07:27 dkf Exp $ */ #include "tclInt.h" @@ -24,6 +24,19 @@ #define AUTO_MAGIC_FLAG 32 /* + * Structure used for handling gzip headers that are generated from a + * dictionary. + */ + +#define MAX_COMMENT_LEN 256 + +typedef struct { + gz_header header; + char nativeFilenameBuf[MAXPATHLEN]; + char nativeCommentBuf[MAX_COMMENT_LEN]; +} GzipHeader; + +/* * Structure used for the Tcl_ZlibStream* commands and [zlib stream ...] */ @@ -35,8 +48,9 @@ typedef struct { Tcl_Obj *currentInput; /* Pointer to what is currently being * inflated. */ int inPos, outPos; - int mode; /* ZLIB_DEFLATE || ZLIB_INFLATE */ - int format; /* ZLIB_FORMAT_* */ + int mode; /* Either TCL_ZLIB_STREAM_DEFLATE or + * TCL_ZLIB_STREAM_INFLATE. */ + int format; /* Flags from the TCL_ZLIB_FORMAT_* */ int level; /* Default 5, 0-9 */ int flush; /* Stores the flush param for deferred the * decompression. */ @@ -51,7 +65,7 @@ typedef struct { static void ConvertError(Tcl_Interp *interp, int code); static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, - gz_header *headerPtr, int *extraSizePtr); + GzipHeader *headerPtr, int *extraSizePtr); static int ZlibCmd(ClientData dummy, Tcl_Interp *ip, int objc, Tcl_Obj *const objv[]); static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, @@ -83,6 +97,9 @@ static int ChanBlockMode(ClientData instanceData, int mode); static int ChanFlush(ClientData instanceData); static int ChanHandler(ClientData instanceData, int interestMask); +static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int inMode, + int outMode, int format, int level, + Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr); static const Tcl_ChannelType zlibChannelType = { "zlib", @@ -91,14 +108,14 @@ static const Tcl_ChannelType zlibChannelType = { ChanInput, ChanOutput, NULL, /* seekProc */ - NULL, /* ChanSetOption, */ + ChanSetOption, ChanGetOption, ChanWatch, ChanGetHandle, NULL, /* close2Proc, */ ChanBlockMode, ChanFlush, - ChanHandler, + NULL /*ChanHandler*/, NULL /* wideSeekProc */ }; @@ -109,25 +126,32 @@ typedef struct { int mask; /* Zlib specific channel state */ - int inFormat; - int outFormat; + int inMode; + int outMode; z_stream inStream; z_stream outStream; char *inBuffer; int inAllocated, inUsed, inPos; char *outBuffer; int outAllocated, outUsed, outPos; + int flushType; - gz_header inHeader; - char inFilenameBuffer[MAXPATHLEN]; - char inCommentBuffer[256]; - gz_header outHeader; - Tcl_DString outFilenameDString; - Tcl_DString outCommentDString; + GzipHeader inHeader; + GzipHeader outHeader; } ZlibChannelData; -/* Flag values */ -#define ASYNC 1 +/* + * Value bits for the flags field. Definitions are: + * ASYNC - Whether this is an asynchronous channel. + * IN_HEADER - Whether the inHeader field has been registered with + * the input compressor. + * OUT_HEADER - Whether the outputHeader field has been registered + * with the output decompressor. + */ + +#define ASYNC 0x1 +#define IN_HEADER 0x2 +#define OUT_HEADER 0x4 #endif /* ENABLE_CHANSTACKING */ /* @@ -217,44 +241,62 @@ GenerateHeader( Tcl_Interp *interp, /* Where to put error messages. */ Tcl_Obj *dictObj, /* The dictionary whose contents are to be * parsed. */ - gz_header *headerPtr, /* Where to store the parsed-out values. */ + GzipHeader *headerPtr, /* Where to store the parsed-out values. */ int *extraSizePtr) /* Variable to add the length of header * strings (filename, comment) to. */ { Tcl_Obj *value; - int extra; + int len, result = TCL_ERROR; + char *valueStr; + Tcl_Encoding latin1enc; static const char *const types[] = { "binary", "text" }; + /* + * RFC 1952 says that header strings are in ISO 8859-1 (LATIN-1). + */ + + latin1enc = Tcl_GetEncoding(NULL, "iso8859-1"); + if (latin1enc == NULL) { + Tcl_Panic("no latin-1 encoding"); + } + if (GetValue(interp, dictObj, "comment", &value) != TCL_OK) { - return TCL_ERROR; + goto error; } else if (value != NULL) { - /* TODO: Convert to external */ - headerPtr->comment = (Bytef *) Tcl_GetStringFromObj(value, &extra); - *extraSizePtr += extra; + valueStr = Tcl_GetStringFromObj(value, &len); + Tcl_UtfToExternal(NULL, latin1enc, valueStr, len, 0, NULL, + headerPtr->nativeCommentBuf, MAX_COMMENT_LEN-1, NULL, &len, + NULL); + headerPtr->nativeCommentBuf[len] = '\0'; + headerPtr->header.comment = (Bytef *) headerPtr->nativeCommentBuf; + *extraSizePtr += len; } if (GetValue(interp, dictObj, "crc", &value) != TCL_OK) { - return TCL_ERROR; + goto error; } else if (value != NULL && - Tcl_GetBooleanFromObj(interp, value, &headerPtr->hcrc)) { - return TCL_ERROR; + Tcl_GetBooleanFromObj(interp, value, &headerPtr->header.hcrc)) { + goto error; } if (GetValue(interp, dictObj, "filename", &value) != TCL_OK) { - return TCL_ERROR; + goto error; } else if (value != NULL) { - /* TODO: Convert to external */ - headerPtr->name = (Bytef *) Tcl_GetStringFromObj(value, &extra); - *extraSizePtr += extra; + valueStr = Tcl_GetStringFromObj(value, &len); + Tcl_UtfToExternal(NULL, latin1enc, valueStr, len, 0, NULL, + headerPtr->nativeFilenameBuf, MAXPATHLEN-1, NULL, &len, NULL); + headerPtr->nativeFilenameBuf[len] = '\0'; + headerPtr->header.name = (Bytef *) headerPtr->nativeFilenameBuf; + *extraSizePtr += len; } if (GetValue(interp, dictObj, "os", &value) != TCL_OK) { - return TCL_ERROR; - } else if (value != NULL && - Tcl_GetIntFromObj(interp, value, &headerPtr->os) != TCL_OK) { - return TCL_ERROR; + goto error; + } else if (value != NULL && Tcl_GetIntFromObj(interp, value, + &headerPtr->header.os) != TCL_OK) { + goto error; } /* @@ -263,20 +305,23 @@ GenerateHeader( */ if (GetValue(interp, dictObj, "time", &value) != TCL_OK) { - return TCL_ERROR; + goto error; } else if (value != NULL && Tcl_GetLongFromObj(interp, value, - (long *) &headerPtr->time) != TCL_OK) { - return TCL_ERROR; + (long *) &headerPtr->header.time) != TCL_OK) { + goto error; } if (GetValue(interp, dictObj, "type", &value) != TCL_OK) { - return TCL_ERROR; + goto error; } else if (value != NULL && Tcl_GetIndexFromObj(interp, value, types, - "type", TCL_EXACT, &headerPtr->text) != TCL_OK) { - return TCL_ERROR; + "type", TCL_EXACT, &headerPtr->header.text) != TCL_OK) { + goto error; } - return TCL_OK; + result = TCL_OK; + error: + Tcl_FreeEncoding(latin1enc); + return result; } /* @@ -314,16 +359,45 @@ ExtractHeader( gz_header *headerPtr, /* The gzip header to extract from. */ Tcl_Obj *dictObj) /* The dictionary to store in. */ { + Tcl_Encoding latin1enc = NULL; + Tcl_DString tmp; + if (headerPtr->comment != Z_NULL) { - /* TODO: Convert from external */ - SetValue(dictObj, "comment", - Tcl_NewStringObj((char *) headerPtr->comment, -1)); + if (latin1enc == NULL) { + /* + * RFC 1952 says that header strings are in ISO 8859-1 (LATIN-1). + */ + + latin1enc = Tcl_GetEncoding(NULL, "iso8859-1"); + if (latin1enc == NULL) { + Tcl_Panic("no latin-1 encoding"); + } + } + + Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->comment, -1, + &tmp); + SetValue(dictObj, "comment", Tcl_NewStringObj(Tcl_DStringValue(&tmp), + Tcl_DStringLength(&tmp))); + Tcl_DStringFree(&tmp); } SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc)); if (headerPtr->name != Z_NULL) { - /* TODO: Convert from external */ - SetValue(dictObj, "filename", - Tcl_NewStringObj((char *) headerPtr->name, -1)); + if (latin1enc == NULL) { + /* + * RFC 1952 says that header strings are in ISO 8859-1 (LATIN-1). + */ + + latin1enc = Tcl_GetEncoding(NULL, "iso8859-1"); + if (latin1enc == NULL) { + Tcl_Panic("no latin-1 encoding"); + } + } + + Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->name, -1, + &tmp); + SetValue(dictObj, "filename", Tcl_NewStringObj(Tcl_DStringValue(&tmp), + Tcl_DStringLength(&tmp))); + Tcl_DStringFree(&tmp); } if (headerPtr->os != 255) { SetValue(dictObj, "os", Tcl_NewIntObj(headerPtr->os)); @@ -335,6 +409,10 @@ ExtractHeader( SetValue(dictObj, "type", Tcl_NewStringObj(headerPtr->text ? "text" : "binary", -1)); } + + if (latin1enc != NULL) { + Tcl_FreeEncoding(latin1enc); + } } /* @@ -359,10 +437,11 @@ ExtractHeader( int Tcl_ZlibStreamInit( Tcl_Interp *interp, - int mode, /* ZLIB_INFLATE || ZLIB_DEFLATE */ - int format, /* ZLIB_FORMAT_* */ - int level, /* 0-9 or ZLIB_DEFAULT_COMPRESSION */ - Tcl_Obj *dictObj, /* Headers for gzip */ + int mode, /* Either TCL_ZLIB_STREAM_INFLATE or + * TCL_ZLIB_STREAM_DEFLATE. */ + int format, /* Flags from the TCL_ZLIB_FORMAT_* set. */ + int level, /* 0-9 or TCL_ZLIB_COMPRESS_DEFAULT. */ + Tcl_Obj *dictObj, /* Dictionary containing headers for gzip. */ Tcl_ZlibStream *zshandle) { int wbits = 0; @@ -678,7 +757,10 @@ Tcl_ZlibStreamReset( zsh->stream.opaque = 0; /* Must be initialized before calling * (de|in)flateInit2 */ - /* No output buffer available yet */ + /* + * No output buffer available yet. + */ + zsh->stream.avail_out = 0; zsh->stream.next_out = NULL; @@ -691,7 +773,7 @@ Tcl_ZlibStreamReset( if (e != Z_OK) { ConvertError(zsh->interp, e); - /* TODOcleanup */ + /* TODO:cleanup */ return TCL_ERROR; } @@ -735,7 +817,7 @@ Tcl_ZlibStreamGetCommandName( * This procedure This function returns 0 or 1 depending on the state of * the (de)compressor. For decompression, eof is reached when the entire * compressed stream has been decompressed. For compression, eof is - * reached when the stream has been flushed with ZLIB_FINALIZE. + * reached when the stream has been flushed with TCL_ZLIB_FINALIZE. * * Results: * Integer. @@ -768,8 +850,8 @@ int Tcl_ZlibStreamPut( Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ Tcl_Obj *data, /* Data to compress/decompress */ - int flush) /* 0, ZLIB_FLUSH, ZLIB_FULLFLUSH, - * ZLIB_FINALIZE */ + int flush) /* TCL_ZLIB_NO_FLUSH, TCL_ZLIB_FLUSH, + * TCL_ZLIB_FULLFLUSH, or TCL_ZLIB_FINALIZE */ { zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; char *dataTmp = NULL; @@ -1071,7 +1153,8 @@ Tcl_ZlibDeflate( int wbits = 0, inLen = 0, e = 0, extraSize = 0; Byte *inData = NULL; z_stream stream; - gz_header header, *headerPtr = NULL; + GzipHeader header; + gz_header *headerPtr = NULL; Tcl_Obj *obj; /* @@ -1102,10 +1185,10 @@ Tcl_ZlibDeflate( extraSize = 32; if (gzipHeaderDictObj) { - headerPtr = &header; + headerPtr = &header.header; memset(headerPtr, 0, sizeof(gz_header)); - if (GenerateHeader(interp, gzipHeaderDictObj, - headerPtr, &extraSize) != TCL_OK) { + if (GenerateHeader(interp, gzipHeaderDictObj, &header, + &extraSize) != TCL_OK) { return TCL_ERROR; } } @@ -1248,18 +1331,19 @@ Tcl_ZlibInflate( break; default: Tcl_Panic("incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, " - "TCL_ZLIB_FORMAT_GZIP, TCL_ZLIB_FORMAT_RAW or ZLIB_FORMAT_AUTO"); + "TCL_ZLIB_FORMAT_GZIP, TCL_ZLIB_FORMAT_RAW or " + "TCL_ZLIB_FORMAT_AUTO"); } if (gzipHeaderDictObj) { headerPtr = &header; memset(headerPtr, 0, sizeof(gz_header)); nameBuf = ckalloc(MAXPATHLEN); - header.name = (void *) nameBuf; - header.name_max = MAXPATHLEN; - commentBuf = ckalloc(256); - header.comment = (void *) commentBuf; - header.comm_max = 256; + header.name = (Bytef *) nameBuf; + header.name_max = MAXPATHLEN - 1; + commentBuf = ckalloc(MAX_COMMENT_LEN); + header.comment = (Bytef *) commentBuf; + header.comm_max = MAX_COMMENT_LEN - 1; } inData = Tcl_GetByteArrayFromObj(data, &inLen); @@ -1280,7 +1364,7 @@ Tcl_ZlibInflate( outData = Tcl_SetByteArrayLength(obj, bufferSize); stream.zalloc = 0; stream.zfree = 0; - stream.avail_in = (uInt) inLen+1; /* +1 because ZLIB can "over-request" + stream.avail_in = (uInt) inLen+1; /* +1 because zlib can "over-request" * input (but ignore it!) */ stream.next_in = inData; stream.avail_out = bufferSize; @@ -1664,15 +1748,16 @@ ZlibCmd( } Tcl_SetObjResult(interp, Tcl_ZlibStreamGetCommandName(zh)); return TCL_OK; +#ifdef ENABLE_CHANSTACKING case z_push: { /* push mode channel options...*/ Tcl_Channel chan; - int chanMode; + int chanMode, inMode, outMode; static const char *pushOptions[] = { - "-header", "-headerVar", "-level", "-limit", + "-header", "-level", "-limit", NULL }; - enum pushOptions {poHeader, poHeadVar, poLevel, poLimit}; - Tcl_Obj *headerObj = NULL, *varObj = NULL; + enum pushOptions {poHeader, poLevel, poLimit}; + Tcl_Obj *headerObj = NULL; int limit = 1, dummy; if (objc < 4) { @@ -1684,23 +1769,40 @@ ZlibCmd( &format) != TCL_OK) { return TCL_ERROR; } - mode = TCL_ZLIB_STREAM_INFLATE; switch ((enum zlibFormats) format) { case f_deflate: - mode = TCL_ZLIB_STREAM_DEFLATE; + inMode = TCL_ZLIB_STREAM_PASS; + outMode = TCL_ZLIB_STREAM_DEFLATE; + format = TCL_ZLIB_FORMAT_GZIP; + break; case f_inflate: + inMode = TCL_ZLIB_STREAM_INFLATE; + outMode = TCL_ZLIB_STREAM_PASS; format = TCL_ZLIB_FORMAT_RAW; break; case f_compress: - mode = TCL_ZLIB_STREAM_DEFLATE; + inMode = TCL_ZLIB_STREAM_PASS; + outMode = TCL_ZLIB_STREAM_DEFLATE; + format = TCL_ZLIB_FORMAT_ZLIB; + break; case f_decompress: + inMode = TCL_ZLIB_STREAM_INFLATE; + outMode = TCL_ZLIB_STREAM_PASS; format = TCL_ZLIB_FORMAT_ZLIB; break; case f_gzip: - mode = TCL_ZLIB_STREAM_DEFLATE; + inMode = TCL_ZLIB_STREAM_PASS; + outMode = TCL_ZLIB_STREAM_DEFLATE; + format = TCL_ZLIB_FORMAT_GZIP; + break; case f_gunzip: + inMode = TCL_ZLIB_STREAM_INFLATE; + outMode = TCL_ZLIB_STREAM_PASS; format = TCL_ZLIB_FORMAT_GZIP; break; + default: + Tcl_AppendResult(interp, "IMPOSSIBLE", NULL); + return TCL_ERROR; } if (TclGetChannelFromObj(interp, objv[3], &chan, &chanMode, @@ -1708,6 +1810,27 @@ ZlibCmd( return TCL_ERROR; } + /* + * Sanity checks. + */ + + if (outMode != TCL_ZLIB_STREAM_PASS && !(chanMode & TCL_WRITABLE)) { + Tcl_AppendResult(interp, + "compression may only be applied to writable channels", + NULL); + return TCL_ERROR; + } + if (inMode != TCL_ZLIB_STREAM_PASS && !(chanMode & TCL_READABLE)) { + Tcl_AppendResult(interp, + "decompression may only be applied to readable channels", + NULL); + return TCL_ERROR; + } + + /* + * Parse options. + */ + level = Z_DEFAULT_COMPRESSION; for (i=4 ; i objc-1) { - Tcl_AppendResult(interp, - "value missing for -headerVar option", NULL); - return TCL_ERROR; - } - varObj = objv[i]; - break; case poLevel: if (++i > objc-1) { Tcl_AppendResult(interp, @@ -1769,13 +1884,18 @@ ZlibCmd( } } -#if 0 - Tcl_ZlibStackChannel(interp, 0/*inFormat*/,level,0/*outFormat*/,level, chan, headerObj); -#else - Tcl_AppendResult(interp, "not yet implemented", NULL); -#endif - break; + if (ZlibStackChannel(interp, inMode, outMode, format, level, chan, + headerObj) == NULL) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, objv[3]); + return TCL_OK; } +#else /*ENABLE_CHANSTACKING*/ + case z_push: + Tcl_AppendResult(interp, "unimplemented", NULL); + return TCL_ERROR; +#endif /*ENABLE_CHANSTACKING*/ }; return TCL_ERROR; @@ -1984,20 +2104,17 @@ ChanClose( Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); int e; - if (cd->inFormat != ZLIB_PASSTHROUGH) { - if (cd->inFormat & ZLIB_INFLATE) { - e = inflateEnd(&cd->inStream); - } else { - e = deflateEnd(&cd->inStream); - } + // TODO: flush? + if (cd->inMode == TCL_ZLIB_STREAM_INFLATE) { + e = inflateEnd(&cd->inStream); + } else if (cd->inMode == TCL_ZLIB_STREAM_DEFLATE) { + e = deflateEnd(&cd->inStream); } - if (cd->outFormat != ZLIB_PASSTHROUGH) { - if (cd->outFormat & ZLIB_INFLATE) { - e = inflateEnd(&cd->outStream); - } else { - e = deflateEnd(&cd->outStream); - } + if (cd->outMode == TCL_ZLIB_STREAM_INFLATE) { + e = inflateEnd(&cd->outStream); + } else if (cd->outMode == TCL_ZLIB_STREAM_DEFLATE) { + e = deflateEnd(&cd->outStream); } if (cd->inBuffer) { @@ -2024,7 +2141,7 @@ ChanInput( Tcl_DriverInputProc *inProc = Tcl_ChannelInputProc(Tcl_GetChannelType(parent)); - if (!(cd->flags & TCL_READABLE)) { + if (cd->inMode == TCL_ZLIB_STREAM_PASS) { return inProc(Tcl_GetChannelInstanceData(parent), buf, toRead, errorCodePtr); } @@ -2045,7 +2162,7 @@ ChanOutput( Tcl_DriverOutputProc *outProc = Tcl_ChannelOutputProc(Tcl_GetChannelType(parent)); - if (!(cd->flags & TCL_WRITABLE)) { + if (cd->outMode == TCL_ZLIB_STREAM_PASS) { return outProc(Tcl_GetChannelInstanceData(parent), buf, toWrite, errorCodePtr); } @@ -2066,6 +2183,20 @@ ChanSetOption( /* not used */ Tcl_DriverSetOptionProc *setOptionProc = Tcl_ChannelSetOptionProc(Tcl_GetChannelType(parent)); + if (optionName && strcmp(optionName, "-flushmode") == 0) { + if (value[0] == 'f' && strcmp(value, "full") == 0) { + cd->flushType = Z_FULL_FLUSH; + return TCL_OK; + } + if (value[0] == 's' && strcmp(value, "sync") == 0) { + cd->flushType = Z_SYNC_FLUSH; + return TCL_OK; + } + Tcl_AppendResult(interp, "unknown -flushmode \"", value, + "\": must be full or sync", NULL); + return TCL_ERROR; + } + if (setOptionProc == NULL) { return TCL_ERROR; } @@ -2083,7 +2214,7 @@ ChanGetOption( { ZlibChannelData *cd = instanceData; Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); - Tcl_DriverSetOptionProc *getOptionProc = + Tcl_DriverGetOptionProc *getOptionProc = Tcl_ChannelGetOptionProc(Tcl_GetChannelType(parent)); if (strcmp(optionName, "-crc") == 0) { @@ -2101,6 +2232,18 @@ ChanGetOption( return TCL_OK; } + if ((cd->flags & IN_HEADER) && (strcmp(optionName, "-header") == 0)) { + Tcl_Obj *tmpObj = Tcl_NewObj(); + int len; + char *str; + + ExtractHeader(&cd->inHeader.header, tmpObj); + str = Tcl_GetStringFromObj(tmpObj, &len); + Tcl_DStringAppend(dsPtr, str, len); + Tcl_DecrRefCount(tmpObj); + return TCL_OK; + } + if (getOptionProc && getOptionProc(Tcl_GetChannelInstanceData(parent), interp, optionName, dsPtr) != TCL_OK) { return TCL_ERROR; @@ -2110,6 +2253,9 @@ ChanGetOption( if (optionName == NULL) { Tcl_DStringAppendElement(dsPtr, "-crc"); + if (cd->flags & IN_HEADER) { + Tcl_DStringAppendElement(dsPtr, "-header"); + } } return TCL_OK; } @@ -2155,6 +2301,12 @@ ChanFlush( { ZlibChannelData *cd = instanceData; + if (cd->inMode == TCL_ZLIB_STREAM_INFLATE) { + // TODO: flush input with Z_SYNC_FLUSH + } + if (cd->outMode == TCL_ZLIB_STREAM_DEFLATE) { + // TODO: flush output with cd->flushType + } return TCL_OK; } @@ -2163,92 +2315,98 @@ ChanHandler( ClientData instanceData, int interestMask) { - ZlibChannelData *cd = instanceData; + /* + * We don't handle this here. Assume it came from the underlying channel. + */ - return TCL_OK; + return interestMask; } -Tcl_Channel -Tcl_ZlibStackChannel( +static Tcl_Channel +ZlibStackChannel( Tcl_Interp *interp, - int inFormat, - int inLevel, - int outFormat, - int outLevel, + int inMode, + int outMode, + int format, + int level, Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr) { - ZlibChannelData *cd; - int outwbits = 0, inwbits = 0; + ZlibChannelData *cd = (ZlibChannelData *) + ckalloc(sizeof(ZlibChannelData)); + int wbits = 0; int e; - if (inFormat & ZLIB_FORMAT_RAW) { - inwbits = -MAX_WBITS; - } else if (inFormat & ZLIB_FORMAT_GZIP) { - inwbits = MAX_WBITS | GZIP_MAGIC_FLAG; - } else if (inFormat & ZLIB_FORMAT_ZLIB) { - inwbits = MAX_WBITS; - } else if ((inFormat & ZLIB_FORMAT_AUTO) && (inFormat & ZLIB_INFLATE)) { - inwbits = MAX_WBITS | AUTO_MAGIC_FLAG; - } else if (inFormat != ZLIB_PASSTHROUGH) { - Tcl_Panic("incorrect zlib read/input data format, must be " - "ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " - "ZLIB_FORMAT_AUTO (only for inflate)"); - } - - if (outFormat & ZLIB_FORMAT_RAW) { - outwbits = -MAX_WBITS; - } else if (outFormat & ZLIB_FORMAT_GZIP) { - outwbits = MAX_WBITS | GZIP_MAGIC_FLAG; - } else if (outFormat & ZLIB_FORMAT_ZLIB) { - outwbits = MAX_WBITS; - } else if ((outFormat & ZLIB_FORMAT_AUTO) && (outFormat & ZLIB_INFLATE)) { - outwbits = MAX_WBITS | AUTO_MAGIC_FLAG; - } else if (outFormat != ZLIB_PASSTHROUGH) { - Tcl_Panic("incorrect zlib write/output data format, must be " - "ZLIB_FORMAT_ZLIB, ZLIB_FORMAT_GZIP, ZLIB_FORMAT_RAW or " - "ZLIB_FORMAT_AUTO (only for inflate)"); - } - - cd = (ZlibChannelData *) ckalloc(sizeof(ZlibChannelData)); - cd->inFormat = inFormat; - cd->outFormat = outFormat; - - cd->inStream.zalloc = 0; - cd->inStream.zfree = 0; - cd->inStream.opaque = 0; - cd->inStream.avail_in = 0; - cd->inStream.next_in = NULL; - cd->inStream.avail_out = 0; - cd->inStream.next_out = NULL; - - cd->outStream.zalloc = 0; - cd->outStream.zfree = 0; - cd->outStream.opaque = 0; - cd->outStream.avail_in = 0; - cd->outStream.next_in = NULL; - cd->outStream.avail_out = 0; - cd->outStream.next_out = NULL; - - if (inFormat != ZLIB_PASSTHROUGH) { - if (inFormat & ZLIB_INFLATE) { - /* Initialize for Inflate */ - e = inflateInit2(&cd->inStream, inwbits); - } else { - /* Initialize for Deflate */ - e = deflateInit2(&cd->inStream, inLevel, Z_DEFLATED, inwbits, - MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + memset(cd, 0, sizeof(ZlibChannelData)); + cd->inMode = inMode; + cd->outMode = outMode; + cd->flushType = Z_SYNC_FLUSH; + + if (format == TCL_ZLIB_FORMAT_GZIP || format == TCL_ZLIB_FORMAT_AUTO) { + if (outMode == TCL_ZLIB_STREAM_DEFLATE) { + int dummy = 0; + + cd->flags |= OUT_HEADER; + if (GenerateHeader(interp, gzipHeaderDictPtr, &cd->outHeader, + &dummy) != TCL_OK) { + goto error; + } + } + if (inMode == TCL_ZLIB_STREAM_INFLATE) { + cd->flags |= IN_HEADER; + cd->inHeader.header.name = (Bytef *) + &cd->inHeader.nativeFilenameBuf; + cd->inHeader.header.name_max = MAXPATHLEN - 1; + cd->inHeader.header.comment = (Bytef *) + &cd->inHeader.nativeCommentBuf; + cd->inHeader.header.comm_max = MAX_COMMENT_LEN - 1; } } - if (outFormat != ZLIB_PASSTHROUGH) { - if (outFormat && ZLIB_INFLATE) { - /* Initialize for Inflate */ - e = inflateInit2(&cd->outStream, outwbits); - } else { - /* Initialize for Deflate */ - e = deflateInit2(&cd->outStream, outLevel, Z_DEFLATED, outwbits, - MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + if (format == TCL_ZLIB_FORMAT_RAW) { + wbits = -MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_ZLIB) { + wbits = MAX_WBITS; + } else if (format == TCL_ZLIB_FORMAT_GZIP) { + wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + } else if (format == TCL_ZLIB_FORMAT_AUTO) { + wbits = MAX_WBITS | AUTO_MAGIC_FLAG; + } else { + Tcl_Panic("bad format: %d", format); + } + + /* + * Initialize input inflater if necessary. + */ + + if (inMode == TCL_ZLIB_STREAM_INFLATE) { + e = inflateInit2(&cd->inStream, wbits); + if (e != Z_OK) { + goto error; + } + if (cd->flags & IN_HEADER) { + e = inflateGetHeader(&cd->inStream, &cd->inHeader.header); + if (e != Z_OK) { + goto error; + } + } + } + + /* + * Initialize output deflater if necessary. + */ + + if (outMode == TCL_ZLIB_STREAM_DEFLATE) { + e = deflateInit2(&cd->outStream, level, Z_DEFLATED, wbits, + MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + if (e != Z_OK) { + goto error; + } + if (cd->flags & OUT_HEADER) { + e = deflateSetHeader(&cd->outStream, &cd->outHeader.header); + if (e != Z_OK) { + goto error; + } } } @@ -2257,6 +2415,11 @@ Tcl_ZlibStackChannel( Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetChannelName(channel), -1)); return channel; + + error: + // TODO: delete memory + ckfree((char *) cd); + return NULL; } #endif /* ENABLE_CHANSTACKING */ -- cgit v0.12 From 54a6eed23ab8d46bb42dbf6297fcb2c3d5ea4530 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 15 Dec 2008 23:09:24 +0000 Subject: Fi [Bug 2431847] --- ChangeLog | 5 +++++ generic/tclExecute.c | 7 +++++-- tests/dict.test | 8 +++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40fcd76..86efb0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-15 Donal K. Fellows + + * generic/tclExecute.c (TEBC:INST_DICT_GET): Make sure that the result + is empty when generating an error message. [Bug 2431847] + 2008-12-15 Alexandre Ferrieux * generic/tclBinary.c: Fix [Bug 2380293]. Redefine non-strict diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d1ff368..9fc6dc8 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.419 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.420 2008/12/15 23:09:24 dkf Exp $ */ #include "tclInt.h" @@ -7085,7 +7085,10 @@ TclExecuteByteCode( "%u => ERROR reading leaf dictionary key \"%s\": ", opnd, O2S(dictPtr)), Tcl_GetObjResult(interp)); } else { - /*Tcl_ResetResult(interp);*/ + Tcl_Obj *tmpObj; + + TclNewObj(tmpObj); + Tcl_SetObjResult(interp, tmpObj); Tcl_AppendResult(interp, "key \"", TclGetString(OBJ_AT_TOS), "\" not known in dictionary", NULL); TRACE_WITH_OBJ(("%u => ERROR ", opnd), Tcl_GetObjResult(interp)); diff --git a/tests/dict.test b/tests/dict.test index c631cdc..b83a5ed 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.31 2008/12/10 11:15:05 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.32 2008/12/15 23:09:24 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -113,6 +113,12 @@ test dict-3.13 {dict get command} { test dict-3.14 {dict get command} -returnCodes error -body { dict get {a b c d} a c } -result {missing value to go with key} +test dict-3.15 {compiled dict get error cleanliness - Bug 2431847} -body { + apply {{} { + dict set a(z) b c + dict get $a(z) d + }} +} -returnCodes error -result {key "d" not known in dictionary} test dict-4.1 {dict replace command} { getOrder [dict replace {a b c d}] a c -- cgit v0.12 From 8f9f6a2a1711e1e976243069a558fa11cf47209f Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 15 Dec 2008 23:42:01 +0000 Subject: Fix line endings damaged by last commit --- doc/NRE.3 | 606 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 303 insertions(+), 303 deletions(-) diff --git a/doc/NRE.3 b/doc/NRE.3 index edddd7b..a453219 100644 --- a/doc/NRE.3 +++ b/doc/NRE.3 @@ -1,303 +1,303 @@ -.\" -.\" Copyright (c) 2008 by Kevin B. Eknny. -.\" - -'\" See the file "license.terms" for information on usage and redistribution -'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" -'\" RCS: @(#) $Id: NRE.3,v 1.1 2008/12/12 04:38:12 kennykb Exp $ -'\" -.so man.macros -.TH NRE 3 8.6 Tcl "Tcl Library Procedures" -.BS -.SH NAME -Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmdSwap, Tcl_NRAddCallback \- Non-Recursive (stackless) evaluation of Tcl scripts. -.SH SYNOPSIS -.nf -\fB#include \fR -.sp -Tcl_Command -\fBTcl_NRCreateCommand\fR(\fIinterp, cmdName, proc, nreProc, clientData, deleteProc\fR) -.sp -int -\fBTcl_NRCallObjProc\fR(\fIinterp, nreProc, clientData, objc, objv\fR) -.sp -int -\fBTcl_NREvalObj\fR(\fIinterp, objPtr, flags\fR) -.sp -int -\fBTcl_NREvalObjv\fR(\fIinterp, objc, objv, flags\fR) -.sp -int -\fBTcl_NRCmdSwap\fR(\fIinterp, cmd, objc, objv, flags\fR) -.sp -void -\fBTcl_NRAddCallback\fR(\fIinterp, postProcPtr, data0, data1, data2, data3\fR) -.fi -.SH ARGUMENTS -.AS Tcl_CmdDeleteProc *postProcPtr in -.AP Tcl_Interp *interp in -Interpreter in which to create or evaluate a command. -.AP char *cmdName in -Name of a new command to create. -.AP Tcl_ObjCmdProc *proc in -Implementation of a command that will be called whenever \fIcmdName\fR -is invoked as a command in the unoptimized way. -.AP Tcl_ObjCmdProc *nreProc in -Implementation of a command that will be called whenever \fIcmdName\fR -is invoked and requested to conserve the C stack. -.AP ClientData clientData in -Arbitrary one-word value that will be passed to \fIproc\fR, \fInreProc\fR, -\fIdeleteProc\fR and \fIobjProc\fR. -.AP Tcl_CmdDeleteProc *deleteProc in/out -Procedure to call before \fIcmdName\fR is deleted from the interpreter. -This procedure allows for command-specific cleanup. If \fIdeletProc\fR -is \fBNULL\fR, then no procedure is called before the command is deleted. -.AP int objc in -Count of parameters provided to the implementation of a command. -.AP Tcl_Obj **objv in -Pointer to an array of Tcl objects. Each object holds the value of a -single word in the command to execute. -.AP Tcl_Obj *objPtr in -Pointer to a Tcl_Obj whose value is a script to execute. -.AP int flags in -ORed combination of flag bits that specify additional options. -\fBTCL_EVAL_GLOBAL\fR is the only flag that is currently supported. -.\" TODO: This is a lie. But kbk didn't grasp TCL_EVAL_INVOKE and -.\" TCL_EVAL_NOERR well enough to document them. -.AP Tcl_Command cmd in -.AP Tcl_NRPostProc *postProcPtr in -Pointer to a function that will be invoked when the command currently -executing in the interpreter designated by \fIinterp\fR completes. -.AP ClientData data0 in -.AP ClientData data1 in -.AP ClientData data2 in -.AP ClientData data3 in -\fIdata0\fR through \fIdata3\fR are four one-word values that will be passed -to the function designated by \fIpostProcPtr\fR when it is invoked. -.BE -.SH DESCRIPTION -.PP -This series of C functions provides an interface whereby commands that -are implemented in C can be evaluated, and invoke Tcl commands scripts -and scripts, without consuming space on the C stack. The non-recursive -evaluation is done by installing a \fItrampoline\fR, a small piece of -code that invokes a command or script, and then executes a series of -callbacks when the command or script returns. -.PP -The \fBTcl_NRCreateCommand\fR function creates a Tcl command in the -interpreter designated by \fIinterp\fR that is prepared to handle -nonrecursive evaluation with a trampoline. The \fIcmdName\fR argument -gives the name of the new command. If \fIcmdName\fR contains any -namespace qualifiers, then the new command is added to the specified -namespace; otherwise, it is added to the global namespace. \fIproc\fR -gives the procedure that will be called when the interpreter wishes to -evaluate the command in an unoptimized manner, and \fInreProc\fR is -the procedure that will be called when the interpreter wishes to -evaluate the command using a trampoline. \fIdeleteProc\fR is a -function that will be called before the command is deleted from the -interpreter. When any of the three functions is invoked, it is passed -the \fIclientData\fR parameter. -.PP -\fBTcl_NRCreateCommand\fR deletes any existing command -\fIname\fR already associated with the interpreter -(however see below for an exception where the existing command -is not deleted). -It returns a token that may be used to refer -to the command in subsequent calls to \fBTcl_GetCommandName\fR. -If \fBTcl_NRCreateCommand\fR is called for an interpreter that is in -the process of being deleted, then it does not create a new command, -does not delete any existing command of the same name, and returns NULL. -.PP -The \fIproc\fR and \fInreProc\fR function are expected to conform to -all the rules set forth for the \fIproc\fR argument to -\fBTcl_CreateObjCommand\fR(3) (\Iq.v.\fR). -.PP -When a command that is written to cope with evaluation via trampoline -is invoked without a trampoline on the stack, it will usually respond -to the invocation by creating a trampoline and calling the -trampoline-enabled implementation of the same command. This call is done by -means of \fBTcl_NRCallObjProc\fR. In the call to -\fBTcl_NRCallObjProc\fR, the \fIinterp\fR, \fIclientData\fR, -\fIobjc\fR and \fIobjv\fR parameters should be the same ones that were -passed to \fIproc\fR. The \fInreProc\fR parameter should designate the -trampoline-enabled implementation of the command. -.PP -\fBTcl_NREvalObj\fR arranges for the script contained in \fIobjPtr\fR -to be evaluated in the interpreter designated by \fIinterp\fR after -the current command (which must be trampoline-enabled) returns. It is -the method by which a command may invoke a script without consuming -space on the C stack. Similarly, \fBTcl_NREvalObjv\fR arranges to -invoke a single Tcl command whose words have already been separated -and substituted. The \fIobjc\fR and \fIobjv\fR parameters give the -words of the command to be evaluated when execution reaches the -trampoline. -.PP -\fBTcl_NRCmdSwap allows for trampoline evaluation of a command whose -resolution is already known. The \fIcmd\fR parameter gives a -\fBTcl_Command\fR object (returned from \fBTcl_CreateObjCmd\fR or -\fBTcl_GetCommandFromObj\fR) identifying the command to be invoked in -the trampoline; this command must match the word in \fIobjv[0]\fR. -The remaining arguments are as for \fBTcl_NREvalObj\fR. -.PP -\fBTcl_NREvalObj\fR, \fBTcl_NREvalObjv\fR and \fBTcl_NRCmdSwap\fR -all accept a \fIflags\fR parameter, which is an OR-ed-together set of -bits to control evaluation. At the present time, the only flag -available to callers is \fBTCL_EVAL_GLOBAL\fR. -.\" TODO: Again, this is a lie. Do we want to explain TCL_EVAL_INVOKE -.\" and TCL_EVAL_NOERR? -If the \fBTCL_EVAL_GLOBAL\fR flag is set, the script or command is -evaluated in the global namespace. If it is not set, it is evaluated -in the current namespace. -.PP -All three of the routines return \fBTCL_OK\fR if command invocation -has been scheduled successfully. If for any reason command invocation -cannot be scheduled (for example, if the interpreter is unable to find -the requested command), they return \fBTCL_ERROR\fR with an -appropriate message left in the interpreter's result. -.PP -\fBTcl_NRAddCallback\fR arranges to have a C function called when the -current trampoline-enabled command in the Tcl interpreter designated -by \fIinterp\fR returns. The \fIpostProcPtr\fR argument is a pointer -to the callback function, which must have arguments and return value -consistent with the \fBTcl_NRPostProc\fR data type: -.PP -.CS -typedef int -\fBTcl_NRPostProc\fR( - \fBClientData\fR \fIdata\fR[], - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIresult\fR); -.CE -.PP -When the trampoline invokes the callback function, the \fIdata\fR -parameter will point to an array containing the four one-word -quantities that were passed to \fBTcl_NRAddCallback\fR in the -\fIdata0\fR through \fIdata3\fR parameters. The Tcl interpreter will -be designated by the \fIinterp\fR parameter, and the \fIresult\fR -parameter will contain the result (\fBTCL_OK\fR, \fBTCL_ERROR\fR, -\fBTCL_RETURN\fR, \fBTCL_BREAK\fR or \fBTCL_CONTINUE\fR) that was -returned by the command evaluation. The callback function is expected, -in turn, either to return a \fIresult\fR to control further evaluation. -.PP -Multiple \fBTcl_NRAddCallback\fR invocations may request multiple -callbacks, which may be to the same or different callback -functions. If multiple callbacks are requested, they are executed in -last-in, first-out order, that is, the most recently requested -callback is executed first. -.SH EXAMPLE -.PP -The usual pattern for Tcl commands that invoke other Tcl commands -is something like: -.PP -.CS -int \fITheCmdObjProc\fR( - \fBClientData\fR \fIclientData\fR, - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIobjc\fR, - \fBTcl_Obj\fR *const \fIobjv\fR[]) -{ - int \fIresult\fR; - \fBTcl_Obj\fR *\fIobjPtr\fR; - \fI... preparation ...\fR - \fIresult\fR = \fBTcl_EvalObjEx\fR(\fIinterp\fR, \fIobjPtr\fR, 0); - \fI... postprocessing ...\fR - return \fIresult\fR; -} -\fBTcl_CreateObjCommand\fR(\fIinterp\fR, "theCommand", - \fITheCmdObjProc\fR, \fIclientData\fR, - \fITheCmdDeleteProc\fR); -.CE -.PP -To enable a command like this one for trampoline-based evaluation, -it must be split into three pieces: -.IP \(bu -A non-trampoline implementation, \fITheCmdNewObjProc\fR, -which will simply create a trampoline -and invoke the trampoline-based implementation. -.IP \(bu -A trampoline-enabled implementation, \fITheCmdNRObjProc\fR. This -function will perform the initialization, request that the trampoline -call the postprocessing routine after command evaluation, and finally, -request that the trampoline call the inner command. -.IP \(bu -A postprocessing routine, \fITheCmdPostProc\fR. This function will -perform the postprocessing formerly done after the return from the -inner command in \fITheCmdObjProc\fR. -.PP -The non-trampoline implementation is simple and stylized, containing -a single statement: -.PP -.CS -int -TheCmdNewObjProc - \fBClientData\fR \fIclientData\fR, - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIobjc\fR, - \fBTcl_Obj\fR *const \fIobjv\fR[]) -{ - return \fBTcl_NRCallObjProc\fR(\fIinterp, name,\fR - \fITheCmdNRObjProc, clientData, objc, objv\fR); -} -.CE -.PP -The trampoline-enabled implementation requests postprocessing, -and returns to the trampoline requesting command evaluation. -.PP -.CS -int -TheCmdNRObjProc - \fBClientData\fR \fIclientData\fR, - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIobjc\fR, - \fBTcl_Obj\fR *const \fIobjv\fR[]) -{ - \fI... preparation ...\fR - \fBTcl_NRAddCallback\fR(\fIinterp, TheCmdPostProc,\fR - \fIdata0, data1, data2, data3\fR); - /* \fIdata0 .. data3\fR are up to four one-word items - * to pass to the postprocessing procedure */ - return \fBTcl_NREvalObj\fR(\fIinterp, objPtr, 0\fR); -} -.CE -.PP -The postprocessing procedure does whatever the original command did -upon return from the inner evaluation. -.PP -.CS -int -TheCmdNRPostProc - \fBClientData\fR \fIdata\fR[], - \fBTcl_Interp\fR *\fIinterp\fR, - int \fRresult\fR -{ - /* \fIdata[0] .. data[4]\fR are the four words of data - * passed to \fBTcl_NREvalObj\fR */ - \fI... postprocessing ...\fR - return result; -} -.CE -.PP -If \fItheCommand\fR is a command that results in multiple commands or -scripts being evaluated, its postprocessing routine may schedule -additional postprocessing and then request another command evaluation -by means of \fBTcl_NREvalObj\fR or one of the other evaluation -routines. Looping and sequencing constructs may be implemented in this way. -.PP -Finally, to install a trampoline-enabled command in the interpreter, -\fBTcl_NRCreateCommand\fR is used in place of -\fBTcl_CreateObjCommand\fR. It accepts two command procedures instead -of one. The first is for use when no trampoline is yet on the stack, -and the second is for use when there is already a trampoline in place. -.PP -.CS -\fBTcl_NRCreateCommand\fR(\fIinterp\fR, "theCommand", - \fITheCmdObjProc\fR, \fITheCmdNRObjProc\fR, \fIclientData\fR, - \fITheCmdDeleteProc\fR); -.CE -.SH "SEE ALSO" -Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandFromObj(3) -.SH KEYWORDS -stackless, nonrecursive, execute, command, global, object, result, script -.SH COPYRIGHT -Copyright (c) 2008 by Kevin B. Kenny \ No newline at end of file +.\" +.\" Copyright (c) 2008 by Kevin B. Eknny. +.\" + +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: NRE.3,v 1.2 2008/12/15 23:42:01 patthoyts Exp $ +'\" +.so man.macros +.TH NRE 3 8.6 Tcl "Tcl Library Procedures" +.BS +.SH NAME +Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmdSwap, Tcl_NRAddCallback \- Non-Recursive (stackless) evaluation of Tcl scripts. +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +Tcl_Command +\fBTcl_NRCreateCommand\fR(\fIinterp, cmdName, proc, nreProc, clientData, deleteProc\fR) +.sp +int +\fBTcl_NRCallObjProc\fR(\fIinterp, nreProc, clientData, objc, objv\fR) +.sp +int +\fBTcl_NREvalObj\fR(\fIinterp, objPtr, flags\fR) +.sp +int +\fBTcl_NREvalObjv\fR(\fIinterp, objc, objv, flags\fR) +.sp +int +\fBTcl_NRCmdSwap\fR(\fIinterp, cmd, objc, objv, flags\fR) +.sp +void +\fBTcl_NRAddCallback\fR(\fIinterp, postProcPtr, data0, data1, data2, data3\fR) +.fi +.SH ARGUMENTS +.AS Tcl_CmdDeleteProc *postProcPtr in +.AP Tcl_Interp *interp in +Interpreter in which to create or evaluate a command. +.AP char *cmdName in +Name of a new command to create. +.AP Tcl_ObjCmdProc *proc in +Implementation of a command that will be called whenever \fIcmdName\fR +is invoked as a command in the unoptimized way. +.AP Tcl_ObjCmdProc *nreProc in +Implementation of a command that will be called whenever \fIcmdName\fR +is invoked and requested to conserve the C stack. +.AP ClientData clientData in +Arbitrary one-word value that will be passed to \fIproc\fR, \fInreProc\fR, +\fIdeleteProc\fR and \fIobjProc\fR. +.AP Tcl_CmdDeleteProc *deleteProc in/out +Procedure to call before \fIcmdName\fR is deleted from the interpreter. +This procedure allows for command-specific cleanup. If \fIdeletProc\fR +is \fBNULL\fR, then no procedure is called before the command is deleted. +.AP int objc in +Count of parameters provided to the implementation of a command. +.AP Tcl_Obj **objv in +Pointer to an array of Tcl objects. Each object holds the value of a +single word in the command to execute. +.AP Tcl_Obj *objPtr in +Pointer to a Tcl_Obj whose value is a script to execute. +.AP int flags in +ORed combination of flag bits that specify additional options. +\fBTCL_EVAL_GLOBAL\fR is the only flag that is currently supported. +.\" TODO: This is a lie. But kbk didn't grasp TCL_EVAL_INVOKE and +.\" TCL_EVAL_NOERR well enough to document them. +.AP Tcl_Command cmd in +.AP Tcl_NRPostProc *postProcPtr in +Pointer to a function that will be invoked when the command currently +executing in the interpreter designated by \fIinterp\fR completes. +.AP ClientData data0 in +.AP ClientData data1 in +.AP ClientData data2 in +.AP ClientData data3 in +\fIdata0\fR through \fIdata3\fR are four one-word values that will be passed +to the function designated by \fIpostProcPtr\fR when it is invoked. +.BE +.SH DESCRIPTION +.PP +This series of C functions provides an interface whereby commands that +are implemented in C can be evaluated, and invoke Tcl commands scripts +and scripts, without consuming space on the C stack. The non-recursive +evaluation is done by installing a \fItrampoline\fR, a small piece of +code that invokes a command or script, and then executes a series of +callbacks when the command or script returns. +.PP +The \fBTcl_NRCreateCommand\fR function creates a Tcl command in the +interpreter designated by \fIinterp\fR that is prepared to handle +nonrecursive evaluation with a trampoline. The \fIcmdName\fR argument +gives the name of the new command. If \fIcmdName\fR contains any +namespace qualifiers, then the new command is added to the specified +namespace; otherwise, it is added to the global namespace. \fIproc\fR +gives the procedure that will be called when the interpreter wishes to +evaluate the command in an unoptimized manner, and \fInreProc\fR is +the procedure that will be called when the interpreter wishes to +evaluate the command using a trampoline. \fIdeleteProc\fR is a +function that will be called before the command is deleted from the +interpreter. When any of the three functions is invoked, it is passed +the \fIclientData\fR parameter. +.PP +\fBTcl_NRCreateCommand\fR deletes any existing command +\fIname\fR already associated with the interpreter +(however see below for an exception where the existing command +is not deleted). +It returns a token that may be used to refer +to the command in subsequent calls to \fBTcl_GetCommandName\fR. +If \fBTcl_NRCreateCommand\fR is called for an interpreter that is in +the process of being deleted, then it does not create a new command, +does not delete any existing command of the same name, and returns NULL. +.PP +The \fIproc\fR and \fInreProc\fR function are expected to conform to +all the rules set forth for the \fIproc\fR argument to +\fBTcl_CreateObjCommand\fR(3) (\Iq.v.\fR). +.PP +When a command that is written to cope with evaluation via trampoline +is invoked without a trampoline on the stack, it will usually respond +to the invocation by creating a trampoline and calling the +trampoline-enabled implementation of the same command. This call is done by +means of \fBTcl_NRCallObjProc\fR. In the call to +\fBTcl_NRCallObjProc\fR, the \fIinterp\fR, \fIclientData\fR, +\fIobjc\fR and \fIobjv\fR parameters should be the same ones that were +passed to \fIproc\fR. The \fInreProc\fR parameter should designate the +trampoline-enabled implementation of the command. +.PP +\fBTcl_NREvalObj\fR arranges for the script contained in \fIobjPtr\fR +to be evaluated in the interpreter designated by \fIinterp\fR after +the current command (which must be trampoline-enabled) returns. It is +the method by which a command may invoke a script without consuming +space on the C stack. Similarly, \fBTcl_NREvalObjv\fR arranges to +invoke a single Tcl command whose words have already been separated +and substituted. The \fIobjc\fR and \fIobjv\fR parameters give the +words of the command to be evaluated when execution reaches the +trampoline. +.PP +\fBTcl_NRCmdSwap allows for trampoline evaluation of a command whose +resolution is already known. The \fIcmd\fR parameter gives a +\fBTcl_Command\fR object (returned from \fBTcl_CreateObjCmd\fR or +\fBTcl_GetCommandFromObj\fR) identifying the command to be invoked in +the trampoline; this command must match the word in \fIobjv[0]\fR. +The remaining arguments are as for \fBTcl_NREvalObj\fR. +.PP +\fBTcl_NREvalObj\fR, \fBTcl_NREvalObjv\fR and \fBTcl_NRCmdSwap\fR +all accept a \fIflags\fR parameter, which is an OR-ed-together set of +bits to control evaluation. At the present time, the only flag +available to callers is \fBTCL_EVAL_GLOBAL\fR. +.\" TODO: Again, this is a lie. Do we want to explain TCL_EVAL_INVOKE +.\" and TCL_EVAL_NOERR? +If the \fBTCL_EVAL_GLOBAL\fR flag is set, the script or command is +evaluated in the global namespace. If it is not set, it is evaluated +in the current namespace. +.PP +All three of the routines return \fBTCL_OK\fR if command invocation +has been scheduled successfully. If for any reason command invocation +cannot be scheduled (for example, if the interpreter is unable to find +the requested command), they return \fBTCL_ERROR\fR with an +appropriate message left in the interpreter's result. +.PP +\fBTcl_NRAddCallback\fR arranges to have a C function called when the +current trampoline-enabled command in the Tcl interpreter designated +by \fIinterp\fR returns. The \fIpostProcPtr\fR argument is a pointer +to the callback function, which must have arguments and return value +consistent with the \fBTcl_NRPostProc\fR data type: +.PP +.CS +typedef int +\fBTcl_NRPostProc\fR( + \fBClientData\fR \fIdata\fR[], + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIresult\fR); +.CE +.PP +When the trampoline invokes the callback function, the \fIdata\fR +parameter will point to an array containing the four one-word +quantities that were passed to \fBTcl_NRAddCallback\fR in the +\fIdata0\fR through \fIdata3\fR parameters. The Tcl interpreter will +be designated by the \fIinterp\fR parameter, and the \fIresult\fR +parameter will contain the result (\fBTCL_OK\fR, \fBTCL_ERROR\fR, +\fBTCL_RETURN\fR, \fBTCL_BREAK\fR or \fBTCL_CONTINUE\fR) that was +returned by the command evaluation. The callback function is expected, +in turn, either to return a \fIresult\fR to control further evaluation. +.PP +Multiple \fBTcl_NRAddCallback\fR invocations may request multiple +callbacks, which may be to the same or different callback +functions. If multiple callbacks are requested, they are executed in +last-in, first-out order, that is, the most recently requested +callback is executed first. +.SH EXAMPLE +.PP +The usual pattern for Tcl commands that invoke other Tcl commands +is something like: +.PP +.CS +int \fITheCmdObjProc\fR( + \fBClientData\fR \fIclientData\fR, + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIobjc\fR, + \fBTcl_Obj\fR *const \fIobjv\fR[]) +{ + int \fIresult\fR; + \fBTcl_Obj\fR *\fIobjPtr\fR; + \fI... preparation ...\fR + \fIresult\fR = \fBTcl_EvalObjEx\fR(\fIinterp\fR, \fIobjPtr\fR, 0); + \fI... postprocessing ...\fR + return \fIresult\fR; +} +\fBTcl_CreateObjCommand\fR(\fIinterp\fR, "theCommand", + \fITheCmdObjProc\fR, \fIclientData\fR, + \fITheCmdDeleteProc\fR); +.CE +.PP +To enable a command like this one for trampoline-based evaluation, +it must be split into three pieces: +.IP \(bu +A non-trampoline implementation, \fITheCmdNewObjProc\fR, +which will simply create a trampoline +and invoke the trampoline-based implementation. +.IP \(bu +A trampoline-enabled implementation, \fITheCmdNRObjProc\fR. This +function will perform the initialization, request that the trampoline +call the postprocessing routine after command evaluation, and finally, +request that the trampoline call the inner command. +.IP \(bu +A postprocessing routine, \fITheCmdPostProc\fR. This function will +perform the postprocessing formerly done after the return from the +inner command in \fITheCmdObjProc\fR. +.PP +The non-trampoline implementation is simple and stylized, containing +a single statement: +.PP +.CS +int +TheCmdNewObjProc + \fBClientData\fR \fIclientData\fR, + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIobjc\fR, + \fBTcl_Obj\fR *const \fIobjv\fR[]) +{ + return \fBTcl_NRCallObjProc\fR(\fIinterp, name,\fR + \fITheCmdNRObjProc, clientData, objc, objv\fR); +} +.CE +.PP +The trampoline-enabled implementation requests postprocessing, +and returns to the trampoline requesting command evaluation. +.PP +.CS +int +TheCmdNRObjProc + \fBClientData\fR \fIclientData\fR, + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIobjc\fR, + \fBTcl_Obj\fR *const \fIobjv\fR[]) +{ + \fI... preparation ...\fR + \fBTcl_NRAddCallback\fR(\fIinterp, TheCmdPostProc,\fR + \fIdata0, data1, data2, data3\fR); + /* \fIdata0 .. data3\fR are up to four one-word items + * to pass to the postprocessing procedure */ + return \fBTcl_NREvalObj\fR(\fIinterp, objPtr, 0\fR); +} +.CE +.PP +The postprocessing procedure does whatever the original command did +upon return from the inner evaluation. +.PP +.CS +int +TheCmdNRPostProc + \fBClientData\fR \fIdata\fR[], + \fBTcl_Interp\fR *\fIinterp\fR, + int \fRresult\fR +{ + /* \fIdata[0] .. data[4]\fR are the four words of data + * passed to \fBTcl_NREvalObj\fR */ + \fI... postprocessing ...\fR + return result; +} +.CE +.PP +If \fItheCommand\fR is a command that results in multiple commands or +scripts being evaluated, its postprocessing routine may schedule +additional postprocessing and then request another command evaluation +by means of \fBTcl_NREvalObj\fR or one of the other evaluation +routines. Looping and sequencing constructs may be implemented in this way. +.PP +Finally, to install a trampoline-enabled command in the interpreter, +\fBTcl_NRCreateCommand\fR is used in place of +\fBTcl_CreateObjCommand\fR. It accepts two command procedures instead +of one. The first is for use when no trampoline is yet on the stack, +and the second is for use when there is already a trampoline in place. +.PP +.CS +\fBTcl_NRCreateCommand\fR(\fIinterp\fR, "theCommand", + \fITheCmdObjProc\fR, \fITheCmdNRObjProc\fR, \fIclientData\fR, + \fITheCmdDeleteProc\fR); +.CE +.SH "SEE ALSO" +Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandFromObj(3) +.SH KEYWORDS +stackless, nonrecursive, execute, command, global, object, result, script +.SH COPYRIGHT +Copyright (c) 2008 by Kevin B. Kenny -- cgit v0.12 From 037500d28aee14c1ac5aafce81d2fb69bef43059 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 16 Dec 2008 14:34:56 +0000 Subject: * generic/tcl.h: Add TIP 338 routines to stub table. * generic/tcl.decls: [Bug 2431338]. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: --- ChangeLog | 8 ++++++++ generic/tcl.decls | 10 +++++++++- generic/tcl.h | 5 +---- generic/tclDecls.h | 23 ++++++++++++++++++++++- generic/tclStubInit.c | 4 +++- 5 files changed, 43 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86efb0e..9c45911 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-16 Don Porter + + * generic/tcl.h: Add TIP 338 routines to stub table. + * generic/tcl.decls: [Bug 2431338]. + + * generic/tclDecls.h: make genstubs + * generic/tclStubInit.c: + 2008-12-15 Donal K. Fellows * generic/tclExecute.c (TEBC:INST_DICT_GET): Make sure that the result diff --git a/generic/tcl.decls b/generic/tcl.decls index 334f004..350c5d6 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.161 2008/12/15 18:33:25 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.162 2008/12/16 14:34:56 dgp Exp $ library tcl @@ -2262,6 +2262,14 @@ declare 620 generic { declare 621 generic { int Tcl_ZlibStreamReset(Tcl_ZlibStream zshandle) } +# TIP 338 +declare 622 generic { + void Tcl_SetStartupScript(Tcl_Obj *path, const char *encoding) +} +declare 623 generic { + Tcl_Obj *Tcl_GetStartupScript(const char **encodingPtr) +} + ############################################################################## diff --git a/generic/tcl.h b/generic/tcl.h index 844dbcb..8539e0a 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.282 2008/12/15 15:48:33 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.283 2008/12/16 14:34:56 dgp Exp $ */ #ifndef _TCL @@ -2339,9 +2339,6 @@ EXTERN const char * TclTomMathInitializeStubs (Tcl_Interp *interp, EXTERN void Tcl_Main (int argc, char **argv, Tcl_AppInitProc *appInitProc); -EXTERN void Tcl_SetStartupScript(Tcl_Obj *path, - const char *encoding); -EXTERN Tcl_Obj * Tcl_GetStartupScript(const char **encodingPtr); EXTERN const char * Tcl_PkgInitStubsCheck (Tcl_Interp *interp, const char *version, int exact); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 8c58b9c..c7e0286 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.162 2008/12/15 18:33:25 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.163 2008/12/16 14:34:56 dgp Exp $ */ #ifndef _TCLDECLS @@ -3758,6 +3758,17 @@ EXTERN int Tcl_ZlibStreamClose (Tcl_ZlibStream zshandle); /* 621 */ EXTERN int Tcl_ZlibStreamReset (Tcl_ZlibStream zshandle); #endif +#ifndef Tcl_SetStartupScript_TCL_DECLARED +#define Tcl_SetStartupScript_TCL_DECLARED +/* 622 */ +EXTERN void Tcl_SetStartupScript (Tcl_Obj * path, + const char * encoding); +#endif +#ifndef Tcl_GetStartupScript_TCL_DECLARED +#define Tcl_GetStartupScript_TCL_DECLARED +/* 623 */ +EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingPtr); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4439,6 +4450,8 @@ typedef struct TclStubs { int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */ + void (*tcl_SetStartupScript) (Tcl_Obj * path, const char * encoding); /* 622 */ + Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6999,6 +7012,14 @@ extern const TclStubs *tclStubsPtr; #define Tcl_ZlibStreamReset \ (tclStubsPtr->tcl_ZlibStreamReset) /* 621 */ #endif +#ifndef Tcl_SetStartupScript +#define Tcl_SetStartupScript \ + (tclStubsPtr->tcl_SetStartupScript) /* 622 */ +#endif +#ifndef Tcl_GetStartupScript +#define Tcl_GetStartupScript \ + (tclStubsPtr->tcl_GetStartupScript) /* 623 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index d64f061..fbdeb13 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.174 2008/12/15 15:48:33 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.175 2008/12/16 14:34:57 dgp Exp $ */ #include "tclInt.h" @@ -1147,6 +1147,8 @@ static const TclStubs tclStubs = { Tcl_ZlibStreamGet, /* 619 */ Tcl_ZlibStreamClose, /* 620 */ Tcl_ZlibStreamReset, /* 621 */ + Tcl_SetStartupScript, /* 622 */ + Tcl_GetStartupScript, /* 623 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From d96f5fd46fbc01bb5872e17889c060c950d8348b Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 16 Dec 2008 15:50:47 +0000 Subject: Re-fix [2431847] --- generic/tclExecute.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9fc6dc8..058f93f 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.420 2008/12/15 23:09:24 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.421 2008/12/16 15:50:47 ferrieux Exp $ */ #include "tclInt.h" @@ -7085,10 +7085,7 @@ TclExecuteByteCode( "%u => ERROR reading leaf dictionary key \"%s\": ", opnd, O2S(dictPtr)), Tcl_GetObjResult(interp)); } else { - Tcl_Obj *tmpObj; - - TclNewObj(tmpObj); - Tcl_SetObjResult(interp, tmpObj); + Tcl_ResetResult(interp); Tcl_AppendResult(interp, "key \"", TclGetString(OBJ_AT_TOS), "\" not known in dictionary", NULL); TRACE_WITH_OBJ(("%u => ERROR ", opnd), Tcl_GetObjResult(interp)); -- cgit v0.12 From 6b6e674b124007355ab1ed199867e73b220fb4c7 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Dec 2008 16:36:08 +0000 Subject: First implementation of TIP#329 --- ChangeLog | 8 ++ library/init.tcl | 233 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 222 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c45911..d86c96a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-16 Donal K. Fellows + + TIP #329 IMPLEMENTATION + + * library/init.tcl (throw, try): Implementation of commands documented + in TIP. This implementation is in Tcl and is a stop-gap until + higher-performance ones can be written. + 2008-12-16 Don Porter * generic/tcl.h: Add TIP 338 routines to stub table. diff --git a/library/init.tcl b/library/init.tcl index 084ddbc..dfb1777 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.115 2008/10/16 17:04:58 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.116 2008/12/16 16:36:08 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -113,6 +113,201 @@ namespace eval tcl { } } +# TIP #329: [try] and [throw] +# These are *temporary* implementations, to be replaced with ones in C and +# bytecode at a later date before 8.6.0 +namespace eval ::tcl::control { + # These are not local, since this allows us to [uplevel] a [catch] rather + # than [catch] the [uplevel]ing of something, resulting in a cleaner + # -errorinfo: + variable em {} + variable opts {} + + variable magicCodes { ok 0 error 1 return 2 break 3 continue 4 } + + namespace export throw try + + # ::tcl::control::throw -- + # + # Creates an error with machine-readable "code" parts and + # human-readable "message" parts. + # + # Arguments: + # throw - list describing errorcode + # message - Human-readable version of error + proc throw {type message} { + return -code error -errorcode $type -errorinfo $message -level 1 \ + $message + } + + # ::tcl::control::try -- + # + # Advanced error handling construct. + # + # Arguments: + # See try(n) for details + proc try {args} { + variable magicCodes + + # ----- Parse arguments ----- + + set trybody [lindex $args 0] + set finallybody {} + set handlers [list] + set i 1 + + while {$i < [llength $args]} { + switch -- [lindex $args $i] { + "on" { + incr i + set code [lindex $args $i] + if {[dict exists $magicCodes $code]} { + set code [dict get $magicCodes $code] + } elseif {![string is integer -strict $code]} { + set msgPart [join [dict keys $magicCodes] {", "}] + error "bad code '[lindex $args $i]': must be\ + integer or \"$msgPart\"" + } + lappend handlers [lrange $args $i $i] \ + [format %d $code] {} {*}[lrange $args $i+1 $i+2] + incr i 3 + } + "trap" { + incr i + if {![string is list [lindex $args $i]]} { + error "bad prefix '[lindex $args $i]':\ + must be a list" + } + lappend handlers [lrange $args $i $i] 1 \ + {*}[lrange $args $i+1 $i+2] + incr i 3 + } + "finally" { + incr i + set finallybody [lindex $args $i] + incr i + break + } + default { + error "bad handler '[lindex $args $i]': must be\ + \"on code varlist body\", or\ + \"trap prefix varlist body\"" + } + } + } + + if {($i != [llength $args]) || ([lindex $handlers end] eq "-")} { + error "wrong # args: should be\ + \"try body ?handler ...? ?finally body?\"" + } + + # ----- Execute 'try' body ----- + + variable em + variable opts + set EMVAR [namespace which -variable em] + set OPTVAR [namespace which -variable opts] + set code [uplevel 1 [list ::catch $trybody $EMVAR $OPTVAR]] + + if {$code == 1} { + set line [dict get $opts -errorline] + dict append opts -errorinfo \ + "\n (\"[lindex [info level 0] 0]\" body line $line)" + } + + # Keep track of the original error message & options + set _em $em + set _opts $opts + + # ----- Find and execute handler ----- + + set errorcode {} + if {[dict exists $opts -errorcode]} { + set errorcode [dict get $opts -errorcode] + } + set found false + foreach {descrip oncode pattern varlist body} $handlers { + if {!$found} { + if { + ($code != $oncode) || ([lrange $pattern 0 end] ne + [lrange $errorcode 0 [llength $pattern]-1] ) + } then { + continue + } + } + set found true + if {$body eq "-"} { + continue + } + + # Handler found ... + + # Assign trybody results into variables + lassign $varlist resultsVarName optionsVarName + if {[llength $varlist] >= 1} { + upvar 1 $resultsVarName resultsvar + set resultsvar $em + } + if {[llength $varlist] >= 2} { + upvar 1 $optionsVarName optsvar + set optsvar $opts + } + + # Execute the handler + set code [uplevel 1 [list ::catch $body $EMVAR $OPTVAR]] + + if {$code == 1} { + set line [dict get $opts -errorline] + dict append opts -errorinfo \ + "\n (\"[lindex [info level 0] 0] ... $descrip\"\ + body line $line)" + # On error chain to original outcome + dict set opts -during $_opts + } + + # Handler result replaces the original result (whether success or + # failure); capture context of original exception for reference. + set _em $em + set _opts $opts + + # Handler has been executed - stop looking for more + break + } + + # No catch handler found -- error falls through to caller + # OR catch handler executed -- result falls through to caller + + # ----- If we have a finally block then execute it ----- + + if {$finallybody ne {}} { + set code [uplevel 1 [list ::catch $finallybody $EMVAR $OPTVAR]] + + # Finally result takes precedence except on success + + if {$code == 1} { + set line [dict get $opts -errorline] + dict append opts -errorinfo \ + "\n (\"[lindex [info level 0] 0] ... finally\"\ + body line $line)" + # On error chain to original outcome + dict set opts -during $_opts + } + if {$code != 0} { + set _em $em + set _opts $opts + } + + # Otherwise our result is not affected + } + + # Propagate the error or the result of the executed catch body to the + # caller. + dict incr _opts -level + return -options $_opts $_em + } +} +namespace import ::tcl::control::* + # Windows specific end of initialization if {(![interp issafe]) && ($tcl_platform(platform) eq "windows")} { @@ -179,9 +374,9 @@ if {[interp issafe]} { -subcommands { add clicks format microseconds milliseconds scan seconds }] - + # Auto-loading stubs for 'clock.tcl' - + foreach cmd {add format scan} { proc ::tcl::clock::$cmd args { variable TclLibDir @@ -276,7 +471,7 @@ proc unknown args { if {$code == 1} { # # Compute stack trace contribution from the [uplevel]. - # Note the dependence on how Tcl_AddErrorInfo, etc. + # Note the dependence on how Tcl_AddErrorInfo, etc. # construct the stack trace. # set errorInfo [dict get $opts -errorinfo] @@ -407,7 +602,7 @@ proc unknown args { # library file to create the procedure. Returns 1 if it successfully # loaded the procedure, 0 otherwise. # -# Arguments: +# Arguments: # cmd - Name of the command to find and load. # namespace (optional) The namespace where the command is being used - must be # a canonical namespace as returned [namespace current] @@ -431,7 +626,7 @@ proc auto_load {cmd {namespace {}}} { # info commands $name # Unfortunately, if the name has glob-magic chars in it like * # or [], it may not match. For our purposes here, a better - # route is to use + # route is to use # namespace which -command $name if {[namespace which -command $name] ne ""} { return 1 @@ -462,7 +657,7 @@ proc auto_load {cmd {namespace {}}} { # of available commands. Returns 1 if the index is loaded, and 0 if # the index is already loaded and up to date. # -# Arguments: +# Arguments: # None. proc auto_load_index {} { @@ -552,7 +747,7 @@ proc auto_qualify {cmd namespace} { return [list [string range $cmd 2 end]] } } - + # Potentially returning 2 elements to try : # (if the current namespace is not the global one) @@ -610,13 +805,13 @@ proc auto_import {pattern} { # auto_execok -- # -# Returns string that indicates name of program to execute if +# Returns string that indicates name of program to execute if # name corresponds to a shell builtin or an executable in the -# Windows search path, or "" otherwise. Builds an associative -# array auto_execs that caches information about previous checks, +# Windows search path, or "" otherwise. Builds an associative +# array auto_execs that caches information about previous checks, # for speed. # -# Arguments: +# Arguments: # name - Name of a command. if {$tcl_platform(platform) eq "windows"} { @@ -671,7 +866,7 @@ proc auto_execok name { set path "[file dirname [info nameof]];.;" if {[info exists env(WINDIR)]} { - set windir $env(WINDIR) + set windir $env(WINDIR) } if {[info exists windir]} { if {$tcl_platform(os) eq "Windows NT"} { @@ -736,13 +931,13 @@ proc auto_execok name { # This procedure is called by Tcl's core when attempts to call the # filesystem's copydirectory function fail. The semantics of the call # are that 'dest' does not yet exist, i.e. dest should become the exact -# image of src. If dest does exist, we throw an error. -# +# image of src. If dest does exist, we throw an error. +# # Note that making changes to this procedure can change the results # of running Tcl's tests. # -# Arguments: -# action - "renaming" or "copying" +# Arguments: +# action - "renaming" or "copying" # src - source directory # dest - destination directory proc tcl::CopyDirectory {action src dest} { @@ -770,7 +965,7 @@ proc tcl::CopyDirectory {action src dest} { # exists, then we should only call this function if -force # is true, which means we just want to over-write. So, # the following code is now commented out. - # + # # return -code error "error $action \"$src\" to\ # \"$dest\": file already exists" } else { @@ -803,7 +998,7 @@ proc tcl::CopyDirectory {action src dest} { # Have to be careful to capture both visible and hidden files. # We will also be more generous to the file system and not # assume the hidden and non-hidden lists are non-overlapping. - # + # # On Unix 'hidden' files begin with '.'. On other platforms # or filesystems hidden files may have other interpretations. set filelist [concat [glob -nocomplain -directory $src *] \ -- cgit v0.12 From c60b536070b85c710718c88d757ab0a70ab52e15 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Dec 2008 21:29:09 +0000 Subject: Docs for TIP 329. --- ChangeLog | 1 + doc/throw.n | 50 +++++++++++++++++++++++++++++ doc/try.n | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 doc/throw.n create mode 100644 doc/try.n diff --git a/ChangeLog b/ChangeLog index d86c96a..278d95d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ TIP #329 IMPLEMENTATION + * doc/throw.n, doc/try.n: Documentation of the new commands. * library/init.tcl (throw, try): Implementation of commands documented in TIP. This implementation is in Tcl and is a stop-gap until higher-performance ones can be written. diff --git a/doc/throw.n b/doc/throw.n new file mode 100644 index 0000000..2c69df8 --- /dev/null +++ b/doc/throw.n @@ -0,0 +1,50 @@ +'\" +'\" Copyright (c) 2008 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: throw.n,v 1.1 2008/12/16 21:29:10 dkf Exp $ +'\" +.so man.macros +.TH throw n 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +throw \- Generate a machine-readable error +.SH SYNOPSIS +\fBthrow\fI type message\fR +.BE +.SH DESCRIPTION +.PP +This command causes the current evaluation to be unwound with an error. The +error created is described by the \fItype\fR and \fImessage\fR arguments: +\fItype\fR must contain a list of words describing the error in a form that is +machine-readable (and which will form the error-code part of the result +dictionary), and \fImessage\fR should contain text that is intended for +display to a human being. +.PP +The stack will be unwound until the error is trapped by a suitable \fBcatch\fR +or \fBtry\fR command. If it reaches the event loop without being trapped, it +will be reported through the \fBbgerror\fR mechanism. If it reaches the top +level of script evaluation in \fBtclsh\fR, it will be printed on the console +before, in the non-interactive case, causing an exit (the behavior in other +programs will depend on the details of how Tcl is embedded and used). +.PP +By convention, the words in the \fItype\fR argument should go from most +general to most specific. +.SH EXAMPLES +.PP +The following produces an error that is identical to that produced by +\fBexpr\fR when trying to divide a value by zero. +.PP +.CS +\fBthrow\fR {ARITH DIVZERO {divide by zero}} {divide by zero} +.CE +.SH "SEE ALSO" +catch(n), error(n), return(n), try(n) +.SH "KEYWORDS" +error, exception +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/try.n b/doc/try.n new file mode 100644 index 0000000..f6ccb7f --- /dev/null +++ b/doc/try.n @@ -0,0 +1,104 @@ +'\" +'\" Copyright (c) 2008 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: try.n,v 1.1 2008/12/16 21:29:10 dkf Exp $ +'\" +.so man.macros +.TH try n 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +try \- Trap and process errors and exceptions +.SH SYNOPSIS +\fBtry\fI body\fR ?\fIhandler...\fR? ?\fBfinally\fI script\fR? +.BE +.SH DESCRIPTION +.PP +This command executes the script \fIbody\fR and, depending on what the outcome +of that script is (normal exit, error, or some other exceptional result), runs +a handler script to deal with the case. Once that has all happened, if the +\fBfinally\fR clause is present, the \fIscript\fR it includes will be run and +the result of the handler (or the \fIbody\fR if no handler matched) is allowed +to continue to propagate. Note that the \fBfinally\fR clause is processed even +if an error occurs and irrespective of which, if any, \fIhandler\fR is used. +.PP +The \fIhandler\fR clauses are each expressed as several words, and must have +one of the following forms: +.TP +\fBon \fIcode variableList script\fR +. +This clause matches if the evaluation of \fIbody\fR completed with the +exeception code \fIcode\fR. The \fIcode\fR may be expressed as an integer or +one of the following literal words: \fBok\fR, \fBerror\fR, \fBreturn\fR, +\fBbreak\fR, or \fBcontinue\fR. Those literals correspond to the integers 0 +through 4 respectively. +.TP +\fBtrap \fIpattern variableList script\fR +. +This clause matches if the evaluation of \fIbody\fR resulted in an error and +the prefix of the \fB\-errorcode\fR from the interpreter's status dictionary +is equal to the \fIpattern\fR. The number of prefix words taken from the +\fB\-errorcode\fR is equal to the list-length of \fIpattern\fR, and inter-word +spaces are normalized in both the \fB\-errorcode\fR and \fIpattern\fR before +comparison. +.PP +The \fIvariableList\fR word in each \fIhandler\fR is always interpreted as a +list of variable names. If the first word of the list is present and +non-empty, it names a variable into which the result of the evaluation of +\fIbody\fR (from the main \fBtry\fR) will be placed; this will contain the +human-readable form of any errors. If the second word of the list is present +and non-empty, it names a variable into which the options dictionary of the +interpreter at the moment of completion of execution of \fIbody\fR. +.PP +The \fIscript\fR word of each \fIhandler\fR is also always interpreted the +same: as a Tcl script to evaluate if the clause is matched. If \fIscript\fR is +a literal +.QW \- +and the \fIhandler\fR is not the last one, the \fIscript\fR of the following +\fIhandler\fR is invoked instead (just like with the \fBswitch\fR command). +.PP +Note that \fIhandler\fR clauses are matched against in order, and that the +first matching one is always selected. At most one \fIhandler\fR clause will +selected. As a consequence, an \fBon error\fR will mask any subsequent +\fBtrap\fR in the \fBtry\fR. Also note that \fBon error\fR is equivalent to +\fBtrap {}\fR. +.PP +If an exception (i.e. any non-\fBok\fR result) occurs during the evaluation of +either the \fIhandler\fR or the \fBfinally\fR clause, the original exception's +status dictionary will be added to the new exception's status dictionary under +the \fB\-during\fR key. +.SH EXAMPLES +.PP +Ensure that a file is closed no matter what: +.PP +.CS +set f [open /some/file/name a] +\fBtry\fR { + puts $f "some message" + # ... +} \fBfinally\fR { + close $f +} +.CE +.PP +Handle different reasons for a file to not be openable for reading: +.PP +.CS +\fBtry\fR { + set f [open /some/file/name] +} \fBtrap\fR {POSIX EISDIR} {} { + puts "failed to open /some/file/name: it's a directory" +} \fBtrap\fR {POSIX ENOENT} {} { + puts "failed to open /some/file/name: it doesn't exist" +} +.CE +.SH "SEE ALSO" +catch(n), error(n), return(n), throw(n) +.SH "KEYWORDS" +cleanup, error, exception, final, resource management +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 977a090166dda2bebde368bb72fb138117ad7be1 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Dec 2008 22:03:25 +0000 Subject: Fix bug in 'trap' handlers (introduced by DKF's editing originally) --- library/init.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/init.tcl b/library/init.tcl index dfb1777..71635fb 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.116 2008/12/16 16:36:08 dkf Exp $ +# RCS: @(#) $Id: init.tcl,v 1.117 2008/12/16 22:03:25 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -179,7 +179,7 @@ namespace eval ::tcl::control { must be a list" } lappend handlers [lrange $args $i $i] 1 \ - {*}[lrange $args $i+1 $i+2] + {*}[lrange $args $i $i+2] incr i 3 } "finally" { -- cgit v0.12 From 74318119b04effffec948581aa1004b23fdd6c3b Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Dec 2008 22:07:58 +0000 Subject: Added tests for [throw] and [try]. --- ChangeLog | 1 + tests/error.test | 604 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 564 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 278d95d..3f999a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ TIP #329 IMPLEMENTATION + * tests/error.test: Tests for the new commands. * doc/throw.n, doc/try.n: Documentation of the new commands. * library/init.tcl (throw, try): Implementation of commands documented in TIP. This implementation is in Tcl and is a stop-gap until diff --git a/tests/error.test b/tests/error.test index 67c87b4..dfb466f 100644 --- a/tests/error.test +++ b/tests/error.test @@ -1,17 +1,17 @@ -# Commands covered: error, catch +# Commands covered: error, catch, throw, try # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.16 2006/10/09 19:15:44 msofer Exp $ +# RCS: @(#) $Id: error.test,v 1.17 2008/12/16 22:07:58 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -19,6 +19,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } namespace eval ::tcl::test::error { + proc foo {} { global errorInfo set a [catch {format [error glorp2]} b] @@ -36,66 +37,55 @@ proc foo2 {} { test error-1.1 {simple errors from commands} { catch {format [string index]} b } 1 - test error-1.2 {simple errors from commands} { catch {format [string index]} b set b } {wrong # args: should be "string index string charIndex"} - test error-1.3 {simple errors from commands} { catch {format [string index]} b set ::errorInfo - # this used to return '... while executing ...', but - # string index is fully compiled as of 8.4a3 + # This used to return '... while executing ...', but string index is fully + # compiled as of 8.4a3 } {wrong # args: should be "string index string charIndex" while executing "string index"} - test error-1.4 {simple errors from commands} { catch {error glorp} b } 1 - test error-1.5 {simple errors from commands} { catch {error glorp} b set b } glorp - test error-1.6 {simple errors from commands} { catch {catch a b c d} b } 1 - test error-1.7 {simple errors from commands} { catch {catch a b c d} b set b } {wrong # args: should be "catch script ?resultVarName? ?optionVarName?"} - test error-1.8 {simple errors from commands} { - # This test is non-portable: it generates a memory fault on - # machines like DEC Alphas (infinite recursion overflows - # stack?) + # This test is non-portable: it generates a memory fault on machines like + # DEC Alphas (infinite recursion overflows stack?) # # That claims sounds like a bug to be fixed rather than a portability - # problem. Anyhow, I believe it's out of date (bug's been fixed) so - # this test is re-enabled. - + # problem. Anyhow, I believe it's out of date (bug's been fixed) so this + # test is re-enabled. proc p {} { uplevel 1 catch p error } p } 0 -# Check errors nested in procedures. Also check the optional argument -# to "error" to generate a new error trace. +# Check errors nested in procedures. Also check the optional argument to +# "error" to generate a new error trace. test error-2.1 {errors in nested procedures} { catch foo b } 1 - test error-2.2 {errors in nested procedures} { catch foo b set b } {Human-generated} - test error-2.3 {errors in nested procedures} { catch foo b set ::errorInfo @@ -105,16 +95,13 @@ test error-2.3 {errors in nested procedures} { (procedure "foo" line 4) invoked from within "foo"} - test error-2.4 {errors in nested procedures} { catch foo2 b } 1 - test error-2.5 {errors in nested procedures} { catch foo2 b set b } {Human-generated} - test error-2.6 {errors in nested procedures} { catch foo2 b set ::errorInfo @@ -221,21 +208,552 @@ test error-6.9 {catch must reset error state} { list $::errorCode } {NONE} - test error-7.0 {Bug 1397843} -body { +test error-7.1 {Bug 1397843} -body { + variable cmds + proc EIWrite args { variable cmds - proc EIWrite args { - variable cmds - lappend cmds [lindex [info level -2] 0] + lappend cmds [lindex [info level -2] 0] + } + proc BadProc {} { + set i a + incr i + } + trace add variable ::errorInfo write [namespace code EIWrite] + catch BadProc + trace remove variable ::errorInfo write [namespace code EIWrite] + set cmds +} -match glob -result {*BadProc*} + +# throw tests + +test error-8.1 {throw produces error 1 at level 0} { + catch { throw FOO bar } +} {1} +test error-8.2 {throw behaves as error does at level 0} { + catch { throw FOO bar } em1 opts1 + catch { error bar {} FOO } em2 opts2 + dict set opts1 -result $em1 + dict set opts2 -result $em2 + foreach key {-code -level -result -errorcode} { + if { [dict get $opts1 $key] ne [dict get $opts2 $key] } { + error "error/throw outcome differs on '$key'" + } + } +} {} +test error-8.3 {throw produces error 1 at level > 0} { + proc throw_foo {} { + throw FOO bar + } + catch { throw_foo } +} {1} +test error-8.4 {throw behaves as error does at level > 0} { + proc throw_foo {} { + throw FOO bar + } + proc error_foo {} { + error bar {} FOO + } + catch { throw_foo } em1 opts1 + catch { error_foo } em2 opts2 + dict set opts1 -result $em1 + dict set opts2 -result $em2 + foreach key {-code -level -result -errorcode} { + if { [dict get $opts1 $key] ne [dict get $opts2 $key] } { + error "error/throw outcome differs on '$key'" + } + } +} {} + +# simple try tests: body completes with code ok + +test error-9.1 {try (ok, empty result) with no handlers} { + try list +} {} +test error-9.2 {try (ok, non-empty result) with no handlers} { + try { list a b c } +} {a b c} +test error-9.3 {try (ok, non-empty result) with trap handler} { + try { list a b c } trap {} {} { list d e f } +} {a b c} +test error-9.4 {try (ok, non-empty result) with on handler} { + try { list a b c } on break {} { list d e f } +} {a b c} +test error-9.5 {try (ok, non-empty result) with on ok handler} { + try { list a b c } on ok {} { list d e f } +} {d e f} + +# simple try tests - "on" handler matching + +test error-10.1 {try with on ok} { + try { list a b c } on ok {} { list d e f } +} {d e f} +test error-10.2 {try with on 0} { + try { list a b c } on 0 {} { list d e f } +} {d e f} +test error-10.3 {try with on error (using error)} { + try { error a b c } on error {} { list d e f } +} {d e f} +test error-10.4 {try with on error (using return -code)} { + try { return -level 0 -code 1 a } on error {} { list d e f } +} {d e f} +test error-10.5 {try with on error (using throw)} { + try { throw c a } on error {} { list d e f } +} {d e f} +test error-10.6 {try with on 1 (using error)} { + try { error a b c } on 1 {} { list d e f } +} {d e f} +test error-10.7 {try with on return} { + try { return [list a b c] } on return {} { list d e f } +} {d e f} +test error-10.8 {try with on break} { + try { break } on break {} { list d e f } +} {d e f} +test error-10.9 {try with on continue} { + try { continue } on continue {} { list d e f } +} {d e f} +test error-10.10 {try with on for arbitrary (decimal) return code} { + try { return -level 0 -code 123456 } on 123456 {} { list d e f } +} {d e f} +test error-10.11 {try with on for arbitrary (hex) return code} { + try { return -level 0 -code 0x123456 } on 0x123456 {} { list d e f } +} {d e f} +test error-10.12 {try with on for arbitrary return code (mixed number representations)} { + try { return -level 0 -code 0x10 } on 16 {} { list d e f } +} {d e f} + +# simple try tests - "trap" handler matching + +test error-11.1 {try with trap all} { + try { throw FOO bar } trap {} {} { list d e f } +} {d e f} +test error-11.2 {try with trap (exact)} { + try { throw FOO bar } trap {FOO} {} { list d e f } +} {d e f} +test error-11.3 {try with trap (prefix 1)} { + try { throw [list FOO A B C D] bar } trap {FOO} {} { list d e f } +} {d e f} +test error-11.4 {try with trap (prefix 2)} { + try { throw [list FOO A B C D] bar } trap {FOO A} {} { list d e f } +} {d e f} +test error-11.5 {try with trap (prefix 3)} { + try { throw [list FOO A B C D] bar } trap {FOO A B} {} { list d e f } +} {d e f} +test error-11.6 {try with trap (prefix 4)} { + try { throw [list FOO A B C D] bar } trap {FOO A B C} {} { list d e f } +} {d e f} +test error-11.7 {try with trap (exact, 5 elements)} { + try { throw [list FOO A B C D] bar } trap {FOO A B C D} {} { list d e f } +} {d e f} + +# simple try tests - variable assignment and result handling + +test error-12.1 {try with no variable assignment in on handler} { + try { throw FOO bar } on error {} { list d e f } +} {d e f} +test error-12.2 {try with result variable assignment in on handler} { + try { throw FOO bar } on error {res} { set res } +} {bar} +test error-12.3 {try with result variable assignment in on handler, var remains in scope} { + try { throw FOO bar } on error {res} { list d e f } + set res +} {bar} +test error-12.4 {try with result/opts variable assignment in on handler} { + try { + throw FOO bar + } on error {res opts} { + set r "$res,[dict get $opts -errorcode]" + } +} {bar,FOO} +test error-12.5 {try with result/opts variable assignment in on handler, vars remain in scope} { + try { throw FOO bar } on error {res opts} { list d e f } + set r "$res,[dict get $opts -errorcode]" +} {bar,FOO} +test error-12.6 {try result is propagated if no matching handler} { + try { list a b c } on error {} { list d e f } +} {a b c} +test error-12.7 {handler result is propagated if handler executes} { + try { throw FOO bar } on error {} { list d e f } +} {d e f} + +# negative case try tests - bad args to try + +test error-13.1 {try with no arguments} -body { + # warning: error message may change + try +} -returnCodes error -match glob -result {wrong # args: *} +test error-13.2 {try with body only (ok) } { + try list +} {} +test error-13.3 {try with missing finally body } -body { + # warning: error message may change + try list finally +} -returnCodes error -match glob -result {wrong # args: *} +test error-13.4 {try with bad handler keyword } -body { + # warning: error message may change + try list then a b c +} -returnCodes error -match glob -result {bad handler *} +test error-13.5 {try with partial handler #1 } -body { + # warning: error message may change + try list on +} -returnCodes error -match glob -result {bad code *} +test error-13.6 {try with partial handler #2 } -body { + # warning: error message may change + try list on error +} -returnCodes error -match glob -result {wrong # args: *} +test error-13.7 {try with partial handler #3 } -body { + # warning: error message may change + try list on error {em opts} +} -returnCodes error -match glob -result {wrong # args: *} +test error-13.8 {try with multiple handlers and finally (ok)} { + try list on error {} {} trap {} {} {} finally {} +} {} +test error-13.9 {last handler body can't be a fallthrough #1} -body { + try list on error {} {} on break {} - +} -returnCodes error -match glob -result {wrong # args: *} +test error-13.10 {last handler body can't be a fallthrough #2} -body { + try list on error {} {} on break {} - finally { list d e f } +} -returnCodes error -match glob -result {wrong # args: *} + +# try tests - multiple handlers (left-to-right matching, only one runs) + +test error-14.1 {try with multiple handlers (only one matches) #1} { + try { throw FOO bar } on ok {} { list a b c } trap FOO {} { list d e f } +} {d e f} +test error-14.2 {try with multiple handlers (only one matches) #2} { + try { throw FOO bar } trap FOO {} { list d e f } on ok {} { list a b c } +} {d e f} +test error-14.3 {try with multiple handlers (only one matches) #3} { + try { + throw FOO bar + } on break {} { + list x y z + } trap FOO {} { + list d e f + } on ok {} { + list a b c + } +} {d e f} +test error-14.4 {try with multiple matching handlers (only the first in left-to-right order runs) #1} { + try { throw FOO bar } on error {} { list a b c } trap FOO {} { list d e f } +} {a b c} +test error-14.5 {try with multiple matching handlers (only the first in left-to-right order runs) #2} { + try { throw FOO bar } trap FOO {} { list d e f } on error {} { list a b c } +} {d e f} +test error-14.6 {try with multiple matching handlers (only the first in left-to-right order runs) #3} { + try { throw FOO bar } trap {} {} { list d e f } on 1 {} { list a b c } +} {d e f} +test error-14.7 {try with multiple matching handlers (only the first in left-to-right order runs) #4} { + try { throw FOO bar } on 1 {} { list a b c } trap {} {} { list d e f } +} {a b c} +test error-14.8 {try with handler-of-last-resort "trap {}"} { + try { throw FOO bar } trap FOX {} { list a b c } trap {} {} { list d e f } +} {d e f} +test error-14.9 {try with handler-of-last-resort "on error"} { + try { foo } trap FOX {} { list a b c } on error {} { list d e f } +} {d e f} + +# try tests - propagation (no matching handlers) + +test error-15.1 {try with no handler (ok result propagates)} { + try { list a b c } +} {a b c} +test error-15.2 {try with no matching handler (ok result propagates)} { + try { list a b c } on error {} { list d e f } +} {a b c} +test error-15.3 {try with no handler (error result propagates)} -body { + try { throw FOO bar } +} -returnCodes error -result {bar} +test error-15.4 {try with no matching handler (error result propagates)} -body { + try { throw FOO bar } trap FOX {} { list a b c } +} -returnCodes error -result {bar} +test error-15.5 {try with no handler (return result propagates)} -body { + try { return bar } +} -returnCodes 2 -result {bar} +test error-15.6 {try with no matching handler (break result propagates)} -body { + try { if {1} break } on error {} { list a b c } +} -returnCodes 3 -result {} +test error-15.7 {try with no matching handler (unknown integer result propagates)} -body { + try { return -level 0 -code 123456 } trap {} {} { list a b c } +} -returnCodes 123456 -result {} + +# try tests - propagation (exceptions in handlers, exception chaining) + +test error-16.1 {try with successfully executed handler} { + try { throw FOO bar } trap FOO {} { list a b c } +} {a b c} +test error-16.2 {try with exception (error) in handler} -body { + try { throw FOO bar } trap FOO {} { throw BAR foo } +} -returnCodes error -result {foo} +test error-16.3 {try with exception (return) in handler} -body { + try { throw FOO bar } trap FOO {} { return BAR } +} -returnCodes 2 -result {BAR} +test error-16.4 {try with exception (break) in handler #1} -body { + try { throw FOO bar } trap FOO {} { break } +} -returnCodes 3 -result {} +test error-16.5 {try with exception (break) in handler #2} { + for { set i 5 } { $i < 10 } { incr i } { + try { throw FOO bar } trap FOO {} { break } + } + set i +} {5} +test error-16.6 {try with variable assignment and propagation #1} { + # Ensure that the handler variables preserve the exception off the + # try-body, and are not modified by the exception off the handler + catch { + try { throw FOO bar } trap FOO {em} { throw BAR baz } + } + set em +} {bar} +test error-16.7 {try with variable assignment and propagation #2} { + catch { + try { throw FOO bar } trap FOO {em opts} { throw BAR baz } + } + list $em [dict get $opts -errorcode] +} {bar FOO} +test error-16.8 {exception chaining (try=ok, handler=error)} { + #FIXME is the intent of this test correct? + catch { + try { list a b c } on ok {em opts} { throw BAR baz } + } tryem tryopts + string equal $opts [dict get $tryopts -during] +} {1} +test error-16.9 {exception chaining (try=error, handler=error)} { + # The exception off the handler should chain to the exception off the + # try-body (using the -during option) + catch { + try { throw FOO bar } trap {} {em opts} { throw BAR baz } + } tryem tryopts + string equal $opts [dict get $tryopts -during] +} {1} +test error-16.10 {no exception chaining when handler is successful} { + catch { + try { throw FOO bar } trap {} {em opts} { list d e f } + } tryem tryopts + dict exists $tryopts -during +} {0} +test error-16.11 {no exception chaining when handler is a non-error exception} { + catch { + try { throw FOO bar } trap {} {em opts} { break } + } tryem tryopts + dict exists $tryopts -during +} {0} + +# try tests - finally + +test error-17.1 {finally always runs (try with ok result)} { + set RES {} + try { list a b c } finally { set RES done } + set RES +} {done} +test error-17.2 {finally always runs (try with error result)} { + set RES {} + catch { + try { throw FOO bar } finally { set RES done } + } + set RES +} {done} +test error-17.3 {finally always runs (try with matching handler)} { + set RES {} + try { throw FOO bar } trap FOO {} { list a b c } finally { set RES done } + set RES +} {done} +test error-17.4 {finally always runs (try with exception in handler)} { + set RES {} + catch { + try { + throw FOO bar + } trap FOO {} { + throw BAR baz + } finally { + set RES done } - proc BadProc {} { - set i a - incr i + } + set RES +} {done} +test error-17.5 {successful finally doesn't modify try outcome (try=ok)} { + try { list a b c } finally { list d e f } +} {a b c} +test error-17.6 {successful finally doesn't modify try outcome (try=return)} -body { + try { return c } finally { list d e f } +} -returnCodes 2 -result {c} +test error-17.7 {successful finally doesn't modify try outcome (try=error)} -body { + try { error bar } finally { list d e f } +} -returnCodes 1 -result {bar} +test error-17.8 {successful finally doesn't modify handler outcome (handler=ok)} { + try { throw FOO bar } trap FOO {} { list a b c } finally { list d e f } +} {a b c} +test error-17.9 {successful finally doesn't modify handler outcome (handler=error)} -body { + try { throw FOO bar } trap FOO {} { throw BAR baz } finally { list d e f } +} -returnCodes error -result {baz} +test error-17.10 {successful finally doesn't affect variable assignment} { + catch { + try { throw FOO bar } trap FOO {em opts} { list d e f } finally { list d e f } + } result + list $em $result +} {bar {d e f}} +test error-17.11 {successful finally doesn't affect variable assignment or propagation} { + catch { + try { throw FOO bar } trap FOO {em opts} { throw BAR baz } finally { list d e f } + } + list $em [dict get $opts -errorcode] +} {bar FOO} + +# try tests - propagation (exceptions in finally, exception chaining) + +test error-18.1 {try (ok) with exception in finally (error)} -body { + try { list a b c } finally { throw BAR foo } +} -returnCodes error -result {foo} +test error-18.2 {try (error) with exception in finally (break)} -body { + try { throw FOO bar } finally { break } +} -returnCodes 3 -result {} +test error-18.3 {try (ok) with handler (ok) and exception in finally (error)} -body { + try { list a b c } on ok {} { list d e f } finally { throw BAR foo } +} -returnCodes error -result {foo} +test error-18.4 {try (error) with exception in handler (error) and in finally (arb code)} -body { + try { throw FOO bar } on error {} { throw BAR baz } finally { return -level 0 -code 99 zing } +} -returnCodes 99 -result {zing} +test error-18.5 {exception in finally doesn't affect variable assignment} { + catch { + try { throw FOO bar } trap FOO {em opts} { throw BAR baz } finally { throw BAZ zing } + } + list $em [dict get $opts -errorcode] +} {bar FOO} +test error-18.6 {exception chaining in finally (try=ok)} { + catch { + list a b c + } em expopts + catch { + try { list a b c } finally { throw BAR foo } + } em opts + string equal $expopts [dict get $opts -during] +} {1} +test error-18.7 {exception chaining in finally (try=error)} { + catch { + try { throw FOO bar } finally { throw BAR baz } + } em opts + dict get $opts -during -errorcode +} {FOO} +test error-18.8 {exception chaining in finally (try=ok, handler=ok)} { + catch { + try { list a b c } on ok {} { list d e f } finally { throw BAR baz } + } em opts + list [dict get $opts -during -code] [dict exists $opts -during -during] +} {0 0} +test error-18.9 {exception chaining in finally (try=error, handler=ok)} { + catch { + try { + throw FOO bar + } on error {} { + list d e f + } finally { + throw BAR baz + } + } em opts + list [dict get $opts -during -code] [dict exists $opts -during -during] +} {0 0} +test error-18.10 {exception chaining in finally (try=error, handler=error)} { + catch { + try { + throw FOO bar + } on error {} { + throw BAR baz + } finally { + throw BAR baz } - trace add variable ::errorInfo write [namespace code EIWrite] - catch BadProc - trace remove variable ::errorInfo write [namespace code EIWrite] - set cmds - } -match glob -result {*BadProc*} + } em opts + list [dict get $opts -during -errorcode] [dict get $opts -during -during -errorcode] +} {BAR FOO} +test error-18.11 {no exception chaining if finally produces a non-error exception} { + catch { + try { throw FOO bar } on error {} { throw BAR baz } finally { break } + } em opts + dict exists $opts -during +} {0} +test error-18.12 {variable assignment unaffected by exception in finally} { + catch { + try { + throw FOO bar + } on error {em opts} { + list a b c + } finally { + throw BAR baz + } + } + list $em [dict get $opts -errorcode] +} {bar FOO} + +# try tests - fallthough body cases + +test error-19.1 {try with fallthrough body #1} { + set RES {} + try { list a b c } on ok { set RES 0 } - on error {} { set RES 1 } + set RES +} {1} +test error-19.2 {try with fallthrough body #2} { + set RES {} + try { + throw FOO bar + } trap BAR {} { + } trap FOO {} - trap {} {} { + set RES foo + } on error {} { + set RES err + } + set RES +} {foo} +test error-19.3 {try with cascade fallthrough} { + set RES {} + try { + throw FOO bar + } trap FOO {} - trap BAR {} - trap {} {} { + set RES trap + } on error {} { set RES err } + set RES +} {trap} +test error-19.4 {multiple unrelated fallthroughs #1} { + set RES {} + try { + throw FOO bar + } trap FOO {} - trap BAR {} { + set RES foo + } trap {} {} - on error {} { + set RES err + } + set RES +} {foo} +test error-19.5 {multiple unrelated fallthroughs #2} { + set RES {} + try { + throw BAZ zing + } trap FOO {} - trap BAR {} { + set RES foo + } trap {} {} - on error {} { + set RES err + } + set RES +} {err} + +# FIXME test what vars get set on fallthough ... what is the correct behavior? +# It would seem appropriate to set at least those for the matching handler and +# the executed body; possibly for each handler we fall through as well? + +# negative case try tests - bad "on" handler + +test error-20.1 {bad code name in on handler} -body { + try { list a b c } on foo {} {} +} -returnCodes error -match glob -result {bad code *} +test error-20.2 {bad code value in on handler} -body { + try { list a b c } on 34985723094872345 {} {} +} -returnCodes error -match glob -result {bad code *} + +# negative case try tests - bad "trap" handler +# what is the effect if we attempt to trap an errorcode that is not a list? +# nested try +# catch inside try +# no tests for bad varslist? +# -errorcode but code!=1 doesn't trap +# throw negative case tests (no args, too many args, etc) + } namespace delete ::tcl::test::error @@ -243,3 +761,7 @@ namespace delete ::tcl::test::error catch {rename p ""} ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 1d90238ed304fdd70f1a56dfc4f94a7add80c736 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 16 Dec 2008 23:24:13 +0000 Subject: eliminate -Wwrite-strings warnings in enable-threads build. use TclNewLiteralStringObj() --- ChangeLog | 8 ++++++++ generic/tclExecute.c | 6 +++--- generic/tclThreadTest.c | 12 ++++++------ unix/tclUnixFCmd.c | 7 ++++--- win/tclWinFCmd.c | 4 ++-- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f999a4..d4531ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-16 Jan Nijtmans + + * generic/tclThreadTest.c: eliminate -Wwrite-strings warnings + in enable-threads build. + * generic/tclExecute.c: use TclNewLiteralStringObj() + * unix/tclUnixFCmd.c: use TclNewLiteralStringObj() + * win/tclWinFCmd.c: use TclNewLiteralStringObj() + 2008-12-16 Donal K. Fellows TIP #329 IMPLEMENTATION diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 058f93f..ed656d5 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.421 2008/12/16 15:50:47 ferrieux Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.422 2008/12/16 23:24:13 nijtmans Exp $ */ #include "tclInt.h" @@ -2879,7 +2879,7 @@ TclExecuteByteCode( Tcl_Panic("TclExecuteByteCode: unrecognized builtin function code %d", opnd); } - objPtr = Tcl_NewStringObj("::tcl::mathfunc::", 17); + TclNewLiteralStringObj(objPtr, "::tcl::mathfunc::"); Tcl_AppendToObj(objPtr, tclBuiltinFuncTable[opnd].name, -1); /* @@ -2927,7 +2927,7 @@ TclExecuteByteCode( objc = TclGetUInt1AtPtr(pc+1); objPtr = OBJ_AT_DEPTH(objc-1); - tmpPtr = Tcl_NewStringObj("::tcl::mathfunc::", 17); + TclNewLiteralStringObj(tmpPtr, "::tcl::mathfunc::"); Tcl_AppendObjToObj(tmpPtr, objPtr); Tcl_DecrRefCount(objPtr); diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 82485ff..cad9e11 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.28 2008/11/19 00:04:49 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.29 2008/12/16 23:24:13 nijtmans Exp $ */ #include "tclInt.h" @@ -60,7 +60,7 @@ static struct ThreadSpecificData *threadList; */ typedef struct ThreadCtrl { - char *script; /* The Tcl command this thread should + const char *script; /* The Tcl command this thread should * execute */ int flags; /* Initial value of the "flags" field in the * ThreadSpecificData structure for the new @@ -124,7 +124,7 @@ EXTERN int TclThread_Init(Tcl_Interp *interp); EXTERN int Tcl_ThreadObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -EXTERN int TclCreateThread(Tcl_Interp *interp, char *script, +EXTERN int TclCreateThread(Tcl_Interp *interp, const char *script, int joinable); EXTERN int TclThreadList(Tcl_Interp *interp); EXTERN int TclThreadSend(Tcl_Interp *interp, Tcl_ThreadId id, @@ -281,7 +281,7 @@ Tcl_ThreadObjCmd( return TclThreadCancel(interp, (Tcl_ThreadId) id, result, flags); } case THREAD_CREATE: { - char *script; + const char *script; int joinable, len; if (objc == 2) { @@ -505,7 +505,7 @@ Tcl_ThreadObjCmd( int TclCreateThread( Tcl_Interp *interp, /* Current interpreter. */ - char *script, /* Script to execute */ + const char *script, /* Script to execute */ int joinable) /* Flag, joinable thread or not */ { ThreadCtrl ctrl; @@ -1189,7 +1189,7 @@ ThreadExitProc( * going to call free on it. */ - char *msg = "target thread died"; + const char *msg = "target thread died"; resultPtr->result = ckalloc(strlen(msg)+1); strcpy(resultPtr->result, msg); diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 442c6d6..2523800 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.70 2008/11/29 18:17:19 dkf Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.71 2008/12/16 23:24:13 nijtmans Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -1059,7 +1059,7 @@ TraverseUnixTree( unsigned short pathlen = ent->fts_pathlen - sourceLen; int type; Tcl_StatBuf *statBufPtr = NULL; - + if (info == FTS_DNR || info == FTS_ERR || info == FTS_NS) { errfile = ent->fts_path; break; @@ -1684,7 +1684,8 @@ SetPermissionsAttribute( Tcl_Obj * TclpObjListVolumes(void) { - Tcl_Obj *resultPtr = Tcl_NewStringObj("/", 1); + Tcl_Obj *resultPtr; + TclNewLiteralStringObj(resultPtr, "/"); Tcl_IncrRefCount(resultPtr); return resultPtr; diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 93ea1bc..c0de916 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.55 2008/10/26 18:43:26 dkf Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.56 2008/12/16 23:24:13 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1806,7 +1806,7 @@ ConvertFileNameFormat( */ if (Tcl_DStringValue(&dsTemp)[0] == '~') { - tempPath = Tcl_NewStringObj("./",2); + TclNewLiteralStringObj(tempPath, "./"); Tcl_AppendToObj(tempPath, Tcl_DStringValue(&dsTemp), Tcl_DStringLength(&dsTemp)); } else { -- cgit v0.12 From 13322e887e0515bacdfd999d1a60f719ec6b0cce Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 17 Dec 2008 14:15:42 +0000 Subject: Start "pkgs" module in CVS to support source distributions of Tcl with bundled packages. --- pkgs/README | 1 + 1 file changed, 1 insertion(+) create mode 100644 pkgs/README diff --git a/pkgs/README b/pkgs/README new file mode 100644 index 0000000..e2b33f5 --- /dev/null +++ b/pkgs/README @@ -0,0 +1 @@ +Add notes here about bundling packages with Tcl. -- cgit v0.12 From d77c012ac73b8e2be7fb8f6da653684273a2d949 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 17 Dec 2008 14:33:33 +0000 Subject: Removed unused flag. --- ChangeLog | 30 +++--- generic/tcl.h | 5 +- generic/tclZlib.c | 306 +++++++++++++++++++++++++++++++++++------------------- 3 files changed, 221 insertions(+), 120 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4531ca..32cd96a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,14 @@ +2008-12-17 Donal K. Fellows + + * generic/tcl.h, generic/tclZlib.c: Removed undocumented flag. + 2008-12-16 Jan Nijtmans - * generic/tclThreadTest.c: eliminate -Wwrite-strings warnings - in enable-threads build. - * generic/tclExecute.c: use TclNewLiteralStringObj() - * unix/tclUnixFCmd.c: use TclNewLiteralStringObj() - * win/tclWinFCmd.c: use TclNewLiteralStringObj() + * generic/tclThreadTest.c: Eliminate -Wwrite-strings warnings in + --enable-threads build. + * generic/tclExecute.c: Use TclNewLiteralStringObj() + * unix/tclUnixFCmd.c: Use TclNewLiteralStringObj() + * win/tclWinFCmd.c: Use TclNewLiteralStringObj() 2008-12-16 Donal K. Fellows @@ -19,7 +23,7 @@ 2008-12-16 Don Porter * generic/tcl.h: Add TIP 338 routines to stub table. - * generic/tcl.decls: [Bug 2431338]. + * generic/tcl.decls: [Bug 2431338] * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: @@ -31,16 +35,16 @@ 2008-12-15 Alexandre Ferrieux - * generic/tclBinary.c: Fix [Bug 2380293]. Redefine non-strict - * doc/binary.n: decoding to ignore only whitespace. + * generic/tclBinary.c: Redefine non-strict decoding to ignore only + * doc/binary.n: whitespace. [Bug 2380293] * tests/binary.test: 2008-12-15 Don Porter * doc/AddErrInfo.3: Documented Tcl_(Set|Get)ErrorLine (TIP 336). * doc/CrtCommand.3: Various other documentation updates to - * doc/CrtInterp.3: reflect the lack of access to Tcl_Interp fields - * doc/Interp.3: by default. + * doc/CrtInterp.3: reflect the lack of access to Tcl_Interp + * doc/Interp.3: fields by default. * doc/SetResult.3: * doc/tcl.decls: @@ -125,8 +129,8 @@ * tests/io.test: internal representation of the tclChannelType to contain not only the ChannelState pointer, but also a reference to the interpreter it was made in. Invalidate and recompute the - internal representation when it is used in a different interpreter - (Like cmdName intrep's). Added testcase. [Bug 2407783]. + internal representation when it is used in a different interpreter, + like cmdName intrep's. Added testcase. [Bug 2407783] 2008-12-11 Donal K. Fellows @@ -503,7 +507,7 @@ 2008-10-23 Miguel Sofer * generic/tclCmdAH.c (ForNextCallback): handle TCL_CONTINUE in the for - body [Bug 2186888]. + body. [Bug 2186888] 2008-10-22 Jan Nijtmans diff --git a/generic/tcl.h b/generic/tcl.h index 8539e0a..58cfd6e 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.283 2008/12/16 14:34:56 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.284 2008/12/17 14:33:33 dkf Exp $ */ #ifndef _TCL @@ -2268,10 +2268,9 @@ typedef int (*Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, /* * Constants that describe whether the stream is to operate in compressing or - * decompressing mode. The scripted level doesn't use pass-through mode. + * decompressing mode. */ -#define TCL_ZLIB_STREAM_PASS 0 #define TCL_ZLIB_STREAM_DEFLATE 16 #define TCL_ZLIB_STREAM_INFLATE 32 diff --git a/generic/tclZlib.c b/generic/tclZlib.c index e8a37a4..cca035f 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,12 +13,13 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.12 2008/12/15 22:07:27 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.13 2008/12/17 14:33:33 dkf Exp $ */ #include "tclInt.h" #ifdef HAVE_ZLIB #include +/* #define ENABLE_CHANSTACKING */ #define GZIP_MAGIC_FLAG 16 #define AUTO_MAGIC_FLAG 32 @@ -97,9 +98,9 @@ static int ChanBlockMode(ClientData instanceData, int mode); static int ChanFlush(ClientData instanceData); static int ChanHandler(ClientData instanceData, int interestMask); -static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int inMode, - int outMode, int format, int level, - Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr); +static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int mode, + int format, int level, Tcl_Channel channel, + Tcl_Obj *gzipHeaderDictPtr); static const Tcl_ChannelType zlibChannelType = { "zlib", @@ -121,15 +122,19 @@ static const Tcl_ChannelType zlibChannelType = { typedef struct { /* Generic channel info */ - Tcl_Channel channel; + Tcl_Channel parent; int flags; int mask; /* Zlib specific channel state */ - int inMode; - int outMode; - z_stream inStream; - z_stream outStream; + int mode; /* Either the value TCL_ZLIB_STREAM_DEFLATE + * for compression on output, or + * TCL_ZLIB_STREAM_INFLATE for decompression + * on input. */ + z_stream inStream; /* Structure used by zlib for decompression of + * input. */ + z_stream outStream; /* Structure used by zlib for compression of + * output. */ char *inBuffer; int inAllocated, inUsed, inPos; char *outBuffer; @@ -152,6 +157,12 @@ typedef struct { #define ASYNC 0x1 #define IN_HEADER 0x2 #define OUT_HEADER 0x4 + +/* + * Size of buffers allocated by default. Should be enough... + */ + +#define DEFAULT_BUFFER_SIZE 4096 #endif /* ENABLE_CHANSTACKING */ /* @@ -1751,7 +1762,7 @@ ZlibCmd( #ifdef ENABLE_CHANSTACKING case z_push: { /* push mode channel options...*/ Tcl_Channel chan; - int chanMode, inMode, outMode; + int chanMode, mode; static const char *pushOptions[] = { "-header", "-level", "-limit", NULL @@ -1771,33 +1782,27 @@ ZlibCmd( } switch ((enum zlibFormats) format) { case f_deflate: - inMode = TCL_ZLIB_STREAM_PASS; - outMode = TCL_ZLIB_STREAM_DEFLATE; + mode = TCL_ZLIB_STREAM_DEFLATE; format = TCL_ZLIB_FORMAT_GZIP; break; case f_inflate: - inMode = TCL_ZLIB_STREAM_INFLATE; - outMode = TCL_ZLIB_STREAM_PASS; + mode = TCL_ZLIB_STREAM_INFLATE; format = TCL_ZLIB_FORMAT_RAW; break; case f_compress: - inMode = TCL_ZLIB_STREAM_PASS; - outMode = TCL_ZLIB_STREAM_DEFLATE; + mode = TCL_ZLIB_STREAM_DEFLATE; format = TCL_ZLIB_FORMAT_ZLIB; break; case f_decompress: - inMode = TCL_ZLIB_STREAM_INFLATE; - outMode = TCL_ZLIB_STREAM_PASS; + mode = TCL_ZLIB_STREAM_INFLATE; format = TCL_ZLIB_FORMAT_ZLIB; break; case f_gzip: - inMode = TCL_ZLIB_STREAM_PASS; - outMode = TCL_ZLIB_STREAM_DEFLATE; + mode = TCL_ZLIB_STREAM_DEFLATE; format = TCL_ZLIB_FORMAT_GZIP; break; case f_gunzip: - inMode = TCL_ZLIB_STREAM_INFLATE; - outMode = TCL_ZLIB_STREAM_PASS; + mode = TCL_ZLIB_STREAM_INFLATE; format = TCL_ZLIB_FORMAT_GZIP; break; default: @@ -1814,13 +1819,13 @@ ZlibCmd( * Sanity checks. */ - if (outMode != TCL_ZLIB_STREAM_PASS && !(chanMode & TCL_WRITABLE)) { + if (mode == TCL_ZLIB_STREAM_DEFLATE && !(chanMode & TCL_WRITABLE)) { Tcl_AppendResult(interp, "compression may only be applied to writable channels", NULL); return TCL_ERROR; } - if (inMode != TCL_ZLIB_STREAM_PASS && !(chanMode & TCL_READABLE)) { + if (mode == TCL_ZLIB_STREAM_INFLATE && !(chanMode & TCL_READABLE)) { Tcl_AppendResult(interp, "decompression may only be applied to readable channels", NULL); @@ -1884,7 +1889,7 @@ ZlibCmd( } } - if (ZlibStackChannel(interp, inMode, outMode, format, level, chan, + if (ZlibStackChannel(interp, mode, format, level, chan, headerObj) == NULL) { return TCL_ERROR; } @@ -2101,20 +2106,12 @@ ChanClose( Tcl_Interp *interp) { ZlibChannelData *cd = instanceData; - Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); int e; - // TODO: flush? - if (cd->inMode == TCL_ZLIB_STREAM_INFLATE) { - e = inflateEnd(&cd->inStream); - } else if (cd->inMode == TCL_ZLIB_STREAM_DEFLATE) { + if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { e = deflateEnd(&cd->inStream); - } - - if (cd->outMode == TCL_ZLIB_STREAM_INFLATE) { + } else { e = inflateEnd(&cd->outStream); - } else if (cd->outMode == TCL_ZLIB_STREAM_DEFLATE) { - e = deflateEnd(&cd->outStream); } if (cd->inBuffer) { @@ -2137,17 +2134,29 @@ ChanInput( int *errorCodePtr) { ZlibChannelData *cd = instanceData; - Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); Tcl_DriverInputProc *inProc = - Tcl_ChannelInputProc(Tcl_GetChannelType(parent)); + Tcl_ChannelInputProc(Tcl_GetChannelType(cd->parent)); - if (cd->inMode == TCL_ZLIB_STREAM_PASS) { - return inProc(Tcl_GetChannelInstanceData(parent), buf, toRead, + if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { + return inProc(Tcl_GetChannelInstanceData(cd->parent), buf, toRead, errorCodePtr); } +#if 0 + cd->inStream.avail_in = 0; + do { + cd->inStream.next_out = (Bytef *) cd->inBuffer; + cd->inStream.avail_out = cd->inAllocated; + + if (inflate(&cd->inStream, Z_SYNC_FLUSH) != Z_OK) { + *errorCodePtr = EINVAL; + return 0; + } + } while (cd->inStream.avail_out > 0); +#endif // TODO - return TCL_OK; + *errorCodePtr = EINVAL; + return 0; } static int @@ -2158,17 +2167,38 @@ ChanOutput( int *errorCodePtr) { ZlibChannelData *cd = instanceData; - Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); Tcl_DriverOutputProc *outProc = - Tcl_ChannelOutputProc(Tcl_GetChannelType(parent)); + Tcl_ChannelOutputProc(Tcl_GetChannelType(cd->parent)); + int e; - if (cd->outMode == TCL_ZLIB_STREAM_PASS) { - return outProc(Tcl_GetChannelInstanceData(parent), buf, toWrite, + if (cd->mode == TCL_ZLIB_STREAM_INFLATE) { + return outProc(Tcl_GetChannelInstanceData(cd->parent), buf, toWrite, errorCodePtr); } - // TODO - return TCL_OK; + cd->outStream.next_in = (Bytef *) buf; + cd->outStream.avail_in = toWrite; + do { + cd->outStream.next_out = (Bytef *) cd->outBuffer; + cd->outStream.avail_out = cd->outAllocated; + + e = deflate(&cd->outStream, Z_NO_FLUSH); + + if (e == Z_OK && cd->outStream.avail_out > 0) { + if (Tcl_WriteRaw(cd->parent, cd->outBuffer, + (int) cd->outStream.avail_out) < 0) { + *errorCodePtr = Tcl_GetErrno(); + return 0; + } + } + } while (e == Z_OK && cd->outStream.avail_in > 0); + + if (e != Z_OK) { + *errorCodePtr = EINVAL; + return 0; + } + + return 1; } static int @@ -2179,9 +2209,9 @@ ChanSetOption( /* not used */ const char *value) { ZlibChannelData *cd = instanceData; - Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); Tcl_DriverSetOptionProc *setOptionProc = - Tcl_ChannelSetOptionProc(Tcl_GetChannelType(parent)); + Tcl_ChannelSetOptionProc(Tcl_GetChannelType(cd->parent)); + static const char *chanOptions = "flushmode"; if (optionName && strcmp(optionName, "-flushmode") == 0) { if (value[0] == 'f' && strcmp(value, "full") == 0) { @@ -2198,10 +2228,10 @@ ChanSetOption( /* not used */ } if (setOptionProc == NULL) { - return TCL_ERROR; + return Tcl_BadChannelOption(interp, optionName, chanOptions); } - return setOptionProc(Tcl_GetChannelInstanceData(parent), interp, + return setOptionProc(Tcl_GetChannelInstanceData(cd->parent), interp, optionName, value); } @@ -2213,51 +2243,97 @@ ChanGetOption( Tcl_DString *dsPtr) { ZlibChannelData *cd = instanceData; - Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); Tcl_DriverGetOptionProc *getOptionProc = - Tcl_ChannelGetOptionProc(Tcl_GetChannelType(parent)); + Tcl_ChannelGetOptionProc(Tcl_GetChannelType(cd->parent)); + static const char *chanOptions = "crc flushmode header"; + + /* + * The "crc" option reports the current CRC (calculated with the Adler32 + * or CRC32 algorithm according to the format) given the data that has + * been processed so far. + */ - if (strcmp(optionName, "-crc") == 0) { + if (optionName == NULL || strcmp(optionName, "-crc") == 0) { uLong crc; char buf[12]; - if (cd->flags & TCL_WRITABLE) { + // TODO: flush? + + if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { crc = cd->outStream.adler; } else { crc = cd->inStream.adler; } sprintf(buf, "0x%lx", crc); - Tcl_DStringAppend(dsPtr, buf, -1); - return TCL_OK; + if (optionName == NULL) { + Tcl_DStringAppendElement(dsPtr, "-crc"); + Tcl_DStringAppendElement(dsPtr, buf); + } else { + Tcl_DStringAppend(dsPtr, buf, -1); + return TCL_OK; + } } - if ((cd->flags & IN_HEADER) && (strcmp(optionName, "-header") == 0)) { + /* + * The "flushmode" option reports how the [flush] command will actually + * effect the channel. + */ + + if (optionName == NULL || strcmp(optionName, "-flushmode") == 0) { + char *value; + + if (cd->flushType == Z_FULL_FLUSH) { + value = "full"; + } else { + value = "sync"; + } + + if (optionName == NULL) { + Tcl_DStringAppendElement(dsPtr, "-flushmode"); + Tcl_DStringAppendElement(dsPtr, value); + } else { + Tcl_DStringAppend(dsPtr, value, -1); + return TCL_OK; + } + } + + /* + * The "header" option, which is only valid on inflating gzip channels, + * reports the header that has been read from the start of the stream. + */ + + if ((cd->flags & IN_HEADER) && ((optionName == NULL) || + (strcmp(optionName, "-header") == 0))) { Tcl_Obj *tmpObj = Tcl_NewObj(); - int len; - char *str; ExtractHeader(&cd->inHeader.header, tmpObj); - str = Tcl_GetStringFromObj(tmpObj, &len); - Tcl_DStringAppend(dsPtr, str, len); - Tcl_DecrRefCount(tmpObj); - return TCL_OK; - } + if (optionName == NULL) { + Tcl_DStringAppendElement(dsPtr, "-header"); + Tcl_DStringAppendElement(dsPtr, Tcl_GetString(tmpObj)); + Tcl_DecrRefCount(tmpObj); + } else { + int len; + char *str = Tcl_GetStringFromObj(tmpObj, &len); - if (getOptionProc && getOptionProc(Tcl_GetChannelInstanceData(parent), - interp, optionName, dsPtr) != TCL_OK) { - return TCL_ERROR; - } else if (optionName != NULL) { - return TCL_ERROR; + Tcl_DStringAppend(dsPtr, str, len); + Tcl_DecrRefCount(tmpObj); + return TCL_OK; + } } + /* + * Now we do the standard processing of the stream we wrapped. + */ + + if (getOptionProc) { + return getOptionProc(Tcl_GetChannelInstanceData(cd->parent), + interp, optionName, dsPtr); + } if (optionName == NULL) { - Tcl_DStringAppendElement(dsPtr, "-crc"); - if (cd->flags & IN_HEADER) { - Tcl_DStringAppendElement(dsPtr, "-header"); - } + return TCL_OK; } - return TCL_OK; + return Tcl_BadChannelOption(interp, optionName, chanOptions); } static void @@ -2275,9 +2351,8 @@ ChanGetHandle( ClientData *handlePtr) { ZlibChannelData *cd = instanceData; - Tcl_Channel parent = Tcl_GetStackedChannel(cd->channel); - return Tcl_GetChannelHandle(parent, direction, handlePtr); + return Tcl_GetChannelHandle(cd->parent, direction, handlePtr); } static int @@ -2301,13 +2376,26 @@ ChanFlush( { ZlibChannelData *cd = instanceData; - if (cd->inMode == TCL_ZLIB_STREAM_INFLATE) { - // TODO: flush input with Z_SYNC_FLUSH - } - if (cd->outMode == TCL_ZLIB_STREAM_DEFLATE) { - // TODO: flush output with cd->flushType + if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { + cd->outStream.avail_in = 0; + do { + cd->outStream.next_out = (Bytef *) cd->outBuffer; + cd->outStream.avail_out = cd->outAllocated; + + if (deflate(&cd->outStream, cd->flushType) != Z_OK) { + Tcl_SetErrno(EINVAL); + return 0; + } + + if (cd->outStream.avail_out > 0) { + if (Tcl_WriteRaw(cd->parent, cd->outBuffer, + (int) cd->outStream.next_out) < 0) { + return 0; + } + } + } while (cd->outStream.avail_out > 0); } - return TCL_OK; + return 1; } static int @@ -2325,8 +2413,7 @@ ChanHandler( static Tcl_Channel ZlibStackChannel( Tcl_Interp *interp, - int inMode, - int outMode, + int mode, int format, int level, Tcl_Channel channel, @@ -2334,16 +2421,20 @@ ZlibStackChannel( { ZlibChannelData *cd = (ZlibChannelData *) ckalloc(sizeof(ZlibChannelData)); + Tcl_Channel chan; int wbits = 0; int e; + if (mode != TCL_ZLIB_STREAM_DEFLATE && mode != TCL_ZLIB_STREAM_INFLATE) { + Tcl_Panic("unknown mode: %d", mode); + } + memset(cd, 0, sizeof(ZlibChannelData)); - cd->inMode = inMode; - cd->outMode = outMode; + cd->mode = mode; cd->flushType = Z_SYNC_FLUSH; if (format == TCL_ZLIB_FORMAT_GZIP || format == TCL_ZLIB_FORMAT_AUTO) { - if (outMode == TCL_ZLIB_STREAM_DEFLATE) { + if (mode == TCL_ZLIB_STREAM_DEFLATE) { int dummy = 0; cd->flags |= OUT_HEADER; @@ -2351,8 +2442,7 @@ ZlibStackChannel( &dummy) != TCL_OK) { goto error; } - } - if (inMode == TCL_ZLIB_STREAM_INFLATE) { + } else { cd->flags |= IN_HEADER; cd->inHeader.header.name = (Bytef *) &cd->inHeader.nativeFilenameBuf; @@ -2376,32 +2466,30 @@ ZlibStackChannel( } /* - * Initialize input inflater if necessary. + * Initialize input inflater or the output deflater. */ - if (inMode == TCL_ZLIB_STREAM_INFLATE) { + if (mode == TCL_ZLIB_STREAM_INFLATE) { e = inflateInit2(&cd->inStream, wbits); if (e != Z_OK) { goto error; } + cd->inAllocated = DEFAULT_BUFFER_SIZE; + cd->inBuffer = ckalloc(cd->inAllocated); if (cd->flags & IN_HEADER) { e = inflateGetHeader(&cd->inStream, &cd->inHeader.header); if (e != Z_OK) { goto error; } } - } - - /* - * Initialize output deflater if necessary. - */ - - if (outMode == TCL_ZLIB_STREAM_DEFLATE) { + } else { e = deflateInit2(&cd->outStream, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); if (e != Z_OK) { goto error; } + cd->outAllocated = DEFAULT_BUFFER_SIZE; + cd->outBuffer = ckalloc(cd->outAllocated); if (cd->flags & OUT_HEADER) { e = deflateSetHeader(&cd->outStream, &cd->outHeader.header); if (e != Z_OK) { @@ -2410,14 +2498,24 @@ ZlibStackChannel( } } - cd->channel = Tcl_StackChannel(interp, &zlibChannelType, cd, - TCL_READABLE | TCL_WRITABLE | TCL_EXCEPTION, channel); - Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetChannelName(channel), - -1)); - return channel; + chan = Tcl_StackChannel(interp, &zlibChannelType, cd, + TCL_READABLE | TCL_WRITABLE, channel); + if (chan == NULL) { + goto error; + } + cd->parent = Tcl_GetStackedChannel(chan); + Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetChannelName(chan), -1)); + return chan; error: - // TODO: delete memory + if (cd->inBuffer) { + ckfree(cd->inBuffer); + inflateEnd(&cd->inStream); + } + if (cd->outBuffer) { + ckfree(cd->outBuffer); + deflateEnd(&cd->outStream); + } ckfree((char *) cd); return NULL; } -- cgit v0.12 From b7bb2380d4af67cd9c388131d9fa34d478ac8a8c Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 17 Dec 2008 15:36:57 +0000 Subject: * unix/Makefile.in: Add build support for collections of TEA * unix/configure.in: packages found under the pkgs directory. [Patch 1163406]. Still needs porting to Windows. * unix/configure: autoconf-2.59 --- ChangeLog | 8 + unix/Makefile.in | 128 +- unix/configure | 12607 ++++++++++++++++++++++++++-------------------------- unix/configure.in | 5 +- 4 files changed, 6433 insertions(+), 6315 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32cd96a..6818606 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-17 Don Porter + + * unix/Makefile.in: Add build support for collections of TEA + * unix/configure.in: packages found under the pkgs directory. + [Patch 1163406]. Still needs porting to Windows. + + * unix/configure: autoconf-2.59 + 2008-12-17 Donal K. Fellows * generic/tcl.h, generic/tclZlib.c: Removed undocumented flag. diff --git a/unix/Makefile.in b/unix/Makefile.in index 415535c..353b6fb 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.249 2008/12/11 01:21:52 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.250 2008/12/17 15:36:58 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -218,7 +218,7 @@ AR = @AR@ RANLIB = @RANLIB@ DTRACE = @DTRACE@ SRC_DIR = @srcdir@ -TOP_DIR = $(SRC_DIR)/.. +TOP_DIR = @TCL_SRC_DIR@ BUILD_DIR = @builddir@ GENERIC_DIR = $(TOP_DIR)/generic TOMMATH_DIR = $(TOP_DIR)/libtommath @@ -226,6 +226,7 @@ COMPAT_DIR = $(TOP_DIR)/compat TOOL_DIR = $(TOP_DIR)/tools UNIX_DIR = $(TOP_DIR)/unix MAC_OSX_DIR = $(TOP_DIR)/macosx +PKGS_DIR = $(TOP_DIR)/pkgs # Must be absolute because of the cd dltest $(DLTEST_DIR)/configure below. DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest # Must be absolute to so the corresponding tcltest's tcl_library is absolute. @@ -555,7 +556,7 @@ DTRACE_SRC = $(GENERIC_DIR)/tclDTrace.d SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \ $(STUB_SRCS) @PLAT_SRCS@ -all: binaries libraries doc +all: binaries libraries doc packages binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh @@ -592,6 +593,8 @@ tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} # tcltest executable gets the build directory burned into its ld search path. # This keeps tcltest from picking up an already installed version of the Tcl # library. +SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}" tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST} $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" @@ -608,10 +611,8 @@ tcltest-real: # tcltest, ie: # % make test TESTFLAGS="-verbose bps -file fileName.test" -test: tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) +test: tcltest test-packages + $(SHELL_ENV) ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) gdb-test: tcltest @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run @@ -622,49 +623,33 @@ gdb-test: tcltest # Useful target to launch a built tcltest with the proper path,... runtest: tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tcltest + $(SHELL_ENV) ./tcltest # Useful target for running the test suite with an unwritable current # directory... ro-test: tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | ./tcltest + echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./tcltest # This target can be used to run tclsh from the build directory # via `make shell SCRIPT=/tmp/foo.tcl` shell: tclsh - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tclsh $(SCRIPT) + $(SHELL_ENV) ./tclsh $(SCRIPT) # This target can be used to run tclsh inside either gdb or insight gdb: tclsh - @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run - @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run - $(GDB) ./tclsh --command=gdb.run - rm gdb.run + $(SHELL_ENV) $(GDB) ./tclsh # This target can be used to run tclsh inside ddd ddd: tclsh - @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run - @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run - $(DDD) -command=gdb.run ./tclsh - rm gdb.run + $(SHELL_ENV) $(DDD) ./tclsh VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v valgrind: tclsh tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - valgrind $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) + $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) valgrindshell: tclsh - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT) + $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT) # The following target outputs the name of the top-level source directory for # Tcl (it is used by Tk's configure script, for example). The .NO_PARALLEL @@ -716,7 +701,7 @@ gentommath_h: dltest.marker: ${STUB_LIB_FILE} cd dltest ; $(MAKE) -INSTALL_TARGETS = install-binaries install-libraries install-doc @EXTRA_INSTALL@ +INSTALL_TARGETS = install-binaries install-libraries install-doc install-packages @EXTRA_INSTALL@ install: $(INSTALL_TARGETS) @@ -902,12 +887,12 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in #tclConfig.h: $(UNIX_DIR)/tclConfig.h.in # $(SHELL) config.status -clean: +clean: clean-packages rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ errors tclsh tcltest lib.exp Tcl @DTRACE_HDR@ cd dltest ; $(MAKE) clean -distclean: clean +distclean: distclean-packages clean rm -rf Makefile config.status config.cache config.log tclConfig.sh \ $(PACKAGE).* prototype tclConfig.h *.plist Tcl.framework cd dltest ; $(MAKE) distclean @@ -1568,6 +1553,83 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c .c.o: $(CC) -c $(CC_SWITCHES) $< + +# +# Bundled Package targets +# + +# somehow we need to propagate configure args like --enable-64bit +PKG_CFG_ARGS = @PKG_CFG_ARGS@ +PKG_DIR = ./pkgs + +packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + if [ -x $$i/configure ]; then \ + pkg=`basename $$i`; \ + echo "Building package '$$pkg'"; \ + mkdir -p $(PKG_DIR)/$$pkg; \ + if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; \ + $$i/configure --with-tcl=$(PWD) --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \ + fi; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE); ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +install-packages: packages + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + echo "Installing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) install "DESTDIR=$(INSTALL_ROOT)"; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +test-packages: tcltest packages + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + echo "Testing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) "LD_LIBRARY_PATH=$$builddir:${LD_LIBRARY_PATH}" "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" "TCLLIBPATH=$$builddir/pkgs" test "TCLSH_PROG=$$builddir/tcltest"; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +clean-packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) clean; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +distclean-packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) distclean; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + # # Target to regenerate header files and stub files from the *.decls tables. # diff --git a/unix/configure b/unix/configure index eadc6fa..d478aba 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,176 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -775,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -838,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -903,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -933,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1007,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1069,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1113,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1133,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1172,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1270,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1287,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1353,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1460,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1474,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1496,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1506,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1528,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1539,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1553,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1591,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1624,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1672,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1698,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1711,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1740,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1757,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1781,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1798,6 +1338,8 @@ TCL_MINOR_VERSION=6 TCL_PATCH_LEVEL="a4" VERSION=${TCL_VERSION} +PKG_CFG_ARGS=$@ + #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ @@ -1817,23 +1359,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1842,37 +1385,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1895,8 +1437,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1909,34 +1451,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1949,51 +1489,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2006,34 +1531,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2047,7 +1612,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2058,7 +1623,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2076,23 +1640,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2105,38 +1668,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2149,45 +1710,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2200,35 +1745,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2253,77 +1784,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2335,21 +1836,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2368,27 +1867,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2399,8 +1893,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2414,14 +1909,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2441,20 +1936,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2472,12 +1961,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2500,49 +1989,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2558,118 +2048,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2685,12 +2095,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2724,17 +2134,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2749,116 +2154,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2891,8 +2446,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2926,22 +2481,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2950,10 +2507,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2963,22 +2519,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2989,7 +2547,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3007,8 +2564,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3031,22 +2588,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3055,10 +2614,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3068,22 +2626,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3094,7 +2654,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3117,170 +2676,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3304,31 +2716,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3384,7 +2800,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3404,27 +2819,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3437,14 +2843,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3467,9 +2871,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3483,35 +2887,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3523,8 +2930,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3564,36 +2971,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3604,17 +3014,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3625,37 +3035,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3664,22 +3078,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3687,10 +3103,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3714,18 +3129,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3740,17 +3162,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3761,37 +3183,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3800,22 +3226,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3823,10 +3251,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3850,18 +3277,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3876,17 +3310,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3897,37 +3331,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3936,22 +3374,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3959,10 +3399,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3986,18 +3425,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4016,17 +3462,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4037,37 +3483,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4076,22 +3526,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4099,10 +3551,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4126,18 +3577,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4206,17 +3664,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4227,37 +3685,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4266,22 +3728,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4289,10 +3753,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4316,18 +3779,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4384,17 +3854,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4405,37 +3875,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4444,22 +3918,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4467,10 +3943,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4494,18 +3969,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4520,17 +4002,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4541,37 +4023,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4580,22 +4066,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4603,10 +4091,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4630,18 +4117,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4661,19 +4155,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4684,37 +4177,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4723,22 +4220,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4746,10 +4245,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4773,19 +4271,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4805,8 +4309,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4828,35 +4332,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4867,13 +4375,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4905,8 +4413,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4919,53 +4427,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4978,8 +4489,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4992,53 +4503,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5051,8 +4565,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5065,53 +4579,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5122,8 +4639,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5136,53 +4653,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5190,8 +4710,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5204,53 +4724,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5275,9 +4798,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5303,60 +4826,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5369,8 +4900,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5378,15 +4909,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5398,11 +4929,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5431,8 +4962,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5459,67 +4990,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5536,43 +5076,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5583,8 +5126,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5601,59 +5144,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5664,37 +5210,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5703,22 +5253,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5726,10 +5278,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5753,18 +5304,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -5797,8 +5355,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5825,59 +5383,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5885,8 +5452,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5913,64 +5480,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5983,53 +5559,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6042,8 +5621,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6070,59 +5649,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6130,8 +5718,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6158,64 +5746,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6228,53 +5825,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6287,15 +5887,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6305,12 +5905,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6326,17 +5926,17 @@ _ACEOF tcl_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6347,37 +5947,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6386,22 +5990,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6409,10 +6015,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6436,24 +6041,31 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6465,47 +6077,50 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -typedef gz_header ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((gz_header *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (gz_header)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_gz_header=no +ac_cv_type_gz_header=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6 if test $ac_cv_type_gz_header = yes; then : else @@ -6527,12 +6142,13 @@ fi if test $tcl_ok = yes; then - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS +ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6540,73 +6156,115 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -return deflateSetHeader (); +deflateSetHeader (); ; return 0; } _ACEOF -for ac_lib in '' z; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_deflateSetHeader=$ac_res + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_deflateSetHeader" = no; then + for ac_lib in z; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then - break -fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="-l$ac_lib" +break else - ac_cv_search_deflateSetHeader=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 +if test "$ac_cv_search_deflateSetHeader" != no; then + test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" else @@ -6637,8 +6295,8 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6651,34 +6309,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6691,41 +6347,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6734,31 +6376,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6768,8 +6410,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6793,37 +6435,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6837,24 +6482,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6881,16 +6526,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6903,53 +6548,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6992,8 +6640,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7006,27 +6654,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7052,8 +6698,8 @@ fi CC=${CC}_r ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7131,10 +6777,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7154,8 +6802,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7168,53 +6816,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7246,8 +6897,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7260,53 +6911,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7367,8 +7021,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7381,53 +7035,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7498,8 +7155,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7512,53 +7169,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7690,8 +7350,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7714,37 +7374,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7833,8 +7496,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7860,8 +7523,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7892,8 +7555,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7919,8 +7582,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7984,8 +7647,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8008,37 +7671,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8047,8 +7713,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8071,37 +7737,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8127,8 +7796,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8151,37 +7820,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8200,8 +7872,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8224,37 +7896,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8281,21 +7956,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8329,32 +8004,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8365,8 +8043,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8382,8 +8060,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8407,39 +8085,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8775,25 +8456,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8804,37 +8485,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8843,22 +8528,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8866,10 +8553,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8893,18 +8579,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -8913,8 +8606,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -8989,8 +8682,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9013,37 +8706,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9078,13 +8774,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9229,22 +8925,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9254,8 +8950,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9290,11 +8986,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9315,8 +9011,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9338,28 +9034,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9376,34 +9077,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9435,28 +9139,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9473,34 +9182,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9532,28 +9244,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__largefile_source64=no -else + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__largefile_source64=no +else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9570,34 +9287,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9610,17 +9330,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9643,31 +9363,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9689,31 +9413,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9722,20 +9449,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9757,34 +9484,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9793,8 +9524,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9816,34 +9547,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9857,9 +9592,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9885,60 +9620,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9947,8 +9690,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9970,31 +9713,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10005,11 +9752,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -10019,8 +9766,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10037,8 +9784,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -10047,22 +9793,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10085,36 +9836,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10124,11 +9879,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10139,22 +9894,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10170,10 +9930,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10181,41 +9939,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10228,16 +9972,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10266,9 +10007,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10294,60 +10035,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10371,9 +10120,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10399,78 +10148,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10497,59 +10256,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10560,8 +10328,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10588,59 +10356,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10651,8 +10428,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10679,59 +10456,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10742,8 +10528,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10770,59 +10556,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -10840,8 +10635,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10868,59 +10663,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -10932,8 +10736,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10960,63 +10764,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11044,34 +10857,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11089,8 +10906,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11117,63 +10934,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11204,34 +11030,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11240,8 +11070,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11272,34 +11102,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11319,8 +11153,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11347,63 +11181,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getpwnam_r=yes -else + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getpwnam_r=yes +else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11434,34 +11277,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11470,8 +11317,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11502,34 +11349,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11549,8 +11400,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11577,63 +11428,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11664,34 +11524,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11700,8 +11564,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11732,34 +11596,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11779,8 +11647,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11807,63 +11675,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11894,34 +11771,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11930,8 +11811,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11962,34 +11843,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12042,8 +11927,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12070,63 +11955,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12157,34 +12051,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12193,8 +12091,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12225,34 +12123,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12261,8 +12163,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12291,34 +12193,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12339,8 +12245,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12367,63 +12273,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12457,34 +12372,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12493,8 +12412,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12528,34 +12447,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12589,19 +12512,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12612,37 +12534,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12651,22 +12577,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12674,10 +12602,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12701,19 +12628,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12725,8 +12658,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12754,22 +12687,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12782,10 +12706,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12809,22 +12731,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12837,10 +12750,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12866,22 +12777,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12894,10 +12796,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12925,22 +12825,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12953,10 +12844,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12983,22 +12872,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13011,10 +12891,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13042,22 +12920,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13070,14 +12939,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13107,8 +12974,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13129,38 +12996,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13183,8 +13054,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13206,8 +13077,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13223,42 +13094,44 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h +ac_cv_struct_tm=sys/time.h fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13272,19 +13145,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13295,37 +13167,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13334,22 +13210,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13357,10 +13235,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13384,19 +13261,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13408,8 +13291,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13433,34 +13316,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13469,8 +13356,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13495,28 +13382,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13537,37 +13429,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_tm_tm_zone=no +ac_cv_member_struct_tm_tm_zone=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13584,9 +13479,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then + echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6 +if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13596,126 +13491,60 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif int main () { -#ifndef tzname - (void) tzname; -#endif - +atoi(*tzname); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_tzname=no +ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 + if test $ac_cv_var_tzname = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 _ACEOF - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF - - -fi - - - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } -if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -int -main () -{ -return tzname[0][0]; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_var_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_var_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 -_ACEOF - - fi -fi + fi +fi @@ -13724,9 +13553,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13752,60 +13581,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13815,8 +13652,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13837,34 +13674,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13873,8 +13714,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13895,34 +13736,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13935,8 +13780,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13959,34 +13804,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13997,8 +13846,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14021,34 +13870,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14064,8 +13917,9 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } + +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14087,28 +13941,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14126,37 +13985,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14171,8 +14033,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14199,59 +14061,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14268,8 +14139,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14288,9 +14159,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14306,9 +14177,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14316,22 +14187,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14344,17 +14206,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14365,8 +14227,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14393,59 +14255,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14469,8 +14340,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14497,59 +14368,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14557,8 +14437,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14577,22 +14457,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14605,13 +14476,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14619,10 +14488,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14636,8 +14507,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14664,59 +14535,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14724,8 +14604,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14745,22 +14625,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14773,13 +14644,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14787,10 +14656,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14803,8 +14674,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14831,59 +14702,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14891,8 +14771,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14912,22 +14792,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14940,13 +14811,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14954,10 +14823,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -14972,8 +14843,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15000,59 +14871,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15060,8 +14940,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15097,22 +14977,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15125,18 +14996,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15154,8 +15025,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15166,47 +15037,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15217,8 +15091,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15229,47 +15103,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15280,8 +15157,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15292,59 +15169,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15366,8 +15246,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15382,8 +15262,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15409,34 +15289,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15445,8 +15329,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15457,47 +15341,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15507,8 +15394,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15533,36 +15420,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15573,8 +15464,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15585,47 +15476,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15635,8 +15529,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15662,36 +15556,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15710,8 +15608,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15738,59 +15636,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15810,8 +15717,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15837,36 +15744,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15881,8 +15791,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15909,59 +15819,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15969,8 +15888,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15983,53 +15902,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16038,8 +15960,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16052,53 +15974,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16107,10 +16032,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -16127,8 +16054,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16155,59 +16082,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16216,8 +16152,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16244,59 +16180,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16310,8 +16255,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16334,8 +16279,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16351,8 +16296,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16374,34 +16319,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16409,8 +16358,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16434,34 +16383,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16474,8 +16427,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16510,22 +16463,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16538,13 +16482,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16558,28 +16500,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16590,37 +16532,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16629,22 +16575,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16652,10 +16600,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16679,18 +16626,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16701,8 +16655,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16724,35 +16678,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16761,8 +16719,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16775,9 +16733,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16803,60 +16761,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16870,8 +16836,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16894,36 +16860,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16941,9 +16910,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16969,60 +16938,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17035,19 +17012,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17058,37 +17034,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17097,22 +17077,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17120,10 +17102,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17147,19 +17128,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17175,9 +17162,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17203,60 +17190,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17270,19 +17265,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17293,37 +17287,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17332,22 +17330,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17355,10 +17355,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17382,19 +17381,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17410,9 +17415,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17438,60 +17443,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17504,9 +17517,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17532,60 +17545,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17619,19 +17640,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17642,37 +17662,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17681,22 +17705,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17704,10 +17730,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17731,19 +17756,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17756,8 +17787,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17788,37 +17819,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17839,8 +17873,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17869,36 +17903,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17918,19 +17955,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17941,37 +17977,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17980,22 +18020,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18003,10 +18045,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18030,19 +18071,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18058,19 +18105,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18081,37 +18127,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18120,22 +18170,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18143,10 +18195,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18170,19 +18221,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18195,8 +18252,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18223,12 +18280,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18241,8 +18298,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18250,27 +18307,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18278,8 +18335,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18287,24 +18344,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18328,8 +18385,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18342,8 +18399,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18351,26 +18408,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18381,37 +18438,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18420,22 +18481,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18443,10 +18506,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18470,18 +18532,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18495,8 +18564,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18512,32 +18581,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18561,8 +18629,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18591,15 +18659,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18613,16 +18681,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18634,7 +18702,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18647,7 +18715,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18815,7 +18883,8 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18835,58 +18904,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18895,36 +18945,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -18953,45 +19019,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19001,43 +19039,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -19051,19 +19054,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19071,120 +19073,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19193,28 +19234,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19223,14 +19243,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19238,19 +19275,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19258,7 +19306,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19272,20 +19320,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19296,42 +19342,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19347,52 +19411,40 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19403,477 +19455,370 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19881,52 +19826,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/unix/configure.in b/unix/configure.in index 3b73135..7f66b61 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.195 2008/12/14 13:32:11 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.196 2008/12/17 15:36:58 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -30,6 +30,8 @@ TCL_MINOR_VERSION=6 TCL_PATCH_LEVEL="a4" VERSION=${TCL_VERSION} +PKG_CFG_ARGS=$@ + #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ @@ -854,6 +856,7 @@ AC_SUBST(TCL_MAJOR_VERSION) AC_SUBST(TCL_MINOR_VERSION) AC_SUBST(TCL_PATCH_LEVEL) AC_SUBST(TCL_YEAR) +AC_SUBST(PKG_CFG_ARGS) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) -- cgit v0.12 From cd7b89f85d8670ed80d6f13e0482c6f56be9d5fb Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 17 Dec 2008 15:39:55 +0000 Subject: Fix [Bug 2433936] --- ChangeLog | 6 +++ tests/namespace-old.test | 131 ++++++----------------------------------------- tests/namespace.test | 21 ++++++-- 3 files changed, 40 insertions(+), 118 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6818606..53bc76b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-17 Donal K. Fellows + + * tests/namespace.test (namespace-28.1): Make tests not + * tests/namespace-old.test (namespace-old-9.5): dependent on the + global namespace's particular imports. [Bug 2433936] + 2008-12-17 Don Porter * unix/Makefile.in: Add build support for collections of TEA diff --git a/tests/namespace-old.test b/tests/namespace-old.test index 8528391..804c233 100644 --- a/tests/namespace-old.test +++ b/tests/namespace-old.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace-old.test,v 1.13 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: namespace-old.test,v 1.14 2008/12/17 15:39:55 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.2 @@ -23,42 +23,34 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Clear out any namespaces called test_ns_* catch {namespace delete {*}[namespace children :: test_ns_*]} - + test namespace-old-1.1 {usage for "namespace" command} { list [catch {namespace} msg] $msg } {1 {wrong # args: should be "namespace subcommand ?arg ...?"}} - test namespace-old-1.2 {global namespace's name is "::" or {}} { list [namespace current] [namespace eval {} {namespace current}] } {:: ::} - test namespace-old-1.3 {usage for "namespace eval"} { list [catch {namespace eval} msg] $msg } {1 {wrong # args: should be "namespace eval name arg ?arg...?"}} - test namespace-old-1.4 {create new namespaces} { list [lsort [namespace children :: test_ns_simple*]] \ [namespace eval test_ns_simple {}] \ [namespace eval test_ns_simple2 {}] \ [lsort [namespace children :: test_ns_simple*]] } {{} {} {} {::test_ns_simple ::test_ns_simple2}} - test namespace-old-1.5 {access a new namespace} { namespace eval test_ns_simple { namespace current } } {::test_ns_simple} - test namespace-old-1.6 {usage for "namespace eval"} { list [catch {namespace eval} msg] $msg } {1 {wrong # args: should be "namespace eval name arg ?arg...?"}} - test namespace-old-1.7 {usage for "namespace eval"} { list [catch {namespace eval test_ns_xyzzy} msg] $msg } {1 {wrong # args: should be "namespace eval name arg ?arg...?"}} - test namespace-old-1.8 {command "namespace eval" concatenates args} { namespace eval test_ns_simple namespace current } {::test_ns_simple} - test namespace-old-1.9 {add elements to a namespace} { namespace eval test_ns_simple { variable test_ns_x 0 @@ -67,19 +59,15 @@ test namespace-old-1.9 {add elements to a namespace} { } } } {} - test namespace-old-1.10 {commands in a namespace} { namespace eval test_ns_simple { info commands [namespace current]::*} } {::test_ns_simple::test} - test namespace-old-1.11 {variables in a namespace} { namespace eval test_ns_simple { info vars [namespace current]::* } } {::test_ns_simple::test_ns_x} - test namespace-old-1.12 {global vars are separate from locals vars} { list [test_ns_simple::test 123] [set test_ns_simple::test_ns_x] } {{test: 123} 0} - test namespace-old-1.13 {add to an existing namespace} { namespace eval test_ns_simple { variable test_ns_y 123 @@ -88,18 +76,15 @@ test namespace-old-1.13 {add to an existing namespace} { } } } "" - test namespace-old-1.14 {commands in a namespace} { lsort [namespace eval test_ns_simple {info commands [namespace current]::*}] } {::test_ns_simple::_backdoor ::test_ns_simple::test} - test namespace-old-1.15 {variables in a namespace} { lsort [namespace eval test_ns_simple {info vars [namespace current]::*}] } {::test_ns_simple::test_ns_x ::test_ns_simple::test_ns_y} test namespace-old-1.16 {variables in a namespace} { lsort [info vars test_ns_simple::*] } {::test_ns_simple::test_ns_x ::test_ns_simple::test_ns_y} - test namespace-old-1.17 {commands in a namespace are hidden} { list [catch "_backdoor {return yes!}" msg] $msg } {1 {invalid command name "_backdoor"}} @@ -109,7 +94,6 @@ test namespace-old-1.18 {using namespace qualifiers} { test namespace-old-1.19 {using absolute namespace qualifiers} { list [catch "::test_ns_simple::_backdoor {return yes!}" msg] $msg } {0 yes!} - test namespace-old-1.20 {variables in a namespace are hidden} { list [catch "set test_ns_x" msg] $msg [catch "set test_ns_y" msg] $msg } {1 {can't read "test_ns_x": no such variable} 1 {can't read "test_ns_y": no such variable}} @@ -128,25 +112,21 @@ test namespace-old-1.23 {variables can be accessed within a namespace} { return "$test_ns_x $test_ns_y" } } {0 123} - test namespace-old-1.24 {setting global variables} { test_ns_simple::_backdoor {variable test_ns_x; set test_ns_x "new val"} namespace eval test_ns_simple {set test_ns_x} } {new val} - test namespace-old-1.25 {qualified variables don't need a global declaration} { namespace eval test_ns_another { variable test_ns_x 456 } set cmd {set ::test_ns_another::test_ns_x} list [catch {test_ns_simple::_backdoor "$cmd some-value"} msg] $msg \ [eval $cmd] } {0 some-value some-value} - test namespace-old-1.26 {namespace qualifiers are okay after $'s} { namespace eval test_ns_simple { set test_ns_x 12; set test_ns_y 34 } set cmd {list $::test_ns_simple::test_ns_x $::test_ns_simple::test_ns_y} list [test_ns_simple::_backdoor $cmd] [eval $cmd] } {{12 34} {12 34}} - test namespace-old-1.27 {can create commands with null names} { proc test_ns_simple:: {args} {return $args} } {} @@ -157,35 +137,27 @@ test namespace-old-1.27 {can create commands with null names} { test namespace-old-2.1 {querying: info commands} { lsort [test_ns_simple::_backdoor {info commands [namespace current]::*}] } {::test_ns_simple:: ::test_ns_simple::_backdoor ::test_ns_simple::test} - test namespace-old-2.2 {querying: info procs} { lsort [test_ns_simple::_backdoor {info procs}] } {{} _backdoor test} - test namespace-old-2.3 {querying: info vars} { lsort [info vars test_ns_simple::*] } {::test_ns_simple::test_ns_x ::test_ns_simple::test_ns_y} - test namespace-old-2.4 {querying: info vars} { lsort [test_ns_simple::_backdoor {info vars [namespace current]::*}] } {::test_ns_simple::test_ns_x ::test_ns_simple::test_ns_y} - test namespace-old-2.5 {querying: info locals} { lsort [test_ns_simple::_backdoor {info locals}] } {cmd} - test namespace-old-2.6 {querying: info exists} { test_ns_simple::_backdoor {info exists test_ns_x} } {0} - test namespace-old-2.7 {querying: info exists} { test_ns_simple::_backdoor {info exists cmd} } {1} - test namespace-old-2.8 {querying: info args} { info args test_ns_simple::_backdoor } {cmd} - test namespace-old-2.9 {querying: info body} { string trim [info body test_ns_simple::test] } {return "test: $test_ns_x"} @@ -196,7 +168,6 @@ test namespace-old-2.9 {querying: info body} { test namespace-old-3.1 {usage for "namespace qualifiers"} { list [catch "namespace qualifiers" msg] $msg } {1 {wrong # args: should be "namespace qualifiers string"}} - test namespace-old-3.2 {querying: namespace qualifiers} { list [namespace qualifiers ""] \ [namespace qualifiers ::] \ @@ -205,11 +176,9 @@ test namespace-old-3.2 {querying: namespace qualifiers} { [namespace qualifiers foo::x] \ [namespace qualifiers ::foo::bar::xyz] } {{} {} {} {} foo ::foo::bar} - test namespace-old-3.3 {usage for "namespace tail"} { list [catch "namespace tail" msg] $msg } {1 {wrong # args: should be "namespace tail string"}} - test namespace-old-3.4 {querying: namespace tail} { list [namespace tail ""] \ [namespace tail ::] \ @@ -236,18 +205,15 @@ test namespace-old-4.1 {define test namespaces} { lsort [namespace children] } } {::test_ns_delete::another ::test_ns_delete::ns1 ::test_ns_delete::ns2} - test namespace-old-4.2 {it's okay to invoke "namespace delete" with no args} { list [catch {namespace delete} msg] $msg } {0 {}} - test namespace-old-4.3 {command "namespace delete" doesn't support patterns} { set cmd { namespace eval test_ns_delete {namespace delete ns*} } list [catch $cmd msg] $msg } {1 {unknown namespace "ns*" in namespace delete command}} - test namespace-old-4.4 {command "namespace delete" handles multiple args} { set cmd { namespace eval test_ns_delete { @@ -264,125 +230,99 @@ test namespace-old-4.4 {command "namespace delete" handles multiple args} { test namespace-old-5.1 {define nested namespaces} { set test_ns_var_global "var in ::" proc test_ns_cmd_global {} {return "cmd in ::"} - namespace eval test_ns_hier1 { set test_ns_var_hier1 "particular to hier1" proc test_ns_cmd_hier1 {} {return "particular to hier1"} - set test_ns_level 1 proc test_ns_show {} {return "[namespace current]: 1"} - namespace eval test_ns_hier2 { set test_ns_var_hier2 "particular to hier2" proc test_ns_cmd_hier2 {} {return "particular to hier2"} - set test_ns_level 2 proc test_ns_show {} {return "[namespace current]: 2"} - namespace eval test_ns_hier3a {} namespace eval test_ns_hier3b {} } - namespace eval test_ns_hier2a {} namespace eval test_ns_hier2b {} } } {} - test namespace-old-5.2 {namespaces can be nested} { list [namespace eval test_ns_hier1 {namespace current}] \ [namespace eval test_ns_hier1 { namespace eval test_ns_hier2 {namespace current} }] } {::test_ns_hier1 ::test_ns_hier1::test_ns_hier2} - test namespace-old-5.3 {namespace qualifiers work in namespace command} { list [namespace eval ::test_ns_hier1 {namespace current}] \ [namespace eval test_ns_hier1::test_ns_hier2 {namespace current}] \ [namespace eval ::test_ns_hier1::test_ns_hier2 {namespace current}] } {::test_ns_hier1 ::test_ns_hier1::test_ns_hier2 ::test_ns_hier1::test_ns_hier2} - test namespace-old-5.4 {nested namespaces can access global namespace} { list [namespace eval test_ns_hier1 {set test_ns_var_global}] \ [namespace eval test_ns_hier1 {test_ns_cmd_global}] \ [namespace eval test_ns_hier1::test_ns_hier2 {set test_ns_var_global}] \ [namespace eval test_ns_hier1::test_ns_hier2 {test_ns_cmd_global}] } {{var in ::} {cmd in ::} {var in ::} {cmd in ::}} - test namespace-old-5.5 {variables in different namespaces don't conflict} { list [set test_ns_hier1::test_ns_level] \ [set test_ns_hier1::test_ns_hier2::test_ns_level] } {1 2} - test namespace-old-5.6 {commands in different namespaces don't conflict} { list [test_ns_hier1::test_ns_show] \ [test_ns_hier1::test_ns_hier2::test_ns_show] } {{::test_ns_hier1: 1} {::test_ns_hier1::test_ns_hier2: 2}} - test namespace-old-5.7 {nested namespaces don't see variables in parent} { set cmd { namespace eval test_ns_hier1::test_ns_hier2 {set test_ns_var_hier1} } list [catch $cmd msg] $msg } {1 {can't read "test_ns_var_hier1": no such variable}} - test namespace-old-5.8 {nested namespaces don't see commands in parent} { set cmd { namespace eval test_ns_hier1::test_ns_hier2 {test_ns_cmd_hier1} } list [catch $cmd msg] $msg } {1 {invalid command name "test_ns_cmd_hier1"}} - test namespace-old-5.9 {usage for "namespace children"} { list [catch {namespace children test_ns_hier1 y z} msg] $msg } {1 {wrong # args: should be "namespace children ?name? ?pattern?"}} - test namespace-old-5.10 {command "namespace children" must get valid namespace} -body { namespace children xyzzy } -returnCodes error -result {namespace "xyzzy" not found in "::"} - test namespace-old-5.11 {querying namespace children} { lsort [namespace children :: test_ns_hier*] } {::test_ns_hier1} - test namespace-old-5.12 {querying namespace children} { lsort [namespace children test_ns_hier1] } {::test_ns_hier1::test_ns_hier2 ::test_ns_hier1::test_ns_hier2a ::test_ns_hier1::test_ns_hier2b} - test namespace-old-5.13 {querying namespace children} { lsort [namespace eval test_ns_hier1 {namespace children}] } {::test_ns_hier1::test_ns_hier2 ::test_ns_hier1::test_ns_hier2a ::test_ns_hier1::test_ns_hier2b} - test namespace-old-5.14 {querying namespace children} { lsort [namespace children test_ns_hier1::test_ns_hier2] } {::test_ns_hier1::test_ns_hier2::test_ns_hier3a ::test_ns_hier1::test_ns_hier2::test_ns_hier3b} - test namespace-old-5.15 {querying namespace children} { lsort [namespace eval test_ns_hier1::test_ns_hier2 {namespace children}] } {::test_ns_hier1::test_ns_hier2::test_ns_hier3a ::test_ns_hier1::test_ns_hier2::test_ns_hier3b} - test namespace-old-5.16 {querying namespace children with patterns} { lsort [namespace children test_ns_hier1::test_ns_hier2 test_ns_*] } {::test_ns_hier1::test_ns_hier2::test_ns_hier3a ::test_ns_hier1::test_ns_hier2::test_ns_hier3b} - test namespace-old-5.17 {querying namespace children with patterns} { lsort [namespace children test_ns_hier1::test_ns_hier2 *b] } {::test_ns_hier1::test_ns_hier2::test_ns_hier3b} - test namespace-old-5.18 {usage for "namespace parent"} { list [catch {namespace parent x y} msg] $msg } {1 {wrong # args: should be "namespace parent ?name?"}} - test namespace-old-5.19 {command "namespace parent" must get valid namespace} -body { namespace parent xyzzy } -returnCodes error -result {namespace "xyzzy" not found in "::"} - test namespace-old-5.20 {querying namespace parent} { list [namespace eval :: {namespace parent}] \ [namespace eval test_ns_hier1 {namespace parent}] \ [namespace eval test_ns_hier1::test_ns_hier2 {namespace parent}] \ [namespace eval test_ns_hier1::test_ns_hier2::test_ns_hier3a {namespace parent}] \ } {{} :: ::test_ns_hier1 ::test_ns_hier1::test_ns_hier2} - test namespace-old-5.21 {querying namespace parent for explicit namespace} { list [namespace parent ::] \ [namespace parent test_ns_hier1] \ @@ -406,25 +346,21 @@ test namespace-old-6.1 {relative ns names only looked up in current ns} { list [namespace eval test_ns_cache1 $trigger] \ [namespace eval test_ns_cache1 $trigger2] } {::test_ns_cache1::test_ns_cache2 ::test_ns_cache1::test_ns_cache2::test_ns_cache3} - test namespace-old-6.2 {relative ns names only looked up in current ns} { namespace eval test_ns_cache1::test_ns_cache2 {} list [namespace eval test_ns_cache1 $trigger] \ [namespace eval test_ns_cache1 $trigger2] } {::test_ns_cache1::test_ns_cache2 ::test_ns_cache1::test_ns_cache2::test_ns_cache3} - test namespace-old-6.3 {relative ns names only looked up in current ns} { namespace eval test_ns_cache1::test_ns_cache2::test_ns_cache3 {} list [namespace eval test_ns_cache1 $trigger] \ [namespace eval test_ns_cache1 $trigger2] } {::test_ns_cache1::test_ns_cache2 ::test_ns_cache1::test_ns_cache2::test_ns_cache3} - test namespace-old-6.4 {relative ns names only looked up in current ns} { namespace delete test_ns_cache1::test_ns_cache2 list [namespace eval test_ns_cache1 $trigger] \ [namespace eval test_ns_cache1 $trigger2] } {::test_ns_cache1::test_ns_cache2 ::test_ns_cache1::test_ns_cache2::test_ns_cache3} - test namespace-old-6.5 {define test commands} { proc test_ns_cache_cmd {} { return "global version" @@ -436,35 +372,30 @@ test namespace-old-6.5 {define test commands} { } test_ns_cache1::trigger } {global version} - test namespace-old-6.6 {one-level check for command shadowing} { proc test_ns_cache1::test_ns_cache_cmd {} { return "cache1 version" } test_ns_cache1::trigger } {cache1 version} - test namespace-old-6.7 {renaming commands changes command epoch} { namespace eval test_ns_cache1 { rename test_ns_cache_cmd test_ns_new } test_ns_cache1::trigger } {global version} - test namespace-old-6.8 {renaming back handles shadowing} { namespace eval test_ns_cache1 { rename test_ns_new test_ns_cache_cmd } test_ns_cache1::trigger } {cache1 version} - test namespace-old-6.9 {deleting commands changes command epoch} { namespace eval test_ns_cache1 { rename test_ns_cache_cmd "" } test_ns_cache1::trigger } {global version} - test namespace-old-6.10 {define test namespaces} { namespace eval test_ns_cache2 { proc test_ns_cache_cmd {} { @@ -483,34 +414,29 @@ test namespace-old-6.10 {define test namespaces} { } list [test_ns_cache1::trigger] [test_ns_cache1::test_ns_cache2::trigger] } {{global cache2 version} {global version}} - test namespace-old-6.11 {commands affect all parent namespaces} { proc test_ns_cache1::test_ns_cache2::test_ns_cache_cmd {} { return "cache2 version" } list [test_ns_cache1::trigger] [test_ns_cache1::test_ns_cache2::trigger] } {{cache2 version} {cache2 version}} - test namespace-old-6.12 {define test variables} { variable test_ns_cache_var "global version" set trigger {set test_ns_cache_var} namespace eval test_ns_cache1 $trigger } {global version} - test namespace-old-6.13 {one-level check for variable shadowing} { namespace eval test_ns_cache1 { variable test_ns_cache_var "cache1 version" } namespace eval test_ns_cache1 $trigger } {cache1 version} - test namespace-old-6.14 {deleting variables changes variable epoch} { namespace eval test_ns_cache1 { unset test_ns_cache_var } namespace eval test_ns_cache1 $trigger } {global version} - test namespace-old-6.15 {define test namespaces} { namespace eval test_ns_cache2 { variable test_ns_cache_var "global cache2 version" @@ -519,13 +445,11 @@ test namespace-old-6.15 {define test namespaces} { list [namespace eval test_ns_cache1 $trigger2] \ [namespace eval test_ns_cache1::test_ns_cache2 $trigger] } {{global cache2 version} {global version}} - test namespace-old-6.16 {public variables affect all parent namespaces} { variable test_ns_cache1::test_ns_cache2::test_ns_cache_var "cache2 version" list [namespace eval test_ns_cache1 $trigger2] \ [namespace eval test_ns_cache1::test_ns_cache2 $trigger] } {{cache2 version} {cache2 version}} - test namespace-old-6.17 {usage for "namespace which"} { list [catch "namespace which -baz x" msg] $msg } {1 {wrong # args: should be "namespace which ?-command? ?-variable? name"}} @@ -533,7 +457,6 @@ test namespace-old-6.18 {usage for "namespace which"} { # Presume no imported command called -command ;^) namespace which -command } {} - test namespace-old-6.19 {querying: namespace which -command} { proc test_ns_cache1::test_ns_cache_cmd {} { return "cache1 version" @@ -543,17 +466,14 @@ test namespace-old-6.19 {querying: namespace which -command} { [namespace eval :: {namespace which -command test_ns_cache_cmd}] \ [namespace eval test_ns_cache1 {namespace which -command test_ns_cache_cmd}] } {::test_ns_cache_cmd ::test_ns_cache1::test_ns_cache_cmd ::test_ns_cache_cmd ::test_ns_cache1::test_ns_cache_cmd} - test namespace-old-6.20 {command "namespace which" may not find commands} { namespace eval test_ns_cache1 {namespace which -command xyzzy} } {} - test namespace-old-6.21 {querying: namespace which -variable} { namespace eval test_ns_cache1::test_ns_cache2 { namespace which -variable test_ns_cache_var } } {::test_ns_cache1::test_ns_cache2::test_ns_cache_var} - test namespace-old-6.22 {command "namespace which" may not find variables} { namespace eval test_ns_cache1 {namespace which -variable xyzzy} } {} @@ -565,7 +485,6 @@ test namespace-old-7.1 {define test namespace} { namespace eval test_ns_uplevel { variable x 0 variable y 1 - proc show_vars {num} { return [uplevel $num {info vars}] } @@ -586,7 +505,6 @@ test namespace-old-7.3 {uplevel can go beyond namespace call frame} { test namespace-old-7.4 {uplevel can go up to global context} { expr {[test_ns_uplevel::test_uplevel 3] == [info globals]} } {1} - test namespace-old-7.5 {absolute call frame references work too} { list [expr {[lsearch -exact [test_ns_uplevel::test_uplevel #2] x]>=0}] \ [expr {[lsearch -exact [test_ns_uplevel::test_uplevel #2] y]>=0}] @@ -597,11 +515,9 @@ test namespace-old-7.6 {absolute call frame references work too} { test namespace-old-7.7 {absolute call frame references work too} { expr {[test_ns_uplevel::test_uplevel #0] == [info globals]} } {1} - test namespace-old-7.8 {namespaces are included in the call stack} { namespace eval test_ns_upvar { variable scope "test_ns_upvar" - proc show_val {var num} { upvar $num $var x return $x @@ -633,7 +549,6 @@ test namespace-old-8.1 {traces work across namespace boundaries} { namespace eval foo { variable x "" } - variable status "" proc monitor {name1 name2 op} { variable status @@ -644,7 +559,6 @@ test namespace-old-8.1 {traces work across namespace boundaries} { set test_ns_trace::foo::x "yes!" set test_ns_trace::foo::x unset test_ns_trace::foo::x - namespace eval test_ns_trace { set status } } {{w: test_ns_trace::foo::x} {r: test_ns_trace::foo::x} {u: test_ns_trace::foo::x}} @@ -657,7 +571,6 @@ test namespace-old-9.1 {empty "namespace export" list} { test namespace-old-9.2 {usage for "namespace export" command} { list [catch "namespace export test_ns_trace::zzz" msg] $msg } {1 {invalid export pattern "test_ns_trace::zzz": pattern can't specify a namespace}} - test namespace-old-9.3 {define test namespaces for import} { namespace eval test_ns_export { namespace export cmd1 cmd2 cmd3 @@ -670,7 +583,6 @@ test namespace-old-9.3 {define test namespaces for import} { } lsort [info commands test_ns_export::*] } {::test_ns_export::cmd1 ::test_ns_export::cmd2 ::test_ns_export::cmd3 ::test_ns_export::cmd4 ::test_ns_export::cmd5 ::test_ns_export::cmd6} - test namespace-old-9.4 {check export status} { set x "" namespace eval test_ns_import { @@ -682,15 +594,20 @@ test namespace-old-9.4 {check export status} { } set x } {::test_ns_import::cmd1 ::test_ns_import::cmd2 ::test_ns_import::cmd3} - test namespace-old-9.5 {empty import list in "namespace import" command} { - lsort [namespace import] -} {bytestring cleanupTests configure customMatch debug errorChannel errorFile getMatchingFiles interpreter limitConstraints loadFile loadScript loadTestedCommands mainThread makeDirectory makeFile match matchDirectories matchFiles normalizeMsg normalizePath outputChannel outputFile preserveCore removeDirectory removeFile restoreState runAllTests saveState singleProcess skip skipDirectories skipFiles temporaryDirectory test testConstraint testsDirectory threadReap verbose viewFile workingDirectory} - + namespace eval test_ns_import_empty { + namespace import ::test_ns_export::* + try { + lsort [namespace import] + } finally { + namespace delete [namespace current] + } + } +} {cmd1 cmd2 cmd3} +# there is no namespace-old-9.6 test namespace-old-9.7 {empty forget list for "namespace forget" command} { namespace forget } {} - catch {rename cmd1 {}} catch {rename cmd2 {}} catch {rename ncmd {}} @@ -700,11 +617,9 @@ test namespace-old-9.8 {only exported commands are imported} { namespace import test_ns_import::cmd* set x [lsort [info commands cmd*]] } {cmd1 cmd2} - test namespace-old-9.9 {imported commands work just the same as original} { list [cmd1 test 1 2 3] [test_ns_import::cmd1 test 4 5 6] } {{cmd1: test 1 2 3} {cmd1: test 4 5 6}} - test namespace-old-9.10 {commands can be imported from many namespaces} { namespace eval test_ns_import2 { namespace export ncmd ncmd1 ncmd2 @@ -716,27 +631,22 @@ test namespace-old-9.10 {commands can be imported from many namespaces} { namespace import test_ns_import2::* lsort [concat [info commands cmd*] [info commands ncmd*]] } {cmd1 cmd2 ncmd ncmd1 ncmd2} - test namespace-old-9.11 {imported commands can be removed by deleting them} { rename cmd1 "" lsort [concat [info commands cmd*] [info commands ncmd*]] } {cmd2 ncmd ncmd1 ncmd2} - test namespace-old-9.12 {command "namespace forget" checks for valid namespaces} { list [catch {namespace forget xyzzy::*} msg] $msg } {1 {unknown namespace in namespace forget pattern "xyzzy::*"}} - test namespace-old-9.13 {command "namespace forget" ignores patterns that don't match} { list [catch {namespace forget test_ns_import::xy*zzy} msg] $msg \ [lsort [info commands cmd?]] } {0 {} cmd2} - test namespace-old-9.14 {imported commands can be removed} { namespace forget test_ns_import::cmd? list [lsort [info commands cmd?]] \ [catch {cmd1 another test} msg] $msg } {{} 1 {invalid command name "cmd1"}} - test namespace-old-9.15 {existing commands can't be overwritten} { proc cmd1 {x y} { return [expr $x+$y] @@ -744,13 +654,11 @@ test namespace-old-9.15 {existing commands can't be overwritten} { list [catch {namespace import test_ns_import::cmd?} msg] $msg \ [cmd1 3 5] } {1 {can't import command "cmd1": already exists} 8} - test namespace-old-9.16 {use "-force" option to override existing commands} { list [cmd1 3 5] \ [namespace import -force test_ns_import::cmd?] \ [cmd1 3 5] } {8 {} {cmd1: 3 5}} - test namespace-old-9.17 {commands can be imported into many namespaces} { namespace eval test_ns_import_use { namespace import ::test_ns_import::* ::test_ns_import2::ncmd? @@ -758,13 +666,11 @@ test namespace-old-9.17 {commands can be imported into many namespaces} { [info commands ::test_ns_import_use::ncmd*]] } } {::test_ns_import_use::cmd1 ::test_ns_import_use::cmd2 ::test_ns_import_use::ncmd1 ::test_ns_import_use::ncmd2} - test namespace-old-9.18 {when command is deleted, imported commands go away} { namespace eval test_ns_import { rename cmd1 "" } list [info commands cmd1] \ [namespace eval test_ns_import_use {info commands cmd1}] } {{} {}} - test namespace-old-9.19 {when namesp is deleted, all imported commands go away} { namespace delete test_ns_import test_ns_import2 list [info commands cmd*] \ @@ -788,43 +694,36 @@ test namespace-old-10.1 {define namespace for scope test} { list [set x] [show test] } } {x-value {show: test}} - test namespace-old-10.2 {command "namespace code" requires one argument} { list [catch {namespace code} msg] $msg } {1 {wrong # args: should be "namespace code arg"}} - test namespace-old-10.3 {command "namespace code" requires one argument} { list [catch {namespace code first "second arg" third} msg] $msg } {1 {wrong # args: should be "namespace code arg"}} - test namespace-old-10.4 {command "namespace code" gets current namesp context} { namespace eval test_ns_inscope { namespace code {"1 2 3" "4 5" 6} } } {::namespace inscope ::test_ns_inscope {"1 2 3" "4 5" 6}} - test namespace-old-10.5 {with one arg, first "scope" sticks} { set sval [namespace eval test_ns_inscope {namespace code {one two}}] namespace code $sval } {::namespace inscope ::test_ns_inscope {one two}} - test namespace-old-10.6 {with many args, each "scope" adds new args} { set sval [namespace eval test_ns_inscope {namespace code {one two}}] namespace code "$sval three" } {::namespace inscope ::test_ns_inscope {one two} three} - test namespace-old-10.7 {scoped commands work with eval} { set cref [namespace eval test_ns_inscope {namespace code show}] list [eval $cref "a" "b c" "d e f"] } {{show: a b c d e f}} - test namespace-old-10.8 {scoped commands execute in namespace context} { set cref [namespace eval test_ns_inscope { namespace code {set x "some new value"} }] list [set test_ns_inscope::x] [eval $cref] [set test_ns_inscope::x] } {x-value {some new value} {some new value}} - + foreach cmd [info commands test_ns_*] { rename $cmd "" } @@ -847,3 +746,7 @@ eval namespace delete [namespace children :: test_ns_*] # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: diff --git a/tests/namespace.test b/tests/namespace.test index bf2156d..dc4063c 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.74 2008/09/28 22:17:40 dkf Exp $ +# RCS: @(#) $Id: namespace.test,v 1.75 2008/12/17 15:39:55 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1125,10 +1125,23 @@ test namespace-27.3 {NamespaceForgetCmd, arg is forgotten} { info commands ::test_ns_2::* } {::test_ns_2::cmd2} -test namespace-28.1 {NamespaceImportCmd, no args} { +test namespace-28.1 {NamespaceImportCmd, no args} -setup { catch {namespace delete {*}[namespace children :: test_ns_*]} - lsort [namespace import] -} {bytestring cleanupTests configure customMatch debug errorChannel errorFile getMatchingFiles interpreter limitConstraints loadFile loadScript loadTestedCommands mainThread makeDirectory makeFile match matchDirectories matchFiles normalizeMsg normalizePath outputChannel outputFile preserveCore removeDirectory removeFile restoreState runAllTests saveState singleProcess skip skipDirectories skipFiles temporaryDirectory test testConstraint testsDirectory threadReap verbose viewFile workingDirectory} +} -body { + namespace eval ::test_ns_1 { + proc foo {} {} + proc bar {} {} + proc boo {} {} + proc glorp {} {} + namespace export foo b* + } + namespace eval ::test_ns_2 { + namespace import ::test_ns_1::* + lsort [namespace import] + } +} -cleanup { + catch {namespace delete {*}[namespace children :: test_ns_*]} +} -result {bar boo foo} test namespace-28.2 {NamespaceImportCmd, no args and just "-force"} { namespace import -force } {} -- cgit v0.12 From dcb8ef7e626e6c7c77eab05df47cdbe283830627 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 17 Dec 2008 16:47:38 +0000 Subject: move variable "length" inside if() don't use ckfree((void *)...) but ckfree((char *)...) --- ChangeLog | 7 +++++++ generic/tclResult.c | 7 +++---- generic/tclStringObj.c | 4 ++-- generic/tclVar.c | 4 ++-- generic/tclZlib.c | 4 ++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53bc76b..7fa86c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-17 Jan Nijtmans + + * generic/tclResult.c: move variable "length" inside if() + * generic/tclStringObj.c: don't use ckfree((void *)...) but + * generic/tclVar.c: ckfree((char *)...) + * generic/tclZlib.c + 2008-12-17 Donal K. Fellows * tests/namespace.test (namespace-28.1): Make tests not diff --git a/generic/tclResult.c b/generic/tclResult.c index debb3f4..921a867 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.53 2008/12/05 14:27:36 dkf Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.54 2008/12/17 16:47:38 nijtmans Exp $ */ #include "tclInt.h" @@ -401,7 +401,6 @@ Tcl_SetResult( * a Tcl_FreeProc such as free. */ { Interp *iPtr = (Interp *) interp; - int length; register Tcl_FreeProc *oldFreeProc = iPtr->freeProc; char *oldResult = iPtr->result; @@ -410,7 +409,7 @@ Tcl_SetResult( iPtr->result = iPtr->resultSpace; iPtr->freeProc = 0; } else if (freeProc == TCL_VOLATILE) { - length = strlen(result); + int length = strlen(result); if (length > TCL_RESULT_SIZE) { iPtr->result = (char *) ckalloc((unsigned) length+1); iPtr->freeProc = TCL_DYNAMIC; @@ -420,7 +419,7 @@ Tcl_SetResult( } strcpy(iPtr->result, result); } else { - iPtr->result = result; + iPtr->result = (char *) result; iPtr->freeProc = freeProc; } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 1930ad0..abbd027 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.75 2008/12/10 18:21:47 ferrieux Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.76 2008/12/17 16:47:38 nijtmans Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1633,7 +1633,7 @@ Tcl_AppendStringsToObjVA( */ if (args != static_list) { - ckfree((void *) args); + ckfree((char *) args); } #undef STATIC_LIST_SIZE } diff --git a/generic/tclVar.c b/generic/tclVar.c index 34d3741..57607d3 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.172 2008/11/17 22:15:34 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.173 2008/12/17 16:47:38 nijtmans Exp $ */ #include "tclInt.h" @@ -3223,7 +3223,7 @@ Tcl_ArrayObjCmd( stats = Tcl_HashStats((Tcl_HashTable *) varPtr->value.tablePtr); if (stats != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj(stats, -1)); - ckfree((void *)stats); + ckfree((char *)stats); } else { Tcl_SetResult(interp,"error reading array statistics",TCL_STATIC); return TCL_ERROR; diff --git a/generic/tclZlib.c b/generic/tclZlib.c index cca035f..6115f41 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.13 2008/12/17 14:33:33 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.14 2008/12/17 16:47:38 nijtmans Exp $ */ #include "tclInt.h" @@ -718,7 +718,7 @@ ZlibStreamCleanup( Tcl_DecrRefCount(zsh->currentInput); } - ckfree((void *) zsh); + ckfree((char *) zsh); } /* -- cgit v0.12 From e0920860f01950256d4d4a39af06942fb4ff98b3 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 17 Dec 2008 17:23:10 +0000 Subject: * unix/Makefile.in: Modify the distclean-packages target so that empty build directories are deleted. --- ChangeLog | 3 +++ unix/Makefile.in | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fa86c2..cba0fcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,9 @@ 2008-12-17 Don Porter + * unix/Makefile.in: Modify the distclean-packages target so + that empty build directories are deleted. + * unix/Makefile.in: Add build support for collections of TEA * unix/configure.in: packages found under the pkgs directory. [Patch 1163406]. Still needs porting to Windows. diff --git a/unix/Makefile.in b/unix/Makefile.in index 353b6fb..83b5008 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.250 2008/12/17 15:36:58 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.251 2008/12/17 17:23:10 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1626,9 +1626,11 @@ distclean-packages: if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ ( cd $(PKG_DIR)/$$pkg; $(MAKE) distclean; ) \ fi; \ + cd $$builddir; \ + rm -rf $(PKG_DIR)/$$pkg; \ fi; \ done; \ - cd $$builddir + rm -rf $(PKG_DIR) # # Target to regenerate header files and stub files from the *.decls tables. -- cgit v0.12 From 360d476d311a9cc24ea881ad5944494cac3202e8 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 17 Dec 2008 17:54:01 +0000 Subject: typos in comments --- generic/tclInt.decls | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 54f8948..c6ab207 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.132 2008/12/15 15:48:33 dgp Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.133 2008/12/17 17:54:01 dgp Exp $ library tcl @@ -624,11 +624,11 @@ declare 156 generic { declare 157 generic { Var *TclVarTraceExists(Tcl_Interp *interp, const char *varName) } -# REMOVED - use public Tcl_SetStartupPath() +# REMOVED - use public Tcl_SetStartupScript() #declare 158 generic { # void TclSetStartupScriptFileName(const char *filename) #} -# REMOVED - use public Tcl_GetStartupPath() +# REMOVED - use public Tcl_GetStartupScript() #declare 159 generic { # CONST84_RETURN char *TclGetStartupScriptFileName(void) #} @@ -676,11 +676,11 @@ declare 166 generic { } # VFS-aware versions of Tcl*StartupScriptFileName (158 and 159 above) -# REMOVED - use public Tcl_SetStartupPath() +# REMOVED - use public Tcl_SetStartupScript() #declare 167 generic { # void TclSetStartupScriptPath(Tcl_Obj *pathPtr) #} -# REMOVED - use public Tcl_GetStartupPath() +# REMOVED - use public Tcl_GetStartupScript() #declare 168 generic { # Tcl_Obj *TclGetStartupScriptPath(void) #} -- cgit v0.12 From 7ec024b438448f495e48efd5b7a832dba44110c7 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 17 Dec 2008 21:05:05 +0000 Subject: General improvements. --- ChangeLog | 7 ++- doc/SetChanErr.3 | 155 +++++++++++++++++++++++++------------------------------ 2 files changed, 77 insertions(+), 85 deletions(-) diff --git a/ChangeLog b/ChangeLog index cba0fcd..408a7c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +2008-12-17 Donal K. Fellows + + * doc/SetChanErr.3: General improvements in nroff rendering and some + corrections to language issues. + 2008-12-17 Jan Nijtmans - * generic/tclResult.c: move variable "length" inside if() + * generic/tclResult.c: Move variable "length" inside if() * generic/tclStringObj.c: don't use ckfree((void *)...) but * generic/tclVar.c: ckfree((char *)...) * generic/tclZlib.c diff --git a/doc/SetChanErr.3 b/doc/SetChanErr.3 index b063121..a118155 100644 --- a/doc/SetChanErr.3 +++ b/doc/SetChanErr.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetChanErr.3,v 1.4 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: SetChanErr.3,v 1.5 2008/12/17 21:05:05 dkf Exp $ .so man.macros .TH Tcl_SetChannelError 3 8.5 Tcl "Tcl Library Procedures" .BS @@ -34,65 +34,60 @@ Refers to the Tcl channel whose bypass area is accessed. .AP Tcl_Interp* interp in Refers to the Tcl interpreter whose bypass area is accessed. .AP Tcl_Obj* msg in -Error message put into a bypass area. A list of return options and -values, followed by a string message. Both message and the -option/value information are optional. +Error message put into a bypass area. A list of return options and values, +followed by a string message. Both message and the option/value information +are optional. .AP Tcl_Obj** msgPtr out -Reference to a place where the message stored in the accessed bypass -area can be stored in. +Reference to a place where the message stored in the accessed bypass area can +be stored in. .BE .SH DESCRIPTION .PP -The current definition of a Tcl channel driver does not permit the -direct return of arbitrary error messages, except for the setting and -retrieval of channel options. All other functions are restricted to -POSIX error codes. +The current definition of a Tcl channel driver does not permit the direct +return of arbitrary error messages, except for the setting and retrieval of +channel options. All other functions are restricted to POSIX error codes. .PP -The functions described here overcome this limitation. Channel drivers -are allowed to use \fBTcl_SetChannelError\fR and -\fBTcl_SetChannelErrorInterp\fR to place arbitrary error messages in -\fBbypass areas\fI defined for channels and interpreters. And the -generic I/O layer uses \fBTcl_GetChannelError\fR and -\fBTcl_GetChannelErrorInterp\fR to look for messages in the bypass -areas and arrange for their return as errors. The posix error codes -set by a driver are used now if and only if no messages are present. +The functions described here overcome this limitation. Channel drivers are +allowed to use \fBTcl_SetChannelError\fR and \fBTcl_SetChannelErrorInterp\fR +to place arbitrary error messages in \fBbypass areas\fR defined for channels +and interpreters. And the generic I/O layer uses \fBTcl_GetChannelError\fR and +\fBTcl_GetChannelErrorInterp\fR to look for messages in the bypass areas and +arrange for their return as errors. The posix error codes set by a driver are +used now if and only if no messages are present. .PP -\fBTcl_SetChannelError\fR stores error information in the bypass area -of the specified channel. The number of references to the \fBmsg\fR -object goes up by one. Previously stored information will be -discarded, by releasing the reference held by the channel. The channel -reference must not be NULL. +\fBTcl_SetChannelError\fR stores error information in the bypass area of the +specified channel. The number of references to the \fBmsg\fR object goes up by +one. Previously stored information will be discarded, by releasing the +reference held by the channel. The channel reference must not be NULL. .PP -\fBTcl_SetChannelErrorInterp\fR stores error information in the bypass -area of the specified interpreter. The number of references to the -\fBmsg\fR object goes up by one. Previously stored information will be -discarded, by releasing the reference held by the interpreter. The -interpreter reference must not be NULL. +\fBTcl_SetChannelErrorInterp\fR stores error information in the bypass area of +the specified interpreter. The number of references to the \fBmsg\fR object +goes up by one. Previously stored information will be discarded, by releasing +the reference held by the interpreter. The interpreter reference must not be +NULL. .PP -\fBTcl_GetChannelError\fR places either the error message held in the -bypass area of the specified channel into \fImsgPtr\fR, or NULL; and -resets the bypass. I.e. after an invokation all following invokations -will return NULL, until an intervening invokation of -\fBTcl_SetChannelError\fR with a non-NULL message. The \fImsgPtr\fR -must not be NULL. The reference count of the message is not touched. -The reference previously held by the channel is now held by the caller -of the function and it is its responsibility to release that reference -when it is done with the object. +\fBTcl_GetChannelError\fR places either the error message held in the bypass +area of the specified channel into \fImsgPtr\fR, or NULL; and resets the +bypass, that is, after an invokation all following invokations will return +NULL, until an intervening invokation of \fBTcl_SetChannelError\fR with a +non-NULL message. The \fImsgPtr\fR must not be NULL. The reference count of +the message is not touched. The reference previously held by the channel is +now held by the caller of the function and it is its responsibility to release +that reference when it is done with the object. .PP -\fBTcl_GetChannelErrorInterp\fR places either the error message held -in the bypass area of the specified interpreter into \fImsgPtr\fR, or -NULL; and resets the bypass. I.e. after an invokation all following -invokations will return NULL, until an intervening invokation of -\fBTcl_SetChannelErrorInterp\fR with a non-NULL message. The -\fImsgPtr\fR must not be NULL. The reference count of the message is -not touched. The reference previously held by the interpreter is now -held by the caller of the function and it is its responsibility to -release that reference when it is done with the object. -.PP -Which functions of a channel driver are allowed to use which bypass -function is listed below, as is which functions of the public channel -API may leave a messages in the bypass areas. +\fBTcl_GetChannelErrorInterp\fR places either the error message held in the +bypass area of the specified interpreter into \fImsgPtr\fR, or NULL; and +resets the bypass, that is, after an invokation all following invokations will +return NULL, until an intervening invokation of +\fBTcl_SetChannelErrorInterp\fR with a non-NULL message. The \fImsgPtr\fR must +not be NULL. The reference count of the message is not touched. The reference +previously held by the interpreter is now held by the caller of the function +and it is its responsibility to release that reference when it is done with +the object. .PP +Which functions of a channel driver are allowed to use which bypass function +is listed below, as is which functions of the public channel API may leave a +messages in the bypass areas. .IP \fBTcl_DriverCloseProc\fR May use \fBTcl_SetChannelErrorInterp\fR, and only this function. .IP \fBTcl_DriverInputProc\fR @@ -104,51 +99,43 @@ May use \fBTcl_SetChannelError\fR, and only this function. .IP \fBTcl_DriverWideSeekProc\fR May use \fBTcl_SetChannelError\fR, and only this function. .IP \fBTcl_DriverSetOptionProc\fR -Has already the ability to pass arbitrary error messages. Must -\fBnot\fR use any of the new functions. +Has already the ability to pass arbitrary error messages. Must \fInot\fR use +any of the new functions. .IP \fBTcl_DriverGetOptionProc\fR Has already the ability to pass arbitrary error messages. Must -\fBnot\fR use any of the new functions. +\fInot\fR use any of the new functions. .IP \fBTcl_DriverWatchProc\fR -Must \fBnot\fR use any of the new functions. Is internally called and -has no ability to return any type of error whatsoever. +Must \fInot\fR use any of the new functions. Is internally called and has no +ability to return any type of error whatsoever. .IP \fBTcl_DriverBlockModeProc\fR May use \fBTcl_SetChannelError\fR, and only this function. .IP \fBTcl_DriverGetHandleProc\fR -Must \fBnot\fR use any of the new functions. It is only a low-level -function, and not used by Tcl commands. +Must \fInot\fR use any of the new functions. It is only a low-level function, +and not used by Tcl commands. .IP \fBTcl_DriverHandlerProc\fR -Must \fBnot\fR use any of the new functions. Is internally called and -has no ability to return any type of error whatsoever. +Must \fInot\fR use any of the new functions. Is internally called and has no +ability to return any type of error whatsoever. .PP -Given the information above the following public functions of the Tcl -C API are affected by these changes. I.e. when these functions are -called the channel may now contain a stored arbitrary error message -requiring processing by the caller. +Given the information above the following public functions of the Tcl C API +are affected by these changes; when these functions are called, the channel +may now contain a stored arbitrary error message requiring processing by the +caller. +.DS +.ta 1.9i 4i +\fBTcl_Flush\fR \fBTcl_GetsObj\fR \fBTcl_Gets\fR +\fBTcl_ReadChars\fR \fBTcl_ReadRaw\fR \fBTcl_Read\fR +\fBTcl_Seek\fR \fBTcl_StackChannel\fR \fBTcl_Tell\fR +\fBTcl_WriteChars\fR \fBTcl_WriteObj\fR \fBTcl_WriteRaw\fR +\fBTcl_Write\fR +.DE .PP -.IP \fBTcl_StackChannel\fR -.IP \fBTcl_Seek\fR -.IP \fBTcl_Tell\fR -.IP \fBTcl_ReadRaw\fR -.IP \fBTcl_Read\fR -.IP \fBTcl_ReadChars\fR -.IP \fBTcl_Gets\fR -.IP \fBTcl_GetsObj\fR -.IP \fBTcl_Flush\fR -.IP \fBTcl_WriteRaw\fR -.IP \fBTcl_WriteObj\fR -.IP \fBTcl_Write\fR -.IP \fBTcl_WriteChars\fR -.PP -All other API functions are unchanged. Especially the functions below +All other API functions are unchanged. In particular, the functions below leave all their error information in the interpreter result. -.PP -.IP \fBTcl_Close\fR -.IP \fBTcl_UnregisterChannel\fR -.IP \fBTcl_UnstackChannel\fR - +.DS +.ta 1.9i 4i +\fBTcl_Close\fR \fBTcl_UnstackChannel\fR \fBTcl_UnregisterChannel\fR +.DE .SH "SEE ALSO" Tcl_Close(3), Tcl_OpenFileChannel(3), Tcl_SetErrno(3) - .SH KEYWORDS channel driver, error messages, channel type -- cgit v0.12 From 02170950464b11d466a6355a3b6f1c84dc186339 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 17 Dec 2008 22:07:42 +0000 Subject: don't use ckfree((void *)...) but ckfree((char *)...) --- ChangeLog | 1 + generic/tclBasic.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 408a7c0..2069a20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ * generic/tclStringObj.c: don't use ckfree((void *)...) but * generic/tclVar.c: ckfree((char *)...) * generic/tclZlib.c + * generic/tclBasic.c 2008-12-17 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cfc88cc..d58368d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.377 2008/12/12 16:18:09 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.378 2008/12/17 22:07:42 nijtmans Exp $ */ #include "tclInt.h" @@ -3492,8 +3492,8 @@ OldMathFuncDeleteProc( { OldMathFuncData *dataPtr = clientData; - ckfree((void *) dataPtr->argTypes); - ckfree((void *) dataPtr); + ckfree((char *) dataPtr->argTypes); + ckfree((char *) dataPtr); } /* -- cgit v0.12 From cd0108cccb852eff4a8a65fa1e68297e85bc12ec Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 00:22:50 +0000 Subject: Now with *nearly* working gzipping channels... --- generic/tclZlib.c | 190 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 99 insertions(+), 91 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 6115f41..64c4665 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.14 2008/12/17 16:47:38 nijtmans Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.15 2008/12/18 00:22:50 dkf Exp $ */ #include "tclInt.h" @@ -95,7 +95,6 @@ static void ChanWatch(ClientData instanceData, int mask); static int ChanGetHandle(ClientData instanceData, int direction, ClientData *handlePtr); static int ChanBlockMode(ClientData instanceData, int mode); -static int ChanFlush(ClientData instanceData); static int ChanHandler(ClientData instanceData, int interestMask); static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int mode, @@ -113,9 +112,9 @@ static const Tcl_ChannelType zlibChannelType = { ChanGetOption, ChanWatch, ChanGetHandle, - NULL, /* close2Proc, */ + NULL, /* close2Proc */ ChanBlockMode, - ChanFlush, + NULL, /* flushProc */ NULL /*ChanHandler*/, NULL /* wideSeekProc */ }; @@ -136,10 +135,9 @@ typedef struct { z_stream outStream; /* Structure used by zlib for compression of * output. */ char *inBuffer; - int inAllocated, inUsed, inPos; + int inAllocated; char *outBuffer; - int outAllocated, outUsed, outPos; - int flushType; + int outAllocated; GzipHeader inHeader; GzipHeader outHeader; @@ -1030,7 +1028,6 @@ Tcl_ZlibStreamGet( return TCL_ERROR; } - /*printf("listLen %d, e==%d, avail_out %d\n", listLen, e, zsh->stream.avail_out);*/ while ((zsh->stream.avail_out > 0) && (e==Z_OK || e==Z_BUF_ERROR) && (listLen > 0)) { /* @@ -2106,11 +2103,31 @@ ChanClose( Tcl_Interp *interp) { ZlibChannelData *cd = instanceData; - int e; + int e, result = TCL_OK; if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { e = deflateEnd(&cd->inStream); } else { + cd->outStream.avail_in = 0; + do { + cd->outStream.next_out = (Bytef *) cd->outBuffer; + cd->outStream.avail_out = cd->outAllocated; + e = deflate(&cd->outStream, Z_FINISH); + if (e != Z_OK && e != Z_STREAM_END) { + ConvertError(interp, e); + result = TCL_ERROR; + break; + } + if (cd->outStream.avail_out != cd->outAllocated) { + if (Tcl_WriteRaw(cd->parent, cd->outBuffer, + cd->outAllocated - cd->outStream.avail_out) < 0) { + Tcl_AppendResult(interp, "error while finalizing file: ", + Tcl_PosixError(interp), NULL); + result = TCL_ERROR; + break; + } + } + } while (e != Z_STREAM_END); e = inflateEnd(&cd->outStream); } @@ -2136,27 +2153,40 @@ ChanInput( ZlibChannelData *cd = instanceData; Tcl_DriverInputProc *inProc = Tcl_ChannelInputProc(Tcl_GetChannelType(cd->parent)); + int e, read, flush = Z_NO_FLUSH; if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { return inProc(Tcl_GetChannelInstanceData(cd->parent), buf, toRead, errorCodePtr); } -#if 0 - cd->inStream.avail_in = 0; - do { - cd->inStream.next_out = (Bytef *) cd->inBuffer; - cd->inStream.avail_out = cd->inAllocated; - - if (inflate(&cd->inStream, Z_SYNC_FLUSH) != Z_OK) { + cd->inStream.next_out = (Bytef *) buf; + cd->inStream.avail_out = toRead; + while (1) { + e = inflate(&cd->inStream, flush); + if ((e == Z_STREAM_END) || (e==Z_OK && cd->inStream.avail_out==0)) { + return toRead - cd->inStream.avail_out; + } + if (e != Z_OK) { *errorCodePtr = EINVAL; - return 0; + return -1; } - } while (cd->inStream.avail_out > 0); -#endif - // TODO - *errorCodePtr = EINVAL; - return 0; + + /* + * Emptied the buffer of data from the underlying channel. Get some + * more. + */ + + read = Tcl_ReadRaw(cd->parent, cd->inBuffer, cd->inAllocated); + if (read < 0) { + *errorCodePtr = Tcl_GetErrno(); + return -1; + } else if (read == 0) { + flush = Z_SYNC_FLUSH; + } + + cd->inStream.next_in = (Bytef *) cd->inBuffer; + } } static int @@ -2186,19 +2216,19 @@ ChanOutput( if (e == Z_OK && cd->outStream.avail_out > 0) { if (Tcl_WriteRaw(cd->parent, cd->outBuffer, - (int) cd->outStream.avail_out) < 0) { + (int) cd->outAllocated - cd->outStream.avail_out) < 0) { *errorCodePtr = Tcl_GetErrno(); - return 0; + return -1; } } } while (e == Z_OK && cd->outStream.avail_in > 0); if (e != Z_OK) { *errorCodePtr = EINVAL; - return 0; + return -1; } - return 1; + return toWrite - cd->outStream.avail_out; } static int @@ -2211,20 +2241,48 @@ ChanSetOption( /* not used */ ZlibChannelData *cd = instanceData; Tcl_DriverSetOptionProc *setOptionProc = Tcl_ChannelSetOptionProc(Tcl_GetChannelType(cd->parent)); - static const char *chanOptions = "flushmode"; + static const char *chanOptions = "flush"; + int haveFlushOpt = (cd->mode == TCL_ZLIB_STREAM_DEFLATE); + + if (haveFlushOpt && optionName && strcmp(optionName, "-flush") == 0) { + int flushType; - if (optionName && strcmp(optionName, "-flushmode") == 0) { if (value[0] == 'f' && strcmp(value, "full") == 0) { - cd->flushType = Z_FULL_FLUSH; - return TCL_OK; + flushType = Z_FULL_FLUSH; + goto doFlush; } if (value[0] == 's' && strcmp(value, "sync") == 0) { - cd->flushType = Z_SYNC_FLUSH; - return TCL_OK; + flushType = Z_SYNC_FLUSH; + goto doFlush; } - Tcl_AppendResult(interp, "unknown -flushmode \"", value, + Tcl_AppendResult(interp, "unknown -flush type \"", value, "\": must be full or sync", NULL); return TCL_ERROR; + + doFlush: + cd->outStream.avail_in = 0; + do { + int e; + + cd->outStream.next_out = (Bytef *) cd->outBuffer; + cd->outStream.avail_out = cd->outAllocated; + + e = deflate(&cd->outStream, flushType); + if (e != Z_OK) { + ConvertError(interp, e); + return TCL_ERROR; + } + + if (cd->outStream.avail_out > 0) { + if (Tcl_WriteRaw(cd->parent, cd->outBuffer, + (int) cd->outStream.next_out) < 0) { + Tcl_AppendResult(interp, "problem flushing channel: ", + Tcl_PosixError(interp), NULL); + return TCL_ERROR; + } + } + } while (cd->outStream.avail_out > 0); + return TCL_OK; } if (setOptionProc == NULL) { @@ -2245,7 +2303,7 @@ ChanGetOption( ZlibChannelData *cd = instanceData; Tcl_DriverGetOptionProc *getOptionProc = Tcl_ChannelGetOptionProc(Tcl_GetChannelType(cd->parent)); - static const char *chanOptions = "crc flushmode header"; + static const char *chanOptions = "crc header"; /* * The "crc" option reports the current CRC (calculated with the Adler32 @@ -2276,29 +2334,6 @@ ChanGetOption( } /* - * The "flushmode" option reports how the [flush] command will actually - * effect the channel. - */ - - if (optionName == NULL || strcmp(optionName, "-flushmode") == 0) { - char *value; - - if (cd->flushType == Z_FULL_FLUSH) { - value = "full"; - } else { - value = "sync"; - } - - if (optionName == NULL) { - Tcl_DStringAppendElement(dsPtr, "-flushmode"); - Tcl_DStringAppendElement(dsPtr, value); - } else { - Tcl_DStringAppend(dsPtr, value, -1); - return TCL_OK; - } - } - - /* * The "header" option, which is only valid on inflating gzip channels, * reports the header that has been read from the start of the stream. */ @@ -2371,34 +2406,6 @@ ChanBlockMode( } static int -ChanFlush( - ClientData instanceData) -{ - ZlibChannelData *cd = instanceData; - - if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { - cd->outStream.avail_in = 0; - do { - cd->outStream.next_out = (Bytef *) cd->outBuffer; - cd->outStream.avail_out = cd->outAllocated; - - if (deflate(&cd->outStream, cd->flushType) != Z_OK) { - Tcl_SetErrno(EINVAL); - return 0; - } - - if (cd->outStream.avail_out > 0) { - if (Tcl_WriteRaw(cd->parent, cd->outBuffer, - (int) cd->outStream.next_out) < 0) { - return 0; - } - } - } while (cd->outStream.avail_out > 0); - } - return 1; -} - -static int ChanHandler( ClientData instanceData, int interestMask) @@ -2431,16 +2438,17 @@ ZlibStackChannel( memset(cd, 0, sizeof(ZlibChannelData)); cd->mode = mode; - cd->flushType = Z_SYNC_FLUSH; if (format == TCL_ZLIB_FORMAT_GZIP || format == TCL_ZLIB_FORMAT_AUTO) { if (mode == TCL_ZLIB_STREAM_DEFLATE) { - int dummy = 0; + if (gzipHeaderDictPtr) { + int dummy = 0; - cd->flags |= OUT_HEADER; - if (GenerateHeader(interp, gzipHeaderDictPtr, &cd->outHeader, - &dummy) != TCL_OK) { - goto error; + cd->flags |= OUT_HEADER; + if (GenerateHeader(interp, gzipHeaderDictPtr, &cd->outHeader, + &dummy) != TCL_OK) { + goto error; + } } } else { cd->flags |= IN_HEADER; -- cgit v0.12 From a189e6bf469919f77d6e9884d112c93599363de5 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Thu, 18 Dec 2008 01:14:16 +0000 Subject: TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channels --- ChangeLog | 17 + doc/close.n | 20 +- generic/tcl.decls | 7 +- generic/tclDecls.h | 14075 ++++++++++++++++++++++++------------------------ generic/tclIO.c | 127 +- generic/tclIOCmd.c | 48 +- generic/tclStubInit.c | 2331 ++++---- tests/chan.test | 22 +- tests/chanio.test | 53 +- tests/ioCmd.test | 20 +- unix/tclUnixChan.c | 58 +- unix/tclUnixPipe.c | 104 +- win/tclWinSock.c | 57 +- 13 files changed, 8712 insertions(+), 8227 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2069a20..bcf6150 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2008-12-18 Alexandre Ferrieux + + TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channels + + * doc/close.n + * generic/tclIO.c + * generic/tclIOCmd.c + * unix/tclUnixChan.c + * unix/tclUnixPipe.c + * win/tclWinSock.c + * generic/tcl.decls + * generic/tclDecls.h + * generic/tclStubInit.c + * tests/chan.test + * tests/chanio.test + * tests/ioCmd.test + 2008-12-17 Donal K. Fellows * doc/SetChanErr.3: General improvements in nroff rendering and some diff --git a/doc/close.n b/doc/close.n index 800ee8a..c4b1612 100644 --- a/doc/close.n +++ b/doc/close.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: close.n,v 1.14 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: close.n,v 1.15 2008/12/18 01:14:16 ferrieux Exp $ '\" .so man.macros .TH close n 7.5 Tcl "Tcl Built-In Commands" @@ -14,19 +14,20 @@ .SH NAME close \- Close an open channel .SH SYNOPSIS -\fBclose \fIchannelId\fR +\fBclose \fIchannelId\fR ?r(ead)|w(rite)? .BE .SH DESCRIPTION .PP -Closes the channel given by \fIchannelId\fR. +Closes or half-closes the channel given by \fIchannelId\fR. .PP \fIChannelId\fR must be an identifier for an open channel such as a Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR), the return value from an invocation of \fBopen\fR or \fBsocket\fR, or the result of a channel creation command provided by a Tcl extension. .PP -All buffered output is flushed to the channel's output device, +The single-argument form is a simple "full-close": +all buffered output is flushed to the channel's output device, any buffered input is discarded, the underlying file or device is closed, and \fIchannelId\fR becomes unavailable for use. .PP @@ -56,6 +57,15 @@ The command returns an empty string, and may generate an error if an error occurs while flushing output. If a command in a command pipeline created with \fBopen\fR returns an error, \fBclose\fR generates an error (similar to the \fBexec\fR command.) +.PP +The two-argument form is a "half-close": given a bidirectional channel like a socket or command pipeline and a (possibly abbreviated) direction, it closes only the substream going in that direction. This means a shutdown() on a socket, and a close() of one end of a pipe for a command pipeline. Then, the Tcl-level channel data structure is either kept or freed depending on whether the other direction is still open. +.PP +A single-argument close on an already half-closed bi-channel is defined to just "finish the job. A half-close on an already closed half, or on a wrong-sided unidirectional channel, raises an error. +.PP +In the case of a command pipeline, the child-reaping duty falls upon the shoulders of the last close or half-close, which is thus allowed to report an abnormal exit error. +.PP +Currently only sockets and command pipelines support half-close. A future extension will allow reflected and stacked channels to do so. + .SH EXAMPLE .PP This illustrates how you can use Tcl to ensure that files get closed @@ -76,4 +86,4 @@ proc withOpenFile {filename channelVar script} { .SH "SEE ALSO" file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3) .SH KEYWORDS -blocking, channel, close, nonblocking +blocking, channel, close, nonblocking, half-close diff --git a/generic/tcl.decls b/generic/tcl.decls index 350c5d6..c97331b 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.162 2008/12/16 14:34:56 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.163 2008/12/18 01:14:16 ferrieux Exp $ library tcl @@ -2271,6 +2271,11 @@ declare 623 generic { } +# TIP#332, Half Close made public +declare 624 generic { + int Tcl_CloseEx(Tcl_Interp *interp, Tcl_Channel chan, int flags) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are only diff --git a/generic/tclDecls.h b/generic/tclDecls.h index c7e0286..3df68c6 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1,7032 +1,7043 @@ -/* - * tclDecls.h -- - * - * Declarations of functions in the platform independent public Tcl API. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclDecls.h,v 1.163 2008/12/16 14:34:56 dgp Exp $ - */ - -#ifndef _TCLDECLS -#define _TCLDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef Tcl_PkgProvideEx_TCL_DECLARED -#define Tcl_PkgProvideEx_TCL_DECLARED -/* 0 */ -EXTERN int Tcl_PkgProvideEx (Tcl_Interp * interp, - const char * name, const char * version, - ClientData clientData); -#endif -#ifndef Tcl_PkgRequireEx_TCL_DECLARED -#define Tcl_PkgRequireEx_TCL_DECLARED -/* 1 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, - const char * name, const char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_Panic_TCL_DECLARED -#define Tcl_Panic_TCL_DECLARED -/* 2 */ -EXTERN void Tcl_Panic (const char * format, ...); -#endif -#ifndef Tcl_Alloc_TCL_DECLARED -#define Tcl_Alloc_TCL_DECLARED -/* 3 */ -EXTERN char * Tcl_Alloc (unsigned int size); -#endif -#ifndef Tcl_Free_TCL_DECLARED -#define Tcl_Free_TCL_DECLARED -/* 4 */ -EXTERN void Tcl_Free (char * ptr); -#endif -#ifndef Tcl_Realloc_TCL_DECLARED -#define Tcl_Realloc_TCL_DECLARED -/* 5 */ -EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_DbCkalloc_TCL_DECLARED -#define Tcl_DbCkalloc_TCL_DECLARED -/* 6 */ -EXTERN char * Tcl_DbCkalloc (unsigned int size, const char * file, - int line); -#endif -#ifndef Tcl_DbCkfree_TCL_DECLARED -#define Tcl_DbCkfree_TCL_DECLARED -/* 7 */ -EXTERN int Tcl_DbCkfree (char * ptr, const char * file, - int line); -#endif -#ifndef Tcl_DbCkrealloc_TCL_DECLARED -#define Tcl_DbCkrealloc_TCL_DECLARED -/* 8 */ -EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, - const char * file, int line); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer_TCL_DECLARED -#define Tcl_SetTimer_TCL_DECLARED -/* 11 */ -EXTERN void Tcl_SetTimer (const Tcl_Time * timePtr); -#endif -#ifndef Tcl_Sleep_TCL_DECLARED -#define Tcl_Sleep_TCL_DECLARED -/* 12 */ -EXTERN void Tcl_Sleep (int ms); -#endif -#ifndef Tcl_WaitForEvent_TCL_DECLARED -#define Tcl_WaitForEvent_TCL_DECLARED -/* 13 */ -EXTERN int Tcl_WaitForEvent (const Tcl_Time * timePtr); -#endif -#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED -#define Tcl_AppendAllObjTypes_TCL_DECLARED -/* 14 */ -EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendStringsToObj_TCL_DECLARED -#define Tcl_AppendStringsToObj_TCL_DECLARED -/* 15 */ -EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); -#endif -#ifndef Tcl_AppendToObj_TCL_DECLARED -#define Tcl_AppendToObj_TCL_DECLARED -/* 16 */ -EXTERN void Tcl_AppendToObj (Tcl_Obj * objPtr, - const char * bytes, int length); -#endif -#ifndef Tcl_ConcatObj_TCL_DECLARED -#define Tcl_ConcatObj_TCL_DECLARED -/* 17 */ -EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_ConvertToType_TCL_DECLARED -#define Tcl_ConvertToType_TCL_DECLARED -/* 18 */ -EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, - Tcl_Obj * objPtr, - const Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_DbDecrRefCount_TCL_DECLARED -#define Tcl_DbDecrRefCount_TCL_DECLARED -/* 19 */ -EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, - const char * file, int line); -#endif -#ifndef Tcl_DbIncrRefCount_TCL_DECLARED -#define Tcl_DbIncrRefCount_TCL_DECLARED -/* 20 */ -EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, - const char * file, int line); -#endif -#ifndef Tcl_DbIsShared_TCL_DECLARED -#define Tcl_DbIsShared_TCL_DECLARED -/* 21 */ -EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, const char * file, - int line); -#endif -#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED -#define Tcl_DbNewBooleanObj_TCL_DECLARED -/* 22 */ -EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, - const char * file, int line); -#endif -#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED -#define Tcl_DbNewByteArrayObj_TCL_DECLARED -/* 23 */ -EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (const unsigned char * bytes, - int length, const char * file, int line); -#endif -#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED -#define Tcl_DbNewDoubleObj_TCL_DECLARED -/* 24 */ -EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, - const char * file, int line); -#endif -#ifndef Tcl_DbNewListObj_TCL_DECLARED -#define Tcl_DbNewListObj_TCL_DECLARED -/* 25 */ -EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *const * objv, - const char * file, int line); -#endif -#ifndef Tcl_DbNewLongObj_TCL_DECLARED -#define Tcl_DbNewLongObj_TCL_DECLARED -/* 26 */ -EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, const char * file, - int line); -#endif -#ifndef Tcl_DbNewObj_TCL_DECLARED -#define Tcl_DbNewObj_TCL_DECLARED -/* 27 */ -EXTERN Tcl_Obj * Tcl_DbNewObj (const char * file, int line); -#endif -#ifndef Tcl_DbNewStringObj_TCL_DECLARED -#define Tcl_DbNewStringObj_TCL_DECLARED -/* 28 */ -EXTERN Tcl_Obj * Tcl_DbNewStringObj (const char * bytes, int length, - const char * file, int line); -#endif -#ifndef Tcl_DuplicateObj_TCL_DECLARED -#define Tcl_DuplicateObj_TCL_DECLARED -/* 29 */ -EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); -#endif -#ifndef TclFreeObj_TCL_DECLARED -#define TclFreeObj_TCL_DECLARED -/* 30 */ -EXTERN void TclFreeObj (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetBoolean_TCL_DECLARED -#define Tcl_GetBoolean_TCL_DECLARED -/* 31 */ -EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, - const char * src, int * boolPtr); -#endif -#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED -#define Tcl_GetBooleanFromObj_TCL_DECLARED -/* 32 */ -EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * boolPtr); -#endif -#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED -#define Tcl_GetByteArrayFromObj_TCL_DECLARED -/* 33 */ -EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetDouble_TCL_DECLARED -#define Tcl_GetDouble_TCL_DECLARED -/* 34 */ -EXTERN int Tcl_GetDouble (Tcl_Interp * interp, const char * src, - double * doublePtr); -#endif -#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED -#define Tcl_GetDoubleFromObj_TCL_DECLARED -/* 35 */ -EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * doublePtr); -#endif -#ifndef Tcl_GetIndexFromObj_TCL_DECLARED -#define Tcl_GetIndexFromObj_TCL_DECLARED -/* 36 */ -EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, - CONST84 char *const * tablePtr, - const char * msg, int flags, int * indexPtr); -#endif -#ifndef Tcl_GetInt_TCL_DECLARED -#define Tcl_GetInt_TCL_DECLARED -/* 37 */ -EXTERN int Tcl_GetInt (Tcl_Interp * interp, const char * src, - int * intPtr); -#endif -#ifndef Tcl_GetIntFromObj_TCL_DECLARED -#define Tcl_GetIntFromObj_TCL_DECLARED -/* 38 */ -EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * intPtr); -#endif -#ifndef Tcl_GetLongFromObj_TCL_DECLARED -#define Tcl_GetLongFromObj_TCL_DECLARED -/* 39 */ -EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * longPtr); -#endif -#ifndef Tcl_GetObjType_TCL_DECLARED -#define Tcl_GetObjType_TCL_DECLARED -/* 40 */ -EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (const char * typeName); -#endif -#ifndef Tcl_GetStringFromObj_TCL_DECLARED -#define Tcl_GetStringFromObj_TCL_DECLARED -/* 41 */ -EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_InvalidateStringRep_TCL_DECLARED -#define Tcl_InvalidateStringRep_TCL_DECLARED -/* 42 */ -EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjAppendList_TCL_DECLARED -#define Tcl_ListObjAppendList_TCL_DECLARED -/* 43 */ -EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); -#endif -#ifndef Tcl_ListObjAppendElement_TCL_DECLARED -#define Tcl_ListObjAppendElement_TCL_DECLARED -/* 44 */ -EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjGetElements_TCL_DECLARED -#define Tcl_ListObjGetElements_TCL_DECLARED -/* 45 */ -EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * objcPtr, - Tcl_Obj *** objvPtr); -#endif -#ifndef Tcl_ListObjIndex_TCL_DECLARED -#define Tcl_ListObjIndex_TCL_DECLARED -/* 46 */ -EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj ** objPtrPtr); -#endif -#ifndef Tcl_ListObjLength_TCL_DECLARED -#define Tcl_ListObjLength_TCL_DECLARED -/* 47 */ -EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * lengthPtr); -#endif -#ifndef Tcl_ListObjReplace_TCL_DECLARED -#define Tcl_ListObjReplace_TCL_DECLARED -/* 48 */ -EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, - Tcl_Obj * listPtr, int first, int count, - int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_NewBooleanObj_TCL_DECLARED -#define Tcl_NewBooleanObj_TCL_DECLARED -/* 49 */ -EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); -#endif -#ifndef Tcl_NewByteArrayObj_TCL_DECLARED -#define Tcl_NewByteArrayObj_TCL_DECLARED -/* 50 */ -EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char * bytes, - int length); -#endif -#ifndef Tcl_NewDoubleObj_TCL_DECLARED -#define Tcl_NewDoubleObj_TCL_DECLARED -/* 51 */ -EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); -#endif -#ifndef Tcl_NewIntObj_TCL_DECLARED -#define Tcl_NewIntObj_TCL_DECLARED -/* 52 */ -EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); -#endif -#ifndef Tcl_NewListObj_TCL_DECLARED -#define Tcl_NewListObj_TCL_DECLARED -/* 53 */ -EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_NewLongObj_TCL_DECLARED -#define Tcl_NewLongObj_TCL_DECLARED -/* 54 */ -EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); -#endif -#ifndef Tcl_NewObj_TCL_DECLARED -#define Tcl_NewObj_TCL_DECLARED -/* 55 */ -EXTERN Tcl_Obj * Tcl_NewObj (void); -#endif -#ifndef Tcl_NewStringObj_TCL_DECLARED -#define Tcl_NewStringObj_TCL_DECLARED -/* 56 */ -EXTERN Tcl_Obj * Tcl_NewStringObj (const char * bytes, int length); -#endif -#ifndef Tcl_SetBooleanObj_TCL_DECLARED -#define Tcl_SetBooleanObj_TCL_DECLARED -/* 57 */ -EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); -#endif -#ifndef Tcl_SetByteArrayLength_TCL_DECLARED -#define Tcl_SetByteArrayLength_TCL_DECLARED -/* 58 */ -EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetByteArrayObj_TCL_DECLARED -#define Tcl_SetByteArrayObj_TCL_DECLARED -/* 59 */ -EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, - const unsigned char * bytes, int length); -#endif -#ifndef Tcl_SetDoubleObj_TCL_DECLARED -#define Tcl_SetDoubleObj_TCL_DECLARED -/* 60 */ -EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, - double doubleValue); -#endif -#ifndef Tcl_SetIntObj_TCL_DECLARED -#define Tcl_SetIntObj_TCL_DECLARED -/* 61 */ -EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); -#endif -#ifndef Tcl_SetListObj_TCL_DECLARED -#define Tcl_SetListObj_TCL_DECLARED -/* 62 */ -EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_SetLongObj_TCL_DECLARED -#define Tcl_SetLongObj_TCL_DECLARED -/* 63 */ -EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); -#endif -#ifndef Tcl_SetObjLength_TCL_DECLARED -#define Tcl_SetObjLength_TCL_DECLARED -/* 64 */ -EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetStringObj_TCL_DECLARED -#define Tcl_SetStringObj_TCL_DECLARED -/* 65 */ -EXTERN void Tcl_SetStringObj (Tcl_Obj * objPtr, - const char * bytes, int length); -#endif -#ifndef Tcl_AddErrorInfo_TCL_DECLARED -#define Tcl_AddErrorInfo_TCL_DECLARED -/* 66 */ -EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, - const char * message); -#endif -#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED -#define Tcl_AddObjErrorInfo_TCL_DECLARED -/* 67 */ -EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, - const char * message, int length); -#endif -#ifndef Tcl_AllowExceptions_TCL_DECLARED -#define Tcl_AllowExceptions_TCL_DECLARED -/* 68 */ -EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); -#endif -#ifndef Tcl_AppendElement_TCL_DECLARED -#define Tcl_AppendElement_TCL_DECLARED -/* 69 */ -EXTERN void Tcl_AppendElement (Tcl_Interp * interp, - const char * element); -#endif -#ifndef Tcl_AppendResult_TCL_DECLARED -#define Tcl_AppendResult_TCL_DECLARED -/* 70 */ -EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_AsyncCreate_TCL_DECLARED -#define Tcl_AsyncCreate_TCL_DECLARED -/* 71 */ -EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AsyncDelete_TCL_DECLARED -#define Tcl_AsyncDelete_TCL_DECLARED -/* 72 */ -EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncInvoke_TCL_DECLARED -#define Tcl_AsyncInvoke_TCL_DECLARED -/* 73 */ -EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); -#endif -#ifndef Tcl_AsyncMark_TCL_DECLARED -#define Tcl_AsyncMark_TCL_DECLARED -/* 74 */ -EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncReady_TCL_DECLARED -#define Tcl_AsyncReady_TCL_DECLARED -/* 75 */ -EXTERN int Tcl_AsyncReady (void); -#endif -#ifndef Tcl_BackgroundError_TCL_DECLARED -#define Tcl_BackgroundError_TCL_DECLARED -/* 76 */ -EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); -#endif -#ifndef Tcl_Backslash_TCL_DECLARED -#define Tcl_Backslash_TCL_DECLARED -/* 77 */ -EXTERN char Tcl_Backslash (const char * src, int * readPtr); -#endif -#ifndef Tcl_BadChannelOption_TCL_DECLARED -#define Tcl_BadChannelOption_TCL_DECLARED -/* 78 */ -EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, - const char * optionName, - const char * optionList); -#endif -#ifndef Tcl_CallWhenDeleted_TCL_DECLARED -#define Tcl_CallWhenDeleted_TCL_DECLARED -/* 79 */ -EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CancelIdleCall_TCL_DECLARED -#define Tcl_CancelIdleCall_TCL_DECLARED -/* 80 */ -EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, - ClientData clientData); -#endif -#ifndef Tcl_Close_TCL_DECLARED -#define Tcl_Close_TCL_DECLARED -/* 81 */ -EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); -#endif -#ifndef Tcl_CommandComplete_TCL_DECLARED -#define Tcl_CommandComplete_TCL_DECLARED -/* 82 */ -EXTERN int Tcl_CommandComplete (const char * cmd); -#endif -#ifndef Tcl_Concat_TCL_DECLARED -#define Tcl_Concat_TCL_DECLARED -/* 83 */ -EXTERN char * Tcl_Concat (int argc, CONST84 char *const * argv); -#endif -#ifndef Tcl_ConvertElement_TCL_DECLARED -#define Tcl_ConvertElement_TCL_DECLARED -/* 84 */ -EXTERN int Tcl_ConvertElement (const char * src, char * dst, - int flags); -#endif -#ifndef Tcl_ConvertCountedElement_TCL_DECLARED -#define Tcl_ConvertCountedElement_TCL_DECLARED -/* 85 */ -EXTERN int Tcl_ConvertCountedElement (const char * src, - int length, char * dst, int flags); -#endif -#ifndef Tcl_CreateAlias_TCL_DECLARED -#define Tcl_CreateAlias_TCL_DECLARED -/* 86 */ -EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, - const char * slaveCmd, Tcl_Interp * target, - const char * targetCmd, int argc, - CONST84 char *const * argv); -#endif -#ifndef Tcl_CreateAliasObj_TCL_DECLARED -#define Tcl_CreateAliasObj_TCL_DECLARED -/* 87 */ -EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, - const char * slaveCmd, Tcl_Interp * target, - const char * targetCmd, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_CreateChannel_TCL_DECLARED -#define Tcl_CreateChannel_TCL_DECLARED -/* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel (const Tcl_ChannelType * typePtr, - const char * chanName, - ClientData instanceData, int mask); -#endif -#ifndef Tcl_CreateChannelHandler_TCL_DECLARED -#define Tcl_CreateChannelHandler_TCL_DECLARED -/* 89 */ -EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateCloseHandler_TCL_DECLARED -#define Tcl_CreateCloseHandler_TCL_DECLARED -/* 90 */ -EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateCommand_TCL_DECLARED -#define Tcl_CreateCommand_TCL_DECLARED -/* 91 */ -EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_CmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateEventSource_TCL_DECLARED -#define Tcl_CreateEventSource_TCL_DECLARED -/* 92 */ -EXTERN void Tcl_CreateEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_CreateExitHandler_TCL_DECLARED -#define Tcl_CreateExitHandler_TCL_DECLARED -/* 93 */ -EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateInterp_TCL_DECLARED -#define Tcl_CreateInterp_TCL_DECLARED -/* 94 */ -EXTERN Tcl_Interp * Tcl_CreateInterp (void); -#endif -#ifndef Tcl_CreateMathFunc_TCL_DECLARED -#define Tcl_CreateMathFunc_TCL_DECLARED -/* 95 */ -EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, - const char * name, int numArgs, - Tcl_ValueType * argTypes, - Tcl_MathProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateObjCommand_TCL_DECLARED -#define Tcl_CreateObjCommand_TCL_DECLARED -/* 96 */ -EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_ObjCmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateSlave_TCL_DECLARED -#define Tcl_CreateSlave_TCL_DECLARED -/* 97 */ -EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, - const char * slaveName, int isSafe); -#endif -#ifndef Tcl_CreateTimerHandler_TCL_DECLARED -#define Tcl_CreateTimerHandler_TCL_DECLARED -/* 98 */ -EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, - Tcl_TimerProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateTrace_TCL_DECLARED -#define Tcl_CreateTrace_TCL_DECLARED -/* 99 */ -EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, - Tcl_CmdTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteAssocData_TCL_DECLARED -#define Tcl_DeleteAssocData_TCL_DECLARED -/* 100 */ -EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, - const char * name); -#endif -#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED -#define Tcl_DeleteChannelHandler_TCL_DECLARED -/* 101 */ -EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED -#define Tcl_DeleteCloseHandler_TCL_DECLARED -/* 102 */ -EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_DeleteCommand_TCL_DECLARED -#define Tcl_DeleteCommand_TCL_DECLARED -/* 103 */ -EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, - const char * cmdName); -#endif -#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED -#define Tcl_DeleteCommandFromToken_TCL_DECLARED -/* 104 */ -EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_DeleteEvents_TCL_DECLARED -#define Tcl_DeleteEvents_TCL_DECLARED -/* 105 */ -EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteEventSource_TCL_DECLARED -#define Tcl_DeleteEventSource_TCL_DECLARED -/* 106 */ -EXTERN void Tcl_DeleteEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteExitHandler_TCL_DECLARED -#define Tcl_DeleteExitHandler_TCL_DECLARED -/* 107 */ -EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteHashEntry_TCL_DECLARED -#define Tcl_DeleteHashEntry_TCL_DECLARED -/* 108 */ -EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); -#endif -#ifndef Tcl_DeleteHashTable_TCL_DECLARED -#define Tcl_DeleteHashTable_TCL_DECLARED -/* 109 */ -EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_DeleteInterp_TCL_DECLARED -#define Tcl_DeleteInterp_TCL_DECLARED -/* 110 */ -EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED -#define Tcl_DeleteTimerHandler_TCL_DECLARED -/* 112 */ -EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); -#endif -#ifndef Tcl_DeleteTrace_TCL_DECLARED -#define Tcl_DeleteTrace_TCL_DECLARED -/* 113 */ -EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, - Tcl_Trace trace); -#endif -#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED -#define Tcl_DontCallWhenDeleted_TCL_DECLARED -/* 114 */ -EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DoOneEvent_TCL_DECLARED -#define Tcl_DoOneEvent_TCL_DECLARED -/* 115 */ -EXTERN int Tcl_DoOneEvent (int flags); -#endif -#ifndef Tcl_DoWhenIdle_TCL_DECLARED -#define Tcl_DoWhenIdle_TCL_DECLARED -/* 116 */ -EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DStringAppend_TCL_DECLARED -#define Tcl_DStringAppend_TCL_DECLARED -/* 117 */ -EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, - const char * bytes, int length); -#endif -#ifndef Tcl_DStringAppendElement_TCL_DECLARED -#define Tcl_DStringAppendElement_TCL_DECLARED -/* 118 */ -EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, - const char * element); -#endif -#ifndef Tcl_DStringEndSublist_TCL_DECLARED -#define Tcl_DStringEndSublist_TCL_DECLARED -/* 119 */ -EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringFree_TCL_DECLARED -#define Tcl_DStringFree_TCL_DECLARED -/* 120 */ -EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringGetResult_TCL_DECLARED -#define Tcl_DStringGetResult_TCL_DECLARED -/* 121 */ -EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringInit_TCL_DECLARED -#define Tcl_DStringInit_TCL_DECLARED -/* 122 */ -EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringResult_TCL_DECLARED -#define Tcl_DStringResult_TCL_DECLARED -/* 123 */ -EXTERN void Tcl_DStringResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringSetLength_TCL_DECLARED -#define Tcl_DStringSetLength_TCL_DECLARED -/* 124 */ -EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, - int length); -#endif -#ifndef Tcl_DStringStartSublist_TCL_DECLARED -#define Tcl_DStringStartSublist_TCL_DECLARED -/* 125 */ -EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_Eof_TCL_DECLARED -#define Tcl_Eof_TCL_DECLARED -/* 126 */ -EXTERN int Tcl_Eof (Tcl_Channel chan); -#endif -#ifndef Tcl_ErrnoId_TCL_DECLARED -#define Tcl_ErrnoId_TCL_DECLARED -/* 127 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); -#endif -#ifndef Tcl_ErrnoMsg_TCL_DECLARED -#define Tcl_ErrnoMsg_TCL_DECLARED -/* 128 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); -#endif -#ifndef Tcl_Eval_TCL_DECLARED -#define Tcl_Eval_TCL_DECLARED -/* 129 */ -EXTERN int Tcl_Eval (Tcl_Interp * interp, const char * script); -#endif -#ifndef Tcl_EvalFile_TCL_DECLARED -#define Tcl_EvalFile_TCL_DECLARED -/* 130 */ -EXTERN int Tcl_EvalFile (Tcl_Interp * interp, - const char * fileName); -#endif -#ifndef Tcl_EvalObj_TCL_DECLARED -#define Tcl_EvalObj_TCL_DECLARED -/* 131 */ -EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_EventuallyFree_TCL_DECLARED -#define Tcl_EventuallyFree_TCL_DECLARED -/* 132 */ -EXTERN void Tcl_EventuallyFree (ClientData clientData, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_Exit_TCL_DECLARED -#define Tcl_Exit_TCL_DECLARED -/* 133 */ -EXTERN void Tcl_Exit (int status); -#endif -#ifndef Tcl_ExposeCommand_TCL_DECLARED -#define Tcl_ExposeCommand_TCL_DECLARED -/* 134 */ -EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, - const char * hiddenCmdToken, - const char * cmdName); -#endif -#ifndef Tcl_ExprBoolean_TCL_DECLARED -#define Tcl_ExprBoolean_TCL_DECLARED -/* 135 */ -EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, - const char * expr, int * ptr); -#endif -#ifndef Tcl_ExprBooleanObj_TCL_DECLARED -#define Tcl_ExprBooleanObj_TCL_DECLARED -/* 136 */ -EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * ptr); -#endif -#ifndef Tcl_ExprDouble_TCL_DECLARED -#define Tcl_ExprDouble_TCL_DECLARED -/* 137 */ -EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, - const char * expr, double * ptr); -#endif -#ifndef Tcl_ExprDoubleObj_TCL_DECLARED -#define Tcl_ExprDoubleObj_TCL_DECLARED -/* 138 */ -EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * ptr); -#endif -#ifndef Tcl_ExprLong_TCL_DECLARED -#define Tcl_ExprLong_TCL_DECLARED -/* 139 */ -EXTERN int Tcl_ExprLong (Tcl_Interp * interp, const char * expr, - long * ptr); -#endif -#ifndef Tcl_ExprLongObj_TCL_DECLARED -#define Tcl_ExprLongObj_TCL_DECLARED -/* 140 */ -EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * ptr); -#endif -#ifndef Tcl_ExprObj_TCL_DECLARED -#define Tcl_ExprObj_TCL_DECLARED -/* 141 */ -EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - Tcl_Obj ** resultPtrPtr); -#endif -#ifndef Tcl_ExprString_TCL_DECLARED -#define Tcl_ExprString_TCL_DECLARED -/* 142 */ -EXTERN int Tcl_ExprString (Tcl_Interp * interp, - const char * expr); -#endif -#ifndef Tcl_Finalize_TCL_DECLARED -#define Tcl_Finalize_TCL_DECLARED -/* 143 */ -EXTERN void Tcl_Finalize (void); -#endif -#ifndef Tcl_FindExecutable_TCL_DECLARED -#define Tcl_FindExecutable_TCL_DECLARED -/* 144 */ -EXTERN void Tcl_FindExecutable (const char * argv0); -#endif -#ifndef Tcl_FirstHashEntry_TCL_DECLARED -#define Tcl_FirstHashEntry_TCL_DECLARED -/* 145 */ -EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, - Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_Flush_TCL_DECLARED -#define Tcl_Flush_TCL_DECLARED -/* 146 */ -EXTERN int Tcl_Flush (Tcl_Channel chan); -#endif -#ifndef Tcl_FreeResult_TCL_DECLARED -#define Tcl_FreeResult_TCL_DECLARED -/* 147 */ -EXTERN void Tcl_FreeResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetAlias_TCL_DECLARED -#define Tcl_GetAlias_TCL_DECLARED -/* 148 */ -EXTERN int Tcl_GetAlias (Tcl_Interp * interp, - const char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_GetAliasObj_TCL_DECLARED -#define Tcl_GetAliasObj_TCL_DECLARED -/* 149 */ -EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, - const char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * objcPtr, - Tcl_Obj *** objv); -#endif -#ifndef Tcl_GetAssocData_TCL_DECLARED -#define Tcl_GetAssocData_TCL_DECLARED -/* 150 */ -EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, - const char * name, - Tcl_InterpDeleteProc ** procPtr); -#endif -#ifndef Tcl_GetChannel_TCL_DECLARED -#define Tcl_GetChannel_TCL_DECLARED -/* 151 */ -EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, - const char * chanName, int * modePtr); -#endif -#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED -#define Tcl_GetChannelBufferSize_TCL_DECLARED -/* 152 */ -EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelHandle_TCL_DECLARED -#define Tcl_GetChannelHandle_TCL_DECLARED -/* 153 */ -EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, - int direction, ClientData * handlePtr); -#endif -#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED -#define Tcl_GetChannelInstanceData_TCL_DECLARED -/* 154 */ -EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelMode_TCL_DECLARED -#define Tcl_GetChannelMode_TCL_DECLARED -/* 155 */ -EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelName_TCL_DECLARED -#define Tcl_GetChannelName_TCL_DECLARED -/* 156 */ -EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelOption_TCL_DECLARED -#define Tcl_GetChannelOption_TCL_DECLARED -/* 157 */ -EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, const char * optionName, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetChannelType_TCL_DECLARED -#define Tcl_GetChannelType_TCL_DECLARED -/* 158 */ -EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); -#endif -#ifndef Tcl_GetCommandInfo_TCL_DECLARED -#define Tcl_GetCommandInfo_TCL_DECLARED -/* 159 */ -EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, - const char * cmdName, Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_GetCommandName_TCL_DECLARED -#define Tcl_GetCommandName_TCL_DECLARED -/* 160 */ -EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_GetErrno_TCL_DECLARED -#define Tcl_GetErrno_TCL_DECLARED -/* 161 */ -EXTERN int Tcl_GetErrno (void); -#endif -#ifndef Tcl_GetHostName_TCL_DECLARED -#define Tcl_GetHostName_TCL_DECLARED -/* 162 */ -EXTERN CONST84_RETURN char * Tcl_GetHostName (void); -#endif -#ifndef Tcl_GetInterpPath_TCL_DECLARED -#define Tcl_GetInterpPath_TCL_DECLARED -/* 163 */ -EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, - Tcl_Interp * slaveInterp); -#endif -#ifndef Tcl_GetMaster_TCL_DECLARED -#define Tcl_GetMaster_TCL_DECLARED -/* 164 */ -EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED -#define Tcl_GetNameOfExecutable_TCL_DECLARED -/* 165 */ -EXTERN const char * Tcl_GetNameOfExecutable (void); -#endif -#ifndef Tcl_GetObjResult_TCL_DECLARED -#define Tcl_GetObjResult_TCL_DECLARED -/* 166 */ -EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - const char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - const char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType_TCL_DECLARED -#define Tcl_GetPathType_TCL_DECLARED -/* 168 */ -EXTERN Tcl_PathType Tcl_GetPathType (const char * path); -#endif -#ifndef Tcl_Gets_TCL_DECLARED -#define Tcl_Gets_TCL_DECLARED -/* 169 */ -EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetsObj_TCL_DECLARED -#define Tcl_GetsObj_TCL_DECLARED -/* 170 */ -EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetServiceMode_TCL_DECLARED -#define Tcl_GetServiceMode_TCL_DECLARED -/* 171 */ -EXTERN int Tcl_GetServiceMode (void); -#endif -#ifndef Tcl_GetSlave_TCL_DECLARED -#define Tcl_GetSlave_TCL_DECLARED -/* 172 */ -EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, - const char * slaveName); -#endif -#ifndef Tcl_GetStdChannel_TCL_DECLARED -#define Tcl_GetStdChannel_TCL_DECLARED -/* 173 */ -EXTERN Tcl_Channel Tcl_GetStdChannel (int type); -#endif -#ifndef Tcl_GetStringResult_TCL_DECLARED -#define Tcl_GetStringResult_TCL_DECLARED -/* 174 */ -EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetVar_TCL_DECLARED -#define Tcl_GetVar_TCL_DECLARED -/* 175 */ -EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, - const char * varName, int flags); -#endif -#ifndef Tcl_GetVar2_TCL_DECLARED -#define Tcl_GetVar2_TCL_DECLARED -/* 176 */ -EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); -#endif -#ifndef Tcl_GlobalEval_TCL_DECLARED -#define Tcl_GlobalEval_TCL_DECLARED -/* 177 */ -EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, - const char * command); -#endif -#ifndef Tcl_GlobalEvalObj_TCL_DECLARED -#define Tcl_GlobalEvalObj_TCL_DECLARED -/* 178 */ -EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_HideCommand_TCL_DECLARED -#define Tcl_HideCommand_TCL_DECLARED -/* 179 */ -EXTERN int Tcl_HideCommand (Tcl_Interp * interp, - const char * cmdName, - const char * hiddenCmdToken); -#endif -#ifndef Tcl_Init_TCL_DECLARED -#define Tcl_Init_TCL_DECLARED -/* 180 */ -EXTERN int Tcl_Init (Tcl_Interp * interp); -#endif -#ifndef Tcl_InitHashTable_TCL_DECLARED -#define Tcl_InitHashTable_TCL_DECLARED -/* 181 */ -EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, - int keyType); -#endif -#ifndef Tcl_InputBlocked_TCL_DECLARED -#define Tcl_InputBlocked_TCL_DECLARED -/* 182 */ -EXTERN int Tcl_InputBlocked (Tcl_Channel chan); -#endif -#ifndef Tcl_InputBuffered_TCL_DECLARED -#define Tcl_InputBuffered_TCL_DECLARED -/* 183 */ -EXTERN int Tcl_InputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_InterpDeleted_TCL_DECLARED -#define Tcl_InterpDeleted_TCL_DECLARED -/* 184 */ -EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); -#endif -#ifndef Tcl_IsSafe_TCL_DECLARED -#define Tcl_IsSafe_TCL_DECLARED -/* 185 */ -EXTERN int Tcl_IsSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_JoinPath_TCL_DECLARED -#define Tcl_JoinPath_TCL_DECLARED -/* 186 */ -EXTERN char * Tcl_JoinPath (int argc, CONST84 char *const * argv, - Tcl_DString * resultPtr); -#endif -#ifndef Tcl_LinkVar_TCL_DECLARED -#define Tcl_LinkVar_TCL_DECLARED -/* 187 */ -EXTERN int Tcl_LinkVar (Tcl_Interp * interp, - const char * varName, char * addr, int type); -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel_TCL_DECLARED -#define Tcl_MakeFileChannel_TCL_DECLARED -/* 189 */ -EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); -#endif -#ifndef Tcl_MakeSafe_TCL_DECLARED -#define Tcl_MakeSafe_TCL_DECLARED -/* 190 */ -EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED -#define Tcl_MakeTcpClientChannel_TCL_DECLARED -/* 191 */ -EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); -#endif -#ifndef Tcl_Merge_TCL_DECLARED -#define Tcl_Merge_TCL_DECLARED -/* 192 */ -EXTERN char * Tcl_Merge (int argc, CONST84 char *const * argv); -#endif -#ifndef Tcl_NextHashEntry_TCL_DECLARED -#define Tcl_NextHashEntry_TCL_DECLARED -/* 193 */ -EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_NotifyChannel_TCL_DECLARED -#define Tcl_NotifyChannel_TCL_DECLARED -/* 194 */ -EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); -#endif -#ifndef Tcl_ObjGetVar2_TCL_DECLARED -#define Tcl_ObjGetVar2_TCL_DECLARED -/* 195 */ -EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - int flags); -#endif -#ifndef Tcl_ObjSetVar2_TCL_DECLARED -#define Tcl_ObjSetVar2_TCL_DECLARED -/* 196 */ -EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - Tcl_Obj * newValuePtr, int flags); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel_TCL_DECLARED -#define Tcl_OpenFileChannel_TCL_DECLARED -/* 198 */ -EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, - const char * fileName, - const char * modeString, int permissions); -#endif -#ifndef Tcl_OpenTcpClient_TCL_DECLARED -#define Tcl_OpenTcpClient_TCL_DECLARED -/* 199 */ -EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, - const char * address, const char * myaddr, - int myport, int async); -#endif -#ifndef Tcl_OpenTcpServer_TCL_DECLARED -#define Tcl_OpenTcpServer_TCL_DECLARED -/* 200 */ -EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, - const char * host, - Tcl_TcpAcceptProc * acceptProc, - ClientData callbackData); -#endif -#ifndef Tcl_Preserve_TCL_DECLARED -#define Tcl_Preserve_TCL_DECLARED -/* 201 */ -EXTERN void Tcl_Preserve (ClientData data); -#endif -#ifndef Tcl_PrintDouble_TCL_DECLARED -#define Tcl_PrintDouble_TCL_DECLARED -/* 202 */ -EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, - char * dst); -#endif -#ifndef Tcl_PutEnv_TCL_DECLARED -#define Tcl_PutEnv_TCL_DECLARED -/* 203 */ -EXTERN int Tcl_PutEnv (const char * assignment); -#endif -#ifndef Tcl_PosixError_TCL_DECLARED -#define Tcl_PosixError_TCL_DECLARED -/* 204 */ -EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); -#endif -#ifndef Tcl_QueueEvent_TCL_DECLARED -#define Tcl_QueueEvent_TCL_DECLARED -/* 205 */ -EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, - Tcl_QueuePosition position); -#endif -#ifndef Tcl_Read_TCL_DECLARED -#define Tcl_Read_TCL_DECLARED -/* 206 */ -EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, - int toRead); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval_TCL_DECLARED -#define Tcl_RecordAndEval_TCL_DECLARED -/* 208 */ -EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, - const char * cmd, int flags); -#endif -#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED -#define Tcl_RecordAndEvalObj_TCL_DECLARED -/* 209 */ -EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, - Tcl_Obj * cmdPtr, int flags); -#endif -#ifndef Tcl_RegisterChannel_TCL_DECLARED -#define Tcl_RegisterChannel_TCL_DECLARED -/* 210 */ -EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_RegisterObjType_TCL_DECLARED -#define Tcl_RegisterObjType_TCL_DECLARED -/* 211 */ -EXTERN void Tcl_RegisterObjType (const Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_RegExpCompile_TCL_DECLARED -#define Tcl_RegExpCompile_TCL_DECLARED -/* 212 */ -EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, - const char * pattern); -#endif -#ifndef Tcl_RegExpExec_TCL_DECLARED -#define Tcl_RegExpExec_TCL_DECLARED -/* 213 */ -EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, - Tcl_RegExp regexp, const char * text, - const char * start); -#endif -#ifndef Tcl_RegExpMatch_TCL_DECLARED -#define Tcl_RegExpMatch_TCL_DECLARED -/* 214 */ -EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, - const char * text, const char * pattern); -#endif -#ifndef Tcl_RegExpRange_TCL_DECLARED -#define Tcl_RegExpRange_TCL_DECLARED -/* 215 */ -EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, - CONST84 char ** startPtr, - CONST84 char ** endPtr); -#endif -#ifndef Tcl_Release_TCL_DECLARED -#define Tcl_Release_TCL_DECLARED -/* 216 */ -EXTERN void Tcl_Release (ClientData clientData); -#endif -#ifndef Tcl_ResetResult_TCL_DECLARED -#define Tcl_ResetResult_TCL_DECLARED -/* 217 */ -EXTERN void Tcl_ResetResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_ScanElement_TCL_DECLARED -#define Tcl_ScanElement_TCL_DECLARED -/* 218 */ -EXTERN int Tcl_ScanElement (const char * str, int * flagPtr); -#endif -#ifndef Tcl_ScanCountedElement_TCL_DECLARED -#define Tcl_ScanCountedElement_TCL_DECLARED -/* 219 */ -EXTERN int Tcl_ScanCountedElement (const char * str, int length, - int * flagPtr); -#endif -#ifndef Tcl_SeekOld_TCL_DECLARED -#define Tcl_SeekOld_TCL_DECLARED -/* 220 */ -EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); -#endif -#ifndef Tcl_ServiceAll_TCL_DECLARED -#define Tcl_ServiceAll_TCL_DECLARED -/* 221 */ -EXTERN int Tcl_ServiceAll (void); -#endif -#ifndef Tcl_ServiceEvent_TCL_DECLARED -#define Tcl_ServiceEvent_TCL_DECLARED -/* 222 */ -EXTERN int Tcl_ServiceEvent (int flags); -#endif -#ifndef Tcl_SetAssocData_TCL_DECLARED -#define Tcl_SetAssocData_TCL_DECLARED -/* 223 */ -EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, - const char * name, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED -#define Tcl_SetChannelBufferSize_TCL_DECLARED -/* 224 */ -EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); -#endif -#ifndef Tcl_SetChannelOption_TCL_DECLARED -#define Tcl_SetChannelOption_TCL_DECLARED -/* 225 */ -EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, const char * optionName, - const char * newValue); -#endif -#ifndef Tcl_SetCommandInfo_TCL_DECLARED -#define Tcl_SetCommandInfo_TCL_DECLARED -/* 226 */ -EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, - const char * cmdName, - const Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_SetErrno_TCL_DECLARED -#define Tcl_SetErrno_TCL_DECLARED -/* 227 */ -EXTERN void Tcl_SetErrno (int err); -#endif -#ifndef Tcl_SetErrorCode_TCL_DECLARED -#define Tcl_SetErrorCode_TCL_DECLARED -/* 228 */ -EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED -#define Tcl_SetMaxBlockTime_TCL_DECLARED -/* 229 */ -EXTERN void Tcl_SetMaxBlockTime (const Tcl_Time * timePtr); -#endif -#ifndef Tcl_SetPanicProc_TCL_DECLARED -#define Tcl_SetPanicProc_TCL_DECLARED -/* 230 */ -EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); -#endif -#ifndef Tcl_SetRecursionLimit_TCL_DECLARED -#define Tcl_SetRecursionLimit_TCL_DECLARED -/* 231 */ -EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, - int depth); -#endif -#ifndef Tcl_SetResult_TCL_DECLARED -#define Tcl_SetResult_TCL_DECLARED -/* 232 */ -EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_SetServiceMode_TCL_DECLARED -#define Tcl_SetServiceMode_TCL_DECLARED -/* 233 */ -EXTERN int Tcl_SetServiceMode (int mode); -#endif -#ifndef Tcl_SetObjErrorCode_TCL_DECLARED -#define Tcl_SetObjErrorCode_TCL_DECLARED -/* 234 */ -EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, - Tcl_Obj * errorObjPtr); -#endif -#ifndef Tcl_SetObjResult_TCL_DECLARED -#define Tcl_SetObjResult_TCL_DECLARED -/* 235 */ -EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr); -#endif -#ifndef Tcl_SetStdChannel_TCL_DECLARED -#define Tcl_SetStdChannel_TCL_DECLARED -/* 236 */ -EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); -#endif -#ifndef Tcl_SetVar_TCL_DECLARED -#define Tcl_SetVar_TCL_DECLARED -/* 237 */ -EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, - const char * varName, const char * newValue, - int flags); -#endif -#ifndef Tcl_SetVar2_TCL_DECLARED -#define Tcl_SetVar2_TCL_DECLARED -/* 238 */ -EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - const char * newValue, int flags); -#endif -#ifndef Tcl_SignalId_TCL_DECLARED -#define Tcl_SignalId_TCL_DECLARED -/* 239 */ -EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); -#endif -#ifndef Tcl_SignalMsg_TCL_DECLARED -#define Tcl_SignalMsg_TCL_DECLARED -/* 240 */ -EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); -#endif -#ifndef Tcl_SourceRCFile_TCL_DECLARED -#define Tcl_SourceRCFile_TCL_DECLARED -/* 241 */ -EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); -#endif -#ifndef Tcl_SplitList_TCL_DECLARED -#define Tcl_SplitList_TCL_DECLARED -/* 242 */ -EXTERN int Tcl_SplitList (Tcl_Interp * interp, - const char * listStr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_SplitPath_TCL_DECLARED -#define Tcl_SplitPath_TCL_DECLARED -/* 243 */ -EXTERN void Tcl_SplitPath (const char * path, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_StaticPackage_TCL_DECLARED -#define Tcl_StaticPackage_TCL_DECLARED -/* 244 */ -EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, - const char * pkgName, - Tcl_PackageInitProc * initProc, - Tcl_PackageInitProc * safeInitProc); -#endif -#ifndef Tcl_StringMatch_TCL_DECLARED -#define Tcl_StringMatch_TCL_DECLARED -/* 245 */ -EXTERN int Tcl_StringMatch (const char * str, - const char * pattern); -#endif -#ifndef Tcl_TellOld_TCL_DECLARED -#define Tcl_TellOld_TCL_DECLARED -/* 246 */ -EXTERN int Tcl_TellOld (Tcl_Channel chan); -#endif -#ifndef Tcl_TraceVar_TCL_DECLARED -#define Tcl_TraceVar_TCL_DECLARED -/* 247 */ -EXTERN int Tcl_TraceVar (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TraceVar2_TCL_DECLARED -#define Tcl_TraceVar2_TCL_DECLARED -/* 248 */ -EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TranslateFileName_TCL_DECLARED -#define Tcl_TranslateFileName_TCL_DECLARED -/* 249 */ -EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, - const char * name, Tcl_DString * bufferPtr); -#endif -#ifndef Tcl_Ungets_TCL_DECLARED -#define Tcl_Ungets_TCL_DECLARED -/* 250 */ -EXTERN int Tcl_Ungets (Tcl_Channel chan, const char * str, - int len, int atHead); -#endif -#ifndef Tcl_UnlinkVar_TCL_DECLARED -#define Tcl_UnlinkVar_TCL_DECLARED -/* 251 */ -EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, - const char * varName); -#endif -#ifndef Tcl_UnregisterChannel_TCL_DECLARED -#define Tcl_UnregisterChannel_TCL_DECLARED -/* 252 */ -EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_UnsetVar_TCL_DECLARED -#define Tcl_UnsetVar_TCL_DECLARED -/* 253 */ -EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, - const char * varName, int flags); -#endif -#ifndef Tcl_UnsetVar2_TCL_DECLARED -#define Tcl_UnsetVar2_TCL_DECLARED -/* 254 */ -EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); -#endif -#ifndef Tcl_UntraceVar_TCL_DECLARED -#define Tcl_UntraceVar_TCL_DECLARED -/* 255 */ -EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceVar2_TCL_DECLARED -#define Tcl_UntraceVar2_TCL_DECLARED -/* 256 */ -EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED -#define Tcl_UpdateLinkedVar_TCL_DECLARED -/* 257 */ -EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, - const char * varName); -#endif -#ifndef Tcl_UpVar_TCL_DECLARED -#define Tcl_UpVar_TCL_DECLARED -/* 258 */ -EXTERN int Tcl_UpVar (Tcl_Interp * interp, - const char * frameName, const char * varName, - const char * localName, int flags); -#endif -#ifndef Tcl_UpVar2_TCL_DECLARED -#define Tcl_UpVar2_TCL_DECLARED -/* 259 */ -EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, - const char * frameName, const char * part1, - const char * part2, const char * localName, - int flags); -#endif -#ifndef Tcl_VarEval_TCL_DECLARED -#define Tcl_VarEval_TCL_DECLARED -/* 260 */ -EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_VarTraceInfo_TCL_DECLARED -#define Tcl_VarTraceInfo_TCL_DECLARED -/* 261 */ -EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_VarTraceInfo2_TCL_DECLARED -#define Tcl_VarTraceInfo2_TCL_DECLARED -/* 262 */ -EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_Write_TCL_DECLARED -#define Tcl_Write_TCL_DECLARED -/* 263 */ -EXTERN int Tcl_Write (Tcl_Channel chan, const char * s, - int slen); -#endif -#ifndef Tcl_WrongNumArgs_TCL_DECLARED -#define Tcl_WrongNumArgs_TCL_DECLARED -/* 264 */ -EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], const char * message); -#endif -#ifndef Tcl_DumpActiveMemory_TCL_DECLARED -#define Tcl_DumpActiveMemory_TCL_DECLARED -/* 265 */ -EXTERN int Tcl_DumpActiveMemory (const char * fileName); -#endif -#ifndef Tcl_ValidateAllMemory_TCL_DECLARED -#define Tcl_ValidateAllMemory_TCL_DECLARED -/* 266 */ -EXTERN void Tcl_ValidateAllMemory (const char * file, int line); -#endif -#ifndef Tcl_AppendResultVA_TCL_DECLARED -#define Tcl_AppendResultVA_TCL_DECLARED -/* 267 */ -EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED -#define Tcl_AppendStringsToObjVA_TCL_DECLARED -/* 268 */ -EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, - va_list argList); -#endif -#ifndef Tcl_HashStats_TCL_DECLARED -#define Tcl_HashStats_TCL_DECLARED -/* 269 */ -EXTERN char * Tcl_HashStats (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_ParseVar_TCL_DECLARED -#define Tcl_ParseVar_TCL_DECLARED -/* 270 */ -EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, - const char * start, CONST84 char ** termPtr); -#endif -#ifndef Tcl_PkgPresent_TCL_DECLARED -#define Tcl_PkgPresent_TCL_DECLARED -/* 271 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, - const char * name, const char * version, - int exact); -#endif -#ifndef Tcl_PkgPresentEx_TCL_DECLARED -#define Tcl_PkgPresentEx_TCL_DECLARED -/* 272 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, - const char * name, const char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_PkgProvide_TCL_DECLARED -#define Tcl_PkgProvide_TCL_DECLARED -/* 273 */ -EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, - const char * name, const char * version); -#endif -#ifndef Tcl_PkgRequire_TCL_DECLARED -#define Tcl_PkgRequire_TCL_DECLARED -/* 274 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, - const char * name, const char * version, - int exact); -#endif -#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED -#define Tcl_SetErrorCodeVA_TCL_DECLARED -/* 275 */ -EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_VarEvalVA_TCL_DECLARED -#define Tcl_VarEvalVA_TCL_DECLARED -/* 276 */ -EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); -#endif -#ifndef Tcl_WaitPid_TCL_DECLARED -#define Tcl_WaitPid_TCL_DECLARED -/* 277 */ -EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); -#endif -#ifndef Tcl_PanicVA_TCL_DECLARED -#define Tcl_PanicVA_TCL_DECLARED -/* 278 */ -EXTERN void Tcl_PanicVA (const char * format, va_list argList); -#endif -#ifndef Tcl_GetVersion_TCL_DECLARED -#define Tcl_GetVersion_TCL_DECLARED -/* 279 */ -EXTERN void Tcl_GetVersion (int * major, int * minor, - int * patchLevel, int * type); -#endif -#ifndef Tcl_InitMemory_TCL_DECLARED -#define Tcl_InitMemory_TCL_DECLARED -/* 280 */ -EXTERN void Tcl_InitMemory (Tcl_Interp * interp); -#endif -#ifndef Tcl_StackChannel_TCL_DECLARED -#define Tcl_StackChannel_TCL_DECLARED -/* 281 */ -EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, - const Tcl_ChannelType * typePtr, - ClientData instanceData, int mask, - Tcl_Channel prevChan); -#endif -#ifndef Tcl_UnstackChannel_TCL_DECLARED -#define Tcl_UnstackChannel_TCL_DECLARED -/* 282 */ -EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_GetStackedChannel_TCL_DECLARED -#define Tcl_GetStackedChannel_TCL_DECLARED -/* 283 */ -EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_SetMainLoop_TCL_DECLARED -#define Tcl_SetMainLoop_TCL_DECLARED -/* 284 */ -EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj_TCL_DECLARED -#define Tcl_AppendObjToObj_TCL_DECLARED -/* 286 */ -EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, - Tcl_Obj * appendObjPtr); -#endif -#ifndef Tcl_CreateEncoding_TCL_DECLARED -#define Tcl_CreateEncoding_TCL_DECLARED -/* 287 */ -EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); -#endif -#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED -#define Tcl_CreateThreadExitHandler_TCL_DECLARED -/* 288 */ -EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED -#define Tcl_DeleteThreadExitHandler_TCL_DECLARED -/* 289 */ -EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DiscardResult_TCL_DECLARED -#define Tcl_DiscardResult_TCL_DECLARED -/* 290 */ -EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_EvalEx_TCL_DECLARED -#define Tcl_EvalEx_TCL_DECLARED -/* 291 */ -EXTERN int Tcl_EvalEx (Tcl_Interp * interp, const char * script, - int numBytes, int flags); -#endif -#ifndef Tcl_EvalObjv_TCL_DECLARED -#define Tcl_EvalObjv_TCL_DECLARED -/* 292 */ -EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], int flags); -#endif -#ifndef Tcl_EvalObjEx_TCL_DECLARED -#define Tcl_EvalObjEx_TCL_DECLARED -/* 293 */ -EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_ExitThread_TCL_DECLARED -#define Tcl_ExitThread_TCL_DECLARED -/* 294 */ -EXTERN void Tcl_ExitThread (int status); -#endif -#ifndef Tcl_ExternalToUtf_TCL_DECLARED -#define Tcl_ExternalToUtf_TCL_DECLARED -/* 295 */ -EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, - Tcl_Encoding encoding, const char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED -#define Tcl_ExternalToUtfDString_TCL_DECLARED -/* 296 */ -EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, - const char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_FinalizeThread_TCL_DECLARED -#define Tcl_FinalizeThread_TCL_DECLARED -/* 297 */ -EXTERN void Tcl_FinalizeThread (void); -#endif -#ifndef Tcl_FinalizeNotifier_TCL_DECLARED -#define Tcl_FinalizeNotifier_TCL_DECLARED -/* 298 */ -EXTERN void Tcl_FinalizeNotifier (ClientData clientData); -#endif -#ifndef Tcl_FreeEncoding_TCL_DECLARED -#define Tcl_FreeEncoding_TCL_DECLARED -/* 299 */ -EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetCurrentThread_TCL_DECLARED -#define Tcl_GetCurrentThread_TCL_DECLARED -/* 300 */ -EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); -#endif -#ifndef Tcl_GetEncoding_TCL_DECLARED -#define Tcl_GetEncoding_TCL_DECLARED -/* 301 */ -EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, - const char * name); -#endif -#ifndef Tcl_GetEncodingName_TCL_DECLARED -#define Tcl_GetEncodingName_TCL_DECLARED -/* 302 */ -EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetEncodingNames_TCL_DECLARED -#define Tcl_GetEncodingNames_TCL_DECLARED -/* 303 */ -EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED -#define Tcl_GetIndexFromObjStruct_TCL_DECLARED -/* 304 */ -EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, - Tcl_Obj * objPtr, const VOID * tablePtr, - int offset, const char * msg, int flags, - int * indexPtr); -#endif -#ifndef Tcl_GetThreadData_TCL_DECLARED -#define Tcl_GetThreadData_TCL_DECLARED -/* 305 */ -EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, - int size); -#endif -#ifndef Tcl_GetVar2Ex_TCL_DECLARED -#define Tcl_GetVar2Ex_TCL_DECLARED -/* 306 */ -EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); -#endif -#ifndef Tcl_InitNotifier_TCL_DECLARED -#define Tcl_InitNotifier_TCL_DECLARED -/* 307 */ -EXTERN ClientData Tcl_InitNotifier (void); -#endif -#ifndef Tcl_MutexLock_TCL_DECLARED -#define Tcl_MutexLock_TCL_DECLARED -/* 308 */ -EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_MutexUnlock_TCL_DECLARED -#define Tcl_MutexUnlock_TCL_DECLARED -/* 309 */ -EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_ConditionNotify_TCL_DECLARED -#define Tcl_ConditionNotify_TCL_DECLARED -/* 310 */ -EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_ConditionWait_TCL_DECLARED -#define Tcl_ConditionWait_TCL_DECLARED -/* 311 */ -EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, - Tcl_Mutex * mutexPtr, - const Tcl_Time * timePtr); -#endif -#ifndef Tcl_NumUtfChars_TCL_DECLARED -#define Tcl_NumUtfChars_TCL_DECLARED -/* 312 */ -EXTERN int Tcl_NumUtfChars (const char * src, int length); -#endif -#ifndef Tcl_ReadChars_TCL_DECLARED -#define Tcl_ReadChars_TCL_DECLARED -/* 313 */ -EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, - int charsToRead, int appendFlag); -#endif -#ifndef Tcl_RestoreResult_TCL_DECLARED -#define Tcl_RestoreResult_TCL_DECLARED -/* 314 */ -EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SaveResult_TCL_DECLARED -#define Tcl_SaveResult_TCL_DECLARED -/* 315 */ -EXTERN void Tcl_SaveResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SetSystemEncoding_TCL_DECLARED -#define Tcl_SetSystemEncoding_TCL_DECLARED -/* 316 */ -EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, - const char * name); -#endif -#ifndef Tcl_SetVar2Ex_TCL_DECLARED -#define Tcl_SetVar2Ex_TCL_DECLARED -/* 317 */ -EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, - const char * part1, const char * part2, - Tcl_Obj * newValuePtr, int flags); -#endif -#ifndef Tcl_ThreadAlert_TCL_DECLARED -#define Tcl_ThreadAlert_TCL_DECLARED -/* 318 */ -EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); -#endif -#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED -#define Tcl_ThreadQueueEvent_TCL_DECLARED -/* 319 */ -EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, - Tcl_Event * evPtr, - Tcl_QueuePosition position); -#endif -#ifndef Tcl_UniCharAtIndex_TCL_DECLARED -#define Tcl_UniCharAtIndex_TCL_DECLARED -/* 320 */ -EXTERN Tcl_UniChar Tcl_UniCharAtIndex (const char * src, int index); -#endif -#ifndef Tcl_UniCharToLower_TCL_DECLARED -#define Tcl_UniCharToLower_TCL_DECLARED -/* 321 */ -EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); -#endif -#ifndef Tcl_UniCharToTitle_TCL_DECLARED -#define Tcl_UniCharToTitle_TCL_DECLARED -/* 322 */ -EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); -#endif -#ifndef Tcl_UniCharToUpper_TCL_DECLARED -#define Tcl_UniCharToUpper_TCL_DECLARED -/* 323 */ -EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); -#endif -#ifndef Tcl_UniCharToUtf_TCL_DECLARED -#define Tcl_UniCharToUtf_TCL_DECLARED -/* 324 */ -EXTERN int Tcl_UniCharToUtf (int ch, char * buf); -#endif -#ifndef Tcl_UtfAtIndex_TCL_DECLARED -#define Tcl_UtfAtIndex_TCL_DECLARED -/* 325 */ -EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (const char * src, int index); -#endif -#ifndef Tcl_UtfCharComplete_TCL_DECLARED -#define Tcl_UtfCharComplete_TCL_DECLARED -/* 326 */ -EXTERN int Tcl_UtfCharComplete (const char * src, int length); -#endif -#ifndef Tcl_UtfBackslash_TCL_DECLARED -#define Tcl_UtfBackslash_TCL_DECLARED -/* 327 */ -EXTERN int Tcl_UtfBackslash (const char * src, int * readPtr, - char * dst); -#endif -#ifndef Tcl_UtfFindFirst_TCL_DECLARED -#define Tcl_UtfFindFirst_TCL_DECLARED -/* 328 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (const char * src, int ch); -#endif -#ifndef Tcl_UtfFindLast_TCL_DECLARED -#define Tcl_UtfFindLast_TCL_DECLARED -/* 329 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindLast (const char * src, int ch); -#endif -#ifndef Tcl_UtfNext_TCL_DECLARED -#define Tcl_UtfNext_TCL_DECLARED -/* 330 */ -EXTERN CONST84_RETURN char * Tcl_UtfNext (const char * src); -#endif -#ifndef Tcl_UtfPrev_TCL_DECLARED -#define Tcl_UtfPrev_TCL_DECLARED -/* 331 */ -EXTERN CONST84_RETURN char * Tcl_UtfPrev (const char * src, - const char * start); -#endif -#ifndef Tcl_UtfToExternal_TCL_DECLARED -#define Tcl_UtfToExternal_TCL_DECLARED -/* 332 */ -EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, - Tcl_Encoding encoding, const char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_UtfToExternalDString_TCL_DECLARED -#define Tcl_UtfToExternalDString_TCL_DECLARED -/* 333 */ -EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, - const char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToLower_TCL_DECLARED -#define Tcl_UtfToLower_TCL_DECLARED -/* 334 */ -EXTERN int Tcl_UtfToLower (char * src); -#endif -#ifndef Tcl_UtfToTitle_TCL_DECLARED -#define Tcl_UtfToTitle_TCL_DECLARED -/* 335 */ -EXTERN int Tcl_UtfToTitle (char * src); -#endif -#ifndef Tcl_UtfToUniChar_TCL_DECLARED -#define Tcl_UtfToUniChar_TCL_DECLARED -/* 336 */ -EXTERN int Tcl_UtfToUniChar (const char * src, - Tcl_UniChar * chPtr); -#endif -#ifndef Tcl_UtfToUpper_TCL_DECLARED -#define Tcl_UtfToUpper_TCL_DECLARED -/* 337 */ -EXTERN int Tcl_UtfToUpper (char * src); -#endif -#ifndef Tcl_WriteChars_TCL_DECLARED -#define Tcl_WriteChars_TCL_DECLARED -/* 338 */ -EXTERN int Tcl_WriteChars (Tcl_Channel chan, const char * src, - int srcLen); -#endif -#ifndef Tcl_WriteObj_TCL_DECLARED -#define Tcl_WriteObj_TCL_DECLARED -/* 339 */ -EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetString_TCL_DECLARED -#define Tcl_GetString_TCL_DECLARED -/* 340 */ -EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED -#define Tcl_GetDefaultEncodingDir_TCL_DECLARED -/* 341 */ -EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); -#endif -#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED -#define Tcl_SetDefaultEncodingDir_TCL_DECLARED -/* 342 */ -EXTERN void Tcl_SetDefaultEncodingDir (const char * path); -#endif -#ifndef Tcl_AlertNotifier_TCL_DECLARED -#define Tcl_AlertNotifier_TCL_DECLARED -/* 343 */ -EXTERN void Tcl_AlertNotifier (ClientData clientData); -#endif -#ifndef Tcl_ServiceModeHook_TCL_DECLARED -#define Tcl_ServiceModeHook_TCL_DECLARED -/* 344 */ -EXTERN void Tcl_ServiceModeHook (int mode); -#endif -#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED -#define Tcl_UniCharIsAlnum_TCL_DECLARED -/* 345 */ -EXTERN int Tcl_UniCharIsAlnum (int ch); -#endif -#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED -#define Tcl_UniCharIsAlpha_TCL_DECLARED -/* 346 */ -EXTERN int Tcl_UniCharIsAlpha (int ch); -#endif -#ifndef Tcl_UniCharIsDigit_TCL_DECLARED -#define Tcl_UniCharIsDigit_TCL_DECLARED -/* 347 */ -EXTERN int Tcl_UniCharIsDigit (int ch); -#endif -#ifndef Tcl_UniCharIsLower_TCL_DECLARED -#define Tcl_UniCharIsLower_TCL_DECLARED -/* 348 */ -EXTERN int Tcl_UniCharIsLower (int ch); -#endif -#ifndef Tcl_UniCharIsSpace_TCL_DECLARED -#define Tcl_UniCharIsSpace_TCL_DECLARED -/* 349 */ -EXTERN int Tcl_UniCharIsSpace (int ch); -#endif -#ifndef Tcl_UniCharIsUpper_TCL_DECLARED -#define Tcl_UniCharIsUpper_TCL_DECLARED -/* 350 */ -EXTERN int Tcl_UniCharIsUpper (int ch); -#endif -#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED -#define Tcl_UniCharIsWordChar_TCL_DECLARED -/* 351 */ -EXTERN int Tcl_UniCharIsWordChar (int ch); -#endif -#ifndef Tcl_UniCharLen_TCL_DECLARED -#define Tcl_UniCharLen_TCL_DECLARED -/* 352 */ -EXTERN int Tcl_UniCharLen (const Tcl_UniChar * uniStr); -#endif -#ifndef Tcl_UniCharNcmp_TCL_DECLARED -#define Tcl_UniCharNcmp_TCL_DECLARED -/* 353 */ -EXTERN int Tcl_UniCharNcmp (const Tcl_UniChar * ucs, - const Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED -#define Tcl_UniCharToUtfDString_TCL_DECLARED -/* 354 */ -EXTERN char * Tcl_UniCharToUtfDString (const Tcl_UniChar * uniStr, - int uniLength, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED -#define Tcl_UtfToUniCharDString_TCL_DECLARED -/* 355 */ -EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (const char * src, - int length, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED -#define Tcl_GetRegExpFromObj_TCL_DECLARED -/* 356 */ -EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, - Tcl_Obj * patObj, int flags); -#endif -#ifndef Tcl_EvalTokens_TCL_DECLARED -#define Tcl_EvalTokens_TCL_DECLARED -/* 357 */ -EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_FreeParse_TCL_DECLARED -#define Tcl_FreeParse_TCL_DECLARED -/* 358 */ -EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_LogCommandInfo_TCL_DECLARED -#define Tcl_LogCommandInfo_TCL_DECLARED -/* 359 */ -EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, - const char * script, const char * command, - int length); -#endif -#ifndef Tcl_ParseBraces_TCL_DECLARED -#define Tcl_ParseBraces_TCL_DECLARED -/* 360 */ -EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseCommand_TCL_DECLARED -#define Tcl_ParseCommand_TCL_DECLARED -/* 361 */ -EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, - const char * start, int numBytes, int nested, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseExpr_TCL_DECLARED -#define Tcl_ParseExpr_TCL_DECLARED -/* 362 */ -EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseQuotedString_TCL_DECLARED -#define Tcl_ParseQuotedString_TCL_DECLARED -/* 363 */ -EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseVarName_TCL_DECLARED -#define Tcl_ParseVarName_TCL_DECLARED -/* 364 */ -EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append); -#endif -#ifndef Tcl_GetCwd_TCL_DECLARED -#define Tcl_GetCwd_TCL_DECLARED -/* 365 */ -EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); -#endif -#ifndef Tcl_Chdir_TCL_DECLARED -#define Tcl_Chdir_TCL_DECLARED -/* 366 */ -EXTERN int Tcl_Chdir (const char * dirName); -#endif -#ifndef Tcl_Access_TCL_DECLARED -#define Tcl_Access_TCL_DECLARED -/* 367 */ -EXTERN int Tcl_Access (const char * path, int mode); -#endif -#ifndef Tcl_Stat_TCL_DECLARED -#define Tcl_Stat_TCL_DECLARED -/* 368 */ -EXTERN int Tcl_Stat (const char * path, struct stat * bufPtr); -#endif -#ifndef Tcl_UtfNcmp_TCL_DECLARED -#define Tcl_UtfNcmp_TCL_DECLARED -/* 369 */ -EXTERN int Tcl_UtfNcmp (const char * s1, const char * s2, - unsigned long n); -#endif -#ifndef Tcl_UtfNcasecmp_TCL_DECLARED -#define Tcl_UtfNcasecmp_TCL_DECLARED -/* 370 */ -EXTERN int Tcl_UtfNcasecmp (const char * s1, const char * s2, - unsigned long n); -#endif -#ifndef Tcl_StringCaseMatch_TCL_DECLARED -#define Tcl_StringCaseMatch_TCL_DECLARED -/* 371 */ -EXTERN int Tcl_StringCaseMatch (const char * str, - const char * pattern, int nocase); -#endif -#ifndef Tcl_UniCharIsControl_TCL_DECLARED -#define Tcl_UniCharIsControl_TCL_DECLARED -/* 372 */ -EXTERN int Tcl_UniCharIsControl (int ch); -#endif -#ifndef Tcl_UniCharIsGraph_TCL_DECLARED -#define Tcl_UniCharIsGraph_TCL_DECLARED -/* 373 */ -EXTERN int Tcl_UniCharIsGraph (int ch); -#endif -#ifndef Tcl_UniCharIsPrint_TCL_DECLARED -#define Tcl_UniCharIsPrint_TCL_DECLARED -/* 374 */ -EXTERN int Tcl_UniCharIsPrint (int ch); -#endif -#ifndef Tcl_UniCharIsPunct_TCL_DECLARED -#define Tcl_UniCharIsPunct_TCL_DECLARED -/* 375 */ -EXTERN int Tcl_UniCharIsPunct (int ch); -#endif -#ifndef Tcl_RegExpExecObj_TCL_DECLARED -#define Tcl_RegExpExecObj_TCL_DECLARED -/* 376 */ -EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, - Tcl_RegExp regexp, Tcl_Obj * textObj, - int offset, int nmatches, int flags); -#endif -#ifndef Tcl_RegExpGetInfo_TCL_DECLARED -#define Tcl_RegExpGetInfo_TCL_DECLARED -/* 377 */ -EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, - Tcl_RegExpInfo * infoPtr); -#endif -#ifndef Tcl_NewUnicodeObj_TCL_DECLARED -#define Tcl_NewUnicodeObj_TCL_DECLARED -/* 378 */ -EXTERN Tcl_Obj * Tcl_NewUnicodeObj (const Tcl_UniChar * unicode, - int numChars); -#endif -#ifndef Tcl_SetUnicodeObj_TCL_DECLARED -#define Tcl_SetUnicodeObj_TCL_DECLARED -/* 379 */ -EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, - const Tcl_UniChar * unicode, int numChars); -#endif -#ifndef Tcl_GetCharLength_TCL_DECLARED -#define Tcl_GetCharLength_TCL_DECLARED -/* 380 */ -EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetUniChar_TCL_DECLARED -#define Tcl_GetUniChar_TCL_DECLARED -/* 381 */ -EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); -#endif -#ifndef Tcl_GetUnicode_TCL_DECLARED -#define Tcl_GetUnicode_TCL_DECLARED -/* 382 */ -EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetRange_TCL_DECLARED -#define Tcl_GetRange_TCL_DECLARED -/* 383 */ -EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); -#endif -#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED -#define Tcl_AppendUnicodeToObj_TCL_DECLARED -/* 384 */ -EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, - const Tcl_UniChar * unicode, int length); -#endif -#ifndef Tcl_RegExpMatchObj_TCL_DECLARED -#define Tcl_RegExpMatchObj_TCL_DECLARED -/* 385 */ -EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, - Tcl_Obj * textObj, Tcl_Obj * patternObj); -#endif -#ifndef Tcl_SetNotifier_TCL_DECLARED -#define Tcl_SetNotifier_TCL_DECLARED -/* 386 */ -EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); -#endif -#ifndef Tcl_GetAllocMutex_TCL_DECLARED -#define Tcl_GetAllocMutex_TCL_DECLARED -/* 387 */ -EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); -#endif -#ifndef Tcl_GetChannelNames_TCL_DECLARED -#define Tcl_GetChannelNames_TCL_DECLARED -/* 388 */ -EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED -#define Tcl_GetChannelNamesEx_TCL_DECLARED -/* 389 */ -EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, - const char * pattern); -#endif -#ifndef Tcl_ProcObjCmd_TCL_DECLARED -#define Tcl_ProcObjCmd_TCL_DECLARED -/* 390 */ -EXTERN int Tcl_ProcObjCmd (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_ConditionFinalize_TCL_DECLARED -#define Tcl_ConditionFinalize_TCL_DECLARED -/* 391 */ -EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_MutexFinalize_TCL_DECLARED -#define Tcl_MutexFinalize_TCL_DECLARED -/* 392 */ -EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); -#endif -#ifndef Tcl_CreateThread_TCL_DECLARED -#define Tcl_CreateThread_TCL_DECLARED -/* 393 */ -EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, - Tcl_ThreadCreateProc proc, - ClientData clientData, int stackSize, - int flags); -#endif -#ifndef Tcl_ReadRaw_TCL_DECLARED -#define Tcl_ReadRaw_TCL_DECLARED -/* 394 */ -EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, - int bytesToRead); -#endif -#ifndef Tcl_WriteRaw_TCL_DECLARED -#define Tcl_WriteRaw_TCL_DECLARED -/* 395 */ -EXTERN int Tcl_WriteRaw (Tcl_Channel chan, const char * src, - int srcLen); -#endif -#ifndef Tcl_GetTopChannel_TCL_DECLARED -#define Tcl_GetTopChannel_TCL_DECLARED -/* 396 */ -EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelBuffered_TCL_DECLARED -#define Tcl_ChannelBuffered_TCL_DECLARED -/* 397 */ -EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelName_TCL_DECLARED -#define Tcl_ChannelName_TCL_DECLARED -/* 398 */ -EXTERN CONST84_RETURN char * Tcl_ChannelName ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelVersion_TCL_DECLARED -#define Tcl_ChannelVersion_TCL_DECLARED -/* 399 */ -EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED -#define Tcl_ChannelBlockModeProc_TCL_DECLARED -/* 400 */ -EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelCloseProc_TCL_DECLARED -#define Tcl_ChannelCloseProc_TCL_DECLARED -/* 401 */ -EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED -#define Tcl_ChannelClose2Proc_TCL_DECLARED -/* 402 */ -EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelInputProc_TCL_DECLARED -#define Tcl_ChannelInputProc_TCL_DECLARED -/* 403 */ -EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelOutputProc_TCL_DECLARED -#define Tcl_ChannelOutputProc_TCL_DECLARED -/* 404 */ -EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSeekProc_TCL_DECLARED -#define Tcl_ChannelSeekProc_TCL_DECLARED -/* 405 */ -EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED -#define Tcl_ChannelSetOptionProc_TCL_DECLARED -/* 406 */ -EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED -#define Tcl_ChannelGetOptionProc_TCL_DECLARED -/* 407 */ -EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelWatchProc_TCL_DECLARED -#define Tcl_ChannelWatchProc_TCL_DECLARED -/* 408 */ -EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED -#define Tcl_ChannelGetHandleProc_TCL_DECLARED -/* 409 */ -EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelFlushProc_TCL_DECLARED -#define Tcl_ChannelFlushProc_TCL_DECLARED -/* 410 */ -EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED -#define Tcl_ChannelHandlerProc_TCL_DECLARED -/* 411 */ -EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_JoinThread_TCL_DECLARED -#define Tcl_JoinThread_TCL_DECLARED -/* 412 */ -EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int * result); -#endif -#ifndef Tcl_IsChannelShared_TCL_DECLARED -#define Tcl_IsChannelShared_TCL_DECLARED -/* 413 */ -EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelRegistered_TCL_DECLARED -#define Tcl_IsChannelRegistered_TCL_DECLARED -/* 414 */ -EXTERN int Tcl_IsChannelRegistered (Tcl_Interp * interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_CutChannel_TCL_DECLARED -#define Tcl_CutChannel_TCL_DECLARED -/* 415 */ -EXTERN void Tcl_CutChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_SpliceChannel_TCL_DECLARED -#define Tcl_SpliceChannel_TCL_DECLARED -/* 416 */ -EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED -#define Tcl_ClearChannelHandlers_TCL_DECLARED -/* 417 */ -EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelExisting_TCL_DECLARED -#define Tcl_IsChannelExisting_TCL_DECLARED -/* 418 */ -EXTERN int Tcl_IsChannelExisting (const char * channelName); -#endif -#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED -#define Tcl_UniCharNcasecmp_TCL_DECLARED -/* 419 */ -EXTERN int Tcl_UniCharNcasecmp (const Tcl_UniChar * ucs, - const Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED -#define Tcl_UniCharCaseMatch_TCL_DECLARED -/* 420 */ -EXTERN int Tcl_UniCharCaseMatch (const Tcl_UniChar * uniStr, - const Tcl_UniChar * uniPattern, int nocase); -#endif -#ifndef Tcl_FindHashEntry_TCL_DECLARED -#define Tcl_FindHashEntry_TCL_DECLARED -/* 421 */ -EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, - const char * key); -#endif -#ifndef Tcl_CreateHashEntry_TCL_DECLARED -#define Tcl_CreateHashEntry_TCL_DECLARED -/* 422 */ -EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, - const char * key, int * newPtr); -#endif -#ifndef Tcl_InitCustomHashTable_TCL_DECLARED -#define Tcl_InitCustomHashTable_TCL_DECLARED -/* 423 */ -EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, - int keyType, const Tcl_HashKeyType * typePtr); -#endif -#ifndef Tcl_InitObjHashTable_TCL_DECLARED -#define Tcl_InitObjHashTable_TCL_DECLARED -/* 424 */ -EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_CommandTraceInfo_TCL_DECLARED -#define Tcl_CommandTraceInfo_TCL_DECLARED -/* 425 */ -EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_TraceCommand_TCL_DECLARED -#define Tcl_TraceCommand_TCL_DECLARED -/* 426 */ -EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceCommand_TCL_DECLARED -#define Tcl_UntraceCommand_TCL_DECLARED -/* 427 */ -EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AttemptAlloc_TCL_DECLARED -#define Tcl_AttemptAlloc_TCL_DECLARED -/* 428 */ -EXTERN char * Tcl_AttemptAlloc (unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED -#define Tcl_AttemptDbCkalloc_TCL_DECLARED -/* 429 */ -EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, - const char * file, int line); -#endif -#ifndef Tcl_AttemptRealloc_TCL_DECLARED -#define Tcl_AttemptRealloc_TCL_DECLARED -/* 430 */ -EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED -#define Tcl_AttemptDbCkrealloc_TCL_DECLARED -/* 431 */ -EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, - unsigned int size, const char * file, - int line); -#endif -#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED -#define Tcl_AttemptSetObjLength_TCL_DECLARED -/* 432 */ -EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, - int length); -#endif -#ifndef Tcl_GetChannelThread_TCL_DECLARED -#define Tcl_GetChannelThread_TCL_DECLARED -/* 433 */ -EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); -#endif -#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED -#define Tcl_GetUnicodeFromObj_TCL_DECLARED -/* 434 */ -EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED -#define Tcl_GetMathFuncInfo_TCL_DECLARED -/* 435 */ -EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, - const char * name, int * numArgsPtr, - Tcl_ValueType ** argTypesPtr, - Tcl_MathProc ** procPtr, - ClientData * clientDataPtr); -#endif -#ifndef Tcl_ListMathFuncs_TCL_DECLARED -#define Tcl_ListMathFuncs_TCL_DECLARED -/* 436 */ -EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, - const char * pattern); -#endif -#ifndef Tcl_SubstObj_TCL_DECLARED -#define Tcl_SubstObj_TCL_DECLARED -/* 437 */ -EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_DetachChannel_TCL_DECLARED -#define Tcl_DetachChannel_TCL_DECLARED -/* 438 */ -EXTERN int Tcl_DetachChannel (Tcl_Interp * interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_IsStandardChannel_TCL_DECLARED -#define Tcl_IsStandardChannel_TCL_DECLARED -/* 439 */ -EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_FSCopyFile_TCL_DECLARED -#define Tcl_FSCopyFile_TCL_DECLARED -/* 440 */ -EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSCopyDirectory_TCL_DECLARED -#define Tcl_FSCopyDirectory_TCL_DECLARED -/* 441 */ -EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSCreateDirectory_TCL_DECLARED -#define Tcl_FSCreateDirectory_TCL_DECLARED -/* 442 */ -EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSDeleteFile_TCL_DECLARED -#define Tcl_FSDeleteFile_TCL_DECLARED -/* 443 */ -EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSLoadFile_TCL_DECLARED -#define Tcl_FSLoadFile_TCL_DECLARED -/* 444 */ -EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, - Tcl_Obj * pathPtr, const char * sym1, - const char * sym2, - Tcl_PackageInitProc ** proc1Ptr, - Tcl_PackageInitProc ** proc2Ptr, - Tcl_LoadHandle * handlePtr, - Tcl_FSUnloadFileProc ** unloadProcPtr); -#endif -#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED -#define Tcl_FSMatchInDirectory_TCL_DECLARED -/* 445 */ -EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, - Tcl_Obj * result, Tcl_Obj * pathPtr, - const char * pattern, - Tcl_GlobTypeData * types); -#endif -#ifndef Tcl_FSLink_TCL_DECLARED -#define Tcl_FSLink_TCL_DECLARED -/* 446 */ -EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, - int linkAction); -#endif -#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED -#define Tcl_FSRemoveDirectory_TCL_DECLARED -/* 447 */ -EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSRenameFile_TCL_DECLARED -#define Tcl_FSRenameFile_TCL_DECLARED -/* 448 */ -EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSLstat_TCL_DECLARED -#define Tcl_FSLstat_TCL_DECLARED -/* 449 */ -EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSUtime_TCL_DECLARED -#define Tcl_FSUtime_TCL_DECLARED -/* 450 */ -EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, - struct utimbuf * tval); -#endif -#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED -#define Tcl_FSFileAttrsGet_TCL_DECLARED -/* 451 */ -EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED -#define Tcl_FSFileAttrsSet_TCL_DECLARED -/* 452 */ -EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED -#define Tcl_FSFileAttrStrings_TCL_DECLARED -/* 453 */ -EXTERN const char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, - Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSStat_TCL_DECLARED -#define Tcl_FSStat_TCL_DECLARED -/* 454 */ -EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSAccess_TCL_DECLARED -#define Tcl_FSAccess_TCL_DECLARED -/* 455 */ -EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); -#endif -#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED -#define Tcl_FSOpenFileChannel_TCL_DECLARED -/* 456 */ -EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, const char * modeString, - int permissions); -#endif -#ifndef Tcl_FSGetCwd_TCL_DECLARED -#define Tcl_FSGetCwd_TCL_DECLARED -/* 457 */ -EXTERN Tcl_Obj * Tcl_FSGetCwd (Tcl_Interp * interp); -#endif -#ifndef Tcl_FSChdir_TCL_DECLARED -#define Tcl_FSChdir_TCL_DECLARED -/* 458 */ -EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSConvertToPathType_TCL_DECLARED -#define Tcl_FSConvertToPathType_TCL_DECLARED -/* 459 */ -EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSJoinPath_TCL_DECLARED -#define Tcl_FSJoinPath_TCL_DECLARED -/* 460 */ -EXTERN Tcl_Obj * Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); -#endif -#ifndef Tcl_FSSplitPath_TCL_DECLARED -#define Tcl_FSSplitPath_TCL_DECLARED -/* 461 */ -EXTERN Tcl_Obj * Tcl_FSSplitPath (Tcl_Obj * pathPtr, int * lenPtr); -#endif -#ifndef Tcl_FSEqualPaths_TCL_DECLARED -#define Tcl_FSEqualPaths_TCL_DECLARED -/* 462 */ -EXTERN int Tcl_FSEqualPaths (Tcl_Obj * firstPtr, - Tcl_Obj * secondPtr); -#endif -#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED -#define Tcl_FSGetNormalizedPath_TCL_DECLARED -/* 463 */ -EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSJoinToPath_TCL_DECLARED -#define Tcl_FSJoinToPath_TCL_DECLARED -/* 464 */ -EXTERN Tcl_Obj * Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_FSGetInternalRep_TCL_DECLARED -#define Tcl_FSGetInternalRep_TCL_DECLARED -/* 465 */ -EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj * pathPtr, - const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED -#define Tcl_FSGetTranslatedPath_TCL_DECLARED -/* 466 */ -EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSEvalFile_TCL_DECLARED -#define Tcl_FSEvalFile_TCL_DECLARED -/* 467 */ -EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, - Tcl_Obj * fileName); -#endif -#ifndef Tcl_FSNewNativePath_TCL_DECLARED -#define Tcl_FSNewNativePath_TCL_DECLARED -/* 468 */ -EXTERN Tcl_Obj * Tcl_FSNewNativePath ( - const Tcl_Filesystem * fromFilesystem, - ClientData clientData); -#endif -#ifndef Tcl_FSGetNativePath_TCL_DECLARED -#define Tcl_FSGetNativePath_TCL_DECLARED -/* 469 */ -EXTERN const char * Tcl_FSGetNativePath (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED -#define Tcl_FSFileSystemInfo_TCL_DECLARED -/* 470 */ -EXTERN Tcl_Obj * Tcl_FSFileSystemInfo (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSPathSeparator_TCL_DECLARED -#define Tcl_FSPathSeparator_TCL_DECLARED -/* 471 */ -EXTERN Tcl_Obj * Tcl_FSPathSeparator (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSListVolumes_TCL_DECLARED -#define Tcl_FSListVolumes_TCL_DECLARED -/* 472 */ -EXTERN Tcl_Obj * Tcl_FSListVolumes (void); -#endif -#ifndef Tcl_FSRegister_TCL_DECLARED -#define Tcl_FSRegister_TCL_DECLARED -/* 473 */ -EXTERN int Tcl_FSRegister (ClientData clientData, - const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSUnregister_TCL_DECLARED -#define Tcl_FSUnregister_TCL_DECLARED -/* 474 */ -EXTERN int Tcl_FSUnregister (const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSData_TCL_DECLARED -#define Tcl_FSData_TCL_DECLARED -/* 475 */ -EXTERN ClientData Tcl_FSData (const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED -#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED -/* 476 */ -EXTERN const char * Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED -#define Tcl_FSGetFileSystemForPath_TCL_DECLARED -/* 477 */ -EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath ( - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSGetPathType_TCL_DECLARED -#define Tcl_FSGetPathType_TCL_DECLARED -/* 478 */ -EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_OutputBuffered_TCL_DECLARED -#define Tcl_OutputBuffered_TCL_DECLARED -/* 479 */ -EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_FSMountsChanged_TCL_DECLARED -#define Tcl_FSMountsChanged_TCL_DECLARED -/* 480 */ -EXTERN void Tcl_FSMountsChanged (const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_EvalTokensStandard_TCL_DECLARED -#define Tcl_EvalTokensStandard_TCL_DECLARED -/* 481 */ -EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_GetTime_TCL_DECLARED -#define Tcl_GetTime_TCL_DECLARED -/* 482 */ -EXTERN void Tcl_GetTime (Tcl_Time * timeBuf); -#endif -#ifndef Tcl_CreateObjTrace_TCL_DECLARED -#define Tcl_CreateObjTrace_TCL_DECLARED -/* 483 */ -EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp * interp, int level, - int flags, Tcl_CmdObjTraceProc * objProc, - ClientData clientData, - Tcl_CmdObjTraceDeleteProc * delProc); -#endif -#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED -#define Tcl_GetCommandInfoFromToken_TCL_DECLARED -/* 484 */ -EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, - Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED -#define Tcl_SetCommandInfoFromToken_TCL_DECLARED -/* 485 */ -EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, - const Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED -#define Tcl_DbNewWideIntObj_TCL_DECLARED -/* 486 */ -EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, - const char * file, int line); -#endif -#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED -#define Tcl_GetWideIntFromObj_TCL_DECLARED -/* 487 */ -EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_WideInt * widePtr); -#endif -#ifndef Tcl_NewWideIntObj_TCL_DECLARED -#define Tcl_NewWideIntObj_TCL_DECLARED -/* 488 */ -EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); -#endif -#ifndef Tcl_SetWideIntObj_TCL_DECLARED -#define Tcl_SetWideIntObj_TCL_DECLARED -/* 489 */ -EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, - Tcl_WideInt wideValue); -#endif -#ifndef Tcl_AllocStatBuf_TCL_DECLARED -#define Tcl_AllocStatBuf_TCL_DECLARED -/* 490 */ -EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); -#endif -#ifndef Tcl_Seek_TCL_DECLARED -#define Tcl_Seek_TCL_DECLARED -/* 491 */ -EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, - int mode); -#endif -#ifndef Tcl_Tell_TCL_DECLARED -#define Tcl_Tell_TCL_DECLARED -/* 492 */ -EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED -#define Tcl_ChannelWideSeekProc_TCL_DECLARED -/* 493 */ -EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_DictObjPut_TCL_DECLARED -#define Tcl_DictObjPut_TCL_DECLARED -/* 494 */ -EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjGet_TCL_DECLARED -#define Tcl_DictObjGet_TCL_DECLARED -/* 495 */ -EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj ** valuePtrPtr); -#endif -#ifndef Tcl_DictObjRemove_TCL_DECLARED -#define Tcl_DictObjRemove_TCL_DECLARED -/* 496 */ -EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); -#endif -#ifndef Tcl_DictObjSize_TCL_DECLARED -#define Tcl_DictObjSize_TCL_DECLARED -/* 497 */ -EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int * sizePtr); -#endif -#ifndef Tcl_DictObjFirst_TCL_DECLARED -#define Tcl_DictObjFirst_TCL_DECLARED -/* 498 */ -EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, - Tcl_Obj * dictPtr, - Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjNext_TCL_DECLARED -#define Tcl_DictObjNext_TCL_DECLARED -/* 499 */ -EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjDone_TCL_DECLARED -#define Tcl_DictObjDone_TCL_DECLARED -/* 500 */ -EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); -#endif -#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED -#define Tcl_DictObjPutKeyList_TCL_DECLARED -/* 501 */ -EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED -#define Tcl_DictObjRemoveKeyList_TCL_DECLARED -/* 502 */ -EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *const * keyv); -#endif -#ifndef Tcl_NewDictObj_TCL_DECLARED -#define Tcl_NewDictObj_TCL_DECLARED -/* 503 */ -EXTERN Tcl_Obj * Tcl_NewDictObj (void); -#endif -#ifndef Tcl_DbNewDictObj_TCL_DECLARED -#define Tcl_DbNewDictObj_TCL_DECLARED -/* 504 */ -EXTERN Tcl_Obj * Tcl_DbNewDictObj (const char * file, int line); -#endif -#ifndef Tcl_RegisterConfig_TCL_DECLARED -#define Tcl_RegisterConfig_TCL_DECLARED -/* 505 */ -EXTERN void Tcl_RegisterConfig (Tcl_Interp * interp, - const char * pkgName, - const Tcl_Config * configuration, - const char * valEncoding); -#endif -#ifndef Tcl_CreateNamespace_TCL_DECLARED -#define Tcl_CreateNamespace_TCL_DECLARED -/* 506 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - const char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); -#endif -#ifndef Tcl_DeleteNamespace_TCL_DECLARED -#define Tcl_DeleteNamespace_TCL_DECLARED -/* 507 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_AppendExportList_TCL_DECLARED -#define Tcl_AppendExportList_TCL_DECLARED -/* 508 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_Export_TCL_DECLARED -#define Tcl_Export_TCL_DECLARED -/* 509 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int resetListFirst); -#endif -#ifndef Tcl_Import_TCL_DECLARED -#define Tcl_Import_TCL_DECLARED -/* 510 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int allowOverwrite); -#endif -#ifndef Tcl_ForgetImport_TCL_DECLARED -#define Tcl_ForgetImport_TCL_DECLARED -/* 511 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern); -#endif -#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED -#define Tcl_GetCurrentNamespace_TCL_DECLARED -/* 512 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED -#define Tcl_GetGlobalNamespace_TCL_DECLARED -/* 513 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_FindNamespace_TCL_DECLARED -#define Tcl_FindNamespace_TCL_DECLARED -/* 514 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_FindCommand_TCL_DECLARED -#define Tcl_FindCommand_TCL_DECLARED -/* 515 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_GetCommandFromObj_TCL_DECLARED -#define Tcl_GetCommandFromObj_TCL_DECLARED -/* 516 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCommandFullName_TCL_DECLARED -#define Tcl_GetCommandFullName_TCL_DECLARED -/* 517 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSEvalFileEx_TCL_DECLARED -#define Tcl_FSEvalFileEx_TCL_DECLARED -/* 518 */ -EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, - Tcl_Obj * fileName, - const char * encodingName); -#endif -#ifndef Tcl_SetExitProc_TCL_DECLARED -#define Tcl_SetExitProc_TCL_DECLARED -/* 519 */ -EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); -#endif -#ifndef Tcl_LimitAddHandler_TCL_DECLARED -#define Tcl_LimitAddHandler_TCL_DECLARED -/* 520 */ -EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, - Tcl_LimitHandlerProc * handlerProc, - ClientData clientData, - Tcl_LimitHandlerDeleteProc * deleteProc); -#endif -#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED -#define Tcl_LimitRemoveHandler_TCL_DECLARED -/* 521 */ -EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, - int type, Tcl_LimitHandlerProc * handlerProc, - ClientData clientData); -#endif -#ifndef Tcl_LimitReady_TCL_DECLARED -#define Tcl_LimitReady_TCL_DECLARED -/* 522 */ -EXTERN int Tcl_LimitReady (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitCheck_TCL_DECLARED -#define Tcl_LimitCheck_TCL_DECLARED -/* 523 */ -EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitExceeded_TCL_DECLARED -#define Tcl_LimitExceeded_TCL_DECLARED -/* 524 */ -EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitSetCommands_TCL_DECLARED -#define Tcl_LimitSetCommands_TCL_DECLARED -/* 525 */ -EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, - int commandLimit); -#endif -#ifndef Tcl_LimitSetTime_TCL_DECLARED -#define Tcl_LimitSetTime_TCL_DECLARED -/* 526 */ -EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitSetGranularity_TCL_DECLARED -#define Tcl_LimitSetGranularity_TCL_DECLARED -/* 527 */ -EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, - int type, int granularity); -#endif -#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED -#define Tcl_LimitTypeEnabled_TCL_DECLARED -/* 528 */ -EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED -#define Tcl_LimitTypeExceeded_TCL_DECLARED -/* 529 */ -EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeSet_TCL_DECLARED -#define Tcl_LimitTypeSet_TCL_DECLARED -/* 530 */ -EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeReset_TCL_DECLARED -#define Tcl_LimitTypeReset_TCL_DECLARED -/* 531 */ -EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitGetCommands_TCL_DECLARED -#define Tcl_LimitGetCommands_TCL_DECLARED -/* 532 */ -EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitGetTime_TCL_DECLARED -#define Tcl_LimitGetTime_TCL_DECLARED -/* 533 */ -EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitGetGranularity_TCL_DECLARED -#define Tcl_LimitGetGranularity_TCL_DECLARED -/* 534 */ -EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, - int type); -#endif -#ifndef Tcl_SaveInterpState_TCL_DECLARED -#define Tcl_SaveInterpState_TCL_DECLARED -/* 535 */ -EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); -#endif -#ifndef Tcl_RestoreInterpState_TCL_DECLARED -#define Tcl_RestoreInterpState_TCL_DECLARED -/* 536 */ -EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, - Tcl_InterpState state); -#endif -#ifndef Tcl_DiscardInterpState_TCL_DECLARED -#define Tcl_DiscardInterpState_TCL_DECLARED -/* 537 */ -EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); -#endif -#ifndef Tcl_SetReturnOptions_TCL_DECLARED -#define Tcl_SetReturnOptions_TCL_DECLARED -/* 538 */ -EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, - Tcl_Obj * options); -#endif -#ifndef Tcl_GetReturnOptions_TCL_DECLARED -#define Tcl_GetReturnOptions_TCL_DECLARED -/* 539 */ -EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, - int result); -#endif -#ifndef Tcl_IsEnsemble_TCL_DECLARED -#define Tcl_IsEnsemble_TCL_DECLARED -/* 540 */ -EXTERN int Tcl_IsEnsemble (Tcl_Command token); -#endif -#ifndef Tcl_CreateEnsemble_TCL_DECLARED -#define Tcl_CreateEnsemble_TCL_DECLARED -/* 541 */ -EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * namespacePtr, int flags); -#endif -#ifndef Tcl_FindEnsemble_TCL_DECLARED -#define Tcl_FindEnsemble_TCL_DECLARED -/* 542 */ -EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, - Tcl_Obj * cmdNameObj, int flags); -#endif -#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED -/* 543 */ -EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * subcmdList); -#endif -#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED -#define Tcl_SetEnsembleMappingDict_TCL_DECLARED -/* 544 */ -EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * mapDict); -#endif -#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -/* 545 */ -EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * unknownList); -#endif -#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED -#define Tcl_SetEnsembleFlags_TCL_DECLARED -/* 546 */ -EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int flags); -#endif -#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED -/* 547 */ -EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** subcmdListPtr); -#endif -#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED -#define Tcl_GetEnsembleMappingDict_TCL_DECLARED -/* 548 */ -EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** mapDictPtr); -#endif -#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -/* 549 */ -EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** unknownListPtr); -#endif -#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED -#define Tcl_GetEnsembleFlags_TCL_DECLARED -/* 550 */ -EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int * flagsPtr); -#endif -#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED -#define Tcl_GetEnsembleNamespace_TCL_DECLARED -/* 551 */ -EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, - Tcl_Command token, - Tcl_Namespace ** namespacePtrPtr); -#endif -#ifndef Tcl_SetTimeProc_TCL_DECLARED -#define Tcl_SetTimeProc_TCL_DECLARED -/* 552 */ -EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc * getProc, - Tcl_ScaleTimeProc * scaleProc, - ClientData clientData); -#endif -#ifndef Tcl_QueryTimeProc_TCL_DECLARED -#define Tcl_QueryTimeProc_TCL_DECLARED -/* 553 */ -EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc ** getProc, - Tcl_ScaleTimeProc ** scaleProc, - ClientData * clientData); -#endif -#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED -#define Tcl_ChannelThreadActionProc_TCL_DECLARED -/* 554 */ -EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_NewBignumObj_TCL_DECLARED -#define Tcl_NewBignumObj_TCL_DECLARED -/* 555 */ -EXTERN Tcl_Obj * Tcl_NewBignumObj (mp_int * value); -#endif -#ifndef Tcl_DbNewBignumObj_TCL_DECLARED -#define Tcl_DbNewBignumObj_TCL_DECLARED -/* 556 */ -EXTERN Tcl_Obj * Tcl_DbNewBignumObj (mp_int * value, - const char * file, int line); -#endif -#ifndef Tcl_SetBignumObj_TCL_DECLARED -#define Tcl_SetBignumObj_TCL_DECLARED -/* 557 */ -EXTERN void Tcl_SetBignumObj (Tcl_Obj * obj, mp_int * value); -#endif -#ifndef Tcl_GetBignumFromObj_TCL_DECLARED -#define Tcl_GetBignumFromObj_TCL_DECLARED -/* 558 */ -EXTERN int Tcl_GetBignumFromObj (Tcl_Interp * interp, - Tcl_Obj * obj, mp_int * value); -#endif -#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED -#define Tcl_TakeBignumFromObj_TCL_DECLARED -/* 559 */ -EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp * interp, - Tcl_Obj * obj, mp_int * value); -#endif -#ifndef Tcl_TruncateChannel_TCL_DECLARED -#define Tcl_TruncateChannel_TCL_DECLARED -/* 560 */ -EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, - Tcl_WideInt length); -#endif -#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED -#define Tcl_ChannelTruncateProc_TCL_DECLARED -/* 561 */ -EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED -#define Tcl_SetChannelErrorInterp_TCL_DECLARED -/* 562 */ -EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp * interp, - Tcl_Obj * msg); -#endif -#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED -#define Tcl_GetChannelErrorInterp_TCL_DECLARED -/* 563 */ -EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp * interp, - Tcl_Obj ** msg); -#endif -#ifndef Tcl_SetChannelError_TCL_DECLARED -#define Tcl_SetChannelError_TCL_DECLARED -/* 564 */ -EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj * msg); -#endif -#ifndef Tcl_GetChannelError_TCL_DECLARED -#define Tcl_GetChannelError_TCL_DECLARED -/* 565 */ -EXTERN void Tcl_GetChannelError (Tcl_Channel chan, - Tcl_Obj ** msg); -#endif -#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED -#define Tcl_InitBignumFromDouble_TCL_DECLARED -/* 566 */ -EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp * interp, - double initval, mp_int * toInit); -#endif -#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -/* 567 */ -EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -/* 568 */ -EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); -#endif -#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED -#define Tcl_GetEncodingFromObj_TCL_DECLARED -/* 569 */ -EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); -#endif -#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED -#define Tcl_GetEncodingSearchPath_TCL_DECLARED -/* 570 */ -EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath (void); -#endif -#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED -#define Tcl_SetEncodingSearchPath_TCL_DECLARED -/* 571 */ -EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj * searchPath); -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -/* 572 */ -EXTERN const char * Tcl_GetEncodingNameFromEnvironment ( - Tcl_DString * bufPtr); -#endif -#ifndef Tcl_PkgRequireProc_TCL_DECLARED -#define Tcl_PkgRequireProc_TCL_DECLARED -/* 573 */ -EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, - const char * name, int objc, - Tcl_Obj *const objv[], - ClientData * clientDataPtr); -#endif -#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED -#define Tcl_AppendObjToErrorInfo_TCL_DECLARED -/* 574 */ -EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED -#define Tcl_AppendLimitedToObj_TCL_DECLARED -/* 575 */ -EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, - const char * bytes, int length, int limit, - const char * ellipsis); -#endif -#ifndef Tcl_Format_TCL_DECLARED -#define Tcl_Format_TCL_DECLARED -/* 576 */ -EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, const char * format, - int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_AppendFormatToObj_TCL_DECLARED -#define Tcl_AppendFormatToObj_TCL_DECLARED -/* 577 */ -EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, const char * format, - int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_ObjPrintf_TCL_DECLARED -#define Tcl_ObjPrintf_TCL_DECLARED -/* 578 */ -EXTERN Tcl_Obj * Tcl_ObjPrintf (const char * format, ...); -#endif -#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED -#define Tcl_AppendPrintfToObj_TCL_DECLARED -/* 579 */ -EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, - const char * format, ...); -#endif -#ifndef Tcl_CancelEval_TCL_DECLARED -#define Tcl_CancelEval_TCL_DECLARED -/* 580 */ -EXTERN int Tcl_CancelEval (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr, - ClientData clientData, int flags); -#endif -#ifndef Tcl_Canceled_TCL_DECLARED -#define Tcl_Canceled_TCL_DECLARED -/* 581 */ -EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); -#endif -#ifndef Tcl_CreatePipe_TCL_DECLARED -#define Tcl_CreatePipe_TCL_DECLARED -/* 582 */ -EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, - Tcl_Channel * rchan, Tcl_Channel * wchan, - int flags); -#endif -#ifndef Tcl_NRCreateCommand_TCL_DECLARED -#define Tcl_NRCreateCommand_TCL_DECLARED -/* 583 */ -EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_ObjCmdProc * proc, - Tcl_ObjCmdProc * nreProc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_NREvalObj_TCL_DECLARED -#define Tcl_NREvalObj_TCL_DECLARED -/* 584 */ -EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_NREvalObjv_TCL_DECLARED -#define Tcl_NREvalObjv_TCL_DECLARED -/* 585 */ -EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], int flags); -#endif -#ifndef Tcl_NRCmdSwap_TCL_DECLARED -#define Tcl_NRCmdSwap_TCL_DECLARED -/* 586 */ -EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, - int objc, Tcl_Obj *const objv[], int flags); -#endif -#ifndef Tcl_NRAddCallback_TCL_DECLARED -#define Tcl_NRAddCallback_TCL_DECLARED -/* 587 */ -EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, - Tcl_NRPostProc * postProcPtr, - ClientData data0, ClientData data1, - ClientData data2, ClientData data3); -#endif -#ifndef Tcl_NRCallObjProc_TCL_DECLARED -#define Tcl_NRCallObjProc_TCL_DECLARED -/* 588 */ -EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, - Tcl_ObjCmdProc * objProc, - ClientData clientData, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED -#define Tcl_GetFSDeviceFromStat_TCL_DECLARED -/* 589 */ -EXTERN unsigned Tcl_GetFSDeviceFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetFSInodeFromStat_TCL_DECLARED -#define Tcl_GetFSInodeFromStat_TCL_DECLARED -/* 590 */ -EXTERN unsigned Tcl_GetFSInodeFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetModeFromStat_TCL_DECLARED -#define Tcl_GetModeFromStat_TCL_DECLARED -/* 591 */ -EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetLinkCountFromStat_TCL_DECLARED -#define Tcl_GetLinkCountFromStat_TCL_DECLARED -/* 592 */ -EXTERN int Tcl_GetLinkCountFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetUserIdFromStat_TCL_DECLARED -#define Tcl_GetUserIdFromStat_TCL_DECLARED -/* 593 */ -EXTERN int Tcl_GetUserIdFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetGroupIdFromStat_TCL_DECLARED -#define Tcl_GetGroupIdFromStat_TCL_DECLARED -/* 594 */ -EXTERN int Tcl_GetGroupIdFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetDeviceTypeFromStat_TCL_DECLARED -#define Tcl_GetDeviceTypeFromStat_TCL_DECLARED -/* 595 */ -EXTERN int Tcl_GetDeviceTypeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetAccessTimeFromStat_TCL_DECLARED -#define Tcl_GetAccessTimeFromStat_TCL_DECLARED -/* 596 */ -EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetModificationTimeFromStat_TCL_DECLARED -#define Tcl_GetModificationTimeFromStat_TCL_DECLARED -/* 597 */ -EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetChangeTimeFromStat_TCL_DECLARED -#define Tcl_GetChangeTimeFromStat_TCL_DECLARED -/* 598 */ -EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetSizeFromStat_TCL_DECLARED -#define Tcl_GetSizeFromStat_TCL_DECLARED -/* 599 */ -EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetBlocksFromStat_TCL_DECLARED -#define Tcl_GetBlocksFromStat_TCL_DECLARED -/* 600 */ -EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetBlockSizeFromStat_TCL_DECLARED -#define Tcl_GetBlockSizeFromStat_TCL_DECLARED -/* 601 */ -EXTERN unsigned Tcl_GetBlockSizeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_SetEnsembleParameterList_TCL_DECLARED -#define Tcl_SetEnsembleParameterList_TCL_DECLARED -/* 602 */ -EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * paramList); -#endif -#ifndef Tcl_GetEnsembleParameterList_TCL_DECLARED -#define Tcl_GetEnsembleParameterList_TCL_DECLARED -/* 603 */ -EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** paramListPtr); -#endif -#ifndef Tcl_ParseArgsObjv_TCL_DECLARED -#define Tcl_ParseArgsObjv_TCL_DECLARED -/* 604 */ -EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, - const Tcl_ArgvInfo * argTable, int * objcPtr, - Tcl_Obj *const * objv, Tcl_Obj *** remObjv); -#endif -#ifndef Tcl_GetErrorLine_TCL_DECLARED -#define Tcl_GetErrorLine_TCL_DECLARED -/* 605 */ -EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); -#endif -#ifndef Tcl_SetErrorLine_TCL_DECLARED -#define Tcl_SetErrorLine_TCL_DECLARED -/* 606 */ -EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int lineNum); -#endif -#ifndef Tcl_TransferResult_TCL_DECLARED -#define Tcl_TransferResult_TCL_DECLARED -/* 607 */ -EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, - int result, Tcl_Interp * targetInterp); -#endif -#ifndef Tcl_InterpActive_TCL_DECLARED -#define Tcl_InterpActive_TCL_DECLARED -/* 608 */ -EXTERN int Tcl_InterpActive (Tcl_Interp * interp); -#endif -#ifndef Tcl_BackgroundException_TCL_DECLARED -#define Tcl_BackgroundException_TCL_DECLARED -/* 609 */ -EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, - int code); -#endif -#ifndef Tcl_ZlibDeflate_TCL_DECLARED -#define Tcl_ZlibDeflate_TCL_DECLARED -/* 610 */ -EXTERN int Tcl_ZlibDeflate (Tcl_Interp * interp, int format, - Tcl_Obj * data, int level, - Tcl_Obj * gzipHeaderDictObj); -#endif -#ifndef Tcl_ZlibInflate_TCL_DECLARED -#define Tcl_ZlibInflate_TCL_DECLARED -/* 611 */ -EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format, - Tcl_Obj * data, int buffersize, - Tcl_Obj * gzipHeaderDictObj); -#endif -#ifndef Tcl_ZlibCRC32_TCL_DECLARED -#define Tcl_ZlibCRC32_TCL_DECLARED -/* 612 */ -EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, const char * buf, - int len); -#endif -#ifndef Tcl_ZlibAdler32_TCL_DECLARED -#define Tcl_ZlibAdler32_TCL_DECLARED -/* 613 */ -EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler, - const char * buf, int len); -#endif -#ifndef Tcl_ZlibStreamInit_TCL_DECLARED -#define Tcl_ZlibStreamInit_TCL_DECLARED -/* 614 */ -EXTERN int Tcl_ZlibStreamInit (Tcl_Interp * interp, int mode, - int format, int level, Tcl_Obj * dictObj, - Tcl_ZlibStream * zshandle); -#endif -#ifndef Tcl_ZlibStreamGetCommandName_TCL_DECLARED -#define Tcl_ZlibStreamGetCommandName_TCL_DECLARED -/* 615 */ -EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName ( - Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamEof_TCL_DECLARED -#define Tcl_ZlibStreamEof_TCL_DECLARED -/* 616 */ -EXTERN int Tcl_ZlibStreamEof (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamAdler32_TCL_DECLARED -#define Tcl_ZlibStreamAdler32_TCL_DECLARED -/* 617 */ -EXTERN int Tcl_ZlibStreamAdler32 (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamPut_TCL_DECLARED -#define Tcl_ZlibStreamPut_TCL_DECLARED -/* 618 */ -EXTERN int Tcl_ZlibStreamPut (Tcl_ZlibStream zshandle, - Tcl_Obj * data, int flush); -#endif -#ifndef Tcl_ZlibStreamGet_TCL_DECLARED -#define Tcl_ZlibStreamGet_TCL_DECLARED -/* 619 */ -EXTERN int Tcl_ZlibStreamGet (Tcl_ZlibStream zshandle, - Tcl_Obj * data, int count); -#endif -#ifndef Tcl_ZlibStreamClose_TCL_DECLARED -#define Tcl_ZlibStreamClose_TCL_DECLARED -/* 620 */ -EXTERN int Tcl_ZlibStreamClose (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamReset_TCL_DECLARED -#define Tcl_ZlibStreamReset_TCL_DECLARED -/* 621 */ -EXTERN int Tcl_ZlibStreamReset (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_SetStartupScript_TCL_DECLARED -#define Tcl_SetStartupScript_TCL_DECLARED -/* 622 */ -EXTERN void Tcl_SetStartupScript (Tcl_Obj * path, - const char * encoding); -#endif -#ifndef Tcl_GetStartupScript_TCL_DECLARED -#define Tcl_GetStartupScript_TCL_DECLARED -/* 623 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingPtr); -#endif - -typedef struct TclStubHooks { - const struct TclPlatStubs *tclPlatStubs; - const struct TclIntStubs *tclIntStubs; - const struct TclIntPlatStubs *tclIntPlatStubs; -} TclStubHooks; - -typedef struct TclStubs { - int magic; - const struct TclStubHooks *hooks; - - int (*tcl_PkgProvideEx) (Tcl_Interp * interp, const char * name, const char * version, ClientData clientData); /* 0 */ - CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 1 */ - void (*tcl_Panic) (const char * format, ...); /* 2 */ - char * (*tcl_Alloc) (unsigned int size); /* 3 */ - void (*tcl_Free) (char * ptr); /* 4 */ - char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ - char * (*tcl_DbCkalloc) (unsigned int size, const char * file, int line); /* 6 */ - int (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ - char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved9; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved10; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* MACOSX */ - void (*tcl_SetTimer) (const Tcl_Time * timePtr); /* 11 */ - void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (const Tcl_Time * timePtr); /* 13 */ - int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ - void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ - void (*tcl_AppendToObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 16 */ - Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *const objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, const Tcl_ObjType * typePtr); /* 18 */ - void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 19 */ - void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 20 */ - int (*tcl_DbIsShared) (Tcl_Obj * objPtr, const char * file, int line); /* 21 */ - Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, const char * file, int line); /* 22 */ - Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char * bytes, int length, const char * file, int line); /* 23 */ - Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char * file, int line); /* 24 */ - Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const * objv, const char * file, int line); /* 25 */ - Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char * file, int line); /* 26 */ - Tcl_Obj * (*tcl_DbNewObj) (const char * file, int line); /* 27 */ - Tcl_Obj * (*tcl_DbNewStringObj) (const char * bytes, int length, const char * file, int line); /* 28 */ - Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ - void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ - int (*tcl_GetBoolean) (Tcl_Interp * interp, const char * src, int * boolPtr); /* 31 */ - int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ - unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ - int (*tcl_GetDouble) (Tcl_Interp * interp, const char * src, double * doublePtr); /* 34 */ - int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *const * tablePtr, const char * msg, int flags, int * indexPtr); /* 36 */ - int (*tcl_GetInt) (Tcl_Interp * interp, const char * src, int * intPtr); /* 37 */ - int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ - int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - CONST86 Tcl_ObjType * (*tcl_GetObjType) (const char * typeName); /* 40 */ - char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ - void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ - int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ - int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ - int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ - int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ - int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ - int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ - Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ - Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char * bytes, int length); /* 50 */ - Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ - Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ - Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */ - Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ - Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ - Tcl_Obj * (*tcl_NewStringObj) (const char * bytes, int length); /* 56 */ - void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ - unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ - void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, const unsigned char * bytes, int length); /* 59 */ - void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ - void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ - void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ - void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ - void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ - void (*tcl_SetStringObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 65 */ - void (*tcl_AddErrorInfo) (Tcl_Interp * interp, const char * message); /* 66 */ - void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, const char * message, int length); /* 67 */ - void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ - void (*tcl_AppendElement) (Tcl_Interp * interp, const char * element); /* 69 */ - void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ - Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ - void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ - int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ - void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ - int (*tcl_AsyncReady) (void); /* 75 */ - void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ - char (*tcl_Backslash) (const char * src, int * readPtr); /* 77 */ - int (*tcl_BadChannelOption) (Tcl_Interp * interp, const char * optionName, const char * optionList); /* 78 */ - void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ - void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ - int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ - int (*tcl_CommandComplete) (const char * cmd); /* 82 */ - char * (*tcl_Concat) (int argc, CONST84 char *const * argv); /* 83 */ - int (*tcl_ConvertElement) (const char * src, char * dst, int flags); /* 84 */ - int (*tcl_ConvertCountedElement) (const char * src, int length, char * dst, int flags); /* 85 */ - int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char *const * argv); /* 86 */ - int (*tcl_CreateAliasObj) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ - Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType * typePtr, const char * chanName, ClientData instanceData, int mask); /* 88 */ - void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ - void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ - Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ - void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ - void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ - Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ - void (*tcl_CreateMathFunc) (Tcl_Interp * interp, const char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ - Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ - Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, const char * slaveName, int isSafe); /* 97 */ - Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ - Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ - void (*tcl_DeleteAssocData) (Tcl_Interp * interp, const char * name); /* 100 */ - void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ - void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ - int (*tcl_DeleteCommand) (Tcl_Interp * interp, const char * cmdName); /* 103 */ - int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ - void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ - void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ - void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ - void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ - void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ - void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* MACOSX */ - void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ - void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ - void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ - int (*tcl_DoOneEvent) (int flags); /* 115 */ - void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ - char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, const char * bytes, int length); /* 117 */ - char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, const char * element); /* 118 */ - void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ - void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ - void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ - void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ - void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ - void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ - void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ - int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ - CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ - CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ - int (*tcl_Eval) (Tcl_Interp * interp, const char * script); /* 129 */ - int (*tcl_EvalFile) (Tcl_Interp * interp, const char * fileName); /* 130 */ - int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ - void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ - void (*tcl_Exit) (int status); /* 133 */ - int (*tcl_ExposeCommand) (Tcl_Interp * interp, const char * hiddenCmdToken, const char * cmdName); /* 134 */ - int (*tcl_ExprBoolean) (Tcl_Interp * interp, const char * expr, int * ptr); /* 135 */ - int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ - int (*tcl_ExprDouble) (Tcl_Interp * interp, const char * expr, double * ptr); /* 137 */ - int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ - int (*tcl_ExprLong) (Tcl_Interp * interp, const char * expr, long * ptr); /* 139 */ - int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ - int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ - int (*tcl_ExprString) (Tcl_Interp * interp, const char * expr); /* 142 */ - void (*tcl_Finalize) (void); /* 143 */ - void (*tcl_FindExecutable) (const char * argv0); /* 144 */ - Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ - int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ - void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ - int (*tcl_GetAlias) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ - int (*tcl_GetAliasObj) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ - ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ - Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, const char * chanName, int * modePtr); /* 151 */ - int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ - int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ - ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ - int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ - CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ - int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, Tcl_DString * dsPtr); /* 157 */ - CONST86 Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ - int (*tcl_GetCommandInfo) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ - CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ - int (*tcl_GetErrno) (void); /* 161 */ - CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ - int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ - Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ - const char * (*tcl_GetNameOfExecutable) (void); /* 165 */ - Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved167; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* MACOSX */ - Tcl_PathType (*tcl_GetPathType) (const char * path); /* 168 */ - int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ - int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ - int (*tcl_GetServiceMode) (void); /* 171 */ - Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, const char * slaveName); /* 172 */ - Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ - CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ - CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 175 */ - CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 176 */ - int (*tcl_GlobalEval) (Tcl_Interp * interp, const char * command); /* 177 */ - int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ - int (*tcl_HideCommand) (Tcl_Interp * interp, const char * cmdName, const char * hiddenCmdToken); /* 179 */ - int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ - void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ - int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ - int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ - int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ - int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ - char * (*tcl_JoinPath) (int argc, CONST84 char *const * argv, Tcl_DString * resultPtr); /* 186 */ - int (*tcl_LinkVar) (Tcl_Interp * interp, const char * varName, char * addr, int type); /* 187 */ - void *reserved188; - Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ - int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ - Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ - char * (*tcl_Merge) (int argc, CONST84 char *const * argv); /* 192 */ - Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ - void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ - Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ - Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* MACOSX */ - Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */ - Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */ - Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ - void (*tcl_Preserve) (ClientData data); /* 201 */ - void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ - int (*tcl_PutEnv) (const char * assignment); /* 203 */ - CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ - void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ - int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* MACOSX */ - int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */ - int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ - void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (const Tcl_ObjType * typePtr); /* 211 */ - Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, const char * pattern); /* 212 */ - int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, const char * text, const char * start); /* 213 */ - int (*tcl_RegExpMatch) (Tcl_Interp * interp, const char * text, const char * pattern); /* 214 */ - void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ - void (*tcl_Release) (ClientData clientData); /* 216 */ - void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ - int (*tcl_ScanElement) (const char * str, int * flagPtr); /* 218 */ - int (*tcl_ScanCountedElement) (const char * str, int length, int * flagPtr); /* 219 */ - int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ - int (*tcl_ServiceAll) (void); /* 221 */ - int (*tcl_ServiceEvent) (int flags); /* 222 */ - void (*tcl_SetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ - void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ - int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, const char * newValue); /* 225 */ - int (*tcl_SetCommandInfo) (Tcl_Interp * interp, const char * cmdName, const Tcl_CmdInfo * infoPtr); /* 226 */ - void (*tcl_SetErrno) (int err); /* 227 */ - void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (const Tcl_Time * timePtr); /* 229 */ - void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ - int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ - void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ - int (*tcl_SetServiceMode) (int mode); /* 233 */ - void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ - void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ - void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ - CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, const char * varName, const char * newValue, int flags); /* 237 */ - CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, const char * newValue, int flags); /* 238 */ - CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ - CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ - void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ - int (*tcl_SplitList) (Tcl_Interp * interp, const char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ - void (*tcl_SplitPath) (const char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ - void (*tcl_StaticPackage) (Tcl_Interp * interp, const char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ - int (*tcl_StringMatch) (const char * str, const char * pattern); /* 245 */ - int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ - int (*tcl_TraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ - int (*tcl_TraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ - char * (*tcl_TranslateFileName) (Tcl_Interp * interp, const char * name, Tcl_DString * bufferPtr); /* 249 */ - int (*tcl_Ungets) (Tcl_Channel chan, const char * str, int len, int atHead); /* 250 */ - void (*tcl_UnlinkVar) (Tcl_Interp * interp, const char * varName); /* 251 */ - int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ - int (*tcl_UnsetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 253 */ - int (*tcl_UnsetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 254 */ - void (*tcl_UntraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ - void (*tcl_UntraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ - void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, const char * varName); /* 257 */ - int (*tcl_UpVar) (Tcl_Interp * interp, const char * frameName, const char * varName, const char * localName, int flags); /* 258 */ - int (*tcl_UpVar2) (Tcl_Interp * interp, const char * frameName, const char * part1, const char * part2, const char * localName, int flags); /* 259 */ - int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ - ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ - ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ - int (*tcl_Write) (Tcl_Channel chan, const char * s, int slen); /* 263 */ - void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], const char * message); /* 264 */ - int (*tcl_DumpActiveMemory) (const char * fileName); /* 265 */ - void (*tcl_ValidateAllMemory) (const char * file, int line); /* 266 */ - void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ - void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ - char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ - CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, const char * start, CONST84 char ** termPtr); /* 270 */ - CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 271 */ - CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 272 */ - int (*tcl_PkgProvide) (Tcl_Interp * interp, const char * name, const char * version); /* 273 */ - CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 274 */ - void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ - int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ - Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ - void (*tcl_PanicVA) (const char * format, va_list argList); /* 278 */ - void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ - void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ - Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, const Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ - int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ - Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ - void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ - void *reserved285; - void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ - Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ - void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ - void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ - void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ - int (*tcl_EvalEx) (Tcl_Interp * interp, const char * script, int numBytes, int flags); /* 291 */ - int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ - int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ - void (*tcl_ExitThread) (int status); /* 294 */ - int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ - char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ - void (*tcl_FinalizeThread) (void); /* 297 */ - void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ - void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ - Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ - Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, const char * name); /* 301 */ - CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ - void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ - int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const VOID * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ - VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ - Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 306 */ - ClientData (*tcl_InitNotifier) (void); /* 307 */ - void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ - void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ - void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, const Tcl_Time * timePtr); /* 311 */ - int (*tcl_NumUtfChars) (const char * src, int length); /* 312 */ - int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ - void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ - void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ - int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, const char * name); /* 316 */ - Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ - void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ - void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event * evPtr, Tcl_QueuePosition position); /* 319 */ - Tcl_UniChar (*tcl_UniCharAtIndex) (const char * src, int index); /* 320 */ - Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ - Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ - Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ - int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ - CONST84_RETURN char * (*tcl_UtfAtIndex) (const char * src, int index); /* 325 */ - int (*tcl_UtfCharComplete) (const char * src, int length); /* 326 */ - int (*tcl_UtfBackslash) (const char * src, int * readPtr, char * dst); /* 327 */ - CONST84_RETURN char * (*tcl_UtfFindFirst) (const char * src, int ch); /* 328 */ - CONST84_RETURN char * (*tcl_UtfFindLast) (const char * src, int ch); /* 329 */ - CONST84_RETURN char * (*tcl_UtfNext) (const char * src); /* 330 */ - CONST84_RETURN char * (*tcl_UtfPrev) (const char * src, const char * start); /* 331 */ - int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ - char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ - int (*tcl_UtfToLower) (char * src); /* 334 */ - int (*tcl_UtfToTitle) (char * src); /* 335 */ - int (*tcl_UtfToUniChar) (const char * src, Tcl_UniChar * chPtr); /* 336 */ - int (*tcl_UtfToUpper) (char * src); /* 337 */ - int (*tcl_WriteChars) (Tcl_Channel chan, const char * src, int srcLen); /* 338 */ - int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ - char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ - CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ - void (*tcl_SetDefaultEncodingDir) (const char * path); /* 342 */ - void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ - void (*tcl_ServiceModeHook) (int mode); /* 344 */ - int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ - int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ - int (*tcl_UniCharIsDigit) (int ch); /* 347 */ - int (*tcl_UniCharIsLower) (int ch); /* 348 */ - int (*tcl_UniCharIsSpace) (int ch); /* 349 */ - int (*tcl_UniCharIsUpper) (int ch); /* 350 */ - int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ - int (*tcl_UniCharLen) (const Tcl_UniChar * uniStr); /* 352 */ - int (*tcl_UniCharNcmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 353 */ - char * (*tcl_UniCharToUtfDString) (const Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ - Tcl_UniChar * (*tcl_UtfToUniCharDString) (const char * src, int length, Tcl_DString * dsPtr); /* 355 */ - Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ - Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ - void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ - void (*tcl_LogCommandInfo) (Tcl_Interp * interp, const char * script, const char * command, int length); /* 359 */ - int (*tcl_ParseBraces) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ - int (*tcl_ParseCommand) (Tcl_Interp * interp, const char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ - int (*tcl_ParseExpr) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ - int (*tcl_ParseQuotedString) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ - int (*tcl_ParseVarName) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ - char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ - int (*tcl_Chdir) (const char * dirName); /* 366 */ - int (*tcl_Access) (const char * path, int mode); /* 367 */ - int (*tcl_Stat) (const char * path, struct stat * bufPtr); /* 368 */ - int (*tcl_UtfNcmp) (const char * s1, const char * s2, unsigned long n); /* 369 */ - int (*tcl_UtfNcasecmp) (const char * s1, const char * s2, unsigned long n); /* 370 */ - int (*tcl_StringCaseMatch) (const char * str, const char * pattern, int nocase); /* 371 */ - int (*tcl_UniCharIsControl) (int ch); /* 372 */ - int (*tcl_UniCharIsGraph) (int ch); /* 373 */ - int (*tcl_UniCharIsPrint) (int ch); /* 374 */ - int (*tcl_UniCharIsPunct) (int ch); /* 375 */ - int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ - void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ - Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar * unicode, int numChars); /* 378 */ - void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int numChars); /* 379 */ - int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ - Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ - Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ - Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ - void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int length); /* 384 */ - int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ - void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ - Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ - int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ - int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, const char * pattern); /* 389 */ - int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 390 */ - void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ - void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ - int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ - int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ - int (*tcl_WriteRaw) (Tcl_Channel chan, const char * src, int srcLen); /* 395 */ - Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ - int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ - CONST84_RETURN char * (*tcl_ChannelName) (const Tcl_ChannelType * chanTypePtr); /* 398 */ - Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType * chanTypePtr); /* 399 */ - Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType * chanTypePtr); /* 400 */ - Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (const Tcl_ChannelType * chanTypePtr); /* 401 */ - Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType * chanTypePtr); /* 402 */ - Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType * chanTypePtr); /* 403 */ - Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType * chanTypePtr); /* 404 */ - Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 405 */ - Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 406 */ - Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 407 */ - Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType * chanTypePtr); /* 408 */ - Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType * chanTypePtr); /* 409 */ - Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType * chanTypePtr); /* 410 */ - Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType * chanTypePtr); /* 411 */ - int (*tcl_JoinThread) (Tcl_ThreadId threadId, int * result); /* 412 */ - int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ - int (*tcl_IsChannelRegistered) (Tcl_Interp * interp, Tcl_Channel channel); /* 414 */ - void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ - void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ - void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ - int (*tcl_IsChannelExisting) (const char * channelName); /* 418 */ - int (*tcl_UniCharNcasecmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 419 */ - int (*tcl_UniCharCaseMatch) (const Tcl_UniChar * uniStr, const Tcl_UniChar * uniPattern, int nocase); /* 420 */ - Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, const char * key); /* 421 */ - Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, const char * key, int * newPtr); /* 422 */ - void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, const Tcl_HashKeyType * typePtr); /* 423 */ - void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ - ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ - int (*tcl_TraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ - void (*tcl_UntraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ - char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ - char * (*tcl_AttemptDbCkalloc) (unsigned int size, const char * file, int line); /* 429 */ - char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ - char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 431 */ - int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ - Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ - Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ - int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, const char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ - Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, const char * pattern); /* 436 */ - Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ - int (*tcl_DetachChannel) (Tcl_Interp * interp, Tcl_Channel channel); /* 438 */ - int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ - int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ - int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ - int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ - int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ - int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * sym1, const char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ - int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, const char * pattern, Tcl_GlobTypeData * types); /* 445 */ - Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ - int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ - int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ - int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ - int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ - int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ - int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ - const char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ - int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ - int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ - Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * modeString, int permissions); /* 456 */ - Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ - int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ - int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ - Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ - Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj * pathPtr, int * lenPtr); /* 461 */ - int (*tcl_FSEqualPaths) (Tcl_Obj * firstPtr, Tcl_Obj * secondPtr); /* 462 */ - Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 463 */ - Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj * pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ - Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 466 */ - int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem * fromFilesystem, ClientData clientData); /* 468 */ - const char * (*tcl_FSGetNativePath) (Tcl_Obj * pathPtr); /* 469 */ - Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj * pathPtr); /* 470 */ - Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj * pathPtr); /* 471 */ - Tcl_Obj * (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (const Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (const Tcl_Filesystem * fsPtr); /* 475 */ - const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 476 */ - CONST86 Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj * pathPtr); /* 477 */ - Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ - int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (const Tcl_Filesystem * fsPtr); /* 480 */ - int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ - void (*tcl_GetTime) (Tcl_Time * timeBuf); /* 482 */ - Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp * interp, int level, int flags, Tcl_CmdObjTraceProc * objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc * delProc); /* 483 */ - int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo * infoPtr); /* 484 */ - int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo * infoPtr); /* 485 */ - Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char * file, int line); /* 486 */ - int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ - Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ - void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ - Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ - Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ - Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ - Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 493 */ - int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ - int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ - int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ - int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ - int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ - void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ - void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ - int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); /* 501 */ - int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv); /* 502 */ - Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ - Tcl_Obj * (*tcl_DbNewDictObj) (const char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp * interp, const char * pkgName, const Tcl_Config * configuration, const char * valEncoding); /* 505 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 509 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 510 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 511 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ - int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, const char * encodingName); /* 518 */ - Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ - void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ - void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ - int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ - int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ - int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ - void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ - void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ - void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ - int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ - int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ - void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ - void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ - int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ - void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ - int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ - Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ - int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ - void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ - int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ - Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ - int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ - Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, const char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ - Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ - int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ - int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ - int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ - int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ - int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ - int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ - int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ - int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ - int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ - void (*tcl_SetTimeProc) (Tcl_GetTimeProc * getProc, Tcl_ScaleTimeProc * scaleProc, ClientData clientData); /* 552 */ - void (*tcl_QueryTimeProc) (Tcl_GetTimeProc ** getProc, Tcl_ScaleTimeProc ** scaleProc, ClientData * clientData); /* 553 */ - Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType * chanTypePtr); /* 554 */ - Tcl_Obj * (*tcl_NewBignumObj) (mp_int * value); /* 555 */ - Tcl_Obj * (*tcl_DbNewBignumObj) (mp_int * value, const char * file, int line); /* 556 */ - void (*tcl_SetBignumObj) (Tcl_Obj * obj, mp_int * value); /* 557 */ - int (*tcl_GetBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 558 */ - int (*tcl_TakeBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 559 */ - int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ - Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType * chanTypePtr); /* 561 */ - void (*tcl_SetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj * msg); /* 562 */ - void (*tcl_GetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj ** msg); /* 563 */ - void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj * msg); /* 564 */ - void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj ** msg); /* 565 */ - int (*tcl_InitBignumFromDouble) (Tcl_Interp * interp, double initval, mp_int * toInit); /* 566 */ - Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ - int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ - int (*tcl_GetEncodingFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); /* 569 */ - Tcl_Obj * (*tcl_GetEncodingSearchPath) (void); /* 570 */ - int (*tcl_SetEncodingSearchPath) (Tcl_Obj * searchPath); /* 571 */ - const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString * bufPtr); /* 572 */ - int (*tcl_PkgRequireProc) (Tcl_Interp * interp, const char * name, int objc, Tcl_Obj *const objv[], ClientData * clientDataPtr); /* 573 */ - void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ - void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, const char * bytes, int length, int limit, const char * ellipsis); /* 575 */ - Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj *const objv[]); /* 576 */ - int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj *const objv[]); /* 577 */ - Tcl_Obj * (*tcl_ObjPrintf) (const char * format, ...); /* 578 */ - void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, const char * format, ...); /* 579 */ - int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ - int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ - int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 582 */ - Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ - int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 584 */ - int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 585 */ - int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); /* 586 */ - void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 588 */ - unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statPtr); /* 589 */ - unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statPtr); /* 590 */ - unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statPtr); /* 591 */ - int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statPtr); /* 592 */ - int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statPtr); /* 593 */ - int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statPtr); /* 594 */ - int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statPtr); /* 595 */ - Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statPtr); /* 596 */ - Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statPtr); /* 597 */ - Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statPtr); /* 598 */ - Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statPtr); /* 599 */ - Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statPtr); /* 600 */ - unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ - int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ - int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ - int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ - int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ - void (*tcl_SetErrorLine) (Tcl_Interp * interp, int lineNum); /* 606 */ - void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ - int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ - void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ - int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */ - int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */ - unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const char * buf, int len); /* 612 */ - unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const char * buf, int len); /* 613 */ - int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ - Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ - int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ - int (*tcl_ZlibStreamAdler32) (Tcl_ZlibStream zshandle); /* 617 */ - int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int flush); /* 618 */ - int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ - int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ - int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */ - void (*tcl_SetStartupScript) (Tcl_Obj * path, const char * encoding); /* 622 */ - Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ -} TclStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern const TclStubs *tclStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef Tcl_PkgProvideEx -#define Tcl_PkgProvideEx \ - (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ -#endif -#ifndef Tcl_PkgRequireEx -#define Tcl_PkgRequireEx \ - (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ -#endif -#ifndef Tcl_Panic -#define Tcl_Panic \ - (tclStubsPtr->tcl_Panic) /* 2 */ -#endif -#ifndef Tcl_Alloc -#define Tcl_Alloc \ - (tclStubsPtr->tcl_Alloc) /* 3 */ -#endif -#ifndef Tcl_Free -#define Tcl_Free \ - (tclStubsPtr->tcl_Free) /* 4 */ -#endif -#ifndef Tcl_Realloc -#define Tcl_Realloc \ - (tclStubsPtr->tcl_Realloc) /* 5 */ -#endif -#ifndef Tcl_DbCkalloc -#define Tcl_DbCkalloc \ - (tclStubsPtr->tcl_DbCkalloc) /* 6 */ -#endif -#ifndef Tcl_DbCkfree -#define Tcl_DbCkfree \ - (tclStubsPtr->tcl_DbCkfree) /* 7 */ -#endif -#ifndef Tcl_DbCkrealloc -#define Tcl_DbCkrealloc \ - (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer -#define Tcl_SetTimer \ - (tclStubsPtr->tcl_SetTimer) /* 11 */ -#endif -#ifndef Tcl_Sleep -#define Tcl_Sleep \ - (tclStubsPtr->tcl_Sleep) /* 12 */ -#endif -#ifndef Tcl_WaitForEvent -#define Tcl_WaitForEvent \ - (tclStubsPtr->tcl_WaitForEvent) /* 13 */ -#endif -#ifndef Tcl_AppendAllObjTypes -#define Tcl_AppendAllObjTypes \ - (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ -#endif -#ifndef Tcl_AppendStringsToObj -#define Tcl_AppendStringsToObj \ - (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ -#endif -#ifndef Tcl_AppendToObj -#define Tcl_AppendToObj \ - (tclStubsPtr->tcl_AppendToObj) /* 16 */ -#endif -#ifndef Tcl_ConcatObj -#define Tcl_ConcatObj \ - (tclStubsPtr->tcl_ConcatObj) /* 17 */ -#endif -#ifndef Tcl_ConvertToType -#define Tcl_ConvertToType \ - (tclStubsPtr->tcl_ConvertToType) /* 18 */ -#endif -#ifndef Tcl_DbDecrRefCount -#define Tcl_DbDecrRefCount \ - (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ -#endif -#ifndef Tcl_DbIncrRefCount -#define Tcl_DbIncrRefCount \ - (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ -#endif -#ifndef Tcl_DbIsShared -#define Tcl_DbIsShared \ - (tclStubsPtr->tcl_DbIsShared) /* 21 */ -#endif -#ifndef Tcl_DbNewBooleanObj -#define Tcl_DbNewBooleanObj \ - (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ -#endif -#ifndef Tcl_DbNewByteArrayObj -#define Tcl_DbNewByteArrayObj \ - (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ -#endif -#ifndef Tcl_DbNewDoubleObj -#define Tcl_DbNewDoubleObj \ - (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ -#endif -#ifndef Tcl_DbNewListObj -#define Tcl_DbNewListObj \ - (tclStubsPtr->tcl_DbNewListObj) /* 25 */ -#endif -#ifndef Tcl_DbNewLongObj -#define Tcl_DbNewLongObj \ - (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ -#endif -#ifndef Tcl_DbNewObj -#define Tcl_DbNewObj \ - (tclStubsPtr->tcl_DbNewObj) /* 27 */ -#endif -#ifndef Tcl_DbNewStringObj -#define Tcl_DbNewStringObj \ - (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ -#endif -#ifndef Tcl_DuplicateObj -#define Tcl_DuplicateObj \ - (tclStubsPtr->tcl_DuplicateObj) /* 29 */ -#endif -#ifndef TclFreeObj -#define TclFreeObj \ - (tclStubsPtr->tclFreeObj) /* 30 */ -#endif -#ifndef Tcl_GetBoolean -#define Tcl_GetBoolean \ - (tclStubsPtr->tcl_GetBoolean) /* 31 */ -#endif -#ifndef Tcl_GetBooleanFromObj -#define Tcl_GetBooleanFromObj \ - (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ -#endif -#ifndef Tcl_GetByteArrayFromObj -#define Tcl_GetByteArrayFromObj \ - (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ -#endif -#ifndef Tcl_GetDouble -#define Tcl_GetDouble \ - (tclStubsPtr->tcl_GetDouble) /* 34 */ -#endif -#ifndef Tcl_GetDoubleFromObj -#define Tcl_GetDoubleFromObj \ - (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ -#endif -#ifndef Tcl_GetIndexFromObj -#define Tcl_GetIndexFromObj \ - (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ -#endif -#ifndef Tcl_GetInt -#define Tcl_GetInt \ - (tclStubsPtr->tcl_GetInt) /* 37 */ -#endif -#ifndef Tcl_GetIntFromObj -#define Tcl_GetIntFromObj \ - (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ -#endif -#ifndef Tcl_GetLongFromObj -#define Tcl_GetLongFromObj \ - (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ -#endif -#ifndef Tcl_GetObjType -#define Tcl_GetObjType \ - (tclStubsPtr->tcl_GetObjType) /* 40 */ -#endif -#ifndef Tcl_GetStringFromObj -#define Tcl_GetStringFromObj \ - (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ -#endif -#ifndef Tcl_InvalidateStringRep -#define Tcl_InvalidateStringRep \ - (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ -#endif -#ifndef Tcl_ListObjAppendList -#define Tcl_ListObjAppendList \ - (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ -#endif -#ifndef Tcl_ListObjAppendElement -#define Tcl_ListObjAppendElement \ - (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ -#endif -#ifndef Tcl_ListObjGetElements -#define Tcl_ListObjGetElements \ - (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ -#endif -#ifndef Tcl_ListObjIndex -#define Tcl_ListObjIndex \ - (tclStubsPtr->tcl_ListObjIndex) /* 46 */ -#endif -#ifndef Tcl_ListObjLength -#define Tcl_ListObjLength \ - (tclStubsPtr->tcl_ListObjLength) /* 47 */ -#endif -#ifndef Tcl_ListObjReplace -#define Tcl_ListObjReplace \ - (tclStubsPtr->tcl_ListObjReplace) /* 48 */ -#endif -#ifndef Tcl_NewBooleanObj -#define Tcl_NewBooleanObj \ - (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ -#endif -#ifndef Tcl_NewByteArrayObj -#define Tcl_NewByteArrayObj \ - (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ -#endif -#ifndef Tcl_NewDoubleObj -#define Tcl_NewDoubleObj \ - (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ -#endif -#ifndef Tcl_NewIntObj -#define Tcl_NewIntObj \ - (tclStubsPtr->tcl_NewIntObj) /* 52 */ -#endif -#ifndef Tcl_NewListObj -#define Tcl_NewListObj \ - (tclStubsPtr->tcl_NewListObj) /* 53 */ -#endif -#ifndef Tcl_NewLongObj -#define Tcl_NewLongObj \ - (tclStubsPtr->tcl_NewLongObj) /* 54 */ -#endif -#ifndef Tcl_NewObj -#define Tcl_NewObj \ - (tclStubsPtr->tcl_NewObj) /* 55 */ -#endif -#ifndef Tcl_NewStringObj -#define Tcl_NewStringObj \ - (tclStubsPtr->tcl_NewStringObj) /* 56 */ -#endif -#ifndef Tcl_SetBooleanObj -#define Tcl_SetBooleanObj \ - (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ -#endif -#ifndef Tcl_SetByteArrayLength -#define Tcl_SetByteArrayLength \ - (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ -#endif -#ifndef Tcl_SetByteArrayObj -#define Tcl_SetByteArrayObj \ - (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ -#endif -#ifndef Tcl_SetDoubleObj -#define Tcl_SetDoubleObj \ - (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ -#endif -#ifndef Tcl_SetIntObj -#define Tcl_SetIntObj \ - (tclStubsPtr->tcl_SetIntObj) /* 61 */ -#endif -#ifndef Tcl_SetListObj -#define Tcl_SetListObj \ - (tclStubsPtr->tcl_SetListObj) /* 62 */ -#endif -#ifndef Tcl_SetLongObj -#define Tcl_SetLongObj \ - (tclStubsPtr->tcl_SetLongObj) /* 63 */ -#endif -#ifndef Tcl_SetObjLength -#define Tcl_SetObjLength \ - (tclStubsPtr->tcl_SetObjLength) /* 64 */ -#endif -#ifndef Tcl_SetStringObj -#define Tcl_SetStringObj \ - (tclStubsPtr->tcl_SetStringObj) /* 65 */ -#endif -#ifndef Tcl_AddErrorInfo -#define Tcl_AddErrorInfo \ - (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ -#endif -#ifndef Tcl_AddObjErrorInfo -#define Tcl_AddObjErrorInfo \ - (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ -#endif -#ifndef Tcl_AllowExceptions -#define Tcl_AllowExceptions \ - (tclStubsPtr->tcl_AllowExceptions) /* 68 */ -#endif -#ifndef Tcl_AppendElement -#define Tcl_AppendElement \ - (tclStubsPtr->tcl_AppendElement) /* 69 */ -#endif -#ifndef Tcl_AppendResult -#define Tcl_AppendResult \ - (tclStubsPtr->tcl_AppendResult) /* 70 */ -#endif -#ifndef Tcl_AsyncCreate -#define Tcl_AsyncCreate \ - (tclStubsPtr->tcl_AsyncCreate) /* 71 */ -#endif -#ifndef Tcl_AsyncDelete -#define Tcl_AsyncDelete \ - (tclStubsPtr->tcl_AsyncDelete) /* 72 */ -#endif -#ifndef Tcl_AsyncInvoke -#define Tcl_AsyncInvoke \ - (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ -#endif -#ifndef Tcl_AsyncMark -#define Tcl_AsyncMark \ - (tclStubsPtr->tcl_AsyncMark) /* 74 */ -#endif -#ifndef Tcl_AsyncReady -#define Tcl_AsyncReady \ - (tclStubsPtr->tcl_AsyncReady) /* 75 */ -#endif -#ifndef Tcl_BackgroundError -#define Tcl_BackgroundError \ - (tclStubsPtr->tcl_BackgroundError) /* 76 */ -#endif -#ifndef Tcl_Backslash -#define Tcl_Backslash \ - (tclStubsPtr->tcl_Backslash) /* 77 */ -#endif -#ifndef Tcl_BadChannelOption -#define Tcl_BadChannelOption \ - (tclStubsPtr->tcl_BadChannelOption) /* 78 */ -#endif -#ifndef Tcl_CallWhenDeleted -#define Tcl_CallWhenDeleted \ - (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ -#endif -#ifndef Tcl_CancelIdleCall -#define Tcl_CancelIdleCall \ - (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ -#endif -#ifndef Tcl_Close -#define Tcl_Close \ - (tclStubsPtr->tcl_Close) /* 81 */ -#endif -#ifndef Tcl_CommandComplete -#define Tcl_CommandComplete \ - (tclStubsPtr->tcl_CommandComplete) /* 82 */ -#endif -#ifndef Tcl_Concat -#define Tcl_Concat \ - (tclStubsPtr->tcl_Concat) /* 83 */ -#endif -#ifndef Tcl_ConvertElement -#define Tcl_ConvertElement \ - (tclStubsPtr->tcl_ConvertElement) /* 84 */ -#endif -#ifndef Tcl_ConvertCountedElement -#define Tcl_ConvertCountedElement \ - (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ -#endif -#ifndef Tcl_CreateAlias -#define Tcl_CreateAlias \ - (tclStubsPtr->tcl_CreateAlias) /* 86 */ -#endif -#ifndef Tcl_CreateAliasObj -#define Tcl_CreateAliasObj \ - (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ -#endif -#ifndef Tcl_CreateChannel -#define Tcl_CreateChannel \ - (tclStubsPtr->tcl_CreateChannel) /* 88 */ -#endif -#ifndef Tcl_CreateChannelHandler -#define Tcl_CreateChannelHandler \ - (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ -#endif -#ifndef Tcl_CreateCloseHandler -#define Tcl_CreateCloseHandler \ - (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ -#endif -#ifndef Tcl_CreateCommand -#define Tcl_CreateCommand \ - (tclStubsPtr->tcl_CreateCommand) /* 91 */ -#endif -#ifndef Tcl_CreateEventSource -#define Tcl_CreateEventSource \ - (tclStubsPtr->tcl_CreateEventSource) /* 92 */ -#endif -#ifndef Tcl_CreateExitHandler -#define Tcl_CreateExitHandler \ - (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ -#endif -#ifndef Tcl_CreateInterp -#define Tcl_CreateInterp \ - (tclStubsPtr->tcl_CreateInterp) /* 94 */ -#endif -#ifndef Tcl_CreateMathFunc -#define Tcl_CreateMathFunc \ - (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ -#endif -#ifndef Tcl_CreateObjCommand -#define Tcl_CreateObjCommand \ - (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ -#endif -#ifndef Tcl_CreateSlave -#define Tcl_CreateSlave \ - (tclStubsPtr->tcl_CreateSlave) /* 97 */ -#endif -#ifndef Tcl_CreateTimerHandler -#define Tcl_CreateTimerHandler \ - (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ -#endif -#ifndef Tcl_CreateTrace -#define Tcl_CreateTrace \ - (tclStubsPtr->tcl_CreateTrace) /* 99 */ -#endif -#ifndef Tcl_DeleteAssocData -#define Tcl_DeleteAssocData \ - (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ -#endif -#ifndef Tcl_DeleteChannelHandler -#define Tcl_DeleteChannelHandler \ - (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ -#endif -#ifndef Tcl_DeleteCloseHandler -#define Tcl_DeleteCloseHandler \ - (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ -#endif -#ifndef Tcl_DeleteCommand -#define Tcl_DeleteCommand \ - (tclStubsPtr->tcl_DeleteCommand) /* 103 */ -#endif -#ifndef Tcl_DeleteCommandFromToken -#define Tcl_DeleteCommandFromToken \ - (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ -#endif -#ifndef Tcl_DeleteEvents -#define Tcl_DeleteEvents \ - (tclStubsPtr->tcl_DeleteEvents) /* 105 */ -#endif -#ifndef Tcl_DeleteEventSource -#define Tcl_DeleteEventSource \ - (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ -#endif -#ifndef Tcl_DeleteExitHandler -#define Tcl_DeleteExitHandler \ - (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ -#endif -#ifndef Tcl_DeleteHashEntry -#define Tcl_DeleteHashEntry \ - (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ -#endif -#ifndef Tcl_DeleteHashTable -#define Tcl_DeleteHashTable \ - (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ -#endif -#ifndef Tcl_DeleteInterp -#define Tcl_DeleteInterp \ - (tclStubsPtr->tcl_DeleteInterp) /* 110 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler -#define Tcl_DeleteTimerHandler \ - (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ -#endif -#ifndef Tcl_DeleteTrace -#define Tcl_DeleteTrace \ - (tclStubsPtr->tcl_DeleteTrace) /* 113 */ -#endif -#ifndef Tcl_DontCallWhenDeleted -#define Tcl_DontCallWhenDeleted \ - (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ -#endif -#ifndef Tcl_DoOneEvent -#define Tcl_DoOneEvent \ - (tclStubsPtr->tcl_DoOneEvent) /* 115 */ -#endif -#ifndef Tcl_DoWhenIdle -#define Tcl_DoWhenIdle \ - (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ -#endif -#ifndef Tcl_DStringAppend -#define Tcl_DStringAppend \ - (tclStubsPtr->tcl_DStringAppend) /* 117 */ -#endif -#ifndef Tcl_DStringAppendElement -#define Tcl_DStringAppendElement \ - (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ -#endif -#ifndef Tcl_DStringEndSublist -#define Tcl_DStringEndSublist \ - (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ -#endif -#ifndef Tcl_DStringFree -#define Tcl_DStringFree \ - (tclStubsPtr->tcl_DStringFree) /* 120 */ -#endif -#ifndef Tcl_DStringGetResult -#define Tcl_DStringGetResult \ - (tclStubsPtr->tcl_DStringGetResult) /* 121 */ -#endif -#ifndef Tcl_DStringInit -#define Tcl_DStringInit \ - (tclStubsPtr->tcl_DStringInit) /* 122 */ -#endif -#ifndef Tcl_DStringResult -#define Tcl_DStringResult \ - (tclStubsPtr->tcl_DStringResult) /* 123 */ -#endif -#ifndef Tcl_DStringSetLength -#define Tcl_DStringSetLength \ - (tclStubsPtr->tcl_DStringSetLength) /* 124 */ -#endif -#ifndef Tcl_DStringStartSublist -#define Tcl_DStringStartSublist \ - (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ -#endif -#ifndef Tcl_Eof -#define Tcl_Eof \ - (tclStubsPtr->tcl_Eof) /* 126 */ -#endif -#ifndef Tcl_ErrnoId -#define Tcl_ErrnoId \ - (tclStubsPtr->tcl_ErrnoId) /* 127 */ -#endif -#ifndef Tcl_ErrnoMsg -#define Tcl_ErrnoMsg \ - (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ -#endif -#ifndef Tcl_Eval -#define Tcl_Eval \ - (tclStubsPtr->tcl_Eval) /* 129 */ -#endif -#ifndef Tcl_EvalFile -#define Tcl_EvalFile \ - (tclStubsPtr->tcl_EvalFile) /* 130 */ -#endif -#ifndef Tcl_EvalObj -#define Tcl_EvalObj \ - (tclStubsPtr->tcl_EvalObj) /* 131 */ -#endif -#ifndef Tcl_EventuallyFree -#define Tcl_EventuallyFree \ - (tclStubsPtr->tcl_EventuallyFree) /* 132 */ -#endif -#ifndef Tcl_Exit -#define Tcl_Exit \ - (tclStubsPtr->tcl_Exit) /* 133 */ -#endif -#ifndef Tcl_ExposeCommand -#define Tcl_ExposeCommand \ - (tclStubsPtr->tcl_ExposeCommand) /* 134 */ -#endif -#ifndef Tcl_ExprBoolean -#define Tcl_ExprBoolean \ - (tclStubsPtr->tcl_ExprBoolean) /* 135 */ -#endif -#ifndef Tcl_ExprBooleanObj -#define Tcl_ExprBooleanObj \ - (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ -#endif -#ifndef Tcl_ExprDouble -#define Tcl_ExprDouble \ - (tclStubsPtr->tcl_ExprDouble) /* 137 */ -#endif -#ifndef Tcl_ExprDoubleObj -#define Tcl_ExprDoubleObj \ - (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ -#endif -#ifndef Tcl_ExprLong -#define Tcl_ExprLong \ - (tclStubsPtr->tcl_ExprLong) /* 139 */ -#endif -#ifndef Tcl_ExprLongObj -#define Tcl_ExprLongObj \ - (tclStubsPtr->tcl_ExprLongObj) /* 140 */ -#endif -#ifndef Tcl_ExprObj -#define Tcl_ExprObj \ - (tclStubsPtr->tcl_ExprObj) /* 141 */ -#endif -#ifndef Tcl_ExprString -#define Tcl_ExprString \ - (tclStubsPtr->tcl_ExprString) /* 142 */ -#endif -#ifndef Tcl_Finalize -#define Tcl_Finalize \ - (tclStubsPtr->tcl_Finalize) /* 143 */ -#endif -#ifndef Tcl_FindExecutable -#define Tcl_FindExecutable \ - (tclStubsPtr->tcl_FindExecutable) /* 144 */ -#endif -#ifndef Tcl_FirstHashEntry -#define Tcl_FirstHashEntry \ - (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ -#endif -#ifndef Tcl_Flush -#define Tcl_Flush \ - (tclStubsPtr->tcl_Flush) /* 146 */ -#endif -#ifndef Tcl_FreeResult -#define Tcl_FreeResult \ - (tclStubsPtr->tcl_FreeResult) /* 147 */ -#endif -#ifndef Tcl_GetAlias -#define Tcl_GetAlias \ - (tclStubsPtr->tcl_GetAlias) /* 148 */ -#endif -#ifndef Tcl_GetAliasObj -#define Tcl_GetAliasObj \ - (tclStubsPtr->tcl_GetAliasObj) /* 149 */ -#endif -#ifndef Tcl_GetAssocData -#define Tcl_GetAssocData \ - (tclStubsPtr->tcl_GetAssocData) /* 150 */ -#endif -#ifndef Tcl_GetChannel -#define Tcl_GetChannel \ - (tclStubsPtr->tcl_GetChannel) /* 151 */ -#endif -#ifndef Tcl_GetChannelBufferSize -#define Tcl_GetChannelBufferSize \ - (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ -#endif -#ifndef Tcl_GetChannelHandle -#define Tcl_GetChannelHandle \ - (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ -#endif -#ifndef Tcl_GetChannelInstanceData -#define Tcl_GetChannelInstanceData \ - (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ -#endif -#ifndef Tcl_GetChannelMode -#define Tcl_GetChannelMode \ - (tclStubsPtr->tcl_GetChannelMode) /* 155 */ -#endif -#ifndef Tcl_GetChannelName -#define Tcl_GetChannelName \ - (tclStubsPtr->tcl_GetChannelName) /* 156 */ -#endif -#ifndef Tcl_GetChannelOption -#define Tcl_GetChannelOption \ - (tclStubsPtr->tcl_GetChannelOption) /* 157 */ -#endif -#ifndef Tcl_GetChannelType -#define Tcl_GetChannelType \ - (tclStubsPtr->tcl_GetChannelType) /* 158 */ -#endif -#ifndef Tcl_GetCommandInfo -#define Tcl_GetCommandInfo \ - (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ -#endif -#ifndef Tcl_GetCommandName -#define Tcl_GetCommandName \ - (tclStubsPtr->tcl_GetCommandName) /* 160 */ -#endif -#ifndef Tcl_GetErrno -#define Tcl_GetErrno \ - (tclStubsPtr->tcl_GetErrno) /* 161 */ -#endif -#ifndef Tcl_GetHostName -#define Tcl_GetHostName \ - (tclStubsPtr->tcl_GetHostName) /* 162 */ -#endif -#ifndef Tcl_GetInterpPath -#define Tcl_GetInterpPath \ - (tclStubsPtr->tcl_GetInterpPath) /* 163 */ -#endif -#ifndef Tcl_GetMaster -#define Tcl_GetMaster \ - (tclStubsPtr->tcl_GetMaster) /* 164 */ -#endif -#ifndef Tcl_GetNameOfExecutable -#define Tcl_GetNameOfExecutable \ - (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ -#endif -#ifndef Tcl_GetObjResult -#define Tcl_GetObjResult \ - (tclStubsPtr->tcl_GetObjResult) /* 166 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType -#define Tcl_GetPathType \ - (tclStubsPtr->tcl_GetPathType) /* 168 */ -#endif -#ifndef Tcl_Gets -#define Tcl_Gets \ - (tclStubsPtr->tcl_Gets) /* 169 */ -#endif -#ifndef Tcl_GetsObj -#define Tcl_GetsObj \ - (tclStubsPtr->tcl_GetsObj) /* 170 */ -#endif -#ifndef Tcl_GetServiceMode -#define Tcl_GetServiceMode \ - (tclStubsPtr->tcl_GetServiceMode) /* 171 */ -#endif -#ifndef Tcl_GetSlave -#define Tcl_GetSlave \ - (tclStubsPtr->tcl_GetSlave) /* 172 */ -#endif -#ifndef Tcl_GetStdChannel -#define Tcl_GetStdChannel \ - (tclStubsPtr->tcl_GetStdChannel) /* 173 */ -#endif -#ifndef Tcl_GetStringResult -#define Tcl_GetStringResult \ - (tclStubsPtr->tcl_GetStringResult) /* 174 */ -#endif -#ifndef Tcl_GetVar -#define Tcl_GetVar \ - (tclStubsPtr->tcl_GetVar) /* 175 */ -#endif -#ifndef Tcl_GetVar2 -#define Tcl_GetVar2 \ - (tclStubsPtr->tcl_GetVar2) /* 176 */ -#endif -#ifndef Tcl_GlobalEval -#define Tcl_GlobalEval \ - (tclStubsPtr->tcl_GlobalEval) /* 177 */ -#endif -#ifndef Tcl_GlobalEvalObj -#define Tcl_GlobalEvalObj \ - (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ -#endif -#ifndef Tcl_HideCommand -#define Tcl_HideCommand \ - (tclStubsPtr->tcl_HideCommand) /* 179 */ -#endif -#ifndef Tcl_Init -#define Tcl_Init \ - (tclStubsPtr->tcl_Init) /* 180 */ -#endif -#ifndef Tcl_InitHashTable -#define Tcl_InitHashTable \ - (tclStubsPtr->tcl_InitHashTable) /* 181 */ -#endif -#ifndef Tcl_InputBlocked -#define Tcl_InputBlocked \ - (tclStubsPtr->tcl_InputBlocked) /* 182 */ -#endif -#ifndef Tcl_InputBuffered -#define Tcl_InputBuffered \ - (tclStubsPtr->tcl_InputBuffered) /* 183 */ -#endif -#ifndef Tcl_InterpDeleted -#define Tcl_InterpDeleted \ - (tclStubsPtr->tcl_InterpDeleted) /* 184 */ -#endif -#ifndef Tcl_IsSafe -#define Tcl_IsSafe \ - (tclStubsPtr->tcl_IsSafe) /* 185 */ -#endif -#ifndef Tcl_JoinPath -#define Tcl_JoinPath \ - (tclStubsPtr->tcl_JoinPath) /* 186 */ -#endif -#ifndef Tcl_LinkVar -#define Tcl_LinkVar \ - (tclStubsPtr->tcl_LinkVar) /* 187 */ -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel -#define Tcl_MakeFileChannel \ - (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ -#endif -#ifndef Tcl_MakeSafe -#define Tcl_MakeSafe \ - (tclStubsPtr->tcl_MakeSafe) /* 190 */ -#endif -#ifndef Tcl_MakeTcpClientChannel -#define Tcl_MakeTcpClientChannel \ - (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ -#endif -#ifndef Tcl_Merge -#define Tcl_Merge \ - (tclStubsPtr->tcl_Merge) /* 192 */ -#endif -#ifndef Tcl_NextHashEntry -#define Tcl_NextHashEntry \ - (tclStubsPtr->tcl_NextHashEntry) /* 193 */ -#endif -#ifndef Tcl_NotifyChannel -#define Tcl_NotifyChannel \ - (tclStubsPtr->tcl_NotifyChannel) /* 194 */ -#endif -#ifndef Tcl_ObjGetVar2 -#define Tcl_ObjGetVar2 \ - (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ -#endif -#ifndef Tcl_ObjSetVar2 -#define Tcl_ObjSetVar2 \ - (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel -#define Tcl_OpenFileChannel \ - (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ -#endif -#ifndef Tcl_OpenTcpClient -#define Tcl_OpenTcpClient \ - (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ -#endif -#ifndef Tcl_OpenTcpServer -#define Tcl_OpenTcpServer \ - (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ -#endif -#ifndef Tcl_Preserve -#define Tcl_Preserve \ - (tclStubsPtr->tcl_Preserve) /* 201 */ -#endif -#ifndef Tcl_PrintDouble -#define Tcl_PrintDouble \ - (tclStubsPtr->tcl_PrintDouble) /* 202 */ -#endif -#ifndef Tcl_PutEnv -#define Tcl_PutEnv \ - (tclStubsPtr->tcl_PutEnv) /* 203 */ -#endif -#ifndef Tcl_PosixError -#define Tcl_PosixError \ - (tclStubsPtr->tcl_PosixError) /* 204 */ -#endif -#ifndef Tcl_QueueEvent -#define Tcl_QueueEvent \ - (tclStubsPtr->tcl_QueueEvent) /* 205 */ -#endif -#ifndef Tcl_Read -#define Tcl_Read \ - (tclStubsPtr->tcl_Read) /* 206 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval -#define Tcl_RecordAndEval \ - (tclStubsPtr->tcl_RecordAndEval) /* 208 */ -#endif -#ifndef Tcl_RecordAndEvalObj -#define Tcl_RecordAndEvalObj \ - (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ -#endif -#ifndef Tcl_RegisterChannel -#define Tcl_RegisterChannel \ - (tclStubsPtr->tcl_RegisterChannel) /* 210 */ -#endif -#ifndef Tcl_RegisterObjType -#define Tcl_RegisterObjType \ - (tclStubsPtr->tcl_RegisterObjType) /* 211 */ -#endif -#ifndef Tcl_RegExpCompile -#define Tcl_RegExpCompile \ - (tclStubsPtr->tcl_RegExpCompile) /* 212 */ -#endif -#ifndef Tcl_RegExpExec -#define Tcl_RegExpExec \ - (tclStubsPtr->tcl_RegExpExec) /* 213 */ -#endif -#ifndef Tcl_RegExpMatch -#define Tcl_RegExpMatch \ - (tclStubsPtr->tcl_RegExpMatch) /* 214 */ -#endif -#ifndef Tcl_RegExpRange -#define Tcl_RegExpRange \ - (tclStubsPtr->tcl_RegExpRange) /* 215 */ -#endif -#ifndef Tcl_Release -#define Tcl_Release \ - (tclStubsPtr->tcl_Release) /* 216 */ -#endif -#ifndef Tcl_ResetResult -#define Tcl_ResetResult \ - (tclStubsPtr->tcl_ResetResult) /* 217 */ -#endif -#ifndef Tcl_ScanElement -#define Tcl_ScanElement \ - (tclStubsPtr->tcl_ScanElement) /* 218 */ -#endif -#ifndef Tcl_ScanCountedElement -#define Tcl_ScanCountedElement \ - (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ -#endif -#ifndef Tcl_SeekOld -#define Tcl_SeekOld \ - (tclStubsPtr->tcl_SeekOld) /* 220 */ -#endif -#ifndef Tcl_ServiceAll -#define Tcl_ServiceAll \ - (tclStubsPtr->tcl_ServiceAll) /* 221 */ -#endif -#ifndef Tcl_ServiceEvent -#define Tcl_ServiceEvent \ - (tclStubsPtr->tcl_ServiceEvent) /* 222 */ -#endif -#ifndef Tcl_SetAssocData -#define Tcl_SetAssocData \ - (tclStubsPtr->tcl_SetAssocData) /* 223 */ -#endif -#ifndef Tcl_SetChannelBufferSize -#define Tcl_SetChannelBufferSize \ - (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ -#endif -#ifndef Tcl_SetChannelOption -#define Tcl_SetChannelOption \ - (tclStubsPtr->tcl_SetChannelOption) /* 225 */ -#endif -#ifndef Tcl_SetCommandInfo -#define Tcl_SetCommandInfo \ - (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ -#endif -#ifndef Tcl_SetErrno -#define Tcl_SetErrno \ - (tclStubsPtr->tcl_SetErrno) /* 227 */ -#endif -#ifndef Tcl_SetErrorCode -#define Tcl_SetErrorCode \ - (tclStubsPtr->tcl_SetErrorCode) /* 228 */ -#endif -#ifndef Tcl_SetMaxBlockTime -#define Tcl_SetMaxBlockTime \ - (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ -#endif -#ifndef Tcl_SetPanicProc -#define Tcl_SetPanicProc \ - (tclStubsPtr->tcl_SetPanicProc) /* 230 */ -#endif -#ifndef Tcl_SetRecursionLimit -#define Tcl_SetRecursionLimit \ - (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ -#endif -#ifndef Tcl_SetResult -#define Tcl_SetResult \ - (tclStubsPtr->tcl_SetResult) /* 232 */ -#endif -#ifndef Tcl_SetServiceMode -#define Tcl_SetServiceMode \ - (tclStubsPtr->tcl_SetServiceMode) /* 233 */ -#endif -#ifndef Tcl_SetObjErrorCode -#define Tcl_SetObjErrorCode \ - (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ -#endif -#ifndef Tcl_SetObjResult -#define Tcl_SetObjResult \ - (tclStubsPtr->tcl_SetObjResult) /* 235 */ -#endif -#ifndef Tcl_SetStdChannel -#define Tcl_SetStdChannel \ - (tclStubsPtr->tcl_SetStdChannel) /* 236 */ -#endif -#ifndef Tcl_SetVar -#define Tcl_SetVar \ - (tclStubsPtr->tcl_SetVar) /* 237 */ -#endif -#ifndef Tcl_SetVar2 -#define Tcl_SetVar2 \ - (tclStubsPtr->tcl_SetVar2) /* 238 */ -#endif -#ifndef Tcl_SignalId -#define Tcl_SignalId \ - (tclStubsPtr->tcl_SignalId) /* 239 */ -#endif -#ifndef Tcl_SignalMsg -#define Tcl_SignalMsg \ - (tclStubsPtr->tcl_SignalMsg) /* 240 */ -#endif -#ifndef Tcl_SourceRCFile -#define Tcl_SourceRCFile \ - (tclStubsPtr->tcl_SourceRCFile) /* 241 */ -#endif -#ifndef Tcl_SplitList -#define Tcl_SplitList \ - (tclStubsPtr->tcl_SplitList) /* 242 */ -#endif -#ifndef Tcl_SplitPath -#define Tcl_SplitPath \ - (tclStubsPtr->tcl_SplitPath) /* 243 */ -#endif -#ifndef Tcl_StaticPackage -#define Tcl_StaticPackage \ - (tclStubsPtr->tcl_StaticPackage) /* 244 */ -#endif -#ifndef Tcl_StringMatch -#define Tcl_StringMatch \ - (tclStubsPtr->tcl_StringMatch) /* 245 */ -#endif -#ifndef Tcl_TellOld -#define Tcl_TellOld \ - (tclStubsPtr->tcl_TellOld) /* 246 */ -#endif -#ifndef Tcl_TraceVar -#define Tcl_TraceVar \ - (tclStubsPtr->tcl_TraceVar) /* 247 */ -#endif -#ifndef Tcl_TraceVar2 -#define Tcl_TraceVar2 \ - (tclStubsPtr->tcl_TraceVar2) /* 248 */ -#endif -#ifndef Tcl_TranslateFileName -#define Tcl_TranslateFileName \ - (tclStubsPtr->tcl_TranslateFileName) /* 249 */ -#endif -#ifndef Tcl_Ungets -#define Tcl_Ungets \ - (tclStubsPtr->tcl_Ungets) /* 250 */ -#endif -#ifndef Tcl_UnlinkVar -#define Tcl_UnlinkVar \ - (tclStubsPtr->tcl_UnlinkVar) /* 251 */ -#endif -#ifndef Tcl_UnregisterChannel -#define Tcl_UnregisterChannel \ - (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ -#endif -#ifndef Tcl_UnsetVar -#define Tcl_UnsetVar \ - (tclStubsPtr->tcl_UnsetVar) /* 253 */ -#endif -#ifndef Tcl_UnsetVar2 -#define Tcl_UnsetVar2 \ - (tclStubsPtr->tcl_UnsetVar2) /* 254 */ -#endif -#ifndef Tcl_UntraceVar -#define Tcl_UntraceVar \ - (tclStubsPtr->tcl_UntraceVar) /* 255 */ -#endif -#ifndef Tcl_UntraceVar2 -#define Tcl_UntraceVar2 \ - (tclStubsPtr->tcl_UntraceVar2) /* 256 */ -#endif -#ifndef Tcl_UpdateLinkedVar -#define Tcl_UpdateLinkedVar \ - (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ -#endif -#ifndef Tcl_UpVar -#define Tcl_UpVar \ - (tclStubsPtr->tcl_UpVar) /* 258 */ -#endif -#ifndef Tcl_UpVar2 -#define Tcl_UpVar2 \ - (tclStubsPtr->tcl_UpVar2) /* 259 */ -#endif -#ifndef Tcl_VarEval -#define Tcl_VarEval \ - (tclStubsPtr->tcl_VarEval) /* 260 */ -#endif -#ifndef Tcl_VarTraceInfo -#define Tcl_VarTraceInfo \ - (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ -#endif -#ifndef Tcl_VarTraceInfo2 -#define Tcl_VarTraceInfo2 \ - (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ -#endif -#ifndef Tcl_Write -#define Tcl_Write \ - (tclStubsPtr->tcl_Write) /* 263 */ -#endif -#ifndef Tcl_WrongNumArgs -#define Tcl_WrongNumArgs \ - (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ -#endif -#ifndef Tcl_DumpActiveMemory -#define Tcl_DumpActiveMemory \ - (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ -#endif -#ifndef Tcl_ValidateAllMemory -#define Tcl_ValidateAllMemory \ - (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ -#endif -#ifndef Tcl_AppendResultVA -#define Tcl_AppendResultVA \ - (tclStubsPtr->tcl_AppendResultVA) /* 267 */ -#endif -#ifndef Tcl_AppendStringsToObjVA -#define Tcl_AppendStringsToObjVA \ - (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ -#endif -#ifndef Tcl_HashStats -#define Tcl_HashStats \ - (tclStubsPtr->tcl_HashStats) /* 269 */ -#endif -#ifndef Tcl_ParseVar -#define Tcl_ParseVar \ - (tclStubsPtr->tcl_ParseVar) /* 270 */ -#endif -#ifndef Tcl_PkgPresent -#define Tcl_PkgPresent \ - (tclStubsPtr->tcl_PkgPresent) /* 271 */ -#endif -#ifndef Tcl_PkgPresentEx -#define Tcl_PkgPresentEx \ - (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ -#endif -#ifndef Tcl_PkgProvide -#define Tcl_PkgProvide \ - (tclStubsPtr->tcl_PkgProvide) /* 273 */ -#endif -#ifndef Tcl_PkgRequire -#define Tcl_PkgRequire \ - (tclStubsPtr->tcl_PkgRequire) /* 274 */ -#endif -#ifndef Tcl_SetErrorCodeVA -#define Tcl_SetErrorCodeVA \ - (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ -#endif -#ifndef Tcl_VarEvalVA -#define Tcl_VarEvalVA \ - (tclStubsPtr->tcl_VarEvalVA) /* 276 */ -#endif -#ifndef Tcl_WaitPid -#define Tcl_WaitPid \ - (tclStubsPtr->tcl_WaitPid) /* 277 */ -#endif -#ifndef Tcl_PanicVA -#define Tcl_PanicVA \ - (tclStubsPtr->tcl_PanicVA) /* 278 */ -#endif -#ifndef Tcl_GetVersion -#define Tcl_GetVersion \ - (tclStubsPtr->tcl_GetVersion) /* 279 */ -#endif -#ifndef Tcl_InitMemory -#define Tcl_InitMemory \ - (tclStubsPtr->tcl_InitMemory) /* 280 */ -#endif -#ifndef Tcl_StackChannel -#define Tcl_StackChannel \ - (tclStubsPtr->tcl_StackChannel) /* 281 */ -#endif -#ifndef Tcl_UnstackChannel -#define Tcl_UnstackChannel \ - (tclStubsPtr->tcl_UnstackChannel) /* 282 */ -#endif -#ifndef Tcl_GetStackedChannel -#define Tcl_GetStackedChannel \ - (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ -#endif -#ifndef Tcl_SetMainLoop -#define Tcl_SetMainLoop \ - (tclStubsPtr->tcl_SetMainLoop) /* 284 */ -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj -#define Tcl_AppendObjToObj \ - (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ -#endif -#ifndef Tcl_CreateEncoding -#define Tcl_CreateEncoding \ - (tclStubsPtr->tcl_CreateEncoding) /* 287 */ -#endif -#ifndef Tcl_CreateThreadExitHandler -#define Tcl_CreateThreadExitHandler \ - (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ -#endif -#ifndef Tcl_DeleteThreadExitHandler -#define Tcl_DeleteThreadExitHandler \ - (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ -#endif -#ifndef Tcl_DiscardResult -#define Tcl_DiscardResult \ - (tclStubsPtr->tcl_DiscardResult) /* 290 */ -#endif -#ifndef Tcl_EvalEx -#define Tcl_EvalEx \ - (tclStubsPtr->tcl_EvalEx) /* 291 */ -#endif -#ifndef Tcl_EvalObjv -#define Tcl_EvalObjv \ - (tclStubsPtr->tcl_EvalObjv) /* 292 */ -#endif -#ifndef Tcl_EvalObjEx -#define Tcl_EvalObjEx \ - (tclStubsPtr->tcl_EvalObjEx) /* 293 */ -#endif -#ifndef Tcl_ExitThread -#define Tcl_ExitThread \ - (tclStubsPtr->tcl_ExitThread) /* 294 */ -#endif -#ifndef Tcl_ExternalToUtf -#define Tcl_ExternalToUtf \ - (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ -#endif -#ifndef Tcl_ExternalToUtfDString -#define Tcl_ExternalToUtfDString \ - (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ -#endif -#ifndef Tcl_FinalizeThread -#define Tcl_FinalizeThread \ - (tclStubsPtr->tcl_FinalizeThread) /* 297 */ -#endif -#ifndef Tcl_FinalizeNotifier -#define Tcl_FinalizeNotifier \ - (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ -#endif -#ifndef Tcl_FreeEncoding -#define Tcl_FreeEncoding \ - (tclStubsPtr->tcl_FreeEncoding) /* 299 */ -#endif -#ifndef Tcl_GetCurrentThread -#define Tcl_GetCurrentThread \ - (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ -#endif -#ifndef Tcl_GetEncoding -#define Tcl_GetEncoding \ - (tclStubsPtr->tcl_GetEncoding) /* 301 */ -#endif -#ifndef Tcl_GetEncodingName -#define Tcl_GetEncodingName \ - (tclStubsPtr->tcl_GetEncodingName) /* 302 */ -#endif -#ifndef Tcl_GetEncodingNames -#define Tcl_GetEncodingNames \ - (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ -#endif -#ifndef Tcl_GetIndexFromObjStruct -#define Tcl_GetIndexFromObjStruct \ - (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ -#endif -#ifndef Tcl_GetThreadData -#define Tcl_GetThreadData \ - (tclStubsPtr->tcl_GetThreadData) /* 305 */ -#endif -#ifndef Tcl_GetVar2Ex -#define Tcl_GetVar2Ex \ - (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ -#endif -#ifndef Tcl_InitNotifier -#define Tcl_InitNotifier \ - (tclStubsPtr->tcl_InitNotifier) /* 307 */ -#endif -#ifndef Tcl_MutexLock -#define Tcl_MutexLock \ - (tclStubsPtr->tcl_MutexLock) /* 308 */ -#endif -#ifndef Tcl_MutexUnlock -#define Tcl_MutexUnlock \ - (tclStubsPtr->tcl_MutexUnlock) /* 309 */ -#endif -#ifndef Tcl_ConditionNotify -#define Tcl_ConditionNotify \ - (tclStubsPtr->tcl_ConditionNotify) /* 310 */ -#endif -#ifndef Tcl_ConditionWait -#define Tcl_ConditionWait \ - (tclStubsPtr->tcl_ConditionWait) /* 311 */ -#endif -#ifndef Tcl_NumUtfChars -#define Tcl_NumUtfChars \ - (tclStubsPtr->tcl_NumUtfChars) /* 312 */ -#endif -#ifndef Tcl_ReadChars -#define Tcl_ReadChars \ - (tclStubsPtr->tcl_ReadChars) /* 313 */ -#endif -#ifndef Tcl_RestoreResult -#define Tcl_RestoreResult \ - (tclStubsPtr->tcl_RestoreResult) /* 314 */ -#endif -#ifndef Tcl_SaveResult -#define Tcl_SaveResult \ - (tclStubsPtr->tcl_SaveResult) /* 315 */ -#endif -#ifndef Tcl_SetSystemEncoding -#define Tcl_SetSystemEncoding \ - (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ -#endif -#ifndef Tcl_SetVar2Ex -#define Tcl_SetVar2Ex \ - (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ -#endif -#ifndef Tcl_ThreadAlert -#define Tcl_ThreadAlert \ - (tclStubsPtr->tcl_ThreadAlert) /* 318 */ -#endif -#ifndef Tcl_ThreadQueueEvent -#define Tcl_ThreadQueueEvent \ - (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ -#endif -#ifndef Tcl_UniCharAtIndex -#define Tcl_UniCharAtIndex \ - (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ -#endif -#ifndef Tcl_UniCharToLower -#define Tcl_UniCharToLower \ - (tclStubsPtr->tcl_UniCharToLower) /* 321 */ -#endif -#ifndef Tcl_UniCharToTitle -#define Tcl_UniCharToTitle \ - (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ -#endif -#ifndef Tcl_UniCharToUpper -#define Tcl_UniCharToUpper \ - (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ -#endif -#ifndef Tcl_UniCharToUtf -#define Tcl_UniCharToUtf \ - (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ -#endif -#ifndef Tcl_UtfAtIndex -#define Tcl_UtfAtIndex \ - (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ -#endif -#ifndef Tcl_UtfCharComplete -#define Tcl_UtfCharComplete \ - (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ -#endif -#ifndef Tcl_UtfBackslash -#define Tcl_UtfBackslash \ - (tclStubsPtr->tcl_UtfBackslash) /* 327 */ -#endif -#ifndef Tcl_UtfFindFirst -#define Tcl_UtfFindFirst \ - (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ -#endif -#ifndef Tcl_UtfFindLast -#define Tcl_UtfFindLast \ - (tclStubsPtr->tcl_UtfFindLast) /* 329 */ -#endif -#ifndef Tcl_UtfNext -#define Tcl_UtfNext \ - (tclStubsPtr->tcl_UtfNext) /* 330 */ -#endif -#ifndef Tcl_UtfPrev -#define Tcl_UtfPrev \ - (tclStubsPtr->tcl_UtfPrev) /* 331 */ -#endif -#ifndef Tcl_UtfToExternal -#define Tcl_UtfToExternal \ - (tclStubsPtr->tcl_UtfToExternal) /* 332 */ -#endif -#ifndef Tcl_UtfToExternalDString -#define Tcl_UtfToExternalDString \ - (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ -#endif -#ifndef Tcl_UtfToLower -#define Tcl_UtfToLower \ - (tclStubsPtr->tcl_UtfToLower) /* 334 */ -#endif -#ifndef Tcl_UtfToTitle -#define Tcl_UtfToTitle \ - (tclStubsPtr->tcl_UtfToTitle) /* 335 */ -#endif -#ifndef Tcl_UtfToUniChar -#define Tcl_UtfToUniChar \ - (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ -#endif -#ifndef Tcl_UtfToUpper -#define Tcl_UtfToUpper \ - (tclStubsPtr->tcl_UtfToUpper) /* 337 */ -#endif -#ifndef Tcl_WriteChars -#define Tcl_WriteChars \ - (tclStubsPtr->tcl_WriteChars) /* 338 */ -#endif -#ifndef Tcl_WriteObj -#define Tcl_WriteObj \ - (tclStubsPtr->tcl_WriteObj) /* 339 */ -#endif -#ifndef Tcl_GetString -#define Tcl_GetString \ - (tclStubsPtr->tcl_GetString) /* 340 */ -#endif -#ifndef Tcl_GetDefaultEncodingDir -#define Tcl_GetDefaultEncodingDir \ - (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ -#endif -#ifndef Tcl_SetDefaultEncodingDir -#define Tcl_SetDefaultEncodingDir \ - (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ -#endif -#ifndef Tcl_AlertNotifier -#define Tcl_AlertNotifier \ - (tclStubsPtr->tcl_AlertNotifier) /* 343 */ -#endif -#ifndef Tcl_ServiceModeHook -#define Tcl_ServiceModeHook \ - (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ -#endif -#ifndef Tcl_UniCharIsAlnum -#define Tcl_UniCharIsAlnum \ - (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ -#endif -#ifndef Tcl_UniCharIsAlpha -#define Tcl_UniCharIsAlpha \ - (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ -#endif -#ifndef Tcl_UniCharIsDigit -#define Tcl_UniCharIsDigit \ - (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ -#endif -#ifndef Tcl_UniCharIsLower -#define Tcl_UniCharIsLower \ - (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ -#endif -#ifndef Tcl_UniCharIsSpace -#define Tcl_UniCharIsSpace \ - (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ -#endif -#ifndef Tcl_UniCharIsUpper -#define Tcl_UniCharIsUpper \ - (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ -#endif -#ifndef Tcl_UniCharIsWordChar -#define Tcl_UniCharIsWordChar \ - (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ -#endif -#ifndef Tcl_UniCharLen -#define Tcl_UniCharLen \ - (tclStubsPtr->tcl_UniCharLen) /* 352 */ -#endif -#ifndef Tcl_UniCharNcmp -#define Tcl_UniCharNcmp \ - (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ -#endif -#ifndef Tcl_UniCharToUtfDString -#define Tcl_UniCharToUtfDString \ - (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ -#endif -#ifndef Tcl_UtfToUniCharDString -#define Tcl_UtfToUniCharDString \ - (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ -#endif -#ifndef Tcl_GetRegExpFromObj -#define Tcl_GetRegExpFromObj \ - (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ -#endif -#ifndef Tcl_EvalTokens -#define Tcl_EvalTokens \ - (tclStubsPtr->tcl_EvalTokens) /* 357 */ -#endif -#ifndef Tcl_FreeParse -#define Tcl_FreeParse \ - (tclStubsPtr->tcl_FreeParse) /* 358 */ -#endif -#ifndef Tcl_LogCommandInfo -#define Tcl_LogCommandInfo \ - (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ -#endif -#ifndef Tcl_ParseBraces -#define Tcl_ParseBraces \ - (tclStubsPtr->tcl_ParseBraces) /* 360 */ -#endif -#ifndef Tcl_ParseCommand -#define Tcl_ParseCommand \ - (tclStubsPtr->tcl_ParseCommand) /* 361 */ -#endif -#ifndef Tcl_ParseExpr -#define Tcl_ParseExpr \ - (tclStubsPtr->tcl_ParseExpr) /* 362 */ -#endif -#ifndef Tcl_ParseQuotedString -#define Tcl_ParseQuotedString \ - (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ -#endif -#ifndef Tcl_ParseVarName -#define Tcl_ParseVarName \ - (tclStubsPtr->tcl_ParseVarName) /* 364 */ -#endif -#ifndef Tcl_GetCwd -#define Tcl_GetCwd \ - (tclStubsPtr->tcl_GetCwd) /* 365 */ -#endif -#ifndef Tcl_Chdir -#define Tcl_Chdir \ - (tclStubsPtr->tcl_Chdir) /* 366 */ -#endif -#ifndef Tcl_Access -#define Tcl_Access \ - (tclStubsPtr->tcl_Access) /* 367 */ -#endif -#ifndef Tcl_Stat -#define Tcl_Stat \ - (tclStubsPtr->tcl_Stat) /* 368 */ -#endif -#ifndef Tcl_UtfNcmp -#define Tcl_UtfNcmp \ - (tclStubsPtr->tcl_UtfNcmp) /* 369 */ -#endif -#ifndef Tcl_UtfNcasecmp -#define Tcl_UtfNcasecmp \ - (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ -#endif -#ifndef Tcl_StringCaseMatch -#define Tcl_StringCaseMatch \ - (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ -#endif -#ifndef Tcl_UniCharIsControl -#define Tcl_UniCharIsControl \ - (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ -#endif -#ifndef Tcl_UniCharIsGraph -#define Tcl_UniCharIsGraph \ - (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ -#endif -#ifndef Tcl_UniCharIsPrint -#define Tcl_UniCharIsPrint \ - (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ -#endif -#ifndef Tcl_UniCharIsPunct -#define Tcl_UniCharIsPunct \ - (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ -#endif -#ifndef Tcl_RegExpExecObj -#define Tcl_RegExpExecObj \ - (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ -#endif -#ifndef Tcl_RegExpGetInfo -#define Tcl_RegExpGetInfo \ - (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ -#endif -#ifndef Tcl_NewUnicodeObj -#define Tcl_NewUnicodeObj \ - (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ -#endif -#ifndef Tcl_SetUnicodeObj -#define Tcl_SetUnicodeObj \ - (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ -#endif -#ifndef Tcl_GetCharLength -#define Tcl_GetCharLength \ - (tclStubsPtr->tcl_GetCharLength) /* 380 */ -#endif -#ifndef Tcl_GetUniChar -#define Tcl_GetUniChar \ - (tclStubsPtr->tcl_GetUniChar) /* 381 */ -#endif -#ifndef Tcl_GetUnicode -#define Tcl_GetUnicode \ - (tclStubsPtr->tcl_GetUnicode) /* 382 */ -#endif -#ifndef Tcl_GetRange -#define Tcl_GetRange \ - (tclStubsPtr->tcl_GetRange) /* 383 */ -#endif -#ifndef Tcl_AppendUnicodeToObj -#define Tcl_AppendUnicodeToObj \ - (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ -#endif -#ifndef Tcl_RegExpMatchObj -#define Tcl_RegExpMatchObj \ - (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ -#endif -#ifndef Tcl_SetNotifier -#define Tcl_SetNotifier \ - (tclStubsPtr->tcl_SetNotifier) /* 386 */ -#endif -#ifndef Tcl_GetAllocMutex -#define Tcl_GetAllocMutex \ - (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ -#endif -#ifndef Tcl_GetChannelNames -#define Tcl_GetChannelNames \ - (tclStubsPtr->tcl_GetChannelNames) /* 388 */ -#endif -#ifndef Tcl_GetChannelNamesEx -#define Tcl_GetChannelNamesEx \ - (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ -#endif -#ifndef Tcl_ProcObjCmd -#define Tcl_ProcObjCmd \ - (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ -#endif -#ifndef Tcl_ConditionFinalize -#define Tcl_ConditionFinalize \ - (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ -#endif -#ifndef Tcl_MutexFinalize -#define Tcl_MutexFinalize \ - (tclStubsPtr->tcl_MutexFinalize) /* 392 */ -#endif -#ifndef Tcl_CreateThread -#define Tcl_CreateThread \ - (tclStubsPtr->tcl_CreateThread) /* 393 */ -#endif -#ifndef Tcl_ReadRaw -#define Tcl_ReadRaw \ - (tclStubsPtr->tcl_ReadRaw) /* 394 */ -#endif -#ifndef Tcl_WriteRaw -#define Tcl_WriteRaw \ - (tclStubsPtr->tcl_WriteRaw) /* 395 */ -#endif -#ifndef Tcl_GetTopChannel -#define Tcl_GetTopChannel \ - (tclStubsPtr->tcl_GetTopChannel) /* 396 */ -#endif -#ifndef Tcl_ChannelBuffered -#define Tcl_ChannelBuffered \ - (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ -#endif -#ifndef Tcl_ChannelName -#define Tcl_ChannelName \ - (tclStubsPtr->tcl_ChannelName) /* 398 */ -#endif -#ifndef Tcl_ChannelVersion -#define Tcl_ChannelVersion \ - (tclStubsPtr->tcl_ChannelVersion) /* 399 */ -#endif -#ifndef Tcl_ChannelBlockModeProc -#define Tcl_ChannelBlockModeProc \ - (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ -#endif -#ifndef Tcl_ChannelCloseProc -#define Tcl_ChannelCloseProc \ - (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ -#endif -#ifndef Tcl_ChannelClose2Proc -#define Tcl_ChannelClose2Proc \ - (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ -#endif -#ifndef Tcl_ChannelInputProc -#define Tcl_ChannelInputProc \ - (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ -#endif -#ifndef Tcl_ChannelOutputProc -#define Tcl_ChannelOutputProc \ - (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ -#endif -#ifndef Tcl_ChannelSeekProc -#define Tcl_ChannelSeekProc \ - (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ -#endif -#ifndef Tcl_ChannelSetOptionProc -#define Tcl_ChannelSetOptionProc \ - (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ -#endif -#ifndef Tcl_ChannelGetOptionProc -#define Tcl_ChannelGetOptionProc \ - (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ -#endif -#ifndef Tcl_ChannelWatchProc -#define Tcl_ChannelWatchProc \ - (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ -#endif -#ifndef Tcl_ChannelGetHandleProc -#define Tcl_ChannelGetHandleProc \ - (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ -#endif -#ifndef Tcl_ChannelFlushProc -#define Tcl_ChannelFlushProc \ - (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ -#endif -#ifndef Tcl_ChannelHandlerProc -#define Tcl_ChannelHandlerProc \ - (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ -#endif -#ifndef Tcl_JoinThread -#define Tcl_JoinThread \ - (tclStubsPtr->tcl_JoinThread) /* 412 */ -#endif -#ifndef Tcl_IsChannelShared -#define Tcl_IsChannelShared \ - (tclStubsPtr->tcl_IsChannelShared) /* 413 */ -#endif -#ifndef Tcl_IsChannelRegistered -#define Tcl_IsChannelRegistered \ - (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ -#endif -#ifndef Tcl_CutChannel -#define Tcl_CutChannel \ - (tclStubsPtr->tcl_CutChannel) /* 415 */ -#endif -#ifndef Tcl_SpliceChannel -#define Tcl_SpliceChannel \ - (tclStubsPtr->tcl_SpliceChannel) /* 416 */ -#endif -#ifndef Tcl_ClearChannelHandlers -#define Tcl_ClearChannelHandlers \ - (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ -#endif -#ifndef Tcl_IsChannelExisting -#define Tcl_IsChannelExisting \ - (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ -#endif -#ifndef Tcl_UniCharNcasecmp -#define Tcl_UniCharNcasecmp \ - (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ -#endif -#ifndef Tcl_UniCharCaseMatch -#define Tcl_UniCharCaseMatch \ - (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ -#endif -#ifndef Tcl_FindHashEntry -#define Tcl_FindHashEntry \ - (tclStubsPtr->tcl_FindHashEntry) /* 421 */ -#endif -#ifndef Tcl_CreateHashEntry -#define Tcl_CreateHashEntry \ - (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ -#endif -#ifndef Tcl_InitCustomHashTable -#define Tcl_InitCustomHashTable \ - (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ -#endif -#ifndef Tcl_InitObjHashTable -#define Tcl_InitObjHashTable \ - (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ -#endif -#ifndef Tcl_CommandTraceInfo -#define Tcl_CommandTraceInfo \ - (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ -#endif -#ifndef Tcl_TraceCommand -#define Tcl_TraceCommand \ - (tclStubsPtr->tcl_TraceCommand) /* 426 */ -#endif -#ifndef Tcl_UntraceCommand -#define Tcl_UntraceCommand \ - (tclStubsPtr->tcl_UntraceCommand) /* 427 */ -#endif -#ifndef Tcl_AttemptAlloc -#define Tcl_AttemptAlloc \ - (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ -#endif -#ifndef Tcl_AttemptDbCkalloc -#define Tcl_AttemptDbCkalloc \ - (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ -#endif -#ifndef Tcl_AttemptRealloc -#define Tcl_AttemptRealloc \ - (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ -#endif -#ifndef Tcl_AttemptDbCkrealloc -#define Tcl_AttemptDbCkrealloc \ - (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ -#endif -#ifndef Tcl_AttemptSetObjLength -#define Tcl_AttemptSetObjLength \ - (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ -#endif -#ifndef Tcl_GetChannelThread -#define Tcl_GetChannelThread \ - (tclStubsPtr->tcl_GetChannelThread) /* 433 */ -#endif -#ifndef Tcl_GetUnicodeFromObj -#define Tcl_GetUnicodeFromObj \ - (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ -#endif -#ifndef Tcl_GetMathFuncInfo -#define Tcl_GetMathFuncInfo \ - (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ -#endif -#ifndef Tcl_ListMathFuncs -#define Tcl_ListMathFuncs \ - (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ -#endif -#ifndef Tcl_SubstObj -#define Tcl_SubstObj \ - (tclStubsPtr->tcl_SubstObj) /* 437 */ -#endif -#ifndef Tcl_DetachChannel -#define Tcl_DetachChannel \ - (tclStubsPtr->tcl_DetachChannel) /* 438 */ -#endif -#ifndef Tcl_IsStandardChannel -#define Tcl_IsStandardChannel \ - (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ -#endif -#ifndef Tcl_FSCopyFile -#define Tcl_FSCopyFile \ - (tclStubsPtr->tcl_FSCopyFile) /* 440 */ -#endif -#ifndef Tcl_FSCopyDirectory -#define Tcl_FSCopyDirectory \ - (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ -#endif -#ifndef Tcl_FSCreateDirectory -#define Tcl_FSCreateDirectory \ - (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ -#endif -#ifndef Tcl_FSDeleteFile -#define Tcl_FSDeleteFile \ - (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ -#endif -#ifndef Tcl_FSLoadFile -#define Tcl_FSLoadFile \ - (tclStubsPtr->tcl_FSLoadFile) /* 444 */ -#endif -#ifndef Tcl_FSMatchInDirectory -#define Tcl_FSMatchInDirectory \ - (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ -#endif -#ifndef Tcl_FSLink -#define Tcl_FSLink \ - (tclStubsPtr->tcl_FSLink) /* 446 */ -#endif -#ifndef Tcl_FSRemoveDirectory -#define Tcl_FSRemoveDirectory \ - (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ -#endif -#ifndef Tcl_FSRenameFile -#define Tcl_FSRenameFile \ - (tclStubsPtr->tcl_FSRenameFile) /* 448 */ -#endif -#ifndef Tcl_FSLstat -#define Tcl_FSLstat \ - (tclStubsPtr->tcl_FSLstat) /* 449 */ -#endif -#ifndef Tcl_FSUtime -#define Tcl_FSUtime \ - (tclStubsPtr->tcl_FSUtime) /* 450 */ -#endif -#ifndef Tcl_FSFileAttrsGet -#define Tcl_FSFileAttrsGet \ - (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ -#endif -#ifndef Tcl_FSFileAttrsSet -#define Tcl_FSFileAttrsSet \ - (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ -#endif -#ifndef Tcl_FSFileAttrStrings -#define Tcl_FSFileAttrStrings \ - (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ -#endif -#ifndef Tcl_FSStat -#define Tcl_FSStat \ - (tclStubsPtr->tcl_FSStat) /* 454 */ -#endif -#ifndef Tcl_FSAccess -#define Tcl_FSAccess \ - (tclStubsPtr->tcl_FSAccess) /* 455 */ -#endif -#ifndef Tcl_FSOpenFileChannel -#define Tcl_FSOpenFileChannel \ - (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ -#endif -#ifndef Tcl_FSGetCwd -#define Tcl_FSGetCwd \ - (tclStubsPtr->tcl_FSGetCwd) /* 457 */ -#endif -#ifndef Tcl_FSChdir -#define Tcl_FSChdir \ - (tclStubsPtr->tcl_FSChdir) /* 458 */ -#endif -#ifndef Tcl_FSConvertToPathType -#define Tcl_FSConvertToPathType \ - (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ -#endif -#ifndef Tcl_FSJoinPath -#define Tcl_FSJoinPath \ - (tclStubsPtr->tcl_FSJoinPath) /* 460 */ -#endif -#ifndef Tcl_FSSplitPath -#define Tcl_FSSplitPath \ - (tclStubsPtr->tcl_FSSplitPath) /* 461 */ -#endif -#ifndef Tcl_FSEqualPaths -#define Tcl_FSEqualPaths \ - (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ -#endif -#ifndef Tcl_FSGetNormalizedPath -#define Tcl_FSGetNormalizedPath \ - (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ -#endif -#ifndef Tcl_FSJoinToPath -#define Tcl_FSJoinToPath \ - (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ -#endif -#ifndef Tcl_FSGetInternalRep -#define Tcl_FSGetInternalRep \ - (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ -#endif -#ifndef Tcl_FSGetTranslatedPath -#define Tcl_FSGetTranslatedPath \ - (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ -#endif -#ifndef Tcl_FSEvalFile -#define Tcl_FSEvalFile \ - (tclStubsPtr->tcl_FSEvalFile) /* 467 */ -#endif -#ifndef Tcl_FSNewNativePath -#define Tcl_FSNewNativePath \ - (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ -#endif -#ifndef Tcl_FSGetNativePath -#define Tcl_FSGetNativePath \ - (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ -#endif -#ifndef Tcl_FSFileSystemInfo -#define Tcl_FSFileSystemInfo \ - (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ -#endif -#ifndef Tcl_FSPathSeparator -#define Tcl_FSPathSeparator \ - (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ -#endif -#ifndef Tcl_FSListVolumes -#define Tcl_FSListVolumes \ - (tclStubsPtr->tcl_FSListVolumes) /* 472 */ -#endif -#ifndef Tcl_FSRegister -#define Tcl_FSRegister \ - (tclStubsPtr->tcl_FSRegister) /* 473 */ -#endif -#ifndef Tcl_FSUnregister -#define Tcl_FSUnregister \ - (tclStubsPtr->tcl_FSUnregister) /* 474 */ -#endif -#ifndef Tcl_FSData -#define Tcl_FSData \ - (tclStubsPtr->tcl_FSData) /* 475 */ -#endif -#ifndef Tcl_FSGetTranslatedStringPath -#define Tcl_FSGetTranslatedStringPath \ - (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ -#endif -#ifndef Tcl_FSGetFileSystemForPath -#define Tcl_FSGetFileSystemForPath \ - (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ -#endif -#ifndef Tcl_FSGetPathType -#define Tcl_FSGetPathType \ - (tclStubsPtr->tcl_FSGetPathType) /* 478 */ -#endif -#ifndef Tcl_OutputBuffered -#define Tcl_OutputBuffered \ - (tclStubsPtr->tcl_OutputBuffered) /* 479 */ -#endif -#ifndef Tcl_FSMountsChanged -#define Tcl_FSMountsChanged \ - (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ -#endif -#ifndef Tcl_EvalTokensStandard -#define Tcl_EvalTokensStandard \ - (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ -#endif -#ifndef Tcl_GetTime -#define Tcl_GetTime \ - (tclStubsPtr->tcl_GetTime) /* 482 */ -#endif -#ifndef Tcl_CreateObjTrace -#define Tcl_CreateObjTrace \ - (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ -#endif -#ifndef Tcl_GetCommandInfoFromToken -#define Tcl_GetCommandInfoFromToken \ - (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ -#endif -#ifndef Tcl_SetCommandInfoFromToken -#define Tcl_SetCommandInfoFromToken \ - (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ -#endif -#ifndef Tcl_DbNewWideIntObj -#define Tcl_DbNewWideIntObj \ - (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ -#endif -#ifndef Tcl_GetWideIntFromObj -#define Tcl_GetWideIntFromObj \ - (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ -#endif -#ifndef Tcl_NewWideIntObj -#define Tcl_NewWideIntObj \ - (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ -#endif -#ifndef Tcl_SetWideIntObj -#define Tcl_SetWideIntObj \ - (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ -#endif -#ifndef Tcl_AllocStatBuf -#define Tcl_AllocStatBuf \ - (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ -#endif -#ifndef Tcl_Seek -#define Tcl_Seek \ - (tclStubsPtr->tcl_Seek) /* 491 */ -#endif -#ifndef Tcl_Tell -#define Tcl_Tell \ - (tclStubsPtr->tcl_Tell) /* 492 */ -#endif -#ifndef Tcl_ChannelWideSeekProc -#define Tcl_ChannelWideSeekProc \ - (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ -#endif -#ifndef Tcl_DictObjPut -#define Tcl_DictObjPut \ - (tclStubsPtr->tcl_DictObjPut) /* 494 */ -#endif -#ifndef Tcl_DictObjGet -#define Tcl_DictObjGet \ - (tclStubsPtr->tcl_DictObjGet) /* 495 */ -#endif -#ifndef Tcl_DictObjRemove -#define Tcl_DictObjRemove \ - (tclStubsPtr->tcl_DictObjRemove) /* 496 */ -#endif -#ifndef Tcl_DictObjSize -#define Tcl_DictObjSize \ - (tclStubsPtr->tcl_DictObjSize) /* 497 */ -#endif -#ifndef Tcl_DictObjFirst -#define Tcl_DictObjFirst \ - (tclStubsPtr->tcl_DictObjFirst) /* 498 */ -#endif -#ifndef Tcl_DictObjNext -#define Tcl_DictObjNext \ - (tclStubsPtr->tcl_DictObjNext) /* 499 */ -#endif -#ifndef Tcl_DictObjDone -#define Tcl_DictObjDone \ - (tclStubsPtr->tcl_DictObjDone) /* 500 */ -#endif -#ifndef Tcl_DictObjPutKeyList -#define Tcl_DictObjPutKeyList \ - (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ -#endif -#ifndef Tcl_DictObjRemoveKeyList -#define Tcl_DictObjRemoveKeyList \ - (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ -#endif -#ifndef Tcl_NewDictObj -#define Tcl_NewDictObj \ - (tclStubsPtr->tcl_NewDictObj) /* 503 */ -#endif -#ifndef Tcl_DbNewDictObj -#define Tcl_DbNewDictObj \ - (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ -#endif -#ifndef Tcl_RegisterConfig -#define Tcl_RegisterConfig \ - (tclStubsPtr->tcl_RegisterConfig) /* 505 */ -#endif -#ifndef Tcl_CreateNamespace -#define Tcl_CreateNamespace \ - (tclStubsPtr->tcl_CreateNamespace) /* 506 */ -#endif -#ifndef Tcl_DeleteNamespace -#define Tcl_DeleteNamespace \ - (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ -#endif -#ifndef Tcl_AppendExportList -#define Tcl_AppendExportList \ - (tclStubsPtr->tcl_AppendExportList) /* 508 */ -#endif -#ifndef Tcl_Export -#define Tcl_Export \ - (tclStubsPtr->tcl_Export) /* 509 */ -#endif -#ifndef Tcl_Import -#define Tcl_Import \ - (tclStubsPtr->tcl_Import) /* 510 */ -#endif -#ifndef Tcl_ForgetImport -#define Tcl_ForgetImport \ - (tclStubsPtr->tcl_ForgetImport) /* 511 */ -#endif -#ifndef Tcl_GetCurrentNamespace -#define Tcl_GetCurrentNamespace \ - (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ -#endif -#ifndef Tcl_GetGlobalNamespace -#define Tcl_GetGlobalNamespace \ - (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ -#endif -#ifndef Tcl_FindNamespace -#define Tcl_FindNamespace \ - (tclStubsPtr->tcl_FindNamespace) /* 514 */ -#endif -#ifndef Tcl_FindCommand -#define Tcl_FindCommand \ - (tclStubsPtr->tcl_FindCommand) /* 515 */ -#endif -#ifndef Tcl_GetCommandFromObj -#define Tcl_GetCommandFromObj \ - (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ -#endif -#ifndef Tcl_GetCommandFullName -#define Tcl_GetCommandFullName \ - (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ -#endif -#ifndef Tcl_FSEvalFileEx -#define Tcl_FSEvalFileEx \ - (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ -#endif -#ifndef Tcl_SetExitProc -#define Tcl_SetExitProc \ - (tclStubsPtr->tcl_SetExitProc) /* 519 */ -#endif -#ifndef Tcl_LimitAddHandler -#define Tcl_LimitAddHandler \ - (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ -#endif -#ifndef Tcl_LimitRemoveHandler -#define Tcl_LimitRemoveHandler \ - (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ -#endif -#ifndef Tcl_LimitReady -#define Tcl_LimitReady \ - (tclStubsPtr->tcl_LimitReady) /* 522 */ -#endif -#ifndef Tcl_LimitCheck -#define Tcl_LimitCheck \ - (tclStubsPtr->tcl_LimitCheck) /* 523 */ -#endif -#ifndef Tcl_LimitExceeded -#define Tcl_LimitExceeded \ - (tclStubsPtr->tcl_LimitExceeded) /* 524 */ -#endif -#ifndef Tcl_LimitSetCommands -#define Tcl_LimitSetCommands \ - (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ -#endif -#ifndef Tcl_LimitSetTime -#define Tcl_LimitSetTime \ - (tclStubsPtr->tcl_LimitSetTime) /* 526 */ -#endif -#ifndef Tcl_LimitSetGranularity -#define Tcl_LimitSetGranularity \ - (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ -#endif -#ifndef Tcl_LimitTypeEnabled -#define Tcl_LimitTypeEnabled \ - (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ -#endif -#ifndef Tcl_LimitTypeExceeded -#define Tcl_LimitTypeExceeded \ - (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ -#endif -#ifndef Tcl_LimitTypeSet -#define Tcl_LimitTypeSet \ - (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ -#endif -#ifndef Tcl_LimitTypeReset -#define Tcl_LimitTypeReset \ - (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ -#endif -#ifndef Tcl_LimitGetCommands -#define Tcl_LimitGetCommands \ - (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ -#endif -#ifndef Tcl_LimitGetTime -#define Tcl_LimitGetTime \ - (tclStubsPtr->tcl_LimitGetTime) /* 533 */ -#endif -#ifndef Tcl_LimitGetGranularity -#define Tcl_LimitGetGranularity \ - (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ -#endif -#ifndef Tcl_SaveInterpState -#define Tcl_SaveInterpState \ - (tclStubsPtr->tcl_SaveInterpState) /* 535 */ -#endif -#ifndef Tcl_RestoreInterpState -#define Tcl_RestoreInterpState \ - (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ -#endif -#ifndef Tcl_DiscardInterpState -#define Tcl_DiscardInterpState \ - (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ -#endif -#ifndef Tcl_SetReturnOptions -#define Tcl_SetReturnOptions \ - (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ -#endif -#ifndef Tcl_GetReturnOptions -#define Tcl_GetReturnOptions \ - (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ -#endif -#ifndef Tcl_IsEnsemble -#define Tcl_IsEnsemble \ - (tclStubsPtr->tcl_IsEnsemble) /* 540 */ -#endif -#ifndef Tcl_CreateEnsemble -#define Tcl_CreateEnsemble \ - (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ -#endif -#ifndef Tcl_FindEnsemble -#define Tcl_FindEnsemble \ - (tclStubsPtr->tcl_FindEnsemble) /* 542 */ -#endif -#ifndef Tcl_SetEnsembleSubcommandList -#define Tcl_SetEnsembleSubcommandList \ - (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ -#endif -#ifndef Tcl_SetEnsembleMappingDict -#define Tcl_SetEnsembleMappingDict \ - (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ -#endif -#ifndef Tcl_SetEnsembleUnknownHandler -#define Tcl_SetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ -#endif -#ifndef Tcl_SetEnsembleFlags -#define Tcl_SetEnsembleFlags \ - (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ -#endif -#ifndef Tcl_GetEnsembleSubcommandList -#define Tcl_GetEnsembleSubcommandList \ - (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ -#endif -#ifndef Tcl_GetEnsembleMappingDict -#define Tcl_GetEnsembleMappingDict \ - (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ -#endif -#ifndef Tcl_GetEnsembleUnknownHandler -#define Tcl_GetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ -#endif -#ifndef Tcl_GetEnsembleFlags -#define Tcl_GetEnsembleFlags \ - (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ -#endif -#ifndef Tcl_GetEnsembleNamespace -#define Tcl_GetEnsembleNamespace \ - (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ -#endif -#ifndef Tcl_SetTimeProc -#define Tcl_SetTimeProc \ - (tclStubsPtr->tcl_SetTimeProc) /* 552 */ -#endif -#ifndef Tcl_QueryTimeProc -#define Tcl_QueryTimeProc \ - (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ -#endif -#ifndef Tcl_ChannelThreadActionProc -#define Tcl_ChannelThreadActionProc \ - (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ -#endif -#ifndef Tcl_NewBignumObj -#define Tcl_NewBignumObj \ - (tclStubsPtr->tcl_NewBignumObj) /* 555 */ -#endif -#ifndef Tcl_DbNewBignumObj -#define Tcl_DbNewBignumObj \ - (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ -#endif -#ifndef Tcl_SetBignumObj -#define Tcl_SetBignumObj \ - (tclStubsPtr->tcl_SetBignumObj) /* 557 */ -#endif -#ifndef Tcl_GetBignumFromObj -#define Tcl_GetBignumFromObj \ - (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ -#endif -#ifndef Tcl_TakeBignumFromObj -#define Tcl_TakeBignumFromObj \ - (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ -#endif -#ifndef Tcl_TruncateChannel -#define Tcl_TruncateChannel \ - (tclStubsPtr->tcl_TruncateChannel) /* 560 */ -#endif -#ifndef Tcl_ChannelTruncateProc -#define Tcl_ChannelTruncateProc \ - (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ -#endif -#ifndef Tcl_SetChannelErrorInterp -#define Tcl_SetChannelErrorInterp \ - (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ -#endif -#ifndef Tcl_GetChannelErrorInterp -#define Tcl_GetChannelErrorInterp \ - (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ -#endif -#ifndef Tcl_SetChannelError -#define Tcl_SetChannelError \ - (tclStubsPtr->tcl_SetChannelError) /* 564 */ -#endif -#ifndef Tcl_GetChannelError -#define Tcl_GetChannelError \ - (tclStubsPtr->tcl_GetChannelError) /* 565 */ -#endif -#ifndef Tcl_InitBignumFromDouble -#define Tcl_InitBignumFromDouble \ - (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ -#endif -#ifndef Tcl_GetNamespaceUnknownHandler -#define Tcl_GetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ -#endif -#ifndef Tcl_SetNamespaceUnknownHandler -#define Tcl_SetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ -#endif -#ifndef Tcl_GetEncodingFromObj -#define Tcl_GetEncodingFromObj \ - (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ -#endif -#ifndef Tcl_GetEncodingSearchPath -#define Tcl_GetEncodingSearchPath \ - (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ -#endif -#ifndef Tcl_SetEncodingSearchPath -#define Tcl_SetEncodingSearchPath \ - (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment -#define Tcl_GetEncodingNameFromEnvironment \ - (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ -#endif -#ifndef Tcl_PkgRequireProc -#define Tcl_PkgRequireProc \ - (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ -#endif -#ifndef Tcl_AppendObjToErrorInfo -#define Tcl_AppendObjToErrorInfo \ - (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ -#endif -#ifndef Tcl_AppendLimitedToObj -#define Tcl_AppendLimitedToObj \ - (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ -#endif -#ifndef Tcl_Format -#define Tcl_Format \ - (tclStubsPtr->tcl_Format) /* 576 */ -#endif -#ifndef Tcl_AppendFormatToObj -#define Tcl_AppendFormatToObj \ - (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ -#endif -#ifndef Tcl_ObjPrintf -#define Tcl_ObjPrintf \ - (tclStubsPtr->tcl_ObjPrintf) /* 578 */ -#endif -#ifndef Tcl_AppendPrintfToObj -#define Tcl_AppendPrintfToObj \ - (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ -#endif -#ifndef Tcl_CancelEval -#define Tcl_CancelEval \ - (tclStubsPtr->tcl_CancelEval) /* 580 */ -#endif -#ifndef Tcl_Canceled -#define Tcl_Canceled \ - (tclStubsPtr->tcl_Canceled) /* 581 */ -#endif -#ifndef Tcl_CreatePipe -#define Tcl_CreatePipe \ - (tclStubsPtr->tcl_CreatePipe) /* 582 */ -#endif -#ifndef Tcl_NRCreateCommand -#define Tcl_NRCreateCommand \ - (tclStubsPtr->tcl_NRCreateCommand) /* 583 */ -#endif -#ifndef Tcl_NREvalObj -#define Tcl_NREvalObj \ - (tclStubsPtr->tcl_NREvalObj) /* 584 */ -#endif -#ifndef Tcl_NREvalObjv -#define Tcl_NREvalObjv \ - (tclStubsPtr->tcl_NREvalObjv) /* 585 */ -#endif -#ifndef Tcl_NRCmdSwap -#define Tcl_NRCmdSwap \ - (tclStubsPtr->tcl_NRCmdSwap) /* 586 */ -#endif -#ifndef Tcl_NRAddCallback -#define Tcl_NRAddCallback \ - (tclStubsPtr->tcl_NRAddCallback) /* 587 */ -#endif -#ifndef Tcl_NRCallObjProc -#define Tcl_NRCallObjProc \ - (tclStubsPtr->tcl_NRCallObjProc) /* 588 */ -#endif -#ifndef Tcl_GetFSDeviceFromStat -#define Tcl_GetFSDeviceFromStat \ - (tclStubsPtr->tcl_GetFSDeviceFromStat) /* 589 */ -#endif -#ifndef Tcl_GetFSInodeFromStat -#define Tcl_GetFSInodeFromStat \ - (tclStubsPtr->tcl_GetFSInodeFromStat) /* 590 */ -#endif -#ifndef Tcl_GetModeFromStat -#define Tcl_GetModeFromStat \ - (tclStubsPtr->tcl_GetModeFromStat) /* 591 */ -#endif -#ifndef Tcl_GetLinkCountFromStat -#define Tcl_GetLinkCountFromStat \ - (tclStubsPtr->tcl_GetLinkCountFromStat) /* 592 */ -#endif -#ifndef Tcl_GetUserIdFromStat -#define Tcl_GetUserIdFromStat \ - (tclStubsPtr->tcl_GetUserIdFromStat) /* 593 */ -#endif -#ifndef Tcl_GetGroupIdFromStat -#define Tcl_GetGroupIdFromStat \ - (tclStubsPtr->tcl_GetGroupIdFromStat) /* 594 */ -#endif -#ifndef Tcl_GetDeviceTypeFromStat -#define Tcl_GetDeviceTypeFromStat \ - (tclStubsPtr->tcl_GetDeviceTypeFromStat) /* 595 */ -#endif -#ifndef Tcl_GetAccessTimeFromStat -#define Tcl_GetAccessTimeFromStat \ - (tclStubsPtr->tcl_GetAccessTimeFromStat) /* 596 */ -#endif -#ifndef Tcl_GetModificationTimeFromStat -#define Tcl_GetModificationTimeFromStat \ - (tclStubsPtr->tcl_GetModificationTimeFromStat) /* 597 */ -#endif -#ifndef Tcl_GetChangeTimeFromStat -#define Tcl_GetChangeTimeFromStat \ - (tclStubsPtr->tcl_GetChangeTimeFromStat) /* 598 */ -#endif -#ifndef Tcl_GetSizeFromStat -#define Tcl_GetSizeFromStat \ - (tclStubsPtr->tcl_GetSizeFromStat) /* 599 */ -#endif -#ifndef Tcl_GetBlocksFromStat -#define Tcl_GetBlocksFromStat \ - (tclStubsPtr->tcl_GetBlocksFromStat) /* 600 */ -#endif -#ifndef Tcl_GetBlockSizeFromStat -#define Tcl_GetBlockSizeFromStat \ - (tclStubsPtr->tcl_GetBlockSizeFromStat) /* 601 */ -#endif -#ifndef Tcl_SetEnsembleParameterList -#define Tcl_SetEnsembleParameterList \ - (tclStubsPtr->tcl_SetEnsembleParameterList) /* 602 */ -#endif -#ifndef Tcl_GetEnsembleParameterList -#define Tcl_GetEnsembleParameterList \ - (tclStubsPtr->tcl_GetEnsembleParameterList) /* 603 */ -#endif -#ifndef Tcl_ParseArgsObjv -#define Tcl_ParseArgsObjv \ - (tclStubsPtr->tcl_ParseArgsObjv) /* 604 */ -#endif -#ifndef Tcl_GetErrorLine -#define Tcl_GetErrorLine \ - (tclStubsPtr->tcl_GetErrorLine) /* 605 */ -#endif -#ifndef Tcl_SetErrorLine -#define Tcl_SetErrorLine \ - (tclStubsPtr->tcl_SetErrorLine) /* 606 */ -#endif -#ifndef Tcl_TransferResult -#define Tcl_TransferResult \ - (tclStubsPtr->tcl_TransferResult) /* 607 */ -#endif -#ifndef Tcl_InterpActive -#define Tcl_InterpActive \ - (tclStubsPtr->tcl_InterpActive) /* 608 */ -#endif -#ifndef Tcl_BackgroundException -#define Tcl_BackgroundException \ - (tclStubsPtr->tcl_BackgroundException) /* 609 */ -#endif -#ifndef Tcl_ZlibDeflate -#define Tcl_ZlibDeflate \ - (tclStubsPtr->tcl_ZlibDeflate) /* 610 */ -#endif -#ifndef Tcl_ZlibInflate -#define Tcl_ZlibInflate \ - (tclStubsPtr->tcl_ZlibInflate) /* 611 */ -#endif -#ifndef Tcl_ZlibCRC32 -#define Tcl_ZlibCRC32 \ - (tclStubsPtr->tcl_ZlibCRC32) /* 612 */ -#endif -#ifndef Tcl_ZlibAdler32 -#define Tcl_ZlibAdler32 \ - (tclStubsPtr->tcl_ZlibAdler32) /* 613 */ -#endif -#ifndef Tcl_ZlibStreamInit -#define Tcl_ZlibStreamInit \ - (tclStubsPtr->tcl_ZlibStreamInit) /* 614 */ -#endif -#ifndef Tcl_ZlibStreamGetCommandName -#define Tcl_ZlibStreamGetCommandName \ - (tclStubsPtr->tcl_ZlibStreamGetCommandName) /* 615 */ -#endif -#ifndef Tcl_ZlibStreamEof -#define Tcl_ZlibStreamEof \ - (tclStubsPtr->tcl_ZlibStreamEof) /* 616 */ -#endif -#ifndef Tcl_ZlibStreamAdler32 -#define Tcl_ZlibStreamAdler32 \ - (tclStubsPtr->tcl_ZlibStreamAdler32) /* 617 */ -#endif -#ifndef Tcl_ZlibStreamPut -#define Tcl_ZlibStreamPut \ - (tclStubsPtr->tcl_ZlibStreamPut) /* 618 */ -#endif -#ifndef Tcl_ZlibStreamGet -#define Tcl_ZlibStreamGet \ - (tclStubsPtr->tcl_ZlibStreamGet) /* 619 */ -#endif -#ifndef Tcl_ZlibStreamClose -#define Tcl_ZlibStreamClose \ - (tclStubsPtr->tcl_ZlibStreamClose) /* 620 */ -#endif -#ifndef Tcl_ZlibStreamReset -#define Tcl_ZlibStreamReset \ - (tclStubsPtr->tcl_ZlibStreamReset) /* 621 */ -#endif -#ifndef Tcl_SetStartupScript -#define Tcl_SetStartupScript \ - (tclStubsPtr->tcl_SetStartupScript) /* 622 */ -#endif -#ifndef Tcl_GetStartupScript -#define Tcl_GetStartupScript \ - (tclStubsPtr->tcl_GetStartupScript) /* 623 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLDECLS */ - +/* + * tclDecls.h -- + * + * Declarations of functions in the platform independent public Tcl API. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclDecls.h,v 1.164 2008/12/18 01:14:16 ferrieux Exp $ + */ + +#ifndef _TCLDECLS +#define _TCLDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tcl_PkgProvideEx_TCL_DECLARED +#define Tcl_PkgProvideEx_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_PkgProvideEx (Tcl_Interp * interp, + const char * name, const char * version, + ClientData clientData); +#endif +#ifndef Tcl_PkgRequireEx_TCL_DECLARED +#define Tcl_PkgRequireEx_TCL_DECLARED +/* 1 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, + const char * name, const char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_Panic_TCL_DECLARED +#define Tcl_Panic_TCL_DECLARED +/* 2 */ +EXTERN void Tcl_Panic (const char * format, ...); +#endif +#ifndef Tcl_Alloc_TCL_DECLARED +#define Tcl_Alloc_TCL_DECLARED +/* 3 */ +EXTERN char * Tcl_Alloc (unsigned int size); +#endif +#ifndef Tcl_Free_TCL_DECLARED +#define Tcl_Free_TCL_DECLARED +/* 4 */ +EXTERN void Tcl_Free (char * ptr); +#endif +#ifndef Tcl_Realloc_TCL_DECLARED +#define Tcl_Realloc_TCL_DECLARED +/* 5 */ +EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_DbCkalloc_TCL_DECLARED +#define Tcl_DbCkalloc_TCL_DECLARED +/* 6 */ +EXTERN char * Tcl_DbCkalloc (unsigned int size, const char * file, + int line); +#endif +#ifndef Tcl_DbCkfree_TCL_DECLARED +#define Tcl_DbCkfree_TCL_DECLARED +/* 7 */ +EXTERN int Tcl_DbCkfree (char * ptr, const char * file, + int line); +#endif +#ifndef Tcl_DbCkrealloc_TCL_DECLARED +#define Tcl_DbCkrealloc_TCL_DECLARED +/* 8 */ +EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, + const char * file, int line); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer_TCL_DECLARED +#define Tcl_SetTimer_TCL_DECLARED +/* 11 */ +EXTERN void Tcl_SetTimer (const Tcl_Time * timePtr); +#endif +#ifndef Tcl_Sleep_TCL_DECLARED +#define Tcl_Sleep_TCL_DECLARED +/* 12 */ +EXTERN void Tcl_Sleep (int ms); +#endif +#ifndef Tcl_WaitForEvent_TCL_DECLARED +#define Tcl_WaitForEvent_TCL_DECLARED +/* 13 */ +EXTERN int Tcl_WaitForEvent (const Tcl_Time * timePtr); +#endif +#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED +#define Tcl_AppendAllObjTypes_TCL_DECLARED +/* 14 */ +EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendStringsToObj_TCL_DECLARED +#define Tcl_AppendStringsToObj_TCL_DECLARED +/* 15 */ +EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); +#endif +#ifndef Tcl_AppendToObj_TCL_DECLARED +#define Tcl_AppendToObj_TCL_DECLARED +/* 16 */ +EXTERN void Tcl_AppendToObj (Tcl_Obj * objPtr, + const char * bytes, int length); +#endif +#ifndef Tcl_ConcatObj_TCL_DECLARED +#define Tcl_ConcatObj_TCL_DECLARED +/* 17 */ +EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_ConvertToType_TCL_DECLARED +#define Tcl_ConvertToType_TCL_DECLARED +/* 18 */ +EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, + Tcl_Obj * objPtr, + const Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_DbDecrRefCount_TCL_DECLARED +#define Tcl_DbDecrRefCount_TCL_DECLARED +/* 19 */ +EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, + const char * file, int line); +#endif +#ifndef Tcl_DbIncrRefCount_TCL_DECLARED +#define Tcl_DbIncrRefCount_TCL_DECLARED +/* 20 */ +EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, + const char * file, int line); +#endif +#ifndef Tcl_DbIsShared_TCL_DECLARED +#define Tcl_DbIsShared_TCL_DECLARED +/* 21 */ +EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, const char * file, + int line); +#endif +#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED +#define Tcl_DbNewBooleanObj_TCL_DECLARED +/* 22 */ +EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, + const char * file, int line); +#endif +#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED +#define Tcl_DbNewByteArrayObj_TCL_DECLARED +/* 23 */ +EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (const unsigned char * bytes, + int length, const char * file, int line); +#endif +#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED +#define Tcl_DbNewDoubleObj_TCL_DECLARED +/* 24 */ +EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, + const char * file, int line); +#endif +#ifndef Tcl_DbNewListObj_TCL_DECLARED +#define Tcl_DbNewListObj_TCL_DECLARED +/* 25 */ +EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *const * objv, + const char * file, int line); +#endif +#ifndef Tcl_DbNewLongObj_TCL_DECLARED +#define Tcl_DbNewLongObj_TCL_DECLARED +/* 26 */ +EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, const char * file, + int line); +#endif +#ifndef Tcl_DbNewObj_TCL_DECLARED +#define Tcl_DbNewObj_TCL_DECLARED +/* 27 */ +EXTERN Tcl_Obj * Tcl_DbNewObj (const char * file, int line); +#endif +#ifndef Tcl_DbNewStringObj_TCL_DECLARED +#define Tcl_DbNewStringObj_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Obj * Tcl_DbNewStringObj (const char * bytes, int length, + const char * file, int line); +#endif +#ifndef Tcl_DuplicateObj_TCL_DECLARED +#define Tcl_DuplicateObj_TCL_DECLARED +/* 29 */ +EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); +#endif +#ifndef TclFreeObj_TCL_DECLARED +#define TclFreeObj_TCL_DECLARED +/* 30 */ +EXTERN void TclFreeObj (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetBoolean_TCL_DECLARED +#define Tcl_GetBoolean_TCL_DECLARED +/* 31 */ +EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, + const char * src, int * boolPtr); +#endif +#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED +#define Tcl_GetBooleanFromObj_TCL_DECLARED +/* 32 */ +EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * boolPtr); +#endif +#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED +#define Tcl_GetByteArrayFromObj_TCL_DECLARED +/* 33 */ +EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetDouble_TCL_DECLARED +#define Tcl_GetDouble_TCL_DECLARED +/* 34 */ +EXTERN int Tcl_GetDouble (Tcl_Interp * interp, const char * src, + double * doublePtr); +#endif +#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED +#define Tcl_GetDoubleFromObj_TCL_DECLARED +/* 35 */ +EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * doublePtr); +#endif +#ifndef Tcl_GetIndexFromObj_TCL_DECLARED +#define Tcl_GetIndexFromObj_TCL_DECLARED +/* 36 */ +EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, + CONST84 char *const * tablePtr, + const char * msg, int flags, int * indexPtr); +#endif +#ifndef Tcl_GetInt_TCL_DECLARED +#define Tcl_GetInt_TCL_DECLARED +/* 37 */ +EXTERN int Tcl_GetInt (Tcl_Interp * interp, const char * src, + int * intPtr); +#endif +#ifndef Tcl_GetIntFromObj_TCL_DECLARED +#define Tcl_GetIntFromObj_TCL_DECLARED +/* 38 */ +EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * intPtr); +#endif +#ifndef Tcl_GetLongFromObj_TCL_DECLARED +#define Tcl_GetLongFromObj_TCL_DECLARED +/* 39 */ +EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * longPtr); +#endif +#ifndef Tcl_GetObjType_TCL_DECLARED +#define Tcl_GetObjType_TCL_DECLARED +/* 40 */ +EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (const char * typeName); +#endif +#ifndef Tcl_GetStringFromObj_TCL_DECLARED +#define Tcl_GetStringFromObj_TCL_DECLARED +/* 41 */ +EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_InvalidateStringRep_TCL_DECLARED +#define Tcl_InvalidateStringRep_TCL_DECLARED +/* 42 */ +EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjAppendList_TCL_DECLARED +#define Tcl_ListObjAppendList_TCL_DECLARED +/* 43 */ +EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); +#endif +#ifndef Tcl_ListObjAppendElement_TCL_DECLARED +#define Tcl_ListObjAppendElement_TCL_DECLARED +/* 44 */ +EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjGetElements_TCL_DECLARED +#define Tcl_ListObjGetElements_TCL_DECLARED +/* 45 */ +EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * objcPtr, + Tcl_Obj *** objvPtr); +#endif +#ifndef Tcl_ListObjIndex_TCL_DECLARED +#define Tcl_ListObjIndex_TCL_DECLARED +/* 46 */ +EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, + Tcl_Obj ** objPtrPtr); +#endif +#ifndef Tcl_ListObjLength_TCL_DECLARED +#define Tcl_ListObjLength_TCL_DECLARED +/* 47 */ +EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * lengthPtr); +#endif +#ifndef Tcl_ListObjReplace_TCL_DECLARED +#define Tcl_ListObjReplace_TCL_DECLARED +/* 48 */ +EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, + Tcl_Obj * listPtr, int first, int count, + int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_NewBooleanObj_TCL_DECLARED +#define Tcl_NewBooleanObj_TCL_DECLARED +/* 49 */ +EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); +#endif +#ifndef Tcl_NewByteArrayObj_TCL_DECLARED +#define Tcl_NewByteArrayObj_TCL_DECLARED +/* 50 */ +EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char * bytes, + int length); +#endif +#ifndef Tcl_NewDoubleObj_TCL_DECLARED +#define Tcl_NewDoubleObj_TCL_DECLARED +/* 51 */ +EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); +#endif +#ifndef Tcl_NewIntObj_TCL_DECLARED +#define Tcl_NewIntObj_TCL_DECLARED +/* 52 */ +EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); +#endif +#ifndef Tcl_NewListObj_TCL_DECLARED +#define Tcl_NewListObj_TCL_DECLARED +/* 53 */ +EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_NewLongObj_TCL_DECLARED +#define Tcl_NewLongObj_TCL_DECLARED +/* 54 */ +EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); +#endif +#ifndef Tcl_NewObj_TCL_DECLARED +#define Tcl_NewObj_TCL_DECLARED +/* 55 */ +EXTERN Tcl_Obj * Tcl_NewObj (void); +#endif +#ifndef Tcl_NewStringObj_TCL_DECLARED +#define Tcl_NewStringObj_TCL_DECLARED +/* 56 */ +EXTERN Tcl_Obj * Tcl_NewStringObj (const char * bytes, int length); +#endif +#ifndef Tcl_SetBooleanObj_TCL_DECLARED +#define Tcl_SetBooleanObj_TCL_DECLARED +/* 57 */ +EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); +#endif +#ifndef Tcl_SetByteArrayLength_TCL_DECLARED +#define Tcl_SetByteArrayLength_TCL_DECLARED +/* 58 */ +EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetByteArrayObj_TCL_DECLARED +#define Tcl_SetByteArrayObj_TCL_DECLARED +/* 59 */ +EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, + const unsigned char * bytes, int length); +#endif +#ifndef Tcl_SetDoubleObj_TCL_DECLARED +#define Tcl_SetDoubleObj_TCL_DECLARED +/* 60 */ +EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, + double doubleValue); +#endif +#ifndef Tcl_SetIntObj_TCL_DECLARED +#define Tcl_SetIntObj_TCL_DECLARED +/* 61 */ +EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); +#endif +#ifndef Tcl_SetListObj_TCL_DECLARED +#define Tcl_SetListObj_TCL_DECLARED +/* 62 */ +EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_SetLongObj_TCL_DECLARED +#define Tcl_SetLongObj_TCL_DECLARED +/* 63 */ +EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); +#endif +#ifndef Tcl_SetObjLength_TCL_DECLARED +#define Tcl_SetObjLength_TCL_DECLARED +/* 64 */ +EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetStringObj_TCL_DECLARED +#define Tcl_SetStringObj_TCL_DECLARED +/* 65 */ +EXTERN void Tcl_SetStringObj (Tcl_Obj * objPtr, + const char * bytes, int length); +#endif +#ifndef Tcl_AddErrorInfo_TCL_DECLARED +#define Tcl_AddErrorInfo_TCL_DECLARED +/* 66 */ +EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, + const char * message); +#endif +#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED +#define Tcl_AddObjErrorInfo_TCL_DECLARED +/* 67 */ +EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, + const char * message, int length); +#endif +#ifndef Tcl_AllowExceptions_TCL_DECLARED +#define Tcl_AllowExceptions_TCL_DECLARED +/* 68 */ +EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); +#endif +#ifndef Tcl_AppendElement_TCL_DECLARED +#define Tcl_AppendElement_TCL_DECLARED +/* 69 */ +EXTERN void Tcl_AppendElement (Tcl_Interp * interp, + const char * element); +#endif +#ifndef Tcl_AppendResult_TCL_DECLARED +#define Tcl_AppendResult_TCL_DECLARED +/* 70 */ +EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_AsyncCreate_TCL_DECLARED +#define Tcl_AsyncCreate_TCL_DECLARED +/* 71 */ +EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AsyncDelete_TCL_DECLARED +#define Tcl_AsyncDelete_TCL_DECLARED +/* 72 */ +EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncInvoke_TCL_DECLARED +#define Tcl_AsyncInvoke_TCL_DECLARED +/* 73 */ +EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); +#endif +#ifndef Tcl_AsyncMark_TCL_DECLARED +#define Tcl_AsyncMark_TCL_DECLARED +/* 74 */ +EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncReady_TCL_DECLARED +#define Tcl_AsyncReady_TCL_DECLARED +/* 75 */ +EXTERN int Tcl_AsyncReady (void); +#endif +#ifndef Tcl_BackgroundError_TCL_DECLARED +#define Tcl_BackgroundError_TCL_DECLARED +/* 76 */ +EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); +#endif +#ifndef Tcl_Backslash_TCL_DECLARED +#define Tcl_Backslash_TCL_DECLARED +/* 77 */ +EXTERN char Tcl_Backslash (const char * src, int * readPtr); +#endif +#ifndef Tcl_BadChannelOption_TCL_DECLARED +#define Tcl_BadChannelOption_TCL_DECLARED +/* 78 */ +EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, + const char * optionName, + const char * optionList); +#endif +#ifndef Tcl_CallWhenDeleted_TCL_DECLARED +#define Tcl_CallWhenDeleted_TCL_DECLARED +/* 79 */ +EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CancelIdleCall_TCL_DECLARED +#define Tcl_CancelIdleCall_TCL_DECLARED +/* 80 */ +EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, + ClientData clientData); +#endif +#ifndef Tcl_Close_TCL_DECLARED +#define Tcl_Close_TCL_DECLARED +/* 81 */ +EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); +#endif +#ifndef Tcl_CommandComplete_TCL_DECLARED +#define Tcl_CommandComplete_TCL_DECLARED +/* 82 */ +EXTERN int Tcl_CommandComplete (const char * cmd); +#endif +#ifndef Tcl_Concat_TCL_DECLARED +#define Tcl_Concat_TCL_DECLARED +/* 83 */ +EXTERN char * Tcl_Concat (int argc, CONST84 char *const * argv); +#endif +#ifndef Tcl_ConvertElement_TCL_DECLARED +#define Tcl_ConvertElement_TCL_DECLARED +/* 84 */ +EXTERN int Tcl_ConvertElement (const char * src, char * dst, + int flags); +#endif +#ifndef Tcl_ConvertCountedElement_TCL_DECLARED +#define Tcl_ConvertCountedElement_TCL_DECLARED +/* 85 */ +EXTERN int Tcl_ConvertCountedElement (const char * src, + int length, char * dst, int flags); +#endif +#ifndef Tcl_CreateAlias_TCL_DECLARED +#define Tcl_CreateAlias_TCL_DECLARED +/* 86 */ +EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, + const char * slaveCmd, Tcl_Interp * target, + const char * targetCmd, int argc, + CONST84 char *const * argv); +#endif +#ifndef Tcl_CreateAliasObj_TCL_DECLARED +#define Tcl_CreateAliasObj_TCL_DECLARED +/* 87 */ +EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, + const char * slaveCmd, Tcl_Interp * target, + const char * targetCmd, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_CreateChannel_TCL_DECLARED +#define Tcl_CreateChannel_TCL_DECLARED +/* 88 */ +EXTERN Tcl_Channel Tcl_CreateChannel (const Tcl_ChannelType * typePtr, + const char * chanName, + ClientData instanceData, int mask); +#endif +#ifndef Tcl_CreateChannelHandler_TCL_DECLARED +#define Tcl_CreateChannelHandler_TCL_DECLARED +/* 89 */ +EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateCloseHandler_TCL_DECLARED +#define Tcl_CreateCloseHandler_TCL_DECLARED +/* 90 */ +EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateCommand_TCL_DECLARED +#define Tcl_CreateCommand_TCL_DECLARED +/* 91 */ +EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_CmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateEventSource_TCL_DECLARED +#define Tcl_CreateEventSource_TCL_DECLARED +/* 92 */ +EXTERN void Tcl_CreateEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_CreateExitHandler_TCL_DECLARED +#define Tcl_CreateExitHandler_TCL_DECLARED +/* 93 */ +EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateInterp_TCL_DECLARED +#define Tcl_CreateInterp_TCL_DECLARED +/* 94 */ +EXTERN Tcl_Interp * Tcl_CreateInterp (void); +#endif +#ifndef Tcl_CreateMathFunc_TCL_DECLARED +#define Tcl_CreateMathFunc_TCL_DECLARED +/* 95 */ +EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, + const char * name, int numArgs, + Tcl_ValueType * argTypes, + Tcl_MathProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateObjCommand_TCL_DECLARED +#define Tcl_CreateObjCommand_TCL_DECLARED +/* 96 */ +EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_ObjCmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateSlave_TCL_DECLARED +#define Tcl_CreateSlave_TCL_DECLARED +/* 97 */ +EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, + const char * slaveName, int isSafe); +#endif +#ifndef Tcl_CreateTimerHandler_TCL_DECLARED +#define Tcl_CreateTimerHandler_TCL_DECLARED +/* 98 */ +EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, + Tcl_TimerProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateTrace_TCL_DECLARED +#define Tcl_CreateTrace_TCL_DECLARED +/* 99 */ +EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, + Tcl_CmdTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteAssocData_TCL_DECLARED +#define Tcl_DeleteAssocData_TCL_DECLARED +/* 100 */ +EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, + const char * name); +#endif +#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED +#define Tcl_DeleteChannelHandler_TCL_DECLARED +/* 101 */ +EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED +#define Tcl_DeleteCloseHandler_TCL_DECLARED +/* 102 */ +EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_DeleteCommand_TCL_DECLARED +#define Tcl_DeleteCommand_TCL_DECLARED +/* 103 */ +EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, + const char * cmdName); +#endif +#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED +#define Tcl_DeleteCommandFromToken_TCL_DECLARED +/* 104 */ +EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_DeleteEvents_TCL_DECLARED +#define Tcl_DeleteEvents_TCL_DECLARED +/* 105 */ +EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteEventSource_TCL_DECLARED +#define Tcl_DeleteEventSource_TCL_DECLARED +/* 106 */ +EXTERN void Tcl_DeleteEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteExitHandler_TCL_DECLARED +#define Tcl_DeleteExitHandler_TCL_DECLARED +/* 107 */ +EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteHashEntry_TCL_DECLARED +#define Tcl_DeleteHashEntry_TCL_DECLARED +/* 108 */ +EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); +#endif +#ifndef Tcl_DeleteHashTable_TCL_DECLARED +#define Tcl_DeleteHashTable_TCL_DECLARED +/* 109 */ +EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_DeleteInterp_TCL_DECLARED +#define Tcl_DeleteInterp_TCL_DECLARED +/* 110 */ +EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED +#define Tcl_DeleteTimerHandler_TCL_DECLARED +/* 112 */ +EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); +#endif +#ifndef Tcl_DeleteTrace_TCL_DECLARED +#define Tcl_DeleteTrace_TCL_DECLARED +/* 113 */ +EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, + Tcl_Trace trace); +#endif +#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED +#define Tcl_DontCallWhenDeleted_TCL_DECLARED +/* 114 */ +EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DoOneEvent_TCL_DECLARED +#define Tcl_DoOneEvent_TCL_DECLARED +/* 115 */ +EXTERN int Tcl_DoOneEvent (int flags); +#endif +#ifndef Tcl_DoWhenIdle_TCL_DECLARED +#define Tcl_DoWhenIdle_TCL_DECLARED +/* 116 */ +EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DStringAppend_TCL_DECLARED +#define Tcl_DStringAppend_TCL_DECLARED +/* 117 */ +EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, + const char * bytes, int length); +#endif +#ifndef Tcl_DStringAppendElement_TCL_DECLARED +#define Tcl_DStringAppendElement_TCL_DECLARED +/* 118 */ +EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, + const char * element); +#endif +#ifndef Tcl_DStringEndSublist_TCL_DECLARED +#define Tcl_DStringEndSublist_TCL_DECLARED +/* 119 */ +EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringFree_TCL_DECLARED +#define Tcl_DStringFree_TCL_DECLARED +/* 120 */ +EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringGetResult_TCL_DECLARED +#define Tcl_DStringGetResult_TCL_DECLARED +/* 121 */ +EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringInit_TCL_DECLARED +#define Tcl_DStringInit_TCL_DECLARED +/* 122 */ +EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringResult_TCL_DECLARED +#define Tcl_DStringResult_TCL_DECLARED +/* 123 */ +EXTERN void Tcl_DStringResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringSetLength_TCL_DECLARED +#define Tcl_DStringSetLength_TCL_DECLARED +/* 124 */ +EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, + int length); +#endif +#ifndef Tcl_DStringStartSublist_TCL_DECLARED +#define Tcl_DStringStartSublist_TCL_DECLARED +/* 125 */ +EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_Eof_TCL_DECLARED +#define Tcl_Eof_TCL_DECLARED +/* 126 */ +EXTERN int Tcl_Eof (Tcl_Channel chan); +#endif +#ifndef Tcl_ErrnoId_TCL_DECLARED +#define Tcl_ErrnoId_TCL_DECLARED +/* 127 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); +#endif +#ifndef Tcl_ErrnoMsg_TCL_DECLARED +#define Tcl_ErrnoMsg_TCL_DECLARED +/* 128 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); +#endif +#ifndef Tcl_Eval_TCL_DECLARED +#define Tcl_Eval_TCL_DECLARED +/* 129 */ +EXTERN int Tcl_Eval (Tcl_Interp * interp, const char * script); +#endif +#ifndef Tcl_EvalFile_TCL_DECLARED +#define Tcl_EvalFile_TCL_DECLARED +/* 130 */ +EXTERN int Tcl_EvalFile (Tcl_Interp * interp, + const char * fileName); +#endif +#ifndef Tcl_EvalObj_TCL_DECLARED +#define Tcl_EvalObj_TCL_DECLARED +/* 131 */ +EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_EventuallyFree_TCL_DECLARED +#define Tcl_EventuallyFree_TCL_DECLARED +/* 132 */ +EXTERN void Tcl_EventuallyFree (ClientData clientData, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_Exit_TCL_DECLARED +#define Tcl_Exit_TCL_DECLARED +/* 133 */ +EXTERN void Tcl_Exit (int status); +#endif +#ifndef Tcl_ExposeCommand_TCL_DECLARED +#define Tcl_ExposeCommand_TCL_DECLARED +/* 134 */ +EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, + const char * hiddenCmdToken, + const char * cmdName); +#endif +#ifndef Tcl_ExprBoolean_TCL_DECLARED +#define Tcl_ExprBoolean_TCL_DECLARED +/* 135 */ +EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, + const char * expr, int * ptr); +#endif +#ifndef Tcl_ExprBooleanObj_TCL_DECLARED +#define Tcl_ExprBooleanObj_TCL_DECLARED +/* 136 */ +EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * ptr); +#endif +#ifndef Tcl_ExprDouble_TCL_DECLARED +#define Tcl_ExprDouble_TCL_DECLARED +/* 137 */ +EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, + const char * expr, double * ptr); +#endif +#ifndef Tcl_ExprDoubleObj_TCL_DECLARED +#define Tcl_ExprDoubleObj_TCL_DECLARED +/* 138 */ +EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * ptr); +#endif +#ifndef Tcl_ExprLong_TCL_DECLARED +#define Tcl_ExprLong_TCL_DECLARED +/* 139 */ +EXTERN int Tcl_ExprLong (Tcl_Interp * interp, const char * expr, + long * ptr); +#endif +#ifndef Tcl_ExprLongObj_TCL_DECLARED +#define Tcl_ExprLongObj_TCL_DECLARED +/* 140 */ +EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * ptr); +#endif +#ifndef Tcl_ExprObj_TCL_DECLARED +#define Tcl_ExprObj_TCL_DECLARED +/* 141 */ +EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + Tcl_Obj ** resultPtrPtr); +#endif +#ifndef Tcl_ExprString_TCL_DECLARED +#define Tcl_ExprString_TCL_DECLARED +/* 142 */ +EXTERN int Tcl_ExprString (Tcl_Interp * interp, + const char * expr); +#endif +#ifndef Tcl_Finalize_TCL_DECLARED +#define Tcl_Finalize_TCL_DECLARED +/* 143 */ +EXTERN void Tcl_Finalize (void); +#endif +#ifndef Tcl_FindExecutable_TCL_DECLARED +#define Tcl_FindExecutable_TCL_DECLARED +/* 144 */ +EXTERN void Tcl_FindExecutable (const char * argv0); +#endif +#ifndef Tcl_FirstHashEntry_TCL_DECLARED +#define Tcl_FirstHashEntry_TCL_DECLARED +/* 145 */ +EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, + Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_Flush_TCL_DECLARED +#define Tcl_Flush_TCL_DECLARED +/* 146 */ +EXTERN int Tcl_Flush (Tcl_Channel chan); +#endif +#ifndef Tcl_FreeResult_TCL_DECLARED +#define Tcl_FreeResult_TCL_DECLARED +/* 147 */ +EXTERN void Tcl_FreeResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetAlias_TCL_DECLARED +#define Tcl_GetAlias_TCL_DECLARED +/* 148 */ +EXTERN int Tcl_GetAlias (Tcl_Interp * interp, + const char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_GetAliasObj_TCL_DECLARED +#define Tcl_GetAliasObj_TCL_DECLARED +/* 149 */ +EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, + const char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * objcPtr, + Tcl_Obj *** objv); +#endif +#ifndef Tcl_GetAssocData_TCL_DECLARED +#define Tcl_GetAssocData_TCL_DECLARED +/* 150 */ +EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, + const char * name, + Tcl_InterpDeleteProc ** procPtr); +#endif +#ifndef Tcl_GetChannel_TCL_DECLARED +#define Tcl_GetChannel_TCL_DECLARED +/* 151 */ +EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, + const char * chanName, int * modePtr); +#endif +#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED +#define Tcl_GetChannelBufferSize_TCL_DECLARED +/* 152 */ +EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelHandle_TCL_DECLARED +#define Tcl_GetChannelHandle_TCL_DECLARED +/* 153 */ +EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, + int direction, ClientData * handlePtr); +#endif +#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED +#define Tcl_GetChannelInstanceData_TCL_DECLARED +/* 154 */ +EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelMode_TCL_DECLARED +#define Tcl_GetChannelMode_TCL_DECLARED +/* 155 */ +EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelName_TCL_DECLARED +#define Tcl_GetChannelName_TCL_DECLARED +/* 156 */ +EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelOption_TCL_DECLARED +#define Tcl_GetChannelOption_TCL_DECLARED +/* 157 */ +EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, const char * optionName, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetChannelType_TCL_DECLARED +#define Tcl_GetChannelType_TCL_DECLARED +/* 158 */ +EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); +#endif +#ifndef Tcl_GetCommandInfo_TCL_DECLARED +#define Tcl_GetCommandInfo_TCL_DECLARED +/* 159 */ +EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, + const char * cmdName, Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_GetCommandName_TCL_DECLARED +#define Tcl_GetCommandName_TCL_DECLARED +/* 160 */ +EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_GetErrno_TCL_DECLARED +#define Tcl_GetErrno_TCL_DECLARED +/* 161 */ +EXTERN int Tcl_GetErrno (void); +#endif +#ifndef Tcl_GetHostName_TCL_DECLARED +#define Tcl_GetHostName_TCL_DECLARED +/* 162 */ +EXTERN CONST84_RETURN char * Tcl_GetHostName (void); +#endif +#ifndef Tcl_GetInterpPath_TCL_DECLARED +#define Tcl_GetInterpPath_TCL_DECLARED +/* 163 */ +EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, + Tcl_Interp * slaveInterp); +#endif +#ifndef Tcl_GetMaster_TCL_DECLARED +#define Tcl_GetMaster_TCL_DECLARED +/* 164 */ +EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED +#define Tcl_GetNameOfExecutable_TCL_DECLARED +/* 165 */ +EXTERN const char * Tcl_GetNameOfExecutable (void); +#endif +#ifndef Tcl_GetObjResult_TCL_DECLARED +#define Tcl_GetObjResult_TCL_DECLARED +/* 166 */ +EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + const char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + const char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType_TCL_DECLARED +#define Tcl_GetPathType_TCL_DECLARED +/* 168 */ +EXTERN Tcl_PathType Tcl_GetPathType (const char * path); +#endif +#ifndef Tcl_Gets_TCL_DECLARED +#define Tcl_Gets_TCL_DECLARED +/* 169 */ +EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetsObj_TCL_DECLARED +#define Tcl_GetsObj_TCL_DECLARED +/* 170 */ +EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetServiceMode_TCL_DECLARED +#define Tcl_GetServiceMode_TCL_DECLARED +/* 171 */ +EXTERN int Tcl_GetServiceMode (void); +#endif +#ifndef Tcl_GetSlave_TCL_DECLARED +#define Tcl_GetSlave_TCL_DECLARED +/* 172 */ +EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, + const char * slaveName); +#endif +#ifndef Tcl_GetStdChannel_TCL_DECLARED +#define Tcl_GetStdChannel_TCL_DECLARED +/* 173 */ +EXTERN Tcl_Channel Tcl_GetStdChannel (int type); +#endif +#ifndef Tcl_GetStringResult_TCL_DECLARED +#define Tcl_GetStringResult_TCL_DECLARED +/* 174 */ +EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetVar_TCL_DECLARED +#define Tcl_GetVar_TCL_DECLARED +/* 175 */ +EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, + const char * varName, int flags); +#endif +#ifndef Tcl_GetVar2_TCL_DECLARED +#define Tcl_GetVar2_TCL_DECLARED +/* 176 */ +EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags); +#endif +#ifndef Tcl_GlobalEval_TCL_DECLARED +#define Tcl_GlobalEval_TCL_DECLARED +/* 177 */ +EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, + const char * command); +#endif +#ifndef Tcl_GlobalEvalObj_TCL_DECLARED +#define Tcl_GlobalEvalObj_TCL_DECLARED +/* 178 */ +EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_HideCommand_TCL_DECLARED +#define Tcl_HideCommand_TCL_DECLARED +/* 179 */ +EXTERN int Tcl_HideCommand (Tcl_Interp * interp, + const char * cmdName, + const char * hiddenCmdToken); +#endif +#ifndef Tcl_Init_TCL_DECLARED +#define Tcl_Init_TCL_DECLARED +/* 180 */ +EXTERN int Tcl_Init (Tcl_Interp * interp); +#endif +#ifndef Tcl_InitHashTable_TCL_DECLARED +#define Tcl_InitHashTable_TCL_DECLARED +/* 181 */ +EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, + int keyType); +#endif +#ifndef Tcl_InputBlocked_TCL_DECLARED +#define Tcl_InputBlocked_TCL_DECLARED +/* 182 */ +EXTERN int Tcl_InputBlocked (Tcl_Channel chan); +#endif +#ifndef Tcl_InputBuffered_TCL_DECLARED +#define Tcl_InputBuffered_TCL_DECLARED +/* 183 */ +EXTERN int Tcl_InputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_InterpDeleted_TCL_DECLARED +#define Tcl_InterpDeleted_TCL_DECLARED +/* 184 */ +EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); +#endif +#ifndef Tcl_IsSafe_TCL_DECLARED +#define Tcl_IsSafe_TCL_DECLARED +/* 185 */ +EXTERN int Tcl_IsSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_JoinPath_TCL_DECLARED +#define Tcl_JoinPath_TCL_DECLARED +/* 186 */ +EXTERN char * Tcl_JoinPath (int argc, CONST84 char *const * argv, + Tcl_DString * resultPtr); +#endif +#ifndef Tcl_LinkVar_TCL_DECLARED +#define Tcl_LinkVar_TCL_DECLARED +/* 187 */ +EXTERN int Tcl_LinkVar (Tcl_Interp * interp, + const char * varName, char * addr, int type); +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel_TCL_DECLARED +#define Tcl_MakeFileChannel_TCL_DECLARED +/* 189 */ +EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); +#endif +#ifndef Tcl_MakeSafe_TCL_DECLARED +#define Tcl_MakeSafe_TCL_DECLARED +/* 190 */ +EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED +#define Tcl_MakeTcpClientChannel_TCL_DECLARED +/* 191 */ +EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); +#endif +#ifndef Tcl_Merge_TCL_DECLARED +#define Tcl_Merge_TCL_DECLARED +/* 192 */ +EXTERN char * Tcl_Merge (int argc, CONST84 char *const * argv); +#endif +#ifndef Tcl_NextHashEntry_TCL_DECLARED +#define Tcl_NextHashEntry_TCL_DECLARED +/* 193 */ +EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_NotifyChannel_TCL_DECLARED +#define Tcl_NotifyChannel_TCL_DECLARED +/* 194 */ +EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); +#endif +#ifndef Tcl_ObjGetVar2_TCL_DECLARED +#define Tcl_ObjGetVar2_TCL_DECLARED +/* 195 */ +EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + int flags); +#endif +#ifndef Tcl_ObjSetVar2_TCL_DECLARED +#define Tcl_ObjSetVar2_TCL_DECLARED +/* 196 */ +EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + Tcl_Obj * newValuePtr, int flags); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel_TCL_DECLARED +#define Tcl_OpenFileChannel_TCL_DECLARED +/* 198 */ +EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, + const char * fileName, + const char * modeString, int permissions); +#endif +#ifndef Tcl_OpenTcpClient_TCL_DECLARED +#define Tcl_OpenTcpClient_TCL_DECLARED +/* 199 */ +EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, + const char * address, const char * myaddr, + int myport, int async); +#endif +#ifndef Tcl_OpenTcpServer_TCL_DECLARED +#define Tcl_OpenTcpServer_TCL_DECLARED +/* 200 */ +EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, + const char * host, + Tcl_TcpAcceptProc * acceptProc, + ClientData callbackData); +#endif +#ifndef Tcl_Preserve_TCL_DECLARED +#define Tcl_Preserve_TCL_DECLARED +/* 201 */ +EXTERN void Tcl_Preserve (ClientData data); +#endif +#ifndef Tcl_PrintDouble_TCL_DECLARED +#define Tcl_PrintDouble_TCL_DECLARED +/* 202 */ +EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, + char * dst); +#endif +#ifndef Tcl_PutEnv_TCL_DECLARED +#define Tcl_PutEnv_TCL_DECLARED +/* 203 */ +EXTERN int Tcl_PutEnv (const char * assignment); +#endif +#ifndef Tcl_PosixError_TCL_DECLARED +#define Tcl_PosixError_TCL_DECLARED +/* 204 */ +EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); +#endif +#ifndef Tcl_QueueEvent_TCL_DECLARED +#define Tcl_QueueEvent_TCL_DECLARED +/* 205 */ +EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tcl_Read_TCL_DECLARED +#define Tcl_Read_TCL_DECLARED +/* 206 */ +EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, + int toRead); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval_TCL_DECLARED +#define Tcl_RecordAndEval_TCL_DECLARED +/* 208 */ +EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, + const char * cmd, int flags); +#endif +#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED +#define Tcl_RecordAndEvalObj_TCL_DECLARED +/* 209 */ +EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, + Tcl_Obj * cmdPtr, int flags); +#endif +#ifndef Tcl_RegisterChannel_TCL_DECLARED +#define Tcl_RegisterChannel_TCL_DECLARED +/* 210 */ +EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_RegisterObjType_TCL_DECLARED +#define Tcl_RegisterObjType_TCL_DECLARED +/* 211 */ +EXTERN void Tcl_RegisterObjType (const Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_RegExpCompile_TCL_DECLARED +#define Tcl_RegExpCompile_TCL_DECLARED +/* 212 */ +EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, + const char * pattern); +#endif +#ifndef Tcl_RegExpExec_TCL_DECLARED +#define Tcl_RegExpExec_TCL_DECLARED +/* 213 */ +EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, + Tcl_RegExp regexp, const char * text, + const char * start); +#endif +#ifndef Tcl_RegExpMatch_TCL_DECLARED +#define Tcl_RegExpMatch_TCL_DECLARED +/* 214 */ +EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, + const char * text, const char * pattern); +#endif +#ifndef Tcl_RegExpRange_TCL_DECLARED +#define Tcl_RegExpRange_TCL_DECLARED +/* 215 */ +EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, + CONST84 char ** startPtr, + CONST84 char ** endPtr); +#endif +#ifndef Tcl_Release_TCL_DECLARED +#define Tcl_Release_TCL_DECLARED +/* 216 */ +EXTERN void Tcl_Release (ClientData clientData); +#endif +#ifndef Tcl_ResetResult_TCL_DECLARED +#define Tcl_ResetResult_TCL_DECLARED +/* 217 */ +EXTERN void Tcl_ResetResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_ScanElement_TCL_DECLARED +#define Tcl_ScanElement_TCL_DECLARED +/* 218 */ +EXTERN int Tcl_ScanElement (const char * str, int * flagPtr); +#endif +#ifndef Tcl_ScanCountedElement_TCL_DECLARED +#define Tcl_ScanCountedElement_TCL_DECLARED +/* 219 */ +EXTERN int Tcl_ScanCountedElement (const char * str, int length, + int * flagPtr); +#endif +#ifndef Tcl_SeekOld_TCL_DECLARED +#define Tcl_SeekOld_TCL_DECLARED +/* 220 */ +EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); +#endif +#ifndef Tcl_ServiceAll_TCL_DECLARED +#define Tcl_ServiceAll_TCL_DECLARED +/* 221 */ +EXTERN int Tcl_ServiceAll (void); +#endif +#ifndef Tcl_ServiceEvent_TCL_DECLARED +#define Tcl_ServiceEvent_TCL_DECLARED +/* 222 */ +EXTERN int Tcl_ServiceEvent (int flags); +#endif +#ifndef Tcl_SetAssocData_TCL_DECLARED +#define Tcl_SetAssocData_TCL_DECLARED +/* 223 */ +EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, + const char * name, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED +#define Tcl_SetChannelBufferSize_TCL_DECLARED +/* 224 */ +EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); +#endif +#ifndef Tcl_SetChannelOption_TCL_DECLARED +#define Tcl_SetChannelOption_TCL_DECLARED +/* 225 */ +EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, const char * optionName, + const char * newValue); +#endif +#ifndef Tcl_SetCommandInfo_TCL_DECLARED +#define Tcl_SetCommandInfo_TCL_DECLARED +/* 226 */ +EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, + const char * cmdName, + const Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_SetErrno_TCL_DECLARED +#define Tcl_SetErrno_TCL_DECLARED +/* 227 */ +EXTERN void Tcl_SetErrno (int err); +#endif +#ifndef Tcl_SetErrorCode_TCL_DECLARED +#define Tcl_SetErrorCode_TCL_DECLARED +/* 228 */ +EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED +#define Tcl_SetMaxBlockTime_TCL_DECLARED +/* 229 */ +EXTERN void Tcl_SetMaxBlockTime (const Tcl_Time * timePtr); +#endif +#ifndef Tcl_SetPanicProc_TCL_DECLARED +#define Tcl_SetPanicProc_TCL_DECLARED +/* 230 */ +EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); +#endif +#ifndef Tcl_SetRecursionLimit_TCL_DECLARED +#define Tcl_SetRecursionLimit_TCL_DECLARED +/* 231 */ +EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, + int depth); +#endif +#ifndef Tcl_SetResult_TCL_DECLARED +#define Tcl_SetResult_TCL_DECLARED +/* 232 */ +EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_SetServiceMode_TCL_DECLARED +#define Tcl_SetServiceMode_TCL_DECLARED +/* 233 */ +EXTERN int Tcl_SetServiceMode (int mode); +#endif +#ifndef Tcl_SetObjErrorCode_TCL_DECLARED +#define Tcl_SetObjErrorCode_TCL_DECLARED +/* 234 */ +EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, + Tcl_Obj * errorObjPtr); +#endif +#ifndef Tcl_SetObjResult_TCL_DECLARED +#define Tcl_SetObjResult_TCL_DECLARED +/* 235 */ +EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr); +#endif +#ifndef Tcl_SetStdChannel_TCL_DECLARED +#define Tcl_SetStdChannel_TCL_DECLARED +/* 236 */ +EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); +#endif +#ifndef Tcl_SetVar_TCL_DECLARED +#define Tcl_SetVar_TCL_DECLARED +/* 237 */ +EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, + const char * varName, const char * newValue, + int flags); +#endif +#ifndef Tcl_SetVar2_TCL_DECLARED +#define Tcl_SetVar2_TCL_DECLARED +/* 238 */ +EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + const char * newValue, int flags); +#endif +#ifndef Tcl_SignalId_TCL_DECLARED +#define Tcl_SignalId_TCL_DECLARED +/* 239 */ +EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); +#endif +#ifndef Tcl_SignalMsg_TCL_DECLARED +#define Tcl_SignalMsg_TCL_DECLARED +/* 240 */ +EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); +#endif +#ifndef Tcl_SourceRCFile_TCL_DECLARED +#define Tcl_SourceRCFile_TCL_DECLARED +/* 241 */ +EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); +#endif +#ifndef Tcl_SplitList_TCL_DECLARED +#define Tcl_SplitList_TCL_DECLARED +/* 242 */ +EXTERN int Tcl_SplitList (Tcl_Interp * interp, + const char * listStr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_SplitPath_TCL_DECLARED +#define Tcl_SplitPath_TCL_DECLARED +/* 243 */ +EXTERN void Tcl_SplitPath (const char * path, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_StaticPackage_TCL_DECLARED +#define Tcl_StaticPackage_TCL_DECLARED +/* 244 */ +EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, + const char * pkgName, + Tcl_PackageInitProc * initProc, + Tcl_PackageInitProc * safeInitProc); +#endif +#ifndef Tcl_StringMatch_TCL_DECLARED +#define Tcl_StringMatch_TCL_DECLARED +/* 245 */ +EXTERN int Tcl_StringMatch (const char * str, + const char * pattern); +#endif +#ifndef Tcl_TellOld_TCL_DECLARED +#define Tcl_TellOld_TCL_DECLARED +/* 246 */ +EXTERN int Tcl_TellOld (Tcl_Channel chan); +#endif +#ifndef Tcl_TraceVar_TCL_DECLARED +#define Tcl_TraceVar_TCL_DECLARED +/* 247 */ +EXTERN int Tcl_TraceVar (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TraceVar2_TCL_DECLARED +#define Tcl_TraceVar2_TCL_DECLARED +/* 248 */ +EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TranslateFileName_TCL_DECLARED +#define Tcl_TranslateFileName_TCL_DECLARED +/* 249 */ +EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, + const char * name, Tcl_DString * bufferPtr); +#endif +#ifndef Tcl_Ungets_TCL_DECLARED +#define Tcl_Ungets_TCL_DECLARED +/* 250 */ +EXTERN int Tcl_Ungets (Tcl_Channel chan, const char * str, + int len, int atHead); +#endif +#ifndef Tcl_UnlinkVar_TCL_DECLARED +#define Tcl_UnlinkVar_TCL_DECLARED +/* 251 */ +EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, + const char * varName); +#endif +#ifndef Tcl_UnregisterChannel_TCL_DECLARED +#define Tcl_UnregisterChannel_TCL_DECLARED +/* 252 */ +EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_UnsetVar_TCL_DECLARED +#define Tcl_UnsetVar_TCL_DECLARED +/* 253 */ +EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, + const char * varName, int flags); +#endif +#ifndef Tcl_UnsetVar2_TCL_DECLARED +#define Tcl_UnsetVar2_TCL_DECLARED +/* 254 */ +EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags); +#endif +#ifndef Tcl_UntraceVar_TCL_DECLARED +#define Tcl_UntraceVar_TCL_DECLARED +/* 255 */ +EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceVar2_TCL_DECLARED +#define Tcl_UntraceVar2_TCL_DECLARED +/* 256 */ +EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED +#define Tcl_UpdateLinkedVar_TCL_DECLARED +/* 257 */ +EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, + const char * varName); +#endif +#ifndef Tcl_UpVar_TCL_DECLARED +#define Tcl_UpVar_TCL_DECLARED +/* 258 */ +EXTERN int Tcl_UpVar (Tcl_Interp * interp, + const char * frameName, const char * varName, + const char * localName, int flags); +#endif +#ifndef Tcl_UpVar2_TCL_DECLARED +#define Tcl_UpVar2_TCL_DECLARED +/* 259 */ +EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, + const char * frameName, const char * part1, + const char * part2, const char * localName, + int flags); +#endif +#ifndef Tcl_VarEval_TCL_DECLARED +#define Tcl_VarEval_TCL_DECLARED +/* 260 */ +EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_VarTraceInfo_TCL_DECLARED +#define Tcl_VarTraceInfo_TCL_DECLARED +/* 261 */ +EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_VarTraceInfo2_TCL_DECLARED +#define Tcl_VarTraceInfo2_TCL_DECLARED +/* 262 */ +EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_Write_TCL_DECLARED +#define Tcl_Write_TCL_DECLARED +/* 263 */ +EXTERN int Tcl_Write (Tcl_Channel chan, const char * s, + int slen); +#endif +#ifndef Tcl_WrongNumArgs_TCL_DECLARED +#define Tcl_WrongNumArgs_TCL_DECLARED +/* 264 */ +EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], const char * message); +#endif +#ifndef Tcl_DumpActiveMemory_TCL_DECLARED +#define Tcl_DumpActiveMemory_TCL_DECLARED +/* 265 */ +EXTERN int Tcl_DumpActiveMemory (const char * fileName); +#endif +#ifndef Tcl_ValidateAllMemory_TCL_DECLARED +#define Tcl_ValidateAllMemory_TCL_DECLARED +/* 266 */ +EXTERN void Tcl_ValidateAllMemory (const char * file, int line); +#endif +#ifndef Tcl_AppendResultVA_TCL_DECLARED +#define Tcl_AppendResultVA_TCL_DECLARED +/* 267 */ +EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED +#define Tcl_AppendStringsToObjVA_TCL_DECLARED +/* 268 */ +EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, + va_list argList); +#endif +#ifndef Tcl_HashStats_TCL_DECLARED +#define Tcl_HashStats_TCL_DECLARED +/* 269 */ +EXTERN char * Tcl_HashStats (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_ParseVar_TCL_DECLARED +#define Tcl_ParseVar_TCL_DECLARED +/* 270 */ +EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, + const char * start, CONST84 char ** termPtr); +#endif +#ifndef Tcl_PkgPresent_TCL_DECLARED +#define Tcl_PkgPresent_TCL_DECLARED +/* 271 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, + const char * name, const char * version, + int exact); +#endif +#ifndef Tcl_PkgPresentEx_TCL_DECLARED +#define Tcl_PkgPresentEx_TCL_DECLARED +/* 272 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, + const char * name, const char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_PkgProvide_TCL_DECLARED +#define Tcl_PkgProvide_TCL_DECLARED +/* 273 */ +EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, + const char * name, const char * version); +#endif +#ifndef Tcl_PkgRequire_TCL_DECLARED +#define Tcl_PkgRequire_TCL_DECLARED +/* 274 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, + const char * name, const char * version, + int exact); +#endif +#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED +#define Tcl_SetErrorCodeVA_TCL_DECLARED +/* 275 */ +EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_VarEvalVA_TCL_DECLARED +#define Tcl_VarEvalVA_TCL_DECLARED +/* 276 */ +EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); +#endif +#ifndef Tcl_WaitPid_TCL_DECLARED +#define Tcl_WaitPid_TCL_DECLARED +/* 277 */ +EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); +#endif +#ifndef Tcl_PanicVA_TCL_DECLARED +#define Tcl_PanicVA_TCL_DECLARED +/* 278 */ +EXTERN void Tcl_PanicVA (const char * format, va_list argList); +#endif +#ifndef Tcl_GetVersion_TCL_DECLARED +#define Tcl_GetVersion_TCL_DECLARED +/* 279 */ +EXTERN void Tcl_GetVersion (int * major, int * minor, + int * patchLevel, int * type); +#endif +#ifndef Tcl_InitMemory_TCL_DECLARED +#define Tcl_InitMemory_TCL_DECLARED +/* 280 */ +EXTERN void Tcl_InitMemory (Tcl_Interp * interp); +#endif +#ifndef Tcl_StackChannel_TCL_DECLARED +#define Tcl_StackChannel_TCL_DECLARED +/* 281 */ +EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, + const Tcl_ChannelType * typePtr, + ClientData instanceData, int mask, + Tcl_Channel prevChan); +#endif +#ifndef Tcl_UnstackChannel_TCL_DECLARED +#define Tcl_UnstackChannel_TCL_DECLARED +/* 282 */ +EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_GetStackedChannel_TCL_DECLARED +#define Tcl_GetStackedChannel_TCL_DECLARED +/* 283 */ +EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_SetMainLoop_TCL_DECLARED +#define Tcl_SetMainLoop_TCL_DECLARED +/* 284 */ +EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj_TCL_DECLARED +#define Tcl_AppendObjToObj_TCL_DECLARED +/* 286 */ +EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, + Tcl_Obj * appendObjPtr); +#endif +#ifndef Tcl_CreateEncoding_TCL_DECLARED +#define Tcl_CreateEncoding_TCL_DECLARED +/* 287 */ +EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); +#endif +#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED +#define Tcl_CreateThreadExitHandler_TCL_DECLARED +/* 288 */ +EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED +#define Tcl_DeleteThreadExitHandler_TCL_DECLARED +/* 289 */ +EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DiscardResult_TCL_DECLARED +#define Tcl_DiscardResult_TCL_DECLARED +/* 290 */ +EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_EvalEx_TCL_DECLARED +#define Tcl_EvalEx_TCL_DECLARED +/* 291 */ +EXTERN int Tcl_EvalEx (Tcl_Interp * interp, const char * script, + int numBytes, int flags); +#endif +#ifndef Tcl_EvalObjv_TCL_DECLARED +#define Tcl_EvalObjv_TCL_DECLARED +/* 292 */ +EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags); +#endif +#ifndef Tcl_EvalObjEx_TCL_DECLARED +#define Tcl_EvalObjEx_TCL_DECLARED +/* 293 */ +EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_ExitThread_TCL_DECLARED +#define Tcl_ExitThread_TCL_DECLARED +/* 294 */ +EXTERN void Tcl_ExitThread (int status); +#endif +#ifndef Tcl_ExternalToUtf_TCL_DECLARED +#define Tcl_ExternalToUtf_TCL_DECLARED +/* 295 */ +EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, + Tcl_Encoding encoding, const char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED +#define Tcl_ExternalToUtfDString_TCL_DECLARED +/* 296 */ +EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, + const char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_FinalizeThread_TCL_DECLARED +#define Tcl_FinalizeThread_TCL_DECLARED +/* 297 */ +EXTERN void Tcl_FinalizeThread (void); +#endif +#ifndef Tcl_FinalizeNotifier_TCL_DECLARED +#define Tcl_FinalizeNotifier_TCL_DECLARED +/* 298 */ +EXTERN void Tcl_FinalizeNotifier (ClientData clientData); +#endif +#ifndef Tcl_FreeEncoding_TCL_DECLARED +#define Tcl_FreeEncoding_TCL_DECLARED +/* 299 */ +EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetCurrentThread_TCL_DECLARED +#define Tcl_GetCurrentThread_TCL_DECLARED +/* 300 */ +EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); +#endif +#ifndef Tcl_GetEncoding_TCL_DECLARED +#define Tcl_GetEncoding_TCL_DECLARED +/* 301 */ +EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, + const char * name); +#endif +#ifndef Tcl_GetEncodingName_TCL_DECLARED +#define Tcl_GetEncodingName_TCL_DECLARED +/* 302 */ +EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetEncodingNames_TCL_DECLARED +#define Tcl_GetEncodingNames_TCL_DECLARED +/* 303 */ +EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED +#define Tcl_GetIndexFromObjStruct_TCL_DECLARED +/* 304 */ +EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, + Tcl_Obj * objPtr, const VOID * tablePtr, + int offset, const char * msg, int flags, + int * indexPtr); +#endif +#ifndef Tcl_GetThreadData_TCL_DECLARED +#define Tcl_GetThreadData_TCL_DECLARED +/* 305 */ +EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, + int size); +#endif +#ifndef Tcl_GetVar2Ex_TCL_DECLARED +#define Tcl_GetVar2Ex_TCL_DECLARED +/* 306 */ +EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags); +#endif +#ifndef Tcl_InitNotifier_TCL_DECLARED +#define Tcl_InitNotifier_TCL_DECLARED +/* 307 */ +EXTERN ClientData Tcl_InitNotifier (void); +#endif +#ifndef Tcl_MutexLock_TCL_DECLARED +#define Tcl_MutexLock_TCL_DECLARED +/* 308 */ +EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_MutexUnlock_TCL_DECLARED +#define Tcl_MutexUnlock_TCL_DECLARED +/* 309 */ +EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_ConditionNotify_TCL_DECLARED +#define Tcl_ConditionNotify_TCL_DECLARED +/* 310 */ +EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_ConditionWait_TCL_DECLARED +#define Tcl_ConditionWait_TCL_DECLARED +/* 311 */ +EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, + Tcl_Mutex * mutexPtr, + const Tcl_Time * timePtr); +#endif +#ifndef Tcl_NumUtfChars_TCL_DECLARED +#define Tcl_NumUtfChars_TCL_DECLARED +/* 312 */ +EXTERN int Tcl_NumUtfChars (const char * src, int length); +#endif +#ifndef Tcl_ReadChars_TCL_DECLARED +#define Tcl_ReadChars_TCL_DECLARED +/* 313 */ +EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, + int charsToRead, int appendFlag); +#endif +#ifndef Tcl_RestoreResult_TCL_DECLARED +#define Tcl_RestoreResult_TCL_DECLARED +/* 314 */ +EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SaveResult_TCL_DECLARED +#define Tcl_SaveResult_TCL_DECLARED +/* 315 */ +EXTERN void Tcl_SaveResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SetSystemEncoding_TCL_DECLARED +#define Tcl_SetSystemEncoding_TCL_DECLARED +/* 316 */ +EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, + const char * name); +#endif +#ifndef Tcl_SetVar2Ex_TCL_DECLARED +#define Tcl_SetVar2Ex_TCL_DECLARED +/* 317 */ +EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, + const char * part1, const char * part2, + Tcl_Obj * newValuePtr, int flags); +#endif +#ifndef Tcl_ThreadAlert_TCL_DECLARED +#define Tcl_ThreadAlert_TCL_DECLARED +/* 318 */ +EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); +#endif +#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED +#define Tcl_ThreadQueueEvent_TCL_DECLARED +/* 319 */ +EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, + Tcl_Event * evPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tcl_UniCharAtIndex_TCL_DECLARED +#define Tcl_UniCharAtIndex_TCL_DECLARED +/* 320 */ +EXTERN Tcl_UniChar Tcl_UniCharAtIndex (const char * src, int index); +#endif +#ifndef Tcl_UniCharToLower_TCL_DECLARED +#define Tcl_UniCharToLower_TCL_DECLARED +/* 321 */ +EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); +#endif +#ifndef Tcl_UniCharToTitle_TCL_DECLARED +#define Tcl_UniCharToTitle_TCL_DECLARED +/* 322 */ +EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); +#endif +#ifndef Tcl_UniCharToUpper_TCL_DECLARED +#define Tcl_UniCharToUpper_TCL_DECLARED +/* 323 */ +EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); +#endif +#ifndef Tcl_UniCharToUtf_TCL_DECLARED +#define Tcl_UniCharToUtf_TCL_DECLARED +/* 324 */ +EXTERN int Tcl_UniCharToUtf (int ch, char * buf); +#endif +#ifndef Tcl_UtfAtIndex_TCL_DECLARED +#define Tcl_UtfAtIndex_TCL_DECLARED +/* 325 */ +EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (const char * src, int index); +#endif +#ifndef Tcl_UtfCharComplete_TCL_DECLARED +#define Tcl_UtfCharComplete_TCL_DECLARED +/* 326 */ +EXTERN int Tcl_UtfCharComplete (const char * src, int length); +#endif +#ifndef Tcl_UtfBackslash_TCL_DECLARED +#define Tcl_UtfBackslash_TCL_DECLARED +/* 327 */ +EXTERN int Tcl_UtfBackslash (const char * src, int * readPtr, + char * dst); +#endif +#ifndef Tcl_UtfFindFirst_TCL_DECLARED +#define Tcl_UtfFindFirst_TCL_DECLARED +/* 328 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (const char * src, int ch); +#endif +#ifndef Tcl_UtfFindLast_TCL_DECLARED +#define Tcl_UtfFindLast_TCL_DECLARED +/* 329 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindLast (const char * src, int ch); +#endif +#ifndef Tcl_UtfNext_TCL_DECLARED +#define Tcl_UtfNext_TCL_DECLARED +/* 330 */ +EXTERN CONST84_RETURN char * Tcl_UtfNext (const char * src); +#endif +#ifndef Tcl_UtfPrev_TCL_DECLARED +#define Tcl_UtfPrev_TCL_DECLARED +/* 331 */ +EXTERN CONST84_RETURN char * Tcl_UtfPrev (const char * src, + const char * start); +#endif +#ifndef Tcl_UtfToExternal_TCL_DECLARED +#define Tcl_UtfToExternal_TCL_DECLARED +/* 332 */ +EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, + Tcl_Encoding encoding, const char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_UtfToExternalDString_TCL_DECLARED +#define Tcl_UtfToExternalDString_TCL_DECLARED +/* 333 */ +EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, + const char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToLower_TCL_DECLARED +#define Tcl_UtfToLower_TCL_DECLARED +/* 334 */ +EXTERN int Tcl_UtfToLower (char * src); +#endif +#ifndef Tcl_UtfToTitle_TCL_DECLARED +#define Tcl_UtfToTitle_TCL_DECLARED +/* 335 */ +EXTERN int Tcl_UtfToTitle (char * src); +#endif +#ifndef Tcl_UtfToUniChar_TCL_DECLARED +#define Tcl_UtfToUniChar_TCL_DECLARED +/* 336 */ +EXTERN int Tcl_UtfToUniChar (const char * src, + Tcl_UniChar * chPtr); +#endif +#ifndef Tcl_UtfToUpper_TCL_DECLARED +#define Tcl_UtfToUpper_TCL_DECLARED +/* 337 */ +EXTERN int Tcl_UtfToUpper (char * src); +#endif +#ifndef Tcl_WriteChars_TCL_DECLARED +#define Tcl_WriteChars_TCL_DECLARED +/* 338 */ +EXTERN int Tcl_WriteChars (Tcl_Channel chan, const char * src, + int srcLen); +#endif +#ifndef Tcl_WriteObj_TCL_DECLARED +#define Tcl_WriteObj_TCL_DECLARED +/* 339 */ +EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetString_TCL_DECLARED +#define Tcl_GetString_TCL_DECLARED +/* 340 */ +EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED +#define Tcl_GetDefaultEncodingDir_TCL_DECLARED +/* 341 */ +EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); +#endif +#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED +#define Tcl_SetDefaultEncodingDir_TCL_DECLARED +/* 342 */ +EXTERN void Tcl_SetDefaultEncodingDir (const char * path); +#endif +#ifndef Tcl_AlertNotifier_TCL_DECLARED +#define Tcl_AlertNotifier_TCL_DECLARED +/* 343 */ +EXTERN void Tcl_AlertNotifier (ClientData clientData); +#endif +#ifndef Tcl_ServiceModeHook_TCL_DECLARED +#define Tcl_ServiceModeHook_TCL_DECLARED +/* 344 */ +EXTERN void Tcl_ServiceModeHook (int mode); +#endif +#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED +#define Tcl_UniCharIsAlnum_TCL_DECLARED +/* 345 */ +EXTERN int Tcl_UniCharIsAlnum (int ch); +#endif +#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED +#define Tcl_UniCharIsAlpha_TCL_DECLARED +/* 346 */ +EXTERN int Tcl_UniCharIsAlpha (int ch); +#endif +#ifndef Tcl_UniCharIsDigit_TCL_DECLARED +#define Tcl_UniCharIsDigit_TCL_DECLARED +/* 347 */ +EXTERN int Tcl_UniCharIsDigit (int ch); +#endif +#ifndef Tcl_UniCharIsLower_TCL_DECLARED +#define Tcl_UniCharIsLower_TCL_DECLARED +/* 348 */ +EXTERN int Tcl_UniCharIsLower (int ch); +#endif +#ifndef Tcl_UniCharIsSpace_TCL_DECLARED +#define Tcl_UniCharIsSpace_TCL_DECLARED +/* 349 */ +EXTERN int Tcl_UniCharIsSpace (int ch); +#endif +#ifndef Tcl_UniCharIsUpper_TCL_DECLARED +#define Tcl_UniCharIsUpper_TCL_DECLARED +/* 350 */ +EXTERN int Tcl_UniCharIsUpper (int ch); +#endif +#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED +#define Tcl_UniCharIsWordChar_TCL_DECLARED +/* 351 */ +EXTERN int Tcl_UniCharIsWordChar (int ch); +#endif +#ifndef Tcl_UniCharLen_TCL_DECLARED +#define Tcl_UniCharLen_TCL_DECLARED +/* 352 */ +EXTERN int Tcl_UniCharLen (const Tcl_UniChar * uniStr); +#endif +#ifndef Tcl_UniCharNcmp_TCL_DECLARED +#define Tcl_UniCharNcmp_TCL_DECLARED +/* 353 */ +EXTERN int Tcl_UniCharNcmp (const Tcl_UniChar * ucs, + const Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED +#define Tcl_UniCharToUtfDString_TCL_DECLARED +/* 354 */ +EXTERN char * Tcl_UniCharToUtfDString (const Tcl_UniChar * uniStr, + int uniLength, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED +#define Tcl_UtfToUniCharDString_TCL_DECLARED +/* 355 */ +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (const char * src, + int length, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED +#define Tcl_GetRegExpFromObj_TCL_DECLARED +/* 356 */ +EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, + Tcl_Obj * patObj, int flags); +#endif +#ifndef Tcl_EvalTokens_TCL_DECLARED +#define Tcl_EvalTokens_TCL_DECLARED +/* 357 */ +EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_FreeParse_TCL_DECLARED +#define Tcl_FreeParse_TCL_DECLARED +/* 358 */ +EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_LogCommandInfo_TCL_DECLARED +#define Tcl_LogCommandInfo_TCL_DECLARED +/* 359 */ +EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, + const char * script, const char * command, + int length); +#endif +#ifndef Tcl_ParseBraces_TCL_DECLARED +#define Tcl_ParseBraces_TCL_DECLARED +/* 360 */ +EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseCommand_TCL_DECLARED +#define Tcl_ParseCommand_TCL_DECLARED +/* 361 */ +EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, + const char * start, int numBytes, int nested, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseExpr_TCL_DECLARED +#define Tcl_ParseExpr_TCL_DECLARED +/* 362 */ +EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseQuotedString_TCL_DECLARED +#define Tcl_ParseQuotedString_TCL_DECLARED +/* 363 */ +EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseVarName_TCL_DECLARED +#define Tcl_ParseVarName_TCL_DECLARED +/* 364 */ +EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append); +#endif +#ifndef Tcl_GetCwd_TCL_DECLARED +#define Tcl_GetCwd_TCL_DECLARED +/* 365 */ +EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, + Tcl_DString * cwdPtr); +#endif +#ifndef Tcl_Chdir_TCL_DECLARED +#define Tcl_Chdir_TCL_DECLARED +/* 366 */ +EXTERN int Tcl_Chdir (const char * dirName); +#endif +#ifndef Tcl_Access_TCL_DECLARED +#define Tcl_Access_TCL_DECLARED +/* 367 */ +EXTERN int Tcl_Access (const char * path, int mode); +#endif +#ifndef Tcl_Stat_TCL_DECLARED +#define Tcl_Stat_TCL_DECLARED +/* 368 */ +EXTERN int Tcl_Stat (const char * path, struct stat * bufPtr); +#endif +#ifndef Tcl_UtfNcmp_TCL_DECLARED +#define Tcl_UtfNcmp_TCL_DECLARED +/* 369 */ +EXTERN int Tcl_UtfNcmp (const char * s1, const char * s2, + unsigned long n); +#endif +#ifndef Tcl_UtfNcasecmp_TCL_DECLARED +#define Tcl_UtfNcasecmp_TCL_DECLARED +/* 370 */ +EXTERN int Tcl_UtfNcasecmp (const char * s1, const char * s2, + unsigned long n); +#endif +#ifndef Tcl_StringCaseMatch_TCL_DECLARED +#define Tcl_StringCaseMatch_TCL_DECLARED +/* 371 */ +EXTERN int Tcl_StringCaseMatch (const char * str, + const char * pattern, int nocase); +#endif +#ifndef Tcl_UniCharIsControl_TCL_DECLARED +#define Tcl_UniCharIsControl_TCL_DECLARED +/* 372 */ +EXTERN int Tcl_UniCharIsControl (int ch); +#endif +#ifndef Tcl_UniCharIsGraph_TCL_DECLARED +#define Tcl_UniCharIsGraph_TCL_DECLARED +/* 373 */ +EXTERN int Tcl_UniCharIsGraph (int ch); +#endif +#ifndef Tcl_UniCharIsPrint_TCL_DECLARED +#define Tcl_UniCharIsPrint_TCL_DECLARED +/* 374 */ +EXTERN int Tcl_UniCharIsPrint (int ch); +#endif +#ifndef Tcl_UniCharIsPunct_TCL_DECLARED +#define Tcl_UniCharIsPunct_TCL_DECLARED +/* 375 */ +EXTERN int Tcl_UniCharIsPunct (int ch); +#endif +#ifndef Tcl_RegExpExecObj_TCL_DECLARED +#define Tcl_RegExpExecObj_TCL_DECLARED +/* 376 */ +EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, + Tcl_RegExp regexp, Tcl_Obj * textObj, + int offset, int nmatches, int flags); +#endif +#ifndef Tcl_RegExpGetInfo_TCL_DECLARED +#define Tcl_RegExpGetInfo_TCL_DECLARED +/* 377 */ +EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, + Tcl_RegExpInfo * infoPtr); +#endif +#ifndef Tcl_NewUnicodeObj_TCL_DECLARED +#define Tcl_NewUnicodeObj_TCL_DECLARED +/* 378 */ +EXTERN Tcl_Obj * Tcl_NewUnicodeObj (const Tcl_UniChar * unicode, + int numChars); +#endif +#ifndef Tcl_SetUnicodeObj_TCL_DECLARED +#define Tcl_SetUnicodeObj_TCL_DECLARED +/* 379 */ +EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, + const Tcl_UniChar * unicode, int numChars); +#endif +#ifndef Tcl_GetCharLength_TCL_DECLARED +#define Tcl_GetCharLength_TCL_DECLARED +/* 380 */ +EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetUniChar_TCL_DECLARED +#define Tcl_GetUniChar_TCL_DECLARED +/* 381 */ +EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); +#endif +#ifndef Tcl_GetUnicode_TCL_DECLARED +#define Tcl_GetUnicode_TCL_DECLARED +/* 382 */ +EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetRange_TCL_DECLARED +#define Tcl_GetRange_TCL_DECLARED +/* 383 */ +EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); +#endif +#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED +#define Tcl_AppendUnicodeToObj_TCL_DECLARED +/* 384 */ +EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, + const Tcl_UniChar * unicode, int length); +#endif +#ifndef Tcl_RegExpMatchObj_TCL_DECLARED +#define Tcl_RegExpMatchObj_TCL_DECLARED +/* 385 */ +EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, + Tcl_Obj * textObj, Tcl_Obj * patternObj); +#endif +#ifndef Tcl_SetNotifier_TCL_DECLARED +#define Tcl_SetNotifier_TCL_DECLARED +/* 386 */ +EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); +#endif +#ifndef Tcl_GetAllocMutex_TCL_DECLARED +#define Tcl_GetAllocMutex_TCL_DECLARED +/* 387 */ +EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); +#endif +#ifndef Tcl_GetChannelNames_TCL_DECLARED +#define Tcl_GetChannelNames_TCL_DECLARED +/* 388 */ +EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED +#define Tcl_GetChannelNamesEx_TCL_DECLARED +/* 389 */ +EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, + const char * pattern); +#endif +#ifndef Tcl_ProcObjCmd_TCL_DECLARED +#define Tcl_ProcObjCmd_TCL_DECLARED +/* 390 */ +EXTERN int Tcl_ProcObjCmd (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_ConditionFinalize_TCL_DECLARED +#define Tcl_ConditionFinalize_TCL_DECLARED +/* 391 */ +EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_MutexFinalize_TCL_DECLARED +#define Tcl_MutexFinalize_TCL_DECLARED +/* 392 */ +EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); +#endif +#ifndef Tcl_CreateThread_TCL_DECLARED +#define Tcl_CreateThread_TCL_DECLARED +/* 393 */ +EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, + Tcl_ThreadCreateProc proc, + ClientData clientData, int stackSize, + int flags); +#endif +#ifndef Tcl_ReadRaw_TCL_DECLARED +#define Tcl_ReadRaw_TCL_DECLARED +/* 394 */ +EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, + int bytesToRead); +#endif +#ifndef Tcl_WriteRaw_TCL_DECLARED +#define Tcl_WriteRaw_TCL_DECLARED +/* 395 */ +EXTERN int Tcl_WriteRaw (Tcl_Channel chan, const char * src, + int srcLen); +#endif +#ifndef Tcl_GetTopChannel_TCL_DECLARED +#define Tcl_GetTopChannel_TCL_DECLARED +/* 396 */ +EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelBuffered_TCL_DECLARED +#define Tcl_ChannelBuffered_TCL_DECLARED +/* 397 */ +EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelName_TCL_DECLARED +#define Tcl_ChannelName_TCL_DECLARED +/* 398 */ +EXTERN CONST84_RETURN char * Tcl_ChannelName ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelVersion_TCL_DECLARED +#define Tcl_ChannelVersion_TCL_DECLARED +/* 399 */ +EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED +#define Tcl_ChannelBlockModeProc_TCL_DECLARED +/* 400 */ +EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelCloseProc_TCL_DECLARED +#define Tcl_ChannelCloseProc_TCL_DECLARED +/* 401 */ +EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED +#define Tcl_ChannelClose2Proc_TCL_DECLARED +/* 402 */ +EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelInputProc_TCL_DECLARED +#define Tcl_ChannelInputProc_TCL_DECLARED +/* 403 */ +EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelOutputProc_TCL_DECLARED +#define Tcl_ChannelOutputProc_TCL_DECLARED +/* 404 */ +EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSeekProc_TCL_DECLARED +#define Tcl_ChannelSeekProc_TCL_DECLARED +/* 405 */ +EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED +#define Tcl_ChannelSetOptionProc_TCL_DECLARED +/* 406 */ +EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED +#define Tcl_ChannelGetOptionProc_TCL_DECLARED +/* 407 */ +EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelWatchProc_TCL_DECLARED +#define Tcl_ChannelWatchProc_TCL_DECLARED +/* 408 */ +EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED +#define Tcl_ChannelGetHandleProc_TCL_DECLARED +/* 409 */ +EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelFlushProc_TCL_DECLARED +#define Tcl_ChannelFlushProc_TCL_DECLARED +/* 410 */ +EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED +#define Tcl_ChannelHandlerProc_TCL_DECLARED +/* 411 */ +EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_JoinThread_TCL_DECLARED +#define Tcl_JoinThread_TCL_DECLARED +/* 412 */ +EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int * result); +#endif +#ifndef Tcl_IsChannelShared_TCL_DECLARED +#define Tcl_IsChannelShared_TCL_DECLARED +/* 413 */ +EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelRegistered_TCL_DECLARED +#define Tcl_IsChannelRegistered_TCL_DECLARED +/* 414 */ +EXTERN int Tcl_IsChannelRegistered (Tcl_Interp * interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_CutChannel_TCL_DECLARED +#define Tcl_CutChannel_TCL_DECLARED +/* 415 */ +EXTERN void Tcl_CutChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_SpliceChannel_TCL_DECLARED +#define Tcl_SpliceChannel_TCL_DECLARED +/* 416 */ +EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED +#define Tcl_ClearChannelHandlers_TCL_DECLARED +/* 417 */ +EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelExisting_TCL_DECLARED +#define Tcl_IsChannelExisting_TCL_DECLARED +/* 418 */ +EXTERN int Tcl_IsChannelExisting (const char * channelName); +#endif +#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED +#define Tcl_UniCharNcasecmp_TCL_DECLARED +/* 419 */ +EXTERN int Tcl_UniCharNcasecmp (const Tcl_UniChar * ucs, + const Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED +#define Tcl_UniCharCaseMatch_TCL_DECLARED +/* 420 */ +EXTERN int Tcl_UniCharCaseMatch (const Tcl_UniChar * uniStr, + const Tcl_UniChar * uniPattern, int nocase); +#endif +#ifndef Tcl_FindHashEntry_TCL_DECLARED +#define Tcl_FindHashEntry_TCL_DECLARED +/* 421 */ +EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, + const char * key); +#endif +#ifndef Tcl_CreateHashEntry_TCL_DECLARED +#define Tcl_CreateHashEntry_TCL_DECLARED +/* 422 */ +EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, + const char * key, int * newPtr); +#endif +#ifndef Tcl_InitCustomHashTable_TCL_DECLARED +#define Tcl_InitCustomHashTable_TCL_DECLARED +/* 423 */ +EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, + int keyType, const Tcl_HashKeyType * typePtr); +#endif +#ifndef Tcl_InitObjHashTable_TCL_DECLARED +#define Tcl_InitObjHashTable_TCL_DECLARED +/* 424 */ +EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_CommandTraceInfo_TCL_DECLARED +#define Tcl_CommandTraceInfo_TCL_DECLARED +/* 425 */ +EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_TraceCommand_TCL_DECLARED +#define Tcl_TraceCommand_TCL_DECLARED +/* 426 */ +EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceCommand_TCL_DECLARED +#define Tcl_UntraceCommand_TCL_DECLARED +/* 427 */ +EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AttemptAlloc_TCL_DECLARED +#define Tcl_AttemptAlloc_TCL_DECLARED +/* 428 */ +EXTERN char * Tcl_AttemptAlloc (unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED +#define Tcl_AttemptDbCkalloc_TCL_DECLARED +/* 429 */ +EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, + const char * file, int line); +#endif +#ifndef Tcl_AttemptRealloc_TCL_DECLARED +#define Tcl_AttemptRealloc_TCL_DECLARED +/* 430 */ +EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED +#define Tcl_AttemptDbCkrealloc_TCL_DECLARED +/* 431 */ +EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, + unsigned int size, const char * file, + int line); +#endif +#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED +#define Tcl_AttemptSetObjLength_TCL_DECLARED +/* 432 */ +EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, + int length); +#endif +#ifndef Tcl_GetChannelThread_TCL_DECLARED +#define Tcl_GetChannelThread_TCL_DECLARED +/* 433 */ +EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); +#endif +#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED +#define Tcl_GetUnicodeFromObj_TCL_DECLARED +/* 434 */ +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED +#define Tcl_GetMathFuncInfo_TCL_DECLARED +/* 435 */ +EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, + const char * name, int * numArgsPtr, + Tcl_ValueType ** argTypesPtr, + Tcl_MathProc ** procPtr, + ClientData * clientDataPtr); +#endif +#ifndef Tcl_ListMathFuncs_TCL_DECLARED +#define Tcl_ListMathFuncs_TCL_DECLARED +/* 436 */ +EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, + const char * pattern); +#endif +#ifndef Tcl_SubstObj_TCL_DECLARED +#define Tcl_SubstObj_TCL_DECLARED +/* 437 */ +EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_DetachChannel_TCL_DECLARED +#define Tcl_DetachChannel_TCL_DECLARED +/* 438 */ +EXTERN int Tcl_DetachChannel (Tcl_Interp * interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_IsStandardChannel_TCL_DECLARED +#define Tcl_IsStandardChannel_TCL_DECLARED +/* 439 */ +EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_FSCopyFile_TCL_DECLARED +#define Tcl_FSCopyFile_TCL_DECLARED +/* 440 */ +EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSCopyDirectory_TCL_DECLARED +#define Tcl_FSCopyDirectory_TCL_DECLARED +/* 441 */ +EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSCreateDirectory_TCL_DECLARED +#define Tcl_FSCreateDirectory_TCL_DECLARED +/* 442 */ +EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSDeleteFile_TCL_DECLARED +#define Tcl_FSDeleteFile_TCL_DECLARED +/* 443 */ +EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSLoadFile_TCL_DECLARED +#define Tcl_FSLoadFile_TCL_DECLARED +/* 444 */ +EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, + Tcl_Obj * pathPtr, const char * sym1, + const char * sym2, + Tcl_PackageInitProc ** proc1Ptr, + Tcl_PackageInitProc ** proc2Ptr, + Tcl_LoadHandle * handlePtr, + Tcl_FSUnloadFileProc ** unloadProcPtr); +#endif +#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED +#define Tcl_FSMatchInDirectory_TCL_DECLARED +/* 445 */ +EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, + Tcl_Obj * result, Tcl_Obj * pathPtr, + const char * pattern, + Tcl_GlobTypeData * types); +#endif +#ifndef Tcl_FSLink_TCL_DECLARED +#define Tcl_FSLink_TCL_DECLARED +/* 446 */ +EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, + int linkAction); +#endif +#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED +#define Tcl_FSRemoveDirectory_TCL_DECLARED +/* 447 */ +EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, + int recursive, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSRenameFile_TCL_DECLARED +#define Tcl_FSRenameFile_TCL_DECLARED +/* 448 */ +EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSLstat_TCL_DECLARED +#define Tcl_FSLstat_TCL_DECLARED +/* 449 */ +EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSUtime_TCL_DECLARED +#define Tcl_FSUtime_TCL_DECLARED +/* 450 */ +EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, + struct utimbuf * tval); +#endif +#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED +#define Tcl_FSFileAttrsGet_TCL_DECLARED +/* 451 */ +EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED +#define Tcl_FSFileAttrsSet_TCL_DECLARED +/* 452 */ +EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED +#define Tcl_FSFileAttrStrings_TCL_DECLARED +/* 453 */ +EXTERN const char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, + Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSStat_TCL_DECLARED +#define Tcl_FSStat_TCL_DECLARED +/* 454 */ +EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSAccess_TCL_DECLARED +#define Tcl_FSAccess_TCL_DECLARED +/* 455 */ +EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); +#endif +#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED +#define Tcl_FSOpenFileChannel_TCL_DECLARED +/* 456 */ +EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, const char * modeString, + int permissions); +#endif +#ifndef Tcl_FSGetCwd_TCL_DECLARED +#define Tcl_FSGetCwd_TCL_DECLARED +/* 457 */ +EXTERN Tcl_Obj * Tcl_FSGetCwd (Tcl_Interp * interp); +#endif +#ifndef Tcl_FSChdir_TCL_DECLARED +#define Tcl_FSChdir_TCL_DECLARED +/* 458 */ +EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSConvertToPathType_TCL_DECLARED +#define Tcl_FSConvertToPathType_TCL_DECLARED +/* 459 */ +EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSJoinPath_TCL_DECLARED +#define Tcl_FSJoinPath_TCL_DECLARED +/* 460 */ +EXTERN Tcl_Obj * Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); +#endif +#ifndef Tcl_FSSplitPath_TCL_DECLARED +#define Tcl_FSSplitPath_TCL_DECLARED +/* 461 */ +EXTERN Tcl_Obj * Tcl_FSSplitPath (Tcl_Obj * pathPtr, int * lenPtr); +#endif +#ifndef Tcl_FSEqualPaths_TCL_DECLARED +#define Tcl_FSEqualPaths_TCL_DECLARED +/* 462 */ +EXTERN int Tcl_FSEqualPaths (Tcl_Obj * firstPtr, + Tcl_Obj * secondPtr); +#endif +#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED +#define Tcl_FSGetNormalizedPath_TCL_DECLARED +/* 463 */ +EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSJoinToPath_TCL_DECLARED +#define Tcl_FSJoinToPath_TCL_DECLARED +/* 464 */ +EXTERN Tcl_Obj * Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_FSGetInternalRep_TCL_DECLARED +#define Tcl_FSGetInternalRep_TCL_DECLARED +/* 465 */ +EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj * pathPtr, + const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED +#define Tcl_FSGetTranslatedPath_TCL_DECLARED +/* 466 */ +EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSEvalFile_TCL_DECLARED +#define Tcl_FSEvalFile_TCL_DECLARED +/* 467 */ +EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, + Tcl_Obj * fileName); +#endif +#ifndef Tcl_FSNewNativePath_TCL_DECLARED +#define Tcl_FSNewNativePath_TCL_DECLARED +/* 468 */ +EXTERN Tcl_Obj * Tcl_FSNewNativePath ( + const Tcl_Filesystem * fromFilesystem, + ClientData clientData); +#endif +#ifndef Tcl_FSGetNativePath_TCL_DECLARED +#define Tcl_FSGetNativePath_TCL_DECLARED +/* 469 */ +EXTERN const char * Tcl_FSGetNativePath (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED +#define Tcl_FSFileSystemInfo_TCL_DECLARED +/* 470 */ +EXTERN Tcl_Obj * Tcl_FSFileSystemInfo (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSPathSeparator_TCL_DECLARED +#define Tcl_FSPathSeparator_TCL_DECLARED +/* 471 */ +EXTERN Tcl_Obj * Tcl_FSPathSeparator (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSListVolumes_TCL_DECLARED +#define Tcl_FSListVolumes_TCL_DECLARED +/* 472 */ +EXTERN Tcl_Obj * Tcl_FSListVolumes (void); +#endif +#ifndef Tcl_FSRegister_TCL_DECLARED +#define Tcl_FSRegister_TCL_DECLARED +/* 473 */ +EXTERN int Tcl_FSRegister (ClientData clientData, + const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSUnregister_TCL_DECLARED +#define Tcl_FSUnregister_TCL_DECLARED +/* 474 */ +EXTERN int Tcl_FSUnregister (const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSData_TCL_DECLARED +#define Tcl_FSData_TCL_DECLARED +/* 475 */ +EXTERN ClientData Tcl_FSData (const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED +#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED +/* 476 */ +EXTERN const char * Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED +#define Tcl_FSGetFileSystemForPath_TCL_DECLARED +/* 477 */ +EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath ( + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSGetPathType_TCL_DECLARED +#define Tcl_FSGetPathType_TCL_DECLARED +/* 478 */ +EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_OutputBuffered_TCL_DECLARED +#define Tcl_OutputBuffered_TCL_DECLARED +/* 479 */ +EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_FSMountsChanged_TCL_DECLARED +#define Tcl_FSMountsChanged_TCL_DECLARED +/* 480 */ +EXTERN void Tcl_FSMountsChanged (const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_EvalTokensStandard_TCL_DECLARED +#define Tcl_EvalTokensStandard_TCL_DECLARED +/* 481 */ +EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_GetTime_TCL_DECLARED +#define Tcl_GetTime_TCL_DECLARED +/* 482 */ +EXTERN void Tcl_GetTime (Tcl_Time * timeBuf); +#endif +#ifndef Tcl_CreateObjTrace_TCL_DECLARED +#define Tcl_CreateObjTrace_TCL_DECLARED +/* 483 */ +EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp * interp, int level, + int flags, Tcl_CmdObjTraceProc * objProc, + ClientData clientData, + Tcl_CmdObjTraceDeleteProc * delProc); +#endif +#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED +#define Tcl_GetCommandInfoFromToken_TCL_DECLARED +/* 484 */ +EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, + Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED +#define Tcl_SetCommandInfoFromToken_TCL_DECLARED +/* 485 */ +EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, + const Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED +#define Tcl_DbNewWideIntObj_TCL_DECLARED +/* 486 */ +EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, + const char * file, int line); +#endif +#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED +#define Tcl_GetWideIntFromObj_TCL_DECLARED +/* 487 */ +EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_WideInt * widePtr); +#endif +#ifndef Tcl_NewWideIntObj_TCL_DECLARED +#define Tcl_NewWideIntObj_TCL_DECLARED +/* 488 */ +EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); +#endif +#ifndef Tcl_SetWideIntObj_TCL_DECLARED +#define Tcl_SetWideIntObj_TCL_DECLARED +/* 489 */ +EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, + Tcl_WideInt wideValue); +#endif +#ifndef Tcl_AllocStatBuf_TCL_DECLARED +#define Tcl_AllocStatBuf_TCL_DECLARED +/* 490 */ +EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); +#endif +#ifndef Tcl_Seek_TCL_DECLARED +#define Tcl_Seek_TCL_DECLARED +/* 491 */ +EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, + int mode); +#endif +#ifndef Tcl_Tell_TCL_DECLARED +#define Tcl_Tell_TCL_DECLARED +/* 492 */ +EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED +#define Tcl_ChannelWideSeekProc_TCL_DECLARED +/* 493 */ +EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_DictObjPut_TCL_DECLARED +#define Tcl_DictObjPut_TCL_DECLARED +/* 494 */ +EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjGet_TCL_DECLARED +#define Tcl_DictObjGet_TCL_DECLARED +/* 495 */ +EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj ** valuePtrPtr); +#endif +#ifndef Tcl_DictObjRemove_TCL_DECLARED +#define Tcl_DictObjRemove_TCL_DECLARED +/* 496 */ +EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); +#endif +#ifndef Tcl_DictObjSize_TCL_DECLARED +#define Tcl_DictObjSize_TCL_DECLARED +/* 497 */ +EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int * sizePtr); +#endif +#ifndef Tcl_DictObjFirst_TCL_DECLARED +#define Tcl_DictObjFirst_TCL_DECLARED +/* 498 */ +EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, + Tcl_Obj * dictPtr, + Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjNext_TCL_DECLARED +#define Tcl_DictObjNext_TCL_DECLARED +/* 499 */ +EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjDone_TCL_DECLARED +#define Tcl_DictObjDone_TCL_DECLARED +/* 500 */ +EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); +#endif +#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED +#define Tcl_DictObjPutKeyList_TCL_DECLARED +/* 501 */ +EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED +#define Tcl_DictObjRemoveKeyList_TCL_DECLARED +/* 502 */ +EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *const * keyv); +#endif +#ifndef Tcl_NewDictObj_TCL_DECLARED +#define Tcl_NewDictObj_TCL_DECLARED +/* 503 */ +EXTERN Tcl_Obj * Tcl_NewDictObj (void); +#endif +#ifndef Tcl_DbNewDictObj_TCL_DECLARED +#define Tcl_DbNewDictObj_TCL_DECLARED +/* 504 */ +EXTERN Tcl_Obj * Tcl_DbNewDictObj (const char * file, int line); +#endif +#ifndef Tcl_RegisterConfig_TCL_DECLARED +#define Tcl_RegisterConfig_TCL_DECLARED +/* 505 */ +EXTERN void Tcl_RegisterConfig (Tcl_Interp * interp, + const char * pkgName, + const Tcl_Config * configuration, + const char * valEncoding); +#endif +#ifndef Tcl_CreateNamespace_TCL_DECLARED +#define Tcl_CreateNamespace_TCL_DECLARED +/* 506 */ +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + const char * name, ClientData clientData, + Tcl_NamespaceDeleteProc * deleteProc); +#endif +#ifndef Tcl_DeleteNamespace_TCL_DECLARED +#define Tcl_DeleteNamespace_TCL_DECLARED +/* 507 */ +EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_AppendExportList_TCL_DECLARED +#define Tcl_AppendExportList_TCL_DECLARED +/* 508 */ +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_Export_TCL_DECLARED +#define Tcl_Export_TCL_DECLARED +/* 509 */ +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, + int resetListFirst); +#endif +#ifndef Tcl_Import_TCL_DECLARED +#define Tcl_Import_TCL_DECLARED +/* 510 */ +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, + int allowOverwrite); +#endif +#ifndef Tcl_ForgetImport_TCL_DECLARED +#define Tcl_ForgetImport_TCL_DECLARED +/* 511 */ +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern); +#endif +#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED +#define Tcl_GetCurrentNamespace_TCL_DECLARED +/* 512 */ +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED +#define Tcl_GetGlobalNamespace_TCL_DECLARED +/* 513 */ +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_FindNamespace_TCL_DECLARED +#define Tcl_FindNamespace_TCL_DECLARED +/* 514 */ +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + const char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_FindCommand_TCL_DECLARED +#define Tcl_FindCommand_TCL_DECLARED +/* 515 */ +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + const char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_GetCommandFromObj_TCL_DECLARED +#define Tcl_GetCommandFromObj_TCL_DECLARED +/* 516 */ +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCommandFullName_TCL_DECLARED +#define Tcl_GetCommandFullName_TCL_DECLARED +/* 517 */ +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, + Tcl_Command command, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSEvalFileEx_TCL_DECLARED +#define Tcl_FSEvalFileEx_TCL_DECLARED +/* 518 */ +EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, + Tcl_Obj * fileName, + const char * encodingName); +#endif +#ifndef Tcl_SetExitProc_TCL_DECLARED +#define Tcl_SetExitProc_TCL_DECLARED +/* 519 */ +EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); +#endif +#ifndef Tcl_LimitAddHandler_TCL_DECLARED +#define Tcl_LimitAddHandler_TCL_DECLARED +/* 520 */ +EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, + Tcl_LimitHandlerProc * handlerProc, + ClientData clientData, + Tcl_LimitHandlerDeleteProc * deleteProc); +#endif +#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED +#define Tcl_LimitRemoveHandler_TCL_DECLARED +/* 521 */ +EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, + int type, Tcl_LimitHandlerProc * handlerProc, + ClientData clientData); +#endif +#ifndef Tcl_LimitReady_TCL_DECLARED +#define Tcl_LimitReady_TCL_DECLARED +/* 522 */ +EXTERN int Tcl_LimitReady (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitCheck_TCL_DECLARED +#define Tcl_LimitCheck_TCL_DECLARED +/* 523 */ +EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitExceeded_TCL_DECLARED +#define Tcl_LimitExceeded_TCL_DECLARED +/* 524 */ +EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitSetCommands_TCL_DECLARED +#define Tcl_LimitSetCommands_TCL_DECLARED +/* 525 */ +EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, + int commandLimit); +#endif +#ifndef Tcl_LimitSetTime_TCL_DECLARED +#define Tcl_LimitSetTime_TCL_DECLARED +/* 526 */ +EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitSetGranularity_TCL_DECLARED +#define Tcl_LimitSetGranularity_TCL_DECLARED +/* 527 */ +EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, + int type, int granularity); +#endif +#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED +#define Tcl_LimitTypeEnabled_TCL_DECLARED +/* 528 */ +EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED +#define Tcl_LimitTypeExceeded_TCL_DECLARED +/* 529 */ +EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeSet_TCL_DECLARED +#define Tcl_LimitTypeSet_TCL_DECLARED +/* 530 */ +EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeReset_TCL_DECLARED +#define Tcl_LimitTypeReset_TCL_DECLARED +/* 531 */ +EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitGetCommands_TCL_DECLARED +#define Tcl_LimitGetCommands_TCL_DECLARED +/* 532 */ +EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitGetTime_TCL_DECLARED +#define Tcl_LimitGetTime_TCL_DECLARED +/* 533 */ +EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitGetGranularity_TCL_DECLARED +#define Tcl_LimitGetGranularity_TCL_DECLARED +/* 534 */ +EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, + int type); +#endif +#ifndef Tcl_SaveInterpState_TCL_DECLARED +#define Tcl_SaveInterpState_TCL_DECLARED +/* 535 */ +EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); +#endif +#ifndef Tcl_RestoreInterpState_TCL_DECLARED +#define Tcl_RestoreInterpState_TCL_DECLARED +/* 536 */ +EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, + Tcl_InterpState state); +#endif +#ifndef Tcl_DiscardInterpState_TCL_DECLARED +#define Tcl_DiscardInterpState_TCL_DECLARED +/* 537 */ +EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); +#endif +#ifndef Tcl_SetReturnOptions_TCL_DECLARED +#define Tcl_SetReturnOptions_TCL_DECLARED +/* 538 */ +EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, + Tcl_Obj * options); +#endif +#ifndef Tcl_GetReturnOptions_TCL_DECLARED +#define Tcl_GetReturnOptions_TCL_DECLARED +/* 539 */ +EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, + int result); +#endif +#ifndef Tcl_IsEnsemble_TCL_DECLARED +#define Tcl_IsEnsemble_TCL_DECLARED +/* 540 */ +EXTERN int Tcl_IsEnsemble (Tcl_Command token); +#endif +#ifndef Tcl_CreateEnsemble_TCL_DECLARED +#define Tcl_CreateEnsemble_TCL_DECLARED +/* 541 */ +EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, + const char * name, + Tcl_Namespace * namespacePtr, int flags); +#endif +#ifndef Tcl_FindEnsemble_TCL_DECLARED +#define Tcl_FindEnsemble_TCL_DECLARED +/* 542 */ +EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, + Tcl_Obj * cmdNameObj, int flags); +#endif +#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED +/* 543 */ +EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * subcmdList); +#endif +#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED +#define Tcl_SetEnsembleMappingDict_TCL_DECLARED +/* 544 */ +EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * mapDict); +#endif +#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +/* 545 */ +EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * unknownList); +#endif +#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED +#define Tcl_SetEnsembleFlags_TCL_DECLARED +/* 546 */ +EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int flags); +#endif +#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED +/* 547 */ +EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** subcmdListPtr); +#endif +#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED +#define Tcl_GetEnsembleMappingDict_TCL_DECLARED +/* 548 */ +EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** mapDictPtr); +#endif +#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +/* 549 */ +EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** unknownListPtr); +#endif +#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED +#define Tcl_GetEnsembleFlags_TCL_DECLARED +/* 550 */ +EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int * flagsPtr); +#endif +#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED +#define Tcl_GetEnsembleNamespace_TCL_DECLARED +/* 551 */ +EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, + Tcl_Command token, + Tcl_Namespace ** namespacePtrPtr); +#endif +#ifndef Tcl_SetTimeProc_TCL_DECLARED +#define Tcl_SetTimeProc_TCL_DECLARED +/* 552 */ +EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc * getProc, + Tcl_ScaleTimeProc * scaleProc, + ClientData clientData); +#endif +#ifndef Tcl_QueryTimeProc_TCL_DECLARED +#define Tcl_QueryTimeProc_TCL_DECLARED +/* 553 */ +EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc ** getProc, + Tcl_ScaleTimeProc ** scaleProc, + ClientData * clientData); +#endif +#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED +#define Tcl_ChannelThreadActionProc_TCL_DECLARED +/* 554 */ +EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_NewBignumObj_TCL_DECLARED +#define Tcl_NewBignumObj_TCL_DECLARED +/* 555 */ +EXTERN Tcl_Obj * Tcl_NewBignumObj (mp_int * value); +#endif +#ifndef Tcl_DbNewBignumObj_TCL_DECLARED +#define Tcl_DbNewBignumObj_TCL_DECLARED +/* 556 */ +EXTERN Tcl_Obj * Tcl_DbNewBignumObj (mp_int * value, + const char * file, int line); +#endif +#ifndef Tcl_SetBignumObj_TCL_DECLARED +#define Tcl_SetBignumObj_TCL_DECLARED +/* 557 */ +EXTERN void Tcl_SetBignumObj (Tcl_Obj * obj, mp_int * value); +#endif +#ifndef Tcl_GetBignumFromObj_TCL_DECLARED +#define Tcl_GetBignumFromObj_TCL_DECLARED +/* 558 */ +EXTERN int Tcl_GetBignumFromObj (Tcl_Interp * interp, + Tcl_Obj * obj, mp_int * value); +#endif +#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED +#define Tcl_TakeBignumFromObj_TCL_DECLARED +/* 559 */ +EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp * interp, + Tcl_Obj * obj, mp_int * value); +#endif +#ifndef Tcl_TruncateChannel_TCL_DECLARED +#define Tcl_TruncateChannel_TCL_DECLARED +/* 560 */ +EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, + Tcl_WideInt length); +#endif +#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED +#define Tcl_ChannelTruncateProc_TCL_DECLARED +/* 561 */ +EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED +#define Tcl_SetChannelErrorInterp_TCL_DECLARED +/* 562 */ +EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp * interp, + Tcl_Obj * msg); +#endif +#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED +#define Tcl_GetChannelErrorInterp_TCL_DECLARED +/* 563 */ +EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp * interp, + Tcl_Obj ** msg); +#endif +#ifndef Tcl_SetChannelError_TCL_DECLARED +#define Tcl_SetChannelError_TCL_DECLARED +/* 564 */ +EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj * msg); +#endif +#ifndef Tcl_GetChannelError_TCL_DECLARED +#define Tcl_GetChannelError_TCL_DECLARED +/* 565 */ +EXTERN void Tcl_GetChannelError (Tcl_Channel chan, + Tcl_Obj ** msg); +#endif +#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED +#define Tcl_InitBignumFromDouble_TCL_DECLARED +/* 566 */ +EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp * interp, + double initval, mp_int * toInit); +#endif +#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +/* 567 */ +EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +/* 568 */ +EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); +#endif +#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED +#define Tcl_GetEncodingFromObj_TCL_DECLARED +/* 569 */ +EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); +#endif +#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED +#define Tcl_GetEncodingSearchPath_TCL_DECLARED +/* 570 */ +EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath (void); +#endif +#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED +#define Tcl_SetEncodingSearchPath_TCL_DECLARED +/* 571 */ +EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj * searchPath); +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +/* 572 */ +EXTERN const char * Tcl_GetEncodingNameFromEnvironment ( + Tcl_DString * bufPtr); +#endif +#ifndef Tcl_PkgRequireProc_TCL_DECLARED +#define Tcl_PkgRequireProc_TCL_DECLARED +/* 573 */ +EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, + const char * name, int objc, + Tcl_Obj *const objv[], + ClientData * clientDataPtr); +#endif +#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED +#define Tcl_AppendObjToErrorInfo_TCL_DECLARED +/* 574 */ +EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED +#define Tcl_AppendLimitedToObj_TCL_DECLARED +/* 575 */ +EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, + const char * bytes, int length, int limit, + const char * ellipsis); +#endif +#ifndef Tcl_Format_TCL_DECLARED +#define Tcl_Format_TCL_DECLARED +/* 576 */ +EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, const char * format, + int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_AppendFormatToObj_TCL_DECLARED +#define Tcl_AppendFormatToObj_TCL_DECLARED +/* 577 */ +EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, const char * format, + int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_ObjPrintf_TCL_DECLARED +#define Tcl_ObjPrintf_TCL_DECLARED +/* 578 */ +EXTERN Tcl_Obj * Tcl_ObjPrintf (const char * format, ...); +#endif +#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED +#define Tcl_AppendPrintfToObj_TCL_DECLARED +/* 579 */ +EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, + const char * format, ...); +#endif +#ifndef Tcl_CancelEval_TCL_DECLARED +#define Tcl_CancelEval_TCL_DECLARED +/* 580 */ +EXTERN int Tcl_CancelEval (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr, + ClientData clientData, int flags); +#endif +#ifndef Tcl_Canceled_TCL_DECLARED +#define Tcl_Canceled_TCL_DECLARED +/* 581 */ +EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); +#endif +#ifndef Tcl_CreatePipe_TCL_DECLARED +#define Tcl_CreatePipe_TCL_DECLARED +/* 582 */ +EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, + Tcl_Channel * rchan, Tcl_Channel * wchan, + int flags); +#endif +#ifndef Tcl_NRCreateCommand_TCL_DECLARED +#define Tcl_NRCreateCommand_TCL_DECLARED +/* 583 */ +EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_ObjCmdProc * proc, + Tcl_ObjCmdProc * nreProc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_NREvalObj_TCL_DECLARED +#define Tcl_NREvalObj_TCL_DECLARED +/* 584 */ +EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_NREvalObjv_TCL_DECLARED +#define Tcl_NREvalObjv_TCL_DECLARED +/* 585 */ +EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags); +#endif +#ifndef Tcl_NRCmdSwap_TCL_DECLARED +#define Tcl_NRCmdSwap_TCL_DECLARED +/* 586 */ +EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, + int objc, Tcl_Obj *const objv[], int flags); +#endif +#ifndef Tcl_NRAddCallback_TCL_DECLARED +#define Tcl_NRAddCallback_TCL_DECLARED +/* 587 */ +EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, + Tcl_NRPostProc * postProcPtr, + ClientData data0, ClientData data1, + ClientData data2, ClientData data3); +#endif +#ifndef Tcl_NRCallObjProc_TCL_DECLARED +#define Tcl_NRCallObjProc_TCL_DECLARED +/* 588 */ +EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, + Tcl_ObjCmdProc * objProc, + ClientData clientData, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED +#define Tcl_GetFSDeviceFromStat_TCL_DECLARED +/* 589 */ +EXTERN unsigned Tcl_GetFSDeviceFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetFSInodeFromStat_TCL_DECLARED +#define Tcl_GetFSInodeFromStat_TCL_DECLARED +/* 590 */ +EXTERN unsigned Tcl_GetFSInodeFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetModeFromStat_TCL_DECLARED +#define Tcl_GetModeFromStat_TCL_DECLARED +/* 591 */ +EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetLinkCountFromStat_TCL_DECLARED +#define Tcl_GetLinkCountFromStat_TCL_DECLARED +/* 592 */ +EXTERN int Tcl_GetLinkCountFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetUserIdFromStat_TCL_DECLARED +#define Tcl_GetUserIdFromStat_TCL_DECLARED +/* 593 */ +EXTERN int Tcl_GetUserIdFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetGroupIdFromStat_TCL_DECLARED +#define Tcl_GetGroupIdFromStat_TCL_DECLARED +/* 594 */ +EXTERN int Tcl_GetGroupIdFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetDeviceTypeFromStat_TCL_DECLARED +#define Tcl_GetDeviceTypeFromStat_TCL_DECLARED +/* 595 */ +EXTERN int Tcl_GetDeviceTypeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetAccessTimeFromStat_TCL_DECLARED +#define Tcl_GetAccessTimeFromStat_TCL_DECLARED +/* 596 */ +EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetModificationTimeFromStat_TCL_DECLARED +#define Tcl_GetModificationTimeFromStat_TCL_DECLARED +/* 597 */ +EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetChangeTimeFromStat_TCL_DECLARED +#define Tcl_GetChangeTimeFromStat_TCL_DECLARED +/* 598 */ +EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetSizeFromStat_TCL_DECLARED +#define Tcl_GetSizeFromStat_TCL_DECLARED +/* 599 */ +EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetBlocksFromStat_TCL_DECLARED +#define Tcl_GetBlocksFromStat_TCL_DECLARED +/* 600 */ +EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetBlockSizeFromStat_TCL_DECLARED +#define Tcl_GetBlockSizeFromStat_TCL_DECLARED +/* 601 */ +EXTERN unsigned Tcl_GetBlockSizeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_SetEnsembleParameterList_TCL_DECLARED +#define Tcl_SetEnsembleParameterList_TCL_DECLARED +/* 602 */ +EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * paramList); +#endif +#ifndef Tcl_GetEnsembleParameterList_TCL_DECLARED +#define Tcl_GetEnsembleParameterList_TCL_DECLARED +/* 603 */ +EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** paramListPtr); +#endif +#ifndef Tcl_ParseArgsObjv_TCL_DECLARED +#define Tcl_ParseArgsObjv_TCL_DECLARED +/* 604 */ +EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, + const Tcl_ArgvInfo * argTable, int * objcPtr, + Tcl_Obj *const * objv, Tcl_Obj *** remObjv); +#endif +#ifndef Tcl_GetErrorLine_TCL_DECLARED +#define Tcl_GetErrorLine_TCL_DECLARED +/* 605 */ +EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); +#endif +#ifndef Tcl_SetErrorLine_TCL_DECLARED +#define Tcl_SetErrorLine_TCL_DECLARED +/* 606 */ +EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int lineNum); +#endif +#ifndef Tcl_TransferResult_TCL_DECLARED +#define Tcl_TransferResult_TCL_DECLARED +/* 607 */ +EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, + int result, Tcl_Interp * targetInterp); +#endif +#ifndef Tcl_InterpActive_TCL_DECLARED +#define Tcl_InterpActive_TCL_DECLARED +/* 608 */ +EXTERN int Tcl_InterpActive (Tcl_Interp * interp); +#endif +#ifndef Tcl_BackgroundException_TCL_DECLARED +#define Tcl_BackgroundException_TCL_DECLARED +/* 609 */ +EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, + int code); +#endif +#ifndef Tcl_ZlibDeflate_TCL_DECLARED +#define Tcl_ZlibDeflate_TCL_DECLARED +/* 610 */ +EXTERN int Tcl_ZlibDeflate (Tcl_Interp * interp, int format, + Tcl_Obj * data, int level, + Tcl_Obj * gzipHeaderDictObj); +#endif +#ifndef Tcl_ZlibInflate_TCL_DECLARED +#define Tcl_ZlibInflate_TCL_DECLARED +/* 611 */ +EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format, + Tcl_Obj * data, int buffersize, + Tcl_Obj * gzipHeaderDictObj); +#endif +#ifndef Tcl_ZlibCRC32_TCL_DECLARED +#define Tcl_ZlibCRC32_TCL_DECLARED +/* 612 */ +EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, const char * buf, + int len); +#endif +#ifndef Tcl_ZlibAdler32_TCL_DECLARED +#define Tcl_ZlibAdler32_TCL_DECLARED +/* 613 */ +EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler, + const char * buf, int len); +#endif +#ifndef Tcl_ZlibStreamInit_TCL_DECLARED +#define Tcl_ZlibStreamInit_TCL_DECLARED +/* 614 */ +EXTERN int Tcl_ZlibStreamInit (Tcl_Interp * interp, int mode, + int format, int level, Tcl_Obj * dictObj, + Tcl_ZlibStream * zshandle); +#endif +#ifndef Tcl_ZlibStreamGetCommandName_TCL_DECLARED +#define Tcl_ZlibStreamGetCommandName_TCL_DECLARED +/* 615 */ +EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName ( + Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamEof_TCL_DECLARED +#define Tcl_ZlibStreamEof_TCL_DECLARED +/* 616 */ +EXTERN int Tcl_ZlibStreamEof (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamAdler32_TCL_DECLARED +#define Tcl_ZlibStreamAdler32_TCL_DECLARED +/* 617 */ +EXTERN int Tcl_ZlibStreamAdler32 (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamPut_TCL_DECLARED +#define Tcl_ZlibStreamPut_TCL_DECLARED +/* 618 */ +EXTERN int Tcl_ZlibStreamPut (Tcl_ZlibStream zshandle, + Tcl_Obj * data, int flush); +#endif +#ifndef Tcl_ZlibStreamGet_TCL_DECLARED +#define Tcl_ZlibStreamGet_TCL_DECLARED +/* 619 */ +EXTERN int Tcl_ZlibStreamGet (Tcl_ZlibStream zshandle, + Tcl_Obj * data, int count); +#endif +#ifndef Tcl_ZlibStreamClose_TCL_DECLARED +#define Tcl_ZlibStreamClose_TCL_DECLARED +/* 620 */ +EXTERN int Tcl_ZlibStreamClose (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamReset_TCL_DECLARED +#define Tcl_ZlibStreamReset_TCL_DECLARED +/* 621 */ +EXTERN int Tcl_ZlibStreamReset (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_SetStartupScript_TCL_DECLARED +#define Tcl_SetStartupScript_TCL_DECLARED +/* 622 */ +EXTERN void Tcl_SetStartupScript (Tcl_Obj * path, + const char * encoding); +#endif +#ifndef Tcl_GetStartupScript_TCL_DECLARED +#define Tcl_GetStartupScript_TCL_DECLARED +/* 623 */ +EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingPtr); +#endif +#ifndef Tcl_CloseEx_TCL_DECLARED +#define Tcl_CloseEx_TCL_DECLARED +/* 624 */ +EXTERN int Tcl_CloseEx (Tcl_Interp * interp, Tcl_Channel chan, + int flags); +#endif + +typedef struct TclStubHooks { + const struct TclPlatStubs *tclPlatStubs; + const struct TclIntStubs *tclIntStubs; + const struct TclIntPlatStubs *tclIntPlatStubs; +} TclStubHooks; + +typedef struct TclStubs { + int magic; + const struct TclStubHooks *hooks; + + int (*tcl_PkgProvideEx) (Tcl_Interp * interp, const char * name, const char * version, ClientData clientData); /* 0 */ + CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 1 */ + void (*tcl_Panic) (const char * format, ...); /* 2 */ + char * (*tcl_Alloc) (unsigned int size); /* 3 */ + void (*tcl_Free) (char * ptr); /* 4 */ + char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ + char * (*tcl_DbCkalloc) (unsigned int size, const char * file, int line); /* 6 */ + int (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ + char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved9; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved10; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* MACOSX */ + void (*tcl_SetTimer) (const Tcl_Time * timePtr); /* 11 */ + void (*tcl_Sleep) (int ms); /* 12 */ + int (*tcl_WaitForEvent) (const Tcl_Time * timePtr); /* 13 */ + int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ + void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ + void (*tcl_AppendToObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 16 */ + Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *const objv[]); /* 17 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, const Tcl_ObjType * typePtr); /* 18 */ + void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 19 */ + void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 20 */ + int (*tcl_DbIsShared) (Tcl_Obj * objPtr, const char * file, int line); /* 21 */ + Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, const char * file, int line); /* 22 */ + Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char * bytes, int length, const char * file, int line); /* 23 */ + Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char * file, int line); /* 24 */ + Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const * objv, const char * file, int line); /* 25 */ + Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char * file, int line); /* 26 */ + Tcl_Obj * (*tcl_DbNewObj) (const char * file, int line); /* 27 */ + Tcl_Obj * (*tcl_DbNewStringObj) (const char * bytes, int length, const char * file, int line); /* 28 */ + Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ + void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ + int (*tcl_GetBoolean) (Tcl_Interp * interp, const char * src, int * boolPtr); /* 31 */ + int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ + unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ + int (*tcl_GetDouble) (Tcl_Interp * interp, const char * src, double * doublePtr); /* 34 */ + int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *const * tablePtr, const char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetInt) (Tcl_Interp * interp, const char * src, int * intPtr); /* 37 */ + int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ + int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ + CONST86 Tcl_ObjType * (*tcl_GetObjType) (const char * typeName); /* 40 */ + char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ + void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ + int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ + int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ + int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ + int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ + int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ + int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ + Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char * bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ + Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ + Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */ + Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ + Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ + Tcl_Obj * (*tcl_NewStringObj) (const char * bytes, int length); /* 56 */ + void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ + unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ + void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, const unsigned char * bytes, int length); /* 59 */ + void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ + void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ + void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ + void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ + void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ + void (*tcl_SetStringObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 65 */ + void (*tcl_AddErrorInfo) (Tcl_Interp * interp, const char * message); /* 66 */ + void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, const char * message, int length); /* 67 */ + void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ + void (*tcl_AppendElement) (Tcl_Interp * interp, const char * element); /* 69 */ + void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ + Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ + void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ + int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ + void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ + int (*tcl_AsyncReady) (void); /* 75 */ + void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ + char (*tcl_Backslash) (const char * src, int * readPtr); /* 77 */ + int (*tcl_BadChannelOption) (Tcl_Interp * interp, const char * optionName, const char * optionList); /* 78 */ + void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ + void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ + int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ + int (*tcl_CommandComplete) (const char * cmd); /* 82 */ + char * (*tcl_Concat) (int argc, CONST84 char *const * argv); /* 83 */ + int (*tcl_ConvertElement) (const char * src, char * dst, int flags); /* 84 */ + int (*tcl_ConvertCountedElement) (const char * src, int length, char * dst, int flags); /* 85 */ + int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char *const * argv); /* 86 */ + int (*tcl_CreateAliasObj) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ + Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType * typePtr, const char * chanName, ClientData instanceData, int mask); /* 88 */ + void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ + void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ + Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ + void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ + void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ + Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ + void (*tcl_CreateMathFunc) (Tcl_Interp * interp, const char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ + Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ + Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, const char * slaveName, int isSafe); /* 97 */ + Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ + Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ + void (*tcl_DeleteAssocData) (Tcl_Interp * interp, const char * name); /* 100 */ + void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ + void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ + int (*tcl_DeleteCommand) (Tcl_Interp * interp, const char * cmdName); /* 103 */ + int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ + void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ + void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ + void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ + void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ + void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ + void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* MACOSX */ + void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ + void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ + void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ + int (*tcl_DoOneEvent) (int flags); /* 115 */ + void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ + char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, const char * bytes, int length); /* 117 */ + char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, const char * element); /* 118 */ + void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ + void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ + void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ + void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ + void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ + void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ + void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ + int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ + CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ + CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ + int (*tcl_Eval) (Tcl_Interp * interp, const char * script); /* 129 */ + int (*tcl_EvalFile) (Tcl_Interp * interp, const char * fileName); /* 130 */ + int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ + void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ + void (*tcl_Exit) (int status); /* 133 */ + int (*tcl_ExposeCommand) (Tcl_Interp * interp, const char * hiddenCmdToken, const char * cmdName); /* 134 */ + int (*tcl_ExprBoolean) (Tcl_Interp * interp, const char * expr, int * ptr); /* 135 */ + int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ + int (*tcl_ExprDouble) (Tcl_Interp * interp, const char * expr, double * ptr); /* 137 */ + int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ + int (*tcl_ExprLong) (Tcl_Interp * interp, const char * expr, long * ptr); /* 139 */ + int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ + int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ + int (*tcl_ExprString) (Tcl_Interp * interp, const char * expr); /* 142 */ + void (*tcl_Finalize) (void); /* 143 */ + void (*tcl_FindExecutable) (const char * argv0); /* 144 */ + Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ + int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ + void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ + int (*tcl_GetAlias) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ + int (*tcl_GetAliasObj) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ + ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ + Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, const char * chanName, int * modePtr); /* 151 */ + int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ + int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ + ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ + int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ + CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ + int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, Tcl_DString * dsPtr); /* 157 */ + CONST86 Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ + int (*tcl_GetCommandInfo) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ + CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ + int (*tcl_GetErrno) (void); /* 161 */ + CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ + int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ + Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ + const char * (*tcl_GetNameOfExecutable) (void); /* 165 */ + Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved167; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* MACOSX */ + Tcl_PathType (*tcl_GetPathType) (const char * path); /* 168 */ + int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ + int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ + int (*tcl_GetServiceMode) (void); /* 171 */ + Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, const char * slaveName); /* 172 */ + Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ + CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ + CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 175 */ + CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 176 */ + int (*tcl_GlobalEval) (Tcl_Interp * interp, const char * command); /* 177 */ + int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ + int (*tcl_HideCommand) (Tcl_Interp * interp, const char * cmdName, const char * hiddenCmdToken); /* 179 */ + int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ + void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ + int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ + int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ + int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ + int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ + char * (*tcl_JoinPath) (int argc, CONST84 char *const * argv, Tcl_DString * resultPtr); /* 186 */ + int (*tcl_LinkVar) (Tcl_Interp * interp, const char * varName, char * addr, int type); /* 187 */ + void *reserved188; + Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ + int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ + Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ + char * (*tcl_Merge) (int argc, CONST84 char *const * argv); /* 192 */ + Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ + void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ + Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ + Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* MACOSX */ + Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */ + Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */ + Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ + void (*tcl_Preserve) (ClientData data); /* 201 */ + void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ + int (*tcl_PutEnv) (const char * assignment); /* 203 */ + CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ + void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ + int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* MACOSX */ + int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */ + int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ + void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ + void (*tcl_RegisterObjType) (const Tcl_ObjType * typePtr); /* 211 */ + Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, const char * pattern); /* 212 */ + int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, const char * text, const char * start); /* 213 */ + int (*tcl_RegExpMatch) (Tcl_Interp * interp, const char * text, const char * pattern); /* 214 */ + void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ + void (*tcl_Release) (ClientData clientData); /* 216 */ + void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ + int (*tcl_ScanElement) (const char * str, int * flagPtr); /* 218 */ + int (*tcl_ScanCountedElement) (const char * str, int length, int * flagPtr); /* 219 */ + int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ + int (*tcl_ServiceAll) (void); /* 221 */ + int (*tcl_ServiceEvent) (int flags); /* 222 */ + void (*tcl_SetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ + void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ + int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, const char * newValue); /* 225 */ + int (*tcl_SetCommandInfo) (Tcl_Interp * interp, const char * cmdName, const Tcl_CmdInfo * infoPtr); /* 226 */ + void (*tcl_SetErrno) (int err); /* 227 */ + void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ + void (*tcl_SetMaxBlockTime) (const Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ + int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ + void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ + int (*tcl_SetServiceMode) (int mode); /* 233 */ + void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ + void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ + void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ + CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, const char * varName, const char * newValue, int flags); /* 237 */ + CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, const char * newValue, int flags); /* 238 */ + CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ + CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ + void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ + int (*tcl_SplitList) (Tcl_Interp * interp, const char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ + void (*tcl_SplitPath) (const char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ + void (*tcl_StaticPackage) (Tcl_Interp * interp, const char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ + int (*tcl_StringMatch) (const char * str, const char * pattern); /* 245 */ + int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ + int (*tcl_TraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ + int (*tcl_TraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ + char * (*tcl_TranslateFileName) (Tcl_Interp * interp, const char * name, Tcl_DString * bufferPtr); /* 249 */ + int (*tcl_Ungets) (Tcl_Channel chan, const char * str, int len, int atHead); /* 250 */ + void (*tcl_UnlinkVar) (Tcl_Interp * interp, const char * varName); /* 251 */ + int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ + int (*tcl_UnsetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 253 */ + int (*tcl_UnsetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 254 */ + void (*tcl_UntraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ + void (*tcl_UntraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ + void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, const char * varName); /* 257 */ + int (*tcl_UpVar) (Tcl_Interp * interp, const char * frameName, const char * varName, const char * localName, int flags); /* 258 */ + int (*tcl_UpVar2) (Tcl_Interp * interp, const char * frameName, const char * part1, const char * part2, const char * localName, int flags); /* 259 */ + int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ + ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ + ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ + int (*tcl_Write) (Tcl_Channel chan, const char * s, int slen); /* 263 */ + void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], const char * message); /* 264 */ + int (*tcl_DumpActiveMemory) (const char * fileName); /* 265 */ + void (*tcl_ValidateAllMemory) (const char * file, int line); /* 266 */ + void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ + void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ + char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ + CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, const char * start, CONST84 char ** termPtr); /* 270 */ + CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 271 */ + CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 272 */ + int (*tcl_PkgProvide) (Tcl_Interp * interp, const char * name, const char * version); /* 273 */ + CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 274 */ + void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ + int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ + Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ + void (*tcl_PanicVA) (const char * format, va_list argList); /* 278 */ + void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ + void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, const Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ + Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ + void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ + void *reserved285; + void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ + Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ + void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ + void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ + void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ + int (*tcl_EvalEx) (Tcl_Interp * interp, const char * script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ + int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ + void (*tcl_ExitThread) (int status); /* 294 */ + int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ + char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ + void (*tcl_FinalizeThread) (void); /* 297 */ + void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ + void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ + Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ + Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, const char * name); /* 301 */ + CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ + void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const VOID * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ + VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ + Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 306 */ + ClientData (*tcl_InitNotifier) (void); /* 307 */ + void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ + void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ + void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, const Tcl_Time * timePtr); /* 311 */ + int (*tcl_NumUtfChars) (const char * src, int length); /* 312 */ + int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ + void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ + void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ + int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, const char * name); /* 316 */ + Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ + void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ + void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event * evPtr, Tcl_QueuePosition position); /* 319 */ + Tcl_UniChar (*tcl_UniCharAtIndex) (const char * src, int index); /* 320 */ + Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ + Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ + Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ + int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ + CONST84_RETURN char * (*tcl_UtfAtIndex) (const char * src, int index); /* 325 */ + int (*tcl_UtfCharComplete) (const char * src, int length); /* 326 */ + int (*tcl_UtfBackslash) (const char * src, int * readPtr, char * dst); /* 327 */ + CONST84_RETURN char * (*tcl_UtfFindFirst) (const char * src, int ch); /* 328 */ + CONST84_RETURN char * (*tcl_UtfFindLast) (const char * src, int ch); /* 329 */ + CONST84_RETURN char * (*tcl_UtfNext) (const char * src); /* 330 */ + CONST84_RETURN char * (*tcl_UtfPrev) (const char * src, const char * start); /* 331 */ + int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ + char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ + int (*tcl_UtfToLower) (char * src); /* 334 */ + int (*tcl_UtfToTitle) (char * src); /* 335 */ + int (*tcl_UtfToUniChar) (const char * src, Tcl_UniChar * chPtr); /* 336 */ + int (*tcl_UtfToUpper) (char * src); /* 337 */ + int (*tcl_WriteChars) (Tcl_Channel chan, const char * src, int srcLen); /* 338 */ + int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ + char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ + CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ + void (*tcl_SetDefaultEncodingDir) (const char * path); /* 342 */ + void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ + void (*tcl_ServiceModeHook) (int mode); /* 344 */ + int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ + int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ + int (*tcl_UniCharIsDigit) (int ch); /* 347 */ + int (*tcl_UniCharIsLower) (int ch); /* 348 */ + int (*tcl_UniCharIsSpace) (int ch); /* 349 */ + int (*tcl_UniCharIsUpper) (int ch); /* 350 */ + int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ + int (*tcl_UniCharLen) (const Tcl_UniChar * uniStr); /* 352 */ + int (*tcl_UniCharNcmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 353 */ + char * (*tcl_UniCharToUtfDString) (const Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) (const char * src, int length, Tcl_DString * dsPtr); /* 355 */ + Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ + Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ + void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ + void (*tcl_LogCommandInfo) (Tcl_Interp * interp, const char * script, const char * command, int length); /* 359 */ + int (*tcl_ParseBraces) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ + int (*tcl_ParseCommand) (Tcl_Interp * interp, const char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ + int (*tcl_ParseExpr) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ + int (*tcl_ParseQuotedString) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ + int (*tcl_ParseVarName) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ + char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ + int (*tcl_Chdir) (const char * dirName); /* 366 */ + int (*tcl_Access) (const char * path, int mode); /* 367 */ + int (*tcl_Stat) (const char * path, struct stat * bufPtr); /* 368 */ + int (*tcl_UtfNcmp) (const char * s1, const char * s2, unsigned long n); /* 369 */ + int (*tcl_UtfNcasecmp) (const char * s1, const char * s2, unsigned long n); /* 370 */ + int (*tcl_StringCaseMatch) (const char * str, const char * pattern, int nocase); /* 371 */ + int (*tcl_UniCharIsControl) (int ch); /* 372 */ + int (*tcl_UniCharIsGraph) (int ch); /* 373 */ + int (*tcl_UniCharIsPrint) (int ch); /* 374 */ + int (*tcl_UniCharIsPunct) (int ch); /* 375 */ + int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ + void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar * unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int numChars); /* 379 */ + int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ + Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ + Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ + Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ + void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int length); /* 384 */ + int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ + void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ + Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ + int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ + int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, const char * pattern); /* 389 */ + int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 390 */ + void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ + void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ + int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ + int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ + int (*tcl_WriteRaw) (Tcl_Channel chan, const char * src, int srcLen); /* 395 */ + Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ + int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ + CONST84_RETURN char * (*tcl_ChannelName) (const Tcl_ChannelType * chanTypePtr); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType * chanTypePtr); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType * chanTypePtr); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (const Tcl_ChannelType * chanTypePtr); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType * chanTypePtr); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType * chanTypePtr); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType * chanTypePtr); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType * chanTypePtr); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType * chanTypePtr); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType * chanTypePtr); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType * chanTypePtr); /* 411 */ + int (*tcl_JoinThread) (Tcl_ThreadId threadId, int * result); /* 412 */ + int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ + int (*tcl_IsChannelRegistered) (Tcl_Interp * interp, Tcl_Channel channel); /* 414 */ + void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ + void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ + void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ + int (*tcl_IsChannelExisting) (const char * channelName); /* 418 */ + int (*tcl_UniCharNcasecmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 419 */ + int (*tcl_UniCharCaseMatch) (const Tcl_UniChar * uniStr, const Tcl_UniChar * uniPattern, int nocase); /* 420 */ + Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, const char * key); /* 421 */ + Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, const char * key, int * newPtr); /* 422 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, const Tcl_HashKeyType * typePtr); /* 423 */ + void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ + ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ + int (*tcl_TraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ + void (*tcl_UntraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ + char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ + char * (*tcl_AttemptDbCkalloc) (unsigned int size, const char * file, int line); /* 429 */ + char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ + char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 431 */ + int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ + Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ + Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ + int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, const char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ + Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, const char * pattern); /* 436 */ + Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ + int (*tcl_DetachChannel) (Tcl_Interp * interp, Tcl_Channel channel); /* 438 */ + int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ + int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ + int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ + int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ + int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ + int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * sym1, const char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ + int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, const char * pattern, Tcl_GlobTypeData * types); /* 445 */ + Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ + int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ + int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ + int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ + int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ + int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ + int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ + const char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ + int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ + int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ + Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * modeString, int permissions); /* 456 */ + Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ + int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ + int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ + Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ + Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj * pathPtr, int * lenPtr); /* 461 */ + int (*tcl_FSEqualPaths) (Tcl_Obj * firstPtr, Tcl_Obj * secondPtr); /* 462 */ + Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 463 */ + Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj * pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ + Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 466 */ + int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ + Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem * fromFilesystem, ClientData clientData); /* 468 */ + const char * (*tcl_FSGetNativePath) (Tcl_Obj * pathPtr); /* 469 */ + Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj * pathPtr); /* 470 */ + Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj * pathPtr); /* 471 */ + Tcl_Obj * (*tcl_FSListVolumes) (void); /* 472 */ + int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (const Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (const Tcl_Filesystem * fsPtr); /* 475 */ + const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 476 */ + CONST86 Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj * pathPtr); /* 477 */ + Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ + int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ + void (*tcl_FSMountsChanged) (const Tcl_Filesystem * fsPtr); /* 480 */ + int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ + void (*tcl_GetTime) (Tcl_Time * timeBuf); /* 482 */ + Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp * interp, int level, int flags, Tcl_CmdObjTraceProc * objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc * delProc); /* 483 */ + int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo * infoPtr); /* 484 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo * infoPtr); /* 485 */ + Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char * file, int line); /* 486 */ + int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ + Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ + void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ + Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ + Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ + Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ + Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 493 */ + int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ + int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ + int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ + int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ + int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ + void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ + void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ + int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); /* 501 */ + int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv); /* 502 */ + Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ + Tcl_Obj * (*tcl_DbNewDictObj) (const char * file, int line); /* 504 */ + void (*tcl_RegisterConfig) (Tcl_Interp * interp, const char * pkgName, const Tcl_Config * configuration, const char * valEncoding); /* 505 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ + int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 509 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 510 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 511 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ + void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, const char * encodingName); /* 518 */ + Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ + void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ + void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ + int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ + int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ + int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ + void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ + void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ + void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ + int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ + int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ + void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ + void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ + int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ + void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ + int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ + Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ + int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ + void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ + int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ + Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ + int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ + Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, const char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ + Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ + int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ + int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ + int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ + int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ + int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ + int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ + int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ + int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ + int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ + void (*tcl_SetTimeProc) (Tcl_GetTimeProc * getProc, Tcl_ScaleTimeProc * scaleProc, ClientData clientData); /* 552 */ + void (*tcl_QueryTimeProc) (Tcl_GetTimeProc ** getProc, Tcl_ScaleTimeProc ** scaleProc, ClientData * clientData); /* 553 */ + Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType * chanTypePtr); /* 554 */ + Tcl_Obj * (*tcl_NewBignumObj) (mp_int * value); /* 555 */ + Tcl_Obj * (*tcl_DbNewBignumObj) (mp_int * value, const char * file, int line); /* 556 */ + void (*tcl_SetBignumObj) (Tcl_Obj * obj, mp_int * value); /* 557 */ + int (*tcl_GetBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 558 */ + int (*tcl_TakeBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 559 */ + int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ + Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType * chanTypePtr); /* 561 */ + void (*tcl_SetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj * msg); /* 562 */ + void (*tcl_GetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj ** msg); /* 563 */ + void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj * msg); /* 564 */ + void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj ** msg); /* 565 */ + int (*tcl_InitBignumFromDouble) (Tcl_Interp * interp, double initval, mp_int * toInit); /* 566 */ + Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ + int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ + int (*tcl_GetEncodingFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); /* 569 */ + Tcl_Obj * (*tcl_GetEncodingSearchPath) (void); /* 570 */ + int (*tcl_SetEncodingSearchPath) (Tcl_Obj * searchPath); /* 571 */ + const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString * bufPtr); /* 572 */ + int (*tcl_PkgRequireProc) (Tcl_Interp * interp, const char * name, int objc, Tcl_Obj *const objv[], ClientData * clientDataPtr); /* 573 */ + void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ + void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, const char * bytes, int length, int limit, const char * ellipsis); /* 575 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj *const objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj *const objv[]); /* 577 */ + Tcl_Obj * (*tcl_ObjPrintf) (const char * format, ...); /* 578 */ + void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, const char * format, ...); /* 579 */ + int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ + int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ + int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 582 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ + int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 584 */ + int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 585 */ + int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); /* 586 */ + void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 588 */ + unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statPtr); /* 589 */ + unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statPtr); /* 590 */ + unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statPtr); /* 591 */ + int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statPtr); /* 592 */ + int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statPtr); /* 593 */ + int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statPtr); /* 594 */ + int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statPtr); /* 595 */ + Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statPtr); /* 596 */ + Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statPtr); /* 597 */ + Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statPtr); /* 598 */ + Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statPtr); /* 599 */ + Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statPtr); /* 600 */ + unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ + int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ + int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ + int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ + int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ + void (*tcl_SetErrorLine) (Tcl_Interp * interp, int lineNum); /* 606 */ + void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ + int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ + void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ + int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */ + int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */ + unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const char * buf, int len); /* 612 */ + unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const char * buf, int len); /* 613 */ + int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ + Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ + int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ + int (*tcl_ZlibStreamAdler32) (Tcl_ZlibStream zshandle); /* 617 */ + int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int flush); /* 618 */ + int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ + int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ + int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */ + void (*tcl_SetStartupScript) (Tcl_Obj * path, const char * encoding); /* 622 */ + Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ + int (*tcl_CloseEx) (Tcl_Interp * interp, Tcl_Channel chan, int flags); /* 624 */ +} TclStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern const TclStubs *tclStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_PkgProvideEx +#define Tcl_PkgProvideEx \ + (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ +#endif +#ifndef Tcl_PkgRequireEx +#define Tcl_PkgRequireEx \ + (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ +#endif +#ifndef Tcl_Panic +#define Tcl_Panic \ + (tclStubsPtr->tcl_Panic) /* 2 */ +#endif +#ifndef Tcl_Alloc +#define Tcl_Alloc \ + (tclStubsPtr->tcl_Alloc) /* 3 */ +#endif +#ifndef Tcl_Free +#define Tcl_Free \ + (tclStubsPtr->tcl_Free) /* 4 */ +#endif +#ifndef Tcl_Realloc +#define Tcl_Realloc \ + (tclStubsPtr->tcl_Realloc) /* 5 */ +#endif +#ifndef Tcl_DbCkalloc +#define Tcl_DbCkalloc \ + (tclStubsPtr->tcl_DbCkalloc) /* 6 */ +#endif +#ifndef Tcl_DbCkfree +#define Tcl_DbCkfree \ + (tclStubsPtr->tcl_DbCkfree) /* 7 */ +#endif +#ifndef Tcl_DbCkrealloc +#define Tcl_DbCkrealloc \ + (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer +#define Tcl_SetTimer \ + (tclStubsPtr->tcl_SetTimer) /* 11 */ +#endif +#ifndef Tcl_Sleep +#define Tcl_Sleep \ + (tclStubsPtr->tcl_Sleep) /* 12 */ +#endif +#ifndef Tcl_WaitForEvent +#define Tcl_WaitForEvent \ + (tclStubsPtr->tcl_WaitForEvent) /* 13 */ +#endif +#ifndef Tcl_AppendAllObjTypes +#define Tcl_AppendAllObjTypes \ + (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ +#endif +#ifndef Tcl_AppendStringsToObj +#define Tcl_AppendStringsToObj \ + (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ +#endif +#ifndef Tcl_AppendToObj +#define Tcl_AppendToObj \ + (tclStubsPtr->tcl_AppendToObj) /* 16 */ +#endif +#ifndef Tcl_ConcatObj +#define Tcl_ConcatObj \ + (tclStubsPtr->tcl_ConcatObj) /* 17 */ +#endif +#ifndef Tcl_ConvertToType +#define Tcl_ConvertToType \ + (tclStubsPtr->tcl_ConvertToType) /* 18 */ +#endif +#ifndef Tcl_DbDecrRefCount +#define Tcl_DbDecrRefCount \ + (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ +#endif +#ifndef Tcl_DbIncrRefCount +#define Tcl_DbIncrRefCount \ + (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ +#endif +#ifndef Tcl_DbIsShared +#define Tcl_DbIsShared \ + (tclStubsPtr->tcl_DbIsShared) /* 21 */ +#endif +#ifndef Tcl_DbNewBooleanObj +#define Tcl_DbNewBooleanObj \ + (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ +#endif +#ifndef Tcl_DbNewByteArrayObj +#define Tcl_DbNewByteArrayObj \ + (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ +#endif +#ifndef Tcl_DbNewDoubleObj +#define Tcl_DbNewDoubleObj \ + (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ +#endif +#ifndef Tcl_DbNewListObj +#define Tcl_DbNewListObj \ + (tclStubsPtr->tcl_DbNewListObj) /* 25 */ +#endif +#ifndef Tcl_DbNewLongObj +#define Tcl_DbNewLongObj \ + (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ +#endif +#ifndef Tcl_DbNewObj +#define Tcl_DbNewObj \ + (tclStubsPtr->tcl_DbNewObj) /* 27 */ +#endif +#ifndef Tcl_DbNewStringObj +#define Tcl_DbNewStringObj \ + (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ +#endif +#ifndef Tcl_DuplicateObj +#define Tcl_DuplicateObj \ + (tclStubsPtr->tcl_DuplicateObj) /* 29 */ +#endif +#ifndef TclFreeObj +#define TclFreeObj \ + (tclStubsPtr->tclFreeObj) /* 30 */ +#endif +#ifndef Tcl_GetBoolean +#define Tcl_GetBoolean \ + (tclStubsPtr->tcl_GetBoolean) /* 31 */ +#endif +#ifndef Tcl_GetBooleanFromObj +#define Tcl_GetBooleanFromObj \ + (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ +#endif +#ifndef Tcl_GetByteArrayFromObj +#define Tcl_GetByteArrayFromObj \ + (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ +#endif +#ifndef Tcl_GetDouble +#define Tcl_GetDouble \ + (tclStubsPtr->tcl_GetDouble) /* 34 */ +#endif +#ifndef Tcl_GetDoubleFromObj +#define Tcl_GetDoubleFromObj \ + (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ +#endif +#ifndef Tcl_GetIndexFromObj +#define Tcl_GetIndexFromObj \ + (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ +#endif +#ifndef Tcl_GetInt +#define Tcl_GetInt \ + (tclStubsPtr->tcl_GetInt) /* 37 */ +#endif +#ifndef Tcl_GetIntFromObj +#define Tcl_GetIntFromObj \ + (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ +#endif +#ifndef Tcl_GetLongFromObj +#define Tcl_GetLongFromObj \ + (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ +#endif +#ifndef Tcl_GetObjType +#define Tcl_GetObjType \ + (tclStubsPtr->tcl_GetObjType) /* 40 */ +#endif +#ifndef Tcl_GetStringFromObj +#define Tcl_GetStringFromObj \ + (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ +#endif +#ifndef Tcl_InvalidateStringRep +#define Tcl_InvalidateStringRep \ + (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ +#endif +#ifndef Tcl_ListObjAppendList +#define Tcl_ListObjAppendList \ + (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ +#endif +#ifndef Tcl_ListObjAppendElement +#define Tcl_ListObjAppendElement \ + (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ +#endif +#ifndef Tcl_ListObjGetElements +#define Tcl_ListObjGetElements \ + (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ +#endif +#ifndef Tcl_ListObjIndex +#define Tcl_ListObjIndex \ + (tclStubsPtr->tcl_ListObjIndex) /* 46 */ +#endif +#ifndef Tcl_ListObjLength +#define Tcl_ListObjLength \ + (tclStubsPtr->tcl_ListObjLength) /* 47 */ +#endif +#ifndef Tcl_ListObjReplace +#define Tcl_ListObjReplace \ + (tclStubsPtr->tcl_ListObjReplace) /* 48 */ +#endif +#ifndef Tcl_NewBooleanObj +#define Tcl_NewBooleanObj \ + (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ +#endif +#ifndef Tcl_NewByteArrayObj +#define Tcl_NewByteArrayObj \ + (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ +#endif +#ifndef Tcl_NewDoubleObj +#define Tcl_NewDoubleObj \ + (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ +#endif +#ifndef Tcl_NewIntObj +#define Tcl_NewIntObj \ + (tclStubsPtr->tcl_NewIntObj) /* 52 */ +#endif +#ifndef Tcl_NewListObj +#define Tcl_NewListObj \ + (tclStubsPtr->tcl_NewListObj) /* 53 */ +#endif +#ifndef Tcl_NewLongObj +#define Tcl_NewLongObj \ + (tclStubsPtr->tcl_NewLongObj) /* 54 */ +#endif +#ifndef Tcl_NewObj +#define Tcl_NewObj \ + (tclStubsPtr->tcl_NewObj) /* 55 */ +#endif +#ifndef Tcl_NewStringObj +#define Tcl_NewStringObj \ + (tclStubsPtr->tcl_NewStringObj) /* 56 */ +#endif +#ifndef Tcl_SetBooleanObj +#define Tcl_SetBooleanObj \ + (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ +#endif +#ifndef Tcl_SetByteArrayLength +#define Tcl_SetByteArrayLength \ + (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ +#endif +#ifndef Tcl_SetByteArrayObj +#define Tcl_SetByteArrayObj \ + (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ +#endif +#ifndef Tcl_SetDoubleObj +#define Tcl_SetDoubleObj \ + (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ +#endif +#ifndef Tcl_SetIntObj +#define Tcl_SetIntObj \ + (tclStubsPtr->tcl_SetIntObj) /* 61 */ +#endif +#ifndef Tcl_SetListObj +#define Tcl_SetListObj \ + (tclStubsPtr->tcl_SetListObj) /* 62 */ +#endif +#ifndef Tcl_SetLongObj +#define Tcl_SetLongObj \ + (tclStubsPtr->tcl_SetLongObj) /* 63 */ +#endif +#ifndef Tcl_SetObjLength +#define Tcl_SetObjLength \ + (tclStubsPtr->tcl_SetObjLength) /* 64 */ +#endif +#ifndef Tcl_SetStringObj +#define Tcl_SetStringObj \ + (tclStubsPtr->tcl_SetStringObj) /* 65 */ +#endif +#ifndef Tcl_AddErrorInfo +#define Tcl_AddErrorInfo \ + (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ +#endif +#ifndef Tcl_AddObjErrorInfo +#define Tcl_AddObjErrorInfo \ + (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ +#endif +#ifndef Tcl_AllowExceptions +#define Tcl_AllowExceptions \ + (tclStubsPtr->tcl_AllowExceptions) /* 68 */ +#endif +#ifndef Tcl_AppendElement +#define Tcl_AppendElement \ + (tclStubsPtr->tcl_AppendElement) /* 69 */ +#endif +#ifndef Tcl_AppendResult +#define Tcl_AppendResult \ + (tclStubsPtr->tcl_AppendResult) /* 70 */ +#endif +#ifndef Tcl_AsyncCreate +#define Tcl_AsyncCreate \ + (tclStubsPtr->tcl_AsyncCreate) /* 71 */ +#endif +#ifndef Tcl_AsyncDelete +#define Tcl_AsyncDelete \ + (tclStubsPtr->tcl_AsyncDelete) /* 72 */ +#endif +#ifndef Tcl_AsyncInvoke +#define Tcl_AsyncInvoke \ + (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ +#endif +#ifndef Tcl_AsyncMark +#define Tcl_AsyncMark \ + (tclStubsPtr->tcl_AsyncMark) /* 74 */ +#endif +#ifndef Tcl_AsyncReady +#define Tcl_AsyncReady \ + (tclStubsPtr->tcl_AsyncReady) /* 75 */ +#endif +#ifndef Tcl_BackgroundError +#define Tcl_BackgroundError \ + (tclStubsPtr->tcl_BackgroundError) /* 76 */ +#endif +#ifndef Tcl_Backslash +#define Tcl_Backslash \ + (tclStubsPtr->tcl_Backslash) /* 77 */ +#endif +#ifndef Tcl_BadChannelOption +#define Tcl_BadChannelOption \ + (tclStubsPtr->tcl_BadChannelOption) /* 78 */ +#endif +#ifndef Tcl_CallWhenDeleted +#define Tcl_CallWhenDeleted \ + (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ +#endif +#ifndef Tcl_CancelIdleCall +#define Tcl_CancelIdleCall \ + (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ +#endif +#ifndef Tcl_Close +#define Tcl_Close \ + (tclStubsPtr->tcl_Close) /* 81 */ +#endif +#ifndef Tcl_CommandComplete +#define Tcl_CommandComplete \ + (tclStubsPtr->tcl_CommandComplete) /* 82 */ +#endif +#ifndef Tcl_Concat +#define Tcl_Concat \ + (tclStubsPtr->tcl_Concat) /* 83 */ +#endif +#ifndef Tcl_ConvertElement +#define Tcl_ConvertElement \ + (tclStubsPtr->tcl_ConvertElement) /* 84 */ +#endif +#ifndef Tcl_ConvertCountedElement +#define Tcl_ConvertCountedElement \ + (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ +#endif +#ifndef Tcl_CreateAlias +#define Tcl_CreateAlias \ + (tclStubsPtr->tcl_CreateAlias) /* 86 */ +#endif +#ifndef Tcl_CreateAliasObj +#define Tcl_CreateAliasObj \ + (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ +#endif +#ifndef Tcl_CreateChannel +#define Tcl_CreateChannel \ + (tclStubsPtr->tcl_CreateChannel) /* 88 */ +#endif +#ifndef Tcl_CreateChannelHandler +#define Tcl_CreateChannelHandler \ + (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ +#endif +#ifndef Tcl_CreateCloseHandler +#define Tcl_CreateCloseHandler \ + (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ +#endif +#ifndef Tcl_CreateCommand +#define Tcl_CreateCommand \ + (tclStubsPtr->tcl_CreateCommand) /* 91 */ +#endif +#ifndef Tcl_CreateEventSource +#define Tcl_CreateEventSource \ + (tclStubsPtr->tcl_CreateEventSource) /* 92 */ +#endif +#ifndef Tcl_CreateExitHandler +#define Tcl_CreateExitHandler \ + (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ +#endif +#ifndef Tcl_CreateInterp +#define Tcl_CreateInterp \ + (tclStubsPtr->tcl_CreateInterp) /* 94 */ +#endif +#ifndef Tcl_CreateMathFunc +#define Tcl_CreateMathFunc \ + (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ +#endif +#ifndef Tcl_CreateObjCommand +#define Tcl_CreateObjCommand \ + (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ +#endif +#ifndef Tcl_CreateSlave +#define Tcl_CreateSlave \ + (tclStubsPtr->tcl_CreateSlave) /* 97 */ +#endif +#ifndef Tcl_CreateTimerHandler +#define Tcl_CreateTimerHandler \ + (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ +#endif +#ifndef Tcl_CreateTrace +#define Tcl_CreateTrace \ + (tclStubsPtr->tcl_CreateTrace) /* 99 */ +#endif +#ifndef Tcl_DeleteAssocData +#define Tcl_DeleteAssocData \ + (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ +#endif +#ifndef Tcl_DeleteChannelHandler +#define Tcl_DeleteChannelHandler \ + (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ +#endif +#ifndef Tcl_DeleteCloseHandler +#define Tcl_DeleteCloseHandler \ + (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ +#endif +#ifndef Tcl_DeleteCommand +#define Tcl_DeleteCommand \ + (tclStubsPtr->tcl_DeleteCommand) /* 103 */ +#endif +#ifndef Tcl_DeleteCommandFromToken +#define Tcl_DeleteCommandFromToken \ + (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ +#endif +#ifndef Tcl_DeleteEvents +#define Tcl_DeleteEvents \ + (tclStubsPtr->tcl_DeleteEvents) /* 105 */ +#endif +#ifndef Tcl_DeleteEventSource +#define Tcl_DeleteEventSource \ + (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ +#endif +#ifndef Tcl_DeleteExitHandler +#define Tcl_DeleteExitHandler \ + (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ +#endif +#ifndef Tcl_DeleteHashEntry +#define Tcl_DeleteHashEntry \ + (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ +#endif +#ifndef Tcl_DeleteHashTable +#define Tcl_DeleteHashTable \ + (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ +#endif +#ifndef Tcl_DeleteInterp +#define Tcl_DeleteInterp \ + (tclStubsPtr->tcl_DeleteInterp) /* 110 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler +#define Tcl_DeleteTimerHandler \ + (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ +#endif +#ifndef Tcl_DeleteTrace +#define Tcl_DeleteTrace \ + (tclStubsPtr->tcl_DeleteTrace) /* 113 */ +#endif +#ifndef Tcl_DontCallWhenDeleted +#define Tcl_DontCallWhenDeleted \ + (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ +#endif +#ifndef Tcl_DoOneEvent +#define Tcl_DoOneEvent \ + (tclStubsPtr->tcl_DoOneEvent) /* 115 */ +#endif +#ifndef Tcl_DoWhenIdle +#define Tcl_DoWhenIdle \ + (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ +#endif +#ifndef Tcl_DStringAppend +#define Tcl_DStringAppend \ + (tclStubsPtr->tcl_DStringAppend) /* 117 */ +#endif +#ifndef Tcl_DStringAppendElement +#define Tcl_DStringAppendElement \ + (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ +#endif +#ifndef Tcl_DStringEndSublist +#define Tcl_DStringEndSublist \ + (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ +#endif +#ifndef Tcl_DStringFree +#define Tcl_DStringFree \ + (tclStubsPtr->tcl_DStringFree) /* 120 */ +#endif +#ifndef Tcl_DStringGetResult +#define Tcl_DStringGetResult \ + (tclStubsPtr->tcl_DStringGetResult) /* 121 */ +#endif +#ifndef Tcl_DStringInit +#define Tcl_DStringInit \ + (tclStubsPtr->tcl_DStringInit) /* 122 */ +#endif +#ifndef Tcl_DStringResult +#define Tcl_DStringResult \ + (tclStubsPtr->tcl_DStringResult) /* 123 */ +#endif +#ifndef Tcl_DStringSetLength +#define Tcl_DStringSetLength \ + (tclStubsPtr->tcl_DStringSetLength) /* 124 */ +#endif +#ifndef Tcl_DStringStartSublist +#define Tcl_DStringStartSublist \ + (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ +#endif +#ifndef Tcl_Eof +#define Tcl_Eof \ + (tclStubsPtr->tcl_Eof) /* 126 */ +#endif +#ifndef Tcl_ErrnoId +#define Tcl_ErrnoId \ + (tclStubsPtr->tcl_ErrnoId) /* 127 */ +#endif +#ifndef Tcl_ErrnoMsg +#define Tcl_ErrnoMsg \ + (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ +#endif +#ifndef Tcl_Eval +#define Tcl_Eval \ + (tclStubsPtr->tcl_Eval) /* 129 */ +#endif +#ifndef Tcl_EvalFile +#define Tcl_EvalFile \ + (tclStubsPtr->tcl_EvalFile) /* 130 */ +#endif +#ifndef Tcl_EvalObj +#define Tcl_EvalObj \ + (tclStubsPtr->tcl_EvalObj) /* 131 */ +#endif +#ifndef Tcl_EventuallyFree +#define Tcl_EventuallyFree \ + (tclStubsPtr->tcl_EventuallyFree) /* 132 */ +#endif +#ifndef Tcl_Exit +#define Tcl_Exit \ + (tclStubsPtr->tcl_Exit) /* 133 */ +#endif +#ifndef Tcl_ExposeCommand +#define Tcl_ExposeCommand \ + (tclStubsPtr->tcl_ExposeCommand) /* 134 */ +#endif +#ifndef Tcl_ExprBoolean +#define Tcl_ExprBoolean \ + (tclStubsPtr->tcl_ExprBoolean) /* 135 */ +#endif +#ifndef Tcl_ExprBooleanObj +#define Tcl_ExprBooleanObj \ + (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ +#endif +#ifndef Tcl_ExprDouble +#define Tcl_ExprDouble \ + (tclStubsPtr->tcl_ExprDouble) /* 137 */ +#endif +#ifndef Tcl_ExprDoubleObj +#define Tcl_ExprDoubleObj \ + (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ +#endif +#ifndef Tcl_ExprLong +#define Tcl_ExprLong \ + (tclStubsPtr->tcl_ExprLong) /* 139 */ +#endif +#ifndef Tcl_ExprLongObj +#define Tcl_ExprLongObj \ + (tclStubsPtr->tcl_ExprLongObj) /* 140 */ +#endif +#ifndef Tcl_ExprObj +#define Tcl_ExprObj \ + (tclStubsPtr->tcl_ExprObj) /* 141 */ +#endif +#ifndef Tcl_ExprString +#define Tcl_ExprString \ + (tclStubsPtr->tcl_ExprString) /* 142 */ +#endif +#ifndef Tcl_Finalize +#define Tcl_Finalize \ + (tclStubsPtr->tcl_Finalize) /* 143 */ +#endif +#ifndef Tcl_FindExecutable +#define Tcl_FindExecutable \ + (tclStubsPtr->tcl_FindExecutable) /* 144 */ +#endif +#ifndef Tcl_FirstHashEntry +#define Tcl_FirstHashEntry \ + (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ +#endif +#ifndef Tcl_Flush +#define Tcl_Flush \ + (tclStubsPtr->tcl_Flush) /* 146 */ +#endif +#ifndef Tcl_FreeResult +#define Tcl_FreeResult \ + (tclStubsPtr->tcl_FreeResult) /* 147 */ +#endif +#ifndef Tcl_GetAlias +#define Tcl_GetAlias \ + (tclStubsPtr->tcl_GetAlias) /* 148 */ +#endif +#ifndef Tcl_GetAliasObj +#define Tcl_GetAliasObj \ + (tclStubsPtr->tcl_GetAliasObj) /* 149 */ +#endif +#ifndef Tcl_GetAssocData +#define Tcl_GetAssocData \ + (tclStubsPtr->tcl_GetAssocData) /* 150 */ +#endif +#ifndef Tcl_GetChannel +#define Tcl_GetChannel \ + (tclStubsPtr->tcl_GetChannel) /* 151 */ +#endif +#ifndef Tcl_GetChannelBufferSize +#define Tcl_GetChannelBufferSize \ + (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ +#endif +#ifndef Tcl_GetChannelHandle +#define Tcl_GetChannelHandle \ + (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ +#endif +#ifndef Tcl_GetChannelInstanceData +#define Tcl_GetChannelInstanceData \ + (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ +#endif +#ifndef Tcl_GetChannelMode +#define Tcl_GetChannelMode \ + (tclStubsPtr->tcl_GetChannelMode) /* 155 */ +#endif +#ifndef Tcl_GetChannelName +#define Tcl_GetChannelName \ + (tclStubsPtr->tcl_GetChannelName) /* 156 */ +#endif +#ifndef Tcl_GetChannelOption +#define Tcl_GetChannelOption \ + (tclStubsPtr->tcl_GetChannelOption) /* 157 */ +#endif +#ifndef Tcl_GetChannelType +#define Tcl_GetChannelType \ + (tclStubsPtr->tcl_GetChannelType) /* 158 */ +#endif +#ifndef Tcl_GetCommandInfo +#define Tcl_GetCommandInfo \ + (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ +#endif +#ifndef Tcl_GetCommandName +#define Tcl_GetCommandName \ + (tclStubsPtr->tcl_GetCommandName) /* 160 */ +#endif +#ifndef Tcl_GetErrno +#define Tcl_GetErrno \ + (tclStubsPtr->tcl_GetErrno) /* 161 */ +#endif +#ifndef Tcl_GetHostName +#define Tcl_GetHostName \ + (tclStubsPtr->tcl_GetHostName) /* 162 */ +#endif +#ifndef Tcl_GetInterpPath +#define Tcl_GetInterpPath \ + (tclStubsPtr->tcl_GetInterpPath) /* 163 */ +#endif +#ifndef Tcl_GetMaster +#define Tcl_GetMaster \ + (tclStubsPtr->tcl_GetMaster) /* 164 */ +#endif +#ifndef Tcl_GetNameOfExecutable +#define Tcl_GetNameOfExecutable \ + (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ +#endif +#ifndef Tcl_GetObjResult +#define Tcl_GetObjResult \ + (tclStubsPtr->tcl_GetObjResult) /* 166 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType +#define Tcl_GetPathType \ + (tclStubsPtr->tcl_GetPathType) /* 168 */ +#endif +#ifndef Tcl_Gets +#define Tcl_Gets \ + (tclStubsPtr->tcl_Gets) /* 169 */ +#endif +#ifndef Tcl_GetsObj +#define Tcl_GetsObj \ + (tclStubsPtr->tcl_GetsObj) /* 170 */ +#endif +#ifndef Tcl_GetServiceMode +#define Tcl_GetServiceMode \ + (tclStubsPtr->tcl_GetServiceMode) /* 171 */ +#endif +#ifndef Tcl_GetSlave +#define Tcl_GetSlave \ + (tclStubsPtr->tcl_GetSlave) /* 172 */ +#endif +#ifndef Tcl_GetStdChannel +#define Tcl_GetStdChannel \ + (tclStubsPtr->tcl_GetStdChannel) /* 173 */ +#endif +#ifndef Tcl_GetStringResult +#define Tcl_GetStringResult \ + (tclStubsPtr->tcl_GetStringResult) /* 174 */ +#endif +#ifndef Tcl_GetVar +#define Tcl_GetVar \ + (tclStubsPtr->tcl_GetVar) /* 175 */ +#endif +#ifndef Tcl_GetVar2 +#define Tcl_GetVar2 \ + (tclStubsPtr->tcl_GetVar2) /* 176 */ +#endif +#ifndef Tcl_GlobalEval +#define Tcl_GlobalEval \ + (tclStubsPtr->tcl_GlobalEval) /* 177 */ +#endif +#ifndef Tcl_GlobalEvalObj +#define Tcl_GlobalEvalObj \ + (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ +#endif +#ifndef Tcl_HideCommand +#define Tcl_HideCommand \ + (tclStubsPtr->tcl_HideCommand) /* 179 */ +#endif +#ifndef Tcl_Init +#define Tcl_Init \ + (tclStubsPtr->tcl_Init) /* 180 */ +#endif +#ifndef Tcl_InitHashTable +#define Tcl_InitHashTable \ + (tclStubsPtr->tcl_InitHashTable) /* 181 */ +#endif +#ifndef Tcl_InputBlocked +#define Tcl_InputBlocked \ + (tclStubsPtr->tcl_InputBlocked) /* 182 */ +#endif +#ifndef Tcl_InputBuffered +#define Tcl_InputBuffered \ + (tclStubsPtr->tcl_InputBuffered) /* 183 */ +#endif +#ifndef Tcl_InterpDeleted +#define Tcl_InterpDeleted \ + (tclStubsPtr->tcl_InterpDeleted) /* 184 */ +#endif +#ifndef Tcl_IsSafe +#define Tcl_IsSafe \ + (tclStubsPtr->tcl_IsSafe) /* 185 */ +#endif +#ifndef Tcl_JoinPath +#define Tcl_JoinPath \ + (tclStubsPtr->tcl_JoinPath) /* 186 */ +#endif +#ifndef Tcl_LinkVar +#define Tcl_LinkVar \ + (tclStubsPtr->tcl_LinkVar) /* 187 */ +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel +#define Tcl_MakeFileChannel \ + (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ +#endif +#ifndef Tcl_MakeSafe +#define Tcl_MakeSafe \ + (tclStubsPtr->tcl_MakeSafe) /* 190 */ +#endif +#ifndef Tcl_MakeTcpClientChannel +#define Tcl_MakeTcpClientChannel \ + (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ +#endif +#ifndef Tcl_Merge +#define Tcl_Merge \ + (tclStubsPtr->tcl_Merge) /* 192 */ +#endif +#ifndef Tcl_NextHashEntry +#define Tcl_NextHashEntry \ + (tclStubsPtr->tcl_NextHashEntry) /* 193 */ +#endif +#ifndef Tcl_NotifyChannel +#define Tcl_NotifyChannel \ + (tclStubsPtr->tcl_NotifyChannel) /* 194 */ +#endif +#ifndef Tcl_ObjGetVar2 +#define Tcl_ObjGetVar2 \ + (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ +#endif +#ifndef Tcl_ObjSetVar2 +#define Tcl_ObjSetVar2 \ + (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel +#define Tcl_OpenFileChannel \ + (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ +#endif +#ifndef Tcl_OpenTcpClient +#define Tcl_OpenTcpClient \ + (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ +#endif +#ifndef Tcl_OpenTcpServer +#define Tcl_OpenTcpServer \ + (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ +#endif +#ifndef Tcl_Preserve +#define Tcl_Preserve \ + (tclStubsPtr->tcl_Preserve) /* 201 */ +#endif +#ifndef Tcl_PrintDouble +#define Tcl_PrintDouble \ + (tclStubsPtr->tcl_PrintDouble) /* 202 */ +#endif +#ifndef Tcl_PutEnv +#define Tcl_PutEnv \ + (tclStubsPtr->tcl_PutEnv) /* 203 */ +#endif +#ifndef Tcl_PosixError +#define Tcl_PosixError \ + (tclStubsPtr->tcl_PosixError) /* 204 */ +#endif +#ifndef Tcl_QueueEvent +#define Tcl_QueueEvent \ + (tclStubsPtr->tcl_QueueEvent) /* 205 */ +#endif +#ifndef Tcl_Read +#define Tcl_Read \ + (tclStubsPtr->tcl_Read) /* 206 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval +#define Tcl_RecordAndEval \ + (tclStubsPtr->tcl_RecordAndEval) /* 208 */ +#endif +#ifndef Tcl_RecordAndEvalObj +#define Tcl_RecordAndEvalObj \ + (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ +#endif +#ifndef Tcl_RegisterChannel +#define Tcl_RegisterChannel \ + (tclStubsPtr->tcl_RegisterChannel) /* 210 */ +#endif +#ifndef Tcl_RegisterObjType +#define Tcl_RegisterObjType \ + (tclStubsPtr->tcl_RegisterObjType) /* 211 */ +#endif +#ifndef Tcl_RegExpCompile +#define Tcl_RegExpCompile \ + (tclStubsPtr->tcl_RegExpCompile) /* 212 */ +#endif +#ifndef Tcl_RegExpExec +#define Tcl_RegExpExec \ + (tclStubsPtr->tcl_RegExpExec) /* 213 */ +#endif +#ifndef Tcl_RegExpMatch +#define Tcl_RegExpMatch \ + (tclStubsPtr->tcl_RegExpMatch) /* 214 */ +#endif +#ifndef Tcl_RegExpRange +#define Tcl_RegExpRange \ + (tclStubsPtr->tcl_RegExpRange) /* 215 */ +#endif +#ifndef Tcl_Release +#define Tcl_Release \ + (tclStubsPtr->tcl_Release) /* 216 */ +#endif +#ifndef Tcl_ResetResult +#define Tcl_ResetResult \ + (tclStubsPtr->tcl_ResetResult) /* 217 */ +#endif +#ifndef Tcl_ScanElement +#define Tcl_ScanElement \ + (tclStubsPtr->tcl_ScanElement) /* 218 */ +#endif +#ifndef Tcl_ScanCountedElement +#define Tcl_ScanCountedElement \ + (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ +#endif +#ifndef Tcl_SeekOld +#define Tcl_SeekOld \ + (tclStubsPtr->tcl_SeekOld) /* 220 */ +#endif +#ifndef Tcl_ServiceAll +#define Tcl_ServiceAll \ + (tclStubsPtr->tcl_ServiceAll) /* 221 */ +#endif +#ifndef Tcl_ServiceEvent +#define Tcl_ServiceEvent \ + (tclStubsPtr->tcl_ServiceEvent) /* 222 */ +#endif +#ifndef Tcl_SetAssocData +#define Tcl_SetAssocData \ + (tclStubsPtr->tcl_SetAssocData) /* 223 */ +#endif +#ifndef Tcl_SetChannelBufferSize +#define Tcl_SetChannelBufferSize \ + (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ +#endif +#ifndef Tcl_SetChannelOption +#define Tcl_SetChannelOption \ + (tclStubsPtr->tcl_SetChannelOption) /* 225 */ +#endif +#ifndef Tcl_SetCommandInfo +#define Tcl_SetCommandInfo \ + (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ +#endif +#ifndef Tcl_SetErrno +#define Tcl_SetErrno \ + (tclStubsPtr->tcl_SetErrno) /* 227 */ +#endif +#ifndef Tcl_SetErrorCode +#define Tcl_SetErrorCode \ + (tclStubsPtr->tcl_SetErrorCode) /* 228 */ +#endif +#ifndef Tcl_SetMaxBlockTime +#define Tcl_SetMaxBlockTime \ + (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ +#endif +#ifndef Tcl_SetPanicProc +#define Tcl_SetPanicProc \ + (tclStubsPtr->tcl_SetPanicProc) /* 230 */ +#endif +#ifndef Tcl_SetRecursionLimit +#define Tcl_SetRecursionLimit \ + (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ +#endif +#ifndef Tcl_SetResult +#define Tcl_SetResult \ + (tclStubsPtr->tcl_SetResult) /* 232 */ +#endif +#ifndef Tcl_SetServiceMode +#define Tcl_SetServiceMode \ + (tclStubsPtr->tcl_SetServiceMode) /* 233 */ +#endif +#ifndef Tcl_SetObjErrorCode +#define Tcl_SetObjErrorCode \ + (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ +#endif +#ifndef Tcl_SetObjResult +#define Tcl_SetObjResult \ + (tclStubsPtr->tcl_SetObjResult) /* 235 */ +#endif +#ifndef Tcl_SetStdChannel +#define Tcl_SetStdChannel \ + (tclStubsPtr->tcl_SetStdChannel) /* 236 */ +#endif +#ifndef Tcl_SetVar +#define Tcl_SetVar \ + (tclStubsPtr->tcl_SetVar) /* 237 */ +#endif +#ifndef Tcl_SetVar2 +#define Tcl_SetVar2 \ + (tclStubsPtr->tcl_SetVar2) /* 238 */ +#endif +#ifndef Tcl_SignalId +#define Tcl_SignalId \ + (tclStubsPtr->tcl_SignalId) /* 239 */ +#endif +#ifndef Tcl_SignalMsg +#define Tcl_SignalMsg \ + (tclStubsPtr->tcl_SignalMsg) /* 240 */ +#endif +#ifndef Tcl_SourceRCFile +#define Tcl_SourceRCFile \ + (tclStubsPtr->tcl_SourceRCFile) /* 241 */ +#endif +#ifndef Tcl_SplitList +#define Tcl_SplitList \ + (tclStubsPtr->tcl_SplitList) /* 242 */ +#endif +#ifndef Tcl_SplitPath +#define Tcl_SplitPath \ + (tclStubsPtr->tcl_SplitPath) /* 243 */ +#endif +#ifndef Tcl_StaticPackage +#define Tcl_StaticPackage \ + (tclStubsPtr->tcl_StaticPackage) /* 244 */ +#endif +#ifndef Tcl_StringMatch +#define Tcl_StringMatch \ + (tclStubsPtr->tcl_StringMatch) /* 245 */ +#endif +#ifndef Tcl_TellOld +#define Tcl_TellOld \ + (tclStubsPtr->tcl_TellOld) /* 246 */ +#endif +#ifndef Tcl_TraceVar +#define Tcl_TraceVar \ + (tclStubsPtr->tcl_TraceVar) /* 247 */ +#endif +#ifndef Tcl_TraceVar2 +#define Tcl_TraceVar2 \ + (tclStubsPtr->tcl_TraceVar2) /* 248 */ +#endif +#ifndef Tcl_TranslateFileName +#define Tcl_TranslateFileName \ + (tclStubsPtr->tcl_TranslateFileName) /* 249 */ +#endif +#ifndef Tcl_Ungets +#define Tcl_Ungets \ + (tclStubsPtr->tcl_Ungets) /* 250 */ +#endif +#ifndef Tcl_UnlinkVar +#define Tcl_UnlinkVar \ + (tclStubsPtr->tcl_UnlinkVar) /* 251 */ +#endif +#ifndef Tcl_UnregisterChannel +#define Tcl_UnregisterChannel \ + (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ +#endif +#ifndef Tcl_UnsetVar +#define Tcl_UnsetVar \ + (tclStubsPtr->tcl_UnsetVar) /* 253 */ +#endif +#ifndef Tcl_UnsetVar2 +#define Tcl_UnsetVar2 \ + (tclStubsPtr->tcl_UnsetVar2) /* 254 */ +#endif +#ifndef Tcl_UntraceVar +#define Tcl_UntraceVar \ + (tclStubsPtr->tcl_UntraceVar) /* 255 */ +#endif +#ifndef Tcl_UntraceVar2 +#define Tcl_UntraceVar2 \ + (tclStubsPtr->tcl_UntraceVar2) /* 256 */ +#endif +#ifndef Tcl_UpdateLinkedVar +#define Tcl_UpdateLinkedVar \ + (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ +#endif +#ifndef Tcl_UpVar +#define Tcl_UpVar \ + (tclStubsPtr->tcl_UpVar) /* 258 */ +#endif +#ifndef Tcl_UpVar2 +#define Tcl_UpVar2 \ + (tclStubsPtr->tcl_UpVar2) /* 259 */ +#endif +#ifndef Tcl_VarEval +#define Tcl_VarEval \ + (tclStubsPtr->tcl_VarEval) /* 260 */ +#endif +#ifndef Tcl_VarTraceInfo +#define Tcl_VarTraceInfo \ + (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ +#endif +#ifndef Tcl_VarTraceInfo2 +#define Tcl_VarTraceInfo2 \ + (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ +#endif +#ifndef Tcl_Write +#define Tcl_Write \ + (tclStubsPtr->tcl_Write) /* 263 */ +#endif +#ifndef Tcl_WrongNumArgs +#define Tcl_WrongNumArgs \ + (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ +#endif +#ifndef Tcl_DumpActiveMemory +#define Tcl_DumpActiveMemory \ + (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ +#endif +#ifndef Tcl_ValidateAllMemory +#define Tcl_ValidateAllMemory \ + (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ +#endif +#ifndef Tcl_AppendResultVA +#define Tcl_AppendResultVA \ + (tclStubsPtr->tcl_AppendResultVA) /* 267 */ +#endif +#ifndef Tcl_AppendStringsToObjVA +#define Tcl_AppendStringsToObjVA \ + (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ +#endif +#ifndef Tcl_HashStats +#define Tcl_HashStats \ + (tclStubsPtr->tcl_HashStats) /* 269 */ +#endif +#ifndef Tcl_ParseVar +#define Tcl_ParseVar \ + (tclStubsPtr->tcl_ParseVar) /* 270 */ +#endif +#ifndef Tcl_PkgPresent +#define Tcl_PkgPresent \ + (tclStubsPtr->tcl_PkgPresent) /* 271 */ +#endif +#ifndef Tcl_PkgPresentEx +#define Tcl_PkgPresentEx \ + (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ +#endif +#ifndef Tcl_PkgProvide +#define Tcl_PkgProvide \ + (tclStubsPtr->tcl_PkgProvide) /* 273 */ +#endif +#ifndef Tcl_PkgRequire +#define Tcl_PkgRequire \ + (tclStubsPtr->tcl_PkgRequire) /* 274 */ +#endif +#ifndef Tcl_SetErrorCodeVA +#define Tcl_SetErrorCodeVA \ + (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ +#endif +#ifndef Tcl_VarEvalVA +#define Tcl_VarEvalVA \ + (tclStubsPtr->tcl_VarEvalVA) /* 276 */ +#endif +#ifndef Tcl_WaitPid +#define Tcl_WaitPid \ + (tclStubsPtr->tcl_WaitPid) /* 277 */ +#endif +#ifndef Tcl_PanicVA +#define Tcl_PanicVA \ + (tclStubsPtr->tcl_PanicVA) /* 278 */ +#endif +#ifndef Tcl_GetVersion +#define Tcl_GetVersion \ + (tclStubsPtr->tcl_GetVersion) /* 279 */ +#endif +#ifndef Tcl_InitMemory +#define Tcl_InitMemory \ + (tclStubsPtr->tcl_InitMemory) /* 280 */ +#endif +#ifndef Tcl_StackChannel +#define Tcl_StackChannel \ + (tclStubsPtr->tcl_StackChannel) /* 281 */ +#endif +#ifndef Tcl_UnstackChannel +#define Tcl_UnstackChannel \ + (tclStubsPtr->tcl_UnstackChannel) /* 282 */ +#endif +#ifndef Tcl_GetStackedChannel +#define Tcl_GetStackedChannel \ + (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ +#endif +#ifndef Tcl_SetMainLoop +#define Tcl_SetMainLoop \ + (tclStubsPtr->tcl_SetMainLoop) /* 284 */ +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj +#define Tcl_AppendObjToObj \ + (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ +#endif +#ifndef Tcl_CreateEncoding +#define Tcl_CreateEncoding \ + (tclStubsPtr->tcl_CreateEncoding) /* 287 */ +#endif +#ifndef Tcl_CreateThreadExitHandler +#define Tcl_CreateThreadExitHandler \ + (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ +#endif +#ifndef Tcl_DeleteThreadExitHandler +#define Tcl_DeleteThreadExitHandler \ + (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ +#endif +#ifndef Tcl_DiscardResult +#define Tcl_DiscardResult \ + (tclStubsPtr->tcl_DiscardResult) /* 290 */ +#endif +#ifndef Tcl_EvalEx +#define Tcl_EvalEx \ + (tclStubsPtr->tcl_EvalEx) /* 291 */ +#endif +#ifndef Tcl_EvalObjv +#define Tcl_EvalObjv \ + (tclStubsPtr->tcl_EvalObjv) /* 292 */ +#endif +#ifndef Tcl_EvalObjEx +#define Tcl_EvalObjEx \ + (tclStubsPtr->tcl_EvalObjEx) /* 293 */ +#endif +#ifndef Tcl_ExitThread +#define Tcl_ExitThread \ + (tclStubsPtr->tcl_ExitThread) /* 294 */ +#endif +#ifndef Tcl_ExternalToUtf +#define Tcl_ExternalToUtf \ + (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ +#endif +#ifndef Tcl_ExternalToUtfDString +#define Tcl_ExternalToUtfDString \ + (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ +#endif +#ifndef Tcl_FinalizeThread +#define Tcl_FinalizeThread \ + (tclStubsPtr->tcl_FinalizeThread) /* 297 */ +#endif +#ifndef Tcl_FinalizeNotifier +#define Tcl_FinalizeNotifier \ + (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ +#endif +#ifndef Tcl_FreeEncoding +#define Tcl_FreeEncoding \ + (tclStubsPtr->tcl_FreeEncoding) /* 299 */ +#endif +#ifndef Tcl_GetCurrentThread +#define Tcl_GetCurrentThread \ + (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ +#endif +#ifndef Tcl_GetEncoding +#define Tcl_GetEncoding \ + (tclStubsPtr->tcl_GetEncoding) /* 301 */ +#endif +#ifndef Tcl_GetEncodingName +#define Tcl_GetEncodingName \ + (tclStubsPtr->tcl_GetEncodingName) /* 302 */ +#endif +#ifndef Tcl_GetEncodingNames +#define Tcl_GetEncodingNames \ + (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ +#endif +#ifndef Tcl_GetIndexFromObjStruct +#define Tcl_GetIndexFromObjStruct \ + (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ +#endif +#ifndef Tcl_GetThreadData +#define Tcl_GetThreadData \ + (tclStubsPtr->tcl_GetThreadData) /* 305 */ +#endif +#ifndef Tcl_GetVar2Ex +#define Tcl_GetVar2Ex \ + (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ +#endif +#ifndef Tcl_InitNotifier +#define Tcl_InitNotifier \ + (tclStubsPtr->tcl_InitNotifier) /* 307 */ +#endif +#ifndef Tcl_MutexLock +#define Tcl_MutexLock \ + (tclStubsPtr->tcl_MutexLock) /* 308 */ +#endif +#ifndef Tcl_MutexUnlock +#define Tcl_MutexUnlock \ + (tclStubsPtr->tcl_MutexUnlock) /* 309 */ +#endif +#ifndef Tcl_ConditionNotify +#define Tcl_ConditionNotify \ + (tclStubsPtr->tcl_ConditionNotify) /* 310 */ +#endif +#ifndef Tcl_ConditionWait +#define Tcl_ConditionWait \ + (tclStubsPtr->tcl_ConditionWait) /* 311 */ +#endif +#ifndef Tcl_NumUtfChars +#define Tcl_NumUtfChars \ + (tclStubsPtr->tcl_NumUtfChars) /* 312 */ +#endif +#ifndef Tcl_ReadChars +#define Tcl_ReadChars \ + (tclStubsPtr->tcl_ReadChars) /* 313 */ +#endif +#ifndef Tcl_RestoreResult +#define Tcl_RestoreResult \ + (tclStubsPtr->tcl_RestoreResult) /* 314 */ +#endif +#ifndef Tcl_SaveResult +#define Tcl_SaveResult \ + (tclStubsPtr->tcl_SaveResult) /* 315 */ +#endif +#ifndef Tcl_SetSystemEncoding +#define Tcl_SetSystemEncoding \ + (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ +#endif +#ifndef Tcl_SetVar2Ex +#define Tcl_SetVar2Ex \ + (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ +#endif +#ifndef Tcl_ThreadAlert +#define Tcl_ThreadAlert \ + (tclStubsPtr->tcl_ThreadAlert) /* 318 */ +#endif +#ifndef Tcl_ThreadQueueEvent +#define Tcl_ThreadQueueEvent \ + (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ +#endif +#ifndef Tcl_UniCharAtIndex +#define Tcl_UniCharAtIndex \ + (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ +#endif +#ifndef Tcl_UniCharToLower +#define Tcl_UniCharToLower \ + (tclStubsPtr->tcl_UniCharToLower) /* 321 */ +#endif +#ifndef Tcl_UniCharToTitle +#define Tcl_UniCharToTitle \ + (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ +#endif +#ifndef Tcl_UniCharToUpper +#define Tcl_UniCharToUpper \ + (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ +#endif +#ifndef Tcl_UniCharToUtf +#define Tcl_UniCharToUtf \ + (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ +#endif +#ifndef Tcl_UtfAtIndex +#define Tcl_UtfAtIndex \ + (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ +#endif +#ifndef Tcl_UtfCharComplete +#define Tcl_UtfCharComplete \ + (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ +#endif +#ifndef Tcl_UtfBackslash +#define Tcl_UtfBackslash \ + (tclStubsPtr->tcl_UtfBackslash) /* 327 */ +#endif +#ifndef Tcl_UtfFindFirst +#define Tcl_UtfFindFirst \ + (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ +#endif +#ifndef Tcl_UtfFindLast +#define Tcl_UtfFindLast \ + (tclStubsPtr->tcl_UtfFindLast) /* 329 */ +#endif +#ifndef Tcl_UtfNext +#define Tcl_UtfNext \ + (tclStubsPtr->tcl_UtfNext) /* 330 */ +#endif +#ifndef Tcl_UtfPrev +#define Tcl_UtfPrev \ + (tclStubsPtr->tcl_UtfPrev) /* 331 */ +#endif +#ifndef Tcl_UtfToExternal +#define Tcl_UtfToExternal \ + (tclStubsPtr->tcl_UtfToExternal) /* 332 */ +#endif +#ifndef Tcl_UtfToExternalDString +#define Tcl_UtfToExternalDString \ + (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ +#endif +#ifndef Tcl_UtfToLower +#define Tcl_UtfToLower \ + (tclStubsPtr->tcl_UtfToLower) /* 334 */ +#endif +#ifndef Tcl_UtfToTitle +#define Tcl_UtfToTitle \ + (tclStubsPtr->tcl_UtfToTitle) /* 335 */ +#endif +#ifndef Tcl_UtfToUniChar +#define Tcl_UtfToUniChar \ + (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ +#endif +#ifndef Tcl_UtfToUpper +#define Tcl_UtfToUpper \ + (tclStubsPtr->tcl_UtfToUpper) /* 337 */ +#endif +#ifndef Tcl_WriteChars +#define Tcl_WriteChars \ + (tclStubsPtr->tcl_WriteChars) /* 338 */ +#endif +#ifndef Tcl_WriteObj +#define Tcl_WriteObj \ + (tclStubsPtr->tcl_WriteObj) /* 339 */ +#endif +#ifndef Tcl_GetString +#define Tcl_GetString \ + (tclStubsPtr->tcl_GetString) /* 340 */ +#endif +#ifndef Tcl_GetDefaultEncodingDir +#define Tcl_GetDefaultEncodingDir \ + (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ +#endif +#ifndef Tcl_SetDefaultEncodingDir +#define Tcl_SetDefaultEncodingDir \ + (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ +#endif +#ifndef Tcl_AlertNotifier +#define Tcl_AlertNotifier \ + (tclStubsPtr->tcl_AlertNotifier) /* 343 */ +#endif +#ifndef Tcl_ServiceModeHook +#define Tcl_ServiceModeHook \ + (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ +#endif +#ifndef Tcl_UniCharIsAlnum +#define Tcl_UniCharIsAlnum \ + (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ +#endif +#ifndef Tcl_UniCharIsAlpha +#define Tcl_UniCharIsAlpha \ + (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ +#endif +#ifndef Tcl_UniCharIsDigit +#define Tcl_UniCharIsDigit \ + (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ +#endif +#ifndef Tcl_UniCharIsLower +#define Tcl_UniCharIsLower \ + (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ +#endif +#ifndef Tcl_UniCharIsSpace +#define Tcl_UniCharIsSpace \ + (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ +#endif +#ifndef Tcl_UniCharIsUpper +#define Tcl_UniCharIsUpper \ + (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ +#endif +#ifndef Tcl_UniCharIsWordChar +#define Tcl_UniCharIsWordChar \ + (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ +#endif +#ifndef Tcl_UniCharLen +#define Tcl_UniCharLen \ + (tclStubsPtr->tcl_UniCharLen) /* 352 */ +#endif +#ifndef Tcl_UniCharNcmp +#define Tcl_UniCharNcmp \ + (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ +#endif +#ifndef Tcl_UniCharToUtfDString +#define Tcl_UniCharToUtfDString \ + (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ +#endif +#ifndef Tcl_UtfToUniCharDString +#define Tcl_UtfToUniCharDString \ + (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ +#endif +#ifndef Tcl_GetRegExpFromObj +#define Tcl_GetRegExpFromObj \ + (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ +#endif +#ifndef Tcl_EvalTokens +#define Tcl_EvalTokens \ + (tclStubsPtr->tcl_EvalTokens) /* 357 */ +#endif +#ifndef Tcl_FreeParse +#define Tcl_FreeParse \ + (tclStubsPtr->tcl_FreeParse) /* 358 */ +#endif +#ifndef Tcl_LogCommandInfo +#define Tcl_LogCommandInfo \ + (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ +#endif +#ifndef Tcl_ParseBraces +#define Tcl_ParseBraces \ + (tclStubsPtr->tcl_ParseBraces) /* 360 */ +#endif +#ifndef Tcl_ParseCommand +#define Tcl_ParseCommand \ + (tclStubsPtr->tcl_ParseCommand) /* 361 */ +#endif +#ifndef Tcl_ParseExpr +#define Tcl_ParseExpr \ + (tclStubsPtr->tcl_ParseExpr) /* 362 */ +#endif +#ifndef Tcl_ParseQuotedString +#define Tcl_ParseQuotedString \ + (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ +#endif +#ifndef Tcl_ParseVarName +#define Tcl_ParseVarName \ + (tclStubsPtr->tcl_ParseVarName) /* 364 */ +#endif +#ifndef Tcl_GetCwd +#define Tcl_GetCwd \ + (tclStubsPtr->tcl_GetCwd) /* 365 */ +#endif +#ifndef Tcl_Chdir +#define Tcl_Chdir \ + (tclStubsPtr->tcl_Chdir) /* 366 */ +#endif +#ifndef Tcl_Access +#define Tcl_Access \ + (tclStubsPtr->tcl_Access) /* 367 */ +#endif +#ifndef Tcl_Stat +#define Tcl_Stat \ + (tclStubsPtr->tcl_Stat) /* 368 */ +#endif +#ifndef Tcl_UtfNcmp +#define Tcl_UtfNcmp \ + (tclStubsPtr->tcl_UtfNcmp) /* 369 */ +#endif +#ifndef Tcl_UtfNcasecmp +#define Tcl_UtfNcasecmp \ + (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ +#endif +#ifndef Tcl_StringCaseMatch +#define Tcl_StringCaseMatch \ + (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ +#endif +#ifndef Tcl_UniCharIsControl +#define Tcl_UniCharIsControl \ + (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ +#endif +#ifndef Tcl_UniCharIsGraph +#define Tcl_UniCharIsGraph \ + (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ +#endif +#ifndef Tcl_UniCharIsPrint +#define Tcl_UniCharIsPrint \ + (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ +#endif +#ifndef Tcl_UniCharIsPunct +#define Tcl_UniCharIsPunct \ + (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ +#endif +#ifndef Tcl_RegExpExecObj +#define Tcl_RegExpExecObj \ + (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ +#endif +#ifndef Tcl_RegExpGetInfo +#define Tcl_RegExpGetInfo \ + (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ +#endif +#ifndef Tcl_NewUnicodeObj +#define Tcl_NewUnicodeObj \ + (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ +#endif +#ifndef Tcl_SetUnicodeObj +#define Tcl_SetUnicodeObj \ + (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ +#endif +#ifndef Tcl_GetCharLength +#define Tcl_GetCharLength \ + (tclStubsPtr->tcl_GetCharLength) /* 380 */ +#endif +#ifndef Tcl_GetUniChar +#define Tcl_GetUniChar \ + (tclStubsPtr->tcl_GetUniChar) /* 381 */ +#endif +#ifndef Tcl_GetUnicode +#define Tcl_GetUnicode \ + (tclStubsPtr->tcl_GetUnicode) /* 382 */ +#endif +#ifndef Tcl_GetRange +#define Tcl_GetRange \ + (tclStubsPtr->tcl_GetRange) /* 383 */ +#endif +#ifndef Tcl_AppendUnicodeToObj +#define Tcl_AppendUnicodeToObj \ + (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ +#endif +#ifndef Tcl_RegExpMatchObj +#define Tcl_RegExpMatchObj \ + (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ +#endif +#ifndef Tcl_SetNotifier +#define Tcl_SetNotifier \ + (tclStubsPtr->tcl_SetNotifier) /* 386 */ +#endif +#ifndef Tcl_GetAllocMutex +#define Tcl_GetAllocMutex \ + (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ +#endif +#ifndef Tcl_GetChannelNames +#define Tcl_GetChannelNames \ + (tclStubsPtr->tcl_GetChannelNames) /* 388 */ +#endif +#ifndef Tcl_GetChannelNamesEx +#define Tcl_GetChannelNamesEx \ + (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ +#endif +#ifndef Tcl_ProcObjCmd +#define Tcl_ProcObjCmd \ + (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ +#endif +#ifndef Tcl_ConditionFinalize +#define Tcl_ConditionFinalize \ + (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ +#endif +#ifndef Tcl_MutexFinalize +#define Tcl_MutexFinalize \ + (tclStubsPtr->tcl_MutexFinalize) /* 392 */ +#endif +#ifndef Tcl_CreateThread +#define Tcl_CreateThread \ + (tclStubsPtr->tcl_CreateThread) /* 393 */ +#endif +#ifndef Tcl_ReadRaw +#define Tcl_ReadRaw \ + (tclStubsPtr->tcl_ReadRaw) /* 394 */ +#endif +#ifndef Tcl_WriteRaw +#define Tcl_WriteRaw \ + (tclStubsPtr->tcl_WriteRaw) /* 395 */ +#endif +#ifndef Tcl_GetTopChannel +#define Tcl_GetTopChannel \ + (tclStubsPtr->tcl_GetTopChannel) /* 396 */ +#endif +#ifndef Tcl_ChannelBuffered +#define Tcl_ChannelBuffered \ + (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ +#endif +#ifndef Tcl_ChannelName +#define Tcl_ChannelName \ + (tclStubsPtr->tcl_ChannelName) /* 398 */ +#endif +#ifndef Tcl_ChannelVersion +#define Tcl_ChannelVersion \ + (tclStubsPtr->tcl_ChannelVersion) /* 399 */ +#endif +#ifndef Tcl_ChannelBlockModeProc +#define Tcl_ChannelBlockModeProc \ + (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ +#endif +#ifndef Tcl_ChannelCloseProc +#define Tcl_ChannelCloseProc \ + (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ +#endif +#ifndef Tcl_ChannelClose2Proc +#define Tcl_ChannelClose2Proc \ + (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ +#endif +#ifndef Tcl_ChannelInputProc +#define Tcl_ChannelInputProc \ + (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ +#endif +#ifndef Tcl_ChannelOutputProc +#define Tcl_ChannelOutputProc \ + (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ +#endif +#ifndef Tcl_ChannelSeekProc +#define Tcl_ChannelSeekProc \ + (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ +#endif +#ifndef Tcl_ChannelSetOptionProc +#define Tcl_ChannelSetOptionProc \ + (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ +#endif +#ifndef Tcl_ChannelGetOptionProc +#define Tcl_ChannelGetOptionProc \ + (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ +#endif +#ifndef Tcl_ChannelWatchProc +#define Tcl_ChannelWatchProc \ + (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ +#endif +#ifndef Tcl_ChannelGetHandleProc +#define Tcl_ChannelGetHandleProc \ + (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ +#endif +#ifndef Tcl_ChannelFlushProc +#define Tcl_ChannelFlushProc \ + (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ +#endif +#ifndef Tcl_ChannelHandlerProc +#define Tcl_ChannelHandlerProc \ + (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ +#endif +#ifndef Tcl_JoinThread +#define Tcl_JoinThread \ + (tclStubsPtr->tcl_JoinThread) /* 412 */ +#endif +#ifndef Tcl_IsChannelShared +#define Tcl_IsChannelShared \ + (tclStubsPtr->tcl_IsChannelShared) /* 413 */ +#endif +#ifndef Tcl_IsChannelRegistered +#define Tcl_IsChannelRegistered \ + (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ +#endif +#ifndef Tcl_CutChannel +#define Tcl_CutChannel \ + (tclStubsPtr->tcl_CutChannel) /* 415 */ +#endif +#ifndef Tcl_SpliceChannel +#define Tcl_SpliceChannel \ + (tclStubsPtr->tcl_SpliceChannel) /* 416 */ +#endif +#ifndef Tcl_ClearChannelHandlers +#define Tcl_ClearChannelHandlers \ + (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ +#endif +#ifndef Tcl_IsChannelExisting +#define Tcl_IsChannelExisting \ + (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ +#endif +#ifndef Tcl_UniCharNcasecmp +#define Tcl_UniCharNcasecmp \ + (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ +#endif +#ifndef Tcl_UniCharCaseMatch +#define Tcl_UniCharCaseMatch \ + (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ +#endif +#ifndef Tcl_FindHashEntry +#define Tcl_FindHashEntry \ + (tclStubsPtr->tcl_FindHashEntry) /* 421 */ +#endif +#ifndef Tcl_CreateHashEntry +#define Tcl_CreateHashEntry \ + (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ +#endif +#ifndef Tcl_InitCustomHashTable +#define Tcl_InitCustomHashTable \ + (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ +#endif +#ifndef Tcl_InitObjHashTable +#define Tcl_InitObjHashTable \ + (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ +#endif +#ifndef Tcl_CommandTraceInfo +#define Tcl_CommandTraceInfo \ + (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ +#endif +#ifndef Tcl_TraceCommand +#define Tcl_TraceCommand \ + (tclStubsPtr->tcl_TraceCommand) /* 426 */ +#endif +#ifndef Tcl_UntraceCommand +#define Tcl_UntraceCommand \ + (tclStubsPtr->tcl_UntraceCommand) /* 427 */ +#endif +#ifndef Tcl_AttemptAlloc +#define Tcl_AttemptAlloc \ + (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ +#endif +#ifndef Tcl_AttemptDbCkalloc +#define Tcl_AttemptDbCkalloc \ + (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ +#endif +#ifndef Tcl_AttemptRealloc +#define Tcl_AttemptRealloc \ + (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ +#endif +#ifndef Tcl_AttemptDbCkrealloc +#define Tcl_AttemptDbCkrealloc \ + (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ +#endif +#ifndef Tcl_AttemptSetObjLength +#define Tcl_AttemptSetObjLength \ + (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ +#endif +#ifndef Tcl_GetChannelThread +#define Tcl_GetChannelThread \ + (tclStubsPtr->tcl_GetChannelThread) /* 433 */ +#endif +#ifndef Tcl_GetUnicodeFromObj +#define Tcl_GetUnicodeFromObj \ + (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ +#endif +#ifndef Tcl_GetMathFuncInfo +#define Tcl_GetMathFuncInfo \ + (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ +#endif +#ifndef Tcl_ListMathFuncs +#define Tcl_ListMathFuncs \ + (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ +#endif +#ifndef Tcl_SubstObj +#define Tcl_SubstObj \ + (tclStubsPtr->tcl_SubstObj) /* 437 */ +#endif +#ifndef Tcl_DetachChannel +#define Tcl_DetachChannel \ + (tclStubsPtr->tcl_DetachChannel) /* 438 */ +#endif +#ifndef Tcl_IsStandardChannel +#define Tcl_IsStandardChannel \ + (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ +#endif +#ifndef Tcl_FSCopyFile +#define Tcl_FSCopyFile \ + (tclStubsPtr->tcl_FSCopyFile) /* 440 */ +#endif +#ifndef Tcl_FSCopyDirectory +#define Tcl_FSCopyDirectory \ + (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ +#endif +#ifndef Tcl_FSCreateDirectory +#define Tcl_FSCreateDirectory \ + (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ +#endif +#ifndef Tcl_FSDeleteFile +#define Tcl_FSDeleteFile \ + (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ +#endif +#ifndef Tcl_FSLoadFile +#define Tcl_FSLoadFile \ + (tclStubsPtr->tcl_FSLoadFile) /* 444 */ +#endif +#ifndef Tcl_FSMatchInDirectory +#define Tcl_FSMatchInDirectory \ + (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ +#endif +#ifndef Tcl_FSLink +#define Tcl_FSLink \ + (tclStubsPtr->tcl_FSLink) /* 446 */ +#endif +#ifndef Tcl_FSRemoveDirectory +#define Tcl_FSRemoveDirectory \ + (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ +#endif +#ifndef Tcl_FSRenameFile +#define Tcl_FSRenameFile \ + (tclStubsPtr->tcl_FSRenameFile) /* 448 */ +#endif +#ifndef Tcl_FSLstat +#define Tcl_FSLstat \ + (tclStubsPtr->tcl_FSLstat) /* 449 */ +#endif +#ifndef Tcl_FSUtime +#define Tcl_FSUtime \ + (tclStubsPtr->tcl_FSUtime) /* 450 */ +#endif +#ifndef Tcl_FSFileAttrsGet +#define Tcl_FSFileAttrsGet \ + (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ +#endif +#ifndef Tcl_FSFileAttrsSet +#define Tcl_FSFileAttrsSet \ + (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ +#endif +#ifndef Tcl_FSFileAttrStrings +#define Tcl_FSFileAttrStrings \ + (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ +#endif +#ifndef Tcl_FSStat +#define Tcl_FSStat \ + (tclStubsPtr->tcl_FSStat) /* 454 */ +#endif +#ifndef Tcl_FSAccess +#define Tcl_FSAccess \ + (tclStubsPtr->tcl_FSAccess) /* 455 */ +#endif +#ifndef Tcl_FSOpenFileChannel +#define Tcl_FSOpenFileChannel \ + (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ +#endif +#ifndef Tcl_FSGetCwd +#define Tcl_FSGetCwd \ + (tclStubsPtr->tcl_FSGetCwd) /* 457 */ +#endif +#ifndef Tcl_FSChdir +#define Tcl_FSChdir \ + (tclStubsPtr->tcl_FSChdir) /* 458 */ +#endif +#ifndef Tcl_FSConvertToPathType +#define Tcl_FSConvertToPathType \ + (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ +#endif +#ifndef Tcl_FSJoinPath +#define Tcl_FSJoinPath \ + (tclStubsPtr->tcl_FSJoinPath) /* 460 */ +#endif +#ifndef Tcl_FSSplitPath +#define Tcl_FSSplitPath \ + (tclStubsPtr->tcl_FSSplitPath) /* 461 */ +#endif +#ifndef Tcl_FSEqualPaths +#define Tcl_FSEqualPaths \ + (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ +#endif +#ifndef Tcl_FSGetNormalizedPath +#define Tcl_FSGetNormalizedPath \ + (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ +#endif +#ifndef Tcl_FSJoinToPath +#define Tcl_FSJoinToPath \ + (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ +#endif +#ifndef Tcl_FSGetInternalRep +#define Tcl_FSGetInternalRep \ + (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ +#endif +#ifndef Tcl_FSGetTranslatedPath +#define Tcl_FSGetTranslatedPath \ + (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ +#endif +#ifndef Tcl_FSEvalFile +#define Tcl_FSEvalFile \ + (tclStubsPtr->tcl_FSEvalFile) /* 467 */ +#endif +#ifndef Tcl_FSNewNativePath +#define Tcl_FSNewNativePath \ + (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ +#endif +#ifndef Tcl_FSGetNativePath +#define Tcl_FSGetNativePath \ + (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ +#endif +#ifndef Tcl_FSFileSystemInfo +#define Tcl_FSFileSystemInfo \ + (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ +#endif +#ifndef Tcl_FSPathSeparator +#define Tcl_FSPathSeparator \ + (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ +#endif +#ifndef Tcl_FSListVolumes +#define Tcl_FSListVolumes \ + (tclStubsPtr->tcl_FSListVolumes) /* 472 */ +#endif +#ifndef Tcl_FSRegister +#define Tcl_FSRegister \ + (tclStubsPtr->tcl_FSRegister) /* 473 */ +#endif +#ifndef Tcl_FSUnregister +#define Tcl_FSUnregister \ + (tclStubsPtr->tcl_FSUnregister) /* 474 */ +#endif +#ifndef Tcl_FSData +#define Tcl_FSData \ + (tclStubsPtr->tcl_FSData) /* 475 */ +#endif +#ifndef Tcl_FSGetTranslatedStringPath +#define Tcl_FSGetTranslatedStringPath \ + (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ +#endif +#ifndef Tcl_FSGetFileSystemForPath +#define Tcl_FSGetFileSystemForPath \ + (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ +#endif +#ifndef Tcl_FSGetPathType +#define Tcl_FSGetPathType \ + (tclStubsPtr->tcl_FSGetPathType) /* 478 */ +#endif +#ifndef Tcl_OutputBuffered +#define Tcl_OutputBuffered \ + (tclStubsPtr->tcl_OutputBuffered) /* 479 */ +#endif +#ifndef Tcl_FSMountsChanged +#define Tcl_FSMountsChanged \ + (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ +#endif +#ifndef Tcl_EvalTokensStandard +#define Tcl_EvalTokensStandard \ + (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ +#endif +#ifndef Tcl_GetTime +#define Tcl_GetTime \ + (tclStubsPtr->tcl_GetTime) /* 482 */ +#endif +#ifndef Tcl_CreateObjTrace +#define Tcl_CreateObjTrace \ + (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ +#endif +#ifndef Tcl_GetCommandInfoFromToken +#define Tcl_GetCommandInfoFromToken \ + (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ +#endif +#ifndef Tcl_SetCommandInfoFromToken +#define Tcl_SetCommandInfoFromToken \ + (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ +#endif +#ifndef Tcl_DbNewWideIntObj +#define Tcl_DbNewWideIntObj \ + (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ +#endif +#ifndef Tcl_GetWideIntFromObj +#define Tcl_GetWideIntFromObj \ + (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ +#endif +#ifndef Tcl_NewWideIntObj +#define Tcl_NewWideIntObj \ + (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ +#endif +#ifndef Tcl_SetWideIntObj +#define Tcl_SetWideIntObj \ + (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ +#endif +#ifndef Tcl_AllocStatBuf +#define Tcl_AllocStatBuf \ + (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ +#endif +#ifndef Tcl_Seek +#define Tcl_Seek \ + (tclStubsPtr->tcl_Seek) /* 491 */ +#endif +#ifndef Tcl_Tell +#define Tcl_Tell \ + (tclStubsPtr->tcl_Tell) /* 492 */ +#endif +#ifndef Tcl_ChannelWideSeekProc +#define Tcl_ChannelWideSeekProc \ + (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ +#endif +#ifndef Tcl_DictObjPut +#define Tcl_DictObjPut \ + (tclStubsPtr->tcl_DictObjPut) /* 494 */ +#endif +#ifndef Tcl_DictObjGet +#define Tcl_DictObjGet \ + (tclStubsPtr->tcl_DictObjGet) /* 495 */ +#endif +#ifndef Tcl_DictObjRemove +#define Tcl_DictObjRemove \ + (tclStubsPtr->tcl_DictObjRemove) /* 496 */ +#endif +#ifndef Tcl_DictObjSize +#define Tcl_DictObjSize \ + (tclStubsPtr->tcl_DictObjSize) /* 497 */ +#endif +#ifndef Tcl_DictObjFirst +#define Tcl_DictObjFirst \ + (tclStubsPtr->tcl_DictObjFirst) /* 498 */ +#endif +#ifndef Tcl_DictObjNext +#define Tcl_DictObjNext \ + (tclStubsPtr->tcl_DictObjNext) /* 499 */ +#endif +#ifndef Tcl_DictObjDone +#define Tcl_DictObjDone \ + (tclStubsPtr->tcl_DictObjDone) /* 500 */ +#endif +#ifndef Tcl_DictObjPutKeyList +#define Tcl_DictObjPutKeyList \ + (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ +#endif +#ifndef Tcl_DictObjRemoveKeyList +#define Tcl_DictObjRemoveKeyList \ + (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ +#endif +#ifndef Tcl_NewDictObj +#define Tcl_NewDictObj \ + (tclStubsPtr->tcl_NewDictObj) /* 503 */ +#endif +#ifndef Tcl_DbNewDictObj +#define Tcl_DbNewDictObj \ + (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ +#endif +#ifndef Tcl_RegisterConfig +#define Tcl_RegisterConfig \ + (tclStubsPtr->tcl_RegisterConfig) /* 505 */ +#endif +#ifndef Tcl_CreateNamespace +#define Tcl_CreateNamespace \ + (tclStubsPtr->tcl_CreateNamespace) /* 506 */ +#endif +#ifndef Tcl_DeleteNamespace +#define Tcl_DeleteNamespace \ + (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ +#endif +#ifndef Tcl_AppendExportList +#define Tcl_AppendExportList \ + (tclStubsPtr->tcl_AppendExportList) /* 508 */ +#endif +#ifndef Tcl_Export +#define Tcl_Export \ + (tclStubsPtr->tcl_Export) /* 509 */ +#endif +#ifndef Tcl_Import +#define Tcl_Import \ + (tclStubsPtr->tcl_Import) /* 510 */ +#endif +#ifndef Tcl_ForgetImport +#define Tcl_ForgetImport \ + (tclStubsPtr->tcl_ForgetImport) /* 511 */ +#endif +#ifndef Tcl_GetCurrentNamespace +#define Tcl_GetCurrentNamespace \ + (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ +#endif +#ifndef Tcl_GetGlobalNamespace +#define Tcl_GetGlobalNamespace \ + (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ +#endif +#ifndef Tcl_FindNamespace +#define Tcl_FindNamespace \ + (tclStubsPtr->tcl_FindNamespace) /* 514 */ +#endif +#ifndef Tcl_FindCommand +#define Tcl_FindCommand \ + (tclStubsPtr->tcl_FindCommand) /* 515 */ +#endif +#ifndef Tcl_GetCommandFromObj +#define Tcl_GetCommandFromObj \ + (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ +#endif +#ifndef Tcl_GetCommandFullName +#define Tcl_GetCommandFullName \ + (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ +#endif +#ifndef Tcl_FSEvalFileEx +#define Tcl_FSEvalFileEx \ + (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ +#endif +#ifndef Tcl_SetExitProc +#define Tcl_SetExitProc \ + (tclStubsPtr->tcl_SetExitProc) /* 519 */ +#endif +#ifndef Tcl_LimitAddHandler +#define Tcl_LimitAddHandler \ + (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ +#endif +#ifndef Tcl_LimitRemoveHandler +#define Tcl_LimitRemoveHandler \ + (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ +#endif +#ifndef Tcl_LimitReady +#define Tcl_LimitReady \ + (tclStubsPtr->tcl_LimitReady) /* 522 */ +#endif +#ifndef Tcl_LimitCheck +#define Tcl_LimitCheck \ + (tclStubsPtr->tcl_LimitCheck) /* 523 */ +#endif +#ifndef Tcl_LimitExceeded +#define Tcl_LimitExceeded \ + (tclStubsPtr->tcl_LimitExceeded) /* 524 */ +#endif +#ifndef Tcl_LimitSetCommands +#define Tcl_LimitSetCommands \ + (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ +#endif +#ifndef Tcl_LimitSetTime +#define Tcl_LimitSetTime \ + (tclStubsPtr->tcl_LimitSetTime) /* 526 */ +#endif +#ifndef Tcl_LimitSetGranularity +#define Tcl_LimitSetGranularity \ + (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ +#endif +#ifndef Tcl_LimitTypeEnabled +#define Tcl_LimitTypeEnabled \ + (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ +#endif +#ifndef Tcl_LimitTypeExceeded +#define Tcl_LimitTypeExceeded \ + (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ +#endif +#ifndef Tcl_LimitTypeSet +#define Tcl_LimitTypeSet \ + (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ +#endif +#ifndef Tcl_LimitTypeReset +#define Tcl_LimitTypeReset \ + (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ +#endif +#ifndef Tcl_LimitGetCommands +#define Tcl_LimitGetCommands \ + (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ +#endif +#ifndef Tcl_LimitGetTime +#define Tcl_LimitGetTime \ + (tclStubsPtr->tcl_LimitGetTime) /* 533 */ +#endif +#ifndef Tcl_LimitGetGranularity +#define Tcl_LimitGetGranularity \ + (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ +#endif +#ifndef Tcl_SaveInterpState +#define Tcl_SaveInterpState \ + (tclStubsPtr->tcl_SaveInterpState) /* 535 */ +#endif +#ifndef Tcl_RestoreInterpState +#define Tcl_RestoreInterpState \ + (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ +#endif +#ifndef Tcl_DiscardInterpState +#define Tcl_DiscardInterpState \ + (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ +#endif +#ifndef Tcl_SetReturnOptions +#define Tcl_SetReturnOptions \ + (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ +#endif +#ifndef Tcl_GetReturnOptions +#define Tcl_GetReturnOptions \ + (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ +#endif +#ifndef Tcl_IsEnsemble +#define Tcl_IsEnsemble \ + (tclStubsPtr->tcl_IsEnsemble) /* 540 */ +#endif +#ifndef Tcl_CreateEnsemble +#define Tcl_CreateEnsemble \ + (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ +#endif +#ifndef Tcl_FindEnsemble +#define Tcl_FindEnsemble \ + (tclStubsPtr->tcl_FindEnsemble) /* 542 */ +#endif +#ifndef Tcl_SetEnsembleSubcommandList +#define Tcl_SetEnsembleSubcommandList \ + (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ +#endif +#ifndef Tcl_SetEnsembleMappingDict +#define Tcl_SetEnsembleMappingDict \ + (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ +#endif +#ifndef Tcl_SetEnsembleUnknownHandler +#define Tcl_SetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ +#endif +#ifndef Tcl_SetEnsembleFlags +#define Tcl_SetEnsembleFlags \ + (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ +#endif +#ifndef Tcl_GetEnsembleSubcommandList +#define Tcl_GetEnsembleSubcommandList \ + (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ +#endif +#ifndef Tcl_GetEnsembleMappingDict +#define Tcl_GetEnsembleMappingDict \ + (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ +#endif +#ifndef Tcl_GetEnsembleUnknownHandler +#define Tcl_GetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ +#endif +#ifndef Tcl_GetEnsembleFlags +#define Tcl_GetEnsembleFlags \ + (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ +#endif +#ifndef Tcl_GetEnsembleNamespace +#define Tcl_GetEnsembleNamespace \ + (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ +#endif +#ifndef Tcl_SetTimeProc +#define Tcl_SetTimeProc \ + (tclStubsPtr->tcl_SetTimeProc) /* 552 */ +#endif +#ifndef Tcl_QueryTimeProc +#define Tcl_QueryTimeProc \ + (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ +#endif +#ifndef Tcl_ChannelThreadActionProc +#define Tcl_ChannelThreadActionProc \ + (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ +#endif +#ifndef Tcl_NewBignumObj +#define Tcl_NewBignumObj \ + (tclStubsPtr->tcl_NewBignumObj) /* 555 */ +#endif +#ifndef Tcl_DbNewBignumObj +#define Tcl_DbNewBignumObj \ + (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ +#endif +#ifndef Tcl_SetBignumObj +#define Tcl_SetBignumObj \ + (tclStubsPtr->tcl_SetBignumObj) /* 557 */ +#endif +#ifndef Tcl_GetBignumFromObj +#define Tcl_GetBignumFromObj \ + (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ +#endif +#ifndef Tcl_TakeBignumFromObj +#define Tcl_TakeBignumFromObj \ + (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ +#endif +#ifndef Tcl_TruncateChannel +#define Tcl_TruncateChannel \ + (tclStubsPtr->tcl_TruncateChannel) /* 560 */ +#endif +#ifndef Tcl_ChannelTruncateProc +#define Tcl_ChannelTruncateProc \ + (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ +#endif +#ifndef Tcl_SetChannelErrorInterp +#define Tcl_SetChannelErrorInterp \ + (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ +#endif +#ifndef Tcl_GetChannelErrorInterp +#define Tcl_GetChannelErrorInterp \ + (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ +#endif +#ifndef Tcl_SetChannelError +#define Tcl_SetChannelError \ + (tclStubsPtr->tcl_SetChannelError) /* 564 */ +#endif +#ifndef Tcl_GetChannelError +#define Tcl_GetChannelError \ + (tclStubsPtr->tcl_GetChannelError) /* 565 */ +#endif +#ifndef Tcl_InitBignumFromDouble +#define Tcl_InitBignumFromDouble \ + (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ +#endif +#ifndef Tcl_GetNamespaceUnknownHandler +#define Tcl_GetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ +#endif +#ifndef Tcl_SetNamespaceUnknownHandler +#define Tcl_SetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ +#endif +#ifndef Tcl_GetEncodingFromObj +#define Tcl_GetEncodingFromObj \ + (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ +#endif +#ifndef Tcl_GetEncodingSearchPath +#define Tcl_GetEncodingSearchPath \ + (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ +#endif +#ifndef Tcl_SetEncodingSearchPath +#define Tcl_SetEncodingSearchPath \ + (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment +#define Tcl_GetEncodingNameFromEnvironment \ + (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ +#endif +#ifndef Tcl_PkgRequireProc +#define Tcl_PkgRequireProc \ + (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ +#endif +#ifndef Tcl_AppendObjToErrorInfo +#define Tcl_AppendObjToErrorInfo \ + (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ +#endif +#ifndef Tcl_AppendLimitedToObj +#define Tcl_AppendLimitedToObj \ + (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ +#endif +#ifndef Tcl_Format +#define Tcl_Format \ + (tclStubsPtr->tcl_Format) /* 576 */ +#endif +#ifndef Tcl_AppendFormatToObj +#define Tcl_AppendFormatToObj \ + (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ +#endif +#ifndef Tcl_ObjPrintf +#define Tcl_ObjPrintf \ + (tclStubsPtr->tcl_ObjPrintf) /* 578 */ +#endif +#ifndef Tcl_AppendPrintfToObj +#define Tcl_AppendPrintfToObj \ + (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ +#endif +#ifndef Tcl_CancelEval +#define Tcl_CancelEval \ + (tclStubsPtr->tcl_CancelEval) /* 580 */ +#endif +#ifndef Tcl_Canceled +#define Tcl_Canceled \ + (tclStubsPtr->tcl_Canceled) /* 581 */ +#endif +#ifndef Tcl_CreatePipe +#define Tcl_CreatePipe \ + (tclStubsPtr->tcl_CreatePipe) /* 582 */ +#endif +#ifndef Tcl_NRCreateCommand +#define Tcl_NRCreateCommand \ + (tclStubsPtr->tcl_NRCreateCommand) /* 583 */ +#endif +#ifndef Tcl_NREvalObj +#define Tcl_NREvalObj \ + (tclStubsPtr->tcl_NREvalObj) /* 584 */ +#endif +#ifndef Tcl_NREvalObjv +#define Tcl_NREvalObjv \ + (tclStubsPtr->tcl_NREvalObjv) /* 585 */ +#endif +#ifndef Tcl_NRCmdSwap +#define Tcl_NRCmdSwap \ + (tclStubsPtr->tcl_NRCmdSwap) /* 586 */ +#endif +#ifndef Tcl_NRAddCallback +#define Tcl_NRAddCallback \ + (tclStubsPtr->tcl_NRAddCallback) /* 587 */ +#endif +#ifndef Tcl_NRCallObjProc +#define Tcl_NRCallObjProc \ + (tclStubsPtr->tcl_NRCallObjProc) /* 588 */ +#endif +#ifndef Tcl_GetFSDeviceFromStat +#define Tcl_GetFSDeviceFromStat \ + (tclStubsPtr->tcl_GetFSDeviceFromStat) /* 589 */ +#endif +#ifndef Tcl_GetFSInodeFromStat +#define Tcl_GetFSInodeFromStat \ + (tclStubsPtr->tcl_GetFSInodeFromStat) /* 590 */ +#endif +#ifndef Tcl_GetModeFromStat +#define Tcl_GetModeFromStat \ + (tclStubsPtr->tcl_GetModeFromStat) /* 591 */ +#endif +#ifndef Tcl_GetLinkCountFromStat +#define Tcl_GetLinkCountFromStat \ + (tclStubsPtr->tcl_GetLinkCountFromStat) /* 592 */ +#endif +#ifndef Tcl_GetUserIdFromStat +#define Tcl_GetUserIdFromStat \ + (tclStubsPtr->tcl_GetUserIdFromStat) /* 593 */ +#endif +#ifndef Tcl_GetGroupIdFromStat +#define Tcl_GetGroupIdFromStat \ + (tclStubsPtr->tcl_GetGroupIdFromStat) /* 594 */ +#endif +#ifndef Tcl_GetDeviceTypeFromStat +#define Tcl_GetDeviceTypeFromStat \ + (tclStubsPtr->tcl_GetDeviceTypeFromStat) /* 595 */ +#endif +#ifndef Tcl_GetAccessTimeFromStat +#define Tcl_GetAccessTimeFromStat \ + (tclStubsPtr->tcl_GetAccessTimeFromStat) /* 596 */ +#endif +#ifndef Tcl_GetModificationTimeFromStat +#define Tcl_GetModificationTimeFromStat \ + (tclStubsPtr->tcl_GetModificationTimeFromStat) /* 597 */ +#endif +#ifndef Tcl_GetChangeTimeFromStat +#define Tcl_GetChangeTimeFromStat \ + (tclStubsPtr->tcl_GetChangeTimeFromStat) /* 598 */ +#endif +#ifndef Tcl_GetSizeFromStat +#define Tcl_GetSizeFromStat \ + (tclStubsPtr->tcl_GetSizeFromStat) /* 599 */ +#endif +#ifndef Tcl_GetBlocksFromStat +#define Tcl_GetBlocksFromStat \ + (tclStubsPtr->tcl_GetBlocksFromStat) /* 600 */ +#endif +#ifndef Tcl_GetBlockSizeFromStat +#define Tcl_GetBlockSizeFromStat \ + (tclStubsPtr->tcl_GetBlockSizeFromStat) /* 601 */ +#endif +#ifndef Tcl_SetEnsembleParameterList +#define Tcl_SetEnsembleParameterList \ + (tclStubsPtr->tcl_SetEnsembleParameterList) /* 602 */ +#endif +#ifndef Tcl_GetEnsembleParameterList +#define Tcl_GetEnsembleParameterList \ + (tclStubsPtr->tcl_GetEnsembleParameterList) /* 603 */ +#endif +#ifndef Tcl_ParseArgsObjv +#define Tcl_ParseArgsObjv \ + (tclStubsPtr->tcl_ParseArgsObjv) /* 604 */ +#endif +#ifndef Tcl_GetErrorLine +#define Tcl_GetErrorLine \ + (tclStubsPtr->tcl_GetErrorLine) /* 605 */ +#endif +#ifndef Tcl_SetErrorLine +#define Tcl_SetErrorLine \ + (tclStubsPtr->tcl_SetErrorLine) /* 606 */ +#endif +#ifndef Tcl_TransferResult +#define Tcl_TransferResult \ + (tclStubsPtr->tcl_TransferResult) /* 607 */ +#endif +#ifndef Tcl_InterpActive +#define Tcl_InterpActive \ + (tclStubsPtr->tcl_InterpActive) /* 608 */ +#endif +#ifndef Tcl_BackgroundException +#define Tcl_BackgroundException \ + (tclStubsPtr->tcl_BackgroundException) /* 609 */ +#endif +#ifndef Tcl_ZlibDeflate +#define Tcl_ZlibDeflate \ + (tclStubsPtr->tcl_ZlibDeflate) /* 610 */ +#endif +#ifndef Tcl_ZlibInflate +#define Tcl_ZlibInflate \ + (tclStubsPtr->tcl_ZlibInflate) /* 611 */ +#endif +#ifndef Tcl_ZlibCRC32 +#define Tcl_ZlibCRC32 \ + (tclStubsPtr->tcl_ZlibCRC32) /* 612 */ +#endif +#ifndef Tcl_ZlibAdler32 +#define Tcl_ZlibAdler32 \ + (tclStubsPtr->tcl_ZlibAdler32) /* 613 */ +#endif +#ifndef Tcl_ZlibStreamInit +#define Tcl_ZlibStreamInit \ + (tclStubsPtr->tcl_ZlibStreamInit) /* 614 */ +#endif +#ifndef Tcl_ZlibStreamGetCommandName +#define Tcl_ZlibStreamGetCommandName \ + (tclStubsPtr->tcl_ZlibStreamGetCommandName) /* 615 */ +#endif +#ifndef Tcl_ZlibStreamEof +#define Tcl_ZlibStreamEof \ + (tclStubsPtr->tcl_ZlibStreamEof) /* 616 */ +#endif +#ifndef Tcl_ZlibStreamAdler32 +#define Tcl_ZlibStreamAdler32 \ + (tclStubsPtr->tcl_ZlibStreamAdler32) /* 617 */ +#endif +#ifndef Tcl_ZlibStreamPut +#define Tcl_ZlibStreamPut \ + (tclStubsPtr->tcl_ZlibStreamPut) /* 618 */ +#endif +#ifndef Tcl_ZlibStreamGet +#define Tcl_ZlibStreamGet \ + (tclStubsPtr->tcl_ZlibStreamGet) /* 619 */ +#endif +#ifndef Tcl_ZlibStreamClose +#define Tcl_ZlibStreamClose \ + (tclStubsPtr->tcl_ZlibStreamClose) /* 620 */ +#endif +#ifndef Tcl_ZlibStreamReset +#define Tcl_ZlibStreamReset \ + (tclStubsPtr->tcl_ZlibStreamReset) /* 621 */ +#endif +#ifndef Tcl_SetStartupScript +#define Tcl_SetStartupScript \ + (tclStubsPtr->tcl_SetStartupScript) /* 622 */ +#endif +#ifndef Tcl_GetStartupScript +#define Tcl_GetStartupScript \ + (tclStubsPtr->tcl_GetStartupScript) /* 623 */ +#endif +#ifndef Tcl_CloseEx +#define Tcl_CloseEx \ + (tclStubsPtr->tcl_CloseEx) /* 624 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLDECLS */ + diff --git a/generic/tclIO.c b/generic/tclIO.c index 12905de..3815c66 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.154 2008/12/11 17:30:18 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.155 2008/12/18 01:14:16 ferrieux Exp $ */ #include "tclInt.h" @@ -3074,6 +3074,131 @@ Tcl_Close( /* *---------------------------------------------------------------------- * + * Tcl_CloseEx -- + * + * Half closes a channel. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * Closes one direction of the channel. + * + * NOTE: + * Tcl_CloseEx closes the specified direction of the channel as far as + * the user is concerned. The channel keeps existing however. You cannot + * calls this function to close the last possible direction of the + * channel. Use Tcl_Close for that. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +int +Tcl_CloseEx( + Tcl_Interp *interp, /* Interpreter for errors. */ + Tcl_Channel chan, /* The channel being closed. May still be used by some interpreter */ + int flags) /* Flags telling us which side to close. */ +{ + Channel *chanPtr; /* The real IO channel. */ + ChannelState *statePtr; /* State of real IO channel. */ + int result; /* Of calling FlushChannel. */ + + if (chan == NULL) { + return TCL_OK; + } + + /* TODO: assert flags validity ? */ + + chanPtr = (Channel *) chan; + statePtr = chanPtr->state; + + /* + * Does the channel support half-close anyway ? Error if not. + */ + + if (!chanPtr->typePtr->close2Proc) { + Tcl_AppendResult (interp, "Half-close of channels not supported by ", + chanPtr->typePtr->typeName, "s", NULL); + return TCL_ERROR; + } + + /* + * Is the channel unstacked ? If not we fail. + */ + + if (chanPtr != statePtr->topChanPtr) { + Tcl_AppendResult (interp, + "Half-close not applicable to stack of transformations", + NULL); + return TCL_ERROR; + } + + /* + * Check direction against channel mode. It is an error if we try to close + * a direction not supported by the channel (already closed, or never + * opened for that direction). + */ + + if (!(statePtr->flags & (TCL_READABLE | TCL_WRITABLE) & flags)) { + const char *msg; + if (flags & TCL_CLOSE_READ) { + msg = "read"; + } else { + msg = "write"; + } + Tcl_AppendResult (interp, "Half-close of ", msg, + "-side not possible, side not opened or already closed", + NULL); + return TCL_ERROR; + } + + /* + * A user may try to call half-close from within a channel close + * handler. That won't do. + */ + + if (statePtr->flags & CHANNEL_INCLOSE) { + if (interp) { + Tcl_AppendResult(interp, "Illegal recursive call to close " + "through close-handler of channel", NULL); + } + return TCL_ERROR; + } + + /* + * Finally do what is asked of us. + */ + + result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, + flags); + + /* + * TIP #219. + * Capture error messages put by the driver into the bypass area and put + * them into the regular interpreter result. + */ + + if (TclChanCaughtErrorBypass(interp, chan)) { + result = EINVAL; + } + + if (result != 0) { + return TCL_ERROR; + } + + /* + * Remove the closed side from the channel mode/flags. + */ + + statePtr->flags &= ~(flags & (TCL_READABLE | TCL_WRITABLE)); + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_ClearChannelHandlers -- * * Removes all channel handlers and event scripts from the channel, diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index dbf6b2c..94bbb5c 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.60 2008/12/09 20:16:29 dgp Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.61 2008/12/18 01:14:16 ferrieux Exp $ */ #include "tclInt.h" @@ -648,8 +648,8 @@ Tcl_CloseObjCmd( { Tcl_Channel chan; /* The channel to close. */ - if (objc != 2) { - Tcl_WrongNumArgs(interp, 1, objv, "channelId"); + if ((objc != 2) && (objc != 3)) { + Tcl_WrongNumArgs(interp, 1, objv, "channelId ?direction?"); return TCL_ERROR; } @@ -657,6 +657,48 @@ Tcl_CloseObjCmd( return TCL_ERROR; } + if (objc == 3) { + int optionIndex, dir; + static const char *const dirOptions[] = { + "read", "write", NULL + }; + static int dirArray[] = {TCL_CLOSE_READ, TCL_CLOSE_WRITE}; + + /* + * Get direction requested to close, and check syntax. + */ + + if (Tcl_GetIndexFromObj(interp, objv[2], dirOptions, "direction", 0, + &optionIndex) != TCL_OK) { + return TCL_ERROR; + } + dir = dirArray[optionIndex]; + + /* + * Check direction against channel mode. It is an error if we try to + * close a direction not supported by the channel (already closed, or + * never opened for that direction). + */ + + if (!(dir & Tcl_GetChannelMode (chan))) { + Tcl_AppendResult (interp, "Half-close of ", dirOptions[optionIndex], + "-side not possible, side not opened or already closed", + NULL); + return TCL_ERROR; + } + + /* + * Special handling is needed if and only if the channel mode supports + * more than the direction to close. Because if the close the last + * direction suppported we can and will go through the regular + * process. + */ + + if ((Tcl_GetChannelMode (chan) & (TCL_CLOSE_READ|TCL_CLOSE_WRITE)) != dir) { + return Tcl_CloseEx (interp, chan, dir) != TCL_OK; + } + } + if (Tcl_UnregisterChannel(interp, chan) != TCL_OK) { /* * If there is an error message and it ends with a newline, remove the diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index fbdeb13..f0d02bc 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1,1165 +1,1166 @@ -/* - * tclStubInit.c -- - * - * This file contains the initializers for the Tcl stub vectors. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclStubInit.c,v 1.175 2008/12/16 14:34:57 dgp Exp $ - */ - -#include "tclInt.h" -#include "tommath.h" - -/* - * Remove macros that will interfere with the definitions below. - */ - -#undef Tcl_Alloc -#undef Tcl_Free -#undef Tcl_Realloc -#undef Tcl_NewBooleanObj -#undef Tcl_NewByteArrayObj -#undef Tcl_NewDoubleObj -#undef Tcl_NewIntObj -#undef Tcl_NewListObj -#undef Tcl_NewLongObj -#undef Tcl_NewObj -#undef Tcl_NewStringObj -#undef Tcl_DumpActiveMemory -#undef Tcl_ValidateAllMemory -#undef Tcl_FindHashEntry -#undef Tcl_CreateHashEntry - -/* - * WARNING: The contents of this file is automatically generated by the - * tools/genStubs.tcl script. Any modifications to the function declarations - * below should be made in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -static const TclIntStubs tclIntStubs = { - TCL_STUB_MAGIC, - NULL, - NULL, /* 0 */ - NULL, /* 1 */ - NULL, /* 2 */ - TclAllocateFreeObjects, /* 3 */ - NULL, /* 4 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCleanupChildren, /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCleanupChildren, /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCleanupChildren, /* 5 */ -#endif /* MACOSX */ - TclCleanupCommand, /* 6 */ - TclCopyAndCollapse, /* 7 */ - TclCopyChannel, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCreatePipeline, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCreatePipeline, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCreatePipeline, /* 9 */ -#endif /* MACOSX */ - TclCreateProc, /* 10 */ - TclDeleteCompiledLocalVars, /* 11 */ - TclDeleteVars, /* 12 */ - NULL, /* 13 */ - TclDumpMemoryInfo, /* 14 */ - NULL, /* 15 */ - TclExprFloatError, /* 16 */ - NULL, /* 17 */ - NULL, /* 18 */ - NULL, /* 19 */ - NULL, /* 20 */ - NULL, /* 21 */ - TclFindElement, /* 22 */ - TclFindProc, /* 23 */ - NULL, /* 24 */ - TclFreePackageInfo, /* 25 */ - NULL, /* 26 */ - NULL, /* 27 */ - TclpGetDefaultStdChannel, /* 28 */ - NULL, /* 29 */ - NULL, /* 30 */ - TclGetExtension, /* 31 */ - TclGetFrame, /* 32 */ - NULL, /* 33 */ - TclGetIntForIndex, /* 34 */ - NULL, /* 35 */ - NULL, /* 36 */ - TclGetLoadedPackages, /* 37 */ - TclGetNamespaceForQualName, /* 38 */ - TclGetObjInterpProc, /* 39 */ - TclGetOpenMode, /* 40 */ - TclGetOriginalCommand, /* 41 */ - TclpGetUserHome, /* 42 */ - NULL, /* 43 */ - TclGuessPackageName, /* 44 */ - TclHideUnsafeCommands, /* 45 */ - TclInExit, /* 46 */ - NULL, /* 47 */ - NULL, /* 48 */ - NULL, /* 49 */ - TclInitCompiledLocals, /* 50 */ - TclInterpInit, /* 51 */ - NULL, /* 52 */ - TclInvokeObjectCommand, /* 53 */ - TclInvokeStringCommand, /* 54 */ - TclIsProc, /* 55 */ - NULL, /* 56 */ - NULL, /* 57 */ - TclLookupVar, /* 58 */ - NULL, /* 59 */ - TclNeedSpace, /* 60 */ - TclNewProcBodyObj, /* 61 */ - TclObjCommandComplete, /* 62 */ - TclObjInterpProc, /* 63 */ - TclObjInvoke, /* 64 */ - NULL, /* 65 */ - NULL, /* 66 */ - NULL, /* 67 */ - NULL, /* 68 */ - TclpAlloc, /* 69 */ - NULL, /* 70 */ - NULL, /* 71 */ - NULL, /* 72 */ - NULL, /* 73 */ - TclpFree, /* 74 */ - TclpGetClicks, /* 75 */ - TclpGetSeconds, /* 76 */ - TclpGetTime, /* 77 */ - TclpGetTimeZone, /* 78 */ - NULL, /* 79 */ - NULL, /* 80 */ - TclpRealloc, /* 81 */ - NULL, /* 82 */ - NULL, /* 83 */ - NULL, /* 84 */ - NULL, /* 85 */ - NULL, /* 86 */ - NULL, /* 87 */ - TclPrecTraceProc, /* 88 */ - TclPreventAliasLoop, /* 89 */ - NULL, /* 90 */ - TclProcCleanupProc, /* 91 */ - TclProcCompileProc, /* 92 */ - TclProcDeleteProc, /* 93 */ - NULL, /* 94 */ - NULL, /* 95 */ - TclRenameCommand, /* 96 */ - TclResetShadowedCmdRefs, /* 97 */ - TclServiceIdle, /* 98 */ - NULL, /* 99 */ - NULL, /* 100 */ - TclSetPreInitScript, /* 101 */ - TclSetupEnv, /* 102 */ - TclSockGetPort, /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclSockMinimumBuffers, /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* MACOSX */ - NULL, /* 105 */ - NULL, /* 106 */ - NULL, /* 107 */ - TclTeardownNamespace, /* 108 */ - TclUpdateReturnInfo, /* 109 */ - NULL, /* 110 */ - Tcl_AddInterpResolvers, /* 111 */ - Tcl_AppendExportList, /* 112 */ - Tcl_CreateNamespace, /* 113 */ - Tcl_DeleteNamespace, /* 114 */ - Tcl_Export, /* 115 */ - Tcl_FindCommand, /* 116 */ - Tcl_FindNamespace, /* 117 */ - Tcl_GetInterpResolvers, /* 118 */ - Tcl_GetNamespaceResolvers, /* 119 */ - Tcl_FindNamespaceVar, /* 120 */ - Tcl_ForgetImport, /* 121 */ - Tcl_GetCommandFromObj, /* 122 */ - Tcl_GetCommandFullName, /* 123 */ - Tcl_GetCurrentNamespace, /* 124 */ - Tcl_GetGlobalNamespace, /* 125 */ - Tcl_GetVariableFullName, /* 126 */ - Tcl_Import, /* 127 */ - Tcl_PopCallFrame, /* 128 */ - Tcl_PushCallFrame, /* 129 */ - Tcl_RemoveInterpResolvers, /* 130 */ - Tcl_SetNamespaceResolvers, /* 131 */ - TclpHasSockets, /* 132 */ - TclpGetDate, /* 133 */ - NULL, /* 134 */ - NULL, /* 135 */ - NULL, /* 136 */ - NULL, /* 137 */ - TclGetEnv, /* 138 */ - NULL, /* 139 */ - NULL, /* 140 */ - TclpGetCwd, /* 141 */ - TclSetByteCodeFromAny, /* 142 */ - TclAddLiteralObj, /* 143 */ - TclHideLiteral, /* 144 */ - TclGetAuxDataType, /* 145 */ - TclHandleCreate, /* 146 */ - TclHandleFree, /* 147 */ - TclHandlePreserve, /* 148 */ - TclHandleRelease, /* 149 */ - TclRegAbout, /* 150 */ - TclRegExpRangeUniChar, /* 151 */ - TclSetLibraryPath, /* 152 */ - TclGetLibraryPath, /* 153 */ - NULL, /* 154 */ - NULL, /* 155 */ - TclRegError, /* 156 */ - TclVarTraceExists, /* 157 */ - NULL, /* 158 */ - NULL, /* 159 */ - NULL, /* 160 */ - TclChannelTransform, /* 161 */ - TclChannelEventScriptInvoker, /* 162 */ - TclGetInstructionTable, /* 163 */ - TclExpandCodeArray, /* 164 */ - TclpSetInitialEncodings, /* 165 */ - TclListObjSetElement, /* 166 */ - NULL, /* 167 */ - NULL, /* 168 */ - TclpUtfNcmp2, /* 169 */ - TclCheckInterpTraces, /* 170 */ - TclCheckExecutionTraces, /* 171 */ - TclInThreadExit, /* 172 */ - TclUniCharMatch, /* 173 */ - NULL, /* 174 */ - TclCallVarTraces, /* 175 */ - TclCleanupVar, /* 176 */ - TclVarErrMsg, /* 177 */ - NULL, /* 178 */ - NULL, /* 179 */ - NULL, /* 180 */ - NULL, /* 181 */ - TclpLocaltime, /* 182 */ - TclpGmtime, /* 183 */ - NULL, /* 184 */ - NULL, /* 185 */ - NULL, /* 186 */ - NULL, /* 187 */ - NULL, /* 188 */ - NULL, /* 189 */ - NULL, /* 190 */ - NULL, /* 191 */ - NULL, /* 192 */ - NULL, /* 193 */ - NULL, /* 194 */ - NULL, /* 195 */ - NULL, /* 196 */ - NULL, /* 197 */ - TclObjGetFrame, /* 198 */ - NULL, /* 199 */ - TclpObjRemoveDirectory, /* 200 */ - TclpObjCopyDirectory, /* 201 */ - TclpObjCreateDirectory, /* 202 */ - TclpObjDeleteFile, /* 203 */ - TclpObjCopyFile, /* 204 */ - TclpObjRenameFile, /* 205 */ - TclpObjStat, /* 206 */ - TclpObjAccess, /* 207 */ - TclpOpenFileChannel, /* 208 */ - NULL, /* 209 */ - NULL, /* 210 */ - NULL, /* 211 */ - TclpFindExecutable, /* 212 */ - TclGetObjNameOfExecutable, /* 213 */ - TclSetObjNameOfExecutable, /* 214 */ - TclStackAlloc, /* 215 */ - TclStackFree, /* 216 */ - TclPushStackFrame, /* 217 */ - TclPopStackFrame, /* 218 */ - NULL, /* 219 */ - NULL, /* 220 */ - NULL, /* 221 */ - NULL, /* 222 */ - NULL, /* 223 */ - TclGetPlatform, /* 224 */ - TclTraceDictPath, /* 225 */ - TclObjBeingDeleted, /* 226 */ - TclSetNsPath, /* 227 */ - NULL, /* 228 */ - TclPtrMakeUpvar, /* 229 */ - TclObjLookupVar, /* 230 */ - TclGetNamespaceFromObj, /* 231 */ - TclEvalObjEx, /* 232 */ - TclGetSrcInfoForPc, /* 233 */ - TclVarHashCreateVar, /* 234 */ - TclInitVarHashTable, /* 235 */ - Tcl_BackgroundException, /* 236 */ - TclResetCancellation, /* 237 */ - TclNRInterpProc, /* 238 */ - TclNRInterpProcCore, /* 239 */ - TclNRRunCallbacks, /* 240 */ - TclNREvalObjEx, /* 241 */ - TclNREvalObjv, /* 242 */ -}; - -static const TclIntPlatStubs tclIntPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclWinConvertError, /* 0 */ - TclWinConvertWSAError, /* 1 */ - TclWinGetServByName, /* 2 */ - TclWinGetSockOpt, /* 3 */ - TclWinGetTclInstance, /* 4 */ - NULL, /* 5 */ - TclWinNToHS, /* 6 */ - TclWinSetSockOpt, /* 7 */ - TclpGetPid, /* 8 */ - TclWinGetPlatformId, /* 9 */ - NULL, /* 10 */ - TclGetAndDetachPids, /* 11 */ - TclpCloseFile, /* 12 */ - TclpCreateCommandChannel, /* 13 */ - TclpCreatePipe, /* 14 */ - TclpCreateProcess, /* 15 */ - NULL, /* 16 */ - NULL, /* 17 */ - TclpMakeFile, /* 18 */ - TclpOpenFile, /* 19 */ - TclWinAddProcess, /* 20 */ - NULL, /* 21 */ - TclpCreateTempFile, /* 22 */ - TclpGetTZName, /* 23 */ - TclWinNoBackslash, /* 24 */ - NULL, /* 25 */ - TclWinSetInterfaces, /* 26 */ - TclWinFlushDirtyChannels, /* 27 */ - TclWinResetInterfaces, /* 28 */ - TclWinCPUID, /* 29 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ - TclMacOSXGetFileAttribute, /* 15 */ - TclMacOSXSetFileAttribute, /* 16 */ - TclMacOSXCopyFileAttributes, /* 17 */ - TclMacOSXMatchType, /* 18 */ -#endif /* MACOSX */ -}; - -static const TclPlatStubs tclPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#ifdef __WIN32__ /* WIN */ - Tcl_WinUtfToTChar, /* 0 */ - Tcl_WinTCharToUtf, /* 1 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_MacOSXOpenBundleResources, /* 0 */ - Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ -#endif /* MACOSX */ -}; - -static const TclTomMathStubs tclTomMathStubs = { - TCL_STUB_MAGIC, - NULL, - TclBN_epoch, /* 0 */ - TclBN_revision, /* 1 */ - TclBN_mp_add, /* 2 */ - TclBN_mp_add_d, /* 3 */ - TclBN_mp_and, /* 4 */ - TclBN_mp_clamp, /* 5 */ - TclBN_mp_clear, /* 6 */ - TclBN_mp_clear_multi, /* 7 */ - TclBN_mp_cmp, /* 8 */ - TclBN_mp_cmp_d, /* 9 */ - TclBN_mp_cmp_mag, /* 10 */ - TclBN_mp_copy, /* 11 */ - TclBN_mp_count_bits, /* 12 */ - TclBN_mp_div, /* 13 */ - TclBN_mp_div_d, /* 14 */ - TclBN_mp_div_2, /* 15 */ - TclBN_mp_div_2d, /* 16 */ - TclBN_mp_div_3, /* 17 */ - TclBN_mp_exch, /* 18 */ - TclBN_mp_expt_d, /* 19 */ - TclBN_mp_grow, /* 20 */ - TclBN_mp_init, /* 21 */ - TclBN_mp_init_copy, /* 22 */ - TclBN_mp_init_multi, /* 23 */ - TclBN_mp_init_set, /* 24 */ - TclBN_mp_init_size, /* 25 */ - TclBN_mp_lshd, /* 26 */ - TclBN_mp_mod, /* 27 */ - TclBN_mp_mod_2d, /* 28 */ - TclBN_mp_mul, /* 29 */ - TclBN_mp_mul_d, /* 30 */ - TclBN_mp_mul_2, /* 31 */ - TclBN_mp_mul_2d, /* 32 */ - TclBN_mp_neg, /* 33 */ - TclBN_mp_or, /* 34 */ - TclBN_mp_radix_size, /* 35 */ - TclBN_mp_read_radix, /* 36 */ - TclBN_mp_rshd, /* 37 */ - TclBN_mp_shrink, /* 38 */ - TclBN_mp_set, /* 39 */ - TclBN_mp_sqr, /* 40 */ - TclBN_mp_sqrt, /* 41 */ - TclBN_mp_sub, /* 42 */ - TclBN_mp_sub_d, /* 43 */ - TclBN_mp_to_unsigned_bin, /* 44 */ - TclBN_mp_to_unsigned_bin_n, /* 45 */ - TclBN_mp_toradix_n, /* 46 */ - TclBN_mp_unsigned_bin_size, /* 47 */ - TclBN_mp_xor, /* 48 */ - TclBN_mp_zero, /* 49 */ - TclBN_reverse, /* 50 */ - TclBN_fast_s_mp_mul_digs, /* 51 */ - TclBN_fast_s_mp_sqr, /* 52 */ - TclBN_mp_karatsuba_mul, /* 53 */ - TclBN_mp_karatsuba_sqr, /* 54 */ - TclBN_mp_toom_mul, /* 55 */ - TclBN_mp_toom_sqr, /* 56 */ - TclBN_s_mp_add, /* 57 */ - TclBN_s_mp_mul_digs, /* 58 */ - TclBN_s_mp_sqr, /* 59 */ - TclBN_s_mp_sub, /* 60 */ -}; - -static const TclStubHooks tclStubHooks = { - &tclPlatStubs, - &tclIntStubs, - &tclIntPlatStubs -}; - -static const TclStubs tclStubs = { - TCL_STUB_MAGIC, - &tclStubHooks, - Tcl_PkgProvideEx, /* 0 */ - Tcl_PkgRequireEx, /* 1 */ - Tcl_Panic, /* 2 */ - Tcl_Alloc, /* 3 */ - Tcl_Free, /* 4 */ - Tcl_Realloc, /* 5 */ - Tcl_DbCkalloc, /* 6 */ - Tcl_DbCkfree, /* 7 */ - Tcl_DbCkrealloc, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 10 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* MACOSX */ - Tcl_SetTimer, /* 11 */ - Tcl_Sleep, /* 12 */ - Tcl_WaitForEvent, /* 13 */ - Tcl_AppendAllObjTypes, /* 14 */ - Tcl_AppendStringsToObj, /* 15 */ - Tcl_AppendToObj, /* 16 */ - Tcl_ConcatObj, /* 17 */ - Tcl_ConvertToType, /* 18 */ - Tcl_DbDecrRefCount, /* 19 */ - Tcl_DbIncrRefCount, /* 20 */ - Tcl_DbIsShared, /* 21 */ - Tcl_DbNewBooleanObj, /* 22 */ - Tcl_DbNewByteArrayObj, /* 23 */ - Tcl_DbNewDoubleObj, /* 24 */ - Tcl_DbNewListObj, /* 25 */ - Tcl_DbNewLongObj, /* 26 */ - Tcl_DbNewObj, /* 27 */ - Tcl_DbNewStringObj, /* 28 */ - Tcl_DuplicateObj, /* 29 */ - TclFreeObj, /* 30 */ - Tcl_GetBoolean, /* 31 */ - Tcl_GetBooleanFromObj, /* 32 */ - Tcl_GetByteArrayFromObj, /* 33 */ - Tcl_GetDouble, /* 34 */ - Tcl_GetDoubleFromObj, /* 35 */ - Tcl_GetIndexFromObj, /* 36 */ - Tcl_GetInt, /* 37 */ - Tcl_GetIntFromObj, /* 38 */ - Tcl_GetLongFromObj, /* 39 */ - Tcl_GetObjType, /* 40 */ - Tcl_GetStringFromObj, /* 41 */ - Tcl_InvalidateStringRep, /* 42 */ - Tcl_ListObjAppendList, /* 43 */ - Tcl_ListObjAppendElement, /* 44 */ - Tcl_ListObjGetElements, /* 45 */ - Tcl_ListObjIndex, /* 46 */ - Tcl_ListObjLength, /* 47 */ - Tcl_ListObjReplace, /* 48 */ - Tcl_NewBooleanObj, /* 49 */ - Tcl_NewByteArrayObj, /* 50 */ - Tcl_NewDoubleObj, /* 51 */ - Tcl_NewIntObj, /* 52 */ - Tcl_NewListObj, /* 53 */ - Tcl_NewLongObj, /* 54 */ - Tcl_NewObj, /* 55 */ - Tcl_NewStringObj, /* 56 */ - Tcl_SetBooleanObj, /* 57 */ - Tcl_SetByteArrayLength, /* 58 */ - Tcl_SetByteArrayObj, /* 59 */ - Tcl_SetDoubleObj, /* 60 */ - Tcl_SetIntObj, /* 61 */ - Tcl_SetListObj, /* 62 */ - Tcl_SetLongObj, /* 63 */ - Tcl_SetObjLength, /* 64 */ - Tcl_SetStringObj, /* 65 */ - Tcl_AddErrorInfo, /* 66 */ - Tcl_AddObjErrorInfo, /* 67 */ - Tcl_AllowExceptions, /* 68 */ - Tcl_AppendElement, /* 69 */ - Tcl_AppendResult, /* 70 */ - Tcl_AsyncCreate, /* 71 */ - Tcl_AsyncDelete, /* 72 */ - Tcl_AsyncInvoke, /* 73 */ - Tcl_AsyncMark, /* 74 */ - Tcl_AsyncReady, /* 75 */ - Tcl_BackgroundError, /* 76 */ - Tcl_Backslash, /* 77 */ - Tcl_BadChannelOption, /* 78 */ - Tcl_CallWhenDeleted, /* 79 */ - Tcl_CancelIdleCall, /* 80 */ - Tcl_Close, /* 81 */ - Tcl_CommandComplete, /* 82 */ - Tcl_Concat, /* 83 */ - Tcl_ConvertElement, /* 84 */ - Tcl_ConvertCountedElement, /* 85 */ - Tcl_CreateAlias, /* 86 */ - Tcl_CreateAliasObj, /* 87 */ - Tcl_CreateChannel, /* 88 */ - Tcl_CreateChannelHandler, /* 89 */ - Tcl_CreateCloseHandler, /* 90 */ - Tcl_CreateCommand, /* 91 */ - Tcl_CreateEventSource, /* 92 */ - Tcl_CreateExitHandler, /* 93 */ - Tcl_CreateInterp, /* 94 */ - Tcl_CreateMathFunc, /* 95 */ - Tcl_CreateObjCommand, /* 96 */ - Tcl_CreateSlave, /* 97 */ - Tcl_CreateTimerHandler, /* 98 */ - Tcl_CreateTrace, /* 99 */ - Tcl_DeleteAssocData, /* 100 */ - Tcl_DeleteChannelHandler, /* 101 */ - Tcl_DeleteCloseHandler, /* 102 */ - Tcl_DeleteCommand, /* 103 */ - Tcl_DeleteCommandFromToken, /* 104 */ - Tcl_DeleteEvents, /* 105 */ - Tcl_DeleteEventSource, /* 106 */ - Tcl_DeleteExitHandler, /* 107 */ - Tcl_DeleteHashEntry, /* 108 */ - Tcl_DeleteHashTable, /* 109 */ - Tcl_DeleteInterp, /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DetachPids, /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_DetachPids, /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DetachPids, /* 111 */ -#endif /* MACOSX */ - Tcl_DeleteTimerHandler, /* 112 */ - Tcl_DeleteTrace, /* 113 */ - Tcl_DontCallWhenDeleted, /* 114 */ - Tcl_DoOneEvent, /* 115 */ - Tcl_DoWhenIdle, /* 116 */ - Tcl_DStringAppend, /* 117 */ - Tcl_DStringAppendElement, /* 118 */ - Tcl_DStringEndSublist, /* 119 */ - Tcl_DStringFree, /* 120 */ - Tcl_DStringGetResult, /* 121 */ - Tcl_DStringInit, /* 122 */ - Tcl_DStringResult, /* 123 */ - Tcl_DStringSetLength, /* 124 */ - Tcl_DStringStartSublist, /* 125 */ - Tcl_Eof, /* 126 */ - Tcl_ErrnoId, /* 127 */ - Tcl_ErrnoMsg, /* 128 */ - Tcl_Eval, /* 129 */ - Tcl_EvalFile, /* 130 */ - Tcl_EvalObj, /* 131 */ - Tcl_EventuallyFree, /* 132 */ - Tcl_Exit, /* 133 */ - Tcl_ExposeCommand, /* 134 */ - Tcl_ExprBoolean, /* 135 */ - Tcl_ExprBooleanObj, /* 136 */ - Tcl_ExprDouble, /* 137 */ - Tcl_ExprDoubleObj, /* 138 */ - Tcl_ExprLong, /* 139 */ - Tcl_ExprLongObj, /* 140 */ - Tcl_ExprObj, /* 141 */ - Tcl_ExprString, /* 142 */ - Tcl_Finalize, /* 143 */ - Tcl_FindExecutable, /* 144 */ - Tcl_FirstHashEntry, /* 145 */ - Tcl_Flush, /* 146 */ - Tcl_FreeResult, /* 147 */ - Tcl_GetAlias, /* 148 */ - Tcl_GetAliasObj, /* 149 */ - Tcl_GetAssocData, /* 150 */ - Tcl_GetChannel, /* 151 */ - Tcl_GetChannelBufferSize, /* 152 */ - Tcl_GetChannelHandle, /* 153 */ - Tcl_GetChannelInstanceData, /* 154 */ - Tcl_GetChannelMode, /* 155 */ - Tcl_GetChannelName, /* 156 */ - Tcl_GetChannelOption, /* 157 */ - Tcl_GetChannelType, /* 158 */ - Tcl_GetCommandInfo, /* 159 */ - Tcl_GetCommandName, /* 160 */ - Tcl_GetErrno, /* 161 */ - Tcl_GetHostName, /* 162 */ - Tcl_GetInterpPath, /* 163 */ - Tcl_GetMaster, /* 164 */ - Tcl_GetNameOfExecutable, /* 165 */ - Tcl_GetObjResult, /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 167 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* MACOSX */ - Tcl_GetPathType, /* 168 */ - Tcl_Gets, /* 169 */ - Tcl_GetsObj, /* 170 */ - Tcl_GetServiceMode, /* 171 */ - Tcl_GetSlave, /* 172 */ - Tcl_GetStdChannel, /* 173 */ - Tcl_GetStringResult, /* 174 */ - Tcl_GetVar, /* 175 */ - Tcl_GetVar2, /* 176 */ - Tcl_GlobalEval, /* 177 */ - Tcl_GlobalEvalObj, /* 178 */ - Tcl_HideCommand, /* 179 */ - Tcl_Init, /* 180 */ - Tcl_InitHashTable, /* 181 */ - Tcl_InputBlocked, /* 182 */ - Tcl_InputBuffered, /* 183 */ - Tcl_InterpDeleted, /* 184 */ - Tcl_IsSafe, /* 185 */ - Tcl_JoinPath, /* 186 */ - Tcl_LinkVar, /* 187 */ - NULL, /* 188 */ - Tcl_MakeFileChannel, /* 189 */ - Tcl_MakeSafe, /* 190 */ - Tcl_MakeTcpClientChannel, /* 191 */ - Tcl_Merge, /* 192 */ - Tcl_NextHashEntry, /* 193 */ - Tcl_NotifyChannel, /* 194 */ - Tcl_ObjGetVar2, /* 195 */ - Tcl_ObjSetVar2, /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* MACOSX */ - Tcl_OpenFileChannel, /* 198 */ - Tcl_OpenTcpClient, /* 199 */ - Tcl_OpenTcpServer, /* 200 */ - Tcl_Preserve, /* 201 */ - Tcl_PrintDouble, /* 202 */ - Tcl_PutEnv, /* 203 */ - Tcl_PosixError, /* 204 */ - Tcl_QueueEvent, /* 205 */ - Tcl_Read, /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* MACOSX */ - Tcl_RecordAndEval, /* 208 */ - Tcl_RecordAndEvalObj, /* 209 */ - Tcl_RegisterChannel, /* 210 */ - Tcl_RegisterObjType, /* 211 */ - Tcl_RegExpCompile, /* 212 */ - Tcl_RegExpExec, /* 213 */ - Tcl_RegExpMatch, /* 214 */ - Tcl_RegExpRange, /* 215 */ - Tcl_Release, /* 216 */ - Tcl_ResetResult, /* 217 */ - Tcl_ScanElement, /* 218 */ - Tcl_ScanCountedElement, /* 219 */ - Tcl_SeekOld, /* 220 */ - Tcl_ServiceAll, /* 221 */ - Tcl_ServiceEvent, /* 222 */ - Tcl_SetAssocData, /* 223 */ - Tcl_SetChannelBufferSize, /* 224 */ - Tcl_SetChannelOption, /* 225 */ - Tcl_SetCommandInfo, /* 226 */ - Tcl_SetErrno, /* 227 */ - Tcl_SetErrorCode, /* 228 */ - Tcl_SetMaxBlockTime, /* 229 */ - Tcl_SetPanicProc, /* 230 */ - Tcl_SetRecursionLimit, /* 231 */ - Tcl_SetResult, /* 232 */ - Tcl_SetServiceMode, /* 233 */ - Tcl_SetObjErrorCode, /* 234 */ - Tcl_SetObjResult, /* 235 */ - Tcl_SetStdChannel, /* 236 */ - Tcl_SetVar, /* 237 */ - Tcl_SetVar2, /* 238 */ - Tcl_SignalId, /* 239 */ - Tcl_SignalMsg, /* 240 */ - Tcl_SourceRCFile, /* 241 */ - Tcl_SplitList, /* 242 */ - Tcl_SplitPath, /* 243 */ - Tcl_StaticPackage, /* 244 */ - Tcl_StringMatch, /* 245 */ - Tcl_TellOld, /* 246 */ - Tcl_TraceVar, /* 247 */ - Tcl_TraceVar2, /* 248 */ - Tcl_TranslateFileName, /* 249 */ - Tcl_Ungets, /* 250 */ - Tcl_UnlinkVar, /* 251 */ - Tcl_UnregisterChannel, /* 252 */ - Tcl_UnsetVar, /* 253 */ - Tcl_UnsetVar2, /* 254 */ - Tcl_UntraceVar, /* 255 */ - Tcl_UntraceVar2, /* 256 */ - Tcl_UpdateLinkedVar, /* 257 */ - Tcl_UpVar, /* 258 */ - Tcl_UpVar2, /* 259 */ - Tcl_VarEval, /* 260 */ - Tcl_VarTraceInfo, /* 261 */ - Tcl_VarTraceInfo2, /* 262 */ - Tcl_Write, /* 263 */ - Tcl_WrongNumArgs, /* 264 */ - Tcl_DumpActiveMemory, /* 265 */ - Tcl_ValidateAllMemory, /* 266 */ - Tcl_AppendResultVA, /* 267 */ - Tcl_AppendStringsToObjVA, /* 268 */ - Tcl_HashStats, /* 269 */ - Tcl_ParseVar, /* 270 */ - Tcl_PkgPresent, /* 271 */ - Tcl_PkgPresentEx, /* 272 */ - Tcl_PkgProvide, /* 273 */ - Tcl_PkgRequire, /* 274 */ - Tcl_SetErrorCodeVA, /* 275 */ - Tcl_VarEvalVA, /* 276 */ - Tcl_WaitPid, /* 277 */ - Tcl_PanicVA, /* 278 */ - Tcl_GetVersion, /* 279 */ - Tcl_InitMemory, /* 280 */ - Tcl_StackChannel, /* 281 */ - Tcl_UnstackChannel, /* 282 */ - Tcl_GetStackedChannel, /* 283 */ - Tcl_SetMainLoop, /* 284 */ - NULL, /* 285 */ - Tcl_AppendObjToObj, /* 286 */ - Tcl_CreateEncoding, /* 287 */ - Tcl_CreateThreadExitHandler, /* 288 */ - Tcl_DeleteThreadExitHandler, /* 289 */ - Tcl_DiscardResult, /* 290 */ - Tcl_EvalEx, /* 291 */ - Tcl_EvalObjv, /* 292 */ - Tcl_EvalObjEx, /* 293 */ - Tcl_ExitThread, /* 294 */ - Tcl_ExternalToUtf, /* 295 */ - Tcl_ExternalToUtfDString, /* 296 */ - Tcl_FinalizeThread, /* 297 */ - Tcl_FinalizeNotifier, /* 298 */ - Tcl_FreeEncoding, /* 299 */ - Tcl_GetCurrentThread, /* 300 */ - Tcl_GetEncoding, /* 301 */ - Tcl_GetEncodingName, /* 302 */ - Tcl_GetEncodingNames, /* 303 */ - Tcl_GetIndexFromObjStruct, /* 304 */ - Tcl_GetThreadData, /* 305 */ - Tcl_GetVar2Ex, /* 306 */ - Tcl_InitNotifier, /* 307 */ - Tcl_MutexLock, /* 308 */ - Tcl_MutexUnlock, /* 309 */ - Tcl_ConditionNotify, /* 310 */ - Tcl_ConditionWait, /* 311 */ - Tcl_NumUtfChars, /* 312 */ - Tcl_ReadChars, /* 313 */ - Tcl_RestoreResult, /* 314 */ - Tcl_SaveResult, /* 315 */ - Tcl_SetSystemEncoding, /* 316 */ - Tcl_SetVar2Ex, /* 317 */ - Tcl_ThreadAlert, /* 318 */ - Tcl_ThreadQueueEvent, /* 319 */ - Tcl_UniCharAtIndex, /* 320 */ - Tcl_UniCharToLower, /* 321 */ - Tcl_UniCharToTitle, /* 322 */ - Tcl_UniCharToUpper, /* 323 */ - Tcl_UniCharToUtf, /* 324 */ - Tcl_UtfAtIndex, /* 325 */ - Tcl_UtfCharComplete, /* 326 */ - Tcl_UtfBackslash, /* 327 */ - Tcl_UtfFindFirst, /* 328 */ - Tcl_UtfFindLast, /* 329 */ - Tcl_UtfNext, /* 330 */ - Tcl_UtfPrev, /* 331 */ - Tcl_UtfToExternal, /* 332 */ - Tcl_UtfToExternalDString, /* 333 */ - Tcl_UtfToLower, /* 334 */ - Tcl_UtfToTitle, /* 335 */ - Tcl_UtfToUniChar, /* 336 */ - Tcl_UtfToUpper, /* 337 */ - Tcl_WriteChars, /* 338 */ - Tcl_WriteObj, /* 339 */ - Tcl_GetString, /* 340 */ - Tcl_GetDefaultEncodingDir, /* 341 */ - Tcl_SetDefaultEncodingDir, /* 342 */ - Tcl_AlertNotifier, /* 343 */ - Tcl_ServiceModeHook, /* 344 */ - Tcl_UniCharIsAlnum, /* 345 */ - Tcl_UniCharIsAlpha, /* 346 */ - Tcl_UniCharIsDigit, /* 347 */ - Tcl_UniCharIsLower, /* 348 */ - Tcl_UniCharIsSpace, /* 349 */ - Tcl_UniCharIsUpper, /* 350 */ - Tcl_UniCharIsWordChar, /* 351 */ - Tcl_UniCharLen, /* 352 */ - Tcl_UniCharNcmp, /* 353 */ - Tcl_UniCharToUtfDString, /* 354 */ - Tcl_UtfToUniCharDString, /* 355 */ - Tcl_GetRegExpFromObj, /* 356 */ - Tcl_EvalTokens, /* 357 */ - Tcl_FreeParse, /* 358 */ - Tcl_LogCommandInfo, /* 359 */ - Tcl_ParseBraces, /* 360 */ - Tcl_ParseCommand, /* 361 */ - Tcl_ParseExpr, /* 362 */ - Tcl_ParseQuotedString, /* 363 */ - Tcl_ParseVarName, /* 364 */ - Tcl_GetCwd, /* 365 */ - Tcl_Chdir, /* 366 */ - Tcl_Access, /* 367 */ - Tcl_Stat, /* 368 */ - Tcl_UtfNcmp, /* 369 */ - Tcl_UtfNcasecmp, /* 370 */ - Tcl_StringCaseMatch, /* 371 */ - Tcl_UniCharIsControl, /* 372 */ - Tcl_UniCharIsGraph, /* 373 */ - Tcl_UniCharIsPrint, /* 374 */ - Tcl_UniCharIsPunct, /* 375 */ - Tcl_RegExpExecObj, /* 376 */ - Tcl_RegExpGetInfo, /* 377 */ - Tcl_NewUnicodeObj, /* 378 */ - Tcl_SetUnicodeObj, /* 379 */ - Tcl_GetCharLength, /* 380 */ - Tcl_GetUniChar, /* 381 */ - Tcl_GetUnicode, /* 382 */ - Tcl_GetRange, /* 383 */ - Tcl_AppendUnicodeToObj, /* 384 */ - Tcl_RegExpMatchObj, /* 385 */ - Tcl_SetNotifier, /* 386 */ - Tcl_GetAllocMutex, /* 387 */ - Tcl_GetChannelNames, /* 388 */ - Tcl_GetChannelNamesEx, /* 389 */ - Tcl_ProcObjCmd, /* 390 */ - Tcl_ConditionFinalize, /* 391 */ - Tcl_MutexFinalize, /* 392 */ - Tcl_CreateThread, /* 393 */ - Tcl_ReadRaw, /* 394 */ - Tcl_WriteRaw, /* 395 */ - Tcl_GetTopChannel, /* 396 */ - Tcl_ChannelBuffered, /* 397 */ - Tcl_ChannelName, /* 398 */ - Tcl_ChannelVersion, /* 399 */ - Tcl_ChannelBlockModeProc, /* 400 */ - Tcl_ChannelCloseProc, /* 401 */ - Tcl_ChannelClose2Proc, /* 402 */ - Tcl_ChannelInputProc, /* 403 */ - Tcl_ChannelOutputProc, /* 404 */ - Tcl_ChannelSeekProc, /* 405 */ - Tcl_ChannelSetOptionProc, /* 406 */ - Tcl_ChannelGetOptionProc, /* 407 */ - Tcl_ChannelWatchProc, /* 408 */ - Tcl_ChannelGetHandleProc, /* 409 */ - Tcl_ChannelFlushProc, /* 410 */ - Tcl_ChannelHandlerProc, /* 411 */ - Tcl_JoinThread, /* 412 */ - Tcl_IsChannelShared, /* 413 */ - Tcl_IsChannelRegistered, /* 414 */ - Tcl_CutChannel, /* 415 */ - Tcl_SpliceChannel, /* 416 */ - Tcl_ClearChannelHandlers, /* 417 */ - Tcl_IsChannelExisting, /* 418 */ - Tcl_UniCharNcasecmp, /* 419 */ - Tcl_UniCharCaseMatch, /* 420 */ - Tcl_FindHashEntry, /* 421 */ - Tcl_CreateHashEntry, /* 422 */ - Tcl_InitCustomHashTable, /* 423 */ - Tcl_InitObjHashTable, /* 424 */ - Tcl_CommandTraceInfo, /* 425 */ - Tcl_TraceCommand, /* 426 */ - Tcl_UntraceCommand, /* 427 */ - Tcl_AttemptAlloc, /* 428 */ - Tcl_AttemptDbCkalloc, /* 429 */ - Tcl_AttemptRealloc, /* 430 */ - Tcl_AttemptDbCkrealloc, /* 431 */ - Tcl_AttemptSetObjLength, /* 432 */ - Tcl_GetChannelThread, /* 433 */ - Tcl_GetUnicodeFromObj, /* 434 */ - Tcl_GetMathFuncInfo, /* 435 */ - Tcl_ListMathFuncs, /* 436 */ - Tcl_SubstObj, /* 437 */ - Tcl_DetachChannel, /* 438 */ - Tcl_IsStandardChannel, /* 439 */ - Tcl_FSCopyFile, /* 440 */ - Tcl_FSCopyDirectory, /* 441 */ - Tcl_FSCreateDirectory, /* 442 */ - Tcl_FSDeleteFile, /* 443 */ - Tcl_FSLoadFile, /* 444 */ - Tcl_FSMatchInDirectory, /* 445 */ - Tcl_FSLink, /* 446 */ - Tcl_FSRemoveDirectory, /* 447 */ - Tcl_FSRenameFile, /* 448 */ - Tcl_FSLstat, /* 449 */ - Tcl_FSUtime, /* 450 */ - Tcl_FSFileAttrsGet, /* 451 */ - Tcl_FSFileAttrsSet, /* 452 */ - Tcl_FSFileAttrStrings, /* 453 */ - Tcl_FSStat, /* 454 */ - Tcl_FSAccess, /* 455 */ - Tcl_FSOpenFileChannel, /* 456 */ - Tcl_FSGetCwd, /* 457 */ - Tcl_FSChdir, /* 458 */ - Tcl_FSConvertToPathType, /* 459 */ - Tcl_FSJoinPath, /* 460 */ - Tcl_FSSplitPath, /* 461 */ - Tcl_FSEqualPaths, /* 462 */ - Tcl_FSGetNormalizedPath, /* 463 */ - Tcl_FSJoinToPath, /* 464 */ - Tcl_FSGetInternalRep, /* 465 */ - Tcl_FSGetTranslatedPath, /* 466 */ - Tcl_FSEvalFile, /* 467 */ - Tcl_FSNewNativePath, /* 468 */ - Tcl_FSGetNativePath, /* 469 */ - Tcl_FSFileSystemInfo, /* 470 */ - Tcl_FSPathSeparator, /* 471 */ - Tcl_FSListVolumes, /* 472 */ - Tcl_FSRegister, /* 473 */ - Tcl_FSUnregister, /* 474 */ - Tcl_FSData, /* 475 */ - Tcl_FSGetTranslatedStringPath, /* 476 */ - Tcl_FSGetFileSystemForPath, /* 477 */ - Tcl_FSGetPathType, /* 478 */ - Tcl_OutputBuffered, /* 479 */ - Tcl_FSMountsChanged, /* 480 */ - Tcl_EvalTokensStandard, /* 481 */ - Tcl_GetTime, /* 482 */ - Tcl_CreateObjTrace, /* 483 */ - Tcl_GetCommandInfoFromToken, /* 484 */ - Tcl_SetCommandInfoFromToken, /* 485 */ - Tcl_DbNewWideIntObj, /* 486 */ - Tcl_GetWideIntFromObj, /* 487 */ - Tcl_NewWideIntObj, /* 488 */ - Tcl_SetWideIntObj, /* 489 */ - Tcl_AllocStatBuf, /* 490 */ - Tcl_Seek, /* 491 */ - Tcl_Tell, /* 492 */ - Tcl_ChannelWideSeekProc, /* 493 */ - Tcl_DictObjPut, /* 494 */ - Tcl_DictObjGet, /* 495 */ - Tcl_DictObjRemove, /* 496 */ - Tcl_DictObjSize, /* 497 */ - Tcl_DictObjFirst, /* 498 */ - Tcl_DictObjNext, /* 499 */ - Tcl_DictObjDone, /* 500 */ - Tcl_DictObjPutKeyList, /* 501 */ - Tcl_DictObjRemoveKeyList, /* 502 */ - Tcl_NewDictObj, /* 503 */ - Tcl_DbNewDictObj, /* 504 */ - Tcl_RegisterConfig, /* 505 */ - Tcl_CreateNamespace, /* 506 */ - Tcl_DeleteNamespace, /* 507 */ - Tcl_AppendExportList, /* 508 */ - Tcl_Export, /* 509 */ - Tcl_Import, /* 510 */ - Tcl_ForgetImport, /* 511 */ - Tcl_GetCurrentNamespace, /* 512 */ - Tcl_GetGlobalNamespace, /* 513 */ - Tcl_FindNamespace, /* 514 */ - Tcl_FindCommand, /* 515 */ - Tcl_GetCommandFromObj, /* 516 */ - Tcl_GetCommandFullName, /* 517 */ - Tcl_FSEvalFileEx, /* 518 */ - Tcl_SetExitProc, /* 519 */ - Tcl_LimitAddHandler, /* 520 */ - Tcl_LimitRemoveHandler, /* 521 */ - Tcl_LimitReady, /* 522 */ - Tcl_LimitCheck, /* 523 */ - Tcl_LimitExceeded, /* 524 */ - Tcl_LimitSetCommands, /* 525 */ - Tcl_LimitSetTime, /* 526 */ - Tcl_LimitSetGranularity, /* 527 */ - Tcl_LimitTypeEnabled, /* 528 */ - Tcl_LimitTypeExceeded, /* 529 */ - Tcl_LimitTypeSet, /* 530 */ - Tcl_LimitTypeReset, /* 531 */ - Tcl_LimitGetCommands, /* 532 */ - Tcl_LimitGetTime, /* 533 */ - Tcl_LimitGetGranularity, /* 534 */ - Tcl_SaveInterpState, /* 535 */ - Tcl_RestoreInterpState, /* 536 */ - Tcl_DiscardInterpState, /* 537 */ - Tcl_SetReturnOptions, /* 538 */ - Tcl_GetReturnOptions, /* 539 */ - Tcl_IsEnsemble, /* 540 */ - Tcl_CreateEnsemble, /* 541 */ - Tcl_FindEnsemble, /* 542 */ - Tcl_SetEnsembleSubcommandList, /* 543 */ - Tcl_SetEnsembleMappingDict, /* 544 */ - Tcl_SetEnsembleUnknownHandler, /* 545 */ - Tcl_SetEnsembleFlags, /* 546 */ - Tcl_GetEnsembleSubcommandList, /* 547 */ - Tcl_GetEnsembleMappingDict, /* 548 */ - Tcl_GetEnsembleUnknownHandler, /* 549 */ - Tcl_GetEnsembleFlags, /* 550 */ - Tcl_GetEnsembleNamespace, /* 551 */ - Tcl_SetTimeProc, /* 552 */ - Tcl_QueryTimeProc, /* 553 */ - Tcl_ChannelThreadActionProc, /* 554 */ - Tcl_NewBignumObj, /* 555 */ - Tcl_DbNewBignumObj, /* 556 */ - Tcl_SetBignumObj, /* 557 */ - Tcl_GetBignumFromObj, /* 558 */ - Tcl_TakeBignumFromObj, /* 559 */ - Tcl_TruncateChannel, /* 560 */ - Tcl_ChannelTruncateProc, /* 561 */ - Tcl_SetChannelErrorInterp, /* 562 */ - Tcl_GetChannelErrorInterp, /* 563 */ - Tcl_SetChannelError, /* 564 */ - Tcl_GetChannelError, /* 565 */ - Tcl_InitBignumFromDouble, /* 566 */ - Tcl_GetNamespaceUnknownHandler, /* 567 */ - Tcl_SetNamespaceUnknownHandler, /* 568 */ - Tcl_GetEncodingFromObj, /* 569 */ - Tcl_GetEncodingSearchPath, /* 570 */ - Tcl_SetEncodingSearchPath, /* 571 */ - Tcl_GetEncodingNameFromEnvironment, /* 572 */ - Tcl_PkgRequireProc, /* 573 */ - Tcl_AppendObjToErrorInfo, /* 574 */ - Tcl_AppendLimitedToObj, /* 575 */ - Tcl_Format, /* 576 */ - Tcl_AppendFormatToObj, /* 577 */ - Tcl_ObjPrintf, /* 578 */ - Tcl_AppendPrintfToObj, /* 579 */ - Tcl_CancelEval, /* 580 */ - Tcl_Canceled, /* 581 */ - Tcl_CreatePipe, /* 582 */ - Tcl_NRCreateCommand, /* 583 */ - Tcl_NREvalObj, /* 584 */ - Tcl_NREvalObjv, /* 585 */ - Tcl_NRCmdSwap, /* 586 */ - Tcl_NRAddCallback, /* 587 */ - Tcl_NRCallObjProc, /* 588 */ - Tcl_GetFSDeviceFromStat, /* 589 */ - Tcl_GetFSInodeFromStat, /* 590 */ - Tcl_GetModeFromStat, /* 591 */ - Tcl_GetLinkCountFromStat, /* 592 */ - Tcl_GetUserIdFromStat, /* 593 */ - Tcl_GetGroupIdFromStat, /* 594 */ - Tcl_GetDeviceTypeFromStat, /* 595 */ - Tcl_GetAccessTimeFromStat, /* 596 */ - Tcl_GetModificationTimeFromStat, /* 597 */ - Tcl_GetChangeTimeFromStat, /* 598 */ - Tcl_GetSizeFromStat, /* 599 */ - Tcl_GetBlocksFromStat, /* 600 */ - Tcl_GetBlockSizeFromStat, /* 601 */ - Tcl_SetEnsembleParameterList, /* 602 */ - Tcl_GetEnsembleParameterList, /* 603 */ - Tcl_ParseArgsObjv, /* 604 */ - Tcl_GetErrorLine, /* 605 */ - Tcl_SetErrorLine, /* 606 */ - Tcl_TransferResult, /* 607 */ - Tcl_InterpActive, /* 608 */ - Tcl_BackgroundException, /* 609 */ - Tcl_ZlibDeflate, /* 610 */ - Tcl_ZlibInflate, /* 611 */ - Tcl_ZlibCRC32, /* 612 */ - Tcl_ZlibAdler32, /* 613 */ - Tcl_ZlibStreamInit, /* 614 */ - Tcl_ZlibStreamGetCommandName, /* 615 */ - Tcl_ZlibStreamEof, /* 616 */ - Tcl_ZlibStreamAdler32, /* 617 */ - Tcl_ZlibStreamPut, /* 618 */ - Tcl_ZlibStreamGet, /* 619 */ - Tcl_ZlibStreamClose, /* 620 */ - Tcl_ZlibStreamReset, /* 621 */ - Tcl_SetStartupScript, /* 622 */ - Tcl_GetStartupScript, /* 623 */ -}; - -/* !END!: Do not edit above this line. */ - -/* - * Module-scope pointers to the main static stubs tables, used for package - * initialization via Tcl_PkgProvideEx(). - */ - -MODULE_SCOPE const TclStubs * const tclConstStubsPtr; -MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; - -const TclStubs * const tclConstStubsPtr = &tclStubs; -const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; +/* + * tclStubInit.c -- + * + * This file contains the initializers for the Tcl stub vectors. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclStubInit.c,v 1.176 2008/12/18 01:14:16 ferrieux Exp $ + */ + +#include "tclInt.h" +#include "tommath.h" + +/* + * Remove macros that will interfere with the definitions below. + */ + +#undef Tcl_Alloc +#undef Tcl_Free +#undef Tcl_Realloc +#undef Tcl_NewBooleanObj +#undef Tcl_NewByteArrayObj +#undef Tcl_NewDoubleObj +#undef Tcl_NewIntObj +#undef Tcl_NewListObj +#undef Tcl_NewLongObj +#undef Tcl_NewObj +#undef Tcl_NewStringObj +#undef Tcl_DumpActiveMemory +#undef Tcl_ValidateAllMemory +#undef Tcl_FindHashEntry +#undef Tcl_CreateHashEntry + +/* + * WARNING: The contents of this file is automatically generated by the + * tools/genStubs.tcl script. Any modifications to the function declarations + * below should be made in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +static const TclIntStubs tclIntStubs = { + TCL_STUB_MAGIC, + NULL, + NULL, /* 0 */ + NULL, /* 1 */ + NULL, /* 2 */ + TclAllocateFreeObjects, /* 3 */ + NULL, /* 4 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCleanupChildren, /* 5 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCleanupChildren, /* 5 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCleanupChildren, /* 5 */ +#endif /* MACOSX */ + TclCleanupCommand, /* 6 */ + TclCopyAndCollapse, /* 7 */ + TclCopyChannel, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCreatePipeline, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCreatePipeline, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCreatePipeline, /* 9 */ +#endif /* MACOSX */ + TclCreateProc, /* 10 */ + TclDeleteCompiledLocalVars, /* 11 */ + TclDeleteVars, /* 12 */ + NULL, /* 13 */ + TclDumpMemoryInfo, /* 14 */ + NULL, /* 15 */ + TclExprFloatError, /* 16 */ + NULL, /* 17 */ + NULL, /* 18 */ + NULL, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + TclFindElement, /* 22 */ + TclFindProc, /* 23 */ + NULL, /* 24 */ + TclFreePackageInfo, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + TclpGetDefaultStdChannel, /* 28 */ + NULL, /* 29 */ + NULL, /* 30 */ + TclGetExtension, /* 31 */ + TclGetFrame, /* 32 */ + NULL, /* 33 */ + TclGetIntForIndex, /* 34 */ + NULL, /* 35 */ + NULL, /* 36 */ + TclGetLoadedPackages, /* 37 */ + TclGetNamespaceForQualName, /* 38 */ + TclGetObjInterpProc, /* 39 */ + TclGetOpenMode, /* 40 */ + TclGetOriginalCommand, /* 41 */ + TclpGetUserHome, /* 42 */ + NULL, /* 43 */ + TclGuessPackageName, /* 44 */ + TclHideUnsafeCommands, /* 45 */ + TclInExit, /* 46 */ + NULL, /* 47 */ + NULL, /* 48 */ + NULL, /* 49 */ + TclInitCompiledLocals, /* 50 */ + TclInterpInit, /* 51 */ + NULL, /* 52 */ + TclInvokeObjectCommand, /* 53 */ + TclInvokeStringCommand, /* 54 */ + TclIsProc, /* 55 */ + NULL, /* 56 */ + NULL, /* 57 */ + TclLookupVar, /* 58 */ + NULL, /* 59 */ + TclNeedSpace, /* 60 */ + TclNewProcBodyObj, /* 61 */ + TclObjCommandComplete, /* 62 */ + TclObjInterpProc, /* 63 */ + TclObjInvoke, /* 64 */ + NULL, /* 65 */ + NULL, /* 66 */ + NULL, /* 67 */ + NULL, /* 68 */ + TclpAlloc, /* 69 */ + NULL, /* 70 */ + NULL, /* 71 */ + NULL, /* 72 */ + NULL, /* 73 */ + TclpFree, /* 74 */ + TclpGetClicks, /* 75 */ + TclpGetSeconds, /* 76 */ + TclpGetTime, /* 77 */ + TclpGetTimeZone, /* 78 */ + NULL, /* 79 */ + NULL, /* 80 */ + TclpRealloc, /* 81 */ + NULL, /* 82 */ + NULL, /* 83 */ + NULL, /* 84 */ + NULL, /* 85 */ + NULL, /* 86 */ + NULL, /* 87 */ + TclPrecTraceProc, /* 88 */ + TclPreventAliasLoop, /* 89 */ + NULL, /* 90 */ + TclProcCleanupProc, /* 91 */ + TclProcCompileProc, /* 92 */ + TclProcDeleteProc, /* 93 */ + NULL, /* 94 */ + NULL, /* 95 */ + TclRenameCommand, /* 96 */ + TclResetShadowedCmdRefs, /* 97 */ + TclServiceIdle, /* 98 */ + NULL, /* 99 */ + NULL, /* 100 */ + TclSetPreInitScript, /* 101 */ + TclSetupEnv, /* 102 */ + TclSockGetPort, /* 103 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclSockMinimumBuffers, /* 104 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* MACOSX */ + NULL, /* 105 */ + NULL, /* 106 */ + NULL, /* 107 */ + TclTeardownNamespace, /* 108 */ + TclUpdateReturnInfo, /* 109 */ + NULL, /* 110 */ + Tcl_AddInterpResolvers, /* 111 */ + Tcl_AppendExportList, /* 112 */ + Tcl_CreateNamespace, /* 113 */ + Tcl_DeleteNamespace, /* 114 */ + Tcl_Export, /* 115 */ + Tcl_FindCommand, /* 116 */ + Tcl_FindNamespace, /* 117 */ + Tcl_GetInterpResolvers, /* 118 */ + Tcl_GetNamespaceResolvers, /* 119 */ + Tcl_FindNamespaceVar, /* 120 */ + Tcl_ForgetImport, /* 121 */ + Tcl_GetCommandFromObj, /* 122 */ + Tcl_GetCommandFullName, /* 123 */ + Tcl_GetCurrentNamespace, /* 124 */ + Tcl_GetGlobalNamespace, /* 125 */ + Tcl_GetVariableFullName, /* 126 */ + Tcl_Import, /* 127 */ + Tcl_PopCallFrame, /* 128 */ + Tcl_PushCallFrame, /* 129 */ + Tcl_RemoveInterpResolvers, /* 130 */ + Tcl_SetNamespaceResolvers, /* 131 */ + TclpHasSockets, /* 132 */ + TclpGetDate, /* 133 */ + NULL, /* 134 */ + NULL, /* 135 */ + NULL, /* 136 */ + NULL, /* 137 */ + TclGetEnv, /* 138 */ + NULL, /* 139 */ + NULL, /* 140 */ + TclpGetCwd, /* 141 */ + TclSetByteCodeFromAny, /* 142 */ + TclAddLiteralObj, /* 143 */ + TclHideLiteral, /* 144 */ + TclGetAuxDataType, /* 145 */ + TclHandleCreate, /* 146 */ + TclHandleFree, /* 147 */ + TclHandlePreserve, /* 148 */ + TclHandleRelease, /* 149 */ + TclRegAbout, /* 150 */ + TclRegExpRangeUniChar, /* 151 */ + TclSetLibraryPath, /* 152 */ + TclGetLibraryPath, /* 153 */ + NULL, /* 154 */ + NULL, /* 155 */ + TclRegError, /* 156 */ + TclVarTraceExists, /* 157 */ + NULL, /* 158 */ + NULL, /* 159 */ + NULL, /* 160 */ + TclChannelTransform, /* 161 */ + TclChannelEventScriptInvoker, /* 162 */ + TclGetInstructionTable, /* 163 */ + TclExpandCodeArray, /* 164 */ + TclpSetInitialEncodings, /* 165 */ + TclListObjSetElement, /* 166 */ + NULL, /* 167 */ + NULL, /* 168 */ + TclpUtfNcmp2, /* 169 */ + TclCheckInterpTraces, /* 170 */ + TclCheckExecutionTraces, /* 171 */ + TclInThreadExit, /* 172 */ + TclUniCharMatch, /* 173 */ + NULL, /* 174 */ + TclCallVarTraces, /* 175 */ + TclCleanupVar, /* 176 */ + TclVarErrMsg, /* 177 */ + NULL, /* 178 */ + NULL, /* 179 */ + NULL, /* 180 */ + NULL, /* 181 */ + TclpLocaltime, /* 182 */ + TclpGmtime, /* 183 */ + NULL, /* 184 */ + NULL, /* 185 */ + NULL, /* 186 */ + NULL, /* 187 */ + NULL, /* 188 */ + NULL, /* 189 */ + NULL, /* 190 */ + NULL, /* 191 */ + NULL, /* 192 */ + NULL, /* 193 */ + NULL, /* 194 */ + NULL, /* 195 */ + NULL, /* 196 */ + NULL, /* 197 */ + TclObjGetFrame, /* 198 */ + NULL, /* 199 */ + TclpObjRemoveDirectory, /* 200 */ + TclpObjCopyDirectory, /* 201 */ + TclpObjCreateDirectory, /* 202 */ + TclpObjDeleteFile, /* 203 */ + TclpObjCopyFile, /* 204 */ + TclpObjRenameFile, /* 205 */ + TclpObjStat, /* 206 */ + TclpObjAccess, /* 207 */ + TclpOpenFileChannel, /* 208 */ + NULL, /* 209 */ + NULL, /* 210 */ + NULL, /* 211 */ + TclpFindExecutable, /* 212 */ + TclGetObjNameOfExecutable, /* 213 */ + TclSetObjNameOfExecutable, /* 214 */ + TclStackAlloc, /* 215 */ + TclStackFree, /* 216 */ + TclPushStackFrame, /* 217 */ + TclPopStackFrame, /* 218 */ + NULL, /* 219 */ + NULL, /* 220 */ + NULL, /* 221 */ + NULL, /* 222 */ + NULL, /* 223 */ + TclGetPlatform, /* 224 */ + TclTraceDictPath, /* 225 */ + TclObjBeingDeleted, /* 226 */ + TclSetNsPath, /* 227 */ + NULL, /* 228 */ + TclPtrMakeUpvar, /* 229 */ + TclObjLookupVar, /* 230 */ + TclGetNamespaceFromObj, /* 231 */ + TclEvalObjEx, /* 232 */ + TclGetSrcInfoForPc, /* 233 */ + TclVarHashCreateVar, /* 234 */ + TclInitVarHashTable, /* 235 */ + Tcl_BackgroundException, /* 236 */ + TclResetCancellation, /* 237 */ + TclNRInterpProc, /* 238 */ + TclNRInterpProcCore, /* 239 */ + TclNRRunCallbacks, /* 240 */ + TclNREvalObjEx, /* 241 */ + TclNREvalObjv, /* 242 */ +}; + +static const TclIntPlatStubs tclIntPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ + TclWinGetServByName, /* 2 */ + TclWinGetSockOpt, /* 3 */ + TclWinGetTclInstance, /* 4 */ + NULL, /* 5 */ + TclWinNToHS, /* 6 */ + TclWinSetSockOpt, /* 7 */ + TclpGetPid, /* 8 */ + TclWinGetPlatformId, /* 9 */ + NULL, /* 10 */ + TclGetAndDetachPids, /* 11 */ + TclpCloseFile, /* 12 */ + TclpCreateCommandChannel, /* 13 */ + TclpCreatePipe, /* 14 */ + TclpCreateProcess, /* 15 */ + NULL, /* 16 */ + NULL, /* 17 */ + TclpMakeFile, /* 18 */ + TclpOpenFile, /* 19 */ + TclWinAddProcess, /* 20 */ + NULL, /* 21 */ + TclpCreateTempFile, /* 22 */ + TclpGetTZName, /* 23 */ + TclWinNoBackslash, /* 24 */ + NULL, /* 25 */ + TclWinSetInterfaces, /* 26 */ + TclWinFlushDirtyChannels, /* 27 */ + TclWinResetInterfaces, /* 28 */ + TclWinCPUID, /* 29 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ + TclMacOSXGetFileAttribute, /* 15 */ + TclMacOSXSetFileAttribute, /* 16 */ + TclMacOSXCopyFileAttributes, /* 17 */ + TclMacOSXMatchType, /* 18 */ +#endif /* MACOSX */ +}; + +static const TclPlatStubs tclPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#ifdef __WIN32__ /* WIN */ + Tcl_WinUtfToTChar, /* 0 */ + Tcl_WinTCharToUtf, /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_MacOSXOpenBundleResources, /* 0 */ + Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ +#endif /* MACOSX */ +}; + +static const TclTomMathStubs tclTomMathStubs = { + TCL_STUB_MAGIC, + NULL, + TclBN_epoch, /* 0 */ + TclBN_revision, /* 1 */ + TclBN_mp_add, /* 2 */ + TclBN_mp_add_d, /* 3 */ + TclBN_mp_and, /* 4 */ + TclBN_mp_clamp, /* 5 */ + TclBN_mp_clear, /* 6 */ + TclBN_mp_clear_multi, /* 7 */ + TclBN_mp_cmp, /* 8 */ + TclBN_mp_cmp_d, /* 9 */ + TclBN_mp_cmp_mag, /* 10 */ + TclBN_mp_copy, /* 11 */ + TclBN_mp_count_bits, /* 12 */ + TclBN_mp_div, /* 13 */ + TclBN_mp_div_d, /* 14 */ + TclBN_mp_div_2, /* 15 */ + TclBN_mp_div_2d, /* 16 */ + TclBN_mp_div_3, /* 17 */ + TclBN_mp_exch, /* 18 */ + TclBN_mp_expt_d, /* 19 */ + TclBN_mp_grow, /* 20 */ + TclBN_mp_init, /* 21 */ + TclBN_mp_init_copy, /* 22 */ + TclBN_mp_init_multi, /* 23 */ + TclBN_mp_init_set, /* 24 */ + TclBN_mp_init_size, /* 25 */ + TclBN_mp_lshd, /* 26 */ + TclBN_mp_mod, /* 27 */ + TclBN_mp_mod_2d, /* 28 */ + TclBN_mp_mul, /* 29 */ + TclBN_mp_mul_d, /* 30 */ + TclBN_mp_mul_2, /* 31 */ + TclBN_mp_mul_2d, /* 32 */ + TclBN_mp_neg, /* 33 */ + TclBN_mp_or, /* 34 */ + TclBN_mp_radix_size, /* 35 */ + TclBN_mp_read_radix, /* 36 */ + TclBN_mp_rshd, /* 37 */ + TclBN_mp_shrink, /* 38 */ + TclBN_mp_set, /* 39 */ + TclBN_mp_sqr, /* 40 */ + TclBN_mp_sqrt, /* 41 */ + TclBN_mp_sub, /* 42 */ + TclBN_mp_sub_d, /* 43 */ + TclBN_mp_to_unsigned_bin, /* 44 */ + TclBN_mp_to_unsigned_bin_n, /* 45 */ + TclBN_mp_toradix_n, /* 46 */ + TclBN_mp_unsigned_bin_size, /* 47 */ + TclBN_mp_xor, /* 48 */ + TclBN_mp_zero, /* 49 */ + TclBN_reverse, /* 50 */ + TclBN_fast_s_mp_mul_digs, /* 51 */ + TclBN_fast_s_mp_sqr, /* 52 */ + TclBN_mp_karatsuba_mul, /* 53 */ + TclBN_mp_karatsuba_sqr, /* 54 */ + TclBN_mp_toom_mul, /* 55 */ + TclBN_mp_toom_sqr, /* 56 */ + TclBN_s_mp_add, /* 57 */ + TclBN_s_mp_mul_digs, /* 58 */ + TclBN_s_mp_sqr, /* 59 */ + TclBN_s_mp_sub, /* 60 */ +}; + +static const TclStubHooks tclStubHooks = { + &tclPlatStubs, + &tclIntStubs, + &tclIntPlatStubs +}; + +static const TclStubs tclStubs = { + TCL_STUB_MAGIC, + &tclStubHooks, + Tcl_PkgProvideEx, /* 0 */ + Tcl_PkgRequireEx, /* 1 */ + Tcl_Panic, /* 2 */ + Tcl_Alloc, /* 3 */ + Tcl_Free, /* 4 */ + Tcl_Realloc, /* 5 */ + Tcl_DbCkalloc, /* 6 */ + Tcl_DbCkfree, /* 7 */ + Tcl_DbCkrealloc, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 10 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* MACOSX */ + Tcl_SetTimer, /* 11 */ + Tcl_Sleep, /* 12 */ + Tcl_WaitForEvent, /* 13 */ + Tcl_AppendAllObjTypes, /* 14 */ + Tcl_AppendStringsToObj, /* 15 */ + Tcl_AppendToObj, /* 16 */ + Tcl_ConcatObj, /* 17 */ + Tcl_ConvertToType, /* 18 */ + Tcl_DbDecrRefCount, /* 19 */ + Tcl_DbIncrRefCount, /* 20 */ + Tcl_DbIsShared, /* 21 */ + Tcl_DbNewBooleanObj, /* 22 */ + Tcl_DbNewByteArrayObj, /* 23 */ + Tcl_DbNewDoubleObj, /* 24 */ + Tcl_DbNewListObj, /* 25 */ + Tcl_DbNewLongObj, /* 26 */ + Tcl_DbNewObj, /* 27 */ + Tcl_DbNewStringObj, /* 28 */ + Tcl_DuplicateObj, /* 29 */ + TclFreeObj, /* 30 */ + Tcl_GetBoolean, /* 31 */ + Tcl_GetBooleanFromObj, /* 32 */ + Tcl_GetByteArrayFromObj, /* 33 */ + Tcl_GetDouble, /* 34 */ + Tcl_GetDoubleFromObj, /* 35 */ + Tcl_GetIndexFromObj, /* 36 */ + Tcl_GetInt, /* 37 */ + Tcl_GetIntFromObj, /* 38 */ + Tcl_GetLongFromObj, /* 39 */ + Tcl_GetObjType, /* 40 */ + Tcl_GetStringFromObj, /* 41 */ + Tcl_InvalidateStringRep, /* 42 */ + Tcl_ListObjAppendList, /* 43 */ + Tcl_ListObjAppendElement, /* 44 */ + Tcl_ListObjGetElements, /* 45 */ + Tcl_ListObjIndex, /* 46 */ + Tcl_ListObjLength, /* 47 */ + Tcl_ListObjReplace, /* 48 */ + Tcl_NewBooleanObj, /* 49 */ + Tcl_NewByteArrayObj, /* 50 */ + Tcl_NewDoubleObj, /* 51 */ + Tcl_NewIntObj, /* 52 */ + Tcl_NewListObj, /* 53 */ + Tcl_NewLongObj, /* 54 */ + Tcl_NewObj, /* 55 */ + Tcl_NewStringObj, /* 56 */ + Tcl_SetBooleanObj, /* 57 */ + Tcl_SetByteArrayLength, /* 58 */ + Tcl_SetByteArrayObj, /* 59 */ + Tcl_SetDoubleObj, /* 60 */ + Tcl_SetIntObj, /* 61 */ + Tcl_SetListObj, /* 62 */ + Tcl_SetLongObj, /* 63 */ + Tcl_SetObjLength, /* 64 */ + Tcl_SetStringObj, /* 65 */ + Tcl_AddErrorInfo, /* 66 */ + Tcl_AddObjErrorInfo, /* 67 */ + Tcl_AllowExceptions, /* 68 */ + Tcl_AppendElement, /* 69 */ + Tcl_AppendResult, /* 70 */ + Tcl_AsyncCreate, /* 71 */ + Tcl_AsyncDelete, /* 72 */ + Tcl_AsyncInvoke, /* 73 */ + Tcl_AsyncMark, /* 74 */ + Tcl_AsyncReady, /* 75 */ + Tcl_BackgroundError, /* 76 */ + Tcl_Backslash, /* 77 */ + Tcl_BadChannelOption, /* 78 */ + Tcl_CallWhenDeleted, /* 79 */ + Tcl_CancelIdleCall, /* 80 */ + Tcl_Close, /* 81 */ + Tcl_CommandComplete, /* 82 */ + Tcl_Concat, /* 83 */ + Tcl_ConvertElement, /* 84 */ + Tcl_ConvertCountedElement, /* 85 */ + Tcl_CreateAlias, /* 86 */ + Tcl_CreateAliasObj, /* 87 */ + Tcl_CreateChannel, /* 88 */ + Tcl_CreateChannelHandler, /* 89 */ + Tcl_CreateCloseHandler, /* 90 */ + Tcl_CreateCommand, /* 91 */ + Tcl_CreateEventSource, /* 92 */ + Tcl_CreateExitHandler, /* 93 */ + Tcl_CreateInterp, /* 94 */ + Tcl_CreateMathFunc, /* 95 */ + Tcl_CreateObjCommand, /* 96 */ + Tcl_CreateSlave, /* 97 */ + Tcl_CreateTimerHandler, /* 98 */ + Tcl_CreateTrace, /* 99 */ + Tcl_DeleteAssocData, /* 100 */ + Tcl_DeleteChannelHandler, /* 101 */ + Tcl_DeleteCloseHandler, /* 102 */ + Tcl_DeleteCommand, /* 103 */ + Tcl_DeleteCommandFromToken, /* 104 */ + Tcl_DeleteEvents, /* 105 */ + Tcl_DeleteEventSource, /* 106 */ + Tcl_DeleteExitHandler, /* 107 */ + Tcl_DeleteHashEntry, /* 108 */ + Tcl_DeleteHashTable, /* 109 */ + Tcl_DeleteInterp, /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DetachPids, /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_DetachPids, /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DetachPids, /* 111 */ +#endif /* MACOSX */ + Tcl_DeleteTimerHandler, /* 112 */ + Tcl_DeleteTrace, /* 113 */ + Tcl_DontCallWhenDeleted, /* 114 */ + Tcl_DoOneEvent, /* 115 */ + Tcl_DoWhenIdle, /* 116 */ + Tcl_DStringAppend, /* 117 */ + Tcl_DStringAppendElement, /* 118 */ + Tcl_DStringEndSublist, /* 119 */ + Tcl_DStringFree, /* 120 */ + Tcl_DStringGetResult, /* 121 */ + Tcl_DStringInit, /* 122 */ + Tcl_DStringResult, /* 123 */ + Tcl_DStringSetLength, /* 124 */ + Tcl_DStringStartSublist, /* 125 */ + Tcl_Eof, /* 126 */ + Tcl_ErrnoId, /* 127 */ + Tcl_ErrnoMsg, /* 128 */ + Tcl_Eval, /* 129 */ + Tcl_EvalFile, /* 130 */ + Tcl_EvalObj, /* 131 */ + Tcl_EventuallyFree, /* 132 */ + Tcl_Exit, /* 133 */ + Tcl_ExposeCommand, /* 134 */ + Tcl_ExprBoolean, /* 135 */ + Tcl_ExprBooleanObj, /* 136 */ + Tcl_ExprDouble, /* 137 */ + Tcl_ExprDoubleObj, /* 138 */ + Tcl_ExprLong, /* 139 */ + Tcl_ExprLongObj, /* 140 */ + Tcl_ExprObj, /* 141 */ + Tcl_ExprString, /* 142 */ + Tcl_Finalize, /* 143 */ + Tcl_FindExecutable, /* 144 */ + Tcl_FirstHashEntry, /* 145 */ + Tcl_Flush, /* 146 */ + Tcl_FreeResult, /* 147 */ + Tcl_GetAlias, /* 148 */ + Tcl_GetAliasObj, /* 149 */ + Tcl_GetAssocData, /* 150 */ + Tcl_GetChannel, /* 151 */ + Tcl_GetChannelBufferSize, /* 152 */ + Tcl_GetChannelHandle, /* 153 */ + Tcl_GetChannelInstanceData, /* 154 */ + Tcl_GetChannelMode, /* 155 */ + Tcl_GetChannelName, /* 156 */ + Tcl_GetChannelOption, /* 157 */ + Tcl_GetChannelType, /* 158 */ + Tcl_GetCommandInfo, /* 159 */ + Tcl_GetCommandName, /* 160 */ + Tcl_GetErrno, /* 161 */ + Tcl_GetHostName, /* 162 */ + Tcl_GetInterpPath, /* 163 */ + Tcl_GetMaster, /* 164 */ + Tcl_GetNameOfExecutable, /* 165 */ + Tcl_GetObjResult, /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 167 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* MACOSX */ + Tcl_GetPathType, /* 168 */ + Tcl_Gets, /* 169 */ + Tcl_GetsObj, /* 170 */ + Tcl_GetServiceMode, /* 171 */ + Tcl_GetSlave, /* 172 */ + Tcl_GetStdChannel, /* 173 */ + Tcl_GetStringResult, /* 174 */ + Tcl_GetVar, /* 175 */ + Tcl_GetVar2, /* 176 */ + Tcl_GlobalEval, /* 177 */ + Tcl_GlobalEvalObj, /* 178 */ + Tcl_HideCommand, /* 179 */ + Tcl_Init, /* 180 */ + Tcl_InitHashTable, /* 181 */ + Tcl_InputBlocked, /* 182 */ + Tcl_InputBuffered, /* 183 */ + Tcl_InterpDeleted, /* 184 */ + Tcl_IsSafe, /* 185 */ + Tcl_JoinPath, /* 186 */ + Tcl_LinkVar, /* 187 */ + NULL, /* 188 */ + Tcl_MakeFileChannel, /* 189 */ + Tcl_MakeSafe, /* 190 */ + Tcl_MakeTcpClientChannel, /* 191 */ + Tcl_Merge, /* 192 */ + Tcl_NextHashEntry, /* 193 */ + Tcl_NotifyChannel, /* 194 */ + Tcl_ObjGetVar2, /* 195 */ + Tcl_ObjSetVar2, /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* MACOSX */ + Tcl_OpenFileChannel, /* 198 */ + Tcl_OpenTcpClient, /* 199 */ + Tcl_OpenTcpServer, /* 200 */ + Tcl_Preserve, /* 201 */ + Tcl_PrintDouble, /* 202 */ + Tcl_PutEnv, /* 203 */ + Tcl_PosixError, /* 204 */ + Tcl_QueueEvent, /* 205 */ + Tcl_Read, /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* MACOSX */ + Tcl_RecordAndEval, /* 208 */ + Tcl_RecordAndEvalObj, /* 209 */ + Tcl_RegisterChannel, /* 210 */ + Tcl_RegisterObjType, /* 211 */ + Tcl_RegExpCompile, /* 212 */ + Tcl_RegExpExec, /* 213 */ + Tcl_RegExpMatch, /* 214 */ + Tcl_RegExpRange, /* 215 */ + Tcl_Release, /* 216 */ + Tcl_ResetResult, /* 217 */ + Tcl_ScanElement, /* 218 */ + Tcl_ScanCountedElement, /* 219 */ + Tcl_SeekOld, /* 220 */ + Tcl_ServiceAll, /* 221 */ + Tcl_ServiceEvent, /* 222 */ + Tcl_SetAssocData, /* 223 */ + Tcl_SetChannelBufferSize, /* 224 */ + Tcl_SetChannelOption, /* 225 */ + Tcl_SetCommandInfo, /* 226 */ + Tcl_SetErrno, /* 227 */ + Tcl_SetErrorCode, /* 228 */ + Tcl_SetMaxBlockTime, /* 229 */ + Tcl_SetPanicProc, /* 230 */ + Tcl_SetRecursionLimit, /* 231 */ + Tcl_SetResult, /* 232 */ + Tcl_SetServiceMode, /* 233 */ + Tcl_SetObjErrorCode, /* 234 */ + Tcl_SetObjResult, /* 235 */ + Tcl_SetStdChannel, /* 236 */ + Tcl_SetVar, /* 237 */ + Tcl_SetVar2, /* 238 */ + Tcl_SignalId, /* 239 */ + Tcl_SignalMsg, /* 240 */ + Tcl_SourceRCFile, /* 241 */ + Tcl_SplitList, /* 242 */ + Tcl_SplitPath, /* 243 */ + Tcl_StaticPackage, /* 244 */ + Tcl_StringMatch, /* 245 */ + Tcl_TellOld, /* 246 */ + Tcl_TraceVar, /* 247 */ + Tcl_TraceVar2, /* 248 */ + Tcl_TranslateFileName, /* 249 */ + Tcl_Ungets, /* 250 */ + Tcl_UnlinkVar, /* 251 */ + Tcl_UnregisterChannel, /* 252 */ + Tcl_UnsetVar, /* 253 */ + Tcl_UnsetVar2, /* 254 */ + Tcl_UntraceVar, /* 255 */ + Tcl_UntraceVar2, /* 256 */ + Tcl_UpdateLinkedVar, /* 257 */ + Tcl_UpVar, /* 258 */ + Tcl_UpVar2, /* 259 */ + Tcl_VarEval, /* 260 */ + Tcl_VarTraceInfo, /* 261 */ + Tcl_VarTraceInfo2, /* 262 */ + Tcl_Write, /* 263 */ + Tcl_WrongNumArgs, /* 264 */ + Tcl_DumpActiveMemory, /* 265 */ + Tcl_ValidateAllMemory, /* 266 */ + Tcl_AppendResultVA, /* 267 */ + Tcl_AppendStringsToObjVA, /* 268 */ + Tcl_HashStats, /* 269 */ + Tcl_ParseVar, /* 270 */ + Tcl_PkgPresent, /* 271 */ + Tcl_PkgPresentEx, /* 272 */ + Tcl_PkgProvide, /* 273 */ + Tcl_PkgRequire, /* 274 */ + Tcl_SetErrorCodeVA, /* 275 */ + Tcl_VarEvalVA, /* 276 */ + Tcl_WaitPid, /* 277 */ + Tcl_PanicVA, /* 278 */ + Tcl_GetVersion, /* 279 */ + Tcl_InitMemory, /* 280 */ + Tcl_StackChannel, /* 281 */ + Tcl_UnstackChannel, /* 282 */ + Tcl_GetStackedChannel, /* 283 */ + Tcl_SetMainLoop, /* 284 */ + NULL, /* 285 */ + Tcl_AppendObjToObj, /* 286 */ + Tcl_CreateEncoding, /* 287 */ + Tcl_CreateThreadExitHandler, /* 288 */ + Tcl_DeleteThreadExitHandler, /* 289 */ + Tcl_DiscardResult, /* 290 */ + Tcl_EvalEx, /* 291 */ + Tcl_EvalObjv, /* 292 */ + Tcl_EvalObjEx, /* 293 */ + Tcl_ExitThread, /* 294 */ + Tcl_ExternalToUtf, /* 295 */ + Tcl_ExternalToUtfDString, /* 296 */ + Tcl_FinalizeThread, /* 297 */ + Tcl_FinalizeNotifier, /* 298 */ + Tcl_FreeEncoding, /* 299 */ + Tcl_GetCurrentThread, /* 300 */ + Tcl_GetEncoding, /* 301 */ + Tcl_GetEncodingName, /* 302 */ + Tcl_GetEncodingNames, /* 303 */ + Tcl_GetIndexFromObjStruct, /* 304 */ + Tcl_GetThreadData, /* 305 */ + Tcl_GetVar2Ex, /* 306 */ + Tcl_InitNotifier, /* 307 */ + Tcl_MutexLock, /* 308 */ + Tcl_MutexUnlock, /* 309 */ + Tcl_ConditionNotify, /* 310 */ + Tcl_ConditionWait, /* 311 */ + Tcl_NumUtfChars, /* 312 */ + Tcl_ReadChars, /* 313 */ + Tcl_RestoreResult, /* 314 */ + Tcl_SaveResult, /* 315 */ + Tcl_SetSystemEncoding, /* 316 */ + Tcl_SetVar2Ex, /* 317 */ + Tcl_ThreadAlert, /* 318 */ + Tcl_ThreadQueueEvent, /* 319 */ + Tcl_UniCharAtIndex, /* 320 */ + Tcl_UniCharToLower, /* 321 */ + Tcl_UniCharToTitle, /* 322 */ + Tcl_UniCharToUpper, /* 323 */ + Tcl_UniCharToUtf, /* 324 */ + Tcl_UtfAtIndex, /* 325 */ + Tcl_UtfCharComplete, /* 326 */ + Tcl_UtfBackslash, /* 327 */ + Tcl_UtfFindFirst, /* 328 */ + Tcl_UtfFindLast, /* 329 */ + Tcl_UtfNext, /* 330 */ + Tcl_UtfPrev, /* 331 */ + Tcl_UtfToExternal, /* 332 */ + Tcl_UtfToExternalDString, /* 333 */ + Tcl_UtfToLower, /* 334 */ + Tcl_UtfToTitle, /* 335 */ + Tcl_UtfToUniChar, /* 336 */ + Tcl_UtfToUpper, /* 337 */ + Tcl_WriteChars, /* 338 */ + Tcl_WriteObj, /* 339 */ + Tcl_GetString, /* 340 */ + Tcl_GetDefaultEncodingDir, /* 341 */ + Tcl_SetDefaultEncodingDir, /* 342 */ + Tcl_AlertNotifier, /* 343 */ + Tcl_ServiceModeHook, /* 344 */ + Tcl_UniCharIsAlnum, /* 345 */ + Tcl_UniCharIsAlpha, /* 346 */ + Tcl_UniCharIsDigit, /* 347 */ + Tcl_UniCharIsLower, /* 348 */ + Tcl_UniCharIsSpace, /* 349 */ + Tcl_UniCharIsUpper, /* 350 */ + Tcl_UniCharIsWordChar, /* 351 */ + Tcl_UniCharLen, /* 352 */ + Tcl_UniCharNcmp, /* 353 */ + Tcl_UniCharToUtfDString, /* 354 */ + Tcl_UtfToUniCharDString, /* 355 */ + Tcl_GetRegExpFromObj, /* 356 */ + Tcl_EvalTokens, /* 357 */ + Tcl_FreeParse, /* 358 */ + Tcl_LogCommandInfo, /* 359 */ + Tcl_ParseBraces, /* 360 */ + Tcl_ParseCommand, /* 361 */ + Tcl_ParseExpr, /* 362 */ + Tcl_ParseQuotedString, /* 363 */ + Tcl_ParseVarName, /* 364 */ + Tcl_GetCwd, /* 365 */ + Tcl_Chdir, /* 366 */ + Tcl_Access, /* 367 */ + Tcl_Stat, /* 368 */ + Tcl_UtfNcmp, /* 369 */ + Tcl_UtfNcasecmp, /* 370 */ + Tcl_StringCaseMatch, /* 371 */ + Tcl_UniCharIsControl, /* 372 */ + Tcl_UniCharIsGraph, /* 373 */ + Tcl_UniCharIsPrint, /* 374 */ + Tcl_UniCharIsPunct, /* 375 */ + Tcl_RegExpExecObj, /* 376 */ + Tcl_RegExpGetInfo, /* 377 */ + Tcl_NewUnicodeObj, /* 378 */ + Tcl_SetUnicodeObj, /* 379 */ + Tcl_GetCharLength, /* 380 */ + Tcl_GetUniChar, /* 381 */ + Tcl_GetUnicode, /* 382 */ + Tcl_GetRange, /* 383 */ + Tcl_AppendUnicodeToObj, /* 384 */ + Tcl_RegExpMatchObj, /* 385 */ + Tcl_SetNotifier, /* 386 */ + Tcl_GetAllocMutex, /* 387 */ + Tcl_GetChannelNames, /* 388 */ + Tcl_GetChannelNamesEx, /* 389 */ + Tcl_ProcObjCmd, /* 390 */ + Tcl_ConditionFinalize, /* 391 */ + Tcl_MutexFinalize, /* 392 */ + Tcl_CreateThread, /* 393 */ + Tcl_ReadRaw, /* 394 */ + Tcl_WriteRaw, /* 395 */ + Tcl_GetTopChannel, /* 396 */ + Tcl_ChannelBuffered, /* 397 */ + Tcl_ChannelName, /* 398 */ + Tcl_ChannelVersion, /* 399 */ + Tcl_ChannelBlockModeProc, /* 400 */ + Tcl_ChannelCloseProc, /* 401 */ + Tcl_ChannelClose2Proc, /* 402 */ + Tcl_ChannelInputProc, /* 403 */ + Tcl_ChannelOutputProc, /* 404 */ + Tcl_ChannelSeekProc, /* 405 */ + Tcl_ChannelSetOptionProc, /* 406 */ + Tcl_ChannelGetOptionProc, /* 407 */ + Tcl_ChannelWatchProc, /* 408 */ + Tcl_ChannelGetHandleProc, /* 409 */ + Tcl_ChannelFlushProc, /* 410 */ + Tcl_ChannelHandlerProc, /* 411 */ + Tcl_JoinThread, /* 412 */ + Tcl_IsChannelShared, /* 413 */ + Tcl_IsChannelRegistered, /* 414 */ + Tcl_CutChannel, /* 415 */ + Tcl_SpliceChannel, /* 416 */ + Tcl_ClearChannelHandlers, /* 417 */ + Tcl_IsChannelExisting, /* 418 */ + Tcl_UniCharNcasecmp, /* 419 */ + Tcl_UniCharCaseMatch, /* 420 */ + Tcl_FindHashEntry, /* 421 */ + Tcl_CreateHashEntry, /* 422 */ + Tcl_InitCustomHashTable, /* 423 */ + Tcl_InitObjHashTable, /* 424 */ + Tcl_CommandTraceInfo, /* 425 */ + Tcl_TraceCommand, /* 426 */ + Tcl_UntraceCommand, /* 427 */ + Tcl_AttemptAlloc, /* 428 */ + Tcl_AttemptDbCkalloc, /* 429 */ + Tcl_AttemptRealloc, /* 430 */ + Tcl_AttemptDbCkrealloc, /* 431 */ + Tcl_AttemptSetObjLength, /* 432 */ + Tcl_GetChannelThread, /* 433 */ + Tcl_GetUnicodeFromObj, /* 434 */ + Tcl_GetMathFuncInfo, /* 435 */ + Tcl_ListMathFuncs, /* 436 */ + Tcl_SubstObj, /* 437 */ + Tcl_DetachChannel, /* 438 */ + Tcl_IsStandardChannel, /* 439 */ + Tcl_FSCopyFile, /* 440 */ + Tcl_FSCopyDirectory, /* 441 */ + Tcl_FSCreateDirectory, /* 442 */ + Tcl_FSDeleteFile, /* 443 */ + Tcl_FSLoadFile, /* 444 */ + Tcl_FSMatchInDirectory, /* 445 */ + Tcl_FSLink, /* 446 */ + Tcl_FSRemoveDirectory, /* 447 */ + Tcl_FSRenameFile, /* 448 */ + Tcl_FSLstat, /* 449 */ + Tcl_FSUtime, /* 450 */ + Tcl_FSFileAttrsGet, /* 451 */ + Tcl_FSFileAttrsSet, /* 452 */ + Tcl_FSFileAttrStrings, /* 453 */ + Tcl_FSStat, /* 454 */ + Tcl_FSAccess, /* 455 */ + Tcl_FSOpenFileChannel, /* 456 */ + Tcl_FSGetCwd, /* 457 */ + Tcl_FSChdir, /* 458 */ + Tcl_FSConvertToPathType, /* 459 */ + Tcl_FSJoinPath, /* 460 */ + Tcl_FSSplitPath, /* 461 */ + Tcl_FSEqualPaths, /* 462 */ + Tcl_FSGetNormalizedPath, /* 463 */ + Tcl_FSJoinToPath, /* 464 */ + Tcl_FSGetInternalRep, /* 465 */ + Tcl_FSGetTranslatedPath, /* 466 */ + Tcl_FSEvalFile, /* 467 */ + Tcl_FSNewNativePath, /* 468 */ + Tcl_FSGetNativePath, /* 469 */ + Tcl_FSFileSystemInfo, /* 470 */ + Tcl_FSPathSeparator, /* 471 */ + Tcl_FSListVolumes, /* 472 */ + Tcl_FSRegister, /* 473 */ + Tcl_FSUnregister, /* 474 */ + Tcl_FSData, /* 475 */ + Tcl_FSGetTranslatedStringPath, /* 476 */ + Tcl_FSGetFileSystemForPath, /* 477 */ + Tcl_FSGetPathType, /* 478 */ + Tcl_OutputBuffered, /* 479 */ + Tcl_FSMountsChanged, /* 480 */ + Tcl_EvalTokensStandard, /* 481 */ + Tcl_GetTime, /* 482 */ + Tcl_CreateObjTrace, /* 483 */ + Tcl_GetCommandInfoFromToken, /* 484 */ + Tcl_SetCommandInfoFromToken, /* 485 */ + Tcl_DbNewWideIntObj, /* 486 */ + Tcl_GetWideIntFromObj, /* 487 */ + Tcl_NewWideIntObj, /* 488 */ + Tcl_SetWideIntObj, /* 489 */ + Tcl_AllocStatBuf, /* 490 */ + Tcl_Seek, /* 491 */ + Tcl_Tell, /* 492 */ + Tcl_ChannelWideSeekProc, /* 493 */ + Tcl_DictObjPut, /* 494 */ + Tcl_DictObjGet, /* 495 */ + Tcl_DictObjRemove, /* 496 */ + Tcl_DictObjSize, /* 497 */ + Tcl_DictObjFirst, /* 498 */ + Tcl_DictObjNext, /* 499 */ + Tcl_DictObjDone, /* 500 */ + Tcl_DictObjPutKeyList, /* 501 */ + Tcl_DictObjRemoveKeyList, /* 502 */ + Tcl_NewDictObj, /* 503 */ + Tcl_DbNewDictObj, /* 504 */ + Tcl_RegisterConfig, /* 505 */ + Tcl_CreateNamespace, /* 506 */ + Tcl_DeleteNamespace, /* 507 */ + Tcl_AppendExportList, /* 508 */ + Tcl_Export, /* 509 */ + Tcl_Import, /* 510 */ + Tcl_ForgetImport, /* 511 */ + Tcl_GetCurrentNamespace, /* 512 */ + Tcl_GetGlobalNamespace, /* 513 */ + Tcl_FindNamespace, /* 514 */ + Tcl_FindCommand, /* 515 */ + Tcl_GetCommandFromObj, /* 516 */ + Tcl_GetCommandFullName, /* 517 */ + Tcl_FSEvalFileEx, /* 518 */ + Tcl_SetExitProc, /* 519 */ + Tcl_LimitAddHandler, /* 520 */ + Tcl_LimitRemoveHandler, /* 521 */ + Tcl_LimitReady, /* 522 */ + Tcl_LimitCheck, /* 523 */ + Tcl_LimitExceeded, /* 524 */ + Tcl_LimitSetCommands, /* 525 */ + Tcl_LimitSetTime, /* 526 */ + Tcl_LimitSetGranularity, /* 527 */ + Tcl_LimitTypeEnabled, /* 528 */ + Tcl_LimitTypeExceeded, /* 529 */ + Tcl_LimitTypeSet, /* 530 */ + Tcl_LimitTypeReset, /* 531 */ + Tcl_LimitGetCommands, /* 532 */ + Tcl_LimitGetTime, /* 533 */ + Tcl_LimitGetGranularity, /* 534 */ + Tcl_SaveInterpState, /* 535 */ + Tcl_RestoreInterpState, /* 536 */ + Tcl_DiscardInterpState, /* 537 */ + Tcl_SetReturnOptions, /* 538 */ + Tcl_GetReturnOptions, /* 539 */ + Tcl_IsEnsemble, /* 540 */ + Tcl_CreateEnsemble, /* 541 */ + Tcl_FindEnsemble, /* 542 */ + Tcl_SetEnsembleSubcommandList, /* 543 */ + Tcl_SetEnsembleMappingDict, /* 544 */ + Tcl_SetEnsembleUnknownHandler, /* 545 */ + Tcl_SetEnsembleFlags, /* 546 */ + Tcl_GetEnsembleSubcommandList, /* 547 */ + Tcl_GetEnsembleMappingDict, /* 548 */ + Tcl_GetEnsembleUnknownHandler, /* 549 */ + Tcl_GetEnsembleFlags, /* 550 */ + Tcl_GetEnsembleNamespace, /* 551 */ + Tcl_SetTimeProc, /* 552 */ + Tcl_QueryTimeProc, /* 553 */ + Tcl_ChannelThreadActionProc, /* 554 */ + Tcl_NewBignumObj, /* 555 */ + Tcl_DbNewBignumObj, /* 556 */ + Tcl_SetBignumObj, /* 557 */ + Tcl_GetBignumFromObj, /* 558 */ + Tcl_TakeBignumFromObj, /* 559 */ + Tcl_TruncateChannel, /* 560 */ + Tcl_ChannelTruncateProc, /* 561 */ + Tcl_SetChannelErrorInterp, /* 562 */ + Tcl_GetChannelErrorInterp, /* 563 */ + Tcl_SetChannelError, /* 564 */ + Tcl_GetChannelError, /* 565 */ + Tcl_InitBignumFromDouble, /* 566 */ + Tcl_GetNamespaceUnknownHandler, /* 567 */ + Tcl_SetNamespaceUnknownHandler, /* 568 */ + Tcl_GetEncodingFromObj, /* 569 */ + Tcl_GetEncodingSearchPath, /* 570 */ + Tcl_SetEncodingSearchPath, /* 571 */ + Tcl_GetEncodingNameFromEnvironment, /* 572 */ + Tcl_PkgRequireProc, /* 573 */ + Tcl_AppendObjToErrorInfo, /* 574 */ + Tcl_AppendLimitedToObj, /* 575 */ + Tcl_Format, /* 576 */ + Tcl_AppendFormatToObj, /* 577 */ + Tcl_ObjPrintf, /* 578 */ + Tcl_AppendPrintfToObj, /* 579 */ + Tcl_CancelEval, /* 580 */ + Tcl_Canceled, /* 581 */ + Tcl_CreatePipe, /* 582 */ + Tcl_NRCreateCommand, /* 583 */ + Tcl_NREvalObj, /* 584 */ + Tcl_NREvalObjv, /* 585 */ + Tcl_NRCmdSwap, /* 586 */ + Tcl_NRAddCallback, /* 587 */ + Tcl_NRCallObjProc, /* 588 */ + Tcl_GetFSDeviceFromStat, /* 589 */ + Tcl_GetFSInodeFromStat, /* 590 */ + Tcl_GetModeFromStat, /* 591 */ + Tcl_GetLinkCountFromStat, /* 592 */ + Tcl_GetUserIdFromStat, /* 593 */ + Tcl_GetGroupIdFromStat, /* 594 */ + Tcl_GetDeviceTypeFromStat, /* 595 */ + Tcl_GetAccessTimeFromStat, /* 596 */ + Tcl_GetModificationTimeFromStat, /* 597 */ + Tcl_GetChangeTimeFromStat, /* 598 */ + Tcl_GetSizeFromStat, /* 599 */ + Tcl_GetBlocksFromStat, /* 600 */ + Tcl_GetBlockSizeFromStat, /* 601 */ + Tcl_SetEnsembleParameterList, /* 602 */ + Tcl_GetEnsembleParameterList, /* 603 */ + Tcl_ParseArgsObjv, /* 604 */ + Tcl_GetErrorLine, /* 605 */ + Tcl_SetErrorLine, /* 606 */ + Tcl_TransferResult, /* 607 */ + Tcl_InterpActive, /* 608 */ + Tcl_BackgroundException, /* 609 */ + Tcl_ZlibDeflate, /* 610 */ + Tcl_ZlibInflate, /* 611 */ + Tcl_ZlibCRC32, /* 612 */ + Tcl_ZlibAdler32, /* 613 */ + Tcl_ZlibStreamInit, /* 614 */ + Tcl_ZlibStreamGetCommandName, /* 615 */ + Tcl_ZlibStreamEof, /* 616 */ + Tcl_ZlibStreamAdler32, /* 617 */ + Tcl_ZlibStreamPut, /* 618 */ + Tcl_ZlibStreamGet, /* 619 */ + Tcl_ZlibStreamClose, /* 620 */ + Tcl_ZlibStreamReset, /* 621 */ + Tcl_SetStartupScript, /* 622 */ + Tcl_GetStartupScript, /* 623 */ + Tcl_CloseEx, /* 624 */ +}; + +/* !END!: Do not edit above this line. */ + +/* + * Module-scope pointers to the main static stubs tables, used for package + * initialization via Tcl_PkgProvideEx(). + */ + +MODULE_SCOPE const TclStubs * const tclConstStubsPtr; +MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; + +const TclStubs * const tclConstStubsPtr = &tclStubs; +const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; diff --git a/tests/chan.test b/tests/chan.test index 39dd111..7dccda7 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chan.test,v 1.15 2008/07/21 21:02:19 ferrieux Exp $ +# RCS: @(#) $Id: chan.test,v 1.16 2008/12/18 01:14:17 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -29,11 +29,23 @@ test chan-1.2 {chan command general syntax} -body { test chan-2.1 {chan command: blocked subcommand} -body { chan blocked foo bar } -returnCodes error -result "wrong # args: should be \"chan blocked channelId\"" - test chan-3.1 {chan command: close subcommand} -body { - chan close foo bar -} -returnCodes error -result "wrong # args: should be \"chan close channelId\"" - + chan close foo bar zet +} -returnCodes error -result "wrong # args: should be \"chan close channelId ?direction?\"" +test chan-3.2 {chan command: close subcommand} -setup { + set chan [open [info script] r] +} -body { + chan close $chan bar +} -cleanup { + close $chan +} -returnCodes error -result "bad direction \"bar\": must be read or write" +test chan-3.3 {chan command: close subcommand} -setup { + set chan [open [info script] r] +} -body { + chan close $chan write +} -cleanup { + close $chan +} -returnCodes error -result "Half-close of write-side not possible, side not opened or already closed" test chan-4.1 {chan command: configure subcommand} -body { chan configure } -returnCodes error -result "wrong # args: should be \"chan configure channelId ?-option value ...?\"" diff --git a/tests/chanio.test b/tests/chanio.test index 7e53f77..487691a 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.15 2008/06/20 20:48:48 dgp Exp $ +# RCS: @(#) $Id: chanio.test,v 1.16 2008/12/18 01:14:17 ferrieux Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -2229,7 +2229,56 @@ test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel o chan close $f set l } {file1 file2} - +test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { + set cat [makeFile { + fconfigure stdout -buffering line + while {[gets stdin line]>=0} {puts $line} + puts DONE + exit 0 + } cat.tcl] + set ::ff [open "|[list tclsh $cat]" r+] + puts $::ff Hey + flush $ff + close $::ff w + after 1000 {set ::done Failed} + set ::acc {} + fileevent $::ff readable { + if {[gets $::ff line]<0} {set ::done Succeeded;return} + lappend ::acc $line + } + vwait ::done + close $::ff r + list $::done $::acc +} {Succeeded {Hey DONE}} +if {0} {test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { + set echo [makeFile { + proc accept {s args} {set ::sok $s} + set s [socket -server accept 0] + puts [lindex [fconfigure $s -sockname] 2] + flush stdout + vwait ::sok + fconfigure $::sok -buffering line + while {[gets $::sok line]>=0} {puts $::sok $line} + puts $::sok DONE + exit 0 + } echo.tcl] + set ::ff [open "|[list tclsh $echo]" r] + gets $::ff port + set ::s [socket 127.0.0.1 $port] + puts $::s Hey + flush $::s + close $::s w + after 1000 {set ::done Failed} + set ::acc {} + fileevent $::s readable { + if {[gets $::s line]<0} {set ::done Succeeded;return} + lappend ::acc $line + } + vwait ::done + close $::s r + close $::ff + list $::done $::acc +} {Succeeded {Hey DONE}}} test chan-io-29.1 {Tcl_WriteChars, channel not writable} { list [catch {chan puts stdin hello} msg] $msg } {1 {channel "stdin" wasn't opened for writing}} diff --git a/tests/ioCmd.test b/tests/ioCmd.test index a38158e..0018f83 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.47 2008/07/21 21:12:49 ferrieux Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.48 2008/12/18 01:14:17 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -182,13 +182,27 @@ test iocmd-6.3 {tell command} { test iocmd-7.1 {close command} { list [catch {close} msg] $msg -} {1 {wrong # args: should be "close channelId"}} +} {1 {wrong # args: should be "close channelId ?direction?"}} test iocmd-7.2 {close command} { list [catch {close a b c d e} msg] $msg -} {1 {wrong # args: should be "close channelId"}} +} {1 {wrong # args: should be "close channelId ?direction?"}} test iocmd-7.3 {close command} { list [catch {close aaa} msg] $msg } {1 {can not find channel named "aaa"}} +test iocmd-7.4 {close command} -setup { + set chan [open [info script] r] +} -body { + chan close $chan bar +} -cleanup { + close $chan +} -returnCodes error -result "bad direction \"bar\": must be read or write" +test iocmd-7.5 {close command} -setup { + set chan [open [info script] r] +} -body { + chan close $chan write +} -cleanup { + close $chan +} -returnCodes error -result "Half-close of write-side not possible, side not opened or already closed" test iocmd-8.1 {fconfigure command} { list [catch {fconfigure} msg] $msg diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 653f223..51781c0 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.96 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.97 2008/12/18 01:14:16 ferrieux Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -218,6 +218,9 @@ static void TcpAccept(ClientData data, int mask); static int TcpBlockModeProc(ClientData data, int mode); static int TcpCloseProc(ClientData instanceData, Tcl_Interp *interp); +static int TcpClose2Proc(ClientData instanceData, + Tcl_Interp *interp, + int flags); static int TcpGetHandleProc(ClientData instanceData, int direction, ClientData *handlePtr); static int TcpGetOptionProc(ClientData instanceData, @@ -318,7 +321,7 @@ static Tcl_ChannelType tcpChannelType = { TcpGetOptionProc, /* Get option proc. */ TcpWatchProc, /* Initialize notifier. */ TcpGetHandleProc, /* Get OS handles out of channel. */ - NULL, /* close2proc. */ + TcpClose2Proc, /* Close2 proc. */ TcpBlockModeProc, /* Set blocking or non-blocking mode.*/ NULL, /* flush proc. */ NULL, /* handler proc. */ @@ -2018,6 +2021,57 @@ TcpCloseProc( /* *---------------------------------------------------------------------- * + * TcpClose2Proc -- + * + * This function is called by the generic IO level to perform the channel + * type specific part of a half-close: namely, a shutdown() on a socket. + * + * Results: + * 0 if successful, the value of errno if failed. + * + * Side effects: + * Shuts down one side of the socket. + * + *---------------------------------------------------------------------- + */ + +static int +TcpClose2Proc( + ClientData instanceData, /* The socket to close. */ + Tcl_Interp *interp, /* For error reporting. */ + int flags) /* Flags that indicate which side to close. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + int errorCode = 0; + int sd; + + /* + * Shutdown the OS socket handle. + */ + switch(flags) + { + case TCL_CLOSE_READ: + sd=SHUT_RD; + break; + case TCL_CLOSE_WRITE: + sd=SHUT_WR; + break; + default: + if (interp) { + Tcl_AppendResult(interp, "Socket close2proc called bidirectionally", NULL); + } + return TCL_ERROR; + } + if (shutdown(statePtr->fd,sd)<0) { + errorCode = errno; + } + + return errorCode; +} + +/* + *---------------------------------------------------------------------- + * * TcpGetOptionProc -- * * Computes an option value for a TCP socket based channel, or a list of diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 967d633..0381764 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.45 2008/12/12 16:07:18 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.46 2008/12/18 01:14:17 ferrieux Exp $ */ #include "tclInt.h" @@ -51,8 +51,10 @@ typedef struct PipeState { */ static int PipeBlockModeProc(ClientData instanceData, int mode); -static int PipeCloseProc(ClientData instanceData, - Tcl_Interp *interp); +static int PipeClose2Proc(ClientData instanceData, + Tcl_Interp *interp, int flags); +/* static int PipeCloseProc(ClientData instanceData, + Tcl_Interp *interp); */ static int PipeGetHandleProc(ClientData instanceData, int direction, ClientData *handlePtr); static int PipeInputProc(ClientData instanceData, char *buf, @@ -71,7 +73,7 @@ static int SetupStdFile(TclFile file, int type); static Tcl_ChannelType pipeChannelType = { "pipe", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ - PipeCloseProc, /* Close proc. */ + TCL_CLOSE2PROC, /* Close proc. */ PipeInputProc, /* Input proc. */ PipeOutputProc, /* Output proc. */ NULL, /* Seek proc. */ @@ -79,7 +81,7 @@ static Tcl_ChannelType pipeChannelType = { NULL, /* Get option proc. */ PipeWatchProc, /* Initialize notifier. */ PipeGetHandleProc, /* Get OS handles out of channel. */ - NULL, /* close2proc. */ + PipeClose2Proc, /* close2proc. */ PipeBlockModeProc, /* Set blocking or non-blocking mode.*/ NULL, /* flush proc. */ NULL, /* handler proc. */ @@ -908,7 +910,96 @@ PipeBlockModeProc( /* *---------------------------------------------------------------------- * - * PipeCloseProc -- + * PipeClose2Proc + * + * This function is invoked by the generic IO level to perform + * pipeline-type-specific half or full-close. + * + * Results: + * 0 on success, errno otherwise. + * + * Side effects: + * Closes the command pipeline channel. + * + *---------------------------------------------------------------------- + */ + +static int +PipeClose2Proc( + ClientData instanceData, /* The pipe to close. */ + Tcl_Interp *interp, /* For error reporting. */ + int flags) /* Flags that indicate which side to close. */ +{ + PipeState *pipePtr= (PipeState *) instanceData; + Tcl_Channel errChan; + int errorCode, result; + + errorCode = 0; + result = 0; + + if (((!flags)||(flags & TCL_CLOSE_READ)) && (pipePtr->inFile != NULL)) { + if (TclpCloseFile(pipePtr->inFile) < 0) { + errorCode = errno; + } else { + pipePtr->inFile=NULL; + } + } + if (((!flags)||(flags & TCL_CLOSE_WRITE)) && (pipePtr->outFile != NULL) && (errorCode == 0)) { + if (TclpCloseFile(pipePtr->outFile) < 0) { + errorCode = errno; + } else { + pipePtr->outFile=NULL; + } + } + + /* if half-closing, stop here. */ + if (flags) { + return errorCode; + } + + if (pipePtr->isNonBlocking || TclInExit()) { + /* + * If the channel is non-blocking or Tcl is being cleaned up, just + * detach the children PIDs, reap them (important if we are in a + * dynamic load module), and discard the errorFile. + */ + + Tcl_DetachPids(pipePtr->numPids, pipePtr->pidPtr); + Tcl_ReapDetachedProcs(); + + if (pipePtr->errorFile) { + TclpCloseFile(pipePtr->errorFile); + } + } else { + /* + * Wrap the error file into a channel and give it to the cleanup + * routine. + */ + + if (pipePtr->errorFile) { + errChan = Tcl_MakeFileChannel( + (ClientData) INT2PTR(GetFd(pipePtr->errorFile)), TCL_READABLE); + } else { + errChan = NULL; + } + result = TclCleanupChildren(interp, pipePtr->numPids, pipePtr->pidPtr, + errChan); + } + + if (pipePtr->numPids != 0) { + ckfree((char *) pipePtr->pidPtr); + } + ckfree((char *) pipePtr); + if (errorCode == 0) { + return result; + } + return errorCode; +} + +/* + *---------------------------------------------------------------------- + * + * PipeCloseProc -- OBSOLETE * * This function is invoked by the generic IO level to perform * channel-type-specific cleanup when a command pipeline channel is @@ -936,6 +1027,7 @@ PipeCloseProc( errorCode = 0; result = 0; pipePtr = (PipeState *) instanceData; + if (pipePtr->inFile) { if (TclpCloseFile(pipePtr->inFile) < 0) { errorCode = errno; diff --git a/win/tclWinSock.c b/win/tclWinSock.c index df04b8e..9f5b9bc 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.63 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.64 2008/12/18 01:14:17 ferrieux Exp $ */ #include "tclWinInt.h" @@ -168,6 +168,7 @@ static Tcl_EventProc SocketEventProc; static Tcl_EventSetupProc SocketSetupProc; static Tcl_DriverBlockModeProc TcpBlockProc; static Tcl_DriverCloseProc TcpCloseProc; +static Tcl_DriverClose2Proc TcpClose2Proc; static Tcl_DriverSetOptionProc TcpSetOptionProc; static Tcl_DriverGetOptionProc TcpGetOptionProc; static Tcl_DriverInputProc TcpInputProc; @@ -191,7 +192,7 @@ static Tcl_ChannelType tcpChannelType = { TcpGetOptionProc, /* Get option proc. */ TcpWatchProc, /* Set up notifier to watch this channel. */ TcpGetHandleProc, /* Get an OS handle from channel. */ - NULL, /* close2proc. */ + TcpClose2Proc, /* Close2proc. */ TcpBlockProc, /* Set socket into (non-)blocking mode. */ NULL, /* flush proc. */ NULL, /* handler proc. */ @@ -818,6 +819,58 @@ TcpCloseProc( /* *---------------------------------------------------------------------- * + * TcpClose2Proc -- + * + * This function is called by the generic IO level to perform the channel + * type specific part of a half-close: namely, a shutdown() on a socket. + * + * Results: + * 0 if successful, the value of errno if failed. + * + * Side effects: + * Shuts down one side of the socket. + * + *---------------------------------------------------------------------- + */ + +static int +TcpClose2Proc( + ClientData instanceData, /* The socket to close. */ + Tcl_Interp *interp, /* For error reporting. */ + int flags) /* Flags that indicate which side to close. */ +{ + SocketInfo *infoPtr = (SocketInfo *) instanceData; + int errorCode = 0; + int sd; + + /* + * Shutdown the OS socket handle. + */ + switch(flags) + { + case TCL_CLOSE_READ: + sd=SD_RECEIVE; + break; + case TCL_CLOSE_WRITE: + sd=SD_SEND; + break; + default: + if (interp) { + Tcl_AppendResult(interp, "Socket close2proc called bidirectionally", NULL); + } + return TCL_ERROR; + } + if (shutdown(infoPtr->socket,sd) == SOCKET_ERROR) { + TclWinConvertWSAError((DWORD) WSAGetLastError()); + errorCode = Tcl_GetErrno(); + } + + return errorCode; +} + +/* + *---------------------------------------------------------------------- + * * NewSocketInfo -- * * This function allocates and initializes a new SocketInfo structure. -- cgit v0.12 From c910444de34c20cbd42f3e8dd2dfbcebf4dfb9eb Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 18 Dec 2008 04:38:01 +0000 Subject: fix line endings --- generic/tclDecls.h | 14086 ++++++++++++++++++++++++------------------------ generic/tclStubInit.c | 2332 ++++---- 2 files changed, 8209 insertions(+), 8209 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 3df68c6..fb8ba5c 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1,7043 +1,7043 @@ -/* - * tclDecls.h -- - * - * Declarations of functions in the platform independent public Tcl API. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclDecls.h,v 1.164 2008/12/18 01:14:16 ferrieux Exp $ - */ - -#ifndef _TCLDECLS -#define _TCLDECLS - -#undef TCL_STORAGE_CLASS -#ifdef BUILD_tcl -# define TCL_STORAGE_CLASS DLLEXPORT -#else -# ifdef USE_TCL_STUBS -# define TCL_STORAGE_CLASS -# else -# define TCL_STORAGE_CLASS DLLIMPORT -# endif -#endif - -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -/* - * Exported function declarations: - */ - -#ifndef Tcl_PkgProvideEx_TCL_DECLARED -#define Tcl_PkgProvideEx_TCL_DECLARED -/* 0 */ -EXTERN int Tcl_PkgProvideEx (Tcl_Interp * interp, - const char * name, const char * version, - ClientData clientData); -#endif -#ifndef Tcl_PkgRequireEx_TCL_DECLARED -#define Tcl_PkgRequireEx_TCL_DECLARED -/* 1 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, - const char * name, const char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_Panic_TCL_DECLARED -#define Tcl_Panic_TCL_DECLARED -/* 2 */ -EXTERN void Tcl_Panic (const char * format, ...); -#endif -#ifndef Tcl_Alloc_TCL_DECLARED -#define Tcl_Alloc_TCL_DECLARED -/* 3 */ -EXTERN char * Tcl_Alloc (unsigned int size); -#endif -#ifndef Tcl_Free_TCL_DECLARED -#define Tcl_Free_TCL_DECLARED -/* 4 */ -EXTERN void Tcl_Free (char * ptr); -#endif -#ifndef Tcl_Realloc_TCL_DECLARED -#define Tcl_Realloc_TCL_DECLARED -/* 5 */ -EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_DbCkalloc_TCL_DECLARED -#define Tcl_DbCkalloc_TCL_DECLARED -/* 6 */ -EXTERN char * Tcl_DbCkalloc (unsigned int size, const char * file, - int line); -#endif -#ifndef Tcl_DbCkfree_TCL_DECLARED -#define Tcl_DbCkfree_TCL_DECLARED -/* 7 */ -EXTERN int Tcl_DbCkfree (char * ptr, const char * file, - int line); -#endif -#ifndef Tcl_DbCkrealloc_TCL_DECLARED -#define Tcl_DbCkrealloc_TCL_DECLARED -/* 8 */ -EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, - const char * file, int line); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler_TCL_DECLARED -#define Tcl_CreateFileHandler_TCL_DECLARED -/* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler_TCL_DECLARED -#define Tcl_DeleteFileHandler_TCL_DECLARED -/* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer_TCL_DECLARED -#define Tcl_SetTimer_TCL_DECLARED -/* 11 */ -EXTERN void Tcl_SetTimer (const Tcl_Time * timePtr); -#endif -#ifndef Tcl_Sleep_TCL_DECLARED -#define Tcl_Sleep_TCL_DECLARED -/* 12 */ -EXTERN void Tcl_Sleep (int ms); -#endif -#ifndef Tcl_WaitForEvent_TCL_DECLARED -#define Tcl_WaitForEvent_TCL_DECLARED -/* 13 */ -EXTERN int Tcl_WaitForEvent (const Tcl_Time * timePtr); -#endif -#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED -#define Tcl_AppendAllObjTypes_TCL_DECLARED -/* 14 */ -EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendStringsToObj_TCL_DECLARED -#define Tcl_AppendStringsToObj_TCL_DECLARED -/* 15 */ -EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); -#endif -#ifndef Tcl_AppendToObj_TCL_DECLARED -#define Tcl_AppendToObj_TCL_DECLARED -/* 16 */ -EXTERN void Tcl_AppendToObj (Tcl_Obj * objPtr, - const char * bytes, int length); -#endif -#ifndef Tcl_ConcatObj_TCL_DECLARED -#define Tcl_ConcatObj_TCL_DECLARED -/* 17 */ -EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_ConvertToType_TCL_DECLARED -#define Tcl_ConvertToType_TCL_DECLARED -/* 18 */ -EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, - Tcl_Obj * objPtr, - const Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_DbDecrRefCount_TCL_DECLARED -#define Tcl_DbDecrRefCount_TCL_DECLARED -/* 19 */ -EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, - const char * file, int line); -#endif -#ifndef Tcl_DbIncrRefCount_TCL_DECLARED -#define Tcl_DbIncrRefCount_TCL_DECLARED -/* 20 */ -EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, - const char * file, int line); -#endif -#ifndef Tcl_DbIsShared_TCL_DECLARED -#define Tcl_DbIsShared_TCL_DECLARED -/* 21 */ -EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, const char * file, - int line); -#endif -#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED -#define Tcl_DbNewBooleanObj_TCL_DECLARED -/* 22 */ -EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, - const char * file, int line); -#endif -#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED -#define Tcl_DbNewByteArrayObj_TCL_DECLARED -/* 23 */ -EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (const unsigned char * bytes, - int length, const char * file, int line); -#endif -#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED -#define Tcl_DbNewDoubleObj_TCL_DECLARED -/* 24 */ -EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, - const char * file, int line); -#endif -#ifndef Tcl_DbNewListObj_TCL_DECLARED -#define Tcl_DbNewListObj_TCL_DECLARED -/* 25 */ -EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *const * objv, - const char * file, int line); -#endif -#ifndef Tcl_DbNewLongObj_TCL_DECLARED -#define Tcl_DbNewLongObj_TCL_DECLARED -/* 26 */ -EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, const char * file, - int line); -#endif -#ifndef Tcl_DbNewObj_TCL_DECLARED -#define Tcl_DbNewObj_TCL_DECLARED -/* 27 */ -EXTERN Tcl_Obj * Tcl_DbNewObj (const char * file, int line); -#endif -#ifndef Tcl_DbNewStringObj_TCL_DECLARED -#define Tcl_DbNewStringObj_TCL_DECLARED -/* 28 */ -EXTERN Tcl_Obj * Tcl_DbNewStringObj (const char * bytes, int length, - const char * file, int line); -#endif -#ifndef Tcl_DuplicateObj_TCL_DECLARED -#define Tcl_DuplicateObj_TCL_DECLARED -/* 29 */ -EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); -#endif -#ifndef TclFreeObj_TCL_DECLARED -#define TclFreeObj_TCL_DECLARED -/* 30 */ -EXTERN void TclFreeObj (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetBoolean_TCL_DECLARED -#define Tcl_GetBoolean_TCL_DECLARED -/* 31 */ -EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, - const char * src, int * boolPtr); -#endif -#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED -#define Tcl_GetBooleanFromObj_TCL_DECLARED -/* 32 */ -EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * boolPtr); -#endif -#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED -#define Tcl_GetByteArrayFromObj_TCL_DECLARED -/* 33 */ -EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetDouble_TCL_DECLARED -#define Tcl_GetDouble_TCL_DECLARED -/* 34 */ -EXTERN int Tcl_GetDouble (Tcl_Interp * interp, const char * src, - double * doublePtr); -#endif -#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED -#define Tcl_GetDoubleFromObj_TCL_DECLARED -/* 35 */ -EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * doublePtr); -#endif -#ifndef Tcl_GetIndexFromObj_TCL_DECLARED -#define Tcl_GetIndexFromObj_TCL_DECLARED -/* 36 */ -EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, - CONST84 char *const * tablePtr, - const char * msg, int flags, int * indexPtr); -#endif -#ifndef Tcl_GetInt_TCL_DECLARED -#define Tcl_GetInt_TCL_DECLARED -/* 37 */ -EXTERN int Tcl_GetInt (Tcl_Interp * interp, const char * src, - int * intPtr); -#endif -#ifndef Tcl_GetIntFromObj_TCL_DECLARED -#define Tcl_GetIntFromObj_TCL_DECLARED -/* 38 */ -EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * intPtr); -#endif -#ifndef Tcl_GetLongFromObj_TCL_DECLARED -#define Tcl_GetLongFromObj_TCL_DECLARED -/* 39 */ -EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * longPtr); -#endif -#ifndef Tcl_GetObjType_TCL_DECLARED -#define Tcl_GetObjType_TCL_DECLARED -/* 40 */ -EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (const char * typeName); -#endif -#ifndef Tcl_GetStringFromObj_TCL_DECLARED -#define Tcl_GetStringFromObj_TCL_DECLARED -/* 41 */ -EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_InvalidateStringRep_TCL_DECLARED -#define Tcl_InvalidateStringRep_TCL_DECLARED -/* 42 */ -EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjAppendList_TCL_DECLARED -#define Tcl_ListObjAppendList_TCL_DECLARED -/* 43 */ -EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); -#endif -#ifndef Tcl_ListObjAppendElement_TCL_DECLARED -#define Tcl_ListObjAppendElement_TCL_DECLARED -/* 44 */ -EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_ListObjGetElements_TCL_DECLARED -#define Tcl_ListObjGetElements_TCL_DECLARED -/* 45 */ -EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * objcPtr, - Tcl_Obj *** objvPtr); -#endif -#ifndef Tcl_ListObjIndex_TCL_DECLARED -#define Tcl_ListObjIndex_TCL_DECLARED -/* 46 */ -EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj ** objPtrPtr); -#endif -#ifndef Tcl_ListObjLength_TCL_DECLARED -#define Tcl_ListObjLength_TCL_DECLARED -/* 47 */ -EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * lengthPtr); -#endif -#ifndef Tcl_ListObjReplace_TCL_DECLARED -#define Tcl_ListObjReplace_TCL_DECLARED -/* 48 */ -EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, - Tcl_Obj * listPtr, int first, int count, - int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_NewBooleanObj_TCL_DECLARED -#define Tcl_NewBooleanObj_TCL_DECLARED -/* 49 */ -EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); -#endif -#ifndef Tcl_NewByteArrayObj_TCL_DECLARED -#define Tcl_NewByteArrayObj_TCL_DECLARED -/* 50 */ -EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char * bytes, - int length); -#endif -#ifndef Tcl_NewDoubleObj_TCL_DECLARED -#define Tcl_NewDoubleObj_TCL_DECLARED -/* 51 */ -EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); -#endif -#ifndef Tcl_NewIntObj_TCL_DECLARED -#define Tcl_NewIntObj_TCL_DECLARED -/* 52 */ -EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); -#endif -#ifndef Tcl_NewListObj_TCL_DECLARED -#define Tcl_NewListObj_TCL_DECLARED -/* 53 */ -EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_NewLongObj_TCL_DECLARED -#define Tcl_NewLongObj_TCL_DECLARED -/* 54 */ -EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); -#endif -#ifndef Tcl_NewObj_TCL_DECLARED -#define Tcl_NewObj_TCL_DECLARED -/* 55 */ -EXTERN Tcl_Obj * Tcl_NewObj (void); -#endif -#ifndef Tcl_NewStringObj_TCL_DECLARED -#define Tcl_NewStringObj_TCL_DECLARED -/* 56 */ -EXTERN Tcl_Obj * Tcl_NewStringObj (const char * bytes, int length); -#endif -#ifndef Tcl_SetBooleanObj_TCL_DECLARED -#define Tcl_SetBooleanObj_TCL_DECLARED -/* 57 */ -EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); -#endif -#ifndef Tcl_SetByteArrayLength_TCL_DECLARED -#define Tcl_SetByteArrayLength_TCL_DECLARED -/* 58 */ -EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetByteArrayObj_TCL_DECLARED -#define Tcl_SetByteArrayObj_TCL_DECLARED -/* 59 */ -EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, - const unsigned char * bytes, int length); -#endif -#ifndef Tcl_SetDoubleObj_TCL_DECLARED -#define Tcl_SetDoubleObj_TCL_DECLARED -/* 60 */ -EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, - double doubleValue); -#endif -#ifndef Tcl_SetIntObj_TCL_DECLARED -#define Tcl_SetIntObj_TCL_DECLARED -/* 61 */ -EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); -#endif -#ifndef Tcl_SetListObj_TCL_DECLARED -#define Tcl_SetListObj_TCL_DECLARED -/* 62 */ -EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_SetLongObj_TCL_DECLARED -#define Tcl_SetLongObj_TCL_DECLARED -/* 63 */ -EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); -#endif -#ifndef Tcl_SetObjLength_TCL_DECLARED -#define Tcl_SetObjLength_TCL_DECLARED -/* 64 */ -EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); -#endif -#ifndef Tcl_SetStringObj_TCL_DECLARED -#define Tcl_SetStringObj_TCL_DECLARED -/* 65 */ -EXTERN void Tcl_SetStringObj (Tcl_Obj * objPtr, - const char * bytes, int length); -#endif -#ifndef Tcl_AddErrorInfo_TCL_DECLARED -#define Tcl_AddErrorInfo_TCL_DECLARED -/* 66 */ -EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, - const char * message); -#endif -#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED -#define Tcl_AddObjErrorInfo_TCL_DECLARED -/* 67 */ -EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, - const char * message, int length); -#endif -#ifndef Tcl_AllowExceptions_TCL_DECLARED -#define Tcl_AllowExceptions_TCL_DECLARED -/* 68 */ -EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); -#endif -#ifndef Tcl_AppendElement_TCL_DECLARED -#define Tcl_AppendElement_TCL_DECLARED -/* 69 */ -EXTERN void Tcl_AppendElement (Tcl_Interp * interp, - const char * element); -#endif -#ifndef Tcl_AppendResult_TCL_DECLARED -#define Tcl_AppendResult_TCL_DECLARED -/* 70 */ -EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_AsyncCreate_TCL_DECLARED -#define Tcl_AsyncCreate_TCL_DECLARED -/* 71 */ -EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AsyncDelete_TCL_DECLARED -#define Tcl_AsyncDelete_TCL_DECLARED -/* 72 */ -EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncInvoke_TCL_DECLARED -#define Tcl_AsyncInvoke_TCL_DECLARED -/* 73 */ -EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); -#endif -#ifndef Tcl_AsyncMark_TCL_DECLARED -#define Tcl_AsyncMark_TCL_DECLARED -/* 74 */ -EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); -#endif -#ifndef Tcl_AsyncReady_TCL_DECLARED -#define Tcl_AsyncReady_TCL_DECLARED -/* 75 */ -EXTERN int Tcl_AsyncReady (void); -#endif -#ifndef Tcl_BackgroundError_TCL_DECLARED -#define Tcl_BackgroundError_TCL_DECLARED -/* 76 */ -EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); -#endif -#ifndef Tcl_Backslash_TCL_DECLARED -#define Tcl_Backslash_TCL_DECLARED -/* 77 */ -EXTERN char Tcl_Backslash (const char * src, int * readPtr); -#endif -#ifndef Tcl_BadChannelOption_TCL_DECLARED -#define Tcl_BadChannelOption_TCL_DECLARED -/* 78 */ -EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, - const char * optionName, - const char * optionList); -#endif -#ifndef Tcl_CallWhenDeleted_TCL_DECLARED -#define Tcl_CallWhenDeleted_TCL_DECLARED -/* 79 */ -EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CancelIdleCall_TCL_DECLARED -#define Tcl_CancelIdleCall_TCL_DECLARED -/* 80 */ -EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, - ClientData clientData); -#endif -#ifndef Tcl_Close_TCL_DECLARED -#define Tcl_Close_TCL_DECLARED -/* 81 */ -EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); -#endif -#ifndef Tcl_CommandComplete_TCL_DECLARED -#define Tcl_CommandComplete_TCL_DECLARED -/* 82 */ -EXTERN int Tcl_CommandComplete (const char * cmd); -#endif -#ifndef Tcl_Concat_TCL_DECLARED -#define Tcl_Concat_TCL_DECLARED -/* 83 */ -EXTERN char * Tcl_Concat (int argc, CONST84 char *const * argv); -#endif -#ifndef Tcl_ConvertElement_TCL_DECLARED -#define Tcl_ConvertElement_TCL_DECLARED -/* 84 */ -EXTERN int Tcl_ConvertElement (const char * src, char * dst, - int flags); -#endif -#ifndef Tcl_ConvertCountedElement_TCL_DECLARED -#define Tcl_ConvertCountedElement_TCL_DECLARED -/* 85 */ -EXTERN int Tcl_ConvertCountedElement (const char * src, - int length, char * dst, int flags); -#endif -#ifndef Tcl_CreateAlias_TCL_DECLARED -#define Tcl_CreateAlias_TCL_DECLARED -/* 86 */ -EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, - const char * slaveCmd, Tcl_Interp * target, - const char * targetCmd, int argc, - CONST84 char *const * argv); -#endif -#ifndef Tcl_CreateAliasObj_TCL_DECLARED -#define Tcl_CreateAliasObj_TCL_DECLARED -/* 87 */ -EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, - const char * slaveCmd, Tcl_Interp * target, - const char * targetCmd, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_CreateChannel_TCL_DECLARED -#define Tcl_CreateChannel_TCL_DECLARED -/* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel (const Tcl_ChannelType * typePtr, - const char * chanName, - ClientData instanceData, int mask); -#endif -#ifndef Tcl_CreateChannelHandler_TCL_DECLARED -#define Tcl_CreateChannelHandler_TCL_DECLARED -/* 89 */ -EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateCloseHandler_TCL_DECLARED -#define Tcl_CreateCloseHandler_TCL_DECLARED -/* 90 */ -EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateCommand_TCL_DECLARED -#define Tcl_CreateCommand_TCL_DECLARED -/* 91 */ -EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_CmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateEventSource_TCL_DECLARED -#define Tcl_CreateEventSource_TCL_DECLARED -/* 92 */ -EXTERN void Tcl_CreateEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_CreateExitHandler_TCL_DECLARED -#define Tcl_CreateExitHandler_TCL_DECLARED -/* 93 */ -EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_CreateInterp_TCL_DECLARED -#define Tcl_CreateInterp_TCL_DECLARED -/* 94 */ -EXTERN Tcl_Interp * Tcl_CreateInterp (void); -#endif -#ifndef Tcl_CreateMathFunc_TCL_DECLARED -#define Tcl_CreateMathFunc_TCL_DECLARED -/* 95 */ -EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, - const char * name, int numArgs, - Tcl_ValueType * argTypes, - Tcl_MathProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateObjCommand_TCL_DECLARED -#define Tcl_CreateObjCommand_TCL_DECLARED -/* 96 */ -EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_ObjCmdProc * proc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_CreateSlave_TCL_DECLARED -#define Tcl_CreateSlave_TCL_DECLARED -/* 97 */ -EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, - const char * slaveName, int isSafe); -#endif -#ifndef Tcl_CreateTimerHandler_TCL_DECLARED -#define Tcl_CreateTimerHandler_TCL_DECLARED -/* 98 */ -EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, - Tcl_TimerProc * proc, ClientData clientData); -#endif -#ifndef Tcl_CreateTrace_TCL_DECLARED -#define Tcl_CreateTrace_TCL_DECLARED -/* 99 */ -EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, - Tcl_CmdTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteAssocData_TCL_DECLARED -#define Tcl_DeleteAssocData_TCL_DECLARED -/* 100 */ -EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, - const char * name); -#endif -#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED -#define Tcl_DeleteChannelHandler_TCL_DECLARED -/* 101 */ -EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, - Tcl_ChannelProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED -#define Tcl_DeleteCloseHandler_TCL_DECLARED -/* 102 */ -EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); -#endif -#ifndef Tcl_DeleteCommand_TCL_DECLARED -#define Tcl_DeleteCommand_TCL_DECLARED -/* 103 */ -EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, - const char * cmdName); -#endif -#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED -#define Tcl_DeleteCommandFromToken_TCL_DECLARED -/* 104 */ -EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_DeleteEvents_TCL_DECLARED -#define Tcl_DeleteEvents_TCL_DECLARED -/* 105 */ -EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteEventSource_TCL_DECLARED -#define Tcl_DeleteEventSource_TCL_DECLARED -/* 106 */ -EXTERN void Tcl_DeleteEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteExitHandler_TCL_DECLARED -#define Tcl_DeleteExitHandler_TCL_DECLARED -/* 107 */ -EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteHashEntry_TCL_DECLARED -#define Tcl_DeleteHashEntry_TCL_DECLARED -/* 108 */ -EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); -#endif -#ifndef Tcl_DeleteHashTable_TCL_DECLARED -#define Tcl_DeleteHashTable_TCL_DECLARED -/* 109 */ -EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_DeleteInterp_TCL_DECLARED -#define Tcl_DeleteInterp_TCL_DECLARED -/* 110 */ -EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED -#define Tcl_DeleteTimerHandler_TCL_DECLARED -/* 112 */ -EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); -#endif -#ifndef Tcl_DeleteTrace_TCL_DECLARED -#define Tcl_DeleteTrace_TCL_DECLARED -/* 113 */ -EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, - Tcl_Trace trace); -#endif -#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED -#define Tcl_DontCallWhenDeleted_TCL_DECLARED -/* 114 */ -EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DoOneEvent_TCL_DECLARED -#define Tcl_DoOneEvent_TCL_DECLARED -/* 115 */ -EXTERN int Tcl_DoOneEvent (int flags); -#endif -#ifndef Tcl_DoWhenIdle_TCL_DECLARED -#define Tcl_DoWhenIdle_TCL_DECLARED -/* 116 */ -EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DStringAppend_TCL_DECLARED -#define Tcl_DStringAppend_TCL_DECLARED -/* 117 */ -EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, - const char * bytes, int length); -#endif -#ifndef Tcl_DStringAppendElement_TCL_DECLARED -#define Tcl_DStringAppendElement_TCL_DECLARED -/* 118 */ -EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, - const char * element); -#endif -#ifndef Tcl_DStringEndSublist_TCL_DECLARED -#define Tcl_DStringEndSublist_TCL_DECLARED -/* 119 */ -EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringFree_TCL_DECLARED -#define Tcl_DStringFree_TCL_DECLARED -/* 120 */ -EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringGetResult_TCL_DECLARED -#define Tcl_DStringGetResult_TCL_DECLARED -/* 121 */ -EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringInit_TCL_DECLARED -#define Tcl_DStringInit_TCL_DECLARED -/* 122 */ -EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringResult_TCL_DECLARED -#define Tcl_DStringResult_TCL_DECLARED -/* 123 */ -EXTERN void Tcl_DStringResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_DStringSetLength_TCL_DECLARED -#define Tcl_DStringSetLength_TCL_DECLARED -/* 124 */ -EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, - int length); -#endif -#ifndef Tcl_DStringStartSublist_TCL_DECLARED -#define Tcl_DStringStartSublist_TCL_DECLARED -/* 125 */ -EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); -#endif -#ifndef Tcl_Eof_TCL_DECLARED -#define Tcl_Eof_TCL_DECLARED -/* 126 */ -EXTERN int Tcl_Eof (Tcl_Channel chan); -#endif -#ifndef Tcl_ErrnoId_TCL_DECLARED -#define Tcl_ErrnoId_TCL_DECLARED -/* 127 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); -#endif -#ifndef Tcl_ErrnoMsg_TCL_DECLARED -#define Tcl_ErrnoMsg_TCL_DECLARED -/* 128 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); -#endif -#ifndef Tcl_Eval_TCL_DECLARED -#define Tcl_Eval_TCL_DECLARED -/* 129 */ -EXTERN int Tcl_Eval (Tcl_Interp * interp, const char * script); -#endif -#ifndef Tcl_EvalFile_TCL_DECLARED -#define Tcl_EvalFile_TCL_DECLARED -/* 130 */ -EXTERN int Tcl_EvalFile (Tcl_Interp * interp, - const char * fileName); -#endif -#ifndef Tcl_EvalObj_TCL_DECLARED -#define Tcl_EvalObj_TCL_DECLARED -/* 131 */ -EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_EventuallyFree_TCL_DECLARED -#define Tcl_EventuallyFree_TCL_DECLARED -/* 132 */ -EXTERN void Tcl_EventuallyFree (ClientData clientData, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_Exit_TCL_DECLARED -#define Tcl_Exit_TCL_DECLARED -/* 133 */ -EXTERN void Tcl_Exit (int status); -#endif -#ifndef Tcl_ExposeCommand_TCL_DECLARED -#define Tcl_ExposeCommand_TCL_DECLARED -/* 134 */ -EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, - const char * hiddenCmdToken, - const char * cmdName); -#endif -#ifndef Tcl_ExprBoolean_TCL_DECLARED -#define Tcl_ExprBoolean_TCL_DECLARED -/* 135 */ -EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, - const char * expr, int * ptr); -#endif -#ifndef Tcl_ExprBooleanObj_TCL_DECLARED -#define Tcl_ExprBooleanObj_TCL_DECLARED -/* 136 */ -EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * ptr); -#endif -#ifndef Tcl_ExprDouble_TCL_DECLARED -#define Tcl_ExprDouble_TCL_DECLARED -/* 137 */ -EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, - const char * expr, double * ptr); -#endif -#ifndef Tcl_ExprDoubleObj_TCL_DECLARED -#define Tcl_ExprDoubleObj_TCL_DECLARED -/* 138 */ -EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * ptr); -#endif -#ifndef Tcl_ExprLong_TCL_DECLARED -#define Tcl_ExprLong_TCL_DECLARED -/* 139 */ -EXTERN int Tcl_ExprLong (Tcl_Interp * interp, const char * expr, - long * ptr); -#endif -#ifndef Tcl_ExprLongObj_TCL_DECLARED -#define Tcl_ExprLongObj_TCL_DECLARED -/* 140 */ -EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * ptr); -#endif -#ifndef Tcl_ExprObj_TCL_DECLARED -#define Tcl_ExprObj_TCL_DECLARED -/* 141 */ -EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - Tcl_Obj ** resultPtrPtr); -#endif -#ifndef Tcl_ExprString_TCL_DECLARED -#define Tcl_ExprString_TCL_DECLARED -/* 142 */ -EXTERN int Tcl_ExprString (Tcl_Interp * interp, - const char * expr); -#endif -#ifndef Tcl_Finalize_TCL_DECLARED -#define Tcl_Finalize_TCL_DECLARED -/* 143 */ -EXTERN void Tcl_Finalize (void); -#endif -#ifndef Tcl_FindExecutable_TCL_DECLARED -#define Tcl_FindExecutable_TCL_DECLARED -/* 144 */ -EXTERN void Tcl_FindExecutable (const char * argv0); -#endif -#ifndef Tcl_FirstHashEntry_TCL_DECLARED -#define Tcl_FirstHashEntry_TCL_DECLARED -/* 145 */ -EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, - Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_Flush_TCL_DECLARED -#define Tcl_Flush_TCL_DECLARED -/* 146 */ -EXTERN int Tcl_Flush (Tcl_Channel chan); -#endif -#ifndef Tcl_FreeResult_TCL_DECLARED -#define Tcl_FreeResult_TCL_DECLARED -/* 147 */ -EXTERN void Tcl_FreeResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetAlias_TCL_DECLARED -#define Tcl_GetAlias_TCL_DECLARED -/* 148 */ -EXTERN int Tcl_GetAlias (Tcl_Interp * interp, - const char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_GetAliasObj_TCL_DECLARED -#define Tcl_GetAliasObj_TCL_DECLARED -/* 149 */ -EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, - const char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * objcPtr, - Tcl_Obj *** objv); -#endif -#ifndef Tcl_GetAssocData_TCL_DECLARED -#define Tcl_GetAssocData_TCL_DECLARED -/* 150 */ -EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, - const char * name, - Tcl_InterpDeleteProc ** procPtr); -#endif -#ifndef Tcl_GetChannel_TCL_DECLARED -#define Tcl_GetChannel_TCL_DECLARED -/* 151 */ -EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, - const char * chanName, int * modePtr); -#endif -#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED -#define Tcl_GetChannelBufferSize_TCL_DECLARED -/* 152 */ -EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelHandle_TCL_DECLARED -#define Tcl_GetChannelHandle_TCL_DECLARED -/* 153 */ -EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, - int direction, ClientData * handlePtr); -#endif -#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED -#define Tcl_GetChannelInstanceData_TCL_DECLARED -/* 154 */ -EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelMode_TCL_DECLARED -#define Tcl_GetChannelMode_TCL_DECLARED -/* 155 */ -EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelName_TCL_DECLARED -#define Tcl_GetChannelName_TCL_DECLARED -/* 156 */ -EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); -#endif -#ifndef Tcl_GetChannelOption_TCL_DECLARED -#define Tcl_GetChannelOption_TCL_DECLARED -/* 157 */ -EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, const char * optionName, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetChannelType_TCL_DECLARED -#define Tcl_GetChannelType_TCL_DECLARED -/* 158 */ -EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); -#endif -#ifndef Tcl_GetCommandInfo_TCL_DECLARED -#define Tcl_GetCommandInfo_TCL_DECLARED -/* 159 */ -EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, - const char * cmdName, Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_GetCommandName_TCL_DECLARED -#define Tcl_GetCommandName_TCL_DECLARED -/* 160 */ -EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, - Tcl_Command command); -#endif -#ifndef Tcl_GetErrno_TCL_DECLARED -#define Tcl_GetErrno_TCL_DECLARED -/* 161 */ -EXTERN int Tcl_GetErrno (void); -#endif -#ifndef Tcl_GetHostName_TCL_DECLARED -#define Tcl_GetHostName_TCL_DECLARED -/* 162 */ -EXTERN CONST84_RETURN char * Tcl_GetHostName (void); -#endif -#ifndef Tcl_GetInterpPath_TCL_DECLARED -#define Tcl_GetInterpPath_TCL_DECLARED -/* 163 */ -EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, - Tcl_Interp * slaveInterp); -#endif -#ifndef Tcl_GetMaster_TCL_DECLARED -#define Tcl_GetMaster_TCL_DECLARED -/* 164 */ -EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED -#define Tcl_GetNameOfExecutable_TCL_DECLARED -/* 165 */ -EXTERN const char * Tcl_GetNameOfExecutable (void); -#endif -#ifndef Tcl_GetObjResult_TCL_DECLARED -#define Tcl_GetObjResult_TCL_DECLARED -/* 166 */ -EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - const char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile_TCL_DECLARED -#define Tcl_GetOpenFile_TCL_DECLARED -/* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - const char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType_TCL_DECLARED -#define Tcl_GetPathType_TCL_DECLARED -/* 168 */ -EXTERN Tcl_PathType Tcl_GetPathType (const char * path); -#endif -#ifndef Tcl_Gets_TCL_DECLARED -#define Tcl_Gets_TCL_DECLARED -/* 169 */ -EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetsObj_TCL_DECLARED -#define Tcl_GetsObj_TCL_DECLARED -/* 170 */ -EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetServiceMode_TCL_DECLARED -#define Tcl_GetServiceMode_TCL_DECLARED -/* 171 */ -EXTERN int Tcl_GetServiceMode (void); -#endif -#ifndef Tcl_GetSlave_TCL_DECLARED -#define Tcl_GetSlave_TCL_DECLARED -/* 172 */ -EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, - const char * slaveName); -#endif -#ifndef Tcl_GetStdChannel_TCL_DECLARED -#define Tcl_GetStdChannel_TCL_DECLARED -/* 173 */ -EXTERN Tcl_Channel Tcl_GetStdChannel (int type); -#endif -#ifndef Tcl_GetStringResult_TCL_DECLARED -#define Tcl_GetStringResult_TCL_DECLARED -/* 174 */ -EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetVar_TCL_DECLARED -#define Tcl_GetVar_TCL_DECLARED -/* 175 */ -EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, - const char * varName, int flags); -#endif -#ifndef Tcl_GetVar2_TCL_DECLARED -#define Tcl_GetVar2_TCL_DECLARED -/* 176 */ -EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); -#endif -#ifndef Tcl_GlobalEval_TCL_DECLARED -#define Tcl_GlobalEval_TCL_DECLARED -/* 177 */ -EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, - const char * command); -#endif -#ifndef Tcl_GlobalEvalObj_TCL_DECLARED -#define Tcl_GlobalEvalObj_TCL_DECLARED -/* 178 */ -EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_HideCommand_TCL_DECLARED -#define Tcl_HideCommand_TCL_DECLARED -/* 179 */ -EXTERN int Tcl_HideCommand (Tcl_Interp * interp, - const char * cmdName, - const char * hiddenCmdToken); -#endif -#ifndef Tcl_Init_TCL_DECLARED -#define Tcl_Init_TCL_DECLARED -/* 180 */ -EXTERN int Tcl_Init (Tcl_Interp * interp); -#endif -#ifndef Tcl_InitHashTable_TCL_DECLARED -#define Tcl_InitHashTable_TCL_DECLARED -/* 181 */ -EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, - int keyType); -#endif -#ifndef Tcl_InputBlocked_TCL_DECLARED -#define Tcl_InputBlocked_TCL_DECLARED -/* 182 */ -EXTERN int Tcl_InputBlocked (Tcl_Channel chan); -#endif -#ifndef Tcl_InputBuffered_TCL_DECLARED -#define Tcl_InputBuffered_TCL_DECLARED -/* 183 */ -EXTERN int Tcl_InputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_InterpDeleted_TCL_DECLARED -#define Tcl_InterpDeleted_TCL_DECLARED -/* 184 */ -EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); -#endif -#ifndef Tcl_IsSafe_TCL_DECLARED -#define Tcl_IsSafe_TCL_DECLARED -/* 185 */ -EXTERN int Tcl_IsSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_JoinPath_TCL_DECLARED -#define Tcl_JoinPath_TCL_DECLARED -/* 186 */ -EXTERN char * Tcl_JoinPath (int argc, CONST84 char *const * argv, - Tcl_DString * resultPtr); -#endif -#ifndef Tcl_LinkVar_TCL_DECLARED -#define Tcl_LinkVar_TCL_DECLARED -/* 187 */ -EXTERN int Tcl_LinkVar (Tcl_Interp * interp, - const char * varName, char * addr, int type); -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel_TCL_DECLARED -#define Tcl_MakeFileChannel_TCL_DECLARED -/* 189 */ -EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); -#endif -#ifndef Tcl_MakeSafe_TCL_DECLARED -#define Tcl_MakeSafe_TCL_DECLARED -/* 190 */ -EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); -#endif -#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED -#define Tcl_MakeTcpClientChannel_TCL_DECLARED -/* 191 */ -EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); -#endif -#ifndef Tcl_Merge_TCL_DECLARED -#define Tcl_Merge_TCL_DECLARED -/* 192 */ -EXTERN char * Tcl_Merge (int argc, CONST84 char *const * argv); -#endif -#ifndef Tcl_NextHashEntry_TCL_DECLARED -#define Tcl_NextHashEntry_TCL_DECLARED -/* 193 */ -EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); -#endif -#ifndef Tcl_NotifyChannel_TCL_DECLARED -#define Tcl_NotifyChannel_TCL_DECLARED -/* 194 */ -EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); -#endif -#ifndef Tcl_ObjGetVar2_TCL_DECLARED -#define Tcl_ObjGetVar2_TCL_DECLARED -/* 195 */ -EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - int flags); -#endif -#ifndef Tcl_ObjSetVar2_TCL_DECLARED -#define Tcl_ObjSetVar2_TCL_DECLARED -/* 196 */ -EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - Tcl_Obj * newValuePtr, int flags); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel_TCL_DECLARED -#define Tcl_OpenFileChannel_TCL_DECLARED -/* 198 */ -EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, - const char * fileName, - const char * modeString, int permissions); -#endif -#ifndef Tcl_OpenTcpClient_TCL_DECLARED -#define Tcl_OpenTcpClient_TCL_DECLARED -/* 199 */ -EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, - const char * address, const char * myaddr, - int myport, int async); -#endif -#ifndef Tcl_OpenTcpServer_TCL_DECLARED -#define Tcl_OpenTcpServer_TCL_DECLARED -/* 200 */ -EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, - const char * host, - Tcl_TcpAcceptProc * acceptProc, - ClientData callbackData); -#endif -#ifndef Tcl_Preserve_TCL_DECLARED -#define Tcl_Preserve_TCL_DECLARED -/* 201 */ -EXTERN void Tcl_Preserve (ClientData data); -#endif -#ifndef Tcl_PrintDouble_TCL_DECLARED -#define Tcl_PrintDouble_TCL_DECLARED -/* 202 */ -EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, - char * dst); -#endif -#ifndef Tcl_PutEnv_TCL_DECLARED -#define Tcl_PutEnv_TCL_DECLARED -/* 203 */ -EXTERN int Tcl_PutEnv (const char * assignment); -#endif -#ifndef Tcl_PosixError_TCL_DECLARED -#define Tcl_PosixError_TCL_DECLARED -/* 204 */ -EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); -#endif -#ifndef Tcl_QueueEvent_TCL_DECLARED -#define Tcl_QueueEvent_TCL_DECLARED -/* 205 */ -EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, - Tcl_QueuePosition position); -#endif -#ifndef Tcl_Read_TCL_DECLARED -#define Tcl_Read_TCL_DECLARED -/* 206 */ -EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, - int toRead); -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval_TCL_DECLARED -#define Tcl_RecordAndEval_TCL_DECLARED -/* 208 */ -EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, - const char * cmd, int flags); -#endif -#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED -#define Tcl_RecordAndEvalObj_TCL_DECLARED -/* 209 */ -EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, - Tcl_Obj * cmdPtr, int flags); -#endif -#ifndef Tcl_RegisterChannel_TCL_DECLARED -#define Tcl_RegisterChannel_TCL_DECLARED -/* 210 */ -EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_RegisterObjType_TCL_DECLARED -#define Tcl_RegisterObjType_TCL_DECLARED -/* 211 */ -EXTERN void Tcl_RegisterObjType (const Tcl_ObjType * typePtr); -#endif -#ifndef Tcl_RegExpCompile_TCL_DECLARED -#define Tcl_RegExpCompile_TCL_DECLARED -/* 212 */ -EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, - const char * pattern); -#endif -#ifndef Tcl_RegExpExec_TCL_DECLARED -#define Tcl_RegExpExec_TCL_DECLARED -/* 213 */ -EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, - Tcl_RegExp regexp, const char * text, - const char * start); -#endif -#ifndef Tcl_RegExpMatch_TCL_DECLARED -#define Tcl_RegExpMatch_TCL_DECLARED -/* 214 */ -EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, - const char * text, const char * pattern); -#endif -#ifndef Tcl_RegExpRange_TCL_DECLARED -#define Tcl_RegExpRange_TCL_DECLARED -/* 215 */ -EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, - CONST84 char ** startPtr, - CONST84 char ** endPtr); -#endif -#ifndef Tcl_Release_TCL_DECLARED -#define Tcl_Release_TCL_DECLARED -/* 216 */ -EXTERN void Tcl_Release (ClientData clientData); -#endif -#ifndef Tcl_ResetResult_TCL_DECLARED -#define Tcl_ResetResult_TCL_DECLARED -/* 217 */ -EXTERN void Tcl_ResetResult (Tcl_Interp * interp); -#endif -#ifndef Tcl_ScanElement_TCL_DECLARED -#define Tcl_ScanElement_TCL_DECLARED -/* 218 */ -EXTERN int Tcl_ScanElement (const char * str, int * flagPtr); -#endif -#ifndef Tcl_ScanCountedElement_TCL_DECLARED -#define Tcl_ScanCountedElement_TCL_DECLARED -/* 219 */ -EXTERN int Tcl_ScanCountedElement (const char * str, int length, - int * flagPtr); -#endif -#ifndef Tcl_SeekOld_TCL_DECLARED -#define Tcl_SeekOld_TCL_DECLARED -/* 220 */ -EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); -#endif -#ifndef Tcl_ServiceAll_TCL_DECLARED -#define Tcl_ServiceAll_TCL_DECLARED -/* 221 */ -EXTERN int Tcl_ServiceAll (void); -#endif -#ifndef Tcl_ServiceEvent_TCL_DECLARED -#define Tcl_ServiceEvent_TCL_DECLARED -/* 222 */ -EXTERN int Tcl_ServiceEvent (int flags); -#endif -#ifndef Tcl_SetAssocData_TCL_DECLARED -#define Tcl_SetAssocData_TCL_DECLARED -/* 223 */ -EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, - const char * name, - Tcl_InterpDeleteProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED -#define Tcl_SetChannelBufferSize_TCL_DECLARED -/* 224 */ -EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); -#endif -#ifndef Tcl_SetChannelOption_TCL_DECLARED -#define Tcl_SetChannelOption_TCL_DECLARED -/* 225 */ -EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, const char * optionName, - const char * newValue); -#endif -#ifndef Tcl_SetCommandInfo_TCL_DECLARED -#define Tcl_SetCommandInfo_TCL_DECLARED -/* 226 */ -EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, - const char * cmdName, - const Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_SetErrno_TCL_DECLARED -#define Tcl_SetErrno_TCL_DECLARED -/* 227 */ -EXTERN void Tcl_SetErrno (int err); -#endif -#ifndef Tcl_SetErrorCode_TCL_DECLARED -#define Tcl_SetErrorCode_TCL_DECLARED -/* 228 */ -EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED -#define Tcl_SetMaxBlockTime_TCL_DECLARED -/* 229 */ -EXTERN void Tcl_SetMaxBlockTime (const Tcl_Time * timePtr); -#endif -#ifndef Tcl_SetPanicProc_TCL_DECLARED -#define Tcl_SetPanicProc_TCL_DECLARED -/* 230 */ -EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); -#endif -#ifndef Tcl_SetRecursionLimit_TCL_DECLARED -#define Tcl_SetRecursionLimit_TCL_DECLARED -/* 231 */ -EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, - int depth); -#endif -#ifndef Tcl_SetResult_TCL_DECLARED -#define Tcl_SetResult_TCL_DECLARED -/* 232 */ -EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, - Tcl_FreeProc * freeProc); -#endif -#ifndef Tcl_SetServiceMode_TCL_DECLARED -#define Tcl_SetServiceMode_TCL_DECLARED -/* 233 */ -EXTERN int Tcl_SetServiceMode (int mode); -#endif -#ifndef Tcl_SetObjErrorCode_TCL_DECLARED -#define Tcl_SetObjErrorCode_TCL_DECLARED -/* 234 */ -EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, - Tcl_Obj * errorObjPtr); -#endif -#ifndef Tcl_SetObjResult_TCL_DECLARED -#define Tcl_SetObjResult_TCL_DECLARED -/* 235 */ -EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr); -#endif -#ifndef Tcl_SetStdChannel_TCL_DECLARED -#define Tcl_SetStdChannel_TCL_DECLARED -/* 236 */ -EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); -#endif -#ifndef Tcl_SetVar_TCL_DECLARED -#define Tcl_SetVar_TCL_DECLARED -/* 237 */ -EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, - const char * varName, const char * newValue, - int flags); -#endif -#ifndef Tcl_SetVar2_TCL_DECLARED -#define Tcl_SetVar2_TCL_DECLARED -/* 238 */ -EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - const char * newValue, int flags); -#endif -#ifndef Tcl_SignalId_TCL_DECLARED -#define Tcl_SignalId_TCL_DECLARED -/* 239 */ -EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); -#endif -#ifndef Tcl_SignalMsg_TCL_DECLARED -#define Tcl_SignalMsg_TCL_DECLARED -/* 240 */ -EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); -#endif -#ifndef Tcl_SourceRCFile_TCL_DECLARED -#define Tcl_SourceRCFile_TCL_DECLARED -/* 241 */ -EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); -#endif -#ifndef Tcl_SplitList_TCL_DECLARED -#define Tcl_SplitList_TCL_DECLARED -/* 242 */ -EXTERN int Tcl_SplitList (Tcl_Interp * interp, - const char * listStr, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_SplitPath_TCL_DECLARED -#define Tcl_SplitPath_TCL_DECLARED -/* 243 */ -EXTERN void Tcl_SplitPath (const char * path, int * argcPtr, - CONST84 char *** argvPtr); -#endif -#ifndef Tcl_StaticPackage_TCL_DECLARED -#define Tcl_StaticPackage_TCL_DECLARED -/* 244 */ -EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, - const char * pkgName, - Tcl_PackageInitProc * initProc, - Tcl_PackageInitProc * safeInitProc); -#endif -#ifndef Tcl_StringMatch_TCL_DECLARED -#define Tcl_StringMatch_TCL_DECLARED -/* 245 */ -EXTERN int Tcl_StringMatch (const char * str, - const char * pattern); -#endif -#ifndef Tcl_TellOld_TCL_DECLARED -#define Tcl_TellOld_TCL_DECLARED -/* 246 */ -EXTERN int Tcl_TellOld (Tcl_Channel chan); -#endif -#ifndef Tcl_TraceVar_TCL_DECLARED -#define Tcl_TraceVar_TCL_DECLARED -/* 247 */ -EXTERN int Tcl_TraceVar (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TraceVar2_TCL_DECLARED -#define Tcl_TraceVar2_TCL_DECLARED -/* 248 */ -EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_TranslateFileName_TCL_DECLARED -#define Tcl_TranslateFileName_TCL_DECLARED -/* 249 */ -EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, - const char * name, Tcl_DString * bufferPtr); -#endif -#ifndef Tcl_Ungets_TCL_DECLARED -#define Tcl_Ungets_TCL_DECLARED -/* 250 */ -EXTERN int Tcl_Ungets (Tcl_Channel chan, const char * str, - int len, int atHead); -#endif -#ifndef Tcl_UnlinkVar_TCL_DECLARED -#define Tcl_UnlinkVar_TCL_DECLARED -/* 251 */ -EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, - const char * varName); -#endif -#ifndef Tcl_UnregisterChannel_TCL_DECLARED -#define Tcl_UnregisterChannel_TCL_DECLARED -/* 252 */ -EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_UnsetVar_TCL_DECLARED -#define Tcl_UnsetVar_TCL_DECLARED -/* 253 */ -EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, - const char * varName, int flags); -#endif -#ifndef Tcl_UnsetVar2_TCL_DECLARED -#define Tcl_UnsetVar2_TCL_DECLARED -/* 254 */ -EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); -#endif -#ifndef Tcl_UntraceVar_TCL_DECLARED -#define Tcl_UntraceVar_TCL_DECLARED -/* 255 */ -EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceVar2_TCL_DECLARED -#define Tcl_UntraceVar2_TCL_DECLARED -/* 256 */ -EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED -#define Tcl_UpdateLinkedVar_TCL_DECLARED -/* 257 */ -EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, - const char * varName); -#endif -#ifndef Tcl_UpVar_TCL_DECLARED -#define Tcl_UpVar_TCL_DECLARED -/* 258 */ -EXTERN int Tcl_UpVar (Tcl_Interp * interp, - const char * frameName, const char * varName, - const char * localName, int flags); -#endif -#ifndef Tcl_UpVar2_TCL_DECLARED -#define Tcl_UpVar2_TCL_DECLARED -/* 259 */ -EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, - const char * frameName, const char * part1, - const char * part2, const char * localName, - int flags); -#endif -#ifndef Tcl_VarEval_TCL_DECLARED -#define Tcl_VarEval_TCL_DECLARED -/* 260 */ -EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); -#endif -#ifndef Tcl_VarTraceInfo_TCL_DECLARED -#define Tcl_VarTraceInfo_TCL_DECLARED -/* 261 */ -EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_VarTraceInfo2_TCL_DECLARED -#define Tcl_VarTraceInfo2_TCL_DECLARED -/* 262 */ -EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_Write_TCL_DECLARED -#define Tcl_Write_TCL_DECLARED -/* 263 */ -EXTERN int Tcl_Write (Tcl_Channel chan, const char * s, - int slen); -#endif -#ifndef Tcl_WrongNumArgs_TCL_DECLARED -#define Tcl_WrongNumArgs_TCL_DECLARED -/* 264 */ -EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], const char * message); -#endif -#ifndef Tcl_DumpActiveMemory_TCL_DECLARED -#define Tcl_DumpActiveMemory_TCL_DECLARED -/* 265 */ -EXTERN int Tcl_DumpActiveMemory (const char * fileName); -#endif -#ifndef Tcl_ValidateAllMemory_TCL_DECLARED -#define Tcl_ValidateAllMemory_TCL_DECLARED -/* 266 */ -EXTERN void Tcl_ValidateAllMemory (const char * file, int line); -#endif -#ifndef Tcl_AppendResultVA_TCL_DECLARED -#define Tcl_AppendResultVA_TCL_DECLARED -/* 267 */ -EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED -#define Tcl_AppendStringsToObjVA_TCL_DECLARED -/* 268 */ -EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, - va_list argList); -#endif -#ifndef Tcl_HashStats_TCL_DECLARED -#define Tcl_HashStats_TCL_DECLARED -/* 269 */ -EXTERN char * Tcl_HashStats (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_ParseVar_TCL_DECLARED -#define Tcl_ParseVar_TCL_DECLARED -/* 270 */ -EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, - const char * start, CONST84 char ** termPtr); -#endif -#ifndef Tcl_PkgPresent_TCL_DECLARED -#define Tcl_PkgPresent_TCL_DECLARED -/* 271 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, - const char * name, const char * version, - int exact); -#endif -#ifndef Tcl_PkgPresentEx_TCL_DECLARED -#define Tcl_PkgPresentEx_TCL_DECLARED -/* 272 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, - const char * name, const char * version, - int exact, ClientData * clientDataPtr); -#endif -#ifndef Tcl_PkgProvide_TCL_DECLARED -#define Tcl_PkgProvide_TCL_DECLARED -/* 273 */ -EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, - const char * name, const char * version); -#endif -#ifndef Tcl_PkgRequire_TCL_DECLARED -#define Tcl_PkgRequire_TCL_DECLARED -/* 274 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, - const char * name, const char * version, - int exact); -#endif -#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED -#define Tcl_SetErrorCodeVA_TCL_DECLARED -/* 275 */ -EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, - va_list argList); -#endif -#ifndef Tcl_VarEvalVA_TCL_DECLARED -#define Tcl_VarEvalVA_TCL_DECLARED -/* 276 */ -EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); -#endif -#ifndef Tcl_WaitPid_TCL_DECLARED -#define Tcl_WaitPid_TCL_DECLARED -/* 277 */ -EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); -#endif -#ifndef Tcl_PanicVA_TCL_DECLARED -#define Tcl_PanicVA_TCL_DECLARED -/* 278 */ -EXTERN void Tcl_PanicVA (const char * format, va_list argList); -#endif -#ifndef Tcl_GetVersion_TCL_DECLARED -#define Tcl_GetVersion_TCL_DECLARED -/* 279 */ -EXTERN void Tcl_GetVersion (int * major, int * minor, - int * patchLevel, int * type); -#endif -#ifndef Tcl_InitMemory_TCL_DECLARED -#define Tcl_InitMemory_TCL_DECLARED -/* 280 */ -EXTERN void Tcl_InitMemory (Tcl_Interp * interp); -#endif -#ifndef Tcl_StackChannel_TCL_DECLARED -#define Tcl_StackChannel_TCL_DECLARED -/* 281 */ -EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, - const Tcl_ChannelType * typePtr, - ClientData instanceData, int mask, - Tcl_Channel prevChan); -#endif -#ifndef Tcl_UnstackChannel_TCL_DECLARED -#define Tcl_UnstackChannel_TCL_DECLARED -/* 282 */ -EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, - Tcl_Channel chan); -#endif -#ifndef Tcl_GetStackedChannel_TCL_DECLARED -#define Tcl_GetStackedChannel_TCL_DECLARED -/* 283 */ -EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_SetMainLoop_TCL_DECLARED -#define Tcl_SetMainLoop_TCL_DECLARED -/* 284 */ -EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj_TCL_DECLARED -#define Tcl_AppendObjToObj_TCL_DECLARED -/* 286 */ -EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, - Tcl_Obj * appendObjPtr); -#endif -#ifndef Tcl_CreateEncoding_TCL_DECLARED -#define Tcl_CreateEncoding_TCL_DECLARED -/* 287 */ -EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); -#endif -#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED -#define Tcl_CreateThreadExitHandler_TCL_DECLARED -/* 288 */ -EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED -#define Tcl_DeleteThreadExitHandler_TCL_DECLARED -/* 289 */ -EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_DiscardResult_TCL_DECLARED -#define Tcl_DiscardResult_TCL_DECLARED -/* 290 */ -EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_EvalEx_TCL_DECLARED -#define Tcl_EvalEx_TCL_DECLARED -/* 291 */ -EXTERN int Tcl_EvalEx (Tcl_Interp * interp, const char * script, - int numBytes, int flags); -#endif -#ifndef Tcl_EvalObjv_TCL_DECLARED -#define Tcl_EvalObjv_TCL_DECLARED -/* 292 */ -EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], int flags); -#endif -#ifndef Tcl_EvalObjEx_TCL_DECLARED -#define Tcl_EvalObjEx_TCL_DECLARED -/* 293 */ -EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_ExitThread_TCL_DECLARED -#define Tcl_ExitThread_TCL_DECLARED -/* 294 */ -EXTERN void Tcl_ExitThread (int status); -#endif -#ifndef Tcl_ExternalToUtf_TCL_DECLARED -#define Tcl_ExternalToUtf_TCL_DECLARED -/* 295 */ -EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, - Tcl_Encoding encoding, const char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED -#define Tcl_ExternalToUtfDString_TCL_DECLARED -/* 296 */ -EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, - const char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_FinalizeThread_TCL_DECLARED -#define Tcl_FinalizeThread_TCL_DECLARED -/* 297 */ -EXTERN void Tcl_FinalizeThread (void); -#endif -#ifndef Tcl_FinalizeNotifier_TCL_DECLARED -#define Tcl_FinalizeNotifier_TCL_DECLARED -/* 298 */ -EXTERN void Tcl_FinalizeNotifier (ClientData clientData); -#endif -#ifndef Tcl_FreeEncoding_TCL_DECLARED -#define Tcl_FreeEncoding_TCL_DECLARED -/* 299 */ -EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetCurrentThread_TCL_DECLARED -#define Tcl_GetCurrentThread_TCL_DECLARED -/* 300 */ -EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); -#endif -#ifndef Tcl_GetEncoding_TCL_DECLARED -#define Tcl_GetEncoding_TCL_DECLARED -/* 301 */ -EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, - const char * name); -#endif -#ifndef Tcl_GetEncodingName_TCL_DECLARED -#define Tcl_GetEncodingName_TCL_DECLARED -/* 302 */ -EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); -#endif -#ifndef Tcl_GetEncodingNames_TCL_DECLARED -#define Tcl_GetEncodingNames_TCL_DECLARED -/* 303 */ -EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED -#define Tcl_GetIndexFromObjStruct_TCL_DECLARED -/* 304 */ -EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, - Tcl_Obj * objPtr, const VOID * tablePtr, - int offset, const char * msg, int flags, - int * indexPtr); -#endif -#ifndef Tcl_GetThreadData_TCL_DECLARED -#define Tcl_GetThreadData_TCL_DECLARED -/* 305 */ -EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, - int size); -#endif -#ifndef Tcl_GetVar2Ex_TCL_DECLARED -#define Tcl_GetVar2Ex_TCL_DECLARED -/* 306 */ -EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); -#endif -#ifndef Tcl_InitNotifier_TCL_DECLARED -#define Tcl_InitNotifier_TCL_DECLARED -/* 307 */ -EXTERN ClientData Tcl_InitNotifier (void); -#endif -#ifndef Tcl_MutexLock_TCL_DECLARED -#define Tcl_MutexLock_TCL_DECLARED -/* 308 */ -EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_MutexUnlock_TCL_DECLARED -#define Tcl_MutexUnlock_TCL_DECLARED -/* 309 */ -EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); -#endif -#ifndef Tcl_ConditionNotify_TCL_DECLARED -#define Tcl_ConditionNotify_TCL_DECLARED -/* 310 */ -EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_ConditionWait_TCL_DECLARED -#define Tcl_ConditionWait_TCL_DECLARED -/* 311 */ -EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, - Tcl_Mutex * mutexPtr, - const Tcl_Time * timePtr); -#endif -#ifndef Tcl_NumUtfChars_TCL_DECLARED -#define Tcl_NumUtfChars_TCL_DECLARED -/* 312 */ -EXTERN int Tcl_NumUtfChars (const char * src, int length); -#endif -#ifndef Tcl_ReadChars_TCL_DECLARED -#define Tcl_ReadChars_TCL_DECLARED -/* 313 */ -EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, - int charsToRead, int appendFlag); -#endif -#ifndef Tcl_RestoreResult_TCL_DECLARED -#define Tcl_RestoreResult_TCL_DECLARED -/* 314 */ -EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SaveResult_TCL_DECLARED -#define Tcl_SaveResult_TCL_DECLARED -/* 315 */ -EXTERN void Tcl_SaveResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); -#endif -#ifndef Tcl_SetSystemEncoding_TCL_DECLARED -#define Tcl_SetSystemEncoding_TCL_DECLARED -/* 316 */ -EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, - const char * name); -#endif -#ifndef Tcl_SetVar2Ex_TCL_DECLARED -#define Tcl_SetVar2Ex_TCL_DECLARED -/* 317 */ -EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, - const char * part1, const char * part2, - Tcl_Obj * newValuePtr, int flags); -#endif -#ifndef Tcl_ThreadAlert_TCL_DECLARED -#define Tcl_ThreadAlert_TCL_DECLARED -/* 318 */ -EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); -#endif -#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED -#define Tcl_ThreadQueueEvent_TCL_DECLARED -/* 319 */ -EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, - Tcl_Event * evPtr, - Tcl_QueuePosition position); -#endif -#ifndef Tcl_UniCharAtIndex_TCL_DECLARED -#define Tcl_UniCharAtIndex_TCL_DECLARED -/* 320 */ -EXTERN Tcl_UniChar Tcl_UniCharAtIndex (const char * src, int index); -#endif -#ifndef Tcl_UniCharToLower_TCL_DECLARED -#define Tcl_UniCharToLower_TCL_DECLARED -/* 321 */ -EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); -#endif -#ifndef Tcl_UniCharToTitle_TCL_DECLARED -#define Tcl_UniCharToTitle_TCL_DECLARED -/* 322 */ -EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); -#endif -#ifndef Tcl_UniCharToUpper_TCL_DECLARED -#define Tcl_UniCharToUpper_TCL_DECLARED -/* 323 */ -EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); -#endif -#ifndef Tcl_UniCharToUtf_TCL_DECLARED -#define Tcl_UniCharToUtf_TCL_DECLARED -/* 324 */ -EXTERN int Tcl_UniCharToUtf (int ch, char * buf); -#endif -#ifndef Tcl_UtfAtIndex_TCL_DECLARED -#define Tcl_UtfAtIndex_TCL_DECLARED -/* 325 */ -EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (const char * src, int index); -#endif -#ifndef Tcl_UtfCharComplete_TCL_DECLARED -#define Tcl_UtfCharComplete_TCL_DECLARED -/* 326 */ -EXTERN int Tcl_UtfCharComplete (const char * src, int length); -#endif -#ifndef Tcl_UtfBackslash_TCL_DECLARED -#define Tcl_UtfBackslash_TCL_DECLARED -/* 327 */ -EXTERN int Tcl_UtfBackslash (const char * src, int * readPtr, - char * dst); -#endif -#ifndef Tcl_UtfFindFirst_TCL_DECLARED -#define Tcl_UtfFindFirst_TCL_DECLARED -/* 328 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (const char * src, int ch); -#endif -#ifndef Tcl_UtfFindLast_TCL_DECLARED -#define Tcl_UtfFindLast_TCL_DECLARED -/* 329 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindLast (const char * src, int ch); -#endif -#ifndef Tcl_UtfNext_TCL_DECLARED -#define Tcl_UtfNext_TCL_DECLARED -/* 330 */ -EXTERN CONST84_RETURN char * Tcl_UtfNext (const char * src); -#endif -#ifndef Tcl_UtfPrev_TCL_DECLARED -#define Tcl_UtfPrev_TCL_DECLARED -/* 331 */ -EXTERN CONST84_RETURN char * Tcl_UtfPrev (const char * src, - const char * start); -#endif -#ifndef Tcl_UtfToExternal_TCL_DECLARED -#define Tcl_UtfToExternal_TCL_DECLARED -/* 332 */ -EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, - Tcl_Encoding encoding, const char * src, - int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); -#endif -#ifndef Tcl_UtfToExternalDString_TCL_DECLARED -#define Tcl_UtfToExternalDString_TCL_DECLARED -/* 333 */ -EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, - const char * src, int srcLen, - Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToLower_TCL_DECLARED -#define Tcl_UtfToLower_TCL_DECLARED -/* 334 */ -EXTERN int Tcl_UtfToLower (char * src); -#endif -#ifndef Tcl_UtfToTitle_TCL_DECLARED -#define Tcl_UtfToTitle_TCL_DECLARED -/* 335 */ -EXTERN int Tcl_UtfToTitle (char * src); -#endif -#ifndef Tcl_UtfToUniChar_TCL_DECLARED -#define Tcl_UtfToUniChar_TCL_DECLARED -/* 336 */ -EXTERN int Tcl_UtfToUniChar (const char * src, - Tcl_UniChar * chPtr); -#endif -#ifndef Tcl_UtfToUpper_TCL_DECLARED -#define Tcl_UtfToUpper_TCL_DECLARED -/* 337 */ -EXTERN int Tcl_UtfToUpper (char * src); -#endif -#ifndef Tcl_WriteChars_TCL_DECLARED -#define Tcl_WriteChars_TCL_DECLARED -/* 338 */ -EXTERN int Tcl_WriteChars (Tcl_Channel chan, const char * src, - int srcLen); -#endif -#ifndef Tcl_WriteObj_TCL_DECLARED -#define Tcl_WriteObj_TCL_DECLARED -/* 339 */ -EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetString_TCL_DECLARED -#define Tcl_GetString_TCL_DECLARED -/* 340 */ -EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED -#define Tcl_GetDefaultEncodingDir_TCL_DECLARED -/* 341 */ -EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); -#endif -#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED -#define Tcl_SetDefaultEncodingDir_TCL_DECLARED -/* 342 */ -EXTERN void Tcl_SetDefaultEncodingDir (const char * path); -#endif -#ifndef Tcl_AlertNotifier_TCL_DECLARED -#define Tcl_AlertNotifier_TCL_DECLARED -/* 343 */ -EXTERN void Tcl_AlertNotifier (ClientData clientData); -#endif -#ifndef Tcl_ServiceModeHook_TCL_DECLARED -#define Tcl_ServiceModeHook_TCL_DECLARED -/* 344 */ -EXTERN void Tcl_ServiceModeHook (int mode); -#endif -#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED -#define Tcl_UniCharIsAlnum_TCL_DECLARED -/* 345 */ -EXTERN int Tcl_UniCharIsAlnum (int ch); -#endif -#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED -#define Tcl_UniCharIsAlpha_TCL_DECLARED -/* 346 */ -EXTERN int Tcl_UniCharIsAlpha (int ch); -#endif -#ifndef Tcl_UniCharIsDigit_TCL_DECLARED -#define Tcl_UniCharIsDigit_TCL_DECLARED -/* 347 */ -EXTERN int Tcl_UniCharIsDigit (int ch); -#endif -#ifndef Tcl_UniCharIsLower_TCL_DECLARED -#define Tcl_UniCharIsLower_TCL_DECLARED -/* 348 */ -EXTERN int Tcl_UniCharIsLower (int ch); -#endif -#ifndef Tcl_UniCharIsSpace_TCL_DECLARED -#define Tcl_UniCharIsSpace_TCL_DECLARED -/* 349 */ -EXTERN int Tcl_UniCharIsSpace (int ch); -#endif -#ifndef Tcl_UniCharIsUpper_TCL_DECLARED -#define Tcl_UniCharIsUpper_TCL_DECLARED -/* 350 */ -EXTERN int Tcl_UniCharIsUpper (int ch); -#endif -#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED -#define Tcl_UniCharIsWordChar_TCL_DECLARED -/* 351 */ -EXTERN int Tcl_UniCharIsWordChar (int ch); -#endif -#ifndef Tcl_UniCharLen_TCL_DECLARED -#define Tcl_UniCharLen_TCL_DECLARED -/* 352 */ -EXTERN int Tcl_UniCharLen (const Tcl_UniChar * uniStr); -#endif -#ifndef Tcl_UniCharNcmp_TCL_DECLARED -#define Tcl_UniCharNcmp_TCL_DECLARED -/* 353 */ -EXTERN int Tcl_UniCharNcmp (const Tcl_UniChar * ucs, - const Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED -#define Tcl_UniCharToUtfDString_TCL_DECLARED -/* 354 */ -EXTERN char * Tcl_UniCharToUtfDString (const Tcl_UniChar * uniStr, - int uniLength, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED -#define Tcl_UtfToUniCharDString_TCL_DECLARED -/* 355 */ -EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (const char * src, - int length, Tcl_DString * dsPtr); -#endif -#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED -#define Tcl_GetRegExpFromObj_TCL_DECLARED -/* 356 */ -EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, - Tcl_Obj * patObj, int flags); -#endif -#ifndef Tcl_EvalTokens_TCL_DECLARED -#define Tcl_EvalTokens_TCL_DECLARED -/* 357 */ -EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_FreeParse_TCL_DECLARED -#define Tcl_FreeParse_TCL_DECLARED -/* 358 */ -EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_LogCommandInfo_TCL_DECLARED -#define Tcl_LogCommandInfo_TCL_DECLARED -/* 359 */ -EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, - const char * script, const char * command, - int length); -#endif -#ifndef Tcl_ParseBraces_TCL_DECLARED -#define Tcl_ParseBraces_TCL_DECLARED -/* 360 */ -EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseCommand_TCL_DECLARED -#define Tcl_ParseCommand_TCL_DECLARED -/* 361 */ -EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, - const char * start, int numBytes, int nested, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseExpr_TCL_DECLARED -#define Tcl_ParseExpr_TCL_DECLARED -/* 362 */ -EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr); -#endif -#ifndef Tcl_ParseQuotedString_TCL_DECLARED -#define Tcl_ParseQuotedString_TCL_DECLARED -/* 363 */ -EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); -#endif -#ifndef Tcl_ParseVarName_TCL_DECLARED -#define Tcl_ParseVarName_TCL_DECLARED -/* 364 */ -EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append); -#endif -#ifndef Tcl_GetCwd_TCL_DECLARED -#define Tcl_GetCwd_TCL_DECLARED -/* 365 */ -EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); -#endif -#ifndef Tcl_Chdir_TCL_DECLARED -#define Tcl_Chdir_TCL_DECLARED -/* 366 */ -EXTERN int Tcl_Chdir (const char * dirName); -#endif -#ifndef Tcl_Access_TCL_DECLARED -#define Tcl_Access_TCL_DECLARED -/* 367 */ -EXTERN int Tcl_Access (const char * path, int mode); -#endif -#ifndef Tcl_Stat_TCL_DECLARED -#define Tcl_Stat_TCL_DECLARED -/* 368 */ -EXTERN int Tcl_Stat (const char * path, struct stat * bufPtr); -#endif -#ifndef Tcl_UtfNcmp_TCL_DECLARED -#define Tcl_UtfNcmp_TCL_DECLARED -/* 369 */ -EXTERN int Tcl_UtfNcmp (const char * s1, const char * s2, - unsigned long n); -#endif -#ifndef Tcl_UtfNcasecmp_TCL_DECLARED -#define Tcl_UtfNcasecmp_TCL_DECLARED -/* 370 */ -EXTERN int Tcl_UtfNcasecmp (const char * s1, const char * s2, - unsigned long n); -#endif -#ifndef Tcl_StringCaseMatch_TCL_DECLARED -#define Tcl_StringCaseMatch_TCL_DECLARED -/* 371 */ -EXTERN int Tcl_StringCaseMatch (const char * str, - const char * pattern, int nocase); -#endif -#ifndef Tcl_UniCharIsControl_TCL_DECLARED -#define Tcl_UniCharIsControl_TCL_DECLARED -/* 372 */ -EXTERN int Tcl_UniCharIsControl (int ch); -#endif -#ifndef Tcl_UniCharIsGraph_TCL_DECLARED -#define Tcl_UniCharIsGraph_TCL_DECLARED -/* 373 */ -EXTERN int Tcl_UniCharIsGraph (int ch); -#endif -#ifndef Tcl_UniCharIsPrint_TCL_DECLARED -#define Tcl_UniCharIsPrint_TCL_DECLARED -/* 374 */ -EXTERN int Tcl_UniCharIsPrint (int ch); -#endif -#ifndef Tcl_UniCharIsPunct_TCL_DECLARED -#define Tcl_UniCharIsPunct_TCL_DECLARED -/* 375 */ -EXTERN int Tcl_UniCharIsPunct (int ch); -#endif -#ifndef Tcl_RegExpExecObj_TCL_DECLARED -#define Tcl_RegExpExecObj_TCL_DECLARED -/* 376 */ -EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, - Tcl_RegExp regexp, Tcl_Obj * textObj, - int offset, int nmatches, int flags); -#endif -#ifndef Tcl_RegExpGetInfo_TCL_DECLARED -#define Tcl_RegExpGetInfo_TCL_DECLARED -/* 377 */ -EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, - Tcl_RegExpInfo * infoPtr); -#endif -#ifndef Tcl_NewUnicodeObj_TCL_DECLARED -#define Tcl_NewUnicodeObj_TCL_DECLARED -/* 378 */ -EXTERN Tcl_Obj * Tcl_NewUnicodeObj (const Tcl_UniChar * unicode, - int numChars); -#endif -#ifndef Tcl_SetUnicodeObj_TCL_DECLARED -#define Tcl_SetUnicodeObj_TCL_DECLARED -/* 379 */ -EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, - const Tcl_UniChar * unicode, int numChars); -#endif -#ifndef Tcl_GetCharLength_TCL_DECLARED -#define Tcl_GetCharLength_TCL_DECLARED -/* 380 */ -EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetUniChar_TCL_DECLARED -#define Tcl_GetUniChar_TCL_DECLARED -/* 381 */ -EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); -#endif -#ifndef Tcl_GetUnicode_TCL_DECLARED -#define Tcl_GetUnicode_TCL_DECLARED -/* 382 */ -EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetRange_TCL_DECLARED -#define Tcl_GetRange_TCL_DECLARED -/* 383 */ -EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); -#endif -#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED -#define Tcl_AppendUnicodeToObj_TCL_DECLARED -/* 384 */ -EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, - const Tcl_UniChar * unicode, int length); -#endif -#ifndef Tcl_RegExpMatchObj_TCL_DECLARED -#define Tcl_RegExpMatchObj_TCL_DECLARED -/* 385 */ -EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, - Tcl_Obj * textObj, Tcl_Obj * patternObj); -#endif -#ifndef Tcl_SetNotifier_TCL_DECLARED -#define Tcl_SetNotifier_TCL_DECLARED -/* 386 */ -EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); -#endif -#ifndef Tcl_GetAllocMutex_TCL_DECLARED -#define Tcl_GetAllocMutex_TCL_DECLARED -/* 387 */ -EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); -#endif -#ifndef Tcl_GetChannelNames_TCL_DECLARED -#define Tcl_GetChannelNames_TCL_DECLARED -/* 388 */ -EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED -#define Tcl_GetChannelNamesEx_TCL_DECLARED -/* 389 */ -EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, - const char * pattern); -#endif -#ifndef Tcl_ProcObjCmd_TCL_DECLARED -#define Tcl_ProcObjCmd_TCL_DECLARED -/* 390 */ -EXTERN int Tcl_ProcObjCmd (ClientData clientData, - Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_ConditionFinalize_TCL_DECLARED -#define Tcl_ConditionFinalize_TCL_DECLARED -/* 391 */ -EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); -#endif -#ifndef Tcl_MutexFinalize_TCL_DECLARED -#define Tcl_MutexFinalize_TCL_DECLARED -/* 392 */ -EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); -#endif -#ifndef Tcl_CreateThread_TCL_DECLARED -#define Tcl_CreateThread_TCL_DECLARED -/* 393 */ -EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, - Tcl_ThreadCreateProc proc, - ClientData clientData, int stackSize, - int flags); -#endif -#ifndef Tcl_ReadRaw_TCL_DECLARED -#define Tcl_ReadRaw_TCL_DECLARED -/* 394 */ -EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, - int bytesToRead); -#endif -#ifndef Tcl_WriteRaw_TCL_DECLARED -#define Tcl_WriteRaw_TCL_DECLARED -/* 395 */ -EXTERN int Tcl_WriteRaw (Tcl_Channel chan, const char * src, - int srcLen); -#endif -#ifndef Tcl_GetTopChannel_TCL_DECLARED -#define Tcl_GetTopChannel_TCL_DECLARED -/* 396 */ -EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelBuffered_TCL_DECLARED -#define Tcl_ChannelBuffered_TCL_DECLARED -/* 397 */ -EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelName_TCL_DECLARED -#define Tcl_ChannelName_TCL_DECLARED -/* 398 */ -EXTERN CONST84_RETURN char * Tcl_ChannelName ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelVersion_TCL_DECLARED -#define Tcl_ChannelVersion_TCL_DECLARED -/* 399 */ -EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED -#define Tcl_ChannelBlockModeProc_TCL_DECLARED -/* 400 */ -EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelCloseProc_TCL_DECLARED -#define Tcl_ChannelCloseProc_TCL_DECLARED -/* 401 */ -EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED -#define Tcl_ChannelClose2Proc_TCL_DECLARED -/* 402 */ -EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelInputProc_TCL_DECLARED -#define Tcl_ChannelInputProc_TCL_DECLARED -/* 403 */ -EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelOutputProc_TCL_DECLARED -#define Tcl_ChannelOutputProc_TCL_DECLARED -/* 404 */ -EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSeekProc_TCL_DECLARED -#define Tcl_ChannelSeekProc_TCL_DECLARED -/* 405 */ -EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED -#define Tcl_ChannelSetOptionProc_TCL_DECLARED -/* 406 */ -EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED -#define Tcl_ChannelGetOptionProc_TCL_DECLARED -/* 407 */ -EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelWatchProc_TCL_DECLARED -#define Tcl_ChannelWatchProc_TCL_DECLARED -/* 408 */ -EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED -#define Tcl_ChannelGetHandleProc_TCL_DECLARED -/* 409 */ -EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelFlushProc_TCL_DECLARED -#define Tcl_ChannelFlushProc_TCL_DECLARED -/* 410 */ -EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED -#define Tcl_ChannelHandlerProc_TCL_DECLARED -/* 411 */ -EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_JoinThread_TCL_DECLARED -#define Tcl_JoinThread_TCL_DECLARED -/* 412 */ -EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int * result); -#endif -#ifndef Tcl_IsChannelShared_TCL_DECLARED -#define Tcl_IsChannelShared_TCL_DECLARED -/* 413 */ -EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelRegistered_TCL_DECLARED -#define Tcl_IsChannelRegistered_TCL_DECLARED -/* 414 */ -EXTERN int Tcl_IsChannelRegistered (Tcl_Interp * interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_CutChannel_TCL_DECLARED -#define Tcl_CutChannel_TCL_DECLARED -/* 415 */ -EXTERN void Tcl_CutChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_SpliceChannel_TCL_DECLARED -#define Tcl_SpliceChannel_TCL_DECLARED -/* 416 */ -EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED -#define Tcl_ClearChannelHandlers_TCL_DECLARED -/* 417 */ -EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); -#endif -#ifndef Tcl_IsChannelExisting_TCL_DECLARED -#define Tcl_IsChannelExisting_TCL_DECLARED -/* 418 */ -EXTERN int Tcl_IsChannelExisting (const char * channelName); -#endif -#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED -#define Tcl_UniCharNcasecmp_TCL_DECLARED -/* 419 */ -EXTERN int Tcl_UniCharNcasecmp (const Tcl_UniChar * ucs, - const Tcl_UniChar * uct, - unsigned long numChars); -#endif -#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED -#define Tcl_UniCharCaseMatch_TCL_DECLARED -/* 420 */ -EXTERN int Tcl_UniCharCaseMatch (const Tcl_UniChar * uniStr, - const Tcl_UniChar * uniPattern, int nocase); -#endif -#ifndef Tcl_FindHashEntry_TCL_DECLARED -#define Tcl_FindHashEntry_TCL_DECLARED -/* 421 */ -EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, - const char * key); -#endif -#ifndef Tcl_CreateHashEntry_TCL_DECLARED -#define Tcl_CreateHashEntry_TCL_DECLARED -/* 422 */ -EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, - const char * key, int * newPtr); -#endif -#ifndef Tcl_InitCustomHashTable_TCL_DECLARED -#define Tcl_InitCustomHashTable_TCL_DECLARED -/* 423 */ -EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, - int keyType, const Tcl_HashKeyType * typePtr); -#endif -#ifndef Tcl_InitObjHashTable_TCL_DECLARED -#define Tcl_InitObjHashTable_TCL_DECLARED -/* 424 */ -EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); -#endif -#ifndef Tcl_CommandTraceInfo_TCL_DECLARED -#define Tcl_CommandTraceInfo_TCL_DECLARED -/* 425 */ -EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * procPtr, - ClientData prevClientData); -#endif -#ifndef Tcl_TraceCommand_TCL_DECLARED -#define Tcl_TraceCommand_TCL_DECLARED -/* 426 */ -EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_UntraceCommand_TCL_DECLARED -#define Tcl_UntraceCommand_TCL_DECLARED -/* 427 */ -EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * proc, - ClientData clientData); -#endif -#ifndef Tcl_AttemptAlloc_TCL_DECLARED -#define Tcl_AttemptAlloc_TCL_DECLARED -/* 428 */ -EXTERN char * Tcl_AttemptAlloc (unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED -#define Tcl_AttemptDbCkalloc_TCL_DECLARED -/* 429 */ -EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, - const char * file, int line); -#endif -#ifndef Tcl_AttemptRealloc_TCL_DECLARED -#define Tcl_AttemptRealloc_TCL_DECLARED -/* 430 */ -EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); -#endif -#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED -#define Tcl_AttemptDbCkrealloc_TCL_DECLARED -/* 431 */ -EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, - unsigned int size, const char * file, - int line); -#endif -#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED -#define Tcl_AttemptSetObjLength_TCL_DECLARED -/* 432 */ -EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, - int length); -#endif -#ifndef Tcl_GetChannelThread_TCL_DECLARED -#define Tcl_GetChannelThread_TCL_DECLARED -/* 433 */ -EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); -#endif -#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED -#define Tcl_GetUnicodeFromObj_TCL_DECLARED -/* 434 */ -EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, - int * lengthPtr); -#endif -#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED -#define Tcl_GetMathFuncInfo_TCL_DECLARED -/* 435 */ -EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, - const char * name, int * numArgsPtr, - Tcl_ValueType ** argTypesPtr, - Tcl_MathProc ** procPtr, - ClientData * clientDataPtr); -#endif -#ifndef Tcl_ListMathFuncs_TCL_DECLARED -#define Tcl_ListMathFuncs_TCL_DECLARED -/* 436 */ -EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, - const char * pattern); -#endif -#ifndef Tcl_SubstObj_TCL_DECLARED -#define Tcl_SubstObj_TCL_DECLARED -/* 437 */ -EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_DetachChannel_TCL_DECLARED -#define Tcl_DetachChannel_TCL_DECLARED -/* 438 */ -EXTERN int Tcl_DetachChannel (Tcl_Interp * interp, - Tcl_Channel channel); -#endif -#ifndef Tcl_IsStandardChannel_TCL_DECLARED -#define Tcl_IsStandardChannel_TCL_DECLARED -/* 439 */ -EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); -#endif -#ifndef Tcl_FSCopyFile_TCL_DECLARED -#define Tcl_FSCopyFile_TCL_DECLARED -/* 440 */ -EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSCopyDirectory_TCL_DECLARED -#define Tcl_FSCopyDirectory_TCL_DECLARED -/* 441 */ -EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSCreateDirectory_TCL_DECLARED -#define Tcl_FSCreateDirectory_TCL_DECLARED -/* 442 */ -EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSDeleteFile_TCL_DECLARED -#define Tcl_FSDeleteFile_TCL_DECLARED -/* 443 */ -EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSLoadFile_TCL_DECLARED -#define Tcl_FSLoadFile_TCL_DECLARED -/* 444 */ -EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, - Tcl_Obj * pathPtr, const char * sym1, - const char * sym2, - Tcl_PackageInitProc ** proc1Ptr, - Tcl_PackageInitProc ** proc2Ptr, - Tcl_LoadHandle * handlePtr, - Tcl_FSUnloadFileProc ** unloadProcPtr); -#endif -#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED -#define Tcl_FSMatchInDirectory_TCL_DECLARED -/* 445 */ -EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, - Tcl_Obj * result, Tcl_Obj * pathPtr, - const char * pattern, - Tcl_GlobTypeData * types); -#endif -#ifndef Tcl_FSLink_TCL_DECLARED -#define Tcl_FSLink_TCL_DECLARED -/* 446 */ -EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, - int linkAction); -#endif -#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED -#define Tcl_FSRemoveDirectory_TCL_DECLARED -/* 447 */ -EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); -#endif -#ifndef Tcl_FSRenameFile_TCL_DECLARED -#define Tcl_FSRenameFile_TCL_DECLARED -/* 448 */ -EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); -#endif -#ifndef Tcl_FSLstat_TCL_DECLARED -#define Tcl_FSLstat_TCL_DECLARED -/* 449 */ -EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSUtime_TCL_DECLARED -#define Tcl_FSUtime_TCL_DECLARED -/* 450 */ -EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, - struct utimbuf * tval); -#endif -#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED -#define Tcl_FSFileAttrsGet_TCL_DECLARED -/* 451 */ -EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED -#define Tcl_FSFileAttrsSet_TCL_DECLARED -/* 452 */ -EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED -#define Tcl_FSFileAttrStrings_TCL_DECLARED -/* 453 */ -EXTERN const char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, - Tcl_Obj ** objPtrRef); -#endif -#ifndef Tcl_FSStat_TCL_DECLARED -#define Tcl_FSStat_TCL_DECLARED -/* 454 */ -EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); -#endif -#ifndef Tcl_FSAccess_TCL_DECLARED -#define Tcl_FSAccess_TCL_DECLARED -/* 455 */ -EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); -#endif -#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED -#define Tcl_FSOpenFileChannel_TCL_DECLARED -/* 456 */ -EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, const char * modeString, - int permissions); -#endif -#ifndef Tcl_FSGetCwd_TCL_DECLARED -#define Tcl_FSGetCwd_TCL_DECLARED -/* 457 */ -EXTERN Tcl_Obj * Tcl_FSGetCwd (Tcl_Interp * interp); -#endif -#ifndef Tcl_FSChdir_TCL_DECLARED -#define Tcl_FSChdir_TCL_DECLARED -/* 458 */ -EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSConvertToPathType_TCL_DECLARED -#define Tcl_FSConvertToPathType_TCL_DECLARED -/* 459 */ -EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSJoinPath_TCL_DECLARED -#define Tcl_FSJoinPath_TCL_DECLARED -/* 460 */ -EXTERN Tcl_Obj * Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); -#endif -#ifndef Tcl_FSSplitPath_TCL_DECLARED -#define Tcl_FSSplitPath_TCL_DECLARED -/* 461 */ -EXTERN Tcl_Obj * Tcl_FSSplitPath (Tcl_Obj * pathPtr, int * lenPtr); -#endif -#ifndef Tcl_FSEqualPaths_TCL_DECLARED -#define Tcl_FSEqualPaths_TCL_DECLARED -/* 462 */ -EXTERN int Tcl_FSEqualPaths (Tcl_Obj * firstPtr, - Tcl_Obj * secondPtr); -#endif -#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED -#define Tcl_FSGetNormalizedPath_TCL_DECLARED -/* 463 */ -EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSJoinToPath_TCL_DECLARED -#define Tcl_FSJoinToPath_TCL_DECLARED -/* 464 */ -EXTERN Tcl_Obj * Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_FSGetInternalRep_TCL_DECLARED -#define Tcl_FSGetInternalRep_TCL_DECLARED -/* 465 */ -EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj * pathPtr, - const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED -#define Tcl_FSGetTranslatedPath_TCL_DECLARED -/* 466 */ -EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSEvalFile_TCL_DECLARED -#define Tcl_FSEvalFile_TCL_DECLARED -/* 467 */ -EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, - Tcl_Obj * fileName); -#endif -#ifndef Tcl_FSNewNativePath_TCL_DECLARED -#define Tcl_FSNewNativePath_TCL_DECLARED -/* 468 */ -EXTERN Tcl_Obj * Tcl_FSNewNativePath ( - const Tcl_Filesystem * fromFilesystem, - ClientData clientData); -#endif -#ifndef Tcl_FSGetNativePath_TCL_DECLARED -#define Tcl_FSGetNativePath_TCL_DECLARED -/* 469 */ -EXTERN const char * Tcl_FSGetNativePath (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED -#define Tcl_FSFileSystemInfo_TCL_DECLARED -/* 470 */ -EXTERN Tcl_Obj * Tcl_FSFileSystemInfo (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSPathSeparator_TCL_DECLARED -#define Tcl_FSPathSeparator_TCL_DECLARED -/* 471 */ -EXTERN Tcl_Obj * Tcl_FSPathSeparator (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSListVolumes_TCL_DECLARED -#define Tcl_FSListVolumes_TCL_DECLARED -/* 472 */ -EXTERN Tcl_Obj * Tcl_FSListVolumes (void); -#endif -#ifndef Tcl_FSRegister_TCL_DECLARED -#define Tcl_FSRegister_TCL_DECLARED -/* 473 */ -EXTERN int Tcl_FSRegister (ClientData clientData, - const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSUnregister_TCL_DECLARED -#define Tcl_FSUnregister_TCL_DECLARED -/* 474 */ -EXTERN int Tcl_FSUnregister (const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSData_TCL_DECLARED -#define Tcl_FSData_TCL_DECLARED -/* 475 */ -EXTERN ClientData Tcl_FSData (const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED -#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED -/* 476 */ -EXTERN const char * Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED -#define Tcl_FSGetFileSystemForPath_TCL_DECLARED -/* 477 */ -EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath ( - Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_FSGetPathType_TCL_DECLARED -#define Tcl_FSGetPathType_TCL_DECLARED -/* 478 */ -EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); -#endif -#ifndef Tcl_OutputBuffered_TCL_DECLARED -#define Tcl_OutputBuffered_TCL_DECLARED -/* 479 */ -EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); -#endif -#ifndef Tcl_FSMountsChanged_TCL_DECLARED -#define Tcl_FSMountsChanged_TCL_DECLARED -/* 480 */ -EXTERN void Tcl_FSMountsChanged (const Tcl_Filesystem * fsPtr); -#endif -#ifndef Tcl_EvalTokensStandard_TCL_DECLARED -#define Tcl_EvalTokensStandard_TCL_DECLARED -/* 481 */ -EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); -#endif -#ifndef Tcl_GetTime_TCL_DECLARED -#define Tcl_GetTime_TCL_DECLARED -/* 482 */ -EXTERN void Tcl_GetTime (Tcl_Time * timeBuf); -#endif -#ifndef Tcl_CreateObjTrace_TCL_DECLARED -#define Tcl_CreateObjTrace_TCL_DECLARED -/* 483 */ -EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp * interp, int level, - int flags, Tcl_CmdObjTraceProc * objProc, - ClientData clientData, - Tcl_CmdObjTraceDeleteProc * delProc); -#endif -#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED -#define Tcl_GetCommandInfoFromToken_TCL_DECLARED -/* 484 */ -EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, - Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED -#define Tcl_SetCommandInfoFromToken_TCL_DECLARED -/* 485 */ -EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, - const Tcl_CmdInfo * infoPtr); -#endif -#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED -#define Tcl_DbNewWideIntObj_TCL_DECLARED -/* 486 */ -EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, - const char * file, int line); -#endif -#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED -#define Tcl_GetWideIntFromObj_TCL_DECLARED -/* 487 */ -EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_WideInt * widePtr); -#endif -#ifndef Tcl_NewWideIntObj_TCL_DECLARED -#define Tcl_NewWideIntObj_TCL_DECLARED -/* 488 */ -EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); -#endif -#ifndef Tcl_SetWideIntObj_TCL_DECLARED -#define Tcl_SetWideIntObj_TCL_DECLARED -/* 489 */ -EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, - Tcl_WideInt wideValue); -#endif -#ifndef Tcl_AllocStatBuf_TCL_DECLARED -#define Tcl_AllocStatBuf_TCL_DECLARED -/* 490 */ -EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); -#endif -#ifndef Tcl_Seek_TCL_DECLARED -#define Tcl_Seek_TCL_DECLARED -/* 491 */ -EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, - int mode); -#endif -#ifndef Tcl_Tell_TCL_DECLARED -#define Tcl_Tell_TCL_DECLARED -/* 492 */ -EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); -#endif -#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED -#define Tcl_ChannelWideSeekProc_TCL_DECLARED -/* 493 */ -EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_DictObjPut_TCL_DECLARED -#define Tcl_DictObjPut_TCL_DECLARED -/* 494 */ -EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjGet_TCL_DECLARED -#define Tcl_DictObjGet_TCL_DECLARED -/* 495 */ -EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj ** valuePtrPtr); -#endif -#ifndef Tcl_DictObjRemove_TCL_DECLARED -#define Tcl_DictObjRemove_TCL_DECLARED -/* 496 */ -EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); -#endif -#ifndef Tcl_DictObjSize_TCL_DECLARED -#define Tcl_DictObjSize_TCL_DECLARED -/* 497 */ -EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int * sizePtr); -#endif -#ifndef Tcl_DictObjFirst_TCL_DECLARED -#define Tcl_DictObjFirst_TCL_DECLARED -/* 498 */ -EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, - Tcl_Obj * dictPtr, - Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjNext_TCL_DECLARED -#define Tcl_DictObjNext_TCL_DECLARED -/* 499 */ -EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); -#endif -#ifndef Tcl_DictObjDone_TCL_DECLARED -#define Tcl_DictObjDone_TCL_DECLARED -/* 500 */ -EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); -#endif -#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED -#define Tcl_DictObjPutKeyList_TCL_DECLARED -/* 501 */ -EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); -#endif -#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED -#define Tcl_DictObjRemoveKeyList_TCL_DECLARED -/* 502 */ -EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *const * keyv); -#endif -#ifndef Tcl_NewDictObj_TCL_DECLARED -#define Tcl_NewDictObj_TCL_DECLARED -/* 503 */ -EXTERN Tcl_Obj * Tcl_NewDictObj (void); -#endif -#ifndef Tcl_DbNewDictObj_TCL_DECLARED -#define Tcl_DbNewDictObj_TCL_DECLARED -/* 504 */ -EXTERN Tcl_Obj * Tcl_DbNewDictObj (const char * file, int line); -#endif -#ifndef Tcl_RegisterConfig_TCL_DECLARED -#define Tcl_RegisterConfig_TCL_DECLARED -/* 505 */ -EXTERN void Tcl_RegisterConfig (Tcl_Interp * interp, - const char * pkgName, - const Tcl_Config * configuration, - const char * valEncoding); -#endif -#ifndef Tcl_CreateNamespace_TCL_DECLARED -#define Tcl_CreateNamespace_TCL_DECLARED -/* 506 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - const char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); -#endif -#ifndef Tcl_DeleteNamespace_TCL_DECLARED -#define Tcl_DeleteNamespace_TCL_DECLARED -/* 507 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_AppendExportList_TCL_DECLARED -#define Tcl_AppendExportList_TCL_DECLARED -/* 508 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_Export_TCL_DECLARED -#define Tcl_Export_TCL_DECLARED -/* 509 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int resetListFirst); -#endif -#ifndef Tcl_Import_TCL_DECLARED -#define Tcl_Import_TCL_DECLARED -/* 510 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int allowOverwrite); -#endif -#ifndef Tcl_ForgetImport_TCL_DECLARED -#define Tcl_ForgetImport_TCL_DECLARED -/* 511 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern); -#endif -#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED -#define Tcl_GetCurrentNamespace_TCL_DECLARED -/* 512 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED -#define Tcl_GetGlobalNamespace_TCL_DECLARED -/* 513 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); -#endif -#ifndef Tcl_FindNamespace_TCL_DECLARED -#define Tcl_FindNamespace_TCL_DECLARED -/* 514 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_FindCommand_TCL_DECLARED -#define Tcl_FindCommand_TCL_DECLARED -/* 515 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); -#endif -#ifndef Tcl_GetCommandFromObj_TCL_DECLARED -#define Tcl_GetCommandFromObj_TCL_DECLARED -/* 516 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_GetCommandFullName_TCL_DECLARED -#define Tcl_GetCommandFullName_TCL_DECLARED -/* 517 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); -#endif -#ifndef Tcl_FSEvalFileEx_TCL_DECLARED -#define Tcl_FSEvalFileEx_TCL_DECLARED -/* 518 */ -EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, - Tcl_Obj * fileName, - const char * encodingName); -#endif -#ifndef Tcl_SetExitProc_TCL_DECLARED -#define Tcl_SetExitProc_TCL_DECLARED -/* 519 */ -EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); -#endif -#ifndef Tcl_LimitAddHandler_TCL_DECLARED -#define Tcl_LimitAddHandler_TCL_DECLARED -/* 520 */ -EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, - Tcl_LimitHandlerProc * handlerProc, - ClientData clientData, - Tcl_LimitHandlerDeleteProc * deleteProc); -#endif -#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED -#define Tcl_LimitRemoveHandler_TCL_DECLARED -/* 521 */ -EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, - int type, Tcl_LimitHandlerProc * handlerProc, - ClientData clientData); -#endif -#ifndef Tcl_LimitReady_TCL_DECLARED -#define Tcl_LimitReady_TCL_DECLARED -/* 522 */ -EXTERN int Tcl_LimitReady (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitCheck_TCL_DECLARED -#define Tcl_LimitCheck_TCL_DECLARED -/* 523 */ -EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitExceeded_TCL_DECLARED -#define Tcl_LimitExceeded_TCL_DECLARED -/* 524 */ -EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitSetCommands_TCL_DECLARED -#define Tcl_LimitSetCommands_TCL_DECLARED -/* 525 */ -EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, - int commandLimit); -#endif -#ifndef Tcl_LimitSetTime_TCL_DECLARED -#define Tcl_LimitSetTime_TCL_DECLARED -/* 526 */ -EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitSetGranularity_TCL_DECLARED -#define Tcl_LimitSetGranularity_TCL_DECLARED -/* 527 */ -EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, - int type, int granularity); -#endif -#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED -#define Tcl_LimitTypeEnabled_TCL_DECLARED -/* 528 */ -EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED -#define Tcl_LimitTypeExceeded_TCL_DECLARED -/* 529 */ -EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeSet_TCL_DECLARED -#define Tcl_LimitTypeSet_TCL_DECLARED -/* 530 */ -EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitTypeReset_TCL_DECLARED -#define Tcl_LimitTypeReset_TCL_DECLARED -/* 531 */ -EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); -#endif -#ifndef Tcl_LimitGetCommands_TCL_DECLARED -#define Tcl_LimitGetCommands_TCL_DECLARED -/* 532 */ -EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); -#endif -#ifndef Tcl_LimitGetTime_TCL_DECLARED -#define Tcl_LimitGetTime_TCL_DECLARED -/* 533 */ -EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); -#endif -#ifndef Tcl_LimitGetGranularity_TCL_DECLARED -#define Tcl_LimitGetGranularity_TCL_DECLARED -/* 534 */ -EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, - int type); -#endif -#ifndef Tcl_SaveInterpState_TCL_DECLARED -#define Tcl_SaveInterpState_TCL_DECLARED -/* 535 */ -EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); -#endif -#ifndef Tcl_RestoreInterpState_TCL_DECLARED -#define Tcl_RestoreInterpState_TCL_DECLARED -/* 536 */ -EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, - Tcl_InterpState state); -#endif -#ifndef Tcl_DiscardInterpState_TCL_DECLARED -#define Tcl_DiscardInterpState_TCL_DECLARED -/* 537 */ -EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); -#endif -#ifndef Tcl_SetReturnOptions_TCL_DECLARED -#define Tcl_SetReturnOptions_TCL_DECLARED -/* 538 */ -EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, - Tcl_Obj * options); -#endif -#ifndef Tcl_GetReturnOptions_TCL_DECLARED -#define Tcl_GetReturnOptions_TCL_DECLARED -/* 539 */ -EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, - int result); -#endif -#ifndef Tcl_IsEnsemble_TCL_DECLARED -#define Tcl_IsEnsemble_TCL_DECLARED -/* 540 */ -EXTERN int Tcl_IsEnsemble (Tcl_Command token); -#endif -#ifndef Tcl_CreateEnsemble_TCL_DECLARED -#define Tcl_CreateEnsemble_TCL_DECLARED -/* 541 */ -EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * namespacePtr, int flags); -#endif -#ifndef Tcl_FindEnsemble_TCL_DECLARED -#define Tcl_FindEnsemble_TCL_DECLARED -/* 542 */ -EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, - Tcl_Obj * cmdNameObj, int flags); -#endif -#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED -/* 543 */ -EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * subcmdList); -#endif -#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED -#define Tcl_SetEnsembleMappingDict_TCL_DECLARED -/* 544 */ -EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * mapDict); -#endif -#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED -/* 545 */ -EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * unknownList); -#endif -#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED -#define Tcl_SetEnsembleFlags_TCL_DECLARED -/* 546 */ -EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int flags); -#endif -#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED -#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED -/* 547 */ -EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** subcmdListPtr); -#endif -#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED -#define Tcl_GetEnsembleMappingDict_TCL_DECLARED -/* 548 */ -EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** mapDictPtr); -#endif -#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED -/* 549 */ -EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** unknownListPtr); -#endif -#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED -#define Tcl_GetEnsembleFlags_TCL_DECLARED -/* 550 */ -EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int * flagsPtr); -#endif -#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED -#define Tcl_GetEnsembleNamespace_TCL_DECLARED -/* 551 */ -EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, - Tcl_Command token, - Tcl_Namespace ** namespacePtrPtr); -#endif -#ifndef Tcl_SetTimeProc_TCL_DECLARED -#define Tcl_SetTimeProc_TCL_DECLARED -/* 552 */ -EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc * getProc, - Tcl_ScaleTimeProc * scaleProc, - ClientData clientData); -#endif -#ifndef Tcl_QueryTimeProc_TCL_DECLARED -#define Tcl_QueryTimeProc_TCL_DECLARED -/* 553 */ -EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc ** getProc, - Tcl_ScaleTimeProc ** scaleProc, - ClientData * clientData); -#endif -#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED -#define Tcl_ChannelThreadActionProc_TCL_DECLARED -/* 554 */ -EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_NewBignumObj_TCL_DECLARED -#define Tcl_NewBignumObj_TCL_DECLARED -/* 555 */ -EXTERN Tcl_Obj * Tcl_NewBignumObj (mp_int * value); -#endif -#ifndef Tcl_DbNewBignumObj_TCL_DECLARED -#define Tcl_DbNewBignumObj_TCL_DECLARED -/* 556 */ -EXTERN Tcl_Obj * Tcl_DbNewBignumObj (mp_int * value, - const char * file, int line); -#endif -#ifndef Tcl_SetBignumObj_TCL_DECLARED -#define Tcl_SetBignumObj_TCL_DECLARED -/* 557 */ -EXTERN void Tcl_SetBignumObj (Tcl_Obj * obj, mp_int * value); -#endif -#ifndef Tcl_GetBignumFromObj_TCL_DECLARED -#define Tcl_GetBignumFromObj_TCL_DECLARED -/* 558 */ -EXTERN int Tcl_GetBignumFromObj (Tcl_Interp * interp, - Tcl_Obj * obj, mp_int * value); -#endif -#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED -#define Tcl_TakeBignumFromObj_TCL_DECLARED -/* 559 */ -EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp * interp, - Tcl_Obj * obj, mp_int * value); -#endif -#ifndef Tcl_TruncateChannel_TCL_DECLARED -#define Tcl_TruncateChannel_TCL_DECLARED -/* 560 */ -EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, - Tcl_WideInt length); -#endif -#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED -#define Tcl_ChannelTruncateProc_TCL_DECLARED -/* 561 */ -EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( - const Tcl_ChannelType * chanTypePtr); -#endif -#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED -#define Tcl_SetChannelErrorInterp_TCL_DECLARED -/* 562 */ -EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp * interp, - Tcl_Obj * msg); -#endif -#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED -#define Tcl_GetChannelErrorInterp_TCL_DECLARED -/* 563 */ -EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp * interp, - Tcl_Obj ** msg); -#endif -#ifndef Tcl_SetChannelError_TCL_DECLARED -#define Tcl_SetChannelError_TCL_DECLARED -/* 564 */ -EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj * msg); -#endif -#ifndef Tcl_GetChannelError_TCL_DECLARED -#define Tcl_GetChannelError_TCL_DECLARED -/* 565 */ -EXTERN void Tcl_GetChannelError (Tcl_Channel chan, - Tcl_Obj ** msg); -#endif -#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED -#define Tcl_InitBignumFromDouble_TCL_DECLARED -/* 566 */ -EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp * interp, - double initval, mp_int * toInit); -#endif -#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED -/* 567 */ -EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr); -#endif -#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED -/* 568 */ -EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); -#endif -#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED -#define Tcl_GetEncodingFromObj_TCL_DECLARED -/* 569 */ -EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); -#endif -#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED -#define Tcl_GetEncodingSearchPath_TCL_DECLARED -/* 570 */ -EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath (void); -#endif -#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED -#define Tcl_SetEncodingSearchPath_TCL_DECLARED -/* 571 */ -EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj * searchPath); -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED -/* 572 */ -EXTERN const char * Tcl_GetEncodingNameFromEnvironment ( - Tcl_DString * bufPtr); -#endif -#ifndef Tcl_PkgRequireProc_TCL_DECLARED -#define Tcl_PkgRequireProc_TCL_DECLARED -/* 573 */ -EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, - const char * name, int objc, - Tcl_Obj *const objv[], - ClientData * clientDataPtr); -#endif -#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED -#define Tcl_AppendObjToErrorInfo_TCL_DECLARED -/* 574 */ -EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, - Tcl_Obj * objPtr); -#endif -#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED -#define Tcl_AppendLimitedToObj_TCL_DECLARED -/* 575 */ -EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, - const char * bytes, int length, int limit, - const char * ellipsis); -#endif -#ifndef Tcl_Format_TCL_DECLARED -#define Tcl_Format_TCL_DECLARED -/* 576 */ -EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, const char * format, - int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_AppendFormatToObj_TCL_DECLARED -#define Tcl_AppendFormatToObj_TCL_DECLARED -/* 577 */ -EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, const char * format, - int objc, Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_ObjPrintf_TCL_DECLARED -#define Tcl_ObjPrintf_TCL_DECLARED -/* 578 */ -EXTERN Tcl_Obj * Tcl_ObjPrintf (const char * format, ...); -#endif -#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED -#define Tcl_AppendPrintfToObj_TCL_DECLARED -/* 579 */ -EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, - const char * format, ...); -#endif -#ifndef Tcl_CancelEval_TCL_DECLARED -#define Tcl_CancelEval_TCL_DECLARED -/* 580 */ -EXTERN int Tcl_CancelEval (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr, - ClientData clientData, int flags); -#endif -#ifndef Tcl_Canceled_TCL_DECLARED -#define Tcl_Canceled_TCL_DECLARED -/* 581 */ -EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); -#endif -#ifndef Tcl_CreatePipe_TCL_DECLARED -#define Tcl_CreatePipe_TCL_DECLARED -/* 582 */ -EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, - Tcl_Channel * rchan, Tcl_Channel * wchan, - int flags); -#endif -#ifndef Tcl_NRCreateCommand_TCL_DECLARED -#define Tcl_NRCreateCommand_TCL_DECLARED -/* 583 */ -EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_ObjCmdProc * proc, - Tcl_ObjCmdProc * nreProc, - ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); -#endif -#ifndef Tcl_NREvalObj_TCL_DECLARED -#define Tcl_NREvalObj_TCL_DECLARED -/* 584 */ -EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags); -#endif -#ifndef Tcl_NREvalObjv_TCL_DECLARED -#define Tcl_NREvalObjv_TCL_DECLARED -/* 585 */ -EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], int flags); -#endif -#ifndef Tcl_NRCmdSwap_TCL_DECLARED -#define Tcl_NRCmdSwap_TCL_DECLARED -/* 586 */ -EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, - int objc, Tcl_Obj *const objv[], int flags); -#endif -#ifndef Tcl_NRAddCallback_TCL_DECLARED -#define Tcl_NRAddCallback_TCL_DECLARED -/* 587 */ -EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, - Tcl_NRPostProc * postProcPtr, - ClientData data0, ClientData data1, - ClientData data2, ClientData data3); -#endif -#ifndef Tcl_NRCallObjProc_TCL_DECLARED -#define Tcl_NRCallObjProc_TCL_DECLARED -/* 588 */ -EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, - Tcl_ObjCmdProc * objProc, - ClientData clientData, int objc, - Tcl_Obj *const objv[]); -#endif -#ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED -#define Tcl_GetFSDeviceFromStat_TCL_DECLARED -/* 589 */ -EXTERN unsigned Tcl_GetFSDeviceFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetFSInodeFromStat_TCL_DECLARED -#define Tcl_GetFSInodeFromStat_TCL_DECLARED -/* 590 */ -EXTERN unsigned Tcl_GetFSInodeFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetModeFromStat_TCL_DECLARED -#define Tcl_GetModeFromStat_TCL_DECLARED -/* 591 */ -EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetLinkCountFromStat_TCL_DECLARED -#define Tcl_GetLinkCountFromStat_TCL_DECLARED -/* 592 */ -EXTERN int Tcl_GetLinkCountFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetUserIdFromStat_TCL_DECLARED -#define Tcl_GetUserIdFromStat_TCL_DECLARED -/* 593 */ -EXTERN int Tcl_GetUserIdFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetGroupIdFromStat_TCL_DECLARED -#define Tcl_GetGroupIdFromStat_TCL_DECLARED -/* 594 */ -EXTERN int Tcl_GetGroupIdFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetDeviceTypeFromStat_TCL_DECLARED -#define Tcl_GetDeviceTypeFromStat_TCL_DECLARED -/* 595 */ -EXTERN int Tcl_GetDeviceTypeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetAccessTimeFromStat_TCL_DECLARED -#define Tcl_GetAccessTimeFromStat_TCL_DECLARED -/* 596 */ -EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetModificationTimeFromStat_TCL_DECLARED -#define Tcl_GetModificationTimeFromStat_TCL_DECLARED -/* 597 */ -EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetChangeTimeFromStat_TCL_DECLARED -#define Tcl_GetChangeTimeFromStat_TCL_DECLARED -/* 598 */ -EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetSizeFromStat_TCL_DECLARED -#define Tcl_GetSizeFromStat_TCL_DECLARED -/* 599 */ -EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetBlocksFromStat_TCL_DECLARED -#define Tcl_GetBlocksFromStat_TCL_DECLARED -/* 600 */ -EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat (const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_GetBlockSizeFromStat_TCL_DECLARED -#define Tcl_GetBlockSizeFromStat_TCL_DECLARED -/* 601 */ -EXTERN unsigned Tcl_GetBlockSizeFromStat ( - const Tcl_StatBuf * statPtr); -#endif -#ifndef Tcl_SetEnsembleParameterList_TCL_DECLARED -#define Tcl_SetEnsembleParameterList_TCL_DECLARED -/* 602 */ -EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * paramList); -#endif -#ifndef Tcl_GetEnsembleParameterList_TCL_DECLARED -#define Tcl_GetEnsembleParameterList_TCL_DECLARED -/* 603 */ -EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** paramListPtr); -#endif -#ifndef Tcl_ParseArgsObjv_TCL_DECLARED -#define Tcl_ParseArgsObjv_TCL_DECLARED -/* 604 */ -EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, - const Tcl_ArgvInfo * argTable, int * objcPtr, - Tcl_Obj *const * objv, Tcl_Obj *** remObjv); -#endif -#ifndef Tcl_GetErrorLine_TCL_DECLARED -#define Tcl_GetErrorLine_TCL_DECLARED -/* 605 */ -EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); -#endif -#ifndef Tcl_SetErrorLine_TCL_DECLARED -#define Tcl_SetErrorLine_TCL_DECLARED -/* 606 */ -EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int lineNum); -#endif -#ifndef Tcl_TransferResult_TCL_DECLARED -#define Tcl_TransferResult_TCL_DECLARED -/* 607 */ -EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, - int result, Tcl_Interp * targetInterp); -#endif -#ifndef Tcl_InterpActive_TCL_DECLARED -#define Tcl_InterpActive_TCL_DECLARED -/* 608 */ -EXTERN int Tcl_InterpActive (Tcl_Interp * interp); -#endif -#ifndef Tcl_BackgroundException_TCL_DECLARED -#define Tcl_BackgroundException_TCL_DECLARED -/* 609 */ -EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, - int code); -#endif -#ifndef Tcl_ZlibDeflate_TCL_DECLARED -#define Tcl_ZlibDeflate_TCL_DECLARED -/* 610 */ -EXTERN int Tcl_ZlibDeflate (Tcl_Interp * interp, int format, - Tcl_Obj * data, int level, - Tcl_Obj * gzipHeaderDictObj); -#endif -#ifndef Tcl_ZlibInflate_TCL_DECLARED -#define Tcl_ZlibInflate_TCL_DECLARED -/* 611 */ -EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format, - Tcl_Obj * data, int buffersize, - Tcl_Obj * gzipHeaderDictObj); -#endif -#ifndef Tcl_ZlibCRC32_TCL_DECLARED -#define Tcl_ZlibCRC32_TCL_DECLARED -/* 612 */ -EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, const char * buf, - int len); -#endif -#ifndef Tcl_ZlibAdler32_TCL_DECLARED -#define Tcl_ZlibAdler32_TCL_DECLARED -/* 613 */ -EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler, - const char * buf, int len); -#endif -#ifndef Tcl_ZlibStreamInit_TCL_DECLARED -#define Tcl_ZlibStreamInit_TCL_DECLARED -/* 614 */ -EXTERN int Tcl_ZlibStreamInit (Tcl_Interp * interp, int mode, - int format, int level, Tcl_Obj * dictObj, - Tcl_ZlibStream * zshandle); -#endif -#ifndef Tcl_ZlibStreamGetCommandName_TCL_DECLARED -#define Tcl_ZlibStreamGetCommandName_TCL_DECLARED -/* 615 */ -EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName ( - Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamEof_TCL_DECLARED -#define Tcl_ZlibStreamEof_TCL_DECLARED -/* 616 */ -EXTERN int Tcl_ZlibStreamEof (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamAdler32_TCL_DECLARED -#define Tcl_ZlibStreamAdler32_TCL_DECLARED -/* 617 */ -EXTERN int Tcl_ZlibStreamAdler32 (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamPut_TCL_DECLARED -#define Tcl_ZlibStreamPut_TCL_DECLARED -/* 618 */ -EXTERN int Tcl_ZlibStreamPut (Tcl_ZlibStream zshandle, - Tcl_Obj * data, int flush); -#endif -#ifndef Tcl_ZlibStreamGet_TCL_DECLARED -#define Tcl_ZlibStreamGet_TCL_DECLARED -/* 619 */ -EXTERN int Tcl_ZlibStreamGet (Tcl_ZlibStream zshandle, - Tcl_Obj * data, int count); -#endif -#ifndef Tcl_ZlibStreamClose_TCL_DECLARED -#define Tcl_ZlibStreamClose_TCL_DECLARED -/* 620 */ -EXTERN int Tcl_ZlibStreamClose (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_ZlibStreamReset_TCL_DECLARED -#define Tcl_ZlibStreamReset_TCL_DECLARED -/* 621 */ -EXTERN int Tcl_ZlibStreamReset (Tcl_ZlibStream zshandle); -#endif -#ifndef Tcl_SetStartupScript_TCL_DECLARED -#define Tcl_SetStartupScript_TCL_DECLARED -/* 622 */ -EXTERN void Tcl_SetStartupScript (Tcl_Obj * path, - const char * encoding); -#endif -#ifndef Tcl_GetStartupScript_TCL_DECLARED -#define Tcl_GetStartupScript_TCL_DECLARED -/* 623 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingPtr); -#endif -#ifndef Tcl_CloseEx_TCL_DECLARED -#define Tcl_CloseEx_TCL_DECLARED -/* 624 */ -EXTERN int Tcl_CloseEx (Tcl_Interp * interp, Tcl_Channel chan, - int flags); -#endif - -typedef struct TclStubHooks { - const struct TclPlatStubs *tclPlatStubs; - const struct TclIntStubs *tclIntStubs; - const struct TclIntPlatStubs *tclIntPlatStubs; -} TclStubHooks; - -typedef struct TclStubs { - int magic; - const struct TclStubHooks *hooks; - - int (*tcl_PkgProvideEx) (Tcl_Interp * interp, const char * name, const char * version, ClientData clientData); /* 0 */ - CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 1 */ - void (*tcl_Panic) (const char * format, ...); /* 2 */ - char * (*tcl_Alloc) (unsigned int size); /* 3 */ - void (*tcl_Free) (char * ptr); /* 4 */ - char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ - char * (*tcl_DbCkalloc) (unsigned int size, const char * file, int line); /* 6 */ - int (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ - char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved9; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved10; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DeleteFileHandler) (int fd); /* 10 */ -#endif /* MACOSX */ - void (*tcl_SetTimer) (const Tcl_Time * timePtr); /* 11 */ - void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (const Tcl_Time * timePtr); /* 13 */ - int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ - void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ - void (*tcl_AppendToObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 16 */ - Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *const objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, const Tcl_ObjType * typePtr); /* 18 */ - void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 19 */ - void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 20 */ - int (*tcl_DbIsShared) (Tcl_Obj * objPtr, const char * file, int line); /* 21 */ - Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, const char * file, int line); /* 22 */ - Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char * bytes, int length, const char * file, int line); /* 23 */ - Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char * file, int line); /* 24 */ - Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const * objv, const char * file, int line); /* 25 */ - Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char * file, int line); /* 26 */ - Tcl_Obj * (*tcl_DbNewObj) (const char * file, int line); /* 27 */ - Tcl_Obj * (*tcl_DbNewStringObj) (const char * bytes, int length, const char * file, int line); /* 28 */ - Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ - void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ - int (*tcl_GetBoolean) (Tcl_Interp * interp, const char * src, int * boolPtr); /* 31 */ - int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ - unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ - int (*tcl_GetDouble) (Tcl_Interp * interp, const char * src, double * doublePtr); /* 34 */ - int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *const * tablePtr, const char * msg, int flags, int * indexPtr); /* 36 */ - int (*tcl_GetInt) (Tcl_Interp * interp, const char * src, int * intPtr); /* 37 */ - int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ - int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - CONST86 Tcl_ObjType * (*tcl_GetObjType) (const char * typeName); /* 40 */ - char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ - void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ - int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ - int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ - int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ - int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ - int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ - int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ - Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ - Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char * bytes, int length); /* 50 */ - Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ - Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ - Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */ - Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ - Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ - Tcl_Obj * (*tcl_NewStringObj) (const char * bytes, int length); /* 56 */ - void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ - unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ - void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, const unsigned char * bytes, int length); /* 59 */ - void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ - void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ - void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ - void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ - void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ - void (*tcl_SetStringObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 65 */ - void (*tcl_AddErrorInfo) (Tcl_Interp * interp, const char * message); /* 66 */ - void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, const char * message, int length); /* 67 */ - void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ - void (*tcl_AppendElement) (Tcl_Interp * interp, const char * element); /* 69 */ - void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ - Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ - void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ - int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ - void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ - int (*tcl_AsyncReady) (void); /* 75 */ - void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ - char (*tcl_Backslash) (const char * src, int * readPtr); /* 77 */ - int (*tcl_BadChannelOption) (Tcl_Interp * interp, const char * optionName, const char * optionList); /* 78 */ - void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ - void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ - int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ - int (*tcl_CommandComplete) (const char * cmd); /* 82 */ - char * (*tcl_Concat) (int argc, CONST84 char *const * argv); /* 83 */ - int (*tcl_ConvertElement) (const char * src, char * dst, int flags); /* 84 */ - int (*tcl_ConvertCountedElement) (const char * src, int length, char * dst, int flags); /* 85 */ - int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char *const * argv); /* 86 */ - int (*tcl_CreateAliasObj) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ - Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType * typePtr, const char * chanName, ClientData instanceData, int mask); /* 88 */ - void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ - void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ - Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ - void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ - void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ - Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ - void (*tcl_CreateMathFunc) (Tcl_Interp * interp, const char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ - Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ - Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, const char * slaveName, int isSafe); /* 97 */ - Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ - Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ - void (*tcl_DeleteAssocData) (Tcl_Interp * interp, const char * name); /* 100 */ - void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ - void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ - int (*tcl_DeleteCommand) (Tcl_Interp * interp, const char * cmdName); /* 103 */ - int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ - void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ - void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ - void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ - void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ - void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ - void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* MACOSX */ - void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ - void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ - void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ - int (*tcl_DoOneEvent) (int flags); /* 115 */ - void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ - char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, const char * bytes, int length); /* 117 */ - char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, const char * element); /* 118 */ - void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ - void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ - void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ - void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ - void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ - void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ - void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ - int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ - CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ - CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ - int (*tcl_Eval) (Tcl_Interp * interp, const char * script); /* 129 */ - int (*tcl_EvalFile) (Tcl_Interp * interp, const char * fileName); /* 130 */ - int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ - void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ - void (*tcl_Exit) (int status); /* 133 */ - int (*tcl_ExposeCommand) (Tcl_Interp * interp, const char * hiddenCmdToken, const char * cmdName); /* 134 */ - int (*tcl_ExprBoolean) (Tcl_Interp * interp, const char * expr, int * ptr); /* 135 */ - int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ - int (*tcl_ExprDouble) (Tcl_Interp * interp, const char * expr, double * ptr); /* 137 */ - int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ - int (*tcl_ExprLong) (Tcl_Interp * interp, const char * expr, long * ptr); /* 139 */ - int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ - int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ - int (*tcl_ExprString) (Tcl_Interp * interp, const char * expr); /* 142 */ - void (*tcl_Finalize) (void); /* 143 */ - void (*tcl_FindExecutable) (const char * argv0); /* 144 */ - Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ - int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ - void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ - int (*tcl_GetAlias) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ - int (*tcl_GetAliasObj) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ - ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ - Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, const char * chanName, int * modePtr); /* 151 */ - int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ - int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ - ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ - int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ - CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ - int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, Tcl_DString * dsPtr); /* 157 */ - CONST86 Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ - int (*tcl_GetCommandInfo) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ - CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ - int (*tcl_GetErrno) (void); /* 161 */ - CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ - int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ - Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ - const char * (*tcl_GetNameOfExecutable) (void); /* 165 */ - Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void *reserved167; -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ -#endif /* MACOSX */ - Tcl_PathType (*tcl_GetPathType) (const char * path); /* 168 */ - int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ - int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ - int (*tcl_GetServiceMode) (void); /* 171 */ - Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, const char * slaveName); /* 172 */ - Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ - CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ - CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 175 */ - CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 176 */ - int (*tcl_GlobalEval) (Tcl_Interp * interp, const char * command); /* 177 */ - int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ - int (*tcl_HideCommand) (Tcl_Interp * interp, const char * cmdName, const char * hiddenCmdToken); /* 179 */ - int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ - void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ - int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ - int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ - int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ - int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ - char * (*tcl_JoinPath) (int argc, CONST84 char *const * argv, Tcl_DString * resultPtr); /* 186 */ - int (*tcl_LinkVar) (Tcl_Interp * interp, const char * varName, char * addr, int type); /* 187 */ - void *reserved188; - Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ - int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ - Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ - char * (*tcl_Merge) (int argc, CONST84 char *const * argv); /* 192 */ - Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ - void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ - Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ - Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* MACOSX */ - Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */ - Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */ - Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ - void (*tcl_Preserve) (ClientData data); /* 201 */ - void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ - int (*tcl_PutEnv) (const char * assignment); /* 203 */ - CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ - void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ - int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* MACOSX */ - int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */ - int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ - void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (const Tcl_ObjType * typePtr); /* 211 */ - Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, const char * pattern); /* 212 */ - int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, const char * text, const char * start); /* 213 */ - int (*tcl_RegExpMatch) (Tcl_Interp * interp, const char * text, const char * pattern); /* 214 */ - void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ - void (*tcl_Release) (ClientData clientData); /* 216 */ - void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ - int (*tcl_ScanElement) (const char * str, int * flagPtr); /* 218 */ - int (*tcl_ScanCountedElement) (const char * str, int length, int * flagPtr); /* 219 */ - int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ - int (*tcl_ServiceAll) (void); /* 221 */ - int (*tcl_ServiceEvent) (int flags); /* 222 */ - void (*tcl_SetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ - void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ - int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, const char * newValue); /* 225 */ - int (*tcl_SetCommandInfo) (Tcl_Interp * interp, const char * cmdName, const Tcl_CmdInfo * infoPtr); /* 226 */ - void (*tcl_SetErrno) (int err); /* 227 */ - void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (const Tcl_Time * timePtr); /* 229 */ - void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ - int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ - void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ - int (*tcl_SetServiceMode) (int mode); /* 233 */ - void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ - void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ - void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ - CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, const char * varName, const char * newValue, int flags); /* 237 */ - CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, const char * newValue, int flags); /* 238 */ - CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ - CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ - void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ - int (*tcl_SplitList) (Tcl_Interp * interp, const char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ - void (*tcl_SplitPath) (const char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ - void (*tcl_StaticPackage) (Tcl_Interp * interp, const char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ - int (*tcl_StringMatch) (const char * str, const char * pattern); /* 245 */ - int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ - int (*tcl_TraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ - int (*tcl_TraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ - char * (*tcl_TranslateFileName) (Tcl_Interp * interp, const char * name, Tcl_DString * bufferPtr); /* 249 */ - int (*tcl_Ungets) (Tcl_Channel chan, const char * str, int len, int atHead); /* 250 */ - void (*tcl_UnlinkVar) (Tcl_Interp * interp, const char * varName); /* 251 */ - int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ - int (*tcl_UnsetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 253 */ - int (*tcl_UnsetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 254 */ - void (*tcl_UntraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ - void (*tcl_UntraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ - void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, const char * varName); /* 257 */ - int (*tcl_UpVar) (Tcl_Interp * interp, const char * frameName, const char * varName, const char * localName, int flags); /* 258 */ - int (*tcl_UpVar2) (Tcl_Interp * interp, const char * frameName, const char * part1, const char * part2, const char * localName, int flags); /* 259 */ - int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ - ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ - ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ - int (*tcl_Write) (Tcl_Channel chan, const char * s, int slen); /* 263 */ - void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], const char * message); /* 264 */ - int (*tcl_DumpActiveMemory) (const char * fileName); /* 265 */ - void (*tcl_ValidateAllMemory) (const char * file, int line); /* 266 */ - void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ - void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ - char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ - CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, const char * start, CONST84 char ** termPtr); /* 270 */ - CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 271 */ - CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 272 */ - int (*tcl_PkgProvide) (Tcl_Interp * interp, const char * name, const char * version); /* 273 */ - CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 274 */ - void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ - int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ - Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ - void (*tcl_PanicVA) (const char * format, va_list argList); /* 278 */ - void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ - void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ - Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, const Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ - int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ - Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ - void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ - void *reserved285; - void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ - Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ - void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ - void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ - void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ - int (*tcl_EvalEx) (Tcl_Interp * interp, const char * script, int numBytes, int flags); /* 291 */ - int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ - int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ - void (*tcl_ExitThread) (int status); /* 294 */ - int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ - char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ - void (*tcl_FinalizeThread) (void); /* 297 */ - void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ - void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ - Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ - Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, const char * name); /* 301 */ - CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ - void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ - int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const VOID * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ - VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ - Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 306 */ - ClientData (*tcl_InitNotifier) (void); /* 307 */ - void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ - void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ - void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, const Tcl_Time * timePtr); /* 311 */ - int (*tcl_NumUtfChars) (const char * src, int length); /* 312 */ - int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ - void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ - void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ - int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, const char * name); /* 316 */ - Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ - void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ - void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event * evPtr, Tcl_QueuePosition position); /* 319 */ - Tcl_UniChar (*tcl_UniCharAtIndex) (const char * src, int index); /* 320 */ - Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ - Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ - Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ - int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ - CONST84_RETURN char * (*tcl_UtfAtIndex) (const char * src, int index); /* 325 */ - int (*tcl_UtfCharComplete) (const char * src, int length); /* 326 */ - int (*tcl_UtfBackslash) (const char * src, int * readPtr, char * dst); /* 327 */ - CONST84_RETURN char * (*tcl_UtfFindFirst) (const char * src, int ch); /* 328 */ - CONST84_RETURN char * (*tcl_UtfFindLast) (const char * src, int ch); /* 329 */ - CONST84_RETURN char * (*tcl_UtfNext) (const char * src); /* 330 */ - CONST84_RETURN char * (*tcl_UtfPrev) (const char * src, const char * start); /* 331 */ - int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ - char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ - int (*tcl_UtfToLower) (char * src); /* 334 */ - int (*tcl_UtfToTitle) (char * src); /* 335 */ - int (*tcl_UtfToUniChar) (const char * src, Tcl_UniChar * chPtr); /* 336 */ - int (*tcl_UtfToUpper) (char * src); /* 337 */ - int (*tcl_WriteChars) (Tcl_Channel chan, const char * src, int srcLen); /* 338 */ - int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ - char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ - CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ - void (*tcl_SetDefaultEncodingDir) (const char * path); /* 342 */ - void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ - void (*tcl_ServiceModeHook) (int mode); /* 344 */ - int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ - int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ - int (*tcl_UniCharIsDigit) (int ch); /* 347 */ - int (*tcl_UniCharIsLower) (int ch); /* 348 */ - int (*tcl_UniCharIsSpace) (int ch); /* 349 */ - int (*tcl_UniCharIsUpper) (int ch); /* 350 */ - int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ - int (*tcl_UniCharLen) (const Tcl_UniChar * uniStr); /* 352 */ - int (*tcl_UniCharNcmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 353 */ - char * (*tcl_UniCharToUtfDString) (const Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ - Tcl_UniChar * (*tcl_UtfToUniCharDString) (const char * src, int length, Tcl_DString * dsPtr); /* 355 */ - Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ - Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ - void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ - void (*tcl_LogCommandInfo) (Tcl_Interp * interp, const char * script, const char * command, int length); /* 359 */ - int (*tcl_ParseBraces) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ - int (*tcl_ParseCommand) (Tcl_Interp * interp, const char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ - int (*tcl_ParseExpr) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ - int (*tcl_ParseQuotedString) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ - int (*tcl_ParseVarName) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ - char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ - int (*tcl_Chdir) (const char * dirName); /* 366 */ - int (*tcl_Access) (const char * path, int mode); /* 367 */ - int (*tcl_Stat) (const char * path, struct stat * bufPtr); /* 368 */ - int (*tcl_UtfNcmp) (const char * s1, const char * s2, unsigned long n); /* 369 */ - int (*tcl_UtfNcasecmp) (const char * s1, const char * s2, unsigned long n); /* 370 */ - int (*tcl_StringCaseMatch) (const char * str, const char * pattern, int nocase); /* 371 */ - int (*tcl_UniCharIsControl) (int ch); /* 372 */ - int (*tcl_UniCharIsGraph) (int ch); /* 373 */ - int (*tcl_UniCharIsPrint) (int ch); /* 374 */ - int (*tcl_UniCharIsPunct) (int ch); /* 375 */ - int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ - void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ - Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar * unicode, int numChars); /* 378 */ - void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int numChars); /* 379 */ - int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ - Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ - Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ - Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ - void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int length); /* 384 */ - int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ - void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ - Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ - int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ - int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, const char * pattern); /* 389 */ - int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 390 */ - void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ - void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ - int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ - int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ - int (*tcl_WriteRaw) (Tcl_Channel chan, const char * src, int srcLen); /* 395 */ - Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ - int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ - CONST84_RETURN char * (*tcl_ChannelName) (const Tcl_ChannelType * chanTypePtr); /* 398 */ - Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType * chanTypePtr); /* 399 */ - Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType * chanTypePtr); /* 400 */ - Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (const Tcl_ChannelType * chanTypePtr); /* 401 */ - Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType * chanTypePtr); /* 402 */ - Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType * chanTypePtr); /* 403 */ - Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType * chanTypePtr); /* 404 */ - Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 405 */ - Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 406 */ - Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 407 */ - Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType * chanTypePtr); /* 408 */ - Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType * chanTypePtr); /* 409 */ - Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType * chanTypePtr); /* 410 */ - Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType * chanTypePtr); /* 411 */ - int (*tcl_JoinThread) (Tcl_ThreadId threadId, int * result); /* 412 */ - int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ - int (*tcl_IsChannelRegistered) (Tcl_Interp * interp, Tcl_Channel channel); /* 414 */ - void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ - void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ - void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ - int (*tcl_IsChannelExisting) (const char * channelName); /* 418 */ - int (*tcl_UniCharNcasecmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 419 */ - int (*tcl_UniCharCaseMatch) (const Tcl_UniChar * uniStr, const Tcl_UniChar * uniPattern, int nocase); /* 420 */ - Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, const char * key); /* 421 */ - Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, const char * key, int * newPtr); /* 422 */ - void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, const Tcl_HashKeyType * typePtr); /* 423 */ - void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ - ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ - int (*tcl_TraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ - void (*tcl_UntraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ - char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ - char * (*tcl_AttemptDbCkalloc) (unsigned int size, const char * file, int line); /* 429 */ - char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ - char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 431 */ - int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ - Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ - Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ - int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, const char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ - Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, const char * pattern); /* 436 */ - Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ - int (*tcl_DetachChannel) (Tcl_Interp * interp, Tcl_Channel channel); /* 438 */ - int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ - int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ - int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ - int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ - int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ - int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * sym1, const char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ - int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, const char * pattern, Tcl_GlobTypeData * types); /* 445 */ - Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ - int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ - int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ - int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ - int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ - int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ - int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ - const char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ - int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ - int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ - Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * modeString, int permissions); /* 456 */ - Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ - int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ - int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ - Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ - Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj * pathPtr, int * lenPtr); /* 461 */ - int (*tcl_FSEqualPaths) (Tcl_Obj * firstPtr, Tcl_Obj * secondPtr); /* 462 */ - Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 463 */ - Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj * pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ - Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 466 */ - int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem * fromFilesystem, ClientData clientData); /* 468 */ - const char * (*tcl_FSGetNativePath) (Tcl_Obj * pathPtr); /* 469 */ - Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj * pathPtr); /* 470 */ - Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj * pathPtr); /* 471 */ - Tcl_Obj * (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (const Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (const Tcl_Filesystem * fsPtr); /* 475 */ - const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 476 */ - CONST86 Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj * pathPtr); /* 477 */ - Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ - int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (const Tcl_Filesystem * fsPtr); /* 480 */ - int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ - void (*tcl_GetTime) (Tcl_Time * timeBuf); /* 482 */ - Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp * interp, int level, int flags, Tcl_CmdObjTraceProc * objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc * delProc); /* 483 */ - int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo * infoPtr); /* 484 */ - int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo * infoPtr); /* 485 */ - Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char * file, int line); /* 486 */ - int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ - Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ - void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ - Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ - Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ - Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ - Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 493 */ - int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ - int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ - int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ - int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ - int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ - void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ - void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ - int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); /* 501 */ - int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv); /* 502 */ - Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ - Tcl_Obj * (*tcl_DbNewDictObj) (const char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp * interp, const char * pkgName, const Tcl_Config * configuration, const char * valEncoding); /* 505 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 509 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 510 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 511 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ - int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, const char * encodingName); /* 518 */ - Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ - void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ - void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ - int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ - int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ - int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ - void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ - void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ - void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ - int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ - int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ - void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ - void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ - int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ - void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ - int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ - Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ - int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ - void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ - int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ - Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ - int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ - Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, const char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ - Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ - int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ - int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ - int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ - int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ - int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ - int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ - int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ - int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ - int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ - void (*tcl_SetTimeProc) (Tcl_GetTimeProc * getProc, Tcl_ScaleTimeProc * scaleProc, ClientData clientData); /* 552 */ - void (*tcl_QueryTimeProc) (Tcl_GetTimeProc ** getProc, Tcl_ScaleTimeProc ** scaleProc, ClientData * clientData); /* 553 */ - Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType * chanTypePtr); /* 554 */ - Tcl_Obj * (*tcl_NewBignumObj) (mp_int * value); /* 555 */ - Tcl_Obj * (*tcl_DbNewBignumObj) (mp_int * value, const char * file, int line); /* 556 */ - void (*tcl_SetBignumObj) (Tcl_Obj * obj, mp_int * value); /* 557 */ - int (*tcl_GetBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 558 */ - int (*tcl_TakeBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 559 */ - int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ - Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType * chanTypePtr); /* 561 */ - void (*tcl_SetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj * msg); /* 562 */ - void (*tcl_GetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj ** msg); /* 563 */ - void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj * msg); /* 564 */ - void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj ** msg); /* 565 */ - int (*tcl_InitBignumFromDouble) (Tcl_Interp * interp, double initval, mp_int * toInit); /* 566 */ - Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ - int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ - int (*tcl_GetEncodingFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); /* 569 */ - Tcl_Obj * (*tcl_GetEncodingSearchPath) (void); /* 570 */ - int (*tcl_SetEncodingSearchPath) (Tcl_Obj * searchPath); /* 571 */ - const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString * bufPtr); /* 572 */ - int (*tcl_PkgRequireProc) (Tcl_Interp * interp, const char * name, int objc, Tcl_Obj *const objv[], ClientData * clientDataPtr); /* 573 */ - void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ - void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, const char * bytes, int length, int limit, const char * ellipsis); /* 575 */ - Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj *const objv[]); /* 576 */ - int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj *const objv[]); /* 577 */ - Tcl_Obj * (*tcl_ObjPrintf) (const char * format, ...); /* 578 */ - void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, const char * format, ...); /* 579 */ - int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ - int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ - int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 582 */ - Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ - int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 584 */ - int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 585 */ - int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); /* 586 */ - void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 588 */ - unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statPtr); /* 589 */ - unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statPtr); /* 590 */ - unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statPtr); /* 591 */ - int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statPtr); /* 592 */ - int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statPtr); /* 593 */ - int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statPtr); /* 594 */ - int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statPtr); /* 595 */ - Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statPtr); /* 596 */ - Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statPtr); /* 597 */ - Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statPtr); /* 598 */ - Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statPtr); /* 599 */ - Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statPtr); /* 600 */ - unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ - int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ - int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ - int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ - int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ - void (*tcl_SetErrorLine) (Tcl_Interp * interp, int lineNum); /* 606 */ - void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ - int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ - void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ - int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */ - int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */ - unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const char * buf, int len); /* 612 */ - unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const char * buf, int len); /* 613 */ - int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ - Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ - int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ - int (*tcl_ZlibStreamAdler32) (Tcl_ZlibStream zshandle); /* 617 */ - int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int flush); /* 618 */ - int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ - int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ - int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */ - void (*tcl_SetStartupScript) (Tcl_Obj * path, const char * encoding); /* 622 */ - Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ - int (*tcl_CloseEx) (Tcl_Interp * interp, Tcl_Channel chan, int flags); /* 624 */ -} TclStubs; - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) -extern const TclStubs *tclStubsPtr; -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) - -/* - * Inline function declarations: - */ - -#ifndef Tcl_PkgProvideEx -#define Tcl_PkgProvideEx \ - (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ -#endif -#ifndef Tcl_PkgRequireEx -#define Tcl_PkgRequireEx \ - (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ -#endif -#ifndef Tcl_Panic -#define Tcl_Panic \ - (tclStubsPtr->tcl_Panic) /* 2 */ -#endif -#ifndef Tcl_Alloc -#define Tcl_Alloc \ - (tclStubsPtr->tcl_Alloc) /* 3 */ -#endif -#ifndef Tcl_Free -#define Tcl_Free \ - (tclStubsPtr->tcl_Free) /* 4 */ -#endif -#ifndef Tcl_Realloc -#define Tcl_Realloc \ - (tclStubsPtr->tcl_Realloc) /* 5 */ -#endif -#ifndef Tcl_DbCkalloc -#define Tcl_DbCkalloc \ - (tclStubsPtr->tcl_DbCkalloc) /* 6 */ -#endif -#ifndef Tcl_DbCkfree -#define Tcl_DbCkfree \ - (tclStubsPtr->tcl_DbCkfree) /* 7 */ -#endif -#ifndef Tcl_DbCkrealloc -#define Tcl_DbCkrealloc \ - (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_CreateFileHandler -#define Tcl_CreateFileHandler \ - (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ -#endif -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DeleteFileHandler -#define Tcl_DeleteFileHandler \ - (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_SetTimer -#define Tcl_SetTimer \ - (tclStubsPtr->tcl_SetTimer) /* 11 */ -#endif -#ifndef Tcl_Sleep -#define Tcl_Sleep \ - (tclStubsPtr->tcl_Sleep) /* 12 */ -#endif -#ifndef Tcl_WaitForEvent -#define Tcl_WaitForEvent \ - (tclStubsPtr->tcl_WaitForEvent) /* 13 */ -#endif -#ifndef Tcl_AppendAllObjTypes -#define Tcl_AppendAllObjTypes \ - (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ -#endif -#ifndef Tcl_AppendStringsToObj -#define Tcl_AppendStringsToObj \ - (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ -#endif -#ifndef Tcl_AppendToObj -#define Tcl_AppendToObj \ - (tclStubsPtr->tcl_AppendToObj) /* 16 */ -#endif -#ifndef Tcl_ConcatObj -#define Tcl_ConcatObj \ - (tclStubsPtr->tcl_ConcatObj) /* 17 */ -#endif -#ifndef Tcl_ConvertToType -#define Tcl_ConvertToType \ - (tclStubsPtr->tcl_ConvertToType) /* 18 */ -#endif -#ifndef Tcl_DbDecrRefCount -#define Tcl_DbDecrRefCount \ - (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ -#endif -#ifndef Tcl_DbIncrRefCount -#define Tcl_DbIncrRefCount \ - (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ -#endif -#ifndef Tcl_DbIsShared -#define Tcl_DbIsShared \ - (tclStubsPtr->tcl_DbIsShared) /* 21 */ -#endif -#ifndef Tcl_DbNewBooleanObj -#define Tcl_DbNewBooleanObj \ - (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ -#endif -#ifndef Tcl_DbNewByteArrayObj -#define Tcl_DbNewByteArrayObj \ - (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ -#endif -#ifndef Tcl_DbNewDoubleObj -#define Tcl_DbNewDoubleObj \ - (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ -#endif -#ifndef Tcl_DbNewListObj -#define Tcl_DbNewListObj \ - (tclStubsPtr->tcl_DbNewListObj) /* 25 */ -#endif -#ifndef Tcl_DbNewLongObj -#define Tcl_DbNewLongObj \ - (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ -#endif -#ifndef Tcl_DbNewObj -#define Tcl_DbNewObj \ - (tclStubsPtr->tcl_DbNewObj) /* 27 */ -#endif -#ifndef Tcl_DbNewStringObj -#define Tcl_DbNewStringObj \ - (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ -#endif -#ifndef Tcl_DuplicateObj -#define Tcl_DuplicateObj \ - (tclStubsPtr->tcl_DuplicateObj) /* 29 */ -#endif -#ifndef TclFreeObj -#define TclFreeObj \ - (tclStubsPtr->tclFreeObj) /* 30 */ -#endif -#ifndef Tcl_GetBoolean -#define Tcl_GetBoolean \ - (tclStubsPtr->tcl_GetBoolean) /* 31 */ -#endif -#ifndef Tcl_GetBooleanFromObj -#define Tcl_GetBooleanFromObj \ - (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ -#endif -#ifndef Tcl_GetByteArrayFromObj -#define Tcl_GetByteArrayFromObj \ - (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ -#endif -#ifndef Tcl_GetDouble -#define Tcl_GetDouble \ - (tclStubsPtr->tcl_GetDouble) /* 34 */ -#endif -#ifndef Tcl_GetDoubleFromObj -#define Tcl_GetDoubleFromObj \ - (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ -#endif -#ifndef Tcl_GetIndexFromObj -#define Tcl_GetIndexFromObj \ - (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ -#endif -#ifndef Tcl_GetInt -#define Tcl_GetInt \ - (tclStubsPtr->tcl_GetInt) /* 37 */ -#endif -#ifndef Tcl_GetIntFromObj -#define Tcl_GetIntFromObj \ - (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ -#endif -#ifndef Tcl_GetLongFromObj -#define Tcl_GetLongFromObj \ - (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ -#endif -#ifndef Tcl_GetObjType -#define Tcl_GetObjType \ - (tclStubsPtr->tcl_GetObjType) /* 40 */ -#endif -#ifndef Tcl_GetStringFromObj -#define Tcl_GetStringFromObj \ - (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ -#endif -#ifndef Tcl_InvalidateStringRep -#define Tcl_InvalidateStringRep \ - (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ -#endif -#ifndef Tcl_ListObjAppendList -#define Tcl_ListObjAppendList \ - (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ -#endif -#ifndef Tcl_ListObjAppendElement -#define Tcl_ListObjAppendElement \ - (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ -#endif -#ifndef Tcl_ListObjGetElements -#define Tcl_ListObjGetElements \ - (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ -#endif -#ifndef Tcl_ListObjIndex -#define Tcl_ListObjIndex \ - (tclStubsPtr->tcl_ListObjIndex) /* 46 */ -#endif -#ifndef Tcl_ListObjLength -#define Tcl_ListObjLength \ - (tclStubsPtr->tcl_ListObjLength) /* 47 */ -#endif -#ifndef Tcl_ListObjReplace -#define Tcl_ListObjReplace \ - (tclStubsPtr->tcl_ListObjReplace) /* 48 */ -#endif -#ifndef Tcl_NewBooleanObj -#define Tcl_NewBooleanObj \ - (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ -#endif -#ifndef Tcl_NewByteArrayObj -#define Tcl_NewByteArrayObj \ - (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ -#endif -#ifndef Tcl_NewDoubleObj -#define Tcl_NewDoubleObj \ - (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ -#endif -#ifndef Tcl_NewIntObj -#define Tcl_NewIntObj \ - (tclStubsPtr->tcl_NewIntObj) /* 52 */ -#endif -#ifndef Tcl_NewListObj -#define Tcl_NewListObj \ - (tclStubsPtr->tcl_NewListObj) /* 53 */ -#endif -#ifndef Tcl_NewLongObj -#define Tcl_NewLongObj \ - (tclStubsPtr->tcl_NewLongObj) /* 54 */ -#endif -#ifndef Tcl_NewObj -#define Tcl_NewObj \ - (tclStubsPtr->tcl_NewObj) /* 55 */ -#endif -#ifndef Tcl_NewStringObj -#define Tcl_NewStringObj \ - (tclStubsPtr->tcl_NewStringObj) /* 56 */ -#endif -#ifndef Tcl_SetBooleanObj -#define Tcl_SetBooleanObj \ - (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ -#endif -#ifndef Tcl_SetByteArrayLength -#define Tcl_SetByteArrayLength \ - (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ -#endif -#ifndef Tcl_SetByteArrayObj -#define Tcl_SetByteArrayObj \ - (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ -#endif -#ifndef Tcl_SetDoubleObj -#define Tcl_SetDoubleObj \ - (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ -#endif -#ifndef Tcl_SetIntObj -#define Tcl_SetIntObj \ - (tclStubsPtr->tcl_SetIntObj) /* 61 */ -#endif -#ifndef Tcl_SetListObj -#define Tcl_SetListObj \ - (tclStubsPtr->tcl_SetListObj) /* 62 */ -#endif -#ifndef Tcl_SetLongObj -#define Tcl_SetLongObj \ - (tclStubsPtr->tcl_SetLongObj) /* 63 */ -#endif -#ifndef Tcl_SetObjLength -#define Tcl_SetObjLength \ - (tclStubsPtr->tcl_SetObjLength) /* 64 */ -#endif -#ifndef Tcl_SetStringObj -#define Tcl_SetStringObj \ - (tclStubsPtr->tcl_SetStringObj) /* 65 */ -#endif -#ifndef Tcl_AddErrorInfo -#define Tcl_AddErrorInfo \ - (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ -#endif -#ifndef Tcl_AddObjErrorInfo -#define Tcl_AddObjErrorInfo \ - (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ -#endif -#ifndef Tcl_AllowExceptions -#define Tcl_AllowExceptions \ - (tclStubsPtr->tcl_AllowExceptions) /* 68 */ -#endif -#ifndef Tcl_AppendElement -#define Tcl_AppendElement \ - (tclStubsPtr->tcl_AppendElement) /* 69 */ -#endif -#ifndef Tcl_AppendResult -#define Tcl_AppendResult \ - (tclStubsPtr->tcl_AppendResult) /* 70 */ -#endif -#ifndef Tcl_AsyncCreate -#define Tcl_AsyncCreate \ - (tclStubsPtr->tcl_AsyncCreate) /* 71 */ -#endif -#ifndef Tcl_AsyncDelete -#define Tcl_AsyncDelete \ - (tclStubsPtr->tcl_AsyncDelete) /* 72 */ -#endif -#ifndef Tcl_AsyncInvoke -#define Tcl_AsyncInvoke \ - (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ -#endif -#ifndef Tcl_AsyncMark -#define Tcl_AsyncMark \ - (tclStubsPtr->tcl_AsyncMark) /* 74 */ -#endif -#ifndef Tcl_AsyncReady -#define Tcl_AsyncReady \ - (tclStubsPtr->tcl_AsyncReady) /* 75 */ -#endif -#ifndef Tcl_BackgroundError -#define Tcl_BackgroundError \ - (tclStubsPtr->tcl_BackgroundError) /* 76 */ -#endif -#ifndef Tcl_Backslash -#define Tcl_Backslash \ - (tclStubsPtr->tcl_Backslash) /* 77 */ -#endif -#ifndef Tcl_BadChannelOption -#define Tcl_BadChannelOption \ - (tclStubsPtr->tcl_BadChannelOption) /* 78 */ -#endif -#ifndef Tcl_CallWhenDeleted -#define Tcl_CallWhenDeleted \ - (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ -#endif -#ifndef Tcl_CancelIdleCall -#define Tcl_CancelIdleCall \ - (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ -#endif -#ifndef Tcl_Close -#define Tcl_Close \ - (tclStubsPtr->tcl_Close) /* 81 */ -#endif -#ifndef Tcl_CommandComplete -#define Tcl_CommandComplete \ - (tclStubsPtr->tcl_CommandComplete) /* 82 */ -#endif -#ifndef Tcl_Concat -#define Tcl_Concat \ - (tclStubsPtr->tcl_Concat) /* 83 */ -#endif -#ifndef Tcl_ConvertElement -#define Tcl_ConvertElement \ - (tclStubsPtr->tcl_ConvertElement) /* 84 */ -#endif -#ifndef Tcl_ConvertCountedElement -#define Tcl_ConvertCountedElement \ - (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ -#endif -#ifndef Tcl_CreateAlias -#define Tcl_CreateAlias \ - (tclStubsPtr->tcl_CreateAlias) /* 86 */ -#endif -#ifndef Tcl_CreateAliasObj -#define Tcl_CreateAliasObj \ - (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ -#endif -#ifndef Tcl_CreateChannel -#define Tcl_CreateChannel \ - (tclStubsPtr->tcl_CreateChannel) /* 88 */ -#endif -#ifndef Tcl_CreateChannelHandler -#define Tcl_CreateChannelHandler \ - (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ -#endif -#ifndef Tcl_CreateCloseHandler -#define Tcl_CreateCloseHandler \ - (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ -#endif -#ifndef Tcl_CreateCommand -#define Tcl_CreateCommand \ - (tclStubsPtr->tcl_CreateCommand) /* 91 */ -#endif -#ifndef Tcl_CreateEventSource -#define Tcl_CreateEventSource \ - (tclStubsPtr->tcl_CreateEventSource) /* 92 */ -#endif -#ifndef Tcl_CreateExitHandler -#define Tcl_CreateExitHandler \ - (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ -#endif -#ifndef Tcl_CreateInterp -#define Tcl_CreateInterp \ - (tclStubsPtr->tcl_CreateInterp) /* 94 */ -#endif -#ifndef Tcl_CreateMathFunc -#define Tcl_CreateMathFunc \ - (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ -#endif -#ifndef Tcl_CreateObjCommand -#define Tcl_CreateObjCommand \ - (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ -#endif -#ifndef Tcl_CreateSlave -#define Tcl_CreateSlave \ - (tclStubsPtr->tcl_CreateSlave) /* 97 */ -#endif -#ifndef Tcl_CreateTimerHandler -#define Tcl_CreateTimerHandler \ - (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ -#endif -#ifndef Tcl_CreateTrace -#define Tcl_CreateTrace \ - (tclStubsPtr->tcl_CreateTrace) /* 99 */ -#endif -#ifndef Tcl_DeleteAssocData -#define Tcl_DeleteAssocData \ - (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ -#endif -#ifndef Tcl_DeleteChannelHandler -#define Tcl_DeleteChannelHandler \ - (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ -#endif -#ifndef Tcl_DeleteCloseHandler -#define Tcl_DeleteCloseHandler \ - (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ -#endif -#ifndef Tcl_DeleteCommand -#define Tcl_DeleteCommand \ - (tclStubsPtr->tcl_DeleteCommand) /* 103 */ -#endif -#ifndef Tcl_DeleteCommandFromToken -#define Tcl_DeleteCommandFromToken \ - (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ -#endif -#ifndef Tcl_DeleteEvents -#define Tcl_DeleteEvents \ - (tclStubsPtr->tcl_DeleteEvents) /* 105 */ -#endif -#ifndef Tcl_DeleteEventSource -#define Tcl_DeleteEventSource \ - (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ -#endif -#ifndef Tcl_DeleteExitHandler -#define Tcl_DeleteExitHandler \ - (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ -#endif -#ifndef Tcl_DeleteHashEntry -#define Tcl_DeleteHashEntry \ - (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ -#endif -#ifndef Tcl_DeleteHashTable -#define Tcl_DeleteHashTable \ - (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ -#endif -#ifndef Tcl_DeleteInterp -#define Tcl_DeleteInterp \ - (tclStubsPtr->tcl_DeleteInterp) /* 110 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_DeleteTimerHandler -#define Tcl_DeleteTimerHandler \ - (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ -#endif -#ifndef Tcl_DeleteTrace -#define Tcl_DeleteTrace \ - (tclStubsPtr->tcl_DeleteTrace) /* 113 */ -#endif -#ifndef Tcl_DontCallWhenDeleted -#define Tcl_DontCallWhenDeleted \ - (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ -#endif -#ifndef Tcl_DoOneEvent -#define Tcl_DoOneEvent \ - (tclStubsPtr->tcl_DoOneEvent) /* 115 */ -#endif -#ifndef Tcl_DoWhenIdle -#define Tcl_DoWhenIdle \ - (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ -#endif -#ifndef Tcl_DStringAppend -#define Tcl_DStringAppend \ - (tclStubsPtr->tcl_DStringAppend) /* 117 */ -#endif -#ifndef Tcl_DStringAppendElement -#define Tcl_DStringAppendElement \ - (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ -#endif -#ifndef Tcl_DStringEndSublist -#define Tcl_DStringEndSublist \ - (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ -#endif -#ifndef Tcl_DStringFree -#define Tcl_DStringFree \ - (tclStubsPtr->tcl_DStringFree) /* 120 */ -#endif -#ifndef Tcl_DStringGetResult -#define Tcl_DStringGetResult \ - (tclStubsPtr->tcl_DStringGetResult) /* 121 */ -#endif -#ifndef Tcl_DStringInit -#define Tcl_DStringInit \ - (tclStubsPtr->tcl_DStringInit) /* 122 */ -#endif -#ifndef Tcl_DStringResult -#define Tcl_DStringResult \ - (tclStubsPtr->tcl_DStringResult) /* 123 */ -#endif -#ifndef Tcl_DStringSetLength -#define Tcl_DStringSetLength \ - (tclStubsPtr->tcl_DStringSetLength) /* 124 */ -#endif -#ifndef Tcl_DStringStartSublist -#define Tcl_DStringStartSublist \ - (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ -#endif -#ifndef Tcl_Eof -#define Tcl_Eof \ - (tclStubsPtr->tcl_Eof) /* 126 */ -#endif -#ifndef Tcl_ErrnoId -#define Tcl_ErrnoId \ - (tclStubsPtr->tcl_ErrnoId) /* 127 */ -#endif -#ifndef Tcl_ErrnoMsg -#define Tcl_ErrnoMsg \ - (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ -#endif -#ifndef Tcl_Eval -#define Tcl_Eval \ - (tclStubsPtr->tcl_Eval) /* 129 */ -#endif -#ifndef Tcl_EvalFile -#define Tcl_EvalFile \ - (tclStubsPtr->tcl_EvalFile) /* 130 */ -#endif -#ifndef Tcl_EvalObj -#define Tcl_EvalObj \ - (tclStubsPtr->tcl_EvalObj) /* 131 */ -#endif -#ifndef Tcl_EventuallyFree -#define Tcl_EventuallyFree \ - (tclStubsPtr->tcl_EventuallyFree) /* 132 */ -#endif -#ifndef Tcl_Exit -#define Tcl_Exit \ - (tclStubsPtr->tcl_Exit) /* 133 */ -#endif -#ifndef Tcl_ExposeCommand -#define Tcl_ExposeCommand \ - (tclStubsPtr->tcl_ExposeCommand) /* 134 */ -#endif -#ifndef Tcl_ExprBoolean -#define Tcl_ExprBoolean \ - (tclStubsPtr->tcl_ExprBoolean) /* 135 */ -#endif -#ifndef Tcl_ExprBooleanObj -#define Tcl_ExprBooleanObj \ - (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ -#endif -#ifndef Tcl_ExprDouble -#define Tcl_ExprDouble \ - (tclStubsPtr->tcl_ExprDouble) /* 137 */ -#endif -#ifndef Tcl_ExprDoubleObj -#define Tcl_ExprDoubleObj \ - (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ -#endif -#ifndef Tcl_ExprLong -#define Tcl_ExprLong \ - (tclStubsPtr->tcl_ExprLong) /* 139 */ -#endif -#ifndef Tcl_ExprLongObj -#define Tcl_ExprLongObj \ - (tclStubsPtr->tcl_ExprLongObj) /* 140 */ -#endif -#ifndef Tcl_ExprObj -#define Tcl_ExprObj \ - (tclStubsPtr->tcl_ExprObj) /* 141 */ -#endif -#ifndef Tcl_ExprString -#define Tcl_ExprString \ - (tclStubsPtr->tcl_ExprString) /* 142 */ -#endif -#ifndef Tcl_Finalize -#define Tcl_Finalize \ - (tclStubsPtr->tcl_Finalize) /* 143 */ -#endif -#ifndef Tcl_FindExecutable -#define Tcl_FindExecutable \ - (tclStubsPtr->tcl_FindExecutable) /* 144 */ -#endif -#ifndef Tcl_FirstHashEntry -#define Tcl_FirstHashEntry \ - (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ -#endif -#ifndef Tcl_Flush -#define Tcl_Flush \ - (tclStubsPtr->tcl_Flush) /* 146 */ -#endif -#ifndef Tcl_FreeResult -#define Tcl_FreeResult \ - (tclStubsPtr->tcl_FreeResult) /* 147 */ -#endif -#ifndef Tcl_GetAlias -#define Tcl_GetAlias \ - (tclStubsPtr->tcl_GetAlias) /* 148 */ -#endif -#ifndef Tcl_GetAliasObj -#define Tcl_GetAliasObj \ - (tclStubsPtr->tcl_GetAliasObj) /* 149 */ -#endif -#ifndef Tcl_GetAssocData -#define Tcl_GetAssocData \ - (tclStubsPtr->tcl_GetAssocData) /* 150 */ -#endif -#ifndef Tcl_GetChannel -#define Tcl_GetChannel \ - (tclStubsPtr->tcl_GetChannel) /* 151 */ -#endif -#ifndef Tcl_GetChannelBufferSize -#define Tcl_GetChannelBufferSize \ - (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ -#endif -#ifndef Tcl_GetChannelHandle -#define Tcl_GetChannelHandle \ - (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ -#endif -#ifndef Tcl_GetChannelInstanceData -#define Tcl_GetChannelInstanceData \ - (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ -#endif -#ifndef Tcl_GetChannelMode -#define Tcl_GetChannelMode \ - (tclStubsPtr->tcl_GetChannelMode) /* 155 */ -#endif -#ifndef Tcl_GetChannelName -#define Tcl_GetChannelName \ - (tclStubsPtr->tcl_GetChannelName) /* 156 */ -#endif -#ifndef Tcl_GetChannelOption -#define Tcl_GetChannelOption \ - (tclStubsPtr->tcl_GetChannelOption) /* 157 */ -#endif -#ifndef Tcl_GetChannelType -#define Tcl_GetChannelType \ - (tclStubsPtr->tcl_GetChannelType) /* 158 */ -#endif -#ifndef Tcl_GetCommandInfo -#define Tcl_GetCommandInfo \ - (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ -#endif -#ifndef Tcl_GetCommandName -#define Tcl_GetCommandName \ - (tclStubsPtr->tcl_GetCommandName) /* 160 */ -#endif -#ifndef Tcl_GetErrno -#define Tcl_GetErrno \ - (tclStubsPtr->tcl_GetErrno) /* 161 */ -#endif -#ifndef Tcl_GetHostName -#define Tcl_GetHostName \ - (tclStubsPtr->tcl_GetHostName) /* 162 */ -#endif -#ifndef Tcl_GetInterpPath -#define Tcl_GetInterpPath \ - (tclStubsPtr->tcl_GetInterpPath) /* 163 */ -#endif -#ifndef Tcl_GetMaster -#define Tcl_GetMaster \ - (tclStubsPtr->tcl_GetMaster) /* 164 */ -#endif -#ifndef Tcl_GetNameOfExecutable -#define Tcl_GetNameOfExecutable \ - (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ -#endif -#ifndef Tcl_GetObjResult -#define Tcl_GetObjResult \ - (tclStubsPtr->tcl_GetObjResult) /* 166 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* UNIX */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_GetOpenFile -#define Tcl_GetOpenFile \ - (tclStubsPtr->tcl_GetOpenFile) /* 167 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_GetPathType -#define Tcl_GetPathType \ - (tclStubsPtr->tcl_GetPathType) /* 168 */ -#endif -#ifndef Tcl_Gets -#define Tcl_Gets \ - (tclStubsPtr->tcl_Gets) /* 169 */ -#endif -#ifndef Tcl_GetsObj -#define Tcl_GetsObj \ - (tclStubsPtr->tcl_GetsObj) /* 170 */ -#endif -#ifndef Tcl_GetServiceMode -#define Tcl_GetServiceMode \ - (tclStubsPtr->tcl_GetServiceMode) /* 171 */ -#endif -#ifndef Tcl_GetSlave -#define Tcl_GetSlave \ - (tclStubsPtr->tcl_GetSlave) /* 172 */ -#endif -#ifndef Tcl_GetStdChannel -#define Tcl_GetStdChannel \ - (tclStubsPtr->tcl_GetStdChannel) /* 173 */ -#endif -#ifndef Tcl_GetStringResult -#define Tcl_GetStringResult \ - (tclStubsPtr->tcl_GetStringResult) /* 174 */ -#endif -#ifndef Tcl_GetVar -#define Tcl_GetVar \ - (tclStubsPtr->tcl_GetVar) /* 175 */ -#endif -#ifndef Tcl_GetVar2 -#define Tcl_GetVar2 \ - (tclStubsPtr->tcl_GetVar2) /* 176 */ -#endif -#ifndef Tcl_GlobalEval -#define Tcl_GlobalEval \ - (tclStubsPtr->tcl_GlobalEval) /* 177 */ -#endif -#ifndef Tcl_GlobalEvalObj -#define Tcl_GlobalEvalObj \ - (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ -#endif -#ifndef Tcl_HideCommand -#define Tcl_HideCommand \ - (tclStubsPtr->tcl_HideCommand) /* 179 */ -#endif -#ifndef Tcl_Init -#define Tcl_Init \ - (tclStubsPtr->tcl_Init) /* 180 */ -#endif -#ifndef Tcl_InitHashTable -#define Tcl_InitHashTable \ - (tclStubsPtr->tcl_InitHashTable) /* 181 */ -#endif -#ifndef Tcl_InputBlocked -#define Tcl_InputBlocked \ - (tclStubsPtr->tcl_InputBlocked) /* 182 */ -#endif -#ifndef Tcl_InputBuffered -#define Tcl_InputBuffered \ - (tclStubsPtr->tcl_InputBuffered) /* 183 */ -#endif -#ifndef Tcl_InterpDeleted -#define Tcl_InterpDeleted \ - (tclStubsPtr->tcl_InterpDeleted) /* 184 */ -#endif -#ifndef Tcl_IsSafe -#define Tcl_IsSafe \ - (tclStubsPtr->tcl_IsSafe) /* 185 */ -#endif -#ifndef Tcl_JoinPath -#define Tcl_JoinPath \ - (tclStubsPtr->tcl_JoinPath) /* 186 */ -#endif -#ifndef Tcl_LinkVar -#define Tcl_LinkVar \ - (tclStubsPtr->tcl_LinkVar) /* 187 */ -#endif -/* Slot 188 is reserved */ -#ifndef Tcl_MakeFileChannel -#define Tcl_MakeFileChannel \ - (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ -#endif -#ifndef Tcl_MakeSafe -#define Tcl_MakeSafe \ - (tclStubsPtr->tcl_MakeSafe) /* 190 */ -#endif -#ifndef Tcl_MakeTcpClientChannel -#define Tcl_MakeTcpClientChannel \ - (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ -#endif -#ifndef Tcl_Merge -#define Tcl_Merge \ - (tclStubsPtr->tcl_Merge) /* 192 */ -#endif -#ifndef Tcl_NextHashEntry -#define Tcl_NextHashEntry \ - (tclStubsPtr->tcl_NextHashEntry) /* 193 */ -#endif -#ifndef Tcl_NotifyChannel -#define Tcl_NotifyChannel \ - (tclStubsPtr->tcl_NotifyChannel) /* 194 */ -#endif -#ifndef Tcl_ObjGetVar2 -#define Tcl_ObjGetVar2 \ - (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ -#endif -#ifndef Tcl_ObjSetVar2 -#define Tcl_ObjSetVar2 \ - (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_OpenFileChannel -#define Tcl_OpenFileChannel \ - (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ -#endif -#ifndef Tcl_OpenTcpClient -#define Tcl_OpenTcpClient \ - (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ -#endif -#ifndef Tcl_OpenTcpServer -#define Tcl_OpenTcpServer \ - (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ -#endif -#ifndef Tcl_Preserve -#define Tcl_Preserve \ - (tclStubsPtr->tcl_Preserve) /* 201 */ -#endif -#ifndef Tcl_PrintDouble -#define Tcl_PrintDouble \ - (tclStubsPtr->tcl_PrintDouble) /* 202 */ -#endif -#ifndef Tcl_PutEnv -#define Tcl_PutEnv \ - (tclStubsPtr->tcl_PutEnv) /* 203 */ -#endif -#ifndef Tcl_PosixError -#define Tcl_PosixError \ - (tclStubsPtr->tcl_PosixError) /* 204 */ -#endif -#ifndef Tcl_QueueEvent -#define Tcl_QueueEvent \ - (tclStubsPtr->tcl_QueueEvent) /* 205 */ -#endif -#ifndef Tcl_Read -#define Tcl_Read \ - (tclStubsPtr->tcl_Read) /* 206 */ -#endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* MACOSX */ -#ifndef Tcl_RecordAndEval -#define Tcl_RecordAndEval \ - (tclStubsPtr->tcl_RecordAndEval) /* 208 */ -#endif -#ifndef Tcl_RecordAndEvalObj -#define Tcl_RecordAndEvalObj \ - (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ -#endif -#ifndef Tcl_RegisterChannel -#define Tcl_RegisterChannel \ - (tclStubsPtr->tcl_RegisterChannel) /* 210 */ -#endif -#ifndef Tcl_RegisterObjType -#define Tcl_RegisterObjType \ - (tclStubsPtr->tcl_RegisterObjType) /* 211 */ -#endif -#ifndef Tcl_RegExpCompile -#define Tcl_RegExpCompile \ - (tclStubsPtr->tcl_RegExpCompile) /* 212 */ -#endif -#ifndef Tcl_RegExpExec -#define Tcl_RegExpExec \ - (tclStubsPtr->tcl_RegExpExec) /* 213 */ -#endif -#ifndef Tcl_RegExpMatch -#define Tcl_RegExpMatch \ - (tclStubsPtr->tcl_RegExpMatch) /* 214 */ -#endif -#ifndef Tcl_RegExpRange -#define Tcl_RegExpRange \ - (tclStubsPtr->tcl_RegExpRange) /* 215 */ -#endif -#ifndef Tcl_Release -#define Tcl_Release \ - (tclStubsPtr->tcl_Release) /* 216 */ -#endif -#ifndef Tcl_ResetResult -#define Tcl_ResetResult \ - (tclStubsPtr->tcl_ResetResult) /* 217 */ -#endif -#ifndef Tcl_ScanElement -#define Tcl_ScanElement \ - (tclStubsPtr->tcl_ScanElement) /* 218 */ -#endif -#ifndef Tcl_ScanCountedElement -#define Tcl_ScanCountedElement \ - (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ -#endif -#ifndef Tcl_SeekOld -#define Tcl_SeekOld \ - (tclStubsPtr->tcl_SeekOld) /* 220 */ -#endif -#ifndef Tcl_ServiceAll -#define Tcl_ServiceAll \ - (tclStubsPtr->tcl_ServiceAll) /* 221 */ -#endif -#ifndef Tcl_ServiceEvent -#define Tcl_ServiceEvent \ - (tclStubsPtr->tcl_ServiceEvent) /* 222 */ -#endif -#ifndef Tcl_SetAssocData -#define Tcl_SetAssocData \ - (tclStubsPtr->tcl_SetAssocData) /* 223 */ -#endif -#ifndef Tcl_SetChannelBufferSize -#define Tcl_SetChannelBufferSize \ - (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ -#endif -#ifndef Tcl_SetChannelOption -#define Tcl_SetChannelOption \ - (tclStubsPtr->tcl_SetChannelOption) /* 225 */ -#endif -#ifndef Tcl_SetCommandInfo -#define Tcl_SetCommandInfo \ - (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ -#endif -#ifndef Tcl_SetErrno -#define Tcl_SetErrno \ - (tclStubsPtr->tcl_SetErrno) /* 227 */ -#endif -#ifndef Tcl_SetErrorCode -#define Tcl_SetErrorCode \ - (tclStubsPtr->tcl_SetErrorCode) /* 228 */ -#endif -#ifndef Tcl_SetMaxBlockTime -#define Tcl_SetMaxBlockTime \ - (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ -#endif -#ifndef Tcl_SetPanicProc -#define Tcl_SetPanicProc \ - (tclStubsPtr->tcl_SetPanicProc) /* 230 */ -#endif -#ifndef Tcl_SetRecursionLimit -#define Tcl_SetRecursionLimit \ - (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ -#endif -#ifndef Tcl_SetResult -#define Tcl_SetResult \ - (tclStubsPtr->tcl_SetResult) /* 232 */ -#endif -#ifndef Tcl_SetServiceMode -#define Tcl_SetServiceMode \ - (tclStubsPtr->tcl_SetServiceMode) /* 233 */ -#endif -#ifndef Tcl_SetObjErrorCode -#define Tcl_SetObjErrorCode \ - (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ -#endif -#ifndef Tcl_SetObjResult -#define Tcl_SetObjResult \ - (tclStubsPtr->tcl_SetObjResult) /* 235 */ -#endif -#ifndef Tcl_SetStdChannel -#define Tcl_SetStdChannel \ - (tclStubsPtr->tcl_SetStdChannel) /* 236 */ -#endif -#ifndef Tcl_SetVar -#define Tcl_SetVar \ - (tclStubsPtr->tcl_SetVar) /* 237 */ -#endif -#ifndef Tcl_SetVar2 -#define Tcl_SetVar2 \ - (tclStubsPtr->tcl_SetVar2) /* 238 */ -#endif -#ifndef Tcl_SignalId -#define Tcl_SignalId \ - (tclStubsPtr->tcl_SignalId) /* 239 */ -#endif -#ifndef Tcl_SignalMsg -#define Tcl_SignalMsg \ - (tclStubsPtr->tcl_SignalMsg) /* 240 */ -#endif -#ifndef Tcl_SourceRCFile -#define Tcl_SourceRCFile \ - (tclStubsPtr->tcl_SourceRCFile) /* 241 */ -#endif -#ifndef Tcl_SplitList -#define Tcl_SplitList \ - (tclStubsPtr->tcl_SplitList) /* 242 */ -#endif -#ifndef Tcl_SplitPath -#define Tcl_SplitPath \ - (tclStubsPtr->tcl_SplitPath) /* 243 */ -#endif -#ifndef Tcl_StaticPackage -#define Tcl_StaticPackage \ - (tclStubsPtr->tcl_StaticPackage) /* 244 */ -#endif -#ifndef Tcl_StringMatch -#define Tcl_StringMatch \ - (tclStubsPtr->tcl_StringMatch) /* 245 */ -#endif -#ifndef Tcl_TellOld -#define Tcl_TellOld \ - (tclStubsPtr->tcl_TellOld) /* 246 */ -#endif -#ifndef Tcl_TraceVar -#define Tcl_TraceVar \ - (tclStubsPtr->tcl_TraceVar) /* 247 */ -#endif -#ifndef Tcl_TraceVar2 -#define Tcl_TraceVar2 \ - (tclStubsPtr->tcl_TraceVar2) /* 248 */ -#endif -#ifndef Tcl_TranslateFileName -#define Tcl_TranslateFileName \ - (tclStubsPtr->tcl_TranslateFileName) /* 249 */ -#endif -#ifndef Tcl_Ungets -#define Tcl_Ungets \ - (tclStubsPtr->tcl_Ungets) /* 250 */ -#endif -#ifndef Tcl_UnlinkVar -#define Tcl_UnlinkVar \ - (tclStubsPtr->tcl_UnlinkVar) /* 251 */ -#endif -#ifndef Tcl_UnregisterChannel -#define Tcl_UnregisterChannel \ - (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ -#endif -#ifndef Tcl_UnsetVar -#define Tcl_UnsetVar \ - (tclStubsPtr->tcl_UnsetVar) /* 253 */ -#endif -#ifndef Tcl_UnsetVar2 -#define Tcl_UnsetVar2 \ - (tclStubsPtr->tcl_UnsetVar2) /* 254 */ -#endif -#ifndef Tcl_UntraceVar -#define Tcl_UntraceVar \ - (tclStubsPtr->tcl_UntraceVar) /* 255 */ -#endif -#ifndef Tcl_UntraceVar2 -#define Tcl_UntraceVar2 \ - (tclStubsPtr->tcl_UntraceVar2) /* 256 */ -#endif -#ifndef Tcl_UpdateLinkedVar -#define Tcl_UpdateLinkedVar \ - (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ -#endif -#ifndef Tcl_UpVar -#define Tcl_UpVar \ - (tclStubsPtr->tcl_UpVar) /* 258 */ -#endif -#ifndef Tcl_UpVar2 -#define Tcl_UpVar2 \ - (tclStubsPtr->tcl_UpVar2) /* 259 */ -#endif -#ifndef Tcl_VarEval -#define Tcl_VarEval \ - (tclStubsPtr->tcl_VarEval) /* 260 */ -#endif -#ifndef Tcl_VarTraceInfo -#define Tcl_VarTraceInfo \ - (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ -#endif -#ifndef Tcl_VarTraceInfo2 -#define Tcl_VarTraceInfo2 \ - (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ -#endif -#ifndef Tcl_Write -#define Tcl_Write \ - (tclStubsPtr->tcl_Write) /* 263 */ -#endif -#ifndef Tcl_WrongNumArgs -#define Tcl_WrongNumArgs \ - (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ -#endif -#ifndef Tcl_DumpActiveMemory -#define Tcl_DumpActiveMemory \ - (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ -#endif -#ifndef Tcl_ValidateAllMemory -#define Tcl_ValidateAllMemory \ - (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ -#endif -#ifndef Tcl_AppendResultVA -#define Tcl_AppendResultVA \ - (tclStubsPtr->tcl_AppendResultVA) /* 267 */ -#endif -#ifndef Tcl_AppendStringsToObjVA -#define Tcl_AppendStringsToObjVA \ - (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ -#endif -#ifndef Tcl_HashStats -#define Tcl_HashStats \ - (tclStubsPtr->tcl_HashStats) /* 269 */ -#endif -#ifndef Tcl_ParseVar -#define Tcl_ParseVar \ - (tclStubsPtr->tcl_ParseVar) /* 270 */ -#endif -#ifndef Tcl_PkgPresent -#define Tcl_PkgPresent \ - (tclStubsPtr->tcl_PkgPresent) /* 271 */ -#endif -#ifndef Tcl_PkgPresentEx -#define Tcl_PkgPresentEx \ - (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ -#endif -#ifndef Tcl_PkgProvide -#define Tcl_PkgProvide \ - (tclStubsPtr->tcl_PkgProvide) /* 273 */ -#endif -#ifndef Tcl_PkgRequire -#define Tcl_PkgRequire \ - (tclStubsPtr->tcl_PkgRequire) /* 274 */ -#endif -#ifndef Tcl_SetErrorCodeVA -#define Tcl_SetErrorCodeVA \ - (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ -#endif -#ifndef Tcl_VarEvalVA -#define Tcl_VarEvalVA \ - (tclStubsPtr->tcl_VarEvalVA) /* 276 */ -#endif -#ifndef Tcl_WaitPid -#define Tcl_WaitPid \ - (tclStubsPtr->tcl_WaitPid) /* 277 */ -#endif -#ifndef Tcl_PanicVA -#define Tcl_PanicVA \ - (tclStubsPtr->tcl_PanicVA) /* 278 */ -#endif -#ifndef Tcl_GetVersion -#define Tcl_GetVersion \ - (tclStubsPtr->tcl_GetVersion) /* 279 */ -#endif -#ifndef Tcl_InitMemory -#define Tcl_InitMemory \ - (tclStubsPtr->tcl_InitMemory) /* 280 */ -#endif -#ifndef Tcl_StackChannel -#define Tcl_StackChannel \ - (tclStubsPtr->tcl_StackChannel) /* 281 */ -#endif -#ifndef Tcl_UnstackChannel -#define Tcl_UnstackChannel \ - (tclStubsPtr->tcl_UnstackChannel) /* 282 */ -#endif -#ifndef Tcl_GetStackedChannel -#define Tcl_GetStackedChannel \ - (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ -#endif -#ifndef Tcl_SetMainLoop -#define Tcl_SetMainLoop \ - (tclStubsPtr->tcl_SetMainLoop) /* 284 */ -#endif -/* Slot 285 is reserved */ -#ifndef Tcl_AppendObjToObj -#define Tcl_AppendObjToObj \ - (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ -#endif -#ifndef Tcl_CreateEncoding -#define Tcl_CreateEncoding \ - (tclStubsPtr->tcl_CreateEncoding) /* 287 */ -#endif -#ifndef Tcl_CreateThreadExitHandler -#define Tcl_CreateThreadExitHandler \ - (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ -#endif -#ifndef Tcl_DeleteThreadExitHandler -#define Tcl_DeleteThreadExitHandler \ - (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ -#endif -#ifndef Tcl_DiscardResult -#define Tcl_DiscardResult \ - (tclStubsPtr->tcl_DiscardResult) /* 290 */ -#endif -#ifndef Tcl_EvalEx -#define Tcl_EvalEx \ - (tclStubsPtr->tcl_EvalEx) /* 291 */ -#endif -#ifndef Tcl_EvalObjv -#define Tcl_EvalObjv \ - (tclStubsPtr->tcl_EvalObjv) /* 292 */ -#endif -#ifndef Tcl_EvalObjEx -#define Tcl_EvalObjEx \ - (tclStubsPtr->tcl_EvalObjEx) /* 293 */ -#endif -#ifndef Tcl_ExitThread -#define Tcl_ExitThread \ - (tclStubsPtr->tcl_ExitThread) /* 294 */ -#endif -#ifndef Tcl_ExternalToUtf -#define Tcl_ExternalToUtf \ - (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ -#endif -#ifndef Tcl_ExternalToUtfDString -#define Tcl_ExternalToUtfDString \ - (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ -#endif -#ifndef Tcl_FinalizeThread -#define Tcl_FinalizeThread \ - (tclStubsPtr->tcl_FinalizeThread) /* 297 */ -#endif -#ifndef Tcl_FinalizeNotifier -#define Tcl_FinalizeNotifier \ - (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ -#endif -#ifndef Tcl_FreeEncoding -#define Tcl_FreeEncoding \ - (tclStubsPtr->tcl_FreeEncoding) /* 299 */ -#endif -#ifndef Tcl_GetCurrentThread -#define Tcl_GetCurrentThread \ - (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ -#endif -#ifndef Tcl_GetEncoding -#define Tcl_GetEncoding \ - (tclStubsPtr->tcl_GetEncoding) /* 301 */ -#endif -#ifndef Tcl_GetEncodingName -#define Tcl_GetEncodingName \ - (tclStubsPtr->tcl_GetEncodingName) /* 302 */ -#endif -#ifndef Tcl_GetEncodingNames -#define Tcl_GetEncodingNames \ - (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ -#endif -#ifndef Tcl_GetIndexFromObjStruct -#define Tcl_GetIndexFromObjStruct \ - (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ -#endif -#ifndef Tcl_GetThreadData -#define Tcl_GetThreadData \ - (tclStubsPtr->tcl_GetThreadData) /* 305 */ -#endif -#ifndef Tcl_GetVar2Ex -#define Tcl_GetVar2Ex \ - (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ -#endif -#ifndef Tcl_InitNotifier -#define Tcl_InitNotifier \ - (tclStubsPtr->tcl_InitNotifier) /* 307 */ -#endif -#ifndef Tcl_MutexLock -#define Tcl_MutexLock \ - (tclStubsPtr->tcl_MutexLock) /* 308 */ -#endif -#ifndef Tcl_MutexUnlock -#define Tcl_MutexUnlock \ - (tclStubsPtr->tcl_MutexUnlock) /* 309 */ -#endif -#ifndef Tcl_ConditionNotify -#define Tcl_ConditionNotify \ - (tclStubsPtr->tcl_ConditionNotify) /* 310 */ -#endif -#ifndef Tcl_ConditionWait -#define Tcl_ConditionWait \ - (tclStubsPtr->tcl_ConditionWait) /* 311 */ -#endif -#ifndef Tcl_NumUtfChars -#define Tcl_NumUtfChars \ - (tclStubsPtr->tcl_NumUtfChars) /* 312 */ -#endif -#ifndef Tcl_ReadChars -#define Tcl_ReadChars \ - (tclStubsPtr->tcl_ReadChars) /* 313 */ -#endif -#ifndef Tcl_RestoreResult -#define Tcl_RestoreResult \ - (tclStubsPtr->tcl_RestoreResult) /* 314 */ -#endif -#ifndef Tcl_SaveResult -#define Tcl_SaveResult \ - (tclStubsPtr->tcl_SaveResult) /* 315 */ -#endif -#ifndef Tcl_SetSystemEncoding -#define Tcl_SetSystemEncoding \ - (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ -#endif -#ifndef Tcl_SetVar2Ex -#define Tcl_SetVar2Ex \ - (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ -#endif -#ifndef Tcl_ThreadAlert -#define Tcl_ThreadAlert \ - (tclStubsPtr->tcl_ThreadAlert) /* 318 */ -#endif -#ifndef Tcl_ThreadQueueEvent -#define Tcl_ThreadQueueEvent \ - (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ -#endif -#ifndef Tcl_UniCharAtIndex -#define Tcl_UniCharAtIndex \ - (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ -#endif -#ifndef Tcl_UniCharToLower -#define Tcl_UniCharToLower \ - (tclStubsPtr->tcl_UniCharToLower) /* 321 */ -#endif -#ifndef Tcl_UniCharToTitle -#define Tcl_UniCharToTitle \ - (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ -#endif -#ifndef Tcl_UniCharToUpper -#define Tcl_UniCharToUpper \ - (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ -#endif -#ifndef Tcl_UniCharToUtf -#define Tcl_UniCharToUtf \ - (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ -#endif -#ifndef Tcl_UtfAtIndex -#define Tcl_UtfAtIndex \ - (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ -#endif -#ifndef Tcl_UtfCharComplete -#define Tcl_UtfCharComplete \ - (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ -#endif -#ifndef Tcl_UtfBackslash -#define Tcl_UtfBackslash \ - (tclStubsPtr->tcl_UtfBackslash) /* 327 */ -#endif -#ifndef Tcl_UtfFindFirst -#define Tcl_UtfFindFirst \ - (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ -#endif -#ifndef Tcl_UtfFindLast -#define Tcl_UtfFindLast \ - (tclStubsPtr->tcl_UtfFindLast) /* 329 */ -#endif -#ifndef Tcl_UtfNext -#define Tcl_UtfNext \ - (tclStubsPtr->tcl_UtfNext) /* 330 */ -#endif -#ifndef Tcl_UtfPrev -#define Tcl_UtfPrev \ - (tclStubsPtr->tcl_UtfPrev) /* 331 */ -#endif -#ifndef Tcl_UtfToExternal -#define Tcl_UtfToExternal \ - (tclStubsPtr->tcl_UtfToExternal) /* 332 */ -#endif -#ifndef Tcl_UtfToExternalDString -#define Tcl_UtfToExternalDString \ - (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ -#endif -#ifndef Tcl_UtfToLower -#define Tcl_UtfToLower \ - (tclStubsPtr->tcl_UtfToLower) /* 334 */ -#endif -#ifndef Tcl_UtfToTitle -#define Tcl_UtfToTitle \ - (tclStubsPtr->tcl_UtfToTitle) /* 335 */ -#endif -#ifndef Tcl_UtfToUniChar -#define Tcl_UtfToUniChar \ - (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ -#endif -#ifndef Tcl_UtfToUpper -#define Tcl_UtfToUpper \ - (tclStubsPtr->tcl_UtfToUpper) /* 337 */ -#endif -#ifndef Tcl_WriteChars -#define Tcl_WriteChars \ - (tclStubsPtr->tcl_WriteChars) /* 338 */ -#endif -#ifndef Tcl_WriteObj -#define Tcl_WriteObj \ - (tclStubsPtr->tcl_WriteObj) /* 339 */ -#endif -#ifndef Tcl_GetString -#define Tcl_GetString \ - (tclStubsPtr->tcl_GetString) /* 340 */ -#endif -#ifndef Tcl_GetDefaultEncodingDir -#define Tcl_GetDefaultEncodingDir \ - (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ -#endif -#ifndef Tcl_SetDefaultEncodingDir -#define Tcl_SetDefaultEncodingDir \ - (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ -#endif -#ifndef Tcl_AlertNotifier -#define Tcl_AlertNotifier \ - (tclStubsPtr->tcl_AlertNotifier) /* 343 */ -#endif -#ifndef Tcl_ServiceModeHook -#define Tcl_ServiceModeHook \ - (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ -#endif -#ifndef Tcl_UniCharIsAlnum -#define Tcl_UniCharIsAlnum \ - (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ -#endif -#ifndef Tcl_UniCharIsAlpha -#define Tcl_UniCharIsAlpha \ - (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ -#endif -#ifndef Tcl_UniCharIsDigit -#define Tcl_UniCharIsDigit \ - (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ -#endif -#ifndef Tcl_UniCharIsLower -#define Tcl_UniCharIsLower \ - (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ -#endif -#ifndef Tcl_UniCharIsSpace -#define Tcl_UniCharIsSpace \ - (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ -#endif -#ifndef Tcl_UniCharIsUpper -#define Tcl_UniCharIsUpper \ - (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ -#endif -#ifndef Tcl_UniCharIsWordChar -#define Tcl_UniCharIsWordChar \ - (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ -#endif -#ifndef Tcl_UniCharLen -#define Tcl_UniCharLen \ - (tclStubsPtr->tcl_UniCharLen) /* 352 */ -#endif -#ifndef Tcl_UniCharNcmp -#define Tcl_UniCharNcmp \ - (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ -#endif -#ifndef Tcl_UniCharToUtfDString -#define Tcl_UniCharToUtfDString \ - (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ -#endif -#ifndef Tcl_UtfToUniCharDString -#define Tcl_UtfToUniCharDString \ - (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ -#endif -#ifndef Tcl_GetRegExpFromObj -#define Tcl_GetRegExpFromObj \ - (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ -#endif -#ifndef Tcl_EvalTokens -#define Tcl_EvalTokens \ - (tclStubsPtr->tcl_EvalTokens) /* 357 */ -#endif -#ifndef Tcl_FreeParse -#define Tcl_FreeParse \ - (tclStubsPtr->tcl_FreeParse) /* 358 */ -#endif -#ifndef Tcl_LogCommandInfo -#define Tcl_LogCommandInfo \ - (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ -#endif -#ifndef Tcl_ParseBraces -#define Tcl_ParseBraces \ - (tclStubsPtr->tcl_ParseBraces) /* 360 */ -#endif -#ifndef Tcl_ParseCommand -#define Tcl_ParseCommand \ - (tclStubsPtr->tcl_ParseCommand) /* 361 */ -#endif -#ifndef Tcl_ParseExpr -#define Tcl_ParseExpr \ - (tclStubsPtr->tcl_ParseExpr) /* 362 */ -#endif -#ifndef Tcl_ParseQuotedString -#define Tcl_ParseQuotedString \ - (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ -#endif -#ifndef Tcl_ParseVarName -#define Tcl_ParseVarName \ - (tclStubsPtr->tcl_ParseVarName) /* 364 */ -#endif -#ifndef Tcl_GetCwd -#define Tcl_GetCwd \ - (tclStubsPtr->tcl_GetCwd) /* 365 */ -#endif -#ifndef Tcl_Chdir -#define Tcl_Chdir \ - (tclStubsPtr->tcl_Chdir) /* 366 */ -#endif -#ifndef Tcl_Access -#define Tcl_Access \ - (tclStubsPtr->tcl_Access) /* 367 */ -#endif -#ifndef Tcl_Stat -#define Tcl_Stat \ - (tclStubsPtr->tcl_Stat) /* 368 */ -#endif -#ifndef Tcl_UtfNcmp -#define Tcl_UtfNcmp \ - (tclStubsPtr->tcl_UtfNcmp) /* 369 */ -#endif -#ifndef Tcl_UtfNcasecmp -#define Tcl_UtfNcasecmp \ - (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ -#endif -#ifndef Tcl_StringCaseMatch -#define Tcl_StringCaseMatch \ - (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ -#endif -#ifndef Tcl_UniCharIsControl -#define Tcl_UniCharIsControl \ - (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ -#endif -#ifndef Tcl_UniCharIsGraph -#define Tcl_UniCharIsGraph \ - (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ -#endif -#ifndef Tcl_UniCharIsPrint -#define Tcl_UniCharIsPrint \ - (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ -#endif -#ifndef Tcl_UniCharIsPunct -#define Tcl_UniCharIsPunct \ - (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ -#endif -#ifndef Tcl_RegExpExecObj -#define Tcl_RegExpExecObj \ - (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ -#endif -#ifndef Tcl_RegExpGetInfo -#define Tcl_RegExpGetInfo \ - (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ -#endif -#ifndef Tcl_NewUnicodeObj -#define Tcl_NewUnicodeObj \ - (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ -#endif -#ifndef Tcl_SetUnicodeObj -#define Tcl_SetUnicodeObj \ - (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ -#endif -#ifndef Tcl_GetCharLength -#define Tcl_GetCharLength \ - (tclStubsPtr->tcl_GetCharLength) /* 380 */ -#endif -#ifndef Tcl_GetUniChar -#define Tcl_GetUniChar \ - (tclStubsPtr->tcl_GetUniChar) /* 381 */ -#endif -#ifndef Tcl_GetUnicode -#define Tcl_GetUnicode \ - (tclStubsPtr->tcl_GetUnicode) /* 382 */ -#endif -#ifndef Tcl_GetRange -#define Tcl_GetRange \ - (tclStubsPtr->tcl_GetRange) /* 383 */ -#endif -#ifndef Tcl_AppendUnicodeToObj -#define Tcl_AppendUnicodeToObj \ - (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ -#endif -#ifndef Tcl_RegExpMatchObj -#define Tcl_RegExpMatchObj \ - (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ -#endif -#ifndef Tcl_SetNotifier -#define Tcl_SetNotifier \ - (tclStubsPtr->tcl_SetNotifier) /* 386 */ -#endif -#ifndef Tcl_GetAllocMutex -#define Tcl_GetAllocMutex \ - (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ -#endif -#ifndef Tcl_GetChannelNames -#define Tcl_GetChannelNames \ - (tclStubsPtr->tcl_GetChannelNames) /* 388 */ -#endif -#ifndef Tcl_GetChannelNamesEx -#define Tcl_GetChannelNamesEx \ - (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ -#endif -#ifndef Tcl_ProcObjCmd -#define Tcl_ProcObjCmd \ - (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ -#endif -#ifndef Tcl_ConditionFinalize -#define Tcl_ConditionFinalize \ - (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ -#endif -#ifndef Tcl_MutexFinalize -#define Tcl_MutexFinalize \ - (tclStubsPtr->tcl_MutexFinalize) /* 392 */ -#endif -#ifndef Tcl_CreateThread -#define Tcl_CreateThread \ - (tclStubsPtr->tcl_CreateThread) /* 393 */ -#endif -#ifndef Tcl_ReadRaw -#define Tcl_ReadRaw \ - (tclStubsPtr->tcl_ReadRaw) /* 394 */ -#endif -#ifndef Tcl_WriteRaw -#define Tcl_WriteRaw \ - (tclStubsPtr->tcl_WriteRaw) /* 395 */ -#endif -#ifndef Tcl_GetTopChannel -#define Tcl_GetTopChannel \ - (tclStubsPtr->tcl_GetTopChannel) /* 396 */ -#endif -#ifndef Tcl_ChannelBuffered -#define Tcl_ChannelBuffered \ - (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ -#endif -#ifndef Tcl_ChannelName -#define Tcl_ChannelName \ - (tclStubsPtr->tcl_ChannelName) /* 398 */ -#endif -#ifndef Tcl_ChannelVersion -#define Tcl_ChannelVersion \ - (tclStubsPtr->tcl_ChannelVersion) /* 399 */ -#endif -#ifndef Tcl_ChannelBlockModeProc -#define Tcl_ChannelBlockModeProc \ - (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ -#endif -#ifndef Tcl_ChannelCloseProc -#define Tcl_ChannelCloseProc \ - (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ -#endif -#ifndef Tcl_ChannelClose2Proc -#define Tcl_ChannelClose2Proc \ - (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ -#endif -#ifndef Tcl_ChannelInputProc -#define Tcl_ChannelInputProc \ - (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ -#endif -#ifndef Tcl_ChannelOutputProc -#define Tcl_ChannelOutputProc \ - (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ -#endif -#ifndef Tcl_ChannelSeekProc -#define Tcl_ChannelSeekProc \ - (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ -#endif -#ifndef Tcl_ChannelSetOptionProc -#define Tcl_ChannelSetOptionProc \ - (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ -#endif -#ifndef Tcl_ChannelGetOptionProc -#define Tcl_ChannelGetOptionProc \ - (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ -#endif -#ifndef Tcl_ChannelWatchProc -#define Tcl_ChannelWatchProc \ - (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ -#endif -#ifndef Tcl_ChannelGetHandleProc -#define Tcl_ChannelGetHandleProc \ - (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ -#endif -#ifndef Tcl_ChannelFlushProc -#define Tcl_ChannelFlushProc \ - (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ -#endif -#ifndef Tcl_ChannelHandlerProc -#define Tcl_ChannelHandlerProc \ - (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ -#endif -#ifndef Tcl_JoinThread -#define Tcl_JoinThread \ - (tclStubsPtr->tcl_JoinThread) /* 412 */ -#endif -#ifndef Tcl_IsChannelShared -#define Tcl_IsChannelShared \ - (tclStubsPtr->tcl_IsChannelShared) /* 413 */ -#endif -#ifndef Tcl_IsChannelRegistered -#define Tcl_IsChannelRegistered \ - (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ -#endif -#ifndef Tcl_CutChannel -#define Tcl_CutChannel \ - (tclStubsPtr->tcl_CutChannel) /* 415 */ -#endif -#ifndef Tcl_SpliceChannel -#define Tcl_SpliceChannel \ - (tclStubsPtr->tcl_SpliceChannel) /* 416 */ -#endif -#ifndef Tcl_ClearChannelHandlers -#define Tcl_ClearChannelHandlers \ - (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ -#endif -#ifndef Tcl_IsChannelExisting -#define Tcl_IsChannelExisting \ - (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ -#endif -#ifndef Tcl_UniCharNcasecmp -#define Tcl_UniCharNcasecmp \ - (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ -#endif -#ifndef Tcl_UniCharCaseMatch -#define Tcl_UniCharCaseMatch \ - (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ -#endif -#ifndef Tcl_FindHashEntry -#define Tcl_FindHashEntry \ - (tclStubsPtr->tcl_FindHashEntry) /* 421 */ -#endif -#ifndef Tcl_CreateHashEntry -#define Tcl_CreateHashEntry \ - (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ -#endif -#ifndef Tcl_InitCustomHashTable -#define Tcl_InitCustomHashTable \ - (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ -#endif -#ifndef Tcl_InitObjHashTable -#define Tcl_InitObjHashTable \ - (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ -#endif -#ifndef Tcl_CommandTraceInfo -#define Tcl_CommandTraceInfo \ - (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ -#endif -#ifndef Tcl_TraceCommand -#define Tcl_TraceCommand \ - (tclStubsPtr->tcl_TraceCommand) /* 426 */ -#endif -#ifndef Tcl_UntraceCommand -#define Tcl_UntraceCommand \ - (tclStubsPtr->tcl_UntraceCommand) /* 427 */ -#endif -#ifndef Tcl_AttemptAlloc -#define Tcl_AttemptAlloc \ - (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ -#endif -#ifndef Tcl_AttemptDbCkalloc -#define Tcl_AttemptDbCkalloc \ - (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ -#endif -#ifndef Tcl_AttemptRealloc -#define Tcl_AttemptRealloc \ - (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ -#endif -#ifndef Tcl_AttemptDbCkrealloc -#define Tcl_AttemptDbCkrealloc \ - (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ -#endif -#ifndef Tcl_AttemptSetObjLength -#define Tcl_AttemptSetObjLength \ - (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ -#endif -#ifndef Tcl_GetChannelThread -#define Tcl_GetChannelThread \ - (tclStubsPtr->tcl_GetChannelThread) /* 433 */ -#endif -#ifndef Tcl_GetUnicodeFromObj -#define Tcl_GetUnicodeFromObj \ - (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ -#endif -#ifndef Tcl_GetMathFuncInfo -#define Tcl_GetMathFuncInfo \ - (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ -#endif -#ifndef Tcl_ListMathFuncs -#define Tcl_ListMathFuncs \ - (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ -#endif -#ifndef Tcl_SubstObj -#define Tcl_SubstObj \ - (tclStubsPtr->tcl_SubstObj) /* 437 */ -#endif -#ifndef Tcl_DetachChannel -#define Tcl_DetachChannel \ - (tclStubsPtr->tcl_DetachChannel) /* 438 */ -#endif -#ifndef Tcl_IsStandardChannel -#define Tcl_IsStandardChannel \ - (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ -#endif -#ifndef Tcl_FSCopyFile -#define Tcl_FSCopyFile \ - (tclStubsPtr->tcl_FSCopyFile) /* 440 */ -#endif -#ifndef Tcl_FSCopyDirectory -#define Tcl_FSCopyDirectory \ - (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ -#endif -#ifndef Tcl_FSCreateDirectory -#define Tcl_FSCreateDirectory \ - (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ -#endif -#ifndef Tcl_FSDeleteFile -#define Tcl_FSDeleteFile \ - (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ -#endif -#ifndef Tcl_FSLoadFile -#define Tcl_FSLoadFile \ - (tclStubsPtr->tcl_FSLoadFile) /* 444 */ -#endif -#ifndef Tcl_FSMatchInDirectory -#define Tcl_FSMatchInDirectory \ - (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ -#endif -#ifndef Tcl_FSLink -#define Tcl_FSLink \ - (tclStubsPtr->tcl_FSLink) /* 446 */ -#endif -#ifndef Tcl_FSRemoveDirectory -#define Tcl_FSRemoveDirectory \ - (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ -#endif -#ifndef Tcl_FSRenameFile -#define Tcl_FSRenameFile \ - (tclStubsPtr->tcl_FSRenameFile) /* 448 */ -#endif -#ifndef Tcl_FSLstat -#define Tcl_FSLstat \ - (tclStubsPtr->tcl_FSLstat) /* 449 */ -#endif -#ifndef Tcl_FSUtime -#define Tcl_FSUtime \ - (tclStubsPtr->tcl_FSUtime) /* 450 */ -#endif -#ifndef Tcl_FSFileAttrsGet -#define Tcl_FSFileAttrsGet \ - (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ -#endif -#ifndef Tcl_FSFileAttrsSet -#define Tcl_FSFileAttrsSet \ - (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ -#endif -#ifndef Tcl_FSFileAttrStrings -#define Tcl_FSFileAttrStrings \ - (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ -#endif -#ifndef Tcl_FSStat -#define Tcl_FSStat \ - (tclStubsPtr->tcl_FSStat) /* 454 */ -#endif -#ifndef Tcl_FSAccess -#define Tcl_FSAccess \ - (tclStubsPtr->tcl_FSAccess) /* 455 */ -#endif -#ifndef Tcl_FSOpenFileChannel -#define Tcl_FSOpenFileChannel \ - (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ -#endif -#ifndef Tcl_FSGetCwd -#define Tcl_FSGetCwd \ - (tclStubsPtr->tcl_FSGetCwd) /* 457 */ -#endif -#ifndef Tcl_FSChdir -#define Tcl_FSChdir \ - (tclStubsPtr->tcl_FSChdir) /* 458 */ -#endif -#ifndef Tcl_FSConvertToPathType -#define Tcl_FSConvertToPathType \ - (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ -#endif -#ifndef Tcl_FSJoinPath -#define Tcl_FSJoinPath \ - (tclStubsPtr->tcl_FSJoinPath) /* 460 */ -#endif -#ifndef Tcl_FSSplitPath -#define Tcl_FSSplitPath \ - (tclStubsPtr->tcl_FSSplitPath) /* 461 */ -#endif -#ifndef Tcl_FSEqualPaths -#define Tcl_FSEqualPaths \ - (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ -#endif -#ifndef Tcl_FSGetNormalizedPath -#define Tcl_FSGetNormalizedPath \ - (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ -#endif -#ifndef Tcl_FSJoinToPath -#define Tcl_FSJoinToPath \ - (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ -#endif -#ifndef Tcl_FSGetInternalRep -#define Tcl_FSGetInternalRep \ - (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ -#endif -#ifndef Tcl_FSGetTranslatedPath -#define Tcl_FSGetTranslatedPath \ - (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ -#endif -#ifndef Tcl_FSEvalFile -#define Tcl_FSEvalFile \ - (tclStubsPtr->tcl_FSEvalFile) /* 467 */ -#endif -#ifndef Tcl_FSNewNativePath -#define Tcl_FSNewNativePath \ - (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ -#endif -#ifndef Tcl_FSGetNativePath -#define Tcl_FSGetNativePath \ - (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ -#endif -#ifndef Tcl_FSFileSystemInfo -#define Tcl_FSFileSystemInfo \ - (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ -#endif -#ifndef Tcl_FSPathSeparator -#define Tcl_FSPathSeparator \ - (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ -#endif -#ifndef Tcl_FSListVolumes -#define Tcl_FSListVolumes \ - (tclStubsPtr->tcl_FSListVolumes) /* 472 */ -#endif -#ifndef Tcl_FSRegister -#define Tcl_FSRegister \ - (tclStubsPtr->tcl_FSRegister) /* 473 */ -#endif -#ifndef Tcl_FSUnregister -#define Tcl_FSUnregister \ - (tclStubsPtr->tcl_FSUnregister) /* 474 */ -#endif -#ifndef Tcl_FSData -#define Tcl_FSData \ - (tclStubsPtr->tcl_FSData) /* 475 */ -#endif -#ifndef Tcl_FSGetTranslatedStringPath -#define Tcl_FSGetTranslatedStringPath \ - (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ -#endif -#ifndef Tcl_FSGetFileSystemForPath -#define Tcl_FSGetFileSystemForPath \ - (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ -#endif -#ifndef Tcl_FSGetPathType -#define Tcl_FSGetPathType \ - (tclStubsPtr->tcl_FSGetPathType) /* 478 */ -#endif -#ifndef Tcl_OutputBuffered -#define Tcl_OutputBuffered \ - (tclStubsPtr->tcl_OutputBuffered) /* 479 */ -#endif -#ifndef Tcl_FSMountsChanged -#define Tcl_FSMountsChanged \ - (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ -#endif -#ifndef Tcl_EvalTokensStandard -#define Tcl_EvalTokensStandard \ - (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ -#endif -#ifndef Tcl_GetTime -#define Tcl_GetTime \ - (tclStubsPtr->tcl_GetTime) /* 482 */ -#endif -#ifndef Tcl_CreateObjTrace -#define Tcl_CreateObjTrace \ - (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ -#endif -#ifndef Tcl_GetCommandInfoFromToken -#define Tcl_GetCommandInfoFromToken \ - (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ -#endif -#ifndef Tcl_SetCommandInfoFromToken -#define Tcl_SetCommandInfoFromToken \ - (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ -#endif -#ifndef Tcl_DbNewWideIntObj -#define Tcl_DbNewWideIntObj \ - (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ -#endif -#ifndef Tcl_GetWideIntFromObj -#define Tcl_GetWideIntFromObj \ - (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ -#endif -#ifndef Tcl_NewWideIntObj -#define Tcl_NewWideIntObj \ - (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ -#endif -#ifndef Tcl_SetWideIntObj -#define Tcl_SetWideIntObj \ - (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ -#endif -#ifndef Tcl_AllocStatBuf -#define Tcl_AllocStatBuf \ - (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ -#endif -#ifndef Tcl_Seek -#define Tcl_Seek \ - (tclStubsPtr->tcl_Seek) /* 491 */ -#endif -#ifndef Tcl_Tell -#define Tcl_Tell \ - (tclStubsPtr->tcl_Tell) /* 492 */ -#endif -#ifndef Tcl_ChannelWideSeekProc -#define Tcl_ChannelWideSeekProc \ - (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ -#endif -#ifndef Tcl_DictObjPut -#define Tcl_DictObjPut \ - (tclStubsPtr->tcl_DictObjPut) /* 494 */ -#endif -#ifndef Tcl_DictObjGet -#define Tcl_DictObjGet \ - (tclStubsPtr->tcl_DictObjGet) /* 495 */ -#endif -#ifndef Tcl_DictObjRemove -#define Tcl_DictObjRemove \ - (tclStubsPtr->tcl_DictObjRemove) /* 496 */ -#endif -#ifndef Tcl_DictObjSize -#define Tcl_DictObjSize \ - (tclStubsPtr->tcl_DictObjSize) /* 497 */ -#endif -#ifndef Tcl_DictObjFirst -#define Tcl_DictObjFirst \ - (tclStubsPtr->tcl_DictObjFirst) /* 498 */ -#endif -#ifndef Tcl_DictObjNext -#define Tcl_DictObjNext \ - (tclStubsPtr->tcl_DictObjNext) /* 499 */ -#endif -#ifndef Tcl_DictObjDone -#define Tcl_DictObjDone \ - (tclStubsPtr->tcl_DictObjDone) /* 500 */ -#endif -#ifndef Tcl_DictObjPutKeyList -#define Tcl_DictObjPutKeyList \ - (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ -#endif -#ifndef Tcl_DictObjRemoveKeyList -#define Tcl_DictObjRemoveKeyList \ - (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ -#endif -#ifndef Tcl_NewDictObj -#define Tcl_NewDictObj \ - (tclStubsPtr->tcl_NewDictObj) /* 503 */ -#endif -#ifndef Tcl_DbNewDictObj -#define Tcl_DbNewDictObj \ - (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ -#endif -#ifndef Tcl_RegisterConfig -#define Tcl_RegisterConfig \ - (tclStubsPtr->tcl_RegisterConfig) /* 505 */ -#endif -#ifndef Tcl_CreateNamespace -#define Tcl_CreateNamespace \ - (tclStubsPtr->tcl_CreateNamespace) /* 506 */ -#endif -#ifndef Tcl_DeleteNamespace -#define Tcl_DeleteNamespace \ - (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ -#endif -#ifndef Tcl_AppendExportList -#define Tcl_AppendExportList \ - (tclStubsPtr->tcl_AppendExportList) /* 508 */ -#endif -#ifndef Tcl_Export -#define Tcl_Export \ - (tclStubsPtr->tcl_Export) /* 509 */ -#endif -#ifndef Tcl_Import -#define Tcl_Import \ - (tclStubsPtr->tcl_Import) /* 510 */ -#endif -#ifndef Tcl_ForgetImport -#define Tcl_ForgetImport \ - (tclStubsPtr->tcl_ForgetImport) /* 511 */ -#endif -#ifndef Tcl_GetCurrentNamespace -#define Tcl_GetCurrentNamespace \ - (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ -#endif -#ifndef Tcl_GetGlobalNamespace -#define Tcl_GetGlobalNamespace \ - (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ -#endif -#ifndef Tcl_FindNamespace -#define Tcl_FindNamespace \ - (tclStubsPtr->tcl_FindNamespace) /* 514 */ -#endif -#ifndef Tcl_FindCommand -#define Tcl_FindCommand \ - (tclStubsPtr->tcl_FindCommand) /* 515 */ -#endif -#ifndef Tcl_GetCommandFromObj -#define Tcl_GetCommandFromObj \ - (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ -#endif -#ifndef Tcl_GetCommandFullName -#define Tcl_GetCommandFullName \ - (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ -#endif -#ifndef Tcl_FSEvalFileEx -#define Tcl_FSEvalFileEx \ - (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ -#endif -#ifndef Tcl_SetExitProc -#define Tcl_SetExitProc \ - (tclStubsPtr->tcl_SetExitProc) /* 519 */ -#endif -#ifndef Tcl_LimitAddHandler -#define Tcl_LimitAddHandler \ - (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ -#endif -#ifndef Tcl_LimitRemoveHandler -#define Tcl_LimitRemoveHandler \ - (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ -#endif -#ifndef Tcl_LimitReady -#define Tcl_LimitReady \ - (tclStubsPtr->tcl_LimitReady) /* 522 */ -#endif -#ifndef Tcl_LimitCheck -#define Tcl_LimitCheck \ - (tclStubsPtr->tcl_LimitCheck) /* 523 */ -#endif -#ifndef Tcl_LimitExceeded -#define Tcl_LimitExceeded \ - (tclStubsPtr->tcl_LimitExceeded) /* 524 */ -#endif -#ifndef Tcl_LimitSetCommands -#define Tcl_LimitSetCommands \ - (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ -#endif -#ifndef Tcl_LimitSetTime -#define Tcl_LimitSetTime \ - (tclStubsPtr->tcl_LimitSetTime) /* 526 */ -#endif -#ifndef Tcl_LimitSetGranularity -#define Tcl_LimitSetGranularity \ - (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ -#endif -#ifndef Tcl_LimitTypeEnabled -#define Tcl_LimitTypeEnabled \ - (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ -#endif -#ifndef Tcl_LimitTypeExceeded -#define Tcl_LimitTypeExceeded \ - (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ -#endif -#ifndef Tcl_LimitTypeSet -#define Tcl_LimitTypeSet \ - (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ -#endif -#ifndef Tcl_LimitTypeReset -#define Tcl_LimitTypeReset \ - (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ -#endif -#ifndef Tcl_LimitGetCommands -#define Tcl_LimitGetCommands \ - (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ -#endif -#ifndef Tcl_LimitGetTime -#define Tcl_LimitGetTime \ - (tclStubsPtr->tcl_LimitGetTime) /* 533 */ -#endif -#ifndef Tcl_LimitGetGranularity -#define Tcl_LimitGetGranularity \ - (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ -#endif -#ifndef Tcl_SaveInterpState -#define Tcl_SaveInterpState \ - (tclStubsPtr->tcl_SaveInterpState) /* 535 */ -#endif -#ifndef Tcl_RestoreInterpState -#define Tcl_RestoreInterpState \ - (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ -#endif -#ifndef Tcl_DiscardInterpState -#define Tcl_DiscardInterpState \ - (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ -#endif -#ifndef Tcl_SetReturnOptions -#define Tcl_SetReturnOptions \ - (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ -#endif -#ifndef Tcl_GetReturnOptions -#define Tcl_GetReturnOptions \ - (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ -#endif -#ifndef Tcl_IsEnsemble -#define Tcl_IsEnsemble \ - (tclStubsPtr->tcl_IsEnsemble) /* 540 */ -#endif -#ifndef Tcl_CreateEnsemble -#define Tcl_CreateEnsemble \ - (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ -#endif -#ifndef Tcl_FindEnsemble -#define Tcl_FindEnsemble \ - (tclStubsPtr->tcl_FindEnsemble) /* 542 */ -#endif -#ifndef Tcl_SetEnsembleSubcommandList -#define Tcl_SetEnsembleSubcommandList \ - (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ -#endif -#ifndef Tcl_SetEnsembleMappingDict -#define Tcl_SetEnsembleMappingDict \ - (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ -#endif -#ifndef Tcl_SetEnsembleUnknownHandler -#define Tcl_SetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ -#endif -#ifndef Tcl_SetEnsembleFlags -#define Tcl_SetEnsembleFlags \ - (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ -#endif -#ifndef Tcl_GetEnsembleSubcommandList -#define Tcl_GetEnsembleSubcommandList \ - (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ -#endif -#ifndef Tcl_GetEnsembleMappingDict -#define Tcl_GetEnsembleMappingDict \ - (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ -#endif -#ifndef Tcl_GetEnsembleUnknownHandler -#define Tcl_GetEnsembleUnknownHandler \ - (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ -#endif -#ifndef Tcl_GetEnsembleFlags -#define Tcl_GetEnsembleFlags \ - (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ -#endif -#ifndef Tcl_GetEnsembleNamespace -#define Tcl_GetEnsembleNamespace \ - (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ -#endif -#ifndef Tcl_SetTimeProc -#define Tcl_SetTimeProc \ - (tclStubsPtr->tcl_SetTimeProc) /* 552 */ -#endif -#ifndef Tcl_QueryTimeProc -#define Tcl_QueryTimeProc \ - (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ -#endif -#ifndef Tcl_ChannelThreadActionProc -#define Tcl_ChannelThreadActionProc \ - (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ -#endif -#ifndef Tcl_NewBignumObj -#define Tcl_NewBignumObj \ - (tclStubsPtr->tcl_NewBignumObj) /* 555 */ -#endif -#ifndef Tcl_DbNewBignumObj -#define Tcl_DbNewBignumObj \ - (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ -#endif -#ifndef Tcl_SetBignumObj -#define Tcl_SetBignumObj \ - (tclStubsPtr->tcl_SetBignumObj) /* 557 */ -#endif -#ifndef Tcl_GetBignumFromObj -#define Tcl_GetBignumFromObj \ - (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ -#endif -#ifndef Tcl_TakeBignumFromObj -#define Tcl_TakeBignumFromObj \ - (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ -#endif -#ifndef Tcl_TruncateChannel -#define Tcl_TruncateChannel \ - (tclStubsPtr->tcl_TruncateChannel) /* 560 */ -#endif -#ifndef Tcl_ChannelTruncateProc -#define Tcl_ChannelTruncateProc \ - (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ -#endif -#ifndef Tcl_SetChannelErrorInterp -#define Tcl_SetChannelErrorInterp \ - (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ -#endif -#ifndef Tcl_GetChannelErrorInterp -#define Tcl_GetChannelErrorInterp \ - (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ -#endif -#ifndef Tcl_SetChannelError -#define Tcl_SetChannelError \ - (tclStubsPtr->tcl_SetChannelError) /* 564 */ -#endif -#ifndef Tcl_GetChannelError -#define Tcl_GetChannelError \ - (tclStubsPtr->tcl_GetChannelError) /* 565 */ -#endif -#ifndef Tcl_InitBignumFromDouble -#define Tcl_InitBignumFromDouble \ - (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ -#endif -#ifndef Tcl_GetNamespaceUnknownHandler -#define Tcl_GetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ -#endif -#ifndef Tcl_SetNamespaceUnknownHandler -#define Tcl_SetNamespaceUnknownHandler \ - (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ -#endif -#ifndef Tcl_GetEncodingFromObj -#define Tcl_GetEncodingFromObj \ - (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ -#endif -#ifndef Tcl_GetEncodingSearchPath -#define Tcl_GetEncodingSearchPath \ - (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ -#endif -#ifndef Tcl_SetEncodingSearchPath -#define Tcl_SetEncodingSearchPath \ - (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ -#endif -#ifndef Tcl_GetEncodingNameFromEnvironment -#define Tcl_GetEncodingNameFromEnvironment \ - (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ -#endif -#ifndef Tcl_PkgRequireProc -#define Tcl_PkgRequireProc \ - (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ -#endif -#ifndef Tcl_AppendObjToErrorInfo -#define Tcl_AppendObjToErrorInfo \ - (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ -#endif -#ifndef Tcl_AppendLimitedToObj -#define Tcl_AppendLimitedToObj \ - (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ -#endif -#ifndef Tcl_Format -#define Tcl_Format \ - (tclStubsPtr->tcl_Format) /* 576 */ -#endif -#ifndef Tcl_AppendFormatToObj -#define Tcl_AppendFormatToObj \ - (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ -#endif -#ifndef Tcl_ObjPrintf -#define Tcl_ObjPrintf \ - (tclStubsPtr->tcl_ObjPrintf) /* 578 */ -#endif -#ifndef Tcl_AppendPrintfToObj -#define Tcl_AppendPrintfToObj \ - (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ -#endif -#ifndef Tcl_CancelEval -#define Tcl_CancelEval \ - (tclStubsPtr->tcl_CancelEval) /* 580 */ -#endif -#ifndef Tcl_Canceled -#define Tcl_Canceled \ - (tclStubsPtr->tcl_Canceled) /* 581 */ -#endif -#ifndef Tcl_CreatePipe -#define Tcl_CreatePipe \ - (tclStubsPtr->tcl_CreatePipe) /* 582 */ -#endif -#ifndef Tcl_NRCreateCommand -#define Tcl_NRCreateCommand \ - (tclStubsPtr->tcl_NRCreateCommand) /* 583 */ -#endif -#ifndef Tcl_NREvalObj -#define Tcl_NREvalObj \ - (tclStubsPtr->tcl_NREvalObj) /* 584 */ -#endif -#ifndef Tcl_NREvalObjv -#define Tcl_NREvalObjv \ - (tclStubsPtr->tcl_NREvalObjv) /* 585 */ -#endif -#ifndef Tcl_NRCmdSwap -#define Tcl_NRCmdSwap \ - (tclStubsPtr->tcl_NRCmdSwap) /* 586 */ -#endif -#ifndef Tcl_NRAddCallback -#define Tcl_NRAddCallback \ - (tclStubsPtr->tcl_NRAddCallback) /* 587 */ -#endif -#ifndef Tcl_NRCallObjProc -#define Tcl_NRCallObjProc \ - (tclStubsPtr->tcl_NRCallObjProc) /* 588 */ -#endif -#ifndef Tcl_GetFSDeviceFromStat -#define Tcl_GetFSDeviceFromStat \ - (tclStubsPtr->tcl_GetFSDeviceFromStat) /* 589 */ -#endif -#ifndef Tcl_GetFSInodeFromStat -#define Tcl_GetFSInodeFromStat \ - (tclStubsPtr->tcl_GetFSInodeFromStat) /* 590 */ -#endif -#ifndef Tcl_GetModeFromStat -#define Tcl_GetModeFromStat \ - (tclStubsPtr->tcl_GetModeFromStat) /* 591 */ -#endif -#ifndef Tcl_GetLinkCountFromStat -#define Tcl_GetLinkCountFromStat \ - (tclStubsPtr->tcl_GetLinkCountFromStat) /* 592 */ -#endif -#ifndef Tcl_GetUserIdFromStat -#define Tcl_GetUserIdFromStat \ - (tclStubsPtr->tcl_GetUserIdFromStat) /* 593 */ -#endif -#ifndef Tcl_GetGroupIdFromStat -#define Tcl_GetGroupIdFromStat \ - (tclStubsPtr->tcl_GetGroupIdFromStat) /* 594 */ -#endif -#ifndef Tcl_GetDeviceTypeFromStat -#define Tcl_GetDeviceTypeFromStat \ - (tclStubsPtr->tcl_GetDeviceTypeFromStat) /* 595 */ -#endif -#ifndef Tcl_GetAccessTimeFromStat -#define Tcl_GetAccessTimeFromStat \ - (tclStubsPtr->tcl_GetAccessTimeFromStat) /* 596 */ -#endif -#ifndef Tcl_GetModificationTimeFromStat -#define Tcl_GetModificationTimeFromStat \ - (tclStubsPtr->tcl_GetModificationTimeFromStat) /* 597 */ -#endif -#ifndef Tcl_GetChangeTimeFromStat -#define Tcl_GetChangeTimeFromStat \ - (tclStubsPtr->tcl_GetChangeTimeFromStat) /* 598 */ -#endif -#ifndef Tcl_GetSizeFromStat -#define Tcl_GetSizeFromStat \ - (tclStubsPtr->tcl_GetSizeFromStat) /* 599 */ -#endif -#ifndef Tcl_GetBlocksFromStat -#define Tcl_GetBlocksFromStat \ - (tclStubsPtr->tcl_GetBlocksFromStat) /* 600 */ -#endif -#ifndef Tcl_GetBlockSizeFromStat -#define Tcl_GetBlockSizeFromStat \ - (tclStubsPtr->tcl_GetBlockSizeFromStat) /* 601 */ -#endif -#ifndef Tcl_SetEnsembleParameterList -#define Tcl_SetEnsembleParameterList \ - (tclStubsPtr->tcl_SetEnsembleParameterList) /* 602 */ -#endif -#ifndef Tcl_GetEnsembleParameterList -#define Tcl_GetEnsembleParameterList \ - (tclStubsPtr->tcl_GetEnsembleParameterList) /* 603 */ -#endif -#ifndef Tcl_ParseArgsObjv -#define Tcl_ParseArgsObjv \ - (tclStubsPtr->tcl_ParseArgsObjv) /* 604 */ -#endif -#ifndef Tcl_GetErrorLine -#define Tcl_GetErrorLine \ - (tclStubsPtr->tcl_GetErrorLine) /* 605 */ -#endif -#ifndef Tcl_SetErrorLine -#define Tcl_SetErrorLine \ - (tclStubsPtr->tcl_SetErrorLine) /* 606 */ -#endif -#ifndef Tcl_TransferResult -#define Tcl_TransferResult \ - (tclStubsPtr->tcl_TransferResult) /* 607 */ -#endif -#ifndef Tcl_InterpActive -#define Tcl_InterpActive \ - (tclStubsPtr->tcl_InterpActive) /* 608 */ -#endif -#ifndef Tcl_BackgroundException -#define Tcl_BackgroundException \ - (tclStubsPtr->tcl_BackgroundException) /* 609 */ -#endif -#ifndef Tcl_ZlibDeflate -#define Tcl_ZlibDeflate \ - (tclStubsPtr->tcl_ZlibDeflate) /* 610 */ -#endif -#ifndef Tcl_ZlibInflate -#define Tcl_ZlibInflate \ - (tclStubsPtr->tcl_ZlibInflate) /* 611 */ -#endif -#ifndef Tcl_ZlibCRC32 -#define Tcl_ZlibCRC32 \ - (tclStubsPtr->tcl_ZlibCRC32) /* 612 */ -#endif -#ifndef Tcl_ZlibAdler32 -#define Tcl_ZlibAdler32 \ - (tclStubsPtr->tcl_ZlibAdler32) /* 613 */ -#endif -#ifndef Tcl_ZlibStreamInit -#define Tcl_ZlibStreamInit \ - (tclStubsPtr->tcl_ZlibStreamInit) /* 614 */ -#endif -#ifndef Tcl_ZlibStreamGetCommandName -#define Tcl_ZlibStreamGetCommandName \ - (tclStubsPtr->tcl_ZlibStreamGetCommandName) /* 615 */ -#endif -#ifndef Tcl_ZlibStreamEof -#define Tcl_ZlibStreamEof \ - (tclStubsPtr->tcl_ZlibStreamEof) /* 616 */ -#endif -#ifndef Tcl_ZlibStreamAdler32 -#define Tcl_ZlibStreamAdler32 \ - (tclStubsPtr->tcl_ZlibStreamAdler32) /* 617 */ -#endif -#ifndef Tcl_ZlibStreamPut -#define Tcl_ZlibStreamPut \ - (tclStubsPtr->tcl_ZlibStreamPut) /* 618 */ -#endif -#ifndef Tcl_ZlibStreamGet -#define Tcl_ZlibStreamGet \ - (tclStubsPtr->tcl_ZlibStreamGet) /* 619 */ -#endif -#ifndef Tcl_ZlibStreamClose -#define Tcl_ZlibStreamClose \ - (tclStubsPtr->tcl_ZlibStreamClose) /* 620 */ -#endif -#ifndef Tcl_ZlibStreamReset -#define Tcl_ZlibStreamReset \ - (tclStubsPtr->tcl_ZlibStreamReset) /* 621 */ -#endif -#ifndef Tcl_SetStartupScript -#define Tcl_SetStartupScript \ - (tclStubsPtr->tcl_SetStartupScript) /* 622 */ -#endif -#ifndef Tcl_GetStartupScript -#define Tcl_GetStartupScript \ - (tclStubsPtr->tcl_GetStartupScript) /* 623 */ -#endif -#ifndef Tcl_CloseEx -#define Tcl_CloseEx \ - (tclStubsPtr->tcl_CloseEx) /* 624 */ -#endif - -#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ - -/* !END!: Do not edit above this line. */ - -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -#endif /* _TCLDECLS */ - +/* + * tclDecls.h -- + * + * Declarations of functions in the platform independent public Tcl API. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclDecls.h,v 1.165 2008/12/18 04:38:01 dgp Exp $ + */ + +#ifndef _TCLDECLS +#define _TCLDECLS + +#undef TCL_STORAGE_CLASS +#ifdef BUILD_tcl +# define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TCL_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif +#endif + +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +/* + * Exported function declarations: + */ + +#ifndef Tcl_PkgProvideEx_TCL_DECLARED +#define Tcl_PkgProvideEx_TCL_DECLARED +/* 0 */ +EXTERN int Tcl_PkgProvideEx (Tcl_Interp * interp, + const char * name, const char * version, + ClientData clientData); +#endif +#ifndef Tcl_PkgRequireEx_TCL_DECLARED +#define Tcl_PkgRequireEx_TCL_DECLARED +/* 1 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, + const char * name, const char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_Panic_TCL_DECLARED +#define Tcl_Panic_TCL_DECLARED +/* 2 */ +EXTERN void Tcl_Panic (const char * format, ...); +#endif +#ifndef Tcl_Alloc_TCL_DECLARED +#define Tcl_Alloc_TCL_DECLARED +/* 3 */ +EXTERN char * Tcl_Alloc (unsigned int size); +#endif +#ifndef Tcl_Free_TCL_DECLARED +#define Tcl_Free_TCL_DECLARED +/* 4 */ +EXTERN void Tcl_Free (char * ptr); +#endif +#ifndef Tcl_Realloc_TCL_DECLARED +#define Tcl_Realloc_TCL_DECLARED +/* 5 */ +EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_DbCkalloc_TCL_DECLARED +#define Tcl_DbCkalloc_TCL_DECLARED +/* 6 */ +EXTERN char * Tcl_DbCkalloc (unsigned int size, const char * file, + int line); +#endif +#ifndef Tcl_DbCkfree_TCL_DECLARED +#define Tcl_DbCkfree_TCL_DECLARED +/* 7 */ +EXTERN int Tcl_DbCkfree (char * ptr, const char * file, + int line); +#endif +#ifndef Tcl_DbCkrealloc_TCL_DECLARED +#define Tcl_DbCkrealloc_TCL_DECLARED +/* 8 */ +EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, + const char * file, int line); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler_TCL_DECLARED +#define Tcl_CreateFileHandler_TCL_DECLARED +/* 9 */ +EXTERN void Tcl_CreateFileHandler (int fd, int mask, + Tcl_FileProc * proc, ClientData clientData); +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler_TCL_DECLARED +#define Tcl_DeleteFileHandler_TCL_DECLARED +/* 10 */ +EXTERN void Tcl_DeleteFileHandler (int fd); +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer_TCL_DECLARED +#define Tcl_SetTimer_TCL_DECLARED +/* 11 */ +EXTERN void Tcl_SetTimer (const Tcl_Time * timePtr); +#endif +#ifndef Tcl_Sleep_TCL_DECLARED +#define Tcl_Sleep_TCL_DECLARED +/* 12 */ +EXTERN void Tcl_Sleep (int ms); +#endif +#ifndef Tcl_WaitForEvent_TCL_DECLARED +#define Tcl_WaitForEvent_TCL_DECLARED +/* 13 */ +EXTERN int Tcl_WaitForEvent (const Tcl_Time * timePtr); +#endif +#ifndef Tcl_AppendAllObjTypes_TCL_DECLARED +#define Tcl_AppendAllObjTypes_TCL_DECLARED +/* 14 */ +EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendStringsToObj_TCL_DECLARED +#define Tcl_AppendStringsToObj_TCL_DECLARED +/* 15 */ +EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); +#endif +#ifndef Tcl_AppendToObj_TCL_DECLARED +#define Tcl_AppendToObj_TCL_DECLARED +/* 16 */ +EXTERN void Tcl_AppendToObj (Tcl_Obj * objPtr, + const char * bytes, int length); +#endif +#ifndef Tcl_ConcatObj_TCL_DECLARED +#define Tcl_ConcatObj_TCL_DECLARED +/* 17 */ +EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_ConvertToType_TCL_DECLARED +#define Tcl_ConvertToType_TCL_DECLARED +/* 18 */ +EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, + Tcl_Obj * objPtr, + const Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_DbDecrRefCount_TCL_DECLARED +#define Tcl_DbDecrRefCount_TCL_DECLARED +/* 19 */ +EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, + const char * file, int line); +#endif +#ifndef Tcl_DbIncrRefCount_TCL_DECLARED +#define Tcl_DbIncrRefCount_TCL_DECLARED +/* 20 */ +EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, + const char * file, int line); +#endif +#ifndef Tcl_DbIsShared_TCL_DECLARED +#define Tcl_DbIsShared_TCL_DECLARED +/* 21 */ +EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, const char * file, + int line); +#endif +#ifndef Tcl_DbNewBooleanObj_TCL_DECLARED +#define Tcl_DbNewBooleanObj_TCL_DECLARED +/* 22 */ +EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, + const char * file, int line); +#endif +#ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED +#define Tcl_DbNewByteArrayObj_TCL_DECLARED +/* 23 */ +EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (const unsigned char * bytes, + int length, const char * file, int line); +#endif +#ifndef Tcl_DbNewDoubleObj_TCL_DECLARED +#define Tcl_DbNewDoubleObj_TCL_DECLARED +/* 24 */ +EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, + const char * file, int line); +#endif +#ifndef Tcl_DbNewListObj_TCL_DECLARED +#define Tcl_DbNewListObj_TCL_DECLARED +/* 25 */ +EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *const * objv, + const char * file, int line); +#endif +#ifndef Tcl_DbNewLongObj_TCL_DECLARED +#define Tcl_DbNewLongObj_TCL_DECLARED +/* 26 */ +EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, const char * file, + int line); +#endif +#ifndef Tcl_DbNewObj_TCL_DECLARED +#define Tcl_DbNewObj_TCL_DECLARED +/* 27 */ +EXTERN Tcl_Obj * Tcl_DbNewObj (const char * file, int line); +#endif +#ifndef Tcl_DbNewStringObj_TCL_DECLARED +#define Tcl_DbNewStringObj_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Obj * Tcl_DbNewStringObj (const char * bytes, int length, + const char * file, int line); +#endif +#ifndef Tcl_DuplicateObj_TCL_DECLARED +#define Tcl_DuplicateObj_TCL_DECLARED +/* 29 */ +EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); +#endif +#ifndef TclFreeObj_TCL_DECLARED +#define TclFreeObj_TCL_DECLARED +/* 30 */ +EXTERN void TclFreeObj (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetBoolean_TCL_DECLARED +#define Tcl_GetBoolean_TCL_DECLARED +/* 31 */ +EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, + const char * src, int * boolPtr); +#endif +#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED +#define Tcl_GetBooleanFromObj_TCL_DECLARED +/* 32 */ +EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * boolPtr); +#endif +#ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED +#define Tcl_GetByteArrayFromObj_TCL_DECLARED +/* 33 */ +EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetDouble_TCL_DECLARED +#define Tcl_GetDouble_TCL_DECLARED +/* 34 */ +EXTERN int Tcl_GetDouble (Tcl_Interp * interp, const char * src, + double * doublePtr); +#endif +#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED +#define Tcl_GetDoubleFromObj_TCL_DECLARED +/* 35 */ +EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * doublePtr); +#endif +#ifndef Tcl_GetIndexFromObj_TCL_DECLARED +#define Tcl_GetIndexFromObj_TCL_DECLARED +/* 36 */ +EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, + CONST84 char *const * tablePtr, + const char * msg, int flags, int * indexPtr); +#endif +#ifndef Tcl_GetInt_TCL_DECLARED +#define Tcl_GetInt_TCL_DECLARED +/* 37 */ +EXTERN int Tcl_GetInt (Tcl_Interp * interp, const char * src, + int * intPtr); +#endif +#ifndef Tcl_GetIntFromObj_TCL_DECLARED +#define Tcl_GetIntFromObj_TCL_DECLARED +/* 38 */ +EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * intPtr); +#endif +#ifndef Tcl_GetLongFromObj_TCL_DECLARED +#define Tcl_GetLongFromObj_TCL_DECLARED +/* 39 */ +EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * longPtr); +#endif +#ifndef Tcl_GetObjType_TCL_DECLARED +#define Tcl_GetObjType_TCL_DECLARED +/* 40 */ +EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (const char * typeName); +#endif +#ifndef Tcl_GetStringFromObj_TCL_DECLARED +#define Tcl_GetStringFromObj_TCL_DECLARED +/* 41 */ +EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_InvalidateStringRep_TCL_DECLARED +#define Tcl_InvalidateStringRep_TCL_DECLARED +/* 42 */ +EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjAppendList_TCL_DECLARED +#define Tcl_ListObjAppendList_TCL_DECLARED +/* 43 */ +EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); +#endif +#ifndef Tcl_ListObjAppendElement_TCL_DECLARED +#define Tcl_ListObjAppendElement_TCL_DECLARED +/* 44 */ +EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, + Tcl_Obj * listPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_ListObjGetElements_TCL_DECLARED +#define Tcl_ListObjGetElements_TCL_DECLARED +/* 45 */ +EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * objcPtr, + Tcl_Obj *** objvPtr); +#endif +#ifndef Tcl_ListObjIndex_TCL_DECLARED +#define Tcl_ListObjIndex_TCL_DECLARED +/* 46 */ +EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, + Tcl_Obj * listPtr, int index, + Tcl_Obj ** objPtrPtr); +#endif +#ifndef Tcl_ListObjLength_TCL_DECLARED +#define Tcl_ListObjLength_TCL_DECLARED +/* 47 */ +EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, + Tcl_Obj * listPtr, int * lengthPtr); +#endif +#ifndef Tcl_ListObjReplace_TCL_DECLARED +#define Tcl_ListObjReplace_TCL_DECLARED +/* 48 */ +EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, + Tcl_Obj * listPtr, int first, int count, + int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_NewBooleanObj_TCL_DECLARED +#define Tcl_NewBooleanObj_TCL_DECLARED +/* 49 */ +EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); +#endif +#ifndef Tcl_NewByteArrayObj_TCL_DECLARED +#define Tcl_NewByteArrayObj_TCL_DECLARED +/* 50 */ +EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char * bytes, + int length); +#endif +#ifndef Tcl_NewDoubleObj_TCL_DECLARED +#define Tcl_NewDoubleObj_TCL_DECLARED +/* 51 */ +EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); +#endif +#ifndef Tcl_NewIntObj_TCL_DECLARED +#define Tcl_NewIntObj_TCL_DECLARED +/* 52 */ +EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); +#endif +#ifndef Tcl_NewListObj_TCL_DECLARED +#define Tcl_NewListObj_TCL_DECLARED +/* 53 */ +EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_NewLongObj_TCL_DECLARED +#define Tcl_NewLongObj_TCL_DECLARED +/* 54 */ +EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); +#endif +#ifndef Tcl_NewObj_TCL_DECLARED +#define Tcl_NewObj_TCL_DECLARED +/* 55 */ +EXTERN Tcl_Obj * Tcl_NewObj (void); +#endif +#ifndef Tcl_NewStringObj_TCL_DECLARED +#define Tcl_NewStringObj_TCL_DECLARED +/* 56 */ +EXTERN Tcl_Obj * Tcl_NewStringObj (const char * bytes, int length); +#endif +#ifndef Tcl_SetBooleanObj_TCL_DECLARED +#define Tcl_SetBooleanObj_TCL_DECLARED +/* 57 */ +EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); +#endif +#ifndef Tcl_SetByteArrayLength_TCL_DECLARED +#define Tcl_SetByteArrayLength_TCL_DECLARED +/* 58 */ +EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetByteArrayObj_TCL_DECLARED +#define Tcl_SetByteArrayObj_TCL_DECLARED +/* 59 */ +EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, + const unsigned char * bytes, int length); +#endif +#ifndef Tcl_SetDoubleObj_TCL_DECLARED +#define Tcl_SetDoubleObj_TCL_DECLARED +/* 60 */ +EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, + double doubleValue); +#endif +#ifndef Tcl_SetIntObj_TCL_DECLARED +#define Tcl_SetIntObj_TCL_DECLARED +/* 61 */ +EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); +#endif +#ifndef Tcl_SetListObj_TCL_DECLARED +#define Tcl_SetListObj_TCL_DECLARED +/* 62 */ +EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_SetLongObj_TCL_DECLARED +#define Tcl_SetLongObj_TCL_DECLARED +/* 63 */ +EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); +#endif +#ifndef Tcl_SetObjLength_TCL_DECLARED +#define Tcl_SetObjLength_TCL_DECLARED +/* 64 */ +EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); +#endif +#ifndef Tcl_SetStringObj_TCL_DECLARED +#define Tcl_SetStringObj_TCL_DECLARED +/* 65 */ +EXTERN void Tcl_SetStringObj (Tcl_Obj * objPtr, + const char * bytes, int length); +#endif +#ifndef Tcl_AddErrorInfo_TCL_DECLARED +#define Tcl_AddErrorInfo_TCL_DECLARED +/* 66 */ +EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, + const char * message); +#endif +#ifndef Tcl_AddObjErrorInfo_TCL_DECLARED +#define Tcl_AddObjErrorInfo_TCL_DECLARED +/* 67 */ +EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, + const char * message, int length); +#endif +#ifndef Tcl_AllowExceptions_TCL_DECLARED +#define Tcl_AllowExceptions_TCL_DECLARED +/* 68 */ +EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); +#endif +#ifndef Tcl_AppendElement_TCL_DECLARED +#define Tcl_AppendElement_TCL_DECLARED +/* 69 */ +EXTERN void Tcl_AppendElement (Tcl_Interp * interp, + const char * element); +#endif +#ifndef Tcl_AppendResult_TCL_DECLARED +#define Tcl_AppendResult_TCL_DECLARED +/* 70 */ +EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_AsyncCreate_TCL_DECLARED +#define Tcl_AsyncCreate_TCL_DECLARED +/* 71 */ +EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AsyncDelete_TCL_DECLARED +#define Tcl_AsyncDelete_TCL_DECLARED +/* 72 */ +EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncInvoke_TCL_DECLARED +#define Tcl_AsyncInvoke_TCL_DECLARED +/* 73 */ +EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); +#endif +#ifndef Tcl_AsyncMark_TCL_DECLARED +#define Tcl_AsyncMark_TCL_DECLARED +/* 74 */ +EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); +#endif +#ifndef Tcl_AsyncReady_TCL_DECLARED +#define Tcl_AsyncReady_TCL_DECLARED +/* 75 */ +EXTERN int Tcl_AsyncReady (void); +#endif +#ifndef Tcl_BackgroundError_TCL_DECLARED +#define Tcl_BackgroundError_TCL_DECLARED +/* 76 */ +EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); +#endif +#ifndef Tcl_Backslash_TCL_DECLARED +#define Tcl_Backslash_TCL_DECLARED +/* 77 */ +EXTERN char Tcl_Backslash (const char * src, int * readPtr); +#endif +#ifndef Tcl_BadChannelOption_TCL_DECLARED +#define Tcl_BadChannelOption_TCL_DECLARED +/* 78 */ +EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, + const char * optionName, + const char * optionList); +#endif +#ifndef Tcl_CallWhenDeleted_TCL_DECLARED +#define Tcl_CallWhenDeleted_TCL_DECLARED +/* 79 */ +EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CancelIdleCall_TCL_DECLARED +#define Tcl_CancelIdleCall_TCL_DECLARED +/* 80 */ +EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, + ClientData clientData); +#endif +#ifndef Tcl_Close_TCL_DECLARED +#define Tcl_Close_TCL_DECLARED +/* 81 */ +EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); +#endif +#ifndef Tcl_CommandComplete_TCL_DECLARED +#define Tcl_CommandComplete_TCL_DECLARED +/* 82 */ +EXTERN int Tcl_CommandComplete (const char * cmd); +#endif +#ifndef Tcl_Concat_TCL_DECLARED +#define Tcl_Concat_TCL_DECLARED +/* 83 */ +EXTERN char * Tcl_Concat (int argc, CONST84 char *const * argv); +#endif +#ifndef Tcl_ConvertElement_TCL_DECLARED +#define Tcl_ConvertElement_TCL_DECLARED +/* 84 */ +EXTERN int Tcl_ConvertElement (const char * src, char * dst, + int flags); +#endif +#ifndef Tcl_ConvertCountedElement_TCL_DECLARED +#define Tcl_ConvertCountedElement_TCL_DECLARED +/* 85 */ +EXTERN int Tcl_ConvertCountedElement (const char * src, + int length, char * dst, int flags); +#endif +#ifndef Tcl_CreateAlias_TCL_DECLARED +#define Tcl_CreateAlias_TCL_DECLARED +/* 86 */ +EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, + const char * slaveCmd, Tcl_Interp * target, + const char * targetCmd, int argc, + CONST84 char *const * argv); +#endif +#ifndef Tcl_CreateAliasObj_TCL_DECLARED +#define Tcl_CreateAliasObj_TCL_DECLARED +/* 87 */ +EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, + const char * slaveCmd, Tcl_Interp * target, + const char * targetCmd, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_CreateChannel_TCL_DECLARED +#define Tcl_CreateChannel_TCL_DECLARED +/* 88 */ +EXTERN Tcl_Channel Tcl_CreateChannel (const Tcl_ChannelType * typePtr, + const char * chanName, + ClientData instanceData, int mask); +#endif +#ifndef Tcl_CreateChannelHandler_TCL_DECLARED +#define Tcl_CreateChannelHandler_TCL_DECLARED +/* 89 */ +EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateCloseHandler_TCL_DECLARED +#define Tcl_CreateCloseHandler_TCL_DECLARED +/* 90 */ +EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateCommand_TCL_DECLARED +#define Tcl_CreateCommand_TCL_DECLARED +/* 91 */ +EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_CmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateEventSource_TCL_DECLARED +#define Tcl_CreateEventSource_TCL_DECLARED +/* 92 */ +EXTERN void Tcl_CreateEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_CreateExitHandler_TCL_DECLARED +#define Tcl_CreateExitHandler_TCL_DECLARED +/* 93 */ +EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_CreateInterp_TCL_DECLARED +#define Tcl_CreateInterp_TCL_DECLARED +/* 94 */ +EXTERN Tcl_Interp * Tcl_CreateInterp (void); +#endif +#ifndef Tcl_CreateMathFunc_TCL_DECLARED +#define Tcl_CreateMathFunc_TCL_DECLARED +/* 95 */ +EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, + const char * name, int numArgs, + Tcl_ValueType * argTypes, + Tcl_MathProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateObjCommand_TCL_DECLARED +#define Tcl_CreateObjCommand_TCL_DECLARED +/* 96 */ +EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_ObjCmdProc * proc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_CreateSlave_TCL_DECLARED +#define Tcl_CreateSlave_TCL_DECLARED +/* 97 */ +EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, + const char * slaveName, int isSafe); +#endif +#ifndef Tcl_CreateTimerHandler_TCL_DECLARED +#define Tcl_CreateTimerHandler_TCL_DECLARED +/* 98 */ +EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, + Tcl_TimerProc * proc, ClientData clientData); +#endif +#ifndef Tcl_CreateTrace_TCL_DECLARED +#define Tcl_CreateTrace_TCL_DECLARED +/* 99 */ +EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, + Tcl_CmdTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteAssocData_TCL_DECLARED +#define Tcl_DeleteAssocData_TCL_DECLARED +/* 100 */ +EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, + const char * name); +#endif +#ifndef Tcl_DeleteChannelHandler_TCL_DECLARED +#define Tcl_DeleteChannelHandler_TCL_DECLARED +/* 101 */ +EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, + Tcl_ChannelProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteCloseHandler_TCL_DECLARED +#define Tcl_DeleteCloseHandler_TCL_DECLARED +/* 102 */ +EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, + Tcl_CloseProc * proc, ClientData clientData); +#endif +#ifndef Tcl_DeleteCommand_TCL_DECLARED +#define Tcl_DeleteCommand_TCL_DECLARED +/* 103 */ +EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, + const char * cmdName); +#endif +#ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED +#define Tcl_DeleteCommandFromToken_TCL_DECLARED +/* 104 */ +EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_DeleteEvents_TCL_DECLARED +#define Tcl_DeleteEvents_TCL_DECLARED +/* 105 */ +EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteEventSource_TCL_DECLARED +#define Tcl_DeleteEventSource_TCL_DECLARED +/* 106 */ +EXTERN void Tcl_DeleteEventSource ( + Tcl_EventSetupProc * setupProc, + Tcl_EventCheckProc * checkProc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteExitHandler_TCL_DECLARED +#define Tcl_DeleteExitHandler_TCL_DECLARED +/* 107 */ +EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteHashEntry_TCL_DECLARED +#define Tcl_DeleteHashEntry_TCL_DECLARED +/* 108 */ +EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); +#endif +#ifndef Tcl_DeleteHashTable_TCL_DECLARED +#define Tcl_DeleteHashTable_TCL_DECLARED +/* 109 */ +EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_DeleteInterp_TCL_DECLARED +#define Tcl_DeleteInterp_TCL_DECLARED +/* 110 */ +EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids_TCL_DECLARED +#define Tcl_DetachPids_TCL_DECLARED +/* 111 */ +EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler_TCL_DECLARED +#define Tcl_DeleteTimerHandler_TCL_DECLARED +/* 112 */ +EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); +#endif +#ifndef Tcl_DeleteTrace_TCL_DECLARED +#define Tcl_DeleteTrace_TCL_DECLARED +/* 113 */ +EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, + Tcl_Trace trace); +#endif +#ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED +#define Tcl_DontCallWhenDeleted_TCL_DECLARED +/* 114 */ +EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DoOneEvent_TCL_DECLARED +#define Tcl_DoOneEvent_TCL_DECLARED +/* 115 */ +EXTERN int Tcl_DoOneEvent (int flags); +#endif +#ifndef Tcl_DoWhenIdle_TCL_DECLARED +#define Tcl_DoWhenIdle_TCL_DECLARED +/* 116 */ +EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DStringAppend_TCL_DECLARED +#define Tcl_DStringAppend_TCL_DECLARED +/* 117 */ +EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, + const char * bytes, int length); +#endif +#ifndef Tcl_DStringAppendElement_TCL_DECLARED +#define Tcl_DStringAppendElement_TCL_DECLARED +/* 118 */ +EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, + const char * element); +#endif +#ifndef Tcl_DStringEndSublist_TCL_DECLARED +#define Tcl_DStringEndSublist_TCL_DECLARED +/* 119 */ +EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringFree_TCL_DECLARED +#define Tcl_DStringFree_TCL_DECLARED +/* 120 */ +EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringGetResult_TCL_DECLARED +#define Tcl_DStringGetResult_TCL_DECLARED +/* 121 */ +EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringInit_TCL_DECLARED +#define Tcl_DStringInit_TCL_DECLARED +/* 122 */ +EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringResult_TCL_DECLARED +#define Tcl_DStringResult_TCL_DECLARED +/* 123 */ +EXTERN void Tcl_DStringResult (Tcl_Interp * interp, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_DStringSetLength_TCL_DECLARED +#define Tcl_DStringSetLength_TCL_DECLARED +/* 124 */ +EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, + int length); +#endif +#ifndef Tcl_DStringStartSublist_TCL_DECLARED +#define Tcl_DStringStartSublist_TCL_DECLARED +/* 125 */ +EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); +#endif +#ifndef Tcl_Eof_TCL_DECLARED +#define Tcl_Eof_TCL_DECLARED +/* 126 */ +EXTERN int Tcl_Eof (Tcl_Channel chan); +#endif +#ifndef Tcl_ErrnoId_TCL_DECLARED +#define Tcl_ErrnoId_TCL_DECLARED +/* 127 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); +#endif +#ifndef Tcl_ErrnoMsg_TCL_DECLARED +#define Tcl_ErrnoMsg_TCL_DECLARED +/* 128 */ +EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); +#endif +#ifndef Tcl_Eval_TCL_DECLARED +#define Tcl_Eval_TCL_DECLARED +/* 129 */ +EXTERN int Tcl_Eval (Tcl_Interp * interp, const char * script); +#endif +#ifndef Tcl_EvalFile_TCL_DECLARED +#define Tcl_EvalFile_TCL_DECLARED +/* 130 */ +EXTERN int Tcl_EvalFile (Tcl_Interp * interp, + const char * fileName); +#endif +#ifndef Tcl_EvalObj_TCL_DECLARED +#define Tcl_EvalObj_TCL_DECLARED +/* 131 */ +EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_EventuallyFree_TCL_DECLARED +#define Tcl_EventuallyFree_TCL_DECLARED +/* 132 */ +EXTERN void Tcl_EventuallyFree (ClientData clientData, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_Exit_TCL_DECLARED +#define Tcl_Exit_TCL_DECLARED +/* 133 */ +EXTERN void Tcl_Exit (int status); +#endif +#ifndef Tcl_ExposeCommand_TCL_DECLARED +#define Tcl_ExposeCommand_TCL_DECLARED +/* 134 */ +EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, + const char * hiddenCmdToken, + const char * cmdName); +#endif +#ifndef Tcl_ExprBoolean_TCL_DECLARED +#define Tcl_ExprBoolean_TCL_DECLARED +/* 135 */ +EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, + const char * expr, int * ptr); +#endif +#ifndef Tcl_ExprBooleanObj_TCL_DECLARED +#define Tcl_ExprBooleanObj_TCL_DECLARED +/* 136 */ +EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int * ptr); +#endif +#ifndef Tcl_ExprDouble_TCL_DECLARED +#define Tcl_ExprDouble_TCL_DECLARED +/* 137 */ +EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, + const char * expr, double * ptr); +#endif +#ifndef Tcl_ExprDoubleObj_TCL_DECLARED +#define Tcl_ExprDoubleObj_TCL_DECLARED +/* 138 */ +EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, double * ptr); +#endif +#ifndef Tcl_ExprLong_TCL_DECLARED +#define Tcl_ExprLong_TCL_DECLARED +/* 139 */ +EXTERN int Tcl_ExprLong (Tcl_Interp * interp, const char * expr, + long * ptr); +#endif +#ifndef Tcl_ExprLongObj_TCL_DECLARED +#define Tcl_ExprLongObj_TCL_DECLARED +/* 140 */ +EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, long * ptr); +#endif +#ifndef Tcl_ExprObj_TCL_DECLARED +#define Tcl_ExprObj_TCL_DECLARED +/* 141 */ +EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + Tcl_Obj ** resultPtrPtr); +#endif +#ifndef Tcl_ExprString_TCL_DECLARED +#define Tcl_ExprString_TCL_DECLARED +/* 142 */ +EXTERN int Tcl_ExprString (Tcl_Interp * interp, + const char * expr); +#endif +#ifndef Tcl_Finalize_TCL_DECLARED +#define Tcl_Finalize_TCL_DECLARED +/* 143 */ +EXTERN void Tcl_Finalize (void); +#endif +#ifndef Tcl_FindExecutable_TCL_DECLARED +#define Tcl_FindExecutable_TCL_DECLARED +/* 144 */ +EXTERN void Tcl_FindExecutable (const char * argv0); +#endif +#ifndef Tcl_FirstHashEntry_TCL_DECLARED +#define Tcl_FirstHashEntry_TCL_DECLARED +/* 145 */ +EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, + Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_Flush_TCL_DECLARED +#define Tcl_Flush_TCL_DECLARED +/* 146 */ +EXTERN int Tcl_Flush (Tcl_Channel chan); +#endif +#ifndef Tcl_FreeResult_TCL_DECLARED +#define Tcl_FreeResult_TCL_DECLARED +/* 147 */ +EXTERN void Tcl_FreeResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetAlias_TCL_DECLARED +#define Tcl_GetAlias_TCL_DECLARED +/* 148 */ +EXTERN int Tcl_GetAlias (Tcl_Interp * interp, + const char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_GetAliasObj_TCL_DECLARED +#define Tcl_GetAliasObj_TCL_DECLARED +/* 149 */ +EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, + const char * slaveCmd, + Tcl_Interp ** targetInterpPtr, + CONST84 char ** targetCmdPtr, int * objcPtr, + Tcl_Obj *** objv); +#endif +#ifndef Tcl_GetAssocData_TCL_DECLARED +#define Tcl_GetAssocData_TCL_DECLARED +/* 150 */ +EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, + const char * name, + Tcl_InterpDeleteProc ** procPtr); +#endif +#ifndef Tcl_GetChannel_TCL_DECLARED +#define Tcl_GetChannel_TCL_DECLARED +/* 151 */ +EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, + const char * chanName, int * modePtr); +#endif +#ifndef Tcl_GetChannelBufferSize_TCL_DECLARED +#define Tcl_GetChannelBufferSize_TCL_DECLARED +/* 152 */ +EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelHandle_TCL_DECLARED +#define Tcl_GetChannelHandle_TCL_DECLARED +/* 153 */ +EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, + int direction, ClientData * handlePtr); +#endif +#ifndef Tcl_GetChannelInstanceData_TCL_DECLARED +#define Tcl_GetChannelInstanceData_TCL_DECLARED +/* 154 */ +EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelMode_TCL_DECLARED +#define Tcl_GetChannelMode_TCL_DECLARED +/* 155 */ +EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelName_TCL_DECLARED +#define Tcl_GetChannelName_TCL_DECLARED +/* 156 */ +EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); +#endif +#ifndef Tcl_GetChannelOption_TCL_DECLARED +#define Tcl_GetChannelOption_TCL_DECLARED +/* 157 */ +EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, const char * optionName, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetChannelType_TCL_DECLARED +#define Tcl_GetChannelType_TCL_DECLARED +/* 158 */ +EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); +#endif +#ifndef Tcl_GetCommandInfo_TCL_DECLARED +#define Tcl_GetCommandInfo_TCL_DECLARED +/* 159 */ +EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, + const char * cmdName, Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_GetCommandName_TCL_DECLARED +#define Tcl_GetCommandName_TCL_DECLARED +/* 160 */ +EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, + Tcl_Command command); +#endif +#ifndef Tcl_GetErrno_TCL_DECLARED +#define Tcl_GetErrno_TCL_DECLARED +/* 161 */ +EXTERN int Tcl_GetErrno (void); +#endif +#ifndef Tcl_GetHostName_TCL_DECLARED +#define Tcl_GetHostName_TCL_DECLARED +/* 162 */ +EXTERN CONST84_RETURN char * Tcl_GetHostName (void); +#endif +#ifndef Tcl_GetInterpPath_TCL_DECLARED +#define Tcl_GetInterpPath_TCL_DECLARED +/* 163 */ +EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, + Tcl_Interp * slaveInterp); +#endif +#ifndef Tcl_GetMaster_TCL_DECLARED +#define Tcl_GetMaster_TCL_DECLARED +/* 164 */ +EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetNameOfExecutable_TCL_DECLARED +#define Tcl_GetNameOfExecutable_TCL_DECLARED +/* 165 */ +EXTERN const char * Tcl_GetNameOfExecutable (void); +#endif +#ifndef Tcl_GetObjResult_TCL_DECLARED +#define Tcl_GetObjResult_TCL_DECLARED +/* 166 */ +EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + const char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile_TCL_DECLARED +#define Tcl_GetOpenFile_TCL_DECLARED +/* 167 */ +EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, + const char * chanID, int forWriting, + int checkUsage, ClientData * filePtr); +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType_TCL_DECLARED +#define Tcl_GetPathType_TCL_DECLARED +/* 168 */ +EXTERN Tcl_PathType Tcl_GetPathType (const char * path); +#endif +#ifndef Tcl_Gets_TCL_DECLARED +#define Tcl_Gets_TCL_DECLARED +/* 169 */ +EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetsObj_TCL_DECLARED +#define Tcl_GetsObj_TCL_DECLARED +/* 170 */ +EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetServiceMode_TCL_DECLARED +#define Tcl_GetServiceMode_TCL_DECLARED +/* 171 */ +EXTERN int Tcl_GetServiceMode (void); +#endif +#ifndef Tcl_GetSlave_TCL_DECLARED +#define Tcl_GetSlave_TCL_DECLARED +/* 172 */ +EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, + const char * slaveName); +#endif +#ifndef Tcl_GetStdChannel_TCL_DECLARED +#define Tcl_GetStdChannel_TCL_DECLARED +/* 173 */ +EXTERN Tcl_Channel Tcl_GetStdChannel (int type); +#endif +#ifndef Tcl_GetStringResult_TCL_DECLARED +#define Tcl_GetStringResult_TCL_DECLARED +/* 174 */ +EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetVar_TCL_DECLARED +#define Tcl_GetVar_TCL_DECLARED +/* 175 */ +EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, + const char * varName, int flags); +#endif +#ifndef Tcl_GetVar2_TCL_DECLARED +#define Tcl_GetVar2_TCL_DECLARED +/* 176 */ +EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags); +#endif +#ifndef Tcl_GlobalEval_TCL_DECLARED +#define Tcl_GlobalEval_TCL_DECLARED +/* 177 */ +EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, + const char * command); +#endif +#ifndef Tcl_GlobalEvalObj_TCL_DECLARED +#define Tcl_GlobalEvalObj_TCL_DECLARED +/* 178 */ +EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_HideCommand_TCL_DECLARED +#define Tcl_HideCommand_TCL_DECLARED +/* 179 */ +EXTERN int Tcl_HideCommand (Tcl_Interp * interp, + const char * cmdName, + const char * hiddenCmdToken); +#endif +#ifndef Tcl_Init_TCL_DECLARED +#define Tcl_Init_TCL_DECLARED +/* 180 */ +EXTERN int Tcl_Init (Tcl_Interp * interp); +#endif +#ifndef Tcl_InitHashTable_TCL_DECLARED +#define Tcl_InitHashTable_TCL_DECLARED +/* 181 */ +EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, + int keyType); +#endif +#ifndef Tcl_InputBlocked_TCL_DECLARED +#define Tcl_InputBlocked_TCL_DECLARED +/* 182 */ +EXTERN int Tcl_InputBlocked (Tcl_Channel chan); +#endif +#ifndef Tcl_InputBuffered_TCL_DECLARED +#define Tcl_InputBuffered_TCL_DECLARED +/* 183 */ +EXTERN int Tcl_InputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_InterpDeleted_TCL_DECLARED +#define Tcl_InterpDeleted_TCL_DECLARED +/* 184 */ +EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); +#endif +#ifndef Tcl_IsSafe_TCL_DECLARED +#define Tcl_IsSafe_TCL_DECLARED +/* 185 */ +EXTERN int Tcl_IsSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_JoinPath_TCL_DECLARED +#define Tcl_JoinPath_TCL_DECLARED +/* 186 */ +EXTERN char * Tcl_JoinPath (int argc, CONST84 char *const * argv, + Tcl_DString * resultPtr); +#endif +#ifndef Tcl_LinkVar_TCL_DECLARED +#define Tcl_LinkVar_TCL_DECLARED +/* 187 */ +EXTERN int Tcl_LinkVar (Tcl_Interp * interp, + const char * varName, char * addr, int type); +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel_TCL_DECLARED +#define Tcl_MakeFileChannel_TCL_DECLARED +/* 189 */ +EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); +#endif +#ifndef Tcl_MakeSafe_TCL_DECLARED +#define Tcl_MakeSafe_TCL_DECLARED +/* 190 */ +EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); +#endif +#ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED +#define Tcl_MakeTcpClientChannel_TCL_DECLARED +/* 191 */ +EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); +#endif +#ifndef Tcl_Merge_TCL_DECLARED +#define Tcl_Merge_TCL_DECLARED +/* 192 */ +EXTERN char * Tcl_Merge (int argc, CONST84 char *const * argv); +#endif +#ifndef Tcl_NextHashEntry_TCL_DECLARED +#define Tcl_NextHashEntry_TCL_DECLARED +/* 193 */ +EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); +#endif +#ifndef Tcl_NotifyChannel_TCL_DECLARED +#define Tcl_NotifyChannel_TCL_DECLARED +/* 194 */ +EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); +#endif +#ifndef Tcl_ObjGetVar2_TCL_DECLARED +#define Tcl_ObjGetVar2_TCL_DECLARED +/* 195 */ +EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + int flags); +#endif +#ifndef Tcl_ObjSetVar2_TCL_DECLARED +#define Tcl_ObjSetVar2_TCL_DECLARED +/* 196 */ +EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, + Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, + Tcl_Obj * newValuePtr, int flags); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel_TCL_DECLARED +#define Tcl_OpenCommandChannel_TCL_DECLARED +/* 197 */ +EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, + int argc, CONST84 char ** argv, int flags); +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel_TCL_DECLARED +#define Tcl_OpenFileChannel_TCL_DECLARED +/* 198 */ +EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, + const char * fileName, + const char * modeString, int permissions); +#endif +#ifndef Tcl_OpenTcpClient_TCL_DECLARED +#define Tcl_OpenTcpClient_TCL_DECLARED +/* 199 */ +EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, + const char * address, const char * myaddr, + int myport, int async); +#endif +#ifndef Tcl_OpenTcpServer_TCL_DECLARED +#define Tcl_OpenTcpServer_TCL_DECLARED +/* 200 */ +EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, + const char * host, + Tcl_TcpAcceptProc * acceptProc, + ClientData callbackData); +#endif +#ifndef Tcl_Preserve_TCL_DECLARED +#define Tcl_Preserve_TCL_DECLARED +/* 201 */ +EXTERN void Tcl_Preserve (ClientData data); +#endif +#ifndef Tcl_PrintDouble_TCL_DECLARED +#define Tcl_PrintDouble_TCL_DECLARED +/* 202 */ +EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, + char * dst); +#endif +#ifndef Tcl_PutEnv_TCL_DECLARED +#define Tcl_PutEnv_TCL_DECLARED +/* 203 */ +EXTERN int Tcl_PutEnv (const char * assignment); +#endif +#ifndef Tcl_PosixError_TCL_DECLARED +#define Tcl_PosixError_TCL_DECLARED +/* 204 */ +EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); +#endif +#ifndef Tcl_QueueEvent_TCL_DECLARED +#define Tcl_QueueEvent_TCL_DECLARED +/* 205 */ +EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tcl_Read_TCL_DECLARED +#define Tcl_Read_TCL_DECLARED +/* 206 */ +EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, + int toRead); +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED +#define Tcl_ReapDetachedProcs_TCL_DECLARED +/* 207 */ +EXTERN void Tcl_ReapDetachedProcs (void); +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval_TCL_DECLARED +#define Tcl_RecordAndEval_TCL_DECLARED +/* 208 */ +EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, + const char * cmd, int flags); +#endif +#ifndef Tcl_RecordAndEvalObj_TCL_DECLARED +#define Tcl_RecordAndEvalObj_TCL_DECLARED +/* 209 */ +EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, + Tcl_Obj * cmdPtr, int flags); +#endif +#ifndef Tcl_RegisterChannel_TCL_DECLARED +#define Tcl_RegisterChannel_TCL_DECLARED +/* 210 */ +EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_RegisterObjType_TCL_DECLARED +#define Tcl_RegisterObjType_TCL_DECLARED +/* 211 */ +EXTERN void Tcl_RegisterObjType (const Tcl_ObjType * typePtr); +#endif +#ifndef Tcl_RegExpCompile_TCL_DECLARED +#define Tcl_RegExpCompile_TCL_DECLARED +/* 212 */ +EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, + const char * pattern); +#endif +#ifndef Tcl_RegExpExec_TCL_DECLARED +#define Tcl_RegExpExec_TCL_DECLARED +/* 213 */ +EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, + Tcl_RegExp regexp, const char * text, + const char * start); +#endif +#ifndef Tcl_RegExpMatch_TCL_DECLARED +#define Tcl_RegExpMatch_TCL_DECLARED +/* 214 */ +EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, + const char * text, const char * pattern); +#endif +#ifndef Tcl_RegExpRange_TCL_DECLARED +#define Tcl_RegExpRange_TCL_DECLARED +/* 215 */ +EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, + CONST84 char ** startPtr, + CONST84 char ** endPtr); +#endif +#ifndef Tcl_Release_TCL_DECLARED +#define Tcl_Release_TCL_DECLARED +/* 216 */ +EXTERN void Tcl_Release (ClientData clientData); +#endif +#ifndef Tcl_ResetResult_TCL_DECLARED +#define Tcl_ResetResult_TCL_DECLARED +/* 217 */ +EXTERN void Tcl_ResetResult (Tcl_Interp * interp); +#endif +#ifndef Tcl_ScanElement_TCL_DECLARED +#define Tcl_ScanElement_TCL_DECLARED +/* 218 */ +EXTERN int Tcl_ScanElement (const char * str, int * flagPtr); +#endif +#ifndef Tcl_ScanCountedElement_TCL_DECLARED +#define Tcl_ScanCountedElement_TCL_DECLARED +/* 219 */ +EXTERN int Tcl_ScanCountedElement (const char * str, int length, + int * flagPtr); +#endif +#ifndef Tcl_SeekOld_TCL_DECLARED +#define Tcl_SeekOld_TCL_DECLARED +/* 220 */ +EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); +#endif +#ifndef Tcl_ServiceAll_TCL_DECLARED +#define Tcl_ServiceAll_TCL_DECLARED +/* 221 */ +EXTERN int Tcl_ServiceAll (void); +#endif +#ifndef Tcl_ServiceEvent_TCL_DECLARED +#define Tcl_ServiceEvent_TCL_DECLARED +/* 222 */ +EXTERN int Tcl_ServiceEvent (int flags); +#endif +#ifndef Tcl_SetAssocData_TCL_DECLARED +#define Tcl_SetAssocData_TCL_DECLARED +/* 223 */ +EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, + const char * name, + Tcl_InterpDeleteProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_SetChannelBufferSize_TCL_DECLARED +#define Tcl_SetChannelBufferSize_TCL_DECLARED +/* 224 */ +EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); +#endif +#ifndef Tcl_SetChannelOption_TCL_DECLARED +#define Tcl_SetChannelOption_TCL_DECLARED +/* 225 */ +EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, + Tcl_Channel chan, const char * optionName, + const char * newValue); +#endif +#ifndef Tcl_SetCommandInfo_TCL_DECLARED +#define Tcl_SetCommandInfo_TCL_DECLARED +/* 226 */ +EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, + const char * cmdName, + const Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_SetErrno_TCL_DECLARED +#define Tcl_SetErrno_TCL_DECLARED +/* 227 */ +EXTERN void Tcl_SetErrno (int err); +#endif +#ifndef Tcl_SetErrorCode_TCL_DECLARED +#define Tcl_SetErrorCode_TCL_DECLARED +/* 228 */ +EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_SetMaxBlockTime_TCL_DECLARED +#define Tcl_SetMaxBlockTime_TCL_DECLARED +/* 229 */ +EXTERN void Tcl_SetMaxBlockTime (const Tcl_Time * timePtr); +#endif +#ifndef Tcl_SetPanicProc_TCL_DECLARED +#define Tcl_SetPanicProc_TCL_DECLARED +/* 230 */ +EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); +#endif +#ifndef Tcl_SetRecursionLimit_TCL_DECLARED +#define Tcl_SetRecursionLimit_TCL_DECLARED +/* 231 */ +EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, + int depth); +#endif +#ifndef Tcl_SetResult_TCL_DECLARED +#define Tcl_SetResult_TCL_DECLARED +/* 232 */ +EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, + Tcl_FreeProc * freeProc); +#endif +#ifndef Tcl_SetServiceMode_TCL_DECLARED +#define Tcl_SetServiceMode_TCL_DECLARED +/* 233 */ +EXTERN int Tcl_SetServiceMode (int mode); +#endif +#ifndef Tcl_SetObjErrorCode_TCL_DECLARED +#define Tcl_SetObjErrorCode_TCL_DECLARED +/* 234 */ +EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, + Tcl_Obj * errorObjPtr); +#endif +#ifndef Tcl_SetObjResult_TCL_DECLARED +#define Tcl_SetObjResult_TCL_DECLARED +/* 235 */ +EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr); +#endif +#ifndef Tcl_SetStdChannel_TCL_DECLARED +#define Tcl_SetStdChannel_TCL_DECLARED +/* 236 */ +EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); +#endif +#ifndef Tcl_SetVar_TCL_DECLARED +#define Tcl_SetVar_TCL_DECLARED +/* 237 */ +EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, + const char * varName, const char * newValue, + int flags); +#endif +#ifndef Tcl_SetVar2_TCL_DECLARED +#define Tcl_SetVar2_TCL_DECLARED +/* 238 */ +EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + const char * newValue, int flags); +#endif +#ifndef Tcl_SignalId_TCL_DECLARED +#define Tcl_SignalId_TCL_DECLARED +/* 239 */ +EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); +#endif +#ifndef Tcl_SignalMsg_TCL_DECLARED +#define Tcl_SignalMsg_TCL_DECLARED +/* 240 */ +EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); +#endif +#ifndef Tcl_SourceRCFile_TCL_DECLARED +#define Tcl_SourceRCFile_TCL_DECLARED +/* 241 */ +EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); +#endif +#ifndef Tcl_SplitList_TCL_DECLARED +#define Tcl_SplitList_TCL_DECLARED +/* 242 */ +EXTERN int Tcl_SplitList (Tcl_Interp * interp, + const char * listStr, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_SplitPath_TCL_DECLARED +#define Tcl_SplitPath_TCL_DECLARED +/* 243 */ +EXTERN void Tcl_SplitPath (const char * path, int * argcPtr, + CONST84 char *** argvPtr); +#endif +#ifndef Tcl_StaticPackage_TCL_DECLARED +#define Tcl_StaticPackage_TCL_DECLARED +/* 244 */ +EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, + const char * pkgName, + Tcl_PackageInitProc * initProc, + Tcl_PackageInitProc * safeInitProc); +#endif +#ifndef Tcl_StringMatch_TCL_DECLARED +#define Tcl_StringMatch_TCL_DECLARED +/* 245 */ +EXTERN int Tcl_StringMatch (const char * str, + const char * pattern); +#endif +#ifndef Tcl_TellOld_TCL_DECLARED +#define Tcl_TellOld_TCL_DECLARED +/* 246 */ +EXTERN int Tcl_TellOld (Tcl_Channel chan); +#endif +#ifndef Tcl_TraceVar_TCL_DECLARED +#define Tcl_TraceVar_TCL_DECLARED +/* 247 */ +EXTERN int Tcl_TraceVar (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TraceVar2_TCL_DECLARED +#define Tcl_TraceVar2_TCL_DECLARED +/* 248 */ +EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_TranslateFileName_TCL_DECLARED +#define Tcl_TranslateFileName_TCL_DECLARED +/* 249 */ +EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, + const char * name, Tcl_DString * bufferPtr); +#endif +#ifndef Tcl_Ungets_TCL_DECLARED +#define Tcl_Ungets_TCL_DECLARED +/* 250 */ +EXTERN int Tcl_Ungets (Tcl_Channel chan, const char * str, + int len, int atHead); +#endif +#ifndef Tcl_UnlinkVar_TCL_DECLARED +#define Tcl_UnlinkVar_TCL_DECLARED +/* 251 */ +EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, + const char * varName); +#endif +#ifndef Tcl_UnregisterChannel_TCL_DECLARED +#define Tcl_UnregisterChannel_TCL_DECLARED +/* 252 */ +EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_UnsetVar_TCL_DECLARED +#define Tcl_UnsetVar_TCL_DECLARED +/* 253 */ +EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, + const char * varName, int flags); +#endif +#ifndef Tcl_UnsetVar2_TCL_DECLARED +#define Tcl_UnsetVar2_TCL_DECLARED +/* 254 */ +EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags); +#endif +#ifndef Tcl_UntraceVar_TCL_DECLARED +#define Tcl_UntraceVar_TCL_DECLARED +/* 255 */ +EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceVar2_TCL_DECLARED +#define Tcl_UntraceVar2_TCL_DECLARED +/* 256 */ +EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UpdateLinkedVar_TCL_DECLARED +#define Tcl_UpdateLinkedVar_TCL_DECLARED +/* 257 */ +EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, + const char * varName); +#endif +#ifndef Tcl_UpVar_TCL_DECLARED +#define Tcl_UpVar_TCL_DECLARED +/* 258 */ +EXTERN int Tcl_UpVar (Tcl_Interp * interp, + const char * frameName, const char * varName, + const char * localName, int flags); +#endif +#ifndef Tcl_UpVar2_TCL_DECLARED +#define Tcl_UpVar2_TCL_DECLARED +/* 259 */ +EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, + const char * frameName, const char * part1, + const char * part2, const char * localName, + int flags); +#endif +#ifndef Tcl_VarEval_TCL_DECLARED +#define Tcl_VarEval_TCL_DECLARED +/* 260 */ +EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); +#endif +#ifndef Tcl_VarTraceInfo_TCL_DECLARED +#define Tcl_VarTraceInfo_TCL_DECLARED +/* 261 */ +EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_VarTraceInfo2_TCL_DECLARED +#define Tcl_VarTraceInfo2_TCL_DECLARED +/* 262 */ +EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags, Tcl_VarTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_Write_TCL_DECLARED +#define Tcl_Write_TCL_DECLARED +/* 263 */ +EXTERN int Tcl_Write (Tcl_Channel chan, const char * s, + int slen); +#endif +#ifndef Tcl_WrongNumArgs_TCL_DECLARED +#define Tcl_WrongNumArgs_TCL_DECLARED +/* 264 */ +EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], const char * message); +#endif +#ifndef Tcl_DumpActiveMemory_TCL_DECLARED +#define Tcl_DumpActiveMemory_TCL_DECLARED +/* 265 */ +EXTERN int Tcl_DumpActiveMemory (const char * fileName); +#endif +#ifndef Tcl_ValidateAllMemory_TCL_DECLARED +#define Tcl_ValidateAllMemory_TCL_DECLARED +/* 266 */ +EXTERN void Tcl_ValidateAllMemory (const char * file, int line); +#endif +#ifndef Tcl_AppendResultVA_TCL_DECLARED +#define Tcl_AppendResultVA_TCL_DECLARED +/* 267 */ +EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED +#define Tcl_AppendStringsToObjVA_TCL_DECLARED +/* 268 */ +EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, + va_list argList); +#endif +#ifndef Tcl_HashStats_TCL_DECLARED +#define Tcl_HashStats_TCL_DECLARED +/* 269 */ +EXTERN char * Tcl_HashStats (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_ParseVar_TCL_DECLARED +#define Tcl_ParseVar_TCL_DECLARED +/* 270 */ +EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, + const char * start, CONST84 char ** termPtr); +#endif +#ifndef Tcl_PkgPresent_TCL_DECLARED +#define Tcl_PkgPresent_TCL_DECLARED +/* 271 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, + const char * name, const char * version, + int exact); +#endif +#ifndef Tcl_PkgPresentEx_TCL_DECLARED +#define Tcl_PkgPresentEx_TCL_DECLARED +/* 272 */ +EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, + const char * name, const char * version, + int exact, ClientData * clientDataPtr); +#endif +#ifndef Tcl_PkgProvide_TCL_DECLARED +#define Tcl_PkgProvide_TCL_DECLARED +/* 273 */ +EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, + const char * name, const char * version); +#endif +#ifndef Tcl_PkgRequire_TCL_DECLARED +#define Tcl_PkgRequire_TCL_DECLARED +/* 274 */ +EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, + const char * name, const char * version, + int exact); +#endif +#ifndef Tcl_SetErrorCodeVA_TCL_DECLARED +#define Tcl_SetErrorCodeVA_TCL_DECLARED +/* 275 */ +EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, + va_list argList); +#endif +#ifndef Tcl_VarEvalVA_TCL_DECLARED +#define Tcl_VarEvalVA_TCL_DECLARED +/* 276 */ +EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); +#endif +#ifndef Tcl_WaitPid_TCL_DECLARED +#define Tcl_WaitPid_TCL_DECLARED +/* 277 */ +EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); +#endif +#ifndef Tcl_PanicVA_TCL_DECLARED +#define Tcl_PanicVA_TCL_DECLARED +/* 278 */ +EXTERN void Tcl_PanicVA (const char * format, va_list argList); +#endif +#ifndef Tcl_GetVersion_TCL_DECLARED +#define Tcl_GetVersion_TCL_DECLARED +/* 279 */ +EXTERN void Tcl_GetVersion (int * major, int * minor, + int * patchLevel, int * type); +#endif +#ifndef Tcl_InitMemory_TCL_DECLARED +#define Tcl_InitMemory_TCL_DECLARED +/* 280 */ +EXTERN void Tcl_InitMemory (Tcl_Interp * interp); +#endif +#ifndef Tcl_StackChannel_TCL_DECLARED +#define Tcl_StackChannel_TCL_DECLARED +/* 281 */ +EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, + const Tcl_ChannelType * typePtr, + ClientData instanceData, int mask, + Tcl_Channel prevChan); +#endif +#ifndef Tcl_UnstackChannel_TCL_DECLARED +#define Tcl_UnstackChannel_TCL_DECLARED +/* 282 */ +EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, + Tcl_Channel chan); +#endif +#ifndef Tcl_GetStackedChannel_TCL_DECLARED +#define Tcl_GetStackedChannel_TCL_DECLARED +/* 283 */ +EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_SetMainLoop_TCL_DECLARED +#define Tcl_SetMainLoop_TCL_DECLARED +/* 284 */ +EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj_TCL_DECLARED +#define Tcl_AppendObjToObj_TCL_DECLARED +/* 286 */ +EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, + Tcl_Obj * appendObjPtr); +#endif +#ifndef Tcl_CreateEncoding_TCL_DECLARED +#define Tcl_CreateEncoding_TCL_DECLARED +/* 287 */ +EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); +#endif +#ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED +#define Tcl_CreateThreadExitHandler_TCL_DECLARED +/* 288 */ +EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED +#define Tcl_DeleteThreadExitHandler_TCL_DECLARED +/* 289 */ +EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_DiscardResult_TCL_DECLARED +#define Tcl_DiscardResult_TCL_DECLARED +/* 290 */ +EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_EvalEx_TCL_DECLARED +#define Tcl_EvalEx_TCL_DECLARED +/* 291 */ +EXTERN int Tcl_EvalEx (Tcl_Interp * interp, const char * script, + int numBytes, int flags); +#endif +#ifndef Tcl_EvalObjv_TCL_DECLARED +#define Tcl_EvalObjv_TCL_DECLARED +/* 292 */ +EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags); +#endif +#ifndef Tcl_EvalObjEx_TCL_DECLARED +#define Tcl_EvalObjEx_TCL_DECLARED +/* 293 */ +EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_ExitThread_TCL_DECLARED +#define Tcl_ExitThread_TCL_DECLARED +/* 294 */ +EXTERN void Tcl_ExitThread (int status); +#endif +#ifndef Tcl_ExternalToUtf_TCL_DECLARED +#define Tcl_ExternalToUtf_TCL_DECLARED +/* 295 */ +EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, + Tcl_Encoding encoding, const char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_ExternalToUtfDString_TCL_DECLARED +#define Tcl_ExternalToUtfDString_TCL_DECLARED +/* 296 */ +EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, + const char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_FinalizeThread_TCL_DECLARED +#define Tcl_FinalizeThread_TCL_DECLARED +/* 297 */ +EXTERN void Tcl_FinalizeThread (void); +#endif +#ifndef Tcl_FinalizeNotifier_TCL_DECLARED +#define Tcl_FinalizeNotifier_TCL_DECLARED +/* 298 */ +EXTERN void Tcl_FinalizeNotifier (ClientData clientData); +#endif +#ifndef Tcl_FreeEncoding_TCL_DECLARED +#define Tcl_FreeEncoding_TCL_DECLARED +/* 299 */ +EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetCurrentThread_TCL_DECLARED +#define Tcl_GetCurrentThread_TCL_DECLARED +/* 300 */ +EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); +#endif +#ifndef Tcl_GetEncoding_TCL_DECLARED +#define Tcl_GetEncoding_TCL_DECLARED +/* 301 */ +EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, + const char * name); +#endif +#ifndef Tcl_GetEncodingName_TCL_DECLARED +#define Tcl_GetEncodingName_TCL_DECLARED +/* 302 */ +EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); +#endif +#ifndef Tcl_GetEncodingNames_TCL_DECLARED +#define Tcl_GetEncodingNames_TCL_DECLARED +/* 303 */ +EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED +#define Tcl_GetIndexFromObjStruct_TCL_DECLARED +/* 304 */ +EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, + Tcl_Obj * objPtr, const VOID * tablePtr, + int offset, const char * msg, int flags, + int * indexPtr); +#endif +#ifndef Tcl_GetThreadData_TCL_DECLARED +#define Tcl_GetThreadData_TCL_DECLARED +/* 305 */ +EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, + int size); +#endif +#ifndef Tcl_GetVar2Ex_TCL_DECLARED +#define Tcl_GetVar2Ex_TCL_DECLARED +/* 306 */ +EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, + const char * part1, const char * part2, + int flags); +#endif +#ifndef Tcl_InitNotifier_TCL_DECLARED +#define Tcl_InitNotifier_TCL_DECLARED +/* 307 */ +EXTERN ClientData Tcl_InitNotifier (void); +#endif +#ifndef Tcl_MutexLock_TCL_DECLARED +#define Tcl_MutexLock_TCL_DECLARED +/* 308 */ +EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_MutexUnlock_TCL_DECLARED +#define Tcl_MutexUnlock_TCL_DECLARED +/* 309 */ +EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); +#endif +#ifndef Tcl_ConditionNotify_TCL_DECLARED +#define Tcl_ConditionNotify_TCL_DECLARED +/* 310 */ +EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_ConditionWait_TCL_DECLARED +#define Tcl_ConditionWait_TCL_DECLARED +/* 311 */ +EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, + Tcl_Mutex * mutexPtr, + const Tcl_Time * timePtr); +#endif +#ifndef Tcl_NumUtfChars_TCL_DECLARED +#define Tcl_NumUtfChars_TCL_DECLARED +/* 312 */ +EXTERN int Tcl_NumUtfChars (const char * src, int length); +#endif +#ifndef Tcl_ReadChars_TCL_DECLARED +#define Tcl_ReadChars_TCL_DECLARED +/* 313 */ +EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, + int charsToRead, int appendFlag); +#endif +#ifndef Tcl_RestoreResult_TCL_DECLARED +#define Tcl_RestoreResult_TCL_DECLARED +/* 314 */ +EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SaveResult_TCL_DECLARED +#define Tcl_SaveResult_TCL_DECLARED +/* 315 */ +EXTERN void Tcl_SaveResult (Tcl_Interp * interp, + Tcl_SavedResult * statePtr); +#endif +#ifndef Tcl_SetSystemEncoding_TCL_DECLARED +#define Tcl_SetSystemEncoding_TCL_DECLARED +/* 316 */ +EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, + const char * name); +#endif +#ifndef Tcl_SetVar2Ex_TCL_DECLARED +#define Tcl_SetVar2Ex_TCL_DECLARED +/* 317 */ +EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, + const char * part1, const char * part2, + Tcl_Obj * newValuePtr, int flags); +#endif +#ifndef Tcl_ThreadAlert_TCL_DECLARED +#define Tcl_ThreadAlert_TCL_DECLARED +/* 318 */ +EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); +#endif +#ifndef Tcl_ThreadQueueEvent_TCL_DECLARED +#define Tcl_ThreadQueueEvent_TCL_DECLARED +/* 319 */ +EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, + Tcl_Event * evPtr, + Tcl_QueuePosition position); +#endif +#ifndef Tcl_UniCharAtIndex_TCL_DECLARED +#define Tcl_UniCharAtIndex_TCL_DECLARED +/* 320 */ +EXTERN Tcl_UniChar Tcl_UniCharAtIndex (const char * src, int index); +#endif +#ifndef Tcl_UniCharToLower_TCL_DECLARED +#define Tcl_UniCharToLower_TCL_DECLARED +/* 321 */ +EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); +#endif +#ifndef Tcl_UniCharToTitle_TCL_DECLARED +#define Tcl_UniCharToTitle_TCL_DECLARED +/* 322 */ +EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); +#endif +#ifndef Tcl_UniCharToUpper_TCL_DECLARED +#define Tcl_UniCharToUpper_TCL_DECLARED +/* 323 */ +EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); +#endif +#ifndef Tcl_UniCharToUtf_TCL_DECLARED +#define Tcl_UniCharToUtf_TCL_DECLARED +/* 324 */ +EXTERN int Tcl_UniCharToUtf (int ch, char * buf); +#endif +#ifndef Tcl_UtfAtIndex_TCL_DECLARED +#define Tcl_UtfAtIndex_TCL_DECLARED +/* 325 */ +EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (const char * src, int index); +#endif +#ifndef Tcl_UtfCharComplete_TCL_DECLARED +#define Tcl_UtfCharComplete_TCL_DECLARED +/* 326 */ +EXTERN int Tcl_UtfCharComplete (const char * src, int length); +#endif +#ifndef Tcl_UtfBackslash_TCL_DECLARED +#define Tcl_UtfBackslash_TCL_DECLARED +/* 327 */ +EXTERN int Tcl_UtfBackslash (const char * src, int * readPtr, + char * dst); +#endif +#ifndef Tcl_UtfFindFirst_TCL_DECLARED +#define Tcl_UtfFindFirst_TCL_DECLARED +/* 328 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (const char * src, int ch); +#endif +#ifndef Tcl_UtfFindLast_TCL_DECLARED +#define Tcl_UtfFindLast_TCL_DECLARED +/* 329 */ +EXTERN CONST84_RETURN char * Tcl_UtfFindLast (const char * src, int ch); +#endif +#ifndef Tcl_UtfNext_TCL_DECLARED +#define Tcl_UtfNext_TCL_DECLARED +/* 330 */ +EXTERN CONST84_RETURN char * Tcl_UtfNext (const char * src); +#endif +#ifndef Tcl_UtfPrev_TCL_DECLARED +#define Tcl_UtfPrev_TCL_DECLARED +/* 331 */ +EXTERN CONST84_RETURN char * Tcl_UtfPrev (const char * src, + const char * start); +#endif +#ifndef Tcl_UtfToExternal_TCL_DECLARED +#define Tcl_UtfToExternal_TCL_DECLARED +/* 332 */ +EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, + Tcl_Encoding encoding, const char * src, + int srcLen, int flags, + Tcl_EncodingState * statePtr, char * dst, + int dstLen, int * srcReadPtr, + int * dstWrotePtr, int * dstCharsPtr); +#endif +#ifndef Tcl_UtfToExternalDString_TCL_DECLARED +#define Tcl_UtfToExternalDString_TCL_DECLARED +/* 333 */ +EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, + const char * src, int srcLen, + Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToLower_TCL_DECLARED +#define Tcl_UtfToLower_TCL_DECLARED +/* 334 */ +EXTERN int Tcl_UtfToLower (char * src); +#endif +#ifndef Tcl_UtfToTitle_TCL_DECLARED +#define Tcl_UtfToTitle_TCL_DECLARED +/* 335 */ +EXTERN int Tcl_UtfToTitle (char * src); +#endif +#ifndef Tcl_UtfToUniChar_TCL_DECLARED +#define Tcl_UtfToUniChar_TCL_DECLARED +/* 336 */ +EXTERN int Tcl_UtfToUniChar (const char * src, + Tcl_UniChar * chPtr); +#endif +#ifndef Tcl_UtfToUpper_TCL_DECLARED +#define Tcl_UtfToUpper_TCL_DECLARED +/* 337 */ +EXTERN int Tcl_UtfToUpper (char * src); +#endif +#ifndef Tcl_WriteChars_TCL_DECLARED +#define Tcl_WriteChars_TCL_DECLARED +/* 338 */ +EXTERN int Tcl_WriteChars (Tcl_Channel chan, const char * src, + int srcLen); +#endif +#ifndef Tcl_WriteObj_TCL_DECLARED +#define Tcl_WriteObj_TCL_DECLARED +/* 339 */ +EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetString_TCL_DECLARED +#define Tcl_GetString_TCL_DECLARED +/* 340 */ +EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED +#define Tcl_GetDefaultEncodingDir_TCL_DECLARED +/* 341 */ +EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); +#endif +#ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED +#define Tcl_SetDefaultEncodingDir_TCL_DECLARED +/* 342 */ +EXTERN void Tcl_SetDefaultEncodingDir (const char * path); +#endif +#ifndef Tcl_AlertNotifier_TCL_DECLARED +#define Tcl_AlertNotifier_TCL_DECLARED +/* 343 */ +EXTERN void Tcl_AlertNotifier (ClientData clientData); +#endif +#ifndef Tcl_ServiceModeHook_TCL_DECLARED +#define Tcl_ServiceModeHook_TCL_DECLARED +/* 344 */ +EXTERN void Tcl_ServiceModeHook (int mode); +#endif +#ifndef Tcl_UniCharIsAlnum_TCL_DECLARED +#define Tcl_UniCharIsAlnum_TCL_DECLARED +/* 345 */ +EXTERN int Tcl_UniCharIsAlnum (int ch); +#endif +#ifndef Tcl_UniCharIsAlpha_TCL_DECLARED +#define Tcl_UniCharIsAlpha_TCL_DECLARED +/* 346 */ +EXTERN int Tcl_UniCharIsAlpha (int ch); +#endif +#ifndef Tcl_UniCharIsDigit_TCL_DECLARED +#define Tcl_UniCharIsDigit_TCL_DECLARED +/* 347 */ +EXTERN int Tcl_UniCharIsDigit (int ch); +#endif +#ifndef Tcl_UniCharIsLower_TCL_DECLARED +#define Tcl_UniCharIsLower_TCL_DECLARED +/* 348 */ +EXTERN int Tcl_UniCharIsLower (int ch); +#endif +#ifndef Tcl_UniCharIsSpace_TCL_DECLARED +#define Tcl_UniCharIsSpace_TCL_DECLARED +/* 349 */ +EXTERN int Tcl_UniCharIsSpace (int ch); +#endif +#ifndef Tcl_UniCharIsUpper_TCL_DECLARED +#define Tcl_UniCharIsUpper_TCL_DECLARED +/* 350 */ +EXTERN int Tcl_UniCharIsUpper (int ch); +#endif +#ifndef Tcl_UniCharIsWordChar_TCL_DECLARED +#define Tcl_UniCharIsWordChar_TCL_DECLARED +/* 351 */ +EXTERN int Tcl_UniCharIsWordChar (int ch); +#endif +#ifndef Tcl_UniCharLen_TCL_DECLARED +#define Tcl_UniCharLen_TCL_DECLARED +/* 352 */ +EXTERN int Tcl_UniCharLen (const Tcl_UniChar * uniStr); +#endif +#ifndef Tcl_UniCharNcmp_TCL_DECLARED +#define Tcl_UniCharNcmp_TCL_DECLARED +/* 353 */ +EXTERN int Tcl_UniCharNcmp (const Tcl_UniChar * ucs, + const Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED +#define Tcl_UniCharToUtfDString_TCL_DECLARED +/* 354 */ +EXTERN char * Tcl_UniCharToUtfDString (const Tcl_UniChar * uniStr, + int uniLength, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED +#define Tcl_UtfToUniCharDString_TCL_DECLARED +/* 355 */ +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (const char * src, + int length, Tcl_DString * dsPtr); +#endif +#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED +#define Tcl_GetRegExpFromObj_TCL_DECLARED +/* 356 */ +EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, + Tcl_Obj * patObj, int flags); +#endif +#ifndef Tcl_EvalTokens_TCL_DECLARED +#define Tcl_EvalTokens_TCL_DECLARED +/* 357 */ +EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_FreeParse_TCL_DECLARED +#define Tcl_FreeParse_TCL_DECLARED +/* 358 */ +EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_LogCommandInfo_TCL_DECLARED +#define Tcl_LogCommandInfo_TCL_DECLARED +/* 359 */ +EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, + const char * script, const char * command, + int length); +#endif +#ifndef Tcl_ParseBraces_TCL_DECLARED +#define Tcl_ParseBraces_TCL_DECLARED +/* 360 */ +EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseCommand_TCL_DECLARED +#define Tcl_ParseCommand_TCL_DECLARED +/* 361 */ +EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, + const char * start, int numBytes, int nested, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseExpr_TCL_DECLARED +#define Tcl_ParseExpr_TCL_DECLARED +/* 362 */ +EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr); +#endif +#ifndef Tcl_ParseQuotedString_TCL_DECLARED +#define Tcl_ParseQuotedString_TCL_DECLARED +/* 363 */ +EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append, + CONST84 char ** termPtr); +#endif +#ifndef Tcl_ParseVarName_TCL_DECLARED +#define Tcl_ParseVarName_TCL_DECLARED +/* 364 */ +EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, + const char * start, int numBytes, + Tcl_Parse * parsePtr, int append); +#endif +#ifndef Tcl_GetCwd_TCL_DECLARED +#define Tcl_GetCwd_TCL_DECLARED +/* 365 */ +EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, + Tcl_DString * cwdPtr); +#endif +#ifndef Tcl_Chdir_TCL_DECLARED +#define Tcl_Chdir_TCL_DECLARED +/* 366 */ +EXTERN int Tcl_Chdir (const char * dirName); +#endif +#ifndef Tcl_Access_TCL_DECLARED +#define Tcl_Access_TCL_DECLARED +/* 367 */ +EXTERN int Tcl_Access (const char * path, int mode); +#endif +#ifndef Tcl_Stat_TCL_DECLARED +#define Tcl_Stat_TCL_DECLARED +/* 368 */ +EXTERN int Tcl_Stat (const char * path, struct stat * bufPtr); +#endif +#ifndef Tcl_UtfNcmp_TCL_DECLARED +#define Tcl_UtfNcmp_TCL_DECLARED +/* 369 */ +EXTERN int Tcl_UtfNcmp (const char * s1, const char * s2, + unsigned long n); +#endif +#ifndef Tcl_UtfNcasecmp_TCL_DECLARED +#define Tcl_UtfNcasecmp_TCL_DECLARED +/* 370 */ +EXTERN int Tcl_UtfNcasecmp (const char * s1, const char * s2, + unsigned long n); +#endif +#ifndef Tcl_StringCaseMatch_TCL_DECLARED +#define Tcl_StringCaseMatch_TCL_DECLARED +/* 371 */ +EXTERN int Tcl_StringCaseMatch (const char * str, + const char * pattern, int nocase); +#endif +#ifndef Tcl_UniCharIsControl_TCL_DECLARED +#define Tcl_UniCharIsControl_TCL_DECLARED +/* 372 */ +EXTERN int Tcl_UniCharIsControl (int ch); +#endif +#ifndef Tcl_UniCharIsGraph_TCL_DECLARED +#define Tcl_UniCharIsGraph_TCL_DECLARED +/* 373 */ +EXTERN int Tcl_UniCharIsGraph (int ch); +#endif +#ifndef Tcl_UniCharIsPrint_TCL_DECLARED +#define Tcl_UniCharIsPrint_TCL_DECLARED +/* 374 */ +EXTERN int Tcl_UniCharIsPrint (int ch); +#endif +#ifndef Tcl_UniCharIsPunct_TCL_DECLARED +#define Tcl_UniCharIsPunct_TCL_DECLARED +/* 375 */ +EXTERN int Tcl_UniCharIsPunct (int ch); +#endif +#ifndef Tcl_RegExpExecObj_TCL_DECLARED +#define Tcl_RegExpExecObj_TCL_DECLARED +/* 376 */ +EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, + Tcl_RegExp regexp, Tcl_Obj * textObj, + int offset, int nmatches, int flags); +#endif +#ifndef Tcl_RegExpGetInfo_TCL_DECLARED +#define Tcl_RegExpGetInfo_TCL_DECLARED +/* 377 */ +EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, + Tcl_RegExpInfo * infoPtr); +#endif +#ifndef Tcl_NewUnicodeObj_TCL_DECLARED +#define Tcl_NewUnicodeObj_TCL_DECLARED +/* 378 */ +EXTERN Tcl_Obj * Tcl_NewUnicodeObj (const Tcl_UniChar * unicode, + int numChars); +#endif +#ifndef Tcl_SetUnicodeObj_TCL_DECLARED +#define Tcl_SetUnicodeObj_TCL_DECLARED +/* 379 */ +EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, + const Tcl_UniChar * unicode, int numChars); +#endif +#ifndef Tcl_GetCharLength_TCL_DECLARED +#define Tcl_GetCharLength_TCL_DECLARED +/* 380 */ +EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetUniChar_TCL_DECLARED +#define Tcl_GetUniChar_TCL_DECLARED +/* 381 */ +EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); +#endif +#ifndef Tcl_GetUnicode_TCL_DECLARED +#define Tcl_GetUnicode_TCL_DECLARED +/* 382 */ +EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetRange_TCL_DECLARED +#define Tcl_GetRange_TCL_DECLARED +/* 383 */ +EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); +#endif +#ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED +#define Tcl_AppendUnicodeToObj_TCL_DECLARED +/* 384 */ +EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, + const Tcl_UniChar * unicode, int length); +#endif +#ifndef Tcl_RegExpMatchObj_TCL_DECLARED +#define Tcl_RegExpMatchObj_TCL_DECLARED +/* 385 */ +EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, + Tcl_Obj * textObj, Tcl_Obj * patternObj); +#endif +#ifndef Tcl_SetNotifier_TCL_DECLARED +#define Tcl_SetNotifier_TCL_DECLARED +/* 386 */ +EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); +#endif +#ifndef Tcl_GetAllocMutex_TCL_DECLARED +#define Tcl_GetAllocMutex_TCL_DECLARED +/* 387 */ +EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); +#endif +#ifndef Tcl_GetChannelNames_TCL_DECLARED +#define Tcl_GetChannelNames_TCL_DECLARED +/* 388 */ +EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetChannelNamesEx_TCL_DECLARED +#define Tcl_GetChannelNamesEx_TCL_DECLARED +/* 389 */ +EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, + const char * pattern); +#endif +#ifndef Tcl_ProcObjCmd_TCL_DECLARED +#define Tcl_ProcObjCmd_TCL_DECLARED +/* 390 */ +EXTERN int Tcl_ProcObjCmd (ClientData clientData, + Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_ConditionFinalize_TCL_DECLARED +#define Tcl_ConditionFinalize_TCL_DECLARED +/* 391 */ +EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); +#endif +#ifndef Tcl_MutexFinalize_TCL_DECLARED +#define Tcl_MutexFinalize_TCL_DECLARED +/* 392 */ +EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); +#endif +#ifndef Tcl_CreateThread_TCL_DECLARED +#define Tcl_CreateThread_TCL_DECLARED +/* 393 */ +EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, + Tcl_ThreadCreateProc proc, + ClientData clientData, int stackSize, + int flags); +#endif +#ifndef Tcl_ReadRaw_TCL_DECLARED +#define Tcl_ReadRaw_TCL_DECLARED +/* 394 */ +EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, + int bytesToRead); +#endif +#ifndef Tcl_WriteRaw_TCL_DECLARED +#define Tcl_WriteRaw_TCL_DECLARED +/* 395 */ +EXTERN int Tcl_WriteRaw (Tcl_Channel chan, const char * src, + int srcLen); +#endif +#ifndef Tcl_GetTopChannel_TCL_DECLARED +#define Tcl_GetTopChannel_TCL_DECLARED +/* 396 */ +EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelBuffered_TCL_DECLARED +#define Tcl_ChannelBuffered_TCL_DECLARED +/* 397 */ +EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelName_TCL_DECLARED +#define Tcl_ChannelName_TCL_DECLARED +/* 398 */ +EXTERN CONST84_RETURN char * Tcl_ChannelName ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelVersion_TCL_DECLARED +#define Tcl_ChannelVersion_TCL_DECLARED +/* 399 */ +EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED +#define Tcl_ChannelBlockModeProc_TCL_DECLARED +/* 400 */ +EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelCloseProc_TCL_DECLARED +#define Tcl_ChannelCloseProc_TCL_DECLARED +/* 401 */ +EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelClose2Proc_TCL_DECLARED +#define Tcl_ChannelClose2Proc_TCL_DECLARED +/* 402 */ +EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelInputProc_TCL_DECLARED +#define Tcl_ChannelInputProc_TCL_DECLARED +/* 403 */ +EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelOutputProc_TCL_DECLARED +#define Tcl_ChannelOutputProc_TCL_DECLARED +/* 404 */ +EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSeekProc_TCL_DECLARED +#define Tcl_ChannelSeekProc_TCL_DECLARED +/* 405 */ +EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED +#define Tcl_ChannelSetOptionProc_TCL_DECLARED +/* 406 */ +EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED +#define Tcl_ChannelGetOptionProc_TCL_DECLARED +/* 407 */ +EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelWatchProc_TCL_DECLARED +#define Tcl_ChannelWatchProc_TCL_DECLARED +/* 408 */ +EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED +#define Tcl_ChannelGetHandleProc_TCL_DECLARED +/* 409 */ +EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelFlushProc_TCL_DECLARED +#define Tcl_ChannelFlushProc_TCL_DECLARED +/* 410 */ +EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_ChannelHandlerProc_TCL_DECLARED +#define Tcl_ChannelHandlerProc_TCL_DECLARED +/* 411 */ +EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_JoinThread_TCL_DECLARED +#define Tcl_JoinThread_TCL_DECLARED +/* 412 */ +EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int * result); +#endif +#ifndef Tcl_IsChannelShared_TCL_DECLARED +#define Tcl_IsChannelShared_TCL_DECLARED +/* 413 */ +EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelRegistered_TCL_DECLARED +#define Tcl_IsChannelRegistered_TCL_DECLARED +/* 414 */ +EXTERN int Tcl_IsChannelRegistered (Tcl_Interp * interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_CutChannel_TCL_DECLARED +#define Tcl_CutChannel_TCL_DECLARED +/* 415 */ +EXTERN void Tcl_CutChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_SpliceChannel_TCL_DECLARED +#define Tcl_SpliceChannel_TCL_DECLARED +/* 416 */ +EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_ClearChannelHandlers_TCL_DECLARED +#define Tcl_ClearChannelHandlers_TCL_DECLARED +/* 417 */ +EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); +#endif +#ifndef Tcl_IsChannelExisting_TCL_DECLARED +#define Tcl_IsChannelExisting_TCL_DECLARED +/* 418 */ +EXTERN int Tcl_IsChannelExisting (const char * channelName); +#endif +#ifndef Tcl_UniCharNcasecmp_TCL_DECLARED +#define Tcl_UniCharNcasecmp_TCL_DECLARED +/* 419 */ +EXTERN int Tcl_UniCharNcasecmp (const Tcl_UniChar * ucs, + const Tcl_UniChar * uct, + unsigned long numChars); +#endif +#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED +#define Tcl_UniCharCaseMatch_TCL_DECLARED +/* 420 */ +EXTERN int Tcl_UniCharCaseMatch (const Tcl_UniChar * uniStr, + const Tcl_UniChar * uniPattern, int nocase); +#endif +#ifndef Tcl_FindHashEntry_TCL_DECLARED +#define Tcl_FindHashEntry_TCL_DECLARED +/* 421 */ +EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, + const char * key); +#endif +#ifndef Tcl_CreateHashEntry_TCL_DECLARED +#define Tcl_CreateHashEntry_TCL_DECLARED +/* 422 */ +EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, + const char * key, int * newPtr); +#endif +#ifndef Tcl_InitCustomHashTable_TCL_DECLARED +#define Tcl_InitCustomHashTable_TCL_DECLARED +/* 423 */ +EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, + int keyType, const Tcl_HashKeyType * typePtr); +#endif +#ifndef Tcl_InitObjHashTable_TCL_DECLARED +#define Tcl_InitObjHashTable_TCL_DECLARED +/* 424 */ +EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); +#endif +#ifndef Tcl_CommandTraceInfo_TCL_DECLARED +#define Tcl_CommandTraceInfo_TCL_DECLARED +/* 425 */ +EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * procPtr, + ClientData prevClientData); +#endif +#ifndef Tcl_TraceCommand_TCL_DECLARED +#define Tcl_TraceCommand_TCL_DECLARED +/* 426 */ +EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_UntraceCommand_TCL_DECLARED +#define Tcl_UntraceCommand_TCL_DECLARED +/* 427 */ +EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, + const char * varName, int flags, + Tcl_CommandTraceProc * proc, + ClientData clientData); +#endif +#ifndef Tcl_AttemptAlloc_TCL_DECLARED +#define Tcl_AttemptAlloc_TCL_DECLARED +/* 428 */ +EXTERN char * Tcl_AttemptAlloc (unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED +#define Tcl_AttemptDbCkalloc_TCL_DECLARED +/* 429 */ +EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, + const char * file, int line); +#endif +#ifndef Tcl_AttemptRealloc_TCL_DECLARED +#define Tcl_AttemptRealloc_TCL_DECLARED +/* 430 */ +EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); +#endif +#ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED +#define Tcl_AttemptDbCkrealloc_TCL_DECLARED +/* 431 */ +EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, + unsigned int size, const char * file, + int line); +#endif +#ifndef Tcl_AttemptSetObjLength_TCL_DECLARED +#define Tcl_AttemptSetObjLength_TCL_DECLARED +/* 432 */ +EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, + int length); +#endif +#ifndef Tcl_GetChannelThread_TCL_DECLARED +#define Tcl_GetChannelThread_TCL_DECLARED +/* 433 */ +EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); +#endif +#ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED +#define Tcl_GetUnicodeFromObj_TCL_DECLARED +/* 434 */ +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, + int * lengthPtr); +#endif +#ifndef Tcl_GetMathFuncInfo_TCL_DECLARED +#define Tcl_GetMathFuncInfo_TCL_DECLARED +/* 435 */ +EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, + const char * name, int * numArgsPtr, + Tcl_ValueType ** argTypesPtr, + Tcl_MathProc ** procPtr, + ClientData * clientDataPtr); +#endif +#ifndef Tcl_ListMathFuncs_TCL_DECLARED +#define Tcl_ListMathFuncs_TCL_DECLARED +/* 436 */ +EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, + const char * pattern); +#endif +#ifndef Tcl_SubstObj_TCL_DECLARED +#define Tcl_SubstObj_TCL_DECLARED +/* 437 */ +EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_DetachChannel_TCL_DECLARED +#define Tcl_DetachChannel_TCL_DECLARED +/* 438 */ +EXTERN int Tcl_DetachChannel (Tcl_Interp * interp, + Tcl_Channel channel); +#endif +#ifndef Tcl_IsStandardChannel_TCL_DECLARED +#define Tcl_IsStandardChannel_TCL_DECLARED +/* 439 */ +EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); +#endif +#ifndef Tcl_FSCopyFile_TCL_DECLARED +#define Tcl_FSCopyFile_TCL_DECLARED +/* 440 */ +EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSCopyDirectory_TCL_DECLARED +#define Tcl_FSCopyDirectory_TCL_DECLARED +/* 441 */ +EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSCreateDirectory_TCL_DECLARED +#define Tcl_FSCreateDirectory_TCL_DECLARED +/* 442 */ +EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSDeleteFile_TCL_DECLARED +#define Tcl_FSDeleteFile_TCL_DECLARED +/* 443 */ +EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSLoadFile_TCL_DECLARED +#define Tcl_FSLoadFile_TCL_DECLARED +/* 444 */ +EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, + Tcl_Obj * pathPtr, const char * sym1, + const char * sym2, + Tcl_PackageInitProc ** proc1Ptr, + Tcl_PackageInitProc ** proc2Ptr, + Tcl_LoadHandle * handlePtr, + Tcl_FSUnloadFileProc ** unloadProcPtr); +#endif +#ifndef Tcl_FSMatchInDirectory_TCL_DECLARED +#define Tcl_FSMatchInDirectory_TCL_DECLARED +/* 445 */ +EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, + Tcl_Obj * result, Tcl_Obj * pathPtr, + const char * pattern, + Tcl_GlobTypeData * types); +#endif +#ifndef Tcl_FSLink_TCL_DECLARED +#define Tcl_FSLink_TCL_DECLARED +/* 446 */ +EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, + int linkAction); +#endif +#ifndef Tcl_FSRemoveDirectory_TCL_DECLARED +#define Tcl_FSRemoveDirectory_TCL_DECLARED +/* 447 */ +EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, + int recursive, Tcl_Obj ** errorPtr); +#endif +#ifndef Tcl_FSRenameFile_TCL_DECLARED +#define Tcl_FSRenameFile_TCL_DECLARED +/* 448 */ +EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, + Tcl_Obj * destPathPtr); +#endif +#ifndef Tcl_FSLstat_TCL_DECLARED +#define Tcl_FSLstat_TCL_DECLARED +/* 449 */ +EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSUtime_TCL_DECLARED +#define Tcl_FSUtime_TCL_DECLARED +/* 450 */ +EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, + struct utimbuf * tval); +#endif +#ifndef Tcl_FSFileAttrsGet_TCL_DECLARED +#define Tcl_FSFileAttrsGet_TCL_DECLARED +/* 451 */ +EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSFileAttrsSet_TCL_DECLARED +#define Tcl_FSFileAttrsSet_TCL_DECLARED +/* 452 */ +EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, + Tcl_Obj * pathPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSFileAttrStrings_TCL_DECLARED +#define Tcl_FSFileAttrStrings_TCL_DECLARED +/* 453 */ +EXTERN const char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, + Tcl_Obj ** objPtrRef); +#endif +#ifndef Tcl_FSStat_TCL_DECLARED +#define Tcl_FSStat_TCL_DECLARED +/* 454 */ +EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +#endif +#ifndef Tcl_FSAccess_TCL_DECLARED +#define Tcl_FSAccess_TCL_DECLARED +/* 455 */ +EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); +#endif +#ifndef Tcl_FSOpenFileChannel_TCL_DECLARED +#define Tcl_FSOpenFileChannel_TCL_DECLARED +/* 456 */ +EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, + Tcl_Obj * pathPtr, const char * modeString, + int permissions); +#endif +#ifndef Tcl_FSGetCwd_TCL_DECLARED +#define Tcl_FSGetCwd_TCL_DECLARED +/* 457 */ +EXTERN Tcl_Obj * Tcl_FSGetCwd (Tcl_Interp * interp); +#endif +#ifndef Tcl_FSChdir_TCL_DECLARED +#define Tcl_FSChdir_TCL_DECLARED +/* 458 */ +EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSConvertToPathType_TCL_DECLARED +#define Tcl_FSConvertToPathType_TCL_DECLARED +/* 459 */ +EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSJoinPath_TCL_DECLARED +#define Tcl_FSJoinPath_TCL_DECLARED +/* 460 */ +EXTERN Tcl_Obj * Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); +#endif +#ifndef Tcl_FSSplitPath_TCL_DECLARED +#define Tcl_FSSplitPath_TCL_DECLARED +/* 461 */ +EXTERN Tcl_Obj * Tcl_FSSplitPath (Tcl_Obj * pathPtr, int * lenPtr); +#endif +#ifndef Tcl_FSEqualPaths_TCL_DECLARED +#define Tcl_FSEqualPaths_TCL_DECLARED +/* 462 */ +EXTERN int Tcl_FSEqualPaths (Tcl_Obj * firstPtr, + Tcl_Obj * secondPtr); +#endif +#ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED +#define Tcl_FSGetNormalizedPath_TCL_DECLARED +/* 463 */ +EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSJoinToPath_TCL_DECLARED +#define Tcl_FSJoinToPath_TCL_DECLARED +/* 464 */ +EXTERN Tcl_Obj * Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_FSGetInternalRep_TCL_DECLARED +#define Tcl_FSGetInternalRep_TCL_DECLARED +/* 465 */ +EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj * pathPtr, + const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED +#define Tcl_FSGetTranslatedPath_TCL_DECLARED +/* 466 */ +EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSEvalFile_TCL_DECLARED +#define Tcl_FSEvalFile_TCL_DECLARED +/* 467 */ +EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, + Tcl_Obj * fileName); +#endif +#ifndef Tcl_FSNewNativePath_TCL_DECLARED +#define Tcl_FSNewNativePath_TCL_DECLARED +/* 468 */ +EXTERN Tcl_Obj * Tcl_FSNewNativePath ( + const Tcl_Filesystem * fromFilesystem, + ClientData clientData); +#endif +#ifndef Tcl_FSGetNativePath_TCL_DECLARED +#define Tcl_FSGetNativePath_TCL_DECLARED +/* 469 */ +EXTERN const char * Tcl_FSGetNativePath (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSFileSystemInfo_TCL_DECLARED +#define Tcl_FSFileSystemInfo_TCL_DECLARED +/* 470 */ +EXTERN Tcl_Obj * Tcl_FSFileSystemInfo (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSPathSeparator_TCL_DECLARED +#define Tcl_FSPathSeparator_TCL_DECLARED +/* 471 */ +EXTERN Tcl_Obj * Tcl_FSPathSeparator (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSListVolumes_TCL_DECLARED +#define Tcl_FSListVolumes_TCL_DECLARED +/* 472 */ +EXTERN Tcl_Obj * Tcl_FSListVolumes (void); +#endif +#ifndef Tcl_FSRegister_TCL_DECLARED +#define Tcl_FSRegister_TCL_DECLARED +/* 473 */ +EXTERN int Tcl_FSRegister (ClientData clientData, + const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSUnregister_TCL_DECLARED +#define Tcl_FSUnregister_TCL_DECLARED +/* 474 */ +EXTERN int Tcl_FSUnregister (const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSData_TCL_DECLARED +#define Tcl_FSData_TCL_DECLARED +/* 475 */ +EXTERN ClientData Tcl_FSData (const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED +#define Tcl_FSGetTranslatedStringPath_TCL_DECLARED +/* 476 */ +EXTERN const char * Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED +#define Tcl_FSGetFileSystemForPath_TCL_DECLARED +/* 477 */ +EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath ( + Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_FSGetPathType_TCL_DECLARED +#define Tcl_FSGetPathType_TCL_DECLARED +/* 478 */ +EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); +#endif +#ifndef Tcl_OutputBuffered_TCL_DECLARED +#define Tcl_OutputBuffered_TCL_DECLARED +/* 479 */ +EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); +#endif +#ifndef Tcl_FSMountsChanged_TCL_DECLARED +#define Tcl_FSMountsChanged_TCL_DECLARED +/* 480 */ +EXTERN void Tcl_FSMountsChanged (const Tcl_Filesystem * fsPtr); +#endif +#ifndef Tcl_EvalTokensStandard_TCL_DECLARED +#define Tcl_EvalTokensStandard_TCL_DECLARED +/* 481 */ +EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, + Tcl_Token * tokenPtr, int count); +#endif +#ifndef Tcl_GetTime_TCL_DECLARED +#define Tcl_GetTime_TCL_DECLARED +/* 482 */ +EXTERN void Tcl_GetTime (Tcl_Time * timeBuf); +#endif +#ifndef Tcl_CreateObjTrace_TCL_DECLARED +#define Tcl_CreateObjTrace_TCL_DECLARED +/* 483 */ +EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp * interp, int level, + int flags, Tcl_CmdObjTraceProc * objProc, + ClientData clientData, + Tcl_CmdObjTraceDeleteProc * delProc); +#endif +#ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED +#define Tcl_GetCommandInfoFromToken_TCL_DECLARED +/* 484 */ +EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, + Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED +#define Tcl_SetCommandInfoFromToken_TCL_DECLARED +/* 485 */ +EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, + const Tcl_CmdInfo * infoPtr); +#endif +#ifndef Tcl_DbNewWideIntObj_TCL_DECLARED +#define Tcl_DbNewWideIntObj_TCL_DECLARED +/* 486 */ +EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, + const char * file, int line); +#endif +#ifndef Tcl_GetWideIntFromObj_TCL_DECLARED +#define Tcl_GetWideIntFromObj_TCL_DECLARED +/* 487 */ +EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_WideInt * widePtr); +#endif +#ifndef Tcl_NewWideIntObj_TCL_DECLARED +#define Tcl_NewWideIntObj_TCL_DECLARED +/* 488 */ +EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); +#endif +#ifndef Tcl_SetWideIntObj_TCL_DECLARED +#define Tcl_SetWideIntObj_TCL_DECLARED +/* 489 */ +EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, + Tcl_WideInt wideValue); +#endif +#ifndef Tcl_AllocStatBuf_TCL_DECLARED +#define Tcl_AllocStatBuf_TCL_DECLARED +/* 490 */ +EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); +#endif +#ifndef Tcl_Seek_TCL_DECLARED +#define Tcl_Seek_TCL_DECLARED +/* 491 */ +EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, + int mode); +#endif +#ifndef Tcl_Tell_TCL_DECLARED +#define Tcl_Tell_TCL_DECLARED +/* 492 */ +EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); +#endif +#ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED +#define Tcl_ChannelWideSeekProc_TCL_DECLARED +/* 493 */ +EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_DictObjPut_TCL_DECLARED +#define Tcl_DictObjPut_TCL_DECLARED +/* 494 */ +EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjGet_TCL_DECLARED +#define Tcl_DictObjGet_TCL_DECLARED +/* 495 */ +EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, + Tcl_Obj ** valuePtrPtr); +#endif +#ifndef Tcl_DictObjRemove_TCL_DECLARED +#define Tcl_DictObjRemove_TCL_DECLARED +/* 496 */ +EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, + Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); +#endif +#ifndef Tcl_DictObjSize_TCL_DECLARED +#define Tcl_DictObjSize_TCL_DECLARED +/* 497 */ +EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int * sizePtr); +#endif +#ifndef Tcl_DictObjFirst_TCL_DECLARED +#define Tcl_DictObjFirst_TCL_DECLARED +/* 498 */ +EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, + Tcl_Obj * dictPtr, + Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjNext_TCL_DECLARED +#define Tcl_DictObjNext_TCL_DECLARED +/* 499 */ +EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, + Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, + int * donePtr); +#endif +#ifndef Tcl_DictObjDone_TCL_DECLARED +#define Tcl_DictObjDone_TCL_DECLARED +/* 500 */ +EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); +#endif +#ifndef Tcl_DictObjPutKeyList_TCL_DECLARED +#define Tcl_DictObjPutKeyList_TCL_DECLARED +/* 501 */ +EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); +#endif +#ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED +#define Tcl_DictObjRemoveKeyList_TCL_DECLARED +/* 502 */ +EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, + Tcl_Obj * dictPtr, int keyc, + Tcl_Obj *const * keyv); +#endif +#ifndef Tcl_NewDictObj_TCL_DECLARED +#define Tcl_NewDictObj_TCL_DECLARED +/* 503 */ +EXTERN Tcl_Obj * Tcl_NewDictObj (void); +#endif +#ifndef Tcl_DbNewDictObj_TCL_DECLARED +#define Tcl_DbNewDictObj_TCL_DECLARED +/* 504 */ +EXTERN Tcl_Obj * Tcl_DbNewDictObj (const char * file, int line); +#endif +#ifndef Tcl_RegisterConfig_TCL_DECLARED +#define Tcl_RegisterConfig_TCL_DECLARED +/* 505 */ +EXTERN void Tcl_RegisterConfig (Tcl_Interp * interp, + const char * pkgName, + const Tcl_Config * configuration, + const char * valEncoding); +#endif +#ifndef Tcl_CreateNamespace_TCL_DECLARED +#define Tcl_CreateNamespace_TCL_DECLARED +/* 506 */ +EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, + const char * name, ClientData clientData, + Tcl_NamespaceDeleteProc * deleteProc); +#endif +#ifndef Tcl_DeleteNamespace_TCL_DECLARED +#define Tcl_DeleteNamespace_TCL_DECLARED +/* 507 */ +EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_AppendExportList_TCL_DECLARED +#define Tcl_AppendExportList_TCL_DECLARED +/* 508 */ +EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_Export_TCL_DECLARED +#define Tcl_Export_TCL_DECLARED +/* 509 */ +EXTERN int Tcl_Export (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, + int resetListFirst); +#endif +#ifndef Tcl_Import_TCL_DECLARED +#define Tcl_Import_TCL_DECLARED +/* 510 */ +EXTERN int Tcl_Import (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern, + int allowOverwrite); +#endif +#ifndef Tcl_ForgetImport_TCL_DECLARED +#define Tcl_ForgetImport_TCL_DECLARED +/* 511 */ +EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, const char * pattern); +#endif +#ifndef Tcl_GetCurrentNamespace_TCL_DECLARED +#define Tcl_GetCurrentNamespace_TCL_DECLARED +/* 512 */ +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_GetGlobalNamespace_TCL_DECLARED +#define Tcl_GetGlobalNamespace_TCL_DECLARED +/* 513 */ +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +#endif +#ifndef Tcl_FindNamespace_TCL_DECLARED +#define Tcl_FindNamespace_TCL_DECLARED +/* 514 */ +EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, + const char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_FindCommand_TCL_DECLARED +#define Tcl_FindCommand_TCL_DECLARED +/* 515 */ +EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, + const char * name, + Tcl_Namespace * contextNsPtr, int flags); +#endif +#ifndef Tcl_GetCommandFromObj_TCL_DECLARED +#define Tcl_GetCommandFromObj_TCL_DECLARED +/* 516 */ +EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_GetCommandFullName_TCL_DECLARED +#define Tcl_GetCommandFullName_TCL_DECLARED +/* 517 */ +EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, + Tcl_Command command, Tcl_Obj * objPtr); +#endif +#ifndef Tcl_FSEvalFileEx_TCL_DECLARED +#define Tcl_FSEvalFileEx_TCL_DECLARED +/* 518 */ +EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, + Tcl_Obj * fileName, + const char * encodingName); +#endif +#ifndef Tcl_SetExitProc_TCL_DECLARED +#define Tcl_SetExitProc_TCL_DECLARED +/* 519 */ +EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); +#endif +#ifndef Tcl_LimitAddHandler_TCL_DECLARED +#define Tcl_LimitAddHandler_TCL_DECLARED +/* 520 */ +EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, + Tcl_LimitHandlerProc * handlerProc, + ClientData clientData, + Tcl_LimitHandlerDeleteProc * deleteProc); +#endif +#ifndef Tcl_LimitRemoveHandler_TCL_DECLARED +#define Tcl_LimitRemoveHandler_TCL_DECLARED +/* 521 */ +EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, + int type, Tcl_LimitHandlerProc * handlerProc, + ClientData clientData); +#endif +#ifndef Tcl_LimitReady_TCL_DECLARED +#define Tcl_LimitReady_TCL_DECLARED +/* 522 */ +EXTERN int Tcl_LimitReady (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitCheck_TCL_DECLARED +#define Tcl_LimitCheck_TCL_DECLARED +/* 523 */ +EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitExceeded_TCL_DECLARED +#define Tcl_LimitExceeded_TCL_DECLARED +/* 524 */ +EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitSetCommands_TCL_DECLARED +#define Tcl_LimitSetCommands_TCL_DECLARED +/* 525 */ +EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, + int commandLimit); +#endif +#ifndef Tcl_LimitSetTime_TCL_DECLARED +#define Tcl_LimitSetTime_TCL_DECLARED +/* 526 */ +EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitSetGranularity_TCL_DECLARED +#define Tcl_LimitSetGranularity_TCL_DECLARED +/* 527 */ +EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, + int type, int granularity); +#endif +#ifndef Tcl_LimitTypeEnabled_TCL_DECLARED +#define Tcl_LimitTypeEnabled_TCL_DECLARED +/* 528 */ +EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeExceeded_TCL_DECLARED +#define Tcl_LimitTypeExceeded_TCL_DECLARED +/* 529 */ +EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeSet_TCL_DECLARED +#define Tcl_LimitTypeSet_TCL_DECLARED +/* 530 */ +EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitTypeReset_TCL_DECLARED +#define Tcl_LimitTypeReset_TCL_DECLARED +/* 531 */ +EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); +#endif +#ifndef Tcl_LimitGetCommands_TCL_DECLARED +#define Tcl_LimitGetCommands_TCL_DECLARED +/* 532 */ +EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); +#endif +#ifndef Tcl_LimitGetTime_TCL_DECLARED +#define Tcl_LimitGetTime_TCL_DECLARED +/* 533 */ +EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, + Tcl_Time * timeLimitPtr); +#endif +#ifndef Tcl_LimitGetGranularity_TCL_DECLARED +#define Tcl_LimitGetGranularity_TCL_DECLARED +/* 534 */ +EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, + int type); +#endif +#ifndef Tcl_SaveInterpState_TCL_DECLARED +#define Tcl_SaveInterpState_TCL_DECLARED +/* 535 */ +EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); +#endif +#ifndef Tcl_RestoreInterpState_TCL_DECLARED +#define Tcl_RestoreInterpState_TCL_DECLARED +/* 536 */ +EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, + Tcl_InterpState state); +#endif +#ifndef Tcl_DiscardInterpState_TCL_DECLARED +#define Tcl_DiscardInterpState_TCL_DECLARED +/* 537 */ +EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); +#endif +#ifndef Tcl_SetReturnOptions_TCL_DECLARED +#define Tcl_SetReturnOptions_TCL_DECLARED +/* 538 */ +EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, + Tcl_Obj * options); +#endif +#ifndef Tcl_GetReturnOptions_TCL_DECLARED +#define Tcl_GetReturnOptions_TCL_DECLARED +/* 539 */ +EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, + int result); +#endif +#ifndef Tcl_IsEnsemble_TCL_DECLARED +#define Tcl_IsEnsemble_TCL_DECLARED +/* 540 */ +EXTERN int Tcl_IsEnsemble (Tcl_Command token); +#endif +#ifndef Tcl_CreateEnsemble_TCL_DECLARED +#define Tcl_CreateEnsemble_TCL_DECLARED +/* 541 */ +EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, + const char * name, + Tcl_Namespace * namespacePtr, int flags); +#endif +#ifndef Tcl_FindEnsemble_TCL_DECLARED +#define Tcl_FindEnsemble_TCL_DECLARED +/* 542 */ +EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, + Tcl_Obj * cmdNameObj, int flags); +#endif +#ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_SetEnsembleSubcommandList_TCL_DECLARED +/* 543 */ +EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * subcmdList); +#endif +#ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED +#define Tcl_SetEnsembleMappingDict_TCL_DECLARED +/* 544 */ +EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * mapDict); +#endif +#ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED +/* 545 */ +EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * unknownList); +#endif +#ifndef Tcl_SetEnsembleFlags_TCL_DECLARED +#define Tcl_SetEnsembleFlags_TCL_DECLARED +/* 546 */ +EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int flags); +#endif +#ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED +#define Tcl_GetEnsembleSubcommandList_TCL_DECLARED +/* 547 */ +EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** subcmdListPtr); +#endif +#ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED +#define Tcl_GetEnsembleMappingDict_TCL_DECLARED +/* 548 */ +EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** mapDictPtr); +#endif +#ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +#define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED +/* 549 */ +EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** unknownListPtr); +#endif +#ifndef Tcl_GetEnsembleFlags_TCL_DECLARED +#define Tcl_GetEnsembleFlags_TCL_DECLARED +/* 550 */ +EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, + Tcl_Command token, int * flagsPtr); +#endif +#ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED +#define Tcl_GetEnsembleNamespace_TCL_DECLARED +/* 551 */ +EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, + Tcl_Command token, + Tcl_Namespace ** namespacePtrPtr); +#endif +#ifndef Tcl_SetTimeProc_TCL_DECLARED +#define Tcl_SetTimeProc_TCL_DECLARED +/* 552 */ +EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc * getProc, + Tcl_ScaleTimeProc * scaleProc, + ClientData clientData); +#endif +#ifndef Tcl_QueryTimeProc_TCL_DECLARED +#define Tcl_QueryTimeProc_TCL_DECLARED +/* 553 */ +EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc ** getProc, + Tcl_ScaleTimeProc ** scaleProc, + ClientData * clientData); +#endif +#ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED +#define Tcl_ChannelThreadActionProc_TCL_DECLARED +/* 554 */ +EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_NewBignumObj_TCL_DECLARED +#define Tcl_NewBignumObj_TCL_DECLARED +/* 555 */ +EXTERN Tcl_Obj * Tcl_NewBignumObj (mp_int * value); +#endif +#ifndef Tcl_DbNewBignumObj_TCL_DECLARED +#define Tcl_DbNewBignumObj_TCL_DECLARED +/* 556 */ +EXTERN Tcl_Obj * Tcl_DbNewBignumObj (mp_int * value, + const char * file, int line); +#endif +#ifndef Tcl_SetBignumObj_TCL_DECLARED +#define Tcl_SetBignumObj_TCL_DECLARED +/* 557 */ +EXTERN void Tcl_SetBignumObj (Tcl_Obj * obj, mp_int * value); +#endif +#ifndef Tcl_GetBignumFromObj_TCL_DECLARED +#define Tcl_GetBignumFromObj_TCL_DECLARED +/* 558 */ +EXTERN int Tcl_GetBignumFromObj (Tcl_Interp * interp, + Tcl_Obj * obj, mp_int * value); +#endif +#ifndef Tcl_TakeBignumFromObj_TCL_DECLARED +#define Tcl_TakeBignumFromObj_TCL_DECLARED +/* 559 */ +EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp * interp, + Tcl_Obj * obj, mp_int * value); +#endif +#ifndef Tcl_TruncateChannel_TCL_DECLARED +#define Tcl_TruncateChannel_TCL_DECLARED +/* 560 */ +EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, + Tcl_WideInt length); +#endif +#ifndef Tcl_ChannelTruncateProc_TCL_DECLARED +#define Tcl_ChannelTruncateProc_TCL_DECLARED +/* 561 */ +EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( + const Tcl_ChannelType * chanTypePtr); +#endif +#ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED +#define Tcl_SetChannelErrorInterp_TCL_DECLARED +/* 562 */ +EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp * interp, + Tcl_Obj * msg); +#endif +#ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED +#define Tcl_GetChannelErrorInterp_TCL_DECLARED +/* 563 */ +EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp * interp, + Tcl_Obj ** msg); +#endif +#ifndef Tcl_SetChannelError_TCL_DECLARED +#define Tcl_SetChannelError_TCL_DECLARED +/* 564 */ +EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj * msg); +#endif +#ifndef Tcl_GetChannelError_TCL_DECLARED +#define Tcl_GetChannelError_TCL_DECLARED +/* 565 */ +EXTERN void Tcl_GetChannelError (Tcl_Channel chan, + Tcl_Obj ** msg); +#endif +#ifndef Tcl_InitBignumFromDouble_TCL_DECLARED +#define Tcl_InitBignumFromDouble_TCL_DECLARED +/* 566 */ +EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp * interp, + double initval, mp_int * toInit); +#endif +#ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED +/* 567 */ +EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr); +#endif +#ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +#define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED +/* 568 */ +EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, + Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); +#endif +#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED +#define Tcl_GetEncodingFromObj_TCL_DECLARED +/* 569 */ +EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); +#endif +#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED +#define Tcl_GetEncodingSearchPath_TCL_DECLARED +/* 570 */ +EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath (void); +#endif +#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED +#define Tcl_SetEncodingSearchPath_TCL_DECLARED +/* 571 */ +EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj * searchPath); +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +/* 572 */ +EXTERN const char * Tcl_GetEncodingNameFromEnvironment ( + Tcl_DString * bufPtr); +#endif +#ifndef Tcl_PkgRequireProc_TCL_DECLARED +#define Tcl_PkgRequireProc_TCL_DECLARED +/* 573 */ +EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, + const char * name, int objc, + Tcl_Obj *const objv[], + ClientData * clientDataPtr); +#endif +#ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED +#define Tcl_AppendObjToErrorInfo_TCL_DECLARED +/* 574 */ +EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, + Tcl_Obj * objPtr); +#endif +#ifndef Tcl_AppendLimitedToObj_TCL_DECLARED +#define Tcl_AppendLimitedToObj_TCL_DECLARED +/* 575 */ +EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, + const char * bytes, int length, int limit, + const char * ellipsis); +#endif +#ifndef Tcl_Format_TCL_DECLARED +#define Tcl_Format_TCL_DECLARED +/* 576 */ +EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, const char * format, + int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_AppendFormatToObj_TCL_DECLARED +#define Tcl_AppendFormatToObj_TCL_DECLARED +/* 577 */ +EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, const char * format, + int objc, Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_ObjPrintf_TCL_DECLARED +#define Tcl_ObjPrintf_TCL_DECLARED +/* 578 */ +EXTERN Tcl_Obj * Tcl_ObjPrintf (const char * format, ...); +#endif +#ifndef Tcl_AppendPrintfToObj_TCL_DECLARED +#define Tcl_AppendPrintfToObj_TCL_DECLARED +/* 579 */ +EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, + const char * format, ...); +#endif +#ifndef Tcl_CancelEval_TCL_DECLARED +#define Tcl_CancelEval_TCL_DECLARED +/* 580 */ +EXTERN int Tcl_CancelEval (Tcl_Interp * interp, + Tcl_Obj * resultObjPtr, + ClientData clientData, int flags); +#endif +#ifndef Tcl_Canceled_TCL_DECLARED +#define Tcl_Canceled_TCL_DECLARED +/* 581 */ +EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); +#endif +#ifndef Tcl_CreatePipe_TCL_DECLARED +#define Tcl_CreatePipe_TCL_DECLARED +/* 582 */ +EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, + Tcl_Channel * rchan, Tcl_Channel * wchan, + int flags); +#endif +#ifndef Tcl_NRCreateCommand_TCL_DECLARED +#define Tcl_NRCreateCommand_TCL_DECLARED +/* 583 */ +EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, + const char * cmdName, Tcl_ObjCmdProc * proc, + Tcl_ObjCmdProc * nreProc, + ClientData clientData, + Tcl_CmdDeleteProc * deleteProc); +#endif +#ifndef Tcl_NREvalObj_TCL_DECLARED +#define Tcl_NREvalObj_TCL_DECLARED +/* 584 */ +EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + int flags); +#endif +#ifndef Tcl_NREvalObjv_TCL_DECLARED +#define Tcl_NREvalObjv_TCL_DECLARED +/* 585 */ +EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, + Tcl_Obj *const objv[], int flags); +#endif +#ifndef Tcl_NRCmdSwap_TCL_DECLARED +#define Tcl_NRCmdSwap_TCL_DECLARED +/* 586 */ +EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, + int objc, Tcl_Obj *const objv[], int flags); +#endif +#ifndef Tcl_NRAddCallback_TCL_DECLARED +#define Tcl_NRAddCallback_TCL_DECLARED +/* 587 */ +EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, + Tcl_NRPostProc * postProcPtr, + ClientData data0, ClientData data1, + ClientData data2, ClientData data3); +#endif +#ifndef Tcl_NRCallObjProc_TCL_DECLARED +#define Tcl_NRCallObjProc_TCL_DECLARED +/* 588 */ +EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, + Tcl_ObjCmdProc * objProc, + ClientData clientData, int objc, + Tcl_Obj *const objv[]); +#endif +#ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED +#define Tcl_GetFSDeviceFromStat_TCL_DECLARED +/* 589 */ +EXTERN unsigned Tcl_GetFSDeviceFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetFSInodeFromStat_TCL_DECLARED +#define Tcl_GetFSInodeFromStat_TCL_DECLARED +/* 590 */ +EXTERN unsigned Tcl_GetFSInodeFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetModeFromStat_TCL_DECLARED +#define Tcl_GetModeFromStat_TCL_DECLARED +/* 591 */ +EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetLinkCountFromStat_TCL_DECLARED +#define Tcl_GetLinkCountFromStat_TCL_DECLARED +/* 592 */ +EXTERN int Tcl_GetLinkCountFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetUserIdFromStat_TCL_DECLARED +#define Tcl_GetUserIdFromStat_TCL_DECLARED +/* 593 */ +EXTERN int Tcl_GetUserIdFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetGroupIdFromStat_TCL_DECLARED +#define Tcl_GetGroupIdFromStat_TCL_DECLARED +/* 594 */ +EXTERN int Tcl_GetGroupIdFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetDeviceTypeFromStat_TCL_DECLARED +#define Tcl_GetDeviceTypeFromStat_TCL_DECLARED +/* 595 */ +EXTERN int Tcl_GetDeviceTypeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetAccessTimeFromStat_TCL_DECLARED +#define Tcl_GetAccessTimeFromStat_TCL_DECLARED +/* 596 */ +EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetModificationTimeFromStat_TCL_DECLARED +#define Tcl_GetModificationTimeFromStat_TCL_DECLARED +/* 597 */ +EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetChangeTimeFromStat_TCL_DECLARED +#define Tcl_GetChangeTimeFromStat_TCL_DECLARED +/* 598 */ +EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetSizeFromStat_TCL_DECLARED +#define Tcl_GetSizeFromStat_TCL_DECLARED +/* 599 */ +EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetBlocksFromStat_TCL_DECLARED +#define Tcl_GetBlocksFromStat_TCL_DECLARED +/* 600 */ +EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat (const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_GetBlockSizeFromStat_TCL_DECLARED +#define Tcl_GetBlockSizeFromStat_TCL_DECLARED +/* 601 */ +EXTERN unsigned Tcl_GetBlockSizeFromStat ( + const Tcl_StatBuf * statPtr); +#endif +#ifndef Tcl_SetEnsembleParameterList_TCL_DECLARED +#define Tcl_SetEnsembleParameterList_TCL_DECLARED +/* 602 */ +EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj * paramList); +#endif +#ifndef Tcl_GetEnsembleParameterList_TCL_DECLARED +#define Tcl_GetEnsembleParameterList_TCL_DECLARED +/* 603 */ +EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, + Tcl_Command token, Tcl_Obj ** paramListPtr); +#endif +#ifndef Tcl_ParseArgsObjv_TCL_DECLARED +#define Tcl_ParseArgsObjv_TCL_DECLARED +/* 604 */ +EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, + const Tcl_ArgvInfo * argTable, int * objcPtr, + Tcl_Obj *const * objv, Tcl_Obj *** remObjv); +#endif +#ifndef Tcl_GetErrorLine_TCL_DECLARED +#define Tcl_GetErrorLine_TCL_DECLARED +/* 605 */ +EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); +#endif +#ifndef Tcl_SetErrorLine_TCL_DECLARED +#define Tcl_SetErrorLine_TCL_DECLARED +/* 606 */ +EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int lineNum); +#endif +#ifndef Tcl_TransferResult_TCL_DECLARED +#define Tcl_TransferResult_TCL_DECLARED +/* 607 */ +EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, + int result, Tcl_Interp * targetInterp); +#endif +#ifndef Tcl_InterpActive_TCL_DECLARED +#define Tcl_InterpActive_TCL_DECLARED +/* 608 */ +EXTERN int Tcl_InterpActive (Tcl_Interp * interp); +#endif +#ifndef Tcl_BackgroundException_TCL_DECLARED +#define Tcl_BackgroundException_TCL_DECLARED +/* 609 */ +EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, + int code); +#endif +#ifndef Tcl_ZlibDeflate_TCL_DECLARED +#define Tcl_ZlibDeflate_TCL_DECLARED +/* 610 */ +EXTERN int Tcl_ZlibDeflate (Tcl_Interp * interp, int format, + Tcl_Obj * data, int level, + Tcl_Obj * gzipHeaderDictObj); +#endif +#ifndef Tcl_ZlibInflate_TCL_DECLARED +#define Tcl_ZlibInflate_TCL_DECLARED +/* 611 */ +EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format, + Tcl_Obj * data, int buffersize, + Tcl_Obj * gzipHeaderDictObj); +#endif +#ifndef Tcl_ZlibCRC32_TCL_DECLARED +#define Tcl_ZlibCRC32_TCL_DECLARED +/* 612 */ +EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, const char * buf, + int len); +#endif +#ifndef Tcl_ZlibAdler32_TCL_DECLARED +#define Tcl_ZlibAdler32_TCL_DECLARED +/* 613 */ +EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler, + const char * buf, int len); +#endif +#ifndef Tcl_ZlibStreamInit_TCL_DECLARED +#define Tcl_ZlibStreamInit_TCL_DECLARED +/* 614 */ +EXTERN int Tcl_ZlibStreamInit (Tcl_Interp * interp, int mode, + int format, int level, Tcl_Obj * dictObj, + Tcl_ZlibStream * zshandle); +#endif +#ifndef Tcl_ZlibStreamGetCommandName_TCL_DECLARED +#define Tcl_ZlibStreamGetCommandName_TCL_DECLARED +/* 615 */ +EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName ( + Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamEof_TCL_DECLARED +#define Tcl_ZlibStreamEof_TCL_DECLARED +/* 616 */ +EXTERN int Tcl_ZlibStreamEof (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamAdler32_TCL_DECLARED +#define Tcl_ZlibStreamAdler32_TCL_DECLARED +/* 617 */ +EXTERN int Tcl_ZlibStreamAdler32 (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamPut_TCL_DECLARED +#define Tcl_ZlibStreamPut_TCL_DECLARED +/* 618 */ +EXTERN int Tcl_ZlibStreamPut (Tcl_ZlibStream zshandle, + Tcl_Obj * data, int flush); +#endif +#ifndef Tcl_ZlibStreamGet_TCL_DECLARED +#define Tcl_ZlibStreamGet_TCL_DECLARED +/* 619 */ +EXTERN int Tcl_ZlibStreamGet (Tcl_ZlibStream zshandle, + Tcl_Obj * data, int count); +#endif +#ifndef Tcl_ZlibStreamClose_TCL_DECLARED +#define Tcl_ZlibStreamClose_TCL_DECLARED +/* 620 */ +EXTERN int Tcl_ZlibStreamClose (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_ZlibStreamReset_TCL_DECLARED +#define Tcl_ZlibStreamReset_TCL_DECLARED +/* 621 */ +EXTERN int Tcl_ZlibStreamReset (Tcl_ZlibStream zshandle); +#endif +#ifndef Tcl_SetStartupScript_TCL_DECLARED +#define Tcl_SetStartupScript_TCL_DECLARED +/* 622 */ +EXTERN void Tcl_SetStartupScript (Tcl_Obj * path, + const char * encoding); +#endif +#ifndef Tcl_GetStartupScript_TCL_DECLARED +#define Tcl_GetStartupScript_TCL_DECLARED +/* 623 */ +EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingPtr); +#endif +#ifndef Tcl_CloseEx_TCL_DECLARED +#define Tcl_CloseEx_TCL_DECLARED +/* 624 */ +EXTERN int Tcl_CloseEx (Tcl_Interp * interp, Tcl_Channel chan, + int flags); +#endif + +typedef struct TclStubHooks { + const struct TclPlatStubs *tclPlatStubs; + const struct TclIntStubs *tclIntStubs; + const struct TclIntPlatStubs *tclIntPlatStubs; +} TclStubHooks; + +typedef struct TclStubs { + int magic; + const struct TclStubHooks *hooks; + + int (*tcl_PkgProvideEx) (Tcl_Interp * interp, const char * name, const char * version, ClientData clientData); /* 0 */ + CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 1 */ + void (*tcl_Panic) (const char * format, ...); /* 2 */ + char * (*tcl_Alloc) (unsigned int size); /* 3 */ + void (*tcl_Free) (char * ptr); /* 4 */ + char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ + char * (*tcl_DbCkalloc) (unsigned int size, const char * file, int line); /* 6 */ + int (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ + char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved9; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved10; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DeleteFileHandler) (int fd); /* 10 */ +#endif /* MACOSX */ + void (*tcl_SetTimer) (const Tcl_Time * timePtr); /* 11 */ + void (*tcl_Sleep) (int ms); /* 12 */ + int (*tcl_WaitForEvent) (const Tcl_Time * timePtr); /* 13 */ + int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ + void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ + void (*tcl_AppendToObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 16 */ + Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *const objv[]); /* 17 */ + int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, const Tcl_ObjType * typePtr); /* 18 */ + void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 19 */ + void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 20 */ + int (*tcl_DbIsShared) (Tcl_Obj * objPtr, const char * file, int line); /* 21 */ + Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, const char * file, int line); /* 22 */ + Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char * bytes, int length, const char * file, int line); /* 23 */ + Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char * file, int line); /* 24 */ + Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const * objv, const char * file, int line); /* 25 */ + Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char * file, int line); /* 26 */ + Tcl_Obj * (*tcl_DbNewObj) (const char * file, int line); /* 27 */ + Tcl_Obj * (*tcl_DbNewStringObj) (const char * bytes, int length, const char * file, int line); /* 28 */ + Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ + void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ + int (*tcl_GetBoolean) (Tcl_Interp * interp, const char * src, int * boolPtr); /* 31 */ + int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ + unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ + int (*tcl_GetDouble) (Tcl_Interp * interp, const char * src, double * doublePtr); /* 34 */ + int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *const * tablePtr, const char * msg, int flags, int * indexPtr); /* 36 */ + int (*tcl_GetInt) (Tcl_Interp * interp, const char * src, int * intPtr); /* 37 */ + int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ + int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ + CONST86 Tcl_ObjType * (*tcl_GetObjType) (const char * typeName); /* 40 */ + char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ + void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ + int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ + int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ + int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ + int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ + int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ + int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ + Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char * bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ + Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ + Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */ + Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ + Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ + Tcl_Obj * (*tcl_NewStringObj) (const char * bytes, int length); /* 56 */ + void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ + unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ + void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, const unsigned char * bytes, int length); /* 59 */ + void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ + void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ + void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ + void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ + void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ + void (*tcl_SetStringObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 65 */ + void (*tcl_AddErrorInfo) (Tcl_Interp * interp, const char * message); /* 66 */ + void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, const char * message, int length); /* 67 */ + void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ + void (*tcl_AppendElement) (Tcl_Interp * interp, const char * element); /* 69 */ + void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ + Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ + void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ + int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ + void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ + int (*tcl_AsyncReady) (void); /* 75 */ + void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ + char (*tcl_Backslash) (const char * src, int * readPtr); /* 77 */ + int (*tcl_BadChannelOption) (Tcl_Interp * interp, const char * optionName, const char * optionList); /* 78 */ + void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ + void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ + int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ + int (*tcl_CommandComplete) (const char * cmd); /* 82 */ + char * (*tcl_Concat) (int argc, CONST84 char *const * argv); /* 83 */ + int (*tcl_ConvertElement) (const char * src, char * dst, int flags); /* 84 */ + int (*tcl_ConvertCountedElement) (const char * src, int length, char * dst, int flags); /* 85 */ + int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char *const * argv); /* 86 */ + int (*tcl_CreateAliasObj) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ + Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType * typePtr, const char * chanName, ClientData instanceData, int mask); /* 88 */ + void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ + void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ + Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ + void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ + void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ + Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ + void (*tcl_CreateMathFunc) (Tcl_Interp * interp, const char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ + Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ + Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, const char * slaveName, int isSafe); /* 97 */ + Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ + Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ + void (*tcl_DeleteAssocData) (Tcl_Interp * interp, const char * name); /* 100 */ + void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ + void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ + int (*tcl_DeleteCommand) (Tcl_Interp * interp, const char * cmdName); /* 103 */ + int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ + void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ + void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ + void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ + void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ + void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ + void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ +#endif /* MACOSX */ + void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ + void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ + void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ + int (*tcl_DoOneEvent) (int flags); /* 115 */ + void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ + char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, const char * bytes, int length); /* 117 */ + char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, const char * element); /* 118 */ + void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ + void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ + void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ + void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ + void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ + void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ + void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ + int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ + CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ + CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ + int (*tcl_Eval) (Tcl_Interp * interp, const char * script); /* 129 */ + int (*tcl_EvalFile) (Tcl_Interp * interp, const char * fileName); /* 130 */ + int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ + void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ + void (*tcl_Exit) (int status); /* 133 */ + int (*tcl_ExposeCommand) (Tcl_Interp * interp, const char * hiddenCmdToken, const char * cmdName); /* 134 */ + int (*tcl_ExprBoolean) (Tcl_Interp * interp, const char * expr, int * ptr); /* 135 */ + int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ + int (*tcl_ExprDouble) (Tcl_Interp * interp, const char * expr, double * ptr); /* 137 */ + int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ + int (*tcl_ExprLong) (Tcl_Interp * interp, const char * expr, long * ptr); /* 139 */ + int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ + int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ + int (*tcl_ExprString) (Tcl_Interp * interp, const char * expr); /* 142 */ + void (*tcl_Finalize) (void); /* 143 */ + void (*tcl_FindExecutable) (const char * argv0); /* 144 */ + Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ + int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ + void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ + int (*tcl_GetAlias) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ + int (*tcl_GetAliasObj) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ + ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ + Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, const char * chanName, int * modePtr); /* 151 */ + int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ + int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ + ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ + int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ + CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ + int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, Tcl_DString * dsPtr); /* 157 */ + CONST86 Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ + int (*tcl_GetCommandInfo) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ + CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ + int (*tcl_GetErrno) (void); /* 161 */ + CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ + int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ + Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ + const char * (*tcl_GetNameOfExecutable) (void); /* 165 */ + Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void *reserved167; +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ +#endif /* MACOSX */ + Tcl_PathType (*tcl_GetPathType) (const char * path); /* 168 */ + int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ + int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ + int (*tcl_GetServiceMode) (void); /* 171 */ + Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, const char * slaveName); /* 172 */ + Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ + CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ + CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 175 */ + CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 176 */ + int (*tcl_GlobalEval) (Tcl_Interp * interp, const char * command); /* 177 */ + int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ + int (*tcl_HideCommand) (Tcl_Interp * interp, const char * cmdName, const char * hiddenCmdToken); /* 179 */ + int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ + void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ + int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ + int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ + int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ + int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ + char * (*tcl_JoinPath) (int argc, CONST84 char *const * argv, Tcl_DString * resultPtr); /* 186 */ + int (*tcl_LinkVar) (Tcl_Interp * interp, const char * varName, char * addr, int type); /* 187 */ + void *reserved188; + Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ + int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ + Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ + char * (*tcl_Merge) (int argc, CONST84 char *const * argv); /* 192 */ + Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ + void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ + Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ + Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ +#endif /* MACOSX */ + Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */ + Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */ + Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ + void (*tcl_Preserve) (ClientData data); /* 201 */ + void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ + int (*tcl_PutEnv) (const char * assignment); /* 203 */ + CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ + void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ + int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + void (*tcl_ReapDetachedProcs) (void); /* 207 */ +#endif /* MACOSX */ + int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */ + int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ + void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ + void (*tcl_RegisterObjType) (const Tcl_ObjType * typePtr); /* 211 */ + Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, const char * pattern); /* 212 */ + int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, const char * text, const char * start); /* 213 */ + int (*tcl_RegExpMatch) (Tcl_Interp * interp, const char * text, const char * pattern); /* 214 */ + void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ + void (*tcl_Release) (ClientData clientData); /* 216 */ + void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ + int (*tcl_ScanElement) (const char * str, int * flagPtr); /* 218 */ + int (*tcl_ScanCountedElement) (const char * str, int length, int * flagPtr); /* 219 */ + int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ + int (*tcl_ServiceAll) (void); /* 221 */ + int (*tcl_ServiceEvent) (int flags); /* 222 */ + void (*tcl_SetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ + void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ + int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, const char * newValue); /* 225 */ + int (*tcl_SetCommandInfo) (Tcl_Interp * interp, const char * cmdName, const Tcl_CmdInfo * infoPtr); /* 226 */ + void (*tcl_SetErrno) (int err); /* 227 */ + void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ + void (*tcl_SetMaxBlockTime) (const Tcl_Time * timePtr); /* 229 */ + void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ + int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ + void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ + int (*tcl_SetServiceMode) (int mode); /* 233 */ + void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ + void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ + void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ + CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, const char * varName, const char * newValue, int flags); /* 237 */ + CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, const char * newValue, int flags); /* 238 */ + CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ + CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ + void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ + int (*tcl_SplitList) (Tcl_Interp * interp, const char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ + void (*tcl_SplitPath) (const char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ + void (*tcl_StaticPackage) (Tcl_Interp * interp, const char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ + int (*tcl_StringMatch) (const char * str, const char * pattern); /* 245 */ + int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ + int (*tcl_TraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ + int (*tcl_TraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ + char * (*tcl_TranslateFileName) (Tcl_Interp * interp, const char * name, Tcl_DString * bufferPtr); /* 249 */ + int (*tcl_Ungets) (Tcl_Channel chan, const char * str, int len, int atHead); /* 250 */ + void (*tcl_UnlinkVar) (Tcl_Interp * interp, const char * varName); /* 251 */ + int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ + int (*tcl_UnsetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 253 */ + int (*tcl_UnsetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 254 */ + void (*tcl_UntraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ + void (*tcl_UntraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ + void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, const char * varName); /* 257 */ + int (*tcl_UpVar) (Tcl_Interp * interp, const char * frameName, const char * varName, const char * localName, int flags); /* 258 */ + int (*tcl_UpVar2) (Tcl_Interp * interp, const char * frameName, const char * part1, const char * part2, const char * localName, int flags); /* 259 */ + int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ + ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ + ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ + int (*tcl_Write) (Tcl_Channel chan, const char * s, int slen); /* 263 */ + void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], const char * message); /* 264 */ + int (*tcl_DumpActiveMemory) (const char * fileName); /* 265 */ + void (*tcl_ValidateAllMemory) (const char * file, int line); /* 266 */ + void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ + void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ + char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ + CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, const char * start, CONST84 char ** termPtr); /* 270 */ + CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 271 */ + CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 272 */ + int (*tcl_PkgProvide) (Tcl_Interp * interp, const char * name, const char * version); /* 273 */ + CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 274 */ + void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ + int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ + Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ + void (*tcl_PanicVA) (const char * format, va_list argList); /* 278 */ + void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ + void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, const Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ + Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ + void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ + void *reserved285; + void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ + Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ + void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ + void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ + void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ + int (*tcl_EvalEx) (Tcl_Interp * interp, const char * script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ + int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ + void (*tcl_ExitThread) (int status); /* 294 */ + int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ + char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ + void (*tcl_FinalizeThread) (void); /* 297 */ + void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ + void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ + Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ + Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, const char * name); /* 301 */ + CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ + void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const VOID * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ + VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ + Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 306 */ + ClientData (*tcl_InitNotifier) (void); /* 307 */ + void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ + void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ + void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ + void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, const Tcl_Time * timePtr); /* 311 */ + int (*tcl_NumUtfChars) (const char * src, int length); /* 312 */ + int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ + void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ + void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ + int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, const char * name); /* 316 */ + Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ + void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ + void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event * evPtr, Tcl_QueuePosition position); /* 319 */ + Tcl_UniChar (*tcl_UniCharAtIndex) (const char * src, int index); /* 320 */ + Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ + Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ + Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ + int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ + CONST84_RETURN char * (*tcl_UtfAtIndex) (const char * src, int index); /* 325 */ + int (*tcl_UtfCharComplete) (const char * src, int length); /* 326 */ + int (*tcl_UtfBackslash) (const char * src, int * readPtr, char * dst); /* 327 */ + CONST84_RETURN char * (*tcl_UtfFindFirst) (const char * src, int ch); /* 328 */ + CONST84_RETURN char * (*tcl_UtfFindLast) (const char * src, int ch); /* 329 */ + CONST84_RETURN char * (*tcl_UtfNext) (const char * src); /* 330 */ + CONST84_RETURN char * (*tcl_UtfPrev) (const char * src, const char * start); /* 331 */ + int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ + char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ + int (*tcl_UtfToLower) (char * src); /* 334 */ + int (*tcl_UtfToTitle) (char * src); /* 335 */ + int (*tcl_UtfToUniChar) (const char * src, Tcl_UniChar * chPtr); /* 336 */ + int (*tcl_UtfToUpper) (char * src); /* 337 */ + int (*tcl_WriteChars) (Tcl_Channel chan, const char * src, int srcLen); /* 338 */ + int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ + char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ + CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ + void (*tcl_SetDefaultEncodingDir) (const char * path); /* 342 */ + void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ + void (*tcl_ServiceModeHook) (int mode); /* 344 */ + int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ + int (*tcl_UniCharIsAlpha) (int ch); /* 346 */ + int (*tcl_UniCharIsDigit) (int ch); /* 347 */ + int (*tcl_UniCharIsLower) (int ch); /* 348 */ + int (*tcl_UniCharIsSpace) (int ch); /* 349 */ + int (*tcl_UniCharIsUpper) (int ch); /* 350 */ + int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ + int (*tcl_UniCharLen) (const Tcl_UniChar * uniStr); /* 352 */ + int (*tcl_UniCharNcmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 353 */ + char * (*tcl_UniCharToUtfDString) (const Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) (const char * src, int length, Tcl_DString * dsPtr); /* 355 */ + Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ + Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ + void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ + void (*tcl_LogCommandInfo) (Tcl_Interp * interp, const char * script, const char * command, int length); /* 359 */ + int (*tcl_ParseBraces) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ + int (*tcl_ParseCommand) (Tcl_Interp * interp, const char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ + int (*tcl_ParseExpr) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ + int (*tcl_ParseQuotedString) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ + int (*tcl_ParseVarName) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ + char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ + int (*tcl_Chdir) (const char * dirName); /* 366 */ + int (*tcl_Access) (const char * path, int mode); /* 367 */ + int (*tcl_Stat) (const char * path, struct stat * bufPtr); /* 368 */ + int (*tcl_UtfNcmp) (const char * s1, const char * s2, unsigned long n); /* 369 */ + int (*tcl_UtfNcasecmp) (const char * s1, const char * s2, unsigned long n); /* 370 */ + int (*tcl_StringCaseMatch) (const char * str, const char * pattern, int nocase); /* 371 */ + int (*tcl_UniCharIsControl) (int ch); /* 372 */ + int (*tcl_UniCharIsGraph) (int ch); /* 373 */ + int (*tcl_UniCharIsPrint) (int ch); /* 374 */ + int (*tcl_UniCharIsPunct) (int ch); /* 375 */ + int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ + void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar * unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int numChars); /* 379 */ + int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ + Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ + Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ + Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ + void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int length); /* 384 */ + int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ + void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ + Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ + int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ + int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, const char * pattern); /* 389 */ + int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 390 */ + void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ + void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ + int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ + int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ + int (*tcl_WriteRaw) (Tcl_Channel chan, const char * src, int srcLen); /* 395 */ + Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ + int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ + CONST84_RETURN char * (*tcl_ChannelName) (const Tcl_ChannelType * chanTypePtr); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType * chanTypePtr); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType * chanTypePtr); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (const Tcl_ChannelType * chanTypePtr); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType * chanTypePtr); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType * chanTypePtr); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType * chanTypePtr); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType * chanTypePtr); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType * chanTypePtr); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType * chanTypePtr); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType * chanTypePtr); /* 411 */ + int (*tcl_JoinThread) (Tcl_ThreadId threadId, int * result); /* 412 */ + int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ + int (*tcl_IsChannelRegistered) (Tcl_Interp * interp, Tcl_Channel channel); /* 414 */ + void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ + void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ + void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ + int (*tcl_IsChannelExisting) (const char * channelName); /* 418 */ + int (*tcl_UniCharNcasecmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 419 */ + int (*tcl_UniCharCaseMatch) (const Tcl_UniChar * uniStr, const Tcl_UniChar * uniPattern, int nocase); /* 420 */ + Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, const char * key); /* 421 */ + Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, const char * key, int * newPtr); /* 422 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, const Tcl_HashKeyType * typePtr); /* 423 */ + void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ + ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ + int (*tcl_TraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ + void (*tcl_UntraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ + char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ + char * (*tcl_AttemptDbCkalloc) (unsigned int size, const char * file, int line); /* 429 */ + char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ + char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 431 */ + int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ + Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ + Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ + int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, const char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ + Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, const char * pattern); /* 436 */ + Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ + int (*tcl_DetachChannel) (Tcl_Interp * interp, Tcl_Channel channel); /* 438 */ + int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ + int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ + int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ + int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ + int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ + int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * sym1, const char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ + int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, const char * pattern, Tcl_GlobTypeData * types); /* 445 */ + Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ + int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ + int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ + int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ + int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ + int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ + int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ + const char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ + int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ + int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ + Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * modeString, int permissions); /* 456 */ + Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ + int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ + int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ + Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ + Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj * pathPtr, int * lenPtr); /* 461 */ + int (*tcl_FSEqualPaths) (Tcl_Obj * firstPtr, Tcl_Obj * secondPtr); /* 462 */ + Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 463 */ + Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj * pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ + Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 466 */ + int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ + Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem * fromFilesystem, ClientData clientData); /* 468 */ + const char * (*tcl_FSGetNativePath) (Tcl_Obj * pathPtr); /* 469 */ + Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj * pathPtr); /* 470 */ + Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj * pathPtr); /* 471 */ + Tcl_Obj * (*tcl_FSListVolumes) (void); /* 472 */ + int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem * fsPtr); /* 473 */ + int (*tcl_FSUnregister) (const Tcl_Filesystem * fsPtr); /* 474 */ + ClientData (*tcl_FSData) (const Tcl_Filesystem * fsPtr); /* 475 */ + const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 476 */ + CONST86 Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj * pathPtr); /* 477 */ + Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ + int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ + void (*tcl_FSMountsChanged) (const Tcl_Filesystem * fsPtr); /* 480 */ + int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ + void (*tcl_GetTime) (Tcl_Time * timeBuf); /* 482 */ + Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp * interp, int level, int flags, Tcl_CmdObjTraceProc * objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc * delProc); /* 483 */ + int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo * infoPtr); /* 484 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo * infoPtr); /* 485 */ + Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char * file, int line); /* 486 */ + int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ + Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ + void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ + Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ + Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ + Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ + Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 493 */ + int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ + int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ + int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ + int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ + int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ + void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ + void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ + int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); /* 501 */ + int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv); /* 502 */ + Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ + Tcl_Obj * (*tcl_DbNewDictObj) (const char * file, int line); /* 504 */ + void (*tcl_RegisterConfig) (Tcl_Interp * interp, const char * pkgName, const Tcl_Config * configuration, const char * valEncoding); /* 505 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ + int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ + int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 509 */ + int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 510 */ + int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 511 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ + void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, const char * encodingName); /* 518 */ + Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ + void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ + void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ + int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ + int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ + int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ + void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ + void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ + void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ + int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ + int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ + void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ + void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ + int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ + void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ + int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ + Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ + int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ + void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ + int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ + Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ + int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ + Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, const char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ + Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ + int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ + int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ + int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ + int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ + int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ + int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ + int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ + int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ + int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ + void (*tcl_SetTimeProc) (Tcl_GetTimeProc * getProc, Tcl_ScaleTimeProc * scaleProc, ClientData clientData); /* 552 */ + void (*tcl_QueryTimeProc) (Tcl_GetTimeProc ** getProc, Tcl_ScaleTimeProc ** scaleProc, ClientData * clientData); /* 553 */ + Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType * chanTypePtr); /* 554 */ + Tcl_Obj * (*tcl_NewBignumObj) (mp_int * value); /* 555 */ + Tcl_Obj * (*tcl_DbNewBignumObj) (mp_int * value, const char * file, int line); /* 556 */ + void (*tcl_SetBignumObj) (Tcl_Obj * obj, mp_int * value); /* 557 */ + int (*tcl_GetBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 558 */ + int (*tcl_TakeBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 559 */ + int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ + Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType * chanTypePtr); /* 561 */ + void (*tcl_SetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj * msg); /* 562 */ + void (*tcl_GetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj ** msg); /* 563 */ + void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj * msg); /* 564 */ + void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj ** msg); /* 565 */ + int (*tcl_InitBignumFromDouble) (Tcl_Interp * interp, double initval, mp_int * toInit); /* 566 */ + Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ + int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ + int (*tcl_GetEncodingFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); /* 569 */ + Tcl_Obj * (*tcl_GetEncodingSearchPath) (void); /* 570 */ + int (*tcl_SetEncodingSearchPath) (Tcl_Obj * searchPath); /* 571 */ + const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString * bufPtr); /* 572 */ + int (*tcl_PkgRequireProc) (Tcl_Interp * interp, const char * name, int objc, Tcl_Obj *const objv[], ClientData * clientDataPtr); /* 573 */ + void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ + void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, const char * bytes, int length, int limit, const char * ellipsis); /* 575 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj *const objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj *const objv[]); /* 577 */ + Tcl_Obj * (*tcl_ObjPrintf) (const char * format, ...); /* 578 */ + void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, const char * format, ...); /* 579 */ + int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ + int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ + int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 582 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ + int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 584 */ + int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 585 */ + int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); /* 586 */ + void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ + int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 588 */ + unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statPtr); /* 589 */ + unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statPtr); /* 590 */ + unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statPtr); /* 591 */ + int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statPtr); /* 592 */ + int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statPtr); /* 593 */ + int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statPtr); /* 594 */ + int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statPtr); /* 595 */ + Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statPtr); /* 596 */ + Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statPtr); /* 597 */ + Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statPtr); /* 598 */ + Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statPtr); /* 599 */ + Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statPtr); /* 600 */ + unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ + int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ + int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ + int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ + int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ + void (*tcl_SetErrorLine) (Tcl_Interp * interp, int lineNum); /* 606 */ + void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ + int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ + void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ + int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */ + int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */ + unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const char * buf, int len); /* 612 */ + unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const char * buf, int len); /* 613 */ + int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ + Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ + int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ + int (*tcl_ZlibStreamAdler32) (Tcl_ZlibStream zshandle); /* 617 */ + int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int flush); /* 618 */ + int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ + int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ + int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */ + void (*tcl_SetStartupScript) (Tcl_Obj * path, const char * encoding); /* 622 */ + Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ + int (*tcl_CloseEx) (Tcl_Interp * interp, Tcl_Channel chan, int flags); /* 624 */ +} TclStubs; + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) +extern const TclStubs *tclStubsPtr; +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) + +/* + * Inline function declarations: + */ + +#ifndef Tcl_PkgProvideEx +#define Tcl_PkgProvideEx \ + (tclStubsPtr->tcl_PkgProvideEx) /* 0 */ +#endif +#ifndef Tcl_PkgRequireEx +#define Tcl_PkgRequireEx \ + (tclStubsPtr->tcl_PkgRequireEx) /* 1 */ +#endif +#ifndef Tcl_Panic +#define Tcl_Panic \ + (tclStubsPtr->tcl_Panic) /* 2 */ +#endif +#ifndef Tcl_Alloc +#define Tcl_Alloc \ + (tclStubsPtr->tcl_Alloc) /* 3 */ +#endif +#ifndef Tcl_Free +#define Tcl_Free \ + (tclStubsPtr->tcl_Free) /* 4 */ +#endif +#ifndef Tcl_Realloc +#define Tcl_Realloc \ + (tclStubsPtr->tcl_Realloc) /* 5 */ +#endif +#ifndef Tcl_DbCkalloc +#define Tcl_DbCkalloc \ + (tclStubsPtr->tcl_DbCkalloc) /* 6 */ +#endif +#ifndef Tcl_DbCkfree +#define Tcl_DbCkfree \ + (tclStubsPtr->tcl_DbCkfree) /* 7 */ +#endif +#ifndef Tcl_DbCkrealloc +#define Tcl_DbCkrealloc \ + (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_CreateFileHandler +#define Tcl_CreateFileHandler \ + (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ +#endif +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DeleteFileHandler +#define Tcl_DeleteFileHandler \ + (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_SetTimer +#define Tcl_SetTimer \ + (tclStubsPtr->tcl_SetTimer) /* 11 */ +#endif +#ifndef Tcl_Sleep +#define Tcl_Sleep \ + (tclStubsPtr->tcl_Sleep) /* 12 */ +#endif +#ifndef Tcl_WaitForEvent +#define Tcl_WaitForEvent \ + (tclStubsPtr->tcl_WaitForEvent) /* 13 */ +#endif +#ifndef Tcl_AppendAllObjTypes +#define Tcl_AppendAllObjTypes \ + (tclStubsPtr->tcl_AppendAllObjTypes) /* 14 */ +#endif +#ifndef Tcl_AppendStringsToObj +#define Tcl_AppendStringsToObj \ + (tclStubsPtr->tcl_AppendStringsToObj) /* 15 */ +#endif +#ifndef Tcl_AppendToObj +#define Tcl_AppendToObj \ + (tclStubsPtr->tcl_AppendToObj) /* 16 */ +#endif +#ifndef Tcl_ConcatObj +#define Tcl_ConcatObj \ + (tclStubsPtr->tcl_ConcatObj) /* 17 */ +#endif +#ifndef Tcl_ConvertToType +#define Tcl_ConvertToType \ + (tclStubsPtr->tcl_ConvertToType) /* 18 */ +#endif +#ifndef Tcl_DbDecrRefCount +#define Tcl_DbDecrRefCount \ + (tclStubsPtr->tcl_DbDecrRefCount) /* 19 */ +#endif +#ifndef Tcl_DbIncrRefCount +#define Tcl_DbIncrRefCount \ + (tclStubsPtr->tcl_DbIncrRefCount) /* 20 */ +#endif +#ifndef Tcl_DbIsShared +#define Tcl_DbIsShared \ + (tclStubsPtr->tcl_DbIsShared) /* 21 */ +#endif +#ifndef Tcl_DbNewBooleanObj +#define Tcl_DbNewBooleanObj \ + (tclStubsPtr->tcl_DbNewBooleanObj) /* 22 */ +#endif +#ifndef Tcl_DbNewByteArrayObj +#define Tcl_DbNewByteArrayObj \ + (tclStubsPtr->tcl_DbNewByteArrayObj) /* 23 */ +#endif +#ifndef Tcl_DbNewDoubleObj +#define Tcl_DbNewDoubleObj \ + (tclStubsPtr->tcl_DbNewDoubleObj) /* 24 */ +#endif +#ifndef Tcl_DbNewListObj +#define Tcl_DbNewListObj \ + (tclStubsPtr->tcl_DbNewListObj) /* 25 */ +#endif +#ifndef Tcl_DbNewLongObj +#define Tcl_DbNewLongObj \ + (tclStubsPtr->tcl_DbNewLongObj) /* 26 */ +#endif +#ifndef Tcl_DbNewObj +#define Tcl_DbNewObj \ + (tclStubsPtr->tcl_DbNewObj) /* 27 */ +#endif +#ifndef Tcl_DbNewStringObj +#define Tcl_DbNewStringObj \ + (tclStubsPtr->tcl_DbNewStringObj) /* 28 */ +#endif +#ifndef Tcl_DuplicateObj +#define Tcl_DuplicateObj \ + (tclStubsPtr->tcl_DuplicateObj) /* 29 */ +#endif +#ifndef TclFreeObj +#define TclFreeObj \ + (tclStubsPtr->tclFreeObj) /* 30 */ +#endif +#ifndef Tcl_GetBoolean +#define Tcl_GetBoolean \ + (tclStubsPtr->tcl_GetBoolean) /* 31 */ +#endif +#ifndef Tcl_GetBooleanFromObj +#define Tcl_GetBooleanFromObj \ + (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */ +#endif +#ifndef Tcl_GetByteArrayFromObj +#define Tcl_GetByteArrayFromObj \ + (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */ +#endif +#ifndef Tcl_GetDouble +#define Tcl_GetDouble \ + (tclStubsPtr->tcl_GetDouble) /* 34 */ +#endif +#ifndef Tcl_GetDoubleFromObj +#define Tcl_GetDoubleFromObj \ + (tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */ +#endif +#ifndef Tcl_GetIndexFromObj +#define Tcl_GetIndexFromObj \ + (tclStubsPtr->tcl_GetIndexFromObj) /* 36 */ +#endif +#ifndef Tcl_GetInt +#define Tcl_GetInt \ + (tclStubsPtr->tcl_GetInt) /* 37 */ +#endif +#ifndef Tcl_GetIntFromObj +#define Tcl_GetIntFromObj \ + (tclStubsPtr->tcl_GetIntFromObj) /* 38 */ +#endif +#ifndef Tcl_GetLongFromObj +#define Tcl_GetLongFromObj \ + (tclStubsPtr->tcl_GetLongFromObj) /* 39 */ +#endif +#ifndef Tcl_GetObjType +#define Tcl_GetObjType \ + (tclStubsPtr->tcl_GetObjType) /* 40 */ +#endif +#ifndef Tcl_GetStringFromObj +#define Tcl_GetStringFromObj \ + (tclStubsPtr->tcl_GetStringFromObj) /* 41 */ +#endif +#ifndef Tcl_InvalidateStringRep +#define Tcl_InvalidateStringRep \ + (tclStubsPtr->tcl_InvalidateStringRep) /* 42 */ +#endif +#ifndef Tcl_ListObjAppendList +#define Tcl_ListObjAppendList \ + (tclStubsPtr->tcl_ListObjAppendList) /* 43 */ +#endif +#ifndef Tcl_ListObjAppendElement +#define Tcl_ListObjAppendElement \ + (tclStubsPtr->tcl_ListObjAppendElement) /* 44 */ +#endif +#ifndef Tcl_ListObjGetElements +#define Tcl_ListObjGetElements \ + (tclStubsPtr->tcl_ListObjGetElements) /* 45 */ +#endif +#ifndef Tcl_ListObjIndex +#define Tcl_ListObjIndex \ + (tclStubsPtr->tcl_ListObjIndex) /* 46 */ +#endif +#ifndef Tcl_ListObjLength +#define Tcl_ListObjLength \ + (tclStubsPtr->tcl_ListObjLength) /* 47 */ +#endif +#ifndef Tcl_ListObjReplace +#define Tcl_ListObjReplace \ + (tclStubsPtr->tcl_ListObjReplace) /* 48 */ +#endif +#ifndef Tcl_NewBooleanObj +#define Tcl_NewBooleanObj \ + (tclStubsPtr->tcl_NewBooleanObj) /* 49 */ +#endif +#ifndef Tcl_NewByteArrayObj +#define Tcl_NewByteArrayObj \ + (tclStubsPtr->tcl_NewByteArrayObj) /* 50 */ +#endif +#ifndef Tcl_NewDoubleObj +#define Tcl_NewDoubleObj \ + (tclStubsPtr->tcl_NewDoubleObj) /* 51 */ +#endif +#ifndef Tcl_NewIntObj +#define Tcl_NewIntObj \ + (tclStubsPtr->tcl_NewIntObj) /* 52 */ +#endif +#ifndef Tcl_NewListObj +#define Tcl_NewListObj \ + (tclStubsPtr->tcl_NewListObj) /* 53 */ +#endif +#ifndef Tcl_NewLongObj +#define Tcl_NewLongObj \ + (tclStubsPtr->tcl_NewLongObj) /* 54 */ +#endif +#ifndef Tcl_NewObj +#define Tcl_NewObj \ + (tclStubsPtr->tcl_NewObj) /* 55 */ +#endif +#ifndef Tcl_NewStringObj +#define Tcl_NewStringObj \ + (tclStubsPtr->tcl_NewStringObj) /* 56 */ +#endif +#ifndef Tcl_SetBooleanObj +#define Tcl_SetBooleanObj \ + (tclStubsPtr->tcl_SetBooleanObj) /* 57 */ +#endif +#ifndef Tcl_SetByteArrayLength +#define Tcl_SetByteArrayLength \ + (tclStubsPtr->tcl_SetByteArrayLength) /* 58 */ +#endif +#ifndef Tcl_SetByteArrayObj +#define Tcl_SetByteArrayObj \ + (tclStubsPtr->tcl_SetByteArrayObj) /* 59 */ +#endif +#ifndef Tcl_SetDoubleObj +#define Tcl_SetDoubleObj \ + (tclStubsPtr->tcl_SetDoubleObj) /* 60 */ +#endif +#ifndef Tcl_SetIntObj +#define Tcl_SetIntObj \ + (tclStubsPtr->tcl_SetIntObj) /* 61 */ +#endif +#ifndef Tcl_SetListObj +#define Tcl_SetListObj \ + (tclStubsPtr->tcl_SetListObj) /* 62 */ +#endif +#ifndef Tcl_SetLongObj +#define Tcl_SetLongObj \ + (tclStubsPtr->tcl_SetLongObj) /* 63 */ +#endif +#ifndef Tcl_SetObjLength +#define Tcl_SetObjLength \ + (tclStubsPtr->tcl_SetObjLength) /* 64 */ +#endif +#ifndef Tcl_SetStringObj +#define Tcl_SetStringObj \ + (tclStubsPtr->tcl_SetStringObj) /* 65 */ +#endif +#ifndef Tcl_AddErrorInfo +#define Tcl_AddErrorInfo \ + (tclStubsPtr->tcl_AddErrorInfo) /* 66 */ +#endif +#ifndef Tcl_AddObjErrorInfo +#define Tcl_AddObjErrorInfo \ + (tclStubsPtr->tcl_AddObjErrorInfo) /* 67 */ +#endif +#ifndef Tcl_AllowExceptions +#define Tcl_AllowExceptions \ + (tclStubsPtr->tcl_AllowExceptions) /* 68 */ +#endif +#ifndef Tcl_AppendElement +#define Tcl_AppendElement \ + (tclStubsPtr->tcl_AppendElement) /* 69 */ +#endif +#ifndef Tcl_AppendResult +#define Tcl_AppendResult \ + (tclStubsPtr->tcl_AppendResult) /* 70 */ +#endif +#ifndef Tcl_AsyncCreate +#define Tcl_AsyncCreate \ + (tclStubsPtr->tcl_AsyncCreate) /* 71 */ +#endif +#ifndef Tcl_AsyncDelete +#define Tcl_AsyncDelete \ + (tclStubsPtr->tcl_AsyncDelete) /* 72 */ +#endif +#ifndef Tcl_AsyncInvoke +#define Tcl_AsyncInvoke \ + (tclStubsPtr->tcl_AsyncInvoke) /* 73 */ +#endif +#ifndef Tcl_AsyncMark +#define Tcl_AsyncMark \ + (tclStubsPtr->tcl_AsyncMark) /* 74 */ +#endif +#ifndef Tcl_AsyncReady +#define Tcl_AsyncReady \ + (tclStubsPtr->tcl_AsyncReady) /* 75 */ +#endif +#ifndef Tcl_BackgroundError +#define Tcl_BackgroundError \ + (tclStubsPtr->tcl_BackgroundError) /* 76 */ +#endif +#ifndef Tcl_Backslash +#define Tcl_Backslash \ + (tclStubsPtr->tcl_Backslash) /* 77 */ +#endif +#ifndef Tcl_BadChannelOption +#define Tcl_BadChannelOption \ + (tclStubsPtr->tcl_BadChannelOption) /* 78 */ +#endif +#ifndef Tcl_CallWhenDeleted +#define Tcl_CallWhenDeleted \ + (tclStubsPtr->tcl_CallWhenDeleted) /* 79 */ +#endif +#ifndef Tcl_CancelIdleCall +#define Tcl_CancelIdleCall \ + (tclStubsPtr->tcl_CancelIdleCall) /* 80 */ +#endif +#ifndef Tcl_Close +#define Tcl_Close \ + (tclStubsPtr->tcl_Close) /* 81 */ +#endif +#ifndef Tcl_CommandComplete +#define Tcl_CommandComplete \ + (tclStubsPtr->tcl_CommandComplete) /* 82 */ +#endif +#ifndef Tcl_Concat +#define Tcl_Concat \ + (tclStubsPtr->tcl_Concat) /* 83 */ +#endif +#ifndef Tcl_ConvertElement +#define Tcl_ConvertElement \ + (tclStubsPtr->tcl_ConvertElement) /* 84 */ +#endif +#ifndef Tcl_ConvertCountedElement +#define Tcl_ConvertCountedElement \ + (tclStubsPtr->tcl_ConvertCountedElement) /* 85 */ +#endif +#ifndef Tcl_CreateAlias +#define Tcl_CreateAlias \ + (tclStubsPtr->tcl_CreateAlias) /* 86 */ +#endif +#ifndef Tcl_CreateAliasObj +#define Tcl_CreateAliasObj \ + (tclStubsPtr->tcl_CreateAliasObj) /* 87 */ +#endif +#ifndef Tcl_CreateChannel +#define Tcl_CreateChannel \ + (tclStubsPtr->tcl_CreateChannel) /* 88 */ +#endif +#ifndef Tcl_CreateChannelHandler +#define Tcl_CreateChannelHandler \ + (tclStubsPtr->tcl_CreateChannelHandler) /* 89 */ +#endif +#ifndef Tcl_CreateCloseHandler +#define Tcl_CreateCloseHandler \ + (tclStubsPtr->tcl_CreateCloseHandler) /* 90 */ +#endif +#ifndef Tcl_CreateCommand +#define Tcl_CreateCommand \ + (tclStubsPtr->tcl_CreateCommand) /* 91 */ +#endif +#ifndef Tcl_CreateEventSource +#define Tcl_CreateEventSource \ + (tclStubsPtr->tcl_CreateEventSource) /* 92 */ +#endif +#ifndef Tcl_CreateExitHandler +#define Tcl_CreateExitHandler \ + (tclStubsPtr->tcl_CreateExitHandler) /* 93 */ +#endif +#ifndef Tcl_CreateInterp +#define Tcl_CreateInterp \ + (tclStubsPtr->tcl_CreateInterp) /* 94 */ +#endif +#ifndef Tcl_CreateMathFunc +#define Tcl_CreateMathFunc \ + (tclStubsPtr->tcl_CreateMathFunc) /* 95 */ +#endif +#ifndef Tcl_CreateObjCommand +#define Tcl_CreateObjCommand \ + (tclStubsPtr->tcl_CreateObjCommand) /* 96 */ +#endif +#ifndef Tcl_CreateSlave +#define Tcl_CreateSlave \ + (tclStubsPtr->tcl_CreateSlave) /* 97 */ +#endif +#ifndef Tcl_CreateTimerHandler +#define Tcl_CreateTimerHandler \ + (tclStubsPtr->tcl_CreateTimerHandler) /* 98 */ +#endif +#ifndef Tcl_CreateTrace +#define Tcl_CreateTrace \ + (tclStubsPtr->tcl_CreateTrace) /* 99 */ +#endif +#ifndef Tcl_DeleteAssocData +#define Tcl_DeleteAssocData \ + (tclStubsPtr->tcl_DeleteAssocData) /* 100 */ +#endif +#ifndef Tcl_DeleteChannelHandler +#define Tcl_DeleteChannelHandler \ + (tclStubsPtr->tcl_DeleteChannelHandler) /* 101 */ +#endif +#ifndef Tcl_DeleteCloseHandler +#define Tcl_DeleteCloseHandler \ + (tclStubsPtr->tcl_DeleteCloseHandler) /* 102 */ +#endif +#ifndef Tcl_DeleteCommand +#define Tcl_DeleteCommand \ + (tclStubsPtr->tcl_DeleteCommand) /* 103 */ +#endif +#ifndef Tcl_DeleteCommandFromToken +#define Tcl_DeleteCommandFromToken \ + (tclStubsPtr->tcl_DeleteCommandFromToken) /* 104 */ +#endif +#ifndef Tcl_DeleteEvents +#define Tcl_DeleteEvents \ + (tclStubsPtr->tcl_DeleteEvents) /* 105 */ +#endif +#ifndef Tcl_DeleteEventSource +#define Tcl_DeleteEventSource \ + (tclStubsPtr->tcl_DeleteEventSource) /* 106 */ +#endif +#ifndef Tcl_DeleteExitHandler +#define Tcl_DeleteExitHandler \ + (tclStubsPtr->tcl_DeleteExitHandler) /* 107 */ +#endif +#ifndef Tcl_DeleteHashEntry +#define Tcl_DeleteHashEntry \ + (tclStubsPtr->tcl_DeleteHashEntry) /* 108 */ +#endif +#ifndef Tcl_DeleteHashTable +#define Tcl_DeleteHashTable \ + (tclStubsPtr->tcl_DeleteHashTable) /* 109 */ +#endif +#ifndef Tcl_DeleteInterp +#define Tcl_DeleteInterp \ + (tclStubsPtr->tcl_DeleteInterp) /* 110 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_DetachPids +#define Tcl_DetachPids \ + (tclStubsPtr->tcl_DetachPids) /* 111 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_DeleteTimerHandler +#define Tcl_DeleteTimerHandler \ + (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ +#endif +#ifndef Tcl_DeleteTrace +#define Tcl_DeleteTrace \ + (tclStubsPtr->tcl_DeleteTrace) /* 113 */ +#endif +#ifndef Tcl_DontCallWhenDeleted +#define Tcl_DontCallWhenDeleted \ + (tclStubsPtr->tcl_DontCallWhenDeleted) /* 114 */ +#endif +#ifndef Tcl_DoOneEvent +#define Tcl_DoOneEvent \ + (tclStubsPtr->tcl_DoOneEvent) /* 115 */ +#endif +#ifndef Tcl_DoWhenIdle +#define Tcl_DoWhenIdle \ + (tclStubsPtr->tcl_DoWhenIdle) /* 116 */ +#endif +#ifndef Tcl_DStringAppend +#define Tcl_DStringAppend \ + (tclStubsPtr->tcl_DStringAppend) /* 117 */ +#endif +#ifndef Tcl_DStringAppendElement +#define Tcl_DStringAppendElement \ + (tclStubsPtr->tcl_DStringAppendElement) /* 118 */ +#endif +#ifndef Tcl_DStringEndSublist +#define Tcl_DStringEndSublist \ + (tclStubsPtr->tcl_DStringEndSublist) /* 119 */ +#endif +#ifndef Tcl_DStringFree +#define Tcl_DStringFree \ + (tclStubsPtr->tcl_DStringFree) /* 120 */ +#endif +#ifndef Tcl_DStringGetResult +#define Tcl_DStringGetResult \ + (tclStubsPtr->tcl_DStringGetResult) /* 121 */ +#endif +#ifndef Tcl_DStringInit +#define Tcl_DStringInit \ + (tclStubsPtr->tcl_DStringInit) /* 122 */ +#endif +#ifndef Tcl_DStringResult +#define Tcl_DStringResult \ + (tclStubsPtr->tcl_DStringResult) /* 123 */ +#endif +#ifndef Tcl_DStringSetLength +#define Tcl_DStringSetLength \ + (tclStubsPtr->tcl_DStringSetLength) /* 124 */ +#endif +#ifndef Tcl_DStringStartSublist +#define Tcl_DStringStartSublist \ + (tclStubsPtr->tcl_DStringStartSublist) /* 125 */ +#endif +#ifndef Tcl_Eof +#define Tcl_Eof \ + (tclStubsPtr->tcl_Eof) /* 126 */ +#endif +#ifndef Tcl_ErrnoId +#define Tcl_ErrnoId \ + (tclStubsPtr->tcl_ErrnoId) /* 127 */ +#endif +#ifndef Tcl_ErrnoMsg +#define Tcl_ErrnoMsg \ + (tclStubsPtr->tcl_ErrnoMsg) /* 128 */ +#endif +#ifndef Tcl_Eval +#define Tcl_Eval \ + (tclStubsPtr->tcl_Eval) /* 129 */ +#endif +#ifndef Tcl_EvalFile +#define Tcl_EvalFile \ + (tclStubsPtr->tcl_EvalFile) /* 130 */ +#endif +#ifndef Tcl_EvalObj +#define Tcl_EvalObj \ + (tclStubsPtr->tcl_EvalObj) /* 131 */ +#endif +#ifndef Tcl_EventuallyFree +#define Tcl_EventuallyFree \ + (tclStubsPtr->tcl_EventuallyFree) /* 132 */ +#endif +#ifndef Tcl_Exit +#define Tcl_Exit \ + (tclStubsPtr->tcl_Exit) /* 133 */ +#endif +#ifndef Tcl_ExposeCommand +#define Tcl_ExposeCommand \ + (tclStubsPtr->tcl_ExposeCommand) /* 134 */ +#endif +#ifndef Tcl_ExprBoolean +#define Tcl_ExprBoolean \ + (tclStubsPtr->tcl_ExprBoolean) /* 135 */ +#endif +#ifndef Tcl_ExprBooleanObj +#define Tcl_ExprBooleanObj \ + (tclStubsPtr->tcl_ExprBooleanObj) /* 136 */ +#endif +#ifndef Tcl_ExprDouble +#define Tcl_ExprDouble \ + (tclStubsPtr->tcl_ExprDouble) /* 137 */ +#endif +#ifndef Tcl_ExprDoubleObj +#define Tcl_ExprDoubleObj \ + (tclStubsPtr->tcl_ExprDoubleObj) /* 138 */ +#endif +#ifndef Tcl_ExprLong +#define Tcl_ExprLong \ + (tclStubsPtr->tcl_ExprLong) /* 139 */ +#endif +#ifndef Tcl_ExprLongObj +#define Tcl_ExprLongObj \ + (tclStubsPtr->tcl_ExprLongObj) /* 140 */ +#endif +#ifndef Tcl_ExprObj +#define Tcl_ExprObj \ + (tclStubsPtr->tcl_ExprObj) /* 141 */ +#endif +#ifndef Tcl_ExprString +#define Tcl_ExprString \ + (tclStubsPtr->tcl_ExprString) /* 142 */ +#endif +#ifndef Tcl_Finalize +#define Tcl_Finalize \ + (tclStubsPtr->tcl_Finalize) /* 143 */ +#endif +#ifndef Tcl_FindExecutable +#define Tcl_FindExecutable \ + (tclStubsPtr->tcl_FindExecutable) /* 144 */ +#endif +#ifndef Tcl_FirstHashEntry +#define Tcl_FirstHashEntry \ + (tclStubsPtr->tcl_FirstHashEntry) /* 145 */ +#endif +#ifndef Tcl_Flush +#define Tcl_Flush \ + (tclStubsPtr->tcl_Flush) /* 146 */ +#endif +#ifndef Tcl_FreeResult +#define Tcl_FreeResult \ + (tclStubsPtr->tcl_FreeResult) /* 147 */ +#endif +#ifndef Tcl_GetAlias +#define Tcl_GetAlias \ + (tclStubsPtr->tcl_GetAlias) /* 148 */ +#endif +#ifndef Tcl_GetAliasObj +#define Tcl_GetAliasObj \ + (tclStubsPtr->tcl_GetAliasObj) /* 149 */ +#endif +#ifndef Tcl_GetAssocData +#define Tcl_GetAssocData \ + (tclStubsPtr->tcl_GetAssocData) /* 150 */ +#endif +#ifndef Tcl_GetChannel +#define Tcl_GetChannel \ + (tclStubsPtr->tcl_GetChannel) /* 151 */ +#endif +#ifndef Tcl_GetChannelBufferSize +#define Tcl_GetChannelBufferSize \ + (tclStubsPtr->tcl_GetChannelBufferSize) /* 152 */ +#endif +#ifndef Tcl_GetChannelHandle +#define Tcl_GetChannelHandle \ + (tclStubsPtr->tcl_GetChannelHandle) /* 153 */ +#endif +#ifndef Tcl_GetChannelInstanceData +#define Tcl_GetChannelInstanceData \ + (tclStubsPtr->tcl_GetChannelInstanceData) /* 154 */ +#endif +#ifndef Tcl_GetChannelMode +#define Tcl_GetChannelMode \ + (tclStubsPtr->tcl_GetChannelMode) /* 155 */ +#endif +#ifndef Tcl_GetChannelName +#define Tcl_GetChannelName \ + (tclStubsPtr->tcl_GetChannelName) /* 156 */ +#endif +#ifndef Tcl_GetChannelOption +#define Tcl_GetChannelOption \ + (tclStubsPtr->tcl_GetChannelOption) /* 157 */ +#endif +#ifndef Tcl_GetChannelType +#define Tcl_GetChannelType \ + (tclStubsPtr->tcl_GetChannelType) /* 158 */ +#endif +#ifndef Tcl_GetCommandInfo +#define Tcl_GetCommandInfo \ + (tclStubsPtr->tcl_GetCommandInfo) /* 159 */ +#endif +#ifndef Tcl_GetCommandName +#define Tcl_GetCommandName \ + (tclStubsPtr->tcl_GetCommandName) /* 160 */ +#endif +#ifndef Tcl_GetErrno +#define Tcl_GetErrno \ + (tclStubsPtr->tcl_GetErrno) /* 161 */ +#endif +#ifndef Tcl_GetHostName +#define Tcl_GetHostName \ + (tclStubsPtr->tcl_GetHostName) /* 162 */ +#endif +#ifndef Tcl_GetInterpPath +#define Tcl_GetInterpPath \ + (tclStubsPtr->tcl_GetInterpPath) /* 163 */ +#endif +#ifndef Tcl_GetMaster +#define Tcl_GetMaster \ + (tclStubsPtr->tcl_GetMaster) /* 164 */ +#endif +#ifndef Tcl_GetNameOfExecutable +#define Tcl_GetNameOfExecutable \ + (tclStubsPtr->tcl_GetNameOfExecutable) /* 165 */ +#endif +#ifndef Tcl_GetObjResult +#define Tcl_GetObjResult \ + (tclStubsPtr->tcl_GetObjResult) /* 166 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* UNIX */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_GetOpenFile +#define Tcl_GetOpenFile \ + (tclStubsPtr->tcl_GetOpenFile) /* 167 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_GetPathType +#define Tcl_GetPathType \ + (tclStubsPtr->tcl_GetPathType) /* 168 */ +#endif +#ifndef Tcl_Gets +#define Tcl_Gets \ + (tclStubsPtr->tcl_Gets) /* 169 */ +#endif +#ifndef Tcl_GetsObj +#define Tcl_GetsObj \ + (tclStubsPtr->tcl_GetsObj) /* 170 */ +#endif +#ifndef Tcl_GetServiceMode +#define Tcl_GetServiceMode \ + (tclStubsPtr->tcl_GetServiceMode) /* 171 */ +#endif +#ifndef Tcl_GetSlave +#define Tcl_GetSlave \ + (tclStubsPtr->tcl_GetSlave) /* 172 */ +#endif +#ifndef Tcl_GetStdChannel +#define Tcl_GetStdChannel \ + (tclStubsPtr->tcl_GetStdChannel) /* 173 */ +#endif +#ifndef Tcl_GetStringResult +#define Tcl_GetStringResult \ + (tclStubsPtr->tcl_GetStringResult) /* 174 */ +#endif +#ifndef Tcl_GetVar +#define Tcl_GetVar \ + (tclStubsPtr->tcl_GetVar) /* 175 */ +#endif +#ifndef Tcl_GetVar2 +#define Tcl_GetVar2 \ + (tclStubsPtr->tcl_GetVar2) /* 176 */ +#endif +#ifndef Tcl_GlobalEval +#define Tcl_GlobalEval \ + (tclStubsPtr->tcl_GlobalEval) /* 177 */ +#endif +#ifndef Tcl_GlobalEvalObj +#define Tcl_GlobalEvalObj \ + (tclStubsPtr->tcl_GlobalEvalObj) /* 178 */ +#endif +#ifndef Tcl_HideCommand +#define Tcl_HideCommand \ + (tclStubsPtr->tcl_HideCommand) /* 179 */ +#endif +#ifndef Tcl_Init +#define Tcl_Init \ + (tclStubsPtr->tcl_Init) /* 180 */ +#endif +#ifndef Tcl_InitHashTable +#define Tcl_InitHashTable \ + (tclStubsPtr->tcl_InitHashTable) /* 181 */ +#endif +#ifndef Tcl_InputBlocked +#define Tcl_InputBlocked \ + (tclStubsPtr->tcl_InputBlocked) /* 182 */ +#endif +#ifndef Tcl_InputBuffered +#define Tcl_InputBuffered \ + (tclStubsPtr->tcl_InputBuffered) /* 183 */ +#endif +#ifndef Tcl_InterpDeleted +#define Tcl_InterpDeleted \ + (tclStubsPtr->tcl_InterpDeleted) /* 184 */ +#endif +#ifndef Tcl_IsSafe +#define Tcl_IsSafe \ + (tclStubsPtr->tcl_IsSafe) /* 185 */ +#endif +#ifndef Tcl_JoinPath +#define Tcl_JoinPath \ + (tclStubsPtr->tcl_JoinPath) /* 186 */ +#endif +#ifndef Tcl_LinkVar +#define Tcl_LinkVar \ + (tclStubsPtr->tcl_LinkVar) /* 187 */ +#endif +/* Slot 188 is reserved */ +#ifndef Tcl_MakeFileChannel +#define Tcl_MakeFileChannel \ + (tclStubsPtr->tcl_MakeFileChannel) /* 189 */ +#endif +#ifndef Tcl_MakeSafe +#define Tcl_MakeSafe \ + (tclStubsPtr->tcl_MakeSafe) /* 190 */ +#endif +#ifndef Tcl_MakeTcpClientChannel +#define Tcl_MakeTcpClientChannel \ + (tclStubsPtr->tcl_MakeTcpClientChannel) /* 191 */ +#endif +#ifndef Tcl_Merge +#define Tcl_Merge \ + (tclStubsPtr->tcl_Merge) /* 192 */ +#endif +#ifndef Tcl_NextHashEntry +#define Tcl_NextHashEntry \ + (tclStubsPtr->tcl_NextHashEntry) /* 193 */ +#endif +#ifndef Tcl_NotifyChannel +#define Tcl_NotifyChannel \ + (tclStubsPtr->tcl_NotifyChannel) /* 194 */ +#endif +#ifndef Tcl_ObjGetVar2 +#define Tcl_ObjGetVar2 \ + (tclStubsPtr->tcl_ObjGetVar2) /* 195 */ +#endif +#ifndef Tcl_ObjSetVar2 +#define Tcl_ObjSetVar2 \ + (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_OpenCommandChannel +#define Tcl_OpenCommandChannel \ + (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_OpenFileChannel +#define Tcl_OpenFileChannel \ + (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ +#endif +#ifndef Tcl_OpenTcpClient +#define Tcl_OpenTcpClient \ + (tclStubsPtr->tcl_OpenTcpClient) /* 199 */ +#endif +#ifndef Tcl_OpenTcpServer +#define Tcl_OpenTcpServer \ + (tclStubsPtr->tcl_OpenTcpServer) /* 200 */ +#endif +#ifndef Tcl_Preserve +#define Tcl_Preserve \ + (tclStubsPtr->tcl_Preserve) /* 201 */ +#endif +#ifndef Tcl_PrintDouble +#define Tcl_PrintDouble \ + (tclStubsPtr->tcl_PrintDouble) /* 202 */ +#endif +#ifndef Tcl_PutEnv +#define Tcl_PutEnv \ + (tclStubsPtr->tcl_PutEnv) /* 203 */ +#endif +#ifndef Tcl_PosixError +#define Tcl_PosixError \ + (tclStubsPtr->tcl_PosixError) /* 204 */ +#endif +#ifndef Tcl_QueueEvent +#define Tcl_QueueEvent \ + (tclStubsPtr->tcl_QueueEvent) /* 205 */ +#endif +#ifndef Tcl_Read +#define Tcl_Read \ + (tclStubsPtr->tcl_Read) /* 206 */ +#endif +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ +#ifndef Tcl_ReapDetachedProcs +#define Tcl_ReapDetachedProcs \ + (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ +#endif +#endif /* MACOSX */ +#ifndef Tcl_RecordAndEval +#define Tcl_RecordAndEval \ + (tclStubsPtr->tcl_RecordAndEval) /* 208 */ +#endif +#ifndef Tcl_RecordAndEvalObj +#define Tcl_RecordAndEvalObj \ + (tclStubsPtr->tcl_RecordAndEvalObj) /* 209 */ +#endif +#ifndef Tcl_RegisterChannel +#define Tcl_RegisterChannel \ + (tclStubsPtr->tcl_RegisterChannel) /* 210 */ +#endif +#ifndef Tcl_RegisterObjType +#define Tcl_RegisterObjType \ + (tclStubsPtr->tcl_RegisterObjType) /* 211 */ +#endif +#ifndef Tcl_RegExpCompile +#define Tcl_RegExpCompile \ + (tclStubsPtr->tcl_RegExpCompile) /* 212 */ +#endif +#ifndef Tcl_RegExpExec +#define Tcl_RegExpExec \ + (tclStubsPtr->tcl_RegExpExec) /* 213 */ +#endif +#ifndef Tcl_RegExpMatch +#define Tcl_RegExpMatch \ + (tclStubsPtr->tcl_RegExpMatch) /* 214 */ +#endif +#ifndef Tcl_RegExpRange +#define Tcl_RegExpRange \ + (tclStubsPtr->tcl_RegExpRange) /* 215 */ +#endif +#ifndef Tcl_Release +#define Tcl_Release \ + (tclStubsPtr->tcl_Release) /* 216 */ +#endif +#ifndef Tcl_ResetResult +#define Tcl_ResetResult \ + (tclStubsPtr->tcl_ResetResult) /* 217 */ +#endif +#ifndef Tcl_ScanElement +#define Tcl_ScanElement \ + (tclStubsPtr->tcl_ScanElement) /* 218 */ +#endif +#ifndef Tcl_ScanCountedElement +#define Tcl_ScanCountedElement \ + (tclStubsPtr->tcl_ScanCountedElement) /* 219 */ +#endif +#ifndef Tcl_SeekOld +#define Tcl_SeekOld \ + (tclStubsPtr->tcl_SeekOld) /* 220 */ +#endif +#ifndef Tcl_ServiceAll +#define Tcl_ServiceAll \ + (tclStubsPtr->tcl_ServiceAll) /* 221 */ +#endif +#ifndef Tcl_ServiceEvent +#define Tcl_ServiceEvent \ + (tclStubsPtr->tcl_ServiceEvent) /* 222 */ +#endif +#ifndef Tcl_SetAssocData +#define Tcl_SetAssocData \ + (tclStubsPtr->tcl_SetAssocData) /* 223 */ +#endif +#ifndef Tcl_SetChannelBufferSize +#define Tcl_SetChannelBufferSize \ + (tclStubsPtr->tcl_SetChannelBufferSize) /* 224 */ +#endif +#ifndef Tcl_SetChannelOption +#define Tcl_SetChannelOption \ + (tclStubsPtr->tcl_SetChannelOption) /* 225 */ +#endif +#ifndef Tcl_SetCommandInfo +#define Tcl_SetCommandInfo \ + (tclStubsPtr->tcl_SetCommandInfo) /* 226 */ +#endif +#ifndef Tcl_SetErrno +#define Tcl_SetErrno \ + (tclStubsPtr->tcl_SetErrno) /* 227 */ +#endif +#ifndef Tcl_SetErrorCode +#define Tcl_SetErrorCode \ + (tclStubsPtr->tcl_SetErrorCode) /* 228 */ +#endif +#ifndef Tcl_SetMaxBlockTime +#define Tcl_SetMaxBlockTime \ + (tclStubsPtr->tcl_SetMaxBlockTime) /* 229 */ +#endif +#ifndef Tcl_SetPanicProc +#define Tcl_SetPanicProc \ + (tclStubsPtr->tcl_SetPanicProc) /* 230 */ +#endif +#ifndef Tcl_SetRecursionLimit +#define Tcl_SetRecursionLimit \ + (tclStubsPtr->tcl_SetRecursionLimit) /* 231 */ +#endif +#ifndef Tcl_SetResult +#define Tcl_SetResult \ + (tclStubsPtr->tcl_SetResult) /* 232 */ +#endif +#ifndef Tcl_SetServiceMode +#define Tcl_SetServiceMode \ + (tclStubsPtr->tcl_SetServiceMode) /* 233 */ +#endif +#ifndef Tcl_SetObjErrorCode +#define Tcl_SetObjErrorCode \ + (tclStubsPtr->tcl_SetObjErrorCode) /* 234 */ +#endif +#ifndef Tcl_SetObjResult +#define Tcl_SetObjResult \ + (tclStubsPtr->tcl_SetObjResult) /* 235 */ +#endif +#ifndef Tcl_SetStdChannel +#define Tcl_SetStdChannel \ + (tclStubsPtr->tcl_SetStdChannel) /* 236 */ +#endif +#ifndef Tcl_SetVar +#define Tcl_SetVar \ + (tclStubsPtr->tcl_SetVar) /* 237 */ +#endif +#ifndef Tcl_SetVar2 +#define Tcl_SetVar2 \ + (tclStubsPtr->tcl_SetVar2) /* 238 */ +#endif +#ifndef Tcl_SignalId +#define Tcl_SignalId \ + (tclStubsPtr->tcl_SignalId) /* 239 */ +#endif +#ifndef Tcl_SignalMsg +#define Tcl_SignalMsg \ + (tclStubsPtr->tcl_SignalMsg) /* 240 */ +#endif +#ifndef Tcl_SourceRCFile +#define Tcl_SourceRCFile \ + (tclStubsPtr->tcl_SourceRCFile) /* 241 */ +#endif +#ifndef Tcl_SplitList +#define Tcl_SplitList \ + (tclStubsPtr->tcl_SplitList) /* 242 */ +#endif +#ifndef Tcl_SplitPath +#define Tcl_SplitPath \ + (tclStubsPtr->tcl_SplitPath) /* 243 */ +#endif +#ifndef Tcl_StaticPackage +#define Tcl_StaticPackage \ + (tclStubsPtr->tcl_StaticPackage) /* 244 */ +#endif +#ifndef Tcl_StringMatch +#define Tcl_StringMatch \ + (tclStubsPtr->tcl_StringMatch) /* 245 */ +#endif +#ifndef Tcl_TellOld +#define Tcl_TellOld \ + (tclStubsPtr->tcl_TellOld) /* 246 */ +#endif +#ifndef Tcl_TraceVar +#define Tcl_TraceVar \ + (tclStubsPtr->tcl_TraceVar) /* 247 */ +#endif +#ifndef Tcl_TraceVar2 +#define Tcl_TraceVar2 \ + (tclStubsPtr->tcl_TraceVar2) /* 248 */ +#endif +#ifndef Tcl_TranslateFileName +#define Tcl_TranslateFileName \ + (tclStubsPtr->tcl_TranslateFileName) /* 249 */ +#endif +#ifndef Tcl_Ungets +#define Tcl_Ungets \ + (tclStubsPtr->tcl_Ungets) /* 250 */ +#endif +#ifndef Tcl_UnlinkVar +#define Tcl_UnlinkVar \ + (tclStubsPtr->tcl_UnlinkVar) /* 251 */ +#endif +#ifndef Tcl_UnregisterChannel +#define Tcl_UnregisterChannel \ + (tclStubsPtr->tcl_UnregisterChannel) /* 252 */ +#endif +#ifndef Tcl_UnsetVar +#define Tcl_UnsetVar \ + (tclStubsPtr->tcl_UnsetVar) /* 253 */ +#endif +#ifndef Tcl_UnsetVar2 +#define Tcl_UnsetVar2 \ + (tclStubsPtr->tcl_UnsetVar2) /* 254 */ +#endif +#ifndef Tcl_UntraceVar +#define Tcl_UntraceVar \ + (tclStubsPtr->tcl_UntraceVar) /* 255 */ +#endif +#ifndef Tcl_UntraceVar2 +#define Tcl_UntraceVar2 \ + (tclStubsPtr->tcl_UntraceVar2) /* 256 */ +#endif +#ifndef Tcl_UpdateLinkedVar +#define Tcl_UpdateLinkedVar \ + (tclStubsPtr->tcl_UpdateLinkedVar) /* 257 */ +#endif +#ifndef Tcl_UpVar +#define Tcl_UpVar \ + (tclStubsPtr->tcl_UpVar) /* 258 */ +#endif +#ifndef Tcl_UpVar2 +#define Tcl_UpVar2 \ + (tclStubsPtr->tcl_UpVar2) /* 259 */ +#endif +#ifndef Tcl_VarEval +#define Tcl_VarEval \ + (tclStubsPtr->tcl_VarEval) /* 260 */ +#endif +#ifndef Tcl_VarTraceInfo +#define Tcl_VarTraceInfo \ + (tclStubsPtr->tcl_VarTraceInfo) /* 261 */ +#endif +#ifndef Tcl_VarTraceInfo2 +#define Tcl_VarTraceInfo2 \ + (tclStubsPtr->tcl_VarTraceInfo2) /* 262 */ +#endif +#ifndef Tcl_Write +#define Tcl_Write \ + (tclStubsPtr->tcl_Write) /* 263 */ +#endif +#ifndef Tcl_WrongNumArgs +#define Tcl_WrongNumArgs \ + (tclStubsPtr->tcl_WrongNumArgs) /* 264 */ +#endif +#ifndef Tcl_DumpActiveMemory +#define Tcl_DumpActiveMemory \ + (tclStubsPtr->tcl_DumpActiveMemory) /* 265 */ +#endif +#ifndef Tcl_ValidateAllMemory +#define Tcl_ValidateAllMemory \ + (tclStubsPtr->tcl_ValidateAllMemory) /* 266 */ +#endif +#ifndef Tcl_AppendResultVA +#define Tcl_AppendResultVA \ + (tclStubsPtr->tcl_AppendResultVA) /* 267 */ +#endif +#ifndef Tcl_AppendStringsToObjVA +#define Tcl_AppendStringsToObjVA \ + (tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */ +#endif +#ifndef Tcl_HashStats +#define Tcl_HashStats \ + (tclStubsPtr->tcl_HashStats) /* 269 */ +#endif +#ifndef Tcl_ParseVar +#define Tcl_ParseVar \ + (tclStubsPtr->tcl_ParseVar) /* 270 */ +#endif +#ifndef Tcl_PkgPresent +#define Tcl_PkgPresent \ + (tclStubsPtr->tcl_PkgPresent) /* 271 */ +#endif +#ifndef Tcl_PkgPresentEx +#define Tcl_PkgPresentEx \ + (tclStubsPtr->tcl_PkgPresentEx) /* 272 */ +#endif +#ifndef Tcl_PkgProvide +#define Tcl_PkgProvide \ + (tclStubsPtr->tcl_PkgProvide) /* 273 */ +#endif +#ifndef Tcl_PkgRequire +#define Tcl_PkgRequire \ + (tclStubsPtr->tcl_PkgRequire) /* 274 */ +#endif +#ifndef Tcl_SetErrorCodeVA +#define Tcl_SetErrorCodeVA \ + (tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */ +#endif +#ifndef Tcl_VarEvalVA +#define Tcl_VarEvalVA \ + (tclStubsPtr->tcl_VarEvalVA) /* 276 */ +#endif +#ifndef Tcl_WaitPid +#define Tcl_WaitPid \ + (tclStubsPtr->tcl_WaitPid) /* 277 */ +#endif +#ifndef Tcl_PanicVA +#define Tcl_PanicVA \ + (tclStubsPtr->tcl_PanicVA) /* 278 */ +#endif +#ifndef Tcl_GetVersion +#define Tcl_GetVersion \ + (tclStubsPtr->tcl_GetVersion) /* 279 */ +#endif +#ifndef Tcl_InitMemory +#define Tcl_InitMemory \ + (tclStubsPtr->tcl_InitMemory) /* 280 */ +#endif +#ifndef Tcl_StackChannel +#define Tcl_StackChannel \ + (tclStubsPtr->tcl_StackChannel) /* 281 */ +#endif +#ifndef Tcl_UnstackChannel +#define Tcl_UnstackChannel \ + (tclStubsPtr->tcl_UnstackChannel) /* 282 */ +#endif +#ifndef Tcl_GetStackedChannel +#define Tcl_GetStackedChannel \ + (tclStubsPtr->tcl_GetStackedChannel) /* 283 */ +#endif +#ifndef Tcl_SetMainLoop +#define Tcl_SetMainLoop \ + (tclStubsPtr->tcl_SetMainLoop) /* 284 */ +#endif +/* Slot 285 is reserved */ +#ifndef Tcl_AppendObjToObj +#define Tcl_AppendObjToObj \ + (tclStubsPtr->tcl_AppendObjToObj) /* 286 */ +#endif +#ifndef Tcl_CreateEncoding +#define Tcl_CreateEncoding \ + (tclStubsPtr->tcl_CreateEncoding) /* 287 */ +#endif +#ifndef Tcl_CreateThreadExitHandler +#define Tcl_CreateThreadExitHandler \ + (tclStubsPtr->tcl_CreateThreadExitHandler) /* 288 */ +#endif +#ifndef Tcl_DeleteThreadExitHandler +#define Tcl_DeleteThreadExitHandler \ + (tclStubsPtr->tcl_DeleteThreadExitHandler) /* 289 */ +#endif +#ifndef Tcl_DiscardResult +#define Tcl_DiscardResult \ + (tclStubsPtr->tcl_DiscardResult) /* 290 */ +#endif +#ifndef Tcl_EvalEx +#define Tcl_EvalEx \ + (tclStubsPtr->tcl_EvalEx) /* 291 */ +#endif +#ifndef Tcl_EvalObjv +#define Tcl_EvalObjv \ + (tclStubsPtr->tcl_EvalObjv) /* 292 */ +#endif +#ifndef Tcl_EvalObjEx +#define Tcl_EvalObjEx \ + (tclStubsPtr->tcl_EvalObjEx) /* 293 */ +#endif +#ifndef Tcl_ExitThread +#define Tcl_ExitThread \ + (tclStubsPtr->tcl_ExitThread) /* 294 */ +#endif +#ifndef Tcl_ExternalToUtf +#define Tcl_ExternalToUtf \ + (tclStubsPtr->tcl_ExternalToUtf) /* 295 */ +#endif +#ifndef Tcl_ExternalToUtfDString +#define Tcl_ExternalToUtfDString \ + (tclStubsPtr->tcl_ExternalToUtfDString) /* 296 */ +#endif +#ifndef Tcl_FinalizeThread +#define Tcl_FinalizeThread \ + (tclStubsPtr->tcl_FinalizeThread) /* 297 */ +#endif +#ifndef Tcl_FinalizeNotifier +#define Tcl_FinalizeNotifier \ + (tclStubsPtr->tcl_FinalizeNotifier) /* 298 */ +#endif +#ifndef Tcl_FreeEncoding +#define Tcl_FreeEncoding \ + (tclStubsPtr->tcl_FreeEncoding) /* 299 */ +#endif +#ifndef Tcl_GetCurrentThread +#define Tcl_GetCurrentThread \ + (tclStubsPtr->tcl_GetCurrentThread) /* 300 */ +#endif +#ifndef Tcl_GetEncoding +#define Tcl_GetEncoding \ + (tclStubsPtr->tcl_GetEncoding) /* 301 */ +#endif +#ifndef Tcl_GetEncodingName +#define Tcl_GetEncodingName \ + (tclStubsPtr->tcl_GetEncodingName) /* 302 */ +#endif +#ifndef Tcl_GetEncodingNames +#define Tcl_GetEncodingNames \ + (tclStubsPtr->tcl_GetEncodingNames) /* 303 */ +#endif +#ifndef Tcl_GetIndexFromObjStruct +#define Tcl_GetIndexFromObjStruct \ + (tclStubsPtr->tcl_GetIndexFromObjStruct) /* 304 */ +#endif +#ifndef Tcl_GetThreadData +#define Tcl_GetThreadData \ + (tclStubsPtr->tcl_GetThreadData) /* 305 */ +#endif +#ifndef Tcl_GetVar2Ex +#define Tcl_GetVar2Ex \ + (tclStubsPtr->tcl_GetVar2Ex) /* 306 */ +#endif +#ifndef Tcl_InitNotifier +#define Tcl_InitNotifier \ + (tclStubsPtr->tcl_InitNotifier) /* 307 */ +#endif +#ifndef Tcl_MutexLock +#define Tcl_MutexLock \ + (tclStubsPtr->tcl_MutexLock) /* 308 */ +#endif +#ifndef Tcl_MutexUnlock +#define Tcl_MutexUnlock \ + (tclStubsPtr->tcl_MutexUnlock) /* 309 */ +#endif +#ifndef Tcl_ConditionNotify +#define Tcl_ConditionNotify \ + (tclStubsPtr->tcl_ConditionNotify) /* 310 */ +#endif +#ifndef Tcl_ConditionWait +#define Tcl_ConditionWait \ + (tclStubsPtr->tcl_ConditionWait) /* 311 */ +#endif +#ifndef Tcl_NumUtfChars +#define Tcl_NumUtfChars \ + (tclStubsPtr->tcl_NumUtfChars) /* 312 */ +#endif +#ifndef Tcl_ReadChars +#define Tcl_ReadChars \ + (tclStubsPtr->tcl_ReadChars) /* 313 */ +#endif +#ifndef Tcl_RestoreResult +#define Tcl_RestoreResult \ + (tclStubsPtr->tcl_RestoreResult) /* 314 */ +#endif +#ifndef Tcl_SaveResult +#define Tcl_SaveResult \ + (tclStubsPtr->tcl_SaveResult) /* 315 */ +#endif +#ifndef Tcl_SetSystemEncoding +#define Tcl_SetSystemEncoding \ + (tclStubsPtr->tcl_SetSystemEncoding) /* 316 */ +#endif +#ifndef Tcl_SetVar2Ex +#define Tcl_SetVar2Ex \ + (tclStubsPtr->tcl_SetVar2Ex) /* 317 */ +#endif +#ifndef Tcl_ThreadAlert +#define Tcl_ThreadAlert \ + (tclStubsPtr->tcl_ThreadAlert) /* 318 */ +#endif +#ifndef Tcl_ThreadQueueEvent +#define Tcl_ThreadQueueEvent \ + (tclStubsPtr->tcl_ThreadQueueEvent) /* 319 */ +#endif +#ifndef Tcl_UniCharAtIndex +#define Tcl_UniCharAtIndex \ + (tclStubsPtr->tcl_UniCharAtIndex) /* 320 */ +#endif +#ifndef Tcl_UniCharToLower +#define Tcl_UniCharToLower \ + (tclStubsPtr->tcl_UniCharToLower) /* 321 */ +#endif +#ifndef Tcl_UniCharToTitle +#define Tcl_UniCharToTitle \ + (tclStubsPtr->tcl_UniCharToTitle) /* 322 */ +#endif +#ifndef Tcl_UniCharToUpper +#define Tcl_UniCharToUpper \ + (tclStubsPtr->tcl_UniCharToUpper) /* 323 */ +#endif +#ifndef Tcl_UniCharToUtf +#define Tcl_UniCharToUtf \ + (tclStubsPtr->tcl_UniCharToUtf) /* 324 */ +#endif +#ifndef Tcl_UtfAtIndex +#define Tcl_UtfAtIndex \ + (tclStubsPtr->tcl_UtfAtIndex) /* 325 */ +#endif +#ifndef Tcl_UtfCharComplete +#define Tcl_UtfCharComplete \ + (tclStubsPtr->tcl_UtfCharComplete) /* 326 */ +#endif +#ifndef Tcl_UtfBackslash +#define Tcl_UtfBackslash \ + (tclStubsPtr->tcl_UtfBackslash) /* 327 */ +#endif +#ifndef Tcl_UtfFindFirst +#define Tcl_UtfFindFirst \ + (tclStubsPtr->tcl_UtfFindFirst) /* 328 */ +#endif +#ifndef Tcl_UtfFindLast +#define Tcl_UtfFindLast \ + (tclStubsPtr->tcl_UtfFindLast) /* 329 */ +#endif +#ifndef Tcl_UtfNext +#define Tcl_UtfNext \ + (tclStubsPtr->tcl_UtfNext) /* 330 */ +#endif +#ifndef Tcl_UtfPrev +#define Tcl_UtfPrev \ + (tclStubsPtr->tcl_UtfPrev) /* 331 */ +#endif +#ifndef Tcl_UtfToExternal +#define Tcl_UtfToExternal \ + (tclStubsPtr->tcl_UtfToExternal) /* 332 */ +#endif +#ifndef Tcl_UtfToExternalDString +#define Tcl_UtfToExternalDString \ + (tclStubsPtr->tcl_UtfToExternalDString) /* 333 */ +#endif +#ifndef Tcl_UtfToLower +#define Tcl_UtfToLower \ + (tclStubsPtr->tcl_UtfToLower) /* 334 */ +#endif +#ifndef Tcl_UtfToTitle +#define Tcl_UtfToTitle \ + (tclStubsPtr->tcl_UtfToTitle) /* 335 */ +#endif +#ifndef Tcl_UtfToUniChar +#define Tcl_UtfToUniChar \ + (tclStubsPtr->tcl_UtfToUniChar) /* 336 */ +#endif +#ifndef Tcl_UtfToUpper +#define Tcl_UtfToUpper \ + (tclStubsPtr->tcl_UtfToUpper) /* 337 */ +#endif +#ifndef Tcl_WriteChars +#define Tcl_WriteChars \ + (tclStubsPtr->tcl_WriteChars) /* 338 */ +#endif +#ifndef Tcl_WriteObj +#define Tcl_WriteObj \ + (tclStubsPtr->tcl_WriteObj) /* 339 */ +#endif +#ifndef Tcl_GetString +#define Tcl_GetString \ + (tclStubsPtr->tcl_GetString) /* 340 */ +#endif +#ifndef Tcl_GetDefaultEncodingDir +#define Tcl_GetDefaultEncodingDir \ + (tclStubsPtr->tcl_GetDefaultEncodingDir) /* 341 */ +#endif +#ifndef Tcl_SetDefaultEncodingDir +#define Tcl_SetDefaultEncodingDir \ + (tclStubsPtr->tcl_SetDefaultEncodingDir) /* 342 */ +#endif +#ifndef Tcl_AlertNotifier +#define Tcl_AlertNotifier \ + (tclStubsPtr->tcl_AlertNotifier) /* 343 */ +#endif +#ifndef Tcl_ServiceModeHook +#define Tcl_ServiceModeHook \ + (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ +#endif +#ifndef Tcl_UniCharIsAlnum +#define Tcl_UniCharIsAlnum \ + (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ +#endif +#ifndef Tcl_UniCharIsAlpha +#define Tcl_UniCharIsAlpha \ + (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ +#endif +#ifndef Tcl_UniCharIsDigit +#define Tcl_UniCharIsDigit \ + (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ +#endif +#ifndef Tcl_UniCharIsLower +#define Tcl_UniCharIsLower \ + (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ +#endif +#ifndef Tcl_UniCharIsSpace +#define Tcl_UniCharIsSpace \ + (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ +#endif +#ifndef Tcl_UniCharIsUpper +#define Tcl_UniCharIsUpper \ + (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ +#endif +#ifndef Tcl_UniCharIsWordChar +#define Tcl_UniCharIsWordChar \ + (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ +#endif +#ifndef Tcl_UniCharLen +#define Tcl_UniCharLen \ + (tclStubsPtr->tcl_UniCharLen) /* 352 */ +#endif +#ifndef Tcl_UniCharNcmp +#define Tcl_UniCharNcmp \ + (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ +#endif +#ifndef Tcl_UniCharToUtfDString +#define Tcl_UniCharToUtfDString \ + (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ +#endif +#ifndef Tcl_UtfToUniCharDString +#define Tcl_UtfToUniCharDString \ + (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ +#endif +#ifndef Tcl_GetRegExpFromObj +#define Tcl_GetRegExpFromObj \ + (tclStubsPtr->tcl_GetRegExpFromObj) /* 356 */ +#endif +#ifndef Tcl_EvalTokens +#define Tcl_EvalTokens \ + (tclStubsPtr->tcl_EvalTokens) /* 357 */ +#endif +#ifndef Tcl_FreeParse +#define Tcl_FreeParse \ + (tclStubsPtr->tcl_FreeParse) /* 358 */ +#endif +#ifndef Tcl_LogCommandInfo +#define Tcl_LogCommandInfo \ + (tclStubsPtr->tcl_LogCommandInfo) /* 359 */ +#endif +#ifndef Tcl_ParseBraces +#define Tcl_ParseBraces \ + (tclStubsPtr->tcl_ParseBraces) /* 360 */ +#endif +#ifndef Tcl_ParseCommand +#define Tcl_ParseCommand \ + (tclStubsPtr->tcl_ParseCommand) /* 361 */ +#endif +#ifndef Tcl_ParseExpr +#define Tcl_ParseExpr \ + (tclStubsPtr->tcl_ParseExpr) /* 362 */ +#endif +#ifndef Tcl_ParseQuotedString +#define Tcl_ParseQuotedString \ + (tclStubsPtr->tcl_ParseQuotedString) /* 363 */ +#endif +#ifndef Tcl_ParseVarName +#define Tcl_ParseVarName \ + (tclStubsPtr->tcl_ParseVarName) /* 364 */ +#endif +#ifndef Tcl_GetCwd +#define Tcl_GetCwd \ + (tclStubsPtr->tcl_GetCwd) /* 365 */ +#endif +#ifndef Tcl_Chdir +#define Tcl_Chdir \ + (tclStubsPtr->tcl_Chdir) /* 366 */ +#endif +#ifndef Tcl_Access +#define Tcl_Access \ + (tclStubsPtr->tcl_Access) /* 367 */ +#endif +#ifndef Tcl_Stat +#define Tcl_Stat \ + (tclStubsPtr->tcl_Stat) /* 368 */ +#endif +#ifndef Tcl_UtfNcmp +#define Tcl_UtfNcmp \ + (tclStubsPtr->tcl_UtfNcmp) /* 369 */ +#endif +#ifndef Tcl_UtfNcasecmp +#define Tcl_UtfNcasecmp \ + (tclStubsPtr->tcl_UtfNcasecmp) /* 370 */ +#endif +#ifndef Tcl_StringCaseMatch +#define Tcl_StringCaseMatch \ + (tclStubsPtr->tcl_StringCaseMatch) /* 371 */ +#endif +#ifndef Tcl_UniCharIsControl +#define Tcl_UniCharIsControl \ + (tclStubsPtr->tcl_UniCharIsControl) /* 372 */ +#endif +#ifndef Tcl_UniCharIsGraph +#define Tcl_UniCharIsGraph \ + (tclStubsPtr->tcl_UniCharIsGraph) /* 373 */ +#endif +#ifndef Tcl_UniCharIsPrint +#define Tcl_UniCharIsPrint \ + (tclStubsPtr->tcl_UniCharIsPrint) /* 374 */ +#endif +#ifndef Tcl_UniCharIsPunct +#define Tcl_UniCharIsPunct \ + (tclStubsPtr->tcl_UniCharIsPunct) /* 375 */ +#endif +#ifndef Tcl_RegExpExecObj +#define Tcl_RegExpExecObj \ + (tclStubsPtr->tcl_RegExpExecObj) /* 376 */ +#endif +#ifndef Tcl_RegExpGetInfo +#define Tcl_RegExpGetInfo \ + (tclStubsPtr->tcl_RegExpGetInfo) /* 377 */ +#endif +#ifndef Tcl_NewUnicodeObj +#define Tcl_NewUnicodeObj \ + (tclStubsPtr->tcl_NewUnicodeObj) /* 378 */ +#endif +#ifndef Tcl_SetUnicodeObj +#define Tcl_SetUnicodeObj \ + (tclStubsPtr->tcl_SetUnicodeObj) /* 379 */ +#endif +#ifndef Tcl_GetCharLength +#define Tcl_GetCharLength \ + (tclStubsPtr->tcl_GetCharLength) /* 380 */ +#endif +#ifndef Tcl_GetUniChar +#define Tcl_GetUniChar \ + (tclStubsPtr->tcl_GetUniChar) /* 381 */ +#endif +#ifndef Tcl_GetUnicode +#define Tcl_GetUnicode \ + (tclStubsPtr->tcl_GetUnicode) /* 382 */ +#endif +#ifndef Tcl_GetRange +#define Tcl_GetRange \ + (tclStubsPtr->tcl_GetRange) /* 383 */ +#endif +#ifndef Tcl_AppendUnicodeToObj +#define Tcl_AppendUnicodeToObj \ + (tclStubsPtr->tcl_AppendUnicodeToObj) /* 384 */ +#endif +#ifndef Tcl_RegExpMatchObj +#define Tcl_RegExpMatchObj \ + (tclStubsPtr->tcl_RegExpMatchObj) /* 385 */ +#endif +#ifndef Tcl_SetNotifier +#define Tcl_SetNotifier \ + (tclStubsPtr->tcl_SetNotifier) /* 386 */ +#endif +#ifndef Tcl_GetAllocMutex +#define Tcl_GetAllocMutex \ + (tclStubsPtr->tcl_GetAllocMutex) /* 387 */ +#endif +#ifndef Tcl_GetChannelNames +#define Tcl_GetChannelNames \ + (tclStubsPtr->tcl_GetChannelNames) /* 388 */ +#endif +#ifndef Tcl_GetChannelNamesEx +#define Tcl_GetChannelNamesEx \ + (tclStubsPtr->tcl_GetChannelNamesEx) /* 389 */ +#endif +#ifndef Tcl_ProcObjCmd +#define Tcl_ProcObjCmd \ + (tclStubsPtr->tcl_ProcObjCmd) /* 390 */ +#endif +#ifndef Tcl_ConditionFinalize +#define Tcl_ConditionFinalize \ + (tclStubsPtr->tcl_ConditionFinalize) /* 391 */ +#endif +#ifndef Tcl_MutexFinalize +#define Tcl_MutexFinalize \ + (tclStubsPtr->tcl_MutexFinalize) /* 392 */ +#endif +#ifndef Tcl_CreateThread +#define Tcl_CreateThread \ + (tclStubsPtr->tcl_CreateThread) /* 393 */ +#endif +#ifndef Tcl_ReadRaw +#define Tcl_ReadRaw \ + (tclStubsPtr->tcl_ReadRaw) /* 394 */ +#endif +#ifndef Tcl_WriteRaw +#define Tcl_WriteRaw \ + (tclStubsPtr->tcl_WriteRaw) /* 395 */ +#endif +#ifndef Tcl_GetTopChannel +#define Tcl_GetTopChannel \ + (tclStubsPtr->tcl_GetTopChannel) /* 396 */ +#endif +#ifndef Tcl_ChannelBuffered +#define Tcl_ChannelBuffered \ + (tclStubsPtr->tcl_ChannelBuffered) /* 397 */ +#endif +#ifndef Tcl_ChannelName +#define Tcl_ChannelName \ + (tclStubsPtr->tcl_ChannelName) /* 398 */ +#endif +#ifndef Tcl_ChannelVersion +#define Tcl_ChannelVersion \ + (tclStubsPtr->tcl_ChannelVersion) /* 399 */ +#endif +#ifndef Tcl_ChannelBlockModeProc +#define Tcl_ChannelBlockModeProc \ + (tclStubsPtr->tcl_ChannelBlockModeProc) /* 400 */ +#endif +#ifndef Tcl_ChannelCloseProc +#define Tcl_ChannelCloseProc \ + (tclStubsPtr->tcl_ChannelCloseProc) /* 401 */ +#endif +#ifndef Tcl_ChannelClose2Proc +#define Tcl_ChannelClose2Proc \ + (tclStubsPtr->tcl_ChannelClose2Proc) /* 402 */ +#endif +#ifndef Tcl_ChannelInputProc +#define Tcl_ChannelInputProc \ + (tclStubsPtr->tcl_ChannelInputProc) /* 403 */ +#endif +#ifndef Tcl_ChannelOutputProc +#define Tcl_ChannelOutputProc \ + (tclStubsPtr->tcl_ChannelOutputProc) /* 404 */ +#endif +#ifndef Tcl_ChannelSeekProc +#define Tcl_ChannelSeekProc \ + (tclStubsPtr->tcl_ChannelSeekProc) /* 405 */ +#endif +#ifndef Tcl_ChannelSetOptionProc +#define Tcl_ChannelSetOptionProc \ + (tclStubsPtr->tcl_ChannelSetOptionProc) /* 406 */ +#endif +#ifndef Tcl_ChannelGetOptionProc +#define Tcl_ChannelGetOptionProc \ + (tclStubsPtr->tcl_ChannelGetOptionProc) /* 407 */ +#endif +#ifndef Tcl_ChannelWatchProc +#define Tcl_ChannelWatchProc \ + (tclStubsPtr->tcl_ChannelWatchProc) /* 408 */ +#endif +#ifndef Tcl_ChannelGetHandleProc +#define Tcl_ChannelGetHandleProc \ + (tclStubsPtr->tcl_ChannelGetHandleProc) /* 409 */ +#endif +#ifndef Tcl_ChannelFlushProc +#define Tcl_ChannelFlushProc \ + (tclStubsPtr->tcl_ChannelFlushProc) /* 410 */ +#endif +#ifndef Tcl_ChannelHandlerProc +#define Tcl_ChannelHandlerProc \ + (tclStubsPtr->tcl_ChannelHandlerProc) /* 411 */ +#endif +#ifndef Tcl_JoinThread +#define Tcl_JoinThread \ + (tclStubsPtr->tcl_JoinThread) /* 412 */ +#endif +#ifndef Tcl_IsChannelShared +#define Tcl_IsChannelShared \ + (tclStubsPtr->tcl_IsChannelShared) /* 413 */ +#endif +#ifndef Tcl_IsChannelRegistered +#define Tcl_IsChannelRegistered \ + (tclStubsPtr->tcl_IsChannelRegistered) /* 414 */ +#endif +#ifndef Tcl_CutChannel +#define Tcl_CutChannel \ + (tclStubsPtr->tcl_CutChannel) /* 415 */ +#endif +#ifndef Tcl_SpliceChannel +#define Tcl_SpliceChannel \ + (tclStubsPtr->tcl_SpliceChannel) /* 416 */ +#endif +#ifndef Tcl_ClearChannelHandlers +#define Tcl_ClearChannelHandlers \ + (tclStubsPtr->tcl_ClearChannelHandlers) /* 417 */ +#endif +#ifndef Tcl_IsChannelExisting +#define Tcl_IsChannelExisting \ + (tclStubsPtr->tcl_IsChannelExisting) /* 418 */ +#endif +#ifndef Tcl_UniCharNcasecmp +#define Tcl_UniCharNcasecmp \ + (tclStubsPtr->tcl_UniCharNcasecmp) /* 419 */ +#endif +#ifndef Tcl_UniCharCaseMatch +#define Tcl_UniCharCaseMatch \ + (tclStubsPtr->tcl_UniCharCaseMatch) /* 420 */ +#endif +#ifndef Tcl_FindHashEntry +#define Tcl_FindHashEntry \ + (tclStubsPtr->tcl_FindHashEntry) /* 421 */ +#endif +#ifndef Tcl_CreateHashEntry +#define Tcl_CreateHashEntry \ + (tclStubsPtr->tcl_CreateHashEntry) /* 422 */ +#endif +#ifndef Tcl_InitCustomHashTable +#define Tcl_InitCustomHashTable \ + (tclStubsPtr->tcl_InitCustomHashTable) /* 423 */ +#endif +#ifndef Tcl_InitObjHashTable +#define Tcl_InitObjHashTable \ + (tclStubsPtr->tcl_InitObjHashTable) /* 424 */ +#endif +#ifndef Tcl_CommandTraceInfo +#define Tcl_CommandTraceInfo \ + (tclStubsPtr->tcl_CommandTraceInfo) /* 425 */ +#endif +#ifndef Tcl_TraceCommand +#define Tcl_TraceCommand \ + (tclStubsPtr->tcl_TraceCommand) /* 426 */ +#endif +#ifndef Tcl_UntraceCommand +#define Tcl_UntraceCommand \ + (tclStubsPtr->tcl_UntraceCommand) /* 427 */ +#endif +#ifndef Tcl_AttemptAlloc +#define Tcl_AttemptAlloc \ + (tclStubsPtr->tcl_AttemptAlloc) /* 428 */ +#endif +#ifndef Tcl_AttemptDbCkalloc +#define Tcl_AttemptDbCkalloc \ + (tclStubsPtr->tcl_AttemptDbCkalloc) /* 429 */ +#endif +#ifndef Tcl_AttemptRealloc +#define Tcl_AttemptRealloc \ + (tclStubsPtr->tcl_AttemptRealloc) /* 430 */ +#endif +#ifndef Tcl_AttemptDbCkrealloc +#define Tcl_AttemptDbCkrealloc \ + (tclStubsPtr->tcl_AttemptDbCkrealloc) /* 431 */ +#endif +#ifndef Tcl_AttemptSetObjLength +#define Tcl_AttemptSetObjLength \ + (tclStubsPtr->tcl_AttemptSetObjLength) /* 432 */ +#endif +#ifndef Tcl_GetChannelThread +#define Tcl_GetChannelThread \ + (tclStubsPtr->tcl_GetChannelThread) /* 433 */ +#endif +#ifndef Tcl_GetUnicodeFromObj +#define Tcl_GetUnicodeFromObj \ + (tclStubsPtr->tcl_GetUnicodeFromObj) /* 434 */ +#endif +#ifndef Tcl_GetMathFuncInfo +#define Tcl_GetMathFuncInfo \ + (tclStubsPtr->tcl_GetMathFuncInfo) /* 435 */ +#endif +#ifndef Tcl_ListMathFuncs +#define Tcl_ListMathFuncs \ + (tclStubsPtr->tcl_ListMathFuncs) /* 436 */ +#endif +#ifndef Tcl_SubstObj +#define Tcl_SubstObj \ + (tclStubsPtr->tcl_SubstObj) /* 437 */ +#endif +#ifndef Tcl_DetachChannel +#define Tcl_DetachChannel \ + (tclStubsPtr->tcl_DetachChannel) /* 438 */ +#endif +#ifndef Tcl_IsStandardChannel +#define Tcl_IsStandardChannel \ + (tclStubsPtr->tcl_IsStandardChannel) /* 439 */ +#endif +#ifndef Tcl_FSCopyFile +#define Tcl_FSCopyFile \ + (tclStubsPtr->tcl_FSCopyFile) /* 440 */ +#endif +#ifndef Tcl_FSCopyDirectory +#define Tcl_FSCopyDirectory \ + (tclStubsPtr->tcl_FSCopyDirectory) /* 441 */ +#endif +#ifndef Tcl_FSCreateDirectory +#define Tcl_FSCreateDirectory \ + (tclStubsPtr->tcl_FSCreateDirectory) /* 442 */ +#endif +#ifndef Tcl_FSDeleteFile +#define Tcl_FSDeleteFile \ + (tclStubsPtr->tcl_FSDeleteFile) /* 443 */ +#endif +#ifndef Tcl_FSLoadFile +#define Tcl_FSLoadFile \ + (tclStubsPtr->tcl_FSLoadFile) /* 444 */ +#endif +#ifndef Tcl_FSMatchInDirectory +#define Tcl_FSMatchInDirectory \ + (tclStubsPtr->tcl_FSMatchInDirectory) /* 445 */ +#endif +#ifndef Tcl_FSLink +#define Tcl_FSLink \ + (tclStubsPtr->tcl_FSLink) /* 446 */ +#endif +#ifndef Tcl_FSRemoveDirectory +#define Tcl_FSRemoveDirectory \ + (tclStubsPtr->tcl_FSRemoveDirectory) /* 447 */ +#endif +#ifndef Tcl_FSRenameFile +#define Tcl_FSRenameFile \ + (tclStubsPtr->tcl_FSRenameFile) /* 448 */ +#endif +#ifndef Tcl_FSLstat +#define Tcl_FSLstat \ + (tclStubsPtr->tcl_FSLstat) /* 449 */ +#endif +#ifndef Tcl_FSUtime +#define Tcl_FSUtime \ + (tclStubsPtr->tcl_FSUtime) /* 450 */ +#endif +#ifndef Tcl_FSFileAttrsGet +#define Tcl_FSFileAttrsGet \ + (tclStubsPtr->tcl_FSFileAttrsGet) /* 451 */ +#endif +#ifndef Tcl_FSFileAttrsSet +#define Tcl_FSFileAttrsSet \ + (tclStubsPtr->tcl_FSFileAttrsSet) /* 452 */ +#endif +#ifndef Tcl_FSFileAttrStrings +#define Tcl_FSFileAttrStrings \ + (tclStubsPtr->tcl_FSFileAttrStrings) /* 453 */ +#endif +#ifndef Tcl_FSStat +#define Tcl_FSStat \ + (tclStubsPtr->tcl_FSStat) /* 454 */ +#endif +#ifndef Tcl_FSAccess +#define Tcl_FSAccess \ + (tclStubsPtr->tcl_FSAccess) /* 455 */ +#endif +#ifndef Tcl_FSOpenFileChannel +#define Tcl_FSOpenFileChannel \ + (tclStubsPtr->tcl_FSOpenFileChannel) /* 456 */ +#endif +#ifndef Tcl_FSGetCwd +#define Tcl_FSGetCwd \ + (tclStubsPtr->tcl_FSGetCwd) /* 457 */ +#endif +#ifndef Tcl_FSChdir +#define Tcl_FSChdir \ + (tclStubsPtr->tcl_FSChdir) /* 458 */ +#endif +#ifndef Tcl_FSConvertToPathType +#define Tcl_FSConvertToPathType \ + (tclStubsPtr->tcl_FSConvertToPathType) /* 459 */ +#endif +#ifndef Tcl_FSJoinPath +#define Tcl_FSJoinPath \ + (tclStubsPtr->tcl_FSJoinPath) /* 460 */ +#endif +#ifndef Tcl_FSSplitPath +#define Tcl_FSSplitPath \ + (tclStubsPtr->tcl_FSSplitPath) /* 461 */ +#endif +#ifndef Tcl_FSEqualPaths +#define Tcl_FSEqualPaths \ + (tclStubsPtr->tcl_FSEqualPaths) /* 462 */ +#endif +#ifndef Tcl_FSGetNormalizedPath +#define Tcl_FSGetNormalizedPath \ + (tclStubsPtr->tcl_FSGetNormalizedPath) /* 463 */ +#endif +#ifndef Tcl_FSJoinToPath +#define Tcl_FSJoinToPath \ + (tclStubsPtr->tcl_FSJoinToPath) /* 464 */ +#endif +#ifndef Tcl_FSGetInternalRep +#define Tcl_FSGetInternalRep \ + (tclStubsPtr->tcl_FSGetInternalRep) /* 465 */ +#endif +#ifndef Tcl_FSGetTranslatedPath +#define Tcl_FSGetTranslatedPath \ + (tclStubsPtr->tcl_FSGetTranslatedPath) /* 466 */ +#endif +#ifndef Tcl_FSEvalFile +#define Tcl_FSEvalFile \ + (tclStubsPtr->tcl_FSEvalFile) /* 467 */ +#endif +#ifndef Tcl_FSNewNativePath +#define Tcl_FSNewNativePath \ + (tclStubsPtr->tcl_FSNewNativePath) /* 468 */ +#endif +#ifndef Tcl_FSGetNativePath +#define Tcl_FSGetNativePath \ + (tclStubsPtr->tcl_FSGetNativePath) /* 469 */ +#endif +#ifndef Tcl_FSFileSystemInfo +#define Tcl_FSFileSystemInfo \ + (tclStubsPtr->tcl_FSFileSystemInfo) /* 470 */ +#endif +#ifndef Tcl_FSPathSeparator +#define Tcl_FSPathSeparator \ + (tclStubsPtr->tcl_FSPathSeparator) /* 471 */ +#endif +#ifndef Tcl_FSListVolumes +#define Tcl_FSListVolumes \ + (tclStubsPtr->tcl_FSListVolumes) /* 472 */ +#endif +#ifndef Tcl_FSRegister +#define Tcl_FSRegister \ + (tclStubsPtr->tcl_FSRegister) /* 473 */ +#endif +#ifndef Tcl_FSUnregister +#define Tcl_FSUnregister \ + (tclStubsPtr->tcl_FSUnregister) /* 474 */ +#endif +#ifndef Tcl_FSData +#define Tcl_FSData \ + (tclStubsPtr->tcl_FSData) /* 475 */ +#endif +#ifndef Tcl_FSGetTranslatedStringPath +#define Tcl_FSGetTranslatedStringPath \ + (tclStubsPtr->tcl_FSGetTranslatedStringPath) /* 476 */ +#endif +#ifndef Tcl_FSGetFileSystemForPath +#define Tcl_FSGetFileSystemForPath \ + (tclStubsPtr->tcl_FSGetFileSystemForPath) /* 477 */ +#endif +#ifndef Tcl_FSGetPathType +#define Tcl_FSGetPathType \ + (tclStubsPtr->tcl_FSGetPathType) /* 478 */ +#endif +#ifndef Tcl_OutputBuffered +#define Tcl_OutputBuffered \ + (tclStubsPtr->tcl_OutputBuffered) /* 479 */ +#endif +#ifndef Tcl_FSMountsChanged +#define Tcl_FSMountsChanged \ + (tclStubsPtr->tcl_FSMountsChanged) /* 480 */ +#endif +#ifndef Tcl_EvalTokensStandard +#define Tcl_EvalTokensStandard \ + (tclStubsPtr->tcl_EvalTokensStandard) /* 481 */ +#endif +#ifndef Tcl_GetTime +#define Tcl_GetTime \ + (tclStubsPtr->tcl_GetTime) /* 482 */ +#endif +#ifndef Tcl_CreateObjTrace +#define Tcl_CreateObjTrace \ + (tclStubsPtr->tcl_CreateObjTrace) /* 483 */ +#endif +#ifndef Tcl_GetCommandInfoFromToken +#define Tcl_GetCommandInfoFromToken \ + (tclStubsPtr->tcl_GetCommandInfoFromToken) /* 484 */ +#endif +#ifndef Tcl_SetCommandInfoFromToken +#define Tcl_SetCommandInfoFromToken \ + (tclStubsPtr->tcl_SetCommandInfoFromToken) /* 485 */ +#endif +#ifndef Tcl_DbNewWideIntObj +#define Tcl_DbNewWideIntObj \ + (tclStubsPtr->tcl_DbNewWideIntObj) /* 486 */ +#endif +#ifndef Tcl_GetWideIntFromObj +#define Tcl_GetWideIntFromObj \ + (tclStubsPtr->tcl_GetWideIntFromObj) /* 487 */ +#endif +#ifndef Tcl_NewWideIntObj +#define Tcl_NewWideIntObj \ + (tclStubsPtr->tcl_NewWideIntObj) /* 488 */ +#endif +#ifndef Tcl_SetWideIntObj +#define Tcl_SetWideIntObj \ + (tclStubsPtr->tcl_SetWideIntObj) /* 489 */ +#endif +#ifndef Tcl_AllocStatBuf +#define Tcl_AllocStatBuf \ + (tclStubsPtr->tcl_AllocStatBuf) /* 490 */ +#endif +#ifndef Tcl_Seek +#define Tcl_Seek \ + (tclStubsPtr->tcl_Seek) /* 491 */ +#endif +#ifndef Tcl_Tell +#define Tcl_Tell \ + (tclStubsPtr->tcl_Tell) /* 492 */ +#endif +#ifndef Tcl_ChannelWideSeekProc +#define Tcl_ChannelWideSeekProc \ + (tclStubsPtr->tcl_ChannelWideSeekProc) /* 493 */ +#endif +#ifndef Tcl_DictObjPut +#define Tcl_DictObjPut \ + (tclStubsPtr->tcl_DictObjPut) /* 494 */ +#endif +#ifndef Tcl_DictObjGet +#define Tcl_DictObjGet \ + (tclStubsPtr->tcl_DictObjGet) /* 495 */ +#endif +#ifndef Tcl_DictObjRemove +#define Tcl_DictObjRemove \ + (tclStubsPtr->tcl_DictObjRemove) /* 496 */ +#endif +#ifndef Tcl_DictObjSize +#define Tcl_DictObjSize \ + (tclStubsPtr->tcl_DictObjSize) /* 497 */ +#endif +#ifndef Tcl_DictObjFirst +#define Tcl_DictObjFirst \ + (tclStubsPtr->tcl_DictObjFirst) /* 498 */ +#endif +#ifndef Tcl_DictObjNext +#define Tcl_DictObjNext \ + (tclStubsPtr->tcl_DictObjNext) /* 499 */ +#endif +#ifndef Tcl_DictObjDone +#define Tcl_DictObjDone \ + (tclStubsPtr->tcl_DictObjDone) /* 500 */ +#endif +#ifndef Tcl_DictObjPutKeyList +#define Tcl_DictObjPutKeyList \ + (tclStubsPtr->tcl_DictObjPutKeyList) /* 501 */ +#endif +#ifndef Tcl_DictObjRemoveKeyList +#define Tcl_DictObjRemoveKeyList \ + (tclStubsPtr->tcl_DictObjRemoveKeyList) /* 502 */ +#endif +#ifndef Tcl_NewDictObj +#define Tcl_NewDictObj \ + (tclStubsPtr->tcl_NewDictObj) /* 503 */ +#endif +#ifndef Tcl_DbNewDictObj +#define Tcl_DbNewDictObj \ + (tclStubsPtr->tcl_DbNewDictObj) /* 504 */ +#endif +#ifndef Tcl_RegisterConfig +#define Tcl_RegisterConfig \ + (tclStubsPtr->tcl_RegisterConfig) /* 505 */ +#endif +#ifndef Tcl_CreateNamespace +#define Tcl_CreateNamespace \ + (tclStubsPtr->tcl_CreateNamespace) /* 506 */ +#endif +#ifndef Tcl_DeleteNamespace +#define Tcl_DeleteNamespace \ + (tclStubsPtr->tcl_DeleteNamespace) /* 507 */ +#endif +#ifndef Tcl_AppendExportList +#define Tcl_AppendExportList \ + (tclStubsPtr->tcl_AppendExportList) /* 508 */ +#endif +#ifndef Tcl_Export +#define Tcl_Export \ + (tclStubsPtr->tcl_Export) /* 509 */ +#endif +#ifndef Tcl_Import +#define Tcl_Import \ + (tclStubsPtr->tcl_Import) /* 510 */ +#endif +#ifndef Tcl_ForgetImport +#define Tcl_ForgetImport \ + (tclStubsPtr->tcl_ForgetImport) /* 511 */ +#endif +#ifndef Tcl_GetCurrentNamespace +#define Tcl_GetCurrentNamespace \ + (tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */ +#endif +#ifndef Tcl_GetGlobalNamespace +#define Tcl_GetGlobalNamespace \ + (tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */ +#endif +#ifndef Tcl_FindNamespace +#define Tcl_FindNamespace \ + (tclStubsPtr->tcl_FindNamespace) /* 514 */ +#endif +#ifndef Tcl_FindCommand +#define Tcl_FindCommand \ + (tclStubsPtr->tcl_FindCommand) /* 515 */ +#endif +#ifndef Tcl_GetCommandFromObj +#define Tcl_GetCommandFromObj \ + (tclStubsPtr->tcl_GetCommandFromObj) /* 516 */ +#endif +#ifndef Tcl_GetCommandFullName +#define Tcl_GetCommandFullName \ + (tclStubsPtr->tcl_GetCommandFullName) /* 517 */ +#endif +#ifndef Tcl_FSEvalFileEx +#define Tcl_FSEvalFileEx \ + (tclStubsPtr->tcl_FSEvalFileEx) /* 518 */ +#endif +#ifndef Tcl_SetExitProc +#define Tcl_SetExitProc \ + (tclStubsPtr->tcl_SetExitProc) /* 519 */ +#endif +#ifndef Tcl_LimitAddHandler +#define Tcl_LimitAddHandler \ + (tclStubsPtr->tcl_LimitAddHandler) /* 520 */ +#endif +#ifndef Tcl_LimitRemoveHandler +#define Tcl_LimitRemoveHandler \ + (tclStubsPtr->tcl_LimitRemoveHandler) /* 521 */ +#endif +#ifndef Tcl_LimitReady +#define Tcl_LimitReady \ + (tclStubsPtr->tcl_LimitReady) /* 522 */ +#endif +#ifndef Tcl_LimitCheck +#define Tcl_LimitCheck \ + (tclStubsPtr->tcl_LimitCheck) /* 523 */ +#endif +#ifndef Tcl_LimitExceeded +#define Tcl_LimitExceeded \ + (tclStubsPtr->tcl_LimitExceeded) /* 524 */ +#endif +#ifndef Tcl_LimitSetCommands +#define Tcl_LimitSetCommands \ + (tclStubsPtr->tcl_LimitSetCommands) /* 525 */ +#endif +#ifndef Tcl_LimitSetTime +#define Tcl_LimitSetTime \ + (tclStubsPtr->tcl_LimitSetTime) /* 526 */ +#endif +#ifndef Tcl_LimitSetGranularity +#define Tcl_LimitSetGranularity \ + (tclStubsPtr->tcl_LimitSetGranularity) /* 527 */ +#endif +#ifndef Tcl_LimitTypeEnabled +#define Tcl_LimitTypeEnabled \ + (tclStubsPtr->tcl_LimitTypeEnabled) /* 528 */ +#endif +#ifndef Tcl_LimitTypeExceeded +#define Tcl_LimitTypeExceeded \ + (tclStubsPtr->tcl_LimitTypeExceeded) /* 529 */ +#endif +#ifndef Tcl_LimitTypeSet +#define Tcl_LimitTypeSet \ + (tclStubsPtr->tcl_LimitTypeSet) /* 530 */ +#endif +#ifndef Tcl_LimitTypeReset +#define Tcl_LimitTypeReset \ + (tclStubsPtr->tcl_LimitTypeReset) /* 531 */ +#endif +#ifndef Tcl_LimitGetCommands +#define Tcl_LimitGetCommands \ + (tclStubsPtr->tcl_LimitGetCommands) /* 532 */ +#endif +#ifndef Tcl_LimitGetTime +#define Tcl_LimitGetTime \ + (tclStubsPtr->tcl_LimitGetTime) /* 533 */ +#endif +#ifndef Tcl_LimitGetGranularity +#define Tcl_LimitGetGranularity \ + (tclStubsPtr->tcl_LimitGetGranularity) /* 534 */ +#endif +#ifndef Tcl_SaveInterpState +#define Tcl_SaveInterpState \ + (tclStubsPtr->tcl_SaveInterpState) /* 535 */ +#endif +#ifndef Tcl_RestoreInterpState +#define Tcl_RestoreInterpState \ + (tclStubsPtr->tcl_RestoreInterpState) /* 536 */ +#endif +#ifndef Tcl_DiscardInterpState +#define Tcl_DiscardInterpState \ + (tclStubsPtr->tcl_DiscardInterpState) /* 537 */ +#endif +#ifndef Tcl_SetReturnOptions +#define Tcl_SetReturnOptions \ + (tclStubsPtr->tcl_SetReturnOptions) /* 538 */ +#endif +#ifndef Tcl_GetReturnOptions +#define Tcl_GetReturnOptions \ + (tclStubsPtr->tcl_GetReturnOptions) /* 539 */ +#endif +#ifndef Tcl_IsEnsemble +#define Tcl_IsEnsemble \ + (tclStubsPtr->tcl_IsEnsemble) /* 540 */ +#endif +#ifndef Tcl_CreateEnsemble +#define Tcl_CreateEnsemble \ + (tclStubsPtr->tcl_CreateEnsemble) /* 541 */ +#endif +#ifndef Tcl_FindEnsemble +#define Tcl_FindEnsemble \ + (tclStubsPtr->tcl_FindEnsemble) /* 542 */ +#endif +#ifndef Tcl_SetEnsembleSubcommandList +#define Tcl_SetEnsembleSubcommandList \ + (tclStubsPtr->tcl_SetEnsembleSubcommandList) /* 543 */ +#endif +#ifndef Tcl_SetEnsembleMappingDict +#define Tcl_SetEnsembleMappingDict \ + (tclStubsPtr->tcl_SetEnsembleMappingDict) /* 544 */ +#endif +#ifndef Tcl_SetEnsembleUnknownHandler +#define Tcl_SetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_SetEnsembleUnknownHandler) /* 545 */ +#endif +#ifndef Tcl_SetEnsembleFlags +#define Tcl_SetEnsembleFlags \ + (tclStubsPtr->tcl_SetEnsembleFlags) /* 546 */ +#endif +#ifndef Tcl_GetEnsembleSubcommandList +#define Tcl_GetEnsembleSubcommandList \ + (tclStubsPtr->tcl_GetEnsembleSubcommandList) /* 547 */ +#endif +#ifndef Tcl_GetEnsembleMappingDict +#define Tcl_GetEnsembleMappingDict \ + (tclStubsPtr->tcl_GetEnsembleMappingDict) /* 548 */ +#endif +#ifndef Tcl_GetEnsembleUnknownHandler +#define Tcl_GetEnsembleUnknownHandler \ + (tclStubsPtr->tcl_GetEnsembleUnknownHandler) /* 549 */ +#endif +#ifndef Tcl_GetEnsembleFlags +#define Tcl_GetEnsembleFlags \ + (tclStubsPtr->tcl_GetEnsembleFlags) /* 550 */ +#endif +#ifndef Tcl_GetEnsembleNamespace +#define Tcl_GetEnsembleNamespace \ + (tclStubsPtr->tcl_GetEnsembleNamespace) /* 551 */ +#endif +#ifndef Tcl_SetTimeProc +#define Tcl_SetTimeProc \ + (tclStubsPtr->tcl_SetTimeProc) /* 552 */ +#endif +#ifndef Tcl_QueryTimeProc +#define Tcl_QueryTimeProc \ + (tclStubsPtr->tcl_QueryTimeProc) /* 553 */ +#endif +#ifndef Tcl_ChannelThreadActionProc +#define Tcl_ChannelThreadActionProc \ + (tclStubsPtr->tcl_ChannelThreadActionProc) /* 554 */ +#endif +#ifndef Tcl_NewBignumObj +#define Tcl_NewBignumObj \ + (tclStubsPtr->tcl_NewBignumObj) /* 555 */ +#endif +#ifndef Tcl_DbNewBignumObj +#define Tcl_DbNewBignumObj \ + (tclStubsPtr->tcl_DbNewBignumObj) /* 556 */ +#endif +#ifndef Tcl_SetBignumObj +#define Tcl_SetBignumObj \ + (tclStubsPtr->tcl_SetBignumObj) /* 557 */ +#endif +#ifndef Tcl_GetBignumFromObj +#define Tcl_GetBignumFromObj \ + (tclStubsPtr->tcl_GetBignumFromObj) /* 558 */ +#endif +#ifndef Tcl_TakeBignumFromObj +#define Tcl_TakeBignumFromObj \ + (tclStubsPtr->tcl_TakeBignumFromObj) /* 559 */ +#endif +#ifndef Tcl_TruncateChannel +#define Tcl_TruncateChannel \ + (tclStubsPtr->tcl_TruncateChannel) /* 560 */ +#endif +#ifndef Tcl_ChannelTruncateProc +#define Tcl_ChannelTruncateProc \ + (tclStubsPtr->tcl_ChannelTruncateProc) /* 561 */ +#endif +#ifndef Tcl_SetChannelErrorInterp +#define Tcl_SetChannelErrorInterp \ + (tclStubsPtr->tcl_SetChannelErrorInterp) /* 562 */ +#endif +#ifndef Tcl_GetChannelErrorInterp +#define Tcl_GetChannelErrorInterp \ + (tclStubsPtr->tcl_GetChannelErrorInterp) /* 563 */ +#endif +#ifndef Tcl_SetChannelError +#define Tcl_SetChannelError \ + (tclStubsPtr->tcl_SetChannelError) /* 564 */ +#endif +#ifndef Tcl_GetChannelError +#define Tcl_GetChannelError \ + (tclStubsPtr->tcl_GetChannelError) /* 565 */ +#endif +#ifndef Tcl_InitBignumFromDouble +#define Tcl_InitBignumFromDouble \ + (tclStubsPtr->tcl_InitBignumFromDouble) /* 566 */ +#endif +#ifndef Tcl_GetNamespaceUnknownHandler +#define Tcl_GetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_GetNamespaceUnknownHandler) /* 567 */ +#endif +#ifndef Tcl_SetNamespaceUnknownHandler +#define Tcl_SetNamespaceUnknownHandler \ + (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ +#endif +#ifndef Tcl_GetEncodingFromObj +#define Tcl_GetEncodingFromObj \ + (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ +#endif +#ifndef Tcl_GetEncodingSearchPath +#define Tcl_GetEncodingSearchPath \ + (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ +#endif +#ifndef Tcl_SetEncodingSearchPath +#define Tcl_SetEncodingSearchPath \ + (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment +#define Tcl_GetEncodingNameFromEnvironment \ + (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ +#endif +#ifndef Tcl_PkgRequireProc +#define Tcl_PkgRequireProc \ + (tclStubsPtr->tcl_PkgRequireProc) /* 573 */ +#endif +#ifndef Tcl_AppendObjToErrorInfo +#define Tcl_AppendObjToErrorInfo \ + (tclStubsPtr->tcl_AppendObjToErrorInfo) /* 574 */ +#endif +#ifndef Tcl_AppendLimitedToObj +#define Tcl_AppendLimitedToObj \ + (tclStubsPtr->tcl_AppendLimitedToObj) /* 575 */ +#endif +#ifndef Tcl_Format +#define Tcl_Format \ + (tclStubsPtr->tcl_Format) /* 576 */ +#endif +#ifndef Tcl_AppendFormatToObj +#define Tcl_AppendFormatToObj \ + (tclStubsPtr->tcl_AppendFormatToObj) /* 577 */ +#endif +#ifndef Tcl_ObjPrintf +#define Tcl_ObjPrintf \ + (tclStubsPtr->tcl_ObjPrintf) /* 578 */ +#endif +#ifndef Tcl_AppendPrintfToObj +#define Tcl_AppendPrintfToObj \ + (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ +#endif +#ifndef Tcl_CancelEval +#define Tcl_CancelEval \ + (tclStubsPtr->tcl_CancelEval) /* 580 */ +#endif +#ifndef Tcl_Canceled +#define Tcl_Canceled \ + (tclStubsPtr->tcl_Canceled) /* 581 */ +#endif +#ifndef Tcl_CreatePipe +#define Tcl_CreatePipe \ + (tclStubsPtr->tcl_CreatePipe) /* 582 */ +#endif +#ifndef Tcl_NRCreateCommand +#define Tcl_NRCreateCommand \ + (tclStubsPtr->tcl_NRCreateCommand) /* 583 */ +#endif +#ifndef Tcl_NREvalObj +#define Tcl_NREvalObj \ + (tclStubsPtr->tcl_NREvalObj) /* 584 */ +#endif +#ifndef Tcl_NREvalObjv +#define Tcl_NREvalObjv \ + (tclStubsPtr->tcl_NREvalObjv) /* 585 */ +#endif +#ifndef Tcl_NRCmdSwap +#define Tcl_NRCmdSwap \ + (tclStubsPtr->tcl_NRCmdSwap) /* 586 */ +#endif +#ifndef Tcl_NRAddCallback +#define Tcl_NRAddCallback \ + (tclStubsPtr->tcl_NRAddCallback) /* 587 */ +#endif +#ifndef Tcl_NRCallObjProc +#define Tcl_NRCallObjProc \ + (tclStubsPtr->tcl_NRCallObjProc) /* 588 */ +#endif +#ifndef Tcl_GetFSDeviceFromStat +#define Tcl_GetFSDeviceFromStat \ + (tclStubsPtr->tcl_GetFSDeviceFromStat) /* 589 */ +#endif +#ifndef Tcl_GetFSInodeFromStat +#define Tcl_GetFSInodeFromStat \ + (tclStubsPtr->tcl_GetFSInodeFromStat) /* 590 */ +#endif +#ifndef Tcl_GetModeFromStat +#define Tcl_GetModeFromStat \ + (tclStubsPtr->tcl_GetModeFromStat) /* 591 */ +#endif +#ifndef Tcl_GetLinkCountFromStat +#define Tcl_GetLinkCountFromStat \ + (tclStubsPtr->tcl_GetLinkCountFromStat) /* 592 */ +#endif +#ifndef Tcl_GetUserIdFromStat +#define Tcl_GetUserIdFromStat \ + (tclStubsPtr->tcl_GetUserIdFromStat) /* 593 */ +#endif +#ifndef Tcl_GetGroupIdFromStat +#define Tcl_GetGroupIdFromStat \ + (tclStubsPtr->tcl_GetGroupIdFromStat) /* 594 */ +#endif +#ifndef Tcl_GetDeviceTypeFromStat +#define Tcl_GetDeviceTypeFromStat \ + (tclStubsPtr->tcl_GetDeviceTypeFromStat) /* 595 */ +#endif +#ifndef Tcl_GetAccessTimeFromStat +#define Tcl_GetAccessTimeFromStat \ + (tclStubsPtr->tcl_GetAccessTimeFromStat) /* 596 */ +#endif +#ifndef Tcl_GetModificationTimeFromStat +#define Tcl_GetModificationTimeFromStat \ + (tclStubsPtr->tcl_GetModificationTimeFromStat) /* 597 */ +#endif +#ifndef Tcl_GetChangeTimeFromStat +#define Tcl_GetChangeTimeFromStat \ + (tclStubsPtr->tcl_GetChangeTimeFromStat) /* 598 */ +#endif +#ifndef Tcl_GetSizeFromStat +#define Tcl_GetSizeFromStat \ + (tclStubsPtr->tcl_GetSizeFromStat) /* 599 */ +#endif +#ifndef Tcl_GetBlocksFromStat +#define Tcl_GetBlocksFromStat \ + (tclStubsPtr->tcl_GetBlocksFromStat) /* 600 */ +#endif +#ifndef Tcl_GetBlockSizeFromStat +#define Tcl_GetBlockSizeFromStat \ + (tclStubsPtr->tcl_GetBlockSizeFromStat) /* 601 */ +#endif +#ifndef Tcl_SetEnsembleParameterList +#define Tcl_SetEnsembleParameterList \ + (tclStubsPtr->tcl_SetEnsembleParameterList) /* 602 */ +#endif +#ifndef Tcl_GetEnsembleParameterList +#define Tcl_GetEnsembleParameterList \ + (tclStubsPtr->tcl_GetEnsembleParameterList) /* 603 */ +#endif +#ifndef Tcl_ParseArgsObjv +#define Tcl_ParseArgsObjv \ + (tclStubsPtr->tcl_ParseArgsObjv) /* 604 */ +#endif +#ifndef Tcl_GetErrorLine +#define Tcl_GetErrorLine \ + (tclStubsPtr->tcl_GetErrorLine) /* 605 */ +#endif +#ifndef Tcl_SetErrorLine +#define Tcl_SetErrorLine \ + (tclStubsPtr->tcl_SetErrorLine) /* 606 */ +#endif +#ifndef Tcl_TransferResult +#define Tcl_TransferResult \ + (tclStubsPtr->tcl_TransferResult) /* 607 */ +#endif +#ifndef Tcl_InterpActive +#define Tcl_InterpActive \ + (tclStubsPtr->tcl_InterpActive) /* 608 */ +#endif +#ifndef Tcl_BackgroundException +#define Tcl_BackgroundException \ + (tclStubsPtr->tcl_BackgroundException) /* 609 */ +#endif +#ifndef Tcl_ZlibDeflate +#define Tcl_ZlibDeflate \ + (tclStubsPtr->tcl_ZlibDeflate) /* 610 */ +#endif +#ifndef Tcl_ZlibInflate +#define Tcl_ZlibInflate \ + (tclStubsPtr->tcl_ZlibInflate) /* 611 */ +#endif +#ifndef Tcl_ZlibCRC32 +#define Tcl_ZlibCRC32 \ + (tclStubsPtr->tcl_ZlibCRC32) /* 612 */ +#endif +#ifndef Tcl_ZlibAdler32 +#define Tcl_ZlibAdler32 \ + (tclStubsPtr->tcl_ZlibAdler32) /* 613 */ +#endif +#ifndef Tcl_ZlibStreamInit +#define Tcl_ZlibStreamInit \ + (tclStubsPtr->tcl_ZlibStreamInit) /* 614 */ +#endif +#ifndef Tcl_ZlibStreamGetCommandName +#define Tcl_ZlibStreamGetCommandName \ + (tclStubsPtr->tcl_ZlibStreamGetCommandName) /* 615 */ +#endif +#ifndef Tcl_ZlibStreamEof +#define Tcl_ZlibStreamEof \ + (tclStubsPtr->tcl_ZlibStreamEof) /* 616 */ +#endif +#ifndef Tcl_ZlibStreamAdler32 +#define Tcl_ZlibStreamAdler32 \ + (tclStubsPtr->tcl_ZlibStreamAdler32) /* 617 */ +#endif +#ifndef Tcl_ZlibStreamPut +#define Tcl_ZlibStreamPut \ + (tclStubsPtr->tcl_ZlibStreamPut) /* 618 */ +#endif +#ifndef Tcl_ZlibStreamGet +#define Tcl_ZlibStreamGet \ + (tclStubsPtr->tcl_ZlibStreamGet) /* 619 */ +#endif +#ifndef Tcl_ZlibStreamClose +#define Tcl_ZlibStreamClose \ + (tclStubsPtr->tcl_ZlibStreamClose) /* 620 */ +#endif +#ifndef Tcl_ZlibStreamReset +#define Tcl_ZlibStreamReset \ + (tclStubsPtr->tcl_ZlibStreamReset) /* 621 */ +#endif +#ifndef Tcl_SetStartupScript +#define Tcl_SetStartupScript \ + (tclStubsPtr->tcl_SetStartupScript) /* 622 */ +#endif +#ifndef Tcl_GetStartupScript +#define Tcl_GetStartupScript \ + (tclStubsPtr->tcl_GetStartupScript) /* 623 */ +#endif +#ifndef Tcl_CloseEx +#define Tcl_CloseEx \ + (tclStubsPtr->tcl_CloseEx) /* 624 */ +#endif + +#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ + +/* !END!: Do not edit above this line. */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT + +#endif /* _TCLDECLS */ + diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f0d02bc..926a45d 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1,1166 +1,1166 @@ -/* - * tclStubInit.c -- - * - * This file contains the initializers for the Tcl stub vectors. - * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclStubInit.c,v 1.176 2008/12/18 01:14:16 ferrieux Exp $ - */ - -#include "tclInt.h" -#include "tommath.h" - -/* - * Remove macros that will interfere with the definitions below. - */ - -#undef Tcl_Alloc -#undef Tcl_Free -#undef Tcl_Realloc -#undef Tcl_NewBooleanObj -#undef Tcl_NewByteArrayObj -#undef Tcl_NewDoubleObj -#undef Tcl_NewIntObj -#undef Tcl_NewListObj -#undef Tcl_NewLongObj -#undef Tcl_NewObj -#undef Tcl_NewStringObj -#undef Tcl_DumpActiveMemory -#undef Tcl_ValidateAllMemory -#undef Tcl_FindHashEntry -#undef Tcl_CreateHashEntry - -/* - * WARNING: The contents of this file is automatically generated by the - * tools/genStubs.tcl script. Any modifications to the function declarations - * below should be made in the generic/tcl.decls script. - */ - -/* !BEGIN!: Do not edit below this line. */ - -static const TclIntStubs tclIntStubs = { - TCL_STUB_MAGIC, - NULL, - NULL, /* 0 */ - NULL, /* 1 */ - NULL, /* 2 */ - TclAllocateFreeObjects, /* 3 */ - NULL, /* 4 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCleanupChildren, /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCleanupChildren, /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCleanupChildren, /* 5 */ -#endif /* MACOSX */ - TclCleanupCommand, /* 6 */ - TclCopyAndCollapse, /* 7 */ - TclCopyChannel, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCreatePipeline, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCreatePipeline, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCreatePipeline, /* 9 */ -#endif /* MACOSX */ - TclCreateProc, /* 10 */ - TclDeleteCompiledLocalVars, /* 11 */ - TclDeleteVars, /* 12 */ - NULL, /* 13 */ - TclDumpMemoryInfo, /* 14 */ - NULL, /* 15 */ - TclExprFloatError, /* 16 */ - NULL, /* 17 */ - NULL, /* 18 */ - NULL, /* 19 */ - NULL, /* 20 */ - NULL, /* 21 */ - TclFindElement, /* 22 */ - TclFindProc, /* 23 */ - NULL, /* 24 */ - TclFreePackageInfo, /* 25 */ - NULL, /* 26 */ - NULL, /* 27 */ - TclpGetDefaultStdChannel, /* 28 */ - NULL, /* 29 */ - NULL, /* 30 */ - TclGetExtension, /* 31 */ - TclGetFrame, /* 32 */ - NULL, /* 33 */ - TclGetIntForIndex, /* 34 */ - NULL, /* 35 */ - NULL, /* 36 */ - TclGetLoadedPackages, /* 37 */ - TclGetNamespaceForQualName, /* 38 */ - TclGetObjInterpProc, /* 39 */ - TclGetOpenMode, /* 40 */ - TclGetOriginalCommand, /* 41 */ - TclpGetUserHome, /* 42 */ - NULL, /* 43 */ - TclGuessPackageName, /* 44 */ - TclHideUnsafeCommands, /* 45 */ - TclInExit, /* 46 */ - NULL, /* 47 */ - NULL, /* 48 */ - NULL, /* 49 */ - TclInitCompiledLocals, /* 50 */ - TclInterpInit, /* 51 */ - NULL, /* 52 */ - TclInvokeObjectCommand, /* 53 */ - TclInvokeStringCommand, /* 54 */ - TclIsProc, /* 55 */ - NULL, /* 56 */ - NULL, /* 57 */ - TclLookupVar, /* 58 */ - NULL, /* 59 */ - TclNeedSpace, /* 60 */ - TclNewProcBodyObj, /* 61 */ - TclObjCommandComplete, /* 62 */ - TclObjInterpProc, /* 63 */ - TclObjInvoke, /* 64 */ - NULL, /* 65 */ - NULL, /* 66 */ - NULL, /* 67 */ - NULL, /* 68 */ - TclpAlloc, /* 69 */ - NULL, /* 70 */ - NULL, /* 71 */ - NULL, /* 72 */ - NULL, /* 73 */ - TclpFree, /* 74 */ - TclpGetClicks, /* 75 */ - TclpGetSeconds, /* 76 */ - TclpGetTime, /* 77 */ - TclpGetTimeZone, /* 78 */ - NULL, /* 79 */ - NULL, /* 80 */ - TclpRealloc, /* 81 */ - NULL, /* 82 */ - NULL, /* 83 */ - NULL, /* 84 */ - NULL, /* 85 */ - NULL, /* 86 */ - NULL, /* 87 */ - TclPrecTraceProc, /* 88 */ - TclPreventAliasLoop, /* 89 */ - NULL, /* 90 */ - TclProcCleanupProc, /* 91 */ - TclProcCompileProc, /* 92 */ - TclProcDeleteProc, /* 93 */ - NULL, /* 94 */ - NULL, /* 95 */ - TclRenameCommand, /* 96 */ - TclResetShadowedCmdRefs, /* 97 */ - TclServiceIdle, /* 98 */ - NULL, /* 99 */ - NULL, /* 100 */ - TclSetPreInitScript, /* 101 */ - TclSetupEnv, /* 102 */ - TclSockGetPort, /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclSockMinimumBuffers, /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* MACOSX */ - NULL, /* 105 */ - NULL, /* 106 */ - NULL, /* 107 */ - TclTeardownNamespace, /* 108 */ - TclUpdateReturnInfo, /* 109 */ - NULL, /* 110 */ - Tcl_AddInterpResolvers, /* 111 */ - Tcl_AppendExportList, /* 112 */ - Tcl_CreateNamespace, /* 113 */ - Tcl_DeleteNamespace, /* 114 */ - Tcl_Export, /* 115 */ - Tcl_FindCommand, /* 116 */ - Tcl_FindNamespace, /* 117 */ - Tcl_GetInterpResolvers, /* 118 */ - Tcl_GetNamespaceResolvers, /* 119 */ - Tcl_FindNamespaceVar, /* 120 */ - Tcl_ForgetImport, /* 121 */ - Tcl_GetCommandFromObj, /* 122 */ - Tcl_GetCommandFullName, /* 123 */ - Tcl_GetCurrentNamespace, /* 124 */ - Tcl_GetGlobalNamespace, /* 125 */ - Tcl_GetVariableFullName, /* 126 */ - Tcl_Import, /* 127 */ - Tcl_PopCallFrame, /* 128 */ - Tcl_PushCallFrame, /* 129 */ - Tcl_RemoveInterpResolvers, /* 130 */ - Tcl_SetNamespaceResolvers, /* 131 */ - TclpHasSockets, /* 132 */ - TclpGetDate, /* 133 */ - NULL, /* 134 */ - NULL, /* 135 */ - NULL, /* 136 */ - NULL, /* 137 */ - TclGetEnv, /* 138 */ - NULL, /* 139 */ - NULL, /* 140 */ - TclpGetCwd, /* 141 */ - TclSetByteCodeFromAny, /* 142 */ - TclAddLiteralObj, /* 143 */ - TclHideLiteral, /* 144 */ - TclGetAuxDataType, /* 145 */ - TclHandleCreate, /* 146 */ - TclHandleFree, /* 147 */ - TclHandlePreserve, /* 148 */ - TclHandleRelease, /* 149 */ - TclRegAbout, /* 150 */ - TclRegExpRangeUniChar, /* 151 */ - TclSetLibraryPath, /* 152 */ - TclGetLibraryPath, /* 153 */ - NULL, /* 154 */ - NULL, /* 155 */ - TclRegError, /* 156 */ - TclVarTraceExists, /* 157 */ - NULL, /* 158 */ - NULL, /* 159 */ - NULL, /* 160 */ - TclChannelTransform, /* 161 */ - TclChannelEventScriptInvoker, /* 162 */ - TclGetInstructionTable, /* 163 */ - TclExpandCodeArray, /* 164 */ - TclpSetInitialEncodings, /* 165 */ - TclListObjSetElement, /* 166 */ - NULL, /* 167 */ - NULL, /* 168 */ - TclpUtfNcmp2, /* 169 */ - TclCheckInterpTraces, /* 170 */ - TclCheckExecutionTraces, /* 171 */ - TclInThreadExit, /* 172 */ - TclUniCharMatch, /* 173 */ - NULL, /* 174 */ - TclCallVarTraces, /* 175 */ - TclCleanupVar, /* 176 */ - TclVarErrMsg, /* 177 */ - NULL, /* 178 */ - NULL, /* 179 */ - NULL, /* 180 */ - NULL, /* 181 */ - TclpLocaltime, /* 182 */ - TclpGmtime, /* 183 */ - NULL, /* 184 */ - NULL, /* 185 */ - NULL, /* 186 */ - NULL, /* 187 */ - NULL, /* 188 */ - NULL, /* 189 */ - NULL, /* 190 */ - NULL, /* 191 */ - NULL, /* 192 */ - NULL, /* 193 */ - NULL, /* 194 */ - NULL, /* 195 */ - NULL, /* 196 */ - NULL, /* 197 */ - TclObjGetFrame, /* 198 */ - NULL, /* 199 */ - TclpObjRemoveDirectory, /* 200 */ - TclpObjCopyDirectory, /* 201 */ - TclpObjCreateDirectory, /* 202 */ - TclpObjDeleteFile, /* 203 */ - TclpObjCopyFile, /* 204 */ - TclpObjRenameFile, /* 205 */ - TclpObjStat, /* 206 */ - TclpObjAccess, /* 207 */ - TclpOpenFileChannel, /* 208 */ - NULL, /* 209 */ - NULL, /* 210 */ - NULL, /* 211 */ - TclpFindExecutable, /* 212 */ - TclGetObjNameOfExecutable, /* 213 */ - TclSetObjNameOfExecutable, /* 214 */ - TclStackAlloc, /* 215 */ - TclStackFree, /* 216 */ - TclPushStackFrame, /* 217 */ - TclPopStackFrame, /* 218 */ - NULL, /* 219 */ - NULL, /* 220 */ - NULL, /* 221 */ - NULL, /* 222 */ - NULL, /* 223 */ - TclGetPlatform, /* 224 */ - TclTraceDictPath, /* 225 */ - TclObjBeingDeleted, /* 226 */ - TclSetNsPath, /* 227 */ - NULL, /* 228 */ - TclPtrMakeUpvar, /* 229 */ - TclObjLookupVar, /* 230 */ - TclGetNamespaceFromObj, /* 231 */ - TclEvalObjEx, /* 232 */ - TclGetSrcInfoForPc, /* 233 */ - TclVarHashCreateVar, /* 234 */ - TclInitVarHashTable, /* 235 */ - Tcl_BackgroundException, /* 236 */ - TclResetCancellation, /* 237 */ - TclNRInterpProc, /* 238 */ - TclNRInterpProcCore, /* 239 */ - TclNRRunCallbacks, /* 240 */ - TclNREvalObjEx, /* 241 */ - TclNREvalObjv, /* 242 */ -}; - -static const TclIntPlatStubs tclIntPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclWinConvertError, /* 0 */ - TclWinConvertWSAError, /* 1 */ - TclWinGetServByName, /* 2 */ - TclWinGetSockOpt, /* 3 */ - TclWinGetTclInstance, /* 4 */ - NULL, /* 5 */ - TclWinNToHS, /* 6 */ - TclWinSetSockOpt, /* 7 */ - TclpGetPid, /* 8 */ - TclWinGetPlatformId, /* 9 */ - NULL, /* 10 */ - TclGetAndDetachPids, /* 11 */ - TclpCloseFile, /* 12 */ - TclpCreateCommandChannel, /* 13 */ - TclpCreatePipe, /* 14 */ - TclpCreateProcess, /* 15 */ - NULL, /* 16 */ - NULL, /* 17 */ - TclpMakeFile, /* 18 */ - TclpOpenFile, /* 19 */ - TclWinAddProcess, /* 20 */ - NULL, /* 21 */ - TclpCreateTempFile, /* 22 */ - TclpGetTZName, /* 23 */ - TclWinNoBackslash, /* 24 */ - NULL, /* 25 */ - TclWinSetInterfaces, /* 26 */ - TclWinFlushDirtyChannels, /* 27 */ - TclWinResetInterfaces, /* 28 */ - TclWinCPUID, /* 29 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ - TclpReaddir, /* 10 */ - TclpLocaltime_unix, /* 11 */ - TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ - TclUnixCopyFile, /* 14 */ - TclMacOSXGetFileAttribute, /* 15 */ - TclMacOSXSetFileAttribute, /* 16 */ - TclMacOSXCopyFileAttributes, /* 17 */ - TclMacOSXMatchType, /* 18 */ -#endif /* MACOSX */ -}; - -static const TclPlatStubs tclPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#ifdef __WIN32__ /* WIN */ - Tcl_WinUtfToTChar, /* 0 */ - Tcl_WinTCharToUtf, /* 1 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_MacOSXOpenBundleResources, /* 0 */ - Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ -#endif /* MACOSX */ -}; - -static const TclTomMathStubs tclTomMathStubs = { - TCL_STUB_MAGIC, - NULL, - TclBN_epoch, /* 0 */ - TclBN_revision, /* 1 */ - TclBN_mp_add, /* 2 */ - TclBN_mp_add_d, /* 3 */ - TclBN_mp_and, /* 4 */ - TclBN_mp_clamp, /* 5 */ - TclBN_mp_clear, /* 6 */ - TclBN_mp_clear_multi, /* 7 */ - TclBN_mp_cmp, /* 8 */ - TclBN_mp_cmp_d, /* 9 */ - TclBN_mp_cmp_mag, /* 10 */ - TclBN_mp_copy, /* 11 */ - TclBN_mp_count_bits, /* 12 */ - TclBN_mp_div, /* 13 */ - TclBN_mp_div_d, /* 14 */ - TclBN_mp_div_2, /* 15 */ - TclBN_mp_div_2d, /* 16 */ - TclBN_mp_div_3, /* 17 */ - TclBN_mp_exch, /* 18 */ - TclBN_mp_expt_d, /* 19 */ - TclBN_mp_grow, /* 20 */ - TclBN_mp_init, /* 21 */ - TclBN_mp_init_copy, /* 22 */ - TclBN_mp_init_multi, /* 23 */ - TclBN_mp_init_set, /* 24 */ - TclBN_mp_init_size, /* 25 */ - TclBN_mp_lshd, /* 26 */ - TclBN_mp_mod, /* 27 */ - TclBN_mp_mod_2d, /* 28 */ - TclBN_mp_mul, /* 29 */ - TclBN_mp_mul_d, /* 30 */ - TclBN_mp_mul_2, /* 31 */ - TclBN_mp_mul_2d, /* 32 */ - TclBN_mp_neg, /* 33 */ - TclBN_mp_or, /* 34 */ - TclBN_mp_radix_size, /* 35 */ - TclBN_mp_read_radix, /* 36 */ - TclBN_mp_rshd, /* 37 */ - TclBN_mp_shrink, /* 38 */ - TclBN_mp_set, /* 39 */ - TclBN_mp_sqr, /* 40 */ - TclBN_mp_sqrt, /* 41 */ - TclBN_mp_sub, /* 42 */ - TclBN_mp_sub_d, /* 43 */ - TclBN_mp_to_unsigned_bin, /* 44 */ - TclBN_mp_to_unsigned_bin_n, /* 45 */ - TclBN_mp_toradix_n, /* 46 */ - TclBN_mp_unsigned_bin_size, /* 47 */ - TclBN_mp_xor, /* 48 */ - TclBN_mp_zero, /* 49 */ - TclBN_reverse, /* 50 */ - TclBN_fast_s_mp_mul_digs, /* 51 */ - TclBN_fast_s_mp_sqr, /* 52 */ - TclBN_mp_karatsuba_mul, /* 53 */ - TclBN_mp_karatsuba_sqr, /* 54 */ - TclBN_mp_toom_mul, /* 55 */ - TclBN_mp_toom_sqr, /* 56 */ - TclBN_s_mp_add, /* 57 */ - TclBN_s_mp_mul_digs, /* 58 */ - TclBN_s_mp_sqr, /* 59 */ - TclBN_s_mp_sub, /* 60 */ -}; - -static const TclStubHooks tclStubHooks = { - &tclPlatStubs, - &tclIntStubs, - &tclIntPlatStubs -}; - -static const TclStubs tclStubs = { - TCL_STUB_MAGIC, - &tclStubHooks, - Tcl_PkgProvideEx, /* 0 */ - Tcl_PkgRequireEx, /* 1 */ - Tcl_Panic, /* 2 */ - Tcl_Alloc, /* 3 */ - Tcl_Free, /* 4 */ - Tcl_Realloc, /* 5 */ - Tcl_DbCkalloc, /* 6 */ - Tcl_DbCkfree, /* 7 */ - Tcl_DbCkrealloc, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_CreateFileHandler, /* 9 */ -#endif /* MACOSX */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 10 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DeleteFileHandler, /* 10 */ -#endif /* MACOSX */ - Tcl_SetTimer, /* 11 */ - Tcl_Sleep, /* 12 */ - Tcl_WaitForEvent, /* 13 */ - Tcl_AppendAllObjTypes, /* 14 */ - Tcl_AppendStringsToObj, /* 15 */ - Tcl_AppendToObj, /* 16 */ - Tcl_ConcatObj, /* 17 */ - Tcl_ConvertToType, /* 18 */ - Tcl_DbDecrRefCount, /* 19 */ - Tcl_DbIncrRefCount, /* 20 */ - Tcl_DbIsShared, /* 21 */ - Tcl_DbNewBooleanObj, /* 22 */ - Tcl_DbNewByteArrayObj, /* 23 */ - Tcl_DbNewDoubleObj, /* 24 */ - Tcl_DbNewListObj, /* 25 */ - Tcl_DbNewLongObj, /* 26 */ - Tcl_DbNewObj, /* 27 */ - Tcl_DbNewStringObj, /* 28 */ - Tcl_DuplicateObj, /* 29 */ - TclFreeObj, /* 30 */ - Tcl_GetBoolean, /* 31 */ - Tcl_GetBooleanFromObj, /* 32 */ - Tcl_GetByteArrayFromObj, /* 33 */ - Tcl_GetDouble, /* 34 */ - Tcl_GetDoubleFromObj, /* 35 */ - Tcl_GetIndexFromObj, /* 36 */ - Tcl_GetInt, /* 37 */ - Tcl_GetIntFromObj, /* 38 */ - Tcl_GetLongFromObj, /* 39 */ - Tcl_GetObjType, /* 40 */ - Tcl_GetStringFromObj, /* 41 */ - Tcl_InvalidateStringRep, /* 42 */ - Tcl_ListObjAppendList, /* 43 */ - Tcl_ListObjAppendElement, /* 44 */ - Tcl_ListObjGetElements, /* 45 */ - Tcl_ListObjIndex, /* 46 */ - Tcl_ListObjLength, /* 47 */ - Tcl_ListObjReplace, /* 48 */ - Tcl_NewBooleanObj, /* 49 */ - Tcl_NewByteArrayObj, /* 50 */ - Tcl_NewDoubleObj, /* 51 */ - Tcl_NewIntObj, /* 52 */ - Tcl_NewListObj, /* 53 */ - Tcl_NewLongObj, /* 54 */ - Tcl_NewObj, /* 55 */ - Tcl_NewStringObj, /* 56 */ - Tcl_SetBooleanObj, /* 57 */ - Tcl_SetByteArrayLength, /* 58 */ - Tcl_SetByteArrayObj, /* 59 */ - Tcl_SetDoubleObj, /* 60 */ - Tcl_SetIntObj, /* 61 */ - Tcl_SetListObj, /* 62 */ - Tcl_SetLongObj, /* 63 */ - Tcl_SetObjLength, /* 64 */ - Tcl_SetStringObj, /* 65 */ - Tcl_AddErrorInfo, /* 66 */ - Tcl_AddObjErrorInfo, /* 67 */ - Tcl_AllowExceptions, /* 68 */ - Tcl_AppendElement, /* 69 */ - Tcl_AppendResult, /* 70 */ - Tcl_AsyncCreate, /* 71 */ - Tcl_AsyncDelete, /* 72 */ - Tcl_AsyncInvoke, /* 73 */ - Tcl_AsyncMark, /* 74 */ - Tcl_AsyncReady, /* 75 */ - Tcl_BackgroundError, /* 76 */ - Tcl_Backslash, /* 77 */ - Tcl_BadChannelOption, /* 78 */ - Tcl_CallWhenDeleted, /* 79 */ - Tcl_CancelIdleCall, /* 80 */ - Tcl_Close, /* 81 */ - Tcl_CommandComplete, /* 82 */ - Tcl_Concat, /* 83 */ - Tcl_ConvertElement, /* 84 */ - Tcl_ConvertCountedElement, /* 85 */ - Tcl_CreateAlias, /* 86 */ - Tcl_CreateAliasObj, /* 87 */ - Tcl_CreateChannel, /* 88 */ - Tcl_CreateChannelHandler, /* 89 */ - Tcl_CreateCloseHandler, /* 90 */ - Tcl_CreateCommand, /* 91 */ - Tcl_CreateEventSource, /* 92 */ - Tcl_CreateExitHandler, /* 93 */ - Tcl_CreateInterp, /* 94 */ - Tcl_CreateMathFunc, /* 95 */ - Tcl_CreateObjCommand, /* 96 */ - Tcl_CreateSlave, /* 97 */ - Tcl_CreateTimerHandler, /* 98 */ - Tcl_CreateTrace, /* 99 */ - Tcl_DeleteAssocData, /* 100 */ - Tcl_DeleteChannelHandler, /* 101 */ - Tcl_DeleteCloseHandler, /* 102 */ - Tcl_DeleteCommand, /* 103 */ - Tcl_DeleteCommandFromToken, /* 104 */ - Tcl_DeleteEvents, /* 105 */ - Tcl_DeleteEventSource, /* 106 */ - Tcl_DeleteExitHandler, /* 107 */ - Tcl_DeleteHashEntry, /* 108 */ - Tcl_DeleteHashTable, /* 109 */ - Tcl_DeleteInterp, /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DetachPids, /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_DetachPids, /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_DetachPids, /* 111 */ -#endif /* MACOSX */ - Tcl_DeleteTimerHandler, /* 112 */ - Tcl_DeleteTrace, /* 113 */ - Tcl_DontCallWhenDeleted, /* 114 */ - Tcl_DoOneEvent, /* 115 */ - Tcl_DoWhenIdle, /* 116 */ - Tcl_DStringAppend, /* 117 */ - Tcl_DStringAppendElement, /* 118 */ - Tcl_DStringEndSublist, /* 119 */ - Tcl_DStringFree, /* 120 */ - Tcl_DStringGetResult, /* 121 */ - Tcl_DStringInit, /* 122 */ - Tcl_DStringResult, /* 123 */ - Tcl_DStringSetLength, /* 124 */ - Tcl_DStringStartSublist, /* 125 */ - Tcl_Eof, /* 126 */ - Tcl_ErrnoId, /* 127 */ - Tcl_ErrnoMsg, /* 128 */ - Tcl_Eval, /* 129 */ - Tcl_EvalFile, /* 130 */ - Tcl_EvalObj, /* 131 */ - Tcl_EventuallyFree, /* 132 */ - Tcl_Exit, /* 133 */ - Tcl_ExposeCommand, /* 134 */ - Tcl_ExprBoolean, /* 135 */ - Tcl_ExprBooleanObj, /* 136 */ - Tcl_ExprDouble, /* 137 */ - Tcl_ExprDoubleObj, /* 138 */ - Tcl_ExprLong, /* 139 */ - Tcl_ExprLongObj, /* 140 */ - Tcl_ExprObj, /* 141 */ - Tcl_ExprString, /* 142 */ - Tcl_Finalize, /* 143 */ - Tcl_FindExecutable, /* 144 */ - Tcl_FirstHashEntry, /* 145 */ - Tcl_Flush, /* 146 */ - Tcl_FreeResult, /* 147 */ - Tcl_GetAlias, /* 148 */ - Tcl_GetAliasObj, /* 149 */ - Tcl_GetAssocData, /* 150 */ - Tcl_GetChannel, /* 151 */ - Tcl_GetChannelBufferSize, /* 152 */ - Tcl_GetChannelHandle, /* 153 */ - Tcl_GetChannelInstanceData, /* 154 */ - Tcl_GetChannelMode, /* 155 */ - Tcl_GetChannelName, /* 156 */ - Tcl_GetChannelOption, /* 157 */ - Tcl_GetChannelType, /* 158 */ - Tcl_GetCommandInfo, /* 159 */ - Tcl_GetCommandName, /* 160 */ - Tcl_GetErrno, /* 161 */ - Tcl_GetHostName, /* 162 */ - Tcl_GetInterpPath, /* 163 */ - Tcl_GetMaster, /* 164 */ - Tcl_GetNameOfExecutable, /* 165 */ - Tcl_GetObjResult, /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - NULL, /* 167 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_GetOpenFile, /* 167 */ -#endif /* MACOSX */ - Tcl_GetPathType, /* 168 */ - Tcl_Gets, /* 169 */ - Tcl_GetsObj, /* 170 */ - Tcl_GetServiceMode, /* 171 */ - Tcl_GetSlave, /* 172 */ - Tcl_GetStdChannel, /* 173 */ - Tcl_GetStringResult, /* 174 */ - Tcl_GetVar, /* 175 */ - Tcl_GetVar2, /* 176 */ - Tcl_GlobalEval, /* 177 */ - Tcl_GlobalEvalObj, /* 178 */ - Tcl_HideCommand, /* 179 */ - Tcl_Init, /* 180 */ - Tcl_InitHashTable, /* 181 */ - Tcl_InputBlocked, /* 182 */ - Tcl_InputBuffered, /* 183 */ - Tcl_InterpDeleted, /* 184 */ - Tcl_IsSafe, /* 185 */ - Tcl_JoinPath, /* 186 */ - Tcl_LinkVar, /* 187 */ - NULL, /* 188 */ - Tcl_MakeFileChannel, /* 189 */ - Tcl_MakeSafe, /* 190 */ - Tcl_MakeTcpClientChannel, /* 191 */ - Tcl_Merge, /* 192 */ - Tcl_NextHashEntry, /* 193 */ - Tcl_NotifyChannel, /* 194 */ - Tcl_ObjGetVar2, /* 195 */ - Tcl_ObjSetVar2, /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* MACOSX */ - Tcl_OpenFileChannel, /* 198 */ - Tcl_OpenTcpClient, /* 199 */ - Tcl_OpenTcpServer, /* 200 */ - Tcl_Preserve, /* 201 */ - Tcl_PrintDouble, /* 202 */ - Tcl_PutEnv, /* 203 */ - Tcl_PosixError, /* 204 */ - Tcl_QueueEvent, /* 205 */ - Tcl_Read, /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* MACOSX */ - Tcl_RecordAndEval, /* 208 */ - Tcl_RecordAndEvalObj, /* 209 */ - Tcl_RegisterChannel, /* 210 */ - Tcl_RegisterObjType, /* 211 */ - Tcl_RegExpCompile, /* 212 */ - Tcl_RegExpExec, /* 213 */ - Tcl_RegExpMatch, /* 214 */ - Tcl_RegExpRange, /* 215 */ - Tcl_Release, /* 216 */ - Tcl_ResetResult, /* 217 */ - Tcl_ScanElement, /* 218 */ - Tcl_ScanCountedElement, /* 219 */ - Tcl_SeekOld, /* 220 */ - Tcl_ServiceAll, /* 221 */ - Tcl_ServiceEvent, /* 222 */ - Tcl_SetAssocData, /* 223 */ - Tcl_SetChannelBufferSize, /* 224 */ - Tcl_SetChannelOption, /* 225 */ - Tcl_SetCommandInfo, /* 226 */ - Tcl_SetErrno, /* 227 */ - Tcl_SetErrorCode, /* 228 */ - Tcl_SetMaxBlockTime, /* 229 */ - Tcl_SetPanicProc, /* 230 */ - Tcl_SetRecursionLimit, /* 231 */ - Tcl_SetResult, /* 232 */ - Tcl_SetServiceMode, /* 233 */ - Tcl_SetObjErrorCode, /* 234 */ - Tcl_SetObjResult, /* 235 */ - Tcl_SetStdChannel, /* 236 */ - Tcl_SetVar, /* 237 */ - Tcl_SetVar2, /* 238 */ - Tcl_SignalId, /* 239 */ - Tcl_SignalMsg, /* 240 */ - Tcl_SourceRCFile, /* 241 */ - Tcl_SplitList, /* 242 */ - Tcl_SplitPath, /* 243 */ - Tcl_StaticPackage, /* 244 */ - Tcl_StringMatch, /* 245 */ - Tcl_TellOld, /* 246 */ - Tcl_TraceVar, /* 247 */ - Tcl_TraceVar2, /* 248 */ - Tcl_TranslateFileName, /* 249 */ - Tcl_Ungets, /* 250 */ - Tcl_UnlinkVar, /* 251 */ - Tcl_UnregisterChannel, /* 252 */ - Tcl_UnsetVar, /* 253 */ - Tcl_UnsetVar2, /* 254 */ - Tcl_UntraceVar, /* 255 */ - Tcl_UntraceVar2, /* 256 */ - Tcl_UpdateLinkedVar, /* 257 */ - Tcl_UpVar, /* 258 */ - Tcl_UpVar2, /* 259 */ - Tcl_VarEval, /* 260 */ - Tcl_VarTraceInfo, /* 261 */ - Tcl_VarTraceInfo2, /* 262 */ - Tcl_Write, /* 263 */ - Tcl_WrongNumArgs, /* 264 */ - Tcl_DumpActiveMemory, /* 265 */ - Tcl_ValidateAllMemory, /* 266 */ - Tcl_AppendResultVA, /* 267 */ - Tcl_AppendStringsToObjVA, /* 268 */ - Tcl_HashStats, /* 269 */ - Tcl_ParseVar, /* 270 */ - Tcl_PkgPresent, /* 271 */ - Tcl_PkgPresentEx, /* 272 */ - Tcl_PkgProvide, /* 273 */ - Tcl_PkgRequire, /* 274 */ - Tcl_SetErrorCodeVA, /* 275 */ - Tcl_VarEvalVA, /* 276 */ - Tcl_WaitPid, /* 277 */ - Tcl_PanicVA, /* 278 */ - Tcl_GetVersion, /* 279 */ - Tcl_InitMemory, /* 280 */ - Tcl_StackChannel, /* 281 */ - Tcl_UnstackChannel, /* 282 */ - Tcl_GetStackedChannel, /* 283 */ - Tcl_SetMainLoop, /* 284 */ - NULL, /* 285 */ - Tcl_AppendObjToObj, /* 286 */ - Tcl_CreateEncoding, /* 287 */ - Tcl_CreateThreadExitHandler, /* 288 */ - Tcl_DeleteThreadExitHandler, /* 289 */ - Tcl_DiscardResult, /* 290 */ - Tcl_EvalEx, /* 291 */ - Tcl_EvalObjv, /* 292 */ - Tcl_EvalObjEx, /* 293 */ - Tcl_ExitThread, /* 294 */ - Tcl_ExternalToUtf, /* 295 */ - Tcl_ExternalToUtfDString, /* 296 */ - Tcl_FinalizeThread, /* 297 */ - Tcl_FinalizeNotifier, /* 298 */ - Tcl_FreeEncoding, /* 299 */ - Tcl_GetCurrentThread, /* 300 */ - Tcl_GetEncoding, /* 301 */ - Tcl_GetEncodingName, /* 302 */ - Tcl_GetEncodingNames, /* 303 */ - Tcl_GetIndexFromObjStruct, /* 304 */ - Tcl_GetThreadData, /* 305 */ - Tcl_GetVar2Ex, /* 306 */ - Tcl_InitNotifier, /* 307 */ - Tcl_MutexLock, /* 308 */ - Tcl_MutexUnlock, /* 309 */ - Tcl_ConditionNotify, /* 310 */ - Tcl_ConditionWait, /* 311 */ - Tcl_NumUtfChars, /* 312 */ - Tcl_ReadChars, /* 313 */ - Tcl_RestoreResult, /* 314 */ - Tcl_SaveResult, /* 315 */ - Tcl_SetSystemEncoding, /* 316 */ - Tcl_SetVar2Ex, /* 317 */ - Tcl_ThreadAlert, /* 318 */ - Tcl_ThreadQueueEvent, /* 319 */ - Tcl_UniCharAtIndex, /* 320 */ - Tcl_UniCharToLower, /* 321 */ - Tcl_UniCharToTitle, /* 322 */ - Tcl_UniCharToUpper, /* 323 */ - Tcl_UniCharToUtf, /* 324 */ - Tcl_UtfAtIndex, /* 325 */ - Tcl_UtfCharComplete, /* 326 */ - Tcl_UtfBackslash, /* 327 */ - Tcl_UtfFindFirst, /* 328 */ - Tcl_UtfFindLast, /* 329 */ - Tcl_UtfNext, /* 330 */ - Tcl_UtfPrev, /* 331 */ - Tcl_UtfToExternal, /* 332 */ - Tcl_UtfToExternalDString, /* 333 */ - Tcl_UtfToLower, /* 334 */ - Tcl_UtfToTitle, /* 335 */ - Tcl_UtfToUniChar, /* 336 */ - Tcl_UtfToUpper, /* 337 */ - Tcl_WriteChars, /* 338 */ - Tcl_WriteObj, /* 339 */ - Tcl_GetString, /* 340 */ - Tcl_GetDefaultEncodingDir, /* 341 */ - Tcl_SetDefaultEncodingDir, /* 342 */ - Tcl_AlertNotifier, /* 343 */ - Tcl_ServiceModeHook, /* 344 */ - Tcl_UniCharIsAlnum, /* 345 */ - Tcl_UniCharIsAlpha, /* 346 */ - Tcl_UniCharIsDigit, /* 347 */ - Tcl_UniCharIsLower, /* 348 */ - Tcl_UniCharIsSpace, /* 349 */ - Tcl_UniCharIsUpper, /* 350 */ - Tcl_UniCharIsWordChar, /* 351 */ - Tcl_UniCharLen, /* 352 */ - Tcl_UniCharNcmp, /* 353 */ - Tcl_UniCharToUtfDString, /* 354 */ - Tcl_UtfToUniCharDString, /* 355 */ - Tcl_GetRegExpFromObj, /* 356 */ - Tcl_EvalTokens, /* 357 */ - Tcl_FreeParse, /* 358 */ - Tcl_LogCommandInfo, /* 359 */ - Tcl_ParseBraces, /* 360 */ - Tcl_ParseCommand, /* 361 */ - Tcl_ParseExpr, /* 362 */ - Tcl_ParseQuotedString, /* 363 */ - Tcl_ParseVarName, /* 364 */ - Tcl_GetCwd, /* 365 */ - Tcl_Chdir, /* 366 */ - Tcl_Access, /* 367 */ - Tcl_Stat, /* 368 */ - Tcl_UtfNcmp, /* 369 */ - Tcl_UtfNcasecmp, /* 370 */ - Tcl_StringCaseMatch, /* 371 */ - Tcl_UniCharIsControl, /* 372 */ - Tcl_UniCharIsGraph, /* 373 */ - Tcl_UniCharIsPrint, /* 374 */ - Tcl_UniCharIsPunct, /* 375 */ - Tcl_RegExpExecObj, /* 376 */ - Tcl_RegExpGetInfo, /* 377 */ - Tcl_NewUnicodeObj, /* 378 */ - Tcl_SetUnicodeObj, /* 379 */ - Tcl_GetCharLength, /* 380 */ - Tcl_GetUniChar, /* 381 */ - Tcl_GetUnicode, /* 382 */ - Tcl_GetRange, /* 383 */ - Tcl_AppendUnicodeToObj, /* 384 */ - Tcl_RegExpMatchObj, /* 385 */ - Tcl_SetNotifier, /* 386 */ - Tcl_GetAllocMutex, /* 387 */ - Tcl_GetChannelNames, /* 388 */ - Tcl_GetChannelNamesEx, /* 389 */ - Tcl_ProcObjCmd, /* 390 */ - Tcl_ConditionFinalize, /* 391 */ - Tcl_MutexFinalize, /* 392 */ - Tcl_CreateThread, /* 393 */ - Tcl_ReadRaw, /* 394 */ - Tcl_WriteRaw, /* 395 */ - Tcl_GetTopChannel, /* 396 */ - Tcl_ChannelBuffered, /* 397 */ - Tcl_ChannelName, /* 398 */ - Tcl_ChannelVersion, /* 399 */ - Tcl_ChannelBlockModeProc, /* 400 */ - Tcl_ChannelCloseProc, /* 401 */ - Tcl_ChannelClose2Proc, /* 402 */ - Tcl_ChannelInputProc, /* 403 */ - Tcl_ChannelOutputProc, /* 404 */ - Tcl_ChannelSeekProc, /* 405 */ - Tcl_ChannelSetOptionProc, /* 406 */ - Tcl_ChannelGetOptionProc, /* 407 */ - Tcl_ChannelWatchProc, /* 408 */ - Tcl_ChannelGetHandleProc, /* 409 */ - Tcl_ChannelFlushProc, /* 410 */ - Tcl_ChannelHandlerProc, /* 411 */ - Tcl_JoinThread, /* 412 */ - Tcl_IsChannelShared, /* 413 */ - Tcl_IsChannelRegistered, /* 414 */ - Tcl_CutChannel, /* 415 */ - Tcl_SpliceChannel, /* 416 */ - Tcl_ClearChannelHandlers, /* 417 */ - Tcl_IsChannelExisting, /* 418 */ - Tcl_UniCharNcasecmp, /* 419 */ - Tcl_UniCharCaseMatch, /* 420 */ - Tcl_FindHashEntry, /* 421 */ - Tcl_CreateHashEntry, /* 422 */ - Tcl_InitCustomHashTable, /* 423 */ - Tcl_InitObjHashTable, /* 424 */ - Tcl_CommandTraceInfo, /* 425 */ - Tcl_TraceCommand, /* 426 */ - Tcl_UntraceCommand, /* 427 */ - Tcl_AttemptAlloc, /* 428 */ - Tcl_AttemptDbCkalloc, /* 429 */ - Tcl_AttemptRealloc, /* 430 */ - Tcl_AttemptDbCkrealloc, /* 431 */ - Tcl_AttemptSetObjLength, /* 432 */ - Tcl_GetChannelThread, /* 433 */ - Tcl_GetUnicodeFromObj, /* 434 */ - Tcl_GetMathFuncInfo, /* 435 */ - Tcl_ListMathFuncs, /* 436 */ - Tcl_SubstObj, /* 437 */ - Tcl_DetachChannel, /* 438 */ - Tcl_IsStandardChannel, /* 439 */ - Tcl_FSCopyFile, /* 440 */ - Tcl_FSCopyDirectory, /* 441 */ - Tcl_FSCreateDirectory, /* 442 */ - Tcl_FSDeleteFile, /* 443 */ - Tcl_FSLoadFile, /* 444 */ - Tcl_FSMatchInDirectory, /* 445 */ - Tcl_FSLink, /* 446 */ - Tcl_FSRemoveDirectory, /* 447 */ - Tcl_FSRenameFile, /* 448 */ - Tcl_FSLstat, /* 449 */ - Tcl_FSUtime, /* 450 */ - Tcl_FSFileAttrsGet, /* 451 */ - Tcl_FSFileAttrsSet, /* 452 */ - Tcl_FSFileAttrStrings, /* 453 */ - Tcl_FSStat, /* 454 */ - Tcl_FSAccess, /* 455 */ - Tcl_FSOpenFileChannel, /* 456 */ - Tcl_FSGetCwd, /* 457 */ - Tcl_FSChdir, /* 458 */ - Tcl_FSConvertToPathType, /* 459 */ - Tcl_FSJoinPath, /* 460 */ - Tcl_FSSplitPath, /* 461 */ - Tcl_FSEqualPaths, /* 462 */ - Tcl_FSGetNormalizedPath, /* 463 */ - Tcl_FSJoinToPath, /* 464 */ - Tcl_FSGetInternalRep, /* 465 */ - Tcl_FSGetTranslatedPath, /* 466 */ - Tcl_FSEvalFile, /* 467 */ - Tcl_FSNewNativePath, /* 468 */ - Tcl_FSGetNativePath, /* 469 */ - Tcl_FSFileSystemInfo, /* 470 */ - Tcl_FSPathSeparator, /* 471 */ - Tcl_FSListVolumes, /* 472 */ - Tcl_FSRegister, /* 473 */ - Tcl_FSUnregister, /* 474 */ - Tcl_FSData, /* 475 */ - Tcl_FSGetTranslatedStringPath, /* 476 */ - Tcl_FSGetFileSystemForPath, /* 477 */ - Tcl_FSGetPathType, /* 478 */ - Tcl_OutputBuffered, /* 479 */ - Tcl_FSMountsChanged, /* 480 */ - Tcl_EvalTokensStandard, /* 481 */ - Tcl_GetTime, /* 482 */ - Tcl_CreateObjTrace, /* 483 */ - Tcl_GetCommandInfoFromToken, /* 484 */ - Tcl_SetCommandInfoFromToken, /* 485 */ - Tcl_DbNewWideIntObj, /* 486 */ - Tcl_GetWideIntFromObj, /* 487 */ - Tcl_NewWideIntObj, /* 488 */ - Tcl_SetWideIntObj, /* 489 */ - Tcl_AllocStatBuf, /* 490 */ - Tcl_Seek, /* 491 */ - Tcl_Tell, /* 492 */ - Tcl_ChannelWideSeekProc, /* 493 */ - Tcl_DictObjPut, /* 494 */ - Tcl_DictObjGet, /* 495 */ - Tcl_DictObjRemove, /* 496 */ - Tcl_DictObjSize, /* 497 */ - Tcl_DictObjFirst, /* 498 */ - Tcl_DictObjNext, /* 499 */ - Tcl_DictObjDone, /* 500 */ - Tcl_DictObjPutKeyList, /* 501 */ - Tcl_DictObjRemoveKeyList, /* 502 */ - Tcl_NewDictObj, /* 503 */ - Tcl_DbNewDictObj, /* 504 */ - Tcl_RegisterConfig, /* 505 */ - Tcl_CreateNamespace, /* 506 */ - Tcl_DeleteNamespace, /* 507 */ - Tcl_AppendExportList, /* 508 */ - Tcl_Export, /* 509 */ - Tcl_Import, /* 510 */ - Tcl_ForgetImport, /* 511 */ - Tcl_GetCurrentNamespace, /* 512 */ - Tcl_GetGlobalNamespace, /* 513 */ - Tcl_FindNamespace, /* 514 */ - Tcl_FindCommand, /* 515 */ - Tcl_GetCommandFromObj, /* 516 */ - Tcl_GetCommandFullName, /* 517 */ - Tcl_FSEvalFileEx, /* 518 */ - Tcl_SetExitProc, /* 519 */ - Tcl_LimitAddHandler, /* 520 */ - Tcl_LimitRemoveHandler, /* 521 */ - Tcl_LimitReady, /* 522 */ - Tcl_LimitCheck, /* 523 */ - Tcl_LimitExceeded, /* 524 */ - Tcl_LimitSetCommands, /* 525 */ - Tcl_LimitSetTime, /* 526 */ - Tcl_LimitSetGranularity, /* 527 */ - Tcl_LimitTypeEnabled, /* 528 */ - Tcl_LimitTypeExceeded, /* 529 */ - Tcl_LimitTypeSet, /* 530 */ - Tcl_LimitTypeReset, /* 531 */ - Tcl_LimitGetCommands, /* 532 */ - Tcl_LimitGetTime, /* 533 */ - Tcl_LimitGetGranularity, /* 534 */ - Tcl_SaveInterpState, /* 535 */ - Tcl_RestoreInterpState, /* 536 */ - Tcl_DiscardInterpState, /* 537 */ - Tcl_SetReturnOptions, /* 538 */ - Tcl_GetReturnOptions, /* 539 */ - Tcl_IsEnsemble, /* 540 */ - Tcl_CreateEnsemble, /* 541 */ - Tcl_FindEnsemble, /* 542 */ - Tcl_SetEnsembleSubcommandList, /* 543 */ - Tcl_SetEnsembleMappingDict, /* 544 */ - Tcl_SetEnsembleUnknownHandler, /* 545 */ - Tcl_SetEnsembleFlags, /* 546 */ - Tcl_GetEnsembleSubcommandList, /* 547 */ - Tcl_GetEnsembleMappingDict, /* 548 */ - Tcl_GetEnsembleUnknownHandler, /* 549 */ - Tcl_GetEnsembleFlags, /* 550 */ - Tcl_GetEnsembleNamespace, /* 551 */ - Tcl_SetTimeProc, /* 552 */ - Tcl_QueryTimeProc, /* 553 */ - Tcl_ChannelThreadActionProc, /* 554 */ - Tcl_NewBignumObj, /* 555 */ - Tcl_DbNewBignumObj, /* 556 */ - Tcl_SetBignumObj, /* 557 */ - Tcl_GetBignumFromObj, /* 558 */ - Tcl_TakeBignumFromObj, /* 559 */ - Tcl_TruncateChannel, /* 560 */ - Tcl_ChannelTruncateProc, /* 561 */ - Tcl_SetChannelErrorInterp, /* 562 */ - Tcl_GetChannelErrorInterp, /* 563 */ - Tcl_SetChannelError, /* 564 */ - Tcl_GetChannelError, /* 565 */ - Tcl_InitBignumFromDouble, /* 566 */ - Tcl_GetNamespaceUnknownHandler, /* 567 */ - Tcl_SetNamespaceUnknownHandler, /* 568 */ - Tcl_GetEncodingFromObj, /* 569 */ - Tcl_GetEncodingSearchPath, /* 570 */ - Tcl_SetEncodingSearchPath, /* 571 */ - Tcl_GetEncodingNameFromEnvironment, /* 572 */ - Tcl_PkgRequireProc, /* 573 */ - Tcl_AppendObjToErrorInfo, /* 574 */ - Tcl_AppendLimitedToObj, /* 575 */ - Tcl_Format, /* 576 */ - Tcl_AppendFormatToObj, /* 577 */ - Tcl_ObjPrintf, /* 578 */ - Tcl_AppendPrintfToObj, /* 579 */ - Tcl_CancelEval, /* 580 */ - Tcl_Canceled, /* 581 */ - Tcl_CreatePipe, /* 582 */ - Tcl_NRCreateCommand, /* 583 */ - Tcl_NREvalObj, /* 584 */ - Tcl_NREvalObjv, /* 585 */ - Tcl_NRCmdSwap, /* 586 */ - Tcl_NRAddCallback, /* 587 */ - Tcl_NRCallObjProc, /* 588 */ - Tcl_GetFSDeviceFromStat, /* 589 */ - Tcl_GetFSInodeFromStat, /* 590 */ - Tcl_GetModeFromStat, /* 591 */ - Tcl_GetLinkCountFromStat, /* 592 */ - Tcl_GetUserIdFromStat, /* 593 */ - Tcl_GetGroupIdFromStat, /* 594 */ - Tcl_GetDeviceTypeFromStat, /* 595 */ - Tcl_GetAccessTimeFromStat, /* 596 */ - Tcl_GetModificationTimeFromStat, /* 597 */ - Tcl_GetChangeTimeFromStat, /* 598 */ - Tcl_GetSizeFromStat, /* 599 */ - Tcl_GetBlocksFromStat, /* 600 */ - Tcl_GetBlockSizeFromStat, /* 601 */ - Tcl_SetEnsembleParameterList, /* 602 */ - Tcl_GetEnsembleParameterList, /* 603 */ - Tcl_ParseArgsObjv, /* 604 */ - Tcl_GetErrorLine, /* 605 */ - Tcl_SetErrorLine, /* 606 */ - Tcl_TransferResult, /* 607 */ - Tcl_InterpActive, /* 608 */ - Tcl_BackgroundException, /* 609 */ - Tcl_ZlibDeflate, /* 610 */ - Tcl_ZlibInflate, /* 611 */ - Tcl_ZlibCRC32, /* 612 */ - Tcl_ZlibAdler32, /* 613 */ - Tcl_ZlibStreamInit, /* 614 */ - Tcl_ZlibStreamGetCommandName, /* 615 */ - Tcl_ZlibStreamEof, /* 616 */ - Tcl_ZlibStreamAdler32, /* 617 */ - Tcl_ZlibStreamPut, /* 618 */ - Tcl_ZlibStreamGet, /* 619 */ - Tcl_ZlibStreamClose, /* 620 */ - Tcl_ZlibStreamReset, /* 621 */ - Tcl_SetStartupScript, /* 622 */ - Tcl_GetStartupScript, /* 623 */ - Tcl_CloseEx, /* 624 */ -}; - -/* !END!: Do not edit above this line. */ - -/* - * Module-scope pointers to the main static stubs tables, used for package - * initialization via Tcl_PkgProvideEx(). - */ - -MODULE_SCOPE const TclStubs * const tclConstStubsPtr; -MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; - -const TclStubs * const tclConstStubsPtr = &tclStubs; -const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; +/* + * tclStubInit.c -- + * + * This file contains the initializers for the Tcl stub vectors. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclStubInit.c,v 1.177 2008/12/18 04:38:01 dgp Exp $ + */ + +#include "tclInt.h" +#include "tommath.h" + +/* + * Remove macros that will interfere with the definitions below. + */ + +#undef Tcl_Alloc +#undef Tcl_Free +#undef Tcl_Realloc +#undef Tcl_NewBooleanObj +#undef Tcl_NewByteArrayObj +#undef Tcl_NewDoubleObj +#undef Tcl_NewIntObj +#undef Tcl_NewListObj +#undef Tcl_NewLongObj +#undef Tcl_NewObj +#undef Tcl_NewStringObj +#undef Tcl_DumpActiveMemory +#undef Tcl_ValidateAllMemory +#undef Tcl_FindHashEntry +#undef Tcl_CreateHashEntry + +/* + * WARNING: The contents of this file is automatically generated by the + * tools/genStubs.tcl script. Any modifications to the function declarations + * below should be made in the generic/tcl.decls script. + */ + +/* !BEGIN!: Do not edit below this line. */ + +static const TclIntStubs tclIntStubs = { + TCL_STUB_MAGIC, + NULL, + NULL, /* 0 */ + NULL, /* 1 */ + NULL, /* 2 */ + TclAllocateFreeObjects, /* 3 */ + NULL, /* 4 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCleanupChildren, /* 5 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCleanupChildren, /* 5 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCleanupChildren, /* 5 */ +#endif /* MACOSX */ + TclCleanupCommand, /* 6 */ + TclCopyAndCollapse, /* 7 */ + TclCopyChannel, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclCreatePipeline, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclCreatePipeline, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclCreatePipeline, /* 9 */ +#endif /* MACOSX */ + TclCreateProc, /* 10 */ + TclDeleteCompiledLocalVars, /* 11 */ + TclDeleteVars, /* 12 */ + NULL, /* 13 */ + TclDumpMemoryInfo, /* 14 */ + NULL, /* 15 */ + TclExprFloatError, /* 16 */ + NULL, /* 17 */ + NULL, /* 18 */ + NULL, /* 19 */ + NULL, /* 20 */ + NULL, /* 21 */ + TclFindElement, /* 22 */ + TclFindProc, /* 23 */ + NULL, /* 24 */ + TclFreePackageInfo, /* 25 */ + NULL, /* 26 */ + NULL, /* 27 */ + TclpGetDefaultStdChannel, /* 28 */ + NULL, /* 29 */ + NULL, /* 30 */ + TclGetExtension, /* 31 */ + TclGetFrame, /* 32 */ + NULL, /* 33 */ + TclGetIntForIndex, /* 34 */ + NULL, /* 35 */ + NULL, /* 36 */ + TclGetLoadedPackages, /* 37 */ + TclGetNamespaceForQualName, /* 38 */ + TclGetObjInterpProc, /* 39 */ + TclGetOpenMode, /* 40 */ + TclGetOriginalCommand, /* 41 */ + TclpGetUserHome, /* 42 */ + NULL, /* 43 */ + TclGuessPackageName, /* 44 */ + TclHideUnsafeCommands, /* 45 */ + TclInExit, /* 46 */ + NULL, /* 47 */ + NULL, /* 48 */ + NULL, /* 49 */ + TclInitCompiledLocals, /* 50 */ + TclInterpInit, /* 51 */ + NULL, /* 52 */ + TclInvokeObjectCommand, /* 53 */ + TclInvokeStringCommand, /* 54 */ + TclIsProc, /* 55 */ + NULL, /* 56 */ + NULL, /* 57 */ + TclLookupVar, /* 58 */ + NULL, /* 59 */ + TclNeedSpace, /* 60 */ + TclNewProcBodyObj, /* 61 */ + TclObjCommandComplete, /* 62 */ + TclObjInterpProc, /* 63 */ + TclObjInvoke, /* 64 */ + NULL, /* 65 */ + NULL, /* 66 */ + NULL, /* 67 */ + NULL, /* 68 */ + TclpAlloc, /* 69 */ + NULL, /* 70 */ + NULL, /* 71 */ + NULL, /* 72 */ + NULL, /* 73 */ + TclpFree, /* 74 */ + TclpGetClicks, /* 75 */ + TclpGetSeconds, /* 76 */ + TclpGetTime, /* 77 */ + TclpGetTimeZone, /* 78 */ + NULL, /* 79 */ + NULL, /* 80 */ + TclpRealloc, /* 81 */ + NULL, /* 82 */ + NULL, /* 83 */ + NULL, /* 84 */ + NULL, /* 85 */ + NULL, /* 86 */ + NULL, /* 87 */ + TclPrecTraceProc, /* 88 */ + TclPreventAliasLoop, /* 89 */ + NULL, /* 90 */ + TclProcCleanupProc, /* 91 */ + TclProcCompileProc, /* 92 */ + TclProcDeleteProc, /* 93 */ + NULL, /* 94 */ + NULL, /* 95 */ + TclRenameCommand, /* 96 */ + TclResetShadowedCmdRefs, /* 97 */ + TclServiceIdle, /* 98 */ + NULL, /* 99 */ + NULL, /* 100 */ + TclSetPreInitScript, /* 101 */ + TclSetupEnv, /* 102 */ + TclSockGetPort, /* 103 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclSockMinimumBuffers, /* 104 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclSockMinimumBuffers, /* 104 */ +#endif /* MACOSX */ + NULL, /* 105 */ + NULL, /* 106 */ + NULL, /* 107 */ + TclTeardownNamespace, /* 108 */ + TclUpdateReturnInfo, /* 109 */ + NULL, /* 110 */ + Tcl_AddInterpResolvers, /* 111 */ + Tcl_AppendExportList, /* 112 */ + Tcl_CreateNamespace, /* 113 */ + Tcl_DeleteNamespace, /* 114 */ + Tcl_Export, /* 115 */ + Tcl_FindCommand, /* 116 */ + Tcl_FindNamespace, /* 117 */ + Tcl_GetInterpResolvers, /* 118 */ + Tcl_GetNamespaceResolvers, /* 119 */ + Tcl_FindNamespaceVar, /* 120 */ + Tcl_ForgetImport, /* 121 */ + Tcl_GetCommandFromObj, /* 122 */ + Tcl_GetCommandFullName, /* 123 */ + Tcl_GetCurrentNamespace, /* 124 */ + Tcl_GetGlobalNamespace, /* 125 */ + Tcl_GetVariableFullName, /* 126 */ + Tcl_Import, /* 127 */ + Tcl_PopCallFrame, /* 128 */ + Tcl_PushCallFrame, /* 129 */ + Tcl_RemoveInterpResolvers, /* 130 */ + Tcl_SetNamespaceResolvers, /* 131 */ + TclpHasSockets, /* 132 */ + TclpGetDate, /* 133 */ + NULL, /* 134 */ + NULL, /* 135 */ + NULL, /* 136 */ + NULL, /* 137 */ + TclGetEnv, /* 138 */ + NULL, /* 139 */ + NULL, /* 140 */ + TclpGetCwd, /* 141 */ + TclSetByteCodeFromAny, /* 142 */ + TclAddLiteralObj, /* 143 */ + TclHideLiteral, /* 144 */ + TclGetAuxDataType, /* 145 */ + TclHandleCreate, /* 146 */ + TclHandleFree, /* 147 */ + TclHandlePreserve, /* 148 */ + TclHandleRelease, /* 149 */ + TclRegAbout, /* 150 */ + TclRegExpRangeUniChar, /* 151 */ + TclSetLibraryPath, /* 152 */ + TclGetLibraryPath, /* 153 */ + NULL, /* 154 */ + NULL, /* 155 */ + TclRegError, /* 156 */ + TclVarTraceExists, /* 157 */ + NULL, /* 158 */ + NULL, /* 159 */ + NULL, /* 160 */ + TclChannelTransform, /* 161 */ + TclChannelEventScriptInvoker, /* 162 */ + TclGetInstructionTable, /* 163 */ + TclExpandCodeArray, /* 164 */ + TclpSetInitialEncodings, /* 165 */ + TclListObjSetElement, /* 166 */ + NULL, /* 167 */ + NULL, /* 168 */ + TclpUtfNcmp2, /* 169 */ + TclCheckInterpTraces, /* 170 */ + TclCheckExecutionTraces, /* 171 */ + TclInThreadExit, /* 172 */ + TclUniCharMatch, /* 173 */ + NULL, /* 174 */ + TclCallVarTraces, /* 175 */ + TclCleanupVar, /* 176 */ + TclVarErrMsg, /* 177 */ + NULL, /* 178 */ + NULL, /* 179 */ + NULL, /* 180 */ + NULL, /* 181 */ + TclpLocaltime, /* 182 */ + TclpGmtime, /* 183 */ + NULL, /* 184 */ + NULL, /* 185 */ + NULL, /* 186 */ + NULL, /* 187 */ + NULL, /* 188 */ + NULL, /* 189 */ + NULL, /* 190 */ + NULL, /* 191 */ + NULL, /* 192 */ + NULL, /* 193 */ + NULL, /* 194 */ + NULL, /* 195 */ + NULL, /* 196 */ + NULL, /* 197 */ + TclObjGetFrame, /* 198 */ + NULL, /* 199 */ + TclpObjRemoveDirectory, /* 200 */ + TclpObjCopyDirectory, /* 201 */ + TclpObjCreateDirectory, /* 202 */ + TclpObjDeleteFile, /* 203 */ + TclpObjCopyFile, /* 204 */ + TclpObjRenameFile, /* 205 */ + TclpObjStat, /* 206 */ + TclpObjAccess, /* 207 */ + TclpOpenFileChannel, /* 208 */ + NULL, /* 209 */ + NULL, /* 210 */ + NULL, /* 211 */ + TclpFindExecutable, /* 212 */ + TclGetObjNameOfExecutable, /* 213 */ + TclSetObjNameOfExecutable, /* 214 */ + TclStackAlloc, /* 215 */ + TclStackFree, /* 216 */ + TclPushStackFrame, /* 217 */ + TclPopStackFrame, /* 218 */ + NULL, /* 219 */ + NULL, /* 220 */ + NULL, /* 221 */ + NULL, /* 222 */ + NULL, /* 223 */ + TclGetPlatform, /* 224 */ + TclTraceDictPath, /* 225 */ + TclObjBeingDeleted, /* 226 */ + TclSetNsPath, /* 227 */ + NULL, /* 228 */ + TclPtrMakeUpvar, /* 229 */ + TclObjLookupVar, /* 230 */ + TclGetNamespaceFromObj, /* 231 */ + TclEvalObjEx, /* 232 */ + TclGetSrcInfoForPc, /* 233 */ + TclVarHashCreateVar, /* 234 */ + TclInitVarHashTable, /* 235 */ + Tcl_BackgroundException, /* 236 */ + TclResetCancellation, /* 237 */ + TclNRInterpProc, /* 238 */ + TclNRInterpProcCore, /* 239 */ + TclNRRunCallbacks, /* 240 */ + TclNREvalObjEx, /* 241 */ + TclNREvalObjv, /* 242 */ +}; + +static const TclIntPlatStubs tclIntPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ + TclWinGetServByName, /* 2 */ + TclWinGetSockOpt, /* 3 */ + TclWinGetTclInstance, /* 4 */ + NULL, /* 5 */ + TclWinNToHS, /* 6 */ + TclWinSetSockOpt, /* 7 */ + TclpGetPid, /* 8 */ + TclWinGetPlatformId, /* 9 */ + NULL, /* 10 */ + TclGetAndDetachPids, /* 11 */ + TclpCloseFile, /* 12 */ + TclpCreateCommandChannel, /* 13 */ + TclpCreatePipe, /* 14 */ + TclpCreateProcess, /* 15 */ + NULL, /* 16 */ + NULL, /* 17 */ + TclpMakeFile, /* 18 */ + TclpOpenFile, /* 19 */ + TclWinAddProcess, /* 20 */ + NULL, /* 21 */ + TclpCreateTempFile, /* 22 */ + TclpGetTZName, /* 23 */ + TclWinNoBackslash, /* 24 */ + NULL, /* 25 */ + TclWinSetInterfaces, /* 26 */ + TclWinFlushDirtyChannels, /* 27 */ + TclWinResetInterfaces, /* 28 */ + TclWinCPUID, /* 29 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ + TclpReaddir, /* 10 */ + TclpLocaltime_unix, /* 11 */ + TclpGmtime_unix, /* 12 */ + TclpInetNtoa, /* 13 */ + TclUnixCopyFile, /* 14 */ + TclMacOSXGetFileAttribute, /* 15 */ + TclMacOSXSetFileAttribute, /* 16 */ + TclMacOSXCopyFileAttributes, /* 17 */ + TclMacOSXMatchType, /* 18 */ +#endif /* MACOSX */ +}; + +static const TclPlatStubs tclPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#ifdef __WIN32__ /* WIN */ + Tcl_WinUtfToTChar, /* 0 */ + Tcl_WinTCharToUtf, /* 1 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_MacOSXOpenBundleResources, /* 0 */ + Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ +#endif /* MACOSX */ +}; + +static const TclTomMathStubs tclTomMathStubs = { + TCL_STUB_MAGIC, + NULL, + TclBN_epoch, /* 0 */ + TclBN_revision, /* 1 */ + TclBN_mp_add, /* 2 */ + TclBN_mp_add_d, /* 3 */ + TclBN_mp_and, /* 4 */ + TclBN_mp_clamp, /* 5 */ + TclBN_mp_clear, /* 6 */ + TclBN_mp_clear_multi, /* 7 */ + TclBN_mp_cmp, /* 8 */ + TclBN_mp_cmp_d, /* 9 */ + TclBN_mp_cmp_mag, /* 10 */ + TclBN_mp_copy, /* 11 */ + TclBN_mp_count_bits, /* 12 */ + TclBN_mp_div, /* 13 */ + TclBN_mp_div_d, /* 14 */ + TclBN_mp_div_2, /* 15 */ + TclBN_mp_div_2d, /* 16 */ + TclBN_mp_div_3, /* 17 */ + TclBN_mp_exch, /* 18 */ + TclBN_mp_expt_d, /* 19 */ + TclBN_mp_grow, /* 20 */ + TclBN_mp_init, /* 21 */ + TclBN_mp_init_copy, /* 22 */ + TclBN_mp_init_multi, /* 23 */ + TclBN_mp_init_set, /* 24 */ + TclBN_mp_init_size, /* 25 */ + TclBN_mp_lshd, /* 26 */ + TclBN_mp_mod, /* 27 */ + TclBN_mp_mod_2d, /* 28 */ + TclBN_mp_mul, /* 29 */ + TclBN_mp_mul_d, /* 30 */ + TclBN_mp_mul_2, /* 31 */ + TclBN_mp_mul_2d, /* 32 */ + TclBN_mp_neg, /* 33 */ + TclBN_mp_or, /* 34 */ + TclBN_mp_radix_size, /* 35 */ + TclBN_mp_read_radix, /* 36 */ + TclBN_mp_rshd, /* 37 */ + TclBN_mp_shrink, /* 38 */ + TclBN_mp_set, /* 39 */ + TclBN_mp_sqr, /* 40 */ + TclBN_mp_sqrt, /* 41 */ + TclBN_mp_sub, /* 42 */ + TclBN_mp_sub_d, /* 43 */ + TclBN_mp_to_unsigned_bin, /* 44 */ + TclBN_mp_to_unsigned_bin_n, /* 45 */ + TclBN_mp_toradix_n, /* 46 */ + TclBN_mp_unsigned_bin_size, /* 47 */ + TclBN_mp_xor, /* 48 */ + TclBN_mp_zero, /* 49 */ + TclBN_reverse, /* 50 */ + TclBN_fast_s_mp_mul_digs, /* 51 */ + TclBN_fast_s_mp_sqr, /* 52 */ + TclBN_mp_karatsuba_mul, /* 53 */ + TclBN_mp_karatsuba_sqr, /* 54 */ + TclBN_mp_toom_mul, /* 55 */ + TclBN_mp_toom_sqr, /* 56 */ + TclBN_s_mp_add, /* 57 */ + TclBN_s_mp_mul_digs, /* 58 */ + TclBN_s_mp_sqr, /* 59 */ + TclBN_s_mp_sub, /* 60 */ +}; + +static const TclStubHooks tclStubHooks = { + &tclPlatStubs, + &tclIntStubs, + &tclIntPlatStubs +}; + +static const TclStubs tclStubs = { + TCL_STUB_MAGIC, + &tclStubHooks, + Tcl_PkgProvideEx, /* 0 */ + Tcl_PkgRequireEx, /* 1 */ + Tcl_Panic, /* 2 */ + Tcl_Alloc, /* 3 */ + Tcl_Free, /* 4 */ + Tcl_Realloc, /* 5 */ + Tcl_DbCkalloc, /* 6 */ + Tcl_DbCkfree, /* 7 */ + Tcl_DbCkrealloc, /* 8 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 9 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_CreateFileHandler, /* 9 */ +#endif /* MACOSX */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 10 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DeleteFileHandler, /* 10 */ +#endif /* MACOSX */ + Tcl_SetTimer, /* 11 */ + Tcl_Sleep, /* 12 */ + Tcl_WaitForEvent, /* 13 */ + Tcl_AppendAllObjTypes, /* 14 */ + Tcl_AppendStringsToObj, /* 15 */ + Tcl_AppendToObj, /* 16 */ + Tcl_ConcatObj, /* 17 */ + Tcl_ConvertToType, /* 18 */ + Tcl_DbDecrRefCount, /* 19 */ + Tcl_DbIncrRefCount, /* 20 */ + Tcl_DbIsShared, /* 21 */ + Tcl_DbNewBooleanObj, /* 22 */ + Tcl_DbNewByteArrayObj, /* 23 */ + Tcl_DbNewDoubleObj, /* 24 */ + Tcl_DbNewListObj, /* 25 */ + Tcl_DbNewLongObj, /* 26 */ + Tcl_DbNewObj, /* 27 */ + Tcl_DbNewStringObj, /* 28 */ + Tcl_DuplicateObj, /* 29 */ + TclFreeObj, /* 30 */ + Tcl_GetBoolean, /* 31 */ + Tcl_GetBooleanFromObj, /* 32 */ + Tcl_GetByteArrayFromObj, /* 33 */ + Tcl_GetDouble, /* 34 */ + Tcl_GetDoubleFromObj, /* 35 */ + Tcl_GetIndexFromObj, /* 36 */ + Tcl_GetInt, /* 37 */ + Tcl_GetIntFromObj, /* 38 */ + Tcl_GetLongFromObj, /* 39 */ + Tcl_GetObjType, /* 40 */ + Tcl_GetStringFromObj, /* 41 */ + Tcl_InvalidateStringRep, /* 42 */ + Tcl_ListObjAppendList, /* 43 */ + Tcl_ListObjAppendElement, /* 44 */ + Tcl_ListObjGetElements, /* 45 */ + Tcl_ListObjIndex, /* 46 */ + Tcl_ListObjLength, /* 47 */ + Tcl_ListObjReplace, /* 48 */ + Tcl_NewBooleanObj, /* 49 */ + Tcl_NewByteArrayObj, /* 50 */ + Tcl_NewDoubleObj, /* 51 */ + Tcl_NewIntObj, /* 52 */ + Tcl_NewListObj, /* 53 */ + Tcl_NewLongObj, /* 54 */ + Tcl_NewObj, /* 55 */ + Tcl_NewStringObj, /* 56 */ + Tcl_SetBooleanObj, /* 57 */ + Tcl_SetByteArrayLength, /* 58 */ + Tcl_SetByteArrayObj, /* 59 */ + Tcl_SetDoubleObj, /* 60 */ + Tcl_SetIntObj, /* 61 */ + Tcl_SetListObj, /* 62 */ + Tcl_SetLongObj, /* 63 */ + Tcl_SetObjLength, /* 64 */ + Tcl_SetStringObj, /* 65 */ + Tcl_AddErrorInfo, /* 66 */ + Tcl_AddObjErrorInfo, /* 67 */ + Tcl_AllowExceptions, /* 68 */ + Tcl_AppendElement, /* 69 */ + Tcl_AppendResult, /* 70 */ + Tcl_AsyncCreate, /* 71 */ + Tcl_AsyncDelete, /* 72 */ + Tcl_AsyncInvoke, /* 73 */ + Tcl_AsyncMark, /* 74 */ + Tcl_AsyncReady, /* 75 */ + Tcl_BackgroundError, /* 76 */ + Tcl_Backslash, /* 77 */ + Tcl_BadChannelOption, /* 78 */ + Tcl_CallWhenDeleted, /* 79 */ + Tcl_CancelIdleCall, /* 80 */ + Tcl_Close, /* 81 */ + Tcl_CommandComplete, /* 82 */ + Tcl_Concat, /* 83 */ + Tcl_ConvertElement, /* 84 */ + Tcl_ConvertCountedElement, /* 85 */ + Tcl_CreateAlias, /* 86 */ + Tcl_CreateAliasObj, /* 87 */ + Tcl_CreateChannel, /* 88 */ + Tcl_CreateChannelHandler, /* 89 */ + Tcl_CreateCloseHandler, /* 90 */ + Tcl_CreateCommand, /* 91 */ + Tcl_CreateEventSource, /* 92 */ + Tcl_CreateExitHandler, /* 93 */ + Tcl_CreateInterp, /* 94 */ + Tcl_CreateMathFunc, /* 95 */ + Tcl_CreateObjCommand, /* 96 */ + Tcl_CreateSlave, /* 97 */ + Tcl_CreateTimerHandler, /* 98 */ + Tcl_CreateTrace, /* 99 */ + Tcl_DeleteAssocData, /* 100 */ + Tcl_DeleteChannelHandler, /* 101 */ + Tcl_DeleteCloseHandler, /* 102 */ + Tcl_DeleteCommand, /* 103 */ + Tcl_DeleteCommandFromToken, /* 104 */ + Tcl_DeleteEvents, /* 105 */ + Tcl_DeleteEventSource, /* 106 */ + Tcl_DeleteExitHandler, /* 107 */ + Tcl_DeleteHashEntry, /* 108 */ + Tcl_DeleteHashTable, /* 109 */ + Tcl_DeleteInterp, /* 110 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_DetachPids, /* 111 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_DetachPids, /* 111 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_DetachPids, /* 111 */ +#endif /* MACOSX */ + Tcl_DeleteTimerHandler, /* 112 */ + Tcl_DeleteTrace, /* 113 */ + Tcl_DontCallWhenDeleted, /* 114 */ + Tcl_DoOneEvent, /* 115 */ + Tcl_DoWhenIdle, /* 116 */ + Tcl_DStringAppend, /* 117 */ + Tcl_DStringAppendElement, /* 118 */ + Tcl_DStringEndSublist, /* 119 */ + Tcl_DStringFree, /* 120 */ + Tcl_DStringGetResult, /* 121 */ + Tcl_DStringInit, /* 122 */ + Tcl_DStringResult, /* 123 */ + Tcl_DStringSetLength, /* 124 */ + Tcl_DStringStartSublist, /* 125 */ + Tcl_Eof, /* 126 */ + Tcl_ErrnoId, /* 127 */ + Tcl_ErrnoMsg, /* 128 */ + Tcl_Eval, /* 129 */ + Tcl_EvalFile, /* 130 */ + Tcl_EvalObj, /* 131 */ + Tcl_EventuallyFree, /* 132 */ + Tcl_Exit, /* 133 */ + Tcl_ExposeCommand, /* 134 */ + Tcl_ExprBoolean, /* 135 */ + Tcl_ExprBooleanObj, /* 136 */ + Tcl_ExprDouble, /* 137 */ + Tcl_ExprDoubleObj, /* 138 */ + Tcl_ExprLong, /* 139 */ + Tcl_ExprLongObj, /* 140 */ + Tcl_ExprObj, /* 141 */ + Tcl_ExprString, /* 142 */ + Tcl_Finalize, /* 143 */ + Tcl_FindExecutable, /* 144 */ + Tcl_FirstHashEntry, /* 145 */ + Tcl_Flush, /* 146 */ + Tcl_FreeResult, /* 147 */ + Tcl_GetAlias, /* 148 */ + Tcl_GetAliasObj, /* 149 */ + Tcl_GetAssocData, /* 150 */ + Tcl_GetChannel, /* 151 */ + Tcl_GetChannelBufferSize, /* 152 */ + Tcl_GetChannelHandle, /* 153 */ + Tcl_GetChannelInstanceData, /* 154 */ + Tcl_GetChannelMode, /* 155 */ + Tcl_GetChannelName, /* 156 */ + Tcl_GetChannelOption, /* 157 */ + Tcl_GetChannelType, /* 158 */ + Tcl_GetCommandInfo, /* 159 */ + Tcl_GetCommandName, /* 160 */ + Tcl_GetErrno, /* 161 */ + Tcl_GetHostName, /* 162 */ + Tcl_GetInterpPath, /* 163 */ + Tcl_GetMaster, /* 164 */ + Tcl_GetNameOfExecutable, /* 165 */ + Tcl_GetObjResult, /* 166 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + NULL, /* 167 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_GetOpenFile, /* 167 */ +#endif /* MACOSX */ + Tcl_GetPathType, /* 168 */ + Tcl_Gets, /* 169 */ + Tcl_GetsObj, /* 170 */ + Tcl_GetServiceMode, /* 171 */ + Tcl_GetSlave, /* 172 */ + Tcl_GetStdChannel, /* 173 */ + Tcl_GetStringResult, /* 174 */ + Tcl_GetVar, /* 175 */ + Tcl_GetVar2, /* 176 */ + Tcl_GlobalEval, /* 177 */ + Tcl_GlobalEvalObj, /* 178 */ + Tcl_HideCommand, /* 179 */ + Tcl_Init, /* 180 */ + Tcl_InitHashTable, /* 181 */ + Tcl_InputBlocked, /* 182 */ + Tcl_InputBuffered, /* 183 */ + Tcl_InterpDeleted, /* 184 */ + Tcl_IsSafe, /* 185 */ + Tcl_JoinPath, /* 186 */ + Tcl_LinkVar, /* 187 */ + NULL, /* 188 */ + Tcl_MakeFileChannel, /* 189 */ + Tcl_MakeSafe, /* 190 */ + Tcl_MakeTcpClientChannel, /* 191 */ + Tcl_Merge, /* 192 */ + Tcl_NextHashEntry, /* 193 */ + Tcl_NotifyChannel, /* 194 */ + Tcl_ObjGetVar2, /* 195 */ + Tcl_ObjSetVar2, /* 196 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_OpenCommandChannel, /* 197 */ +#endif /* MACOSX */ + Tcl_OpenFileChannel, /* 198 */ + Tcl_OpenTcpClient, /* 199 */ + Tcl_OpenTcpServer, /* 200 */ + Tcl_Preserve, /* 201 */ + Tcl_PrintDouble, /* 202 */ + Tcl_PutEnv, /* 203 */ + Tcl_PosixError, /* 204 */ + Tcl_QueueEvent, /* 205 */ + Tcl_Read, /* 206 */ +#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* UNIX */ +#ifdef __WIN32__ /* WIN */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* WIN */ +#ifdef MAC_OSX_TCL /* MACOSX */ + Tcl_ReapDetachedProcs, /* 207 */ +#endif /* MACOSX */ + Tcl_RecordAndEval, /* 208 */ + Tcl_RecordAndEvalObj, /* 209 */ + Tcl_RegisterChannel, /* 210 */ + Tcl_RegisterObjType, /* 211 */ + Tcl_RegExpCompile, /* 212 */ + Tcl_RegExpExec, /* 213 */ + Tcl_RegExpMatch, /* 214 */ + Tcl_RegExpRange, /* 215 */ + Tcl_Release, /* 216 */ + Tcl_ResetResult, /* 217 */ + Tcl_ScanElement, /* 218 */ + Tcl_ScanCountedElement, /* 219 */ + Tcl_SeekOld, /* 220 */ + Tcl_ServiceAll, /* 221 */ + Tcl_ServiceEvent, /* 222 */ + Tcl_SetAssocData, /* 223 */ + Tcl_SetChannelBufferSize, /* 224 */ + Tcl_SetChannelOption, /* 225 */ + Tcl_SetCommandInfo, /* 226 */ + Tcl_SetErrno, /* 227 */ + Tcl_SetErrorCode, /* 228 */ + Tcl_SetMaxBlockTime, /* 229 */ + Tcl_SetPanicProc, /* 230 */ + Tcl_SetRecursionLimit, /* 231 */ + Tcl_SetResult, /* 232 */ + Tcl_SetServiceMode, /* 233 */ + Tcl_SetObjErrorCode, /* 234 */ + Tcl_SetObjResult, /* 235 */ + Tcl_SetStdChannel, /* 236 */ + Tcl_SetVar, /* 237 */ + Tcl_SetVar2, /* 238 */ + Tcl_SignalId, /* 239 */ + Tcl_SignalMsg, /* 240 */ + Tcl_SourceRCFile, /* 241 */ + Tcl_SplitList, /* 242 */ + Tcl_SplitPath, /* 243 */ + Tcl_StaticPackage, /* 244 */ + Tcl_StringMatch, /* 245 */ + Tcl_TellOld, /* 246 */ + Tcl_TraceVar, /* 247 */ + Tcl_TraceVar2, /* 248 */ + Tcl_TranslateFileName, /* 249 */ + Tcl_Ungets, /* 250 */ + Tcl_UnlinkVar, /* 251 */ + Tcl_UnregisterChannel, /* 252 */ + Tcl_UnsetVar, /* 253 */ + Tcl_UnsetVar2, /* 254 */ + Tcl_UntraceVar, /* 255 */ + Tcl_UntraceVar2, /* 256 */ + Tcl_UpdateLinkedVar, /* 257 */ + Tcl_UpVar, /* 258 */ + Tcl_UpVar2, /* 259 */ + Tcl_VarEval, /* 260 */ + Tcl_VarTraceInfo, /* 261 */ + Tcl_VarTraceInfo2, /* 262 */ + Tcl_Write, /* 263 */ + Tcl_WrongNumArgs, /* 264 */ + Tcl_DumpActiveMemory, /* 265 */ + Tcl_ValidateAllMemory, /* 266 */ + Tcl_AppendResultVA, /* 267 */ + Tcl_AppendStringsToObjVA, /* 268 */ + Tcl_HashStats, /* 269 */ + Tcl_ParseVar, /* 270 */ + Tcl_PkgPresent, /* 271 */ + Tcl_PkgPresentEx, /* 272 */ + Tcl_PkgProvide, /* 273 */ + Tcl_PkgRequire, /* 274 */ + Tcl_SetErrorCodeVA, /* 275 */ + Tcl_VarEvalVA, /* 276 */ + Tcl_WaitPid, /* 277 */ + Tcl_PanicVA, /* 278 */ + Tcl_GetVersion, /* 279 */ + Tcl_InitMemory, /* 280 */ + Tcl_StackChannel, /* 281 */ + Tcl_UnstackChannel, /* 282 */ + Tcl_GetStackedChannel, /* 283 */ + Tcl_SetMainLoop, /* 284 */ + NULL, /* 285 */ + Tcl_AppendObjToObj, /* 286 */ + Tcl_CreateEncoding, /* 287 */ + Tcl_CreateThreadExitHandler, /* 288 */ + Tcl_DeleteThreadExitHandler, /* 289 */ + Tcl_DiscardResult, /* 290 */ + Tcl_EvalEx, /* 291 */ + Tcl_EvalObjv, /* 292 */ + Tcl_EvalObjEx, /* 293 */ + Tcl_ExitThread, /* 294 */ + Tcl_ExternalToUtf, /* 295 */ + Tcl_ExternalToUtfDString, /* 296 */ + Tcl_FinalizeThread, /* 297 */ + Tcl_FinalizeNotifier, /* 298 */ + Tcl_FreeEncoding, /* 299 */ + Tcl_GetCurrentThread, /* 300 */ + Tcl_GetEncoding, /* 301 */ + Tcl_GetEncodingName, /* 302 */ + Tcl_GetEncodingNames, /* 303 */ + Tcl_GetIndexFromObjStruct, /* 304 */ + Tcl_GetThreadData, /* 305 */ + Tcl_GetVar2Ex, /* 306 */ + Tcl_InitNotifier, /* 307 */ + Tcl_MutexLock, /* 308 */ + Tcl_MutexUnlock, /* 309 */ + Tcl_ConditionNotify, /* 310 */ + Tcl_ConditionWait, /* 311 */ + Tcl_NumUtfChars, /* 312 */ + Tcl_ReadChars, /* 313 */ + Tcl_RestoreResult, /* 314 */ + Tcl_SaveResult, /* 315 */ + Tcl_SetSystemEncoding, /* 316 */ + Tcl_SetVar2Ex, /* 317 */ + Tcl_ThreadAlert, /* 318 */ + Tcl_ThreadQueueEvent, /* 319 */ + Tcl_UniCharAtIndex, /* 320 */ + Tcl_UniCharToLower, /* 321 */ + Tcl_UniCharToTitle, /* 322 */ + Tcl_UniCharToUpper, /* 323 */ + Tcl_UniCharToUtf, /* 324 */ + Tcl_UtfAtIndex, /* 325 */ + Tcl_UtfCharComplete, /* 326 */ + Tcl_UtfBackslash, /* 327 */ + Tcl_UtfFindFirst, /* 328 */ + Tcl_UtfFindLast, /* 329 */ + Tcl_UtfNext, /* 330 */ + Tcl_UtfPrev, /* 331 */ + Tcl_UtfToExternal, /* 332 */ + Tcl_UtfToExternalDString, /* 333 */ + Tcl_UtfToLower, /* 334 */ + Tcl_UtfToTitle, /* 335 */ + Tcl_UtfToUniChar, /* 336 */ + Tcl_UtfToUpper, /* 337 */ + Tcl_WriteChars, /* 338 */ + Tcl_WriteObj, /* 339 */ + Tcl_GetString, /* 340 */ + Tcl_GetDefaultEncodingDir, /* 341 */ + Tcl_SetDefaultEncodingDir, /* 342 */ + Tcl_AlertNotifier, /* 343 */ + Tcl_ServiceModeHook, /* 344 */ + Tcl_UniCharIsAlnum, /* 345 */ + Tcl_UniCharIsAlpha, /* 346 */ + Tcl_UniCharIsDigit, /* 347 */ + Tcl_UniCharIsLower, /* 348 */ + Tcl_UniCharIsSpace, /* 349 */ + Tcl_UniCharIsUpper, /* 350 */ + Tcl_UniCharIsWordChar, /* 351 */ + Tcl_UniCharLen, /* 352 */ + Tcl_UniCharNcmp, /* 353 */ + Tcl_UniCharToUtfDString, /* 354 */ + Tcl_UtfToUniCharDString, /* 355 */ + Tcl_GetRegExpFromObj, /* 356 */ + Tcl_EvalTokens, /* 357 */ + Tcl_FreeParse, /* 358 */ + Tcl_LogCommandInfo, /* 359 */ + Tcl_ParseBraces, /* 360 */ + Tcl_ParseCommand, /* 361 */ + Tcl_ParseExpr, /* 362 */ + Tcl_ParseQuotedString, /* 363 */ + Tcl_ParseVarName, /* 364 */ + Tcl_GetCwd, /* 365 */ + Tcl_Chdir, /* 366 */ + Tcl_Access, /* 367 */ + Tcl_Stat, /* 368 */ + Tcl_UtfNcmp, /* 369 */ + Tcl_UtfNcasecmp, /* 370 */ + Tcl_StringCaseMatch, /* 371 */ + Tcl_UniCharIsControl, /* 372 */ + Tcl_UniCharIsGraph, /* 373 */ + Tcl_UniCharIsPrint, /* 374 */ + Tcl_UniCharIsPunct, /* 375 */ + Tcl_RegExpExecObj, /* 376 */ + Tcl_RegExpGetInfo, /* 377 */ + Tcl_NewUnicodeObj, /* 378 */ + Tcl_SetUnicodeObj, /* 379 */ + Tcl_GetCharLength, /* 380 */ + Tcl_GetUniChar, /* 381 */ + Tcl_GetUnicode, /* 382 */ + Tcl_GetRange, /* 383 */ + Tcl_AppendUnicodeToObj, /* 384 */ + Tcl_RegExpMatchObj, /* 385 */ + Tcl_SetNotifier, /* 386 */ + Tcl_GetAllocMutex, /* 387 */ + Tcl_GetChannelNames, /* 388 */ + Tcl_GetChannelNamesEx, /* 389 */ + Tcl_ProcObjCmd, /* 390 */ + Tcl_ConditionFinalize, /* 391 */ + Tcl_MutexFinalize, /* 392 */ + Tcl_CreateThread, /* 393 */ + Tcl_ReadRaw, /* 394 */ + Tcl_WriteRaw, /* 395 */ + Tcl_GetTopChannel, /* 396 */ + Tcl_ChannelBuffered, /* 397 */ + Tcl_ChannelName, /* 398 */ + Tcl_ChannelVersion, /* 399 */ + Tcl_ChannelBlockModeProc, /* 400 */ + Tcl_ChannelCloseProc, /* 401 */ + Tcl_ChannelClose2Proc, /* 402 */ + Tcl_ChannelInputProc, /* 403 */ + Tcl_ChannelOutputProc, /* 404 */ + Tcl_ChannelSeekProc, /* 405 */ + Tcl_ChannelSetOptionProc, /* 406 */ + Tcl_ChannelGetOptionProc, /* 407 */ + Tcl_ChannelWatchProc, /* 408 */ + Tcl_ChannelGetHandleProc, /* 409 */ + Tcl_ChannelFlushProc, /* 410 */ + Tcl_ChannelHandlerProc, /* 411 */ + Tcl_JoinThread, /* 412 */ + Tcl_IsChannelShared, /* 413 */ + Tcl_IsChannelRegistered, /* 414 */ + Tcl_CutChannel, /* 415 */ + Tcl_SpliceChannel, /* 416 */ + Tcl_ClearChannelHandlers, /* 417 */ + Tcl_IsChannelExisting, /* 418 */ + Tcl_UniCharNcasecmp, /* 419 */ + Tcl_UniCharCaseMatch, /* 420 */ + Tcl_FindHashEntry, /* 421 */ + Tcl_CreateHashEntry, /* 422 */ + Tcl_InitCustomHashTable, /* 423 */ + Tcl_InitObjHashTable, /* 424 */ + Tcl_CommandTraceInfo, /* 425 */ + Tcl_TraceCommand, /* 426 */ + Tcl_UntraceCommand, /* 427 */ + Tcl_AttemptAlloc, /* 428 */ + Tcl_AttemptDbCkalloc, /* 429 */ + Tcl_AttemptRealloc, /* 430 */ + Tcl_AttemptDbCkrealloc, /* 431 */ + Tcl_AttemptSetObjLength, /* 432 */ + Tcl_GetChannelThread, /* 433 */ + Tcl_GetUnicodeFromObj, /* 434 */ + Tcl_GetMathFuncInfo, /* 435 */ + Tcl_ListMathFuncs, /* 436 */ + Tcl_SubstObj, /* 437 */ + Tcl_DetachChannel, /* 438 */ + Tcl_IsStandardChannel, /* 439 */ + Tcl_FSCopyFile, /* 440 */ + Tcl_FSCopyDirectory, /* 441 */ + Tcl_FSCreateDirectory, /* 442 */ + Tcl_FSDeleteFile, /* 443 */ + Tcl_FSLoadFile, /* 444 */ + Tcl_FSMatchInDirectory, /* 445 */ + Tcl_FSLink, /* 446 */ + Tcl_FSRemoveDirectory, /* 447 */ + Tcl_FSRenameFile, /* 448 */ + Tcl_FSLstat, /* 449 */ + Tcl_FSUtime, /* 450 */ + Tcl_FSFileAttrsGet, /* 451 */ + Tcl_FSFileAttrsSet, /* 452 */ + Tcl_FSFileAttrStrings, /* 453 */ + Tcl_FSStat, /* 454 */ + Tcl_FSAccess, /* 455 */ + Tcl_FSOpenFileChannel, /* 456 */ + Tcl_FSGetCwd, /* 457 */ + Tcl_FSChdir, /* 458 */ + Tcl_FSConvertToPathType, /* 459 */ + Tcl_FSJoinPath, /* 460 */ + Tcl_FSSplitPath, /* 461 */ + Tcl_FSEqualPaths, /* 462 */ + Tcl_FSGetNormalizedPath, /* 463 */ + Tcl_FSJoinToPath, /* 464 */ + Tcl_FSGetInternalRep, /* 465 */ + Tcl_FSGetTranslatedPath, /* 466 */ + Tcl_FSEvalFile, /* 467 */ + Tcl_FSNewNativePath, /* 468 */ + Tcl_FSGetNativePath, /* 469 */ + Tcl_FSFileSystemInfo, /* 470 */ + Tcl_FSPathSeparator, /* 471 */ + Tcl_FSListVolumes, /* 472 */ + Tcl_FSRegister, /* 473 */ + Tcl_FSUnregister, /* 474 */ + Tcl_FSData, /* 475 */ + Tcl_FSGetTranslatedStringPath, /* 476 */ + Tcl_FSGetFileSystemForPath, /* 477 */ + Tcl_FSGetPathType, /* 478 */ + Tcl_OutputBuffered, /* 479 */ + Tcl_FSMountsChanged, /* 480 */ + Tcl_EvalTokensStandard, /* 481 */ + Tcl_GetTime, /* 482 */ + Tcl_CreateObjTrace, /* 483 */ + Tcl_GetCommandInfoFromToken, /* 484 */ + Tcl_SetCommandInfoFromToken, /* 485 */ + Tcl_DbNewWideIntObj, /* 486 */ + Tcl_GetWideIntFromObj, /* 487 */ + Tcl_NewWideIntObj, /* 488 */ + Tcl_SetWideIntObj, /* 489 */ + Tcl_AllocStatBuf, /* 490 */ + Tcl_Seek, /* 491 */ + Tcl_Tell, /* 492 */ + Tcl_ChannelWideSeekProc, /* 493 */ + Tcl_DictObjPut, /* 494 */ + Tcl_DictObjGet, /* 495 */ + Tcl_DictObjRemove, /* 496 */ + Tcl_DictObjSize, /* 497 */ + Tcl_DictObjFirst, /* 498 */ + Tcl_DictObjNext, /* 499 */ + Tcl_DictObjDone, /* 500 */ + Tcl_DictObjPutKeyList, /* 501 */ + Tcl_DictObjRemoveKeyList, /* 502 */ + Tcl_NewDictObj, /* 503 */ + Tcl_DbNewDictObj, /* 504 */ + Tcl_RegisterConfig, /* 505 */ + Tcl_CreateNamespace, /* 506 */ + Tcl_DeleteNamespace, /* 507 */ + Tcl_AppendExportList, /* 508 */ + Tcl_Export, /* 509 */ + Tcl_Import, /* 510 */ + Tcl_ForgetImport, /* 511 */ + Tcl_GetCurrentNamespace, /* 512 */ + Tcl_GetGlobalNamespace, /* 513 */ + Tcl_FindNamespace, /* 514 */ + Tcl_FindCommand, /* 515 */ + Tcl_GetCommandFromObj, /* 516 */ + Tcl_GetCommandFullName, /* 517 */ + Tcl_FSEvalFileEx, /* 518 */ + Tcl_SetExitProc, /* 519 */ + Tcl_LimitAddHandler, /* 520 */ + Tcl_LimitRemoveHandler, /* 521 */ + Tcl_LimitReady, /* 522 */ + Tcl_LimitCheck, /* 523 */ + Tcl_LimitExceeded, /* 524 */ + Tcl_LimitSetCommands, /* 525 */ + Tcl_LimitSetTime, /* 526 */ + Tcl_LimitSetGranularity, /* 527 */ + Tcl_LimitTypeEnabled, /* 528 */ + Tcl_LimitTypeExceeded, /* 529 */ + Tcl_LimitTypeSet, /* 530 */ + Tcl_LimitTypeReset, /* 531 */ + Tcl_LimitGetCommands, /* 532 */ + Tcl_LimitGetTime, /* 533 */ + Tcl_LimitGetGranularity, /* 534 */ + Tcl_SaveInterpState, /* 535 */ + Tcl_RestoreInterpState, /* 536 */ + Tcl_DiscardInterpState, /* 537 */ + Tcl_SetReturnOptions, /* 538 */ + Tcl_GetReturnOptions, /* 539 */ + Tcl_IsEnsemble, /* 540 */ + Tcl_CreateEnsemble, /* 541 */ + Tcl_FindEnsemble, /* 542 */ + Tcl_SetEnsembleSubcommandList, /* 543 */ + Tcl_SetEnsembleMappingDict, /* 544 */ + Tcl_SetEnsembleUnknownHandler, /* 545 */ + Tcl_SetEnsembleFlags, /* 546 */ + Tcl_GetEnsembleSubcommandList, /* 547 */ + Tcl_GetEnsembleMappingDict, /* 548 */ + Tcl_GetEnsembleUnknownHandler, /* 549 */ + Tcl_GetEnsembleFlags, /* 550 */ + Tcl_GetEnsembleNamespace, /* 551 */ + Tcl_SetTimeProc, /* 552 */ + Tcl_QueryTimeProc, /* 553 */ + Tcl_ChannelThreadActionProc, /* 554 */ + Tcl_NewBignumObj, /* 555 */ + Tcl_DbNewBignumObj, /* 556 */ + Tcl_SetBignumObj, /* 557 */ + Tcl_GetBignumFromObj, /* 558 */ + Tcl_TakeBignumFromObj, /* 559 */ + Tcl_TruncateChannel, /* 560 */ + Tcl_ChannelTruncateProc, /* 561 */ + Tcl_SetChannelErrorInterp, /* 562 */ + Tcl_GetChannelErrorInterp, /* 563 */ + Tcl_SetChannelError, /* 564 */ + Tcl_GetChannelError, /* 565 */ + Tcl_InitBignumFromDouble, /* 566 */ + Tcl_GetNamespaceUnknownHandler, /* 567 */ + Tcl_SetNamespaceUnknownHandler, /* 568 */ + Tcl_GetEncodingFromObj, /* 569 */ + Tcl_GetEncodingSearchPath, /* 570 */ + Tcl_SetEncodingSearchPath, /* 571 */ + Tcl_GetEncodingNameFromEnvironment, /* 572 */ + Tcl_PkgRequireProc, /* 573 */ + Tcl_AppendObjToErrorInfo, /* 574 */ + Tcl_AppendLimitedToObj, /* 575 */ + Tcl_Format, /* 576 */ + Tcl_AppendFormatToObj, /* 577 */ + Tcl_ObjPrintf, /* 578 */ + Tcl_AppendPrintfToObj, /* 579 */ + Tcl_CancelEval, /* 580 */ + Tcl_Canceled, /* 581 */ + Tcl_CreatePipe, /* 582 */ + Tcl_NRCreateCommand, /* 583 */ + Tcl_NREvalObj, /* 584 */ + Tcl_NREvalObjv, /* 585 */ + Tcl_NRCmdSwap, /* 586 */ + Tcl_NRAddCallback, /* 587 */ + Tcl_NRCallObjProc, /* 588 */ + Tcl_GetFSDeviceFromStat, /* 589 */ + Tcl_GetFSInodeFromStat, /* 590 */ + Tcl_GetModeFromStat, /* 591 */ + Tcl_GetLinkCountFromStat, /* 592 */ + Tcl_GetUserIdFromStat, /* 593 */ + Tcl_GetGroupIdFromStat, /* 594 */ + Tcl_GetDeviceTypeFromStat, /* 595 */ + Tcl_GetAccessTimeFromStat, /* 596 */ + Tcl_GetModificationTimeFromStat, /* 597 */ + Tcl_GetChangeTimeFromStat, /* 598 */ + Tcl_GetSizeFromStat, /* 599 */ + Tcl_GetBlocksFromStat, /* 600 */ + Tcl_GetBlockSizeFromStat, /* 601 */ + Tcl_SetEnsembleParameterList, /* 602 */ + Tcl_GetEnsembleParameterList, /* 603 */ + Tcl_ParseArgsObjv, /* 604 */ + Tcl_GetErrorLine, /* 605 */ + Tcl_SetErrorLine, /* 606 */ + Tcl_TransferResult, /* 607 */ + Tcl_InterpActive, /* 608 */ + Tcl_BackgroundException, /* 609 */ + Tcl_ZlibDeflate, /* 610 */ + Tcl_ZlibInflate, /* 611 */ + Tcl_ZlibCRC32, /* 612 */ + Tcl_ZlibAdler32, /* 613 */ + Tcl_ZlibStreamInit, /* 614 */ + Tcl_ZlibStreamGetCommandName, /* 615 */ + Tcl_ZlibStreamEof, /* 616 */ + Tcl_ZlibStreamAdler32, /* 617 */ + Tcl_ZlibStreamPut, /* 618 */ + Tcl_ZlibStreamGet, /* 619 */ + Tcl_ZlibStreamClose, /* 620 */ + Tcl_ZlibStreamReset, /* 621 */ + Tcl_SetStartupScript, /* 622 */ + Tcl_GetStartupScript, /* 623 */ + Tcl_CloseEx, /* 624 */ +}; + +/* !END!: Do not edit above this line. */ + +/* + * Module-scope pointers to the main static stubs tables, used for package + * initialization via Tcl_PkgProvideEx(). + */ + +MODULE_SCOPE const TclStubs * const tclConstStubsPtr; +MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; + +const TclStubs * const tclConstStubsPtr = &tclStubs; +const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; -- cgit v0.12 From 97e32cf4f7b1f10c946538135b1b34e5bcbf672b Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 18 Dec 2008 06:40:02 +0000 Subject: VOID -> void --- ChangeLog | 8 ++++++++ compat/dlfcn.h | 8 ++++---- generic/tcl.decls | 6 +++--- generic/tclDecls.h | 10 +++++----- generic/tclInt.decls | 4 ++-- generic/tclIntDecls.h | 6 +++--- 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcf6150..85d696d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-18 Jan Nijtmans + + * generic/tcl.decls: VOID -> void + * generic/tclInt.decls + * compat/dlfcn.h + * generic/tclDecls.h (regenerated) + * generic/tclIntDecls.h + 2008-12-18 Alexandre Ferrieux TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channels diff --git a/compat/dlfcn.h b/compat/dlfcn.h index 03d878a..ef8ff0c 100644 --- a/compat/dlfcn.h +++ b/compat/dlfcn.h @@ -1,4 +1,4 @@ -/* +/* * dlfcn.h -- * * This file provides a replacement for the header file "dlfcn.h" @@ -17,7 +17,7 @@ * for any results of using the software, alterations are clearly marked * as such, and this notice is not modified. * - * RCS: @(#) $Id: dlfcn.h,v 1.3 2008/09/03 05:43:31 dgp Exp $ + * RCS: @(#) $Id: dlfcn.h,v 1.4 2008/12/18 06:40:03 nijtmans Exp $ */ /* @@ -53,8 +53,8 @@ struct dl_info { void (*fini) (void); }; -VOID *dlopen (const char *path, int mode); -VOID *dlsym (void *handle, const char *symbol); +void *dlopen (const char *path, int mode); +void *dlsym (void *handle, const char *symbol); char *dlerror (void); int dlclose (void *handle); diff --git a/generic/tcl.decls b/generic/tcl.decls index c97331b..ffa6eba 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.163 2008/12/18 01:14:16 ferrieux Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.164 2008/12/18 06:40:02 nijtmans Exp $ library tcl @@ -1096,11 +1096,11 @@ declare 303 generic { } declare 304 generic { int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr, - const VOID *tablePtr, int offset, const char *msg, int flags, + const void *tablePtr, int offset, const char *msg, int flags, int *indexPtr) } declare 305 generic { - VOID *Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size) + void *Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size) } declare 306 generic { Tcl_Obj *Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1, diff --git a/generic/tclDecls.h b/generic/tclDecls.h index fb8ba5c..e2e4366 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.165 2008/12/18 04:38:01 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.166 2008/12/18 06:40:02 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -1892,14 +1892,14 @@ EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); #define Tcl_GetIndexFromObjStruct_TCL_DECLARED /* 304 */ EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, - Tcl_Obj * objPtr, const VOID * tablePtr, + Tcl_Obj * objPtr, const void * tablePtr, int offset, const char * msg, int flags, int * indexPtr); #endif #ifndef Tcl_GetThreadData_TCL_DECLARED #define Tcl_GetThreadData_TCL_DECLARED /* 305 */ -EXTERN VOID * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, +EXTERN void * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, int size); #endif #ifndef Tcl_GetVar2Ex_TCL_DECLARED @@ -4138,8 +4138,8 @@ typedef struct TclStubs { Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, const char * name); /* 301 */ CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ - int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const VOID * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ - VOID * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const void * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ + void * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 306 */ ClientData (*tcl_InitNotifier) (void); /* 307 */ void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ diff --git a/generic/tclInt.decls b/generic/tclInt.decls index c6ab207..b413a4a 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.133 2008/12/17 17:54:01 dgp Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.134 2008/12/18 06:40:02 nijtmans Exp $ library tcl @@ -579,7 +579,7 @@ declare 145 generic { CONST86 struct AuxDataType *TclGetAuxDataType(const char *typeName) } declare 146 generic { - TclHandle TclHandleCreate(VOID *ptr) + TclHandle TclHandleCreate(void *ptr) } declare 147 generic { void TclHandleFree(TclHandle handle) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 6367064..b4adc16 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.128 2008/12/15 15:48:33 dgp Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.129 2008/12/18 06:40:02 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -689,7 +689,7 @@ EXTERN CONST86 struct AuxDataType * TclGetAuxDataType (const char * typeName); #ifndef TclHandleCreate_TCL_DECLARED #define TclHandleCreate_TCL_DECLARED /* 146 */ -EXTERN TclHandle TclHandleCreate (VOID * ptr); +EXTERN TclHandle TclHandleCreate (void * ptr); #endif #ifndef TclHandleFree_TCL_DECLARED #define TclHandleFree_TCL_DECLARED @@ -1257,7 +1257,7 @@ typedef struct TclIntStubs { int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ CONST86 struct AuxDataType * (*tclGetAuxDataType) (const char * typeName); /* 145 */ - TclHandle (*tclHandleCreate) (VOID * ptr); /* 146 */ + TclHandle (*tclHandleCreate) (void * ptr); /* 146 */ void (*tclHandleFree) (TclHandle handle); /* 147 */ TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ void (*tclHandleRelease) (TclHandle handle); /* 149 */ -- cgit v0.12 From ca0048af32303381b5469847c3dd1416dc639a1a Mon Sep 17 00:00:00 2001 From: ferrieux Date: Thu, 18 Dec 2008 07:50:54 +0000 Subject: Remove obsolete PipeCloseProc --- unix/tclUnixPipe.c | 84 +----------------------------------------------------- 1 file changed, 1 insertion(+), 83 deletions(-) diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 0381764..4050d12 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.46 2008/12/18 01:14:17 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.47 2008/12/18 07:50:54 ferrieux Exp $ */ #include "tclInt.h" @@ -999,88 +999,6 @@ PipeClose2Proc( /* *---------------------------------------------------------------------- * - * PipeCloseProc -- OBSOLETE - * - * This function is invoked by the generic IO level to perform - * channel-type-specific cleanup when a command pipeline channel is - * closed. - * - * Results: - * 0 on success, errno otherwise. - * - * Side effects: - * Closes the command pipeline channel. - * - *---------------------------------------------------------------------- - */ - - /* ARGSUSED */ -static int -PipeCloseProc( - ClientData instanceData, /* The pipe to close. */ - Tcl_Interp *interp) /* For error reporting. */ -{ - PipeState *pipePtr; - Tcl_Channel errChan; - int errorCode, result; - - errorCode = 0; - result = 0; - pipePtr = (PipeState *) instanceData; - - if (pipePtr->inFile) { - if (TclpCloseFile(pipePtr->inFile) < 0) { - errorCode = errno; - } - } - if (pipePtr->outFile) { - if ((TclpCloseFile(pipePtr->outFile) < 0) && (errorCode == 0)) { - errorCode = errno; - } - } - - if (pipePtr->isNonBlocking || TclInExit()) { - /* - * If the channel is non-blocking or Tcl is being cleaned up, just - * detach the children PIDs, reap them (important if we are in a - * dynamic load module), and discard the errorFile. - */ - - Tcl_DetachPids(pipePtr->numPids, pipePtr->pidPtr); - Tcl_ReapDetachedProcs(); - - if (pipePtr->errorFile) { - TclpCloseFile(pipePtr->errorFile); - } - } else { - /* - * Wrap the error file into a channel and give it to the cleanup - * routine. - */ - - if (pipePtr->errorFile) { - errChan = Tcl_MakeFileChannel( - (ClientData) INT2PTR(GetFd(pipePtr->errorFile)), TCL_READABLE); - } else { - errChan = NULL; - } - result = TclCleanupChildren(interp, pipePtr->numPids, pipePtr->pidPtr, - errChan); - } - - if (pipePtr->numPids != 0) { - ckfree((char *) pipePtr->pidPtr); - } - ckfree((char *) pipePtr); - if (errorCode == 0) { - return result; - } - return errorCode; -} - -/* - *---------------------------------------------------------------------- - * * PipeInputProc -- * * This function is invoked from the generic IO level to read input from -- cgit v0.12 From 26c4e7b9006efa15622227a5afe5198e8d0193be Mon Sep 17 00:00:00 2001 From: ferrieux Date: Thu, 18 Dec 2008 09:43:44 +0000 Subject: Temporarily disable half-close test because of issue in tcltest cleanup --- tests/chanio.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 487691a..7e0bda4 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.16 2008/12/18 01:14:17 ferrieux Exp $ +# RCS: @(#) $Id: chanio.test,v 1.17 2008/12/18 09:43:44 ferrieux Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -2229,7 +2229,7 @@ test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel o chan close $f set l } {file1 file2} -test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { +if {0} {test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { set cat [makeFile { fconfigure stdout -buffering line while {[gets stdin line]>=0} {puts $line} @@ -2249,7 +2249,7 @@ test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { vwait ::done close $::ff r list $::done $::acc -} {Succeeded {Hey DONE}} +} {Succeeded {Hey DONE}}} if {0} {test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { set echo [makeFile { proc accept {s args} {set ::sok $s} -- cgit v0.12 From 78dc1db00a0f102b9f4d1c04ab0b1c42108bb17b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 10:37:43 +0000 Subject: Compressing and decompressing channel transformation support. Note that there may be "quality-of-implementation" issues left... --- ChangeLog | 32 ++-- doc/zlib.n | 45 +++++- generic/tclZlib.c | 466 +++++++++++++++++++++++++++++++++++++----------------- tests/zlib.test | 37 ++++- 4 files changed, 408 insertions(+), 172 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85d696d..2fb12a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,27 +1,25 @@ +2008-12-18 Donal K. Fellows + + * generic/tclZlib.c: First implementation of the compressing and + * doc/zlib.n: decompressing channel transformations. + * tests/zlib.test (zlib-8.*): + 2008-12-18 Jan Nijtmans - * generic/tcl.decls: VOID -> void - * generic/tclInt.decls - * compat/dlfcn.h - * generic/tclDecls.h (regenerated) - * generic/tclIntDecls.h + * generic/tcl.decls: VOID -> void + * generic/tclInt.decls: + * compat/dlfcn.h: + * generic/tclDecls.h: (regenerated) + * generic/tclIntDecls.h: 2008-12-18 Alexandre Ferrieux TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channels - * doc/close.n - * generic/tclIO.c - * generic/tclIOCmd.c - * unix/tclUnixChan.c - * unix/tclUnixPipe.c - * win/tclWinSock.c - * generic/tcl.decls - * generic/tclDecls.h - * generic/tclStubInit.c - * tests/chan.test - * tests/chanio.test - * tests/ioCmd.test + * doc/close.n, generic/tclIO.c, generic/tclIOCmd.c: + * unix/tclUnixChan.c, unix/tclUnixPipe.c, win/tclWinSock.c: + * generic/tcl.decls, generic/tclDecls.h, generic/tclStubInit.c: + * tests/chan.test, tests/chanio.test, tests/ioCmd.test: 2008-12-17 Donal K. Fellows diff --git a/doc/zlib.n b/doc/zlib.n index b010eb4..45bfd1d 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.4 2008/12/13 17:36:34 dkf Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.5 2008/12/18 10:37:43 dkf Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -165,7 +165,45 @@ gzip-format data on \fIchannel\fR, which must be writable. The transformation will be a decompressing transformation that reads raw compressed data from \fIchannel\R, which must be readable. .PP -\fITODO: not yet implemented!\fR +The following options may be set when creating a transformation: +.TP +\fB\-header\fI dictionary\fR +. +Passes a description of the gzip header to create, in the same format that +\fBzlib gzip\fR understands. +.TP +\fB\-level\fI compressionLevel\fR +. +How hard to compress the data. Must be an integer from 0 (uncompressed) to 9 +(maximally compressed). +'\".TP +'\"\fB\-limit\fI readaheadLimit\fR +'\". +'\"The maximum number of bytes ahead to read. +'\"\fITODO: not yet implemented!\fR +.PP +Both compressing and decompressing channel transformations add extra options +that may be accessed through \fBchan configure\fR. These are: +.TP +\fB\-flush\fI type\fR +. +This write-only operation flushes the current state of the compressor to the +underlying channel. It is only valid for compressing transformations. The +\fItype\fR must be either \fBsync\fR or \fBfull\fR for a normal flush or an +expensive flush respectively. Note that flushing degrades compression. +.TP +\fB\-checksum\fR +. +This read-only option, valid for both compressing and decompressing +transforms, gets the current checksum for the uncompressed data that the +compression engine has seen so far. The compression algorithm depends on what +format is being produced or consumed. +.TP +\fB\-header\fR +. +This read-only option, only valid for decompressing transforms that are +processing gzip-format data, returns the dictionary describing the header read +off the data stream. .RE .TP \fBzlib stream\fI mode\fR ?\fIlevel\fR? @@ -238,9 +276,8 @@ A short-cut for followed by .QW "\fIstream \fBget\fR" . .TP -\fIstream \fBadler32\fR +\fIstream \fBchecksum\fR . -'\" Change name? Returns the checksum of the uncompressed data seen so far by this stream. .TP \fIstream \fBclose\fR diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 64c4665..98e42ad 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,20 +13,28 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.15 2008/12/18 00:22:50 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.16 2008/12/18 10:37:43 dkf Exp $ */ #include "tclInt.h" #ifdef HAVE_ZLIB #include -/* #define ENABLE_CHANSTACKING */ -#define GZIP_MAGIC_FLAG 16 -#define AUTO_MAGIC_FLAG 32 +/* + * Magic flags used with wbits fields to indicate that we're handling the gzip + * format or automatic detection of format. Putting it here is slightly less + * gross! + */ + +#define WBITS_RAW (-MAX_WBITS) +#define WBITS_ZLIB (MAX_WBITS) +#define WBITS_GZIP (MAX_WBITS | 16) +#define WBITS_AUTODETECT (MAX_WBITS | 32) /* * Structure used for handling gzip headers that are generated from a - * dictionary. + * dictionary. It comprises the header structure itself plus some working + * space that it is very convenient to have attached. */ #define MAX_COMMENT_LEN 256 @@ -43,42 +51,70 @@ typedef struct { typedef struct { Tcl_Interp *interp; - z_stream stream; - int streamEnd; + z_stream stream; /* The interface to the zlib library. */ + int streamEnd; /* If we've got to end-of-stream. */ Tcl_Obj *inData, *outData; /* Input / output buffers (lists) */ Tcl_Obj *currentInput; /* Pointer to what is currently being * inflated. */ - int inPos, outPos; + int outPos; int mode; /* Either TCL_ZLIB_STREAM_DEFLATE or * TCL_ZLIB_STREAM_INFLATE. */ int format; /* Flags from the TCL_ZLIB_FORMAT_* */ int level; /* Default 5, 0-9 */ int flush; /* Stores the flush param for deferred the * decompression. */ - int wbits; + int wbits; /* The encoded compression mode, so we can + * restart the stream if necessary. */ Tcl_Command cmd; /* Token for the associated Tcl command. */ -} zlibStreamHandle; +} ZlibStreamHandle; /* - * Prototypes for private procedures defined later in this file: + * Structure used for stacked channel compression and decompression. */ -static void ConvertError(Tcl_Interp *interp, int code); -static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); -static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, - GzipHeader *headerPtr, int *extraSizePtr); -static int ZlibCmd(ClientData dummy, Tcl_Interp *ip, int objc, - Tcl_Obj *const objv[]); -static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); -static void ZlibStreamCmdDelete(ClientData cd); -static void ZlibStreamCleanup(zlibStreamHandle *zsh); +typedef struct { + Tcl_Channel parent; /* The underlying source and sink of bytes. */ + int flags; /* General flag bits, see below... */ + int mode; /* Either the value TCL_ZLIB_STREAM_DEFLATE + * for compression on output, or + * TCL_ZLIB_STREAM_INFLATE for decompression + * on input. */ + z_stream inStream; /* Structure used by zlib for decompression of + * input. */ + z_stream outStream; /* Structure used by zlib for compression of + * output. */ + char *inBuffer, *outBuffer; /* Working buffers. */ + int inAllocated, outAllocated; + /* Sizes of working buffers. */ + GzipHeader inHeader; /* Header read from input stream, when + * decompressing a gzip stream. */ + GzipHeader outHeader; /* Header to write to an output stream, when + * compressing a gzip stream. */ +} ZlibChannelData; + +/* + * Value bits for the flags field. Definitions are: + * ASYNC - Whether this is an asynchronous channel. + * IN_HEADER - Whether the inHeader field has been registered with + * the input compressor. + * OUT_HEADER - Whether the outputHeader field has been registered + * with the output decompressor. + */ + +#define ASYNC 0x1 +#define IN_HEADER 0x2 +#define OUT_HEADER 0x4 + +/* + * Size of buffers allocated by default. Should be enough... + */ + +#define DEFAULT_BUFFER_SIZE 4096 /* - * Prototypes for private procedures used by channel stacking: + * Prototypes for private procedures defined later in this file: */ -#ifdef ENABLE_CHANSTACKING static int ChanClose(ClientData instanceData, Tcl_Interp *interp); static int ChanInput(ClientData instanceData, char *buf, @@ -95,12 +131,28 @@ static void ChanWatch(ClientData instanceData, int mask); static int ChanGetHandle(ClientData instanceData, int direction, ClientData *handlePtr); static int ChanBlockMode(ClientData instanceData, int mode); +#if 0 /* unused */ static int ChanHandler(ClientData instanceData, int interestMask); +#endif +static void ConvertError(Tcl_Interp *interp, int code); +static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); +static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, + GzipHeader *headerPtr, int *extraSizePtr); +static int TclZlibCmd(ClientData dummy, Tcl_Interp *ip, int objc, + Tcl_Obj *const objv[]); +static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); +static void ZlibStreamCmdDelete(ClientData cd); +static void ZlibStreamCleanup(ZlibStreamHandle *zsh); static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int mode, int format, int level, Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr); +/* + * Type of zlib-based compressing and decompressing channels. + */ + static const Tcl_ChannelType zlibChannelType = { "zlib", TCL_CHANNEL_VERSION_3, @@ -118,50 +170,6 @@ static const Tcl_ChannelType zlibChannelType = { NULL /*ChanHandler*/, NULL /* wideSeekProc */ }; - -typedef struct { - /* Generic channel info */ - Tcl_Channel parent; - int flags; - int mask; - - /* Zlib specific channel state */ - int mode; /* Either the value TCL_ZLIB_STREAM_DEFLATE - * for compression on output, or - * TCL_ZLIB_STREAM_INFLATE for decompression - * on input. */ - z_stream inStream; /* Structure used by zlib for decompression of - * input. */ - z_stream outStream; /* Structure used by zlib for compression of - * output. */ - char *inBuffer; - int inAllocated; - char *outBuffer; - int outAllocated; - - GzipHeader inHeader; - GzipHeader outHeader; -} ZlibChannelData; - -/* - * Value bits for the flags field. Definitions are: - * ASYNC - Whether this is an asynchronous channel. - * IN_HEADER - Whether the inHeader field has been registered with - * the input compressor. - * OUT_HEADER - Whether the outputHeader field has been registered - * with the output decompressor. - */ - -#define ASYNC 0x1 -#define IN_HEADER 0x2 -#define OUT_HEADER 0x4 - -/* - * Size of buffers allocated by default. Should be enough... - */ - -#define DEFAULT_BUFFER_SIZE 4096 -#endif /* ENABLE_CHANSTACKING */ /* *---------------------------------------------------------------------- @@ -455,7 +463,7 @@ Tcl_ZlibStreamInit( { int wbits = 0; int e; - zlibStreamHandle *zsh = NULL; + ZlibStreamHandle *zsh = NULL; Tcl_DString cmdname; Tcl_CmdInfo cmdinfo; @@ -468,13 +476,13 @@ Tcl_ZlibStreamInit( switch (format) { case TCL_ZLIB_FORMAT_RAW: - wbits = -MAX_WBITS; + wbits = WBITS_RAW; break; case TCL_ZLIB_FORMAT_GZIP: - wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + wbits = WBITS_GZIP; break; case TCL_ZLIB_FORMAT_ZLIB: - wbits = MAX_WBITS; + wbits = WBITS_ZLIB; break; default: Tcl_Panic("incorrect zlib data format, must be " @@ -494,16 +502,16 @@ Tcl_ZlibStreamInit( switch (format) { case TCL_ZLIB_FORMAT_RAW: - wbits = -MAX_WBITS; + wbits = WBITS_RAW; break; case TCL_ZLIB_FORMAT_GZIP: - wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + wbits = WBITS_GZIP; break; case TCL_ZLIB_FORMAT_ZLIB: - wbits = MAX_WBITS; + wbits = WBITS_ZLIB; break; case TCL_ZLIB_FORMAT_AUTO: - wbits = MAX_WBITS | AUTO_MAGIC_FLAG; + wbits = WBITS_AUTODETECT; break; default: Tcl_Panic("incorrect zlib data format, must be " @@ -516,7 +524,7 @@ Tcl_ZlibStreamInit( " TCL_ZLIB_STREAM_INFLATE"); } - zsh = (zlibStreamHandle *) ckalloc(sizeof(zlibStreamHandle)); + zsh = (ZlibStreamHandle *) ckalloc(sizeof(ZlibStreamHandle)); zsh->interp = interp; zsh->mode = mode; zsh->format = format; @@ -594,7 +602,6 @@ Tcl_ZlibStreamInit( zsh->outData = Tcl_NewListObj(0, NULL); Tcl_IncrRefCount(zsh->outData); - zsh->inPos = 0; zsh->outPos = 0; /* @@ -633,7 +640,7 @@ static void ZlibStreamCmdDelete( ClientData cd) { - zlibStreamHandle *zsh = cd; + ZlibStreamHandle *zsh = cd; zsh->cmd = NULL; ZlibStreamCleanup(zsh); @@ -661,7 +668,7 @@ int Tcl_ZlibStreamClose( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit. */ { - zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; /* * If the interp is set, deleting the command will trigger @@ -696,7 +703,7 @@ Tcl_ZlibStreamClose( void ZlibStreamCleanup( - zlibStreamHandle *zsh) + ZlibStreamHandle *zsh) { if (!zsh->streamEnd) { if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { @@ -739,7 +746,7 @@ int Tcl_ZlibStreamReset( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { - zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; int e; if (!zsh->streamEnd) { @@ -756,7 +763,6 @@ Tcl_ZlibStreamReset( zsh->currentInput = NULL; } - zsh->inPos = 0; zsh->outPos = 0; zsh->streamEnd = 0; zsh->stream.avail_in = 0; @@ -811,7 +817,7 @@ Tcl_Obj * Tcl_ZlibStreamGetCommandName( Tcl_ZlibStream zshandle) /* as obtained from Tcl_ZlibStreamInit */ { - zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; Tcl_Obj *objPtr = Tcl_NewObj(); Tcl_GetCommandFullName(zsh->interp, zsh->cmd, objPtr); @@ -841,20 +847,41 @@ int Tcl_ZlibStreamEof( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { - zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; return zsh->streamEnd; } +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamAdler32 -- + * + * Return the checksum of the uncompressed data seen so far by the + * stream. + * + *---------------------------------------------------------------------- + */ + int Tcl_ZlibStreamAdler32( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { - zlibStreamHandle *zsh = (zlibStreamHandle*) zshandle; + ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; return zsh->stream.adler; } +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamPut -- + * + * Add data to the stream for compression or decompression. + * + *---------------------------------------------------------------------- + */ + int Tcl_ZlibStreamPut( Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ @@ -862,7 +889,7 @@ Tcl_ZlibStreamPut( int flush) /* TCL_ZLIB_NO_FLUSH, TCL_ZLIB_FLUSH, * TCL_ZLIB_FULLFLUSH, or TCL_ZLIB_FINALIZE */ { - zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; char *dataTmp = NULL; int e, size, outSize; Tcl_Obj *obj; @@ -947,6 +974,16 @@ Tcl_ZlibStreamPut( return TCL_OK; } +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibStreamGet -- + * + * Retrieve data (now compressed or decompressed) from the stream. + * + *---------------------------------------------------------------------- + */ + int Tcl_ZlibStreamGet( Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ @@ -954,7 +991,7 @@ Tcl_ZlibStreamGet( int count) /* Number of bytes to grab as a maximum, you * may get less! */ { - zlibStreamHandle *zsh = (zlibStreamHandle *) zshandle; + ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; int e, i, listLen, itemLen, dataPos = 0; Tcl_Obj *itemObj; unsigned char *dataPtr, *itemPtr; @@ -1146,8 +1183,15 @@ Tcl_ZlibStreamGet( } /* - * Deflate the contents of Tcl_Obj *data with compression level in output - * format. + *---------------------------------------------------------------------- + * + * Tcl_ZlibDeflate -- + * + * Compress the contents of Tcl_Obj *data with compression level in + * output format, producing the compressed data in the interpreter + * result. + * + *---------------------------------------------------------------------- */ int @@ -1180,9 +1224,9 @@ Tcl_ZlibDeflate( */ if (format == TCL_ZLIB_FORMAT_RAW) { - wbits = -MAX_WBITS; + wbits = WBITS_RAW; } else if (format == TCL_ZLIB_FORMAT_GZIP) { - wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + wbits = WBITS_GZIP; /* * Need to allocate extra space for the gzip header and footer. The @@ -1201,7 +1245,7 @@ Tcl_ZlibDeflate( } } } else if (format == TCL_ZLIB_FORMAT_ZLIB) { - wbits = MAX_WBITS; + wbits = WBITS_ZLIB; } else { Tcl_Panic("incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, " "TCL_ZLIB_FORMAT_GZIP or TCL_ZLIB_FORMAT_ZLIB"); @@ -1293,6 +1337,16 @@ Tcl_ZlibDeflate( return TCL_ERROR; } +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibInflate -- + * + * Decompress data in an object into the interpreter result. + * + *---------------------------------------------------------------------- + */ + int Tcl_ZlibInflate( Tcl_Interp *interp, @@ -1324,18 +1378,18 @@ Tcl_ZlibInflate( switch (format) { case TCL_ZLIB_FORMAT_RAW: - wbits = -MAX_WBITS; + wbits = WBITS_RAW; gzipHeaderDictObj = NULL; break; case TCL_ZLIB_FORMAT_ZLIB: - wbits = MAX_WBITS; + wbits = WBITS_ZLIB; gzipHeaderDictObj = NULL; break; case TCL_ZLIB_FORMAT_GZIP: - wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + wbits = WBITS_GZIP; break; case TCL_ZLIB_FORMAT_AUTO: - wbits = MAX_WBITS | AUTO_MAGIC_FLAG; + wbits = WBITS_AUTODETECT; break; default: Tcl_Panic("incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, " @@ -1470,6 +1524,16 @@ Tcl_ZlibInflate( return TCL_ERROR; } +/* + *---------------------------------------------------------------------- + * + * Tcl_ZlibCRC32, Tcl_ZlibAdler32 -- + * + * Access to the checksumming engines. + * + *---------------------------------------------------------------------- + */ + unsigned int Tcl_ZlibCRC32( unsigned int crc, @@ -1489,8 +1553,18 @@ Tcl_ZlibAdler32( return adler32(adler, (Bytef *) buf, (unsigned) len); } +/* + *---------------------------------------------------------------------- + * + * TclZlibCmd -- + * + * Implementation of the [zlib] command. + * + *---------------------------------------------------------------------- + */ + static int -ZlibCmd( +TclZlibCmd( ClientData notUsed, Tcl_Interp *interp, int objc, @@ -1756,7 +1830,6 @@ ZlibCmd( } Tcl_SetObjResult(interp, Tcl_ZlibStreamGetCommandName(zh)); return TCL_OK; -#ifdef ENABLE_CHANSTACKING case z_push: { /* push mode channel options...*/ Tcl_Channel chan; int chanMode, mode; @@ -1893,11 +1966,6 @@ ZlibCmd( Tcl_SetObjResult(interp, objv[3]); return TCL_OK; } -#else /*ENABLE_CHANSTACKING*/ - case z_push: - Tcl_AppendResult(interp, "unimplemented", NULL); - return TCL_ERROR; -#endif /*ENABLE_CHANSTACKING*/ }; return TCL_ERROR; @@ -1913,6 +1981,16 @@ ZlibCmd( return TCL_ERROR; } +/* + *---------------------------------------------------------------------- + * + * ZlibStreamCmd -- + * + * Implementation of the commands returned by [zlib stream]. + * + *---------------------------------------------------------------------- + */ + static int ZlibStreamCmd( ClientData cd, @@ -1926,12 +2004,12 @@ ZlibStreamCmd( int buffersize; int flush = -1, i; static const char *const cmds[] = { - "add", "adler32", "close", "eof", "finalize", "flush", + "add", "checksum", "close", "eof", "finalize", "flush", "fullflush", "get", "put", "reset", NULL }; enum zlibStreamCommands { - zs_add, zs_adler32, zs_close, zs_eof, zs_finalize, zs_flush, + zs_add, zs_checksum, zs_close, zs_eof, zs_finalize, zs_flush, zs_fullflush, zs_get, zs_put, zs_reset }; static const char *const add_options[] = { @@ -1952,7 +2030,7 @@ ZlibStreamCmd( } switch ((enum zlibStreamCommands) command) { - case zs_add: /* add ?-flush|-fullflush|-finalize? /data/ */ + case zs_add: /* $strm add ?$flushopt? $data */ for (i=2; i 3) { + Tcl_WrongNumArgs(interp, 2, objv, "?count?"); + return TCL_ERROR; + } + count = -1; if (objc >= 3) { if (Tcl_GetIntFromObj(interp, objv[2], &count) != TCL_OK) { @@ -2063,13 +2146,25 @@ ZlibStreamCmd( } } return Tcl_ZlibStreamGet(zstream, obj, count); - case zs_flush: /* flush */ + case zs_flush: /* $strm flush */ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } Tcl_SetObjLength(obj, 0); return Tcl_ZlibStreamPut(zstream, obj, Z_SYNC_FLUSH); - case zs_fullflush: /* fullflush */ + case zs_fullflush: /* $strm fullflush */ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } Tcl_SetObjLength(obj, 0); return Tcl_ZlibStreamPut(zstream, obj, Z_FULL_FLUSH); - case zs_finalize: /* finalize */ + case zs_finalize: /* $strm finalize */ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } /* * The flush commands slightly abuse the empty result obj as input * data. @@ -2077,24 +2172,41 @@ ZlibStreamCmd( Tcl_SetObjLength(obj, 0); return Tcl_ZlibStreamPut(zstream, obj, Z_FINISH); - case zs_close: /* close */ + case zs_close: /* $strm close */ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } return Tcl_ZlibStreamClose(zstream); - case zs_eof: /* eof */ + case zs_eof: /* $strm eof */ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } Tcl_SetIntObj(obj, Tcl_ZlibStreamEof(zstream)); return TCL_OK; - case zs_adler32: /* adler32 */ + case zs_checksum: /* $strm checksum */ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } Tcl_SetIntObj(obj, Tcl_ZlibStreamAdler32(zstream)); return TCL_OK; - case zs_reset: /* reset */ + case zs_reset: /* $strm reset */ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; + } return Tcl_ZlibStreamReset(zstream); } return TCL_OK; } -#ifdef ENABLE_CHANSTACKING /* - * Set of functions to support channel stacking. + *---------------------------------------------------------------------- + * Set of functions to support channel stacking. + *---------------------------------------------------------------------- */ static int @@ -2106,14 +2218,13 @@ ChanClose( int e, result = TCL_OK; if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { - e = deflateEnd(&cd->inStream); - } else { cd->outStream.avail_in = 0; do { cd->outStream.next_out = (Bytef *) cd->outBuffer; cd->outStream.avail_out = cd->outAllocated; e = deflate(&cd->outStream, Z_FINISH); if (e != Z_OK && e != Z_STREAM_END) { + /* TODO: is this the right way to do errors on close? */ ConvertError(interp, e); result = TCL_ERROR; break; @@ -2121,6 +2232,7 @@ ChanClose( if (cd->outStream.avail_out != cd->outAllocated) { if (Tcl_WriteRaw(cd->parent, cd->outBuffer, cd->outAllocated - cd->outStream.avail_out) < 0) { + /* TODO: is this the right way to do errors on close? */ Tcl_AppendResult(interp, "error while finalizing file: ", Tcl_PosixError(interp), NULL); result = TCL_ERROR; @@ -2128,6 +2240,8 @@ ChanClose( } } } while (e != Z_STREAM_END); + e = deflateEnd(&cd->inStream); + } else { e = inflateEnd(&cd->outStream); } @@ -2140,7 +2254,7 @@ ChanClose( ckfree(cd->outBuffer); cd->outBuffer = NULL; } - return TCL_OK; + return result; } static int @@ -2162,21 +2276,34 @@ ChanInput( cd->inStream.next_out = (Bytef *) buf; cd->inStream.avail_out = toRead; + if (cd->inStream.next_in == NULL) { + goto doReadFirst; + } while (1) { e = inflate(&cd->inStream, flush); if ((e == Z_STREAM_END) || (e==Z_OK && cd->inStream.avail_out==0)) { return toRead - cd->inStream.avail_out; } if (e != Z_OK) { - *errorCodePtr = EINVAL; + Tcl_SetChannelError(cd->parent, + Tcl_NewStringObj(cd->inStream.msg, -1)); return -1; } /* + * Check if the inflate stopped early. + */ + + if (cd->inStream.avail_in > 0) { + continue; + } + + /* * Emptied the buffer of data from the underlying channel. Get some * more. */ + doReadFirst: read = Tcl_ReadRaw(cd->parent, cd->inBuffer, cd->inAllocated); if (read < 0) { *errorCodePtr = Tcl_GetErrno(); @@ -2186,6 +2313,7 @@ ChanInput( } cd->inStream.next_in = (Bytef *) cd->inBuffer; + cd->inStream.avail_in = read; } } @@ -2199,7 +2327,7 @@ ChanOutput( ZlibChannelData *cd = instanceData; Tcl_DriverOutputProc *outProc = Tcl_ChannelOutputProc(Tcl_GetChannelType(cd->parent)); - int e; + int e, produced; if (cd->mode == TCL_ZLIB_STREAM_INFLATE) { return outProc(Tcl_GetChannelInstanceData(cd->parent), buf, toWrite, @@ -2213,17 +2341,19 @@ ChanOutput( cd->outStream.avail_out = cd->outAllocated; e = deflate(&cd->outStream, Z_NO_FLUSH); + produced = cd->outAllocated - cd->outStream.avail_out; if (e == Z_OK && cd->outStream.avail_out > 0) { - if (Tcl_WriteRaw(cd->parent, cd->outBuffer, - (int) cd->outAllocated - cd->outStream.avail_out) < 0) { + if (Tcl_WriteRaw(cd->parent, cd->outBuffer, produced) < 0) { *errorCodePtr = Tcl_GetErrno(); return -1; } } - } while (e == Z_OK && cd->outStream.avail_in > 0); + } while (e == Z_OK && produced > 0 && cd->outStream.avail_in > 0); if (e != Z_OK) { + Tcl_SetChannelError(cd->parent, + Tcl_NewStringObj(cd->outStream.msg, -1)); *errorCodePtr = EINVAL; return -1; } @@ -2303,7 +2433,7 @@ ChanGetOption( ZlibChannelData *cd = instanceData; Tcl_DriverGetOptionProc *getOptionProc = Tcl_ChannelGetOptionProc(Tcl_GetChannelType(cd->parent)); - static const char *chanOptions = "crc header"; + static const char *chanOptions = "checksum header"; /* * The "crc" option reports the current CRC (calculated with the Adler32 @@ -2311,12 +2441,10 @@ ChanGetOption( * been processed so far. */ - if (optionName == NULL || strcmp(optionName, "-crc") == 0) { + if (optionName == NULL || strcmp(optionName, "-checksum") == 0) { uLong crc; char buf[12]; - // TODO: flush? - if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { crc = cd->outStream.adler; } else { @@ -2325,7 +2453,7 @@ ChanGetOption( sprintf(buf, "0x%lx", crc); if (optionName == NULL) { - Tcl_DStringAppendElement(dsPtr, "-crc"); + Tcl_DStringAppendElement(dsPtr, "-checksum"); Tcl_DStringAppendElement(dsPtr, buf); } else { Tcl_DStringAppend(dsPtr, buf, -1); @@ -2405,6 +2533,7 @@ ChanBlockMode( return TCL_OK; } +#if 0 /* unused */ static int ChanHandler( ClientData instanceData, @@ -2416,15 +2545,42 @@ ChanHandler( return interestMask; } +#endif + +/* + *---------------------------------------------------------------------- + * + * ZlibStackChannel -- + * + * Stacks either compression or decompression onto a channel. + * + * Results: + * The stacked channel, or NULL if there was an error. + * + *---------------------------------------------------------------------- + */ static Tcl_Channel ZlibStackChannel( - Tcl_Interp *interp, - int mode, - int format, - int level, - Tcl_Channel channel, - Tcl_Obj *gzipHeaderDictPtr) + Tcl_Interp *interp, /* Where to write error messages. */ + int mode, /* Whether this is a compressing transform + * (TCL_ZLIB_STREAM_DEFLATE) or a + * decompressing transform + * (TCL_ZLIB_STREAM_INFLATE). Note that + * compressing transforms require that the + * channel is writable, and decompressing + * transforms require that the channel is + * readable. */ + int format, /* One of the TCL_ZLIB_FORMAT_* values that + * indicates what compressed format to allow. + * TCL_ZLIB_FORMAT_AUTO is only supported for + * decompressing transforms. */ + int level, /* What compression level to use. Ignored for + * decompressing transforms. */ + Tcl_Channel channel, /* The channel to attach to. */ + Tcl_Obj *gzipHeaderDictPtr) /* A description of header to use, or NULL to + * use a default. Ignored if not compressing + * to produce gzip-format data. */ { ZlibChannelData *cd = (ZlibChannelData *) ckalloc(sizeof(ZlibChannelData)); @@ -2462,13 +2618,13 @@ ZlibStackChannel( } if (format == TCL_ZLIB_FORMAT_RAW) { - wbits = -MAX_WBITS; + wbits = WBITS_RAW; } else if (format == TCL_ZLIB_FORMAT_ZLIB) { - wbits = MAX_WBITS; + wbits = WBITS_ZLIB; } else if (format == TCL_ZLIB_FORMAT_GZIP) { - wbits = MAX_WBITS | GZIP_MAGIC_FLAG; + wbits = WBITS_GZIP; } else if (format == TCL_ZLIB_FORMAT_AUTO) { - wbits = MAX_WBITS | AUTO_MAGIC_FLAG; + wbits = WBITS_AUTODETECT; } else { Tcl_Panic("bad format: %d", format); } @@ -2507,7 +2663,7 @@ ZlibStackChannel( } chan = Tcl_StackChannel(interp, &zlibChannelType, cd, - TCL_READABLE | TCL_WRITABLE, channel); + Tcl_GetChannelMode(channel), channel); if (chan == NULL) { goto error; } @@ -2527,21 +2683,41 @@ ZlibStackChannel( ckfree((char *) cd); return NULL; } -#endif /* ENABLE_CHANSTACKING */ /* - * Finally, the TclZlibInit function. Used to install the zlib API. + *---------------------------------------------------------------------- + * Finally, the TclZlibInit function. Used to install the zlib API. + *---------------------------------------------------------------------- */ int TclZlibInit( Tcl_Interp *interp) { + /* + * This does two things. It creates a counter used in the creation of + * stream commands, and it creates the namespace that will contain those + * commands. + */ + Tcl_Eval(interp, "namespace eval ::tcl::zlib {variable cmdcounter 0}"); - Tcl_CreateObjCommand(interp, "zlib", ZlibCmd, 0, 0); + + /* + * Create the public scripted interface to this file's functionality. + */ + + Tcl_CreateObjCommand(interp, "zlib", TclZlibCmd, 0, 0); return TCL_OK; } -#else /* HAVE_ZLIB */ + +/* + *---------------------------------------------------------------------- + * Stubs used when a suitable zlib installation was not found during + * configure. + *---------------------------------------------------------------------- + */ + +#else /* !HAVE_ZLIB */ int Tcl_ZlibStreamInit( Tcl_Interp *interp, diff --git a/tests/zlib.test b/tests/zlib.test index 1cb1676..380edaf 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.4 2008/12/14 13:51:29 dkf Exp $ +# RCS: @(#) $Id: zlib.test,v 1.5 2008/12/18 10:37:43 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -69,12 +69,12 @@ test zlib-7.0 {zlib stream} -constraints zlib -returnCodes error -setup { $s ? } -cleanup { $s close -} -result {bad option "?": must be add, adler32, close, eof, finalize, flush, fullflush, get, put, or reset} +} -result {bad option "?": must be add, checksum, close, eof, finalize, flush, fullflush, get, put, or reset} test zlib-7.1 {zlib stream} zlib { set s [zlib stream compress] $s put -finalize abcdeEDCBA set data [$s get] - set result [list [$s get] [format %x [$s adler32]]] + set result [list [$s get] [format %x [$s checksum]]] $s close lappend result [zlib decompress $data] } {{} 136f033f abcdeEDCBA} @@ -82,7 +82,7 @@ test zlib-7.2 {zlib stream} zlib { set s [zlib stream decompress] $s put -finalize [zlib compress abcdeEDCBA] set data [$s get] - set result [list [$s get] [format %x [$s adler32]]] + set result [list [$s get] [format %x [$s checksum]]] $s close lappend result $data } {{} 136f033f abcdeEDCBA} @@ -90,7 +90,7 @@ test zlib-7.3 {zlib stream} zlib { set s [zlib stream deflate] $s put -finalize abcdeEDCBA set data [$s get] - set result [list [$s get] [format %x [$s adler32]]] + set result [list [$s get] [format %x [$s checksum]]] $s close lappend result [zlib inflate $data] } {{} 1 abcdeEDCBA} @@ -98,10 +98,35 @@ test zlib-7.4 {zlib stream} zlib { set s [zlib stream inflate] $s put -finalize [zlib deflate abcdeEDCBA] set data [$s get] - set result [list [$s get] [format %x [$s adler32]]] + set result [list [$s get] [format %x [$s checksum]]] $s close lappend result $data } {{} 1 abcdeEDCBA} + +test zlib-8.1 {zlib transformation} -constraints zlib -setup { + set file [makeFile {} test.gz] +} -body { + set f [zlib push gzip [open $file w] -header {comment gorp}] + puts $f "ok" + close $f + set f [zlib push gunzip [open $file]] + list [gets $f] [dict get [chan configure $f -header] comment] +} -cleanup { + close $f + removeFile $file +} -result {ok gorp} +test zlib-8.2 {zlib transformation} -constraints zlib -setup { + set file [makeFile {} test.z] +} -body { + set f [zlib push compress [open $file w]] + puts $f "ok" + close $f + set f [zlib push decompress [open $file]] + gets $f +} -cleanup { + close $f + removeFile $file +} -result ok ::tcltest::cleanupTests return -- cgit v0.12 From 374bd78bd6abe396658c2f4cab41ff8c61fa730c Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 11:48:58 +0000 Subject: Converted 'if 0' into 'knownBug' constraints --- tests/chanio.test | 322 ++++++++++++++---------------------------------------- 1 file changed, 80 insertions(+), 242 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 7e0bda4..5ac00cb 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -2,18 +2,18 @@ # Functionality covered: operation of all IO commands, and all procedures # defined in generic/tclIO.c. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.17 2008/12/18 09:43:44 ferrieux Exp $ +# RCS: @(#) $Id: chanio.test,v 1.18 2008/12/18 11:48:58 dkf Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -92,7 +92,7 @@ namespace eval ::tcl::test::io { chan close $f return $a } - + test chan-io-1.5 {Tcl_WriteChars: CheckChannelErrors} {emptyTest} { # no test, need to cause an async error. } {} @@ -115,68 +115,49 @@ set path(test2) [makeFile {} test2] test chan-io-1.8 {Tcl_WriteChars: WriteChars} { # This test written for SF bug #506297. # - # Executing this test without the fix for the referenced bug - # applied to tcl will cause tcl, more specifically WriteChars, to - # go into an infinite loop. - + # Executing this test without the fix for the referenced bug applied to + # tcl will cause tcl, more specifically WriteChars, to go into an infinite + # loop. set f [open $path(test2) w] chan configure $f -encoding iso2022-jp chan puts -nonewline $f [format %s%c [string repeat " " 4] 12399] chan close $f contents $path(test2) } " \x1b\$B\$O\x1b(B" - test chan-io-1.9 {Tcl_WriteChars: WriteChars} { - # When closing a channel with an encoding that appends - # escape bytes, check for the case where the escape - # bytes overflow the current IO buffer. The bytes - # should be moved into a new buffer. - + # When closing a channel with an encoding that appends escape bytes, check + # for the case where the escape bytes overflow the current IO buffer. The + # bytes should be moved into a new buffer. set data "1234567890 [format %c 12399]" - set sizes [list] - # With default buffer size set f [open $path(test2) w] chan configure $f -encoding iso2022-jp chan puts -nonewline $f $data chan close $f lappend sizes [file size $path(test2)] - - # With buffer size equal to the length - # of the data, the escape bytes would + # With buffer size equal to the length of the data, the escape bytes would # go into the next buffer. - set f [open $path(test2) w] chan configure $f -encoding iso2022-jp -buffersize 16 chan puts -nonewline $f $data chan close $f lappend sizes [file size $path(test2)] - - # With buffer size that is large enough - # to hold 1 byte of escaped data, but - # not all 3. This should not write - # the escape bytes to the first buffer - # and then again to the second buffer. - + # With buffer size that is large enough to hold 1 byte of escaped data, + # but not all 3. This should not write the escape bytes to the first + # buffer and then again to the second buffer. set f [open $path(test2) w] chan configure $f -encoding iso2022-jp -buffersize 17 chan puts -nonewline $f $data chan close $f lappend sizes [file size $path(test2)] - - # With buffer size that can hold 2 out of - # 3 bytes of escaped data. - + # With buffer size that can hold 2 out of 3 bytes of escaped data. set f [open $path(test2) w] chan configure $f -encoding iso2022-jp -buffersize 18 chan puts -nonewline $f $data chan close $f lappend sizes [file size $path(test2)] - - # With buffer size that can hold all the - # data and escape bytes. - + # With buffer size that can hold all the data and escape bytes. set f [open $path(test2) w] chan configure $f -encoding iso2022-jp -buffersize 19 chan puts -nonewline $f $data @@ -186,7 +167,6 @@ test chan-io-1.9 {Tcl_WriteChars: WriteChars} { test chan-io-2.1 {WriteBytes} { # loop until all bytes are written - set f [open $path(test1) w] chan configure $f -encoding binary -buffersize 16 -translation crlf chan puts $f "abcdefghijklmnopqrstuvwxyz" @@ -196,7 +176,6 @@ test chan-io-2.1 {WriteBytes} { test chan-io-2.2 {WriteBytes: savedLF > 0} { # After flushing buffer, there was a \n left over from the last # \n -> \r\n expansion. It gets stuck at beginning of this buffer. - set f [open $path(test1) w] chan configure $f -encoding binary -buffersize 16 -translation crlf chan puts -nonewline $f "123456789012345\n12" @@ -208,7 +187,6 @@ test chan-io-2.3 {WriteBytes: flush on line} { # Tcl "line" buffering has weird behavior: if current buffer contains # a \n, entire buffer gets flushed. Logical behavior would be to flush # only up to the \n. - set f [open $path(test1) w] chan configure $f -encoding binary -buffering line -translation crlf chan puts -nonewline $f "\n12" @@ -228,7 +206,6 @@ test chan-io-2.4 {WriteBytes: reset sawLF after each buffer} { test chan-io-3.1 {WriteChars: compatibility with WriteBytes} { # loop until all bytes are written - set f [open $path(test1) w] chan configure $f -encoding ascii -buffersize 16 -translation crlf chan puts $f "abcdefghijklmnopqrstuvwxyz" @@ -238,7 +215,6 @@ test chan-io-3.1 {WriteChars: compatibility with WriteBytes} { test chan-io-3.2 {WriteChars: compatibility with WriteBytes: savedLF > 0} { # After flushing buffer, there was a \n left over from the last # \n -> \r\n expansion. It gets stuck at beginning of this buffer. - set f [open $path(test1) w] chan configure $f -encoding ascii -buffersize 16 -translation crlf chan puts -nonewline $f "123456789012345\n12" @@ -250,7 +226,6 @@ test chan-io-3.3 {WriteChars: compatibility with WriteBytes: flush on line} { # Tcl "line" buffering has weird behavior: if current buffer contains # a \n, entire buffer gets flushed. Logical behavior would be to flush # only up to the \n. - set f [open $path(test1) w] chan configure $f -encoding ascii -buffering line -translation crlf chan puts -nonewline $f "\n12" @@ -260,7 +235,6 @@ test chan-io-3.3 {WriteChars: compatibility with WriteBytes: flush on line} { } "\r\n12" test chan-io-3.4 {WriteChars: loop over stage buffer} { # stage buffer maps to more than can be queued at once. - set f [open $path(test1) w] chan configure $f -encoding jis0208 -buffersize 16 chan puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" @@ -269,10 +243,9 @@ test chan-io-3.4 {WriteChars: loop over stage buffer} { lappend x [contents $path(test1)] } [list "!)!)!)!)!)!)!)!)" "!)!)!)!)!)!)!)!)!)!)!)!)!)!)!)"] test chan-io-3.5 {WriteChars: saved != 0} { - # Bytes produced by UtfToExternal from end of last channel buffer - # had to be moved to beginning of next channel buffer to preserve - # requested buffersize. - + # Bytes produced by UtfToExternal from end of last channel buffer had to + # be moved to beginning of next channel buffer to preserve requested + # buffersize. set f [open $path(test1) w] chan configure $f -encoding jis0208 -buffersize 17 chan puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" @@ -281,15 +254,14 @@ test chan-io-3.5 {WriteChars: saved != 0} { lappend x [contents $path(test1)] } [list "!)!)!)!)!)!)!)!)!" "!)!)!)!)!)!)!)!)!)!)!)!)!)!)!)"] test chan-io-3.6 {WriteChars: (stageRead + dstWrote == 0)} { - # One incomplete UTF-8 character at end of staging buffer. Backup - # in src to the beginning of that UTF-8 character and try again. + # One incomplete UTF-8 character at end of staging buffer. Backup in src + # to the beginning of that UTF-8 character and try again. # # Translate the first 16 bytes, produce 14 bytes of output, 2 left over - # (first two bytes of \uff21 in UTF-8). Given those two bytes try + # (first two bytes of \uff21 in UTF-8). Given those two bytes try # translating them again, find that no bytes are read produced, and break - # to outer loop where those two bytes will have the remaining 4 bytes - # (the last byte of \uff21 plus the all of \uff22) appended. - + # to outer loop where those two bytes will have the remaining 4 bytes (the + # last byte of \uff21 plus the all of \uff22) appended. set f [open $path(test1) w] chan configure $f -encoding shiftjis -buffersize 16 chan puts -nonewline $f "12345678901234\uff21\uff22" @@ -298,12 +270,11 @@ test chan-io-3.6 {WriteChars: (stageRead + dstWrote == 0)} { lappend x [contents $path(test1)] } [list "12345678901234\x82\x60" "12345678901234\x82\x60\x82\x61"] test chan-io-3.7 {WriteChars: (bufPtr->nextAdded > bufPtr->length)} { - # When translating UTF-8 to external, the produced bytes went past end - # of the channel buffer. This is done purpose -- we then truncate the - # bytes at the end of the partial character to preserve the requested - # blocksize on flush. The truncated bytes are moved to the beginning - # of the next channel buffer. - + # When translating UTF-8 to external, the produced bytes went past end of + # the channel buffer. This is done on purpose - we then truncate the bytes + # at the end of the partial character to preserve the requested blocksize + # on flush. The truncated bytes are moved to the beginning of the next + # channel buffer. set f [open $path(test1) w] chan configure $f -encoding jis0208 -buffersize 17 chan puts -nonewline $f "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" @@ -323,7 +294,6 @@ test chan-io-3.8 {WriteChars: reset sawLF after each buffer} { test chan-io-4.1 {TranslateOutputEOL: lf} { # search for \n - set f [open $path(test1) w] chan configure $f -buffering line -translation lf chan puts $f "abcde" @@ -333,7 +303,6 @@ test chan-io-4.1 {TranslateOutputEOL: lf} { } [list "abcde\n" "abcde\n"] test chan-io-4.2 {TranslateOutputEOL: cr} { # search for \n, replace with \r - set f [open $path(test1) w] chan configure $f -buffering line -translation cr chan puts $f "abcde" @@ -343,7 +312,6 @@ test chan-io-4.2 {TranslateOutputEOL: cr} { } [list "abcde\r" "abcde\r"] test chan-io-4.3 {TranslateOutputEOL: crlf} { # simple case: search for \n, replace with \r - set f [open $path(test1) w] chan configure $f -buffering line -translation crlf chan puts $f "abcde" @@ -352,10 +320,9 @@ test chan-io-4.3 {TranslateOutputEOL: crlf} { lappend x [contents $path(test1)] } [list "abcde\r\n" "abcde\r\n"] test chan-io-4.4 {TranslateOutputEOL: crlf} { - # keep storing more bytes in output buffer until output buffer is full. - # We have 13 bytes initially that would turn into 18 bytes. Fill - # dest buffer while (dstEnd < dstMax). - + # Keep storing more bytes in output buffer until output buffer is full. We + # have 13 bytes initially that would turn into 18 bytes. Fill dest buffer + # while (dstEnd < dstMax). set f [open $path(test1) w] chan configure $f -translation crlf -buffersize 16 chan puts -nonewline $f "1234567\n\n\n\n\nA" @@ -365,7 +332,6 @@ test chan-io-4.4 {TranslateOutputEOL: crlf} { } [list "1234567\r\n\r\n\r\n\r\n\r" "1234567\r\n\r\n\r\n\r\n\r\nA"] test chan-io-4.5 {TranslateOutputEOL: crlf} { # Check for overflow of the destination buffer - set f [open $path(test1) w] chan configure $f -translation crlf -buffersize 12 chan puts -nonewline $f "12345678901\n456789012345678901234" @@ -428,7 +394,6 @@ test chan-io-6.2 {Tcl_GetsObj: CheckChannelErrors() != 0} emptyTest { } {} test chan-io-6.3 {Tcl_GetsObj: how many have we used?} { # if (bufPtr != NULL) {oldRemoved = bufPtr->nextRemoved} - set f [open $path(test1) w] chan configure $f -translation crlf chan puts $f "abc\ndefg" @@ -465,7 +430,6 @@ append a $a append a $a test chan-io-6.6 {Tcl_GetsObj: loop test} { # if (dst >= dstEnd) - set f [open $path(test1) w] chan puts $f $a chan puts $f hi @@ -477,7 +441,6 @@ test chan-io-6.6 {Tcl_GetsObj: loop test} { } [list 256 $a] test chan-io-6.7 {Tcl_GetsObj: error in input} {stdio openpipe} { # if (FilterInputBytes(chanPtr, &gs) != 0) - set f [open "|[list [interpreter] $path(cat)]" w+] chan puts -nonewline $f "hi\nwould" chan flush $f @@ -724,7 +687,6 @@ test chan-io-6.29 {Tcl_GetsObj: crlf mode: several chars} { } [list 14 "abcd\nefgh\rijkl" 4 "mnop" -1 ""] test chan-io-6.30 {Tcl_GetsObj: crlf mode: buffer exhausted} {testchannel} { # if (eol >= dstEnd) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456789012345\r\nabcdefghijklmnoprstuvwxyz" @@ -737,7 +699,6 @@ test chan-io-6.30 {Tcl_GetsObj: crlf mode: buffer exhausted} {testchannel} { } [list 15 "123456789012345" 15] test chan-io-6.31 {Tcl_GetsObj: crlf mode: buffer exhausted, blocked} {stdio testchannel openpipe fileevent} { # (FilterInputBytes() != 0) - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {crlf lf} -buffering none chan puts -nonewline $f "bbbbbbbbbbbbbb\r\n123456789012345\r" @@ -750,7 +711,6 @@ test chan-io-6.31 {Tcl_GetsObj: crlf mode: buffer exhausted, blocked} {stdio tes } [list "bbbbbbbbbbbbbb" -1 "" 1 16] test chan-io-6.32 {Tcl_GetsObj: crlf mode: buffer exhausted, more data} {testchannel} { # not (FilterInputBytes() != 0) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456789012345\r\n123" @@ -763,7 +723,6 @@ test chan-io-6.32 {Tcl_GetsObj: crlf mode: buffer exhausted, more data} {testcha } [list 15 "123456789012345" 17 3] test chan-io-6.33 {Tcl_GetsObj: crlf mode: buffer exhausted, at eof} { # eol still equals dstEnd - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456789012345\r" @@ -776,7 +735,6 @@ test chan-io-6.33 {Tcl_GetsObj: crlf mode: buffer exhausted, at eof} { } [list 16 "123456789012345\r" 1] test chan-io-6.34 {Tcl_GetsObj: crlf mode: buffer exhausted, not followed by \n} { # not (*eol == '\n') - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456789012345\rabcd\r\nefg" @@ -876,7 +834,6 @@ test chan-io-6.42 {Tcl_GetsObj: auto mode: several chars} { } [list 4 "abcd" 4 "efgh" 4 "ijkl" 4 "mnop" -1 ""] test chan-io-6.43 {Tcl_GetsObj: input saw cr} {stdio testchannel openpipe fileevent} { # if (chanPtr->flags & INPUT_SAW_CR) - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto lf} -buffering none chan puts -nonewline $f "bbbbbbbbbbbbbbb\n123456789abcdef\r" @@ -893,7 +850,6 @@ test chan-io-6.43 {Tcl_GetsObj: input saw cr} {stdio testchannel openpipe fileev } [list "bbbbbbbbbbbbbbb" 15 "123456789abcdef" 1 4 "abcd" 0 3 "efg"] test chan-io-6.44 {Tcl_GetsObj: input saw cr, not followed by cr} {stdio testchannel openpipe fileevent} { # not (*eol == '\n') - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto lf} -buffering none chan puts -nonewline $f "bbbbbbbbbbbbbbb\n123456789abcdef\r" @@ -910,7 +866,6 @@ test chan-io-6.44 {Tcl_GetsObj: input saw cr, not followed by cr} {stdio testcha } [list "bbbbbbbbbbbbbbb" 15 "123456789abcdef" 1 4 "abcd" 0 3 "efg"] test chan-io-6.45 {Tcl_GetsObj: input saw cr, skip right number of bytes} {stdio testchannel openpipe fileevent} { # Tcl_ExternalToUtf() - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto lf} -buffering none chan configure $f -encoding unicode @@ -927,7 +882,6 @@ test chan-io-6.45 {Tcl_GetsObj: input saw cr, skip right number of bytes} {stdio } [list 15 "123456789abcdef" 1 4 "abcd" 0] test chan-io-6.46 {Tcl_GetsObj: input saw cr, followed by just \n should give eof} {stdio testchannel openpipe fileevent} { # memmove() - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto lf} -buffering none chan puts -nonewline $f "bbbbbbbbbbbbbbb\n123456789abcdef\r" @@ -943,7 +897,6 @@ test chan-io-6.46 {Tcl_GetsObj: input saw cr, followed by just \n should give eo } [list 15 "123456789abcdef" 1 -1 "" 0] test chan-io-6.47 {Tcl_GetsObj: auto mode: \r at end of buffer, peek for \n} {testchannel} { # (eol == dstEnd) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456789012345\r\nabcdefghijklmnopq" @@ -956,7 +909,6 @@ test chan-io-6.47 {Tcl_GetsObj: auto mode: \r at end of buffer, peek for \n} {te } [list "123456789012345" 15] test chan-io-6.48 {Tcl_GetsObj: auto mode: \r at end of buffer, no more avail} {testchannel} { # PeekAhead() did not get any, so (eol >= dstEnd) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456789012345\r" @@ -969,7 +921,6 @@ test chan-io-6.48 {Tcl_GetsObj: auto mode: \r at end of buffer, no more avail} { } [list "123456789012345" 1] test chan-io-6.49 {Tcl_GetsObj: auto mode: \r followed by \n} {testchannel} { # if (*eol == '\n') {skip++} - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456\r\n78901" @@ -981,7 +932,6 @@ test chan-io-6.49 {Tcl_GetsObj: auto mode: \r followed by \n} {testchannel} { } [list "123456" 0 8 "78901"] test chan-io-6.50 {Tcl_GetsObj: auto mode: \r not followed by \n} {testchannel} { # not (*eol == '\n') - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456\r78901" @@ -993,7 +943,6 @@ test chan-io-6.50 {Tcl_GetsObj: auto mode: \r not followed by \n} {testchannel} } [list "123456" 0 7 "78901"] test chan-io-6.51 {Tcl_GetsObj: auto mode: \n} { # else if (*eol == '\n') {goto gotoeol;} - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456\n78901" @@ -1005,7 +954,6 @@ test chan-io-6.51 {Tcl_GetsObj: auto mode: \n} { } [list "123456" 7 "78901"] test chan-io-6.52 {Tcl_GetsObj: saw EOF character} {testchannel} { # if (eof != NULL) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "123456\x1ak9012345\r" @@ -1018,7 +966,6 @@ test chan-io-6.52 {Tcl_GetsObj: saw EOF character} {testchannel} { } [list "123456" 0 6 ""] test chan-io-6.53 {Tcl_GetsObj: device EOF} { # didn't produce any bytes - set f [open $path(test1) w] chan close $f set f [open $path(test1)] @@ -1028,7 +975,6 @@ test chan-io-6.53 {Tcl_GetsObj: device EOF} { } {-1 {} 1} test chan-io-6.54 {Tcl_GetsObj: device EOF} { # got some bytes before EOF. - set f [open $path(test1) w] chan puts -nonewline $f abc chan close $f @@ -1039,7 +985,6 @@ test chan-io-6.54 {Tcl_GetsObj: device EOF} { } {3 abc 1} test chan-io-6.55 {Tcl_GetsObj: overconverted} { # Tcl_ExternalToUtf(), make sure state updated - set f [open $path(test1) w] chan configure $f -encoding iso2022-jp chan puts $f "there\u4e00ok\n\u4e01more bytes\nhere" @@ -1073,7 +1018,6 @@ test chan-io-6.56 {Tcl_GetsObj: incomplete lines should disable file events} {st test chan-io-7.1 {FilterInputBytes: split up character at end of buffer} { # (result == TCL_CONVERT_MULTIBYTE) - set f [open $path(test1) w] chan configure $f -encoding shiftjis chan puts $f "1234567890123\uff10\uff11\uff12\uff13\uff14\nend" @@ -1086,7 +1030,6 @@ test chan-io-7.1 {FilterInputBytes: split up character at end of buffer} { } "1234567890123\uff10\uff11\uff12\uff13\uff14" test chan-io-7.2 {FilterInputBytes: split up character in middle of buffer} { # (bufPtr->nextAdded < bufPtr->bufLength) - set f [open $path(test1) w] chan configure $f -encoding binary chan puts -nonewline $f "1234567890\n123\x82\x4f\x82\x50\x82" @@ -1132,7 +1075,6 @@ test chan-io-7.4 {FilterInputBytes: recover from split up character} {stdio open test chan-io-8.1 {PeekAhead: only go to device if no more cached data} {testchannel} { # (bufPtr->nextPtr == NULL) - set f [open $path(test1) w] chan configure $f -encoding ascii -translation lf chan puts -nonewline $f "123456789012345\r\n2345678" @@ -1147,7 +1089,6 @@ test chan-io-8.1 {PeekAhead: only go to device if no more cached data} {testchan } "7" test chan-io-8.2 {PeekAhead: only go to device if no more cached data} {stdio testchannel openpipe fileevent} { # not (bufPtr->nextPtr == NULL) - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation lf -encoding ascii -buffering none chan puts -nonewline $f "123456789012345\r\nbcdefghijklmnopqrstuvwxyz" @@ -1167,7 +1108,6 @@ test chan-io-8.2 {PeekAhead: only go to device if no more cached data} {stdio te } [list -1 "" 42 15 "123456789012345" 25] test chan-io-8.3 {PeekAhead: no cached data available} {stdio testchannel openpipe fileevent} { # (bytesLeft == 0) - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto binary} chan puts -nonewline $f "abcdefghijklmno\r" @@ -1181,18 +1121,15 @@ append a "123456789012345678901234567890" append a "1234567890123456789012345678901" test chan-io-8.4 {PeekAhead: cached data available in this buffer} { # not (bytesLeft == 0) - set f [open $path(test1) w+] chan configure $f -translation binary chan puts $f "${a}\r\nabcdef" chan close $f set f [open $path(test1)] chan configure $f -encoding binary -translation auto - - # "${a}\r" was converted in one operation (because ENCODING_LINESIZE - # is 30). To check if "\n" follows, calls PeekAhead and determines - # that cached data is available in buffer w/o having to call driver. - + # "${a}\r" was converted in one operation (because ENCODING_LINESIZE is + # 30). To check if "\n" follows, calls PeekAhead and determines that + # cached data is available in buffer w/o having to call driver. set x [chan gets $f] chan close $f set x @@ -1200,7 +1137,6 @@ test chan-io-8.4 {PeekAhead: cached data available in this buffer} { unset a test chan-io-8.5 {PeekAhead: don't peek if last read was short} {stdio testchannel openpipe fileevent} { # (bufPtr->nextAdded < bufPtr->length) - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto binary} chan puts -nonewline $f "abcdefghijklmno\r" @@ -1212,7 +1148,6 @@ test chan-io-8.5 {PeekAhead: don't peek if last read was short} {stdio testchann } {15 abcdefghijklmno 1} test chan-io-8.6 {PeekAhead: change to non-blocking mode} {stdio testchannel openpipe fileevent} { # ((chanPtr->flags & CHANNEL_NONBLOCKING) == 0) - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto binary} -buffersize 16 chan puts -nonewline $f "abcdefghijklmno\r" @@ -1224,7 +1159,6 @@ test chan-io-8.6 {PeekAhead: change to non-blocking mode} {stdio testchannel ope } {15 abcdefghijklmno 1} test chan-io-8.7 {PeekAhead: cleanup} {stdio testchannel openpipe fileevent} { # Make sure bytes are removed from buffer. - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -translation {auto binary} -buffering none chan puts -nonewline $f "abcdefghijklmno\r" @@ -1245,11 +1179,9 @@ test chan-io-10.1 {Tcl_ReadChars: CheckChannelErrors} emptyTest { test chan-io-10.2 {Tcl_ReadChars: loop until enough copied} { # one time # for (copied = 0; (unsigned) toRead > 0; ) - set f [open $path(test1) w] chan puts $f abcdefghijklmnop chan close $f - set f [open $path(test1)] set x [chan read $f 5] chan close $f @@ -1258,11 +1190,9 @@ test chan-io-10.2 {Tcl_ReadChars: loop until enough copied} { test chan-io-10.3 {Tcl_ReadChars: loop until enough copied} { # multiple times # for (copied = 0; (unsigned) toRead > 0; ) - set f [open $path(test1) w] chan puts $f abcdefghijklmnopqrstuvwxyz chan close $f - set f [open $path(test1)] chan configure $f -buffersize 16 # here @@ -1272,11 +1202,9 @@ test chan-io-10.3 {Tcl_ReadChars: loop until enough copied} { } {abcdefghijklmnopqrs} test chan-io-10.4 {Tcl_ReadChars: no more in channel buffer} { # (copiedNow < 0) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijkl chan close $f - set f [open $path(test1)] # here set x [chan read $f 1000] @@ -1285,11 +1213,9 @@ test chan-io-10.4 {Tcl_ReadChars: no more in channel buffer} { } {abcdefghijkl} test chan-io-10.5 {Tcl_ReadChars: stop on EOF} { # (chanPtr->flags & CHANNEL_EOF) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijkl chan close $f - set f [open $path(test1)] # here set x [chan read $f 1000] @@ -1299,7 +1225,6 @@ test chan-io-10.5 {Tcl_ReadChars: stop on EOF} { test chan-io-11.1 {ReadBytes: want to read a lot} { # ((unsigned) toRead > (unsigned) srcLen) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijkl chan close $f @@ -1312,7 +1237,6 @@ test chan-io-11.1 {ReadBytes: want to read a lot} { } {abcdefghijkl} test chan-io-11.2 {ReadBytes: want to read all} { # ((unsigned) toRead > (unsigned) srcLen) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijkl chan close $f @@ -1325,7 +1249,6 @@ test chan-io-11.2 {ReadBytes: want to read all} { } {abcdefghijkl} test chan-io-11.3 {ReadBytes: allocate more space} { # (toRead > length - offset - 1) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijklmnopqrstuvwxyz chan close $f @@ -1338,7 +1261,6 @@ test chan-io-11.3 {ReadBytes: allocate more space} { } {abcdefghijklmnopqrstuvwxyz} test chan-io-11.4 {ReadBytes: EOF char found} { # (TranslateInputEOL() != 0) - set f [open $path(test1) w] chan puts $f abcdefghijklmnopqrstuvwxyz chan close $f @@ -1352,7 +1274,6 @@ test chan-io-11.4 {ReadBytes: EOF char found} { test chan-io-12.1 {ReadChars: want to read a lot} { # ((unsigned) toRead > (unsigned) srcLen) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijkl chan close $f @@ -1364,7 +1285,6 @@ test chan-io-12.1 {ReadChars: want to read a lot} { } {abcdefghijkl} test chan-io-12.2 {ReadChars: want to read all} { # ((unsigned) toRead > (unsigned) srcLen) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijkl chan close $f @@ -1376,7 +1296,6 @@ test chan-io-12.2 {ReadChars: want to read all} { } {abcdefghijkl} test chan-io-12.3 {ReadChars: allocate more space} { # (toRead > length - offset - 1) - set f [open $path(test1) w] chan puts -nonewline $f abcdefghijklmnopqrstuvwxyz chan close $f @@ -1389,19 +1308,16 @@ test chan-io-12.3 {ReadChars: allocate more space} { } {abcdefghijklmnopqrstuvwxyz} test chan-io-12.4 {ReadChars: split-up char} {stdio testchannel openpipe fileevent} { # (srcRead == 0) - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -encoding binary -buffering none -buffersize 16 chan puts -nonewline $f "123456789012345\x96" chan configure $f -encoding shiftjis -blocking 0 - chan event $f read [namespace code "ready $f"] proc ready {f} { variable x lappend x [chan read $f] [testchannel inputbuffered $f] } variable x {} - chan configure $f -encoding shiftjis vwait [namespace which -variable x] chan configure $f -encoding binary -blocking 1 @@ -1470,7 +1386,6 @@ test chan-io-13.2 {TranslateInputEOL: crlf mode} { } "abcd\ndef\n" test chan-io-13.3 {TranslateInputEOL: crlf mode: naked cr} { # (src >= srcMax) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "abcd\r\ndef\r" @@ -1483,7 +1398,6 @@ test chan-io-13.3 {TranslateInputEOL: crlf mode: naked cr} { } "abcd\ndef\r" test chan-io-13.4 {TranslateInputEOL: crlf mode: cr followed by not \n} { # (src >= srcMax) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "abcd\r\ndef\rfgh" @@ -1496,7 +1410,6 @@ test chan-io-13.4 {TranslateInputEOL: crlf mode: cr followed by not \n} { } "abcd\ndef\rfgh" test chan-io-13.5 {TranslateInputEOL: crlf mode: naked lf} { # (src >= srcMax) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "abcd\r\ndef\nfgh" @@ -1510,10 +1423,8 @@ test chan-io-13.5 {TranslateInputEOL: crlf mode: naked lf} { test chan-io-13.6 {TranslateInputEOL: auto mode: saw cr in last segment} {stdio testchannel openpipe fileevent} { # (chanPtr->flags & INPUT_SAW_CR) # This test may fail on slower machines. - set f [open "|[list [interpreter] $path(cat)]" w+] chan configure $f -blocking 0 -buffering none -translation {auto lf} - chan event $f read [namespace code "ready $f"] proc ready {f} { variable x @@ -1521,21 +1432,17 @@ test chan-io-13.6 {TranslateInputEOL: auto mode: saw cr in last segment} {stdio } variable x {} variable y {} - chan puts -nonewline $f "abcdefghj\r" after 500 [namespace code {set y ok}] vwait [namespace which -variable y] - chan puts -nonewline $f "\n01234" after 500 [namespace code {set y ok}] vwait [namespace which -variable y] - chan close $f set x } [list "abcdefghj\n" 1 "01234" 0] test chan-io-13.7 {TranslateInputEOL: auto mode: naked \r} {testchannel openpipe} { # (src >= srcMax) - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "abcd\r" @@ -1548,7 +1455,6 @@ test chan-io-13.7 {TranslateInputEOL: auto mode: naked \r} {testchannel openpipe } [list "abcd\n" 1] test chan-io-13.8 {TranslateInputEOL: auto mode: \r\n} { # (*src == '\n') - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "abcd\r\ndef" @@ -1572,7 +1478,6 @@ test chan-io-13.9 {TranslateInputEOL: auto mode: \r followed by not \n} { } "abcd\ndef" test chan-io-13.10 {TranslateInputEOL: auto mode: \n} { # not (*src == '\r') - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "abcd\ndef" @@ -1585,7 +1490,6 @@ test chan-io-13.10 {TranslateInputEOL: auto mode: \n} { } "abcd\ndef" test chan-io-13.11 {TranslateInputEOL: EOF char} { # (*chanPtr->inEofChar != '\0') - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "abcd\ndefgh" @@ -1598,7 +1502,6 @@ test chan-io-13.11 {TranslateInputEOL: EOF char} { } "abcd\nd" test chan-io-13.12 {TranslateInputEOL: find EOF char in src} { # (*chanPtr->inEofChar != '\0') - set f [open $path(test1) w] chan configure $f -translation lf chan puts -nonewline $f "\r\n\r\n\r\nab\r\n\r\ndef\r\n\r\n\r\n" @@ -1610,11 +1513,11 @@ test chan-io-13.12 {TranslateInputEOL: find EOF char in src} { set x } "\n\n\nab\n\nd" -# Test standard handle management. The functions tested are -# Tcl_SetStdChannel and Tcl_GetStdChannel. Incidentally we are -# also testing channel table management. +# Test standard handle management. The functions tested are Tcl_SetStdChannel +# and Tcl_GetStdChannel. Incidentally we are also testing channel table +# management. -if {[info commands testchannel] != ""} { +if {[info commands testchannel] ne ""} { set consoleFileNames [lsort [testchannel open]] } else { # just to avoid an error @@ -1789,12 +1692,12 @@ test chan-io-15.1 {Tcl_CreateChan CloseHandler} emptyTest { test chan-io-16.1 {Tcl_DeleteChan CloseHandler} emptyTest { } {} -# Test channel table management. The functions tested are -# GetChannelTable, DeleteChannelTable, Tcl_RegisterChannel, -# Tcl_UnregisterChannel, Tcl_GetChannel and Tcl_CreateChannel. +# Test channel table management. The functions tested are GetChannelTable, +# DeleteChannelTable, Tcl_RegisterChannel, Tcl_UnregisterChannel, +# Tcl_GetChannel and Tcl_CreateChannel. # -# These functions use "eof stdin" to ensure that the standard -# channels are added to the channel table of the interpreter. +# These functions use "eof stdin" to ensure that the standard channels are +# added to the channel table of the interpreter. test chan-io-17.1 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} { set l1 [testchannel refcount stdin] @@ -1960,11 +1863,11 @@ test chan-io-20.5 {Tcl_CreateChannel: install channel in empty slot} {stdio open test chan-io-21.1 {Chan CloseChannelsOnExit} emptyTest { } {} -# Test management of attributes associated with a channel, such as -# its default translation, its name and type, etc. The functions -# tested in this group are Tcl_GetChannelName, -# Tcl_GetChannelType and Tcl_GetChannelFile. Tcl_GetChannelInstanceData -# not tested because files do not use the instance data. +# Test management of attributes associated with a channel, such as its default +# translation, its name and type, etc. The functions tested in this group are +# Tcl_GetChannelName, Tcl_GetChannelType and Tcl_GetChannelFile. +# Tcl_GetChannelInstanceData not tested because files do not use the instance +# data. test chan-io-22.1 {Tcl_GetChannelMode} emptyTest { # Not used anywhere in Tcl. @@ -2018,7 +1921,6 @@ test chan-io-25.2 {Tcl_GetChannelHandle, output} {testchannel} { test chan-io-26.1 {Tcl_GetChannelInstanceData} {stdio openpipe} { # "pid" command uses Tcl_GetChannelInstanceData # Don't care what pid is (but must be a number), just want to exercise it. - set f [open "|[list [interpreter] << exit]"] expr [pid $f] chan close $f @@ -2128,7 +2030,8 @@ test chan-io-27.6 {FlushChannel, async flushing, async chan close} \ } } ok -# Tests closing a channel. The functions tested are Chan CloseChannel and Tcl_Chan Close. +# Tests closing a channel. The functions tested are Chan CloseChannel and +# Tcl_Chan Close. test chan-io-28.1 {Chan CloseChannel called when all references are dropped} {testchannel} { file delete $path(test1) @@ -2164,14 +2067,11 @@ test chan-io-28.3 {Chan CloseChannel, not called before output queue is empty} \ file delete $path(output) set f [open $path(pipe) w] chan puts $f { - # Need to not have eof char appended on chan close, because the other # side of the pipe already chan closed, so that writing would cause an # error "invalid file". - chan configure stdout -eofchar {} chan configure stderr -eofchar {} - set f [open $path(output) w] chan configure $f -translation lf -buffering none for {set x 0} {$x < 20} {incr x} { @@ -2189,7 +2089,6 @@ test chan-io-28.3 {Chan CloseChannel, not called before output queue is empty} \ chan close $f set f [open "|[list [interpreter] pipe]" r+] chan configure $f -blocking off -eofchar {} - chan puts -nonewline $f $x chan close $f set counter 0 @@ -2229,7 +2128,7 @@ test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel o chan close $f set l } {file1 file2} -if {0} {test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { +test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} knownBug { set cat [makeFile { fconfigure stdout -buffering line while {[gets stdin line]>=0} {puts $line} @@ -2249,8 +2148,8 @@ if {0} {test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { vwait ::done close $::ff r list $::done $::acc -} {Succeeded {Hey DONE}}} -if {0} {test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { +} {Succeeded {Hey DONE}} +test chan-io-28.7 {Tcl_CloseEx (half-close) socket} knownBug { set echo [makeFile { proc accept {s args} {set ::sok $s} set s [socket -server accept 0] @@ -2278,7 +2177,8 @@ if {0} {test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { close $::s r close $::ff list $::done $::acc -} {Succeeded {Hey DONE}}} +} {Succeeded {Hey DONE}} + test chan-io-29.1 {Tcl_WriteChars, channel not writable} { list [catch {chan puts stdin hello} msg] $msg } {1 {channel "stdin" wasn't opened for writing}} @@ -2811,7 +2711,6 @@ test chan-io-29.34 {Tcl_Chan Close, async flush on chan close, using sockets} {s variable c variable x set l [chan gets $s] - if {[chan eof $s]} { chan close $s set x done @@ -2830,9 +2729,8 @@ test chan-io-29.34 {Tcl_Chan Close, async flush on chan close, using sockets} {s set c } 2000 test chan-io-29.35 {Tcl_Chan Close vs chan event vs multiple interpreters} {socket tempNotMac fileevent} { - # On Mac, this test screws up sockets such that subsequent tests using port 2828 - # either cause errors or panic(). - + # On Mac, this test screws up sockets such that subsequent tests using + # port 2828 either cause errors or panic(). catch {interp delete x} catch {interp delete y} interp create x @@ -4915,7 +4813,6 @@ test chan-io-38.2 {Tcl_SetChannelBufferSize, Tcl_GetChannelBufferSize} { } {4096 10000 1 1 1 100000 1048576} test chan-io-38.3 {Tcl_SetChannelBufferSize, changing buffersize between reads} { # This test crashes the interp if Bug #427196 is not fixed - set chan [open [info script] r] chan configure $chan -buffersize 10 set var [chan read $chan 2] @@ -6516,25 +6413,21 @@ test chan-io-51.1 {Test old socket deletion on Macintosh} {socket} { } set ss [socket -server [namespace code accept] -myaddr 127.0.0.1 0] set port [lindex [chan configure $ss -sockname] 2] - variable wait "" set cs [socket 127.0.0.1 $port] vwait [namespace which -variable wait] lappend result [chan gets $cs] chan close $cs - set wait "" set cs [socket 127.0.0.1 $port] vwait [namespace which -variable wait] lappend result [chan gets $cs] chan close $cs - set wait "" set cs [socket 127.0.0.1 $port] vwait [namespace which -variable wait] lappend result [chan gets $cs] chan close $cs - set wait "" set cs [socket 127.0.0.1 $port] vwait [namespace which -variable wait] @@ -6717,66 +6610,48 @@ chan puts $out "\u0410\u0410" chan close $out test chan-io-52.9 {TclCopyChannel & encodings} {fcopy} { # Copy kyrillic to UTF-8, using chan copy. - set in [open $path(kyrillic.txt) r] set out [open $path(utf8-fcopy.txt) w] - chan configure $in -encoding koi8-r -translation lf chan configure $out -encoding utf-8 -translation lf - chan copy $in $out chan close $in chan close $out - # Do the same again, but differently (read/chan puts). - set in [open $path(kyrillic.txt) r] set out [open $path(utf8-rp.txt) w] - chan configure $in -encoding koi8-r -translation lf chan configure $out -encoding utf-8 -translation lf - chan puts -nonewline $out [chan read $in] - chan close $in chan close $out - list [file size $path(kyrillic.txt)] \ [file size $path(utf8-fcopy.txt)] \ [file size $path(utf8-rp.txt)] } {3 5 5} test chan-io-52.10 {TclCopyChannel & encodings} {fcopy} { - # encoding to binary (=> implies that the - # internal utf-8 is written) - + # encoding to binary (=> implies that the internal utf-8 is written) set in [open $path(kyrillic.txt) r] set out [open $path(utf8-fcopy.txt) w] - chan configure $in -encoding koi8-r -translation lf # -translation binary is also -encoding binary chan configure $out -translation binary - chan copy $in $out chan close $in chan close $out - file size $path(utf8-fcopy.txt) } 5 test chan-io-52.11 {TclCopyChannel & encodings} {fcopy} { - # binary to encoding => the input has to be - # in utf-8 to make sense to the encoder - + # binary to encoding => the input has to be in utf-8 to make sense to the + # encoder set in [open $path(utf8-fcopy.txt) r] set out [open $path(kyrillic.txt) w] - # -translation binary is also -encoding binary chan configure $in -translation binary chan configure $out -encoding koi8-r -translation lf - chan copy $in $out chan close $in chan close $out - file size $path(kyrillic.txt) } 3 @@ -7185,7 +7060,6 @@ test chan-io-53.10 {Bug 1350564, multi-directional fcopy} -setup { test chan-io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive # event loops when there is buffered data on the channel. - proc accept {s a p} { variable as chan configure $s -translation lf @@ -7204,10 +7078,8 @@ test chan-io-54.1 {Recursive channel events} {socket fileevent} { incr x } set ss [socket -server [namespace code accept] -myaddr 127.0.0.1 0] - - # We need to delay on some systems until the creation of the - # server socket completes. - + # We need to delay on some systems until the creation of the server socket + # completes. set done 0 for {set i 0} {$i < 10} {incr i} { if {![catch {set cs [socket 127.0.0.1 [lindex [chan configure $ss -sockname] 2]]}]} { @@ -7241,18 +7113,14 @@ test chan-io-54.2 {Testing for busy-wait in recursive channel events} {socket fi set after {} variable s [socket -server [namespace code accept] -myaddr 127.0.0.1 0] proc accept {s a p} { - variable counter - variable accept - - set accept $s - set counter 0 + variable counter 0 + variable accept $s chan configure $s -blocking off -buffering line -translation lf chan event $s readable [namespace code "doit $s"] } proc doit {s} { variable counter variable after - incr counter set l [chan gets $s] if {"$l" == ""} { @@ -7263,7 +7131,6 @@ test chan-io-54.2 {Testing for busy-wait in recursive channel events} {socket fi proc doit1 {s} { variable counter variable accept - incr counter set l [chan gets $s] chan close $s @@ -7272,7 +7139,6 @@ test chan-io-54.2 {Testing for busy-wait in recursive channel events} {socket fi proc producer {} { variable s variable writer - set writer [socket 127.0.0.1 [lindex [chan configure $s -sockname] 2]] chan configure $writer -buffering line chan puts -nonewline $writer hello @@ -7281,7 +7147,6 @@ test chan-io-54.2 {Testing for busy-wait in recursive channel events} {socket fi proc newline {} { variable done variable writer - chan puts $writer hello chan flush $writer set done 1 @@ -7292,7 +7157,7 @@ test chan-io-54.2 {Testing for busy-wait in recursive channel events} {socket fi chan close $writer chan close $s after cancel $after - if {$accept != {}} {chan close $accept} + if {$accept ne {}} {chan close $accept} set counter } 1 @@ -7420,11 +7285,10 @@ test chan-io-58.1 {Tcl_NotifyChannel and error when closing} {stdio unixOrPc ope test chan-io-59.1 {Thread reference of channels} {testmainthread testchannel} { # TIP #10 - # More complicated tests (like that the reference changes as a - # channel is moved from thread to thread) can be done only in the - # extension which fully implements the moving of channels between - # threads, i.e. 'Threads'. Or we have to extend [testthread] as well. - + # More complicated tests (like that the reference changes as a channel is + # moved from thread to thread) can be done only in the extension which + # fully implements the moving of channels between threads, i.e. 'Threads'. + # Or we have to extend [testthread] as well. set f [open $path(longfile) r] set result [testchannel mthread $f] chan close $f @@ -7433,7 +7297,6 @@ test chan-io-59.1 {Thread reference of channels} {testmainthread testchannel} { test chan-io-60.1 {writing illegal utf sequences} {openpipe fileevent} { # This test will hang in older revisions of the core. - set out [open $path(script) w] chan puts $out { chan puts [encoding convertfrom identity \xe2] @@ -7456,7 +7319,6 @@ test chan-io-60.1 {writing illegal utf sequences} {openpipe fileevent} { variable x "" set result "" vwait [namespace which -variable x] - # cut of the remainder of the error stack, especially the filename set result [lreplace $result 3 3 [lindex [split [lindex $result 3] \n] 0]] list $x $result @@ -7489,59 +7351,44 @@ test chan-io-61.1 {Reset eof state after changing the eof char} -setup { removeFile eofchar } -result {77 = 23431} - # Test the cutting and splicing of channels, this is incidentially the -# attach/detach facility of package Thread, but __without any -# safeguards__. It can also be used to emulate transfer of channels -# between threads, and is used for that here. +# attach/detach facility of package Thread, but __without any safeguards__. It +# can also be used to emulate transfer of channels between threads, and is +# used for that here. test chan-io-70.0 {Cutting & Splicing channels} {testchannel} { set f [makeFile {... dummy ...} cutsplice] set c [open $f r] - set res {} lappend res [catch {chan seek $c 0 start}] testchannel cut $c - lappend res [catch {chan seek $c 0 start}] testchannel splice $c - lappend res [catch {chan seek $c 0 start}] chan close $c - removeFile cutsplice - set res } {0 1 0} - - -# Duplicate of code in "thread.test". Find a better way of doing this -# without duplication. Maybe placement into a proc which transforms to -# nop after the first call, and placement of its defintion in a -# central location. - +# Duplicate of code in "thread.test". Find a better way of doing this without +# duplication. Maybe placement into a proc which transforms to nop after the +# first call, and placement of its defintion in a central location. if {[testConstraint testthread]} { testthread errorproc ThreadError - proc ThreadError {id info} { global threadError set threadError $info } - proc ThreadNullError {id info} { # ignore } } - test chan-io-70.1 {Transfer channel} {testchannel testthread} { set f [makeFile {... dummy ...} cutsplice] set c [open $f r] - set res {} lappend res [catch {chan seek $c 0 start}] testchannel cut $c lappend res [catch {chan seek $c 0 start}] - set tid [testthread create] testthread send $tid [list set c $c] lappend res [testthread send $tid { @@ -7550,10 +7397,8 @@ test chan-io-70.1 {Transfer channel} {testchannel testthread} { chan close $c set res }] - tcltest::threadReap removeFile cutsplice - set res } {0 1 0} @@ -7721,26 +7566,19 @@ foreach {n msg expected} { f3 {-code boss -code 0 -level X -f ba} {-code 1 -level 0 -f ba} } { test chan-io-71.$n {Tcl_SetChannelError} {testchannel} { - set f [makeFile {... dummy ...} cutsplice] set c [open $f r] - set res [testchannel setchannelerror $c [lrange $msg 0 end]] chan close $c removeFile cutsplice - set res } [lrange $expected 0 end] - test chan-io-72.$n {Tcl_SetChannelErrorInterp} {testchannel} { - set f [makeFile {... dummy ...} cutsplice] set c [open $f r] - set res [testchannel setchannelerrorinterp $c [lrange $msg 0 end]] chan close $c removeFile cutsplice - set res } [lrange $expected 0 end] } @@ -7751,7 +7589,7 @@ test chan-io-73.1 {channel Tcl_Obj SetChannelFromAny} {} { } {1} # ### ### ### ######### ######### ######### - + # cleanup foreach file [list fooBar longfile script output test1 pipe my_script \ test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] { -- cgit v0.12 From 7b022824ad2bf092e5142967198fc52a0baa4b32 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 14:14:59 +0000 Subject: Import of zlib 1.2.3 --- ChangeLog | 3 + compat/zlib/ChangeLog | 855 ++++++++++++++++++++ compat/zlib/FAQ | 339 ++++++++ compat/zlib/INDEX | 51 ++ compat/zlib/Makefile | 154 ++++ compat/zlib/Makefile.in | 154 ++++ compat/zlib/README | 125 +++ compat/zlib/adler32.c | 149 ++++ compat/zlib/algorithm.txt | 209 +++++ compat/zlib/amiga/Makefile.pup | 66 ++ compat/zlib/amiga/Makefile.sas | 65 ++ compat/zlib/as400/bndsrc | 132 +++ compat/zlib/as400/compile.clp | 123 +++ compat/zlib/as400/readme.txt | 111 +++ compat/zlib/as400/zlib.inc | 331 ++++++++ compat/zlib/compress.c | 79 ++ compat/zlib/configure | 459 +++++++++++ compat/zlib/crc32.c | 423 ++++++++++ compat/zlib/crc32.h | 441 ++++++++++ compat/zlib/deflate.c | 1736 ++++++++++++++++++++++++++++++++++++++++ compat/zlib/deflate.h | 331 ++++++++ compat/zlib/gzio.c | 1026 ++++++++++++++++++++++++ compat/zlib/infback.c | 623 ++++++++++++++ compat/zlib/inffast.c | 318 ++++++++ compat/zlib/inffast.h | 11 + compat/zlib/inffixed.h | 94 +++ compat/zlib/inflate.c | 1368 +++++++++++++++++++++++++++++++ compat/zlib/inflate.h | 115 +++ compat/zlib/inftrees.c | 329 ++++++++ compat/zlib/inftrees.h | 55 ++ compat/zlib/msdos/Makefile.bor | 109 +++ compat/zlib/msdos/Makefile.dj2 | 104 +++ compat/zlib/msdos/Makefile.emx | 69 ++ compat/zlib/msdos/Makefile.msc | 106 +++ compat/zlib/msdos/Makefile.tc | 94 +++ compat/zlib/qnx/package.qpg | 141 ++++ compat/zlib/trees.c | 1219 ++++++++++++++++++++++++++++ compat/zlib/trees.h | 128 +++ compat/zlib/uncompr.c | 61 ++ compat/zlib/win32/DLL_FAQ.txt | 397 +++++++++ compat/zlib/win32/Makefile.bor | 107 +++ compat/zlib/win32/Makefile.emx | 69 ++ compat/zlib/win32/Makefile.gcc | 141 ++++ compat/zlib/win32/Makefile.msc | 126 +++ compat/zlib/win32/VisualC.txt | 3 + compat/zlib/win32/zlib.def | 60 ++ compat/zlib/win32/zlib1.rc | 39 + compat/zlib/zconf.h | 332 ++++++++ compat/zlib/zconf.in.h | 332 ++++++++ compat/zlib/zlib.3 | 159 ++++ compat/zlib/zlib.h | 1357 +++++++++++++++++++++++++++++++ compat/zlib/zutil.c | 318 ++++++++ compat/zlib/zutil.h | 269 +++++++ 53 files changed, 16015 insertions(+) create mode 100644 compat/zlib/ChangeLog create mode 100644 compat/zlib/FAQ create mode 100644 compat/zlib/INDEX create mode 100644 compat/zlib/Makefile create mode 100644 compat/zlib/Makefile.in create mode 100644 compat/zlib/README create mode 100644 compat/zlib/adler32.c create mode 100644 compat/zlib/algorithm.txt create mode 100644 compat/zlib/amiga/Makefile.pup create mode 100644 compat/zlib/amiga/Makefile.sas create mode 100644 compat/zlib/as400/bndsrc create mode 100644 compat/zlib/as400/compile.clp create mode 100644 compat/zlib/as400/readme.txt create mode 100644 compat/zlib/as400/zlib.inc create mode 100644 compat/zlib/compress.c create mode 100755 compat/zlib/configure create mode 100644 compat/zlib/crc32.c create mode 100644 compat/zlib/crc32.h create mode 100644 compat/zlib/deflate.c create mode 100644 compat/zlib/deflate.h create mode 100644 compat/zlib/gzio.c create mode 100644 compat/zlib/infback.c create mode 100644 compat/zlib/inffast.c create mode 100644 compat/zlib/inffast.h create mode 100644 compat/zlib/inffixed.h create mode 100644 compat/zlib/inflate.c create mode 100644 compat/zlib/inflate.h create mode 100644 compat/zlib/inftrees.c create mode 100644 compat/zlib/inftrees.h create mode 100644 compat/zlib/msdos/Makefile.bor create mode 100644 compat/zlib/msdos/Makefile.dj2 create mode 100644 compat/zlib/msdos/Makefile.emx create mode 100644 compat/zlib/msdos/Makefile.msc create mode 100644 compat/zlib/msdos/Makefile.tc create mode 100644 compat/zlib/qnx/package.qpg create mode 100644 compat/zlib/trees.c create mode 100644 compat/zlib/trees.h create mode 100644 compat/zlib/uncompr.c create mode 100644 compat/zlib/win32/DLL_FAQ.txt create mode 100644 compat/zlib/win32/Makefile.bor create mode 100644 compat/zlib/win32/Makefile.emx create mode 100644 compat/zlib/win32/Makefile.gcc create mode 100644 compat/zlib/win32/Makefile.msc create mode 100644 compat/zlib/win32/VisualC.txt create mode 100644 compat/zlib/win32/zlib.def create mode 100644 compat/zlib/win32/zlib1.rc create mode 100644 compat/zlib/zconf.h create mode 100644 compat/zlib/zconf.in.h create mode 100644 compat/zlib/zlib.3 create mode 100644 compat/zlib/zlib.h create mode 100644 compat/zlib/zutil.c create mode 100644 compat/zlib/zutil.h diff --git a/ChangeLog b/ChangeLog index 2fb12a4..833cccb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-12-18 Donal K. Fellows + * compat/zlib/*: Import of zlib 1.2.3. The license is directly + compatible with Tcl's. + * generic/tclZlib.c: First implementation of the compressing and * doc/zlib.n: decompressing channel transformations. * tests/zlib.test (zlib-8.*): diff --git a/compat/zlib/ChangeLog b/compat/zlib/ChangeLog new file mode 100644 index 0000000..0123d4b --- /dev/null +++ b/compat/zlib/ChangeLog @@ -0,0 +1,855 @@ + + ChangeLog file for zlib + +Changes in 1.2.3 (18 July 2005) +- Apply security vulnerability fixes to contrib/infback9 as well +- Clean up some text files (carriage returns, trailing space) +- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant] + +Changes in 1.2.2.4 (11 July 2005) +- Add inflatePrime() function for starting inflation at bit boundary +- Avoid some Visual C warnings in deflate.c +- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit + compile +- Fix some spelling errors in comments [Betts] +- Correct inflateInit2() error return documentation in zlib.h +- Added zran.c example of compressed data random access to examples + directory, shows use of inflatePrime() +- Fix cast for assignments to strm->state in inflate.c and infback.c +- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] +- Move declarations of gf2 functions to right place in crc32.c [Oberhumer] +- Add cast in trees.c t avoid a warning [Oberhumer] +- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer] +- Update make_vms.com [Zinser] +- Initialize state->write in inflateReset() since copied in inflate_fast() +- Be more strict on incomplete code sets in inflate_table() and increase + ENOUGH and MAXD -- this repairs a possible security vulnerability for + invalid inflate input. Thanks to Tavis Ormandy and Markus Oberhumer for + discovering the vulnerability and providing test cases. +- Add ia64 support to configure for HP-UX [Smith] +- Add error return to gzread() for format or i/o error [Levin] +- Use malloc.h for OS/2 [Necasek] + +Changes in 1.2.2.3 (27 May 2005) +- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile +- Typecast fread() return values in gzio.c [Vollant] +- Remove trailing space in minigzip.c outmode (VC++ can't deal with it) +- Fix crc check bug in gzread() after gzungetc() [Heiner] +- Add the deflateTune() function to adjust internal compression parameters +- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack) +- Remove an incorrect assertion in examples/zpipe.c +- Add C++ wrapper in infback9.h [Donais] +- Fix bug in inflateCopy() when decoding fixed codes +- Note in zlib.h how much deflateSetDictionary() actually uses +- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used) +- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer] +- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer] +- Add gzdirect() function to indicate transparent reads +- Update contrib/minizip [Vollant] +- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer] +- Add casts in crc32.c to avoid warnings [Oberhumer] +- Add contrib/masmx64 [Vollant] +- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant] + +Changes in 1.2.2.2 (30 December 2004) +- Replace structure assignments in deflate.c and inflate.c with zmemcpy to + avoid implicit memcpy calls (portability for no-library compilation) +- Increase sprintf() buffer size in gzdopen() to allow for large numbers +- Add INFLATE_STRICT to check distances against zlib header +- Improve WinCE errno handling and comments [Chang] +- Remove comment about no gzip header processing in FAQ +- Add Z_FIXED strategy option to deflateInit2() to force fixed trees +- Add updated make_vms.com [Coghlan], update README +- Create a new "examples" directory, move gzappend.c there, add zpipe.c, + fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html. +- Add FAQ entry and comments in deflate.c on uninitialized memory access +- Add Solaris 9 make options in configure [Gilbert] +- Allow strerror() usage in gzio.c for STDC +- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer] +- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant] +- Use z_off_t for adler32_combine() and crc32_combine() lengths +- Make adler32() much faster for small len +- Use OS_CODE in deflate() default gzip header + +Changes in 1.2.2.1 (31 October 2004) +- Allow inflateSetDictionary() call for raw inflate +- Fix inflate header crc check bug for file names and comments +- Add deflateSetHeader() and gz_header structure for custom gzip headers +- Add inflateGetheader() to retrieve gzip headers +- Add crc32_combine() and adler32_combine() functions +- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list +- Use zstreamp consistently in zlib.h (inflate_back functions) +- Remove GUNZIP condition from definition of inflate_mode in inflate.h + and in contrib/inflate86/inffast.S [Truta, Anderson] +- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson] +- Update projects/README.projects and projects/visualc6 [Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta] +- Deprecate Z_ASCII; use Z_TEXT instead [Truta] +- Use a new algorithm for setting strm->data_type in trees.c [Truta] +- Do not define an exit() prototype in zutil.c unless DEBUG defined +- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta] +- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate() +- Fix Darwin build version identification [Peterson] + +Changes in 1.2.2 (3 October 2004) +- Update zlib.h comments on gzip in-memory processing +- Set adler to 1 in inflateReset() to support Java test suite [Walles] +- Add contrib/dotzlib [Ravn] +- Update win32/DLL_FAQ.txt [Truta] +- Update contrib/minizip [Vollant] +- Move contrib/visual-basic.txt to old/ [Truta] +- Fix assembler builds in projects/visualc6/ [Truta] + +Changes in 1.2.1.2 (9 September 2004) +- Update INDEX file +- Fix trees.c to update strm->data_type (no one ever noticed!) +- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown] +- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE) +- Add limited multitasking protection to DYNAMIC_CRC_TABLE +- Add NO_vsnprintf for VMS in zutil.h [Mozilla] +- Don't declare strerror() under VMS [Mozilla] +- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize +- Update contrib/ada [Anisimkov] +- Update contrib/minizip [Vollant] +- Fix configure to not hardcode directories for Darwin [Peterson] +- Fix gzio.c to not return error on empty files [Brown] +- Fix indentation; update version in contrib/delphi/ZLib.pas and + contrib/pascal/zlibpas.pas [Truta] +- Update mkasm.bat in contrib/masmx86 [Truta] +- Update contrib/untgz [Truta] +- Add projects/README.projects [Truta] +- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta] +- Update win32/DLL_FAQ.txt [Truta] +- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta] +- Remove an unnecessary assignment to curr in inftrees.c [Truta] +- Add OS/2 to exe builds in configure [Poltorak] +- Remove err dummy parameter in zlib.h [Kientzle] + +Changes in 1.2.1.1 (9 January 2004) +- Update email address in README +- Several FAQ updates +- Fix a big fat bug in inftrees.c that prevented decoding valid + dynamic blocks with only literals and no distance codes -- + Thanks to "Hot Emu" for the bug report and sample file +- Add a note to puff.c on no distance codes case. + +Changes in 1.2.1 (17 November 2003) +- Remove a tab in contrib/gzappend/gzappend.c +- Update some interfaces in contrib for new zlib functions +- Update zlib version number in some contrib entries +- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta] +- Support shared libraries on Hurd and KFreeBSD [Brown] +- Fix error in NO_DIVIDE option of adler32.c + +Changes in 1.2.0.8 (4 November 2003) +- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas +- Add experimental NO_DIVIDE #define in adler32.c + - Possibly faster on some processors (let me know if it is) +- Correct Z_BLOCK to not return on first inflate call if no wrap +- Fix strm->data_type on inflate() return to correctly indicate EOB +- Add deflatePrime() function for appending in the middle of a byte +- Add contrib/gzappend for an example of appending to a stream +- Update win32/DLL_FAQ.txt [Truta] +- Delete Turbo C comment in README [Truta] +- Improve some indentation in zconf.h [Truta] +- Fix infinite loop on bad input in configure script [Church] +- Fix gzeof() for concatenated gzip files [Johnson] +- Add example to contrib/visual-basic.txt [Michael B.] +- Add -p to mkdir's in Makefile.in [vda] +- Fix configure to properly detect presence or lack of printf functions +- Add AS400 support [Monnerat] +- Add a little Cygwin support [Wilson] + +Changes in 1.2.0.7 (21 September 2003) +- Correct some debug formats in contrib/infback9 +- Cast a type in a debug statement in trees.c +- Change search and replace delimiter in configure from % to # [Beebe] +- Update contrib/untgz to 0.2 with various fixes [Truta] +- Add build support for Amiga [Nikl] +- Remove some directories in old that have been updated to 1.2 +- Add dylib building for Mac OS X in configure and Makefile.in +- Remove old distribution stuff from Makefile +- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X +- Update links in README + +Changes in 1.2.0.6 (13 September 2003) +- Minor FAQ updates +- Update contrib/minizip to 1.00 [Vollant] +- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta] +- Update POSTINC comment for 68060 [Nikl] +- Add contrib/infback9 with deflate64 decoding (unsupported) +- For MVS define NO_vsnprintf and undefine FAR [van Burik] +- Add pragma for fdopen on MVS [van Burik] + +Changes in 1.2.0.5 (8 September 2003) +- Add OF to inflateBackEnd() declaration in zlib.h +- Remember start when using gzdopen in the middle of a file +- Use internal off_t counters in gz* functions to properly handle seeks +- Perform more rigorous check for distance-too-far in inffast.c +- Add Z_BLOCK flush option to return from inflate at block boundary +- Set strm->data_type on return from inflate + - Indicate bits unused, if at block boundary, and if in last block +- Replace size_t with ptrdiff_t in crc32.c, and check for correct size +- Add condition so old NO_DEFLATE define still works for compatibility +- FAQ update regarding the Windows DLL [Truta] +- INDEX update: add qnx entry, remove aix entry [Truta] +- Install zlib.3 into mandir [Wilson] +- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta] +- Adapt the zlib interface to the new DLL convention guidelines [Truta] +- Introduce ZLIB_WINAPI macro to allow the export of functions using + the WINAPI calling convention, for Visual Basic [Vollant, Truta] +- Update msdos and win32 scripts and makefiles [Truta] +- Export symbols by name, not by ordinal, in win32/zlib.def [Truta] +- Add contrib/ada [Anisimkov] +- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta] +- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant] +- Add contrib/masm686 [Truta] +- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm + [Truta, Vollant] +- Update contrib/delphi; rename to contrib/pascal; add example [Truta] +- Remove contrib/delphi2; add a new contrib/delphi [Truta] +- Avoid inclusion of the nonstandard in contrib/iostream, + and fix some method prototypes [Truta] +- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip + [Truta] +- Avoid the use of backslash (\) in contrib/minizip [Vollant] +- Fix file time handling in contrib/untgz; update makefiles [Truta] +- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines + [Vollant] +- Remove contrib/vstudio/vc15_16 [Vollant] +- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta] +- Update README.contrib [Truta] +- Invert the assignment order of match_head and s->prev[...] in + INSERT_STRING [Truta] +- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings + [Truta] +- Compare function pointers with 0, not with NULL or Z_NULL [Truta] +- Fix prototype of syncsearch in inflate.c [Truta] +- Introduce ASMINF macro to be enabled when using an ASM implementation + of inflate_fast [Truta] +- Change NO_DEFLATE to NO_GZCOMPRESS [Truta] +- Modify test_gzio in example.c to take a single file name as a + parameter [Truta] +- Exit the example.c program if gzopen fails [Truta] +- Add type casts around strlen in example.c [Truta] +- Remove casting to sizeof in minigzip.c; give a proper type + to the variable compared with SUFFIX_LEN [Truta] +- Update definitions of STDC and STDC99 in zconf.h [Truta] +- Synchronize zconf.h with the new Windows DLL interface [Truta] +- Use SYS16BIT instead of __32BIT__ to distinguish between + 16- and 32-bit platforms [Truta] +- Use far memory allocators in small 16-bit memory models for + Turbo C [Truta] +- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in + zlibCompileFlags [Truta] +- Cygwin has vsnprintf [Wilson] +- In Windows16, OS_CODE is 0, as in MSDOS [Truta] +- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson] + +Changes in 1.2.0.4 (10 August 2003) +- Minor FAQ updates +- Be more strict when checking inflateInit2's windowBits parameter +- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well +- Add gzip wrapper option to deflateInit2 using windowBits +- Add updated QNX rule in configure and qnx directory [Bonnefoy] +- Make inflate distance-too-far checks more rigorous +- Clean up FAR usage in inflate +- Add casting to sizeof() in gzio.c and minigzip.c + +Changes in 1.2.0.3 (19 July 2003) +- Fix silly error in gzungetc() implementation [Vollant] +- Update contrib/minizip and contrib/vstudio [Vollant] +- Fix printf format in example.c +- Correct cdecl support in zconf.in.h [Anisimkov] +- Minor FAQ updates + +Changes in 1.2.0.2 (13 July 2003) +- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons +- Attempt to avoid warnings in crc32.c for pointer-int conversion +- Add AIX to configure, remove aix directory [Bakker] +- Add some casts to minigzip.c +- Improve checking after insecure sprintf() or vsprintf() calls +- Remove #elif's from crc32.c +- Change leave label to inf_leave in inflate.c and infback.c to avoid + library conflicts +- Remove inflate gzip decoding by default--only enable gzip decoding by + special request for stricter backward compatibility +- Add zlibCompileFlags() function to return compilation information +- More typecasting in deflate.c to avoid warnings +- Remove leading underscore from _Capital #defines [Truta] +- Fix configure to link shared library when testing +- Add some Windows CE target adjustments [Mai] +- Remove #define ZLIB_DLL in zconf.h [Vollant] +- Add zlib.3 [Rodgers] +- Update RFC URL in deflate.c and algorithm.txt [Mai] +- Add zlib_dll_FAQ.txt to contrib [Truta] +- Add UL to some constants [Truta] +- Update minizip and vstudio [Vollant] +- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h +- Expand use of NO_DUMMY_DECL to avoid all dummy structures +- Added iostream3 to contrib [Schwardt] +- Replace rewind() with fseek() for WinCE [Truta] +- Improve setting of zlib format compression level flags + - Report 0 for huffman and rle strategies and for level == 0 or 1 + - Report 2 only for level == 6 +- Only deal with 64K limit when necessary at compile time [Truta] +- Allow TOO_FAR check to be turned off at compile time [Truta] +- Add gzclearerr() function [Souza] +- Add gzungetc() function + +Changes in 1.2.0.1 (17 March 2003) +- Add Z_RLE strategy for run-length encoding [Truta] + - When Z_RLE requested, restrict matches to distance one + - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE +- Correct FASTEST compilation to allow level == 0 +- Clean up what gets compiled for FASTEST +- Incorporate changes to zconf.in.h [Vollant] + - Refine detection of Turbo C need for dummy returns + - Refine ZLIB_DLL compilation + - Include additional header file on VMS for off_t typedef +- Try to use _vsnprintf where it supplants vsprintf [Vollant] +- Add some casts in inffast.c +- Enchance comments in zlib.h on what happens if gzprintf() tries to + write more than 4095 bytes before compression +- Remove unused state from inflateBackEnd() +- Remove exit(0) from minigzip.c, example.c +- Get rid of all those darn tabs +- Add "check" target to Makefile.in that does the same thing as "test" +- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in +- Update contrib/inflate86 [Anderson] +- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant] +- Add msdos and win32 directories with makefiles [Truta] +- More additions and improvements to the FAQ + +Changes in 1.2.0 (9 March 2003) +- New and improved inflate code + - About 20% faster + - Does not allocate 32K window unless and until needed + - Automatically detects and decompresses gzip streams + - Raw inflate no longer needs an extra dummy byte at end + - Added inflateBack functions using a callback interface--even faster + than inflate, useful for file utilities (gzip, zip) + - Added inflateCopy() function to record state for random access on + externally generated deflate streams (e.g. in gzip files) + - More readable code (I hope) +- New and improved crc32() + - About 50% faster, thanks to suggestions from Rodney Brown +- Add deflateBound() and compressBound() functions +- Fix memory leak in deflateInit2() +- Permit setting dictionary for raw deflate (for parallel deflate) +- Fix const declaration for gzwrite() +- Check for some malloc() failures in gzio.c +- Fix bug in gzopen() on single-byte file 0x1f +- Fix bug in gzread() on concatenated file with 0x1f at end of buffer + and next buffer doesn't start with 0x8b +- Fix uncompress() to return Z_DATA_ERROR on truncated input +- Free memory at end of example.c +- Remove MAX #define in trees.c (conflicted with some libraries) +- Fix static const's in deflate.c, gzio.c, and zutil.[ch] +- Declare malloc() and free() in gzio.c if STDC not defined +- Use malloc() instead of calloc() in zutil.c if int big enough +- Define STDC for AIX +- Add aix/ with approach for compiling shared library on AIX +- Add HP-UX support for shared libraries in configure +- Add OpenUNIX support for shared libraries in configure +- Use $cc instead of gcc to build shared library +- Make prefix directory if needed when installing +- Correct Macintosh avoidance of typedef Byte in zconf.h +- Correct Turbo C memory allocation when under Linux +- Use libz.a instead of -lz in Makefile (assure use of compiled library) +- Update configure to check for snprintf or vsnprintf functions and their + return value, warn during make if using an insecure function +- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that + is lost when library is used--resolution is to build new zconf.h +- Documentation improvements (in zlib.h): + - Document raw deflate and inflate + - Update RFCs URL + - Point out that zlib and gzip formats are different + - Note that Z_BUF_ERROR is not fatal + - Document string limit for gzprintf() and possible buffer overflow + - Note requirement on avail_out when flushing + - Note permitted values of flush parameter of inflate() +- Add some FAQs (and even answers) to the FAQ +- Add contrib/inflate86/ for x86 faster inflate +- Add contrib/blast/ for PKWare Data Compression Library decompression +- Add contrib/puff/ simple inflate for deflate format description + +Changes in 1.1.4 (11 March 2002) +- ZFREE was repeated on same allocation on some error conditions. + This creates a security problem described in + http://www.zlib.org/advisory-2002-03-11.txt +- Returned incorrect error (Z_MEM_ERROR) on some invalid data +- Avoid accesses before window for invalid distances with inflate window + less than 32K. +- force windowBits > 8 to avoid a bug in the encoder for a window size + of 256 bytes. (A complete fix will be available in 1.1.5). + +Changes in 1.1.3 (9 July 1998) +- fix "an inflate input buffer bug that shows up on rare but persistent + occasions" (Mark) +- fix gzread and gztell for concatenated .gz files (Didier Le Botlan) +- fix gzseek(..., SEEK_SET) in write mode +- fix crc check after a gzeek (Frank Faubert) +- fix miniunzip when the last entry in a zip file is itself a zip file + (J Lillge) +- add contrib/asm586 and contrib/asm686 (Brian Raiter) + See http://www.muppetlabs.com/~breadbox/software/assembly.html +- add support for Delphi 3 in contrib/delphi (Bob Dellaca) +- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti) +- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren) +- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks) +- added a FAQ file + +- Support gzdopen on Mac with Metrowerks (Jason Linhart) +- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart) +- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young) +- avoid some warnings with Borland C (Tom Tanner) +- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant) +- emulate utime() for WIN32 in contrib/untgz (Gilles Vollant) +- allow several arguments to configure (Tim Mooney, Frodo Looijaard) +- use libdir and includedir in Makefile.in (Tim Mooney) +- support shared libraries on OSF1 V4 (Tim Mooney) +- remove so_locations in "make clean" (Tim Mooney) +- fix maketree.c compilation error (Glenn, Mark) +- Python interface to zlib now in Python 1.5 (Jeremy Hylton) +- new Makefile.riscos (Rich Walker) +- initialize static descriptors in trees.c for embedded targets (Nick Smith) +- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith) +- add the OS/2 files in Makefile.in too (Andrew Zabolotny) +- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane) +- fix maketree.c to allow clean compilation of inffixed.h (Mark) +- fix parameter check in deflateCopy (Gunther Nikl) +- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler) +- Many portability patches by Christian Spieler: + . zutil.c, zutil.h: added "const" for zmem* + . Make_vms.com: fixed some typos + . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists + . msdos/Makefile.msc: remove "default rtl link library" info from obj files + . msdos/Makefile.*: use model-dependent name for the built zlib library + . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc: + new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT) +- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane) +- replace __far with _far for better portability (Christian Spieler, Tom Lane) +- fix test for errno.h in configure (Tim Newsham) + +Changes in 1.1.2 (19 March 98) +- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant) + See http://www.winimage.com/zLibDll/unzip.html +- preinitialize the inflate tables for fixed codes, to make the code + completely thread safe (Mark) +- some simplifications and slight speed-up to the inflate code (Mark) +- fix gzeof on non-compressed files (Allan Schrum) +- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs) +- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn) +- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny) +- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori) +- do not wrap extern "C" around system includes (Tom Lane) +- mention zlib binding for TCL in README (Andreas Kupries) +- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert) +- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson) +- allow "configure --prefix $HOME" (Tim Mooney) +- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson) +- move Makefile.sas to amiga/Makefile.sas + +Changes in 1.1.1 (27 Feb 98) +- fix macros _tr_tally_* in deflate.h for debug mode (Glenn Randers-Pehrson) +- remove block truncation heuristic which had very marginal effect for zlib + (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the + compression ratio on some files. This also allows inlining _tr_tally for + matches in deflate_slow. +- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier) + +Changes in 1.1.0 (24 Feb 98) +- do not return STREAM_END prematurely in inflate (John Bowler) +- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler) +- compile with -DFASTEST to get compression code optimized for speed only +- in minigzip, try mmap'ing the input file first (Miguel Albrecht) +- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain + on Sun but significant on HP) + +- add a pointer to experimental unzip library in README (Gilles Vollant) +- initialize variable gcc in configure (Chris Herborth) + +Changes in 1.0.9 (17 Feb 1998) +- added gzputs and gzgets functions +- do not clear eof flag in gzseek (Mark Diekhans) +- fix gzseek for files in transparent mode (Mark Diekhans) +- do not assume that vsprintf returns the number of bytes written (Jens Krinke) +- replace EXPORT with ZEXPORT to avoid conflict with other programs +- added compress2 in zconf.h, zlib.def, zlib.dnt +- new asm code from Gilles Vollant in contrib/asm386 +- simplify the inflate code (Mark): + . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new() + . ZALLOC the length list in inflate_trees_fixed() instead of using stack + . ZALLOC the value area for huft_build() instead of using stack + . Simplify Z_FINISH check in inflate() + +- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8 +- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi) +- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with + the declaration of FAR (Gilles VOllant) +- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann) +- read_buf buf parameter of type Bytef* instead of charf* +- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout) +- do not redeclare unlink in minigzip.c for WIN32 (John Bowler) +- fix check for presence of directories in "make install" (Ian Willis) + +Changes in 1.0.8 (27 Jan 1998) +- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant) +- fix gzgetc and gzputc for big endian systems (Markus Oberhumer) +- added compress2() to allow setting the compression level +- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong) +- use constant arrays for the static trees in trees.c instead of computing + them at run time (thanks to Ken Raeburn for this suggestion). To create + trees.h, compile with GEN_TREES_H and run "make test". +- check return code of example in "make test" and display result +- pass minigzip command line options to file_compress +- simplifying code of inflateSync to avoid gcc 2.8 bug + +- support CC="gcc -Wall" in configure -s (QingLong) +- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn) +- fix test for shared library support to avoid compiler warnings +- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant) +- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit) +- do not use fdopen for Metrowerks on Mac (Brad Pettit)) +- add checks for gzputc and gzputc in example.c +- avoid warnings in gzio.c and deflate.c (Andreas Kleinert) +- use const for the CRC table (Ken Raeburn) +- fixed "make uninstall" for shared libraries +- use Tracev instead of Trace in infblock.c +- in example.c use correct compressed length for test_sync +- suppress +vnocompatwarnings in configure for HPUX (not always supported) + +Changes in 1.0.7 (20 Jan 1998) +- fix gzseek which was broken in write mode +- return error for gzseek to negative absolute position +- fix configure for Linux (Chun-Chung Chen) +- increase stack space for MSC (Tim Wegner) +- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant) +- define EXPORTVA for gzprintf (Gilles Vollant) +- added man page zlib.3 (Rick Rodgers) +- for contrib/untgz, fix makedir() and improve Makefile + +- check gzseek in write mode in example.c +- allocate extra buffer for seeks only if gzseek is actually called +- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant) +- add inflateSyncPoint in zconf.h +- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def + +Changes in 1.0.6 (19 Jan 1998) +- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and + gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code) +- Fix a deflate bug occurring only with compression level 0 (thanks to + Andy Buckler for finding this one). +- In minigzip, pass transparently also the first byte for .Z files. +- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress() +- check Z_FINISH in inflate (thanks to Marc Schluper) +- Implement deflateCopy (thanks to Adam Costello) +- make static libraries by default in configure, add --shared option. +- move MSDOS or Windows specific files to directory msdos +- suppress the notion of partial flush to simplify the interface + (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4) +- suppress history buffer provided by application to simplify the interface + (this feature was not implemented anyway in 1.0.4) +- next_in and avail_in must be initialized before calling inflateInit or + inflateInit2 +- add EXPORT in all exported functions (for Windows DLL) +- added Makefile.nt (thanks to Stephen Williams) +- added the unsupported "contrib" directory: + contrib/asm386/ by Gilles Vollant + 386 asm code replacing longest_match(). + contrib/iostream/ by Kevin Ruland + A C++ I/O streams interface to the zlib gz* functions + contrib/iostream2/ by Tyge Løvset + Another C++ I/O streams interface + contrib/untgz/ by "Pedro A. Aranda Guti\irrez" + A very simple tar.gz file extractor using zlib + contrib/visual-basic.txt by Carlos Rios + How to use compress(), uncompress() and the gz* functions from VB. +- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression + level) in minigzip (thanks to Tom Lane) + +- use const for rommable constants in deflate +- added test for gzseek and gztell in example.c +- add undocumented function inflateSyncPoint() (hack for Paul Mackerras) +- add undocumented function zError to convert error code to string + (for Tim Smithers) +- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code. +- Use default memcpy for Symantec MSDOS compiler. +- Add EXPORT keyword for check_func (needed for Windows DLL) +- add current directory to LD_LIBRARY_PATH for "make test" +- create also a link for libz.so.1 +- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura) +- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX) +- added -soname for Linux in configure (Chun-Chung Chen, +- assign numbers to the exported functions in zlib.def (for Windows DLL) +- add advice in zlib.h for best usage of deflateSetDictionary +- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn) +- allow compilation with ANSI keywords only enabled for TurboC in large model +- avoid "versionString"[0] (Borland bug) +- add NEED_DUMMY_RETURN for Borland +- use variable z_verbose for tracing in debug mode (L. Peter Deutsch). +- allow compilation with CC +- defined STDC for OS/2 (David Charlap) +- limit external names to 8 chars for MVS (Thomas Lund) +- in minigzip.c, use static buffers only for 16-bit systems +- fix suffix check for "minigzip -d foo.gz" +- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee) +- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) +- added makelcc.bat for lcc-win32 (Tom St Denis) +- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) +- Avoid expanded $Id: ChangeLog,v 1.1 2008/12/18 14:14:59 dkf Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- check for unistd.h in configure (for off_t) +- remove useless check parameter in inflate_blocks_free +- avoid useless assignment of s->check to itself in inflate_blocks_new +- do not flush twice in gzclose (thanks to Ken Raeburn) +- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h +- use NO_ERRNO_H instead of enumeration of operating systems with errno.h +- work around buggy fclose on pipes for HP/UX +- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson) +- fix configure if CC is already equal to gcc + +Changes in 1.0.5 (3 Jan 98) +- Fix inflate to terminate gracefully when fed corrupted or invalid data +- Use const for rommable constants in inflate +- Eliminate memory leaks on error conditions in inflate +- Removed some vestigial code in inflate +- Update web address in README + +Changes in 1.0.4 (24 Jul 96) +- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF + bit, so the decompressor could decompress all the correct data but went + on to attempt decompressing extra garbage data. This affected minigzip too. +- zlibVersion and gzerror return const char* (needed for DLL) +- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) +- use z_error only for DEBUG (avoid problem with DLLs) + +Changes in 1.0.3 (2 Jul 96) +- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS + small and medium models; this makes the library incompatible with previous + versions for these models. (No effect in large model or on other systems.) +- return OK instead of BUF_ERROR if previous deflate call returned with + avail_out as zero but there is nothing to do +- added memcmp for non STDC compilers +- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly) +- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO) +- better check for 16-bit mode MSC (avoids problem with Symantec) + +Changes in 1.0.2 (23 May 96) +- added Windows DLL support +- added a function zlibVersion (for the DLL support) +- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model) +- Bytef is define's instead of typedef'd only for Borland C +- avoid reading uninitialized memory in example.c +- mention in README that the zlib format is now RFC1950 +- updated Makefile.dj2 +- added algorithm.doc + +Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion] +- fix array overlay in deflate.c which sometimes caused bad compressed data +- fix inflate bug with empty stored block +- fix MSDOS medium model which was broken in 0.99 +- fix deflateParams() which could generated bad compressed data. +- Bytef is define'd instead of typedef'ed (work around Borland bug) +- added an INDEX file +- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32), + Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas) +- speed up adler32 for modern machines without auto-increment +- added -ansi for IRIX in configure +- static_init_done in trees.c is an int +- define unlink as delete for VMS +- fix configure for QNX +- add configure branch for SCO and HPUX +- avoid many warnings (unused variables, dead assignments, etc...) +- no fdopen for BeOS +- fix the Watcom fix for 32 bit mode (define FAR as empty) +- removed redefinition of Byte for MKWERKS +- work around an MWKERKS bug (incorrect merge of all .h files) + +Changes in 0.99 (27 Jan 96) +- allow preset dictionary shared between compressor and decompressor +- allow compression level 0 (no compression) +- add deflateParams in zlib.h: allow dynamic change of compression level + and compression strategy. +- test large buffers and deflateParams in example.c +- add optional "configure" to build zlib as a shared library +- suppress Makefile.qnx, use configure instead +- fixed deflate for 64-bit systems (detected on Cray) +- fixed inflate_blocks for 64-bit systems (detected on Alpha) +- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2) +- always return Z_BUF_ERROR when deflate() has nothing to do +- deflateInit and inflateInit are now macros to allow version checking +- prefix all global functions and types with z_ with -DZ_PREFIX +- make falloc completely reentrant (inftrees.c) +- fixed very unlikely race condition in ct_static_init +- free in reverse order of allocation to help memory manager +- use zlib-1.0/* instead of zlib/* inside the tar.gz +- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith + -Wconversion -Wstrict-prototypes -Wmissing-prototypes" +- allow gzread on concatenated .gz files +- deflateEnd now returns Z_DATA_ERROR if it was premature +- deflate is finally (?) fully deterministic (no matches beyond end of input) +- Document Z_SYNC_FLUSH +- add uninstall in Makefile +- Check for __cpluplus in zlib.h +- Better test in ct_align for partial flush +- avoid harmless warnings for Borland C++ +- initialize hash_head in deflate.c +- avoid warning on fdopen (gzio.c) for HP cc -Aa +- include stdlib.h for STDC compilers +- include errno.h for Cray +- ignore error if ranlib doesn't exist +- call ranlib twice for NeXTSTEP +- use exec_prefix instead of prefix for libz.a +- renamed ct_* as _tr_* to avoid conflict with applications +- clear z->msg in inflateInit2 before any error return +- initialize opaque in example.c, gzio.c, deflate.c and inflate.c +- fixed typo in zconf.h (_GNUC__ => __GNUC__) +- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode) +- fix typo in Make_vms.com (f$trnlnm -> f$getsyi) +- in fcalloc, normalize pointer if size > 65520 bytes +- don't use special fcalloc for 32 bit Borland C++ +- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc... +- use Z_BINARY instead of BINARY +- document that gzclose after gzdopen will close the file +- allow "a" as mode in gzopen. +- fix error checking in gzread +- allow skipping .gz extra-field on pipes +- added reference to Perl interface in README +- put the crc table in FAR data (I dislike more and more the medium model :) +- added get_crc_table +- added a dimension to all arrays (Borland C can't count). +- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast +- guard against multiple inclusion of *.h (for precompiled header on Mac) +- Watcom C pretends to be Microsoft C small model even in 32 bit mode. +- don't use unsized arrays to avoid silly warnings by Visual C++: + warning C4746: 'inflate_mask' : unsized array treated as '__far' + (what's wrong with far data in far model?). +- define enum out of inflate_blocks_state to allow compilation with C++ + +Changes in 0.95 (16 Aug 95) +- fix MSDOS small and medium model (now easier to adapt to any compiler) +- inlined send_bits +- fix the final (:-) bug for deflate with flush (output was correct but + not completely flushed in rare occasions). +- default window size is same for compression and decompression + (it's now sufficient to set MAX_WBITS in zconf.h). +- voidp -> voidpf and voidnp -> voidp (for consistency with other + typedefs and because voidnp was not near in large model). + +Changes in 0.94 (13 Aug 95) +- support MSDOS medium model +- fix deflate with flush (could sometimes generate bad output) +- fix deflateReset (zlib header was incorrectly suppressed) +- added support for VMS +- allow a compression level in gzopen() +- gzflush now calls fflush +- For deflate with flush, flush even if no more input is provided. +- rename libgz.a as libz.a +- avoid complex expression in infcodes.c triggering Turbo C bug +- work around a problem with gcc on Alpha (in INSERT_STRING) +- don't use inline functions (problem with some gcc versions) +- allow renaming of Byte, uInt, etc... with #define. +- avoid warning about (unused) pointer before start of array in deflate.c +- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c +- avoid reserved word 'new' in trees.c + +Changes in 0.93 (25 June 95) +- temporarily disable inline functions +- make deflate deterministic +- give enough lookahead for PARTIAL_FLUSH +- Set binary mode for stdin/stdout in minigzip.c for OS/2 +- don't even use signed char in inflate (not portable enough) +- fix inflate memory leak for segmented architectures + +Changes in 0.92 (3 May 95) +- don't assume that char is signed (problem on SGI) +- Clear bit buffer when starting a stored block +- no memcpy on Pyramid +- suppressed inftest.c +- optimized fill_window, put longest_match inline for gcc +- optimized inflate on stored blocks. +- untabify all sources to simplify patches + +Changes in 0.91 (2 May 95) +- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h +- Document the memory requirements in zconf.h +- added "make install" +- fix sync search logic in inflateSync +- deflate(Z_FULL_FLUSH) now works even if output buffer too short +- after inflateSync, don't scare people with just "lo world" +- added support for DJGPP + +Changes in 0.9 (1 May 95) +- don't assume that zalloc clears the allocated memory (the TurboC bug + was Mark's bug after all :) +- let again gzread copy uncompressed data unchanged (was working in 0.71) +- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented +- added a test of inflateSync in example.c +- moved MAX_WBITS to zconf.h because users might want to change that. +- document explicitly that zalloc(64K) on MSDOS must return a normalized + pointer (zero offset) +- added Makefiles for Microsoft C, Turbo C, Borland C++ +- faster crc32() + +Changes in 0.8 (29 April 95) +- added fast inflate (inffast.c) +- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this + is incompatible with previous versions of zlib which returned Z_OK. +- work around a TurboC compiler bug (bad code for b << 0, see infutil.h) + (actually that was not a compiler bug, see 0.81 above) +- gzread no longer reads one extra byte in certain cases +- In gzio destroy(), don't reference a freed structure +- avoid many warnings for MSDOS +- avoid the ERROR symbol which is used by MS Windows + +Changes in 0.71 (14 April 95) +- Fixed more MSDOS compilation problems :( There is still a bug with + TurboC large model. + +Changes in 0.7 (14 April 95) +- Added full inflate support. +- Simplified the crc32() interface. The pre- and post-conditioning + (one's complement) is now done inside crc32(). WARNING: this is + incompatible with previous versions; see zlib.h for the new usage. + +Changes in 0.61 (12 April 95) +- workaround for a bug in TurboC. example and minigzip now work on MSDOS. + +Changes in 0.6 (11 April 95) +- added minigzip.c +- added gzdopen to reopen a file descriptor as gzFile +- added transparent reading of non-gziped files in gzread. +- fixed bug in gzread (don't read crc as data) +- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose). +- don't allocate big arrays in the stack (for MSDOS) +- fix some MSDOS compilation problems + +Changes in 0.5: +- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but + not yet Z_FULL_FLUSH. +- support decompression but only in a single step (forced Z_FINISH) +- added opaque object for zalloc and zfree. +- added deflateReset and inflateReset +- added a variable zlib_version for consistency checking. +- renamed the 'filter' parameter of deflateInit2 as 'strategy'. + Added Z_FILTERED and Z_HUFFMAN_ONLY constants. + +Changes in 0.4: +- avoid "zip" everywhere, use zlib instead of ziplib. +- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush + if compression method == 8. +- added adler32 and crc32 +- renamed deflateOptions as deflateInit2, call one or the other but not both +- added the method parameter for deflateInit2. +- added inflateInit2 +- simplied considerably deflateInit and inflateInit by not supporting + user-provided history buffer. This is supported only in deflateInit2 + and inflateInit2. + +Changes in 0.3: +- prefix all macro names with Z_ +- use Z_FINISH instead of deflateEnd to finish compression. +- added Z_HUFFMAN_ONLY +- added gzerror() diff --git a/compat/zlib/FAQ b/compat/zlib/FAQ new file mode 100644 index 0000000..441d910 --- /dev/null +++ b/compat/zlib/FAQ @@ -0,0 +1,339 @@ + + Frequently Asked Questions about zlib + + +If your question is not there, please check the zlib home page +http://www.zlib.org which may have more recent information. +The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html + + + 1. Is zlib Y2K-compliant? + + Yes. zlib doesn't handle dates. + + 2. Where can I get a Windows DLL version? + + The zlib sources can be compiled without change to produce a DLL. + See the file win32/DLL_FAQ.txt in the zlib distribution. + Pointers to the precompiled DLL are found in the zlib web site at + http://www.zlib.org. + + 3. Where can I get a Visual Basic interface to zlib? + + See + * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm + * contrib/visual-basic.txt in the zlib distribution + * win32/DLL_FAQ.txt in the zlib distribution + + 4. compress() returns Z_BUF_ERROR. + + Make sure that before the call of compress, the length of the compressed + buffer is equal to the total size of the compressed buffer and not + zero. For Visual Basic, check that this parameter is passed by reference + ("as any"), not by value ("as long"). + + 5. deflate() or inflate() returns Z_BUF_ERROR. + + Before making the call, make sure that avail_in and avail_out are not + zero. When setting the parameter flush equal to Z_FINISH, also make sure + that avail_out is big enough to allow processing all pending input. + Note that a Z_BUF_ERROR is not fatal--another call to deflate() or + inflate() can be made with more input or output space. A Z_BUF_ERROR + may in fact be unavoidable depending on how the functions are used, since + it is not possible to tell whether or not there is more output pending + when strm.avail_out returns with zero. + + 6. Where's the zlib documentation (man pages, etc.)? + + It's in zlib.h for the moment, and Francis S. Lin has converted it to a + web page zlib.html. Volunteers to transform this to Unix-style man pages, + please contact us (zlib@gzip.org). Examples of zlib usage are in the files + example.c and minigzip.c. + + 7. Why don't you use GNU autoconf or libtool or ...? + + Because we would like to keep zlib as a very small and simple + package. zlib is rather portable and doesn't need much configuration. + + 8. I found a bug in zlib. + + Most of the time, such problems are due to an incorrect usage of + zlib. Please try to reproduce the problem with a small program and send + the corresponding source to us at zlib@gzip.org . Do not send + multi-megabyte data files without prior agreement. + + 9. Why do I get "undefined reference to gzputc"? + + If "make test" produces something like + + example.o(.text+0x154): undefined reference to `gzputc' + + check that you don't have old files libz.* in /usr/lib, /usr/local/lib or + /usr/X11R6/lib. Remove any old versions, then do "make install". + +10. I need a Delphi interface to zlib. + + See the contrib/delphi directory in the zlib distribution. + +11. Can zlib handle .zip archives? + + Not by itself, no. See the directory contrib/minizip in the zlib + distribution. + +12. Can zlib handle .Z files? + + No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt + the code of uncompress on your own. + +13. How can I make a Unix shared library? + + make clean + ./configure -s + make + +14. How do I install a shared zlib library on Unix? + + After the above, then: + + make install + + However, many flavors of Unix come with a shared zlib already installed. + Before going to the trouble of compiling a shared version of zlib and + trying to install it, you may want to check if it's already there! If you + can #include , it's there. The -lz option will probably link to it. + +15. I have a question about OttoPDF. + + We are not the authors of OttoPDF. The real author is on the OttoPDF web + site: Joel Hainley, jhainley@myndkryme.com. + +16. Can zlib decode Flate data in an Adobe PDF file? + + Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ . + To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ . + +17. Why am I getting this "register_frame_info not found" error on Solaris? + + After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib + generates an error such as: + + ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so: + symbol __register_frame_info: referenced symbol not found + + The symbol __register_frame_info is not part of zlib, it is generated by + the C compiler (cc or gcc). You must recompile applications using zlib + which have this problem. This problem is specific to Solaris. See + http://www.sunfreeware.com for Solaris versions of zlib and applications + using zlib. + +18. Why does gzip give an error on a file I make with compress/deflate? + + The compress and deflate functions produce data in the zlib format, which + is different and incompatible with the gzip format. The gz* functions in + zlib on the other hand use the gzip format. Both the zlib and gzip + formats use the same compressed data format internally, but have different + headers and trailers around the compressed data. + +19. Ok, so why are there two different formats? + + The gzip format was designed to retain the directory information about + a single file, such as the name and last modification date. The zlib + format on the other hand was designed for in-memory and communication + channel applications, and has a much more compact header and trailer and + uses a faster integrity check than gzip. + +20. Well that's nice, but how do I make a gzip file in memory? + + You can request that deflate write the gzip format instead of the zlib + format using deflateInit2(). You can also request that inflate decode + the gzip format using inflateInit2(). Read zlib.h for more details. + +21. Is zlib thread-safe? + + Yes. However any library routines that zlib uses and any application- + provided memory allocation routines must also be thread-safe. zlib's gz* + functions use stdio library routines, and most of zlib's functions use the + library memory allocation routines by default. zlib's Init functions allow + for the application to provide custom memory allocation routines. + + Of course, you should only operate on any given zlib or gzip stream from a + single thread at a time. + +22. Can I use zlib in my commercial application? + + Yes. Please read the license in zlib.h. + +23. Is zlib under the GNU license? + + No. Please read the license in zlib.h. + +24. The license says that altered source versions must be "plainly marked". So + what exactly do I need to do to meet that requirement? + + You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In + particular, the final version number needs to be changed to "f", and an + identification string should be appended to ZLIB_VERSION. Version numbers + x.x.x.f are reserved for modifications to zlib by others than the zlib + maintainers. For example, if the version of the base zlib you are altering + is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and + ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also + update the version strings in deflate.c and inftrees.c. + + For altered source distributions, you should also note the origin and + nature of the changes in zlib.h, as well as in ChangeLog and README, along + with the dates of the alterations. The origin should include at least your + name (or your company's name), and an email address to contact for help or + issues with the library. + + Note that distributing a compiled zlib library along with zlib.h and + zconf.h is also a source distribution, and so you should change + ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes + in zlib.h as you would for a full source distribution. + +25. Will zlib work on a big-endian or little-endian architecture, and can I + exchange compressed data between them? + + Yes and yes. + +26. Will zlib work on a 64-bit machine? + + It should. It has been tested on 64-bit machines, and has no dependence + on any data types being limited to 32-bits in length. If you have any + difficulties, please provide a complete problem report to zlib@gzip.org + +27. Will zlib decompress data from the PKWare Data Compression Library? + + No. The PKWare DCL uses a completely different compressed data format + than does PKZIP and zlib. However, you can look in zlib's contrib/blast + directory for a possible solution to your problem. + +28. Can I access data randomly in a compressed stream? + + No, not without some preparation. If when compressing you periodically + use Z_FULL_FLUSH, carefully write all the pending data at those points, + and keep an index of those locations, then you can start decompression + at those points. You have to be careful to not use Z_FULL_FLUSH too + often, since it can significantly degrade compression. + +29. Does zlib work on MVS, OS/390, CICS, etc.? + + We don't know for sure. We have heard occasional reports of success on + these systems. If you do use it on one of these, please provide us with + a report, instructions, and patches that we can reference when we get + these questions. Thanks. + +30. Is there some simpler, easier to read version of inflate I can look at + to understand the deflate format? + + First off, you should read RFC 1951. Second, yes. Look in zlib's + contrib/puff directory. + +31. Does zlib infringe on any patents? + + As far as we know, no. In fact, that was originally the whole point behind + zlib. Look here for some more information: + + http://www.gzip.org/#faq11 + +32. Can zlib work with greater than 4 GB of data? + + Yes. inflate() and deflate() will process any amount of data correctly. + Each call of inflate() or deflate() is limited to input and output chunks + of the maximum value that can be stored in the compiler's "unsigned int" + type, but there is no limit to the number of chunks. Note however that the + strm.total_in and strm_total_out counters may be limited to 4 GB. These + counters are provided as a convenience and are not used internally by + inflate() or deflate(). The application can easily set up its own counters + updated after each call of inflate() or deflate() to count beyond 4 GB. + compress() and uncompress() may be limited to 4 GB, since they operate in a + single call. gzseek() and gztell() may be limited to 4 GB depending on how + zlib is compiled. See the zlibCompileFlags() function in zlib.h. + + The word "may" appears several times above since there is a 4 GB limit + only if the compiler's "long" type is 32 bits. If the compiler's "long" + type is 64 bits, then the limit is 16 exabytes. + +33. Does zlib have any security vulnerabilities? + + The only one that we are aware of is potentially in gzprintf(). If zlib + is compiled to use sprintf() or vsprintf(), then there is no protection + against a buffer overflow of a 4K string space, other than the caller of + gzprintf() assuring that the output will not exceed 4K. On the other + hand, if zlib is compiled to use snprintf() or vsnprintf(), which should + normally be the case, then there is no vulnerability. The ./configure + script will display warnings if an insecure variation of sprintf() will + be used by gzprintf(). Also the zlibCompileFlags() function will return + information on what variant of sprintf() is used by gzprintf(). + + If you don't have snprintf() or vsnprintf() and would like one, you can + find a portable implementation here: + + http://www.ijs.si/software/snprintf/ + + Note that you should be using the most recent version of zlib. Versions + 1.1.3 and before were subject to a double-free vulnerability. + +34. Is there a Java version of zlib? + + Probably what you want is to use zlib in Java. zlib is already included + as part of the Java SDK in the java.util.zip package. If you really want + a version of zlib written in the Java language, look on the zlib home + page for links: http://www.zlib.org/ + +35. I get this or that compiler or source-code scanner warning when I crank it + up to maximally-pedantic. Can't you guys write proper code? + + Many years ago, we gave up attempting to avoid warnings on every compiler + in the universe. It just got to be a waste of time, and some compilers + were downright silly. So now, we simply make sure that the code always + works. + +36. Valgrind (or some similar memory access checker) says that deflate is + performing a conditional jump that depends on an uninitialized value. + Isn't that a bug? + + No. That is intentional for performance reasons, and the output of + deflate is not affected. This only started showing up recently since + zlib 1.2.x uses malloc() by default for allocations, whereas earlier + versions used calloc(), which zeros out the allocated memory. + +37. Will zlib read the (insert any ancient or arcane format here) compressed + data format? + + Probably not. Look in the comp.compression FAQ for pointers to various + formats and associated software. + +38. How can I encrypt/decrypt zip files with zlib? + + zlib doesn't support encryption. The original PKZIP encryption is very weak + and can be broken with freely available programs. To get strong encryption, + use GnuPG, http://www.gnupg.org/ , which already includes zlib compression. + For PKZIP compatible "encryption", look at http://www.info-zip.org/ + +39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? + + "gzip" is the gzip format, and "deflate" is the zlib format. They should + probably have called the second one "zlib" instead to avoid confusion + with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 + correctly points to the zlib specification in RFC 1950 for the "deflate" + transfer encoding, there have been reports of servers and browsers that + incorrectly produce or expect raw deflate data per the deflate + specficiation in RFC 1951, most notably Microsoft. So even though the + "deflate" transfer encoding using the zlib format would be the more + efficient approach (and in fact exactly what the zlib format was designed + for), using the "gzip" transfer encoding is probably more reliable due to + an unfortunate choice of name on the part of the HTTP 1.1 authors. + + Bottom line: use the gzip format for HTTP 1.1 encoding. + +40. Does zlib support the new "Deflate64" format introduced by PKWare? + + No. PKWare has apparently decided to keep that format proprietary, since + they have not documented it as they have previous compression formats. + In any case, the compression improvements are so modest compared to other + more modern approaches, that it's not worth the effort to implement. + +41. Can you please sign these lengthy legal documents and fax them back to us + so that we can use your software in our product? + + No. Go away. Shoo. diff --git a/compat/zlib/INDEX b/compat/zlib/INDEX new file mode 100644 index 0000000..0587e59 --- /dev/null +++ b/compat/zlib/INDEX @@ -0,0 +1,51 @@ +ChangeLog history of changes +FAQ Frequently Asked Questions about zlib +INDEX this file +Makefile makefile for Unix (generated by configure) +Makefile.in makefile for Unix (template for configure) +README guess what +algorithm.txt description of the (de)compression algorithm +configure configure script for Unix +zconf.in.h template for zconf.h (used by configure) + +amiga/ makefiles for Amiga SAS C +as400/ makefiles for IBM AS/400 +msdos/ makefiles for MSDOS +old/ makefiles for various architectures and zlib documentation + files that have not yet been updated for zlib 1.2.x +projects/ projects for various Integrated Development Environments +qnx/ makefiles for QNX +win32/ makefiles for Windows + + zlib public header files (must be kept): +zconf.h +zlib.h + + private source files used to build the zlib library: +adler32.c +compress.c +crc32.c +crc32.h +deflate.c +deflate.h +gzio.c +infback.c +inffast.c +inffast.h +inffixed.h +inflate.c +inflate.h +inftrees.c +inftrees.h +trees.c +trees.h +uncompr.c +zutil.c +zutil.h + + source files for sample programs: +example.c +minigzip.c + + unsupported contribution by third parties +See contrib/README.contrib diff --git a/compat/zlib/Makefile b/compat/zlib/Makefile new file mode 100644 index 0000000..2fd6e45 --- /dev/null +++ b/compat/zlib/Makefile @@ -0,0 +1,154 @@ +# Makefile for zlib +# Copyright (C) 1995-2005 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile and test, type: +# ./configure; make test +# The call of configure is optional if you don't have special requirements +# If you wish to build zlib as a shared library, use: ./configure -s + +# To use the asm code, type: +# cp contrib/asm?86/match.S ./match.S +# make LOC=-DASMV OBJA=match.o + +# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: +# make install +# To install in $HOME instead of /usr/local, use: +# make install prefix=$HOME + +CC=cc + +CFLAGS=-O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-g -DDEBUG +#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ +# -Wstrict-prototypes -Wmissing-prototypes + +LDFLAGS=libz.a +LDSHARED=$(CC) +CPP=$(CC) -E + +LIBS=libz.a +SHAREDLIB=libz.so +SHAREDLIBV=libz.so.1.2.3 +SHAREDLIBM=libz.so.1 + +AR=ar rc +RANLIB=ranlib +TAR=tar +SHELL=/bin/sh +EXE= + +prefix = /usr/local +exec_prefix = ${prefix} +libdir = ${exec_prefix}/lib +includedir = ${prefix}/include +mandir = ${prefix}/share/man +man3dir = ${mandir}/man3 + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infback.o inftrees.o inffast.o + +OBJA = +# to use the asm code: make OBJA=match.o + +TEST_OBJS = example.o minigzip.o + +all: example$(EXE) minigzip$(EXE) + +check: test +test: all + @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ + echo hello world | ./minigzip | ./minigzip -d || \ + echo ' *** minigzip test FAILED ***' ; \ + if ./example; then \ + echo ' *** zlib test OK ***'; \ + else \ + echo ' *** zlib test FAILED ***'; \ + fi + +libz.a: $(OBJS) $(OBJA) + $(AR) $@ $(OBJS) $(OBJA) + -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 + +match.o: match.S + $(CPP) match.S > _match.s + $(CC) -c _match.s + mv _match.o match.o + rm -f _match.s + +$(SHAREDLIBV): $(OBJS) + $(LDSHARED) -o $@ $(OBJS) + rm -f $(SHAREDLIB) $(SHAREDLIBM) + ln -s $@ $(SHAREDLIB) + ln -s $@ $(SHAREDLIBM) + +example$(EXE): example.o $(LIBS) + $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) + +minigzip$(EXE): minigzip.o $(LIBS) + $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) + +install: $(LIBS) + -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi + -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi + -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi + -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi + cp zlib.h zconf.h $(includedir) + chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h + cp $(LIBS) $(libdir) + cd $(libdir); chmod 755 $(LIBS) + -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 + cd $(libdir); if test -f $(SHAREDLIBV); then \ + rm -f $(SHAREDLIB) $(SHAREDLIBM); \ + ln -s $(SHAREDLIBV) $(SHAREDLIB); \ + ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ + (ldconfig || true) >/dev/null 2>&1; \ + fi + cp zlib.3 $(man3dir) + chmod 644 $(man3dir)/zlib.3 +# The ranlib in install is needed on NeXTSTEP which checks file times +# ldconfig is for Linux + +uninstall: + cd $(includedir); \ + cd $(libdir); rm -f libz.a; \ + if test -f $(SHAREDLIBV); then \ + rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ + fi + cd $(man3dir); rm -f zlib.3 + +mostlyclean: clean +clean: + rm -f *.o *~ example$(EXE) minigzip$(EXE) \ + libz.* foo.gz so_locations \ + _match.s maketree contrib/infback9/*.o + +maintainer-clean: distclean +distclean: clean + cp -p Makefile.in Makefile + cp -p zconf.in.h zconf.h + rm -f .DS_Store + +tags: + etags *.[ch] + +depend: + makedepend -- $(CFLAGS) -- *.[ch] + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: crc32.h zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +example.o: zlib.h zconf.h +gzio.o: zutil.h zlib.h zconf.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +minigzip.o: zlib.h zconf.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/compat/zlib/Makefile.in b/compat/zlib/Makefile.in new file mode 100644 index 0000000..2fd6e45 --- /dev/null +++ b/compat/zlib/Makefile.in @@ -0,0 +1,154 @@ +# Makefile for zlib +# Copyright (C) 1995-2005 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile and test, type: +# ./configure; make test +# The call of configure is optional if you don't have special requirements +# If you wish to build zlib as a shared library, use: ./configure -s + +# To use the asm code, type: +# cp contrib/asm?86/match.S ./match.S +# make LOC=-DASMV OBJA=match.o + +# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: +# make install +# To install in $HOME instead of /usr/local, use: +# make install prefix=$HOME + +CC=cc + +CFLAGS=-O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-g -DDEBUG +#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ +# -Wstrict-prototypes -Wmissing-prototypes + +LDFLAGS=libz.a +LDSHARED=$(CC) +CPP=$(CC) -E + +LIBS=libz.a +SHAREDLIB=libz.so +SHAREDLIBV=libz.so.1.2.3 +SHAREDLIBM=libz.so.1 + +AR=ar rc +RANLIB=ranlib +TAR=tar +SHELL=/bin/sh +EXE= + +prefix = /usr/local +exec_prefix = ${prefix} +libdir = ${exec_prefix}/lib +includedir = ${prefix}/include +mandir = ${prefix}/share/man +man3dir = ${mandir}/man3 + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infback.o inftrees.o inffast.o + +OBJA = +# to use the asm code: make OBJA=match.o + +TEST_OBJS = example.o minigzip.o + +all: example$(EXE) minigzip$(EXE) + +check: test +test: all + @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ + echo hello world | ./minigzip | ./minigzip -d || \ + echo ' *** minigzip test FAILED ***' ; \ + if ./example; then \ + echo ' *** zlib test OK ***'; \ + else \ + echo ' *** zlib test FAILED ***'; \ + fi + +libz.a: $(OBJS) $(OBJA) + $(AR) $@ $(OBJS) $(OBJA) + -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 + +match.o: match.S + $(CPP) match.S > _match.s + $(CC) -c _match.s + mv _match.o match.o + rm -f _match.s + +$(SHAREDLIBV): $(OBJS) + $(LDSHARED) -o $@ $(OBJS) + rm -f $(SHAREDLIB) $(SHAREDLIBM) + ln -s $@ $(SHAREDLIB) + ln -s $@ $(SHAREDLIBM) + +example$(EXE): example.o $(LIBS) + $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) + +minigzip$(EXE): minigzip.o $(LIBS) + $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) + +install: $(LIBS) + -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi + -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi + -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi + -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi + cp zlib.h zconf.h $(includedir) + chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h + cp $(LIBS) $(libdir) + cd $(libdir); chmod 755 $(LIBS) + -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 + cd $(libdir); if test -f $(SHAREDLIBV); then \ + rm -f $(SHAREDLIB) $(SHAREDLIBM); \ + ln -s $(SHAREDLIBV) $(SHAREDLIB); \ + ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ + (ldconfig || true) >/dev/null 2>&1; \ + fi + cp zlib.3 $(man3dir) + chmod 644 $(man3dir)/zlib.3 +# The ranlib in install is needed on NeXTSTEP which checks file times +# ldconfig is for Linux + +uninstall: + cd $(includedir); \ + cd $(libdir); rm -f libz.a; \ + if test -f $(SHAREDLIBV); then \ + rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ + fi + cd $(man3dir); rm -f zlib.3 + +mostlyclean: clean +clean: + rm -f *.o *~ example$(EXE) minigzip$(EXE) \ + libz.* foo.gz so_locations \ + _match.s maketree contrib/infback9/*.o + +maintainer-clean: distclean +distclean: clean + cp -p Makefile.in Makefile + cp -p zconf.in.h zconf.h + rm -f .DS_Store + +tags: + etags *.[ch] + +depend: + makedepend -- $(CFLAGS) -- *.[ch] + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: crc32.h zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +example.o: zlib.h zconf.h +gzio.o: zutil.h zlib.h zconf.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +minigzip.o: zlib.h zconf.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/compat/zlib/README b/compat/zlib/README new file mode 100644 index 0000000..758cc50 --- /dev/null +++ b/compat/zlib/README @@ -0,0 +1,125 @@ +ZLIB DATA COMPRESSION LIBRARY + +zlib 1.2.3 is a general purpose data compression library. All the code is +thread safe. The data format used by the zlib library is described by RFCs +(Request for Comments) 1950 to 1952 in the files +http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) +and rfc1952.txt (gzip format). These documents are also available in other +formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html + +All functions of the compression library are documented in the file zlib.h +(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example +of the library is given in the file example.c which also tests that the library +is working correctly. Another example is given in the file minigzip.c. The +compression library itself is composed of all source files except example.c and +minigzip.c. + +To compile all files and run the test program, follow the instructions given at +the top of Makefile. In short "make test; make install" should work for most +machines. For Unix: "./configure; make test; make install". For MSDOS, use one +of the special makefiles such as Makefile.msc. For VMS, use make_vms.com. + +Questions about zlib should be sent to , or to Gilles Vollant + for the Windows DLL version. The zlib home page is +http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem, +please check this site to verify that you have the latest version of zlib; +otherwise get the latest version and check whether the problem still exists or +not. + +PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking +for help. + +Mark Nelson wrote an article about zlib for the Jan. 1997 +issue of Dr. Dobb's Journal; a copy of the article is available in +http://dogma.net/markn/articles/zlibtool/zlibtool.htm + +The changes made in version 1.2.3 are documented in the file ChangeLog. + +Unsupported third party contributions are provided in directory "contrib". + +A Java implementation of zlib is available in the Java Development Kit +http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html +See the zlib home page http://www.zlib.org for details. + +A Perl interface to zlib written by Paul Marquess is in the +CPAN (Comprehensive Perl Archive Network) sites +http://www.cpan.org/modules/by-module/Compress/ + +A Python interface to zlib written by A.M. Kuchling is +available in Python 1.5 and later versions, see +http://www.python.org/doc/lib/module-zlib.html + +A zlib binding for TCL written by Andreas Kupries is +availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html + +An experimental package to read and write files in .zip format, written on top +of zlib by Gilles Vollant , is available in the +contrib/minizip directory of zlib. + + +Notes for some targets: + +- For Windows DLL versions, please see win32/DLL_FAQ.txt + +- For 64-bit Irix, deflate.c must be compiled without any optimization. With + -O, one libpng test fails. The test works in 32 bit mode (with the -n32 + compiler flag). The compiler bug has been reported to SGI. + +- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works + when compiled with cc. + +- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is + necessary to get gzprintf working correctly. This is done by configure. + +- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with + other compilers. Use "make test" to check your compiler. + +- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers. + +- For PalmOs, see http://palmzlib.sourceforge.net/ + +- When building a shared, i.e. dynamic library on Mac OS X, the library must be + installed before testing (do "make install" before "make test"), since the + library location is specified in the library. + + +Acknowledgments: + + The deflate format used by zlib was defined by Phil Katz. The deflate + and zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; + they are too numerous to cite here. + +Copyright notice: + + (C) 1995-2004 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* +receiving lengthy legal documents to sign. The sources are provided +for free but without warranty of any kind. The library has been +entirely written by Jean-loup Gailly and Mark Adler; it does not +include third-party code. + +If you redistribute modified sources, we would appreciate that you include +in the file ChangeLog history information documenting your changes. Please +read the FAQ for more information on the distribution of modified source +versions. diff --git a/compat/zlib/adler32.c b/compat/zlib/adler32.c new file mode 100644 index 0000000..26121fe --- /dev/null +++ b/compat/zlib/adler32.c @@ -0,0 +1,149 @@ +/* adler32.c -- compute the Adler-32 checksum of a data stream + * Copyright (C) 1995-2004 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: adler32.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#define ZLIB_INTERNAL +#include "zlib.h" + +#define BASE 65521UL /* largest prime smaller than 65536 */ +#define NMAX 5552 +/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + +/* use NO_DIVIDE if your processor does not do division in hardware */ +#ifdef NO_DIVIDE +# define MOD(a) \ + do { \ + if (a >= (BASE << 16)) a -= (BASE << 16); \ + if (a >= (BASE << 15)) a -= (BASE << 15); \ + if (a >= (BASE << 14)) a -= (BASE << 14); \ + if (a >= (BASE << 13)) a -= (BASE << 13); \ + if (a >= (BASE << 12)) a -= (BASE << 12); \ + if (a >= (BASE << 11)) a -= (BASE << 11); \ + if (a >= (BASE << 10)) a -= (BASE << 10); \ + if (a >= (BASE << 9)) a -= (BASE << 9); \ + if (a >= (BASE << 8)) a -= (BASE << 8); \ + if (a >= (BASE << 7)) a -= (BASE << 7); \ + if (a >= (BASE << 6)) a -= (BASE << 6); \ + if (a >= (BASE << 5)) a -= (BASE << 5); \ + if (a >= (BASE << 4)) a -= (BASE << 4); \ + if (a >= (BASE << 3)) a -= (BASE << 3); \ + if (a >= (BASE << 2)) a -= (BASE << 2); \ + if (a >= (BASE << 1)) a -= (BASE << 1); \ + if (a >= BASE) a -= BASE; \ + } while (0) +# define MOD4(a) \ + do { \ + if (a >= (BASE << 4)) a -= (BASE << 4); \ + if (a >= (BASE << 3)) a -= (BASE << 3); \ + if (a >= (BASE << 2)) a -= (BASE << 2); \ + if (a >= (BASE << 1)) a -= (BASE << 1); \ + if (a >= BASE) a -= BASE; \ + } while (0) +#else +# define MOD(a) a %= BASE +# define MOD4(a) a %= BASE +#endif + +/* ========================================================================= */ +uLong ZEXPORT adler32(adler, buf, len) + uLong adler; + const Bytef *buf; + uInt len; +{ + unsigned long sum2; + unsigned n; + + /* split Adler-32 into component sums */ + sum2 = (adler >> 16) & 0xffff; + adler &= 0xffff; + + /* in case user likes doing a byte at a time, keep it fast */ + if (len == 1) { + adler += buf[0]; + if (adler >= BASE) + adler -= BASE; + sum2 += adler; + if (sum2 >= BASE) + sum2 -= BASE; + return adler | (sum2 << 16); + } + + /* initial Adler-32 value (deferred check for len == 1 speed) */ + if (buf == Z_NULL) + return 1L; + + /* in case short lengths are provided, keep it somewhat fast */ + if (len < 16) { + while (len--) { + adler += *buf++; + sum2 += adler; + } + if (adler >= BASE) + adler -= BASE; + MOD4(sum2); /* only added so many BASE's */ + return adler | (sum2 << 16); + } + + /* do length NMAX blocks -- requires just one modulo operation */ + while (len >= NMAX) { + len -= NMAX; + n = NMAX / 16; /* NMAX is divisible by 16 */ + do { + DO16(buf); /* 16 sums unrolled */ + buf += 16; + } while (--n); + MOD(adler); + MOD(sum2); + } + + /* do remaining bytes (less than NMAX, still just one modulo) */ + if (len) { /* avoid modulos if none remaining */ + while (len >= 16) { + len -= 16; + DO16(buf); + buf += 16; + } + while (len--) { + adler += *buf++; + sum2 += adler; + } + MOD(adler); + MOD(sum2); + } + + /* return recombined sums */ + return adler | (sum2 << 16); +} + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off_t len2; +{ + unsigned long sum1; + unsigned long sum2; + unsigned rem; + + /* the derivation of this formula is left as an exercise for the reader */ + rem = (unsigned)(len2 % BASE); + sum1 = adler1 & 0xffff; + sum2 = rem * sum1; + MOD(sum2); + sum1 += (adler2 & 0xffff) + BASE - 1; + sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; + if (sum1 > BASE) sum1 -= BASE; + if (sum1 > BASE) sum1 -= BASE; + if (sum2 > (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 > BASE) sum2 -= BASE; + return sum1 | (sum2 << 16); +} diff --git a/compat/zlib/algorithm.txt b/compat/zlib/algorithm.txt new file mode 100644 index 0000000..b022dde --- /dev/null +++ b/compat/zlib/algorithm.txt @@ -0,0 +1,209 @@ +1. Compression algorithm (deflate) + +The deflation algorithm used by gzip (also zip and zlib) is a variation of +LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in +the input data. The second occurrence of a string is replaced by a +pointer to the previous string, in the form of a pair (distance, +length). Distances are limited to 32K bytes, and lengths are limited +to 258 bytes. When a string does not occur anywhere in the previous +32K bytes, it is emitted as a sequence of literal bytes. (In this +description, `string' must be taken as an arbitrary sequence of bytes, +and is not restricted to printable characters.) + +Literals or match lengths are compressed with one Huffman tree, and +match distances are compressed with another tree. The trees are stored +in a compact form at the start of each block. The blocks can have any +size (except that the compressed data for one block must fit in +available memory). A block is terminated when deflate() determines that +it would be useful to start another block with fresh trees. (This is +somewhat similar to the behavior of LZW-based _compress_.) + +Duplicated strings are found using a hash table. All input strings of +length 3 are inserted in the hash table. A hash index is computed for +the next 3 bytes. If the hash chain for this index is not empty, all +strings in the chain are compared with the current input string, and +the longest match is selected. + +The hash chains are searched starting with the most recent strings, to +favor small distances and thus take advantage of the Huffman encoding. +The hash chains are singly linked. There are no deletions from the +hash chains, the algorithm simply discards matches that are too old. + +To avoid a worst-case situation, very long hash chains are arbitrarily +truncated at a certain length, determined by a runtime option (level +parameter of deflateInit). So deflate() does not always find the longest +possible match but generally finds a match which is long enough. + +deflate() also defers the selection of matches with a lazy evaluation +mechanism. After a match of length N has been found, deflate() searches for +a longer match at the next input byte. If a longer match is found, the +previous match is truncated to a length of one (thus producing a single +literal byte) and the process of lazy evaluation begins again. Otherwise, +the original match is kept, and the next match search is attempted only N +steps later. + +The lazy match evaluation is also subject to a runtime parameter. If +the current match is long enough, deflate() reduces the search for a longer +match, thus speeding up the whole process. If compression ratio is more +important than speed, deflate() attempts a complete second search even if +the first match is already long enough. + +The lazy match evaluation is not performed for the fastest compression +modes (level parameter 1 to 3). For these fast modes, new strings +are inserted in the hash table only when no match was found, or +when the match is not too long. This degrades the compression ratio +but saves time since there are both fewer insertions and fewer searches. + + +2. Decompression algorithm (inflate) + +2.1 Introduction + +The key question is how to represent a Huffman code (or any prefix code) so +that you can decode fast. The most important characteristic is that shorter +codes are much more common than longer codes, so pay attention to decoding the +short codes fast, and let the long codes take longer to decode. + +inflate() sets up a first level table that covers some number of bits of +input less than the length of longest code. It gets that many bits from the +stream, and looks it up in the table. The table will tell if the next +code is that many bits or less and how many, and if it is, it will tell +the value, else it will point to the next level table for which inflate() +grabs more bits and tries to decode a longer code. + +How many bits to make the first lookup is a tradeoff between the time it +takes to decode and the time it takes to build the table. If building the +table took no time (and if you had infinite memory), then there would only +be a first level table to cover all the way to the longest code. However, +building the table ends up taking a lot longer for more bits since short +codes are replicated many times in such a table. What inflate() does is +simply to make the number of bits in the first table a variable, and then +to set that variable for the maximum speed. + +For inflate, which has 286 possible codes for the literal/length tree, the size +of the first table is nine bits. Also the distance trees have 30 possible +values, and the size of the first table is six bits. Note that for each of +those cases, the table ended up one bit longer than the ``average'' code +length, i.e. the code length of an approximately flat code which would be a +little more than eight bits for 286 symbols and a little less than five bits +for 30 symbols. + + +2.2 More details on the inflate table lookup + +Ok, you want to know what this cleverly obfuscated inflate tree actually +looks like. You are correct that it's not a Huffman tree. It is simply a +lookup table for the first, let's say, nine bits of a Huffman symbol. The +symbol could be as short as one bit or as long as 15 bits. If a particular +symbol is shorter than nine bits, then that symbol's translation is duplicated +in all those entries that start with that symbol's bits. For example, if the +symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a +symbol is nine bits long, it appears in the table once. + +If the symbol is longer than nine bits, then that entry in the table points +to another similar table for the remaining bits. Again, there are duplicated +entries as needed. The idea is that most of the time the symbol will be short +and there will only be one table look up. (That's whole idea behind data +compression in the first place.) For the less frequent long symbols, there +will be two lookups. If you had a compression method with really long +symbols, you could have as many levels of lookups as is efficient. For +inflate, two is enough. + +So a table entry either points to another table (in which case nine bits in +the above example are gobbled), or it contains the translation for the symbol +and the number of bits to gobble. Then you start again with the next +ungobbled bit. + +You may wonder: why not just have one lookup table for how ever many bits the +longest symbol is? The reason is that if you do that, you end up spending +more time filling in duplicate symbol entries than you do actually decoding. +At least for deflate's output that generates new trees every several 10's of +kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code +would take too long if you're only decoding several thousand symbols. At the +other extreme, you could make a new table for every bit in the code. In fact, +that's essentially a Huffman tree. But then you spend two much time +traversing the tree while decoding, even for short symbols. + +So the number of bits for the first lookup table is a trade of the time to +fill out the table vs. the time spent looking at the second level and above of +the table. + +Here is an example, scaled down: + +The code being decoded, with 10 symbols, from 1 to 6 bits long: + +A: 0 +B: 10 +C: 1100 +D: 11010 +E: 11011 +F: 11100 +G: 11101 +H: 11110 +I: 111110 +J: 111111 + +Let's make the first table three bits long (eight entries): + +000: A,1 +001: A,1 +010: A,1 +011: A,1 +100: B,2 +101: B,2 +110: -> table X (gobble 3 bits) +111: -> table Y (gobble 3 bits) + +Each entry is what the bits decode as and how many bits that is, i.e. how +many bits to gobble. Or the entry points to another table, with the number of +bits to gobble implicit in the size of the table. + +Table X is two bits long since the longest code starting with 110 is five bits +long: + +00: C,1 +01: C,1 +10: D,2 +11: E,2 + +Table Y is three bits long since the longest code starting with 111 is six +bits long: + +000: F,2 +001: F,2 +010: G,2 +011: G,2 +100: H,2 +101: H,2 +110: I,3 +111: J,3 + +So what we have here are three tables with a total of 20 entries that had to +be constructed. That's compared to 64 entries for a single table. Or +compared to 16 entries for a Huffman tree (six two entry tables and one four +entry table). Assuming that the code ideally represents the probability of +the symbols, it takes on the average 1.25 lookups per symbol. That's compared +to one lookup for the single table, or 1.66 lookups per symbol for the +Huffman tree. + +There, I think that gives you a picture of what's going on. For inflate, the +meaning of a particular symbol is often more than just a letter. It can be a +byte (a "literal"), or it can be either a length or a distance which +indicates a base value and a number of bits to fetch after the code that is +added to the base value. Or it might be the special end-of-block code. The +data structures created in inftrees.c try to encode all that information +compactly in the tables. + + +Jean-loup Gailly Mark Adler +jloup@gzip.org madler@alumni.caltech.edu + + +References: + +[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data +Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, +pp. 337-343. + +``DEFLATE Compressed Data Format Specification'' available in +http://www.ietf.org/rfc/rfc1951.txt diff --git a/compat/zlib/amiga/Makefile.pup b/compat/zlib/amiga/Makefile.pup new file mode 100644 index 0000000..3f7e155 --- /dev/null +++ b/compat/zlib/amiga/Makefile.pup @@ -0,0 +1,66 @@ +# Amiga powerUP (TM) Makefile +# makefile for libpng and SAS C V6.58/7.00 PPC compiler +# Copyright (C) 1998 by Andreas R. Kleinert + +LIBNAME = libzip.a + +CC = scppc +CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \ + OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER +AR = ppc-amigaos-ar cr +RANLIB = ppc-amigaos-ranlib +LD = ppc-amigaos-ld -r +LDFLAGS = -o +LDLIBS = LIB:scppc.a LIB:end.o +RM = delete quiet + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infback.o inftrees.o inffast.o + +TEST_OBJS = example.o minigzip.o + +all: example minigzip + +check: test +test: all + example + echo hello world | minigzip | minigzip -d + +$(LIBNAME): $(OBJS) + $(AR) $@ $(OBJS) + -$(RANLIB) $@ + +example: example.o $(LIBNAME) + $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS) + +minigzip: minigzip.o $(LIBNAME) + $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS) + +mostlyclean: clean +clean: + $(RM) *.o example minigzip $(LIBNAME) foo.gz + +zip: + zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \ + descrip.mms *.[ch] + +tgz: + cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ + zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch] + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: crc32.h zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +example.o: zlib.h zconf.h +gzio.o: zutil.h zlib.h zconf.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +minigzip.o: zlib.h zconf.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/compat/zlib/amiga/Makefile.sas b/compat/zlib/amiga/Makefile.sas new file mode 100644 index 0000000..296ef48 --- /dev/null +++ b/compat/zlib/amiga/Makefile.sas @@ -0,0 +1,65 @@ +# SMakefile for zlib +# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly +# Osma Ahvenlampi +# Amiga, SAS/C 6.56 & Smake + +CC=sc +CFLAGS=OPT +#CFLAGS=OPT CPU=68030 +#CFLAGS=DEBUG=LINE +LDFLAGS=LIB z.lib + +SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \ + NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \ + DEF=POSTINC + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infback.o inftrees.o inffast.o + +TEST_OBJS = example.o minigzip.o + +all: SCOPTIONS example minigzip + +check: test +test: all + example + echo hello world | minigzip | minigzip -d + +install: z.lib + copy clone zlib.h zconf.h INCLUDE: + copy clone z.lib LIB: + +z.lib: $(OBJS) + oml z.lib r $(OBJS) + +example: example.o z.lib + $(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS) + +minigzip: minigzip.o z.lib + $(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS) + +mostlyclean: clean +clean: + -delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS + +SCOPTIONS: Makefile.sas + copy to $@ 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; +#endif + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = deflateInit(&stream, level); + if (err != Z_OK) return err; + + err = deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + deflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *destLen = stream.total_out; + + err = deflateEnd(&stream); + return err; +} + +/* =========================================================================== + */ +int ZEXPORT compress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); +} + +/* =========================================================================== + If the default memLevel or windowBits for deflateInit() is changed, then + this function needs to be updated. + */ +uLong ZEXPORT compressBound (sourceLen) + uLong sourceLen; +{ + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; +} diff --git a/compat/zlib/configure b/compat/zlib/configure new file mode 100755 index 0000000..d7ffdc3 --- /dev/null +++ b/compat/zlib/configure @@ -0,0 +1,459 @@ +#!/bin/sh +# configure script for zlib. This script is needed only if +# you wish to build a shared library and your system supports them, +# of if you need special compiler, flags or install directory. +# Otherwise, you can just use directly "make test; make install" +# +# To create a shared library, use "configure --shared"; by default a static +# library is created. If the primitive shared library support provided here +# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz +# +# To impose specific compiler or flags or install directory, use for example: +# prefix=$HOME CC=cc CFLAGS="-O4" ./configure +# or for csh/tcsh users: +# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) +# LDSHARED is the command to be used to create a shared library + +# Incorrect settings of CC or CFLAGS may prevent creating a shared library. +# If you have problems, try without defining CC and CFLAGS before reporting +# an error. + +LIBS=libz.a +LDFLAGS="-L. ${LIBS}" +VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` +VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` +VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` +AR=${AR-"ar rc"} +RANLIB=${RANLIB-"ranlib"} +prefix=${prefix-/usr/local} +exec_prefix=${exec_prefix-'${prefix}'} +libdir=${libdir-'${exec_prefix}/lib'} +includedir=${includedir-'${prefix}/include'} +mandir=${mandir-'${prefix}/share/man'} +shared_ext='.so' +shared=0 +gcc=0 +old_cc="$CC" +old_cflags="$CFLAGS" + +while test $# -ge 1 +do +case "$1" in + -h* | --h*) + echo 'usage:' + echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' + echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' + exit 0;; + -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; + -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; + -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; + -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; + -p* | --p*) prefix="$2"; shift; shift;; + -e* | --e*) exec_prefix="$2"; shift; shift;; + -l* | --l*) libdir="$2"; shift; shift;; + -i* | --i*) includedir="$2"; shift; shift;; + -s* | --s*) shared=1; shift;; + *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;; + esac +done + +test=ztest$$ +cat > $test.c </dev/null; then + CC="$cc" + SFLAGS=${CFLAGS-"-fPIC -O3"} + CFLAGS="$cflags" + case `(uname -s || echo unknown) 2>/dev/null` in + Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; + CYGWIN* | Cygwin* | cygwin* | OS/2* ) + EXE='.exe';; + QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 + # (alain.bonnefoy@icbt.com) + LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; + HP-UX*) + LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} + case `(uname -m || echo unknown) 2>/dev/null` in + ia64) + shared_ext='.so' + SHAREDLIB='libz.so';; + *) + shared_ext='.sl' + SHAREDLIB='libz.sl';; + esac;; + Darwin*) shared_ext='.dylib' + SHAREDLIB=libz$shared_ext + SHAREDLIBV=libz.$VER$shared_ext + SHAREDLIBM=libz.$VER1$shared_ext + LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};; + *) LDSHARED=${LDSHARED-"$cc -shared"};; + esac +else + # find system name and corresponding cc options + CC=${CC-cc} + case `(uname -sr || echo unknown) 2>/dev/null` in + HP-UX*) SFLAGS=${CFLAGS-"-O +z"} + CFLAGS=${CFLAGS-"-O"} +# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} + LDSHARED=${LDSHARED-"ld -b"} + case `(uname -m || echo unknown) 2>/dev/null` in + ia64) + shared_ext='.so' + SHAREDLIB='libz.so';; + *) + shared_ext='.sl' + SHAREDLIB='libz.sl';; + esac;; + IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} + CFLAGS=${CFLAGS-"-ansi -O2"} + LDSHARED=${LDSHARED-"cc -shared"};; + OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} + CFLAGS=${CFLAGS-"-O -std1"} + LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; + OSF1*) SFLAGS=${CFLAGS-"-O -std1"} + CFLAGS=${CFLAGS-"-O -std1"} + LDSHARED=${LDSHARED-"cc -shared"};; + QNX*) SFLAGS=${CFLAGS-"-4 -O"} + CFLAGS=${CFLAGS-"-4 -O"} + LDSHARED=${LDSHARED-"cc"} + RANLIB=${RANLIB-"true"} + AR="cc -A";; + SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} + CFLAGS=${CFLAGS-"-O3"} + LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; + SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} + CFLAGS=${CFLAGS-"-fast -xcg89"} + LDSHARED=${LDSHARED-"cc -G"};; + SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} + CFLAGS=${CFLAGS-"-O2"} + LDSHARED=${LDSHARED-"ld"};; + SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} + CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"} + LDSHARED=${LDSHARED-"cc -xarch=v9b"};; + UNIX_System_V\ 4.2.0) + SFLAGS=${CFLAGS-"-KPIC -O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -G"};; + UNIX_SV\ 4.2MP) + SFLAGS=${CFLAGS-"-Kconform_pic -O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -G"};; + OpenUNIX\ 5) + SFLAGS=${CFLAGS-"-KPIC -O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -G"};; + AIX*) # Courtesy of dbakker@arrayasolutions.com + SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} + CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} + LDSHARED=${LDSHARED-"xlc -G"};; + # send working options for other systems to support@gzip.org + *) SFLAGS=${CFLAGS-"-O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -shared"};; + esac +fi + +SHAREDLIB=${SHAREDLIB-"libz$shared_ext"} +SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"} +SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"} + +if test $shared -eq 1; then + echo Checking for shared library support... + # we must test in two steps (cc then ld), required at least on SunOS 4.x + if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && + test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then + CFLAGS="$SFLAGS" + LIBS="$SHAREDLIBV" + echo Building shared library $SHAREDLIBV with $CC. + elif test -z "$old_cc" -a -z "$old_cflags"; then + echo No shared library support. + shared=0; + else + echo 'No shared library support; try without defining CC and CFLAGS' + shared=0; + fi +fi +if test $shared -eq 0; then + LDSHARED="$CC" + echo Building static library $LIBS version $VER with $CC. +else + LDFLAGS="-L. ${SHAREDLIBV}" +fi + +cat > $test.c < +int main() { return 0; } +EOF +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h + echo "Checking for unistd.h... Yes." +else + cp -p zconf.in.h zconf.h + echo "Checking for unistd.h... No." +fi + +cat > $test.c < +#include +#include "zconf.h" + +int main() +{ +#ifndef STDC + choke me +#endif + + return 0; +} +EOF + +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()" + + cat > $test.c < +#include + +int mytest(char *fmt, ...) +{ + char buf[20]; + va_list ap; + + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return 0; +} + +int main() +{ + return (mytest("Hello%d\n", 1)); +} +EOF + + if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then + echo "Checking for vsnprintf() in stdio.h... Yes." + + cat >$test.c < +#include + +int mytest(char *fmt, ...) +{ + int n; + char buf[20]; + va_list ap; + + va_start(ap, fmt); + n = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return n; +} + +int main() +{ + return (mytest("Hello%d\n", 1)); +} +EOF + + if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking for return value of vsnprintf()... Yes." + else + CFLAGS="$CFLAGS -DHAS_vsnprintf_void" + echo "Checking for return value of vsnprintf()... No." + echo " WARNING: apparently vsnprintf() does not return a value. zlib" + echo " can build but will be open to possible string-format security" + echo " vulnerabilities." + fi + else + CFLAGS="$CFLAGS -DNO_vsnprintf" + echo "Checking for vsnprintf() in stdio.h... No." + echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" + echo " can build but will be open to possible buffer-overflow security" + echo " vulnerabilities." + + cat >$test.c < +#include + +int mytest(char *fmt, ...) +{ + int n; + char buf[20]; + va_list ap; + + va_start(ap, fmt); + n = vsprintf(buf, fmt, ap); + va_end(ap); + return n; +} + +int main() +{ + return (mytest("Hello%d\n", 1)); +} +EOF + + if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking for return value of vsprintf()... Yes." + else + CFLAGS="$CFLAGS -DHAS_vsprintf_void" + echo "Checking for return value of vsprintf()... No." + echo " WARNING: apparently vsprintf() does not return a value. zlib" + echo " can build but will be open to possible string-format security" + echo " vulnerabilities." + fi + fi +else + echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()" + + cat >$test.c < + +int mytest() +{ + char buf[20]; + + snprintf(buf, sizeof(buf), "%s", "foo"); + return 0; +} + +int main() +{ + return (mytest()); +} +EOF + + if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then + echo "Checking for snprintf() in stdio.h... Yes." + + cat >$test.c < + +int mytest() +{ + char buf[20]; + + return snprintf(buf, sizeof(buf), "%s", "foo"); +} + +int main() +{ + return (mytest()); +} +EOF + + if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking for return value of snprintf()... Yes." + else + CFLAGS="$CFLAGS -DHAS_snprintf_void" + echo "Checking for return value of snprintf()... No." + echo " WARNING: apparently snprintf() does not return a value. zlib" + echo " can build but will be open to possible string-format security" + echo " vulnerabilities." + fi + else + CFLAGS="$CFLAGS -DNO_snprintf" + echo "Checking for snprintf() in stdio.h... No." + echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" + echo " can build but will be open to possible buffer-overflow security" + echo " vulnerabilities." + + cat >$test.c < + +int mytest() +{ + char buf[20]; + + return sprintf(buf, "%s", "foo"); +} + +int main() +{ + return (mytest()); +} +EOF + + if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking for return value of sprintf()... Yes." + else + CFLAGS="$CFLAGS -DHAS_sprintf_void" + echo "Checking for return value of sprintf()... No." + echo " WARNING: apparently sprintf() does not return a value. zlib" + echo " can build but will be open to possible string-format security" + echo " vulnerabilities." + fi + fi +fi + +cat >$test.c < +int main() { return 0; } +EOF +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking for errno.h... Yes." +else + echo "Checking for errno.h... No." + CFLAGS="$CFLAGS -DNO_ERRNO_H" +fi + +cat > $test.c < +#include +#include +caddr_t hello() { + return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); +} +EOF +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + CFLAGS="$CFLAGS -DUSE_MMAP" + echo Checking for mmap support... Yes. +else + echo Checking for mmap support... No. +fi + +CPP=${CPP-"$CC -E"} +case $CFLAGS in + *ASMV*) + if test "`nm $test.o | grep _hello`" = ""; then + CPP="$CPP -DNO_UNDERLINE" + echo Checking for underline in external names... No. + else + echo Checking for underline in external names... Yes. + fi;; +esac + +rm -f $test.[co] $test $test$shared_ext + +# udpate Makefile +sed < Makefile.in " +/^CC *=/s#=.*#=$CC# +/^CFLAGS *=/s#=.*#=$CFLAGS# +/^CPP *=/s#=.*#=$CPP# +/^LDSHARED *=/s#=.*#=$LDSHARED# +/^LIBS *=/s#=.*#=$LIBS# +/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# +/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# +/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# +/^AR *=/s#=.*#=$AR# +/^RANLIB *=/s#=.*#=$RANLIB# +/^EXE *=/s#=.*#=$EXE# +/^prefix *=/s#=.*#=$prefix# +/^exec_prefix *=/s#=.*#=$exec_prefix# +/^libdir *=/s#=.*#=$libdir# +/^includedir *=/s#=.*#=$includedir# +/^mandir *=/s#=.*#=$mandir# +/^LDFLAGS *=/s#=.*#=$LDFLAGS# +" > Makefile diff --git a/compat/zlib/crc32.c b/compat/zlib/crc32.c new file mode 100644 index 0000000..667cd15 --- /dev/null +++ b/compat/zlib/crc32.c @@ -0,0 +1,423 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Thanks to Rodney Brown for his contribution of faster + * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing + * tables for updating the shift register in one step with three exclusive-ors + * instead of four steps with four exclusive-ors. This results in about a + * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. + */ + +/* @(#) $Id: crc32.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +/* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore + protection on the static variables used to control the first-use generation + of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should + first call get_crc_table() to initialize the tables before allowing more than + one thread to use crc32(). + */ + +#ifdef MAKECRCH +# include +# ifndef DYNAMIC_CRC_TABLE +# define DYNAMIC_CRC_TABLE +# endif /* !DYNAMIC_CRC_TABLE */ +#endif /* MAKECRCH */ + +#include "zutil.h" /* for STDC and FAR definitions */ + +#define local static + +/* Find a four-byte integer type for crc32_little() and crc32_big(). */ +#ifndef NOBYFOUR +# ifdef STDC /* need ANSI C limits.h to determine sizes */ +# include +# define BYFOUR +# if (UINT_MAX == 0xffffffffUL) + typedef unsigned int u4; +# else +# if (ULONG_MAX == 0xffffffffUL) + typedef unsigned long u4; +# else +# if (USHRT_MAX == 0xffffffffUL) + typedef unsigned short u4; +# else +# undef BYFOUR /* can't find a four-byte integer type! */ +# endif +# endif +# endif +# endif /* STDC */ +#endif /* !NOBYFOUR */ + +/* Definitions for doing the crc four data bytes at a time. */ +#ifdef BYFOUR +# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \ + (((w)&0xff00)<<8)+(((w)&0xff)<<24)) + local unsigned long crc32_little OF((unsigned long, + const unsigned char FAR *, unsigned)); + local unsigned long crc32_big OF((unsigned long, + const unsigned char FAR *, unsigned)); +# define TBLS 8 +#else +# define TBLS 1 +#endif /* BYFOUR */ + +/* Local functions for crc concatenation */ +local unsigned long gf2_matrix_times OF((unsigned long *mat, + unsigned long vec)); +local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); + +#ifdef DYNAMIC_CRC_TABLE + +local volatile int crc_table_empty = 1; +local unsigned long FAR crc_table[TBLS][256]; +local void make_crc_table OF((void)); +#ifdef MAKECRCH + local void write_table OF((FILE *, const unsigned long FAR *)); +#endif /* MAKECRCH */ +/* + Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + The first table is simply the CRC of all possible eight bit values. This is + all the information needed to generate CRCs on data a byte at a time for all + combinations of CRC register values and incoming bytes. The remaining tables + allow for word-at-a-time CRC calculation for both big-endian and little- + endian machines, where a word is four bytes. +*/ +local void make_crc_table() +{ + unsigned long c; + int n, k; + unsigned long poly; /* polynomial exclusive-or pattern */ + /* terms of polynomial defining this crc (except x^32): */ + static volatile int first = 1; /* flag to limit concurrent making */ + static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* See if another task is already doing this (not thread-safe, but better + than nothing -- significantly reduces duration of vulnerability in + case the advice about DYNAMIC_CRC_TABLE is ignored) */ + if (first) { + first = 0; + + /* make exclusive-or pattern from polynomial (0xedb88320UL) */ + poly = 0UL; + for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++) + poly |= 1UL << (31 - p[n]); + + /* generate a crc for every 8-bit value */ + for (n = 0; n < 256; n++) { + c = (unsigned long)n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ (c >> 1) : c >> 1; + crc_table[0][n] = c; + } + +#ifdef BYFOUR + /* generate crc for each value followed by one, two, and three zeros, + and then the byte reversal of those as well as the first table */ + for (n = 0; n < 256; n++) { + c = crc_table[0][n]; + crc_table[4][n] = REV(c); + for (k = 1; k < 4; k++) { + c = crc_table[0][c & 0xff] ^ (c >> 8); + crc_table[k][n] = c; + crc_table[k + 4][n] = REV(c); + } + } +#endif /* BYFOUR */ + + crc_table_empty = 0; + } + else { /* not first */ + /* wait for the other guy to finish (not efficient, but rare) */ + while (crc_table_empty) + ; + } + +#ifdef MAKECRCH + /* write out CRC tables to crc32.h */ + { + FILE *out; + + out = fopen("crc32.h", "w"); + if (out == NULL) return; + fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n"); + fprintf(out, " * Generated automatically by crc32.c\n */\n\n"); + fprintf(out, "local const unsigned long FAR "); + fprintf(out, "crc_table[TBLS][256] =\n{\n {\n"); + write_table(out, crc_table[0]); +# ifdef BYFOUR + fprintf(out, "#ifdef BYFOUR\n"); + for (k = 1; k < 8; k++) { + fprintf(out, " },\n {\n"); + write_table(out, crc_table[k]); + } + fprintf(out, "#endif\n"); +# endif /* BYFOUR */ + fprintf(out, " }\n};\n"); + fclose(out); + } +#endif /* MAKECRCH */ +} + +#ifdef MAKECRCH +local void write_table(out, table) + FILE *out; + const unsigned long FAR *table; +{ + int n; + + for (n = 0; n < 256; n++) + fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n], + n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", ")); +} +#endif /* MAKECRCH */ + +#else /* !DYNAMIC_CRC_TABLE */ +/* ======================================================================== + * Tables of CRC-32s of all single-byte values, made by make_crc_table(). + */ +#include "crc32.h" +#endif /* DYNAMIC_CRC_TABLE */ + +/* ========================================================================= + * This function can be used by asm versions of crc32() + */ +const unsigned long FAR * ZEXPORT get_crc_table() +{ +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif /* DYNAMIC_CRC_TABLE */ + return (const unsigned long FAR *)crc_table; +} + +/* ========================================================================= */ +#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8) +#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 + +/* ========================================================================= */ +unsigned long ZEXPORT crc32(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + unsigned len; +{ + if (buf == Z_NULL) return 0UL; + +#ifdef DYNAMIC_CRC_TABLE + if (crc_table_empty) + make_crc_table(); +#endif /* DYNAMIC_CRC_TABLE */ + +#ifdef BYFOUR + if (sizeof(void *) == sizeof(ptrdiff_t)) { + u4 endian; + + endian = 1; + if (*((unsigned char *)(&endian))) + return crc32_little(crc, buf, len); + else + return crc32_big(crc, buf, len); + } +#endif /* BYFOUR */ + crc = crc ^ 0xffffffffUL; + while (len >= 8) { + DO8; + len -= 8; + } + if (len) do { + DO1; + } while (--len); + return crc ^ 0xffffffffUL; +} + +#ifdef BYFOUR + +/* ========================================================================= */ +#define DOLIT4 c ^= *buf4++; \ + c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \ + crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24] +#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4 + +/* ========================================================================= */ +local unsigned long crc32_little(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + unsigned len; +{ + register u4 c; + register const u4 FAR *buf4; + + c = (u4)crc; + c = ~c; + while (len && ((ptrdiff_t)buf & 3)) { + c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); + len--; + } + + buf4 = (const u4 FAR *)(const void FAR *)buf; + while (len >= 32) { + DOLIT32; + len -= 32; + } + while (len >= 4) { + DOLIT4; + len -= 4; + } + buf = (const unsigned char FAR *)buf4; + + if (len) do { + c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8); + } while (--len); + c = ~c; + return (unsigned long)c; +} + +/* ========================================================================= */ +#define DOBIG4 c ^= *++buf4; \ + c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ + crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] +#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 + +/* ========================================================================= */ +local unsigned long crc32_big(crc, buf, len) + unsigned long crc; + const unsigned char FAR *buf; + unsigned len; +{ + register u4 c; + register const u4 FAR *buf4; + + c = REV((u4)crc); + c = ~c; + while (len && ((ptrdiff_t)buf & 3)) { + c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); + len--; + } + + buf4 = (const u4 FAR *)(const void FAR *)buf; + buf4--; + while (len >= 32) { + DOBIG32; + len -= 32; + } + while (len >= 4) { + DOBIG4; + len -= 4; + } + buf4++; + buf = (const unsigned char FAR *)buf4; + + if (len) do { + c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8); + } while (--len); + c = ~c; + return (unsigned long)(REV(c)); +} + +#endif /* BYFOUR */ + +#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */ + +/* ========================================================================= */ +local unsigned long gf2_matrix_times(mat, vec) + unsigned long *mat; + unsigned long vec; +{ + unsigned long sum; + + sum = 0; + while (vec) { + if (vec & 1) + sum ^= *mat; + vec >>= 1; + mat++; + } + return sum; +} + +/* ========================================================================= */ +local void gf2_matrix_square(square, mat) + unsigned long *square; + unsigned long *mat; +{ + int n; + + for (n = 0; n < GF2_DIM; n++) + square[n] = gf2_matrix_times(mat, mat[n]); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off_t len2; +{ + int n; + unsigned long row; + unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */ + unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */ + + /* degenerate case */ + if (len2 == 0) + return crc1; + + /* put operator for one zero bit in odd */ + odd[0] = 0xedb88320L; /* CRC-32 polynomial */ + row = 1; + for (n = 1; n < GF2_DIM; n++) { + odd[n] = row; + row <<= 1; + } + + /* put operator for two zero bits in even */ + gf2_matrix_square(even, odd); + + /* put operator for four zero bits in odd */ + gf2_matrix_square(odd, even); + + /* apply len2 zeros to crc1 (first square will put the operator for one + zero byte, eight zero bits, in even) */ + do { + /* apply zeros operator for this bit of len2 */ + gf2_matrix_square(even, odd); + if (len2 & 1) + crc1 = gf2_matrix_times(even, crc1); + len2 >>= 1; + + /* if no more bits set, then done */ + if (len2 == 0) + break; + + /* another iteration of the loop with odd and even swapped */ + gf2_matrix_square(odd, even); + if (len2 & 1) + crc1 = gf2_matrix_times(odd, crc1); + len2 >>= 1; + + /* if no more bits set, then done */ + } while (len2 != 0); + + /* return combined crc */ + crc1 ^= crc2; + return crc1; +} diff --git a/compat/zlib/crc32.h b/compat/zlib/crc32.h new file mode 100644 index 0000000..8053b61 --- /dev/null +++ b/compat/zlib/crc32.h @@ -0,0 +1,441 @@ +/* crc32.h -- tables for rapid CRC calculation + * Generated automatically by crc32.c + */ + +local const unsigned long FAR crc_table[TBLS][256] = +{ + { + 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, + 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, + 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, + 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, + 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, + 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, + 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, + 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, + 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, + 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, + 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, + 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, + 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, + 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, + 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, + 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, + 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, + 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, + 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, + 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, + 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, + 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, + 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, + 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, + 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, + 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, + 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, + 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, + 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, + 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, + 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, + 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, + 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, + 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, + 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, + 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL, + 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL, + 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL, + 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL, + 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL, + 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL, + 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL, + 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL, + 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL, + 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL, + 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL, + 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL, + 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL, + 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL, + 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, + 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, + 0x2d02ef8dUL +#ifdef BYFOUR + }, + { + 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL, + 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL, + 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL, + 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL, + 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL, + 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL, + 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL, + 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL, + 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL, + 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL, + 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL, + 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL, + 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL, + 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL, + 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL, + 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL, + 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL, + 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL, + 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL, + 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL, + 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL, + 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL, + 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL, + 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL, + 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL, + 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL, + 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL, + 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL, + 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL, + 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL, + 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL, + 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL, + 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL, + 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL, + 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL, + 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL, + 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL, + 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL, + 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL, + 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL, + 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL, + 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL, + 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL, + 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL, + 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL, + 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL, + 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL, + 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL, + 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL, + 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL, + 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL, + 0x9324fd72UL + }, + { + 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL, + 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL, + 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL, + 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL, + 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL, + 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL, + 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL, + 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL, + 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL, + 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL, + 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL, + 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL, + 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL, + 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL, + 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL, + 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL, + 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL, + 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL, + 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL, + 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL, + 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL, + 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL, + 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL, + 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL, + 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL, + 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL, + 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL, + 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL, + 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL, + 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL, + 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL, + 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL, + 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL, + 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL, + 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL, + 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL, + 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL, + 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL, + 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL, + 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL, + 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL, + 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL, + 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL, + 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL, + 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL, + 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL, + 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL, + 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL, + 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL, + 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL, + 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL, + 0xbe9834edUL + }, + { + 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL, + 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL, + 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL, + 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL, + 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL, + 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL, + 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL, + 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL, + 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL, + 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL, + 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL, + 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL, + 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL, + 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL, + 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL, + 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL, + 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL, + 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL, + 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL, + 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL, + 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL, + 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL, + 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL, + 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL, + 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL, + 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL, + 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL, + 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL, + 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL, + 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL, + 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL, + 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL, + 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL, + 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL, + 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL, + 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL, + 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL, + 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL, + 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL, + 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL, + 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL, + 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL, + 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL, + 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL, + 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL, + 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL, + 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL, + 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL, + 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL, + 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL, + 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL, + 0xde0506f1UL + }, + { + 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL, + 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL, + 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL, + 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL, + 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL, + 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL, + 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL, + 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL, + 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL, + 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL, + 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL, + 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL, + 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL, + 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL, + 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL, + 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL, + 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL, + 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL, + 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL, + 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL, + 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL, + 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL, + 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL, + 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL, + 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL, + 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL, + 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL, + 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL, + 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL, + 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL, + 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL, + 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL, + 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL, + 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL, + 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL, + 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL, + 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL, + 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL, + 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL, + 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL, + 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL, + 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL, + 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL, + 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL, + 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL, + 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL, + 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL, + 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL, + 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL, + 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL, + 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL, + 0x8def022dUL + }, + { + 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL, + 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL, + 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL, + 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL, + 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL, + 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL, + 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL, + 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL, + 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL, + 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL, + 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL, + 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL, + 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL, + 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL, + 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL, + 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL, + 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL, + 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL, + 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL, + 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL, + 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL, + 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL, + 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL, + 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL, + 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL, + 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL, + 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL, + 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL, + 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL, + 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL, + 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL, + 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL, + 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL, + 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL, + 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL, + 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL, + 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL, + 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL, + 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL, + 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL, + 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL, + 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL, + 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL, + 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL, + 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL, + 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL, + 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL, + 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL, + 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL, + 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL, + 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL, + 0x72fd2493UL + }, + { + 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL, + 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL, + 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL, + 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL, + 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL, + 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL, + 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL, + 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL, + 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL, + 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL, + 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL, + 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL, + 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL, + 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL, + 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL, + 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL, + 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL, + 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL, + 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL, + 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL, + 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL, + 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL, + 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL, + 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL, + 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL, + 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL, + 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL, + 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL, + 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL, + 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL, + 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL, + 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL, + 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL, + 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL, + 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL, + 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL, + 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL, + 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL, + 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL, + 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL, + 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL, + 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL, + 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL, + 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL, + 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL, + 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL, + 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL, + 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL, + 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL, + 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL, + 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL, + 0xed3498beUL + }, + { + 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL, + 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL, + 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL, + 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL, + 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL, + 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL, + 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL, + 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL, + 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL, + 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL, + 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL, + 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL, + 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL, + 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL, + 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL, + 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL, + 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL, + 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL, + 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL, + 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL, + 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL, + 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL, + 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL, + 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL, + 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL, + 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL, + 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL, + 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL, + 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL, + 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL, + 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL, + 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL, + 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL, + 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL, + 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL, + 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL, + 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL, + 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL, + 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL, + 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL, + 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL, + 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL, + 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL, + 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL, + 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL, + 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL, + 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL, + 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL, + 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL, + 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL, + 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL, + 0xf10605deUL +#endif + } +}; diff --git a/compat/zlib/deflate.c b/compat/zlib/deflate.c new file mode 100644 index 0000000..fbc07d8 --- /dev/null +++ b/compat/zlib/deflate.c @@ -0,0 +1,1736 @@ +/* deflate.c -- compress data using the deflation algorithm + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process depends on being able to identify portions + * of the input text which are identical to earlier input (within a + * sliding window trailing behind the input currently being processed). + * + * The most straightforward technique turns out to be the fastest for + * most input files: try all possible matches and select the longest. + * The key feature of this algorithm is that insertions into the string + * dictionary are very simple and thus fast, and deletions are avoided + * completely. Insertions are performed at each input character, whereas + * string matches are performed only when the previous match ends. So it + * is preferable to spend more time in matches to allow very fast string + * insertions and avoid deletions. The matching algorithm for small + * strings is inspired from that of Rabin & Karp. A brute force approach + * is used to find longer strings when a small match has been found. + * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze + * (by Leonid Broukhis). + * A previous version of this file used a more sophisticated algorithm + * (by Fiala and Greene) which is guaranteed to run in linear amortized + * time, but has a larger average cost, uses more memory and is patented. + * However the F&G algorithm may be faster for some highly redundant + * files if the parameter max_chain_length (described below) is too large. + * + * ACKNOWLEDGEMENTS + * + * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and + * I found it in 'freeze' written by Leonid Broukhis. + * Thanks to many people for bug reports and testing. + * + * REFERENCES + * + * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". + * Available in http://www.ietf.org/rfc/rfc1951.txt + * + * A description of the Rabin and Karp algorithm is given in the book + * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. + * + * Fiala,E.R., and Greene,D.H. + * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 + * + */ + +/* @(#) $Id: deflate.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#include "deflate.h" + +const char deflate_copyright[] = + " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* =========================================================================== + * Function prototypes. + */ +typedef enum { + need_more, /* block not completed, need more input or more output */ + block_done, /* block flush performed */ + finish_started, /* finish started, need only more output at next deflate */ + finish_done /* finish done, accept no more input or output */ +} block_state; + +typedef block_state (*compress_func) OF((deflate_state *s, int flush)); +/* Compression function. Returns the block state after the call. */ + +local void fill_window OF((deflate_state *s)); +local block_state deflate_stored OF((deflate_state *s, int flush)); +local block_state deflate_fast OF((deflate_state *s, int flush)); +#ifndef FASTEST +local block_state deflate_slow OF((deflate_state *s, int flush)); +#endif +local void lm_init OF((deflate_state *s)); +local void putShortMSB OF((deflate_state *s, uInt b)); +local void flush_pending OF((z_streamp strm)); +local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); +#ifndef FASTEST +#ifdef ASMV + void match_init OF((void)); /* asm code initialization */ + uInt longest_match OF((deflate_state *s, IPos cur_match)); +#else +local uInt longest_match OF((deflate_state *s, IPos cur_match)); +#endif +#endif +local uInt longest_match_fast OF((deflate_state *s, IPos cur_match)); + +#ifdef DEBUG +local void check_match OF((deflate_state *s, IPos start, IPos match, + int length)); +#endif + +/* =========================================================================== + * Local data + */ + +#define NIL 0 +/* Tail of hash chains */ + +#ifndef TOO_FAR +# define TOO_FAR 4096 +#endif +/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +typedef struct config_s { + ush good_length; /* reduce lazy search above this match length */ + ush max_lazy; /* do not perform lazy search above this match length */ + ush nice_length; /* quit search above this match length */ + ush max_chain; + compress_func func; +} config; + +#ifdef FASTEST +local const config configuration_table[2] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ +#else +local const config configuration_table[10] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ +/* 2 */ {4, 5, 16, 8, deflate_fast}, +/* 3 */ {4, 6, 32, 32, deflate_fast}, + +/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ +/* 5 */ {8, 16, 32, 32, deflate_slow}, +/* 6 */ {8, 16, 128, 128, deflate_slow}, +/* 7 */ {8, 32, 128, 256, deflate_slow}, +/* 8 */ {32, 128, 258, 1024, deflate_slow}, +/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */ +#endif + +/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 + * For deflate_fast() (levels <= 3) good is ignored and lazy has a different + * meaning. + */ + +#define EQUAL 0 +/* result of memcmp for equal strings */ + +#ifndef NO_DUMMY_DECL +struct static_tree_desc_s {int dummy;}; /* for buggy compilers */ +#endif + +/* =========================================================================== + * Update a hash value with the given input byte + * IN assertion: all calls to to UPDATE_HASH are made with consecutive + * input characters, so that a running hash key can be computed from the + * previous key instead of complete recalculation each time. + */ +#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) + + +/* =========================================================================== + * Insert string str in the dictionary and set match_head to the previous head + * of the hash chain (the most recent string with same hash key). Return + * the previous length of the hash chain. + * If this file is compiled with -DFASTEST, the compression level is forced + * to 1, and no hash chains are maintained. + * IN assertion: all calls to to INSERT_STRING are made with consecutive + * input characters and the first MIN_MATCH bytes of str are valid + * (except for the last MIN_MATCH-1 bytes of the input file). + */ +#ifdef FASTEST +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#else +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#endif + +/* =========================================================================== + * Initialize the hash table (avoiding 64K overflow for 16 bit systems). + * prev[] will be initialized on the fly. + */ +#define CLEAR_HASH(s) \ + s->head[s->hash_size-1] = NIL; \ + zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); + +/* ========================================================================= */ +int ZEXPORT deflateInit_(strm, level, version, stream_size) + z_streamp strm; + int level; + const char *version; + int stream_size; +{ + return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, + Z_DEFAULT_STRATEGY, version, stream_size); + /* To do: ignore strm->next_in if we use it as window */ +} + +/* ========================================================================= */ +int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + version, stream_size) + z_streamp strm; + int level; + int method; + int windowBits; + int memLevel; + int strategy; + const char *version; + int stream_size; +{ + deflate_state *s; + int wrap = 1; + static const char my_version[] = ZLIB_VERSION; + + ushf *overlay; + /* We overlay pending_buf and d_buf+l_buf. This works since the average + * output size for (length,distance) codes is <= 24 bits. + */ + + if (version == Z_NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; + } + if (strm == Z_NULL) return Z_STREAM_ERROR; + + strm->msg = Z_NULL; + if (strm->zalloc == (alloc_func)0) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == (free_func)0) strm->zfree = zcfree; + +#ifdef FASTEST + if (level != 0) level = 1; +#else + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#endif + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } +#ifdef GZIP + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } +#endif + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { + return Z_STREAM_ERROR; + } + if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ + s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); + if (s == Z_NULL) return Z_MEM_ERROR; + strm->state = (struct internal_state FAR *)s; + s->strm = strm; + + s->wrap = wrap; + s->gzhead = Z_NULL; + s->w_bits = windowBits; + s->w_size = 1 << s->w_bits; + s->w_mask = s->w_size - 1; + + s->hash_bits = memLevel + 7; + s->hash_size = 1 << s->hash_bits; + s->hash_mask = s->hash_size - 1; + s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + + s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); + s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); + s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + s->pending_buf = (uchf *) overlay; + s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); + + if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || + s->pending_buf == Z_NULL) { + s->status = FINISH_STATE; + strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + deflateEnd (strm); + return Z_MEM_ERROR; + } + s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + + s->level = level; + s->strategy = strategy; + s->method = (Byte)method; + + return deflateReset(strm); +} + +/* ========================================================================= */ +int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) + z_streamp strm; + const Bytef *dictionary; + uInt dictLength; +{ + deflate_state *s; + uInt length = dictLength; + uInt n; + IPos hash_head = 0; + + if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL || + strm->state->wrap == 2 || + (strm->state->wrap == 1 && strm->state->status != INIT_STATE)) + return Z_STREAM_ERROR; + + s = strm->state; + if (s->wrap) + strm->adler = adler32(strm->adler, dictionary, dictLength); + + if (length < MIN_MATCH) return Z_OK; + if (length > MAX_DIST(s)) { + length = MAX_DIST(s); + dictionary += dictLength - length; /* use the tail of the dictionary */ + } + zmemcpy(s->window, dictionary, length); + s->strstart = length; + s->block_start = (long)length; + + /* Insert all strings in the hash table (except for the last two bytes). + * s->lookahead stays null, so s->ins_h will be recomputed at the next + * call of fill_window. + */ + s->ins_h = s->window[0]; + UPDATE_HASH(s, s->ins_h, s->window[1]); + for (n = 0; n <= length - MIN_MATCH; n++) { + INSERT_STRING(s, n, hash_head); + } + if (hash_head) hash_head = 0; /* to make compiler happy */ + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateReset (strm) + z_streamp strm; +{ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) { + return Z_STREAM_ERROR; + } + + strm->total_in = strm->total_out = 0; + strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ + strm->data_type = Z_UNKNOWN; + + s = (deflate_state *)strm->state; + s->pending = 0; + s->pending_out = s->pending_buf; + + if (s->wrap < 0) { + s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ + } + s->status = s->wrap ? INIT_STATE : BUSY_STATE; + strm->adler = +#ifdef GZIP + s->wrap == 2 ? crc32(0L, Z_NULL, 0) : +#endif + adler32(0L, Z_NULL, 0); + s->last_flush = Z_NO_FLUSH; + + _tr_init(s); + lm_init(s); + + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateSetHeader (strm, head) + z_streamp strm; + gz_headerp head; +{ + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (strm->state->wrap != 2) return Z_STREAM_ERROR; + strm->state->gzhead = head; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflatePrime (strm, bits, value) + z_streamp strm; + int bits; + int value; +{ + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + strm->state->bi_valid = bits; + strm->state->bi_buf = (ush)(value & ((1 << bits) - 1)); + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateParams(strm, level, strategy) + z_streamp strm; + int level; + int strategy; +{ + deflate_state *s; + compress_func func; + int err = Z_OK; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + s = strm->state; + +#ifdef FASTEST + if (level != 0) level = 1; +#else + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#endif + if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + return Z_STREAM_ERROR; + } + func = configuration_table[s->level].func; + + if (func != configuration_table[level].func && strm->total_in != 0) { + /* Flush the last buffer: */ + err = deflate(strm, Z_PARTIAL_FLUSH); + } + if (s->level != level) { + s->level = level; + s->max_lazy_match = configuration_table[level].max_lazy; + s->good_match = configuration_table[level].good_length; + s->nice_match = configuration_table[level].nice_length; + s->max_chain_length = configuration_table[level].max_chain; + } + s->strategy = strategy; + return err; +} + +/* ========================================================================= */ +int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) + z_streamp strm; + int good_length; + int max_lazy; + int nice_length; + int max_chain; +{ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + s = strm->state; + s->good_match = good_length; + s->max_lazy_match = max_lazy; + s->nice_match = nice_length; + s->max_chain_length = max_chain; + return Z_OK; +} + +/* ========================================================================= + * For the default windowBits of 15 and memLevel of 8, this function returns + * a close to exact, as well as small, upper bound on the compressed size. + * They are coded as constants here for a reason--if the #define's are + * changed, then this function needs to be changed as well. The return + * value for 15 and 8 only works for those exact settings. + * + * For any setting other than those defaults for windowBits and memLevel, + * the value returned is a conservative worst case for the maximum expansion + * resulting from using fixed blocks instead of stored blocks, which deflate + * can emit on compressed data for some combinations of the parameters. + * + * This function could be more sophisticated to provide closer upper bounds + * for every combination of windowBits and memLevel, as well as wrap. + * But even the conservative upper bound of about 14% expansion does not + * seem onerous for output buffer allocation. + */ +uLong ZEXPORT deflateBound(strm, sourceLen) + z_streamp strm; + uLong sourceLen; +{ + deflate_state *s; + uLong destLen; + + /* conservative upper bound */ + destLen = sourceLen + + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11; + + /* if can't get parameters, return conservative bound */ + if (strm == Z_NULL || strm->state == Z_NULL) + return destLen; + + /* if not default parameters, return conservative bound */ + s = strm->state; + if (s->w_bits != 15 || s->hash_bits != 8 + 7) + return destLen; + + /* default settings: return tight bound for that case */ + return compressBound(sourceLen); +} + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +local void putShortMSB (s, b) + deflate_state *s; + uInt b; +{ + put_byte(s, (Byte)(b >> 8)); + put_byte(s, (Byte)(b & 0xff)); +} + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->next_out buffer and copying into it. + * (See also read_buf()). + */ +local void flush_pending(strm) + z_streamp strm; +{ + unsigned len = strm->state->pending; + + if (len > strm->avail_out) len = strm->avail_out; + if (len == 0) return; + + zmemcpy(strm->next_out, strm->state->pending_out, len); + strm->next_out += len; + strm->state->pending_out += len; + strm->total_out += len; + strm->avail_out -= len; + strm->state->pending -= len; + if (strm->state->pending == 0) { + strm->state->pending_out = strm->state->pending_buf; + } +} + +/* ========================================================================= */ +int ZEXPORT deflate (strm, flush) + z_streamp strm; + int flush; +{ + int old_flush; /* value of flush param for previous deflate call */ + deflate_state *s; + + if (strm == Z_NULL || strm->state == Z_NULL || + flush > Z_FINISH || flush < 0) { + return Z_STREAM_ERROR; + } + s = strm->state; + + if (strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0) || + (s->status == FINISH_STATE && flush != Z_FINISH)) { + ERR_RETURN(strm, Z_STREAM_ERROR); + } + if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); + + s->strm = strm; /* just in case */ + old_flush = s->last_flush; + s->last_flush = flush; + + /* Write the header */ + if (s->status == INIT_STATE) { +#ifdef GZIP + if (s->wrap == 2) { + strm->adler = crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (s->gzhead == NULL) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s->status = BUSY_STATE; + } + else { + put_byte(s, (s->gzhead->text ? 1 : 0) + + (s->gzhead->hcrc ? 2 : 0) + + (s->gzhead->extra == Z_NULL ? 0 : 4) + + (s->gzhead->name == Z_NULL ? 0 : 8) + + (s->gzhead->comment == Z_NULL ? 0 : 16) + ); + put_byte(s, (Byte)(s->gzhead->time & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, s->gzhead->os & 0xff); + if (s->gzhead->extra != NULL) { + put_byte(s, s->gzhead->extra_len & 0xff); + put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); + } + if (s->gzhead->hcrc) + strm->adler = crc32(strm->adler, s->pending_buf, + s->pending); + s->gzindex = 0; + s->status = EXTRA_STATE; + } + } + else +#endif + { + uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt level_flags; + + if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) + level_flags = 0; + else if (s->level < 6) + level_flags = 1; + else if (s->level == 6) + level_flags = 2; + else + level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + s->status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = adler32(0L, Z_NULL, 0); + } + } +#ifdef GZIP + if (s->status == EXTRA_STATE) { + if (s->gzhead->extra != NULL) { + uInt beg = s->pending; /* start of bytes to update crc */ + + while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { + if (s->pending == s->pending_buf_size) { + if (s->gzhead->hcrc && s->pending > beg) + strm->adler = crc32(strm->adler, s->pending_buf + beg, + s->pending - beg); + flush_pending(strm); + beg = s->pending; + if (s->pending == s->pending_buf_size) + break; + } + put_byte(s, s->gzhead->extra[s->gzindex]); + s->gzindex++; + } + if (s->gzhead->hcrc && s->pending > beg) + strm->adler = crc32(strm->adler, s->pending_buf + beg, + s->pending - beg); + if (s->gzindex == s->gzhead->extra_len) { + s->gzindex = 0; + s->status = NAME_STATE; + } + } + else + s->status = NAME_STATE; + } + if (s->status == NAME_STATE) { + if (s->gzhead->name != NULL) { + uInt beg = s->pending; /* start of bytes to update crc */ + int val; + + do { + if (s->pending == s->pending_buf_size) { + if (s->gzhead->hcrc && s->pending > beg) + strm->adler = crc32(strm->adler, s->pending_buf + beg, + s->pending - beg); + flush_pending(strm); + beg = s->pending; + if (s->pending == s->pending_buf_size) { + val = 1; + break; + } + } + val = s->gzhead->name[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + if (s->gzhead->hcrc && s->pending > beg) + strm->adler = crc32(strm->adler, s->pending_buf + beg, + s->pending - beg); + if (val == 0) { + s->gzindex = 0; + s->status = COMMENT_STATE; + } + } + else + s->status = COMMENT_STATE; + } + if (s->status == COMMENT_STATE) { + if (s->gzhead->comment != NULL) { + uInt beg = s->pending; /* start of bytes to update crc */ + int val; + + do { + if (s->pending == s->pending_buf_size) { + if (s->gzhead->hcrc && s->pending > beg) + strm->adler = crc32(strm->adler, s->pending_buf + beg, + s->pending - beg); + flush_pending(strm); + beg = s->pending; + if (s->pending == s->pending_buf_size) { + val = 1; + break; + } + } + val = s->gzhead->comment[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + if (s->gzhead->hcrc && s->pending > beg) + strm->adler = crc32(strm->adler, s->pending_buf + beg, + s->pending - beg); + if (val == 0) + s->status = HCRC_STATE; + } + else + s->status = HCRC_STATE; + } + if (s->status == HCRC_STATE) { + if (s->gzhead->hcrc) { + if (s->pending + 2 > s->pending_buf_size) + flush_pending(strm); + if (s->pending + 2 <= s->pending_buf_size) { + put_byte(s, (Byte)(strm->adler & 0xff)); + put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); + strm->adler = crc32(0L, Z_NULL, 0); + s->status = BUSY_STATE; + } + } + else + s->status = BUSY_STATE; + } +#endif + + /* Flush as much pending output as possible */ + if (s->pending != 0) { + flush_pending(strm); + if (strm->avail_out == 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s->last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm->avail_in == 0 && flush <= old_flush && + flush != Z_FINISH) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s->status == FINISH_STATE && strm->avail_in != 0) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm->avail_in != 0 || s->lookahead != 0 || + (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { + block_state bstate; + + bstate = (*(configuration_table[s->level].func))(s, flush); + + if (bstate == finish_started || bstate == finish_done) { + s->status = FINISH_STATE; + } + if (bstate == need_more || bstate == finish_started) { + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate == block_done) { + if (flush == Z_PARTIAL_FLUSH) { + _tr_align(s); + } else { /* FULL_FLUSH or SYNC_FLUSH */ + _tr_stored_block(s, (char*)0, 0L, 0); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush == Z_FULL_FLUSH) { + CLEAR_HASH(s); /* forget history */ + } + } + flush_pending(strm); + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + Assert(strm->avail_out > 0, "bug2"); + + if (flush != Z_FINISH) return Z_OK; + if (s->wrap <= 0) return Z_STREAM_END; + + /* Write the trailer */ +#ifdef GZIP + if (s->wrap == 2) { + put_byte(s, (Byte)(strm->adler & 0xff)); + put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); + put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); + put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); + put_byte(s, (Byte)(strm->total_in & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); + } + else +#endif + { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ + return s->pending != 0 ? Z_OK : Z_STREAM_END; +} + +/* ========================================================================= */ +int ZEXPORT deflateEnd (strm) + z_streamp strm; +{ + int status; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + + status = strm->state->status; + if (status != INIT_STATE && + status != EXTRA_STATE && + status != NAME_STATE && + status != COMMENT_STATE && + status != HCRC_STATE && + status != BUSY_STATE && + status != FINISH_STATE) { + return Z_STREAM_ERROR; + } + + /* Deallocate in reverse order of allocations: */ + TRY_FREE(strm, strm->state->pending_buf); + TRY_FREE(strm, strm->state->head); + TRY_FREE(strm, strm->state->prev); + TRY_FREE(strm, strm->state->window); + + ZFREE(strm, strm->state); + strm->state = Z_NULL; + + return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; +} + +/* ========================================================================= + * Copy the source state to the destination state. + * To simplify the source, this is not supported for 16-bit MSDOS (which + * doesn't have enough memory anyway to duplicate compression states). + */ +int ZEXPORT deflateCopy (dest, source) + z_streamp dest; + z_streamp source; +{ +#ifdef MAXSEG_64K + return Z_STREAM_ERROR; +#else + deflate_state *ds; + deflate_state *ss; + ushf *overlay; + + + if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { + return Z_STREAM_ERROR; + } + + ss = source->state; + + zmemcpy(dest, source, sizeof(z_stream)); + + ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); + if (ds == Z_NULL) return Z_MEM_ERROR; + dest->state = (struct internal_state FAR *) ds; + zmemcpy(ds, ss, sizeof(deflate_state)); + ds->strm = dest; + + ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); + ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); + overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); + ds->pending_buf = (uchf *) overlay; + + if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || + ds->pending_buf == Z_NULL) { + deflateEnd (dest); + return Z_MEM_ERROR; + } + /* following zmemcpy do not work for 16-bit MSDOS */ + zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); + zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos)); + zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos)); + zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); + ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); + ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; + ds->bl_desc.dyn_tree = ds->bl_tree; + + return Z_OK; +#endif /* MAXSEG_64K */ +} + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +local int read_buf(strm, buf, size) + z_streamp strm; + Bytef *buf; + unsigned size; +{ + unsigned len = strm->avail_in; + + if (len > size) len = size; + if (len == 0) return 0; + + strm->avail_in -= len; + + if (strm->state->wrap == 1) { + strm->adler = adler32(strm->adler, strm->next_in, len); + } +#ifdef GZIP + else if (strm->state->wrap == 2) { + strm->adler = crc32(strm->adler, strm->next_in, len); + } +#endif + zmemcpy(buf, strm->next_in, len); + strm->next_in += len; + strm->total_in += len; + + return (int)len; +} + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +local void lm_init (s) + deflate_state *s; +{ + s->window_size = (ulg)2L*s->w_size; + + CLEAR_HASH(s); + + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; + + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +#ifndef FASTEST +#ifdef ASMV + match_init(); /* initialize the asm code */ +#endif +#endif +} + +#ifndef FASTEST +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +#ifndef ASMV +/* For 80x86 and 680x0, an optimized version will be provided in match.asm or + * match.S. The code will be functionally equivalent. + */ +local uInt longest_match(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + unsigned chain_length = s->max_chain_length;/* max hash chain length */ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + int best_len = s->prev_length; /* best match length so far */ + int nice_match = s->nice_match; /* stop if match long enough */ + IPos limit = s->strstart > (IPos)MAX_DIST(s) ? + s->strstart - (IPos)MAX_DIST(s) : NIL; + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + Posf *prev = s->prev; + uInt wmask = s->w_mask; + +#ifdef UNALIGNED_OK + /* Compare two bytes at a time. Note: this is not always beneficial. + * Try with and without -DUNALIGNED_OK to check. + */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + register ush scan_start = *(ushf*)scan; + register ush scan_end = *(ushf*)(scan+best_len-1); +#else + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + register Byte scan_end1 = scan[best_len-1]; + register Byte scan_end = scan[best_len]; +#endif + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s->prev_length >= s->good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + Assert(cur_match < s->strstart, "no future"); + match = s->window + cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ +#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) + /* This code assumes sizeof(unsigned short) == 2. Do not use + * UNALIGNED_OK if your compiler uses a different size. + */ + if (*(ushf*)(match+best_len-1) != scan_end || + *(ushf*)match != scan_start) continue; + + /* It is not necessary to compare scan[2] and match[2] since they are + * always equal when the other bytes match, given that the hash keys + * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at + * strstart+3, +5, ... up to strstart+257. We check for insufficient + * lookahead only every 4th comparison; the 128th check will be made + * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is + * necessary to put more guard bytes at the end of the window, or + * to check more often for insufficient lookahead. + */ + Assert(scan[2] == match[2], "scan[2]?"); + scan++, match++; + do { + } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + scan < strend); + /* The funny "do {}" generates better code on most compilers */ + + /* Here, scan <= window+strstart+257 */ + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + if (*scan == *match) scan++; + + len = (MAX_MATCH - 1) - (int)(strend-scan); + scan = strend - (MAX_MATCH-1); + +#else /* UNALIGNED_OK */ + + if (match[best_len] != scan_end || + match[best_len-1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match++; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + scan = strend - MAX_MATCH; + +#endif /* UNALIGNED_OK */ + + if (len > best_len) { + s->match_start = cur_match; + best_len = len; + if (len >= nice_match) break; +#ifdef UNALIGNED_OK + scan_end = *(ushf*)(scan+best_len-1); +#else + scan_end1 = scan[best_len-1]; + scan_end = scan[best_len]; +#endif + } + } while ((cur_match = prev[cur_match & wmask]) > limit + && --chain_length != 0); + + if ((uInt)best_len <= s->lookahead) return (uInt)best_len; + return s->lookahead; +} +#endif /* ASMV */ +#endif /* FASTEST */ + +/* --------------------------------------------------------------------------- + * Optimized version for level == 1 or strategy == Z_RLE only + */ +local uInt longest_match_fast(s, cur_match) + deflate_state *s; + IPos cur_match; /* current match */ +{ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + Assert(cur_match < s->strstart, "no future"); + + match = s->window + cur_match; + + /* Return failure if the match length is less than 2: + */ + if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match += 2; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + + if (len < MIN_MATCH) return MIN_MATCH - 1; + + s->match_start = cur_match; + return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; +} + +#ifdef DEBUG +/* =========================================================================== + * Check that the match at match_start is indeed a match. + */ +local void check_match(s, start, match, length) + deflate_state *s; + IPos start, match; + int length; +{ + /* check that the match is indeed a match */ + if (zmemcmp(s->window + match, + s->window + start, length) != EQUAL) { + fprintf(stderr, " start %u, match %u, length %d\n", + start, match, length); + do { + fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); + } while (--length != 0); + z_error("invalid match"); + } + if (z_verbose > 1) { + fprintf(stderr,"\\[%d,%d]", start-match, length); + do { putc(s->window[start++], stderr); } while (--length != 0); + } +} +#else +# define check_match(s, start, match, length) +#endif /* DEBUG */ + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +local void fill_window(s) + deflate_state *s; +{ + register unsigned n, m; + register Posf *p; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (sizeof(int) <= 2) { + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if + * strstart == 0 && lookahead == 1 (input done a byte at time) + */ + more--; + } + } + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s->strstart >= wsize+MAX_DIST(s)) { + + zmemcpy(s->window, s->window+wsize, (unsigned)wsize); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + /* %%% avoid this when Z_RLE */ + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + } while (--n); + + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif + more += wsize; + } + if (s->strm->avail_in == 0) return; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead >= MIN_MATCH) { + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); +} + +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK_ONLY(s, eof) { \ + _tr_flush_block(s, (s->block_start >= 0L ? \ + (charf *)&s->window[(unsigned)s->block_start] : \ + (charf *)Z_NULL), \ + (ulg)((long)s->strstart - s->block_start), \ + (eof)); \ + s->block_start = s->strstart; \ + flush_pending(s->strm); \ + Tracev((stderr,"[FLUSH]")); \ +} + +/* Same but force premature exit if necessary. */ +#define FLUSH_BLOCK(s, eof) { \ + FLUSH_BLOCK_ONLY(s, eof); \ + if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +local block_state deflate_stored(s, flush) + deflate_state *s; + int flush; +{ + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + ulg max_block_size = 0xffff; + ulg max_start; + + if (max_block_size > s->pending_buf_size - 5) { + max_block_size = s->pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s->lookahead <= 1) { + + Assert(s->strstart < s->w_size+MAX_DIST(s) || + s->block_start >= (long)s->w_size, "slide too late"); + + fill_window(s); + if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more; + + if (s->lookahead == 0) break; /* flush the current block */ + } + Assert(s->block_start >= 0L, "block gone"); + + s->strstart += s->lookahead; + s->lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + max_start = s->block_start + max_block_size; + if (s->strstart == 0 || (ulg)s->strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s->lookahead = (uInt)(s->strstart - max_start); + s->strstart = (uInt)max_start; + FLUSH_BLOCK(s, 0); + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) { + FLUSH_BLOCK(s, 0); + } + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +local block_state deflate_fast(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of the hash chain */ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ +#ifdef FASTEST + if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) || + (s->strategy == Z_RLE && s->strstart - hash_head == 1)) { + s->match_length = longest_match_fast (s, hash_head); + } +#else + if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { + s->match_length = longest_match (s, hash_head); + } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { + s->match_length = longest_match_fast (s, hash_head); + } +#endif + /* longest_match() or longest_match_fast() sets match_start */ + } + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->match_start, s->match_length); + + _tr_tally_dist(s, s->strstart - s->match_start, + s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ +#ifndef FASTEST + if (s->match_length <= s->max_insert_length && + s->lookahead >= MIN_MATCH) { + s->match_length--; /* string at strstart already in table */ + do { + s->strstart++; + INSERT_STRING(s, s->strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s->match_length != 0); + s->strstart++; + } else +#endif + { + s->strstart += s->match_length; + s->match_length = 0; + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} + +#ifndef FASTEST +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +local block_state deflate_slow(s, flush) + deflate_state *s; + int flush; +{ + IPos hash_head = NIL; /* head of hash chain */ + int bflush; /* set if current block must be flushed */ + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + */ + s->prev_length = s->match_length, s->prev_match = s->match_start; + s->match_length = MIN_MATCH-1; + + if (hash_head != NIL && s->prev_length < s->max_lazy_match && + s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { + s->match_length = longest_match (s, hash_head); + } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { + s->match_length = longest_match_fast (s, hash_head); + } + /* longest_match() or longest_match_fast() sets match_start */ + + if (s->match_length <= 5 && (s->strategy == Z_FILTERED +#if TOO_FAR <= 32767 + || (s->match_length == MIN_MATCH && + s->strstart - s->match_start > TOO_FAR) +#endif + )) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s->match_length = MIN_MATCH-1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { + uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + check_match(s, s->strstart-1, s->prev_match, s->prev_length); + + _tr_tally_dist(s, s->strstart -1 - s->prev_match, + s->prev_length - MIN_MATCH, bflush); + + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s->lookahead -= s->prev_length-1; + s->prev_length -= 2; + do { + if (++s->strstart <= max_insert) { + INSERT_STRING(s, s->strstart, hash_head); + } + } while (--s->prev_length != 0); + s->match_available = 0; + s->match_length = MIN_MATCH-1; + s->strstart++; + + if (bflush) FLUSH_BLOCK(s, 0); + + } else if (s->match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + if (bflush) { + FLUSH_BLOCK_ONLY(s, 0); + } + s->strstart++; + s->lookahead--; + if (s->strm->avail_out == 0) return need_more; + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s->match_available = 1; + s->strstart++; + s->lookahead--; + } + } + Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s->match_available) { + Tracevv((stderr,"%c", s->window[s->strstart-1])); + _tr_tally_lit(s, s->window[s->strstart-1], bflush); + s->match_available = 0; + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} +#endif /* FASTEST */ + +#if 0 +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +local block_state deflate_rle(s, flush) + deflate_state *s; + int flush; +{ + int bflush; /* set if current block must be flushed */ + uInt run; /* length of run */ + uInt max; /* maximum length of run */ + uInt prev; /* byte at distance one to match */ + Bytef *scan; /* scan for end of run */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest encodable run. + */ + if (s->lookahead < MAX_MATCH) { + fill_window(s); + if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + run = 0; + if (s->strstart > 0) { /* if there is a previous byte, that is */ + max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH; + scan = s->window + s->strstart - 1; + prev = *scan++; + do { + if (*scan++ != prev) + break; + } while (++run < max); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (run >= MIN_MATCH) { + check_match(s, s->strstart, s->strstart - 1, run); + _tr_tally_dist(s, 1, run - MIN_MATCH, bflush); + s->lookahead -= run; + s->strstart += run; + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} +#endif diff --git a/compat/zlib/deflate.h b/compat/zlib/deflate.h new file mode 100644 index 0000000..c64eb02 --- /dev/null +++ b/compat/zlib/deflate.h @@ -0,0 +1,331 @@ +/* deflate.h -- internal compression state + * Copyright (C) 1995-2004 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id: deflate.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#ifndef DEFLATE_H +#define DEFLATE_H + +#include "zutil.h" + +/* define NO_GZIP when compiling if you want to disable gzip header and + trailer creation by deflate(). NO_GZIP would be used to avoid linking in + the crc code when it is not needed. For shared libraries, gzip encoding + should be left enabled. */ +#ifndef NO_GZIP +# define GZIP +#endif + +/* =========================================================================== + * Internal compression state. + */ + +#define LENGTH_CODES 29 +/* number of length codes, not counting the special END_BLOCK code */ + +#define LITERALS 256 +/* number of literal bytes 0..255 */ + +#define L_CODES (LITERALS+1+LENGTH_CODES) +/* number of Literal or Length codes, including the END_BLOCK code */ + +#define D_CODES 30 +/* number of distance codes */ + +#define BL_CODES 19 +/* number of codes used to transfer the bit lengths */ + +#define HEAP_SIZE (2*L_CODES+1) +/* maximum heap size */ + +#define MAX_BITS 15 +/* All codes must not exceed MAX_BITS bits */ + +#define INIT_STATE 42 +#define EXTRA_STATE 69 +#define NAME_STATE 73 +#define COMMENT_STATE 91 +#define HCRC_STATE 103 +#define BUSY_STATE 113 +#define FINISH_STATE 666 +/* Stream status */ + + +/* Data structure describing a single value and its code string. */ +typedef struct ct_data_s { + union { + ush freq; /* frequency count */ + ush code; /* bit string */ + } fc; + union { + ush dad; /* father node in Huffman tree */ + ush len; /* length of bit string */ + } dl; +} FAR ct_data; + +#define Freq fc.freq +#define Code fc.code +#define Dad dl.dad +#define Len dl.len + +typedef struct static_tree_desc_s static_tree_desc; + +typedef struct tree_desc_s { + ct_data *dyn_tree; /* the dynamic tree */ + int max_code; /* largest code with non zero frequency */ + static_tree_desc *stat_desc; /* the corresponding static tree */ +} FAR tree_desc; + +typedef ush Pos; +typedef Pos FAR Posf; +typedef unsigned IPos; + +/* A Pos is an index in the character window. We use short instead of int to + * save space in the various tables. IPos is used only for parameter passing. + */ + +typedef struct internal_state { + z_streamp strm; /* pointer back to this zlib stream */ + int status; /* as the name implies */ + Bytef *pending_buf; /* output still pending */ + ulg pending_buf_size; /* size of pending_buf */ + Bytef *pending_out; /* next pending byte to output to the stream */ + uInt pending; /* nb of bytes in the pending buffer */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ + gz_headerp gzhead; /* gzip header information to write */ + uInt gzindex; /* where in extra, name, or comment */ + Byte method; /* STORED (for zip only) or DEFLATED */ + int last_flush; /* value of flush param for previous deflate call */ + + /* used by deflate.c: */ + + uInt w_size; /* LZ77 window size (32K by default) */ + uInt w_bits; /* log2(w_size) (8..16) */ + uInt w_mask; /* w_size - 1 */ + + Bytef *window; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. Also, it limits + * the window size to 64K, which is quite useful on MSDOS. + * To do: use the user input buffer as sliding window. + */ + + ulg window_size; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + Posf *prev; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + Posf *head; /* Heads of the hash chains or NIL. */ + + uInt ins_h; /* hash index of string to be inserted */ + uInt hash_size; /* number of elements in hash table */ + uInt hash_bits; /* log2(hash_size) */ + uInt hash_mask; /* hash_size-1 */ + + uInt hash_shift; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + long block_start; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + uInt match_length; /* length of best match */ + IPos prev_match; /* previous match */ + int match_available; /* set if previous match exists */ + uInt strstart; /* start of string to insert */ + uInt match_start; /* start of matching string */ + uInt lookahead; /* number of valid bytes ahead in window */ + + uInt prev_length; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + uInt max_chain_length; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + uInt max_lazy_match; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ +# define max_insert_length max_lazy_match + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + int level; /* compression level (1..9) */ + int strategy; /* favor or force Huffman coding*/ + + uInt good_match; + /* Use a faster search when the previous match is longer than this */ + + int nice_match; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + /* Didn't use ct_data typedef below to supress compiler warning */ + struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + struct tree_desc_s l_desc; /* desc. for literal tree */ + struct tree_desc_s d_desc; /* desc. for distance tree */ + struct tree_desc_s bl_desc; /* desc. for bit length tree */ + + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + int heap_len; /* number of elements in the heap */ + int heap_max; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + uch depth[2*L_CODES+1]; + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + uchf *l_buf; /* buffer for literals or lengths */ + + uInt lit_bufsize; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + uInt last_lit; /* running index in l_buf */ + + ushf *d_buf; + /* Buffer for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + ulg opt_len; /* bit length of current block with optimal trees */ + ulg static_len; /* bit length of current block with static trees */ + uInt matches; /* number of string matches in current block */ + int last_eob_len; /* bit length of EOB code for last block */ + +#ifdef DEBUG + ulg compressed_len; /* total bit length of compressed file mod 2^32 */ + ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ +#endif + + ush bi_buf; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + int bi_valid; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + +} FAR deflate_state; + +/* Output a byte on the stream. + * IN assertion: there is enough room in pending_buf. + */ +#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} + + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) +/* In order to simplify the code, particularly on 16 bit machines, match + * distances are limited to MAX_DIST instead of WSIZE. + */ + + /* in trees.c */ +void _tr_init OF((deflate_state *s)); +int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); +void _tr_align OF((deflate_state *s)); +void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, + int eof)); + +#define d_code(dist) \ + ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) +/* Mapping from a distance to a distance code. dist is the distance - 1 and + * must not have side effects. _dist_code[256] and _dist_code[257] are never + * used. + */ + +#ifndef DEBUG +/* Inline versions of _tr_tally for speed: */ + +#if defined(GEN_TREES_H) || !defined(STDC) + extern uch _length_code[]; + extern uch _dist_code[]; +#else + extern const uch _length_code[]; + extern const uch _dist_code[]; +#endif + +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->last_lit] = 0; \ + s->l_buf[s->last_lit++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (length); \ + ush dist = (distance); \ + s->d_buf[s->last_lit] = dist; \ + s->l_buf[s->last_lit++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->last_lit == s->lit_bufsize-1); \ + } +#else +# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) +# define _tr_tally_dist(s, distance, length, flush) \ + flush = _tr_tally(s, distance, length) +#endif + +#endif /* DEFLATE_H */ diff --git a/compat/zlib/gzio.c b/compat/zlib/gzio.c new file mode 100644 index 0000000..8307498 --- /dev/null +++ b/compat/zlib/gzio.c @@ -0,0 +1,1026 @@ +/* gzio.c -- IO on .gz files + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Compile this file with -DNO_GZCOMPRESS to avoid the compression code. + */ + +/* @(#) $Id: gzio.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#include + +#include "zutil.h" + +#ifdef NO_DEFLATE /* for compatibility with old definition */ +# define NO_GZCOMPRESS +#endif + +#ifndef NO_DUMMY_DECL +struct internal_state {int dummy;}; /* for buggy compilers */ +#endif + +#ifndef Z_BUFSIZE +# ifdef MAXSEG_64K +# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ +# else +# define Z_BUFSIZE 16384 +# endif +#endif +#ifndef Z_PRINTF_BUFSIZE +# define Z_PRINTF_BUFSIZE 4096 +#endif + +#ifdef __MVS__ +# pragma map (fdopen , "\174\174FDOPEN") + FILE *fdopen(int, const char *); +#endif + +#ifndef STDC +extern voidp malloc OF((uInt size)); +extern void free OF((voidpf ptr)); +#endif + +#define ALLOC(size) malloc(size) +#define TRYFREE(p) {if (p) free(p);} + +static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define RESERVED 0xE0 /* bits 5..7: reserved */ + +typedef struct gz_stream { + z_stream stream; + int z_err; /* error code for last stream operation */ + int z_eof; /* set if end of input file */ + FILE *file; /* .gz file */ + Byte *inbuf; /* input buffer */ + Byte *outbuf; /* output buffer */ + uLong crc; /* crc32 of uncompressed data */ + char *msg; /* error message */ + char *path; /* path name for debugging only */ + int transparent; /* 1 if input file is not a .gz file */ + char mode; /* 'w' or 'r' */ + z_off_t start; /* start of compressed data in file (header skipped) */ + z_off_t in; /* bytes into deflate or inflate */ + z_off_t out; /* bytes out of deflate or inflate */ + int back; /* one character push-back */ + int last; /* true if push-back is last character */ +} gz_stream; + + +local gzFile gz_open OF((const char *path, const char *mode, int fd)); +local int do_flush OF((gzFile file, int flush)); +local int get_byte OF((gz_stream *s)); +local void check_header OF((gz_stream *s)); +local int destroy OF((gz_stream *s)); +local void putLong OF((FILE *file, uLong x)); +local uLong getLong OF((gz_stream *s)); + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb"). The file is given either by file descriptor + or path name (if fd == -1). + gz_open returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). +*/ +local gzFile gz_open (path, mode, fd) + const char *path; + const char *mode; + int fd; +{ + int err; + int level = Z_DEFAULT_COMPRESSION; /* compression level */ + int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ + char *p = (char*)mode; + gz_stream *s; + char fmode[80]; /* copy of mode, without the compression level */ + char *m = fmode; + + if (!path || !mode) return Z_NULL; + + s = (gz_stream *)ALLOC(sizeof(gz_stream)); + if (!s) return Z_NULL; + + s->stream.zalloc = (alloc_func)0; + s->stream.zfree = (free_func)0; + s->stream.opaque = (voidpf)0; + s->stream.next_in = s->inbuf = Z_NULL; + s->stream.next_out = s->outbuf = Z_NULL; + s->stream.avail_in = s->stream.avail_out = 0; + s->file = NULL; + s->z_err = Z_OK; + s->z_eof = 0; + s->in = 0; + s->out = 0; + s->back = EOF; + s->crc = crc32(0L, Z_NULL, 0); + s->msg = NULL; + s->transparent = 0; + + s->path = (char*)ALLOC(strlen(path)+1); + if (s->path == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + strcpy(s->path, path); /* do this early for debugging */ + + s->mode = '\0'; + do { + if (*p == 'r') s->mode = 'r'; + if (*p == 'w' || *p == 'a') s->mode = 'w'; + if (*p >= '0' && *p <= '9') { + level = *p - '0'; + } else if (*p == 'f') { + strategy = Z_FILTERED; + } else if (*p == 'h') { + strategy = Z_HUFFMAN_ONLY; + } else if (*p == 'R') { + strategy = Z_RLE; + } else { + *m++ = *p; /* copy the mode */ + } + } while (*p++ && m != fmode + sizeof(fmode)); + if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL; + + if (s->mode == 'w') { +#ifdef NO_GZCOMPRESS + err = Z_STREAM_ERROR; +#else + err = deflateInit2(&(s->stream), level, + Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); + /* windowBits is passed < 0 to suppress zlib header */ + + s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); +#endif + if (err != Z_OK || s->outbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } else { + s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); + + err = inflateInit2(&(s->stream), -MAX_WBITS); + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are + * present after the compressed stream. + */ + if (err != Z_OK || s->inbuf == Z_NULL) { + return destroy(s), (gzFile)Z_NULL; + } + } + s->stream.avail_out = Z_BUFSIZE; + + errno = 0; + s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); + + if (s->file == NULL) { + return destroy(s), (gzFile)Z_NULL; + } + if (s->mode == 'w') { + /* Write a very simple .gz header: + */ + fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], + Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); + s->start = 10L; + /* We use 10L instead of ftell(s->file) to because ftell causes an + * fflush on some systems. This version of the library doesn't use + * start anyway in write mode, so this initialization is not + * necessary. + */ + } else { + check_header(s); /* skip the .gz header */ + s->start = ftell(s->file) - s->stream.avail_in; + } + + return (gzFile)s; +} + +/* =========================================================================== + Opens a gzip (.gz) file for reading or writing. +*/ +gzFile ZEXPORT gzopen (path, mode) + const char *path; + const char *mode; +{ + return gz_open (path, mode, -1); +} + +/* =========================================================================== + Associate a gzFile with the file descriptor fd. fd is not dup'ed here + to mimic the behavio(u)r of fdopen. +*/ +gzFile ZEXPORT gzdopen (fd, mode) + int fd; + const char *mode; +{ + char name[46]; /* allow for up to 128-bit integers */ + + if (fd < 0) return (gzFile)Z_NULL; + sprintf(name, "", fd); /* for debugging */ + + return gz_open (name, mode, fd); +} + +/* =========================================================================== + * Update the compression level and strategy + */ +int ZEXPORT gzsetparams (file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + /* Make room to allow flushing */ + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + } + s->stream.avail_out = Z_BUFSIZE; + } + + return deflateParams (&(s->stream), level, strategy); +} + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been sucessfully opened for reading. +*/ +local int get_byte(s) + gz_stream *s; +{ + if (s->z_eof) return EOF; + if (s->stream.avail_in == 0) { + errno = 0; + s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) s->z_err = Z_ERRNO; + return EOF; + } + s->stream.next_in = s->inbuf; + } + s->stream.avail_in--; + return *(s->stream.next_in)++; +} + +/* =========================================================================== + Check the gzip header of a gz_stream opened for reading. Set the stream + mode to transparent if the gzip magic header is not present; set s->err + to Z_DATA_ERROR if the magic header is present but the rest of the header + is incorrect. + IN assertion: the stream s has already been created sucessfully; + s->stream.avail_in is zero for the first time, but may be non-zero + for concatenated .gz files. +*/ +local void check_header(s) + gz_stream *s; +{ + int method; /* method byte */ + int flags; /* flags byte */ + uInt len; + int c; + + /* Assure two bytes in the buffer so we can peek ahead -- handle case + where first byte of header is at the end of the buffer after the last + gzip segment */ + len = s->stream.avail_in; + if (len < 2) { + if (len) s->inbuf[0] = s->stream.next_in[0]; + errno = 0; + len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file); + if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO; + s->stream.avail_in += len; + s->stream.next_in = s->inbuf; + if (s->stream.avail_in < 2) { + s->transparent = s->stream.avail_in; + return; + } + } + + /* Peek ahead to check the gzip magic header */ + if (s->stream.next_in[0] != gz_magic[0] || + s->stream.next_in[1] != gz_magic[1]) { + s->transparent = 1; + return; + } + s->stream.avail_in -= 2; + s->stream.next_in += 2; + + /* Check the rest of the gzip header */ + method = get_byte(s); + flags = get_byte(s); + if (method != Z_DEFLATED || (flags & RESERVED) != 0) { + s->z_err = Z_DATA_ERROR; + return; + } + + /* Discard time, xflags and OS code: */ + for (len = 0; len < 6; len++) (void)get_byte(s); + + if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ + len = (uInt)get_byte(s); + len += ((uInt)get_byte(s))<<8; + /* len is garbage if EOF but the loop below will quit anyway */ + while (len-- != 0 && get_byte(s) != EOF) ; + } + if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ + for (len = 0; len < 2; len++) (void)get_byte(s); + } + s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK; +} + + /* =========================================================================== + * Cleanup then free the given gz_stream. Return a zlib error code. + Try freeing in the reverse order of allocations. + */ +local int destroy (s) + gz_stream *s; +{ + int err = Z_OK; + + if (!s) return Z_STREAM_ERROR; + + TRYFREE(s->msg); + + if (s->stream.state != NULL) { + if (s->mode == 'w') { +#ifdef NO_GZCOMPRESS + err = Z_STREAM_ERROR; +#else + err = deflateEnd(&(s->stream)); +#endif + } else if (s->mode == 'r') { + err = inflateEnd(&(s->stream)); + } + } + if (s->file != NULL && fclose(s->file)) { +#ifdef ESPIPE + if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */ +#endif + err = Z_ERRNO; + } + if (s->z_err < 0) err = s->z_err; + + TRYFREE(s->inbuf); + TRYFREE(s->outbuf); + TRYFREE(s->path); + TRYFREE(s); + return err; +} + +/* =========================================================================== + Reads the given number of uncompressed bytes from the compressed file. + gzread returns the number of bytes actually read (0 for end of file). +*/ +int ZEXPORT gzread (file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + Bytef *start = (Bytef*)buf; /* starting point for crc computation */ + Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ + + if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR; + + if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1; + if (s->z_err == Z_STREAM_END) return 0; /* EOF */ + + next_out = (Byte*)buf; + s->stream.next_out = (Bytef*)buf; + s->stream.avail_out = len; + + if (s->stream.avail_out && s->back != EOF) { + *next_out++ = s->back; + s->stream.next_out++; + s->stream.avail_out--; + s->back = EOF; + s->out++; + start++; + if (s->last) { + s->z_err = Z_STREAM_END; + return 1; + } + } + + while (s->stream.avail_out != 0) { + + if (s->transparent) { + /* Copy first the lookahead bytes: */ + uInt n = s->stream.avail_in; + if (n > s->stream.avail_out) n = s->stream.avail_out; + if (n > 0) { + zmemcpy(s->stream.next_out, s->stream.next_in, n); + next_out += n; + s->stream.next_out = next_out; + s->stream.next_in += n; + s->stream.avail_out -= n; + s->stream.avail_in -= n; + } + if (s->stream.avail_out > 0) { + s->stream.avail_out -= + (uInt)fread(next_out, 1, s->stream.avail_out, s->file); + } + len -= s->stream.avail_out; + s->in += len; + s->out += len; + if (len == 0) s->z_eof = 1; + return (int)len; + } + if (s->stream.avail_in == 0 && !s->z_eof) { + + errno = 0; + s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file); + if (s->stream.avail_in == 0) { + s->z_eof = 1; + if (ferror(s->file)) { + s->z_err = Z_ERRNO; + break; + } + } + s->stream.next_in = s->inbuf; + } + s->in += s->stream.avail_in; + s->out += s->stream.avail_out; + s->z_err = inflate(&(s->stream), Z_NO_FLUSH); + s->in -= s->stream.avail_in; + s->out -= s->stream.avail_out; + + if (s->z_err == Z_STREAM_END) { + /* Check CRC and original size */ + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + start = s->stream.next_out; + + if (getLong(s) != s->crc) { + s->z_err = Z_DATA_ERROR; + } else { + (void)getLong(s); + /* The uncompressed length returned by above getlong() may be + * different from s->out in case of concatenated .gz files. + * Check for such files: + */ + check_header(s); + if (s->z_err == Z_OK) { + inflateReset(&(s->stream)); + s->crc = crc32(0L, Z_NULL, 0); + } + } + } + if (s->z_err != Z_OK || s->z_eof) break; + } + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + + if (len == s->stream.avail_out && + (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO)) + return -1; + return (int)(len - s->stream.avail_out); +} + + +/* =========================================================================== + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ +int ZEXPORT gzgetc(file) + gzFile file; +{ + unsigned char c; + + return gzread(file, &c, 1) == 1 ? c : -1; +} + + +/* =========================================================================== + Push one byte back onto the stream. +*/ +int ZEXPORT gzungetc(c, file) + int c; + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF; + s->back = c; + s->out--; + s->last = (s->z_err == Z_STREAM_END); + if (s->last) s->z_err = Z_OK; + s->z_eof = 0; + return c; +} + + +/* =========================================================================== + Reads bytes from the compressed file until len-1 characters are + read, or a newline character is read and transferred to buf, or an + end-of-file condition is encountered. The string is then terminated + with a null character. + gzgets returns buf, or Z_NULL in case of error. + + The current implementation is not optimized at all. +*/ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + char *b = buf; + if (buf == Z_NULL || len <= 0) return Z_NULL; + + while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; + *buf = '\0'; + return b == buf && len > 0 ? Z_NULL : b; +} + + +#ifndef NO_GZCOMPRESS +/* =========================================================================== + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of bytes actually written (0 in case of error). +*/ +int ZEXPORT gzwrite (file, buf, len) + gzFile file; + voidpc buf; + unsigned len; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.next_in = (Bytef*)buf; + s->stream.avail_in = len; + + while (s->stream.avail_in != 0) { + + if (s->stream.avail_out == 0) { + + s->stream.next_out = s->outbuf; + if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { + s->z_err = Z_ERRNO; + break; + } + s->stream.avail_out = Z_BUFSIZE; + } + s->in += s->stream.avail_in; + s->out += s->stream.avail_out; + s->z_err = deflate(&(s->stream), Z_NO_FLUSH); + s->in -= s->stream.avail_in; + s->out -= s->stream.avail_out; + if (s->z_err != Z_OK) break; + } + s->crc = crc32(s->crc, (const Bytef *)buf, len); + + return (int)(len - s->stream.avail_in); +} + + +/* =========================================================================== + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +*/ +#ifdef STDC +#include + +int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) +{ + char buf[Z_PRINTF_BUFSIZE]; + va_list va; + int len; + + buf[sizeof(buf) - 1] = 0; + va_start(va, format); +#ifdef NO_vsnprintf +# ifdef HAS_vsprintf_void + (void)vsprintf(buf, format, va); + va_end(va); + for (len = 0; len < sizeof(buf); len++) + if (buf[len] == 0) break; +# else + len = vsprintf(buf, format, va); + va_end(va); +# endif +#else +# ifdef HAS_vsnprintf_void + (void)vsnprintf(buf, sizeof(buf), format, va); + va_end(va); + len = strlen(buf); +# else + len = vsnprintf(buf, sizeof(buf), format, va); + va_end(va); +# endif +#endif + if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0) + return 0; + return gzwrite(file, buf, (unsigned)len); +} +#else /* not ANSI C */ + +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + char buf[Z_PRINTF_BUFSIZE]; + int len; + + buf[sizeof(buf) - 1] = 0; +#ifdef NO_snprintf +# ifdef HAS_sprintf_void + sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + for (len = 0; len < sizeof(buf); len++) + if (buf[len] == 0) break; +# else + len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#else +# ifdef HAS_snprintf_void + snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + len = strlen(buf); +# else + len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#endif + if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0) + return 0; + return gzwrite(file, buf, len); +} +#endif + +/* =========================================================================== + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned char cc = (unsigned char) c; /* required for big endian systems */ + + return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; +} + + +/* =========================================================================== + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ +int ZEXPORT gzputs(file, s) + gzFile file; + const char *s; +{ + return gzwrite(file, (char*)s, (unsigned)strlen(s)); +} + + +/* =========================================================================== + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. +*/ +local int do_flush (file, flush) + gzFile file; + int flush; +{ + uInt len; + int done = 0; + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; + + s->stream.avail_in = 0; /* should be zero already anyway */ + + for (;;) { + len = Z_BUFSIZE - s->stream.avail_out; + + if (len != 0) { + if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) { + s->z_err = Z_ERRNO; + return Z_ERRNO; + } + s->stream.next_out = s->outbuf; + s->stream.avail_out = Z_BUFSIZE; + } + if (done) break; + s->out += s->stream.avail_out; + s->z_err = deflate(&(s->stream), flush); + s->out -= s->stream.avail_out; + + /* Ignore the second of two consecutive flushes: */ + if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; + + /* deflate has finished flushing only when it hasn't used up + * all the available space in the output buffer: + */ + done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); + + if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; + } + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} + +int ZEXPORT gzflush (file, flush) + gzFile file; + int flush; +{ + gz_stream *s = (gz_stream*)file; + int err = do_flush (file, flush); + + if (err) return err; + fflush(s->file); + return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; +} +#endif /* NO_GZCOMPRESS */ + +/* =========================================================================== + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error. + SEEK_END is not implemented, returns error. + In this version of the library, gzseek can be extremely slow. +*/ +z_off_t ZEXPORT gzseek (file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || whence == SEEK_END || + s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) { + return -1L; + } + + if (s->mode == 'w') { +#ifdef NO_GZCOMPRESS + return -1L; +#else + if (whence == SEEK_SET) { + offset -= s->in; + } + if (offset < 0) return -1L; + + /* At this point, offset is the number of zero bytes to write. */ + if (s->inbuf == Z_NULL) { + s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */ + if (s->inbuf == Z_NULL) return -1L; + zmemzero(s->inbuf, Z_BUFSIZE); + } + while (offset > 0) { + uInt size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (uInt)offset; + + size = gzwrite(file, s->inbuf, size); + if (size == 0) return -1L; + + offset -= size; + } + return s->in; +#endif + } + /* Rest of function is for reading only */ + + /* compute absolute position */ + if (whence == SEEK_CUR) { + offset += s->out; + } + if (offset < 0) return -1L; + + if (s->transparent) { + /* map to fseek */ + s->back = EOF; + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + if (fseek(s->file, offset, SEEK_SET) < 0) return -1L; + + s->in = s->out = offset; + return offset; + } + + /* For a negative seek, rewind and use positive seek */ + if (offset >= s->out) { + offset -= s->out; + } else if (gzrewind(file) < 0) { + return -1L; + } + /* offset is now the number of bytes to skip. */ + + if (offset != 0 && s->outbuf == Z_NULL) { + s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); + if (s->outbuf == Z_NULL) return -1L; + } + if (offset && s->back != EOF) { + s->back = EOF; + s->out++; + offset--; + if (s->last) s->z_err = Z_STREAM_END; + } + while (offset > 0) { + int size = Z_BUFSIZE; + if (offset < Z_BUFSIZE) size = (int)offset; + + size = gzread(file, s->outbuf, (uInt)size); + if (size <= 0) return -1L; + offset -= size; + } + return s->out; +} + +/* =========================================================================== + Rewinds input file. +*/ +int ZEXPORT gzrewind (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'r') return -1; + + s->z_err = Z_OK; + s->z_eof = 0; + s->back = EOF; + s->stream.avail_in = 0; + s->stream.next_in = s->inbuf; + s->crc = crc32(0L, Z_NULL, 0); + if (!s->transparent) (void)inflateReset(&s->stream); + s->in = 0; + s->out = 0; + return fseek(s->file, s->start, SEEK_SET); +} + +/* =========================================================================== + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. +*/ +z_off_t ZEXPORT gztell (file) + gzFile file; +{ + return gzseek(file, 0L, SEEK_CUR); +} + +/* =========================================================================== + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ +int ZEXPORT gzeof (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + /* With concatenated compressed files that can have embedded + * crc trailers, z_eof is no longer the only/best indicator of EOF + * on a gz_stream. Handle end-of-stream error explicitly here. + */ + if (s == NULL || s->mode != 'r') return 0; + if (s->z_eof) return 1; + return s->z_err == Z_STREAM_END; +} + +/* =========================================================================== + Returns 1 if reading and doing so transparently, otherwise zero. +*/ +int ZEXPORT gzdirect (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL || s->mode != 'r') return 0; + return s->transparent; +} + +/* =========================================================================== + Outputs a long in LSB order to the given file +*/ +local void putLong (file, x) + FILE *file; + uLong x; +{ + int n; + for (n = 0; n < 4; n++) { + fputc((int)(x & 0xff), file); + x >>= 8; + } +} + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets z_err in case + of error. +*/ +local uLong getLong (s) + gz_stream *s; +{ + uLong x = (uLong)get_byte(s); + int c; + + x += ((uLong)get_byte(s))<<8; + x += ((uLong)get_byte(s))<<16; + c = get_byte(s); + if (c == EOF) s->z_err = Z_DATA_ERROR; + x += ((uLong)c)<<24; + return x; +} + +/* =========================================================================== + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. +*/ +int ZEXPORT gzclose (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL) return Z_STREAM_ERROR; + + if (s->mode == 'w') { +#ifdef NO_GZCOMPRESS + return Z_STREAM_ERROR; +#else + if (do_flush (file, Z_FINISH) != Z_OK) + return destroy((gz_stream*)file); + + putLong (s->file, s->crc); + putLong (s->file, (uLong)(s->in & 0xffffffff)); +#endif + } + return destroy((gz_stream*)file); +} + +#ifdef STDC +# define zstrerror(errnum) strerror(errnum) +#else +# define zstrerror(errnum) "" +#endif + +/* =========================================================================== + Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ +const char * ZEXPORT gzerror (file, errnum) + gzFile file; + int *errnum; +{ + char *m; + gz_stream *s = (gz_stream*)file; + + if (s == NULL) { + *errnum = Z_STREAM_ERROR; + return (const char*)ERR_MSG(Z_STREAM_ERROR); + } + *errnum = s->z_err; + if (*errnum == Z_OK) return (const char*)""; + + m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg); + + if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); + + TRYFREE(s->msg); + s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); + if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR); + strcpy(s->msg, s->path); + strcat(s->msg, ": "); + strcat(s->msg, m); + return (const char*)s->msg; +} + +/* =========================================================================== + Clear the error and end-of-file flags, and do the same for the real file. +*/ +void ZEXPORT gzclearerr (file) + gzFile file; +{ + gz_stream *s = (gz_stream*)file; + + if (s == NULL) return; + if (s->z_err != Z_STREAM_END) s->z_err = Z_OK; + s->z_eof = 0; + clearerr(s->file); +} diff --git a/compat/zlib/infback.c b/compat/zlib/infback.c new file mode 100644 index 0000000..455dbc9 --- /dev/null +++ b/compat/zlib/infback.c @@ -0,0 +1,623 @@ +/* infback.c -- inflate using a call-back interface + * Copyright (C) 1995-2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + This code is largely copied from inflate.c. Normally either infback.o or + inflate.o would be linked into an application--not both. The interface + with inffast.c is retained so that optimized assembler-coded versions of + inflate_fast() can be used with either inflate.c or infback.c. + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* function prototypes */ +local void fixedtables OF((struct inflate_state FAR *state)); + +/* + strm provides memory allocation functions in zalloc and zfree, or + Z_NULL to use the library memory allocation functions. + + windowBits is in the range 8..15, and window is a user-supplied + window and output buffer that is 2**windowBits bytes. + */ +int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) +z_streamp strm; +int windowBits; +unsigned char FAR *window; +const char *version; +int stream_size; +{ + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL || window == Z_NULL || + windowBits < 8 || windowBits > 15) + return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == (free_func)0) strm->zfree = zcfree; + state = (struct inflate_state FAR *)ZALLOC(strm, 1, + sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + state->dmax = 32768U; + state->wbits = windowBits; + state->wsize = 1U << windowBits; + state->window = window; + state->write = 0; + state->whave = 0; + return Z_OK; +} + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables(state) +struct inflate_state FAR *state; +{ +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +/* Macros for inflateBack(): */ + +/* Load returned state from inflate_fast() */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Set state from registers for inflate_fast() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Assure that some input is available. If input is requested, but denied, + then return a Z_BUF_ERROR from inflateBack(). */ +#define PULL() \ + do { \ + if (have == 0) { \ + have = in(in_desc, &next); \ + if (have == 0) { \ + next = Z_NULL; \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflateBack() + with an error if there is no input available. */ +#define PULLBYTE() \ + do { \ + PULL(); \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflateBack() with + an error. */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* Assure that some output space is available, by writing out the window + if it's full. If the write fails, return from inflateBack() with a + Z_BUF_ERROR. */ +#define ROOM() \ + do { \ + if (left == 0) { \ + put = state->window; \ + left = state->wsize; \ + state->whave = left; \ + if (out(out_desc, put, left)) { \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* + strm provides the memory allocation functions and window buffer on input, + and provides information on the unused input on return. For Z_DATA_ERROR + returns, strm will also provide an error message. + + in() and out() are the call-back input and output functions. When + inflateBack() needs more input, it calls in(). When inflateBack() has + filled the window with output, or when it completes with data in the + window, it calls out() to write out the data. The application must not + change the provided input until in() is called again or inflateBack() + returns. The application must not change the window/output buffer until + inflateBack() returns. + + in() and out() are called with a descriptor parameter provided in the + inflateBack() call. This parameter can be a structure that provides the + information required to do the read or write, as well as accumulated + information on the input and output such as totals and check values. + + in() should return zero on failure. out() should return non-zero on + failure. If either in() or out() fails, than inflateBack() returns a + Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it + was in() or out() that caused in the error. Otherwise, inflateBack() + returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format + error, or Z_MEM_ERROR if it could not allocate memory for the state. + inflateBack() can also return Z_STREAM_ERROR if the input parameters + are not correct, i.e. strm is Z_NULL or the state was not initialized. + */ +int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) +z_streamp strm; +in_func in; +void FAR *in_desc; +out_func out; +void FAR *out_desc; +{ + struct inflate_state FAR *state; + unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code this; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + /* Check that the strm exists and that the state was initialized */ + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* Reset the state */ + strm->msg = Z_NULL; + state->mode = TYPE; + state->last = 0; + state->whave = 0; + next = strm->next_in; + have = next != Z_NULL ? strm->avail_in : 0; + hold = 0; + bits = 0; + put = state->window; + left = state->wsize; + + /* Inflate until end of block marked as last */ + for (;;) + switch (state->mode) { + case TYPE: + /* determine and dispatch block type */ + if (state->last) { + BYTEBITS(); + state->mode = DONE; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN; /* decode codes */ + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + + case STORED: + /* get and verify stored block length */ + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + + /* copy stored block from input to output */ + while (state->length != 0) { + copy = state->length; + PULL(); + ROOM(); + if (copy > have) copy = have; + if (copy > left) copy = left; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + + case TABLE: + /* get dynamic table entries descriptor */ + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + + /* get code length code lengths (not a typo) */ + state->have = 0; + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + + /* get length and distance code code lengths */ + state->have = 0; + while (state->have < state->nlen + state->ndist) { + for (;;) { + this = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if (this.val < 16) { + NEEDBITS(this.bits); + DROPBITS(this.bits); + state->lens[state->have++] = this.val; + } + else { + if (this.val == 16) { + NEEDBITS(this.bits + 2); + DROPBITS(this.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = (unsigned)(state->lens[state->have - 1]); + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (this.val == 17) { + NEEDBITS(this.bits + 3); + DROPBITS(this.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(this.bits + 7); + DROPBITS(this.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* build code tables */ + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (code const FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN; + + case LEN: + /* use inflate_fast() if we have enough input and output */ + if (have >= 6 && left >= 258) { + RESTORE(); + if (state->whave < state->wsize) + state->whave = state->wsize - left; + inflate_fast(strm, state->wsize); + LOAD(); + break; + } + + /* get a literal, length, or end-of-block code */ + for (;;) { + this = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if (this.op && (this.op & 0xf0) == 0) { + last = this; + for (;;) { + this = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + this.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(this.bits); + state->length = (unsigned)this.val; + + /* process literal */ + if (this.op == 0) { + Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", this.val)); + ROOM(); + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + } + + /* process end of block */ + if (this.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + + /* invalid code */ + if (this.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + + /* length code -- get extra bits, if any */ + state->extra = (unsigned)(this.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + + /* get distance code */ + for (;;) { + this = state->distcode[BITS(state->distbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if ((this.op & 0xf0) == 0) { + last = this; + for (;;) { + this = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + this.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(this.bits); + if (this.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)this.val; + + /* get distance extra bits, if any */ + state->extra = (unsigned)(this.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + } + if (state->offset > state->wsize - (state->whave < state->wsize ? + left : 0)) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + + /* copy match from window to output */ + do { + ROOM(); + copy = state->wsize - state->offset; + if (copy < left) { + from = put + copy; + copy = left - copy; + } + else { + from = put - state->offset; + copy = left; + } + if (copy > state->length) copy = state->length; + state->length -= copy; + left -= copy; + do { + *put++ = *from++; + } while (--copy); + } while (state->length != 0); + break; + + case DONE: + /* inflate stream terminated properly -- write leftover output */ + ret = Z_STREAM_END; + if (left < state->wsize) { + if (out(out_desc, state->window, state->wsize - left)) + ret = Z_BUF_ERROR; + } + goto inf_leave; + + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + + default: /* can't happen, but makes compilers happy */ + ret = Z_STREAM_ERROR; + goto inf_leave; + } + + /* Return unused input */ + inf_leave: + strm->next_in = next; + strm->avail_in = have; + return ret; +} + +int ZEXPORT inflateBackEnd(strm) +z_streamp strm; +{ + if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + return Z_STREAM_ERROR; + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} diff --git a/compat/zlib/inffast.c b/compat/zlib/inffast.c new file mode 100644 index 0000000..bbee92e --- /dev/null +++ b/compat/zlib/inffast.c @@ -0,0 +1,318 @@ +/* inffast.c -- fast decoding + * Copyright (C) 1995-2004 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifndef ASMINF + +/* Allow machine dependent optimization for post-increment or pre-increment. + Based on testing to date, + Pre-increment preferred for: + - PowerPC G3 (Adler) + - MIPS R5000 (Randers-Pehrson) + Post-increment preferred for: + - none + No measurable difference: + - Pentium III (Anderson) + - M68060 (Nikl) + */ +#ifdef POSTINC +# define OFF 0 +# define PUP(a) *(a)++ +#else +# define OFF 1 +# define PUP(a) *++(a) +#endif + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ +void inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + unsigned char FAR *in; /* local strm->next_in */ + unsigned char FAR *last; /* while in < last, enough input available */ + unsigned char FAR *out; /* local strm->next_out */ + unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ + unsigned char FAR *end; /* while out < end, enough space available */ +#ifdef INFLATE_STRICT + unsigned dmax; /* maximum distance from zlib header */ +#endif + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned write; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ + unsigned long hold; /* local strm->hold */ + unsigned bits; /* local strm->bits */ + code const FAR *lcode; /* local strm->lencode */ + code const FAR *dcode; /* local strm->distcode */ + unsigned lmask; /* mask for first level of length codes */ + unsigned dmask; /* mask for first level of distance codes */ + code this; /* retrieved table entry */ + unsigned op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + unsigned len; /* match length, unused bytes */ + unsigned dist; /* match distance */ + unsigned char FAR *from; /* where to copy match from */ + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + in = strm->next_in - OFF; + last = in + (strm->avail_in - 5); + out = strm->next_out - OFF; + beg = out - (start - strm->avail_out); + end = out + (strm->avail_out - 257); +#ifdef INFLATE_STRICT + dmax = state->dmax; +#endif + wsize = state->wsize; + whave = state->whave; + write = state->write; + window = state->window; + hold = state->hold; + bits = state->bits; + lcode = state->lencode; + dcode = state->distcode; + lmask = (1U << state->lenbits) - 1; + dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + do { + if (bits < 15) { + hold += (unsigned long)(PUP(in)) << bits; + bits += 8; + hold += (unsigned long)(PUP(in)) << bits; + bits += 8; + } + this = lcode[hold & lmask]; + dolen: + op = (unsigned)(this.bits); + hold >>= op; + bits -= op; + op = (unsigned)(this.op); + if (op == 0) { /* literal */ + Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", this.val)); + PUP(out) = (unsigned char)(this.val); + } + else if (op & 16) { /* length base */ + len = (unsigned)(this.val); + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += (unsigned long)(PUP(in)) << bits; + bits += 8; + } + len += (unsigned)hold & ((1U << op) - 1); + hold >>= op; + bits -= op; + } + Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += (unsigned long)(PUP(in)) << bits; + bits += 8; + hold += (unsigned long)(PUP(in)) << bits; + bits += 8; + } + this = dcode[hold & dmask]; + dodist: + op = (unsigned)(this.bits); + hold >>= op; + bits -= op; + op = (unsigned)(this.op); + if (op & 16) { /* distance base */ + dist = (unsigned)(this.val); + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += (unsigned long)(PUP(in)) << bits; + bits += 8; + if (bits < op) { + hold += (unsigned long)(PUP(in)) << bits; + bits += 8; + } + } + dist += (unsigned)hold & ((1U << op) - 1); +#ifdef INFLATE_STRICT + if (dist > dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + hold >>= op; + bits -= op; + Tracevv((stderr, "inflate: distance %u\n", dist)); + op = (unsigned)(out - beg); /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } + from = window - OFF; + if (write == 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + PUP(out) = PUP(from); + } while (--op); + from = out - dist; /* rest from output */ + } + } + else if (write < op) { /* wrap around window */ + from += wsize + write - op; + op -= write; + if (op < len) { /* some from end of window */ + len -= op; + do { + PUP(out) = PUP(from); + } while (--op); + from = window - OFF; + if (write < len) { /* some from start of window */ + op = write; + len -= op; + do { + PUP(out) = PUP(from); + } while (--op); + from = out - dist; /* rest from output */ + } + } + } + else { /* contiguous in window */ + from += write - op; + if (op < len) { /* some from window */ + len -= op; + do { + PUP(out) = PUP(from); + } while (--op); + from = out - dist; /* rest from output */ + } + } + while (len > 2) { + PUP(out) = PUP(from); + PUP(out) = PUP(from); + PUP(out) = PUP(from); + len -= 3; + } + if (len) { + PUP(out) = PUP(from); + if (len > 1) + PUP(out) = PUP(from); + } + } + else { + from = out - dist; /* copy direct from output */ + do { /* minimum length is three */ + PUP(out) = PUP(from); + PUP(out) = PUP(from); + PUP(out) = PUP(from); + len -= 3; + } while (len > 2); + if (len) { + PUP(out) = PUP(from); + if (len > 1) + PUP(out) = PUP(from); + } + } + } + else if ((op & 64) == 0) { /* 2nd level distance code */ + this = dcode[this.val + (hold & ((1U << op) - 1))]; + goto dodist; + } + else { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + } + else if ((op & 64) == 0) { /* 2nd level length code */ + this = lcode[this.val + (hold & ((1U << op) - 1))]; + goto dolen; + } + else if (op & 32) { /* end-of-block */ + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + else { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + } while (in < last && out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + in -= len; + bits -= len << 3; + hold &= (1U << bits) - 1; + + /* update state and return */ + strm->next_in = in + OFF; + strm->next_out = out + OFF; + strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); + strm->avail_out = (unsigned)(out < end ? + 257 + (end - out) : 257 - (out - end)); + state->hold = hold; + state->bits = bits; + return; +} + +/* + inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): + - Using bit fields for code structure + - Different op definition to avoid & for extra bits (do & for table bits) + - Three separate decoding do-loops for direct, window, and write == 0 + - Special case for distance > 1 copies to do overlapped load and store copy + - Explicit branch predictions (based on measured branch probabilities) + - Deferring match copy and interspersed it with decoding subsequent codes + - Swapping literal/length else + - Swapping window/direct else + - Larger unrolled copy loops (three is about right) + - Moving len -= 3 statement into middle of loop + */ + +#endif /* !ASMINF */ diff --git a/compat/zlib/inffast.h b/compat/zlib/inffast.h new file mode 100644 index 0000000..1e88d2d --- /dev/null +++ b/compat/zlib/inffast.h @@ -0,0 +1,11 @@ +/* inffast.h -- header to use inffast.c + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +void inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/compat/zlib/inffixed.h b/compat/zlib/inffixed.h new file mode 100644 index 0000000..75ed4b5 --- /dev/null +++ b/compat/zlib/inffixed.h @@ -0,0 +1,94 @@ + /* inffixed.h -- table for decoding fixed codes + * Generated automatically by makefixed(). + */ + + /* WARNING: this file should *not* be used by applications. It + is part of the implementation of the compression library and + is subject to change. Applications should only use zlib.h. + */ + + static const code lenfix[512] = { + {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, + {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, + {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, + {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, + {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, + {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, + {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, + {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, + {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, + {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, + {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, + {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, + {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, + {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, + {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, + {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, + {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, + {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, + {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, + {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, + {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, + {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, + {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, + {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, + {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, + {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, + {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, + {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, + {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, + {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, + {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, + {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, + {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, + {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, + {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, + {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, + {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, + {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, + {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, + {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, + {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, + {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, + {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, + {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, + {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, + {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, + {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, + {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, + {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, + {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, + {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, + {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, + {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, + {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, + {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, + {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, + {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, + {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, + {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, + {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, + {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, + {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, + {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, + {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, + {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, + {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, + {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, + {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, + {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, + {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, + {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, + {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, + {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, + {0,9,255} + }; + + static const code distfix[32] = { + {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, + {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, + {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, + {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, + {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, + {22,5,193},{64,5,0} + }; diff --git a/compat/zlib/inflate.c b/compat/zlib/inflate.c new file mode 100644 index 0000000..792fdee --- /dev/null +++ b/compat/zlib/inflate.c @@ -0,0 +1,1368 @@ +/* inflate.c -- zlib decompression + * Copyright (C) 1995-2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * Change history: + * + * 1.2.beta0 24 Nov 2002 + * - First version -- complete rewrite of inflate to simplify code, avoid + * creation of window when not needed, minimize use of window when it is + * needed, make inffast.c even faster, implement gzip decoding, and to + * improve code readability and style over the previous zlib inflate code + * + * 1.2.beta1 25 Nov 2002 + * - Use pointers for available input and output checking in inffast.c + * - Remove input and output counters in inffast.c + * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 + * - Remove unnecessary second byte pull from length extra in inffast.c + * - Unroll direct copy to three copies per loop in inffast.c + * + * 1.2.beta2 4 Dec 2002 + * - Change external routine names to reduce potential conflicts + * - Correct filename to inffixed.h for fixed tables in inflate.c + * - Make hbuf[] unsigned char to match parameter type in inflate.c + * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) + * to avoid negation problem on Alphas (64 bit) in inflate.c + * + * 1.2.beta3 22 Dec 2002 + * - Add comments on state->bits assertion in inffast.c + * - Add comments on op field in inftrees.h + * - Fix bug in reuse of allocated window after inflateReset() + * - Remove bit fields--back to byte structure for speed + * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths + * - Change post-increments to pre-increments in inflate_fast(), PPC biased? + * - Add compile time option, POSTINC, to use post-increments instead (Intel?) + * - Make MATCH copy in inflate() much faster for when inflate_fast() not used + * - Use local copies of stream next and avail values, as well as local bit + * buffer and bit count in inflate()--for speed when inflate_fast() not used + * + * 1.2.beta4 1 Jan 2003 + * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings + * - Move a comment on output buffer sizes from inffast.c to inflate.c + * - Add comments in inffast.c to introduce the inflate_fast() routine + * - Rearrange window copies in inflate_fast() for speed and simplification + * - Unroll last copy for window match in inflate_fast() + * - Use local copies of window variables in inflate_fast() for speed + * - Pull out common write == 0 case for speed in inflate_fast() + * - Make op and len in inflate_fast() unsigned for consistency + * - Add FAR to lcode and dcode declarations in inflate_fast() + * - Simplified bad distance check in inflate_fast() + * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new + * source file infback.c to provide a call-back interface to inflate for + * programs like gzip and unzip -- uses window as output buffer to avoid + * window copying + * + * 1.2.beta5 1 Jan 2003 + * - Improved inflateBack() interface to allow the caller to provide initial + * input in strm. + * - Fixed stored blocks bug in inflateBack() + * + * 1.2.beta6 4 Jan 2003 + * - Added comments in inffast.c on effectiveness of POSTINC + * - Typecasting all around to reduce compiler warnings + * - Changed loops from while (1) or do {} while (1) to for (;;), again to + * make compilers happy + * - Changed type of window in inflateBackInit() to unsigned char * + * + * 1.2.beta7 27 Jan 2003 + * - Changed many types to unsigned or unsigned short to avoid warnings + * - Added inflateCopy() function + * + * 1.2.0 9 Mar 2003 + * - Changed inflateBack() interface to provide separate opaque descriptors + * for the in() and out() functions + * - Changed inflateBack() argument and in_func typedef to swap the length + * and buffer address return values for the input function + * - Check next_in and next_out for Z_NULL on entry to inflate() + * + * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifdef MAKEFIXED +# ifndef BUILDFIXED +# define BUILDFIXED +# endif +#endif + +/* function prototypes */ +local void fixedtables OF((struct inflate_state FAR *state)); +local int updatewindow OF((z_streamp strm, unsigned out)); +#ifdef BUILDFIXED + void makefixed OF((void)); +#endif +local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, + unsigned len)); + +int ZEXPORT inflateReset(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + strm->total_in = strm->total_out = state->total = 0; + strm->msg = Z_NULL; + strm->adler = 1; /* to support ill-conceived Java test suite */ + state->mode = HEAD; + state->last = 0; + state->havedict = 0; + state->dmax = 32768U; + state->head = Z_NULL; + state->wsize = 0; + state->whave = 0; + state->write = 0; + state->hold = 0; + state->bits = 0; + state->lencode = state->distcode = state->next = state->codes; + Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +int ZEXPORT inflatePrime(strm, bits, value) +z_streamp strm; +int bits; +int value; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; + value &= (1L << bits) - 1; + state->hold += value << state->bits; + state->bits += bits; + return Z_OK; +} + +int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) +z_streamp strm; +int windowBits; +const char *version; +int stream_size; +{ + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL) return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == (free_func)0) strm->zfree = zcfree; + state = (struct inflate_state FAR *) + ZALLOC(strm, 1, sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + if (windowBits < 0) { + state->wrap = 0; + windowBits = -windowBits; + } + else { + state->wrap = (windowBits >> 4) + 1; +#ifdef GUNZIP + if (windowBits < 48) windowBits &= 15; +#endif + } + if (windowBits < 8 || windowBits > 15) { + ZFREE(strm, state); + strm->state = Z_NULL; + return Z_STREAM_ERROR; + } + state->wbits = (unsigned)windowBits; + state->window = Z_NULL; + return inflateReset(strm); +} + +int ZEXPORT inflateInit_(strm, version, stream_size) +z_streamp strm; +const char *version; +int stream_size; +{ + return inflateInit2_(strm, DEF_WBITS, version, stream_size); +} + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables(state) +struct inflate_state FAR *state; +{ +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +#ifdef MAKEFIXED +#include + +/* + Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also + defines BUILDFIXED, so the tables are built on the fly. makefixed() writes + those tables to stdout, which would be piped to inffixed.h. A small program + can simply call makefixed to do this: + + void makefixed(void); + + int main(void) + { + makefixed(); + return 0; + } + + Then that can be linked with zlib built with MAKEFIXED defined and run: + + a.out > inffixed.h + */ +void makefixed() +{ + unsigned low, size; + struct inflate_state state; + + fixedtables(&state); + puts(" /* inffixed.h -- table for decoding fixed codes"); + puts(" * Generated automatically by makefixed()."); + puts(" */"); + puts(""); + puts(" /* WARNING: this file should *not* be used by applications."); + puts(" It is part of the implementation of this library and is"); + puts(" subject to change. Applications should only use zlib.h."); + puts(" */"); + puts(""); + size = 1U << 9; + printf(" static const code lenfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 7) == 0) printf("\n "); + printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits, + state.lencode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); + size = 1U << 5; + printf("\n static const code distfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 6) == 0) printf("\n "); + printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, + state.distcode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); +} +#endif /* MAKEFIXED */ + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +local int updatewindow(strm, out) +z_streamp strm; +unsigned out; +{ + struct inflate_state FAR *state; + unsigned copy, dist; + + state = (struct inflate_state FAR *)strm->state; + + /* if it hasn't been done already, allocate space for the window */ + if (state->window == Z_NULL) { + state->window = (unsigned char FAR *) + ZALLOC(strm, 1U << state->wbits, + sizeof(unsigned char)); + if (state->window == Z_NULL) return 1; + } + + /* if window not in use yet, initialize */ + if (state->wsize == 0) { + state->wsize = 1U << state->wbits; + state->write = 0; + state->whave = 0; + } + + /* copy state->wsize or less output bytes into the circular window */ + copy = out - strm->avail_out; + if (copy >= state->wsize) { + zmemcpy(state->window, strm->next_out - state->wsize, state->wsize); + state->write = 0; + state->whave = state->wsize; + } + else { + dist = state->wsize - state->write; + if (dist > copy) dist = copy; + zmemcpy(state->window + state->write, strm->next_out - copy, dist); + copy -= dist; + if (copy) { + zmemcpy(state->window, strm->next_out - copy, copy); + state->write = copy; + state->whave = state->wsize; + } + else { + state->write += dist; + if (state->write == state->wsize) state->write = 0; + if (state->whave < state->wsize) state->whave += dist; + } + } + return 0; +} + +/* Macros for inflate(): */ + +/* check function to use adler32() for zlib or crc32() for gzip */ +#ifdef GUNZIP +# define UPDATE(check, buf, len) \ + (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) +#else +# define UPDATE(check, buf, len) adler32(check, buf, len) +#endif + +/* check macros for header crc */ +#ifdef GUNZIP +# define CRC2(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + check = crc32(check, hbuf, 2); \ + } while (0) + +# define CRC4(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + hbuf[2] = (unsigned char)((word) >> 16); \ + hbuf[3] = (unsigned char)((word) >> 24); \ + check = crc32(check, hbuf, 4); \ + } while (0) +#endif + +/* Load registers with state in inflate() for speed */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Restore state from registers in inflate() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflate() + if there is no input available. */ +#define PULLBYTE() \ + do { \ + if (have == 0) goto inf_leave; \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflate(). */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* Reverse the bytes in a 32-bit value */ +#define REVERSE(q) \ + ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ + (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) + +/* + inflate() uses a state machine to process as much input data and generate as + much output data as possible before returning. The state machine is + structured roughly as follows: + + for (;;) switch (state) { + ... + case STATEn: + if (not enough input data or output space to make progress) + return; + ... make progress ... + state = STATEm; + break; + ... + } + + so when inflate() is called again, the same case is attempted again, and + if the appropriate resources are provided, the machine proceeds to the + next state. The NEEDBITS() macro is usually the way the state evaluates + whether it can proceed or should return. NEEDBITS() does the return if + the requested bits are not available. The typical use of the BITS macros + is: + + NEEDBITS(n); + ... do something with BITS(n) ... + DROPBITS(n); + + where NEEDBITS(n) either returns from inflate() if there isn't enough + input left to load n bits into the accumulator, or it continues. BITS(n) + gives the low n bits in the accumulator. When done, DROPBITS(n) drops + the low n bits off the accumulator. INITBITS() clears the accumulator + and sets the number of available bits to zero. BYTEBITS() discards just + enough bits to put the accumulator on a byte boundary. After BYTEBITS() + and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. + + NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return + if there is no input available. The decoding of variable length codes uses + PULLBYTE() directly in order to pull just enough bytes to decode the next + code, and no more. + + Some states loop until they get enough input, making sure that enough + state information is maintained to continue the loop where it left off + if NEEDBITS() returns in the loop. For example, want, need, and keep + would all have to actually be part of the saved state in case NEEDBITS() + returns: + + case STATEw: + while (want < need) { + NEEDBITS(n); + keep[want++] = BITS(n); + DROPBITS(n); + } + state = STATEx; + case STATEx: + + As shown above, if the next state is also the next case, then the break + is omitted. + + A state may also return if there is not enough output space available to + complete that state. Those states are copying stored data, writing a + literal byte, and copying a matching string. + + When returning, a "goto inf_leave" is used to update the total counters, + update the check value, and determine whether any progress has been made + during that inflate() call in order to return the proper return code. + Progress is defined as a change in either strm->avail_in or strm->avail_out. + When there is a window, goto inf_leave will update the window with the last + output written. If a goto inf_leave occurs in the middle of decompression + and there is no window currently, goto inf_leave will create one and copy + output to the window for the next call of inflate(). + + In this implementation, the flush parameter of inflate() only affects the + return code (per zlib.h). inflate() always writes as much as possible to + strm->next_out, given the space available and the provided input--the effect + documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers + the allocation of and copying into a sliding window until necessary, which + provides the effect documented in zlib.h for Z_FINISH when the entire input + stream available. So the only thing the flush parameter actually does is: + when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it + will return Z_BUF_ERROR if it has not reached the end of the stream. + */ + +int ZEXPORT inflate(strm, flush) +z_streamp strm; +int flush; +{ + struct inflate_state FAR *state; + unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned in, out; /* save starting available input and output */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code this; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ +#ifdef GUNZIP + unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ +#endif + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0)) + return Z_STREAM_ERROR; + + state = (struct inflate_state FAR *)strm->state; + if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ + LOAD(); + in = have; + out = left; + ret = Z_OK; + for (;;) + switch (state->mode) { + case HEAD: + if (state->wrap == 0) { + state->mode = TYPEDO; + break; + } + NEEDBITS(16); +#ifdef GUNZIP + if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ + state->check = crc32(0L, Z_NULL, 0); + CRC2(state->check, hold); + INITBITS(); + state->mode = FLAGS; + break; + } + state->flags = 0; /* expect zlib header */ + if (state->head != Z_NULL) + state->head->done = -1; + if (!(state->wrap & 1) || /* check if zlib header allowed */ +#else + if ( +#endif + ((BITS(8) << 8) + (hold >> 8)) % 31) { + strm->msg = (char *)"incorrect header check"; + state->mode = BAD; + break; + } + if (BITS(4) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + DROPBITS(4); + len = BITS(4) + 8; + if (len > state->wbits) { + strm->msg = (char *)"invalid window size"; + state->mode = BAD; + break; + } + state->dmax = 1U << len; + Tracev((stderr, "inflate: zlib header ok\n")); + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = hold & 0x200 ? DICTID : TYPE; + INITBITS(); + break; +#ifdef GUNZIP + case FLAGS: + NEEDBITS(16); + state->flags = (int)(hold); + if ((state->flags & 0xff) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + if (state->flags & 0xe000) { + strm->msg = (char *)"unknown header flags set"; + state->mode = BAD; + break; + } + if (state->head != Z_NULL) + state->head->text = (int)((hold >> 8) & 1); + if (state->flags & 0x0200) CRC2(state->check, hold); + INITBITS(); + state->mode = TIME; + case TIME: + NEEDBITS(32); + if (state->head != Z_NULL) + state->head->time = hold; + if (state->flags & 0x0200) CRC4(state->check, hold); + INITBITS(); + state->mode = OS; + case OS: + NEEDBITS(16); + if (state->head != Z_NULL) { + state->head->xflags = (int)(hold & 0xff); + state->head->os = (int)(hold >> 8); + } + if (state->flags & 0x0200) CRC2(state->check, hold); + INITBITS(); + state->mode = EXLEN; + case EXLEN: + if (state->flags & 0x0400) { + NEEDBITS(16); + state->length = (unsigned)(hold); + if (state->head != Z_NULL) + state->head->extra_len = (unsigned)hold; + if (state->flags & 0x0200) CRC2(state->check, hold); + INITBITS(); + } + else if (state->head != Z_NULL) + state->head->extra = Z_NULL; + state->mode = EXTRA; + case EXTRA: + if (state->flags & 0x0400) { + copy = state->length; + if (copy > have) copy = have; + if (copy) { + if (state->head != Z_NULL && + state->head->extra != Z_NULL) { + len = state->head->extra_len - state->length; + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); + } + if (state->flags & 0x0200) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + state->length -= copy; + } + if (state->length) goto inf_leave; + } + state->length = 0; + state->mode = NAME; + case NAME: + if (state->flags & 0x0800) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->name != Z_NULL && + state->length < state->head->name_max) + state->head->name[state->length++] = len; + } while (len && copy < have); + if (state->flags & 0x0200) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->name = Z_NULL; + state->length = 0; + state->mode = COMMENT; + case COMMENT: + if (state->flags & 0x1000) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->comment != Z_NULL && + state->length < state->head->comm_max) + state->head->comment[state->length++] = len; + } while (len && copy < have); + if (state->flags & 0x0200) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->comment = Z_NULL; + state->mode = HCRC; + case HCRC: + if (state->flags & 0x0200) { + NEEDBITS(16); + if (hold != (state->check & 0xffff)) { + strm->msg = (char *)"header crc mismatch"; + state->mode = BAD; + break; + } + INITBITS(); + } + if (state->head != Z_NULL) { + state->head->hcrc = (int)((state->flags >> 9) & 1); + state->head->done = 1; + } + strm->adler = state->check = crc32(0L, Z_NULL, 0); + state->mode = TYPE; + break; +#endif + case DICTID: + NEEDBITS(32); + strm->adler = state->check = REVERSE(hold); + INITBITS(); + state->mode = DICT; + case DICT: + if (state->havedict == 0) { + RESTORE(); + return Z_NEED_DICT; + } + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = TYPE; + case TYPE: + if (flush == Z_BLOCK) goto inf_leave; + case TYPEDO: + if (state->last) { + BYTEBITS(); + state->mode = CHECK; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN; /* decode codes */ + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + case STORED: + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + state->mode = COPY; + case COPY: + copy = state->length; + if (copy) { + if (copy > have) copy = have; + if (copy > left) copy = left; + if (copy == 0) goto inf_leave; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + break; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + case TABLE: + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + state->have = 0; + state->mode = LENLENS; + case LENLENS: + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + state->have = 0; + state->mode = CODELENS; + case CODELENS: + while (state->have < state->nlen + state->ndist) { + for (;;) { + this = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if (this.val < 16) { + NEEDBITS(this.bits); + DROPBITS(this.bits); + state->lens[state->have++] = this.val; + } + else { + if (this.val == 16) { + NEEDBITS(this.bits + 2); + DROPBITS(this.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = state->lens[state->have - 1]; + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (this.val == 17) { + NEEDBITS(this.bits + 3); + DROPBITS(this.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(this.bits + 7); + DROPBITS(this.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* build code tables */ + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (code const FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN; + case LEN: + if (have >= 6 && left >= 258) { + RESTORE(); + inflate_fast(strm, out); + LOAD(); + break; + } + for (;;) { + this = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if (this.op && (this.op & 0xf0) == 0) { + last = this; + for (;;) { + this = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + this.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(this.bits); + state->length = (unsigned)this.val; + if ((int)(this.op) == 0) { + Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", this.val)); + state->mode = LIT; + break; + } + if (this.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + if (this.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + state->extra = (unsigned)(this.op) & 15; + state->mode = LENEXT; + case LENEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + state->mode = DIST; + case DIST: + for (;;) { + this = state->distcode[BITS(state->distbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if ((this.op & 0xf0) == 0) { + last = this; + for (;;) { + this = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + this.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(this.bits); + if (this.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)this.val; + state->extra = (unsigned)(this.op) & 15; + state->mode = DISTEXT; + case DISTEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + } +#ifdef INFLATE_STRICT + if (state->offset > state->dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + if (state->offset > state->whave + out - left) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + state->mode = MATCH; + case MATCH: + if (left == 0) goto inf_leave; + copy = out - left; + if (state->offset > copy) { /* copy from window */ + copy = state->offset - copy; + if (copy > state->write) { + copy -= state->write; + from = state->window + (state->wsize - copy); + } + else + from = state->window + (state->write - copy); + if (copy > state->length) copy = state->length; + } + else { /* copy from output */ + from = put - state->offset; + copy = state->length; + } + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = *from++; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; + case LIT: + if (left == 0) goto inf_leave; + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + case CHECK: + if (state->wrap) { + NEEDBITS(32); + out -= left; + strm->total_out += out; + state->total += out; + if (out) + strm->adler = state->check = + UPDATE(state->check, put - out, out); + out = left; + if (( +#ifdef GUNZIP + state->flags ? hold : +#endif + REVERSE(hold)) != state->check) { + strm->msg = (char *)"incorrect data check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: check matches trailer\n")); + } +#ifdef GUNZIP + state->mode = LENGTH; + case LENGTH: + if (state->wrap && state->flags) { + NEEDBITS(32); + if (hold != (state->total & 0xffffffffUL)) { + strm->msg = (char *)"incorrect length check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: length matches trailer\n")); + } +#endif + state->mode = DONE; + case DONE: + ret = Z_STREAM_END; + goto inf_leave; + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + default: + return Z_STREAM_ERROR; + } + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + inf_leave: + RESTORE(); + if (state->wsize || (state->mode < CHECK && out != strm->avail_out)) + if (updatewindow(strm, out)) { + state->mode = MEM; + return Z_MEM_ERROR; + } + in -= strm->avail_in; + out -= strm->avail_out; + strm->total_in += in; + strm->total_out += out; + state->total += out; + if (state->wrap && out) + strm->adler = state->check = + UPDATE(state->check, strm->next_out - out, out); + strm->data_type = state->bits + (state->last ? 64 : 0) + + (state->mode == TYPE ? 128 : 0); + if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) + ret = Z_BUF_ERROR; + return ret; +} + +int ZEXPORT inflateEnd(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->window != Z_NULL) ZFREE(strm, state->window); + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} + +int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) +z_streamp strm; +const Bytef *dictionary; +uInt dictLength; +{ + struct inflate_state FAR *state; + unsigned long id; + + /* check state */ + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->wrap != 0 && state->mode != DICT) + return Z_STREAM_ERROR; + + /* check for correct dictionary id */ + if (state->mode == DICT) { + id = adler32(0L, Z_NULL, 0); + id = adler32(id, dictionary, dictLength); + if (id != state->check) + return Z_DATA_ERROR; + } + + /* copy dictionary to window */ + if (updatewindow(strm, strm->avail_out)) { + state->mode = MEM; + return Z_MEM_ERROR; + } + if (dictLength > state->wsize) { + zmemcpy(state->window, dictionary + dictLength - state->wsize, + state->wsize); + state->whave = state->wsize; + } + else { + zmemcpy(state->window + state->wsize - dictLength, dictionary, + dictLength); + state->whave = dictLength; + } + state->havedict = 1; + Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +int ZEXPORT inflateGetHeader(strm, head) +z_streamp strm; +gz_headerp head; +{ + struct inflate_state FAR *state; + + /* check state */ + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; + + /* save header structure */ + state->head = head; + head->done = 0; + return Z_OK; +} + +/* + Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found + or when out of input. When called, *have is the number of pattern bytes + found in order so far, in 0..3. On return *have is updated to the new + state. If on return *have equals four, then the pattern was found and the + return value is how many bytes were read including the last byte of the + pattern. If *have is less than four, then the pattern has not been found + yet and the return value is len. In the latter case, syncsearch() can be + called again with more data and the *have state. *have is initialized to + zero for the first call. + */ +local unsigned syncsearch(have, buf, len) +unsigned FAR *have; +unsigned char FAR *buf; +unsigned len; +{ + unsigned got; + unsigned next; + + got = *have; + next = 0; + while (next < len && got < 4) { + if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) + got++; + else if (buf[next]) + got = 0; + else + got = 4 - got; + next++; + } + *have = got; + return next; +} + +int ZEXPORT inflateSync(strm) +z_streamp strm; +{ + unsigned len; /* number of bytes to look at or looked at */ + unsigned long in, out; /* temporary to save total_in and total_out */ + unsigned char buf[4]; /* to restore bit buffer to byte string */ + struct inflate_state FAR *state; + + /* check parameters */ + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; + + /* if first time, start search in bit buffer */ + if (state->mode != SYNC) { + state->mode = SYNC; + state->hold <<= state->bits & 7; + state->bits -= state->bits & 7; + len = 0; + while (state->bits >= 8) { + buf[len++] = (unsigned char)(state->hold); + state->hold >>= 8; + state->bits -= 8; + } + state->have = 0; + syncsearch(&(state->have), buf, len); + } + + /* search available input */ + len = syncsearch(&(state->have), strm->next_in, strm->avail_in); + strm->avail_in -= len; + strm->next_in += len; + strm->total_in += len; + + /* return no joy or set up to restart inflate() on a new block */ + if (state->have != 4) return Z_DATA_ERROR; + in = strm->total_in; out = strm->total_out; + inflateReset(strm); + strm->total_in = in; strm->total_out = out; + state->mode = TYPE; + return Z_OK; +} + +/* + Returns true if inflate is currently at the end of a block generated by + Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses + Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored + block. When decompressing, PPP checks that at the end of input packet, + inflate is waiting for these length bytes. + */ +int ZEXPORT inflateSyncPoint(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + return state->mode == STORED && state->bits == 0; +} + +int ZEXPORT inflateCopy(dest, source) +z_streamp dest; +z_streamp source; +{ + struct inflate_state FAR *state; + struct inflate_state FAR *copy; + unsigned char FAR *window; + unsigned wsize; + + /* check input */ + if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL || + source->zalloc == (alloc_func)0 || source->zfree == (free_func)0) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)source->state; + + /* allocate space */ + copy = (struct inflate_state FAR *) + ZALLOC(source, 1, sizeof(struct inflate_state)); + if (copy == Z_NULL) return Z_MEM_ERROR; + window = Z_NULL; + if (state->window != Z_NULL) { + window = (unsigned char FAR *) + ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); + if (window == Z_NULL) { + ZFREE(source, copy); + return Z_MEM_ERROR; + } + } + + /* copy state */ + zmemcpy(dest, source, sizeof(z_stream)); + zmemcpy(copy, state, sizeof(struct inflate_state)); + if (state->lencode >= state->codes && + state->lencode <= state->codes + ENOUGH - 1) { + copy->lencode = copy->codes + (state->lencode - state->codes); + copy->distcode = copy->codes + (state->distcode - state->codes); + } + copy->next = copy->codes + (state->next - state->codes); + if (window != Z_NULL) { + wsize = 1U << state->wbits; + zmemcpy(window, state->window, wsize); + } + copy->window = window; + dest->state = (struct internal_state FAR *)copy; + return Z_OK; +} diff --git a/compat/zlib/inflate.h b/compat/zlib/inflate.h new file mode 100644 index 0000000..07bd3e7 --- /dev/null +++ b/compat/zlib/inflate.h @@ -0,0 +1,115 @@ +/* inflate.h -- internal inflate state definition + * Copyright (C) 1995-2004 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* define NO_GZIP when compiling if you want to disable gzip header and + trailer decoding by inflate(). NO_GZIP would be used to avoid linking in + the crc code when it is not needed. For shared libraries, gzip decoding + should be left enabled. */ +#ifndef NO_GZIP +# define GUNZIP +#endif + +/* Possible inflate modes between inflate() calls */ +typedef enum { + HEAD, /* i: waiting for magic header */ + FLAGS, /* i: waiting for method and flags (gzip) */ + TIME, /* i: waiting for modification time (gzip) */ + OS, /* i: waiting for extra flags and operating system (gzip) */ + EXLEN, /* i: waiting for extra length (gzip) */ + EXTRA, /* i: waiting for extra bytes (gzip) */ + NAME, /* i: waiting for end of file name (gzip) */ + COMMENT, /* i: waiting for end of comment (gzip) */ + HCRC, /* i: waiting for header crc (gzip) */ + DICTID, /* i: waiting for dictionary check value */ + DICT, /* waiting for inflateSetDictionary() call */ + TYPE, /* i: waiting for type bits, including last-flag bit */ + TYPEDO, /* i: same, but skip check to exit inflate on new block */ + STORED, /* i: waiting for stored size (length and complement) */ + COPY, /* i/o: waiting for input or output to copy stored block */ + TABLE, /* i: waiting for dynamic block table lengths */ + LENLENS, /* i: waiting for code length code lengths */ + CODELENS, /* i: waiting for length/lit and distance code lengths */ + LEN, /* i: waiting for length/lit code */ + LENEXT, /* i: waiting for length extra bits */ + DIST, /* i: waiting for distance code */ + DISTEXT, /* i: waiting for distance extra bits */ + MATCH, /* o: waiting for output space to copy string */ + LIT, /* o: waiting for output space to write literal */ + CHECK, /* i: waiting for 32-bit check value */ + LENGTH, /* i: waiting for 32-bit length (gzip) */ + DONE, /* finished check, done -- remain here until reset */ + BAD, /* got a data error -- remain here until reset */ + MEM, /* got an inflate() memory error -- remain here until reset */ + SYNC /* looking for synchronization bytes to restart inflate() */ +} inflate_mode; + +/* + State transitions between above modes - + + (most modes can go to the BAD or MEM mode -- not shown for clarity) + + Process header: + HEAD -> (gzip) or (zlib) + (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME + NAME -> COMMENT -> HCRC -> TYPE + (zlib) -> DICTID or TYPE + DICTID -> DICT -> TYPE + Read deflate blocks: + TYPE -> STORED or TABLE or LEN or CHECK + STORED -> COPY -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN + Read deflate codes: + LEN -> LENEXT or LIT or TYPE + LENEXT -> DIST -> DISTEXT -> MATCH -> LEN + LIT -> LEN + Process trailer: + CHECK -> LENGTH -> DONE + */ + +/* state maintained between inflate() calls. Approximately 7K bytes. */ +struct inflate_state { + inflate_mode mode; /* current inflate mode */ + int last; /* true if processing last block */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ + int havedict; /* true if dictionary provided */ + int flags; /* gzip header method and flags (0 if zlib) */ + unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ + unsigned long check; /* protected copy of check value */ + unsigned long total; /* protected copy of output count */ + gz_headerp head; /* where to save gzip header information */ + /* sliding window */ + unsigned wbits; /* log base 2 of requested window size */ + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned write; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + /* bit accumulator */ + unsigned long hold; /* input bit accumulator */ + unsigned bits; /* number of bits in "in" */ + /* for string and stored block copying */ + unsigned length; /* literal or length of data to copy */ + unsigned offset; /* distance back to copy string from */ + /* for table and code decoding */ + unsigned extra; /* extra bits needed */ + /* fixed and dynamic code tables */ + code const FAR *lencode; /* starting table for length/literal codes */ + code const FAR *distcode; /* starting table for distance codes */ + unsigned lenbits; /* index bits for lencode */ + unsigned distbits; /* index bits for distcode */ + /* dynamic table building */ + unsigned ncode; /* number of code length code lengths */ + unsigned nlen; /* number of length code lengths */ + unsigned ndist; /* number of distance code lengths */ + unsigned have; /* number of code lengths in lens[] */ + code FAR *next; /* next available space in codes[] */ + unsigned short lens[320]; /* temporary storage for code lengths */ + unsigned short work[288]; /* work area for code table building */ + code codes[ENOUGH]; /* space for code tables */ +}; diff --git a/compat/zlib/inftrees.c b/compat/zlib/inftrees.c new file mode 100644 index 0000000..8a9c13f --- /dev/null +++ b/compat/zlib/inftrees.c @@ -0,0 +1,329 @@ +/* inftrees.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" + +#define MAXBITS 15 + +const char inflate_copyright[] = + " inflate 1.2.3 Copyright 1995-2005 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* + Build a set of tables to decode the provided canonical Huffman code. + The code lengths are lens[0..codes-1]. The result starts at *table, + whose indices are 0..2^bits-1. work is a writable array of at least + lens shorts, which is used as a work area. type is the type of code + to be generated, CODES, LENS, or DISTS. On return, zero is success, + -1 is an invalid code, and +1 means that ENOUGH isn't enough. table + on return points to the next available entry's address. bits is the + requested root table index bits, and on return it is the actual root + table index bits. It will differ if the request is greater than the + longest code or if it is less than the shortest code. + */ +int inflate_table(type, lens, codes, table, bits, work) +codetype type; +unsigned short FAR *lens; +unsigned codes; +code FAR * FAR *table; +unsigned FAR *bits; +unsigned short FAR *work; +{ + unsigned len; /* a code's length in bits */ + unsigned sym; /* index of code symbols */ + unsigned min, max; /* minimum and maximum code lengths */ + unsigned root; /* number of index bits for root table */ + unsigned curr; /* number of index bits for current table */ + unsigned drop; /* code bits to drop for sub-table */ + int left; /* number of prefix codes available */ + unsigned used; /* code entries in table used */ + unsigned huff; /* Huffman code */ + unsigned incr; /* for incrementing code, index */ + unsigned fill; /* index for replicating entries */ + unsigned low; /* low bits for current root entry */ + unsigned mask; /* mask for low root bits */ + code this; /* table entry for duplication */ + code FAR *next; /* next available space in table */ + const unsigned short FAR *base; /* base value table to use */ + const unsigned short FAR *extra; /* extra bits table to use */ + int end; /* use base and extra for symbol > end */ + unsigned short count[MAXBITS+1]; /* number of codes of each length */ + unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ + static const unsigned short lbase[31] = { /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + static const unsigned short lext[31] = { /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196}; + static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0}; + static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64}; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) + count[len] = 0; + for (sym = 0; sym < codes; sym++) + count[lens[sym]]++; + + /* bound code lengths, force root to be within code lengths */ + root = *bits; + for (max = MAXBITS; max >= 1; max--) + if (count[max] != 0) break; + if (root > max) root = max; + if (max == 0) { /* no symbols to code at all */ + this.op = (unsigned char)64; /* invalid code marker */ + this.bits = (unsigned char)1; + this.val = (unsigned short)0; + *(*table)++ = this; /* make a table to force an error */ + *(*table)++ = this; + *bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min <= MAXBITS; min++) + if (count[min] != 0) break; + if (root < min) root = min; + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) return -1; /* over-subscribed */ + } + if (left > 0 && (type == CODES || max != 1)) + return -1; /* incomplete set */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + count[len]; + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) + if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked when a LENS table is being made + against the space in *table, ENOUGH, minus the maximum space needed by + the worst case distance code, MAXD. This should never happen, but the + sufficiency of ENOUGH has not been proven exhaustively, hence the check. + This assumes that when type == LENS, bits == 9. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + switch (type) { + case CODES: + base = extra = work; /* dummy value--not used */ + end = 19; + break; + case LENS: + base = lbase; + base -= 257; + extra = lext; + extra -= 257; + end = 256; + break; + default: /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize state for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = *table; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = (unsigned)(-1); /* trigger new sub-table when len > root */ + used = 1U << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if (type == LENS && used >= ENOUGH - MAXD) + return 1; + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + this.bits = (unsigned char)(len - drop); + if ((int)(work[sym]) < end) { + this.op = (unsigned char)0; + this.val = work[sym]; + } + else if ((int)(work[sym]) > end) { + this.op = (unsigned char)(extra[work[sym]]); + this.val = base[work[sym]]; + } + else { + this.op = (unsigned char)(32 + 64); /* end of block */ + this.val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1U << (len - drop); + fill = 1U << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + next[(huff >> drop) + fill] = this; + } while (fill != 0); + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + + /* go to next symbol, update count, len */ + sym++; + if (--(count[len]) == 0) { + if (len == max) break; + len = lens[work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) != low) { + /* if first time, transition to sub-tables */ + if (drop == 0) + drop = root; + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = (int)(1 << curr); + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) break; + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1U << curr; + if (type == LENS && used >= ENOUGH - MAXD) + return 1; + + /* point entry in root table to sub-table */ + low = huff & mask; + (*table)[low].op = (unsigned char)curr; + (*table)[low].bits = (unsigned char)root; + (*table)[low].val = (unsigned short)(next - *table); + } + } + + /* + Fill in rest of table for incomplete codes. This loop is similar to the + loop above in incrementing huff for table indices. It is assumed that + len is equal to curr + drop, so there is no loop needed to increment + through high index bits. When the current sub-table is filled, the loop + drops back to the root table to fill in any remaining entries there. + */ + this.op = (unsigned char)64; /* invalid code marker */ + this.bits = (unsigned char)(len - drop); + this.val = (unsigned short)0; + while (huff != 0) { + /* when done with sub-table, drop back to root table */ + if (drop != 0 && (huff & mask) != low) { + drop = 0; + len = root; + next = *table; + this.bits = (unsigned char)len; + } + + /* put invalid code marker in table */ + next[huff >> drop] = this; + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + } + + /* set return parameters */ + *table += used; + *bits = root; + return 0; +} diff --git a/compat/zlib/inftrees.h b/compat/zlib/inftrees.h new file mode 100644 index 0000000..b1104c8 --- /dev/null +++ b/compat/zlib/inftrees.h @@ -0,0 +1,55 @@ +/* inftrees.h -- header to use inftrees.c + * Copyright (C) 1995-2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Structure for decoding tables. Each entry provides either the + information needed to do the operation requested by the code that + indexed that table entry, or it provides a pointer to another + table that indexes more bits of the code. op indicates whether + the entry is a pointer to another table, a literal, a length or + distance, an end-of-block, or an invalid code. For a table + pointer, the low four bits of op is the number of index bits of + that table. For a length or distance, the low four bits of op + is the number of extra bits to get after the code. bits is + the number of bits in this code or part of the code to drop off + of the bit buffer. val is the actual byte to output in the case + of a literal, the base length or distance, or the offset from + the current table to the next table. Each entry is four bytes. */ +typedef struct { + unsigned char op; /* operation, extra bits, table bits */ + unsigned char bits; /* bits in this part of the code */ + unsigned short val; /* offset in table or code value */ +} code; + +/* op values as set by inflate_table(): + 00000000 - literal + 0000tttt - table link, tttt != 0 is the number of table index bits + 0001eeee - length or distance, eeee is the number of extra bits + 01100000 - end of block + 01000000 - invalid code + */ + +/* Maximum size of dynamic tree. The maximum found in a long but non- + exhaustive search was 1444 code structures (852 for length/literals + and 592 for distances, the latter actually the result of an + exhaustive search). The true maximum is not known, but the value + below is more than safe. */ +#define ENOUGH 2048 +#define MAXD 592 + +/* Type of code to build for inftable() */ +typedef enum { + CODES, + LENS, + DISTS +} codetype; + +extern int inflate_table OF((codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work)); diff --git a/compat/zlib/msdos/Makefile.bor b/compat/zlib/msdos/Makefile.bor new file mode 100644 index 0000000..8f8132d --- /dev/null +++ b/compat/zlib/msdos/Makefile.bor @@ -0,0 +1,109 @@ +# Makefile for zlib +# Borland C++ +# Last updated: 15-Mar-2003 + +# To use, do "make -fmakefile.bor" +# To compile in small model, set below: MODEL=s + +# WARNING: the small model is supported but only for small values of +# MAX_WBITS and MAX_MEM_LEVEL. For example: +# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3 +# If you wish to reduce the memory requirements (default 256K for big +# objects plus a few K), you can add to the LOC macro below: +# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 +# See zconf.h for details about the memory requirements. + +# ------------ Turbo C++, Borland C++ ------------ + +# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) +# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added +# to the declaration of LOC here: +LOC = $(LOCAL_ZLIB) + +# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. +CPU_TYP = 0 + +# memory model: one of s, m, c, l (small, medium, compact, large) +MODEL=l + +# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version +CC=bcc +LD=bcc +AR=tlib + +# compiler flags +# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0 +CFLAGS=-O2 -Z -m$(MODEL) $(LOC) + +LDFLAGS=-m$(MODEL) -f- + + +# variables +ZLIB_LIB = zlib_$(MODEL).lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj +OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj +OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzio.obj: gzio.c zutil.h zlib.h zconf.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: example.c zlib.h zconf.h + +minigzip.obj: minigzip.c zlib.h zconf.h + + +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +clean: + -del *.obj + -del *.lib + -del *.exe + -del zlib_*.bak + -del foo.gz diff --git a/compat/zlib/msdos/Makefile.dj2 b/compat/zlib/msdos/Makefile.dj2 new file mode 100644 index 0000000..283d1d9 --- /dev/null +++ b/compat/zlib/msdos/Makefile.dj2 @@ -0,0 +1,104 @@ +# Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96. +# Copyright (C) 1995-1998 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type: +# +# make -fmakefile.dj2; make test -fmakefile.dj2 +# +# To install libz.a, zconf.h and zlib.h in the djgpp directories, type: +# +# make install -fmakefile.dj2 +# +# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as +# in the sample below if the pattern of the DJGPP distribution is to +# be followed. Remember that, while 'es around <=> are ignored in +# makefiles, they are *not* in batch files or in djgpp.env. +# - - - - - +# [make] +# INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include +# LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib +# BUTT=-m486 +# - - - - - +# Alternately, these variables may be defined below, overriding the values +# in djgpp.env, as +# INCLUDE_PATH=c:\usr\include +# LIBRARY_PATH=c:\usr\lib + +CC=gcc + +#CFLAGS=-MMD -O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-MMD -g -DDEBUG +CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + -Wstrict-prototypes -Wmissing-prototypes + +# If cp.exe is available, replace "copy /Y" with "cp -fp" . +CP=copy /Y +# If gnu install.exe is available, replace $(CP) with ginstall. +INSTALL=$(CP) +# The default value of RM is "rm -f." If "rm.exe" is found, comment out: +RM=del +LDLIBS=-L. -lz +LD=$(CC) -s -o +LDSHARED=$(CC) + +INCL=zlib.h zconf.h +LIBS=libz.a + +AR=ar rcs + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infback.o inftrees.o inffast.o + +OBJA = +# to use the asm code: make OBJA=match.o + +TEST_OBJS = example.o minigzip.o + +all: example.exe minigzip.exe + +check: test +test: all + ./example + echo hello world | .\minigzip | .\minigzip -d + +%.o : %.c + $(CC) $(CFLAGS) -c $< -o $@ + +libz.a: $(OBJS) $(OBJA) + $(AR) $@ $(OBJS) $(OBJA) + +%.exe : %.o $(LIBS) + $(LD) $@ $< $(LDLIBS) + +# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env . + +.PHONY : uninstall clean + +install: $(INCL) $(LIBS) + -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH) + -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH) + $(INSTALL) zlib.h $(INCLUDE_PATH) + $(INSTALL) zconf.h $(INCLUDE_PATH) + $(INSTALL) libz.a $(LIBRARY_PATH) + +uninstall: + $(RM) $(INCLUDE_PATH)\zlib.h + $(RM) $(INCLUDE_PATH)\zconf.h + $(RM) $(LIBRARY_PATH)\libz.a + +clean: + $(RM) *.d + $(RM) *.o + $(RM) *.exe + $(RM) libz.a + $(RM) foo.gz + +DEPS := $(wildcard *.d) +ifneq ($(DEPS),) +include $(DEPS) +endif diff --git a/compat/zlib/msdos/Makefile.emx b/compat/zlib/msdos/Makefile.emx new file mode 100644 index 0000000..ed4c31f --- /dev/null +++ b/compat/zlib/msdos/Makefile.emx @@ -0,0 +1,69 @@ +# Makefile for zlib. Modified for emx 0.9c by Chr. Spieler, 6/17/98. +# Copyright (C) 1995-1998 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type: +# +# make -fmakefile.emx; make test -fmakefile.emx +# + +CC=gcc + +#CFLAGS=-MMD -O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-MMD -g -DDEBUG +CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + -Wstrict-prototypes -Wmissing-prototypes + +# If cp.exe is available, replace "copy /Y" with "cp -fp" . +CP=copy /Y +# If gnu install.exe is available, replace $(CP) with ginstall. +INSTALL=$(CP) +# The default value of RM is "rm -f." If "rm.exe" is found, comment out: +RM=del +LDLIBS=-L. -lzlib +LD=$(CC) -s -o +LDSHARED=$(CC) + +INCL=zlib.h zconf.h +LIBS=zlib.a + +AR=ar rcs + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infback.o inftrees.o inffast.o + +TEST_OBJS = example.o minigzip.o + +all: example.exe minigzip.exe + +test: all + ./example + echo hello world | .\minigzip | .\minigzip -d + +%.o : %.c + $(CC) $(CFLAGS) -c $< -o $@ + +zlib.a: $(OBJS) + $(AR) $@ $(OBJS) + +%.exe : %.o $(LIBS) + $(LD) $@ $< $(LDLIBS) + + +.PHONY : clean + +clean: + $(RM) *.d + $(RM) *.o + $(RM) *.exe + $(RM) zlib.a + $(RM) foo.gz + +DEPS := $(wildcard *.d) +ifneq ($(DEPS),) +include $(DEPS) +endif diff --git a/compat/zlib/msdos/Makefile.msc b/compat/zlib/msdos/Makefile.msc new file mode 100644 index 0000000..b8fc665 --- /dev/null +++ b/compat/zlib/msdos/Makefile.msc @@ -0,0 +1,106 @@ +# Makefile for zlib +# Microsoft C 5.1 or later +# Last updated: 19-Mar-2003 + +# To use, do "make makefile.msc" +# To compile in small model, set below: MODEL=S + +# If you wish to reduce the memory requirements (default 256K for big +# objects plus a few K), you can add to the LOC macro below: +# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 +# See zconf.h for details about the memory requirements. + +# ------------- Microsoft C 5.1 and later ------------- + +# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) +# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added +# to the declaration of LOC here: +LOC = $(LOCAL_ZLIB) + +# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. +CPU_TYP = 0 + +# Memory model: one of S, M, C, L (small, medium, compact, large) +MODEL=L + +CC=cl +CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC) +#-Ox generates bad code with MSC 5.1 +LIB_CFLAGS=-Zl $(CFLAGS) + +LD=link +LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode +# "/farcall/packcode" are only useful for `large code' memory models +# but should be a "no-op" for small code models. + + +# variables +ZLIB_LIB = zlib_$(MODEL).lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj +OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(LIB_CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzio.obj: gzio.c zutil.h zlib.h zconf.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: example.c zlib.h zconf.h + $(CC) -c $(CFLAGS) $*.c + +minigzip.obj: minigzip.c zlib.h zconf.h + $(CC) -c $(CFLAGS) $*.c + + +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + if exist $(ZLIB_LIB) del $(ZLIB_LIB) + lib $(ZLIB_LIB) $(OBJ1); + lib $(ZLIB_LIB) $(OBJ2); + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB); + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB); + +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +clean: + -del *.obj + -del *.lib + -del *.exe + -del *.map + -del zlib_*.bak + -del foo.gz diff --git a/compat/zlib/msdos/Makefile.tc b/compat/zlib/msdos/Makefile.tc new file mode 100644 index 0000000..480750a --- /dev/null +++ b/compat/zlib/msdos/Makefile.tc @@ -0,0 +1,94 @@ +# Makefile for zlib +# Turbo C 2.01, Turbo C++ 1.01 +# Last updated: 15-Mar-2003 + +# To use, do "make -fmakefile.tc" +# To compile in small model, set below: MODEL=s + +# WARNING: the small model is supported but only for small values of +# MAX_WBITS and MAX_MEM_LEVEL. For example: +# -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 +# If you wish to reduce the memory requirements (default 256K for big +# objects plus a few K), you can add to CFLAGS below: +# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 +# See zconf.h for details about the memory requirements. + +# ------------ Turbo C 2.01, Turbo C++ 1.01 ------------ +MODEL=l +CC=tcc +LD=tcc +AR=tlib +# CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3 +CFLAGS=-O2 -G -Z -m$(MODEL) +LDFLAGS=-m$(MODEL) -f- + + +# variables +ZLIB_LIB = zlib_$(MODEL).lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj +OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj +OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzio.obj: gzio.c zutil.h zlib.h zconf.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: example.c zlib.h zconf.h + +minigzip.obj: minigzip.c zlib.h zconf.h + + +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +clean: + -del *.obj + -del *.lib + -del *.exe + -del zlib_*.bak + -del foo.gz diff --git a/compat/zlib/qnx/package.qpg b/compat/zlib/qnx/package.qpg new file mode 100644 index 0000000..8a4a47c --- /dev/null +++ b/compat/zlib/qnx/package.qpg @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Library + + Medium + + 2.0 + + + + zlib + zlib + alain.bonnefoy@icbt.com + Public + public + www.gzip.org/zlib + + + Jean-Loup Gailly,Mark Adler + www.gzip.org/zlib + + zlib@gzip.org + + + A massively spiffy yet delicately unobtrusive compression library. + zlib is designed to be a free, general-purpose, legally unencumbered, lossless data compression library for use on virtually any computer hardware and operating system. + http://www.gzip.org/zlib + + + + + 1.2.3 + Medium + Stable + + + + + + + No License + + + + Software Development/Libraries and Extensions/C Libraries + zlib,compression + qnx6 + qnx6 + None + Developer + + + + + + + + + + + + + + Install + Post + No + Ignore + + No + Optional + + + + + + + + + + + + + InstallOver + zlib + + + + + + + + + + + + + InstallOver + zlib-dev + + + + + + + + + diff --git a/compat/zlib/trees.c b/compat/zlib/trees.c new file mode 100644 index 0000000..badf371 --- /dev/null +++ b/compat/zlib/trees.c @@ -0,0 +1,1219 @@ +/* trees.c -- output deflated data using Huffman coding + * Copyright (C) 1995-2005 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process uses several Huffman trees. The more + * common source values are represented by shorter bit sequences. + * + * Each code tree is stored in a compressed form which is itself + * a Huffman encoding of the lengths of all the code strings (in + * ascending order by source values). The actual code strings are + * reconstructed from the lengths in the inflate process, as described + * in the deflate specification. + * + * REFERENCES + * + * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". + * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc + * + * Storer, James A. + * Data Compression: Methods and Theory, pp. 49-50. + * Computer Science Press, 1988. ISBN 0-7167-8156-5. + * + * Sedgewick, R. + * Algorithms, p290. + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + */ + +/* @(#) $Id: trees.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +/* #define GEN_TREES_H */ + +#include "deflate.h" + +#ifdef DEBUG +# include +#endif + +/* =========================================================================== + * Constants + */ + +#define MAX_BL_BITS 7 +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +#define END_BLOCK 256 +/* end of block literal code */ + +#define REP_3_6 16 +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +#define REPZ_3_10 17 +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +#define REPZ_11_138 18 +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ + = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; + +local const int extra_dbits[D_CODES] /* extra bits for each distance code */ + = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ + = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; + +local const uch bl_order[BL_CODES] + = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +#define Buf_size (8 * 2*sizeof(char)) +/* Number of bits used within bi_buf. (bi_buf might be implemented on + * more than 16 bits on some systems.) + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ + +#if defined(GEN_TREES_H) || !defined(STDC) +/* non ANSI compilers may not accept trees.h */ + +local ct_data static_ltree[L_CODES+2]; +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +local ct_data static_dtree[D_CODES]; +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +uch _dist_code[DIST_CODE_LEN]; +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +uch _length_code[MAX_MATCH-MIN_MATCH+1]; +/* length code for each normalized match length (0 == MIN_MATCH) */ + +local int base_length[LENGTH_CODES]; +/* First normalized length for each code (0 = MIN_MATCH) */ + +local int base_dist[D_CODES]; +/* First normalized distance for each code (0 = distance of 1) */ + +#else +# include "trees.h" +#endif /* GEN_TREES_H */ + +struct static_tree_desc_s { + const ct_data *static_tree; /* static tree or NULL */ + const intf *extra_bits; /* extra bits for each code or NULL */ + int extra_base; /* base index for extra_bits */ + int elems; /* max number of elements in the tree */ + int max_length; /* max bit length for the codes */ +}; + +local static_tree_desc static_l_desc = +{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; + +local static_tree_desc static_d_desc = +{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; + +local static_tree_desc static_bl_desc = +{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; + +/* =========================================================================== + * Local (static) routines in this file. + */ + +local void tr_static_init OF((void)); +local void init_block OF((deflate_state *s)); +local void pqdownheap OF((deflate_state *s, ct_data *tree, int k)); +local void gen_bitlen OF((deflate_state *s, tree_desc *desc)); +local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count)); +local void build_tree OF((deflate_state *s, tree_desc *desc)); +local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local void send_tree OF((deflate_state *s, ct_data *tree, int max_code)); +local int build_bl_tree OF((deflate_state *s)); +local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, + int blcodes)); +local void compress_block OF((deflate_state *s, ct_data *ltree, + ct_data *dtree)); +local void set_data_type OF((deflate_state *s)); +local unsigned bi_reverse OF((unsigned value, int length)); +local void bi_windup OF((deflate_state *s)); +local void bi_flush OF((deflate_state *s)); +local void copy_block OF((deflate_state *s, charf *buf, unsigned len, + int header)); + +#ifdef GEN_TREES_H +local void gen_trees_header OF((void)); +#endif + +#ifndef DEBUG +# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) + /* Send a code of the given tree. c and tree must not have side effects */ + +#else /* DEBUG */ +# define send_code(s, c, tree) \ + { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ + send_bits(s, tree[c].Code, tree[c].Len); } +#endif + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +#define put_short(s, w) { \ + put_byte(s, (uch)((w) & 0xff)); \ + put_byte(s, (uch)((ush)(w) >> 8)); \ +} + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +#ifdef DEBUG +local void send_bits OF((deflate_state *s, int value, int length)); + +local void send_bits(s, value, length) + deflate_state *s; + int value; /* value to send */ + int length; /* number of bits */ +{ + Tracevv((stderr," l %2d v %4x ", length, value)); + Assert(length > 0 && length <= 15, "invalid length"); + s->bits_sent += (ulg)length; + + /* If not enough room in bi_buf, use (valid) bits from bi_buf and + * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) + * unused bits in value. + */ + if (s->bi_valid > (int)Buf_size - length) { + s->bi_buf |= (value << s->bi_valid); + put_short(s, s->bi_buf); + s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); + s->bi_valid += length - Buf_size; + } else { + s->bi_buf |= value << s->bi_valid; + s->bi_valid += length; + } +} +#else /* !DEBUG */ + +#define send_bits(s, value, length) \ +{ int len = length;\ + if (s->bi_valid > (int)Buf_size - len) {\ + int val = value;\ + s->bi_buf |= (val << s->bi_valid);\ + put_short(s, s->bi_buf);\ + s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ + s->bi_valid += len - Buf_size;\ + } else {\ + s->bi_buf |= (value) << s->bi_valid;\ + s->bi_valid += len;\ + }\ +} +#endif /* DEBUG */ + + +/* the arguments must not have side effects */ + +/* =========================================================================== + * Initialize the various 'constant' tables. + */ +local void tr_static_init() +{ +#if defined(GEN_TREES_H) || !defined(STDC) + static int static_init_done = 0; + int n; /* iterates over tree elements */ + int bits; /* bit counter */ + int length; /* length value */ + int code; /* code value */ + int dist; /* distance index */ + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + if (static_init_done) return; + + /* For some embedded targets, global variables are not initialized: */ + static_l_desc.static_tree = static_ltree; + static_l_desc.extra_bits = extra_lbits; + static_d_desc.static_tree = static_dtree; + static_d_desc.extra_bits = extra_dbits; + static_bl_desc.extra_bits = extra_blbits; + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES-1; code++) { + base_length[code] = length; + for (n = 0; n < (1< dist code (0..29) */ + dist = 0; + for (code = 0 ; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ + for ( ; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) { + _dist_code[256 + dist++] = (uch)code; + } + } + Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + n = 0; + while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; + while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; + while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; + while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n].Len = 5; + static_dtree[n].Code = bi_reverse((unsigned)n, 5); + } + static_init_done = 1; + +# ifdef GEN_TREES_H + gen_trees_header(); +# endif +#endif /* defined(GEN_TREES_H) || !defined(STDC) */ +} + +/* =========================================================================== + * Genererate the file trees.h describing the static trees. + */ +#ifdef GEN_TREES_H +# ifndef DEBUG +# include +# endif + +# define SEPARATOR(i, last, width) \ + ((i) == (last)? "\n};\n\n" : \ + ((i) % (width) == (width)-1 ? ",\n" : ", ")) + +void gen_trees_header() +{ + FILE *header = fopen("trees.h", "w"); + int i; + + Assert (header != NULL, "Can't open trees.h"); + fprintf(header, + "/* header created automatically with -DGEN_TREES_H */\n\n"); + + fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); + for (i = 0; i < L_CODES+2; i++) { + fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, + static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); + } + + fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, + static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); + } + + fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n"); + for (i = 0; i < DIST_CODE_LEN; i++) { + fprintf(header, "%2u%s", _dist_code[i], + SEPARATOR(i, DIST_CODE_LEN-1, 20)); + } + + fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { + fprintf(header, "%2u%s", _length_code[i], + SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); + } + + fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); + for (i = 0; i < LENGTH_CODES; i++) { + fprintf(header, "%1u%s", base_length[i], + SEPARATOR(i, LENGTH_CODES-1, 20)); + } + + fprintf(header, "local const int base_dist[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "%5u%s", base_dist[i], + SEPARATOR(i, D_CODES-1, 10)); + } + + fclose(header); +} +#endif /* GEN_TREES_H */ + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +void _tr_init(s) + deflate_state *s; +{ + tr_static_init(); + + s->l_desc.dyn_tree = s->dyn_ltree; + s->l_desc.stat_desc = &static_l_desc; + + s->d_desc.dyn_tree = s->dyn_dtree; + s->d_desc.stat_desc = &static_d_desc; + + s->bl_desc.dyn_tree = s->bl_tree; + s->bl_desc.stat_desc = &static_bl_desc; + + s->bi_buf = 0; + s->bi_valid = 0; + s->last_eob_len = 8; /* enough lookahead for inflate */ +#ifdef DEBUG + s->compressed_len = 0L; + s->bits_sent = 0L; +#endif + + /* Initialize the first block of the first file: */ + init_block(s); +} + +/* =========================================================================== + * Initialize a new block. + */ +local void init_block(s) + deflate_state *s; +{ + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; + s->last_lit = s->matches = 0; +} + +#define SMALLEST 1 +/* Index within the heap array of least frequent node in the Huffman tree */ + + +/* =========================================================================== + * Remove the smallest element from the heap and recreate the heap with + * one less element. Updates heap and heap_len. + */ +#define pqremove(s, tree, top) \ +{\ + top = s->heap[SMALLEST]; \ + s->heap[SMALLEST] = s->heap[s->heap_len--]; \ + pqdownheap(s, tree, SMALLEST); \ +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +#define smaller(tree, n, m, depth) \ + (tree[n].Freq < tree[m].Freq || \ + (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +local void pqdownheap(s, tree, k) + deflate_state *s; + ct_data *tree; /* the tree to restore */ + int k; /* node to move down */ +{ + int v = s->heap[k]; + int j = k << 1; /* left son of k */ + while (j <= s->heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s->heap_len && + smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s->heap[j], s->depth)) break; + + /* Exchange v with the smallest son */ + s->heap[k] = s->heap[j]; k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s->heap[k] = v; +} + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +local void gen_bitlen(s, desc) + deflate_state *s; + tree_desc *desc; /* the tree descriptor */ +{ + ct_data *tree = desc->dyn_tree; + int max_code = desc->max_code; + const ct_data *stree = desc->stat_desc->static_tree; + const intf *extra = desc->stat_desc->extra_bits; + int base = desc->stat_desc->extra_base; + int max_length = desc->stat_desc->max_length; + int h; /* heap index */ + int n, m; /* iterate over the tree elements */ + int bits; /* bit length */ + int xbits; /* extra bits */ + ush f; /* frequency */ + int overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ + + for (h = s->heap_max+1; h < HEAP_SIZE; h++) { + n = s->heap[h]; + bits = tree[tree[n].Dad].Len + 1; + if (bits > max_length) bits = max_length, overflow++; + tree[n].Len = (ush)bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) continue; /* not a leaf node */ + + s->bl_count[bits]++; + xbits = 0; + if (n >= base) xbits = extra[n-base]; + f = tree[n].Freq; + s->opt_len += (ulg)f * (bits + xbits); + if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits); + } + if (overflow == 0) return; + + Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length-1; + while (s->bl_count[bits] == 0) bits--; + s->bl_count[bits]--; /* move one leaf down the tree */ + s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ + s->bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits != 0; bits--) { + n = s->bl_count[bits]; + while (n != 0) { + m = s->heap[--h]; + if (m > max_code) continue; + if ((unsigned) tree[m].Len != (unsigned) bits) { + Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s->opt_len += ((long)bits - (long)tree[m].Len) + *(long)tree[m].Freq; + tree[m].Len = (ush)bits; + } + n--; + } + } +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes (tree, max_code, bl_count) + ct_data *tree; /* the tree to decorate */ + int max_code; /* largest code with non zero frequency */ + ushf *bl_count; /* number of codes at each bit length */ +{ + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + ush code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits-1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS]-1 == (1<dyn_tree; + const ct_data *stree = desc->stat_desc->static_tree; + int elems = desc->stat_desc->elems; + int n, m; /* iterate over heap elements */ + int max_code = -1; /* largest code with non zero frequency */ + int node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s->heap_len = 0, s->heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n].Freq != 0) { + s->heap[++(s->heap_len)] = max_code = n; + s->depth[n] = 0; + } else { + tree[n].Len = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s->heap_len < 2) { + node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); + tree[node].Freq = 1; + s->depth[node] = 0; + s->opt_len--; if (stree) s->static_len -= stree[node].Len; + /* node is 0 or 1 so it does not have extra bits */ + } + desc->max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + pqremove(s, tree, n); /* n = node of least frequency */ + m = s->heap[SMALLEST]; /* m = node of next least frequency */ + + s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ + s->heap[--(s->heap_max)] = m; + + /* Create a new node father of n and m */ + tree[node].Freq = tree[n].Freq + tree[m].Freq; + s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? + s->depth[n] : s->depth[m]) + 1); + tree[n].Dad = tree[m].Dad = (ush)node; +#ifdef DUMP_BL_TREE + if (tree == s->bl_tree) { + fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", + node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); + } +#endif + /* and insert the new node in the heap */ + s->heap[SMALLEST] = node++; + pqdownheap(s, tree, SMALLEST); + + } while (s->heap_len >= 2); + + s->heap[--(s->heap_max)] = s->heap[SMALLEST]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, (tree_desc *)desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes ((ct_data *)tree, max_code, s->bl_count); +} + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +local void scan_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + if (nextlen == 0) max_count = 138, min_count = 3; + tree[max_code+1].Len = (ush)0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + s->bl_tree[curlen].Freq += count; + } else if (curlen != 0) { + if (curlen != prevlen) s->bl_tree[curlen].Freq++; + s->bl_tree[REP_3_6].Freq++; + } else if (count <= 10) { + s->bl_tree[REPZ_3_10].Freq++; + } else { + s->bl_tree[REPZ_11_138].Freq++; + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +local void send_tree (s, tree, max_code) + deflate_state *s; + ct_data *tree; /* the tree to be scanned */ + int max_code; /* and its largest code of non zero frequency */ +{ + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen == 0) max_count = 138, min_count = 3; + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n+1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + do { send_code(s, curlen, s->bl_tree); } while (--count != 0); + + } else if (curlen != 0) { + if (curlen != prevlen) { + send_code(s, curlen, s->bl_tree); count--; + } + Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3); + + } else { + send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7); + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +local int build_bl_tree(s) + deflate_state *s; +{ + int max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); + scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, (tree_desc *)(&(s->bl_desc))); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { + if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; + } + /* Update opt_len to include the bit length tree and counts */ + s->opt_len += 3*(max_blindex+1) + 5+5+4; + Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + s->opt_len, s->static_len)); + + return max_blindex; +} + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +local void send_all_trees(s, lcodes, dcodes, blcodes) + deflate_state *s; + int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + int rank; /* index in bl_order */ + + Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + "too many codes"); + Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes-1, 5); + send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); + } + Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ + Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ + Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + +/* =========================================================================== + * Send a stored block + */ +void _tr_stored_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ +#ifdef DEBUG + s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; + s->compressed_len += (stored_len + 4) << 3; +#endif + copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ +} + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + * The current inflate code requires 9 bits of lookahead. If the + * last two codes for the previous block (real code plus EOB) were coded + * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + * the last real code. In this case we send two empty static blocks instead + * of one. (There are no problems if the previous block is stored or fixed.) + * To simplify the code, we assume the worst case of last real code encoded + * on one bit only. + */ +void _tr_align(s) + deflate_state *s; +{ + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ +#endif + bi_flush(s); + /* Of the 10 bits for the empty block, we have already sent + * (10 - bi_valid) bits. The lookahead for the last real code (before + * the EOB of the previous block) was thus at least one plus the length + * of the EOB plus what we have just sent of the empty static block. + */ + if (1 + s->last_eob_len + 10 - s->bi_valid < 9) { + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef DEBUG + s->compressed_len += 10L; +#endif + bi_flush(s); + } + s->last_eob_len = 7; +} + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +void _tr_flush_block(s, buf, stored_len, eof) + deflate_state *s; + charf *buf; /* input block, or NULL if too old */ + ulg stored_len; /* length of input block */ + int eof; /* true if this is the last block for a file */ +{ + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + int max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s->level > 0) { + + /* Check if the file is binary or text */ + if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN) + set_data_type(s); + + /* Construct the literal and distance trees */ + build_tree(s, (tree_desc *)(&(s->l_desc))); + Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + + build_tree(s, (tree_desc *)(&(s->d_desc))); + Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s->opt_len+3+7)>>3; + static_lenb = (s->static_len+3+7)>>3; + + Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + s->last_lit)); + + if (static_lenb <= opt_lenb) opt_lenb = static_lenb; + + } else { + Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + +#ifdef FORCE_STORED + if (buf != (char*)0) { /* force stored block */ +#else + if (stored_len+4 <= opt_lenb && buf != (char*)0) { + /* 4: two words for the lengths */ +#endif + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, eof); + +#ifdef FORCE_STATIC + } else if (static_lenb >= 0) { /* force static trees */ +#else + } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { +#endif + send_bits(s, (STATIC_TREES<<1)+eof, 3); + compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->static_len; +#endif + } else { + send_bits(s, (DYN_TREES<<1)+eof, 3); + send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, + max_blindex+1); + compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); +#ifdef DEBUG + s->compressed_len += 3 + s->opt_len; +#endif + } + Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (eof) { + bi_windup(s); +#ifdef DEBUG + s->compressed_len += 7; /* align on byte boundary */ +#endif + } + Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + s->compressed_len-7*eof)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +int _tr_tally (s, dist, lc) + deflate_state *s; + unsigned dist; /* distance of matched string */ + unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + s->d_buf[s->last_lit] = (ush)dist; + s->l_buf[s->last_lit++] = (uch)lc; + if (dist == 0) { + /* lc is the unmatched char */ + s->dyn_ltree[lc].Freq++; + } else { + s->matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + Assert((ush)dist < (ush)MAX_DIST(s) && + (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; + s->dyn_dtree[d_code(dist)].Freq++; + } + +#ifdef TRUNCATE_BLOCK + /* Try to guess if it is profitable to stop the current block here */ + if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { + /* Compute an upper bound for the compressed length */ + ulg out_length = (ulg)s->last_lit*8L; + ulg in_length = (ulg)((long)s->strstart - s->block_start); + int dcode; + for (dcode = 0; dcode < D_CODES; dcode++) { + out_length += (ulg)s->dyn_dtree[dcode].Freq * + (5L+extra_dbits[dcode]); + } + out_length >>= 3; + Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", + s->last_lit, in_length, out_length, + 100L - out_length*100L/in_length)); + if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; + } +#endif + return (s->last_lit == s->lit_bufsize-1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(s, ltree, dtree) + deflate_state *s; + ct_data *ltree; /* literal tree */ + ct_data *dtree; /* distance tree */ +{ + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned lx = 0; /* running index in l_buf */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (s->last_lit != 0) do { + dist = s->d_buf[lx]; + lc = s->l_buf[lx++]; + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code+LITERALS+1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + "pendingBuf overflow"); + + } while (lx < s->last_lit); + + send_code(s, END_BLOCK, ltree); + s->last_eob_len = ltree[END_BLOCK].Len; +} + +/* =========================================================================== + * Set the data type to BINARY or TEXT, using a crude approximation: + * set it to Z_TEXT if all symbols are either printable characters (33 to 255) + * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise. + * IN assertion: the fields Freq of dyn_ltree are set. + */ +local void set_data_type(s) + deflate_state *s; +{ + int n; + + for (n = 0; n < 9; n++) + if (s->dyn_ltree[n].Freq != 0) + break; + if (n == 9) + for (n = 14; n < 32; n++) + if (s->dyn_ltree[n].Freq != 0) + break; + s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY; +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +local unsigned bi_reverse(code, len) + unsigned code; /* the value to invert */ + int len; /* its bit length */ +{ + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +local void bi_flush(s) + deflate_state *s; +{ + if (s->bi_valid == 16) { + put_short(s, s->bi_buf); + s->bi_buf = 0; + s->bi_valid = 0; + } else if (s->bi_valid >= 8) { + put_byte(s, (Byte)s->bi_buf); + s->bi_buf >>= 8; + s->bi_valid -= 8; + } +} + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +local void bi_windup(s) + deflate_state *s; +{ + if (s->bi_valid > 8) { + put_short(s, s->bi_buf); + } else if (s->bi_valid > 0) { + put_byte(s, (Byte)s->bi_buf); + } + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef DEBUG + s->bits_sent = (s->bits_sent+7) & ~7; +#endif +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +local void copy_block(s, buf, len, header) + deflate_state *s; + charf *buf; /* the input data */ + unsigned len; /* its length */ + int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + s->last_eob_len = 8; /* enough lookahead for inflate */ + + if (header) { + put_short(s, (ush)len); + put_short(s, (ush)~len); +#ifdef DEBUG + s->bits_sent += 2*16; +#endif + } +#ifdef DEBUG + s->bits_sent += (ulg)len<<3; +#endif + while (len--) { + put_byte(s, *buf++); + } +} diff --git a/compat/zlib/trees.h b/compat/zlib/trees.h new file mode 100644 index 0000000..72facf9 --- /dev/null +++ b/compat/zlib/trees.h @@ -0,0 +1,128 @@ +/* header created automatically with -DGEN_TREES_H */ + +local const ct_data static_ltree[L_CODES+2] = { +{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, +{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, +{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, +{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, +{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, +{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, +{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, +{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, +{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, +{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, +{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, +{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, +{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, +{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, +{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, +{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, +{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, +{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, +{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, +{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, +{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, +{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, +{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, +{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, +{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, +{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, +{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, +{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, +{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, +{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, +{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, +{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, +{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, +{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, +{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, +{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, +{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, +{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, +{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, +{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, +{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, +{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, +{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, +{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, +{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, +{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, +{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, +{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, +{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, +{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, +{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, +{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, +{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, +{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, +{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, +{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, +{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, +{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} +}; + +local const ct_data static_dtree[D_CODES] = { +{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, +{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, +{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, +{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, +{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, +{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} +}; + +const uch _dist_code[DIST_CODE_LEN] = { + 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, +12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, +18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 +}; + +const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, +13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, +17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, +19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 +}; + +local const int base_length[LENGTH_CODES] = { +0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, +64, 80, 96, 112, 128, 160, 192, 224, 0 +}; + +local const int base_dist[D_CODES] = { + 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, + 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, + 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 +}; + diff --git a/compat/zlib/uncompr.c b/compat/zlib/uncompr.c new file mode 100644 index 0000000..34c2c97 --- /dev/null +++ b/compat/zlib/uncompr.c @@ -0,0 +1,61 @@ +/* uncompr.c -- decompress a memory buffer + * Copyright (C) 1995-2003 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: uncompr.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#define ZLIB_INTERNAL +#include "zlib.h" + +/* =========================================================================== + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +*/ +int ZEXPORT uncompress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; +{ + z_stream stream; + int err; + + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; + /* Check for source > 64K on 16-bit machine: */ + if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; + + stream.next_out = dest; + stream.avail_out = (uInt)*destLen; + if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + err = inflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + inflateEnd(&stream); + if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) + return Z_DATA_ERROR; + return err; + } + *destLen = stream.total_out; + + err = inflateEnd(&stream); + return err; +} diff --git a/compat/zlib/win32/DLL_FAQ.txt b/compat/zlib/win32/DLL_FAQ.txt new file mode 100644 index 0000000..fb18e07 --- /dev/null +++ b/compat/zlib/win32/DLL_FAQ.txt @@ -0,0 +1,397 @@ + + Frequently Asked Questions about ZLIB1.DLL + + +This document describes the design, the rationale, and the usage +of the official DLL build of zlib, named ZLIB1.DLL. If you have +general questions about zlib, you should see the file "FAQ" found +in the zlib distribution, or at the following location: + http://www.gzip.org/zlib/zlib_faq.html + + + 1. What is ZLIB1.DLL, and how can I get it? + + - ZLIB1.DLL is the official build of zlib as a DLL. + (Please remark the character '1' in the name.) + + Pointers to a precompiled ZLIB1.DLL can be found in the zlib + web site at: + http://www.zlib.org/ + + Applications that link to ZLIB1.DLL can rely on the following + specification: + + * The exported symbols are exclusively defined in the source + files "zlib.h" and "zlib.def", found in an official zlib + source distribution. + * The symbols are exported by name, not by ordinal. + * The exported names are undecorated. + * The calling convention of functions is "C" (CDECL). + * The ZLIB1.DLL binary is linked to MSVCRT.DLL. + + The archive in which ZLIB1.DLL is bundled contains compiled + test programs that must run with a valid build of ZLIB1.DLL. + It is recommended to download the prebuilt DLL from the zlib + web site, instead of building it yourself, to avoid potential + incompatibilities that could be introduced by your compiler + and build settings. If you do build the DLL yourself, please + make sure that it complies with all the above requirements, + and it runs with the precompiled test programs, bundled with + the original ZLIB1.DLL distribution. + + If, for any reason, you need to build an incompatible DLL, + please use a different file name. + + + 2. Why did you change the name of the DLL to ZLIB1.DLL? + What happened to the old ZLIB.DLL? + + - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required + compilation settings that were incompatible to those used by + a static build. The DLL settings were supposed to be enabled + by defining the macro ZLIB_DLL, before including "zlib.h". + Incorrect handling of this macro was silently accepted at + build time, resulting in two major problems: + + * ZLIB_DLL was missing from the old makefile. When building + the DLL, not all people added it to the build options. In + consequence, incompatible incarnations of ZLIB.DLL started + to circulate around the net. + + * When switching from using the static library to using the + DLL, applications had to define the ZLIB_DLL macro and + to recompile all the sources that contained calls to zlib + functions. Failure to do so resulted in creating binaries + that were unable to run with the official ZLIB.DLL build. + + The only possible solution that we could foresee was to make + a binary-incompatible change in the DLL interface, in order to + remove the dependency on the ZLIB_DLL macro, and to release + the new DLL under a different name. + + We chose the name ZLIB1.DLL, where '1' indicates the major + zlib version number. We hope that we will not have to break + the binary compatibility again, at least not as long as the + zlib-1.x series will last. + + There is still a ZLIB_DLL macro, that can trigger a more + efficient build and use of the DLL, but compatibility no + longer dependents on it. + + + 3. Can I build ZLIB.DLL from the new zlib sources, and replace + an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier? + + - In principle, you can do it by assigning calling convention + keywords to the macros ZEXPORT and ZEXPORTVA. In practice, + it depends on what you mean by "an old ZLIB.DLL", because the + old DLL exists in several mutually-incompatible versions. + You have to find out first what kind of calling convention is + being used in your particular ZLIB.DLL build, and to use the + same one in the new build. If you don't know what this is all + about, you might be better off if you would just leave the old + DLL intact. + + + 4. Can I compile my application using the new zlib interface, and + link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or + earlier? + + - The official answer is "no"; the real answer depends again on + what kind of ZLIB.DLL you have. Even if you are lucky, this + course of action is unreliable. + + If you rebuild your application and you intend to use a newer + version of zlib (post- 1.1.4), it is strongly recommended to + link it to the new ZLIB1.DLL. + + + 5. Why are the zlib symbols exported by name, and not by ordinal? + + - Although exporting symbols by ordinal is a little faster, it + is risky. Any single glitch in the maintenance or use of the + DEF file that contains the ordinals can result in incompatible + builds and frustrating crashes. Simply put, the benefits of + exporting symbols by ordinal do not justify the risks. + + Technically, it should be possible to maintain ordinals in + the DEF file, and still export the symbols by name. Ordinals + exist in every DLL, and even if the dynamic linking performed + at the DLL startup is searching for names, ordinals serve as + hints, for a faster name lookup. However, if the DEF file + contains ordinals, the Microsoft linker automatically builds + an implib that will cause the executables linked to it to use + those ordinals, and not the names. It is interesting to + notice that the GNU linker for Win32 does not suffer from this + problem. + + It is possible to avoid the DEF file if the exported symbols + are accompanied by a "__declspec(dllexport)" attribute in the + source files. You can do this in zlib by predefining the + ZLIB_DLL macro. + + + 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling + convention. Why not use the STDCALL convention? + STDCALL is the standard convention in Win32, and I need it in + my Visual Basic project! + + (For readability, we use CDECL to refer to the convention + triggered by the "__cdecl" keyword, STDCALL to refer to + the convention triggered by "__stdcall", and FASTCALL to + refer to the convention triggered by "__fastcall".) + + - Most of the native Windows API functions (without varargs) use + indeed the WINAPI convention (which translates to STDCALL in + Win32), but the standard C functions use CDECL. If a user + application is intrinsically tied to the Windows API (e.g. + it calls native Windows API functions such as CreateFile()), + sometimes it makes sense to decorate its own functions with + WINAPI. But if ANSI C or POSIX portability is a goal (e.g. + it calls standard C functions such as fopen()), it is not a + sound decision to request the inclusion of , or to + use non-ANSI constructs, for the sole purpose to make the user + functions STDCALL-able. + + The functionality offered by zlib is not in the category of + "Windows functionality", but is more like "C functionality". + + Technically, STDCALL is not bad; in fact, it is slightly + faster than CDECL, and it works with variable-argument + functions, just like CDECL. It is unfortunate that, in spite + of using STDCALL in the Windows API, it is not the default + convention used by the C compilers that run under Windows. + The roots of the problem reside deep inside the unsafety of + the K&R-style function prototypes, where the argument types + are not specified; but that is another story for another day. + + The remaining fact is that CDECL is the default convention. + Even if an explicit convention is hard-coded into the function + prototypes inside C headers, problems may appear. The + necessity to expose the convention in users' callbacks is one + of these problems. + + The calling convention issues are also important when using + zlib in other programming languages. Some of them, like Ada + (GNAT) and Fortran (GNU G77), have C bindings implemented + initially on Unix, and relying on the C calling convention. + On the other hand, the pre- .NET versions of Microsoft Visual + Basic require STDCALL, while Borland Delphi prefers, although + it does not require, FASTCALL. + + In fairness to all possible uses of zlib outside the C + programming language, we choose the default "C" convention. + Anyone interested in different bindings or conventions is + encouraged to maintain specialized projects. The "contrib/" + directory from the zlib distribution already holds a couple + of foreign bindings, such as Ada, C++, and Delphi. + + + 7. I need a DLL for my Visual Basic project. What can I do? + + - Define the ZLIB_WINAPI macro before including "zlib.h", when + building both the DLL and the user application (except that + you don't need to define anything when using the DLL in Visual + Basic). The ZLIB_WINAPI macro will switch on the WINAPI + (STDCALL) convention. The name of this DLL must be different + than the official ZLIB1.DLL. + + Gilles Vollant has contributed a build named ZLIBWAPI.DLL, + with the ZLIB_WINAPI macro turned on, and with the minizip + functionality built in. For more information, please read + the notes inside "contrib/vstudio/readme.txt", found in the + zlib distribution. + + + 8. I need to use zlib in my Microsoft .NET project. What can I + do? + + - Henrik Ravn has contributed a .NET wrapper around zlib. Look + into contrib/dotzlib/, inside the zlib distribution. + + + 9. If my application uses ZLIB1.DLL, should I link it to + MSVCRT.DLL? Why? + + - It is not required, but it is recommended to link your + application to MSVCRT.DLL, if it uses ZLIB1.DLL. + + The executables (.EXE, .DLL, etc.) that are involved in the + same process and are using the C run-time library (i.e. they + are calling standard C functions), must link to the same + library. There are several libraries in the Win32 system: + CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc. + Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that + depend on it should also be linked to MSVCRT.DLL. + + +10. Why are you saying that ZLIB1.DLL and my application should + be linked to the same C run-time (CRT) library? I linked my + application and my DLLs to different C libraries (e.g. my + application to a static library, and my DLLs to MSVCRT.DLL), + and everything works fine. + + - If a user library invokes only pure Win32 API (accessible via + and the related headers), its DLL build will work + in any context. But if this library invokes standard C API, + things get more complicated. + + There is a single Win32 library in a Win32 system. Every + function in this library resides in a single DLL module, that + is safe to call from anywhere. On the other hand, there are + multiple versions of the C library, and each of them has its + own separate internal state. Standalone executables and user + DLLs that call standard C functions must link to a C run-time + (CRT) library, be it static or shared (DLL). Intermixing + occurs when an executable (not necessarily standalone) and a + DLL are linked to different CRTs, and both are running in the + same process. + + Intermixing multiple CRTs is possible, as long as their + internal states are kept intact. The Microsoft Knowledge Base + articles KB94248 "HOWTO: Use the C Run-Time" and KB140584 + "HOWTO: Link with the Correct C Run-Time (CRT) Library" + mention the potential problems raised by intermixing. + + If intermixing works for you, it's because your application + and DLLs are avoiding the corruption of each of the CRTs' + internal states, maybe by careful design, or maybe by fortune. + + Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such + as those provided by Borland, raises similar problems. + + +11. Why are you linking ZLIB1.DLL to MSVCRT.DLL? + + - MSVCRT.DLL exists on every Windows 95 with a new service pack + installed, or with Microsoft Internet Explorer 4 or later, and + on all other Windows 4.x or later (Windows 98, Windows NT 4, + or later). It is freely distributable; if not present in the + system, it can be downloaded from Microsoft or from other + software provider for free. + + The fact that MSVCRT.DLL does not exist on a virgin Windows 95 + is not so problematic. Windows 95 is scarcely found nowadays, + Microsoft ended its support a long time ago, and many recent + applications from various vendors, including Microsoft, do not + even run on it. Furthermore, no serious user should run + Windows 95 without a proper update installed. + + +12. Why are you not linking ZLIB1.DLL to + <> ? + + - We considered and abandoned the following alternatives: + + * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or + LIBCMT.LIB) is not a good option. People are using the DLL + mainly to save disk space. If you are linking your program + to a static C library, you may as well consider linking zlib + in statically, too. + + * Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because + CRTDLL.DLL is present on every Win32 installation. + Unfortunately, it has a series of problems: it does not + work properly with Microsoft's C++ libraries, it does not + provide support for 64-bit file offsets, (and so on...), + and Microsoft discontinued its support a long time ago. + + * Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied + with the Microsoft .NET platform, and Visual C++ 7.0/7.1, + raises problems related to the status of ZLIB1.DLL as a + system component. According to the Microsoft Knowledge Base + article KB326922 "INFO: Redistribution of the Shared C + Runtime Component in Visual C++ .NET", MSVCR70.DLL and + MSVCR71.DLL are not supposed to function as system DLLs, + because they may clash with MSVCRT.DLL. Instead, the + application's installer is supposed to put these DLLs + (if needed) in the application's private directory. + If ZLIB1.DLL depends on a non-system runtime, it cannot + function as a redistributable system component. + + * Linking ZLIB1.DLL to non-Microsoft runtimes, such as + Borland's, or Cygwin's, raises problems related to the + reliable presence of these runtimes on Win32 systems. + It's easier to let the DLL build of zlib up to the people + who distribute these runtimes, and who may proceed as + explained in the answer to Question 14. + + +13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL, + how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0 + (Visual Studio .NET) or newer? + + - Due to the problems explained in the Microsoft Knowledge Base + article KB326922 (see the previous answer), the C runtime that + comes with the VC7 environment is no longer considered a + system component. That is, it should not be assumed that this + runtime exists, or may be installed in a system directory. + Since ZLIB1.DLL is supposed to be a system component, it may + not depend on a non-system component. + + In order to link ZLIB1.DLL and your application to MSVCRT.DLL + in VC7, you need the library of Visual C++ 6.0 or older. If + you don't have this library at hand, it's probably best not to + use ZLIB1.DLL. + + We are hoping that, in the future, Microsoft will provide a + way to build applications linked to a proper system runtime, + from the Visual C++ environment. Until then, you have a + couple of alternatives, such as linking zlib in statically. + If your application requires dynamic linking, you may proceed + as explained in the answer to Question 14. + + +14. I need to link my own DLL build to a CRT different than + MSVCRT.DLL. What can I do? + + - Feel free to rebuild the DLL from the zlib sources, and link + it the way you want. You should, however, clearly state that + your build is unofficial. You should give it a different file + name, and/or install it in a private directory that can be + accessed by your application only, and is not visible to the + others (e.g. it's not in the SYSTEM or the SYSTEM32 directory, + and it's not in the PATH). Otherwise, your build may clash + with applications that link to the official build. + + For example, in Cygwin, zlib is linked to the Cygwin runtime + CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. + + +15. May I include additional pieces of code that I find useful, + link them in ZLIB1.DLL, and export them? + + - No. A legitimate build of ZLIB1.DLL must not include code + that does not originate from the official zlib source code. + But you can make your own private DLL build, under a different + file name, as suggested in the previous answer. + + For example, zlib is a part of the VCL library, distributed + with Borland Delphi and C++ Builder. The DLL build of VCL + is a redistributable file, named VCLxx.DLL. + + +16. May I remove some functionality out of ZLIB1.DLL, by enabling + macros like NO_GZCOMPRESS or NO_GZIP at compile time? + + - No. A legitimate build of ZLIB1.DLL must provide the complete + zlib functionality, as implemented in the official zlib source + code. But you can make your own private DLL build, under a + different file name, as suggested in the previous answer. + + +17. I made my own ZLIB1.DLL build. Can I test it for compliance? + + - We prefer that you download the official DLL from the zlib + web site. If you need something peculiar from this DLL, you + can send your suggestion to the zlib mailing list. + + However, in case you do rebuild the DLL yourself, you can run + it with the test programs found in the DLL distribution. + Running these test programs is not a guarantee of compliance, + but a failure can imply a detected problem. + +** + +This document is written and maintained by +Cosmin Truta diff --git a/compat/zlib/win32/Makefile.bor b/compat/zlib/win32/Makefile.bor new file mode 100644 index 0000000..b802519 --- /dev/null +++ b/compat/zlib/win32/Makefile.bor @@ -0,0 +1,107 @@ +# Makefile for zlib +# Borland C++ for Win32 +# +# Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003 +# Last updated: 28-Aug-2003 +# +# Usage: +# make -f win32/Makefile.bor +# make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj + +# ------------ Borland C++ ------------ + +# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) +# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or +# added to the declaration of LOC here: +LOC = $(LOCAL_ZLIB) + +CC = bcc32 +AS = bcc32 +LD = bcc32 +AR = tlib +CFLAGS = -a -d -k- -O2 $(LOC) +ASFLAGS = $(LOC) +LDFLAGS = $(LOC) + + +# variables +ZLIB_LIB = zlib.lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj +OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +#OBJA = +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj +OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj +#OBJPA= + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $< + +.asm.obj: + $(AS) -c $(ASFLAGS) $< + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzio.obj: gzio.c zutil.h zlib.h zconf.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: example.c zlib.h zconf.h + +minigzip.obj: minigzip.c zlib.h zconf.h + + +# For the sake of the old Borland make, +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + $(AR) $(ZLIB_LIB) $(OBJPA) + + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + + +# cleanup +clean: + -del *.obj + -del *.lib + -del *.exe + -del *.tds + -del zlib.bak + -del foo.gz diff --git a/compat/zlib/win32/Makefile.emx b/compat/zlib/win32/Makefile.emx new file mode 100644 index 0000000..7b08424 --- /dev/null +++ b/compat/zlib/win32/Makefile.emx @@ -0,0 +1,69 @@ +# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98. +# Copyright (C) 1995-1998 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type: +# +# make -fmakefile.emx; make test -fmakefile.emx +# + +CC=gcc -Zwin32 + +#CFLAGS=-MMD -O +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-MMD -g -DDEBUG +CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ + -Wstrict-prototypes -Wmissing-prototypes + +# If cp.exe is available, replace "copy /Y" with "cp -fp" . +CP=copy /Y +# If gnu install.exe is available, replace $(CP) with ginstall. +INSTALL=$(CP) +# The default value of RM is "rm -f." If "rm.exe" is found, comment out: +RM=del +LDLIBS=-L. -lzlib +LD=$(CC) -s -o +LDSHARED=$(CC) + +INCL=zlib.h zconf.h +LIBS=zlib.a + +AR=ar rcs + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infback.o inftrees.o inffast.o + +TEST_OBJS = example.o minigzip.o + +all: example.exe minigzip.exe + +test: all + ./example + echo hello world | .\minigzip | .\minigzip -d + +%.o : %.c + $(CC) $(CFLAGS) -c $< -o $@ + +zlib.a: $(OBJS) + $(AR) $@ $(OBJS) + +%.exe : %.o $(LIBS) + $(LD) $@ $< $(LDLIBS) + + +.PHONY : clean + +clean: + $(RM) *.d + $(RM) *.o + $(RM) *.exe + $(RM) zlib.a + $(RM) foo.gz + +DEPS := $(wildcard *.d) +ifneq ($(DEPS),) +include $(DEPS) +endif diff --git a/compat/zlib/win32/Makefile.gcc b/compat/zlib/win32/Makefile.gcc new file mode 100644 index 0000000..62a8430 --- /dev/null +++ b/compat/zlib/win32/Makefile.gcc @@ -0,0 +1,141 @@ +# Makefile for zlib, derived from Makefile.dj2. +# Modified for mingw32 by C. Spieler, 6/16/98. +# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003. +# Last updated: 1-Aug-2003. +# Tested under Cygwin and MinGW. + +# Copyright (C) 1995-2003 Jean-loup Gailly. +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile, or to compile and test, type: +# +# make -fmakefile.gcc; make test testdll -fmakefile.gcc +# +# To use the asm code, type: +# cp contrib/asm?86/match.S ./match.S +# make LOC=-DASMV OBJA=match.o -fmakefile.gcc +# +# To install libz.a, zconf.h and zlib.h in the system directories, type: +# +# make install -fmakefile.gcc + +# Note: +# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN), +# the DLL name should be changed from "zlib1.dll". + +STATICLIB = libz.a +SHAREDLIB = zlib1.dll +IMPLIB = libzdll.a + +#LOC = -DASMV +#LOC = -DDEBUG -g + +CC = gcc +CFLAGS = $(LOC) -O3 -Wall + +AS = $(CC) +ASFLAGS = $(LOC) -Wall + +LD = $(CC) +LDFLAGS = $(LOC) -s + +AR = ar +ARFLAGS = rcs + +RC = windres +RCFLAGS = --define GCC_WINDRES + +CP = cp -fp +# If GNU install is available, replace $(CP) with install. +INSTALL = $(CP) +RM = rm -f + +prefix = /usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \ + inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o +OBJA = + +all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d + +test: example minigzip + ./example + echo hello world | ./minigzip | ./minigzip -d + +testdll: example_d minigzip_d + ./example_d + echo hello world | ./minigzip_d | ./minigzip_d -d + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< + +.S.o: + $(AS) $(ASFLAGS) -c -o $@ $< + +$(STATICLIB): $(OBJS) $(OBJA) + $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA) + +$(IMPLIB): $(SHAREDLIB) + +$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o + dllwrap --driver-name $(CC) --def win32/zlib.def \ + --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o + strip $@ + +example: example.o $(STATICLIB) + $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) + +minigzip: minigzip.o $(STATICLIB) + $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB) + +example_d: example.o $(IMPLIB) + $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB) + +minigzip_d: minigzip.o $(IMPLIB) + $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB) + +zlibrc.o: win32/zlib1.rc + $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc + + +# INCLUDE_PATH and LIBRARY_PATH must be set. + +.PHONY: install uninstall clean + +install: zlib.h zconf.h $(LIB) + -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH) + -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH) + -$(INSTALL) zlib.h $(INCLUDE_PATH) + -$(INSTALL) zconf.h $(INCLUDE_PATH) + -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH) + -$(INSTALL) $(IMPLIB) $(LIBRARY_PATH) + +uninstall: + -$(RM) $(INCLUDE_PATH)/zlib.h + -$(RM) $(INCLUDE_PATH)/zconf.h + -$(RM) $(LIBRARY_PATH)/$(STATICLIB) + -$(RM) $(LIBRARY_PATH)/$(IMPLIB) + +clean: + -$(RM) $(STATICLIB) + -$(RM) $(SHAREDLIB) + -$(RM) $(IMPLIB) + -$(RM) *.o + -$(RM) *.exe + -$(RM) foo.gz + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: crc32.h zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +example.o: zlib.h zconf.h +gzio.o: zutil.h zlib.h zconf.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +minigzip.o: zlib.h zconf.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/compat/zlib/win32/Makefile.msc b/compat/zlib/win32/Makefile.msc new file mode 100644 index 0000000..528ecaa --- /dev/null +++ b/compat/zlib/win32/Makefile.msc @@ -0,0 +1,126 @@ +# Makefile for zlib -- Microsoft (Visual) C +# +# Authors: +# Cosmin Truta, 11-Mar-2003 +# Christian Spieler, 19-Mar-2003 +# +# Last updated: +# Cosmin Truta, 27-Aug-2003 +# +# Usage: +# nmake -f win32/Makefile.msc (standard build) +# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build) +# nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj (use ASM code) + + +# optional build flags +LOC = + + +# variables +STATICLIB = zlib.lib +SHAREDLIB = zlib1.dll +IMPLIB = zdll.lib + +CC = cl +AS = ml +LD = link +AR = lib +RC = rc +CFLAGS = -nologo -MD -O2 $(LOC) +ASFLAGS = -coff +LDFLAGS = -nologo -release +ARFLAGS = -nologo +RCFLAGS = /dWIN32 /r + +OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \ + inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJA = + + +# targets +all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \ + example.exe minigzip.exe example_d.exe minigzip_d.exe + +$(STATICLIB): $(OBJS) $(OBJA) + $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA) + +$(IMPLIB): $(SHAREDLIB) + +$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res + $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \ + -out:$@ $(OBJS) $(OBJA) zlib1.res + +example.exe: example.obj $(STATICLIB) + $(LD) $(LDFLAGS) example.obj $(STATICLIB) + +minigzip.exe: minigzip.obj $(STATICLIB) + $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB) + +example_d.exe: example.obj $(IMPLIB) + $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB) + +minigzip_d.exe: minigzip.obj $(IMPLIB) + $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB) + +.c.obj: + $(CC) -c $(CFLAGS) $< + +.asm.obj: + $(AS) -c $(ASFLAGS) $< + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzio.obj: gzio.c zutil.h zlib.h zconf.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: example.c zlib.h zconf.h + +minigzip.obj: minigzip.c zlib.h zconf.h + +zlib1.res: win32/zlib1.rc + $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc + + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +testdll: example_d.exe minigzip_d.exe + example_d + echo hello world | minigzip_d | minigzip_d -d + + +# cleanup +clean: + -del $(STATICLIB) + -del $(SHAREDLIB) + -del $(IMPLIB) + -del *.obj + -del *.res + -del *.exp + -del *.exe + -del foo.gz diff --git a/compat/zlib/win32/VisualC.txt b/compat/zlib/win32/VisualC.txt new file mode 100644 index 0000000..579a5fc --- /dev/null +++ b/compat/zlib/win32/VisualC.txt @@ -0,0 +1,3 @@ + +To build zlib using the Microsoft Visual C++ environment, +use the appropriate project from the projects/ directory. diff --git a/compat/zlib/win32/zlib.def b/compat/zlib/win32/zlib.def new file mode 100644 index 0000000..a47cbc1 --- /dev/null +++ b/compat/zlib/win32/zlib.def @@ -0,0 +1,60 @@ +LIBRARY +; zlib data compression library + +EXPORTS +; basic functions + zlibVersion + deflate + deflateEnd + inflate + inflateEnd +; advanced functions + deflateSetDictionary + deflateCopy + deflateReset + deflateParams + deflateBound + deflatePrime + inflateSetDictionary + inflateSync + inflateCopy + inflateReset + inflateBack + inflateBackEnd + zlibCompileFlags +; utility functions + compress + compress2 + compressBound + uncompress + gzopen + gzdopen + gzsetparams + gzread + gzwrite + gzprintf + gzputs + gzgets + gzputc + gzgetc + gzungetc + gzflush + gzseek + gzrewind + gztell + gzeof + gzclose + gzerror + gzclearerr +; checksum functions + adler32 + crc32 +; various hacks, don't look :) + deflateInit_ + deflateInit2_ + inflateInit_ + inflateInit2_ + inflateBackInit_ + inflateSyncPoint + get_crc_table + zError diff --git a/compat/zlib/win32/zlib1.rc b/compat/zlib/win32/zlib1.rc new file mode 100644 index 0000000..99025c9 --- /dev/null +++ b/compat/zlib/win32/zlib1.rc @@ -0,0 +1,39 @@ +#include + +#ifdef GCC_WINDRES +VS_VERSION_INFO VERSIONINFO +#else +VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE +#endif + FILEVERSION 1,2,2,0 + PRODUCTVERSION 1,2,2,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS 1 +#else + FILEFLAGS 0 +#endif + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + BEGIN + VALUE "FileDescription", "zlib data compression library\0" + VALUE "FileVersion", "1.2.3\0" + VALUE "InternalName", "zlib1.dll\0" + VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0" + VALUE "OriginalFilename", "zlib1.dll\0" + VALUE "ProductName", "zlib\0" + VALUE "ProductVersion", "1.2.3\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/compat/zlib/zconf.h b/compat/zlib/zconf.h new file mode 100644 index 0000000..0b73561 --- /dev/null +++ b/compat/zlib/zconf.h @@ -0,0 +1,332 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zconf.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ +#ifdef Z_PREFIX +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define deflateBound z_deflateBound +# define deflatePrime z_deflatePrime +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateCopy z_inflateCopy +# define inflateReset z_inflateReset +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table +# define zError z_zError + +# define alloc_func z_alloc_func +# define free_func z_free_func +# define in_func z_in_func +# define out_func z_out_func +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# define z_off_t off_t +#endif +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +#if defined(__OS400__) +# define NO_vsnprintf +#endif + +#if defined(__MVS__) +# define NO_vsnprintf +# ifdef FAR +# undef FAR +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) +# pragma map(deflateInit_,"DEIN") +# pragma map(deflateInit2_,"DEIN2") +# pragma map(deflateEnd,"DEEND") +# pragma map(deflateBound,"DEBND") +# pragma map(inflateInit_,"ININ") +# pragma map(inflateInit2_,"ININ2") +# pragma map(inflateEnd,"INEND") +# pragma map(inflateSync,"INSY") +# pragma map(inflateSetDictionary,"INSEDI") +# pragma map(compressBound,"CMBND") +# pragma map(inflate_table,"INTABL") +# pragma map(inflate_fast,"INFA") +# pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/compat/zlib/zconf.in.h b/compat/zlib/zconf.in.h new file mode 100644 index 0000000..49595cc --- /dev/null +++ b/compat/zlib/zconf.in.h @@ -0,0 +1,332 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zconf.in.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ +#ifdef Z_PREFIX +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define deflateBound z_deflateBound +# define deflatePrime z_deflatePrime +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateCopy z_inflateCopy +# define inflateReset z_inflateReset +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table +# define zError z_zError + +# define alloc_func z_alloc_func +# define free_func z_free_func +# define in_func z_in_func +# define out_func z_out_func +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# define z_off_t off_t +#endif +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +#if defined(__OS400__) +# define NO_vsnprintf +#endif + +#if defined(__MVS__) +# define NO_vsnprintf +# ifdef FAR +# undef FAR +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) +# pragma map(deflateInit_,"DEIN") +# pragma map(deflateInit2_,"DEIN2") +# pragma map(deflateEnd,"DEEND") +# pragma map(deflateBound,"DEBND") +# pragma map(inflateInit_,"ININ") +# pragma map(inflateInit2_,"ININ2") +# pragma map(inflateEnd,"INEND") +# pragma map(inflateSync,"INSY") +# pragma map(inflateSetDictionary,"INSEDI") +# pragma map(compressBound,"CMBND") +# pragma map(inflate_table,"INTABL") +# pragma map(inflate_fast,"INFA") +# pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/compat/zlib/zlib.3 b/compat/zlib/zlib.3 new file mode 100644 index 0000000..90b8162 --- /dev/null +++ b/compat/zlib/zlib.3 @@ -0,0 +1,159 @@ +.TH ZLIB 3 "18 July 2005" +.SH NAME +zlib \- compression/decompression library +.SH SYNOPSIS +[see +.I zlib.h +for full description] +.SH DESCRIPTION +The +.I zlib +library is a general purpose data compression library. +The code is thread safe. +It provides in-memory compression and decompression functions, +including integrity checks of the uncompressed data. +This version of the library supports only one compression method (deflation) +but other algorithms will be added later +and will have the same stream interface. +.LP +Compression can be done in a single step if the buffers are large enough +(for example if an input file is mmap'ed), +or can be done by repeated calls of the compression function. +In the latter case, +the application must provide more input and/or consume the output +(providing more output space) before each call. +.LP +The library also supports reading and writing files in +.IR gzip (1) +(.gz) format +with an interface similar to that of stdio. +.LP +The library does not install any signal handler. +The decoder checks the consistency of the compressed data, +so the library should never crash even in case of corrupted input. +.LP +All functions of the compression library are documented in the file +.IR zlib.h . +The distribution source includes examples of use of the library +in the files +.I example.c +and +.IR minigzip.c . +.LP +Changes to this version are documented in the file +.I ChangeLog +that accompanies the source, +and are concerned primarily with bug fixes and portability enhancements. +.LP +A Java implementation of +.I zlib +is available in the Java Development Kit 1.1: +.IP +http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html +.LP +A Perl interface to +.IR zlib , +written by Paul Marquess (pmqs@cpan.org), +is available at CPAN (Comprehensive Perl Archive Network) sites, +including: +.IP +http://www.cpan.org/modules/by-module/Compress/ +.LP +A Python interface to +.IR zlib , +written by A.M. Kuchling (amk@magnet.com), +is available in Python 1.5 and later versions: +.IP +http://www.python.org/doc/lib/module-zlib.html +.LP +A +.I zlib +binding for +.IR tcl (1), +written by Andreas Kupries (a.kupries@westend.com), +is availlable at: +.IP +http://www.westend.com/~kupries/doc/trf/man/man.html +.LP +An experimental package to read and write files in .zip format, +written on top of +.I zlib +by Gilles Vollant (info@winimage.com), +is available at: +.IP +http://www.winimage.com/zLibDll/unzip.html +and also in the +.I contrib/minizip +directory of the main +.I zlib +web site. +.SH "SEE ALSO" +The +.I zlib +web site can be found at either of these locations: +.IP +http://www.zlib.org +.br +http://www.gzip.org/zlib/ +.LP +The data format used by the zlib library is described by RFC +(Request for Comments) 1950 to 1952 in the files: +.IP +http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format) +.br +http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format) +.br +http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format) +.LP +These documents are also available in other formats from: +.IP +ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html +.LP +Mark Nelson (markn@ieee.org) wrote an article about +.I zlib +for the Jan. 1997 issue of Dr. Dobb's Journal; +a copy of the article is available at: +.IP +http://dogma.net/markn/articles/zlibtool/zlibtool.htm +.SH "REPORTING PROBLEMS" +Before reporting a problem, +please check the +.I zlib +web site to verify that you have the latest version of +.IR zlib ; +otherwise, +obtain the latest version and see if the problem still exists. +Please read the +.I zlib +FAQ at: +.IP +http://www.gzip.org/zlib/zlib_faq.html +.LP +before asking for help. +Send questions and/or comments to zlib@gzip.org, +or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). +.SH AUTHORS +Version 1.2.3 +Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org) +and Mark Adler (madler@alumni.caltech.edu). +.LP +This software is provided "as-is," +without any express or implied warranty. +In no event will the authors be held liable for any damages +arising from the use of this software. +See the distribution directory with respect to requirements +governing redistribution. +The deflate format used by +.I zlib +was defined by Phil Katz. +The deflate and +.I zlib +specifications were written by L. Peter Deutsch. +Thanks to all the people who reported problems and suggested various +improvements in +.IR zlib ; +who are too numerous to cite here. +.LP +UNIX manual page by R. P. C. Rodgers, +U.S. National Library of Medicine (rodgers@nlm.nih.gov). +.\" end of man page diff --git a/compat/zlib/zlib.h b/compat/zlib/zlib.h new file mode 100644 index 0000000..0228179 --- /dev/null +++ b/compat/zlib/zlib.h @@ -0,0 +1,1357 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.3, July 18th, 2005 + + Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt + (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). +*/ + +#ifndef ZLIB_H +#define ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.2.3" +#define ZLIB_VERNUM 0x1230 + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed + data. This version of the library supports only one compression method + (deflation) but other algorithms will be added later and will have the same + stream interface. + + Compression can be done in a single step if the buffers are large + enough (for example if an input file is mmap'ed), or can be done by + repeated calls of the compression function. In the latter case, the + application must provide more input and/or consume the output + (providing more output space) before each call. + + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip streams in memory as well. + + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never + crash even in case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total nb of input bytes read so far */ + + Bytef *next_out; /* next output byte should be put there */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total nb of bytes output so far */ + + char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: binary or text */ + uLong adler; /* adler32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used + when writing a gzip file) */ +} gz_header; + +typedef gz_header FAR *gz_headerp; + +/* + The application must update next_in and avail_in when avail_in has + dropped to zero. It must update next_out and avail_out when avail_out + has dropped to zero. The application must initialize zalloc, zfree and + opaque before calling the init function. All other fields are set by the + compression library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this + if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, + pointers returned by zalloc for objects of exactly 65536 bytes *must* + have their offset normalized to zero. The default allocation function + provided by this library ensures this (see zutil.c). To reduce memory + requirements and avoid any allocation of 64K objects, at the expense of + compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or + progress reports. After compression, total_in holds the total size of + the uncompressed data and may be saved for use in the decompressor + (particularly if the decompressor wants to decompress everything in + a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +#define Z_BLOCK 5 +/* Allowed flush values; see deflate() and inflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative + * values are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_RLE 3 +#define Z_FIXED 4 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_TEXT 1 +#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ +#define Z_UNKNOWN 2 +/* Possible values of the data_type field (though see inflate()) */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. deflateInit does not + perform any compression: this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce some + output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). + Some output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating avail_in or avail_out accordingly; avail_out + should never be zero before the call. The application can consume the + compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK + and with zero avail_out, it must be called again after making room in the + output buffer because there might be more output pending. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumualte before producing output, in order to + maximize compression. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In particular + avail_in is zero after the call if enough output space has been provided + before the call.) Flushing may degrade compression for some compression + algorithms and so it should be used only when necessary. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six to avoid repeated flush markers due to + avail_out == 0 on return. + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there + was enough output space; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the + stream are deflateReset or deflateEnd. + + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least + the value returned by deflateBound (see below). If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + deflate() sets strm->adler to the adler32 checksum of all input read + so far (that is, total_in bytes). + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered + binary. This field is only for information purposes and does not affect + the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not + fatal, and deflate() can be called again with more input and more output + space to continue compressing. +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, + msg may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing + will resume at this point for the next call of inflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there + is no more input data or no more space in the output buffer (see below + about the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating the next_* and avail_* values accordingly. + The application can consume the uncompressed output when it wants, for + example when the output buffer is full (avail_out == 0), or after each + call of inflate(). If inflate returns Z_OK and with zero avail_out, it + must be called again after making room in the output buffer because there + might be more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, + Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() stop + if and when it gets to the next deflate block boundary. When decoding the + zlib or gzip format, this will cause inflate() to return immediately after + the header and before the first block. When doing a raw inflate, inflate() + will go ahead and process the first block, and will return when it gets to + the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + Also to assist in this, on return inflate() will set strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 + if inflate() is currently decoding the last block in the deflate stream, + plus 128 if inflate() returned immediately after decoding an end-of-block + code or decoding the complete header up to just before the first byte of the + deflate stream. The end-of-block will not be indicated until all of the + uncompressed data from that block has been written to strm->next_out. The + number of unused bits may in general be greater than seven, except when + bit 7 of data_type is set, in which case the number of unused bits will be + less than eight. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step + (a single call of inflate), the parameter flush should be set to + Z_FINISH. In this case all pending input is processed and all pending + output is flushed; avail_out must be large enough to hold all the + uncompressed data. (The size of the uncompressed data may have been saved + by the compressor for this purpose.) The next operation on this stream must + be inflateEnd to deallocate the decompression state. The use of Z_FINISH + is never required, but can be used to inform inflate that a faster approach + may be used for the single inflate() call. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the only effect of the flush parameter in this implementation + is on the return value of inflate(), as noted below, or when it returns early + because Z_BLOCK is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the adler32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the adler32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed adler32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() will decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically. Any information + contained in the gzip header is not retained, so applications that need that + information should instead use raw inflate, see inflateInit2() below, or + inflateBack() and perform their own processing of the gzip header and + trailer. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect check + value), Z_STREAM_ERROR if the stream structure was inconsistent (for example + if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, + Z_BUF_ERROR if no progress is possible or if there was not enough room in the + output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may then + call inflateSync() to look for a good compression block if a partial recovery + of the data is desired. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +*/ + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute an adler32 check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), + no header crc, and the operating system will be set to 255 (unknown). If a + gzip stream is being written, strm->adler is a crc32 instead of an adler32. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as + Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy + parameter only affects the compression ratio but not the correctness of the + compressed output even if it is not set appropriately. Z_FIXED prevents the + use of dynamic Huffman codes, allowing for a simpler decoder for special + applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. deflateInit2 does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any + call of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size in + deflate or deflate2. Thus the strings most likely to be useful should be + put at the end of the dictionary, not at the front. In addition, the + current implementation of deflate will use at most the window size minus + 262 bytes of the provided dictionary. + + Upon return of this function, strm->adler is set to the adler32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) If a raw deflate was requested, then the + adler32 value is not computed and strm->adler is not set. + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and + can consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. + The stream will keep the same compression level and any other attributes + that may have been set by deflateInit2. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different + strategy. If the compression level is changed, the input available so far + is compressed with the old level (and may be flushed); the new level will + take effect only at the next call of deflate(). + + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to + be compressed and flushed. In particular, strm->avail_out must be non-zero. + + deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR + if strm->avail_out was zero. +*/ + +ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain)); +/* + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2(), and + returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ + +ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, + uLong sourceLen)); +/* + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() + or deflateInit2(). This would be used to allocate an output buffer + for deflation in a single pass, and so would be called before deflate(). +*/ + +ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the + bits leftover from a previous deflate stream when appending to it. As such, + this function can only be used for raw deflate, and must be used before the + first deflate() call after a deflateInit2() or deflateReset(). bits must be + less than or equal to 16, and that many of the least significant bits of + value will be inserted in the output. + + deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, + gz_headerp head)); +/* + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to 255, with no extra, name, or comment + fields. The gzip header is returned to the default state by deflateReset(). + + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an adler32 or a crc32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is + a crc32 instead of an adler32. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg + is set to null if there is no error message. inflateInit2 does not perform + any decompression apart from reading the zlib header if present: this will + be done by inflate(). (So next_in and avail_in may be modified, but next_out + and avail_out are unchanged.) +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the adler32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called + immediately after inflateInit2() or inflateReset() and before any call of + inflate() to set the dictionary. The application must insure that the + dictionary that was used for compression is provided. + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect adler32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been found, + or Z_STREAM_ERROR if the stream structure was inconsistent. In the success + case, the application may save the current current value of total_in which + indicates where valid compressed data was found. In the error case, the + application may repeatedly call inflateSync, providing more input each time, + until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. + The stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ + +ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, + gz_headerp head)); +/* + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK can be used to + force inflate() to return immediately after header processing is complete + and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When + any of extra, name, or comment are not Z_NULL and the respective field is + not present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, + unsigned char FAR *window)); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the paramaters are invalid, Z_MEM_ERROR if the internal state could not + be allocated, or Z_VERSION_ERROR if the version of the library does not + match the version of the header file. +*/ + +typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); +typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); + +ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); +/* + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is more efficient than inflate() for + file i/o applications in that it avoids copying between the output and the + sliding window by simply making the window itself the output buffer. This + function trusts the application to not change the output buffer passed by + the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free + the allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects + only the raw deflate stream to decompress. This is different from the + normal behavior of inflate(), which expects either a zlib or gzip header and + trailer around the deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero--buf is ignored in that + case--and inflateBack() will return a buffer error. inflateBack() will call + out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() + should return zero on success, or non-zero on failure. If out() returns + non-zero, inflateBack() will return with an error. Neither in() nor out() + are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format + error in the deflate stream (in which case strm->msg is set to indicate the + nature of the error), or Z_STREAM_ERROR if the stream was not properly + initialized. In the case of Z_BUF_ERROR, an input or output error can be + distinguished using strm->next_in which will be Z_NULL only if in() returned + an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to + out() returning non-zero. (in() will always be called before out(), so + strm->next_in is assured to be defined if out() returns non-zero.) Note + that inflateBack() cannot return Z_OK. +*/ + +ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +/* + All memory allocated by inflateBackInit() is freed. + + inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ + +ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +/* Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + */ + + + /* utility functions */ + +/* + The following utility functions are implemented on top of the + basic stream-oriented functions. To simplify the interface, some + default options are assumed (compression level and memory usage, + standard memory allocation functions). The source code of these + utility functions can easily be modified if you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least the value returned + by compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed buffer. + This function can be used to compress a whole file at once if the + input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +/* + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before + a compress() or compress2() call to allocate the destination buffer. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. +*/ + + +typedef voidp gzFile; + +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +/* + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb") but can also include a compression level + ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for + Huffman only compression as in "wb1h", or 'R' for run-length encoding + as in "wb1R". (See the description of deflateInit2 for more information + about the strategy parameter.) + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. + + gzopen returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). */ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen() associates a gzFile with the file descriptor fd. File + descriptors are obtained from calls like open, dup, creat, pipe or + fileno (in the file has been previously opened with fopen). + The mode parameter is as in gzopen. + The next call of gzclose on the returned gzFile will also close the + file descriptor fd, just like fclose(fdopen(fd), mode) closes the file + descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). + gzdopen returns NULL if there was insufficient memory to allocate + the (de)compression state. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Reads the given number of uncompressed bytes from the compressed file. + If the input file was not in gzip format, gzread copies the given number + of bytes into the buffer. + gzread returns the number of uncompressed bytes actually read (0 for + end of file, -1 for error). */ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + voidpc buf, unsigned len)); +/* + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes actually written + (0 in case of error). +*/ + +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +/* + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). The number of + uncompressed bytes written is limited to 4095. The caller should assure that + this limit is not exceeded. If it is exceeded, then gzprintf() will return + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf() + because the secure snprintf() or vsnprintf() functions were not available. +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Reads bytes from the compressed file until len-1 characters are read, or + a newline character is read and transferred to buf, or an end-of-file + condition is encountered. The string is then terminated with a null + character. + gzgets returns buf, or Z_NULL in case of error. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +*/ + +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +/* + Push one character back onto the stream to be read again later. + Only one character of push-back is allowed. gzungetc() returns the + character pushed, or -1 on failure. gzungetc() will fail if a + character has been pushed but not read yet, or if c is -1. The pushed + character will be discarded if the stream is repositioned with gzseek() + or gzrewind(). +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. The return value is the zlib + error number (see function gzerror below). gzflush returns Z_OK if + the flush parameter is Z_FINISH and all output could be flushed. + gzflush should be called only when strictly necessary because it can + degrade compression. +*/ + +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); +/* + Sets the starting position for the next gzread or gzwrite on the + given compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +*/ + +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +/* + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ + +ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +/* + Returns 1 if file is being read directly without decompression, otherwise + zero. +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. The return value is the zlib + error number (see function gzerror below). +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +*/ + +ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +/* + Clears the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. +*/ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the + compression library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is NULL, this function returns + the required initial value for the checksum. + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, + z_off_t len2)); +/* + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. If buf is NULL, this function returns the required initial + value for the for the crc. Pre- and post-conditioning (one's complement) is + performed within this function so it shouldn't be done by the application. + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); + +/* + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 + check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and + len2. +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size)); +#define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +#define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) +#define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, sizeof(z_stream)) + + +#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; /* hack for buggy compilers */ +#endif + +ZEXTERN const char * ZEXPORT zError OF((int)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); + +#ifdef __cplusplus +} +#endif + +#endif /* ZLIB_H */ diff --git a/compat/zlib/zutil.c b/compat/zlib/zutil.c new file mode 100644 index 0000000..e97d051 --- /dev/null +++ b/compat/zlib/zutil.c @@ -0,0 +1,318 @@ +/* zutil.c -- target dependent utility functions for the compression library + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zutil.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#include "zutil.h" + +#ifndef NO_DUMMY_DECL +struct internal_state {int dummy;}; /* for buggy compilers */ +#endif + +const char * const z_errmsg[10] = { +"need dictionary", /* Z_NEED_DICT 2 */ +"stream end", /* Z_STREAM_END 1 */ +"", /* Z_OK 0 */ +"file error", /* Z_ERRNO (-1) */ +"stream error", /* Z_STREAM_ERROR (-2) */ +"data error", /* Z_DATA_ERROR (-3) */ +"insufficient memory", /* Z_MEM_ERROR (-4) */ +"buffer error", /* Z_BUF_ERROR (-5) */ +"incompatible version",/* Z_VERSION_ERROR (-6) */ +""}; + + +const char * ZEXPORT zlibVersion() +{ + return ZLIB_VERSION; +} + +uLong ZEXPORT zlibCompileFlags() +{ + uLong flags; + + flags = 0; + switch (sizeof(uInt)) { + case 2: break; + case 4: flags += 1; break; + case 8: flags += 2; break; + default: flags += 3; + } + switch (sizeof(uLong)) { + case 2: break; + case 4: flags += 1 << 2; break; + case 8: flags += 2 << 2; break; + default: flags += 3 << 2; + } + switch (sizeof(voidpf)) { + case 2: break; + case 4: flags += 1 << 4; break; + case 8: flags += 2 << 4; break; + default: flags += 3 << 4; + } + switch (sizeof(z_off_t)) { + case 2: break; + case 4: flags += 1 << 6; break; + case 8: flags += 2 << 6; break; + default: flags += 3 << 6; + } +#ifdef DEBUG + flags += 1 << 8; +#endif +#if defined(ASMV) || defined(ASMINF) + flags += 1 << 9; +#endif +#ifdef ZLIB_WINAPI + flags += 1 << 10; +#endif +#ifdef BUILDFIXED + flags += 1 << 12; +#endif +#ifdef DYNAMIC_CRC_TABLE + flags += 1 << 13; +#endif +#ifdef NO_GZCOMPRESS + flags += 1L << 16; +#endif +#ifdef NO_GZIP + flags += 1L << 17; +#endif +#ifdef PKZIP_BUG_WORKAROUND + flags += 1L << 20; +#endif +#ifdef FASTEST + flags += 1L << 21; +#endif +#ifdef STDC +# ifdef NO_vsnprintf + flags += 1L << 25; +# ifdef HAS_vsprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_vsnprintf_void + flags += 1L << 26; +# endif +# endif +#else + flags += 1L << 24; +# ifdef NO_snprintf + flags += 1L << 25; +# ifdef HAS_sprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_snprintf_void + flags += 1L << 26; +# endif +# endif +#endif + return flags; +} + +#ifdef DEBUG + +# ifndef verbose +# define verbose 0 +# endif +int z_verbose = verbose; + +void z_error (m) + char *m; +{ + fprintf(stderr, "%s\n", m); + exit(1); +} +#endif + +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(err) + int err; +{ + return ERR_MSG(err); +} + +#if defined(_WIN32_WCE) + /* The Microsoft C Run-Time Library for Windows CE doesn't have + * errno. We define it as a global variable to simplify porting. + * Its value is always 0 and should not be used. + */ + int errno = 0; +#endif + +#ifndef HAVE_MEMCPY + +void zmemcpy(dest, source, len) + Bytef* dest; + const Bytef* source; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = *source++; /* ??? to be unrolled */ + } while (--len != 0); +} + +int zmemcmp(s1, s2, len) + const Bytef* s1; + const Bytef* s2; + uInt len; +{ + uInt j; + + for (j = 0; j < len; j++) { + if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; + } + return 0; +} + +void zmemzero(dest, len) + Bytef* dest; + uInt len; +{ + if (len == 0) return; + do { + *dest++ = 0; /* ??? to be unrolled */ + } while (--len != 0); +} +#endif + + +#ifdef SYS16BIT + +#ifdef __TURBOC__ +/* Turbo C in 16-bit mode */ + +# define MY_ZCALLOC + +/* Turbo C malloc() does not allow dynamic allocation of 64K bytes + * and farmalloc(64K) returns a pointer with an offset of 8, so we + * must fix the pointer. Warning: the pointer must be put back to its + * original form in order to free it, use zcfree(). + */ + +#define MAX_PTR 10 +/* 10*64K = 640K */ + +local int next_ptr = 0; + +typedef struct ptr_table_s { + voidpf org_ptr; + voidpf new_ptr; +} ptr_table; + +local ptr_table table[MAX_PTR]; +/* This table is used to remember the original form of pointers + * to large buffers (64K). Such pointers are normalized with a zero offset. + * Since MSDOS is not a preemptive multitasking OS, this table is not + * protected from concurrent access. This hack doesn't work anyway on + * a protected system like OS/2. Use Microsoft C instead. + */ + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + voidpf buf = opaque; /* just to make some compilers happy */ + ulg bsize = (ulg)items*size; + + /* If we allocate less than 65520 bytes, we assume that farmalloc + * will return a usable pointer which doesn't have to be normalized. + */ + if (bsize < 65520L) { + buf = farmalloc(bsize); + if (*(ush*)&buf != 0) return buf; + } else { + buf = farmalloc(bsize + 16L); + } + if (buf == NULL || next_ptr >= MAX_PTR) return NULL; + table[next_ptr].org_ptr = buf; + + /* Normalize the pointer to seg:0 */ + *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; + *(ush*)&buf = 0; + table[next_ptr++].new_ptr = buf; + return buf; +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + int n; + if (*(ush*)&ptr != 0) { /* object < 64K */ + farfree(ptr); + return; + } + /* Find the original pointer */ + for (n = 0; n < next_ptr; n++) { + if (ptr != table[n].new_ptr) continue; + + farfree(table[n].org_ptr); + while (++n < next_ptr) { + table[n-1] = table[n]; + } + next_ptr--; + return; + } + ptr = opaque; /* just to make some compilers happy */ + Assert(0, "zcfree: ptr not found"); +} + +#endif /* __TURBOC__ */ + + +#ifdef M_I86 +/* Microsoft C in 16-bit mode */ + +# define MY_ZCALLOC + +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) +# define _halloc halloc +# define _hfree hfree +#endif + +voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + return _halloc((long)items, size); +} + +void zcfree (voidpf opaque, voidpf ptr) +{ + if (opaque) opaque = 0; /* to make compiler happy */ + _hfree(ptr); +} + +#endif /* M_I86 */ + +#endif /* SYS16BIT */ + + +#ifndef MY_ZCALLOC /* Any system without a special alloc function */ + +#ifndef STDC +extern voidp malloc OF((uInt size)); +extern voidp calloc OF((uInt items, uInt size)); +extern void free OF((voidpf ptr)); +#endif + +voidpf zcalloc (opaque, items, size) + voidpf opaque; + unsigned items; + unsigned size; +{ + if (opaque) items += size - size; /* make compiler happy */ + return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : + (voidpf)calloc(items, size); +} + +void zcfree (opaque, ptr) + voidpf opaque; + voidpf ptr; +{ + free(ptr); + if (opaque) return; /* make compiler happy */ +} + +#endif /* MY_ZCALLOC */ diff --git a/compat/zlib/zutil.h b/compat/zlib/zutil.h new file mode 100644 index 0000000..fa42524 --- /dev/null +++ b/compat/zlib/zutil.h @@ -0,0 +1,269 @@ +/* zutil.h -- internal interface and configuration of the compression library + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id: zutil.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ + +#ifndef ZUTIL_H +#define ZUTIL_H + +#define ZLIB_INTERNAL +#include "zlib.h" + +#ifdef STDC +# ifndef _WIN32_WCE +# include +# endif +# include +# include +#endif +#ifdef NO_ERRNO_H +# ifdef _WIN32_WCE + /* The Microsoft C Run-Time Library for Windows CE doesn't have + * errno. We define it as a global variable to simplify porting. + * Its value is always 0 and should not be used. We rename it to + * avoid conflict with other libraries that use the same workaround. + */ +# define errno z_errno +# endif + extern int errno; +#else +# ifndef _WIN32_WCE +# include +# endif +#endif + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +typedef unsigned char uch; +typedef uch FAR uchf; +typedef unsigned short ush; +typedef ush FAR ushf; +typedef unsigned long ulg; + +extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ +/* (size given to avoid silly warnings with Visual C++) */ + +#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] + +#define ERR_RETURN(strm,err) \ + return (strm->msg = (char*)ERR_MSG(err), (err)) +/* To be used only when the state is known to be valid */ + + /* common constants */ + +#ifndef DEF_WBITS +# define DEF_WBITS MAX_WBITS +#endif +/* default windowBits for decompression. MAX_WBITS is for compression only */ + +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +/* default memLevel */ + +#define STORED_BLOCK 0 +#define STATIC_TREES 1 +#define DYN_TREES 2 +/* The three kinds of block type */ + +#define MIN_MATCH 3 +#define MAX_MATCH 258 +/* The minimum and maximum match lengths */ + +#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ + + /* target dependencies */ + +#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) +# define OS_CODE 0x00 +# if defined(__TURBOC__) || defined(__BORLANDC__) +# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) + /* Allow compilation with ANSI keywords only enabled */ + void _Cdecl farfree( void *block ); + void *_Cdecl farmalloc( unsigned long nbytes ); +# else +# include +# endif +# else /* MSC or DJGPP */ +# include +# endif +#endif + +#ifdef AMIGA +# define OS_CODE 0x01 +#endif + +#if defined(VAXC) || defined(VMS) +# define OS_CODE 0x02 +# define F_OPEN(name, mode) \ + fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") +#endif + +#if defined(ATARI) || defined(atarist) +# define OS_CODE 0x05 +#endif + +#ifdef OS2 +# define OS_CODE 0x06 +# ifdef M_I86 + #include +# endif +#endif + +#if defined(MACOS) || defined(TARGET_OS_MAC) +# define OS_CODE 0x07 +# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include /* for fdopen */ +# else +# ifndef fdopen +# define fdopen(fd,mode) NULL /* No fdopen() */ +# endif +# endif +#endif + +#ifdef TOPS20 +# define OS_CODE 0x0a +#endif + +#ifdef WIN32 +# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ +# define OS_CODE 0x0b +# endif +#endif + +#ifdef __50SERIES /* Prime/PRIMOS */ +# define OS_CODE 0x0f +#endif + +#if defined(_BEOS_) || defined(RISCOS) +# define fdopen(fd,mode) NULL /* No fdopen() */ +#endif + +#if (defined(_MSC_VER) && (_MSC_VER > 600)) +# if defined(_WIN32_WCE) +# define fdopen(fd,mode) NULL /* No fdopen() */ +# ifndef _PTRDIFF_T_DEFINED + typedef int ptrdiff_t; +# define _PTRDIFF_T_DEFINED +# endif +# else +# define fdopen(fd,type) _fdopen(fd,type) +# endif +#endif + + /* common defaults */ + +#ifndef OS_CODE +# define OS_CODE 0x03 /* assume Unix */ +#endif + +#ifndef F_OPEN +# define F_OPEN(name, mode) fopen((name), (mode)) +#endif + + /* functions */ + +#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif +#if defined(__CYGWIN__) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif +#ifndef HAVE_VSNPRINTF +# ifdef MSDOS + /* vsnprintf may exist on some MS-DOS compilers (DJGPP?), + but for now we just assume it doesn't. */ +# define NO_vsnprintf +# endif +# ifdef __TURBOC__ +# define NO_vsnprintf +# endif +# ifdef WIN32 + /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ +# if !defined(vsnprintf) && !defined(NO_vsnprintf) +# define vsnprintf _vsnprintf +# endif +# endif +# ifdef __SASC +# define NO_vsnprintf +# endif +#endif +#ifdef VMS +# define NO_vsnprintf +#endif + +#if defined(pyr) +# define NO_MEMCPY +#endif +#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) + /* Use our own functions for small and medium model with MSC <= 5.0. + * You may have to use the same strategy for Borland C (untested). + * The __SC__ check is for Symantec. + */ +# define NO_MEMCPY +#endif +#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) +# define HAVE_MEMCPY +#endif +#ifdef HAVE_MEMCPY +# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ +# define zmemcpy _fmemcpy +# define zmemcmp _fmemcmp +# define zmemzero(dest, len) _fmemset(dest, 0, len) +# else +# define zmemcpy memcpy +# define zmemcmp memcmp +# define zmemzero(dest, len) memset(dest, 0, len) +# endif +#else + extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + extern void zmemzero OF((Bytef* dest, uInt len)); +#endif + +/* Diagnostic functions */ +#ifdef DEBUG +# include + extern int z_verbose; + extern void z_error OF((char *m)); +# define Assert(cond,msg) {if(!(cond)) z_error(msg);} +# define Trace(x) {if (z_verbose>=0) fprintf x ;} +# define Tracev(x) {if (z_verbose>0) fprintf x ;} +# define Tracevv(x) {if (z_verbose>1) fprintf x ;} +# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} +# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + + +voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); +void zcfree OF((voidpf opaque, voidpf ptr)); + +#define ZALLOC(strm, items, size) \ + (*((strm)->zalloc))((strm)->opaque, (items), (size)) +#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) +#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} + +#endif /* ZUTIL_H */ -- cgit v0.12 From 3b695df22581e947dcf17c31c4ef9ea27b04fd57 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 14:16:52 +0000 Subject: Slight improvement of changelog message --- ChangeLog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 833cccb..c3cc743 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ 2008-12-18 Donal K. Fellows * compat/zlib/*: Import of zlib 1.2.3. The license is directly - compatible with Tcl's. + compatible with Tcl's. This import omits the obsolete and + contributed parts (i.e. selected directories) and the supplied + examples. * generic/tclZlib.c: First implementation of the compressing and * doc/zlib.n: decompressing channel transformations. -- cgit v0.12 From 6f3dea45cee94f12ffa0b2acbbdb3eedbc01807b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 15:24:46 +0000 Subject: Autoconf wizardry! --- ChangeLog | 1 + unix/Makefile.in | 11 +++++++++-- unix/configure.in | 33 ++++++++++++++++++++------------- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3cc743..548bec0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2008-12-18 Donal K. Fellows + * unix/configure.in, unix/Makefile.in: Autoconf wizardry. * compat/zlib/*: Import of zlib 1.2.3. The license is directly compatible with Tcl's. This import omits the obsolete and contributed parts (i.e. selected directories) and the supplied diff --git a/unix/Makefile.in b/unix/Makefile.in index 83b5008..5d4adc2 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.251 2008/12/17 17:23:10 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.252 2008/12/18 15:24:46 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -232,6 +232,10 @@ DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest # Must be absolute to so the corresponding tcltest's tcl_library is absolute. TCL_BUILDTIME_LIBRARY = @TCL_SRC_DIR@/library +ZLIB_DIR = @ZLIB_DIR@ +ZLIB_LIBRARY = @ZLIB_DIR@@ZLIB_LIB@ +ZLIB_LIB = @ZLIB_LIB@ + CC = @CC@ #CC = purify -best-effort @CC@ -DPURIFY @@ -566,7 +570,7 @@ doc: # The following target is configured by autoconf to generate either a shared # library or non-shared library for Tcl. -${LIB_FILE}: ${OBJS} ${STUB_LIB_FILE} +${LIB_FILE}: ${OBJS} ${STUB_LIB_FILE} ${ZLIB_DIR}${ZLIB_LIB} rm -f $@ @MAKE_LIB@ @@ -574,6 +578,9 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} rm -f $@ @MAKE_STUB_LIB@ +${ZLIB_DIR}${ZLIB_LIB}: + cd ${ZLIB_DIR}; ${MAKE} ${ZLIB_LIB} + # Make target which outputs the list of the .o contained in the Tcl lib useful # to build a single big shared library containing Tcl and other extensions. # Used for the Tcl Plugin. -- dl diff --git a/unix/configure.in b/unix/configure.in index 7f66b61..af7a456 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.196 2008/12/17 15:36:58 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.197 2008/12/18 15:24:46 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -119,22 +119,21 @@ SC_ENABLE_SHARED # Add stuff for zlib #------------------------------------------------------------------------ -tcl_ok=yes +zlib_ok=yes AC_CHECK_HEADER([zlib.h],[ - AC_CHECK_TYPE([gz_header],[],[ - tcl_ok=no - AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) - ],[#include ])],[ - tcl_ok=no - AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) - ]) -AS_IF([test $tcl_ok = yes], [ + AC_CHECK_TYPE([gz_header],[],[zlib_ok=no],[#include ])],[ + zlib_ok=no]) +AS_IF([test $zlib_ok = yes], [ AC_SEARCH_LIBS([deflateSetHeader],[z],[],[ - tcl_ok=no + zlib_ok=no AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) ])]) -AS_IF([test $tcl_ok = yes], [ - AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])]) +AS_IF([test $zlib_ok = no], [ + AC_SUBST(ZLIB_DIR,[${TOP_DIR}/compat/zlib/]) + AC_SUBST(ZLIB_LIB,[libz.a]) + CFLAGS="$CFLAGS -I\${ZLIB_DIR}" +]) +AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This @@ -845,6 +844,10 @@ TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" +AS_IF([test $zlib_ok = no], [ + LD_SEARCH_FLAGS="\${ZLIB_LIBRARY} ${LD_SEARCH_FLAGS}" +]) + #------------------------------------------------------------------------ # tclConfig.sh refers to this by a different name #------------------------------------------------------------------------ @@ -922,3 +925,7 @@ AC_CONFIG_FILES([ tclConfig.sh:../unix/tclConfig.sh.in ]) AC_OUTPUT + +dnl Local Variables: +dnl mode: autoconf +dnl End: -- cgit v0.12 From 9f2870c4a88fbae81e4e09882e9cc91bcfea6038 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 15:25:28 +0000 Subject: regen --- unix/configure | 12633 +++++++++++++++++++++++++++---------------------------- 1 file changed, 6302 insertions(+), 6331 deletions(-) diff --git a/unix/configure b/unix/configure index d478aba..bd346ab 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,179 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +ZLIB_DIR +ZLIB_LIB +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +PKG_CFG_ARGS +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +778,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +841,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +906,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +936,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1010,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1072,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1116,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1136,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1175,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1273,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1290,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1356,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1463,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1477,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1499,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1509,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1531,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1542,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1556,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1594,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1627,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1675,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1701,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1714,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1743,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1760,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1784,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1359,24 +1822,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1385,36 +1847,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1437,8 +1900,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1451,32 +1914,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1489,36 +1954,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1531,74 +2011,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1612,7 +2052,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1623,6 +2063,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1640,22 +2081,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1668,36 +2110,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1710,29 +2154,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1745,21 +2205,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1784,47 +2258,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1836,19 +2340,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1867,22 +2373,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1893,9 +2404,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1909,14 +2419,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1936,14 +2446,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1961,12 +2477,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1989,50 +2505,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2048,38 +2563,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2095,12 +2690,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2134,12 +2729,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2154,266 +2754,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2446,8 +2896,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2481,24 +2931,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2507,9 +2955,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2519,24 +2968,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2547,6 +2994,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2564,8 +3012,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2588,24 +3036,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2614,9 +3060,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2626,24 +3073,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2654,6 +3099,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2676,23 +3122,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2716,35 +3309,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2800,6 +3389,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2819,18 +3409,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2843,12 +3442,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2871,9 +3472,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2887,38 +3488,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2930,8 +3528,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2971,39 +3569,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3014,17 +3609,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3035,41 +3630,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3078,24 +3669,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3103,9 +3692,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3129,25 +3719,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3162,17 +3745,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3183,41 +3766,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3226,24 +3805,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3251,9 +3828,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3277,25 +3855,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3310,17 +3881,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3331,41 +3902,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3374,24 +3941,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3399,9 +3964,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3425,25 +3991,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3462,17 +4021,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3483,41 +4042,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3526,24 +4081,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3551,9 +4104,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3577,25 +4131,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3664,17 +4211,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3685,41 +4232,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3728,24 +4271,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3753,9 +4294,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3779,25 +4321,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3854,17 +4389,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3875,41 +4410,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3918,24 +4449,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3943,9 +4472,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3969,25 +4499,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4002,17 +4525,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4023,41 +4546,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4066,24 +4585,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4091,9 +4608,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4117,25 +4635,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4155,18 +4666,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4177,41 +4689,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4220,24 +4728,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4245,9 +4751,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4271,25 +4778,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4309,8 +4810,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4332,39 +4833,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4375,13 +4872,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4413,8 +4910,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4427,56 +4924,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4489,8 +4983,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4503,56 +4997,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4565,8 +5056,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4579,56 +5070,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4639,8 +5127,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4653,56 +5141,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4710,8 +5195,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4724,56 +5209,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4798,9 +5280,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4826,68 +5308,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4900,8 +5374,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4909,15 +5383,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -4929,11 +5403,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4962,8 +5436,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4990,76 +5464,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5076,46 +5541,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5126,8 +5588,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5144,62 +5606,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5210,41 +5669,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5253,24 +5708,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5278,9 +5731,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5304,25 +5758,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5355,8 +5802,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5383,68 +5830,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5452,8 +5890,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5480,73 +5918,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5559,56 +5988,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5621,8 +6047,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5649,68 +6075,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5718,8 +6135,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5746,73 +6163,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5825,56 +6233,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5887,15 +6292,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5905,12 +6310,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5924,19 +6329,19 @@ _ACEOF # Add stuff for zlib #------------------------------------------------------------------------ -tcl_ok=yes +zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5947,41 +6352,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5990,24 +6391,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6015,9 +6414,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6041,31 +6441,24 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then - echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6077,78 +6470,67 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +typedef gz_header ac__type_new_; int main () { -if ((gz_header *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (gz_header)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_gz_header=no + ac_cv_type_gz_header=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } if test $ac_cv_type_gz_header = yes; then : else - - tcl_ok=no - { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 -echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} - + zlib_ok=no fi else - tcl_ok=no - { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 -echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} - + zlib_ok=no fi -if test $tcl_ok = yes; then +if test $zlib_ok = yes; then - echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6156,119 +6538,77 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -deflateSetHeader (); +return deflateSetHeader (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_deflateSetHeader=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_deflateSetHeader" = no; then - for ac_lib in z; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflateSetHeader (); -int -main () -{ -deflateSetHeader (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + : +else + ac_cv_search_deflateSetHeader=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 -if test "$ac_cv_search_deflateSetHeader" != no; then - test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else - tcl_ok=no + zlib_ok=no { echo "$as_me:$LINENO: WARNING: todo: Add compat/zlib to list of things to build" >&5 echo "$as_me: WARNING: todo: Add compat/zlib to list of things to build" >&2;} @@ -6276,15 +6616,21 @@ fi fi -if test $tcl_ok = yes; then +if test $zlib_ok = no; then + + ZLIB_DIR=${TOP_DIR}/compat/zlib/ + + ZLIB_LIB=libz.a + + CFLAGS="$CFLAGS -I\${ZLIB_DIR}" + +fi cat >>confdefs.h <<\_ACEOF #define HAVE_ZLIB 1 _ACEOF -fi - #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This @@ -6295,8 +6641,8 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6309,32 +6655,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6347,27 +6695,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6376,31 +6738,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6410,8 +6772,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6435,40 +6797,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6482,24 +6841,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6526,16 +6885,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6548,56 +6907,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6640,8 +6996,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6654,25 +7010,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6698,8 +7056,8 @@ fi CC=${CC}_r ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6777,12 +7135,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6802,8 +7158,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6816,56 +7172,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6897,8 +7250,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6911,56 +7264,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7021,8 +7371,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7035,56 +7385,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7155,8 +7502,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7169,56 +7516,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7350,8 +7694,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7374,40 +7718,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7496,8 +7837,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7523,8 +7864,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7555,8 +7896,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7582,8 +7923,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7647,8 +7988,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7671,40 +8012,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7713,8 +8051,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7737,40 +8075,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7796,8 +8131,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7820,40 +8155,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7872,8 +8204,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7896,40 +8228,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7956,21 +8285,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8004,35 +8333,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8043,8 +8369,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8060,8 +8386,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8085,42 +8411,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8456,25 +8779,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8485,41 +8808,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8528,24 +8847,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8553,9 +8870,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8579,25 +8897,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8606,8 +8917,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8682,8 +8993,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8706,40 +9017,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8774,13 +9082,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8925,22 +9233,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8950,8 +9258,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -8986,11 +9294,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -9011,8 +9319,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9034,33 +9342,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9077,37 +9380,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9139,33 +9439,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9182,37 +9477,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9244,33 +9536,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9287,37 +9574,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9330,17 +9614,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9363,35 +9647,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9413,34 +9693,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9449,20 +9726,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9484,38 +9761,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9524,8 +9797,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9547,38 +9820,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9592,9 +9861,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9620,68 +9889,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9690,8 +9951,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9713,35 +9974,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9752,11 +10009,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9766,8 +10023,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9784,7 +10041,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9793,27 +10051,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9836,40 +10089,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9879,11 +10128,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9894,27 +10143,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -9930,8 +10174,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9939,27 +10185,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9972,13 +10232,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -10007,9 +10270,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10035,68 +10298,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10120,9 +10375,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10148,88 +10403,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10256,68 +10501,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10328,8 +10564,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10356,68 +10592,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10428,8 +10655,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10456,68 +10683,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10528,8 +10746,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10556,68 +10774,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10635,8 +10844,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10663,68 +10872,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10736,8 +10936,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10764,72 +10964,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10857,38 +11048,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10906,8 +11093,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10934,72 +11121,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11030,38 +11208,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11070,8 +11244,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11102,38 +11276,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11153,8 +11323,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11181,72 +11351,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11277,38 +11438,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11317,8 +11474,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11349,38 +11506,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11400,8 +11553,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11428,72 +11581,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11524,38 +11668,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11564,8 +11704,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11596,38 +11736,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11647,8 +11783,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11675,72 +11811,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11771,38 +11898,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11811,8 +11934,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11843,38 +11966,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11927,8 +12046,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11955,72 +12074,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12051,38 +12161,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12091,8 +12197,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12123,38 +12229,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12163,8 +12265,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12193,38 +12295,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12245,8 +12343,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12273,72 +12371,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12372,38 +12461,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12412,8 +12497,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12447,38 +12532,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12512,18 +12593,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12534,41 +12616,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12577,24 +12655,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12602,9 +12678,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12628,25 +12705,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12658,8 +12729,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12687,13 +12758,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12706,8 +12786,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12731,13 +12813,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12750,8 +12841,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12777,13 +12870,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12796,8 +12898,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12825,13 +12929,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12844,8 +12957,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12872,13 +12987,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12891,8 +13015,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12920,13 +13046,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12939,12 +13074,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12974,8 +13111,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12996,42 +13133,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13054,8 +13187,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13077,8 +13210,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13094,44 +13227,42 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13145,18 +13276,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13167,41 +13299,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13210,24 +13338,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13235,9 +13361,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13261,25 +13388,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13291,8 +13412,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13316,38 +13437,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13356,8 +13473,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13382,33 +13499,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13429,40 +13541,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13479,9 +13588,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 -if test "${ac_cv_var_tzname+set}" = set; then + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13491,56 +13600,122 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif int main () { -atoi(*tzname); +#ifndef tzname + (void) tzname; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_var_tzname=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_have_decl_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 - if test $ac_cv_var_tzname = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } +if test "${ac_cv_var_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_var_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 _ACEOF fi @@ -13553,9 +13728,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13581,68 +13756,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13652,8 +13819,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13674,38 +13841,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13714,8 +13877,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13736,38 +13899,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13780,8 +13939,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13804,38 +13963,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13846,8 +14001,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13870,38 +14025,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13917,9 +14068,8 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13941,33 +14091,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13985,40 +14130,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14033,8 +14175,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14061,68 +14203,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -14139,8 +14272,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14159,9 +14292,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14177,9 +14310,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14187,13 +14320,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14206,17 +14348,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14227,8 +14369,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14255,68 +14397,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14340,8 +14473,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14368,68 +14501,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14437,8 +14561,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14457,13 +14581,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14476,11 +14609,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14488,12 +14623,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14507,8 +14640,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14535,68 +14668,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14604,8 +14728,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14625,13 +14749,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14644,11 +14777,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14656,12 +14791,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14674,8 +14807,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14702,68 +14835,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14771,8 +14895,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14792,13 +14916,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14811,11 +14944,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14823,12 +14958,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14843,8 +14976,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14871,68 +15004,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14940,8 +15064,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14977,13 +15101,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14996,18 +15129,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15025,8 +15158,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15037,50 +15170,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -15091,8 +15221,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15103,50 +15233,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -15157,8 +15284,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15169,62 +15296,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15246,8 +15370,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15262,8 +15386,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15289,38 +15413,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15329,8 +15449,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15341,50 +15461,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15394,8 +15511,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15420,40 +15537,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15464,8 +15577,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15476,50 +15589,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15529,8 +15639,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15556,40 +15666,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15608,8 +15714,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15636,68 +15742,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15717,8 +15814,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15744,39 +15841,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15791,8 +15885,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15819,68 +15913,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15888,8 +15973,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15902,56 +15987,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15960,8 +16042,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15974,56 +16056,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16032,12 +16111,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -16054,8 +16131,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16082,68 +16159,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16152,8 +16220,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16180,68 +16248,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16255,8 +16314,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16279,8 +16338,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16296,8 +16355,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16319,38 +16378,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16358,8 +16413,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16383,38 +16438,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16427,8 +16478,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16463,13 +16514,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16482,11 +16542,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16500,28 +16562,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16532,41 +16594,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16575,24 +16633,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16600,9 +16656,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16626,25 +16683,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16655,8 +16705,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16678,39 +16728,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16719,8 +16765,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16733,9 +16779,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16761,68 +16807,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16836,8 +16874,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16860,39 +16898,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16910,9 +16945,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16938,68 +16973,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17012,18 +17039,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17034,41 +17062,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17077,24 +17101,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17102,9 +17124,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17128,25 +17151,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17162,9 +17179,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17190,68 +17207,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17265,18 +17274,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17287,41 +17297,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17330,24 +17336,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17355,9 +17359,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17381,25 +17386,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17415,9 +17414,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17443,68 +17442,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17517,9 +17508,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17545,68 +17536,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17640,18 +17623,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17662,41 +17646,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17705,24 +17685,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17730,9 +17708,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17756,25 +17735,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17787,8 +17760,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17819,40 +17792,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17873,8 +17843,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17903,39 +17873,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17955,18 +17922,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17977,41 +17945,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18020,24 +17984,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18045,9 +18007,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18071,25 +18034,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18105,18 +18062,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18127,41 +18085,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18170,24 +18124,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18195,9 +18147,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18221,25 +18174,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18252,8 +18199,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18280,12 +18227,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18298,8 +18245,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18307,27 +18254,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18335,8 +18282,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18344,24 +18291,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18385,8 +18332,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18399,8 +18346,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18408,26 +18355,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18438,41 +18385,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18481,24 +18424,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18506,9 +18447,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18532,25 +18474,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18564,8 +18499,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18581,31 +18516,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18629,8 +18565,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18659,15 +18595,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18681,16 +18617,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18702,7 +18638,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18715,7 +18651,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18815,6 +18751,13 @@ TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" +if test $zlib_ok = no; then + + LD_SEARCH_FLAGS="\${ZLIB_LIBRARY} ${LD_SEARCH_FLAGS}" + +fi + + #------------------------------------------------------------------------ # tclConfig.sh refers to this by a different name #------------------------------------------------------------------------ @@ -18884,7 +18827,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18904,39 +18847,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18945,52 +18907,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -19019,17 +18965,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19039,8 +19013,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -19054,18 +19063,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19073,159 +19083,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19234,7 +19205,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19243,31 +19235,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19275,30 +19250,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19306,7 +19270,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19320,18 +19284,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19342,60 +19308,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19411,40 +19359,52 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19455,523 +19415,533 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +ZLIB_DIR!$ZLIB_DIR$ac_delim +ZLIB_LIB!$ZLIB_LIB$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 32; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF @@ -20000,3 +19970,4 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi + -- cgit v0.12 From c61d3b006e4c4629bdd8962d0eb9c3f3596e539f Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 15:36:45 +0000 Subject: Try to do the wizardry again... --- win/Makefile.in | 19 ++- win/configure | 406 +------------------------------------------------------ win/configure.in | 22 +-- 3 files changed, 19 insertions(+), 428 deletions(-) diff --git a/win/Makefile.in b/win/Makefile.in index ebe7f5c..700af1f 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.139 2008/12/11 22:30:31 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.140 2008/12/18 15:36:45 dkf Exp $ VERSION = @TCL_VERSION@ @@ -99,6 +99,7 @@ GENERIC_DIR = @srcdir@/../generic TOMMATH_DIR = @srcdir@/../libtommath WIN_DIR = @srcdir@ COMPAT_DIR = @srcdir@/../compat +ZLIB_DIR = $(COMPAT_DIR)/zlib # Converts a POSIX path to a Windows native path. CYGPATH = @CYGPATH@ @@ -187,9 +188,11 @@ COPY = cp CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -DTCL_TOMMATH -DMP_PREC=4 -I"${TOMMATH_DIR_NATIVE}" \ --I"${WIN_DIR_NATIVE}" ${AC_FLAGS} \ +-I"${WIN_DIR_NATIVE}" -I"${ZLIB_DIR}" ${AC_FLAGS} \ ${COMPILE_DEBUG_FLAGS} +ZLIB_LIB = libz.a + CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -415,15 +418,19 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} @MAKE_LIB@ ${STUB_OBJS} @POST_MAKE_LIB@ -${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) +${TCL_DLL_FILE}: ${TCL_OBJS} ${ZLIB_DIR}${ZLIB_LIB} tcl.$(RES) @$(RM) ${TCL_DLL_FILE} - @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) + @MAKE_DLL@ ${TCL_OBJS} ${ZLIB_DIR}${ZLIB_LIB} tcl.$(RES) $(SHLIB_LD_LIBS) -${TCL_LIB_FILE}: ${TCL_OBJS} +${TCL_LIB_FILE}: ${TCL_OBJS} ${ZLIB_DIR}${ZLIB_LIB} @$(RM) ${TCL_LIB_FILE} - @MAKE_LIB@ ${TCL_OBJS} + @MAKE_LIB@ ${ZLIB_DIR}${ZLIB_LIB} ${TCL_OBJS} @POST_MAKE_LIB@ +# assume GNU make +${ZLIB_DIR}${ZLIB_LIB}: + ${MAKE} -C ${ZLIB_DIR} ${ZLIB_LIB} + ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${DDE_DLL_FILE} @MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) diff --git a/win/configure b/win/configure index fb30189..531dd1f 100755 --- a/win/configure +++ b/win/configure @@ -577,42 +577,6 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../generic/tcl.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME @@ -4283,381 +4247,15 @@ _ACEOF #------------------------------------------------------------------------ -# Add stuff for zlib +# Add stuff for zlib; note that this is mostly done in the makefile now +# as we just assume that the platform hasn't got a usable z.lib #------------------------------------------------------------------------ -tcl_ok=yes -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_zlib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } - -fi -if test $ac_cv_header_zlib_h = yes; then - - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } -if test "${ac_cv_type_gz_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -typedef gz_header ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_gz_header=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_gz_header=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } -if test $ac_cv_type_gz_header = yes; then - : -else - - tcl_ok=no - { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 -echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} - -fi - -else - - tcl_ok=no - { echo "$as_me:$LINENO: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&5 -echo "$as_me: WARNING: todo: Add -Icompat/zlib/include to compile lines" >&2;} - -fi - - -if test $tcl_ok = yes; then - - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char deflateSetHeader (); -int -main () -{ -return deflateSetHeader (); - ; - return 0; -} -_ACEOF -for ac_lib in '' z Z zlib Zlib ZLIB; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_deflateSetHeader=$ac_res -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then - break -fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : -else - ac_cv_search_deflateSetHeader=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - - tcl_ok=no - { echo "$as_me:$LINENO: WARNING: todo: Add compat/zlib to list of things to build" >&5 -echo "$as_me: WARNING: todo: Add compat/zlib to list of things to build" >&2;} - -fi - -fi - -if test $tcl_ok = yes; then - cat >>confdefs.h <<\_ACEOF #define HAVE_ZLIB 1 _ACEOF -fi - #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This diff --git a/win/configure.in b/win/configure.in index a057344..92b28ce 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.111 2008/12/14 13:32:11 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.112 2008/12/18 15:36:45 dkf Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -337,25 +337,11 @@ SC_TCL_CFG_ENCODING SC_ENABLE_SHARED #------------------------------------------------------------------------ -# Add stuff for zlib +# Add stuff for zlib; note that this is mostly done in the makefile now +# as we just assume that the platform hasn't got a usable z.lib #------------------------------------------------------------------------ -tcl_ok=yes -AC_CHECK_HEADER([zlib.h],[ - AC_CHECK_TYPE([gz_header],[],[ - tcl_ok=no - AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) - ],[#include ])],[ - tcl_ok=no - AC_MSG_WARN([todo: Add -Icompat/zlib/include to compile lines]) - ]) -AS_IF([test $tcl_ok = yes], [ - AC_SEARCH_LIBS([deflateSetHeader],[z Z zlib Zlib ZLIB],[],[ - tcl_ok=no - AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) - ])]) -AS_IF([test $tcl_ok = yes], [ - AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])]) +AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This -- cgit v0.12 From 404238ca7e941ab1baf288c6b14b1f5acdec0643 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Thu, 18 Dec 2008 16:52:53 +0000 Subject: Add missing flush for half-close of the write side --- generic/tclIO.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 3815c66..affa03b 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.155 2008/12/18 01:14:16 ferrieux Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.156 2008/12/18 16:52:53 ferrieux Exp $ */ #include "tclInt.h" @@ -3166,6 +3166,21 @@ Tcl_CloseEx( return TCL_ERROR; } + /* + * Flush any data if [close w] + */ + + if (flags & TCL_CLOSE_WRITE) { + if ((statePtr->curOutPtr != NULL) && IsBufferReady(statePtr->curOutPtr)) { + SetFlag(statePtr, BUFFER_READY); + } + /* + * Ignoring the outcome of the flush (like EPIPE), since we don't want + * to disrupt the close path with such errors + */ + FlushChannel(NULL, chanPtr, 0); + } + /* * Finally do what is asked of us. */ -- cgit v0.12 From 2cc77fb13283a1fb2330293fd0d7326b5569ec4c Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 21:23:47 +0000 Subject: Formatting cleanup. --- doc/Access.3 | 73 +++++++++++++++++++++++++++----------------------------- doc/AddErrInfo.3 | 12 ++++------ doc/GetTime.3 | 4 ++-- doc/ListObj.3 | 12 +++++----- doc/Notifier.3 | 18 +++++++------- doc/Object.3 | 6 ++--- doc/ObjectType.3 | 4 ++-- doc/PkgRequire.3 | 6 ++--- doc/SplitList.3 | 6 +++-- doc/StaticPkg.3 | 6 +++-- doc/StringObj.3 | 16 ++++++------- doc/TclZlib.3 | 4 ++-- 12 files changed, 83 insertions(+), 84 deletions(-) diff --git a/doc/Access.3 b/doc/Access.3 index c464caa..6ee1f26 100644 --- a/doc/Access.3 +++ b/doc/Access.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Access.3,v 1.9 2004/10/07 14:44:31 dkf Exp $ +'\" RCS: @(#) $Id: Access.3,v 1.10 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_Access 3 8.1 Tcl "Tcl Library Procedures" @@ -25,52 +25,49 @@ int .AP char *path in Native name of the file to check the attributes of. .AP int mode in -Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK, -W_OK and X_OK request checking whether the file exists and has read, -write and execute permissions, respectively. F_OK just requests -checking for the existence of the file. +Mask consisting of one or more of \fBR_OK\fR, \fBW_OK\fR, \fBX_OK\fR and +\fBF_OK\fR. \fBR_OK\fR, \fBW_OK\fR and \fBX_OK\fR request checking whether the +file exists and has read, write and execute permissions, respectively. +\fBF_OK\fR just requests a check for the existence of the file. .AP "struct stat" *statPtr out The structure that contains the result. .BE - .SH DESCRIPTION .PP -As of Tcl 8.4, the object-based APIs \fBTcl_FSAccess\fR and -\fBTcl_FSStat\fR should be used in preference to \fBTcl_Access\fR and -\fBTcl_Stat\fR, wherever possible. +As of Tcl 8.4, the object-based APIs \fBTcl_FSAccess\fR and \fBTcl_FSStat\fR +should be used in preference to \fBTcl_Access\fR and \fBTcl_Stat\fR, wherever +possible. Those functions also support Tcl's virtual filesystem layer, which +these do not. +.SS "OBSOLETE FUNCTIONS" .PP -There are two reasons for calling \fBTcl_Access\fR and \fBTcl_Stat\fR -rather than calling system level functions \fBaccess\fR and \fBstat\fR -directly. First, the Windows implementation of both functions fixes -some bugs in the system level calls. Second, both \fBTcl_Access\fR -and \fBTcl_Stat\fR (as well as \fBTcl_OpenFileChannelProc\fR) hook -into a linked list of functions. This allows the possibility to reroute -file access to alternative media or access methods. +There are two reasons for calling \fBTcl_Access\fR and \fBTcl_Stat\fR rather +than calling system level functions \fBaccess\fR and \fBstat\fR directly. +First, the Windows implementation of both functions fixes some bugs in the +system level calls. Second, both \fBTcl_Access\fR and \fBTcl_Stat\fR (as well +as \fBTcl_OpenFileChannelProc\fR) hook into a linked list of functions. This +allows the possibility to reroute file access to alternative media or access +methods. .PP -\fBTcl_Access\fR checks whether the process would be allowed to read, -write or test for existence of the file (or other file system object) -whose name is pathname. If pathname is a symbolic link on Unix, -then permissions of the file referred by this symbolic link are -tested. +\fBTcl_Access\fR checks whether the process would be allowed to read, write or +test for existence of the file (or other file system object) whose name is +\fIpath\fR. If \fIpath\fR is a symbolic link on Unix, then permissions of the +file referred by this symbolic link are tested. .PP -On success (all requested permissions granted), zero is returned. On -error (at least one bit in mode asked for a permission that is denied, -or some other error occurred), -1 is returned. +On success (all requested permissions granted), zero is returned. On error (at +least one bit in mode asked for a permission that is denied, or some other +error occurred), -1 is returned. .PP -\fBTcl_Stat\fR fills the stat structure \fIstatPtr\fR with information -about the specified file. You do not need any access rights to the -file to get this information but you need search rights to all -directories named in the path leading to the file. The stat structure -includes info regarding device, inode (always 0 on Windows), -privilege mode, nlink (always 1 on Windows), user id (always 0 on -Windows), group id (always 0 on Windows), rdev (same as device on -Windows), size, last access time, last modification time, and creation -time. +\fBTcl_Stat\fR fills the stat structure \fIstatPtr\fR with information about +the specified file. You do not need any access rights to the file to get this +information but you need search rights to all directories named in the path +leading to the file. The stat structure includes info regarding device, inode +(always 0 on Windows), privilege mode, nlink (always 1 on Windows), user id +(always 0 on Windows), group id (always 0 on Windows), rdev (same as device on +Windows), size, last access time, last modification time, and creation time. .PP -If \fIpath\fR exists, \fBTcl_Stat\fR returns 0 and the stat structure -is filled with data. Otherwise, -1 is returned, and no stat info is -given. - +If \fIpath\fR exists, \fBTcl_Stat\fR returns 0 and the stat structure is +filled with data. Otherwise, -1 is returned, and no stat info is given. .SH KEYWORDS stat, access - +.SH "SEE ALSO" +Tcl_FSAccess(3), Tcl_FSStat(3) diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index ae136ce..9462b37 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.24 2008/12/15 18:33:24 dgp Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.25 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.5 Tcl "Tcl Library Procedures" @@ -83,7 +83,6 @@ Pointer to first character in command that generated the error .AP int commandLength in Number of bytes in command; -1 means use all bytes up to first null byte .BE - .SH DESCRIPTION .PP The \fBTcl_SetReturnOptions\fR and \fBTcl_GetReturnOptions\fR @@ -119,7 +118,7 @@ retrieve the stack trace when script evaluation returns .CS int code = Tcl_Eval(interp, script); if (code == TCL_ERROR) { - Tcl_Obj *options = Tcl_GetReturnOptions(interp, code); + Tcl_Obj *options = \fBTcl_GetReturnOptions\fR(interp, code); Tcl_Obj *key = Tcl_NewStringObj("-errorinfo", -1); Tcl_Obj *stackTrace; Tcl_IncrRefCount(key); @@ -146,7 +145,7 @@ if ((objc % 2) == 0) { /* explicit result argument */ objc--; Tcl_SetObjResult(interp, objv[objc]); } -return Tcl_SetReturnOptions(interp, Tcl_NewListObj(objc-1, objv+1)); +return \fBTcl_SetReturnOptions\fR(interp, Tcl_NewListObj(objc-1, objv+1)); .CE .PP (It is not really implemented that way. Internal access @@ -302,9 +301,8 @@ The global variables \fBerrorInfo\fR and \fBerrorCode\fR are not modified by \fBTcl_ResetResult\fR so they continue to hold a record of information about the most recent error seen in an interpreter. - .SH "SEE ALSO" -Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_Interp, Tcl_ResetResult, Tcl_SetErrno - +Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_Interp(3), Tcl_ResetResult(3), +Tcl_SetErrno(3) .SH KEYWORDS error, object, object result, stack, trace, variable diff --git a/doc/GetTime.3 b/doc/GetTime.3 index 6927c5e..be6c1ba 100644 --- a/doc/GetTime.3 +++ b/doc/GetTime.3 @@ -46,8 +46,8 @@ structure has the following definition: .PP .CS typedef struct Tcl_Time { - long sec; - long usec; + long \fIsec\fR; + long \fIusec\fR; } \fBTcl_Time\fR; .CE .PP diff --git a/doc/ListObj.3 b/doc/ListObj.3 index 070e1b6..6215fc2 100644 --- a/doc/ListObj.3 +++ b/doc/ListObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ListObj.3,v 1.12 2007/12/13 15:22:31 dgp Exp $ +'\" RCS: @(#) $Id: ListObj.3,v 1.13 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_ListObj 3 8.0 Tcl "Tcl Library Procedures" @@ -222,7 +222,7 @@ referenced by the array of object pointers \fIobjv\fR just before the element \fIindex\fR of the list referenced by \fIlistPtr\fR: .PP .CS -result = Tcl_ListObjReplace(interp, listPtr, index, 0, +result = \fBTcl_ListObjReplace\fR(interp, listPtr, index, 0, objc, objv); .CE .PP @@ -231,9 +231,9 @@ referenced by the array \fIobjv\fR to the end of the list \fIlistPtr\fR: .PP .CS -result = Tcl_ListObjLength(interp, listPtr, &length); +result = \fBTcl_ListObjLength\fR(interp, listPtr, &length); if (result == TCL_OK) { - result = Tcl_ListObjReplace(interp, listPtr, length, 0, + result = \fBTcl_ListObjReplace\fR(interp, listPtr, length, 0, objc, objv); } .CE @@ -243,10 +243,10 @@ by simply calling \fBTcl_ListObjReplace\fR with a NULL \fIobjvPtr\fR: .PP .CS -result = Tcl_ListObjReplace(interp, listPtr, first, count, +result = \fBTcl_ListObjReplace\fR(interp, listPtr, first, count, 0, NULL); .CE .SH "SEE ALSO" -Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult +Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_GetObjResult(3) .SH KEYWORDS append, index, insert, internal representation, length, list, list object, list type, object, object type, replace, string representation diff --git a/doc/Notifier.3 b/doc/Notifier.3 index 74aa77b..8239d8d 100644 --- a/doc/Notifier.3 +++ b/doc/Notifier.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Notifier.3,v 1.24 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Notifier.3,v 1.25 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Notifier 3 8.1 Tcl "Tcl Library Procedures" @@ -552,14 +552,14 @@ structure has the following layout: .PP .CS typedef struct Tcl_NotifierProcs { - Tcl_SetTimerProc *setTimerProc; - Tcl_WaitForEventProc *waitForEventProc; - Tcl_CreateFileHandlerProc *createFileHandlerProc; - Tcl_DeleteFileHandlerProc *deleteFileHandlerProc; - Tcl_InitNotifierProc *initNotifierProc; - Tcl_FinalizeNotifierProc *finalizeNotifierProc; - Tcl_AlertNotifierProc *alertNotifierProc; - Tcl_ServiceModeHookProc *serviceModeHookProc; + Tcl_SetTimerProc *\fIsetTimerProc\fR; + Tcl_WaitForEventProc *\fIwaitForEventProc\fR; + Tcl_CreateFileHandlerProc *\fIcreateFileHandlerProc\fR; + Tcl_DeleteFileHandlerProc *\fIdeleteFileHandlerProc\fR; + Tcl_InitNotifierProc *\fIinitNotifierProc\fR; + Tcl_FinalizeNotifierProc *\fIfinalizeNotifierProc\fR; + Tcl_AlertNotifierProc *\fIalertNotifierProc\fR; + Tcl_ServiceModeHookProc *\fIserviceModeHookProc\fR; } \fBTcl_NotifierProcs\fR; .CE .PP diff --git a/doc/Object.3 b/doc/Object.3 index 00b4cec..9992653 100644 --- a/doc/Object.3 +++ b/doc/Object.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Object.3,v 1.22 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Object.3,v 1.23 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_Obj 3 8.5 Tcl "Tcl Library Procedures" @@ -334,8 +334,8 @@ by inserting \fIobjc-3\fR new elements before \fIindex\fR. .PP .CS listPtr = objv[1]; -if (Tcl_IsShared(listPtr)) { - listPtr = Tcl_DuplicateObj(listPtr); +if (\fBTcl_IsShared\fR(listPtr)) { + listPtr = \fBTcl_DuplicateObj\fR(listPtr); } result = Tcl_ListObjReplace(interp, listPtr, index, 0, (objc-3), &(objv[3])); diff --git a/doc/ObjectType.3 b/doc/ObjectType.3 index 30158ce..9803615 100644 --- a/doc/ObjectType.3 +++ b/doc/ObjectType.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ObjectType.3,v 1.20 2008/07/27 22:18:21 nijtmans Exp $ +'\" RCS: @(#) $Id: ObjectType.3,v 1.21 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures" @@ -164,7 +164,7 @@ replace it with a new one or reset the \fItypePtr\fR member to NULL. The \fIsetFromAnyProc\fR member may be set to NULL, if the routines making use of the internal representation have no need to derive that internal representation from an arbitrary string value. However, in -this case, passing a pointer to the type to Tcl_ConvertToType() will +this case, passing a pointer to the type to \fBTcl_ConvertToType\fR will lead to a panic, so to avoid this possibility, the type should \fInot\fR be registered. .SS "THE UPDATESTRINGPROC FIELD" diff --git a/doc/PkgRequire.3 b/doc/PkgRequire.3 index 61f368c..38b2ef1 100644 --- a/doc/PkgRequire.3 +++ b/doc/PkgRequire.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: PkgRequire.3,v 1.11 2006/10/18 18:46:59 dgp Exp $ +'\" RCS: @(#) $Id: PkgRequire.3,v 1.12 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures" @@ -61,7 +61,6 @@ Number of requirements. .AP Tcl_Obj* objv[] in Array of requirements. .BE - .SH DESCRIPTION .PP These procedures provide C-level interfaces to Tcl's package and @@ -93,6 +92,7 @@ functions. \fBTcl_PkgRequireProc\fR is the form of \fBpackage require\fR handling multiple requirements. The other forms are present for backward compatibility and translate their invokations to this form. - .SH KEYWORDS package, present, provide, require, version +.SH "SEE ALSO" +package(n), Tcl_StaticPackage(3) diff --git a/doc/SplitList.3 b/doc/SplitList.3 index 73ff969..b57911b 100644 --- a/doc/SplitList.3 +++ b/doc/SplitList.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SplitList.3,v 1.16 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: SplitList.3,v 1.17 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures" @@ -87,7 +87,7 @@ int argc, code; char *string; char **argv; \&... -code = Tcl_SplitList(interp, string, &argc, &argv); +code = \fBTcl_SplitList\fR(interp, string, &argc, &argv); .CE .PP Then you should eventually free the storage with a call like the @@ -186,3 +186,5 @@ the length of string \fIsrc\fR is specified by the \fIlength\fR argument, and the string may contain embedded nulls. .SH KEYWORDS backslash, convert, element, list, merge, split, strings +.SH "SEE ALSO" +Tcl_GetListFromObj(3) diff --git a/doc/StaticPkg.3 b/doc/StaticPkg.3 index 975b961..4a194dc 100644 --- a/doc/StaticPkg.3 +++ b/doc/StaticPkg.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StaticPkg.3,v 1.11 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: StaticPkg.3,v 1.12 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_StaticPackage 3 7.5 Tcl "Tcl Library Procedures" @@ -31,7 +31,7 @@ Procedure to invoke to incorporate this package into a trusted interpreter. .AP Tcl_PackageInitProc *safeInitProc in Procedure to call to incorporate this package into a safe interpreter -(one that will execute untrusted scripts). NULL means the package +(one that will execute untrusted scripts). NULL means the package cannot be used in safe interpreters. .BE .SH DESCRIPTION @@ -68,3 +68,5 @@ be returned as the result of the \fBload\fR command that caused the initialization procedure to be invoked. .SH KEYWORDS initialization procedure, package, static linking +.SH "SEE ALSO" +load(n), package(n), Tcl_PkgRequire(3) diff --git a/doc/StringObj.3 b/doc/StringObj.3 index 5e08d8e..f8e6552 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StringObj.3,v 1.29 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: StringObj.3,v 1.30 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures" @@ -277,7 +277,7 @@ command. The actual command procedure for \fBformat\fR is little more than .PP .CS -Tcl_Format(interp, Tcl_GetString(objv[1]), objc-2, objv+2); +\fBTcl_Format\fR(interp, \fBTcl_GetString\fR(objv[1]), objc-2, objv+2); .CE .PP The \fIobjc\fR Tcl_Obj values in \fIobjv\fR are formatted into a string @@ -292,9 +292,9 @@ is non-NULL. of \fBTcl_Format\fR with functionality equivalent to: .PP .CS -Tcl_Obj *newPtr = Tcl_Format(interp, format, objc, objv); +Tcl_Obj *newPtr = \fBTcl_Format\fR(interp, format, objc, objv); if (newPtr == NULL) return TCL_ERROR; -Tcl_AppendObjToObj(objPtr, newPtr); +\fBTcl_AppendObjToObj\fR(objPtr, newPtr); return TCL_OK; .CE .PP @@ -306,7 +306,7 @@ functionality is needed. .CS char buf[SOME_SUITABLE_LENGTH]; sprintf(buf, format, ...); -Tcl_NewStringObj(buf, -1); +\fBTcl_NewStringObj\fR(buf, -1); .CE .PP but with greater convenience and no need to @@ -325,7 +325,7 @@ this example usage, \fIx\fR is of type \fBlong\fR. .PP .CS long x = 5; -Tcl_Obj *objPtr = Tcl_ObjPrintf("Value is %d", x); +Tcl_Obj *objPtr = \fBTcl_ObjPrintf\fR("Value is %d", x); .CE .PP If the value of \fIformat\fR contains internal inconsistencies or invalid @@ -336,7 +336,7 @@ specifier formats, the formatted string result produced by of \fBTcl_ObjPrintf\fR with functionality equivalent to .PP .CS -Tcl_AppendObjToObj(objPtr, Tcl_ObjPrintf(format, ...)); +\fBTcl_AppendObjToObj\fR(objPtr, \fBTcl_ObjPrintf\fR(format, ...)); .CE .PP but with greater convenience and efficiency when the appending @@ -377,7 +377,7 @@ removal was added to make the output of the \fBconcat\fR command cleaner-looking. \fBTcl_ConcatObj\fR returns a pointer to a newly-created object whose ref count is zero. .SH "SEE ALSO" -Tcl_NewObj, Tcl_IncrRefCount, Tcl_DecrRefCount, format, sprintf +Tcl_NewObj(3), Tcl_IncrRefCount(3), Tcl_DecrRefCount(3), format(n), sprintf(3) .SH KEYWORDS append, internal representation, object, object type, string object, string type, string representation, concat, concatenate, unicode diff --git a/doc/TclZlib.3 b/doc/TclZlib.3 index 103f2e8..4018cf0 100644 --- a/doc/TclZlib.3 +++ b/doc/TclZlib.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TclZlib.3,v 1.1 2008/12/13 17:36:34 dkf Exp $ +'\" RCS: @(#) $Id: TclZlib.3,v 1.2 2008/12/18 21:23:47 dkf Exp $ '\" .so man.macros .TH TclZlib 3 8.6 Tcl "Tcl Built-In Commands" @@ -120,7 +120,7 @@ result. Note that the \fIdictObj\fR parameter is only used when the bytes. Typical usage is: .PP .CS -checksum = Tcl_ZlibCRC32(Tcl_ZlibCRC32(0,NULL,0), data, length); +checksum = \fBTcl_ZlibCRC32\fR(\fBTcl_ZlibCRC32\fR(0,NULL,0), data, length); .CE .PP \fBTcl_ZlibStreamInit\fR creates a compressing or decompressing stream that is -- cgit v0.12 From 5fd46b5947bec8396c693bac1c09d5d518c9f58a Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 22:20:32 +0000 Subject: Wizzardry need more backslash! --- unix/configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/configure.in b/unix/configure.in index af7a456..5ecbb81 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.197 2008/12/18 15:24:46 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.198 2008/12/18 22:20:32 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -129,7 +129,7 @@ AS_IF([test $zlib_ok = yes], [ AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) ])]) AS_IF([test $zlib_ok = no], [ - AC_SUBST(ZLIB_DIR,[${TOP_DIR}/compat/zlib/]) + AC_SUBST(ZLIB_DIR,[\${TOP_DIR}/compat/zlib/]) AC_SUBST(ZLIB_LIB,[libz.a]) CFLAGS="$CFLAGS -I\${ZLIB_DIR}" ]) -- cgit v0.12 From fc3bc1654b05755254916cc7c530af24641a9519 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 22:21:48 +0000 Subject: regen --- unix/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/configure b/unix/configure index bd346ab..84d9b47 100755 --- a/unix/configure +++ b/unix/configure @@ -6618,7 +6618,7 @@ fi if test $zlib_ok = no; then - ZLIB_DIR=${TOP_DIR}/compat/zlib/ + ZLIB_DIR=\${TOP_DIR}/compat/zlib/ ZLIB_LIB=libz.a -- cgit v0.12 From 305acd89586e2afff8b589ecdbac4865a210b5c1 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Dec 2008 22:47:57 +0000 Subject: Corrections to make things work with msys --- win/Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win/Makefile.in b/win/Makefile.in index 700af1f..0a14f8e 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.140 2008/12/18 15:36:45 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.141 2008/12/18 22:47:57 dkf Exp $ VERSION = @TCL_VERSION@ @@ -99,7 +99,7 @@ GENERIC_DIR = @srcdir@/../generic TOMMATH_DIR = @srcdir@/../libtommath WIN_DIR = @srcdir@ COMPAT_DIR = @srcdir@/../compat -ZLIB_DIR = $(COMPAT_DIR)/zlib +ZLIB_DIR = $(COMPAT_DIR)/zlib/ # Converts a POSIX path to a Windows native path. CYGPATH = @CYGPATH@ @@ -429,7 +429,7 @@ ${TCL_LIB_FILE}: ${TCL_OBJS} ${ZLIB_DIR}${ZLIB_LIB} # assume GNU make ${ZLIB_DIR}${ZLIB_LIB}: - ${MAKE} -C ${ZLIB_DIR} ${ZLIB_LIB} + ${MAKE} -C ${ZLIB_DIR} CC="${CC}" ${ZLIB_LIB} ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${DDE_DLL_FILE} -- cgit v0.12 From 995eb54922eaaa97c8591d1368a1414bbf8aa22d Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 18 Dec 2008 23:00:39 +0000 Subject: * generic/tclExecute.c: Disabled apparently faulty assertion. [Bug 2415422]. --- ChangeLog | 5 +++++ generic/tclExecute.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 548bec0..86fe926 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-18 Don Porter + + * generic/tclExecute.c: Disabled apparently faulty assertion. + [Bug 2415422]. + 2008-12-18 Donal K. Fellows * unix/configure.in, unix/Makefile.in: Autoconf wizardry. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ed656d5..c6e0d4f 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.422 2008/12/16 23:24:13 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.423 2008/12/18 23:00:39 dgp Exp $ */ #include "tclInt.h" @@ -2044,7 +2044,9 @@ TclExecuteByteCode( * reset, now process the return. */ - NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); + /* Disabled the following assertion to solve the trouble reported + * in Tcl Bug 2415422. Needs review. */ + /*NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr);*/ iPtr->cmdFramePtr = bcFramePtr->nextPtr; if (iPtr->execEnvPtr->rewind) { -- cgit v0.12 From 0f677b288fdee4290767e09fdf5b53c15cca5bef Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 18 Dec 2008 23:48:39 +0000 Subject: * generic/tclIO.c (Tcl_CloseEx,CloseWrite,CloseChannelPart,ChanCloseHalf): Rewrite the half-close to properly flush the channel, like is done for a full close, going through FlushChannel, and using the flag BG_FLUSH_SCHEDULED (async flush during close). New functions CloseWrite, CloseChannelPart, new flag CHANNEL_CLOSEDWRITE. * tests/chanio.test (chanio-28.[67]): Reactivated these tests. Replaced tclsh -> [interpreter] to get correct executable for the pipe process, and added after cancel to kill the fail timers when we are done. Removed the explicits calls to [flush], now that [close] handles this correctly. --- ChangeLog | 14 +++ generic/tclIO.c | 265 ++++++++++++++++++++++++++++++++++++++++++++++++++---- generic/tclIO.h | 5 +- tests/chanio.test | 18 ++-- 4 files changed, 274 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86fe926..b05976b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-12-18 Andreas Kupries + + * generic/tclIO.c (Tcl_CloseEx,CloseWrite,CloseChannelPart,ChanCloseHalf): + Rewrite the half-close to properly flush the channel, like is done + for a full close, going through FlushChannel, and using the flag + BG_FLUSH_SCHEDULED (async flush during close). New functions + CloseWrite, CloseChannelPart, new flag CHANNEL_CLOSEDWRITE. + + * tests/chanio.test (chanio-28.[67]): Reactivated these + tests. Replaced tclsh -> [interpreter] to get correct executable + for the pipe process, and added after cancel to kill the fail + timers when we are done. Removed the explicits calls to [flush], + now that [close] handles this correctly. + 2008-12-18 Don Porter * generic/tclExecute.c: Disabled apparently faulty assertion. diff --git a/generic/tclIO.c b/generic/tclIO.c index affa03b..b3df82e 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.156 2008/12/18 16:52:53 ferrieux Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.157 2008/12/18 23:48:39 andreas_kupries Exp $ */ #include "tclInt.h" @@ -62,6 +62,9 @@ static void CleanupChannelHandlers(Tcl_Interp *interp, Channel *chanPtr); static int CloseChannel(Tcl_Interp *interp, Channel *chanPtr, int errorCode); +static int CloseChannelPart(Tcl_Interp *interp, Channel *chanPtr, + int errorCode, int flags); +static int CloseWrite(Tcl_Interp *interp, Channel* chanPtr); static void CommonGetsCleanup(Channel *chanPtr); static int CopyAndTranslateBuffer(ChannelState *statePtr, char *result, int space); @@ -258,6 +261,15 @@ ChanClose( } static inline int +ChanCloseHalf( + Channel *chanPtr, + Tcl_Interp *interp, + int flags) +{ + return chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, flags); +} + +static inline int ChanRead( Channel *chanPtr, char *dst, @@ -2518,6 +2530,19 @@ FlushChannel( IsBufferEmpty(statePtr->curOutPtr))) { return CloseChannel(interp, chanPtr, errorCode); } + + /* + * If the write-side of the channel is flagged as closed, delete it when + * the output queue is empty and there is no output in the current output + * buffer. + */ + + if (GotFlag(statePtr, CHANNEL_CLOSEDWRITE) && + (statePtr->outQueueHead == NULL) && + ((statePtr->curOutPtr == NULL) || + IsBufferEmpty(statePtr->curOutPtr))) { + return CloseChannelPart(interp, chanPtr, errorCode, TCL_CLOSE_WRITE); + } return errorCode; } @@ -3076,7 +3101,7 @@ Tcl_Close( * * Tcl_CloseEx -- * - * Half closes a channel. + * Closes one side of a channel, read or write. * * Results: * A standard Tcl result. @@ -3102,7 +3127,6 @@ Tcl_CloseEx( { Channel *chanPtr; /* The real IO channel. */ ChannelState *statePtr; /* State of real IO channel. */ - int result; /* Of calling FlushChannel. */ if (chan == NULL) { return TCL_OK; @@ -3166,35 +3190,241 @@ Tcl_CloseEx( return TCL_ERROR; } + if (flags & TCL_CLOSE_READ) { /* - * Flush any data if [close w] + * Call the finalization code directly. There are no events to handle, + * there cannot be for the read-side. */ - if (flags & TCL_CLOSE_WRITE) { - if ((statePtr->curOutPtr != NULL) && IsBufferReady(statePtr->curOutPtr)) { - SetFlag(statePtr, BUFFER_READY); + return CloseChannelPart (interp, chanPtr, 0, flags); + + } else if (flags & TCL_CLOSE_WRITE) { + + if ((statePtr->curOutPtr != NULL) && + IsBufferReady(statePtr->curOutPtr)) { + SetFlag(statePtr, BUFFER_READY); + } + Tcl_Preserve(statePtr); + if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { + /* + * We don't want to re-enter CloseWrite(). + */ + + if (!GotFlag(statePtr, CHANNEL_CLOSEDWRITE)) { + if (CloseWrite(interp, chanPtr) != TCL_OK) { + SetFlag(statePtr, CHANNEL_CLOSEDWRITE); + Tcl_Release(statePtr); + return TCL_ERROR; } - /* - * Ignoring the outcome of the flush (like EPIPE), since we don't want - * to disrupt the close path with such errors - */ - FlushChannel(NULL, chanPtr, 0); + } } + SetFlag(statePtr, CHANNEL_CLOSEDWRITE); + Tcl_Release(statePtr); + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * CloseWrite -- + * + * Closes the write side a channel. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * Closes the write side of the channel. + * + * NOTE: + * CloseWrite removes the channel as far as the user is concerned. + * However, the ooutput data structures may continue to exist for a while + * longer if it has a background flush scheduled. The device itself is + * eventually closed and the channel structures modified, in + * CloseChannelPart, below. + * + *---------------------------------------------------------------------- + */ + +static int +CloseWrite( + Tcl_Interp *interp, /* Interpreter for errors. */ + Channel* chanPtr) /* The channel whose write side is being closed. May still be used by some interpreter */ +{ + /* Notes: clear-channel-handlers - write side only ? or keep around, just not caled */ + /* No close cllbacks are run - channel is still open (read side) */ + + ChannelState *statePtr = chanPtr->state; /* State of real IO channel. */ + int flushcode; + int result = 0; + + /* + * Ensure that the last output buffer will be flushed. + */ + + if ((statePtr->curOutPtr != NULL) && IsBufferReady(statePtr->curOutPtr)) { + SetFlag(statePtr, BUFFER_READY); + } /* - * Finally do what is asked of us. + * The call to FlushChannel will flush any queued output and invoke the + * close function of the channel driver, or it will set up the channel to + * be flushed and closed asynchronously. */ - result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, - flags); + SetFlag(statePtr, CHANNEL_CLOSEDWRITE); + + flushcode = FlushChannel(interp, chanPtr, 0); /* * TIP #219. * Capture error messages put by the driver into the bypass area and put * them into the regular interpreter result. + * + * Notes: Due to the assertion of CHANNEL_CLOSEDWRITE in the flags + * FlushChannel() has called CloseChannelPart(). While we can still access + * "chan" (no structures were freed), the only place which may still + * contain a message is the interpreter itself, and "CloseChannelPart" made + * sure to lift any channel message it generated into it. Hence the NULL + * argument in the call below. */ - if (TclChanCaughtErrorBypass(interp, chan)) { + if (TclChanCaughtErrorBypass(interp, NULL)) { + result = EINVAL; + } + + if ((flushcode != 0) || (result != 0)) { + return TCL_ERROR; + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * CloseChannelPart -- + * + * Utility procedure to close a channel partially and free associated resources. + * + * If the channel was stacked it will never be run (The higher level forbid this). + * + * If the channel was not stacked, then we will free all the bits of the + * chosen side (read, or write) for the TOP channel. + * + * Results: + * Error code from an unreported error or the driver close2 operation. + * + * Side effects: + * May free memory, may change the value of errno. + * + *---------------------------------------------------------------------- + */ + +static int +CloseChannelPart( + Tcl_Interp *interp, /* Interpreter for errors. */ + Channel* chanPtr, /* The channel being closed. May still be used by some interpreter */ + int errorCode, /* Status of operation so far. */ + int flags) /* Flags telling us which side to close. */ +{ + ChannelState *statePtr; /* State of real IO channel. */ + int result; /* Of calling the close2proc. */ + + statePtr = chanPtr->state; + + if (flags & TCL_CLOSE_READ) { + /* + * No more input can be consumed so discard any leftover input. + */ + + DiscardInputQueued(statePtr, 1); + + } else if (flags & TCL_CLOSE_WRITE) { + + /* + * The caller guarantees that there are no more buffers queued for + * output. + */ + + if (statePtr->outQueueHead != NULL) { + Tcl_Panic("ClosechanHalf, closed write-side of channel: queued output left"); + } + + /* + * If the EOF character is set in the channel, append that to the + * output device. + */ + + if ((statePtr->outEofChar != 0) && GotFlag(statePtr, TCL_WRITABLE)) { + int dummy; + char c = (char) statePtr->outEofChar; + + (void) ChanWrite(chanPtr, &c, 1, &dummy); + } + + /* + * TIP #219, Tcl Channel Reflection API. + * Move a leftover error message in the channel bypass into the + * interpreter bypass. Just clear it if there is no interpreter. + */ + + if (statePtr->chanMsg != NULL) { + if (interp != NULL) { + Tcl_SetChannelErrorInterp(interp,statePtr->chanMsg); + } + TclDecrRefCount(statePtr->chanMsg); + statePtr->chanMsg = NULL; + } + } + + /* + * Finally do what is asked of us. Close and free the channel driver state + * for the chosen side of the channel. This may leave a TIP #219 error + * message in the interp. + */ + + result = ChanCloseHalf (chanPtr, interp, flags); + + /* + * If we are being called synchronously, report either any latent error on + * the channel or the current error. + */ + + if (statePtr->unreportedError != 0) { + errorCode = statePtr->unreportedError; + + /* + * TIP #219, Tcl Channel Reflection API. + * Move an error message found in the unreported area into the regular + * bypass (interp). This kills any message in the channel bypass area. + */ + + if (statePtr->chanMsg != NULL) { + TclDecrRefCount(statePtr->chanMsg); + statePtr->chanMsg = NULL; + } + if (interp) { + Tcl_SetChannelErrorInterp(interp,statePtr->unreportedMsg); + } + } + if (errorCode == 0) { + errorCode = result; + if (errorCode != 0) { + Tcl_SetErrno(errorCode); + } + } + + /* + * TIP #219. + * Capture error messages put by the driver into the bypass area and put + * them into the regular interpreter result. See also the bottom of + * CloseWrite(). + */ + + if (TclChanCaughtErrorBypass(interp, (Tcl_Channel) chanPtr)) { result = EINVAL; } @@ -3206,8 +3436,7 @@ Tcl_CloseEx( * Remove the closed side from the channel mode/flags. */ - statePtr->flags &= ~(flags & (TCL_READABLE | TCL_WRITABLE)); - + ResetFlag (statePtr, flags & (TCL_READABLE | TCL_WRITABLE)); return TCL_OK; } diff --git a/generic/tclIO.h b/generic/tclIO.h index a90817b..fa78769 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.14 2008/10/04 12:33:34 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.15 2008/12/18 23:48:39 andreas_kupries Exp $ */ /* @@ -339,6 +339,9 @@ typedef struct ChannelState { * Used by Channel Tcl_Obj type to * determine if we have to revalidate * the channel. */ +#define CHANNEL_CLOSEDWRITE (1<<21) /* Channel write side has been closed. + * No further Tcl-level write IO on + * the channel is allowed. */ /* * For each channel handler registered in a call to Tcl_CreateChannelHandler, diff --git a/tests/chanio.test b/tests/chanio.test index 5ac00cb..0535bbd 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.18 2008/12/18 11:48:58 dkf Exp $ +# RCS: @(#) $Id: chanio.test,v 1.19 2008/12/18 23:48:39 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -2128,28 +2128,28 @@ test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel o chan close $f set l } {file1 file2} -test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} knownBug { +test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { set cat [makeFile { fconfigure stdout -buffering line while {[gets stdin line]>=0} {puts $line} puts DONE exit 0 } cat.tcl] - set ::ff [open "|[list tclsh $cat]" r+] + set ::ff [open "|[list [interpreter] $cat]" r+] puts $::ff Hey - flush $ff close $::ff w - after 1000 {set ::done Failed} + set timer [after 1000 {set ::done Failed}] set ::acc {} fileevent $::ff readable { if {[gets $::ff line]<0} {set ::done Succeeded;return} lappend ::acc $line } vwait ::done + after cancel $timer close $::ff r list $::done $::acc } {Succeeded {Hey DONE}} -test chan-io-28.7 {Tcl_CloseEx (half-close) socket} knownBug { +test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { set echo [makeFile { proc accept {s args} {set ::sok $s} set s [socket -server accept 0] @@ -2161,19 +2161,19 @@ test chan-io-28.7 {Tcl_CloseEx (half-close) socket} knownBug { puts $::sok DONE exit 0 } echo.tcl] - set ::ff [open "|[list tclsh $echo]" r] + set ::ff [open "|[list [interpreter] $echo]" r] gets $::ff port set ::s [socket 127.0.0.1 $port] puts $::s Hey - flush $::s close $::s w - after 1000 {set ::done Failed} + set timer [after 1000 {set ::done Failed}] set ::acc {} fileevent $::s readable { if {[gets $::s line]<0} {set ::done Succeeded;return} lappend ::acc $line } vwait ::done + after cancel $timer close $::s r close $::ff list $::done $::acc -- cgit v0.12 From 3b110b339bac5dee04bc19ff4ec476c1aaff2fc6 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 19 Dec 2008 01:34:51 +0000 Subject: nmake build file support for zlib --- ChangeLog | 4 ++++ win/makefile.vc | 38 ++++++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index b05976b..60ba496 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-19 Pat Thoyts + + * win/makefile.vc: Added build of compat/zlib + 2008-12-18 Andreas Kupries * generic/tclIO.c (Tcl_CloseEx,CloseWrite,CloseChannelPart,ChanCloseHalf): diff --git a/win/makefile.vc b/win/makefile.vc index d08f802..9a29dde 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.192 2008/12/14 13:32:11 dkf Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.193 2008/12/19 01:34:51 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -76,27 +76,29 @@ the build instructions. # Sets where to install Tcl from the built binaries. # C:\Progra~1\Tcl is assumed when not specified. # -# OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,unchecked,none +# OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,unchecked,pdbs,none # Sets special options for the core. The default is for none. # Any combination of the above may be used (comma separated). # 'none' will over-ride everything to nothing. # # static = Builds a static library of the core instead of a # dll. The shell will be static (and large), as well. -# msvcrt = Effects the static option only to switch it from +# msvcrt = Affects the static option only to switch it from # using libcmt(d) as the C runtime [by default] to # msvcrt(d). This is useful for static embedding # support. -# staticpkg = Effects the static option only to switch +# staticpkg = Affects the static option only to switch # tclshXX.exe to have the dde and reg extension linked # inside it. # threads = Turns on full multithreading support. # thrdalloc = Use the thread allocator (shared global free pool) # This is the default on threaded builds. -# tclalloc = Use the old non-thread allocator -# symbols = Adds symbols for step debugging. -# profile = Adds profiling hooks. Map file is assumed. -# loimpact = Adds a flag for how NT treats the heap to keep memory +# tclalloc = Use the old non-thread allocator +# symbols = Debug build. Links to the debug C runtime, disables +# optimizations and creates pdb symbols files. +# pdbs = Build detached symbols for release builds. +# profile = Adds profiling hooks. Map file is assumed. +# loimpact = Adds a flag for how NT treats the heap to keep memory # in use, low. This is said to impact alloc performance. # unchecked = Allows a symbols build to not use the debug # enabled runtime (msvcrt.dll not msvcrtd.dll @@ -404,6 +406,14 @@ TCLOBJS = \ $(TMP_DIR)\tcl.res !endif +ZLIBOBJS = \ + $(TMP_DIR)\adler32.obj $(TMP_DIR)\compress.obj $(TMP_DIR)\crc32.obj \ + $(TMP_DIR)\deflate.obj $(TMP_DIR)\gzio.obj $(TMP_DIR)\infback.obj \ + $(TMP_DIR)\inffast.obj $(TMP_DIR)\inflate.obj $(TMP_DIR)\inftrees.obj \ + $(TMP_DIR)\trees.obj $(TMP_DIR)\uncompr.obj $(TMP_DIR)\zutil.obj + +TCLOBJS = $(TCLOBJS) $(ZLIBOBJS) + TCLSTUBOBJS = \ $(TMP_DIR)\tclStubLib.obj \ $(TMP_DIR)\tclOOStubLib.obj @@ -457,8 +467,8 @@ crt = -MT !endif TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)" -TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline -### TODO: Add -DHAVE_ZLIB=1 +TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 \ + -Dinline=__inline -DHAVE_ZLIB=1 BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES) CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES) @@ -866,6 +876,9 @@ $(TMP_DIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c $(TMP_DIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c $(cc32) $(TCL_CFLAGS) -Fo$@ $? +$(TMP_DIR)\tclZlib.obj: $(GENERICDIR)\tclZlib.c + $(cc32) $(TCL_CFLAGS) -I$(COMPATDIR)\zlib -DBUILD_tcl -Fo$@ $? + $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c $(cc32) -DBUILD_tcl $(TCL_CFLAGS) \ -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR:\=\\)\"" \ @@ -972,6 +985,11 @@ $< $< << +{$(COMPATDIR)\zlib}.c{$(TMP_DIR)}.obj:: + $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<< +$< +<< + {$(WINDIR)}.rc{$(TMP_DIR)}.res: $(rc32) -fo $@ -r -i "$(GENERICDIR)" \ -d DEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \ -- cgit v0.12 From 056b49e15ce3aeeb276308a5bb1380859964f423 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 19 Dec 2008 02:46:07 +0000 Subject: * win/configure.in: * win/Makefile.in: Added build of packages in the 'pkgs/' directory. * win/configure: Autoconf 2.59 --- ChangeLog | 6 + win/Makefile.in | 103 +- win/configure | 4314 +++++++++++++++++++++++------------------------------- win/configure.in | 9 +- 4 files changed, 1900 insertions(+), 2532 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60ba496..0ecadd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-19 Kevin Kenny + + * win/configure.in: + * win/Makefile.in: Added build of packages in the 'pkgs/' directory. + * win/configure: Autoconf 2.59 + 2008-12-19 Pat Thoyts * win/makefile.vc: Added build of compat/zlib diff --git a/win/Makefile.in b/win/Makefile.in index 0a14f8e..a242720 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.141 2008/12/18 22:47:57 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.142 2008/12/19 02:46:07 kennykb Exp $ VERSION = @TCL_VERSION@ @@ -95,10 +95,12 @@ MAN2TCLFLAGS = @MAN2TCLFLAGS@ SRC_DIR = @srcdir@ ROOT_DIR = @srcdir@/.. -GENERIC_DIR = @srcdir@/../generic -TOMMATH_DIR = @srcdir@/../libtommath -WIN_DIR = @srcdir@ -COMPAT_DIR = @srcdir@/../compat +TOP_DIR = $(shell cd @srcdir@/..; pwd) +GENERIC_DIR = $(TOP_DIR)/generic +TOMMATH_DIR = $(TOP_DIR)/libtommath +WIN_DIR = $(TOP_DIR)/win +COMPAT_DIR = $(TOP_DIR)/compat +PKGS_DIR = $(TOP_DIR)/pkgs ZLIB_DIR = $(COMPAT_DIR)/zlib/ # Converts a POSIX path to a Windows native path. @@ -386,7 +388,7 @@ TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} TCL_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n] -all: binaries libraries doc +all: binaries libraries doc packages tcltest: $(TCLTEST) @@ -551,7 +553,7 @@ gentommath_h: "$(TOMMATH_DIR_NATIVE)\tommath.h" \ > "$(GENERIC_DIR_NATIVE)\tclTomMath.h" -install: all install-binaries install-libraries install-doc +install: all install-binaries install-libraries install-doc install-packages install-binaries: binaries @for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" ; \ @@ -702,7 +704,7 @@ install-private-headers: libraries # tcltest, i.e.: # % make test TESTFLAGS="-verbose bps -file fileName.test" -test: binaries $(TCLTEST) +test: binaries $(TCLTEST) test-packages TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \ ./$(TCLTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \ -load "set ::ddelib [file normalize ${DDE_DLL_FILE}]; \ @@ -734,16 +736,95 @@ Makefile: $(SRC_DIR)/Makefile.in cleanhelp: $(RM) *.hlp *.cnt *.GID *.rtf man2tcl.exe -clean: cleanhelp +clean: cleanhelp clean-packages $(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(TCLSH) $(TCLTEST) $(CAT32) $(RM) *.pch *.ilk *.pdb + ${MAKE} -C ${ZLIB_DIR} clean -distclean: clean +distclean: distclean-packages clean $(RM) Makefile config.status config.cache config.log tclConfig.sh \ tcl.hpj config.status.lineno # +# Bundled package targets +# + +PKG_CFG_ARGS = @PKG_CFG_ARGS@ +PKG_DIR = ./pkgs + +packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ] ; then \ + if [ -x $$i/configure ] ; then \ + pkg=`basename $$i`; \ + mkdir -p $(PKG_DIR)/$$pkg; \ + if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; \ + echo "Configuring package '$$i' wd = `pwd`"; \ + $$i/configure --with-tcl=$(PWD) --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \ + fi ; \ + echo "Building package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE); ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +install-packages: packages + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + echo "Installing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) install "DESTDIR=$(INSTALL_ROOT)"; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +test-packages: tcltest packages + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + echo "Testing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) "LD_LIBRARY_PATH=$$builddir:${LD_LIBRARY_PATH}" "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" "TCLLIBPATH=$$builddir/pkgs" test "TCLSH_PROG=$$builddir/tcltest"; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +clean-packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) clean; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +distclean-packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) distclean; ) \ + fi; \ + cd $$builddir; \ + rm -rf $(PKG_DIR)/$$pkg; \ + fi; \ + done; \ + rm -rf $(PKG_DIR) + +# # Regenerate the stubs files. # @@ -757,7 +838,7 @@ genstubs: $(TCL_EXE) "$(ROOT_DIR_NATIVE)\tools\genStubs.tcl" \ "$(GENERIC_DIR_NATIVE)" \ "$(GENERIC_DIR_NATIVE)\tcl.decls" \ - "$(GENERIC_DIR_NATIVE)\tclInt.decls" \ + "$(GENERIC_DIR_NATIVE)\tclInt.decls" \ "$(GENERIC_DIR_NATIVE)\tclTomMath.decls" $(TCL_EXE) "$(ROOT_DIR_NATIVE)\tools\genStubs.tcl" \ "$(GENERIC_DIR_NATIVE)" \ diff --git a/win/configure b/win/configure index 531dd1f..fa1870e 100755 --- a/win/configure +++ b/win/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.59. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -577,145 +272,8 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../generic/tcl.h" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -AR -RANLIB -RC -SET_MAKE -TCL_THREADS -CYGPATH -CELIB_DIR -DL_LIBS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_DLL_FILE -TCL_SRC_DIR -TCL_BIN_DIR -TCL_DBGX -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -EXTRA_CFLAGS -DEPARG -CC_OBJNAME -CC_EXENAME -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -LDFLAGS_CONSOLE -LDFLAGS_WINDOW -STLIB_LD -SHLIB_LD -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -TCL_SHARED_BUILD -LIBS_GUI -DLLSUFFIX -LIBPREFIX -LIBSUFFIX -EXESUFFIX -LIBRARIES -MAKE_LIB -POST_MAKE_LIB -MAKE_DLL -MAKE_EXE -TCL_BUILD_LIB_SPEC -TCL_LD_SEARCH_FLAGS -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_PACKAGE_PATH -TCL_DDE_VERSION -TCL_DDE_MAJOR_VERSION -TCL_DDE_MINOR_VERSION -TCL_DDE_PATCH_LEVEL -TCL_REG_VERSION -TCL_REG_MAJOR_VERSION -TCL_REG_MINOR_VERSION -TCL_REG_PATCH_LEVEL -RC_OUT -RC_TYPE -RC_INCLUDE -RC_DEFINE -RC_DEFINES -RES -LIBOBJS -LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -742,48 +300,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -805,45 +349,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -870,12 +402,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -900,16 +426,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -974,16 +497,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1036,20 +549,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1080,7 +597,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1100,19 +618,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1139,76 +665,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1237,6 +761,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1254,22 +781,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1300,95 +820,126 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.61 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1407,7 +958,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1421,7 +972,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1443,6 +993,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1453,7 +1004,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1475,7 +1026,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1486,8 +1039,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1500,34 +1053,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1538,28 +1077,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1571,24 +1104,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1619,17 +1154,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1645,8 +1177,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1658,11 +1190,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1687,7 +1220,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1704,6 +1238,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1720,11 +1260,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1752,6 +1287,8 @@ TCL_REG_MINOR_VERSION=2 TCL_REG_PATCH_LEVEL="1" REGVER=$TCL_REG_MAJOR_VERSION$TCL_REG_MINOR_VERSION +PKG_CFG_ARGS=$@ + #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ @@ -1783,8 +1320,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1797,34 +1334,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1837,51 +1372,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1894,34 +1414,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1935,7 +1495,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1946,7 +1506,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1964,23 +1523,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1993,38 +1551,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2037,45 +1593,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2088,35 +1628,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2141,77 +1667,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2223,21 +1719,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2256,27 +1750,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2287,8 +1776,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2302,14 +1792,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2329,20 +1819,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2360,12 +1844,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2388,49 +1872,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2446,118 +1931,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2573,12 +1978,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2612,17 +2017,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2637,116 +2037,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2769,8 +2319,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2804,22 +2354,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2828,10 +2380,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2841,22 +2392,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2867,7 +2420,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -2885,8 +2437,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2909,22 +2461,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2933,10 +2487,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2946,22 +2499,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2972,7 +2527,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -2995,170 +2549,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3182,31 +2589,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3262,7 +2673,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3282,27 +2692,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3315,14 +2716,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3342,8 +2741,8 @@ fi if test "${GCC}" = "yes" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3356,31 +2755,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3393,31 +2790,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3430,28 +2825,26 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RC="windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then - { echo "$as_me:$LINENO: result: $RC" >&5 -echo "${ECHO_T}$RC" >&6; } + echo "$as_me:$LINENO: result: $RC" >&5 +echo "${ECHO_T}$RC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = "" ; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;} @@ -3473,33 +2866,32 @@ fi # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF -SHELL = /bin/sh all: - @echo '@@@%%%=$(MAKE)=@@@%%%' + @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi rm -f conftest.make fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -3509,8 +2901,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 -echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 +echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 if test "${ac_cv_cygwin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3534,35 +2926,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_cygwin=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_cygwin=yes +ac_cv_cygwin=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 -echo "${ECHO_T}$ac_cv_cygwin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 +echo "${ECHO_T}$ac_cv_cygwin" >&6 if test "$ac_cv_cygwin" = "yes" ; then { { echo "$as_me:$LINENO: error: Compiling under Cygwin is not currently supported. A maintainer for the Cygwin port of Tcl/Tk is needed. See the README @@ -3574,8 +2970,8 @@ file for information about building with Mingw." >&2;} fi -{ echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 -echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 +echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6 if test "${tcl_cv_seh+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3606,22 +3002,13 @@ int main(int argc, char** argv) { _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3634,14 +3021,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_seh=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 -echo "${ECHO_T}$tcl_cv_seh" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 +echo "${ECHO_T}$tcl_cv_seh" >&6 if test "$tcl_cv_seh" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3656,8 +3041,8 @@ fi # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # -{ echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 -echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 +echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6 if test "${tcl_cv_eh_disposition+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3683,35 +3068,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_eh_disposition=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_eh_disposition=no +tcl_cv_eh_disposition=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 -echo "${ECHO_T}$tcl_cv_eh_disposition" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 +echo "${ECHO_T}$tcl_cv_eh_disposition" >&6 if test "$tcl_cv_eh_disposition" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3724,8 +3113,8 @@ fi # Check to see if the winsock2.h include file provided contains # typedefs like LPFN_ACCEPT and friends. # -{ echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 -echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 +echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6 if test "${tcl_cv_lpfn_decls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3752,35 +3141,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lpfn_decls=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lpfn_decls=no +tcl_cv_lpfn_decls=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 -echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 +echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6 if test "$tcl_cv_lpfn_decls" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3793,8 +3186,8 @@ fi # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. -{ echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 -echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 +echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6 if test "${tcl_cv_winnt_ignore_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3823,35 +3216,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_winnt_ignore_void=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_winnt_ignore_void=no -fi + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_winnt_ignore_void=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +tcl_cv_winnt_ignore_void=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 -echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 +echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6 if test "$tcl_cv_winnt_ignore_void" = "yes" ; then cat >>confdefs.h <<\_ACEOF @@ -3870,8 +3267,8 @@ fi # register and not on the stack. Instead, we just # call it from inline asm code. -{ echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 -echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 +echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6 if test "${tcl_cv_malloc_decl_alloca+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3898,35 +3295,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_malloc_decl_alloca=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_malloc_decl_alloca=no +tcl_cv_malloc_decl_alloca=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 -echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 +echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6 if test "$tcl_cv_malloc_decl_alloca" = "no" && test "${GCC}" = "yes" ; then @@ -3940,8 +3341,8 @@ fi # This is used to stop gcc from printing a compiler # warning when initializing a union member. -{ echo "$as_me:$LINENO: checking for cast to union support" >&5 -echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for cast to union support" >&5 +echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6 if test "${tcl_cv_cast_to_union+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3964,35 +3365,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cast_to_union=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cast_to_union=no +tcl_cv_cast_to_union=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 -echo "${ECHO_T}$tcl_cv_cast_to_union" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 +echo "${ECHO_T}$tcl_cv_cast_to_union" >&6 if test "$tcl_cv_cast_to_union" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -4006,8 +3411,8 @@ fi # missing from winbase.h. This is known to be # a problem with VC++ 5.2. -{ echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 -echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 +echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6 if test "${tcl_cv_findex_enums+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4034,35 +3439,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_findex_enums=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_findex_enums=no +tcl_cv_findex_enums=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 -echo "${ECHO_T}$tcl_cv_findex_enums" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 +echo "${ECHO_T}$tcl_cv_findex_enums" >&6 if test "$tcl_cv_findex_enums" = "no"; then cat >>confdefs.h <<\_ACEOF @@ -4074,8 +3483,8 @@ fi # See if MWMO_ALERTABLE is missing from winuser.h # This is known to be a problem with Mingw. -{ echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 -echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 +echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6 if test "${tcl_cv_mwmo_alertable+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4101,35 +3510,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_mwmo_alertable=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_mwmo_alertable=no +tcl_cv_mwmo_alertable=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 -echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 +echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6 if test "$tcl_cv_mwmo_alertable" = "no"; then cat >>confdefs.h <<\_ACEOF @@ -4150,19 +3563,19 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } - # Check whether --enable-threads was given. + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 TCL_THREADS=1 cat >>confdefs.h <<\_ACEOF #define TCL_THREADS 1 @@ -4176,8 +3589,8 @@ _ACEOF else TCL_THREADS=0 - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -4188,11 +3601,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then cat >>confdefs.h <<_ACEOF @@ -4214,15 +3627,15 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -4232,12 +3645,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF #define STATIC_BUILD 1 @@ -4267,52 +3680,52 @@ _ACEOF # Step 0: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Cross-compiling options for Windows/CE builds - { echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 -echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; } - # Check whether --enable-wince was given. + echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 +echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6 + # Check whether --enable-wince or --disable-wince was given. if test "${enable_wince+set}" = set; then - enableval=$enable_wince; doWince=$enableval + enableval="$enable_wince" + doWince=$enableval else doWince=no -fi - - { echo "$as_me:$LINENO: result: $doWince" >&5 -echo "${ECHO_T}$doWince" >&6; } +fi; + echo "$as_me:$LINENO: result: $doWince" >&5 +echo "${ECHO_T}$doWince" >&6 - { echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 -echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 +echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6 -# Check whether --with-celib was given. +# Check whether --with-celib or --without-celib was given. if test "${with_celib+set}" = set; then - withval=$with_celib; CELIB_DIR=$withval + withval="$with_celib" + CELIB_DIR=$withval else CELIB_DIR=NO_CELIB -fi - - { echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 -echo "${ECHO_T}$CELIB_DIR" >&6; } +fi; + echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 +echo "${ECHO_T}$CELIB_DIR" >&6 # Set some defaults (may get changed below) EXTRA_CFLAGS="" # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CYGPATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4325,29 +3738,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CYGPATH="cygpath -w" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" fi fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then - { echo "$as_me:$LINENO: result: $CYGPATH" >&5 -echo "${ECHO_T}$CYGPATH" >&6; } + echo "$as_me:$LINENO: result: $CYGPATH" >&5 +echo "${ECHO_T}$CYGPATH" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - SHLIB_SUFFIX=".dll" # Check for a bug in gcc's windres that causes the @@ -4363,8 +3774,8 @@ fi echo "101 \"name\"" >> $conftest echo "END" >> $conftest - { echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 -echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 +echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6 cyg_conftest=`$CYGPATH $conftest` if { ac_try='$RC -o conftest.res.o $cyg_conftest' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 @@ -4372,11 +3783,11 @@ echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6; } ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } ; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 CYGPATH=echo fi conftest= @@ -4391,8 +3802,8 @@ echo "${ECHO_T}yes" >&6; } # set various compiler flags depending on whether we are using gcc or cl - { echo "$as_me:$LINENO: checking compiler flags" >&5 -echo $ECHO_N "checking compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking compiler flags" >&5 +echo $ECHO_N "checking compiler flags... $ECHO_C" >&6 if test "${GCC}" = "yes" ; then if test "$do64bit" != "no" ; then { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on Windows" >&5 @@ -4442,8 +3853,8 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} if test "${SHARED_BUILD}" = "0" ; then # static - { echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6; } + echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6 runtime= MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.a" @@ -4452,8 +3863,8 @@ echo "${ECHO_T}using static flags" >&6; } EXESUFFIX="s\${DBGX}.exe" else # dynamic - { echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6; } + echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6 # ad-hoc check to see if CC supports -shared. if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then @@ -4518,8 +3929,8 @@ echo "$as_me: error: ${CC} does not support the -shared option. else if test "${SHARED_BUILD}" = "0" ; then # static - { echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6; } + echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6 runtime=-MT MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" @@ -4529,8 +3940,8 @@ echo "${ECHO_T}using static flags" >&6; } SHLIB_LD_LIBS="" else # dynamic - { echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6; } + echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6 runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" @@ -4573,8 +3984,8 @@ echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} do64bit="no" else - { echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 -echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6; } + echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 +echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 fi fi @@ -4768,22 +4179,22 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -4794,8 +4205,8 @@ _ACEOF LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' DBGX=g if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -4825,11 +4236,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -4919,6 +4330,7 @@ fi + # empty on win @@ -5001,8 +4413,7 @@ fi -ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" - + ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -5021,58 +4432,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -5081,48 +4473,63 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -5153,45 +4560,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -5201,43 +4580,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -5251,19 +4595,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -5271,120 +4614,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -5393,28 +4775,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5423,14 +4784,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5438,18 +4816,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -5457,7 +4847,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -5468,20 +4858,18 @@ Configuration files: $config_files Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -5492,42 +4880,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -5543,44 +4949,30 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; - "tcl.hpj") CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; + "tcl.hpj" ) CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -5590,479 +4982,371 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@AR@,$AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@RC@,$RC,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@CYGPATH@,$CYGPATH,;t t +s,@CELIB_DIR@,$CELIB_DIR,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_DLL_FILE@,$TCL_DLL_FILE,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t +s,@TCL_DBGX@,$TCL_DBGX,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t +s,@DEPARG@,$DEPARG,;t t +s,@CC_OBJNAME@,$CC_OBJNAME,;t t +s,@CC_EXENAME@,$CC_EXENAME,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@LDFLAGS_CONSOLE@,$LDFLAGS_CONSOLE,;t t +s,@LDFLAGS_WINDOW@,$LDFLAGS_WINDOW,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LIBS_GUI@,$LIBS_GUI,;t t +s,@DLLSUFFIX@,$DLLSUFFIX,;t t +s,@LIBPREFIX@,$LIBPREFIX,;t t +s,@LIBSUFFIX@,$LIBSUFFIX,;t t +s,@EXESUFFIX@,$EXESUFFIX,;t t +s,@LIBRARIES@,$LIBRARIES,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@POST_MAKE_LIB@,$POST_MAKE_LIB,;t t +s,@MAKE_DLL@,$MAKE_DLL,;t t +s,@MAKE_EXE@,$MAKE_EXE,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_LD_SEARCH_FLAGS@,$TCL_LD_SEARCH_FLAGS,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_DDE_VERSION@,$TCL_DDE_VERSION,;t t +s,@TCL_DDE_MAJOR_VERSION@,$TCL_DDE_MAJOR_VERSION,;t t +s,@TCL_DDE_MINOR_VERSION@,$TCL_DDE_MINOR_VERSION,;t t +s,@TCL_DDE_PATCH_LEVEL@,$TCL_DDE_PATCH_LEVEL,;t t +s,@TCL_REG_VERSION@,$TCL_REG_VERSION,;t t +s,@TCL_REG_MAJOR_VERSION@,$TCL_REG_MAJOR_VERSION,;t t +s,@TCL_REG_MINOR_VERSION@,$TCL_REG_MINOR_VERSION,;t t +s,@TCL_REG_PATCH_LEVEL@,$TCL_REG_PATCH_LEVEL,;t t +s,@RC_OUT@,$RC_OUT,;t t +s,@RC_TYPE@,$RC_TYPE,;t t +s,@RC_INCLUDE@,$RC_INCLUDE,;t t +s,@RC_DEFINE@,$RC_DEFINE,;t t +s,@RC_DEFINES@,$RC_DEFINES,;t t +s,@RES@,$RES,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -RC!$RC$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -CYGPATH!$CYGPATH$ac_delim -CELIB_DIR!$CELIB_DIR$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_DLL_FILE!$TCL_DLL_FILE$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim -TCL_DBGX!$TCL_DBGX$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -EXTRA_CFLAGS!$EXTRA_CFLAGS$ac_delim -DEPARG!$DEPARG$ac_delim -CC_OBJNAME!$CC_OBJNAME$ac_delim -CC_EXENAME!$CC_EXENAME$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -LDFLAGS_CONSOLE!$LDFLAGS_CONSOLE$ac_delim -LDFLAGS_WINDOW!$LDFLAGS_WINDOW$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LIBS_GUI!$LIBS_GUI$ac_delim -DLLSUFFIX!$DLLSUFFIX$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -LIBPREFIX!$LIBPREFIX$ac_delim -LIBSUFFIX!$LIBSUFFIX$ac_delim -EXESUFFIX!$EXESUFFIX$ac_delim -LIBRARIES!$LIBRARIES$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -POST_MAKE_LIB!$POST_MAKE_LIB$ac_delim -MAKE_DLL!$MAKE_DLL$ac_delim -MAKE_EXE!$MAKE_EXE$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_LD_SEARCH_FLAGS!$TCL_LD_SEARCH_FLAGS$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_DDE_VERSION!$TCL_DDE_VERSION$ac_delim -TCL_DDE_MAJOR_VERSION!$TCL_DDE_MAJOR_VERSION$ac_delim -TCL_DDE_MINOR_VERSION!$TCL_DDE_MINOR_VERSION$ac_delim -TCL_DDE_PATCH_LEVEL!$TCL_DDE_PATCH_LEVEL$ac_delim -TCL_REG_VERSION!$TCL_REG_VERSION$ac_delim -TCL_REG_MAJOR_VERSION!$TCL_REG_MAJOR_VERSION$ac_delim -TCL_REG_MINOR_VERSION!$TCL_REG_MINOR_VERSION$ac_delim -TCL_REG_PATCH_LEVEL!$TCL_REG_PATCH_LEVEL$ac_delim -RC_OUT!$RC_OUT$ac_delim -RC_TYPE!$RC_TYPE$ac_delim -RC_INCLUDE!$RC_INCLUDE$ac_delim -RC_DEFINE!$RC_DEFINE$ac_delim -RC_DEFINES!$RC_DEFINES$ac_delim -RES!$RES$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 31; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - case $ac_mode in - :F) - # - # CONFIG_FILE - # +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -6070,39 +5354,28 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - - - - esac +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF @@ -6131,3 +5404,4 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi + diff --git a/win/configure.in b/win/configure.in index 92b28ce..cd9369f 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.112 2008/12/18 15:36:45 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.113 2008/12/19 02:46:07 kennykb Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -31,6 +31,8 @@ TCL_REG_MINOR_VERSION=2 TCL_REG_PATCH_LEVEL="1" REGVER=$TCL_REG_MAJOR_VERSION$TCL_REG_MINOR_VERSION +PKG_CFG_ARGS=$@ + #------------------------------------------------------------------------ # Handle the --prefix=... option #------------------------------------------------------------------------ @@ -441,6 +443,7 @@ AC_SUBST(TCL_VERSION) AC_SUBST(TCL_MAJOR_VERSION) AC_SUBST(TCL_MINOR_VERSION) AC_SUBST(TCL_PATCH_LEVEL) +AC_SUBST(PKG_CFG_ARGS) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) @@ -527,3 +530,7 @@ AC_SUBST(RC_DEFINES) AC_SUBST(RES) AC_OUTPUT(Makefile tclConfig.sh tcl.hpj) + +dnl Local Variables: +dnl mode: autoconf; +dnl End: \ No newline at end of file -- cgit v0.12 From 5ed945e98e1caf70d6ea848c61dcbc45a4d12431 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 03:31:00 +0000 Subject: * tests/chanio.test: Replaced [chan event] handlers that returned TCL_RETURN return code, with more conventional ones that return TCL_OK to suppress otherwise strange writes of outdated $::errorInfo values to stderr. [Bug 2444274]. --- ChangeLog | 5 +++++ tests/chanio.test | 16 +++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ecadd2..a2881bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,11 @@ 2008-12-18 Don Porter + * tests/chanio.test: Replaced [chan event] handlers that + returned TCL_RETURN return code, with more conventional ones + that return TCL_OK to suppress otherwise strange writes of + outdated $::errorInfo values to stderr. [Bug 2444274]. + * generic/tclExecute.c: Disabled apparently faulty assertion. [Bug 2415422]. diff --git a/tests/chanio.test b/tests/chanio.test index 0535bbd..1c77e53 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.19 2008/12/18 23:48:39 andreas_kupries Exp $ +# RCS: @(#) $Id: chanio.test,v 1.20 2008/12/19 03:31:00 dgp Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -2141,8 +2141,11 @@ test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { set timer [after 1000 {set ::done Failed}] set ::acc {} fileevent $::ff readable { - if {[gets $::ff line]<0} {set ::done Succeeded;return} - lappend ::acc $line + if {[gets $::ff line]<0} { + set ::done Succeeded + } else { + lappend ::acc $line + } } vwait ::done after cancel $timer @@ -2169,8 +2172,11 @@ test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { set timer [after 1000 {set ::done Failed}] set ::acc {} fileevent $::s readable { - if {[gets $::s line]<0} {set ::done Succeeded;return} - lappend ::acc $line + if {[gets $::s line]<0} { + set ::done Succeeded + } else { + lappend ::acc $line + } } vwait ::done after cancel $timer -- cgit v0.12 From 8efd037c5db946ec4dd60728866e45d966c729ca Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 03:54:44 +0000 Subject: * README: Bump version number to 8.6b1 * generic/tcl.h: * library/init.tcl: * tools/tcl.wse.in: * unix/configure.in: * unix/tcl.spec: * win/configure.in: * unix/configure: autoconf-2.59 * win/configure: --- ChangeLog | 15 + README | 4 +- generic/tcl.h | 8 +- library/init.tcl | 4 +- tools/tcl.wse.in | 2 +- unix/configure | 12614 ++++++++++++++++++++++++++-------------------------- unix/configure.in | 4 +- unix/tcl.spec | 4 +- win/configure | 2 +- win/configure.in | 6 +- 10 files changed, 6358 insertions(+), 6305 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2881bf..ce837f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ +2008-12-19 Don Porter + + * README: Bump version number to 8.6b1 + * generic/tcl.h: + * library/init.tcl: + * tools/tcl.wse.in: + * unix/configure.in: + * unix/tcl.spec: + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + 2008-12-19 Kevin Kenny + * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all. + * win/configure.in: * win/Makefile.in: Added build of packages in the 'pkgs/' directory. * win/configure: Autoconf 2.59 diff --git a/README b/README index 203a614..5236585 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ README: Tcl - This is the Tcl 8.6a4 source distribution. + This is the Tcl 8.6b1 source distribution. Tcl/Tk is also available through NetCVS: http://tcl.sourceforge.net/ You can get any source release of Tcl from the file distributions link at the above URL. -RCS: @(#) $Id: README,v 1.72 2008/10/14 20:08:20 dgp Exp $ +RCS: @(#) $Id: README,v 1.73 2008/12/19 03:54:44 dgp Exp $ Contents -------- diff --git a/generic/tcl.h b/generic/tcl.h index 58cfd6e..c3426f1 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.284 2008/12/17 14:33:33 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.285 2008/12/19 03:54:44 dgp Exp $ */ #ifndef _TCL @@ -59,11 +59,11 @@ extern "C" { #define TCL_MAJOR_VERSION 8 #define TCL_MINOR_VERSION 6 -#define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TCL_RELEASE_SERIAL 4 +#define TCL_RELEASE_LEVEL TCL_BETA_RELEASE +#define TCL_RELEASE_SERIAL 1 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6a4" +#define TCL_PATCH_LEVEL "8.6b1" /* * The following definitions set up the proper options for Windows compilers. diff --git a/library/init.tcl b/library/init.tcl index 71635fb..2d8e303 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.117 2008/12/16 22:03:25 dkf Exp $ +# RCS: @(#) $Id: init.tcl,v 1.118 2008/12/19 03:54:44 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6a4 +package require -exact Tcl 8.6b1 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in index 01190b1..e2a636d 100644 --- a/tools/tcl.wse.in +++ b/tools/tcl.wse.in @@ -12,7 +12,7 @@ item: Global Log Pathname=%MAINDIR%\INSTALL.LOG Message Font=MS Sans Serif Font Size=8 - Disk Label=tcl8.6a4 + Disk Label=tcl8.6b1 Disk Filename=setup Patch Flags=0000000000000001 Patch Threshold=85 diff --git a/unix/configure b/unix/configure index 84d9b47..9f54c93 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,179 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -ZLIB_DIR -ZLIB_LIB -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -PKG_CFG_ARGS -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_LIB RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -778,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -841,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -906,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -936,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1010,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1072,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1116,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1136,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1175,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1273,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1290,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1356,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1463,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1477,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1499,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1509,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1531,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1542,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1556,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1594,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1627,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1675,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1701,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1714,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1743,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1760,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1784,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1798,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a4" +TCL_PATCH_LEVEL="b1" VERSION=${TCL_VERSION} PKG_CFG_ARGS=$@ @@ -1822,23 +1359,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } - - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1847,37 +1385,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1900,8 +1437,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1914,34 +1451,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1954,51 +1489,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2011,34 +1531,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2052,7 +1612,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2063,7 +1623,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2081,23 +1640,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2110,38 +1668,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2154,45 +1710,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2205,35 +1745,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2258,77 +1784,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2340,21 +1836,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2373,27 +1867,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2404,8 +1893,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2419,14 +1909,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2446,20 +1936,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2477,12 +1961,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2505,49 +1989,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2563,118 +2048,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2690,12 +2095,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2729,17 +2134,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2754,116 +2154,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +continue fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2896,8 +2446,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2931,22 +2481,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2955,10 +2507,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2968,22 +2519,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2994,7 +2547,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3012,8 +2564,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3036,22 +2588,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3060,10 +2614,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3073,22 +2626,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3099,7 +2654,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3122,170 +2676,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3309,31 +2716,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3389,7 +2800,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3409,27 +2819,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3442,14 +2843,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3472,9 +2871,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3488,35 +2887,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3528,8 +2930,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3569,36 +2971,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3609,17 +3014,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3630,37 +3035,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3669,22 +3078,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3692,10 +3103,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3719,18 +3129,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3745,17 +3162,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3766,37 +3183,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3805,22 +3226,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3828,10 +3251,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3855,18 +3277,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3881,17 +3310,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3902,37 +3331,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3941,22 +3374,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3964,10 +3399,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3991,18 +3425,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4021,17 +3462,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4042,37 +3483,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4081,22 +3526,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4104,10 +3551,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4131,18 +3577,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4211,17 +3664,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4232,37 +3685,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4271,22 +3728,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4294,10 +3753,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4321,18 +3779,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4389,17 +3854,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4410,37 +3875,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4449,22 +3918,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4472,10 +3943,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4499,18 +3969,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4525,17 +4002,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4546,37 +4023,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4585,22 +4066,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4608,10 +4091,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4635,18 +4117,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4666,19 +4155,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4689,37 +4177,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4728,22 +4220,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4751,10 +4245,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4778,19 +4271,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4810,8 +4309,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4833,35 +4332,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4872,13 +4375,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4910,8 +4413,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4924,53 +4427,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4983,8 +4489,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4997,53 +4503,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5056,8 +4565,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5070,53 +4579,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5127,8 +4639,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5141,53 +4653,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5195,8 +4710,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5209,53 +4724,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5280,9 +4798,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5308,60 +4826,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5374,8 +4900,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5383,15 +4909,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5403,11 +4929,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5436,8 +4962,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5464,67 +4990,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5541,43 +5076,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5588,8 +5126,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5606,59 +5144,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5669,37 +5210,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5708,22 +5253,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5731,10 +5278,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5758,18 +5304,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -5802,8 +5355,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5830,59 +5383,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5890,8 +5452,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5918,64 +5480,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5988,53 +5559,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6047,8 +5621,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6075,59 +5649,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6135,8 +5718,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6163,64 +5746,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6233,53 +5825,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6292,15 +5887,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6310,12 +5905,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6331,17 +5926,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6352,37 +5947,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6391,22 +5990,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6414,10 +6015,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6441,24 +6041,31 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6470,47 +6077,50 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -typedef gz_header ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((gz_header *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (gz_header)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_gz_header=no +ac_cv_type_gz_header=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6 if test $ac_cv_type_gz_header = yes; then : else @@ -6525,12 +6135,13 @@ fi if test $zlib_ok = yes; then - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS +ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6538,73 +6149,115 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -return deflateSetHeader (); +deflateSetHeader (); ; return 0; } _ACEOF -for ac_lib in '' z; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_deflateSetHeader=$ac_res + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_deflateSetHeader" = no; then + for ac_lib in z; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then - break -fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="-l$ac_lib" +break else - ac_cv_search_deflateSetHeader=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 +if test "$ac_cv_search_deflateSetHeader" != no; then + test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" else @@ -6641,8 +6294,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6655,34 +6308,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6695,41 +6346,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6738,31 +6375,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6772,8 +6409,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6797,37 +6434,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6841,24 +6481,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6885,16 +6525,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6907,53 +6547,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6996,8 +6639,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7010,27 +6653,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7056,8 +6697,8 @@ fi CC=${CC}_r ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7135,10 +6776,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7158,8 +6801,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7172,53 +6815,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7250,8 +6896,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7264,53 +6910,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7371,8 +7020,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7385,53 +7034,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7502,8 +7154,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7516,53 +7168,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7694,8 +7349,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7718,37 +7373,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7837,8 +7495,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7864,8 +7522,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7896,8 +7554,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7923,8 +7581,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7988,8 +7646,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8012,37 +7670,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8051,8 +7712,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8075,37 +7736,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8131,8 +7795,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8155,37 +7819,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8204,8 +7871,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8228,37 +7895,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8285,21 +7955,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8333,32 +8003,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8369,8 +8042,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8386,8 +8059,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8411,39 +8084,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8779,25 +8455,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8808,37 +8484,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8847,22 +8527,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8870,10 +8552,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8897,18 +8578,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -8917,8 +8605,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -8993,8 +8681,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9017,37 +8705,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9082,13 +8773,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9233,22 +8924,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9258,8 +8949,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9294,11 +8985,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9319,8 +9010,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9342,28 +9033,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9380,34 +9076,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9439,28 +9138,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9477,34 +9181,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9536,28 +9243,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__largefile_source64=no + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9574,34 +9286,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9614,17 +9329,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9647,31 +9362,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9693,31 +9412,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9726,20 +9448,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9761,34 +9483,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9797,8 +9523,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9820,34 +9546,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9861,9 +9591,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9889,60 +9619,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9951,8 +9689,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9974,31 +9712,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10009,11 +9751,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -10023,8 +9765,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10041,8 +9783,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -10051,22 +9792,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10089,36 +9835,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10128,11 +9878,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10143,22 +9893,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10174,10 +9929,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10185,41 +9938,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10232,16 +9971,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10270,9 +10006,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10298,60 +10034,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10375,9 +10119,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10403,78 +10147,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10501,59 +10255,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10564,8 +10327,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10592,59 +10355,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10655,8 +10427,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10683,59 +10455,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10746,8 +10527,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10774,59 +10555,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -10844,8 +10634,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10872,59 +10662,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -10936,8 +10735,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10964,63 +10763,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11048,34 +10856,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11093,8 +10905,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11121,63 +10933,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11208,34 +11029,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11244,8 +11069,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11276,34 +11101,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11323,8 +11152,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11351,63 +11180,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getpwnam_r=yes -else - echo "$as_me: failed program was:" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getpwnam_r=yes +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11438,34 +11276,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11474,8 +11316,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11506,34 +11348,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11553,8 +11399,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11581,63 +11427,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11668,34 +11523,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11704,8 +11563,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11736,34 +11595,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11783,8 +11646,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11811,63 +11674,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11898,34 +11770,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11934,8 +11810,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11966,34 +11842,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12046,8 +11926,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12074,63 +11954,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12161,34 +12050,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12197,8 +12090,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12229,34 +12122,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12265,8 +12162,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12295,34 +12192,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12343,8 +12244,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12371,63 +12272,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12461,34 +12371,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12497,8 +12411,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12532,34 +12446,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12593,19 +12511,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12616,37 +12533,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12655,22 +12576,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12678,10 +12601,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12705,19 +12627,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12729,8 +12657,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12758,22 +12686,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12786,10 +12705,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12813,22 +12730,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12841,10 +12749,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12870,22 +12776,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12898,10 +12795,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12929,22 +12824,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12957,10 +12843,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12987,22 +12871,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13015,10 +12890,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13046,22 +12919,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13074,14 +12938,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13111,8 +12973,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13133,38 +12995,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13187,8 +13053,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13210,8 +13076,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13227,42 +13093,44 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h +ac_cv_struct_tm=sys/time.h fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13276,19 +13144,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13299,37 +13166,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13338,22 +13209,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13361,10 +13234,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13388,19 +13260,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13412,8 +13290,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13437,34 +13315,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13473,8 +13355,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13499,28 +13381,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13541,37 +13428,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_tm_tm_zone=no +ac_cv_member_struct_tm_tm_zone=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13588,9 +13478,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then + echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6 +if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13600,126 +13490,60 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif int main () { -#ifndef tzname - (void) tzname; -#endif - +atoi(*tzname); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_tzname=no +ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 + if test $ac_cv_var_tzname = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 _ACEOF - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF - - -fi - - - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } -if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -int -main () -{ -return tzname[0][0]; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_var_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_var_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 -_ACEOF - - fi -fi + fi +fi @@ -13728,9 +13552,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13756,60 +13580,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13819,8 +13651,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13841,34 +13673,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13877,8 +13713,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13899,34 +13735,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13939,8 +13779,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13963,34 +13803,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14001,8 +13845,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14025,34 +13869,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14068,8 +13916,9 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } + +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14091,28 +13940,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14130,37 +13984,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14175,8 +14032,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14203,59 +14060,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14272,8 +14138,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14292,9 +14158,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14310,9 +14176,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14320,22 +14186,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14348,17 +14205,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14369,8 +14226,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14397,59 +14254,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14473,8 +14339,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14501,59 +14367,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14561,8 +14436,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14581,22 +14456,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14609,13 +14475,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14623,10 +14487,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14640,8 +14506,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14668,59 +14534,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14728,8 +14603,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14749,22 +14624,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14777,13 +14643,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14791,10 +14655,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14807,8 +14673,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14835,59 +14701,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14895,8 +14770,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14916,22 +14791,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14944,13 +14810,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14958,10 +14822,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -14976,8 +14842,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15004,59 +14870,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15064,8 +14939,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15101,22 +14976,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15129,18 +14995,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15158,8 +15024,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15170,47 +15036,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15221,8 +15090,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15233,47 +15102,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15284,8 +15156,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15296,59 +15168,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15370,8 +15245,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15386,8 +15261,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15413,34 +15288,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15449,8 +15328,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15461,47 +15340,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15511,8 +15393,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15537,36 +15419,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15577,8 +15463,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15589,47 +15475,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15639,8 +15528,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15666,36 +15555,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15714,8 +15607,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15742,59 +15635,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15814,8 +15716,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15841,36 +15743,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15885,8 +15790,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15913,59 +15818,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15973,8 +15887,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15987,53 +15901,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16042,8 +15959,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16056,53 +15973,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16111,10 +16031,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -16131,8 +16053,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16159,59 +16081,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16220,8 +16151,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16248,59 +16179,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16314,8 +16254,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16338,8 +16278,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16355,8 +16295,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16378,34 +16318,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16413,8 +16357,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16438,34 +16382,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16478,8 +16426,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16514,22 +16462,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16542,13 +16481,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16562,28 +16499,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16594,37 +16531,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16633,22 +16574,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16656,10 +16599,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16683,18 +16625,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16705,8 +16654,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16728,35 +16677,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16765,8 +16718,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16779,9 +16732,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16807,60 +16760,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16874,8 +16835,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16898,36 +16859,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16945,9 +16909,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16973,60 +16937,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17039,19 +17011,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17062,37 +17033,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17101,22 +17076,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17124,10 +17101,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17151,19 +17127,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17179,9 +17161,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17207,60 +17189,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17274,19 +17264,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17297,37 +17286,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17336,22 +17329,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17359,10 +17354,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17386,19 +17380,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17414,9 +17414,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17442,60 +17442,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17508,9 +17516,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17536,60 +17544,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17623,19 +17639,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17646,37 +17661,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17685,22 +17704,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17708,10 +17729,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17735,19 +17755,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17760,8 +17786,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17792,37 +17818,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17843,8 +17872,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17873,36 +17902,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17922,19 +17954,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17945,37 +17976,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17984,22 +18019,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18007,10 +18044,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18034,19 +18070,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18062,19 +18104,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18085,37 +18126,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18124,22 +18169,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18147,10 +18194,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18174,19 +18220,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18199,8 +18251,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18227,12 +18279,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18245,8 +18297,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18254,27 +18306,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18282,8 +18334,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18291,24 +18343,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18332,8 +18384,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18346,8 +18398,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18355,26 +18407,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18385,37 +18437,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18424,22 +18480,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18447,10 +18505,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18474,18 +18531,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18499,8 +18563,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18516,32 +18580,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18565,8 +18628,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18595,15 +18658,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18617,16 +18680,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18638,7 +18701,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18651,7 +18714,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18827,7 +18890,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18847,58 +18910,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18907,36 +18951,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -18965,45 +19025,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19013,43 +19045,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -19063,19 +19060,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19083,120 +19079,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19205,28 +19240,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19235,14 +19249,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19250,19 +19281,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19270,7 +19312,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19284,20 +19326,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19308,42 +19348,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19359,52 +19417,40 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19415,480 +19461,372 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -ZLIB_DIR!$ZLIB_DIR$ac_delim -ZLIB_LIB!$ZLIB_LIB$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 32; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@ZLIB_DIR@,$ZLIB_DIR,;t t +s,@ZLIB_LIB@,$ZLIB_LIB,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19896,52 +19834,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/unix/configure.in b/unix/configure.in index 5ecbb81..c09a5ad 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.198 2008/12/18 22:20:32 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.199 2008/12/19 03:54:44 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -27,7 +27,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a4" +TCL_PATCH_LEVEL="b1" VERSION=${TCL_VERSION} PKG_CFG_ARGS=$@ diff --git a/unix/tcl.spec b/unix/tcl.spec index 01fe6f5..09b37b1 100644 --- a/unix/tcl.spec +++ b/unix/tcl.spec @@ -1,11 +1,11 @@ -# $Id: tcl.spec,v 1.42 2008/10/14 20:08:21 dgp Exp $ +# $Id: tcl.spec,v 1.43 2008/12/19 03:54:44 dgp Exp $ # This file is the basis for a binary Tcl RPM for Linux. %{!?directory:%define directory /usr/local} Name: tcl Summary: Tcl scripting language development environment -Version: 8.6a4 +Version: 8.6b1 Release: 2 License: BSD Group: Development/Languages diff --git a/win/configure b/win/configure index fa1870e..be45c9c 100755 --- a/win/configure +++ b/win/configure @@ -1272,7 +1272,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a4" +TCL_PATCH_LEVEL="b1" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index cd9369f..8b24999 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.113 2008/12/19 02:46:07 kennykb Exp $ +# RCS: @(#) $Id: configure.in,v 1.114 2008/12/19 03:54:44 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -16,7 +16,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="a4" +TCL_PATCH_LEVEL="b1" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 @@ -533,4 +533,4 @@ AC_OUTPUT(Makefile tclConfig.sh tcl.hpj) dnl Local Variables: dnl mode: autoconf; -dnl End: \ No newline at end of file +dnl End: -- cgit v0.12 From c9226edd34ab23fefc58415e8a91eac5a5a6e3cb Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 07:01:02 +0000 Subject: * unix/Makefile.in: Update `make dist` target to include the files from the compat/zlib directory as well as all the bundled packages found under the pkgs directory, according to their individual `make dist` targets. Change includes breaking a `configure-packages` target out of the `packages` target. --- ChangeLog | 6 ++++++ unix/Makefile.in | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce837f7..cfa1e01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-12-19 Don Porter + * unix/Makefile.in: Update `make dist` target to include the files + from the compat/zlib directory as well as all the bundled packages + found under the pkgs directory, according to their individual + `make dist` targets. Change includes breaking a `configure-packages` + target out of the `packages` target. + * README: Bump version number to 8.6b1 * generic/tcl.h: * library/init.tcl: diff --git a/unix/Makefile.in b/unix/Makefile.in index 5d4adc2..15babe7 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.252 2008/12/18 15:24:46 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.253 2008/12/19 07:01:02 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1569,18 +1569,30 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c PKG_CFG_ARGS = @PKG_CFG_ARGS@ PKG_DIR = ./pkgs -packages: +configure-packages: @builddir=`pwd`; \ for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ if [ -x $$i/configure ]; then \ pkg=`basename $$i`; \ - echo "Building package '$$pkg'"; \ + echo "Configuring package '$$pkg'"; \ mkdir -p $(PKG_DIR)/$$pkg; \ if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ ( cd $(PKG_DIR)/$$pkg; \ $$i/configure --with-tcl=$(PWD) --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \ fi; \ + fi; \ + fi; \ + done; \ + cd $$builddir + +packages: configure-packages ${STUB_LIB_FILE} + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + echo "Building package '$$pkg'"; \ ( cd $(PKG_DIR)/$$pkg; $(MAKE); ) \ fi; \ fi; \ @@ -1639,6 +1651,19 @@ distclean-packages: done; \ rm -rf $(PKG_DIR) +dist-packages: configure-packages + @builddir=`pwd`; \ + rm -rf $(DISTROOT)/pkgs; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) dist "DIST_ROOT=$(DISTROOT)/pkgs"; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + # # Target to regenerate header files and stub files from the *.decls tables. # @@ -1745,7 +1770,7 @@ $(MAC_OSX_DIR)/configure: $(MAC_OSX_DIR)/configure.ac $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in: $(MAC_OSX_DIR)/configure cd $(MAC_OSX_DIR); autoheader; touch $@ -dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(MAC_OSX_DIR)/configure genstubs +dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(MAC_OSX_DIR)/configure genstubs dist-packages rm -rf $(DISTDIR) mkdir -p $(DISTDIR)/unix cp -p $(UNIX_DIR)/*.[ch] $(DISTDIR)/unix @@ -1790,6 +1815,29 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(MAC_OSX_DIR)/configure mkdir $(DISTDIR)/compat cp -p $(TOP_DIR)/license.terms $(COMPAT_DIR)/*.[ch] \ $(COMPAT_DIR)/README $(DISTDIR)/compat + mkdir $(DISTDIR)/compat/zlib + cp -p $(COMPAT_DIR)/zlib/*.[ch] $(COMPAT_DIR)/zlib/*.txt \ + $(COMPAT_DIR)/zlib/ChangeLog $(COMPAT_DIR)/zlib/configure \ + $(COMPAT_DIR)/zlib/FAQ $(COMPAT_DIR)/zlib/INDEX \ + $(COMPAT_DIR)/zlib/Makefile* $(COMPAT_DIR)/zlib/README \ + $(COMPAT_DIR)/zlib/zlib.3 $(DISTDIR)/compat/zlib + mkdir $(DISTDIR)/compat/zlib/amiga + cp -p $(COMPAT_DIR)/zlib/amiga/Makefile.* $(DISTDIR)/compat/zlib/amiga + mkdir $(DISTDIR)/compat/zlib/as400 + cp -p $(COMPAT_DIR)/zlib/as400/bndsrc \ + $(COMPAT_DIR)/zlib/as400/compile.clp \ + $(COMPAT_DIR)/zlib/as400/readme.txt \ + $(COMPAT_DIR)/zlib/as400/zlib.inc $(DISTDIR)/compat/zlib/as400 + mkdir $(DISTDIR)/compat/zlib/msdos + cp -p $(COMPAT_DIR)/zlib/msdos/Makefile.* $(DISTDIR)/compat/zlib/msdos + mkdir $(DISTDIR)/compat/zlib/qnx + cp $(COMPAT_DIR)/zlib/qnx/package.qpg $(DISTDIR)/compat/zlib/qnx + mkdir $(DISTDIR)/compat/zlib/win32 + cp -p $(COMPAT_DIR)/zlib/win32/Makefile.* \ + $(COMPAT_DIR)/zlib/win32/zlib* \ + $(COMPAT_DIR)/zlib/win32/VisualC.txt \ + $(COMPAT_DIR)/zlib/win32/DLL_FAQ.txt \ + $(DISTDIR)/compat/zlib/win32 mkdir $(DISTDIR)/tests cp -p $(TOP_DIR)/license.terms $(DISTDIR)/tests cp -p $(TOP_DIR)/tests/*.test $(TOP_DIR)/tests/README \ @@ -1845,6 +1893,11 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(MAC_OSX_DIR)/configure mkdir $(DISTDIR)/libtommath cp -p $(TOMMATH_SRCS) $(TOMMATH_DIR)/*.h \ $(DISTDIR)/libtommath + mkdir $(DISTDIR)/pkgs + cp $(TOP_DIR)/pkgs/README $(DISTDIR)/pkgs + for i in $(DISTROOT)/pkgs/*.tar.gz; do \ + tar -C $(DISTDIR)/pkgs -xzf "$$i"; \ + done # # The following target can only be used for non-patch releases. Use the -- cgit v0.12 From fae92e13aa67786689aca359e3454837d43358b8 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 19 Dec 2008 09:14:02 +0000 Subject: add symbols deflateSetHeader and inflateGetHeader to win32/zlib.def Modify ChangeLog, README and zlib.h, documenting this change, so we comply with the zlib requirements of clearly marking the modification. --- compat/zlib/ChangeLog | 5 ++++- compat/zlib/README | 4 ++-- compat/zlib/win32/zlib.def | 2 ++ compat/zlib/zlib.h | 9 +++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/compat/zlib/ChangeLog b/compat/zlib/ChangeLog index 0123d4b..e65d5b5 100644 --- a/compat/zlib/ChangeLog +++ b/compat/zlib/ChangeLog @@ -1,6 +1,9 @@ ChangeLog file for zlib +Changes in 1.2.3-f-tcl (19 Dec 2008) +- add symbols deflateSetHeader and inflateGetHeader to win32/zlib.def + Changes in 1.2.3 (18 July 2005) - Apply security vulnerability fixes to contrib/infback9 as well - Clean up some text files (carriage returns, trailing space) @@ -599,7 +602,7 @@ Changes in 1.0.6 (19 Jan 1998) - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) - added makelcc.bat for lcc-win32 (Tom St Denis) - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id: ChangeLog,v 1.1 2008/12/18 14:14:59 dkf Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- Avoid expanded $Id: ChangeLog,v 1.2 2008/12/19 09:14:03 nijtmans Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. - check for unistd.h in configure (for off_t) - remove useless check parameter in inflate_blocks_free - avoid useless assignment of s->check to itself in inflate_blocks_new diff --git a/compat/zlib/README b/compat/zlib/README index 758cc50..3ebffb0 100644 --- a/compat/zlib/README +++ b/compat/zlib/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.3 is a general purpose data compression library. All the code is +zlib 1.2.3.f-tcl is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -33,7 +33,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available in http://dogma.net/markn/articles/zlibtool/zlibtool.htm -The changes made in version 1.2.3 are documented in the file ChangeLog. +The changes made in version 1.2.3.f-tcl are documented in the file ChangeLog. Unsupported third party contributions are provided in directory "contrib". diff --git a/compat/zlib/win32/zlib.def b/compat/zlib/win32/zlib.def index a47cbc1..278805f 100644 --- a/compat/zlib/win32/zlib.def +++ b/compat/zlib/win32/zlib.def @@ -15,12 +15,14 @@ EXPORTS deflateParams deflateBound deflatePrime + deflateSetHeader inflateSetDictionary inflateSync inflateCopy inflateReset inflateBack inflateBackEnd + inflateGetHeader zlibCompileFlags ; utility functions compress diff --git a/compat/zlib/zlib.h b/compat/zlib/zlib.h index 0228179..586ab31 100644 --- a/compat/zlib/zlib.h +++ b/compat/zlib/zlib.h @@ -37,8 +37,13 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.3" -#define ZLIB_VERNUM 0x1230 +/* This version is modified from the original + * sources, in that the symbols deflateSetHeader + * and inflateGetHeader are added to win32/zlib.def + * modified by nijtmans@users.sourceforge.net + */ +#define ZLIB_VERSION "1.2.3.f-tcl" +#define ZLIB_VERNUM 0x123f /* The 'zlib' compression library provides in-memory compression and -- cgit v0.12 From f2070308a370f83bf12bcd7d309a3a52bbe5a6d7 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 19 Dec 2008 09:33:16 +0000 Subject: CONSTify TclGetLoadedPackages second param --- ChangeLog | 6 ++++++ generic/tclInt.decls | 4 ++-- generic/tclIntDecls.h | 6 +++--- generic/tclLoad.c | 20 ++++++++++---------- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfa1e01..e0a0e5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-19 Jan Nijtmans + + * generic/tclInt.decls CONSTify TclGetLoadedPackages second param + * generic/tclLoad.c + * generic/tclIntDecls.h (regenerated) + 2008-12-19 Don Porter * unix/Makefile.in: Update `make dist` target to include the files diff --git a/generic/tclInt.decls b/generic/tclInt.decls index b413a4a..433ba9b 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.134 2008/12/18 06:40:02 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.135 2008/12/19 09:33:16 nijtmans Exp $ library tcl @@ -168,7 +168,7 @@ declare 34 generic { # int TclGetLong(Tcl_Interp *interp, const char *str, long *longPtr) #} declare 37 generic { - int TclGetLoadedPackages(Tcl_Interp *interp, char *targetName) + int TclGetLoadedPackages(Tcl_Interp *interp, const char *targetName) } declare 38 generic { int TclGetNamespaceForQualName(Tcl_Interp *interp, const char *qualName, diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index b4adc16..1057bda 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.129 2008/12/18 06:40:02 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.130 2008/12/19 09:33:16 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -217,7 +217,7 @@ EXTERN int TclGetIntForIndex (Tcl_Interp * interp, #define TclGetLoadedPackages_TCL_DECLARED /* 37 */ EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, - char * targetName); + const char * targetName); #endif #ifndef TclGetNamespaceForQualName_TCL_DECLARED #define TclGetNamespaceForQualName_TCL_DECLARED @@ -1140,7 +1140,7 @@ typedef struct TclIntStubs { int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ void *reserved35; void *reserved36; - int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */ + int (*tclGetLoadedPackages) (Tcl_Interp * interp, const char * targetName); /* 37 */ int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, const char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, const char ** simpleNamePtr); /* 38 */ TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ int (*tclGetOpenMode) (Tcl_Interp * interp, const char * str, int * seekFlagPtr); /* 40 */ diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 0f64137..e5b70c3 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.22 2008/12/05 14:27:36 dkf Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.23 2008/12/19 09:33:16 nijtmans Exp $ */ #include "tclInt.h" @@ -137,7 +137,7 @@ Tcl_LoadObjCmd( const char *symbols[4]; Tcl_PackageInitProc **procPtrs[4]; ClientData clientData; - char *p, *fullFileName, *packageName; + const char *p, *fullFileName, *packageName; Tcl_LoadHandle loadHandle; Tcl_FSUnloadFileProc *unLoadProcPtr = NULL; Tcl_UniChar ch; @@ -179,7 +179,7 @@ Tcl_LoadObjCmd( target = interp; if (objc == 4) { - char *slaveIntName = Tcl_GetString(objv[3]); + const char *slaveIntName = Tcl_GetString(objv[3]); target = Tcl_GetSlave(interp, slaveIntName); if (target == NULL) { @@ -292,7 +292,7 @@ Tcl_LoadObjCmd( Tcl_Obj *splitPtr; Tcl_Obj *pkgGuessPtr; int pElements; - char *pkgGuess; + const char *pkgGuess; /* * The platform-specific code couldn't figure out the module @@ -505,7 +505,7 @@ Tcl_UnloadObjCmd( int i, index, code, complain = 1, keepLibrary = 0; int trustedRefCount = -1, safeRefCount = -1; const char *fullFileName = ""; - char *packageName; + const char *packageName; static const char *const options[] = { "-nocomplain", "-keeplibrary", "--", NULL }; @@ -581,7 +581,7 @@ Tcl_UnloadObjCmd( target = interp; if (objc - i == 3) { - char *slaveIntName = Tcl_GetString(objv[i + 2]); + const char *slaveIntName = Tcl_GetString(objv[i + 2]); target = Tcl_GetSlave(interp, slaveIntName); if (target == NULL) { @@ -872,8 +872,8 @@ Tcl_UnloadObjCmd( * Our result is the two reference counts. */ - objPtr[0] = Tcl_NewIntObj(trustedRefCount); - objPtr[1] = Tcl_NewIntObj(safeRefCount); + TclNewIntObj(objPtr[0], trustedRefCount); + TclNewIntObj(objPtr[1], safeRefCount); if (objPtr[0] == NULL || objPtr[1] == NULL) { if (objPtr[0]) { Tcl_DecrRefCount(objPtr[0]); @@ -882,7 +882,7 @@ Tcl_UnloadObjCmd( Tcl_DecrRefCount(objPtr[1]); } } else { - resultObjPtr = Tcl_NewListObj(2, objPtr); + TclNewListObj(resultObjPtr, 2, objPtr); if (resultObjPtr != NULL) { Tcl_SetObjResult(interp, resultObjPtr); } @@ -1018,7 +1018,7 @@ int TclGetLoadedPackages( Tcl_Interp *interp, /* Interpreter in which to return information * or error message. */ - char *targetName) /* Name of target interpreter or NULL. If + const char *targetName) /* Name of target interpreter or NULL. If * NULL, return info about all interps; * otherwise, just return info about this * interpreter. */ -- cgit v0.12 From 3862cdd11b0f2223852f907fcfc52a2978987f90 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 19 Dec 2008 10:55:38 +0000 Subject: More autoconf hacking; now seems to be working fully on Unix... --- unix/Makefile.in | 85 ++++++++++++++++++++++++++++++++++--------------------- unix/configure.in | 13 ++++----- win/Makefile.in | 20 ++++++++----- 3 files changed, 71 insertions(+), 47 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 15babe7..09dc947 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.253 2008/12/19 07:01:02 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.254 2008/12/19 10:55:38 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -233,8 +233,7 @@ DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest TCL_BUILDTIME_LIBRARY = @TCL_SRC_DIR@/library ZLIB_DIR = @ZLIB_DIR@ -ZLIB_LIBRARY = @ZLIB_DIR@@ZLIB_LIB@ -ZLIB_LIB = @ZLIB_LIB@ +ZLIB_INCLUDE = @ZLIB_INCLUDE@ CC = @CC@ #CC = purify -best-effort @CC@ -DPURIFY @@ -336,10 +335,13 @@ MAC_OSX_OBJS = tclMacOSXBundle.o tclMacOSXFCmd.o tclMacOSXNotify.o DTRACE_OBJ = tclDTrace.o +ZLIB_OBJS = Zadler32.o Zcompress.o Zcrc32.o Zdeflate.o Zgzio.o Zinfback.o \ + Zinffast.o Zinflate.o Zinftrees.o Ztrees.o Zuncompr.o Zzutil.o + TCL_OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} \ ${OO_OBJS} @DL_OBJS@ @PLAT_OBJS@ -OBJS = ${TCL_OBJS} ${TOMMATH_OBJS} @DTRACE_OBJ@ +OBJS = ${TCL_OBJS} ${TOMMATH_OBJS} @DTRACE_OBJ@ @ZLIB_OBJS@ TCL_DECLS = \ $(GENERIC_DIR)/tcl.decls \ @@ -553,12 +555,26 @@ DTRACE_HDR = tclDTrace.h DTRACE_SRC = $(GENERIC_DIR)/tclDTrace.d +ZLIB_SRCS = \ + $(ZLIB_DIR)/adler32.c \ + $(ZLIB_DIR)/compress.c \ + $(ZLIB_DIR)/crc32.c \ + $(ZLIB_DIR)/deflate.c \ + $(ZLIB_DIR)/gzio.c \ + $(ZLIB_DIR)/infback.c \ + $(ZLIB_DIR)/inffast.c \ + $(ZLIB_DIR)/inflate.c \ + $(ZLIB_DIR)/inftrees.c \ + $(ZLIB_DIR)/trees.c \ + $(ZLIB_DIR)/uncompr.c \ + $(ZLIB_DIR)/zutil.c + # Note: don't include DL_SRCS or MAC_OSX_SRCS in SRCS: most of those files # won't compile on the current machine, and they will cause problems for # things like "make depend". SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \ - $(STUB_SRCS) @PLAT_SRCS@ + $(OO_SRCS) $(STUB_SRCS) @PLAT_SRCS@ @ZLIB_SRCS@ all: binaries libraries doc packages @@ -570,7 +586,7 @@ doc: # The following target is configured by autoconf to generate either a shared # library or non-shared library for Tcl. -${LIB_FILE}: ${OBJS} ${STUB_LIB_FILE} ${ZLIB_DIR}${ZLIB_LIB} +${LIB_FILE}: ${OBJS} ${STUB_LIB_FILE} rm -f $@ @MAKE_LIB@ @@ -578,9 +594,6 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} rm -f $@ @MAKE_STUB_LIB@ -${ZLIB_DIR}${ZLIB_LIB}: - cd ${ZLIB_DIR}; ${MAKE} ${ZLIB_LIB} - # Make target which outputs the list of the .o contained in the Tcl lib useful # to build a single big shared library containing Tcl and other extensions. # Used for the Tcl Plugin. -- dl @@ -1225,7 +1238,7 @@ tclVar.o: $(GENERIC_DIR)/tclVar.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclVar.c tclZlib.o: $(GENERIC_DIR)/tclZlib.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclZlib.c + $(CC) -c $(ZLIB_INCLUDE) $(CC_SWITCHES) $(GENERIC_DIR)/tclZlib.c tclTest.o: $(GENERIC_DIR)/tclTest.c $(IOHDR) $(TCLREHDRS) $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tclTest.c @@ -1548,6 +1561,32 @@ strtoul.o: $(COMPAT_DIR)/strtoul.c waitpid.o: $(COMPAT_DIR)/waitpid.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/waitpid.c +# For building zlib, only used in some build configurations +Zadler32.o: $(ZLIB_DIR)/adler32.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zcompress.o: $(ZLIB_DIR)/compress.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zcrc32.o: $(ZLIB_DIR)/crc32.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zdeflate.o: $(ZLIB_DIR)/deflate.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zgzio.o: $(ZLIB_DIR)/gzio.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinfback.o: $(ZLIB_DIR)/infback.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinffast.o: $(ZLIB_DIR)/inffast.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinflate.o: $(ZLIB_DIR)/inflate.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinftrees.o: $(ZLIB_DIR)/inftrees.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Ztrees.o: $(ZLIB_DIR)/trees.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zuncompr.o: $(ZLIB_DIR)/uncompr.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zzutil.o: $(ZLIB_DIR)/zutil.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + # Stub library binaries, these must be compiled for use in a shared library # even though they will be placed in a static archive @@ -1816,28 +1855,10 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(MAC_OSX_DIR)/configure cp -p $(TOP_DIR)/license.terms $(COMPAT_DIR)/*.[ch] \ $(COMPAT_DIR)/README $(DISTDIR)/compat mkdir $(DISTDIR)/compat/zlib - cp -p $(COMPAT_DIR)/zlib/*.[ch] $(COMPAT_DIR)/zlib/*.txt \ - $(COMPAT_DIR)/zlib/ChangeLog $(COMPAT_DIR)/zlib/configure \ - $(COMPAT_DIR)/zlib/FAQ $(COMPAT_DIR)/zlib/INDEX \ - $(COMPAT_DIR)/zlib/Makefile* $(COMPAT_DIR)/zlib/README \ - $(COMPAT_DIR)/zlib/zlib.3 $(DISTDIR)/compat/zlib - mkdir $(DISTDIR)/compat/zlib/amiga - cp -p $(COMPAT_DIR)/zlib/amiga/Makefile.* $(DISTDIR)/compat/zlib/amiga - mkdir $(DISTDIR)/compat/zlib/as400 - cp -p $(COMPAT_DIR)/zlib/as400/bndsrc \ - $(COMPAT_DIR)/zlib/as400/compile.clp \ - $(COMPAT_DIR)/zlib/as400/readme.txt \ - $(COMPAT_DIR)/zlib/as400/zlib.inc $(DISTDIR)/compat/zlib/as400 - mkdir $(DISTDIR)/compat/zlib/msdos - cp -p $(COMPAT_DIR)/zlib/msdos/Makefile.* $(DISTDIR)/compat/zlib/msdos - mkdir $(DISTDIR)/compat/zlib/qnx - cp $(COMPAT_DIR)/zlib/qnx/package.qpg $(DISTDIR)/compat/zlib/qnx - mkdir $(DISTDIR)/compat/zlib/win32 - cp -p $(COMPAT_DIR)/zlib/win32/Makefile.* \ - $(COMPAT_DIR)/zlib/win32/zlib* \ - $(COMPAT_DIR)/zlib/win32/VisualC.txt \ - $(COMPAT_DIR)/zlib/win32/DLL_FAQ.txt \ - $(DISTDIR)/compat/zlib/win32 + ( cd $(COMPAT_DIR)/zlib; \ + find . -name CVS -prune -o -type f -print ) \ + | ( cd $(COMPAT_DIR)/zlib ; xargs tar cf - ) \ + | ( cd $(DISTDIR)/compat/zlib ; tar xfp - ) mkdir $(DISTDIR)/tests cp -p $(TOP_DIR)/license.terms $(DISTDIR)/tests cp -p $(TOP_DIR)/tests/*.test $(TOP_DIR)/tests/README \ diff --git a/unix/configure.in b/unix/configure.in index c09a5ad..bc2a97c 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.199 2008/12/19 03:54:44 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.200 2008/12/19 10:55:38 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -129,9 +129,10 @@ AS_IF([test $zlib_ok = yes], [ AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) ])]) AS_IF([test $zlib_ok = no], [ - AC_SUBST(ZLIB_DIR,[\${TOP_DIR}/compat/zlib/]) - AC_SUBST(ZLIB_LIB,[libz.a]) - CFLAGS="$CFLAGS -I\${ZLIB_DIR}" + AC_SUBST(ZLIB_DIR,[\${COMPAT_DIR}/zlib]) + AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}]) + AC_SUBST(ZLIB_SRCS,[\${ZLIB_SRCS}]) + AC_SUBST(ZLIB_INCLUDE,[-I\${ZLIB_DIR}]) ]) AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) @@ -844,10 +845,6 @@ TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" -AS_IF([test $zlib_ok = no], [ - LD_SEARCH_FLAGS="\${ZLIB_LIBRARY} ${LD_SEARCH_FLAGS}" -]) - #------------------------------------------------------------------------ # tclConfig.sh refers to this by a different name #------------------------------------------------------------------------ diff --git a/win/Makefile.in b/win/Makefile.in index a242720..eb5cd65 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.142 2008/12/19 02:46:07 kennykb Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.143 2008/12/19 10:55:38 dkf Exp $ VERSION = @TCL_VERSION@ @@ -190,11 +190,14 @@ COPY = cp CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -DTCL_TOMMATH -DMP_PREC=4 -I"${TOMMATH_DIR_NATIVE}" \ --I"${WIN_DIR_NATIVE}" -I"${ZLIB_DIR}" ${AC_FLAGS} \ +-I"${WIN_DIR_NATIVE}" ${AC_FLAGS} \ ${COMPILE_DEBUG_FLAGS} ZLIB_LIB = libz.a +ZLIB_INC = -I"${ZLIB_DIR}" +ZLIB_FILE = ${ZLIB_DIR}${ZLIB_LIB} + CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -420,17 +423,17 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} @MAKE_LIB@ ${STUB_OBJS} @POST_MAKE_LIB@ -${TCL_DLL_FILE}: ${TCL_OBJS} ${ZLIB_DIR}${ZLIB_LIB} tcl.$(RES) +${TCL_DLL_FILE}: ${TCL_OBJS} ${ZLIB_FILE} tcl.$(RES) @$(RM) ${TCL_DLL_FILE} - @MAKE_DLL@ ${TCL_OBJS} ${ZLIB_DIR}${ZLIB_LIB} tcl.$(RES) $(SHLIB_LD_LIBS) + @MAKE_DLL@ ${TCL_OBJS} ${ZLIB_FILE} tcl.$(RES) $(SHLIB_LD_LIBS) -${TCL_LIB_FILE}: ${TCL_OBJS} ${ZLIB_DIR}${ZLIB_LIB} +${TCL_LIB_FILE}: ${TCL_OBJS} ${ZLIB_FILE} @$(RM) ${TCL_LIB_FILE} - @MAKE_LIB@ ${ZLIB_DIR}${ZLIB_LIB} ${TCL_OBJS} + @MAKE_LIB@ ${ZLIB_FILE} ${TCL_OBJS} @POST_MAKE_LIB@ # assume GNU make -${ZLIB_DIR}${ZLIB_LIB}: +${ZLIB_FILE}: ${MAKE} -C ${ZLIB_DIR} CC="${CC}" ${ZLIB_LIB} ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @@ -486,6 +489,9 @@ tclWinTest.${OBJEXT}: tclWinTest.c tclAppInit.${OBJEXT} : tclAppInit.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) +tclZlib.${OBJEXT} : tclZlib.c + $(CC) -c ${ZLIB_INC} $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME) + # The following objects should be built using the stub interfaces tclWinReg.${OBJEXT} : tclWinReg.c -- cgit v0.12 From e36f3e7da91243181a532395a37c07675e685c00 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 19 Dec 2008 11:20:30 +0000 Subject: regen (with autoconf 2.61, since that's what I've got...) --- unix/configure | 12628 +++++++++++++++++++++++++++---------------------------- 1 file changed, 6295 insertions(+), 6333 deletions(-) diff --git a/unix/configure b/unix/configure index 9f54c93..bbdcde9 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,181 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_LIB RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +ZLIB_DIR +ZLIB_OBJS +ZLIB_SRCS +ZLIB_INCLUDE +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +PKG_CFG_ARGS +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +780,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +843,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +908,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +938,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1012,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1074,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1118,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1138,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1177,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1275,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1292,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1358,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1465,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1479,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1501,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1511,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1533,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1544,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1558,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1596,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1629,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1677,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1703,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1716,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1745,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1762,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1786,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1359,24 +1824,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1385,36 +1849,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1437,8 +1902,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1451,32 +1916,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1489,36 +1956,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1531,74 +2013,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1612,7 +2054,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1623,6 +2065,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1640,22 +2083,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1668,36 +2112,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1710,29 +2156,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1745,21 +2207,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1784,47 +2260,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1836,19 +2342,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1867,22 +2375,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1893,9 +2406,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1909,14 +2421,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1936,14 +2448,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1961,12 +2479,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1989,50 +2507,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2048,38 +2565,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2095,12 +2692,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2134,12 +2731,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2154,266 +2756,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2446,8 +2898,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2481,24 +2933,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2507,9 +2957,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2519,24 +2970,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2547,6 +2996,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2564,8 +3014,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2588,24 +3038,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2614,9 +3062,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2626,24 +3075,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2654,6 +3101,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2676,23 +3124,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2716,35 +3311,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2800,6 +3391,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2819,18 +3411,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2843,12 +3444,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2871,9 +3474,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2887,38 +3490,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2930,8 +3530,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2971,39 +3571,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3014,17 +3611,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3035,41 +3632,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3078,24 +3671,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3103,9 +3694,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3129,25 +3721,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3162,17 +3747,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3183,41 +3768,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3226,24 +3807,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3251,9 +3830,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3277,25 +3857,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3310,17 +3883,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3331,41 +3904,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3374,24 +3943,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3399,9 +3966,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3425,25 +3993,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3462,17 +4023,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3483,41 +4044,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3526,24 +4083,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3551,9 +4106,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3577,25 +4133,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3664,17 +4213,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3685,41 +4234,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3728,24 +4273,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3753,9 +4296,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3779,25 +4323,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3854,17 +4391,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3875,41 +4412,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3918,24 +4451,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3943,9 +4474,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3969,25 +4501,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4002,17 +4527,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4023,41 +4548,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4066,24 +4587,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4091,9 +4610,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4117,25 +4637,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4155,18 +4668,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4177,41 +4691,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4220,24 +4730,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4245,9 +4753,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4271,25 +4780,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4309,8 +4812,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4332,39 +4835,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4375,13 +4874,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4413,8 +4912,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4427,56 +4926,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4489,8 +4985,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4503,56 +4999,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4565,8 +5058,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4579,56 +5072,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4639,8 +5129,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4653,56 +5143,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4710,8 +5197,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4724,56 +5211,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4798,9 +5282,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4826,68 +5310,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4900,8 +5376,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4909,15 +5385,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -4929,11 +5405,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4962,8 +5438,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4990,76 +5466,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5076,46 +5543,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5126,8 +5590,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5144,62 +5608,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5210,41 +5671,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5253,24 +5710,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5278,9 +5733,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5304,25 +5760,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5355,8 +5804,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5383,68 +5832,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5452,8 +5892,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5480,73 +5920,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5559,56 +5990,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5621,8 +6049,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5649,68 +6077,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5718,8 +6137,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5746,73 +6165,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5825,56 +6235,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5887,15 +6294,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5905,12 +6312,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5926,17 +6333,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5947,41 +6354,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5990,24 +6393,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6015,9 +6416,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6041,31 +6443,24 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then - echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6077,50 +6472,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +typedef gz_header ac__type_new_; int main () { -if ((gz_header *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (gz_header)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_gz_header=no + ac_cv_type_gz_header=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } if test $ac_cv_type_gz_header = yes; then : else @@ -6135,13 +6527,12 @@ fi if test $zlib_ok = yes; then - echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6149,115 +6540,73 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -deflateSetHeader (); +return deflateSetHeader (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_deflateSetHeader=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_deflateSetHeader" = no; then - for ac_lib in z; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflateSetHeader (); -int -main () -{ -deflateSetHeader (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + : +else + ac_cv_search_deflateSetHeader=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 -if test "$ac_cv_search_deflateSetHeader" != no; then - test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else @@ -6271,11 +6620,14 @@ fi if test $zlib_ok = no; then - ZLIB_DIR=\${TOP_DIR}/compat/zlib/ + ZLIB_DIR=\${COMPAT_DIR}/zlib + + ZLIB_OBJS=\${ZLIB_OBJS} + + ZLIB_SRCS=\${ZLIB_SRCS} - ZLIB_LIB=libz.a + ZLIB_INCLUDE=-I\${ZLIB_DIR} - CFLAGS="$CFLAGS -I\${ZLIB_DIR}" fi @@ -6294,8 +6646,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6308,32 +6660,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6346,27 +6700,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6375,31 +6743,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6409,8 +6777,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6434,40 +6802,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6481,24 +6846,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6525,16 +6890,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6547,56 +6912,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6639,8 +7001,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6653,25 +7015,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6697,8 +7061,8 @@ fi CC=${CC}_r ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6776,12 +7140,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6801,8 +7163,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6815,56 +7177,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6896,8 +7255,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6910,56 +7269,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7020,8 +7376,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7034,56 +7390,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7154,8 +7507,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7168,56 +7521,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7349,8 +7699,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7373,40 +7723,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7495,8 +7842,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7522,8 +7869,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7554,8 +7901,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7581,8 +7928,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7646,8 +7993,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7670,40 +8017,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7712,8 +8056,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7736,40 +8080,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7795,8 +8136,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7819,40 +8160,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7871,8 +8209,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7895,40 +8233,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7955,21 +8290,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8003,35 +8338,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8042,8 +8374,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8059,8 +8391,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8084,42 +8416,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8455,25 +8784,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8484,41 +8813,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8527,24 +8852,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8552,9 +8875,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8578,25 +8902,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8605,8 +8922,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8681,8 +8998,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8705,40 +9022,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8773,13 +9087,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8924,22 +9238,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8949,8 +9263,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -8985,11 +9299,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -9010,8 +9324,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9033,33 +9347,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9076,37 +9385,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9138,33 +9444,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9181,37 +9482,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9243,33 +9541,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9286,37 +9579,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9329,17 +9619,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9362,35 +9652,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9412,34 +9698,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9448,20 +9731,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9483,38 +9766,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9523,8 +9802,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9546,38 +9825,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9591,9 +9866,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9619,68 +9894,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9689,8 +9956,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9712,35 +9979,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9751,11 +10014,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9765,8 +10028,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9783,7 +10046,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9792,27 +10056,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9835,40 +10094,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9878,11 +10133,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9893,27 +10148,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -9929,8 +10179,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9938,27 +10190,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9971,13 +10237,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -10006,9 +10275,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10034,68 +10303,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10119,9 +10380,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10147,88 +10408,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10255,68 +10506,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10327,8 +10569,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10355,68 +10597,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10427,8 +10660,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10455,68 +10688,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10527,8 +10751,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10555,68 +10779,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10634,8 +10849,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10662,68 +10877,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10735,8 +10941,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10763,72 +10969,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10856,38 +11053,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10905,8 +11098,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10933,72 +11126,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11029,38 +11213,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11069,8 +11249,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11101,38 +11281,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11152,8 +11328,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11180,72 +11356,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11276,38 +11443,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11316,8 +11479,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11348,38 +11511,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11399,8 +11558,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11427,72 +11586,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11523,38 +11673,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11563,8 +11709,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11595,38 +11741,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11646,8 +11788,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11674,72 +11816,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11770,38 +11903,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11810,8 +11939,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11842,38 +11971,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11926,8 +12051,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11954,72 +12079,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12050,38 +12166,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12090,8 +12202,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12122,38 +12234,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12162,8 +12270,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12192,38 +12300,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12244,8 +12348,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12272,72 +12376,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12371,38 +12466,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12411,8 +12502,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12446,38 +12537,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12511,18 +12598,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12533,41 +12621,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12576,24 +12660,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12601,9 +12683,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12627,25 +12710,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12657,8 +12734,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12686,13 +12763,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12705,8 +12791,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12730,13 +12818,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12749,8 +12846,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12776,13 +12875,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12795,8 +12903,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12824,13 +12934,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12843,8 +12962,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12871,13 +12992,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12890,8 +13020,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12919,13 +13051,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12938,12 +13079,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12973,8 +13116,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12995,42 +13138,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13053,8 +13192,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13076,8 +13215,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13093,44 +13232,42 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13144,18 +13281,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13166,41 +13304,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13209,24 +13343,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13234,9 +13366,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13260,25 +13393,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13290,8 +13417,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13315,38 +13442,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13355,8 +13478,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13381,33 +13504,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13428,40 +13546,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13478,9 +13593,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 -if test "${ac_cv_var_tzname+set}" = set; then + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13490,71 +13605,137 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif int main () { -atoi(*tzname); +#ifndef tzname + (void) tzname; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_var_tzname=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_have_decl_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 - if test $ac_cv_var_tzname = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 _ACEOF - fi -fi +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF +fi -for ac_func in gmtime_r localtime_r mktime -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } +if test "${ac_cv_var_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_var_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + + fi +fi + + + + + +for ac_func in gmtime_r localtime_r mktime +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13580,68 +13761,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13651,8 +13824,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13673,38 +13846,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13713,8 +13882,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13735,38 +13904,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13779,8 +13944,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13803,38 +13968,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13845,8 +14006,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13869,38 +14030,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13916,9 +14073,8 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13940,33 +14096,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13984,40 +14135,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14032,8 +14180,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14060,68 +14208,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -14138,8 +14277,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14158,9 +14297,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14176,9 +14315,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14186,13 +14325,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14205,17 +14353,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14226,8 +14374,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14254,68 +14402,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14339,8 +14478,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14367,68 +14506,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14436,8 +14566,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14456,13 +14586,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14475,11 +14614,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14487,12 +14628,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14506,8 +14645,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14534,68 +14673,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14603,8 +14733,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14624,13 +14754,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14643,11 +14782,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14655,12 +14796,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14673,8 +14812,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14701,68 +14840,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14770,8 +14900,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14791,13 +14921,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14810,11 +14949,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14822,12 +14963,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14842,8 +14981,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14870,68 +15009,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14939,8 +15069,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14976,13 +15106,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14995,18 +15134,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15024,8 +15163,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15036,50 +15175,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -15090,8 +15226,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15102,50 +15238,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -15156,8 +15289,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15168,62 +15301,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15245,8 +15375,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15261,8 +15391,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15288,38 +15418,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15328,8 +15454,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15340,50 +15466,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15393,8 +15516,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15419,40 +15542,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15463,8 +15582,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15475,50 +15594,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15528,8 +15644,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15555,40 +15671,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15607,8 +15719,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15635,68 +15747,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15716,8 +15819,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15743,39 +15846,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15790,8 +15890,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15818,68 +15918,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15887,8 +15978,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15901,56 +15992,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15959,8 +16047,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15973,56 +16061,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16031,12 +16116,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -16053,8 +16136,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16081,68 +16164,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16151,8 +16225,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16179,68 +16253,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16254,8 +16319,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16278,8 +16343,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16295,8 +16360,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16318,38 +16383,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16357,8 +16418,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16382,38 +16443,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16426,8 +16483,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16462,13 +16519,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16481,11 +16547,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16499,28 +16567,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16531,41 +16599,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16574,24 +16638,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16599,9 +16661,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16625,25 +16688,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16654,8 +16710,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16677,39 +16733,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16718,8 +16770,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16732,9 +16784,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16760,68 +16812,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16835,8 +16879,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16859,39 +16903,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16909,9 +16950,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16937,68 +16978,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17011,18 +17044,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17033,41 +17067,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17076,24 +17106,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17101,9 +17129,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17127,25 +17156,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17161,9 +17184,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17189,68 +17212,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17264,18 +17279,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17286,41 +17302,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17329,24 +17341,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17354,9 +17364,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17380,25 +17391,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17414,9 +17419,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17442,68 +17447,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17516,9 +17513,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17544,68 +17541,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17639,18 +17628,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17661,41 +17651,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17704,24 +17690,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17729,9 +17713,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17755,25 +17740,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17786,8 +17765,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17818,40 +17797,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17872,8 +17848,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17902,39 +17878,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17954,18 +17927,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17976,41 +17950,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18019,24 +17989,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18044,9 +18012,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18070,25 +18039,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18104,18 +18067,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18126,41 +18090,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18169,24 +18129,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18194,9 +18152,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18220,25 +18179,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18251,8 +18204,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18279,12 +18232,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18297,8 +18250,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18306,27 +18259,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18334,8 +18287,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18343,24 +18296,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18384,8 +18337,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18398,8 +18351,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18407,26 +18360,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18437,41 +18390,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18480,24 +18429,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18505,9 +18452,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18531,25 +18479,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18563,8 +18504,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18580,31 +18521,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18628,8 +18570,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18658,15 +18600,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18680,16 +18622,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18701,7 +18643,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18714,7 +18656,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18814,13 +18756,6 @@ TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" -if test $zlib_ok = no; then - - LD_SEARCH_FLAGS="\${ZLIB_LIBRARY} ${LD_SEARCH_FLAGS}" - -fi - - #------------------------------------------------------------------------ # tclConfig.sh refers to this by a different name #------------------------------------------------------------------------ @@ -18890,7 +18825,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18910,39 +18845,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18951,52 +18905,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -19025,17 +18963,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19045,8 +19011,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -19060,18 +19061,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19079,159 +19081,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19240,7 +19203,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19249,31 +19233,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19281,30 +19248,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19312,7 +19268,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19326,18 +19282,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19348,60 +19306,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19417,40 +19357,52 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19461,525 +19413,535 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@ZLIB_DIR@,$ZLIB_DIR,;t t -s,@ZLIB_LIB@,$ZLIB_LIB,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +ZLIB_DIR!$ZLIB_DIR$ac_delim +ZLIB_OBJS!$ZLIB_OBJS$ac_delim +ZLIB_SRCS!$ZLIB_SRCS$ac_delim +ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 34; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From bfa6d081abacd1d00e3a459c3d89039849818d6a Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 14:10:45 +0000 Subject: whitespace --- ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0a0e5f..5034f3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2008-12-19 Jan Nijtmans - * generic/tclInt.decls CONSTify TclGetLoadedPackages second param - * generic/tclLoad.c - * generic/tclIntDecls.h (regenerated) + * generic/tclInt.decls CONSTify TclGetLoadedPackages second param + * generic/tclLoad.c + * generic/tclIntDecls.h (regenerated) 2008-12-19 Don Porter -- cgit v0.12 From 2cd073ec4bf5ea28c2f1d7db65f4ce95cc875611 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 19 Dec 2008 14:44:48 +0000 Subject: Add previously omitted files so we have a complete zlib 1.2.3 distro... --- compat/zlib/contrib/README.contrib | 71 + compat/zlib/contrib/ada/buffer_demo.adb | 106 ++ compat/zlib/contrib/ada/mtest.adb | 156 ++ compat/zlib/contrib/ada/read.adb | 156 ++ compat/zlib/contrib/ada/readme.txt | 65 + compat/zlib/contrib/ada/test.adb | 463 ++++++ compat/zlib/contrib/ada/zlib-streams.adb | 225 +++ compat/zlib/contrib/ada/zlib-streams.ads | 114 ++ compat/zlib/contrib/ada/zlib-thin.adb | 141 ++ compat/zlib/contrib/ada/zlib-thin.ads | 450 ++++++ compat/zlib/contrib/ada/zlib.adb | 701 +++++++++ compat/zlib/contrib/ada/zlib.ads | 328 ++++ compat/zlib/contrib/ada/zlib.gpr | 20 + compat/zlib/contrib/asm586/README.586 | 43 + compat/zlib/contrib/asm586/match.S | 364 +++++ compat/zlib/contrib/asm686/README.686 | 34 + compat/zlib/contrib/asm686/match.S | 329 ++++ compat/zlib/contrib/blast/Makefile | 8 + compat/zlib/contrib/blast/README | 4 + compat/zlib/contrib/blast/blast.c | 444 ++++++ compat/zlib/contrib/blast/blast.h | 71 + compat/zlib/contrib/blast/test.pk | Bin 0 -> 8 bytes compat/zlib/contrib/blast/test.txt | 1 + compat/zlib/contrib/delphi/ZLib.pas | 557 +++++++ compat/zlib/contrib/delphi/ZLibConst.pas | 11 + compat/zlib/contrib/delphi/readme.txt | 76 + compat/zlib/contrib/delphi/zlibd32.mak | 93 ++ compat/zlib/contrib/dotzlib/DotZLib.build | 33 + compat/zlib/contrib/dotzlib/DotZLib.chm | Bin 0 -> 72728 bytes compat/zlib/contrib/dotzlib/DotZLib.sln | 21 + .../zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs | 58 + .../zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs | 202 +++ .../zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs | 83 + compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs | 198 +++ compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs | 106 ++ compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs | 288 ++++ compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj | 141 ++ compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs | 301 ++++ compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs | 105 ++ compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 274 ++++ compat/zlib/contrib/dotzlib/LICENSE_1_0.txt | 23 + compat/zlib/contrib/dotzlib/readme.txt | 58 + compat/zlib/contrib/infback9/README | 1 + compat/zlib/contrib/infback9/infback9.c | 608 ++++++++ compat/zlib/contrib/infback9/infback9.h | 37 + compat/zlib/contrib/infback9/inffix9.h | 107 ++ compat/zlib/contrib/infback9/inflate9.h | 47 + compat/zlib/contrib/infback9/inftree9.c | 323 ++++ compat/zlib/contrib/infback9/inftree9.h | 55 + compat/zlib/contrib/inflate86/inffas86.c | 1157 ++++++++++++++ compat/zlib/contrib/inflate86/inffast.S | 1368 +++++++++++++++++ compat/zlib/contrib/iostream/test.cpp | 24 + compat/zlib/contrib/iostream/zfstream.cpp | 329 ++++ compat/zlib/contrib/iostream/zfstream.h | 128 ++ compat/zlib/contrib/iostream2/zstream.h | 307 ++++ compat/zlib/contrib/iostream2/zstream_test.cpp | 25 + compat/zlib/contrib/iostream3/README | 35 + compat/zlib/contrib/iostream3/TODO | 17 + compat/zlib/contrib/iostream3/test.cc | 50 + compat/zlib/contrib/iostream3/zfstream.cc | 479 ++++++ compat/zlib/contrib/iostream3/zfstream.h | 466 ++++++ compat/zlib/contrib/masm686/match.asm | 413 +++++ compat/zlib/contrib/masmx64/bld_ml64.bat | 2 + compat/zlib/contrib/masmx64/gvmat64.asm | 513 +++++++ compat/zlib/contrib/masmx64/gvmat64.obj | Bin 0 -> 4119 bytes compat/zlib/contrib/masmx64/inffas8664.c | 186 +++ compat/zlib/contrib/masmx64/inffasx64.asm | 392 +++++ compat/zlib/contrib/masmx64/inffasx64.obj | Bin 0 -> 5913 bytes compat/zlib/contrib/masmx64/readme.txt | 28 + compat/zlib/contrib/masmx86/bld_ml32.bat | 2 + compat/zlib/contrib/masmx86/gvmat32.asm | 972 ++++++++++++ compat/zlib/contrib/masmx86/gvmat32.obj | Bin 0 -> 10241 bytes compat/zlib/contrib/masmx86/gvmat32c.c | 62 + compat/zlib/contrib/masmx86/inffas32.asm | 1083 +++++++++++++ compat/zlib/contrib/masmx86/inffas32.obj | Bin 0 -> 14893 bytes compat/zlib/contrib/masmx86/mkasm.bat | 3 + compat/zlib/contrib/masmx86/readme.txt | 21 + compat/zlib/contrib/minizip/ChangeLogUnzip | 67 + compat/zlib/contrib/minizip/Makefile | 25 + compat/zlib/contrib/minizip/crypt.h | 132 ++ compat/zlib/contrib/minizip/ioapi.c | 177 +++ compat/zlib/contrib/minizip/ioapi.h | 75 + compat/zlib/contrib/minizip/iowin32.c | 270 ++++ compat/zlib/contrib/minizip/iowin32.h | 21 + compat/zlib/contrib/minizip/miniunz.c | 585 +++++++ compat/zlib/contrib/minizip/minizip.c | 420 +++++ compat/zlib/contrib/minizip/mztools.c | 281 ++++ compat/zlib/contrib/minizip/mztools.h | 31 + compat/zlib/contrib/minizip/unzip.c | 1598 ++++++++++++++++++++ compat/zlib/contrib/minizip/unzip.h | 354 +++++ compat/zlib/contrib/minizip/zip.c | 1219 +++++++++++++++ compat/zlib/contrib/minizip/zip.h | 235 +++ compat/zlib/contrib/pascal/example.pas | 599 ++++++++ compat/zlib/contrib/pascal/readme.txt | 76 + compat/zlib/contrib/pascal/zlibd32.mak | 93 ++ compat/zlib/contrib/pascal/zlibpas.pas | 236 +++ compat/zlib/contrib/puff/Makefile | 8 + compat/zlib/contrib/puff/README | 63 + compat/zlib/contrib/puff/puff.c | 837 ++++++++++ compat/zlib/contrib/puff/puff.h | 31 + compat/zlib/contrib/puff/zeros.raw | Bin 0 -> 1213 bytes compat/zlib/contrib/testzlib/testzlib.c | 275 ++++ compat/zlib/contrib/testzlib/testzlib.txt | 10 + compat/zlib/contrib/untgz/Makefile | 14 + compat/zlib/contrib/untgz/Makefile.msc | 17 + compat/zlib/contrib/untgz/untgz.c | 674 +++++++++ compat/zlib/contrib/vstudio/readme.txt | 73 + compat/zlib/contrib/vstudio/vc7/miniunz.vcproj | 126 ++ compat/zlib/contrib/vstudio/vc7/minizip.vcproj | 126 ++ compat/zlib/contrib/vstudio/vc7/testzlib.vcproj | 126 ++ compat/zlib/contrib/vstudio/vc7/zlib.rc | 32 + compat/zlib/contrib/vstudio/vc7/zlibstat.vcproj | 246 +++ compat/zlib/contrib/vstudio/vc7/zlibvc.def | 92 ++ compat/zlib/contrib/vstudio/vc7/zlibvc.sln | 78 + compat/zlib/contrib/vstudio/vc7/zlibvc.vcproj | 445 ++++++ compat/zlib/contrib/vstudio/vc8/miniunz.vcproj | 566 +++++++ compat/zlib/contrib/vstudio/vc8/minizip.vcproj | 563 +++++++ compat/zlib/contrib/vstudio/vc8/testzlib.vcproj | 948 ++++++++++++ compat/zlib/contrib/vstudio/vc8/testzlibdll.vcproj | 567 +++++++ compat/zlib/contrib/vstudio/vc8/zlib.rc | 32 + compat/zlib/contrib/vstudio/vc8/zlibstat.vcproj | 870 +++++++++++ compat/zlib/contrib/vstudio/vc8/zlibvc.def | 92 ++ compat/zlib/contrib/vstudio/vc8/zlibvc.sln | 144 ++ compat/zlib/contrib/vstudio/vc8/zlibvc.vcproj | 1219 +++++++++++++++ compat/zlib/example.c | 565 +++++++ compat/zlib/examples/README.examples | 42 + compat/zlib/examples/fitblk.c | 233 +++ compat/zlib/examples/gun.c | 693 +++++++++ compat/zlib/examples/gzappend.c | 500 ++++++ compat/zlib/examples/gzjoin.c | 448 ++++++ compat/zlib/examples/gzlog.c | 413 +++++ compat/zlib/examples/gzlog.h | 58 + compat/zlib/examples/zlib_how.html | 523 +++++++ compat/zlib/examples/zpipe.c | 191 +++ compat/zlib/examples/zran.c | 404 +++++ compat/zlib/make_vms.com | 461 ++++++ compat/zlib/minigzip.c | 322 ++++ compat/zlib/old/Makefile.riscos | 151 ++ compat/zlib/old/README | 3 + compat/zlib/old/descrip.mms | 48 + compat/zlib/old/os2/Makefile.os2 | 136 ++ compat/zlib/old/os2/zlib.def | 51 + compat/zlib/old/visual-basic.txt | 160 ++ compat/zlib/old/zlib.html | 971 ++++++++++++ compat/zlib/projects/README.projects | 41 + compat/zlib/projects/visualc6/README.txt | 73 + compat/zlib/projects/visualc6/example.dsp | 278 ++++ compat/zlib/projects/visualc6/minigzip.dsp | 278 ++++ compat/zlib/projects/visualc6/zlib.dsp | 609 ++++++++ compat/zlib/projects/visualc6/zlib.dsw | 59 + 150 files changed, 38641 insertions(+) create mode 100644 compat/zlib/contrib/README.contrib create mode 100644 compat/zlib/contrib/ada/buffer_demo.adb create mode 100644 compat/zlib/contrib/ada/mtest.adb create mode 100644 compat/zlib/contrib/ada/read.adb create mode 100644 compat/zlib/contrib/ada/readme.txt create mode 100644 compat/zlib/contrib/ada/test.adb create mode 100644 compat/zlib/contrib/ada/zlib-streams.adb create mode 100644 compat/zlib/contrib/ada/zlib-streams.ads create mode 100644 compat/zlib/contrib/ada/zlib-thin.adb create mode 100644 compat/zlib/contrib/ada/zlib-thin.ads create mode 100644 compat/zlib/contrib/ada/zlib.adb create mode 100644 compat/zlib/contrib/ada/zlib.ads create mode 100644 compat/zlib/contrib/ada/zlib.gpr create mode 100644 compat/zlib/contrib/asm586/README.586 create mode 100644 compat/zlib/contrib/asm586/match.S create mode 100644 compat/zlib/contrib/asm686/README.686 create mode 100644 compat/zlib/contrib/asm686/match.S create mode 100644 compat/zlib/contrib/blast/Makefile create mode 100644 compat/zlib/contrib/blast/README create mode 100644 compat/zlib/contrib/blast/blast.c create mode 100644 compat/zlib/contrib/blast/blast.h create mode 100644 compat/zlib/contrib/blast/test.pk create mode 100644 compat/zlib/contrib/blast/test.txt create mode 100644 compat/zlib/contrib/delphi/ZLib.pas create mode 100644 compat/zlib/contrib/delphi/ZLibConst.pas create mode 100644 compat/zlib/contrib/delphi/readme.txt create mode 100644 compat/zlib/contrib/delphi/zlibd32.mak create mode 100644 compat/zlib/contrib/dotzlib/DotZLib.build create mode 100644 compat/zlib/contrib/dotzlib/DotZLib.chm create mode 100644 compat/zlib/contrib/dotzlib/DotZLib.sln create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs create mode 100644 compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs create mode 100644 compat/zlib/contrib/dotzlib/LICENSE_1_0.txt create mode 100644 compat/zlib/contrib/dotzlib/readme.txt create mode 100644 compat/zlib/contrib/infback9/README create mode 100644 compat/zlib/contrib/infback9/infback9.c create mode 100644 compat/zlib/contrib/infback9/infback9.h create mode 100644 compat/zlib/contrib/infback9/inffix9.h create mode 100644 compat/zlib/contrib/infback9/inflate9.h create mode 100644 compat/zlib/contrib/infback9/inftree9.c create mode 100644 compat/zlib/contrib/infback9/inftree9.h create mode 100644 compat/zlib/contrib/inflate86/inffas86.c create mode 100644 compat/zlib/contrib/inflate86/inffast.S create mode 100644 compat/zlib/contrib/iostream/test.cpp create mode 100644 compat/zlib/contrib/iostream/zfstream.cpp create mode 100644 compat/zlib/contrib/iostream/zfstream.h create mode 100644 compat/zlib/contrib/iostream2/zstream.h create mode 100644 compat/zlib/contrib/iostream2/zstream_test.cpp create mode 100644 compat/zlib/contrib/iostream3/README create mode 100644 compat/zlib/contrib/iostream3/TODO create mode 100644 compat/zlib/contrib/iostream3/test.cc create mode 100644 compat/zlib/contrib/iostream3/zfstream.cc create mode 100644 compat/zlib/contrib/iostream3/zfstream.h create mode 100644 compat/zlib/contrib/masm686/match.asm create mode 100644 compat/zlib/contrib/masmx64/bld_ml64.bat create mode 100644 compat/zlib/contrib/masmx64/gvmat64.asm create mode 100644 compat/zlib/contrib/masmx64/gvmat64.obj create mode 100644 compat/zlib/contrib/masmx64/inffas8664.c create mode 100644 compat/zlib/contrib/masmx64/inffasx64.asm create mode 100644 compat/zlib/contrib/masmx64/inffasx64.obj create mode 100644 compat/zlib/contrib/masmx64/readme.txt create mode 100644 compat/zlib/contrib/masmx86/bld_ml32.bat create mode 100644 compat/zlib/contrib/masmx86/gvmat32.asm create mode 100644 compat/zlib/contrib/masmx86/gvmat32.obj create mode 100644 compat/zlib/contrib/masmx86/gvmat32c.c create mode 100644 compat/zlib/contrib/masmx86/inffas32.asm create mode 100644 compat/zlib/contrib/masmx86/inffas32.obj create mode 100755 compat/zlib/contrib/masmx86/mkasm.bat create mode 100644 compat/zlib/contrib/masmx86/readme.txt create mode 100644 compat/zlib/contrib/minizip/ChangeLogUnzip create mode 100644 compat/zlib/contrib/minizip/Makefile create mode 100644 compat/zlib/contrib/minizip/crypt.h create mode 100644 compat/zlib/contrib/minizip/ioapi.c create mode 100644 compat/zlib/contrib/minizip/ioapi.h create mode 100644 compat/zlib/contrib/minizip/iowin32.c create mode 100644 compat/zlib/contrib/minizip/iowin32.h create mode 100644 compat/zlib/contrib/minizip/miniunz.c create mode 100644 compat/zlib/contrib/minizip/minizip.c create mode 100644 compat/zlib/contrib/minizip/mztools.c create mode 100644 compat/zlib/contrib/minizip/mztools.h create mode 100644 compat/zlib/contrib/minizip/unzip.c create mode 100644 compat/zlib/contrib/minizip/unzip.h create mode 100644 compat/zlib/contrib/minizip/zip.c create mode 100644 compat/zlib/contrib/minizip/zip.h create mode 100644 compat/zlib/contrib/pascal/example.pas create mode 100644 compat/zlib/contrib/pascal/readme.txt create mode 100644 compat/zlib/contrib/pascal/zlibd32.mak create mode 100644 compat/zlib/contrib/pascal/zlibpas.pas create mode 100644 compat/zlib/contrib/puff/Makefile create mode 100644 compat/zlib/contrib/puff/README create mode 100644 compat/zlib/contrib/puff/puff.c create mode 100644 compat/zlib/contrib/puff/puff.h create mode 100644 compat/zlib/contrib/puff/zeros.raw create mode 100644 compat/zlib/contrib/testzlib/testzlib.c create mode 100644 compat/zlib/contrib/testzlib/testzlib.txt create mode 100644 compat/zlib/contrib/untgz/Makefile create mode 100644 compat/zlib/contrib/untgz/Makefile.msc create mode 100644 compat/zlib/contrib/untgz/untgz.c create mode 100644 compat/zlib/contrib/vstudio/readme.txt create mode 100644 compat/zlib/contrib/vstudio/vc7/miniunz.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc7/minizip.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc7/testzlib.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc7/zlib.rc create mode 100644 compat/zlib/contrib/vstudio/vc7/zlibstat.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc7/zlibvc.def create mode 100644 compat/zlib/contrib/vstudio/vc7/zlibvc.sln create mode 100644 compat/zlib/contrib/vstudio/vc7/zlibvc.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc8/miniunz.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc8/minizip.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc8/testzlib.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc8/testzlibdll.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc8/zlib.rc create mode 100644 compat/zlib/contrib/vstudio/vc8/zlibstat.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc8/zlibvc.def create mode 100644 compat/zlib/contrib/vstudio/vc8/zlibvc.sln create mode 100644 compat/zlib/contrib/vstudio/vc8/zlibvc.vcproj create mode 100644 compat/zlib/example.c create mode 100644 compat/zlib/examples/README.examples create mode 100644 compat/zlib/examples/fitblk.c create mode 100644 compat/zlib/examples/gun.c create mode 100644 compat/zlib/examples/gzappend.c create mode 100644 compat/zlib/examples/gzjoin.c create mode 100644 compat/zlib/examples/gzlog.c create mode 100644 compat/zlib/examples/gzlog.h create mode 100644 compat/zlib/examples/zlib_how.html create mode 100644 compat/zlib/examples/zpipe.c create mode 100644 compat/zlib/examples/zran.c create mode 100644 compat/zlib/make_vms.com create mode 100644 compat/zlib/minigzip.c create mode 100644 compat/zlib/old/Makefile.riscos create mode 100644 compat/zlib/old/README create mode 100644 compat/zlib/old/descrip.mms create mode 100644 compat/zlib/old/os2/Makefile.os2 create mode 100644 compat/zlib/old/os2/zlib.def create mode 100644 compat/zlib/old/visual-basic.txt create mode 100644 compat/zlib/old/zlib.html create mode 100644 compat/zlib/projects/README.projects create mode 100644 compat/zlib/projects/visualc6/README.txt create mode 100644 compat/zlib/projects/visualc6/example.dsp create mode 100644 compat/zlib/projects/visualc6/minigzip.dsp create mode 100644 compat/zlib/projects/visualc6/zlib.dsp create mode 100644 compat/zlib/projects/visualc6/zlib.dsw diff --git a/compat/zlib/contrib/README.contrib b/compat/zlib/contrib/README.contrib new file mode 100644 index 0000000..20afc62 --- /dev/null +++ b/compat/zlib/contrib/README.contrib @@ -0,0 +1,71 @@ +All files under this contrib directory are UNSUPPORTED. There were +provided by users of zlib and were not tested by the authors of zlib. +Use at your own risk. Please contact the authors of the contributions +for help about these, not the zlib authors. Thanks. + + +ada/ by Dmitriy Anisimkov + Support for Ada + See http://zlib-ada.sourceforge.net/ + +asm586/ +asm686/ by Brian Raiter + asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax + See http://www.muppetlabs.com/~breadbox/software/assembly.html + +blast/ by Mark Adler + Decompressor for output of PKWare Data Compression Library (DCL) + +delphi/ by Cosmin Truta + Support for Delphi and C++ Builder + +dotzlib/ by Henrik Ravn + Support for Microsoft .Net and Visual C++ .Net + +infback9/ by Mark Adler + Unsupported diffs to infback to decode the deflate64 format + +inflate86/ by Chris Anderson + Tuned x86 gcc asm code to replace inflate_fast() + +iostream/ by Kevin Ruland + A C++ I/O streams interface to the zlib gz* functions + +iostream2/ by Tyge Løvset + Another C++ I/O streams interface + +iostream3/ by Ludwig Schwardt + and Kevin Ruland + Yet another C++ I/O streams interface + +masm686/ by Dan Higdon + and Chuck Walbourn + asm code for Pentium Pro/PII, using the MASM syntax + +masmx64/ by Gilles Vollant + x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to + replace longest_match() and inflate_fast() + +masmx86/ by Gilles Vollant + x86 asm code to replace longest_match() and inflate_fast(), + for Visual C++ and MASM + +minizip/ by Gilles Vollant + Mini zip and unzip based on zlib + See http://www.winimage.com/zLibDll/unzip.html + +pascal/ by Bob Dellaca et al. + Support for Pascal + +puff/ by Mark Adler + Small, low memory usage inflate. Also serves to provide an + unambiguous description of the deflate format. + +testzlib/ by Gilles Vollant + Example of the use of zlib + +untgz/ by Pedro A. Aranda Gutierrez + A very simple tar.gz file extractor using zlib + +vstudio/ by Gilles Vollant + Building a minizip-enhanced zlib with Microsoft Visual Studio diff --git a/compat/zlib/contrib/ada/buffer_demo.adb b/compat/zlib/contrib/ada/buffer_demo.adb new file mode 100644 index 0000000..3926e6f --- /dev/null +++ b/compat/zlib/contrib/ada/buffer_demo.adb @@ -0,0 +1,106 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2004 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- +-- +-- $Id: buffer_demo.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +-- This demo program provided by Dr Steve Sangwine +-- +-- Demonstration of a problem with Zlib-Ada (already fixed) when a buffer +-- of exactly the correct size is used for decompressed data, and the last +-- few bytes passed in to Zlib are checksum bytes. + +-- This program compresses a string of text, and then decompresses the +-- compressed text into a buffer of the same size as the original text. + +with Ada.Streams; use Ada.Streams; +with Ada.Text_IO; + +with ZLib; use ZLib; + +procedure Buffer_Demo is + EOL : Character renames ASCII.LF; + Text : constant String + := "Four score and seven years ago our fathers brought forth," & EOL & + "upon this continent, a new nation, conceived in liberty," & EOL & + "and dedicated to the proposition that `all men are created equal'."; + + Source : Stream_Element_Array (1 .. Text'Length); + for Source'Address use Text'Address; + +begin + Ada.Text_IO.Put (Text); + Ada.Text_IO.New_Line; + Ada.Text_IO.Put_Line + ("Uncompressed size : " & Positive'Image (Text'Length) & " bytes"); + + declare + Compressed_Data : Stream_Element_Array (1 .. Text'Length); + L : Stream_Element_Offset; + begin + Compress : declare + Compressor : Filter_Type; + I : Stream_Element_Offset; + begin + Deflate_Init (Compressor); + + -- Compress the whole of T at once. + + Translate (Compressor, Source, I, Compressed_Data, L, Finish); + pragma Assert (I = Source'Last); + + Close (Compressor); + + Ada.Text_IO.Put_Line + ("Compressed size : " + & Stream_Element_Offset'Image (L) & " bytes"); + end Compress; + + -- Now we decompress the data, passing short blocks of data to Zlib + -- (because this demonstrates the problem - the last block passed will + -- contain checksum information and there will be no output, only a + -- check inside Zlib that the checksum is correct). + + Decompress : declare + Decompressor : Filter_Type; + + Uncompressed_Data : Stream_Element_Array (1 .. Text'Length); + + Block_Size : constant := 4; + -- This makes sure that the last block contains + -- only Adler checksum data. + + P : Stream_Element_Offset := Compressed_Data'First - 1; + O : Stream_Element_Offset; + begin + Inflate_Init (Decompressor); + + loop + Translate + (Decompressor, + Compressed_Data + (P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)), + P, + Uncompressed_Data + (Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last), + O, + No_Flush); + + Ada.Text_IO.Put_Line + ("Total in : " & Count'Image (Total_In (Decompressor)) & + ", out : " & Count'Image (Total_Out (Decompressor))); + + exit when P = L; + end loop; + + Ada.Text_IO.New_Line; + Ada.Text_IO.Put_Line + ("Decompressed text matches original text : " + & Boolean'Image (Uncompressed_Data = Source)); + end Decompress; + end; +end Buffer_Demo; diff --git a/compat/zlib/contrib/ada/mtest.adb b/compat/zlib/contrib/ada/mtest.adb new file mode 100644 index 0000000..9caaf22 --- /dev/null +++ b/compat/zlib/contrib/ada/mtest.adb @@ -0,0 +1,156 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- +-- Continuous test for ZLib multithreading. If the test would fail +-- we should provide thread safe allocation routines for the Z_Stream. +-- +-- $Id: mtest.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +with ZLib; +with Ada.Streams; +with Ada.Numerics.Discrete_Random; +with Ada.Text_IO; +with Ada.Exceptions; +with Ada.Task_Identification; + +procedure MTest is + use Ada.Streams; + use ZLib; + + Stop : Boolean := False; + + pragma Atomic (Stop); + + subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#; + + package Random_Elements is + new Ada.Numerics.Discrete_Random (Visible_Symbols); + + task type Test_Task; + + task body Test_Task is + Buffer : Stream_Element_Array (1 .. 100_000); + Gen : Random_Elements.Generator; + + Buffer_First : Stream_Element_Offset; + Compare_First : Stream_Element_Offset; + + Deflate : Filter_Type; + Inflate : Filter_Type; + + procedure Further (Item : in Stream_Element_Array); + + procedure Read_Buffer + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + + ------------- + -- Further -- + ------------- + + procedure Further (Item : in Stream_Element_Array) is + + procedure Compare (Item : in Stream_Element_Array); + + ------------- + -- Compare -- + ------------- + + procedure Compare (Item : in Stream_Element_Array) is + Next_First : Stream_Element_Offset := Compare_First + Item'Length; + begin + if Buffer (Compare_First .. Next_First - 1) /= Item then + raise Program_Error; + end if; + + Compare_First := Next_First; + end Compare; + + procedure Compare_Write is new ZLib.Write (Write => Compare); + begin + Compare_Write (Inflate, Item, No_Flush); + end Further; + + ----------------- + -- Read_Buffer -- + ----------------- + + procedure Read_Buffer + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset) + is + Buff_Diff : Stream_Element_Offset := Buffer'Last - Buffer_First; + Next_First : Stream_Element_Offset; + begin + if Item'Length <= Buff_Diff then + Last := Item'Last; + + Next_First := Buffer_First + Item'Length; + + Item := Buffer (Buffer_First .. Next_First - 1); + + Buffer_First := Next_First; + else + Last := Item'First + Buff_Diff; + Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last); + Buffer_First := Buffer'Last + 1; + end if; + end Read_Buffer; + + procedure Translate is new Generic_Translate + (Data_In => Read_Buffer, + Data_Out => Further); + + begin + Random_Elements.Reset (Gen); + + Buffer := (others => 20); + + Main : loop + for J in Buffer'Range loop + Buffer (J) := Random_Elements.Random (Gen); + + Deflate_Init (Deflate); + Inflate_Init (Inflate); + + Buffer_First := Buffer'First; + Compare_First := Buffer'First; + + Translate (Deflate); + + if Compare_First /= Buffer'Last + 1 then + raise Program_Error; + end if; + + Ada.Text_IO.Put_Line + (Ada.Task_Identification.Image + (Ada.Task_Identification.Current_Task) + & Stream_Element_Offset'Image (J) + & ZLib.Count'Image (Total_Out (Deflate))); + + Close (Deflate); + Close (Inflate); + + exit Main when Stop; + end loop; + end loop Main; + exception + when E : others => + Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E)); + Stop := True; + end Test_Task; + + Test : array (1 .. 4) of Test_Task; + + pragma Unreferenced (Test); + + Dummy : Character; + +begin + Ada.Text_IO.Get_Immediate (Dummy); + Stop := True; +end MTest; diff --git a/compat/zlib/contrib/ada/read.adb b/compat/zlib/contrib/ada/read.adb new file mode 100644 index 0000000..365d600 --- /dev/null +++ b/compat/zlib/contrib/ada/read.adb @@ -0,0 +1,156 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: read.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +-- Test/demo program for the generic read interface. + +with Ada.Numerics.Discrete_Random; +with Ada.Streams; +with Ada.Text_IO; + +with ZLib; + +procedure Read is + + use Ada.Streams; + + ------------------------------------ + -- Test configuration parameters -- + ------------------------------------ + + File_Size : Stream_Element_Offset := 100_000; + + Continuous : constant Boolean := False; + -- If this constant is True, the test would be repeated again and again, + -- with increment File_Size for every iteration. + + Header : constant ZLib.Header_Type := ZLib.Default; + -- Do not use Header other than Default in ZLib versions 1.1.4 and older. + + Init_Random : constant := 8; + -- We are using the same random sequence, in case of we catch bug, + -- so we would be able to reproduce it. + + -- End -- + + Pack_Size : Stream_Element_Offset; + Offset : Stream_Element_Offset; + + Filter : ZLib.Filter_Type; + + subtype Visible_Symbols + is Stream_Element range 16#20# .. 16#7E#; + + package Random_Elements is new + Ada.Numerics.Discrete_Random (Visible_Symbols); + + Gen : Random_Elements.Generator; + Period : constant Stream_Element_Offset := 200; + -- Period constant variable for random generator not to be very random. + -- Bigger period, harder random. + + Read_Buffer : Stream_Element_Array (1 .. 2048); + Read_First : Stream_Element_Offset; + Read_Last : Stream_Element_Offset; + + procedure Reset; + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset); + -- this procedure is for generic instantiation of + -- ZLib.Read + -- reading data from the File_In. + + procedure Read is new ZLib.Read + (Read, + Read_Buffer, + Rest_First => Read_First, + Rest_Last => Read_Last); + + ---------- + -- Read -- + ---------- + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) is + begin + Last := Stream_Element_Offset'Min + (Item'Last, + Item'First + File_Size - Offset); + + for J in Item'First .. Last loop + if J < Item'First + Period then + Item (J) := Random_Elements.Random (Gen); + else + Item (J) := Item (J - Period); + end if; + + Offset := Offset + 1; + end loop; + end Read; + + ----------- + -- Reset -- + ----------- + + procedure Reset is + begin + Random_Elements.Reset (Gen, Init_Random); + Pack_Size := 0; + Offset := 1; + Read_First := Read_Buffer'Last + 1; + Read_Last := Read_Buffer'Last; + end Reset; + +begin + Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version); + + loop + for Level in ZLib.Compression_Level'Range loop + + Ada.Text_IO.Put ("Level =" + & ZLib.Compression_Level'Image (Level)); + + -- Deflate using generic instantiation. + + ZLib.Deflate_Init + (Filter, + Level, + Header => Header); + + Reset; + + Ada.Text_IO.Put + (Stream_Element_Offset'Image (File_Size) & " ->"); + + loop + declare + Buffer : Stream_Element_Array (1 .. 1024); + Last : Stream_Element_Offset; + begin + Read (Filter, Buffer, Last); + + Pack_Size := Pack_Size + Last - Buffer'First + 1; + + exit when Last < Buffer'Last; + end; + end loop; + + Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size)); + + ZLib.Close (Filter); + end loop; + + exit when not Continuous; + + File_Size := File_Size + 1; + end loop; +end Read; diff --git a/compat/zlib/contrib/ada/readme.txt b/compat/zlib/contrib/ada/readme.txt new file mode 100644 index 0000000..ce4d2ca --- /dev/null +++ b/compat/zlib/contrib/ada/readme.txt @@ -0,0 +1,65 @@ + ZLib for Ada thick binding (ZLib.Ada) + Release 1.3 + +ZLib.Ada is a thick binding interface to the popular ZLib data +compression library, available at http://www.gzip.org/zlib/. +It provides Ada-style access to the ZLib C library. + + + Here are the main changes since ZLib.Ada 1.2: + +- Attension: ZLib.Read generic routine have a initialization requirement + for Read_Last parameter now. It is a bit incompartible with previous version, + but extends functionality, we could use new parameters Allow_Read_Some and + Flush now. + +- Added Is_Open routines to ZLib and ZLib.Streams packages. + +- Add pragma Assert to check Stream_Element is 8 bit. + +- Fix extraction to buffer with exact known decompressed size. Error reported by + Steve Sangwine. + +- Fix definition of ULong (changed to unsigned_long), fix regression on 64 bits + computers. Patch provided by Pascal Obry. + +- Add Status_Error exception definition. + +- Add pragma Assertion that Ada.Streams.Stream_Element size is 8 bit. + + + How to build ZLib.Ada under GNAT + +You should have the ZLib library already build on your computer, before +building ZLib.Ada. Make the directory of ZLib.Ada sources current and +issue the command: + + gnatmake test -largs -L -lz + +Or use the GNAT project file build for GNAT 3.15 or later: + + gnatmake -Pzlib.gpr -L + + + How to build ZLib.Ada under Aonix ObjectAda for Win32 7.2.2 + +1. Make a project with all *.ads and *.adb files from the distribution. +2. Build the libz.a library from the ZLib C sources. +3. Rename libz.a to z.lib. +4. Add the library z.lib to the project. +5. Add the libc.lib library from the ObjectAda distribution to the project. +6. Build the executable using test.adb as a main procedure. + + + How to use ZLib.Ada + +The source files test.adb and read.adb are small demo programs that show +the main functionality of ZLib.Ada. + +The routines from the package specifications are commented. + + +Homepage: http://zlib-ada.sourceforge.net/ +Author: Dmitriy Anisimkov + +Contributors: Pascal Obry , Steve Sangwine diff --git a/compat/zlib/contrib/ada/test.adb b/compat/zlib/contrib/ada/test.adb new file mode 100644 index 0000000..11a92d7 --- /dev/null +++ b/compat/zlib/contrib/ada/test.adb @@ -0,0 +1,463 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: test.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +-- The program has a few aims. +-- 1. Test ZLib.Ada95 thick binding functionality. +-- 2. Show the example of use main functionality of the ZLib.Ada95 binding. +-- 3. Build this program automatically compile all ZLib.Ada95 packages under +-- GNAT Ada95 compiler. + +with ZLib.Streams; +with Ada.Streams.Stream_IO; +with Ada.Numerics.Discrete_Random; + +with Ada.Text_IO; + +with Ada.Calendar; + +procedure Test is + + use Ada.Streams; + use Stream_IO; + + ------------------------------------ + -- Test configuration parameters -- + ------------------------------------ + + File_Size : Count := 100_000; + Continuous : constant Boolean := False; + + Header : constant ZLib.Header_Type := ZLib.Default; + -- ZLib.None; + -- ZLib.Auto; + -- ZLib.GZip; + -- Do not use Header other then Default in ZLib versions 1.1.4 + -- and older. + + Strategy : constant ZLib.Strategy_Type := ZLib.Default_Strategy; + Init_Random : constant := 10; + + -- End -- + + In_File_Name : constant String := "testzlib.in"; + -- Name of the input file + + Z_File_Name : constant String := "testzlib.zlb"; + -- Name of the compressed file. + + Out_File_Name : constant String := "testzlib.out"; + -- Name of the decompressed file. + + File_In : File_Type; + File_Out : File_Type; + File_Back : File_Type; + File_Z : ZLib.Streams.Stream_Type; + + Filter : ZLib.Filter_Type; + + Time_Stamp : Ada.Calendar.Time; + + procedure Generate_File; + -- Generate file of spetsified size with some random data. + -- The random data is repeatable, for the good compression. + + procedure Compare_Streams + (Left, Right : in out Root_Stream_Type'Class); + -- The procedure compearing data in 2 streams. + -- It is for compare data before and after compression/decompression. + + procedure Compare_Files (Left, Right : String); + -- Compare files. Based on the Compare_Streams. + + procedure Copy_Streams + (Source, Target : in out Root_Stream_Type'Class; + Buffer_Size : in Stream_Element_Offset := 1024); + -- Copying data from one stream to another. It is for test stream + -- interface of the library. + + procedure Data_In + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset); + -- this procedure is for generic instantiation of + -- ZLib.Generic_Translate. + -- reading data from the File_In. + + procedure Data_Out (Item : in Stream_Element_Array); + -- this procedure is for generic instantiation of + -- ZLib.Generic_Translate. + -- writing data to the File_Out. + + procedure Stamp; + -- Store the timestamp to the local variable. + + procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count); + -- Print the time statistic with the message. + + procedure Translate is new ZLib.Generic_Translate + (Data_In => Data_In, + Data_Out => Data_Out); + -- This procedure is moving data from File_In to File_Out + -- with compression or decompression, depend on initialization of + -- Filter parameter. + + ------------------- + -- Compare_Files -- + ------------------- + + procedure Compare_Files (Left, Right : String) is + Left_File, Right_File : File_Type; + begin + Open (Left_File, In_File, Left); + Open (Right_File, In_File, Right); + Compare_Streams (Stream (Left_File).all, Stream (Right_File).all); + Close (Left_File); + Close (Right_File); + end Compare_Files; + + --------------------- + -- Compare_Streams -- + --------------------- + + procedure Compare_Streams + (Left, Right : in out Ada.Streams.Root_Stream_Type'Class) + is + Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#); + Left_Last, Right_Last : Stream_Element_Offset; + begin + loop + Read (Left, Left_Buffer, Left_Last); + Read (Right, Right_Buffer, Right_Last); + + if Left_Last /= Right_Last then + Ada.Text_IO.Put_Line ("Compare error :" + & Stream_Element_Offset'Image (Left_Last) + & " /= " + & Stream_Element_Offset'Image (Right_Last)); + + raise Constraint_Error; + + elsif Left_Buffer (0 .. Left_Last) + /= Right_Buffer (0 .. Right_Last) + then + Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal."); + raise Constraint_Error; + + end if; + + exit when Left_Last < Left_Buffer'Last; + end loop; + end Compare_Streams; + + ------------------ + -- Copy_Streams -- + ------------------ + + procedure Copy_Streams + (Source, Target : in out Ada.Streams.Root_Stream_Type'Class; + Buffer_Size : in Stream_Element_Offset := 1024) + is + Buffer : Stream_Element_Array (1 .. Buffer_Size); + Last : Stream_Element_Offset; + begin + loop + Read (Source, Buffer, Last); + Write (Target, Buffer (1 .. Last)); + + exit when Last < Buffer'Last; + end loop; + end Copy_Streams; + + ------------- + -- Data_In -- + ------------- + + procedure Data_In + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) is + begin + Read (File_In, Item, Last); + end Data_In; + + -------------- + -- Data_Out -- + -------------- + + procedure Data_Out (Item : in Stream_Element_Array) is + begin + Write (File_Out, Item); + end Data_Out; + + ------------------- + -- Generate_File -- + ------------------- + + procedure Generate_File is + subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#; + + package Random_Elements is + new Ada.Numerics.Discrete_Random (Visible_Symbols); + + Gen : Random_Elements.Generator; + Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10; + + Buffer_Count : constant Count := File_Size / Buffer'Length; + -- Number of same buffers in the packet. + + Density : constant Count := 30; -- from 0 to Buffer'Length - 2; + + procedure Fill_Buffer (J, D : in Count); + -- Change the part of the buffer. + + ----------------- + -- Fill_Buffer -- + ----------------- + + procedure Fill_Buffer (J, D : in Count) is + begin + for K in 0 .. D loop + Buffer + (Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1)) + := Random_Elements.Random (Gen); + + end loop; + end Fill_Buffer; + + begin + Random_Elements.Reset (Gen, Init_Random); + + Create (File_In, Out_File, In_File_Name); + + Fill_Buffer (1, Buffer'Length - 2); + + for J in 1 .. Buffer_Count loop + Write (File_In, Buffer); + + Fill_Buffer (J, Density); + end loop; + + -- fill remain size. + + Write + (File_In, + Buffer + (1 .. Stream_Element_Offset + (File_Size - Buffer'Length * Buffer_Count))); + + Flush (File_In); + Close (File_In); + end Generate_File; + + --------------------- + -- Print_Statistic -- + --------------------- + + procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is + use Ada.Calendar; + use Ada.Text_IO; + + package Count_IO is new Integer_IO (ZLib.Count); + + Curr_Dur : Duration := Clock - Time_Stamp; + begin + Put (Msg); + + Set_Col (20); + Ada.Text_IO.Put ("size ="); + + Count_IO.Put + (Data_Size, + Width => Stream_IO.Count'Image (File_Size)'Length); + + Put_Line (" duration =" & Duration'Image (Curr_Dur)); + end Print_Statistic; + + ----------- + -- Stamp -- + ----------- + + procedure Stamp is + begin + Time_Stamp := Ada.Calendar.Clock; + end Stamp; + +begin + Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version); + + loop + Generate_File; + + for Level in ZLib.Compression_Level'Range loop + + Ada.Text_IO.Put_Line ("Level =" + & ZLib.Compression_Level'Image (Level)); + + -- Test generic interface. + Open (File_In, In_File, In_File_Name); + Create (File_Out, Out_File, Z_File_Name); + + Stamp; + + -- Deflate using generic instantiation. + + ZLib.Deflate_Init + (Filter => Filter, + Level => Level, + Strategy => Strategy, + Header => Header); + + Translate (Filter); + Print_Statistic ("Generic compress", ZLib.Total_Out (Filter)); + ZLib.Close (Filter); + + Close (File_In); + Close (File_Out); + + Open (File_In, In_File, Z_File_Name); + Create (File_Out, Out_File, Out_File_Name); + + Stamp; + + -- Inflate using generic instantiation. + + ZLib.Inflate_Init (Filter, Header => Header); + + Translate (Filter); + Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter)); + + ZLib.Close (Filter); + + Close (File_In); + Close (File_Out); + + Compare_Files (In_File_Name, Out_File_Name); + + -- Test stream interface. + + -- Compress to the back stream. + + Open (File_In, In_File, In_File_Name); + Create (File_Back, Out_File, Z_File_Name); + + Stamp; + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.Out_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => True, + Level => Level, + Strategy => Strategy, + Header => Header); + + Copy_Streams + (Source => Stream (File_In).all, + Target => File_Z); + + -- Flushing internal buffers to the back stream. + + ZLib.Streams.Flush (File_Z, ZLib.Finish); + + Print_Statistic ("Write compress", + ZLib.Streams.Write_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + + Close (File_In); + Close (File_Back); + + -- Compare reading from original file and from + -- decompression stream. + + Open (File_In, In_File, In_File_Name); + Open (File_Back, In_File, Z_File_Name); + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.In_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => True, + Header => Header); + + Stamp; + Compare_Streams (Stream (File_In).all, File_Z); + + Print_Statistic ("Read decompress", + ZLib.Streams.Read_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + Close (File_In); + Close (File_Back); + + -- Compress by reading from compression stream. + + Open (File_Back, In_File, In_File_Name); + Create (File_Out, Out_File, Z_File_Name); + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.In_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => False, + Level => Level, + Strategy => Strategy, + Header => Header); + + Stamp; + Copy_Streams + (Source => File_Z, + Target => Stream (File_Out).all); + + Print_Statistic ("Read compress", + ZLib.Streams.Read_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + + Close (File_Out); + Close (File_Back); + + -- Decompress to decompression stream. + + Open (File_In, In_File, Z_File_Name); + Create (File_Back, Out_File, Out_File_Name); + + ZLib.Streams.Create + (Stream => File_Z, + Mode => ZLib.Streams.Out_Stream, + Back => ZLib.Streams.Stream_Access + (Stream (File_Back)), + Back_Compressed => False, + Header => Header); + + Stamp; + + Copy_Streams + (Source => Stream (File_In).all, + Target => File_Z); + + Print_Statistic ("Write decompress", + ZLib.Streams.Write_Total_Out (File_Z)); + + ZLib.Streams.Close (File_Z); + Close (File_In); + Close (File_Back); + + Compare_Files (In_File_Name, Out_File_Name); + end loop; + + Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok."); + + exit when not Continuous; + + File_Size := File_Size + 1; + end loop; +end Test; diff --git a/compat/zlib/contrib/ada/zlib-streams.adb b/compat/zlib/contrib/ada/zlib-streams.adb new file mode 100644 index 0000000..e90ed11 --- /dev/null +++ b/compat/zlib/contrib/ada/zlib-streams.adb @@ -0,0 +1,225 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-streams.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +with Ada.Unchecked_Deallocation; + +package body ZLib.Streams is + + ----------- + -- Close -- + ----------- + + procedure Close (Stream : in out Stream_Type) is + procedure Free is new Ada.Unchecked_Deallocation + (Stream_Element_Array, Buffer_Access); + begin + if Stream.Mode = Out_Stream or Stream.Mode = Duplex then + -- We should flush the data written by the writer. + + Flush (Stream, Finish); + + Close (Stream.Writer); + end if; + + if Stream.Mode = In_Stream or Stream.Mode = Duplex then + Close (Stream.Reader); + Free (Stream.Buffer); + end if; + end Close; + + ------------ + -- Create -- + ------------ + + procedure Create + (Stream : out Stream_Type; + Mode : in Stream_Mode; + Back : in Stream_Access; + Back_Compressed : in Boolean; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Header : in Header_Type := Default; + Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size; + Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size) + is + + subtype Buffer_Subtype is Stream_Element_Array (1 .. Read_Buffer_Size); + + procedure Init_Filter + (Filter : in out Filter_Type; + Compress : in Boolean); + + ----------------- + -- Init_Filter -- + ----------------- + + procedure Init_Filter + (Filter : in out Filter_Type; + Compress : in Boolean) is + begin + if Compress then + Deflate_Init + (Filter, Level, Strategy, Header => Header); + else + Inflate_Init (Filter, Header => Header); + end if; + end Init_Filter; + + begin + Stream.Back := Back; + Stream.Mode := Mode; + + if Mode = Out_Stream or Mode = Duplex then + Init_Filter (Stream.Writer, Back_Compressed); + Stream.Buffer_Size := Write_Buffer_Size; + else + Stream.Buffer_Size := 0; + end if; + + if Mode = In_Stream or Mode = Duplex then + Init_Filter (Stream.Reader, not Back_Compressed); + + Stream.Buffer := new Buffer_Subtype; + Stream.Rest_First := Stream.Buffer'Last + 1; + Stream.Rest_Last := Stream.Buffer'Last; + end if; + end Create; + + ----------- + -- Flush -- + ----------- + + procedure Flush + (Stream : in out Stream_Type; + Mode : in Flush_Mode := Sync_Flush) + is + Buffer : Stream_Element_Array (1 .. Stream.Buffer_Size); + Last : Stream_Element_Offset; + begin + loop + Flush (Stream.Writer, Buffer, Last, Mode); + + Ada.Streams.Write (Stream.Back.all, Buffer (1 .. Last)); + + exit when Last < Buffer'Last; + end loop; + end Flush; + + ------------- + -- Is_Open -- + ------------- + + function Is_Open (Stream : Stream_Type) return Boolean is + begin + return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer); + end Is_Open; + + ---------- + -- Read -- + ---------- + + procedure Read + (Stream : in out Stream_Type; + Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) + is + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset); + + ---------- + -- Read -- + ---------- + + procedure Read + (Item : out Stream_Element_Array; + Last : out Stream_Element_Offset) is + begin + Ada.Streams.Read (Stream.Back.all, Item, Last); + end Read; + + procedure Read is new ZLib.Read + (Read => Read, + Buffer => Stream.Buffer.all, + Rest_First => Stream.Rest_First, + Rest_Last => Stream.Rest_Last); + + begin + Read (Stream.Reader, Item, Last); + end Read; + + ------------------- + -- Read_Total_In -- + ------------------- + + function Read_Total_In (Stream : in Stream_Type) return Count is + begin + return Total_In (Stream.Reader); + end Read_Total_In; + + -------------------- + -- Read_Total_Out -- + -------------------- + + function Read_Total_Out (Stream : in Stream_Type) return Count is + begin + return Total_Out (Stream.Reader); + end Read_Total_Out; + + ----------- + -- Write -- + ----------- + + procedure Write + (Stream : in out Stream_Type; + Item : in Stream_Element_Array) + is + + procedure Write (Item : in Stream_Element_Array); + + ----------- + -- Write -- + ----------- + + procedure Write (Item : in Stream_Element_Array) is + begin + Ada.Streams.Write (Stream.Back.all, Item); + end Write; + + procedure Write is new ZLib.Write + (Write => Write, + Buffer_Size => Stream.Buffer_Size); + + begin + Write (Stream.Writer, Item, No_Flush); + end Write; + + -------------------- + -- Write_Total_In -- + -------------------- + + function Write_Total_In (Stream : in Stream_Type) return Count is + begin + return Total_In (Stream.Writer); + end Write_Total_In; + + --------------------- + -- Write_Total_Out -- + --------------------- + + function Write_Total_Out (Stream : in Stream_Type) return Count is + begin + return Total_Out (Stream.Writer); + end Write_Total_Out; + +end ZLib.Streams; diff --git a/compat/zlib/contrib/ada/zlib-streams.ads b/compat/zlib/contrib/ada/zlib-streams.ads new file mode 100644 index 0000000..aeb06b5 --- /dev/null +++ b/compat/zlib/contrib/ada/zlib-streams.ads @@ -0,0 +1,114 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-streams.ads,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +package ZLib.Streams is + + type Stream_Mode is (In_Stream, Out_Stream, Duplex); + + type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class; + + type Stream_Type is + new Ada.Streams.Root_Stream_Type with private; + + procedure Read + (Stream : in out Stream_Type; + Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + + procedure Write + (Stream : in out Stream_Type; + Item : in Ada.Streams.Stream_Element_Array); + + procedure Flush + (Stream : in out Stream_Type; + Mode : in Flush_Mode := Sync_Flush); + -- Flush the written data to the back stream, + -- all data placed to the compressor is flushing to the Back stream. + -- Should not be used untill necessary, becouse it is decreasing + -- compression. + + function Read_Total_In (Stream : in Stream_Type) return Count; + pragma Inline (Read_Total_In); + -- Return total number of bytes read from back stream so far. + + function Read_Total_Out (Stream : in Stream_Type) return Count; + pragma Inline (Read_Total_Out); + -- Return total number of bytes read so far. + + function Write_Total_In (Stream : in Stream_Type) return Count; + pragma Inline (Write_Total_In); + -- Return total number of bytes written so far. + + function Write_Total_Out (Stream : in Stream_Type) return Count; + pragma Inline (Write_Total_Out); + -- Return total number of bytes written to the back stream. + + procedure Create + (Stream : out Stream_Type; + Mode : in Stream_Mode; + Back : in Stream_Access; + Back_Compressed : in Boolean; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Header : in Header_Type := Default; + Read_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size; + Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size); + -- Create the Comression/Decompression stream. + -- If mode is In_Stream then Write operation is disabled. + -- If mode is Out_Stream then Read operation is disabled. + + -- If Back_Compressed is true then + -- Data written to the Stream is compressing to the Back stream + -- and data read from the Stream is decompressed data from the Back stream. + + -- If Back_Compressed is false then + -- Data written to the Stream is decompressing to the Back stream + -- and data read from the Stream is compressed data from the Back stream. + + -- !!! When the Need_Header is False ZLib-Ada is using undocumented + -- ZLib 1.1.4 functionality to do not create/wait for ZLib headers. + + function Is_Open (Stream : Stream_Type) return Boolean; + + procedure Close (Stream : in out Stream_Type); + +private + + use Ada.Streams; + + type Buffer_Access is access all Stream_Element_Array; + + type Stream_Type + is new Root_Stream_Type with + record + Mode : Stream_Mode; + + Buffer : Buffer_Access; + Rest_First : Stream_Element_Offset; + Rest_Last : Stream_Element_Offset; + -- Buffer for Read operation. + -- We need to have this buffer in the record + -- becouse not all read data from back stream + -- could be processed during the read operation. + + Buffer_Size : Stream_Element_Offset; + -- Buffer size for write operation. + -- We do not need to have this buffer + -- in the record becouse all data could be + -- processed in the write operation. + + Back : Stream_Access; + Reader : Filter_Type; + Writer : Filter_Type; + end record; + +end ZLib.Streams; diff --git a/compat/zlib/contrib/ada/zlib-thin.adb b/compat/zlib/contrib/ada/zlib-thin.adb new file mode 100644 index 0000000..941f5d0 --- /dev/null +++ b/compat/zlib/contrib/ada/zlib-thin.adb @@ -0,0 +1,141 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-thin.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +package body ZLib.Thin is + + ZLIB_VERSION : constant Chars_Ptr := zlibVersion; + + Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit; + + -------------- + -- Avail_In -- + -------------- + + function Avail_In (Strm : in Z_Stream) return UInt is + begin + return Strm.Avail_In; + end Avail_In; + + --------------- + -- Avail_Out -- + --------------- + + function Avail_Out (Strm : in Z_Stream) return UInt is + begin + return Strm.Avail_Out; + end Avail_Out; + + ------------------ + -- Deflate_Init -- + ------------------ + + function Deflate_Init + (strm : Z_Streamp; + level : Int; + method : Int; + windowBits : Int; + memLevel : Int; + strategy : Int) + return Int is + begin + return deflateInit2 + (strm, + level, + method, + windowBits, + memLevel, + strategy, + ZLIB_VERSION, + Z_Stream_Size); + end Deflate_Init; + + ------------------ + -- Inflate_Init -- + ------------------ + + function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is + begin + return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size); + end Inflate_Init; + + ------------------------ + -- Last_Error_Message -- + ------------------------ + + function Last_Error_Message (Strm : in Z_Stream) return String is + use Interfaces.C.Strings; + begin + if Strm.msg = Null_Ptr then + return ""; + else + return Value (Strm.msg); + end if; + end Last_Error_Message; + + ------------ + -- Set_In -- + ------------ + + procedure Set_In + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt) is + begin + Strm.Next_In := Buffer; + Strm.Avail_In := Size; + end Set_In; + + ------------------ + -- Set_Mem_Func -- + ------------------ + + procedure Set_Mem_Func + (Strm : in out Z_Stream; + Opaque : in Voidp; + Alloc : in alloc_func; + Free : in free_func) is + begin + Strm.opaque := Opaque; + Strm.zalloc := Alloc; + Strm.zfree := Free; + end Set_Mem_Func; + + ------------- + -- Set_Out -- + ------------- + + procedure Set_Out + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt) is + begin + Strm.Next_Out := Buffer; + Strm.Avail_Out := Size; + end Set_Out; + + -------------- + -- Total_In -- + -------------- + + function Total_In (Strm : in Z_Stream) return ULong is + begin + return Strm.Total_In; + end Total_In; + + --------------- + -- Total_Out -- + --------------- + + function Total_Out (Strm : in Z_Stream) return ULong is + begin + return Strm.Total_Out; + end Total_Out; + +end ZLib.Thin; diff --git a/compat/zlib/contrib/ada/zlib-thin.ads b/compat/zlib/contrib/ada/zlib-thin.ads new file mode 100644 index 0000000..b38fc7c --- /dev/null +++ b/compat/zlib/contrib/ada/zlib-thin.ads @@ -0,0 +1,450 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2003 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib-thin.ads,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +with Interfaces.C.Strings; + +with System; + +private package ZLib.Thin is + + -- From zconf.h + + MAX_MEM_LEVEL : constant := 9; -- zconf.h:105 + -- zconf.h:105 + MAX_WBITS : constant := 15; -- zconf.h:115 + -- 32K LZ77 window + -- zconf.h:115 + SEEK_SET : constant := 8#0000#; -- zconf.h:244 + -- Seek from beginning of file. + -- zconf.h:244 + SEEK_CUR : constant := 1; -- zconf.h:245 + -- Seek from current position. + -- zconf.h:245 + SEEK_END : constant := 2; -- zconf.h:246 + -- Set file pointer to EOF plus "offset" + -- zconf.h:246 + + type Byte is new Interfaces.C.unsigned_char; -- 8 bits + -- zconf.h:214 + type UInt is new Interfaces.C.unsigned; -- 16 bits or more + -- zconf.h:216 + type Int is new Interfaces.C.int; + + type ULong is new Interfaces.C.unsigned_long; -- 32 bits or more + -- zconf.h:217 + subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr; + + type ULong_Access is access ULong; + type Int_Access is access Int; + + subtype Voidp is System.Address; -- zconf.h:232 + + subtype Byte_Access is Voidp; + + Nul : constant Voidp := System.Null_Address; + -- end from zconf + + Z_NO_FLUSH : constant := 8#0000#; -- zlib.h:125 + -- zlib.h:125 + Z_PARTIAL_FLUSH : constant := 1; -- zlib.h:126 + -- will be removed, use + -- Z_SYNC_FLUSH instead + -- zlib.h:126 + Z_SYNC_FLUSH : constant := 2; -- zlib.h:127 + -- zlib.h:127 + Z_FULL_FLUSH : constant := 3; -- zlib.h:128 + -- zlib.h:128 + Z_FINISH : constant := 4; -- zlib.h:129 + -- zlib.h:129 + Z_OK : constant := 8#0000#; -- zlib.h:132 + -- zlib.h:132 + Z_STREAM_END : constant := 1; -- zlib.h:133 + -- zlib.h:133 + Z_NEED_DICT : constant := 2; -- zlib.h:134 + -- zlib.h:134 + Z_ERRNO : constant := -1; -- zlib.h:135 + -- zlib.h:135 + Z_STREAM_ERROR : constant := -2; -- zlib.h:136 + -- zlib.h:136 + Z_DATA_ERROR : constant := -3; -- zlib.h:137 + -- zlib.h:137 + Z_MEM_ERROR : constant := -4; -- zlib.h:138 + -- zlib.h:138 + Z_BUF_ERROR : constant := -5; -- zlib.h:139 + -- zlib.h:139 + Z_VERSION_ERROR : constant := -6; -- zlib.h:140 + -- zlib.h:140 + Z_NO_COMPRESSION : constant := 8#0000#; -- zlib.h:145 + -- zlib.h:145 + Z_BEST_SPEED : constant := 1; -- zlib.h:146 + -- zlib.h:146 + Z_BEST_COMPRESSION : constant := 9; -- zlib.h:147 + -- zlib.h:147 + Z_DEFAULT_COMPRESSION : constant := -1; -- zlib.h:148 + -- zlib.h:148 + Z_FILTERED : constant := 1; -- zlib.h:151 + -- zlib.h:151 + Z_HUFFMAN_ONLY : constant := 2; -- zlib.h:152 + -- zlib.h:152 + Z_DEFAULT_STRATEGY : constant := 8#0000#; -- zlib.h:153 + -- zlib.h:153 + Z_BINARY : constant := 8#0000#; -- zlib.h:156 + -- zlib.h:156 + Z_ASCII : constant := 1; -- zlib.h:157 + -- zlib.h:157 + Z_UNKNOWN : constant := 2; -- zlib.h:158 + -- zlib.h:158 + Z_DEFLATED : constant := 8; -- zlib.h:161 + -- zlib.h:161 + Z_NULL : constant := 8#0000#; -- zlib.h:164 + -- for initializing zalloc, zfree, opaque + -- zlib.h:164 + type gzFile is new Voidp; -- zlib.h:646 + + type Z_Stream is private; + + type Z_Streamp is access all Z_Stream; -- zlib.h:89 + + type alloc_func is access function + (Opaque : Voidp; + Items : UInt; + Size : UInt) + return Voidp; -- zlib.h:63 + + type free_func is access procedure (opaque : Voidp; address : Voidp); + + function zlibVersion return Chars_Ptr; + + function Deflate (strm : Z_Streamp; flush : Int) return Int; + + function DeflateEnd (strm : Z_Streamp) return Int; + + function Inflate (strm : Z_Streamp; flush : Int) return Int; + + function InflateEnd (strm : Z_Streamp) return Int; + + function deflateSetDictionary + (strm : Z_Streamp; + dictionary : Byte_Access; + dictLength : UInt) + return Int; + + function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int; + -- zlib.h:478 + + function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495 + + function deflateParams + (strm : Z_Streamp; + level : Int; + strategy : Int) + return Int; -- zlib.h:506 + + function inflateSetDictionary + (strm : Z_Streamp; + dictionary : Byte_Access; + dictLength : UInt) + return Int; -- zlib.h:548 + + function inflateSync (strm : Z_Streamp) return Int; -- zlib.h:565 + + function inflateReset (strm : Z_Streamp) return Int; -- zlib.h:580 + + function compress + (dest : Byte_Access; + destLen : ULong_Access; + source : Byte_Access; + sourceLen : ULong) + return Int; -- zlib.h:601 + + function compress2 + (dest : Byte_Access; + destLen : ULong_Access; + source : Byte_Access; + sourceLen : ULong; + level : Int) + return Int; -- zlib.h:615 + + function uncompress + (dest : Byte_Access; + destLen : ULong_Access; + source : Byte_Access; + sourceLen : ULong) + return Int; + + function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile; + + function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile; + + function gzsetparams + (file : gzFile; + level : Int; + strategy : Int) + return Int; + + function gzread + (file : gzFile; + buf : Voidp; + len : UInt) + return Int; + + function gzwrite + (file : in gzFile; + buf : in Voidp; + len : in UInt) + return Int; + + function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int; + + function gzputs (file : in gzFile; s : in Chars_Ptr) return Int; + + function gzgets + (file : gzFile; + buf : Chars_Ptr; + len : Int) + return Chars_Ptr; + + function gzputc (file : gzFile; char : Int) return Int; + + function gzgetc (file : gzFile) return Int; + + function gzflush (file : gzFile; flush : Int) return Int; + + function gzseek + (file : gzFile; + offset : Int; + whence : Int) + return Int; + + function gzrewind (file : gzFile) return Int; + + function gztell (file : gzFile) return Int; + + function gzeof (file : gzFile) return Int; + + function gzclose (file : gzFile) return Int; + + function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr; + + function adler32 + (adler : ULong; + buf : Byte_Access; + len : UInt) + return ULong; + + function crc32 + (crc : ULong; + buf : Byte_Access; + len : UInt) + return ULong; + + function deflateInit + (strm : Z_Streamp; + level : Int; + version : Chars_Ptr; + stream_size : Int) + return Int; + + function deflateInit2 + (strm : Z_Streamp; + level : Int; + method : Int; + windowBits : Int; + memLevel : Int; + strategy : Int; + version : Chars_Ptr; + stream_size : Int) + return Int; + + function Deflate_Init + (strm : Z_Streamp; + level : Int; + method : Int; + windowBits : Int; + memLevel : Int; + strategy : Int) + return Int; + pragma Inline (Deflate_Init); + + function inflateInit + (strm : Z_Streamp; + version : Chars_Ptr; + stream_size : Int) + return Int; + + function inflateInit2 + (strm : in Z_Streamp; + windowBits : in Int; + version : in Chars_Ptr; + stream_size : in Int) + return Int; + + function inflateBackInit + (strm : in Z_Streamp; + windowBits : in Int; + window : in Byte_Access; + version : in Chars_Ptr; + stream_size : in Int) + return Int; + -- Size of window have to be 2**windowBits. + + function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int; + pragma Inline (Inflate_Init); + + function zError (err : Int) return Chars_Ptr; + + function inflateSyncPoint (z : Z_Streamp) return Int; + + function get_crc_table return ULong_Access; + + -- Interface to the available fields of the z_stream structure. + -- The application must update next_in and avail_in when avail_in has + -- dropped to zero. It must update next_out and avail_out when avail_out + -- has dropped to zero. The application must initialize zalloc, zfree and + -- opaque before calling the init function. + + procedure Set_In + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt); + pragma Inline (Set_In); + + procedure Set_Out + (Strm : in out Z_Stream; + Buffer : in Voidp; + Size : in UInt); + pragma Inline (Set_Out); + + procedure Set_Mem_Func + (Strm : in out Z_Stream; + Opaque : in Voidp; + Alloc : in alloc_func; + Free : in free_func); + pragma Inline (Set_Mem_Func); + + function Last_Error_Message (Strm : in Z_Stream) return String; + pragma Inline (Last_Error_Message); + + function Avail_Out (Strm : in Z_Stream) return UInt; + pragma Inline (Avail_Out); + + function Avail_In (Strm : in Z_Stream) return UInt; + pragma Inline (Avail_In); + + function Total_In (Strm : in Z_Stream) return ULong; + pragma Inline (Total_In); + + function Total_Out (Strm : in Z_Stream) return ULong; + pragma Inline (Total_Out); + + function inflateCopy + (dest : in Z_Streamp; + Source : in Z_Streamp) + return Int; + + function compressBound (Source_Len : in ULong) return ULong; + + function deflateBound + (Strm : in Z_Streamp; + Source_Len : in ULong) + return ULong; + + function gzungetc (C : in Int; File : in gzFile) return Int; + + function zlibCompileFlags return ULong; + +private + + type Z_Stream is record -- zlib.h:68 + Next_In : Voidp := Nul; -- next input byte + Avail_In : UInt := 0; -- number of bytes available at next_in + Total_In : ULong := 0; -- total nb of input bytes read so far + Next_Out : Voidp := Nul; -- next output byte should be put there + Avail_Out : UInt := 0; -- remaining free space at next_out + Total_Out : ULong := 0; -- total nb of bytes output so far + msg : Chars_Ptr; -- last error message, NULL if no error + state : Voidp; -- not visible by applications + zalloc : alloc_func := null; -- used to allocate the internal state + zfree : free_func := null; -- used to free the internal state + opaque : Voidp; -- private data object passed to + -- zalloc and zfree + data_type : Int; -- best guess about the data type: + -- ascii or binary + adler : ULong; -- adler32 value of the uncompressed + -- data + reserved : ULong; -- reserved for future use + end record; + + pragma Convention (C, Z_Stream); + + pragma Import (C, zlibVersion, "zlibVersion"); + pragma Import (C, Deflate, "deflate"); + pragma Import (C, DeflateEnd, "deflateEnd"); + pragma Import (C, Inflate, "inflate"); + pragma Import (C, InflateEnd, "inflateEnd"); + pragma Import (C, deflateSetDictionary, "deflateSetDictionary"); + pragma Import (C, deflateCopy, "deflateCopy"); + pragma Import (C, deflateReset, "deflateReset"); + pragma Import (C, deflateParams, "deflateParams"); + pragma Import (C, inflateSetDictionary, "inflateSetDictionary"); + pragma Import (C, inflateSync, "inflateSync"); + pragma Import (C, inflateReset, "inflateReset"); + pragma Import (C, compress, "compress"); + pragma Import (C, compress2, "compress2"); + pragma Import (C, uncompress, "uncompress"); + pragma Import (C, gzopen, "gzopen"); + pragma Import (C, gzdopen, "gzdopen"); + pragma Import (C, gzsetparams, "gzsetparams"); + pragma Import (C, gzread, "gzread"); + pragma Import (C, gzwrite, "gzwrite"); + pragma Import (C, gzprintf, "gzprintf"); + pragma Import (C, gzputs, "gzputs"); + pragma Import (C, gzgets, "gzgets"); + pragma Import (C, gzputc, "gzputc"); + pragma Import (C, gzgetc, "gzgetc"); + pragma Import (C, gzflush, "gzflush"); + pragma Import (C, gzseek, "gzseek"); + pragma Import (C, gzrewind, "gzrewind"); + pragma Import (C, gztell, "gztell"); + pragma Import (C, gzeof, "gzeof"); + pragma Import (C, gzclose, "gzclose"); + pragma Import (C, gzerror, "gzerror"); + pragma Import (C, adler32, "adler32"); + pragma Import (C, crc32, "crc32"); + pragma Import (C, deflateInit, "deflateInit_"); + pragma Import (C, inflateInit, "inflateInit_"); + pragma Import (C, deflateInit2, "deflateInit2_"); + pragma Import (C, inflateInit2, "inflateInit2_"); + pragma Import (C, zError, "zError"); + pragma Import (C, inflateSyncPoint, "inflateSyncPoint"); + pragma Import (C, get_crc_table, "get_crc_table"); + + -- since zlib 1.2.0: + + pragma Import (C, inflateCopy, "inflateCopy"); + pragma Import (C, compressBound, "compressBound"); + pragma Import (C, deflateBound, "deflateBound"); + pragma Import (C, gzungetc, "gzungetc"); + pragma Import (C, zlibCompileFlags, "zlibCompileFlags"); + + pragma Import (C, inflateBackInit, "inflateBackInit_"); + + -- I stopped binding the inflateBack routines, becouse realize that + -- it does not support zlib and gzip headers for now, and have no + -- symmetric deflateBack routines. + -- ZLib-Ada is symmetric regarding deflate/inflate data transformation + -- and has a similar generic callback interface for the + -- deflate/inflate transformation based on the regular Deflate/Inflate + -- routines. + + -- pragma Import (C, inflateBack, "inflateBack"); + -- pragma Import (C, inflateBackEnd, "inflateBackEnd"); + +end ZLib.Thin; diff --git a/compat/zlib/contrib/ada/zlib.adb b/compat/zlib/contrib/ada/zlib.adb new file mode 100644 index 0000000..80acd9d --- /dev/null +++ b/compat/zlib/contrib/ada/zlib.adb @@ -0,0 +1,701 @@ +---------------------------------------------------------------- +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2004 Dmitriy Anisimkov -- +-- -- +-- Open source license information is in the zlib.ads file. -- +---------------------------------------------------------------- + +-- $Id: zlib.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +with Ada.Exceptions; +with Ada.Unchecked_Conversion; +with Ada.Unchecked_Deallocation; + +with Interfaces.C.Strings; + +with ZLib.Thin; + +package body ZLib is + + use type Thin.Int; + + type Z_Stream is new Thin.Z_Stream; + + type Return_Code_Enum is + (OK, + STREAM_END, + NEED_DICT, + ERRNO, + STREAM_ERROR, + DATA_ERROR, + MEM_ERROR, + BUF_ERROR, + VERSION_ERROR); + + type Flate_Step_Function is access + function (Strm : in Thin.Z_Streamp; Flush : in Thin.Int) return Thin.Int; + pragma Convention (C, Flate_Step_Function); + + type Flate_End_Function is access + function (Ctrm : in Thin.Z_Streamp) return Thin.Int; + pragma Convention (C, Flate_End_Function); + + type Flate_Type is record + Step : Flate_Step_Function; + Done : Flate_End_Function; + end record; + + subtype Footer_Array is Stream_Element_Array (1 .. 8); + + Simple_GZip_Header : constant Stream_Element_Array (1 .. 10) + := (16#1f#, 16#8b#, -- Magic header + 16#08#, -- Z_DEFLATED + 16#00#, -- Flags + 16#00#, 16#00#, 16#00#, 16#00#, -- Time + 16#00#, -- XFlags + 16#03# -- OS code + ); + -- The simplest gzip header is not for informational, but just for + -- gzip format compatibility. + -- Note that some code below is using assumption + -- Simple_GZip_Header'Last > Footer_Array'Last, so do not make + -- Simple_GZip_Header'Last <= Footer_Array'Last. + + Return_Code : constant array (Thin.Int range <>) of Return_Code_Enum + := (0 => OK, + 1 => STREAM_END, + 2 => NEED_DICT, + -1 => ERRNO, + -2 => STREAM_ERROR, + -3 => DATA_ERROR, + -4 => MEM_ERROR, + -5 => BUF_ERROR, + -6 => VERSION_ERROR); + + Flate : constant array (Boolean) of Flate_Type + := (True => (Step => Thin.Deflate'Access, + Done => Thin.DeflateEnd'Access), + False => (Step => Thin.Inflate'Access, + Done => Thin.InflateEnd'Access)); + + Flush_Finish : constant array (Boolean) of Flush_Mode + := (True => Finish, False => No_Flush); + + procedure Raise_Error (Stream : in Z_Stream); + pragma Inline (Raise_Error); + + procedure Raise_Error (Message : in String); + pragma Inline (Raise_Error); + + procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int); + + procedure Free is new Ada.Unchecked_Deallocation + (Z_Stream, Z_Stream_Access); + + function To_Thin_Access is new Ada.Unchecked_Conversion + (Z_Stream_Access, Thin.Z_Streamp); + + procedure Translate_GZip + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + -- Separate translate routine for make gzip header. + + procedure Translate_Auto + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + -- translate routine without additional headers. + + ----------------- + -- Check_Error -- + ----------------- + + procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int) is + use type Thin.Int; + begin + if Code /= Thin.Z_OK then + Raise_Error + (Return_Code_Enum'Image (Return_Code (Code)) + & ": " & Last_Error_Message (Stream)); + end if; + end Check_Error; + + ----------- + -- Close -- + ----------- + + procedure Close + (Filter : in out Filter_Type; + Ignore_Error : in Boolean := False) + is + Code : Thin.Int; + begin + if not Ignore_Error and then not Is_Open (Filter) then + raise Status_Error; + end if; + + Code := Flate (Filter.Compression).Done (To_Thin_Access (Filter.Strm)); + + if Ignore_Error or else Code = Thin.Z_OK then + Free (Filter.Strm); + else + declare + Error_Message : constant String + := Last_Error_Message (Filter.Strm.all); + begin + Free (Filter.Strm); + Ada.Exceptions.Raise_Exception + (ZLib_Error'Identity, + Return_Code_Enum'Image (Return_Code (Code)) + & ": " & Error_Message); + end; + end if; + end Close; + + ----------- + -- CRC32 -- + ----------- + + function CRC32 + (CRC : in Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array) + return Unsigned_32 + is + use Thin; + begin + return Unsigned_32 (crc32 (ULong (CRC), + Data'Address, + Data'Length)); + end CRC32; + + procedure CRC32 + (CRC : in out Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array) is + begin + CRC := CRC32 (CRC, Data); + end CRC32; + + ------------------ + -- Deflate_Init -- + ------------------ + + procedure Deflate_Init + (Filter : in out Filter_Type; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Method : in Compression_Method := Deflated; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Memory_Level : in Memory_Level_Type := Default_Memory_Level; + Header : in Header_Type := Default) + is + use type Thin.Int; + Win_Bits : Thin.Int := Thin.Int (Window_Bits); + begin + if Is_Open (Filter) then + raise Status_Error; + end if; + + -- We allow ZLib to make header only in case of default header type. + -- Otherwise we would either do header by ourselfs, or do not do + -- header at all. + + if Header = None or else Header = GZip then + Win_Bits := -Win_Bits; + end if; + + -- For the GZip CRC calculation and make headers. + + if Header = GZip then + Filter.CRC := 0; + Filter.Offset := Simple_GZip_Header'First; + else + Filter.Offset := Simple_GZip_Header'Last + 1; + end if; + + Filter.Strm := new Z_Stream; + Filter.Compression := True; + Filter.Stream_End := False; + Filter.Header := Header; + + if Thin.Deflate_Init + (To_Thin_Access (Filter.Strm), + Level => Thin.Int (Level), + method => Thin.Int (Method), + windowBits => Win_Bits, + memLevel => Thin.Int (Memory_Level), + strategy => Thin.Int (Strategy)) /= Thin.Z_OK + then + Raise_Error (Filter.Strm.all); + end if; + end Deflate_Init; + + ----------- + -- Flush -- + ----------- + + procedure Flush + (Filter : in out Filter_Type; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) + is + No_Data : Stream_Element_Array := (1 .. 0 => 0); + Last : Stream_Element_Offset; + begin + Translate (Filter, No_Data, Last, Out_Data, Out_Last, Flush); + end Flush; + + ----------------------- + -- Generic_Translate -- + ----------------------- + + procedure Generic_Translate + (Filter : in out ZLib.Filter_Type; + In_Buffer_Size : in Integer := Default_Buffer_Size; + Out_Buffer_Size : in Integer := Default_Buffer_Size) + is + In_Buffer : Stream_Element_Array + (1 .. Stream_Element_Offset (In_Buffer_Size)); + Out_Buffer : Stream_Element_Array + (1 .. Stream_Element_Offset (Out_Buffer_Size)); + Last : Stream_Element_Offset; + In_Last : Stream_Element_Offset; + In_First : Stream_Element_Offset; + Out_Last : Stream_Element_Offset; + begin + Main : loop + Data_In (In_Buffer, Last); + + In_First := In_Buffer'First; + + loop + Translate + (Filter => Filter, + In_Data => In_Buffer (In_First .. Last), + In_Last => In_Last, + Out_Data => Out_Buffer, + Out_Last => Out_Last, + Flush => Flush_Finish (Last < In_Buffer'First)); + + if Out_Buffer'First <= Out_Last then + Data_Out (Out_Buffer (Out_Buffer'First .. Out_Last)); + end if; + + exit Main when Stream_End (Filter); + + -- The end of in buffer. + + exit when In_Last = Last; + + In_First := In_Last + 1; + end loop; + end loop Main; + + end Generic_Translate; + + ------------------ + -- Inflate_Init -- + ------------------ + + procedure Inflate_Init + (Filter : in out Filter_Type; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Header : in Header_Type := Default) + is + use type Thin.Int; + Win_Bits : Thin.Int := Thin.Int (Window_Bits); + + procedure Check_Version; + -- Check the latest header types compatibility. + + procedure Check_Version is + begin + if Version <= "1.1.4" then + Raise_Error + ("Inflate header type " & Header_Type'Image (Header) + & " incompatible with ZLib version " & Version); + end if; + end Check_Version; + + begin + if Is_Open (Filter) then + raise Status_Error; + end if; + + case Header is + when None => + Check_Version; + + -- Inflate data without headers determined + -- by negative Win_Bits. + + Win_Bits := -Win_Bits; + when GZip => + Check_Version; + + -- Inflate gzip data defined by flag 16. + + Win_Bits := Win_Bits + 16; + when Auto => + Check_Version; + + -- Inflate with automatic detection + -- of gzip or native header defined by flag 32. + + Win_Bits := Win_Bits + 32; + when Default => null; + end case; + + Filter.Strm := new Z_Stream; + Filter.Compression := False; + Filter.Stream_End := False; + Filter.Header := Header; + + if Thin.Inflate_Init + (To_Thin_Access (Filter.Strm), Win_Bits) /= Thin.Z_OK + then + Raise_Error (Filter.Strm.all); + end if; + end Inflate_Init; + + ------------- + -- Is_Open -- + ------------- + + function Is_Open (Filter : in Filter_Type) return Boolean is + begin + return Filter.Strm /= null; + end Is_Open; + + ----------------- + -- Raise_Error -- + ----------------- + + procedure Raise_Error (Message : in String) is + begin + Ada.Exceptions.Raise_Exception (ZLib_Error'Identity, Message); + end Raise_Error; + + procedure Raise_Error (Stream : in Z_Stream) is + begin + Raise_Error (Last_Error_Message (Stream)); + end Raise_Error; + + ---------- + -- Read -- + ---------- + + procedure Read + (Filter : in out Filter_Type; + Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode := No_Flush) + is + In_Last : Stream_Element_Offset; + Item_First : Ada.Streams.Stream_Element_Offset := Item'First; + V_Flush : Flush_Mode := Flush; + + begin + pragma Assert (Rest_First in Buffer'First .. Buffer'Last + 1); + pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last); + + loop + if Rest_Last = Buffer'First - 1 then + V_Flush := Finish; + + elsif Rest_First > Rest_Last then + Read (Buffer, Rest_Last); + Rest_First := Buffer'First; + + if Rest_Last < Buffer'First then + V_Flush := Finish; + end if; + end if; + + Translate + (Filter => Filter, + In_Data => Buffer (Rest_First .. Rest_Last), + In_Last => In_Last, + Out_Data => Item (Item_First .. Item'Last), + Out_Last => Last, + Flush => V_Flush); + + Rest_First := In_Last + 1; + + exit when Stream_End (Filter) + or else Last = Item'Last + or else (Last >= Item'First and then Allow_Read_Some); + + Item_First := Last + 1; + end loop; + end Read; + + ---------------- + -- Stream_End -- + ---------------- + + function Stream_End (Filter : in Filter_Type) return Boolean is + begin + if Filter.Header = GZip and Filter.Compression then + return Filter.Stream_End + and then Filter.Offset = Footer_Array'Last + 1; + else + return Filter.Stream_End; + end if; + end Stream_End; + + -------------- + -- Total_In -- + -------------- + + function Total_In (Filter : in Filter_Type) return Count is + begin + return Count (Thin.Total_In (To_Thin_Access (Filter.Strm).all)); + end Total_In; + + --------------- + -- Total_Out -- + --------------- + + function Total_Out (Filter : in Filter_Type) return Count is + begin + return Count (Thin.Total_Out (To_Thin_Access (Filter.Strm).all)); + end Total_Out; + + --------------- + -- Translate -- + --------------- + + procedure Translate + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) is + begin + if Filter.Header = GZip and then Filter.Compression then + Translate_GZip + (Filter => Filter, + In_Data => In_Data, + In_Last => In_Last, + Out_Data => Out_Data, + Out_Last => Out_Last, + Flush => Flush); + else + Translate_Auto + (Filter => Filter, + In_Data => In_Data, + In_Last => In_Last, + Out_Data => Out_Data, + Out_Last => Out_Last, + Flush => Flush); + end if; + end Translate; + + -------------------- + -- Translate_Auto -- + -------------------- + + procedure Translate_Auto + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) + is + use type Thin.Int; + Code : Thin.Int; + + begin + if not Is_Open (Filter) then + raise Status_Error; + end if; + + if Out_Data'Length = 0 and then In_Data'Length = 0 then + raise Constraint_Error; + end if; + + Set_Out (Filter.Strm.all, Out_Data'Address, Out_Data'Length); + Set_In (Filter.Strm.all, In_Data'Address, In_Data'Length); + + Code := Flate (Filter.Compression).Step + (To_Thin_Access (Filter.Strm), + Thin.Int (Flush)); + + if Code = Thin.Z_STREAM_END then + Filter.Stream_End := True; + else + Check_Error (Filter.Strm.all, Code); + end if; + + In_Last := In_Data'Last + - Stream_Element_Offset (Avail_In (Filter.Strm.all)); + Out_Last := Out_Data'Last + - Stream_Element_Offset (Avail_Out (Filter.Strm.all)); + end Translate_Auto; + + -------------------- + -- Translate_GZip -- + -------------------- + + procedure Translate_GZip + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode) + is + Out_First : Stream_Element_Offset; + + procedure Add_Data (Data : in Stream_Element_Array); + -- Add data to stream from the Filter.Offset till necessary, + -- used for add gzip headr/footer. + + procedure Put_32 + (Item : in out Stream_Element_Array; + Data : in Unsigned_32); + pragma Inline (Put_32); + + -------------- + -- Add_Data -- + -------------- + + procedure Add_Data (Data : in Stream_Element_Array) is + Data_First : Stream_Element_Offset renames Filter.Offset; + Data_Last : Stream_Element_Offset; + Data_Len : Stream_Element_Offset; -- -1 + Out_Len : Stream_Element_Offset; -- -1 + begin + Out_First := Out_Last + 1; + + if Data_First > Data'Last then + return; + end if; + + Data_Len := Data'Last - Data_First; + Out_Len := Out_Data'Last - Out_First; + + if Data_Len <= Out_Len then + Out_Last := Out_First + Data_Len; + Data_Last := Data'Last; + else + Out_Last := Out_Data'Last; + Data_Last := Data_First + Out_Len; + end if; + + Out_Data (Out_First .. Out_Last) := Data (Data_First .. Data_Last); + + Data_First := Data_Last + 1; + Out_First := Out_Last + 1; + end Add_Data; + + ------------ + -- Put_32 -- + ------------ + + procedure Put_32 + (Item : in out Stream_Element_Array; + Data : in Unsigned_32) + is + D : Unsigned_32 := Data; + begin + for J in Item'First .. Item'First + 3 loop + Item (J) := Stream_Element (D and 16#FF#); + D := Shift_Right (D, 8); + end loop; + end Put_32; + + begin + Out_Last := Out_Data'First - 1; + + if not Filter.Stream_End then + Add_Data (Simple_GZip_Header); + + Translate_Auto + (Filter => Filter, + In_Data => In_Data, + In_Last => In_Last, + Out_Data => Out_Data (Out_First .. Out_Data'Last), + Out_Last => Out_Last, + Flush => Flush); + + CRC32 (Filter.CRC, In_Data (In_Data'First .. In_Last)); + end if; + + if Filter.Stream_End and then Out_Last <= Out_Data'Last then + -- This detection method would work only when + -- Simple_GZip_Header'Last > Footer_Array'Last + + if Filter.Offset = Simple_GZip_Header'Last + 1 then + Filter.Offset := Footer_Array'First; + end if; + + declare + Footer : Footer_Array; + begin + Put_32 (Footer, Filter.CRC); + Put_32 (Footer (Footer'First + 4 .. Footer'Last), + Unsigned_32 (Total_In (Filter))); + Add_Data (Footer); + end; + end if; + end Translate_GZip; + + ------------- + -- Version -- + ------------- + + function Version return String is + begin + return Interfaces.C.Strings.Value (Thin.zlibVersion); + end Version; + + ----------- + -- Write -- + ----------- + + procedure Write + (Filter : in out Filter_Type; + Item : in Ada.Streams.Stream_Element_Array; + Flush : in Flush_Mode := No_Flush) + is + Buffer : Stream_Element_Array (1 .. Buffer_Size); + In_Last : Stream_Element_Offset; + Out_Last : Stream_Element_Offset; + In_First : Stream_Element_Offset := Item'First; + begin + if Item'Length = 0 and Flush = No_Flush then + return; + end if; + + loop + Translate + (Filter => Filter, + In_Data => Item (In_First .. Item'Last), + In_Last => In_Last, + Out_Data => Buffer, + Out_Last => Out_Last, + Flush => Flush); + + if Out_Last >= Buffer'First then + Write (Buffer (1 .. Out_Last)); + end if; + + exit when In_Last = Item'Last or Stream_End (Filter); + + In_First := In_Last + 1; + end loop; + end Write; + +end ZLib; diff --git a/compat/zlib/contrib/ada/zlib.ads b/compat/zlib/contrib/ada/zlib.ads new file mode 100644 index 0000000..5dfabc3 --- /dev/null +++ b/compat/zlib/contrib/ada/zlib.ads @@ -0,0 +1,328 @@ +------------------------------------------------------------------------------ +-- ZLib for Ada thick binding. -- +-- -- +-- Copyright (C) 2002-2004 Dmitriy Anisimkov -- +-- -- +-- This library is free software; you can redistribute it and/or modify -- +-- it under the terms of the GNU General Public License as published by -- +-- the Free Software Foundation; either version 2 of the License, or (at -- +-- your option) any later version. -- +-- -- +-- This library is distributed in the hope that it will be useful, but -- +-- WITHOUT ANY WARRANTY; without even the implied warranty of -- +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- +-- General Public License for more details. -- +-- -- +-- You should have received a copy of the GNU General Public License -- +-- along with this library; if not, write to the Free Software Foundation, -- +-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +------------------------------------------------------------------------------ + +-- $Id: zlib.ads,v 1.1 2008/12/19 14:44:49 dkf Exp $ + +with Ada.Streams; + +with Interfaces; + +package ZLib is + + ZLib_Error : exception; + Status_Error : exception; + + type Compression_Level is new Integer range -1 .. 9; + + type Flush_Mode is private; + + type Compression_Method is private; + + type Window_Bits_Type is new Integer range 8 .. 15; + + type Memory_Level_Type is new Integer range 1 .. 9; + + type Unsigned_32 is new Interfaces.Unsigned_32; + + type Strategy_Type is private; + + type Header_Type is (None, Auto, Default, GZip); + -- Header type usage have a some limitation for inflate. + -- See comment for Inflate_Init. + + subtype Count is Ada.Streams.Stream_Element_Count; + + Default_Memory_Level : constant Memory_Level_Type := 8; + Default_Window_Bits : constant Window_Bits_Type := 15; + + ---------------------------------- + -- Compression method constants -- + ---------------------------------- + + Deflated : constant Compression_Method; + -- Only one method allowed in this ZLib version + + --------------------------------- + -- Compression level constants -- + --------------------------------- + + No_Compression : constant Compression_Level := 0; + Best_Speed : constant Compression_Level := 1; + Best_Compression : constant Compression_Level := 9; + Default_Compression : constant Compression_Level := -1; + + -------------------------- + -- Flush mode constants -- + -------------------------- + + No_Flush : constant Flush_Mode; + -- Regular way for compression, no flush + + Partial_Flush : constant Flush_Mode; + -- Will be removed, use Z_SYNC_FLUSH instead + + Sync_Flush : constant Flush_Mode; + -- All pending output is flushed to the output buffer and the output + -- is aligned on a byte boundary, so that the decompressor can get all + -- input data available so far. (In particular avail_in is zero after the + -- call if enough output space has been provided before the call.) + -- Flushing may degrade compression for some compression algorithms and so + -- it should be used only when necessary. + + Block_Flush : constant Flush_Mode; + -- Z_BLOCK requests that inflate() stop + -- if and when it get to the next deflate block boundary. When decoding the + -- zlib or gzip format, this will cause inflate() to return immediately + -- after the header and before the first block. When doing a raw inflate, + -- inflate() will go ahead and process the first block, and will return + -- when it gets to the end of that block, or when it runs out of data. + + Full_Flush : constant Flush_Mode; + -- All output is flushed as with SYNC_FLUSH, and the compression state + -- is reset so that decompression can restart from this point if previous + -- compressed data has been damaged or if random access is desired. Using + -- Full_Flush too often can seriously degrade the compression. + + Finish : constant Flush_Mode; + -- Just for tell the compressor that input data is complete. + + ------------------------------------ + -- Compression strategy constants -- + ------------------------------------ + + -- RLE stategy could be used only in version 1.2.0 and later. + + Filtered : constant Strategy_Type; + Huffman_Only : constant Strategy_Type; + RLE : constant Strategy_Type; + Default_Strategy : constant Strategy_Type; + + Default_Buffer_Size : constant := 4096; + + type Filter_Type is tagged limited private; + -- The filter is for compression and for decompression. + -- The usage of the type is depend of its initialization. + + function Version return String; + pragma Inline (Version); + -- Return string representation of the ZLib version. + + procedure Deflate_Init + (Filter : in out Filter_Type; + Level : in Compression_Level := Default_Compression; + Strategy : in Strategy_Type := Default_Strategy; + Method : in Compression_Method := Deflated; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Memory_Level : in Memory_Level_Type := Default_Memory_Level; + Header : in Header_Type := Default); + -- Compressor initialization. + -- When Header parameter is Auto or Default, then default zlib header + -- would be provided for compressed data. + -- When Header is GZip, then gzip header would be set instead of + -- default header. + -- When Header is None, no header would be set for compressed data. + + procedure Inflate_Init + (Filter : in out Filter_Type; + Window_Bits : in Window_Bits_Type := Default_Window_Bits; + Header : in Header_Type := Default); + -- Decompressor initialization. + -- Default header type mean that ZLib default header is expecting in the + -- input compressed stream. + -- Header type None mean that no header is expecting in the input stream. + -- GZip header type mean that GZip header is expecting in the + -- input compressed stream. + -- Auto header type mean that header type (GZip or Native) would be + -- detected automatically in the input stream. + -- Note that header types parameter values None, GZip and Auto are + -- supported for inflate routine only in ZLib versions 1.2.0.2 and later. + -- Deflate_Init is supporting all header types. + + function Is_Open (Filter : in Filter_Type) return Boolean; + pragma Inline (Is_Open); + -- Is the filter opened for compression or decompression. + + procedure Close + (Filter : in out Filter_Type; + Ignore_Error : in Boolean := False); + -- Closing the compression or decompressor. + -- If stream is closing before the complete and Ignore_Error is False, + -- The exception would be raised. + + generic + with procedure Data_In + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + with procedure Data_Out + (Item : in Ada.Streams.Stream_Element_Array); + procedure Generic_Translate + (Filter : in out Filter_Type; + In_Buffer_Size : in Integer := Default_Buffer_Size; + Out_Buffer_Size : in Integer := Default_Buffer_Size); + -- Compress/decompress data fetch from Data_In routine and pass the result + -- to the Data_Out routine. User should provide Data_In and Data_Out + -- for compression/decompression data flow. + -- Compression or decompression depend on Filter initialization. + + function Total_In (Filter : in Filter_Type) return Count; + pragma Inline (Total_In); + -- Returns total number of input bytes read so far + + function Total_Out (Filter : in Filter_Type) return Count; + pragma Inline (Total_Out); + -- Returns total number of bytes output so far + + function CRC32 + (CRC : in Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array) + return Unsigned_32; + pragma Inline (CRC32); + -- Compute CRC32, it could be necessary for make gzip format + + procedure CRC32 + (CRC : in out Unsigned_32; + Data : in Ada.Streams.Stream_Element_Array); + pragma Inline (CRC32); + -- Compute CRC32, it could be necessary for make gzip format + + ------------------------------------------------- + -- Below is more complex low level routines. -- + ------------------------------------------------- + + procedure Translate + (Filter : in out Filter_Type; + In_Data : in Ada.Streams.Stream_Element_Array; + In_Last : out Ada.Streams.Stream_Element_Offset; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + -- Compress/decompress the In_Data buffer and place the result into + -- Out_Data. In_Last is the index of last element from In_Data accepted by + -- the Filter. Out_Last is the last element of the received data from + -- Filter. To tell the filter that incoming data are complete put the + -- Flush parameter to Finish. + + function Stream_End (Filter : in Filter_Type) return Boolean; + pragma Inline (Stream_End); + -- Return the true when the stream is complete. + + procedure Flush + (Filter : in out Filter_Type; + Out_Data : out Ada.Streams.Stream_Element_Array; + Out_Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode); + pragma Inline (Flush); + -- Flushing the data from the compressor. + + generic + with procedure Write + (Item : in Ada.Streams.Stream_Element_Array); + -- User should provide this routine for accept + -- compressed/decompressed data. + + Buffer_Size : in Ada.Streams.Stream_Element_Offset + := Default_Buffer_Size; + -- Buffer size for Write user routine. + + procedure Write + (Filter : in out Filter_Type; + Item : in Ada.Streams.Stream_Element_Array; + Flush : in Flush_Mode := No_Flush); + -- Compress/Decompress data from Item to the generic parameter procedure + -- Write. Output buffer size could be set in Buffer_Size generic parameter. + + generic + with procedure Read + (Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset); + -- User should provide data for compression/decompression + -- thru this routine. + + Buffer : in out Ada.Streams.Stream_Element_Array; + -- Buffer for keep remaining data from the previous + -- back read. + + Rest_First, Rest_Last : in out Ada.Streams.Stream_Element_Offset; + -- Rest_First have to be initialized to Buffer'Last + 1 + -- Rest_Last have to be initialized to Buffer'Last + -- before usage. + + Allow_Read_Some : in Boolean := False; + -- Is it allowed to return Last < Item'Last before end of data. + + procedure Read + (Filter : in out Filter_Type; + Item : out Ada.Streams.Stream_Element_Array; + Last : out Ada.Streams.Stream_Element_Offset; + Flush : in Flush_Mode := No_Flush); + -- Compress/Decompress data from generic parameter procedure Read to the + -- Item. User should provide Buffer and initialized Rest_First, Rest_Last + -- indicators. If Allow_Read_Some is True, Read routines could return + -- Last < Item'Last only at end of stream. + +private + + use Ada.Streams; + + pragma Assert (Ada.Streams.Stream_Element'Size = 8); + pragma Assert (Ada.Streams.Stream_Element'Modulus = 2**8); + + type Flush_Mode is new Integer range 0 .. 5; + + type Compression_Method is new Integer range 8 .. 8; + + type Strategy_Type is new Integer range 0 .. 3; + + No_Flush : constant Flush_Mode := 0; + Partial_Flush : constant Flush_Mode := 1; + Sync_Flush : constant Flush_Mode := 2; + Full_Flush : constant Flush_Mode := 3; + Finish : constant Flush_Mode := 4; + Block_Flush : constant Flush_Mode := 5; + + Filtered : constant Strategy_Type := 1; + Huffman_Only : constant Strategy_Type := 2; + RLE : constant Strategy_Type := 3; + Default_Strategy : constant Strategy_Type := 0; + + Deflated : constant Compression_Method := 8; + + type Z_Stream; + + type Z_Stream_Access is access all Z_Stream; + + type Filter_Type is tagged limited record + Strm : Z_Stream_Access; + Compression : Boolean; + Stream_End : Boolean; + Header : Header_Type; + CRC : Unsigned_32; + Offset : Stream_Element_Offset; + -- Offset for gzip header/footer output. + end record; + +end ZLib; diff --git a/compat/zlib/contrib/ada/zlib.gpr b/compat/zlib/contrib/ada/zlib.gpr new file mode 100644 index 0000000..296b22a --- /dev/null +++ b/compat/zlib/contrib/ada/zlib.gpr @@ -0,0 +1,20 @@ +project Zlib is + + for Languages use ("Ada"); + for Source_Dirs use ("."); + for Object_Dir use "."; + for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); + + package Compiler is + for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); + end Compiler; + + package Linker is + for Default_Switches ("ada") use ("-lz"); + end Linker; + + package Builder is + for Default_Switches ("ada") use ("-s", "-gnatQ"); + end Builder; + +end Zlib; diff --git a/compat/zlib/contrib/asm586/README.586 b/compat/zlib/contrib/asm586/README.586 new file mode 100644 index 0000000..6bb78f3 --- /dev/null +++ b/compat/zlib/contrib/asm586/README.586 @@ -0,0 +1,43 @@ +This is a patched version of zlib modified to use +Pentium-optimized assembly code in the deflation algorithm. The files +changed/added by this patch are: + +README.586 +match.S + +The effectiveness of these modifications is a bit marginal, as the the +program's bottleneck seems to be mostly L1-cache contention, for which +there is no real way to work around without rewriting the basic +algorithm. The speedup on average is around 5-10% (which is generally +less than the amount of variance between subsequent executions). +However, when used at level 9 compression, the cache contention can +drop enough for the assembly version to achieve 10-20% speedup (and +sometimes more, depending on the amount of overall redundancy in the +files). Even here, though, cache contention can still be the limiting +factor, depending on the nature of the program using the zlib library. +This may also mean that better improvements will be seen on a Pentium +with MMX, which suffers much less from L1-cache contention, but I have +not yet verified this. + +Note that this code has been tailored for the Pentium in particular, +and will not perform well on the Pentium Pro (due to the use of a +partial register in the inner loop). + +If you are using an assembler other than GNU as, you will have to +translate match.S to use your assembler's syntax. (Have fun.) + +Brian Raiter +breadbox@muppetlabs.com +April, 1998 + + +Added for zlib 1.1.3: + +The patches come from +http://www.muppetlabs.com/~breadbox/software/assembly.html + +To compile zlib with this asm file, copy match.S to the zlib directory +then do: + +CFLAGS="-O3 -DASMV" ./configure +make OBJA=match.o diff --git a/compat/zlib/contrib/asm586/match.S b/compat/zlib/contrib/asm586/match.S new file mode 100644 index 0000000..0368b35 --- /dev/null +++ b/compat/zlib/contrib/asm586/match.S @@ -0,0 +1,364 @@ +/* match.s -- Pentium-optimized version of longest_match() + * Written for zlib 1.1.2 + * Copyright (C) 1998 Brian Raiter + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License. + */ + +#ifndef NO_UNDERLINE +#define match_init _match_init +#define longest_match _longest_match +#endif + +#define MAX_MATCH (258) +#define MIN_MATCH (3) +#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1) +#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7) + +/* stack frame offsets */ + +#define wmask 0 /* local copy of s->wmask */ +#define window 4 /* local copy of s->window */ +#define windowbestlen 8 /* s->window + bestlen */ +#define chainlenscanend 12 /* high word: current chain len */ + /* low word: last bytes sought */ +#define scanstart 16 /* first two bytes of string */ +#define scanalign 20 /* dword-misalignment of string */ +#define nicematch 24 /* a good enough match size */ +#define bestlen 28 /* size of best match so far */ +#define scan 32 /* ptr to string wanting match */ + +#define LocalVarsSize (36) +/* saved ebx 36 */ +/* saved edi 40 */ +/* saved esi 44 */ +/* saved ebp 48 */ +/* return address 52 */ +#define deflatestate 56 /* the function arguments */ +#define curmatch 60 + +/* Offsets for fields in the deflate_state structure. These numbers + * are calculated from the definition of deflate_state, with the + * assumption that the compiler will dword-align the fields. (Thus, + * changing the definition of deflate_state could easily cause this + * program to crash horribly, without so much as a warning at + * compile time. Sigh.) + */ + +/* All the +zlib1222add offsets are due to the addition of fields + * in zlib in the deflate_state structure since the asm code was first written + * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). + * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). + * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + */ + +#define zlib1222add (8) + +#define dsWSize (36+zlib1222add) +#define dsWMask (44+zlib1222add) +#define dsWindow (48+zlib1222add) +#define dsPrev (56+zlib1222add) +#define dsMatchLen (88+zlib1222add) +#define dsPrevMatch (92+zlib1222add) +#define dsStrStart (100+zlib1222add) +#define dsMatchStart (104+zlib1222add) +#define dsLookahead (108+zlib1222add) +#define dsPrevLen (112+zlib1222add) +#define dsMaxChainLen (116+zlib1222add) +#define dsGoodMatch (132+zlib1222add) +#define dsNiceMatch (136+zlib1222add) + + +.file "match.S" + +.globl match_init, longest_match + +.text + +/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */ + +longest_match: + +/* Save registers that the compiler may be using, and adjust %esp to */ +/* make room for our stack frame. */ + + pushl %ebp + pushl %edi + pushl %esi + pushl %ebx + subl $LocalVarsSize, %esp + +/* Retrieve the function arguments. %ecx will hold cur_match */ +/* throughout the entire function. %edx will hold the pointer to the */ +/* deflate_state structure during the function's setup (before */ +/* entering the main loop). */ + + movl deflatestate(%esp), %edx + movl curmatch(%esp), %ecx + +/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */ + + movl dsNiceMatch(%edx), %eax + movl dsLookahead(%edx), %ebx + cmpl %eax, %ebx + jl LookaheadLess + movl %eax, %ebx +LookaheadLess: movl %ebx, nicematch(%esp) + +/* register Bytef *scan = s->window + s->strstart; */ + + movl dsWindow(%edx), %esi + movl %esi, window(%esp) + movl dsStrStart(%edx), %ebp + lea (%esi,%ebp), %edi + movl %edi, scan(%esp) + +/* Determine how many bytes the scan ptr is off from being */ +/* dword-aligned. */ + + movl %edi, %eax + negl %eax + andl $3, %eax + movl %eax, scanalign(%esp) + +/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */ +/* s->strstart - (IPos)MAX_DIST(s) : NIL; */ + + movl dsWSize(%edx), %eax + subl $MIN_LOOKAHEAD, %eax + subl %eax, %ebp + jg LimitPositive + xorl %ebp, %ebp +LimitPositive: + +/* unsigned chain_length = s->max_chain_length; */ +/* if (s->prev_length >= s->good_match) { */ +/* chain_length >>= 2; */ +/* } */ + + movl dsPrevLen(%edx), %eax + movl dsGoodMatch(%edx), %ebx + cmpl %ebx, %eax + movl dsMaxChainLen(%edx), %ebx + jl LastMatchGood + shrl $2, %ebx +LastMatchGood: + +/* chainlen is decremented once beforehand so that the function can */ +/* use the sign flag instead of the zero flag for the exit test. */ +/* It is then shifted into the high word, to make room for the scanend */ +/* scanend value, which it will always accompany. */ + + decl %ebx + shll $16, %ebx + +/* int best_len = s->prev_length; */ + + movl dsPrevLen(%edx), %eax + movl %eax, bestlen(%esp) + +/* Store the sum of s->window + best_len in %esi locally, and in %esi. */ + + addl %eax, %esi + movl %esi, windowbestlen(%esp) + +/* register ush scan_start = *(ushf*)scan; */ +/* register ush scan_end = *(ushf*)(scan+best_len-1); */ + + movw (%edi), %bx + movw %bx, scanstart(%esp) + movw -1(%edi,%eax), %bx + movl %ebx, chainlenscanend(%esp) + +/* Posf *prev = s->prev; */ +/* uInt wmask = s->w_mask; */ + + movl dsPrev(%edx), %edi + movl dsWMask(%edx), %edx + mov %edx, wmask(%esp) + +/* Jump into the main loop. */ + + jmp LoopEntry + +.balign 16 + +/* do { + * match = s->window + cur_match; + * if (*(ushf*)(match+best_len-1) != scan_end || + * *(ushf*)match != scan_start) continue; + * [...] + * } while ((cur_match = prev[cur_match & wmask]) > limit + * && --chain_length != 0); + * + * Here is the inner loop of the function. The function will spend the + * majority of its time in this loop, and majority of that time will + * be spent in the first ten instructions. + * + * Within this loop: + * %ebx = chainlenscanend - i.e., ((chainlen << 16) | scanend) + * %ecx = curmatch + * %edx = curmatch & wmask + * %esi = windowbestlen - i.e., (window + bestlen) + * %edi = prev + * %ebp = limit + * + * Two optimization notes on the choice of instructions: + * + * The first instruction uses a 16-bit address, which costs an extra, + * unpairable cycle. This is cheaper than doing a 32-bit access and + * zeroing the high word, due to the 3-cycle misalignment penalty which + * would occur half the time. This also turns out to be cheaper than + * doing two separate 8-bit accesses, as the memory is so rarely in the + * L1 cache. + * + * The window buffer, however, apparently spends a lot of time in the + * cache, and so it is faster to retrieve the word at the end of the + * match string with two 8-bit loads. The instructions that test the + * word at the beginning of the match string, however, are executed + * much less frequently, and there it was cheaper to use 16-bit + * instructions, which avoided the necessity of saving off and + * subsequently reloading one of the other registers. + */ +LookupLoop: + /* 1 U & V */ + movw (%edi,%edx,2), %cx /* 2 U pipe */ + movl wmask(%esp), %edx /* 2 V pipe */ + cmpl %ebp, %ecx /* 3 U pipe */ + jbe LeaveNow /* 3 V pipe */ + subl $0x00010000, %ebx /* 4 U pipe */ + js LeaveNow /* 4 V pipe */ +LoopEntry: movb -1(%esi,%ecx), %al /* 5 U pipe */ + andl %ecx, %edx /* 5 V pipe */ + cmpb %bl, %al /* 6 U pipe */ + jnz LookupLoop /* 6 V pipe */ + movb (%esi,%ecx), %ah + cmpb %bh, %ah + jnz LookupLoop + movl window(%esp), %eax + movw (%eax,%ecx), %ax + cmpw scanstart(%esp), %ax + jnz LookupLoop + +/* Store the current value of chainlen. */ + + movl %ebx, chainlenscanend(%esp) + +/* Point %edi to the string under scrutiny, and %esi to the string we */ +/* are hoping to match it up with. In actuality, %esi and %edi are */ +/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */ +/* initialized to -(MAX_MATCH_8 - scanalign). */ + + movl window(%esp), %esi + movl scan(%esp), %edi + addl %ecx, %esi + movl scanalign(%esp), %eax + movl $(-MAX_MATCH_8), %edx + lea MAX_MATCH_8(%edi,%eax), %edi + lea MAX_MATCH_8(%esi,%eax), %esi + +/* Test the strings for equality, 8 bytes at a time. At the end, + * adjust %edx so that it is offset to the exact byte that mismatched. + * + * We already know at this point that the first three bytes of the + * strings match each other, and they can be safely passed over before + * starting the compare loop. So what this code does is skip over 0-3 + * bytes, as much as necessary in order to dword-align the %edi + * pointer. (%esi will still be misaligned three times out of four.) + * + * It should be confessed that this loop usually does not represent + * much of the total running time. Replacing it with a more + * straightforward "rep cmpsb" would not drastically degrade + * performance. + */ +LoopCmps: + movl (%esi,%edx), %eax + movl (%edi,%edx), %ebx + xorl %ebx, %eax + jnz LeaveLoopCmps + movl 4(%esi,%edx), %eax + movl 4(%edi,%edx), %ebx + xorl %ebx, %eax + jnz LeaveLoopCmps4 + addl $8, %edx + jnz LoopCmps + jmp LenMaximum +LeaveLoopCmps4: addl $4, %edx +LeaveLoopCmps: testl $0x0000FFFF, %eax + jnz LenLower + addl $2, %edx + shrl $16, %eax +LenLower: subb $1, %al + adcl $0, %edx + +/* Calculate the length of the match. If it is longer than MAX_MATCH, */ +/* then automatically accept it as the best possible match and leave. */ + + lea (%edi,%edx), %eax + movl scan(%esp), %edi + subl %edi, %eax + cmpl $MAX_MATCH, %eax + jge LenMaximum + +/* If the length of the match is not longer than the best match we */ +/* have so far, then forget it and return to the lookup loop. */ + + movl deflatestate(%esp), %edx + movl bestlen(%esp), %ebx + cmpl %ebx, %eax + jg LongerMatch + movl chainlenscanend(%esp), %ebx + movl windowbestlen(%esp), %esi + movl dsPrev(%edx), %edi + movl wmask(%esp), %edx + andl %ecx, %edx + jmp LookupLoop + +/* s->match_start = cur_match; */ +/* best_len = len; */ +/* if (len >= nice_match) break; */ +/* scan_end = *(ushf*)(scan+best_len-1); */ + +LongerMatch: movl nicematch(%esp), %ebx + movl %eax, bestlen(%esp) + movl %ecx, dsMatchStart(%edx) + cmpl %ebx, %eax + jge LeaveNow + movl window(%esp), %esi + addl %eax, %esi + movl %esi, windowbestlen(%esp) + movl chainlenscanend(%esp), %ebx + movw -1(%edi,%eax), %bx + movl dsPrev(%edx), %edi + movl %ebx, chainlenscanend(%esp) + movl wmask(%esp), %edx + andl %ecx, %edx + jmp LookupLoop + +/* Accept the current string, with the maximum possible length. */ + +LenMaximum: movl deflatestate(%esp), %edx + movl $MAX_MATCH, bestlen(%esp) + movl %ecx, dsMatchStart(%edx) + +/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */ +/* return s->lookahead; */ + +LeaveNow: + movl deflatestate(%esp), %edx + movl bestlen(%esp), %ebx + movl dsLookahead(%edx), %eax + cmpl %eax, %ebx + jg LookaheadRet + movl %ebx, %eax +LookaheadRet: + +/* Restore the stack and return from whence we came. */ + + addl $LocalVarsSize, %esp + popl %ebx + popl %esi + popl %edi + popl %ebp +match_init: ret diff --git a/compat/zlib/contrib/asm686/README.686 b/compat/zlib/contrib/asm686/README.686 new file mode 100644 index 0000000..a593f23 --- /dev/null +++ b/compat/zlib/contrib/asm686/README.686 @@ -0,0 +1,34 @@ +This is a patched version of zlib, modified to use +Pentium-Pro-optimized assembly code in the deflation algorithm. The +files changed/added by this patch are: + +README.686 +match.S + +The speedup that this patch provides varies, depending on whether the +compiler used to build the original version of zlib falls afoul of the +PPro's speed traps. My own tests show a speedup of around 10-20% at +the default compression level, and 20-30% using -9, against a version +compiled using gcc 2.7.2.3. Your mileage may vary. + +Note that this code has been tailored for the PPro/PII in particular, +and will not perform particuarly well on a Pentium. + +If you are using an assembler other than GNU as, you will have to +translate match.S to use your assembler's syntax. (Have fun.) + +Brian Raiter +breadbox@muppetlabs.com +April, 1998 + + +Added for zlib 1.1.3: + +The patches come from +http://www.muppetlabs.com/~breadbox/software/assembly.html + +To compile zlib with this asm file, copy match.S to the zlib directory +then do: + +CFLAGS="-O3 -DASMV" ./configure +make OBJA=match.o diff --git a/compat/zlib/contrib/asm686/match.S b/compat/zlib/contrib/asm686/match.S new file mode 100644 index 0000000..5c3e9ee --- /dev/null +++ b/compat/zlib/contrib/asm686/match.S @@ -0,0 +1,329 @@ +/* match.s -- Pentium-Pro-optimized version of longest_match() + * Written for zlib 1.1.2 + * Copyright (C) 1998 Brian Raiter + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License. + */ + +#ifndef NO_UNDERLINE +#define match_init _match_init +#define longest_match _longest_match +#endif + +#define MAX_MATCH (258) +#define MIN_MATCH (3) +#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1) +#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7) + +/* stack frame offsets */ + +#define chainlenwmask 0 /* high word: current chain len */ + /* low word: s->wmask */ +#define window 4 /* local copy of s->window */ +#define windowbestlen 8 /* s->window + bestlen */ +#define scanstart 16 /* first two bytes of string */ +#define scanend 12 /* last two bytes of string */ +#define scanalign 20 /* dword-misalignment of string */ +#define nicematch 24 /* a good enough match size */ +#define bestlen 28 /* size of best match so far */ +#define scan 32 /* ptr to string wanting match */ + +#define LocalVarsSize (36) +/* saved ebx 36 */ +/* saved edi 40 */ +/* saved esi 44 */ +/* saved ebp 48 */ +/* return address 52 */ +#define deflatestate 56 /* the function arguments */ +#define curmatch 60 + +/* All the +zlib1222add offsets are due to the addition of fields + * in zlib in the deflate_state structure since the asm code was first written + * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). + * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). + * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + */ + +#define zlib1222add (8) + +#define dsWSize (36+zlib1222add) +#define dsWMask (44+zlib1222add) +#define dsWindow (48+zlib1222add) +#define dsPrev (56+zlib1222add) +#define dsMatchLen (88+zlib1222add) +#define dsPrevMatch (92+zlib1222add) +#define dsStrStart (100+zlib1222add) +#define dsMatchStart (104+zlib1222add) +#define dsLookahead (108+zlib1222add) +#define dsPrevLen (112+zlib1222add) +#define dsMaxChainLen (116+zlib1222add) +#define dsGoodMatch (132+zlib1222add) +#define dsNiceMatch (136+zlib1222add) + + +.file "match.S" + +.globl match_init, longest_match + +.text + +/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */ + +longest_match: + +/* Save registers that the compiler may be using, and adjust %esp to */ +/* make room for our stack frame. */ + + pushl %ebp + pushl %edi + pushl %esi + pushl %ebx + subl $LocalVarsSize, %esp + +/* Retrieve the function arguments. %ecx will hold cur_match */ +/* throughout the entire function. %edx will hold the pointer to the */ +/* deflate_state structure during the function's setup (before */ +/* entering the main loop). */ + + movl deflatestate(%esp), %edx + movl curmatch(%esp), %ecx + +/* uInt wmask = s->w_mask; */ +/* unsigned chain_length = s->max_chain_length; */ +/* if (s->prev_length >= s->good_match) { */ +/* chain_length >>= 2; */ +/* } */ + + movl dsPrevLen(%edx), %eax + movl dsGoodMatch(%edx), %ebx + cmpl %ebx, %eax + movl dsWMask(%edx), %eax + movl dsMaxChainLen(%edx), %ebx + jl LastMatchGood + shrl $2, %ebx +LastMatchGood: + +/* chainlen is decremented once beforehand so that the function can */ +/* use the sign flag instead of the zero flag for the exit test. */ +/* It is then shifted into the high word, to make room for the wmask */ +/* value, which it will always accompany. */ + + decl %ebx + shll $16, %ebx + orl %eax, %ebx + movl %ebx, chainlenwmask(%esp) + +/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */ + + movl dsNiceMatch(%edx), %eax + movl dsLookahead(%edx), %ebx + cmpl %eax, %ebx + jl LookaheadLess + movl %eax, %ebx +LookaheadLess: movl %ebx, nicematch(%esp) + +/* register Bytef *scan = s->window + s->strstart; */ + + movl dsWindow(%edx), %esi + movl %esi, window(%esp) + movl dsStrStart(%edx), %ebp + lea (%esi,%ebp), %edi + movl %edi, scan(%esp) + +/* Determine how many bytes the scan ptr is off from being */ +/* dword-aligned. */ + + movl %edi, %eax + negl %eax + andl $3, %eax + movl %eax, scanalign(%esp) + +/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */ +/* s->strstart - (IPos)MAX_DIST(s) : NIL; */ + + movl dsWSize(%edx), %eax + subl $MIN_LOOKAHEAD, %eax + subl %eax, %ebp + jg LimitPositive + xorl %ebp, %ebp +LimitPositive: + +/* int best_len = s->prev_length; */ + + movl dsPrevLen(%edx), %eax + movl %eax, bestlen(%esp) + +/* Store the sum of s->window + best_len in %esi locally, and in %esi. */ + + addl %eax, %esi + movl %esi, windowbestlen(%esp) + +/* register ush scan_start = *(ushf*)scan; */ +/* register ush scan_end = *(ushf*)(scan+best_len-1); */ +/* Posf *prev = s->prev; */ + + movzwl (%edi), %ebx + movl %ebx, scanstart(%esp) + movzwl -1(%edi,%eax), %ebx + movl %ebx, scanend(%esp) + movl dsPrev(%edx), %edi + +/* Jump into the main loop. */ + + movl chainlenwmask(%esp), %edx + jmp LoopEntry + +.balign 16 + +/* do { + * match = s->window + cur_match; + * if (*(ushf*)(match+best_len-1) != scan_end || + * *(ushf*)match != scan_start) continue; + * [...] + * } while ((cur_match = prev[cur_match & wmask]) > limit + * && --chain_length != 0); + * + * Here is the inner loop of the function. The function will spend the + * majority of its time in this loop, and majority of that time will + * be spent in the first ten instructions. + * + * Within this loop: + * %ebx = scanend + * %ecx = curmatch + * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) + * %esi = windowbestlen - i.e., (window + bestlen) + * %edi = prev + * %ebp = limit + */ +LookupLoop: + andl %edx, %ecx + movzwl (%edi,%ecx,2), %ecx + cmpl %ebp, %ecx + jbe LeaveNow + subl $0x00010000, %edx + js LeaveNow +LoopEntry: movzwl -1(%esi,%ecx), %eax + cmpl %ebx, %eax + jnz LookupLoop + movl window(%esp), %eax + movzwl (%eax,%ecx), %eax + cmpl scanstart(%esp), %eax + jnz LookupLoop + +/* Store the current value of chainlen. */ + + movl %edx, chainlenwmask(%esp) + +/* Point %edi to the string under scrutiny, and %esi to the string we */ +/* are hoping to match it up with. In actuality, %esi and %edi are */ +/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */ +/* initialized to -(MAX_MATCH_8 - scanalign). */ + + movl window(%esp), %esi + movl scan(%esp), %edi + addl %ecx, %esi + movl scanalign(%esp), %eax + movl $(-MAX_MATCH_8), %edx + lea MAX_MATCH_8(%edi,%eax), %edi + lea MAX_MATCH_8(%esi,%eax), %esi + +/* Test the strings for equality, 8 bytes at a time. At the end, + * adjust %edx so that it is offset to the exact byte that mismatched. + * + * We already know at this point that the first three bytes of the + * strings match each other, and they can be safely passed over before + * starting the compare loop. So what this code does is skip over 0-3 + * bytes, as much as necessary in order to dword-align the %edi + * pointer. (%esi will still be misaligned three times out of four.) + * + * It should be confessed that this loop usually does not represent + * much of the total running time. Replacing it with a more + * straightforward "rep cmpsb" would not drastically degrade + * performance. + */ +LoopCmps: + movl (%esi,%edx), %eax + xorl (%edi,%edx), %eax + jnz LeaveLoopCmps + movl 4(%esi,%edx), %eax + xorl 4(%edi,%edx), %eax + jnz LeaveLoopCmps4 + addl $8, %edx + jnz LoopCmps + jmp LenMaximum +LeaveLoopCmps4: addl $4, %edx +LeaveLoopCmps: testl $0x0000FFFF, %eax + jnz LenLower + addl $2, %edx + shrl $16, %eax +LenLower: subb $1, %al + adcl $0, %edx + +/* Calculate the length of the match. If it is longer than MAX_MATCH, */ +/* then automatically accept it as the best possible match and leave. */ + + lea (%edi,%edx), %eax + movl scan(%esp), %edi + subl %edi, %eax + cmpl $MAX_MATCH, %eax + jge LenMaximum + +/* If the length of the match is not longer than the best match we */ +/* have so far, then forget it and return to the lookup loop. */ + + movl deflatestate(%esp), %edx + movl bestlen(%esp), %ebx + cmpl %ebx, %eax + jg LongerMatch + movl windowbestlen(%esp), %esi + movl dsPrev(%edx), %edi + movl scanend(%esp), %ebx + movl chainlenwmask(%esp), %edx + jmp LookupLoop + +/* s->match_start = cur_match; */ +/* best_len = len; */ +/* if (len >= nice_match) break; */ +/* scan_end = *(ushf*)(scan+best_len-1); */ + +LongerMatch: movl nicematch(%esp), %ebx + movl %eax, bestlen(%esp) + movl %ecx, dsMatchStart(%edx) + cmpl %ebx, %eax + jge LeaveNow + movl window(%esp), %esi + addl %eax, %esi + movl %esi, windowbestlen(%esp) + movzwl -1(%edi,%eax), %ebx + movl dsPrev(%edx), %edi + movl %ebx, scanend(%esp) + movl chainlenwmask(%esp), %edx + jmp LookupLoop + +/* Accept the current string, with the maximum possible length. */ + +LenMaximum: movl deflatestate(%esp), %edx + movl $MAX_MATCH, bestlen(%esp) + movl %ecx, dsMatchStart(%edx) + +/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */ +/* return s->lookahead; */ + +LeaveNow: + movl deflatestate(%esp), %edx + movl bestlen(%esp), %ebx + movl dsLookahead(%edx), %eax + cmpl %eax, %ebx + jg LookaheadRet + movl %ebx, %eax +LookaheadRet: + +/* Restore the stack and return from whence we came. */ + + addl $LocalVarsSize, %esp + popl %ebx + popl %esi + popl %edi + popl %ebp +match_init: ret diff --git a/compat/zlib/contrib/blast/Makefile b/compat/zlib/contrib/blast/Makefile new file mode 100644 index 0000000..9be80ba --- /dev/null +++ b/compat/zlib/contrib/blast/Makefile @@ -0,0 +1,8 @@ +blast: blast.c blast.h + cc -DTEST -o blast blast.c + +test: blast + blast < test.pk | cmp - test.txt + +clean: + rm -f blast blast.o diff --git a/compat/zlib/contrib/blast/README b/compat/zlib/contrib/blast/README new file mode 100644 index 0000000..e3a60b3 --- /dev/null +++ b/compat/zlib/contrib/blast/README @@ -0,0 +1,4 @@ +Read blast.h for purpose and usage. + +Mark Adler +madler@alumni.caltech.edu diff --git a/compat/zlib/contrib/blast/blast.c b/compat/zlib/contrib/blast/blast.c new file mode 100644 index 0000000..4ce697a --- /dev/null +++ b/compat/zlib/contrib/blast/blast.c @@ -0,0 +1,444 @@ +/* blast.c + * Copyright (C) 2003 Mark Adler + * For conditions of distribution and use, see copyright notice in blast.h + * version 1.1, 16 Feb 2003 + * + * blast.c decompresses data compressed by the PKWare Compression Library. + * This function provides functionality similar to the explode() function of + * the PKWare library, hence the name "blast". + * + * This decompressor is based on the excellent format description provided by + * Ben Rudiak-Gould in comp.compression on August 13, 2001. Interestingly, the + * example Ben provided in the post is incorrect. The distance 110001 should + * instead be 111000. When corrected, the example byte stream becomes: + * + * 00 04 82 24 25 8f 80 7f + * + * which decompresses to "AIAIAIAIAIAIA" (without the quotes). + */ + +/* + * Change history: + * + * 1.0 12 Feb 2003 - First version + * 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data + */ + +#include /* for setjmp(), longjmp(), and jmp_buf */ +#include "blast.h" /* prototype for blast() */ + +#define local static /* for local function definitions */ +#define MAXBITS 13 /* maximum code length */ +#define MAXWIN 4096 /* maximum window size */ + +/* input and output state */ +struct state { + /* input state */ + blast_in infun; /* input function provided by user */ + void *inhow; /* opaque information passed to infun() */ + unsigned char *in; /* next input location */ + unsigned left; /* available input at in */ + int bitbuf; /* bit buffer */ + int bitcnt; /* number of bits in bit buffer */ + + /* input limit error return state for bits() and decode() */ + jmp_buf env; + + /* output state */ + blast_out outfun; /* output function provided by user */ + void *outhow; /* opaque information passed to outfun() */ + unsigned next; /* index of next write location in out[] */ + int first; /* true to check distances (for first 4K) */ + unsigned char out[MAXWIN]; /* output buffer and sliding window */ +}; + +/* + * Return need bits from the input stream. This always leaves less than + * eight bits in the buffer. bits() works properly for need == 0. + * + * Format notes: + * + * - Bits are stored in bytes from the least significant bit to the most + * significant bit. Therefore bits are dropped from the bottom of the bit + * buffer, using shift right, and new bytes are appended to the top of the + * bit buffer, using shift left. + */ +local int bits(struct state *s, int need) +{ + int val; /* bit accumulator */ + + /* load at least need bits into val */ + val = s->bitbuf; + while (s->bitcnt < need) { + if (s->left == 0) { + s->left = s->infun(s->inhow, &(s->in)); + if (s->left == 0) longjmp(s->env, 1); /* out of input */ + } + val |= (int)(*(s->in)++) << s->bitcnt; /* load eight bits */ + s->left--; + s->bitcnt += 8; + } + + /* drop need bits and update buffer, always zero to seven bits left */ + s->bitbuf = val >> need; + s->bitcnt -= need; + + /* return need bits, zeroing the bits above that */ + return val & ((1 << need) - 1); +} + +/* + * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of + * each length, which for a canonical code are stepped through in order. + * symbol[] are the symbol values in canonical order, where the number of + * entries is the sum of the counts in count[]. The decoding process can be + * seen in the function decode() below. + */ +struct huffman { + short *count; /* number of symbols of each length */ + short *symbol; /* canonically ordered symbols */ +}; + +/* + * Decode a code from the stream s using huffman table h. Return the symbol or + * a negative value if there is an error. If all of the lengths are zero, i.e. + * an empty code, or if the code is incomplete and an invalid code is received, + * then -9 is returned after reading MAXBITS bits. + * + * Format notes: + * + * - The codes as stored in the compressed data are bit-reversed relative to + * a simple integer ordering of codes of the same lengths. Hence below the + * bits are pulled from the compressed data one at a time and used to + * build the code value reversed from what is in the stream in order to + * permit simple integer comparisons for decoding. + * + * - The first code for the shortest length is all ones. Subsequent codes of + * the same length are simply integer decrements of the previous code. When + * moving up a length, a one bit is appended to the code. For a complete + * code, the last code of the longest length will be all zeros. To support + * this ordering, the bits pulled during decoding are inverted to apply the + * more "natural" ordering starting with all zeros and incrementing. + */ +local int decode(struct state *s, struct huffman *h) +{ + int len; /* current number of bits in code */ + int code; /* len bits being decoded */ + int first; /* first code of length len */ + int count; /* number of codes of length len */ + int index; /* index of first code of length len in symbol table */ + int bitbuf; /* bits from stream */ + int left; /* bits left in next or left to process */ + short *next; /* next number of codes */ + + bitbuf = s->bitbuf; + left = s->bitcnt; + code = first = index = 0; + len = 1; + next = h->count + 1; + while (1) { + while (left--) { + code |= (bitbuf & 1) ^ 1; /* invert code */ + bitbuf >>= 1; + count = *next++; + if (code < first + count) { /* if length len, return symbol */ + s->bitbuf = bitbuf; + s->bitcnt = (s->bitcnt - len) & 7; + return h->symbol[index + (code - first)]; + } + index += count; /* else update for next length */ + first += count; + first <<= 1; + code <<= 1; + len++; + } + left = (MAXBITS+1) - len; + if (left == 0) break; + if (s->left == 0) { + s->left = s->infun(s->inhow, &(s->in)); + if (s->left == 0) longjmp(s->env, 1); /* out of input */ + } + bitbuf = *(s->in)++; + s->left--; + if (left > 8) left = 8; + } + return -9; /* ran out of codes */ +} + +/* + * Given a list of repeated code lengths rep[0..n-1], where each byte is a + * count (high four bits + 1) and a code length (low four bits), generate the + * list of code lengths. This compaction reduces the size of the object code. + * Then given the list of code lengths length[0..n-1] representing a canonical + * Huffman code for n symbols, construct the tables required to decode those + * codes. Those tables are the number of codes of each length, and the symbols + * sorted by length, retaining their original order within each length. The + * return value is zero for a complete code set, negative for an over- + * subscribed code set, and positive for an incomplete code set. The tables + * can be used if the return value is zero or positive, but they cannot be used + * if the return value is negative. If the return value is zero, it is not + * possible for decode() using that table to return an error--any stream of + * enough bits will resolve to a symbol. If the return value is positive, then + * it is possible for decode() using that table to return an error for received + * codes past the end of the incomplete lengths. + */ +local int construct(struct huffman *h, const unsigned char *rep, int n) +{ + int symbol; /* current symbol when stepping through length[] */ + int len; /* current length when stepping through h->count[] */ + int left; /* number of possible codes left of current length */ + short offs[MAXBITS+1]; /* offsets in symbol table for each length */ + short length[256]; /* code lengths */ + + /* convert compact repeat counts into symbol bit length list */ + symbol = 0; + do { + len = *rep++; + left = (len >> 4) + 1; + len &= 15; + do { + length[symbol++] = len; + } while (--left); + } while (--n); + n = symbol; + + /* count number of codes of each length */ + for (len = 0; len <= MAXBITS; len++) + h->count[len] = 0; + for (symbol = 0; symbol < n; symbol++) + (h->count[length[symbol]])++; /* assumes lengths are within bounds */ + if (h->count[0] == n) /* no codes! */ + return 0; /* complete, but decode() will fail */ + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; /* one possible code of zero length */ + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; /* one more bit, double codes left */ + left -= h->count[len]; /* deduct count from possible codes */ + if (left < 0) return left; /* over-subscribed--return negative */ + } /* left > 0 means incomplete */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + h->count[len]; + + /* + * put symbols in table sorted by length, by symbol order within each + * length + */ + for (symbol = 0; symbol < n; symbol++) + if (length[symbol] != 0) + h->symbol[offs[length[symbol]]++] = symbol; + + /* return zero for complete set, positive for incomplete set */ + return left; +} + +/* + * Decode PKWare Compression Library stream. + * + * Format notes: + * + * - First byte is 0 if literals are uncoded or 1 if they are coded. Second + * byte is 4, 5, or 6 for the number of extra bits in the distance code. + * This is the base-2 logarithm of the dictionary size minus six. + * + * - Compressed data is a combination of literals and length/distance pairs + * terminated by an end code. Literals are either Huffman coded or + * uncoded bytes. A length/distance pair is a coded length followed by a + * coded distance to represent a string that occurs earlier in the + * uncompressed data that occurs again at the current location. + * + * - A bit preceding a literal or length/distance pair indicates which comes + * next, 0 for literals, 1 for length/distance. + * + * - If literals are uncoded, then the next eight bits are the literal, in the + * normal bit order in th stream, i.e. no bit-reversal is needed. Similarly, + * no bit reversal is needed for either the length extra bits or the distance + * extra bits. + * + * - Literal bytes are simply written to the output. A length/distance pair is + * an instruction to copy previously uncompressed bytes to the output. The + * copy is from distance bytes back in the output stream, copying for length + * bytes. + * + * - Distances pointing before the beginning of the output data are not + * permitted. + * + * - Overlapped copies, where the length is greater than the distance, are + * allowed and common. For example, a distance of one and a length of 518 + * simply copies the last byte 518 times. A distance of four and a length of + * twelve copies the last four bytes three times. A simple forward copy + * ignoring whether the length is greater than the distance or not implements + * this correctly. + */ +local int decomp(struct state *s) +{ + int lit; /* true if literals are coded */ + int dict; /* log2(dictionary size) - 6 */ + int symbol; /* decoded symbol, extra bits for distance */ + int len; /* length for copy */ + int dist; /* distance for copy */ + int copy; /* copy counter */ + unsigned char *from, *to; /* copy pointers */ + static int virgin = 1; /* build tables once */ + static short litcnt[MAXBITS+1], litsym[256]; /* litcode memory */ + static short lencnt[MAXBITS+1], lensym[16]; /* lencode memory */ + static short distcnt[MAXBITS+1], distsym[64]; /* distcode memory */ + static struct huffman litcode = {litcnt, litsym}; /* length code */ + static struct huffman lencode = {lencnt, lensym}; /* length code */ + static struct huffman distcode = {distcnt, distsym};/* distance code */ + /* bit lengths of literal codes */ + static const unsigned char litlen[] = { + 11, 124, 8, 7, 28, 7, 188, 13, 76, 4, 10, 8, 12, 10, 12, 10, 8, 23, 8, + 9, 7, 6, 7, 8, 7, 6, 55, 8, 23, 24, 12, 11, 7, 9, 11, 12, 6, 7, 22, 5, + 7, 24, 6, 11, 9, 6, 7, 22, 7, 11, 38, 7, 9, 8, 25, 11, 8, 11, 9, 12, + 8, 12, 5, 38, 5, 38, 5, 11, 7, 5, 6, 21, 6, 10, 53, 8, 7, 24, 10, 27, + 44, 253, 253, 253, 252, 252, 252, 13, 12, 45, 12, 45, 12, 61, 12, 45, + 44, 173}; + /* bit lengths of length codes 0..15 */ + static const unsigned char lenlen[] = {2, 35, 36, 53, 38, 23}; + /* bit lengths of distance codes 0..63 */ + static const unsigned char distlen[] = {2, 20, 53, 230, 247, 151, 248}; + static const short base[16] = { /* base for length codes */ + 3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 136, 264}; + static const char extra[16] = { /* extra bits for length codes */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8}; + + /* set up decoding tables (once--might not be thread-safe) */ + if (virgin) { + construct(&litcode, litlen, sizeof(litlen)); + construct(&lencode, lenlen, sizeof(lenlen)); + construct(&distcode, distlen, sizeof(distlen)); + virgin = 0; + } + + /* read header */ + lit = bits(s, 8); + if (lit > 1) return -1; + dict = bits(s, 8); + if (dict < 4 || dict > 6) return -2; + + /* decode literals and length/distance pairs */ + do { + if (bits(s, 1)) { + /* get length */ + symbol = decode(s, &lencode); + len = base[symbol] + bits(s, extra[symbol]); + if (len == 519) break; /* end code */ + + /* get distance */ + symbol = len == 2 ? 2 : dict; + dist = decode(s, &distcode) << symbol; + dist += bits(s, symbol); + dist++; + if (s->first && dist > s->next) + return -3; /* distance too far back */ + + /* copy length bytes from distance bytes back */ + do { + to = s->out + s->next; + from = to - dist; + copy = MAXWIN; + if (s->next < dist) { + from += copy; + copy = dist; + } + copy -= s->next; + if (copy > len) copy = len; + len -= copy; + s->next += copy; + do { + *to++ = *from++; + } while (--copy); + if (s->next == MAXWIN) { + if (s->outfun(s->outhow, s->out, s->next)) return 1; + s->next = 0; + s->first = 0; + } + } while (len != 0); + } + else { + /* get literal and write it */ + symbol = lit ? decode(s, &litcode) : bits(s, 8); + s->out[s->next++] = symbol; + if (s->next == MAXWIN) { + if (s->outfun(s->outhow, s->out, s->next)) return 1; + s->next = 0; + s->first = 0; + } + } + } while (1); + return 0; +} + +/* See comments in blast.h */ +int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow) +{ + struct state s; /* input/output state */ + int err; /* return value */ + + /* initialize input state */ + s.infun = infun; + s.inhow = inhow; + s.left = 0; + s.bitbuf = 0; + s.bitcnt = 0; + + /* initialize output state */ + s.outfun = outfun; + s.outhow = outhow; + s.next = 0; + s.first = 1; + + /* return if bits() or decode() tries to read past available input */ + if (setjmp(s.env) != 0) /* if came back here via longjmp(), */ + err = 2; /* then skip decomp(), return error */ + else + err = decomp(&s); /* decompress */ + + /* write any leftover output and update the error code if needed */ + if (err != 1 && s.next && s.outfun(s.outhow, s.out, s.next) && err == 0) + err = 1; + return err; +} + +#ifdef TEST +/* Example of how to use blast() */ +#include +#include + +#define CHUNK 16384 + +local unsigned inf(void *how, unsigned char **buf) +{ + static unsigned char hold[CHUNK]; + + *buf = hold; + return fread(hold, 1, CHUNK, (FILE *)how); +} + +local int outf(void *how, unsigned char *buf, unsigned len) +{ + return fwrite(buf, 1, len, (FILE *)how) != len; +} + +/* Decompress a PKWare Compression Library stream from stdin to stdout */ +int main(void) +{ + int ret, n; + + /* decompress to stdout */ + ret = blast(inf, stdin, outf, stdout); + if (ret != 0) fprintf(stderr, "blast error: %d\n", ret); + + /* see if there are any leftover bytes */ + n = 0; + while (getchar() != EOF) n++; + if (n) fprintf(stderr, "blast warning: %d unused bytes of input\n", n); + + /* return blast() error code */ + return ret; +} +#endif diff --git a/compat/zlib/contrib/blast/blast.h b/compat/zlib/contrib/blast/blast.h new file mode 100644 index 0000000..ce9e541 --- /dev/null +++ b/compat/zlib/contrib/blast/blast.h @@ -0,0 +1,71 @@ +/* blast.h -- interface for blast.c + Copyright (C) 2003 Mark Adler + version 1.1, 16 Feb 2003 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + + +/* + * blast() decompresses the PKWare Data Compression Library (DCL) compressed + * format. It provides the same functionality as the explode() function in + * that library. (Note: PKWare overused the "implode" verb, and the format + * used by their library implode() function is completely different and + * incompatible with the implode compression method supported by PKZIP.) + */ + + +typedef unsigned (*blast_in)(void *how, unsigned char **buf); +typedef int (*blast_out)(void *how, unsigned char *buf, unsigned len); +/* Definitions for input/output functions passed to blast(). See below for + * what the provided functions need to do. + */ + + +int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow); +/* Decompress input to output using the provided infun() and outfun() calls. + * On success, the return value of blast() is zero. If there is an error in + * the source data, i.e. it is not in the proper format, then a negative value + * is returned. If there is not enough input available or there is not enough + * output space, then a positive error is returned. + * + * The input function is invoked: len = infun(how, &buf), where buf is set by + * infun() to point to the input buffer, and infun() returns the number of + * available bytes there. If infun() returns zero, then blast() returns with + * an input error. (blast() only asks for input if it needs it.) inhow is for + * use by the application to pass an input descriptor to infun(), if desired. + * + * The output function is invoked: err = outfun(how, buf, len), where the bytes + * to be written are buf[0..len-1]. If err is not zero, then blast() returns + * with an output error. outfun() is always called with len <= 4096. outhow + * is for use by the application to pass an output descriptor to outfun(), if + * desired. + * + * The return codes are: + * + * 2: ran out of input before completing decompression + * 1: output error before completing decompression + * 0: successful decompression + * -1: literal flag not zero or one + * -2: dictionary size not in 4..6 + * -3: distance is too far back + * + * At the bottom of blast.c is an example program that uses blast() that can be + * compiled to produce a command-line decompression filter by defining TEST. + */ diff --git a/compat/zlib/contrib/blast/test.pk b/compat/zlib/contrib/blast/test.pk new file mode 100644 index 0000000..be10b2b Binary files /dev/null and b/compat/zlib/contrib/blast/test.pk differ diff --git a/compat/zlib/contrib/blast/test.txt b/compat/zlib/contrib/blast/test.txt new file mode 100644 index 0000000..bfdf1c5 --- /dev/null +++ b/compat/zlib/contrib/blast/test.txt @@ -0,0 +1 @@ +AIAIAIAIAIAIA \ No newline at end of file diff --git a/compat/zlib/contrib/delphi/ZLib.pas b/compat/zlib/contrib/delphi/ZLib.pas new file mode 100644 index 0000000..3f2b8b4 --- /dev/null +++ b/compat/zlib/contrib/delphi/ZLib.pas @@ -0,0 +1,557 @@ +{*******************************************************} +{ } +{ Borland Delphi Supplemental Components } +{ ZLIB Data Compression Interface Unit } +{ } +{ Copyright (c) 1997,99 Borland Corporation } +{ } +{*******************************************************} + +{ Updated for zlib 1.2.x by Cosmin Truta } + +unit ZLib; + +interface + +uses SysUtils, Classes; + +type + TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer; cdecl; + TFree = procedure (AppData, Block: Pointer); cdecl; + + // Internal structure. Ignore. + TZStreamRec = packed record + next_in: PChar; // next input byte + avail_in: Integer; // number of bytes available at next_in + total_in: Longint; // total nb of input bytes read so far + + next_out: PChar; // next output byte should be put here + avail_out: Integer; // remaining free space at next_out + total_out: Longint; // total nb of bytes output so far + + msg: PChar; // last error message, NULL if no error + internal: Pointer; // not visible by applications + + zalloc: TAlloc; // used to allocate the internal state + zfree: TFree; // used to free the internal state + AppData: Pointer; // private data object passed to zalloc and zfree + + data_type: Integer; // best guess about the data type: ascii or binary + adler: Longint; // adler32 value of the uncompressed data + reserved: Longint; // reserved for future use + end; + + // Abstract ancestor class + TCustomZlibStream = class(TStream) + private + FStrm: TStream; + FStrmPos: Integer; + FOnProgress: TNotifyEvent; + FZRec: TZStreamRec; + FBuffer: array [Word] of Char; + protected + procedure Progress(Sender: TObject); dynamic; + property OnProgress: TNotifyEvent read FOnProgress write FOnProgress; + constructor Create(Strm: TStream); + end; + +{ TCompressionStream compresses data on the fly as data is written to it, and + stores the compressed data to another stream. + + TCompressionStream is write-only and strictly sequential. Reading from the + stream will raise an exception. Using Seek to move the stream pointer + will raise an exception. + + Output data is cached internally, written to the output stream only when + the internal output buffer is full. All pending output data is flushed + when the stream is destroyed. + + The Position property returns the number of uncompressed bytes of + data that have been written to the stream so far. + + CompressionRate returns the on-the-fly percentage by which the original + data has been compressed: (1 - (CompressedBytes / UncompressedBytes)) * 100 + If raw data size = 100 and compressed data size = 25, the CompressionRate + is 75% + + The OnProgress event is called each time the output buffer is filled and + written to the output stream. This is useful for updating a progress + indicator when you are writing a large chunk of data to the compression + stream in a single call.} + + + TCompressionLevel = (clNone, clFastest, clDefault, clMax); + + TCompressionStream = class(TCustomZlibStream) + private + function GetCompressionRate: Single; + public + constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream); + destructor Destroy; override; + function Read(var Buffer; Count: Longint): Longint; override; + function Write(const Buffer; Count: Longint): Longint; override; + function Seek(Offset: Longint; Origin: Word): Longint; override; + property CompressionRate: Single read GetCompressionRate; + property OnProgress; + end; + +{ TDecompressionStream decompresses data on the fly as data is read from it. + + Compressed data comes from a separate source stream. TDecompressionStream + is read-only and unidirectional; you can seek forward in the stream, but not + backwards. The special case of setting the stream position to zero is + allowed. Seeking forward decompresses data until the requested position in + the uncompressed data has been reached. Seeking backwards, seeking relative + to the end of the stream, requesting the size of the stream, and writing to + the stream will raise an exception. + + The Position property returns the number of bytes of uncompressed data that + have been read from the stream so far. + + The OnProgress event is called each time the internal input buffer of + compressed data is exhausted and the next block is read from the input stream. + This is useful for updating a progress indicator when you are reading a + large chunk of data from the decompression stream in a single call.} + + TDecompressionStream = class(TCustomZlibStream) + public + constructor Create(Source: TStream); + destructor Destroy; override; + function Read(var Buffer; Count: Longint): Longint; override; + function Write(const Buffer; Count: Longint): Longint; override; + function Seek(Offset: Longint; Origin: Word): Longint; override; + property OnProgress; + end; + + + +{ CompressBuf compresses data, buffer to buffer, in one call. + In: InBuf = ptr to compressed data + InBytes = number of bytes in InBuf + Out: OutBuf = ptr to newly allocated buffer containing decompressed data + OutBytes = number of bytes in OutBuf } +procedure CompressBuf(const InBuf: Pointer; InBytes: Integer; + out OutBuf: Pointer; out OutBytes: Integer); + + +{ DecompressBuf decompresses data, buffer to buffer, in one call. + In: InBuf = ptr to compressed data + InBytes = number of bytes in InBuf + OutEstimate = zero, or est. size of the decompressed data + Out: OutBuf = ptr to newly allocated buffer containing decompressed data + OutBytes = number of bytes in OutBuf } +procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer; + OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer); + +{ DecompressToUserBuf decompresses data, buffer to buffer, in one call. + In: InBuf = ptr to compressed data + InBytes = number of bytes in InBuf + Out: OutBuf = ptr to user-allocated buffer to contain decompressed data + BufSize = number of bytes in OutBuf } +procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; + const OutBuf: Pointer; BufSize: Integer); + +const + zlib_version = '1.2.3'; + +type + EZlibError = class(Exception); + ECompressionError = class(EZlibError); + EDecompressionError = class(EZlibError); + +implementation + +uses ZLibConst; + +const + Z_NO_FLUSH = 0; + Z_PARTIAL_FLUSH = 1; + Z_SYNC_FLUSH = 2; + Z_FULL_FLUSH = 3; + Z_FINISH = 4; + + Z_OK = 0; + Z_STREAM_END = 1; + Z_NEED_DICT = 2; + Z_ERRNO = (-1); + Z_STREAM_ERROR = (-2); + Z_DATA_ERROR = (-3); + Z_MEM_ERROR = (-4); + Z_BUF_ERROR = (-5); + Z_VERSION_ERROR = (-6); + + Z_NO_COMPRESSION = 0; + Z_BEST_SPEED = 1; + Z_BEST_COMPRESSION = 9; + Z_DEFAULT_COMPRESSION = (-1); + + Z_FILTERED = 1; + Z_HUFFMAN_ONLY = 2; + Z_RLE = 3; + Z_DEFAULT_STRATEGY = 0; + + Z_BINARY = 0; + Z_ASCII = 1; + Z_UNKNOWN = 2; + + Z_DEFLATED = 8; + + +{$L adler32.obj} +{$L compress.obj} +{$L crc32.obj} +{$L deflate.obj} +{$L infback.obj} +{$L inffast.obj} +{$L inflate.obj} +{$L inftrees.obj} +{$L trees.obj} +{$L uncompr.obj} +{$L zutil.obj} + +procedure adler32; external; +procedure compressBound; external; +procedure crc32; external; +procedure deflateInit2_; external; +procedure deflateParams; external; + +function _malloc(Size: Integer): Pointer; cdecl; +begin + Result := AllocMem(Size); +end; + +procedure _free(Block: Pointer); cdecl; +begin + FreeMem(Block); +end; + +procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl; +begin + FillChar(P^, count, B); +end; + +procedure _memcpy(dest, source: Pointer; count: Integer); cdecl; +begin + Move(source^, dest^, count); +end; + + + +// deflate compresses data +function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar; + recsize: Integer): Integer; external; +function deflate(var strm: TZStreamRec; flush: Integer): Integer; external; +function deflateEnd(var strm: TZStreamRec): Integer; external; + +// inflate decompresses data +function inflateInit_(var strm: TZStreamRec; version: PChar; + recsize: Integer): Integer; external; +function inflate(var strm: TZStreamRec; flush: Integer): Integer; external; +function inflateEnd(var strm: TZStreamRec): Integer; external; +function inflateReset(var strm: TZStreamRec): Integer; external; + + +function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl; +begin +// GetMem(Result, Items*Size); + Result := AllocMem(Items * Size); +end; + +procedure zlibFreeMem(AppData, Block: Pointer); cdecl; +begin + FreeMem(Block); +end; + +{function zlibCheck(code: Integer): Integer; +begin + Result := code; + if code < 0 then + raise EZlibError.Create('error'); //!! +end;} + +function CCheck(code: Integer): Integer; +begin + Result := code; + if code < 0 then + raise ECompressionError.Create('error'); //!! +end; + +function DCheck(code: Integer): Integer; +begin + Result := code; + if code < 0 then + raise EDecompressionError.Create('error'); //!! +end; + +procedure CompressBuf(const InBuf: Pointer; InBytes: Integer; + out OutBuf: Pointer; out OutBytes: Integer); +var + strm: TZStreamRec; + P: Pointer; +begin + FillChar(strm, sizeof(strm), 0); + strm.zalloc := zlibAllocMem; + strm.zfree := zlibFreeMem; + OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255; + GetMem(OutBuf, OutBytes); + try + strm.next_in := InBuf; + strm.avail_in := InBytes; + strm.next_out := OutBuf; + strm.avail_out := OutBytes; + CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm))); + try + while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do + begin + P := OutBuf; + Inc(OutBytes, 256); + ReallocMem(OutBuf, OutBytes); + strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P))); + strm.avail_out := 256; + end; + finally + CCheck(deflateEnd(strm)); + end; + ReallocMem(OutBuf, strm.total_out); + OutBytes := strm.total_out; + except + FreeMem(OutBuf); + raise + end; +end; + + +procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer; + OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer); +var + strm: TZStreamRec; + P: Pointer; + BufInc: Integer; +begin + FillChar(strm, sizeof(strm), 0); + strm.zalloc := zlibAllocMem; + strm.zfree := zlibFreeMem; + BufInc := (InBytes + 255) and not 255; + if OutEstimate = 0 then + OutBytes := BufInc + else + OutBytes := OutEstimate; + GetMem(OutBuf, OutBytes); + try + strm.next_in := InBuf; + strm.avail_in := InBytes; + strm.next_out := OutBuf; + strm.avail_out := OutBytes; + DCheck(inflateInit_(strm, zlib_version, sizeof(strm))); + try + while DCheck(inflate(strm, Z_NO_FLUSH)) <> Z_STREAM_END do + begin + P := OutBuf; + Inc(OutBytes, BufInc); + ReallocMem(OutBuf, OutBytes); + strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P))); + strm.avail_out := BufInc; + end; + finally + DCheck(inflateEnd(strm)); + end; + ReallocMem(OutBuf, strm.total_out); + OutBytes := strm.total_out; + except + FreeMem(OutBuf); + raise + end; +end; + +procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; + const OutBuf: Pointer; BufSize: Integer); +var + strm: TZStreamRec; +begin + FillChar(strm, sizeof(strm), 0); + strm.zalloc := zlibAllocMem; + strm.zfree := zlibFreeMem; + strm.next_in := InBuf; + strm.avail_in := InBytes; + strm.next_out := OutBuf; + strm.avail_out := BufSize; + DCheck(inflateInit_(strm, zlib_version, sizeof(strm))); + try + if DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END then + raise EZlibError.CreateRes(@sTargetBufferTooSmall); + finally + DCheck(inflateEnd(strm)); + end; +end; + +// TCustomZlibStream + +constructor TCustomZLibStream.Create(Strm: TStream); +begin + inherited Create; + FStrm := Strm; + FStrmPos := Strm.Position; + FZRec.zalloc := zlibAllocMem; + FZRec.zfree := zlibFreeMem; +end; + +procedure TCustomZLibStream.Progress(Sender: TObject); +begin + if Assigned(FOnProgress) then FOnProgress(Sender); +end; + + +// TCompressionStream + +constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel; + Dest: TStream); +const + Levels: array [TCompressionLevel] of ShortInt = + (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION); +begin + inherited Create(Dest); + FZRec.next_out := FBuffer; + FZRec.avail_out := sizeof(FBuffer); + CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec))); +end; + +destructor TCompressionStream.Destroy; +begin + FZRec.next_in := nil; + FZRec.avail_in := 0; + try + if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; + while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END) + and (FZRec.avail_out = 0) do + begin + FStrm.WriteBuffer(FBuffer, sizeof(FBuffer)); + FZRec.next_out := FBuffer; + FZRec.avail_out := sizeof(FBuffer); + end; + if FZRec.avail_out < sizeof(FBuffer) then + FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out); + finally + deflateEnd(FZRec); + end; + inherited Destroy; +end; + +function TCompressionStream.Read(var Buffer; Count: Longint): Longint; +begin + raise ECompressionError.CreateRes(@sInvalidStreamOp); +end; + +function TCompressionStream.Write(const Buffer; Count: Longint): Longint; +begin + FZRec.next_in := @Buffer; + FZRec.avail_in := Count; + if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; + while (FZRec.avail_in > 0) do + begin + CCheck(deflate(FZRec, 0)); + if FZRec.avail_out = 0 then + begin + FStrm.WriteBuffer(FBuffer, sizeof(FBuffer)); + FZRec.next_out := FBuffer; + FZRec.avail_out := sizeof(FBuffer); + FStrmPos := FStrm.Position; + Progress(Self); + end; + end; + Result := Count; +end; + +function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint; +begin + if (Offset = 0) and (Origin = soFromCurrent) then + Result := FZRec.total_in + else + raise ECompressionError.CreateRes(@sInvalidStreamOp); +end; + +function TCompressionStream.GetCompressionRate: Single; +begin + if FZRec.total_in = 0 then + Result := 0 + else + Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0; +end; + + +// TDecompressionStream + +constructor TDecompressionStream.Create(Source: TStream); +begin + inherited Create(Source); + FZRec.next_in := FBuffer; + FZRec.avail_in := 0; + DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec))); +end; + +destructor TDecompressionStream.Destroy; +begin + FStrm.Seek(-FZRec.avail_in, 1); + inflateEnd(FZRec); + inherited Destroy; +end; + +function TDecompressionStream.Read(var Buffer; Count: Longint): Longint; +begin + FZRec.next_out := @Buffer; + FZRec.avail_out := Count; + if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos; + while (FZRec.avail_out > 0) do + begin + if FZRec.avail_in = 0 then + begin + FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer)); + if FZRec.avail_in = 0 then + begin + Result := Count - FZRec.avail_out; + Exit; + end; + FZRec.next_in := FBuffer; + FStrmPos := FStrm.Position; + Progress(Self); + end; + CCheck(inflate(FZRec, 0)); + end; + Result := Count; +end; + +function TDecompressionStream.Write(const Buffer; Count: Longint): Longint; +begin + raise EDecompressionError.CreateRes(@sInvalidStreamOp); +end; + +function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint; +var + I: Integer; + Buf: array [0..4095] of Char; +begin + if (Offset = 0) and (Origin = soFromBeginning) then + begin + DCheck(inflateReset(FZRec)); + FZRec.next_in := FBuffer; + FZRec.avail_in := 0; + FStrm.Position := 0; + FStrmPos := 0; + end + else if ( (Offset >= 0) and (Origin = soFromCurrent)) or + ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then + begin + if Origin = soFromBeginning then Dec(Offset, FZRec.total_out); + if Offset > 0 then + begin + for I := 1 to Offset div sizeof(Buf) do + ReadBuffer(Buf, sizeof(Buf)); + ReadBuffer(Buf, Offset mod sizeof(Buf)); + end; + end + else + raise EDecompressionError.CreateRes(@sInvalidStreamOp); + Result := FZRec.total_out; +end; + + +end. diff --git a/compat/zlib/contrib/delphi/ZLibConst.pas b/compat/zlib/contrib/delphi/ZLibConst.pas new file mode 100644 index 0000000..cdfe136 --- /dev/null +++ b/compat/zlib/contrib/delphi/ZLibConst.pas @@ -0,0 +1,11 @@ +unit ZLibConst; + +interface + +resourcestring + sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; + sInvalidStreamOp = 'Invalid stream operation'; + +implementation + +end. diff --git a/compat/zlib/contrib/delphi/readme.txt b/compat/zlib/contrib/delphi/readme.txt new file mode 100644 index 0000000..2dc9a8b --- /dev/null +++ b/compat/zlib/contrib/delphi/readme.txt @@ -0,0 +1,76 @@ + +Overview +======== + +This directory contains an update to the ZLib interface unit, +distributed by Borland as a Delphi supplemental component. + +The original ZLib unit is Copyright (c) 1997,99 Borland Corp., +and is based on zlib version 1.0.4. There are a series of bugs +and security problems associated with that old zlib version, and +we recommend the users to update their ZLib unit. + + +Summary of modifications +======================== + +- Improved makefile, adapted to zlib version 1.2.1. + +- Some field types from TZStreamRec are changed from Integer to + Longint, for consistency with the zlib.h header, and for 64-bit + readiness. + +- The zlib_version constant is updated. + +- The new Z_RLE strategy has its corresponding symbolic constant. + +- The allocation and deallocation functions and function types + (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl, + and _malloc and _free are added as C RTL stubs. As a result, + the original C sources of zlib can be compiled out of the box, + and linked to the ZLib unit. + + +Suggestions for improvements +============================ + +Currently, the ZLib unit provides only a limited wrapper around +the zlib library, and much of the original zlib functionality is +missing. Handling compressed file formats like ZIP/GZIP or PNG +cannot be implemented without having this functionality. +Applications that handle these formats are either using their own, +duplicated code, or not using the ZLib unit at all. + +Here are a few suggestions: + +- Checksum class wrappers around adler32() and crc32(), similar + to the Java classes that implement the java.util.zip.Checksum + interface. + +- The ability to read and write raw deflate streams, without the + zlib stream header and trailer. Raw deflate streams are used + in the ZIP file format. + +- The ability to read and write gzip streams, used in the GZIP + file format, and normally produced by the gzip program. + +- The ability to select a different compression strategy, useful + to PNG and MNG image compression, and to multimedia compression + in general. Besides the compression level + + TCompressionLevel = (clNone, clFastest, clDefault, clMax); + + which, in fact, could have used the 'z' prefix and avoided + TColor-like symbols + + TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax); + + there could be a compression strategy + + TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle); + +- ZIP and GZIP stream handling via TStreams. + + +-- +Cosmin Truta diff --git a/compat/zlib/contrib/delphi/zlibd32.mak b/compat/zlib/contrib/delphi/zlibd32.mak new file mode 100644 index 0000000..88fafa0 --- /dev/null +++ b/compat/zlib/contrib/delphi/zlibd32.mak @@ -0,0 +1,93 @@ +# Makefile for zlib +# For use with Delphi and C++ Builder under Win32 +# Updated for zlib 1.2.x by Cosmin Truta + +# ------------ Borland C++ ------------ + +# This project uses the Delphi (fastcall/register) calling convention: +LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl + +CC = bcc32 +LD = bcc32 +AR = tlib +# do not use "-pr" in CFLAGS +CFLAGS = -a -d -k- -O2 $(LOC) +LDFLAGS = + + +# variables +ZLIB_LIB = zlib.lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj +OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj +OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzio.obj: gzio.c zutil.h zlib.h zconf.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: example.c zlib.h zconf.h + +minigzip.obj: minigzip.c zlib.h zconf.h + + +# For the sake of the old Borland make, +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + + +# cleanup +clean: + -del *.obj + -del *.exe + -del *.lib + -del *.tds + -del zlib.bak + -del foo.gz + diff --git a/compat/zlib/contrib/dotzlib/DotZLib.build b/compat/zlib/contrib/dotzlib/DotZLib.build new file mode 100644 index 0000000..ed19cc9 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib.build @@ -0,0 +1,33 @@ + + + A .Net wrapper library around ZLib1.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/DotZLib.chm b/compat/zlib/contrib/dotzlib/DotZLib.chm new file mode 100644 index 0000000..0bc7df7 Binary files /dev/null and b/compat/zlib/contrib/dotzlib/DotZLib.chm differ diff --git a/compat/zlib/contrib/dotzlib/DotZLib.sln b/compat/zlib/contrib/dotzlib/DotZLib.sln new file mode 100644 index 0000000..ac45ca0 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs new file mode 100644 index 0000000..6fc0fdc --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("DotZLib")] +[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Henrik Ravn")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs new file mode 100644 index 0000000..dfe7e90 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -0,0 +1,202 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + #region ChecksumGeneratorBase + /// + /// Implements the common functionality needed for all s + /// + /// + public abstract class ChecksumGeneratorBase : ChecksumGenerator + { + /// + /// The value of the current checksum + /// + protected uint _current; + + /// + /// Initializes a new instance of the checksum generator base - the current checksum is + /// set to zero + /// + public ChecksumGeneratorBase() + { + _current = 0; + } + + /// + /// Initializes a new instance of the checksum generator basewith a specified value + /// + /// The value to set the current checksum to + public ChecksumGeneratorBase(uint initialValue) + { + _current = initialValue; + } + + /// + /// Resets the current checksum to zero + /// + public void Reset() { _current = 0; } + + /// + /// Gets the current checksum value + /// + public uint Value { get { return _current; } } + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + /// All the other Update methods are implmeneted in terms of this one. + /// This is therefore the only method a derived class has to implement + public abstract void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with an array of bytes. + /// + /// The data to update the checksum with + public void Update(byte[] data) + { + Update(data, 0, data.Length); + } + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + public void Update(string data) + { + Update(Encoding.UTF8.GetBytes(data)); + } + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + public void Update(string data, Encoding encoding) + { + Update(encoding.GetBytes(data)); + } + + } + #endregion + + #region CRC32 + /// + /// Implements a CRC32 checksum generator + /// + public sealed class CRC32Checksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint crc32(uint crc, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the CRC32 checksum generator + /// + public CRC32Checksum() : base() {} + + /// + /// Initializes a new instance of the CRC32 checksum generator with a specified value + /// + /// The value to set the current checksum to + public CRC32Checksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + + #region Adler + /// + /// Implements a checksum generator that computes the Adler checksum on data + /// + public sealed class AdlerChecksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint adler32(uint adler, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the Adler checksum generator + /// + public AdlerChecksum() : base() {} + + /// + /// Initializes a new instance of the Adler checksum generator with a specified value + /// + /// The value to set the current checksum to + public AdlerChecksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + +} \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs new file mode 100644 index 0000000..16997e9 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs @@ -0,0 +1,83 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; + +namespace DotZLib +{ + + /// + /// This class implements a circular buffer + /// + internal class CircularBuffer + { + #region Private data + private int _capacity; + private int _head; + private int _tail; + private int _size; + private byte[] _buffer; + #endregion + + public CircularBuffer(int capacity) + { + Debug.Assert( capacity > 0 ); + _buffer = new byte[capacity]; + _capacity = capacity; + _head = 0; + _tail = 0; + _size = 0; + } + + public int Size { get { return _size; } } + + public int Put(byte[] source, int offset, int count) + { + Debug.Assert( count > 0 ); + int trueCount = Math.Min(count, _capacity - Size); + for (int i = 0; i < trueCount; ++i) + _buffer[(_tail+i) % _capacity] = source[offset+i]; + _tail += trueCount; + _tail %= _capacity; + _size += trueCount; + return trueCount; + } + + public bool Put(byte b) + { + if (Size == _capacity) // no room + return false; + _buffer[_tail++] = b; + _tail %= _capacity; + ++_size; + return true; + } + + public int Get(byte[] destination, int offset, int count) + { + int trueCount = Math.Min(count,Size); + for (int i = 0; i < trueCount; ++i) + destination[offset + i] = _buffer[(_head+i) % _capacity]; + _head += trueCount; + _head %= _capacity; + _size -= trueCount; + return trueCount; + } + + public int Get() + { + if (Size == 0) + return -1; + + int result = (int)_buffer[_head++ % _capacity]; + --_size; + return result; + } + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs new file mode 100644 index 0000000..954db7d --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs @@ -0,0 +1,198 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements the common functionality needed for all s + /// + public abstract class CodecBase : Codec, IDisposable + { + + #region Data members + + /// + /// Instance of the internal zlib buffer structure that is + /// passed to all functions in the zlib dll + /// + internal ZStream _ztream = new ZStream(); + + /// + /// True if the object instance has been disposed, false otherwise + /// + protected bool _isDisposed = false; + + /// + /// The size of the internal buffers + /// + protected const int kBufferSize = 16384; + + private byte[] _outBuffer = new byte[kBufferSize]; + private byte[] _inBuffer = new byte[kBufferSize]; + + private GCHandle _hInput; + private GCHandle _hOutput; + + private uint _checksum = 0; + + #endregion + + /// + /// Initializes a new instance of the CodeBase class. + /// + public CodecBase() + { + try + { + _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned); + _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned); + } + catch (Exception) + { + CleanUp(false); + throw; + } + } + + + #region Codec Members + + /// + /// Occurs when more processed data are available. + /// + public event DataAvailableHandler DataAvailable; + + /// + /// Fires the event + /// + protected void OnDataAvailable() + { + if (_ztream.total_out > 0) + { + if (DataAvailable != null) + DataAvailable( _outBuffer, 0, (int)_ztream.total_out); + resetOutput(); + } + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + public void Add(byte[] data) + { + Add(data,0,data.Length); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + /// This must be implemented by a derived class + public abstract void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + /// This must be implemented by a derived class + public abstract void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + public uint Checksum { get { return _checksum; } } + + #endregion + + #region Destructor & IDisposable stuff + + /// + /// Destroys this instance + /// + ~CodecBase() + { + CleanUp(false); + } + + /// + /// Releases any unmanaged resources and calls the method of the derived class + /// + public void Dispose() + { + CleanUp(true); + } + + /// + /// Performs any codec specific cleanup + /// + /// This must be implemented by a derived class + protected abstract void CleanUp(); + + // performs the release of the handles and calls the dereived CleanUp() + private void CleanUp(bool isDisposing) + { + if (!_isDisposed) + { + CleanUp(); + if (_hInput.IsAllocated) + _hInput.Free(); + if (_hOutput.IsAllocated) + _hOutput.Free(); + + _isDisposed = true; + } + } + + + #endregion + + #region Helper methods + + /// + /// Copies a number of bytes to the internal codec buffer - ready for proccesing + /// + /// The byte array that contains the data to copy + /// The index of the first byte to copy + /// The number of bytes to copy from data + protected void copyInput(byte[] data, int startIndex, int count) + { + Array.Copy(data, startIndex, _inBuffer,0, count); + _ztream.next_in = _hInput.AddrOfPinnedObject(); + _ztream.total_in = 0; + _ztream.avail_in = (uint)count; + + } + + /// + /// Resets the internal output buffers to a known state - ready for processing + /// + protected void resetOutput() + { + _ztream.total_out = 0; + _ztream.avail_out = kBufferSize; + _ztream.next_out = _hOutput.AddrOfPinnedObject(); + } + + /// + /// Updates the running checksum property + /// + /// The new checksum value + protected void setChecksum(uint newSum) + { + _checksum = newSum; + } + #endregion + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs new file mode 100644 index 0000000..d7b8dcc --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs @@ -0,0 +1,106 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data compressor, using the deflate algorithm in the ZLib dll + /// + public sealed class Deflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Deflater + /// + /// The compression level to use for this Deflater + public Deflater(CompressLevel level) : base() + { + int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize deflater"); + + resetOutput(); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + while (err >= 0 && _ztream.avail_in > 0) + { + err = deflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = deflate(ref _ztream, (int)FlushTypes.None); + } + inputIndex += (int)_ztream.total_in; + } + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = deflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + deflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib deflate stream + /// + protected override void CleanUp() { deflateEnd(ref _ztream); } + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs new file mode 100644 index 0000000..410deb0 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs @@ -0,0 +1,288 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + + #region Internal types + + /// + /// Defines constants for the various flush types used with zlib + /// + internal enum FlushTypes + { + None, Partial, Sync, Full, Finish, Block + } + + #region ZStream structure + // internal mapping of the zlib zstream structure for marshalling + [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)] + internal struct ZStream + { + public IntPtr next_in; + public uint avail_in; + public uint total_in; + + public IntPtr next_out; + public uint avail_out; + public uint total_out; + + [MarshalAs(UnmanagedType.LPStr)] + string msg; + uint state; + + uint zalloc; + uint zfree; + uint opaque; + + int data_type; + public uint adler; + uint reserved; + } + + #endregion + + #endregion + + #region Public enums + /// + /// Defines constants for the available compression levels in zlib + /// + public enum CompressLevel : int + { + /// + /// The default compression level with a reasonable compromise between compression and speed + /// + Default = -1, + /// + /// No compression at all. The data are passed straight through. + /// + None = 0, + /// + /// The maximum compression rate available. + /// + Best = 9, + /// + /// The fastest available compression level. + /// + Fastest = 1 + } + #endregion + + #region Exception classes + /// + /// The exception that is thrown when an error occurs on the zlib dll + /// + public class ZLibException : ApplicationException + { + /// + /// Initializes a new instance of the class with a specified + /// error message and error code + /// + /// The zlib error code that caused the exception + /// A message that (hopefully) describes the error + public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg)) + { + } + + /// + /// Initializes a new instance of the class with a specified + /// error code + /// + /// The zlib error code that caused the exception + public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode)) + { + } + } + #endregion + + #region Interfaces + + /// + /// Declares methods and properties that enables a running checksum to be calculated + /// + public interface ChecksumGenerator + { + /// + /// Gets the current value of the checksum + /// + uint Value { get; } + + /// + /// Clears the current checksum to 0 + /// + void Reset(); + + /// + /// Updates the current checksum with an array of bytes + /// + /// The data to update the checksum with + void Update(byte[] data); + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + void Update(string data); + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + void Update(string data, Encoding encoding); + } + + + /// + /// Represents the method that will be called from a codec when new data + /// are available. + /// + /// The byte array containing the processed data + /// The index of the first processed byte in data + /// The number of processed bytes available + /// On return from this method, the data may be overwritten, so grab it while you can. + /// You cannot assume that startIndex will be zero. + /// + public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); + + /// + /// Declares methods and events for implementing compressors/decompressors + /// + public interface Codec + { + /// + /// Occurs when more processed data are available. + /// + event DataAvailableHandler DataAvailable; + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data); + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + uint Checksum { get; } + + + } + + #endregion + + #region Classes + /// + /// Encapsulates general information about the ZLib library + /// + public class Info + { + #region DLL imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint zlibCompileFlags(); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern string zlibVersion(); + #endregion + + #region Private stuff + private uint _flags; + + // helper function that unpacks a bitsize mask + private static int bitSize(uint bits) + { + switch (bits) + { + case 0: return 16; + case 1: return 32; + case 2: return 64; + } + return -1; + } + #endregion + + /// + /// Constructs an instance of the Info class. + /// + public Info() + { + _flags = zlibCompileFlags(); + } + + /// + /// True if the library is compiled with debug info + /// + public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } } + + /// + /// True if the library is compiled with assembly optimizations + /// + public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } } + + /// + /// Gets the size of the unsigned int that was compiled into Zlib + /// + public int SizeOfUInt { get { return bitSize(_flags & 3); } } + + /// + /// Gets the size of the unsigned long that was compiled into Zlib + /// + public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } } + + /// + /// Gets the size of the pointers that were compiled into Zlib + /// + public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } } + + /// + /// Gets the size of the z_off_t type that was compiled into Zlib + /// + public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } } + + /// + /// Gets the version of ZLib as a string, e.g. "1.2.1" + /// + public static string Version { get { return zlibVersion(); } } + } + + #endregion + +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj new file mode 100644 index 0000000..71eeb85 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs new file mode 100644 index 0000000..f861675 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs @@ -0,0 +1,301 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements a compressed , in GZip (.gz) format. + /// + public class GZipStream : Stream, IDisposable + { + #region Dll Imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern IntPtr gzopen(string name, string mode); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzclose(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzwrite(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzread(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzgetc(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzputc(IntPtr gzFile, int c); + + #endregion + + #region Private data + private IntPtr _gzFile; + private bool _isDisposed = false; + private bool _isWriting; + #endregion + + #region Constructors + /// + /// Creates a new file as a writeable GZipStream + /// + /// The name of the compressed file to create + /// The compression level to use when adding data + /// If an error occurred in the internal zlib function + public GZipStream(string fileName, CompressLevel level) + { + _isWriting = true; + _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level)); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + } + + /// + /// Opens an existing file as a readable GZipStream + /// + /// The name of the file to open + /// If an error occurred in the internal zlib function + public GZipStream(string fileName) + { + _isWriting = false; + _gzFile = gzopen(fileName, "rb"); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + + } + #endregion + + #region Access properties + /// + /// Returns true of this stream can be read from, false otherwise + /// + public override bool CanRead + { + get + { + return !_isWriting; + } + } + + + /// + /// Returns false. + /// + public override bool CanSeek + { + get + { + return false; + } + } + + /// + /// Returns true if this tsream is writeable, false otherwise + /// + public override bool CanWrite + { + get + { + return _isWriting; + } + } + #endregion + + #region Destructor & IDispose stuff + + /// + /// Destroys this instance + /// + ~GZipStream() + { + cleanUp(false); + } + + /// + /// Closes the external file handle + /// + public void Dispose() + { + cleanUp(true); + } + + // Does the actual closing of the file handle. + private void cleanUp(bool isDisposing) + { + if (!_isDisposed) + { + gzclose(_gzFile); + _isDisposed = true; + } + } + #endregion + + #region Basic reading and writing + /// + /// Attempts to read a number of bytes from the stream. + /// + /// The destination data buffer + /// The index of the first destination byte in buffer + /// The number of bytes requested + /// The number of bytes read + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not readable. + /// If this stream has been disposed. + public override int Read(byte[] buffer, int offset, int count) + { + if (!CanRead) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + int result; + try + { + result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + return result; + } + + /// + /// Attempts to read a single byte from the stream. + /// + /// The byte that was read, or -1 in case of error or End-Of-File + public override int ReadByte() + { + if (!CanRead) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + return gzgetc(_gzFile); + } + + /// + /// Writes a number of bytes to the stream + /// + /// + /// + /// + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void Write(byte[] buffer, int offset, int count) + { + if (!CanWrite) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + try + { + int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + } + + /// + /// Writes a single byte to the stream + /// + /// The byte to add to the stream. + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void WriteByte(byte value) + { + if (!CanWrite) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + int result = gzputc(_gzFile, (int)value); + if (result < 0) + throw new IOException(); + } + #endregion + + #region Position & length stuff + /// + /// Not supported. + /// + /// + /// Always thrown + public override void SetLength(long value) + { + throw new NotSupportedException(); + } + + /// + /// Not suppported. + /// + /// + /// + /// + /// Always thrown + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException(); + } + + /// + /// Flushes the GZipStream. + /// + /// In this implementation, this method does nothing. This is because excessive + /// flushing may degrade the achievable compression rates. + public override void Flush() + { + // left empty on purpose + } + + /// + /// Gets/sets the current position in the GZipStream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Position + { + get + { + throw new NotSupportedException(); + } + set + { + throw new NotSupportedException(); + } + } + + /// + /// Gets the size of the stream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Length + { + get + { + throw new NotSupportedException(); + } + } + #endregion + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs new file mode 100644 index 0000000..4e60cda --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs @@ -0,0 +1,105 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data decompressor, using the inflate algorithm in the ZLib dll + /// + public class Inflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int inflateInit_(ref ZStream sz, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Inflater + /// + public Inflater() : base() + { + int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize inflater"); + + resetOutput(); + } + + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + err = inflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = inflate(ref _ztream, (int)FlushTypes.None); + } + + inputIndex += (int)_ztream.total_in; + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = inflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + inflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib inflate stream + /// + protected override void CleanUp() { inflateEnd(ref _ztream); } + + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs new file mode 100644 index 0000000..8dc00db --- /dev/null +++ b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs @@ -0,0 +1,274 @@ +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Collections; +using System.IO; + +// uncomment the define below to include unit tests +//#define nunit +#if nunit +using NUnit.Framework; + +// Unit tests for the DotZLib class library +// ---------------------------------------- +// +// Use this with NUnit 2 from http://www.nunit.org +// + +namespace DotZLibTests +{ + using DotZLib; + + // helper methods + internal class Utils + { + public static bool byteArrEqual( byte[] lhs, byte[] rhs ) + { + if (lhs.Length != rhs.Length) + return false; + for (int i = lhs.Length-1; i >= 0; --i) + if (lhs[i] != rhs[i]) + return false; + return true; + } + + } + + + [TestFixture] + public class CircBufferTests + { + #region Circular buffer tests + [Test] + public void SinglePutGet() + { + CircularBuffer buf = new CircularBuffer(10); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + + Assert.IsTrue(buf.Put( 1 )); + Assert.AreEqual( 1, buf.Size ); + Assert.AreEqual( 1, buf.Get() ); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + } + + [Test] + public void BlockPutGet() + { + CircularBuffer buf = new CircularBuffer(10); + byte[] arr = {1,2,3,4,5,6,7,8,9,10}; + Assert.AreEqual( 10, buf.Put(arr,0,10) ); + Assert.AreEqual( 10, buf.Size ); + Assert.IsFalse( buf.Put(11) ); + Assert.AreEqual( 1, buf.Get() ); + Assert.IsTrue( buf.Put(11) ); + + byte[] arr2 = (byte[])arr.Clone(); + Assert.AreEqual( 9, buf.Get(arr2,1,9) ); + Assert.IsTrue( Utils.byteArrEqual(arr,arr2) ); + } + + #endregion + } + + [TestFixture] + public class ChecksumTests + { + #region CRC32 Tests + [Test] + public void CRC32_Null() + { + CRC32Checksum crc32 = new CRC32Checksum(); + Assert.AreEqual( 0, crc32.Value ); + + crc32 = new CRC32Checksum(1); + Assert.AreEqual( 1, crc32.Value ); + + crc32 = new CRC32Checksum(556); + Assert.AreEqual( 556, crc32.Value ); + } + + [Test] + public void CRC32_Data() + { + CRC32Checksum crc32 = new CRC32Checksum(); + byte[] data = { 1,2,3,4,5,6,7 }; + crc32.Update(data); + Assert.AreEqual( 0x70e46888, crc32.Value ); + + crc32 = new CRC32Checksum(); + crc32.Update("penguin"); + Assert.AreEqual( 0x0e5c1a120, crc32.Value ); + + crc32 = new CRC32Checksum(1); + crc32.Update("penguin"); + Assert.AreEqual(0x43b6aa94, crc32.Value); + + } + #endregion + + #region Adler tests + + [Test] + public void Adler_Null() + { + AdlerChecksum adler = new AdlerChecksum(); + Assert.AreEqual(0, adler.Value); + + adler = new AdlerChecksum(1); + Assert.AreEqual( 1, adler.Value ); + + adler = new AdlerChecksum(556); + Assert.AreEqual( 556, adler.Value ); + } + + [Test] + public void Adler_Data() + { + AdlerChecksum adler = new AdlerChecksum(1); + byte[] data = { 1,2,3,4,5,6,7 }; + adler.Update(data); + Assert.AreEqual( 0x5b001d, adler.Value ); + + adler = new AdlerChecksum(); + adler.Update("penguin"); + Assert.AreEqual(0x0bcf02f6, adler.Value ); + + adler = new AdlerChecksum(1); + adler.Update("penguin"); + Assert.AreEqual(0x0bd602f7, adler.Value); + + } + #endregion + } + + [TestFixture] + public class InfoTests + { + #region Info tests + [Test] + public void Info_Version() + { + Info info = new Info(); + Assert.AreEqual("1.2.3", Info.Version); + Assert.AreEqual(32, info.SizeOfUInt); + Assert.AreEqual(32, info.SizeOfULong); + Assert.AreEqual(32, info.SizeOfPointer); + Assert.AreEqual(32, info.SizeOfOffset); + } + #endregion + } + + [TestFixture] + public class DeflateInflateTests + { + #region Deflate tests + [Test] + public void Deflate_Init() + { + using (Deflater def = new Deflater(CompressLevel.Default)) + { + } + } + + private ArrayList compressedData = new ArrayList(); + private uint adler1; + + private ArrayList uncompressedData = new ArrayList(); + private uint adler2; + + public void CDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + compressedData.Add(data[i+startIndex]); + } + + [Test] + public void Deflate_Compress() + { + compressedData.Clear(); + + byte[] testData = new byte[35000]; + for (int i = 0; i < testData.Length; ++i) + testData[i] = 5; + + using (Deflater def = new Deflater((CompressLevel)5)) + { + def.DataAvailable += new DataAvailableHandler(CDataAvail); + def.Add(testData); + def.Finish(); + adler1 = def.Checksum; + } + } + #endregion + + #region Inflate tests + [Test] + public void Inflate_Init() + { + using (Inflater inf = new Inflater()) + { + } + } + + private void DDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + uncompressedData.Add(data[i+startIndex]); + } + + [Test] + public void Inflate_Expand() + { + uncompressedData.Clear(); + + using (Inflater inf = new Inflater()) + { + inf.DataAvailable += new DataAvailableHandler(DDataAvail); + inf.Add((byte[])compressedData.ToArray(typeof(byte))); + inf.Finish(); + adler2 = inf.Checksum; + } + Assert.AreEqual( adler1, adler2 ); + } + #endregion + } + + [TestFixture] + public class GZipStreamTests + { + #region GZipStream test + [Test] + public void GZipStream_WriteRead() + { + using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best)) + { + BinaryWriter writer = new BinaryWriter(gzOut); + writer.Write("hi there"); + writer.Write(Math.PI); + writer.Write(42); + } + + using (GZipStream gzIn = new GZipStream("gzstream.gz")) + { + BinaryReader reader = new BinaryReader(gzIn); + string s = reader.ReadString(); + Assert.AreEqual("hi there",s); + double d = reader.ReadDouble(); + Assert.AreEqual(Math.PI, d); + int i = reader.ReadInt32(); + Assert.AreEqual(42,i); + } + + } + #endregion + } +} + +#endif \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt b/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt new file mode 100644 index 0000000..30aac2c --- /dev/null +++ b/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/readme.txt b/compat/zlib/contrib/dotzlib/readme.txt new file mode 100644 index 0000000..210f4b0 --- /dev/null +++ b/compat/zlib/contrib/dotzlib/readme.txt @@ -0,0 +1,58 @@ +This directory contains a .Net wrapper class library for the ZLib1.dll + +The wrapper includes support for inflating/deflating memory buffers, +.Net streaming wrappers for the gz streams part of zlib, and wrappers +for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. + +Directory structure: +-------------------- + +LICENSE_1_0.txt - License file. +readme.txt - This file. +DotZLib.chm - Class library documentation +DotZLib.build - NAnt build file +DotZLib.sln - Microsoft Visual Studio 2003 solution file + +DotZLib\*.cs - Source files for the class library + +Unit tests: +----------- +The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher. +To include unit tests in the build, define nunit before building. + + +Build instructions: +------------------- + +1. Using Visual Studio.Net 2003: + Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) + will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on + you are building the release or debug version of the library. Check + DotZLib/UnitTests.cs for instructions on how to include unit tests in the + build. + +2. Using NAnt: + Open a command prompt with access to the build environment and run nant + in the same directory as the DotZLib.build file. + You can define 2 properties on the nant command-line to control the build: + debug={true|false} to toggle between release/debug builds (default=true). + nunit={true|false} to include or esclude unit tests (default=true). + Also the target clean will remove binaries. + Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release + or ./DotZLib/bin/debug, depending on whether you are building the release + or debug version of the library. + + Examples: + nant -D:debug=false -D:nunit=false + will build a release mode version of the library without unit tests. + nant + will build a debug version of the library with unit tests + nant clean + will remove all previously built files. + + +--------------------------------- +Copyright (c) Henrik Ravn 2004 + +Use, modification and distribution are subject to the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/compat/zlib/contrib/infback9/README b/compat/zlib/contrib/infback9/README new file mode 100644 index 0000000..e75ed13 --- /dev/null +++ b/compat/zlib/contrib/infback9/README @@ -0,0 +1 @@ +See infback9.h for what this is and how to use it. diff --git a/compat/zlib/contrib/infback9/infback9.c b/compat/zlib/contrib/infback9/infback9.c new file mode 100644 index 0000000..f5ddde6 --- /dev/null +++ b/compat/zlib/contrib/infback9/infback9.c @@ -0,0 +1,608 @@ +/* infback9.c -- inflate deflate64 data using a call-back interface + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "infback9.h" +#include "inftree9.h" +#include "inflate9.h" + +#define WSIZE 65536UL + +/* + strm provides memory allocation functions in zalloc and zfree, or + Z_NULL to use the library memory allocation functions. + + window is a user-supplied window and output buffer that is 64K bytes. + */ +int ZEXPORT inflateBack9Init_(strm, window, version, stream_size) +z_stream FAR *strm; +unsigned char FAR *window; +const char *version; +int stream_size; +{ + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL || window == Z_NULL) + return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + } + if (strm->zfree == (free_func)0) strm->zfree = zcfree; + state = (struct inflate_state FAR *)ZALLOC(strm, 1, + sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (voidpf)state; + state->window = window; + return Z_OK; +} + +/* + Build and output length and distance decoding tables for fixed code + decoding. + */ +#ifdef MAKEFIXED +#include + +void makefixed9(void) +{ + unsigned sym, bits, low, size; + code *next, *lenfix, *distfix; + struct inflate_state state; + code fixed[544]; + + /* literal/length table */ + sym = 0; + while (sym < 144) state.lens[sym++] = 8; + while (sym < 256) state.lens[sym++] = 9; + while (sym < 280) state.lens[sym++] = 7; + while (sym < 288) state.lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work); + + /* distance table */ + sym = 0; + while (sym < 32) state.lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work); + + /* write tables */ + puts(" /* inffix9.h -- table for decoding deflate64 fixed codes"); + puts(" * Generated automatically by makefixed9()."); + puts(" */"); + puts(""); + puts(" /* WARNING: this file should *not* be used by applications."); + puts(" It is part of the implementation of this library and is"); + puts(" subject to change. Applications should only use zlib.h."); + puts(" */"); + puts(""); + size = 1U << 9; + printf(" static const code lenfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 6) == 0) printf("\n "); + printf("{%u,%u,%d}", lenfix[low].op, lenfix[low].bits, + lenfix[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); + size = 1U << 5; + printf("\n static const code distfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 5) == 0) printf("\n "); + printf("{%u,%u,%d}", distfix[low].op, distfix[low].bits, + distfix[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); +} +#endif /* MAKEFIXED */ + +/* Macros for inflateBack(): */ + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Assure that some input is available. If input is requested, but denied, + then return a Z_BUF_ERROR from inflateBack(). */ +#define PULL() \ + do { \ + if (have == 0) { \ + have = in(in_desc, &next); \ + if (have == 0) { \ + next = Z_NULL; \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflateBack() + with an error if there is no input available. */ +#define PULLBYTE() \ + do { \ + PULL(); \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflateBack() with + an error. */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n <= 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* Assure that some output space is available, by writing out the window + if it's full. If the write fails, return from inflateBack() with a + Z_BUF_ERROR. */ +#define ROOM() \ + do { \ + if (left == 0) { \ + put = window; \ + left = WSIZE; \ + wrap = 1; \ + if (out(out_desc, put, (unsigned)left)) { \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* + strm provides the memory allocation functions and window buffer on input, + and provides information on the unused input on return. For Z_DATA_ERROR + returns, strm will also provide an error message. + + in() and out() are the call-back input and output functions. When + inflateBack() needs more input, it calls in(). When inflateBack() has + filled the window with output, or when it completes with data in the + window, it calls out() to write out the data. The application must not + change the provided input until in() is called again or inflateBack() + returns. The application must not change the window/output buffer until + inflateBack() returns. + + in() and out() are called with a descriptor parameter provided in the + inflateBack() call. This parameter can be a structure that provides the + information required to do the read or write, as well as accumulated + information on the input and output such as totals and check values. + + in() should return zero on failure. out() should return non-zero on + failure. If either in() or out() fails, than inflateBack() returns a + Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it + was in() or out() that caused in the error. Otherwise, inflateBack() + returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format + error, or Z_MEM_ERROR if it could not allocate memory for the state. + inflateBack() can also return Z_STREAM_ERROR if the input parameters + are not correct, i.e. strm is Z_NULL or the state was not initialized. + */ +int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc) +z_stream FAR *strm; +in_func in; +void FAR *in_desc; +out_func out; +void FAR *out_desc; +{ + struct inflate_state FAR *state; + unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have; /* available input */ + unsigned long left; /* available output */ + inflate_mode mode; /* current inflate mode */ + int lastblock; /* true if processing last block */ + int wrap; /* true if the window has wrapped */ + unsigned long write; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned extra; /* extra bits needed */ + unsigned long length; /* literal or length of data to copy */ + unsigned long offset; /* distance back to copy string from */ + unsigned long copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code const FAR *lencode; /* starting table for length/literal codes */ + code const FAR *distcode; /* starting table for distance codes */ + unsigned lenbits; /* index bits for lencode */ + unsigned distbits; /* index bits for distcode */ + code this; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; +#include "inffix9.h" + + /* Check that the strm exists and that the state was initialized */ + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* Reset the state */ + strm->msg = Z_NULL; + mode = TYPE; + lastblock = 0; + write = 0; + wrap = 0; + window = state->window; + next = strm->next_in; + have = next != Z_NULL ? strm->avail_in : 0; + hold = 0; + bits = 0; + put = window; + left = WSIZE; + lencode = Z_NULL; + distcode = Z_NULL; + + /* Inflate until end of block marked as last */ + for (;;) + switch (mode) { + case TYPE: + /* determine and dispatch block type */ + if (lastblock) { + BYTEBITS(); + mode = DONE; + break; + } + NEEDBITS(3); + lastblock = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + lastblock ? " (last)" : "")); + mode = STORED; + break; + case 1: /* fixed block */ + lencode = lenfix; + lenbits = 9; + distcode = distfix; + distbits = 5; + Tracev((stderr, "inflate: fixed codes block%s\n", + lastblock ? " (last)" : "")); + mode = LEN; /* decode codes */ + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + lastblock ? " (last)" : "")); + mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + mode = BAD; + } + DROPBITS(2); + break; + + case STORED: + /* get and verify stored block length */ + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + mode = BAD; + break; + } + length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %lu\n", + length)); + INITBITS(); + + /* copy stored block from input to output */ + while (length != 0) { + copy = length; + PULL(); + ROOM(); + if (copy > have) copy = have; + if (copy > left) copy = left; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + length -= copy; + } + Tracev((stderr, "inflate: stored end\n")); + mode = TYPE; + break; + + case TABLE: + /* get dynamic table entries descriptor */ + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); + if (state->nlen > 286) { + strm->msg = (char *)"too many length symbols"; + mode = BAD; + break; + } + Tracev((stderr, "inflate: table sizes ok\n")); + + /* get code length code lengths (not a typo) */ + state->have = 0; + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + lencode = (code const FAR *)(state->next); + lenbits = 7; + ret = inflate_table9(CODES, state->lens, 19, &(state->next), + &(lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + + /* get length and distance code code lengths */ + state->have = 0; + while (state->have < state->nlen + state->ndist) { + for (;;) { + this = lencode[BITS(lenbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if (this.val < 16) { + NEEDBITS(this.bits); + DROPBITS(this.bits); + state->lens[state->have++] = this.val; + } + else { + if (this.val == 16) { + NEEDBITS(this.bits + 2); + DROPBITS(this.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + mode = BAD; + break; + } + len = (unsigned)(state->lens[state->have - 1]); + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (this.val == 17) { + NEEDBITS(this.bits + 3); + DROPBITS(this.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(this.bits + 7); + DROPBITS(this.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (mode == BAD) break; + + /* build code tables */ + state->next = state->codes; + lencode = (code const FAR *)(state->next); + lenbits = 9; + ret = inflate_table9(LENS, state->lens, state->nlen, + &(state->next), &(lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + mode = BAD; + break; + } + distcode = (code const FAR *)(state->next); + distbits = 6; + ret = inflate_table9(DISTS, state->lens + state->nlen, + state->ndist, &(state->next), &(distbits), + state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + mode = LEN; + + case LEN: + /* get a literal, length, or end-of-block code */ + for (;;) { + this = lencode[BITS(lenbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if (this.op && (this.op & 0xf0) == 0) { + last = this; + for (;;) { + this = lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + this.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(this.bits); + length = (unsigned)this.val; + + /* process literal */ + if (this.op == 0) { + Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", this.val)); + ROOM(); + *put++ = (unsigned char)(length); + left--; + mode = LEN; + break; + } + + /* process end of block */ + if (this.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + mode = TYPE; + break; + } + + /* invalid code */ + if (this.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + mode = BAD; + break; + } + + /* length code -- get extra bits, if any */ + extra = (unsigned)(this.op) & 31; + if (extra != 0) { + NEEDBITS(extra); + length += BITS(extra); + DROPBITS(extra); + } + Tracevv((stderr, "inflate: length %lu\n", length)); + + /* get distance code */ + for (;;) { + this = distcode[BITS(distbits)]; + if ((unsigned)(this.bits) <= bits) break; + PULLBYTE(); + } + if ((this.op & 0xf0) == 0) { + last = this; + for (;;) { + this = distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + this.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(this.bits); + if (this.op & 64) { + strm->msg = (char *)"invalid distance code"; + mode = BAD; + break; + } + offset = (unsigned)this.val; + + /* get distance extra bits, if any */ + extra = (unsigned)(this.op) & 15; + if (extra != 0) { + NEEDBITS(extra); + offset += BITS(extra); + DROPBITS(extra); + } + if (offset > WSIZE - (wrap ? 0: left)) { + strm->msg = (char *)"invalid distance too far back"; + mode = BAD; + break; + } + Tracevv((stderr, "inflate: distance %lu\n", offset)); + + /* copy match from window to output */ + do { + ROOM(); + copy = WSIZE - offset; + if (copy < left) { + from = put + copy; + copy = left - copy; + } + else { + from = put - offset; + copy = left; + } + if (copy > length) copy = length; + length -= copy; + left -= copy; + do { + *put++ = *from++; + } while (--copy); + } while (length != 0); + break; + + case DONE: + /* inflate stream terminated properly -- write leftover output */ + ret = Z_STREAM_END; + if (left < WSIZE) { + if (out(out_desc, window, (unsigned)(WSIZE - left))) + ret = Z_BUF_ERROR; + } + goto inf_leave; + + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + + default: /* can't happen, but makes compilers happy */ + ret = Z_STREAM_ERROR; + goto inf_leave; + } + + /* Return unused input */ + inf_leave: + strm->next_in = next; + strm->avail_in = have; + return ret; +} + +int ZEXPORT inflateBack9End(strm) +z_stream FAR *strm; +{ + if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + return Z_STREAM_ERROR; + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} diff --git a/compat/zlib/contrib/infback9/infback9.h b/compat/zlib/contrib/infback9/infback9.h new file mode 100644 index 0000000..1073c0a --- /dev/null +++ b/compat/zlib/contrib/infback9/infback9.h @@ -0,0 +1,37 @@ +/* infback9.h -- header for using inflateBack9 functions + * Copyright (C) 2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * This header file and associated patches provide a decoder for PKWare's + * undocumented deflate64 compression method (method 9). Use with infback9.c, + * inftree9.h, inftree9.c, and inffix9.h. These patches are not supported. + * This should be compiled with zlib, since it uses zutil.h and zutil.o. + * This code has not yet been tested on 16-bit architectures. See the + * comments in zlib.h for inflateBack() usage. These functions are used + * identically, except that there is no windowBits parameter, and a 64K + * window must be provided. Also if int's are 16 bits, then a zero for + * the third parameter of the "out" function actually means 65536UL. + * zlib.h must be included before this header file. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); +ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm)); +ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm, + unsigned char FAR *window, + const char *version, + int stream_size)); +#define inflateBack9Init(strm, window) \ + inflateBack9Init_((strm), (window), \ + ZLIB_VERSION, sizeof(z_stream)) + +#ifdef __cplusplus +} +#endif diff --git a/compat/zlib/contrib/infback9/inffix9.h b/compat/zlib/contrib/infback9/inffix9.h new file mode 100644 index 0000000..ee5671d --- /dev/null +++ b/compat/zlib/contrib/infback9/inffix9.h @@ -0,0 +1,107 @@ + /* inffix9.h -- table for decoding deflate64 fixed codes + * Generated automatically by makefixed9(). + */ + + /* WARNING: this file should *not* be used by applications. + It is part of the implementation of this library and is + subject to change. Applications should only use zlib.h. + */ + + static const code lenfix[512] = { + {96,7,0},{0,8,80},{0,8,16},{132,8,115},{130,7,31},{0,8,112}, + {0,8,48},{0,9,192},{128,7,10},{0,8,96},{0,8,32},{0,9,160}, + {0,8,0},{0,8,128},{0,8,64},{0,9,224},{128,7,6},{0,8,88}, + {0,8,24},{0,9,144},{131,7,59},{0,8,120},{0,8,56},{0,9,208}, + {129,7,17},{0,8,104},{0,8,40},{0,9,176},{0,8,8},{0,8,136}, + {0,8,72},{0,9,240},{128,7,4},{0,8,84},{0,8,20},{133,8,227}, + {131,7,43},{0,8,116},{0,8,52},{0,9,200},{129,7,13},{0,8,100}, + {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232}, + {128,7,8},{0,8,92},{0,8,28},{0,9,152},{132,7,83},{0,8,124}, + {0,8,60},{0,9,216},{130,7,23},{0,8,108},{0,8,44},{0,9,184}, + {0,8,12},{0,8,140},{0,8,76},{0,9,248},{128,7,3},{0,8,82}, + {0,8,18},{133,8,163},{131,7,35},{0,8,114},{0,8,50},{0,9,196}, + {129,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},{0,8,130}, + {0,8,66},{0,9,228},{128,7,7},{0,8,90},{0,8,26},{0,9,148}, + {132,7,67},{0,8,122},{0,8,58},{0,9,212},{130,7,19},{0,8,106}, + {0,8,42},{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244}, + {128,7,5},{0,8,86},{0,8,22},{65,8,0},{131,7,51},{0,8,118}, + {0,8,54},{0,9,204},{129,7,15},{0,8,102},{0,8,38},{0,9,172}, + {0,8,6},{0,8,134},{0,8,70},{0,9,236},{128,7,9},{0,8,94}, + {0,8,30},{0,9,156},{132,7,99},{0,8,126},{0,8,62},{0,9,220}, + {130,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, + {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{133,8,131}, + {130,7,31},{0,8,113},{0,8,49},{0,9,194},{128,7,10},{0,8,97}, + {0,8,33},{0,9,162},{0,8,1},{0,8,129},{0,8,65},{0,9,226}, + {128,7,6},{0,8,89},{0,8,25},{0,9,146},{131,7,59},{0,8,121}, + {0,8,57},{0,9,210},{129,7,17},{0,8,105},{0,8,41},{0,9,178}, + {0,8,9},{0,8,137},{0,8,73},{0,9,242},{128,7,4},{0,8,85}, + {0,8,21},{144,8,3},{131,7,43},{0,8,117},{0,8,53},{0,9,202}, + {129,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133}, + {0,8,69},{0,9,234},{128,7,8},{0,8,93},{0,8,29},{0,9,154}, + {132,7,83},{0,8,125},{0,8,61},{0,9,218},{130,7,23},{0,8,109}, + {0,8,45},{0,9,186},{0,8,13},{0,8,141},{0,8,77},{0,9,250}, + {128,7,3},{0,8,83},{0,8,19},{133,8,195},{131,7,35},{0,8,115}, + {0,8,51},{0,9,198},{129,7,11},{0,8,99},{0,8,35},{0,9,166}, + {0,8,3},{0,8,131},{0,8,67},{0,9,230},{128,7,7},{0,8,91}, + {0,8,27},{0,9,150},{132,7,67},{0,8,123},{0,8,59},{0,9,214}, + {130,7,19},{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139}, + {0,8,75},{0,9,246},{128,7,5},{0,8,87},{0,8,23},{77,8,0}, + {131,7,51},{0,8,119},{0,8,55},{0,9,206},{129,7,15},{0,8,103}, + {0,8,39},{0,9,174},{0,8,7},{0,8,135},{0,8,71},{0,9,238}, + {128,7,9},{0,8,95},{0,8,31},{0,9,158},{132,7,99},{0,8,127}, + {0,8,63},{0,9,222},{130,7,27},{0,8,111},{0,8,47},{0,9,190}, + {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80}, + {0,8,16},{132,8,115},{130,7,31},{0,8,112},{0,8,48},{0,9,193}, + {128,7,10},{0,8,96},{0,8,32},{0,9,161},{0,8,0},{0,8,128}, + {0,8,64},{0,9,225},{128,7,6},{0,8,88},{0,8,24},{0,9,145}, + {131,7,59},{0,8,120},{0,8,56},{0,9,209},{129,7,17},{0,8,104}, + {0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},{0,9,241}, + {128,7,4},{0,8,84},{0,8,20},{133,8,227},{131,7,43},{0,8,116}, + {0,8,52},{0,9,201},{129,7,13},{0,8,100},{0,8,36},{0,9,169}, + {0,8,4},{0,8,132},{0,8,68},{0,9,233},{128,7,8},{0,8,92}, + {0,8,28},{0,9,153},{132,7,83},{0,8,124},{0,8,60},{0,9,217}, + {130,7,23},{0,8,108},{0,8,44},{0,9,185},{0,8,12},{0,8,140}, + {0,8,76},{0,9,249},{128,7,3},{0,8,82},{0,8,18},{133,8,163}, + {131,7,35},{0,8,114},{0,8,50},{0,9,197},{129,7,11},{0,8,98}, + {0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, + {128,7,7},{0,8,90},{0,8,26},{0,9,149},{132,7,67},{0,8,122}, + {0,8,58},{0,9,213},{130,7,19},{0,8,106},{0,8,42},{0,9,181}, + {0,8,10},{0,8,138},{0,8,74},{0,9,245},{128,7,5},{0,8,86}, + {0,8,22},{65,8,0},{131,7,51},{0,8,118},{0,8,54},{0,9,205}, + {129,7,15},{0,8,102},{0,8,38},{0,9,173},{0,8,6},{0,8,134}, + {0,8,70},{0,9,237},{128,7,9},{0,8,94},{0,8,30},{0,9,157}, + {132,7,99},{0,8,126},{0,8,62},{0,9,221},{130,7,27},{0,8,110}, + {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253}, + {96,7,0},{0,8,81},{0,8,17},{133,8,131},{130,7,31},{0,8,113}, + {0,8,49},{0,9,195},{128,7,10},{0,8,97},{0,8,33},{0,9,163}, + {0,8,1},{0,8,129},{0,8,65},{0,9,227},{128,7,6},{0,8,89}, + {0,8,25},{0,9,147},{131,7,59},{0,8,121},{0,8,57},{0,9,211}, + {129,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},{0,8,137}, + {0,8,73},{0,9,243},{128,7,4},{0,8,85},{0,8,21},{144,8,3}, + {131,7,43},{0,8,117},{0,8,53},{0,9,203},{129,7,13},{0,8,101}, + {0,8,37},{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235}, + {128,7,8},{0,8,93},{0,8,29},{0,9,155},{132,7,83},{0,8,125}, + {0,8,61},{0,9,219},{130,7,23},{0,8,109},{0,8,45},{0,9,187}, + {0,8,13},{0,8,141},{0,8,77},{0,9,251},{128,7,3},{0,8,83}, + {0,8,19},{133,8,195},{131,7,35},{0,8,115},{0,8,51},{0,9,199}, + {129,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, + {0,8,67},{0,9,231},{128,7,7},{0,8,91},{0,8,27},{0,9,151}, + {132,7,67},{0,8,123},{0,8,59},{0,9,215},{130,7,19},{0,8,107}, + {0,8,43},{0,9,183},{0,8,11},{0,8,139},{0,8,75},{0,9,247}, + {128,7,5},{0,8,87},{0,8,23},{77,8,0},{131,7,51},{0,8,119}, + {0,8,55},{0,9,207},{129,7,15},{0,8,103},{0,8,39},{0,9,175}, + {0,8,7},{0,8,135},{0,8,71},{0,9,239},{128,7,9},{0,8,95}, + {0,8,31},{0,9,159},{132,7,99},{0,8,127},{0,8,63},{0,9,223}, + {130,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143}, + {0,8,79},{0,9,255} + }; + + static const code distfix[32] = { + {128,5,1},{135,5,257},{131,5,17},{139,5,4097},{129,5,5}, + {137,5,1025},{133,5,65},{141,5,16385},{128,5,3},{136,5,513}, + {132,5,33},{140,5,8193},{130,5,9},{138,5,2049},{134,5,129}, + {142,5,32769},{128,5,2},{135,5,385},{131,5,25},{139,5,6145}, + {129,5,7},{137,5,1537},{133,5,97},{141,5,24577},{128,5,4}, + {136,5,769},{132,5,49},{140,5,12289},{130,5,13},{138,5,3073}, + {134,5,193},{142,5,49153} + }; diff --git a/compat/zlib/contrib/infback9/inflate9.h b/compat/zlib/contrib/infback9/inflate9.h new file mode 100644 index 0000000..ee9a793 --- /dev/null +++ b/compat/zlib/contrib/infback9/inflate9.h @@ -0,0 +1,47 @@ +/* inflate9.h -- internal inflate state definition + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Possible inflate modes between inflate() calls */ +typedef enum { + TYPE, /* i: waiting for type bits, including last-flag bit */ + STORED, /* i: waiting for stored size (length and complement) */ + TABLE, /* i: waiting for dynamic block table lengths */ + LEN, /* i: waiting for length/lit code */ + DONE, /* finished check, done -- remain here until reset */ + BAD /* got a data error -- remain here until reset */ +} inflate_mode; + +/* + State transitions between above modes - + + (most modes can go to the BAD mode -- not shown for clarity) + + Read deflate blocks: + TYPE -> STORED or TABLE or LEN or DONE + STORED -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN + Read deflate codes: + LEN -> LEN or TYPE + */ + +/* state maintained between inflate() calls. Approximately 7K bytes. */ +struct inflate_state { + /* sliding window */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + /* dynamic table building */ + unsigned ncode; /* number of code length code lengths */ + unsigned nlen; /* number of length code lengths */ + unsigned ndist; /* number of distance code lengths */ + unsigned have; /* number of code lengths in lens[] */ + code FAR *next; /* next available space in codes[] */ + unsigned short lens[320]; /* temporary storage for code lengths */ + unsigned short work[288]; /* work area for code table building */ + code codes[ENOUGH]; /* space for code tables */ +}; diff --git a/compat/zlib/contrib/infback9/inftree9.c b/compat/zlib/contrib/infback9/inftree9.c new file mode 100644 index 0000000..0993f75 --- /dev/null +++ b/compat/zlib/contrib/infback9/inftree9.c @@ -0,0 +1,323 @@ +/* inftree9.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftree9.h" + +#define MAXBITS 15 + +const char inflate9_copyright[] = + " inflate9 1.2.3 Copyright 1995-2005 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* + Build a set of tables to decode the provided canonical Huffman code. + The code lengths are lens[0..codes-1]. The result starts at *table, + whose indices are 0..2^bits-1. work is a writable array of at least + lens shorts, which is used as a work area. type is the type of code + to be generated, CODES, LENS, or DISTS. On return, zero is success, + -1 is an invalid code, and +1 means that ENOUGH isn't enough. table + on return points to the next available entry's address. bits is the + requested root table index bits, and on return it is the actual root + table index bits. It will differ if the request is greater than the + longest code or if it is less than the shortest code. + */ +int inflate_table9(type, lens, codes, table, bits, work) +codetype type; +unsigned short FAR *lens; +unsigned codes; +code FAR * FAR *table; +unsigned FAR *bits; +unsigned short FAR *work; +{ + unsigned len; /* a code's length in bits */ + unsigned sym; /* index of code symbols */ + unsigned min, max; /* minimum and maximum code lengths */ + unsigned root; /* number of index bits for root table */ + unsigned curr; /* number of index bits for current table */ + unsigned drop; /* code bits to drop for sub-table */ + int left; /* number of prefix codes available */ + unsigned used; /* code entries in table used */ + unsigned huff; /* Huffman code */ + unsigned incr; /* for incrementing code, index */ + unsigned fill; /* index for replicating entries */ + unsigned low; /* low bits for current root entry */ + unsigned mask; /* mask for low root bits */ + code this; /* table entry for duplication */ + code FAR *next; /* next available space in table */ + const unsigned short FAR *base; /* base value table to use */ + const unsigned short FAR *extra; /* extra bits table to use */ + int end; /* use base and extra for symbol > end */ + unsigned short count[MAXBITS+1]; /* number of codes of each length */ + unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ + static const unsigned short lbase[31] = { /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, + 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, + 131, 163, 195, 227, 3, 0, 0}; + static const unsigned short lext[31] = { /* Length codes 257..285 extra */ + 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, + 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, + 133, 133, 133, 133, 144, 201, 196}; + static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, + 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, + 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153}; + static const unsigned short dext[32] = { /* Distance codes 0..31 extra */ + 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132, + 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138, + 139, 139, 140, 140, 141, 141, 142, 142}; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) + count[len] = 0; + for (sym = 0; sym < codes; sym++) + count[lens[sym]]++; + + /* bound code lengths, force root to be within code lengths */ + root = *bits; + for (max = MAXBITS; max >= 1; max--) + if (count[max] != 0) break; + if (root > max) root = max; + if (max == 0) return -1; /* no codes! */ + for (min = 1; min <= MAXBITS; min++) + if (count[min] != 0) break; + if (root < min) root = min; + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) return -1; /* over-subscribed */ + } + if (left > 0 && (type == CODES || max != 1)) + return -1; /* incomplete set */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + count[len]; + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) + if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked when a LENS table is being made + against the space in *table, ENOUGH, minus the maximum space needed by + the worst case distance code, MAXD. This should never happen, but the + sufficiency of ENOUGH has not been proven exhaustively, hence the check. + This assumes that when type == LENS, bits == 9. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + switch (type) { + case CODES: + base = extra = work; /* dummy value--not used */ + end = 19; + break; + case LENS: + base = lbase; + base -= 257; + extra = lext; + extra -= 257; + end = 256; + break; + default: /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize state for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = *table; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = (unsigned)(-1); /* trigger new sub-table when len > root */ + used = 1U << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if (type == LENS && used >= ENOUGH - MAXD) + return 1; + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + this.bits = (unsigned char)(len - drop); + if ((int)(work[sym]) < end) { + this.op = (unsigned char)0; + this.val = work[sym]; + } + else if ((int)(work[sym]) > end) { + this.op = (unsigned char)(extra[work[sym]]); + this.val = base[work[sym]]; + } + else { + this.op = (unsigned char)(32 + 64); /* end of block */ + this.val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1U << (len - drop); + fill = 1U << curr; + do { + fill -= incr; + next[(huff >> drop) + fill] = this; + } while (fill != 0); + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + + /* go to next symbol, update count, len */ + sym++; + if (--(count[len]) == 0) { + if (len == max) break; + len = lens[work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) != low) { + /* if first time, transition to sub-tables */ + if (drop == 0) + drop = root; + + /* increment past last table */ + next += 1U << curr; + + /* determine length of next table */ + curr = len - drop; + left = (int)(1 << curr); + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) break; + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1U << curr; + if (type == LENS && used >= ENOUGH - MAXD) + return 1; + + /* point entry in root table to sub-table */ + low = huff & mask; + (*table)[low].op = (unsigned char)curr; + (*table)[low].bits = (unsigned char)root; + (*table)[low].val = (unsigned short)(next - *table); + } + } + + /* + Fill in rest of table for incomplete codes. This loop is similar to the + loop above in incrementing huff for table indices. It is assumed that + len is equal to curr + drop, so there is no loop needed to increment + through high index bits. When the current sub-table is filled, the loop + drops back to the root table to fill in any remaining entries there. + */ + this.op = (unsigned char)64; /* invalid code marker */ + this.bits = (unsigned char)(len - drop); + this.val = (unsigned short)0; + while (huff != 0) { + /* when done with sub-table, drop back to root table */ + if (drop != 0 && (huff & mask) != low) { + drop = 0; + len = root; + next = *table; + curr = root; + this.bits = (unsigned char)len; + } + + /* put invalid code marker in table */ + next[huff >> drop] = this; + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + } + + /* set return parameters */ + *table += used; + *bits = root; + return 0; +} diff --git a/compat/zlib/contrib/infback9/inftree9.h b/compat/zlib/contrib/infback9/inftree9.h new file mode 100644 index 0000000..a268084 --- /dev/null +++ b/compat/zlib/contrib/infback9/inftree9.h @@ -0,0 +1,55 @@ +/* inftree9.h -- header to use inftree9.c + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Structure for decoding tables. Each entry provides either the + information needed to do the operation requested by the code that + indexed that table entry, or it provides a pointer to another + table that indexes more bits of the code. op indicates whether + the entry is a pointer to another table, a literal, a length or + distance, an end-of-block, or an invalid code. For a table + pointer, the low four bits of op is the number of index bits of + that table. For a length or distance, the low four bits of op + is the number of extra bits to get after the code. bits is + the number of bits in this code or part of the code to drop off + of the bit buffer. val is the actual byte to output in the case + of a literal, the base length or distance, or the offset from + the current table to the next table. Each entry is four bytes. */ +typedef struct { + unsigned char op; /* operation, extra bits, table bits */ + unsigned char bits; /* bits in this part of the code */ + unsigned short val; /* offset in table or code value */ +} code; + +/* op values as set by inflate_table(): + 00000000 - literal + 0000tttt - table link, tttt != 0 is the number of table index bits + 100eeeee - length or distance, eeee is the number of extra bits + 01100000 - end of block + 01000000 - invalid code + */ + +/* Maximum size of dynamic tree. The maximum found in a long but non- + exhaustive search was 1444 code structures (852 for length/literals + and 592 for distances, the latter actually the result of an + exhaustive search). The true maximum is not known, but the value + below is more than safe. */ +#define ENOUGH 2048 +#define MAXD 592 + +/* Type of code to build for inftable() */ +typedef enum { + CODES, + LENS, + DISTS +} codetype; + +extern int inflate_table9 OF((codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work)); diff --git a/compat/zlib/contrib/inflate86/inffas86.c b/compat/zlib/contrib/inflate86/inffas86.c new file mode 100644 index 0000000..6da7635 --- /dev/null +++ b/compat/zlib/contrib/inflate86/inffas86.c @@ -0,0 +1,1157 @@ +/* inffas86.c is a hand tuned assembler version of + * + * inffast.c -- fast decoding + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also + * slightly quicker on x86 systems because, instead of using rep movsb to copy + * data, it uses rep movsw, which moves data in 2-byte chunks instead of single + * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates + * from http://fedora.linux.duke.edu/fc1_x86_64 + * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with + * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, + * when decompressing mozilla-source-1.3.tar.gz. + * + * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from + * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at + * the moment. I have successfully compiled and tested this code with gcc2.96, + * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S + * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX + * enabled. I will attempt to merge the MMX code into this version. Newer + * versions of this and inffast.S can be found at + * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* Mark Adler's comments from inffast.c: */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ +void inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + struct inffast_ar { +/* 64 32 x86 x86_64 */ +/* ar offset register */ +/* 0 0 */ void *esp; /* esp save */ +/* 8 4 */ void *ebp; /* ebp save */ +/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ +/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ +/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ +/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ +/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ +/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ +/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ +/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ +/* 80 40 */ unsigned long hold; /* edx rdx local strm->hold */ +/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ +/* 92 48 */ unsigned wsize; /* window size */ +/* 96 52 */ unsigned write; /* window write index */ +/*100 56 */ unsigned lmask; /* r12 mask for lcode */ +/*104 60 */ unsigned dmask; /* r13 mask for dcode */ +/*108 64 */ unsigned len; /* r14 match length */ +/*112 68 */ unsigned dist; /* r15 match distance */ +/*116 72 */ unsigned status; /* set when state chng*/ + } ar; + +#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 ) +#define PAD_AVAIL_IN 6 +#define PAD_AVAIL_OUT 258 +#else +#define PAD_AVAIL_IN 5 +#define PAD_AVAIL_OUT 257 +#endif + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + ar.in = strm->next_in; + ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); + ar.out = strm->next_out; + ar.beg = ar.out - (start - strm->avail_out); + ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); + ar.wsize = state->wsize; + ar.write = state->write; + ar.window = state->window; + ar.hold = state->hold; + ar.bits = state->bits; + ar.lcode = state->lencode; + ar.dcode = state->distcode; + ar.lmask = (1U << state->lenbits) - 1; + ar.dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + /* align in on 1/2 hold size boundary */ + while (((unsigned long)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { + ar.hold += (unsigned long)*ar.in++ << ar.bits; + ar.bits += 8; + } + +#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 ) + __asm__ __volatile__ ( +" leaq %0, %%rax\n" +" movq %%rbp, 8(%%rax)\n" /* save regs rbp and rsp */ +" movq %%rsp, (%%rax)\n" +" movq %%rax, %%rsp\n" /* make rsp point to &ar */ +" movq 16(%%rsp), %%rsi\n" /* rsi = in */ +" movq 32(%%rsp), %%rdi\n" /* rdi = out */ +" movq 24(%%rsp), %%r9\n" /* r9 = last */ +" movq 48(%%rsp), %%r10\n" /* r10 = end */ +" movq 64(%%rsp), %%rbp\n" /* rbp = lcode */ +" movq 72(%%rsp), %%r11\n" /* r11 = dcode */ +" movq 80(%%rsp), %%rdx\n" /* rdx = hold */ +" movl 88(%%rsp), %%ebx\n" /* ebx = bits */ +" movl 100(%%rsp), %%r12d\n" /* r12d = lmask */ +" movl 104(%%rsp), %%r13d\n" /* r13d = dmask */ + /* r14d = len */ + /* r15d = dist */ +" cld\n" +" cmpq %%rdi, %%r10\n" +" je .L_one_time\n" /* if only one decode left */ +" cmpq %%rsi, %%r9\n" +" je .L_one_time\n" +" jmp .L_do_loop\n" + +".L_one_time:\n" +" movq %%r12, %%r8\n" /* r8 = lmask */ +" cmpb $32, %%bl\n" +" ja .L_get_length_code_one_time\n" + +" lodsl\n" /* eax = *(uint *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $32, %%bl\n" /* bits += 32 */ +" shlq %%cl, %%rax\n" +" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */ +" jmp .L_get_length_code_one_time\n" + +".align 32,0x90\n" +".L_while_test:\n" +" cmpq %%rdi, %%r10\n" +" jbe .L_break_loop\n" +" cmpq %%rsi, %%r9\n" +" jbe .L_break_loop\n" + +".L_do_loop:\n" +" movq %%r12, %%r8\n" /* r8 = lmask */ +" cmpb $32, %%bl\n" +" ja .L_get_length_code\n" /* if (32 < bits) */ + +" lodsl\n" /* eax = *(uint *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $32, %%bl\n" /* bits += 32 */ +" shlq %%cl, %%rax\n" +" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */ + +".L_get_length_code:\n" +" andq %%rdx, %%r8\n" /* r8 &= hold */ +" movl (%%rbp,%%r8,4), %%eax\n" /* eax = lcode[hold & lmask] */ + +" movb %%ah, %%cl\n" /* cl = this.bits */ +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrq %%cl, %%rdx\n" /* hold >>= this.bits */ + +" testb %%al, %%al\n" +" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */ + +" movq %%r12, %%r8\n" /* r8 = lmask */ +" shrl $16, %%eax\n" /* output this.val char */ +" stosb\n" + +".L_get_length_code_one_time:\n" +" andq %%rdx, %%r8\n" /* r8 &= hold */ +" movl (%%rbp,%%r8,4), %%eax\n" /* eax = lcode[hold & lmask] */ + +".L_dolen:\n" +" movb %%ah, %%cl\n" /* cl = this.bits */ +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrq %%cl, %%rdx\n" /* hold >>= this.bits */ + +" testb %%al, %%al\n" +" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */ + +" shrl $16, %%eax\n" /* output this.val char */ +" stosb\n" +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_length_base:\n" +" movl %%eax, %%r14d\n" /* len = this */ +" shrl $16, %%r14d\n" /* len = this.val */ +" movb %%al, %%cl\n" + +" testb $16, %%al\n" +" jz .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */ +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_decode_distance\n" /* if (!op) */ + +".L_add_bits_to_len:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrq %%cl, %%rdx\n" +" addl %%eax, %%r14d\n" /* len += hold & mask[op] */ + +".L_decode_distance:\n" +" movq %%r13, %%r8\n" /* r8 = dmask */ +" cmpb $32, %%bl\n" +" ja .L_get_distance_code\n" /* if (32 < bits) */ + +" lodsl\n" /* eax = *(uint *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $32, %%bl\n" /* bits += 32 */ +" shlq %%cl, %%rax\n" +" orq %%rax, %%rdx\n" /* hold |= *((uint *)in)++ << bits */ + +".L_get_distance_code:\n" +" andq %%rdx, %%r8\n" /* r8 &= hold */ +" movl (%%r11,%%r8,4), %%eax\n" /* eax = dcode[hold & dmask] */ + +".L_dodist:\n" +" movl %%eax, %%r15d\n" /* dist = this */ +" shrl $16, %%r15d\n" /* dist = this.val */ +" movb %%ah, %%cl\n" +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrq %%cl, %%rdx\n" /* hold >>= this.bits */ +" movb %%al, %%cl\n" /* cl = this.op */ + +" testb $16, %%al\n" /* if ((op & 16) == 0) */ +" jz .L_test_for_second_level_dist\n" +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_check_dist_one\n" + +".L_add_bits_to_dist:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" /* (1 << op) - 1 */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrq %%cl, %%rdx\n" +" addl %%eax, %%r15d\n" /* dist += hold & ((1 << op) - 1) */ + +".L_check_window:\n" +" movq %%rsi, %%r8\n" /* save in so from can use it's reg */ +" movq %%rdi, %%rax\n" +" subq 40(%%rsp), %%rax\n" /* nbytes = out - beg */ + +" cmpl %%r15d, %%eax\n" +" jb .L_clip_window\n" /* if (dist > nbytes) 4.2% */ + +" movl %%r14d, %%ecx\n" /* ecx = len */ +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = out - dist */ + +" sarl %%ecx\n" +" jnc .L_copy_two\n" /* if len % 2 == 0 */ + +" rep movsw\n" +" movb (%%rsi), %%al\n" +" movb %%al, (%%rdi)\n" +" incq %%rdi\n" + +" movq %%r8, %%rsi\n" /* move in back to %rsi, toss from */ +" jmp .L_while_test\n" + +".L_copy_two:\n" +" rep movsw\n" +" movq %%r8, %%rsi\n" /* move in back to %rsi, toss from */ +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_check_dist_one:\n" +" cmpl $1, %%r15d\n" /* if dist 1, is a memset */ +" jne .L_check_window\n" +" cmpq %%rdi, 40(%%rsp)\n" /* if out == beg, outside window */ +" je .L_check_window\n" + +" movl %%r14d, %%ecx\n" /* ecx = len */ +" movb -1(%%rdi), %%al\n" +" movb %%al, %%ah\n" + +" sarl %%ecx\n" +" jnc .L_set_two\n" +" movb %%al, (%%rdi)\n" +" incq %%rdi\n" + +".L_set_two:\n" +" rep stosw\n" +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_second_level_length:\n" +" testb $64, %%al\n" +" jnz .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl %%r14d, %%eax\n" /* eax += len */ +" movl (%%rbp,%%rax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/ +" jmp .L_dolen\n" + +".align 32,0x90\n" +".L_test_for_second_level_dist:\n" +" testb $64, %%al\n" +" jnz .L_invalid_distance_code\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl %%r15d, %%eax\n" /* eax += dist */ +" movl (%%r11,%%rax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/ +" jmp .L_dodist\n" + +".align 32,0x90\n" +".L_clip_window:\n" +" movl %%eax, %%ecx\n" /* ecx = nbytes */ +" movl 92(%%rsp), %%eax\n" /* eax = wsize, prepare for dist cmp */ +" negl %%ecx\n" /* nbytes = -nbytes */ + +" cmpl %%r15d, %%eax\n" +" jb .L_invalid_distance_too_far\n" /* if (dist > wsize) */ + +" addl %%r15d, %%ecx\n" /* nbytes = dist - nbytes */ +" cmpl $0, 96(%%rsp)\n" +" jne .L_wrap_around_window\n" /* if (write != 0) */ + +" movq 56(%%rsp), %%rsi\n" /* from = window */ +" subl %%ecx, %%eax\n" /* eax -= nbytes */ +" addq %%rax, %%rsi\n" /* from += wsize - nbytes */ + +" movl %%r14d, %%eax\n" /* eax = len */ +" cmpl %%ecx, %%r14d\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* eax -= nbytes */ +" rep movsb\n" +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = &out[ -dist ] */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_wrap_around_window:\n" +" movl 96(%%rsp), %%eax\n" /* eax = write */ +" cmpl %%eax, %%ecx\n" +" jbe .L_contiguous_in_window\n" /* if (write >= nbytes) */ + +" movl 92(%%rsp), %%esi\n" /* from = wsize */ +" addq 56(%%rsp), %%rsi\n" /* from += window */ +" addq %%rax, %%rsi\n" /* from += write */ +" subq %%rcx, %%rsi\n" /* from -= nbytes */ +" subl %%eax, %%ecx\n" /* nbytes -= write */ + +" movl %%r14d, %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movq 56(%%rsp), %%rsi\n" /* from = window */ +" movl 96(%%rsp), %%ecx\n" /* nbytes = write */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = out - dist */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_contiguous_in_window:\n" +" movq 56(%%rsp), %%rsi\n" /* rsi = window */ +" addq %%rax, %%rsi\n" +" subq %%rcx, %%rsi\n" /* from += write - nbytes */ + +" movl %%r14d, %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movq %%rdi, %%rsi\n" +" subq %%r15, %%rsi\n" /* from = out - dist */ +" jmp .L_do_copy\n" /* if (nbytes >= len) */ + +".align 32,0x90\n" +".L_do_copy:\n" +" movl %%eax, %%ecx\n" /* ecx = len */ +" rep movsb\n" + +" movq %%r8, %%rsi\n" /* move in back to %esi, toss from */ +" jmp .L_while_test\n" + +".L_test_for_end_of_block:\n" +" testb $32, %%al\n" +" jz .L_invalid_literal_length_code\n" +" movl $1, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_literal_length_code:\n" +" movl $2, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_code:\n" +" movl $3, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_too_far:\n" +" movl $4, 116(%%rsp)\n" +" jmp .L_break_loop_with_status\n" + +".L_break_loop:\n" +" movl $0, 116(%%rsp)\n" + +".L_break_loop_with_status:\n" +/* put in, out, bits, and hold back into ar and pop esp */ +" movq %%rsi, 16(%%rsp)\n" /* in */ +" movq %%rdi, 32(%%rsp)\n" /* out */ +" movl %%ebx, 88(%%rsp)\n" /* bits */ +" movq %%rdx, 80(%%rsp)\n" /* hold */ +" movq (%%rsp), %%rax\n" /* restore rbp and rsp */ +" movq 8(%%rsp), %%rbp\n" +" movq %%rax, %%rsp\n" + : + : "m" (ar) + : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", + "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" + ); +#elif ( defined( __GNUC__ ) || defined( __ICC ) ) && defined( __i386 ) + __asm__ __volatile__ ( +" leal %0, %%eax\n" +" movl %%esp, (%%eax)\n" /* save esp, ebp */ +" movl %%ebp, 4(%%eax)\n" +" movl %%eax, %%esp\n" +" movl 8(%%esp), %%esi\n" /* esi = in */ +" movl 16(%%esp), %%edi\n" /* edi = out */ +" movl 40(%%esp), %%edx\n" /* edx = hold */ +" movl 44(%%esp), %%ebx\n" /* ebx = bits */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ + +" cld\n" +" jmp .L_do_loop\n" + +".align 32,0x90\n" +".L_while_test:\n" +" cmpl %%edi, 24(%%esp)\n" /* out < end */ +" jbe .L_break_loop\n" +" cmpl %%esi, 12(%%esp)\n" /* in < last */ +" jbe .L_break_loop\n" + +".L_do_loop:\n" +" cmpb $15, %%bl\n" +" ja .L_get_length_code\n" /* if (15 < bits) */ + +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ + +".L_get_length_code:\n" +" movl 56(%%esp), %%eax\n" /* eax = lmask */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" movl (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[hold & lmask] */ + +".L_dolen:\n" +" movb %%ah, %%cl\n" /* cl = this.bits */ +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrl %%cl, %%edx\n" /* hold >>= this.bits */ + +" testb %%al, %%al\n" +" jnz .L_test_for_length_base\n" /* if (op != 0) 45.7% */ + +" shrl $16, %%eax\n" /* output this.val char */ +" stosb\n" +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_length_base:\n" +" movl %%eax, %%ecx\n" /* len = this */ +" shrl $16, %%ecx\n" /* len = this.val */ +" movl %%ecx, 64(%%esp)\n" /* save len */ +" movb %%al, %%cl\n" + +" testb $16, %%al\n" +" jz .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */ +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_decode_distance\n" /* if (!op) */ +" cmpb %%cl, %%bl\n" +" jae .L_add_bits_to_len\n" /* if (op <= bits) */ + +" movb %%cl, %%ch\n" /* stash op in ch, freeing cl */ +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ +" movb %%ch, %%cl\n" /* move op back to ecx */ + +".L_add_bits_to_len:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrl %%cl, %%edx\n" +" addl %%eax, 64(%%esp)\n" /* len += hold & mask[op] */ + +".L_decode_distance:\n" +" cmpb $15, %%bl\n" +" ja .L_get_distance_code\n" /* if (15 < bits) */ + +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ + +".L_get_distance_code:\n" +" movl 60(%%esp), %%eax\n" /* eax = dmask */ +" movl 36(%%esp), %%ecx\n" /* ecx = dcode */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" movl (%%ecx,%%eax,4), %%eax\n"/* eax = dcode[hold & dmask] */ + +".L_dodist:\n" +" movl %%eax, %%ebp\n" /* dist = this */ +" shrl $16, %%ebp\n" /* dist = this.val */ +" movb %%ah, %%cl\n" +" subb %%ah, %%bl\n" /* bits -= this.bits */ +" shrl %%cl, %%edx\n" /* hold >>= this.bits */ +" movb %%al, %%cl\n" /* cl = this.op */ + +" testb $16, %%al\n" /* if ((op & 16) == 0) */ +" jz .L_test_for_second_level_dist\n" +" andb $15, %%cl\n" /* op &= 15 */ +" jz .L_check_dist_one\n" +" cmpb %%cl, %%bl\n" +" jae .L_add_bits_to_dist\n" /* if (op <= bits) 97.6% */ + +" movb %%cl, %%ch\n" /* stash op in ch, freeing cl */ +" xorl %%eax, %%eax\n" +" lodsw\n" /* al = *(ushort *)in++ */ +" movb %%bl, %%cl\n" /* cl = bits, needs it for shifting */ +" addb $16, %%bl\n" /* bits += 16 */ +" shll %%cl, %%eax\n" +" orl %%eax, %%edx\n" /* hold |= *((ushort *)in)++ << bits */ +" movb %%ch, %%cl\n" /* move op back to ecx */ + +".L_add_bits_to_dist:\n" +" subb %%cl, %%bl\n" +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" /* (1 << op) - 1 */ +" andl %%edx, %%eax\n" /* eax &= hold */ +" shrl %%cl, %%edx\n" +" addl %%eax, %%ebp\n" /* dist += hold & ((1 << op) - 1) */ + +".L_check_window:\n" +" movl %%esi, 8(%%esp)\n" /* save in so from can use it's reg */ +" movl %%edi, %%eax\n" +" subl 20(%%esp), %%eax\n" /* nbytes = out - beg */ + +" cmpl %%ebp, %%eax\n" +" jb .L_clip_window\n" /* if (dist > nbytes) 4.2% */ + +" movl 64(%%esp), %%ecx\n" /* ecx = len */ +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ + +" sarl %%ecx\n" +" jnc .L_copy_two\n" /* if len % 2 == 0 */ + +" rep movsw\n" +" movb (%%esi), %%al\n" +" movb %%al, (%%edi)\n" +" incl %%edi\n" + +" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".L_copy_two:\n" +" rep movsw\n" +" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_check_dist_one:\n" +" cmpl $1, %%ebp\n" /* if dist 1, is a memset */ +" jne .L_check_window\n" +" cmpl %%edi, 20(%%esp)\n" +" je .L_check_window\n" /* out == beg, if outside window */ + +" movl 64(%%esp), %%ecx\n" /* ecx = len */ +" movb -1(%%edi), %%al\n" +" movb %%al, %%ah\n" + +" sarl %%ecx\n" +" jnc .L_set_two\n" +" movb %%al, (%%edi)\n" +" incl %%edi\n" + +".L_set_two:\n" +" rep stosw\n" +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".align 32,0x90\n" +".L_test_for_second_level_length:\n" +" testb $64, %%al\n" +" jnz .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl 64(%%esp), %%eax\n" /* eax += len */ +" movl (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/ +" jmp .L_dolen\n" + +".align 32,0x90\n" +".L_test_for_second_level_dist:\n" +" testb $64, %%al\n" +" jnz .L_invalid_distance_code\n" /* if ((op & 64) != 0) */ + +" xorl %%eax, %%eax\n" +" incl %%eax\n" +" shll %%cl, %%eax\n" +" decl %%eax\n" +" andl %%edx, %%eax\n" /* eax &= hold */ +" addl %%ebp, %%eax\n" /* eax += dist */ +" movl 36(%%esp), %%ecx\n" /* ecx = dcode */ +" movl (%%ecx,%%eax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/ +" jmp .L_dodist\n" + +".align 32,0x90\n" +".L_clip_window:\n" +" movl %%eax, %%ecx\n" +" movl 48(%%esp), %%eax\n" /* eax = wsize */ +" negl %%ecx\n" /* nbytes = -nbytes */ +" movl 28(%%esp), %%esi\n" /* from = window */ + +" cmpl %%ebp, %%eax\n" +" jb .L_invalid_distance_too_far\n" /* if (dist > wsize) */ + +" addl %%ebp, %%ecx\n" /* nbytes = dist - nbytes */ +" cmpl $0, 52(%%esp)\n" +" jne .L_wrap_around_window\n" /* if (write != 0) */ + +" subl %%ecx, %%eax\n" +" addl %%eax, %%esi\n" /* from += wsize - nbytes */ + +" movl 64(%%esp), %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_wrap_around_window:\n" +" movl 52(%%esp), %%eax\n" /* eax = write */ +" cmpl %%eax, %%ecx\n" +" jbe .L_contiguous_in_window\n" /* if (write >= nbytes) */ + +" addl 48(%%esp), %%esi\n" /* from += wsize */ +" addl %%eax, %%esi\n" /* from += write */ +" subl %%ecx, %%esi\n" /* from -= nbytes */ +" subl %%eax, %%ecx\n" /* nbytes -= write */ + +" movl 64(%%esp), %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl 28(%%esp), %%esi\n" /* from = window */ +" movl 52(%%esp), %%ecx\n" /* nbytes = write */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ +" jmp .L_do_copy\n" + +".align 32,0x90\n" +".L_contiguous_in_window:\n" +" addl %%eax, %%esi\n" +" subl %%ecx, %%esi\n" /* from += write - nbytes */ + +" movl 64(%%esp), %%eax\n" /* eax = len */ +" cmpl %%ecx, %%eax\n" +" jbe .L_do_copy\n" /* if (nbytes >= len) */ + +" subl %%ecx, %%eax\n" /* len -= nbytes */ +" rep movsb\n" +" movl %%edi, %%esi\n" +" subl %%ebp, %%esi\n" /* from = out - dist */ +" jmp .L_do_copy\n" /* if (nbytes >= len) */ + +".align 32,0x90\n" +".L_do_copy:\n" +" movl %%eax, %%ecx\n" +" rep movsb\n" + +" movl 8(%%esp), %%esi\n" /* move in back to %esi, toss from */ +" movl 32(%%esp), %%ebp\n" /* ebp = lcode */ +" jmp .L_while_test\n" + +".L_test_for_end_of_block:\n" +" testb $32, %%al\n" +" jz .L_invalid_literal_length_code\n" +" movl $1, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_literal_length_code:\n" +" movl $2, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_code:\n" +" movl $3, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_invalid_distance_too_far:\n" +" movl 8(%%esp), %%esi\n" +" movl $4, 72(%%esp)\n" +" jmp .L_break_loop_with_status\n" + +".L_break_loop:\n" +" movl $0, 72(%%esp)\n" + +".L_break_loop_with_status:\n" +/* put in, out, bits, and hold back into ar and pop esp */ +" movl %%esi, 8(%%esp)\n" /* save in */ +" movl %%edi, 16(%%esp)\n" /* save out */ +" movl %%ebx, 44(%%esp)\n" /* save bits */ +" movl %%edx, 40(%%esp)\n" /* save hold */ +" movl 4(%%esp), %%ebp\n" /* restore esp, ebp */ +" movl (%%esp), %%esp\n" + : + : "m" (ar) + : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi" + ); +#elif defined( _MSC_VER ) && ! defined( _M_AMD64 ) + __asm { + lea eax, ar + mov [eax], esp /* save esp, ebp */ + mov [eax+4], ebp + mov esp, eax + mov esi, [esp+8] /* esi = in */ + mov edi, [esp+16] /* edi = out */ + mov edx, [esp+40] /* edx = hold */ + mov ebx, [esp+44] /* ebx = bits */ + mov ebp, [esp+32] /* ebp = lcode */ + + cld + jmp L_do_loop + +ALIGN 4 +L_while_test: + cmp [esp+24], edi + jbe L_break_loop + cmp [esp+12], esi + jbe L_break_loop + +L_do_loop: + cmp bl, 15 + ja L_get_length_code /* if (15 < bits) */ + + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + +L_get_length_code: + mov eax, [esp+56] /* eax = lmask */ + and eax, edx /* eax &= hold */ + mov eax, [ebp+eax*4] /* eax = lcode[hold & lmask] */ + +L_dolen: + mov cl, ah /* cl = this.bits */ + sub bl, ah /* bits -= this.bits */ + shr edx, cl /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base /* if (op != 0) 45.7% */ + + shr eax, 16 /* output this.val char */ + stosb + jmp L_while_test + +ALIGN 4 +L_test_for_length_base: + mov ecx, eax /* len = this */ + shr ecx, 16 /* len = this.val */ + mov [esp+64], ecx /* save len */ + mov cl, al + + test al, 16 + jz L_test_for_second_level_length /* if ((op & 16) == 0) 8% */ + and cl, 15 /* op &= 15 */ + jz L_decode_distance /* if (!op) */ + cmp bl, cl + jae L_add_bits_to_len /* if (op <= bits) */ + + mov ch, cl /* stash op in ch, freeing cl */ + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + mov cl, ch /* move op back to ecx */ + +L_add_bits_to_len: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx /* eax &= hold */ + shr edx, cl + add [esp+64], eax /* len += hold & mask[op] */ + +L_decode_distance: + cmp bl, 15 + ja L_get_distance_code /* if (15 < bits) */ + + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + +L_get_distance_code: + mov eax, [esp+60] /* eax = dmask */ + mov ecx, [esp+36] /* ecx = dcode */ + and eax, edx /* eax &= hold */ + mov eax, [ecx+eax*4]/* eax = dcode[hold & dmask] */ + +L_dodist: + mov ebp, eax /* dist = this */ + shr ebp, 16 /* dist = this.val */ + mov cl, ah + sub bl, ah /* bits -= this.bits */ + shr edx, cl /* hold >>= this.bits */ + mov cl, al /* cl = this.op */ + + test al, 16 /* if ((op & 16) == 0) */ + jz L_test_for_second_level_dist + and cl, 15 /* op &= 15 */ + jz L_check_dist_one + cmp bl, cl + jae L_add_bits_to_dist /* if (op <= bits) 97.6% */ + + mov ch, cl /* stash op in ch, freeing cl */ + xor eax, eax + lodsw /* al = *(ushort *)in++ */ + mov cl, bl /* cl = bits, needs it for shifting */ + add bl, 16 /* bits += 16 */ + shl eax, cl + or edx, eax /* hold |= *((ushort *)in)++ << bits */ + mov cl, ch /* move op back to ecx */ + +L_add_bits_to_dist: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax /* (1 << op) - 1 */ + and eax, edx /* eax &= hold */ + shr edx, cl + add ebp, eax /* dist += hold & ((1 << op) - 1) */ + +L_check_window: + mov [esp+8], esi /* save in so from can use it's reg */ + mov eax, edi + sub eax, [esp+20] /* nbytes = out - beg */ + + cmp eax, ebp + jb L_clip_window /* if (dist > nbytes) 4.2% */ + + mov ecx, [esp+64] /* ecx = len */ + mov esi, edi + sub esi, ebp /* from = out - dist */ + + sar ecx, 1 + jnc L_copy_two + + rep movsw + mov al, [esi] + mov [edi], al + inc edi + + mov esi, [esp+8] /* move in back to %esi, toss from */ + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +L_copy_two: + rep movsw + mov esi, [esp+8] /* move in back to %esi, toss from */ + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp ebp, 1 /* if dist 1, is a memset */ + jne L_check_window + cmp [esp+20], edi + je L_check_window /* out == beg, if outside window */ + + mov ecx, [esp+64] /* ecx = len */ + mov al, [edi-1] + mov ah, al + + sar ecx, 1 + jnc L_set_two + mov [edi], al /* memset out with from[-1] */ + inc edi + +L_set_two: + rep stosw + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + test al, 64 + jnz L_test_for_end_of_block /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx /* eax &= hold */ + add eax, [esp+64] /* eax += len */ + mov eax, [ebp+eax*4] /* eax = lcode[val+(hold&mask[op])]*/ + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + test al, 64 + jnz L_invalid_distance_code /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx /* eax &= hold */ + add eax, ebp /* eax += dist */ + mov ecx, [esp+36] /* ecx = dcode */ + mov eax, [ecx+eax*4] /* eax = dcode[val+(hold&mask[op])]*/ + jmp L_dodist + +ALIGN 4 +L_clip_window: + mov ecx, eax + mov eax, [esp+48] /* eax = wsize */ + neg ecx /* nbytes = -nbytes */ + mov esi, [esp+28] /* from = window */ + + cmp eax, ebp + jb L_invalid_distance_too_far /* if (dist > wsize) */ + + add ecx, ebp /* nbytes = dist - nbytes */ + cmp dword ptr [esp+52], 0 + jne L_wrap_around_window /* if (write != 0) */ + + sub eax, ecx + add esi, eax /* from += wsize - nbytes */ + + mov eax, [esp+64] /* eax = len */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, edi + sub esi, ebp /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_wrap_around_window: + mov eax, [esp+52] /* eax = write */ + cmp ecx, eax + jbe L_contiguous_in_window /* if (write >= nbytes) */ + + add esi, [esp+48] /* from += wsize */ + add esi, eax /* from += write */ + sub esi, ecx /* from -= nbytes */ + sub ecx, eax /* nbytes -= write */ + + mov eax, [esp+64] /* eax = len */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, [esp+28] /* from = window */ + mov ecx, [esp+52] /* nbytes = write */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, edi + sub esi, ebp /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_contiguous_in_window: + add esi, eax + sub esi, ecx /* from += write - nbytes */ + + mov eax, [esp+64] /* eax = len */ + cmp eax, ecx + jbe L_do_copy /* if (nbytes >= len) */ + + sub eax, ecx /* len -= nbytes */ + rep movsb + mov esi, edi + sub esi, ebp /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_do_copy: + mov ecx, eax + rep movsb + + mov esi, [esp+8] /* move in back to %esi, toss from */ + mov ebp, [esp+32] /* ebp = lcode */ + jmp L_while_test + +L_test_for_end_of_block: + test al, 32 + jz L_invalid_literal_length_code + mov dword ptr [esp+72], 1 + jmp L_break_loop_with_status + +L_invalid_literal_length_code: + mov dword ptr [esp+72], 2 + jmp L_break_loop_with_status + +L_invalid_distance_code: + mov dword ptr [esp+72], 3 + jmp L_break_loop_with_status + +L_invalid_distance_too_far: + mov esi, [esp+4] + mov dword ptr [esp+72], 4 + jmp L_break_loop_with_status + +L_break_loop: + mov dword ptr [esp+72], 0 + +L_break_loop_with_status: +/* put in, out, bits, and hold back into ar and pop esp */ + mov [esp+8], esi /* save in */ + mov [esp+16], edi /* save out */ + mov [esp+44], ebx /* save bits */ + mov [esp+40], edx /* save hold */ + mov ebp, [esp+4] /* restore esp, ebp */ + mov esp, [esp] + } +#else +#error "x86 architecture not defined" +#endif + + if (ar.status > 1) { + if (ar.status == 2) + strm->msg = "invalid literal/length code"; + else if (ar.status == 3) + strm->msg = "invalid distance code"; + else + strm->msg = "invalid distance too far back"; + state->mode = BAD; + } + else if ( ar.status == 1 ) { + state->mode = TYPE; + } + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + ar.len = ar.bits >> 3; + ar.in -= ar.len; + ar.bits -= ar.len << 3; + ar.hold &= (1U << ar.bits) - 1; + + /* update state and return */ + strm->next_in = ar.in; + strm->next_out = ar.out; + strm->avail_in = (unsigned)(ar.in < ar.last ? + PAD_AVAIL_IN + (ar.last - ar.in) : + PAD_AVAIL_IN - (ar.in - ar.last)); + strm->avail_out = (unsigned)(ar.out < ar.end ? + PAD_AVAIL_OUT + (ar.end - ar.out) : + PAD_AVAIL_OUT - (ar.out - ar.end)); + state->hold = ar.hold; + state->bits = ar.bits; + return; +} + diff --git a/compat/zlib/contrib/inflate86/inffast.S b/compat/zlib/contrib/inflate86/inffast.S new file mode 100644 index 0000000..2245a29 --- /dev/null +++ b/compat/zlib/contrib/inflate86/inffast.S @@ -0,0 +1,1368 @@ +/* + * inffast.S is a hand tuned assembler version of: + * + * inffast.c -- fast decoding + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * This version (Jan-23-2003) of inflate_fast was coded and tested under + * GNU/Linux on a pentium 3, using the gcc-3.2 compiler distribution. On that + * machine, I found that gzip style archives decompressed about 20% faster than + * the gcc-3.2 -O3 -fomit-frame-pointer compiled version. Your results will + * depend on how large of a buffer is used for z_stream.next_in & next_out + * (8K-32K worked best for my 256K cpu cache) and how much overhead there is in + * stream processing I/O and crc32/addler32. In my case, this routine used + * 70% of the cpu time and crc32 used 20%. + * + * I am confident that this version will work in the general case, but I have + * not tested a wide variety of datasets or a wide variety of platforms. + * + * Jan-24-2003 -- Added -DUSE_MMX define for slightly faster inflating. + * It should be a runtime flag instead of compile time flag... + * + * Jan-26-2003 -- Added runtime check for MMX support with cpuid instruction. + * With -DUSE_MMX, only MMX code is compiled. With -DNO_MMX, only non-MMX code + * is compiled. Without either option, runtime detection is enabled. Runtime + * detection should work on all modern cpus and the recomended algorithm (flip + * ID bit on eflags and then use the cpuid instruction) is used in many + * multimedia applications. Tested under win2k with gcc-2.95 and gas-2.12 + * distributed with cygwin3. Compiling with gcc-2.95 -c inffast.S -o + * inffast.obj generates a COFF object which can then be linked with MSVC++ + * compiled code. Tested under FreeBSD 4.7 with gcc-2.95. + * + * Jan-28-2003 -- Tested Athlon XP... MMX mode is slower than no MMX (and + * slower than compiler generated code). Adjusted cpuid check to use the MMX + * code only for Pentiums < P4 until I have more data on the P4. Speed + * improvment is only about 15% on the Athlon when compared with code generated + * with MSVC++. Not sure yet, but I think the P4 will also be slower using the + * MMX mode because many of it's x86 ALU instructions execute in .5 cycles and + * have less latency than MMX ops. Added code to buffer the last 11 bytes of + * the input stream since the MMX code grabs bits in chunks of 32, which + * differs from the inffast.c algorithm. I don't think there would have been + * read overruns where a page boundary was crossed (a segfault), but there + * could have been overruns when next_in ends on unaligned memory (unintialized + * memory read). + * + * Mar-13-2003 -- P4 MMX is slightly slower than P4 NO_MMX. I created a C + * version of the non-MMX code so that it doesn't depend on zstrm and zstate + * structure offsets which are hard coded in this file. This was last tested + * with zlib-1.2.0 which is currently in beta testing, newer versions of this + * and inffas86.c can be found at http://www.eetbeetee.com/zlib/ and + * http://www.charm.net/~christop/zlib/ + */ + + +/* + * if you have underscore linking problems (_inflate_fast undefined), try + * using -DGAS_COFF + */ +#if ! defined( GAS_COFF ) && ! defined( GAS_ELF ) + +#if defined( WIN32 ) || defined( __CYGWIN__ ) +#define GAS_COFF /* windows object format */ +#else +#define GAS_ELF +#endif + +#endif /* ! GAS_COFF && ! GAS_ELF */ + + +#if defined( GAS_COFF ) + +/* coff externals have underscores */ +#define inflate_fast _inflate_fast +#define inflate_fast_use_mmx _inflate_fast_use_mmx + +#endif /* GAS_COFF */ + + +.file "inffast.S" + +.globl inflate_fast + +.text +.align 4,0 +.L_invalid_literal_length_code_msg: +.string "invalid literal/length code" + +.align 4,0 +.L_invalid_distance_code_msg: +.string "invalid distance code" + +.align 4,0 +.L_invalid_distance_too_far_msg: +.string "invalid distance too far back" + +#if ! defined( NO_MMX ) +.align 4,0 +.L_mask: /* mask[N] = ( 1 << N ) - 1 */ +.long 0 +.long 1 +.long 3 +.long 7 +.long 15 +.long 31 +.long 63 +.long 127 +.long 255 +.long 511 +.long 1023 +.long 2047 +.long 4095 +.long 8191 +.long 16383 +.long 32767 +.long 65535 +.long 131071 +.long 262143 +.long 524287 +.long 1048575 +.long 2097151 +.long 4194303 +.long 8388607 +.long 16777215 +.long 33554431 +.long 67108863 +.long 134217727 +.long 268435455 +.long 536870911 +.long 1073741823 +.long 2147483647 +.long 4294967295 +#endif /* NO_MMX */ + +.text + +/* + * struct z_stream offsets, in zlib.h + */ +#define next_in_strm 0 /* strm->next_in */ +#define avail_in_strm 4 /* strm->avail_in */ +#define next_out_strm 12 /* strm->next_out */ +#define avail_out_strm 16 /* strm->avail_out */ +#define msg_strm 24 /* strm->msg */ +#define state_strm 28 /* strm->state */ + +/* + * struct inflate_state offsets, in inflate.h + */ +#define mode_state 0 /* state->mode */ +#define wsize_state 32 /* state->wsize */ +#define write_state 40 /* state->write */ +#define window_state 44 /* state->window */ +#define hold_state 48 /* state->hold */ +#define bits_state 52 /* state->bits */ +#define lencode_state 68 /* state->lencode */ +#define distcode_state 72 /* state->distcode */ +#define lenbits_state 76 /* state->lenbits */ +#define distbits_state 80 /* state->distbits */ + +/* + * inflate_fast's activation record + */ +#define local_var_size 64 /* how much local space for vars */ +#define strm_sp 88 /* first arg: z_stream * (local_var_size + 24) */ +#define start_sp 92 /* second arg: unsigned int (local_var_size + 28) */ + +/* + * offsets for local vars on stack + */ +#define out 60 /* unsigned char* */ +#define window 56 /* unsigned char* */ +#define wsize 52 /* unsigned int */ +#define write 48 /* unsigned int */ +#define in 44 /* unsigned char* */ +#define beg 40 /* unsigned char* */ +#define buf 28 /* char[ 12 ] */ +#define len 24 /* unsigned int */ +#define last 20 /* unsigned char* */ +#define end 16 /* unsigned char* */ +#define dcode 12 /* code* */ +#define lcode 8 /* code* */ +#define dmask 4 /* unsigned int */ +#define lmask 0 /* unsigned int */ + +/* + * typedef enum inflate_mode consts, in inflate.h + */ +#define INFLATE_MODE_TYPE 11 /* state->mode flags enum-ed in inflate.h */ +#define INFLATE_MODE_BAD 26 + + +#if ! defined( USE_MMX ) && ! defined( NO_MMX ) + +#define RUN_TIME_MMX + +#define CHECK_MMX 1 +#define DO_USE_MMX 2 +#define DONT_USE_MMX 3 + +.globl inflate_fast_use_mmx + +.data + +.align 4,0 +inflate_fast_use_mmx: /* integer flag for run time control 1=check,2=mmx,3=no */ +.long CHECK_MMX + +#if defined( GAS_ELF ) +/* elf info */ +.type inflate_fast_use_mmx,@object +.size inflate_fast_use_mmx,4 +#endif + +#endif /* RUN_TIME_MMX */ + +#if defined( GAS_COFF ) +/* coff info: scl 2 = extern, type 32 = function */ +.def inflate_fast; .scl 2; .type 32; .endef +#endif + +.text + +.align 32,0x90 +inflate_fast: + pushl %edi + pushl %esi + pushl %ebp + pushl %ebx + pushf /* save eflags (strm_sp, state_sp assumes this is 32 bits) */ + subl $local_var_size, %esp + cld + +#define strm_r %esi +#define state_r %edi + + movl strm_sp(%esp), strm_r + movl state_strm(strm_r), state_r + + /* in = strm->next_in; + * out = strm->next_out; + * last = in + strm->avail_in - 11; + * beg = out - (start - strm->avail_out); + * end = out + (strm->avail_out - 257); + */ + movl avail_in_strm(strm_r), %edx + movl next_in_strm(strm_r), %eax + + addl %eax, %edx /* avail_in += next_in */ + subl $11, %edx /* avail_in -= 11 */ + + movl %eax, in(%esp) + movl %edx, last(%esp) + + movl start_sp(%esp), %ebp + movl avail_out_strm(strm_r), %ecx + movl next_out_strm(strm_r), %ebx + + subl %ecx, %ebp /* start -= avail_out */ + negl %ebp /* start = -start */ + addl %ebx, %ebp /* start += next_out */ + + subl $257, %ecx /* avail_out -= 257 */ + addl %ebx, %ecx /* avail_out += out */ + + movl %ebx, out(%esp) + movl %ebp, beg(%esp) + movl %ecx, end(%esp) + + /* wsize = state->wsize; + * write = state->write; + * window = state->window; + * hold = state->hold; + * bits = state->bits; + * lcode = state->lencode; + * dcode = state->distcode; + * lmask = ( 1 << state->lenbits ) - 1; + * dmask = ( 1 << state->distbits ) - 1; + */ + + movl lencode_state(state_r), %eax + movl distcode_state(state_r), %ecx + + movl %eax, lcode(%esp) + movl %ecx, dcode(%esp) + + movl $1, %eax + movl lenbits_state(state_r), %ecx + shll %cl, %eax + decl %eax + movl %eax, lmask(%esp) + + movl $1, %eax + movl distbits_state(state_r), %ecx + shll %cl, %eax + decl %eax + movl %eax, dmask(%esp) + + movl wsize_state(state_r), %eax + movl write_state(state_r), %ecx + movl window_state(state_r), %edx + + movl %eax, wsize(%esp) + movl %ecx, write(%esp) + movl %edx, window(%esp) + + movl hold_state(state_r), %ebp + movl bits_state(state_r), %ebx + +#undef strm_r +#undef state_r + +#define in_r %esi +#define from_r %esi +#define out_r %edi + + movl in(%esp), in_r + movl last(%esp), %ecx + cmpl in_r, %ecx + ja .L_align_long /* if in < last */ + + addl $11, %ecx /* ecx = &in[ avail_in ] */ + subl in_r, %ecx /* ecx = avail_in */ + movl $12, %eax + subl %ecx, %eax /* eax = 12 - avail_in */ + leal buf(%esp), %edi + rep movsb /* memcpy( buf, in, avail_in ) */ + movl %eax, %ecx + xorl %eax, %eax + rep stosb /* memset( &buf[ avail_in ], 0, 12 - avail_in ) */ + leal buf(%esp), in_r /* in = buf */ + movl in_r, last(%esp) /* last = in, do just one iteration */ + jmp .L_is_aligned + + /* align in_r on long boundary */ +.L_align_long: + testl $3, in_r + jz .L_is_aligned + xorl %eax, %eax + movb (in_r), %al + incl in_r + movl %ebx, %ecx + addl $8, %ebx + shll %cl, %eax + orl %eax, %ebp + jmp .L_align_long + +.L_is_aligned: + movl out(%esp), out_r + +#if defined( NO_MMX ) + jmp .L_do_loop +#endif + +#if defined( USE_MMX ) + jmp .L_init_mmx +#endif + +/*** Runtime MMX check ***/ + +#if defined( RUN_TIME_MMX ) +.L_check_mmx: + cmpl $DO_USE_MMX, inflate_fast_use_mmx + je .L_init_mmx + ja .L_do_loop /* > 2 */ + + pushl %eax + pushl %ebx + pushl %ecx + pushl %edx + pushf + movl (%esp), %eax /* copy eflags to eax */ + xorl $0x200000, (%esp) /* try toggling ID bit of eflags (bit 21) + * to see if cpu supports cpuid... + * ID bit method not supported by NexGen but + * bios may load a cpuid instruction and + * cpuid may be disabled on Cyrix 5-6x86 */ + popf + pushf + popl %edx /* copy new eflags to edx */ + xorl %eax, %edx /* test if ID bit is flipped */ + jz .L_dont_use_mmx /* not flipped if zero */ + xorl %eax, %eax + cpuid + cmpl $0x756e6547, %ebx /* check for GenuineIntel in ebx,ecx,edx */ + jne .L_dont_use_mmx + cmpl $0x6c65746e, %ecx + jne .L_dont_use_mmx + cmpl $0x49656e69, %edx + jne .L_dont_use_mmx + movl $1, %eax + cpuid /* get cpu features */ + shrl $8, %eax + andl $15, %eax + cmpl $6, %eax /* check for Pentium family, is 0xf for P4 */ + jne .L_dont_use_mmx + testl $0x800000, %edx /* test if MMX feature is set (bit 23) */ + jnz .L_use_mmx + jmp .L_dont_use_mmx +.L_use_mmx: + movl $DO_USE_MMX, inflate_fast_use_mmx + jmp .L_check_mmx_pop +.L_dont_use_mmx: + movl $DONT_USE_MMX, inflate_fast_use_mmx +.L_check_mmx_pop: + popl %edx + popl %ecx + popl %ebx + popl %eax + jmp .L_check_mmx +#endif + + +/*** Non-MMX code ***/ + +#if defined ( NO_MMX ) || defined( RUN_TIME_MMX ) + +#define hold_r %ebp +#define bits_r %bl +#define bitslong_r %ebx + +.align 32,0x90 +.L_while_test: + /* while (in < last && out < end) + */ + cmpl out_r, end(%esp) + jbe .L_break_loop /* if (out >= end) */ + + cmpl in_r, last(%esp) + jbe .L_break_loop + +.L_do_loop: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out + * + * do { + * if (bits < 15) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * this = lcode[hold & lmask] + */ + cmpb $15, bits_r + ja .L_get_length_code /* if (15 < bits) */ + + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + +.L_get_length_code: + movl lmask(%esp), %edx /* edx = lmask */ + movl lcode(%esp), %ecx /* ecx = lcode */ + andl hold_r, %edx /* edx &= hold */ + movl (%ecx,%edx,4), %eax /* eax = lcode[hold & lmask] */ + +.L_dolen: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out + * + * dolen: + * bits -= this.bits; + * hold >>= this.bits + */ + movb %ah, %cl /* cl = this.bits */ + subb %ah, bits_r /* bits -= this.bits */ + shrl %cl, hold_r /* hold >>= this.bits */ + + /* check if op is a literal + * if (op == 0) { + * PUP(out) = this.val; + * } + */ + testb %al, %al + jnz .L_test_for_length_base /* if (op != 0) 45.7% */ + + shrl $16, %eax /* output this.val char */ + stosb + jmp .L_while_test + +.L_test_for_length_base: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = len + * + * else if (op & 16) { + * len = this.val + * op &= 15 + * if (op) { + * if (op > bits) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * len += hold & mask[op]; + * bits -= op; + * hold >>= op; + * } + */ +#define len_r %edx + movl %eax, len_r /* len = this */ + shrl $16, len_r /* len = this.val */ + movb %al, %cl + + testb $16, %al + jz .L_test_for_second_level_length /* if ((op & 16) == 0) 8% */ + andb $15, %cl /* op &= 15 */ + jz .L_save_len /* if (!op) */ + cmpb %cl, bits_r + jae .L_add_bits_to_len /* if (op <= bits) */ + + movb %cl, %ch /* stash op in ch, freeing cl */ + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + movb %ch, %cl /* move op back to ecx */ + +.L_add_bits_to_len: + movl $1, %eax + shll %cl, %eax + decl %eax + subb %cl, bits_r + andl hold_r, %eax /* eax &= hold */ + shrl %cl, hold_r + addl %eax, len_r /* len += hold & mask[op] */ + +.L_save_len: + movl len_r, len(%esp) /* save len */ +#undef len_r + +.L_decode_distance: + /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * + * if (bits < 15) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * this = dcode[hold & dmask]; + * dodist: + * bits -= this.bits; + * hold >>= this.bits; + * op = this.op; + */ + + cmpb $15, bits_r + ja .L_get_distance_code /* if (15 < bits) */ + + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + +.L_get_distance_code: + movl dmask(%esp), %edx /* edx = dmask */ + movl dcode(%esp), %ecx /* ecx = dcode */ + andl hold_r, %edx /* edx &= hold */ + movl (%ecx,%edx,4), %eax /* eax = dcode[hold & dmask] */ + +#define dist_r %edx +.L_dodist: + movl %eax, dist_r /* dist = this */ + shrl $16, dist_r /* dist = this.val */ + movb %ah, %cl + subb %ah, bits_r /* bits -= this.bits */ + shrl %cl, hold_r /* hold >>= this.bits */ + + /* if (op & 16) { + * dist = this.val + * op &= 15 + * if (op > bits) { + * hold |= *((unsigned short *)in)++ << bits; + * bits += 16 + * } + * dist += hold & mask[op]; + * bits -= op; + * hold >>= op; + */ + movb %al, %cl /* cl = this.op */ + + testb $16, %al /* if ((op & 16) == 0) */ + jz .L_test_for_second_level_dist + andb $15, %cl /* op &= 15 */ + jz .L_check_dist_one + cmpb %cl, bits_r + jae .L_add_bits_to_dist /* if (op <= bits) 97.6% */ + + movb %cl, %ch /* stash op in ch, freeing cl */ + xorl %eax, %eax + lodsw /* al = *(ushort *)in++ */ + movb bits_r, %cl /* cl = bits, needs it for shifting */ + addb $16, bits_r /* bits += 16 */ + shll %cl, %eax + orl %eax, hold_r /* hold |= *((ushort *)in)++ << bits */ + movb %ch, %cl /* move op back to ecx */ + +.L_add_bits_to_dist: + movl $1, %eax + shll %cl, %eax + decl %eax /* (1 << op) - 1 */ + subb %cl, bits_r + andl hold_r, %eax /* eax &= hold */ + shrl %cl, hold_r + addl %eax, dist_r /* dist += hold & ((1 << op) - 1) */ + jmp .L_check_window + +.L_check_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes + * + * nbytes = out - beg; + * if (dist <= nbytes) { + * from = out - dist; + * do { + * PUP(out) = PUP(from); + * } while (--len > 0) { + * } + */ + + movl in_r, in(%esp) /* save in so from can use it's reg */ + movl out_r, %eax + subl beg(%esp), %eax /* nbytes = out - beg */ + + cmpl dist_r, %eax + jb .L_clip_window /* if (dist > nbytes) 4.2% */ + + movl len(%esp), %ecx + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + + subl $3, %ecx + movb (from_r), %al + movb %al, (out_r) + movb 1(from_r), %al + movb 2(from_r), %dl + addl $3, from_r + movb %al, 1(out_r) + movb %dl, 2(out_r) + addl $3, out_r + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + jmp .L_while_test + +.align 16,0x90 +.L_check_dist_one: + cmpl $1, dist_r + jne .L_check_window + cmpl out_r, beg(%esp) + je .L_check_window + + decl out_r + movl len(%esp), %ecx + movb (out_r), %al + subl $3, %ecx + + movb %al, 1(out_r) + movb %al, 2(out_r) + movb %al, 3(out_r) + addl $4, out_r + rep stosb + + jmp .L_while_test + +.align 16,0x90 +.L_test_for_second_level_length: + /* else if ((op & 64) == 0) { + * this = lcode[this.val + (hold & mask[op])]; + * } + */ + testb $64, %al + jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */ + + movl $1, %eax + shll %cl, %eax + decl %eax + andl hold_r, %eax /* eax &= hold */ + addl %edx, %eax /* eax += this.val */ + movl lcode(%esp), %edx /* edx = lcode */ + movl (%edx,%eax,4), %eax /* eax = lcode[val + (hold&mask[op])] */ + jmp .L_dolen + +.align 16,0x90 +.L_test_for_second_level_dist: + /* else if ((op & 64) == 0) { + * this = dcode[this.val + (hold & mask[op])]; + * } + */ + testb $64, %al + jnz .L_invalid_distance_code /* if ((op & 64) != 0) */ + + movl $1, %eax + shll %cl, %eax + decl %eax + andl hold_r, %eax /* eax &= hold */ + addl %edx, %eax /* eax += this.val */ + movl dcode(%esp), %edx /* edx = dcode */ + movl (%edx,%eax,4), %eax /* eax = dcode[val + (hold&mask[op])] */ + jmp .L_dodist + +.align 16,0x90 +.L_clip_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes + * + * else { + * if (dist > wsize) { + * invalid distance + * } + * from = window; + * nbytes = dist - nbytes; + * if (write == 0) { + * from += wsize - nbytes; + */ +#define nbytes_r %ecx + movl %eax, nbytes_r + movl wsize(%esp), %eax /* prepare for dist compare */ + negl nbytes_r /* nbytes = -nbytes */ + movl window(%esp), from_r /* from = window */ + + cmpl dist_r, %eax + jb .L_invalid_distance_too_far /* if (dist > wsize) */ + + addl dist_r, nbytes_r /* nbytes = dist - nbytes */ + cmpl $0, write(%esp) + jne .L_wrap_around_window /* if (write != 0) */ + + subl nbytes_r, %eax + addl %eax, from_r /* from += wsize - nbytes */ + + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes, %eax = len + * + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while (--nbytes); + * from = out - dist; + * } + * } + */ +#define len_r %eax + movl len(%esp), len_r + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1 + + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1 + +.L_wrap_around_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes, %eax = write, %eax = len + * + * else if (write < nbytes) { + * from += wsize + write - nbytes; + * nbytes -= write; + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while (--nbytes); + * from = window; + * nbytes = write; + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while(--nbytes); + * from = out - dist; + * } + * } + * } + */ +#define write_r %eax + movl write(%esp), write_r + cmpl write_r, nbytes_r + jbe .L_contiguous_in_window /* if (write >= nbytes) */ + + addl wsize(%esp), from_r + addl write_r, from_r + subl nbytes_r, from_r /* from += wsize + write - nbytes */ + subl write_r, nbytes_r /* nbytes -= write */ +#undef write_r + + movl len(%esp), len_r + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl window(%esp), from_r /* from = window */ + movl write(%esp), nbytes_r /* nbytes = write */ + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1 + +.L_contiguous_in_window: + /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist + * %ecx = nbytes, %eax = write, %eax = len + * + * else { + * from += write - nbytes; + * if (nbytes < len) { + * len -= nbytes; + * do { + * PUP(out) = PUP(from); + * } while (--nbytes); + * from = out - dist; + * } + * } + */ +#define write_r %eax + addl write_r, from_r + subl nbytes_r, from_r /* from += write - nbytes */ +#undef write_r + + movl len(%esp), len_r + cmpl nbytes_r, len_r + jbe .L_do_copy1 /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + +.L_do_copy1: + /* regs: %esi = from, %esi = in, %ebp = hold, %bl = bits, %edi = out + * %eax = len + * + * while (len > 0) { + * PUP(out) = PUP(from); + * len--; + * } + * } + * } while (in < last && out < end); + */ +#undef nbytes_r +#define in_r %esi + movl len_r, %ecx + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + jmp .L_while_test + +#undef len_r +#undef dist_r + +#endif /* NO_MMX || RUN_TIME_MMX */ + + +/*** MMX code ***/ + +#if defined( USE_MMX ) || defined( RUN_TIME_MMX ) + +.align 32,0x90 +.L_init_mmx: + emms + +#undef bits_r +#undef bitslong_r +#define bitslong_r %ebp +#define hold_mm %mm0 + movd %ebp, hold_mm + movl %ebx, bitslong_r + +#define used_mm %mm1 +#define dmask2_mm %mm2 +#define lmask2_mm %mm3 +#define lmask_mm %mm4 +#define dmask_mm %mm5 +#define tmp_mm %mm6 + + movd lmask(%esp), lmask_mm + movq lmask_mm, lmask2_mm + movd dmask(%esp), dmask_mm + movq dmask_mm, dmask2_mm + pxor used_mm, used_mm + movl lcode(%esp), %ebx /* ebx = lcode */ + jmp .L_do_loop_mmx + +.align 32,0x90 +.L_while_test_mmx: + /* while (in < last && out < end) + */ + cmpl out_r, end(%esp) + jbe .L_break_loop /* if (out >= end) */ + + cmpl in_r, last(%esp) + jbe .L_break_loop + +.L_do_loop_mmx: + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + + cmpl $32, bitslong_r + ja .L_get_length_code_mmx /* if (32 < bits) */ + + movd bitslong_r, tmp_mm + movd (in_r), %mm7 + addl $4, in_r + psllq tmp_mm, %mm7 + addl $32, bitslong_r + por %mm7, hold_mm /* hold_mm |= *((uint *)in)++ << bits */ + +.L_get_length_code_mmx: + pand hold_mm, lmask_mm + movd lmask_mm, %eax + movq lmask2_mm, lmask_mm + movl (%ebx,%eax,4), %eax /* eax = lcode[hold & lmask] */ + +.L_dolen_mmx: + movzbl %ah, %ecx /* ecx = this.bits */ + movd %ecx, used_mm + subl %ecx, bitslong_r /* bits -= this.bits */ + + testb %al, %al + jnz .L_test_for_length_base_mmx /* if (op != 0) 45.7% */ + + shrl $16, %eax /* output this.val char */ + stosb + jmp .L_while_test_mmx + +.L_test_for_length_base_mmx: +#define len_r %edx + movl %eax, len_r /* len = this */ + shrl $16, len_r /* len = this.val */ + + testb $16, %al + jz .L_test_for_second_level_length_mmx /* if ((op & 16) == 0) 8% */ + andl $15, %eax /* op &= 15 */ + jz .L_decode_distance_mmx /* if (!op) */ + + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd %eax, used_mm + movd hold_mm, %ecx + subl %eax, bitslong_r + andl .L_mask(,%eax,4), %ecx + addl %ecx, len_r /* len += hold & mask[op] */ + +.L_decode_distance_mmx: + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + + cmpl $32, bitslong_r + ja .L_get_dist_code_mmx /* if (32 < bits) */ + + movd bitslong_r, tmp_mm + movd (in_r), %mm7 + addl $4, in_r + psllq tmp_mm, %mm7 + addl $32, bitslong_r + por %mm7, hold_mm /* hold_mm |= *((uint *)in)++ << bits */ + +.L_get_dist_code_mmx: + movl dcode(%esp), %ebx /* ebx = dcode */ + pand hold_mm, dmask_mm + movd dmask_mm, %eax + movq dmask2_mm, dmask_mm + movl (%ebx,%eax,4), %eax /* eax = dcode[hold & lmask] */ + +.L_dodist_mmx: +#define dist_r %ebx + movzbl %ah, %ecx /* ecx = this.bits */ + movl %eax, dist_r + shrl $16, dist_r /* dist = this.val */ + subl %ecx, bitslong_r /* bits -= this.bits */ + movd %ecx, used_mm + + testb $16, %al /* if ((op & 16) == 0) */ + jz .L_test_for_second_level_dist_mmx + andl $15, %eax /* op &= 15 */ + jz .L_check_dist_one_mmx + +.L_add_bits_to_dist_mmx: + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd %eax, used_mm /* save bit length of current op */ + movd hold_mm, %ecx /* get the next bits on input stream */ + subl %eax, bitslong_r /* bits -= op bits */ + andl .L_mask(,%eax,4), %ecx /* ecx = hold & mask[op] */ + addl %ecx, dist_r /* dist += hold & mask[op] */ + +.L_check_window_mmx: + movl in_r, in(%esp) /* save in so from can use it's reg */ + movl out_r, %eax + subl beg(%esp), %eax /* nbytes = out - beg */ + + cmpl dist_r, %eax + jb .L_clip_window_mmx /* if (dist > nbytes) 4.2% */ + + movl len_r, %ecx + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + + subl $3, %ecx + movb (from_r), %al + movb %al, (out_r) + movb 1(from_r), %al + movb 2(from_r), %dl + addl $3, from_r + movb %al, 1(out_r) + movb %dl, 2(out_r) + addl $3, out_r + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */ + jmp .L_while_test_mmx + +.align 16,0x90 +.L_check_dist_one_mmx: + cmpl $1, dist_r + jne .L_check_window_mmx + cmpl out_r, beg(%esp) + je .L_check_window_mmx + + decl out_r + movl len_r, %ecx + movb (out_r), %al + subl $3, %ecx + + movb %al, 1(out_r) + movb %al, 2(out_r) + movb %al, 3(out_r) + addl $4, out_r + rep stosb + + movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */ + jmp .L_while_test_mmx + +.align 16,0x90 +.L_test_for_second_level_length_mmx: + testb $64, %al + jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */ + + andl $15, %eax + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd hold_mm, %ecx + andl .L_mask(,%eax,4), %ecx + addl len_r, %ecx + movl (%ebx,%ecx,4), %eax /* eax = lcode[hold & lmask] */ + jmp .L_dolen_mmx + +.align 16,0x90 +.L_test_for_second_level_dist_mmx: + testb $64, %al + jnz .L_invalid_distance_code /* if ((op & 64) != 0) */ + + andl $15, %eax + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd hold_mm, %ecx + andl .L_mask(,%eax,4), %ecx + movl dcode(%esp), %eax /* ecx = dcode */ + addl dist_r, %ecx + movl (%eax,%ecx,4), %eax /* eax = lcode[hold & lmask] */ + jmp .L_dodist_mmx + +.align 16,0x90 +.L_clip_window_mmx: +#define nbytes_r %ecx + movl %eax, nbytes_r + movl wsize(%esp), %eax /* prepare for dist compare */ + negl nbytes_r /* nbytes = -nbytes */ + movl window(%esp), from_r /* from = window */ + + cmpl dist_r, %eax + jb .L_invalid_distance_too_far /* if (dist > wsize) */ + + addl dist_r, nbytes_r /* nbytes = dist - nbytes */ + cmpl $0, write(%esp) + jne .L_wrap_around_window_mmx /* if (write != 0) */ + + subl nbytes_r, %eax + addl %eax, from_r /* from += wsize - nbytes */ + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1_mmx + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1_mmx + +.L_wrap_around_window_mmx: +#define write_r %eax + movl write(%esp), write_r + cmpl write_r, nbytes_r + jbe .L_contiguous_in_window_mmx /* if (write >= nbytes) */ + + addl wsize(%esp), from_r + addl write_r, from_r + subl nbytes_r, from_r /* from += wsize + write - nbytes */ + subl write_r, nbytes_r /* nbytes -= write */ +#undef write_r + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl window(%esp), from_r /* from = window */ + movl write(%esp), nbytes_r /* nbytes = write */ + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + jmp .L_do_copy1_mmx + +.L_contiguous_in_window_mmx: +#define write_r %eax + addl write_r, from_r + subl nbytes_r, from_r /* from += write - nbytes */ +#undef write_r + + cmpl nbytes_r, len_r + jbe .L_do_copy1_mmx /* if (nbytes >= len) */ + + subl nbytes_r, len_r /* len -= nbytes */ + rep movsb + movl out_r, from_r + subl dist_r, from_r /* from = out - dist */ + +.L_do_copy1_mmx: +#undef nbytes_r +#define in_r %esi + movl len_r, %ecx + rep movsb + + movl in(%esp), in_r /* move in back to %esi, toss from */ + movl lcode(%esp), %ebx /* move lcode back to %ebx, toss dist */ + jmp .L_while_test_mmx + +#undef hold_r +#undef bitslong_r + +#endif /* USE_MMX || RUN_TIME_MMX */ + + +/*** USE_MMX, NO_MMX, and RUNTIME_MMX from here on ***/ + +.L_invalid_distance_code: + /* else { + * strm->msg = "invalid distance code"; + * state->mode = BAD; + * } + */ + movl $.L_invalid_distance_code_msg, %ecx + movl $INFLATE_MODE_BAD, %edx + jmp .L_update_stream_state + +.L_test_for_end_of_block: + /* else if (op & 32) { + * state->mode = TYPE; + * break; + * } + */ + testb $32, %al + jz .L_invalid_literal_length_code /* if ((op & 32) == 0) */ + + movl $0, %ecx + movl $INFLATE_MODE_TYPE, %edx + jmp .L_update_stream_state + +.L_invalid_literal_length_code: + /* else { + * strm->msg = "invalid literal/length code"; + * state->mode = BAD; + * } + */ + movl $.L_invalid_literal_length_code_msg, %ecx + movl $INFLATE_MODE_BAD, %edx + jmp .L_update_stream_state + +.L_invalid_distance_too_far: + /* strm->msg = "invalid distance too far back"; + * state->mode = BAD; + */ + movl in(%esp), in_r /* from_r has in's reg, put in back */ + movl $.L_invalid_distance_too_far_msg, %ecx + movl $INFLATE_MODE_BAD, %edx + jmp .L_update_stream_state + +.L_update_stream_state: + /* set strm->msg = %ecx, strm->state->mode = %edx */ + movl strm_sp(%esp), %eax + testl %ecx, %ecx /* if (msg != NULL) */ + jz .L_skip_msg + movl %ecx, msg_strm(%eax) /* strm->msg = msg */ +.L_skip_msg: + movl state_strm(%eax), %eax /* state = strm->state */ + movl %edx, mode_state(%eax) /* state->mode = edx (BAD | TYPE) */ + jmp .L_break_loop + +.align 32,0x90 +.L_break_loop: + +/* + * Regs: + * + * bits = %ebp when mmx, and in %ebx when non-mmx + * hold = %hold_mm when mmx, and in %ebp when non-mmx + * in = %esi + * out = %edi + */ + +#if defined( USE_MMX ) || defined( RUN_TIME_MMX ) + +#if defined( RUN_TIME_MMX ) + + cmpl $DO_USE_MMX, inflate_fast_use_mmx + jne .L_update_next_in + +#endif /* RUN_TIME_MMX */ + + movl %ebp, %ebx + +.L_update_next_in: + +#endif + +#define strm_r %eax +#define state_r %edx + + /* len = bits >> 3; + * in -= len; + * bits -= len << 3; + * hold &= (1U << bits) - 1; + * state->hold = hold; + * state->bits = bits; + * strm->next_in = in; + * strm->next_out = out; + */ + movl strm_sp(%esp), strm_r + movl %ebx, %ecx + movl state_strm(strm_r), state_r + shrl $3, %ecx + subl %ecx, in_r + shll $3, %ecx + subl %ecx, %ebx + movl out_r, next_out_strm(strm_r) + movl %ebx, bits_state(state_r) + movl %ebx, %ecx + + leal buf(%esp), %ebx + cmpl %ebx, last(%esp) + jne .L_buf_not_used /* if buf != last */ + + subl %ebx, in_r /* in -= buf */ + movl next_in_strm(strm_r), %ebx + movl %ebx, last(%esp) /* last = strm->next_in */ + addl %ebx, in_r /* in += strm->next_in */ + movl avail_in_strm(strm_r), %ebx + subl $11, %ebx + addl %ebx, last(%esp) /* last = &strm->next_in[ avail_in - 11 ] */ + +.L_buf_not_used: + movl in_r, next_in_strm(strm_r) + + movl $1, %ebx + shll %cl, %ebx + decl %ebx + +#if defined( USE_MMX ) || defined( RUN_TIME_MMX ) + +#if defined( RUN_TIME_MMX ) + + cmpl $DO_USE_MMX, inflate_fast_use_mmx + jne .L_update_hold + +#endif /* RUN_TIME_MMX */ + + psrlq used_mm, hold_mm /* hold_mm >>= last bit length */ + movd hold_mm, %ebp + + emms + +.L_update_hold: + +#endif /* USE_MMX || RUN_TIME_MMX */ + + andl %ebx, %ebp + movl %ebp, hold_state(state_r) + +#define last_r %ebx + + /* strm->avail_in = in < last ? 11 + (last - in) : 11 - (in - last) */ + movl last(%esp), last_r + cmpl in_r, last_r + jbe .L_last_is_smaller /* if (in >= last) */ + + subl in_r, last_r /* last -= in */ + addl $11, last_r /* last += 11 */ + movl last_r, avail_in_strm(strm_r) + jmp .L_fixup_out +.L_last_is_smaller: + subl last_r, in_r /* in -= last */ + negl in_r /* in = -in */ + addl $11, in_r /* in += 11 */ + movl in_r, avail_in_strm(strm_r) + +#undef last_r +#define end_r %ebx + +.L_fixup_out: + /* strm->avail_out = out < end ? 257 + (end - out) : 257 - (out - end)*/ + movl end(%esp), end_r + cmpl out_r, end_r + jbe .L_end_is_smaller /* if (out >= end) */ + + subl out_r, end_r /* end -= out */ + addl $257, end_r /* end += 257 */ + movl end_r, avail_out_strm(strm_r) + jmp .L_done +.L_end_is_smaller: + subl end_r, out_r /* out -= end */ + negl out_r /* out = -out */ + addl $257, out_r /* out += 257 */ + movl out_r, avail_out_strm(strm_r) + +#undef end_r +#undef strm_r +#undef state_r + +.L_done: + addl $local_var_size, %esp + popf + popl %ebx + popl %ebp + popl %esi + popl %edi + ret + +#if defined( GAS_ELF ) +/* elf info */ +.type inflate_fast,@function +.size inflate_fast,.-inflate_fast +#endif diff --git a/compat/zlib/contrib/iostream/test.cpp b/compat/zlib/contrib/iostream/test.cpp new file mode 100644 index 0000000..7d265b3 --- /dev/null +++ b/compat/zlib/contrib/iostream/test.cpp @@ -0,0 +1,24 @@ + +#include "zfstream.h" + +int main() { + + // Construct a stream object with this filebuffer. Anything sent + // to this stream will go to standard out. + gzofstream os( 1, ios::out ); + + // This text is getting compressed and sent to stdout. + // To prove this, run 'test | zcat'. + os << "Hello, Mommy" << endl; + + os << setcompressionlevel( Z_NO_COMPRESSION ); + os << "hello, hello, hi, ho!" << endl; + + setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) + << "I'm compressing again" << endl; + + os.close(); + + return 0; + +} diff --git a/compat/zlib/contrib/iostream/zfstream.cpp b/compat/zlib/contrib/iostream/zfstream.cpp new file mode 100644 index 0000000..d0cd85f --- /dev/null +++ b/compat/zlib/contrib/iostream/zfstream.cpp @@ -0,0 +1,329 @@ + +#include "zfstream.h" + +gzfilebuf::gzfilebuf() : + file(NULL), + mode(0), + own_file_descriptor(0) +{ } + +gzfilebuf::~gzfilebuf() { + + sync(); + if ( own_file_descriptor ) + close(); + +} + +gzfilebuf *gzfilebuf::open( const char *name, + int io_mode ) { + + if ( is_open() ) + return NULL; + + char char_mode[10]; + char *p = char_mode; + + if ( io_mode & ios::in ) { + mode = ios::in; + *p++ = 'r'; + } else if ( io_mode & ios::app ) { + mode = ios::app; + *p++ = 'a'; + } else { + mode = ios::out; + *p++ = 'w'; + } + + if ( io_mode & ios::binary ) { + mode |= ios::binary; + *p++ = 'b'; + } + + // Hard code the compression level + if ( io_mode & (ios::out|ios::app )) { + *p++ = '9'; + } + + // Put the end-of-string indicator + *p = '\0'; + + if ( (file = gzopen(name, char_mode)) == NULL ) + return NULL; + + own_file_descriptor = 1; + + return this; + +} + +gzfilebuf *gzfilebuf::attach( int file_descriptor, + int io_mode ) { + + if ( is_open() ) + return NULL; + + char char_mode[10]; + char *p = char_mode; + + if ( io_mode & ios::in ) { + mode = ios::in; + *p++ = 'r'; + } else if ( io_mode & ios::app ) { + mode = ios::app; + *p++ = 'a'; + } else { + mode = ios::out; + *p++ = 'w'; + } + + if ( io_mode & ios::binary ) { + mode |= ios::binary; + *p++ = 'b'; + } + + // Hard code the compression level + if ( io_mode & (ios::out|ios::app )) { + *p++ = '9'; + } + + // Put the end-of-string indicator + *p = '\0'; + + if ( (file = gzdopen(file_descriptor, char_mode)) == NULL ) + return NULL; + + own_file_descriptor = 0; + + return this; + +} + +gzfilebuf *gzfilebuf::close() { + + if ( is_open() ) { + + sync(); + gzclose( file ); + file = NULL; + + } + + return this; + +} + +int gzfilebuf::setcompressionlevel( int comp_level ) { + + return gzsetparams(file, comp_level, -2); + +} + +int gzfilebuf::setcompressionstrategy( int comp_strategy ) { + + return gzsetparams(file, -2, comp_strategy); + +} + + +streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int which ) { + + return streampos(EOF); + +} + +int gzfilebuf::underflow() { + + // If the file hasn't been opened for reading, error. + if ( !is_open() || !(mode & ios::in) ) + return EOF; + + // if a buffer doesn't exists, allocate one. + if ( !base() ) { + + if ( (allocate()) == EOF ) + return EOF; + setp(0,0); + + } else { + + if ( in_avail() ) + return (unsigned char) *gptr(); + + if ( out_waiting() ) { + if ( flushbuf() == EOF ) + return EOF; + } + + } + + // Attempt to fill the buffer. + + int result = fillbuf(); + if ( result == EOF ) { + // disable get area + setg(0,0,0); + return EOF; + } + + return (unsigned char) *gptr(); + +} + +int gzfilebuf::overflow( int c ) { + + if ( !is_open() || !(mode & ios::out) ) + return EOF; + + if ( !base() ) { + if ( allocate() == EOF ) + return EOF; + setg(0,0,0); + } else { + if (in_avail()) { + return EOF; + } + if (out_waiting()) { + if (flushbuf() == EOF) + return EOF; + } + } + + int bl = blen(); + setp( base(), base() + bl); + + if ( c != EOF ) { + + *pptr() = c; + pbump(1); + + } + + return 0; + +} + +int gzfilebuf::sync() { + + if ( !is_open() ) + return EOF; + + if ( out_waiting() ) + return flushbuf(); + + return 0; + +} + +int gzfilebuf::flushbuf() { + + int n; + char *q; + + q = pbase(); + n = pptr() - q; + + if ( gzwrite( file, q, n) < n ) + return EOF; + + setp(0,0); + + return 0; + +} + +int gzfilebuf::fillbuf() { + + int required; + char *p; + + p = base(); + + required = blen(); + + int t = gzread( file, p, required ); + + if ( t <= 0) return EOF; + + setg( base(), base(), base()+t); + + return t; + +} + +gzfilestream_common::gzfilestream_common() : + ios( gzfilestream_common::rdbuf() ) +{ } + +gzfilestream_common::~gzfilestream_common() +{ } + +void gzfilestream_common::attach( int fd, int io_mode ) { + + if ( !buffer.attach( fd, io_mode) ) + clear( ios::failbit | ios::badbit ); + else + clear(); + +} + +void gzfilestream_common::open( const char *name, int io_mode ) { + + if ( !buffer.open( name, io_mode ) ) + clear( ios::failbit | ios::badbit ); + else + clear(); + +} + +void gzfilestream_common::close() { + + if ( !buffer.close() ) + clear( ios::failbit | ios::badbit ); + +} + +gzfilebuf *gzfilestream_common::rdbuf() +{ + return &buffer; +} + +gzifstream::gzifstream() : + ios( gzfilestream_common::rdbuf() ) +{ + clear( ios::badbit ); +} + +gzifstream::gzifstream( const char *name, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::open( name, io_mode ); +} + +gzifstream::gzifstream( int fd, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::attach( fd, io_mode ); +} + +gzifstream::~gzifstream() { } + +gzofstream::gzofstream() : + ios( gzfilestream_common::rdbuf() ) +{ + clear( ios::badbit ); +} + +gzofstream::gzofstream( const char *name, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::open( name, io_mode ); +} + +gzofstream::gzofstream( int fd, int io_mode ) : + ios( gzfilestream_common::rdbuf() ) +{ + gzfilestream_common::attach( fd, io_mode ); +} + +gzofstream::~gzofstream() { } diff --git a/compat/zlib/contrib/iostream/zfstream.h b/compat/zlib/contrib/iostream/zfstream.h new file mode 100644 index 0000000..ed79098 --- /dev/null +++ b/compat/zlib/contrib/iostream/zfstream.h @@ -0,0 +1,128 @@ + +#ifndef zfstream_h +#define zfstream_h + +#include +#include "zlib.h" + +class gzfilebuf : public streambuf { + +public: + + gzfilebuf( ); + virtual ~gzfilebuf(); + + gzfilebuf *open( const char *name, int io_mode ); + gzfilebuf *attach( int file_descriptor, int io_mode ); + gzfilebuf *close(); + + int setcompressionlevel( int comp_level ); + int setcompressionstrategy( int comp_strategy ); + + inline int is_open() const { return (file !=NULL); } + + virtual streampos seekoff( streamoff, ios::seek_dir, int ); + + virtual int sync(); + +protected: + + virtual int underflow(); + virtual int overflow( int = EOF ); + +private: + + gzFile file; + short mode; + short own_file_descriptor; + + int flushbuf(); + int fillbuf(); + +}; + +class gzfilestream_common : virtual public ios { + + friend class gzifstream; + friend class gzofstream; + friend gzofstream &setcompressionlevel( gzofstream &, int ); + friend gzofstream &setcompressionstrategy( gzofstream &, int ); + +public: + virtual ~gzfilestream_common(); + + void attach( int fd, int io_mode ); + void open( const char *name, int io_mode ); + void close(); + +protected: + gzfilestream_common(); + +private: + gzfilebuf *rdbuf(); + + gzfilebuf buffer; + +}; + +class gzifstream : public gzfilestream_common, public istream { + +public: + + gzifstream(); + gzifstream( const char *name, int io_mode = ios::in ); + gzifstream( int fd, int io_mode = ios::in ); + + virtual ~gzifstream(); + +}; + +class gzofstream : public gzfilestream_common, public ostream { + +public: + + gzofstream(); + gzofstream( const char *name, int io_mode = ios::out ); + gzofstream( int fd, int io_mode = ios::out ); + + virtual ~gzofstream(); + +}; + +template class gzomanip { + friend gzofstream &operator<<(gzofstream &, const gzomanip &); +public: + gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { } +private: + gzofstream &(*func)(gzofstream &, T); + T val; +}; + +template gzofstream &operator<<(gzofstream &s, const gzomanip &m) +{ + return (*m.func)(s, m.val); +} + +inline gzofstream &setcompressionlevel( gzofstream &s, int l ) +{ + (s.rdbuf())->setcompressionlevel(l); + return s; +} + +inline gzofstream &setcompressionstrategy( gzofstream &s, int l ) +{ + (s.rdbuf())->setcompressionstrategy(l); + return s; +} + +inline gzomanip setcompressionlevel(int l) +{ + return gzomanip(&setcompressionlevel,l); +} + +inline gzomanip setcompressionstrategy(int l) +{ + return gzomanip(&setcompressionstrategy,l); +} + +#endif diff --git a/compat/zlib/contrib/iostream2/zstream.h b/compat/zlib/contrib/iostream2/zstream.h new file mode 100644 index 0000000..29edb2a --- /dev/null +++ b/compat/zlib/contrib/iostream2/zstream.h @@ -0,0 +1,307 @@ +/* + * + * Copyright (c) 1997 + * Christian Michelsen Research AS + * Advanced Computing + * Fantoftvegen 38, 5036 BERGEN, Norway + * http://www.cmr.no + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Christian Michelsen Research AS makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef ZSTREAM__H +#define ZSTREAM__H + +/* + * zstream.h - C++ interface to the 'zlib' general purpose compression library + * $Id: zstream.h,v 1.1 2008/12/19 14:44:49 dkf Exp $ + */ + +#include +#include +#include +#include "zlib.h" + +#if defined(_WIN32) +# include +# include +# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +#else +# define SET_BINARY_MODE(file) +#endif + +class zstringlen { +public: + zstringlen(class izstream&); + zstringlen(class ozstream&, const char*); + size_t value() const { return val.word; } +private: + struct Val { unsigned char byte; size_t word; } val; +}; + +// ----------------------------- izstream ----------------------------- + +class izstream +{ + public: + izstream() : m_fp(0) {} + izstream(FILE* fp) : m_fp(0) { open(fp); } + izstream(const char* name) : m_fp(0) { open(name); } + ~izstream() { close(); } + + /* Opens a gzip (.gz) file for reading. + * open() can be used to read a file which is not in gzip format; + * in this case read() will directly read from the file without + * decompression. errno can be checked to distinguish two error + * cases (if errno is zero, the zlib error is Z_MEM_ERROR). + */ + void open(const char* name) { + if (m_fp) close(); + m_fp = ::gzopen(name, "rb"); + } + + void open(FILE* fp) { + SET_BINARY_MODE(fp); + if (m_fp) close(); + m_fp = ::gzdopen(fileno(fp), "rb"); + } + + /* Flushes all pending input if necessary, closes the compressed file + * and deallocates all the (de)compression state. The return value is + * the zlib error number (see function error() below). + */ + int close() { + int r = ::gzclose(m_fp); + m_fp = 0; return r; + } + + /* Binary read the given number of bytes from the compressed file. + */ + int read(void* buf, size_t len) { + return ::gzread(m_fp, buf, len); + } + + /* Returns the error message for the last error which occurred on the + * given compressed file. errnum is set to zlib error number. If an + * error occurred in the file system and not in the compression library, + * errnum is set to Z_ERRNO and the application may consult errno + * to get the exact error code. + */ + const char* error(int* errnum) { + return ::gzerror(m_fp, errnum); + } + + gzFile fp() { return m_fp; } + + private: + gzFile m_fp; +}; + +/* + * Binary read the given (array of) object(s) from the compressed file. + * If the input file was not in gzip format, read() copies the objects number + * of bytes into the buffer. + * returns the number of uncompressed bytes actually read + * (0 for end of file, -1 for error). + */ +template +inline int read(izstream& zs, T* x, Items items) { + return ::gzread(zs.fp(), x, items*sizeof(T)); +} + +/* + * Binary input with the '>' operator. + */ +template +inline izstream& operator>(izstream& zs, T& x) { + ::gzread(zs.fp(), &x, sizeof(T)); + return zs; +} + + +inline zstringlen::zstringlen(izstream& zs) { + zs > val.byte; + if (val.byte == 255) zs > val.word; + else val.word = val.byte; +} + +/* + * Read length of string + the string with the '>' operator. + */ +inline izstream& operator>(izstream& zs, char* x) { + zstringlen len(zs); + ::gzread(zs.fp(), x, len.value()); + x[len.value()] = '\0'; + return zs; +} + +inline char* read_string(izstream& zs) { + zstringlen len(zs); + char* x = new char[len.value()+1]; + ::gzread(zs.fp(), x, len.value()); + x[len.value()] = '\0'; + return x; +} + +// ----------------------------- ozstream ----------------------------- + +class ozstream +{ + public: + ozstream() : m_fp(0), m_os(0) { + } + ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION) + : m_fp(0), m_os(0) { + open(fp, level); + } + ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION) + : m_fp(0), m_os(0) { + open(name, level); + } + ~ozstream() { + close(); + } + + /* Opens a gzip (.gz) file for writing. + * The compression level parameter should be in 0..9 + * errno can be checked to distinguish two error cases + * (if errno is zero, the zlib error is Z_MEM_ERROR). + */ + void open(const char* name, int level = Z_DEFAULT_COMPRESSION) { + char mode[4] = "wb\0"; + if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level; + if (m_fp) close(); + m_fp = ::gzopen(name, mode); + } + + /* open from a FILE pointer. + */ + void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) { + SET_BINARY_MODE(fp); + char mode[4] = "wb\0"; + if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level; + if (m_fp) close(); + m_fp = ::gzdopen(fileno(fp), mode); + } + + /* Flushes all pending output if necessary, closes the compressed file + * and deallocates all the (de)compression state. The return value is + * the zlib error number (see function error() below). + */ + int close() { + if (m_os) { + ::gzwrite(m_fp, m_os->str(), m_os->pcount()); + delete[] m_os->str(); delete m_os; m_os = 0; + } + int r = ::gzclose(m_fp); m_fp = 0; return r; + } + + /* Binary write the given number of bytes into the compressed file. + */ + int write(const void* buf, size_t len) { + return ::gzwrite(m_fp, (voidp) buf, len); + } + + /* Flushes all pending output into the compressed file. The parameter + * _flush is as in the deflate() function. The return value is the zlib + * error number (see function gzerror below). flush() returns Z_OK if + * the flush_ parameter is Z_FINISH and all output could be flushed. + * flush() should be called only when strictly necessary because it can + * degrade compression. + */ + int flush(int _flush) { + os_flush(); + return ::gzflush(m_fp, _flush); + } + + /* Returns the error message for the last error which occurred on the + * given compressed file. errnum is set to zlib error number. If an + * error occurred in the file system and not in the compression library, + * errnum is set to Z_ERRNO and the application may consult errno + * to get the exact error code. + */ + const char* error(int* errnum) { + return ::gzerror(m_fp, errnum); + } + + gzFile fp() { return m_fp; } + + ostream& os() { + if (m_os == 0) m_os = new ostrstream; + return *m_os; + } + + void os_flush() { + if (m_os && m_os->pcount()>0) { + ostrstream* oss = new ostrstream; + oss->fill(m_os->fill()); + oss->flags(m_os->flags()); + oss->precision(m_os->precision()); + oss->width(m_os->width()); + ::gzwrite(m_fp, m_os->str(), m_os->pcount()); + delete[] m_os->str(); delete m_os; m_os = oss; + } + } + + private: + gzFile m_fp; + ostrstream* m_os; +}; + +/* + * Binary write the given (array of) object(s) into the compressed file. + * returns the number of uncompressed bytes actually written + * (0 in case of error). + */ +template +inline int write(ozstream& zs, const T* x, Items items) { + return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T)); +} + +/* + * Binary output with the '<' operator. + */ +template +inline ozstream& operator<(ozstream& zs, const T& x) { + ::gzwrite(zs.fp(), (voidp) &x, sizeof(T)); + return zs; +} + +inline zstringlen::zstringlen(ozstream& zs, const char* x) { + val.byte = 255; val.word = ::strlen(x); + if (val.word < 255) zs < (val.byte = val.word); + else zs < val; +} + +/* + * Write length of string + the string with the '<' operator. + */ +inline ozstream& operator<(ozstream& zs, const char* x) { + zstringlen len(zs, x); + ::gzwrite(zs.fp(), (voidp) x, len.value()); + return zs; +} + +#ifdef _MSC_VER +inline ozstream& operator<(ozstream& zs, char* const& x) { + return zs < (const char*) x; +} +#endif + +/* + * Ascii write with the << operator; + */ +template +inline ostream& operator<<(ozstream& zs, const T& x) { + zs.os_flush(); + return zs.os() << x; +} + +#endif diff --git a/compat/zlib/contrib/iostream2/zstream_test.cpp b/compat/zlib/contrib/iostream2/zstream_test.cpp new file mode 100644 index 0000000..6273f62 --- /dev/null +++ b/compat/zlib/contrib/iostream2/zstream_test.cpp @@ -0,0 +1,25 @@ +#include "zstream.h" +#include +#include +#include + +void main() { + char h[256] = "Hello"; + char* g = "Goodbye"; + ozstream out("temp.gz"); + out < "This works well" < h < g; + out.close(); + + izstream in("temp.gz"); // read it back + char *x = read_string(in), *y = new char[256], z[256]; + in > y > z; + in.close(); + cout << x << endl << y << endl << z << endl; + + out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results + out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; + out << z << endl << y << endl << x << endl; + out << 1.1234567890123456789 << endl; + + delete[] x; delete[] y; +} diff --git a/compat/zlib/contrib/iostream3/README b/compat/zlib/contrib/iostream3/README new file mode 100644 index 0000000..f7b319a --- /dev/null +++ b/compat/zlib/contrib/iostream3/README @@ -0,0 +1,35 @@ +These classes provide a C++ stream interface to the zlib library. It allows you +to do things like: + + gzofstream outf("blah.gz"); + outf << "These go into the gzip file " << 123 << endl; + +It does this by deriving a specialized stream buffer for gzipped files, which is +the way Stroustrup would have done it. :-> + +The gzifstream and gzofstream classes were originally written by Kevin Ruland +and made available in the zlib contrib/iostream directory. The older version still +compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of +this version. + +The new classes are as standard-compliant as possible, closely following the +approach of the standard library's fstream classes. It compiles under gcc versions +3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard +library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs +from the previous one in the following respects: +- added showmanyc +- added setbuf, with support for unbuffered output via setbuf(0,0) +- a few bug fixes of stream behavior +- gzipped output file opened with default compression level instead of maximum level +- setcompressionlevel()/strategy() members replaced by single setcompression() + +The code is provided "as is", with the permission to use, copy, modify, distribute +and sell it for any purpose without fee. + +Ludwig Schwardt + + +DSP Lab +Electrical & Electronic Engineering Department +University of Stellenbosch +South Africa diff --git a/compat/zlib/contrib/iostream3/TODO b/compat/zlib/contrib/iostream3/TODO new file mode 100644 index 0000000..7032f97 --- /dev/null +++ b/compat/zlib/contrib/iostream3/TODO @@ -0,0 +1,17 @@ +Possible upgrades to gzfilebuf: + +- The ability to do putback (e.g. putbackfail) + +- The ability to seek (zlib supports this, but could be slow/tricky) + +- Simultaneous read/write access (does it make sense?) + +- Support for ios_base::ate open mode + +- Locale support? + +- Check public interface to see which calls give problems + (due to dependence on library internals) + +- Override operator<<(ostream&, gzfilebuf*) to allow direct copying + of stream buffer to stream ( i.e. os << is.rdbuf(); ) diff --git a/compat/zlib/contrib/iostream3/test.cc b/compat/zlib/contrib/iostream3/test.cc new file mode 100644 index 0000000..9423533 --- /dev/null +++ b/compat/zlib/contrib/iostream3/test.cc @@ -0,0 +1,50 @@ +/* + * Test program for gzifstream and gzofstream + * + * by Ludwig Schwardt + * original version by Kevin Ruland + */ + +#include "zfstream.h" +#include // for cout + +int main() { + + gzofstream outf; + gzifstream inf; + char buf[80]; + + outf.open("test1.txt.gz"); + outf << "The quick brown fox sidestepped the lazy canine\n" + << 1.3 << "\nPlan " << 9 << std::endl; + outf.close(); + std::cout << "Wrote the following message to 'test1.txt.gz' (check with zcat or zless):\n" + << "The quick brown fox sidestepped the lazy canine\n" + << 1.3 << "\nPlan " << 9 << std::endl; + + std::cout << "\nReading 'test1.txt.gz' (buffered) produces:\n"; + inf.open("test1.txt.gz"); + while (inf.getline(buf,80,'\n')) { + std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n"; + } + inf.close(); + + outf.rdbuf()->pubsetbuf(0,0); + outf.open("test2.txt.gz"); + outf << setcompression(Z_NO_COMPRESSION) + << "The quick brown fox sidestepped the lazy canine\n" + << 1.3 << "\nPlan " << 9 << std::endl; + outf.close(); + std::cout << "\nWrote the same message to 'test2.txt.gz' in uncompressed form"; + + std::cout << "\nReading 'test2.txt.gz' (unbuffered) produces:\n"; + inf.rdbuf()->pubsetbuf(0,0); + inf.open("test2.txt.gz"); + while (inf.getline(buf,80,'\n')) { + std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n"; + } + inf.close(); + + return 0; + +} diff --git a/compat/zlib/contrib/iostream3/zfstream.cc b/compat/zlib/contrib/iostream3/zfstream.cc new file mode 100644 index 0000000..94eb933 --- /dev/null +++ b/compat/zlib/contrib/iostream3/zfstream.cc @@ -0,0 +1,479 @@ +/* + * A C++ I/O streams interface to the zlib gz* functions + * + * by Ludwig Schwardt + * original version by Kevin Ruland + * + * This version is standard-compliant and compatible with gcc 3.x. + */ + +#include "zfstream.h" +#include // for strcpy, strcat, strlen (mode strings) +#include // for BUFSIZ + +// Internal buffer sizes (default and "unbuffered" versions) +#define BIGBUFSIZE BUFSIZ +#define SMALLBUFSIZE 1 + +/*****************************************************************************/ + +// Default constructor +gzfilebuf::gzfilebuf() +: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false), + buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true) +{ + // No buffers to start with + this->disable_buffer(); +} + +// Destructor +gzfilebuf::~gzfilebuf() +{ + // Sync output buffer and close only if responsible for file + // (i.e. attached streams should be left open at this stage) + this->sync(); + if (own_fd) + this->close(); + // Make sure internal buffer is deallocated + this->disable_buffer(); +} + +// Set compression level and strategy +int +gzfilebuf::setcompression(int comp_level, + int comp_strategy) +{ + return gzsetparams(file, comp_level, comp_strategy); +} + +// Open gzipped file +gzfilebuf* +gzfilebuf::open(const char *name, + std::ios_base::openmode mode) +{ + // Fail if file already open + if (this->is_open()) + return NULL; + // Don't support simultaneous read/write access (yet) + if ((mode & std::ios_base::in) && (mode & std::ios_base::out)) + return NULL; + + // Build mode string for gzopen and check it [27.8.1.3.2] + char char_mode[6] = "\0\0\0\0\0"; + if (!this->open_mode(mode, char_mode)) + return NULL; + + // Attempt to open file + if ((file = gzopen(name, char_mode)) == NULL) + return NULL; + + // On success, allocate internal buffer and set flags + this->enable_buffer(); + io_mode = mode; + own_fd = true; + return this; +} + +// Attach to gzipped file +gzfilebuf* +gzfilebuf::attach(int fd, + std::ios_base::openmode mode) +{ + // Fail if file already open + if (this->is_open()) + return NULL; + // Don't support simultaneous read/write access (yet) + if ((mode & std::ios_base::in) && (mode & std::ios_base::out)) + return NULL; + + // Build mode string for gzdopen and check it [27.8.1.3.2] + char char_mode[6] = "\0\0\0\0\0"; + if (!this->open_mode(mode, char_mode)) + return NULL; + + // Attempt to attach to file + if ((file = gzdopen(fd, char_mode)) == NULL) + return NULL; + + // On success, allocate internal buffer and set flags + this->enable_buffer(); + io_mode = mode; + own_fd = false; + return this; +} + +// Close gzipped file +gzfilebuf* +gzfilebuf::close() +{ + // Fail immediately if no file is open + if (!this->is_open()) + return NULL; + // Assume success + gzfilebuf* retval = this; + // Attempt to sync and close gzipped file + if (this->sync() == -1) + retval = NULL; + if (gzclose(file) < 0) + retval = NULL; + // File is now gone anyway (postcondition [27.8.1.3.8]) + file = NULL; + own_fd = false; + // Destroy internal buffer if it exists + this->disable_buffer(); + return retval; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +// Convert int open mode to mode string +bool +gzfilebuf::open_mode(std::ios_base::openmode mode, + char* c_mode) const +{ + bool testb = mode & std::ios_base::binary; + bool testi = mode & std::ios_base::in; + bool testo = mode & std::ios_base::out; + bool testt = mode & std::ios_base::trunc; + bool testa = mode & std::ios_base::app; + + // Check for valid flag combinations - see [27.8.1.3.2] (Table 92) + // Original zfstream hardcoded the compression level to maximum here... + // Double the time for less than 1% size improvement seems + // excessive though - keeping it at the default level + // To change back, just append "9" to the next three mode strings + if (!testi && testo && !testt && !testa) + strcpy(c_mode, "w"); + if (!testi && testo && !testt && testa) + strcpy(c_mode, "a"); + if (!testi && testo && testt && !testa) + strcpy(c_mode, "w"); + if (testi && !testo && !testt && !testa) + strcpy(c_mode, "r"); + // No read/write mode yet +// if (testi && testo && !testt && !testa) +// strcpy(c_mode, "r+"); +// if (testi && testo && testt && !testa) +// strcpy(c_mode, "w+"); + + // Mode string should be empty for invalid combination of flags + if (strlen(c_mode) == 0) + return false; + if (testb) + strcat(c_mode, "b"); + return true; +} + +// Determine number of characters in internal get buffer +std::streamsize +gzfilebuf::showmanyc() +{ + // Calls to underflow will fail if file not opened for reading + if (!this->is_open() || !(io_mode & std::ios_base::in)) + return -1; + // Make sure get area is in use + if (this->gptr() && (this->gptr() < this->egptr())) + return std::streamsize(this->egptr() - this->gptr()); + else + return 0; +} + +// Fill get area from gzipped file +gzfilebuf::int_type +gzfilebuf::underflow() +{ + // If something is left in the get area by chance, return it + // (this shouldn't normally happen, as underflow is only supposed + // to be called when gptr >= egptr, but it serves as error check) + if (this->gptr() && (this->gptr() < this->egptr())) + return traits_type::to_int_type(*(this->gptr())); + + // If the file hasn't been opened for reading, produce error + if (!this->is_open() || !(io_mode & std::ios_base::in)) + return traits_type::eof(); + + // Attempt to fill internal buffer from gzipped file + // (buffer must be guaranteed to exist...) + int bytes_read = gzread(file, buffer, buffer_size); + // Indicates error or EOF + if (bytes_read <= 0) + { + // Reset get area + this->setg(buffer, buffer, buffer); + return traits_type::eof(); + } + // Make all bytes read from file available as get area + this->setg(buffer, buffer, buffer + bytes_read); + + // Return next character in get area + return traits_type::to_int_type(*(this->gptr())); +} + +// Write put area to gzipped file +gzfilebuf::int_type +gzfilebuf::overflow(int_type c) +{ + // Determine whether put area is in use + if (this->pbase()) + { + // Double-check pointer range + if (this->pptr() > this->epptr() || this->pptr() < this->pbase()) + return traits_type::eof(); + // Add extra character to buffer if not EOF + if (!traits_type::eq_int_type(c, traits_type::eof())) + { + *(this->pptr()) = traits_type::to_char_type(c); + this->pbump(1); + } + // Number of characters to write to file + int bytes_to_write = this->pptr() - this->pbase(); + // Overflow doesn't fail if nothing is to be written + if (bytes_to_write > 0) + { + // If the file hasn't been opened for writing, produce error + if (!this->is_open() || !(io_mode & std::ios_base::out)) + return traits_type::eof(); + // If gzipped file won't accept all bytes written to it, fail + if (gzwrite(file, this->pbase(), bytes_to_write) != bytes_to_write) + return traits_type::eof(); + // Reset next pointer to point to pbase on success + this->pbump(-bytes_to_write); + } + } + // Write extra character to file if not EOF + else if (!traits_type::eq_int_type(c, traits_type::eof())) + { + // If the file hasn't been opened for writing, produce error + if (!this->is_open() || !(io_mode & std::ios_base::out)) + return traits_type::eof(); + // Impromptu char buffer (allows "unbuffered" output) + char_type last_char = traits_type::to_char_type(c); + // If gzipped file won't accept this character, fail + if (gzwrite(file, &last_char, 1) != 1) + return traits_type::eof(); + } + + // If you got here, you have succeeded (even if c was EOF) + // The return value should therefore be non-EOF + if (traits_type::eq_int_type(c, traits_type::eof())) + return traits_type::not_eof(c); + else + return c; +} + +// Assign new buffer +std::streambuf* +gzfilebuf::setbuf(char_type* p, + std::streamsize n) +{ + // First make sure stuff is sync'ed, for safety + if (this->sync() == -1) + return NULL; + // If buffering is turned off on purpose via setbuf(0,0), still allocate one... + // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at + // least a buffer of size 1 (very inefficient though, therefore make it bigger?) + // This follows from [27.5.2.4.3]/12 (gptr needs to point at something, it seems) + if (!p || !n) + { + // Replace existing buffer (if any) with small internal buffer + this->disable_buffer(); + buffer = NULL; + buffer_size = 0; + own_buffer = true; + this->enable_buffer(); + } + else + { + // Replace existing buffer (if any) with external buffer + this->disable_buffer(); + buffer = p; + buffer_size = n; + own_buffer = false; + this->enable_buffer(); + } + return this; +} + +// Write put area to gzipped file (i.e. ensures that put area is empty) +int +gzfilebuf::sync() +{ + return traits_type::eq_int_type(this->overflow(), traits_type::eof()) ? -1 : 0; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +// Allocate internal buffer +void +gzfilebuf::enable_buffer() +{ + // If internal buffer required, allocate one + if (own_buffer && !buffer) + { + // Check for buffered vs. "unbuffered" + if (buffer_size > 0) + { + // Allocate internal buffer + buffer = new char_type[buffer_size]; + // Get area starts empty and will be expanded by underflow as need arises + this->setg(buffer, buffer, buffer); + // Setup entire internal buffer as put area. + // The one-past-end pointer actually points to the last element of the buffer, + // so that overflow(c) can safely add the extra character c to the sequence. + // These pointers remain in place for the duration of the buffer + this->setp(buffer, buffer + buffer_size - 1); + } + else + { + // Even in "unbuffered" case, (small?) get buffer is still required + buffer_size = SMALLBUFSIZE; + buffer = new char_type[buffer_size]; + this->setg(buffer, buffer, buffer); + // "Unbuffered" means no put buffer + this->setp(0, 0); + } + } + else + { + // If buffer already allocated, reset buffer pointers just to make sure no + // stale chars are lying around + this->setg(buffer, buffer, buffer); + this->setp(buffer, buffer + buffer_size - 1); + } +} + +// Destroy internal buffer +void +gzfilebuf::disable_buffer() +{ + // If internal buffer exists, deallocate it + if (own_buffer && buffer) + { + // Preserve unbuffered status by zeroing size + if (!this->pbase()) + buffer_size = 0; + delete[] buffer; + buffer = NULL; + this->setg(0, 0, 0); + this->setp(0, 0); + } + else + { + // Reset buffer pointers to initial state if external buffer exists + this->setg(buffer, buffer, buffer); + if (buffer) + this->setp(buffer, buffer + buffer_size - 1); + else + this->setp(0, 0); + } +} + +/*****************************************************************************/ + +// Default constructor initializes stream buffer +gzifstream::gzifstream() +: std::istream(NULL), sb() +{ this->init(&sb); } + +// Initialize stream buffer and open file +gzifstream::gzifstream(const char* name, + std::ios_base::openmode mode) +: std::istream(NULL), sb() +{ + this->init(&sb); + this->open(name, mode); +} + +// Initialize stream buffer and attach to file +gzifstream::gzifstream(int fd, + std::ios_base::openmode mode) +: std::istream(NULL), sb() +{ + this->init(&sb); + this->attach(fd, mode); +} + +// Open file and go into fail() state if unsuccessful +void +gzifstream::open(const char* name, + std::ios_base::openmode mode) +{ + if (!sb.open(name, mode | std::ios_base::in)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Attach to file and go into fail() state if unsuccessful +void +gzifstream::attach(int fd, + std::ios_base::openmode mode) +{ + if (!sb.attach(fd, mode | std::ios_base::in)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Close file +void +gzifstream::close() +{ + if (!sb.close()) + this->setstate(std::ios_base::failbit); +} + +/*****************************************************************************/ + +// Default constructor initializes stream buffer +gzofstream::gzofstream() +: std::ostream(NULL), sb() +{ this->init(&sb); } + +// Initialize stream buffer and open file +gzofstream::gzofstream(const char* name, + std::ios_base::openmode mode) +: std::ostream(NULL), sb() +{ + this->init(&sb); + this->open(name, mode); +} + +// Initialize stream buffer and attach to file +gzofstream::gzofstream(int fd, + std::ios_base::openmode mode) +: std::ostream(NULL), sb() +{ + this->init(&sb); + this->attach(fd, mode); +} + +// Open file and go into fail() state if unsuccessful +void +gzofstream::open(const char* name, + std::ios_base::openmode mode) +{ + if (!sb.open(name, mode | std::ios_base::out)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Attach to file and go into fail() state if unsuccessful +void +gzofstream::attach(int fd, + std::ios_base::openmode mode) +{ + if (!sb.attach(fd, mode | std::ios_base::out)) + this->setstate(std::ios_base::failbit); + else + this->clear(); +} + +// Close file +void +gzofstream::close() +{ + if (!sb.close()) + this->setstate(std::ios_base::failbit); +} diff --git a/compat/zlib/contrib/iostream3/zfstream.h b/compat/zlib/contrib/iostream3/zfstream.h new file mode 100644 index 0000000..8574479 --- /dev/null +++ b/compat/zlib/contrib/iostream3/zfstream.h @@ -0,0 +1,466 @@ +/* + * A C++ I/O streams interface to the zlib gz* functions + * + * by Ludwig Schwardt + * original version by Kevin Ruland + * + * This version is standard-compliant and compatible with gcc 3.x. + */ + +#ifndef ZFSTREAM_H +#define ZFSTREAM_H + +#include // not iostream, since we don't need cin/cout +#include +#include "zlib.h" + +/*****************************************************************************/ + +/** + * @brief Gzipped file stream buffer class. + * + * This class implements basic_filebuf for gzipped files. It doesn't yet support + * seeking (allowed by zlib but slow/limited), putback and read/write access + * (tricky). Otherwise, it attempts to be a drop-in replacement for the standard + * file streambuf. +*/ +class gzfilebuf : public std::streambuf +{ +public: + // Default constructor. + gzfilebuf(); + + // Destructor. + virtual + ~gzfilebuf(); + + /** + * @brief Set compression level and strategy on the fly. + * @param comp_level Compression level (see zlib.h for allowed values) + * @param comp_strategy Compression strategy (see zlib.h for allowed values) + * @return Z_OK on success, Z_STREAM_ERROR otherwise. + * + * Unfortunately, these parameters cannot be modified separately, as the + * previous zfstream version assumed. Since the strategy is seldom changed, + * it can default and setcompression(level) then becomes like the old + * setcompressionlevel(level). + */ + int + setcompression(int comp_level, + int comp_strategy = Z_DEFAULT_STRATEGY); + + /** + * @brief Check if file is open. + * @return True if file is open. + */ + bool + is_open() const { return (file != NULL); } + + /** + * @brief Open gzipped file. + * @param name File name. + * @param mode Open mode flags. + * @return @c this on success, NULL on failure. + */ + gzfilebuf* + open(const char* name, + std::ios_base::openmode mode); + + /** + * @brief Attach to already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags. + * @return @c this on success, NULL on failure. + */ + gzfilebuf* + attach(int fd, + std::ios_base::openmode mode); + + /** + * @brief Close gzipped file. + * @return @c this on success, NULL on failure. + */ + gzfilebuf* + close(); + +protected: + /** + * @brief Convert ios open mode int to mode string used by zlib. + * @return True if valid mode flag combination. + */ + bool + open_mode(std::ios_base::openmode mode, + char* c_mode) const; + + /** + * @brief Number of characters available in stream buffer. + * @return Number of characters. + * + * This indicates number of characters in get area of stream buffer. + * These characters can be read without accessing the gzipped file. + */ + virtual std::streamsize + showmanyc(); + + /** + * @brief Fill get area from gzipped file. + * @return First character in get area on success, EOF on error. + * + * This actually reads characters from gzipped file to stream + * buffer. Always buffered. + */ + virtual int_type + underflow(); + + /** + * @brief Write put area to gzipped file. + * @param c Extra character to add to buffer contents. + * @return Non-EOF on success, EOF on error. + * + * This actually writes characters in stream buffer to + * gzipped file. With unbuffered output this is done one + * character at a time. + */ + virtual int_type + overflow(int_type c = traits_type::eof()); + + /** + * @brief Installs external stream buffer. + * @param p Pointer to char buffer. + * @param n Size of external buffer. + * @return @c this on success, NULL on failure. + * + * Call setbuf(0,0) to enable unbuffered output. + */ + virtual std::streambuf* + setbuf(char_type* p, + std::streamsize n); + + /** + * @brief Flush stream buffer to file. + * @return 0 on success, -1 on error. + * + * This calls underflow(EOF) to do the job. + */ + virtual int + sync(); + +// +// Some future enhancements +// +// virtual int_type uflow(); +// virtual int_type pbackfail(int_type c = traits_type::eof()); +// virtual pos_type +// seekoff(off_type off, +// std::ios_base::seekdir way, +// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out); +// virtual pos_type +// seekpos(pos_type sp, +// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out); + +private: + /** + * @brief Allocate internal buffer. + * + * This function is safe to call multiple times. It will ensure + * that a proper internal buffer exists if it is required. If the + * buffer already exists or is external, the buffer pointers will be + * reset to their original state. + */ + void + enable_buffer(); + + /** + * @brief Destroy internal buffer. + * + * This function is safe to call multiple times. It will ensure + * that the internal buffer is deallocated if it exists. In any + * case, it will also reset the buffer pointers. + */ + void + disable_buffer(); + + /** + * Underlying file pointer. + */ + gzFile file; + + /** + * Mode in which file was opened. + */ + std::ios_base::openmode io_mode; + + /** + * @brief True if this object owns file descriptor. + * + * This makes the class responsible for closing the file + * upon destruction. + */ + bool own_fd; + + /** + * @brief Stream buffer. + * + * For simplicity this remains allocated on the free store for the + * entire life span of the gzfilebuf object, unless replaced by setbuf. + */ + char_type* buffer; + + /** + * @brief Stream buffer size. + * + * Defaults to system default buffer size (typically 8192 bytes). + * Modified by setbuf. + */ + std::streamsize buffer_size; + + /** + * @brief True if this object owns stream buffer. + * + * This makes the class responsible for deleting the buffer + * upon destruction. + */ + bool own_buffer; +}; + +/*****************************************************************************/ + +/** + * @brief Gzipped file input stream class. + * + * This class implements ifstream for gzipped files. Seeking and putback + * is not supported yet. +*/ +class gzifstream : public std::istream +{ +public: + // Default constructor + gzifstream(); + + /** + * @brief Construct stream on gzipped file to be opened. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::in). + */ + explicit + gzifstream(const char* name, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * @brief Construct stream on already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::in). + */ + explicit + gzifstream(int fd, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * Obtain underlying stream buffer. + */ + gzfilebuf* + rdbuf() const + { return const_cast(&sb); } + + /** + * @brief Check if file is open. + * @return True if file is open. + */ + bool + is_open() { return sb.is_open(); } + + /** + * @brief Open gzipped file. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::in). + * + * Stream will be in state good() if file opens successfully; + * otherwise in state fail(). This differs from the behavior of + * ifstream, which never sets the state to good() and therefore + * won't allow you to reuse the stream for a second file unless + * you manually clear() the state. The choice is a matter of + * convenience. + */ + void + open(const char* name, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * @brief Attach to already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::in). + * + * Stream will be in state good() if attach succeeded; otherwise + * in state fail(). + */ + void + attach(int fd, + std::ios_base::openmode mode = std::ios_base::in); + + /** + * @brief Close gzipped file. + * + * Stream will be in state fail() if close failed. + */ + void + close(); + +private: + /** + * Underlying stream buffer. + */ + gzfilebuf sb; +}; + +/*****************************************************************************/ + +/** + * @brief Gzipped file output stream class. + * + * This class implements ofstream for gzipped files. Seeking and putback + * is not supported yet. +*/ +class gzofstream : public std::ostream +{ +public: + // Default constructor + gzofstream(); + + /** + * @brief Construct stream on gzipped file to be opened. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::out). + */ + explicit + gzofstream(const char* name, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * @brief Construct stream on already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::out). + */ + explicit + gzofstream(int fd, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * Obtain underlying stream buffer. + */ + gzfilebuf* + rdbuf() const + { return const_cast(&sb); } + + /** + * @brief Check if file is open. + * @return True if file is open. + */ + bool + is_open() { return sb.is_open(); } + + /** + * @brief Open gzipped file. + * @param name File name. + * @param mode Open mode flags (forced to contain ios::out). + * + * Stream will be in state good() if file opens successfully; + * otherwise in state fail(). This differs from the behavior of + * ofstream, which never sets the state to good() and therefore + * won't allow you to reuse the stream for a second file unless + * you manually clear() the state. The choice is a matter of + * convenience. + */ + void + open(const char* name, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * @brief Attach to already open gzipped file. + * @param fd File descriptor. + * @param mode Open mode flags (forced to contain ios::out). + * + * Stream will be in state good() if attach succeeded; otherwise + * in state fail(). + */ + void + attach(int fd, + std::ios_base::openmode mode = std::ios_base::out); + + /** + * @brief Close gzipped file. + * + * Stream will be in state fail() if close failed. + */ + void + close(); + +private: + /** + * Underlying stream buffer. + */ + gzfilebuf sb; +}; + +/*****************************************************************************/ + +/** + * @brief Gzipped file output stream manipulator class. + * + * This class defines a two-argument manipulator for gzofstream. It is used + * as base for the setcompression(int,int) manipulator. +*/ +template + class gzomanip2 + { + public: + // Allows insertor to peek at internals + template + friend gzofstream& + operator<<(gzofstream&, + const gzomanip2&); + + // Constructor + gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2), + T1 v1, + T2 v2); + private: + // Underlying manipulator function + gzofstream& + (*func)(gzofstream&, T1, T2); + + // Arguments for manipulator function + T1 val1; + T2 val2; + }; + +/*****************************************************************************/ + +// Manipulator function thunks through to stream buffer +inline gzofstream& +setcompression(gzofstream &gzs, int l, int s = Z_DEFAULT_STRATEGY) +{ + (gzs.rdbuf())->setcompression(l, s); + return gzs; +} + +// Manipulator constructor stores arguments +template + inline + gzomanip2::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2), + T1 v1, + T2 v2) + : func(f), val1(v1), val2(v2) + { } + +// Insertor applies underlying manipulator function to stream +template + inline gzofstream& + operator<<(gzofstream& s, const gzomanip2& m) + { return (*m.func)(s, m.val1, m.val2); } + +// Insert this onto stream to simplify setting of compression level +inline gzomanip2 +setcompression(int l, int s = Z_DEFAULT_STRATEGY) +{ return gzomanip2(&setcompression, l, s); } + +#endif // ZFSTREAM_H diff --git a/compat/zlib/contrib/masm686/match.asm b/compat/zlib/contrib/masm686/match.asm new file mode 100644 index 0000000..4b03a71 --- /dev/null +++ b/compat/zlib/contrib/masm686/match.asm @@ -0,0 +1,413 @@ + +; match.asm -- Pentium-Pro optimized version of longest_match() +; +; Updated for zlib 1.1.3 and converted to MASM 6.1x +; Copyright (C) 2000 Dan Higdon +; and Chuck Walbourn +; Corrections by Cosmin Truta +; +; This is free software; you can redistribute it and/or modify it +; under the terms of the GNU General Public License. + +; Based on match.S +; Written for zlib 1.1.2 +; Copyright (C) 1998 Brian Raiter +; +; Modified by Gilles Vollant (2005) for add gzhead and gzindex + + .686P + .MODEL FLAT + +;=========================================================================== +; EQUATES +;=========================================================================== + +MAX_MATCH EQU 258 +MIN_MATCH EQU 3 +MIN_LOOKAHEAD EQU (MAX_MATCH + MIN_MATCH + 1) +MAX_MATCH_8 EQU ((MAX_MATCH + 7) AND (NOT 7)) + +;=========================================================================== +; STRUCTURES +;=========================================================================== + +; This STRUCT assumes a 4-byte alignment + +DEFLATE_STATE STRUCT +ds_strm dd ? +ds_status dd ? +ds_pending_buf dd ? +ds_pending_buf_size dd ? +ds_pending_out dd ? +ds_pending dd ? +ds_wrap dd ? +; gzhead and gzindex are added in zlib 1.2.2.2 (see deflate.h) +ds_gzhead dd ? +ds_gzindex dd ? +ds_data_type db ? +ds_method db ? + db ? ; padding + db ? ; padding +ds_last_flush dd ? +ds_w_size dd ? ; used +ds_w_bits dd ? +ds_w_mask dd ? ; used +ds_window dd ? ; used +ds_window_size dd ? +ds_prev dd ? ; used +ds_head dd ? +ds_ins_h dd ? +ds_hash_size dd ? +ds_hash_bits dd ? +ds_hash_mask dd ? +ds_hash_shift dd ? +ds_block_start dd ? +ds_match_length dd ? ; used +ds_prev_match dd ? ; used +ds_match_available dd ? +ds_strstart dd ? ; used +ds_match_start dd ? ; used +ds_lookahead dd ? ; used +ds_prev_length dd ? ; used +ds_max_chain_length dd ? ; used +ds_max_laxy_match dd ? +ds_level dd ? +ds_strategy dd ? +ds_good_match dd ? ; used +ds_nice_match dd ? ; used + +; Don't need anymore of the struct for match +DEFLATE_STATE ENDS + +;=========================================================================== +; CODE +;=========================================================================== +_TEXT SEGMENT + +;--------------------------------------------------------------------------- +; match_init +;--------------------------------------------------------------------------- + ALIGN 4 +PUBLIC _match_init +_match_init PROC + ; no initialization needed + ret +_match_init ENDP + +;--------------------------------------------------------------------------- +; uInt longest_match(deflate_state *deflatestate, IPos curmatch) +;--------------------------------------------------------------------------- + ALIGN 4 + +PUBLIC _longest_match +_longest_match PROC + +; Since this code uses EBP for a scratch register, the stack frame must +; be manually constructed and referenced relative to the ESP register. + +; Stack image +; Variables +chainlenwmask = 0 ; high word: current chain len + ; low word: s->wmask +window = 4 ; local copy of s->window +windowbestlen = 8 ; s->window + bestlen +scanend = 12 ; last two bytes of string +scanstart = 16 ; first two bytes of string +scanalign = 20 ; dword-misalignment of string +nicematch = 24 ; a good enough match size +bestlen = 28 ; size of best match so far +scan = 32 ; ptr to string wanting match +varsize = 36 ; number of bytes (also offset to last saved register) + +; Saved Registers (actually pushed into place) +ebx_save = 36 +edi_save = 40 +esi_save = 44 +ebp_save = 48 + +; Parameters +retaddr = 52 +deflatestate = 56 +curmatch = 60 + +; Save registers that the compiler may be using + push ebp + push edi + push esi + push ebx + +; Allocate local variable space + sub esp,varsize + +; Retrieve the function arguments. ecx will hold cur_match +; throughout the entire function. edx will hold the pointer to the +; deflate_state structure during the function's setup (before +; entering the main loop). + + mov edx, [esp+deflatestate] +ASSUME edx:PTR DEFLATE_STATE + + mov ecx, [esp+curmatch] + +; uInt wmask = s->w_mask; +; unsigned chain_length = s->max_chain_length; +; if (s->prev_length >= s->good_match) { +; chain_length >>= 2; +; } + + mov eax, [edx].ds_prev_length + mov ebx, [edx].ds_good_match + cmp eax, ebx + mov eax, [edx].ds_w_mask + mov ebx, [edx].ds_max_chain_length + jl SHORT LastMatchGood + shr ebx, 2 +LastMatchGood: + +; chainlen is decremented once beforehand so that the function can +; use the sign flag instead of the zero flag for the exit test. +; It is then shifted into the high word, to make room for the wmask +; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + mov [esp+chainlenwmask], ebx + +; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + mov eax, [edx].ds_nice_match + mov ebx, [edx].ds_lookahead + cmp ebx, eax + jl SHORT LookaheadLess + mov ebx, eax +LookaheadLess: + mov [esp+nicematch], ebx + +;/* register Bytef *scan = s->window + s->strstart; */ + + mov esi, [edx].ds_window + mov [esp+window], esi + mov ebp, [edx].ds_strstart + lea edi, [esi+ebp] + mov [esp+scan],edi + +;/* Determine how many bytes the scan ptr is off from being */ +;/* dword-aligned. */ + + mov eax, edi + neg eax + and eax, 3 + mov [esp+scanalign], eax + +;/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */ +;/* s->strstart - (IPos)MAX_DIST(s) : NIL; */ + + mov eax, [edx].ds_w_size + sub eax, MIN_LOOKAHEAD + sub ebp, eax + jg SHORT LimitPositive + xor ebp, ebp +LimitPositive: + +;/* int best_len = s->prev_length; */ + + mov eax, [edx].ds_prev_length + mov [esp+bestlen], eax + +;/* Store the sum of s->window + best_len in %esi locally, and in %esi. */ + + add esi, eax + mov [esp+windowbestlen], esi + +;/* register ush scan_start = *(ushf*)scan; */ +;/* register ush scan_end = *(ushf*)(scan+best_len-1); */ +;/* Posf *prev = s->prev; */ + + movzx ebx, WORD PTR[edi] + mov [esp+scanstart], ebx + movzx ebx, WORD PTR[eax+edi-1] + mov [esp+scanend], ebx + mov edi, [edx].ds_prev + +;/* Jump into the main loop. */ + + mov edx, [esp+chainlenwmask] + jmp SHORT LoopEntry + +;/* do { +; * match = s->window + cur_match; +; * if (*(ushf*)(match+best_len-1) != scan_end || +; * *(ushf*)match != scan_start) continue; +; * [...] +; * } while ((cur_match = prev[cur_match & wmask]) > limit +; * && --chain_length != 0); +; * +; * Here is the inner loop of the function. The function will spend the +; * majority of its time in this loop, and majority of that time will +; * be spent in the first ten instructions. +; * +; * Within this loop: +; * %ebx = scanend +; * %ecx = curmatch +; * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +; * %esi = windowbestlen - i.e., (window + bestlen) +; * %edi = prev +; * %ebp = limit +; */ + + ALIGN 4 +LookupLoop: + and ecx, edx + movzx ecx, WORD PTR[edi+ecx*2] + cmp ecx, ebp + jbe LeaveNow + sub edx, 000010000H + js LeaveNow + +LoopEntry: + movzx eax, WORD PTR[esi+ecx-1] + cmp eax, ebx + jnz SHORT LookupLoop + + mov eax, [esp+window] + movzx eax, WORD PTR[eax+ecx] + cmp eax, [esp+scanstart] + jnz SHORT LookupLoop + +;/* Store the current value of chainlen. */ + + mov [esp+chainlenwmask], edx + +;/* Point %edi to the string under scrutiny, and %esi to the string we */ +;/* are hoping to match it up with. In actuality, %esi and %edi are */ +;/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */ +;/* initialized to -(MAX_MATCH_8 - scanalign). */ + + mov esi, [esp+window] + mov edi, [esp+scan] + add esi, ecx + mov eax, [esp+scanalign] + mov edx, -MAX_MATCH_8 + lea edi, [edi+eax+MAX_MATCH_8] + lea esi, [esi+eax+MAX_MATCH_8] + +;/* Test the strings for equality, 8 bytes at a time. At the end, +; * adjust %edx so that it is offset to the exact byte that mismatched. +; * +; * We already know at this point that the first three bytes of the +; * strings match each other, and they can be safely passed over before +; * starting the compare loop. So what this code does is skip over 0-3 +; * bytes, as much as necessary in order to dword-align the %edi +; * pointer. (%esi will still be misaligned three times out of four.) +; * +; * It should be confessed that this loop usually does not represent +; * much of the total running time. Replacing it with a more +; * straightforward "rep cmpsb" would not drastically degrade +; * performance. +; */ + +LoopCmps: + mov eax, DWORD PTR[esi+edx] + xor eax, DWORD PTR[edi+edx] + jnz SHORT LeaveLoopCmps + + mov eax, DWORD PTR[esi+edx+4] + xor eax, DWORD PTR[edi+edx+4] + jnz SHORT LeaveLoopCmps4 + + add edx, 8 + jnz SHORT LoopCmps + jmp LenMaximum + ALIGN 4 + +LeaveLoopCmps4: + add edx, 4 + +LeaveLoopCmps: + test eax, 00000FFFFH + jnz SHORT LenLower + + add edx, 2 + shr eax, 16 + +LenLower: + sub al, 1 + adc edx, 0 + +;/* Calculate the length of the match. If it is longer than MAX_MATCH, */ +;/* then automatically accept it as the best possible match and leave. */ + + lea eax, [edi+edx] + mov edi, [esp+scan] + sub eax, edi + cmp eax, MAX_MATCH + jge SHORT LenMaximum + +;/* If the length of the match is not longer than the best match we */ +;/* have so far, then forget it and return to the lookup loop. */ + + mov edx, [esp+deflatestate] + mov ebx, [esp+bestlen] + cmp eax, ebx + jg SHORT LongerMatch + mov esi, [esp+windowbestlen] + mov edi, [edx].ds_prev + mov ebx, [esp+scanend] + mov edx, [esp+chainlenwmask] + jmp LookupLoop + ALIGN 4 + +;/* s->match_start = cur_match; */ +;/* best_len = len; */ +;/* if (len >= nice_match) break; */ +;/* scan_end = *(ushf*)(scan+best_len-1); */ + +LongerMatch: + mov ebx, [esp+nicematch] + mov [esp+bestlen], eax + mov [edx].ds_match_start, ecx + cmp eax, ebx + jge SHORT LeaveNow + mov esi, [esp+window] + add esi, eax + mov [esp+windowbestlen], esi + movzx ebx, WORD PTR[edi+eax-1] + mov edi, [edx].ds_prev + mov [esp+scanend], ebx + mov edx, [esp+chainlenwmask] + jmp LookupLoop + ALIGN 4 + +;/* Accept the current string, with the maximum possible length. */ + +LenMaximum: + mov edx, [esp+deflatestate] + mov DWORD PTR[esp+bestlen], MAX_MATCH + mov [edx].ds_match_start, ecx + +;/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */ +;/* return s->lookahead; */ + +LeaveNow: + mov edx, [esp+deflatestate] + mov ebx, [esp+bestlen] + mov eax, [edx].ds_lookahead + cmp ebx, eax + jg SHORT LookaheadRet + mov eax, ebx +LookaheadRet: + +; Restore the stack and return from whence we came. + + add esp, varsize + pop ebx + pop esi + pop edi + pop ebp + ret + +_longest_match ENDP + +_TEXT ENDS +END diff --git a/compat/zlib/contrib/masmx64/bld_ml64.bat b/compat/zlib/contrib/masmx64/bld_ml64.bat new file mode 100644 index 0000000..8f9343d --- /dev/null +++ b/compat/zlib/contrib/masmx64/bld_ml64.bat @@ -0,0 +1,2 @@ +ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +ml64.exe /Flgvmat64 /c /Zi gvmat64.asm diff --git a/compat/zlib/contrib/masmx64/gvmat64.asm b/compat/zlib/contrib/masmx64/gvmat64.asm new file mode 100644 index 0000000..790d655 --- /dev/null +++ b/compat/zlib/contrib/masmx64/gvmat64.asm @@ -0,0 +1,513 @@ +;uInt longest_match_x64( +; deflate_state *s, +; IPos cur_match); /* current match */ + +; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86 +; Copyright (C) 1995-2005 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; +; File written by Gilles Vollant, by converting to assembly the longest_match +; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. +; +; and by taking inspiration on asm686 with masm, optimised assembly code +; from Brian Raiter, written 1998 +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; to compile this file for infozip Zip, I use option: +; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm +; +; to compile this file for zLib, I use option: +; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm +; Be carrefull to adapt zlib1222add below to your version of zLib +; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change +; value of zlib1222add later) +; +; This file compile with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005 and Windows 2003 server DDK +; +; (you can get Windows 2003 server DDK with ml64 and cl for AMD64 from +; http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) +; + + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ +.code +longest_match PROC + + +;LocalVarsSize equ 88 + LocalVarsSize equ 72 + +; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 +; free register : r14,r15 +; register can be saved : rsp + + chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len + ; low word: s->wmask +;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10 +;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11 +;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w +;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx +;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13 +;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d +;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9 +IFDEF INFOZIP +ELSE + nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size +ENDIF + +save_rdi equ rsp + 24 - LocalVarsSize +save_rsi equ rsp + 32 - LocalVarsSize +save_rbx equ rsp + 40 - LocalVarsSize +save_rbp equ rsp + 48 - LocalVarsSize +save_r12 equ rsp + 56 - LocalVarsSize +save_r13 equ rsp + 64 - LocalVarsSize +;save_r14 equ rsp + 72 - LocalVarsSize +;save_r15 equ rsp + 80 - LocalVarsSize + + + +; all the +4 offsets are due to the addition of pending_buf_size (in zlib +; in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, remove the +4). +; Note : these value are good with a 8 bytes boundary pack structure + + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + +IFDEF INFOZIP + +_DATA SEGMENT +COMM window_size:DWORD +; WMask ; 7fff +COMM window:BYTE:010040H +COMM prev:WORD:08000H +; MatchLen : unused +; PrevMatch : unused +COMM strstart:DWORD +COMM match_start:DWORD +; Lookahead : ignore +COMM prev_length:DWORD ; PrevLen +COMM max_chain_length:DWORD +COMM good_match:DWORD +COMM nice_match:DWORD +prev_ad equ OFFSET prev +window_ad equ OFFSET window +nicematch equ nice_match +_DATA ENDS +WMask equ 07fffh + +ELSE + + IFNDEF zlib1222add + zlib1222add equ 8 + ENDIF +dsWSize equ 56+zlib1222add+(zlib1222add/2) +dsWMask equ 64+zlib1222add+(zlib1222add/2) +dsWindow equ 72+zlib1222add +dsPrev equ 88+zlib1222add +dsMatchLen equ 128+zlib1222add +dsPrevMatch equ 132+zlib1222add +dsStrStart equ 140+zlib1222add +dsMatchStart equ 144+zlib1222add +dsLookahead equ 148+zlib1222add +dsPrevLen equ 152+zlib1222add +dsMaxChainLen equ 156+zlib1222add +dsGoodMatch equ 172+zlib1222add +dsNiceMatch equ 176+zlib1222add + +window_size equ [ rcx + dsWSize] +WMask equ [ rcx + dsWMask] +window_ad equ [ rcx + dsWindow] +prev_ad equ [ rcx + dsPrev] +strstart equ [ rcx + dsStrStart] +match_start equ [ rcx + dsMatchStart] +Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip +prev_length equ [ rcx + dsPrevLen] +max_chain_length equ [ rcx + dsMaxChainLen] +good_match equ [ rcx + dsGoodMatch] +nice_match equ [ rcx + dsNiceMatch] +ENDIF + +; parameter 1 in r8(deflate state s), param 2 in rdx (cur match) + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. + + + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + +;;; Retrieve the function arguments. r8d will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + +; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) + +; this clear high 32 bits of r8, which can be garbage in both r8 and rdx + + mov [save_rdi],rdi + mov [save_rsi],rsi + mov [save_rbx],rbx + mov [save_rbp],rbp +IFDEF INFOZIP + mov r8d,ecx +ELSE + mov r8d,edx +ENDIF + mov [save_r12],r12 + mov [save_r13],r13 +; mov [save_r14],r14 +; mov [save_r15],r15 + + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov edi, prev_length + mov esi, good_match + mov eax, WMask + mov ebx, max_chain_length + cmp edi, esi + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + +;;; on zlib only +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + +IFDEF INFOZIP + mov [chainlenwmask], ebx +; on infozip nice_match = [nice_match] +ELSE + mov eax, nice_match + mov [chainlenwmask], ebx + mov r10d, Lookahead + cmp r10d, eax + cmovnl r10d, eax + mov [nicematch],r10d +ENDIF + +;;; register Bytef *scan = s->window + s->strstart; + mov r10, window_ad + mov ebp, strstart + lea r13, [r10 + rbp] + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov r9,r13 + neg r13 + and r13,3 + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; +IFDEF INFOZIP + mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1)) +ELSE + mov eax, window_size + sub eax, MIN_LOOKAHEAD +ENDIF + xor edi,edi + sub ebp, eax + + mov r11d, prev_length + + cmovng ebp,edi + +;;; int best_len = s->prev_length; + + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + lea rsi,[r10+r11] + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx r12d,word ptr [r9] + movzx ebx, word ptr [r9 + r11 - 1] + + mov rdi, prev_ad + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop1: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry1: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop2: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry2: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop4: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry4: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 + jmp LookupLoopIsZero + + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; r8d = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 +LookupLoopIsZero: + cmp r12w, word ptr [r10 + r8] + jnz LookupLoop1 + + +;;; Store the current value of chainlen. + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + lea rsi,[r8+r10] + mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8) + lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8] + lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8] + + prefetcht1 [rsi+rdx] + prefetcht1 [rdi+rdx] + + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust rdx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (rsi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + + +LoopCmps: + mov rax, [rsi + rdx] + xor rax, [rdi + rdx] + jnz LeaveLoopCmps + + mov rax, [rsi + rdx + 8] + xor rax, [rdi + rdx + 8] + jnz LeaveLoopCmps8 + + + mov rax, [rsi + rdx + 8+8] + xor rax, [rdi + rdx + 8+8] + jnz LeaveLoopCmps16 + + add rdx,8+8+8 + + jmp short LoopCmps +LeaveLoopCmps16: add rdx,8 +LeaveLoopCmps8: add rdx,8 +LeaveLoopCmps: + + test eax, 0000FFFFh + jnz LenLower + + test eax,0ffffffffh + + jnz LenLower32 + + add rdx,4 + shr rax,32 + or ax,ax + jnz LenLower + +LenLower32: + shr eax,16 + add rdx,2 +LenLower: sub al, 1 + adc rdx, 0 +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea rax, [rdi + rdx] + sub rax, r9 + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. +;/////////////////////////////////// + + cmp eax, r11d + jg LongerMatch + + lea rsi,[r10+r11] + + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: + mov r11d, eax + mov match_start, r8d + cmp eax, [nicematch] + jge LeaveNow + + lea rsi,[r10+rax] + + movzx ebx, word ptr [r9 + rax - 1] + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: + mov r11d,MAX_MATCH + mov match_start, r8d + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: +IFDEF INFOZIP + mov eax,r11d +ELSE + mov eax, Lookahead + cmp r11d, eax + cmovng eax, r11d +ENDIF + +;;; Restore the stack and return from whence we came. + + + mov rsi,[save_rsi] + mov rdi,[save_rdi] + mov rbx,[save_rbx] + mov rbp,[save_rbp] + mov r12,[save_r12] + mov r13,[save_r13] +; mov r14,[save_r14] +; mov r15,[save_r15] + + + ret 0 +; please don't remove this string ! +; Your can freely use gvmat64 in any free or commercial app +; but it is far better don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 +longest_match ENDP + +match_init PROC + ret 0 +match_init ENDP + + +END diff --git a/compat/zlib/contrib/masmx64/gvmat64.obj b/compat/zlib/contrib/masmx64/gvmat64.obj new file mode 100644 index 0000000..a49ca02 Binary files /dev/null and b/compat/zlib/contrib/masmx64/gvmat64.obj differ diff --git a/compat/zlib/contrib/masmx64/inffas8664.c b/compat/zlib/contrib/masmx64/inffas8664.c new file mode 100644 index 0000000..3af764d --- /dev/null +++ b/compat/zlib/contrib/masmx64/inffas8664.c @@ -0,0 +1,186 @@ +/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding + * version for AMD64 on Windows using Microsoft C compiler + * + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant + * + * inffas8664.c call function inffas8664fnc in inffasx64.asm + * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c + * + * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also + * slightly quicker on x86 systems because, instead of using rep movsb to copy + * data, it uses rep movsw, which moves data in 2-byte chunks instead of single + * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates + * from http://fedora.linux.duke.edu/fc1_x86_64 + * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with + * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, + * when decompressing mozilla-source-1.3.tar.gz. + * + * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from + * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at + * the moment. I have successfully compiled and tested this code with gcc2.96, + * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S + * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX + * enabled. I will attempt to merge the MMX code into this version. Newer + * versions of this and inffast.S can be found at + * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ + * + */ + +#include +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* Mark Adler's comments from inffast.c: */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ + + + + typedef struct inffast_ar { +/* 64 32 x86 x86_64 */ +/* ar offset register */ +/* 0 0 */ void *esp; /* esp save */ +/* 8 4 */ void *ebp; /* ebp save */ +/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ +/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ +/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ +/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ +/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ +/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ +/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ +/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ +/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */ +/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ +/* 92 48 */ unsigned wsize; /* window size */ +/* 96 52 */ unsigned write; /* window write index */ +/*100 56 */ unsigned lmask; /* r12 mask for lcode */ +/*104 60 */ unsigned dmask; /* r13 mask for dcode */ +/*108 64 */ unsigned len; /* r14 match length */ +/*112 68 */ unsigned dist; /* r15 match distance */ +/*116 72 */ unsigned status; /* set when state chng*/ + } type_ar; +#ifdef ASMINF + +void inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + type_ar ar; + void inffas8664fnc(struct inffast_ar * par); + + + +#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64)) +#define PAD_AVAIL_IN 6 +#define PAD_AVAIL_OUT 258 +#else +#define PAD_AVAIL_IN 5 +#define PAD_AVAIL_OUT 257 +#endif + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + + ar.in = strm->next_in; + ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); + ar.out = strm->next_out; + ar.beg = ar.out - (start - strm->avail_out); + ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); + ar.wsize = state->wsize; + ar.write = state->write; + ar.window = state->window; + ar.hold = state->hold; + ar.bits = state->bits; + ar.lcode = state->lencode; + ar.dcode = state->distcode; + ar.lmask = (1U << state->lenbits) - 1; + ar.dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + /* align in on 1/2 hold size boundary */ + while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { + ar.hold += (unsigned long)*ar.in++ << ar.bits; + ar.bits += 8; + } + + inffas8664fnc(&ar); + + if (ar.status > 1) { + if (ar.status == 2) + strm->msg = "invalid literal/length code"; + else if (ar.status == 3) + strm->msg = "invalid distance code"; + else + strm->msg = "invalid distance too far back"; + state->mode = BAD; + } + else if ( ar.status == 1 ) { + state->mode = TYPE; + } + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + ar.len = ar.bits >> 3; + ar.in -= ar.len; + ar.bits -= ar.len << 3; + ar.hold &= (1U << ar.bits) - 1; + + /* update state and return */ + strm->next_in = ar.in; + strm->next_out = ar.out; + strm->avail_in = (unsigned)(ar.in < ar.last ? + PAD_AVAIL_IN + (ar.last - ar.in) : + PAD_AVAIL_IN - (ar.in - ar.last)); + strm->avail_out = (unsigned)(ar.out < ar.end ? + PAD_AVAIL_OUT + (ar.end - ar.out) : + PAD_AVAIL_OUT - (ar.out - ar.end)); + state->hold = (unsigned long)ar.hold; + state->bits = ar.bits; + return; +} + +#endif diff --git a/compat/zlib/contrib/masmx64/inffasx64.asm b/compat/zlib/contrib/masmx64/inffasx64.asm new file mode 100644 index 0000000..b5d93a2 --- /dev/null +++ b/compat/zlib/contrib/masmx64/inffasx64.asm @@ -0,0 +1,392 @@ +; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding +; version for AMD64 on Windows using Microsoft C compiler +; +; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c +; inffasx64.asm is called by inffas8664.c, which contain more info. + + +; to compile this file, I use option +; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +; with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK +; +; (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from +; http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) +; + +.code +inffas8664fnc PROC + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch. + + + mov [rsp-8],rsi + mov [rsp-16],rdi + mov [rsp-24],r12 + mov [rsp-32],r13 + mov [rsp-40],r14 + mov [rsp-48],r15 + mov [rsp-56],rbx + + mov rax,rcx + + mov [rax+8], rbp ; /* save regs rbp and rsp */ + mov [rax], rsp + + mov rsp, rax ; /* make rsp point to &ar */ + + mov rsi, [rsp+16] ; /* rsi = in */ + mov rdi, [rsp+32] ; /* rdi = out */ + mov r9, [rsp+24] ; /* r9 = last */ + mov r10, [rsp+48] ; /* r10 = end */ + mov rbp, [rsp+64] ; /* rbp = lcode */ + mov r11, [rsp+72] ; /* r11 = dcode */ + mov rdx, [rsp+80] ; /* rdx = hold */ + mov ebx, [rsp+88] ; /* ebx = bits */ + mov r12d, [rsp+100] ; /* r12d = lmask */ + mov r13d, [rsp+104] ; /* r13d = dmask */ + ; /* r14d = len */ + ; /* r15d = dist */ + + + cld + cmp r10, rdi + je L_one_time ; /* if only one decode left */ + cmp r9, rsi + + jne L_do_loop + + +L_one_time: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code_one_time + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + jmp L_get_length_code_one_time + +ALIGN 4 +L_while_test: + cmp r10, rdi + jbe L_break_loop + cmp r9, rsi + jbe L_break_loop + +L_do_loop: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_length_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + mov r8, r12 ; /* r8 = lmask */ + shr eax, 16 ; /* output this.val char */ + stosb + +L_get_length_code_one_time: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + +L_dolen: + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + shr eax, 16 ; /* output this.val char */ + stosb + jmp L_while_test + +ALIGN 4 +L_test_for_length_base: + mov r14d, eax ; /* len = this */ + shr r14d, 16 ; /* len = this.val */ + mov cl, al + + test al, 16 + jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */ + and cl, 15 ; /* op &= 15 */ + jz L_decode_distance ; /* if (!op) */ + +L_add_bits_to_len: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r14d, eax ; /* len += hold & mask[op] */ + +L_decode_distance: + mov r8, r13 ; /* r8 = dmask */ + cmp bl, 32 + ja L_get_distance_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_distance_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */ + +L_dodist: + mov r15d, eax ; /* dist = this */ + shr r15d, 16 ; /* dist = this.val */ + mov cl, ah + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + mov cl, al ; /* cl = this.op */ + + test al, 16 ; /* if ((op & 16) == 0) */ + jz L_test_for_second_level_dist + and cl, 15 ; /* op &= 15 */ + jz L_check_dist_one + +L_add_bits_to_dist: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax ; /* (1 << op) - 1 */ + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r15d, eax ; /* dist += hold & ((1 << op) - 1) */ + +L_check_window: + mov r8, rsi ; /* save in so from can use it's reg */ + mov rax, rdi + sub rax, [rsp+40] ; /* nbytes = out - beg */ + + cmp eax, r15d + jb L_clip_window ; /* if (dist > nbytes) 4.2% */ + + mov ecx, r14d ; /* ecx = len */ + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + + sar ecx, 1 + jnc L_copy_two ; /* if len % 2 == 0 */ + + rep movsw + mov al, [rsi] + mov [rdi], al + inc rdi + + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +L_copy_two: + rep movsw + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp r15d, 1 ; /* if dist 1, is a memset */ + jne L_check_window + cmp [rsp+40], rdi ; /* if out == beg, outside window */ + je L_check_window + + mov ecx, r14d ; /* ecx = len */ + mov al, [rdi-1] + mov ah, al + + sar ecx, 1 + jnc L_set_two + mov [rdi], al + inc rdi + +L_set_two: + rep stosw + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + test al, 64 + jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r14d ; /* eax += len */ + mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/ + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + test al, 64 + jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r15d ; /* eax += dist */ + mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/ + jmp L_dodist + +ALIGN 4 +L_clip_window: + mov ecx, eax ; /* ecx = nbytes */ + mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */ + neg ecx ; /* nbytes = -nbytes */ + + cmp eax, r15d + jb L_invalid_distance_too_far ; /* if (dist > wsize) */ + + add ecx, r15d ; /* nbytes = dist - nbytes */ + cmp dword ptr [rsp+96], 0 + jne L_wrap_around_window ; /* if (write != 0) */ + + mov rsi, [rsp+56] ; /* from = window */ + sub eax, ecx ; /* eax -= nbytes */ + add rsi, rax ; /* from += wsize - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp r14d, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* eax -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = &out[ -dist ] */ + jmp L_do_copy + +ALIGN 4 +L_wrap_around_window: + mov eax, [rsp+96] ; /* eax = write */ + cmp ecx, eax + jbe L_contiguous_in_window ; /* if (write >= nbytes) */ + + mov esi, [rsp+92] ; /* from = wsize */ + add rsi, [rsp+56] ; /* from += window */ + add rsi, rax ; /* from += write */ + sub rsi, rcx ; /* from -= nbytes */ + sub ecx, eax ; /* nbytes -= write */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, [rsp+56] ; /* from = window */ + mov ecx, [rsp+96] ; /* nbytes = write */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_contiguous_in_window: + mov rsi, [rsp+56] ; /* rsi = window */ + add rsi, rax + sub rsi, rcx ; /* from += write - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy ; /* if (nbytes >= len) */ + +ALIGN 4 +L_do_copy: + mov ecx, eax ; /* ecx = len */ + rep movsb + + mov rsi, r8 ; /* move in back to %esi, toss from */ + jmp L_while_test + +L_test_for_end_of_block: + test al, 32 + jz L_invalid_literal_length_code + mov dword ptr [rsp+116], 1 + jmp L_break_loop_with_status + +L_invalid_literal_length_code: + mov dword ptr [rsp+116], 2 + jmp L_break_loop_with_status + +L_invalid_distance_code: + mov dword ptr [rsp+116], 3 + jmp L_break_loop_with_status + +L_invalid_distance_too_far: + mov dword ptr [rsp+116], 4 + jmp L_break_loop_with_status + +L_break_loop: + mov dword ptr [rsp+116], 0 + +L_break_loop_with_status: +; /* put in, out, bits, and hold back into ar and pop esp */ + mov [rsp+16], rsi ; /* in */ + mov [rsp+32], rdi ; /* out */ + mov [rsp+88], ebx ; /* bits */ + mov [rsp+80], rdx ; /* hold */ + + mov rax, [rsp] ; /* restore rbp and rsp */ + mov rbp, [rsp+8] + mov rsp, rax + + + + mov rsi,[rsp-8] + mov rdi,[rsp-16] + mov r12,[rsp-24] + mov r13,[rsp-32] + mov r14,[rsp-40] + mov r15,[rsp-48] + mov rbx,[rsp-56] + + ret 0 +; : +; : "m" (ar) +; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", +; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" +; ); + +inffas8664fnc ENDP +;_TEXT ENDS +END diff --git a/compat/zlib/contrib/masmx64/inffasx64.obj b/compat/zlib/contrib/masmx64/inffasx64.obj new file mode 100644 index 0000000..8df5d82 Binary files /dev/null and b/compat/zlib/contrib/masmx64/inffasx64.obj differ diff --git a/compat/zlib/contrib/masmx64/readme.txt b/compat/zlib/contrib/masmx64/readme.txt new file mode 100644 index 0000000..ee03115 --- /dev/null +++ b/compat/zlib/contrib/masmx64/readme.txt @@ -0,0 +1,28 @@ +Summary +------- +This directory contains ASM implementations of the functions +longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t), +for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits. + +gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits + assembly optimized version from Jean-loup Gailly original longest_match function + +inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing + original function from Mark Adler + +Use instructions +---------------- +Copy these files into the zlib source directory. + +define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, +and inffasx64.obj and gvmat64.obj as object to link. + + +Build instructions +------------------ +run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) + +ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK + +You can get Windows 2003 server DDK with ml64 and cl for AMD64 from + http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) diff --git a/compat/zlib/contrib/masmx86/bld_ml32.bat b/compat/zlib/contrib/masmx86/bld_ml32.bat new file mode 100644 index 0000000..99144d0 --- /dev/null +++ b/compat/zlib/contrib/masmx86/bld_ml32.bat @@ -0,0 +1,2 @@ +ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm +ml /coff /Zi /c /Flinffas32.lst inffas32.asm diff --git a/compat/zlib/contrib/masmx86/gvmat32.asm b/compat/zlib/contrib/masmx86/gvmat32.asm new file mode 100644 index 0000000..874bb2d --- /dev/null +++ b/compat/zlib/contrib/masmx86/gvmat32.asm @@ -0,0 +1,972 @@ +; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86 +; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant. +; File written by Gilles Vollant, by modifiying the longest_match +; from Jean-loup Gailly in deflate.c +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is in directory \MASM611C of Win95 DDK +; ml.exe is also distributed in http://www.masm32.com/masmdl.htm +; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ +; +; this file contain two implementation of longest_match +; +; longest_match_7fff : written 1996 by Gilles Vollant optimized for +; first Pentium. Assume s->w_mask == 0x7fff +; longest_match_686 : written by Brian raiter (1998), optimized for Pentium Pro +; +; for using an seembly version of longest_match, you need define ASMV in project +; There is two way in using gvmat32.asm +; +; A) Suggested method +; if you want include both longest_match_7fff and longest_match_686 +; compile the asm file running +; ml /coff /Zi /Flgvmat32.lst /c gvmat32.asm +; and include gvmat32c.c in your project +; if you have an old cpu (386,486 or first Pentium) and s->w_mask==0x7fff, +; longest_match_7fff will be used +; if you have a more modern CPU (Pentium Pro, II and higher) +; longest_match_686 will be used +; on old cpu with s->w_mask!=0x7fff, longest_match_686 will be used, +; but this is not a sitation you'll find often +; +; B) Alternative +; if you are not interresed in old cpu performance and want the smaller +; binaries possible +; +; compile the asm file running +; ml /coff /Zi /c /Flgvmat32.lst /DNOOLDPENTIUMCODE gvmat32.asm +; and do not include gvmat32c.c in your project (ou define also +; NOOLDPENTIUMCODE) +; +; note : as I known, longest_match_686 is very faster than longest_match_7fff +; on pentium Pro/II/III, faster (but less) in P4, but it seem +; longest_match_7fff can be faster (very very litte) on AMD Athlon64/K8 +; +; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2 + +;uInt longest_match_7fff(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ + + NbStack equ 76 + cur_match equ dword ptr[esp+NbStack-0] + str_s equ dword ptr[esp+NbStack-4] +; 5 dword on top (ret,ebp,esi,edi,ebx) + adrret equ dword ptr[esp+NbStack-8] + pushebp equ dword ptr[esp+NbStack-12] + pushedi equ dword ptr[esp+NbStack-16] + pushesi equ dword ptr[esp+NbStack-20] + pushebx equ dword ptr[esp+NbStack-24] + + chain_length equ dword ptr [esp+NbStack-28] + limit equ dword ptr [esp+NbStack-32] + best_len equ dword ptr [esp+NbStack-36] + window equ dword ptr [esp+NbStack-40] + prev equ dword ptr [esp+NbStack-44] + scan_start equ word ptr [esp+NbStack-48] + wmask equ dword ptr [esp+NbStack-52] + match_start_ptr equ dword ptr [esp+NbStack-56] + nice_match equ dword ptr [esp+NbStack-60] + scan equ dword ptr [esp+NbStack-64] + + windowlen equ dword ptr [esp+NbStack-68] + match_start equ dword ptr [esp+NbStack-72] + strend equ dword ptr [esp+NbStack-76] + NbStackAdd equ (NbStack-24) + + .386p + + name gvmatch + .MODEL FLAT + + + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + zlib1222add equ 8 + +; Note : these value are good with a 8 bytes boundary pack structure + dep_chain_length equ 74h+zlib1222add + dep_window equ 30h+zlib1222add + dep_strstart equ 64h+zlib1222add + dep_prev_length equ 70h+zlib1222add + dep_nice_match equ 88h+zlib1222add + dep_w_size equ 24h+zlib1222add + dep_prev equ 38h+zlib1222add + dep_w_mask equ 2ch+zlib1222add + dep_good_match equ 84h+zlib1222add + dep_match_start equ 68h+zlib1222add + dep_lookahead equ 6ch+zlib1222add + + +_TEXT segment + +IFDEF NOUNDERLINE + IFDEF NOOLDPENTIUMCODE + public longest_match + public match_init + ELSE + public longest_match_7fff + public cpudetect32 + public longest_match_686 + ENDIF +ELSE + IFDEF NOOLDPENTIUMCODE + public _longest_match + public _match_init + ELSE + public _longest_match_7fff + public _cpudetect32 + public _longest_match_686 + ENDIF +ENDIF + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + + +IFNDEF NOOLDPENTIUMCODE +IFDEF NOUNDERLINE +longest_match_7fff proc near +ELSE +_longest_match_7fff proc near +ENDIF + + mov edx,[esp+4] + + + + push ebp + push edi + push esi + push ebx + + sub esp,NbStackAdd + +; initialize or check the variables used in match.asm. + mov ebp,edx + +; chain_length = s->max_chain_length +; if (prev_length>=good_match) chain_length >>= 2 + mov edx,[ebp+dep_chain_length] + mov ebx,[ebp+dep_prev_length] + cmp [ebp+dep_good_match],ebx + ja noshr + shr edx,2 +noshr: +; we increment chain_length because in the asm, the --chain_lenght is in the beginning of the loop + inc edx + mov edi,[ebp+dep_nice_match] + mov chain_length,edx + mov eax,[ebp+dep_lookahead] + cmp eax,edi +; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + jae nolookaheadnicematch + mov edi,eax +nolookaheadnicematch: +; best_len = s->prev_length + mov best_len,ebx + +; window = s->window + mov esi,[ebp+dep_window] + mov ecx,[ebp+dep_strstart] + mov window,esi + + mov nice_match,edi +; scan = window + strstart + add esi,ecx + mov scan,esi +; dx = *window + mov dx,word ptr [esi] +; bx = *(window+best_len-1) + mov bx,word ptr [esi+ebx-1] + add esi,MAX_MATCH-1 +; scan_start = *scan + mov scan_start,dx +; strend = scan + MAX_MATCH-1 + mov strend,esi +; bx = scan_end = *(window+best_len-1) + +; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +; s->strstart - (IPos)MAX_DIST(s) : NIL; + + mov esi,[ebp+dep_w_size] + sub esi,MIN_LOOKAHEAD +; here esi = MAX_DIST(s) + sub ecx,esi + ja nodist + xor ecx,ecx +nodist: + mov limit,ecx + +; prev = s->prev + mov edx,[ebp+dep_prev] + mov prev,edx + +; + mov edx,dword ptr [ebp+dep_match_start] + mov bp,scan_start + mov eax,cur_match + mov match_start,edx + + mov edx,window + mov edi,edx + add edi,best_len + mov esi,prev + dec edi +; windowlen = window + best_len -1 + mov windowlen,edi + + jmp beginloop2 + align 4 + +; here, in the loop +; eax = ax = cur_match +; ecx = limit +; bx = scan_end +; bp = scan_start +; edi = windowlen (window + best_len -1) +; esi = prev + + +;// here; chain_length <=16 +normalbeg0add16: + add chain_length,16 + jz exitloop +normalbeg0: + cmp word ptr[edi+eax],bx + je normalbeg2noroll +rcontlabnoroll: +; cur_match = prev[cur_match & wmask] + and eax,7fffh + mov ax,word ptr[esi+eax*2] +; if cur_match > limit, go to exitloop + cmp ecx,eax + jnb exitloop +; if --chain_length != 0, go to exitloop + dec chain_length + jnz normalbeg0 + jmp exitloop + +normalbeg2noroll: +; if (scan_start==*(cur_match+window)) goto normalbeg2 + cmp bp,word ptr[edx+eax] + jne rcontlabnoroll + jmp normalbeg2 + +contloop3: + mov edi,windowlen + +; cur_match = prev[cur_match & wmask] + and eax,7fffh + mov ax,word ptr[esi+eax*2] +; if cur_match > limit, go to exitloop + cmp ecx,eax +jnbexitloopshort1: + jnb exitloop +; if --chain_length != 0, go to exitloop + + +; begin the main loop +beginloop2: + sub chain_length,16+1 +; if chain_length <=16, don't use the unrolled loop + jna normalbeg0add16 + +do16: + cmp word ptr[edi+eax],bx + je normalbeg2dc0 + +maccn MACRO lab + and eax,7fffh + mov ax,word ptr[esi+eax*2] + cmp ecx,eax + jnb exitloop + cmp word ptr[edi+eax],bx + je lab + ENDM + +rcontloop0: + maccn normalbeg2dc1 + +rcontloop1: + maccn normalbeg2dc2 + +rcontloop2: + maccn normalbeg2dc3 + +rcontloop3: + maccn normalbeg2dc4 + +rcontloop4: + maccn normalbeg2dc5 + +rcontloop5: + maccn normalbeg2dc6 + +rcontloop6: + maccn normalbeg2dc7 + +rcontloop7: + maccn normalbeg2dc8 + +rcontloop8: + maccn normalbeg2dc9 + +rcontloop9: + maccn normalbeg2dc10 + +rcontloop10: + maccn short normalbeg2dc11 + +rcontloop11: + maccn short normalbeg2dc12 + +rcontloop12: + maccn short normalbeg2dc13 + +rcontloop13: + maccn short normalbeg2dc14 + +rcontloop14: + maccn short normalbeg2dc15 + +rcontloop15: + and eax,7fffh + mov ax,word ptr[esi+eax*2] + cmp ecx,eax + jnb exitloop + + sub chain_length,16 + ja do16 + jmp normalbeg0add16 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +normbeg MACRO rcontlab,valsub +; if we are here, we know that *(match+best_len-1) == scan_end + cmp bp,word ptr[edx+eax] +; if (match != scan_start) goto rcontlab + jne rcontlab +; calculate the good chain_length, and we'll compare scan and match string + add chain_length,16-valsub + jmp iseq + ENDM + + +normalbeg2dc11: + normbeg rcontloop11,11 + +normalbeg2dc12: + normbeg short rcontloop12,12 + +normalbeg2dc13: + normbeg short rcontloop13,13 + +normalbeg2dc14: + normbeg short rcontloop14,14 + +normalbeg2dc15: + normbeg short rcontloop15,15 + +normalbeg2dc10: + normbeg rcontloop10,10 + +normalbeg2dc9: + normbeg rcontloop9,9 + +normalbeg2dc8: + normbeg rcontloop8,8 + +normalbeg2dc7: + normbeg rcontloop7,7 + +normalbeg2dc6: + normbeg rcontloop6,6 + +normalbeg2dc5: + normbeg rcontloop5,5 + +normalbeg2dc4: + normbeg rcontloop4,4 + +normalbeg2dc3: + normbeg rcontloop3,3 + +normalbeg2dc2: + normbeg rcontloop2,2 + +normalbeg2dc1: + normbeg rcontloop1,1 + +normalbeg2dc0: + normbeg rcontloop0,0 + + +; we go in normalbeg2 because *(ushf*)(match+best_len-1) == scan_end + +normalbeg2: + mov edi,window + + cmp bp,word ptr[edi+eax] + jne contloop3 ; if *(ushf*)match != scan_start, continue + +iseq: +; if we are here, we know that *(match+best_len-1) == scan_end +; and (match == scan_start) + + mov edi,edx + mov esi,scan ; esi = scan + add edi,eax ; edi = window + cur_match = match + + mov edx,[esi+3] ; compare manually dword at match+3 + xor edx,[edi+3] ; and scan +3 + + jz begincompare ; if equal, go to long compare + +; we will determine the unmatch byte and calculate len (in esi) + or dl,dl + je eq1rr + mov esi,3 + jmp trfinval +eq1rr: + or dx,dx + je eq1 + + mov esi,4 + jmp trfinval +eq1: + and edx,0ffffffh + jz eq11 + mov esi,5 + jmp trfinval +eq11: + mov esi,6 + jmp trfinval + +begincompare: + ; here we now scan and match begin same + add edi,6 + add esi,6 + mov ecx,(MAX_MATCH-(2+4))/4 ; scan for at most MAX_MATCH bytes + repe cmpsd ; loop until mismatch + + je trfin ; go to trfin if not unmatch +; we determine the unmatch byte + sub esi,4 + mov edx,[edi-4] + xor edx,[esi] + + or dl,dl + jnz trfin + inc esi + + or dx,dx + jnz trfin + inc esi + + and edx,0ffffffh + jnz trfin + inc esi + +trfin: + sub esi,scan ; esi = len +trfinval: +; here we have finised compare, and esi contain len of equal string + cmp esi,best_len ; if len > best_len, go newbestlen + ja short newbestlen +; now we restore edx, ecx and esi, for the big loop + mov esi,prev + mov ecx,limit + mov edx,window + jmp contloop3 + +newbestlen: + mov best_len,esi ; len become best_len + + mov match_start,eax ; save new position as match_start + cmp esi,nice_match ; if best_len >= nice_match, exit + jae exitloop + mov ecx,scan + mov edx,window ; restore edx=window + add ecx,esi + add esi,edx + + dec esi + mov windowlen,esi ; windowlen = window + best_len-1 + mov bx,[ecx-1] ; bx = *(scan+best_len-1) = scan_end + +; now we restore ecx and esi, for the big loop : + mov esi,prev + mov ecx,limit + jmp contloop3 + +exitloop: +; exit : s->match_start=match_start + mov ebx,match_start + mov ebp,str_s + mov ecx,best_len + mov dword ptr [ebp+dep_match_start],ebx + mov eax,dword ptr [ebp+dep_lookahead] + cmp ecx,eax + ja minexlo + mov eax,ecx +minexlo: +; return min(best_len,s->lookahead) + +; restore stack and register ebx,esi,edi,ebp + add esp,NbStackAdd + + pop ebx + pop esi + pop edi + pop ebp + ret +InfoAuthor: +; please don't remove this string ! +; Your are free use gvmat32 in any fre or commercial apps if you don't remove the string in the binary! + db 0dh,0ah,"GVMat32 optimised assembly code written 1996-98 by Gilles Vollant",0dh,0ah + + + +IFDEF NOUNDERLINE +longest_match_7fff endp +ELSE +_longest_match_7fff endp +ENDIF + + +IFDEF NOUNDERLINE +cpudetect32 proc near +ELSE +_cpudetect32 proc near +ENDIF + + push ebx + + pushfd ; push original EFLAGS + pop eax ; get original EFLAGS + mov ecx, eax ; save original EFLAGS + xor eax, 40000h ; flip AC bit in EFLAGS + push eax ; save new EFLAGS value on stack + popfd ; replace current EFLAGS value + pushfd ; get new EFLAGS + pop eax ; store new EFLAGS in EAX + xor eax, ecx ; can’t toggle AC bit, processor=80386 + jz end_cpu_is_386 ; jump if 80386 processor + push ecx + popfd ; restore AC bit in EFLAGS first + + pushfd + pushfd + pop ecx + + mov eax, ecx ; get original EFLAGS + xor eax, 200000h ; flip ID bit in EFLAGS + push eax ; save new EFLAGS value on stack + popfd ; replace current EFLAGS value + pushfd ; get new EFLAGS + pop eax ; store new EFLAGS in EAX + popfd ; restore original EFLAGS + xor eax, ecx ; can’t toggle ID bit, + je is_old_486 ; processor=old + + mov eax,1 + db 0fh,0a2h ;CPUID + +exitcpudetect: + pop ebx + ret + +end_cpu_is_386: + mov eax,0300h + jmp exitcpudetect + +is_old_486: + mov eax,0400h + jmp exitcpudetect + +IFDEF NOUNDERLINE +cpudetect32 endp +ELSE +_cpudetect32 endp +ENDIF +ENDIF + +MAX_MATCH equ 258 +MIN_MATCH equ 3 +MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1) +MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h) + + +;;; stack frame offsets + +chainlenwmask equ esp + 0 ; high word: current chain len + ; low word: s->wmask +window equ esp + 4 ; local copy of s->window +windowbestlen equ esp + 8 ; s->window + bestlen +scanstart equ esp + 16 ; first two bytes of string +scanend equ esp + 12 ; last two bytes of string +scanalign equ esp + 20 ; dword-misalignment of string +nicematch equ esp + 24 ; a good enough match size +bestlen equ esp + 28 ; size of best match so far +scan equ esp + 32 ; ptr to string wanting match + +LocalVarsSize equ 36 +; saved ebx byte esp + 36 +; saved edi byte esp + 40 +; saved esi byte esp + 44 +; saved ebp byte esp + 48 +; return address byte esp + 52 +deflatestate equ esp + 56 ; the function arguments +curmatch equ esp + 60 + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +dsWSize equ 36+zlib1222add +dsWMask equ 44+zlib1222add +dsWindow equ 48+zlib1222add +dsPrev equ 56+zlib1222add +dsMatchLen equ 88+zlib1222add +dsPrevMatch equ 92+zlib1222add +dsStrStart equ 100+zlib1222add +dsMatchStart equ 104+zlib1222add +dsLookahead equ 108+zlib1222add +dsPrevLen equ 112+zlib1222add +dsMaxChainLen equ 116+zlib1222add +dsGoodMatch equ 132+zlib1222add +dsNiceMatch equ 136+zlib1222add + + +;;; match.asm -- Pentium-Pro-optimized version of longest_match() +;;; Written for zlib 1.1.2 +;;; Copyright (C) 1998 Brian Raiter +;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html +;;; +;;; This is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License. + +;GLOBAL _longest_match, _match_init + + +;SECTION .text + +;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch) + +;_longest_match: +IFDEF NOOLDPENTIUMCODE + IFDEF NOUNDERLINE + longest_match proc near + ELSE + _longest_match proc near + ENDIF +ELSE + IFDEF NOUNDERLINE + longest_match_686 proc near + ELSE + _longest_match_686 proc near + ENDIF +ENDIF + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + push ebp + push edi + push esi + push ebx + sub esp, LocalVarsSize + +;;; Retrieve the function arguments. ecx will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + + mov edx, [deflatestate] + mov ecx, [curmatch] + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov eax, [edx + dsPrevLen] + mov ebx, [edx + dsGoodMatch] + cmp eax, ebx + mov eax, [edx + dsWMask] + mov ebx, [edx + dsMaxChainLen] + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + mov [chainlenwmask], ebx + +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + mov eax, [edx + dsNiceMatch] + mov ebx, [edx + dsLookahead] + cmp ebx, eax + jl LookaheadLess + mov ebx, eax +LookaheadLess: mov [nicematch], ebx + +;;; register Bytef *scan = s->window + s->strstart; + + mov esi, [edx + dsWindow] + mov [window], esi + mov ebp, [edx + dsStrStart] + lea edi, [esi + ebp] + mov [scan], edi + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov eax, edi + neg eax + and eax, 3 + mov [scanalign], eax + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; + + mov eax, [edx + dsWSize] + sub eax, MIN_LOOKAHEAD + sub ebp, eax + jg LimitPositive + xor ebp, ebp +LimitPositive: + +;;; int best_len = s->prev_length; + + mov eax, [edx + dsPrevLen] + mov [bestlen], eax + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + add esi, eax + mov [windowbestlen], esi + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx ebx, word ptr [edi] + mov [scanstart], ebx + movzx ebx, word ptr [edi + eax - 1] + mov [scanend], ebx + mov edi, [edx + dsPrev] + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + jmp short LoopEntry + +align 4 + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; ecx = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and ecx, edx + movzx ecx, word ptr [edi + ecx*2] + cmp ecx, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow +LoopEntry: movzx eax, word ptr [esi + ecx - 1] + cmp eax, ebx + jnz LookupLoop + mov eax, [window] + movzx eax, word ptr [eax + ecx] + cmp eax, [scanstart] + jnz LookupLoop + +;;; Store the current value of chainlen. + + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + mov esi, [window] + mov edi, [scan] + add esi, ecx + mov eax, [scanalign] + mov edx, 0fffffef8h; -(MAX_MATCH_8) + lea edi, [edi + eax + 0108h] ;MAX_MATCH_8] + lea esi, [esi + eax + 0108h] ;MAX_MATCH_8] + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust edx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (esi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + +LoopCmps: + mov eax, [esi + edx] + xor eax, [edi + edx] + jnz LeaveLoopCmps + mov eax, [esi + edx + 4] + xor eax, [edi + edx + 4] + jnz LeaveLoopCmps4 + add edx, 8 + jnz LoopCmps + jmp short LenMaximum +LeaveLoopCmps4: add edx, 4 +LeaveLoopCmps: test eax, 0000FFFFh + jnz LenLower + add edx, 2 + shr eax, 16 +LenLower: sub al, 1 + adc edx, 0 + +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea eax, [edi + edx] + mov edi, [scan] + sub eax, edi + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. + + mov edx, [deflatestate] + mov ebx, [bestlen] + cmp eax, ebx + jg LongerMatch + mov esi, [windowbestlen] + mov edi, [edx + dsPrev] + mov ebx, [scanend] + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: mov ebx, [nicematch] + mov [bestlen], eax + mov [edx + dsMatchStart], ecx + cmp eax, ebx + jge LeaveNow + mov esi, [window] + add esi, eax + mov [windowbestlen], esi + movzx ebx, word ptr [edi + eax - 1] + mov edi, [edx + dsPrev] + mov [scanend], ebx + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: mov edx, [deflatestate] + mov dword ptr [bestlen], MAX_MATCH + mov [edx + dsMatchStart], ecx + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: + mov edx, [deflatestate] + mov ebx, [bestlen] + mov eax, [edx + dsLookahead] + cmp ebx, eax + jg LookaheadRet + mov eax, ebx +LookaheadRet: + +;;; Restore the stack and return from whence we came. + + add esp, LocalVarsSize + pop ebx + pop esi + pop edi + pop ebp + + ret +; please don't remove this string ! +; Your can freely use gvmat32 in any free or commercial app if you don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah + + +IFDEF NOOLDPENTIUMCODE + IFDEF NOUNDERLINE + longest_match endp + ELSE + _longest_match endp + ENDIF + + IFDEF NOUNDERLINE + match_init proc near + ret + match_init endp + ELSE + _match_init proc near + ret + _match_init endp + ENDIF +ELSE + IFDEF NOUNDERLINE + longest_match_686 endp + ELSE + _longest_match_686 endp + ENDIF +ENDIF + +_TEXT ends +end diff --git a/compat/zlib/contrib/masmx86/gvmat32.obj b/compat/zlib/contrib/masmx86/gvmat32.obj new file mode 100644 index 0000000..ebb3262 Binary files /dev/null and b/compat/zlib/contrib/masmx86/gvmat32.obj differ diff --git a/compat/zlib/contrib/masmx86/gvmat32c.c b/compat/zlib/contrib/masmx86/gvmat32c.c new file mode 100644 index 0000000..7ad2b27 --- /dev/null +++ b/compat/zlib/contrib/masmx86/gvmat32c.c @@ -0,0 +1,62 @@ +/* gvmat32.c -- C portion of the optimized longest_match for 32 bits x86 + * Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant. + * File written by Gilles Vollant, by modifiying the longest_match + * from Jean-loup Gailly in deflate.c + * it prepare all parameters and call the assembly longest_match_gvasm + * longest_match execute standard C code is wmask != 0x7fff + * (assembly code is faster with a fixed wmask) + * + * Read comment at beginning of gvmat32.asm for more information + */ + +#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) +#include "deflate.h" + +/* if your C compiler don't add underline before function name, + define ADD_UNDERLINE_ASMFUNC */ +#ifdef ADD_UNDERLINE_ASMFUNC +#define longest_match_7fff _longest_match_7fff +#define longest_match_686 _longest_match_686 +#define cpudetect32 _cpudetect32 +#endif + + +unsigned long cpudetect32(); + +uInt longest_match_c( + deflate_state *s, + IPos cur_match); /* current match */ + + +uInt longest_match_7fff( + deflate_state *s, + IPos cur_match); /* current match */ + +uInt longest_match_686( + deflate_state *s, + IPos cur_match); /* current match */ + + +static uInt iIsPPro=2; + +void match_init () +{ + iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0; +} + +uInt longest_match( + deflate_state *s, + IPos cur_match) /* current match */ +{ + if (iIsPPro!=0) + return longest_match_686(s,cur_match); + + if (s->w_mask != 0x7fff) + return longest_match_686(s,cur_match); + + /* now ((s->w_mask == 0x7fff) && (iIsPPro==0)) */ + return longest_match_7fff(s,cur_match); +} + + +#endif /* defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) */ diff --git a/compat/zlib/contrib/masmx86/inffas32.asm b/compat/zlib/contrib/masmx86/inffas32.asm new file mode 100644 index 0000000..4a20512 --- /dev/null +++ b/compat/zlib/contrib/masmx86/inffas32.asm @@ -0,0 +1,1083 @@ +;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding +; * +; * inffas32.asm is derivated from inffas86.c, with translation of assembly code +; * +; * Copyright (C) 1995-2003 Mark Adler +; * For conditions of distribution and use, see copyright notice in zlib.h +; * +; * Copyright (C) 2003 Chris Anderson +; * Please use the copyright conditions above. +; * +; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from +; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at +; * the moment. I have successfully compiled and tested this code with gcc2.96, +; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S +; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX +; * enabled. I will attempt to merge the MMX code into this version. Newer +; * versions of this and inffast.S can be found at +; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ +; * +; * 2005 : modification by Gilles Vollant +; */ +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is in directory \MASM611C of Win95 DDK +; ml.exe is also distributed in http://www.masm32.com/masmdl.htm +; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ +; +; +; compile with command line option +; ml /coff /Zi /c /Flinffas32.lst inffas32.asm + +; if you define NO_GZIP (see inflate.h), compile with +; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm + + +; zlib122sup is 0 fort zlib 1.2.2.1 and lower +; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head +; in inflate_state in inflate.h) +zlib1222sup equ 8 + + +IFDEF GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 +ELSE + IFNDEF NO_GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 + ELSE + INFLATE_MODE_TYPE equ 3 + INFLATE_MODE_BAD equ 17 + ENDIF +ENDIF + + +; 75 "inffast.S" +;FILE "inffast.S" + +;;;GLOBAL _inflate_fast + +;;;SECTION .text + + + + .586p + .mmx + + name inflate_fast_x86 + .MODEL FLAT + +_DATA segment +inflate_fast_use_mmx: + dd 1 + + +_TEXT segment +PUBLIC _inflate_fast + +ALIGN 4 +_inflate_fast: + jmp inflate_fast_entry + + + +ALIGN 4 + db 'Fast decoding Code from Chris Anderson' + db 0 + +ALIGN 4 +invalid_literal_length_code_msg: + db 'invalid literal/length code' + db 0 + +ALIGN 4 +invalid_distance_code_msg: + db 'invalid distance code' + db 0 + +ALIGN 4 +invalid_distance_too_far_msg: + db 'invalid distance too far back' + db 0 + + +ALIGN 4 +inflate_fast_mask: +dd 0 +dd 1 +dd 3 +dd 7 +dd 15 +dd 31 +dd 63 +dd 127 +dd 255 +dd 511 +dd 1023 +dd 2047 +dd 4095 +dd 8191 +dd 16383 +dd 32767 +dd 65535 +dd 131071 +dd 262143 +dd 524287 +dd 1048575 +dd 2097151 +dd 4194303 +dd 8388607 +dd 16777215 +dd 33554431 +dd 67108863 +dd 134217727 +dd 268435455 +dd 536870911 +dd 1073741823 +dd 2147483647 +dd 4294967295 + + +mode_state equ 0 ;/* state->mode */ +wsize_state equ (32+zlib1222sup) ;/* state->wsize */ +write_state equ (36+4+zlib1222sup) ;/* state->write */ +window_state equ (40+4+zlib1222sup) ;/* state->window */ +hold_state equ (44+4+zlib1222sup) ;/* state->hold */ +bits_state equ (48+4+zlib1222sup) ;/* state->bits */ +lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ +distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ +lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ +distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ + + +;;SECTION .text +; 205 "inffast.S" +;GLOBAL inflate_fast_use_mmx + +;SECTION .data + + +; GLOBAL inflate_fast_use_mmx:object +;.size inflate_fast_use_mmx, 4 +; 226 "inffast.S" +;SECTION .text + +ALIGN 4 +inflate_fast_entry: + push edi + push esi + push ebp + push ebx + pushfd + sub esp,64 + cld + + + + + mov esi, [esp+88] + mov edi, [esi+28] + + + + + + + + mov edx, [esi+4] + mov eax, [esi+0] + + add edx,eax + sub edx,11 + + mov [esp+44],eax + mov [esp+20],edx + + mov ebp, [esp+92] + mov ecx, [esi+16] + mov ebx, [esi+12] + + sub ebp,ecx + neg ebp + add ebp,ebx + + sub ecx,257 + add ecx,ebx + + mov [esp+60],ebx + mov [esp+40],ebp + mov [esp+16],ecx +; 285 "inffast.S" + mov eax, [edi+lencode_state] + mov ecx, [edi+distcode_state] + + mov [esp+8],eax + mov [esp+12],ecx + + mov eax,1 + mov ecx, [edi+lenbits_state] + shl eax,cl + dec eax + mov [esp+0],eax + + mov eax,1 + mov ecx, [edi+distbits_state] + shl eax,cl + dec eax + mov [esp+4],eax + + mov eax, [edi+wsize_state] + mov ecx, [edi+write_state] + mov edx, [edi+window_state] + + mov [esp+52],eax + mov [esp+48],ecx + mov [esp+56],edx + + mov ebp, [edi+hold_state] + mov ebx, [edi+bits_state] +; 321 "inffast.S" + mov esi, [esp+44] + mov ecx, [esp+20] + cmp ecx,esi + ja L_align_long + + add ecx,11 + sub ecx,esi + mov eax,12 + sub eax,ecx + lea edi, [esp+28] + rep movsb + mov ecx,eax + xor eax,eax + rep stosb + lea esi, [esp+28] + mov [esp+20],esi + jmp L_is_aligned + + +L_align_long: + test esi,3 + jz L_is_aligned + xor eax,eax + mov al, [esi] + inc esi + mov ecx,ebx + add ebx,8 + shl eax,cl + or ebp,eax + jmp L_align_long + +L_is_aligned: + mov edi, [esp+60] +; 366 "inffast.S" +L_check_mmx: + cmp dword ptr [inflate_fast_use_mmx],2 + je L_init_mmx + ja L_do_loop + + push eax + push ebx + push ecx + push edx + pushfd + mov eax, [esp] + xor dword ptr [esp],0200000h + + + + + popfd + pushfd + pop edx + xor edx,eax + jz L_dont_use_mmx + xor eax,eax + cpuid + cmp ebx,0756e6547h + jne L_dont_use_mmx + cmp ecx,06c65746eh + jne L_dont_use_mmx + cmp edx,049656e69h + jne L_dont_use_mmx + mov eax,1 + cpuid + shr eax,8 + and eax,15 + cmp eax,6 + jne L_dont_use_mmx + test edx,0800000h + jnz L_use_mmx + jmp L_dont_use_mmx +L_use_mmx: + mov dword ptr [inflate_fast_use_mmx],2 + jmp L_check_mmx_pop +L_dont_use_mmx: + mov dword ptr [inflate_fast_use_mmx],3 +L_check_mmx_pop: + pop edx + pop ecx + pop ebx + pop eax + jmp L_check_mmx +; 426 "inffast.S" +ALIGN 4 +L_do_loop: +; 437 "inffast.S" + cmp bl,15 + ja L_get_length_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_length_code: + mov edx, [esp+0] + mov ecx, [esp+8] + and edx,ebp + mov eax, [ecx+edx*4] + +L_dolen: + + + + + + + mov cl,ah + sub bl,ah + shr ebp,cl + + + + + + + test al,al + jnz L_test_for_length_base + + shr eax,16 + stosb + +L_while_test: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop + jmp L_break_loop + +L_test_for_length_base: +; 502 "inffast.S" + mov edx,eax + shr edx,16 + mov cl,al + + test al,16 + jz L_test_for_second_level_length + and cl,15 + jz L_save_len + cmp bl,cl + jae L_add_bits_to_len + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_len: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + +L_save_len: + mov [esp+24],edx + + +L_decode_distance: +; 549 "inffast.S" + cmp bl,15 + ja L_get_distance_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_distance_code: + mov edx, [esp+4] + mov ecx, [esp+12] + and edx,ebp + mov eax, [ecx+edx*4] + + +L_dodist: + mov edx,eax + shr edx,16 + mov cl,ah + sub bl,ah + shr ebp,cl +; 584 "inffast.S" + mov cl,al + + test al,16 + jz L_test_for_second_level_dist + and cl,15 + jz L_check_dist_one + cmp bl,cl + jae L_add_bits_to_dist + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_dist: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + jmp L_check_window + +L_check_window: +; 625 "inffast.S" + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,edx + jb L_clip_window + + mov ecx, [esp+24] + mov esi,edi + sub esi,edx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp edx,1 + jne L_check_window + cmp [esp+40],edi + je L_check_window + + dec edi + mov ecx, [esp+24] + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + + + + + test al,64 + jnz L_test_for_end_of_block + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+8] + mov eax, [edx+eax*4] + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + + + + + test al,64 + jnz L_invalid_distance_code + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+12] + mov eax, [edx+eax*4] + jmp L_dodist + +ALIGN 4 +L_clip_window: +; 721 "inffast.S" + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,edx + jb L_invalid_distance_too_far + + add ecx,edx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window + + sub eax,ecx + add esi,eax +; 749 "inffast.S" + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_wrap_around_window: +; 793 "inffast.S" + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_contiguous_in_window: +; 836 "inffast.S" + add esi,eax + sub esi,ecx + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + +L_do_copy1: +; 862 "inffast.S" + mov ecx,eax + rep movsb + + mov esi, [esp+44] + jmp L_while_test +; 878 "inffast.S" +ALIGN 4 +L_init_mmx: + emms + + + + + + movd mm0,ebp + mov ebp,ebx +; 896 "inffast.S" + movd mm4,[esp+0] + movq mm3,mm4 + movd mm5,[esp+4] + movq mm2,mm5 + pxor mm1,mm1 + mov ebx, [esp+8] + jmp L_do_loop_mmx + +ALIGN 4 +L_do_loop_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_length_code_mmx + + movd mm6,ebp + movd mm7,[esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_length_code_mmx: + pand mm4,mm0 + movd eax,mm4 + movq mm4,mm3 + mov eax, [ebx+eax*4] + +L_dolen_mmx: + movzx ecx,ah + movd mm1,ecx + sub ebp,ecx + + test al,al + jnz L_test_for_length_base_mmx + + shr eax,16 + stosb + +L_while_test_mmx: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop_mmx + jmp L_break_loop + +L_test_for_length_base_mmx: + + mov edx,eax + shr edx,16 + + test al,16 + jz L_test_for_second_level_length_mmx + and eax,15 + jz L_decode_distance_mmx + + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add edx,ecx + +L_decode_distance_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_dist_code_mmx + + movd mm6,ebp + movd mm7,[esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_dist_code_mmx: + mov ebx, [esp+12] + pand mm5,mm0 + movd eax,mm5 + movq mm5,mm2 + mov eax, [ebx+eax*4] + +L_dodist_mmx: + + movzx ecx,ah + mov ebx,eax + shr ebx,16 + sub ebp,ecx + movd mm1,ecx + + test al,16 + jz L_test_for_second_level_dist_mmx + and eax,15 + jz L_check_dist_one_mmx + +L_add_bits_to_dist_mmx: + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add ebx,ecx + +L_check_window_mmx: + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,ebx + jb L_clip_window_mmx + + mov ecx,edx + mov esi,edi + sub esi,ebx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_check_dist_one_mmx: + cmp ebx,1 + jne L_check_window_mmx + cmp [esp+40],edi + je L_check_window_mmx + + dec edi + mov ecx,edx + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_test_for_second_level_length_mmx: + test al,64 + jnz L_test_for_end_of_block + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + add ecx,edx + mov eax, [ebx+ecx*4] + jmp L_dolen_mmx + +ALIGN 4 +L_test_for_second_level_dist_mmx: + test al,64 + jnz L_invalid_distance_code + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + mov eax, [esp+12] + add ecx,ebx + mov eax, [eax+ecx*4] + jmp L_dodist_mmx + +ALIGN 4 +L_clip_window_mmx: + + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,ebx + jb L_invalid_distance_too_far + + add ecx,ebx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window_mmx + + sub eax,ecx + add esi,eax + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_wrap_around_window_mmx: + + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window_mmx + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_contiguous_in_window_mmx: + + add esi,eax + sub esi,ecx + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + +L_do_copy1_mmx: + + + mov ecx,edx + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx +; 1174 "inffast.S" +L_invalid_distance_code: + + + + + + mov ecx, invalid_distance_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_test_for_end_of_block: + + + + + + test al,32 + jz L_invalid_literal_length_code + + mov ecx,0 + mov edx,INFLATE_MODE_TYPE + jmp L_update_stream_state + +L_invalid_literal_length_code: + + + + + + mov ecx, invalid_literal_length_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_invalid_distance_too_far: + + + + mov esi, [esp+44] + mov ecx, invalid_distance_too_far_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_update_stream_state: + + mov eax, [esp+88] + test ecx,ecx + jz L_skip_msg + mov [eax+24],ecx +L_skip_msg: + mov eax, [eax+28] + mov [eax+mode_state],edx + jmp L_break_loop + +ALIGN 4 +L_break_loop: +; 1243 "inffast.S" + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_next_in + + + + mov ebx,ebp + +L_update_next_in: +; 1266 "inffast.S" + mov eax, [esp+88] + mov ecx,ebx + mov edx, [eax+28] + shr ecx,3 + sub esi,ecx + shl ecx,3 + sub ebx,ecx + mov [eax+12],edi + mov [edx+bits_state],ebx + mov ecx,ebx + + lea ebx, [esp+28] + cmp [esp+20],ebx + jne L_buf_not_used + + sub esi,ebx + mov ebx, [eax+0] + mov [esp+20],ebx + add esi,ebx + mov ebx, [eax+4] + sub ebx,11 + add [esp+20],ebx + +L_buf_not_used: + mov [eax+0],esi + + mov ebx,1 + shl ebx,cl + dec ebx + + + + + + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_hold + + + + psrlq mm0,mm1 + movd ebp,mm0 + + emms + +L_update_hold: + + + + and ebp,ebx + mov [edx+hold_state],ebp + + + + + mov ebx, [esp+20] + cmp ebx,esi + jbe L_last_is_smaller + + sub ebx,esi + add ebx,11 + mov [eax+4],ebx + jmp L_fixup_out +L_last_is_smaller: + sub esi,ebx + neg esi + add esi,11 + mov [eax+4],esi + + + + +L_fixup_out: + + mov ebx, [esp+16] + cmp ebx,edi + jbe L_end_is_smaller + + sub ebx,edi + add ebx,257 + mov [eax+16],ebx + jmp L_done +L_end_is_smaller: + sub edi,ebx + neg edi + add edi,257 + mov [eax+16],edi + + + + + +L_done: + add esp,64 + popfd + pop ebx + pop ebp + pop esi + pop edi + ret + +_TEXT ends +end diff --git a/compat/zlib/contrib/masmx86/inffas32.obj b/compat/zlib/contrib/masmx86/inffas32.obj new file mode 100644 index 0000000..bd6664d Binary files /dev/null and b/compat/zlib/contrib/masmx86/inffas32.obj differ diff --git a/compat/zlib/contrib/masmx86/mkasm.bat b/compat/zlib/contrib/masmx86/mkasm.bat new file mode 100755 index 0000000..70a51f8 --- /dev/null +++ b/compat/zlib/contrib/masmx86/mkasm.bat @@ -0,0 +1,3 @@ +cl /DASMV /I..\.. /O2 /c gvmat32c.c +ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm +ml /coff /Zi /c /Flinffas32.lst inffas32.asm diff --git a/compat/zlib/contrib/masmx86/readme.txt b/compat/zlib/contrib/masmx86/readme.txt new file mode 100644 index 0000000..7b57167 --- /dev/null +++ b/compat/zlib/contrib/masmx86/readme.txt @@ -0,0 +1,21 @@ + +Summary +------- +This directory contains ASM implementations of the functions +longest_match() and inflate_fast(). + + +Use instructions +---------------- +Copy these files into the zlib source directory, then run the +appropriate makefile, as suggested below. + + +Build instructions +------------------ +* With Microsoft C and MASM: +nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" + +* With Borland C and TASM: +make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" OBJPA="+gvmat32c.obj+gvmat32.obj+inffas32.obj" + diff --git a/compat/zlib/contrib/minizip/ChangeLogUnzip b/compat/zlib/contrib/minizip/ChangeLogUnzip new file mode 100644 index 0000000..50ca6a9 --- /dev/null +++ b/compat/zlib/contrib/minizip/ChangeLogUnzip @@ -0,0 +1,67 @@ +Change in 1.01e (12 feb 05) +- Fix in zipOpen2 for globalcomment (Rolf Kalbermatter) +- Fix possible memory leak in unzip.c (Zoran Stevanovic) + +Change in 1.01b (20 may 04) +- Integrate patch from Debian package (submited by Mark Brown) +- Add tools mztools from Xavier Roche + +Change in 1.01 (8 may 04) +- fix buffer overrun risk in unzip.c (Xavier Roche) +- fix a minor buffer insecurity in minizip.c (Mike Whittaker) + +Change in 1.00: (10 sept 03) +- rename to 1.00 +- cosmetic code change + +Change in 0.22: (19 May 03) +- crypting support (unless you define NOCRYPT) +- append file in existing zipfile + +Change in 0.21: (10 Mar 03) +- bug fixes + +Change in 0.17: (27 Jan 02) +- bug fixes + +Change in 0.16: (19 Jan 02) +- Support of ioapi for virtualize zip file access + +Change in 0.15: (19 Mar 98) +- fix memory leak in minizip.c + +Change in 0.14: (10 Mar 98) +- fix bugs in minizip.c sample for zipping big file +- fix problem in month in date handling +- fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for + comment handling + +Change in 0.13: (6 Mar 98) +- fix bugs in zip.c +- add real minizip sample + +Change in 0.12: (4 Mar 98) +- add zip.c and zip.h for creates .zip file +- fix change_file_date in miniunz.c for Unix (Jean-loup Gailly) +- fix miniunz.c for file without specific record for directory + +Change in 0.11: (3 Mar 98) +- fix bug in unzGetCurrentFileInfo for get extra field and comment +- enhance miniunz sample, remove the bad unztst.c sample + +Change in 0.10: (2 Mar 98) +- fix bug in unzReadCurrentFile +- rename unzip* to unz* function and structure +- remove Windows-like hungary notation variable name +- modify some structure in unzip.h +- add somes comment in source +- remove unzipGetcCurrentFile function +- replace ZUNZEXPORT by ZEXPORT +- add unzGetLocalExtrafield for get the local extrafield info +- add a new sample, miniunz.c + +Change in 0.4: (25 Feb 98) +- suppress the type unzipFileInZip. + Only on file in the zipfile can be open at the same time +- fix somes typo in code +- added tm_unz structure in unzip_file_info (date/time in readable format) diff --git a/compat/zlib/contrib/minizip/Makefile b/compat/zlib/contrib/minizip/Makefile new file mode 100644 index 0000000..84eaad2 --- /dev/null +++ b/compat/zlib/contrib/minizip/Makefile @@ -0,0 +1,25 @@ +CC=cc +CFLAGS=-O -I../.. + +UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a +ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a + +.c.o: + $(CC) -c $(CFLAGS) $*.c + +all: miniunz minizip + +miniunz: $(UNZ_OBJS) + $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) + +minizip: $(ZIP_OBJS) + $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) + +test: miniunz minizip + ./minizip test readme.txt + ./miniunz -l test.zip + mv readme.txt readme.old + ./miniunz test.zip + +clean: + /bin/rm -f *.o *~ minizip miniunz diff --git a/compat/zlib/contrib/minizip/crypt.h b/compat/zlib/contrib/minizip/crypt.h new file mode 100644 index 0000000..622f4bc --- /dev/null +++ b/compat/zlib/contrib/minizip/crypt.h @@ -0,0 +1,132 @@ +/* crypt.h -- base code for crypt/uncrypt ZIPfile + + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + This code is a modified version of crypting code in Infozip distribution + + The encryption/decryption parts of this source code (as opposed to the + non-echoing password parts) were originally written in Europe. The + whole source package can be freely distributed, including from the USA. + (Prior to January 2000, re-export from the US was a violation of US law.) + + This encryption code is a direct transcription of the algorithm from + Roger Schlafly, described by Phil Katz in the file appnote.txt. This + file (appnote.txt) is distributed with the PKZIP program (even in the + version without encryption capabilities). + + If you don't need crypting in your application, just define symbols + NOCRYPT and NOUNCRYPT. + + This code support the "Traditional PKWARE Encryption". + + The new AES encryption added on Zip format by Winzip (see the page + http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong + Encryption is not supported. +*/ + +#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) + +/*********************************************************************** + * Return the next byte in the pseudo-random sequence + */ +static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) +{ + unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an + * unpredictable manner on 16-bit systems; not a problem + * with any known compiler so far, though */ + + temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; + return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); +} + +/*********************************************************************** + * Update the encryption keys with the next byte of plain text + */ +static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) +{ + (*(pkeys+0)) = CRC32((*(pkeys+0)), c); + (*(pkeys+1)) += (*(pkeys+0)) & 0xff; + (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; + { + register int keyshift = (int)((*(pkeys+1)) >> 24); + (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); + } + return c; +} + + +/*********************************************************************** + * Initialize the encryption keys and the random header according to + * the given password. + */ +static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) +{ + *(pkeys+0) = 305419896L; + *(pkeys+1) = 591751049L; + *(pkeys+2) = 878082192L; + while (*passwd != '\0') { + update_keys(pkeys,pcrc_32_tab,(int)*passwd); + passwd++; + } +} + +#define zdecode(pkeys,pcrc_32_tab,c) \ + (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) + +#define zencode(pkeys,pcrc_32_tab,c,t) \ + (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) + +#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED + +#define RAND_HEAD_LEN 12 + /* "last resort" source for second part of crypt seed pattern */ +# ifndef ZCR_SEED2 +# define ZCR_SEED2 3141592654UL /* use PI as default pattern */ +# endif + +static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) + const char *passwd; /* password string */ + unsigned char *buf; /* where to write header */ + int bufSize; + unsigned long* pkeys; + const unsigned long* pcrc_32_tab; + unsigned long crcForCrypting; +{ + int n; /* index in random header */ + int t; /* temporary */ + int c; /* random byte */ + unsigned char header[RAND_HEAD_LEN-2]; /* random header */ + static unsigned calls = 0; /* ensure different random header each time */ + + if (bufSize> 7) & 0xff; + header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); + } + /* Encrypt random header (last two bytes is high word of crc) */ + init_keys(passwd, pkeys, pcrc_32_tab); + for (n = 0; n < RAND_HEAD_LEN-2; n++) + { + buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); + } + buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); + buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); + return n; +} + +#endif diff --git a/compat/zlib/contrib/minizip/ioapi.c b/compat/zlib/contrib/minizip/ioapi.c new file mode 100644 index 0000000..f1bee23 --- /dev/null +++ b/compat/zlib/contrib/minizip/ioapi.c @@ -0,0 +1,177 @@ +/* ioapi.c -- IO base function header for compress/uncompress .zip + files using zlib + zip or unzip API + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant +*/ + +#include +#include +#include + +#include "zlib.h" +#include "ioapi.h" + + + +/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +voidpf ZCALLBACK fopen_file_func OF(( + voidpf opaque, + const char* filename, + int mode)); + +uLong ZCALLBACK fread_file_func OF(( + voidpf opaque, + voidpf stream, + void* buf, + uLong size)); + +uLong ZCALLBACK fwrite_file_func OF(( + voidpf opaque, + voidpf stream, + const void* buf, + uLong size)); + +long ZCALLBACK ftell_file_func OF(( + voidpf opaque, + voidpf stream)); + +long ZCALLBACK fseek_file_func OF(( + voidpf opaque, + voidpf stream, + uLong offset, + int origin)); + +int ZCALLBACK fclose_file_func OF(( + voidpf opaque, + voidpf stream)); + +int ZCALLBACK ferror_file_func OF(( + voidpf opaque, + voidpf stream)); + + +voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) + voidpf opaque; + const char* filename; + int mode; +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = fopen(filename, mode_fopen); + return file; +} + + +uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) + voidpf opaque; + voidpf stream; + void* buf; + uLong size; +{ + uLong ret; + ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + + +uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size) + voidpf opaque; + voidpf stream; + const void* buf; + uLong size; +{ + uLong ret; + ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +long ZCALLBACK ftell_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + long ret; + ret = ftell((FILE *)stream); + return ret; +} + +long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) + voidpf opaque; + voidpf stream; + uLong offset; + int origin; +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + fseek((FILE *)stream, offset, fseek_origin); + return ret; +} + +int ZCALLBACK fclose_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + int ret; + ret = fclose((FILE *)stream); + return ret; +} + +int ZCALLBACK ferror_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + int ret; + ret = ferror((FILE *)stream); + return ret; +} + +void fill_fopen_filefunc (pzlib_filefunc_def) + zlib_filefunc_def* pzlib_filefunc_def; +{ + pzlib_filefunc_def->zopen_file = fopen_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell_file = ftell_file_func; + pzlib_filefunc_def->zseek_file = fseek_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} diff --git a/compat/zlib/contrib/minizip/ioapi.h b/compat/zlib/contrib/minizip/ioapi.h new file mode 100644 index 0000000..7d457ba --- /dev/null +++ b/compat/zlib/contrib/minizip/ioapi.h @@ -0,0 +1,75 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + files using zlib + zip or unzip API + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant +*/ + +#ifndef _ZLIBIOAPI_H +#define _ZLIBIOAPI_H + + +#define ZLIB_FILEFUNC_SEEK_CUR (1) +#define ZLIB_FILEFUNC_SEEK_END (2) +#define ZLIB_FILEFUNC_SEEK_SET (0) + +#define ZLIB_FILEFUNC_MODE_READ (1) +#define ZLIB_FILEFUNC_MODE_WRITE (2) +#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) + +#define ZLIB_FILEFUNC_MODE_EXISTING (4) +#define ZLIB_FILEFUNC_MODE_CREATE (8) + + +#ifndef ZCALLBACK + +#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) +#define ZCALLBACK CALLBACK +#else +#define ZCALLBACK +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); +typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); +typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); +typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); + +typedef struct zlib_filefunc_def_s +{ + open_file_func zopen_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell_file_func ztell_file; + seek_file_func zseek_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc_def; + + + +void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); + +#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) +#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) +#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) +#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) +#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) +#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) + + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/compat/zlib/contrib/minizip/iowin32.c b/compat/zlib/contrib/minizip/iowin32.c new file mode 100644 index 0000000..a9b5f78 --- /dev/null +++ b/compat/zlib/contrib/minizip/iowin32.c @@ -0,0 +1,270 @@ +/* iowin32.c -- IO base function header for compress/uncompress .zip + files using zlib + zip or unzip API + This IO API version uses the Win32 API (for Microsoft Windows) + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant +*/ + +#include + +#include "zlib.h" +#include "ioapi.h" +#include "iowin32.h" + +#ifndef INVALID_HANDLE_VALUE +#define INVALID_HANDLE_VALUE (0xFFFFFFFF) +#endif + +#ifndef INVALID_SET_FILE_POINTER +#define INVALID_SET_FILE_POINTER ((DWORD)-1) +#endif + +voidpf ZCALLBACK win32_open_file_func OF(( + voidpf opaque, + const char* filename, + int mode)); + +uLong ZCALLBACK win32_read_file_func OF(( + voidpf opaque, + voidpf stream, + void* buf, + uLong size)); + +uLong ZCALLBACK win32_write_file_func OF(( + voidpf opaque, + voidpf stream, + const void* buf, + uLong size)); + +long ZCALLBACK win32_tell_file_func OF(( + voidpf opaque, + voidpf stream)); + +long ZCALLBACK win32_seek_file_func OF(( + voidpf opaque, + voidpf stream, + uLong offset, + int origin)); + +int ZCALLBACK win32_close_file_func OF(( + voidpf opaque, + voidpf stream)); + +int ZCALLBACK win32_error_file_func OF(( + voidpf opaque, + voidpf stream)); + +typedef struct +{ + HANDLE hf; + int error; +} WIN32FILE_IOWIN; + +voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode) + voidpf opaque; + const char* filename; + int mode; +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = 0; + voidpf ret=NULL; + + dwDesiredAccess = dwShareMode = dwFlagsAndAttributes = 0; + + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + { + dwDesiredAccess = GENERIC_READ; + dwCreationDisposition = OPEN_EXISTING; + dwShareMode = FILE_SHARE_READ; + } + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + { + dwDesiredAccess = GENERIC_WRITE | GENERIC_READ; + dwCreationDisposition = OPEN_EXISTING; + } + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + { + dwDesiredAccess = GENERIC_WRITE | GENERIC_READ; + dwCreationDisposition = CREATE_ALWAYS; + } + + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, + dwCreationDisposition, dwFlagsAndAttributes, NULL); + + if (hFile == INVALID_HANDLE_VALUE) + hFile = NULL; + + if (hFile != NULL) + { + WIN32FILE_IOWIN w32fiow; + w32fiow.hf = hFile; + w32fiow.error = 0; + ret = malloc(sizeof(WIN32FILE_IOWIN)); + if (ret==NULL) + CloseHandle(hFile); + else *((WIN32FILE_IOWIN*)ret) = w32fiow; + } + return ret; +} + + +uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size) + voidpf opaque; + voidpf stream; + void* buf; + uLong size; +{ + uLong ret=0; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + if (hFile != NULL) + if (!ReadFile(hFile, buf, size, &ret, NULL)) + { + DWORD dwErr = GetLastError(); + if (dwErr == ERROR_HANDLE_EOF) + dwErr = 0; + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + } + + return ret; +} + + +uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size) + voidpf opaque; + voidpf stream; + const void* buf; + uLong size; +{ + uLong ret=0; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + + if (hFile !=NULL) + if (!WriteFile(hFile, buf, size, &ret, NULL)) + { + DWORD dwErr = GetLastError(); + if (dwErr == ERROR_HANDLE_EOF) + dwErr = 0; + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + } + + return ret; +} + +long ZCALLBACK win32_tell_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + long ret=-1; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + if (hFile != NULL) + { + DWORD dwSet = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); + if (dwSet == INVALID_SET_FILE_POINTER) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = -1; + } + else + ret=(long)dwSet; + } + return ret; +} + +long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin) + voidpf opaque; + voidpf stream; + uLong offset; + int origin; +{ + DWORD dwMoveMethod=0xFFFFFFFF; + HANDLE hFile = NULL; + + long ret=-1; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + dwMoveMethod = FILE_CURRENT; + break; + case ZLIB_FILEFUNC_SEEK_END : + dwMoveMethod = FILE_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + dwMoveMethod = FILE_BEGIN; + break; + default: return -1; + } + + if (hFile != NULL) + { + DWORD dwSet = SetFilePointer(hFile, offset, NULL, dwMoveMethod); + if (dwSet == INVALID_SET_FILE_POINTER) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = -1; + } + else + ret=0; + } + return ret; +} + +int ZCALLBACK win32_close_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + int ret=-1; + + if (stream!=NULL) + { + HANDLE hFile; + hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + if (hFile != NULL) + { + CloseHandle(hFile); + ret=0; + } + free(stream); + } + return ret; +} + +int ZCALLBACK win32_error_file_func (opaque, stream) + voidpf opaque; + voidpf stream; +{ + int ret=-1; + if (stream!=NULL) + { + ret = ((WIN32FILE_IOWIN*)stream) -> error; + } + return ret; +} + +void fill_win32_filefunc (pzlib_filefunc_def) + zlib_filefunc_def* pzlib_filefunc_def; +{ + pzlib_filefunc_def->zopen_file = win32_open_file_func; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell_file = win32_tell_file_func; + pzlib_filefunc_def->zseek_file = win32_seek_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque=NULL; +} diff --git a/compat/zlib/contrib/minizip/iowin32.h b/compat/zlib/contrib/minizip/iowin32.h new file mode 100644 index 0000000..a3a437a --- /dev/null +++ b/compat/zlib/contrib/minizip/iowin32.h @@ -0,0 +1,21 @@ +/* iowin32.h -- IO base function header for compress/uncompress .zip + files using zlib + zip or unzip API + This IO API version uses the Win32 API (for Microsoft Windows) + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant +*/ + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); + +#ifdef __cplusplus +} +#endif diff --git a/compat/zlib/contrib/minizip/miniunz.c b/compat/zlib/contrib/minizip/miniunz.c new file mode 100644 index 0000000..f599938 --- /dev/null +++ b/compat/zlib/contrib/minizip/miniunz.c @@ -0,0 +1,585 @@ +/* + miniunz.c + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant +*/ + + +#include +#include +#include +#include +#include +#include + +#ifdef unix +# include +# include +#else +# include +# include +#endif + +#include "unzip.h" + +#define CASESENSITIVITY (0) +#define WRITEBUFFERSIZE (8192) +#define MAXFILENAME (256) + +#ifdef WIN32 +#define USEWIN32IOAPI +#include "iowin32.h" +#endif +/* + mini unzip, demo of unzip package + + usage : + Usage : miniunz [-exvlo] file.zip [file_to_extract] [-d extractdir] + + list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT + if it exists +*/ + + +/* change_file_date : change the date/time of a file + filename : the filename of the file where date/time must be modified + dosdate : the new date at the MSDos format (4 bytes) + tmu_date : the SAME new date at the tm_unz format */ +void change_file_date(filename,dosdate,tmu_date) + const char *filename; + uLong dosdate; + tm_unz tmu_date; +{ +#ifdef WIN32 + HANDLE hFile; + FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite; + + hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE, + 0,NULL,OPEN_EXISTING,0,NULL); + GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite); + DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal); + LocalFileTimeToFileTime(&ftLocal,&ftm); + SetFileTime(hFile,&ftm,&ftLastAcc,&ftm); + CloseHandle(hFile); +#else +#ifdef unix + struct utimbuf ut; + struct tm newdate; + newdate.tm_sec = tmu_date.tm_sec; + newdate.tm_min=tmu_date.tm_min; + newdate.tm_hour=tmu_date.tm_hour; + newdate.tm_mday=tmu_date.tm_mday; + newdate.tm_mon=tmu_date.tm_mon; + if (tmu_date.tm_year > 1900) + newdate.tm_year=tmu_date.tm_year - 1900; + else + newdate.tm_year=tmu_date.tm_year ; + newdate.tm_isdst=-1; + + ut.actime=ut.modtime=mktime(&newdate); + utime(filename,&ut); +#endif +#endif +} + + +/* mymkdir and change_file_date are not 100 % portable + As I don't know well Unix, I wait feedback for the unix portion */ + +int mymkdir(dirname) + const char* dirname; +{ + int ret=0; +#ifdef WIN32 + ret = mkdir(dirname); +#else +#ifdef unix + ret = mkdir (dirname,0775); +#endif +#endif + return ret; +} + +int makedir (newdir) + char *newdir; +{ + char *buffer ; + char *p; + int len = (int)strlen(newdir); + + if (len <= 0) + return 0; + + buffer = (char*)malloc(len+1); + strcpy(buffer,newdir); + + if (buffer[len-1] == '/') { + buffer[len-1] = '\0'; + } + if (mymkdir(buffer) == 0) + { + free(buffer); + return 1; + } + + p = buffer+1; + while (1) + { + char hold; + + while(*p && *p != '\\' && *p != '/') + p++; + hold = *p; + *p = 0; + if ((mymkdir(buffer) == -1) && (errno == ENOENT)) + { + printf("couldn't create directory %s\n",buffer); + free(buffer); + return 0; + } + if (hold == 0) + break; + *p++ = hold; + } + free(buffer); + return 1; +} + +void do_banner() +{ + printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n"); + printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); +} + +void do_help() +{ + printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \ + " -e Extract without pathname (junk paths)\n" \ + " -x Extract with pathname\n" \ + " -v list files\n" \ + " -l list files\n" \ + " -d directory to extract into\n" \ + " -o overwrite files without prompting\n" \ + " -p extract crypted file using password\n\n"); +} + + +int do_list(uf) + unzFile uf; +{ + uLong i; + unz_global_info gi; + int err; + + err = unzGetGlobalInfo (uf,&gi); + if (err!=UNZ_OK) + printf("error %d with zipfile in unzGetGlobalInfo \n",err); + printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); + printf(" ------ ------ ---- ----- ---- ---- ------ ----\n"); + for (i=0;i0) + ratio = (file_info.compressed_size*100)/file_info.uncompressed_size; + + /* display a '*' if the file is crypted */ + if ((file_info.flag & 1) != 0) + charCrypt='*'; + + if (file_info.compression_method==0) + string_method="Stored"; + else + if (file_info.compression_method==Z_DEFLATED) + { + uInt iLevel=(uInt)((file_info.flag & 0x6)/2); + if (iLevel==0) + string_method="Defl:N"; + else if (iLevel==1) + string_method="Defl:X"; + else if ((iLevel==2) || (iLevel==3)) + string_method="Defl:F"; /* 2:fast , 3 : extra fast*/ + } + else + string_method="Unkn. "; + + printf("%7lu %6s%c%7lu %3lu%% %2.2lu-%2.2lu-%2.2lu %2.2lu:%2.2lu %8.8lx %s\n", + file_info.uncompressed_size,string_method, + charCrypt, + file_info.compressed_size, + ratio, + (uLong)file_info.tmu_date.tm_mon + 1, + (uLong)file_info.tmu_date.tm_mday, + (uLong)file_info.tmu_date.tm_year % 100, + (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min, + (uLong)file_info.crc,filename_inzip); + if ((i+1)='a') && (rep<='z')) + rep -= 0x20; + } + while ((rep!='Y') && (rep!='N') && (rep!='A')); + } + + if (rep == 'N') + skip = 1; + + if (rep == 'A') + *popt_overwrite=1; + } + + if ((skip==0) && (err==UNZ_OK)) + { + fout=fopen(write_filename,"wb"); + + /* some zipfile don't contain directory alone before file */ + if ((fout==NULL) && ((*popt_extract_without_path)==0) && + (filename_withoutpath!=(char*)filename_inzip)) + { + char c=*(filename_withoutpath-1); + *(filename_withoutpath-1)='\0'; + makedir(write_filename); + *(filename_withoutpath-1)=c; + fout=fopen(write_filename,"wb"); + } + + if (fout==NULL) + { + printf("error opening %s\n",write_filename); + } + } + + if (fout!=NULL) + { + printf(" extracting: %s\n",write_filename); + + do + { + err = unzReadCurrentFile(uf,buf,size_buf); + if (err<0) + { + printf("error %d with zipfile in unzReadCurrentFile\n",err); + break; + } + if (err>0) + if (fwrite(buf,err,1,fout)!=1) + { + printf("error in writing extracted file\n"); + err=UNZ_ERRNO; + break; + } + } + while (err>0); + if (fout) + fclose(fout); + + if (err==0) + change_file_date(write_filename,file_info.dosDate, + file_info.tmu_date); + } + + if (err==UNZ_OK) + { + err = unzCloseCurrentFile (uf); + if (err!=UNZ_OK) + { + printf("error %d with zipfile in unzCloseCurrentFile\n",err); + } + } + else + unzCloseCurrentFile(uf); /* don't lose the error */ + } + + free(buf); + return err; +} + + +int do_extract(uf,opt_extract_without_path,opt_overwrite,password) + unzFile uf; + int opt_extract_without_path; + int opt_overwrite; + const char* password; +{ + uLong i; + unz_global_info gi; + int err; + FILE* fout=NULL; + + err = unzGetGlobalInfo (uf,&gi); + if (err!=UNZ_OK) + printf("error %d with zipfile in unzGetGlobalInfo \n",err); + + for (i=0;i +#include +#include +#include +#include +#include + +#ifdef unix +# include +# include +# include +# include +#else +# include +# include +#endif + +#include "zip.h" + +#ifdef WIN32 +#define USEWIN32IOAPI +#include "iowin32.h" +#endif + + + +#define WRITEBUFFERSIZE (16384) +#define MAXFILENAME (256) + +#ifdef WIN32 +uLong filetime(f, tmzip, dt) + char *f; /* name of file to get info on */ + tm_zip *tmzip; /* return value: access, modific. and creation times */ + uLong *dt; /* dostime */ +{ + int ret = 0; + { + FILETIME ftLocal; + HANDLE hFind; + WIN32_FIND_DATA ff32; + + hFind = FindFirstFile(f,&ff32); + if (hFind != INVALID_HANDLE_VALUE) + { + FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal); + FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0); + FindClose(hFind); + ret = 1; + } + } + return ret; +} +#else +#ifdef unix +uLong filetime(f, tmzip, dt) + char *f; /* name of file to get info on */ + tm_zip *tmzip; /* return value: access, modific. and creation times */ + uLong *dt; /* dostime */ +{ + int ret=0; + struct stat s; /* results of stat() */ + struct tm* filedate; + time_t tm_t=0; + + if (strcmp(f,"-")!=0) + { + char name[MAXFILENAME+1]; + int len = strlen(f); + if (len > MAXFILENAME) + len = MAXFILENAME; + + strncpy(name, f,MAXFILENAME-1); + /* strncpy doesnt append the trailing NULL, of the string is too long. */ + name[ MAXFILENAME ] = '\0'; + + if (name[len - 1] == '/') + name[len - 1] = '\0'; + /* not all systems allow stat'ing a file with / appended */ + if (stat(name,&s)==0) + { + tm_t = s.st_mtime; + ret = 1; + } + } + filedate = localtime(&tm_t); + + tmzip->tm_sec = filedate->tm_sec; + tmzip->tm_min = filedate->tm_min; + tmzip->tm_hour = filedate->tm_hour; + tmzip->tm_mday = filedate->tm_mday; + tmzip->tm_mon = filedate->tm_mon ; + tmzip->tm_year = filedate->tm_year; + + return ret; +} +#else +uLong filetime(f, tmzip, dt) + char *f; /* name of file to get info on */ + tm_zip *tmzip; /* return value: access, modific. and creation times */ + uLong *dt; /* dostime */ +{ + return 0; +} +#endif +#endif + + + + +int check_exist_file(filename) + const char* filename; +{ + FILE* ftestexist; + int ret = 1; + ftestexist = fopen(filename,"rb"); + if (ftestexist==NULL) + ret = 0; + else + fclose(ftestexist); + return ret; +} + +void do_banner() +{ + printf("MiniZip 1.01b, demo of zLib + Zip package written by Gilles Vollant\n"); + printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); +} + +void do_help() +{ + printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] file.zip [files_to_add]\n\n" \ + " -o Overwrite existing file.zip\n" \ + " -a Append to existing file.zip\n" \ + " -0 Store only\n" \ + " -1 Compress faster\n" \ + " -9 Compress better\n\n"); +} + +/* calculate the CRC32 of a file, + because to encrypt a file, we need known the CRC32 of the file before */ +int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc) +{ + unsigned long calculate_crc=0; + int err=ZIP_OK; + FILE * fin = fopen(filenameinzip,"rb"); + unsigned long size_read = 0; + unsigned long total_read = 0; + if (fin==NULL) + { + err = ZIP_ERRNO; + } + + if (err == ZIP_OK) + do + { + err = ZIP_OK; + size_read = (int)fread(buf,1,size_buf,fin); + if (size_read < size_buf) + if (feof(fin)==0) + { + printf("error in reading %s\n",filenameinzip); + err = ZIP_ERRNO; + } + + if (size_read>0) + calculate_crc = crc32(calculate_crc,buf,size_read); + total_read += size_read; + + } while ((err == ZIP_OK) && (size_read>0)); + + if (fin) + fclose(fin); + + *result_crc=calculate_crc; + printf("file %s crc %x\n",filenameinzip,calculate_crc); + return err; +} + +int main(argc,argv) + int argc; + char *argv[]; +{ + int i; + int opt_overwrite=0; + int opt_compress_level=Z_DEFAULT_COMPRESSION; + int zipfilenamearg = 0; + char filename_try[MAXFILENAME+16]; + int zipok; + int err=0; + int size_buf=0; + void* buf=NULL; + const char* password=NULL; + + + do_banner(); + if (argc==1) + { + do_help(); + return 0; + } + else + { + for (i=1;i='0') && (c<='9')) + opt_compress_level = c-'0'; + + if (((c=='p') || (c=='P')) && (i+1='a') && (rep<='z')) + rep -= 0x20; + } + while ((rep!='Y') && (rep!='N') && (rep!='A')); + if (rep=='N') + zipok = 0; + if (rep=='A') + opt_overwrite = 2; + } + } + + if (zipok==1) + { + zipFile zf; + int errclose; +# ifdef USEWIN32IOAPI + zlib_filefunc_def ffunc; + fill_win32_filefunc(&ffunc); + zf = zipOpen2(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc); +# else + zf = zipOpen(filename_try,(opt_overwrite==2) ? 2 : 0); +# endif + + if (zf == NULL) + { + printf("error opening %s\n",filename_try); + err= ZIP_ERRNO; + } + else + printf("creating %s\n",filename_try); + + for (i=zipfilenamearg+1;(i='0') || (argv[i][1]<='9'))) && + (strlen(argv[i]) == 2))) + { + FILE * fin; + int size_read; + const char* filenameinzip = argv[i]; + zip_fileinfo zi; + unsigned long crcFile=0; + + zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour = + zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0; + zi.dosDate = 0; + zi.internal_fa = 0; + zi.external_fa = 0; + filetime(filenameinzip,&zi.tmz_date,&zi.dosDate); + +/* + err = zipOpenNewFileInZip(zf,filenameinzip,&zi, + NULL,0,NULL,0,NULL / * comment * /, + (opt_compress_level != 0) ? Z_DEFLATED : 0, + opt_compress_level); +*/ + if ((password != NULL) && (err==ZIP_OK)) + err = getFileCrc(filenameinzip,buf,size_buf,&crcFile); + + err = zipOpenNewFileInZip3(zf,filenameinzip,&zi, + NULL,0,NULL,0,NULL /* comment*/, + (opt_compress_level != 0) ? Z_DEFLATED : 0, + opt_compress_level,0, + /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */ + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + password,crcFile); + + if (err != ZIP_OK) + printf("error in opening %s in zipfile\n",filenameinzip); + else + { + fin = fopen(filenameinzip,"rb"); + if (fin==NULL) + { + err=ZIP_ERRNO; + printf("error in opening %s for reading\n",filenameinzip); + } + } + + if (err == ZIP_OK) + do + { + err = ZIP_OK; + size_read = (int)fread(buf,1,size_buf,fin); + if (size_read < size_buf) + if (feof(fin)==0) + { + printf("error in reading %s\n",filenameinzip); + err = ZIP_ERRNO; + } + + if (size_read>0) + { + err = zipWriteInFileInZip (zf,buf,size_read); + if (err<0) + { + printf("error in writing %s in the zipfile\n", + filenameinzip); + } + + } + } while ((err == ZIP_OK) && (size_read>0)); + + if (fin) + fclose(fin); + + if (err<0) + err=ZIP_ERRNO; + else + { + err = zipCloseFileInZip(zf); + if (err!=ZIP_OK) + printf("error in closing %s in the zipfile\n", + filenameinzip); + } + } + } + errclose = zipClose(zf,NULL); + if (errclose != ZIP_OK) + printf("error in closing %s\n",filename_try); + } + else + { + do_help(); + } + + free(buf); + return 0; +} diff --git a/compat/zlib/contrib/minizip/mztools.c b/compat/zlib/contrib/minizip/mztools.c new file mode 100644 index 0000000..8a50ee4 --- /dev/null +++ b/compat/zlib/contrib/minizip/mztools.c @@ -0,0 +1,281 @@ +/* + Additional tools for Minizip + Code: Xavier Roche '2004 + License: Same as ZLIB (www.gzip.org) +*/ + +/* Code */ +#include +#include +#include +#include "zlib.h" +#include "unzip.h" + +#define READ_8(adr) ((unsigned char)*(adr)) +#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) +#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) + +#define WRITE_8(buff, n) do { \ + *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ +} while(0) +#define WRITE_16(buff, n) do { \ + WRITE_8((unsigned char*)(buff), n); \ + WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \ +} while(0) +#define WRITE_32(buff, n) do { \ + WRITE_16((unsigned char*)(buff), (n) & 0xffff); \ + WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ +} while(0) + +extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) +const char* file; +const char* fileOut; +const char* fileOutTmp; +uLong* nRecovered; +uLong* bytesRecovered; +{ + int err = Z_OK; + FILE* fpZip = fopen(file, "rb"); + FILE* fpOut = fopen(fileOut, "wb"); + FILE* fpOutCD = fopen(fileOutTmp, "wb"); + if (fpZip != NULL && fpOut != NULL) { + int entries = 0; + uLong totalBytes = 0; + char header[30]; + char filename[256]; + char extra[1024]; + int offset = 0; + int offsetCD = 0; + while ( fread(header, 1, 30, fpZip) == 30 ) { + int currentOffset = offset; + + /* File entry */ + if (READ_32(header) == 0x04034b50) { + unsigned int version = READ_16(header + 4); + unsigned int gpflag = READ_16(header + 6); + unsigned int method = READ_16(header + 8); + unsigned int filetime = READ_16(header + 10); + unsigned int filedate = READ_16(header + 12); + unsigned int crc = READ_32(header + 14); /* crc */ + unsigned int cpsize = READ_32(header + 18); /* compressed size */ + unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */ + unsigned int fnsize = READ_16(header + 26); /* file name length */ + unsigned int extsize = READ_16(header + 28); /* extra field length */ + filename[0] = extra[0] = '\0'; + + /* Header */ + if (fwrite(header, 1, 30, fpOut) == 30) { + offset += 30; + } else { + err = Z_ERRNO; + break; + } + + /* Filename */ + if (fnsize > 0) { + if (fread(filename, 1, fnsize, fpZip) == fnsize) { + if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { + offset += fnsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_STREAM_ERROR; + break; + } + + /* Extra field */ + if (extsize > 0) { + if (fread(extra, 1, extsize, fpZip) == extsize) { + if (fwrite(extra, 1, extsize, fpOut) == extsize) { + offset += extsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_ERRNO; + break; + } + } + + /* Data */ + { + int dataSize = cpsize; + if (dataSize == 0) { + dataSize = uncpsize; + } + if (dataSize > 0) { + char* data = malloc(dataSize); + if (data != NULL) { + if ((int)fread(data, 1, dataSize, fpZip) == dataSize) { + if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) { + offset += dataSize; + totalBytes += dataSize; + } else { + err = Z_ERRNO; + } + } else { + err = Z_ERRNO; + } + free(data); + if (err != Z_OK) { + break; + } + } else { + err = Z_MEM_ERROR; + break; + } + } + } + + /* Central directory entry */ + { + char header[46]; + char* comment = ""; + int comsize = (int) strlen(comment); + WRITE_32(header, 0x02014b50); + WRITE_16(header + 4, version); + WRITE_16(header + 6, version); + WRITE_16(header + 8, gpflag); + WRITE_16(header + 10, method); + WRITE_16(header + 12, filetime); + WRITE_16(header + 14, filedate); + WRITE_32(header + 16, crc); + WRITE_32(header + 20, cpsize); + WRITE_32(header + 24, uncpsize); + WRITE_16(header + 28, fnsize); + WRITE_16(header + 30, extsize); + WRITE_16(header + 32, comsize); + WRITE_16(header + 34, 0); /* disk # */ + WRITE_16(header + 36, 0); /* int attrb */ + WRITE_32(header + 38, 0); /* ext attrb */ + WRITE_32(header + 42, currentOffset); + /* Header */ + if (fwrite(header, 1, 46, fpOutCD) == 46) { + offsetCD += 46; + + /* Filename */ + if (fnsize > 0) { + if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { + offsetCD += fnsize; + } else { + err = Z_ERRNO; + break; + } + } else { + err = Z_STREAM_ERROR; + break; + } + + /* Extra field */ + if (extsize > 0) { + if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { + offsetCD += extsize; + } else { + err = Z_ERRNO; + break; + } + } + + /* Comment field */ + if (comsize > 0) { + if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { + offsetCD += comsize; + } else { + err = Z_ERRNO; + break; + } + } + + + } else { + err = Z_ERRNO; + break; + } + } + + /* Success */ + entries++; + + } else { + break; + } + } + + /* Final central directory */ + { + int entriesZip = entries; + char header[22]; + char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; + int comsize = (int) strlen(comment); + if (entriesZip > 0xffff) { + entriesZip = 0xffff; + } + WRITE_32(header, 0x06054b50); + WRITE_16(header + 4, 0); /* disk # */ + WRITE_16(header + 6, 0); /* disk # */ + WRITE_16(header + 8, entriesZip); /* hack */ + WRITE_16(header + 10, entriesZip); /* hack */ + WRITE_32(header + 12, offsetCD); /* size of CD */ + WRITE_32(header + 16, offset); /* offset to CD */ + WRITE_16(header + 20, comsize); /* comment */ + + /* Header */ + if (fwrite(header, 1, 22, fpOutCD) == 22) { + + /* Comment field */ + if (comsize > 0) { + if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { + err = Z_ERRNO; + } + } + + } else { + err = Z_ERRNO; + } + } + + /* Final merge (file + central directory) */ + fclose(fpOutCD); + if (err == Z_OK) { + fpOutCD = fopen(fileOutTmp, "rb"); + if (fpOutCD != NULL) { + int nRead; + char buffer[8192]; + while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) { + if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) { + err = Z_ERRNO; + break; + } + } + fclose(fpOutCD); + } + } + + /* Close */ + fclose(fpZip); + fclose(fpOut); + + /* Wipe temporary file */ + (void)remove(fileOutTmp); + + /* Number of recovered entries */ + if (err == Z_OK) { + if (nRecovered != NULL) { + *nRecovered = entries; + } + if (bytesRecovered != NULL) { + *bytesRecovered = totalBytes; + } + } + } else { + err = Z_STREAM_ERROR; + } + return err; +} diff --git a/compat/zlib/contrib/minizip/mztools.h b/compat/zlib/contrib/minizip/mztools.h new file mode 100644 index 0000000..eee78dc --- /dev/null +++ b/compat/zlib/contrib/minizip/mztools.h @@ -0,0 +1,31 @@ +/* + Additional tools for Minizip + Code: Xavier Roche '2004 + License: Same as ZLIB (www.gzip.org) +*/ + +#ifndef _zip_tools_H +#define _zip_tools_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#include "unzip.h" + +/* Repair a ZIP file (missing central directory) + file: file to recover + fileOut: output file after recovery + fileOutTmp: temporary file name used for recovery +*/ +extern int ZEXPORT unzRepair(const char* file, + const char* fileOut, + const char* fileOutTmp, + uLong* nRecovered, + uLong* bytesRecovered); + +#endif diff --git a/compat/zlib/contrib/minizip/unzip.c b/compat/zlib/contrib/minizip/unzip.c new file mode 100644 index 0000000..9ad4766 --- /dev/null +++ b/compat/zlib/contrib/minizip/unzip.c @@ -0,0 +1,1598 @@ +/* unzip.c -- IO for uncompress .zip files using zlib + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + Read unzip.h for more info +*/ + +/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of +compatibility with older software. The following is from the original crypt.c. Code +woven in by Terry Thorsen 1/2003. +*/ +/* + Copyright (c) 1990-2000 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2000-Apr-09 or later + (the contents of which are also included in zip.h) for terms of use. + If, for some reason, all these files are missing, the Info-ZIP license + also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html +*/ +/* + crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] + + The encryption/decryption parts of this source code (as opposed to the + non-echoing password parts) were originally written in Europe. The + whole source package can be freely distributed, including from the USA. + (Prior to January 2000, re-export from the US was a violation of US law.) + */ + +/* + This encryption code is a direct transcription of the algorithm from + Roger Schlafly, described by Phil Katz in the file appnote.txt. This + file (appnote.txt) is distributed with the PKZIP program (even in the + version without encryption capabilities). + */ + + +#include +#include +#include +#include "zlib.h" +#include "unzip.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + + +#ifndef CASESENSITIVITYDEFAULT_NO +# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) +# define CASESENSITIVITYDEFAULT_NO +# endif +#endif + + +#ifndef UNZ_BUFSIZE +#define UNZ_BUFSIZE (16384) +#endif + +#ifndef UNZ_MAXFILENAMEINZIP +#define UNZ_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) + + + + +const char unz_copyright[] = + " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + +/* unz_file_info_interntal contain internal info about a file in zipfile*/ +typedef struct unz_file_info_internal_s +{ + uLong offset_curfile;/* relative offset of local header 4 bytes */ +} unz_file_info_internal; + + +/* file_in_zip_read_info_s contain internal information about a file in zipfile, + when reading and decompress it */ +typedef struct +{ + char *read_buffer; /* internal buffer for compressed data */ + z_stream stream; /* zLib stream structure for inflate */ + + uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ + uLong stream_initialised; /* flag set if stream structure is initialised*/ + + uLong offset_local_extrafield;/* offset of the local extra field */ + uInt size_local_extrafield;/* size of the local extra field */ + uLong pos_local_extrafield; /* position in the local extra field in read*/ + + uLong crc32; /* crc32 of all data uncompressed */ + uLong crc32_wait; /* crc32 we must obtain after decompress all */ + uLong rest_read_compressed; /* number of byte to be decompressed */ + uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/ + zlib_filefunc_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + uLong compression_method; /* compression method (0==store) */ + uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + int raw; +} file_in_zip_read_info_s; + + +/* unz_s contain internal information about the zipfile +*/ +typedef struct +{ + zlib_filefunc_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + unz_global_info gi; /* public global information */ + uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + uLong num_file; /* number of the current file in the zipfile*/ + uLong pos_in_central_dir; /* pos of the current file in the central dir*/ + uLong current_file_ok; /* flag about the usability of the current file*/ + uLong central_pos; /* position of the beginning of the central dir*/ + + uLong size_central_dir; /* size of the central directory */ + uLong offset_central_dir; /* offset of start of central directory with + respect to the starting disk number */ + + unz_file_info cur_file_info; /* public info about the current file in zip*/ + unz_file_info_internal cur_file_info_internal; /* private info about it*/ + file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current + file if we are decompressing it */ + int encrypted; +# ifndef NOUNCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const unsigned long* pcrc_32_tab; +# endif +} unz_s; + + +#ifndef NOUNCRYPT +#include "crypt.h" +#endif + +/* =========================================================================== + Read a byte from a gz_stream; update next_in and avail_in. Return EOF + for end of file. + IN assertion: the stream s has been sucessfully opened for reading. +*/ + + +local int unzlocal_getByte OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + int *pi)); + +local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + int *pi; +{ + unsigned char c; + int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return UNZ_OK; + } + else + { + if (ZERROR(*pzlib_filefunc_def,filestream)) + return UNZ_ERRNO; + else + return UNZ_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int unzlocal_getShort OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int unzlocal_getLong OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<16; + + if (err==UNZ_OK) + err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} + + +/* My own strcmpi / strcasecmp */ +local int strcmpcasenosensitive_internal (fileName1,fileName2) + const char* fileName1; + const char* fileName2; +{ + for (;;) + { + char c1=*(fileName1++); + char c2=*(fileName2++); + if ((c1>='a') && (c1<='z')) + c1 -= 0x20; + if ((c2>='a') && (c2<='z')) + c2 -= 0x20; + if (c1=='\0') + return ((c2=='\0') ? 0 : -1); + if (c2=='\0') + return 1; + if (c1c2) + return 1; + } +} + + +#ifdef CASESENSITIVITYDEFAULT_NO +#define CASESENSITIVITYDEFAULTVALUE 2 +#else +#define CASESENSITIVITYDEFAULTVALUE 1 +#endif + +#ifndef STRCMPCASENOSENTIVEFUNCTION +#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal +#endif + +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) + +*/ +extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity) + const char* fileName1; + const char* fileName2; + int iCaseSensitivity; +{ + if (iCaseSensitivity==0) + iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; + + if (iCaseSensitivity==1) + return strcmp(fileName1,fileName2); + + return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif + +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local uLong unzlocal_SearchCentralDir OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream)); + +local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; +{ + unsigned char* buf; + uLong uSizeFile; + uLong uBackRead; + uLong uMaxBack=0xffff; /* maximum size of global comment */ + uLong uPosFound=0; + + if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); + if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} + +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer + "zlib/zlib114.zip". + If the zipfile cannot be opened (file doesn't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. +*/ +extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) + const char *path; + zlib_filefunc_def* pzlib_filefunc_def; +{ + unz_s us; + unz_s *s; + uLong central_pos,uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + uLong number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + + int err=UNZ_OK; + + if (unz_copyright[0]!=' ') + return NULL; + + if (pzlib_filefunc_def==NULL) + fill_fopen_filefunc(&us.z_filefunc); + else + us.z_filefunc = *pzlib_filefunc_def; + + us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque, + path, + ZLIB_FILEFUNC_MODE_READ | + ZLIB_FILEFUNC_MODE_EXISTING); + if (us.filestream==NULL) + return NULL; + + central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream); + if (central_pos==0) + err=UNZ_ERRNO; + + if (ZSEEK(us.z_filefunc, us.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + /* the signature, already checked */ + if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of this disk */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of the disk with the start of the central directory */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central dir on this disk */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central dir */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + /* zipfile comment length */ + if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) + err=UNZ_ERRNO; + + if ((central_pospfile_in_zip_read!=NULL) + unzCloseCurrentFile(file); + + ZCLOSE(s->z_filefunc, s->filestream); + TRYFREE(s); + return UNZ_OK; +} + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ +extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info) + unzFile file; + unz_global_info *pglobal_info; +{ + unz_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + *pglobal_info=s->gi; + return UNZ_OK; +} + + +/* + Translate date/time from Dos format to tm_unz (readable more easilty) +*/ +local void unzlocal_DosDateToTmuDate (ulDosDate, ptm) + uLong ulDosDate; + tm_unz* ptm; +{ + uLong uDate; + uDate = (uLong)(ulDosDate>>16); + ptm->tm_mday = (uInt)(uDate&0x1f) ; + ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; + ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; + + ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); + ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; + ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; +} + +/* + Get Info about the current file in the zipfile, with internal only info +*/ +local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, + unz_file_info *pfile_info, + unz_file_info_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); + +local int unzlocal_GetCurrentFileInfoInternal (file, + pfile_info, + pfile_info_internal, + szFileName, fileNameBufferSize, + extraField, extraFieldBufferSize, + szComment, commentBufferSize) + unzFile file; + unz_file_info *pfile_info; + unz_file_info_internal *pfile_info_internal; + char *szFileName; + uLong fileNameBufferSize; + void *extraField; + uLong extraFieldBufferSize; + char *szComment; + uLong commentBufferSize; +{ + unz_s* s; + unz_file_info file_info; + unz_file_info_internal file_info_internal; + int err=UNZ_OK; + uLong uMagic; + long lSeek=0; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (ZSEEK(s->z_filefunc, s->filestream, + s->pos_in_central_dir+s->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + + /* we check the magic */ + if (err==UNZ_OK) + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x02014b50) + err=UNZ_BADZIPFILE; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) + err=UNZ_ERRNO; + + unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) + err=UNZ_ERRNO; + + lSeek+=file_info.size_filename; + if ((err==UNZ_OK) && (szFileName!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_filename0) && (fileNameBufferSize>0)) + if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek -= uSizeRead; + } + + + if ((err==UNZ_OK) && (extraField!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) + if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek += file_info.size_file_extra - uSizeRead; + } + else + lSeek+=file_info.size_file_extra; + + + if ((err==UNZ_OK) && (szComment!=NULL)) + { + uLong uSizeRead ; + if (file_info.size_file_commentz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + if ((file_info.size_file_comment>0) && (commentBufferSize>0)) + if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) + err=UNZ_ERRNO; + lSeek+=file_info.size_file_comment - uSizeRead; + } + else + lSeek+=file_info.size_file_comment; + + if ((err==UNZ_OK) && (pfile_info!=NULL)) + *pfile_info=file_info; + + if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) + *pfile_info_internal=file_info_internal; + + return err; +} + + + +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. +*/ +extern int ZEXPORT unzGetCurrentFileInfo (file, + pfile_info, + szFileName, fileNameBufferSize, + extraField, extraFieldBufferSize, + szComment, commentBufferSize) + unzFile file; + unz_file_info *pfile_info; + char *szFileName; + uLong fileNameBufferSize; + void *extraField; + uLong extraFieldBufferSize; + char *szComment; + uLong commentBufferSize; +{ + return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL, + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); +} + +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ +extern int ZEXPORT unzGoToFirstFile (file) + unzFile file; +{ + int err=UNZ_OK; + unz_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + s->pos_in_central_dir=s->offset_central_dir; + s->num_file=0; + err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ +extern int ZEXPORT unzGoToNextFile (file) + unzFile file; +{ + unz_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ + if (s->num_file+1==s->gi.number_entry) + return UNZ_END_OF_LIST_OF_FILE; + + s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; + s->num_file++; + err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} + + +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzipStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ +extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) + unzFile file; + const char *szFileName; + int iCaseSensitivity; +{ + unz_s* s; + int err; + + /* We remember the 'current' position in the file so that we can jump + * back there if we fail. + */ + unz_file_info cur_file_infoSaved; + unz_file_info_internal cur_file_info_internalSaved; + uLong num_fileSaved; + uLong pos_in_central_dirSaved; + + + if (file==NULL) + return UNZ_PARAMERROR; + + if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) + return UNZ_PARAMERROR; + + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + /* Save the current state */ + num_fileSaved = s->num_file; + pos_in_central_dirSaved = s->pos_in_central_dir; + cur_file_infoSaved = s->cur_file_info; + cur_file_info_internalSaved = s->cur_file_info_internal; + + err = unzGoToFirstFile(file); + + while (err == UNZ_OK) + { + char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; + err = unzGetCurrentFileInfo(file,NULL, + szCurrentFileName,sizeof(szCurrentFileName)-1, + NULL,0,NULL,0); + if (err == UNZ_OK) + { + if (unzStringFileNameCompare(szCurrentFileName, + szFileName,iCaseSensitivity)==0) + return UNZ_OK; + err = unzGoToNextFile(file); + } + } + + /* We failed, so restore the state of the 'current file' to where we + * were. + */ + s->num_file = num_fileSaved ; + s->pos_in_central_dir = pos_in_central_dirSaved ; + s->cur_file_info = cur_file_infoSaved; + s->cur_file_info_internal = cur_file_info_internalSaved; + return err; +} + + +/* +/////////////////////////////////////////// +// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) +// I need random access +// +// Further optimization could be realized by adding an ability +// to cache the directory in memory. The goal being a single +// comprehensive file read to put the file I need in a memory. +*/ + +/* +typedef struct unz_file_pos_s +{ + uLong pos_in_zip_directory; // offset in file + uLong num_of_file; // # of file +} unz_file_pos; +*/ + +extern int ZEXPORT unzGetFilePos(file, file_pos) + unzFile file; + unz_file_pos* file_pos; +{ + unz_s* s; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_END_OF_LIST_OF_FILE; + + file_pos->pos_in_zip_directory = s->pos_in_central_dir; + file_pos->num_of_file = s->num_file; + + return UNZ_OK; +} + +extern int ZEXPORT unzGoToFilePos(file, file_pos) + unzFile file; + unz_file_pos* file_pos; +{ + unz_s* s; + int err; + + if (file==NULL || file_pos==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + + /* jump to the right spot */ + s->pos_in_central_dir = file_pos->pos_in_zip_directory; + s->num_file = file_pos->num_of_file; + + /* set the current file */ + err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + /* return results */ + s->current_file_ok = (err == UNZ_OK); + return err; +} + +/* +// Unzip Helper Functions - should be here? +/////////////////////////////////////////// +*/ + +/* + Read the local header of the current zipfile + Check the coherency of the local header and info in the end of central + directory about this file + store in *piSizeVar the size of extra info in local header + (filename and size of extra field data) +*/ +local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, + poffset_local_extrafield, + psize_local_extrafield) + unz_s* s; + uInt* piSizeVar; + uLong *poffset_local_extrafield; + uInt *psize_local_extrafield; +{ + uLong uMagic,uData,uFlags; + uLong size_filename; + uLong size_extra_field; + int err=UNZ_OK; + + *piSizeVar = 0; + *poffset_local_extrafield = 0; + *psize_local_extrafield = 0; + + if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + + if (err==UNZ_OK) + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + err=UNZ_ERRNO; + else if (uMagic!=0x04034b50) + err=UNZ_BADZIPFILE; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; +/* + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) + err=UNZ_BADZIPFILE; +*/ + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) + err=UNZ_ERRNO; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) + err=UNZ_BADZIPFILE; + + if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && + (s->cur_file_info.compression_method!=Z_DEFLATED)) + err=UNZ_BADZIPFILE; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ + err=UNZ_ERRNO; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && + ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && + ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && + ((uFlags & 8)==0)) + err=UNZ_BADZIPFILE; + + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) + err=UNZ_ERRNO; + else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) + err=UNZ_BADZIPFILE; + + *piSizeVar += (uInt)size_filename; + + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) + err=UNZ_ERRNO; + *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + + SIZEZIPLOCALHEADER + size_filename; + *psize_local_extrafield = (uInt)size_extra_field; + + *piSizeVar += (uInt)size_extra_field; + + return err; +} + +/* + Open for reading data the current file in the zipfile. + If there is no error and the file is opened, the return value is UNZ_OK. +*/ +extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) + unzFile file; + int* method; + int* level; + int raw; + const char* password; +{ + int err=UNZ_OK; + uInt iSizeVar; + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + uLong offset_local_extrafield; /* offset of the local extra field */ + uInt size_local_extrafield; /* size of the local extra field */ +# ifndef NOUNCRYPT + char source[12]; +# else + if (password != NULL) + return UNZ_PARAMERROR; +# endif + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return UNZ_PARAMERROR; + + if (s->pfile_in_zip_read != NULL) + unzCloseCurrentFile(file); + + if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, + &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) + return UNZ_BADZIPFILE; + + pfile_in_zip_read_info = (file_in_zip_read_info_s*) + ALLOC(sizeof(file_in_zip_read_info_s)); + if (pfile_in_zip_read_info==NULL) + return UNZ_INTERNALERROR; + + pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); + pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; + pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; + pfile_in_zip_read_info->pos_local_extrafield=0; + pfile_in_zip_read_info->raw=raw; + + if (pfile_in_zip_read_info->read_buffer==NULL) + { + TRYFREE(pfile_in_zip_read_info); + return UNZ_INTERNALERROR; + } + + pfile_in_zip_read_info->stream_initialised=0; + + if (method!=NULL) + *method = (int)s->cur_file_info.compression_method; + + if (level!=NULL) + { + *level = 6; + switch (s->cur_file_info.flag & 0x06) + { + case 6 : *level = 1; break; + case 4 : *level = 2; break; + case 2 : *level = 9; break; + } + } + + if ((s->cur_file_info.compression_method!=0) && + (s->cur_file_info.compression_method!=Z_DEFLATED)) + err=UNZ_BADZIPFILE; + + pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; + pfile_in_zip_read_info->crc32=0; + pfile_in_zip_read_info->compression_method = + s->cur_file_info.compression_method; + pfile_in_zip_read_info->filestream=s->filestream; + pfile_in_zip_read_info->z_filefunc=s->z_filefunc; + pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; + + pfile_in_zip_read_info->stream.total_out = 0; + + if ((s->cur_file_info.compression_method==Z_DEFLATED) && + (!raw)) + { + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; + pfile_in_zip_read_info->stream.zfree = (free_func)0; + pfile_in_zip_read_info->stream.opaque = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = (voidpf)0; + pfile_in_zip_read_info->stream.avail_in = 0; + + err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); + if (err == Z_OK) + pfile_in_zip_read_info->stream_initialised=1; + else + { + TRYFREE(pfile_in_zip_read_info); + return err; + } + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. + * In unzip, i don't wait absolutely Z_STREAM_END because I known the + * size of both compressed and uncompressed data + */ + } + pfile_in_zip_read_info->rest_read_compressed = + s->cur_file_info.compressed_size ; + pfile_in_zip_read_info->rest_read_uncompressed = + s->cur_file_info.uncompressed_size ; + + + pfile_in_zip_read_info->pos_in_zipfile = + s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + + iSizeVar; + + pfile_in_zip_read_info->stream.avail_in = (uInt)0; + + s->pfile_in_zip_read = pfile_in_zip_read_info; + +# ifndef NOUNCRYPT + if (password != NULL) + { + int i; + s->pcrc_32_tab = get_crc_table(); + init_keys(password,s->keys,s->pcrc_32_tab); + if (ZSEEK(s->z_filefunc, s->filestream, + s->pfile_in_zip_read->pos_in_zipfile + + s->pfile_in_zip_read->byte_before_the_zipfile, + SEEK_SET)!=0) + return UNZ_INTERNALERROR; + if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12) + return UNZ_INTERNALERROR; + + for (i = 0; i<12; i++) + zdecode(s->keys,s->pcrc_32_tab,source[i]); + + s->pfile_in_zip_read->pos_in_zipfile+=12; + s->encrypted=1; + } +# endif + + + return UNZ_OK; +} + +extern int ZEXPORT unzOpenCurrentFile (file) + unzFile file; +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); +} + +extern int ZEXPORT unzOpenCurrentFilePassword (file, password) + unzFile file; + const char* password; +{ + return unzOpenCurrentFile3(file, NULL, NULL, 0, password); +} + +extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw) + unzFile file; + int* method; + int* level; + int raw; +{ + return unzOpenCurrentFile3(file, method, level, raw, NULL); +} + +/* + Read bytes from the current file. + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ +extern int ZEXPORT unzReadCurrentFile (file, buf, len) + unzFile file; + voidp buf; + unsigned len; +{ + int err=UNZ_OK; + uInt iRead = 0; + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if ((pfile_in_zip_read_info->read_buffer == NULL)) + return UNZ_END_OF_LIST_OF_FILE; + if (len==0) + return 0; + + pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; + + pfile_in_zip_read_info->stream.avail_out = (uInt)len; + + if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && + (!(pfile_in_zip_read_info->raw))) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_uncompressed; + + if ((len>pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in) && + (pfile_in_zip_read_info->raw)) + pfile_in_zip_read_info->stream.avail_out = + (uInt)pfile_in_zip_read_info->rest_read_compressed+ + pfile_in_zip_read_info->stream.avail_in; + + while (pfile_in_zip_read_info->stream.avail_out>0) + { + if ((pfile_in_zip_read_info->stream.avail_in==0) && + (pfile_in_zip_read_info->rest_read_compressed>0)) + { + uInt uReadThis = UNZ_BUFSIZE; + if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; + if (uReadThis == 0) + return UNZ_EOF; + if (ZSEEK(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->pos_in_zipfile + + pfile_in_zip_read_info->byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + if (ZREAD(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->read_buffer, + uReadThis)!=uReadThis) + return UNZ_ERRNO; + + +# ifndef NOUNCRYPT + if(s->encrypted) + { + uInt i; + for(i=0;iread_buffer[i] = + zdecode(s->keys,s->pcrc_32_tab, + pfile_in_zip_read_info->read_buffer[i]); + } +# endif + + + pfile_in_zip_read_info->pos_in_zipfile += uReadThis; + + pfile_in_zip_read_info->rest_read_compressed-=uReadThis; + + pfile_in_zip_read_info->stream.next_in = + (Bytef*)pfile_in_zip_read_info->read_buffer; + pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; + } + + if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) + { + uInt uDoCopy,i ; + + if ((pfile_in_zip_read_info->stream.avail_in == 0) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + return (iRead==0) ? UNZ_EOF : iRead; + + if (pfile_in_zip_read_info->stream.avail_out < + pfile_in_zip_read_info->stream.avail_in) + uDoCopy = pfile_in_zip_read_info->stream.avail_out ; + else + uDoCopy = pfile_in_zip_read_info->stream.avail_in ; + + for (i=0;istream.next_out+i) = + *(pfile_in_zip_read_info->stream.next_in+i); + + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, + pfile_in_zip_read_info->stream.next_out, + uDoCopy); + pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; + pfile_in_zip_read_info->stream.avail_in -= uDoCopy; + pfile_in_zip_read_info->stream.avail_out -= uDoCopy; + pfile_in_zip_read_info->stream.next_out += uDoCopy; + pfile_in_zip_read_info->stream.next_in += uDoCopy; + pfile_in_zip_read_info->stream.total_out += uDoCopy; + iRead += uDoCopy; + } + else + { + uLong uTotalOutBefore,uTotalOutAfter; + const Bytef *bufBefore; + uLong uOutThis; + int flush=Z_SYNC_FLUSH; + + uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; + bufBefore = pfile_in_zip_read_info->stream.next_out; + + /* + if ((pfile_in_zip_read_info->rest_read_uncompressed == + pfile_in_zip_read_info->stream.avail_out) && + (pfile_in_zip_read_info->rest_read_compressed == 0)) + flush = Z_FINISH; + */ + err=inflate(&pfile_in_zip_read_info->stream,flush); + + if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) + err = Z_DATA_ERROR; + + uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; + uOutThis = uTotalOutAfter-uTotalOutBefore; + + pfile_in_zip_read_info->crc32 = + crc32(pfile_in_zip_read_info->crc32,bufBefore, + (uInt)(uOutThis)); + + pfile_in_zip_read_info->rest_read_uncompressed -= + uOutThis; + + iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); + + if (err==Z_STREAM_END) + return (iRead==0) ? UNZ_EOF : iRead; + if (err!=Z_OK) + break; + } + } + + if (err==Z_OK) + return iRead; + return err; +} + + +/* + Give the current position in uncompressed data +*/ +extern z_off_t ZEXPORT unztell (file) + unzFile file; +{ + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + return (z_off_t)pfile_in_zip_read_info->stream.total_out; +} + + +/* + return 1 if the end of file was reached, 0 elsewhere +*/ +extern int ZEXPORT unzeof (file) + unzFile file; +{ + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + if (pfile_in_zip_read_info->rest_read_uncompressed == 0) + return 1; + else + return 0; +} + + + +/* + Read extra field from the current file (opened by unzOpenCurrentFile) + This is the local-header version of the extra field (sometimes, there is + more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field that can be read + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ +extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) + unzFile file; + voidp buf; + unsigned len; +{ + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + uInt read_now; + uLong size_to_read; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + size_to_read = (pfile_in_zip_read_info->size_local_extrafield - + pfile_in_zip_read_info->pos_local_extrafield); + + if (buf==NULL) + return (int)size_to_read; + + if (len>size_to_read) + read_now = (uInt)size_to_read; + else + read_now = (uInt)len ; + + if (read_now==0) + return 0; + + if (ZSEEK(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + pfile_in_zip_read_info->offset_local_extrafield + + pfile_in_zip_read_info->pos_local_extrafield, + ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (ZREAD(pfile_in_zip_read_info->z_filefunc, + pfile_in_zip_read_info->filestream, + buf,read_now)!=read_now) + return UNZ_ERRNO; + + return (int)read_now; +} + +/* + Close the file in zip opened with unzipOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ +extern int ZEXPORT unzCloseCurrentFile (file) + unzFile file; +{ + int err=UNZ_OK; + + unz_s* s; + file_in_zip_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return UNZ_PARAMERROR; + + + if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && + (!pfile_in_zip_read_info->raw)) + { + if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) + err=UNZ_CRCERROR; + } + + + TRYFREE(pfile_in_zip_read_info->read_buffer); + pfile_in_zip_read_info->read_buffer = NULL; + if (pfile_in_zip_read_info->stream_initialised) + inflateEnd(&pfile_in_zip_read_info->stream); + + pfile_in_zip_read_info->stream_initialised = 0; + TRYFREE(pfile_in_zip_read_info); + + s->pfile_in_zip_read=NULL; + + return err; +} + + +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ +extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) + unzFile file; + char *szComment; + uLong uSizeBuf; +{ + int err=UNZ_OK; + unz_s* s; + uLong uReadThis ; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + + uReadThis = uSizeBuf; + if (uReadThis>s->gi.size_comment) + uReadThis = s->gi.size_comment; + + if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) + return UNZ_ERRNO; + + if (uReadThis>0) + { + *szComment='\0'; + if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) + return UNZ_ERRNO; + } + + if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) + *(szComment+s->gi.size_comment)='\0'; + return (int)uReadThis; +} + +/* Additions by RX '2004 */ +extern uLong ZEXPORT unzGetOffset (file) + unzFile file; +{ + unz_s* s; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + if (!s->current_file_ok) + return 0; + if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) + if (s->num_file==s->gi.number_entry) + return 0; + return s->pos_in_central_dir; +} + +extern int ZEXPORT unzSetOffset (file, pos) + unzFile file; + uLong pos; +{ + unz_s* s; + int err; + + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz_s*)file; + + s->pos_in_central_dir = pos; + s->num_file = s->gi.number_entry; /* hack */ + err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + &s->cur_file_info_internal, + NULL,0,NULL,0,NULL,0); + s->current_file_ok = (err == UNZ_OK); + return err; +} diff --git a/compat/zlib/contrib/minizip/unzip.h b/compat/zlib/contrib/minizip/unzip.h new file mode 100644 index 0000000..b247937 --- /dev/null +++ b/compat/zlib/contrib/minizip/unzip.h @@ -0,0 +1,354 @@ +/* unzip.h -- IO for uncompress .zip files using zlib + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. + + Multi volume ZipFile (span) are not supported. + Encryption compatible with pkzip 2.04g only supported + Old compressions used by old PKZip 1.x are not supported + + + I WAIT FEEDBACK at mail info@winimage.com + Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + +*/ + +/* for more info about .ZIP format, see + http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip + http://www.info-zip.org/pub/infozip/doc/ + PkWare has also a specification at : + ftp://ftp.pkware.com/probdesc.zip +*/ + +#ifndef _unz_H +#define _unz_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagunzFile__ { int unused; } unzFile__; +typedef unzFile__ *unzFile; +#else +typedef voidp unzFile; +#endif + + +#define UNZ_OK (0) +#define UNZ_END_OF_LIST_OF_FILE (-100) +#define UNZ_ERRNO (Z_ERRNO) +#define UNZ_EOF (0) +#define UNZ_PARAMERROR (-102) +#define UNZ_BADZIPFILE (-103) +#define UNZ_INTERNALERROR (-104) +#define UNZ_CRCERROR (-105) + +/* tm_unz contain date/time info */ +typedef struct tm_unz_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_unz; + +/* unz_global_info structure contain global data about the ZIPfile + These data comes from the end of central dir */ +typedef struct unz_global_info_s +{ + uLong number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info; + + +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_info_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + uLong compressed_size; /* compressed size 4 bytes */ + uLong uncompressed_size; /* uncompressed size 4 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info; + +extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, + const char* fileName2, + int iCaseSensitivity)); +/* + Compare two filename (fileName1,fileName2). + If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + or strcasecmp) + If iCaseSenisivity = 0, case sensitivity is defaut of your operating system + (like 1 on Unix, 2 on Windows) +*/ + + +extern unzFile ZEXPORT unzOpen OF((const char *path)); +/* + Open a Zip file. path contain the full pathname (by example, + on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer + "zlib/zlib113.zip". + If the zipfile cannot be opened (file don't exist or in not valid), the + return value is NULL. + Else, the return value is a unzFile Handle, usable with other function + of this unzip package. +*/ + +extern unzFile ZEXPORT unzOpen2 OF((const char *path, + zlib_filefunc_def* pzlib_filefunc_def)); +/* + Open a Zip file, like unzOpen, but provide a set of file low level API + for read/write the zip file (see ioapi.h) +*/ + +extern int ZEXPORT unzClose OF((unzFile file)); +/* + Close a ZipFile opened with unzipOpen. + If there is files inside the .Zip opened with unzOpenCurrentFile (see later), + these files MUST be closed with unzipCloseCurrentFile before call unzipClose. + return UNZ_OK if there is no problem. */ + +extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, + unz_global_info *pglobal_info)); +/* + Write info about the ZipFile in the *pglobal_info structure. + No preparation of the structure is needed + return UNZ_OK if there is no problem. */ + + +extern int ZEXPORT unzGetGlobalComment OF((unzFile file, + char *szComment, + uLong uSizeBuf)); +/* + Get the global comment string of the ZipFile, in the szComment buffer. + uSizeBuf is the size of the szComment buffer. + return the number of byte copied or an error code <0 +*/ + + +/***************************************************************************/ +/* Unzip package allow you browse the directory of the zipfile */ + +extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); +/* + Set the current file of the zipfile to the first file. + return UNZ_OK if there is no problem +*/ + +extern int ZEXPORT unzGoToNextFile OF((unzFile file)); +/* + Set the current file of the zipfile to the next file. + return UNZ_OK if there is no problem + return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. +*/ + +extern int ZEXPORT unzLocateFile OF((unzFile file, + const char *szFileName, + int iCaseSensitivity)); +/* + Try locate the file szFileName in the zipfile. + For the iCaseSensitivity signification, see unzStringFileNameCompare + + return value : + UNZ_OK if the file is found. It becomes the current file. + UNZ_END_OF_LIST_OF_FILE if the file is not found +*/ + + +/* ****************************************** */ +/* Ryan supplied functions */ +/* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_pos_s +{ + uLong pos_in_zip_directory; /* offset in zip file directory */ + uLong num_of_file; /* # of file */ +} unz_file_pos; + +extern int ZEXPORT unzGetFilePos( + unzFile file, + unz_file_pos* file_pos); + +extern int ZEXPORT unzGoToFilePos( + unzFile file, + unz_file_pos* file_pos); + +/* ****************************************** */ + +extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, + unz_file_info *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); +/* + Get Info about the current file + if pfile_info!=NULL, the *pfile_info structure will contain somes info about + the current file + if szFileName!=NULL, the filemane string will be copied in szFileName + (fileNameBufferSize is the size of the buffer) + if extraField!=NULL, the extra field information will be copied in extraField + (extraFieldBufferSize is the size of the buffer). + This is the Central-header version of the extra field + if szComment!=NULL, the comment string of the file will be copied in szComment + (commentBufferSize is the size of the buffer) +*/ + +/***************************************************************************/ +/* for reading the content of the current zipfile, you can open it, read data + from it, and close it (you can close it before reading all the file) + */ + +extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); +/* + Open for reading data the current file in the zipfile. + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, + const char* password)); +/* + Open for reading data the current file in the zipfile. + password is a crypting password + If there is no error, the return value is UNZ_OK. +*/ + +extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, + int* method, + int* level, + int raw)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + +extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, + int* method, + int* level, + int raw, + const char* password)); +/* + Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) + if raw==1 + *method will receive method of compression, *level will receive level of + compression + note : you can set level parameter as NULL (if you did not want known level, + but you CANNOT set method parameter as NULL +*/ + + +extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); +/* + Close the file in zip opened with unzOpenCurrentFile + Return UNZ_CRCERROR if all the file was read but the CRC is not good +*/ + +extern int ZEXPORT unzReadCurrentFile OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read bytes from the current file (opened by unzOpenCurrentFile) + buf contain buffer where data must be copied + len the size of buf. + + return the number of byte copied if somes bytes are copied + return 0 if the end of file was reached + return <0 with error code if there is an error + (UNZ_ERRNO for IO error, or zLib error for uncompress error) +*/ + +extern z_off_t ZEXPORT unztell OF((unzFile file)); +/* + Give the current position in uncompressed data +*/ + +extern int ZEXPORT unzeof OF((unzFile file)); +/* + return 1 if the end of file was reached, 0 elsewhere +*/ + +extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, + voidp buf, + unsigned len)); +/* + Read extra field from the current file (opened by unzOpenCurrentFile) + This is the local-header version of the extra field (sometimes, there is + more info in the local-header version than in the central-header) + + if buf==NULL, it return the size of the local extra field + + if buf!=NULL, len is the size of the buffer, the extra header is copied in + buf. + the return value is the number of bytes copied in buf, or (if <0) + the error code +*/ + +/***************************************************************************/ + +/* Get the current file offset */ +extern uLong ZEXPORT unzGetOffset (unzFile file); + +/* Set the current file offset */ +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); + + + +#ifdef __cplusplus +} +#endif + +#endif /* _unz_H */ diff --git a/compat/zlib/contrib/minizip/zip.c b/compat/zlib/contrib/minizip/zip.c new file mode 100644 index 0000000..7fbe002 --- /dev/null +++ b/compat/zlib/contrib/minizip/zip.c @@ -0,0 +1,1219 @@ +/* zip.c -- IO on .zip files using zlib + Version 1.01e, February 12th, 2005 + + 27 Dec 2004 Rolf Kalbermatter + Modification to zipOpen2 to support globalComment retrieval. + + Copyright (C) 1998-2005 Gilles Vollant + + Read zip.h for more info +*/ + + +#include +#include +#include +#include +#include "zlib.h" +#include "zip.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +#ifndef VERSIONMADEBY +# define VERSIONMADEBY (0x0) /* platform depedent */ +#endif + +#ifndef Z_BUFSIZE +#define Z_BUFSIZE (16384) +#endif + +#ifndef Z_MAXFILENAMEINZIP +#define Z_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +/* +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) +*/ + +/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#ifndef DEF_MEM_LEVEL +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +#endif +const char zip_copyright[] = + " zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + + +#define SIZEDATA_INDATABLOCK (4096-(4*4)) + +#define LOCALHEADERMAGIC (0x04034b50) +#define CENTRALHEADERMAGIC (0x02014b50) +#define ENDHEADERMAGIC (0x06054b50) + +#define FLAG_LOCALHEADER_OFFSET (0x06) +#define CRC_LOCALHEADER_OFFSET (0x0e) + +#define SIZECENTRALHEADER (0x2e) /* 46 */ + +typedef struct linkedlist_datablock_internal_s +{ + struct linkedlist_datablock_internal_s* next_datablock; + uLong avail_in_this_block; + uLong filled_in_this_block; + uLong unused; /* for future use and alignement */ + unsigned char data[SIZEDATA_INDATABLOCK]; +} linkedlist_datablock_internal; + +typedef struct linkedlist_data_s +{ + linkedlist_datablock_internal* first_block; + linkedlist_datablock_internal* last_block; +} linkedlist_data; + + +typedef struct +{ + z_stream stream; /* zLib stream structure for inflate */ + int stream_initialised; /* 1 is stream is initialised */ + uInt pos_in_buffered_data; /* last written byte in buffered_data */ + + uLong pos_local_header; /* offset of the local header of the file + currenty writing */ + char* central_header; /* central header data for the current file */ + uLong size_centralheader; /* size of the central header for cur file */ + uLong flag; /* flag of the file currently writing */ + + int method; /* compression method of file currenty wr.*/ + int raw; /* 1 for directly writing raw data */ + Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ + uLong dosDate; + uLong crc32; + int encrypt; +#ifndef NOCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const unsigned long* pcrc_32_tab; + int crypt_header_size; +#endif +} curfile_info; + +typedef struct +{ + zlib_filefunc_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + linkedlist_data central_dir;/* datablock with central dir in construction*/ + int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ + curfile_info ci; /* info on the file curretly writing */ + + uLong begin_pos; /* position of the beginning of the zipfile */ + uLong add_position_when_writting_offset; + uLong number_entry; +#ifndef NO_ADDFILEINEXISTINGZIP + char *globalcomment; +#endif +} zip_internal; + + + +#ifndef NOCRYPT +#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED +#include "crypt.h" +#endif + +local linkedlist_datablock_internal* allocate_new_datablock() +{ + linkedlist_datablock_internal* ldi; + ldi = (linkedlist_datablock_internal*) + ALLOC(sizeof(linkedlist_datablock_internal)); + if (ldi!=NULL) + { + ldi->next_datablock = NULL ; + ldi->filled_in_this_block = 0 ; + ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; + } + return ldi; +} + +local void free_datablock(ldi) + linkedlist_datablock_internal* ldi; +{ + while (ldi!=NULL) + { + linkedlist_datablock_internal* ldinext = ldi->next_datablock; + TRYFREE(ldi); + ldi = ldinext; + } +} + +local void init_linkedlist(ll) + linkedlist_data* ll; +{ + ll->first_block = ll->last_block = NULL; +} + +local void free_linkedlist(ll) + linkedlist_data* ll; +{ + free_datablock(ll->first_block); + ll->first_block = ll->last_block = NULL; +} + + +local int add_data_in_datablock(ll,buf,len) + linkedlist_data* ll; + const void* buf; + uLong len; +{ + linkedlist_datablock_internal* ldi; + const unsigned char* from_copy; + + if (ll==NULL) + return ZIP_INTERNALERROR; + + if (ll->last_block == NULL) + { + ll->first_block = ll->last_block = allocate_new_datablock(); + if (ll->first_block == NULL) + return ZIP_INTERNALERROR; + } + + ldi = ll->last_block; + from_copy = (unsigned char*)buf; + + while (len>0) + { + uInt copy_this; + uInt i; + unsigned char* to_copy; + + if (ldi->avail_in_this_block==0) + { + ldi->next_datablock = allocate_new_datablock(); + if (ldi->next_datablock == NULL) + return ZIP_INTERNALERROR; + ldi = ldi->next_datablock ; + ll->last_block = ldi; + } + + if (ldi->avail_in_this_block < len) + copy_this = (uInt)ldi->avail_in_this_block; + else + copy_this = (uInt)len; + + to_copy = &(ldi->data[ldi->filled_in_this_block]); + + for (i=0;ifilled_in_this_block += copy_this; + ldi->avail_in_this_block -= copy_this; + from_copy += copy_this ; + len -= copy_this; + } + return ZIP_OK; +} + + + +/****************************************************************************/ + +#ifndef NO_ADDFILEINEXISTINGZIP +/* =========================================================================== + Inputs a long in LSB order to the given file + nbByte == 1, 2 or 4 (byte, short or long) +*/ + +local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, uLong x, int nbByte)); +local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong x; + int nbByte; +{ + unsigned char buf[4]; + int n; + for (n = 0; n < nbByte; n++) + { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + if (x != 0) + { /* data overflow - hack for ZIP64 (X Roche) */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } + + if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) + return ZIP_ERRNO; + else + return ZIP_OK; +} + +local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte)); +local void ziplocal_putValue_inmemory (dest, x, nbByte) + void* dest; + uLong x; + int nbByte; +{ + unsigned char* buf=(unsigned char*)dest; + int n; + for (n = 0; n < nbByte; n++) { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + + if (x != 0) + { /* data overflow - hack for ZIP64 */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } +} + +/****************************************************************************/ + + +local uLong ziplocal_TmzDateToDosDate(ptm,dosDate) + const tm_zip* ptm; + uLong dosDate; +{ + uLong year = (uLong)ptm->tm_year; + if (year>1980) + year-=1980; + else if (year>80) + year-=80; + return + (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | + ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); +} + + +/****************************************************************************/ + +local int ziplocal_getByte OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + int *pi)); + +local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + int *pi; +{ + unsigned char c; + int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return ZIP_OK; + } + else + { + if (ZERROR(*pzlib_filefunc_def,filestream)) + return ZIP_ERRNO; + else + return ZIP_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int ziplocal_getShort OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int ziplocal_getLong OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX)); + +local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; + uLong *pX; +{ + uLong x ; + int i; + int err; + + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<16; + + if (err==ZIP_OK) + err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local uLong ziplocal_SearchCentralDir OF(( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream)); + +local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream) + const zlib_filefunc_def* pzlib_filefunc_def; + voidpf filestream; +{ + unsigned char* buf; + uLong uSizeFile; + uLong uBackRead; + uLong uMaxBack=0xffff; /* maximum size of global comment */ + uLong uPosFound=0; + + if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); + if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} +#endif /* !NO_ADDFILEINEXISTINGZIP*/ + +/************************************************************/ +extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def) + const char *pathname; + int append; + zipcharpc* globalcomment; + zlib_filefunc_def* pzlib_filefunc_def; +{ + zip_internal ziinit; + zip_internal* zi; + int err=ZIP_OK; + + + if (pzlib_filefunc_def==NULL) + fill_fopen_filefunc(&ziinit.z_filefunc); + else + ziinit.z_filefunc = *pzlib_filefunc_def; + + ziinit.filestream = (*(ziinit.z_filefunc.zopen_file)) + (ziinit.z_filefunc.opaque, + pathname, + (append == APPEND_STATUS_CREATE) ? + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); + + if (ziinit.filestream == NULL) + return NULL; + ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream); + ziinit.in_opened_file_inzip = 0; + ziinit.ci.stream_initialised = 0; + ziinit.number_entry = 0; + ziinit.add_position_when_writting_offset = 0; + init_linkedlist(&(ziinit.central_dir)); + + + zi = (zip_internal*)ALLOC(sizeof(zip_internal)); + if (zi==NULL) + { + ZCLOSE(ziinit.z_filefunc,ziinit.filestream); + return NULL; + } + + /* now we add file in a zipfile */ +# ifndef NO_ADDFILEINEXISTINGZIP + ziinit.globalcomment = NULL; + if (append == APPEND_STATUS_ADDINZIP) + { + uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + + uLong size_central_dir; /* size of the central directory */ + uLong offset_central_dir; /* offset of start of central directory */ + uLong central_pos,uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + uLong number_entry; + uLong number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + uLong size_comment; + + central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream); + if (central_pos==0) + err=ZIP_ERRNO; + + if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir on this disk */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((number_entry_CD!=number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* zipfile global comment length */ + if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((central_pos0) + { + ziinit.globalcomment = ALLOC(size_comment+1); + if (ziinit.globalcomment) + { + size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream,ziinit.globalcomment,size_comment); + ziinit.globalcomment[size_comment]=0; + } + } + + byte_before_the_zipfile = central_pos - + (offset_central_dir+size_central_dir); + ziinit.add_position_when_writting_offset = byte_before_the_zipfile; + + { + uLong size_central_dir_to_read = size_central_dir; + size_t buf_size = SIZEDATA_INDATABLOCK; + void* buf_read = (void*)ALLOC(buf_size); + if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, + offset_central_dir + byte_before_the_zipfile, + ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + while ((size_central_dir_to_read>0) && (err==ZIP_OK)) + { + uLong read_this = SIZEDATA_INDATABLOCK; + if (read_this > size_central_dir_to_read) + read_this = size_central_dir_to_read; + if (ZREAD(ziinit.z_filefunc, ziinit.filestream,buf_read,read_this) != read_this) + err=ZIP_ERRNO; + + if (err==ZIP_OK) + err = add_data_in_datablock(&ziinit.central_dir,buf_read, + (uLong)read_this); + size_central_dir_to_read-=read_this; + } + TRYFREE(buf_read); + } + ziinit.begin_pos = byte_before_the_zipfile; + ziinit.number_entry = number_entry_CD; + + if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, + offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + } + + if (globalcomment) + { + *globalcomment = ziinit.globalcomment; + } +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + + if (err != ZIP_OK) + { +# ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(ziinit.globalcomment); +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + TRYFREE(zi); + return NULL; + } + else + { + *zi = ziinit; + return (zipFile)zi; + } +} + +extern zipFile ZEXPORT zipOpen (pathname, append) + const char *pathname; + int append; +{ + return zipOpen2(pathname,append,NULL,NULL); +} + +extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting) + zipFile file; + const char* filename; + const zip_fileinfo* zipfi; + const void* extrafield_local; + uInt size_extrafield_local; + const void* extrafield_global; + uInt size_extrafield_global; + const char* comment; + int method; + int level; + int raw; + int windowBits; + int memLevel; + int strategy; + const char* password; + uLong crcForCrypting; +{ + zip_internal* zi; + uInt size_filename; + uInt size_comment; + uInt i; + int err = ZIP_OK; + +# ifdef NOCRYPT + if (password != NULL) + return ZIP_PARAMERROR; +# endif + + if (file == NULL) + return ZIP_PARAMERROR; + if ((method!=0) && (method!=Z_DEFLATED)) + return ZIP_PARAMERROR; + + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + if (err != ZIP_OK) + return err; + } + + + if (filename==NULL) + filename="-"; + + if (comment==NULL) + size_comment = 0; + else + size_comment = (uInt)strlen(comment); + + size_filename = (uInt)strlen(filename); + + if (zipfi == NULL) + zi->ci.dosDate = 0; + else + { + if (zipfi->dosDate != 0) + zi->ci.dosDate = zipfi->dosDate; + else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate); + } + + zi->ci.flag = 0; + if ((level==8) || (level==9)) + zi->ci.flag |= 2; + if ((level==2)) + zi->ci.flag |= 4; + if ((level==1)) + zi->ci.flag |= 6; + if (password != NULL) + zi->ci.flag |= 1; + + zi->ci.crc32 = 0; + zi->ci.method = method; + zi->ci.encrypt = 0; + zi->ci.stream_initialised = 0; + zi->ci.pos_in_buffered_data = 0; + zi->ci.raw = raw; + zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ; + zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + + size_extrafield_global + size_comment; + zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader); + + ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); + /* version info */ + ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2); + ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); + ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); + ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); + ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); + ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ + ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ + ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ + ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); + ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); + ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); + ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ + + if (zipfi==NULL) + ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); + else + ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); + + if (zipfi==NULL) + ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); + else + ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); + + ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4); + + for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = + *(((const char*)extrafield_global)+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ + size_extrafield_global+i) = *(comment+i); + if (zi->ci.central_header == NULL) + return ZIP_INTERNALERROR; + + /* write the local header */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2); + + if ((err==ZIP_OK) && (size_filename>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) + err = ZIP_ERRNO; + + if ((err==ZIP_OK) && (size_extrafield_local>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local) + !=size_extrafield_local) + err = ZIP_ERRNO; + + zi->ci.stream.avail_in = (uInt)0; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + zi->ci.stream.total_in = 0; + zi->ci.stream.total_out = 0; + + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + zi->ci.stream.zalloc = (alloc_func)0; + zi->ci.stream.zfree = (free_func)0; + zi->ci.stream.opaque = (voidpf)0; + + if (windowBits>0) + windowBits = -windowBits; + + err = deflateInit2(&zi->ci.stream, level, + Z_DEFLATED, windowBits, memLevel, strategy); + + if (err==Z_OK) + zi->ci.stream_initialised = 1; + } +# ifndef NOCRYPT + zi->ci.crypt_header_size = 0; + if ((err==Z_OK) && (password != NULL)) + { + unsigned char bufHead[RAND_HEAD_LEN]; + unsigned int sizeHead; + zi->ci.encrypt = 1; + zi->ci.pcrc_32_tab = get_crc_table(); + /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ + + sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); + zi->ci.crypt_header_size = sizeHead; + + if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + err = ZIP_ERRNO; + } +# endif + + if (err==Z_OK) + zi->in_opened_file_inzip = 1; + return err; +} + +extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw) + zipFile file; + const char* filename; + const zip_fileinfo* zipfi; + const void* extrafield_local; + uInt size_extrafield_local; + const void* extrafield_global; + uInt size_extrafield_global; + const char* comment; + int method; + int level; + int raw; +{ + return zipOpenNewFileInZip3 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level) + zipFile file; + const char* filename; + const zip_fileinfo* zipfi; + const void* extrafield_local; + uInt size_extrafield_local; + const void* extrafield_global; + uInt size_extrafield_global; + const char* comment; + int method; + int level; +{ + return zipOpenNewFileInZip2 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0); +} + +local int zipFlushWriteBuffer(zi) + zip_internal* zi; +{ + int err=ZIP_OK; + + if (zi->ci.encrypt != 0) + { +#ifndef NOCRYPT + uInt i; + int t; + for (i=0;ici.pos_in_buffered_data;i++) + zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, + zi->ci.buffered_data[i],t); +#endif + } + if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) + !=zi->ci.pos_in_buffered_data) + err = ZIP_ERRNO; + zi->ci.pos_in_buffered_data = 0; + return err; +} + +extern int ZEXPORT zipWriteInFileInZip (file, buf, len) + zipFile file; + const void* buf; + unsigned len; +{ + zip_internal* zi; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + + zi->ci.stream.next_in = (void*)buf; + zi->ci.stream.avail_in = len; + zi->ci.crc32 = crc32(zi->ci.crc32,buf,len); + + while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) + { + if (zi->ci.stream.avail_out == 0) + { + if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + + + if(err != ZIP_OK) + break; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_NO_FLUSH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + + } + else + { + uInt copy_this,i; + if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) + copy_this = zi->ci.stream.avail_in; + else + copy_this = zi->ci.stream.avail_out; + for (i=0;ici.stream.next_out)+i) = + *(((const char*)zi->ci.stream.next_in)+i); + { + zi->ci.stream.avail_in -= copy_this; + zi->ci.stream.avail_out-= copy_this; + zi->ci.stream.next_in+= copy_this; + zi->ci.stream.next_out+= copy_this; + zi->ci.stream.total_in+= copy_this; + zi->ci.stream.total_out+= copy_this; + zi->ci.pos_in_buffered_data += copy_this; + } + } + } + + return err; +} + +extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32) + zipFile file; + uLong uncompressed_size; + uLong crc32; +{ + zip_internal* zi; + uLong compressed_size; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + zi->ci.stream.avail_in = 0; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + while (err==ZIP_OK) + { + uLong uTotalOutBefore; + if (zi->ci.stream.avail_out == 0) + { + if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_FINISH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + + if (err==Z_STREAM_END) + err=ZIP_OK; /* this is normal */ + + if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) + if (zipFlushWriteBuffer(zi)==ZIP_ERRNO) + err = ZIP_ERRNO; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + err=deflateEnd(&zi->ci.stream); + zi->ci.stream_initialised = 0; + } + + if (!zi->ci.raw) + { + crc32 = (uLong)zi->ci.crc32; + uncompressed_size = (uLong)zi->ci.stream.total_in; + } + compressed_size = (uLong)zi->ci.stream.total_out; +# ifndef NOCRYPT + compressed_size += zi->ci.crypt_header_size; +# endif + + ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ + ziplocal_putValue_inmemory(zi->ci.central_header+20, + compressed_size,4); /*compr size*/ + if (zi->ci.stream.data_type == Z_ASCII) + ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); + ziplocal_putValue_inmemory(zi->ci.central_header+24, + uncompressed_size,4); /*uncompr size*/ + + if (err==ZIP_OK) + err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header, + (uLong)zi->ci.size_centralheader); + free(zi->ci.central_header); + + if (err==ZIP_OK) + { + long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); + if (ZSEEK(zi->z_filefunc,zi->filestream, + zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ + + if (err==ZIP_OK) /* compressed size, unknown */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); + + if (ZSEEK(zi->z_filefunc,zi->filestream, + cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + } + + zi->number_entry ++; + zi->in_opened_file_inzip = 0; + + return err; +} + +extern int ZEXPORT zipCloseFileInZip (file) + zipFile file; +{ + return zipCloseFileInZipRaw (file,0,0); +} + +extern int ZEXPORT zipClose (file, global_comment) + zipFile file; + const char* global_comment; +{ + zip_internal* zi; + int err = 0; + uLong size_centraldir = 0; + uLong centraldir_pos_inzip; + uInt size_global_comment; + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + } + +#ifndef NO_ADDFILEINEXISTINGZIP + if (global_comment==NULL) + global_comment = zi->globalcomment; +#endif + if (global_comment==NULL) + size_global_comment = 0; + else + size_global_comment = (uInt)strlen(global_comment); + + centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); + if (err==ZIP_OK) + { + linkedlist_datablock_internal* ldi = zi->central_dir.first_block ; + while (ldi!=NULL) + { + if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream, + ldi->data,ldi->filled_in_this_block) + !=ldi->filled_in_this_block ) + err = ZIP_ERRNO; + + size_centraldir += ldi->filled_in_this_block; + ldi = ldi->next_datablock; + } + } + free_datablock(zi->central_dir.first_block); + + if (err==ZIP_OK) /* Magic End */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* number of this disk */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + + if (err==ZIP_OK) /* total number of entries in the central dir */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + + if (err==ZIP_OK) /* size of the central directory */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the + starting disk number */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream, + (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); + + if (err==ZIP_OK) /* zipfile comment length */ + err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); + + if ((err==ZIP_OK) && (size_global_comment>0)) + if (ZWRITE(zi->z_filefunc,zi->filestream, + global_comment,size_global_comment) != size_global_comment) + err = ZIP_ERRNO; + + if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0) + if (err == ZIP_OK) + err = ZIP_ERRNO; + +#ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(zi->globalcomment); +#endif + TRYFREE(zi); + + return err; +} diff --git a/compat/zlib/contrib/minizip/zip.h b/compat/zlib/contrib/minizip/zip.h new file mode 100644 index 0000000..acacce8 --- /dev/null +++ b/compat/zlib/contrib/minizip/zip.h @@ -0,0 +1,235 @@ +/* zip.h -- IO for compress .zip files using zlib + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + This unzip package allow creates .ZIP file, compatible with PKZip 2.04g + WinZip, InfoZip tools and compatible. + Multi volume ZipFile (span) are not supported. + Encryption compatible with pkzip 2.04g only supported + Old compressions used by old PKZip 1.x are not supported + + For uncompress .zip file, look at unzip.h + + + I WAIT FEEDBACK at mail info@winimage.com + Visit also http://www.winimage.com/zLibDll/unzip.html for evolution + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + +*/ + +/* for more info about .ZIP format, see + http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip + http://www.info-zip.org/pub/infozip/doc/ + PkWare has also a specification at : + ftp://ftp.pkware.com/probdesc.zip +*/ + +#ifndef _zip_H +#define _zip_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagzipFile__ { int unused; } zipFile__; +typedef zipFile__ *zipFile; +#else +typedef voidp zipFile; +#endif + +#define ZIP_OK (0) +#define ZIP_EOF (0) +#define ZIP_ERRNO (Z_ERRNO) +#define ZIP_PARAMERROR (-102) +#define ZIP_BADZIPFILE (-103) +#define ZIP_INTERNALERROR (-104) + +#ifndef DEF_MEM_LEVEL +# if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +# else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +# endif +#endif +/* default memLevel */ + +/* tm_zip contain date/time info */ +typedef struct tm_zip_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_zip; + +typedef struct +{ + tm_zip tmz_date; /* date in understandable format */ + uLong dosDate; /* if dos_date == 0, tmu_date is used */ +/* uLong flag; */ /* general purpose bit flag 2 bytes */ + + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ +} zip_fileinfo; + +typedef const char* zipcharpc; + + +#define APPEND_STATUS_CREATE (0) +#define APPEND_STATUS_CREATEAFTER (1) +#define APPEND_STATUS_ADDINZIP (2) + +extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); +/* + Create a zipfile. + pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on + an Unix computer "zlib/zlib113.zip". + if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip + will be created at the end of the file. + (useful if the file contain a self extractor code) + if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will + add files in existing zip (be sure you don't add file that doesn't exist) + If the zipfile cannot be opened, the return value is NULL. + Else, the return value is a zipFile Handle, usable with other function + of this zip package. +*/ + +/* Note : there is no delete function into a zipfile. + If you want delete file into a zipfile, you must open a zipfile, and create another + Of couse, you can use RAW reading and writing to copy the file you did not want delte +*/ + +extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc_def* pzlib_filefunc_def)); + +extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level)); +/* + Open a file in the ZIP for writing. + filename : the filename in zip (if NULL, '-' without quote will be used + *zipfi contain supplemental information + if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local + contains the extrafield data the the local header + if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global + contains the extrafield data the the local header + if comment != NULL, comment contain the comment string + method contain the compression method (0 for store, Z_DEFLATED for deflate) + level contain the level of compression (can be Z_DEFAULT_COMPRESSION) +*/ + + +extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw)); + +/* + Same than zipOpenNewFileInZip, except if raw=1, we write raw file + */ + +extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCtypting)); + +/* + Same than zipOpenNewFileInZip2, except + windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 + password : crypting password (NULL for no crypting) + crcForCtypting : crc of file to compress (needed for crypting) + */ + + +extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, + const void* buf, + unsigned len)); +/* + Write data in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); +/* + Close the current file in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, + uLong uncompressed_size, + uLong crc32)); +/* + Close the current file in the zipfile, for fiel opened with + parameter raw=1 in zipOpenNewFileInZip2 + uncompressed_size and crc32 are value for the uncompressed size +*/ + +extern int ZEXPORT zipClose OF((zipFile file, + const char* global_comment)); +/* + Close the zipfile +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _zip_H */ diff --git a/compat/zlib/contrib/pascal/example.pas b/compat/zlib/contrib/pascal/example.pas new file mode 100644 index 0000000..5518b36 --- /dev/null +++ b/compat/zlib/contrib/pascal/example.pas @@ -0,0 +1,599 @@ +(* example.c -- usage example of the zlib compression library + * Copyright (C) 1995-2003 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Pascal translation + * Copyright (C) 1998 by Jacques Nomssi Nzali. + * For conditions of distribution and use, see copyright notice in readme.txt + * + * Adaptation to the zlibpas interface + * Copyright (C) 2003 by Cosmin Truta. + * For conditions of distribution and use, see copyright notice in readme.txt + *) + +program example; + +{$DEFINE TEST_COMPRESS} +{DO NOT $DEFINE TEST_GZIO} +{$DEFINE TEST_DEFLATE} +{$DEFINE TEST_INFLATE} +{$DEFINE TEST_FLUSH} +{$DEFINE TEST_SYNC} +{$DEFINE TEST_DICT} + +uses SysUtils, zlibpas; + +const TESTFILE = 'foo.gz'; + +(* "hello world" would be more standard, but the repeated "hello" + * stresses the compression code better, sorry... + *) +const hello: PChar = 'hello, hello!'; + +const dictionary: PChar = 'hello'; + +var dictId: LongInt; (* Adler32 value of the dictionary *) + +procedure CHECK_ERR(err: Integer; msg: String); +begin + if err <> Z_OK then + begin + WriteLn(msg, ' error: ', err); + Halt(1); + end; +end; + +procedure EXIT_ERR(const msg: String); +begin + WriteLn('Error: ', msg); + Halt(1); +end; + +(* =========================================================================== + * Test compress and uncompress + *) +{$IFDEF TEST_COMPRESS} +procedure test_compress(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var err: Integer; + len: LongInt; +begin + len := StrLen(hello)+1; + + err := compress(compr, comprLen, hello, len); + CHECK_ERR(err, 'compress'); + + StrCopy(PChar(uncompr), 'garbage'); + + err := uncompress(uncompr, uncomprLen, compr, comprLen); + CHECK_ERR(err, 'uncompress'); + + if StrComp(PChar(uncompr), hello) <> 0 then + EXIT_ERR('bad uncompress') + else + WriteLn('uncompress(): ', PChar(uncompr)); +end; +{$ENDIF} + +(* =========================================================================== + * Test read/write of .gz files + *) +{$IFDEF TEST_GZIO} +procedure test_gzio(const fname: PChar; (* compressed file name *) + uncompr: Pointer; + uncomprLen: LongInt); +var err: Integer; + len: Integer; + zfile: gzFile; + pos: LongInt; +begin + len := StrLen(hello)+1; + + zfile := gzopen(fname, 'wb'); + if zfile = NIL then + begin + WriteLn('gzopen error'); + Halt(1); + end; + gzputc(zfile, 'h'); + if gzputs(zfile, 'ello') <> 4 then + begin + WriteLn('gzputs err: ', gzerror(zfile, err)); + Halt(1); + end; + {$IFDEF GZ_FORMAT_STRING} + if gzprintf(zfile, ', %s!', 'hello') <> 8 then + begin + WriteLn('gzprintf err: ', gzerror(zfile, err)); + Halt(1); + end; + {$ELSE} + if gzputs(zfile, ', hello!') <> 8 then + begin + WriteLn('gzputs err: ', gzerror(zfile, err)); + Halt(1); + end; + {$ENDIF} + gzseek(zfile, 1, SEEK_CUR); (* add one zero byte *) + gzclose(zfile); + + zfile := gzopen(fname, 'rb'); + if zfile = NIL then + begin + WriteLn('gzopen error'); + Halt(1); + end; + + StrCopy(PChar(uncompr), 'garbage'); + + if gzread(zfile, uncompr, uncomprLen) <> len then + begin + WriteLn('gzread err: ', gzerror(zfile, err)); + Halt(1); + end; + if StrComp(PChar(uncompr), hello) <> 0 then + begin + WriteLn('bad gzread: ', PChar(uncompr)); + Halt(1); + end + else + WriteLn('gzread(): ', PChar(uncompr)); + + pos := gzseek(zfile, -8, SEEK_CUR); + if (pos <> 6) or (gztell(zfile) <> pos) then + begin + WriteLn('gzseek error, pos=', pos, ', gztell=', gztell(zfile)); + Halt(1); + end; + + if gzgetc(zfile) <> ' ' then + begin + WriteLn('gzgetc error'); + Halt(1); + end; + + if gzungetc(' ', zfile) <> ' ' then + begin + WriteLn('gzungetc error'); + Halt(1); + end; + + gzgets(zfile, PChar(uncompr), uncomprLen); + uncomprLen := StrLen(PChar(uncompr)); + if uncomprLen <> 7 then (* " hello!" *) + begin + WriteLn('gzgets err after gzseek: ', gzerror(zfile, err)); + Halt(1); + end; + if StrComp(PChar(uncompr), hello + 6) <> 0 then + begin + WriteLn('bad gzgets after gzseek'); + Halt(1); + end + else + WriteLn('gzgets() after gzseek: ', PChar(uncompr)); + + gzclose(zfile); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with small buffers + *) +{$IFDEF TEST_DEFLATE} +procedure test_deflate(compr: Pointer; comprLen: LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; + len: LongInt; +begin + len := StrLen(hello)+1; + + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, 'deflateInit'); + + c_stream.next_in := hello; + c_stream.next_out := compr; + + while (c_stream.total_in <> len) and + (c_stream.total_out < comprLen) do + begin + c_stream.avail_out := 1; { force small buffers } + c_stream.avail_in := 1; + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + end; + + (* Finish the stream, still forcing small buffers: *) + while TRUE do + begin + c_stream.avail_out := 1; + err := deflate(c_stream, Z_FINISH); + if err = Z_STREAM_END then + break; + CHECK_ERR(err, 'deflate'); + end; + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); +end; +{$ENDIF} + +(* =========================================================================== + * Test inflate with small buffers + *) +{$IFDEF TEST_INFLATE} +procedure test_inflate(compr: Pointer; comprLen : LongInt; + uncompr: Pointer; uncomprLen : LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := 0; + d_stream.next_out := uncompr; + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + while (d_stream.total_out < uncomprLen) and + (d_stream.total_in < comprLen) do + begin + d_stream.avail_out := 1; (* force small buffers *) + d_stream.avail_in := 1; + err := inflate(d_stream, Z_NO_FLUSH); + if err = Z_STREAM_END then + break; + CHECK_ERR(err, 'inflate'); + end; + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + if StrComp(PChar(uncompr), hello) <> 0 then + EXIT_ERR('bad inflate') + else + WriteLn('inflate(): ', PChar(uncompr)); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with large buffers and dynamic change of compression level + *) +{$IFDEF TEST_DEFLATE} +procedure test_large_deflate(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; +begin + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_BEST_SPEED); + CHECK_ERR(err, 'deflateInit'); + + c_stream.next_out := compr; + c_stream.avail_out := Integer(comprLen); + + (* At this point, uncompr is still mostly zeroes, so it should compress + * very well: + *) + c_stream.next_in := uncompr; + c_stream.avail_in := Integer(uncomprLen); + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + if c_stream.avail_in <> 0 then + EXIT_ERR('deflate not greedy'); + + (* Feed in already compressed data and switch to no compression: *) + deflateParams(c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); + c_stream.next_in := compr; + c_stream.avail_in := Integer(comprLen div 2); + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + + (* Switch back to compressing mode: *) + deflateParams(c_stream, Z_BEST_COMPRESSION, Z_FILTERED); + c_stream.next_in := uncompr; + c_stream.avail_in := Integer(uncomprLen); + err := deflate(c_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'deflate'); + + err := deflate(c_stream, Z_FINISH); + if err <> Z_STREAM_END then + EXIT_ERR('deflate should report Z_STREAM_END'); + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); +end; +{$ENDIF} + +(* =========================================================================== + * Test inflate with large buffers + *) +{$IFDEF TEST_INFLATE} +procedure test_large_inflate(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := Integer(comprLen); + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + while TRUE do + begin + d_stream.next_out := uncompr; (* discard the output *) + d_stream.avail_out := Integer(uncomprLen); + err := inflate(d_stream, Z_NO_FLUSH); + if err = Z_STREAM_END then + break; + CHECK_ERR(err, 'large inflate'); + end; + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + if d_stream.total_out <> 2 * uncomprLen + comprLen div 2 then + begin + WriteLn('bad large inflate: ', d_stream.total_out); + Halt(1); + end + else + WriteLn('large_inflate(): OK'); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with full flush + *) +{$IFDEF TEST_FLUSH} +procedure test_flush(compr: Pointer; var comprLen : LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; + len: Integer; +begin + len := StrLen(hello)+1; + + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, 'deflateInit'); + + c_stream.next_in := hello; + c_stream.next_out := compr; + c_stream.avail_in := 3; + c_stream.avail_out := Integer(comprLen); + err := deflate(c_stream, Z_FULL_FLUSH); + CHECK_ERR(err, 'deflate'); + + Inc(PByteArray(compr)^[3]); (* force an error in first compressed block *) + c_stream.avail_in := len - 3; + + err := deflate(c_stream, Z_FINISH); + if err <> Z_STREAM_END then + CHECK_ERR(err, 'deflate'); + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); + + comprLen := c_stream.total_out; +end; +{$ENDIF} + +(* =========================================================================== + * Test inflateSync() + *) +{$IFDEF TEST_SYNC} +procedure test_sync(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen : LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := 2; (* just read the zlib header *) + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + d_stream.next_out := uncompr; + d_stream.avail_out := Integer(uncomprLen); + + inflate(d_stream, Z_NO_FLUSH); + CHECK_ERR(err, 'inflate'); + + d_stream.avail_in := Integer(comprLen-2); (* read all compressed data *) + err := inflateSync(d_stream); (* but skip the damaged part *) + CHECK_ERR(err, 'inflateSync'); + + err := inflate(d_stream, Z_FINISH); + if err <> Z_DATA_ERROR then + EXIT_ERR('inflate should report DATA_ERROR'); + (* Because of incorrect adler32 *) + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + WriteLn('after inflateSync(): hel', PChar(uncompr)); +end; +{$ENDIF} + +(* =========================================================================== + * Test deflate with preset dictionary + *) +{$IFDEF TEST_DICT} +procedure test_dict_deflate(compr: Pointer; comprLen: LongInt); +var c_stream: z_stream; (* compression stream *) + err: Integer; +begin + c_stream.zalloc := NIL; + c_stream.zfree := NIL; + c_stream.opaque := NIL; + + err := deflateInit(c_stream, Z_BEST_COMPRESSION); + CHECK_ERR(err, 'deflateInit'); + + err := deflateSetDictionary(c_stream, dictionary, StrLen(dictionary)); + CHECK_ERR(err, 'deflateSetDictionary'); + + dictId := c_stream.adler; + c_stream.next_out := compr; + c_stream.avail_out := Integer(comprLen); + + c_stream.next_in := hello; + c_stream.avail_in := StrLen(hello)+1; + + err := deflate(c_stream, Z_FINISH); + if err <> Z_STREAM_END then + EXIT_ERR('deflate should report Z_STREAM_END'); + + err := deflateEnd(c_stream); + CHECK_ERR(err, 'deflateEnd'); +end; +{$ENDIF} + +(* =========================================================================== + * Test inflate with a preset dictionary + *) +{$IFDEF TEST_DICT} +procedure test_dict_inflate(compr: Pointer; comprLen: LongInt; + uncompr: Pointer; uncomprLen: LongInt); +var err: Integer; + d_stream: z_stream; (* decompression stream *) +begin + StrCopy(PChar(uncompr), 'garbage'); + + d_stream.zalloc := NIL; + d_stream.zfree := NIL; + d_stream.opaque := NIL; + + d_stream.next_in := compr; + d_stream.avail_in := Integer(comprLen); + + err := inflateInit(d_stream); + CHECK_ERR(err, 'inflateInit'); + + d_stream.next_out := uncompr; + d_stream.avail_out := Integer(uncomprLen); + + while TRUE do + begin + err := inflate(d_stream, Z_NO_FLUSH); + if err = Z_STREAM_END then + break; + if err = Z_NEED_DICT then + begin + if d_stream.adler <> dictId then + EXIT_ERR('unexpected dictionary'); + err := inflateSetDictionary(d_stream, dictionary, StrLen(dictionary)); + end; + CHECK_ERR(err, 'inflate with dict'); + end; + + err := inflateEnd(d_stream); + CHECK_ERR(err, 'inflateEnd'); + + if StrComp(PChar(uncompr), hello) <> 0 then + EXIT_ERR('bad inflate with dict') + else + WriteLn('inflate with dictionary: ', PChar(uncompr)); +end; +{$ENDIF} + +var compr, uncompr: Pointer; + comprLen, uncomprLen: LongInt; + +begin + if zlibVersion^ <> ZLIB_VERSION[1] then + EXIT_ERR('Incompatible zlib version'); + + WriteLn('zlib version: ', zlibVersion); + WriteLn('zlib compile flags: ', Format('0x%x', [zlibCompileFlags])); + + comprLen := 10000 * SizeOf(Integer); (* don't overflow on MSDOS *) + uncomprLen := comprLen; + GetMem(compr, comprLen); + GetMem(uncompr, uncomprLen); + if (compr = NIL) or (uncompr = NIL) then + EXIT_ERR('Out of memory'); + (* compr and uncompr are cleared to avoid reading uninitialized + * data and to ensure that uncompr compresses well. + *) + FillChar(compr^, comprLen, 0); + FillChar(uncompr^, uncomprLen, 0); + + {$IFDEF TEST_COMPRESS} + WriteLn('** Testing compress'); + test_compress(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_GZIO} + WriteLn('** Testing gzio'); + if ParamCount >= 1 then + test_gzio(ParamStr(1), uncompr, uncomprLen) + else + test_gzio(TESTFILE, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_DEFLATE} + WriteLn('** Testing deflate with small buffers'); + test_deflate(compr, comprLen); + {$ENDIF} + {$IFDEF TEST_INFLATE} + WriteLn('** Testing inflate with small buffers'); + test_inflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_DEFLATE} + WriteLn('** Testing deflate with large buffers'); + test_large_deflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + {$IFDEF TEST_INFLATE} + WriteLn('** Testing inflate with large buffers'); + test_large_inflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + {$IFDEF TEST_FLUSH} + WriteLn('** Testing deflate with full flush'); + test_flush(compr, comprLen); + {$ENDIF} + {$IFDEF TEST_SYNC} + WriteLn('** Testing inflateSync'); + test_sync(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + comprLen := uncomprLen; + + {$IFDEF TEST_DICT} + WriteLn('** Testing deflate and inflate with preset dictionary'); + test_dict_deflate(compr, comprLen); + test_dict_inflate(compr, comprLen, uncompr, uncomprLen); + {$ENDIF} + + FreeMem(compr, comprLen); + FreeMem(uncompr, uncomprLen); +end. diff --git a/compat/zlib/contrib/pascal/readme.txt b/compat/zlib/contrib/pascal/readme.txt new file mode 100644 index 0000000..60e87c8 --- /dev/null +++ b/compat/zlib/contrib/pascal/readme.txt @@ -0,0 +1,76 @@ + +This directory contains a Pascal (Delphi, Kylix) interface to the +zlib data compression library. + + +Directory listing +================= + +zlibd32.mak makefile for Borland C++ +example.pas usage example of zlib +zlibpas.pas the Pascal interface to zlib +readme.txt this file + + +Compatibility notes +=================== + +- Although the name "zlib" would have been more normal for the + zlibpas unit, this name is already taken by Borland's ZLib unit. + This is somehow unfortunate, because that unit is not a genuine + interface to the full-fledged zlib functionality, but a suite of + class wrappers around zlib streams. Other essential features, + such as checksums, are missing. + It would have been more appropriate for that unit to have a name + like "ZStreams", or something similar. + +- The C and zlib-supplied types int, uInt, long, uLong, etc. are + translated directly into Pascal types of similar sizes (Integer, + LongInt, etc.), to avoid namespace pollution. In particular, + there is no conversion of unsigned int into a Pascal unsigned + integer. The Word type is non-portable and has the same size + (16 bits) both in a 16-bit and in a 32-bit environment, unlike + Integer. Even if there is a 32-bit Cardinal type, there is no + real need for unsigned int in zlib under a 32-bit environment. + +- Except for the callbacks, the zlib function interfaces are + assuming the calling convention normally used in Pascal + (__pascal for DOS and Windows16, __fastcall for Windows32). + Since the cdecl keyword is used, the old Turbo Pascal does + not work with this interface. + +- The gz* function interfaces are not translated, to avoid + interfacing problems with the C runtime library. Besides, + gzprintf(gzFile file, const char *format, ...) + cannot be translated into Pascal. + + +Legal issues +============ + +The zlibpas interface is: + Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler. + Copyright (C) 1998 by Bob Dellaca. + Copyright (C) 2003 by Cosmin Truta. + +The example program is: + Copyright (C) 1995-2003 by Jean-loup Gailly. + Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali. + Copyright (C) 2003 by Cosmin Truta. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + diff --git a/compat/zlib/contrib/pascal/zlibd32.mak b/compat/zlib/contrib/pascal/zlibd32.mak new file mode 100644 index 0000000..88fafa0 --- /dev/null +++ b/compat/zlib/contrib/pascal/zlibd32.mak @@ -0,0 +1,93 @@ +# Makefile for zlib +# For use with Delphi and C++ Builder under Win32 +# Updated for zlib 1.2.x by Cosmin Truta + +# ------------ Borland C++ ------------ + +# This project uses the Delphi (fastcall/register) calling convention: +LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl + +CC = bcc32 +LD = bcc32 +AR = tlib +# do not use "-pr" in CFLAGS +CFLAGS = -a -d -k- -O2 $(LOC) +LDFLAGS = + + +# variables +ZLIB_LIB = zlib.lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj +OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj +OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj + + +# targets +all: $(ZLIB_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(CFLAGS) $*.c + +adler32.obj: adler32.c zlib.h zconf.h + +compress.obj: compress.c zlib.h zconf.h + +crc32.obj: crc32.c zlib.h zconf.h crc32.h + +deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h + +gzio.obj: gzio.c zutil.h zlib.h zconf.h + +infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h + +trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h + +uncompr.obj: uncompr.c zlib.h zconf.h + +zutil.obj: zutil.c zutil.h zlib.h zconf.h + +example.obj: example.c zlib.h zconf.h + +minigzip.obj: minigzip.c zlib.h zconf.h + + +# For the sake of the old Borland make, +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(ZLIB_LIB): $(OBJ1) $(OBJ2) + -del $(ZLIB_LIB) + $(AR) $(ZLIB_LIB) $(OBJP1) + $(AR) $(ZLIB_LIB) $(OBJP2) + + +# testing +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +example.exe: example.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB) + +minigzip.exe: minigzip.obj $(ZLIB_LIB) + $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB) + + +# cleanup +clean: + -del *.obj + -del *.exe + -del *.lib + -del *.tds + -del zlib.bak + -del foo.gz + diff --git a/compat/zlib/contrib/pascal/zlibpas.pas b/compat/zlib/contrib/pascal/zlibpas.pas new file mode 100644 index 0000000..836848c --- /dev/null +++ b/compat/zlib/contrib/pascal/zlibpas.pas @@ -0,0 +1,236 @@ +(* zlibpas -- Pascal interface to the zlib data compression library + * + * Copyright (C) 2003 Cosmin Truta. + * Derived from original sources by Bob Dellaca. + * For conditions of distribution and use, see copyright notice in readme.txt + *) + +unit zlibpas; + +interface + +const + ZLIB_VERSION = '1.2.3'; + +type + alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; + cdecl; + free_func = procedure(opaque, address: Pointer); + cdecl; + + in_func = function(opaque: Pointer; var buf: PByte): Integer; + cdecl; + out_func = function(opaque: Pointer; buf: PByte; size: Integer): Integer; + cdecl; + + z_streamp = ^z_stream; + z_stream = packed record + next_in: PChar; (* next input byte *) + avail_in: Integer; (* number of bytes available at next_in *) + total_in: LongInt; (* total nb of input bytes read so far *) + + next_out: PChar; (* next output byte should be put there *) + avail_out: Integer; (* remaining free space at next_out *) + total_out: LongInt; (* total nb of bytes output so far *) + + msg: PChar; (* last error message, NULL if no error *) + state: Pointer; (* not visible by applications *) + + zalloc: alloc_func; (* used to allocate the internal state *) + zfree: free_func; (* used to free the internal state *) + opaque: Pointer; (* private data object passed to zalloc and zfree *) + + data_type: Integer; (* best guess about the data type: ascii or binary *) + adler: LongInt; (* adler32 value of the uncompressed data *) + reserved: LongInt; (* reserved for future use *) + end; + +(* constants *) +const + Z_NO_FLUSH = 0; + Z_PARTIAL_FLUSH = 1; + Z_SYNC_FLUSH = 2; + Z_FULL_FLUSH = 3; + Z_FINISH = 4; + + Z_OK = 0; + Z_STREAM_END = 1; + Z_NEED_DICT = 2; + Z_ERRNO = -1; + Z_STREAM_ERROR = -2; + Z_DATA_ERROR = -3; + Z_MEM_ERROR = -4; + Z_BUF_ERROR = -5; + Z_VERSION_ERROR = -6; + + Z_NO_COMPRESSION = 0; + Z_BEST_SPEED = 1; + Z_BEST_COMPRESSION = 9; + Z_DEFAULT_COMPRESSION = -1; + + Z_FILTERED = 1; + Z_HUFFMAN_ONLY = 2; + Z_RLE = 3; + Z_DEFAULT_STRATEGY = 0; + + Z_BINARY = 0; + Z_ASCII = 1; + Z_UNKNOWN = 2; + + Z_DEFLATED = 8; + +(* basic functions *) +function zlibVersion: PChar; +function deflateInit(var strm: z_stream; level: Integer): Integer; +function deflate(var strm: z_stream; flush: Integer): Integer; +function deflateEnd(var strm: z_stream): Integer; +function inflateInit(var strm: z_stream): Integer; +function inflate(var strm: z_stream; flush: Integer): Integer; +function inflateEnd(var strm: z_stream): Integer; + +(* advanced functions *) +function deflateInit2(var strm: z_stream; level, method, windowBits, + memLevel, strategy: Integer): Integer; +function deflateSetDictionary(var strm: z_stream; const dictionary: PChar; + dictLength: Integer): Integer; +function deflateCopy(var dest, source: z_stream): Integer; +function deflateReset(var strm: z_stream): Integer; +function deflateParams(var strm: z_stream; level, strategy: Integer): Integer; +function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt; +function deflatePrime(var strm: z_stream; bits, value: Integer): Integer; +function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; +function inflateSetDictionary(var strm: z_stream; const dictionary: PChar; + dictLength: Integer): Integer; +function inflateSync(var strm: z_stream): Integer; +function inflateCopy(var dest, source: z_stream): Integer; +function inflateReset(var strm: z_stream): Integer; +function inflateBackInit(var strm: z_stream; + windowBits: Integer; window: PChar): Integer; +function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer; + out_fn: out_func; out_desc: Pointer): Integer; +function inflateBackEnd(var strm: z_stream): Integer; +function zlibCompileFlags: LongInt; + +(* utility functions *) +function compress(dest: PChar; var destLen: LongInt; + const source: PChar; sourceLen: LongInt): Integer; +function compress2(dest: PChar; var destLen: LongInt; + const source: PChar; sourceLen: LongInt; + level: Integer): Integer; +function compressBound(sourceLen: LongInt): LongInt; +function uncompress(dest: PChar; var destLen: LongInt; + const source: PChar; sourceLen: LongInt): Integer; + +(* checksum functions *) +function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt; +function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt; + +(* various hacks, don't look :) *) +function deflateInit_(var strm: z_stream; level: Integer; + const version: PChar; stream_size: Integer): Integer; +function inflateInit_(var strm: z_stream; const version: PChar; + stream_size: Integer): Integer; +function deflateInit2_(var strm: z_stream; + level, method, windowBits, memLevel, strategy: Integer; + const version: PChar; stream_size: Integer): Integer; +function inflateInit2_(var strm: z_stream; windowBits: Integer; + const version: PChar; stream_size: Integer): Integer; +function inflateBackInit_(var strm: z_stream; + windowBits: Integer; window: PChar; + const version: PChar; stream_size: Integer): Integer; + + +implementation + +{$L adler32.obj} +{$L compress.obj} +{$L crc32.obj} +{$L deflate.obj} +{$L infback.obj} +{$L inffast.obj} +{$L inflate.obj} +{$L inftrees.obj} +{$L trees.obj} +{$L uncompr.obj} +{$L zutil.obj} + +function adler32; external; +function compress; external; +function compress2; external; +function compressBound; external; +function crc32; external; +function deflate; external; +function deflateBound; external; +function deflateCopy; external; +function deflateEnd; external; +function deflateInit_; external; +function deflateInit2_; external; +function deflateParams; external; +function deflatePrime; external; +function deflateReset; external; +function deflateSetDictionary; external; +function inflate; external; +function inflateBack; external; +function inflateBackEnd; external; +function inflateBackInit_; external; +function inflateCopy; external; +function inflateEnd; external; +function inflateInit_; external; +function inflateInit2_; external; +function inflateReset; external; +function inflateSetDictionary; external; +function inflateSync; external; +function uncompress; external; +function zlibCompileFlags; external; +function zlibVersion; external; + +function deflateInit(var strm: z_stream; level: Integer): Integer; +begin + Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream)); +end; + +function deflateInit2(var strm: z_stream; level, method, windowBits, memLevel, + strategy: Integer): Integer; +begin + Result := deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + ZLIB_VERSION, sizeof(z_stream)); +end; + +function inflateInit(var strm: z_stream): Integer; +begin + Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream)); +end; + +function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; +begin + Result := inflateInit2_(strm, windowBits, ZLIB_VERSION, sizeof(z_stream)); +end; + +function inflateBackInit(var strm: z_stream; + windowBits: Integer; window: PChar): Integer; +begin + Result := inflateBackInit_(strm, windowBits, window, + ZLIB_VERSION, sizeof(z_stream)); +end; + +function _malloc(Size: Integer): Pointer; cdecl; +begin + GetMem(Result, Size); +end; + +procedure _free(Block: Pointer); cdecl; +begin + FreeMem(Block); +end; + +procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl; +begin + FillChar(P^, count, B); +end; + +procedure _memcpy(dest, source: Pointer; count: Integer); cdecl; +begin + Move(source^, dest^, count); +end; + +end. diff --git a/compat/zlib/contrib/puff/Makefile b/compat/zlib/contrib/puff/Makefile new file mode 100644 index 0000000..b6b6940 --- /dev/null +++ b/compat/zlib/contrib/puff/Makefile @@ -0,0 +1,8 @@ +puff: puff.c puff.h + cc -DTEST -o puff puff.c + +test: puff + puff zeros.raw + +clean: + rm -f puff puff.o diff --git a/compat/zlib/contrib/puff/README b/compat/zlib/contrib/puff/README new file mode 100644 index 0000000..bbc4cb5 --- /dev/null +++ b/compat/zlib/contrib/puff/README @@ -0,0 +1,63 @@ +Puff -- A Simple Inflate +3 Mar 2003 +Mark Adler +madler@alumni.caltech.edu + +What this is -- + +puff.c provides the routine puff() to decompress the deflate data format. It +does so more slowly than zlib, but the code is about one-fifth the size of the +inflate code in zlib, and written to be very easy to read. + +Why I wrote this -- + +puff.c was written to document the deflate format unambiguously, by virtue of +being working C code. It is meant to supplement RFC 1951, which formally +describes the deflate format. I have received many questions on details of the +deflate format, and I hope that reading this code will answer those questions. +puff.c is heavily commented with details of the deflate format, especially +those little nooks and cranies of the format that might not be obvious from a +specification. + +puff.c may also be useful in applications where code size or memory usage is a +very limited resource, and speed is not as important. + +How to use it -- + +Well, most likely you should just be reading puff.c and using zlib for actual +applications, but if you must ... + +Include puff.h in your code, which provides this prototype: + +int puff(unsigned char *dest, /* pointer to destination pointer */ + unsigned long *destlen, /* amount of output space */ + unsigned char *source, /* pointer to source data pointer */ + unsigned long *sourcelen); /* amount of input available */ + +Then you can call puff() to decompress a deflate stream that is in memory in +its entirety at source, to a sufficiently sized block of memory for the +decompressed data at dest. puff() is the only external symbol in puff.c The +only C library functions that puff.c needs are setjmp() and longjmp(), which +are used to simplify error checking in the code to improve readabilty. puff.c +does no memory allocation, and uses less than 2K bytes off of the stack. + +If destlen is not enough space for the uncompressed data, then inflate will +return an error without writing more than destlen bytes. Note that this means +that in order to decompress the deflate data successfully, you need to know +the size of the uncompressed data ahead of time. + +If needed, puff() can determine the size of the uncompressed data with no +output space. This is done by passing dest equal to (unsigned char *)0. Then +the initial value of *destlen is ignored and *destlen is set to the length of +the uncompressed data. So if the size of the uncompressed data is not known, +then two passes of puff() can be used--first to determine the size, and second +to do the actual inflation after allocating the appropriate memory. Not +pretty, but it works. (This is one of the reasons you should be using zlib.) + +The deflate format is self-terminating. If the deflate stream does not end +in *sourcelen bytes, puff() will return an error without reading at or past +endsource. + +On return, *sourcelen is updated to the amount of input data consumed, and +*destlen is updated to the size of the uncompressed data. See the comments +in puff.c for the possible return codes for puff(). diff --git a/compat/zlib/contrib/puff/puff.c b/compat/zlib/contrib/puff/puff.c new file mode 100644 index 0000000..ce0cc40 --- /dev/null +++ b/compat/zlib/contrib/puff/puff.c @@ -0,0 +1,837 @@ +/* + * puff.c + * Copyright (C) 2002-2004 Mark Adler + * For conditions of distribution and use, see copyright notice in puff.h + * version 1.8, 9 Jan 2004 + * + * puff.c is a simple inflate written to be an unambiguous way to specify the + * deflate format. It is not written for speed but rather simplicity. As a + * side benefit, this code might actually be useful when small code is more + * important than speed, such as bootstrap applications. For typical deflate + * data, zlib's inflate() is about four times as fast as puff(). zlib's + * inflate compiles to around 20K on my machine, whereas puff.c compiles to + * around 4K on my machine (a PowerPC using GNU cc). If the faster decode() + * function here is used, then puff() is only twice as slow as zlib's + * inflate(). + * + * All dynamically allocated memory comes from the stack. The stack required + * is less than 2K bytes. This code is compatible with 16-bit int's and + * assumes that long's are at least 32 bits. puff.c uses the short data type, + * assumed to be 16 bits, for arrays in order to to conserve memory. The code + * works whether integers are stored big endian or little endian. + * + * In the comments below are "Format notes" that describe the inflate process + * and document some of the less obvious aspects of the format. This source + * code is meant to supplement RFC 1951, which formally describes the deflate + * format: + * + * http://www.zlib.org/rfc-deflate.html + */ + +/* + * Change history: + * + * 1.0 10 Feb 2002 - First version + * 1.1 17 Feb 2002 - Clarifications of some comments and notes + * - Update puff() dest and source pointers on negative + * errors to facilitate debugging deflators + * - Remove longest from struct huffman -- not needed + * - Simplify offs[] index in construct() + * - Add input size and checking, using longjmp() to + * maintain easy readability + * - Use short data type for large arrays + * - Use pointers instead of long to specify source and + * destination sizes to avoid arbitrary 4 GB limits + * 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!), + * but leave simple version for readabilty + * - Make sure invalid distances detected if pointers + * are 16 bits + * - Fix fixed codes table error + * - Provide a scanning mode for determining size of + * uncompressed data + * 1.3 20 Mar 2002 - Go back to lengths for puff() parameters [Jean-loup] + * - Add a puff.h file for the interface + * - Add braces in puff() for else do [Jean-loup] + * - Use indexes instead of pointers for readability + * 1.4 31 Mar 2002 - Simplify construct() code set check + * - Fix some comments + * - Add FIXLCODES #define + * 1.5 6 Apr 2002 - Minor comment fixes + * 1.6 7 Aug 2002 - Minor format changes + * 1.7 3 Mar 2003 - Added test code for distribution + * - Added zlib-like license + * 1.8 9 Jan 2004 - Added some comments on no distance codes case + */ + +#include /* for setjmp(), longjmp(), and jmp_buf */ +#include "puff.h" /* prototype for puff() */ + +#define local static /* for local function definitions */ +#define NIL ((unsigned char *)0) /* for no output option */ + +/* + * Maximums for allocations and loops. It is not useful to change these -- + * they are fixed by the deflate format. + */ +#define MAXBITS 15 /* maximum bits in a code */ +#define MAXLCODES 286 /* maximum number of literal/length codes */ +#define MAXDCODES 30 /* maximum number of distance codes */ +#define MAXCODES (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */ +#define FIXLCODES 288 /* number of fixed literal/length codes */ + +/* input and output state */ +struct state { + /* output state */ + unsigned char *out; /* output buffer */ + unsigned long outlen; /* available space at out */ + unsigned long outcnt; /* bytes written to out so far */ + + /* input state */ + unsigned char *in; /* input buffer */ + unsigned long inlen; /* available input at in */ + unsigned long incnt; /* bytes read so far */ + int bitbuf; /* bit buffer */ + int bitcnt; /* number of bits in bit buffer */ + + /* input limit error return state for bits() and decode() */ + jmp_buf env; +}; + +/* + * Return need bits from the input stream. This always leaves less than + * eight bits in the buffer. bits() works properly for need == 0. + * + * Format notes: + * + * - Bits are stored in bytes from the least significant bit to the most + * significant bit. Therefore bits are dropped from the bottom of the bit + * buffer, using shift right, and new bytes are appended to the top of the + * bit buffer, using shift left. + */ +local int bits(struct state *s, int need) +{ + long val; /* bit accumulator (can use up to 20 bits) */ + + /* load at least need bits into val */ + val = s->bitbuf; + while (s->bitcnt < need) { + if (s->incnt == s->inlen) longjmp(s->env, 1); /* out of input */ + val |= (long)(s->in[s->incnt++]) << s->bitcnt; /* load eight bits */ + s->bitcnt += 8; + } + + /* drop need bits and update buffer, always zero to seven bits left */ + s->bitbuf = (int)(val >> need); + s->bitcnt -= need; + + /* return need bits, zeroing the bits above that */ + return (int)(val & ((1L << need) - 1)); +} + +/* + * Process a stored block. + * + * Format notes: + * + * - After the two-bit stored block type (00), the stored block length and + * stored bytes are byte-aligned for fast copying. Therefore any leftover + * bits in the byte that has the last bit of the type, as many as seven, are + * discarded. The value of the discarded bits are not defined and should not + * be checked against any expectation. + * + * - The second inverted copy of the stored block length does not have to be + * checked, but it's probably a good idea to do so anyway. + * + * - A stored block can have zero length. This is sometimes used to byte-align + * subsets of the compressed data for random access or partial recovery. + */ +local int stored(struct state *s) +{ + unsigned len; /* length of stored block */ + + /* discard leftover bits from current byte (assumes s->bitcnt < 8) */ + s->bitbuf = 0; + s->bitcnt = 0; + + /* get length and check against its one's complement */ + if (s->incnt + 4 > s->inlen) return 2; /* not enough input */ + len = s->in[s->incnt++]; + len |= s->in[s->incnt++] << 8; + if (s->in[s->incnt++] != (~len & 0xff) || + s->in[s->incnt++] != ((~len >> 8) & 0xff)) + return -2; /* didn't match complement! */ + + /* copy len bytes from in to out */ + if (s->incnt + len > s->inlen) return 2; /* not enough input */ + if (s->out != NIL) { + if (s->outcnt + len > s->outlen) + return 1; /* not enough output space */ + while (len--) + s->out[s->outcnt++] = s->in[s->incnt++]; + } + else { /* just scanning */ + s->outcnt += len; + s->incnt += len; + } + + /* done with a valid stored block */ + return 0; +} + +/* + * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of + * each length, which for a canonical code are stepped through in order. + * symbol[] are the symbol values in canonical order, where the number of + * entries is the sum of the counts in count[]. The decoding process can be + * seen in the function decode() below. + */ +struct huffman { + short *count; /* number of symbols of each length */ + short *symbol; /* canonically ordered symbols */ +}; + +/* + * Decode a code from the stream s using huffman table h. Return the symbol or + * a negative value if there is an error. If all of the lengths are zero, i.e. + * an empty code, or if the code is incomplete and an invalid code is received, + * then -9 is returned after reading MAXBITS bits. + * + * Format notes: + * + * - The codes as stored in the compressed data are bit-reversed relative to + * a simple integer ordering of codes of the same lengths. Hence below the + * bits are pulled from the compressed data one at a time and used to + * build the code value reversed from what is in the stream in order to + * permit simple integer comparisons for decoding. A table-based decoding + * scheme (as used in zlib) does not need to do this reversal. + * + * - The first code for the shortest length is all zeros. Subsequent codes of + * the same length are simply integer increments of the previous code. When + * moving up a length, a zero bit is appended to the code. For a complete + * code, the last code of the longest length will be all ones. + * + * - Incomplete codes are handled by this decoder, since they are permitted + * in the deflate format. See the format notes for fixed() and dynamic(). + */ +#ifdef SLOW +local int decode(struct state *s, struct huffman *h) +{ + int len; /* current number of bits in code */ + int code; /* len bits being decoded */ + int first; /* first code of length len */ + int count; /* number of codes of length len */ + int index; /* index of first code of length len in symbol table */ + + code = first = index = 0; + for (len = 1; len <= MAXBITS; len++) { + code |= bits(s, 1); /* get next bit */ + count = h->count[len]; + if (code < first + count) /* if length len, return symbol */ + return h->symbol[index + (code - first)]; + index += count; /* else update for next length */ + first += count; + first <<= 1; + code <<= 1; + } + return -9; /* ran out of codes */ +} + +/* + * A faster version of decode() for real applications of this code. It's not + * as readable, but it makes puff() twice as fast. And it only makes the code + * a few percent larger. + */ +#else /* !SLOW */ +local int decode(struct state *s, struct huffman *h) +{ + int len; /* current number of bits in code */ + int code; /* len bits being decoded */ + int first; /* first code of length len */ + int count; /* number of codes of length len */ + int index; /* index of first code of length len in symbol table */ + int bitbuf; /* bits from stream */ + int left; /* bits left in next or left to process */ + short *next; /* next number of codes */ + + bitbuf = s->bitbuf; + left = s->bitcnt; + code = first = index = 0; + len = 1; + next = h->count + 1; + while (1) { + while (left--) { + code |= bitbuf & 1; + bitbuf >>= 1; + count = *next++; + if (code < first + count) { /* if length len, return symbol */ + s->bitbuf = bitbuf; + s->bitcnt = (s->bitcnt - len) & 7; + return h->symbol[index + (code - first)]; + } + index += count; /* else update for next length */ + first += count; + first <<= 1; + code <<= 1; + len++; + } + left = (MAXBITS+1) - len; + if (left == 0) break; + if (s->incnt == s->inlen) longjmp(s->env, 1); /* out of input */ + bitbuf = s->in[s->incnt++]; + if (left > 8) left = 8; + } + return -9; /* ran out of codes */ +} +#endif /* SLOW */ + +/* + * Given the list of code lengths length[0..n-1] representing a canonical + * Huffman code for n symbols, construct the tables required to decode those + * codes. Those tables are the number of codes of each length, and the symbols + * sorted by length, retaining their original order within each length. The + * return value is zero for a complete code set, negative for an over- + * subscribed code set, and positive for an incomplete code set. The tables + * can be used if the return value is zero or positive, but they cannot be used + * if the return value is negative. If the return value is zero, it is not + * possible for decode() using that table to return an error--any stream of + * enough bits will resolve to a symbol. If the return value is positive, then + * it is possible for decode() using that table to return an error for received + * codes past the end of the incomplete lengths. + * + * Not used by decode(), but used for error checking, h->count[0] is the number + * of the n symbols not in the code. So n - h->count[0] is the number of + * codes. This is useful for checking for incomplete codes that have more than + * one symbol, which is an error in a dynamic block. + * + * Assumption: for all i in 0..n-1, 0 <= length[i] <= MAXBITS + * This is assured by the construction of the length arrays in dynamic() and + * fixed() and is not verified by construct(). + * + * Format notes: + * + * - Permitted and expected examples of incomplete codes are one of the fixed + * codes and any code with a single symbol which in deflate is coded as one + * bit instead of zero bits. See the format notes for fixed() and dynamic(). + * + * - Within a given code length, the symbols are kept in ascending order for + * the code bits definition. + */ +local int construct(struct huffman *h, short *length, int n) +{ + int symbol; /* current symbol when stepping through length[] */ + int len; /* current length when stepping through h->count[] */ + int left; /* number of possible codes left of current length */ + short offs[MAXBITS+1]; /* offsets in symbol table for each length */ + + /* count number of codes of each length */ + for (len = 0; len <= MAXBITS; len++) + h->count[len] = 0; + for (symbol = 0; symbol < n; symbol++) + (h->count[length[symbol]])++; /* assumes lengths are within bounds */ + if (h->count[0] == n) /* no codes! */ + return 0; /* complete, but decode() will fail */ + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; /* one possible code of zero length */ + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; /* one more bit, double codes left */ + left -= h->count[len]; /* deduct count from possible codes */ + if (left < 0) return left; /* over-subscribed--return negative */ + } /* left > 0 means incomplete */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + h->count[len]; + + /* + * put symbols in table sorted by length, by symbol order within each + * length + */ + for (symbol = 0; symbol < n; symbol++) + if (length[symbol] != 0) + h->symbol[offs[length[symbol]]++] = symbol; + + /* return zero for complete set, positive for incomplete set */ + return left; +} + +/* + * Decode literal/length and distance codes until an end-of-block code. + * + * Format notes: + * + * - Compressed data that is after the block type if fixed or after the code + * description if dynamic is a combination of literals and length/distance + * pairs terminated by and end-of-block code. Literals are simply Huffman + * coded bytes. A length/distance pair is a coded length followed by a + * coded distance to represent a string that occurs earlier in the + * uncompressed data that occurs again at the current location. + * + * - Literals, lengths, and the end-of-block code are combined into a single + * code of up to 286 symbols. They are 256 literals (0..255), 29 length + * symbols (257..285), and the end-of-block symbol (256). + * + * - There are 256 possible lengths (3..258), and so 29 symbols are not enough + * to represent all of those. Lengths 3..10 and 258 are in fact represented + * by just a length symbol. Lengths 11..257 are represented as a symbol and + * some number of extra bits that are added as an integer to the base length + * of the length symbol. The number of extra bits is determined by the base + * length symbol. These are in the static arrays below, lens[] for the base + * lengths and lext[] for the corresponding number of extra bits. + * + * - The reason that 258 gets its own symbol is that the longest length is used + * often in highly redundant files. Note that 258 can also be coded as the + * base value 227 plus the maximum extra value of 31. While a good deflate + * should never do this, it is not an error, and should be decoded properly. + * + * - If a length is decoded, including its extra bits if any, then it is + * followed a distance code. There are up to 30 distance symbols. Again + * there are many more possible distances (1..32768), so extra bits are added + * to a base value represented by the symbol. The distances 1..4 get their + * own symbol, but the rest require extra bits. The base distances and + * corresponding number of extra bits are below in the static arrays dist[] + * and dext[]. + * + * - Literal bytes are simply written to the output. A length/distance pair is + * an instruction to copy previously uncompressed bytes to the output. The + * copy is from distance bytes back in the output stream, copying for length + * bytes. + * + * - Distances pointing before the beginning of the output data are not + * permitted. + * + * - Overlapped copies, where the length is greater than the distance, are + * allowed and common. For example, a distance of one and a length of 258 + * simply copies the last byte 258 times. A distance of four and a length of + * twelve copies the last four bytes three times. A simple forward copy + * ignoring whether the length is greater than the distance or not implements + * this correctly. You should not use memcpy() since its behavior is not + * defined for overlapped arrays. You should not use memmove() or bcopy() + * since though their behavior -is- defined for overlapping arrays, it is + * defined to do the wrong thing in this case. + */ +local int codes(struct state *s, + struct huffman *lencode, + struct huffman *distcode) +{ + int symbol; /* decoded symbol */ + int len; /* length for copy */ + unsigned dist; /* distance for copy */ + static const short lens[29] = { /* Size base for length codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; + static const short lext[29] = { /* Extra bits for length codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; + static const short dists[30] = { /* Offset base for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; + static const short dext[30] = { /* Extra bits for distance codes 0..29 */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + + /* decode literals and length/distance pairs */ + do { + symbol = decode(s, lencode); + if (symbol < 0) return symbol; /* invalid symbol */ + if (symbol < 256) { /* literal: symbol is the byte */ + /* write out the literal */ + if (s->out != NIL) { + if (s->outcnt == s->outlen) return 1; + s->out[s->outcnt] = symbol; + } + s->outcnt++; + } + else if (symbol > 256) { /* length */ + /* get and compute length */ + symbol -= 257; + if (symbol >= 29) return -9; /* invalid fixed code */ + len = lens[symbol] + bits(s, lext[symbol]); + + /* get and check distance */ + symbol = decode(s, distcode); + if (symbol < 0) return symbol; /* invalid symbol */ + dist = dists[symbol] + bits(s, dext[symbol]); + if (dist > s->outcnt) + return -10; /* distance too far back */ + + /* copy length bytes from distance bytes back */ + if (s->out != NIL) { + if (s->outcnt + len > s->outlen) return 1; + while (len--) { + s->out[s->outcnt] = s->out[s->outcnt - dist]; + s->outcnt++; + } + } + else + s->outcnt += len; + } + } while (symbol != 256); /* end of block symbol */ + + /* done with a valid fixed or dynamic block */ + return 0; +} + +/* + * Process a fixed codes block. + * + * Format notes: + * + * - This block type can be useful for compressing small amounts of data for + * which the size of the code descriptions in a dynamic block exceeds the + * benefit of custom codes for that block. For fixed codes, no bits are + * spent on code descriptions. Instead the code lengths for literal/length + * codes and distance codes are fixed. The specific lengths for each symbol + * can be seen in the "for" loops below. + * + * - The literal/length code is complete, but has two symbols that are invalid + * and should result in an error if received. This cannot be implemented + * simply as an incomplete code since those two symbols are in the "middle" + * of the code. They are eight bits long and the longest literal/length\ + * code is nine bits. Therefore the code must be constructed with those + * symbols, and the invalid symbols must be detected after decoding. + * + * - The fixed distance codes also have two invalid symbols that should result + * in an error if received. Since all of the distance codes are the same + * length, this can be implemented as an incomplete code. Then the invalid + * codes are detected while decoding. + */ +local int fixed(struct state *s) +{ + static int virgin = 1; + static short lencnt[MAXBITS+1], lensym[FIXLCODES]; + static short distcnt[MAXBITS+1], distsym[MAXDCODES]; + static struct huffman lencode = {lencnt, lensym}; + static struct huffman distcode = {distcnt, distsym}; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + int symbol; + short lengths[FIXLCODES]; + + /* literal/length table */ + for (symbol = 0; symbol < 144; symbol++) + lengths[symbol] = 8; + for (; symbol < 256; symbol++) + lengths[symbol] = 9; + for (; symbol < 280; symbol++) + lengths[symbol] = 7; + for (; symbol < FIXLCODES; symbol++) + lengths[symbol] = 8; + construct(&lencode, lengths, FIXLCODES); + + /* distance table */ + for (symbol = 0; symbol < MAXDCODES; symbol++) + lengths[symbol] = 5; + construct(&distcode, lengths, MAXDCODES); + + /* do this just once */ + virgin = 0; + } + + /* decode data until end-of-block code */ + return codes(s, &lencode, &distcode); +} + +/* + * Process a dynamic codes block. + * + * Format notes: + * + * - A dynamic block starts with a description of the literal/length and + * distance codes for that block. New dynamic blocks allow the compressor to + * rapidly adapt to changing data with new codes optimized for that data. + * + * - The codes used by the deflate format are "canonical", which means that + * the actual bits of the codes are generated in an unambiguous way simply + * from the number of bits in each code. Therefore the code descriptions + * are simply a list of code lengths for each symbol. + * + * - The code lengths are stored in order for the symbols, so lengths are + * provided for each of the literal/length symbols, and for each of the + * distance symbols. + * + * - If a symbol is not used in the block, this is represented by a zero as + * as the code length. This does not mean a zero-length code, but rather + * that no code should be created for this symbol. There is no way in the + * deflate format to represent a zero-length code. + * + * - The maximum number of bits in a code is 15, so the possible lengths for + * any code are 1..15. + * + * - The fact that a length of zero is not permitted for a code has an + * interesting consequence. Normally if only one symbol is used for a given + * code, then in fact that code could be represented with zero bits. However + * in deflate, that code has to be at least one bit. So for example, if + * only a single distance base symbol appears in a block, then it will be + * represented by a single code of length one, in particular one 0 bit. This + * is an incomplete code, since if a 1 bit is received, it has no meaning, + * and should result in an error. So incomplete distance codes of one symbol + * should be permitted, and the receipt of invalid codes should be handled. + * + * - It is also possible to have a single literal/length code, but that code + * must be the end-of-block code, since every dynamic block has one. This + * is not the most efficient way to create an empty block (an empty fixed + * block is fewer bits), but it is allowed by the format. So incomplete + * literal/length codes of one symbol should also be permitted. + * + * - If there are only literal codes and no lengths, then there are no distance + * codes. This is represented by one distance code with zero bits. + * + * - The list of up to 286 length/literal lengths and up to 30 distance lengths + * are themselves compressed using Huffman codes and run-length encoding. In + * the list of code lengths, a 0 symbol means no code, a 1..15 symbol means + * that length, and the symbols 16, 17, and 18 are run-length instructions. + * Each of 16, 17, and 18 are follwed by extra bits to define the length of + * the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10 + * zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols + * are common, hence the special coding for zero lengths. + * + * - The symbols for 0..18 are Huffman coded, and so that code must be + * described first. This is simply a sequence of up to 19 three-bit values + * representing no code (0) or the code length for that symbol (1..7). + * + * - A dynamic block starts with three fixed-size counts from which is computed + * the number of literal/length code lengths, the number of distance code + * lengths, and the number of code length code lengths (ok, you come up with + * a better name!) in the code descriptions. For the literal/length and + * distance codes, lengths after those provided are considered zero, i.e. no + * code. The code length code lengths are received in a permuted order (see + * the order[] array below) to make a short code length code length list more + * likely. As it turns out, very short and very long codes are less likely + * to be seen in a dynamic code description, hence what may appear initially + * to be a peculiar ordering. + * + * - Given the number of literal/length code lengths (nlen) and distance code + * lengths (ndist), then they are treated as one long list of nlen + ndist + * code lengths. Therefore run-length coding can and often does cross the + * boundary between the two sets of lengths. + * + * - So to summarize, the code description at the start of a dynamic block is + * three counts for the number of code lengths for the literal/length codes, + * the distance codes, and the code length codes. This is followed by the + * code length code lengths, three bits each. This is used to construct the + * code length code which is used to read the remainder of the lengths. Then + * the literal/length code lengths and distance lengths are read as a single + * set of lengths using the code length codes. Codes are constructed from + * the resulting two sets of lengths, and then finally you can start + * decoding actual compressed data in the block. + * + * - For reference, a "typical" size for the code description in a dynamic + * block is around 80 bytes. + */ +local int dynamic(struct state *s) +{ + int nlen, ndist, ncode; /* number of lengths in descriptor */ + int index; /* index of lengths[] */ + int err; /* construct() return value */ + short lengths[MAXCODES]; /* descriptor code lengths */ + short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */ + short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */ + struct huffman lencode = {lencnt, lensym}; /* length code */ + struct huffman distcode = {distcnt, distsym}; /* distance code */ + static const short order[19] = /* permutation of code length codes */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + /* get number of lengths in each table, check lengths */ + nlen = bits(s, 5) + 257; + ndist = bits(s, 5) + 1; + ncode = bits(s, 4) + 4; + if (nlen > MAXLCODES || ndist > MAXDCODES) + return -3; /* bad counts */ + + /* read code length code lengths (really), missing lengths are zero */ + for (index = 0; index < ncode; index++) + lengths[order[index]] = bits(s, 3); + for (; index < 19; index++) + lengths[order[index]] = 0; + + /* build huffman table for code lengths codes (use lencode temporarily) */ + err = construct(&lencode, lengths, 19); + if (err != 0) return -4; /* require complete code set here */ + + /* read length/literal and distance code length tables */ + index = 0; + while (index < nlen + ndist) { + int symbol; /* decoded value */ + int len; /* last length to repeat */ + + symbol = decode(s, &lencode); + if (symbol < 16) /* length in 0..15 */ + lengths[index++] = symbol; + else { /* repeat instruction */ + len = 0; /* assume repeating zeros */ + if (symbol == 16) { /* repeat last length 3..6 times */ + if (index == 0) return -5; /* no last length! */ + len = lengths[index - 1]; /* last length */ + symbol = 3 + bits(s, 2); + } + else if (symbol == 17) /* repeat zero 3..10 times */ + symbol = 3 + bits(s, 3); + else /* == 18, repeat zero 11..138 times */ + symbol = 11 + bits(s, 7); + if (index + symbol > nlen + ndist) + return -6; /* too many lengths! */ + while (symbol--) /* repeat last or zero symbol times */ + lengths[index++] = len; + } + } + + /* build huffman table for literal/length codes */ + err = construct(&lencode, lengths, nlen); + if (err < 0 || (err > 0 && nlen - lencode.count[0] != 1)) + return -7; /* only allow incomplete codes if just one code */ + + /* build huffman table for distance codes */ + err = construct(&distcode, lengths + nlen, ndist); + if (err < 0 || (err > 0 && ndist - distcode.count[0] != 1)) + return -8; /* only allow incomplete codes if just one code */ + + /* decode data until end-of-block code */ + return codes(s, &lencode, &distcode); +} + +/* + * Inflate source to dest. On return, destlen and sourcelen are updated to the + * size of the uncompressed data and the size of the deflate data respectively. + * On success, the return value of puff() is zero. If there is an error in the + * source data, i.e. it is not in the deflate format, then a negative value is + * returned. If there is not enough input available or there is not enough + * output space, then a positive error is returned. In that case, destlen and + * sourcelen are not updated to facilitate retrying from the beginning with the + * provision of more input data or more output space. In the case of invalid + * inflate data (a negative error), the dest and source pointers are updated to + * facilitate the debugging of deflators. + * + * puff() also has a mode to determine the size of the uncompressed output with + * no output written. For this dest must be (unsigned char *)0. In this case, + * the input value of *destlen is ignored, and on return *destlen is set to the + * size of the uncompressed output. + * + * The return codes are: + * + * 2: available inflate data did not terminate + * 1: output space exhausted before completing inflate + * 0: successful inflate + * -1: invalid block type (type == 3) + * -2: stored block length did not match one's complement + * -3: dynamic block code description: too many length or distance codes + * -4: dynamic block code description: code lengths codes incomplete + * -5: dynamic block code description: repeat lengths with no first length + * -6: dynamic block code description: repeat more than specified lengths + * -7: dynamic block code description: invalid literal/length code lengths + * -8: dynamic block code description: invalid distance code lengths + * -9: invalid literal/length or distance code in fixed or dynamic block + * -10: distance is too far back in fixed or dynamic block + * + * Format notes: + * + * - Three bits are read for each block to determine the kind of block and + * whether or not it is the last block. Then the block is decoded and the + * process repeated if it was not the last block. + * + * - The leftover bits in the last byte of the deflate data after the last + * block (if it was a fixed or dynamic block) are undefined and have no + * expected values to check. + */ +int puff(unsigned char *dest, /* pointer to destination pointer */ + unsigned long *destlen, /* amount of output space */ + unsigned char *source, /* pointer to source data pointer */ + unsigned long *sourcelen) /* amount of input available */ +{ + struct state s; /* input/output state */ + int last, type; /* block information */ + int err; /* return value */ + + /* initialize output state */ + s.out = dest; + s.outlen = *destlen; /* ignored if dest is NIL */ + s.outcnt = 0; + + /* initialize input state */ + s.in = source; + s.inlen = *sourcelen; + s.incnt = 0; + s.bitbuf = 0; + s.bitcnt = 0; + + /* return if bits() or decode() tries to read past available input */ + if (setjmp(s.env) != 0) /* if came back here via longjmp() */ + err = 2; /* then skip do-loop, return error */ + else { + /* process blocks until last block or error */ + do { + last = bits(&s, 1); /* one if last block */ + type = bits(&s, 2); /* block type 0..3 */ + err = type == 0 ? stored(&s) : + (type == 1 ? fixed(&s) : + (type == 2 ? dynamic(&s) : + -1)); /* type == 3, invalid */ + if (err != 0) break; /* return with error */ + } while (!last); + } + + /* update the lengths and return */ + if (err <= 0) { + *destlen = s.outcnt; + *sourcelen = s.incnt; + } + return err; +} + +#ifdef TEST +/* Example of how to use puff() */ +#include +#include +#include +#include + +local unsigned char *yank(char *name, unsigned long *len) +{ + unsigned long size; + unsigned char *buf; + FILE *in; + struct stat s; + + *len = 0; + if (stat(name, &s)) return NULL; + if ((s.st_mode & S_IFMT) != S_IFREG) return NULL; + size = (unsigned long)(s.st_size); + if (size == 0 || (off_t)size != s.st_size) return NULL; + in = fopen(name, "r"); + if (in == NULL) return NULL; + buf = malloc(size); + if (buf != NULL && fread(buf, 1, size, in) != size) { + free(buf); + buf = NULL; + } + fclose(in); + *len = size; + return buf; +} + +int main(int argc, char **argv) +{ + int ret; + unsigned char *source; + unsigned long len, sourcelen, destlen; + + if (argc < 2) return 2; + source = yank(argv[1], &len); + if (source == NULL) return 2; + sourcelen = len; + ret = puff(NIL, &destlen, source, &sourcelen); + if (ret) + printf("puff() failed with return code %d\n", ret); + else { + printf("puff() succeeded uncompressing %lu bytes\n", destlen); + if (sourcelen < len) printf("%lu compressed bytes unused\n", + len - sourcelen); + } + free(source); + return ret; +} +#endif diff --git a/compat/zlib/contrib/puff/puff.h b/compat/zlib/contrib/puff/puff.h new file mode 100644 index 0000000..ef61252 --- /dev/null +++ b/compat/zlib/contrib/puff/puff.h @@ -0,0 +1,31 @@ +/* puff.h + Copyright (C) 2002, 2003 Mark Adler, all rights reserved + version 1.7, 3 Mar 2002 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + + +/* + * See puff.c for purpose and usage. + */ +int puff(unsigned char *dest, /* pointer to destination pointer */ + unsigned long *destlen, /* amount of output space */ + unsigned char *source, /* pointer to source data pointer */ + unsigned long *sourcelen); /* amount of input available */ diff --git a/compat/zlib/contrib/puff/zeros.raw b/compat/zlib/contrib/puff/zeros.raw new file mode 100644 index 0000000..637b7be Binary files /dev/null and b/compat/zlib/contrib/puff/zeros.raw differ diff --git a/compat/zlib/contrib/testzlib/testzlib.c b/compat/zlib/contrib/testzlib/testzlib.c new file mode 100644 index 0000000..e5574f4 --- /dev/null +++ b/compat/zlib/contrib/testzlib/testzlib.c @@ -0,0 +1,275 @@ +#include +#include +#include + +#include "zlib.h" + + +void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B) +{ + R->HighPart = A.HighPart - B.HighPart; + if (A.LowPart >= B.LowPart) + R->LowPart = A.LowPart - B.LowPart; + else + { + R->LowPart = A.LowPart - B.LowPart; + R->HighPart --; + } +} + +#ifdef _M_X64 +// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc +unsigned __int64 __rdtsc(void); +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + // printf("rdtsc = %I64x\n",__rdtsc()); + pbeginTime64->QuadPart=__rdtsc(); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres; + unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart)); + LIres.QuadPart=res; + // printf("rdtsc = %I64x\n",__rdtsc()); + return LIres; +} +#else +#ifdef _M_IX86 +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ + DWORD dwEdx,dwEax; + _asm + { + rdtsc + mov dwEax,eax + mov dwEdx,edx + } + pbeginTime64->LowPart=dwEax; + pbeginTime64->HighPart=dwEdx; +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + myGetRDTSC32(pbeginTime64); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres,endTime64; + myGetRDTSC32(&endTime64); + + LIres.LowPart=LIres.HighPart=0; + MyDoMinus64(&LIres,endTime64,beginTime64); + return LIres; +} +#else +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER lr; + lr.QuadPart=0; + return lr; +} +#endif +#endif + +void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf) +{ + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64))) + { + pbeginTime64->LowPart = GetTickCount(); + pbeginTime64->HighPart = 0; + } +} + +DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER endTime64,ticksPerSecond,ticks; + DWORDLONG ticksShifted,tickSecShifted; + DWORD dwLog=16+0; + DWORD dwRet; + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64))) + dwRet = (GetTickCount() - beginTime64.LowPart)*1; + else + { + MyDoMinus64(&ticks,endTime64,beginTime64); + QueryPerformanceFrequency(&ticksPerSecond); + + + { + ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog); + tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog); + + } + + dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted)); + dwRet *=1; + } + return dwRet; +} + +int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr) +{ + FILE* stream; + void* ptr; + int retVal=1; + stream=fopen(filename, "rb"); + if (stream==NULL) + return 0; + + fseek(stream,0,SEEK_END); + + *plFileSize=ftell(stream); + fseek(stream,0,SEEK_SET); + ptr=malloc((*plFileSize)+1); + if (ptr==NULL) + retVal=0; + else + { + if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize)) + retVal=0; + } + fclose(stream); + *pFilePtr=ptr; + return retVal; +} + +int main(int argc, char *argv[]) +{ + int BlockSizeCompress=0x8000; + int BlockSizeUncompress=0x8000; + int cprLevel=Z_DEFAULT_COMPRESSION ; + long lFileSize; + unsigned char* FilePtr; + long lBufferSizeCpr; + long lBufferSizeUncpr; + long lCompressedSize=0; + unsigned char* CprPtr; + unsigned char* UncprPtr; + long lSizeCpr,lSizeUncpr; + DWORD dwGetTick,dwMsecQP; + LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc; + + if (argc<=1) + { + printf("run TestZlib [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n"); + return 0; + } + + if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0) + { + printf("error reading %s\n",argv[1]); + return 1; + } + else printf("file %s read, %u bytes\n",argv[1],lFileSize); + + if (argc>=3) + BlockSizeCompress=atol(argv[2]); + + if (argc>=4) + BlockSizeUncompress=atol(argv[3]); + + if (argc>=5) + cprLevel=(int)atol(argv[4]); + + lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200; + lBufferSizeUncpr = lBufferSizeCpr; + + CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lFileSize; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + deflateInit(&zcpr,cprLevel); + + zcpr.next_in = FilePtr; + zcpr.next_out = CprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeCompress); + zcpr.avail_out = BlockSizeCompress; + ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeCpr=zcpr.total_out; + deflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total compress size = %u, in %u step\n",lSizeCpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr); + UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lSizeCpr; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + inflateInit(&zcpr); + + zcpr.next_in = CprPtr; + zcpr.next_out = UncprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress); + zcpr.avail_out = BlockSizeUncompress; + ret=inflate(&zcpr,Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeUncpr=zcpr.total_out; + inflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + if (lSizeUncpr==lFileSize) + { + if (memcmp(FilePtr,UncprPtr,lFileSize)==0) + printf("compare ok\n"); + + } + + return 0; +} diff --git a/compat/zlib/contrib/testzlib/testzlib.txt b/compat/zlib/contrib/testzlib/testzlib.txt new file mode 100644 index 0000000..62258f1 --- /dev/null +++ b/compat/zlib/contrib/testzlib/testzlib.txt @@ -0,0 +1,10 @@ +To build testzLib with Visual Studio 2005: + +copy to a directory file from : +- root of zLib tree +- contrib/testzlib +- contrib/masmx86 +- contrib/masmx64 +- contrib/vstudio/vc7 + +and open testzlib8.sln \ No newline at end of file diff --git a/compat/zlib/contrib/untgz/Makefile b/compat/zlib/contrib/untgz/Makefile new file mode 100644 index 0000000..b54266f --- /dev/null +++ b/compat/zlib/contrib/untgz/Makefile @@ -0,0 +1,14 @@ +CC=cc +CFLAGS=-g + +untgz: untgz.o ../../libz.a + $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz + +untgz.o: untgz.c ../../zlib.h + $(CC) $(CFLAGS) -c -I../.. untgz.c + +../../libz.a: + cd ../..; ./configure; make + +clean: + rm -f untgz untgz.o *~ diff --git a/compat/zlib/contrib/untgz/Makefile.msc b/compat/zlib/contrib/untgz/Makefile.msc new file mode 100644 index 0000000..77b8602 --- /dev/null +++ b/compat/zlib/contrib/untgz/Makefile.msc @@ -0,0 +1,17 @@ +CC=cl +CFLAGS=-MD + +untgz.exe: untgz.obj ..\..\zlib.lib + $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib + +untgz.obj: untgz.c ..\..\zlib.h + $(CC) $(CFLAGS) -c -I..\.. untgz.c + +..\..\zlib.lib: + cd ..\.. + $(MAKE) -f win32\makefile.msc + cd contrib\untgz + +clean: + -del untgz.obj + -del untgz.exe diff --git a/compat/zlib/contrib/untgz/untgz.c b/compat/zlib/contrib/untgz/untgz.c new file mode 100644 index 0000000..2c391e5 --- /dev/null +++ b/compat/zlib/contrib/untgz/untgz.c @@ -0,0 +1,674 @@ +/* + * untgz.c -- Display contents and extract files from a gzip'd TAR file + * + * written by Pedro A. Aranda Gutierrez + * adaptation to Unix by Jean-loup Gailly + * various fixes by Cosmin Truta + */ + +#include +#include +#include +#include +#include + +#include "zlib.h" + +#ifdef unix +# include +#else +# include +# include +#endif + +#ifdef WIN32 +#include +# ifndef F_OK +# define F_OK 0 +# endif +# define mkdir(dirname,mode) _mkdir(dirname) +# ifdef _MSC_VER +# define access(path,mode) _access(path,mode) +# define chmod(path,mode) _chmod(path,mode) +# define strdup(str) _strdup(str) +# endif +#else +# include +#endif + + +/* values used in typeflag field */ + +#define REGTYPE '0' /* regular file */ +#define AREGTYPE '\0' /* regular file */ +#define LNKTYPE '1' /* link */ +#define SYMTYPE '2' /* reserved */ +#define CHRTYPE '3' /* character special */ +#define BLKTYPE '4' /* block special */ +#define DIRTYPE '5' /* directory */ +#define FIFOTYPE '6' /* FIFO special */ +#define CONTTYPE '7' /* reserved */ + +/* GNU tar extensions */ + +#define GNUTYPE_DUMPDIR 'D' /* file names from dumped directory */ +#define GNUTYPE_LONGLINK 'K' /* long link name */ +#define GNUTYPE_LONGNAME 'L' /* long file name */ +#define GNUTYPE_MULTIVOL 'M' /* continuation of file from another volume */ +#define GNUTYPE_NAMES 'N' /* file name that does not fit into main hdr */ +#define GNUTYPE_SPARSE 'S' /* sparse file */ +#define GNUTYPE_VOLHDR 'V' /* tape/volume header */ + + +/* tar header */ + +#define BLOCKSIZE 512 +#define SHORTNAMESIZE 100 + +struct tar_header +{ /* byte offset */ + char name[100]; /* 0 */ + char mode[8]; /* 100 */ + char uid[8]; /* 108 */ + char gid[8]; /* 116 */ + char size[12]; /* 124 */ + char mtime[12]; /* 136 */ + char chksum[8]; /* 148 */ + char typeflag; /* 156 */ + char linkname[100]; /* 157 */ + char magic[6]; /* 257 */ + char version[2]; /* 263 */ + char uname[32]; /* 265 */ + char gname[32]; /* 297 */ + char devmajor[8]; /* 329 */ + char devminor[8]; /* 337 */ + char prefix[155]; /* 345 */ + /* 500 */ +}; + +union tar_buffer +{ + char buffer[BLOCKSIZE]; + struct tar_header header; +}; + +struct attr_item +{ + struct attr_item *next; + char *fname; + int mode; + time_t time; +}; + +enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID }; + +char *TGZfname OF((const char *)); +void TGZnotfound OF((const char *)); + +int getoct OF((char *, int)); +char *strtime OF((time_t *)); +int setfiletime OF((char *, time_t)); +void push_attr OF((struct attr_item **, char *, int, time_t)); +void restore_attr OF((struct attr_item **)); + +int ExprMatch OF((char *, char *)); + +int makedir OF((char *)); +int matchname OF((int, int, char **, char *)); + +void error OF((const char *)); +int tar OF((gzFile, int, int, int, char **)); + +void help OF((int)); +int main OF((int, char **)); + +char *prog; + +const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL }; + +/* return the file name of the TGZ archive */ +/* or NULL if it does not exist */ + +char *TGZfname (const char *arcname) +{ + static char buffer[1024]; + int origlen,i; + + strcpy(buffer,arcname); + origlen = strlen(buffer); + + for (i=0; TGZsuffix[i]; i++) + { + strcpy(buffer+origlen,TGZsuffix[i]); + if (access(buffer,F_OK) == 0) + return buffer; + } + return NULL; +} + + +/* error message for the filename */ + +void TGZnotfound (const char *arcname) +{ + int i; + + fprintf(stderr,"%s: Couldn't find ",prog); + for (i=0;TGZsuffix[i];i++) + fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n", + arcname, + TGZsuffix[i]); + exit(1); +} + + +/* convert octal digits to int */ +/* on error return -1 */ + +int getoct (char *p,int width) +{ + int result = 0; + char c; + + while (width--) + { + c = *p++; + if (c == 0) + break; + if (c == ' ') + continue; + if (c < '0' || c > '7') + return -1; + result = result * 8 + (c - '0'); + } + return result; +} + + +/* convert time_t to string */ +/* use the "YYYY/MM/DD hh:mm:ss" format */ + +char *strtime (time_t *t) +{ + struct tm *local; + static char result[32]; + + local = localtime(t); + sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d", + local->tm_year+1900, local->tm_mon+1, local->tm_mday, + local->tm_hour, local->tm_min, local->tm_sec); + return result; +} + + +/* set file time */ + +int setfiletime (char *fname,time_t ftime) +{ +#ifdef WIN32 + static int isWinNT = -1; + SYSTEMTIME st; + FILETIME locft, modft; + struct tm *loctm; + HANDLE hFile; + int result; + + loctm = localtime(&ftime); + if (loctm == NULL) + return -1; + + st.wYear = (WORD)loctm->tm_year + 1900; + st.wMonth = (WORD)loctm->tm_mon + 1; + st.wDayOfWeek = (WORD)loctm->tm_wday; + st.wDay = (WORD)loctm->tm_mday; + st.wHour = (WORD)loctm->tm_hour; + st.wMinute = (WORD)loctm->tm_min; + st.wSecond = (WORD)loctm->tm_sec; + st.wMilliseconds = 0; + if (!SystemTimeToFileTime(&st, &locft) || + !LocalFileTimeToFileTime(&locft, &modft)) + return -1; + + if (isWinNT < 0) + isWinNT = (GetVersion() < 0x80000000) ? 1 : 0; + hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, + (isWinNT ? FILE_FLAG_BACKUP_SEMANTICS : 0), + NULL); + if (hFile == INVALID_HANDLE_VALUE) + return -1; + result = SetFileTime(hFile, NULL, NULL, &modft) ? 0 : -1; + CloseHandle(hFile); + return result; +#else + struct utimbuf settime; + + settime.actime = settime.modtime = ftime; + return utime(fname,&settime); +#endif +} + + +/* push file attributes */ + +void push_attr(struct attr_item **list,char *fname,int mode,time_t time) +{ + struct attr_item *item; + + item = (struct attr_item *)malloc(sizeof(struct attr_item)); + if (item == NULL) + error("Out of memory"); + item->fname = strdup(fname); + item->mode = mode; + item->time = time; + item->next = *list; + *list = item; +} + + +/* restore file attributes */ + +void restore_attr(struct attr_item **list) +{ + struct attr_item *item, *prev; + + for (item = *list; item != NULL; ) + { + setfiletime(item->fname,item->time); + chmod(item->fname,item->mode); + prev = item; + item = item->next; + free(prev); + } + *list = NULL; +} + + +/* match regular expression */ + +#define ISSPECIAL(c) (((c) == '*') || ((c) == '/')) + +int ExprMatch (char *string,char *expr) +{ + while (1) + { + if (ISSPECIAL(*expr)) + { + if (*expr == '/') + { + if (*string != '\\' && *string != '/') + return 0; + string ++; expr++; + } + else if (*expr == '*') + { + if (*expr ++ == 0) + return 1; + while (*++string != *expr) + if (*string == 0) + return 0; + } + } + else + { + if (*string != *expr) + return 0; + if (*expr++ == 0) + return 1; + string++; + } + } +} + + +/* recursive mkdir */ +/* abort on ENOENT; ignore other errors like "directory already exists" */ +/* return 1 if OK */ +/* 0 on error */ + +int makedir (char *newdir) +{ + char *buffer = strdup(newdir); + char *p; + int len = strlen(buffer); + + if (len <= 0) { + free(buffer); + return 0; + } + if (buffer[len-1] == '/') { + buffer[len-1] = '\0'; + } + if (mkdir(buffer, 0755) == 0) + { + free(buffer); + return 1; + } + + p = buffer+1; + while (1) + { + char hold; + + while(*p && *p != '\\' && *p != '/') + p++; + hold = *p; + *p = 0; + if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT)) + { + fprintf(stderr,"%s: Couldn't create directory %s\n",prog,buffer); + free(buffer); + return 0; + } + if (hold == 0) + break; + *p++ = hold; + } + free(buffer); + return 1; +} + + +int matchname (int arg,int argc,char **argv,char *fname) +{ + if (arg == argc) /* no arguments given (untgz tgzarchive) */ + return 1; + + while (arg < argc) + if (ExprMatch(fname,argv[arg++])) + return 1; + + return 0; /* ignore this for the moment being */ +} + + +/* tar file list or extract */ + +int tar (gzFile in,int action,int arg,int argc,char **argv) +{ + union tar_buffer buffer; + int len; + int err; + int getheader = 1; + int remaining = 0; + FILE *outfile = NULL; + char fname[BLOCKSIZE]; + int tarmode; + time_t tartime; + struct attr_item *attributes = NULL; + + if (action == TGZ_LIST) + printf(" date time size file\n" + " ---------- -------- --------- -------------------------------------\n"); + while (1) + { + len = gzread(in, &buffer, BLOCKSIZE); + if (len < 0) + error(gzerror(in, &err)); + /* + * Always expect complete blocks to process + * the tar information. + */ + if (len != BLOCKSIZE) + { + action = TGZ_INVALID; /* force error exit */ + remaining = 0; /* force I/O cleanup */ + } + + /* + * If we have to get a tar header + */ + if (getheader >= 1) + { + /* + * if we met the end of the tar + * or the end-of-tar block, + * we are done + */ + if (len == 0 || buffer.header.name[0] == 0) + break; + + tarmode = getoct(buffer.header.mode,8); + tartime = (time_t)getoct(buffer.header.mtime,12); + if (tarmode == -1 || tartime == (time_t)-1) + { + buffer.header.name[0] = 0; + action = TGZ_INVALID; + } + + if (getheader == 1) + { + strncpy(fname,buffer.header.name,SHORTNAMESIZE); + if (fname[SHORTNAMESIZE-1] != 0) + fname[SHORTNAMESIZE] = 0; + } + else + { + /* + * The file name is longer than SHORTNAMESIZE + */ + if (strncmp(fname,buffer.header.name,SHORTNAMESIZE-1) != 0) + error("bad long name"); + getheader = 1; + } + + /* + * Act according to the type flag + */ + switch (buffer.header.typeflag) + { + case DIRTYPE: + if (action == TGZ_LIST) + printf(" %s %s\n",strtime(&tartime),fname); + if (action == TGZ_EXTRACT) + { + makedir(fname); + push_attr(&attributes,fname,tarmode,tartime); + } + break; + case REGTYPE: + case AREGTYPE: + remaining = getoct(buffer.header.size,12); + if (remaining == -1) + { + action = TGZ_INVALID; + break; + } + if (action == TGZ_LIST) + printf(" %s %9d %s\n",strtime(&tartime),remaining,fname); + else if (action == TGZ_EXTRACT) + { + if (matchname(arg,argc,argv,fname)) + { + outfile = fopen(fname,"wb"); + if (outfile == NULL) { + /* try creating directory */ + char *p = strrchr(fname, '/'); + if (p != NULL) { + *p = '\0'; + makedir(fname); + *p = '/'; + outfile = fopen(fname,"wb"); + } + } + if (outfile != NULL) + printf("Extracting %s\n",fname); + else + fprintf(stderr, "%s: Couldn't create %s",prog,fname); + } + else + outfile = NULL; + } + getheader = 0; + break; + case GNUTYPE_LONGLINK: + case GNUTYPE_LONGNAME: + remaining = getoct(buffer.header.size,12); + if (remaining < 0 || remaining >= BLOCKSIZE) + { + action = TGZ_INVALID; + break; + } + len = gzread(in, fname, BLOCKSIZE); + if (len < 0) + error(gzerror(in, &err)); + if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining) + { + action = TGZ_INVALID; + break; + } + getheader = 2; + break; + default: + if (action == TGZ_LIST) + printf(" %s <---> %s\n",strtime(&tartime),fname); + break; + } + } + else + { + unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining; + + if (outfile != NULL) + { + if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes) + { + fprintf(stderr, + "%s: Error writing %s -- skipping\n",prog,fname); + fclose(outfile); + outfile = NULL; + remove(fname); + } + } + remaining -= bytes; + } + + if (remaining == 0) + { + getheader = 1; + if (outfile != NULL) + { + fclose(outfile); + outfile = NULL; + if (action != TGZ_INVALID) + push_attr(&attributes,fname,tarmode,tartime); + } + } + + /* + * Abandon if errors are found + */ + if (action == TGZ_INVALID) + { + error("broken archive"); + break; + } + } + + /* + * Restore file modes and time stamps + */ + restore_attr(&attributes); + + if (gzclose(in) != Z_OK) + error("failed gzclose"); + + return 0; +} + + +/* ============================================================ */ + +void help(int exitval) +{ + printf("untgz version 0.2.1\n" + " using zlib version %s\n\n", + zlibVersion()); + printf("Usage: untgz file.tgz extract all files\n" + " untgz file.tgz fname ... extract selected files\n" + " untgz -l file.tgz list archive contents\n" + " untgz -h display this help\n"); + exit(exitval); +} + +void error(const char *msg) +{ + fprintf(stderr, "%s: %s\n", prog, msg); + exit(1); +} + + +/* ============================================================ */ + +#if defined(WIN32) && defined(__GNUC__) +int _CRT_glob = 0; /* disable argument globbing in MinGW */ +#endif + +int main(int argc,char **argv) +{ + int action = TGZ_EXTRACT; + int arg = 1; + char *TGZfile; + gzFile *f; + + prog = strrchr(argv[0],'\\'); + if (prog == NULL) + { + prog = strrchr(argv[0],'/'); + if (prog == NULL) + { + prog = strrchr(argv[0],':'); + if (prog == NULL) + prog = argv[0]; + else + prog++; + } + else + prog++; + } + else + prog++; + + if (argc == 1) + help(0); + + if (strcmp(argv[arg],"-l") == 0) + { + action = TGZ_LIST; + if (argc == ++arg) + help(0); + } + else if (strcmp(argv[arg],"-h") == 0) + { + help(0); + } + + if ((TGZfile = TGZfname(argv[arg])) == NULL) + TGZnotfound(argv[arg]); + + ++arg; + if ((action == TGZ_LIST) && (arg != argc)) + help(1); + +/* + * Process the TGZ file + */ + switch(action) + { + case TGZ_LIST: + case TGZ_EXTRACT: + f = gzopen(TGZfile,"rb"); + if (f == NULL) + { + fprintf(stderr,"%s: Couldn't gzopen %s\n",prog,TGZfile); + return 1; + } + exit(tar(f, action, arg, argc, argv)); + break; + + default: + error("Unknown option"); + exit(1); + } + + return 0; +} diff --git a/compat/zlib/contrib/vstudio/readme.txt b/compat/zlib/contrib/vstudio/readme.txt new file mode 100644 index 0000000..16159f9 --- /dev/null +++ b/compat/zlib/contrib/vstudio/readme.txt @@ -0,0 +1,73 @@ +Building instructions for the DLL versions of Zlib 1.2.3 +======================================================== + +This directory contains projects that build zlib and minizip using +Microsoft Visual C++ 7.0/7.1, and Visual C++ . + +You don't need to build these projects yourself. You can download the +binaries from: + http://www.winimage.com/zLibDll + +More information can be found at this site. + + +Build instructions for Visual Studio 7.x (32 bits) +-------------------------------------------------- +- Uncompress current zlib, including all contrib/* files +- Download the crtdll library from + http://www.winimage.com/zLibDll/crtdll.zip + Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc7. +- Open contrib\vstudio\vc7\zlibvc.sln with Microsoft Visual C++ 7.x + (Visual Studio .Net 2002 or 2003). + +Build instructions for Visual Studio 2005 (32 bits or 64 bits) +-------------------------------------------------------------- +- Uncompress current zlib, including all contrib/* files +- For 32 bits only: download the crtdll library from + http://www.winimage.com/zLibDll/crtdll.zip + Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc8. +- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0 + +Build instructions for Visual Studio 2005 64 bits, PSDK compiler +---------------------------------------------------------------- +at the time of writing this text file, Visual Studio 2005 (and + Microsoft Visual C++ 8.0) is on the beta 2 stage. +Using you can get the free 64 bits compiler from Platform SDK, + which is NOT a beta, and compile using the Visual studio 2005 IDE +see http://www.winimage.com/misc/sdk64onvs2005/ for instruction + +- Uncompress current zlib, including all contrib/* files +- start Visual Studio 2005 from a platform SDK command prompt, using + the /useenv switch +- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0 + + +Important +--------- +- To use zlibwapi.dll in your application, you must define the + macro ZLIB_WINAPI when compiling your application's source files. + + +Additional notes +---------------- +- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built + by Gilles Vollant from the zlib 1.1.x sources, and distributed at + http://www.winimage.com/zLibDll + It uses the WINAPI calling convention for the exported functions, and + includes the minizip functionality. If your application needs that + particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. + +- The new DLL was renamed because there exist several incompatible + versions of zlib.dll on the Internet. + +- There is also an official DLL build of zlib, named zlib1.dll. This one + is exporting the functions using the CDECL convention. See the file + win32\DLL_FAQ.txt found in this zlib distribution. + +- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol + has a slightly different effect. To avoid compatibility problems, do + not define it here. + + +Gilles Vollant +info@winimage.com diff --git a/compat/zlib/contrib/vstudio/vc7/miniunz.vcproj b/compat/zlib/contrib/vstudio/vc7/miniunz.vcproj new file mode 100644 index 0000000..ad5117c --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/miniunz.vcproj @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc7/minizip.vcproj b/compat/zlib/contrib/vstudio/vc7/minizip.vcproj new file mode 100644 index 0000000..fb5b632 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/minizip.vcproj @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc7/testzlib.vcproj b/compat/zlib/contrib/vstudio/vc7/testzlib.vcproj new file mode 100644 index 0000000..97bc3e8 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/testzlib.vcproj @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc7/zlib.rc b/compat/zlib/contrib/vstudio/vc7/zlib.rc new file mode 100644 index 0000000..72cb8b4 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1,2,3,0 + PRODUCTVERSION 1,2,3,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression library\0" + VALUE "FileVersion", "1.2.3.0\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlib.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/compat/zlib/contrib/vstudio/vc7/zlibstat.vcproj b/compat/zlib/contrib/vstudio/vc7/zlibstat.vcproj new file mode 100644 index 0000000..766d7a4 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/zlibstat.vcproj @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc7/zlibvc.def b/compat/zlib/contrib/vstudio/vc7/zlibvc.def new file mode 100644 index 0000000..a40e715 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/zlibvc.def @@ -0,0 +1,92 @@ + +VERSION 1.23 + +HEAPSIZE 1048576,8192 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 diff --git a/compat/zlib/contrib/vstudio/vc7/zlibvc.sln b/compat/zlib/contrib/vstudio/vc7/zlibvc.sln new file mode 100644 index 0000000..927b42b --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/zlibvc.sln @@ -0,0 +1,78 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testZlibDll", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + ConfigName.2 = ReleaseAxp + ConfigName.3 = ReleaseWithoutAsm + ConfigName.4 = ReleaseWithoutCrtdll + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.Build.0 = ReleaseAxp|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseAxp|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.Build.0 = ReleaseAxp|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.Build.0 = ReleaseAxp|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseWithoutCrtdll|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.Build.0 = ReleaseWithoutCrtdll|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc7/zlibvc.vcproj b/compat/zlib/contrib/vstudio/vc7/zlibvc.vcproj new file mode 100644 index 0000000..8533b49 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc7/zlibvc.vcproj @@ -0,0 +1,445 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc8/miniunz.vcproj b/compat/zlib/contrib/vstudio/vc8/miniunz.vcproj new file mode 100644 index 0000000..4af53e8 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/miniunz.vcproj @@ -0,0 +1,566 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc8/minizip.vcproj b/compat/zlib/contrib/vstudio/vc8/minizip.vcproj new file mode 100644 index 0000000..85f64c4 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/minizip.vcproj @@ -0,0 +1,563 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc8/testzlib.vcproj b/compat/zlib/contrib/vstudio/vc8/testzlib.vcproj new file mode 100644 index 0000000..68c3539 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/testzlib.vcproj @@ -0,0 +1,948 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc8/testzlibdll.vcproj b/compat/zlib/contrib/vstudio/vc8/testzlibdll.vcproj new file mode 100644 index 0000000..f38ab5e --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/testzlibdll.vcproj @@ -0,0 +1,567 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc8/zlib.rc b/compat/zlib/contrib/vstudio/vc8/zlib.rc new file mode 100644 index 0000000..72cb8b4 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1,2,3,0 + PRODUCTVERSION 1,2,3,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression library\0" + VALUE "FileVersion", "1.2.3.0\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlib.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/compat/zlib/contrib/vstudio/vc8/zlibstat.vcproj b/compat/zlib/contrib/vstudio/vc8/zlibstat.vcproj new file mode 100644 index 0000000..fb97037 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/zlibstat.vcproj @@ -0,0 +1,870 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc8/zlibvc.def b/compat/zlib/contrib/vstudio/vc8/zlibvc.def new file mode 100644 index 0000000..a40e715 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/zlibvc.def @@ -0,0 +1,92 @@ + +VERSION 1.23 + +HEAPSIZE 1048576,8192 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 diff --git a/compat/zlib/contrib/vstudio/vc8/zlibvc.sln b/compat/zlib/contrib/vstudio/vc8/zlibvc.sln new file mode 100644 index 0000000..a815a55 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/zlibvc.sln @@ -0,0 +1,144 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc8/zlibvc.vcproj b/compat/zlib/contrib/vstudio/vc8/zlibvc.vcproj new file mode 100644 index 0000000..e717011 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc8/zlibvc.vcproj @@ -0,0 +1,1219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/example.c b/compat/zlib/example.c new file mode 100644 index 0000000..56ad08c --- /dev/null +++ b/compat/zlib/example.c @@ -0,0 +1,565 @@ +/* example.c -- usage example of the zlib compression library + * Copyright (C) 1995-2004 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: example.c,v 1.1 2008/12/19 14:44:48 dkf Exp $ */ + +#include +#include "zlib.h" + +#ifdef STDC +# include +# include +#endif + +#if defined(VMS) || defined(RISCOS) +# define TESTFILE "foo-gz" +#else +# define TESTFILE "foo.gz" +#endif + +#define CHECK_ERR(err, msg) { \ + if (err != Z_OK) { \ + fprintf(stderr, "%s error: %d\n", msg, err); \ + exit(1); \ + } \ +} + +const char hello[] = "hello, hello!"; +/* "hello world" would be more standard, but the repeated "hello" + * stresses the compression code better, sorry... + */ + +const char dictionary[] = "hello"; +uLong dictId; /* Adler32 value of the dictionary */ + +void test_compress OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_gzio OF((const char *fname, + Byte *uncompr, uLong uncomprLen)); +void test_deflate OF((Byte *compr, uLong comprLen)); +void test_inflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_large_deflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_large_inflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_flush OF((Byte *compr, uLong *comprLen)); +void test_sync OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +void test_dict_deflate OF((Byte *compr, uLong comprLen)); +void test_dict_inflate OF((Byte *compr, uLong comprLen, + Byte *uncompr, uLong uncomprLen)); +int main OF((int argc, char *argv[])); + +/* =========================================================================== + * Test compress() and uncompress() + */ +void test_compress(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + uLong len = (uLong)strlen(hello)+1; + + err = compress(compr, &comprLen, (const Bytef*)hello, len); + CHECK_ERR(err, "compress"); + + strcpy((char*)uncompr, "garbage"); + + err = uncompress(uncompr, &uncomprLen, compr, comprLen); + CHECK_ERR(err, "uncompress"); + + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad uncompress\n"); + exit(1); + } else { + printf("uncompress(): %s\n", (char *)uncompr); + } +} + +/* =========================================================================== + * Test read/write of .gz files + */ +void test_gzio(fname, uncompr, uncomprLen) + const char *fname; /* compressed file name */ + Byte *uncompr; + uLong uncomprLen; +{ +#ifdef NO_GZCOMPRESS + fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); +#else + int err; + int len = (int)strlen(hello)+1; + gzFile file; + z_off_t pos; + + file = gzopen(fname, "wb"); + if (file == NULL) { + fprintf(stderr, "gzopen error\n"); + exit(1); + } + gzputc(file, 'h'); + if (gzputs(file, "ello") != 4) { + fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); + exit(1); + } + if (gzprintf(file, ", %s!", "hello") != 8) { + fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); + exit(1); + } + gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ + gzclose(file); + + file = gzopen(fname, "rb"); + if (file == NULL) { + fprintf(stderr, "gzopen error\n"); + exit(1); + } + strcpy((char*)uncompr, "garbage"); + + if (gzread(file, uncompr, (unsigned)uncomprLen) != len) { + fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); + exit(1); + } + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); + exit(1); + } else { + printf("gzread(): %s\n", (char*)uncompr); + } + + pos = gzseek(file, -8L, SEEK_CUR); + if (pos != 6 || gztell(file) != pos) { + fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n", + (long)pos, (long)gztell(file)); + exit(1); + } + + if (gzgetc(file) != ' ') { + fprintf(stderr, "gzgetc error\n"); + exit(1); + } + + if (gzungetc(' ', file) != ' ') { + fprintf(stderr, "gzungetc error\n"); + exit(1); + } + + gzgets(file, (char*)uncompr, (int)uncomprLen); + if (strlen((char*)uncompr) != 7) { /* " hello!" */ + fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); + exit(1); + } + if (strcmp((char*)uncompr, hello + 6)) { + fprintf(stderr, "bad gzgets after gzseek\n"); + exit(1); + } else { + printf("gzgets() after gzseek: %s\n", (char*)uncompr); + } + + gzclose(file); +#endif +} + +/* =========================================================================== + * Test deflate() with small buffers + */ +void test_deflate(compr, comprLen) + Byte *compr; + uLong comprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + uLong len = (uLong)strlen(hello)+1; + + c_stream.zalloc = (alloc_func)0; + c_stream.zfree = (free_func)0; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, "deflateInit"); + + c_stream.next_in = (Bytef*)hello; + c_stream.next_out = compr; + + while (c_stream.total_in != len && c_stream.total_out < comprLen) { + c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */ + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + } + /* Finish the stream, still forcing small buffers: */ + for (;;) { + c_stream.avail_out = 1; + err = deflate(&c_stream, Z_FINISH); + if (err == Z_STREAM_END) break; + CHECK_ERR(err, "deflate"); + } + + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); +} + +/* =========================================================================== + * Test inflate() with small buffers + */ +void test_inflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = (alloc_func)0; + d_stream.zfree = (free_func)0; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = 0; + d_stream.next_out = uncompr; + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) { + d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */ + err = inflate(&d_stream, Z_NO_FLUSH); + if (err == Z_STREAM_END) break; + CHECK_ERR(err, "inflate"); + } + + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad inflate\n"); + exit(1); + } else { + printf("inflate(): %s\n", (char *)uncompr); + } +} + +/* =========================================================================== + * Test deflate() with large buffers and dynamic change of compression level + */ +void test_large_deflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + + c_stream.zalloc = (alloc_func)0; + c_stream.zfree = (free_func)0; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_BEST_SPEED); + CHECK_ERR(err, "deflateInit"); + + c_stream.next_out = compr; + c_stream.avail_out = (uInt)comprLen; + + /* At this point, uncompr is still mostly zeroes, so it should compress + * very well: + */ + c_stream.next_in = uncompr; + c_stream.avail_in = (uInt)uncomprLen; + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + if (c_stream.avail_in != 0) { + fprintf(stderr, "deflate not greedy\n"); + exit(1); + } + + /* Feed in already compressed data and switch to no compression: */ + deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); + c_stream.next_in = compr; + c_stream.avail_in = (uInt)comprLen/2; + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + + /* Switch back to compressing mode: */ + deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED); + c_stream.next_in = uncompr; + c_stream.avail_in = (uInt)uncomprLen; + err = deflate(&c_stream, Z_NO_FLUSH); + CHECK_ERR(err, "deflate"); + + err = deflate(&c_stream, Z_FINISH); + if (err != Z_STREAM_END) { + fprintf(stderr, "deflate should report Z_STREAM_END\n"); + exit(1); + } + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); +} + +/* =========================================================================== + * Test inflate() with large buffers + */ +void test_large_inflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = (alloc_func)0; + d_stream.zfree = (free_func)0; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = (uInt)comprLen; + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + for (;;) { + d_stream.next_out = uncompr; /* discard the output */ + d_stream.avail_out = (uInt)uncomprLen; + err = inflate(&d_stream, Z_NO_FLUSH); + if (err == Z_STREAM_END) break; + CHECK_ERR(err, "large inflate"); + } + + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + if (d_stream.total_out != 2*uncomprLen + comprLen/2) { + fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out); + exit(1); + } else { + printf("large_inflate(): OK\n"); + } +} + +/* =========================================================================== + * Test deflate() with full flush + */ +void test_flush(compr, comprLen) + Byte *compr; + uLong *comprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + uInt len = (uInt)strlen(hello)+1; + + c_stream.zalloc = (alloc_func)0; + c_stream.zfree = (free_func)0; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); + CHECK_ERR(err, "deflateInit"); + + c_stream.next_in = (Bytef*)hello; + c_stream.next_out = compr; + c_stream.avail_in = 3; + c_stream.avail_out = (uInt)*comprLen; + err = deflate(&c_stream, Z_FULL_FLUSH); + CHECK_ERR(err, "deflate"); + + compr[3]++; /* force an error in first compressed block */ + c_stream.avail_in = len - 3; + + err = deflate(&c_stream, Z_FINISH); + if (err != Z_STREAM_END) { + CHECK_ERR(err, "deflate"); + } + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); + + *comprLen = c_stream.total_out; +} + +/* =========================================================================== + * Test inflateSync() + */ +void test_sync(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = (alloc_func)0; + d_stream.zfree = (free_func)0; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = 2; /* just read the zlib header */ + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + d_stream.next_out = uncompr; + d_stream.avail_out = (uInt)uncomprLen; + + inflate(&d_stream, Z_NO_FLUSH); + CHECK_ERR(err, "inflate"); + + d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */ + err = inflateSync(&d_stream); /* but skip the damaged part */ + CHECK_ERR(err, "inflateSync"); + + err = inflate(&d_stream, Z_FINISH); + if (err != Z_DATA_ERROR) { + fprintf(stderr, "inflate should report DATA_ERROR\n"); + /* Because of incorrect adler32 */ + exit(1); + } + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + printf("after inflateSync(): hel%s\n", (char *)uncompr); +} + +/* =========================================================================== + * Test deflate() with preset dictionary + */ +void test_dict_deflate(compr, comprLen) + Byte *compr; + uLong comprLen; +{ + z_stream c_stream; /* compression stream */ + int err; + + c_stream.zalloc = (alloc_func)0; + c_stream.zfree = (free_func)0; + c_stream.opaque = (voidpf)0; + + err = deflateInit(&c_stream, Z_BEST_COMPRESSION); + CHECK_ERR(err, "deflateInit"); + + err = deflateSetDictionary(&c_stream, + (const Bytef*)dictionary, sizeof(dictionary)); + CHECK_ERR(err, "deflateSetDictionary"); + + dictId = c_stream.adler; + c_stream.next_out = compr; + c_stream.avail_out = (uInt)comprLen; + + c_stream.next_in = (Bytef*)hello; + c_stream.avail_in = (uInt)strlen(hello)+1; + + err = deflate(&c_stream, Z_FINISH); + if (err != Z_STREAM_END) { + fprintf(stderr, "deflate should report Z_STREAM_END\n"); + exit(1); + } + err = deflateEnd(&c_stream); + CHECK_ERR(err, "deflateEnd"); +} + +/* =========================================================================== + * Test inflate() with a preset dictionary + */ +void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) + Byte *compr, *uncompr; + uLong comprLen, uncomprLen; +{ + int err; + z_stream d_stream; /* decompression stream */ + + strcpy((char*)uncompr, "garbage"); + + d_stream.zalloc = (alloc_func)0; + d_stream.zfree = (free_func)0; + d_stream.opaque = (voidpf)0; + + d_stream.next_in = compr; + d_stream.avail_in = (uInt)comprLen; + + err = inflateInit(&d_stream); + CHECK_ERR(err, "inflateInit"); + + d_stream.next_out = uncompr; + d_stream.avail_out = (uInt)uncomprLen; + + for (;;) { + err = inflate(&d_stream, Z_NO_FLUSH); + if (err == Z_STREAM_END) break; + if (err == Z_NEED_DICT) { + if (d_stream.adler != dictId) { + fprintf(stderr, "unexpected dictionary"); + exit(1); + } + err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, + sizeof(dictionary)); + } + CHECK_ERR(err, "inflate with dict"); + } + + err = inflateEnd(&d_stream); + CHECK_ERR(err, "inflateEnd"); + + if (strcmp((char*)uncompr, hello)) { + fprintf(stderr, "bad inflate with dict\n"); + exit(1); + } else { + printf("inflate with dictionary: %s\n", (char *)uncompr); + } +} + +/* =========================================================================== + * Usage: example [output.gz [input.gz]] + */ + +int main(argc, argv) + int argc; + char *argv[]; +{ + Byte *compr, *uncompr; + uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */ + uLong uncomprLen = comprLen; + static const char* myVersion = ZLIB_VERSION; + + if (zlibVersion()[0] != myVersion[0]) { + fprintf(stderr, "incompatible zlib version\n"); + exit(1); + + } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) { + fprintf(stderr, "warning: different zlib version\n"); + } + + printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", + ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); + + compr = (Byte*)calloc((uInt)comprLen, 1); + uncompr = (Byte*)calloc((uInt)uncomprLen, 1); + /* compr and uncompr are cleared to avoid reading uninitialized + * data and to ensure that uncompr compresses well. + */ + if (compr == Z_NULL || uncompr == Z_NULL) { + printf("out of memory\n"); + exit(1); + } + test_compress(compr, comprLen, uncompr, uncomprLen); + + test_gzio((argc > 1 ? argv[1] : TESTFILE), + uncompr, uncomprLen); + + test_deflate(compr, comprLen); + test_inflate(compr, comprLen, uncompr, uncomprLen); + + test_large_deflate(compr, comprLen, uncompr, uncomprLen); + test_large_inflate(compr, comprLen, uncompr, uncomprLen); + + test_flush(compr, &comprLen); + test_sync(compr, comprLen, uncompr, uncomprLen); + comprLen = uncomprLen; + + test_dict_deflate(compr, comprLen); + test_dict_inflate(compr, comprLen, uncompr, uncomprLen); + + free(compr); + free(uncompr); + + return 0; +} diff --git a/compat/zlib/examples/README.examples b/compat/zlib/examples/README.examples new file mode 100644 index 0000000..5632d7a --- /dev/null +++ b/compat/zlib/examples/README.examples @@ -0,0 +1,42 @@ +This directory contains examples of the use of zlib. + +fitblk.c + compress just enough input to nearly fill a requested output size + - zlib isn't designed to do this, but fitblk does it anyway + +gun.c + uncompress a gzip file + - illustrates the use of inflateBack() for high speed file-to-file + decompression using call-back functions + - is approximately twice as fast as gzip -d + - also provides Unix uncompress functionality, again twice as fast + +gzappend.c + append to a gzip file + - illustrates the use of the Z_BLOCK flush parameter for inflate() + - illustrates the use of deflatePrime() to start at any bit + +gzjoin.c + join gzip files without recalculating the crc or recompressing + - illustrates the use of the Z_BLOCK flush parameter for inflate() + - illustrates the use of crc32_combine() + +gzlog.c +gzlog.h + efficiently maintain a message log file in gzip format + - illustrates use of raw deflate and Z_SYNC_FLUSH + - illustrates use of gzip header extra field + +zlib_how.html + painfully comprehensive description of zpipe.c (see below) + - describes in excruciating detail the use of deflate() and inflate() + +zpipe.c + reads and writes zlib streams from stdin to stdout + - illustrates the proper use of deflate() and inflate() + - deeply commented in zlib_how.html (see above) + +zran.c + index a zlib or gzip stream and randomly access it + - illustrates the use of Z_BLOCK, inflatePrime(), and + inflateSetDictionary() to provide random access diff --git a/compat/zlib/examples/fitblk.c b/compat/zlib/examples/fitblk.c new file mode 100644 index 0000000..c61de5c --- /dev/null +++ b/compat/zlib/examples/fitblk.c @@ -0,0 +1,233 @@ +/* fitblk.c: example of fitting compressed output to a specified size + Not copyrighted -- provided to the public domain + Version 1.1 25 November 2004 Mark Adler */ + +/* Version history: + 1.0 24 Nov 2004 First version + 1.1 25 Nov 2004 Change deflateInit2() to deflateInit() + Use fixed-size, stack-allocated raw buffers + Simplify code moving compression to subroutines + Use assert() for internal errors + Add detailed description of approach + */ + +/* Approach to just fitting a requested compressed size: + + fitblk performs three compression passes on a portion of the input + data in order to determine how much of that input will compress to + nearly the requested output block size. The first pass generates + enough deflate blocks to produce output to fill the requested + output size plus a specfied excess amount (see the EXCESS define + below). The last deflate block may go quite a bit past that, but + is discarded. The second pass decompresses and recompresses just + the compressed data that fit in the requested plus excess sized + buffer. The deflate process is terminated after that amount of + input, which is less than the amount consumed on the first pass. + The last deflate block of the result will be of a comparable size + to the final product, so that the header for that deflate block and + the compression ratio for that block will be about the same as in + the final product. The third compression pass decompresses the + result of the second step, but only the compressed data up to the + requested size minus an amount to allow the compressed stream to + complete (see the MARGIN define below). That will result in a + final compressed stream whose length is less than or equal to the + requested size. Assuming sufficient input and a requested size + greater than a few hundred bytes, the shortfall will typically be + less than ten bytes. + + If the input is short enough that the first compression completes + before filling the requested output size, then that compressed + stream is return with no recompression. + + EXCESS is chosen to be just greater than the shortfall seen in a + two pass approach similar to the above. That shortfall is due to + the last deflate block compressing more efficiently with a smaller + header on the second pass. EXCESS is set to be large enough so + that there is enough uncompressed data for the second pass to fill + out the requested size, and small enough so that the final deflate + block of the second pass will be close in size to the final deflate + block of the third and final pass. MARGIN is chosen to be just + large enough to assure that the final compression has enough room + to complete in all cases. + */ + +#include +#include +#include +#include "zlib.h" + +#define local static + +/* print nastygram and leave */ +local void quit(char *why) +{ + fprintf(stderr, "fitblk abort: %s\n", why); + exit(1); +} + +#define RAWLEN 4096 /* intermediate uncompressed buffer size */ + +/* compress from file to def until provided buffer is full or end of + input reached; return last deflate() return value, or Z_ERRNO if + there was read error on the file */ +local int partcompress(FILE *in, z_streamp def) +{ + int ret, flush; + unsigned char raw[RAWLEN]; + + flush = Z_NO_FLUSH; + do { + def->avail_in = fread(raw, 1, RAWLEN, in); + if (ferror(in)) + return Z_ERRNO; + def->next_in = raw; + if (feof(in)) + flush = Z_FINISH; + ret = deflate(def, flush); + assert(ret != Z_STREAM_ERROR); + } while (def->avail_out != 0 && flush == Z_NO_FLUSH); + return ret; +} + +/* recompress from inf's input to def's output; the input for inf and + the output for def are set in those structures before calling; + return last deflate() return value, or Z_MEM_ERROR if inflate() + was not able to allocate enough memory when it needed to */ +local int recompress(z_streamp inf, z_streamp def) +{ + int ret, flush; + unsigned char raw[RAWLEN]; + + flush = Z_NO_FLUSH; + do { + /* decompress */ + inf->avail_out = RAWLEN; + inf->next_out = raw; + ret = inflate(inf, Z_NO_FLUSH); + assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR && + ret != Z_NEED_DICT); + if (ret == Z_MEM_ERROR) + return ret; + + /* compress what was decompresed until done or no room */ + def->avail_in = RAWLEN - inf->avail_out; + def->next_in = raw; + if (inf->avail_out != 0) + flush = Z_FINISH; + ret = deflate(def, flush); + assert(ret != Z_STREAM_ERROR); + } while (ret != Z_STREAM_END && def->avail_out != 0); + return ret; +} + +#define EXCESS 256 /* empirically determined stream overage */ +#define MARGIN 8 /* amount to back off for completion */ + +/* compress from stdin to fixed-size block on stdout */ +int main(int argc, char **argv) +{ + int ret; /* return code */ + unsigned size; /* requested fixed output block size */ + unsigned have; /* bytes written by deflate() call */ + unsigned char *blk; /* intermediate and final stream */ + unsigned char *tmp; /* close to desired size stream */ + z_stream def, inf; /* zlib deflate and inflate states */ + + /* get requested output size */ + if (argc != 2) + quit("need one argument: size of output block"); + ret = strtol(argv[1], argv + 1, 10); + if (argv[1][0] != 0) + quit("argument must be a number"); + if (ret < 8) /* 8 is minimum zlib stream size */ + quit("need positive size of 8 or greater"); + size = (unsigned)ret; + + /* allocate memory for buffers and compression engine */ + blk = malloc(size + EXCESS); + def.zalloc = Z_NULL; + def.zfree = Z_NULL; + def.opaque = Z_NULL; + ret = deflateInit(&def, Z_DEFAULT_COMPRESSION); + if (ret != Z_OK || blk == NULL) + quit("out of memory"); + + /* compress from stdin until output full, or no more input */ + def.avail_out = size + EXCESS; + def.next_out = blk; + ret = partcompress(stdin, &def); + if (ret == Z_ERRNO) + quit("error reading input"); + + /* if it all fit, then size was undersubscribed -- done! */ + if (ret == Z_STREAM_END && def.avail_out >= EXCESS) { + /* write block to stdout */ + have = size + EXCESS - def.avail_out; + if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) + quit("error writing output"); + + /* clean up and print results to stderr */ + ret = deflateEnd(&def); + assert(ret != Z_STREAM_ERROR); + free(blk); + fprintf(stderr, + "%u bytes unused out of %u requested (all input)\n", + size - have, size); + return 0; + } + + /* it didn't all fit -- set up for recompression */ + inf.zalloc = Z_NULL; + inf.zfree = Z_NULL; + inf.opaque = Z_NULL; + inf.avail_in = 0; + inf.next_in = Z_NULL; + ret = inflateInit(&inf); + tmp = malloc(size + EXCESS); + if (ret != Z_OK || tmp == NULL) + quit("out of memory"); + ret = deflateReset(&def); + assert(ret != Z_STREAM_ERROR); + + /* do first recompression close to the right amount */ + inf.avail_in = size + EXCESS; + inf.next_in = blk; + def.avail_out = size + EXCESS; + def.next_out = tmp; + ret = recompress(&inf, &def); + if (ret == Z_MEM_ERROR) + quit("out of memory"); + + /* set up for next reocmpression */ + ret = inflateReset(&inf); + assert(ret != Z_STREAM_ERROR); + ret = deflateReset(&def); + assert(ret != Z_STREAM_ERROR); + + /* do second and final recompression (third compression) */ + inf.avail_in = size - MARGIN; /* assure stream will complete */ + inf.next_in = tmp; + def.avail_out = size; + def.next_out = blk; + ret = recompress(&inf, &def); + if (ret == Z_MEM_ERROR) + quit("out of memory"); + assert(ret == Z_STREAM_END); /* otherwise MARGIN too small */ + + /* done -- write block to stdout */ + have = size - def.avail_out; + if (fwrite(blk, 1, have, stdout) != have || ferror(stdout)) + quit("error writing output"); + + /* clean up and print results to stderr */ + free(tmp); + ret = inflateEnd(&inf); + assert(ret != Z_STREAM_ERROR); + ret = deflateEnd(&def); + assert(ret != Z_STREAM_ERROR); + free(blk); + fprintf(stderr, + "%u bytes unused out of %u requested (%lu input)\n", + size - have, size, def.total_in); + return 0; +} diff --git a/compat/zlib/examples/gun.c b/compat/zlib/examples/gun.c new file mode 100644 index 0000000..bfec590 --- /dev/null +++ b/compat/zlib/examples/gun.c @@ -0,0 +1,693 @@ +/* gun.c -- simple gunzip to give an example of the use of inflateBack() + * Copyright (C) 2003, 2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + Version 1.3 12 June 2005 Mark Adler */ + +/* Version history: + 1.0 16 Feb 2003 First version for testing of inflateBack() + 1.1 21 Feb 2005 Decompress concatenated gzip streams + Remove use of "this" variable (C++ keyword) + Fix return value for in() + Improve allocation failure checking + Add typecasting for void * structures + Add -h option for command version and usage + Add a bunch of comments + 1.2 20 Mar 2005 Add Unix compress (LZW) decompression + Copy file attributes from input file to output file + 1.3 12 Jun 2005 Add casts for error messages [Oberhumer] + */ + +/* + gun [ -t ] [ name ... ] + + decompresses the data in the named gzip files. If no arguments are given, + gun will decompress from stdin to stdout. The names must end in .gz, -gz, + .z, -z, _z, or .Z. The uncompressed data will be written to a file name + with the suffix stripped. On success, the original file is deleted. On + failure, the output file is deleted. For most failures, the command will + continue to process the remaining names on the command line. A memory + allocation failure will abort the command. If -t is specified, then the + listed files or stdin will be tested as gzip files for integrity (without + checking for a proper suffix), no output will be written, and no files + will be deleted. + + Like gzip, gun allows concatenated gzip streams and will decompress them, + writing all of the uncompressed data to the output. Unlike gzip, gun allows + an empty file on input, and will produce no error writing an empty output + file. + + gun will also decompress files made by Unix compress, which uses LZW + compression. These files are automatically detected by virtue of their + magic header bytes. Since the end of Unix compress stream is marked by the + end-of-file, they cannot be concantenated. If a Unix compress stream is + encountered in an input file, it is the last stream in that file. + + Like gunzip and uncompress, the file attributes of the orignal compressed + file are maintained in the final uncompressed file, to the extent that the + user permissions allow it. + + On my Mac OS X PowerPC G4, gun is almost twice as fast as gunzip (version + 1.2.4) is on the same file, when gun is linked with zlib 1.2.2. Also the + LZW decompression provided by gun is about twice as fast as the standard + Unix uncompress command. + */ + +/* external functions and related types and constants */ +#include /* fprintf() */ +#include /* malloc(), free() */ +#include /* strerror(), strcmp(), strlen(), memcpy() */ +#include /* errno */ +#include /* open() */ +#include /* read(), write(), close(), chown(), unlink() */ +#include +#include /* stat(), chmod() */ +#include /* utime() */ +#include "zlib.h" /* inflateBackInit(), inflateBack(), */ + /* inflateBackEnd(), crc32() */ + +/* function declaration */ +#define local static + +/* buffer constants */ +#define SIZE 32768U /* input and output buffer sizes */ +#define PIECE 16384 /* limits i/o chunks for 16-bit int case */ + +/* structure for infback() to pass to input function in() -- it maintains the + input file and a buffer of size SIZE */ +struct ind { + int infile; + unsigned char *inbuf; +}; + +/* Load input buffer, assumed to be empty, and return bytes loaded and a + pointer to them. read() is called until the buffer is full, or until it + returns end-of-file or error. Return 0 on error. */ +local unsigned in(void *in_desc, unsigned char **buf) +{ + int ret; + unsigned len; + unsigned char *next; + struct ind *me = (struct ind *)in_desc; + + next = me->inbuf; + *buf = next; + len = 0; + do { + ret = PIECE; + if ((unsigned)ret > SIZE - len) + ret = (int)(SIZE - len); + ret = (int)read(me->infile, next, ret); + if (ret == -1) { + len = 0; + break; + } + next += ret; + len += ret; + } while (ret != 0 && len < SIZE); + return len; +} + +/* structure for infback() to pass to output function out() -- it maintains the + output file, a running CRC-32 check on the output and the total number of + bytes output, both for checking against the gzip trailer. (The length in + the gzip trailer is stored modulo 2^32, so it's ok if a long is 32 bits and + the output is greater than 4 GB.) */ +struct outd { + int outfile; + int check; /* true if checking crc and total */ + unsigned long crc; + unsigned long total; +}; + +/* Write output buffer and update the CRC-32 and total bytes written. write() + is called until all of the output is written or an error is encountered. + On success out() returns 0. For a write failure, out() returns 1. If the + output file descriptor is -1, then nothing is written. + */ +local int out(void *out_desc, unsigned char *buf, unsigned len) +{ + int ret; + struct outd *me = (struct outd *)out_desc; + + if (me->check) { + me->crc = crc32(me->crc, buf, len); + me->total += len; + } + if (me->outfile != -1) + do { + ret = PIECE; + if ((unsigned)ret > len) + ret = (int)len; + ret = (int)write(me->outfile, buf, ret); + if (ret == -1) + return 1; + buf += ret; + len -= ret; + } while (len != 0); + return 0; +} + +/* next input byte macro for use inside lunpipe() and gunpipe() */ +#define NEXT() (have ? 0 : (have = in(indp, &next)), \ + last = have ? (have--, (int)(*next++)) : -1) + +/* memory for gunpipe() and lunpipe() -- + the first 256 entries of prefix[] and suffix[] are never used, could + have offset the index, but it's faster to waste the memory */ +unsigned char inbuf[SIZE]; /* input buffer */ +unsigned char outbuf[SIZE]; /* output buffer */ +unsigned short prefix[65536]; /* index to LZW prefix string */ +unsigned char suffix[65536]; /* one-character LZW suffix */ +unsigned char match[65280 + 2]; /* buffer for reversed match or gzip + 32K sliding window */ + +/* throw out what's left in the current bits byte buffer (this is a vestigial + aspect of the compressed data format derived from an implementation that + made use of a special VAX machine instruction!) */ +#define FLUSHCODE() \ + do { \ + left = 0; \ + rem = 0; \ + if (chunk > have) { \ + chunk -= have; \ + have = 0; \ + if (NEXT() == -1) \ + break; \ + chunk--; \ + if (chunk > have) { \ + chunk = have = 0; \ + break; \ + } \ + } \ + have -= chunk; \ + next += chunk; \ + chunk = 0; \ + } while (0) + +/* Decompress a compress (LZW) file from indp to outfile. The compress magic + header (two bytes) has already been read and verified. There are have bytes + of buffered input at next. strm is used for passing error information back + to gunpipe(). + + lunpipe() will return Z_OK on success, Z_BUF_ERROR for an unexpected end of + file, read error, or write error (a write error indicated by strm->next_in + not equal to Z_NULL), or Z_DATA_ERROR for invalid input. + */ +local int lunpipe(unsigned have, unsigned char *next, struct ind *indp, + int outfile, z_stream *strm) +{ + int last; /* last byte read by NEXT(), or -1 if EOF */ + int chunk; /* bytes left in current chunk */ + int left; /* bits left in rem */ + unsigned rem; /* unused bits from input */ + int bits; /* current bits per code */ + unsigned code; /* code, table traversal index */ + unsigned mask; /* mask for current bits codes */ + int max; /* maximum bits per code for this stream */ + int flags; /* compress flags, then block compress flag */ + unsigned end; /* last valid entry in prefix/suffix tables */ + unsigned temp; /* current code */ + unsigned prev; /* previous code */ + unsigned final; /* last character written for previous code */ + unsigned stack; /* next position for reversed string */ + unsigned outcnt; /* bytes in output buffer */ + struct outd outd; /* output structure */ + + /* set up output */ + outd.outfile = outfile; + outd.check = 0; + + /* process remainder of compress header -- a flags byte */ + flags = NEXT(); + if (last == -1) + return Z_BUF_ERROR; + if (flags & 0x60) { + strm->msg = (char *)"unknown lzw flags set"; + return Z_DATA_ERROR; + } + max = flags & 0x1f; + if (max < 9 || max > 16) { + strm->msg = (char *)"lzw bits out of range"; + return Z_DATA_ERROR; + } + if (max == 9) /* 9 doesn't really mean 9 */ + max = 10; + flags &= 0x80; /* true if block compress */ + + /* clear table */ + bits = 9; + mask = 0x1ff; + end = flags ? 256 : 255; + + /* set up: get first 9-bit code, which is the first decompressed byte, but + don't create a table entry until the next code */ + if (NEXT() == -1) /* no compressed data is ok */ + return Z_OK; + final = prev = (unsigned)last; /* low 8 bits of code */ + if (NEXT() == -1) /* missing a bit */ + return Z_BUF_ERROR; + if (last & 1) { /* code must be < 256 */ + strm->msg = (char *)"invalid lzw code"; + return Z_DATA_ERROR; + } + rem = (unsigned)last >> 1; /* remaining 7 bits */ + left = 7; + chunk = bits - 2; /* 7 bytes left in this chunk */ + outbuf[0] = (unsigned char)final; /* write first decompressed byte */ + outcnt = 1; + + /* decode codes */ + stack = 0; + for (;;) { + /* if the table will be full after this, increment the code size */ + if (end >= mask && bits < max) { + FLUSHCODE(); + bits++; + mask <<= 1; + mask++; + } + + /* get a code of length bits */ + if (chunk == 0) /* decrement chunk modulo bits */ + chunk = bits; + code = rem; /* low bits of code */ + if (NEXT() == -1) { /* EOF is end of compressed data */ + /* write remaining buffered output */ + if (outcnt && out(&outd, outbuf, outcnt)) { + strm->next_in = outbuf; /* signal write error */ + return Z_BUF_ERROR; + } + return Z_OK; + } + code += (unsigned)last << left; /* middle (or high) bits of code */ + left += 8; + chunk--; + if (bits > left) { /* need more bits */ + if (NEXT() == -1) /* can't end in middle of code */ + return Z_BUF_ERROR; + code += (unsigned)last << left; /* high bits of code */ + left += 8; + chunk--; + } + code &= mask; /* mask to current code length */ + left -= bits; /* number of unused bits */ + rem = (unsigned)last >> (8 - left); /* unused bits from last byte */ + + /* process clear code (256) */ + if (code == 256 && flags) { + FLUSHCODE(); + bits = 9; /* initialize bits and mask */ + mask = 0x1ff; + end = 255; /* empty table */ + continue; /* get next code */ + } + + /* special code to reuse last match */ + temp = code; /* save the current code */ + if (code > end) { + /* Be picky on the allowed code here, and make sure that the code + we drop through (prev) will be a valid index so that random + input does not cause an exception. The code != end + 1 check is + empirically derived, and not checked in the original uncompress + code. If this ever causes a problem, that check could be safely + removed. Leaving this check in greatly improves gun's ability + to detect random or corrupted input after a compress header. + In any case, the prev > end check must be retained. */ + if (code != end + 1 || prev > end) { + strm->msg = (char *)"invalid lzw code"; + return Z_DATA_ERROR; + } + match[stack++] = (unsigned char)final; + code = prev; + } + + /* walk through linked list to generate output in reverse order */ + while (code >= 256) { + match[stack++] = suffix[code]; + code = prefix[code]; + } + match[stack++] = (unsigned char)code; + final = code; + + /* link new table entry */ + if (end < mask) { + end++; + prefix[end] = (unsigned short)prev; + suffix[end] = (unsigned char)final; + } + + /* set previous code for next iteration */ + prev = temp; + + /* write output in forward order */ + while (stack > SIZE - outcnt) { + while (outcnt < SIZE) + outbuf[outcnt++] = match[--stack]; + if (out(&outd, outbuf, outcnt)) { + strm->next_in = outbuf; /* signal write error */ + return Z_BUF_ERROR; + } + outcnt = 0; + } + do { + outbuf[outcnt++] = match[--stack]; + } while (stack); + + /* loop for next code with final and prev as the last match, rem and + left provide the first 0..7 bits of the next code, end is the last + valid table entry */ + } +} + +/* Decompress a gzip file from infile to outfile. strm is assumed to have been + successfully initialized with inflateBackInit(). The input file may consist + of a series of gzip streams, in which case all of them will be decompressed + to the output file. If outfile is -1, then the gzip stream(s) integrity is + checked and nothing is written. + + The return value is a zlib error code: Z_MEM_ERROR if out of memory, + Z_DATA_ERROR if the header or the compressed data is invalid, or if the + trailer CRC-32 check or length doesn't match, Z_BUF_ERROR if the input ends + prematurely or a write error occurs, or Z_ERRNO if junk (not a another gzip + stream) follows a valid gzip stream. + */ +local int gunpipe(z_stream *strm, int infile, int outfile) +{ + int ret, first, last; + unsigned have, flags, len; + unsigned char *next; + struct ind ind, *indp; + struct outd outd; + + /* setup input buffer */ + ind.infile = infile; + ind.inbuf = inbuf; + indp = &ind; + + /* decompress concatenated gzip streams */ + have = 0; /* no input data read in yet */ + first = 1; /* looking for first gzip header */ + strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ + for (;;) { + /* look for the two magic header bytes for a gzip stream */ + if (NEXT() == -1) { + ret = Z_OK; + break; /* empty gzip stream is ok */ + } + if (last != 31 || (NEXT() != 139 && last != 157)) { + strm->msg = (char *)"incorrect header check"; + ret = first ? Z_DATA_ERROR : Z_ERRNO; + break; /* not a gzip or compress header */ + } + first = 0; /* next non-header is junk */ + + /* process a compress (LZW) file -- can't be concatenated after this */ + if (last == 157) { + ret = lunpipe(have, next, indp, outfile, strm); + break; + } + + /* process remainder of gzip header */ + ret = Z_BUF_ERROR; + if (NEXT() != 8) { /* only deflate method allowed */ + if (last == -1) break; + strm->msg = (char *)"unknown compression method"; + ret = Z_DATA_ERROR; + break; + } + flags = NEXT(); /* header flags */ + NEXT(); /* discard mod time, xflgs, os */ + NEXT(); + NEXT(); + NEXT(); + NEXT(); + NEXT(); + if (last == -1) break; + if (flags & 0xe0) { + strm->msg = (char *)"unknown header flags set"; + ret = Z_DATA_ERROR; + break; + } + if (flags & 4) { /* extra field */ + len = NEXT(); + len += (unsigned)(NEXT()) << 8; + if (last == -1) break; + while (len > have) { + len -= have; + have = 0; + if (NEXT() == -1) break; + len--; + } + if (last == -1) break; + have -= len; + next += len; + } + if (flags & 8) /* file name */ + while (NEXT() != 0 && last != -1) + ; + if (flags & 16) /* comment */ + while (NEXT() != 0 && last != -1) + ; + if (flags & 2) { /* header crc */ + NEXT(); + NEXT(); + } + if (last == -1) break; + + /* set up output */ + outd.outfile = outfile; + outd.check = 1; + outd.crc = crc32(0L, Z_NULL, 0); + outd.total = 0; + + /* decompress data to output */ + strm->next_in = next; + strm->avail_in = have; + ret = inflateBack(strm, in, indp, out, &outd); + if (ret != Z_STREAM_END) break; + next = strm->next_in; + have = strm->avail_in; + strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */ + + /* check trailer */ + ret = Z_BUF_ERROR; + if (NEXT() != (outd.crc & 0xff) || + NEXT() != ((outd.crc >> 8) & 0xff) || + NEXT() != ((outd.crc >> 16) & 0xff) || + NEXT() != ((outd.crc >> 24) & 0xff)) { + /* crc error */ + if (last != -1) { + strm->msg = (char *)"incorrect data check"; + ret = Z_DATA_ERROR; + } + break; + } + if (NEXT() != (outd.total & 0xff) || + NEXT() != ((outd.total >> 8) & 0xff) || + NEXT() != ((outd.total >> 16) & 0xff) || + NEXT() != ((outd.total >> 24) & 0xff)) { + /* length error */ + if (last != -1) { + strm->msg = (char *)"incorrect length check"; + ret = Z_DATA_ERROR; + } + break; + } + + /* go back and look for another gzip stream */ + } + + /* clean up and return */ + return ret; +} + +/* Copy file attributes, from -> to, as best we can. This is best effort, so + no errors are reported. The mode bits, including suid, sgid, and the sticky + bit are copied (if allowed), the owner's user id and group id are copied + (again if allowed), and the access and modify times are copied. */ +local void copymeta(char *from, char *to) +{ + struct stat was; + struct utimbuf when; + + /* get all of from's Unix meta data, return if not a regular file */ + if (stat(from, &was) != 0 || (was.st_mode & S_IFMT) != S_IFREG) + return; + + /* set to's mode bits, ignore errors */ + (void)chmod(to, was.st_mode & 07777); + + /* copy owner's user and group, ignore errors */ + (void)chown(to, was.st_uid, was.st_gid); + + /* copy access and modify times, ignore errors */ + when.actime = was.st_atime; + when.modtime = was.st_mtime; + (void)utime(to, &when); +} + +/* Decompress the file inname to the file outnname, of if test is true, just + decompress without writing and check the gzip trailer for integrity. If + inname is NULL or an empty string, read from stdin. If outname is NULL or + an empty string, write to stdout. strm is a pre-initialized inflateBack + structure. When appropriate, copy the file attributes from inname to + outname. + + gunzip() returns 1 if there is an out-of-memory error or an unexpected + return code from gunpipe(). Otherwise it returns 0. + */ +local int gunzip(z_stream *strm, char *inname, char *outname, int test) +{ + int ret; + int infile, outfile; + + /* open files */ + if (inname == NULL || *inname == 0) { + inname = "-"; + infile = 0; /* stdin */ + } + else { + infile = open(inname, O_RDONLY, 0); + if (infile == -1) { + fprintf(stderr, "gun cannot open %s\n", inname); + return 0; + } + } + if (test) + outfile = -1; + else if (outname == NULL || *outname == 0) { + outname = "-"; + outfile = 1; /* stdout */ + } + else { + outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666); + if (outfile == -1) { + close(infile); + fprintf(stderr, "gun cannot create %s\n", outname); + return 0; + } + } + errno = 0; + + /* decompress */ + ret = gunpipe(strm, infile, outfile); + if (outfile > 2) close(outfile); + if (infile > 2) close(infile); + + /* interpret result */ + switch (ret) { + case Z_OK: + case Z_ERRNO: + if (infile > 2 && outfile > 2) { + copymeta(inname, outname); /* copy attributes */ + unlink(inname); + } + if (ret == Z_ERRNO) + fprintf(stderr, "gun warning: trailing garbage ignored in %s\n", + inname); + break; + case Z_DATA_ERROR: + if (outfile > 2) unlink(outname); + fprintf(stderr, "gun data error on %s: %s\n", inname, strm->msg); + break; + case Z_MEM_ERROR: + if (outfile > 2) unlink(outname); + fprintf(stderr, "gun out of memory error--aborting\n"); + return 1; + case Z_BUF_ERROR: + if (outfile > 2) unlink(outname); + if (strm->next_in != Z_NULL) { + fprintf(stderr, "gun write error on %s: %s\n", + outname, strerror(errno)); + } + else if (errno) { + fprintf(stderr, "gun read error on %s: %s\n", + inname, strerror(errno)); + } + else { + fprintf(stderr, "gun unexpected end of file on %s\n", + inname); + } + break; + default: + if (outfile > 2) unlink(outname); + fprintf(stderr, "gun internal error--aborting\n"); + return 1; + } + return 0; +} + +/* Process the gun command line arguments. See the command syntax near the + beginning of this source file. */ +int main(int argc, char **argv) +{ + int ret, len, test; + char *outname; + unsigned char *window; + z_stream strm; + + /* initialize inflateBack state for repeated use */ + window = match; /* reuse LZW match buffer */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + ret = inflateBackInit(&strm, 15, window); + if (ret != Z_OK) { + fprintf(stderr, "gun out of memory error--aborting\n"); + return 1; + } + + /* decompress each file to the same name with the suffix removed */ + argc--; + argv++; + test = 0; + if (argc && strcmp(*argv, "-h") == 0) { + fprintf(stderr, "gun 1.3 (12 Jun 2005)\n"); + fprintf(stderr, "Copyright (c) 2005 Mark Adler\n"); + fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n"); + return 0; + } + if (argc && strcmp(*argv, "-t") == 0) { + test = 1; + argc--; + argv++; + } + if (argc) + do { + if (test) + outname = NULL; + else { + len = (int)strlen(*argv); + if (strcmp(*argv + len - 3, ".gz") == 0 || + strcmp(*argv + len - 3, "-gz") == 0) + len -= 3; + else if (strcmp(*argv + len - 2, ".z") == 0 || + strcmp(*argv + len - 2, "-z") == 0 || + strcmp(*argv + len - 2, "_z") == 0 || + strcmp(*argv + len - 2, ".Z") == 0) + len -= 2; + else { + fprintf(stderr, "gun error: no gz type on %s--skipping\n", + *argv); + continue; + } + outname = malloc(len + 1); + if (outname == NULL) { + fprintf(stderr, "gun out of memory error--aborting\n"); + ret = 1; + break; + } + memcpy(outname, *argv, len); + outname[len] = 0; + } + ret = gunzip(&strm, *argv, outname, test); + if (outname != NULL) free(outname); + if (ret) break; + } while (argv++, --argc); + else + ret = gunzip(&strm, NULL, NULL, test); + + /* clean up */ + inflateBackEnd(&strm); + return ret; +} diff --git a/compat/zlib/examples/gzappend.c b/compat/zlib/examples/gzappend.c new file mode 100644 index 0000000..e9e878e --- /dev/null +++ b/compat/zlib/examples/gzappend.c @@ -0,0 +1,500 @@ +/* gzappend -- command to append to a gzip file + + Copyright (C) 2003 Mark Adler, all rights reserved + version 1.1, 4 Nov 2003 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + +/* + * Change history: + * + * 1.0 19 Oct 2003 - First version + * 1.1 4 Nov 2003 - Expand and clarify some comments and notes + * - Add version and copyright to help + * - Send help to stdout instead of stderr + * - Add some preemptive typecasts + * - Add L to constants in lseek() calls + * - Remove some debugging information in error messages + * - Use new data_type definition for zlib 1.2.1 + * - Simplfy and unify file operations + * - Finish off gzip file in gztack() + * - Use deflatePrime() instead of adding empty blocks + * - Keep gzip file clean on appended file read errors + * - Use in-place rotate instead of auxiliary buffer + * (Why you ask? Because it was fun to write!) + */ + +/* + gzappend takes a gzip file and appends to it, compressing files from the + command line or data from stdin. The gzip file is written to directly, to + avoid copying that file, in case it's large. Note that this results in the + unfriendly behavior that if gzappend fails, the gzip file is corrupted. + + This program was written to illustrate the use of the new Z_BLOCK option of + zlib 1.2.x's inflate() function. This option returns from inflate() at each + block boundary to facilitate locating and modifying the last block bit at + the start of the final deflate block. Also whether using Z_BLOCK or not, + another required feature of zlib 1.2.x is that inflate() now provides the + number of unusued bits in the last input byte used. gzappend will not work + with versions of zlib earlier than 1.2.1. + + gzappend first decompresses the gzip file internally, discarding all but + the last 32K of uncompressed data, and noting the location of the last block + bit and the number of unused bits in the last byte of the compressed data. + The gzip trailer containing the CRC-32 and length of the uncompressed data + is verified. This trailer will be later overwritten. + + Then the last block bit is cleared by seeking back in the file and rewriting + the byte that contains it. Seeking forward, the last byte of the compressed + data is saved along with the number of unused bits to initialize deflate. + + A deflate process is initialized, using the last 32K of the uncompressed + data from the gzip file to initialize the dictionary. If the total + uncompressed data was less than 32K, then all of it is used to initialize + the dictionary. The deflate output bit buffer is also initialized with the + last bits from the original deflate stream. From here on, the data to + append is simply compressed using deflate, and written to the gzip file. + When that is complete, the new CRC-32 and uncompressed length are written + as the trailer of the gzip file. + */ + +#include +#include +#include +#include +#include +#include "zlib.h" + +#define local static +#define LGCHUNK 14 +#define CHUNK (1U << LGCHUNK) +#define DSIZE 32768U + +/* print an error message and terminate with extreme prejudice */ +local void bye(char *msg1, char *msg2) +{ + fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2); + exit(1); +} + +/* return the greatest common divisor of a and b using Euclid's algorithm, + modified to be fast when one argument much greater than the other, and + coded to avoid unnecessary swapping */ +local unsigned gcd(unsigned a, unsigned b) +{ + unsigned c; + + while (a && b) + if (a > b) { + c = b; + while (a - c >= c) + c <<= 1; + a -= c; + } + else { + c = a; + while (b - c >= c) + c <<= 1; + b -= c; + } + return a + b; +} + +/* rotate list[0..len-1] left by rot positions, in place */ +local void rotate(unsigned char *list, unsigned len, unsigned rot) +{ + unsigned char tmp; + unsigned cycles; + unsigned char *start, *last, *to, *from; + + /* normalize rot and handle degenerate cases */ + if (len < 2) return; + if (rot >= len) rot %= len; + if (rot == 0) return; + + /* pointer to last entry in list */ + last = list + (len - 1); + + /* do simple left shift by one */ + if (rot == 1) { + tmp = *list; + memcpy(list, list + 1, len - 1); + *last = tmp; + return; + } + + /* do simple right shift by one */ + if (rot == len - 1) { + tmp = *last; + memmove(list + 1, list, len - 1); + *list = tmp; + return; + } + + /* otherwise do rotate as a set of cycles in place */ + cycles = gcd(len, rot); /* number of cycles */ + do { + start = from = list + cycles; /* start index is arbitrary */ + tmp = *from; /* save entry to be overwritten */ + for (;;) { + to = from; /* next step in cycle */ + from += rot; /* go right rot positions */ + if (from > last) from -= len; /* (pointer better not wrap) */ + if (from == start) break; /* all but one shifted */ + *to = *from; /* shift left */ + } + *to = tmp; /* complete the circle */ + } while (--cycles); +} + +/* structure for gzip file read operations */ +typedef struct { + int fd; /* file descriptor */ + int size; /* 1 << size is bytes in buf */ + unsigned left; /* bytes available at next */ + unsigned char *buf; /* buffer */ + unsigned char *next; /* next byte in buffer */ + char *name; /* file name for error messages */ +} file; + +/* reload buffer */ +local int readin(file *in) +{ + int len; + + len = read(in->fd, in->buf, 1 << in->size); + if (len == -1) bye("error reading ", in->name); + in->left = (unsigned)len; + in->next = in->buf; + return len; +} + +/* read from file in, exit if end-of-file */ +local int readmore(file *in) +{ + if (readin(in) == 0) bye("unexpected end of ", in->name); + return 0; +} + +#define read1(in) (in->left == 0 ? readmore(in) : 0, \ + in->left--, *(in->next)++) + +/* skip over n bytes of in */ +local void skip(file *in, unsigned n) +{ + unsigned bypass; + + if (n > in->left) { + n -= in->left; + bypass = n & ~((1U << in->size) - 1); + if (bypass) { + if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1) + bye("seeking ", in->name); + n -= bypass; + } + readmore(in); + if (n > in->left) + bye("unexpected end of ", in->name); + } + in->left -= n; + in->next += n; +} + +/* read a four-byte unsigned integer, little-endian, from in */ +unsigned long read4(file *in) +{ + unsigned long val; + + val = read1(in); + val += (unsigned)read1(in) << 8; + val += (unsigned long)read1(in) << 16; + val += (unsigned long)read1(in) << 24; + return val; +} + +/* skip over gzip header */ +local void gzheader(file *in) +{ + int flags; + unsigned n; + + if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file"); + if (read1(in) != 8) bye("unknown compression method in", in->name); + flags = read1(in); + if (flags & 0xe0) bye("unknown header flags set in", in->name); + skip(in, 6); + if (flags & 4) { + n = read1(in); + n += (unsigned)(read1(in)) << 8; + skip(in, n); + } + if (flags & 8) while (read1(in) != 0) ; + if (flags & 16) while (read1(in) != 0) ; + if (flags & 2) skip(in, 2); +} + +/* decompress gzip file "name", return strm with a deflate stream ready to + continue compression of the data in the gzip file, and return a file + descriptor pointing to where to write the compressed data -- the deflate + stream is initialized to compress using level "level" */ +local int gzscan(char *name, z_stream *strm, int level) +{ + int ret, lastbit, left, full; + unsigned have; + unsigned long crc, tot; + unsigned char *window; + off_t lastoff, end; + file gz; + + /* open gzip file */ + gz.name = name; + gz.fd = open(name, O_RDWR, 0); + if (gz.fd == -1) bye("cannot open ", name); + gz.buf = malloc(CHUNK); + if (gz.buf == NULL) bye("out of memory", ""); + gz.size = LGCHUNK; + gz.left = 0; + + /* skip gzip header */ + gzheader(&gz); + + /* prepare to decompress */ + window = malloc(DSIZE); + if (window == NULL) bye("out of memory", ""); + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = inflateInit2(strm, -15); + if (ret != Z_OK) bye("out of memory", " or library mismatch"); + + /* decompress the deflate stream, saving append information */ + lastbit = 0; + lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; + left = 0; + strm->avail_in = gz.left; + strm->next_in = gz.next; + crc = crc32(0L, Z_NULL, 0); + have = full = 0; + do { + /* if needed, get more input */ + if (strm->avail_in == 0) { + readmore(&gz); + strm->avail_in = gz.left; + strm->next_in = gz.next; + } + + /* set up output to next available section of sliding window */ + strm->avail_out = DSIZE - have; + strm->next_out = window + have; + + /* inflate and check for errors */ + ret = inflate(strm, Z_BLOCK); + if (ret == Z_STREAM_ERROR) bye("internal stream error!", ""); + if (ret == Z_MEM_ERROR) bye("out of memory", ""); + if (ret == Z_DATA_ERROR) + bye("invalid compressed data--format violated in", name); + + /* update crc and sliding window pointer */ + crc = crc32(crc, window + have, DSIZE - have - strm->avail_out); + if (strm->avail_out) + have = DSIZE - strm->avail_out; + else { + have = 0; + full = 1; + } + + /* process end of block */ + if (strm->data_type & 128) { + if (strm->data_type & 64) + left = strm->data_type & 0x1f; + else { + lastbit = strm->data_type & 0x1f; + lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in; + } + } + } while (ret != Z_STREAM_END); + inflateEnd(strm); + gz.left = strm->avail_in; + gz.next = strm->next_in; + + /* save the location of the end of the compressed data */ + end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left; + + /* check gzip trailer and save total for deflate */ + if (crc != read4(&gz)) + bye("invalid compressed data--crc mismatch in ", name); + tot = strm->total_out; + if ((tot & 0xffffffffUL) != read4(&gz)) + bye("invalid compressed data--length mismatch in", name); + + /* if not at end of file, warn */ + if (gz.left || readin(&gz)) + fprintf(stderr, + "gzappend warning: junk at end of gzip file overwritten\n"); + + /* clear last block bit */ + lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET); + if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); + *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7))); + lseek(gz.fd, -1L, SEEK_CUR); + if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name); + + /* if window wrapped, build dictionary from window by rotating */ + if (full) { + rotate(window, DSIZE, have); + have = DSIZE; + } + + /* set up deflate stream with window, crc, total_in, and leftover bits */ + ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); + if (ret != Z_OK) bye("out of memory", ""); + deflateSetDictionary(strm, window, have); + strm->adler = crc; + strm->total_in = tot; + if (left) { + lseek(gz.fd, --end, SEEK_SET); + if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); + deflatePrime(strm, 8 - left, *gz.buf); + } + lseek(gz.fd, end, SEEK_SET); + + /* clean up and return */ + free(window); + free(gz.buf); + return gz.fd; +} + +/* append file "name" to gzip file gd using deflate stream strm -- if last + is true, then finish off the deflate stream at the end */ +local void gztack(char *name, int gd, z_stream *strm, int last) +{ + int fd, len, ret; + unsigned left; + unsigned char *in, *out; + + /* open file to compress and append */ + fd = 0; + if (name != NULL) { + fd = open(name, O_RDONLY, 0); + if (fd == -1) + fprintf(stderr, "gzappend warning: %s not found, skipping ...\n", + name); + } + + /* allocate buffers */ + in = fd == -1 ? NULL : malloc(CHUNK); + out = malloc(CHUNK); + if (out == NULL) bye("out of memory", ""); + + /* compress input file and append to gzip file */ + do { + /* get more input */ + len = fd == -1 ? 0 : read(fd, in, CHUNK); + if (len == -1) { + fprintf(stderr, + "gzappend warning: error reading %s, skipping rest ...\n", + name); + len = 0; + } + strm->avail_in = (unsigned)len; + strm->next_in = in; + if (len) strm->adler = crc32(strm->adler, in, (unsigned)len); + + /* compress and write all available output */ + do { + strm->avail_out = CHUNK; + strm->next_out = out; + ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH); + left = CHUNK - strm->avail_out; + while (left) { + len = write(gd, out + CHUNK - strm->avail_out - left, left); + if (len == -1) bye("writing gzip file", ""); + left -= (unsigned)len; + } + } while (strm->avail_out == 0 && ret != Z_STREAM_END); + } while (len != 0); + + /* write trailer after last entry */ + if (last) { + deflateEnd(strm); + out[0] = (unsigned char)(strm->adler); + out[1] = (unsigned char)(strm->adler >> 8); + out[2] = (unsigned char)(strm->adler >> 16); + out[3] = (unsigned char)(strm->adler >> 24); + out[4] = (unsigned char)(strm->total_in); + out[5] = (unsigned char)(strm->total_in >> 8); + out[6] = (unsigned char)(strm->total_in >> 16); + out[7] = (unsigned char)(strm->total_in >> 24); + len = 8; + do { + ret = write(gd, out + 8 - len, len); + if (ret == -1) bye("writing gzip file", ""); + len -= ret; + } while (len); + close(gd); + } + + /* clean up and return */ + free(out); + if (in != NULL) free(in); + if (fd > 0) close(fd); +} + +/* process the compression level option if present, scan the gzip file, and + append the specified files, or append the data from stdin if no other file + names are provided on the command line -- the gzip file must be writable + and seekable */ +int main(int argc, char **argv) +{ + int gd, level; + z_stream strm; + + /* ignore command name */ + argv++; + + /* provide usage if no arguments */ + if (*argv == NULL) { + printf("gzappend 1.1 (4 Nov 2003) Copyright (C) 2003 Mark Adler\n"); + printf( + "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n"); + return 0; + } + + /* set compression level */ + level = Z_DEFAULT_COMPRESSION; + if (argv[0][0] == '-') { + if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0) + bye("invalid compression level", ""); + level = argv[0][1] - '0'; + if (*++argv == NULL) bye("no gzip file name after options", ""); + } + + /* prepare to append to gzip file */ + gd = gzscan(*argv++, &strm, level); + + /* append files on command line, or from stdin if none */ + if (*argv == NULL) + gztack(NULL, gd, &strm, 1); + else + do { + gztack(*argv, gd, &strm, argv[1] == NULL); + } while (*++argv != NULL); + return 0; +} diff --git a/compat/zlib/examples/gzjoin.c b/compat/zlib/examples/gzjoin.c new file mode 100644 index 0000000..129347c --- /dev/null +++ b/compat/zlib/examples/gzjoin.c @@ -0,0 +1,448 @@ +/* gzjoin -- command to join gzip files into one gzip file + + Copyright (C) 2004 Mark Adler, all rights reserved + version 1.0, 11 Dec 2004 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + +/* + * Change history: + * + * 1.0 11 Dec 2004 - First version + * 1.1 12 Jun 2005 - Changed ssize_t to long for portability + */ + +/* + gzjoin takes one or more gzip files on the command line and writes out a + single gzip file that will uncompress to the concatenation of the + uncompressed data from the individual gzip files. gzjoin does this without + having to recompress any of the data and without having to calculate a new + crc32 for the concatenated uncompressed data. gzjoin does however have to + decompress all of the input data in order to find the bits in the compressed + data that need to be modified to concatenate the streams. + + gzjoin does not do an integrity check on the input gzip files other than + checking the gzip header and decompressing the compressed data. They are + otherwise assumed to be complete and correct. + + Each joint between gzip files removes at least 18 bytes of previous trailer + and subsequent header, and inserts an average of about three bytes to the + compressed data in order to connect the streams. The output gzip file + has a minimal ten-byte gzip header with no file name or modification time. + + This program was written to illustrate the use of the Z_BLOCK option of + inflate() and the crc32_combine() function. gzjoin will not compile with + versions of zlib earlier than 1.2.3. + */ + +#include /* fputs(), fprintf(), fwrite(), putc() */ +#include /* exit(), malloc(), free() */ +#include /* open() */ +#include /* close(), read(), lseek() */ +#include "zlib.h" + /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */ + +#define local static + +/* exit with an error (return a value to allow use in an expression) */ +local int bail(char *why1, char *why2) +{ + fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2); + exit(1); + return 0; +} + +/* -- simple buffered file input with access to the buffer -- */ + +#define CHUNK 32768 /* must be a power of two and fit in unsigned */ + +/* bin buffered input file type */ +typedef struct { + char *name; /* name of file for error messages */ + int fd; /* file descriptor */ + unsigned left; /* bytes remaining at next */ + unsigned char *next; /* next byte to read */ + unsigned char *buf; /* allocated buffer of length CHUNK */ +} bin; + +/* close a buffered file and free allocated memory */ +local void bclose(bin *in) +{ + if (in != NULL) { + if (in->fd != -1) + close(in->fd); + if (in->buf != NULL) + free(in->buf); + free(in); + } +} + +/* open a buffered file for input, return a pointer to type bin, or NULL on + failure */ +local bin *bopen(char *name) +{ + bin *in; + + in = malloc(sizeof(bin)); + if (in == NULL) + return NULL; + in->buf = malloc(CHUNK); + in->fd = open(name, O_RDONLY, 0); + if (in->buf == NULL || in->fd == -1) { + bclose(in); + return NULL; + } + in->left = 0; + in->next = in->buf; + in->name = name; + return in; +} + +/* load buffer from file, return -1 on read error, 0 or 1 on success, with + 1 indicating that end-of-file was reached */ +local int bload(bin *in) +{ + long len; + + if (in == NULL) + return -1; + if (in->left != 0) + return 0; + in->next = in->buf; + do { + len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left); + if (len < 0) + return -1; + in->left += (unsigned)len; + } while (len != 0 && in->left < CHUNK); + return len == 0 ? 1 : 0; +} + +/* get a byte from the file, bail if end of file */ +#define bget(in) (in->left ? 0 : bload(in), \ + in->left ? (in->left--, *(in->next)++) : \ + bail("unexpected end of file on ", in->name)) + +/* get a four-byte little-endian unsigned integer from file */ +local unsigned long bget4(bin *in) +{ + unsigned long val; + + val = bget(in); + val += (unsigned long)(bget(in)) << 8; + val += (unsigned long)(bget(in)) << 16; + val += (unsigned long)(bget(in)) << 24; + return val; +} + +/* skip bytes in file */ +local void bskip(bin *in, unsigned skip) +{ + /* check pointer */ + if (in == NULL) + return; + + /* easy case -- skip bytes in buffer */ + if (skip <= in->left) { + in->left -= skip; + in->next += skip; + return; + } + + /* skip what's in buffer, discard buffer contents */ + skip -= in->left; + in->left = 0; + + /* seek past multiples of CHUNK bytes */ + if (skip > CHUNK) { + unsigned left; + + left = skip & (CHUNK - 1); + if (left == 0) { + /* exact number of chunks: seek all the way minus one byte to check + for end-of-file with a read */ + lseek(in->fd, skip - 1, SEEK_CUR); + if (read(in->fd, in->buf, 1) != 1) + bail("unexpected end of file on ", in->name); + return; + } + + /* skip the integral chunks, update skip with remainder */ + lseek(in->fd, skip - left, SEEK_CUR); + skip = left; + } + + /* read more input and skip remainder */ + bload(in); + if (skip > in->left) + bail("unexpected end of file on ", in->name); + in->left -= skip; + in->next += skip; +} + +/* -- end of buffered input functions -- */ + +/* skip the gzip header from file in */ +local void gzhead(bin *in) +{ + int flags; + + /* verify gzip magic header and compression method */ + if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8) + bail(in->name, " is not a valid gzip file"); + + /* get and verify flags */ + flags = bget(in); + if ((flags & 0xe0) != 0) + bail("unknown reserved bits set in ", in->name); + + /* skip modification time, extra flags, and os */ + bskip(in, 6); + + /* skip extra field if present */ + if (flags & 4) { + unsigned len; + + len = bget(in); + len += (unsigned)(bget(in)) << 8; + bskip(in, len); + } + + /* skip file name if present */ + if (flags & 8) + while (bget(in) != 0) + ; + + /* skip comment if present */ + if (flags & 16) + while (bget(in) != 0) + ; + + /* skip header crc if present */ + if (flags & 2) + bskip(in, 2); +} + +/* write a four-byte little-endian unsigned integer to out */ +local void put4(unsigned long val, FILE *out) +{ + putc(val & 0xff, out); + putc((val >> 8) & 0xff, out); + putc((val >> 16) & 0xff, out); + putc((val >> 24) & 0xff, out); +} + +/* Load up zlib stream from buffered input, bail if end of file */ +local void zpull(z_streamp strm, bin *in) +{ + if (in->left == 0) + bload(in); + if (in->left == 0) + bail("unexpected end of file on ", in->name); + strm->avail_in = in->left; + strm->next_in = in->next; +} + +/* Write header for gzip file to out and initialize trailer. */ +local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out) +{ + fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out); + *crc = crc32(0L, Z_NULL, 0); + *tot = 0; +} + +/* Copy the compressed data from name, zeroing the last block bit of the last + block if clr is true, and adding empty blocks as needed to get to a byte + boundary. If clr is false, then the last block becomes the last block of + the output, and the gzip trailer is written. crc and tot maintains the + crc and length (modulo 2^32) of the output for the trailer. The resulting + gzip file is written to out. gzinit() must be called before the first call + of gzcopy() to write the gzip header and to initialize crc and tot. */ +local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot, + FILE *out) +{ + int ret; /* return value from zlib functions */ + int pos; /* where the "last block" bit is in byte */ + int last; /* true if processing the last block */ + bin *in; /* buffered input file */ + unsigned char *start; /* start of compressed data in buffer */ + unsigned char *junk; /* buffer for uncompressed data -- discarded */ + z_off_t len; /* length of uncompressed data (support > 4 GB) */ + z_stream strm; /* zlib inflate stream */ + + /* open gzip file and skip header */ + in = bopen(name); + if (in == NULL) + bail("could not open ", name); + gzhead(in); + + /* allocate buffer for uncompressed data and initialize raw inflate + stream */ + junk = malloc(CHUNK); + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, -15); + if (junk == NULL || ret != Z_OK) + bail("out of memory", ""); + + /* inflate and copy compressed data, clear last-block bit if requested */ + len = 0; + zpull(&strm, in); + start = strm.next_in; + last = start[0] & 1; + if (last && clr) + start[0] &= ~1; + strm.avail_out = 0; + for (;;) { + /* if input used and output done, write used input and get more */ + if (strm.avail_in == 0 && strm.avail_out != 0) { + fwrite(start, 1, strm.next_in - start, out); + start = in->buf; + in->left = 0; + zpull(&strm, in); + } + + /* decompress -- return early when end-of-block reached */ + strm.avail_out = CHUNK; + strm.next_out = junk; + ret = inflate(&strm, Z_BLOCK); + switch (ret) { + case Z_MEM_ERROR: + bail("out of memory", ""); + case Z_DATA_ERROR: + bail("invalid compressed data in ", in->name); + } + + /* update length of uncompressed data */ + len += CHUNK - strm.avail_out; + + /* check for block boundary (only get this when block copied out) */ + if (strm.data_type & 128) { + /* if that was the last block, then done */ + if (last) + break; + + /* number of unused bits in last byte */ + pos = strm.data_type & 7; + + /* find the next last-block bit */ + if (pos != 0) { + /* next last-block bit is in last used byte */ + pos = 0x100 >> pos; + last = strm.next_in[-1] & pos; + if (last && clr) + strm.next_in[-1] &= ~pos; + } + else { + /* next last-block bit is in next unused byte */ + if (strm.avail_in == 0) { + /* don't have that byte yet -- get it */ + fwrite(start, 1, strm.next_in - start, out); + start = in->buf; + in->left = 0; + zpull(&strm, in); + } + last = strm.next_in[0] & 1; + if (last && clr) + strm.next_in[0] &= ~1; + } + } + } + + /* update buffer with unused input */ + in->left = strm.avail_in; + in->next = strm.next_in; + + /* copy used input, write empty blocks to get to byte boundary */ + pos = strm.data_type & 7; + fwrite(start, 1, in->next - start - 1, out); + last = in->next[-1]; + if (pos == 0 || !clr) + /* already at byte boundary, or last file: write last byte */ + putc(last, out); + else { + /* append empty blocks to last byte */ + last &= ((0x100 >> pos) - 1); /* assure unused bits are zero */ + if (pos & 1) { + /* odd -- append an empty stored block */ + putc(last, out); + if (pos == 1) + putc(0, out); /* two more bits in block header */ + fwrite("\0\0\xff\xff", 1, 4, out); + } + else { + /* even -- append 1, 2, or 3 empty fixed blocks */ + switch (pos) { + case 6: + putc(last | 8, out); + last = 0; + case 4: + putc(last | 0x20, out); + last = 0; + case 2: + putc(last | 0x80, out); + putc(0, out); + } + } + } + + /* update crc and tot */ + *crc = crc32_combine(*crc, bget4(in), len); + *tot += (unsigned long)len; + + /* clean up */ + inflateEnd(&strm); + free(junk); + bclose(in); + + /* write trailer if this is the last gzip file */ + if (!clr) { + put4(*crc, out); + put4(*tot, out); + } +} + +/* join the gzip files on the command line, write result to stdout */ +int main(int argc, char **argv) +{ + unsigned long crc, tot; /* running crc and total uncompressed length */ + + /* skip command name */ + argc--; + argv++; + + /* show usage if no arguments */ + if (argc == 0) { + fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n", + stderr); + return 0; + } + + /* join gzip files on command line and write to stdout */ + gzinit(&crc, &tot, stdout); + while (argc--) + gzcopy(*argv++, argc, &crc, &tot, stdout); + + /* done */ + return 0; +} diff --git a/compat/zlib/examples/gzlog.c b/compat/zlib/examples/gzlog.c new file mode 100644 index 0000000..f71f817 --- /dev/null +++ b/compat/zlib/examples/gzlog.c @@ -0,0 +1,413 @@ +/* + * gzlog.c + * Copyright (C) 2004 Mark Adler + * For conditions of distribution and use, see copyright notice in gzlog.h + * version 1.0, 26 Nov 2004 + * + */ + +#include /* memcmp() */ +#include /* malloc(), free(), NULL */ +#include /* size_t, off_t */ +#include /* read(), close(), sleep(), ftruncate(), */ + /* lseek() */ +#include /* open() */ +#include /* flock() */ +#include "zlib.h" /* deflateInit2(), deflate(), deflateEnd() */ + +#include "gzlog.h" /* interface */ +#define local static + +/* log object structure */ +typedef struct { + int id; /* object identifier */ + int fd; /* log file descriptor */ + off_t extra; /* offset of extra "ap" subfield */ + off_t mark_off; /* offset of marked data */ + off_t last_off; /* offset of last block */ + unsigned long crc; /* uncompressed crc */ + unsigned long len; /* uncompressed length (modulo 2^32) */ + unsigned stored; /* length of current stored block */ +} gz_log; + +#define GZLOGID 19334 /* gz_log object identifier */ + +#define LOCK_RETRY 1 /* retry lock once a second */ +#define LOCK_PATIENCE 1200 /* try about twenty minutes before forcing */ + +/* acquire a lock on a file */ +local int lock(int fd) +{ + int patience; + + /* try to lock every LOCK_RETRY seconds for LOCK_PATIENCE seconds */ + patience = LOCK_PATIENCE; + do { + if (flock(fd, LOCK_EX + LOCK_NB) == 0) + return 0; + (void)sleep(LOCK_RETRY); + patience -= LOCK_RETRY; + } while (patience > 0); + + /* we've run out of patience -- give up */ + return -1; +} + +/* release lock */ +local void unlock(int fd) +{ + (void)flock(fd, LOCK_UN); +} + +/* release a log object */ +local void log_clean(gz_log *log) +{ + unlock(log->fd); + (void)close(log->fd); + free(log); +} + +/* read an unsigned long from a byte buffer little-endian */ +local unsigned long make_ulg(unsigned char *buf) +{ + int n; + unsigned long val; + + val = (unsigned long)(*buf++); + for (n = 8; n < 32; n += 8) + val += (unsigned long)(*buf++) << n; + return val; +} + +/* read an off_t from a byte buffer little-endian */ +local off_t make_off(unsigned char *buf) +{ + int n; + off_t val; + + val = (off_t)(*buf++); + for (n = 8; n < 64; n += 8) + val += (off_t)(*buf++) << n; + return val; +} + +/* write an unsigned long little-endian to byte buffer */ +local void dice_ulg(unsigned long val, unsigned char *buf) +{ + int n; + + for (n = 0; n < 4; n++) { + *buf++ = val & 0xff; + val >>= 8; + } +} + +/* write an off_t little-endian to byte buffer */ +local void dice_off(off_t val, unsigned char *buf) +{ + int n; + + for (n = 0; n < 8; n++) { + *buf++ = val & 0xff; + val >>= 8; + } +} + +/* initial, empty gzip file for appending */ +local char empty_gz[] = { + 0x1f, 0x8b, /* magic gzip id */ + 8, /* compression method is deflate */ + 4, /* there is an extra field */ + 0, 0, 0, 0, /* no modification time provided */ + 0, 0xff, /* no extra flags, no OS */ + 20, 0, 'a', 'p', 16, 0, /* extra field with "ap" subfield */ + 32, 0, 0, 0, 0, 0, 0, 0, /* offset of uncompressed data */ + 32, 0, 0, 0, 0, 0, 0, 0, /* offset of last block */ + 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */ + 0, 0, 0, 0, /* crc */ + 0, 0, 0, 0 /* uncompressed length */ +}; + +/* initialize a log object with locking */ +void *gzlog_open(char *path) +{ + unsigned xlen; + unsigned char temp[20]; + unsigned sub_len; + int good; + gz_log *log; + + /* allocate log structure */ + log = malloc(sizeof(gz_log)); + if (log == NULL) + return NULL; + log->id = GZLOGID; + + /* open file, creating it if necessary, and locking it */ + log->fd = open(path, O_RDWR | O_CREAT, 0600); + if (log->fd < 0) { + free(log); + return NULL; + } + if (lock(log->fd)) { + close(log->fd); + free(log); + return NULL; + } + + /* if file is empty, write new gzip stream */ + if (lseek(log->fd, 0, SEEK_END) == 0) { + if (write(log->fd, empty_gz, sizeof(empty_gz)) != sizeof(empty_gz)) { + log_clean(log); + return NULL; + } + } + + /* check gzip header */ + (void)lseek(log->fd, 0, SEEK_SET); + if (read(log->fd, temp, 12) != 12 || temp[0] != 0x1f || + temp[1] != 0x8b || temp[2] != 8 || (temp[3] & 4) == 0) { + log_clean(log); + return NULL; + } + + /* process extra field to find "ap" sub-field */ + xlen = temp[10] + (temp[11] << 8); + good = 0; + while (xlen) { + if (xlen < 4 || read(log->fd, temp, 4) != 4) + break; + sub_len = temp[2]; + sub_len += temp[3] << 8; + xlen -= 4; + if (memcmp(temp, "ap", 2) == 0 && sub_len == 16) { + good = 1; + break; + } + if (xlen < sub_len) + break; + (void)lseek(log->fd, sub_len, SEEK_CUR); + xlen -= sub_len; + } + if (!good) { + log_clean(log); + return NULL; + } + + /* read in "ap" sub-field */ + log->extra = lseek(log->fd, 0, SEEK_CUR); + if (read(log->fd, temp, 16) != 16) { + log_clean(log); + return NULL; + } + log->mark_off = make_off(temp); + log->last_off = make_off(temp + 8); + + /* get crc, length of gzip file */ + (void)lseek(log->fd, log->last_off, SEEK_SET); + if (read(log->fd, temp, 13) != 13 || + memcmp(temp, "\001\000\000\377\377", 5) != 0) { + log_clean(log); + return NULL; + } + log->crc = make_ulg(temp + 5); + log->len = make_ulg(temp + 9); + + /* set up to write over empty last block */ + (void)lseek(log->fd, log->last_off + 5, SEEK_SET); + log->stored = 0; + return (void *)log; +} + +/* maximum amount to put in a stored block before starting a new one */ +#define MAX_BLOCK 16384 + +/* write a block to a log object */ +int gzlog_write(void *obj, char *data, size_t len) +{ + size_t some; + unsigned char temp[5]; + gz_log *log; + + /* check object */ + log = (gz_log *)obj; + if (log == NULL || log->id != GZLOGID) + return 1; + + /* write stored blocks until all of the input is written */ + do { + some = MAX_BLOCK - log->stored; + if (some > len) + some = len; + if (write(log->fd, data, some) != some) + return 1; + log->crc = crc32(log->crc, data, some); + log->len += some; + len -= some; + data += some; + log->stored += some; + + /* if the stored block is full, end it and start another */ + if (log->stored == MAX_BLOCK) { + (void)lseek(log->fd, log->last_off, SEEK_SET); + temp[0] = 0; + dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16), + temp + 1); + if (write(log->fd, temp, 5) != 5) + return 1; + log->last_off = lseek(log->fd, log->stored, SEEK_CUR); + (void)lseek(log->fd, 5, SEEK_CUR); + log->stored = 0; + } + } while (len); + return 0; +} + +/* recompress the remaining stored deflate data in place */ +local int recomp(gz_log *log) +{ + z_stream strm; + size_t len, max; + unsigned char *in; + unsigned char *out; + unsigned char temp[16]; + + /* allocate space and read it all in (it's around 1 MB) */ + len = log->last_off - log->mark_off; + max = len + (len >> 12) + (len >> 14) + 11; + out = malloc(max); + if (out == NULL) + return 1; + in = malloc(len); + if (in == NULL) { + free(out); + return 1; + } + (void)lseek(log->fd, log->mark_off, SEEK_SET); + if (read(log->fd, in, len) != len) { + free(in); + free(out); + return 1; + } + + /* recompress in memory, decoding stored data as we go */ + /* note: this assumes that unsigned is four bytes or more */ + /* consider not making that assumption */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + if (deflateInit2(&strm, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 8, + Z_DEFAULT_STRATEGY) != Z_OK) { + free(in); + free(out); + return 1; + } + strm.next_in = in; + strm.avail_out = max; + strm.next_out = out; + while (len >= 5) { + if (strm.next_in[0] != 0) + break; + strm.avail_in = strm.next_in[1] + (strm.next_in[2] << 8); + strm.next_in += 5; + len -= 5; + if (strm.avail_in != 0) { + if (len < strm.avail_in) + break; + len -= strm.avail_in; + (void)deflate(&strm, Z_NO_FLUSH); + if (strm.avail_in != 0 || strm.avail_out == 0) + break; + } + } + (void)deflate(&strm, Z_SYNC_FLUSH); + (void)deflateEnd(&strm); + free(in); + if (len != 0 || strm.avail_out == 0) { + free(out); + return 1; + } + + /* overwrite stored data with compressed data */ + (void)lseek(log->fd, log->mark_off, SEEK_SET); + len = max - strm.avail_out; + if (write(log->fd, out, len) != len) { + free(out); + return 1; + } + free(out); + + /* write last empty block, crc, and length */ + log->mark_off = log->last_off = lseek(log->fd, 0, SEEK_CUR); + temp[0] = 1; + dice_ulg(0xffffL << 16, temp + 1); + dice_ulg(log->crc, temp + 5); + dice_ulg(log->len, temp + 9); + if (write(log->fd, temp, 13) != 13) + return 1; + + /* truncate file to discard remaining stored data and old trailer */ + ftruncate(log->fd, lseek(log->fd, 0, SEEK_CUR)); + + /* update extra field to point to new last empty block */ + (void)lseek(log->fd, log->extra, SEEK_SET); + dice_off(log->mark_off, temp); + dice_off(log->last_off, temp + 8); + if (write(log->fd, temp, 16) != 16) + return 1; + return 0; +} + +/* maximum accumulation of stored blocks before compressing */ +#define MAX_STORED 1048576 + +/* close log object */ +int gzlog_close(void *obj) +{ + unsigned char temp[8]; + gz_log *log; + + /* check object */ + log = (gz_log *)obj; + if (log == NULL || log->id != GZLOGID) + return 1; + + /* go to start of most recent block being written */ + (void)lseek(log->fd, log->last_off, SEEK_SET); + + /* if some stuff was put there, update block */ + if (log->stored) { + temp[0] = 0; + dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16), + temp + 1); + if (write(log->fd, temp, 5) != 5) + return 1; + log->last_off = lseek(log->fd, log->stored, SEEK_CUR); + } + + /* write last block (empty) */ + if (write(log->fd, "\001\000\000\377\377", 5) != 5) + return 1; + + /* write updated crc and uncompressed length */ + dice_ulg(log->crc, temp); + dice_ulg(log->len, temp + 4); + if (write(log->fd, temp, 8) != 8) + return 1; + + /* put offset of that last block in gzip extra block */ + (void)lseek(log->fd, log->extra + 8, SEEK_SET); + dice_off(log->last_off, temp); + if (write(log->fd, temp, 8) != 8) + return 1; + + /* if more than 1 MB stored, then time to compress it */ + if (log->last_off - log->mark_off > MAX_STORED) { + if (recomp(log)) + return 1; + } + + /* unlock and close file */ + log_clean(log); + return 0; +} diff --git a/compat/zlib/examples/gzlog.h b/compat/zlib/examples/gzlog.h new file mode 100644 index 0000000..a800bd5 --- /dev/null +++ b/compat/zlib/examples/gzlog.h @@ -0,0 +1,58 @@ +/* gzlog.h + Copyright (C) 2004 Mark Adler, all rights reserved + version 1.0, 26 Nov 2004 + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Mark Adler madler@alumni.caltech.edu + */ + +/* + The gzlog object allows writing short messages to a gzipped log file, + opening the log file locked for small bursts, and then closing it. The log + object works by appending stored data to the gzip file until 1 MB has been + accumulated. At that time, the stored data is compressed, and replaces the + uncompressed data in the file. The log file is truncated to its new size at + that time. After closing, the log file is always valid gzip file that can + decompressed to recover what was written. + + A gzip header "extra" field contains two file offsets for appending. The + first points to just after the last compressed data. The second points to + the last stored block in the deflate stream, which is empty. All of the + data between those pointers is uncompressed. + */ + +/* Open a gzlog object, creating the log file if it does not exist. Return + NULL on error. Note that gzlog_open() could take a long time to return if + there is difficulty in locking the file. */ +void *gzlog_open(char *path); + +/* Write to a gzlog object. Return non-zero on error. This function will + simply write data to the file uncompressed. Compression of the data + will not occur until gzlog_close() is called. It is expected that + gzlog_write() is used for a short message, and then gzlog_close() is + called. If a large amount of data is to be written, then the application + should write no more than 1 MB at a time with gzlog_write() before + calling gzlog_close() and then gzlog_open() again. */ +int gzlog_write(void *log, char *data, size_t len); + +/* Close a gzlog object. Return non-zero on error. The log file is locked + until this function is called. This function will compress stored data + at the end of the gzip file if at least 1 MB has been accumulated. Note + that the file will not be a valid gzip file until this function completes. + */ +int gzlog_close(void *log); diff --git a/compat/zlib/examples/zlib_how.html b/compat/zlib/examples/zlib_how.html new file mode 100644 index 0000000..40998db --- /dev/null +++ b/compat/zlib/examples/zlib_how.html @@ -0,0 +1,523 @@ + + + + +zlib Usage Example + + + +

zlib Usage Example

+We often get questions about how the deflate() and inflate() functions should be used. +Users wonder when they should provide more input, when they should use more output, +what to do with a Z_BUF_ERROR, how to make sure the process terminates properly, and +so on. So for those who have read zlib.h (a few times), and +would like further edification, below is an annotated example in C of simple routines to compress and decompress +from an input file to an output file using deflate() and inflate() respectively. The +annotations are interspersed between lines of the code. So please read between the lines. +We hope this helps explain some of the intricacies of zlib. +

+Without further adieu, here is the program zpipe.c: +


+/* zpipe.c: example of proper use of zlib's inflate() and deflate()
+   Not copyrighted -- provided to the public domain
+   Version 1.2  9 November 2004  Mark Adler */
+
+/* Version history:
+   1.0  30 Oct 2004  First version
+   1.1   8 Nov 2004  Add void casting for unused return values
+                     Use switch statement for inflate() return values
+   1.2   9 Nov 2004  Add assertions to document zlib guarantees
+ */
+
+We now include the header files for the required definitions. From +stdio.h we use fopen(), fread(), fwrite(), +feof(), ferror(), and fclose() for file i/o, and +fputs() for error messages. From string.h we use +strcmp() for command line argument processing. +From assert.h we use the assert() macro. +From zlib.h +we use the basic compression functions deflateInit(), +deflate(), and deflateEnd(), and the basic decompression +functions inflateInit(), inflate(), and +inflateEnd(). +

+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "zlib.h"
+
+CHUNK is simply the buffer size for feeding data to and pulling data +from the zlib routines. Larger buffer sizes would be more efficient, +especially for inflate(). If the memory is available, buffers sizes +on the order of 128K or 256K bytes should be used. +

+#define CHUNK 16384
+
+The def() routine compresses data from an input file to an output file. The output data +will be in the zlib format, which is different from the gzip or zip +formats. The zlib format has a very small header of only two bytes to identify it as +a zlib stream and to provide decoding information, and a four-byte trailer with a fast +check value to verify the integrity of the uncompressed data after decoding. +

+/* Compress from file source to file dest until EOF on source.
+   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
+   allocated for processing, Z_STREAM_ERROR if an invalid compression
+   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
+   version of the library linked do not match, or Z_ERRNO if there is
+   an error reading or writing the files. */
+int def(FILE *source, FILE *dest, int level)
+{
+
+Here are the local variables for def(). ret will be used for zlib +return codes. flush will keep track of the current flushing state for deflate(), +which is either no flushing, or flush to completion after the end of the input file is reached. +have is the amount of data returned from deflate(). The strm structure +is used to pass information to and from the zlib routines, and to maintain the +deflate() state. in and out are the input and output buffers for +deflate(). +

+    int ret, flush;
+    unsigned have;
+    z_stream strm;
+    char in[CHUNK];
+    char out[CHUNK];
+
+The first thing we do is to initialize the zlib state for compression using +deflateInit(). This must be done before the first use of deflate(). +The zalloc, zfree, and opaque fields in the strm +structure must be initialized before calling deflateInit(). Here they are +set to the zlib constant Z_NULL to request that zlib use +the default memory allocation routines. An application may also choose to provide +custom memory allocation routines here. deflateInit() will allocate on the +order of 256K bytes for the internal state. +(See zlib Technical Details.) +

+deflateInit() is called with a pointer to the structure to be initialized and +the compression level, which is an integer in the range of -1 to 9. Lower compression +levels result in faster execution, but less compression. Higher levels result in +greater compression, but slower execution. The zlib constant Z_DEFAULT_COMPRESSION, +equal to -1, +provides a good compromise between compression and speed and is equivalent to level 6. +Level 0 actually does no compression at all, and in fact expands the data slightly to produce +the zlib format (it is not a byte-for-byte copy of the input). +More advanced applications of zlib +may use deflateInit2() here instead. Such an application may want to reduce how +much memory will be used, at some price in compression. Or it may need to request a +gzip header and trailer instead of a zlib header and trailer, or raw +encoding with no header or trailer at all. +

+We must check the return value of deflateInit() against the zlib constant +Z_OK to make sure that it was able to +allocate memory for the internal state, and that the provided arguments were valid. +deflateInit() will also check that the version of zlib that the zlib.h +file came from matches the version of zlib actually linked with the program. This +is especially important for environments in which zlib is a shared library. +

+Note that an application can initialize multiple, independent zlib streams, which can +operate in parallel. The state information maintained in the structure allows the zlib +routines to be reentrant. +


+    /* allocate deflate state */
+    strm.zalloc = Z_NULL;
+    strm.zfree = Z_NULL;
+    strm.opaque = Z_NULL;
+    ret = deflateInit(&strm, level);
+    if (ret != Z_OK)
+        return ret;
+
+With the pleasantries out of the way, now we can get down to business. The outer do-loop +reads all of the input file and exits at the bottom of the loop once end-of-file is reached. +This loop contains the only call of deflate(). So we must make sure that all of the +input data has been processed and that all of the output data has been generated and consumed +before we fall out of the loop at the bottom. +

+    /* compress until end of file */
+    do {
+
+We start off by reading data from the input file. The number of bytes read is put directly +into avail_in, and a pointer to those bytes is put into next_in. We also +check to see if end-of-file on the input has been reached. If we are at the end of file, then flush is set to the +zlib constant Z_FINISH, which is later passed to deflate() to +indicate that this is the last chunk of input data to compress. We need to use feof() +to check for end-of-file as opposed to seeing if fewer than CHUNK bytes have been read. The +reason is that if the input file length is an exact multiple of CHUNK, we will miss +the fact that we got to the end-of-file, and not know to tell deflate() to finish +up the compressed stream. If we are not yet at the end of the input, then the zlib +constant Z_NO_FLUSH will be passed to deflate to indicate that we are still +in the middle of the uncompressed data. +

+If there is an error in reading from the input file, the process is aborted with +deflateEnd() being called to free the allocated zlib state before returning +the error. We wouldn't want a memory leak, now would we? deflateEnd() can be called +at any time after the state has been initialized. Once that's done, deflateInit() (or +deflateInit2()) would have to be called to start a new compression process. There is +no point here in checking the deflateEnd() return code. The deallocation can't fail. +


+        strm.avail_in = fread(in, 1, CHUNK, source);
+        if (ferror(source)) {
+            (void)deflateEnd(&strm);
+            return Z_ERRNO;
+        }
+        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
+        strm.next_in = in;
+
+The inner do-loop passes our chunk of input data to deflate(), and then +keeps calling deflate() until it is done producing output. Once there is no more +new output, deflate() is guaranteed to have consumed all of the input, i.e., +avail_in will be zero. +

+        /* run deflate() on input until output buffer not full, finish
+           compression if all of source has been read in */
+        do {
+
+Output space is provided to deflate() by setting avail_out to the number +of available output bytes and next_out to a pointer to that space. +

+            strm.avail_out = CHUNK;
+            strm.next_out = out;
+
+Now we call the compression engine itself, deflate(). It takes as many of the +avail_in bytes at next_in as it can process, and writes as many as +avail_out bytes to next_out. Those counters and pointers are then +updated past the input data consumed and the output data written. It is the amount of +output space available that may limit how much input is consumed. +Hence the inner loop to make sure that +all of the input is consumed by providing more output space each time. Since avail_in +and next_in are updated by deflate(), we don't have to mess with those +between deflate() calls until it's all used up. +

+The parameters to deflate() are a pointer to the strm structure containing +the input and output information and the internal compression engine state, and a parameter +indicating whether and how to flush data to the output. Normally deflate will consume +several K bytes of input data before producing any output (except for the header), in order +to accumulate statistics on the data for optimum compression. It will then put out a burst of +compressed data, and proceed to consume more input before the next burst. Eventually, +deflate() +must be told to terminate the stream, complete the compression with provided input data, and +write out the trailer check value. deflate() will continue to compress normally as long +as the flush parameter is Z_NO_FLUSH. Once the Z_FINISH parameter is provided, +deflate() will begin to complete the compressed output stream. However depending on how +much output space is provided, deflate() may have to be called several times until it +has provided the complete compressed stream, even after it has consumed all of the input. The flush +parameter must continue to be Z_FINISH for those subsequent calls. +

+There are other values of the flush parameter that are used in more advanced applications. You can +force deflate() to produce a burst of output that encodes all of the input data provided +so far, even if it wouldn't have otherwise, for example to control data latency on a link with +compressed data. You can also ask that deflate() do that as well as erase any history up to +that point so that what follows can be decompressed independently, for example for random access +applications. Both requests will degrade compression by an amount depending on how often such +requests are made. +

+deflate() has a return value that can indicate errors, yet we do not check it here. Why +not? Well, it turns out that deflate() can do no wrong here. Let's go through +deflate()'s return values and dispense with them one by one. The possible values are +Z_OK, Z_STREAM_END, Z_STREAM_ERROR, or Z_BUF_ERROR. Z_OK +is, well, ok. Z_STREAM_END is also ok and will be returned for the last call of +deflate(). This is already guaranteed by calling deflate() with Z_FINISH +until it has no more output. Z_STREAM_ERROR is only possible if the stream is not +initialized properly, but we did initialize it properly. There is no harm in checking for +Z_STREAM_ERROR here, for example to check for the possibility that some +other part of the application inadvertently clobbered the memory containing the zlib state. +Z_BUF_ERROR will be explained further below, but +suffice it to say that this is simply an indication that deflate() could not consume +more input or produce more output. deflate() can be called again with more output space +or more available input, which it will be in this code. +


+            ret = deflate(&strm, flush);    /* no bad return value */
+            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
+
+Now we compute how much output deflate() provided on the last call, which is the +difference between how much space was provided before the call, and how much output space +is still available after the call. Then that data, if any, is written to the output file. +We can then reuse the output buffer for the next call of deflate(). Again if there +is a file i/o error, we call deflateEnd() before returning to avoid a memory leak. +

+            have = CHUNK - strm.avail_out;
+            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
+                (void)deflateEnd(&strm);
+                return Z_ERRNO;
+            }
+
+The inner do-loop is repeated until the last deflate() call fails to fill the +provided output buffer. Then we know that deflate() has done as much as it can with +the provided input, and that all of that input has been consumed. We can then fall out of this +loop and reuse the input buffer. +

+The way we tell that deflate() has no more output is by seeing that it did not fill +the output buffer, leaving avail_out greater than zero. However suppose that +deflate() has no more output, but just so happened to exactly fill the output buffer! +avail_out is zero, and we can't tell that deflate() has done all it can. +As far as we know, deflate() +has more output for us. So we call it again. But now deflate() produces no output +at all, and avail_out remains unchanged as CHUNK. That deflate() call +wasn't able to do anything, either consume input or produce output, and so it returns +Z_BUF_ERROR. (See, I told you I'd cover this later.) However this is not a problem at +all. Now we finally have the desired indication that deflate() is really done, +and so we drop out of the inner loop to provide more input to deflate(). +

+With flush set to Z_FINISH, this final set of deflate() calls will +complete the output stream. Once that is done, subsequent calls of deflate() would return +Z_STREAM_ERROR if the flush parameter is not Z_FINISH, and do no more processing +until the state is reinitialized. +

+Some applications of zlib have two loops that call deflate() +instead of the single inner loop we have here. The first loop would call +without flushing and feed all of the data to deflate(). The second loop would call +deflate() with no more +data and the Z_FINISH parameter to complete the process. As you can see from this +example, that can be avoided by simply keeping track of the current flush state. +


+        } while (strm.avail_out == 0);
+        assert(strm.avail_in == 0);     /* all input will be used */
+
+Now we check to see if we have already processed all of the input file. That information was +saved in the flush variable, so we see if that was set to Z_FINISH. If so, +then we're done and we fall out of the outer loop. We're guaranteed to get Z_STREAM_END +from the last deflate() call, since we ran it until the last chunk of input was +consumed and all of the output was generated. +

+        /* done when last data in file processed */
+    } while (flush != Z_FINISH);
+    assert(ret == Z_STREAM_END);        /* stream will be complete */
+
+The process is complete, but we still need to deallocate the state to avoid a memory leak +(or rather more like a memory hemorrhage if you didn't do this). Then +finally we can return with a happy return value. +

+    /* clean up and return */
+    (void)deflateEnd(&strm);
+    return Z_OK;
+}
+
+Now we do the same thing for decompression in the inf() routine. inf() +decompresses what is hopefully a valid zlib stream from the input file and writes the +uncompressed data to the output file. Much of the discussion above for def() +applies to inf() as well, so the discussion here will focus on the differences between +the two. +

+/* Decompress from file source to file dest until stream ends or EOF.
+   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
+   allocated for processing, Z_DATA_ERROR if the deflate data is
+   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
+   the version of the library linked do not match, or Z_ERRNO if there
+   is an error reading or writing the files. */
+int inf(FILE *source, FILE *dest)
+{
+
+The local variables have the same functionality as they do for def(). The +only difference is that there is no flush variable, since inflate() +can tell from the zlib stream itself when the stream is complete. +

+    int ret;
+    unsigned have;
+    z_stream strm;
+    char in[CHUNK];
+    char out[CHUNK];
+
+The initialization of the state is the same, except that there is no compression level, +of course, and two more elements of the structure are initialized. avail_in +and next_in must be initialized before calling inflateInit(). This +is because the application has the option to provide the start of the zlib stream in +order for inflateInit() to have access to information about the compression +method to aid in memory allocation. In the current implementation of zlib +(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of +inflate() anyway. However those fields must be initialized since later versions +of zlib that provide more compression methods may take advantage of this interface. +In any case, no decompression is performed by inflateInit(), so the +avail_out and next_out fields do not need to be initialized before calling. +

+Here avail_in is set to zero and next_in is set to Z_NULL to +indicate that no input data is being provided. +


+    /* allocate inflate state */
+    strm.zalloc = Z_NULL;
+    strm.zfree = Z_NULL;
+    strm.opaque = Z_NULL;
+    strm.avail_in = 0;
+    strm.next_in = Z_NULL;
+    ret = inflateInit(&strm);
+    if (ret != Z_OK)
+        return ret;
+
+The outer do-loop decompresses input until inflate() indicates +that it has reached the end of the compressed data and has produced all of the uncompressed +output. This is in contrast to def() which processes all of the input file. +If end-of-file is reached before the compressed data self-terminates, then the compressed +data is incomplete and an error is returned. +

+    /* decompress until deflate stream ends or end of file */
+    do {
+
+We read input data and set the strm structure accordingly. If we've reached the +end of the input file, then we leave the outer loop and report an error, since the +compressed data is incomplete. Note that we may read more data than is eventually consumed +by inflate(), if the input file continues past the zlib stream. +For applications where zlib streams are embedded in other data, this routine would +need to be modified to return the unused data, or at least indicate how much of the input +data was not used, so the application would know where to pick up after the zlib stream. +

+        strm.avail_in = fread(in, 1, CHUNK, source);
+        if (ferror(source)) {
+            (void)inflateEnd(&strm);
+            return Z_ERRNO;
+        }
+        if (strm.avail_in == 0)
+            break;
+        strm.next_in = in;
+
+The inner do-loop has the same function it did in def(), which is to +keep calling inflate() until has generated all of the output it can with the +provided input. +

+        /* run inflate() on input until output buffer not full */
+        do {
+
+Just like in def(), the same output space is provided for each call of inflate(). +

+            strm.avail_out = CHUNK;
+            strm.next_out = out;
+
+Now we run the decompression engine itself. There is no need to adjust the flush parameter, since +the zlib format is self-terminating. The main difference here is that there are +return values that we need to pay attention to. Z_DATA_ERROR +indicates that inflate() detected an error in the zlib compressed data format, +which means that either the data is not a zlib stream to begin with, or that the data was +corrupted somewhere along the way since it was compressed. The other error to be processed is +Z_MEM_ERROR, which can occur since memory allocation is deferred until inflate() +needs it, unlike deflate(), whose memory is allocated at the start by deflateInit(). +

+Advanced applications may use +deflateSetDictionary() to prime deflate() with a set of likely data to improve the +first 32K or so of compression. This is noted in the zlib header, so inflate() +requests that that dictionary be provided before it can start to decompress. Without the dictionary, +correct decompression is not possible. For this routine, we have no idea what the dictionary is, +so the Z_NEED_DICT indication is converted to a Z_DATA_ERROR. +

+inflate() can also return Z_STREAM_ERROR, which should not be possible here, +but could be checked for as noted above for def(). Z_BUF_ERROR does not need to be +checked for here, for the same reasons noted for def(). Z_STREAM_END will be +checked for later. +


+            ret = inflate(&strm, Z_NO_FLUSH);
+            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
+            switch (ret) {
+            case Z_NEED_DICT:
+                ret = Z_DATA_ERROR;     /* and fall through */
+            case Z_DATA_ERROR:
+            case Z_MEM_ERROR:
+                (void)inflateEnd(&strm);
+                return ret;
+            }
+
+The output of inflate() is handled identically to that of deflate(). +

+            have = CHUNK - strm.avail_out;
+            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
+                (void)inflateEnd(&strm);
+                return Z_ERRNO;
+            }
+
+The inner do-loop ends when inflate() has no more output as indicated +by not filling the output buffer, just as for deflate(). In this case, we cannot +assert that strm.avail_in will be zero, since the deflate stream may end before the file +does. +

+        } while (strm.avail_out == 0);
+
+The outer do-loop ends when inflate() reports that it has reached the +end of the input zlib stream, has completed the decompression and integrity +check, and has provided all of the output. This is indicated by the inflate() +return value Z_STREAM_END. The inner loop is guaranteed to leave ret +equal to Z_STREAM_END if the last chunk of the input file read contained the end +of the zlib stream. So if the return value is not Z_STREAM_END, the +loop continues to read more input. +

+        /* done when inflate() says it's done */
+    } while (ret != Z_STREAM_END);
+
+At this point, decompression successfully completed, or we broke out of the loop due to no +more data being available from the input file. If the last inflate() return value +is not Z_STREAM_END, then the zlib stream was incomplete and a data error +is returned. Otherwise, we return with a happy return value. Of course, inflateEnd() +is called first to avoid a memory leak. +

+    /* clean up and return */
+    (void)inflateEnd(&strm);
+    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
+}
+
+That ends the routines that directly use zlib. The following routines make this +a command-line program by running data through the above routines from stdin to +stdout, and handling any errors reported by def() or inf(). +

+zerr() is used to interpret the possible error codes from def() +and inf(), as detailed in their comments above, and print out an error message. +Note that these are only a subset of the possible return values from deflate() +and inflate(). +


+/* report a zlib or i/o error */
+void zerr(int ret)
+{
+    fputs("zpipe: ", stderr);
+    switch (ret) {
+    case Z_ERRNO:
+        if (ferror(stdin))
+            fputs("error reading stdin\n", stderr);
+        if (ferror(stdout))
+            fputs("error writing stdout\n", stderr);
+        break;
+    case Z_STREAM_ERROR:
+        fputs("invalid compression level\n", stderr);
+        break;
+    case Z_DATA_ERROR:
+        fputs("invalid or incomplete deflate data\n", stderr);
+        break;
+    case Z_MEM_ERROR:
+        fputs("out of memory\n", stderr);
+        break;
+    case Z_VERSION_ERROR:
+        fputs("zlib version mismatch!\n", stderr);
+    }
+}
+
+Here is the main() routine used to test def() and inf(). The +zpipe command is simply a compression pipe from stdin to stdout, if +no arguments are given, or it is a decompression pipe if zpipe -d is used. If any other +arguments are provided, no compression or decompression is performed. Instead a usage +message is displayed. Examples are zpipe < foo.txt > foo.txt.z to compress, and +zpipe -d < foo.txt.z > foo.txt to decompress. +

+/* compress or decompress from stdin to stdout */
+int main(int argc, char **argv)
+{
+    int ret;
+
+    /* do compression if no arguments */
+    if (argc == 1) {
+        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
+        if (ret != Z_OK)
+            zerr(ret);
+        return ret;
+    }
+
+    /* do decompression if -d specified */
+    else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
+        ret = inf(stdin, stdout);
+        if (ret != Z_OK)
+            zerr(ret);
+        return ret;
+    }
+
+    /* otherwise, report usage */
+    else {
+        fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
+        return 1;
+    }
+}
+
+
+Copyright (c) 2004 by Mark Adler
Last modified 13 November 2004
+ + diff --git a/compat/zlib/examples/zpipe.c b/compat/zlib/examples/zpipe.c new file mode 100644 index 0000000..26abb56 --- /dev/null +++ b/compat/zlib/examples/zpipe.c @@ -0,0 +1,191 @@ +/* zpipe.c: example of proper use of zlib's inflate() and deflate() + Not copyrighted -- provided to the public domain + Version 1.2 9 November 2004 Mark Adler */ + +/* Version history: + 1.0 30 Oct 2004 First version + 1.1 8 Nov 2004 Add void casting for unused return values + Use switch statement for inflate() return values + 1.2 9 Nov 2004 Add assertions to document zlib guarantees + 1.3 6 Apr 2005 Remove incorrect assertion in inf() + */ + +#include +#include +#include +#include "zlib.h" + +#define CHUNK 16384 + +/* Compress from file source to file dest until EOF on source. + def() returns Z_OK on success, Z_MEM_ERROR if memory could not be + allocated for processing, Z_STREAM_ERROR if an invalid compression + level is supplied, Z_VERSION_ERROR if the version of zlib.h and the + version of the library linked do not match, or Z_ERRNO if there is + an error reading or writing the files. */ +int def(FILE *source, FILE *dest, int level) +{ + int ret, flush; + unsigned have; + z_stream strm; + char in[CHUNK]; + char out[CHUNK]; + + /* allocate deflate state */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + ret = deflateInit(&strm, level); + if (ret != Z_OK) + return ret; + + /* compress until end of file */ + do { + strm.avail_in = fread(in, 1, CHUNK, source); + if (ferror(source)) { + (void)deflateEnd(&strm); + return Z_ERRNO; + } + flush = feof(source) ? Z_FINISH : Z_NO_FLUSH; + strm.next_in = in; + + /* run deflate() on input until output buffer not full, finish + compression if all of source has been read in */ + do { + strm.avail_out = CHUNK; + strm.next_out = out; + ret = deflate(&strm, flush); /* no bad return value */ + assert(ret != Z_STREAM_ERROR); /* state not clobbered */ + have = CHUNK - strm.avail_out; + if (fwrite(out, 1, have, dest) != have || ferror(dest)) { + (void)deflateEnd(&strm); + return Z_ERRNO; + } + } while (strm.avail_out == 0); + assert(strm.avail_in == 0); /* all input will be used */ + + /* done when last data in file processed */ + } while (flush != Z_FINISH); + assert(ret == Z_STREAM_END); /* stream will be complete */ + + /* clean up and return */ + (void)deflateEnd(&strm); + return Z_OK; +} + +/* Decompress from file source to file dest until stream ends or EOF. + inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be + allocated for processing, Z_DATA_ERROR if the deflate data is + invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and + the version of the library linked do not match, or Z_ERRNO if there + is an error reading or writing the files. */ +int inf(FILE *source, FILE *dest) +{ + int ret; + unsigned have; + z_stream strm; + char in[CHUNK]; + char out[CHUNK]; + + /* allocate inflate state */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit(&strm); + if (ret != Z_OK) + return ret; + + /* decompress until deflate stream ends or end of file */ + do { + strm.avail_in = fread(in, 1, CHUNK, source); + if (ferror(source)) { + (void)inflateEnd(&strm); + return Z_ERRNO; + } + if (strm.avail_in == 0) + break; + strm.next_in = in; + + /* run inflate() on input until output buffer not full */ + do { + strm.avail_out = CHUNK; + strm.next_out = out; + ret = inflate(&strm, Z_NO_FLUSH); + assert(ret != Z_STREAM_ERROR); /* state not clobbered */ + switch (ret) { + case Z_NEED_DICT: + ret = Z_DATA_ERROR; /* and fall through */ + case Z_DATA_ERROR: + case Z_MEM_ERROR: + (void)inflateEnd(&strm); + return ret; + } + have = CHUNK - strm.avail_out; + if (fwrite(out, 1, have, dest) != have || ferror(dest)) { + (void)inflateEnd(&strm); + return Z_ERRNO; + } + } while (strm.avail_out == 0); + + /* done when inflate() says it's done */ + } while (ret != Z_STREAM_END); + + /* clean up and return */ + (void)inflateEnd(&strm); + return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; +} + +/* report a zlib or i/o error */ +void zerr(int ret) +{ + fputs("zpipe: ", stderr); + switch (ret) { + case Z_ERRNO: + if (ferror(stdin)) + fputs("error reading stdin\n", stderr); + if (ferror(stdout)) + fputs("error writing stdout\n", stderr); + break; + case Z_STREAM_ERROR: + fputs("invalid compression level\n", stderr); + break; + case Z_DATA_ERROR: + fputs("invalid or incomplete deflate data\n", stderr); + break; + case Z_MEM_ERROR: + fputs("out of memory\n", stderr); + break; + case Z_VERSION_ERROR: + fputs("zlib version mismatch!\n", stderr); + } +} + +/* compress or decompress from stdin to stdout */ +int main(int argc, char **argv) +{ + int ret; + + /* do compression if no arguments */ + if (argc == 1) { + ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); + if (ret != Z_OK) + zerr(ret); + return ret; + } + + /* do decompression if -d specified */ + else if (argc == 2 && strcmp(argv[1], "-d") == 0) { + ret = inf(stdin, stdout); + if (ret != Z_OK) + zerr(ret); + return ret; + } + + /* otherwise, report usage */ + else { + fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr); + return 1; + } +} diff --git a/compat/zlib/examples/zran.c b/compat/zlib/examples/zran.c new file mode 100644 index 0000000..8c7717e --- /dev/null +++ b/compat/zlib/examples/zran.c @@ -0,0 +1,404 @@ +/* zran.c -- example of zlib/gzip stream indexing and random access + * Copyright (C) 2005 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + Version 1.0 29 May 2005 Mark Adler */ + +/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary() + for random access of a compressed file. A file containing a zlib or gzip + stream is provided on the command line. The compressed stream is decoded in + its entirety, and an index built with access points about every SPAN bytes + in the uncompressed output. The compressed file is left open, and can then + be read randomly, having to decompress on the average SPAN/2 uncompressed + bytes before getting to the desired block of data. + + An access point can be created at the start of any deflate block, by saving + the starting file offset and bit of that block, and the 32K bytes of + uncompressed data that precede that block. Also the uncompressed offset of + that block is saved to provide a referece for locating a desired starting + point in the uncompressed stream. build_index() works by decompressing the + input zlib or gzip stream a block at a time, and at the end of each block + deciding if enough uncompressed data has gone by to justify the creation of + a new access point. If so, that point is saved in a data structure that + grows as needed to accommodate the points. + + To use the index, an offset in the uncompressed data is provided, for which + the latest accees point at or preceding that offset is located in the index. + The input file is positioned to the specified location in the index, and if + necessary the first few bits of the compressed data is read from the file. + inflate is initialized with those bits and the 32K of uncompressed data, and + the decompression then proceeds until the desired offset in the file is + reached. Then the decompression continues to read the desired uncompressed + data from the file. + + Another approach would be to generate the index on demand. In that case, + requests for random access reads from the compressed data would try to use + the index, but if a read far enough past the end of the index is required, + then further index entries would be generated and added. + + There is some fair bit of overhead to starting inflation for the random + access, mainly copying the 32K byte dictionary. So if small pieces of the + file are being accessed, it would make sense to implement a cache to hold + some lookahead and avoid many calls to extract() for small lengths. + + Another way to build an index would be to use inflateCopy(). That would + not be constrained to have access points at block boundaries, but requires + more memory per access point, and also cannot be saved to file due to the + use of pointers in the state. The approach here allows for storage of the + index in a file. + */ + +#include +#include +#include +#include "zlib.h" + +#define local static + +#define SPAN 1048576L /* desired distance between access points */ +#define WINSIZE 32768U /* sliding window size */ +#define CHUNK 16384 /* file input buffer size */ + +/* access point entry */ +struct point { + off_t out; /* corresponding offset in uncompressed data */ + off_t in; /* offset in input file of first full byte */ + int bits; /* number of bits (1-7) from byte at in - 1, or 0 */ + unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */ +}; + +/* access point list */ +struct access { + int have; /* number of list entries filled in */ + int size; /* number of list entries allocated */ + struct point *list; /* allocated list */ +}; + +/* Deallocate an index built by build_index() */ +local void free_index(struct access *index) +{ + if (index != NULL) { + free(index->list); + free(index); + } +} + +/* Add an entry to the access point list. If out of memory, deallocate the + existing list and return NULL. */ +local struct access *addpoint(struct access *index, int bits, + off_t in, off_t out, unsigned left, unsigned char *window) +{ + struct point *next; + + /* if list is empty, create it (start with eight points) */ + if (index == NULL) { + index = malloc(sizeof(struct access)); + if (index == NULL) return NULL; + index->list = malloc(sizeof(struct point) << 3); + if (index->list == NULL) { + free(index); + return NULL; + } + index->size = 8; + index->have = 0; + } + + /* if list is full, make it bigger */ + else if (index->have == index->size) { + index->size <<= 1; + next = realloc(index->list, sizeof(struct point) * index->size); + if (next == NULL) { + free_index(index); + return NULL; + } + index->list = next; + } + + /* fill in entry and increment how many we have */ + next = index->list + index->have; + next->bits = bits; + next->in = in; + next->out = out; + if (left) + memcpy(next->window, window + WINSIZE - left, left); + if (left < WINSIZE) + memcpy(next->window + left, window, WINSIZE - left); + index->have++; + + /* return list, possibly reallocated */ + return index; +} + +/* Make one entire pass through the compressed stream and build an index, with + access points about every span bytes of uncompressed output -- span is + chosen to balance the speed of random access against the memory requirements + of the list, about 32K bytes per access point. Note that data after the end + of the first zlib or gzip stream in the file is ignored. build_index() + returns the number of access points on success (>= 1), Z_MEM_ERROR for out + of memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a + file read error. On success, *built points to the resulting index. */ +local int build_index(FILE *in, off_t span, struct access **built) +{ + int ret; + off_t totin, totout; /* our own total counters to avoid 4GB limit */ + off_t last; /* totout value of last access point */ + struct access *index; /* access points being generated */ + z_stream strm; + unsigned char input[CHUNK]; + unsigned char window[WINSIZE]; + + /* initialize inflate */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, 47); /* automatic zlib or gzip decoding */ + if (ret != Z_OK) + return ret; + + /* inflate the input, maintain a sliding window, and build an index -- this + also validates the integrity of the compressed data using the check + information at the end of the gzip or zlib stream */ + totin = totout = last = 0; + index = NULL; /* will be allocated by first addpoint() */ + strm.avail_out = 0; + do { + /* get some compressed data from input file */ + strm.avail_in = fread(input, 1, CHUNK, in); + if (ferror(in)) { + ret = Z_ERRNO; + goto build_index_error; + } + if (strm.avail_in == 0) { + ret = Z_DATA_ERROR; + goto build_index_error; + } + strm.next_in = input; + + /* process all of that, or until end of stream */ + do { + /* reset sliding window if necessary */ + if (strm.avail_out == 0) { + strm.avail_out = WINSIZE; + strm.next_out = window; + } + + /* inflate until out of input, output, or at end of block -- + update the total input and output counters */ + totin += strm.avail_in; + totout += strm.avail_out; + ret = inflate(&strm, Z_BLOCK); /* return at end of block */ + totin -= strm.avail_in; + totout -= strm.avail_out; + if (ret == Z_NEED_DICT) + ret = Z_DATA_ERROR; + if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) + goto build_index_error; + if (ret == Z_STREAM_END) + break; + + /* if at end of block, consider adding an index entry (note that if + data_type indicates an end-of-block, then all of the + uncompressed data from that block has been delivered, and none + of the compressed data after that block has been consumed, + except for up to seven bits) -- the totout == 0 provides an + entry point after the zlib or gzip header, and assures that the + index always has at least one access point; we avoid creating an + access point after the last block by checking bit 6 of data_type + */ + if ((strm.data_type & 128) && !(strm.data_type & 64) && + (totout == 0 || totout - last > span)) { + index = addpoint(index, strm.data_type & 7, totin, + totout, strm.avail_out, window); + if (index == NULL) { + ret = Z_MEM_ERROR; + goto build_index_error; + } + last = totout; + } + } while (strm.avail_in != 0); + } while (ret != Z_STREAM_END); + + /* clean up and return index (release unused entries in list) */ + (void)inflateEnd(&strm); + index = realloc(index, sizeof(struct point) * index->have); + index->size = index->have; + *built = index; + return index->size; + + /* return error */ + build_index_error: + (void)inflateEnd(&strm); + if (index != NULL) + free_index(index); + return ret; +} + +/* Use the index to read len bytes from offset into buf, return bytes read or + negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past + the end of the uncompressed data, then extract() will return a value less + than len, indicating how much as actually read into buf. This function + should not return a data error unless the file was modified since the index + was generated. extract() may also return Z_ERRNO if there is an error on + reading or seeking the input file. */ +local int extract(FILE *in, struct access *index, off_t offset, + unsigned char *buf, int len) +{ + int ret, skip; + z_stream strm; + struct point *here; + unsigned char input[CHUNK]; + unsigned char discard[WINSIZE]; + + /* proceed only if something reasonable to do */ + if (len < 0) + return 0; + + /* find where in stream to start */ + here = index->list; + ret = index->have; + while (--ret && here[1].out <= offset) + here++; + + /* initialize file and inflate state to start there */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit2(&strm, -15); /* raw inflate */ + if (ret != Z_OK) + return ret; + ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET); + if (ret == -1) + goto extract_ret; + if (here->bits) { + ret = getc(in); + if (ret == -1) { + ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR; + goto extract_ret; + } + (void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits)); + } + (void)inflateSetDictionary(&strm, here->window, WINSIZE); + + /* skip uncompressed bytes until offset reached, then satisfy request */ + offset -= here->out; + strm.avail_in = 0; + skip = 1; /* while skipping to offset */ + do { + /* define where to put uncompressed data, and how much */ + if (offset == 0 && skip) { /* at offset now */ + strm.avail_out = len; + strm.next_out = buf; + skip = 0; /* only do this once */ + } + if (offset > WINSIZE) { /* skip WINSIZE bytes */ + strm.avail_out = WINSIZE; + strm.next_out = discard; + offset -= WINSIZE; + } + else if (offset != 0) { /* last skip */ + strm.avail_out = (unsigned)offset; + strm.next_out = discard; + offset = 0; + } + + /* uncompress until avail_out filled, or end of stream */ + do { + if (strm.avail_in == 0) { + strm.avail_in = fread(input, 1, CHUNK, in); + if (ferror(in)) { + ret = Z_ERRNO; + goto extract_ret; + } + if (strm.avail_in == 0) { + ret = Z_DATA_ERROR; + goto extract_ret; + } + strm.next_in = input; + } + ret = inflate(&strm, Z_NO_FLUSH); /* normal inflate */ + if (ret == Z_NEED_DICT) + ret = Z_DATA_ERROR; + if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR) + goto extract_ret; + if (ret == Z_STREAM_END) + break; + } while (strm.avail_out != 0); + + /* if reach end of stream, then don't keep trying to get more */ + if (ret == Z_STREAM_END) + break; + + /* do until offset reached and requested data read, or stream ends */ + } while (skip); + + /* compute number of uncompressed bytes read after offset */ + ret = skip ? 0 : len - strm.avail_out; + + /* clean up and return bytes read or error */ + extract_ret: + (void)inflateEnd(&strm); + return ret; +} + +/* Demonstrate the use of build_index() and extract() by processing the file + provided on the command line, and the extracting 16K from about 2/3rds of + the way through the uncompressed output, and writing that to stdout. */ +int main(int argc, char **argv) +{ + int len; + off_t offset; + FILE *in; + struct access *index; + unsigned char buf[CHUNK]; + + /* open input file */ + if (argc != 2) { + fprintf(stderr, "usage: zran file.gz\n"); + return 1; + } + in = fopen(argv[1], "rb"); + if (in == NULL) { + fprintf(stderr, "zran: could not open %s for reading\n", argv[1]); + return 1; + } + + /* build index */ + len = build_index(in, SPAN, &index); + if (len < 0) { + fclose(in); + switch (len) { + case Z_MEM_ERROR: + fprintf(stderr, "zran: out of memory\n"); + break; + case Z_DATA_ERROR: + fprintf(stderr, "zran: compressed data error in %s\n", argv[1]); + break; + case Z_ERRNO: + fprintf(stderr, "zran: read error on %s\n", argv[1]); + break; + default: + fprintf(stderr, "zran: error %d while building index\n", len); + } + return 1; + } + fprintf(stderr, "zran: built index with %d access points\n", len); + + /* use index by reading some bytes from an arbitrary offset */ + offset = (index->list[index->have - 1].out << 1) / 3; + len = extract(in, index, offset, buf, CHUNK); + if (len < 0) + fprintf(stderr, "zran: extraction failed: %s error\n", + len == Z_MEM_ERROR ? "out of memory" : "input corrupted"); + else { + fwrite(buf, 1, len, stdout); + fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset); + } + + /* clean up and exit */ + free_index(index); + fclose(in); + return 0; +} diff --git a/compat/zlib/make_vms.com b/compat/zlib/make_vms.com new file mode 100644 index 0000000..c2a1fb5 --- /dev/null +++ b/compat/zlib/make_vms.com @@ -0,0 +1,461 @@ +$! make libz under VMS written by +$! Martin P.J. Zinser +$! +$! +$ on error then goto err_exit +$! +$! +$! Just some general constants... +$! +$ true = 1 +$ false = 0 +$ tmpnam = "temp_" + f$getjpi("","pid") +$ SAY = "WRITE SYS$OUTPUT" +$! +$! Setup variables holding "config" information +$! +$ Make = "" +$ name = "Zlib" +$ version = "?.?.?" +$ v_string = "ZLIB_VERSION" +$ v_file = "zlib.h" +$ ccopt = "" +$ lopts = "" +$ linkonly = false +$ optfile = name + ".opt" +$ its_decc = false +$ its_vaxc = false +$ its_gnuc = false +$ axp = f$getsyi("HW_MODEL").ge.1024 +$ s_case = false +$! Check for MMK/MMS +$! +$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" +$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" +$! +$! +$ gosub find_version +$! +$ gosub check_opts +$! +$! Look for the compiler used +$! +$ gosub check_compiler +$ if its_decc +$ then +$ ccopt = "/prefix=all" + ccopt +$ if f$trnlnm("SYS") .eqs. "" +$ then +$ if axp +$ then +$ define sys sys$library: +$ else +$ ccopt = "/decc" + ccopt +$ define sys decc$library_include: +$ endif +$ endif +$ endif +$ if its_vaxc .or. its_gnuc +$ then +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ endif +$! +$! Build the thing plain or with mms +$! +$ write sys$output "Compiling Zlib sources ..." +$ if make.eqs."" +$ then +$ dele example.obj;*,minigzip.obj;* +$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" - + adler32.c zlib.h zconf.h +$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" - + compress.c zlib.h zconf.h +$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" - + crc32.c zlib.h zconf.h +$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" - + deflate.c deflate.h zutil.h zlib.h zconf.h +$ CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" - + gzio.c zutil.h zlib.h zconf.h +$ CALL MAKE infback.OBJ "CC ''CCOPT' infback" - + infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h +$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" - + inffast.c zutil.h zlib.h zconf.h inffast.h +$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" - + inflate.c zutil.h zlib.h zconf.h infblock.h +$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" - + inftrees.c zutil.h zlib.h zconf.h inftrees.h +$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" - + trees.c deflate.h zutil.h zlib.h zconf.h +$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" - + uncompr.c zlib.h zconf.h +$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" - + zutil.c zutil.h zlib.h zconf.h +$ write sys$output "Building Zlib ..." +$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ +$ write sys$output "Building example..." +$ CALL MAKE example.OBJ "CC ''CCOPT' example" - + example.c zlib.h zconf.h +$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb +$ if f$search("x11vms:xvmsutils.olb") .nes. "" +$ then +$ write sys$output "Building minigzip..." +$ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" - + minigzip.c zlib.h zconf.h +$ call make minigzip.exe - + "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - + minigzip.obj libz.olb +$ endif +$ else +$ gosub crea_mms +$ SAY "Make ''name' ''version' with ''Make' " +$ 'make' +$ endif +$! +$! Alpha gets a shareable image +$! +$ If axp +$ Then +$ gosub crea_olist +$ write sys$output "Creating libzshr.exe" +$ call anal_obj_axp modules.opt _link.opt +$ if s_case +$ then +$ open/append optf modules.opt +$ write optf "case_sensitive=YES" +$ close optf +$ endif +$ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,_link.opt/opt +$ endif +$ write sys$output "Zlib build completed" +$ exit +$CC_ERR: +$ write sys$output "C compiler required to build ''name'" +$ goto err_exit +$ERR_EXIT: +$ set message/facil/ident/sever/text +$ write sys$output "Exiting..." +$ exit 2 +$! +$! +$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES +$ V = 'F$Verify(0) +$! P1 = What we are trying to make +$! P2 = Command to make it +$! P3 - P8 What it depends on +$ +$ If F$Search(P1) .Eqs. "" Then Goto Makeit +$ Time = F$CvTime(F$File(P1,"RDT")) +$arg=3 +$Loop: +$ Argument = P'arg +$ If Argument .Eqs. "" Then Goto Exit +$ El=0 +$Loop2: +$ File = F$Element(El," ",Argument) +$ If File .Eqs. " " Then Goto Endl +$ AFile = "" +$Loop3: +$ OFile = AFile +$ AFile = F$Search(File) +$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl +$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit +$ Goto Loop3 +$NextEL: +$ El = El + 1 +$ Goto Loop2 +$EndL: +$ arg=arg+1 +$ If arg .Le. 8 Then Goto Loop +$ Goto Exit +$ +$Makeit: +$ VV=F$VERIFY(0) +$ write sys$output P2 +$ 'P2 +$ VV='F$Verify(VV) +$Exit: +$ If V Then Set Verify +$ENDSUBROUTINE +$!------------------------------------------------------------------------------ +$! +$! Check command line options and set symbols accordingly +$! +$ CHECK_OPTS: +$ i = 1 +$ OPT_LOOP: +$ if i .lt. 9 +$ then +$ cparm = f$edit(p'i',"upcase") +$ if cparm .eqs. "DEBUG" +$ then +$ ccopt = ccopt + "/noopt/deb" +$ lopts = lopts + "/deb" +$ endif +$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ ccopt = ccopt + f$extract(start,len,cparm) +$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - + then s_case = true +$ endif +$ if cparm .eqs. "LINK" then linkonly = true +$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ lopts = lopts + f$extract(start,len,cparm) +$ endif +$ if f$locate("CC=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ cc_com = f$extract(start,len,cparm) + if (cc_com .nes. "DECC") .and. - + (cc_com .nes. "VAXC") .and. - + (cc_com .nes. "GNUC") +$ then +$ write sys$output "Unsupported compiler choice ''cc_com' ignored" +$ write sys$output "Use DECC, VAXC, or GNUC instead" +$ else +$ if cc_com .eqs. "DECC" then its_decc = true +$ if cc_com .eqs. "VAXC" then its_vaxc = true +$ if cc_com .eqs. "GNUC" then its_gnuc = true +$ endif +$ endif +$ if f$locate("MAKE=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ mmks = f$extract(start,len,cparm) +$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS") +$ then +$ make = mmks +$ else +$ write sys$output "Unsupported make choice ''mmks' ignored" +$ write sys$output "Use MMK or MMS instead" +$ endif +$ endif +$ i = i + 1 +$ goto opt_loop +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Look for the compiler used +$! +$CHECK_COMPILER: +$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) +$ then +$ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "") +$ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "") +$ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "") +$ endif +$! +$! Exit if no compiler available +$! +$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) +$ then goto CC_ERR +$ else +$ if its_decc then write sys$output "CC compiler check ... Compaq C" +$ if its_vaxc then write sys$output "CC compiler check ... VAX C" +$ if its_gnuc then write sys$output "CC compiler check ... GNU C" +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! If MMS/MMK are available dump out the descrip.mms if required +$! +$CREA_MMS: +$ write sys$output "Creating descrip.mms..." +$ create descrip.mms +$ open/append out descrip.mms +$ copy sys$input: out +$ deck +# descrip.mms: MMS description file for building zlib on VMS +# written by Martin P.J. Zinser +# + +OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj, infback.obj\ + deflate.obj, trees.obj, zutil.obj, inflate.obj, \ + inftrees.obj, inffast.obj + +$ eod +$ write out "CFLAGS=", ccopt +$ write out "LOPTS=", lopts +$ copy sys$input: out +$ deck + +all : example.exe minigzip.exe libz.olb + @ write sys$output " Example applications available" + +libz.olb : libz.olb($(OBJS)) + @ write sys$output " libz available" + +example.exe : example.obj libz.olb + link $(LOPTS) example,libz.olb/lib + +minigzip.exe : minigzip.obj libz.olb + link $(LOPTS) minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib + +clean : + delete *.obj;*,libz.olb;*,*.opt;*,*.exe;* + + +# Other dependencies. +adler32.obj : adler32.c zutil.h zlib.h zconf.h +compress.obj : compress.c zlib.h zconf.h +crc32.obj : crc32.c zutil.h zlib.h zconf.h +deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h +example.obj : example.c zlib.h zconf.h +gzio.obj : gzio.c zutil.h zlib.h zconf.h +inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h +inflate.obj : inflate.c zutil.h zlib.h zconf.h +inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h +minigzip.obj : minigzip.c zlib.h zconf.h +trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h +uncompr.obj : uncompr.c zlib.h zconf.h +zutil.obj : zutil.c zutil.h zlib.h zconf.h +infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h +$ eod +$ close out +$ return +$!------------------------------------------------------------------------------ +$! +$! Read list of core library sources from makefile.in and create options +$! needed to build shareable image +$! +$CREA_OLIST: +$ open/read min makefile.in +$ open/write mod modules.opt +$ src_check = "OBJS =" +$MRLOOP: +$ read/end=mrdone min rec +$ if (f$extract(0,6,rec) .nes. src_check) then goto mrloop +$ rec = rec - src_check +$ gosub extra_filnam +$ if (f$element(1,"\",rec) .eqs. "\") then goto mrdone +$MRSLOOP: +$ read/end=mrdone min rec +$ gosub extra_filnam +$ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop +$MRDONE: +$ close min +$ close mod +$ return +$!------------------------------------------------------------------------------ +$! +$! Take record extracted in crea_olist and split it into single filenames +$! +$EXTRA_FILNAM: +$ myrec = f$edit(rec - "\", "trim,compress") +$ i = 0 +$FELOOP: +$ srcfil = f$element(i," ", myrec) +$ if (srcfil .nes. " ") +$ then +$ write mod f$parse(srcfil,,,"NAME"), ".obj" +$ i = i + 1 +$ goto feloop +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Find current Zlib version number +$! +$FIND_VERSION: +$ open/read h_in 'v_file' +$hloop: +$ read/end=hdone h_in rec +$ rec = f$edit(rec,"TRIM") +$ if (f$extract(0,1,rec) .nes. "#") then goto hloop +$ rec = f$edit(rec - "#", "TRIM") +$ if f$element(0," ",rec) .nes. "define" then goto hloop +$ if f$element(1," ",rec) .eqs. v_string +$ then +$ version = 'f$element(2," ",rec)' +$ goto hdone +$ endif +$ goto hloop +$hdone: +$ close h_in +$ return +$!------------------------------------------------------------------------------ +$! +$! Analyze Object files for OpenVMS AXP to extract Procedure and Data +$! information to build a symbol vector for a shareable image +$! All the "brains" of this logic was suggested by Hartmut Becker +$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me +$! (zinser@decus.de), so if you do have problem reports please do not +$! bother Hartmut/HP, but get in touch with me +$! +$ ANAL_OBJ_AXP: Subroutine +$ V = 'F$Verify(0) +$ SAY := "WRITE_ SYS$OUTPUT" +$ +$ IF F$SEARCH("''P1'") .EQS. "" +$ THEN +$ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available" +$ goto exit_aa +$ ENDIF +$ IF "''P2'" .EQS. "" +$ THEN +$ SAY "ANAL_OBJ_AXP: Error, no output file provided" +$ goto exit_aa +$ ENDIF +$ +$ open/read in 'p1 +$ create a.tmp +$ open/append atmp a.tmp +$ loop: +$ read/end=end_loop in line +$ f= f$search(line) +$ if f .eqs. "" +$ then +$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'" +$ goto loop +$ endif +$ define/user sys$output nl: +$ define/user sys$error nl: +$ anal/obj/gsd 'f /out=x.tmp +$ open/read xtmp x.tmp +$ XLOOP: +$ read/end=end_xloop xtmp xline +$ xline = f$edit(xline,"compress") +$ write atmp xline +$ goto xloop +$ END_XLOOP: +$ close xtmp +$ goto loop +$ end_loop: +$ close in +$ close atmp +$ if f$search("a.tmp") .eqs. "" - + then $ exit +$ ! all global definitions +$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp +$ ! all procedures +$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp +$ search c.tmp "symbol:"/out=d.tmp +$ define/user sys$output nl: +$ edito/edt/command=sys$input d.tmp +sub/symbol: "/symbol_vector=(/whole +sub/"/=PROCEDURE)/whole +exit +$ ! all data +$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp +$ search e.tmp "symbol:"/out=f.tmp +$ define/user sys$output nl: +$ edito/edt/command=sys$input f.tmp +sub/symbol: "/symbol_vector=(/whole +sub/"/=DATA)/whole +exit +$ sort/nodupl d.tmp,f.tmp 'p2' +$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;* +$ if f$search("x.tmp") .nes. "" - + then $ delete x.tmp;* +$! +$ EXIT_AA: +$ if V then set verify +$ endsubroutine +$!------------------------------------------------------------------------------ diff --git a/compat/zlib/minigzip.c b/compat/zlib/minigzip.c new file mode 100644 index 0000000..eb0f4cc --- /dev/null +++ b/compat/zlib/minigzip.c @@ -0,0 +1,322 @@ +/* minigzip.c -- simulate gzip using the zlib compression library + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * minigzip is a minimal implementation of the gzip utility. This is + * only an example of using zlib and isn't meant to replace the + * full-featured gzip. No attempt is made to deal with file systems + * limiting names to 14 or 8+3 characters, etc... Error checking is + * very limited. So use minigzip only for testing; use gzip for the + * real thing. On MSDOS, use only on file names without extension + * or in pipe mode. + */ + +/* @(#) $Id: minigzip.c,v 1.1 2008/12/19 14:44:48 dkf Exp $ */ + +#include +#include "zlib.h" + +#ifdef STDC +# include +# include +#endif + +#ifdef USE_MMAP +# include +# include +# include +#endif + +#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) +# include +# include +# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +#else +# define SET_BINARY_MODE(file) +#endif + +#ifdef VMS +# define unlink delete +# define GZ_SUFFIX "-gz" +#endif +#ifdef RISCOS +# define unlink remove +# define GZ_SUFFIX "-gz" +# define fileno(file) file->__file +#endif +#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +# include /* for fileno */ +#endif + +#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ + extern int unlink OF((const char *)); +#endif + +#ifndef GZ_SUFFIX +# define GZ_SUFFIX ".gz" +#endif +#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1) + +#define BUFLEN 16384 +#define MAX_NAME_LEN 1024 + +#ifdef MAXSEG_64K +# define local static + /* Needed for systems with limitation on stack size. */ +#else +# define local +#endif + +char *prog; + +void error OF((const char *msg)); +void gz_compress OF((FILE *in, gzFile out)); +#ifdef USE_MMAP +int gz_compress_mmap OF((FILE *in, gzFile out)); +#endif +void gz_uncompress OF((gzFile in, FILE *out)); +void file_compress OF((char *file, char *mode)); +void file_uncompress OF((char *file)); +int main OF((int argc, char *argv[])); + +/* =========================================================================== + * Display error message and exit + */ +void error(msg) + const char *msg; +{ + fprintf(stderr, "%s: %s\n", prog, msg); + exit(1); +} + +/* =========================================================================== + * Compress input to output then close both files. + */ + +void gz_compress(in, out) + FILE *in; + gzFile out; +{ + local char buf[BUFLEN]; + int len; + int err; + +#ifdef USE_MMAP + /* Try first compressing with mmap. If mmap fails (minigzip used in a + * pipe), use the normal fread loop. + */ + if (gz_compress_mmap(in, out) == Z_OK) return; +#endif + for (;;) { + len = (int)fread(buf, 1, sizeof(buf), in); + if (ferror(in)) { + perror("fread"); + exit(1); + } + if (len == 0) break; + + if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); + } + fclose(in); + if (gzclose(out) != Z_OK) error("failed gzclose"); +} + +#ifdef USE_MMAP /* MMAP version, Miguel Albrecht */ + +/* Try compressing the input file at once using mmap. Return Z_OK if + * if success, Z_ERRNO otherwise. + */ +int gz_compress_mmap(in, out) + FILE *in; + gzFile out; +{ + int len; + int err; + int ifd = fileno(in); + caddr_t buf; /* mmap'ed buffer for the entire input file */ + off_t buf_len; /* length of the input file */ + struct stat sb; + + /* Determine the size of the file, needed for mmap: */ + if (fstat(ifd, &sb) < 0) return Z_ERRNO; + buf_len = sb.st_size; + if (buf_len <= 0) return Z_ERRNO; + + /* Now do the actual mmap: */ + buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); + if (buf == (caddr_t)(-1)) return Z_ERRNO; + + /* Compress the whole file at once: */ + len = gzwrite(out, (char *)buf, (unsigned)buf_len); + + if (len != (int)buf_len) error(gzerror(out, &err)); + + munmap(buf, buf_len); + fclose(in); + if (gzclose(out) != Z_OK) error("failed gzclose"); + return Z_OK; +} +#endif /* USE_MMAP */ + +/* =========================================================================== + * Uncompress input to output then close both files. + */ +void gz_uncompress(in, out) + gzFile in; + FILE *out; +{ + local char buf[BUFLEN]; + int len; + int err; + + for (;;) { + len = gzread(in, buf, sizeof(buf)); + if (len < 0) error (gzerror(in, &err)); + if (len == 0) break; + + if ((int)fwrite(buf, 1, (unsigned)len, out) != len) { + error("failed fwrite"); + } + } + if (fclose(out)) error("failed fclose"); + + if (gzclose(in) != Z_OK) error("failed gzclose"); +} + + +/* =========================================================================== + * Compress the given file: create a corresponding .gz file and remove the + * original. + */ +void file_compress(file, mode) + char *file; + char *mode; +{ + local char outfile[MAX_NAME_LEN]; + FILE *in; + gzFile out; + + strcpy(outfile, file); + strcat(outfile, GZ_SUFFIX); + + in = fopen(file, "rb"); + if (in == NULL) { + perror(file); + exit(1); + } + out = gzopen(outfile, mode); + if (out == NULL) { + fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); + exit(1); + } + gz_compress(in, out); + + unlink(file); +} + + +/* =========================================================================== + * Uncompress the given file and remove the original. + */ +void file_uncompress(file) + char *file; +{ + local char buf[MAX_NAME_LEN]; + char *infile, *outfile; + FILE *out; + gzFile in; + uInt len = (uInt)strlen(file); + + strcpy(buf, file); + + if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { + infile = file; + outfile = buf; + outfile[len-3] = '\0'; + } else { + outfile = file; + infile = buf; + strcat(infile, GZ_SUFFIX); + } + in = gzopen(infile, "rb"); + if (in == NULL) { + fprintf(stderr, "%s: can't gzopen %s\n", prog, infile); + exit(1); + } + out = fopen(outfile, "wb"); + if (out == NULL) { + perror(file); + exit(1); + } + + gz_uncompress(in, out); + + unlink(infile); +} + + +/* =========================================================================== + * Usage: minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...] + * -d : decompress + * -f : compress with Z_FILTERED + * -h : compress with Z_HUFFMAN_ONLY + * -r : compress with Z_RLE + * -1 to -9 : compression level + */ + +int main(argc, argv) + int argc; + char *argv[]; +{ + int uncompr = 0; + gzFile file; + char outmode[20]; + + strcpy(outmode, "wb6 "); + + prog = argv[0]; + argc--, argv++; + + while (argc > 0) { + if (strcmp(*argv, "-d") == 0) + uncompr = 1; + else if (strcmp(*argv, "-f") == 0) + outmode[3] = 'f'; + else if (strcmp(*argv, "-h") == 0) + outmode[3] = 'h'; + else if (strcmp(*argv, "-r") == 0) + outmode[3] = 'R'; + else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' && + (*argv)[2] == 0) + outmode[2] = (*argv)[1]; + else + break; + argc--, argv++; + } + if (outmode[3] == ' ') + outmode[3] = 0; + if (argc == 0) { + SET_BINARY_MODE(stdin); + SET_BINARY_MODE(stdout); + if (uncompr) { + file = gzdopen(fileno(stdin), "rb"); + if (file == NULL) error("can't gzdopen stdin"); + gz_uncompress(file, stdout); + } else { + file = gzdopen(fileno(stdout), outmode); + if (file == NULL) error("can't gzdopen stdout"); + gz_compress(stdin, file); + } + } else { + do { + if (uncompr) { + file_uncompress(*argv); + } else { + file_compress(*argv, outmode); + } + } while (argv++, --argc); + } + return 0; +} diff --git a/compat/zlib/old/Makefile.riscos b/compat/zlib/old/Makefile.riscos new file mode 100644 index 0000000..57e29d3 --- /dev/null +++ b/compat/zlib/old/Makefile.riscos @@ -0,0 +1,151 @@ +# Project: zlib_1_03 +# Patched for zlib 1.1.2 rw@shadow.org.uk 19980430 +# test works out-of-the-box, installs `somewhere' on demand + +# Toolflags: +CCflags = -c -depend !Depend -IC: -g -throwback -DRISCOS -fah +C++flags = -c -depend !Depend -IC: -throwback +Linkflags = -aif -c++ -o $@ +ObjAsmflags = -throwback -NoCache -depend !Depend +CMHGflags = +LibFileflags = -c -l -o $@ +Squeezeflags = -o $@ + +# change the line below to where _you_ want the library installed. +libdest = lib:zlib + +# Final targets: +@.lib: @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \ + @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \ + @.o.uncompr @.o.zutil + LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \ + @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \ + @.o.trees @.o.uncompr @.o.zutil +test: @.minigzip @.example @.lib + @copy @.lib @.libc A~C~DF~L~N~P~Q~RS~TV + @echo running tests: hang on. + @/@.minigzip -f -9 libc + @/@.minigzip -d libc-gz + @/@.minigzip -f -1 libc + @/@.minigzip -d libc-gz + @/@.minigzip -h -9 libc + @/@.minigzip -d libc-gz + @/@.minigzip -h -1 libc + @/@.minigzip -d libc-gz + @/@.minigzip -9 libc + @/@.minigzip -d libc-gz + @/@.minigzip -1 libc + @/@.minigzip -d libc-gz + @diff @.lib @.libc + @echo that should have reported '@.lib and @.libc identical' if you have diff. + @/@.example @.fred @.fred + @echo that will have given lots of hello!'s. + +@.minigzip: @.o.minigzip @.lib C:o.Stubs + Link $(Linkflags) @.o.minigzip @.lib C:o.Stubs +@.example: @.o.example @.lib C:o.Stubs + Link $(Linkflags) @.o.example @.lib C:o.Stubs + +install: @.lib + cdir $(libdest) + cdir $(libdest).h + @copy @.h.zlib $(libdest).h.zlib A~C~DF~L~N~P~Q~RS~TV + @copy @.h.zconf $(libdest).h.zconf A~C~DF~L~N~P~Q~RS~TV + @copy @.lib $(libdest).lib A~C~DF~L~N~P~Q~RS~TV + @echo okay, installed zlib in $(libdest) + +clean:; remove @.minigzip + remove @.example + remove @.libc + -wipe @.o.* F~r~cV + remove @.fred + +# User-editable dependencies: +.c.o: + cc $(ccflags) -o $@ $< + +# Static dependencies: + +# Dynamic dependencies: +o.example: c.example +o.example: h.zlib +o.example: h.zconf +o.minigzip: c.minigzip +o.minigzip: h.zlib +o.minigzip: h.zconf +o.adler32: c.adler32 +o.adler32: h.zlib +o.adler32: h.zconf +o.compress: c.compress +o.compress: h.zlib +o.compress: h.zconf +o.crc32: c.crc32 +o.crc32: h.zlib +o.crc32: h.zconf +o.deflate: c.deflate +o.deflate: h.deflate +o.deflate: h.zutil +o.deflate: h.zlib +o.deflate: h.zconf +o.gzio: c.gzio +o.gzio: h.zutil +o.gzio: h.zlib +o.gzio: h.zconf +o.infblock: c.infblock +o.infblock: h.zutil +o.infblock: h.zlib +o.infblock: h.zconf +o.infblock: h.infblock +o.infblock: h.inftrees +o.infblock: h.infcodes +o.infblock: h.infutil +o.infcodes: c.infcodes +o.infcodes: h.zutil +o.infcodes: h.zlib +o.infcodes: h.zconf +o.infcodes: h.inftrees +o.infcodes: h.infblock +o.infcodes: h.infcodes +o.infcodes: h.infutil +o.infcodes: h.inffast +o.inffast: c.inffast +o.inffast: h.zutil +o.inffast: h.zlib +o.inffast: h.zconf +o.inffast: h.inftrees +o.inffast: h.infblock +o.inffast: h.infcodes +o.inffast: h.infutil +o.inffast: h.inffast +o.inflate: c.inflate +o.inflate: h.zutil +o.inflate: h.zlib +o.inflate: h.zconf +o.inflate: h.infblock +o.inftrees: c.inftrees +o.inftrees: h.zutil +o.inftrees: h.zlib +o.inftrees: h.zconf +o.inftrees: h.inftrees +o.inftrees: h.inffixed +o.infutil: c.infutil +o.infutil: h.zutil +o.infutil: h.zlib +o.infutil: h.zconf +o.infutil: h.infblock +o.infutil: h.inftrees +o.infutil: h.infcodes +o.infutil: h.infutil +o.trees: c.trees +o.trees: h.deflate +o.trees: h.zutil +o.trees: h.zlib +o.trees: h.zconf +o.trees: h.trees +o.uncompr: c.uncompr +o.uncompr: h.zlib +o.uncompr: h.zconf +o.zutil: c.zutil +o.zutil: h.zutil +o.zutil: h.zlib +o.zutil: h.zconf diff --git a/compat/zlib/old/README b/compat/zlib/old/README new file mode 100644 index 0000000..800bf07 --- /dev/null +++ b/compat/zlib/old/README @@ -0,0 +1,3 @@ +This directory contains files that have not been updated for zlib 1.2.x + +(Volunteers are encouraged to help clean this up. Thanks.) diff --git a/compat/zlib/old/descrip.mms b/compat/zlib/old/descrip.mms new file mode 100644 index 0000000..7066da5 --- /dev/null +++ b/compat/zlib/old/descrip.mms @@ -0,0 +1,48 @@ +# descrip.mms: MMS description file for building zlib on VMS +# written by Martin P.J. Zinser + +cc_defs = +c_deb = + +.ifdef __DECC__ +pref = /prefix=all +.endif + +OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ + deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ + inftrees.obj, infcodes.obj, infutil.obj, inffast.obj + +CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) + +all : example.exe minigzip.exe + @ write sys$output " Example applications available" +libz.olb : libz.olb($(OBJS)) + @ write sys$output " libz available" + +example.exe : example.obj libz.olb + link example,libz.olb/lib + +minigzip.exe : minigzip.obj libz.olb + link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib + +clean : + delete *.obj;*,libz.olb;* + + +# Other dependencies. +adler32.obj : zutil.h zlib.h zconf.h +compress.obj : zlib.h zconf.h +crc32.obj : zutil.h zlib.h zconf.h +deflate.obj : deflate.h zutil.h zlib.h zconf.h +example.obj : zlib.h zconf.h +gzio.obj : zutil.h zlib.h zconf.h +infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h +infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h +inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h +inflate.obj : zutil.h zlib.h zconf.h infblock.h +inftrees.obj : zutil.h zlib.h zconf.h inftrees.h +infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h +minigzip.obj : zlib.h zconf.h +trees.obj : deflate.h zutil.h zlib.h zconf.h +uncompr.obj : zlib.h zconf.h +zutil.obj : zutil.h zlib.h zconf.h diff --git a/compat/zlib/old/os2/Makefile.os2 b/compat/zlib/old/os2/Makefile.os2 new file mode 100644 index 0000000..a105aaa --- /dev/null +++ b/compat/zlib/old/os2/Makefile.os2 @@ -0,0 +1,136 @@ +# Makefile for zlib under OS/2 using GCC (PGCC) +# For conditions of distribution and use, see copyright notice in zlib.h + +# To compile and test, type: +# cp Makefile.os2 .. +# cd .. +# make -f Makefile.os2 test + +# This makefile will build a static library z.lib, a shared library +# z.dll and a import library zdll.lib. You can use either z.lib or +# zdll.lib by specifying either -lz or -lzdll on gcc's command line + +CC=gcc -Zomf -s + +CFLAGS=-O6 -Wall +#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 +#CFLAGS=-g -DDEBUG +#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ +# -Wstrict-prototypes -Wmissing-prototypes + +#################### BUG WARNING: ##################### +## infcodes.c hits a bug in pgcc-1.0, so you have to use either +## -O# where # <= 4 or one of (-fno-ommit-frame-pointer or -fno-force-mem) +## This bug is reportedly fixed in pgcc >1.0, but this was not tested +CFLAGS+=-fno-force-mem + +LDFLAGS=-s -L. -lzdll -Zcrtdll +LDSHARED=$(CC) -s -Zomf -Zdll -Zcrtdll + +VER=1.1.0 +ZLIB=z.lib +SHAREDLIB=z.dll +SHAREDLIBIMP=zdll.lib +LIBS=$(ZLIB) $(SHAREDLIB) $(SHAREDLIBIMP) + +AR=emxomfar cr +IMPLIB=emximp +RANLIB=echo +TAR=tar +SHELL=bash + +prefix=/usr/local +exec_prefix = $(prefix) + +OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ + zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o + +TEST_OBJS = example.o minigzip.o + +DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \ + algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ + nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \ + contrib/asm386/*.asm contrib/asm386/*.c \ + contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \ + contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ + contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 + +all: example.exe minigzip.exe + +test: all + @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ + echo hello world | ./minigzip | ./minigzip -d || \ + echo ' *** minigzip test FAILED ***' ; \ + if ./example; then \ + echo ' *** zlib test OK ***'; \ + else \ + echo ' *** zlib test FAILED ***'; \ + fi + +$(ZLIB): $(OBJS) + $(AR) $@ $(OBJS) + -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 + +$(SHAREDLIB): $(OBJS) os2/z.def + $(LDSHARED) -o $@ $^ + +$(SHAREDLIBIMP): os2/z.def + $(IMPLIB) -o $@ $^ + +example.exe: example.o $(LIBS) + $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) + +minigzip.exe: minigzip.o $(LIBS) + $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) + +clean: + rm -f *.o *~ example minigzip libz.a libz.so* foo.gz + +distclean: clean + +zip: + mv Makefile Makefile~; cp -p Makefile.in Makefile + rm -f test.c ztest*.c + v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ + zip -ul9 zlib$$v $(DISTFILES) + mv Makefile~ Makefile + +dist: + mv Makefile Makefile~; cp -p Makefile.in Makefile + rm -f test.c ztest*.c + d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ + rm -f $$d.tar.gz; \ + if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ + files=""; \ + for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ + cd ..; \ + GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ + if test ! -d $$d; then rm -f $$d; fi + mv Makefile~ Makefile + +tags: + etags *.[ch] + +depend: + makedepend -- $(CFLAGS) -- *.[ch] + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +adler32.o: zlib.h zconf.h +compress.o: zlib.h zconf.h +crc32.o: zlib.h zconf.h +deflate.o: deflate.h zutil.h zlib.h zconf.h +example.o: zlib.h zconf.h +gzio.o: zutil.h zlib.h zconf.h +infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h +infcodes.o: zutil.h zlib.h zconf.h +infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h +inffast.o: zutil.h zlib.h zconf.h inftrees.h +inffast.o: infblock.h infcodes.h infutil.h inffast.h +inflate.o: zutil.h zlib.h zconf.h infblock.h +inftrees.o: zutil.h zlib.h zconf.h inftrees.h +infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h +minigzip.o: zlib.h zconf.h +trees.o: deflate.h zutil.h zlib.h zconf.h trees.h +uncompr.o: zlib.h zconf.h +zutil.o: zutil.h zlib.h zconf.h diff --git a/compat/zlib/old/os2/zlib.def b/compat/zlib/old/os2/zlib.def new file mode 100644 index 0000000..4c753f1 --- /dev/null +++ b/compat/zlib/old/os2/zlib.def @@ -0,0 +1,51 @@ +; +; Slightly modified version of ../nt/zlib.dnt :-) +; + +LIBRARY Z +DESCRIPTION "Zlib compression library for OS/2" +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE + +EXPORTS + adler32 + compress + crc32 + deflate + deflateCopy + deflateEnd + deflateInit2_ + deflateInit_ + deflateParams + deflateReset + deflateSetDictionary + gzclose + gzdopen + gzerror + gzflush + gzopen + gzread + gzwrite + inflate + inflateEnd + inflateInit2_ + inflateInit_ + inflateReset + inflateSetDictionary + inflateSync + uncompress + zlibVersion + gzprintf + gzputc + gzgetc + gzseek + gzrewind + gztell + gzeof + gzsetparams + zError + inflateSyncPoint + get_crc_table + compress2 + gzputs + gzgets diff --git a/compat/zlib/old/visual-basic.txt b/compat/zlib/old/visual-basic.txt new file mode 100644 index 0000000..57efe58 --- /dev/null +++ b/compat/zlib/old/visual-basic.txt @@ -0,0 +1,160 @@ +See below some functions declarations for Visual Basic. + +Frequently Asked Question: + +Q: Each time I use the compress function I get the -5 error (not enough + room in the output buffer). + +A: Make sure that the length of the compressed buffer is passed by + reference ("as any"), not by value ("as long"). Also check that + before the call of compress this length is equal to the total size of + the compressed buffer and not zero. + + +From: "Jon Caruana" +Subject: Re: How to port zlib declares to vb? +Date: Mon, 28 Oct 1996 18:33:03 -0600 + +Got the answer! (I haven't had time to check this but it's what I got, and +looks correct): + +He has the following routines working: + compress + uncompress + gzopen + gzwrite + gzread + gzclose + +Declares follow: (Quoted from Carlos Rios , in Vb4 form) + +#If Win16 Then 'Use Win16 calls. +Declare Function compress Lib "ZLIB.DLL" (ByVal compr As + String, comprLen As Any, ByVal buf As String, ByVal buflen + As Long) As Integer +Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr + As String, uncomprLen As Any, ByVal compr As String, ByVal + lcompr As Long) As Integer +Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As + String, ByVal mode As String) As Long +Declare Function gzread Lib "ZLIB.DLL" (ByVal file As + Long, ByVal uncompr As String, ByVal uncomprLen As Integer) + As Integer +Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As + Long, ByVal uncompr As String, ByVal uncomprLen As Integer) + As Integer +Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As + Long) As Integer +#Else +Declare Function compress Lib "ZLIB32.DLL" + (ByVal compr As String, comprLen As Any, ByVal buf As + String, ByVal buflen As Long) As Integer +Declare Function uncompress Lib "ZLIB32.DLL" + (ByVal uncompr As String, uncomprLen As Any, ByVal compr As + String, ByVal lcompr As Long) As Long +Declare Function gzopen Lib "ZLIB32.DLL" + (ByVal file As String, ByVal mode As String) As Long +Declare Function gzread Lib "ZLIB32.DLL" + (ByVal file As Long, ByVal uncompr As String, ByVal + uncomprLen As Long) As Long +Declare Function gzwrite Lib "ZLIB32.DLL" + (ByVal file As Long, ByVal uncompr As String, ByVal + uncomprLen As Long) As Long +Declare Function gzclose Lib "ZLIB32.DLL" + (ByVal file As Long) As Long +#End If + +-Jon Caruana +jon-net@usa.net +Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member + + +Here is another example from Michael that he +says conforms to the VB guidelines, and that solves the problem of not +knowing the uncompressed size by storing it at the end of the file: + +'Calling the functions: +'bracket meaning: [optional] {Range of possible values} +'Call subCompressFile( [, , [level of compression {1..9}]]) +'Call subUncompressFile() + +Option Explicit +Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller' +Private Const SUCCESS As Long = 0 +Private Const strFilExt As String = ".cpr" +Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef +dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long, +ByVal level As Integer) As Long +Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef +dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long) +As Long + +Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal +strargCprFilPth As String, Optional ByVal intLvl As Integer = 9) + Dim strCprPth As String + Dim lngOriSiz As Long + Dim lngCprSiz As Long + Dim bytaryOri() As Byte + Dim bytaryCpr() As Byte + lngOriSiz = FileLen(strargOriFilPth) + ReDim bytaryOri(lngOriSiz - 1) + Open strargOriFilPth For Binary Access Read As #1 + Get #1, , bytaryOri() + Close #1 + strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth) +'Select file path and name + strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) = +strFilExt, "", strFilExt) 'Add file extension if not exists + lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit +more space then original file size + ReDim bytaryCpr(lngCprSiz - 1) + If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) = +SUCCESS Then + lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100 + ReDim Preserve bytaryCpr(lngCprSiz - 1) + Open strCprPth For Binary Access Write As #1 + Put #1, , bytaryCpr() + Put #1, , lngOriSiz 'Add the the original size value to the end +(last 4 bytes) + Close #1 + Else + MsgBox "Compression error" + End If + Erase bytaryCpr + Erase bytaryOri +End Sub + +Public Sub subUncompressFile(ByVal strargFilPth As String) + Dim bytaryCpr() As Byte + Dim bytaryOri() As Byte + Dim lngOriSiz As Long + Dim lngCprSiz As Long + Dim strOriPth As String + lngCprSiz = FileLen(strargFilPth) + ReDim bytaryCpr(lngCprSiz - 1) + Open strargFilPth For Binary Access Read As #1 + Get #1, , bytaryCpr() + Close #1 + 'Read the original file size value: + lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _ + + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _ + + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _ + + bytaryCpr(lngCprSiz - 4) + ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value + ReDim bytaryOri(lngOriSiz - 1) + If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS +Then + strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt)) + Open strOriPth For Binary Access Write As #1 + Put #1, , bytaryOri() + Close #1 + Else + MsgBox "Uncompression error" + End If + Erase bytaryCpr + Erase bytaryOri +End Sub +Public Property Get lngPercentSmaller() As Long + lngPercentSmaller = lngpvtPcnSml +End Property diff --git a/compat/zlib/old/zlib.html b/compat/zlib/old/zlib.html new file mode 100644 index 0000000..8c1b190 --- /dev/null +++ b/compat/zlib/old/zlib.html @@ -0,0 +1,971 @@ + + + + zlib general purpose compression library version 1.1.4 + + + + + +

zlib 1.1.4 Manual

+
+

Contents

+
    +
  1. Prologue +
  2. Introduction +
  3. Utility functions +
  4. Basic functions +
  5. Advanced functions +
  6. Constants +
  7. struct z_stream_s +
  8. Checksum functions +
  9. Misc +
+
+

Prologue

+ 'zlib' general purpose compression library version 1.1.4, March 11th, 2002 +

+ Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler +

+ This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. +

+ Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: +

    +
  1. The origin of this software must not be misrepresented ; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +
  2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +
  3. This notice may not be removed or altered from any source distribution. +
+ +
+
Jean-loup Gailly +
jloup@gzip.org +
Mark Adler +
madler@alumni.caltech.edu +
+ + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files + + ftp://ds.internic.net/rfc/rfc1950.txt + (zlib format), + + rfc1951.txt + (deflate format) and + + rfc1952.txt + (gzip format). +

+ This manual is converted from zlib.h by + piaip +

+ Visit + http://ftp.cdrom.com/pub/infozip/zlib/ + for the official zlib web page. +

+ +


+

Introduction

+ The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed + data. This version of the library supports only one compression method + (deflation) but other algorithms will be added later and will have the same + stream interface. +

+ + Compression can be done in a single step if the buffers are large + enough (for example if an input file is mmap'ed), or can be done by + repeated calls of the compression function. In the latter case, the + application must provide more input and/or consume the output + (providing more output space) before each call. +

+ + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio. +

+ + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never + crash even in case of corrupted input. +

+ +


+

Utility functions

+ The following utility functions are implemented on top of the +
basic stream-oriented functions. + To simplify the interface, some + default options are assumed (compression level and memory usage, + standard memory allocation functions). The source code of these + utility functions can easily be modified if you need special options. +

Function list

+
    +
  • int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); +
  • int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level); +
  • int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); +
  • typedef voidp gzFile; +
  • gzFile gzopen (const char *path, const char *mode); +
  • gzFile gzdopen (int fd, const char *mode); +
  • int gzsetparams (gzFile file, int level, int strategy); +
  • int gzread (gzFile file, voidp buf, unsigned len); +
  • int gzwrite (gzFile file, const voidp buf, unsigned len); +
  • int VA gzprintf (gzFile file, const char *format, ...); +
  • int gzputs (gzFile file, const char *s); +
  • char * gzgets (gzFile file, char *buf, int len); +
  • int gzputc (gzFile file, int c); +
  • int gzgetc (gzFile file); +
  • int gzflush (gzFile file, int flush); +
  • z_off_t gzseek (gzFile file, z_off_t offset, int whence); +
  • z_off_t gztell (gzFile file); +
  • int gzrewind (gzFile file); +
  • int gzeof (gzFile file); +
  • int gzclose (gzFile file); +
  • const char * gzerror (gzFile file, int *errnum); +
+

Function description

+
+
int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); +
+ Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least 0.1% larger than + sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the + compressed buffer.

+ This function can be used to compress a whole file at once if the + input file is mmap'ed.

+ compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer.

+ +

int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level); +
+ Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. +

+ + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +

+ +

int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); +
+ Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer.

+ This function can be used to decompress a whole file at once if the + input file is mmap'ed. +

+ + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted. +

+ +

typedef voidp gzFile; +

+ +

gzFile gzopen (const char *path, const char *mode); +
+ Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb") but can also include a compression level + ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for + Huffman only compression as in "wb1h". (See the description + of deflateInit2 for more information about the strategy parameter.) +

+ + gzopen can be used to read a file which is not in gzip format ; in this + case gzread will directly read from the file without decompression. +

+ + gzopen returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state ; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). +

+ +

gzFile gzdopen (int fd, const char *mode); +
+ gzdopen() associates a gzFile with the file descriptor fd. File + descriptors are obtained from calls like open, dup, creat, pipe or + fileno (in the file has been previously opened with fopen). + The mode parameter is as in gzopen. +

+ The next call of gzclose on the returned gzFile will also close the + file descriptor fd, just like fclose(fdopen(fd), mode) closes the file + descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). +

+ gzdopen returns NULL if there was insufficient memory to allocate + the (de)compression state. +

+ +

int gzsetparams (gzFile file, int level, int strategy); +
+ Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. +

+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +

+ +

int gzread (gzFile file, voidp buf, unsigned len); +
+ Reads the given number of uncompressed bytes from the compressed file. + If the input file was not in gzip format, gzread copies the given number + of bytes into the buffer. +

+ gzread returns the number of uncompressed bytes actually read (0 for + end of file, -1 for error). +

+ +

int gzwrite (gzFile file, const voidp buf, unsigned len); +
+ Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes actually written + (0 in case of error). +

+ +

int VA gzprintf (gzFile file, const char *format, ...); +
+ Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). +

+ +

int gzputs (gzFile file, const char *s); +
+ Writes the given null-terminated string to the compressed file, excluding + the terminating null character. +

+ gzputs returns the number of characters written, or -1 in case of error. +

+ +

char * gzgets (gzFile file, char *buf, int len); +
+ Reads bytes from the compressed file until len-1 characters are read, or + a newline character is read and transferred to buf, or an end-of-file + condition is encountered. The string is then terminated with a null + character. +

+ gzgets returns buf, or Z_NULL in case of error. +

+ +

int gzputc (gzFile file, int c); +
+ Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. +

+ +

int gzgetc (gzFile file); +
+ Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. +

+ +

int gzflush (gzFile file, int flush); +
+ Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. The return value is the zlib + error number (see function gzerror below). gzflush returns Z_OK if + the flush parameter is Z_FINISH and all output could be flushed. +

+ gzflush should be called only when strictly necessary because it can + degrade compression. +

+ +

z_off_t gzseek (gzFile file, z_off_t offset, int whence); +
+ Sets the starting position for the next gzread or gzwrite on the + given compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. +

+ If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported ; gzseek then compresses a sequence of zeroes up to the new + starting position. +

+ gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +

+ +

int gzrewind (gzFile file); +
+ Rewinds the given file. This function is supported only for reading. +

+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) +

+ +

z_off_t gztell (gzFile file); +
+ Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. +

+ + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +

+ +

int gzeof (gzFile file); +
+ Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +

+ +

int gzclose (gzFile file); +
+ Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. The return value is the zlib + error number (see function gzerror below). +

+ +

const char * gzerror (gzFile file, int *errnum); +
+ Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. +

+

+
+

Basic functions

+

Function list

+
+ +

Function description

+
+
const char * zlibVersion (void); +
The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. +

+ +

int deflateInit (z_streamp strm, int level); +
+ Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. +

+ + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). +

+ + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). +

+ + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. deflateInit does not + perform any compression: this will be done by deflate(). +

+ +

int deflate (z_streamp strm, int flush); +
+ deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce some + output latency (reading input without producing any output) except when + forced to flush.

+ + The detailed semantics are as follows. deflate performs one or both of the + following actions: + +

    +
  • Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + +
  • + Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). + Some output may be provided even if flush is not set. +

+ + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating avail_in or avail_out accordingly ; avail_out + should never be zero before the call. The application can consume the + compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK + and with zero avail_out, it must be called again after making room in the + output buffer because there might be more output pending. +

+ + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In particular + avail_in is zero after the call if enough output space has been provided + before the call.) Flushing may degrade compression for some compression + algorithms and so it should be used only when necessary. +

+ + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + the compression. +

+ + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). +

+ + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there + was enough output space ; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the + stream are deflateReset or deflateEnd. +

+ + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least + 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. +

+ + deflate() sets strm-> adler to the adler32 checksum of all input read + so far (that is, total_in bytes). +

+ + deflate() may update data_type if it can make a good guess about + the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered + binary. This field is only for information purposes and does not affect + the compression algorithm in any manner. +

+ + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). +

+ +

int deflateEnd (z_streamp strm); +
+ All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. +

+ + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, + msg may be set but then points to a static string (which must not be + deallocated). +

+ +

int inflateInit (z_streamp strm); +
+ Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly ; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. +

+ + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) +

+ +

int inflate (z_streamp strm, int flush); +
+ inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may some + introduce some output latency (reading input without producing any output) + except when forced to flush. +

+ + The detailed semantics are as follows. inflate performs one or both of the + following actions: + +

    +
  • Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing + will resume at this point for the next call of inflate(). + +
  • Provide more output starting at next_out and update next_out and + avail_out accordingly. inflate() provides as much output as possible, + until there is no more input data or no more space in the output buffer + (see below about the flush parameter). +

+ + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating the next_* and avail_* values accordingly. + The application can consume the uncompressed output when it wants, for + example when the output buffer is full (avail_out == 0), or after each + call of inflate(). If inflate returns Z_OK and with zero avail_out, it + must be called again after making room in the output buffer because there + might be more output pending. +

+ + If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much + output as possible to the output buffer. The flushing behavior of inflate is + not specified for values of the flush parameter other than Z_SYNC_FLUSH + and Z_FINISH, but the current implementation actually flushes as much output + as possible anyway. +

+ + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step + (a single call of inflate), the parameter flush should be set to + Z_FINISH. In this case all pending input is processed and all pending + output is flushed ; avail_out must be large enough to hold all the + uncompressed data. (The size of the uncompressed data may have been saved + by the compressor for this purpose.) The next operation on this stream must + be inflateEnd to deallocate the decompression state. The use of Z_FINISH + is never required, but can be used to inform inflate that a faster routine + may be used for the single inflate() call. +

+ + If a preset dictionary is needed at this point (see inflateSetDictionary + below), inflate sets strm-adler to the adler32 checksum of the + dictionary chosen by the compressor and returns Z_NEED_DICT ; otherwise + it sets strm-> adler to the adler32 checksum of all output produced + so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or + an error code as described below. At the end of the stream, inflate() + checks that its computed adler32 checksum is equal to that saved by the + compressor and returns Z_STREAM_END only if the checksum is correct. +

+ + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect + adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent + (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if no progress is possible or if there was not + enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR + case, the application may then call inflateSync to look for a good + compression block. +

+ +

int inflateEnd (z_streamp strm); +
+ All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. +

+ + inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +

+
+

Advanced functions

+ The following functions are needed only in some special applications. +

Function list

+
+

Function description

+
+
int deflateInit2 (z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy); + +
This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller.

+ + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library.

+ + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead.

+ + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio ; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel.

+ + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match). Filtered data consists mostly of small values with a + somewhat random distribution. In this case, the compression algorithm is + tuned to compress them better. The effect of Z_FILTERED is to force more + Huffman coding and less string matching ; it is somewhat intermediate + between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects + the compression ratio but not the correctness of the compressed output even + if it is not set appropriately.

+ + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. deflateInit2 does + not perform any compression: this will be done by deflate().

+ +

int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength); +
+ Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any + call of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary).

+ + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy ; the data can then be compressed better than + with the default empty dictionary.

+ + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size in + deflate or deflate2. Thus the strings most likely to be useful should be + put at the end of the dictionary, not at the front.

+ + Upon return of this function, strm-> adler is set to the Adler32 value + of the dictionary ; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.)

+ + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate().

+ +

int deflateCopy (z_streamp dest, z_streamp source); +
+ Sets the destination stream as a complete copy of the source stream.

+ + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and + can consume lots of memory.

+ + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination.

+ +

int deflateReset (z_streamp strm); +
This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. + The stream will keep the same compression level and any other attributes + that may have been set by deflateInit2.

+ + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL).

+ +

int deflateParams (z_streamp strm, int level, int strategy); +
+ Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different + strategy. If the compression level is changed, the input available so far + is compressed with the old level (and may be flushed); the new level will + take effect only at the next call of deflate().

+ + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to + be compressed and flushed. In particular, strm-> avail_out must be + non-zero.

+ + deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR + if strm->avail_out was zero.

+ +

int inflateInit2 (z_streamp strm, int windowBits); + +
This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller.

+ + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. If a compressed stream with a larger window size is given as + input, inflate() will return with the error code Z_DATA_ERROR instead of + trying to allocate a larger window.

+ + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative + memLevel). msg is set to null if there is no error message. inflateInit2 + does not perform any decompression apart from reading the zlib header if + present: this will be done by inflate(). (So next_in and avail_in may be + modified, but next_out and avail_out are unchanged.)

+ +

int inflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength); +
+ Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate + if this call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler32 value returned by this call of + inflate. The compressor and decompressor must use exactly the same + dictionary (see deflateSetDictionary).

+ + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate().

+ +

int inflateSync (z_streamp strm); + +
Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided.

+ + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been found, + or Z_STREAM_ERROR if the stream structure was inconsistent. In the success + case, the application may save the current current value of total_in which + indicates where valid compressed data was found. In the error case, the + application may repeatedly call inflateSync, providing more input each time, + until success or end of the input data.

+ +

int inflateReset (z_streamp strm); +
+ This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. + The stream will keep attributes that may have been set by inflateInit2. +

+ + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +

+

+ +
+

Checksum functions

+ These functions are not related to compression but are exported + anyway because they might be useful in applications using the + compression library. +

Function list

+
+

Function description

+
+
uLong adler32 (uLong adler, const Bytef *buf, uInt len); +
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is NULL, this function returns + the required initial value for the checksum. +

+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. Usage example: +

+
+     uLong adler = adler32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       adler = adler32(adler, buffer, length);
+     }
+     if (adler != original_adler) error();
+   
+ +
uLong crc32 (uLong crc, const Bytef *buf, uInt len); +
+ Update a running crc with the bytes buf[0..len-1] and return the updated + crc. If buf is NULL, this function returns the required initial value + for the crc. Pre- and post-conditioning (one's complement) is performed + within this function so it shouldn't be done by the application. + Usage example: +
+
+     uLong crc = crc32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       crc = crc32(crc, buffer, length);
+     }
+     if (crc != original_crc) error();
+   
+
+
+

struct z_stream_s

+ +
+
+typedef struct z_stream_s {
+    Bytef    *next_in;  /* next input byte */
+    uInt     avail_in;  /* number of bytes available at next_in */
+    uLong    total_in;  /* total nb of input bytes read so far */
+
+    Bytef    *next_out; /* next output byte should be put there */
+    uInt     avail_out; /* remaining free space at next_out */
+    uLong    total_out; /* total nb of bytes output so far */
+
+    char     *msg;      /* last error message, NULL if no error */
+    struct internal_state FAR *state; /* not visible by applications */
+
+    alloc_func zalloc;  /* used to allocate the internal state */
+    free_func  zfree;   /* used to free the internal state */
+    voidpf     opaque;  /* private data object passed to zalloc and zfree */
+
+    int     data_type;  /* best guess about the data type: ascii or binary */
+    uLong   adler;      /* adler32 value of the uncompressed data */
+    uLong   reserved;   /* reserved for future use */
+} z_stream ;
+
+typedef z_stream FAR * z_streamp;  ÿ
+
+
+ The application must update next_in and avail_in when avail_in has + dropped to zero. It must update next_out and avail_out when avail_out + has dropped to zero. The application must initialize zalloc, zfree and + opaque before calling the init function. All other fields are set by the + compression library and must not be updated by the application.

+ + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value.

+ + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe.

+ + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this + if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, + pointers returned by zalloc for objects of exactly 65536 bytes *must* + have their offset normalized to zero. The default allocation function + provided by this library ensures this (see zutil.c). To reduce memory + requirements and avoid any allocation of 64K objects, at the expense of + compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). +

+ + The fields total_in and total_out can be used for statistics or + progress reports. After compression, total_in holds the total size of + the uncompressed data and may be saved for use in the decompressor + (particularly if the decompressor wants to decompress everything in + a single step).

+ +


+

Constants

+ +
+#define Z_NO_FLUSH      0
+#define Z_PARTIAL_FLUSH 1
+	/* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH    2
+#define Z_FULL_FLUSH    3
+#define Z_FINISH        4
+/* Allowed flush values ; see deflate() below for details */
+
+#define Z_OK            0
+#define Z_STREAM_END    1
+#define Z_NEED_DICT     2
+#define Z_ERRNO        (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR   (-3)
+#define Z_MEM_ERROR    (-4)
+#define Z_BUF_ERROR    (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION         0
+#define Z_BEST_SPEED             1
+#define Z_BEST_COMPRESSION       9
+#define Z_DEFAULT_COMPRESSION  (-1)
+/* compression levels */
+
+#define Z_FILTERED            1
+#define Z_HUFFMAN_ONLY        2
+#define Z_DEFAULT_STRATEGY    0
+/* compression strategy ; see deflateInit2() below for details */
+
+#define Z_BINARY   0
+#define Z_ASCII    1
+#define Z_UNKNOWN  2
+/* Possible values of the data_type field */
+
+#define Z_DEFLATED   8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions less than 1.0.2 */
+
+
+ +
+

Misc

+
deflateInit and inflateInit are macros to allow checking the zlib version + and the compiler's view of z_stream. +

+ Other functions: +

+
const char * zError (int err); +
int inflateSyncPoint (z_streamp z); +
const uLongf * get_crc_table (void); +
+
+ + Last update: Wed Oct 13 20:42:34 1999
+ piapi@csie.ntu.edu.tw +
+ + + diff --git a/compat/zlib/projects/README.projects b/compat/zlib/projects/README.projects new file mode 100644 index 0000000..1c029e4 --- /dev/null +++ b/compat/zlib/projects/README.projects @@ -0,0 +1,41 @@ +This directory contains project files for building zlib under various +Integrated Development Environments (IDE). + +If you wish to submit a new project to this directory, you should comply +to the following requirements. Otherwise (e.g. if you wish to integrate +a custom piece of code that changes the zlib interface or its behavior), +please consider submitting the project to the contrib directory. + + +Requirements +============ + +- The project must build zlib using the source files from the official + zlib source distribution, exclusively. + +- If the project produces redistributable builds (e.g. shared objects + or DLL files), these builds must be compatible to those produced by + makefiles, if such makefiles exist in the zlib distribution. + In particular, if the project produces a DLL build for the Win32 + platform, this build must comply to the officially-ammended Win32 DLL + Application Binary Interface (ABI), described in win32/DLL_FAQ.txt. + +- The project may provide additional build targets, which depend on + 3rd-party (unofficially-supported) software, present in the contrib + directory. For example, it is possible to provide an "ASM build", + besides the officially-supported build, and have ASM source files + among its dependencies. + +- If there are significant differences between the project files created + by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name + of the project directory should contain the version number of the IDE + for which the project is intended (e.g. "visualc6" for Visual C++ 6.0, + or "visualc7" for Visual C++ 7.0 and 7.1). + + +Current projects +================ + +visualc6/ by Simon-Pierre Cadieux + and Cosmin Truta + Project for Microsoft Visual C++ 6.0 diff --git a/compat/zlib/projects/visualc6/README.txt b/compat/zlib/projects/visualc6/README.txt new file mode 100644 index 0000000..d0296c2 --- /dev/null +++ b/compat/zlib/projects/visualc6/README.txt @@ -0,0 +1,73 @@ +Microsoft Developer Studio Project Files, Format Version 6.00 for zlib. + +Copyright (C) 2000-2004 Simon-Pierre Cadieux. +Copyright (C) 2004 Cosmin Truta. +For conditions of distribution and use, see copyright notice in zlib.h. + + +This project builds the zlib binaries as follows: + +* Win32_DLL_Release\zlib1.dll DLL build +* Win32_DLL_Debug\zlib1d.dll DLL build (debug version) +* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code +* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version) +* Win32_LIB_Release\zlib.lib static build +* Win32_LIB_Debug\zlibd.lib static build (debug version) +* Win32_LIB_ASM_Release\zlib.lib static build using ASM code +* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version) + + +For more information regarding the DLL builds, please see the DLL FAQ +in ..\..\win32\DLL_FAQ.txt. + + +To build and test: + +1) On the main menu, select "File | Open Workspace". + Open "zlib.dsw". + +2) Select "Build | Set Active Configuration". + Choose the configuration you wish to build. + +3) Select "Build | Clean". + +4) Select "Build | Build ... (F7)". Ignore warning messages about + not being able to find certain include files (e.g. alloc.h). + +5) If you built one of the sample programs (example or minigzip), + select "Build | Execute ... (Ctrl+F5)". + + +To use: + +1) Select "Project | Settings (Alt+F7)". + Make note of the configuration names used in your project. + Usually, these names are "Win32 Release" and "Win32 Debug". + +2) In the Workspace window, select the "FileView" tab. + Right-click on the root item "Workspace '...'". + Select "Insert Project into Workspace". + Switch on the checkbox "Dependency of:", and select the name + of your project. Open "zlib.dsp". + +3) Select "Build | Configurations". + For each configuration of your project: + 3.1) Choose the zlib configuration you wish to use. + 3.2) Click on "Add". + 3.3) Set the new zlib configuration name to the name used by + the configuration from the current iteration. + +4) Select "Build | Set Active Configuration". + Choose the configuration you wish to build. + +5) Select "Build | Build ... (F7)". + +6) If you built an executable program, select + "Build | Execute ... (Ctrl+F5)". + + +Note: + +To build the ASM-enabled code, you need Microsoft Assembler +(ML.EXE). You can get it by downloading and installing the +latest Processor Pack for Visual C++ 6.0. diff --git a/compat/zlib/projects/visualc6/example.dsp b/compat/zlib/projects/visualc6/example.dsp new file mode 100644 index 0000000..e072a37 --- /dev/null +++ b/compat/zlib/projects/visualc6/example.dsp @@ -0,0 +1,278 @@ +# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=example - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "example.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "example - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "example___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "example___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "example - Win32 DLL Release" +# Name "example - Win32 DLL Debug" +# Name "example - Win32 DLL ASM Release" +# Name "example - Win32 DLL ASM Debug" +# Name "example - Win32 LIB Release" +# Name "example - Win32 LIB Debug" +# Name "example - Win32 LIB ASM Release" +# Name "example - Win32 LIB ASM Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\example.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# End Group +# End Target +# End Project diff --git a/compat/zlib/projects/visualc6/minigzip.dsp b/compat/zlib/projects/visualc6/minigzip.dsp new file mode 100644 index 0000000..f32024e --- /dev/null +++ b/compat/zlib/projects/visualc6/minigzip.dsp @@ -0,0 +1,278 @@ +# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=minigzip - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "minigzip.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "minigzip - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "minigzip - Win32 DLL Release" +# Name "minigzip - Win32 DLL Debug" +# Name "minigzip - Win32 DLL ASM Release" +# Name "minigzip - Win32 DLL ASM Debug" +# Name "minigzip - Win32 LIB Release" +# Name "minigzip - Win32 LIB Debug" +# Name "minigzip - Win32 LIB ASM Release" +# Name "minigzip - Win32 LIB ASM Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\minigzip.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# End Group +# End Target +# End Project diff --git a/compat/zlib/projects/visualc6/zlib.dsp b/compat/zlib/projects/visualc6/zlib.dsp new file mode 100644 index 0000000..0fe0604 --- /dev/null +++ b/compat/zlib/projects/visualc6/zlib.dsp @@ -0,0 +1,609 @@ +# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=zlib - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib" + +!ENDIF + +# Begin Target + +# Name "zlib - Win32 DLL Release" +# Name "zlib - Win32 DLL Debug" +# Name "zlib - Win32 DLL ASM Release" +# Name "zlib - Win32 DLL ASM Debug" +# Name "zlib - Win32 LIB Release" +# Name "zlib - Win32 LIB Debug" +# Name "zlib - Win32 LIB ASM Release" +# Name "zlib - Win32 LIB ASM Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\adler32.c +# End Source File +# Begin Source File + +SOURCE=..\..\compress.c +# End Source File +# Begin Source File + +SOURCE=..\..\crc32.c +# End Source File +# Begin Source File + +SOURCE=..\..\deflate.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzio.c +# End Source File +# Begin Source File + +SOURCE=..\..\infback.c +# End Source File +# Begin Source File + +SOURCE=..\..\inffast.c +# End Source File +# Begin Source File + +SOURCE=..\..\inflate.c +# End Source File +# Begin Source File + +SOURCE=..\..\inftrees.c +# End Source File +# Begin Source File + +SOURCE=..\..\trees.c +# End Source File +# Begin Source File + +SOURCE=..\..\uncompr.c +# End Source File +# Begin Source File + +SOURCE=..\..\win32\zlib.def + +!IF "$(CFG)" == "zlib - Win32 DLL Release" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\zutil.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\crc32.h +# End Source File +# Begin Source File + +SOURCE=..\..\deflate.h +# End Source File +# Begin Source File + +SOURCE=..\..\inffast.h +# End Source File +# Begin Source File + +SOURCE=..\..\inffixed.h +# End Source File +# Begin Source File + +SOURCE=..\..\inflate.h +# End Source File +# Begin Source File + +SOURCE=..\..\inftrees.h +# End Source File +# Begin Source File + +SOURCE=..\..\trees.h +# End Source File +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\zutil.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\win32\zlib1.rc +# End Source File +# End Group +# Begin Group "Assembler Files (Unsupported)" + +# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx" +# Begin Source File + +SOURCE=..\..\contrib\masmx86\gvmat32.asm + +!IF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Release +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Debug +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Release +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Debug +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\contrib\masmx86\gvmat32c.c + +!IF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# ADD CPP /I "..\.." + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\contrib\masmx86\inffas32.asm + +!IF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Release +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Debug +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Release +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Debug +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ENDIF + +# End Source File +# End Group +# Begin Source File + +SOURCE=.\README.txt +# End Source File +# End Target +# End Project diff --git a/compat/zlib/projects/visualc6/zlib.dsw b/compat/zlib/projects/visualc6/zlib.dsw new file mode 100644 index 0000000..3a771fc --- /dev/null +++ b/compat/zlib/projects/visualc6/zlib.dsw @@ -0,0 +1,59 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "example"=.\example.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency +}}} + +############################################################################### + +Project: "minigzip"=.\minigzip.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency +}}} + +############################################################################### + +Project: "zlib"=.\zlib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + -- cgit v0.12 From 131acdf42e8cb3d6301bbefbac3e7e5e47dc148f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 19 Dec 2008 15:39:10 +0000 Subject: fix odbc build on mingw32 TODO: re-generate tclconfig/configure! (I don't have autoconf-2.59, could someone do that?) --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5034f3e..75e1325 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-12-19 Jan Nijtmans + * pkgs/tdbc/tclconfig/tcl.m4: fix odbc build on mingw32 + TODO: re-generate tclconfig/configure! + (I don't have autoconf-2.59, could someone do that?) + +2008-12-19 Jan Nijtmans + * generic/tclInt.decls CONSTify TclGetLoadedPackages second param * generic/tclLoad.c * generic/tclIntDecls.h (regenerated) -- cgit v0.12 From 7aa058d87f493944e376cf5452c5208dc914137a Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 16:01:42 +0000 Subject: * tests/chanio.test: Add missing [removeFile] cleanups. --- ChangeLog | 2 ++ tests/chanio.test | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75e1325..b22314d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ 2008-12-19 Don Porter + * tests/chanio.test: Add missing [removeFile] cleanups. + * unix/Makefile.in: Update `make dist` target to include the files from the compat/zlib directory as well as all the bundled packages found under the pkgs directory, according to their individual diff --git a/tests/chanio.test b/tests/chanio.test index 1c77e53..df78461 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.20 2008/12/19 03:31:00 dgp Exp $ +# RCS: @(#) $Id: chanio.test,v 1.21 2008/12/19 16:01:42 dgp Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -2128,13 +2128,14 @@ test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel o chan close $f set l } {file1 file2} -test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { +test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} -setup { set cat [makeFile { fconfigure stdout -buffering line while {[gets stdin line]>=0} {puts $line} puts DONE exit 0 } cat.tcl] +} -body { set ::ff [open "|[list [interpreter] $cat]" r+] puts $::ff Hey close $::ff w @@ -2151,8 +2152,10 @@ test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} { after cancel $timer close $::ff r list $::done $::acc -} {Succeeded {Hey DONE}} -test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { +} -cleanup { + removeFile cat.tcl +} -result {Succeeded {Hey DONE}} +test chan-io-28.7 {Tcl_CloseEx (half-close) socket} -setup { set echo [makeFile { proc accept {s args} {set ::sok $s} set s [socket -server accept 0] @@ -2164,6 +2167,7 @@ test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { puts $::sok DONE exit 0 } echo.tcl] +} -body { set ::ff [open "|[list [interpreter] $echo]" r] gets $::ff port set ::s [socket 127.0.0.1 $port] @@ -2183,7 +2187,9 @@ test chan-io-28.7 {Tcl_CloseEx (half-close) socket} { close $::s r close $::ff list $::done $::acc -} {Succeeded {Hey DONE}} +} -cleanup { + removeFile echo.tcl +} -result {Succeeded {Hey DONE}} test chan-io-29.1 {Tcl_WriteChars, channel not writable} { list [catch {chan puts stdin hello} msg] $msg -- cgit v0.12 From 873daeed9f72e634e72125dd44403e8af786e493 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 16:19:09 +0000 Subject: regen with autoconf-2.59 (why dkf just did another regen I don't understand) --- unix/configure | 12618 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 6327 insertions(+), 6291 deletions(-) diff --git a/unix/configure b/unix/configure index bbdcde9..0734c05 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,181 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -ZLIB_DIR -ZLIB_OBJS -ZLIB_SRCS -ZLIB_INCLUDE -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -PKG_CFG_ARGS -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -780,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -843,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -908,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -938,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1012,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1074,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1118,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1138,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1177,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1275,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1292,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1358,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1465,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1479,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1501,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1511,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1533,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1544,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1558,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1596,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1629,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1677,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1703,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1716,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1745,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1762,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1786,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1824,23 +1359,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } - - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1849,37 +1385,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1902,8 +1437,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1916,34 +1451,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1956,51 +1489,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2013,34 +1531,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2054,7 +1612,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2065,7 +1623,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2083,23 +1640,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2112,38 +1668,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2156,45 +1710,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2207,35 +1745,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2260,77 +1784,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2342,21 +1836,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2375,27 +1867,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2406,8 +1893,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2421,14 +1909,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2448,20 +1936,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2479,12 +1961,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2507,49 +1989,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2565,118 +2048,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2692,12 +2095,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2731,17 +2134,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2756,116 +2154,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +continue fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2898,8 +2446,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2933,22 +2481,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2957,10 +2507,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2970,22 +2519,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -2996,7 +2547,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3014,8 +2564,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3038,22 +2588,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3062,10 +2614,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3075,22 +2626,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3101,7 +2654,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3124,170 +2676,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3311,31 +2716,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3391,7 +2800,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3411,27 +2819,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3444,14 +2843,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3474,9 +2871,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3490,35 +2887,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3530,8 +2930,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3571,36 +2971,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3611,17 +3014,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3632,37 +3035,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3671,22 +3078,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3694,10 +3103,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3721,18 +3129,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3747,17 +3162,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3768,37 +3183,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3807,22 +3226,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3830,10 +3251,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3857,18 +3277,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3883,17 +3310,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3904,37 +3331,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3943,22 +3374,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3966,10 +3399,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3993,18 +3425,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4023,17 +3462,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4044,37 +3483,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4083,22 +3526,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4106,10 +3551,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4133,18 +3577,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4213,17 +3664,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4234,37 +3685,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4273,22 +3728,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4296,10 +3753,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4323,18 +3779,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4391,17 +3854,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4412,37 +3875,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4451,22 +3918,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4474,10 +3943,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4501,18 +3969,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4527,17 +4002,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4548,37 +4023,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4587,22 +4066,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4610,10 +4091,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4637,18 +4117,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4668,19 +4155,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4691,37 +4177,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4730,22 +4220,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4753,10 +4245,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4780,19 +4271,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4812,8 +4309,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4835,35 +4332,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4874,13 +4375,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4912,8 +4413,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4926,53 +4427,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4985,8 +4489,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4999,53 +4503,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5058,8 +4565,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5072,53 +4579,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5129,8 +4639,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5143,53 +4653,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5197,8 +4710,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5211,53 +4724,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5282,9 +4798,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5310,60 +4826,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5376,8 +4900,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5385,15 +4909,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5405,11 +4929,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5438,8 +4962,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5466,67 +4990,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5543,43 +5076,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5590,8 +5126,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5608,59 +5144,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5671,37 +5210,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5710,22 +5253,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5733,10 +5278,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5760,18 +5304,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -5804,8 +5355,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5832,59 +5383,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5892,8 +5452,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5920,64 +5480,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5990,53 +5559,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6049,8 +5621,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6077,59 +5649,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6137,8 +5718,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6165,64 +5746,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6235,53 +5825,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6294,15 +5887,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6312,12 +5905,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6333,17 +5926,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6354,37 +5947,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6393,22 +5990,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6416,10 +6015,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6443,24 +6041,31 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6472,47 +6077,50 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -typedef gz_header ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((gz_header *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (gz_header)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_gz_header=no +ac_cv_type_gz_header=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6 if test $ac_cv_type_gz_header = yes; then : else @@ -6527,12 +6135,13 @@ fi if test $zlib_ok = yes; then - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS +ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6540,73 +6149,115 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -return deflateSetHeader (); +deflateSetHeader (); ; return 0; } _ACEOF -for ac_lib in '' z; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_deflateSetHeader=$ac_res + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_deflateSetHeader" = no; then + for ac_lib in z; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then - break -fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="-l$ac_lib" +break else - ac_cv_search_deflateSetHeader=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 +if test "$ac_cv_search_deflateSetHeader" != no; then + test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" else @@ -6646,8 +6297,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6660,34 +6311,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6700,41 +6349,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6743,31 +6378,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6777,8 +6412,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6802,37 +6437,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6846,24 +6484,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6890,16 +6528,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6912,53 +6550,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -7001,8 +6642,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7015,27 +6656,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7061,8 +6700,8 @@ fi CC=${CC}_r ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7140,10 +6779,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7163,8 +6804,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7177,53 +6818,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7255,8 +6899,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7269,53 +6913,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7376,8 +7023,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7390,53 +7037,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7507,8 +7157,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7521,53 +7171,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7699,8 +7352,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7723,37 +7376,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7842,8 +7498,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7869,8 +7525,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7901,8 +7557,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7928,8 +7584,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7993,8 +7649,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8017,37 +7673,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8056,8 +7715,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8080,37 +7739,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8136,8 +7798,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8160,37 +7822,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8209,8 +7874,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8233,37 +7898,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8290,21 +7958,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8338,32 +8006,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8374,8 +8045,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8391,8 +8062,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8416,39 +8087,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8784,25 +8458,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8813,37 +8487,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8852,22 +8530,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8875,10 +8555,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8902,18 +8581,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -8922,8 +8608,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -8998,8 +8684,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9022,37 +8708,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9087,13 +8776,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9238,22 +8927,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9263,8 +8952,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9299,11 +8988,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9324,8 +9013,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9347,28 +9036,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9385,34 +9079,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9444,28 +9141,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9482,34 +9184,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9541,28 +9246,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__largefile_source64=no + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9579,34 +9289,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9619,17 +9332,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9652,31 +9365,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9698,31 +9415,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9731,20 +9451,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9766,34 +9486,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9802,8 +9526,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9825,34 +9549,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9866,9 +9594,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9894,60 +9622,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9956,8 +9692,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9979,31 +9715,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10014,11 +9754,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -10028,8 +9768,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10046,8 +9786,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -10056,22 +9795,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10094,36 +9838,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10133,11 +9881,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10148,22 +9896,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10179,10 +9932,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10190,41 +9941,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10237,16 +9974,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10275,9 +10009,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10303,60 +10037,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10380,9 +10122,9 @@ done for ac_func in opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10408,78 +10150,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10506,59 +10258,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10569,8 +10330,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10597,59 +10358,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10660,8 +10430,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10688,59 +10458,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10751,8 +10530,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10779,59 +10558,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -10849,8 +10637,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10877,59 +10665,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -10941,8 +10738,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10969,63 +10766,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11053,34 +10859,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11098,8 +10908,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11126,63 +10936,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11213,34 +11032,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11249,8 +11072,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11281,34 +11104,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11328,8 +11155,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11356,63 +11183,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getpwnam_r=yes -else - echo "$as_me: failed program was:" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getpwnam_r=yes +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11443,34 +11279,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11479,8 +11319,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11511,34 +11351,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11558,8 +11402,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11586,63 +11430,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11673,34 +11526,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11709,8 +11566,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11741,34 +11598,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11788,8 +11649,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11816,63 +11677,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11903,34 +11773,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11939,8 +11813,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11971,34 +11845,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12051,8 +11929,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12079,63 +11957,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12166,34 +12053,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12202,8 +12093,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12234,34 +12125,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12270,8 +12165,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12300,34 +12195,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12348,8 +12247,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12376,63 +12275,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12466,34 +12374,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12502,8 +12414,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12537,34 +12449,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12598,19 +12514,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12621,37 +12536,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12660,22 +12579,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12683,10 +12604,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12710,19 +12630,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12734,8 +12660,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12763,22 +12689,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12791,10 +12708,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12818,22 +12733,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12846,10 +12752,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12875,22 +12779,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12903,10 +12798,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12934,22 +12827,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12962,10 +12846,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12992,22 +12874,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13020,10 +12893,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13051,22 +12922,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13079,14 +12941,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13116,8 +12976,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13138,38 +12998,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13192,8 +13056,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13215,8 +13079,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13232,42 +13096,44 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h +ac_cv_struct_tm=sys/time.h fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13281,19 +13147,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13304,37 +13169,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13343,22 +13212,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13366,10 +13237,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13393,19 +13263,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13417,8 +13293,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13442,34 +13318,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13478,8 +13358,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13504,28 +13384,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13546,37 +13431,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_tm_tm_zone=no +ac_cv_member_struct_tm_tm_zone=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13593,9 +13481,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then + echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6 +if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13605,126 +13493,60 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif int main () { -#ifndef tzname - (void) tzname; -#endif - +atoi(*tzname); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_tzname=no +ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 + if test $ac_cv_var_tzname = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 _ACEOF - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF - - -fi - - - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } -if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -int -main () -{ -return tzname[0][0]; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_var_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_var_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 -_ACEOF - - fi -fi + fi +fi @@ -13733,9 +13555,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13761,60 +13583,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13824,8 +13654,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13846,34 +13676,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13882,8 +13716,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13904,34 +13738,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13944,8 +13782,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13968,34 +13806,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14006,8 +13848,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14030,34 +13872,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14073,8 +13919,9 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } + +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14096,28 +13943,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14135,37 +13987,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14180,8 +14035,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14208,59 +14063,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14277,8 +14141,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14297,9 +14161,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14315,9 +14179,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14325,22 +14189,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14353,17 +14208,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14374,8 +14229,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14402,59 +14257,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14478,8 +14342,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14506,59 +14370,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14566,8 +14439,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14586,22 +14459,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14614,13 +14478,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14628,10 +14490,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14645,8 +14509,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14673,59 +14537,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14733,8 +14606,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14754,22 +14627,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14782,13 +14646,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14796,10 +14658,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14812,8 +14676,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14840,59 +14704,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14900,8 +14773,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14921,22 +14794,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14949,13 +14813,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14963,10 +14825,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -14981,8 +14845,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15009,59 +14873,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15069,8 +14942,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15106,22 +14979,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15134,18 +14998,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15163,8 +15027,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15175,47 +15039,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15226,8 +15093,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15238,47 +15105,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15289,8 +15159,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15301,59 +15171,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15375,8 +15248,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15391,8 +15264,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15418,34 +15291,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15454,8 +15331,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15466,47 +15343,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15516,8 +15396,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15542,36 +15422,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15582,8 +15466,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15594,47 +15478,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15644,8 +15531,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15671,36 +15558,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15719,8 +15610,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15747,59 +15638,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15819,8 +15719,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15846,36 +15746,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15890,8 +15793,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15918,59 +15821,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15978,8 +15890,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15992,53 +15904,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16047,8 +15962,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16061,53 +15976,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16116,10 +16034,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -16136,8 +16056,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16164,59 +16084,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16225,8 +16154,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16253,59 +16182,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16319,8 +16257,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16343,8 +16281,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16360,8 +16298,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16383,34 +16321,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16418,8 +16360,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16443,34 +16385,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16483,8 +16429,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16519,22 +16465,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16547,13 +16484,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16567,28 +16502,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16599,37 +16534,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16638,22 +16577,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16661,10 +16602,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16688,18 +16628,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16710,8 +16657,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16733,35 +16680,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16770,8 +16721,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16784,9 +16735,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16812,60 +16763,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16879,8 +16838,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16903,36 +16862,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16950,9 +16912,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16978,60 +16940,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17044,19 +17014,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17067,37 +17036,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17106,22 +17079,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17129,10 +17104,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17156,19 +17130,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17184,9 +17164,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17212,60 +17192,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17279,19 +17267,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17302,37 +17289,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17341,22 +17332,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17364,10 +17357,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17391,19 +17383,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17419,9 +17417,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17447,60 +17445,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17513,9 +17519,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17541,60 +17547,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17628,19 +17642,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17651,37 +17664,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17690,22 +17707,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17713,10 +17732,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17740,19 +17758,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17765,8 +17789,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17797,37 +17821,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17848,8 +17875,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17878,36 +17905,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17927,19 +17957,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17950,37 +17979,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17989,22 +18022,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18012,10 +18047,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18039,19 +18073,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18067,19 +18107,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18090,37 +18129,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18129,22 +18172,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18152,10 +18197,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18179,19 +18223,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18204,8 +18254,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18232,12 +18282,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18250,8 +18300,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18259,27 +18309,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18287,8 +18337,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18296,24 +18346,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18337,8 +18387,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18351,8 +18401,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18360,26 +18410,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18390,37 +18440,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18429,22 +18483,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18452,10 +18508,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18479,18 +18534,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18504,8 +18566,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18521,32 +18583,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18570,8 +18631,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18600,15 +18661,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18622,16 +18683,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18643,7 +18704,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18656,7 +18717,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" if test "${libdir}" = '${exec_prefix}/lib'; then @@ -18825,7 +18886,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18845,58 +18906,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18905,36 +18947,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -18963,45 +19021,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19011,43 +19041,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -19061,19 +19056,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19081,120 +19075,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19203,28 +19236,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19233,14 +19245,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19248,19 +19277,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19268,7 +19308,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19282,20 +19322,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19306,42 +19344,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19357,52 +19413,40 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19413,482 +19457,374 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -ZLIB_DIR!$ZLIB_DIR$ac_delim -ZLIB_OBJS!$ZLIB_OBJS$ac_delim -ZLIB_SRCS!$ZLIB_SRCS$ac_delim -ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 34; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@ZLIB_DIR@,$ZLIB_DIR,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t +s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t +s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19896,52 +19832,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 1dad0ff88fe2c9b7d7c9c48a4d619773d3968547 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 16:20:29 +0000 Subject: Move log entry regarding tdbc from ChangeLog to pkgs/tdbc/ChangeLog --- ChangeLog | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b22314d..ad0ede5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,5 @@ 2008-12-19 Jan Nijtmans - * pkgs/tdbc/tclconfig/tcl.m4: fix odbc build on mingw32 - TODO: re-generate tclconfig/configure! - (I don't have autoconf-2.59, could someone do that?) - -2008-12-19 Jan Nijtmans - * generic/tclInt.decls CONSTify TclGetLoadedPackages second param * generic/tclLoad.c * generic/tclIntDecls.h (regenerated) -- cgit v0.12 From d8cf17b5669133edbad8eb62f9214a1a040274cc Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 17:07:47 +0000 Subject: * tests/io.test: Add missing [close $f] to io-73.2. --- ChangeLog | 1 + tests/io.test | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad0ede5..0bb2e71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ 2008-12-19 Don Porter * tests/chanio.test: Add missing [removeFile] cleanups. + * tests/io.test: Add missing [close $f] to io-73.2. * unix/Makefile.in: Update `make dist` target to include the files from the compat/zlib directory as well as all the bundled packages diff --git a/tests/io.test b/tests/io.test index 9f41db0..0ab8909 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.92 2008/12/11 17:30:18 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.93 2008/12/19 17:07:47 dgp Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7695,15 +7695,18 @@ test io-73.1 {channel Tcl_Obj SetChannelFromAny} {} { catch {close [lreplace [list a] 0 end]} } {1} -test io-73.2 {channel Tcl_Obj SetChannelFromAny, bug 2407783} {} { +test io-73.2 {channel Tcl_Obj SetChannelFromAny, bug 2407783} -setup { # Invalidate intrep of 'channel' Tcl_Obj when transiting between interpreters. - interp create foo set f [open [info script] r] +} -body { + interp create foo seek $f 0 set code [catch {interp eval foo [list seek $f 0]} msg] # The string map converts the changing channel handle to a fixed string list $code [string map [list $f @@] $msg] -} {1 {can not find channel named "@@"}} +} -cleanup { + close $f +} -result {1 {can not find channel named "@@"}} # ### ### ### ######### ######### ######### -- cgit v0.12 From b583eaf3ffd7fc282474c0c86517fcb2532868d0 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 17:54:22 +0000 Subject: tag for 8.6b1 release --- ChangeLog | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bb2e71..230e726 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,7 @@ -2008-12-19 Jan Nijtmans - - * generic/tclInt.decls CONSTify TclGetLoadedPackages second param - * generic/tclLoad.c - * generic/tclIntDecls.h (regenerated) - 2008-12-19 Don Porter + *** 8.6b1 TAGGED FOR RELEASE *** + * tests/chanio.test: Add missing [removeFile] cleanups. * tests/io.test: Add missing [close $f] to io-73.2. @@ -26,6 +22,12 @@ * unix/configure: autoconf-2.59 * win/configure: +2008-12-19 Jan Nijtmans + + * generic/tclInt.decls CONSTify TclGetLoadedPackages second param + * generic/tclLoad.c + * generic/tclIntDecls.h (regenerated) + 2008-12-19 Kevin Kenny * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all. -- cgit v0.12 From eb4fe33c3e35050c9feb2b4aadd786f8aae7bc64 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 19 Dec 2008 18:23:04 +0000 Subject: * doc/NRE.3: Formatting errors found by `make html` * doc/Tcl_Main.3: * doc/zlib.n: --- ChangeLog | 4 ++++ doc/NRE.3 | 6 +++--- doc/Tcl_Main.3 | 4 ++-- doc/zlib.n | 14 ++++++-------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 230e726..a68bea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ *** 8.6b1 TAGGED FOR RELEASE *** + * doc/NRE.3: Formatting errors found by `make html` + * doc/Tcl_Main.3: + * doc/zlib.n: + * tests/chanio.test: Add missing [removeFile] cleanups. * tests/io.test: Add missing [close $f] to io-73.2. diff --git a/doc/NRE.3 b/doc/NRE.3 index a453219..331e406 100644 --- a/doc/NRE.3 +++ b/doc/NRE.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: NRE.3,v 1.2 2008/12/15 23:42:01 patthoyts Exp $ +'\" RCS: @(#) $Id: NRE.3,v 1.3 2008/12/19 18:23:04 dgp Exp $ '\" .so man.macros .TH NRE 3 8.6 Tcl "Tcl Library Procedures" @@ -111,7 +111,7 @@ does not delete any existing command of the same name, and returns NULL. .PP The \fIproc\fR and \fInreProc\fR function are expected to conform to all the rules set forth for the \fIproc\fR argument to -\fBTcl_CreateObjCommand\fR(3) (\Iq.v.\fR). +\fBTcl_CreateObjCommand\fR(3) (\fIq.v.\fR). .PP When a command that is written to cope with evaluation via trampoline is invoked without a trampoline on the stack, it will usually respond @@ -269,7 +269,7 @@ int TheCmdNRPostProc \fBClientData\fR \fIdata\fR[], \fBTcl_Interp\fR *\fIinterp\fR, - int \fRresult\fR + int \fIresult\fR { /* \fIdata[0] .. data[4]\fR are the four words of data * passed to \fBTcl_NREvalObj\fR */ diff --git a/doc/Tcl_Main.3 b/doc/Tcl_Main.3 index cca8158..e37ffe4 100644 --- a/doc/Tcl_Main.3 +++ b/doc/Tcl_Main.3 @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl_Main.3,v 1.19 2008/12/15 15:48:33 dgp Exp $ +'\" RCS: @(#) $Id: Tcl_Main.3,v 1.20 2008/12/19 18:23:04 dgp Exp $ '\" .so man.macros .TH Tcl_Main 3 8.4 Tcl "Tcl Library Procedures" @@ -125,7 +125,7 @@ where \fIfileName\fR does not begin with the character \fI\-\fR, then \fIfileName\fR is taken to be the name of a file containing a \fIstartup script\fR, and \fIname\fR is taken to be the name of the encoding of the contents of that file. \fBTcl_Main\fR -then calls \fRTcl_SetStartupScript\fR with these values. +then calls \fBTcl_SetStartupScript\fR with these values. .PP \fBTcl_Main\fR then defines in its master interpreter the Tcl variables \fIargc\fR, \fIargv\fR, \fIargv0\fR, and diff --git a/doc/zlib.n b/doc/zlib.n index 45bfd1d..e3c2122 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.5 2008/12/18 10:37:43 dkf Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.6 2008/12/19 18:23:04 dgp Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -143,7 +143,7 @@ zlib-format data on \fIchannel\fR, which must be writable. \fBdecompress\fR . The transformation will be a decompressing transformation that reads -zlib-format data from \fIchannel\R, which must be readable. +zlib-format data from \fIchannel\fR, which must be readable. .TP \fBdeflate\fR . @@ -153,7 +153,7 @@ compressed data on \fIchannel\fR, which must be writable. \fBgunzip\fR . The transformation will be a decompressing transformation that reads -gzip-format data from \fIchannel\R, which must be readable. +gzip-format data from \fIchannel\fR, which must be readable. .TP \fBgzip\fR . @@ -163,7 +163,7 @@ gzip-format data on \fIchannel\fR, which must be writable. \fBinflate\fR . The transformation will be a decompressing transformation that reads raw -compressed data from \fIchannel\R, which must be readable. +compressed data from \fIchannel\fR, which must be readable. .PP The following options may be set when creating a transformation: .TP @@ -269,7 +269,7 @@ the transformed data. The full set of subcommands supported by a streaming instance command, \fIstream\fR, is as follows: .TP -\fIstream \fBadd\fR ?\fIoption\fR? \Idata\fR +\fIstream \fBadd\fR ?\fIoption\fR? \fIdata\fR . A short-cut for .QW "\fIstream \fBput \fIoption data\fR" @@ -375,9 +375,7 @@ set compData [$\fIstrm \fBget\fR] $\fIstrm \fBclose\fR .CE .SH "SEE ALSO" -binary(n), chan(n), encoding(n), Tcl_ZlibDeflate(3) -.br -RFC1950 \- RFC1952 +binary(n), chan(n), encoding(n), Tcl_ZlibDeflate(3), RFC1950 \- RFC1952 .SH "KEYWORDS" compress, decompress, deflate, gzip, inflate '\" Local Variables: -- cgit v0.12 From 6ea9bac1b2efe936f50571e3d5389f1f83c787a6 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 20 Dec 2008 01:03:32 +0000 Subject: fix warning --- unix/tclUnixTest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index 469e00a..b5ff0c4 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.29 2008/10/03 19:20:24 msofer Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.30 2008/12/20 01:03:32 das Exp $ */ #include "tclInt.h" @@ -55,7 +55,7 @@ static Pipe testPipes[MAX_PIPES]; * The stuff below is used by the testalarm and testgotsig ommands. */ -static char *gotsig = "0"; +static const char *gotsig = "0"; /* * Forward declarations of functions defined later in this file: -- cgit v0.12 From a35311fd266c5c697d84b6756f65b208701578d7 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 20 Dec 2008 01:11:10 +0000 Subject: * unix/Makefile.in: make package install directory of bundled * unix/configure.in packages configurable via PACKAGE_DIR makefile variable (set to platform-specific default). * unix/Makefile.in (*-packages): ensure toplevel targets fail if sub-make/configure fails; fix quoting when builddir path contains spaces. * macosx/GNUmakefile: add install-packages to install targets. * unix/configure: autoconf-2.59 --- ChangeLog | 14 ++++++++ macosx/GNUmakefile | 4 +-- unix/Makefile.in | 99 +++++++++++++++++++++++++++--------------------------- unix/configure | 12 ++++++- unix/configure.in | 11 +++++- 5 files changed, 86 insertions(+), 54 deletions(-) diff --git a/ChangeLog b/ChangeLog index a68bea3..98962d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-12-20 Daniel Steffen + + * unix/Makefile.in: make package install directory of bundled + * unix/configure.in packages configurable via PACKAGE_DIR makefile + variable (set to platform-specific default). + + * unix/Makefile.in (*-packages): ensure toplevel targets fail if + sub-make/configure fails; fix quoting when + builddir path contains spaces. + + * macosx/GNUmakefile: add install-packages to install targets. + + * unix/configure: autoconf-2.59 + 2008-12-19 Don Porter *** 8.6b1 TAGGED FOR RELEASE *** diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile index 0bf1d04..3298a99 100644 --- a/macosx/GNUmakefile +++ b/macosx/GNUmakefile @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: GNUmakefile,v 1.10 2008/05/06 16:33:07 das Exp $ +# RCS: @(#) $Id: GNUmakefile,v 1.11 2008/12/20 01:11:10 das Exp $ # ######################################################################################################## @@ -108,7 +108,7 @@ ifeq (${EMBEDDED_BUILD},) INSTALL_TARGETS += install-private-headers endif ifeq (${INSTALL_BUILD}_${EMBEDDED_BUILD}_${BUILD_STYLE},1__Deployment) -INSTALL_TARGETS += html-tcl +INSTALL_TARGETS += install-packages html-tcl ifneq (${INSTALL_MANPAGES},) INSTALL_TARGETS += install-doc endif diff --git a/unix/Makefile.in b/unix/Makefile.in index 09dc947..13d4cae 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.254 2008/12/19 10:55:38 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.255 2008/12/20 01:11:10 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -80,6 +80,9 @@ HTML_DIR = @HTML_DIR@ # Directory in which to install html documentation: HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR) +# Directory in which to install bundled packages: +PACKAGE_DIR = @PACKAGE_DIR@ + # Package search path. TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ @@ -149,7 +152,7 @@ SHELL = @MAKEFILE_SHELL@ INSTALL_STRIP_PROGRAM = -s INSTALL_STRIP_LIBRARY = -S -x -INSTALL = @srcdir@/../unix/install-sh -c +INSTALL = $(UNIX_DIR)/install-sh -c INSTALL_PROGRAM = ${INSTALL} INSTALL_LIBRARY = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 @@ -744,8 +747,8 @@ install-binaries: binaries else true; \ fi; \ done; - @if test ! -x $(SRC_DIR)/../unix/install-sh; then \ - chmod +x $(SRC_DIR)/../unix/install-sh; \ + @if test ! -x $(UNIX_DIR)/install-sh; then \ + chmod +x $(UNIX_DIR)/install-sh; \ fi @echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/" @@INSTALL_LIB@ @@ -784,8 +787,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs else true; \ fi; \ done; - @if test ! -x $(SRC_DIR)/../unix/install-sh; then \ - chmod +x $(SRC_DIR)/../unix/install-sh; \ + @if test ! -x $(UNIX_DIR)/install-sh; then \ + chmod +x $(UNIX_DIR)/install-sh; \ fi @echo "Installing header files"; @for i in $(GENERIC_DIR)/tcl.h $(GENERIC_DIR)/tclDecls.h \ @@ -887,8 +890,8 @@ install-private-headers: libraries else true; \ fi; \ done; - @if test ! -x $(SRC_DIR)/../unix/install-sh; then \ - chmod +x $(SRC_DIR)/../unix/install-sh; \ + @if test ! -x $(UNIX_DIR)/install-sh; then \ + chmod +x $(UNIX_DIR)/install-sh; \ fi @echo "Installing private header files"; @for i in $(GENERIC_DIR)/tclInt.h $(GENERIC_DIR)/tclIntDecls.h \ @@ -1599,7 +1602,6 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c .c.o: $(CC) -c $(CC_SWITCHES) $< - # # Bundled Package targets # @@ -1609,99 +1611,96 @@ PKG_CFG_ARGS = @PKG_CFG_ARGS@ PKG_DIR = ./pkgs configure-packages: - @builddir=`pwd`; \ + @builddir="`pwd`"; \ for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ if [ -x $$i/configure ]; then \ - pkg=`basename $$i`; \ - echo "Configuring package '$$pkg'"; \ - mkdir -p $(PKG_DIR)/$$pkg; \ - if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ - ( cd $(PKG_DIR)/$$pkg; \ - $$i/configure --with-tcl=$(PWD) --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \ - fi; \ + pkg=`basename $$i`; \ + echo "Configuring package '$$pkg'"; \ + mkdir -p $(PKG_DIR)/$$pkg; \ + if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; \ + $$i/configure --with-tcl="$${builddir}" \ + --with-tclinclude=$(GENERIC_DIR) \ + $(PKG_CFG_ARGS) --libdir=$(PACKAGE_DIR) \ + --enable-shared --enable-threads; ) || exit $$?; \ + fi; \ fi; \ fi; \ - done; \ - cd $$builddir + done packages: configure-packages ${STUB_LIB_FILE} - @builddir=`pwd`; \ - for i in $(PKGS_DIR)/*; do \ + @for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ pkg=`basename $$i`; \ if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ - echo "Building package '$$pkg'"; \ - ( cd $(PKG_DIR)/$$pkg; $(MAKE); ) \ + echo "Building package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE); ) || exit $$?; \ fi; \ fi; \ - done; \ - cd $$builddir + done install-packages: packages - @builddir=`pwd`; \ - for i in $(PKGS_DIR)/*; do \ + @for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ pkg=`basename $$i`; \ if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ - echo "Installing package '$$pkg'"; \ - ( cd $(PKG_DIR)/$$pkg; $(MAKE) install "DESTDIR=$(INSTALL_ROOT)"; ) \ + echo "Installing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) install \ + "DESTDIR=$(INSTALL_ROOT)"; ) || exit $$?; \ fi; \ fi; \ - done; \ - cd $$builddir + done test-packages: tcltest packages - @builddir=`pwd`; \ + @builddir="`pwd`"; \ for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ pkg=`basename $$i`; \ if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ - echo "Testing package '$$pkg'"; \ - ( cd $(PKG_DIR)/$$pkg; $(MAKE) "LD_LIBRARY_PATH=$$builddir:${LD_LIBRARY_PATH}" "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" "TCLLIBPATH=$$builddir/pkgs" test "TCLSH_PROG=$$builddir/tcltest"; ) \ + echo "Testing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) \ + "@LD_LIBRARY_PATH_VAR@=$${builddir}:$${@LD_LIBRARY_PATH_VAR@}" \ + "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" \ + "TCLLIBPATH=$${builddir}/pkgs" test \ + "TCLSH_PROG=$${builddir}/tcltest"; ) \ fi; \ fi; \ - done; \ - cd $$builddir + done clean-packages: - @builddir=`pwd`; \ - for i in $(PKGS_DIR)/*; do \ + @for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ pkg=`basename $$i`; \ if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ - ( cd $(PKG_DIR)/$$pkg; $(MAKE) clean; ) \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) clean; ) \ fi; \ fi; \ - done; \ - cd $$builddir + done distclean-packages: - @builddir=`pwd`; \ - for i in $(PKGS_DIR)/*; do \ + @for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ pkg=`basename $$i`; \ if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ - ( cd $(PKG_DIR)/$$pkg; $(MAKE) distclean; ) \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) distclean; ) \ fi; \ - cd $$builddir; \ rm -rf $(PKG_DIR)/$$pkg; \ fi; \ done; \ rm -rf $(PKG_DIR) dist-packages: configure-packages - @builddir=`pwd`; \ - rm -rf $(DISTROOT)/pkgs; \ + @rm -rf $(DISTROOT)/pkgs; \ for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ pkg=`basename $$i`; \ if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ - ( cd $(PKG_DIR)/$$pkg; $(MAKE) dist "DIST_ROOT=$(DISTROOT)/pkgs"; ) \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) dist \ + "DIST_ROOT=$(DISTROOT)/pkgs"; ) || exit $$?; \ fi; \ fi; \ - done; \ - cd $$builddir + done # # Target to regenerate header files and stub files from the *.decls tables. diff --git a/unix/configure b/unix/configure index 0734c05..afa9ca5 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' # Initialize some variables set by options. @@ -18720,6 +18720,12 @@ _ACEOF ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" + # default install directory for bundled packages + if test "${libdir}" = '${exec_prefix}/lib' -o "`basename ${libdir}`" = 'Frameworks'; then + PACKAGE_DIR="/Library/Tcl" + else + PACKAGE_DIR="$libdir" + fi if test "${libdir}" = '${exec_prefix}/lib'; then # override libdir default libdir="/Library/Frameworks" @@ -18746,6 +18752,8 @@ _ACEOF else # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" + # default install directory for bundled packages + PACKAGE_DIR="$libdir" if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_LIB_FLAG="-ltcl${TCL_VERSION}" @@ -18886,6 +18894,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF @@ -19611,6 +19620,7 @@ s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t s,@HTML_DIR@,$HTML_DIR,;t t +s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t diff --git a/unix/configure.in b/unix/configure.in index bc2a97c..6c694f6 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.200 2008/12/19 10:55:38 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.201 2008/12/20 01:11:10 das Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -748,6 +748,12 @@ if test "$FRAMEWORK_BUILD" = "1" ; then unset n f v ], VERSION=${TCL_VERSION}) LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" + # default install directory for bundled packages + if test "${libdir}" = '${exec_prefix}/lib' -o "`basename ${libdir}`" = 'Frameworks'; then + PACKAGE_DIR="/Library/Tcl" + else + PACKAGE_DIR="$libdir" + fi if test "${libdir}" = '${exec_prefix}/lib'; then # override libdir default libdir="/Library/Frameworks" @@ -774,6 +780,8 @@ if test "$FRAMEWORK_BUILD" = "1" ; then else # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" + # default install directory for bundled packages + PACKAGE_DIR="$libdir" if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_LIB_FLAG="-ltcl${TCL_VERSION}" @@ -902,6 +910,7 @@ AC_SUBST(TCL_MODULE_PATH) AC_SUBST(TCL_LIBRARY) AC_SUBST(PRIVATE_INCLUDE_DIR) AC_SUBST(HTML_DIR) +AC_SUBST(PACKAGE_DIR) AC_SUBST(EXTRA_CC_SWITCHES) AC_SUBST(EXTRA_APP_CC_SWITCHES) -- cgit v0.12 From 2124aa0e1e3e8107355f56d440526c4437519824 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 20 Dec 2008 01:21:04 +0000 Subject: fix warnings --- generic/tclZlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 98e42ad..114b139 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.16 2008/12/18 10:37:43 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.17 2008/12/20 01:21:04 das Exp $ */ #include "tclInt.h" @@ -2229,7 +2229,7 @@ ChanClose( result = TCL_ERROR; break; } - if (cd->outStream.avail_out != cd->outAllocated) { + if (cd->outStream.avail_out != (unsigned) cd->outAllocated) { if (Tcl_WriteRaw(cd->parent, cd->outBuffer, cd->outAllocated - cd->outStream.avail_out) < 0) { /* TODO: is this the right way to do errors on close? */ @@ -2405,7 +2405,7 @@ ChanSetOption( /* not used */ if (cd->outStream.avail_out > 0) { if (Tcl_WriteRaw(cd->parent, cd->outBuffer, - (int) cd->outStream.next_out) < 0) { + PTR2INT(cd->outStream.next_out)) < 0) { Tcl_AppendResult(interp, "problem flushing channel: ", Tcl_PosixError(interp), NULL); return TCL_ERROR; -- cgit v0.12 From 26c04eee2aa43719e11b6da2154bd8461fdcffdf Mon Sep 17 00:00:00 2001 From: das Date: Sat, 20 Dec 2008 01:56:40 +0000 Subject: add new files --- macosx/Tcl.xcodeproj/project.pbxproj | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index de97a9c..124e933 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -189,6 +189,10 @@ 8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; }; F915432A0EF201CF0032D1E8 /* zlib.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = zlib.test; sourceTree = ""; }; F915432D0EF201EE0032D1E8 /* zlib.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = zlib.n; sourceTree = ""; }; + F9183E640EFC80CD0030B814 /* throw.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = throw.n; sourceTree = ""; }; + F9183E650EFC80D70030B814 /* try.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = try.n; sourceTree = ""; }; + F9183E6A0EFC81560030B814 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + F9183E8F0EFC817B0030B814 /* tdbc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tdbc; sourceTree = ""; }; F91DC23C0E44C51B002CB8D1 /* nre.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = nre.test; sourceTree = ""; }; F91DC23D0E44C530002CB8D1 /* unsupported.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unsupported.test; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; @@ -977,7 +981,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.42 2008/12/14 15:10:56 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.43 2008/12/20 01:56:40 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -993,6 +997,15 @@ name = Products; sourceTree = ""; }; + F9183E690EFC81560030B814 /* pkgs */ = { + isa = PBXGroup; + children = ( + F9183E6A0EFC81560030B814 /* README */, + F9183E8F0EFC817B0030B814 /* tdbc */, + ); + path = pkgs; + sourceTree = ""; + }; F966C06F08F281DC005CB29B /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1014,6 +1027,7 @@ F96D434408F272B5004A47F5 /* tests */, F96D3DFC08F272A4004A47F5 /* doc */, F96D43D008F272B8004A47F5 /* tools */, + F9183E690EFC81560030B814 /* pkgs */, F96D3DFA08F272A4004A47F5 /* ChangeLog */, F96D3DFB08F272A4004A47F5 /* changes */, F96D434308F272B5004A47F5 /* README */, @@ -1221,6 +1235,7 @@ F96D3EB208F272A7004A47F5 /* tclvars.n */, F96D3EB308F272A7004A47F5 /* tell.n */, F96D3EB408F272A7004A47F5 /* Thread.3 */, + F9183E640EFC80CD0030B814 /* throw.n */, F96D3EB508F272A7004A47F5 /* time.n */, F96D3EB608F272A7004A47F5 /* tm.n */, F96D3EB708F272A7004A47F5 /* ToUpper.3 */, @@ -1228,6 +1243,7 @@ F96D3EB908F272A7004A47F5 /* TraceCmd.3 */, F96D3EBA08F272A7004A47F5 /* TraceVar.3 */, F96D3EBB08F272A7004A47F5 /* Translate.3 */, + F9183E650EFC80D70030B814 /* try.n */, F96D3EBC08F272A7004A47F5 /* UniCharIsAlpha.3 */, F96D3EBD08F272A7004A47F5 /* unknown.n */, F96D3EBE08F272A7004A47F5 /* unload.n */, -- cgit v0.12 From 2e755e5c14429050c68cfff600e7da32fb146e53 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 20 Dec 2008 02:02:54 +0000 Subject: sync file additions/removals with Tcl.xcodeproj --- macosx/Tcl.xcode/project.pbxproj | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/macosx/Tcl.xcode/project.pbxproj b/macosx/Tcl.xcode/project.pbxproj index 1df37f2..bfa915f 100644 --- a/macosx/Tcl.xcode/project.pbxproj +++ b/macosx/Tcl.xcode/project.pbxproj @@ -17,6 +17,8 @@ F93599C40DF1F78800E04F67 /* tclOOStubInit.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C30DF1F78800E04F67 /* tclOOStubInit.c */; }; F93599C60DF1F78D00E04F67 /* tclOOStubLib.c in Sources */ = {isa = PBXBuildFile; fileRef = F93599C50DF1F78D00E04F67 /* tclOOStubLib.c */; }; F95D77EA0DFD820D00A8BF6F /* tclIORTrans.c in Sources */ = {isa = PBXBuildFile; fileRef = F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */; }; + F96437CA0EF0D4B2003F468E /* tclZlib.c in Sources */ = {isa = PBXBuildFile; fileRef = F96437C90EF0D4B2003F468E /* tclZlib.c */; }; + F96437E70EF0D652003F468E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F96437E60EF0D652003F468E /* libz.dylib */; }; F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F966C07408F2820D005CB29B /* CoreFoundation.framework */; }; F96D456F08F272BB004A47F5 /* regcomp.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED008F272A7004A47F5 /* regcomp.c */; }; F96D457208F272BB004A47F5 /* regerror.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D3ED308F272A7004A47F5 /* regerror.c */; }; @@ -184,6 +186,14 @@ /* Begin PBXFileReference section */ 8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; }; + F915432A0EF201CF0032D1E8 /* zlib.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = zlib.test; sourceTree = ""; }; + F915432D0EF201EE0032D1E8 /* zlib.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = zlib.n; sourceTree = ""; }; + F9183E640EFC80CD0030B814 /* throw.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = throw.n; sourceTree = ""; }; + F9183E650EFC80D70030B814 /* try.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = try.n; sourceTree = ""; }; + F9183E6A0EFC81560030B814 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + F9183E8F0EFC817B0030B814 /* tdbc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tdbc; sourceTree = ""; }; + F91DC23C0E44C51B002CB8D1 /* nre.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = nre.test; sourceTree = ""; }; + F91DC23D0E44C530002CB8D1 /* unsupported.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unsupported.test; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; F92D7F100DE777240033A13A /* tsdPerf.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tsdPerf.tcl; sourceTree = ""; }; F92D7F140DE777670033A13A /* tsdPerf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsdPerf.c; sourceTree = ""; }; @@ -212,6 +222,8 @@ F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = ""; }; F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORTrans.c; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = ""; }; + F96437C90EF0D4B2003F468E /* tclZlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclZlib.c; sourceTree = ""; }; + F96437E60EF0D652003F468E /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = ""; }; F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; F96D3DFA08F272A4004A47F5 /* ChangeLog */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = ChangeLog; sourceTree = ""; }; F96D3DFB08F272A4004A47F5 /* changes */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = changes; sourceTree = ""; }; @@ -933,6 +945,7 @@ F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Debug.xcconfig"; sourceTree = ""; }; F9903CAF094FAADA004613E9 /* tclTomMath.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclTomMath.decls; sourceTree = ""; }; F9903CB0094FAADA004613E9 /* tclTomMathDecls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclTomMathDecls.h; sourceTree = ""; }; + F99D61180EF5573A00BBFE01 /* TclZlib.3 */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = TclZlib.3; sourceTree = ""; }; F9A3084B08F2D4CE00BAE1AB /* tclsh */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tclsh; sourceTree = BUILT_PRODUCTS_DIR; }; F9A3084E08F2D4F400BAE1AB /* Tcl.framework */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.framework; path = Tcl.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F9A493240CEBF38300B78AE2 /* chanio.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = chanio.test; sourceTree = ""; }; @@ -952,6 +965,7 @@ buildActionMask = 2147483647; files = ( F966C07508F2820D005CB29B /* CoreFoundation.framework in Frameworks */, + F96437E70EF0D652003F468E /* libz.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -965,7 +979,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.12 2008/06/12 06:26:58 das Exp $\n"; + comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.13 2008/12/20 02:02:54 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -981,10 +995,20 @@ name = Products; sourceTree = ""; }; + F9183E690EFC81560030B814 /* pkgs */ = { + isa = PBXGroup; + children = ( + F9183E6A0EFC81560030B814 /* README */, + F9183E8F0EFC817B0030B814 /* tdbc */, + ); + path = pkgs; + sourceTree = ""; + }; F966C06F08F281DC005CB29B /* Frameworks */ = { isa = PBXGroup; children = ( F966C07408F2820D005CB29B /* CoreFoundation.framework */, + F96437E60EF0D652003F468E /* libz.dylib */, ); name = Frameworks; sourceTree = ""; @@ -1001,6 +1025,7 @@ F96D434408F272B5004A47F5 /* tests */, F96D3DFC08F272A4004A47F5 /* doc */, F96D43D008F272B8004A47F5 /* tools */, + F9183E690EFC81560030B814 /* pkgs */, F96D3DFA08F272A4004A47F5 /* ChangeLog */, F96D3DFB08F272A4004A47F5 /* changes */, F96D434308F272B5004A47F5 /* README */, @@ -1200,6 +1225,7 @@ F96D3EAB08F272A7004A47F5 /* SubstObj.3 */, F96D3EAC08F272A7004A47F5 /* switch.n */, F96D3EAD08F272A7004A47F5 /* Tcl.n */, + F99D61180EF5573A00BBFE01 /* TclZlib.3 */, F96D3EAE08F272A7004A47F5 /* Tcl_Main.3 */, F96D3EAF08F272A7004A47F5 /* TCL_MEM_DEBUG.3 */, F96D3EB008F272A7004A47F5 /* tclsh.1 */, @@ -1207,6 +1233,7 @@ F96D3EB208F272A7004A47F5 /* tclvars.n */, F96D3EB308F272A7004A47F5 /* tell.n */, F96D3EB408F272A7004A47F5 /* Thread.3 */, + F9183E640EFC80CD0030B814 /* throw.n */, F96D3EB508F272A7004A47F5 /* time.n */, F96D3EB608F272A7004A47F5 /* tm.n */, F96D3EB708F272A7004A47F5 /* ToUpper.3 */, @@ -1214,6 +1241,7 @@ F96D3EB908F272A7004A47F5 /* TraceCmd.3 */, F96D3EBA08F272A7004A47F5 /* TraceVar.3 */, F96D3EBB08F272A7004A47F5 /* Translate.3 */, + F9183E650EFC80D70030B814 /* try.n */, F96D3EBC08F272A7004A47F5 /* UniCharIsAlpha.3 */, F96D3EBD08F272A7004A47F5 /* unknown.n */, F96D3EBE08F272A7004A47F5 /* unload.n */, @@ -1227,6 +1255,7 @@ F96D3EC608F272A7004A47F5 /* vwait.n */, F96D3EC708F272A7004A47F5 /* while.n */, F96D3EC808F272A7004A47F5 /* WrongNumArgs.3 */, + F915432D0EF201EE0032D1E8 /* zlib.n */, ); path = doc; sourceTree = ""; @@ -1354,6 +1383,7 @@ F96D3F3408F272A7004A47F5 /* tclUtf.c */, F96D3F3508F272A7004A47F5 /* tclUtil.c */, F96D3F3608F272A7004A47F5 /* tclVar.c */, + F96437C90EF0D4B2003F468E /* tclZlib.c */, F96D3F3708F272A7004A47F5 /* tommath.h */, ); path = generic; @@ -1680,6 +1710,7 @@ F96D439108F272B6004A47F5 /* namespace-old.test */, F96D439208F272B7004A47F5 /* namespace.test */, F96D439308F272B7004A47F5 /* notify.test */, + F91DC23C0E44C51B002CB8D1 /* nre.test */, F96D439408F272B7004A47F5 /* obj.test */, F93599C80DF1F81900E04F67 /* oo.test */, F96D439508F272B7004A47F5 /* opt.test */, @@ -1727,6 +1758,7 @@ F96D43BF08F272B7004A47F5 /* unixNotfy.test */, F96D43C008F272B7004A47F5 /* unknown.test */, F96D43C108F272B7004A47F5 /* unload.test */, + F91DC23D0E44C530002CB8D1 /* unsupported.test */, F96D43C208F272B7004A47F5 /* uplevel.test */, F96D43C308F272B7004A47F5 /* upvar.test */, F96D43C408F272B7004A47F5 /* utf.test */, @@ -1741,6 +1773,7 @@ F96D43CD08F272B7004A47F5 /* winNotify.test */, F96D43CE08F272B7004A47F5 /* winPipe.test */, F96D43CF08F272B7004A47F5 /* winTime.test */, + F915432A0EF201CF0032D1E8 /* zlib.test */, ); path = tests; sourceTree = ""; @@ -2130,6 +2163,7 @@ F96D45D308F272BC004A47F5 /* tclUtf.c in Sources */, F96D45D408F272BC004A47F5 /* tclUtil.c in Sources */, F96D45D508F272BC004A47F5 /* tclVar.c in Sources */, + F96437CA0EF0D4B2003F468E /* tclZlib.c in Sources */, F96D48E208F272C3004A47F5 /* bn_fast_s_mp_mul_digs.c in Sources */, F96D48E408F272C3004A47F5 /* bn_fast_s_mp_sqr.c in Sources */, F96D48E708F272C3004A47F5 /* bn_mp_add.c in Sources */, -- cgit v0.12 From 4d28e8bc24a5f5359b08a3c233dca7d4976e7509 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 20 Dec 2008 02:27:55 +0000 Subject: test packages after testing tcl --- unix/Makefile.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 13d4cae..2a68836 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.255 2008/12/20 01:11:10 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.256 2008/12/20 02:27:55 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -634,7 +634,10 @@ tcltest-real: # tcltest, ie: # % make test TESTFLAGS="-verbose bps -file fileName.test" -test: tcltest test-packages +test: test-tcl test-packages + @ + +test-tcl: tcltest $(SHELL_ENV) ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) gdb-test: tcltest -- cgit v0.12 From a9f1ca085fa9647684ff3c9ee419bd5248f8114e Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 20 Dec 2008 05:30:45 +0000 Subject: * changes: Updates for 8.6b1 release. --- ChangeLog | 8 +++++-- changes | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98962d8..0b08426 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-20 Don Porter + + *** 8.6b1 TAGGED FOR RELEASE *** + + * changes: Updates for 8.6b1 release. + 2008-12-20 Daniel Steffen * unix/Makefile.in: make package install directory of bundled @@ -14,8 +20,6 @@ 2008-12-19 Don Porter - *** 8.6b1 TAGGED FOR RELEASE *** - * doc/NRE.3: Formatting errors found by `make html` * doc/Tcl_Main.3: * doc/zlib.n: diff --git a/changes b/changes index b5b041e..aa154cf 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.146 2008/10/10 21:12:16 dgp Exp $ +RCS: @(#) $Id: changes,v 1.147 2008/12/20 05:30:45 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -7379,3 +7379,73 @@ Tcl_FSFileAttrStringsProc prototype. (nijtmans) 2008-10-10 (bug fix)[2155658] crash in oo method export (fellows) --- Released 8.6a3, October 10, 2008 --- See ChangeLog for details --- + +2008-10-13 (bug fix) Fix ability to join threads on 64-bit Windows (thoyts) + +2008-10-23 (bug fix)[2186888] Direct-eval [for] handling of [continue] was +broken by NRE reform (sofer,porter) + +2008-10-24 (bug fix) fix failure to read SHOUTcast streams (thoyts) +=> http 2.7.2 + +2008-10-27 (enhancement) system encoding at startup is now "iso8859-1", and +no longer "identity". Use of identity encoding minimized (porter) + *** POTENTIAL INCOMPATIBILITY *** + +2008-10-31 (bug fix)[2200824] revised [oo::define] to include caller +context when resolving names. (nassau,fellows) + +2008-11-10 (bug fix)[2255235] [platform::shell::LOCATE] update (ring,kupries) +=> platform::shell 1.1.4 + +2008-11-13 (bug fix)[2269431] VFS [load] -> tempfile litter (ficicchia,nijtmans) + +2008-11-26 (bug fix)[2114900] updated tclIndex file (cassoff,kenny) + +2008-11-27 (bug fix)[2251175] [{*}{\{}] errors (hellström,ferrieux,porter) + +2008-11-29 (new feature)[TIP 210] [file tempfile] (techentin,fellows) + +2008-11-30 (bug fix)[2362156] [clock]: colon in format string (mizuno,kenny) + +2008-12-02 (bug fix)[2270477] hang in channel finalization (ferrieux,kupries) + +2008-12-02 (new feature)[TIP 336] Tcl_*ErrorLine() routines. Direct access +to the errorLine field of the interp struct denied by default. (porter) + *** POTENTIAL INCOMPATIBILITY *** + *** Define USE_INTERP_ERRORLINE to restore access for legacy code *** + +2008-12-04 (bug fix)[2385549] [file normalize] failed on some paths (porter) + +2008-12-05 (new feature)[TIP 307] Tcl_TransferResult() (leunissen,fellows) + +2008-12-05 (new feature)[TIP 335] Tcl_InterpActive() (mistachkin,fellows) + +2008-12-09 (new feature)[TIP 337] Tcl_BackgroundException() (porter) + +2008-12-10 (new feature)[TIP 341] >1 [dict filter] patterns (hellström,fellows) + +2008-12-10 (new feature)[TIP 343] [format %b $n] [scan $s %b] (ferrieux) + +2008-12-10 tzdata updated to Olson's tzdata2008i (kenny) + +2008-12-11 (new feature)[TIP 234] [zlib] and Tcl_Zlib*() (sheffers,fellows) + +2008-12-11 (bug fix)[2407783] spoil ChannelState when channel name passes +among multiple interps (kupries) + +2008-12-12 (new feature)[TIP 322] Tcl_NR*() routines to enabled non-recursive +evaluation in extensions (sofer,kenny) + +2008-12-09 (new feature)[TIP 338] Tcl_*StartupScript() (porter) + *** POTENTIAL INCOMPATIBILITY for callers of Tcl*Startup* routines *** + +2008-12-16 (new feature)[TIP 329] [try] [throw] (davel,fellows) + +2008-12-17 (new feature)[TIP 308] package tdbc 1.0b1 (kenny) + +2008-12-18 (new feature)[TIP 332] [close $chan read|write] (ferrieux) + +2008-12-18 (bug fix)[2444274] panic in long commands from {*} (goth,porter) + +--- Released 8.6b1, December 19, 2008 --- See ChangeLog for details --- -- cgit v0.12 From 57177ff58ba2937f00a929c15e0721439ed5a8ec Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 20 Dec 2008 11:49:00 +0000 Subject: Assign a base address for tdbc --- win/coffbase.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/win/coffbase.txt b/win/coffbase.txt index cf0dca5..eda9a5b 100644 --- a/win/coffbase.txt +++ b/win/coffbase.txt @@ -12,7 +12,7 @@ ; they're mutually exclusive. This info is placed in the DLL's PE header by the ; linker with the `-base:@$(TCLDIR)\win\coffbase.txt,` option. ; -; RCS: @(#) $Id: coffbase.txt,v 1.13 2008/07/09 14:41:07 patthoyts Exp $ +; RCS: @(#) $Id: coffbase.txt,v 1.14 2008/12/20 11:49:00 patthoyts Exp $ tcl 0x10000000 0x00200000 tcldde 0x10200000 0x00010000 @@ -27,12 +27,16 @@ iocpsock 0x10700000 0x00080000 tls 0x10780000 0x00100000 winico 0x10880000 0x00010000 tile 0x10900000 0x00080000 -memchan 0x109D0000 0x00010000 +memchan 0x109D0000 0x00010000 tdom 0x109E0000 0x00080000 -tclvfs 0x10A70000 0x00010000 +tclvfs 0x10A70000 0x00010000 tkvideo 0x10B00000 0x00010000 -tclsdl 0x10B20000 0x00080000 -vqtcl 0x10C00000 0x00010000 +tclsdl 0x10B20000 0x00080000 +vqtcl 0x10C00000 0x00010000 +tdbc 0x10C40000 0x00010000 +; +; insert new packages here +; snack 0x1E000000 0x00400000 sound 0x1E400000 0x00400000 snackogg 0x1E800000 0x00200000 -- cgit v0.12 From 1695e34e719dc813bd409db3246f48ec3dc164ac Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 20 Dec 2008 16:32:31 +0000 Subject: Minor updates to make building work better with msys on Windows. (Apparently the gcc used doesn't like a / at the end of a -I argument...) --- ChangeLog | 83 ++++++++++++++++++++++++++++++--------------------------- win/Makefile.in | 10 +++---- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b08426..4f0ee5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-20 Donal K. Fellows + + * win/Makefile.in: Minor updates to make building work better with + msys on Windows. (Apparently the gcc used doesn't like a / at the end + of a -I argument...) + 2008-12-20 Don Porter *** 8.6b1 TAGGED FOR RELEASE *** @@ -6,15 +12,15 @@ 2008-12-20 Daniel Steffen - * unix/Makefile.in: make package install directory of bundled - * unix/configure.in packages configurable via PACKAGE_DIR makefile + * unix/Makefile.in: Make package install directory of bundled + * unix/configure.in: packages configurable via PACKAGE_DIR makefile variable (set to platform-specific default). - * unix/Makefile.in (*-packages): ensure toplevel targets fail if + * unix/Makefile.in (*-packages): Ensure toplevel targets fail if sub-make/configure fails; fix quoting when builddir path contains spaces. - * macosx/GNUmakefile: add install-packages to install targets. + * macosx/GNUmakefile: Add install-packages to install targets. * unix/configure: autoconf-2.59 @@ -27,11 +33,11 @@ * tests/chanio.test: Add missing [removeFile] cleanups. * tests/io.test: Add missing [close $f] to io-73.2. - * unix/Makefile.in: Update `make dist` target to include the files + * unix/Makefile.in: Update `make dist' target to include the files from the compat/zlib directory as well as all the bundled packages - found under the pkgs directory, according to their individual - `make dist` targets. Change includes breaking a `configure-packages` - target out of the `packages` target. + found under the pkgs directory, according to their individual `make + dist' targets. Change includes breaking a `configure-packages' target + out of the `packages` target. * README: Bump version number to 8.6b1 * generic/tcl.h: @@ -46,7 +52,7 @@ 2008-12-19 Jan Nijtmans - * generic/tclInt.decls CONSTify TclGetLoadedPackages second param + * generic/tclInt.decls: CONSTify TclGetLoadedPackages second param * generic/tclLoad.c * generic/tclIntDecls.h (regenerated) @@ -57,46 +63,45 @@ * win/configure.in: * win/Makefile.in: Added build of packages in the 'pkgs/' directory. * win/configure: Autoconf 2.59 - + 2008-12-19 Pat Thoyts * win/makefile.vc: Added build of compat/zlib 2008-12-18 Andreas Kupries - * generic/tclIO.c (Tcl_CloseEx,CloseWrite,CloseChannelPart,ChanCloseHalf): - Rewrite the half-close to properly flush the channel, like is done - for a full close, going through FlushChannel, and using the flag - BG_FLUSH_SCHEDULED (async flush during close). New functions + * generic/tclIO.c (Tcl_CloseEx, CloseWrite, CloseChannelPart) + (ChanCloseHalf): Rewrite the half-close to properly flush the channel, + like is done for a full close, going through FlushChannel, and using + the flag BG_FLUSH_SCHEDULED (async flush during close). New functions CloseWrite, CloseChannelPart, new flag CHANNEL_CLOSEDWRITE. - * tests/chanio.test (chanio-28.[67]): Reactivated these - tests. Replaced tclsh -> [interpreter] to get correct executable - for the pipe process, and added after cancel to kill the fail - timers when we are done. Removed the explicits calls to [flush], - now that [close] handles this correctly. + * tests/chanio.test (chanio-28.[67]): Reactivated these tests. + Replaced tclsh -> [interpreter] to get correct executable for the pipe + process, and added after cancel to kill the fail timers when we are + done. Removed the explicits calls to [flush], now that [close] handles + this correctly. 2008-12-18 Don Porter - * tests/chanio.test: Replaced [chan event] handlers that - returned TCL_RETURN return code, with more conventional ones - that return TCL_OK to suppress otherwise strange writes of - outdated $::errorInfo values to stderr. [Bug 2444274]. + * tests/chanio.test: Replaced [chan event] handlers that returned + TCL_RETURN return code, with more conventional ones that return TCL_OK + to suppress otherwise strange writes of outdated $::errorInfo values + to stderr. [Bug 2444274] - * generic/tclExecute.c: Disabled apparently faulty assertion. - [Bug 2415422]. + * generic/tclExecute.c: Disabled apparently faulty assertion. [Bug + 2415422] 2008-12-18 Donal K. Fellows * unix/configure.in, unix/Makefile.in: Autoconf wizardry. * compat/zlib/*: Import of zlib 1.2.3. The license is directly - compatible with Tcl's. This import omits the obsolete and - contributed parts (i.e. selected directories) and the supplied - examples. + compatible with Tcl's. This import omits the obsolete and contributed + parts (i.e. selected directories) and the supplied examples. * generic/tclZlib.c: First implementation of the compressing and * doc/zlib.n: decompressing channel transformations. - * tests/zlib.test (zlib-8.*): + * tests/zlib.test (zlib-8.*): 2008-12-18 Jan Nijtmans @@ -109,7 +114,7 @@ 2008-12-18 Alexandre Ferrieux TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channels - + * doc/close.n, generic/tclIO.c, generic/tclIOCmd.c: * unix/tclUnixChan.c, unix/tclUnixPipe.c, win/tclWinSock.c: * generic/tcl.decls, generic/tclDecls.h, generic/tclStubInit.c: @@ -136,8 +141,8 @@ 2008-12-17 Don Porter - * unix/Makefile.in: Modify the distclean-packages target so - that empty build directories are deleted. + * unix/Makefile.in: Modify the distclean-packages target so that + empty build directories are deleted. * unix/Makefile.in: Add build support for collections of TEA * unix/configure.in: packages found under the pkgs directory. @@ -203,11 +208,11 @@ * generic/tclInt.decls: and removed their implementations. Their * generic/tclMain.c: function can now be completely performed with the new public interface. - *** POTENTIAL INCOMPATIBILITY for callers of the internal + *** POTENTIAL INCOMPATIBILITY for callers of the internal Tcl*Startup* routines. *** * generic/tclIntDecls.h: make genstubs - * generic/tclStubInit.c: + * generic/tclStubInit.c: * generic/tclDecls.h: 2008-12-14 Donal K. Fellows @@ -535,8 +540,8 @@ * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] fixed earlier. - * generic/tcl.h: Fix [Bug 2251175]: missing backslash - * generic/tclCompCmds.c substitution on expanded literals. + * generic/tcl.h: Fix [Bug 2251175]: missing backslash + * generic/tclCompCmds.c: substitution on expanded literals. * generic/tclCompile.c * generic/tclParse.c * generic/tclTest.c @@ -552,10 +557,10 @@ 2008-11-13 Jan Nijtmans * generic/tclInt.h: Rename static function FSUnloadTempFile to - * generic/tclIOUtil.c TclFSUnloadTempFile, needed in tclLoad.c + * generic/tclIOUtil.c: TclFSUnloadTempFile, needed in tclLoad.c - * generic/tclLoad.c Fixed [Bug 2269431]: load of shared - objects leaves temporary files on windows + * generic/tclLoad.c: Fixed [Bug 2269431]: Load of shared + objects leaves temporary files on windows. 2008-11-12 Pat Thoyts diff --git a/win/Makefile.in b/win/Makefile.in index eb5cd65..78995e6 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.143 2008/12/19 10:55:38 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.144 2008/12/20 16:32:32 dkf Exp $ VERSION = @TCL_VERSION@ @@ -101,7 +101,7 @@ TOMMATH_DIR = $(TOP_DIR)/libtommath WIN_DIR = $(TOP_DIR)/win COMPAT_DIR = $(TOP_DIR)/compat PKGS_DIR = $(TOP_DIR)/pkgs -ZLIB_DIR = $(COMPAT_DIR)/zlib/ +ZLIB_DIR = $(COMPAT_DIR)/zlib # Converts a POSIX path to a Windows native path. CYGPATH = @CYGPATH@ @@ -196,7 +196,7 @@ ${COMPILE_DEBUG_FLAGS} ZLIB_LIB = libz.a ZLIB_INC = -I"${ZLIB_DIR}" -ZLIB_FILE = ${ZLIB_DIR}${ZLIB_LIB} +ZLIB_FILE = "${ZLIB_DIR}/${ZLIB_LIB}" CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -434,7 +434,7 @@ ${TCL_LIB_FILE}: ${TCL_OBJS} ${ZLIB_FILE} # assume GNU make ${ZLIB_FILE}: - ${MAKE} -C ${ZLIB_DIR} CC="${CC}" ${ZLIB_LIB} + ${MAKE} -C "${ZLIB_DIR}" CC="${CC}" ${ZLIB_LIB} ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${DDE_DLL_FILE} @@ -746,7 +746,7 @@ clean: cleanhelp clean-packages $(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(TCLSH) $(TCLTEST) $(CAT32) $(RM) *.pch *.ilk *.pdb - ${MAKE} -C ${ZLIB_DIR} clean + ${MAKE} -C "${ZLIB_DIR}" clean distclean: distclean-packages clean $(RM) Makefile config.status config.cache config.log tclConfig.sh \ -- cgit v0.12 From d02b97bef3315cfb2bb8350d63a6bbca58fc6134 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 20 Dec 2008 17:29:10 +0000 Subject: advance tag --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f0ee5d..1e0157a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,13 @@ 2008-12-20 Donal K. Fellows + *** 8.6b1 TAGGED FOR RELEASE *** + * win/Makefile.in: Minor updates to make building work better with msys on Windows. (Apparently the gcc used doesn't like a / at the end of a -I argument...) 2008-12-20 Don Porter - *** 8.6b1 TAGGED FOR RELEASE *** - * changes: Updates for 8.6b1 release. 2008-12-20 Daniel Steffen -- cgit v0.12 From 6a64cdf71b3aa52680959e56d4d2c5fda3588f38 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 20 Dec 2008 21:40:27 +0000 Subject: * win/Makefile.in: * win/configure.in: Renamed the static library libtcl86s.a to have a name distinct from the import library libtcl86.a. This renaming dodges an ancient bug in the Makefile revealed by the last commit where the $(TCL_LIB_FILE) rule can fire to try to build the static library in a --enable-shared build (and create a static library that subsequently fails to link). *** POTENTIAL INCOMPATIBILITY *** for embedders who link to the static library, but I couldn't figure out how to sort this out any other way. * win/configure: Autoconf 2.59 --- ChangeLog | 18 ++++++++++++++++++ win/Makefile.in | 20 +++++++++++--------- win/configure | 33 ++++++++++++++++++++++++++------- win/configure.in | 29 ++++++++++++++++++++++------- 4 files changed, 77 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e0157a..60bf2b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-12-20 Kevin B. Kenny + + * win/Makefile.in: + * win/configure.in: Renamed the static library libtcl86s.a to + have a name distinct from the import library + libtcl86.a. This renaming dodges an ancient + bug in the Makefile revealed by the last + commit where the $(TCL_LIB_FILE) rule can + fire to try to build the static library in + a --enable-shared build (and create a + static library that subsequently fails to + link). + *** POTENTIAL INCOMPATIBILITY *** for embedders + who link to the static library, but I couldn't + figure out how to sort this out any other + way. + * win/configure: Autoconf 2.59 + 2008-12-20 Donal K. Fellows *** 8.6b1 TAGGED FOR RELEASE *** diff --git a/win/Makefile.in b/win/Makefile.in index 78995e6..627b778 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.144 2008/12/20 16:32:32 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.145 2008/12/20 21:40:27 kennykb Exp $ VERSION = @TCL_VERSION@ @@ -101,7 +101,7 @@ TOMMATH_DIR = $(TOP_DIR)/libtommath WIN_DIR = $(TOP_DIR)/win COMPAT_DIR = $(TOP_DIR)/compat PKGS_DIR = $(TOP_DIR)/pkgs -ZLIB_DIR = $(COMPAT_DIR)/zlib +ZLIB_DIR = $(COMPAT_DIR)/zlib/ # Converts a POSIX path to a Windows native path. CYGPATH = @CYGPATH@ @@ -132,6 +132,8 @@ REGDOTVER = @TCL_REG_MAJOR_VERSION@.@TCL_REG_MINOR_VERSION@ TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ TCL_DLL_FILE = @TCL_DLL_FILE@ +TCL_STATIC_LIB_FILE = @TCL_STATIC_LIB_FILE@ +TCL_IMPORT_LIB_FILE = @TCL_IMPORT_LIB_FILE@ TCL_LIB_FILE = @TCL_LIB_FILE@ DDE_DLL_FILE = tcldde$(DDEVER)${DLLSUFFIX} DDE_LIB_FILE = tcldde$(DDEVER)${LIBSUFFIX} @@ -196,7 +198,7 @@ ${COMPILE_DEBUG_FLAGS} ZLIB_LIB = libz.a ZLIB_INC = -I"${ZLIB_DIR}" -ZLIB_FILE = "${ZLIB_DIR}/${ZLIB_LIB}" +ZLIB_FILE = ${ZLIB_DIR}${ZLIB_LIB} CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -423,18 +425,18 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} @MAKE_LIB@ ${STUB_OBJS} @POST_MAKE_LIB@ -${TCL_DLL_FILE}: ${TCL_OBJS} ${ZLIB_FILE} tcl.$(RES) - @$(RM) ${TCL_DLL_FILE} +${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} ${ZLIB_FILE} tcl.$(RES) + @$(RM) ${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE) @MAKE_DLL@ ${TCL_OBJS} ${ZLIB_FILE} tcl.$(RES) $(SHLIB_LD_LIBS) -${TCL_LIB_FILE}: ${TCL_OBJS} ${ZLIB_FILE} - @$(RM) ${TCL_LIB_FILE} +${TCL_STATIC_LIB_FILE}: ${TCL_OBJS} ${ZLIB_FILE} + @$(RM) ${TCL_STATIC_LIB_FILE} @MAKE_LIB@ ${ZLIB_FILE} ${TCL_OBJS} @POST_MAKE_LIB@ # assume GNU make ${ZLIB_FILE}: - ${MAKE} -C "${ZLIB_DIR}" CC="${CC}" ${ZLIB_LIB} + ${MAKE} -C ${ZLIB_DIR} CC="${CC}" ${ZLIB_LIB} ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${DDE_DLL_FILE} @@ -746,7 +748,7 @@ clean: cleanhelp clean-packages $(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(TCLSH) $(TCLTEST) $(CAT32) $(RM) *.pch *.ilk *.pdb - ${MAKE} -C "${ZLIB_DIR}" clean + ${MAKE} -C ${ZLIB_DIR} clean distclean: distclean-packages clean $(RM) Makefile config.status config.cache config.log tclConfig.sh \ diff --git a/win/configure b/win/configure index be45c9c..28a2a65 100755 --- a/win/configure +++ b/win/configure @@ -272,7 +272,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../generic/tcl.h" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -4265,12 +4265,6 @@ eval "TCL_SRC_DIR=\"`cd $srcdir/..; pwd`\"" eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}" -eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}" - -eval "TCL_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" -eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\"" -eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\"" - eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\"" eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${LIBFLAGSUFFIX}\"" eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\"" @@ -4278,6 +4272,23 @@ eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\"" eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_PATH=\"${libdir}/${TCL_STUB_LIB_FILE}\"" +eval "TCL_STATIC_LIB_FILE=\"${LIBPREFIX}tcl${VER}s${LIBSUFFIX}\"" +eval "TCL_STATIC_LIB_FLAG=\"-ltcl${VER}s${LIBFLAGSUFFIX}\"" + +eval "TCL_IMPORT_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" +eval "TCL_IMPORT_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" + +if test ${SHARED_BUILD} = 0 ; then + eval "TCL_LIB_FILE=\"${TCL_STATIC_LIB_FILE}\"" + eval "TCL_LIB_FLAG=\"${TCL_STATIC_LIB_FLAG}\"" +else + eval "TCL_LIB_FILE=\"${TCL_IMPORT_LIB_FILE}\"" + eval "TCL_LIB_FLAG=\"${TCL_IMPORT_LIB_FLAG}\"" +fi +eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\"" +eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\"" + + # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" @@ -4331,6 +4342,10 @@ fi + + + + # empty on win @@ -5079,6 +5094,10 @@ s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_STATIC_LIB_FILE@,$TCL_STATIC_LIB_FILE,;t t +s,@TCL_STATIC_LIB_FLAG@,$TCL_STATIC_LIB_FLAG,;t t +s,@TCL_IMPORT_LIB_FILE@,$TCL_IMPORT_LIB_FILE,;t t +s,@TCL_IMPORT_LIB_FLAG@,$TCL_IMPORT_LIB_FLAG,;t t s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t diff --git a/win/configure.in b/win/configure.in index 8b24999..8b8e61d 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.114 2008/12/19 03:54:44 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.115 2008/12/20 21:40:27 kennykb Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -381,12 +381,6 @@ eval "TCL_SRC_DIR=\"`cd $srcdir/..; pwd`\"" eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}" -eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}" - -eval "TCL_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" -eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\"" -eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\"" - eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\"" eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${LIBFLAGSUFFIX}\"" eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\"" @@ -394,6 +388,23 @@ eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\"" eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_PATH=\"${libdir}/${TCL_STUB_LIB_FILE}\"" +eval "TCL_STATIC_LIB_FILE=\"${LIBPREFIX}tcl${VER}s${LIBSUFFIX}\"" +eval "TCL_STATIC_LIB_FLAG=\"-ltcl${VER}s${LIBFLAGSUFFIX}\"" + +eval "TCL_IMPORT_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" +eval "TCL_IMPORT_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" + +if test ${SHARED_BUILD} = 0 ; then + eval "TCL_LIB_FILE=\"${TCL_STATIC_LIB_FILE}\"" + eval "TCL_LIB_FLAG=\"${TCL_STATIC_LIB_FLAG}\"" +else + eval "TCL_LIB_FILE=\"${TCL_IMPORT_LIB_FILE}\"" + eval "TCL_LIB_FLAG=\"${TCL_IMPORT_LIB_FLAG}\"" +fi +eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\"" +eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\"" + + # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" @@ -447,6 +458,10 @@ AC_SUBST(PKG_CFG_ARGS) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) +AC_SUBST(TCL_STATIC_LIB_FILE) +AC_SUBST(TCL_STATIC_LIB_FLAG) +AC_SUBST(TCL_IMPORT_LIB_FILE) +AC_SUBST(TCL_IMPORT_LIB_FLAG) # empty on win AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_STUB_LIB_FILE) -- cgit v0.12 From 65eb78098beae92eebe860b9158b9e28224df080 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 20 Dec 2008 22:06:02 +0000 Subject: Revised the zlib objects so that they are built directly into the build dir, without building an intermediate static library. --- ChangeLog | 5 ++++- win/Makefile.in | 63 ++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 53 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60bf2b6..29b2c83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,7 +9,10 @@ fire to try to build the static library in a --enable-shared build (and create a static library that subsequently fails to - link). + link). + Revised the zlib objects so that they are + built directly into the build dir, without + building an intermediate static library. *** POTENTIAL INCOMPATIBILITY *** for embedders who link to the static library, but I couldn't figure out how to sort this out any other diff --git a/win/Makefile.in b/win/Makefile.in index 627b778..ccca697 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.145 2008/12/20 21:40:27 kennykb Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.146 2008/12/20 22:06:02 kennykb Exp $ VERSION = @TCL_VERSION@ @@ -101,7 +101,7 @@ TOMMATH_DIR = $(TOP_DIR)/libtommath WIN_DIR = $(TOP_DIR)/win COMPAT_DIR = $(TOP_DIR)/compat PKGS_DIR = $(TOP_DIR)/pkgs -ZLIB_DIR = $(COMPAT_DIR)/zlib/ +ZLIB_DIR = $(COMPAT_DIR)/zlib # Converts a POSIX path to a Windows native path. CYGPATH = @CYGPATH@ @@ -161,7 +161,7 @@ MAN2TCL = man2tcl$(EXEEXT) # Setting the VPATH variable to a list of paths will cause the Makefile to # look into these paths when resolving .c to .obj dependencies. -VPATH = $(GENERIC_DIR):$(TOMMATH_DIR):$(WIN_DIR):$(COMPAT_DIR) +VPATH = $(GENERIC_DIR):$(TOMMATH_DIR):$(WIN_DIR):$(COMPAT_DIR):$(ZLIB_DIR) AR = @AR@ RANLIB = @RANLIB@ @@ -195,10 +195,7 @@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \ -I"${WIN_DIR_NATIVE}" ${AC_FLAGS} \ ${COMPILE_DEBUG_FLAGS} -ZLIB_LIB = libz.a - ZLIB_INC = -I"${ZLIB_DIR}" -ZLIB_FILE = ${ZLIB_DIR}${ZLIB_LIB} CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -389,7 +386,21 @@ STUB_OBJS = \ TCLSH_OBJS = tclAppInit.$(OBJEXT) -TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} +ZLIB_OBJS = \ + Zadler32$(OBJEXT) \ + Zcompress$(OBJEXT) \ + Zcrc32$(OBJEXT) \ + Zdeflate$(OBJEXT) \ + Zgzio$(OBJEXT) \ + Zinfback$(OBJEXT) \ + Zinffast$(OBJEXT) \ + Zinflate$(OBJEXT) \ + Zinftrees$(OBJEXT) \ + Ztrees$(OBJEXT) \ + Zuncompr$(OBJEXT) \ + Zzutil$(OBJEXT) + +TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} ${ZLIB_OBJS} TCL_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n] @@ -425,18 +436,16 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} @MAKE_LIB@ ${STUB_OBJS} @POST_MAKE_LIB@ -${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} ${ZLIB_FILE} tcl.$(RES) +${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} tcl.$(RES) @$(RM) ${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE) - @MAKE_DLL@ ${TCL_OBJS} ${ZLIB_FILE} tcl.$(RES) $(SHLIB_LD_LIBS) + @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) -${TCL_STATIC_LIB_FILE}: ${TCL_OBJS} ${ZLIB_FILE} +${TCL_STATIC_LIB_FILE}: ${TCL_OBJS} @$(RM) ${TCL_STATIC_LIB_FILE} - @MAKE_LIB@ ${ZLIB_FILE} ${TCL_OBJS} + @MAKE_LIB@ ${TCL_OBJS} @POST_MAKE_LIB@ # assume GNU make -${ZLIB_FILE}: - ${MAKE} -C ${ZLIB_DIR} CC="${CC}" ${ZLIB_LIB} ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${DDE_DLL_FILE} @@ -491,6 +500,33 @@ tclWinTest.${OBJEXT}: tclWinTest.c tclAppInit.${OBJEXT} : tclAppInit.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) +# For building zlib, only used in some build configurations + +Zadler32$(OBJEXT): $(ZLIB_DIR)/adler32.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zcompress$(OBJEXT): $(ZLIB_DIR)/compress.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zcrc32$(OBJEXT): $(ZLIB_DIR)/crc32.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zdeflate$(OBJEXT): $(ZLIB_DIR)/deflate.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zgzio$(OBJEXT): $(ZLIB_DIR)/gzio.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinfback$(OBJEXT): $(ZLIB_DIR)/infback.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinffast$(OBJEXT): $(ZLIB_DIR)/inffast.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinflate$(OBJEXT): $(ZLIB_DIR)/inflate.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zinftrees$(OBJEXT): $(ZLIB_DIR)/inftrees.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Ztrees$(OBJEXT): $(ZLIB_DIR)/trees.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zuncompr$(OBJEXT): $(ZLIB_DIR)/uncompr.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< +Zzutil$(OBJEXT): $(ZLIB_DIR)/zutil.c + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + tclZlib.${OBJEXT} : tclZlib.c $(CC) -c ${ZLIB_INC} $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME) @@ -748,7 +784,6 @@ clean: cleanhelp clean-packages $(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(TCLSH) $(TCLTEST) $(CAT32) $(RM) *.pch *.ilk *.pdb - ${MAKE} -C ${ZLIB_DIR} clean distclean: distclean-packages clean $(RM) Makefile config.status config.cache config.log tclConfig.sh \ -- cgit v0.12 From f3ba92dc98f72a80ab8e4eb00b29e68415fd2f60 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 21 Dec 2008 05:12:47 +0000 Subject: advance tag --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29b2c83..fb55567 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-12-20 Kevin B. Kenny + *** 8.6b1 TAGGED FOR RELEASE *** + * win/Makefile.in: * win/configure.in: Renamed the static library libtcl86s.a to have a name distinct from the import library @@ -21,8 +23,6 @@ 2008-12-20 Donal K. Fellows - *** 8.6b1 TAGGED FOR RELEASE *** - * win/Makefile.in: Minor updates to make building work better with msys on Windows. (Apparently the gcc used doesn't like a / at the end of a -I argument...) -- cgit v0.12 From 613001dabb024a58d361d3a53c86288131080a19 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 21 Dec 2008 08:17:37 +0000 Subject: Fix minor typo. [Bug 2455165] --- ChangeLog | 4 ++++ doc/TclZlib.3 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb55567..edb1b83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-21 Donal K. Fellows + + * doc/TclZlib.3: Fix minor typo. [Bug 2455165] + 2008-12-20 Kevin B. Kenny *** 8.6b1 TAGGED FOR RELEASE *** diff --git a/doc/TclZlib.3 b/doc/TclZlib.3 index 4018cf0..1b2bb44 100644 --- a/doc/TclZlib.3 +++ b/doc/TclZlib.3 @@ -4,10 +4,10 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TclZlib.3,v 1.2 2008/12/18 21:23:47 dkf Exp $ +'\" RCS: @(#) $Id: TclZlib.3,v 1.3 2008/12/21 08:17:37 dkf Exp $ '\" .so man.macros -.TH TclZlib 3 8.6 Tcl "Tcl Built-In Commands" +.TH TclZlib 3 8.6 Tcl "Tcl Library Procedures" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -- cgit v0.12 From 0a46541079d09b6cbf9e334447c4d744ad67e588 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 21 Dec 2008 16:22:03 +0000 Subject: advance tag --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index edb1b83..c59c350 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,11 @@ 2008-12-21 Donal K. Fellows + *** 8.6b1 TAGGED FOR RELEASE *** + * doc/TclZlib.3: Fix minor typo. [Bug 2455165] 2008-12-20 Kevin B. Kenny - *** 8.6b1 TAGGED FOR RELEASE *** - * win/Makefile.in: * win/configure.in: Renamed the static library libtcl86s.a to have a name distinct from the import library -- cgit v0.12 From f69a43285ec023f34a9913bfa55a317349a294df Mon Sep 17 00:00:00 2001 From: das Date: Sun, 21 Dec 2008 20:55:07 +0000 Subject: * unix/configure.in: Preserve configure environment variables for sub-configures of bundled packages; reuse configure cache file for sub-configures. --- unix/configure.in | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/unix/configure.in b/unix/configure.in index 6c694f6..607ac02 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.201 2008/12/20 01:11:10 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.202 2008/12/21 20:55:07 das Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -30,7 +30,24 @@ TCL_MINOR_VERSION=6 TCL_PATCH_LEVEL="b1" VERSION=${TCL_VERSION} -PKG_CFG_ARGS=$@ +#------------------------------------------------------------------------ +# Setup configure arguments for bundled packages +#------------------------------------------------------------------------ + +PKG_CFG_ARGS="$@ ${PKG_CFG_ARGS}" + +# Ensure environment of sub-configure is the same as ours +for v in CC CPP CFLAGS CPPFLAGS LDFLAGS; do + eval 'test -n "$'$v'" && PKG_CFG_ARGS="$v=\"$'$v'\" $PKG_CFG_ARGS"' +done + +if test -r "$cache_file" -a -f "$cache_file"; then + case $cache_file in + [[\\/]]* | ?:[[\\/]]* ) pkg_cache_file=$cache_file ;; + *) pkg_cache_file=../../$cache_file ;; + esac + PKG_CFG_ARGS="${PKG_CFG_ARGS} --cache-file=$pkg_cache_file" +fi #------------------------------------------------------------------------ # Handle the --prefix=... option @@ -126,7 +143,6 @@ AC_CHECK_HEADER([zlib.h],[ AS_IF([test $zlib_ok = yes], [ AC_SEARCH_LIBS([deflateSetHeader],[z],[],[ zlib_ok=no - AC_MSG_WARN([todo: Add compat/zlib to list of things to build]) ])]) AS_IF([test $zlib_ok = no], [ AC_SUBST(ZLIB_DIR,[\${COMPAT_DIR}/zlib]) -- cgit v0.12 From 838c80d4b78d69a982225311bdb5db92339f7b01 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 21 Dec 2008 20:55:29 +0000 Subject: * unix/configure: autoconf-2.59 --- unix/configure | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/unix/configure b/unix/configure index afa9ca5..34d2782 100755 --- a/unix/configure +++ b/unix/configure @@ -1338,7 +1338,24 @@ TCL_MINOR_VERSION=6 TCL_PATCH_LEVEL="b1" VERSION=${TCL_VERSION} -PKG_CFG_ARGS=$@ +#------------------------------------------------------------------------ +# Setup configure arguments for bundled packages +#------------------------------------------------------------------------ + +PKG_CFG_ARGS="$@ ${PKG_CFG_ARGS}" + +# Ensure environment of sub-configure is the same as ours +for v in CC CPP CFLAGS CPPFLAGS LDFLAGS; do + eval 'test -n "$'$v'" && PKG_CFG_ARGS="$v=\"$'$v'\" $PKG_CFG_ARGS"' +done + +if test -r "$cache_file" -a -f "$cache_file"; then + case $cache_file in + [\\/]* | ?:[\\/]* ) pkg_cache_file=$cache_file ;; + *) pkg_cache_file=../../$cache_file ;; + esac + PKG_CFG_ARGS="${PKG_CFG_ARGS} --cache-file=$pkg_cache_file" +fi #------------------------------------------------------------------------ # Handle the --prefix=... option @@ -6262,8 +6279,6 @@ if test "$ac_cv_search_deflateSetHeader" != no; then else zlib_ok=no - { echo "$as_me:$LINENO: WARNING: todo: Add compat/zlib to list of things to build" >&5 -echo "$as_me: WARNING: todo: Add compat/zlib to list of things to build" >&2;} fi -- cgit v0.12 From a87ad4cfe4291918feedc62384ec3cdb18381f1b Mon Sep 17 00:00:00 2001 From: das Date: Sun, 21 Dec 2008 20:55:47 +0000 Subject: * unix/Makefile.in: Fix broken build of bundled packages when path to build dir contains spaces by switching to relative paths to toplevel build dir. --- ChangeLog | 12 ++++++++++++ unix/Makefile.in | 26 ++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index c59c350..ffc1139 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-12-21 Daniel Steffen + + * unix/Makefile.in: Fix broken build of bundled packages when path + to build dir contains spaces by switching to + relative paths to toplevel build dir. + + * unix/configure.in: Preserve configure environment variables for + sub-configures of bundled packages; reuse + configure cache file for sub-configures. + + * unix/configure: autoconf-2.59 + 2008-12-21 Donal K. Fellows *** 8.6b1 TAGGED FOR RELEASE *** diff --git a/unix/Makefile.in b/unix/Makefile.in index 2a68836..7e72acc 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.256 2008/12/20 02:27:55 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.257 2008/12/21 20:55:47 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1609,13 +1609,16 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c # Bundled Package targets # -# somehow we need to propagate configure args like --enable-64bit -PKG_CFG_ARGS = @PKG_CFG_ARGS@ -PKG_DIR = ./pkgs +# propagate configure args like --enable-64bit to package configure +PKG_CFG_ARGS = @PKG_CFG_ARGS@ +# if PKG_DIR is changed to a different relative depth to the build dir, +# need to adapt the ../.. relative paths below and at the top of configure.in +# (cannot use absolute paths due to issues in nested configure when path to +# build dir contains spaces). +PKG_DIR = ./pkgs configure-packages: - @builddir="`pwd`"; \ - for i in $(PKGS_DIR)/*; do \ + @for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ if [ -x $$i/configure ]; then \ pkg=`basename $$i`; \ @@ -1623,7 +1626,7 @@ configure-packages: mkdir -p $(PKG_DIR)/$$pkg; \ if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ ( cd $(PKG_DIR)/$$pkg; \ - $$i/configure --with-tcl="$${builddir}" \ + $$i/configure --with-tcl=../.. \ --with-tclinclude=$(GENERIC_DIR) \ $(PKG_CFG_ARGS) --libdir=$(PACKAGE_DIR) \ --enable-shared --enable-threads; ) || exit $$?; \ @@ -1656,17 +1659,16 @@ install-packages: packages done test-packages: tcltest packages - @builddir="`pwd`"; \ - for i in $(PKGS_DIR)/*; do \ + @for i in $(PKGS_DIR)/*; do \ if [ -d $$i ]; then \ pkg=`basename $$i`; \ if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ echo "Testing package '$$pkg'"; \ ( cd $(PKG_DIR)/$$pkg; $(MAKE) \ - "@LD_LIBRARY_PATH_VAR@=$${builddir}:$${@LD_LIBRARY_PATH_VAR@}" \ + "@LD_LIBRARY_PATH_VAR@=../..:$${@LD_LIBRARY_PATH_VAR@}" \ "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" \ - "TCLLIBPATH=$${builddir}/pkgs" test \ - "TCLSH_PROG=$${builddir}/tcltest"; ) \ + "TCLLIBPATH=../../pkgs" test \ + "TCLSH_PROG=../../tcltest"; ) \ fi; \ fi; \ done -- cgit v0.12 From 2619aae3151b27dc369e63d986791f48d17ba71b Mon Sep 17 00:00:00 2001 From: das Date: Sun, 21 Dec 2008 21:17:19 +0000 Subject: fix 64bit test failures --- tests/zlib.test | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/zlib.test b/tests/zlib.test index 380edaf..dd0b1dc 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.5 2008/12/18 10:37:43 dkf Exp $ +# RCS: @(#) $Id: zlib.test,v 1.6 2008/12/21 21:17:19 das Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -44,20 +44,20 @@ test zlib-4.2 {zlib gzip/gunzip} zlib { } {abcdefabcdefabcdefabcdefabcdef gorp 30} test zlib-5.1 {zlib adler32} zlib { - format %x [zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde] + format %x [expr {[zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde] & 0xffffffff}] } b3b50b9b test zlib-5.2 {zlib adler32} zlib { - format %x [zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde 42] + format %x [expr {[zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde 42] & 0xffffffff}] } b8830bc4 test zlib-5.3 {zlib adler32} -constraints zlib -returnCodes error -body { zlib adler32 abcdeabcdeabcdeabcdeabcdeabcde 42 x } -result {wrong # args: should be "zlib adler32 data ?startValue?"} test zlib-6.1 {zlib crc32} zlib { - format %x [zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde] + format %x [expr {[zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde] & 0xffffffff}] } 6f73e901 test zlib-6.2 {zlib crc32} zlib { - format %x [zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42] + format %x [expr {[zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42] & 0xffffffff}] } ce1c4914 test zlib-6.3 {zlib crc32} -constraints zlib -returnCodes error -body { zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42 x -- cgit v0.12 From dc5fa4d7e5018ee5bd3034f1a5d1bf47e980c0e4 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sun, 21 Dec 2008 21:19:47 +0000 Subject: Fixed Stuart Cassoff's name in ChangeLog --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ffc1139..75b081c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -531,7 +531,7 @@ * library/tclIndex: Removed reference to no-longer-extant procedure 'tclLdAout'. * doc/library.n: Corrected mention of 'auto_exec' to 'auto_execok'. - [Patch 2114900] thanks to Stu Cassoff + [Patch 2114900] thanks to Stuart Cassoff 2008-11-25 Jan Nijtmans -- cgit v0.12 From 802eead7131d784d450b7a150d8f9c2ce88891f1 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 21 Dec 2008 22:05:46 +0000 Subject: MINOR CHANGE: Tidy up changelog formatting. --- ChangeLog | 124 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 61 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75b081c..3385d0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,23 +18,21 @@ 2008-12-20 Kevin B. Kenny - * win/Makefile.in: - * win/configure.in: Renamed the static library libtcl86s.a to - have a name distinct from the import library + * win/Makefile.in: Renamed the static library libtcl86s.a to + * win/configure.in: have a name distinct from the import library libtcl86.a. This renaming dodges an ancient bug in the Makefile revealed by the last commit where the $(TCL_LIB_FILE) rule can - fire to try to build the static library in - a --enable-shared build (and create a - static library that subsequently fails to - link). + fire to try to build the static library in a + --enable-shared build (and create a static + library that subsequently fails to link). Revised the zlib objects so that they are built directly into the build dir, without building an intermediate static library. - *** POTENTIAL INCOMPATIBILITY *** for embedders - who link to the static library, but I couldn't - figure out how to sort this out any other - way. + *** POTENTIAL INCOMPATIBILITY *** for + embedders who link to the static library, but + I couldn't figure out how to sort this out + any other way. * win/configure: Autoconf 2.59 2008-12-20 Donal K. Fellows @@ -95,7 +93,7 @@ 2008-12-19 Kevin Kenny - * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all. + * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all * win/configure.in: * win/Makefile.in: Added build of packages in the 'pkgs/' directory. @@ -164,9 +162,9 @@ 2008-12-17 Jan Nijtmans - * generic/tclResult.c: Move variable "length" inside if() - * generic/tclStringObj.c: don't use ckfree((void *)...) but - * generic/tclVar.c: ckfree((char *)...) + * generic/tclResult.c: Move variable "length" inside if() + * generic/tclStringObj.c: Don't use ckfree((void *)...) but + * generic/tclVar.c: ckfree((char *)...) * generic/tclZlib.c * generic/tclBasic.c @@ -195,9 +193,9 @@ * generic/tclThreadTest.c: Eliminate -Wwrite-strings warnings in --enable-threads build. - * generic/tclExecute.c: Use TclNewLiteralStringObj() - * unix/tclUnixFCmd.c: Use TclNewLiteralStringObj() - * win/tclWinFCmd.c: Use TclNewLiteralStringObj() + * generic/tclExecute.c: Use TclNewLiteralStringObj() + * unix/tclUnixFCmd.c: Use TclNewLiteralStringObj() + * win/tclWinFCmd.c: Use TclNewLiteralStringObj() 2008-12-16 Donal K. Fellows @@ -307,8 +305,8 @@ 2008-12-11 Jan Nijtmans * generic/tclZlib.c: Eliminate warning: different 'const' qualifiers - with msvc compiler. A few more 'const' optimizations. - * win/tcl.m4: fix Windows build (msvc) for TIP #234 implementation + with msvc compiler. A few more 'const' optimizations. + * win/tcl.m4: Fix Windows build (msvc) for TIP #234 implementation * win/Makefile.in: * win/configure: @@ -330,7 +328,7 @@ 2008-12-11 Jan Nijtmans - * win/Makefile.in: fix Windows build (mingw) for TIP #234 + * win/Makefile.in: Fix Windows build (mingw) for TIP #234 implementation (additionally, first make sure that zlib is available, and rename the standard zdll.lib to libz.a, but at least this works so far). @@ -535,10 +533,10 @@ 2008-11-25 Jan Nijtmans - * generic/tclIndexObj.c: Eliminate 3 calls to Tcl_SetResult, as - * generic/tclIO.c: examples how it should have been done. - * generic/tclTestObj.c: purpose: contribute in the TIP #340 - discussion. + * generic/tclIndexObj.c: Eliminate 3 calls to Tcl_SetResult, as + * generic/tclIO.c: examples how it should have been done. + * generic/tclTestObj.c: purpose: contribute in the TIP #340 + discussion. 2008-11-25 Andreas Kupries @@ -549,7 +547,7 @@ 2008-11-25 Jan Nijtmans * generic/tclTest.c: Don't assume that Tcl_SetResult sets - interp->result, especially not in a dstring test, in preparation for + interp->result, especially not in a DString test, in preparation for TIP #340 2008-11-24 Donal K. Fellows @@ -564,9 +562,9 @@ 2008-11-17 Jan Nijtmans - * generic/tcl.decls: Fix signature and implementation of - * generic/tclDecls.h: Tcl_HashStats, such that it conforms to the - * generic/tclHash.c: documentation. [Bug 2308236] + * generic/tcl.decls: Fix signature and implementation of + * generic/tclDecls.h: Tcl_HashStats, such that it conforms to the + * generic/tclHash.c: documentation. [Bug 2308236] * generic/tclVar.c: * doc/Hash.3: * generic/tclDictObj.c: Convert Tcl_SetResult call to @@ -606,24 +604,24 @@ 2008-11-11 Jan Nijtmans - * generic/tclNamesp.c: Eliminate warning: passing arg 4 of - `Tcl_SplitList' from incompatible pointer type. - * win/tcl.m4: Reverted change from 2008-11-06 (was under the - impression that "-Wno-implicit-int" added an - extra warning) - * win/configure: (regenerated) - * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and - get rid of -Wno-implicit-int for UNIX. - * unix/configure: (regenerated) + * generic/tclNamesp.c: Eliminate warning: passing arg 4 of + Tcl_SplitList from incompatible pointer type. + * win/tcl.m4: Reverted change from 2008-11-06 (was under the + impression that "-Wno-implicit-int" added an extra + warning) + * win/configure: (regenerated) + * unix/tcl.m4: Use -O2 as gcc optimization compiler flag, and get rid + of -Wno-implicit-int for UNIX. + * unix/configure: (regenerated) 2008-11-10 Andreas Kupries * doc/platform_shell.n: Fixed [Bug 2255235], reported by Ulrich * library/platform/pkgIndex.tcl: Ring . * library/platform/shell.tcl: Updated the LOCATE command in the - * library/tm.tcl: package 'platform::shell' to handle the new form + * library/tm.tcl: package 'platform::shell' to handle the new form * unix/Makefile.in: of 'provide' commands generated by tm.tcl. Bumped - * win/Makefile.in: package to version 1.1.4. Added cross-references + * win/Makefile.in: package to version 1.1.4. Added cross-references to the relevant parts of the code to avoid future desynchronization. 2008-11-07 Pat Thoyts @@ -642,9 +640,9 @@ 2008-11-04 Jeff Hobbs - * generic/tclPort.h: remove the ../win/ header dir as the build - system already has it, and it confuses builds when used with - private headers installed. + * generic/tclPort.h: Remove the ../win/ header dir as the build system + already has it, and it confuses builds when used with private headers + installed. 2008-11-01 Donal K. Fellows @@ -735,19 +733,19 @@ 2008-10-17 Jan Nijtmans - * generic/tclOO.decls: CONST -> const. - * generic/tclOODecls.h: (regenerated) - * generic/tclOOIntDecls.h: (regenerated) + * generic/tclOO.decls: CONST -> const. + * generic/tclOODecls.h: (regenerated) + * generic/tclOOIntDecls.h: (regenerated) 2008-10-17 Andreas Kupries - * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removed - debug output in C++ comment. + * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removed debug + output in C++ comment. 2008-10-17 Don Porter - * generic/tclCompile.h: Declare the internal tclInstructionTable - * generic/tclExecute.c: to simply be "const", not CONST86. + * generic/tclCompile.h: Declare the internal tclInstructionTable to + * generic/tclExecute.c: simply be "const", not CONST86. * generic/tclCmdAH.c: whitespace. * generic/tclCmdIL.c: Uninitialized variable warning. @@ -761,9 +759,9 @@ 2008-10-16 Jan Nijtmans - * generic/regc_locale.c: Add "const" to many internal - * generic/tclClock.c: const tables. No functional - * generic/tclCmdIL.c: or API change. + * generic/regc_locale.c: Add "const" to many internal const tables. + * generic/tclClock.c: No functional or API change. + * generic/tclCmdIL.c * generic/tclConfig.c * generic/tclDate.c * generic/tclEncoding.c @@ -790,7 +788,7 @@ * generic/tclThreadTest.c * generic/tclTimer.c * generic/tclTrace.c - * macosx/tclMacOSXFCmd.c: + * macosx/tclMacOSXFCmd.c * win/cat.c * win/tclWinInit.c * win/tclWinTest.c @@ -804,12 +802,12 @@ 2008-10-15 Jan Nijtmans - * generic/tclInt.h: Add "const" to many internal - * generic/tclBinary.c: const tables, so those will be - * generic/tclCompile.c: put by the C-compiler in the - * generic/tclDictObj.c: TEXT segment in stead of the - * generic/tclHash.c: DATA segment. This makes those - * generic/tclListObj.c: table sharable in shared libraries. + * generic/tclInt.h: Add "const" to many internal const tables, so + * generic/tclBinary.c: those will be put by the C-compiler in the + * generic/tclCompile.c: TEXT segment in stead of the DATA segment. + * generic/tclDictObj.c: This makes those tables sharable in shared + * generic/tclHash.c: libraries. + * generic/tclListObj.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: @@ -820,8 +818,8 @@ 2008-10-14 Jan Nijtmans - * generic/tclCmdAH.c: Fix minor compiler warnings when compiling - * generic/tclCmdMZ.c: with -Wwrite-strings + * generic/tclCmdAH.c: Fix minor compiler warnings when compiling + * generic/tclCmdMZ.c: with -Wwrite-strings. * generic/tclIndexObj.c: * generic/tclProc.c: * generic/tclStubLib.c: @@ -849,7 +847,7 @@ * unix/configure: autoconf-2.59 * win/configure: - * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all. + * generic/tclExecute.c: Fix compile warnings when --enable-symbols=all * generic/tclCmdIL.c: Fix write to unallocated memory whenever [lrepeat] returns an empty list. -- cgit v0.12 From 515219150ace1210cd7e4cfa05e5fb44849978c9 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 22 Dec 2008 01:39:33 +0000 Subject: Silence signed unsigned warning --- generic/tclZlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 114b139..4fc56e1 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.17 2008/12/20 01:21:04 das Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.18 2008/12/22 01:39:33 patthoyts Exp $ */ #include "tclInt.h" @@ -2221,7 +2221,7 @@ ChanClose( cd->outStream.avail_in = 0; do { cd->outStream.next_out = (Bytef *) cd->outBuffer; - cd->outStream.avail_out = cd->outAllocated; + cd->outStream.avail_out = (unsigned) cd->outAllocated; e = deflate(&cd->outStream, Z_FINISH); if (e != Z_OK && e != Z_STREAM_END) { /* TODO: is this the right way to do errors on close? */ -- cgit v0.12 From d8c0b8c3cb13319e54c3f8deda3a7e2eef753451 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 22 Dec 2008 01:40:57 +0000 Subject: Support the pkgs tree --- ChangeLog | 4 ++++ win/makefile.vc | 35 +++++++++++++++++++++++++---------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3385d0b..aa1457a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-22 Pat Thoyts + + * win/makefile.vc: Support the pkgs tree in the NMAKE builds. + 2008-12-21 Daniel Steffen * unix/Makefile.in: Fix broken build of bundled packages when path diff --git a/win/makefile.vc b/win/makefile.vc index 9a29dde..93b7254 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.193 2008/12/19 01:34:51 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.194 2008/12/22 01:40:57 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -196,8 +196,8 @@ DDEVERSION = $(DDEDOTVERSION:.=) REGDOTVERSION = 1.2 REGVERSION = $(REGDOTVERSION:.=) -BINROOT = . -ROOT = .. +BINROOT = $(MAKEDIR) # originally . +ROOT = $(MAKEDIR)\.. # originally .. TCLIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT) @@ -425,7 +425,7 @@ GENERICDIR = $(ROOT)\generic TOMMATHDIR = $(ROOT)\libtommath TOOLSDIR = $(ROOT)\tools WINDIR = $(ROOT)\win - +PKGSDIR = $(ROOT)\pkgs #--------------------------------------------------------------------- # Compile flags @@ -534,17 +534,17 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT) # Project specific targets #--------------------------------------------------------------------- -release: setup $(TCLSH) $(TCLSTUBLIB) dlls +release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs core: setup $(TCLLIB) $(TCLSTUBLIB) shell: setup $(TCLSH) dlls: setup $(TCLPIPEDLL) $(TCLREGLIB) $(TCLDDELIB) -all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) +all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) pkgs tcltest: setup $(TCLTEST) dlls $(CAT32) -install: install-binaries install-libraries install-docs - +install: install-binaries install-libraries install-docs install-pkgs -test: setup $(TCLTEST) dlls $(CAT32) - set TCL_LIBRARY=$(ROOT)/library +test: test-core test-pkgs +test-core: setup $(TCLTEST) dlls $(CAT32) + set TCL_LIBRARY=$(ROOT:\=/)/../library !if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE" $(DEBUGGER) $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) -loadfile << set ::ddelib [file normalize $(TCLDDELIB:\=/)] @@ -633,6 +633,21 @@ $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) -@del $*.lib !endif +pkgs: + @for /d %d in ($(PKGSDIR)\*) do \ + @pushd %~fd\win & \ + $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) + +test-pkgs: + @for /d %d in ($(PKGSDIR)\*) do \ + @pushd %~fd\win & \ + $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) test + +install-pkgs: + @for /d %d in ($(PKGSDIR)\*) do \ + @pushd %~fd\win & \ + $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) install + $(CAT32): $(WINDIR)\cat.c $(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $? $(link32) $(conlflags) -out:$@ -stack:16384 $(TMP_DIR)\cat.obj \ -- cgit v0.12 From 47a7a034d40e70286b3927f608a136b73a245584 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 22 Dec 2008 12:50:14 +0000 Subject: - add more missing symbols from zlib.def - mark dll build as being a modified verson Both changes backported from (unreleased) zlib-1.2.3.3 --- compat/zlib/win32/zlib.def | 6 ++++++ compat/zlib/win32/zlib1.rc | 11 ++++++----- compat/zlib/zlib.h | 5 ++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/compat/zlib/win32/zlib.def b/compat/zlib/win32/zlib.def index 278805f..a9e951f 100644 --- a/compat/zlib/win32/zlib.def +++ b/compat/zlib/win32/zlib.def @@ -16,6 +16,7 @@ EXPORTS deflateBound deflatePrime deflateSetHeader + deflateTune inflateSetDictionary inflateSync inflateCopy @@ -23,6 +24,8 @@ EXPORTS inflateBack inflateBackEnd inflateGetHeader + inflatePrime + inflateSyncPoint zlibCompileFlags ; utility functions compress @@ -45,12 +48,15 @@ EXPORTS gzrewind gztell gzeof + gzdirect gzclose gzerror gzclearerr ; checksum functions adler32 + adler32_combine crc32 + crc32_combine ; various hacks, don't look :) deflateInit_ deflateInit2_ diff --git a/compat/zlib/win32/zlib1.rc b/compat/zlib/win32/zlib1.rc index 99025c9..77e8388 100644 --- a/compat/zlib/win32/zlib1.rc +++ b/compat/zlib/win32/zlib1.rc @@ -1,12 +1,13 @@ -#include +#include +#include "../zlib.h" #ifdef GCC_WINDRES VS_VERSION_INFO VERSIONINFO #else VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE #endif - FILEVERSION 1,2,2,0 - PRODUCTVERSION 1,2,2,0 + FILEVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 + PRODUCTVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS 1 @@ -23,12 +24,12 @@ BEGIN //language ID = U.S. English, char set = Windows, Multilingual BEGIN VALUE "FileDescription", "zlib data compression library\0" - VALUE "FileVersion", "1.2.3\0" + VALUE "FileVersion", ZLIB_VERSION "\0" VALUE "InternalName", "zlib1.dll\0" VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0" VALUE "OriginalFilename", "zlib1.dll\0" VALUE "ProductName", "zlib\0" - VALUE "ProductVersion", "1.2.3\0" + VALUE "ProductVersion", ZLIB_VERSION "\0" VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" END END diff --git a/compat/zlib/zlib.h b/compat/zlib/zlib.h index 586ab31..78a1b32 100644 --- a/compat/zlib/zlib.h +++ b/compat/zlib/zlib.h @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3, July 18th, 2005 + version 1.2.3.f-tcl, Dec 22th, 2008 Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler @@ -44,6 +44,9 @@ extern "C" { */ #define ZLIB_VERSION "1.2.3.f-tcl" #define ZLIB_VERNUM 0x123f +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 2 +#define ZLIB_VER_REVISION 3 /* The 'zlib' compression library provides in-memory compression and -- cgit v0.12 From c12bdce8ba5e23d5b45c1cace3b81a93929b07a3 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Mon, 22 Dec 2008 13:04:32 +0000 Subject: Fix for [Bug 2330040] --- ChangeLog | 5 +++++ tools/man2help2.tcl | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aa1457a..0d785a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-22 Joe Mistachkin + + * tools/man2help2.tcl: Added support for "\(mi" nroff macro. + [Bug 2330040] + 2008-12-22 Pat Thoyts * win/makefile.vc: Support the pkgs tree in the NMAKE builds. diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl index 20e86af..5442a6f 100644 --- a/tools/man2help2.tcl +++ b/tools/man2help2.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: man2help2.tcl,v 1.19 2008/10/02 19:01:30 mistachkin Exp $ +# RCS: @(#) $Id: man2help2.tcl,v 1.20 2008/12/22 13:04:32 mistachkin Exp $ # # Global variables used by these scripts: @@ -712,6 +712,10 @@ proc char {name} { textSetup puts -nonewline $file "\\'a9 " } + {\(mi} { + textSetup + puts -nonewline $file "-" + } {\(mu} { textSetup puts -nonewline $file "\\'d7 " -- cgit v0.12 From a2648a12653304079b214f1136e7626d3f63b4f2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 22 Dec 2008 13:20:24 +0000 Subject: - add more missing symbols from zlib.def - mark dll build as being a modified verson Both changes backported from (unreleased) zlib-1.2.3.3 --- compat/zlib/win32/zlib.def | 1 - 1 file changed, 1 deletion(-) diff --git a/compat/zlib/win32/zlib.def b/compat/zlib/win32/zlib.def index a9e951f..964316d 100644 --- a/compat/zlib/win32/zlib.def +++ b/compat/zlib/win32/zlib.def @@ -25,7 +25,6 @@ EXPORTS inflateBackEnd inflateGetHeader inflatePrime - inflateSyncPoint zlibCompileFlags ; utility functions compress -- cgit v0.12 From a43f218a940239942581439eb0e1e97bd09f66d7 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 22 Dec 2008 14:49:32 +0000 Subject: [Bug 2458395] Ensure pkgs directories are suitable and quote the paths. --- ChangeLog | 5 +++++ win/makefile.vc | 37 +++++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d785a1..28ba582 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-22 Pat Thoyts + + * win/makefile.vc: [Bug 2458395] Ensure pkgs directories are + suitable and quote the paths. + 2008-12-22 Joe Mistachkin * tools/man2help2.tcl: Added support for "\(mi" nroff macro. diff --git a/win/makefile.vc b/win/makefile.vc index 93b7254..4319f8a 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.194 2008/12/22 01:40:57 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.195 2008/12/22 14:49:32 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -635,18 +635,35 @@ $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) pkgs: @for /d %d in ($(PKGSDIR)\*) do \ - @pushd %~fd\win & \ - $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) + @if exist "%~fd\win\makefile.vc" ( \ + pushd "%~fd\win" & \ + $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) &\ + popd \ + ) test-pkgs: @for /d %d in ($(PKGSDIR)\*) do \ - @pushd %~fd\win & \ - $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) test + @if exist "%~fd\win\makefile.vc" ( \ + pushd "%~fd\win" & \ + $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) test &\ + popd \ + ) install-pkgs: @for /d %d in ($(PKGSDIR)\*) do \ - @pushd %~fd\win & \ - $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) install + @if exist "%~fd\win\makefile.vc" ( \ + pushd "%~fd\win" & \ + $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) install &\ + popd \ + ) + +clean-pkgs: + @for /d %d in ($(PKGSDIR)\*) do \ + @if exist "%~fd\win\makefile.vc" ( \ + pushd "%~fd\win" & \ + $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) clean &\ + popd \ + ) $(CAT32): $(WINDIR)\cat.c $(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $? @@ -785,11 +802,11 @@ $(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX) $(DOCDIR)\* $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(VERSION) $(DOCDIR:\=/) install-docs: -!if exist($(CHMFILE)) +!if exist("$(CHMFILE)") @echo Installing compiled html help @$(CPY) "$(CHMFILE)" "$(DOC_INSTALL_DIR)\" !endif -!if exist($(HELPFILE)) +!if exist("$(HELPFILE)") @echo Installing Windows help @$(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\" @$(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\" @@ -1158,7 +1175,7 @@ tidy: @echo Removing $(TCLREGLIB) ... @if exist $(TCLREGLIB) del $(TCLREGLIB) -clean: +clean: clean-pkgs @echo Cleaning $(TMP_DIR)\* ... @if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR) @echo Cleaning $(WINDIR)\nmakehlp.obj ... -- cgit v0.12 From 728a131ecbfd5d7b51efbc78d21abb117ffa1d91 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 22 Dec 2008 15:45:43 +0000 Subject: Drop lone @ line from test: target --- unix/Makefile.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 7e72acc..799ee0e 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.257 2008/12/21 20:55:47 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.258 2008/12/22 15:45:43 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -635,7 +635,6 @@ tcltest-real: # % make test TESTFLAGS="-verbose bps -file fileName.test" test: test-tcl test-packages - @ test-tcl: tcltest $(SHELL_ENV) ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -- cgit v0.12 From 4a02e8f7107c2512993c80f6a7046b5f28b6552e Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 22 Dec 2008 16:57:25 +0000 Subject: advance tag --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28ba582..105efce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-12-22 Pat Thoyts + *** 8.6b1 TAGGED FOR RELEASE *** + * win/makefile.vc: [Bug 2458395] Ensure pkgs directories are suitable and quote the paths. @@ -26,8 +28,6 @@ 2008-12-21 Donal K. Fellows - *** 8.6b1 TAGGED FOR RELEASE *** - * doc/TclZlib.3: Fix minor typo. [Bug 2455165] 2008-12-20 Kevin B. Kenny -- cgit v0.12 From 62fff2d6771a68615c2f9019a893a97b051c8654 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 23 Dec 2008 08:55:30 +0000 Subject: Fix [Bug 2459725] --- ChangeLog | 12 ++++++++---- win/Makefile.in | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 105efce..9710b79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,18 @@ +2008-12-23 Donal K. Fellows + + * win/Makefile.in: Handle file extensions correctly. [Bug 2459725] + 2008-12-22 Pat Thoyts *** 8.6b1 TAGGED FOR RELEASE *** - * win/makefile.vc: [Bug 2458395] Ensure pkgs directories are - suitable and quote the paths. + * win/makefile.vc: Ensure pkgs directories are suitable and quote the + paths. [Bug 2458395] 2008-12-22 Joe Mistachkin - * tools/man2help2.tcl: Added support for "\(mi" nroff macro. - [Bug 2330040] + * tools/man2help2.tcl: Added support for "\(mi" nroff macro. [Bug + 2330040] 2008-12-22 Pat Thoyts diff --git a/win/Makefile.in b/win/Makefile.in index ccca697..1f6c664 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.146 2008/12/20 22:06:02 kennykb Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.147 2008/12/23 08:55:30 dkf Exp $ VERSION = @TCL_VERSION@ @@ -387,18 +387,18 @@ STUB_OBJS = \ TCLSH_OBJS = tclAppInit.$(OBJEXT) ZLIB_OBJS = \ - Zadler32$(OBJEXT) \ - Zcompress$(OBJEXT) \ - Zcrc32$(OBJEXT) \ - Zdeflate$(OBJEXT) \ - Zgzio$(OBJEXT) \ - Zinfback$(OBJEXT) \ - Zinffast$(OBJEXT) \ - Zinflate$(OBJEXT) \ - Zinftrees$(OBJEXT) \ - Ztrees$(OBJEXT) \ - Zuncompr$(OBJEXT) \ - Zzutil$(OBJEXT) + Zadler32.$(OBJEXT) \ + Zcompress.$(OBJEXT) \ + Zcrc32.$(OBJEXT) \ + Zdeflate.$(OBJEXT) \ + Zgzio.$(OBJEXT) \ + Zinfback.$(OBJEXT) \ + Zinffast.$(OBJEXT) \ + Zinflate.$(OBJEXT) \ + Zinftrees.$(OBJEXT) \ + Ztrees.$(OBJEXT) \ + Zuncompr.$(OBJEXT) \ + Zzutil.$(OBJEXT) TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} ${ZLIB_OBJS} @@ -502,29 +502,29 @@ tclAppInit.${OBJEXT} : tclAppInit.c # For building zlib, only used in some build configurations -Zadler32$(OBJEXT): $(ZLIB_DIR)/adler32.c +Zadler32.$(OBJEXT): $(ZLIB_DIR)/adler32.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zcompress$(OBJEXT): $(ZLIB_DIR)/compress.c +Zcompress.$(OBJEXT): $(ZLIB_DIR)/compress.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zcrc32$(OBJEXT): $(ZLIB_DIR)/crc32.c +Zcrc32.$(OBJEXT): $(ZLIB_DIR)/crc32.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zdeflate$(OBJEXT): $(ZLIB_DIR)/deflate.c +Zdeflate.$(OBJEXT): $(ZLIB_DIR)/deflate.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zgzio$(OBJEXT): $(ZLIB_DIR)/gzio.c +Zgzio.$(OBJEXT): $(ZLIB_DIR)/gzio.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zinfback$(OBJEXT): $(ZLIB_DIR)/infback.c +Zinfback.$(OBJEXT): $(ZLIB_DIR)/infback.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zinffast$(OBJEXT): $(ZLIB_DIR)/inffast.c +Zinffast.$(OBJEXT): $(ZLIB_DIR)/inffast.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zinflate$(OBJEXT): $(ZLIB_DIR)/inflate.c +Zinflate.$(OBJEXT): $(ZLIB_DIR)/inflate.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zinftrees$(OBJEXT): $(ZLIB_DIR)/inftrees.c +Zinftrees.$(OBJEXT): $(ZLIB_DIR)/inftrees.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Ztrees$(OBJEXT): $(ZLIB_DIR)/trees.c +Ztrees.$(OBJEXT): $(ZLIB_DIR)/trees.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zuncompr$(OBJEXT): $(ZLIB_DIR)/uncompr.c +Zuncompr.$(OBJEXT): $(ZLIB_DIR)/uncompr.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< -Zzutil$(OBJEXT): $(ZLIB_DIR)/zutil.c +Zzutil.$(OBJEXT): $(ZLIB_DIR)/zutil.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< tclZlib.${OBJEXT} : tclZlib.c -- cgit v0.12 From d86d21d052235b888eeae25dc76e8a8d8e8bf616 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 23 Dec 2008 16:46:18 +0000 Subject: fix build of zlib objects with msvc --- ChangeLog | 6 ++++++ win/Makefile.in | 28 ++++++++++++++-------------- win/configure | 2 +- win/tcl.m4 | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9710b79..74b3df9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-23 Jan Nijtmans + + * win/Makefile.in: fix build of zlib objects with msvc + * win/tcl.m4: + * win/configure: autoconf-2.59 + 2008-12-23 Donal K. Fellows * win/Makefile.in: Handle file extensions correctly. [Bug 2459725] diff --git a/win/Makefile.in b/win/Makefile.in index 1f6c664..29097c2 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.147 2008/12/23 08:55:30 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.148 2008/12/23 16:46:19 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -179,7 +179,7 @@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ STLIB_LD = @STLIB_LD@ SHLIB_LD = @SHLIB_LD@ -SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(LIBS) +SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ LIBS = @LIBS@ @@ -503,29 +503,29 @@ tclAppInit.${OBJEXT} : tclAppInit.c # For building zlib, only used in some build configurations Zadler32.$(OBJEXT): $(ZLIB_DIR)/adler32.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zcompress.$(OBJEXT): $(ZLIB_DIR)/compress.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zcrc32.$(OBJEXT): $(ZLIB_DIR)/crc32.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zdeflate.$(OBJEXT): $(ZLIB_DIR)/deflate.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zgzio.$(OBJEXT): $(ZLIB_DIR)/gzio.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zinfback.$(OBJEXT): $(ZLIB_DIR)/infback.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zinffast.$(OBJEXT): $(ZLIB_DIR)/inffast.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zinflate.$(OBJEXT): $(ZLIB_DIR)/inflate.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zinftrees.$(OBJEXT): $(ZLIB_DIR)/inftrees.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Ztrees.$(OBJEXT): $(ZLIB_DIR)/trees.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zuncompr.$(OBJEXT): $(ZLIB_DIR)/uncompr.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) Zzutil.$(OBJEXT): $(ZLIB_DIR)/zutil.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) tclZlib.${OBJEXT} : tclZlib.c $(CC) -c ${ZLIB_INC} $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME) diff --git a/win/configure b/win/configure index 28a2a65..8b96430 100755 --- a/win/configure +++ b/win/configure @@ -3989,7 +3989,7 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 fi fi - LIBS="user32.lib advapi32.lib ws2_32.lib zdll.lib" + LIBS="user32.lib advapi32.lib ws2_32.lib" if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the diff --git a/win/tcl.m4 b/win/tcl.m4 index f27720c..1a46527 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -614,7 +614,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi fi - LIBS="user32.lib advapi32.lib ws2_32.lib zdll.lib" + LIBS="user32.lib advapi32.lib ws2_32.lib" if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the -- cgit v0.12 From b6fef736bd2db96d477934cb11d401e2fe85abbc Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 26 Dec 2008 09:51:10 +0000 Subject: Updated comments in tcl.decls based on code archaeology. --- ChangeLog | 13 +++++-- generic/tcl.decls | 106 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 73 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74b3df9..03aa530 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ +2008-12-26 Donal K. Fellows + + * generic/tcl.decls: Tidy up the commenting style, adding markers for + each of the big release points under TCT stewardship and noting the + general purpose of each TIP that added C API. Overall effect is to + make this file much more informative to read without having to spend + effort correlating with TIPs and ChangeLogs. + 2008-12-23 Jan Nijtmans - * win/Makefile.in: fix build of zlib objects with msvc + * win/Makefile.in: Fix build of zlib objects with msvc * win/tcl.m4: * win/configure: autoconf-2.59 @@ -3202,7 +3210,8 @@ 2008-03-27 Daniel Steffen - * unix/tcl.m4 (SunOS-5.1x): Fix 64bit support for Sun cc. [Bug 1921166] + * unix/tcl.m4 (SunOS-5.1x): Fix 64bit support for Sun cc. [Bug + 1921166] * unix/configure: autoconf-2.59 diff --git a/generic/tcl.decls b/generic/tcl.decls index ffa6eba..5a4b322 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.164 2008/12/18 06:40:02 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.165 2008/12/26 09:51:11 dkf Exp $ library tcl @@ -1031,7 +1031,6 @@ declare 284 generic { # declare 285 generic { # } - # Added in 8.1: declare 286 generic { @@ -1538,13 +1537,18 @@ declare 431 generic { declare 432 generic { int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length) } + +# TIP#10 (thread-aware channels) akupries declare 433 generic { Tcl_ThreadId Tcl_GetChannelThread(Tcl_Channel channel) } + # introduced in 8.4a3 declare 434 generic { Tcl_UniChar *Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, int *lengthPtr) } + +# TIP#15 (math function introspection) dkf declare 435 generic { int Tcl_GetMathFuncInfo(Tcl_Interp *interp, const char *name, int *numArgsPtr, Tcl_ValueType **argTypesPtr, @@ -1553,16 +1557,19 @@ declare 435 generic { declare 436 generic { Tcl_Obj *Tcl_ListMathFuncs(Tcl_Interp *interp, const char *pattern) } + +# TIP#36 (better access to 'subst') dkf declare 437 generic { Tcl_Obj *Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) } + +# TIP#17 (virtual filesystem layer) vdarley declare 438 generic { int Tcl_DetachChannel(Tcl_Interp *interp, Tcl_Channel channel) } declare 439 generic { int Tcl_IsStandardChannel(Tcl_Channel channel) } -# New functions due to TIP#17 declare 440 generic { int Tcl_FSCopyFile(Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr) } @@ -1695,25 +1702,26 @@ declare 478 generic { Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr) } -# New function due to TIP#49 +# TIP#49 (detection of output buffering) akupries declare 479 generic { int Tcl_OutputBuffered(Tcl_Channel chan) } declare 480 generic { void Tcl_FSMountsChanged(const Tcl_Filesystem *fsPtr) } -# New function due to TIP#56 + +# TIP#56 (evaluate a parsed script) msofer declare 481 generic { int Tcl_EvalTokensStandard(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count) } -# New export due to TIP#73 +# TIP#73 (access to current time) kbk declare 482 generic { void Tcl_GetTime(Tcl_Time *timeBuf) } -# New exports due to TIP#32 +# TIP#32 (object-enabled traces) kbk declare 483 generic { Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, int level, int flags, Tcl_CmdObjTraceProc *objProc, ClientData clientData, @@ -1728,6 +1736,7 @@ declare 485 generic { } ### New functions on 64-bit dev branch ### +# TIP#72 (64-bit values) dkf declare 486 generic { Tcl_Obj *Tcl_DbNewWideIntObj(Tcl_WideInt wideValue, const char *file, int line) @@ -1752,13 +1761,15 @@ declare 492 generic { Tcl_WideInt Tcl_Tell(Tcl_Channel chan) } -# New export due to TIP#91 +# TIP#91 (back-compat enhancements for channels) dkf declare 493 generic { Tcl_DriverWideSeekProc *Tcl_ChannelWideSeekProc( const Tcl_ChannelType *chanTypePtr) } -# DICTIONARIES - TIP#111 +# ----- BASELINE -- FOR -- 8.4.0 ----- # + +# TIP#111 (dictionaries) dkf declare 494 generic { int Tcl_DictObjPut(Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj *valuePtr) @@ -1801,13 +1812,14 @@ declare 504 generic { Tcl_Obj *Tcl_DbNewDictObj(const char *file, int line) } -# New export due to TIP#59 +# TIP#59 (configuration reporting) akupries declare 505 generic { void Tcl_RegisterConfig(Tcl_Interp *interp, const char *pkgName, const Tcl_Config *configuration, const char *valEncoding) } -# Transferred from tclInt.decls due to TIP #139 +# TIP #139 (partial exposure of namespace API - transferred from tclInt.decls) +# dkf, API by Brent Welch? declare 506 generic { Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, const char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc) @@ -1853,18 +1865,18 @@ declare 517 generic { Tcl_Obj *objPtr) } -# New export due to TIP#137 +# TIP#137 (encoding-aware source command) dgp for Anton Kovalenko declare 518 generic { int Tcl_FSEvalFileEx(Tcl_Interp *interp, Tcl_Obj *fileName, const char *encodingName) } -# New export due to TIP#121 +# TIP#121 (exit handler) dkf for Joe Mistachkin declare 519 generic { Tcl_ExitProc *Tcl_SetExitProc(Tcl_ExitProc *proc) } -# TIP#143 API +# TIP#143 (resource limits) dkf declare 520 generic { void Tcl_LimitAddHandler(Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, ClientData clientData, @@ -1913,7 +1925,8 @@ declare 533 generic { declare 534 generic { int Tcl_LimitGetGranularity(Tcl_Interp *interp, int type) } -# TIP#226 API + +# TIP#226 (interpreter result state management) dgp declare 535 generic { Tcl_InterpState Tcl_SaveInterpState(Tcl_Interp *interp, int status) } @@ -1923,14 +1936,16 @@ declare 536 generic { declare 537 generic { void Tcl_DiscardInterpState(Tcl_InterpState state) } -# TIP#227 API + +# TIP#227 (return options interface) dgp declare 538 generic { int Tcl_SetReturnOptions(Tcl_Interp *interp, Tcl_Obj *options) } declare 539 generic { Tcl_Obj *Tcl_GetReturnOptions(Tcl_Interp *interp, int result) } -# TIP#235 + +# TIP#235 (ensembles) dkf declare 540 generic { int Tcl_IsEnsemble(Tcl_Command token) } @@ -1977,7 +1992,8 @@ declare 551 generic { int Tcl_GetEnsembleNamespace(Tcl_Interp *interp, Tcl_Command token, Tcl_Namespace **namespacePtrPtr) } -# TIP#233 (Virtualized Time) + +# TIP#233 (virtualized time) akupries declare 552 generic { void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc, Tcl_ScaleTimeProc *scaleProc, @@ -1988,14 +2004,14 @@ declare 553 generic { Tcl_ScaleTimeProc **scaleProc, ClientData *clientData) } -# TIP#218 (Driver Thread Actions) davygrvy/akupries ChannelType ver 4 + +# TIP#218 (driver thread actions) davygrvy/akupries ChannelType ver 4 declare 554 generic { Tcl_DriverThreadActionProc *Tcl_ChannelThreadActionProc( const Tcl_ChannelType *chanTypePtr) } -# TIP#237 (Arbitrary-precision Integers) kevin kenny - +# TIP#237 (arbitrary-precision integers) kbk declare 555 generic { Tcl_Obj *Tcl_NewBignumObj(mp_int *value) } @@ -2012,7 +2028,7 @@ declare 559 generic { int Tcl_TakeBignumFromObj(Tcl_Interp *interp, Tcl_Obj *obj, mp_int *value) } -# TIP #208 ('chan' Command) jeffh +# TIP #208 ('chan' command) jeffh declare 560 generic { int Tcl_TruncateChannel(Tcl_Channel chan, Tcl_WideInt length) } @@ -2021,7 +2037,7 @@ declare 561 generic { const Tcl_ChannelType *chanTypePtr) } -# TIP#219 (Tcl Channel Reflection API) akupries +# TIP#219 (channel reflection api) akupries declare 562 generic { void Tcl_SetChannelErrorInterp(Tcl_Interp *interp, Tcl_Obj *msg) } @@ -2035,13 +2051,13 @@ declare 565 generic { void Tcl_GetChannelError(Tcl_Channel chan, Tcl_Obj **msg) } -# TIP #237 (Additional conversion functions for bignum support) +# TIP #237 (additional conversion functions for bignum support) kbk/dgp declare 566 generic { int Tcl_InitBignumFromDouble(Tcl_Interp *interp, double initval, mp_int *toInit) } -# TIP#181 (namespace unknown Command) +# TIP#181 (namespace unknown command) dgp for Neil Madden declare 567 generic { Tcl_Obj *Tcl_GetNamespaceUnknownHandler(Tcl_Interp *interp, Tcl_Namespace *nsPtr) @@ -2051,7 +2067,7 @@ declare 568 generic { Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr) } -# TIP#258 (Enhanced Interface for Encodings) +# TIP#258 (enhanced interface for encodings) dgp declare 569 generic { int Tcl_GetEncodingFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr) @@ -2066,13 +2082,13 @@ declare 572 generic { const char *Tcl_GetEncodingNameFromEnvironment(Tcl_DString *bufPtr) } -# TIP#268: Extended version numbers and requirements +# TIP#268 (extended version numbers and requirements) akupries declare 573 generic { int Tcl_PkgRequireProc(Tcl_Interp *interp, const char *name, int objc, Tcl_Obj *const objv[], ClientData *clientDataPtr) } -# TIP#270 Utility C Routines for String Formatting +# TIP#270 (utility C routines for string formatting) dgp declare 574 generic { void Tcl_AppendObjToErrorInfo(Tcl_Interp *interp, Tcl_Obj *objPtr) } @@ -2095,7 +2111,9 @@ declare 579 generic { void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, const char *format, ...) } -# TIP #285: Script cancellation support. +# ----- BASELINE -- FOR -- 8.5.0 ----- # + +# TIP #285 (script cancellation support) jmistachkin declare 580 generic { int Tcl_CancelEval(Tcl_Interp *interp, Tcl_Obj *resultObjPtr, ClientData clientData, int flags) @@ -2104,13 +2122,13 @@ declare 581 generic { int Tcl_Canceled(Tcl_Interp *interp, int flags) } -# TIP#304 (chan pipe) +# TIP#304 (chan pipe) aferrieux declare 582 generic { int Tcl_CreatePipe (Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags) } -# TIP #322 (NRE public interface) +# TIP #322 (NRE public interface) msofer declare 583 generic { Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, @@ -2133,7 +2151,6 @@ declare 587 generic { ClientData data0, ClientData data1, ClientData data2, ClientData data3) } - # For use by NR extenders, to have a simple way to also provide a (required!) # classic objProc declare 588 generic { @@ -2141,7 +2158,7 @@ declare 588 generic { ClientData clientData, int objc, Tcl_Obj *const objv[]) } -# Tcl_StatBuf reader functions. [TIP #316] +# TIP#316 (Tcl_StatBuf reader functions) dkf declare 589 generic { unsigned Tcl_GetFSDeviceFromStat(const Tcl_StatBuf *statPtr) } @@ -2182,7 +2199,7 @@ declare 601 generic { unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr) } -# TIP#314 (ensembles with parameters) +# TIP#314 (ensembles with parameters) dkf for Lars Hellstr"om declare 602 generic { int Tcl_SetEnsembleParameterList(Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *paramList) @@ -2192,13 +2209,13 @@ declare 603 generic { Tcl_Obj **paramListPtr) } -# TIP#265 (option parser) +# TIP#265 (option parser) dkf for Sam Bromley declare 604 generic { int Tcl_ParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv) } -# TIP#336 (manipulate the error line) +# TIP#336 (manipulate the error line) dgp declare 605 generic { int Tcl_GetErrorLine(Tcl_Interp *interp) } @@ -2206,23 +2223,23 @@ declare 606 generic { void Tcl_SetErrorLine(Tcl_Interp *interp, int lineNum) } -# TIP#307 (move results between interpreters) +# TIP#307 (move results between interpreters) dkf declare 607 generic { void Tcl_TransferResult(Tcl_Interp *sourceInterp, int result, Tcl_Interp *targetInterp) } -# TIP#335 (detect if interpreter in use) +# TIP#335 (detect if interpreter in use) jmistachkin declare 608 generic { int Tcl_InterpActive(Tcl_Interp *interp) } -# TIP#337 (log exception for background processing) +# TIP#337 (log exception for background processing) dgp declare 609 generic { void Tcl_BackgroundException(Tcl_Interp *interp, int code) } -# TIP#234 (zlib interface) +# TIP#234 (zlib interface) dkf/Pascal Scheffers declare 610 generic { int Tcl_ZlibDeflate(Tcl_Interp *interp, int format, Tcl_Obj *data, int level, Tcl_Obj *gzipHeaderDictObj) @@ -2262,7 +2279,8 @@ declare 620 generic { declare 621 generic { int Tcl_ZlibStreamReset(Tcl_ZlibStream zshandle) } -# TIP 338 + +# TIP 338 (control over startup script) dgp declare 622 generic { void Tcl_SetStartupScript(Tcl_Obj *path, const char *encoding) } @@ -2270,12 +2288,13 @@ declare 623 generic { Tcl_Obj *Tcl_GetStartupScript(const char **encodingPtr) } - -# TIP#332, Half Close made public +# TIP#332 (half-close made public) aferrieux declare 624 generic { int Tcl_CloseEx(Tcl_Interp *interp, Tcl_Channel chan, int flags) } +# ----- BASELINE -- FOR -- 8.6.0 ----- # + ############################################################################## # Define the platform specific public Tcl interface. These functions are only @@ -2313,7 +2332,6 @@ declare 1 macosx { int hasResourceFile, int maxPathLen, char *libraryPath) } - ############################################################################## # Public functions that are not accessible via the stubs table. -- cgit v0.12 From 1ea51e1fb6fb072c84c166e0831423b0c323558b Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Dec 2008 00:04:17 +0000 Subject: Assorted minor corrections to the Zlib C API to make it work with the PNG implementation better. --- ChangeLog | 13 ++++++++ doc/TclZlib.3 | 39 ++++++++++++++--------- generic/tcl.decls | 4 +-- generic/tclDecls.h | 16 +++++----- generic/tclStubInit.c | 4 +-- generic/tclZlib.c | 85 +++++++++++++++++++++++++-------------------------- 6 files changed, 91 insertions(+), 70 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03aa530..9daefa6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-12-27 Donal K. Fellows + + * generic/tclZlib.c (Tcl_ZlibStreamGet): Corrected the semantics of + this function to be useful to the PNG implementation. If the argument + object is empty, this gives the previous semantics. + (Tcl_ZlibStreamChecksum): Corrected name to be less misleading; it + only produced Adler-32 checksums when the stream was processing the + right type of compressed data format. + (Tcl_ZlibAdler32, Tcl_ZlibCRC32): Corrected types so that they work + naturally with the results of Tcl_GetByteArrayFromObj(). + *** POTENTIAL INCOMPATIBILITY *** for all above changes, but very + unlikely to be difficult for anyone to deal with. + 2008-12-26 Donal K. Fellows * generic/tcl.decls: Tidy up the commenting style, adding markers for diff --git a/doc/TclZlib.3 b/doc/TclZlib.3 index 1b2bb44..42d82b5 100644 --- a/doc/TclZlib.3 +++ b/doc/TclZlib.3 @@ -4,14 +4,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TclZlib.3,v 1.3 2008/12/21 08:17:37 dkf Exp $ +'\" RCS: @(#) $Id: TclZlib.3,v 1.4 2008/12/27 00:04:17 dkf Exp $ '\" .so man.macros .TH TclZlib 3 8.6 Tcl "Tcl Library Procedures" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -Tcl_ZlibAdler32, Tcl_ZlibCRC32, Tcl_ZlibDeflate, Tcl_ZlibInflate, Tcl_ZlibStreamAdler32, Tcl_ZlibStreamClose, Tcl_ZlibStreamEof, Tcl_ZlibStreamGet, Tcl_ZlibStreamGetCommandName, Tcl_ZlibStreamInit, Tcl_ZlibStreamPut \- compression and decompression functions +Tcl_ZlibAdler32, Tcl_ZlibCRC32, Tcl_ZlibDeflate, Tcl_ZlibInflate, Tcl_ZlibStreamChecksum, Tcl_ZlibStreamClose, Tcl_ZlibStreamEof, Tcl_ZlibStreamGet, Tcl_ZlibStreamGetCommandName, Tcl_ZlibStreamInit, Tcl_ZlibStreamPut \- compression and decompression functions .SH SYNOPSIS .nf #include @@ -41,7 +41,7 @@ int \fBTcl_ZlibStreamClose\fR(\fIzshandle\fR) .sp int -\fBTcl_ZlibStreamAdler32\fR(\fIzshandle\fR) +\fBTcl_ZlibStreamChecksum\fR(\fIzshandle\fR) .sp int \fBTcl_ZlibStreamPut\fR(\fIzshandle, dataObj, flush\fR) @@ -53,7 +53,8 @@ int .AS Tcl_ZlibStream *zshandlePtr out .AP Tcl_Interp *interp in The interpreter to store resulting compressed or uncompressed data in. Also -where any error messages are written. +where any error messages are written. For \fBTcl_ZlibStreamInit\fR, this can +be NULL to create a stream that is not bound to a command. .AP int format in What format of compressed data to work with. Must be one of \fBTCL_ZLIB_FORMAT_ZLIB\fR for zlib-format data, \fBTCL_ZLIB_FORMAT_GZIP\fR @@ -63,7 +64,7 @@ chosen which can automatically detect whether the compressed data was in zlib or gzip format. .AP Tcl_Obj *dataObj in/out A byte-array object containing the data to be compressed or decompressed, or -which is set to the data extracted from the stream when passed to +to which the data extracted from the stream is appended when passed to \fBTcl_ZlibStreamGet\fR. .AP int level in What level of compression to use. Should be a number from 0 to 9 or one of the @@ -122,18 +123,28 @@ bytes. Typical usage is: .CS checksum = \fBTcl_ZlibCRC32\fR(\fBTcl_ZlibCRC32\fR(0,NULL,0), data, length); .CE +.SS "ZLIB STREAMS" .PP \fBTcl_ZlibStreamInit\fR creates a compressing or decompressing stream that is linked to a Tcl command, according to its arguments, and provides an abstract -token for the stream; \fBTcl_ZlibStreamGetCommandName\fR returns the name of -that command given the stream token. Once a stream has been constructed, -\fBTcl_ZlibStreamPut\fR is used to add data to the stream and -\fBTcl_ZlibStreamGet\fR is used to retrieve data from the stream after -processing. \fBTcl_ZlibStreamAdler32\fR returns the checksum computed over the -uncompressed data, and \fBTcl_ZlibStreamEof\fR returns whether the end of the -uncompressed data has been reached. Finally, \fBTcl_ZlibStreamClose\fR will -clean up the stream and delete the associated command: using -\fBTcl_DeleteCommand\fR on the stream's command is equivalent. +token for the stream and returns a normal Tcl result code; +\fBTcl_ZlibStreamGetCommandName\fR returns the name of that command given the +stream token, or NULL if the stream has no command. +.PP +Once a stream has been constructed, \fBTcl_ZlibStreamPut\fR is used to add +data to the stream and \fBTcl_ZlibStreamGet\fR is used to retrieve data from +the stream after processing. Both return normal Tcl result codes. With +\fBTcl_ZlibStreamPut\fR, the data buffer object passed to it should not be +modified afterwards. With \fBTcl_ZlibStreamGet\fR, the data buffer object +passed to it will have the data bytes appended to it. +.PP +\fBTcl_ZlibStreamChecksum\fR returns the checksum computed over the +uncompressed data according to the format, and \fBTcl_ZlibStreamEof\fR returns +whether the end of the uncompressed data has been reached. +.PP +Finally, \fBTcl_ZlibStreamClose\fR will clean up the stream and delete the +associated command: using \fBTcl_DeleteCommand\fR on the stream's command is +equivalent. .SH "PORTABILITY NOTES" These functions will fail gracefully if Tcl is not linked with the zlib library. diff --git a/generic/tcl.decls b/generic/tcl.decls index 5a4b322..dff3242 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.165 2008/12/26 09:51:11 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.166 2008/12/27 00:04:17 dkf Exp $ library tcl @@ -2265,7 +2265,7 @@ declare 616 generic { int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle) } declare 617 generic { - int Tcl_ZlibStreamAdler32(Tcl_ZlibStream zshandle) + int Tcl_ZlibStreamChecksum(Tcl_ZlibStream zshandle) } declare 618 generic { int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle, Tcl_Obj *data, int flush) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index e2e4366..74284ed 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.166 2008/12/18 06:40:02 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.167 2008/12/27 00:04:17 dkf Exp $ */ #ifndef _TCLDECLS @@ -3731,10 +3731,10 @@ EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName ( /* 616 */ EXTERN int Tcl_ZlibStreamEof (Tcl_ZlibStream zshandle); #endif -#ifndef Tcl_ZlibStreamAdler32_TCL_DECLARED -#define Tcl_ZlibStreamAdler32_TCL_DECLARED +#ifndef Tcl_ZlibStreamChecksum_TCL_DECLARED +#define Tcl_ZlibStreamChecksum_TCL_DECLARED /* 617 */ -EXTERN int Tcl_ZlibStreamAdler32 (Tcl_ZlibStream zshandle); +EXTERN int Tcl_ZlibStreamChecksum (Tcl_ZlibStream zshandle); #endif #ifndef Tcl_ZlibStreamPut_TCL_DECLARED #define Tcl_ZlibStreamPut_TCL_DECLARED @@ -4451,7 +4451,7 @@ typedef struct TclStubs { int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ - int (*tcl_ZlibStreamAdler32) (Tcl_ZlibStream zshandle); /* 617 */ + int (*tcl_ZlibStreamChecksum) (Tcl_ZlibStream zshandle); /* 617 */ int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int flush); /* 618 */ int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ @@ -6999,9 +6999,9 @@ extern const TclStubs *tclStubsPtr; #define Tcl_ZlibStreamEof \ (tclStubsPtr->tcl_ZlibStreamEof) /* 616 */ #endif -#ifndef Tcl_ZlibStreamAdler32 -#define Tcl_ZlibStreamAdler32 \ - (tclStubsPtr->tcl_ZlibStreamAdler32) /* 617 */ +#ifndef Tcl_ZlibStreamChecksum +#define Tcl_ZlibStreamChecksum \ + (tclStubsPtr->tcl_ZlibStreamChecksum) /* 617 */ #endif #ifndef Tcl_ZlibStreamPut #define Tcl_ZlibStreamPut \ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 926a45d..818abf1 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.177 2008/12/18 04:38:01 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.178 2008/12/27 00:04:17 dkf Exp $ */ #include "tclInt.h" @@ -1142,7 +1142,7 @@ static const TclStubs tclStubs = { Tcl_ZlibStreamInit, /* 614 */ Tcl_ZlibStreamGetCommandName, /* 615 */ Tcl_ZlibStreamEof, /* 616 */ - Tcl_ZlibStreamAdler32, /* 617 */ + Tcl_ZlibStreamChecksum, /* 617 */ Tcl_ZlibStreamPut, /* 618 */ Tcl_ZlibStreamGet, /* 619 */ Tcl_ZlibStreamClose, /* 620 */ diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 4fc56e1..8db482a 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.18 2008/12/22 01:39:33 patthoyts Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.19 2008/12/27 00:04:17 dkf Exp $ */ #include "tclInt.h" @@ -818,8 +818,13 @@ Tcl_ZlibStreamGetCommandName( Tcl_ZlibStream zshandle) /* as obtained from Tcl_ZlibStreamInit */ { ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; - Tcl_Obj *objPtr = Tcl_NewObj(); + Tcl_Obj *objPtr; + if (!zsh->interp) { + return NULL; + } + + TclNewObj(objPtr); Tcl_GetCommandFullName(zsh->interp, zsh->cmd, objPtr); return objPtr; } @@ -855,7 +860,7 @@ Tcl_ZlibStreamEof( /* *---------------------------------------------------------------------- * - * Tcl_ZlibStreamAdler32 -- + * Tcl_ZlibStreamChecksum -- * * Return the checksum of the uncompressed data seen so far by the * stream. @@ -864,7 +869,7 @@ Tcl_ZlibStreamEof( */ int -Tcl_ZlibStreamAdler32( +Tcl_ZlibStreamChecksum( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; @@ -877,7 +882,8 @@ Tcl_ZlibStreamAdler32( * * Tcl_ZlibStreamPut -- * - * Add data to the stream for compression or decompression. + * Add data to the stream for compression or decompression from a + * bytearray Tcl_Obj. * *---------------------------------------------------------------------- */ @@ -929,7 +935,7 @@ Tcl_ZlibStreamPut( * Now append the compressed data to the outData list. */ - Tcl_ListObjAppendElement(zsh->interp, zsh->outData, obj); + Tcl_ListObjAppendElement(NULL, zsh->outData, obj); } if (outSize < 0xFFFF) { outSize = 0xFFFF; /* There may be *lots* of data left to @@ -955,14 +961,14 @@ Tcl_ZlibStreamPut( * Now append the compressed data to the outData list. */ - Tcl_ListObjAppendElement(zsh->interp, zsh->outData, obj); + Tcl_ListObjAppendElement(NULL, zsh->outData, obj); } } else { /* * This is easy. Just append to the inData list. */ - Tcl_ListObjAppendElement(zsh->interp, zsh->inData, data); + Tcl_ListObjAppendElement(NULL, zsh->inData, data); /* * and we'll need the flush parameter for the Inflate call. @@ -979,7 +985,8 @@ Tcl_ZlibStreamPut( * * Tcl_ZlibStreamGet -- * - * Retrieve data (now compressed or decompressed) from the stream. + * Retrieve data (now compressed or decompressed) from the stream into a + * bytearray Tcl_Obj. * *---------------------------------------------------------------------- */ @@ -987,7 +994,7 @@ Tcl_ZlibStreamPut( int Tcl_ZlibStreamGet( Tcl_ZlibStream zshandle, /* As obtained from Tcl_ZlibStreamInit */ - Tcl_Obj *data, /* A place to put the data */ + Tcl_Obj *data, /* A place to append the data. */ int count) /* Number of bytes to grab as a maximum, you * may get less! */ { @@ -995,6 +1002,7 @@ Tcl_ZlibStreamGet( int e, i, listLen, itemLen, dataPos = 0; Tcl_Obj *itemObj; unsigned char *dataPtr, *itemPtr; + int existing; /* * Getting beyond the of stream, just return empty string. @@ -1004,6 +1012,8 @@ Tcl_ZlibStreamGet( return TCL_OK; } + (void) Tcl_GetByteArrayFromObj(data, &existing); + if (zsh->mode == TCL_ZLIB_STREAM_INFLATE) { if (count == -1) { /* @@ -1018,7 +1028,8 @@ Tcl_ZlibStreamGet( * Prepare the place to store the data. */ - dataPtr = Tcl_SetByteArrayLength(data, count); + dataPtr = Tcl_SetByteArrayLength(data, existing+count); + dataPtr += existing; zsh->stream.next_out = dataPtr; zsh->stream.avail_out = count; @@ -1031,20 +1042,14 @@ Tcl_ZlibStreamGet( Tcl_DecrRefCount(zsh->currentInput); zsh->currentInput = NULL; } - if (Tcl_ListObjLength(zsh->interp, zsh->inData, - &listLen) != TCL_OK) { - return TCL_ERROR; - } + Tcl_ListObjLength(NULL, zsh->inData, &listLen); if (listLen > 0) { /* * There is more input available, get it from the list and * give it to zlib. */ - if (Tcl_ListObjIndex(zsh->interp, zsh->inData, 0, - &itemObj) != TCL_OK) { - return TCL_ERROR; - } + Tcl_ListObjIndex(NULL, zsh->inData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); Tcl_IncrRefCount(itemObj); zsh->currentInput = itemObj; @@ -1061,11 +1066,9 @@ Tcl_ZlibStreamGet( } e = inflate(&zsh->stream, zsh->flush); - if (Tcl_ListObjLength(zsh->interp, zsh->inData, &listLen) != TCL_OK) { - return TCL_ERROR; - } + Tcl_ListObjLength(NULL, zsh->inData, &listLen); - while ((zsh->stream.avail_out > 0) && (e==Z_OK || e==Z_BUF_ERROR) + while ((zsh->stream.avail_out > 0) && (e == Z_OK || e == Z_BUF_ERROR) && (listLen > 0)) { /* * State: We have not satisfied the request yet and there may be @@ -1078,6 +1081,7 @@ Tcl_ZlibStreamGet( "Unexpected zlib internal state during decompression", TCL_STATIC); } + Tcl_SetByteArrayLength(data, existing); return TCL_ERROR; } @@ -1086,10 +1090,7 @@ Tcl_ZlibStreamGet( zsh->currentInput = 0; } - if (Tcl_ListObjIndex(zsh->interp, zsh->inData, 0, - &itemObj) != TCL_OK) { - return TCL_ERROR; - } + Tcl_ListObjIndex(zsh->interp, zsh->inData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); Tcl_IncrRefCount(itemObj); zsh->currentInput = itemObj; @@ -1110,9 +1111,11 @@ Tcl_ZlibStreamGet( e = inflate(&zsh->stream, zsh->flush); } if (zsh->stream.avail_out > 0) { - Tcl_SetByteArrayLength(data, count - zsh->stream.avail_out); + Tcl_SetByteArrayLength(data, + existing + count - zsh->stream.avail_out); } if (!(e==Z_OK || e==Z_STREAM_END || e==Z_BUF_ERROR)) { + Tcl_SetByteArrayLength(data, existing); ConvertError(zsh->interp, e); return TCL_ERROR; } @@ -1125,18 +1128,11 @@ Tcl_ZlibStreamGet( inflateEnd(&zsh->stream); } } else { - if (Tcl_ListObjLength(zsh->interp, zsh->outData, - &listLen) != TCL_OK) { - return TCL_ERROR; - } - + Tcl_ListObjLength(NULL, zsh->outData, &listLen); if (count == -1) { count = 0; for (i=0; iinterp, zsh->outData, i, - &itemObj) != TCL_OK) { - return TCL_ERROR; - } + Tcl_ListObjIndex(NULL, zsh->outData, i, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); if (i == 0) { count += itemLen - zsh->outPos; @@ -1150,11 +1146,12 @@ Tcl_ZlibStreamGet( * Prepare the place to store the data. */ - dataPtr = Tcl_SetByteArrayLength(data, count); + dataPtr = Tcl_SetByteArrayLength(data, existing + count); + dataPtr += existing; - while ((count > dataPos) && (Tcl_ListObjLength(zsh->interp, - zsh->outData, &listLen) == TCL_OK) && (listLen > 0)) { - Tcl_ListObjIndex(zsh->interp, zsh->outData, 0, &itemObj); + while ((count > dataPos) && (Tcl_ListObjLength(NULL, zsh->outData, + &listLen) == TCL_OK) && (listLen > 0)) { + Tcl_ListObjIndex(NULL, zsh->outData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); if (itemLen-zsh->outPos >= count-dataPos) { unsigned len = count - dataPos; @@ -1177,7 +1174,7 @@ Tcl_ZlibStreamGet( listLen--; } } - Tcl_SetByteArrayLength(data, dataPos); + Tcl_SetByteArrayLength(data, existing + dataPos); } return TCL_OK; } @@ -1537,7 +1534,7 @@ Tcl_ZlibInflate( unsigned int Tcl_ZlibCRC32( unsigned int crc, - const char *buf, + const unsigned char *buf, int len) { /* Nothing much to do, just wrap the crc32(). */ @@ -1547,7 +1544,7 @@ Tcl_ZlibCRC32( unsigned int Tcl_ZlibAdler32( unsigned int adler, - const char *buf, + const unsigned char *buf, int len) { return adler32(adler, (Bytef *) buf, (unsigned) len); -- cgit v0.12 From a7e88f6d17b8ff68c0cb6f10840445088d5264f0 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Dec 2008 10:07:05 +0000 Subject: Fix my silly blunders. [Bug 2470237] --- ChangeLog | 3 +++ generic/tcl.decls | 8 +++++--- generic/tclDecls.h | 12 ++++++------ generic/tclZlib.c | 16 +++++++--------- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9daefa6..cd14668 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-12-27 Donal K. Fellows + * generic/tclZlib.c (ZlibStreamCmd): Fix compilation consistency. [Bug + * generic/tcl.decls: 2470237] + * generic/tclZlib.c (Tcl_ZlibStreamGet): Corrected the semantics of this function to be useful to the PNG implementation. If the argument object is empty, this gives the previous semantics. diff --git a/generic/tcl.decls b/generic/tcl.decls index dff3242..a9a5bcf 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.166 2008/12/27 00:04:17 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.167 2008/12/27 10:07:06 dkf Exp $ library tcl @@ -2249,10 +2249,12 @@ declare 611 generic { int buffersize, Tcl_Obj *gzipHeaderDictObj) } declare 612 generic { - unsigned int Tcl_ZlibCRC32(unsigned int crc, const char *buf, int len) + unsigned int Tcl_ZlibCRC32(unsigned int crc, const unsigned char *buf, + int len) } declare 613 generic { - unsigned int Tcl_ZlibAdler32(unsigned int adler, const char *buf, int len) + unsigned int Tcl_ZlibAdler32(unsigned int adler, const unsigned char *buf, + int len) } declare 614 generic { int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode, int format, diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 74284ed..a680700 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.167 2008/12/27 00:04:17 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.168 2008/12/27 10:07:06 dkf Exp $ */ #ifndef _TCLDECLS @@ -3704,14 +3704,14 @@ EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format, #ifndef Tcl_ZlibCRC32_TCL_DECLARED #define Tcl_ZlibCRC32_TCL_DECLARED /* 612 */ -EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, const char * buf, - int len); +EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, + const unsigned char * buf, int len); #endif #ifndef Tcl_ZlibAdler32_TCL_DECLARED #define Tcl_ZlibAdler32_TCL_DECLARED /* 613 */ EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler, - const char * buf, int len); + const unsigned char * buf, int len); #endif #ifndef Tcl_ZlibStreamInit_TCL_DECLARED #define Tcl_ZlibStreamInit_TCL_DECLARED @@ -4446,8 +4446,8 @@ typedef struct TclStubs { void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */ int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */ - unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const char * buf, int len); /* 612 */ - unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const char * buf, int len); /* 613 */ + unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const unsigned char * buf, int len); /* 612 */ + unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const unsigned char * buf, int len); /* 613 */ int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 8db482a..f932525 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.19 2008/12/27 00:04:17 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.20 2008/12/27 10:07:06 dkf Exp $ */ #include "tclInt.h" @@ -1612,11 +1612,10 @@ TclZlibCmd( return TCL_ERROR; } if (objc < 4) { - start = Tcl_ZlibAdler32(0, 0, 0); + start = Tcl_ZlibAdler32(0, NULL, 0); } data = Tcl_GetByteArrayFromObj(objv[2], &dlen); - Tcl_SetIntObj(obj, (int) - Tcl_ZlibAdler32(start, (const char *) data, dlen)); + Tcl_SetIntObj(obj, (int) Tcl_ZlibAdler32(start, data, dlen)); return TCL_OK; case z_crc32: /* crc32 str ?startvalue? * -> checksum */ @@ -1629,11 +1628,10 @@ TclZlibCmd( return TCL_ERROR; } if (objc < 4) { - start = Tcl_ZlibCRC32(0, 0, 0); + start = Tcl_ZlibCRC32(0, NULL, 0); } - data = Tcl_GetByteArrayFromObj(objv[2],&dlen); - Tcl_SetIntObj(obj, (int) - Tcl_ZlibCRC32(start, (const char *) data, dlen)); + data = Tcl_GetByteArrayFromObj(objv[2], &dlen); + Tcl_SetIntObj(obj, (int) Tcl_ZlibCRC32(start, data, dlen)); return TCL_OK; case z_deflate: /* deflate data ?level? * -> rawCompressedData */ @@ -2187,7 +2185,7 @@ ZlibStreamCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } - Tcl_SetIntObj(obj, Tcl_ZlibStreamAdler32(zstream)); + Tcl_SetIntObj(obj, Tcl_ZlibStreamChecksum(zstream)); return TCL_OK; case zs_reset: /* $strm reset */ if (objc != 2) { -- cgit v0.12 From a7b4a7560837d1f6f303dc6ee53db1a2c849aebb Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 28 Dec 2008 17:37:48 +0000 Subject: Plug memory leak. --- ChangeLog | 4 ++++ generic/tclZlib.c | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd14668..f9ceae7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-12-28 Donal K. Fellows + + * generic/tclZlib.c (Tcl_ZlibStreamPut): Plug a memory leak. + 2008-12-27 Donal K. Fellows * generic/tclZlib.c (ZlibStreamCmd): Fix compilation consistency. [Bug diff --git a/generic/tclZlib.c b/generic/tclZlib.c index f932525..5fefab7 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.20 2008/12/27 10:07:06 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.21 2008/12/28 17:37:48 dkf Exp $ */ #include "tclInt.h" @@ -963,6 +963,10 @@ Tcl_ZlibStreamPut( Tcl_ListObjAppendElement(NULL, zsh->outData, obj); } + + if (dataTmp) { + ckfree(dataTmp); + } } else { /* * This is easy. Just append to the inData list. @@ -1090,6 +1094,10 @@ Tcl_ZlibStreamGet( zsh->currentInput = 0; } + /* + * Get the next block of data to go to inflate. + */ + Tcl_ListObjIndex(zsh->interp, zsh->inData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); Tcl_IncrRefCount(itemObj); @@ -1098,14 +1106,14 @@ Tcl_ZlibStreamGet( zsh->stream.avail_in = itemLen; /* - * And remove it from the list. + * Remove it from the list. */ Tcl_ListObjReplace(NULL, zsh->inData, 0, 1, 0, NULL); listLen--; /* - * And call inflate again + * And call inflate again. */ e = inflate(&zsh->stream, zsh->flush); -- cgit v0.12 From 337a6648fee48d63d97c16579b72703b39647564 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 31 Dec 2008 18:22:04 +0000 Subject: * unix/Makefile.in: Set TCLLIBPATH in SHELL_ENV so that targets like `make shell` have access to builds of bundled packages. --- ChangeLog | 5 +++++ unix/Makefile.in | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f9ceae7..fe39617 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-31 Don Porter + + * unix/Makefile.in: Set TCLLIBPATH in SHELL_ENV so that targets + like `make shell` have access to builds of bundled packages. + 2008-12-28 Donal K. Fellows * generic/tclZlib.c (Tcl_ZlibStreamPut): Plug a memory leak. diff --git a/unix/Makefile.in b/unix/Makefile.in index 799ee0e..070b472 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.258 2008/12/22 15:45:43 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.259 2008/12/31 18:22:04 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -617,6 +617,7 @@ tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} # This keeps tcltest from picking up an already installed version of the Tcl # library. SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \ + TCLLIBPATH="@abs_builddir@/pkgs" \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}" tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST} -- cgit v0.12 From 4123c4bbf735f1e0910f1ae529ee6a5fa4a841a4 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 2 Jan 2009 16:43:50 +0000 Subject: Fix various mkstemp()-related issues. [Bugs 741967,878333] --- ChangeLog | 9 +++++++ compat/mkstemp.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ unix/Makefile.in | 5 +++- unix/configure.in | 4 +-- unix/tcl.m4 | 3 +++ 5 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 compat/mkstemp.c diff --git a/ChangeLog b/ChangeLog index fe39617..36c691d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-01-02 Donal K. Fellows + + * unix/tcl.m4 (SC_CONFIG_CFLAGS): Force the use of the compatibility + version of mkstemp() on IRIX. [Bug 878333] + * unix/configure.in, unix/Makefile.in (mkstemp.o): + * compat/mkstemp.c (new file): Added a compatibility implementation of + the mkstemp() function, which is apparently needed on some platforms. + [Bug 741967] + 2008-12-31 Don Porter * unix/Makefile.in: Set TCLLIBPATH in SHELL_ENV so that targets diff --git a/compat/mkstemp.c b/compat/mkstemp.c new file mode 100644 index 0000000..8adc11b --- /dev/null +++ b/compat/mkstemp.c @@ -0,0 +1,78 @@ +/* + * mkstemp.c -- + * + * Source code for the "mkstemp" library routine. + * + * Copyright (c) 2009 Donal K. Fellows + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: mkstemp.c,v 1.1 2009/01/02 16:43:50 dkf Exp $ + */ + +#include +#include + +/* + *---------------------------------------------------------------------- + * + * mkstemp -- + * + * Create an open temporary file from a template. + * + * Results: + * A file descriptor, or -1 (with errno set) in the case of an error. + * + * Side effects: + * The template is updated to contain the real filename. + * + *---------------------------------------------------------------------- + */ + +int +mkstemp( + char *template) /* Template for filename. */ +{ + static const char alphanumerics[] = + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + register char *a, *b; + int fd, count, alphanumericsLen = strlen(alphanumerics); /* == 62 */ + + a = template + strlen(template); + while (a > template && *(a-1) == 'X') { + a--; + } + + if (a == template) { + errno = ENOENT; + return -1; + } + + /* + * We'll only try up to 10 times; after that, we're suffering from enemy + * action and should let the caller know. + */ + + count = 10; + do { + /* + * Replace the X's in the original template with random alphanumeric + * digits. + */ + + for (b=a ; *b ; b++) { + float r = random() / ((float) RAND_MAX); + + *b = alphanumerics[(int)(r * alphanumericsLen)]; + } + + /* + * Template is now realized; try to open (with correct options). + */ + + fd = open(template, O_RDWR|O_CREAT|O_EXCL, 0600); + } while (fd == -1 && errno == EEXIST && --count > 0); + + return fd; +} diff --git a/unix/Makefile.in b/unix/Makefile.in index 070b472..8ce29ec 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.259 2008/12/31 18:22:04 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.260 2009/01/02 16:43:50 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1546,6 +1546,9 @@ fixstrtod.o: $(COMPAT_DIR)/fixstrtod.c opendir.o: $(COMPAT_DIR)/opendir.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/opendir.c +mkstemp.o: $(COMPAT_DIR)/mkstemp.c + $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/mkstemp.c + memcmp.o: $(COMPAT_DIR)/memcmp.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/memcmp.c diff --git a/unix/configure.in b/unix/configure.in index 607ac02..a08dddc 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.202 2008/12/21 20:55:07 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.203 2009/01/02 16:43:50 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -190,7 +190,7 @@ AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD, 1, [Is getcwd Posix-compliant?])]) # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really # define USEGETWD even if the posix getcwd exists. Add a test ? -AC_REPLACE_FUNCS(opendir strtol waitpid) +AC_REPLACE_FUNCS(mkstemp opendir strtol waitpid) AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])]) AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])]) AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])]) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index f7c2e59..730faaa 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1327,6 +1327,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" + AC_LIBOBJ(mkstemp) AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) @@ -1338,6 +1339,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" + AC_LIBOBJ(mkstemp) AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) @@ -1364,6 +1366,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" + AC_LIBOBJ(mkstemp) AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) -- cgit v0.12 From 7ef4c9067d6da796ce288343198eb0fa100f1e60 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 2 Jan 2009 16:45:13 +0000 Subject: regen --- unix/configure | 12632 +++++++++++++++++++++++++++---------------------------- 1 file changed, 6308 insertions(+), 6324 deletions(-) diff --git a/unix/configure b/unix/configure index 34d2782..862e76a 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,182 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +ZLIB_DIR +ZLIB_OBJS +ZLIB_SRCS +ZLIB_INCLUDE +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +PKG_CFG_ARGS +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +PACKAGE_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +781,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +844,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +909,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +939,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1013,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1075,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1119,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1139,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1178,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1276,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1293,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1359,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1466,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1480,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1502,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1512,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1534,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1545,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1559,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1597,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1630,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1678,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1704,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1717,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1746,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1763,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1787,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1376,24 +1842,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1402,36 +1867,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1454,8 +1920,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1468,32 +1934,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1506,36 +1974,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1548,74 +2031,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1629,7 +2072,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1640,6 +2083,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1657,22 +2101,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1685,36 +2130,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1727,29 +2174,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1762,21 +2225,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1801,47 +2278,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1853,19 +2360,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1884,22 +2393,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1910,9 +2424,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1926,14 +2439,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1953,14 +2466,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1978,12 +2497,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2006,50 +2525,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2065,38 +2583,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2112,12 +2710,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2151,12 +2749,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2171,266 +2774,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2463,8 +2916,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2498,24 +2951,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2524,9 +2975,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2536,24 +2988,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2564,6 +3014,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2581,8 +3032,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2605,24 +3056,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2631,9 +3080,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2643,24 +3093,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2671,6 +3119,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2693,23 +3142,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2733,35 +3329,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2817,6 +3409,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2836,18 +3429,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2860,12 +3462,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2888,9 +3492,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2904,38 +3508,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2947,8 +3548,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2988,39 +3589,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3031,17 +3629,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3052,41 +3650,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3095,24 +3689,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3120,9 +3712,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3146,25 +3739,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3179,17 +3765,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3200,41 +3786,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3243,24 +3825,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3268,9 +3848,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3294,25 +3875,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3327,17 +3901,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3348,41 +3922,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3391,24 +3961,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3416,9 +3984,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3442,25 +4011,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3479,17 +4041,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3500,41 +4062,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3543,24 +4101,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3568,9 +4124,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3594,25 +4151,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3681,17 +4231,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3702,41 +4252,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3745,24 +4291,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3770,9 +4314,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3796,25 +4341,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3871,17 +4409,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3892,41 +4430,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3935,24 +4469,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3960,9 +4492,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3986,25 +4519,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4019,17 +4545,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4040,41 +4566,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4083,24 +4605,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4108,9 +4628,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4134,25 +4655,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4172,18 +4686,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4194,41 +4709,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4237,24 +4748,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4262,9 +4771,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4288,25 +4798,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4326,8 +4830,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4349,39 +4853,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4392,13 +4892,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4430,8 +4930,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4444,56 +4944,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4506,8 +5003,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4520,56 +5017,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4582,8 +5076,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4596,56 +5090,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4656,8 +5147,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4670,56 +5161,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4727,8 +5215,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4741,56 +5229,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4815,9 +5300,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4843,68 +5328,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4917,8 +5394,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4926,15 +5403,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -4946,11 +5423,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4979,8 +5456,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5007,76 +5484,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5093,46 +5561,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5143,8 +5608,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5161,62 +5626,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5227,41 +5689,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5270,24 +5728,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5295,9 +5751,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5321,25 +5778,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5372,8 +5822,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5400,68 +5850,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5469,8 +5910,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5497,73 +5938,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5576,56 +6008,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5638,8 +6067,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5666,68 +6095,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5735,8 +6155,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5763,73 +6183,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5842,56 +6253,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5904,15 +6312,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5922,12 +6330,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5943,17 +6351,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5964,41 +6372,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6007,24 +6411,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6032,9 +6434,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6058,31 +6461,24 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then - echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6094,50 +6490,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +typedef gz_header ac__type_new_; int main () { -if ((gz_header *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (gz_header)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_gz_header=no + ac_cv_type_gz_header=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } if test $ac_cv_type_gz_header = yes; then : else @@ -6152,13 +6545,12 @@ fi if test $zlib_ok = yes; then - echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6166,115 +6558,73 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -deflateSetHeader (); +return deflateSetHeader (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_deflateSetHeader=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_deflateSetHeader" = no; then - for ac_lib in z; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflateSetHeader (); -int -main () -{ -deflateSetHeader (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + : +else + ac_cv_search_deflateSetHeader=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 -if test "$ac_cv_search_deflateSetHeader" != no; then - test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else @@ -6312,8 +6662,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6326,32 +6676,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6364,27 +6716,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6393,31 +6759,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6427,8 +6793,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6452,40 +6818,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6499,24 +6862,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6543,16 +6906,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6565,56 +6928,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6657,8 +7017,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6671,25 +7031,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6715,8 +7077,8 @@ fi CC=${CC}_r ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6794,12 +7156,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6819,8 +7179,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6833,56 +7193,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6914,8 +7271,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6928,56 +7285,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7038,8 +7392,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7052,56 +7406,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7172,8 +7523,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7186,56 +7537,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7263,6 +7611,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" + case " $LIBOBJS " in + *" mkstemp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; +esac + if test $doRpath = yes; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' @@ -7277,6 +7631,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" + case " $LIBOBJS " in + *" mkstemp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; +esac + if test $doRpath = yes; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' @@ -7311,6 +7671,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" + case " $LIBOBJS " in + *" mkstemp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; +esac + if test $doRpath = yes; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' @@ -7367,8 +7733,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7391,40 +7757,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7513,8 +7876,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7540,8 +7903,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7572,8 +7935,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7599,8 +7962,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7664,8 +8027,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7688,40 +8051,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7730,8 +8090,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7754,40 +8114,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7813,8 +8170,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7837,40 +8194,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -7889,8 +8243,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7913,40 +8267,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -7973,21 +8324,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8021,35 +8372,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8060,8 +8408,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8077,8 +8425,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8102,42 +8450,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8473,25 +8818,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8502,41 +8847,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8545,24 +8886,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8570,9 +8909,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8596,25 +8936,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8623,8 +8956,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8699,8 +9032,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8723,40 +9056,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8791,13 +9121,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -8942,22 +9272,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -8967,8 +9297,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -9003,11 +9333,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -9028,8 +9358,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9051,33 +9381,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9094,37 +9419,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9156,33 +9478,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9199,37 +9516,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9261,33 +9575,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9304,37 +9613,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9347,17 +9653,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9380,35 +9686,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9430,34 +9732,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9466,20 +9765,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9501,38 +9800,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9541,8 +9836,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9564,38 +9859,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9609,9 +9900,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9637,68 +9928,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9707,8 +9990,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9730,35 +10013,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9769,11 +10048,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9783,8 +10062,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9801,7 +10080,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9810,27 +10090,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9853,40 +10128,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -9896,11 +10167,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -9911,27 +10182,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -9947,8 +10213,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9956,27 +10224,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9989,13 +10271,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -10024,9 +10309,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10052,68 +10337,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10134,12 +10411,13 @@ done -for ac_func in opendir strtol waitpid + +for ac_func in mkstemp opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10165,88 +10443,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10273,68 +10541,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10345,8 +10604,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10373,68 +10632,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10445,8 +10695,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10473,68 +10723,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10545,8 +10786,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10573,68 +10814,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10652,8 +10884,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10680,68 +10912,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10753,8 +10976,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10781,72 +11004,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10874,38 +11088,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -10923,8 +11133,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10951,72 +11161,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11047,38 +11248,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11087,8 +11284,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11119,38 +11316,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11170,8 +11363,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11198,72 +11391,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11294,38 +11478,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11334,8 +11514,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11366,38 +11546,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11417,8 +11593,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11445,72 +11621,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11541,38 +11708,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11581,8 +11744,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11613,38 +11776,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11664,8 +11823,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11692,72 +11851,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11788,38 +11938,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11828,8 +11974,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11860,38 +12006,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -11944,8 +12086,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11972,72 +12114,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12068,38 +12201,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12108,8 +12237,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12140,38 +12269,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12180,8 +12305,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12210,38 +12335,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12262,8 +12383,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12290,72 +12411,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12389,38 +12501,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12429,8 +12537,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12464,38 +12572,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12529,18 +12633,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12551,41 +12656,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12594,24 +12695,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12619,9 +12718,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12645,25 +12745,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12675,8 +12769,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12704,13 +12798,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12723,8 +12826,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12748,13 +12853,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12767,8 +12881,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12794,13 +12910,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12813,8 +12938,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12842,13 +12969,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12861,8 +12997,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12889,13 +13027,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12908,8 +13055,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -12937,13 +13086,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12956,12 +13114,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -12991,8 +13151,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13013,42 +13173,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13071,8 +13227,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13094,8 +13250,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13111,44 +13267,42 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13162,18 +13316,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13184,41 +13339,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13227,24 +13378,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13252,9 +13401,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13278,25 +13428,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13308,8 +13452,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13333,38 +13477,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13373,8 +13513,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13399,33 +13539,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13446,40 +13581,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13496,9 +13628,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 -if test "${ac_cv_var_tzname+set}" = set; then + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13508,60 +13640,126 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif int main () { -atoi(*tzname); +#ifndef tzname + (void) tzname; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_var_tzname=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_have_decl_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 - if test $ac_cv_var_tzname = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 _ACEOF - fi -fi + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } +if test "${ac_cv_var_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_var_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + + fi +fi @@ -13570,9 +13768,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13598,68 +13796,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13669,8 +13859,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13691,38 +13881,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13731,8 +13917,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13753,38 +13939,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13797,8 +13979,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13821,38 +14003,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13863,8 +14041,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13887,38 +14065,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13934,9 +14108,8 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13958,33 +14131,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14002,40 +14170,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14050,8 +14215,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14078,68 +14243,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -14156,8 +14312,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14176,9 +14332,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14194,9 +14350,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14204,13 +14360,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14223,17 +14388,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14244,8 +14409,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14272,68 +14437,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14357,8 +14513,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14385,68 +14541,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14454,8 +14601,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14474,13 +14621,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14493,11 +14649,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14505,12 +14663,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14524,8 +14680,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14552,68 +14708,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14621,8 +14768,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14642,13 +14789,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14661,11 +14817,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14673,12 +14831,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14691,8 +14847,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14719,68 +14875,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14788,8 +14935,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14809,13 +14956,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14828,11 +14984,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14840,12 +14998,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14860,8 +15016,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14888,68 +15044,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14957,8 +15104,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14994,13 +15141,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15013,18 +15169,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15042,8 +15198,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15054,50 +15210,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -15108,8 +15261,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15120,50 +15273,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -15174,8 +15324,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15186,62 +15336,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15263,8 +15410,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15279,8 +15426,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15306,38 +15453,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15346,8 +15489,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15358,50 +15501,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15411,8 +15551,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15437,40 +15577,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15481,8 +15617,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15493,50 +15629,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15546,8 +15679,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15573,40 +15706,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15625,8 +15754,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15653,68 +15782,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15734,8 +15854,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15761,39 +15881,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15808,8 +15925,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15836,68 +15953,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15905,8 +16013,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15919,56 +16027,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15977,8 +16082,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15991,56 +16096,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16049,12 +16151,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -16071,8 +16171,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16099,68 +16199,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16169,8 +16260,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16197,68 +16288,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16272,8 +16354,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16296,8 +16378,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16313,8 +16395,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16336,38 +16418,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16375,8 +16453,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16400,38 +16478,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16444,8 +16518,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16480,13 +16554,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16499,11 +16582,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16517,28 +16602,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16549,41 +16634,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16592,24 +16673,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16617,9 +16696,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16643,25 +16723,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16672,8 +16745,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16695,39 +16768,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16736,8 +16805,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16750,9 +16819,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16778,68 +16847,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16853,8 +16914,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16877,39 +16938,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16927,9 +16985,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16955,68 +17013,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17029,18 +17079,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17051,41 +17102,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17094,24 +17141,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17119,9 +17164,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17145,25 +17191,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17179,9 +17219,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17207,68 +17247,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17282,18 +17314,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17304,41 +17337,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17347,24 +17376,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17372,9 +17399,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17398,25 +17426,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17432,9 +17454,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17460,68 +17482,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17534,9 +17548,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17562,68 +17576,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17657,18 +17663,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17679,41 +17686,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17722,24 +17725,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17747,9 +17748,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17773,25 +17775,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17804,8 +17800,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17836,40 +17832,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17890,8 +17883,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17920,39 +17913,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17972,18 +17962,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17994,41 +17985,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18037,24 +18024,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18062,9 +18047,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18088,25 +18074,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18122,18 +18102,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18144,41 +18125,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18187,24 +18164,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18212,9 +18187,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18238,25 +18214,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18269,8 +18239,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18297,12 +18267,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18315,8 +18285,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18324,27 +18294,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18352,8 +18322,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18361,24 +18331,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18402,8 +18372,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18416,8 +18386,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18425,26 +18395,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18455,41 +18425,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18498,24 +18464,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18523,9 +18487,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18549,25 +18514,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18581,8 +18539,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18598,31 +18556,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18646,8 +18605,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18676,15 +18635,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18698,16 +18657,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18719,7 +18678,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18732,7 +18691,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -18910,7 +18869,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18930,39 +18889,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18971,52 +18949,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -19045,17 +19007,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19065,8 +19055,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -19080,18 +19105,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19099,159 +19125,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19260,7 +19247,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19269,31 +19277,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19301,30 +19292,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19332,7 +19312,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19346,18 +19326,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19368,60 +19350,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19437,40 +19401,52 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19481,375 +19457,483 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@ZLIB_DIR@,$ZLIB_DIR,;t t -s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t -s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t -s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +ZLIB_DIR!$ZLIB_DIR$ac_delim +ZLIB_OBJS!$ZLIB_OBJS$ac_delim +ZLIB_SRCS!$ZLIB_SRCS$ac_delim +ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +PACKAGE_DIR!$PACKAGE_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19857,152 +19941,52 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 094f9a80a6b856e6e646826421ade2c562b5aa26 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 3 Jan 2009 04:26:49 +0000 Subject: * library/clock.tcl (tcl::clock::add): Fixed error message formatting in the case where [clock add] is presented with a bad switch. * tests/clock.test (clock-65.1) Added a test case for the above problem [Bug 2481670]. --- ChangeLog | 7 +++++++ library/clock.tcl | 6 +++--- tests/clock.test | 10 +++++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36c691d..f4899f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-02 Kevin B. Kenny : + + * library/clock.tcl (tcl::clock::add): Fixed error message formatting + in the case where [clock add] is presented with a bad switch. + * tests/clock.test (clock-65.1) Added a test case for the above + problem [Bug 2481670]. + 2009-01-02 Donal K. Fellows * unix/tcl.m4 (SC_CONFIG_CFLAGS): Force the use of the compatibility diff --git a/library/clock.tcl b/library/clock.tcl index d972955..22b7f67 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.51 2008/12/12 17:42:52 nijtmans Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.52 2009/01/03 04:26:49 kennykb Exp $ # #---------------------------------------------------------------------- @@ -4378,8 +4378,8 @@ proc ::tcl::clock::add { clockval args } { } default { return -code error \ - -errorcode [list CLOCK badSwitch $flag] \ - "bad switch \"$flag\",\ + -errorcode [list CLOCK badSwitch $a] \ + "bad switch \"$a\",\ must be -gmt, -locale or -timezone" } } diff --git a/tests/clock.test b/tests/clock.test index b1fcfb6..500cacb 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.88 2008/12/11 14:01:59 nijtmans Exp $ +# RCS: @(#) $Id: clock.test,v 1.89 2009/01/03 04:26:49 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36679,6 +36679,14 @@ test clock-64.2 {:: in format string [Bug 2362156]} {*}{ -result 2001-02-03::04:05:06 } +test clock-65.1 {clock add, bad option [Bug 2481670]} {*}{ + -body { + clock add 0 1 year -foo bar + } + -returnCodes error + -result {bad switch "-foo":*} +} + # cleanup namespace delete ::testClock -- cgit v0.12 From cf0b7b4b4ffafdba7dcd3dbf1f4870902f967721 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 3 Jan 2009 04:38:12 +0000 Subject: make test case work, correct date of commit in ChangeLog --- ChangeLog | 2 +- tests/clock.test | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4899f3..e6c3296 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2009-01-02 Kevin B. Kenny : +2009-01-03 Kevin B. Kenny : * library/clock.tcl (tcl::clock::add): Fixed error message formatting in the case where [clock add] is presented with a bad switch. diff --git a/tests/clock.test b/tests/clock.test index 500cacb..7eb1b25 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.89 2009/01/03 04:26:49 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.90 2009/01/03 04:38:12 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36683,8 +36683,9 @@ test clock-65.1 {clock add, bad option [Bug 2481670]} {*}{ -body { clock add 0 1 year -foo bar } + -match glob -returnCodes error - -result {bad switch "-foo":*} + -result {bad switch "-foo"*} } # cleanup -- cgit v0.12 From 30a5a31dbe213ffa9652e1ced1ca0cecadd1c73a Mon Sep 17 00:00:00 2001 From: das Date: Sat, 3 Jan 2009 13:55:09 +0000 Subject: use correct autconf magic to pass configure args & environment to pkg sub-configures (in particular compatible with autoconf 2.61, which some insist on using even though it was decided we could not switch to it yet...) --- unix/configure.in | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/unix/configure.in b/unix/configure.in index a08dddc..f97ded3 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.203 2009/01/02 16:43:50 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.204 2009/01/03 13:55:09 das Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -34,12 +34,7 @@ VERSION=${TCL_VERSION} # Setup configure arguments for bundled packages #------------------------------------------------------------------------ -PKG_CFG_ARGS="$@ ${PKG_CFG_ARGS}" - -# Ensure environment of sub-configure is the same as ours -for v in CC CPP CFLAGS CPPFLAGS LDFLAGS; do - eval 'test -n "$'$v'" && PKG_CFG_ARGS="$v=\"$'$v'\" $PKG_CFG_ARGS"' -done +PKG_CFG_ARGS="$ac_configure_args ${PKG_CFG_ARGS}" if test -r "$cache_file" -a -f "$cache_file"; then case $cache_file in -- cgit v0.12 From 720182ca0cd14fc7a189e8630fa49fd1003a7f6e Mon Sep 17 00:00:00 2001 From: das Date: Sat, 3 Jan 2009 13:55:31 +0000 Subject: autoconf-2.59 --- unix/configure | 12649 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 6345 insertions(+), 6304 deletions(-) diff --git a/unix/configure b/unix/configure index 862e76a..22435cc 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,182 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -ZLIB_DIR -ZLIB_OBJS -ZLIB_SRCS -ZLIB_INCLUDE -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -PKG_CFG_ARGS -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -PACKAGE_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -781,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -844,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -909,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -939,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1013,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1075,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1119,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1139,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1178,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1276,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1293,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1359,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1466,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1480,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1502,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1512,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1534,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1545,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1559,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1597,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1630,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1678,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1704,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1717,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1746,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1763,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1787,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1808,12 +1342,12 @@ VERSION=${TCL_VERSION} # Setup configure arguments for bundled packages #------------------------------------------------------------------------ -PKG_CFG_ARGS="$@ ${PKG_CFG_ARGS}" +PKG_CFG_ARGS="$ac_configure_args ${PKG_CFG_ARGS}" # Ensure environment of sub-configure is the same as ours -for v in CC CPP CFLAGS CPPFLAGS LDFLAGS; do - eval 'test -n "$'$v'" && PKG_CFG_ARGS="$v=\"$'$v'\" $PKG_CFG_ARGS"' -done +#for v in CC CPP CFLAGS CPPFLAGS LDFLAGS; do +# eval 'test -n "$'$v'" && PKG_CFG_ARGS="$v=\"$'$v'\" $PKG_CFG_ARGS"' +#done if test -r "$cache_file" -a -f "$cache_file"; then case $cache_file in @@ -1842,23 +1376,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1867,37 +1402,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1920,8 +1454,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1934,34 +1468,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1974,51 +1506,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2031,34 +1548,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2072,7 +1629,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2083,7 +1640,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2101,23 +1657,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2130,38 +1685,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2174,45 +1727,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2225,35 +1762,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2278,77 +1801,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2360,21 +1853,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2393,27 +1884,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2424,8 +1910,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2439,14 +1926,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2466,20 +1953,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2497,12 +1978,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2525,49 +2006,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2583,118 +2065,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2710,12 +2112,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2749,17 +2151,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2774,116 +2171,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2916,8 +2463,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2951,22 +2498,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2975,10 +2524,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2988,22 +2536,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3014,7 +2564,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3032,8 +2581,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3056,22 +2605,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3080,10 +2631,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3093,22 +2643,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3119,7 +2671,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3142,170 +2693,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3329,31 +2733,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3409,7 +2817,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3429,27 +2836,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3462,14 +2860,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3492,9 +2888,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3508,35 +2904,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3548,8 +2947,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3589,36 +2988,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3629,17 +3031,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3650,37 +3052,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3689,22 +3095,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3712,10 +3120,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3739,18 +3146,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3765,17 +3179,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3786,37 +3200,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3825,22 +3243,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3848,10 +3268,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3875,18 +3294,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3901,17 +3327,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3922,37 +3348,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3961,22 +3391,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3984,10 +3416,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4011,18 +3442,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4041,17 +3479,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4062,37 +3500,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4101,22 +3543,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4124,10 +3568,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4151,18 +3594,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4231,17 +3681,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4252,37 +3702,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4291,22 +3745,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4314,10 +3770,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4341,18 +3796,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4409,17 +3871,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4430,37 +3892,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4469,22 +3935,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4492,10 +3960,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4519,18 +3986,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4545,17 +4019,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4566,37 +4040,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4605,22 +4083,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4628,10 +4108,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4655,18 +4134,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4686,19 +4172,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4709,37 +4194,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4748,22 +4237,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4771,10 +4262,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4798,19 +4288,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4830,8 +4326,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4853,35 +4349,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4892,13 +4392,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4930,8 +4430,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4944,53 +4444,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5003,8 +4506,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5017,53 +4520,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5076,8 +4582,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5090,53 +4596,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5147,8 +4656,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5161,53 +4670,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5215,8 +4727,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5229,53 +4741,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5300,9 +4815,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5328,60 +4843,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5394,8 +4917,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5403,15 +4926,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5423,11 +4946,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5456,8 +4979,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5484,67 +5007,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5561,43 +5093,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5608,8 +5143,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5626,59 +5161,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5689,37 +5227,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5728,22 +5270,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5751,10 +5295,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5778,18 +5321,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -5822,8 +5372,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5850,59 +5400,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5910,8 +5469,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5938,64 +5497,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6008,53 +5576,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6067,8 +5638,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6095,59 +5666,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6155,8 +5735,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6183,64 +5763,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6253,53 +5842,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6312,15 +5904,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6330,12 +5922,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6351,17 +5943,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6372,37 +5964,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6411,22 +6007,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6434,10 +6032,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6461,24 +6058,31 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6490,47 +6094,50 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -typedef gz_header ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((gz_header *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (gz_header)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_gz_header=no +ac_cv_type_gz_header=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6 if test $ac_cv_type_gz_header = yes; then : else @@ -6545,12 +6152,13 @@ fi if test $zlib_ok = yes; then - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS +ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6558,73 +6166,115 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -return deflateSetHeader (); +deflateSetHeader (); ; return 0; } _ACEOF -for ac_lib in '' z; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_deflateSetHeader=$ac_res + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_deflateSetHeader" = no; then + for ac_lib in z; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then - break -fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="-l$ac_lib" +break else - ac_cv_search_deflateSetHeader=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 +if test "$ac_cv_search_deflateSetHeader" != no; then + test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" else @@ -6662,8 +6312,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6676,34 +6326,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6716,41 +6364,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6759,31 +6393,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6793,8 +6427,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6818,37 +6452,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6862,24 +6499,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6906,16 +6543,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6928,53 +6565,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -7017,8 +6657,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7031,27 +6671,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7077,8 +6715,8 @@ fi CC=${CC}_r ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7156,10 +6794,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7179,8 +6819,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7193,53 +6833,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7271,8 +6914,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7285,53 +6928,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7392,8 +7038,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7406,53 +7052,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7523,8 +7172,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7537,53 +7186,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7611,10 +7263,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7631,10 +7285,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7671,10 +7327,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7733,8 +7391,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7757,37 +7415,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7876,8 +7537,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7903,8 +7564,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7935,8 +7596,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7962,8 +7623,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -8027,8 +7688,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8051,37 +7712,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8090,8 +7754,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8114,37 +7778,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8170,8 +7837,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8194,37 +7861,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8243,8 +7913,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8267,37 +7937,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8324,21 +7997,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8372,32 +8045,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8408,8 +8084,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8425,8 +8101,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8450,39 +8126,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8818,25 +8497,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8847,37 +8526,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8886,22 +8569,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8909,10 +8594,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8936,18 +8620,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -8956,8 +8647,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -9032,8 +8723,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9056,37 +8747,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9121,13 +8815,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9272,22 +8966,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9297,8 +8991,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9333,11 +9027,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9358,8 +9052,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9381,28 +9075,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9419,34 +9118,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9478,28 +9180,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9516,34 +9223,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9575,28 +9285,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9613,34 +9328,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9653,17 +9371,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9686,31 +9404,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9732,31 +9454,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9765,20 +9490,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9800,34 +9525,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9836,8 +9565,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9859,34 +9588,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9900,9 +9633,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9928,60 +9661,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9990,8 +9731,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10013,31 +9754,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10048,11 +9793,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -10062,8 +9807,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10080,8 +9825,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -10090,22 +9834,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10128,36 +9877,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10167,11 +9920,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10182,22 +9935,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10213,10 +9971,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10224,41 +9980,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10271,16 +10013,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10309,9 +10048,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10337,60 +10076,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10415,9 +10162,9 @@ done for ac_func in mkstemp opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10443,78 +10190,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10541,59 +10298,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10604,8 +10370,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10632,59 +10398,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10695,8 +10470,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10723,59 +10498,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10786,8 +10570,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10814,59 +10598,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -10884,8 +10677,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10912,59 +10705,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -10976,8 +10778,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11004,63 +10806,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11088,34 +10899,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11133,8 +10948,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11161,63 +10976,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11248,34 +11072,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11284,8 +11112,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11316,34 +11144,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11363,8 +11195,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11391,63 +11223,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getpwnam_r=yes -else - echo "$as_me: failed program was:" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getpwnam_r=yes +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11478,34 +11319,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11514,8 +11359,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11546,34 +11391,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11593,8 +11442,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11621,63 +11470,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11708,34 +11566,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11744,8 +11606,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11776,34 +11638,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11823,8 +11689,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11851,63 +11717,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11938,34 +11813,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11974,8 +11853,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12006,34 +11885,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12086,8 +11969,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12114,63 +11997,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12201,34 +12093,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12237,8 +12133,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12269,34 +12165,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12305,8 +12205,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12335,34 +12235,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12383,8 +12287,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12411,63 +12315,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12501,34 +12414,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12537,8 +12454,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12572,34 +12489,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12633,19 +12554,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12656,37 +12576,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12695,22 +12619,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12718,10 +12644,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12745,19 +12670,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12769,8 +12700,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12798,22 +12729,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12826,10 +12748,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12853,22 +12773,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12881,10 +12792,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12910,22 +12819,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12938,10 +12838,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12969,22 +12867,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12997,10 +12886,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13027,22 +12914,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13055,10 +12933,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13086,22 +12962,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13114,14 +12981,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13151,8 +13016,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13173,38 +13038,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13227,8 +13096,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13250,8 +13119,8 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13267,42 +13136,44 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h +ac_cv_struct_tm=sys/time.h fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -13316,19 +13187,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13339,37 +13209,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13378,22 +13252,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13401,10 +13277,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13428,19 +13303,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13452,8 +13333,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13477,34 +13358,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13513,8 +13398,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13539,28 +13424,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13581,37 +13471,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_tm_tm_zone=no +ac_cv_member_struct_tm_tm_zone=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -13628,9 +13521,9 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 -echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_tzname+set}" = set; then + echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6 +if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13640,126 +13533,60 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif int main () { -#ifndef tzname - (void) tzname; -#endif - +atoi(*tzname); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_tzname=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_tzname=no +ac_cv_var_tzname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 -echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } -if test $ac_cv_have_decl_tzname = yes; then +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 + if test $ac_cv_var_tzname = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 _ACEOF - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME 0 -_ACEOF - - -fi - - - { echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } -if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -int -main () -{ -return tzname[0][0]; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_var_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_var_tzname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 -_ACEOF - - fi -fi + fi +fi @@ -13768,9 +13595,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13796,60 +13623,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13859,8 +13694,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13881,34 +13716,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13917,8 +13756,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13939,34 +13778,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13979,8 +13822,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14003,34 +13846,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14041,8 +13888,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14065,34 +13912,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -14108,8 +13959,9 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } + +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14131,28 +13983,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14170,37 +14027,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14215,8 +14075,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14243,59 +14103,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14312,8 +14181,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14332,9 +14201,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14350,9 +14219,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14360,22 +14229,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14388,17 +14248,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14409,8 +14269,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14437,59 +14297,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14513,8 +14382,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14541,59 +14410,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14601,8 +14479,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14621,22 +14499,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14649,13 +14518,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14663,10 +14530,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14680,8 +14549,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14708,59 +14577,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14768,8 +14646,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14789,22 +14667,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14817,13 +14686,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14831,10 +14698,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14847,8 +14716,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14875,59 +14744,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14935,8 +14813,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14956,22 +14834,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14984,13 +14853,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14998,10 +14865,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15016,8 +14885,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15044,59 +14913,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15104,8 +14982,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15141,22 +15019,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15169,18 +15038,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15198,8 +15067,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15210,47 +15079,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15261,8 +15133,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15273,47 +15145,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15324,8 +15199,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15336,59 +15211,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15410,8 +15288,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15426,8 +15304,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15453,34 +15331,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15489,8 +15371,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15501,47 +15383,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15551,8 +15436,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15577,36 +15462,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15617,8 +15506,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15629,47 +15518,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15679,8 +15571,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15706,36 +15598,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15754,8 +15650,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15782,59 +15678,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15854,8 +15759,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15881,36 +15786,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15925,8 +15833,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15953,59 +15861,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -16013,8 +15930,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16027,53 +15944,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16082,8 +16002,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16096,53 +16016,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16151,10 +16074,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -16171,8 +16096,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16199,59 +16124,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16260,8 +16194,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16288,59 +16222,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16354,8 +16297,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16378,8 +16321,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16395,8 +16338,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16418,34 +16361,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16453,8 +16400,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16478,34 +16425,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16518,8 +16469,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16554,22 +16505,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16582,13 +16524,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16602,28 +16542,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16634,37 +16574,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16673,22 +16617,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16696,10 +16642,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16723,18 +16668,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16745,8 +16697,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16768,35 +16720,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16805,8 +16761,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16819,9 +16775,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16847,60 +16803,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16914,8 +16878,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16938,36 +16902,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16985,9 +16952,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17013,60 +16980,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17079,19 +17054,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17102,37 +17076,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17141,22 +17119,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17164,10 +17144,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17191,19 +17170,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17219,9 +17204,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17247,60 +17232,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17314,19 +17307,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17337,37 +17329,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17376,22 +17372,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17399,10 +17397,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17426,19 +17423,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17454,9 +17457,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17482,60 +17485,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17548,9 +17559,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17576,60 +17587,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17663,19 +17682,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17686,37 +17704,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17725,22 +17747,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17748,10 +17772,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17775,19 +17798,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17800,8 +17829,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17832,37 +17861,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17883,8 +17915,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17913,36 +17945,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17962,19 +17997,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17985,37 +18019,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18024,22 +18062,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18047,10 +18087,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18074,19 +18113,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18102,19 +18147,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18125,37 +18169,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18164,22 +18212,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18187,10 +18237,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18214,19 +18263,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18239,8 +18294,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18267,12 +18322,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18285,8 +18340,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18294,27 +18349,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18322,8 +18377,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18331,24 +18386,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18372,8 +18427,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18386,8 +18441,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18395,26 +18450,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18425,37 +18480,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18464,22 +18523,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18487,10 +18548,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18514,18 +18574,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18539,8 +18606,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18556,32 +18623,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18605,8 +18671,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18635,15 +18701,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18657,16 +18723,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18678,7 +18744,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18691,7 +18757,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -18869,7 +18935,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18889,58 +18955,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18949,36 +18996,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -19007,45 +19070,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19055,43 +19090,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -19105,19 +19105,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19125,120 +19124,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19247,28 +19285,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19277,14 +19294,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19292,19 +19326,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19312,7 +19357,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19326,20 +19371,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19350,42 +19393,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19401,52 +19462,40 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19457,483 +19506,375 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -ZLIB_DIR!$ZLIB_DIR$ac_delim -ZLIB_OBJS!$ZLIB_OBJS$ac_delim -ZLIB_SRCS!$ZLIB_SRCS$ac_delim -ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -PACKAGE_DIR!$PACKAGE_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@ZLIB_DIR@,$ZLIB_DIR,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t +s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t +s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19941,52 +19882,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From e411e719be9a7b0fa0c2590af76634ba2a3c1651 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 3 Jan 2009 13:55:54 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index c665bda..7922346 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -121,6 +121,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + /* Define to 1 if you have the `mkstemps' function. */ #undef HAVE_MKSTEMPS -- cgit v0.12 From d4de25b3a8c31f09130f9fc79ed56175d82b3a45 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 3 Jan 2009 14:20:33 +0000 Subject: autoconf-2.59 --- unix/configure | 5 ----- 1 file changed, 5 deletions(-) diff --git a/unix/configure b/unix/configure index 22435cc..bc8d07e 100755 --- a/unix/configure +++ b/unix/configure @@ -1344,11 +1344,6 @@ VERSION=${TCL_VERSION} PKG_CFG_ARGS="$ac_configure_args ${PKG_CFG_ARGS}" -# Ensure environment of sub-configure is the same as ours -#for v in CC CPP CFLAGS CPPFLAGS LDFLAGS; do -# eval 'test -n "$'$v'" && PKG_CFG_ARGS="$v=\"$'$v'\" $PKG_CFG_ARGS"' -#done - if test -r "$cache_file" -a -f "$cache_file"; then case $cache_file in [\\/]* | ?:[\\/]* ) pkg_cache_file=$cache_file ;; -- cgit v0.12 From 348fd355a5cdcf0f869a0b530608a4f1be1aaa26 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Sun, 4 Jan 2009 22:55:12 +0000 Subject: Generalize mysterious comment about causes for ::env misses --- generic/tclEnv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 3a7a3c8..ac47ee9 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.38 2008/10/28 23:29:54 nijtmans Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.39 2009/01/04 22:55:12 ferrieux Exp $ */ #include "tclInt.h" @@ -111,7 +111,8 @@ TclSetupEnv( if (p2 == NULL) { /* * This condition seem to happen occasionally under some - * versions of Solaris; ignore the entry. + * versions of Solaris, or when encoding accidents swallow the + * '='; ignore the entry. */ continue; -- cgit v0.12 From 7d95a053aeb778f64cdd4fcb0cec11bd042119f8 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 4 Jan 2009 22:57:38 +0000 Subject: More coding style improvements. --- ChangeLog | 4 +++ generic/tclCmdAH.c | 80 +++++++++++++++++++++++++++--------------------------- 2 files changed, 44 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6c3296..9203a0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-01-04 Donal K. Fellows + + * generic/tclCmdAH.c: Tidy up spacing and code style. + 2009-01-03 Kevin B. Kenny : * library/clock.tcl (tcl::clock::add): Fixed error message formatting diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 8396463..988f21f 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.113 2008/12/06 20:42:13 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.114 2009/01/04 22:57:39 dkf Exp $ */ #include "tclInt.h" @@ -60,7 +60,7 @@ static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, static Tcl_NRPostProc CatchObjCmdCallback; static Tcl_NRPostProc ForNextCallback; static Tcl_NRPostProc ForeachLoopStep; -static Tcl_NRPostProc EvalCmdErrMsg; +static Tcl_NRPostProc EvalCmdErrMsg; /* *---------------------------------------------------------------------- @@ -166,7 +166,7 @@ Tcl_CaseObjCmd( char *pat; unsigned char *p; - if (i == (caseObjc - 1)) { + if (i == caseObjc-1) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "extra case pattern with no body", NULL); return TCL_ERROR; @@ -292,7 +292,7 @@ TclNRCatchObjCmd( Tcl_NRAddCallback(interp, CatchObjCmdCallback, INT2PTR(objc), varNamePtr, optionVarNamePtr, NULL); - + return TclNREvalObjEx(interp, objv[1], 0, iPtr->cmdFramePtr, 1); } @@ -306,7 +306,7 @@ CatchObjCmdCallback( Tcl_Obj *varNamePtr = data[1]; Tcl_Obj *optionVarNamePtr = data[2]; int rewind = ((Interp *) interp)->execEnvPtr->rewind; - + /* * We disable catch in interpreters where the limit has been exceeded. */ @@ -694,7 +694,6 @@ Tcl_ErrorObjCmd( */ /* ARGSUSED */ - static int EvalCmdErrMsg( ClientData data[], @@ -708,7 +707,6 @@ EvalCmdErrMsg( return result; } - int Tcl_EvalObjCmd( ClientData dummy, /* Not used. */ @@ -718,8 +716,8 @@ Tcl_EvalObjCmd( { register Tcl_Obj *objPtr; Interp *iPtr = (Interp *) interp; - CmdFrame* invoker = NULL; - int word = 0; + CmdFrame *invoker = NULL; + int word = 0; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); @@ -732,14 +730,14 @@ Tcl_EvalObjCmd( */ invoker = iPtr->cmdFramePtr; - word = 1; + word = 1; objPtr = objv[1]; - TclArgumentGet (interp, objPtr, &invoker, &word); + TclArgumentGet(interp, objPtr, &invoker, &word); } else { /* * More than one argument: concatenate them together with spaces * between, then evaluate the result. Tcl_EvalObjEx will delete the - * object when it decrements its refcount after eval'ing it. + * object when it decrements its refcount after eval'ing it. * * TIP #280. Make invoking context available to eval'd script, done * with the default values. @@ -747,7 +745,7 @@ Tcl_EvalObjCmd( objPtr = Tcl_ConcatObj(objc-1, objv+1); } - TclNRAddCallback(interp, EvalCmdErrMsg,NULL, NULL, NULL, NULL); + TclNRAddCallback(interp, EvalCmdErrMsg, NULL, NULL, NULL, NULL); return TclNREvalObjEx(interp, objPtr, 0, invoker, word); } @@ -893,9 +891,9 @@ Tcl_FileObjCmd( "dirname", "executable", "exists", "extension", "isdirectory", "isfile", "join", "link", "lstat", "mtime", "mkdir", "nativename", - "normalize", "owned", + "normalize", "owned", "pathtype", "readable", "readlink", "rename", - "rootname", "separator", "size", "split", + "rootname", "separator", "size", "split", "stat", "system", "tail", "tempfile", "type", "volumes", "writable", NULL @@ -948,7 +946,7 @@ Tcl_FileObjCmd( if (index == FCMD_ATIME) { tval.actime = newTime; tval.modtime = buf.st_mtime; - } else { /* index == FCMD_MTIME */ + } else { /* index == FCMD_MTIME */ tval.actime = buf.st_atime; tval.modtime = newTime; } @@ -997,11 +995,10 @@ Tcl_FileObjCmd( dirPtr = TclPathPart(interp, objv[2], TCL_PATH_DIRNAME); if (dirPtr == NULL) { return TCL_ERROR; - } else { - Tcl_SetObjResult(interp, dirPtr); - Tcl_DecrRefCount(dirPtr); - return TCL_OK; } + Tcl_SetObjResult(interp, dirPtr); + Tcl_DecrRefCount(dirPtr); + return TCL_OK; } case FCMD_EXECUTABLE: if (objc != 3) { @@ -1020,13 +1017,12 @@ Tcl_FileObjCmd( goto only3Args; } ext = TclPathPart(interp, objv[2], TCL_PATH_EXTENSION); - if (ext != NULL) { - Tcl_SetObjResult(interp, ext); - Tcl_DecrRefCount(ext); - return TCL_OK; - } else { + if (ext == NULL) { return TCL_ERROR; } + Tcl_SetObjResult(interp, ext); + Tcl_DecrRefCount(ext); + return TCL_OK; } case FCMD_ISDIRECTORY: if (objc != 3) { @@ -1057,6 +1053,9 @@ Tcl_FileObjCmd( /* * For Windows, there are no user ids associated with a file, so * we always return 1. + * + * TODO: use GetSecurityInfo to get the real owner of the file and + * test for equivalence to the current user. */ #if defined(__WIN32__) @@ -1335,13 +1334,12 @@ Tcl_FileObjCmd( goto only3Args; } root = TclPathPart(interp, objv[2], TCL_PATH_ROOT); - if (root != NULL) { - Tcl_SetObjResult(interp, root); - Tcl_DecrRefCount(root); - return TCL_OK; - } else { + if (root == NULL) { return TCL_ERROR; } + Tcl_SetObjResult(interp, root); + Tcl_DecrRefCount(root); + return TCL_OK; } case FCMD_SEPARATOR: if ((objc < 2) || (objc > 3)) { @@ -1712,7 +1710,7 @@ FileTempfileCmd( * tools or system libraries. [Bug 2388866] */ - if (Tcl_FSGetFileSystemForPath(tempDirObj) + if (tempDirObj != NULL && Tcl_FSGetFileSystemForPath(tempDirObj) != &tclNativeFilesystem) { TclDecrRefCount(tempDirObj); tempDirObj = NULL; @@ -1728,9 +1726,11 @@ FileTempfileCmd( || string[length-1] != '\\')) { Tcl_Obj *tailObj = TclPathPart(interp, objv[3], TCL_PATH_TAIL); - tempBaseObj = TclPathPart(interp, tailObj, TCL_PATH_ROOT); - tempExtObj = TclPathPart(interp, tailObj, TCL_PATH_EXTENSION); - TclDecrRefCount(tailObj); + if (tailObj != NULL) { + tempBaseObj = TclPathPart(interp, tailObj, TCL_PATH_ROOT); + tempExtObj = TclPathPart(interp, tailObj, TCL_PATH_EXTENSION); + TclDecrRefCount(tailObj); + } } } @@ -1826,7 +1826,7 @@ Tcl_ForObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRForObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRForObjCmd, dummy, objc, objv); } int @@ -1883,7 +1883,7 @@ TclNRForIterCallback( * Tcl_ExprBooleanObj. Otherwise, any error message will be appended * to the result of the last evaluation. */ - + Tcl_ResetResult(interp); result = Tcl_ExprBooleanObj(interp, cond, &value); if (result != TCL_OK) { @@ -1894,12 +1894,13 @@ TclNRForIterCallback( if (next) { TclNRAddCallback(interp, ForNextCallback, cond, body, next, msg); } else { - TclNRAddCallback(interp, TclNRForIterCallback, cond, body, NULL, msg); + TclNRAddCallback(interp, TclNRForIterCallback, cond, body, NULL, + msg); } return TclNREvalObjEx(interp, body, 0, iPtr->cmdFramePtr, 2); } - done: + done: switch (result) { case TCL_BREAK: result = TCL_OK; @@ -1925,7 +1926,6 @@ ForNextCallback( Tcl_Obj *next = data[2]; char *msg = data[3]; - if ((result == TCL_OK) || (result == TCL_CONTINUE)) { /* * TIP #280. Make invoking context available to next script. @@ -1942,7 +1942,7 @@ ForNextCallback( return result; } } - + TclNRAddCallback(interp, TclNRForIterCallback, cond, body, next, msg); return result; } -- cgit v0.12 From 8e54cd31b1870397b3c62959293df9a98eeb252f Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 5 Jan 2009 09:48:11 +0000 Subject: Make [source] NRE-aware to enable [yield]. [Bug 2412068] --- ChangeLog | 7 +++ generic/tclBasic.c | 4 +- generic/tclCmdMZ.c | 12 ++++- generic/tclIOUtil.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++-- generic/tclInt.h | 8 ++-- 5 files changed, 158 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9203a0d..8825ec2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-05 Donal K. Fellows + + * generic/tclCmdMZ.c (TclNRSourceObjCmd): Make implementation of the + * generic/tclIOUtil.c (TclNREvalFile): [source] command be NRE + enabled so that [yield] inside a script sourced in a coroutine can + work. [Bug 2412068] + 2009-01-04 Donal K. Fellows * generic/tclCmdAH.c: Tidy up spacing and code style. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d58368d..5f8d9dc 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.378 2008/12/17 22:07:42 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.379 2009/01/05 09:48:11 dkf Exp $ */ #include "tclInt.h" @@ -244,7 +244,7 @@ static const CmdInfo builtInCmds[] = { {"read", Tcl_ReadObjCmd, NULL, NULL, 1}, {"seek", Tcl_SeekObjCmd, NULL, NULL, 1}, {"socket", Tcl_SocketObjCmd, NULL, NULL, 0}, - {"source", Tcl_SourceObjCmd, NULL, NULL, 0}, + {"source", Tcl_SourceObjCmd, NULL, TclNRSourceObjCmd, 0}, {"tell", Tcl_TellObjCmd, NULL, NULL, 1}, {"time", Tcl_TimeObjCmd, NULL, NULL, 1}, {"unload", Tcl_UnloadObjCmd, NULL, NULL, 0}, diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index c42370c..6025f90 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.172 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.173 2009/01/05 09:48:11 dkf Exp $ */ #include "tclInt.h" @@ -938,6 +938,16 @@ Tcl_SourceObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + return Tcl_NRCallObjProc(interp, TclNRSourceObjCmd, dummy, objc, objv); +} + +int +TclNRSourceObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ const char *encodingName = NULL; Tcl_Obj *fileName; diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 7b6a4c8..b62fee3 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.160 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.161 2009/01/05 09:48:11 dkf Exp $ */ #include "tclInt.h" @@ -30,6 +30,8 @@ * Prototypes for functions defined later in this file. */ +static int EvalFileCallback(ClientData data[], + Tcl_Interp *interp, int result); static FilesystemRecord*FsGetFirstFilesystem(void); static void FsThrExitProc(ClientData cd); static Tcl_Obj * FsListMounts(Tcl_Obj *pathPtr, const char *pattern); @@ -37,7 +39,6 @@ static void FsAddMountsToGlobResult(Tcl_Obj *resultPtr, Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types); static void FsUpdateCwd(Tcl_Obj *cwdObj, ClientData clientData); - #ifdef TCL_THREADS static void FsRecacheFilesystemList(void); #endif @@ -1644,10 +1645,11 @@ TclGetOpenModeEx( /* *---------------------------------------------------------------------- * - * Tcl_FSEvalFile, Tcl_FSEvalFileEx -- + * Tcl_FSEvalFile, Tcl_FSEvalFileEx, TclNREvalFile -- * * Read in a file and process the entire file as one gigantic Tcl * command. Tcl_FSEvalFile is Tcl_FSEvalFileEx without encoding argument. + * TclNREvalFile is an NRE-enabled version of Tcl_FSEvalFileEx. * * Results: * A standard Tcl result, which is either the result of executing the @@ -1782,6 +1784,134 @@ Tcl_FSEvalFileEx( Tcl_DecrRefCount(objPtr); return result; } + +int +TclNREvalFile( + Tcl_Interp *interp, /* Interpreter in which to process file. */ + Tcl_Obj *pathPtr, /* Path of file to process. Tilde-substitution + * will be performed on this name. */ + const char *encodingName) /* If non-NULL, then use this encoding for the + * file. NULL means use the system encoding. */ +{ + int length; + Tcl_StatBuf statBuf; + Tcl_Obj *oldScriptFile, *objPtr; + Interp *iPtr; + char *string; + Tcl_Channel chan; + + if (Tcl_FSGetNormalizedPath(interp, pathPtr) == NULL) { + return TCL_ERROR; + } + + if (Tcl_FSStat(pathPtr, &statBuf) == -1) { + Tcl_SetErrno(errno); + Tcl_AppendResult(interp, "couldn't read file \"", + Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL); + return TCL_ERROR; + } + chan = Tcl_FSOpenFileChannel(interp, pathPtr, "r", 0644); + if (chan == NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "couldn't read file \"", + Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL); + return TCL_ERROR; + } + + /* + * The eofchar is \32 (^Z). This is the usual on Windows, but we effect + * this cross-platform to allow for scripted documents. [Bug: 2040] + */ + + Tcl_SetChannelOption(interp, chan, "-eofchar", "\32"); + + /* + * If the encoding is specified, set it for the channel. Else don't touch + * it (and use the system encoding) Report error on unknown encoding. + */ + + if (encodingName != NULL) { + if (Tcl_SetChannelOption(interp, chan, "-encoding", encodingName) + != TCL_OK) { + Tcl_Close(interp,chan); + return TCL_ERROR; + } + } + + objPtr = Tcl_NewObj(); + Tcl_IncrRefCount(objPtr); + if (Tcl_ReadChars(chan, objPtr, -1, 0) < 0) { + Tcl_Close(interp, chan); + Tcl_AppendResult(interp, "couldn't read file \"", + Tcl_GetString(pathPtr), "\": ", Tcl_PosixError(interp), NULL); + Tcl_DecrRefCount(objPtr); + return TCL_ERROR; + } + + if (Tcl_Close(interp, chan) != TCL_OK) { + Tcl_DecrRefCount(objPtr); + return TCL_ERROR; + } + + iPtr = (Interp *) interp; + oldScriptFile = iPtr->scriptFile; + iPtr->scriptFile = pathPtr; + Tcl_IncrRefCount(iPtr->scriptFile); + string = Tcl_GetStringFromObj(objPtr, &length); + + /* + * TIP #280: Force the evaluator to open a frame for a sourced file. + */ + + iPtr->evalFlags |= TCL_EVAL_FILE; + TclNRAddCallback(interp, EvalFileCallback, oldScriptFile, pathPtr, objPtr, + NULL); + return TclNREvalObjEx(interp, objPtr, 0, NULL, INT_MIN); +} + +static int +EvalFileCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + Tcl_Obj *oldScriptFile = data[0]; + Tcl_Obj *pathPtr = data[1]; + Tcl_Obj *objPtr = data[2]; + + /* + * Now we have to be careful; the script may have changed the + * iPtr->scriptFile value, so we must reset it without assuming it still + * points to 'pathPtr'. + */ + + if (iPtr->scriptFile != NULL) { + Tcl_DecrRefCount(iPtr->scriptFile); + } + iPtr->scriptFile = oldScriptFile; + + if (result == TCL_RETURN) { + result = TclUpdateReturnInfo(iPtr); + } else if (result == TCL_ERROR) { + /* + * Record information telling where the error occurred. + */ + + int length; + const char *pathString = Tcl_GetStringFromObj(pathPtr, &length); + int limit = 150; + int overflow = (length > limit); + + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (file \"%.*s%s\" line %d)", + (overflow ? limit : length), pathString, + (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); + } + + Tcl_DecrRefCount(objPtr); + return result; +} /* *---------------------------------------------------------------------- diff --git a/generic/tclInt.h b/generic/tclInt.h index 7e3d1e4..7551956 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.410 2008/12/11 01:21:52 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.411 2009/01/05 09:48:11 dkf Exp $ */ #ifndef _TCLINT @@ -2565,6 +2565,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForeachCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRSourceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; @@ -2578,7 +2579,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; *---------------------------------------------------------------- */ -MODULE_SCOPE int TclNREvalCmd(Tcl_Interp * interp, Tcl_Obj * objPtr, +MODULE_SCOPE int TclNREvalCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); @@ -2644,6 +2645,8 @@ MODULE_SCOPE double TclFloor(mp_int *a); MODULE_SCOPE void TclFormatNaN(double value, char *buffer); MODULE_SCOPE int TclFSFileAttrIndex(Tcl_Obj *pathPtr, const char *attributeName, int *indexPtr); +MODULE_SCOPE int TclNREvalFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, + const char *encodingName); MODULE_SCOPE void TclFSUnloadTempFile(Tcl_LoadHandle loadHandle); MODULE_SCOPE int * TclGetAsyncReadyPtr(void); MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp); @@ -2848,7 +2851,6 @@ MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks); #endif MODULE_SCOPE Tcl_Obj * TclDisassembleByteCodeObj(Tcl_Obj *objPtr); MODULE_SCOPE int TclZlibInit(Tcl_Interp *interp); - MODULE_SCOPE void * TclpThreadCreateKey(void); MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); MODULE_SCOPE void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr); -- cgit v0.12 From 529b3009a5528d1afe122d5fae4b5c739b4618fb Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 5 Jan 2009 11:27:41 +0000 Subject: Added a test, correct a dumb blunder. --- generic/tclCmdMZ.c | 4 ++-- tests/source.test | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 6025f90..feb87cd 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.173 2009/01/05 09:48:11 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.174 2009/01/05 11:27:41 dkf Exp $ */ #include "tclInt.h" @@ -971,7 +971,7 @@ TclNRSourceObjCmd( encodingName = TclGetString(objv[2]); } - return Tcl_FSEvalFileEx(interp, fileName, encodingName); + return TclNREvalFile(interp, fileName, encodingName); } /* diff --git a/tests/source.test b/tests/source.test index 29d3f2f..f358042 100644 --- a/tests/source.test +++ b/tests/source.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: source.test,v 1.13 2006/03/21 11:12:29 dkf Exp $ +# RCS: @(#) $Id: source.test,v 1.14 2009/01/05 11:27:41 dkf Exp $ if {[catch {package require tcltest 2.1}]} { puts stderr "Skipping tests in [info script]. tcltest 2.1 required." @@ -21,7 +21,7 @@ if {[catch {package require tcltest 2.1}]} { namespace eval ::tcl::test::source { namespace import ::tcltest::* - + test source-1.1 {source command} -setup { set x "old x value" set y "old y value" @@ -269,7 +269,23 @@ test source-7.6 {source -encoding: mismatch encoding error} -setup { removeFile source.file } -returnCodes error -match glob -result {invalid command name*} +test source-8.1 {source and coroutine/yield} -setup { + set sourcefile [makeFile {} source.file] + file delete $sourcefile +} -body { + makeFile {yield 1; yield 2; return 3;} $sourcefile + coroutine coro apply {f {yield;source $f}} $sourcefile + list [coro] [coro] [coro] [info exist coro] +} -cleanup { + catch {rename coro {}} + removeFile source.file +} -result {1 2 3 0} + cleanupTests } namespace delete ::tcl::test::source return + +# Local Variables: +# mode: tcl +# End: \ No newline at end of file -- cgit v0.12 From 2bd21827f89256fadc04c51eaba0c8b82bdcc75b Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 5 Jan 2009 14:04:51 +0000 Subject: Convert tabs to spaces for reliable display with nroff --- doc/fcopy.n | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/fcopy.n b/doc/fcopy.n index c4eaae2..1178093 100644 --- a/doc/fcopy.n +++ b/doc/fcopy.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fcopy.n,v 1.18 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: fcopy.n,v 1.19 2009/01/05 14:04:51 dkf Exp $ '\" .so man.macros .TH fcopy n 8.0 Tcl "Tcl Built-In Commands" @@ -118,7 +118,7 @@ proc Cleanup {in out bytes {error {}}} { close $in close $out if {[string length $error] != 0} { - # error occurred during the copy + # error occurred during the copy } } set in [open $file1] @@ -135,11 +135,11 @@ proc CopyMore {in out chunk bytes {error {}}} { global total done incr total $bytes if {([string length $error] != 0) || [eof $in]} { - set done $total - close $in - close $out + set done $total + close $in + close $out } else { - \fBfcopy\fR $in $out -size $chunk \e + \fBfcopy\fR $in $out -size $chunk \e -command [list CopyMore $in $out $chunk] } } -- cgit v0.12 From c31d26b2fa5378c81cb71e2ba8b60af670107fa7 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Jan 2009 09:49:38 +0000 Subject: Comment formatting improvements. --- generic/tcl.h | 91 +++++++++++------------ generic/tclInt.h | 215 +++++++++++++++++++++++++++++-------------------------- 2 files changed, 159 insertions(+), 147 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index c3426f1..dc8d3f7 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.285 2008/12/19 03:54:44 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.286 2009/01/06 09:49:38 dkf Exp $ */ #ifndef _TCL @@ -274,7 +274,7 @@ extern "C" { #endif /* - * Make sure EXTERN isn't defined elsewhere + * Make sure EXTERN isn't defined elsewhere. */ #ifdef EXTERN @@ -538,9 +538,10 @@ typedef void (Tcl_ThreadCreateProc) (ClientData clientData); * given to Tcl_CreateThread. */ -#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack */ -#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default behaviour */ -#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable */ +#define TCL_THREAD_STACK_DEFAULT (0) /* Use default size for stack. */ +#define TCL_THREAD_NOFLAGS (0000) /* Standard flags, default + * behaviour. */ +#define TCL_THREAD_JOINABLE (0001) /* Mark the thread as joinable. */ /* * Flag values passed to Tcl_StringCaseMatch. @@ -552,20 +553,20 @@ typedef void (Tcl_ThreadCreateProc) (ClientData clientData); * Flag values passed to Tcl_GetRegExpFromObj. */ -#define TCL_REG_BASIC 000000 /* BREs (convenience) */ -#define TCL_REG_EXTENDED 000001 /* EREs */ -#define TCL_REG_ADVF 000002 /* advanced features in EREs */ -#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs) */ -#define TCL_REG_QUOTE 000004 /* no special characters, none */ -#define TCL_REG_NOCASE 000010 /* ignore case */ -#define TCL_REG_NOSUB 000020 /* don't care about subexpressions */ -#define TCL_REG_EXPANDED 000040 /* expanded format, white space & - * comments */ +#define TCL_REG_BASIC 000000 /* BREs (convenience). */ +#define TCL_REG_EXTENDED 000001 /* EREs. */ +#define TCL_REG_ADVF 000002 /* Advanced features in EREs. */ +#define TCL_REG_ADVANCED 000003 /* AREs (which are also EREs). */ +#define TCL_REG_QUOTE 000004 /* No special characters, none. */ +#define TCL_REG_NOCASE 000010 /* Ignore case. */ +#define TCL_REG_NOSUB 000020 /* Don't care about subexpressions. */ +#define TCL_REG_EXPANDED 000040 /* Expanded format, white space & + * comments. */ #define TCL_REG_NLSTOP 000100 /* \n doesn't match . or [^ ] */ -#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before */ -#define TCL_REG_NEWLINE 000300 /* newlines are line terminators */ -#define TCL_REG_CANMATCH 001000 /* report details on partial/limited - * matches */ +#define TCL_REG_NLANCH 000200 /* ^ matches after \n, $ before. */ +#define TCL_REG_NEWLINE 000300 /* Newlines are line terminators. */ +#define TCL_REG_CANMATCH 001000 /* Report details on partial/limited + * matches. */ /* * Flags values passed to Tcl_RegExpExecObj. @@ -777,19 +778,19 @@ typedef struct Tcl_Obj { * internal rep. NULL indicates the object has * no internal rep (has no type). */ union { /* The internal representation: */ - long longValue; /* - an long integer value */ - double doubleValue; /* - a double-precision floating value */ - VOID *otherValuePtr; /* - another, type-specific value */ - Tcl_WideInt wideValue; /* - a long long value */ - struct { /* - internal rep as two pointers */ + long longValue; /* - an long integer value. */ + double doubleValue; /* - a double-precision floating value. */ + VOID *otherValuePtr; /* - another, type-specific value. */ + Tcl_WideInt wideValue; /* - a long long value. */ + struct { /* - internal rep as two pointers. */ VOID *ptr1; VOID *ptr2; } twoPtrValue; struct { /* - internal rep as a wide int, tightly - * packed fields */ - VOID *ptr; /* Pointer to digits */ + * packed fields. */ + VOID *ptr; /* Pointer to digits. */ unsigned long value;/* Alloc, used, and signum packed into a - * single word */ + * single word. */ } ptrAndLongRep; } internalRep; } Tcl_Obj; @@ -1038,10 +1039,10 @@ typedef struct Tcl_DString { #define TCL_LEAVE_ERR_MSG 0x200 #define TCL_TRACE_ARRAY 0x800 #ifndef TCL_REMOVE_OBSOLETE_TRACES -/* Required to support old variable/vdelete/vinfo traces */ +/* Required to support old variable/vdelete/vinfo traces. */ #define TCL_TRACE_OLD_STYLE 0x1000 #endif -/* Indicate the semantics of the result of a trace */ +/* Indicate the semantics of the result of a trace. */ #define TCL_TRACE_RESULT_DYNAMIC 0x8000 #define TCL_TRACE_RESULT_OBJECT 0x10000 @@ -1409,7 +1410,7 @@ typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData); #define TCL_CHANNEL_VERSION_5 ((Tcl_ChannelTypeVersion) 0x5) /* - * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc + * TIP #218: Channel Actions, Ids for Tcl_DriverThreadActionProc. */ #define TCL_CHANNEL_THREAD_INSERT (0) @@ -1501,7 +1502,7 @@ typedef struct Tcl_ChannelType { /* Set blocking mode for the raw channel. May * be NULL. */ /* - * Only valid in TCL_CHANNEL_VERSION_2 channels or later + * Only valid in TCL_CHANNEL_VERSION_2 channels or later. */ Tcl_DriverFlushProc *flushProc; /* Function to call to flush a channel. May be @@ -1511,7 +1512,7 @@ typedef struct Tcl_ChannelType { * This will be passed up the stacked channel * chain. */ /* - * Only valid in TCL_CHANNEL_VERSION_3 channels or later + * Only valid in TCL_CHANNEL_VERSION_3 channels or later. */ Tcl_DriverWideSeekProc *wideSeekProc; /* Function to call to seek on the channel @@ -1519,8 +1520,8 @@ typedef struct Tcl_ChannelType { * NULL, and must be NULL if seekProc is * NULL. */ /* - * Only valid in TCL_CHANNEL_VERSION_4 channels or later - * TIP #218, Channel Thread Actions + * Only valid in TCL_CHANNEL_VERSION_4 channels or later. + * TIP #218, Channel Thread Actions. */ Tcl_DriverThreadActionProc *threadActionProc; /* Function to call to notify the driver of @@ -1528,8 +1529,8 @@ typedef struct Tcl_ChannelType { * be NULL. */ /* - * Only valid in TCL_CHANNEL_VERSION_5 channels or later - * TIP #208, File Truncation + * Only valid in TCL_CHANNEL_VERSION_5 channels or later. + * TIP #208, File Truncation. */ Tcl_DriverTruncateProc *truncateProc; /* Function to call to truncate the underlying @@ -1563,14 +1564,14 @@ typedef enum Tcl_PathType { */ typedef struct Tcl_GlobTypeData { - int type; /* Corresponds to bcdpfls as in 'find -t' */ - int perm; /* Corresponds to file permissions */ - Tcl_Obj *macType; /* Acceptable mac type */ - Tcl_Obj *macCreator; /* Acceptable mac creator */ + int type; /* Corresponds to bcdpfls as in 'find -t'. */ + int perm; /* Corresponds to file permissions. */ + Tcl_Obj *macType; /* Acceptable Mac type. */ + Tcl_Obj *macCreator; /* Acceptable Mac creator. */ } Tcl_GlobTypeData; /* - * Type and permission definitions for glob command + * Type and permission definitions for glob command. */ #define TCL_GLOB_TYPE_BLOCK (1<<0) @@ -1589,7 +1590,7 @@ typedef struct Tcl_GlobTypeData { #define TCL_GLOB_PERM_X (1<<4) /* - * Flags for the unload callback function + * Flags for the unload callback function. */ #define TCL_UNLOAD_DETACH_FROM_INTERPRETER (1<<0) @@ -2162,9 +2163,9 @@ typedef unsigned short Tcl_UniChar; typedef struct Tcl_Config { const char *key; /* Configuration key to register. ASCII - * encoded, thus UTF-8 */ + * encoded, thus UTF-8. */ const char *value; /* The value associated with the key. System - * encoding */ + * encoding. */ } Tcl_Config; /* @@ -2346,7 +2347,7 @@ EXTERN void Tcl_GetMemoryInfo (Tcl_DString *dsPtr); /* - * Single public declaration for NRE + * Single public declaration for NRE. */ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, @@ -2413,7 +2414,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, # define Tcl_IncrRefCount(objPtr) \ ++(objPtr)->refCount /* - * Use do/while0 idiom for optimum correctness without compiler warnings + * Use do/while0 idiom for optimum correctness without compiler warnings. * http://c2.com/cgi/wiki?TrivialDoWhileLoop */ # define Tcl_DecrRefCount(objPtr) \ diff --git a/generic/tclInt.h b/generic/tclInt.h index 7551956..67ba634 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,14 +15,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.411 2009/01/05 09:48:11 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.412 2009/01/06 09:49:39 dkf Exp $ */ #ifndef _TCLINT #define _TCLINT /* - * Some numerics configuration options + * Some numerics configuration options. */ #undef NO_WIDE_TYPE @@ -274,9 +274,9 @@ typedef struct Namespace { * is currently allocated. */ int cmdRefEpoch; /* Incremented if a newly added command * shadows a command for which this namespace - * has already cached a Command * pointer; - * this causes all its cached Command* - * pointers to be invalidated. */ + * has already cached a Command* pointer; this + * causes all its cached Command* pointers to + * be invalidated. */ int resolverEpoch; /* Incremented whenever (a) the name * resolution rules change for this namespace * or (b) a newly added command shadows a @@ -654,7 +654,7 @@ typedef struct VarInHash { #define VAR_ALL_HASH \ (VAR_IN_HASHTABLE|VAR_DEAD_HASH|VAR_NAMESPACE_VAR|VAR_ARRAY_ELEMENT) -/* Trace and search state */ +/* Trace and search state. */ #define VAR_TRACED_READ 0x10 /* TCL_TRACE_READS */ #define VAR_TRACED_WRITE 0x20 /* TCL_TRACE_WRITES */ @@ -665,7 +665,7 @@ typedef struct VarInHash { #define VAR_ALL_TRACES \ (VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) -/* Special handling on initialisation (only CompiledLocal) */ +/* Special handling on initialisation (only CompiledLocal). */ #define VAR_ARGUMENT 0x100 /* KEEP OLD VALUE! See tclProc.c */ #define VAR_TEMPORARY 0x200 /* KEEP OLD VALUE! See tclProc.c */ #define VAR_IS_ARGS 0x400 @@ -781,7 +781,7 @@ typedef struct VarInHash { ((VarInHash *) (varPtr))->refCount /* - * Macros for direct variable access by TEBC + * Macros for direct variable access by TEBC. */ #define TclIsVarDirectReadable(varPtr) \ @@ -919,9 +919,9 @@ typedef struct Trace { ClientData clientData; /* Arbitrary value to pass to proc. */ struct Trace *nextPtr; /* Next in list of traces for this interp. */ int flags; /* Flags governing the trace - see - * Tcl_CreateObjTrace for details */ + * Tcl_CreateObjTrace for details. */ Tcl_CmdObjTraceDeleteProc *delProc; - /* Procedure to call when trace is deleted */ + /* Procedure to call when trace is deleted. */ } Trace; /* @@ -1093,15 +1093,15 @@ typedef struct CmdFrame { */ int type; /* Values see below. */ - int level; /* #Frames in stack, prevent O(n) scan of - * list. */ - int numLevels; /* value of interp's numLevels when the frame - * was pushed */ + int level; /* Number of frames in stack, prevent O(n) + * scan of list. */ + int numLevels; /* Value of interp's numLevels when the frame + * was pushed. */ int *line; /* Lines the words of the command start on. */ int nline; CallFrame *framePtr; /* Procedure activation record, may be * NULL. */ - struct CmdFrame *nextPtr; /* Link to calling frame */ + struct CmdFrame *nextPtr; /* Link to calling frame. */ /* * Data needed for Eval vs TEBC @@ -1139,27 +1139,28 @@ typedef struct CmdFrame { * in. */ } eval; struct { - const void *codePtr;/* Byte code currently executed */ - const char *pc; /* and instruction pointer. */ + const void *codePtr;/* Byte code currently executed... */ + const char *pc; /* ... and instruction pointer. */ } tebc; } data; union { struct { - const char *cmd; /* The executed command, if possible */ - int len; /* And its length */ + const char *cmd; /* The executed command, if possible... */ + int len; /* ... and its length. */ } str; - Tcl_Obj *listPtr; /* Tcl_EvalObjEx, cmd list */ + Tcl_Obj *listPtr; /* Tcl_EvalObjEx, cmd list. */ } cmd; } CmdFrame; typedef struct CFWord { - CmdFrame *framePtr; /* CmdFrame to acess */ - int word; /* Index of the word in the command */ - int refCount; /* #times the word is on the stack */ + CmdFrame *framePtr; /* CmdFrame to access. */ + int word; /* Index of the word in the command. */ + int refCount; /* Number of times the word is on the + * stack. */ } CFWord; typedef struct ExtIndex { - Tcl_Obj *obj; /* Reference to the word */ + Tcl_Obj *obj; /* Reference to the word. */ int pc; /* Instruction pointer of a command in * ExtCmdLoc.loc[.] */ int word; /* Index of word in @@ -1167,9 +1168,10 @@ typedef struct ExtIndex { } ExtIndex; typedef struct CFWordBC { - CmdFrame *framePtr; /* CmdFrame to acess */ - ExtIndex *eiPtr; /* Word info: PC and index */ - int refCount; /* #times the word is on the stack */ + CmdFrame *framePtr; /* CmdFrame to access. */ + ExtIndex *eiPtr; /* Word info: PC and index. */ + int refCount; /* Number of times the word is on the + * stack. */ } CFWordBC; /* @@ -1190,15 +1192,15 @@ typedef struct CFWordBC { * types, per the context of the byte code in execution. */ -#define TCL_LOCATION_EVAL (0) /* Location in a dynamic eval script */ +#define TCL_LOCATION_EVAL (0) /* Location in a dynamic eval script. */ #define TCL_LOCATION_EVAL_LIST (1) /* Location in a dynamic eval script, - * list-path */ -#define TCL_LOCATION_BC (2) /* Location in byte code */ + * list-path. */ +#define TCL_LOCATION_BC (2) /* Location in byte code. */ #define TCL_LOCATION_PREBC (3) /* Location in precompiled byte code, no - * location */ -#define TCL_LOCATION_SOURCE (4) /* Location in a file */ -#define TCL_LOCATION_PROC (5) /* Location in a dynamic proc */ -#define TCL_LOCATION_LAST (6) /* Number of values in the enum */ + * location. */ +#define TCL_LOCATION_SOURCE (4) /* Location in a file. */ +#define TCL_LOCATION_PROC (5) /* Location in a dynamic proc. */ +#define TCL_LOCATION_LAST (6) /* Number of values in the enum. */ /* * Structure passed to describe procedure-like "procedures" that are not @@ -1335,16 +1337,21 @@ typedef struct CorContext { } CorContext; typedef struct CoroutineData { - struct Command *cmdPtr; - struct ExecEnv *eePtr; - struct ExecEnv *callerEEPtr; + struct Command *cmdPtr; /* The command handle for the coroutine. */ + struct ExecEnv *eePtr; /* The special execution environment (stacks, + * etc.) for the coroutine. */ + struct ExecEnv *callerEEPtr;/* The execution environment for the caller of + * the coroutine, which might be the + * interpreter global environment or another + * coroutine. */ CorContext caller; CorContext running; CorContext base; int *stackLevel; - int auxNumLevels; /* While the coroutine is running the numLevels of the - * create/resume command is stored here; for suspended - * coroutines it holds the nesting numLevels at yield*/ + int auxNumLevels; /* While the coroutine is running the + * numLevels of the create/resume command is + * stored here; for suspended coroutines it + * holds the nesting numLevels at yield. */ } CoroutineData; typedef struct ExecEnv { @@ -1353,7 +1360,7 @@ typedef struct ExecEnv { Tcl_Obj *constants[2]; /* Pointers to constant "0" and "1" objs. */ struct Tcl_Interp *interp; struct TEOV_callback *callbackPtr; - /* Top callback in TEOV's stack */ + /* Top callback in TEOV's stack. */ struct CoroutineData *corPtr; struct BottomData *bottomPtr; int rewind; @@ -1451,15 +1458,16 @@ typedef struct ByteCodeStats { /* * Structure used in implementation of those core ensembles which are - * partially compiled. + * partially compiled. Used as an array of these, with a terminating field + * whose 'name' is NULL. */ typedef struct { - const char *name; /* The name of the subcommand */ - Tcl_ObjCmdProc *proc; /* The implementation of the subcommand */ - CompileProc *compileProc; /* The compiler for the subcommand */ - Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */ - ClientData clientData; /* Any clientData to give the command */ + const char *name; /* The name of the subcommand. */ + Tcl_ObjCmdProc *proc; /* The implementation of the subcommand. */ + CompileProc *compileProc; /* The compiler for the subcommand. */ + Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command. */ + ClientData clientData; /* Any clientData to give the command. */ } EnsembleImplMap; /* @@ -1552,7 +1560,7 @@ typedef struct Command { * command. */ CommandTrace *tracePtr; /* First in list of all traces set for this * command. */ - Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command */ + Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command. */ } Command; /* @@ -1638,10 +1646,10 @@ enum PkgPreferOptions { */ typedef struct AllocCache { - struct Cache *nextPtr; /* Linked list of cache entries */ + struct Cache *nextPtr; /* Linked list of cache entries. */ Tcl_ThreadId owner; /* Which thread's cache is this? */ - Tcl_Obj *firstObjPtr; /* List of free objects for thread */ - int numObjects; /* Number of objects for thread */ + Tcl_Obj *firstObjPtr; /* List of free objects for thread. */ + int numObjects; /* Number of objects for thread. */ } AllocCache; /* @@ -1726,10 +1734,11 @@ typedef struct Interp { ActiveVarTrace *activeVarTracePtr; /* First in list of active traces for interp, * or NULL if no active traces. */ - int returnCode; /* [return -code] parameter */ - CallFrame *rootFramePtr; /* Global frame pointer for this interpreter */ + int returnCode; /* [return -code] parameter. */ + CallFrame *rootFramePtr; /* Global frame pointer for this + * interpreter. */ Namespace *lookupNsPtr; /* Namespace to use ONLY on the next - * TCL_EVAL_INVOKE call to Tcl_EvalObjv */ + * TCL_EVAL_INVOKE call to Tcl_EvalObjv. */ /* * Information used by Tcl_AppendResult to keep track of partial results. @@ -1809,7 +1818,7 @@ typedef struct Interp { Tcl_Obj *objResultPtr; /* If the last command returned an object * result, this points to it. Should not be * accessed directly; see comment above. */ - Tcl_ThreadId threadId; /* ID of thread that owns the interpreter */ + Tcl_ThreadId threadId; /* ID of thread that owns the interpreter. */ ActiveCommandTrace *activeCmdTracePtr; /* First in list of active command traces for @@ -1818,19 +1827,22 @@ typedef struct Interp { /* First in list of active traces for interp, * or NULL if no active traces. */ - int tracesForbiddingInline; /* Count of traces (in the list headed by + int tracesForbiddingInline; /* Count of traces (in the list headed by * tracePtr) that forbid inline bytecode - * compilation */ + * compilation. */ + + /* + * Fields used to manage extensible return options (TIP 90). + */ - /* Fields used to manage extensible return options (TIP 90) */ Tcl_Obj *returnOpts; /* A dictionary holding the options to the - * last [return] command */ + * last [return] command. */ - Tcl_Obj *errorInfo; /* errorInfo value (now as a Tcl_Obj) */ - Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable */ - Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj) */ - Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable */ - int returnLevel; /* [return -level] parameter */ + Tcl_Obj *errorInfo; /* errorInfo value (now as a Tcl_Obj). */ + Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable. */ + Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj). */ + Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable. */ + int returnLevel; /* [return -level] parameter. */ /* * Resource limiting framework support (TIP#143). @@ -1888,7 +1900,7 @@ typedef struct Interp { } ensembleRewrite; /* - * TIP #219 ... Global info for the I/O system ... + * TIP #219: Global info for the I/O system. */ Tcl_Obj *chanMsg; /* Error message set by channel drivers, for @@ -1910,7 +1922,10 @@ typedef struct Interp { * over the default error messages returned by * a script cancellation operation. */ - /* TIP #280 */ + /* + * Source code origin information (TIP #280). + */ + CmdFrame *cmdFramePtr; /* Points to the command frame containing the * location information for the current * command. */ @@ -1954,13 +1969,13 @@ typedef struct Interp { int packagePrefer; /* Current package selection mode. */ /* - * Hashtables for variable traces and searches + * Hashtables for variable traces and searches. */ Tcl_HashTable varTraces; /* Hashtable holding the start of a variable's * active trace list; varPtr is the key. */ Tcl_HashTable varSearches; /* Hashtable holding the start of a variable's - * active searches list; varPtr is the key */ + * active searches list; varPtr is the key. */ /* * The thread-specific data ekeko: cache pointers or values that * (a) do not change during the thread's lifetime @@ -2135,9 +2150,10 @@ struct LimitHandler { /* The handler callback. */ ClientData clientData; /* Opaque argument to the handler callback. */ Tcl_LimitHandlerDeleteProc *deleteProc; - /* How to delete the clientData */ - LimitHandler *prevPtr; /* Previous item in linked list of handlers */ - LimitHandler *nextPtr; /* Next item in linked list of handlers */ + /* How to delete the clientData. */ + LimitHandler *prevPtr; /* Previous item in linked list of + * handlers. */ + LimitHandler *nextPtr; /* Next item in linked list of handlers. */ }; /* @@ -2163,7 +2179,7 @@ struct LimitHandler { /* * This macro is used to properly align the memory allocated by Tcl, giving - * the same alignment as the native malloc + * the same alignment as the native malloc. */ #if defined(__APPLE__) @@ -2203,7 +2219,7 @@ typedef enum { /* * The following enum values are used to indicate the translation of a Tcl * channel. Declared here so that each platform can define - * TCL_PLATFORM_TRANSLATION to the native translation on that platform + * TCL_PLATFORM_TRANSLATION to the native translation on that platform. */ typedef enum TclEolTranslation { @@ -2450,19 +2466,21 @@ typedef struct ProcessGlobalValue { */ #define TCL_PARSE_DECIMAL_ONLY 1 - /* Leading zero doesn't denote octal or hex */ + /* Leading zero doesn't denote octal or + * hex. */ #define TCL_PARSE_OCTAL_ONLY 2 - /* Parse octal even without prefix */ + /* Parse octal even without prefix. */ #define TCL_PARSE_HEXADECIMAL_ONLY 4 - /* Parse hexadecimal even without prefix */ + /* Parse hexadecimal even without prefix. */ #define TCL_PARSE_INTEGER_ONLY 8 - /* Disable floating point parsing */ + /* Disable floating point parsing. */ #define TCL_PARSE_SCAN_PREFIXES 16 - /* Use [scan] rules dealing with 0? prefixes */ + /* Use [scan] rules dealing with 0? + * prefixes. */ #define TCL_PARSE_NO_WHITESPACE 32 - /* Reject leading/trailing whitespace */ + /* Reject leading/trailing whitespace. */ #define TCL_PARSE_BINARY_ONLY 64 - /* Parse binary even without prefix */ + /* Parse binary even without prefix. */ /* *---------------------------------------------------------------------- @@ -2609,7 +2627,7 @@ MODULE_SCOPE void TclCleanupLiteralTable(Tcl_Interp *interp, LiteralTable *tablePtr); MODULE_SCOPE int TclDoubleDigits(char *buf, double value, int *signum); MODULE_SCOPE void TclDeleteNamespaceVars(Namespace *nsPtr); -/* TIP #280 - Modified token based evulation, with line information */ +/* TIP #280 - Modified token based evulation, with line information. */ MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script, int numBytes, int flags, int line); MODULE_SCOPE int TclFileAttrsCmd(Tcl_Interp *interp, @@ -3502,7 +3520,7 @@ typedef const char* TclDTraceStr; * Invalidate the string rep first so we can use the bytes value for our * pointer chain, and signal an obj deletion (as opposed to shimmering) with * 'length == -1'. - * Use empty 'if ; else' to handle use in unbraced outer if/else conditions + * Use empty 'if ; else' to handle use in unbraced outer if/else conditions. */ # define TclDecrRefCount(objPtr) \ @@ -3527,7 +3545,7 @@ typedef const char* TclDTraceStr; * The PURIFY mode is like the regular mode, but instead of doing block * Tcl_Obj allocation and keeping a freed list for efficiency, it always * allocates and frees a single Tcl_Obj so that tools like Purify can better - * track memory leaks + * track memory leaks. */ # define TclAllocObjStorageEx(interp, objPtr) \ @@ -4008,7 +4026,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, /* *---------------------------------------------------------------- - * Inline version of Tcl_GetCurrentNamespace and Tcl_GetGlobalNamespace + * Inline version of Tcl_GetCurrentNamespace and Tcl_GetGlobalNamespace. */ #define TclGetCurrentNamespace(interp) \ @@ -4052,11 +4070,11 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, ? 1 : 0))) /* - * Compile-time assertions: these produce a compile time error if - * the expression is not known to be true at compile time. - * If the assertion is known to be false, the compiler (or optimizer?) will - * error out with "division by zero". If the assertion cannot be evaluated at - * compile time, the compiler will error out with "non-static initializer". + * Compile-time assertions: these produce a compile time error if the + * expression is not known to be true at compile time. If the assertion is + * known to be false, the compiler (or optimizer?) will error out with + * "division by zero". If the assertion cannot be evaluated at compile time, + * the compiler will error out with "non-static initializer". * * Adapted with permission from * http://www.pixelbeat.org/programming/gcc/static_assert.html @@ -4139,24 +4157,17 @@ typedef struct TEOV_callback { #define TOP_CB(iPtr) (((Interp *)(iPtr))->execEnvPtr->callbackPtr) /* - * Inline version of Tcl_NRAddCallback + * Inline version of Tcl_NRAddCallback. */ -#define TclNRAddCallback( \ - interp, \ - postProcPtr, \ - data0, \ - data1, \ - data2, \ - data3) \ - { \ +#define TclNRAddCallback(interp,postProcPtr,data0,data1,data2,data3) { \ TEOV_callback *callbackPtr; \ TCLNR_ALLOC((interp), (callbackPtr)); \ callbackPtr->procPtr = (postProcPtr); \ - callbackPtr->data[0] = (ClientData)(data0);\ - callbackPtr->data[1] = (ClientData)(data1);\ - callbackPtr->data[2] = (ClientData)(data2);\ - callbackPtr->data[3] = (ClientData)(data3);\ + callbackPtr->data[0] = (ClientData)(data0); \ + callbackPtr->data[1] = (ClientData)(data1); \ + callbackPtr->data[2] = (ClientData)(data2); \ + callbackPtr->data[3] = (ClientData)(data3); \ callbackPtr->nextPtr = TOP_CB(interp); \ TOP_CB(interp) = callbackPtr; \ } -- cgit v0.12 From 6fc7bc4022917dd2a594eb838f0b92903fca7061 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Jan 2009 10:08:10 +0000 Subject: Formatting improvements (comments, whitespace) --- generic/tclIOUtil.c | 60 ++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index b62fee3..6cc9fd2 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.161 2009/01/05 09:48:11 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.162 2009/01/06 10:08:10 dkf Exp $ */ #include "tclInt.h" @@ -141,7 +141,7 @@ const Tcl_Filesystem tclNativeFilesystem = { &TclpObjCopyDirectory, &TclpObjLstat, &TclpDlopen, - /* Needs a cast since we're using version_2 */ + /* Needs a cast since we're using version_2. */ (Tcl_FSGetCwdProc *) &TclpGetNativeCwd, &TclpObjChdir }; @@ -251,10 +251,10 @@ Tcl_Stat( * Tcl_WideInt. */ - tmp1 = (Tcl_WideInt) buf.st_ino; - tmp2 = (Tcl_WideInt) buf.st_size; + tmp1 = (Tcl_WideInt) buf.st_ino; + tmp2 = (Tcl_WideInt) buf.st_size; #ifdef HAVE_ST_BLOCKS - tmp3 = (Tcl_WideInt) buf.st_blocks; + tmp3 = (Tcl_WideInt) buf.st_blocks; #endif if (OUT_OF_URANGE(tmp1) || OUT_OF_RANGE(tmp2) @@ -389,7 +389,7 @@ Tcl_EvalFile( } /* - * Now move on to the basic filesystem implementation + * Now move on to the basic filesystem implementation. */ static void @@ -722,7 +722,7 @@ TclFinalizeFilesystem(void) /* * Remove all filesystems, freeing any allocated memory that is no longer - * needed + * needed. */ fsRecPtr = filesystemList; @@ -820,7 +820,7 @@ TclResetFilesystem(void) int Tcl_FSRegister( - ClientData clientData, /* Client specific data for this fs */ + ClientData clientData, /* Client specific data for this fs. */ const Tcl_Filesystem *fsPtr)/* The filesystem record for the new fs. */ { FilesystemRecord *newFilesystemPtr; @@ -994,7 +994,7 @@ Tcl_FSUnregister( int Tcl_FSMatchInDirectory( Tcl_Interp *interp, /* Interpreter to receive error messages, but - * may be NULL. */ + * may be NULL. */ Tcl_Obj *resultPtr, /* List object to receive results. */ Tcl_Obj *pathPtr, /* Contains path to directory to search. */ const char *pattern, /* Pattern to match against. */ @@ -1043,7 +1043,7 @@ Tcl_FSMatchInDirectory( /* * If the path isn't empty, we have no idea how to match files in a - * directory which belongs to no known filesystem + * directory which belongs to no known filesystem. */ if (pathPtr != NULL && TclGetString(pathPtr)[0] != '\0') { @@ -1119,7 +1119,7 @@ static void FsAddMountsToGlobResult( Tcl_Obj *resultPtr, /* The current list of matching paths; must * not be shared! */ - Tcl_Obj *pathPtr, /* The directory in question */ + Tcl_Obj *pathPtr, /* The directory in question. */ const char *pattern, /* Pattern to match against. */ Tcl_GlobTypeData *types) /* Object containing list of acceptable types. * May be NULL. In particular the directory @@ -1160,7 +1160,7 @@ FsAddMountsToGlobResult( Tcl_ListObjReplace(NULL, resultPtr, j, 1, 0, NULL); gLength--; } - break; /* Break out of for loop */ + break; /* Break out of for loop. */ } } if (!found && dir) { @@ -1345,8 +1345,8 @@ Tcl_FSData( int TclFSNormalizeToUniquePath( Tcl_Interp *interp, /* Used for error messages. */ - Tcl_Obj *pathPtr, /* The path to normalize in place */ - int startAt, /* Start at this char-offset */ + Tcl_Obj *pathPtr, /* The path to normalize in place. */ + int startAt, /* Start at this char-offset. */ ClientData *clientDataPtr) /* If we generated a complete normalized path * for a given filesystem, we can optionally * return an fs-specific clientdata here. */ @@ -1472,7 +1472,7 @@ TclGetOpenModeEx( * EOF during the opening of the file. */ int *binaryPtr) /* Set this to 1 if the caller should * configure the opened channel for binary - * operations */ + * operations. */ { int mode, modeArgc, c, i, gotRW; const char **modeArgv, *flag; @@ -1900,7 +1900,7 @@ EvalFileCallback( int length; const char *pathString = Tcl_GetStringFromObj(pathPtr, &length); - int limit = 150; + const int limit = 150; int overflow = (length > limit); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( @@ -2224,7 +2224,8 @@ Tcl_FSOpenFileChannel( int Tcl_FSUtime( - Tcl_Obj *pathPtr, /* File to change access/modification times */ + Tcl_Obj *pathPtr, /* File to change access/modification + * times. */ struct utimbuf *tval) /* Structure containing access/modification * times to use. Should not be modified. */ { @@ -2586,7 +2587,10 @@ Tcl_FSGetCwd( if (retCd != NULL) { Tcl_Obj *norm; - /* Looks like a new current directory */ + /* + * Looks like a new current directory. + */ + retVal = fsRecPtr->fsPtr->internalToNormalizedProc(retCd); Tcl_IncrRefCount(retVal); norm = TclFSNormalizeAbsolutePath(interp,retVal,NULL); @@ -2826,7 +2830,7 @@ Tcl_FSChdir( * If the file can be stat'ed and is a directory and is readable, * then we can chdir. If any of these actions fail, then * 'Tcl_SetErrno()' should automatically have been called to set - * an appropriate error code + * an appropriate error code. */ if ((Tcl_FSStat(pathPtr, &buf) == 0) && (S_ISDIR(buf.st_mode)) @@ -3331,7 +3335,7 @@ TclLoadFile( /* * This function used to be in the platform specific directories, but it has - * now been made to work cross-platform + * now been made to work cross-platform. */ int @@ -3501,9 +3505,9 @@ TclFSUnloadTempFile( Tcl_Obj * Tcl_FSLink( - Tcl_Obj *pathPtr, /* Path of file to readlink or link */ - Tcl_Obj *toPtr, /* NULL or path to be linked to */ - int linkAction) /* Action to perform */ + Tcl_Obj *pathPtr, /* Path of file to readlink or link. */ + Tcl_Obj *toPtr, /* NULL or path to be linked to. */ + int linkAction) /* Action to perform. */ { const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); @@ -3739,7 +3743,7 @@ Tcl_FSSplitPath( return result; } -/* Simple helper function */ +/* Simple helper function. */ Tcl_Obj * TclFSInternalToNormalized( const Tcl_Filesystem *fromFilesystem, @@ -3784,7 +3788,7 @@ TclFSInternalToNormalized( Tcl_PathType TclGetPathType( - Tcl_Obj *pathPtr, /* Path to determine type for */ + Tcl_Obj *pathPtr, /* Path to determine type for. */ const Tcl_Filesystem **filesystemPtrPtr, /* If absolute path and this is not NULL, then * set to the filesystem which claims this @@ -3839,8 +3843,8 @@ TclGetPathType( Tcl_PathType TclFSNonnativePathType( - const char *path, /* Path to determine type for */ - int pathLen, /* Length of the path */ + const char *path, /* Path to determine type for. */ + int pathLen, /* Length of the path. */ const Tcl_Filesystem **filesystemPtrPtr, /* If absolute path and this is not NULL, then * set to the filesystem which claims this @@ -4047,7 +4051,7 @@ Tcl_FSCopyFile( int TclCrossFilesystemCopy( - Tcl_Interp *interp, /* For error messages */ + Tcl_Interp *interp, /* For error messages. */ Tcl_Obj *source, /* Pathname of file to be copied (UTF-8). */ Tcl_Obj *target) /* Pathname of file to copy to (UTF-8). */ { -- cgit v0.12 From a4a1ae8979a30624c2e3594cdf689a22146caca1 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Jan 2009 10:20:54 +0000 Subject: Fix [Bug 2481109] --- ChangeLog | 5 +++++ generic/tclOO.c | 8 +++++--- tests/oo.test | 11 ++++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8825ec2..ec4026d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Donal K. Fellows + + * generic/tclOO.c (TclNRNewObjectInstance, Tcl_NewObjectInstance): + Perform search for existing commands in right context. [Bug 2481109] + 2009-01-05 Donal K. Fellows * generic/tclCmdMZ.c (TclNRSourceObjCmd): Make implementation of the diff --git a/generic/tclOO.c b/generic/tclOO.c index e161563..430e1cc 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.18 2008/10/31 22:08:32 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.19 2009/01/06 10:20:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1241,7 +1241,8 @@ Tcl_NewObjectInstance( * that's not allowed. */ - if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, 0)) { + if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, + TCL_NAMESPACE_ONLY)) { Tcl_AppendResult(interp, "can't create object \"", nameStr, "\": command already exists with that name", NULL); return NULL; @@ -1333,7 +1334,8 @@ TclNRNewObjectInstance( * that's not allowed. */ - if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, 0)) { + if (nameStr && Tcl_FindCommand(interp, nameStr, NULL, + TCL_NAMESPACE_ONLY)) { Tcl_AppendResult(interp, "can't create object \"", nameStr, "\": command already exists with that name", NULL); return TCL_ERROR; diff --git a/tests/oo.test b/tests/oo.test index 5c105b8..07ceaef 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.17 2008/11/01 08:05:49 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.18 2009/01/06 10:20:54 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -36,7 +36,7 @@ proc initInterpreter name { $name eval [list package ifneeded TclOO [package provide TclOO] \ [package ifneeded TclOO [package provide TclOO]]] } - + test oo-0.1 {basic test of OO's ability to clean up its initial state} { interp create t initInterpreter t @@ -204,6 +204,11 @@ test oo-1.16 {basic test of OO functionality: abbreviating} -setup { oo::objdefine o forw a b info object forw o a } -result b +test oo-1.17 {basic test of OO functionality: Bug 2481109} -body { + namespace eval ::foo {oo::object create lreplace} +} -cleanup { + namespace delete ::foo +} -result ::foo::lreplace test oo-2.1 {basic test of OO functionality: constructor} -setup { # This is a bit complex because it needs to run in a sub-interp as @@ -2110,7 +2115,7 @@ test oo-27.11 {variables declaration - no instance var leaks with class resolver inst1 step list [inst1 value] [inst2 value] } -result {3 2} - + cleanupTests return -- cgit v0.12 From a75fc7d7f1485fbc0cd498df85f8b6db86167a21 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Jan 2009 14:30:19 +0000 Subject: Fix [Bug 2489836] --- ChangeLog | 3 +++ generic/tclOOInfo.c | 10 +++++++--- tests/oo.test | 18 +++++++++++++++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec4026d..d24b13e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-01-06 Donal K. Fellows + * generic/tclOOInfo.c (InfoObjectMethodsCmd,InfoClassMethodsCmd): Only + delete pointers that were actually allocated! [Bug 2489836] + * generic/tclOO.c (TclNRNewObjectInstance, Tcl_NewObjectInstance): Perform search for existing commands in right context. [Bug 2481109] diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index 583907b..44c5399 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.10 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.11 2009/01/06 14:30:19 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -586,7 +586,9 @@ InfoObjectMethodsCmd( Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj(names[i], -1)); } - ckfree((char *) names); + if (numNames > 0) { + ckfree((char *) names); + } } else if (oPtr->methodsPtr) { FOREACH_HASH(namePtr, mPtr, oPtr->methodsPtr) { if (mPtr->typePtr != NULL && (mPtr->flags & flag) == flag) { @@ -1104,7 +1106,9 @@ InfoClassMethodsCmd( Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj(names[i], -1)); } - ckfree((char *) names); + if (numNames > 0) { + ckfree((char *) names); + } } else { FOREACH_HASH_DECLS; diff --git a/tests/oo.test b/tests/oo.test index 07ceaef..0505ddd 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.18 2009/01/06 10:20:54 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.19 2009/01/06 14:30:19 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1258,6 +1258,14 @@ test oo-16.11 {OO: object introspection} -setup { } -cleanup { foo destroy } -result {{boo destroy spong} {boo destroy eval spong unknown variable varname}} +test oo-16.12 {OO: object introspection} -setup { + oo::object create foo +} -cleanup { + rename foo {} +} -body { + oo::objdefine foo unexport {*}[info object methods foo -all] + info object methods foo -all +} -result {} test oo-17.1 {OO: class introspection} -body { info class @@ -1326,6 +1334,14 @@ test oo-17.9 {OO: class introspection} -setup { } -cleanup { foo destroy } -result {{bar boo destroy} {bar boo destroy eval unknown variable varname}} +test oo-17.10 {OO: class introspection} -setup { + oo::class create foo +} -cleanup { + rename foo {} +} -body { + oo::define foo unexport {*}[info class methods foo -all] + info class methods foo -all +} -result {} test oo-18.1 {OO: define command support} { list [catch {oo::define oo::object {error foo}} msg] $msg $errorInfo -- cgit v0.12 From 3532ac7221f55219a73fb4fc3ed74a8b34b3a37a Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Jan 2009 15:24:49 +0000 Subject: Fix [Bug 2006879] --- ChangeLog | 2 ++ tests/expr.test | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d24b13e..2023ea8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-01-06 Donal K. Fellows + * tests/expr.test: Eliminate non-ASCII char. [Bug 2006879] + * generic/tclOOInfo.c (InfoObjectMethodsCmd,InfoClassMethodsCmd): Only delete pointers that were actually allocated! [Bug 2489836] diff --git a/tests/expr.test b/tests/expr.test index e51e4c1..d9612ac 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.73 2008/10/05 21:27:07 kennykb Exp $ +# RCS: @(#) $Id: expr.test,v 1.74 2009/01/06 15:24:49 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -355,7 +355,7 @@ test expr-8.11 {CompileEqualityExpr: error compiling equality arm} -body { expr 2!=x } -returnCodes error -match glob -result * test expr-8.12 {CompileBitAndExpr: equality expr} {expr {"a"eq"a"}} 1 -test expr-8.13 {CompileBitAndExpr: equality expr} {expr {"\374" eq "ü"}} 1 +test expr-8.13 {CompileBitAndExpr: equality expr} {expr {"\374" eq [set s \u00fc]}} 1 test expr-8.14 {CompileBitAndExpr: equality expr} {expr 3eq2} 0 test expr-8.15 {CompileBitAndExpr: equality expr} {expr 2.0eq2} 0 test expr-8.16 {CompileBitAndExpr: equality expr} {expr 3.2ne2.2} 1 -- cgit v0.12 From 1543ed93f676abd629ea913bfde2e73f180fe7af Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Jan 2009 16:03:46 +0000 Subject: Corrected twiddling in internals of dictionaries so that literals can't get destroyed. --- ChangeLog | 3 +++ generic/tclDictObj.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2023ea8..9e4959e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-01-06 Donal K. Fellows + * generic/tclDictObj.c (DictIncrCmd): Corrected twiddling in internals + of dictionaries so that literals can't get destroyed. + * tests/expr.test: Eliminate non-ASCII char. [Bug 2006879] * generic/tclOOInfo.c (InfoObjectMethodsCmd,InfoClassMethodsCmd): Only diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index f895555..666cf46 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.72 2008/12/10 11:15:05 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.73 2009/01/06 16:03:47 dkf Exp $ */ #include "tclInt.h" @@ -2137,10 +2137,11 @@ DictIncrCmd( */ char *saved = dictPtr->bytes; + Tcl_Obj *oldPtr = dictPtr; dictPtr->bytes = NULL; dictPtr = Tcl_DuplicateObj(dictPtr); - dictPtr->bytes = saved; + oldPtr->bytes = saved; } if (valuePtr == NULL) { /* -- cgit v0.12 From 0d8f0efadcd9ffe199a532212c3e34cc1081c50f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 6 Jan 2009 17:20:52 +0000 Subject: * tests/stringObj.test: Revise tests that demand a NULL Tcl_ObjType in certain values to construct those values with [testdstring] so there's no lack of robustness depending on the shimmer history of shared literals. --- ChangeLog | 7 +++++++ tests/stringObj.test | 39 ++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e4959e..3fee4f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-06 Don Porter + + * tests/stringObj.test: Revise tests that demand a NULL Tcl_ObjType + in certain values to construct those values with [testdstring] so + there's no lack of robustness depending on the shimmer history of + shared literals. + 2009-01-06 Donal K. Fellows * generic/tclDictObj.c (DictIncrCmd): Corrected twiddling in internals diff --git a/tests/stringObj.test b/tests/stringObj.test index 90ec9c3..c215abe 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringObj.test,v 1.16 2004/05/19 20:15:32 dkf Exp $ +# RCS: @(#) $Id: stringObj.test,v 1.17 2009/01/06 17:20:52 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -20,6 +20,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testobj [llength [info commands testobj]] +testConstraint testdstring [llength [info commands testdstring]] test stringObj-1.1 {string type registration} testobj { set t [testobj types] @@ -225,9 +226,11 @@ test stringObj-8.5 {DupUnicodeInternalRep, all byte-size chars} testobj { [set y] [testobj objtype $x] [testobj objtype $y] } {string string abcdefghijkl abcdefghi string string} -test stringObj-9.1 {TclAppendObjToObj, mixed src & dest} testobj { +test stringObj-9.1 {TclAppendObjToObj, mixed src & dest} {testobj testdstring} { set x abcï¿®ghi - set y ®¿ï + testdstring free + testdstring append ®¿ï -1 + set y [testdstring get] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] @@ -240,16 +243,20 @@ test stringObj-9.2 {TclAppendObjToObj, mixed src & dest} testobj { } {string abcï¿®ghiabcï¿®ghi string\ abcï¿®ghiabcï¿®ghiabcï¿®ghiabcï¿®ghi\ string} -test stringObj-9.3 {TclAppendObjToObj, mixed src & 1-byte dest} testobj { +test stringObj-9.3 {TclAppendObjToObj, mixed src & 1-byte dest} {testobj testdstring} { set x abcdefghi - set y ®¿ï + testdstring free + testdstring append ®¿ï -1 + set y [testdstring get] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] } {string none abcdefghi®¿ï ®¿ï string none} -test stringObj-9.4 {TclAppendObjToObj, 1-byte src & dest} testobj { +test stringObj-9.4 {TclAppendObjToObj, 1-byte src & dest} {testobj testdstring} { set x abcdefghi - set y jkl + testdstring free + testdstring append jkl -1 + set y [testdstring get] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] @@ -261,9 +268,11 @@ test stringObj-9.5 {TclAppendObjToObj, 1-byte src & dest} testobj { [append x $x] [testobj objtype $x] } {string abcdefghiabcdefghi string abcdefghiabcdefghiabcdefghiabcdefghi\ string} -test stringObj-9.6 {TclAppendObjToObj, 1-byte src & mixed dest} testobj { +test stringObj-9.6 {TclAppendObjToObj, 1-byte src & mixed dest} {testobj testdstring} { set x abcï¿®ghi - set y jkl + testdstring free + testdstring append jkl -1 + set y [testdstring get] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] @@ -312,18 +321,22 @@ test stringObj-9.11 {TclAppendObjToObj, mixed src & 1-byte dest index check} tes set q } {a b c d e f a ü b å c ï} -test stringObj-10.1 {Tcl_GetRange with all byte-size chars} testobj { - set x "abcdef" +test stringObj-10.1 {Tcl_GetRange with all byte-size chars} {testobj testdstring} { + testdstring free + testdstring append abcdef -1 + set x [testdstring get] list [testobj objtype $x] [set y [string range $x 1 end-1]] \ [testobj objtype $x] [testobj objtype $y] } [list none bcde string string] -test stringObj-10.2 {Tcl_GetRange with some mixed width chars} testobj { +test stringObj-10.2 {Tcl_GetRange with some mixed width chars} {testobj testdstring} { # Because this test does not use \uXXXX notation below instead of # hardcoding the values, it may fail in multibyte locales. However, # we need to test that the parser produces untyped objects even when there # are high-ASCII characters in the input (like "ï"). I don't know what # else to do but inline those characters here. - set x "abcïïdef" + testdstring free + testdstring append "abcïïdef" -1 + set x [testdstring get] list [testobj objtype $x] [set y [string range $x 1 end-1]] \ [testobj objtype $x] [testobj objtype $y] } [list none "bc\u00EF\u00EFde" string string] -- cgit v0.12 From 71959308ac3589a49cde993adf47ef762cf8d8b9 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 Jan 2009 11:58:07 +0000 Subject: Narrow the focus of a failing test so that it succeeds (by only testing that which is supposed to be tested...) --- ChangeLog | 7 +++++++ tests/oo.test | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3fee4f9..0010208 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-07 Donal K. Fellows + + * tests/oo.test (oo-22.1): Adjusted test to be less dependent on the + specifics of how [info frame] reports general frame information, and + instead to focus on what methods add to it; that's really what the + test is about anyway. + 2009-01-06 Don Porter * tests/stringObj.test: Revise tests that demand a NULL Tcl_ObjType diff --git a/tests/oo.test b/tests/oo.test index 0505ddd..b7029ea 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.19 2009/01/06 14:30:19 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.20 2009/01/07 11:58:08 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1810,7 +1810,7 @@ test oo-22.1 {OO and info frame} -setup { list [i level] [i frames] [dict get [c frame] object] } -cleanup { c destroy -} -result {1 {{type source line * file * cmd {info frame 0} method frames class ::c level 0} {type source line * file * cmd {info frame 0} method frames object ::i level 0}} ::c} +} -result {1 {{* cmd {info frame 0} method frames class ::c level 0} {* cmd {info frame 0} method frames object ::i level 0}} ::c} # Prove that the issue in [Bug 1865054] isn't an issue any more test oo-23.1 {Self-like derivation; complex case!} -setup { -- cgit v0.12 From e241610f648c4f00d9f6b5bff043a865ba8f0054 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 Jan 2009 13:50:03 +0000 Subject: Added more examples. [Tk Bug 2491235] --- ChangeLog | 2 ++ doc/dict.n | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0010208..7053a12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-01-07 Donal K. Fellows + * doc/dict.n: Added more examples. [Tk Bug 2491235] + * tests/oo.test (oo-22.1): Adjusted test to be less dependent on the specifics of how [info frame] reports general frame information, and instead to focus on what methods add to it; that's really what the diff --git a/doc/dict.n b/doc/dict.n index 4bbfedc..2dc4db3 100644 --- a/doc/dict.n +++ b/doc/dict.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dict.n,v 1.20 2008/12/10 11:15:05 dkf Exp $ +'\" RCS: @(#) $Id: dict.n,v 1.21 2009/01/07 13:50:03 dkf Exp $ '\" .so man.macros .TH dict n 8.5 Tcl "Tcl Built-In Commands" @@ -256,6 +256,32 @@ and are equivalent dictionaries (with different string representations). .SH EXAMPLES .PP +Basic dictionary usage: +.PP +.CS +# Make a dictionary to map extensions to descriptions +set filetypes [\fBdict create\fR .txt "Text File" .tcl "Tcl File"] + +# Add/update the dictionary +\fBdict set\fR filetypes .tcl "Tcl Script" +\fBdict set\fR filetypes .tm "Tcl Module" +\fBdict set\fR filetypes .gif "GIF Image" +\fBdict set\fR filetypes .png "PNG Image" + +# Simple read from the dictionary +set ext ".tcl" +set desc [\fBdict get\fR $filetypes $ext] +puts "$ext is for a $desc" + +# Somewhat more complex, with existence test +foreach filename [glob *] { + set ext [file extension $filename] + if {[\fBdict exists\fR $filetypes $ext]} { + puts "$filename is a [\fBdict get\fR $filetypes $ext]" + } +} +.CE +.PP Constructing and using nested dictionaries: .PP .CS -- cgit v0.12 From a23a10f4460267a77fa20b723239edaf3a5ce877 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 8 Jan 2009 16:41:34 +0000 Subject: Generate errorcodes for more cases. --- ChangeLog | 8 +++++ generic/tclDictObj.c | 14 ++++++-- generic/tclIndexObj.c | 3 +- generic/tclListObj.c | 7 +++- generic/tclObj.c | 6 +++- generic/tclStrToD.c | 8 +++-- generic/tclUtil.c | 8 ++++- generic/tclVar.c | 23 ++++++++++-- tests/cmdAH.test | 98 +++++++++++++++++---------------------------------- tests/ioCmd.test | 43 +++++++++++----------- tests/join.test | 17 +++++---- tests/mathop.test | 12 +++---- tests/rename.test | 79 +++++++++++++++++++++-------------------- tests/split.test | 24 +++++++------ 14 files changed, 191 insertions(+), 159 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7053a12..032f976 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-08 Donal K. Fellows + + * generic/tclDictObj.c, generic/tclIndexObj.c, generic/tclListObj.c, + * generic/tclObj.c, generic/tclStrToD.c, generic/tclUtil.c, + * generic/tclVar.c: Generate errorcodes for the error cases which + approximate to "I can't interpret that string as one of those" and + "You gave me the wrong number of arguments". + 2009-01-07 Donal K. Fellows * doc/dict.n: Added more examples. [Tk Bug 2491235] diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 666cf46..1212dac 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.73 2009/01/06 16:03:47 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.74 2009/01/08 16:41:34 dkf Exp $ */ #include "tclInt.h" @@ -592,6 +592,7 @@ SetDictFromAny( if (interp != NULL) { Tcl_SetResult(interp, "missing value to go with key", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); } return TCL_ERROR; } @@ -644,6 +645,9 @@ SetDictFromAny( result = TclFindElement(interp, p, lenRemain, &elemStart, &nextElem, &elemSize, &hasBrace); if (result != TCL_OK) { + if (interp != NULL) { + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); + } goto errorExit; } if (elemStart >= limit) { @@ -676,6 +680,9 @@ SetDictFromAny( result = TclFindElement(interp, p, lenRemain, &elemStart, &nextElem, &elemSize, &hasBrace); if (result != TCL_OK) { + if (interp != NULL) { + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); + } TclDecrRefCount(keyPtr); goto errorExit; } @@ -690,7 +697,7 @@ SetDictFromAny( s = ckalloc((unsigned) elemSize + 1); if (hasBrace) { - memcpy((void *) s, (void *) elemStart, (size_t) elemSize); + memcpy(s, elemStart, (size_t) elemSize); s[elemSize] = 0; } else { elemSize = TclCopyAndCollapse(elemSize, elemStart, s); @@ -712,7 +719,7 @@ SetDictFromAny( TclDecrRefCount(discardedValue); } Tcl_SetHashValue(hPtr, valuePtr); - Tcl_IncrRefCount(valuePtr); /* since hash now holds ref to it */ + Tcl_IncrRefCount(valuePtr); /* Since hash now holds ref to it. */ } installHash: @@ -733,6 +740,7 @@ SetDictFromAny( missingKey: if (interp != NULL) { Tcl_SetResult(interp, "missing value to go with key", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "DICTIONARY", NULL); } TclDecrRefCount(keyPtr); result = TCL_ERROR; diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 0915092..db2c0d1 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.48 2008/12/15 17:28:54 das Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.49 2009/01/08 16:41:34 dkf Exp $ */ #include "tclInt.h" @@ -1034,6 +1034,7 @@ Tcl_WrongNumArgs( Tcl_AppendStringsToObj(objPtr, message, NULL); } Tcl_AppendStringsToObj(objPtr, "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); Tcl_SetObjResult(interp, objPtr); #undef MAY_QUOTE_WORD #undef AFTER_FIRST_WORD diff --git a/generic/tclListObj.c b/generic/tclListObj.c index b8f9da7..be18699 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.55 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.56 2009/01/08 16:41:34 dkf Exp $ */ #include "tclInt.h" @@ -1705,6 +1705,7 @@ SetListFromAny( Tcl_SetResult(interp, "insufficient memory to allocate list working space", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); return TCL_ERROR; } listRepPtr->elemCount = 2 * size; @@ -1764,6 +1765,7 @@ SetListFromAny( if (!listRepPtr) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "Not enough memory to allocate the list internal rep", -1)); + Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); return TCL_ERROR; } elemPtrs = &listRepPtr->elements; @@ -1779,6 +1781,9 @@ SetListFromAny( Tcl_DecrRefCount(elemPtr); } ckfree((char *) listRepPtr); + if (interp != NULL) { + Tcl_SetErrorCode(interp, "TCL", "VALUE", "LIST", NULL); + } return result; } if (elemStart >= limit) { diff --git a/generic/tclObj.c b/generic/tclObj.c index ae3f909..e73fa17 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.145 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.146 2009/01/08 16:41:34 dkf Exp $ */ #include "tclInt.h" @@ -1411,6 +1411,7 @@ SetBooleanFromAny( Tcl_AppendLimitedToObj(msg, str, length, 50, ""); Tcl_AppendToObj(msg, "\"", -1); Tcl_SetObjResult(interp, msg); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "BOOLEAN", NULL); } return TCL_ERROR; } @@ -2192,6 +2193,7 @@ Tcl_GetLongFromObj( Tcl_AppendObjToObj(msg, objPtr); Tcl_AppendToObj(msg, "\"", -1); Tcl_SetObjResult(interp, msg); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); } return TCL_ERROR; } @@ -2494,6 +2496,7 @@ Tcl_GetWideIntFromObj( Tcl_AppendObjToObj(msg, objPtr); Tcl_AppendToObj(msg, "\"", -1); Tcl_SetObjResult(interp, msg); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); } return TCL_ERROR; } @@ -2825,6 +2828,7 @@ GetBignumFromObj( Tcl_AppendObjToObj(msg, objPtr); Tcl_AppendToObj(msg, "\"", -1); Tcl_SetObjResult(interp, msg); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL); } return TCL_ERROR; } diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 8eec7b4..7664ebd 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.35 2008/12/10 18:21:47 ferrieux Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.36 2009/01/08 16:41:34 dkf Exp $ * *---------------------------------------------------------------------- */ @@ -90,7 +90,8 @@ static int maxpow10_wide; /* The powers of ten that can be represented * exactly as wide integers. */ static Tcl_WideUInt *pow10_wide; #define MAXPOW 22 -static double pow10vals[MAXPOW+1]; /* The powers of ten that can be represented +static double pow10vals[MAXPOW+1]; + /* The powers of ten that can be represented * exactly as IEEE754 doubles. */ static int mmaxpow; /* Largest power of ten that can be * represented exactly in a 'double'. */ @@ -1161,6 +1162,7 @@ TclParseNumber( Tcl_AppendToObj(msg, " (looks like invalid octal number)", -1); } Tcl_SetObjResult(interp, msg); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", NULL); } } @@ -1339,7 +1341,7 @@ MakeLowPrecisionDouble( * without special handling. */ - retval = (double)(Tcl_WideInt)significand * pow10vals[ exponent ]; + retval = (double)(Tcl_WideInt)significand * pow10vals[exponent]; goto returnValue; } else { int diff = DBL_DIG - numSigDigs; diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 3b8ddf5..bc189c0 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.107 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.108 2009/01/08 16:41:34 dkf Exp $ */ #include "tclInt.h" @@ -454,6 +454,9 @@ Tcl_SplitList( &elSize, &brace); length -= (list - prevList); if (result != TCL_OK) { + if (interp != NULL) { + Tcl_SetErrorCode(interp, "TCL", "VALUE", "LIST", NULL); + } ckfree((char *) argv); return result; } @@ -2634,6 +2637,7 @@ TclGetIntForIndex( bytes += 4; } TclCheckBadOctal(interp, bytes); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); } return TCL_ERROR; @@ -2723,6 +2727,7 @@ SetEndOffsetFromAny( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "bad index \"", bytes, "\": must be end?[+-]integer?", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); } return TCL_ERROR; } @@ -2757,6 +2762,7 @@ SetEndOffsetFromAny( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "bad index \"", bytes, "\": must be end?[+-]integer?", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); } return TCL_ERROR; } diff --git a/generic/tclVar.c b/generic/tclVar.c index 57607d3..dad0d1a 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.173 2008/12/17 16:47:38 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.174 2009/01/08 16:41:34 dkf Exp $ */ #include "tclInt.h" @@ -612,6 +612,7 @@ TclObjLookupVarEx( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, noSuchVar, -1); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "VARNAME", NULL); } return NULL; } @@ -644,6 +645,8 @@ TclObjLookupVarEx( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, needArray, -1); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "VARNAME", + NULL); } return NULL; } @@ -707,6 +710,7 @@ TclObjLookupVarEx( if (varPtr == NULL) { if ((errMsg != NULL) && (flags & TCL_LEAVE_ERR_MSG)) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, errMsg, -1); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } if (newPart2) { Tcl_DecrRefCount(part2Ptr); @@ -764,6 +768,7 @@ TclObjLookupVarEx( part1 = TclGetString(part1Ptr); TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, "Cached variable reference is NULL.", -1); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } return NULL; } @@ -968,9 +973,13 @@ TclLookupSimpleVar( flags, &varNsPtr, &dummy1Ptr, &dummy2Ptr, &tail); if (varNsPtr == NULL) { *errMsgPtr = badNamespace; + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + NULL); return NULL; } else if (tail == NULL) { *errMsgPtr = missingName; + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + NULL); return NULL; } if (tail != varName) { @@ -993,6 +1002,7 @@ TclLookupSimpleVar( } } else { /* Var wasn't found and not to create it. */ *errMsgPtr = noSuchVar; + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); return NULL; } } @@ -1029,6 +1039,7 @@ TclLookupSimpleVar( } if (varPtr == NULL) { *errMsgPtr = noSuchVar; + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } } } @@ -1120,6 +1131,7 @@ TclLookupArrayElement( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, danglingVar, index); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } return NULL; } @@ -1138,6 +1150,7 @@ TclLookupArrayElement( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, needArray, index); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } return NULL; } @@ -1433,6 +1446,7 @@ TclPtrGetVar( */ errorReturn: + Tcl_SetErrorCode(interp, "TCL", "READ", "VARNAME", NULL); if (TclIsVarUndefined(varPtr)) { TclCleanupVar(varPtr, arrayPtr); } @@ -1921,6 +1935,9 @@ TclPtrSetVar( */ cleanup: + if (resultPtr == NULL) { + Tcl_SetErrorCode(interp, "TCL", "WRITE", "VARNAME", NULL); + } if (TclIsVarUndefined(varPtr)) { TclCleanupVar(varPtr, arrayPtr); } @@ -2221,6 +2238,7 @@ TclObjUnsetVar2( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "unset", ((arrayPtr == NULL) ? noSuchVar : noSuchElement), -1); + Tcl_SetErrorCode(interp, "TCL", "UNSET", "VARNAME", NULL); } } @@ -2360,7 +2378,7 @@ UnsetVarStruct( VarTrace *prevPtr = tracePtr; tracePtr = tracePtr->nextPtr; - Tcl_EventuallyFree((ClientData) prevPtr, TCL_DYNAMIC); + Tcl_EventuallyFree(prevPtr, TCL_DYNAMIC); } for (activePtr = iPtr->activeVarTracePtr; activePtr != NULL; activePtr = activePtr->nextPtr) { @@ -3628,6 +3646,7 @@ TclPtrObjMakeUpvar( if (TclIsVarLink(varPtr)) { Var *linkPtr = varPtr->value.linkPtr; + if (linkPtr == otherPtr) { return TCL_OK; } diff --git a/tests/cmdAH.test b/tests/cmdAH.test index da554ce..c179eb6 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -1,16 +1,16 @@ # The file tests the tclCmdAH.c file. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1996-1998 by Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.65 2008/12/01 15:22:55 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.66 2009/01/08 16:41:34 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -30,6 +30,27 @@ global env set cmdAHwd [pwd] catch {set platform [testgetplatform]} +proc waitForEvenSecondForFAT {} { + # Windows 9x uses filesystems (the FAT* family of FSes) without enough + # data in its timestamps for even per-second-accurate timings. :^( + # This procedure based on work by Helmut Giese + if { + [testConstraint win] && + [lindex [file system [temporaryDirectory]] 1] ne "NTFS" + } then { + # Assume non-NTFS means FAT{12,16,32} and hence in need of special + # help... + set start [clock seconds] + while {1} { + set now [clock seconds] + if {$now!=$start && !($now & 1)} { + break + } + after 50 + } + } +} + test cmdAH-0.1 {Tcl_BreakObjCmd, errors} -body { break foo } -returnCodes error -result {wrong # args: should be "break"} @@ -113,7 +134,6 @@ test cmdAH-2.6.2 {cd} -constraints {unix nonPortable} -setup { } -cleanup { cd $dir } -result {/} - test cmdAH-2.7 {Tcl_ConcatObjCmd} { concat } {} @@ -382,7 +402,6 @@ test cmdAH-8.46 {Tcl_FileObjCmd: dirname} { } {ok} # tail - test cmdAH-9.1 {Tcl_FileObjCmd: tail} -returnCodes error -body { file tail a b } -result {wrong # args: should be "file tail name"} @@ -531,7 +550,6 @@ test cmdAH-9.51 {Tcl_FileObjCmd: tail} testsetplatform { } bar # rootname - test cmdAH-10.1 {Tcl_FileObjCmd: rootname} -returnCodes error -body { file rootname a b } -result {wrong # args: should be "file rootname name"} @@ -632,7 +650,6 @@ foreach outer { {} a .a a. a.a } { } # extension - test cmdAH-11.1 {Tcl_FileObjCmd: extension} -returnCodes error -body { file extension a b } -result {wrong # args: should be "file extension name"} @@ -737,7 +754,6 @@ foreach {test onPlatform value result} { } # pathtype - test cmdAH-12.1 {Tcl_FileObjCmd: pathtype} -returnCodes error -body { file pathtype a b } -result {wrong # args: should be "file pathtype name"} @@ -755,7 +771,6 @@ test cmdAH-12.4 {Tcl_FileObjCmd: pathtype} testsetplatform { } volumerelative # split - test cmdAH-13.1 {Tcl_FileObjCmd: split} -returnCodes error -body { file split a b } -result {wrong # args: should be "file split name"} @@ -769,7 +784,6 @@ test cmdAH-13.3 {Tcl_FileObjCmd: split} testsetplatform { } {a b} # join - test cmdAH-14.1 {Tcl_FileObjCmd: join} testsetplatform { testsetplatform unix file join a @@ -784,7 +798,6 @@ test cmdAH-14.3 {Tcl_FileObjCmd: join} testsetplatform { } a/b/c/d # error handling of Tcl_TranslateFileName - test cmdAH-15.1 {Tcl_FileObjCmd} -constraints testsetplatform -body { testsetplatform unix file atime ~_bad_user @@ -793,10 +806,8 @@ test cmdAH-15.1 {Tcl_FileObjCmd} -constraints testsetplatform -body { catch {testsetplatform $platform} # readable - set gorpfile [makeFile abcde gorp.file] set dirfile [makeDirectory dir.file] - test cmdAH-16.1 {Tcl_FileObjCmd: readable} { -returnCodes error -body {file readable a b} @@ -816,7 +827,6 @@ test cmdAH-16.3 {Tcl_FileObjCmd: readable} { } # writable - test cmdAH-17.1 {Tcl_FileObjCmd: writable} { -returnCodes error -body {file writable a b} @@ -836,12 +846,10 @@ test cmdAH-17.3 {Tcl_FileObjCmd: writable} { } # executable - removeFile $gorpfile removeDirectory $dirfile set dirfile [makeDirectory dir.file] set gorpfile [makeFile abcde gorp.file] - test cmdAH-18.1 {Tcl_FileObjCmd: executable} -returnCodes error -body { file executable a b } -result {wrong # args: should be "file executable name"} @@ -881,7 +889,6 @@ set linkfile [file join [temporaryDirectory] link.file] file delete $linkfile # exists - test cmdAH-19.1 {Tcl_FileObjCmd: exists} -returnCodes error -body { file exists a b } -result {wrong # args: should be "file exists name"} @@ -900,7 +907,6 @@ test cmdAH-19.4 {Tcl_FileObjCmd: exists} { test cmdAH-19.5 {Tcl_FileObjCmd: exists} { file exists $subgorp } 1 - # nativename test cmdAH-19.6 {Tcl_FileObjCmd: nativename} -body { testsetplatform unix @@ -914,7 +920,6 @@ test cmdAH-19.7 {Tcl_FileObjCmd: nativename} -body { } -constraints testsetplatform -cleanup { testsetplatform $platform } -result {a\b} - test cmdAH-19.9 {Tcl_FileObjCmd: ~ : exists} { file exists ~nOsUcHuSeR } 0 @@ -922,11 +927,9 @@ test cmdAH-19.10 {Tcl_FileObjCmd: ~ : nativename} { # should probably be 0 in fact... catch {file nativename ~nOsUcHuSeR} } 1 - # The test below has to be done in /tmp rather than the current directory in # order to guarantee (?) a local file system: some NFS file systems won't do # the stuff below correctly. - test cmdAH-19.11 {Tcl_FileObjCmd: exists} -constraints {unix notRoot} -setup { file delete -force /tmp/tcl.foo.dir/file file delete -force /tmp/tcl.foo.dir @@ -948,8 +951,6 @@ removeFile $gorpfile set gorpfile [makeFile "Test string" gorp.file] catch {file attributes $gorpfile -permissions 0765} -# atime - # avoid problems with non-local filesystems if {[testConstraint unix] && [file exists /tmp]} { set file [makeFile "data" touch.me /tmp] @@ -957,6 +958,7 @@ if {[testConstraint unix] && [file exists /tmp]} { set file [makeFile "data" touch.me] } +# atime test cmdAH-20.1 {Tcl_FileObjCmd: atime} -returnCodes error -body { file atime a b c } -result {wrong # args: should be "file atime name ?time?"} @@ -1006,7 +1008,6 @@ if {[testConstraint unix] && [file exists /tmp]} { } # isdirectory - test cmdAH-21.1 {Tcl_FileObjCmd: isdirectory} -returnCodes error -body { file isdirectory a b } -result {wrong # args: should be "file isdirectory name"} @@ -1014,7 +1015,6 @@ test cmdAH-21.2 {Tcl_FileObjCmd: isdirectory} {file isdirectory $gorpfile} 0 test cmdAH-21.3 {Tcl_FileObjCmd: isdirectory} {file isdirectory $dirfile} 1 # isfile - test cmdAH-22.1 {Tcl_FileObjCmd: isfile} -returnCodes error -body { file isfile a b } -result {wrong # args: should be "file isfile name"} @@ -1023,7 +1023,6 @@ test cmdAH-22.3 {Tcl_FileObjCmd: isfile} {file isfile $dirfile} 0 # lstat and readlink: don't run these tests everywhere, since not all sites # will have symbolic links - catch {file link -symbolic $linkfile $gorpfile} test cmdAH-23.1 {Tcl_FileObjCmd: lstat} -returnCodes error -body { file lstat a @@ -1052,11 +1051,9 @@ test cmdAH-23.6 {Tcl_FileObjCmd: lstat errors} -setup { } -body { set x 44 list [catch {file lstat $gorpfile x} msg] $msg $errorCode -} -result {1 {can't set "x(dev)": variable isn't array} NONE} +} -result {1 {can't set "x(dev)": variable isn't array} {TCL LOOKUP VARNAME}} catch {unset stat} - # mkdir - set dirA [file join [temporaryDirectory] a] set dirB [file join [temporaryDirectory] a] test cmdAH-23.7 {Tcl_FileObjCmd: mkdir} -setup { @@ -1098,30 +1095,8 @@ test cmdAH-23.11 {Tcl_FileObjCmd: mkdir} { file mkdir } {} -# mtime - -proc waitForEvenSecondForFAT {} { - # Windows 9x uses filesystems (the FAT* family of FSes) without enough - # data in its timestamps for even per-second-accurate timings. :^( - # This procedure based on work by Helmut Giese - if { - [testConstraint win] - && [lindex [file system [temporaryDirectory]] 1] ne "NTFS" - } then { - # Assume non-NTFS means FAT{12,16,32} and hence in need of special - # help... - set start [clock seconds] - while {1} { - set now [clock seconds] - if {$now!=$start && !($now & 1)} { - break - } - after 50 - } - } -} set file [makeFile "data" touch.me] - +# mtime test cmdAH-24.1 {Tcl_FileObjCmd: mtime} -returnCodes error -body { file mtime a b c } -result {wrong # args: should be "file mtime name ?time?"} @@ -1160,8 +1135,7 @@ test cmdAH-24.3 {Tcl_FileObjCmd: mtime} -setup { [expr {[file atime $gorpfile] == $stat(atime)}] } -result {1 1} test cmdAH-24.4 {Tcl_FileObjCmd: mtime} { - list [catch {file mtime _bogus_} msg] [string tolower $msg] \ - $errorCode + list [catch {file mtime _bogus_} msg] [string tolower $msg] $errorCode } {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} test cmdAH-24.5 {Tcl_FileObjCmd: mtime} -setup { # Under Unix, use a file in /tmp to avoid clock skew due to NFS. On other @@ -1259,7 +1233,6 @@ test cmdAH-24.13 {Tcl_FileObjCmd: directory mtime} -setup { } -result {0 1} # owned - test cmdAH-25.1 {Tcl_FileObjCmd: owned} -returnCodes error -body { file owned a b } -result {wrong # args: should be "file owned name"} @@ -1279,7 +1252,6 @@ test cmdAH-25.3 {Tcl_FileObjCmd: owned} {unix notRoot} { } 0 # readlink - test cmdAH-26.1 {Tcl_FileObjCmd: readlink} -returnCodes error -body { file readlink a b } -result {wrong # args: should be "file readlink name"} @@ -1294,7 +1266,6 @@ test cmdAH-26.5 {Tcl_FileObjCmd: readlink errors} {win nonPortable} { } {1 {could not readlink "_bogus_": invalid argument} {POSIX EINVAL {invalid argument}}} # size - test cmdAH-27.1 {Tcl_FileObjCmd: size} -returnCodes error -body { file size a b } -result {wrong # args: should be "file size name"} @@ -1310,13 +1281,12 @@ test cmdAH-27.3 {Tcl_FileObjCmd: size} { list [catch {file size _bogus_} msg] [string tolower $msg] $errorCode } {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} -# stat - catch {testsetplatform $platform} removeFile $gorpfile set gorpfile [makeFile "Test string" gorp.file] catch {file attributes $gorpfile -permissions 0765} +# stat test cmdAH-28.1 {Tcl_FileObjCmd: stat} -returnCodes error -body { file stat _bogus_ } -result {wrong # args: should be "file stat name varName"} @@ -1402,7 +1372,6 @@ test cmdAH-28.12 {Tcl_FileObjCmd: stat} -setup { catch {unset stat} # type - test cmdAH-29.1 {Tcl_FileObjCmd: type} -returnCodes error -body { file size a b } -result {wrong # args: should be "file size name"} @@ -1442,7 +1411,6 @@ test cmdAH-29.5 {Tcl_FileObjCmd: type} { } {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} # Error conditions - test cmdAH-30.1 {Tcl_FileObjCmd: error conditions} -returnCodes error -body { file gorp x } -result {bad option "gorp": must be atime, attributes, channels, copy, delete, dirname, executable, exists, extension, isdirectory, isfile, join, link, lstat, mtime, mkdir, nativename, normalize, owned, pathtype, readable, readlink, rename, rootname, separator, size, split, stat, system, tail, tempfile, type, volumes, or writable} @@ -1577,7 +1545,7 @@ test cmdAH-32.6 {file tempfile - templates} -body { } -constraints {unix nonPortable} -cleanup { catch {file delete $name} } -result ok - + # This shouldn't work, but just in case a test above failed... catch {close $newFileId} diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 0018f83..1754dcd 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.48 2008/12/18 01:14:17 ferrieux Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.49 2009/01/08 16:41:35 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -135,7 +135,7 @@ test iocmd-4.8 {read command with incorrect combination of arguments} { set x [list [catch {read -nonewline $f 20 z} msg] $msg $::errorCode] close $f set x -} {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"} NONE} +} {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"} {TCL WRONGARGS}} test iocmd-4.9 {read command} { list [catch {read stdin foo} msg] $msg $::errorCode } {1 {bad argument "foo": should be "nonewline"} NONE} @@ -150,25 +150,26 @@ test iocmd-4.11 {read command} { string compare [string tolower $x] \ [list 1 [format "channel \"%s\" wasn't opened for reading" $f] none] } 0 -test iocmd-4.12 {read command} { +test iocmd-4.12 {read command} -setup { set f [open $path(test1)] - set x [list [catch {read $f 12z} msg] $msg $::errorCode] +} -body { + list [catch {read $f 12z} msg] $msg $::errorCode +} -cleanup { close $f - set x -} {1 {expected integer but got "12z"} NONE} - -test iocmd-5.1 {seek command} { - list [catch {seek} msg] $msg -} {1 {wrong # args: should be "seek channelId offset ?origin?"}} -test iocmd-5.2 {seek command} { - list [catch {seek a b c d e f g} msg] $msg -} {1 {wrong # args: should be "seek channelId offset ?origin?"}} -test iocmd-5.3 {seek command} { - list [catch {seek stdin gugu} msg] $msg -} {1 {expected integer but got "gugu"}} -test iocmd-5.4 {seek command} { - list [catch {seek stdin 100 gugu} msg] $msg -} {1 {bad origin "gugu": must be start, current, or end}} +} -result {1 {expected integer but got "12z"} {TCL VALUE NUMBER}} + +test iocmd-5.1 {seek command} -returnCodes error -body { + seek +} -result {wrong # args: should be "seek channelId offset ?origin?"} +test iocmd-5.2 {seek command} -returnCodes error -body { + seek a b c d e f g +} -result {wrong # args: should be "seek channelId offset ?origin?"} +test iocmd-5.3 {seek command} -returnCodes error -body { + seek stdin gugu +} -result {expected integer but got "gugu"} +test iocmd-5.4 {seek command} -returnCodes error -body { + seek stdin 100 gugu +} -result {bad origin "gugu": must be start, current, or end} test iocmd-6.1 {tell command} { list [catch {tell} msg] $msg @@ -352,10 +353,10 @@ test iocmd-8.19 {fconfigure command / win tty channel} -constraints {nonPortable test iocmd-9.1 {eof command} { list [catch {eof} msg] $msg $::errorCode -} {1 {wrong # args: should be "eof channelId"} NONE} +} {1 {wrong # args: should be "eof channelId"} {TCL WRONGARGS}} test iocmd-9.2 {eof command} { list [catch {eof a b} msg] $msg $::errorCode -} {1 {wrong # args: should be "eof channelId"} NONE} +} {1 {wrong # args: should be "eof channelId"} {TCL WRONGARGS}} test iocmd-9.3 {eof command} { catch {close file100} list [catch {eof file100} msg] $msg $::errorCode diff --git a/tests/join.test b/tests/join.test index 562c3e0..0a6da27 100644 --- a/tests/join.test +++ b/tests/join.test @@ -11,13 +11,13 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: join.test,v 1.6 2004/05/19 10:51:06 dkf Exp $ +# RCS: @(#) $Id: join.test,v 1.7 2009/01/08 16:41:35 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } - + test join-1.1 {basic join commands} { join {a b c} xyz } axyzbxyzc @@ -33,22 +33,25 @@ test join-1.4 {basic join commands} { test join-2.1 {join errors} { list [catch join msg] $msg $errorCode -} {1 {wrong # args: should be "join list ?joinString?"} NONE} +} {1 {wrong # args: should be "join list ?joinString?"} {TCL WRONGARGS}} test join-2.2 {join errors} { list [catch {join a b c} msg] $msg $errorCode -} {1 {wrong # args: should be "join list ?joinString?"} NONE} +} {1 {wrong # args: should be "join list ?joinString?"} {TCL WRONGARGS}} test join-2.3 {join errors} { list [catch {join "a \{ c" 111} msg] $msg $errorCode -} {1 {unmatched open brace in list} NONE} +} {1 {unmatched open brace in list} {TCL VALUE LIST}} test join-3.1 {joinString is binary ok} { string length [join {a b c} a\0b] } 9 - test join-3.2 {join is binary ok} { string length [join "a\0b a\0b a\0b"] } 11 - + # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: diff --git a/tests/mathop.test b/tests/mathop.test index 8374a98..3ec37fc 100644 --- a/tests/mathop.test +++ b/tests/mathop.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: mathop.test,v 1.12 2008/03/30 03:23:39 kennykb Exp $ +# RCS: @(#) $Id: mathop.test,v 1.13 2009/01/08 16:41:35 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -731,7 +731,7 @@ test mathop-20.2 { zero args, not allowed } { set exp {} foreach op {~ ! << >> % != ne in ni - /} { set res [TestOp $op] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res @@ -762,7 +762,7 @@ test mathop-20.5 { one arg, not allowed } { set exp {} foreach op {% != ne in ni << >>} { set res [TestOp $op 1] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res @@ -861,7 +861,7 @@ test mathop-21.6 { unary ops, too many } { set exp {} foreach op {~ !} { set res [TestOp $op 7 8] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res @@ -1088,7 +1088,7 @@ test mathop-24.3 { binary ops, bad values } { } foreach op {in ni} { lappend res [TestOp $op 5 "a b \{ c"] - lappend exp "unmatched open brace in list NONE" + lappend exp "unmatched open brace in list TCL VALUE LIST" } lappend res [TestOp % 5 0] lappend exp "divide by zero ARITH DIVZERO {divide by zero}" @@ -1185,7 +1185,7 @@ test mathop-24.8 { binary ops, too many } { set exp {} foreach op {<< >> % != ne in ni ~ !} { set res [TestOp $op 7 8 9] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res diff --git a/tests/rename.test b/tests/rename.test index 45d6847..3a3a47f 100644 --- a/tests/rename.test +++ b/tests/rename.test @@ -1,34 +1,34 @@ # Commands covered: rename # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: rename.test,v 1.12 2004/05/19 20:15:32 dkf Exp $ +# RCS: @(#) $Id: rename.test,v 1.13 2009/01/08 16:41:35 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest + package require tcltest 2 namespace import -force ::tcltest::* } testConstraint testdel [llength [info commands testdel]] -# Must eliminate the "unknown" command while the test is running, -# especially if the test is being run in a program with its -# own special-purpose unknown command. - +# Must eliminate the "unknown" command while the test is running, especially +# if the test is being run in a program with its own special-purpose unknown +# command. catch {rename unknown unknown.old} - + catch {rename r2 {}} proc r1 {} {return "procedure r1"} rename r1 r2 + test rename-1.1 {simple renaming} { r2 } {procedure r1} @@ -40,10 +40,9 @@ test rename-1.3 {simple renaming} { list [catch r2 msg] $msg } {1 {invalid command name "r2"}} -# The test below is tricky because it renames a built-in command. -# It's possible that the test procedure uses this command, so must -# restore the command before calling test again. - +# The test below is tricky because it renames a built-in command. It's +# possible that the test procedure uses this command, so must restore the +# command before calling test again. rename list l.new set a [catch list msg1] set b [l.new a b c] @@ -56,24 +55,27 @@ test rename-2.1 {renaming built-in command} { test rename-3.1 {error conditions} { list [catch {rename r1} msg] $msg $errorCode -} {1 {wrong # args: should be "rename oldName newName"} NONE} +} {1 {wrong # args: should be "rename oldName newName"} {TCL WRONGARGS}} test rename-3.2 {error conditions} { list [catch {rename r1 r2 r3} msg] $msg $errorCode -} {1 {wrong # args: should be "rename oldName newName"} NONE} -test rename-3.3 {error conditions} { +} {1 {wrong # args: should be "rename oldName newName"} {TCL WRONGARGS}} +test rename-3.3 {error conditions} -setup { proc r1 {} {} proc r2 {} {} - list [catch {rename r1 r2} msg] $msg -} {1 {can't rename to "r2": command already exists}} -test rename-3.4 {error conditions} { +} -returnCodes error -body { + rename r1 r2 +} -result {can't rename to "r2": command already exists} +test rename-3.4 {error conditions} -setup { catch {rename r1 {}} catch {rename r2 {}} - list [catch {rename r1 r2} msg] $msg -} {1 {can't rename "r1": command doesn't exist}} -test rename-3.5 {error conditions} { +} -returnCodes error -body { + rename r1 r2 +} -result {can't rename "r1": command doesn't exist} +test rename-3.5 {error conditions} -setup { catch {rename _non_existent_command {}} - list [catch {rename _non_existent_command {}} msg] $msg -} {1 {can't delete "_non_existent_command": command doesn't exist}} +} -returnCodes error -body { + rename _non_existent_command {} +} -result {can't delete "_non_existent_command": command doesn't exist} catch {rename unknown {}} catch {rename unknown.old unknown} @@ -142,11 +144,9 @@ if {[info exists env(value)]} { catch {rename unknown unknown.old} +set SAVED_UNKNOWN "proc unknown " +append SAVED_UNKNOWN [list [info args unknown.old] [info body unknown.old]] test rename-5.1 {repeated rename deletion and redefinition of same command} { - set SAVED_UNKNOWN "proc unknown " - append SAVED_UNKNOWN "\{[info args unknown.old]\} " - append SAVED_UNKNOWN "\{[info body unknown.old]\}" - for {set i 0} {$i < 10} {incr i} { eval $SAVED_UNKNOWN tcl_wordBreakBefore "" 0 @@ -158,24 +158,27 @@ test rename-5.1 {repeated rename deletion and redefinition of same command} { catch {rename unknown {}} catch {rename unknown.old unknown} - -test rename-6.1 {old code invalidated (epoch incremented) when cmd with compile proc is renamed } { - proc x {} { +test rename-6.1 {old code invalidated (epoch incremented) when cmd with compile proc is renamed} -body { + proc x {} { set a 123 set b [incr a] } x rename incr incr.old proc incr {} {puts "new incr called!"} - catch {x} msg + x +} -cleanup { rename incr {} rename incr.old incr - set msg -} {wrong # args: should be "incr"} - +} -returnCodes error -result {wrong # args: should be "incr"} + if {[info commands incr.old] != {}} { catch {rename incr {}} catch {rename incr.old incr} } ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: diff --git a/tests/split.test b/tests/split.test index 93b0cc4..1cc13b7 100644 --- a/tests/split.test +++ b/tests/split.test @@ -1,23 +1,23 @@ # Commands covered: split # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: split.test,v 1.9 2004/05/19 10:50:30 dkf Exp $ +# RCS: @(#) $Id: split.test,v 1.10 2009/01/08 16:41:35 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } - + test split-1.1 {basic split commands} { split "a\n b\t\r c\n " } {a {} b {} {} c {} {}} @@ -75,12 +75,16 @@ test split-1.14 {basic split commands} { test split-2.1 {split errors} { list [catch split msg] $msg $errorCode -} {1 {wrong # args: should be "split string ?splitChars?"} NONE} +} {1 {wrong # args: should be "split string ?splitChars?"} {TCL WRONGARGS}} test split-2.2 {split errors} { list [catch {split a b c} msg] $msg $errorCode -} {1 {wrong # args: should be "split string ?splitChars?"} NONE} - +} {1 {wrong # args: should be "split string ?splitChars?"} {TCL WRONGARGS}} + # cleanup catch {rename foo {}} ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 06b98b063ae2d87532d9940f8ff0a6409fa86f58 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 8 Jan 2009 17:58:59 +0000 Subject: * generic/tclStringObj.c (STRING_UALLOC): Added missing parens required to get correct results out of things like STRING_UALLOC(num + append). [Bug 2494093]. --- ChangeLog | 6 ++++++ generic/tclStringObj.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 032f976..df08fe7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-08 Don Porter + + * generic/tclStringObj.c (STRING_UALLOC): Added missing parens + required to get correct results out of things like + STRING_UALLOC(num + append). [Bug 2494093]. + 2009-01-08 Donal K. Fellows * generic/tclDictObj.c, generic/tclIndexObj.c, generic/tclListObj.c, diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index abbd027..c834de5 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.76 2008/12/17 16:47:38 nijtmans Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.77 2009/01/08 17:58:59 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -106,7 +106,7 @@ typedef struct String { } String; #define STRING_UALLOC(numChars) \ - (numChars * sizeof(Tcl_UniChar)) + ((numChars) * sizeof(Tcl_UniChar)) #define STRING_SIZE(ualloc) \ ((unsigned) ((ualloc) \ ? sizeof(String) - sizeof(Tcl_UniChar) + (ualloc) \ -- cgit v0.12 From 4a6ee21a80ee4a00adc8da96ed88329e7faaebf4 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 9 Jan 2009 11:21:45 +0000 Subject: Style fixes (unfouling whitespace, sorting comments, removing useless casts, etc.) --- generic/tclAsync.c | 4 +- generic/tclBasic.c | 7 +- generic/tclBinary.c | 7 +- generic/tclCkalloc.c | 16 +- generic/tclCmdIL.c | 12 +- generic/tclCmdMZ.c | 4 +- generic/tclCompCmds.c | 12 +- generic/tclCompExpr.c | 736 +++++++++++++++++++++------------------- generic/tclCompile.c | 53 ++- generic/tclConfig.c | 8 +- generic/tclDictObj.c | 12 +- generic/tclExecute.c | 118 ++++--- generic/tclHash.c | 17 +- generic/tclIO.c | 64 ++-- generic/tclIOCmd.c | 20 +- generic/tclIORChan.c | 62 ++-- generic/tclIORTrans.c | 14 +- generic/tclInterp.c | 13 +- generic/tclLiteral.c | 31 +- generic/tclNamesp.c | 16 +- generic/tclOOInfo.c | 42 +-- generic/tclObj.c | 24 +- generic/tclPathObj.c | 138 ++++---- generic/tclPipe.c | 112 +++--- generic/tclPosixStr.c | 12 +- generic/tclPreserve.c | 19 +- generic/tclProc.c | 25 +- generic/tclStrToD.c | 8 +- generic/tclTest.c | 23 +- generic/tclTestObj.c | 234 ++++++------- generic/tclTestProcBodyObj.c | 78 ++--- generic/tclThread.c | 4 +- generic/tclThreadAlloc.c | 14 +- generic/tclThreadTest.c | 93 +++-- generic/tclTimer.c | 41 ++- generic/tclVar.c | 20 +- macosx/tclMacOSXFCmd.c | 134 ++++---- macosx/tclMacOSXNotify.c | 791 ++++++++++++++++++++++--------------------- unix/tclUnixCompat.c | 10 +- unix/tclUnixInit.c | 4 +- unix/tclUnixPipe.c | 4 +- unix/tclUnixTest.c | 46 +-- unix/tclXtTest.c | 6 +- win/tclAppInit.c | 4 +- win/tclWinThrd.c | 37 +- 45 files changed, 1611 insertions(+), 1538 deletions(-) diff --git a/generic/tclAsync.c b/generic/tclAsync.c index 175eaad..208b2fa 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAsync.c,v 1.17 2008/10/26 18:34:03 dkf Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.18 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -306,7 +306,7 @@ Tcl_AsyncDelete( tsdPtr->firstHandler = asyncPtr->nextPtr; } else { prevPtr->nextPtr = asyncPtr->nextPtr; - } + } if (asyncPtr == tsdPtr->lastHandler) { tsdPtr->lastHandler = prevPtr; } diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 5f8d9dc..ab1806e 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.379 2009/01/05 09:48:11 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.380 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -172,6 +172,7 @@ static const CmdInfo builtInCmds[] = { {"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, TclNRCatchObjCmd, 1}, {"concat", Tcl_ConcatObjCmd, NULL, NULL, 1}, {"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, NULL, 1}, + {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1}, {"error", Tcl_ErrorObjCmd, NULL, NULL, 1}, {"eval", Tcl_EvalObjCmd, NULL, NULL, 1}, {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, NULL, 1}, @@ -213,9 +214,7 @@ static const CmdInfo builtInCmds[] = { {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1}, {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, TclNRWhileObjCmd, 1}, - - {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1}, - {"yield", NULL, NULL, TclNRYieldObjCmd, 1}, + {"yield", NULL, NULL, TclNRYieldObjCmd, 1}, /* * Commands in the OS-interface. Note that many of these are unsafe. diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 5e86653..6802c10 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.52 2008/12/15 17:11:34 ferrieux Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.53 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -597,8 +597,8 @@ TclInitBinaryCmd( const EnsembleImplMap binaryMap[] = { { "format", BinaryFormatCmd, NULL }, { "scan", BinaryScanCmd, NULL }, - { "encode", NULL, NULL }, - { "decode", NULL, NULL }, + { "encode", NULL, NULL }, + { "decode", NULL, NULL }, { NULL, NULL, NULL } }; const EnsembleImplMap encodeMap[] = { @@ -613,7 +613,6 @@ TclInitBinaryCmd( { "base64", BinaryDecode64, NULL }, { NULL, NULL, NULL } }; - Tcl_Command binaryEnsemble; binaryEnsemble = TclMakeEnsemble(interp, "binary", binaryMap); diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index fd1b2ab..fa7d376 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -14,7 +14,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.33 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.34 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -228,9 +228,9 @@ ValidateMemory( } } if (guard_failed) { - TclDumpMemoryInfo (stderr); + TclDumpMemoryInfo(stderr); fprintf(stderr, "low guard failed at %lx, %s %d\n", - (long unsigned int) memHeaderP->body, file, line); + (long unsigned) memHeaderP->body, file, line); fflush(stderr); /* In case name pointer is bad. */ fprintf(stderr, "%ld bytes allocated at (%s %d)\n", memHeaderP->length, memHeaderP->file, memHeaderP->line); @@ -252,7 +252,7 @@ ValidateMemory( if (guard_failed) { TclDumpMemoryInfo(stderr); fprintf(stderr, "high guard failed at %lx, %s %d\n", - (long unsigned int) memHeaderP->body, file, line); + (long unsigned) memHeaderP->body, file, line); fflush(stderr); /* In case name pointer is bad. */ fprintf(stderr, "%ld bytes allocated at (%s %d)\n", memHeaderP->length, memHeaderP->file, @@ -336,10 +336,10 @@ Tcl_DumpActiveMemory( Tcl_MutexLock(ckallocMutexPtr); for (memScanP = allocHead; memScanP != NULL; memScanP = memScanP->flink) { - address = &memScanP->body [0]; + address = &memScanP->body[0]; fprintf(fileP, "%8lx - %8lx %7ld @ %s %d %s", - (long unsigned int) address, - (long unsigned int) address + memScanP->length - 1, + (long unsigned) address, + (long unsigned) address + memScanP->length - 1, memScanP->length, memScanP->file, memScanP->line, (memScanP->tagPtr == NULL) ? "" : memScanP->tagPtr->string); (void) fputc('\n', fileP); @@ -824,7 +824,7 @@ MemoryCmd( if (fileName == NULL) { return TCL_ERROR; } - result = Tcl_DumpActiveMemory (fileName); + result = Tcl_DumpActiveMemory(fileName); Tcl_DStringFree(&buffer); if (result != TCL_OK) { Tcl_AppendResult(interp, "error accessing ", argv[2], NULL); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index cd82228..8dc4c12 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.163 2008/10/17 16:32:58 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.164 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -35,7 +35,7 @@ typedef struct SortElement { double doubleValue; Tcl_Obj *objValuePtr; } index; - Tcl_Obj *objPtr; /* Object being sorted, or its index. */ + Tcl_Obj *objPtr; /* Object being sorted, or its index. */ struct SortElement *nextPtr;/* Next element in the list, or NULL for end * of list. */ } SortElement; @@ -160,7 +160,7 @@ static const EnsembleImplMap defaultInfoMap[] = { {"cmdcount", InfoCmdCountCmd, NULL}, {"commands", InfoCommandsCmd, NULL}, {"complete", InfoCompleteCmd, NULL}, - {"coroutine", TclInfoCoroutineCmd, NULL}, + {"coroutine", TclInfoCoroutineCmd, NULL}, {"default", InfoDefaultCmd, NULL}, {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd}, {"frame", InfoFrameCmd, NULL}, @@ -1058,7 +1058,7 @@ InfoFrameCmd( */ topLevel += iPtr->execEnvPtr->corPtr->caller.cmdFramePtr->level + 1 - - iPtr->execEnvPtr->corPtr->base.cmdFramePtr->level; + iPtr->execEnvPtr->corPtr->base.cmdFramePtr->level; } if (objc == 1) { @@ -1066,7 +1066,7 @@ InfoFrameCmd( * Just "info frame". */ - Tcl_SetObjResult(interp, Tcl_NewIntObj (topLevel)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(topLevel)); return TCL_OK; } else if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?number?"); @@ -3823,7 +3823,7 @@ Tcl_LsortObjCmd( * begins sorting it into the sublists as it appears. */ - elementArray = (SortElement *) ckalloc( length * sizeof(SortElement)); + elementArray = (SortElement *) ckalloc(length * sizeof(SortElement)); for (i=0; i < length; i++){ idx = groupSize * i + groupOffset; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index feb87cd..f5f6547 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.174 2009/01/05 11:27:41 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.175 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -3824,7 +3824,7 @@ Tcl_SwitchObjCmd( if (ctxPtr->type == TCL_LOCATION_BC) { /* * Type BC => ctxPtr->data.eval.path is not used. - * ctxPtr->data.tebc.codePtr is used instead. + * ctxPtr->data.tebc.codePtr is used instead. */ TclGetSrcInfoForPc(ctxPtr); diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 74dceac..5d8e31a 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.150 2008/11/19 00:00:20 ferrieux Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.151 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -31,7 +31,7 @@ TclEmitPush(TclRegisterNewLiteral((envPtr), (tokenPtr)[1].start, \ (tokenPtr)[1].size), (envPtr)); \ } else { \ - envPtr->line = mapPtr->loc[eclIndex].line[word]; \ + envPtr->line = mapPtr->loc[eclIndex].line[word]; \ TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ (envPtr)); \ } @@ -71,7 +71,7 @@ #define CompileTokens(envPtr, tokenPtr, interp) \ TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ - (envPtr)); + (envPtr)); /* * Convenience macro for use when pushing literals. The ANSI C "prototype" for * this macro is: @@ -4911,7 +4911,7 @@ PushVarName( int *localIndexPtr, /* Must not be NULL. */ int *simpleVarNamePtr, /* Must not be NULL. */ int *isScalarPtr, /* Must not be NULL. */ - int line) /* Line the token starts on. */ + int line) /* Line the token starts on. */ { register const char *p; const char *name, *elName; @@ -5705,7 +5705,7 @@ TclCompileDivOpCmd( * * Results: * Returns the variable's index in the table of compiled locals if the - * tail is known at compile time, or -1 otherwise. + * tail is known at compile time, or -1 otherwise. * * Side effects: * None. @@ -5914,7 +5914,7 @@ TclCompileUpvarCmd( * * Side effects: * Instructions are added to envPtr to execute the "namespace upvar" - * command at runtime. + * command at runtime. * *---------------------------------------------------------------------- */ diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 9c1ee74..48f3cc1 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -1,8 +1,8 @@ /* * tclCompExpr.c -- * - * This file contains the code to parse and compile Tcl expressions - * and implementations of the Tcl commands corresponding to expression + * This file contains the code to parse and compile Tcl expressions and + * implementations of the Tcl commands corresponding to expression * operators, such as the command ::tcl::mathop::+ . * * Contributions from Don Porter, NIST, 2006-2007. (not subject to US copyright) @@ -10,18 +10,18 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.98 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.99 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" #include "tclCompile.h" /* CompileEnv */ /* - * Expression parsing takes place in the routine ParseExpr(). It takes a - * string as input, parses that string, and generates a representation of - * the expression in the form of a tree of operators, a list of literals, - * a list of function names, and an array of Tcl_Token's within a Tcl_Parse - * struct. The tree is composed of OpNodes. + * Expression parsing takes place in the routine ParseExpr(). It takes a + * string as input, parses that string, and generates a representation of the + * expression in the form of a tree of operators, a list of literals, a list + * of function names, and an array of Tcl_Token's within a Tcl_Parse struct. + * The tree is composed of OpNodes. */ typedef struct OpNode { @@ -38,36 +38,36 @@ typedef struct OpNode { } OpNode; /* - * The storage for the tree is dynamically allocated array of OpNodes. The + * The storage for the tree is dynamically allocated array of OpNodes. The * array is grown as parsing needs dictate according to a scheme similar to * Tcl's string growth algorithm, so that the resizing costs are O(N) and so * that we use at least half the memory allocated as expressions get large. * * Each OpNode in the tree represents an operator in the expression, either - * unary or binary. When parsing is completed successfully, a binary operator + * unary or binary. When parsing is completed successfully, a binary operator * OpNode will have its left and right fields filled with "pointers" to its - * left and right operands. A unary operator OpNode will have its right field - * filled with a pointer to its single operand. When an operand is a + * left and right operands. A unary operator OpNode will have its right field + * filled with a pointer to its single operand. When an operand is a * subexpression the "pointer" takes the form of the index -- a non-negative * integer -- into the OpNode storage array where the root of that - * subexpression parse tree is found. + * subexpression parse tree is found. * * Non-operator elements of the expression do not get stored in the OpNode - * tree. They are stored in the other structures according to their type. - * Literal values get appended to the literal list. Elements that denote - * forms of quoting or substitution known to the Tcl parser get stored as - * Tcl_Tokens. These non-operator elements of the expression are the - * leaves of the completed parse tree. When an operand of an OpNode is - * one of these leaf elements, the following negative integer codes are used - * to indicate which kind of elements it is. + * tree. They are stored in the other structures according to their type. + * Literal values get appended to the literal list. Elements that denote forms + * of quoting or substitution known to the Tcl parser get stored as + * Tcl_Tokens. These non-operator elements of the expression are the leaves of + * the completed parse tree. When an operand of an OpNode is one of these leaf + * elements, the following negative integer codes are used to indicate which + * kind of elements it is. */ enum OperandTypes { OT_LITERAL = -3, /* Operand is a literal in the literal list */ OT_TOKENS = -2, /* Operand is sequence of Tcl_Tokens */ - OT_EMPTY = -1 /* "Operand" is an empty string. This is a - * special case used only to represent the - * EMPTY lexeme. See below. */ + OT_EMPTY = -1 /* "Operand" is an empty string. This is a special + * case used only to represent the EMPTY lexeme. See + * below. */ }; /* @@ -81,31 +81,30 @@ enum OperandTypes { /* * Note that it is sufficient to store in the tree just the type of leaf - * operand, without any explicit pointer to which leaf. This is true because - * the traversals of the completed tree we perform are known to visit - * the leaves in the same order as the original parse. + * operand, without any explicit pointer to which leaf. This is true because + * the traversals of the completed tree we perform are known to visit the + * leaves in the same order as the original parse. * * In a completed parse tree, those OpNodes that are themselves (roots of * subexpression trees that are) operands of some operator store in their - * p.parent field a "pointer" to the OpNode of that operator. The p.parent - * field permits a traversal of the tree within a * non-recursive routine - * (ConvertTreeToTokens() and CompileExprTree()). This means that even + * p.parent field a "pointer" to the OpNode of that operator. The p.parent + * field permits a traversal of the tree within a non-recursive routine + * (ConvertTreeToTokens() and CompileExprTree()). This means that even * expression trees of great depth pose no risk of blowing the C stack. * - * While the parse tree is being constructed, the same memory space is used - * to hold the p.prev field which chains together a stack of incomplete - * trees awaiting their right operands. + * While the parse tree is being constructed, the same memory space is used to + * hold the p.prev field which chains together a stack of incomplete trees + * awaiting their right operands. * * The lexeme field is filled in with the lexeme of the operator that is - * returned by the ParseLexeme() routine. Only lexemes for unary and - * binary operators get stored in an OpNode. Other lexmes get different - * treatement. + * returned by the ParseLexeme() routine. Only lexemes for unary and binary + * operators get stored in an OpNode. Other lexmes get different treatement. * * The precedence field provides a place to store the precedence of the * operator, so it need not be looked up again and again. * - * The mark field is use to control the traversal of the tree, so - * that it can be done non-recursively. The mark values are: + * The mark field is use to control the traversal of the tree, so that it can + * be done non-recursively. The mark values are: */ enum Marks { @@ -121,52 +120,51 @@ enum Marks { */ /* - * Each lexeme belongs to one of four categories, which determine - * its place in the parse tree. We use the two high bits of the - * (unsigned char) value to store a NODE_TYPE code. + * Each lexeme belongs to one of four categories, which determine its place in + * the parse tree. We use the two high bits of the (unsigned char) value to + * store a NODE_TYPE code. */ #define NODE_TYPE 0xC0 /* - * The four category values are LEAF, UNARY, and BINARY, explained below, - * and "uncategorized", which is used either temporarily, until context - * determines which of the other three categories is correct, or for - * lexemes like INVALID, which aren't really lexemes at all, but indicators - * of a parsing error. Note that the codes must be distinct to distinguish - * categories, but need not take the form of a bit array. + * The four category values are LEAF, UNARY, and BINARY, explained below, and + * "uncategorized", which is used either temporarily, until context determines + * which of the other three categories is correct, or for lexemes like + * INVALID, which aren't really lexemes at all, but indicators of a parsing + * error. Note that the codes must be distinct to distinguish categories, but + * need not take the form of a bit array. */ -#define BINARY 0x40 /* This lexeme is a binary operator. An - * OpNode representing it should go into the - * parse tree, and two operands should be - * parsed for it in the expression. */ -#define UNARY 0x80 /* This lexeme is a unary operator. An OpNode +#define BINARY 0x40 /* This lexeme is a binary operator. An OpNode + * representing it should go into the parse + * tree, and two operands should be parsed for + * it in the expression. */ +#define UNARY 0x80 /* This lexeme is a unary operator. An OpNode * representing it should go into the parse * tree, and one operand should be parsed for * it in the expression. */ #define LEAF 0xC0 /* This lexeme is a leaf operand in the parse - * tree. No OpNode will be placed in the tree - * for it. Either a literal value will be + * tree. No OpNode will be placed in the tree + * for it. Either a literal value will be * appended to the list of literals in this * expression, or appropriate Tcl_Tokens will - * be appended in a Tcl_Parse struct to + * be appended in a Tcl_Parse struct to * represent those leaves that require some - * form of substitution. - */ + * form of substitution. */ /* Uncategorized lexemes */ -#define PLUS 1 /* Ambiguous. Resolves to UNARY_PLUS or +#define PLUS 1 /* Ambiguous. Resolves to UNARY_PLUS or * BINARY_PLUS according to context. */ -#define MINUS 2 /* Ambiguous. Resolves to UNARY_MINUS or +#define MINUS 2 /* Ambiguous. Resolves to UNARY_MINUS or * BINARY_MINUS according to context. */ -#define BAREWORD 3 /* Ambigous. Resolves to BOOLEAN or to +#define BAREWORD 3 /* Ambigous. Resolves to BOOLEAN or to * FUNCTION or a parse error according to * context and value. */ -#define INCOMPLETE 4 /* A parse error. Used only when the single +#define INCOMPLETE 4 /* A parse error. Used only when the single * "=" is encountered. */ -#define INVALID 5 /* A parse error. Used when any punctuation +#define INVALID 5 /* A parse error. Used when any punctuation * appears that's not a supported operator. */ /* Leaf lexemes */ @@ -178,9 +176,9 @@ enum Marks { #define VARIABLE ( LEAF | 5) /* Variable substitution; $x */ #define QUOTED ( LEAF | 6) /* Quoted string; "foo $bar [soom]" */ #define EMPTY ( LEAF | 7) /* Used only for an empty argument - * list to a function. Represents - * the empty string within parens in - * the expression: rand() */ + * list to a function. Represents the + * empty string within parens in the + * expression: rand() */ /* Unary operator lexemes */ @@ -188,28 +186,29 @@ enum Marks { #define UNARY_MINUS ( UNARY | MINUS) #define FUNCTION ( UNARY | BAREWORD) /* This is a bit of "creative * interpretation" on the part of the - * parser. A function call is parsed + * parser. A function call is parsed * into the parse tree according to * the perspective that the function * name is a unary operator and its * argument list, enclosed in parens, - * is its operand. The additional + * is its operand. The additional * requirements not implied generally * by treatment as a unary operator -- * for example, the requirement that - * the operand be enclosed in parens -- - * are hard coded in the relevant - * portions of ParseExpr(). We trade + * the operand be enclosed in parens + * -- are hard coded in the relevant + * portions of ParseExpr(). We trade * off the need to include such * exceptional handling in the code * against the need we would otherwise * have for more lexeme categories. */ #define START ( UNARY | 4) /* This lexeme isn't parsed from the - * expression text at all. It + * expression text at all. It * represents the start of the * expression and sits at the root of * the parse tree where it serves as - * the start/end point of traversals. */ + * the start/end point of + * traversals. */ #define OPEN_PAREN ( UNARY | 5) /* Another bit of creative * interpretation, where we treat "(" * as a unary operator with the @@ -223,14 +222,15 @@ enum Marks { #define BINARY_PLUS ( BINARY | PLUS) #define BINARY_MINUS ( BINARY | MINUS) -#define COMMA ( BINARY | 3) /* The "," operator is a low precedence - * binary operator that separates the - * arguments in a function call. The - * additional constraint that this - * operator can only legally appear - * at the right places within a - * function call argument list are - * hard coded within ParseExpr(). */ +#define COMMA ( BINARY | 3) /* The "," operator is a low + * precedence binary operator that + * separates the arguments in a + * function call. The additional + * constraint that this operator can + * only legally appear at the right + * places within a function call + * argument list are hard coded within + * ParseExpr(). */ #define MULT ( BINARY | 4) #define DIVIDE ( BINARY | 5) #define MOD ( BINARY | 6) @@ -241,14 +241,13 @@ enum Marks { #define BIT_OR ( BINARY | 11) #define QUESTION ( BINARY | 12) /* These two lexemes make up the */ #define COLON ( BINARY | 13) /* ternary conditional operator, - * $x ? $y : $z . We treat them as - * two binary operators to avoid - * another lexeme category, and - * code the additional constraints - * directly in ParseExpr(). For - * instance, the right operand of - * a "?" operator must be a ":" - * operator. */ + * $x ? $y : $z . We treat them as two + * binary operators to avoid another + * lexeme category, and code the + * additional constraints directly in + * ParseExpr(). For instance, the + * right operand of a "?" operator + * must be a ":" operator. */ #define LEFT_SHIFT ( BINARY | 14) #define RIGHT_SHIFT ( BINARY | 15) #define LEQ ( BINARY | 16) @@ -275,23 +274,22 @@ enum Marks { * operators according to precedence * performs most of the work of * matching open and close parens for - * us. In the end though, a close + * us. In the end though, a close * paren is not really a binary * operator, and some special coding * in ParseExpr() make sure we never - * put an actual CLOSE_PAREN node - * in the parse tree. The - * sub-expression between parens - * becomes the single argument of - * the matching OPEN_PAREN unary - * operator. */ + * put an actual CLOSE_PAREN node in + * the parse tree. The sub-expression + * between parens becomes the single + * argument of the matching OPEN_PAREN + * unary operator. */ #define END ( BINARY | 28) /* This lexeme represents the end of - * the string being parsed. Treating + * the string being parsed. Treating * it as a binary operator follows the - * same logic as the CLOSE_PAREN lexeme - * and END pairs with START, in the - * same way that CLOSE_PAREN pairs with - * OPEN_PAREN. */ + * same logic as the CLOSE_PAREN + * lexeme and END pairs with START, in + * the same way that CLOSE_PAREN pairs + * with OPEN_PAREN. */ /* * When ParseExpr() builds the parse tree it must choose which operands to * connect to which operators. This is done according to operator precedence. @@ -523,7 +521,6 @@ static int ParseExpr(Tcl_Interp *interp, const char *start, Tcl_Parse *parsePtr, int parseOnly); static int ParseLexeme(const char *start, int numBytes, unsigned char *lexemePtr, Tcl_Obj **literalPtr); - /* *---------------------------------------------------------------------- @@ -531,27 +528,27 @@ static int ParseLexeme(const char *start, int numBytes, * ParseExpr -- * * Given a string, the numBytes bytes starting at start, this function - * parses it as a Tcl expression and constructs a tree representing - * the structure of the expression. The caller must pass in empty - * lists as the funcList and litList arguments. The elements of the - * parsed expression are returned to the caller as that tree, a list of - * literal values, a list of function names, and in Tcl_Tokens - * added to a Tcl_Parse struct passed in by the caller. + * parses it as a Tcl expression and constructs a tree representing the + * structure of the expression. The caller must pass in empty lists as + * the funcList and litList arguments. The elements of the parsed + * expression are returned to the caller as that tree, a list of literal + * values, a list of function names, and in Tcl_Tokens added to a + * Tcl_Parse struct passed in by the caller. * * Results: * If the string is successfully parsed as a valid Tcl expression, TCL_OK - * is returned, and data about the expression structure is written to - * the last four arguments. If the string cannot be parsed as a valid - * Tcl expression, TCL_ERROR is returned, and if interp is non-NULL, an - * error message is written to interp. + * is returned, and data about the expression structure is written to the + * last four arguments. If the string cannot be parsed as a valid Tcl + * expression, TCL_ERROR is returned, and if interp is non-NULL, an error + * message is written to interp. * * Side effects: - * Memory will be allocated. If TCL_OK is returned, the caller must - * clean up the returned data structures. The (OpNode *) value written - * to opTreePtr should be passed to ckfree() and the parsePtr argument - * should be passed to Tcl_FreeParse(). The elements appended to the - * litList and funcList will automatically be freed whenever the - * refcount on those lists indicates they can be freed. + * Memory will be allocated. If TCL_OK is returned, the caller must clean + * up the returned data structures. The (OpNode *) value written to + * opTreePtr should be passed to ckfree() and the parsePtr argument + * should be passed to Tcl_FreeParse(). The elements appended to the + * litList and funcList will automatically be freed whenever the refcount + * on those lists indicates they can be freed. * *---------------------------------------------------------------------- */ @@ -570,38 +567,39 @@ ParseExpr( * substitutions. */ int parseOnly) /* A boolean indicating whether the caller's * aim is just a parse, or whether it will go - * on to compile the expression. Different - * optimizations are appropriate for the - * two scenarios. */ + * on to compile the expression. Different + * optimizations are appropriate for the two + * scenarios. */ { OpNode *nodes = NULL; /* Pointer to the OpNode storage array where * we build the parse tree. */ - int nodesAvailable = 64; /* Initial size of the storage array. This - * value establishes a minimum tree memory cost - * of only about 1 kibyte, and is large enough - * for most expressions to parse with no need - * for array growth and reallocation. */ + int nodesAvailable = 64; /* Initial size of the storage array. This + * value establishes a minimum tree memory + * cost of only about 1 kibyte, and is large + * enough for most expressions to parse with + * no need for array growth and + * reallocation. */ int nodesUsed = 0; /* Number of OpNodes filled. */ - int scanned = 0; /* Capture number of byte scanned by - * parsing routines. */ + int scanned = 0; /* Capture number of byte scanned by parsing + * routines. */ int lastParsed; /* Stores info about what the lexeme parsed * the previous pass through the parsing loop - * was. If it was an operator, lastParsed is + * was. If it was an operator, lastParsed is * the index of the OpNode for that operator. * If it was not an operator, lastParsed holds - * an OperandTypes value encoding what we - * need to know about it. */ - int incomplete; /* Index of the most recent incomplete tree - * in the OpNode array. Heads a stack of + * an OperandTypes value encoding what we need + * to know about it. */ + int incomplete; /* Index of the most recent incomplete tree in + * the OpNode array. Heads a stack of * incomplete trees linked by p.prev. */ int complete = OT_EMPTY; /* "Index" of the complete tree (that is, a * complete subexpression) determined at the - * moment. OT_EMPTY is a nonsense value - * used only to silence compiler warnings. - * During a parse, complete will always hold - * an index or an OperandTypes value pointing - * to an actual leaf at the time the complete - * tree is needed. */ + * moment. OT_EMPTY is a nonsense value used + * only to silence compiler warnings. During a + * parse, complete will always hold an index + * or an OperandTypes value pointing to an + * actual leaf at the time the complete tree + * is needed. */ /* These variables control generation of the error message. */ Tcl_Obj *msg = NULL; /* The error message. */ @@ -609,19 +607,19 @@ ParseExpr( * for the error message, supplying more * information after the error msg and * location have been reported. */ - const char *mark = "_@_"; /* In the portion of the complete error message - * where the error location is reported, this - * "mark" substring is inserted into the - * string being parsed to aid in pinpointing - * the location of the syntax error in the - * expression. */ + const char *mark = "_@_"; /* In the portion of the complete error + * message where the error location is + * reported, this "mark" substring is inserted + * into the string being parsed to aid in + * pinpointing the location of the syntax + * error in the expression. */ int insertMark = 0; /* A boolean controlling whether the "mark" * should be inserted. */ const int limit = 25; /* Portions of the error message are * constructed out of substrings of the - * original expression. In order to keep the - * error message readable, we impose this limit - * on the substring size we extract. */ + * original expression. In order to keep the + * error message readable, we impose this + * limit on the substring size we extract. */ TclParseInit(interp, start, numBytes, parsePtr); @@ -631,7 +629,10 @@ ParseExpr( goto error; } - /* Initialize the parse tree with the special "START" node. */ + /* + * Initialize the parse tree with the special "START" node. + */ + nodes->lexeme = START; nodes->precedence = prec[START]; nodes->mark = MARK_RIGHT; @@ -640,25 +641,24 @@ ParseExpr( nodesUsed++; /* - * Main parsing loop parses one lexeme per iteration. We exit the - * loop only when there's a syntax error with a "goto error" which - * takes us to the error handling code following the loop, or when - * we've successfully completed the parse and we return to the caller. + * Main parsing loop parses one lexeme per iteration. We exit the loop + * only when there's a syntax error with a "goto error" which takes us to + * the error handling code following the loop, or when we've successfully + * completed the parse and we return to the caller. */ while (1) { - OpNode *nodePtr; /* Points to the OpNode we may fill this - * pass through the loop. */ + OpNode *nodePtr; /* Points to the OpNode we may fill this pass + * through the loop. */ unsigned char lexeme; /* The lexeme we parse this iteration. */ - Tcl_Obj *literal; /* Filled by the ParseLexeme() call when - * a literal is parsed that has a Tcl_Obj - * rep worth preserving. */ + Tcl_Obj *literal; /* Filled by the ParseLexeme() call when a + * literal is parsed that has a Tcl_Obj rep + * worth preserving. */ const char *lastStart = start - scanned; /* Compute where the lexeme parsed the - * previous pass through the loop began. - * This is helpful for detecting invalid - * octals and providing more complete error - * messages. */ + * previous pass through the loop began. This + * is helpful for detecting invalid octals and + * providing more complete error messages. */ /* * Each pass through this loop adds up to one more OpNode. Allocate @@ -705,11 +705,10 @@ ParseExpr( case BAREWORD: /* - * Most barewords in an expression are a syntax error. - * The exceptions are that when a bareword is followed by - * an open paren, it might be a function call, and when the - * bareword is a legal literal boolean value, we accept that - * as well. + * Most barewords in an expression are a syntax error. The + * exceptions are that when a bareword is followed by an open + * paren, it might be a function call, and when the bareword + * is a legal literal boolean value, we accept that as well. */ if (start[scanned+TclParseAllWhiteSpace( @@ -751,7 +750,8 @@ ParseExpr( && (lastStart[2] >= '0') && (lastStart[2] <= '9')) { const char *end = lastStart + 2; - Tcl_Obj* copy; + Tcl_Obj *copy; + while (isdigit(*end)) { end++; } @@ -775,10 +775,9 @@ ParseExpr( case PLUS: case MINUS: if (IsOperator(lastParsed)) { - /* - * A "+" or "-" coming just after another operator - * must be interpreted as a unary operator. + * A "+" or "-" coming just after another operator must be + * interpreted as a unary operator. */ lexeme |= UNARY; @@ -794,8 +793,8 @@ ParseExpr( /* * Each LEAF results in either a literal getting appended to the * litList, or a sequence of Tcl_Tokens representing a Tcl word - * getting appended to the parsePtr->tokens. No OpNode is filled - * for this lexeme. + * getting appended to the parsePtr->tokens. No OpNode is filled for + * this lexeme. */ case LEAF: { @@ -841,15 +840,16 @@ ParseExpr( * Pro: ~75% memory saving on expressions like * {1+1+1+1+1+.....+1} (Convert "pointer + Tcl_Obj" cost * to "pointer" cost only) - * Con: Cost of the dict store/retrieve on every literal - * in every expression when expressions like the above - * tend to be uncommon. + * Con: Cost of the dict store/retrieve on every literal in + * every expression when expressions like the above tend + * to be uncommon. * The memory savings is temporary; Compiling to bytecode * will collapse things as literals are registered - * anyway, so the savings applies only to the time - * between parsing and compiling. Possibly important - * due to high-water mark nature of memory allocation. + * anyway, so the savings applies only to the time + * between parsing and compiling. Possibly important due + * to high-water mark nature of memory allocation. */ + Tcl_ListObjAppendElement(NULL, litList, literal); complete = lastParsed = OT_LITERAL; start += scanned; @@ -861,8 +861,8 @@ ParseExpr( } /* - * Remaining LEAF cases may involve filling Tcl_Tokens, so - * make room for at least 2 more tokens. + * Remaining LEAF cases may involve filling Tcl_Tokens, so make + * room for at least 2 more tokens. */ TclGrowParseTokenArray(parsePtr, 2); @@ -902,8 +902,8 @@ ParseExpr( break; case SCRIPT: { - Tcl_Parse *nestedPtr = - (Tcl_Parse *) TclStackAlloc(interp, sizeof(Tcl_Parse)); + Tcl_Parse *nestedPtr = (Tcl_Parse *) + TclStackAlloc(interp, sizeof(Tcl_Parse)); tokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; tokenPtr->type = TCL_TOKEN_COMMAND; @@ -947,21 +947,19 @@ ParseExpr( } } if (code != TCL_OK) { - /* - * Here we handle all the syntax errors generated by - * the Tcl_Token generating parsing routines called in the - * switch just above. If the value of parsePtr->incomplete - * is 1, then the error was an unbalanced '[', '(', '{', - * or '"' and parsePtr->term is pointing to that unbalanced - * character. If the value of parsePtr->incomplete is 0, - * then the error is one of lacking whitespace following a - * quoted word, for example: expr {[an error {foo}bar]}, - * and parsePtr->term points to where the whitespace is - * missing. We reset our values of start and scanned so that - * when our error message is constructed, the location of - * the syntax error is sure to appear in it, even if the - * quoted expression is truncated. + * Here we handle all the syntax errors generated by the + * Tcl_Token generating parsing routines called in the switch + * just above. If the value of parsePtr->incomplete is 1, then + * the error was an unbalanced '[', '(', '{', or '"' and + * parsePtr->term is pointing to that unbalanced character. If + * the value of parsePtr->incomplete is 0, then the error is + * one of lacking whitespace following a quoted word, for + * example: expr {[an error {foo}bar]}, and parsePtr->term + * points to where the whitespace is missing. We reset our + * values of start and scanned so that when our error message + * is constructed, the location of the syntax error is sure to + * appear in it, even if the quoted expression is truncated. */ start = parsePtr->term; @@ -973,20 +971,19 @@ ParseExpr( tokenPtr->size = scanned; tokenPtr->numComponents = parsePtr->numTokens - wordIndex - 1; if (!parseOnly && ((lexeme == QUOTED) || (lexeme == BRACED))) { - /* * When this expression is destined to be compiled, and a * braced or quoted word within an expression is known at - * compile time (no runtime substitutions in it), we can - * store it as a literal rather than in its tokenized form. - * This is an advantage since the compiled bytecode is going - * to need the argument in Tcl_Obj form eventually, so it's - * just as well to get there now. Another advantage is that - * with this conversion, larger constant expressions might - * be grown and optimized. + * compile time (no runtime substitutions in it), we can store + * it as a literal rather than in its tokenized form. This is + * an advantage since the compiled bytecode is going to need + * the argument in Tcl_Obj form eventually, so it's just as + * well to get there now. Another advantage is that with this + * conversion, larger constant expressions might be grown and + * optimized. * - * On the contrary, if the end goal of this parse is to - * fill a Tcl_Parse for a caller of Tcl_ParseExpr(), then it's + * On the contrary, if the end goal of this parse is to fill a + * Tcl_Parse for a caller of Tcl_ParseExpr(), then it's * wasteful to convert to a literal only to convert back again * later. */ @@ -1027,16 +1024,16 @@ ParseExpr( /* * A FUNCTION cannot be a constant expression, because Tcl allows * functions to return variable results with the same arguments; - * for example, rand(). Other unary operators can root a constant + * for example, rand(). Other unary operators can root a constant * expression, so long as the argument is a constant expression. */ nodePtr->constant = (lexeme != FUNCTION); /* - * This unary operator is a new incomplete tree, so push it - * onto our stack of incomplete trees. Also remember it as - * the last lexeme we parsed. + * This unary operator is a new incomplete tree, so push it onto + * our stack of incomplete trees. Also remember it as the last + * lexeme we parsed. */ nodePtr->p.prev = incomplete; @@ -1057,15 +1054,14 @@ ParseExpr( if ((lexeme == CLOSE_PAREN) && (nodePtr[-1].lexeme == OPEN_PAREN)) { if (nodePtr[-2].lexeme == FUNCTION) { - /* * Normally, "()" is a syntax error, but as a special * case accept it as an argument list for a function. * Treat this as a special LEAF lexeme, and restart - * the parsing loop with zero characters scanned. - * We'll parse the ")" again the next time through, - * but with the OT_EMPTY leaf as the subexpression - * between the parens. + * the parsing loop with zero characters scanned. We + * will parse the ")" again the next time through, but + * with the OT_EMPTY leaf as the subexpression between + * the parens. */ scanned = 0; @@ -1111,34 +1107,33 @@ ParseExpr( } /* - * Here is where the tree comes together. At this point, we - * have a stack of incomplete trees corresponding to - * substrings that are incomplete expressions, followed by - * a complete tree corresponding to a substring that is itself - * a complete expression, followed by the binary operator we have - * just parsed. The incomplete trees can each be completed by - * adding a right operand. + * Here is where the tree comes together. At this point, we have a + * stack of incomplete trees corresponding to substrings that are + * incomplete expressions, followed by a complete tree + * corresponding to a substring that is itself a complete + * expression, followed by the binary operator we have just + * parsed. The incomplete trees can each be completed by adding a + * right operand. * * To illustrate with an example, when we parse the expression * "1+2*3-4" and we reach this point having just parsed the "-" * operator, we have these incomplete trees: START, "1+", and - * "2*". Next we have the complete subexpression "3". Last is - * the "-" we've just parsed. + * "2*". Next we have the complete subexpression "3". Last is the + * "-" we've just parsed. * - * The next step is to join our complete tree to an operator. - * The choice is governed by the precedence and associativity - * of the competing operators. If we connect it as the right - * operand of our most recent incomplete tree, we get a new - * complete tree, and we can repeat the process. The while - * loop following repeats this until precedence indicates it - * is time to join the complete tree as the left operand of - * the just parsed binary operator. + * The next step is to join our complete tree to an operator. The + * choice is governed by the precedence and associativity of the + * competing operators. If we connect it as the right operand of + * our most recent incomplete tree, we get a new complete tree, + * and we can repeat the process. The while loop following repeats + * this until precedence indicates it is time to join the complete + * tree as the left operand of the just parsed binary operator. * - * Continuing the example, the first pass through the loop - * will join "3" to "2*"; the next pass will join "2*3" to - * "1+". Then we'll exit the loop and join "1+2*3" to "-". - * When we return to parse another lexeme, our stack of - * incomplete trees is START and "1+2*3-". + * Continuing the example, the first pass through the loop will + * join "3" to "2*"; the next pass will join "2*3" to "1+". Then + * we'll exit the loop and join "1+2*3" to "-". When we return to + * parse another lexeme, our stack of incomplete trees is START + * and "1+2*3-". */ while (1) { @@ -1149,16 +1144,18 @@ ParseExpr( } if (incompletePtr->precedence == precedence) { + /* + * Right association rules for exponentiation. + */ - /* Right association rules for exponentiation. */ if (lexeme == EXPON) { break; } /* - * Special association rules for the conditional operators. - * The "?" and ":" operators have equal precedence, but - * must be linked up in sensible pairs. + * Special association rules for the conditional + * operators. The "?" and ":" operators have equal + * precedence, but must be linked up in sensible pairs. */ if ((incompletePtr->lexeme == QUESTION) @@ -1172,7 +1169,9 @@ ParseExpr( } } - /* Some special syntax checks... */ + /* + * Some special syntax checks... + */ /* Parens must balance */ if ((incompletePtr->lexeme == OPEN_PAREN) @@ -1219,9 +1218,9 @@ ParseExpr( } /* - * The QUESTION/COLON and FUNCTION/OPEN_PAREN combinations each - * make up a single operator. Force them to agree whether they - * have a constant expression. + * The QUESTION/COLON and FUNCTION/OPEN_PAREN combinations + * each make up a single operator. Force them to agree whether + * they have a constant expression. */ if ((incompletePtr->lexeme == QUESTION) @@ -1230,7 +1229,6 @@ ParseExpr( } if (incompletePtr->lexeme == START) { - /* * Completing the START tree indicates we're done. * Transfer the parse tree to the caller and return. @@ -1242,8 +1240,8 @@ ParseExpr( /* * With a right operand attached, last incomplete tree has - * become the complete tree. Pop it from the incomplete - * tree stack. + * become the complete tree. Pop it from the incomplete tree + * stack. */ complete = incomplete; @@ -1255,7 +1253,9 @@ ParseExpr( } } - /* More syntax checks... */ + /* + * More syntax checks... + */ /* Parens must balance. */ if (lexeme == CLOSE_PAREN) { @@ -1282,12 +1282,18 @@ ParseExpr( goto error; } - /* Create no node for a CLOSE_PAREN lexeme. */ + /* + * Create no node for a CLOSE_PAREN lexeme. + */ + if (lexeme == CLOSE_PAREN) { break; } - /* Link complete tree as left operand of new node. */ + /* + * Link complete tree as left operand of new node. + */ + nodePtr->lexeme = lexeme; nodePtr->precedence = precedence; nodePtr->mark = MARK_LEFT; @@ -1295,9 +1301,9 @@ ParseExpr( /* * The COMMA operator cannot be optimized, since the function - * needs all of its arguments, and optimization would reduce - * the number. Other binary operators root constant expressions - * when both arguments are constant expressions. + * needs all of its arguments, and optimization would reduce the + * number. Other binary operators root constant expressions when + * both arguments are constant expressions. */ nodePtr->constant = (lexeme != COMMA); @@ -1312,9 +1318,9 @@ ParseExpr( } /* - * With a left operand attached and a right operand missing, - * the just-parsed binary operator is root of a new incomplete - * tree. Push it onto the stack of incomplete trees. + * With a left operand attached and a right operand missing, the + * just-parsed binary operator is root of a new incomplete tree. + * Push it onto the stack of incomplete trees. */ nodePtr->p.prev = incomplete; @@ -1332,31 +1338,35 @@ ParseExpr( error: /* - * We only get here if there's been an error. - * Any errors that didn't get a suitable parsePtr->errorType, - * get recorded as syntax errors. + * We only get here if there's been an error. Any errors that didn't get a + * suitable parsePtr->errorType, get recorded as syntax errors. */ if (parsePtr->errorType == TCL_PARSE_SUCCESS) { parsePtr->errorType = TCL_PARSE_SYNTAX; } - /* Free any partial parse tree we've built. */ + /* + * Free any partial parse tree we've built. + */ + if (nodes != NULL) { ckfree((char*) nodes); } if (interp == NULL) { + /* + * Nowhere to report an error message, so just free it. + */ - /* Nowhere to report an error message, so just free it */ if (msg) { Tcl_DecrRefCount(msg); } } else { /* - * Construct the complete error message. Start with the simple - * error message, pulled from the interp result if necessary... + * Construct the complete error message. Start with the simple error + * message, pulled from the interp result if necessary... */ if (msg == NULL) { @@ -1381,7 +1391,10 @@ ParseExpr( start + scanned, (start + scanned + limit > parsePtr->end) ? "" : "..."); - /* Next, append any postscript message. */ + /* + * Next, append any postscript message. + */ + if (post != NULL) { Tcl_AppendToObj(msg, ";\n", -1); Tcl_AppendObjToObj(msg, post); @@ -1389,7 +1402,10 @@ ParseExpr( } Tcl_SetObjResult(interp, msg); - /* Finally, place context information in the errorInfo. */ + /* + * Finally, place context information in the errorInfo. + */ + numBytes = parsePtr->end - parsePtr->string; Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (parsing expression \"%.*s%s\")", @@ -1408,10 +1424,10 @@ ParseExpr( * Given a string, the numBytes bytes starting at start, and an OpNode * tree and Tcl_Token array created by passing that same string to * ParseExpr(), this function writes into *parsePtr the sequence of - * Tcl_Tokens needed so to satisfy the historical interface provided - * by Tcl_ParseExpr(). Note that this routine exists only for the sake - * of the public Tcl_ParseExpr() routine. It is not used by Tcl itself - * at all. + * Tcl_Tokens needed so to satisfy the historical interface provided by + * Tcl_ParseExpr(). Note that this routine exists only for the sake of + * the public Tcl_ParseExpr() routine. It is not used by Tcl itself at + * all. * * Results: * None. @@ -1447,7 +1463,10 @@ ConvertTreeToTokens( nodePtr->mark++; - /* Handle next child node or leaf */ + /* + * Handle next child node or leaf. + */ + switch (next) { case OT_EMPTY: @@ -1461,7 +1480,10 @@ ConvertTreeToTokens( start +=scanned; numBytes -= scanned; - /* Reparse the literal to get pointers into source string */ + /* + * Reparse the literal to get pointers into source string. + */ + scanned = ParseLexeme(start, numBytes, &lexeme, NULL); TclGrowParseTokenArray(parsePtr, 2); @@ -1481,27 +1503,25 @@ ConvertTreeToTokens( break; case OT_TOKENS: { - /* - * tokenPtr points to a token sequence that came from parsing - * a Tcl word. A Tcl word is made up of a sequence of one or - * more elements. When the word is only a single element, it's - * been the historical practice to replace the TCL_TOKEN_WORD - * token directly with a TCL_TOKEN_SUB_EXPR token. However, - * when the word has multiple elements, a TCL_TOKEN_WORD token - * is kept as a grouping device so that TCL_TOKEN_SUB_EXPR - * always has only one element. Wise or not, these are the - * rules the Tcl expr parser has followed, and for the sake - * of those few callers of Tcl_ParseExpr() we do not change - * them now. Internally, we can do better. + * tokenPtr points to a token sequence that came from parsing a + * Tcl word. A Tcl word is made up of a sequence of one or more + * elements. When the word is only a single element, it's been the + * historical practice to replace the TCL_TOKEN_WORD token + * directly with a TCL_TOKEN_SUB_EXPR token. However, when the + * word has multiple elements, a TCL_TOKEN_WORD token is kept as a + * grouping device so that TCL_TOKEN_SUB_EXPR always has only one + * element. Wise or not, these are the rules the Tcl expr parser + * has followed, and for the sake of those few callers of + * Tcl_ParseExpr() we do not change them now. Internally, we can + * do better. */ int toCopy = tokenPtr->numComponents + 1; if (tokenPtr->numComponents == tokenPtr[1].numComponents + 1) { - /* - * Single element word. Copy tokens and convert the leading + * Single element word. Copy tokens and convert the leading * token to TCL_TOKEN_SUB_EXPR. */ @@ -1512,11 +1532,10 @@ ConvertTreeToTokens( subExprTokenPtr->type = TCL_TOKEN_SUB_EXPR; parsePtr->numTokens += toCopy; } else { - /* - * Multiple element word. Create a TCL_TOKEN_SUB_EXPR - * token to lead, with fields initialized from the leading - * token, then copy entire set of word tokens. + * Multiple element word. Create a TCL_TOKEN_SUB_EXPR token to + * lead, with fields initialized from the leading token, then + * copy entire set of word tokens. */ TclGrowParseTokenArray(parsePtr, toCopy+1); @@ -1542,12 +1561,18 @@ ConvertTreeToTokens( /* Advance to the child node, which is an operator. */ nodePtr = nodes + next; - /* Skip any white space that comes before the subexpression */ + /* + * Skip any white space that comes before the subexpression. + */ + scanned = TclParseAllWhiteSpace(start, numBytes); start +=scanned; numBytes -= scanned; - /* Generate tokens for the operator / subexpression... */ + /* + * Generate tokens for the operator / subexpression... + */ + switch (nodePtr->lexeme) { case OPEN_PAREN: case COMMA: @@ -1564,16 +1589,16 @@ ConvertTreeToTokens( /* * Remember the index of the last subexpression we were - * working on -- that of our parent. We'll stack it later. + * working on -- that of our parent. We'll stack it later. */ parentIdx = subExprTokenIdx; /* * Verify space for the two leading Tcl_Tokens representing - * the subexpression rooted by this operator. The first - * Tcl_Token will be of type TCL_TOKEN_SUB_EXPR; the second - * of type TCL_TOKEN_OPERATOR. + * the subexpression rooted by this operator. The first + * Tcl_Token will be of type TCL_TOKEN_SUB_EXPR; the second of + * type TCL_TOKEN_OPERATOR. */ TclGrowParseTokenArray(parsePtr, 2); @@ -1592,7 +1617,7 @@ ConvertTreeToTokens( /* * Eventually, we know that the numComponents field of the - * Tcl_Token of type TCL_TOKEN_OPERATOR will be 0. This means + * Tcl_Token of type TCL_TOKEN_OPERATOR will be 0. This means * we can make other use of this field for now to track the * stack of subexpressions we have pending. */ @@ -1690,7 +1715,7 @@ ConvertTreeToTokens( /* * All the Tcl_Tokens allocated and filled belong to - * this subexpresion. The first token is the leading + * this subexpresion. The first token is the leading * TCL_TOKEN_SUB_EXPR token, and all the rest (one fewer) * are its components. */ @@ -1711,7 +1736,10 @@ ConvertTreeToTokens( } } - /* Since we're returning to parent, skip child handling code. */ + /* + * Since we're returning to parent, skip child handling code. + */ + nodePtr = nodes + nodePtr->p.parent; goto router; } @@ -1759,16 +1787,16 @@ Tcl_ParseExpr( OpNode *opTree = NULL; /* Will point to the tree of operators */ Tcl_Obj *litList = Tcl_NewObj(); /* List to hold the literals */ Tcl_Obj *funcList = Tcl_NewObj(); /* List to hold the functon names*/ - Tcl_Parse *exprParsePtr = - (Tcl_Parse *) TclStackAlloc(interp, sizeof(Tcl_Parse)); + Tcl_Parse *exprParsePtr = (Tcl_Parse *) + TclStackAlloc(interp, sizeof(Tcl_Parse)); /* Holds the Tcl_Tokens of substitutions */ if (numBytes < 0) { numBytes = (start ? strlen(start) : 0); } - code = ParseExpr(interp, start, numBytes, &opTree, litList, - funcList, exprParsePtr, 1 /* parseOnly */); + code = ParseExpr(interp, start, numBytes, &opTree, litList, funcList, + exprParsePtr, 1 /* parseOnly */); Tcl_DecrRefCount(funcList); Tcl_DecrRefCount(litList); @@ -1900,11 +1928,10 @@ ParseLexeme( case 'i': if ((numBytes > 1) && (start[1] == 'n') && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) { - /* - * Must make this check so we can tell the difference between - * the "in" operator and the "int" function name and the - * "infinity" numeric value. + * Must make this check so we can tell the difference between the + * "in" operator and the "int" function name and the "infinity" + * numeric value. */ *lexemePtr = IN_LIST; @@ -1950,6 +1977,7 @@ ParseLexeme( scanned = Tcl_UtfToUniChar(start, &ch); } else { char utfBytes[TCL_UTF_MAX]; + memcpy(utfBytes, start, (size_t) numBytes); utfBytes[numBytes] = '\0'; scanned = Tcl_UtfToUniChar(utfBytes, &ch); @@ -1967,6 +1995,7 @@ ParseLexeme( scanned = Tcl_UtfToUniChar(end, &ch); } else { char utfBytes[TCL_UTF_MAX]; + memcpy(utfBytes, end, (size_t) numBytes); utfBytes[numBytes] = '\0'; scanned = Tcl_UtfToUniChar(utfBytes, &ch); @@ -2005,21 +2034,23 @@ TclCompileExpr( const char *script, /* The source script to compile. */ int numBytes, /* Number of bytes in script. */ CompileEnv *envPtr, /* Holds resulting instructions. */ - int optimize) /* 0 for one-off expressions */ + int optimize) /* 0 for one-off expressions. */ { OpNode *opTree = NULL; /* Will point to the tree of operators */ Tcl_Obj *litList = Tcl_NewObj(); /* List to hold the literals */ Tcl_Obj *funcList = Tcl_NewObj(); /* List to hold the functon names*/ - Tcl_Parse *parsePtr = - (Tcl_Parse *) TclStackAlloc(interp, sizeof(Tcl_Parse)); + Tcl_Parse *parsePtr = (Tcl_Parse *) + TclStackAlloc(interp, sizeof(Tcl_Parse)); /* Holds the Tcl_Tokens of substitutions */ int code = ParseExpr(interp, script, numBytes, &opTree, litList, funcList, parsePtr, 0 /* parseOnly */); if (code == TCL_OK) { + /* + * Valid parse; compile the tree. + */ - /* Valid parse; compile the tree. */ int objc; Tcl_Obj *const *litObjv; Tcl_Obj **funcObjv; @@ -2098,20 +2129,20 @@ ExecConstantExprTree( *---------------------------------------------------------------------- * * CompileExprTree -- - * Compiles and writes to envPtr instructions for the subexpression - * tree at index in the nodes array. (*litObjvPtr) must point to the - * proper location in a corresponding literals list. Likewise, when - * non-NULL, funcObjv and tokenPtr must point into matching arrays of - * function names and Tcl_Token's derived from earlier call to - * ParseExpr(). When optimize is true, any constant subexpressions - * will be precomputed. + * + * Compiles and writes to envPtr instructions for the subexpression tree + * at index in the nodes array. (*litObjvPtr) must point to the proper + * location in a corresponding literals list. Likewise, when non-NULL, + * funcObjv and tokenPtr must point into matching arrays of function + * names and Tcl_Token's derived from earlier call to ParseExpr(). When + * optimize is true, any constant subexpressions will be precomputed. * * Results: * None. * * Side effects: * Adds instructions to envPtr to evaluate the expression at runtime. - * Consumes subtree of nodes rooted at index. Advances the pointer + * Consumes subtree of nodes rooted at index. Advances the pointer * *litObjvPtr. * *---------------------------------------------------------------------- @@ -2187,9 +2218,9 @@ CompileExprTree( /* * Start a count of the number of words in this function - * command invocation. In case there's already a count - * in progress (nested functions), save it in our unused - * "left" field for restoring later. + * command invocation. In case there's already a count in + * progress (nested functions), save it in our unused "left" + * field for restoring later. */ nodePtr->left = numWords; @@ -2227,10 +2258,9 @@ CompileExprTree( /* do nothing */ break; case FUNCTION: - /* - * Use the numWords count we've kept to invoke the - * function command with the correct number of arguments. + * Use the numWords count we've kept to invoke the function + * command with the correct number of arguments. */ if (numWords < 255) { @@ -2239,13 +2269,18 @@ CompileExprTree( TclEmitInstInt4(INST_INVOKE_STK4, numWords, envPtr); } - /* Restore any saved numWords value. */ + /* + * Restore any saved numWords value. + */ + numWords = nodePtr->left; convert = 1; break; case COMMA: + /* + * Each comma implies another function argument. + */ - /* Each comma implies another function argument. */ numWords++; break; case COLON: @@ -2336,10 +2371,10 @@ CompileExprTree( * * However, the design of the "global" and "local" * LiteralTable does not permit the value of lePtr->objPtr - * to change. So rather than replace lePtr->objPtr, we - * do surgery to transfer our desired intrep into it. - * + * to change. So rather than replace lePtr->objPtr, we do + * surgery to transfer our desired intrep into it. */ + objPtr->typePtr = literal->typePtr; objPtr->internalRep = literal->internalRep; literal->typePtr = NULL; @@ -2347,13 +2382,14 @@ CompileExprTree( TclEmitPush(index, envPtr); } else { /* - * When optimize==0, we know the expression is a one-off - * and there's nothing to be gained from sharing literals - * when they won't live long, and the copies we have already - * have an appropriate intrep. In this case, skip literal + * When optimize==0, we know the expression is a one-off and + * there's nothing to be gained from sharing literals when + * they won't live long, and the copies we have already have + * an appropriate intrep. In this case, skip literal * registration that would enable sharing, and use the routine * that preserves intreps. */ + TclEmitPush(TclAddLiteralObj(envPtr, literal, NULL), envPtr); } (*litObjvPtr)++; @@ -2367,6 +2403,7 @@ CompileExprTree( default: if (optimize && nodes[next].constant) { Tcl_InterpState save = Tcl_SaveInterpState(interp, TCL_OK); + if (ExecConstantExprTree(interp, nodes, next, litObjvPtr) == TCL_OK) { TclEmitPush(TclAddLiteralObj(envPtr, @@ -2408,7 +2445,7 @@ TclSingleOpCmd( int objc, Tcl_Obj *const objv[]) { - TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData; + TclOpCmdClientData *occdPtr = clientData; unsigned char lexeme; OpNode nodes[2]; Tcl_Obj *const *litObjv = objv + 1; @@ -2439,10 +2476,11 @@ TclSingleOpCmd( *---------------------------------------------------------------------- * * TclSortingOpCmd -- - * Implements the commands: <, <=, >, >=, ==, eq - * in the ::tcl::mathop namespace. These commands are defined for + * Implements the commands: + * <, <=, >, >=, ==, eq + * in the ::tcl::mathop namespace. These commands are defined for * arbitrary number of arguments by computing the AND of the base - * operator applied to all neighbor argument pairs. + * operator applied to all neighbor argument pairs. * * Results: * A standard Tcl return code and result left in interp. @@ -2465,7 +2503,7 @@ TclSortingOpCmd( if (objc < 3) { Tcl_SetObjResult(interp, Tcl_NewBooleanObj(1)); } else { - TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData; + TclOpCmdClientData *occdPtr = clientData; Tcl_Obj **litObjv = (Tcl_Obj **) TclStackAlloc(interp, 2*(objc-2)*sizeof(Tcl_Obj *)); OpNode *nodes = (OpNode *) TclStackAlloc(interp, @@ -2520,9 +2558,9 @@ TclSortingOpCmd( * * TclVariadicOpCmd -- * Implements the commands: +, *, &, |, ^, ** - * in the ::tcl::mathop namespace. These commands are defined for + * in the ::tcl::mathop namespace. These commands are defined for * arbitrary number of arguments by repeatedly applying the base - * operator with suitable associative rules. When fewer than two + * operator with suitable associative rules. When fewer than two * arguments are provided, suitable identity values are returned. * * Results: @@ -2541,7 +2579,7 @@ TclVariadicOpCmd( int objc, Tcl_Obj *const objv[]) { - TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData; + TclOpCmdClientData *occdPtr = clientData; unsigned char lexeme; int code; @@ -2603,7 +2641,7 @@ TclVariadicOpCmd( nodes[0].lexeme = START; nodes[0].mark = MARK_RIGHT; if (lexeme == EXPON) { - for (i=objc-2; i>0; i-- ) { + for (i=objc-2; i>0; i--) { nodes[i].lexeme = lexeme; nodes[i].mark = MARK_LEFT; nodes[i].left = OT_LITERAL; @@ -2614,7 +2652,7 @@ TclVariadicOpCmd( lastOp = i; } } else { - for (i=1; iexpected); return TCL_ERROR; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 94e3c61..d93e321 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.163 2008/11/27 08:23:51 ferrieux Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.164 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -432,9 +432,8 @@ static void PrintSourceToObj(Tcl_Obj *appendObj, static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset, Tcl_Token *tokenPtr, const char *cmd, int len, int numWords, int line, int **lines); - -static void EnterCmdWordIndex (ExtCmdLoc *eclPtr, Tcl_Obj* obj, - int pc, int word); +static void EnterCmdWordIndex(ExtCmdLoc *eclPtr, Tcl_Obj* obj, + int pc, int word); /* * The structure below defines the bytecode Tcl object type by means of @@ -914,9 +913,8 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->neiloc = 0; envPtr->extCmdMapPtr->nueiloc = 0; - if ((invoker == NULL) || - (invoker->type == TCL_LOCATION_EVAL_LIST)) { - /* + if ((invoker == NULL) || (invoker->type == TCL_LOCATION_EVAL_LIST)) { + /* * Initialize the compiler for relative counting in case of a * dynamic context. */ @@ -925,7 +923,7 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->type = (envPtr->procPtr ? TCL_LOCATION_PROC : TCL_LOCATION_BC); } else { - /* + /* * Initialize the compiler using the context, making counting absolute * to that context. Note that the context can be byte code execution. * In that case we have to fill out the missing pieces (line, path, @@ -941,7 +939,7 @@ TclInitCompileEnv( if (invoker->type == TCL_LOCATION_BC) { /* * Note: Type BC => ctx.data.eval.path is not used. - * ctx.data.tebc.codePtr is used instead. + * ctx.data.tebc.codePtr is used instead. */ TclGetSrcInfoForPc(ctxPtr); @@ -1451,7 +1449,8 @@ TclCompileScript( tokenPtr[1].start, tokenPtr[1].size); if (cmdPtr != NULL) { TclSetCmdNameObj(interp, - envPtr->literalArrayPtr[objIndex].objPtr,cmdPtr); + envPtr->literalArrayPtr[objIndex].objPtr, + cmdPtr); } if ((wordIdx == 0) && (parsePtr->numWords == 1)) { /* @@ -1898,8 +1897,8 @@ TclCompileExprWords( * * Side effects: * Instructions are added to envPtr to execute a no-op at runtime. No - * result is pushed onto the stack: the compiler has to take care of this - * itself if the last compiled command is a NoOp. + * result is pushed onto the stack: the compiler has to take care of this + * itself if the last compiled command is a NoOp. * *---------------------------------------------------------------------- */ @@ -2131,7 +2130,7 @@ TclFindCompiledLocal( int nameBytes, /* Number of bytes in the name. */ int create, /* If 1, allocate a local frame entry for the * variable if it is new. */ - CompileEnv *envPtr) /* Points to the current compile environment*/ + CompileEnv *envPtr) /* Points to the current compile environment*/ { register CompiledLocal *localPtr; int localVar = -1; @@ -2466,7 +2465,7 @@ EnterCmdWordData( wordLine = line; for (wordIdx=0 ; wordIdxnumComponents + 1) { - TclAdvanceLines(&wordLine, last, tokenPtr->start); + TclAdvanceLines(&wordLine, last, tokenPtr->start); wwlines[wordIdx] = (TclWordKnownAtCompileTime(tokenPtr, NULL) ? wordLine : -1); ePtr->line[wordIdx] = wordLine; @@ -2478,36 +2477,36 @@ EnterCmdWordData( } static void -EnterCmdWordIndex ( - ExtCmdLoc *eclPtr, - Tcl_Obj* obj, - int pc, - int word) +EnterCmdWordIndex( + ExtCmdLoc *eclPtr, + Tcl_Obj *obj, + int pc, + int word) { ExtIndex* eiPtr; if (eclPtr->nueiloc >= eclPtr->neiloc) { /* - * Expand the ExtIndex array by allocating more storage from the heap. The - * currently allocated ECL entries are stored from eclPtr->loc[0] up - * to eclPtr->loc[eclPtr->nuloc-1] (inclusive). + * Expand the ExtIndex array by allocating more storage from the heap. + * The currently allocated ECL entries are stored from eclPtr->loc[0] + * up to eclPtr->loc[eclPtr->nuloc-1] (inclusive). */ size_t currElems = eclPtr->neiloc; size_t newElems = (currElems ? 2*currElems : 1); size_t newBytes = newElems * sizeof(ExtIndex); - eclPtr->eiloc = (ExtIndex *) ckrealloc((char *)(eclPtr->eiloc), newBytes); + eclPtr->eiloc = (ExtIndex *) + ckrealloc((char *)(eclPtr->eiloc), newBytes); eclPtr->neiloc = newElems; } eiPtr = &eclPtr->eiloc[eclPtr->nueiloc]; - - eiPtr->obj = obj; - eiPtr->pc = pc; + eiPtr->obj = obj; + eiPtr->pc = pc; eiPtr->word = word; - eclPtr->nueiloc ++; + eclPtr->nueiloc++; } /* diff --git a/generic/tclConfig.c b/generic/tclConfig.c index b2d3fbb..0bcd0d8 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclConfig.c,v 1.24 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclConfig.c,v 1.25 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -179,7 +179,7 @@ Tcl_RegisterConfig( if (Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdName), QueryConfigObjCmd, cdPtr, QueryConfigDelete) == NULL) { - Tcl_Panic("%s: %s", "Tcl_RegisterConfig", + Tcl_Panic("%s: %s", "Tcl_RegisterConfig", "Unable to create query command for package configuration"); } @@ -233,12 +233,12 @@ QueryConfigObjCmd( pDB = GetConfigDict(interp); if (Tcl_DictObjGet(interp, pDB, pkgName, &pkgDict) != TCL_OK || pkgDict == NULL) { - /* + /* * Maybe a Tcl_Panic is better, because the package data has to be * present. */ - Tcl_SetResult(interp, "package not known", TCL_STATIC); + Tcl_SetResult(interp, "package not known", TCL_STATIC); return TCL_ERROR; } diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 1212dac..5c4295e 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.74 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.75 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -162,7 +162,7 @@ typedef struct Dict { const Tcl_ObjType tclDictType = { "dict", FreeDictInternalRep, /* freeIntRepProc */ - DupDictInternalRep, /* dupIntRepProc */ + DupDictInternalRep, /* dupIntRepProc */ UpdateStringOfDict, /* updateStringProc */ SetDictFromAny /* setFromAnyProc */ }; @@ -668,8 +668,8 @@ SetDictFromAny( } TclNewObj(keyPtr); - keyPtr->bytes = s; - keyPtr->length = elemSize; + keyPtr->bytes = s; + keyPtr->length = elemSize; p = nextElem; lenRemain = (limit - nextElem); @@ -704,8 +704,8 @@ SetDictFromAny( } TclNewObj(valuePtr); - valuePtr->bytes = s; - valuePtr->length = elemSize; + valuePtr->bytes = s; + valuePtr->length = elemSize; /* * Store key and value in the hash table we're building. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index c6e0d4f..d1c29eb 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.423 2008/12/18 23:00:39 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.424 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -174,14 +174,14 @@ static BuiltinFunc const tclBuiltinFuncTable[] = { typedef struct BottomData { struct BottomData *prevBottomPtr; - TEOV_callback *rootPtr; /* State when this bytecode execution began: */ - ByteCode *codePtr; /* constant until it returns */ - /* ------------------------------------------*/ - TEOV_callback *atExitPtr; /* This field is used on return FROM here */ - /* ------------------------------------------*/ - unsigned char *pc; /* These fields are used on return TO this */ - ptrdiff_t *catchTop; /* this level: they record the state when a */ - int cleanup; /* new codePtr was received for NR execution */ + TEOV_callback *rootPtr; /* State when this bytecode execution began: */ + ByteCode *codePtr; /* constant until it returns */ + /* ------------------------------------------*/ + TEOV_callback *atExitPtr; /* This field is used on return FROM here */ + /* ------------------------------------------*/ + unsigned char *pc; /* These fields are used on return TO this */ + ptrdiff_t *catchTop; /* this level: they record the state when a */ + int cleanup; /* new codePtr was received for NR execution */ Tcl_Obj *auxObjList; } BottomData; @@ -1546,7 +1546,7 @@ TclCompileObj( } } - /* + /* * Increment the code's ref count while it is being executed. If * afterwards no references to it remain, free the code. */ @@ -1786,10 +1786,10 @@ TclExecuteByteCode( ptrdiff_t *catchTop = 0; register Tcl_Obj **tosPtr = NULL; - /* Cached pointer to top of evaluation + /* Cached pointer to top of evaluation * stack. */ register unsigned char *pc = NULL; - /* The current program counter. */ + /* The current program counter. */ int instructionCount = 0; /* Counter that is used to work out when to * call Tcl_AsyncReady() */ Tcl_Obj *auxObjList = NULL; /* Linked list of aux data, used for {*} and @@ -1948,35 +1948,36 @@ TclExecuteByteCode( case TCL_NR_YIELD_TYPE: { /*[yield] */ CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - if (!corPtr) { - Tcl_SetResult(interp, - "yield can only be called in a coroutine", TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); - result = TCL_ERROR; - goto checkForCatch; - } - NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); - NRE_ASSERT(corPtr->stackLevel != NULL); - NRE_ASSERT(bottomPtr == corPtr->eePtr->bottomPtr); - if (corPtr->stackLevel != &initLevel) { - Tcl_SetResult(interp, - "cannot yield: C stack busy", TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); - result = TCL_ERROR; - goto checkForCatch; - } - - /* - * Save our state, restore the caller's execEnv and return - */ - - NR_DATA_BURY(); - esPtr->tosPtr = tosPtr; - corPtr->stackLevel = NULL; /* mark suspended */ - iPtr->execEnvPtr->bottomPtr = bottomPtr; - - iPtr->execEnvPtr = corPtr->callerEEPtr; - return TCL_OK; + if (!corPtr) { + Tcl_SetResult(interp, + "yield can only be called in a coroutine", + TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); + result = TCL_ERROR; + goto checkForCatch; + } + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + NRE_ASSERT(corPtr->stackLevel != NULL); + NRE_ASSERT(bottomPtr == corPtr->eePtr->bottomPtr); + if (corPtr->stackLevel != &initLevel) { + Tcl_SetResult(interp, "cannot yield: C stack busy", + TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); + result = TCL_ERROR; + goto checkForCatch; + } + + /* + * Save our state, restore the caller's execEnv and return + */ + + NR_DATA_BURY(); + esPtr->tosPtr = tosPtr; + corPtr->stackLevel = NULL; /* mark suspended */ + iPtr->execEnvPtr->bottomPtr = bottomPtr; + + iPtr->execEnvPtr = corPtr->callerEEPtr; + return TCL_OK; } default: Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); @@ -2083,8 +2084,8 @@ TclExecuteByteCode( } #endif } else { - cleanup = 0; /* already cleaned up */ - pc--; /* was pointing to next instruction */ + cleanup = 0; /* already cleaned up */ + pc--; /* was pointing to next instruction */ goto processExceptionReturn; } } @@ -2563,7 +2564,7 @@ TclExecuteByteCode( p += length; } } - } + } TRACE_WITH_OBJ(("%u => ", opnd), objResultPtr); NEXT_INST_V(2, opnd, 1); @@ -7836,7 +7837,7 @@ TclExecuteByteCode( oldBottomPtr = bottomPtr->prevBottomPtr; atExitPtr = bottomPtr->atExitPtr; iPtr->cmdFramePtr = bcFramePtr->nextPtr; - TclStackFree(interp, bottomPtr); /* free my stack */ + TclStackFree(interp, bottomPtr); /* free my stack */ if (--codePtr->refCount <= 0) { TclCleanupByteCode(codePtr); @@ -7849,9 +7850,9 @@ TclExecuteByteCode( * with atExit handlers and tailcalls. */ - bottomPtr = oldBottomPtr; /* back to old bc */ + bottomPtr = oldBottomPtr; /* back to old bc */ - rerunCallbacks: + rerunCallbacks: result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); NR_DATA_DIG(); @@ -7873,8 +7874,10 @@ TclExecuteByteCode( } NRE_ASSERT(lastPtr->nextPtr == NULL); if (!isTailcall) { - /* save the interp state, arrange for restoring it after - running the callbacks.*/ + /* + * Save the interp state, arrange for restoring it after + * running the callbacks. + */ TclNRAddCallback(interp, NRRestoreInterpState, Tcl_SaveInterpState(interp, result), NULL, @@ -7907,8 +7910,8 @@ TclExecuteByteCode( switch (type) { case TCL_NR_BC_TYPE: /* - * One of the callbacks requested a new execution: a tailcall! - * Start the new bytecode. + * One of the callbacks requested a new execution: a + * tailcall! Start the new bytecode. */ goto nonRecursiveCallStart; @@ -7918,7 +7921,8 @@ TclExecuteByteCode( TCLNR_FREE(interp, callbackPtr); Tcl_SetResult(interp, - "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); + "atProcExit/tailcall cannot be invoked recursively", + TCL_STATIC); result = TCL_ERROR; goto rerunCallbacks; default: @@ -7930,9 +7934,11 @@ TclExecuteByteCode( if (atExitPtr) { if (!isTailcall) { - /* save the interp state, arrange for restoring it after - running the callbacks. Put the callback at the bottom of the - atExit stack */ + /* + * Save the interp state, arrange for restoring it after running + * the callbacks. Put the callback at the bottom of the atExit + * stack. + */ Tcl_InterpState state = Tcl_SaveInterpState(interp, result); TEOV_callback *lastPtr = atExitPtr; @@ -8219,7 +8225,7 @@ TclGetSrcInfoForPc( } srcOffset = cfPtr->cmd.str.cmd - codePtr->source; - eclPtr = (ExtCmdLoc *) Tcl_GetHashValue (hePtr); + eclPtr = (ExtCmdLoc *) Tcl_GetHashValue(hePtr); for (i=0; i < eclPtr->nuloc; i++) { if (eclPtr->loc[i].srcOffset == srcOffset) { diff --git a/generic/tclHash.c b/generic/tclHash.c index 89fbb6f..218d8e1 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.37 2008/11/17 22:15:34 nijtmans Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.38 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -283,13 +283,13 @@ Tcl_CreateHashEntry( if (typePtr->hashKeyProc) { hash = typePtr->hashKeyProc(tablePtr, (void *) key); if (typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { - index = RANDOM_INDEX (tablePtr, hash); + index = RANDOM_INDEX(tablePtr, hash); } else { index = hash & tablePtr->mask; } } else { hash = PTR2UINT(key); - index = RANDOM_INDEX (tablePtr, hash); + index = RANDOM_INDEX(tablePtr, hash); } /* @@ -298,6 +298,7 @@ Tcl_CreateHashEntry( if (typePtr->compareKeysProc) { Tcl_CompareHashKeysProc *compareKeysProc = typePtr->compareKeysProc; + for (hPtr = tablePtr->buckets[index]; hPtr != NULL; hPtr = hPtr->nextPtr) { #if TCL_HASH_KEY_STORE_HASH @@ -441,7 +442,7 @@ Tcl_DeleteHashEntry( tablePtr->numEntries--; if (typePtr->freeEntryProc) { - typePtr->freeEntryProc (entryPtr); + typePtr->freeEntryProc(entryPtr); } else { ckfree((char *) entryPtr); } @@ -492,7 +493,7 @@ Tcl_DeleteHashTable( while (hPtr != NULL) { nextPtr = hPtr->nextPtr; if (typePtr->freeEntryProc) { - typePtr->freeEntryProc (hPtr); + typePtr->freeEntryProc(hPtr); } else { ckfree((char *) hPtr); } @@ -1041,7 +1042,7 @@ RebuildTable( #if TCL_HASH_KEY_STORE_HASH if (typePtr->hashKeyProc == NULL || typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { - index = RANDOM_INDEX (tablePtr, hPtr->hash); + index = RANDOM_INDEX(tablePtr, hPtr->hash); } else { index = PTR2UINT(hPtr->hash) & tablePtr->mask; } @@ -1055,12 +1056,12 @@ RebuildTable( hash = typePtr->hashKeyProc(tablePtr, key); if (typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { - index = RANDOM_INDEX (tablePtr, hash); + index = RANDOM_INDEX(tablePtr, hash); } else { index = hash & tablePtr->mask; } } else { - index = RANDOM_INDEX (tablePtr, key); + index = RANDOM_INDEX(tablePtr, key); } hPtr->bucketPtr = &(tablePtr->buckets[index]); diff --git a/generic/tclIO.c b/generic/tclIO.c index b3df82e..3ed45a2 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.157 2008/12/18 23:48:39 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.158 2009/01/09 11:21:45 dkf Exp $ */ #include "tclInt.h" @@ -64,7 +64,7 @@ static int CloseChannel(Tcl_Interp *interp, Channel *chanPtr, int errorCode); static int CloseChannelPart(Tcl_Interp *interp, Channel *chanPtr, int errorCode, int flags); -static int CloseWrite(Tcl_Interp *interp, Channel* chanPtr); +static int CloseWrite(Tcl_Interp *interp, Channel* chanPtr); static void CommonGetsCleanup(Channel *chanPtr); static int CopyAndTranslateBuffer(ChannelState *statePtr, char *result, int space); @@ -3101,7 +3101,7 @@ Tcl_Close( * * Tcl_CloseEx -- * - * Closes one side of a channel, read or write. + * Closes one side of a channel, read or write. * * Results: * A standard Tcl result. @@ -3122,8 +3122,9 @@ Tcl_Close( int Tcl_CloseEx( Tcl_Interp *interp, /* Interpreter for errors. */ - Tcl_Channel chan, /* The channel being closed. May still be used by some interpreter */ - int flags) /* Flags telling us which side to close. */ + Tcl_Channel chan, /* The channel being closed. May still be used + * by some interpreter. */ + int flags) /* Flags telling us which side to close. */ { Channel *chanPtr; /* The real IO channel. */ ChannelState *statePtr; /* State of real IO channel. */ @@ -3138,12 +3139,12 @@ Tcl_CloseEx( statePtr = chanPtr->state; /* - * Does the channel support half-close anyway ? Error if not. + * Does the channel support half-close anyway? Error if not. */ if (!chanPtr->typePtr->close2Proc) { - Tcl_AppendResult (interp, "Half-close of channels not supported by ", - chanPtr->typePtr->typeName, "s", NULL); + Tcl_AppendResult(interp, "Half-close of channels not supported by ", + chanPtr->typePtr->typeName, "s", NULL); return TCL_ERROR; } @@ -3152,9 +3153,9 @@ Tcl_CloseEx( */ if (chanPtr != statePtr->topChanPtr) { - Tcl_AppendResult (interp, - "Half-close not applicable to stack of transformations", - NULL); + Tcl_AppendResult(interp, + "Half-close not applicable to stack of transformations", + NULL); return TCL_ERROR; } @@ -3166,14 +3167,15 @@ Tcl_CloseEx( if (!(statePtr->flags & (TCL_READABLE | TCL_WRITABLE) & flags)) { const char *msg; + if (flags & TCL_CLOSE_READ) { msg = "read"; } else { msg = "write"; } - Tcl_AppendResult (interp, "Half-close of ", msg, - "-side not possible, side not opened or already closed", - NULL); + Tcl_AppendResult(interp, "Half-close of ", msg, + "-side not possible, side not opened or already closed", + NULL); return TCL_ERROR; } @@ -3196,10 +3198,8 @@ Tcl_CloseEx( * there cannot be for the read-side. */ - return CloseChannelPart (interp, chanPtr, 0, flags); - + return CloseChannelPart(interp, chanPtr, 0, flags); } else if (flags & TCL_CLOSE_WRITE) { - if ((statePtr->curOutPtr != NULL) && IsBufferReady(statePtr->curOutPtr)) { SetFlag(statePtr, BUFFER_READY); @@ -3307,12 +3307,10 @@ CloseWrite( * * CloseChannelPart -- * - * Utility procedure to close a channel partially and free associated resources. - * - * If the channel was stacked it will never be run (The higher level forbid this). - * - * If the channel was not stacked, then we will free all the bits of the - * chosen side (read, or write) for the TOP channel. + * Utility procedure to close a channel partially and free associated + * resources. If the channel was stacked it will never be run (The higher + * level forbid this). If the channel was not stacked, then we will free + * all the bits of the chosen side (read, or write) for the TOP channel. * * Results: * Error code from an unreported error or the driver close2 operation. @@ -3326,9 +3324,10 @@ CloseWrite( static int CloseChannelPart( Tcl_Interp *interp, /* Interpreter for errors. */ - Channel* chanPtr, /* The channel being closed. May still be used by some interpreter */ - int errorCode, /* Status of operation so far. */ - int flags) /* Flags telling us which side to close. */ + Channel* chanPtr, /* The channel being closed. May still be used + * by some interpreter. */ + int errorCode, /* Status of operation so far. */ + int flags) /* Flags telling us which side to close. */ { ChannelState *statePtr; /* State of real IO channel. */ int result; /* Of calling the close2proc. */ @@ -3341,16 +3340,15 @@ CloseChannelPart( */ DiscardInputQueued(statePtr, 1); - } else if (flags & TCL_CLOSE_WRITE) { - /* * The caller guarantees that there are no more buffers queued for * output. */ if (statePtr->outQueueHead != NULL) { - Tcl_Panic("ClosechanHalf, closed write-side of channel: queued output left"); + Tcl_Panic("ClosechanHalf, closed write-side of channel: " + "queued output left"); } /* @@ -3386,7 +3384,7 @@ CloseChannelPart( * message in the interp. */ - result = ChanCloseHalf (chanPtr, interp, flags); + result = ChanCloseHalf(chanPtr, interp, flags); /* * If we are being called synchronously, report either any latent error on @@ -3436,7 +3434,7 @@ CloseChannelPart( * Remove the closed side from the channel mode/flags. */ - ResetFlag (statePtr, flags & (TCL_READABLE | TCL_WRITABLE)); + ResetFlag(statePtr, flags & (TCL_READABLE | TCL_WRITABLE)); return TCL_OK; } @@ -10985,7 +10983,7 @@ DupChannelIntRep( * currently have an internal rep.*/ { ChannelState *statePtr = GET_CHANNELSTATE(srcPtr); - Interp *interpPtr = GET_CHANNELINTERP(srcPtr); + Interp *interpPtr = GET_CHANNELINTERP(srcPtr); SET_CHANNELSTATE(copyPtr, statePtr); SET_CHANNELINTERP(copyPtr, interpPtr); @@ -11016,7 +11014,7 @@ SetChannelFromAny( register Tcl_Obj *objPtr) /* The object to convert. */ { ChannelState *statePtr; - Interp *interpPtr; + Interp *interpPtr; if (objPtr->typePtr == &tclChannelType) { /* diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 94bbb5c..95f4ebc 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.61 2008/12/18 01:14:16 ferrieux Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.62 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -680,10 +680,11 @@ Tcl_CloseObjCmd( * never opened for that direction). */ - if (!(dir & Tcl_GetChannelMode (chan))) { - Tcl_AppendResult (interp, "Half-close of ", dirOptions[optionIndex], - "-side not possible, side not opened or already closed", - NULL); + if (!(dir & Tcl_GetChannelMode(chan))) { + Tcl_AppendResult(interp, "Half-close of ", + dirOptions[optionIndex], + "-side not possible, side not opened or already closed", + NULL); return TCL_ERROR; } @@ -694,8 +695,9 @@ Tcl_CloseObjCmd( * process. */ - if ((Tcl_GetChannelMode (chan) & (TCL_CLOSE_READ|TCL_CLOSE_WRITE)) != dir) { - return Tcl_CloseEx (interp, chan, dir) != TCL_OK; + if ((Tcl_GetChannelMode(chan) & + (TCL_CLOSE_READ|TCL_CLOSE_WRITE)) != dir) { + return Tcl_CloseEx(interp, chan, dir); } } @@ -1931,9 +1933,9 @@ TclInitChanCmd( {"flush", Tcl_FlushObjCmd}, {"gets", Tcl_GetsObjCmd}, {"pending", ChanPendingObjCmd}, /* TIP #287 */ - {"pop", TclChanPopObjCmd}, /* TIP #230 */ + {"pop", TclChanPopObjCmd}, /* TIP #230 */ {"postevent", TclChanPostEventObjCmd}, /* TIP #219 */ - {"push", TclChanPushObjCmd}, /* TIP #230 */ + {"push", TclChanPushObjCmd}, /* TIP #230 */ {"puts", Tcl_PutsObjCmd}, {"read", Tcl_ReadObjCmd}, {"seek", Tcl_SeekObjCmd}, diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 679f393..d93df6b 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.35 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.36 2009/01/09 11:21:46 dkf Exp $ */ #include @@ -58,23 +58,23 @@ static int ReflectSetOption(ClientData clientData, */ static Tcl_ChannelType tclRChannelType = { - "tclrchannel", /* Type name. */ + "tclrchannel", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ - ReflectClose, /* Close channel, clean instance data */ - ReflectInput, /* Handle read request */ - ReflectOutput, /* Handle write request */ - ReflectSeek, /* Move location of access point. NULL'able */ - ReflectSetOption, /* Set options. NULL'able */ - ReflectGetOption, /* Get options. NULL'able */ - ReflectWatch, /* Initialize notifier */ - NULL, /* Get OS handle from the channel. NULL'able */ - NULL, /* No close2 support. NULL'able */ - ReflectBlock, /* Set blocking/nonblocking. NULL'able */ - NULL, /* Flush channel. Not used by core. NULL'able */ - NULL, /* Handle events. NULL'able */ - ReflectSeekWide, /* Move access point (64 bit). NULL'able */ - NULL, /* thread action */ - NULL, /* truncate */ + ReflectClose, /* Close channel, clean instance data */ + ReflectInput, /* Handle read request */ + ReflectOutput, /* Handle write request */ + ReflectSeek, /* Move location of access point. NULL'able */ + ReflectSetOption, /* Set options. NULL'able */ + ReflectGetOption, /* Get options. NULL'able */ + ReflectWatch, /* Initialize notifier */ + NULL, /* Get OS handle from the channel. NULL'able */ + NULL, /* No close2 support. NULL'able */ + ReflectBlock, /* Set blocking/nonblocking. NULL'able */ + NULL, /* Flush channel. Not used by core. NULL'able */ + NULL, /* Handle events. NULL'able */ + ReflectSeekWide, /* Move access point (64 bit). NULL'able */ + NULL, /* thread action */ + NULL, /* truncate */ }; /* @@ -716,7 +716,7 @@ TclChanCreateObjCmd( Tcl_RegisterChannel(interp, chan); - rcmPtr = GetReflectedChannelMap (interp); + rcmPtr = GetReflectedChannelMap(interp); hPtr = Tcl_CreateHashEntry(&rcmPtr->map, chanPtr->state->channelName, &isNew); if (!isNew && chanPtr != Tcl_GetHashValue(hPtr)) { @@ -814,12 +814,12 @@ TclChanPostEventObjCmd( chanId = TclGetString(objv[CHAN]); - rcmPtr = GetReflectedChannelMap (interp); - hPtr = Tcl_FindHashEntry (&rcmPtr->map, chanId); + rcmPtr = GetReflectedChannelMap(interp); + hPtr = Tcl_FindHashEntry(&rcmPtr->map, chanId); if (hPtr == NULL) { - Tcl_AppendResult(interp, "can not find reflected channel named \"", chanId, - "\"", NULL); + Tcl_AppendResult(interp, "can not find reflected channel named \"", + chanId, "\"", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CHANNEL", chanId, NULL); return TCL_ERROR; } @@ -840,7 +840,7 @@ TclChanPostEventObjCmd( * have gone seriously haywire. */ - chan = Tcl_GetHashValue(hPtr); + chan = Tcl_GetHashValue(hPtr); chanTypePtr = Tcl_GetChannelType(chan); /* @@ -853,13 +853,13 @@ TclChanPostEventObjCmd( */ if (chanTypePtr->watchProc != &ReflectWatch) { - Tcl_Panic ("TclChanPostEventObjCmd: channel is not a reflected channel"); + Tcl_Panic("TclChanPostEventObjCmd: channel is not a reflected channel"); } rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); if (rcPtr->interp != interp) { - Tcl_Panic ("TclChanPostEventObjCmd: postevent accepted for call from outside interpreter"); + Tcl_Panic("TclChanPostEventObjCmd: postevent accepted for call from outside interpreter"); } /* @@ -1146,7 +1146,7 @@ ReflectClose( Tcl_DeleteHashEntry(hPtr); } #ifdef TCL_THREADS - rcmPtr = GetThreadReflectedChannelMap(); + rcmPtr = GetThreadReflectedChannelMap(); hPtr = Tcl_FindHashEntry(&rcmPtr->map, Tcl_GetChannelName(rcPtr->chan)); if (hPtr) { @@ -2346,7 +2346,7 @@ DeleteReflectedChannelMap( for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); hPtr != NULL; hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { - chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); + chan = Tcl_GetHashValue(hPtr); rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); rcPtr->interp = NULL; @@ -2407,7 +2407,7 @@ DeleteReflectedChannelMap( for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { - chan = (Tcl_Channel) Tcl_GetHashValue (hPtr); + chan = Tcl_GetHashValue(hPtr); rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); if (rcPtr->interp != interp) { @@ -2465,7 +2465,7 @@ GetThreadReflectedChannelMap(void) * * Deletes the channel table for a thread. This procedure is invoked when * a thread is deleted. The channels have already been marked as dead, in - * DeleteReflectedChannelMap(). + * DeleteReflectedChannelMap(). * * Results: * None. @@ -2696,7 +2696,7 @@ ForwardProc( ReflectedChannelMap *rcmPtr; /* Map of reflected channels with handlers in * this interp. */ - Tcl_HashEntry *hPtr; /* Entry in the above map */ + Tcl_HashEntry *hPtr; /* Entry in the above map */ /* * Ignore the event if no one is waiting for its result anymore. @@ -2741,7 +2741,7 @@ ForwardProc( Tcl_GetChannelName(rcPtr->chan)); Tcl_DeleteHashEntry(hPtr); - rcmPtr = GetThreadReflectedChannelMap(); + rcmPtr = GetThreadReflectedChannelMap(); hPtr = Tcl_FindHashEntry(&rcmPtr->map, Tcl_GetChannelName(rcPtr->chan)); Tcl_DeleteHashEntry(hPtr); diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index b550675..b847d42 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.6 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.7 2009/01/09 11:21:46 dkf Exp $ */ #include @@ -97,7 +97,7 @@ typedef struct _ResultBuffer_ { } ResultBuffer; #define ResultLength(r) ((r)->used) -/* static int ResultLength (ResultBuffer *r); */ +/* static int ResultLength(ResultBuffer *r); */ static void ResultClear(ResultBuffer *r); static void ResultInit(ResultBuffer *r); @@ -1137,7 +1137,7 @@ ReflectInput( } *errorCodePtr = Tcl_GetErrno(); - return -1; + return -1; } if (read == 0) { @@ -1193,7 +1193,7 @@ ReflectInput( * Reset eof, force caller to drain result buffer. */ - ((Channel *) rtPtr->parent)->state->flags &= ~CHANNEL_EOF; + ((Channel *) rtPtr->parent)->state->flags &= ~CHANNEL_EOF; continue; /* at: while (toRead > 0) */ } } /* read == 0 */ @@ -1364,7 +1364,7 @@ ReflectSeekWide( curPos = parent->typePtr->wideSeekProc(parent->instanceData, offset, seekMode, errorCodePtr); } else if (offset < Tcl_LongAsWide(LONG_MIN) || - offset > Tcl_LongAsWide(LONG_MAX)) { + offset > Tcl_LongAsWide(LONG_MAX)) { *errorCodePtr = EOVERFLOW; curPos = Tcl_LongAsWide(-1); } else { @@ -2242,7 +2242,7 @@ GetThreadReflectedTransformMap(void) * * Deletes the channel table for a thread. This procedure is invoked when * a thread is deleted. The channels have already been marked as dead, in - * DeleteReflectedTransformMap(). + * DeleteReflectedTransformMap(). * * Results: * None. @@ -2523,7 +2523,7 @@ ForwardProc( * channel by deleting the owning thread. */ - rtmPtr = GetThreadReflectedTransformMap(); + rtmPtr = GetThreadReflectedTransformMap(); hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); Tcl_DeleteHashEntry(hPtr); FreeReflectedTransform(rtPtr); diff --git a/generic/tclInterp.c b/generic/tclInterp.c index ac8cbb9..0abbbde 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.99 2008/12/09 20:16:30 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.100 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -2620,20 +2620,19 @@ SlaveEval( * compiling. */ - Interp *iPtr = (Interp *) interp; - CmdFrame* invoker = iPtr->cmdFramePtr; - int word = 0; + Interp *iPtr = (Interp *) interp; + CmdFrame *invoker = iPtr->cmdFramePtr; + int word = 0; objPtr = objv[0]; - if (objPtr->typePtr - && (objPtr->typePtr != &tclByteCodeType) + if (objPtr->typePtr && (objPtr->typePtr != &tclByteCodeType) && objPtr->typePtr->freeIntRepProc) { (void) TclGetString(objPtr); TclFreeIntRep(objPtr); objPtr->typePtr = NULL; } - TclArgumentGet (interp, objPtr, &invoker, &word); + TclArgumentGet(interp, objPtr, &invoker, &word); result = TclEvalObjEx(slaveInterp, objPtr, 0, invoker, word); } else { diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 0a45f4d..a176e8d 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.33 2007/12/13 15:23:19 dgp Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.34 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -131,7 +131,7 @@ TclCleanupLiteralTable( typePtr = objPtr->typePtr; if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { if (objPtr->bytes == NULL) { - Tcl_Panic( "literal without a string rep" ); + Tcl_Panic("literal without a string rep"); } objPtr->typePtr = NULL; typePtr->freeIntRepProc(objPtr); @@ -225,16 +225,16 @@ TclDeleteLiteralTable( * * Results: * The literal object. If it was created in this call *newPtr is set to - * 1, else 0. NULL is returned if newPtr==NULL and no literal is found. + * 1, else 0. NULL is returned if newPtr==NULL and no literal is found. * * Side effects: - * Increments the ref count of the global LiteralEntry since the caller - * now holds a reference. - * If LITERAL_ON_HEAP is set in flags, this function is given ownership - * of the string: if an object is created then its string representation - * is set directly from string, otherwise the string is freed. Typically, - * a caller sets LITERAL_ON_HEAP if "string" is an already heap-allocated - * buffer holding the result of backslash substitutions. + * Increments the ref count of the global LiteralEntry since the caller + * now holds a reference. If LITERAL_ON_HEAP is set in flags, this + * function is given ownership of the string: if an object is created + * then its string representation is set directly from string, otherwise + * the string is freed. Typically, a caller sets LITERAL_ON_HEAP if + * "string" is an already heap-allocated buffer holding the result of + * backslash substitutions. * *---------------------------------------------------------------------- */ @@ -244,13 +244,14 @@ TclCreateLiteral( Interp *iPtr, char *bytes, int length, - unsigned int hash, /* The string's hash. If -1, it will be computed here */ + unsigned int hash, /* The string's hash. If -1, it will be + * computed here. */ int *newPtr, Namespace *nsPtr, int flags, LiteralEntry **globalPtrPtr) { - LiteralTable *globalTablePtr = &(iPtr->literalTable); + LiteralTable *globalTablePtr = &iPtr->literalTable; LiteralEntry *globalPtr; int globalHash; Tcl_Obj *objPtr; @@ -259,7 +260,7 @@ TclCreateLiteral( * Is it in the interpreter's global literal table? */ - if (hash == (unsigned int) -1) { + if (hash == (unsigned) -1) { hash = HashString(bytes, length); } globalHash = (hash & globalTablePtr->mask); @@ -650,7 +651,7 @@ TclAddLiteralObj( * * Side effects: * Expands the literal array if necessary. May rebuild the hash bucket - * array of the CompileEnv's literal array if it becomes too large. + * array of the CompileEnv's literal array if it becomes too large. * *---------------------------------------------------------------------- */ @@ -659,7 +660,7 @@ static int AddLocalLiteralEntry( register CompileEnv *envPtr,/* Points to CompileEnv in whose literal array * the object is to be inserted. */ - Tcl_Obj *objPtr, /* The literal to add to the CompileEnv. */ + Tcl_Obj *objPtr, /* The literal to add to the CompileEnv. */ int localHash) /* Hash value for the literal's string. */ { register LiteralTable *localTablePtr = &(envPtr->localLitTable); diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 3703118..5908bb1 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.183 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.184 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -3332,10 +3332,10 @@ NamespaceEvalCmd( * TIP #280: Make actual argument location available to eval'd script. */ - objPtr = objv[3]; + objPtr = objv[3]; invoker = iPtr->cmdFramePtr; - word = 3; - TclArgumentGet (interp, objPtr, &invoker, &word); + word = 3; + TclArgumentGet(interp, objPtr, &invoker, &word); } else { /* * More than one argument: concatenate them together with spaces @@ -3343,9 +3343,9 @@ NamespaceEvalCmd( * object when it decrements its refcount after eval'ing it. */ - objPtr = Tcl_ConcatObj(objc-3, objv+3); + objPtr = Tcl_ConcatObj(objc-3, objv+3); invoker = NULL; - word = 0; + word = 0; } /* @@ -4879,7 +4879,7 @@ NamespaceEnsembleCmd( * memory leaks. */ - for (; objc>1 ; objc-=2,objv+=2 ) { + for (; objc>1 ; objc-=2,objv+=2) { if (Tcl_GetIndexFromObj(interp, objv[0], createOptions, "option", 0, &index) != TCL_OK) { if (allocatedMapFlag) { @@ -5180,7 +5180,7 @@ NamespaceEnsembleCmd( * cause any memory leaks. */ - for (; objc>0 ; objc-=2,objv+=2 ) { + for (; objc>0 ; objc-=2,objv+=2) { if (Tcl_GetIndexFromObj(interp, objv[0], configOptions, "option", 0, &index) != TCL_OK) { if (allocatedMapFlag) { diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index 44c5399..daacc02 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.11 2009/01/06 14:30:19 dkf Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.12 2009/01/09 11:21:46 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -47,15 +47,15 @@ struct NameProcMap { const char *name; Tcl_ObjCmdProc *proc; }; */ static const struct NameProcMap infoObjectCmds[] = { - {"::oo::InfoObject::class", InfoObjectClassCmd}, - {"::oo::InfoObject::definition", InfoObjectDefnCmd}, - {"::oo::InfoObject::filters", InfoObjectFiltersCmd}, - {"::oo::InfoObject::forward", InfoObjectForwardCmd}, - {"::oo::InfoObject::isa", InfoObjectIsACmd}, - {"::oo::InfoObject::methods", InfoObjectMethodsCmd}, - {"::oo::InfoObject::mixins", InfoObjectMixinsCmd}, - {"::oo::InfoObject::variables", InfoObjectVariablesCmd}, - {"::oo::InfoObject::vars", InfoObjectVarsCmd}, + {"::oo::InfoObject::class", InfoObjectClassCmd}, + {"::oo::InfoObject::definition", InfoObjectDefnCmd}, + {"::oo::InfoObject::filters", InfoObjectFiltersCmd}, + {"::oo::InfoObject::forward", InfoObjectForwardCmd}, + {"::oo::InfoObject::isa", InfoObjectIsACmd}, + {"::oo::InfoObject::methods", InfoObjectMethodsCmd}, + {"::oo::InfoObject::mixins", InfoObjectMixinsCmd}, + {"::oo::InfoObject::variables", InfoObjectVariablesCmd}, + {"::oo::InfoObject::vars", InfoObjectVarsCmd}, {NULL, NULL} }; @@ -64,17 +64,17 @@ static const struct NameProcMap infoObjectCmds[] = { */ static const struct NameProcMap infoClassCmds[] = { - {"::oo::InfoClass::constructor", InfoClassConstrCmd}, - {"::oo::InfoClass::definition", InfoClassDefnCmd}, - {"::oo::InfoClass::destructor", InfoClassDestrCmd}, - {"::oo::InfoClass::filters", InfoClassFiltersCmd}, - {"::oo::InfoClass::forward", InfoClassForwardCmd}, - {"::oo::InfoClass::instances", InfoClassInstancesCmd}, - {"::oo::InfoClass::methods", InfoClassMethodsCmd}, - {"::oo::InfoClass::mixins", InfoClassMixinsCmd}, - {"::oo::InfoClass::subclasses", InfoClassSubsCmd}, - {"::oo::InfoClass::superclasses", InfoClassSupersCmd}, - {"::oo::InfoClass::variables", InfoClassVariablesCmd}, + {"::oo::InfoClass::constructor", InfoClassConstrCmd}, + {"::oo::InfoClass::definition", InfoClassDefnCmd}, + {"::oo::InfoClass::destructor", InfoClassDestrCmd}, + {"::oo::InfoClass::filters", InfoClassFiltersCmd}, + {"::oo::InfoClass::forward", InfoClassForwardCmd}, + {"::oo::InfoClass::instances", InfoClassInstancesCmd}, + {"::oo::InfoClass::methods", InfoClassMethodsCmd}, + {"::oo::InfoClass::mixins", InfoClassMixinsCmd}, + {"::oo::InfoClass::subclasses", InfoClassSubsCmd}, + {"::oo::InfoClass::superclasses", InfoClassSupersCmd}, + {"::oo::InfoClass::variables", InfoClassVariablesCmd}, {NULL, NULL} }; diff --git a/generic/tclObj.c b/generic/tclObj.c index e73fa17..2b2219a 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.146 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.147 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -1319,7 +1319,7 @@ Tcl_GetBooleanFromObj( * sets the proper error message for us. */ - double d; + double d; if (Tcl_GetDoubleFromObj(interp, objPtr, &d) != TCL_OK) { return TCL_ERROR; @@ -1706,8 +1706,9 @@ Tcl_GetDoubleFromObj( } if (objPtr->typePtr == &tclBignumType) { mp_int big; - UNPACK_BIGNUM( objPtr, big ); - *dblPtr = TclBignumToDouble( &big ); + + UNPACK_BIGNUM(objPtr, big); + *dblPtr = TclBignumToDouble(&big); return TCL_OK; } #ifndef NO_WIDE_TYPE @@ -2185,8 +2186,8 @@ Tcl_GetLongFromObj( goto tooLarge; } #endif - if (objPtr->typePtr == &tclDoubleType) { - if (interp != NULL) { + if (objPtr->typePtr == &tclDoubleType) { + if (interp != NULL) { Tcl_Obj *msg; TclNewLiteralStringObj(msg, "expected integer but got \""); @@ -2197,7 +2198,7 @@ Tcl_GetLongFromObj( } return TCL_ERROR; } - if (objPtr->typePtr == &tclBignumType) { + if (objPtr->typePtr == &tclBignumType) { /* * Must check for those bignum values that can fit in a long, even * when auto-narrowing is enabled. Only those values in the signed @@ -2488,8 +2489,8 @@ Tcl_GetWideIntFromObj( *wideIntPtr = (Tcl_WideInt) objPtr->internalRep.longValue; return TCL_OK; } - if (objPtr->typePtr == &tclDoubleType) { - if (interp != NULL) { + if (objPtr->typePtr == &tclDoubleType) { + if (interp != NULL) { Tcl_Obj *msg; TclNewLiteralStringObj(msg, "expected integer but got \""); @@ -2500,7 +2501,7 @@ Tcl_GetWideIntFromObj( } return TCL_ERROR; } - if (objPtr->typePtr == &tclBignumType) { + if (objPtr->typePtr == &tclBignumType) { /* * Must check for those bignum values that can fit in a * Tcl_WideInt, even when auto-narrowing is enabled. @@ -3050,7 +3051,8 @@ int TclGetNumberFromObj( static Tcl_ThreadDataKey bignumKey; mp_int *bigPtr = Tcl_GetThreadData(&bignumKey, (int) sizeof(mp_int)); - UNPACK_BIGNUM( objPtr, *bigPtr ); + + UNPACK_BIGNUM(objPtr, *bigPtr); *typePtr = TCL_NUMBER_BIG; *clientDataPtr = bigPtr; return TCL_OK; diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 7e4c4ff..b6681a6 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.76 2008/12/04 17:45:52 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.77 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -321,6 +321,7 @@ TclFSNormalizeAbsolutePath( if (tclPlatform == TCL_PLATFORM_WINDOWS) { int i; + for (i = 0; i < curLen; i++) { if (linkStr[i] == '\\') { linkStr[i] = '/'; @@ -333,8 +334,8 @@ TclFSNormalizeAbsolutePath( } /* - * Either way, we now remove the last path element. - * (but not the first character of the path) + * Either way, we now remove the last path element (but + * not the first character of the path). */ while (--curLen >= 0) { @@ -395,7 +396,7 @@ TclFSNormalizeAbsolutePath( } /* - * Ensure a windows drive like C:/ has a trailing separator + * Ensure a windows drive like C:/ has a trailing separator. */ if (tclPlatform == TCL_PLATFORM_WINDOWS) { @@ -687,6 +688,7 @@ TclPathPart( } else { Tcl_Obj *root = Tcl_NewStringObj(fileName, (int) (length - strlen(extension))); + Tcl_IncrRefCount(root); return root; } @@ -1001,8 +1003,8 @@ Tcl_FSJoinPath( } /* - * This element is just what we want to return already - no - * further manipulation is requred. + * This element is just what we want to return already; no further + * manipulation is requred. */ return elt; @@ -1276,41 +1278,41 @@ TclNewFSPathObj( /* * Look for path components made up of only "." - * This is overly conservative analysis to keep simple. It may - * mark some things as needing more aggressive normalization - * that don't actually need it. No harm done. + * This is overly conservative analysis to keep simple. It may mark some + * things as needing more aggressive normalization that don't actually + * need it. No harm done. */ for (p = addStrRep; len > 0; p++, len--) { - switch (state) { - case 0: /* So far only "." since last dirsep or start */ - switch (*p) { - case '.': - count++; - break; - case '/': - case '\\': - case ':': - if (count) { - PATHFLAGS(pathPtr) |= TCLPATH_NEEDNORM; - len = 0; - } - break; - default: - count = 0; - state = 1; - } - case 1: /* Scanning for next dirsep */ - switch (*p) { - case '/': - case '\\': - case ':': - state = 0; - break; - } - } + switch (state) { + case 0: /* So far only "." since last dirsep or start */ + switch (*p) { + case '.': + count++; + break; + case '/': + case '\\': + case ':': + if (count) { + PATHFLAGS(pathPtr) |= TCLPATH_NEEDNORM; + len = 0; + } + break; + default: + count = 0; + state = 1; + } + case 1: /* Scanning for next dirsep */ + switch (*p) { + case '/': + case '\\': + case ':': + state = 0; + break; + } + } } if (len == 0 && count) { - PATHFLAGS(pathPtr) |= TCLPATH_NEEDNORM; + PATHFLAGS(pathPtr) |= TCLPATH_NEEDNORM; } return pathPtr; @@ -1647,8 +1649,9 @@ Tcl_FSGetTranslatedPath( Tcl_Obj *translatedCwdPtr = Tcl_FSGetTranslatedPath(interp, srcFsPathPtr->cwdPtr); + retObj = Tcl_FSJoinToPath(translatedCwdPtr, 1, - &(srcFsPathPtr->normPathPtr)); + &srcFsPathPtr->normPathPtr); srcFsPathPtr->translatedPathPtr = retObj; Tcl_IncrRefCount(retObj); Tcl_DecrRefCount(translatedCwdPtr); @@ -1704,7 +1707,7 @@ Tcl_FSGetTranslatedStringPath( if (transPtr != NULL) { int len; const char *orig = Tcl_GetStringFromObj(transPtr, &len); - char *result = (char *) ckalloc((unsigned) len+1); + char *result = ckalloc((unsigned) len+1); memcpy(result, orig, (size_t) len+1); TclDecrRefCount(transPtr); @@ -1752,8 +1755,7 @@ Tcl_FSGetNormalizedPath( */ Tcl_Obj *dir, *copy; - int cwdLen; - int pathType; + int cwdLen, pathType; const char *cwdStr; ClientData clientData = NULL; @@ -1801,25 +1803,25 @@ Tcl_FSGetNormalizedPath( if (PATHFLAGS(pathPtr) & TCLPATH_NEEDNORM) { /* - * If the "tail" part has components (like /../) that cause - * the combined path to need more complete normalizing, - * call on the more powerful routine to accomplish that so - * we avoid [Bug 2385549] ... + * If the "tail" part has components (like /../) that cause the + * combined path to need more complete normalizing, call on the + * more powerful routine to accomplish that so we avoid [Bug + * 2385549] ... */ Tcl_Obj *newCopy = TclFSNormalizeAbsolutePath(interp, copy, NULL); + Tcl_DecrRefCount(copy); copy = newCopy; } else { /* - * ... but in most cases where we join a trouble free tail - * to a normalized head, we can more efficiently normalize the - * combined path by passing over only the unnormalized tail - * portion. When this is sufficient, prior developers claim - * this should be much faster. We use 'cwdLen-1' so that we are - * already pointing at the dir-separator that we know about. - * The normalization code will actually start off directly - * after that separator. + * ... but in most cases where we join a trouble free tail to a + * normalized head, we can more efficiently normalize the combined + * path by passing over only the unnormalized tail portion. When + * this is sufficient, prior developers claim this should be much + * faster. We use 'cwdLen-1' so that we are already pointing at + * the dir-separator that we know about. The normalization code + * will actually start off directly after that separator. */ TclFSNormalizeToUniquePath(interp, copy, cwdLen-1, @@ -1833,11 +1835,11 @@ Tcl_FSGetNormalizedPath( /* * NOTE: here we are (dangerously?) assuming that origDir points - * to a Tcl_Obj with Tcl_ObjType == &tclFsPathType . The + * to a Tcl_Obj with Tcl_ObjType == &tclFsPathType. The * pathType = Tcl_FSGetPathType(fsPathPtr->cwdPtr); - * above that set the pathType value should have established - * that, but it's far less clear on what basis we know there's - * been no shimmering since then. + * above that set the pathType value should have established that, + * but it's far less clear on what basis we know there's been no + * shimmering since then. */ FsPath *origDirFsPathPtr = PATHOBJ(origDir); @@ -1869,9 +1871,10 @@ Tcl_FSGetNormalizedPath( if (clientData != NULL) { /* * This may be unnecessary. It appears that the - * TclFSNormalizeToUniquePath call above should have already - * set this up. Not changing out of fear of the unknown. + * TclFSNormalizeToUniquePath call above should have already set + * this up. Not changing out of fear of the unknown. */ + fsPathPtr->nativePathPtr = clientData; } PATHFLAGS(pathPtr) = 0; @@ -1950,6 +1953,7 @@ Tcl_FSGetNormalizedPath( Tcl_Obj *absolutePath = fsPathPtr->translatedPathPtr; const char *path = TclGetString(absolutePath); + Tcl_IncrRefCount(absolutePath); /* @@ -1961,17 +1965,17 @@ Tcl_FSGetNormalizedPath( if (path[0] == '\0') { /* - * Special handling for the empty string value. This one is - * very weird with [file normalize {}] => {}. (The reasoning - * supporting this is unknown to DGP, but he fears changing it.) - * Attempt here to keep the expectations of other parts of - * Tcl_Filesystem code about state of the FsPath fields satisfied. + * Special handling for the empty string value. This one is very + * weird with [file normalize {}] => {}. (The reasoning supporting + * this is unknown to DGP, but he fears changing it.) Attempt here + * to keep the expectations of other parts of Tcl_Filesystem code + * about state of the FsPath fields satisfied. * * In particular, capture the cwd value and save so it can be * stored in the cwdPtr field below. */ - useThisCwd = Tcl_FSGetCwd(interp); + useThisCwd = Tcl_FSGetCwd(interp); } else { /* * We don't ask for the type of 'pathPtr' here, because that is @@ -2024,7 +2028,7 @@ Tcl_FSGetNormalizedPath( (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL)); if (0 && (clientData != NULL)) { fsPathPtr->nativePathPtr = - fsPathPtr->fsRecPtr->fsPtr->dupInternalRepProc(clientData); + fsPathPtr->fsRecPtr->fsPtr->dupInternalRepProc(clientData); } /* @@ -2390,7 +2394,7 @@ SetFsPathFromAny( char *expandedUser; Tcl_DString temp; int split; - char separator='/'; + char separator = '/'; split = FindSplitPos(name, separator); if (split != len) { diff --git a/generic/tclPipe.c b/generic/tclPipe.c index be64e0b..b20ffe1 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPipe.c,v 1.20 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclPipe.c,v 1.21 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -96,17 +96,17 @@ FileForRedirect( } *skipPtr = 2; } - chan = Tcl_GetChannel(interp, spec, NULL); - if (chan == (Tcl_Channel) NULL) { - return NULL; - } + chan = Tcl_GetChannel(interp, spec, NULL); + if (chan == (Tcl_Channel) NULL) { + return NULL; + } file = TclpMakeFile(chan, writing ? TCL_WRITABLE : TCL_READABLE); - if (file == NULL) { + if (file == NULL) { Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(chan), "\" wasn't opened for ", ((writing) ? "writing" : "reading"), NULL); - return NULL; - } + return NULL; + } *releasePtr = 1; if (writing) { /* @@ -114,7 +114,7 @@ FileForRedirect( * by the child appears after stuff we've already written. */ - Tcl_Flush(chan); + Tcl_Flush(chan); } } else { const char *name; @@ -139,7 +139,7 @@ FileForRedirect( Tcl_PosixError(interp), NULL); return NULL; } - *closePtr = 1; + *closePtr = 1; } return file; @@ -281,24 +281,24 @@ TclCleanupChildren( */ resolvedPid = TclpGetPid(pidPtr[i]); - pid = Tcl_WaitPid(pidPtr[i], (int *) &waitStatus, 0); + pid = Tcl_WaitPid(pidPtr[i], (int *) &waitStatus, 0); if (pid == (Tcl_Pid) -1) { result = TCL_ERROR; - if (interp != NULL) { - msg = Tcl_PosixError(interp); - if (errno == ECHILD) { + if (interp != NULL) { + msg = Tcl_PosixError(interp); + if (errno == ECHILD) { /* - * This changeup in message suggested by Mark Diekhans to - * remind people that ECHILD errors can occur on some - * systems if SIGCHLD isn't in its default state. - */ - - msg = - "child process lost (is SIGCHLD ignored or trapped?)"; - } - Tcl_AppendResult(interp, "error waiting for process to exit: ", - msg, NULL); - } + * This changeup in message suggested by Mark Diekhans to + * remind people that ECHILD errors can occur on some + * systems if SIGCHLD isn't in its default state. + */ + + msg = + "child process lost (is SIGCHLD ignored or trapped?)"; + } + Tcl_AppendResult(interp, "error waiting for process to exit: ", + msg, NULL); + } continue; } @@ -315,32 +315,32 @@ TclCleanupChildren( result = TCL_ERROR; sprintf(msg1, "%lu", resolvedPid); if (WIFEXITED(waitStatus)) { - if (interp != (Tcl_Interp *) NULL) { + if (interp != NULL) { sprintf(msg2, "%lu", (unsigned long) WEXITSTATUS(waitStatus)); - Tcl_SetErrorCode(interp, "CHILDSTATUS", msg1, msg2, NULL); - } + Tcl_SetErrorCode(interp, "CHILDSTATUS", msg1, msg2, NULL); + } abnormalExit = 1; } else if (interp != NULL) { const char *p; if (WIFSIGNALED(waitStatus)) { - p = Tcl_SignalMsg((int) (WTERMSIG(waitStatus))); - Tcl_SetErrorCode(interp, "CHILDKILLED", msg1, - Tcl_SignalId((int) (WTERMSIG(waitStatus))), p, - NULL); - Tcl_AppendResult(interp, "child killed: ", p, "\n", NULL); + p = Tcl_SignalMsg((int) (WTERMSIG(waitStatus))); + Tcl_SetErrorCode(interp, "CHILDKILLED", msg1, + Tcl_SignalId((int) (WTERMSIG(waitStatus))), p, + NULL); + Tcl_AppendResult(interp, "child killed: ", p, "\n", NULL); } else if (WIFSTOPPED(waitStatus)) { - p = Tcl_SignalMsg((int) (WSTOPSIG(waitStatus))); - Tcl_SetErrorCode(interp, "CHILDSUSP", msg1, - Tcl_SignalId((int) (WSTOPSIG(waitStatus))), p, + p = Tcl_SignalMsg((int) (WSTOPSIG(waitStatus))); + Tcl_SetErrorCode(interp, "CHILDSUSP", msg1, + Tcl_SignalId((int) (WSTOPSIG(waitStatus))), p, + NULL); + Tcl_AppendResult(interp, "child suspended: ", p, "\n", NULL); - Tcl_AppendResult(interp, "child suspended: ", p, "\n", - NULL); } else { - Tcl_AppendResult(interp, - "child wait status didn't make sense\n", NULL); - } + Tcl_AppendResult(interp, + "child wait status didn't make sense\n", NULL); + } } } } @@ -356,7 +356,7 @@ TclCleanupChildren( * Make sure we start at the beginning of the file. */ - if (interp != NULL) { + if (interp != NULL) { int count; Tcl_Obj *objPtr; @@ -687,9 +687,12 @@ TclCreatePipeline( break; default: - /* Got a command word, not a redirection */ - needCmd = 0; - break; + /* + * Got a command word, not a redirection. + */ + + needCmd = 0; + break; } if (skip != 0) { @@ -702,11 +705,12 @@ TclCreatePipeline( } if (needCmd) { - /* We had a bar followed only by redirections. */ + /* + * We had a bar followed only by redirections. + */ - Tcl_SetResult(interp, - "illegal use of | or |& in command", - TCL_STATIC); + Tcl_SetResult(interp, "illegal use of | or |& in command", + TCL_STATIC); goto error; } @@ -1023,7 +1027,7 @@ TclCreatePipeline( Tcl_Channel Tcl_OpenCommandChannel( Tcl_Interp *interp, /* Interpreter for error reporting. Can NOT be - * NULL. */ + * NULL. */ int argc, /* How many arguments. */ const char **argv, /* Array of arguments for command pipe. */ int flags) /* Or'ed combination of TCL_STDIN, TCL_STDOUT, @@ -1042,7 +1046,7 @@ Tcl_OpenCommandChannel( errFilePtr = (flags & TCL_STDERR) ? &errFile : NULL; numPids = TclCreatePipeline(interp, argc, argv, &pidPtr, inPipePtr, - outPipePtr, errFilePtr); + outPipePtr, errFilePtr); if (numPids < 0) { goto error; @@ -1069,9 +1073,9 @@ Tcl_OpenCommandChannel( channel = TclpCreateCommandChannel(outPipe, inPipe, errFile, numPids, pidPtr); - if (channel == (Tcl_Channel) NULL) { - Tcl_AppendResult(interp, "pipe for command could not be created", - NULL); + if (channel == NULL) { + Tcl_AppendResult(interp, "pipe for command could not be created", + NULL); goto error; } return channel; diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index f1f72db..376815e 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPosixStr.c,v 1.13 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclPosixStr.c,v 1.14 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -61,7 +61,7 @@ Tcl_ErrnoId(void) #ifdef EALIGN case EALIGN: return "EALIGN"; #endif -#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY )) +#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY)) case EALREADY: return "EALREADY"; #endif #ifdef EBADE @@ -337,7 +337,7 @@ Tcl_ErrnoId(void) #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) case EOPNOTSUPP: return "EOPNOTSUPP"; #endif -#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) +#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) case EOVERFLOW: return "EOVERFLOW"; #endif #ifdef EPERM @@ -508,7 +508,7 @@ Tcl_ErrnoMsg( #ifdef EALIGN case EALIGN: return "EALIGN"; #endif -#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY )) +#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY)) case EALREADY: return "operation already in progress"; #endif #ifdef EBADE @@ -651,7 +651,7 @@ Tcl_ErrnoMsg( #endif #ifdef ELIBMAX case ELIBMAX: return - "attempting to link in more shared libraries than system limit"; + "attempting to link in more shared libraries than system limit"; #endif #ifdef ELIBSCN case ELIBSCN: return ".lib section in a.out corrupted"; @@ -785,7 +785,7 @@ Tcl_ErrnoMsg( #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) case EOPNOTSUPP: return "operation not supported on socket"; #endif -#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) +#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) case EOVERFLOW: return "file too big"; #endif #ifdef EPERM diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c index 9cc79a5..f90e4bc 100644 --- a/generic/tclPreserve.c +++ b/generic/tclPreserve.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPreserve.c,v 1.11 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclPreserve.c,v 1.12 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -91,10 +91,10 @@ TclFinalizePreserve(void) { Tcl_MutexLock(&preserveMutex); if (spaceAvl != 0) { - ckfree((char *) refArray); - refArray = NULL; - inUse = 0; - spaceAvl = 0; + ckfree((char *) refArray); + refArray = NULL; + inUse = 0; + spaceAvl = 0; } Tcl_MutexUnlock(&preserveMutex); } @@ -280,13 +280,12 @@ Tcl_EventuallyFree( continue; } if (refPtr->mustFree) { - Tcl_Panic("Tcl_EventuallyFree called twice for 0x%x", - clientData); - } - refPtr->mustFree = 1; + Tcl_Panic("Tcl_EventuallyFree called twice for 0x%x", clientData); + } + refPtr->mustFree = 1; refPtr->freeProc = freeProc; Tcl_MutexUnlock(&preserveMutex); - return; + return; } Tcl_MutexUnlock(&preserveMutex); diff --git a/generic/tclProc.c b/generic/tclProc.c index 80c792c..99aee95 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.168 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.169 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -75,9 +75,9 @@ const Tcl_ObjType tclProcBodyType = { }; /* - * The [upvar]/[uplevel] level reference type. Uses the twoPtrValue field, - * encoding the type of level reference in ptr1 and the actual parsed out - * offset in ptr2. + * The [upvar]/[uplevel] level reference type. Uses the ptrAndLongRep field, + * encoding the type of level reference in ptr and the actual parsed out + * offset in value. * * Uses the default behaviour throughout, and never disposes of the string * rep; it's just a cache type. @@ -796,10 +796,10 @@ TclObjGetFrame( result = 1; curLevel = iPtr->varFramePtr->level; if (objPtr->typePtr == &levelReferenceType) { - if (PTR2INT(objPtr->internalRep.twoPtrValue.ptr1)) { - level = curLevel - PTR2INT(objPtr->internalRep.twoPtrValue.ptr2); + if (objPtr->internalRep.ptrAndLongRep.ptr != NULL) { + level = curLevel - objPtr->internalRep.ptrAndLongRep.value; } else { - level = PTR2INT(objPtr->internalRep.twoPtrValue.ptr2); + level = objPtr->internalRep.ptrAndLongRep.value; } if (level < 0) { goto levelError; @@ -827,8 +827,8 @@ TclObjGetFrame( TclFreeIntRep(objPtr); objPtr->typePtr = &levelReferenceType; - objPtr->internalRep.twoPtrValue.ptr1 = (void *) 0; - objPtr->internalRep.twoPtrValue.ptr2 = INT2PTR(level); + objPtr->internalRep.ptrAndLongRep.ptr = NULL; + objPtr->internalRep.ptrAndLongRep.value = level; } else if (isdigit(UCHAR(*name))) { /* INTL: digit */ if (Tcl_GetInt(interp, name, &level) != TCL_OK) { return -1; @@ -842,8 +842,8 @@ TclObjGetFrame( TclFreeIntRep(objPtr); objPtr->typePtr = &levelReferenceType; - objPtr->internalRep.twoPtrValue.ptr1 = (void *) 1; - objPtr->internalRep.twoPtrValue.ptr2 = INT2PTR(level); + objPtr->internalRep.ptrAndLongRep.ptr = (void *) 1; /* non-NULL */ + objPtr->internalRep.ptrAndLongRep.value = level; level = curLevel - level; } else { /* @@ -873,6 +873,7 @@ TclObjGetFrame( levelError: Tcl_ResetResult(interp); Tcl_AppendResult(interp, "bad level \"", name, "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "LEVEL", NULL); return -1; } @@ -976,7 +977,7 @@ TclNRUplevelObjCmd( * TIP #280. Make actual argument location available to eval'd script */ - TclArgumentGet (interp, objv[0], &invoker, &word); + TclArgumentGet(interp, objv[0], &invoker, &word); objPtr = objv[0]; } else { diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 7664ebd..5db3d66 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.36 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.37 2009/01/09 11:21:46 dkf Exp $ * *---------------------------------------------------------------------- */ @@ -1231,7 +1231,7 @@ AccumulateDecimalDigit( * number to a bignum and fall through into the bignum case. */ - TclBNInitBignumFromWideUInt (bignumRepPtr, w); + TclBNInitBignumFromWideUInt(bignumRepPtr, w); } else { /* * Wide multiplication. @@ -1694,8 +1694,8 @@ RefineApproximation( */ if (mp_cmp_mag(&twoMd, &twoMv) == MP_LT) { - mp_clear(&twoMd); - mp_clear(&twoMv); + mp_clear(&twoMd); + mp_clear(&twoMv); return approxResult; } diff --git a/generic/tclTest.c b/generic/tclTest.c index 3648f94..ebcdb97 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.134 2008/11/27 08:23:51 ferrieux Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.135 2009/01/09 11:21:46 dkf Exp $ */ #define TCL_TEST @@ -1188,7 +1188,7 @@ TestcmdtraceCmd( } else { return result; } - } else if ( strcmp(argv[1], "doubletest" ) == 0 ) { + } else if (strcmp(argv[1], "doubletest") == 0) { Tcl_Trace t1, t2; Tcl_DStringInit(&buffer); @@ -4330,7 +4330,7 @@ TestfeventCmd( * Calls the panic routine. * * Results: - * Always returns TCL_OK. + * Always returns TCL_OK. * * Side effects: * May exit application. @@ -4976,14 +4976,15 @@ TestmainthreadCmd( int argc, /* Number of arguments. */ const char **argv) /* Argument strings. */ { - if (argc == 1) { - Tcl_Obj *idObj = Tcl_NewLongObj((long)Tcl_GetCurrentThread()); - Tcl_SetObjResult(interp, idObj); - return TCL_OK; - } else { - Tcl_SetResult(interp, "wrong # args", TCL_STATIC); - return TCL_ERROR; - } + if (argc == 1) { + Tcl_Obj *idObj = Tcl_NewLongObj((long) Tcl_GetCurrentThread()); + + Tcl_SetObjResult(interp, idObj); + return TCL_OK; + } else { + Tcl_SetResult(interp, "wrong # args", TCL_STATIC); + return TCL_ERROR; + } } /* diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index c88a519..680dd18 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.27 2008/11/26 23:09:34 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.28 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -85,7 +85,7 @@ TclObjTest_Init( register int i; for (i = 0; i < NUMBER_OF_OBJECT_VARS; i++) { - varPtr[i] = NULL; + varPtr[i] = NULL; } Tcl_CreateObjCommand(interp, "testbignumobj", TestbignumobjCmd, @@ -130,14 +130,13 @@ TestbignumobjCmd( Tcl_Obj *const objv[]) /* Argument vector */ { const char *const subcmds[] = { - "set", "get", "mult10", "div10", NULL + "set", "get", "mult10", "div10", NULL }; enum options { - BIGNUM_SET, BIGNUM_GET, BIGNUM_MULT10, BIGNUM_DIV10 + BIGNUM_SET, BIGNUM_GET, BIGNUM_MULT10, BIGNUM_DIV10 }; - int index, varIndex; - char* string; + char *string; mp_int bignumValue, newValue; if (objc < 3) { @@ -438,9 +437,9 @@ TestdoubleobjCmd( return TCL_ERROR; } if (!Tcl_IsShared(varPtr[varIndex])) { - Tcl_SetDoubleObj(varPtr[varIndex], (doubleValue * 10.0)); + Tcl_SetDoubleObj(varPtr[varIndex], doubleValue * 10.0); } else { - SetVarToObj(varIndex, Tcl_NewDoubleObj( (doubleValue * 10.0) )); + SetVarToObj(varIndex, Tcl_NewDoubleObj(doubleValue * 10.0)); } Tcl_SetObjResult(interp, varPtr[varIndex]); } else if (strcmp(subCmd, "div10") == 0) { @@ -451,13 +450,13 @@ TestdoubleobjCmd( return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, varPtr[varIndex], - &doubleValue) != TCL_OK) { + &doubleValue) != TCL_OK) { return TCL_ERROR; } if (!Tcl_IsShared(varPtr[varIndex])) { - Tcl_SetDoubleObj(varPtr[varIndex], (doubleValue / 10.0)); + Tcl_SetDoubleObj(varPtr[varIndex], doubleValue / 10.0); } else { - SetVarToObj(varIndex, Tcl_NewDoubleObj( (doubleValue / 10.0) )); + SetVarToObj(varIndex, Tcl_NewDoubleObj(doubleValue / 10.0)); } Tcl_SetObjResult(interp, varPtr[varIndex]); } else { @@ -501,9 +500,9 @@ TestindexobjCmd( * Keep this structure declaration in sync with tclIndexObj.c */ struct IndexRep { - void *tablePtr; /* Pointer to the table of strings */ - int offset; /* Offset between table entries */ - int index; /* Selected index into table. */ + void *tablePtr; /* Pointer to the table of strings. */ + int offset; /* Offset between table entries. */ + int index; /* Selected index into table. */ }; struct IndexRep *indexRep; @@ -688,7 +687,7 @@ TestintobjCmd( return TCL_ERROR; } Tcl_AppendToObj(Tcl_GetObjResult(interp), - ((longValue == LONG_MAX)? "1" : "0"), -1); + ((longValue == LONG_MAX)? "1" : "0"), -1); } else if (strcmp(subCmd, "get") == 0) { if (objc != 3) { goto wrongNumArgs; @@ -740,13 +739,13 @@ TestintobjCmd( return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, varPtr[varIndex], - &intValue) != TCL_OK) { + &intValue) != TCL_OK) { return TCL_ERROR; } if (!Tcl_IsShared(varPtr[varIndex])) { - Tcl_SetIntObj(varPtr[varIndex], (intValue * 10)); + Tcl_SetIntObj(varPtr[varIndex], intValue * 10); } else { - SetVarToObj(varIndex, Tcl_NewIntObj( (intValue * 10) )); + SetVarToObj(varIndex, Tcl_NewIntObj(intValue * 10)); } Tcl_SetObjResult(interp, varPtr[varIndex]); } else if (strcmp(subCmd, "div10") == 0) { @@ -757,13 +756,13 @@ TestintobjCmd( return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, varPtr[varIndex], - &intValue) != TCL_OK) { + &intValue) != TCL_OK) { return TCL_ERROR; } if (!Tcl_IsShared(varPtr[varIndex])) { - Tcl_SetIntObj(varPtr[varIndex], (intValue / 10)); + Tcl_SetIntObj(varPtr[varIndex], intValue / 10); } else { - SetVarToObj(varIndex, Tcl_NewIntObj( (intValue / 10) )); + SetVarToObj(varIndex, Tcl_NewIntObj(intValue / 10)); } Tcl_SetObjResult(interp, varPtr[varIndex]); } else { @@ -811,106 +810,107 @@ TestobjCmd( subCmd = Tcl_GetString(objv[1]); if (strcmp(subCmd, "assign") == 0) { - if (objc != 4) { - goto wrongNumArgs; - } - index = Tcl_GetString(objv[2]); - if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { - return TCL_ERROR; - } - if (CheckIfVarUnset(interp, varIndex)) { + if (objc != 4) { + goto wrongNumArgs; + } + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { + return TCL_ERROR; + } + if (CheckIfVarUnset(interp, varIndex)) { return TCL_ERROR; } string = Tcl_GetString(objv[3]); - if (GetVariableIndex(interp, string, &destIndex) != TCL_OK) { - return TCL_ERROR; - } - SetVarToObj(destIndex, varPtr[varIndex]); + if (GetVariableIndex(interp, string, &destIndex) != TCL_OK) { + return TCL_ERROR; + } + SetVarToObj(destIndex, varPtr[varIndex]); Tcl_SetObjResult(interp, varPtr[destIndex]); - } else if (strcmp(subCmd, "convert") == 0) { - char *typeName; - if (objc != 4) { - goto wrongNumArgs; - } - index = Tcl_GetString(objv[2]); - if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { - return TCL_ERROR; - } - if (CheckIfVarUnset(interp, varIndex)) { + } else if (strcmp(subCmd, "convert") == 0) { + char *typeName; + + if (objc != 4) { + goto wrongNumArgs; + } + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { + return TCL_ERROR; + } + if (CheckIfVarUnset(interp, varIndex)) { return TCL_ERROR; } - typeName = Tcl_GetString(objv[3]); - if ((targetType = Tcl_GetObjType(typeName)) == NULL) { + typeName = Tcl_GetString(objv[3]); + if ((targetType = Tcl_GetObjType(typeName)) == NULL) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "no type ", typeName, " found", NULL); - return TCL_ERROR; - } - if (Tcl_ConvertToType(interp, varPtr[varIndex], targetType) - != TCL_OK) { - return TCL_ERROR; - } + return TCL_ERROR; + } + if (Tcl_ConvertToType(interp, varPtr[varIndex], targetType) + != TCL_OK) { + return TCL_ERROR; + } Tcl_SetObjResult(interp, varPtr[varIndex]); } else if (strcmp(subCmd, "duplicate") == 0) { - if (objc != 4) { - goto wrongNumArgs; - } - index = Tcl_GetString(objv[2]); - if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { - return TCL_ERROR; - } - if (CheckIfVarUnset(interp, varIndex)) { + if (objc != 4) { + goto wrongNumArgs; + } + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { + return TCL_ERROR; + } + if (CheckIfVarUnset(interp, varIndex)) { return TCL_ERROR; } string = Tcl_GetString(objv[3]); - if (GetVariableIndex(interp, string, &destIndex) != TCL_OK) { - return TCL_ERROR; - } - SetVarToObj(destIndex, Tcl_DuplicateObj(varPtr[varIndex])); + if (GetVariableIndex(interp, string, &destIndex) != TCL_OK) { + return TCL_ERROR; + } + SetVarToObj(destIndex, Tcl_DuplicateObj(varPtr[varIndex])); Tcl_SetObjResult(interp, varPtr[destIndex]); } else if (strcmp(subCmd, "freeallvars") == 0) { - if (objc != 2) { - goto wrongNumArgs; - } - for (i = 0; i < NUMBER_OF_OBJECT_VARS; i++) { - if (varPtr[i] != NULL) { - Tcl_DecrRefCount(varPtr[i]); - varPtr[i] = NULL; - } - } - } else if ( strcmp ( subCmd, "invalidateStringRep" ) == 0 ) { - if ( objc != 3 ) { + if (objc != 2) { + goto wrongNumArgs; + } + for (i = 0; i < NUMBER_OF_OBJECT_VARS; i++) { + if (varPtr[i] != NULL) { + Tcl_DecrRefCount(varPtr[i]); + varPtr[i] = NULL; + } + } + } else if (strcmp(subCmd, "invalidateStringRep") == 0) { + if (objc != 3) { goto wrongNumArgs; } - index = Tcl_GetString( objv[2] ); - if ( GetVariableIndex( interp, index, &varIndex ) != TCL_OK ) { + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { return TCL_ERROR; } - if (CheckIfVarUnset(interp, varIndex)) { + if (CheckIfVarUnset(interp, varIndex)) { return TCL_ERROR; } - Tcl_InvalidateStringRep( varPtr[varIndex] ); - Tcl_SetObjResult( interp, varPtr[varIndex] ); + Tcl_InvalidateStringRep(varPtr[varIndex]); + Tcl_SetObjResult(interp, varPtr[varIndex]); } else if (strcmp(subCmd, "newobj") == 0) { - if (objc != 3) { - goto wrongNumArgs; - } - index = Tcl_GetString(objv[2]); - if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { - return TCL_ERROR; - } - SetVarToObj(varIndex, Tcl_NewObj()); + if (objc != 3) { + goto wrongNumArgs; + } + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { + return TCL_ERROR; + } + SetVarToObj(varIndex, Tcl_NewObj()); Tcl_SetObjResult(interp, varPtr[varIndex]); } else if (strcmp(subCmd, "objtype") == 0) { const char *typeName; /* - * return an object containing the name of the argument's type - * of internal rep. If none exists, return "none". + * Return an object containing the name of the argument's type of + * internal rep. If none exists, return "none". */ - if (objc != 3) { - goto wrongNumArgs; - } + if (objc != 3) { + goto wrongNumArgs; + } if (objv[2]->typePtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("none", -1)); } else { @@ -918,38 +918,38 @@ TestobjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj(typeName, -1)); } } else if (strcmp(subCmd, "refcount") == 0) { - if (objc != 3) { - goto wrongNumArgs; - } - index = Tcl_GetString(objv[2]); - if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { - return TCL_ERROR; - } - if (CheckIfVarUnset(interp, varIndex)) { + if (objc != 3) { + goto wrongNumArgs; + } + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { + return TCL_ERROR; + } + if (CheckIfVarUnset(interp, varIndex)) { return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewIntObj(varPtr[varIndex]->refCount)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(varPtr[varIndex]->refCount)); } else if (strcmp(subCmd, "type") == 0) { - if (objc != 3) { - goto wrongNumArgs; - } - index = Tcl_GetString(objv[2]); - if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { - return TCL_ERROR; - } - if (CheckIfVarUnset(interp, varIndex)) { + if (objc != 3) { + goto wrongNumArgs; + } + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { return TCL_ERROR; } - if (varPtr[varIndex]->typePtr == NULL) { /* a string! */ + if (CheckIfVarUnset(interp, varIndex)) { + return TCL_ERROR; + } + if (varPtr[varIndex]->typePtr == NULL) { /* a string! */ Tcl_AppendToObj(Tcl_GetObjResult(interp), "string", -1); - } else { - Tcl_AppendToObj(Tcl_GetObjResult(interp), - varPtr[varIndex]->typePtr->name, -1); - } + } else { + Tcl_AppendToObj(Tcl_GetObjResult(interp), + varPtr[varIndex]->typePtr->name, -1); + } } else if (strcmp(subCmd, "types") == 0) { - if (objc != 2) { - goto wrongNumArgs; - } + if (objc != 2) { + goto wrongNumArgs; + } if (Tcl_AppendAllObjTypes(interp, Tcl_GetObjResult(interp)) != TCL_OK) { return TCL_ERROR; diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index d346d59..234b267 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.7 2008/07/13 09:03:35 msofer Exp $ + * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.8 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -33,8 +33,7 @@ static char procCommand[] = "proc"; * procs */ -typedef struct CmdTable -{ +typedef struct CmdTable { char *cmdName; /* command name */ Tcl_ObjCmdProc *proc; /* command proc */ int exportIt; /* if 1, export the command */ @@ -49,8 +48,8 @@ static int ProcBodyTestProcObjCmd(ClientData dummy, static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe); static int RegisterCommand(Tcl_Interp* interp, char *namespace, const CmdTable *cmdTablePtr); -int Procbodytest_Init(Tcl_Interp * interp); -int Procbodytest_SafeInit(Tcl_Interp * interp); +int Procbodytest_Init(Tcl_Interp * interp); +int Procbodytest_SafeInit(Tcl_Interp * interp); /* * List of commands to create when the package is loaded; must go after the @@ -72,13 +71,13 @@ static const CmdTable safeCommands[] = { * * Procbodytest_Init -- * - * This function initializes the "procbodytest" package. + * This function initializes the "procbodytest" package. * * Results: - * A standard Tcl result. + * A standard Tcl result. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -86,7 +85,7 @@ static const CmdTable safeCommands[] = { int Procbodytest_Init( Tcl_Interp *interp) /* the Tcl interpreter for which the package - * is initialized */ + * is initialized */ { return ProcBodyTestInitInternal(interp, 0); } @@ -96,13 +95,13 @@ Procbodytest_Init( * * Procbodytest_SafeInit -- * - * This function initializes the "procbodytest" package. + * This function initializes the "procbodytest" package. * * Results: - * A standard Tcl result. + * A standard Tcl result. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -110,7 +109,7 @@ Procbodytest_Init( int Procbodytest_SafeInit( Tcl_Interp *interp) /* the Tcl interpreter for which the package - * is initialized */ + * is initialized */ { return ProcBodyTestInitInternal(interp, 1); } @@ -120,36 +119,38 @@ Procbodytest_SafeInit( * * RegisterCommand -- * - * This function registers a command in the context of the given namespace. + * This function registers a command in the context of the given + * namespace. * * Results: - * A standard Tcl result. + * A standard Tcl result. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ -static int RegisterCommand(interp, namespace, cmdTablePtr) - Tcl_Interp* interp; /* the Tcl interpreter for which the operation +static int +RegisterCommand( + Tcl_Interp* interp, /* the Tcl interpreter for which the operation * is performed */ - char *namespace; /* the namespace in which the command is + char *namespace, /* the namespace in which the command is * registered */ - const CmdTable *cmdTablePtr;/* the command to register */ + const CmdTable *cmdTablePtr)/* the command to register */ { char buf[128]; if (cmdTablePtr->exportIt) { - sprintf(buf, "namespace eval %s { namespace export %s }", - namespace, cmdTablePtr->cmdName); - if (Tcl_Eval(interp, buf) != TCL_OK) - return TCL_ERROR; + sprintf(buf, "namespace eval %s { namespace export %s }", + namespace, cmdTablePtr->cmdName); + if (Tcl_Eval(interp, buf) != TCL_OK) { + return TCL_ERROR; + } } sprintf(buf, "%s::%s", namespace, cmdTablePtr->cmdName); Tcl_CreateObjCommand(interp, buf, cmdTablePtr->proc, 0, 0); - return TCL_OK; } @@ -173,16 +174,16 @@ static int RegisterCommand(interp, namespace, cmdTablePtr) static int ProcBodyTestInitInternal( Tcl_Interp *interp, /* the Tcl interpreter for which the package - * is initialized */ + * is initialized */ int isSafe) /* 1 if this is a safe interpreter */ { const CmdTable *cmdTablePtr; cmdTablePtr = (isSafe) ? &safeCommands[0] : &commands[0]; for ( ; cmdTablePtr->cmdName ; cmdTablePtr++) { - if (RegisterCommand(interp, packageName, cmdTablePtr) != TCL_OK) { - return TCL_ERROR; - } + if (RegisterCommand(interp, packageName, cmdTablePtr) != TCL_OK) { + return TCL_ERROR; + } } return Tcl_PkgProvide(interp, packageName, packageVersion); @@ -248,7 +249,7 @@ ProcBodyTestProcObjCmd( fullName = Tcl_GetStringFromObj(objv[3], NULL); procCmd = Tcl_FindCommand(interp, fullName, NULL, TCL_LEAVE_ERR_MSG); if (procCmd == NULL) { - return TCL_ERROR; + return TCL_ERROR; } cmdPtr = (Command *) procCmd; @@ -259,9 +260,9 @@ ProcBodyTestProcObjCmd( */ if (cmdPtr->objClientData != TclIsProc(cmdPtr)) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "command \"", fullName, "\" is not a Tcl procedure", NULL); - return TCL_ERROR; + return TCL_ERROR; } /* @@ -270,10 +271,9 @@ ProcBodyTestProcObjCmd( procPtr = (Proc *) cmdPtr->objClientData; if (procPtr == NULL) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), - "procedure \"", fullName, - "\" does not have a Proc struct!", NULL); - return TCL_ERROR; + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "procedure \"", + fullName, "\" does not have a Proc struct!", NULL); + return TCL_ERROR; } /* @@ -282,10 +282,10 @@ ProcBodyTestProcObjCmd( bodyObjPtr = TclNewProcBodyObj(procPtr); if (bodyObjPtr == NULL) { - Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), + Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "failed to create a procbody object for procedure \"", - fullName, "\"", NULL); - return TCL_ERROR; + fullName, "\"", NULL); + return TCL_ERROR; } Tcl_IncrRefCount(bodyObjPtr); diff --git a/generic/tclThread.c b/generic/tclThread.c index 0feba5b..7d5d4dd 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThread.c,v 1.21 2008/07/24 21:54:39 nijtmans Exp $ + * RCS: @(#) $Id: tclThread.c,v 1.22 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -99,7 +99,7 @@ Tcl_GetThreadData( *keyPtr = result; RememberSyncObject((char *) keyPtr, &keyRecord); } else { - result = *keyPtr; + result = *keyPtr; } #endif /* TCL_THREADS */ return result; diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index a448328..ba30637 100755 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadAlloc.c,v 1.28 2008/07/29 18:19:17 msofer Exp $ + * RCS: @(#) $Id: tclThreadAlloc.c,v 1.29 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -495,8 +495,8 @@ TclpRealloc( * list is empty. * * Note: - * If this code is updated, the changes need to be reflected in the - * macro TclAllocObjStorageEx() defined in tclInt.h + * If this code is updated, the changes need to be reflected in the macro + * TclAllocObjStorageEx() defined in tclInt.h * *---------------------------------------------------------------------- */ @@ -568,8 +568,8 @@ TclThreadAllocObj(void) * May move free Tcl_Obj's to shared list upon hitting high water mark. * * Note: - * If this code is updated, the changes need to be reflected in the - * macro TclAllocObjStorageEx() defined in tclInt.h + * If this code is updated, the changes need to be reflected in the macro + * TclAllocObjStorageEx() defined in tclInt.h * *---------------------------------------------------------------------- */ @@ -985,8 +985,8 @@ TclFinalizeThreadAlloc(void) unsigned int i; for (i = 0; i < NBUCKETS; ++i) { - TclpFreeAllocMutex(bucketInfo[i].lockPtr); - bucketInfo[i].lockPtr = NULL; + TclpFreeAllocMutex(bucketInfo[i].lockPtr); + bucketInfo[i].lockPtr = NULL; } TclpFreeAllocMutex(objLockPtr); diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index cad9e11..7ee5704 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.29 2008/12/16 23:24:13 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.30 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -32,11 +32,13 @@ extern int Tcltest_Init(Tcl_Interp *interp); */ typedef struct ThreadSpecificData { - Tcl_ThreadId threadId; /* Tcl ID for this thread */ - Tcl_Interp *interp; /* Main interpreter for this thread */ - int flags; /* See the TP_ defines below... */ - struct ThreadSpecificData *nextPtr; /* List for "thread names" */ - struct ThreadSpecificData *prevPtr; /* List for "thread names" */ + Tcl_ThreadId threadId; /* Tcl ID for this thread */ + Tcl_Interp *interp; /* Main interpreter for this thread */ + int flags; /* See the TP_ defines below... */ + struct ThreadSpecificData *nextPtr; + /* List for "thread names" */ + struct ThreadSpecificData *prevPtr; + /* List for "thread names" */ } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; @@ -51,7 +53,7 @@ static struct ThreadSpecificData *threadList; * The following bit-values are legal for the "flags" field of the * ThreadSpecificData structure. */ -#define TP_Dying 0x001 /* This thread is being canceled */ +#define TP_Dying 0x001 /* This thread is being canceled */ /* * An instance of the following structure contains all information that is @@ -153,7 +155,7 @@ static void ThreadExitProc(ClientData clientData); * Initialize the test thread command. * * Results: - * TCL_OK if the package was properly initialized. + * TCL_OK if the package was properly initialized. * * Side effects: * Add the "testthread" command to the interp. @@ -175,8 +177,7 @@ TclThread_Init( } Tcl_MutexUnlock(&threadMutex); - Tcl_CreateObjCommand(interp, "testthread", Tcl_ThreadObjCmd, - (ClientData) NULL, NULL); + Tcl_CreateObjCommand(interp, "testthread", Tcl_ThreadObjCmd, NULL, NULL); return TCL_OK; } @@ -299,9 +300,8 @@ Tcl_ThreadObjCmd( script = Tcl_GetStringFromObj(objv[2], &len); - if ((len > 1) && - (script [0] == '-') && (script [1] == 'j') && - (0 == strncmp (script, "-joinable", (size_t) len))) { + if ((len > 1) && (script[0] == '-') && (script[1] == 'j') && + (0 == strncmp(script, "-joinable", (size_t) len))) { joinable = 1; script = "testthread wait"; /* Just enter event loop */ } else { @@ -317,11 +317,8 @@ Tcl_ThreadObjCmd( */ script = Tcl_GetStringFromObj(objv[2], &len); - - joinable = ((len > 1) && - (script [0] == '-') && (script [1] == 'j') && - (0 == strncmp(script, "-joinable", (size_t) len))); - + joinable = ((len > 1) && (script[0] == '-') && (script[1] == 'j') + && (0 == strncmp(script, "-joinable", (size_t) len))); script = Tcl_GetString(objv[3]); } else { Tcl_WrongNumArgs(interp, 2, objv, "?-joinable? ?script?"); @@ -345,17 +342,16 @@ Tcl_ThreadObjCmd( * Check if they want the main thread id or the current thread id. */ - if (objc == 2) { + if (objc == 2) { idObj = Tcl_NewLongObj((long) Tcl_GetCurrentThread()); + } else if (objc == 3 + && strcmp("-main", Tcl_GetString(objv[2])) == 0) { + Tcl_MutexLock(&threadMutex); + idObj = Tcl_NewLongObj((long) mainThreadId); + Tcl_MutexUnlock(&threadMutex); } else { - if (objc == 3 && strcmp("-main", Tcl_GetString(objv[2])) == 0) { - Tcl_MutexLock(&threadMutex); - idObj = Tcl_NewLongObj((long) mainThreadId); - Tcl_MutexUnlock(&threadMutex); - } else { - Tcl_WrongNumArgs(interp, 2, objv, NULL); - return TCL_ERROR; - } + Tcl_WrongNumArgs(interp, 2, objv, NULL); + return TCL_ERROR; } Tcl_SetObjResult(interp, idObj); @@ -376,11 +372,11 @@ Tcl_ThreadObjCmd( return TCL_ERROR; } - result = Tcl_JoinThread ((Tcl_ThreadId) id, &status); + result = Tcl_JoinThread((Tcl_ThreadId) id, &status); if (result == TCL_OK) { - Tcl_SetIntObj (Tcl_GetObjResult (interp), status); + Tcl_SetIntObj(Tcl_GetObjResult(interp), status); } else { - char buf [20]; + char buf[20]; sprintf(buf, "%ld", id); Tcl_AppendResult(interp, "cannot join thread ", buf, NULL); @@ -467,7 +463,8 @@ Tcl_ThreadObjCmd( * calling Tcl_Canceled to check if the command has been canceled. */ - if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG | TCL_CANCEL_UNWIND) == TCL_ERROR) { + if (Tcl_Canceled(interp, + TCL_LEAVE_ERR_MSG | TCL_CANCEL_UNWIND) == TCL_ERROR) { break; } (void) Tcl_DoOneEvent(TCL_ALL_EVENTS); @@ -521,7 +518,7 @@ TclCreateThread( if (Tcl_CreateThread(&id, NewTestThread, (ClientData) &ctrl, TCL_THREAD_STACK_DEFAULT, joinable) != TCL_OK) { Tcl_MutexUnlock(&threadMutex); - Tcl_AppendResult(interp, "can't create a new thread", NULL); + Tcl_AppendResult(interp, "can't create a new thread", NULL); ckfree((char *) ctrl.script); return TCL_ERROR; } @@ -569,7 +566,7 @@ Tcl_ThreadCreateType NewTestThread( ClientData clientData) { - ThreadCtrl *ctrlPtr = (ThreadCtrl*)clientData; + ThreadCtrl *ctrlPtr = clientData; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); int result; char *threadEvalScript; @@ -604,7 +601,7 @@ NewTestThread( threadEvalScript = ckalloc(strlen(ctrlPtr->script)+1); strcpy(threadEvalScript, ctrlPtr->script); - Tcl_CreateThreadExitHandler(ThreadExitProc, (ClientData) threadEvalScript); + Tcl_CreateThreadExitHandler(ThreadExitProc, threadEvalScript); /* * Notify the parent we are alive. @@ -617,7 +614,7 @@ NewTestThread( * Run the script. */ - Tcl_Preserve((ClientData) tsdPtr->interp); + Tcl_Preserve(tsdPtr->interp); result = Tcl_Eval(tsdPtr->interp, threadEvalScript); if (result != TCL_OK) { ThreadErrorProc(tsdPtr->interp); @@ -628,7 +625,7 @@ NewTestThread( */ ListRemove(tsdPtr); - Tcl_Release((ClientData) tsdPtr->interp); + Tcl_Release(tsdPtr->interp); Tcl_DeleteInterp(tsdPtr->interp); Tcl_ExitThread(result); @@ -836,7 +833,7 @@ TclThreadSend( */ if (threadId == Tcl_GetCurrentThread()) { - Tcl_MutexUnlock(&threadMutex); + Tcl_MutexUnlock(&threadMutex); return Tcl_GlobalEval(interp, script); } @@ -883,7 +880,7 @@ TclThreadSend( */ threadEventPtr->event.proc = ThreadEventProc; - Tcl_ThreadQueueEvent(threadId, (Tcl_Event *)threadEventPtr, + Tcl_ThreadQueueEvent(threadId, (Tcl_Event *) threadEventPtr, TCL_QUEUE_TAIL); Tcl_ThreadAlert(threadId); @@ -898,7 +895,7 @@ TclThreadSend( Tcl_ResetResult(interp); while (resultPtr->result == NULL) { - Tcl_ConditionWait(&resultPtr->done, &threadMutex, NULL); + Tcl_ConditionWait(&resultPtr->done, &threadMutex, NULL); } /* @@ -1016,7 +1013,7 @@ ThreadEventProc( int mask) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - ThreadEvent *threadEventPtr = (ThreadEvent *)evPtr; + ThreadEvent *threadEventPtr = (ThreadEvent *) evPtr; ThreadEventResult *resultPtr = threadEventPtr->resultPtr; Tcl_Interp *interp = tsdPtr->interp; int code; @@ -1028,13 +1025,11 @@ ThreadEventProc( errorCode = "THREAD"; errorInfo = ""; } else { - Tcl_Preserve((ClientData) interp); + Tcl_Preserve(interp); Tcl_ResetResult(interp); - Tcl_CreateThreadExitHandler(ThreadFreeProc, - (ClientData) threadEventPtr->script); + Tcl_CreateThreadExitHandler(ThreadFreeProc, threadEventPtr->script); code = Tcl_GlobalEval(interp, threadEventPtr->script); - Tcl_DeleteThreadExitHandler(ThreadFreeProc, - (ClientData) threadEventPtr->script); + Tcl_DeleteThreadExitHandler(ThreadFreeProc, threadEventPtr->script); if (code != TCL_OK) { errorCode = Tcl_GetVar(interp, "errorCode", TCL_GLOBAL_ONLY); errorInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); @@ -1061,7 +1056,7 @@ ThreadEventProc( Tcl_MutexUnlock(&threadMutex); } if (interp != NULL) { - Tcl_Release((ClientData) interp); + Tcl_Release(interp); } return 1; } @@ -1151,17 +1146,17 @@ static void ThreadExitProc( ClientData clientData) { - char *threadEvalScript = (char *) clientData; + char *threadEvalScript = clientData; ThreadEventResult *resultPtr, *nextPtr; Tcl_ThreadId self = Tcl_GetCurrentThread(); Tcl_MutexLock(&threadMutex); if (threadEvalScript) { - ckfree((char *) threadEvalScript); + ckfree(threadEvalScript); threadEvalScript = NULL; } - Tcl_DeleteEvents((Tcl_EventDeleteProc *)ThreadDeleteEvent, NULL); + Tcl_DeleteEvents((Tcl_EventDeleteProc *) ThreadDeleteEvent, NULL); for (resultPtr = resultList ; resultPtr ; resultPtr = nextPtr) { nextPtr = resultPtr->nextPtr; diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 03e01fa..b970d50 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.37 2008/12/09 20:16:30 dgp Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.38 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -74,7 +74,7 @@ typedef struct AfterAssocData { */ typedef struct IdleHandler { - Tcl_IdleProc (*proc); /* Function to call. */ + Tcl_IdleProc *proc; /* Function to call. */ ClientData clientData; /* Value to pass to proc. */ int generation; /* Used to distinguish older handlers from * recently-created ones. */ @@ -297,7 +297,7 @@ TclCreateAbsoluteTimerHandler( * Fill in fields for the event. */ - memcpy((void *)&timerHandlerPtr->time, (void *)timePtr, sizeof(Tcl_Time)); + memcpy(&timerHandlerPtr->time, timePtr, sizeof(Tcl_Time)); timerHandlerPtr->proc = proc; timerHandlerPtr->clientData = clientData; tsdPtr->lastTimerId++; @@ -406,7 +406,6 @@ TimerSetupProc( blockTime.sec = 0; blockTime.usec = 0; - } else if ((flags & TCL_TIMER_EVENTS) && tsdPtr->firstTimerHandlerPtr) { /* * Compute the timeout for the next timer on the list. @@ -807,8 +806,7 @@ Tcl_AfterObjCmd( assocPtr = (AfterAssocData *) ckalloc(sizeof(AfterAssocData)); assocPtr->interp = interp; assocPtr->firstAfterPtr = NULL; - Tcl_SetAssocData(interp, "tclAfter", AfterCleanupProc, - (ClientData) assocPtr); + Tcl_SetAssocData(interp, "tclAfter", AfterCleanupProc, assocPtr); } /* @@ -817,17 +815,16 @@ Tcl_AfterObjCmd( if (objv[1]->typePtr == &tclIntType #ifndef NO_WIDE_TYPE - || objv[1]->typePtr == &tclWideIntType + || objv[1]->typePtr == &tclWideIntType #endif - || objv[1]->typePtr == &tclBignumType - || ( Tcl_GetIndexFromObj(NULL, objv[1], afterSubCmds, "", 0, - &index) != TCL_OK )) { + || objv[1]->typePtr == &tclBignumType + || (Tcl_GetIndexFromObj(NULL, objv[1], afterSubCmds, "", 0, + &index) != TCL_OK)) { index = -1; if (Tcl_GetWideIntFromObj(NULL, objv[1], &ms) != TCL_OK) { Tcl_AppendResult(interp, "bad argument \"", - Tcl_GetString(objv[1]), - "\": must be cancel, idle, info, or an integer", - NULL); + Tcl_GetString(objv[1]), + "\": must be cancel, idle, info, or an integer", NULL); return TCL_ERROR; } } @@ -873,8 +870,8 @@ Tcl_AfterObjCmd( wakeup.sec++; wakeup.usec -= 1000000; } - afterPtr->token = TclCreateAbsoluteTimerHandler(&wakeup, AfterProc, - (ClientData) afterPtr); + afterPtr->token = TclCreateAbsoluteTimerHandler(&wakeup, + AfterProc, afterPtr); afterPtr->nextPtr = assocPtr->firstAfterPtr; assocPtr->firstAfterPtr = afterPtr; Tcl_SetObjResult(interp, Tcl_ObjPrintf("after#%d", afterPtr->id)); @@ -915,7 +912,7 @@ Tcl_AfterObjCmd( if (afterPtr->token != NULL) { Tcl_DeleteTimerHandler(afterPtr->token); } else { - Tcl_CancelIdleCall(AfterProc, (ClientData) afterPtr); + Tcl_CancelIdleCall(AfterProc, afterPtr); } FreeAfterPtr(afterPtr); } @@ -939,7 +936,7 @@ Tcl_AfterObjCmd( afterPtr->token = NULL; afterPtr->nextPtr = assocPtr->firstAfterPtr; assocPtr->firstAfterPtr = afterPtr; - Tcl_DoWhenIdle(AfterProc, (ClientData) afterPtr); + Tcl_DoWhenIdle(AfterProc, afterPtr); Tcl_SetObjResult(interp, Tcl_ObjPrintf("after#%d", afterPtr->id)); break; case AFTER_INFO: { @@ -1146,7 +1143,7 @@ static void AfterProc( ClientData clientData) /* Describes command to execute. */ { - AfterInfo *afterPtr = (AfterInfo *) clientData; + AfterInfo *afterPtr = clientData; AfterAssocData *assocPtr = afterPtr->assocPtr; AfterInfo *prevPtr; int result; @@ -1173,13 +1170,13 @@ AfterProc( */ interp = assocPtr->interp; - Tcl_Preserve((ClientData) interp); + Tcl_Preserve(interp); result = Tcl_EvalObjEx(interp, afterPtr->commandPtr, TCL_EVAL_GLOBAL); if (result != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (\"after\" script)"); Tcl_BackgroundException(interp, result); } - Tcl_Release((ClientData) interp); + Tcl_Release(interp); /* * Free the memory for the callback. @@ -1251,7 +1248,7 @@ AfterCleanupProc( * interpreter. */ Tcl_Interp *interp) /* Interpreter that is being deleted. */ { - AfterAssocData *assocPtr = (AfterAssocData *) clientData; + AfterAssocData *assocPtr = clientData; AfterInfo *afterPtr; while (assocPtr->firstAfterPtr != NULL) { @@ -1260,7 +1257,7 @@ AfterCleanupProc( if (afterPtr->token != NULL) { Tcl_DeleteTimerHandler(afterPtr->token); } else { - Tcl_CancelIdleCall(AfterProc, (ClientData) afterPtr); + Tcl_CancelIdleCall(AfterProc, afterPtr); } Tcl_DecrRefCount(afterPtr->commandPtr); ckfree((char *) afterPtr); diff --git a/generic/tclVar.c b/generic/tclVar.c index dad0d1a..6c5e382 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.174 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.175 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -147,7 +147,7 @@ static void AppendLocals(Tcl_Interp *interp, Tcl_Obj *listPtr, static void DeleteSearches(Interp *iPtr, Var *arrayVarPtr); static void DeleteArray(Interp *iPtr, Tcl_Obj *arrayNamePtr, Var *varPtr, int flags); -static Tcl_Var ObjFindNamespaceVar(Tcl_Interp *interp, +static Tcl_Var ObjFindNamespaceVar(Tcl_Interp *interp, Tcl_Obj *namePtr, Tcl_Namespace *contextNsPtr, int flags); static int ObjMakeUpvar(Tcl_Interp *interp, @@ -187,7 +187,7 @@ static Tcl_SetFromAnyProc PanicOnSetVarName; * * localVarName - INTERNALREP DEFINITION: * ptrAndLongRep.ptr: pointer to name obj in varFramePtr->localCache - * or NULL if it is this same obj + * or NULL if it is this same obj * ptrAndLongRep.value: index into locals table * * nsVarName - INTERNALREP DEFINITION: @@ -545,8 +545,7 @@ TclObjLookupVarEx( * Use the cached index if the names coincide. */ - Tcl_Obj *namePtr = (Tcl_Obj *) - part1Ptr->internalRep.ptrAndLongRep.ptr; + Tcl_Obj *namePtr = part1Ptr->internalRep.ptrAndLongRep.ptr; Tcl_Obj *checkNamePtr = localName(iPtr->varFramePtr, localIndex); if ((!namePtr && (checkNamePtr == part1Ptr)) || @@ -660,8 +659,8 @@ TclObjLookupVarEx( len2 = len1 - i - 2; len1 = i; - newPart2 = ckalloc((unsigned int) (len2+1)); - memcpy(newPart2, part2, (unsigned int) len2); + newPart2 = ckalloc((unsigned) (len2+1)); + memcpy(newPart2, part2, (unsigned) len2); *(newPart2+len2) = '\0'; part2 = newPart2; part2Ptr = Tcl_NewStringObj(newPart2, -1); @@ -4704,7 +4703,7 @@ PanicOnSetVarName( * * INTERNALREP DEFINITION: * ptrAndLongRep.ptr: pointer to name obj in varFramePtr->localCache - * or NULL if it is this same obj + * or NULL if it is this same obj * ptrAndLongRep.value: index into locals table */ @@ -4712,7 +4711,8 @@ static void FreeLocalVarName( Tcl_Obj *objPtr) { - Tcl_Obj *namePtr = (Tcl_Obj *) objPtr->internalRep.ptrAndLongRep.ptr; + Tcl_Obj *namePtr = objPtr->internalRep.ptrAndLongRep.ptr; + if (namePtr) { Tcl_DecrRefCount(namePtr); } @@ -5349,7 +5349,7 @@ TclInfoLocalsCmd( return TCL_ERROR; } - if (!(iPtr->varFramePtr->isProcCallFrame & FRAME_IS_PROC )) { + if (!(iPtr->varFramePtr->isProcCallFrame & FRAME_IS_PROC)) { return TCL_OK; } diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index c902a28..d1bab28 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.15 2008/10/26 18:50:06 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.16 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -27,19 +27,22 @@ #if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 /* Support for weakly importing copyfile. */ #define WEAK_IMPORT_COPYFILE -extern int copyfile(const char *from, const char *to, copyfile_state_t state, - copyfile_flags_t flags) WEAK_IMPORT_ATTRIBUTE; +extern int copyfile(const char *from, const char *to, + copyfile_state_t state, copyfile_flags_t flags) + WEAK_IMPORT_ATTRIBUTE; #endif /* HAVE_WEAK_IMPORT */ #else /* HAVE_COPYFILE_H */ -int copyfile(const char *from, const char *to, void *state, uint32_t flags); +int copyfile(const char *from, const char *to, + void *state, uint32_t flags); #define COPYFILE_ACL (1<<0) #define COPYFILE_XATTR (1<<2) #define COPYFILE_NOFOLLOW_SRC (1<<18) #if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 /* Support for weakly importing copyfile. */ #define WEAK_IMPORT_COPYFILE -extern int copyfile(const char *from, const char *to, void *state, - uint32_t flags) WEAK_IMPORT_ATTRIBUTE; +extern int copyfile(const char *from, const char *to, + void *state, uint32_t flags) + WEAK_IMPORT_ATTRIBUTE; #endif /* HAVE_WEAK_IMPORT */ #endif /* HAVE_COPYFILE_H */ #endif /* HAVE_COPYFILE */ @@ -391,75 +394,75 @@ TclMacOSXCopyFileAttributes( if (copyfile != NULL) { #endif #ifdef HAVE_COPYFILE - if (copyfile(src, dst, NULL, COPYFILE_XATTR | - (S_ISLNK(statBufPtr->st_mode) ? COPYFILE_NOFOLLOW_SRC : - COPYFILE_ACL)) < 0) { - return TCL_ERROR; - } - return TCL_OK; + if (copyfile(src, dst, NULL, COPYFILE_XATTR | + (S_ISLNK(statBufPtr->st_mode) + ? COPYFILE_NOFOLLOW_SRC : COPYFILE_ACL)) < 0) { + return TCL_ERROR; + } + return TCL_OK; #endif /* HAVE_COPYFILE */ #ifdef WEAK_IMPORT_COPYFILE } else { #endif #if !defined(HAVE_COPYFILE) || defined(WEAK_IMPORT_COPYFILE) #ifdef HAVE_GETATTRLIST - struct attrlist alist; - fileinfobuf finfo; - off_t *rsrcForkSize = (off_t *) &finfo.data; - - bzero(&alist, sizeof(struct attrlist)); - alist.bitmapcount = ATTR_BIT_MAP_COUNT; - alist.commonattr = ATTR_CMN_FNDRINFO; - - if (getattrlist(src, &alist, &finfo, sizeof(fileinfobuf), 0)) { - return TCL_ERROR; - } + struct attrlist alist; + fileinfobuf finfo; + off_t *rsrcForkSize = (off_t *) &finfo.data; - if (setattrlist(dst, &alist, &finfo.data, sizeof(finfo.data), 0)) { - return TCL_ERROR; - } - - if (!S_ISDIR(statBufPtr->st_mode)) { - /* - * Only copy non-empty resource fork. - */ - - alist.commonattr = 0; - alist.fileattr = ATTR_FILE_RSRCLENGTH; + bzero(&alist, sizeof(struct attrlist)); + alist.bitmapcount = ATTR_BIT_MAP_COUNT; + alist.commonattr = ATTR_CMN_FNDRINFO; if (getattrlist(src, &alist, &finfo, sizeof(fileinfobuf), 0)) { return TCL_ERROR; } - if(*rsrcForkSize > 0) { - int result; - Tcl_DString ds_src, ds_dst; + if (setattrlist(dst, &alist, &finfo.data, sizeof(finfo.data), 0)) { + return TCL_ERROR; + } + if (!S_ISDIR(statBufPtr->st_mode)) { /* - * Construct paths to resource forks. + * Only copy non-empty resource fork. */ - Tcl_DStringInit(&ds_src); - Tcl_DStringAppend(&ds_src, src, -1); - Tcl_DStringAppend(&ds_src, _PATH_RSRCFORKSPEC, -1); - Tcl_DStringInit(&ds_dst); - Tcl_DStringAppend(&ds_dst, dst, -1); - Tcl_DStringAppend(&ds_dst, _PATH_RSRCFORKSPEC, -1); + alist.commonattr = 0; + alist.fileattr = ATTR_FILE_RSRCLENGTH; - result = TclUnixCopyFile(Tcl_DStringValue(&ds_src), - Tcl_DStringValue(&ds_dst), statBufPtr, 1); + if (getattrlist(src, &alist, &finfo, sizeof(fileinfobuf), 0)) { + return TCL_ERROR; + } - Tcl_DStringFree(&ds_src); - Tcl_DStringFree(&ds_dst); + if (*rsrcForkSize > 0) { + int result; + Tcl_DString ds_src, ds_dst; - if (result != 0) { - return TCL_ERROR; + /* + * Construct paths to resource forks. + */ + + Tcl_DStringInit(&ds_src); + Tcl_DStringAppend(&ds_src, src, -1); + Tcl_DStringAppend(&ds_src, _PATH_RSRCFORKSPEC, -1); + Tcl_DStringInit(&ds_dst); + Tcl_DStringAppend(&ds_dst, dst, -1); + Tcl_DStringAppend(&ds_dst, _PATH_RSRCFORKSPEC, -1); + + result = TclUnixCopyFile(Tcl_DStringValue(&ds_src), + Tcl_DStringValue(&ds_dst), statBufPtr, 1); + + Tcl_DStringFree(&ds_src); + Tcl_DStringFree(&ds_dst); + + if (result != 0) { + return TCL_ERROR; + } } } - } - return TCL_OK; + return TCL_OK; #else - return TCL_ERROR; + return TCL_ERROR; #endif /* HAVE_GETATTRLIST */ #endif /* !defined(HAVE_COPYFILE) || defined(WEAK_IMPORT_COPYFILE) */ #ifdef WEAK_IMPORT_COPYFILE @@ -472,13 +475,13 @@ TclMacOSXCopyFileAttributes( * * TclMacOSXMatchType -- * - * This routine is used by the globbing code to check if a file - * matches a given mac type and/or creator code. + * This routine is used by the globbing code to check if a file matches a + * given mac type and/or creator code. * * Results: - * The return value is 1, 0 or -1 indicating whether the file - * matches the given criteria, does not match them, or an error - * occurred (in wich case an error is left in interp). + * The return value is 1, 0 or -1 indicating whether the file matches the + * given criteria, does not match them, or an error occurred (in wich + * case an error is left in interp). * * Side effects: * None. @@ -510,8 +513,12 @@ TclMacOSXMatchType( !((finder->fdFlags & kFinfoIsInvisible) || (*fileName == '.'))) { return 0; } - if (S_ISDIR(statBufPtr->st_mode) && (types->macType || types->macCreator)) { - /* Directories don't support types or creators */ + if (S_ISDIR(statBufPtr->st_mode) + && (types->macType || types->macCreator)) { + /* + * Directories don't support types or creators. + */ + return 0; } if (types->macType) { @@ -584,7 +591,8 @@ GetOSTypeFromObj( static Tcl_Obj * NewOSTypeObj( - const OSType osType) /* OSType used to initialize the new object. */ + const OSType osType) /* OSType used to initialize the new + * object. */ { Tcl_Obj *objPtr; @@ -631,8 +639,8 @@ SetOSTypeFromAny( } else { OSType osType; char string[4] = {'\0','\0','\0','\0'}; - memcpy(string, Tcl_DStringValue(&ds), - (size_t) Tcl_DStringLength(&ds)); + + memcpy(string, Tcl_DStringValue(&ds), (size_t)Tcl_DStringLength(&ds)); osType = (OSType) string[0] << 24 | (OSType) string[1] << 16 | (OSType) string[2] << 8 | diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index b67ef3e..8edbda2 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.21 2008/10/26 18:50:07 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.22 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -239,7 +239,7 @@ static OSSpinLock notifierLock = SPINLOCK_INIT; * Debug version of SpinLockLock that logs the time spent waiting for the lock */ -#define SpinLockLockDbg(p) if(!SpinLockTry(p)) { \ +#define SpinLockLockDbg(p) if (!SpinLockTry(p)) { \ Tcl_WideInt s = TclpGetWideClicks(), e; \ SpinLockLock(p); e = TclpGetWideClicks(); \ fprintf(notifierLog, "tclMacOSXNotify.c:" \ @@ -313,8 +313,8 @@ static void AtForkChild(void); #if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 /* Support for weakly importing pthread_atfork. */ #define WEAK_IMPORT_PTHREAD_ATFORK -extern int pthread_atfork(void (*prepare)(void), void (*parent)(void), - void (*child)(void)) WEAK_IMPORT_ATTRIBUTE; +extern int pthread_atfork(void (*prepare)(void), void (*parent)(void), + void (*child)(void)) WEAK_IMPORT_ATTRIBUTE; #endif /* HAVE_WEAK_IMPORT */ /* * On Darwin 9 and later, it is not possible to call CoreFoundation after @@ -348,113 +348,112 @@ MODULE_SCOPE long tclMacOSXDarwinRelease; ClientData Tcl_InitNotifier(void) { + ThreadSpecificData *tsdPtr; + if (tclNotifierHooks.initNotifierProc) { return tclNotifierHooks.initNotifierProc(); - } else { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + } - tsdPtr->eventReady = 0; + tsdPtr = TCL_TSD_INIT(&dataKey); + tsdPtr->eventReady = 0; #ifdef WEAK_IMPORT_SPINLOCKLOCK - /* - * Initialize support for weakly imported spinlock API. - */ - if (pthread_once(&spinLockLockInitControl, SpinLockLockInit)) { - Tcl_Panic("Tcl_InitNotifier: pthread_once failed"); - } + /* + * Initialize support for weakly imported spinlock API. + */ + + if (pthread_once(&spinLockLockInitControl, SpinLockLockInit)) { + Tcl_Panic("Tcl_InitNotifier: pthread_once failed"); + } #endif #ifndef __CONSTANT_CFSTRINGS__ - if (!tclEventsOnlyRunLoopMode) { - tclEventsOnlyRunLoopMode = CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE); - } + if (!tclEventsOnlyRunLoopMode) { + tclEventsOnlyRunLoopMode = CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE); + } #endif - /* - * Initialize CFRunLoopSource and add it to CFRunLoop of this thread. - */ + /* + * Initialize CFRunLoopSource and add it to CFRunLoop of this thread. + */ - if (!tsdPtr->runLoop) { - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - CFRunLoopSourceRef runLoopSource; - CFRunLoopSourceContext runLoopSourceContext; - - bzero(&runLoopSourceContext, sizeof(CFRunLoopSourceContext)); - runLoopSourceContext.info = tsdPtr; - runLoopSource = CFRunLoopSourceCreate(NULL, 0, - &runLoopSourceContext); - if (!runLoopSource) { - Tcl_Panic("Tcl_InitNotifier: could not create CFRunLoopSource"); - } - CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopCommonModes); - CFRunLoopAddSource(runLoop, runLoopSource, - tclEventsOnlyRunLoopMode); - tsdPtr->runLoopSource = runLoopSource; - tsdPtr->runLoop = runLoop; + if (!tsdPtr->runLoop) { + CFRunLoopRef runLoop = CFRunLoopGetCurrent(); + CFRunLoopSourceRef runLoopSource; + CFRunLoopSourceContext runLoopSourceContext; + + bzero(&runLoopSourceContext, sizeof(CFRunLoopSourceContext)); + runLoopSourceContext.info = tsdPtr; + runLoopSource = CFRunLoopSourceCreate(NULL, 0, &runLoopSourceContext); + if (!runLoopSource) { + Tcl_Panic("Tcl_InitNotifier: could not create CFRunLoopSource"); } + CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopCommonModes); + CFRunLoopAddSource(runLoop, runLoopSource, tclEventsOnlyRunLoopMode); + tsdPtr->runLoopSource = runLoopSource; + tsdPtr->runLoop = runLoop; + } - LOCK_NOTIFIER_INIT; + LOCK_NOTIFIER_INIT; #ifdef HAVE_PTHREAD_ATFORK - /* - * Install pthread_atfork handlers to reinitialize the notifier in the - * child of a fork. - */ + /* + * Install pthread_atfork handlers to reinitialize the notifier in the + * child of a fork. + */ - if ( + if ( #ifdef WEAK_IMPORT_PTHREAD_ATFORK - pthread_atfork != NULL && + pthread_atfork != NULL && #endif - !atForkInit) { - int result = pthread_atfork(AtForkPrepare, AtForkParent, - AtForkChild); + !atForkInit) { + int result = pthread_atfork(AtForkPrepare, AtForkParent, AtForkChild); - if (result) { - Tcl_Panic("Tcl_InitNotifier: pthread_atfork failed"); - } - atForkInit = 1; + if (result) { + Tcl_Panic("Tcl_InitNotifier: pthread_atfork failed"); } + atForkInit = 1; + } #endif - if (notifierCount == 0) { - int fds[2], status; + if (notifierCount == 0) { + int fds[2], status; - /* - * Initialize trigger pipe. - */ + /* + * Initialize trigger pipe. + */ - if (pipe(fds) != 0) { - Tcl_Panic("Tcl_InitNotifier: could not create trigger pipe"); - } + if (pipe(fds) != 0) { + Tcl_Panic("Tcl_InitNotifier: could not create trigger pipe"); + } - status = fcntl(fds[0], F_GETFL); - status |= O_NONBLOCK; - if (fcntl(fds[0], F_SETFL, status) < 0) { - Tcl_Panic("Tcl_InitNotifier: could not make receive pipe non blocking"); - } - status = fcntl(fds[1], F_GETFL); - status |= O_NONBLOCK; - if (fcntl(fds[1], F_SETFL, status) < 0) { - Tcl_Panic("Tcl_InitNotifier: could not make trigger pipe non blocking"); - } + status = fcntl(fds[0], F_GETFL); + status |= O_NONBLOCK; + if (fcntl(fds[0], F_SETFL, status) < 0) { + Tcl_Panic("Tcl_InitNotifier: could not make receive pipe non blocking"); + } + status = fcntl(fds[1], F_GETFL); + status |= O_NONBLOCK; + if (fcntl(fds[1], F_SETFL, status) < 0) { + Tcl_Panic("Tcl_InitNotifier: could not make trigger pipe non blocking"); + } - receivePipe = fds[0]; - triggerPipe = fds[1]; + receivePipe = fds[0]; + triggerPipe = fds[1]; - /* - * Create notifier thread lazily in Tcl_WaitForEvent() to avoid - * interfering with fork() followed immediately by execve() - * (cannot execve() when more than one thread is present). - */ + /* + * Create notifier thread lazily in Tcl_WaitForEvent() to avoid + * interfering with fork() followed immediately by execve() (we cannot + * execve() when more than one thread is present). + */ - notifierThread = 0; + notifierThread = 0; #ifdef TCL_MAC_DEBUG_NOTIFIER - OPEN_NOTIFIER_LOG; + OPEN_NOTIFIER_LOG; #endif - } - notifierCount++; - UNLOCK_NOTIFIER_INIT; - - return (ClientData) tsdPtr; } + notifierCount++; + UNLOCK_NOTIFIER_INIT; + + return (ClientData) tsdPtr; } /* @@ -479,71 +478,72 @@ void Tcl_FinalizeNotifier( ClientData clientData) /* Not used. */ { + ThreadSpecificData *tsdPtr; + if (tclNotifierHooks.finalizeNotifierProc) { tclNotifierHooks.finalizeNotifierProc(clientData); return; - } else { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + } - LOCK_NOTIFIER_INIT; - notifierCount--; + tsdPtr = TCL_TSD_INIT(&dataKey); + LOCK_NOTIFIER_INIT; + notifierCount--; - /* - * If this is the last thread to use the notifier, close the notifier - * pipe and wait for the background thread to terminate. - */ + /* + * If this is the last thread to use the notifier, close the notifier pipe + * and wait for the background thread to terminate. + */ - if (notifierCount == 0) { - int result; + if (notifierCount == 0) { + int result; - if (triggerPipe < 0) { - Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); - } + if (triggerPipe < 0) { + Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); + } - /* - * Send "q" message to the notifier thread so that it will - * terminate. The notifier will return from its call to select() - * and notice that a "q" message has arrived, it will then close - * its side of the pipe and terminate its thread. Note the we can - * not just close the pipe and check for EOF in the notifier thread - * because if a background child process was created with exec, - * select() would not register the EOF on the pipe until the child - * processes had terminated. [Bug: 4139] [Bug: 1222872] - */ + /* + * Send "q" message to the notifier thread so that it will terminate. + * The notifier will return from its call to select() and notice that + * a "q" message has arrived, it will then close its side of the pipe + * and terminate its thread. Note the we can not just close the pipe + * and check for EOF in the notifier thread because if a background + * child process was created with exec, select() would not register + * the EOF on the pipe until the child processes had terminated. [Bug: + * 4139] [Bug: 1222872] + */ - write(triggerPipe, "q", 1); - close(triggerPipe); + write(triggerPipe, "q", 1); + close(triggerPipe); - if (notifierThread) { - result = pthread_join(notifierThread, NULL); - if (result) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); - } - notifierThread = 0; + if (notifierThread) { + result = pthread_join(notifierThread, NULL); + if (result) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); } + notifierThread = 0; + } - close(receivePipe); - triggerPipe = -1; + close(receivePipe); + triggerPipe = -1; #ifdef TCL_MAC_DEBUG_NOTIFIER - CLOSE_NOTIFIER_LOG; + CLOSE_NOTIFIER_LOG; #endif - } - UNLOCK_NOTIFIER_INIT; + } + UNLOCK_NOTIFIER_INIT; - LOCK_NOTIFIER; /* for concurrency with Tcl_AlertNotifier */ - if (tsdPtr->runLoop) { - tsdPtr->runLoop = NULL; + LOCK_NOTIFIER; /* For concurrency with Tcl_AlertNotifier */ + if (tsdPtr->runLoop) { + tsdPtr->runLoop = NULL; - /* - * Remove runLoopSource from all CFRunLoops and release it. - */ + /* + * Remove runLoopSource from all CFRunLoops and release it. + */ - CFRunLoopSourceInvalidate(tsdPtr->runLoopSource); - CFRelease(tsdPtr->runLoopSource); - tsdPtr->runLoopSource = NULL; - } - UNLOCK_NOTIFIER; + CFRunLoopSourceInvalidate(tsdPtr->runLoopSource); + CFRelease(tsdPtr->runLoopSource); + tsdPtr->runLoopSource = NULL; } + UNLOCK_NOTIFIER; } /* @@ -569,20 +569,20 @@ void Tcl_AlertNotifier( ClientData clientData) { + ThreadSpecificData *tsdPtr = clientData; + if (tclNotifierHooks.alertNotifierProc) { tclNotifierHooks.alertNotifierProc(clientData); return; - } else { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; + } - LOCK_NOTIFIER; - if (tsdPtr->runLoop) { - tsdPtr->eventReady = 1; - CFRunLoopSourceSignal(tsdPtr->runLoopSource); - CFRunLoopWakeUp(tsdPtr->runLoop); - } - UNLOCK_NOTIFIER; + LOCK_NOTIFIER; + if (tsdPtr->runLoop) { + tsdPtr->eventReady = 1; + CFRunLoopSourceSignal(tsdPtr->runLoopSource); + CFRunLoopWakeUp(tsdPtr->runLoop); } + UNLOCK_NOTIFIER; } /* @@ -610,13 +610,13 @@ Tcl_SetTimer( if (tclNotifierHooks.setTimerProc) { tclNotifierHooks.setTimerProc(timePtr); return; - } else { - /* - * The interval timer doesn't do anything in this implementation, - * because the only event loop is via Tcl_DoOneEvent, which passes - * timeout values to Tcl_WaitForEvent. - */ } + + /* + * The interval timer doesn't do anything in this implementation, because + * the only event loop is via Tcl_DoOneEvent, which passes timeout values + * to Tcl_WaitForEvent. + */ } /* @@ -675,52 +675,54 @@ Tcl_CreateFileHandler( * event. */ ClientData clientData) /* Arbitrary data to pass to proc. */ { + ThreadSpecificData *tsdPtr; + FileHandler *filePtr; + if (tclNotifierHooks.createFileHandlerProc) { tclNotifierHooks.createFileHandlerProc(fd, mask, proc, clientData); return; - } else { - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - FileHandler *filePtr; + } - for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; - filePtr = filePtr->nextPtr) { - if (filePtr->fd == fd) { - break; - } - } - if (filePtr == NULL) { - filePtr = (FileHandler*) ckalloc(sizeof(FileHandler)); - filePtr->fd = fd; - filePtr->readyMask = 0; - filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; - tsdPtr->firstFileHandlerPtr = filePtr; + tsdPtr = TCL_TSD_INIT(&dataKey); + + for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; + filePtr = filePtr->nextPtr) { + if (filePtr->fd == fd) { + break; } - filePtr->proc = proc; - filePtr->clientData = clientData; - filePtr->mask = mask; + } + if (filePtr == NULL) { + filePtr = (FileHandler *) ckalloc(sizeof(FileHandler)); + filePtr->fd = fd; + filePtr->readyMask = 0; + filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; + tsdPtr->firstFileHandlerPtr = filePtr; + } + filePtr->proc = proc; + filePtr->clientData = clientData; + filePtr->mask = mask; - /* - * Update the check masks for this file. - */ + /* + * Update the check masks for this file. + */ - if (mask & TCL_READABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.readable)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); - } - if (mask & TCL_WRITABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.writable)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); - } - if (mask & TCL_EXCEPTION) { - FD_SET(fd, &(tsdPtr->checkMasks.exceptional)); - } else { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); - } - if (tsdPtr->numFdBits <= fd) { - tsdPtr->numFdBits = fd+1; - } + if (mask & TCL_READABLE) { + FD_SET(fd, &(tsdPtr->checkMasks.readable)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + } + if (mask & TCL_WRITABLE) { + FD_SET(fd, &(tsdPtr->checkMasks.writable)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + } + if (mask & TCL_EXCEPTION) { + FD_SET(fd, &(tsdPtr->checkMasks.exceptional)); + } else { + FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + } + if (tsdPtr->numFdBits <= fd) { + tsdPtr->numFdBits = fd+1; } } @@ -745,69 +747,71 @@ Tcl_DeleteFileHandler( int fd) /* Stream id for which to remove callback * function. */ { + FileHandler *filePtr, *prevPtr; + int i; + ThreadSpecificData *tsdPtr; + if (tclNotifierHooks.deleteFileHandlerProc) { tclNotifierHooks.deleteFileHandlerProc(fd); return; - } else { - FileHandler *filePtr, *prevPtr; - int i; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - - /* - * Find the entry for the given file (and return if there isn't one). - */ + } - for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; - prevPtr = filePtr, filePtr = filePtr->nextPtr) { - if (filePtr == NULL) { - return; - } - if (filePtr->fd == fd) { - break; - } - } + tsdPtr = TCL_TSD_INIT(&dataKey); - /* - * Update the check masks for this file. - */ + /* + * Find the entry for the given file (and return if there isn't one). + */ - if (filePtr->mask & TCL_READABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); - } - if (filePtr->mask & TCL_WRITABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; + prevPtr = filePtr, filePtr = filePtr->nextPtr) { + if (filePtr == NULL) { + return; } - if (filePtr->mask & TCL_EXCEPTION) { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + if (filePtr->fd == fd) { + break; } + } - /* - * Find current max fd. - */ + /* + * Update the check masks for this file. + */ - if (fd+1 == tsdPtr->numFdBits) { - tsdPtr->numFdBits = 0; - for (i = fd-1; i >= 0; i--) { - if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { - tsdPtr->numFdBits = i+1; - break; - } + if (filePtr->mask & TCL_READABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + } + if (filePtr->mask & TCL_WRITABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + } + if (filePtr->mask & TCL_EXCEPTION) { + FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + } + + /* + * Find current max fd. + */ + + if (fd+1 == tsdPtr->numFdBits) { + tsdPtr->numFdBits = 0; + for (i = fd-1; i >= 0; i--) { + if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { + tsdPtr->numFdBits = i+1; + break; } } + } - /* - * Clean up information in the callback record. - */ + /* + * Clean up information in the callback record. + */ - if (prevPtr == NULL) { - tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; - } else { - prevPtr->nextPtr = filePtr->nextPtr; - } - ckfree((char *) filePtr); + if (prevPtr == NULL) { + tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; + } else { + prevPtr->nextPtr = filePtr->nextPtr; } + ckfree((char *) filePtr); } /* @@ -905,203 +909,202 @@ int Tcl_WaitForEvent( const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { + FileHandler *filePtr; + FileHandlerEvent *fileEvPtr; + int mask, waitForFiles; + Tcl_Time myTime, *myTimePtr; + ThreadSpecificData *tsdPtr; + if (tclNotifierHooks.waitForEventProc) { return tclNotifierHooks.waitForEventProc(timePtr); - } else { - FileHandler *filePtr; - FileHandlerEvent *fileEvPtr; - int mask; - Tcl_Time myTime; - int waitForFiles; - Tcl_Time *myTimePtr; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + } + + tsdPtr = TCL_TSD_INIT(&dataKey); + /* + * Set up the timeout structure. Note that if there are no events to check + * for, we return with a negative result rather than blocking forever. + */ + + if (timePtr != NULL) { /* - * Set up the timeout structure. Note that if there are no events to - * check for, we return with a negative result rather than blocking - * forever. + * TIP #233 (Virtualized Time). Is virtual time in effect? And do we + * actually have something to scale? If yes to both then we call the + * handler to do this scaling. */ - if (timePtr != NULL) { - /* - * TIP #233 (Virtualized Time). Is virtual time in effect? And do - * we actually have something to scale? If yes to both then we call - * the handler to do this scaling. - */ + myTime.sec = timePtr->sec; + myTime.usec = timePtr->usec; - myTime.sec = timePtr->sec; - myTime.usec = timePtr->usec; + if (myTime.sec != 0 || myTime.usec != 0) { + tclScaleTimeProcPtr(&myTime, tclTimeClientData); + } - if (myTime.sec != 0 || myTime.usec != 0) { - tclScaleTimeProcPtr(&myTime, tclTimeClientData); - } + myTimePtr = &myTime; + } else { + myTimePtr = NULL; + } - myTimePtr = &myTime; - } else { - myTimePtr = NULL; + /* + * Start notifier thread if necessary. + */ + + LOCK_NOTIFIER_INIT; + if (!notifierCount) { + Tcl_Panic("Tcl_WaitForEvent: notifier not initialized"); + } + if (!notifierThread) { + int result; + pthread_attr_t attr; + + pthread_attr_init(&attr); + pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); + pthread_attr_setstacksize(&attr, 60 * 1024); + result = pthread_create(¬ifierThread, &attr, + (void * (*)(void *))NotifierThreadProc, NULL); + pthread_attr_destroy(&attr); + if (result || !notifierThread) { + Tcl_Panic("Tcl_WaitForEvent: unable to start notifier thread"); } + } + UNLOCK_NOTIFIER_INIT; + + /* + * Place this thread on the list of interested threads, signal the + * notifier thread, and wait for a response or a timeout. + */ + LOCK_NOTIFIER; + if (!tsdPtr->runLoop) { + Tcl_Panic("Tcl_WaitForEvent: CFRunLoop not initialized"); + } + waitForFiles = (tsdPtr->numFdBits > 0); + if (myTimePtr != NULL && myTimePtr->sec == 0 && myTimePtr->usec == 0) { /* - * Start notifier thread if necessary. + * Cannot emulate a polling select with a polling condition variable. + * Instead, pretend to wait for files and tell the notifier thread + * what we are doing. The notifier thread makes sure it goes through + * select with its select mask in the same state as ours currently is. + * We block until that happens. */ - LOCK_NOTIFIER_INIT; - if (!notifierCount) { - Tcl_Panic("Tcl_WaitForEvent: notifier not initialized"); - } - if (!notifierThread) { - int result; - pthread_attr_t attr; - - pthread_attr_init(&attr); - pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); - pthread_attr_setstacksize(&attr, 60 * 1024); - result = pthread_create(¬ifierThread, &attr, - (void * (*)(void *))NotifierThreadProc, NULL); - pthread_attr_destroy(&attr); - if (result || !notifierThread) { - Tcl_Panic("Tcl_WaitForEvent: unable to start notifier thread"); - } - } - UNLOCK_NOTIFIER_INIT; + waitForFiles = 1; + tsdPtr->pollState = POLL_WANT; + myTimePtr = NULL; + } else { + tsdPtr->pollState = 0; + } + if (waitForFiles) { /* - * Place this thread on the list of interested threads, signal the - * notifier thread, and wait for a response or a timeout. + * Add the ThreadSpecificData structure of this thread to the list of + * ThreadSpecificData structures of all threads that are waiting on + * file events. */ - LOCK_NOTIFIER; - if (!tsdPtr->runLoop) { - Tcl_Panic("Tcl_WaitForEvent: CFRunLoop not initialized"); - } - waitForFiles = (tsdPtr->numFdBits > 0); - if (myTimePtr != NULL && myTimePtr->sec == 0 && myTimePtr->usec == 0) { - /* - * Cannot emulate a polling select with a polling condition - * variable. Instead, pretend to wait for files and tell the - * notifier thread what we are doing. The notifier thread makes - * sure it goes through select with its select mask in the same - * state as ours currently is. We block until that happens. - */ - - waitForFiles = 1; - tsdPtr->pollState = POLL_WANT; - myTimePtr = NULL; - } else { - tsdPtr->pollState = 0; + tsdPtr->nextPtr = waitingListPtr; + if (waitingListPtr) { + waitingListPtr->prevPtr = tsdPtr; } + tsdPtr->prevPtr = 0; + waitingListPtr = tsdPtr; + tsdPtr->onList = 1; - if (waitForFiles) { - /* - * Add the ThreadSpecificData structure of this thread to the list - * of ThreadSpecificData structures of all threads that are waiting - * on file events. - */ - - tsdPtr->nextPtr = waitingListPtr; - if (waitingListPtr) { - waitingListPtr->prevPtr = tsdPtr; - } - tsdPtr->prevPtr = 0; - waitingListPtr = tsdPtr; - tsdPtr->onList = 1; - - write(triggerPipe, "", 1); - } + write(triggerPipe, "", 1); + } - FD_ZERO(&(tsdPtr->readyMasks.readable)); - FD_ZERO(&(tsdPtr->readyMasks.writable)); - FD_ZERO(&(tsdPtr->readyMasks.exceptional)); + FD_ZERO(&(tsdPtr->readyMasks.readable)); + FD_ZERO(&(tsdPtr->readyMasks.writable)); + FD_ZERO(&(tsdPtr->readyMasks.exceptional)); - if (!tsdPtr->eventReady) { - CFTimeInterval waitTime; - CFStringRef runLoopMode; + if (!tsdPtr->eventReady) { + CFTimeInterval waitTime; + CFStringRef runLoopMode; - if (myTimePtr == NULL) { - waitTime = 1.0e10; /* Wait forever, as per CFRunLoop.c */ - } else { - waitTime = myTimePtr->sec + 1.0e-6 * myTimePtr->usec; - } - /* - * If the run loop is already running (e.g. if Tcl_WaitForEvent was - * called recursively), re-run it in a custom run loop mode - * containing only the source for the notifier thread, otherwise - * wakeups from other sources added to the common run loop modes - * might get lost. - */ - if ((runLoopMode = CFRunLoopCopyCurrentMode(tsdPtr->runLoop))) { - CFRelease(runLoopMode); - runLoopMode = tclEventsOnlyRunLoopMode; - } else { - runLoopMode = kCFRunLoopDefaultMode; - } - UNLOCK_NOTIFIER; - CFRunLoopRunInMode(runLoopMode, waitTime, TRUE); - LOCK_NOTIFIER; + if (myTimePtr == NULL) { + waitTime = 1.0e10; /* Wait forever, as per CFRunLoop.c */ + } else { + waitTime = myTimePtr->sec + 1.0e-6 * myTimePtr->usec; } - tsdPtr->eventReady = 0; - if (waitForFiles && tsdPtr->onList) { - /* - * Remove the ThreadSpecificData structure of this thread from the - * waiting list. Alert the notifier thread to recompute its select - * masks - skipping this caused a hang when trying to close a pipe - * which the notifier thread was still doing a select on. - */ + /* + * If the run loop is already running (e.g. if Tcl_WaitForEvent was + * called recursively), re-run it in a custom run loop mode containing + * only the source for the notifier thread, otherwise wakeups from + * other sources added to the common run loop modes might get lost. + */ - if (tsdPtr->prevPtr) { - tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; - } else { - waitingListPtr = tsdPtr->nextPtr; - } - if (tsdPtr->nextPtr) { - tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; - } - tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; - tsdPtr->onList = 0; - write(triggerPipe, "", 1); + if ((runLoopMode = CFRunLoopCopyCurrentMode(tsdPtr->runLoop))) { + CFRelease(runLoopMode); + runLoopMode = tclEventsOnlyRunLoopMode; + } else { + runLoopMode = kCFRunLoopDefaultMode; } + UNLOCK_NOTIFIER; + CFRunLoopRunInMode(runLoopMode, waitTime, TRUE); + LOCK_NOTIFIER; + } + tsdPtr->eventReady = 0; + if (waitForFiles && tsdPtr->onList) { /* - * Queue all detected file events before returning. + * Remove the ThreadSpecificData structure of this thread from the + * waiting list. Alert the notifier thread to recompute its select + * masks; skipping this caused a hang when trying to close a pipe + * which the notifier thread was still doing a select on. */ - for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); - filePtr = filePtr->nextPtr) { + if (tsdPtr->prevPtr) { + tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; + } else { + waitingListPtr = tsdPtr->nextPtr; + } + if (tsdPtr->nextPtr) { + tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; + } + tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; + tsdPtr->onList = 0; + write(triggerPipe, "", 1); + } - mask = 0; - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.readable))) { - mask |= TCL_READABLE; - } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.writable))) { - mask |= TCL_WRITABLE; - } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.exceptional))) { - mask |= TCL_EXCEPTION; - } + /* + * Queue all detected file events before returning. + */ - if (!mask) { - continue; - } + for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); + filePtr = filePtr->nextPtr) { + mask = 0; + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.readable))) { + mask |= TCL_READABLE; + } + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.writable))) { + mask |= TCL_WRITABLE; + } + if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.exceptional))) { + mask |= TCL_EXCEPTION; + } - /* - * Don't bother to queue an event if the mask was previously - * non-zero since an event must still be on the queue. - */ + if (!mask) { + continue; + } - if (filePtr->readyMask == 0) { - fileEvPtr = (FileHandlerEvent *) - ckalloc(sizeof(FileHandlerEvent)); - fileEvPtr->header.proc = FileHandlerEventProc; - fileEvPtr->fd = filePtr->fd; - Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); - } - filePtr->readyMask = mask; + /* + * Don't bother to queue an event if the mask was previously non-zero + * since an event must still be on the queue. + */ + + if (filePtr->readyMask == 0) { + fileEvPtr = (FileHandlerEvent *) + ckalloc(sizeof(FileHandlerEvent)); + fileEvPtr->header.proc = FileHandlerEventProc; + fileEvPtr->fd = filePtr->fd; + Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); } - UNLOCK_NOTIFIER; - return 0; + filePtr->readyMask = mask; } + UNLOCK_NOTIFIER; + return 0; } /* @@ -1233,9 +1236,9 @@ NotifierThreadProc( if (tsdPtr->onList) { /* * Remove the ThreadSpecificData structure of this thread - * from the waiting list. This prevents us from - * continuously spining on select until the other threads - * runs and services the file event. + * from the waiting list. This prevents us from spinning + * continuously on select until the other threads runs and + * services the file event. */ if (tsdPtr->prevPtr) { diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 3123ac0..e61f17d 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -6,7 +6,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixCompat.c,v 1.15 2008/02/28 20:14:12 jenglish Exp $ + * RCS: @(#) $Id: tclUnixCompat.c,v 1.16 2009/01/09 11:21:46 dkf Exp $ * */ @@ -70,10 +70,10 @@ TclUnixSetBlockingMode( * 'length' stay aligned. */ -#define PadBuffer(buffer, length, size) \ - if (((length) % (size))) { \ - (buffer) += ((size) - ((length) % (size))); \ - (length) += ((size) - ((length) % (size))); \ +#define PadBuffer(buffer, length, size) \ + if (((length) % (size))) { \ + (buffer) += ((size) - ((length) % (size))); \ + (length) += ((size) - ((length) % (size))); \ } /* diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 03c0cd6..2df4d2a 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUnixInit.c,v 1.85 2008/09/25 14:30:21 dkf Exp $ + * RCS: @(#) $Id: tclUnixInit.c,v 1.86 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -18,7 +18,7 @@ # ifdef __APPLE__ # if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1030 /* Support for weakly importing nl_langinfo on Darwin. */ -# define WEAK_IMPORT_NL_LANGINFO +# define WEAK_IMPORT_NL_LANGINFO extern char *nl_langinfo(nl_item) WEAK_IMPORT_ATTRIBUTE; # endif # endif diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 4050d12..0d92556 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.47 2008/12/18 07:50:54 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.48 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -87,7 +87,7 @@ static Tcl_ChannelType pipeChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc */ NULL, /* thread action proc */ - NULL, /* truncation */ + NULL, /* truncation */ }; /* diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index b5ff0c4..916a18c 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.30 2008/12/20 01:03:32 das Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.31 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -107,21 +107,21 @@ TclplatformtestInit( Tcl_CreateCommand(interp, "testchmod", TestchmodCmd, (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testfilehandler", TestfilehandlerCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testfilewait", TestfilewaitCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testfindexecutable", TestfindexecutableCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testgetopenfile", TestgetopenfileCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testgetdefenc", TestgetdefencdirCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testsetdefenc", TestsetdefencdirCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testalarm", TestalarmCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testgotsig", TestgotsigCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); return TCL_OK; } @@ -169,7 +169,7 @@ TestfilehandlerCmd( if (argc < 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], - " option ... \"", NULL); + " option ... \"", NULL); return TCL_ERROR; } pipePtr = NULL; @@ -196,7 +196,7 @@ TestfilehandlerCmd( } else if (strcmp(argv[1], "clear") == 0) { if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", - argv[0], " clear index\"", NULL); + argv[0], " clear index\"", NULL); return TCL_ERROR; } pipePtr->readCount = pipePtr->writeCount = 0; @@ -205,7 +205,7 @@ TestfilehandlerCmd( if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", - argv[0], " counts index\"", NULL); + argv[0], " counts index\"", NULL); return TCL_ERROR; } sprintf(buf, "%d %d", pipePtr->readCount, pipePtr->writeCount); @@ -213,7 +213,7 @@ TestfilehandlerCmd( } else if (strcmp(argv[1], "create") == 0) { if (argc != 5) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", - argv[0], " create index readMode writeMode\"", NULL); + argv[0], " create index readMode writeMode\"", NULL); return TCL_ERROR; } if (pipePtr->readFile == NULL) { @@ -261,30 +261,30 @@ TestfilehandlerCmd( } else if (strcmp(argv[1], "empty") == 0) { if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", - argv[0], " empty index\"", NULL); + argv[0], " empty index\"", NULL); return TCL_ERROR; } while (read(GetFd(pipePtr->readFile), buffer, 4000) > 0) { - /* Empty loop body. */ + /* Empty loop body. */ } } else if (strcmp(argv[1], "fill") == 0) { if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", - argv[0], " fill index\"", NULL); + argv[0], " fill index\"", NULL); return TCL_ERROR; } memset(buffer, 'a', 4000); while (write(GetFd(pipePtr->writeFile), buffer, 4000) > 0) { - /* Empty loop body. */ + /* Empty loop body. */ } } else if (strcmp(argv[1], "fillpartial") == 0) { char buf[TCL_INTEGER_SPACE]; if (argc != 3) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", - argv[0], " fillpartial index\"", NULL); + argv[0], " fillpartial index\"", NULL); return TCL_ERROR; } @@ -296,7 +296,7 @@ TestfilehandlerCmd( } else if (strcmp(argv[1], "wait") == 0) { if (argc != 5) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", - argv[0], " wait index readable|writable timeout\"", NULL); + argv[0], " wait index readable|writable timeout\"", NULL); return TCL_ERROR; } if (pipePtr->readFile == NULL) { @@ -487,16 +487,16 @@ TestgetopenfileCmd( if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], - " channelName forWriting\"", NULL); + " channelName forWriting\"", NULL); return TCL_ERROR; } if (Tcl_GetOpenFile(interp, argv[1], atoi(argv[2]), 1, &filePtr) - == TCL_ERROR) { + == TCL_ERROR) { return TCL_ERROR; } if (filePtr == (ClientData) NULL) { Tcl_AppendResult(interp, - "Tcl_GetOpenFile succeeded but FILE * NULL!", NULL); + "Tcl_GetOpenFile succeeded but FILE * NULL!", NULL); return TCL_ERROR; } return TCL_OK; @@ -528,7 +528,7 @@ TestsetdefencdirCmd( { if (argc != 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], - " defaultDir\"", NULL); + " defaultDir\"", NULL); return TCL_ERROR; } diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index 1150fee..eb800fb 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtTest.c,v 1.7 2008/04/27 22:21:35 dkf Exp $ + * RCS: @(#) $Id: tclXtTest.c,v 1.8 2009/01/09 11:21:46 dkf Exp $ */ #include @@ -47,7 +47,7 @@ Tclxttest_Init( XtToolkitInitialize(); InitNotifier(); Tcl_CreateCommand(interp, "testeventloop", TesteventloopCmd, - (ClientData) 0, NULL); + (ClientData) 0, NULL); return TCL_OK; } @@ -82,7 +82,7 @@ TesteventloopCmd( if (argc < 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], - " option ... \"", NULL); + " option ... \"", NULL); return TCL_ERROR; } if (strcmp(argv[1], "done") == 0) { diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 05263d1..b5e5729 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.26 2008/04/27 22:21:35 dkf Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.27 2009/01/09 11:21:46 dkf Exp $ */ #include "tcl.h" @@ -81,7 +81,7 @@ main( */ #if defined(__GNUC__) - setargv( &argc, &argv ); + setargv(&argc, &argv); #endif setlocale(LC_ALL, "C"); diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 62a538b..e4850b0 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.49 2008/10/13 22:51:31 patthoyts Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.50 2009/01/09 11:21:46 dkf Exp $ */ #include "tclWinInt.h" @@ -496,6 +496,7 @@ Tcl_MutexLock( Tcl_Mutex *mutexPtr) /* The lock */ { CRITICAL_SECTION *csPtr; + if (*mutexPtr == NULL) { MASTER_LOCK; @@ -536,6 +537,7 @@ Tcl_MutexUnlock( Tcl_Mutex *mutexPtr) /* The lock */ { CRITICAL_SECTION *csPtr = *((CRITICAL_SECTION **)mutexPtr); + LeaveCriticalSection(csPtr); } @@ -561,6 +563,7 @@ TclpFinalizeMutex( Tcl_Mutex *mutexPtr) { CRITICAL_SECTION *csPtr = *(CRITICAL_SECTION **)mutexPtr; + if (csPtr != NULL) { DeleteCriticalSection(csPtr); ckfree((char *) csPtr); @@ -633,8 +636,7 @@ Tcl_ConditionWait( * and initializing that may drop back into the Master Lock. */ - Tcl_CreateThreadExitHandler(FinalizeConditionEvent, - (ClientData) tsdPtr); + Tcl_CreateThreadExitHandler(FinalizeConditionEvent, tsdPtr); } } @@ -646,11 +648,11 @@ Tcl_ConditionWait( */ if (*condPtr == NULL) { - winCondPtr = (WinCondition *)ckalloc(sizeof(WinCondition)); + winCondPtr = (WinCondition *) ckalloc(sizeof(WinCondition)); InitializeCriticalSection(&winCondPtr->condLock); winCondPtr->firstPtr = NULL; winCondPtr->lastPtr = NULL; - *condPtr = (Tcl_Condition)winCondPtr; + *condPtr = (Tcl_Condition) winCondPtr; TclRememberCondition(condPtr); } MASTER_UNLOCK; @@ -695,7 +697,8 @@ Tcl_ConditionWait( while (!timeout && (tsdPtr->flags & WIN_THREAD_BLOCKED)) { ResetEvent(tsdPtr->condEvent); LeaveCriticalSection(&winCondPtr->condLock); - if (WaitForSingleObjectEx(tsdPtr->condEvent, wtime, TRUE) == WAIT_TIMEOUT) { + if (WaitForSingleObjectEx(tsdPtr->condEvent, wtime, + TRUE) == WAIT_TIMEOUT) { timeout = 1; } EnterCriticalSection(&winCondPtr->condLock); @@ -760,6 +763,7 @@ Tcl_ConditionNotify( { WinCondition *winCondPtr; ThreadSpecificData *tsdPtr; + if (*condPtr != NULL) { winCondPtr = *((WinCondition **)condPtr); @@ -816,6 +820,7 @@ FinalizeConditionEvent( ClientData data) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) data; + tsdPtr->flags = WIN_THREAD_UNINIT; CloseHandle(tsdPtr->condEvent); } @@ -964,7 +969,9 @@ TclpFreeAllocCache( #endif /* USE_THREAD_ALLOC */ -void *TclpThreadCreateKey (void) { +void * +TclpThreadCreateKey(void) +{ DWORD *key; key = TclpSysAlloc(sizeof *key, 0); @@ -981,7 +988,10 @@ void *TclpThreadCreateKey (void) { return key; } -void TclpThreadDeleteKey(void *keyPtr) { +void +TclpThreadDeleteKey( + void *keyPtr) +{ DWORD *key = keyPtr; if (!TlsFree(*key)) { @@ -991,7 +1001,11 @@ void TclpThreadDeleteKey(void *keyPtr) { TclpSysFree(keyPtr); } -void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) { +void +TclpThreadSetMasterTSD( + void *tsdKeyPtr, + void *ptr) +{ DWORD *key = tsdKeyPtr; if (!TlsSetValue(*key, ptr)) { @@ -999,7 +1013,10 @@ void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) { } } -void *TclpThreadGetMasterTSD(void *tsdKeyPtr) { +void * +TclpThreadGetMasterTSD( + void *tsdKeyPtr) +{ DWORD *key = tsdKeyPtr; return TlsGetValue(*key); -- cgit v0.12 From 86d5b60ce155355dda1770c4fef4fdefea64ebf4 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 9 Jan 2009 15:00:26 +0000 Subject: Fix [Bug 1558654] --- ChangeLog | 5 +++++ generic/tclNamesp.c | 10 +++++++++- tests/namespace.test | 18 ++++-------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index df08fe7..94d1326 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-09 Donal K. Fellows + + * generic/tclNamesp.c (NamespaceEnsembleCmd): Error out when someone + gives wrong # of args to [namespace ensemble create]. [Bug 1558654] + 2009-01-08 Don Porter * generic/tclStringObj.c (STRING_UALLOC): Added missing parens diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 5908bb1..79b7d48 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.184 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.185 2009/01/09 15:00:27 dkf Exp $ */ #include "tclInt.h" @@ -4861,6 +4861,14 @@ NamespaceEnsembleCmd( Tcl_Obj *unknownObj = NULL; Tcl_Obj *paramObj = NULL; + /* + * Check that we've got option-value pairs... [Bug 1558654] + */ + + if ((objc & 1) == 0) { + Tcl_WrongNumArgs(interp, 3, objv, "?option value ...?"); + return TCL_ERROR; + } objv += 3; objc -= 3; diff --git a/tests/namespace.test b/tests/namespace.test index dc4063c..5feaf91 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.75 2008/12/17 15:39:55 dkf Exp $ +# RCS: @(#) $Id: namespace.test,v 1.76 2009/01/09 15:00:27 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1703,6 +1703,9 @@ test namespace-44.5 {ensemble: errors} -setup { } -cleanup { rename foobar {} } -returnCodes error -result {invalid command name "::foobarconfigure"} +test namespace-44.6 {ensemble: errors} -returnCodes error -body { + namespace ensemble create gorp +} -result {wrong # args: should be "namespace ensemble create ?option value ...?"} test namespace-45.1 {ensemble: introspection} { namespace eval ns { @@ -1729,15 +1732,12 @@ test namespace-46.1 {ensemble: modification} { namespace eval ns { namespace export x proc x {} {format 123} - # Ensemble maps A->x namespace ensemble create -command ns -map {A ::ns::x} set ::result [list [namespace ensemble configure ns -map] [ns A]] - # Ensemble maps B->x namespace ensemble configure ns -map {B ::ns::x} lappend ::result [namespace ensemble configure ns -map] [ns B] - # Ensemble maps x->x namespace ensemble configure ns -map {} lappend ::result [namespace ensemble configure ns -map] [ns x] @@ -2649,7 +2649,6 @@ test namespace-52.12 {unknown: error case must not reset handler} -body { } -result ok # TIP 314 - ensembles with parameters - test namespace-53.1 {ensembles: parameters} { namespace eval ns { namespace export x @@ -2658,7 +2657,6 @@ test namespace-53.1 {ensembles: parameters} { } list [info command ns] [ns bar x] [namespace delete ns] [info command ns] } {ns {1 bar} {} {}} - test namespace-53.2 {ensembles: parameters} -setup { namespace eval ns { namespace export x @@ -2670,7 +2668,6 @@ test namespace-53.2 {ensembles: parameters} -setup { rename ns foo list [info command foo] [foo bar x] [namespace delete ns] [info command foo] } -result {foo {1 bar} {} {}} - test namespace-53.3 {ensembles: parameters} -setup { namespace eval ns { namespace export x* @@ -2691,7 +2688,6 @@ test namespace-53.3 {ensembles: parameters} -setup { 1 {wrong # args: should be "ns param1 subcommand ?arg ...?"}\ 1 {unknown or ambiguous subcommand "x": must be x1, or x2}\ ::ns::x1 {}} - test namespace-53.4 {ensembles: parameters} -setup { namespace eval ns { namespace export x* @@ -2710,7 +2706,6 @@ test namespace-53.4 {ensembles: parameters} -setup { } -cleanup { namespace delete ns } -result {{1 x2 x3} {2 x1 x3} {3 x1 x2}} - test namespace-53.5 {ensembles: parameters} -setup { namespace eval ns { namespace export x* @@ -2732,7 +2727,6 @@ test namespace-53.5 {ensembles: parameters} -setup { 0 {1 x}\ 1 {unknown or ambiguous subcommand "x": must be x1, x2, or x3}\ 0 {1 x}} - test namespace-53.6 {ensembles: nested} -setup { namespace eval ns { namespace export x* @@ -2751,7 +2745,6 @@ test namespace-53.6 {ensembles: nested} -setup { } -cleanup { namespace delete ns } -result {{0 {}} {1 z} {2 z} {3 z}} - test namespace-53.7 {ensembles: parameters & wrong # args} -setup { namespace eval ns { namespace export x* @@ -2775,7 +2768,6 @@ test namespace-53.7 {ensembles: parameters & wrong # args} -setup { 1 {wrong # args: should be "ns x1 x1 a2 a3 a4"}\ 1 {wrong # args: should be "ns x1 x1 a2 a3 a4"}\ 0 {x1 x1 x1 x1 x1}} - test namespace-53.8 {ensemble: unknown handler changing -parameters} -setup { namespace eval ns { namespace export x* @@ -2800,7 +2792,6 @@ test namespace-53.8 {ensemble: unknown handler changing -parameters} -setup { {0 {1 x2} {}\ 0 {1 x2} p1\ 1 {unknown or ambiguous subcommand "x2": must be x1} {}} - test namespace-53.9 {ensemble: unknown handler changing -parameters,\ thereby eating all args} -setup { namespace eval ns { @@ -2824,7 +2815,6 @@ test namespace-53.9 {ensemble: unknown handler changing -parameters,\ {0 {1 x2} {}\ 1 {wrong # args: should be "ns p1 p2 p3 p4 p5 subcommand ?arg ...?"} {p1 p2 p3 p4 p5}\ 0 {1 {a1 a2 a3 a4 a5}} {p1 p2 p3 p4 p5}} - test namespace-53.10 {ensembles: nested rewrite} -setup { namespace eval ns { namespace export x -- cgit v0.12 From 8b9a703b9cb4b40327681b31f0b3c1c2ed01cea5 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 9 Jan 2009 15:34:32 +0000 Subject: * generic/tclStringObj.c (STRING_SIZE): Corrected failure to limit memory allocation requests to the sizes that can be supported by Tcl's memory allocation routines. [Bug 2494093]. --- ChangeLog | 6 ++++++ generic/tclStringObj.c | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94d1326..4a6cd70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-09 Don Porter + + * generic/tclStringObj.c (STRING_SIZE): Corrected failure to limit + memory allocation requests to the sizes that can be supported by + Tcl's memory allocation routines. [Bug 2494093]. + 2009-01-09 Donal K. Fellows * generic/tclNamesp.c (NamespaceEnsembleCmd): Error out when someone diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index c834de5..5785d72 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.77 2009/01/08 17:58:59 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.78 2009/01/09 15:34:33 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -108,9 +108,12 @@ typedef struct String { #define STRING_UALLOC(numChars) \ ((numChars) * sizeof(Tcl_UniChar)) #define STRING_SIZE(ualloc) \ - ((unsigned) ((ualloc) \ - ? sizeof(String) - sizeof(Tcl_UniChar) + (ualloc) \ - : sizeof(String))) + ((unsigned) ((ualloc) \ + ? ((sizeof(String) - sizeof(Tcl_UniChar) + (ualloc) > INT_MAX) \ + ? Tcl_Panic("unable to alloc %u bytes", \ + sizeof(String) - sizeof(Tcl_UniChar) + (ualloc)), INT_MAX \ + : (sizeof(String) - sizeof(Tcl_UniChar) + (ualloc))) \ + : sizeof(String))) #define GET_STRING(objPtr) \ ((String *) (objPtr)->internalRep.otherValuePtr) #define SET_STRING(objPtr, stringPtr) \ -- cgit v0.12 From 91fcbdbc1ce2836f8df968af33ce13bff991a90b Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 12 Jan 2009 16:50:03 +0000 Subject: * generic/tclBasic.c (Tcl_DeleteCommandFromToken): One consequence of the NRE rewrite is that there are now situations where a NULL objProc field in a Command struct is perfectly normal. Removed an outdated comment in Tcl_DeleteCommandFromToken that claimed we use (cmdPtr->objPtr == NULL) as a test of command validity. In fact we use (cmdPtr->flags & CMD_IS_DELETED) to perform that test. Also removed the setting to NULL, since any extension following the advice of the old comment is going to be broken by NRE anyway, and needs to shift to flag-based testing (or stop intruding into such internal matters). Part of [Bug 2486550]. --- ChangeLog | 13 +++++++++++++ generic/tclBasic.c | 12 +----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a6cd70..c7fc057 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-01-12 Don Porter + + * generic/tclBasic.c (Tcl_DeleteCommandFromToken): One consequence + of the NRE rewrite is that there are now situations where a NULL + objProc field in a Command struct is perfectly normal. Removed an + outdated comment in Tcl_DeleteCommandFromToken that claimed we + use (cmdPtr->objPtr == NULL) as a test of command validity. In fact + we use (cmdPtr->flags & CMD_IS_DELETED) to perform that test. + Also removed the setting to NULL, since any extension following the + advice of the old comment is going to be broken by NRE anyway, and + needs to shift to flag-based testing (or stop intruding into + such internal matters). Part of [Bug 2486550]. + 2009-01-09 Don Porter * generic/tclStringObj.c (STRING_SIZE): Corrected failure to limit diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ab1806e..d39f73f 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.380 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.381 2009/01/12 16:50:03 dgp Exp $ */ #include "tclInt.h" @@ -3000,16 +3000,6 @@ Tcl_DeleteCommandFromToken( } /* - * Mark the Command structure as no longer valid. This allows - * TclExecuteByteCode to recognize when a Command has logically been - * deleted and a pointer to this Command structure cached in a CmdName - * object is invalid. TclExecuteByteCode will look up the command again in - * the interpreter's command hashtable. - */ - - cmdPtr->objProc = NULL; - - /* * Now free the Command structure, unless there is another reference to it * from a CmdName Tcl object in some ByteCode code sequence. In that case, * delay the cleanup until all references are either discarded (when a -- cgit v0.12 From 2982ceeb51c99eb042c8477125d3d1da80b84387 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 13 Jan 2009 20:30:03 +0000 Subject: Move [throw] implementation into C. --- ChangeLog | 31 +++++++++------- generic/tclBasic.c | 3 +- generic/tclCmdMZ.c | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclInt.h | 4 ++- library/init.tcl | 23 +++--------- tests/error.test | 17 ++++++++- 6 files changed, 144 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7fc057..8f7ab29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,21 +1,26 @@ +2009-01-13 Donal K. Fellows + + * generic/tclCmdMZ.c (Tcl_ThrowObjCmd): Move implementation of [throw] + * library/init.tcl (throw): to C from Tcl. + 2009-01-12 Don Porter - * generic/tclBasic.c (Tcl_DeleteCommandFromToken): One consequence - of the NRE rewrite is that there are now situations where a NULL - objProc field in a Command struct is perfectly normal. Removed an - outdated comment in Tcl_DeleteCommandFromToken that claimed we - use (cmdPtr->objPtr == NULL) as a test of command validity. In fact - we use (cmdPtr->flags & CMD_IS_DELETED) to perform that test. - Also removed the setting to NULL, since any extension following the - advice of the old comment is going to be broken by NRE anyway, and - needs to shift to flag-based testing (or stop intruding into - such internal matters). Part of [Bug 2486550]. + * generic/tclBasic.c (Tcl_DeleteCommandFromToken): One consequence of + the NRE rewrite is that there are now situations where a NULL objProc + field in a Command struct is perfectly normal. Removed an outdated + comment in Tcl_DeleteCommandFromToken that claimed we use + cmdPtr->objPtr==NULL as a test of command validity. In fact we use + cmdPtr->flags&CMD_IS_DELETED to perform that test. Also removed the + setting to NULL, since any extension following the advice of the old + comment is going to be broken by NRE anyway, and needs to shift to + flag-based testing (or stop intruding into such internal matters). + Part of [Bug 2486550]. 2009-01-09 Don Porter * generic/tclStringObj.c (STRING_SIZE): Corrected failure to limit - memory allocation requests to the sizes that can be supported by - Tcl's memory allocation routines. [Bug 2494093]. + memory allocation requests to the sizes that can be supported by Tcl's + memory allocation routines. [Bug 2494093] 2009-01-09 Donal K. Fellows @@ -26,7 +31,7 @@ * generic/tclStringObj.c (STRING_UALLOC): Added missing parens required to get correct results out of things like - STRING_UALLOC(num + append). [Bug 2494093]. + STRING_UALLOC(num + append). [Bug 2494093] 2009-01-08 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d39f73f..3eab76a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.381 2009/01/12 16:50:03 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.382 2009/01/13 20:30:03 dkf Exp $ */ #include "tclInt.h" @@ -208,6 +208,7 @@ static const CmdInfo builtInCmds[] = { {"split", Tcl_SplitObjCmd, NULL, NULL, 1}, {"subst", Tcl_SubstObjCmd, NULL, NULL, 1}, {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, NULL, 1}, + {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, {"unset", Tcl_UnsetObjCmd, NULL, NULL, 1}, {"uplevel", Tcl_UplevelObjCmd, NULL, TclNRUplevelObjCmd, 1}, diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index f5f6547..7cb14b5 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.175 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.176 2009/01/13 20:30:03 dkf Exp $ */ #include "tclInt.h" @@ -3911,6 +3911,66 @@ Tcl_SwitchObjCmd( /* *---------------------------------------------------------------------- * + * Tcl_ThrowObjCmd -- + * + * This procedure is invoked to process the "throw" Tcl command. See the + * user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +int +Tcl_ThrowObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Obj *options; + int len; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "type message"); + return TCL_ERROR; + } + + /* + * The type must be a list of at least length 1. + */ + + if (Tcl_ListObjLength(interp, objv[1], &len) != TCL_OK) { + return TCL_ERROR; + } else if (len < 1) { + Tcl_AppendResult(interp, "type must be non-empty list", NULL); + return TCL_ERROR; + } + + /* + * Now prepare the result options dictionary. We use the list API as it is + * slightly more convenient. + */ + + TclNewLiteralStringObj(options, "-code error -level 0 -errorcode"); + Tcl_ListObjAppendElement(NULL, options, objv[1]); + + /* + * We're ready to go. Fire things into the low-level result machinery. + */ + + Tcl_SetObjResult(interp, objv[2]); + return Tcl_SetReturnOptions(interp, options); +} + +/* + *---------------------------------------------------------------------- + * * Tcl_TimeObjCmd -- * * This object-based procedure is invoked to process the "time" Tcl @@ -4000,6 +4060,45 @@ Tcl_TimeObjCmd( return TCL_OK; } +#if 0 /* not yet implemented */ +/* + *---------------------------------------------------------------------- + * + * Tcl_TryObjCmd -- + * + * This procedure is invoked to process the "try" Tcl command. See the + * user documentation for details on what it does. + * + * Results: + * A standard Tcl object result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_TryObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + return Tcl_NRCallObjProc(interp, TclNRTryObjCmd, dummy, objc, objv); +} + +int +TclNRTryObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + +} +#endif /* not yet implemented */ + /* *---------------------------------------------------------------------- * diff --git a/generic/tclInt.h b/generic/tclInt.h index 67ba634..ee4fec7 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.412 2009/01/06 09:49:39 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.413 2009/01/13 20:30:03 dkf Exp $ */ #ifndef _TCLINT @@ -3113,6 +3113,8 @@ MODULE_SCOPE int Tcl_SwitchObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_TellObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int Tcl_ThrowObjCmd(ClientData dummy, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int Tcl_TimeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/library/init.tcl b/library/init.tcl index 2d8e303..74fd5f4 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.118 2008/12/19 03:54:44 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.119 2009/01/13 20:30:04 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -113,8 +113,8 @@ namespace eval tcl { } } -# TIP #329: [try] and [throw] -# These are *temporary* implementations, to be replaced with ones in C and +# TIP #329: [try] +# This is a *temporary* implementation, to be replaced with one in C and # bytecode at a later date before 8.6.0 namespace eval ::tcl::control { # These are not local, since this allows us to [uplevel] a [catch] rather @@ -125,20 +125,7 @@ namespace eval ::tcl::control { variable magicCodes { ok 0 error 1 return 2 break 3 continue 4 } - namespace export throw try - - # ::tcl::control::throw -- - # - # Creates an error with machine-readable "code" parts and - # human-readable "message" parts. - # - # Arguments: - # throw - list describing errorcode - # message - Human-readable version of error - proc throw {type message} { - return -code error -errorcode $type -errorinfo $message -level 1 \ - $message - } + namespace export try # ::tcl::control::try -- # @@ -306,7 +293,7 @@ namespace eval ::tcl::control { return -options $_opts $_em } } -namespace import ::tcl::control::* +namespace import ::tcl::control::try # Windows specific end of initialization diff --git a/tests/error.test b/tests/error.test index dfb466f..6125dd4 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.17 2008/12/16 22:07:58 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.18 2009/01/13 20:30:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -263,6 +263,21 @@ test error-8.4 {throw behaves as error does at level > 0} { } } } {} +test error-8.5 {throw syntax checks} -returnCodes error -body { + throw +} -result {wrong # args: should be "throw type message"} +test error-8.6 {throw syntax checks} -returnCodes error -body { + throw a +} -result {wrong # args: should be "throw type message"} +test error-8.7 {throw syntax checks} -returnCodes error -body { + throw a b c +} -result {wrong # args: should be "throw type message"} +test error-8.8 {throw syntax checks} -returnCodes error -body { + throw "not a \{ list" foo +} -result {unmatched open brace in list} +test error-8.9 {throw syntax checks} -returnCodes error -body { + throw {} foo +} -result {type must be non-empty list} # simple try tests: body completes with code ok -- cgit v0.12 From f44e5b6875ed72cdc2d55a087009478c0daa0738 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 13 Jan 2009 22:35:59 +0000 Subject: fix [tcl-Bug 2502365] Building of head on HPUX is broken when using the native CC --- ChangeLog | 6 ++++++ unix/configure | 2 +- unix/tcl.m4 | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f7ab29..8b4890c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-13 Jan Nijtmans + + * unix/tcl.m4: fix [tcl-Bug 2502365] Building of head on + HPUX is broken when using the native CC + * unix/configure (autoconf-2.59) + 2009-01-13 Donal K. Fellows * generic/tclCmdMZ.c (Tcl_ThrowObjCmd): Move implementation of [throw] diff --git a/unix/configure b/unix/configure index bc8d07e..a06232d 100755 --- a/unix/configure +++ b/unix/configure @@ -7125,7 +7125,7 @@ else # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" SHLIB_CFLAGS="+z" - SHLIB_LD="${CC} -Wl,-b" + SHLIB_LD="${CC} -b" fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 730faaa..23a2b1f 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1280,7 +1280,7 @@ dnl AC_CHECK_TOOL(AR, ar) # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" SHLIB_CFLAGS="+z" - SHLIB_LD="${CC} -Wl,-b" + SHLIB_LD="${CC} -b" ]) # Check to enable 64-bit flags for compiler/linker -- cgit v0.12 From 00c2160b1e7f0bbd3d80f5c3551f2d5a1b7da3d2 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 14 Jan 2009 06:10:03 +0000 Subject: * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Reverted most of the substance of my 2009-01-12 commit. NULLing the objProc field of a Command when deleting it is important so that tests for certain classes of commands don't return false positives when applied to deleted command tokens. Overall change is now just replacement of a false comment with a true one. --- ChangeLog | 9 +++++++++ generic/tclBasic.c | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b4890c..8e612a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-01-14 Don Porter + + * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Reverted + most of the substance of my 2009-01-12 commit. NULLing the objProc + field of a Command when deleting it is important so that tests for + certain classes of commands don't return false positives when applied + to deleted command tokens. Overall change is now just replacement + of a false comment with a true one. + 2009-01-13 Jan Nijtmans * unix/tcl.m4: fix [tcl-Bug 2502365] Building of head on diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3eab76a..e9aa6e1 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.382 2009/01/13 20:30:03 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.383 2009/01/14 06:10:04 dgp Exp $ */ #include "tclInt.h" @@ -3001,6 +3001,15 @@ Tcl_DeleteCommandFromToken( } /* + * A number of tests for particular kinds of commands are done by + * checking whether the objProc field holds a known value. Set the + * field to NULL so that such tests won't have false positives when + * applied to deleted commands. + */ + + cmdPtr->objProc = NULL; + + /* * Now free the Command structure, unless there is another reference to it * from a CmdName Tcl object in some ByteCode code sequence. In that case, * delay the cleanup until all references are either discarded (when a -- cgit v0.12 From 78e0aeb4c44e3de13b384f1415c4cbecca58fcda Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 14 Jan 2009 14:14:03 +0000 Subject: typo --- doc/CrtTrace.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3 index 0c02776..b56a878 100644 --- a/doc/CrtTrace.3 +++ b/doc/CrtTrace.3 @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtTrace.3,v 1.16 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: CrtTrace.3,v 1.17 2009/01/14 14:14:03 dgp Exp $ '\" .so man.macros .TH Tcl_CreateTrace 3 "" Tcl "Tcl Library Procedures" @@ -89,7 +89,7 @@ points to a string containing the text of the command, before any argument substitution. The \fIcommandToken\fR parameter is a Tcl command token that identifies the command to be invoked. The token may be passed to \fBTcl_GetCommandName\fR, -\fBTcl_GetCommandTokenInfo\fR, or \fBTcl_SetCommandTokenInfo\fR to +\fBTcl_GetCommandInfoFromToken\fR, or \fBTcl_SetCommandInfoFromToken\fR to manipulate the definition of the command. The \fIobjc\fR and \fIobjv\fR parameters designate the final parameter count and parameter vector that will be passed to the command, and have had all substitutions -- cgit v0.12 From 0888377521223161e6ecfd721eee0bf116bf9c60 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 16 Jan 2009 09:20:18 +0000 Subject: [Bug 2512659] patch for typo applied --- generic/tcl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index dc8d3f7..d90115e 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -1,3 +1,4 @@ + /* * tcl.h -- * @@ -13,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.286 2009/01/06 09:49:38 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.287 2009/01/16 09:20:18 patthoyts Exp $ */ #ifndef _TCL @@ -327,7 +328,7 @@ typedef long LONG; #endif /* - * Darwin specifc configure overrides (to support fat compiles, where + * Darwin specific configure overrides (to support fat compiles, where * configure runs only once for multiple architectures): */ -- cgit v0.12 From 90f1f664938680291c585123226ff1258345487c Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 16 Jan 2009 20:44:24 +0000 Subject: * generic/tcl.h: Bump patchlevel to 8.6b1.1 to distinguish * library/init.tcl: CVS snapshots from the 8.6b1 and 8.6b2 releases * unix/configure.in: and to deal with the fact that the HEAD of * win/configure.in: init.tcl will not [source] in Tcl 8.6b1 . * unix/configure: autoconf-2.59 --- ChangeLog | 10 ++++++++++ generic/tcl.h | 4 ++-- library/init.tcl | 4 ++-- unix/configure | 2 +- unix/configure.in | 4 ++-- win/configure | 2 +- win/configure.in | 4 ++-- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e612a5..5b2cceb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-01-16 Don Porter + + * generic/tcl.h: Bump patchlevel to 8.6b1.1 to distinguish + * library/init.tcl: CVS snapshots from the 8.6b1 and 8.6b2 releases + * unix/configure.in: and to deal with the fact that the HEAD of + * win/configure.in: init.tcl will not [source] in Tcl 8.6b1 . + + * unix/configure: autoconf-2.59 + * win/configure: + 2009-01-14 Don Porter * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Reverted diff --git a/generic/tcl.h b/generic/tcl.h index d90115e..72c4acd 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.287 2009/01/16 09:20:18 patthoyts Exp $ + * RCS: @(#) $Id: tcl.h,v 1.288 2009/01/16 20:44:24 dgp Exp $ */ #ifndef _TCL @@ -64,7 +64,7 @@ extern "C" { #define TCL_RELEASE_SERIAL 1 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6b1" +#define TCL_PATCH_LEVEL "8.6b1.1" /* * The following definitions set up the proper options for Windows compilers. diff --git a/library/init.tcl b/library/init.tcl index 74fd5f4..3ec3079 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.119 2009/01/13 20:30:04 dkf Exp $ +# RCS: @(#) $Id: init.tcl,v 1.120 2009/01/16 20:44:25 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6b1 +package require -exact Tcl 8.6b1.1 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/unix/configure b/unix/configure index a06232d..f5eb7fc 100755 --- a/unix/configure +++ b/unix/configure @@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1" +TCL_PATCH_LEVEL="b1.1" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/configure.in b/unix/configure.in index f97ded3..d569862 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.204 2009/01/03 13:55:09 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.205 2009/01/16 20:44:25 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -27,7 +27,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1" +TCL_PATCH_LEVEL="b1.1" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/win/configure b/win/configure index 8b96430..399c326 100755 --- a/win/configure +++ b/win/configure @@ -1272,7 +1272,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1" +TCL_PATCH_LEVEL="b1.1" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index 8b8e61d..33f40cc 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.115 2008/12/20 21:40:27 kennykb Exp $ +# RCS: @(#) $Id: configure.in,v 1.116 2009/01/16 20:44:25 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -16,7 +16,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1" +TCL_PATCH_LEVEL="b1.1" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 -- cgit v0.12 From 3bdc4a1e6ef4b550f7b641506f8fef0d572b06fe Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 16 Jan 2009 20:49:22 +0000 Subject: correct the commit message --- ChangeLog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b2cceb..72ecf3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,9 @@ * generic/tcl.h: Bump patchlevel to 8.6b1.1 to distinguish * library/init.tcl: CVS snapshots from the 8.6b1 and 8.6b2 releases - * unix/configure.in: and to deal with the fact that the HEAD of - * win/configure.in: init.tcl will not [source] in Tcl 8.6b1 . + * unix/configure.in: and to deal with the fact that the 8.6b1 + * win/configure.in: version of init.tcl will not [source] in the + HEAD version of Tcl. * unix/configure: autoconf-2.59 * win/configure: -- cgit v0.12 From 6fb271b7c3cfc363fb177cc58fdebcfe3cfe6f47 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sun, 18 Jan 2009 00:07:37 +0000 Subject: The converter author should not be assigned copyright for transformed documents --- tools/tcltk-man2html.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 8ed5e08..4379f22 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -1575,7 +1575,6 @@ proc make-man-pages {html args} { set manual(section-toc) {} set manual(section-toc-n) 1 set manual(copyrights) {} - lappend manual(copyrights) "Copyright © 1995-1997 Roger E. Critchlow Jr." lappend manual(all-pages) $manual(wing-file)/$manual(tail) manreport 100 $manual(name) while {[gets $manual(infp) line] >= 0} { -- cgit v0.12 From 0536b0c076360cf5725363e59e202d6dea76be13 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Mon, 19 Jan 2009 19:54:19 +0000 Subject: * win/build.vc.bat: Improved tools detection and error message. * win/makefile.vc: Reorganized the $(TCLOBJ) file list into seperate parts for easier maintenance. Matched all source built using -GL to both $(lib) and $(link) to use -LTCG and avoid a warning message. * win/nmakehlp.c: Removed -g option and GrepForDefine() func as it isn't being used anymore. The -V option method is much better. --- win/buildall.vc.bat | 33 ++++++++++++++--------- win/makefile.vc | 78 +++++++++++++++++++++++++++++++---------------------- win/nmakehlp.c | 72 +------------------------------------------------ 3 files changed, 67 insertions(+), 116 deletions(-) diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat index aff1bc6..6552ccd 100755 --- a/win/buildall.vc.bat +++ b/win/buildall.vc.bat @@ -3,7 +3,7 @@ :: edit this (or make your own) for your needs and wants using :: the instructions for calling makefile.vc found in makefile.vc :: -:: RCS: @(#) $Id: buildall.vc.bat,v 1.10 2008/10/02 19:01:30 mistachkin Exp $ +:: RCS: @(#) $Id: buildall.vc.bat,v 1.11 2009/01/19 19:54:19 davygrvy Exp $ set SYMBOLS= @@ -24,17 +24,24 @@ goto OPTIONS_DONE :: reset errorlevel cd > nul +:: You might have installed your developer studio to add itself to the +:: path or have already run vcvars32.bat. Testing these envars proves +:: cl.exe and friends are in your path. +:: +if defined VCINSTALLDIR (goto :startBuilding) +if defined MSDRVDIR (goto :startBuilding) +if defined MSVCDIR (goto :startBuilding) +if defined MSSDK (goto :startBuilding) + :: We need to run the development environment batch script that comes -:: with developer studio (v4,5,6,7,etc...) All have it. These paths -:: might not be correct. You may need to edit these. +:: with developer studio (v4,5,6,7,etc...) All have it. This path +:: might not be correct. You should call it yourself prior to running +:: this batchfile. :: -if not defined MSDevDir ( - call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat" - ::call "C:\Program Files\Microsoft Developer Studio\vc\bin\vcvars32.bat" - ::call c:\dev\devstudio60\vc98\bin\vcvars32.bat - if errorlevel 1 goto no_vcvars -) +call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat" +if errorlevel 1 (goto no_vcvars) +:startBuilding echo. echo Sit back and have a cup of coffee while this grinds through ;) @@ -102,15 +109,15 @@ echo *** BOOM! *** goto end :no_vcvars -echo vcvars32.bat not found. You'll need to edit this batch script. +echo vcvars32.bat was not run prior to this batchfile, nor are the MS tools in your path. goto out :help title buildall.vc.bat help message echo usage: -echo %0 : builds Tcl for all build types (do this first) -echo %0 install : installs all the release builds (do this second) -echo %0 symbols : builds Tcl for all debugging build types +echo %0 : builds Tcl for all build types (do this first) +echo %0 install : installs all the release builds (do this second) +echo %0 symbols : builds Tcl for all debugging build types echo %0 symbols install : install all the debug builds. echo. goto out diff --git a/win/makefile.vc b/win/makefile.vc index 4319f8a..f603351 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.195 2008/12/22 14:49:32 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.196 2009/01/19 19:54:19 davygrvy Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -247,7 +247,7 @@ TCLTESTOBJS = \ !endif $(TMP_DIR)\testMain.obj -TCLOBJS = \ +COREOBJS = \ $(TMP_DIR)\regcomp.obj \ $(TMP_DIR)\regerror.obj \ $(TMP_DIR)\regexec.obj \ @@ -326,21 +326,23 @@ TCLOBJS = \ $(TMP_DIR)\tclUtf.obj \ $(TMP_DIR)\tclUtil.obj \ $(TMP_DIR)\tclVar.obj \ - $(TMP_DIR)\tclWin32Dll.obj \ - $(TMP_DIR)\tclWinChan.obj \ - $(TMP_DIR)\tclWinConsole.obj \ - $(TMP_DIR)\tclWinSerial.obj \ - $(TMP_DIR)\tclWinError.obj \ - $(TMP_DIR)\tclWinFCmd.obj \ - $(TMP_DIR)\tclWinFile.obj \ - $(TMP_DIR)\tclWinInit.obj \ - $(TMP_DIR)\tclWinLoad.obj \ - $(TMP_DIR)\tclWinNotify.obj \ - $(TMP_DIR)\tclWinPipe.obj \ - $(TMP_DIR)\tclWinSock.obj \ - $(TMP_DIR)\tclWinThrd.obj \ - $(TMP_DIR)\tclWinTime.obj \ - $(TMP_DIR)\tclZlib.obj \ + $(TMP_DIR)\tclZlib.obj + +ZLIBOBJS = \ + $(TMP_DIR)\adler32.obj \ + $(TMP_DIR)\compress.obj \ + $(TMP_DIR)\crc32.obj \ + $(TMP_DIR)\deflate.obj \ + $(TMP_DIR)\gzio.obj \ + $(TMP_DIR)\infback.obj \ + $(TMP_DIR)\inffast.obj \ + $(TMP_DIR)\inflate.obj \ + $(TMP_DIR)\inftrees.obj \ + $(TMP_DIR)\trees.obj \ + $(TMP_DIR)\uncompr.obj \ + $(TMP_DIR)\zutil.obj + +TOMMATHOBJS = \ $(TMP_DIR)\bncore.obj \ $(TMP_DIR)\bn_reverse.obj \ $(TMP_DIR)\bn_fast_s_mp_mul_digs.obj \ @@ -401,18 +403,29 @@ TCLOBJS = \ $(TMP_DIR)\bn_s_mp_add.obj \ $(TMP_DIR)\bn_s_mp_mul_digs.obj \ $(TMP_DIR)\bn_s_mp_sqr.obj \ - $(TMP_DIR)\bn_s_mp_sub.obj \ + $(TMP_DIR)\bn_s_mp_sub.obj + +PLATFORMOBJS = \ + $(TMP_DIR)\tclWin32Dll.obj \ + $(TMP_DIR)\tclWinChan.obj \ + $(TMP_DIR)\tclWinConsole.obj \ + $(TMP_DIR)\tclWinError.obj \ + $(TMP_DIR)\tclWinFCmd.obj \ + $(TMP_DIR)\tclWinFile.obj \ + $(TMP_DIR)\tclWinInit.obj \ + $(TMP_DIR)\tclWinLoad.obj \ + $(TMP_DIR)\tclWinNotify.obj \ + $(TMP_DIR)\tclWinPipe.obj \ + $(TMP_DIR)\tclWinSerial.obj \ + $(TMP_DIR)\tclWinSock.obj \ + $(TMP_DIR)\tclWinThrd.obj \ + $(TMP_DIR)\tclWinTime.obj \ !if !$(STATIC_BUILD) $(TMP_DIR)\tcl.res !endif -ZLIBOBJS = \ - $(TMP_DIR)\adler32.obj $(TMP_DIR)\compress.obj $(TMP_DIR)\crc32.obj \ - $(TMP_DIR)\deflate.obj $(TMP_DIR)\gzio.obj $(TMP_DIR)\infback.obj \ - $(TMP_DIR)\inffast.obj $(TMP_DIR)\inflate.obj $(TMP_DIR)\inftrees.obj \ - $(TMP_DIR)\trees.obj $(TMP_DIR)\uncompr.obj $(TMP_DIR)\zutil.obj -TCLOBJS = $(TCLOBJS) $(ZLIBOBJS) +TCLOBJS = $(COREOBJS) $(ZLIBOBJS) $(TOMMATHOBJS) $(PLATFORMOBJS) TCLSTUBOBJS = \ $(TMP_DIR)\tclStubLib.obj \ @@ -472,8 +485,7 @@ TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 \ BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES) CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES) -### Stubs files should not be compiled with -GL -STUB_CFLAGS = $(cflags) $(cdebug:-GL=) $(OPTDEFINES) +STUB_CFLAGS = $(cflags) $(cdebug) $(OPTDEFINES) #--------------------------------------------------------------------- @@ -573,7 +585,7 @@ $(TCLIMPLIB): $(TCLLIB) $(TCLLIB): $(TCLOBJS) !if $(STATIC_BUILD) - $(lib32) -nologo -out:$@ @<< + $(lib32) -nologo $(LINKERFLAGS) -out:$@ @<< $** << !else @@ -586,7 +598,7 @@ $** !endif $(TCLSTUBLIB): $(TCLSTUBOBJS) - $(lib32) -nologo -out:$@ $(TCLSTUBOBJS) + $(lib32) -nologo $(LINKERFLAGS) -out:$@ $(TCLSTUBOBJS) $(TCLSH): $(TCLSHOBJS) $(TCLIMPLIB) $(link32) $(conlflags) -stack:2300000 -out:$@ $(baselibs) $** @@ -606,7 +618,7 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c $(TCLDDELIB): !else $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj - $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinDde.obj + $(lib32) -nologo $(LINKERFLAGS) -out:$@ $(TMP_DIR)\tclWinDde.obj !endif !else $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) @@ -622,7 +634,7 @@ $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) $(TCLREGLIB): !else $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj - $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinReg.obj + $(lib32) -nologo $(LINKERFLAGS) -out:$@ $(TMP_DIR)\tclWinReg.obj !endif !else $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) @@ -716,7 +728,7 @@ CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm htmlhelp: chmsetup $(HHPFILE) $(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl - "$(HHC)" $(HHPFILE) >NUL + $(HHC) $(HHPFILE) >NUL chmsetup: @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR) @@ -994,7 +1006,9 @@ $(TCLOBJS) #--------------------------------------------------------------------- -# Implicit rules +# Implicit rules. A limitation exists with nmake that requires that +# source directory can not contain spaces in the path. This an +# absolute. #--------------------------------------------------------------------- {$(WINDIR)}.c{$(TMP_DIR)}.obj:: diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 65777aa..e75f92c 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * ---------------------------------------------------------------------------- - * RCS: @(#) $Id: nmakehlp.c,v 1.22 2008/05/15 00:04:10 patthoyts Exp $ + * RCS: @(#) $Id: nmakehlp.c,v 1.23 2009/01/19 19:54:19 davygrvy Exp $ * ---------------------------------------------------------------------------- */ @@ -43,7 +43,6 @@ int CheckForCompilerFeature(const char *option); int CheckForLinkerFeature(const char *option); int IsIn(const char *string, const char *substring); -int GrepForDefine(const char *file, const char *string); int SubstituteFile(const char *substs, const char *filename); const char * GetVersionFromFile(const char *filename, const char *match); DWORD WINAPI ReadFromPipe(LPVOID args); @@ -128,18 +127,6 @@ main( } else { return IsIn(argv[2], argv[3]); } - case 'g': - if (argc == 2) { - chars = snprintf(msg, sizeof(msg) - 1, - "usage: %s -g \n" - "grep for a #define\n" - "exitcodes: integer of the found string (no decimals)\n", - argv[0]); - WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, - &dwWritten, NULL); - return 2; - } - return GrepForDefine(argv[2], argv[3]); case 's': if (argc == 2) { chars = snprintf(msg, sizeof(msg) - 1, @@ -469,63 +456,6 @@ IsIn( } /* - * Find a specified #define by name. - * - * If the line is '#define TCL_VERSION "8.5"', it returns 85 as the result. - */ - -int -GrepForDefine( - const char *file, - const char *string) -{ - char s1[51], s2[51], s3[51]; - FILE *f = fopen(file, "rt"); - - if (f == NULL) { - return 0; - } - - do { - int r = fscanf(f, "%50s", s1); - - if (r == 1 && !strcmp(s1, "#define")) { - /* - * Get next two words. - */ - - r = fscanf(f, "%50s %50s", s2, s3); - if (r != 2) { - continue; - } - - /* - * Is the first word what we're looking for? - */ - - if (!strcmp(s2, string)) { - double d1; - - fclose(f); - - /* - * Add 1 past first double quote char. "8.5" - */ - - d1 = atof(s3 + 1); /* 8.5 */ - while (floor(d1) != d1) { - d1 *= 10.0; - } - return ((int) d1); /* 85 */ - } - } - } while (!feof(f)); - - fclose(f); - return 0; -} - -/* * GetVersionFromFile -- * Looks for a match string in a file and then returns the version * following the match where a version is anything acceptable to -- cgit v0.12 From 6eb9342038ff466bb35d860217322909120b6509 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Mon, 19 Jan 2009 19:55:36 +0000 Subject: no message --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 72ecf3c..ab2b917 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-01-19 David Gravereaux + + * win/build.vc.bat: Improved tools detection and error message + * win/makefile.vc: Reorganized the $(TCLOBJ) file list into seperate + parts for easier maintenance. Matched all source built using -GL to + both $(lib) and $(link) to use -LTCG and avoid a warning message. + * win/nmakehlp.c: Removed -g option and GrepForDefine() func + as it isn't being used anymore. The -V option method is much + better. + 2009-01-16 Don Porter * generic/tcl.h: Bump patchlevel to 8.6b1.1 to distinguish -- cgit v0.12 From 40a4fd1f8e0050f3848343240e8428bd238d28af Mon Sep 17 00:00:00 2001 From: davygrvy Date: Mon, 19 Jan 2009 22:10:57 +0000 Subject: Addressed the over-building nature of the htmlhelp target by moving from a pseudo target to a real target dependent on the entire docs/ directory contents. --- win/makefile.vc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index f603351..8533c14 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.196 2009/01/19 19:54:19 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.197 2009/01/19 22:10:57 davygrvy Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -726,21 +726,17 @@ HTMLBASE=TclTk$(VERSION) HHPFILE=$(HTMLDIR)\$(HTMLBASE).hhp CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm -htmlhelp: chmsetup $(HHPFILE) - $(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl - $(HHC) $(HHPFILE) >NUL - -chmsetup: - @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR) +htmlhelp: chmsetup $(CHMFILE) -$(HHPFILE): - type << > $@ +$(CHMFILE): $(DOCDIR)\* + $(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl + $(HHC) <<$(HHPFILE) [OPTIONS] Compatibility=1.1 or later Compiled file=$(HTMLBASE).chm Display compile progress=no Error log file=$(HTMLBASE).log -Language=0x809 English (United Kingdom) +Language=0x409 English (United States) Title=Tcl/Tk $(DOT_VERSION) Help [FILES] contents.htm @@ -753,6 +749,9 @@ TkLib UserCmd << +chmsetup: + @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR) + #------------------------------------------------------------------------- # Build the old-style Windows .hlp file #------------------------------------------------------------------------- -- cgit v0.12 From fd00a34b31e7a9a6b7201a7f9e66b660af40f299 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Mon, 19 Jan 2009 22:13:10 +0000 Subject: no message --- ChangeLog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ab2b917..b916c2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,11 @@ * win/build.vc.bat: Improved tools detection and error message * win/makefile.vc: Reorganized the $(TCLOBJ) file list into seperate - parts for easier maintenance. Matched all source built using -GL to + parts for easier maintenance. Matched all sources built using -GL to both $(lib) and $(link) to use -LTCG and avoid a warning message. + Addressed the over-building nature of the htmlhelp target by moving + from a pseudo target to a real target dependent on the entire docs/ + directory contents. * win/nmakehlp.c: Removed -g option and GrepForDefine() func as it isn't being used anymore. The -V option method is much better. -- cgit v0.12 From f646b68ea8f4291315a66173d7c4c117ebf263cd Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 20 Jan 2009 03:38:01 +0000 Subject: Patch 907924 --- ChangeLog | 10 ++++++++++ unix/Makefile.in | 14 +++++++++----- unix/configure | 17 +++++++++++++---- unix/tcl.m4 | 11 ++++++++--- 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index b916c2a..442916a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-01-19 Kevin B. Kenny + + * unix/Makefile.in: Added a CONFIG_INSTALL_DIR parameter so that + * unix/tcl.m4: distributors can control where tclConfig.sh goes. + Made the installation of 'ldAix' conditional + upon actually being on an AIX system. Allowed for downstream + packagers to customize SHLIB_VERSION on BSD-derived systems. + Thanks to Stuart Cassoff for [Patch 907924]. + * unix/configure: Autoconf 2.59 + 2009-01-19 David Gravereaux * win/build.vc.bat: Improved tools detection and error message diff --git a/unix/Makefile.in b/unix/Makefile.in index 8ce29ec..5dd34f7 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.260 2009/01/02 16:43:50 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.261 2009/01/20 03:38:01 kennykb Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -80,6 +80,9 @@ HTML_DIR = @HTML_DIR@ # Directory in which to install html documentation: HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR) +# Directory in which to install the configuration file tclConfig.sh +CONFIG_INSTALL_DIR = $(INSTALL_ROOT)$(libdir) + # Directory in which to install bundled packages: PACKAGE_DIR = @PACKAGE_DIR@ @@ -741,7 +744,8 @@ install-strip: # (e.g. if installing as root). install-binaries: binaries - @for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" ; \ + @for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" \ + "$(CONFIG_INSTALL_DIR)"; \ do \ if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ @@ -763,8 +767,8 @@ install-binaries: binaries fi @echo "Installing tclsh as $(BIN_INSTALL_DIR)/tclsh$(VERSION)" @$(INSTALL_PROGRAM) tclsh "$(BIN_INSTALL_DIR)"/tclsh$(VERSION) - @echo "Installing tclConfig.sh to $(LIB_INSTALL_DIR)/" - @$(INSTALL_DATA) tclConfig.sh "$(LIB_INSTALL_DIR)"/tclConfig.sh + @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" + @$(INSTALL_DATA) tclConfig.sh "$(CONFIG_INSTALL_DIR)"/tclConfig.sh @if test "$(STUB_LIB_FILE)" != "" ; then \ echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \ @INSTALL_STUB_LIB@ ; \ @@ -804,7 +808,7 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs done; @echo "Installing library files to $(SCRIPT_INSTALL_DIR)"; @for i in $(TOP_DIR)/library/*.tcl $(TOP_DIR)/library/tclIndex \ - $(UNIX_DIR)/tclAppInit.c $(UNIX_DIR)/ldAix @DTRACE_SRC@; \ + $(UNIX_DIR)/tclAppInit.c @LDAIX_SRC@ @DTRACE_SRC@; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \ done; diff --git a/unix/configure b/unix/configure index f5eb7fc..6ac4133 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' # Initialize some variables set by options. @@ -6697,6 +6697,11 @@ fi LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" PLAT_OBJS="" PLAT_SRCS="" + LDAIX_SRC="" + if test x"$(SHLIB_VERSION)" = x; then + SHLIB_VERSION="1.0" +fi + case $system in AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then @@ -6782,6 +6787,7 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${VERSION}.exp' + LDAIX_SRC='$(UNIX_DIR)/ldAix' fi @@ -7567,7 +7573,7 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6 else - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' fi @@ -7578,6 +7584,7 @@ fi TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) + CFLAGS_OPTIMIZE='-O2' SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' @@ -7590,7 +7597,7 @@ fi fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' echo "$as_me:$LINENO: checking for ELF" >&5 echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then @@ -8336,7 +8343,7 @@ fi # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; @@ -8948,6 +8955,7 @@ fi + cat >>confdefs.h <<_ACEOF #define TCL_SHLIB_EXT "${SHLIB_SUFFIX}" _ACEOF @@ -19593,6 +19601,7 @@ s,@DL_LIBS@,$DL_LIBS,;t t s,@DL_OBJS@,$DL_OBJS,;t t s,@PLAT_OBJS@,$PLAT_OBJS,;t t s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@LDAIX_SRC@,$LDAIX_SRC,;t t s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 23a2b1f..ebc7b16 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1121,6 +1121,8 @@ dnl AC_CHECK_TOOL(AR, ar) LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" PLAT_OBJS="" PLAT_SRCS="" + LDAIX_SRC="" + AS_IF([test x"$(SHLIB_VERSION)" = x], [SHLIB_VERSION="1.0"]) case $system in AIX-*) AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ @@ -1180,6 +1182,7 @@ dnl AC_CHECK_TOOL(AR, ar) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${VERSION}.exp' + LDAIX_SRC='$(UNIX_DIR)/ldAix' ]) # AIX v<=4.1 has some different flags than 4.2+ @@ -1489,7 +1492,7 @@ dnl AC_CHECK_TOOL(AR, ar) AS_IF([test $tcl_cv_ld_elf = yes], [ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' ], [ - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' ]) # Ancient FreeBSD doesn't handle version numbers with dots. @@ -1498,6 +1501,7 @@ dnl AC_CHECK_TOOL(AR, ar) TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) + CFLAGS_OPTIMIZE='-O2' SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' @@ -1507,7 +1511,7 @@ dnl AC_CHECK_TOOL(AR, ar) AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ AC_EGREP_CPP(yes, [ #ifdef __ELF__ @@ -1816,7 +1820,7 @@ dnl AC_CHECK_TOOL(AR, ar) # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; @@ -2080,6 +2084,7 @@ dnl # preprocessing tests use only CPPFLAGS. AC_SUBST(DL_OBJS) AC_SUBST(PLAT_OBJS) AC_SUBST(PLAT_SRCS) + AC_SUBST(LDAIX_SRC) AC_SUBST(CFLAGS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) -- cgit v0.12 From 60f0c609aebe699812fbe32b1805a85a15a5241f Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 21 Jan 2009 21:29:05 +0000 Subject: * generic/tclStringObj.c: New fix for [Bug 2494093] replaces the flawed attempt committed 2009-01-09. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 54 ++++++++++++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 442916a..9b22215 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-21 Don Porter + + * generic/tclStringObj.c: New fix for [Bug 2494093] replaces the + flawed attempt committed 2009-01-09. + 2009-01-19 Kevin B. Kenny * unix/Makefile.in: Added a CONFIG_INSTALL_DIR parameter so that diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 5785d72..aebb2e9 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.78 2009/01/09 15:34:33 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.79 2009/01/21 21:29:05 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -107,13 +107,25 @@ typedef struct String { #define STRING_UALLOC(numChars) \ ((numChars) * sizeof(Tcl_UniChar)) -#define STRING_SIZE(ualloc) \ - ((unsigned) ((ualloc) \ - ? ((sizeof(String) - sizeof(Tcl_UniChar) + (ualloc) > INT_MAX) \ - ? Tcl_Panic("unable to alloc %u bytes", \ - sizeof(String) - sizeof(Tcl_UniChar) + (ualloc)), INT_MAX \ - : (sizeof(String) - sizeof(Tcl_UniChar) + (ualloc))) \ - : sizeof(String))) +#define STRING_SIZE(numBytes) \ + (sizeof(String) - sizeof(Tcl_UniChar) + (numBytes)) +#define STRING_NOMEM(numBytes) \ + (Tcl_Panic("unable to alloc %u bytes", STRING_SIZE(numBytes)), NULL) +#define stringAlloc(numBytes) \ + (String *) (((numBytes) > INT_MAX - STRING_SIZE(0)) \ + ? STRING_NOMEM(numBytes) \ + : ckalloc((unsigned) STRING_SIZE( \ + (numBytes) ? (numBytes) : sizeof(Tcl_UniChar)) )) +#define stringRealloc(ptr, numBytes) \ + (String *) (((numBytes) > INT_MAX - STRING_SIZE(0)) \ + ? STRING_NOMEM(numBytes) \ + : ckrealloc((char *) ptr, (unsigned) STRING_SIZE( \ + (numBytes) ? (numBytes) : sizeof(Tcl_UniChar)) )) +#define stringAttemptRealloc(ptr, numBytes) \ + (String *) (((numBytes) > INT_MAX - STRING_SIZE(0)) \ + ? NULL \ + : attemptckrealloc((char *) ptr, (unsigned) STRING_SIZE( \ + (numBytes) ? (numBytes) : sizeof(Tcl_UniChar)) )) #define GET_STRING(objPtr) \ ((String *) (objPtr)->internalRep.otherValuePtr) #define SET_STRING(objPtr, stringPtr) \ @@ -333,7 +345,7 @@ Tcl_NewUnicodeObj( Tcl_InvalidateStringRep(objPtr); objPtr->typePtr = &tclStringType; - stringPtr = (String *) ckalloc(STRING_SIZE(uallocated)); + stringPtr = stringAlloc(uallocated); stringPtr->numChars = numChars; stringPtr->uallocated = uallocated; stringPtr->hasUnicode = (numChars > 0); @@ -814,8 +826,7 @@ Tcl_SetObjLength( size_t uallocated = STRING_UALLOC(length); if (uallocated > stringPtr->uallocated) { - stringPtr = (String *) ckrealloc((char*) stringPtr, - STRING_SIZE(uallocated)); + stringPtr = stringRealloc(stringPtr, uallocated); SET_STRING(objPtr, stringPtr); stringPtr->uallocated = uallocated; } @@ -934,8 +945,7 @@ Tcl_AttemptSetObjLength( size_t uallocated = STRING_UALLOC(length); if (uallocated > stringPtr->uallocated) { - stringPtr = (String *) attemptckrealloc((char*) stringPtr, - STRING_SIZE(uallocated)); + stringPtr = stringAttemptRealloc(stringPtr, uallocated); if (stringPtr == NULL) { return 0; } @@ -1004,7 +1014,7 @@ Tcl_SetUnicodeObj( * Allocate enough space for the String structure + Unicode string. */ - stringPtr = (String *) ckalloc(STRING_SIZE(uallocated)); + stringPtr = stringAlloc(uallocated); stringPtr->numChars = numChars; stringPtr->uallocated = uallocated; stringPtr->hasUnicode = (numChars > 0); @@ -1317,14 +1327,12 @@ AppendUnicodeToUnicodeRep( if (STRING_UALLOC(numChars) >= stringPtr->uallocated) { stringPtr->uallocated = STRING_UALLOC(2 * numChars); - tmpString = (String *) attemptckrealloc((char *)stringPtr, - STRING_SIZE(stringPtr->uallocated)); + tmpString = stringAttemptRealloc(stringPtr, stringPtr->uallocated); if (tmpString == NULL) { stringPtr->uallocated = STRING_UALLOC(numChars + appendNumChars) + TCL_GROWTH_MIN_ALLOC; - tmpString = (String *) ckrealloc((char *)stringPtr, - STRING_SIZE(stringPtr->uallocated)); + tmpString = stringRealloc(stringPtr, stringPtr->uallocated); } stringPtr = tmpString; SET_STRING(objPtr, stringPtr); @@ -2656,8 +2664,7 @@ FillUnicodeRep( if (stringPtr->uallocated > 0) { uallocated *= 2; } - stringPtr = (String *) ckrealloc((char*) stringPtr, - STRING_SIZE(uallocated)); + stringPtr = stringRealloc(stringPtr, uallocated); stringPtr->uallocated = uallocated; } @@ -2710,11 +2717,10 @@ DupStringInternalRep( */ if (srcStringPtr->hasUnicode == 0) { - copyStringPtr = (String *) ckalloc(STRING_SIZE(STRING_UALLOC(0))); + copyStringPtr = stringAlloc(STRING_UALLOC(0)); copyStringPtr->uallocated = STRING_UALLOC(0); } else { - copyStringPtr = (String *) ckalloc( - STRING_SIZE(srcStringPtr->uallocated)); + copyStringPtr = stringAlloc(srcStringPtr->uallocated); copyStringPtr->uallocated = srcStringPtr->uallocated; memcpy(copyStringPtr->unicode, srcStringPtr->unicode, @@ -2780,7 +2786,7 @@ SetStringFromAny( * Allocate enough space for the basic String structure. */ - stringPtr = (String *) ckalloc(STRING_SIZE(STRING_UALLOC(0))); + stringPtr = stringAlloc(STRING_UALLOC(0)); stringPtr->numChars = -1; stringPtr->uallocated = STRING_UALLOC(0); stringPtr->hasUnicode = 0; -- cgit v0.12 From 5cfe1a875e35f27b272584f4b35bac4030002df4 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 22 Jan 2009 00:11:24 +0000 Subject: * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202]. * generic/tclIORTrans.c (ReflectClose): Closing a channel may supply NULL for the 'interp'. Test for finalization needs to be different, and one place has to pull the interp out of the channel instead. --- ChangeLog | 8 ++++++++ generic/tclIORChan.c | 19 ++++++++++++------- generic/tclIORTrans.c | 17 +++++++++++------ 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b22215..1123796 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-21 Andreas Kupries + + * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202]. + * generic/tclIORTrans.c (ReflectClose): Closing a channel may + supply NULL for the 'interp'. Test for finalization needs to be + different, and one place has to pull the interp out of the channel + instead. + 2009-01-21 Don Porter * generic/tclStringObj.c: New fix for [Bug 2494093] replaces the diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index d93df6b..66a65b8 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.36 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.37 2009/01/22 00:11:24 andreas_kupries Exp $ */ #include @@ -1049,7 +1049,7 @@ ReflectClose( * this interp */ Tcl_HashEntry *hPtr; /* Entry in the above map */ - if (interp == NULL) { + if (TclInThreadExit()) { /* * This call comes from TclFinalizeIOSystem. There are no * interpreters, and therefore we cannot call upon the handler command @@ -1137,13 +1137,18 @@ ReflectClose( * NOTE: The channel may not be in the map. This is ok, that happens * when the channel was created in a different interpreter and/or * thread and then was moved here. + * + * NOTE: The channel may have been removed from the map already via + * the per-interp DeleteReflectedChannelMap exit-handler. */ - rcmPtr = GetReflectedChannelMap(interp); - hPtr = Tcl_FindHashEntry(&rcmPtr->map, - Tcl_GetChannelName(rcPtr->chan)); - if (hPtr) { - Tcl_DeleteHashEntry(hPtr); + if (rcPtr->interp) { + rcmPtr = GetReflectedChannelMap(rcPtr->interp); + hPtr = Tcl_FindHashEntry(&rcmPtr->map, + Tcl_GetChannelName(rcPtr->chan)); + if (hPtr) { + Tcl_DeleteHashEntry(hPtr); + } } #ifdef TCL_THREADS rcmPtr = GetThreadReflectedChannelMap(); diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index b847d42..2cf38b1 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.7 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.8 2009/01/22 00:11:24 andreas_kupries Exp $ */ #include @@ -895,7 +895,7 @@ ReflectClose( * in this interp. */ Tcl_HashEntry *hPtr; /* Entry in the above map */ - if (interp == NULL) { + if (TclInThreadExit()) { /* * This call comes from TclFinalizeIOSystem. There are no * interpreters, and therefore we cannot call upon the handler command @@ -1003,12 +1003,17 @@ ReflectClose( * NOTE: The transform may not be in the map. This is ok, that happens * when the transform was created in a different interpreter and/or thread * and then was moved here. + * + * NOTE: The channel may have been removed from the map already via + * the per-interp DeleteReflectedTransformMap exit-handler. */ - rtmPtr = GetReflectedTransformMap(interp); - hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); - if (hPtr) { - Tcl_DeleteHashEntry(hPtr); + if (rtPtr->interp) { + rtmPtr = GetReflectedTransformMap(rtPtr->interp); + hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); + if (hPtr) { + Tcl_DeleteHashEntry(hPtr); + } } /* -- cgit v0.12 From b1a602f68bd5e54311ed31ec030276ca89fe18c8 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Thu, 22 Jan 2009 02:11:21 +0000 Subject: * unix/tcl.m4: Corrected a typo ($(SHLIB_VEERSION) should be ${SHLIB_VERSION}). * unix/configure: Autoconf 2.59 --- ChangeLog | 6 ++++++ unix/configure | 2 +- unix/tcl.m4 | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1123796..2c00446 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-22 Kevin B. Kenny + + * unix/tcl.m4: Corrected a typo ($(SHLIB_VEERSION) should be + ${SHLIB_VERSION}). + * unix/configure: Autoconf 2.59 + 2009-01-21 Andreas Kupries * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202]. diff --git a/unix/configure b/unix/configure index 6ac4133..d7bfe2c 100755 --- a/unix/configure +++ b/unix/configure @@ -6698,7 +6698,7 @@ fi PLAT_OBJS="" PLAT_SRCS="" LDAIX_SRC="" - if test x"$(SHLIB_VERSION)" = x; then + if test x"${SHLIB_VERSION}" = x; then SHLIB_VERSION="1.0" fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index ebc7b16..3c82975 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1122,7 +1122,7 @@ dnl AC_CHECK_TOOL(AR, ar) PLAT_OBJS="" PLAT_SRCS="" LDAIX_SRC="" - AS_IF([test x"$(SHLIB_VERSION)" = x], [SHLIB_VERSION="1.0"]) + AS_IF([test x"${SHLIB_VERSION}" = x], [SHLIB_VERSION="1.0"]) case $system in AIX-*) AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ -- cgit v0.12 From ed5043f99afd5932ca7403cf20b19383d20dc9dc Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 22 Jan 2009 05:07:15 +0000 Subject: typo --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2c00446..15025f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2009-01-22 Kevin B. Kenny - * unix/tcl.m4: Corrected a typo ($(SHLIB_VEERSION) should be + * unix/tcl.m4: Corrected a typo ($(SHLIB_VERSION) should be ${SHLIB_VERSION}). * unix/configure: Autoconf 2.59 -- cgit v0.12 From 1cc677fe337ed9c32c7a1bbaafc2988e98a8076f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 22 Jan 2009 06:42:33 +0000 Subject: CONSTify TclPrintInstruction and TclpNativeJoinPath (TIP #27) {unix win} in *.decls is equivalent to {generic} tclGetDate.y, tclDate.c: single internal const decoration --- ChangeLog | 13 ++++++ generic/tcl.decls | 8 ++-- generic/tclCompile.c | 8 ++-- generic/tclCompile.h | 4 +- generic/tclDate.c | 2 +- generic/tclDecls.h | 118 +---------------------------------------------- generic/tclFileName.c | 23 ++++++---- generic/tclGetDate.y | 4 +- generic/tclInt.decls | 8 ++-- generic/tclInt.h | 4 +- generic/tclIntDecls.h | 124 +------------------------------------------------- 11 files changed, 47 insertions(+), 269 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15025f3..ac5b07d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-01-22 Jan Nijtmans + + * generic/tclCompile.h: CONSTify TclPrintInstruction (TIP #27) + * generic/tclCompile.c + * generic/tclInt.h: CONSTify TclpNativeJoinPath (TIP #27) + * generic/tclFileName.c + * generic/tcl.decls {unix win} is equivalent to {generic} + * generic/tclInt.decls + * generic/tclDecls.h (regenerated) + * generic/tclIntDecls.h + * generic/tclGetDate.y: single internal const decoration + * generic/tclDate.c: + 2009-01-22 Kevin B. Kenny * unix/tcl.m4: Corrected a typo ($(SHLIB_VERSION) should be diff --git a/generic/tcl.decls b/generic/tcl.decls index a9a5bcf..a95acf8 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.167 2008/12/27 10:07:06 dkf Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.168 2009/01/22 06:42:33 nijtmans Exp $ library tcl @@ -412,7 +412,7 @@ declare 109 generic { declare 110 generic { void Tcl_DeleteInterp(Tcl_Interp *interp) } -declare 111 {unix win} { +declare 111 generic { void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr) } declare 112 generic { @@ -703,7 +703,7 @@ declare 196 generic { Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags) } -declare 197 {unix win} { +declare 197 generic { Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc, CONST84 char **argv, int flags) } @@ -739,7 +739,7 @@ declare 205 generic { declare 206 generic { int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead) } -declare 207 {unix win} { +declare 207 generic { void Tcl_ReapDetachedProcs(void) } declare 208 generic { diff --git a/generic/tclCompile.c b/generic/tclCompile.c index d93e321..8e68d7d 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.164 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.165 2009/01/22 06:42:33 nijtmans Exp $ */ #include "tclInt.h" @@ -2151,7 +2151,7 @@ TclFindCompiledLocal( */ LocalCache *cachePtr = envPtr->iPtr->varFramePtr->localCachePtr; - char *localName; + const char *localName; Tcl_Obj **varNamePtr; int len; @@ -3368,7 +3368,7 @@ TclPrintByteCodeObj( int TclPrintInstruction( ByteCode *codePtr, /* Bytecode containing the instruction. */ - unsigned char *pc) /* Points to first byte of instruction. */ + const unsigned char *pc) /* Points to first byte of instruction. */ { Tcl_Obj *bufferObj; int numBytes; @@ -3839,7 +3839,7 @@ FormatInstruction( } } if (suffixObj) { - char *bytes; + const char *bytes; int length; Tcl_AppendToObj(bufferObj, "\t# ", -1); diff --git a/generic/tclCompile.h b/generic/tclCompile.h index f42247d..c0d18e4 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.113 2008/10/28 23:29:54 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.114 2009/01/22 06:42:33 nijtmans Exp $ */ #ifndef _TCLCOMPILATION @@ -925,7 +925,7 @@ MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp, Tcl_Obj *objPtr); #endif MODULE_SCOPE int TclPrintInstruction(ByteCode* codePtr, - unsigned char *pc); + const unsigned char *pc); MODULE_SCOPE void TclPrintObject(FILE *outFile, Tcl_Obj *objPtr, int maxChars); MODULE_SCOPE void TclPrintSource(FILE *outFile, diff --git a/generic/tclDate.c b/generic/tclDate.c index eabd37a..94b3caf 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -178,7 +178,7 @@ typedef struct DateInfo { time_t dateDayNumber; int dateHaveDay; - char *dateInput; + const char *dateInput; time_t *dateRelPointer; int dateDigitCount; diff --git a/generic/tclDecls.h b/generic/tclDecls.h index a680700..4eadfa2 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.168 2008/12/27 10:07:06 dkf Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.169 2009/01/22 06:42:33 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -708,27 +708,11 @@ EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); /* 110 */ EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids_TCL_DECLARED -#define Tcl_DetachPids_TCL_DECLARED -/* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_DetachPids_TCL_DECLARED #define Tcl_DetachPids_TCL_DECLARED /* 111 */ EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); #endif -#endif /* MACOSX */ #ifndef Tcl_DeleteTimerHandler_TCL_DECLARED #define Tcl_DeleteTimerHandler_TCL_DECLARED /* 112 */ @@ -1217,30 +1201,12 @@ EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_OpenCommandChannel_TCL_DECLARED -#define Tcl_OpenCommandChannel_TCL_DECLARED -/* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_OpenCommandChannel_TCL_DECLARED #define Tcl_OpenCommandChannel_TCL_DECLARED /* 197 */ EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); #endif -#endif /* MACOSX */ #ifndef Tcl_OpenFileChannel_TCL_DECLARED #define Tcl_OpenFileChannel_TCL_DECLARED /* 198 */ @@ -1296,27 +1262,11 @@ EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, int toRead); #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef Tcl_ReapDetachedProcs_TCL_DECLARED #define Tcl_ReapDetachedProcs_TCL_DECLARED /* 207 */ EXTERN void Tcl_ReapDetachedProcs (void); #endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs_TCL_DECLARED -#define Tcl_ReapDetachedProcs_TCL_DECLARED -/* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); -#endif -#endif /* MACOSX */ #ifndef Tcl_RecordAndEval_TCL_DECLARED #define Tcl_RecordAndEval_TCL_DECLARED /* 208 */ @@ -3913,15 +3863,7 @@ typedef struct TclStubs { void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ -#endif /* MACOSX */ void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ @@ -4015,15 +3957,7 @@ typedef struct TclStubs { void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ -#endif /* MACOSX */ Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */ Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */ Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ @@ -4033,15 +3967,7 @@ typedef struct TclStubs { CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ void (*tcl_ReapDetachedProcs) (void); /* 207 */ -#endif /* MACOSX */ int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */ int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ @@ -4931,24 +4857,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_DeleteInterp \ (tclStubsPtr->tcl_DeleteInterp) /* 110 */ #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef Tcl_DetachPids -#define Tcl_DetachPids \ - (tclStubsPtr->tcl_DetachPids) /* 111 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_DetachPids #define Tcl_DetachPids \ (tclStubsPtr->tcl_DetachPids) /* 111 */ #endif -#endif /* MACOSX */ #ifndef Tcl_DeleteTimerHandler #define Tcl_DeleteTimerHandler \ (tclStubsPtr->tcl_DeleteTimerHandler) /* 112 */ @@ -5294,24 +5206,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_ObjSetVar2 \ (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ #ifndef Tcl_OpenCommandChannel #define Tcl_OpenCommandChannel \ (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_OpenCommandChannel -#define Tcl_OpenCommandChannel \ - (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ -#endif -#endif /* MACOSX */ #ifndef Tcl_OpenFileChannel #define Tcl_OpenFileChannel \ (tclStubsPtr->tcl_OpenFileChannel) /* 198 */ @@ -5348,24 +5246,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_Read \ (tclStubsPtr->tcl_Read) /* 206 */ #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ #ifndef Tcl_ReapDetachedProcs #define Tcl_ReapDetachedProcs \ (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ #endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef Tcl_ReapDetachedProcs -#define Tcl_ReapDetachedProcs \ - (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ -#endif -#endif /* MACOSX */ #ifndef Tcl_RecordAndEval #define Tcl_RecordAndEval \ (tclStubsPtr->tcl_RecordAndEval) /* 208 */ diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 2d62414..c621aff 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.95 2008/12/03 07:08:44 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.96 2009/01/22 06:42:33 nijtmans Exp $ */ #include "tclInt.h" @@ -211,7 +211,7 @@ ExtractWinRoot( Tcl_DStringAppend(resultPtr, path, 2); return &path[2]; } else { - char *tail = (char *) &path[3]; + const char *tail = &path[3]; /* * Skip separators. @@ -389,7 +389,7 @@ TclpGetNativePathType( { Tcl_PathType type = TCL_PATH_ABSOLUTE; int pathLen; - char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); + const char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); if (path[0] == '~') { /* @@ -398,7 +398,7 @@ TclpGetNativePathType( */ if (driveNameLengthPtr != NULL) { - char *end = path + 1; + const char *end = path + 1; while ((*end != '\0') && (*end != '/')) { end++; } @@ -407,7 +407,7 @@ TclpGetNativePathType( } else { switch (tclPlatform) { case TCL_PLATFORM_UNIX: { - char *origPath = path; + const char *origPath = path; /* * Paths that begin with / are absolute. @@ -550,7 +550,8 @@ Tcl_SplitPath( Tcl_Obj *resultPtr = NULL; /* Needed only to prevent gcc warnings. */ Tcl_Obj *tmpPtr, *eltPtr; int i, size, len; - char *p, *str; + char *p; + const char *str; /* * Perform the splitting, using objectified, vfs-aware code. @@ -835,10 +836,12 @@ Tcl_FSJoinToPath( void TclpNativeJoinPath( Tcl_Obj *prefix, - char *joining) + const char *joining) { int length, needsSep; - char *dest, *p, *start; + char *dest; + const char *p; + const char *start; start = Tcl_GetStringFromObj(prefix, &length); @@ -962,7 +965,7 @@ Tcl_JoinPath( int i, len; Tcl_Obj *listObj = Tcl_NewObj(); Tcl_Obj *resultObj; - char *resultStr; + const char *resultStr; /* * Build the list of paths. @@ -1979,7 +1982,7 @@ TclGlob( Tcl_ListObjGetElements(NULL, filenamesObj, &objc, &objv); for (i = 0; i< objc; i++) { int len; - char *oldStr = Tcl_GetStringFromObj(objv[i], &len); + const char *oldStr = Tcl_GetStringFromObj(objv[i], &len); Tcl_Obj *elems[1]; if (len == prefixLen) { diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index af20a61..8a7d167 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.39 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.40 2009/01/22 06:42:33 nijtmans Exp $ */ %{ @@ -75,7 +75,7 @@ typedef struct DateInfo { time_t dateDayNumber; int dateHaveDay; - char *dateInput; + const char *dateInput; time_t *dateRelPointer; int dateDigitCount; diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 433ba9b..a3229e3 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.135 2008/12/19 09:33:16 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.136 2009/01/22 06:42:33 nijtmans Exp $ library tcl @@ -43,7 +43,7 @@ declare 3 generic { # declare 4 generic { # int TclChdir(Tcl_Interp *interp, char *dirName) # } -declare 5 {unix win} { +declare 5 generic { int TclCleanupChildren(Tcl_Interp *interp, int numPids, Tcl_Pid *pidPtr, Tcl_Channel errorChan) } @@ -60,7 +60,7 @@ declare 8 generic { # TclCreatePipeline unofficially exported for use by BLT. -declare 9 {unix win} { +declare 9 generic { int TclCreatePipeline(Tcl_Interp *interp, int argc, const char **argv, Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr, TclFile *errFilePtr) @@ -421,7 +421,7 @@ declare 103 generic { int TclSockGetPort(Tcl_Interp *interp, const char *str, const char *proto, int *portPtr) } -declare 104 {unix win} { +declare 104 generic { int TclSockMinimumBuffers(int sock, int size) } # Replaced by Tcl_FSStat in 8.4: diff --git a/generic/tclInt.h b/generic/tclInt.h index ee4fec7..b633e12 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.413 2009/01/13 20:30:03 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.414 2009/01/22 06:42:33 nijtmans Exp $ */ #ifndef _TCLINT @@ -2792,7 +2792,7 @@ MODULE_SCOPE int TclpMatchFiles(Tcl_Interp *interp, char *separators, Tcl_DString *dirPtr, char *pattern, char *tail); MODULE_SCOPE int TclpObjNormalizePath(Tcl_Interp *interp, Tcl_Obj *pathPtr, int nextCheckpoint); -MODULE_SCOPE void TclpNativeJoinPath(Tcl_Obj *prefix, char *joining); +MODULE_SCOPE void TclpNativeJoinPath(Tcl_Obj *prefix, const char *joining); MODULE_SCOPE Tcl_Obj * TclpNativeSplitPath(Tcl_Obj *pathPtr, int *lenPtr); MODULE_SCOPE Tcl_PathType TclpGetNativePathType(Tcl_Obj *pathPtr, int *driveNameLengthPtr, Tcl_Obj **driveNameRef); diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 1057bda..c728614 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.130 2008/12/19 09:33:16 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.131 2009/01/22 06:42:33 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -54,30 +54,12 @@ EXTERN void TclAllocateFreeObjects (void); #endif /* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef TclCleanupChildren_TCL_DECLARED #define TclCleanupChildren_TCL_DECLARED /* 5 */ EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); #endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCleanupChildren_TCL_DECLARED -#define TclCleanupChildren_TCL_DECLARED -/* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); -#endif -#endif /* MACOSX */ #ifndef TclCleanupCommand_TCL_DECLARED #define TclCleanupCommand_TCL_DECLARED /* 6 */ @@ -96,17 +78,6 @@ EXTERN int TclCopyChannel (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - const char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ #ifndef TclCreatePipeline_TCL_DECLARED #define TclCreatePipeline_TCL_DECLARED /* 9 */ @@ -115,17 +86,6 @@ EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); #endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ -#ifndef TclCreatePipeline_TCL_DECLARED -#define TclCreatePipeline_TCL_DECLARED -/* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - const char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); -#endif -#endif /* MACOSX */ #ifndef TclCreateProc_TCL_DECLARED #define TclCreateProc_TCL_DECLARED /* 10 */ @@ -462,27 +422,11 @@ EXTERN int TclSockGetPort (Tcl_Interp * interp, const char * str, const char * proto, int * portPtr); #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclSockMinimumBuffers_TCL_DECLARED -#define TclSockMinimumBuffers_TCL_DECLARED -/* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef TclSockMinimumBuffers_TCL_DECLARED #define TclSockMinimumBuffers_TCL_DECLARED /* 104 */ EXTERN int TclSockMinimumBuffers (int sock, int size); #endif -#endif /* MACOSX */ /* Slot 105 is reserved */ /* Slot 106 is reserved */ /* Slot 107 is reserved */ @@ -1092,27 +1036,11 @@ typedef struct TclIntStubs { void *reserved2; void (*tclAllocateFreeObjects) (void); /* 3 */ void *reserved4; -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ -#endif /* MACOSX */ void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */ int (*tclCopyAndCollapse) (int count, const char * src, char * dst); /* 7 */ int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ -#endif /* MACOSX */ int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, const char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */ void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */ @@ -1207,15 +1135,7 @@ typedef struct TclIntStubs { char * (*tclSetPreInitScript) (char * string); /* 101 */ void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ int (*tclSockGetPort) (Tcl_Interp * interp, const char * str, const char * proto, int * portPtr); /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ -#endif /* MACOSX */ void *reserved105; void *reserved106; void *reserved107; @@ -1374,24 +1294,10 @@ extern const TclIntStubs *tclIntStubsPtr; (tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */ #endif /* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCleanupChildren -#define TclCleanupChildren \ - (tclIntStubsPtr->tclCleanupChildren) /* 5 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef TclCleanupChildren #define TclCleanupChildren \ (tclIntStubsPtr->tclCleanupChildren) /* 5 */ #endif -#endif /* MACOSX */ #ifndef TclCleanupCommand #define TclCleanupCommand \ (tclIntStubsPtr->tclCleanupCommand) /* 6 */ @@ -1404,24 +1310,10 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclCopyChannel \ (tclIntStubsPtr->tclCopyChannel) /* 8 */ #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclCreatePipeline -#define TclCreatePipeline \ - (tclIntStubsPtr->tclCreatePipeline) /* 9 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef TclCreatePipeline #define TclCreatePipeline \ (tclIntStubsPtr->tclCreatePipeline) /* 9 */ #endif -#endif /* MACOSX */ #ifndef TclCreateProc #define TclCreateProc \ (tclIntStubsPtr->tclCreateProc) /* 10 */ @@ -1666,24 +1558,10 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclSockGetPort \ (tclIntStubsPtr->tclSockGetPort) /* 103 */ #endif -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ -#ifndef TclSockMinimumBuffers -#define TclSockMinimumBuffers \ - (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ -#endif -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ #ifndef TclSockMinimumBuffers #define TclSockMinimumBuffers \ (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ #endif -#endif /* MACOSX */ /* Slot 105 is reserved */ /* Slot 106 is reserved */ /* Slot 107 is reserved */ -- cgit v0.12 From 4d2c8ff94995922844eb90c417935958838c36d0 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 24 Jan 2009 00:03:18 +0000 Subject: Added a note that 'zlib push' is reversed by 'chan pop'. --- ChangeLog | 64 ++++++++++++++++++++++++++++++++------------------------------ doc/zlib.n | 6 ++++-- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac5b07d..d43ac22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-01-23 Donal K. Fellows + + * doc/zlib.n: Added a note that 'zlib push' is reversed by 'chan pop'. + 2009-01-22 Jan Nijtmans * generic/tclCompile.h: CONSTify TclPrintInstruction (TIP #27) @@ -8,7 +12,7 @@ * generic/tclInt.decls * generic/tclDecls.h (regenerated) * generic/tclIntDecls.h - * generic/tclGetDate.y: single internal const decoration + * generic/tclGetDate.y: Single internal const decoration. * generic/tclDate.c: 2009-01-22 Kevin B. Kenny @@ -16,14 +20,13 @@ * unix/tcl.m4: Corrected a typo ($(SHLIB_VERSION) should be ${SHLIB_VERSION}). * unix/configure: Autoconf 2.59 - + 2009-01-21 Andreas Kupries * generic/tclIORChan.c (ReflectClose): Fix for [Bug 2458202]. - * generic/tclIORTrans.c (ReflectClose): Closing a channel may - supply NULL for the 'interp'. Test for finalization needs to be - different, and one place has to pull the interp out of the channel - instead. + * generic/tclIORTrans.c (ReflectClose): Closing a channel may supply + NULL for the 'interp'. Test for finalization needs to be different, + and one place has to pull the interp out of the channel instead. 2009-01-21 Don Porter @@ -34,30 +37,29 @@ * unix/Makefile.in: Added a CONFIG_INSTALL_DIR parameter so that * unix/tcl.m4: distributors can control where tclConfig.sh goes. - Made the installation of 'ldAix' conditional - upon actually being on an AIX system. Allowed for downstream - packagers to customize SHLIB_VERSION on BSD-derived systems. - Thanks to Stuart Cassoff for [Patch 907924]. + Made the installation of 'ldAix' conditional upon actually being on an + AIX system. Allowed for downstream packagers to customize + SHLIB_VERSION on BSD-derived systems. Thanks to Stuart Cassoff for + [Patch 907924]. * unix/configure: Autoconf 2.59 - + 2009-01-19 David Gravereaux * win/build.vc.bat: Improved tools detection and error message * win/makefile.vc: Reorganized the $(TCLOBJ) file list into seperate - parts for easier maintenance. Matched all sources built using -GL to + parts for easier maintenance. Matched all sources built using -GL to both $(lib) and $(link) to use -LTCG and avoid a warning message. Addressed the over-building nature of the htmlhelp target by moving from a pseudo target to a real target dependent on the entire docs/ directory contents. - * win/nmakehlp.c: Removed -g option and GrepForDefine() func - as it isn't being used anymore. The -V option method is much - better. + * win/nmakehlp.c: Removed -g option and GrepForDefine() func as it + isn't being used anymore. The -V option method is much better. 2009-01-16 Don Porter * generic/tcl.h: Bump patchlevel to 8.6b1.1 to distinguish * library/init.tcl: CVS snapshots from the 8.6b1 and 8.6b2 releases - * unix/configure.in: and to deal with the fact that the 8.6b1 + * unix/configure.in: and to deal with the fact that the 8.6b1 * win/configure.in: version of init.tcl will not [source] in the HEAD version of Tcl. @@ -66,17 +68,17 @@ 2009-01-14 Don Porter - * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Reverted - most of the substance of my 2009-01-12 commit. NULLing the objProc - field of a Command when deleting it is important so that tests for - certain classes of commands don't return false positives when applied - to deleted command tokens. Overall change is now just replacement - of a false comment with a true one. + * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Reverted most + of the substance of my 2009-01-12 commit. NULLing the objProc field of + a Command when deleting it is important so that tests for certain + classes of commands don't return false positives when applied to + deleted command tokens. Overall change is now just replacement of a + false comment with a true one. 2009-01-13 Jan Nijtmans - * unix/tcl.m4: fix [tcl-Bug 2502365] Building of head on - HPUX is broken when using the native CC + * unix/tcl.m4: fix [tcl-Bug 2502365] Building of head on HPUX is + broken when using the native CC. * unix/configure (autoconf-2.59) 2009-01-13 Donal K. Fellows @@ -88,7 +90,7 @@ * generic/tclBasic.c (Tcl_DeleteCommandFromToken): One consequence of the NRE rewrite is that there are now situations where a NULL objProc - field in a Command struct is perfectly normal. Removed an outdated + field in a Command struct is perfectly normal. Removed an outdated comment in Tcl_DeleteCommandFromToken that claimed we use cmdPtr->objPtr==NULL as a test of command validity. In fact we use cmdPtr->flags&CMD_IS_DELETED to perform that test. Also removed the @@ -418,7 +420,7 @@ * unix/Makefile.in: Add build support for collections of TEA * unix/configure.in: packages found under the pkgs directory. - [Patch 1163406]. Still needs porting to Windows. + [Patch 1163406]. Still needs porting to Windows. * unix/configure: autoconf-2.59 @@ -475,9 +477,9 @@ TIP #338 IMPLEMENTATION * doc/AppInit.c: Made routines Tcl_SetStartupScript and - * doc/Tcl_Main.3: Tcl_GetStartupScript public. Removed all + * doc/Tcl_Main.3: Tcl_GetStartupScript public. Removed all * generic/tcl.h: internal stub access to Tcl*Startup* routines, - * generic/tclInt.decls: and removed their implementations. Their + * generic/tclInt.decls: and removed their implementations. Their * generic/tclMain.c: function can now be completely performed with the new public interface. *** POTENTIAL INCOMPATIBILITY for callers of the internal @@ -1323,8 +1325,8 @@ * generic/tcl.h: Remove the "result" and "freeProc" fields * generic/tclBasic.c: from the default public declaration of the - * generic/tclResult.c: Tcl_Interp struct. Code should no longer - * generic/tclStubLib.c: be accessing these fields. Access can be + * generic/tclResult.c: Tcl_Interp struct. Code should no longer + * generic/tclStubLib.c: be accessing these fields. Access can be * generic/tclTest.c: restored by defining USE_INTERP_RESULT, but * generic/tclUtil.c: that should only be a temporary migration aid. *** POTENTIAL INCOMPATIBILITY *** @@ -1602,7 +1604,7 @@ * unix/tclUnixPort.h: * generic/tcl.h: Removed the conditional #define of - _ANSI_ARGS_ that would support pre-prototype C compilers. Since + _ANSI_ARGS_ that would support pre-prototype C compilers. Since _ANSI_ARGS_ is no longer used in tclDecls.h, it's clear no one compiling against Tcl 8.5 headers is making use of a -DNO_PROTOTYPES configuration. diff --git a/doc/zlib.n b/doc/zlib.n index e3c2122..48182bc 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.6 2008/12/19 18:23:04 dgp Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.7 2009/01/24 00:03:18 dkf Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -131,7 +131,9 @@ is to be used to receive the data. \fBzlib push\fI mode channel\fR ?\fIoptions ...\fR . Pushes a compressing or decompressing transformation onto the channel -\fIchannel\fR. The \fImode\fR argument determines what type of transformation +\fIchannel\fR. +The transformation can be removed again with \fBchan pop\fR. +The \fImode\fR argument determines what type of transformation is pushed; the following are supported: .RS .TP -- cgit v0.12 From 06246dc255be570cc95cf8e6234f079b4b93f94a Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 26 Jan 2009 16:25:59 +0000 Subject: Fix [Bug 2536400] --- ChangeLog | 5 +++++ generic/tclZlib.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d43ac22..22488c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-26 Donal K. Fellows + + * generic/tclZlib.c (ChanClose): Only generate error messages in the + interpreter when the thread is not being closed down. [Bug 2536400] + 2009-01-23 Donal K. Fellows * doc/zlib.n: Added a note that 'zlib push' is reversed by 'chan pop'. diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 5fefab7..033251b 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.21 2008/12/28 17:37:48 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.22 2009/01/26 16:25:59 dkf Exp $ */ #include "tclInt.h" @@ -2228,7 +2228,9 @@ ChanClose( e = deflate(&cd->outStream, Z_FINISH); if (e != Z_OK && e != Z_STREAM_END) { /* TODO: is this the right way to do errors on close? */ - ConvertError(interp, e); + if (!TclInThreadExit()) { + ConvertError(interp, e); + } result = TCL_ERROR; break; } @@ -2236,8 +2238,11 @@ ChanClose( if (Tcl_WriteRaw(cd->parent, cd->outBuffer, cd->outAllocated - cd->outStream.avail_out) < 0) { /* TODO: is this the right way to do errors on close? */ - Tcl_AppendResult(interp, "error while finalizing file: ", - Tcl_PosixError(interp), NULL); + if (!TclInThreadExit()) { + Tcl_AppendResult(interp, + "error while finalizing file: ", + Tcl_PosixError(interp), NULL); + } result = TCL_ERROR; break; } @@ -2252,7 +2257,6 @@ ChanClose( ckfree(cd->inBuffer); cd->inBuffer = NULL; } - if (cd->outBuffer) { ckfree(cd->outBuffer); cd->outBuffer = NULL; -- cgit v0.12 From 8752714aa15af36681d96e5b8f017aabb9e81d23 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 26 Jan 2009 16:42:39 +0000 Subject: minor formatting improvements --- generic/tclIORChan.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 66a65b8..cdda068 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.37 2009/01/22 00:11:24 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.38 2009/01/26 16:42:39 dkf Exp $ */ #include @@ -1061,8 +1061,9 @@ ReflectClose( /* * THREADED => Forward this to the origin thread * - * Note: DeleteThreadReflectedChannelMap() is the thread exit handler for the origin - * thread. Use this to clean up the structure? Except if lost? + * Note: DeleteThreadReflectedChannelMap() is the thread exit handler + * for the origin thread. Use this to clean up the structure? Except + * if lost? */ #ifdef TCL_THREADS @@ -1595,7 +1596,7 @@ ReflectBlock( blockObj = Tcl_NewBooleanObj(!nonblocking); - if (InvokeTclMethod(rcPtr, "blocking", blockObj, NULL, &resObj) != TCL_OK) { + if (InvokeTclMethod(rcPtr, "blocking", blockObj, NULL, &resObj)!=TCL_OK) { Tcl_SetChannelError(rcPtr->chan, resObj); errorNum = EINVAL; } else { -- cgit v0.12 From f8cf7d1c32e40ccd4a7f2e27de0a51b5196aa00b Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 26 Jan 2009 22:57:48 +0000 Subject: Fix [Bug 2446662]: resync Win behavior on RST with that of unix (EOF). --- ChangeLog | 5 +++++ win/tclWinSock.c | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 22488c2..77bcb0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-26 Alexandre Ferrieux + + * win/tclWinSocl.c: Fix [Bug 2446662]: resync Win behavior on RST + with that of unix (EOF). + 2009-01-26 Donal K. Fellows * generic/tclZlib.c (ChanClose): Only generate error messages in the diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 9f5b9bc..d99ee2d 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.64 2008/12/18 01:14:17 ferrieux Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.65 2009/01/26 22:57:57 ferrieux Exp $ */ #include "tclWinInt.h" @@ -1627,11 +1627,23 @@ TcpInputProc( break; } + error = WSAGetLastError(); + + /* + * If an RST comes, then ignore the error and report an EOF just like + * on unix. + */ + + if (error == WSAECONNRESET) { + infoPtr->flags |= SOCKET_EOF; + bytesRead = 0; + break; + } + /* * Check for error condition or underflow in non-blocking case. */ - error = WSAGetLastError(); if ((infoPtr->flags & SOCKET_ASYNC) || (error != WSAEWOULDBLOCK)) { TclWinConvertWSAError(error); *errorCodePtr = Tcl_GetErrno(); -- cgit v0.12 From 038ad9c8c8c8a7c63a58858d7693942420d5babd Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 27 Jan 2009 00:01:42 +0000 Subject: Fix [Bug 1028264]: WSACleanup() too early. The fix introduces "late exit handlers" for similar late process-wide cleanups. --- ChangeLog | 6 ++++ generic/tclEvent.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++-- generic/tclInt.h | 6 +++- win/tclWinSock.c | 4 +-- 4 files changed, 115 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 77bcb0a..2c4ede0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-01-26 Alexandre Ferrieux + * generic/tclInt.h: Fix [Bug 1028264]: WSACleanup() too early. + * generic/tclEvent.c: The fix introduces "late exit handlers" + * win/tclWinSock.c: for similar late process-wide cleanups. + +2009-01-26 Alexandre Ferrieux + * win/tclWinSocl.c: Fix [Bug 2446662]: resync Win behavior on RST with that of unix (EOF). diff --git a/generic/tclEvent.c b/generic/tclEvent.c index cbb0aad..40e1fe6 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.86 2008/12/09 20:16:29 dgp Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.87 2009/01/27 00:01:45 ferrieux Exp $ */ #include "tclInt.h" @@ -51,7 +51,7 @@ typedef struct ErrAssocData { } ErrAssocData; /* - * For each exit handler created with a call to Tcl_CreateExitHandler there is + * For each exit handler created with a call to Tcl_Create(Late)ExitHandler there is * a structure of the following type: */ @@ -70,6 +70,9 @@ typedef struct ExitHandler { static ExitHandler *firstExitPtr = NULL; /* First in list of all exit handlers for * application. */ +static ExitHandler *firstLateExitPtr = NULL; + /* First in list of all late exit handlers for + * application. */ TCL_DECLARE_MUTEX(exitMutex) /* @@ -633,6 +636,39 @@ Tcl_CreateExitHandler( /* *---------------------------------------------------------------------- * + * TclCreateLateExitHandler -- + * + * Arrange for a given function to be invoked after all pre-thread cleanups + * + * Results: + * None. + * + * Side effects: + * Proc will be invoked with clientData as argument when the application + * exits. + * + *---------------------------------------------------------------------- + */ + +void +TclCreateLateExitHandler( + Tcl_ExitProc *proc, /* Function to invoke. */ + ClientData clientData) /* Arbitrary value to pass to proc. */ +{ + ExitHandler *exitPtr; + + exitPtr = (ExitHandler *) ckalloc(sizeof(ExitHandler)); + exitPtr->proc = proc; + exitPtr->clientData = clientData; + Tcl_MutexLock(&exitMutex); + exitPtr->nextPtr = firstLateExitPtr; + firstLateExitPtr = exitPtr; + Tcl_MutexUnlock(&exitMutex); +} + +/* + *---------------------------------------------------------------------- + * * Tcl_DeleteExitHandler -- * * This function cancels an existing exit handler matching proc and @@ -676,6 +712,49 @@ Tcl_DeleteExitHandler( /* *---------------------------------------------------------------------- * + * TclDeleteLateExitHandler -- + * + * This function cancels an existing late exit handler matching proc and + * clientData, if such a handler exits. + * + * Results: + * None. + * + * Side effects: + * If there is a late exit handler corresponding to proc and clientData then + * it is canceled; if no such handler exists then nothing happens. + * + *---------------------------------------------------------------------- + */ + +void +TclDeleteLateExitHandler( + Tcl_ExitProc *proc, /* Function that was previously registered. */ + ClientData clientData) /* Arbitrary value to pass to proc. */ +{ + ExitHandler *exitPtr, *prevPtr; + + Tcl_MutexLock(&exitMutex); + for (prevPtr = NULL, exitPtr = firstLateExitPtr; exitPtr != NULL; + prevPtr = exitPtr, exitPtr = exitPtr->nextPtr) { + if ((exitPtr->proc == proc) + && (exitPtr->clientData == clientData)) { + if (prevPtr == NULL) { + firstLateExitPtr = exitPtr->nextPtr; + } else { + prevPtr->nextPtr = exitPtr->nextPtr; + } + ckfree((char *) exitPtr); + break; + } + } + Tcl_MutexUnlock(&exitMutex); + return; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_CreateThreadExitHandler -- * * Arrange for a given function to be invoked just before the current @@ -977,6 +1056,27 @@ Tcl_Finalize(void) Tcl_FinalizeThread(); /* + * Now invoke late (process-wide) exit handlers. + */ + + Tcl_MutexLock(&exitMutex); + for (exitPtr = firstLateExitPtr; exitPtr != NULL; exitPtr = firstLateExitPtr) { + /* + * Be careful to remove the handler from the list before invoking its + * callback. This protects us against double-freeing if the callback + * should call Tcl_DeleteLateExitHandler on itself. + */ + + firstLateExitPtr = exitPtr->nextPtr; + Tcl_MutexUnlock(&exitMutex); + exitPtr->proc(exitPtr->clientData); + ckfree((char *) exitPtr); + Tcl_MutexLock(&exitMutex); + } + firstLateExitPtr = NULL; + Tcl_MutexUnlock(&exitMutex); + + /* * Now finalize the Tcl execution environment. Note that this must be done * after the exit handlers, because there are order dependencies. */ diff --git a/generic/tclInt.h b/generic/tclInt.h index b633e12..ae1d45a 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.414 2009/01/22 06:42:33 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.415 2009/01/27 00:01:49 ferrieux Exp $ */ #ifndef _TCLINT @@ -2640,6 +2640,10 @@ MODULE_SCOPE int TclFileMakeDirsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int TclFileRenameCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE void TclCreateLateExitHandler (Tcl_ExitProc * proc, + ClientData clientData); +MODULE_SCOPE void TclDeleteLateExitHandler (Tcl_ExitProc * proc, + ClientData clientData); MODULE_SCOPE void TclFinalizeAllocSubsystem(void); MODULE_SCOPE void TclFinalizeAsync(void); MODULE_SCOPE void TclFinalizeDoubleConversion(void); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index d99ee2d..b03bf48 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.65 2009/01/26 22:57:57 ferrieux Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.66 2009/01/27 00:02:08 ferrieux Exp $ */ #include "tclWinInt.h" @@ -232,7 +232,7 @@ InitSockets(void) if (!initialized) { initialized = 1; - Tcl_CreateExitHandler(SocketExitHandler, (ClientData) NULL); + TclCreateLateExitHandler(SocketExitHandler, (ClientData) NULL); /* * Create the async notification window with a new class. We must -- cgit v0.12 From 960bd1422f5ba24fa513f9738934538ab3140c73 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 27 Jan 2009 11:11:44 +0000 Subject: Fix [Bug 2531577] --- ChangeLog | 20 +++++++++++++------- generic/tclOODefineCmds.c | 16 +++++++++++++++- tests/oo.test | 23 ++++++++++++++++++++++- 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c4ede0..806b7ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,16 @@ -2009-01-26 Alexandre Ferrieux +2009-01-27 Donal K. Fellows + + * generic/tclOODefineCmds.c (Tcl_ClassSetConstructor): + [Bug 2531577]: Ensure that caches of constructor chains are cleared + when the constructor is changed. + +2009-01-26 Alexandre Ferrieux * generic/tclInt.h: Fix [Bug 1028264]: WSACleanup() too early. * generic/tclEvent.c: The fix introduces "late exit handlers" * win/tclWinSock.c: for similar late process-wide cleanups. -2009-01-26 Alexandre Ferrieux +2009-01-26 Alexandre Ferrieux * win/tclWinSocl.c: Fix [Bug 2446662]: resync Win behavior on RST with that of unix (EOF). @@ -20,15 +26,15 @@ 2009-01-22 Jan Nijtmans - * generic/tclCompile.h: CONSTify TclPrintInstruction (TIP #27) + * generic/tclCompile.h: CONSTify TclPrintInstruction (TIP #27) * generic/tclCompile.c - * generic/tclInt.h: CONSTify TclpNativeJoinPath (TIP #27) + * generic/tclInt.h: CONSTify TclpNativeJoinPath (TIP #27) * generic/tclFileName.c - * generic/tcl.decls {unix win} is equivalent to {generic} + * generic/tcl.decls: {unix win} is equivalent to {generic} * generic/tclInt.decls - * generic/tclDecls.h (regenerated) + * generic/tclDecls.h: (regenerated) * generic/tclIntDecls.h - * generic/tclGetDate.y: Single internal const decoration. + * generic/tclGetDate.y: Single internal const decoration. * generic/tclDate.c: 2009-01-22 Kevin B. Kenny diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 5b1f354..ac65ee4 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.8 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.9 2009/01/27 11:11:47 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1933,6 +1933,16 @@ Tcl_ClassSetConstructor( if (method != (Tcl_Method) clsPtr->constructorPtr) { TclOODelMethodRef(clsPtr->constructorPtr); clsPtr->constructorPtr = (Method *) method; + + /* + * Remember to invalidate the cached constructor chain for this class. + * [Bug 2531577] + */ + + if (clsPtr->constructorChainPtr) { + TclOODeleteChain(clsPtr->constructorChainPtr); + clsPtr->constructorChainPtr = NULL; + } BumpGlobalEpoch(interp, clsPtr); } } @@ -1948,6 +1958,10 @@ Tcl_ClassSetDestructor( if (method != (Tcl_Method) clsPtr->destructorPtr) { TclOODelMethodRef(clsPtr->destructorPtr); clsPtr->destructorPtr = (Method *) method; + if (clsPtr->destructorChainPtr) { + TclOODeleteChain(clsPtr->destructorChainPtr); + clsPtr->destructorChainPtr = NULL; + } BumpGlobalEpoch(interp, clsPtr); } } diff --git a/tests/oo.test b/tests/oo.test index b7029ea..5db928e 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.20 2009/01/07 11:58:08 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.21 2009/01/27 11:11:47 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -245,6 +245,27 @@ test oo-2.2 {basic test of OO functionality: constructor} { testClass destroy return $result } {::foo->construct ::foo->bar} +test oo-2.4 {OO constructor - Bug 2531577} -setup { + oo::class create foo +} -body { + oo::define foo constructor {} return + [foo new] destroy + oo::define foo constructor {} {} + llength [info command [foo new]] +} -cleanup { + foo destroy +} -result 1 +test oo-2.5 {OO constructor - Bug 2531577} -setup { + oo::class create foo + set result {} +} -body { + oo::define foo constructor {} {error x} + lappend result [catch {foo new}] + oo::define foo constructor {} {} + lappend result [llength [info command [foo new]]] +} -cleanup { + foo destroy +} -result {1 1} test oo-3.1 {basic test of OO functionality: destructor} -setup { # This is a bit complex because it needs to run in a sub-interp as -- cgit v0.12 From 8b6830d61d7629ebf10cec3f12fe6c0c97ef8ea2 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 28 Jan 2009 16:28:32 +0000 Subject: Apply resolution for [Bug 2529157]. Fix another location in tclBasic.c where only the objProc case was handled and not the nreProc case. --- ChangeLog | 13 +++++++- generic/tclBasic.c | 84 +++++++++++++++++++++++++++------------------------- generic/tclDictObj.c | 18 ++--------- generic/tclNamesp.c | 20 ++++++------- 4 files changed, 69 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 806b7ba..38ac7af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-01-28 Donal K. Fellows + + * generic/tclBasic.c (TclInvokeObjectCommand): Made this understand + what to do if it ends up being used on a command with no objProc; that + shouldn't happen, but... + + * generic/tclNamesp.c (TclMakeEnsemble): [Bug 2529157]: Made this + understand NRE command implementations better. + * generic/tclDictObj.c (DictForCmd): Eliminate unnecessary command + implementation. + 2009-01-27 Donal K. Fellows * generic/tclOODefineCmds.c (Tcl_ClassSetConstructor): @@ -12,7 +23,7 @@ 2009-01-26 Alexandre Ferrieux - * win/tclWinSocl.c: Fix [Bug 2446662]: resync Win behavior on RST + * win/tclWinSock.c: Fix [Bug 2446662]: resync Win behavior on RST with that of unix (EOF). 2009-01-26 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index e9aa6e1..0cd1196 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.383 2009/01/14 06:10:04 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.384 2009/01/28 16:28:32 dkf Exp $ */ #include "tclInt.h" @@ -373,12 +373,12 @@ static const OpCmdInfo mathOpCmds[] = { */ typedef struct { - Tcl_Interp *interp; /* Interp this struct belongs to */ + Tcl_Interp *interp; /* Interp this struct belongs to. */ Tcl_AsyncHandler async; /* Async handler token for script - * cancellation */ - char *result; /* The script cancellation result or - * NULL for a default result */ - int length; /* Length of the above error message */ + * cancellation. */ + char *result; /* The script cancellation result or NULL for + * a default result. */ + int length; /* Length of the above error message. */ ClientData clientData; /* Ignored */ int flags; /* Additional flags */ } CancelInfo; @@ -501,8 +501,8 @@ Tcl_CreateInterp(void) iPtr->varFramePtr = NULL; /* Initialise as soon as :: is available */ /* - * TIP #280 - Initialize the arrays used to extend the ByteCode and - * Proc structures. + * TIP #280 - Initialize the arrays used to extend the ByteCode and Proc + * structures. */ iPtr->cmdFramePtr = NULL; @@ -784,13 +784,11 @@ Tcl_CreateInterp(void) * Create the 'tailcall' command an unsupported command for 'atProcExit' */ - Tcl_NRCreateCommand(interp, "tailcall", - /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_TAILCALL_TYPE), - NULL); + Tcl_NRCreateCommand(interp, "tailcall", NULL, TclNRAtProcExitObjCmd, + INT2PTR(TCL_NR_TAILCALL_TYPE), NULL); - Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit", - /*objProc*/ NULL, TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE), - NULL); + Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit", NULL, + TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE), NULL); #ifdef USE_DTRACE /* @@ -1555,9 +1553,9 @@ DeleteInterpProc( /* * Location stack for uplevel/eval/... scripts which were passed - * through proc arguments. Actually we track all arguments as we - * don't, cannot know which arguments will be used as scripts and - * which won't. + * through proc arguments. Actually we track all arguments as we do + * not and cannot know which arguments will be used as scripts and + * which will not. */ if (iPtr->lineLAPtr->numEntries) { @@ -2008,7 +2006,7 @@ Tcl_CreateCommand( * stuck in an infinite loop). */ - ckfree(Tcl_GetHashValue(hPtr)); + ckfree(Tcl_GetHashValue(hPtr)); } } else { /* @@ -2329,7 +2327,12 @@ TclInvokeObjectCommand( * Invoke the command's object-based Tcl_ObjCmdProc. */ - result = cmdPtr->objProc(cmdPtr->objClientData, interp, argc, objv); + if (cmdPtr->objProc != NULL) { + result = cmdPtr->objProc(cmdPtr->objClientData, interp, argc, objv); + } else { + result = Tcl_NRCallObjProc(interp, cmdPtr->nreProc, + cmdPtr->objClientData, argc, objv); + } /* * Move the interpreter's object result to the string result, then reset @@ -2603,7 +2606,7 @@ Tcl_SetCommandInfoFromToken( { Command *cmdPtr; /* Internal representation of the command */ - if (cmd == (Tcl_Command) NULL) { + if (cmd == NULL) { return 0; } @@ -2687,7 +2690,7 @@ Tcl_GetCommandInfoFromToken( { Command *cmdPtr; /* Internal representation of the command */ - if (cmd == (Tcl_Command) NULL) { + if (cmd == NULL) { return 0; } @@ -2832,7 +2835,7 @@ Tcl_DeleteCommand( */ cmd = Tcl_FindCommand(interp, cmdName, NULL, /*flags*/ 0); - if (cmd == (Tcl_Command) NULL) { + if (cmd == NULL) { return -1; } return Tcl_DeleteCommandFromToken(interp, cmd); @@ -3859,11 +3862,11 @@ Tcl_Canceled( } else { /* * FIXME: If this interpreter is being deleted we cannot continue - * to traverse up the interp chain due to an issue with - * Tcl_GetMaster (really the slave interp bookkeeping) that - * causes us to run off into a freed interp struct. Ideally, this - * check would not be necessary because Tcl_GetMaster would - * return NULL instead of a pointer to invalid (freed) memory. + * to traverse up the interp chain due to an issue with + * Tcl_GetMaster (really the slave interp bookkeeping) that causes + * us to run off into a freed interp struct. Ideally, this check + * would not be necessary because Tcl_GetMaster would return NULL + * instead of a pointer to invalid (freed) memory. */ if (iPtr->flags & DELETED) { @@ -4312,8 +4315,9 @@ NRCallTEBC( { /* * This is not run normally, the callback is passed up to tebc. This - function is only called when no tebc is above. + * function is only called when no tebc is above. */ + int type = PTR2INT(data[0]); Interp *iPtr = ((Interp *) interp); @@ -4465,7 +4469,7 @@ TEOV_Error( /* * If there was an error, a command string will be needed for the * error log: get it out of the itemPtr. The details depend on the - * type + * type. */ listPtr = Tcl_NewListObj(objc, objv); @@ -5346,10 +5350,10 @@ TclArgumentEnter( * * TclArgumentRelease -- * - * This procedure is a helper for the TIP #280 uplevel extension. - * It removes the location references for the arguments of a command - * just done. Usage is counted down, the data is removed only when - * no user is left over. + * This procedure is a helper for the TIP #280 uplevel extension. It + * removes the location references for the arguments of a command just + * done. Usage is counted down, the data is removed only when no user is + * left over. * * Results: * None. @@ -5378,7 +5382,7 @@ TclArgumentRelease( if (!hPtr) { continue; } - cfwPtr = (CFWord *) Tcl_GetHashValue(hPtr); + cfwPtr = Tcl_GetHashValue(hPtr); cfwPtr->refCount--; if (cfwPtr->refCount > 0) { @@ -5518,8 +5522,8 @@ TclArgumentBCRelease( * * TclArgumentGet -- * - * This procedure is a helper for the TIP #280 uplevel extension. - * It find the location references for a Tcl_Obj, if any. + * This procedure is a helper for the TIP #280 uplevel extension. It + * finds the location references for a Tcl_Obj, if any. * * Results: * None. @@ -5550,7 +5554,7 @@ TclArgumentGet( */ if ((!obj->bytes) || ((obj->typePtr == &tclListType) && - ((List *)obj->internalRep.twoPtrValue.ptr1)->canonicalFlag)) { + ((List *) obj->internalRep.twoPtrValue.ptr1)->canonicalFlag)) { return; } @@ -8280,9 +8284,9 @@ NRCoroutineCallerCallback( if (cmdPtr->flags & CMD_IS_DELETED) { /* - * The command was deleted while it was running: wind down the execEnv, - * this will do the complete cleanup. RewindCoroutine will restore both - * the caller's context and interp state. + * The command was deleted while it was running: wind down the + * execEnv, this will do the complete cleanup. RewindCoroutine will + * restore both the caller's context and interp state. */ return RewindCoroutine(corPtr, result); diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 5c4295e..c800441 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.75 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.76 2009/01/28 16:28:32 dkf Exp $ */ #include "tclInt.h" @@ -33,8 +33,6 @@ static int DictExistsCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); static int DictFilterCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); -static int DictForCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const *objv); static int DictGetCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); static int DictIncrCmd(ClientData dummy, Tcl_Interp *interp, @@ -93,7 +91,7 @@ static const EnsembleImplMap implementationMap[] = { {"create", DictCreateCmd }, {"exists", DictExistsCmd }, {"filter", DictFilterCmd }, - {"for", DictForCmd, TclCompileDictForCmd, DictForNRCmd }, + {"for", NULL, TclCompileDictForCmd, DictForNRCmd }, {"get", DictGetCmd, TclCompileDictGetCmd }, {"incr", DictIncrCmd, TclCompileDictIncrCmd }, {"info", DictInfoCmd }, @@ -2368,7 +2366,7 @@ DictAppendCmd( /* *---------------------------------------------------------------------- * - * DictForCmd -- + * DictForNRCmd -- * * This function implements the "dict for" Tcl command. See the user * documentation for details on what it does, and TIP#111 for the formal @@ -2384,16 +2382,6 @@ DictAppendCmd( */ static int -DictForCmd( - ClientData dummy, - Tcl_Interp *interp, - int objc, - Tcl_Obj *const *objv) -{ - return Tcl_NRCallObjProc(interp, DictForNRCmd, dummy, objc, objv); -} - -static int DictForNRCmd( ClientData dummy, Tcl_Interp *interp, diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 79b7d48..a122164 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.185 2009/01/09 15:00:27 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.186 2009/01/28 16:28:32 dkf Exp $ */ #include "tclInt.h" @@ -6179,11 +6179,11 @@ TclMakeEnsemble( Tcl_DStringAppend(&buf, nameParts[i], -1); } - ns = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), - NULL, TCL_CREATE_NS_IF_UNKNOWN); + ns = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), NULL, + TCL_CREATE_NS_IF_UNKNOWN); if (!ns) { Tcl_Panic("unable to find or create %s namespace!", - Tcl_DStringValue(&buf)); + Tcl_DStringValue(&buf)); } /* @@ -6217,14 +6217,14 @@ TclMakeEnsemble( Tcl_DStringLength(&buf)); Tcl_AppendToObj(toObj, map[i].name, -1); Tcl_DictObjPut(NULL, mapDict, fromObj, toObj); - if (map[i].proc) { - cmdPtr = (Command *)Tcl_CreateObjCommand(interp, - TclGetString(toObj), map[i].proc, - map[i].clientData, NULL); + if (map[i].proc || map[i].nreProc) { + cmdPtr = (Command *) + Tcl_NRCreateCommand(interp, TclGetString(toObj), + map[i].proc, map[i].nreProc, map[i].clientData, NULL); cmdPtr->compileProc = map[i].compileProc; - cmdPtr->nreProc = map[i].nreProc; - if (map[i].compileProc != NULL) + if (map[i].compileProc != NULL) { ensembleFlags |= ENSEMBLE_COMPILE; + } } } Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict); -- cgit v0.12 From c9a954906d56f11f9fef33cff16fed13bf7b6151 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Jan 2009 11:28:49 +0000 Subject: Fix [Bug 2529117] --- ChangeLog | 6 ++++++ generic/tclNamesp.c | 61 +++++++++++++++++++++++++++++++++++------------------ 2 files changed, 46 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38ac7af..d230110 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-29 Donal K. Fellows + + * generic/tclNamesp.c (TclMakeEnsemble): [Bug 2529117]: Make this + function behave more sensibly when presented with a fully-qualified + name, rather than doing strange stuff. + 2009-01-28 Donal K. Fellows * generic/tclBasic.c (TclInvokeObjectCommand): Made this understand diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index a122164..63c3d1f 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.186 2009/01/28 16:28:32 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.187 2009/01/29 11:28:49 dkf Exp $ */ #include "tclInt.h" @@ -6159,24 +6159,39 @@ TclMakeEnsemble( Tcl_Command ensemble; Tcl_Namespace *ns; Tcl_DString buf; - const char **nameParts; - const char *cmdname; + const char **nameParts = NULL; + const char *cmdName = NULL; int i, nameCount = 0, ensembleFlags = 0; /* - * Construct the path for the ensemble namespace and create it + * Construct the path for the ensemble namespace and create it. */ Tcl_DStringInit(&buf); - Tcl_DStringAppend(&buf, "::tcl", -1); + if (name[0] == ':' && name[1] == ':') { + /* + * An absolute name, so use it directly. + */ - if (Tcl_SplitList(NULL, name, &nameCount, &nameParts) != TCL_OK) { - Tcl_Panic("invalid ensemble name '%s'", name); - } + cmdName = name; + Tcl_DStringAppend(&buf, name, -1); + ensembleFlags = TCL_ENSEMBLE_PREFIX; + } else { + /* + * Not an absolute name, so do munging of it. Note that this treats a + * multi-word list differently to a single word. + */ - for (i = 0; i < nameCount; ++i) { - Tcl_DStringAppend(&buf, "::", 2); - Tcl_DStringAppend(&buf, nameParts[i], -1); + Tcl_DStringAppend(&buf, "::tcl", -1); + + if (Tcl_SplitList(NULL, name, &nameCount, &nameParts) != TCL_OK) { + Tcl_Panic("invalid ensemble name '%s'", name); + } + + for (i = 0; i < nameCount; ++i) { + Tcl_DStringAppend(&buf, "::", 2); + Tcl_DStringAppend(&buf, nameParts[i], -1); + } } ns = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), NULL, @@ -6190,17 +6205,19 @@ TclMakeEnsemble( * Create the named ensemble in the correct namespace */ - if (nameCount == 1) { - ensembleFlags = TCL_ENSEMBLE_PREFIX; - cmdname = Tcl_DStringValue(&buf) + 5; - } else { - ns = ns->parentPtr; - cmdname = nameParts[nameCount - 1]; + if (cmdName == NULL) { + if (nameCount == 1) { + ensembleFlags = TCL_ENSEMBLE_PREFIX; + cmdName = Tcl_DStringValue(&buf) + 5; + } else { + ns = ns->parentPtr; + cmdName = nameParts[nameCount - 1]; + } } - ensemble = Tcl_CreateEnsemble(interp, cmdname, ns, ensembleFlags); + ensemble = Tcl_CreateEnsemble(interp, cmdName, ns, ensembleFlags); /* - * Create the ensemble mapping dictionary and the ensemble command procs + * Create the ensemble mapping dictionary and the ensemble command procs. */ if (ensemble != NULL) { @@ -6214,7 +6231,7 @@ TclMakeEnsemble( fromObj = Tcl_NewStringObj(map[i].name, -1); TclNewStringObj(toObj, Tcl_DStringValue(&buf), - Tcl_DStringLength(&buf)); + Tcl_DStringLength(&buf)); Tcl_AppendToObj(toObj, map[i].name, -1); Tcl_DictObjPut(NULL, mapDict, fromObj, toObj); if (map[i].proc || map[i].nreProc) { @@ -6234,7 +6251,9 @@ TclMakeEnsemble( } Tcl_DStringFree(&buf); - Tcl_Free((char *)nameParts); + if (nameParts != NULL) { + Tcl_Free((char *) nameParts); + } return ensemble; } -- cgit v0.12 From 3b86ebefcc042ab38755eb162fc0a07b68d5f20e Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 29 Jan 2009 14:45:13 +0000 Subject: * generic/tclInterp.c: Convert the [interp] command into a [namespace ensemble]. Work in progress to NRE-enable the [interp invokehidden] subcommand. --- ChangeLog | 6 + generic/tclInterp.c | 1435 ++++++++++++++++++++++++++++++++++----------------- 2 files changed, 981 insertions(+), 460 deletions(-) diff --git a/ChangeLog b/ChangeLog index d230110..59854fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-29 Don Porter + + * generic/tclInterp.c: Convert the [interp] command into a + [namespace ensemble]. Work in progress to NRE-enable the + [interp invokehidden] subcommand. + 2009-01-29 Donal K. Fellows * generic/tclNamesp.c (TclMakeEnsemble): [Bug 2529117]: Make this diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 0abbbde..7c1b5ba 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.100 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.101 2009/01/29 14:45:13 dgp Exp $ */ #include "tclInt.h" @@ -247,6 +247,62 @@ static void DeleteScriptLimitCallback(ClientData clientData); static void RunLimitHandlers(LimitHandler *handlerPtr, Tcl_Interp *interp); static void TimeLimitCallback(ClientData clientData); + +/* + * Table of interp subcommand names and implementations. + */ + +static Tcl_ObjCmdProc InterpAliasCmd; +static Tcl_ObjCmdProc InterpAliasesCmd; +static Tcl_ObjCmdProc InterpBgErrorCmd; +static Tcl_ObjCmdProc InterpCancelCmd; +static Tcl_ObjCmdProc InterpCreateCmd; +static Tcl_ObjCmdProc InterpDeleteCmd; +static Tcl_ObjCmdProc InterpEvalCmd; +static Tcl_ObjCmdProc InterpExistsCmd; +static Tcl_ObjCmdProc InterpExposeCmd; +static Tcl_ObjCmdProc InterpHiddenCmd; +static Tcl_ObjCmdProc InterpHideCmd; +static Tcl_ObjCmdProc InterpInvokeHiddenCmd; +static Tcl_ObjCmdProc InterpIsSafeCmd; +static Tcl_ObjCmdProc InterpLimitCmd; +static Tcl_ObjCmdProc InterpMarkTrustedCmd; +static Tcl_ObjCmdProc InterpRecursionLimitCmd; +static Tcl_ObjCmdProc InterpShareCmd; +static Tcl_ObjCmdProc InterpSlavesCmd; +static Tcl_ObjCmdProc InterpTargetCmd; +static Tcl_ObjCmdProc InterpTransferCmd; + +static int InterpShareTransferCommon(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[], int transfer); +/* +static Tcl_ObjCmdProc InterpNREvalCmd; +static Tcl_ObjCmdProc InterpNRInvokeHiddenCmd; +*/ +static const EnsembleImplMap implementationMap[] = { + {"alias", InterpAliasCmd }, + {"aliases", InterpAliasesCmd }, + {"bgerror", InterpBgErrorCmd }, + {"cancel", InterpCancelCmd }, + {"create", InterpCreateCmd }, + {"delete", InterpDeleteCmd }, + {"eval", InterpEvalCmd, NULL, /*InterpNREvalCmd*/ }, + {"exists", InterpExistsCmd }, + {"expose", InterpExposeCmd }, + {"hidden", InterpHiddenCmd }, + {"hide", InterpHideCmd }, + {"invokehidden", InterpInvokeHiddenCmd, NULL, /*InterpNRInvokeHiddenCmd*/ }, + {"issafe", InterpIsSafeCmd }, + {"limit", InterpLimitCmd }, + {"marktrusted", InterpMarkTrustedCmd }, + {"recursionlimit", InterpRecursionLimitCmd }, + {"share", InterpShareCmd }, + {"slaves", InterpSlavesCmd }, + {"target", InterpTargetCmd }, + {"transfer", InterpTransferCmd }, + {NULL} +}; + /* *---------------------------------------------------------------------- @@ -449,7 +505,7 @@ TclInterpInit( slavePtr->interpCmd = NULL; Tcl_InitHashTable(&slavePtr->aliasTable, TCL_STRING_KEYS); - Tcl_CreateObjCommand(interp, "interp", Tcl_InterpObjCmd, NULL, NULL); + TclMakeEnsemble(interp, "interp", implementationMap); Tcl_CallWhenDeleted(interp, InterpInfoDeleteProc, NULL); return TCL_OK; @@ -537,10 +593,10 @@ InterpInfoDeleteProc( /* *---------------------------------------------------------------------- * - * Tcl_InterpObjCmd -- + * InterpAliasCmd-- * - * This function is invoked to process the "interp" Tcl command. See the - * user documentation for details on what it does. + * Implements the "interp alias" Tcl command. + * See the user documentation for details on what it does. * * Results: * A standard Tcl result. @@ -551,530 +607,989 @@ InterpInfoDeleteProc( *---------------------------------------------------------------------- */ /* ARGSUSED */ -int -Tcl_InterpObjCmd( +static int +InterpAliasCmd( ClientData clientData, /* Unused. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ + { - int index; - static const char *const options[] = { - "alias", "aliases", "bgerror", "cancel", - "create", "delete", "eval", "exists", - "expose", "hide", "hidden", "issafe", - "invokehidden", "limit", "marktrusted", "recursionlimit", - "slaves", "share", "target", "transfer", - NULL - }; - enum option { - OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_CANCEL, - OPT_CREATE, OPT_DELETE, OPT_EVAL, OPT_EXISTS, - OPT_EXPOSE, OPT_HIDE, OPT_HIDDEN, OPT_ISSAFE, - OPT_INVOKEHID, OPT_LIMIT, OPT_MARKTRUSTED,OPT_RECLIMIT, - OPT_SLAVES, OPT_SHARE, OPT_TARGET, OPT_TRANSFER - }; + Tcl_Interp *slaveInterp; - if (objc < 2) { - Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?"); + if (objc < 3) { + aliasArgs: + Tcl_WrongNumArgs(interp, 1, objv, + "slavePath slaveCmd ?masterPath masterCmd? ?arg ...?"); return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, - &index) != TCL_OK) { + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { return TCL_ERROR; } - switch ((enum option) index) { - case OPT_ALIAS: { - Tcl_Interp *slaveInterp, *masterInterp; - - if (objc < 4) { - aliasArgs: - Tcl_WrongNumArgs(interp, 2, objv, - "slavePath slaveCmd ?masterPath masterCmd? ?arg ...?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { + if (objc == 3) { + return AliasDescribe(interp, slaveInterp, objv[2]); + } + if ((objc == 4) && (TclGetString(objv[3])[0] == '\0')) { + return AliasDelete(interp, slaveInterp, objv[2]); + } + if (objc > 4) { + Tcl_Interp *masterInterp = GetInterp(interp, objv[3]); + if (masterInterp == NULL) { return TCL_ERROR; } - if (objc == 4) { - return AliasDescribe(interp, slaveInterp, objv[3]); - } - if ((objc == 5) && (TclGetString(objv[4])[0] == '\0')) { - return AliasDelete(interp, slaveInterp, objv[3]); - } - if (objc > 5) { - masterInterp = GetInterp(interp, objv[4]); - if (masterInterp == NULL) { - return TCL_ERROR; - } - if (TclGetString(objv[5])[0] == '\0') { - if (objc == 6) { - return AliasDelete(interp, slaveInterp, objv[3]); - } - } else { - return AliasCreate(interp, slaveInterp, masterInterp, objv[3], - objv[5], objc - 6, objv + 6); + if (TclGetString(objv[4])[0] == '\0') { + if (objc == 5) { + return AliasDelete(interp, slaveInterp, objv[2]); } + goto aliasArgs; + } else { + return AliasCreate(interp, slaveInterp, masterInterp, objv[2], + objv[4], objc - 5, objv + 5); } - goto aliasArgs; } - case OPT_ALIASES: { - Tcl_Interp *slaveInterp; + /* NOTREACHED */ + return TCL_ERROR; +} + +/* + *---------------------------------------------------------------------- + * + * InterpAliasesCmd-- + * + * Implements the "interp aliases" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpAliasesCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ - slaveInterp = GetInterp2(interp, objc, objv); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return AliasList(interp, slaveInterp); - } - case OPT_BGERROR: { - Tcl_Interp *slaveInterp; +{ + Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); - if (objc != 3 && objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "path ?cmdPrefix?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveBgerror(interp, slaveInterp, objc - 3, objv + 3); - } - case OPT_CANCEL: { - int i, flags; - Tcl_Interp *slaveInterp; - Tcl_Obj *resultObjPtr; - static const char *const options[] = { - "-unwind", "--", NULL - }; - enum option { - OPT_UNWIND, OPT_LAST - }; + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return AliasList(interp, slaveInterp); +} + +/* + *---------------------------------------------------------------------- + * + * InterpBgErrorCmd-- + * + * Implements the "interp bgerror" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpBgErrorCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; - if (objc > 6) { - Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); - return TCL_ERROR; - } + if (objc != 2 && objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "path ?cmdPrefix?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveBgerror(interp, slaveInterp, objc - 2, objv + 2); +} + +/* + *---------------------------------------------------------------------- + * + * InterpCancelCmd-- + * + * Implements the "interp cancel" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpCancelCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int i, flags, index; + Tcl_Interp *slaveInterp; + Tcl_Obj *resultObjPtr; + static const char *const options[] = { + "-unwind", "--", NULL + }; + enum option { + OPT_UNWIND, OPT_LAST + }; - flags = 0; + if (objc > 5) { + Tcl_WrongNumArgs(interp, 1, objv, "?-unwind? ?--? ?path? ?result?"); + return TCL_ERROR; + } - for (i = 2; i < objc; i++) { - if (TclGetString(objv[i])[0] != '-') { - break; - } - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, - &index) != TCL_OK) { - return TCL_ERROR; - } + flags = 0; - switch ((enum option) index) { - case OPT_UNWIND: - /* - * The evaluation stack in the target interp is to be - * unwound. - */ - flags |= TCL_CANCEL_UNWIND; - break; - case OPT_LAST: - i++; - goto endOfForLoop; - } + for (i = 1; i < objc; i++) { + if (TclGetString(objv[i])[0] != '-') { + break; + } + if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, &index) + != TCL_OK) { + return TCL_ERROR; } - endOfForLoop: - - /* - * Did they specify a slave interp to cancel the script in - * progress in? If not, use the current interp. - */ - - if (i < objc) { - slaveInterp = GetInterp(interp, objv[i]); + switch ((enum option) index) { + case OPT_UNWIND: + /* + * The evaluation stack in the target interp is to be + * unwound. + */ + flags |= TCL_CANCEL_UNWIND; + break; + case OPT_LAST: i++; - } else { - slaveInterp = interp; + goto endOfForLoop; } + } - if (slaveInterp != NULL) { - if (i < objc) { - resultObjPtr = objv[i]; - Tcl_IncrRefCount(resultObjPtr); /* Tcl_CancelEval removes this ref. */ - i++; - } else { - resultObjPtr = NULL; - } + endOfForLoop: - return Tcl_CancelEval(slaveInterp, resultObjPtr, 0, flags); - } else { + /* + * Did they specify a slave interp to cancel the script in + * progress in? If not, use the current interp. + */ + + if (i < objc) { + slaveInterp = GetInterp(interp, objv[i]); + if (slaveInterp == NULL) { return TCL_ERROR; } + i++; + } else { + slaveInterp = interp; } - case OPT_CREATE: { - int i, last, safe; - Tcl_Obj *slavePtr; - char buf[16 + TCL_INTEGER_SPACE]; - static const char *const options[] = { - "-safe", "--", NULL - }; - enum option { - OPT_SAFE, OPT_LAST - }; - - safe = Tcl_IsSafe(interp); - /* - * Weird historical rules: "-safe" is accepted at the end, too. - */ + if (i < objc) { + resultObjPtr = objv[i]; + Tcl_IncrRefCount(resultObjPtr); /* Tcl_CancelEval removes this ref. */ + } else { + resultObjPtr = NULL; + } - slavePtr = NULL; - last = 0; - for (i = 2; i < objc; i++) { - if ((last == 0) && (Tcl_GetString(objv[i])[0] == '-')) { - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, - &index) != TCL_OK) { - return TCL_ERROR; - } - if (index == OPT_SAFE) { - safe = 1; - continue; - } - i++; - last = 1; - } - if (slavePtr != NULL) { - Tcl_WrongNumArgs(interp, 2, objv, "?-safe? ?--? ?path?"); - return TCL_ERROR; - } - if (i < objc) { - slavePtr = objv[i]; - } - } - buf[0] = '\0'; - if (slavePtr == NULL) { - /* - * Create an anonymous interpreter -- we choose its name and the - * name of the command. We check that the command name that we use - * for the interpreter does not collide with an existing command - * in the master interpreter. - */ + return Tcl_CancelEval(slaveInterp, resultObjPtr, 0, flags); +} + +/* + *---------------------------------------------------------------------- + * + * InterpCreateCmd-- + * + * Implements the "interp create" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpCreateCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int i, last, safe, index; + Tcl_Obj *slavePtr; + char buf[16 + TCL_INTEGER_SPACE]; + static const char *const options[] = { + "-safe", "--", NULL + }; + enum option { + OPT_SAFE, OPT_LAST + }; - for (i = 0; ; i++) { - Tcl_CmdInfo cmdInfo; + safe = Tcl_IsSafe(interp); - sprintf(buf, "interp%d", i); - if (Tcl_GetCommandInfo(interp, buf, &cmdInfo) == 0) { - break; - } - } - slavePtr = Tcl_NewStringObj(buf, -1); - } - if (SlaveCreate(interp, slavePtr, safe) == NULL) { - if (buf[0] != '\0') { - Tcl_DecrRefCount(slavePtr); - } - return TCL_ERROR; - } - Tcl_SetObjResult(interp, slavePtr); - return TCL_OK; - } - case OPT_DELETE: { - int i; - InterpInfo *iiPtr; - Tcl_Interp *slaveInterp; + /* + * TODO: Get rid of this nonsense. + * Weird historical rules: "-safe" is accepted at the end, too. + */ - for (i = 2; i < objc; i++) { - slaveInterp = GetInterp(interp, objv[i]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } else if (slaveInterp == interp) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "cannot delete the current interpreter", -1)); + slavePtr = NULL; + last = 0; + for (i = 1; i < objc; i++) { + if ((last == 0) && (Tcl_GetString(objv[i])[0] == '-')) { + if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, + &index) != TCL_OK) { return TCL_ERROR; } - iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; - Tcl_DeleteCommandFromToken(iiPtr->slave.masterInterp, - iiPtr->slave.interpCmd); + if (index == OPT_SAFE) { + safe = 1; + continue; + } + i++; + last = 1; } - return TCL_OK; - } - case OPT_EVAL: { - Tcl_Interp *slaveInterp; - - if (objc < 4) { - Tcl_WrongNumArgs(interp, 2, objv, "path arg ?arg ...?"); + if (slavePtr != NULL) { + Tcl_WrongNumArgs(interp, 1, objv, "?-safe? ?--? ?path?"); return TCL_ERROR; } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; + if (i < objc) { + slavePtr = objv[i]; } - return SlaveEval(interp, slaveInterp, objc - 3, objv + 3); } - case OPT_EXISTS: { - int exists; - Tcl_Interp *slaveInterp; + buf[0] = '\0'; + if (slavePtr == NULL) { + /* + * Create an anonymous interpreter -- we choose its name and the + * name of the command. We check that the command name that we use + * for the interpreter does not collide with an existing command + * in the master interpreter. + */ - exists = 1; - slaveInterp = GetInterp2(interp, objc, objv); - if (slaveInterp == NULL) { - if (objc > 3) { - return TCL_ERROR; + for (i = 0; ; i++) { + Tcl_CmdInfo cmdInfo; + + /* + * TODO: Better scheme than this?! Also, verify that + * [interp create] in non-global namespace contexts can't + * lead to a situation where a global command isn't detected, + * and gets stomped on. + */ + sprintf(buf, "interp%d", i); + if (Tcl_GetCommandInfo(interp, buf, &cmdInfo) == 0) { + break; } - Tcl_ResetResult(interp); - exists = 0; } - Tcl_SetObjResult(interp, Tcl_NewBooleanObj(exists)); - return TCL_OK; + slavePtr = Tcl_NewStringObj(buf, -1); } - case OPT_EXPOSE: { - Tcl_Interp *slaveInterp; - - if ((objc < 4) || (objc > 5)) { - Tcl_WrongNumArgs(interp, 2, objv, "path hiddenCmdName ?cmdName?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; + if (SlaveCreate(interp, slavePtr, safe) == NULL) { + if (buf[0] != '\0') { + Tcl_DecrRefCount(slavePtr); } - return SlaveExpose(interp, slaveInterp, objc - 3, objv + 3); + return TCL_ERROR; } - case OPT_HIDE: { - Tcl_Interp *slaveInterp; /* A slave. */ - - if ((objc < 4) || (objc > 5)) { - Tcl_WrongNumArgs(interp, 2, objv, "path cmdName ?hiddenCmdName?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; + Tcl_SetObjResult(interp, slavePtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * InterpDeleteCmd-- + * + * Implements the "interp delete" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpDeleteCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int i; + InterpInfo *iiPtr; + Tcl_Interp *slaveInterp; + + for (i = 1; i < objc; i++) { + slaveInterp = GetInterp(interp, objv[i]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } else if (slaveInterp == interp) { + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "cannot delete the current interpreter", -1)); + return TCL_ERROR; + } + iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; + Tcl_DeleteCommandFromToken(iiPtr->slave.masterInterp, + iiPtr->slave.interpCmd); + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * InterpEvalCmd-- + * + * Implements the "interp eval" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpEvalCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "path arg ?arg ...?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveEval(interp, slaveInterp, objc - 2, objv + 2); +} + +/* + *---------------------------------------------------------------------- + * + * InterpExistsCmd-- + * + * Implements the "interp exists" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpExistsCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int exists = 1; + Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); + + if (slaveInterp == NULL) { + if (objc > 2) { + return TCL_ERROR; + } + Tcl_ResetResult(interp); + exists = 0; + } + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(exists)); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * InterpExposeCmd-- + * + * Implements the "interp expose" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpExposeCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; + + if ((objc < 3) || (objc > 4)) { + Tcl_WrongNumArgs(interp, 1, objv, "path hiddenCmdName ?cmdName?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveExpose(interp, slaveInterp, objc - 2, objv + 2); +} + +/* + *---------------------------------------------------------------------- + * + * InterpHiddenCmd-- + * + * Implements the "interp hidden" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpHiddenCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); + + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveHidden(interp, slaveInterp); +} + +/* + *---------------------------------------------------------------------- + * + * InterpHideCmd-- + * + * Implements the "interp hide" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpHideCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; /* A slave. */ + + if ((objc < 3) || (objc > 4)) { + Tcl_WrongNumArgs(interp, 1, objv, "path cmdName ?hiddenCmdName?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveHide(interp, slaveInterp, objc - 2, objv + 2); +} + +/* + *---------------------------------------------------------------------- + * + * InterpInvokeHiddenCmd-- + * + * Implements the "interp invokehidden" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpInvokeHiddenCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int i, index; + const char *namespaceName; + Tcl_Interp *slaveInterp; + static const char *const hiddenOptions[] = { + "-global", "-namespace", "--", NULL + }; + enum hiddenOption { + OPT_GLOBAL, OPT_NAMESPACE, OPT_LAST + }; + + namespaceName = NULL; + for (i = 2; i < objc; i++) { + if (TclGetString(objv[i])[0] != '-') { + break; + } + if (Tcl_GetIndexFromObj(interp, objv[i], hiddenOptions, "option", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + if (index == OPT_GLOBAL) { + namespaceName = "::"; + } else if (index == OPT_NAMESPACE) { + if (++i == objc) { /* There must be more arguments. */ + break; + } else { + namespaceName = TclGetString(objv[i]); + } + } else { + i++; + break; } - return SlaveHide(interp, slaveInterp, objc - 3, objv + 3); } - case OPT_HIDDEN: { - Tcl_Interp *slaveInterp; /* A slave. */ + if (objc - i < 1) { + Tcl_WrongNumArgs(interp, 1, objv, + "path ?-namespace ns? ?-global? ?--? cmd ?arg ..?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveInvokeHidden(interp, slaveInterp, namespaceName, objc - i, + objv + i); +} + +/* + *---------------------------------------------------------------------- + * + * InterpIsSafeCmd-- + * + * Implements the "interp issafe" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpIsSafeCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); + + if (slaveInterp == NULL) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(Tcl_IsSafe(slaveInterp))); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * InterpLimitCmd-- + * + * Implements the "interp limit" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpLimitCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; + static const char *const limitTypes[] = { + "commands", "time", NULL + }; + enum LimitTypes { + LIMIT_TYPE_COMMANDS, LIMIT_TYPE_TIME + }; + int limitType; + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "path limitType ?-option value ...?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + if (Tcl_GetIndexFromObj(interp, objv[2], limitTypes, "limit type", 0, + &limitType) != TCL_OK) { + return TCL_ERROR; + } + switch ((enum LimitTypes) limitType) { + case LIMIT_TYPE_COMMANDS: + return SlaveCommandLimitCmd(interp, slaveInterp, 3, objc,objv); + case LIMIT_TYPE_TIME: + return SlaveTimeLimitCmd(interp, slaveInterp, 3, objc, objv); + } + /* NOTREACHED */ + return TCL_ERROR; +} + +/* + *---------------------------------------------------------------------- + * + * InterpMarkTrustedCmd-- + * + * Implements the "interp marktrusted" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpMarkTrustedCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "path"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveMarkTrusted(interp, slaveInterp); +} + +/* + *---------------------------------------------------------------------- + * + * InterpRecursionLimitCmd-- + * + * Implements the "interp recursionlimit" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpRecursionLimitCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; + + if (objc != 2 && objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "path ?newlimit?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveRecursionLimit(interp, slaveInterp, objc - 2, objv + 2); +} + +/* + *---------------------------------------------------------------------- + * + * InterpShareCmd-- + * + * Implements the "interp share" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpShareCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + return InterpShareTransferCommon(interp, objc, objv, 0); +} + +/* + *---------------------------------------------------------------------- + * + * InterpSlavesCmd-- + * + * Implements the "interp slaves" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpSlavesCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); + InterpInfo *iiPtr; + Tcl_Obj *resultPtr; + Tcl_HashEntry *hPtr; + Tcl_HashSearch hashSearch; - slaveInterp = GetInterp2(interp, objc, objv); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveHidden(interp, slaveInterp); + if (slaveInterp == NULL) { + return TCL_ERROR; } - case OPT_ISSAFE: { - Tcl_Interp *slaveInterp; - - slaveInterp = GetInterp2(interp, objc, objv); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - Tcl_SetObjResult(interp, Tcl_NewBooleanObj(Tcl_IsSafe(slaveInterp))); - return TCL_OK; + iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; + resultPtr = Tcl_NewObj(); + hPtr = Tcl_FirstHashEntry(&iiPtr->master.slaveTable, &hashSearch); + for ( ; hPtr != NULL; hPtr = Tcl_NextHashEntry(&hashSearch)) { + Tcl_ListObjAppendElement(NULL, resultPtr, Tcl_NewStringObj( + Tcl_GetHashKey(&iiPtr->master.slaveTable, hPtr), -1)); } - case OPT_INVOKEHID: { - int i, index; - const char *namespaceName; - Tcl_Interp *slaveInterp; - static const char *const hiddenOptions[] = { - "-global", "-namespace", "--", NULL - }; - enum hiddenOption { - OPT_GLOBAL, OPT_NAMESPACE, OPT_LAST - }; + Tcl_SetObjResult(interp, resultPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * InterpShareTransferCommon-- + * + * The common portion of the "interp slaves" and "interp transfer" + * Tcl commands. See the user documentation for details. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpShareTransferCommon( + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[], /* Argument objects. */ + int transfer) /* 1 for transfer, 0 for share */ +{ + Tcl_Interp *slaveInterp; /* A slave. */ + Tcl_Interp *masterInterp; /* Its master. */ + Tcl_Channel chan; - namespaceName = NULL; - for (i = 3; i < objc; i++) { - if (TclGetString(objv[i])[0] != '-') { - break; - } - if (Tcl_GetIndexFromObj(interp, objv[i], hiddenOptions, "option", - 0, &index) != TCL_OK) { - return TCL_ERROR; - } - if (index == OPT_GLOBAL) { - namespaceName = "::"; - } else if (index == OPT_NAMESPACE) { - if (++i == objc) { /* There must be more arguments. */ - break; - } else { - namespaceName = TclGetString(objv[i]); - } - } else { - i++; - break; - } - } - if (objc - i < 1) { - Tcl_WrongNumArgs(interp, 2, objv, - "path ?-namespace ns? ?-global? ?--? cmd ?arg ..?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveInvokeHidden(interp, slaveInterp, namespaceName, objc - i, - objv + i); + if (objc != 4) { + Tcl_WrongNumArgs(interp, 1, objv, "srcPath channelId destPath"); + return TCL_ERROR; } - case OPT_LIMIT: { - Tcl_Interp *slaveInterp; - static const char *const limitTypes[] = { - "commands", "time", NULL - }; - enum LimitTypes { - LIMIT_TYPE_COMMANDS, LIMIT_TYPE_TIME - }; - int limitType; - - if (objc < 4) { - Tcl_WrongNumArgs(interp, 2, objv, "path limitType ?-option value ...?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - if (Tcl_GetIndexFromObj(interp, objv[3], limitTypes, "limit type", 0, - &limitType) != TCL_OK) { - return TCL_ERROR; - } - switch ((enum LimitTypes) limitType) { - case LIMIT_TYPE_COMMANDS: - return SlaveCommandLimitCmd(interp, slaveInterp, 4, objc,objv); - case LIMIT_TYPE_TIME: - return SlaveTimeLimitCmd(interp, slaveInterp, 4, objc, objv); - } + masterInterp = GetInterp(interp, objv[1]); + if (masterInterp == NULL) { + return TCL_ERROR; } - case OPT_MARKTRUSTED: { - Tcl_Interp *slaveInterp; - - if (objc != 3) { - Tcl_WrongNumArgs(interp, 2, objv, "path"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveMarkTrusted(interp, slaveInterp); + chan = Tcl_GetChannel(masterInterp, TclGetString(objv[2]), NULL); + if (chan == NULL) { + /* TODO: pass TCL_ERROR */ + Tcl_TransferResult(masterInterp, TCL_OK, interp); + return TCL_ERROR; } - case OPT_RECLIMIT: { - Tcl_Interp *slaveInterp; - - if (objc != 3 && objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "path ?newlimit?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveRecursionLimit(interp, slaveInterp, objc - 3, objv + 3); - } - case OPT_SLAVES: { - Tcl_Interp *slaveInterp; - InterpInfo *iiPtr; - Tcl_Obj *resultPtr; - Tcl_HashEntry *hPtr; - Tcl_HashSearch hashSearch; - char *string; - - slaveInterp = GetInterp2(interp, objc, objv); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; - resultPtr = Tcl_NewObj(); - hPtr = Tcl_FirstHashEntry(&iiPtr->master.slaveTable, &hashSearch); - for ( ; hPtr != NULL; hPtr = Tcl_NextHashEntry(&hashSearch)) { - string = Tcl_GetHashKey(&iiPtr->master.slaveTable, hPtr); - Tcl_ListObjAppendElement(NULL, resultPtr, - Tcl_NewStringObj(string, -1)); - } - Tcl_SetObjResult(interp, resultPtr); - return TCL_OK; + slaveInterp = GetInterp(interp, objv[3]); + if (slaveInterp == NULL) { + return TCL_ERROR; } - case OPT_TRANSFER: - case OPT_SHARE: { - Tcl_Interp *slaveInterp; /* A slave. */ - Tcl_Interp *masterInterp; /* Its master. */ - Tcl_Channel chan; + Tcl_RegisterChannel(slaveInterp, chan); + if (transfer) { + /* + * When transferring, as opposed to sharing, we must unhitch the + * channel from the interpreter where it started. + */ - if (objc != 5) { - Tcl_WrongNumArgs(interp, 2, objv, "srcPath channelId destPath"); - return TCL_ERROR; - } - masterInterp = GetInterp(interp, objv[2]); - if (masterInterp == NULL) { - return TCL_ERROR; - } - chan = Tcl_GetChannel(masterInterp, TclGetString(objv[3]), NULL); - if (chan == NULL) { + if (Tcl_UnregisterChannel(masterInterp, chan) != TCL_OK) { + /* TODO: pass TCL_ERROR */ Tcl_TransferResult(masterInterp, TCL_OK, interp); return TCL_ERROR; } - slaveInterp = GetInterp(interp, objv[4]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - Tcl_RegisterChannel(slaveInterp, chan); - if (index == OPT_TRANSFER) { - /* - * When transferring, as opposed to sharing, we must unhitch the - * channel from the interpreter where it started. - */ - - if (Tcl_UnregisterChannel(masterInterp, chan) != TCL_OK) { - Tcl_TransferResult(masterInterp, TCL_OK, interp); - return TCL_ERROR; - } - } - return TCL_OK; } - case OPT_TARGET: { - Tcl_Interp *slaveInterp; - InterpInfo *iiPtr; - Tcl_HashEntry *hPtr; - Alias *aliasPtr; - char *aliasName; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * InterpTargetCmd-- + * + * Implements the "interp target" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpTargetCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *slaveInterp; + InterpInfo *iiPtr; + Tcl_HashEntry *hPtr; + Alias *aliasPtr; + char *aliasName; - if (objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "path alias"); - return TCL_ERROR; - } + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "path alias"); + return TCL_ERROR; + } - slaveInterp = GetInterp(interp, objv[2]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } + slaveInterp = GetInterp(interp, objv[1]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } - aliasName = TclGetString(objv[3]); + aliasName = TclGetString(objv[2]); - iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; - hPtr = Tcl_FindHashEntry(&iiPtr->slave.aliasTable, aliasName); - if (hPtr == NULL) { - Tcl_AppendResult(interp, "alias \"", aliasName, "\" in path \"", - Tcl_GetString(objv[2]), "\" not found", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, - NULL); - return TCL_ERROR; - } - aliasPtr = Tcl_GetHashValue(hPtr); - if (Tcl_GetInterpPath(interp, aliasPtr->targetInterp) != TCL_OK) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "target interpreter for alias \"", - aliasName, "\" in path \"", Tcl_GetString(objv[2]), - "\" is not my descendant", NULL); - return TCL_ERROR; - } - return TCL_OK; + iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; + hPtr = Tcl_FindHashEntry(&iiPtr->slave.aliasTable, aliasName); + if (hPtr == NULL) { + Tcl_AppendResult(interp, "alias \"", aliasName, "\" in path \"", + Tcl_GetString(objv[1]), "\" not found", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, NULL); + return TCL_ERROR; } + aliasPtr = Tcl_GetHashValue(hPtr); + if (Tcl_GetInterpPath(interp, aliasPtr->targetInterp) != TCL_OK) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "target interpreter for alias \"", + aliasName, "\" in path \"", Tcl_GetString(objv[1]), + "\" is not my descendant", NULL); + return TCL_ERROR; } return TCL_OK; } /* + *---------------------------------------------------------------------- + * + * InterpTransferCmd-- + * + * Implements the "interp transfer" Tcl command. + * See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +InterpTransferCmd( + ClientData clientData, /* Unused. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + return InterpShareTransferCommon(interp, objc, objv, 1); +} + +/* *--------------------------------------------------------------------------- * * GetInterp2 -- @@ -1102,12 +1617,12 @@ GetInterp2( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - if (objc == 2) { + if (objc == 1) { return interp; - } else if (objc == 3) { - return GetInterp(interp, objv[2]); + } else if (objc == 2) { + return GetInterp(interp, objv[1]); } else { - Tcl_WrongNumArgs(interp, 2, objv, "?path?"); + Tcl_WrongNumArgs(interp, 1, objv, "?path?"); return NULL; } } -- cgit v0.12 From 7d0d8f85ee8ad595801e30135e4cde40d6707ccd Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Jan 2009 14:53:36 +0000 Subject: Fix [Bug 2537839] --- ChangeLog | 5 +++++ generic/tclOODecls.h | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 59854fb..31c69d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-29 Donal K. Fellows + + * generic/tclOODecls.h (Tcl_OOInitStubs): [Bug 2537839]: Make the + declaration of this macro work correctly in the non-stub case. + 2009-01-29 Don Porter * generic/tclInterp.c: Convert the [interp] command into a diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 4cdd515..1a0c262 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,10 +1,9 @@ /* - * $Id: tclOODecls.h,v 1.10 2008/10/22 20:23:59 nijtmans Exp $ + * $Id: tclOODecls.h,v 1.11 2009/01/29 14:53:36 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ - #ifndef _TCLOODECLS #define _TCLOODECLS @@ -21,20 +20,18 @@ /* * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made + * script. Any modifications to the function declarations below should be made * in the generic/tclOO.decls script. */ - - #if defined(USE_TCLOO_STUBS) extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); #define Tcl_OOInitStubs(interp) TclOOInitializeStubs((interp),TCLOO_VERSION) #else -#define Tcl_OOInitStubs(interp) Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION) +#define Tcl_OOInitStubs(interp) \ + Tcl_PkgRequire((interp),"TclOO",TCLOO_VERSION,0) #endif - - + /* !BEGIN!: Do not edit below this line. */ /* @@ -375,7 +372,7 @@ extern const TclOOStubs *tclOOStubsPtr; #endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ /* !END!: Do not edit above this line. */ - + #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -- cgit v0.12 From 1613b73f3d0c97fc20285de5b2c1e90eed432fdc Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Jan 2009 15:57:54 +0000 Subject: Fix [Bug 2519474] --- ChangeLog | 3 +++ generic/tclNamesp.c | 5 +++-- tests/oo.test | 14 +++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31c69d2..7d495f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-01-29 Donal K. Fellows + * generic/tclNamesp.c (Tcl_FindCommand): [Bug 2519474]: Ensure that + the path is not searched when the TCL_NAMESPACE_ONLY flag is given. + * generic/tclOODecls.h (Tcl_OOInitStubs): [Bug 2537839]: Make the declaration of this macro work correctly in the non-stub case. diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 63c3d1f..42e5a2b 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.187 2009/01/29 11:28:49 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.188 2009/01/29 15:57:54 dkf Exp $ */ #include "tclInt.h" @@ -2451,7 +2451,8 @@ Tcl_FindCommand( */ cmdPtr = NULL; - if (cxtNsPtr->commandPathLength!=0 && strncmp(name, "::", 2)) { + if (cxtNsPtr->commandPathLength!=0 && strncmp(name, "::", 2) + && !(flags & TCL_NAMESPACE_ONLY)) { int i; Namespace *pathNsPtr, *realNsPtr, *dummyNsPtr; diff --git a/tests/oo.test b/tests/oo.test index 5db928e..e0b07b2 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.21 2009/01/27 11:11:47 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.22 2009/01/29 15:57:54 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -209,6 +209,18 @@ test oo-1.17 {basic test of OO functionality: Bug 2481109} -body { } -cleanup { namespace delete ::foo } -result ::foo::lreplace +# Check for Bug 2519474; problem in tclNamesp.c, but tested here... +test oo-1.18 {OO: create object in NS with same name as global cmd} -setup { + proc test-oo-1.18 {} return + oo::class create A + oo::class create B {superclass A} +} -body { + oo::define B constructor {} {A create test-oo-1.18} + B create C +} -cleanup { + rename test-oo-1.18 {} + A destroy +} -result ::C test oo-2.1 {basic test of OO functionality: constructor} -setup { # This is a bit complex because it needs to run in a sub-interp as -- cgit v0.12 From ee3194e1a37679433a699a0a46edb7f90875bf73 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 29 Jan 2009 17:13:49 +0000 Subject: * generic/tclInterp.c: Convert the [interp] command into a * tests/interp.test: [namespace ensemble]. Work in progress * tests/nre.test: to NRE-enable the [interp invokehidden] subcommand. --- ChangeLog | 5 +++-- tests/interp.test | 27 ++++++++++++++++----------- tests/nre.test | 8 +++----- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d495f2..e9172a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,8 +9,9 @@ 2009-01-29 Don Porter * generic/tclInterp.c: Convert the [interp] command into a - [namespace ensemble]. Work in progress to NRE-enable the - [interp invokehidden] subcommand. + * tests/interp.test: [namespace ensemble]. Work in progress + * tests/nre.test: to NRE-enable the [interp invokehidden] + subcommand. 2009-01-29 Donal K. Fellows diff --git a/tests/interp.test b/tests/interp.test index 01e3ca8..bdd87fa 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.61 2008/09/01 12:28:09 msofer Exp $ +# RCS: @(#) $Id: interp.test,v 1.62 2009/01/29 17:13:50 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -18,6 +18,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testinterpdelete [llength [info commands testinterpdelete]] +testConstraint interpNotEnsemble [expr ![namespace ensemble exists ::interp]] set hidden_cmds {cd encoding exec exit fconfigure file glob load open pwd socket source unload} @@ -26,10 +27,10 @@ foreach i [interp slaves] { } # Part 0: Check out options for interp command -test interp-1.1 {options for interp command} { +test interp-1.1 {options for interp command} interpNotEnsemble { list [catch {interp} msg] $msg } {1 {wrong # args: should be "interp cmd ?arg ...?"}} -test interp-1.2 {options for interp command} { +test interp-1.2 {options for interp command} interpNotEnsemble { list [catch {interp frobox} msg] $msg } {1 {bad option "frobox": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.3 {options for interp command} { @@ -47,13 +48,13 @@ test interp-1.5 {options for interp command} { test interp-1.6 {options for interp command} { list [catch {interp slaves foo bar zop} msg] $msg } {1 {wrong # args: should be "interp slaves ?path?"}} -test interp-1.7 {options for interp command} { +test interp-1.7 {options for interp command} interpNotEnsemble { list [catch {interp hello} msg] $msg } {1 {bad option "hello": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.8 {options for interp command} { +test interp-1.8 {options for interp command} interpNotEnsemble { list [catch {interp -froboz} msg] $msg } {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.9 {options for interp command} { +test interp-1.9 {options for interp command} interpNotEnsemble { list [catch {interp -froboz -safe} msg] $msg } {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.10 {options for interp command} { @@ -2368,13 +2369,11 @@ test interp-28.2 {master's nsName cache should not cross} -setup { $i eval { set x {namespace children ::} set y [list namespace children ::] - namespace delete {*}[{*}$y] set j [interp create] + namespace delete {*}[{*}$y] $j eval {namespace delete {*}[namespace children ::]} namespace eval foo {} - set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] - interp delete $j - set res + list [eval $x] [eval $y] [$j eval $x] [$j eval $y] } } -cleanup { interp delete $i @@ -2610,7 +2609,13 @@ test interp-29.3.6 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} 6 + # Conversion to an ensemble changed the result, + # because ensemble dispatch consumes an additional + # recursion level. Work around for now by + # directly calling the subcommand target. + # + #interp recursionlimit {} 6 + ::tcl::interp::recursionlimit {} 6 set x ok } } diff --git a/tests/nre.test b/tests/nre.test index ef2802f..873eb14 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.6 2008/09/10 13:24:26 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.7 2009/01/29 17:13:50 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -394,13 +394,11 @@ test nre-X.1 {eval in wrong interp} { set res [$i eval { set x {namespace children ::} set y [list namespace children ::] - namespace delete {*}[{*}$y] set j [interp create] + namespace delete {*}[{*}$y] $j eval {namespace delete {*}[namespace children ::]} namespace eval foo {} - set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] - interp delete $j - set res + list [eval $x] [eval $y] [$j eval $x] [$j eval $y] }] interp delete $i set res -- cgit v0.12 From 1ded7d18ee9da0c3312afb777ea2036a69265d36 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Jan 2009 22:14:56 +0000 Subject: Fix [Bug 2006888] --- ChangeLog | 4 +++ tests/stringObj.test | 91 ++++++++++++++++++++++++++-------------------------- 2 files changed, 49 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9172a8..8f00e07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-01-29 Donal K. Fellows + * tests/stringObj.test: [Bug 2006888]: Remove non-ASCII chars from + non-comment locations in the file, making it work more reliably in + locales with a non-Latin-1 default encoding. + * generic/tclNamesp.c (Tcl_FindCommand): [Bug 2519474]: Ensure that the path is not searched when the TCL_NAMESPACE_ONLY flag is given. diff --git a/tests/stringObj.test b/tests/stringObj.test index c215abe..8b38542 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -1,18 +1,18 @@ # Commands covered: none # -# This file contains tests for the procedures in tclStringObj.c -# that implement the Tcl type manager for the string type. +# This file contains tests for the procedures in tclStringObj.c that implement +# the Tcl type manager for the string type. # -# Sourcing this file into Tcl runs the tests and generates output for -# errors. No output means no errors were found. +# Sourcing this file into Tcl runs the tests and generates output for errors. +# No output means no errors were found. # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringObj.test,v 1.17 2009/01/06 17:20:52 dgp Exp $ +# RCS: @(#) $Id: stringObj.test,v 1.18 2009/01/29 22:14:56 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -21,7 +21,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint testobj [llength [info commands testobj]] testConstraint testdstring [llength [info commands testdstring]] - + test stringObj-1.1 {string type registration} testobj { set t [testobj types] set first [string first "string" $t] @@ -40,7 +40,7 @@ test stringObj-3.1 {Tcl_SetStringObj, existing "empty string" object} testobj { set result "" lappend result [testobj freeallvars] lappend result [testobj newobj 1] - lappend result [teststringobj set 1 xyz] ;# makes existing obj a string + lappend result [teststringobj set 1 xyz] ;# makes existing obj a string lappend result [testobj type 1] lappend result [testobj refcount 1] } {{} {} xyz string 2} @@ -48,7 +48,7 @@ test stringObj-3.2 {Tcl_SetStringObj, existing non-"empty string" object} testob set result "" lappend result [testobj freeallvars] lappend result [testintobj set 1 512] - lappend result [teststringobj set 1 foo] ;# makes existing obj a string + lappend result [teststringobj set 1 foo] ;# makes existing obj a string lappend result [testobj type 1] lappend result [testobj refcount 1] } {{} 512 foo string 2} @@ -198,19 +198,19 @@ test stringObj-8.1 {DupStringInternalRep procedure} testobj { [teststringobj ualloc 2] [teststringobj get 2] } {5 10 0 abcde 5 5 0 abcde} test stringObj-8.2 {DupUnicodeInternalRep, mixed width chars} testobj { - set x abcï¿®ghi + set x abc\u00ef\u00bf\u00aeghi string length $x set y $x - list [testobj objtype $x] [testobj objtype $y] [append x "®¿ï"] \ + list [testobj objtype $x] [testobj objtype $y] [append x "\u00ae\u00bf\u00ef"] \ [set y] [testobj objtype $x] [testobj objtype $y] -} {string string abcï¿®ghi®¿ï abcï¿®ghi string string} +} "string string abc\u00ef\u00bf\u00aeghi\u00ae\u00bf\u00ef abc\u00ef\u00bf\u00aeghi string string" test stringObj-8.3 {DupUnicodeInternalRep, mixed width chars} testobj { - set x abcï¿®ghi + set x abc\u00ef\u00bf\u00aeghi set y $x string length $x - list [testobj objtype $x] [testobj objtype $y] [append x "®¿ï"] \ + list [testobj objtype $x] [testobj objtype $y] [append x "\u00ae\u00bf\u00ef"] \ [set y] [testobj objtype $x] [testobj objtype $y] -} {string string abcï¿®ghi®¿ï abcï¿®ghi string string} +} "string string abc\u00ef\u00bf\u00aeghi\u00ae\u00bf\u00ef abc\u00ef\u00bf\u00aeghi string string" test stringObj-8.4 {DupUnicodeInternalRep, all byte-size chars} testobj { set x abcdefghi string length $x @@ -227,31 +227,31 @@ test stringObj-8.5 {DupUnicodeInternalRep, all byte-size chars} testobj { } {string string abcdefghijkl abcdefghi string string} test stringObj-9.1 {TclAppendObjToObj, mixed src & dest} {testobj testdstring} { - set x abcï¿®ghi + set x abc\u00ef\u00bf\u00aeghi testdstring free - testdstring append ®¿ï -1 + testdstring append \u00ae\u00bf\u00ef -1 set y [testdstring get] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] -} {string none abcï¿®ghi®¿ï ®¿ï string none} +} "string none abc\u00ef\u00bf\u00aeghi\u00ae\u00bf\u00ef \u00ae\u00bf\u00ef string none" test stringObj-9.2 {TclAppendObjToObj, mixed src & dest} testobj { - set x abcï¿®ghi + set x abc\u00ef\u00bf\u00aeghi string length $x list [testobj objtype $x] [append x $x] [testobj objtype $x] \ [append x $x] [testobj objtype $x] -} {string abcï¿®ghiabcï¿®ghi string\ -abcï¿®ghiabcï¿®ghiabcï¿®ghiabcï¿®ghi\ -string} +} "string abc\u00ef\u00bf\u00aeghiabc\u00ef\u00bf\u00aeghi string\ +abc\u00ef\u00bf\u00aeghiabc\u00ef\u00bf\u00aeghiabc\u00ef\u00bf\u00aeghiabc\u00ef\u00bf\u00aeghi\ +string" test stringObj-9.3 {TclAppendObjToObj, mixed src & 1-byte dest} {testobj testdstring} { set x abcdefghi testdstring free - testdstring append ®¿ï -1 + testdstring append \u00ae\u00bf\u00ef -1 set y [testdstring get] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] -} {string none abcdefghi®¿ï ®¿ï string none} +} "string none abcdefghi\u00ae\u00bf\u00ef \u00ae\u00bf\u00ef string none" test stringObj-9.4 {TclAppendObjToObj, 1-byte src & dest} {testobj testdstring} { set x abcdefghi testdstring free @@ -269,14 +269,14 @@ test stringObj-9.5 {TclAppendObjToObj, 1-byte src & dest} testobj { } {string abcdefghiabcdefghi string abcdefghiabcdefghiabcdefghiabcdefghi\ string} test stringObj-9.6 {TclAppendObjToObj, 1-byte src & mixed dest} {testobj testdstring} { - set x abcï¿®ghi + set x abc\u00ef\u00bf\u00aeghi testdstring free testdstring append jkl -1 set y [testdstring get] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] -} {string none abcï¿®ghijkl jkl string none} +} "string none abc\u00ef\u00bf\u00aeghijkl jkl string none" test stringObj-9.7 {TclAppendObjToObj, integer src & dest} testobj { set x [expr {4 * 5}] set y [expr {4 + 5}] @@ -297,20 +297,19 @@ test stringObj-9.9 {TclAppendObjToObj, integer src & 1-byte dest} testobj { [set y] [testobj objtype $x] [testobj objtype $y] } {string int abcdefghi9 9 string int} test stringObj-9.10 {TclAppendObjToObj, integer src & mixed dest} testobj { - set x abcï¿®ghi + set x abc\u00ef\u00bf\u00aeghi set y [expr {4 + 5}] string length $x list [testobj objtype $x] [testobj objtype $y] [append x $y] \ [set y] [testobj objtype $x] [testobj objtype $y] -} {string int abcï¿®ghi9 9 string int} +} "string int abc\u00ef\u00bf\u00aeghi9 9 string int" test stringObj-9.11 {TclAppendObjToObj, mixed src & 1-byte dest index check} testobj { # bug 2678, in <=8.2.0, the second obj (the one to append) in - # Tcl_AppendObjToObj was not correctly checked to see if it was - # all one byte chars, so a unicode string would be added as one - # byte chars. + # Tcl_AppendObjToObj was not correctly checked to see if it was all one + # byte chars, so a unicode string would be added as one byte chars. set x abcdef set len [string length $x] - set y aübåcï + set y a\u00fcb\u00e5c\u00ef set len [string length $y] append x $y string length $x @@ -319,7 +318,7 @@ test stringObj-9.11 {TclAppendObjToObj, mixed src & 1-byte dest index check} tes lappend q [string index $x $i] } set q -} {a b c d e f a ü b å c ï} +} "a b c d e f a \u00fc b \u00e5 c \u00ef" test stringObj-10.1 {Tcl_GetRange with all byte-size chars} {testobj testdstring} { testdstring free @@ -330,12 +329,12 @@ test stringObj-10.1 {Tcl_GetRange with all byte-size chars} {testobj testdstring } [list none bcde string string] test stringObj-10.2 {Tcl_GetRange with some mixed width chars} {testobj testdstring} { # Because this test does not use \uXXXX notation below instead of - # hardcoding the values, it may fail in multibyte locales. However, - # we need to test that the parser produces untyped objects even when there - # are high-ASCII characters in the input (like "ï"). I don't know what + # hardcoding the values, it may fail in multibyte locales. However, we + # need to test that the parser produces untyped objects even when there + # are high-ASCII characters in the input (like "ï"). I don't know what # else to do but inline those characters here. testdstring free - testdstring append "abcïïdef" -1 + testdstring append "abc\u00ef\u00efdef" -1 set x [testdstring get] list [testobj objtype $x] [set y [string range $x 1 end-1]] \ [testobj objtype $x] [testobj objtype $y] @@ -385,15 +384,15 @@ test stringObj-12.3 {Tcl_GetUniChar with byte-size chars} testobj { list [string index $x end] [string index $x end-1] } {i h} test stringObj-12.4 {Tcl_GetUniChar with mixed width chars} testobj { - string index "ïa¿b®c®¿dï" 0 -} "ï" + string index "\u00efa\u00bfb\u00aec\u00ae\u00bfd\u00ef" 0 +} "\u00ef" test stringObj-12.5 {Tcl_GetUniChar} testobj { - set x "ïa¿b®c®¿dï" + set x "\u00efa\u00bfb\u00aec\u00ae\u00bfd\u00ef" list [string index $x 4] [string index $x 0] -} {® ï} +} "\u00ae \u00ef" test stringObj-12.6 {Tcl_GetUniChar} testobj { - string index "ïa¿b®cï¿d®" end -} "®" + string index "\u00efa\u00bfb\u00aec\u00ef\u00bfd\u00ae" end +} "\u00ae" test stringObj-13.1 {Tcl_GetCharLength with byte-size chars} testobj { set a "" @@ -407,7 +406,7 @@ test stringObj-13.3 {Tcl_GetCharLength with byte-size chars} testobj { list [string length $a] [string length $a] } {6 6} test stringObj-13.4 {Tcl_GetCharLength with mixed width chars} testobj { - string length "®" + string length "\u00ae" } 1 test stringObj-13.5 {Tcl_GetCharLength with mixed width chars} testobj { # string length "○○" @@ -440,7 +439,7 @@ test stringObj-14.1 {Tcl_SetObjLength on pure unicode object} testobj { teststringobj append 1 bar -1 teststringobj get 1 } {bar} - + if {[testConstraint testobj]} { testobj freeallvars } -- cgit v0.12 From b52edeeca3ae9b5a5c62fbe5d718f7c8035232a3 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Jan 2009 11:18:38 +0000 Subject: Added example. --- ChangeLog | 4 ++++ doc/refchan.n | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f00e07..4d8c0e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-01-30 Donal K. Fellows + + * doc/refchan.n: Added an example of how to build a scripted channel. + 2009-01-29 Donal K. Fellows * tests/stringObj.test: [Bug 2006888]: Remove non-ASCII chars from diff --git a/doc/refchan.n b/doc/refchan.n index 4365512..0ed6a20 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,11 +4,11 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.12 2008/10/07 14:10:29 dkf Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.13 2009/01/30 11:18:38 dkf Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS -.\" Note: do not modify the .SH NAME line immediately below! +1.\" Note: do not modify the .SH NAME line immediately below! .SH NAME refchan \- command handler API of reflected channels .SH SYNOPSIS @@ -272,7 +272,41 @@ function anywhere at all. Therefore support at the Tcl level makes no sense either. This may be altered in the future (through extending the API defined here and changing its version number) should the function be used at some time in the future. +.SH EXAMPLE +.PP +This demonstrates how to make a channel that reads from a string. +.PP +.CS +oo::class create stringchan { + variable data offset + constructor {string {encoding {}}} { + if {$encoding eq ""} {set encoding [encoding system]} + set data [encoding convertto $encoding $string] + set offset 0 + } + method \fBinitialize\fR {ch mode} { + return "initialize finalize watch read" + } + method \fBfinalize\fR {ch} { + my destroy + } + method \fBwatch\fR {ch events} { + # Must be present but we ignore it because we do not post + # any events + } + method \fBread\fR {ch count} { + set d [string range $data $offset [expr {$offset+$count-1}]] + incr offset [string length $d] + return $d + } +} +set string "The quick brown fox jumps over the lazy dog.\n" +set ch [\fBchan create\fR read [stringchan new $string]] +.CE .SH "SEE ALSO" chan(n), transchan(n) .SH KEYWORDS API, channel, ensemble, prefix, reflection +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 55ce0570bc00c311fdea8fa220088ba1cf56cad9 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Jan 2009 11:34:36 +0000 Subject: Added another example. [Bug 1216074] --- ChangeLog | 2 ++ doc/chan.n | 42 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d8c0e1..6a6a319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-01-30 Donal K. Fellows + * doc/chan.n: [Bug 1216074]: Added another extended example. + * doc/refchan.n: Added an example of how to build a scripted channel. 2009-01-29 Donal K. Fellows diff --git a/doc/chan.n b/doc/chan.n index d79c717..2924465 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.22 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.23 2009/01/30 11:34:36 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -733,7 +733,8 @@ named \fIchannelId\fR to be \fIlength\fR (or to the current byte offset within the underlying data stream if \fIlength\fR is omitted). The channel is flushed before truncation. . -.SH EXAMPLE +.SH EXAMPLES +.PP This opens a file using a known encoding (CP1252, a very common encoding on Windows), searches for a string, rewrites that part, and truncates the file after a further two lines. @@ -766,6 +767,43 @@ while {[\fBchan gets\fR $f line] >= 0} { } \fBchan close\fR $f .CE +.PP +A network server that does echoing of its input line-by-line without +preventing servicing of other connections at the same time. +.PP +.CS +# This is a very simple logger... +proc log {message} { + \fBchan puts\fR stdout $message +} + +# This is called whenever a new client connects to the server +proc connect {chan host port} { + set clientName [format <%s:%d> $host $port] + log "connection from $clientName" + \fBchan configure\fR $chan -blocking 0 -buffering line + \fBchan event\fR $chan readable [list echoLine $chan $clientName] +} + +# This is called whenever either at least one byte of input +# data is available, or the channel was closed by the client. +proc echoLine {chan clientName} { + \fBchan gets\fR $chan line + if {[\fBchan eof\fR $chan]} { + log "finishing connection from $clientName" + \fBchan close\fR $chan + } elseif {![\fBchan blocked\fR $chan]} { + # Didn't block waiting for end-of-line + log "$clientName - $line" + \fBchan puts\fR $chan $line + } +} + +# Create the server socket and enter the event-loop to wait +# for incoming connections... +socket -server connect 12345 +vwait forever +.CE .SH "SEE ALSO" close(n), eof(n), fblocked(n), fconfigure(n), fcopy(n), file(n), fileevent(n), flush(n), gets(n), open(n), puts(n), read(n), seek(n), -- cgit v0.12 From 310a0d75d6efd0d33a0008c423f8ac8009471a92 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 30 Jan 2009 16:01:34 +0000 Subject: improved test fixes --- tests/interp.test | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/tests/interp.test b/tests/interp.test index bdd87fa..6c22b5e 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.62 2009/01/29 17:13:50 dgp Exp $ +# RCS: @(#) $Id: interp.test,v 1.63 2009/01/30 16:01:34 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -2567,8 +2567,8 @@ test interp-29.3.4 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} 5 - set x ok + interp recursionlimit {} [expr {5+[namespace ensemble exists ::interp]}] + set x ok } } } @@ -2588,8 +2588,8 @@ test interp-29.3.5 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} 4 - set x ok + interp recursionlimit {} [expr {4+[namespace ensemble exists ::interp]}] + set x ok } } } @@ -2609,14 +2609,8 @@ test interp-29.3.6 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - # Conversion to an ensemble changed the result, - # because ensemble dispatch consumes an additional - # recursion level. Work around for now by - # directly calling the subcommand target. - # - #interp recursionlimit {} 6 - ::tcl::interp::recursionlimit {} 6 - set x ok + interp recursionlimit {} [expr {6+[namespace ensemble exists ::interp]}] + set x ok } } } -- cgit v0.12 From fe1fc68b456da294f91e9525dea6f3ebbfadc0ad Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 31 Jan 2009 15:11:28 +0000 Subject: remove accidental typo --- doc/refchan.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/refchan.n b/doc/refchan.n index 0ed6a20..a314c33 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,11 +4,11 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.13 2009/01/30 11:18:38 dkf Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.14 2009/01/31 15:11:28 dkf Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS -1.\" Note: do not modify the .SH NAME line immediately below! +.\" Note: do not modify the .SH NAME line immediately below! .SH NAME refchan \- command handler API of reflected channels .SH SYNOPSIS -- cgit v0.12 From bbdfbfb07c2da6bc78030cfd8ef18d74393a162e Mon Sep 17 00:00:00 2001 From: davygrvy Date: Sun, 1 Feb 2009 17:57:07 +0000 Subject: no message --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6a6a319..e3dd74a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-01 David Gravereaux + + * pkgs/itcl/*: imported the latest head of the itcl-ng branch + 2009-01-30 Donal K. Fellows * doc/chan.n: [Bug 1216074]: Added another extended example. -- cgit v0.12 From 4ad480ceae078dc256e60b1514ef4ab7cdf2726d Mon Sep 17 00:00:00 2001 From: davygrvy Date: Sun, 1 Feb 2009 19:35:15 +0000 Subject: * win/makefile.vc: Allow nmake flags such as -a (rebuild all) to pass down to the pkgs targets, too. --- win/makefile.vc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 8533c14..1ec42e6 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.197 2009/01/19 22:10:57 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.198 2009/02/01 19:35:15 davygrvy Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -649,7 +649,7 @@ pkgs: @for /d %d in ($(PKGSDIR)\*) do \ @if exist "%~fd\win\makefile.vc" ( \ pushd "%~fd\win" & \ - $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) &\ + $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) &\ popd \ ) @@ -657,7 +657,7 @@ test-pkgs: @for /d %d in ($(PKGSDIR)\*) do \ @if exist "%~fd\win\makefile.vc" ( \ pushd "%~fd\win" & \ - $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) test &\ + $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) test &\ popd \ ) @@ -665,7 +665,7 @@ install-pkgs: @for /d %d in ($(PKGSDIR)\*) do \ @if exist "%~fd\win\makefile.vc" ( \ pushd "%~fd\win" & \ - $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) install &\ + $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) install &\ popd \ ) @@ -673,7 +673,7 @@ clean-pkgs: @for /d %d in ($(PKGSDIR)\*) do \ @if exist "%~fd\win\makefile.vc" ( \ pushd "%~fd\win" & \ - $(MAKE) -nologo -f makefile.vc TCLDIR=$(ROOT) clean &\ + $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) clean &\ popd \ ) -- cgit v0.12 From 6e88dfe13e53960121d2ca6e8d6d0372984759ab Mon Sep 17 00:00:00 2001 From: davygrvy Date: Sun, 1 Feb 2009 19:36:19 +0000 Subject: no message --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index e3dd74a..381b654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2009-02-01 David Gravereaux * pkgs/itcl/*: imported the latest head of the itcl-ng branch + * win/makefile.vc: Allow nmake flags such as -a (rebuild + all) to pass down to the pkgs targets, too. 2009-01-30 Donal K. Fellows -- cgit v0.12 From f2a2702d01498c67b0b9f5146c17c402ed0afabc Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 2 Feb 2009 05:44:34 +0000 Subject: Revert unreleased improvements to pkgs/itcl . --- ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 381b654..68d294b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,5 @@ 2009-02-01 David Gravereaux - * pkgs/itcl/*: imported the latest head of the itcl-ng branch * win/makefile.vc: Allow nmake flags such as -a (rebuild all) to pass down to the pkgs targets, too. -- cgit v0.12 From 5d9f498e2eee76fe8198e5dd7894820ea5ea6922 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 2 Feb 2009 05:47:54 +0000 Subject: * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): Added protections against callers asking for negative lengths. It is likely when this happens that an integer overflow is to blame. [Bug 2553906]. --- ChangeLog | 7 +++++++ generic/tclStringObj.c | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 68d294b..c43f610 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-02 Don Porter + + * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): Added + protections against callers asking for negative lengths. It is + likely when this happens that an integer overflow is to blame. + [Bug 2553906]. + 2009-02-01 David Gravereaux * win/makefile.vc: Allow nmake flags such as -a (rebuild diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index aebb2e9..f5ba669 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.79 2009/01/21 21:29:05 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.80 2009/02/02 05:47:54 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -763,6 +763,14 @@ Tcl_SetObjLength( { String *stringPtr; + if (length < 0) { + /* + * Setting to a negative length is nonsense. This is probably the + * result of overflowing the signed integer range. + */ + Tcl_Panic( "Tcl_SetObjLength: negative length requested: " + "%d (integer overflow?)", length); + } if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetObjLength"); } @@ -876,6 +884,13 @@ Tcl_AttemptSetObjLength( { String *stringPtr; + if (length < 0) { + /* + * Setting to a negative length is nonsense. This is probably the + * result of overflowing the signed integer range. + */ + return 0; + } if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_AttemptSetObjLength"); } -- cgit v0.12 From 0c355e47e82f42d8d8988dc9eebadb524f1cc772 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 2 Feb 2009 05:54:53 +0000 Subject: * generic/tclStringObj.c (STRING_NOMEM): Add missing cast of NULL to (char *) that upsets some compilers. [Bug 2494093]. --- ChangeLog | 3 +++ generic/tclStringObj.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c43f610..158889f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-02-02 Don Porter + * generic/tclStringObj.c (STRING_NOMEM): Add missing cast of + NULL to (char *) that upsets some compilers. [Bug 2494093]. + * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): Added protections against callers asking for negative lengths. It is likely when this happens that an integer overflow is to blame. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index f5ba669..da80876 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.80 2009/02/02 05:47:54 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.81 2009/02/02 05:54:53 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -110,7 +110,8 @@ typedef struct String { #define STRING_SIZE(numBytes) \ (sizeof(String) - sizeof(Tcl_UniChar) + (numBytes)) #define STRING_NOMEM(numBytes) \ - (Tcl_Panic("unable to alloc %u bytes", STRING_SIZE(numBytes)), NULL) + (Tcl_Panic("unable to alloc %u bytes", STRING_SIZE(numBytes)), \ + (char *) NULL) #define stringAlloc(numBytes) \ (String *) (((numBytes) > INT_MAX - STRING_SIZE(0)) \ ? STRING_NOMEM(numBytes) \ -- cgit v0.12 From 558cb6ad68272433faff4c01314fad2d63c1bfc3 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 2 Feb 2009 06:02:41 +0000 Subject: * generic/tclInterp.c: Reverted the conversion of [interp] into an * tests/interp.test: ensemble. Such conversion is not necessary * tests/nre.test: (or even all that helpful) in the NRE-enabling of [interp invokehidden], and it has other implications -- including significant forkage of the 8.5 and 8.6 implementations -- that are better off avoided if there's no gain. --- ChangeLog | 7 + generic/tclInterp.c | 1427 ++++++++++++++++----------------------------------- tests/interp.test | 31 +- tests/nre.test | 8 +- 4 files changed, 484 insertions(+), 989 deletions(-) diff --git a/ChangeLog b/ChangeLog index 158889f..095a210 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-02-02 Don Porter + * generic/tclInterp.c: Reverted the conversion of [interp] into an + * tests/interp.test: ensemble. Such conversion is not necessary + * tests/nre.test: (or even all that helpful) in the NRE-enabling + of [interp invokehidden], and it has other implications -- including + significant forkage of the 8.5 and 8.6 implementations -- that are + better off avoided if there's no gain. + * generic/tclStringObj.c (STRING_NOMEM): Add missing cast of NULL to (char *) that upsets some compilers. [Bug 2494093]. diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 7c1b5ba..c6b53c0 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.101 2009/01/29 14:45:13 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.102 2009/02/02 06:02:41 dgp Exp $ */ #include "tclInt.h" @@ -247,62 +247,6 @@ static void DeleteScriptLimitCallback(ClientData clientData); static void RunLimitHandlers(LimitHandler *handlerPtr, Tcl_Interp *interp); static void TimeLimitCallback(ClientData clientData); - -/* - * Table of interp subcommand names and implementations. - */ - -static Tcl_ObjCmdProc InterpAliasCmd; -static Tcl_ObjCmdProc InterpAliasesCmd; -static Tcl_ObjCmdProc InterpBgErrorCmd; -static Tcl_ObjCmdProc InterpCancelCmd; -static Tcl_ObjCmdProc InterpCreateCmd; -static Tcl_ObjCmdProc InterpDeleteCmd; -static Tcl_ObjCmdProc InterpEvalCmd; -static Tcl_ObjCmdProc InterpExistsCmd; -static Tcl_ObjCmdProc InterpExposeCmd; -static Tcl_ObjCmdProc InterpHiddenCmd; -static Tcl_ObjCmdProc InterpHideCmd; -static Tcl_ObjCmdProc InterpInvokeHiddenCmd; -static Tcl_ObjCmdProc InterpIsSafeCmd; -static Tcl_ObjCmdProc InterpLimitCmd; -static Tcl_ObjCmdProc InterpMarkTrustedCmd; -static Tcl_ObjCmdProc InterpRecursionLimitCmd; -static Tcl_ObjCmdProc InterpShareCmd; -static Tcl_ObjCmdProc InterpSlavesCmd; -static Tcl_ObjCmdProc InterpTargetCmd; -static Tcl_ObjCmdProc InterpTransferCmd; - -static int InterpShareTransferCommon(Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[], int transfer); -/* -static Tcl_ObjCmdProc InterpNREvalCmd; -static Tcl_ObjCmdProc InterpNRInvokeHiddenCmd; -*/ -static const EnsembleImplMap implementationMap[] = { - {"alias", InterpAliasCmd }, - {"aliases", InterpAliasesCmd }, - {"bgerror", InterpBgErrorCmd }, - {"cancel", InterpCancelCmd }, - {"create", InterpCreateCmd }, - {"delete", InterpDeleteCmd }, - {"eval", InterpEvalCmd, NULL, /*InterpNREvalCmd*/ }, - {"exists", InterpExistsCmd }, - {"expose", InterpExposeCmd }, - {"hidden", InterpHiddenCmd }, - {"hide", InterpHideCmd }, - {"invokehidden", InterpInvokeHiddenCmd, NULL, /*InterpNRInvokeHiddenCmd*/ }, - {"issafe", InterpIsSafeCmd }, - {"limit", InterpLimitCmd }, - {"marktrusted", InterpMarkTrustedCmd }, - {"recursionlimit", InterpRecursionLimitCmd }, - {"share", InterpShareCmd }, - {"slaves", InterpSlavesCmd }, - {"target", InterpTargetCmd }, - {"transfer", InterpTransferCmd }, - {NULL} -}; - /* *---------------------------------------------------------------------- @@ -505,7 +449,7 @@ TclInterpInit( slavePtr->interpCmd = NULL; Tcl_InitHashTable(&slavePtr->aliasTable, TCL_STRING_KEYS); - TclMakeEnsemble(interp, "interp", implementationMap); + Tcl_CreateObjCommand(interp, "interp", Tcl_InterpObjCmd, NULL, NULL); Tcl_CallWhenDeleted(interp, InterpInfoDeleteProc, NULL); return TCL_OK; @@ -593,10 +537,10 @@ InterpInfoDeleteProc( /* *---------------------------------------------------------------------- * - * InterpAliasCmd-- + * Tcl_InterpObjCmd -- * - * Implements the "interp alias" Tcl command. - * See the user documentation for details on what it does. + * This function is invoked to process the "interp" Tcl command. See the + * user documentation for details on what it does. * * Results: * A standard Tcl result. @@ -607,989 +551,530 @@ InterpInfoDeleteProc( *---------------------------------------------------------------------- */ /* ARGSUSED */ -static int -InterpAliasCmd( +int +Tcl_InterpObjCmd( ClientData clientData, /* Unused. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ - { - Tcl_Interp *slaveInterp; + int index; + static const char *const options[] = { + "alias", "aliases", "bgerror", "cancel", + "create", "delete", "eval", "exists", + "expose", "hide", "hidden", "issafe", + "invokehidden", "limit", "marktrusted", "recursionlimit", + "slaves", "share", "target", "transfer", + NULL + }; + enum option { + OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_CANCEL, + OPT_CREATE, OPT_DELETE, OPT_EVAL, OPT_EXISTS, + OPT_EXPOSE, OPT_HIDE, OPT_HIDDEN, OPT_ISSAFE, + OPT_INVOKEHID, OPT_LIMIT, OPT_MARKTRUSTED,OPT_RECLIMIT, + OPT_SLAVES, OPT_SHARE, OPT_TARGET, OPT_TRANSFER + }; - if (objc < 3) { - aliasArgs: - Tcl_WrongNumArgs(interp, 1, objv, - "slavePath slaveCmd ?masterPath masterCmd? ?arg ...?"); + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?"); return TCL_ERROR; } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { + if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, + &index) != TCL_OK) { return TCL_ERROR; } - if (objc == 3) { - return AliasDescribe(interp, slaveInterp, objv[2]); - } - if ((objc == 4) && (TclGetString(objv[3])[0] == '\0')) { - return AliasDelete(interp, slaveInterp, objv[2]); - } - if (objc > 4) { - Tcl_Interp *masterInterp = GetInterp(interp, objv[3]); - if (masterInterp == NULL) { + switch ((enum option) index) { + case OPT_ALIAS: { + Tcl_Interp *slaveInterp, *masterInterp; + + if (objc < 4) { + aliasArgs: + Tcl_WrongNumArgs(interp, 2, objv, + "slavePath slaveCmd ?masterPath masterCmd? ?arg ...?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { return TCL_ERROR; } - if (TclGetString(objv[4])[0] == '\0') { - if (objc == 5) { - return AliasDelete(interp, slaveInterp, objv[2]); + if (objc == 4) { + return AliasDescribe(interp, slaveInterp, objv[3]); + } + if ((objc == 5) && (TclGetString(objv[4])[0] == '\0')) { + return AliasDelete(interp, slaveInterp, objv[3]); + } + if (objc > 5) { + masterInterp = GetInterp(interp, objv[4]); + if (masterInterp == NULL) { + return TCL_ERROR; + } + if (TclGetString(objv[5])[0] == '\0') { + if (objc == 6) { + return AliasDelete(interp, slaveInterp, objv[3]); + } + } else { + return AliasCreate(interp, slaveInterp, masterInterp, objv[3], + objv[5], objc - 6, objv + 6); } - goto aliasArgs; - } else { - return AliasCreate(interp, slaveInterp, masterInterp, objv[2], - objv[4], objc - 5, objv + 5); } + goto aliasArgs; } - /* NOTREACHED */ - return TCL_ERROR; -} - -/* - *---------------------------------------------------------------------- - * - * InterpAliasesCmd-- - * - * Implements the "interp aliases" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpAliasesCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + case OPT_ALIASES: { + Tcl_Interp *slaveInterp; -{ - Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); - - if (slaveInterp == NULL) { - return TCL_ERROR; + slaveInterp = GetInterp2(interp, objc, objv); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return AliasList(interp, slaveInterp); } - return AliasList(interp, slaveInterp); -} - -/* - *---------------------------------------------------------------------- - * - * InterpBgErrorCmd-- - * - * Implements the "interp bgerror" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpBgErrorCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; + case OPT_BGERROR: { + Tcl_Interp *slaveInterp; - if (objc != 2 && objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "path ?cmdPrefix?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveBgerror(interp, slaveInterp, objc - 2, objv + 2); -} - -/* - *---------------------------------------------------------------------- - * - * InterpCancelCmd-- - * - * Implements the "interp cancel" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpCancelCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - int i, flags, index; - Tcl_Interp *slaveInterp; - Tcl_Obj *resultObjPtr; - static const char *const options[] = { - "-unwind", "--", NULL - }; - enum option { - OPT_UNWIND, OPT_LAST - }; + if (objc != 3 && objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "path ?cmdPrefix?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveBgerror(interp, slaveInterp, objc - 3, objv + 3); + } + case OPT_CANCEL: { + int i, flags; + Tcl_Interp *slaveInterp; + Tcl_Obj *resultObjPtr; + static const char *const options[] = { + "-unwind", "--", NULL + }; + enum option { + OPT_UNWIND, OPT_LAST + }; - if (objc > 5) { - Tcl_WrongNumArgs(interp, 1, objv, "?-unwind? ?--? ?path? ?result?"); - return TCL_ERROR; - } + if (objc > 6) { + Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); + return TCL_ERROR; + } - flags = 0; + flags = 0; - for (i = 1; i < objc; i++) { - if (TclGetString(objv[i])[0] != '-') { - break; - } - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, &index) - != TCL_OK) { - return TCL_ERROR; + for (i = 2; i < objc; i++) { + if (TclGetString(objv[i])[0] != '-') { + break; + } + if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + + switch ((enum option) index) { + case OPT_UNWIND: + /* + * The evaluation stack in the target interp is to be + * unwound. + */ + flags |= TCL_CANCEL_UNWIND; + break; + case OPT_LAST: + i++; + goto endOfForLoop; + } } - switch ((enum option) index) { - case OPT_UNWIND: - /* - * The evaluation stack in the target interp is to be - * unwound. - */ - flags |= TCL_CANCEL_UNWIND; - break; - case OPT_LAST: + endOfForLoop: + + /* + * Did they specify a slave interp to cancel the script in + * progress in? If not, use the current interp. + */ + + if (i < objc) { + slaveInterp = GetInterp(interp, objv[i]); i++; - goto endOfForLoop; + } else { + slaveInterp = interp; } - } - endOfForLoop: - - /* - * Did they specify a slave interp to cancel the script in - * progress in? If not, use the current interp. - */ + if (slaveInterp != NULL) { + if (i < objc) { + resultObjPtr = objv[i]; + Tcl_IncrRefCount(resultObjPtr); /* Tcl_CancelEval removes this ref. */ + i++; + } else { + resultObjPtr = NULL; + } - if (i < objc) { - slaveInterp = GetInterp(interp, objv[i]); - if (slaveInterp == NULL) { + return Tcl_CancelEval(slaveInterp, resultObjPtr, 0, flags); + } else { return TCL_ERROR; } - i++; - } else { - slaveInterp = interp; - } - - if (i < objc) { - resultObjPtr = objv[i]; - Tcl_IncrRefCount(resultObjPtr); /* Tcl_CancelEval removes this ref. */ - } else { - resultObjPtr = NULL; } + case OPT_CREATE: { + int i, last, safe; + Tcl_Obj *slavePtr; + char buf[16 + TCL_INTEGER_SPACE]; + static const char *const options[] = { + "-safe", "--", NULL + }; + enum option { + OPT_SAFE, OPT_LAST + }; - return Tcl_CancelEval(slaveInterp, resultObjPtr, 0, flags); -} - -/* - *---------------------------------------------------------------------- - * - * InterpCreateCmd-- - * - * Implements the "interp create" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpCreateCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - int i, last, safe, index; - Tcl_Obj *slavePtr; - char buf[16 + TCL_INTEGER_SPACE]; - static const char *const options[] = { - "-safe", "--", NULL - }; - enum option { - OPT_SAFE, OPT_LAST - }; - - safe = Tcl_IsSafe(interp); + safe = Tcl_IsSafe(interp); - /* - * TODO: Get rid of this nonsense. - * Weird historical rules: "-safe" is accepted at the end, too. - */ + /* + * Weird historical rules: "-safe" is accepted at the end, too. + */ - slavePtr = NULL; - last = 0; - for (i = 1; i < objc; i++) { - if ((last == 0) && (Tcl_GetString(objv[i])[0] == '-')) { - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, - &index) != TCL_OK) { + slavePtr = NULL; + last = 0; + for (i = 2; i < objc; i++) { + if ((last == 0) && (Tcl_GetString(objv[i])[0] == '-')) { + if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + if (index == OPT_SAFE) { + safe = 1; + continue; + } + i++; + last = 1; + } + if (slavePtr != NULL) { + Tcl_WrongNumArgs(interp, 2, objv, "?-safe? ?--? ?path?"); return TCL_ERROR; } - if (index == OPT_SAFE) { - safe = 1; - continue; + if (i < objc) { + slavePtr = objv[i]; } - i++; - last = 1; } - if (slavePtr != NULL) { - Tcl_WrongNumArgs(interp, 1, objv, "?-safe? ?--? ?path?"); + buf[0] = '\0'; + if (slavePtr == NULL) { + /* + * Create an anonymous interpreter -- we choose its name and the + * name of the command. We check that the command name that we use + * for the interpreter does not collide with an existing command + * in the master interpreter. + */ + + for (i = 0; ; i++) { + Tcl_CmdInfo cmdInfo; + + sprintf(buf, "interp%d", i); + if (Tcl_GetCommandInfo(interp, buf, &cmdInfo) == 0) { + break; + } + } + slavePtr = Tcl_NewStringObj(buf, -1); + } + if (SlaveCreate(interp, slavePtr, safe) == NULL) { + if (buf[0] != '\0') { + Tcl_DecrRefCount(slavePtr); + } return TCL_ERROR; } - if (i < objc) { - slavePtr = objv[i]; + Tcl_SetObjResult(interp, slavePtr); + return TCL_OK; + } + case OPT_DELETE: { + int i; + InterpInfo *iiPtr; + Tcl_Interp *slaveInterp; + + for (i = 2; i < objc; i++) { + slaveInterp = GetInterp(interp, objv[i]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } else if (slaveInterp == interp) { + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "cannot delete the current interpreter", -1)); + return TCL_ERROR; + } + iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; + Tcl_DeleteCommandFromToken(iiPtr->slave.masterInterp, + iiPtr->slave.interpCmd); } + return TCL_OK; } - buf[0] = '\0'; - if (slavePtr == NULL) { - /* - * Create an anonymous interpreter -- we choose its name and the - * name of the command. We check that the command name that we use - * for the interpreter does not collide with an existing command - * in the master interpreter. - */ + case OPT_EVAL: { + Tcl_Interp *slaveInterp; - for (i = 0; ; i++) { - Tcl_CmdInfo cmdInfo; + if (objc < 4) { + Tcl_WrongNumArgs(interp, 2, objv, "path arg ?arg ...?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveEval(interp, slaveInterp, objc - 3, objv + 3); + } + case OPT_EXISTS: { + int exists; + Tcl_Interp *slaveInterp; - /* - * TODO: Better scheme than this?! Also, verify that - * [interp create] in non-global namespace contexts can't - * lead to a situation where a global command isn't detected, - * and gets stomped on. - */ - sprintf(buf, "interp%d", i); - if (Tcl_GetCommandInfo(interp, buf, &cmdInfo) == 0) { - break; + exists = 1; + slaveInterp = GetInterp2(interp, objc, objv); + if (slaveInterp == NULL) { + if (objc > 3) { + return TCL_ERROR; } + Tcl_ResetResult(interp); + exists = 0; } - slavePtr = Tcl_NewStringObj(buf, -1); + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(exists)); + return TCL_OK; } - if (SlaveCreate(interp, slavePtr, safe) == NULL) { - if (buf[0] != '\0') { - Tcl_DecrRefCount(slavePtr); + case OPT_EXPOSE: { + Tcl_Interp *slaveInterp; + + if ((objc < 4) || (objc > 5)) { + Tcl_WrongNumArgs(interp, 2, objv, "path hiddenCmdName ?cmdName?"); + return TCL_ERROR; } - return TCL_ERROR; + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveExpose(interp, slaveInterp, objc - 3, objv + 3); } - Tcl_SetObjResult(interp, slavePtr); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * InterpDeleteCmd-- - * - * Implements the "interp delete" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpDeleteCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - int i; - InterpInfo *iiPtr; - Tcl_Interp *slaveInterp; + case OPT_HIDE: { + Tcl_Interp *slaveInterp; /* A slave. */ - for (i = 1; i < objc; i++) { - slaveInterp = GetInterp(interp, objv[i]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } else if (slaveInterp == interp) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "cannot delete the current interpreter", -1)); - return TCL_ERROR; - } - iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; - Tcl_DeleteCommandFromToken(iiPtr->slave.masterInterp, - iiPtr->slave.interpCmd); - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * InterpEvalCmd-- - * - * Implements the "interp eval" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpEvalCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; - - if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "path arg ?arg ...?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveEval(interp, slaveInterp, objc - 2, objv + 2); -} - -/* - *---------------------------------------------------------------------- - * - * InterpExistsCmd-- - * - * Implements the "interp exists" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpExistsCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - int exists = 1; - Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); - - if (slaveInterp == NULL) { - if (objc > 2) { + if ((objc < 4) || (objc > 5)) { + Tcl_WrongNumArgs(interp, 2, objv, "path cmdName ?hiddenCmdName?"); return TCL_ERROR; } - Tcl_ResetResult(interp); - exists = 0; - } - Tcl_SetObjResult(interp, Tcl_NewBooleanObj(exists)); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * InterpExposeCmd-- - * - * Implements the "interp expose" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpExposeCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; - - if ((objc < 3) || (objc > 4)) { - Tcl_WrongNumArgs(interp, 1, objv, "path hiddenCmdName ?cmdName?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveExpose(interp, slaveInterp, objc - 2, objv + 2); -} - -/* - *---------------------------------------------------------------------- - * - * InterpHiddenCmd-- - * - * Implements the "interp hidden" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpHiddenCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); - - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveHidden(interp, slaveInterp); -} - -/* - *---------------------------------------------------------------------- - * - * InterpHideCmd-- - * - * Implements the "interp hide" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpHideCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; /* A slave. */ - - if ((objc < 3) || (objc > 4)) { - Tcl_WrongNumArgs(interp, 1, objv, "path cmdName ?hiddenCmdName?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveHide(interp, slaveInterp, objc - 2, objv + 2); -} - -/* - *---------------------------------------------------------------------- - * - * InterpInvokeHiddenCmd-- - * - * Implements the "interp invokehidden" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpInvokeHiddenCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - int i, index; - const char *namespaceName; - Tcl_Interp *slaveInterp; - static const char *const hiddenOptions[] = { - "-global", "-namespace", "--", NULL - }; - enum hiddenOption { - OPT_GLOBAL, OPT_NAMESPACE, OPT_LAST - }; - - namespaceName = NULL; - for (i = 2; i < objc; i++) { - if (TclGetString(objv[i])[0] != '-') { - break; - } - if (Tcl_GetIndexFromObj(interp, objv[i], hiddenOptions, "option", 0, - &index) != TCL_OK) { + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { return TCL_ERROR; } - if (index == OPT_GLOBAL) { - namespaceName = "::"; - } else if (index == OPT_NAMESPACE) { - if (++i == objc) { /* There must be more arguments. */ - break; - } else { - namespaceName = TclGetString(objv[i]); - } - } else { - i++; - break; - } - } - if (objc - i < 1) { - Tcl_WrongNumArgs(interp, 1, objv, - "path ?-namespace ns? ?-global? ?--? cmd ?arg ..?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveInvokeHidden(interp, slaveInterp, namespaceName, objc - i, - objv + i); -} - -/* - *---------------------------------------------------------------------- - * - * InterpIsSafeCmd-- - * - * Implements the "interp issafe" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpIsSafeCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); - - if (slaveInterp == NULL) { - return TCL_ERROR; - } - Tcl_SetObjResult(interp, Tcl_NewBooleanObj(Tcl_IsSafe(slaveInterp))); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * InterpLimitCmd-- - * - * Implements the "interp limit" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpLimitCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; - static const char *const limitTypes[] = { - "commands", "time", NULL - }; - enum LimitTypes { - LIMIT_TYPE_COMMANDS, LIMIT_TYPE_TIME - }; - int limitType; - - if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "path limitType ?-option value ...?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - if (Tcl_GetIndexFromObj(interp, objv[2], limitTypes, "limit type", 0, - &limitType) != TCL_OK) { - return TCL_ERROR; - } - switch ((enum LimitTypes) limitType) { - case LIMIT_TYPE_COMMANDS: - return SlaveCommandLimitCmd(interp, slaveInterp, 3, objc,objv); - case LIMIT_TYPE_TIME: - return SlaveTimeLimitCmd(interp, slaveInterp, 3, objc, objv); - } - /* NOTREACHED */ - return TCL_ERROR; -} - -/* - *---------------------------------------------------------------------- - * - * InterpMarkTrustedCmd-- - * - * Implements the "interp marktrusted" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpMarkTrustedCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; - - if (objc != 2) { - Tcl_WrongNumArgs(interp, 1, objv, "path"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } - return SlaveMarkTrusted(interp, slaveInterp); -} - -/* - *---------------------------------------------------------------------- - * - * InterpRecursionLimitCmd-- - * - * Implements the "interp recursionlimit" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpRecursionLimitCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; - - if (objc != 2 && objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "path ?newlimit?"); - return TCL_ERROR; - } - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; + return SlaveHide(interp, slaveInterp, objc - 3, objv + 3); } - return SlaveRecursionLimit(interp, slaveInterp, objc - 2, objv + 2); -} - -/* - *---------------------------------------------------------------------- - * - * InterpShareCmd-- - * - * Implements the "interp share" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpShareCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - return InterpShareTransferCommon(interp, objc, objv, 0); -} - -/* - *---------------------------------------------------------------------- - * - * InterpSlavesCmd-- - * - * Implements the "interp slaves" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpSlavesCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp = GetInterp2(interp, objc, objv); - InterpInfo *iiPtr; - Tcl_Obj *resultPtr; - Tcl_HashEntry *hPtr; - Tcl_HashSearch hashSearch; + case OPT_HIDDEN: { + Tcl_Interp *slaveInterp; /* A slave. */ - if (slaveInterp == NULL) { - return TCL_ERROR; + slaveInterp = GetInterp2(interp, objc, objv); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveHidden(interp, slaveInterp); } - iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; - resultPtr = Tcl_NewObj(); - hPtr = Tcl_FirstHashEntry(&iiPtr->master.slaveTable, &hashSearch); - for ( ; hPtr != NULL; hPtr = Tcl_NextHashEntry(&hashSearch)) { - Tcl_ListObjAppendElement(NULL, resultPtr, Tcl_NewStringObj( - Tcl_GetHashKey(&iiPtr->master.slaveTable, hPtr), -1)); + case OPT_ISSAFE: { + Tcl_Interp *slaveInterp; + + slaveInterp = GetInterp2(interp, objc, objv); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_NewBooleanObj(Tcl_IsSafe(slaveInterp))); + return TCL_OK; } - Tcl_SetObjResult(interp, resultPtr); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * InterpShareTransferCommon-- - * - * The common portion of the "interp slaves" and "interp transfer" - * Tcl commands. See the user documentation for details. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpShareTransferCommon( - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[], /* Argument objects. */ - int transfer) /* 1 for transfer, 0 for share */ -{ - Tcl_Interp *slaveInterp; /* A slave. */ - Tcl_Interp *masterInterp; /* Its master. */ - Tcl_Channel chan; + case OPT_INVOKEHID: { + int i, index; + const char *namespaceName; + Tcl_Interp *slaveInterp; + static const char *const hiddenOptions[] = { + "-global", "-namespace", "--", NULL + }; + enum hiddenOption { + OPT_GLOBAL, OPT_NAMESPACE, OPT_LAST + }; - if (objc != 4) { - Tcl_WrongNumArgs(interp, 1, objv, "srcPath channelId destPath"); - return TCL_ERROR; + namespaceName = NULL; + for (i = 3; i < objc; i++) { + if (TclGetString(objv[i])[0] != '-') { + break; + } + if (Tcl_GetIndexFromObj(interp, objv[i], hiddenOptions, "option", + 0, &index) != TCL_OK) { + return TCL_ERROR; + } + if (index == OPT_GLOBAL) { + namespaceName = "::"; + } else if (index == OPT_NAMESPACE) { + if (++i == objc) { /* There must be more arguments. */ + break; + } else { + namespaceName = TclGetString(objv[i]); + } + } else { + i++; + break; + } + } + if (objc - i < 1) { + Tcl_WrongNumArgs(interp, 2, objv, + "path ?-namespace ns? ?-global? ?--? cmd ?arg ..?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveInvokeHidden(interp, slaveInterp, namespaceName, objc - i, + objv + i); } - masterInterp = GetInterp(interp, objv[1]); - if (masterInterp == NULL) { - return TCL_ERROR; + case OPT_LIMIT: { + Tcl_Interp *slaveInterp; + static const char *const limitTypes[] = { + "commands", "time", NULL + }; + enum LimitTypes { + LIMIT_TYPE_COMMANDS, LIMIT_TYPE_TIME + }; + int limitType; + + if (objc < 4) { + Tcl_WrongNumArgs(interp, 2, objv, "path limitType ?-option value ...?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + if (Tcl_GetIndexFromObj(interp, objv[3], limitTypes, "limit type", 0, + &limitType) != TCL_OK) { + return TCL_ERROR; + } + switch ((enum LimitTypes) limitType) { + case LIMIT_TYPE_COMMANDS: + return SlaveCommandLimitCmd(interp, slaveInterp, 4, objc,objv); + case LIMIT_TYPE_TIME: + return SlaveTimeLimitCmd(interp, slaveInterp, 4, objc, objv); + } } - chan = Tcl_GetChannel(masterInterp, TclGetString(objv[2]), NULL); - if (chan == NULL) { - /* TODO: pass TCL_ERROR */ - Tcl_TransferResult(masterInterp, TCL_OK, interp); - return TCL_ERROR; + case OPT_MARKTRUSTED: { + Tcl_Interp *slaveInterp; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "path"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveMarkTrusted(interp, slaveInterp); } - slaveInterp = GetInterp(interp, objv[3]); - if (slaveInterp == NULL) { - return TCL_ERROR; + case OPT_RECLIMIT: { + Tcl_Interp *slaveInterp; + + if (objc != 3 && objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "path ?newlimit?"); + return TCL_ERROR; + } + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + return SlaveRecursionLimit(interp, slaveInterp, objc - 3, objv + 3); + } + case OPT_SLAVES: { + Tcl_Interp *slaveInterp; + InterpInfo *iiPtr; + Tcl_Obj *resultPtr; + Tcl_HashEntry *hPtr; + Tcl_HashSearch hashSearch; + char *string; + + slaveInterp = GetInterp2(interp, objc, objv); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; + resultPtr = Tcl_NewObj(); + hPtr = Tcl_FirstHashEntry(&iiPtr->master.slaveTable, &hashSearch); + for ( ; hPtr != NULL; hPtr = Tcl_NextHashEntry(&hashSearch)) { + string = Tcl_GetHashKey(&iiPtr->master.slaveTable, hPtr); + Tcl_ListObjAppendElement(NULL, resultPtr, + Tcl_NewStringObj(string, -1)); + } + Tcl_SetObjResult(interp, resultPtr); + return TCL_OK; } - Tcl_RegisterChannel(slaveInterp, chan); - if (transfer) { - /* - * When transferring, as opposed to sharing, we must unhitch the - * channel from the interpreter where it started. - */ + case OPT_TRANSFER: + case OPT_SHARE: { + Tcl_Interp *slaveInterp; /* A slave. */ + Tcl_Interp *masterInterp; /* Its master. */ + Tcl_Channel chan; - if (Tcl_UnregisterChannel(masterInterp, chan) != TCL_OK) { - /* TODO: pass TCL_ERROR */ + if (objc != 5) { + Tcl_WrongNumArgs(interp, 2, objv, "srcPath channelId destPath"); + return TCL_ERROR; + } + masterInterp = GetInterp(interp, objv[2]); + if (masterInterp == NULL) { + return TCL_ERROR; + } + chan = Tcl_GetChannel(masterInterp, TclGetString(objv[3]), NULL); + if (chan == NULL) { Tcl_TransferResult(masterInterp, TCL_OK, interp); return TCL_ERROR; } - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * InterpTargetCmd-- - * - * Implements the "interp target" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpTargetCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *slaveInterp; - InterpInfo *iiPtr; - Tcl_HashEntry *hPtr; - Alias *aliasPtr; - char *aliasName; + slaveInterp = GetInterp(interp, objv[4]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } + Tcl_RegisterChannel(slaveInterp, chan); + if (index == OPT_TRANSFER) { + /* + * When transferring, as opposed to sharing, we must unhitch the + * channel from the interpreter where it started. + */ - if (objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "path alias"); - return TCL_ERROR; + if (Tcl_UnregisterChannel(masterInterp, chan) != TCL_OK) { + Tcl_TransferResult(masterInterp, TCL_OK, interp); + return TCL_ERROR; + } + } + return TCL_OK; } + case OPT_TARGET: { + Tcl_Interp *slaveInterp; + InterpInfo *iiPtr; + Tcl_HashEntry *hPtr; + Alias *aliasPtr; + char *aliasName; - slaveInterp = GetInterp(interp, objv[1]); - if (slaveInterp == NULL) { - return TCL_ERROR; - } + if (objc != 4) { + Tcl_WrongNumArgs(interp, 2, objv, "path alias"); + return TCL_ERROR; + } + + slaveInterp = GetInterp(interp, objv[2]); + if (slaveInterp == NULL) { + return TCL_ERROR; + } - aliasName = TclGetString(objv[2]); + aliasName = TclGetString(objv[3]); - iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; - hPtr = Tcl_FindHashEntry(&iiPtr->slave.aliasTable, aliasName); - if (hPtr == NULL) { - Tcl_AppendResult(interp, "alias \"", aliasName, "\" in path \"", - Tcl_GetString(objv[1]), "\" not found", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, NULL); - return TCL_ERROR; + iiPtr = (InterpInfo *) ((Interp *) slaveInterp)->interpInfo; + hPtr = Tcl_FindHashEntry(&iiPtr->slave.aliasTable, aliasName); + if (hPtr == NULL) { + Tcl_AppendResult(interp, "alias \"", aliasName, "\" in path \"", + Tcl_GetString(objv[2]), "\" not found", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, + NULL); + return TCL_ERROR; + } + aliasPtr = Tcl_GetHashValue(hPtr); + if (Tcl_GetInterpPath(interp, aliasPtr->targetInterp) != TCL_OK) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "target interpreter for alias \"", + aliasName, "\" in path \"", Tcl_GetString(objv[2]), + "\" is not my descendant", NULL); + return TCL_ERROR; + } + return TCL_OK; } - aliasPtr = Tcl_GetHashValue(hPtr); - if (Tcl_GetInterpPath(interp, aliasPtr->targetInterp) != TCL_OK) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "target interpreter for alias \"", - aliasName, "\" in path \"", Tcl_GetString(objv[1]), - "\" is not my descendant", NULL); - return TCL_ERROR; } return TCL_OK; } /* - *---------------------------------------------------------------------- - * - * InterpTransferCmd-- - * - * Implements the "interp transfer" Tcl command. - * See the user documentation for details on what it does. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * See the user documentation. - * - *---------------------------------------------------------------------- - */ - /* ARGSUSED */ -static int -InterpTransferCmd( - ClientData clientData, /* Unused. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - return InterpShareTransferCommon(interp, objc, objv, 1); -} - -/* *--------------------------------------------------------------------------- * * GetInterp2 -- @@ -1617,12 +1102,12 @@ GetInterp2( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - if (objc == 1) { + if (objc == 2) { return interp; - } else if (objc == 2) { - return GetInterp(interp, objv[1]); + } else if (objc == 3) { + return GetInterp(interp, objv[2]); } else { - Tcl_WrongNumArgs(interp, 1, objv, "?path?"); + Tcl_WrongNumArgs(interp, 2, objv, "?path?"); return NULL; } } diff --git a/tests/interp.test b/tests/interp.test index 6c22b5e..6a5ba41 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.63 2009/01/30 16:01:34 dgp Exp $ +# RCS: @(#) $Id: interp.test,v 1.64 2009/02/02 06:02:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -18,7 +18,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testinterpdelete [llength [info commands testinterpdelete]] -testConstraint interpNotEnsemble [expr ![namespace ensemble exists ::interp]] set hidden_cmds {cd encoding exec exit fconfigure file glob load open pwd socket source unload} @@ -27,10 +26,10 @@ foreach i [interp slaves] { } # Part 0: Check out options for interp command -test interp-1.1 {options for interp command} interpNotEnsemble { +test interp-1.1 {options for interp command} { list [catch {interp} msg] $msg } {1 {wrong # args: should be "interp cmd ?arg ...?"}} -test interp-1.2 {options for interp command} interpNotEnsemble { +test interp-1.2 {options for interp command} { list [catch {interp frobox} msg] $msg } {1 {bad option "frobox": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.3 {options for interp command} { @@ -48,13 +47,13 @@ test interp-1.5 {options for interp command} { test interp-1.6 {options for interp command} { list [catch {interp slaves foo bar zop} msg] $msg } {1 {wrong # args: should be "interp slaves ?path?"}} -test interp-1.7 {options for interp command} interpNotEnsemble { +test interp-1.7 {options for interp command} { list [catch {interp hello} msg] $msg } {1 {bad option "hello": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.8 {options for interp command} interpNotEnsemble { +test interp-1.8 {options for interp command} { list [catch {interp -froboz} msg] $msg } {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.9 {options for interp command} interpNotEnsemble { +test interp-1.9 {options for interp command} { list [catch {interp -froboz -safe} msg] $msg } {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} test interp-1.10 {options for interp command} { @@ -2369,11 +2368,13 @@ test interp-28.2 {master's nsName cache should not cross} -setup { $i eval { set x {namespace children ::} set y [list namespace children ::] - set j [interp create] namespace delete {*}[{*}$y] + set j [interp create] $j eval {namespace delete {*}[namespace children ::]} namespace eval foo {} - list [eval $x] [eval $y] [$j eval $x] [$j eval $y] + set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] + interp delete $j + set res } } -cleanup { interp delete $i @@ -2567,8 +2568,8 @@ test interp-29.3.4 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} [expr {5+[namespace ensemble exists ::interp]}] - set x ok + interp recursionlimit {} 5 + set x ok } } } @@ -2588,8 +2589,8 @@ test interp-29.3.5 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} [expr {4+[namespace ensemble exists ::interp]}] - set x ok + interp recursionlimit {} 4 + set x ok } } } @@ -2609,8 +2610,8 @@ test interp-29.3.6 {recursion limit error reporting} { eval { # 3 eval { # 4 eval { # 5 - interp recursionlimit {} [expr {6+[namespace ensemble exists ::interp]}] - set x ok + interp recursionlimit {} 6 + set x ok } } } diff --git a/tests/nre.test b/tests/nre.test index 873eb14..dd86e18 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.7 2009/01/29 17:13:50 dgp Exp $ +# RCS: @(#) $Id: nre.test,v 1.8 2009/02/02 06:02:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -394,11 +394,13 @@ test nre-X.1 {eval in wrong interp} { set res [$i eval { set x {namespace children ::} set y [list namespace children ::] - set j [interp create] namespace delete {*}[{*}$y] + set j [interp create] $j eval {namespace delete {*}[namespace children ::]} namespace eval foo {} - list [eval $x] [eval $y] [$j eval $x] [$j eval $y] + set res [list [eval $x] [eval $y] [$j eval $x] [$j eval $y]] + interp delete $j + set res }] interp delete $i set res -- cgit v0.12 From bc8de2fe434eaa5961793b2e00ce90e55e710433 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 3 Feb 2009 17:15:28 +0000 Subject: * generic/tclObj.c (Tcl_GetStringFromObj): Reduce code duplication. --- ChangeLog | 4 ++++ generic/tclObj.c | 10 ++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 095a210..af279be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-03 Don Porter + + * generic/tclObj.c (Tcl_GetStringFromObj): Reduce code duplication. + 2009-02-02 Don Porter * generic/tclInterp.c: Reverted the conversion of [interp] into an diff --git a/generic/tclObj.c b/generic/tclObj.c index 2b2219a..93cf2f4 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.147 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.148 2009/02/03 17:15:28 dgp Exp $ */ #include "tclInt.h" @@ -1099,13 +1099,7 @@ Tcl_GetStringFromObj( * rep's byte array length should * be stored. * If NULL, no length is stored. */ { - if (objPtr->bytes == NULL) { - if (objPtr->typePtr->updateStringProc == NULL) { - Tcl_Panic("UpdateStringProc should not be invoked for type %s", - objPtr->typePtr->name); - } - objPtr->typePtr->updateStringProc(objPtr); - } + (void) TclGetString(objPtr); if (lengthPtr != NULL) { *lengthPtr = objPtr->length; -- cgit v0.12 From c5b1811e0b0594c5549206669adcc79215551d09 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 3 Feb 2009 18:10:22 +0000 Subject: * generic/tclStringObj.c (SetUnicodeObj): Corrected failure of Tcl_SetUnicodeObj() to panic on a shared object. [Bug 2561488]. Also factored out common code to reduce duplication. --- ChangeLog | 4 +++ generic/tclStringObj.c | 71 ++++++++++++++++++++------------------------------ 2 files changed, 32 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index af279be..d29a14c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-02-03 Don Porter + * generic/tclStringObj.c (SetUnicodeObj): Corrected failure of + Tcl_SetUnicodeObj() to panic on a shared object. [Bug 2561488]. Also + factored out common code to reduce duplication. + * generic/tclObj.c (Tcl_GetStringFromObj): Reduce code duplication. 2009-02-02 Don Porter diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index da80876..df7521d 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.81 2009/02/02 05:54:53 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.82 2009/02/03 18:10:22 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -57,6 +57,8 @@ static void FreeStringInternalRep(Tcl_Obj *objPtr); static void DupStringInternalRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); static int SetStringFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); +static void SetUnicodeObj(Tcl_Obj *objPtr, + const Tcl_UniChar *unicode, int numChars); static void UpdateStringOfString(Tcl_Obj *objPtr); /* @@ -325,35 +327,9 @@ Tcl_NewUnicodeObj( * string. */ { Tcl_Obj *objPtr; - String *stringPtr; - size_t uallocated; - - if (numChars < 0) { - numChars = 0; - if (unicode) { - while (unicode[numChars] != 0) { - numChars++; - } - } - } - uallocated = STRING_UALLOC(numChars); - - /* - * Create a new obj with an invalid string rep. - */ TclNewObj(objPtr); - Tcl_InvalidateStringRep(objPtr); - objPtr->typePtr = &tclStringType; - - stringPtr = stringAlloc(uallocated); - stringPtr->numChars = numChars; - stringPtr->uallocated = uallocated; - stringPtr->hasUnicode = (numChars > 0); - stringPtr->allocated = 0; - memcpy(stringPtr->unicode, unicode, uallocated); - stringPtr->unicode[numChars] = 0; - SET_STRING(objPtr, stringPtr); + SetUnicodeObj(objPtr, unicode, numChars); return objPtr; } @@ -708,11 +684,6 @@ Tcl_SetStringObj( * when initializing the object. If negative, * use bytes up to the first NUL byte.*/ { - /* - * Free any old string rep, then set the string rep to a copy of the - * length bytes starting at "bytes". - */ - if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetStringObj"); } @@ -724,6 +695,11 @@ Tcl_SetStringObj( TclFreeIntRep(objPtr); objPtr->typePtr = NULL; + /* + * Free any old string rep, then set the string rep to a copy of the + * length bytes starting at "bytes". + */ + Tcl_InvalidateStringRep(objPtr); if (length < 0) { length = (bytes? strlen(bytes) : 0); @@ -1006,6 +982,21 @@ Tcl_SetUnicodeObj( int numChars) /* Number of characters in the unicode * string. */ { + if (Tcl_IsShared(objPtr)) { + Tcl_Panic("%s called with shared object", "Tcl_SetUnicodeObj"); + } + TclFreeIntRep(objPtr); + SetUnicodeObj(objPtr, unicode, numChars); +} + +static void +SetUnicodeObj( + Tcl_Obj *objPtr, /* The object to set the string of. */ + const Tcl_UniChar *unicode, /* The unicode string used to initialize the + * object. */ + int numChars) /* Number of characters in the unicode + * string. */ +{ String *stringPtr; size_t uallocated; @@ -1017,20 +1008,14 @@ Tcl_SetUnicodeObj( } } } - uallocated = STRING_UALLOC(numChars); - - /* - * Free the internal rep if one exists, and invalidate the string rep. - */ - - TclFreeIntRep(objPtr); - objPtr->typePtr = &tclStringType; /* * Allocate enough space for the String structure + Unicode string. */ + uallocated = STRING_UALLOC(numChars); stringPtr = stringAlloc(uallocated); + stringPtr->numChars = numChars; stringPtr->uallocated = uallocated; stringPtr->hasUnicode = (numChars > 0); @@ -1038,9 +1023,9 @@ Tcl_SetUnicodeObj( memcpy(stringPtr->unicode, unicode, uallocated); stringPtr->unicode[numChars] = 0; - SET_STRING(objPtr, stringPtr); Tcl_InvalidateStringRep(objPtr); - return; + objPtr->typePtr = &tclStringType; + SET_STRING(objPtr, stringPtr); } /* -- cgit v0.12 From 8241e0c897749cfb51138f389c8dfe44596f739f Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 3 Feb 2009 18:16:07 +0000 Subject: Fix for [Bug 2558422] though this area is still a mess. --- ChangeLog | 19 ++++++++++++------- generic/tclObj.c | 12 ++++++++++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d29a14c..993b64e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-03 Donal K. Fellows + + * generic/tclObj.c (tclCmdNameType): [Bug 2558422]: Corrected the type + of this structure so that extensions that write it (yuk!) will still + be able to function correctly. + 2009-02-03 Don Porter * generic/tclStringObj.c (SetUnicodeObj): Corrected failure of @@ -15,18 +21,17 @@ significant forkage of the 8.5 and 8.6 implementations -- that are better off avoided if there's no gain. - * generic/tclStringObj.c (STRING_NOMEM): Add missing cast of - NULL to (char *) that upsets some compilers. [Bug 2494093]. + * generic/tclStringObj.c (STRING_NOMEM): [Bug 2494093]: Add missing + cast of NULL to (char *) that upsets some compilers. - * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): Added - protections against callers asking for negative lengths. It is + * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): [Bug 2553906]: + Added protections against callers asking for negative lengths. It is likely when this happens that an integer overflow is to blame. - [Bug 2553906]. 2009-02-01 David Gravereaux - * win/makefile.vc: Allow nmake flags such as -a (rebuild - all) to pass down to the pkgs targets, too. + * win/makefile.vc: Allow nmake flags such as -a (rebuild all) to pass + down to the pkgs targets, too. 2009-01-30 Donal K. Fellows diff --git a/generic/tclObj.c b/generic/tclObj.c index 93cf2f4..72de8f4 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.148 2009/02/03 17:15:28 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.149 2009/02/03 18:16:07 dkf Exp $ */ #include "tclInt.h" @@ -277,9 +277,17 @@ const Tcl_HashKeyType tclObjHashKeyType = { * ResolvedCmdName pointer, but DO NOT DO THIS. It seems that some extensions * use the second internal pointer field of the twoPtrValue field for their * own purposes. + * + * TRICKY POINT! Some extensions update this structure! (Notably, these + * include TclBlend and TCom). This is highly ill-advised on their part, but + * does allow them to delete a command when references to it are gone, which + * is fragile but useful given their somewhat-OO style. Because of this, this + * structure MUST NOT be const so that the C compiler puts the data in + * writable memory. [Bug 2558422] + * TODO: Provide a better API for those extensions so that they can coexist... */ -static const Tcl_ObjType tclCmdNameType = { +Tcl_ObjType tclCmdNameType = { "cmdName", /* name */ FreeCmdNameInternalRep, /* freeIntRepProc */ DupCmdNameInternalRep, /* dupIntRepProc */ -- cgit v0.12 From 78da1e5f1b89986ba2526d799110ffc708040c21 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 3 Feb 2009 18:48:25 +0000 Subject: Added missing declaration of tclCmdNameType --- generic/tclInt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index ae1d45a..dba84fb 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.415 2009/01/27 00:01:49 ferrieux Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.416 2009/02/03 18:48:25 dkf Exp $ */ #ifndef _TCLINT @@ -2536,6 +2536,7 @@ MODULE_SCOPE const Tcl_ObjType tclEnsembleCmdType; MODULE_SCOPE const Tcl_ObjType tclWideIntType; #endif MODULE_SCOPE const Tcl_ObjType tclRegexpType; +MODULE_SCOPE Tcl_ObjType tclCmdNameType; /* * Variables denoting the hash key types defined in the core. -- cgit v0.12 From 6b40f13d26013e672072cb794817a2d322d8127e Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 3 Feb 2009 23:10:57 +0000 Subject: - eliminate some unnessary type casts - some internal const decorations - spacing --- ChangeLog | 15 +++++++++++++++ macosx/tclMacOSXFCmd.c | 4 ++-- unix/tclLoadDyld.c | 14 +++++++------- unix/tclUnixCompat.c | 6 +++--- unix/tclUnixFCmd.c | 12 ++++++------ unix/tclUnixFile.c | 7 ++++--- win/tclWinDde.c | 22 +++++++++++----------- win/tclWinFCmd.c | 6 +++--- win/tclWinInit.c | 4 ++-- win/tclWinLoad.c | 4 ++-- win/tclWinPipe.c | 4 ++-- win/tclWinReg.c | 26 +++++++++++++------------- win/tclWinTest.c | 4 ++-- 13 files changed, 72 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index 993b64e..b6f8800 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2009-02-03 Jan Nijtmans + + * macosx/tclMacOSXFCmd.c - eliminate some unnessary type casts + * unix/tclLoadDyld.c - some internal const decorations + * unix/tclUnixCompat.c - spacing + * unix/tclUnixFCmd.c + * unix/tclUnixFile.c + * win/tclWinDde.c + * win/tclWinFCmd.c + * win/tclWinInit.c + * win/tclWinLoad.c + * win/tclWinPipe.c + * win/tclWinReg.c + * win/tclWinTest.c + 2009-02-03 Donal K. Fellows * generic/tclObj.c (tclCmdNameType): [Bug 2558422]: Corrected the type diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index d1bab28..9d4e1a1 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.16 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.17 2009/02/03 23:10:57 nijtmans Exp $ */ #include "tclInt.h" @@ -624,7 +624,7 @@ SetOSTypeFromAny( Tcl_Interp *interp, /* Tcl interpreter */ Tcl_Obj *objPtr) /* Pointer to the object to convert */ { - char *string; + const char *string; int length, result = TCL_OK; Tcl_DString ds; Tcl_Encoding encoding = Tcl_GetEncoding(NULL, "macRoman"); diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 93d29ab..e30742b 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.30 2008/04/27 22:21:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.31 2009/02/03 23:10:57 nijtmans Exp $ */ #include "tclInt.h" @@ -629,14 +629,14 @@ TclpLoadMemory( uint32_t ms = 0; #ifndef __LP64__ const struct mach_header *mh = NULL; - #define mh_size sizeof(struct mach_header) - #define mh_magic MH_MAGIC - #define arch_abi 0 +# define mh_size sizeof(struct mach_header) +# define mh_magic MH_MAGIC +# define arch_abi 0 #else const struct mach_header_64 *mh = NULL; - #define mh_size sizeof(struct mach_header_64) - #define mh_magic MH_MAGIC_64 - #define arch_abi CPU_ARCH_ABI64 +# define mh_size sizeof(struct mach_header_64) +# define mh_magic MH_MAGIC_64 +# define arch_abi CPU_ARCH_ABI64 #endif if ((size_t) codeSize >= sizeof(struct fat_header) diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index e61f17d..727eaaf 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -6,7 +6,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixCompat.c,v 1.16 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclUnixCompat.c,v 1.17 2009/02/03 23:10:57 nijtmans Exp $ * */ @@ -127,7 +127,7 @@ static int CopyGrp(struct group *tgtPtr, char *buf, int buflen); static int CopyHostent(struct hostent *tgtPtr, char *buf, int buflen); static int CopyPwd(struct passwd *tgtPtr, char *buf, int buflen); -static int CopyString(char *src, char *buf, int buflen); +static int CopyString(const char *src, char *buf, int buflen); #endif #endif /* TCL_THREADS */ @@ -772,7 +772,7 @@ CopyArray( #ifdef NEED_COPYSTRING static int CopyString( - char *src, /* String to copy. */ + const char *src, /* String to copy. */ char *buf, /* Buffer to copy into. */ int buflen) /* Size of buffer. */ { diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 2523800..75fc727 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.71 2008/12/16 23:24:13 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.72 2009/02/03 23:10:57 nijtmans Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -86,7 +86,7 @@ static int SetPermissionsAttribute(Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); static int GetModeFromPermString(Tcl_Interp *interp, - char *modeStringPtr, mode_t *modePtr); + const char *modeStringPtr, mode_t *modePtr); #if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) static int GetReadOnlyAttribute(Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); @@ -1600,7 +1600,7 @@ SetPermissionsAttribute( mode_t newMode; int result = TCL_ERROR; const char *native; - char *modeStringPtr = TclGetString(attributePtr); + const char *modeStringPtr = TclGetString(attributePtr); int scanned = TclParseAllWhiteSpace(modeStringPtr, -1); /* @@ -1713,7 +1713,7 @@ TclpObjListVolumes(void) static int GetModeFromPermString( Tcl_Interp *interp, /* The interp we are using for errors. */ - char *modeStringPtr, /* Permissions string */ + const char *modeStringPtr, /* Permissions string */ mode_t *modePtr) /* pointer to the mode value */ { mode_t newMode; @@ -1906,10 +1906,10 @@ TclpObjNormalizePath( Tcl_Obj *pathPtr, int nextCheckpoint) { - char *currentPathEndPosition; + const char *currentPathEndPosition; int pathLen; char cur; - char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); + const char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); #ifndef NO_REALPATH char normPath[MAXPATHLEN]; Tcl_DString ds; diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index a24966c..8eabbbb 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFile.c,v 1.53 2008/04/27 22:21:34 dkf Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.54 2009/02/03 23:10:57 nijtmans Exp $ */ #include "tclInt.h" @@ -314,7 +314,7 @@ TclpMatchInDirectory( matchHiddenPat = (pattern[0] == '.') || ((pattern[0] == '\\') && (pattern[1] == '.')); - matchHidden = matchHiddenPat + matchHidden = matchHiddenPat || (types && (types->perm & TCL_GLOB_PERM_HIDDEN)); while ((entryPtr = TclOSreaddir(d)) != NULL) { /* INTL: Native. */ Tcl_DString utfDs; @@ -1080,7 +1080,8 @@ ClientData TclNativeCreateNativeRep( Tcl_Obj *pathPtr) { - char *nativePathPtr, *str; + char *nativePathPtr; + const char *str; Tcl_DString ds; Tcl_Obj *validPathPtr; int len; diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 30f50ce..1425e94 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.33 2008/10/14 22:43:29 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.34 2009/02/03 23:10:57 nijtmans Exp $ */ #include "tclInt.h" @@ -711,7 +711,7 @@ DdeServerProc( } if (convPtr != NULL) { - char *returnString; + const char *returnString; len = DdeQueryString(ddeInstance, ddeItem, NULL, 0, CP_WINANSI); Tcl_DStringInit(&dString); @@ -722,7 +722,7 @@ DdeServerProc( if (stricmp(utilString, TCL_DDE_EXECUTE_RESULT) == 0) { returnString = Tcl_GetStringFromObj(convPtr->returnPackagePtr, &len); - ddeReturn = DdeCreateDataHandle(ddeInstance, returnString, + ddeReturn = DdeCreateDataHandle(ddeInstance, (char *)returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT, 0); } else { if (Tcl_IsSafe(convPtr->riPtr->interp)) { @@ -735,7 +735,7 @@ DdeServerProc( returnString = Tcl_GetStringFromObj(variableObjPtr, &len); ddeReturn = DdeCreateDataHandle(ddeInstance, - returnString, (DWORD) len+1, 0, ddeItem, + (char *)returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT, 0); } else { ddeReturn = NULL; @@ -1345,7 +1345,7 @@ Tcl_DdeObjCmd( case DDE_EXECUTE: { int dataLength; - char *dataString = Tcl_GetStringFromObj(objv[firstArg + 2], + const char *dataString = Tcl_GetStringFromObj(objv[firstArg + 2], &dataLength); if (dataLength == 0) { @@ -1364,7 +1364,7 @@ Tcl_DdeObjCmd( break; } - ddeData = DdeCreateDataHandle(ddeInstance, dataString, + ddeData = DdeCreateDataHandle(ddeInstance, (char *)dataString, (DWORD) dataLength+1, 0, 0, CF_TEXT, 0); if (ddeData != NULL) { if (async) { @@ -1387,7 +1387,7 @@ Tcl_DdeObjCmd( break; } case DDE_REQUEST: { - char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); + const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); if (length == 0) { Tcl_SetObjResult(interp, @@ -1404,7 +1404,7 @@ Tcl_DdeObjCmd( result = TCL_ERROR; } else { Tcl_Obj *returnObjPtr; - ddeItem = DdeCreateStringHandle(ddeInstance, itemString, + ddeItem = DdeCreateStringHandle(ddeInstance, (char *)itemString, CP_WINANSI); if (ddeItem != NULL) { ddeData = DdeClientTransaction(NULL, 0, hConv, ddeItem, @@ -1435,8 +1435,8 @@ Tcl_DdeObjCmd( break; } case DDE_POKE: { - char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); - char *dataString; + const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); + const char *dataString; if (length == 0) { Tcl_SetObjResult(interp, @@ -1457,7 +1457,7 @@ Tcl_DdeObjCmd( ddeItem = DdeCreateStringHandle(ddeInstance, itemString, CP_WINANSI); if (ddeItem != NULL) { - ddeData = DdeClientTransaction(dataString, (DWORD) length+1, + ddeData = DdeClientTransaction((char *)dataString, (DWORD) length+1, hConv, ddeItem, CF_TEXT, XTYP_POKE, 5000, NULL); if (ddeData == NULL) { SetDdeError(interp); diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index c0de916..5b8e0d8 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.56 2008/12/16 23:24:13 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.57 2009/02/03 23:10:58 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1611,7 +1611,7 @@ GetWinFileAttributes( */ int len; - char *str = Tcl_GetStringFromObj(fileName,&len); + const char *str = Tcl_GetStringFromObj(fileName,&len); if (len < 4) { if (len == 0) { @@ -1721,7 +1721,7 @@ ConvertFileNameFormat( Tcl_DString ds; Tcl_DString dsTemp; TCHAR *nativeName; - char *tempString; + const char *tempString; int tempLen; WIN32_FIND_DATAT data; HANDLE handle; diff --git a/win/tclWinInit.c b/win/tclWinInit.c index f1e72de..1d348a7 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.80 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.81 2009/02/03 23:10:57 nijtmans Exp $ */ #include "tclWinInt.h" @@ -180,7 +180,7 @@ TclpInitLibraryPath( #define LIBRARY_SIZE 32 Tcl_Obj *pathPtr; char installLib[LIBRARY_SIZE]; - char *bytes; + const char *bytes; pathPtr = Tcl_NewObj(); diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 7202b24..af19ff1 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.22 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.23 2009/02/03 23:10:57 nijtmans Exp $ */ #include "tclWinInt.h" @@ -66,7 +66,7 @@ TclpDlopen( */ Tcl_DString ds; - char *fileName = Tcl_GetString(pathPtr); + const char *fileName = Tcl_GetString(pathPtr); nativeName = Tcl_WinUtfToTChar(fileName, -1, &ds); handle = tclWinProcs->loadLibraryProc(nativeName); diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 10caad7..b1dd26f 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.69 2008/12/03 09:51:45 dkf Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.70 2009/02/03 23:10:58 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1173,7 +1173,7 @@ TclpCreateProcess( * tcl dll. */ Tcl_Obj *tclExePtr, *pipeDllPtr; - char *start, *end; + const char *start, *end; int i, fileExists; Tcl_DString pipeDll; diff --git a/win/tclWinReg.c b/win/tclWinReg.c index c695b94..16b4b3e 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.44 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.45 2009/02/03 23:10:57 nijtmans Exp $ */ #include "tclInt.h" @@ -589,7 +589,7 @@ GetKeyNames( Tcl_Obj *keyNameObj, /* Key to enumerate. */ Tcl_Obj *patternObj) /* Optional match pattern. */ { - char *pattern; /* Pattern being matched against subkeys */ + const char *pattern; /* Pattern being matched against subkeys */ HKEY key; /* Handle to the key being examined */ DWORD subKeyCount; /* Number of subkeys to list */ DWORD maxSubKeyLen; /* Maximum string length of any subkey */ @@ -615,17 +615,17 @@ GetKeyNames( return TCL_ERROR; } - /* + /* * Determine how big a buffer is needed for enumerating subkeys, and * how many subkeys there are */ result = (*regWinProcs->regQueryInfoKeyProc) - (key, NULL, NULL, NULL, &subKeyCount, &maxSubKeyLen, NULL, NULL, + (key, NULL, NULL, NULL, &subKeyCount, &maxSubKeyLen, NULL, NULL, NULL, NULL, NULL, NULL); if (result != ERROR_SUCCESS) { Tcl_SetObjResult(interp, Tcl_NewObj()); - Tcl_AppendResult(interp, "unable to query key \"", + Tcl_AppendResult(interp, "unable to query key \"", Tcl_GetString(keyNameObj), "\": ", NULL); AppendSystemError(interp, result); RegCloseKey(key); @@ -707,7 +707,7 @@ GetType( DWORD result; DWORD type; Tcl_DString ds; - char *valueName; + const char *valueName; const char *nativeValue; int length; @@ -776,7 +776,7 @@ GetValue( Tcl_Obj *valueNameObj) /* Name of value to get. */ { HKEY key; - char *valueName; + const char *valueName; const char *nativeValue; DWORD result, length, type; Tcl_DString data, buf; @@ -913,7 +913,7 @@ GetValueNames( Tcl_Obj *resultPtr; DWORD index, size, maxSize, result; Tcl_DString buffer, ds; - char *pattern, *name; + const char *pattern, *name; /* * Attempt to open the key for enumeration. @@ -1304,7 +1304,7 @@ SetValue( DWORD result; HKEY key; int length; - char *valueName; + const char *valueName; Tcl_DString nameBuf; if (typeObj == NULL) { @@ -1321,7 +1321,7 @@ SetValue( } valueName = Tcl_GetStringFromObj(valueNameObj, &length); - valueName = (char *) Tcl_WinUtfToTChar(valueName, length, &nameBuf); + valueName = Tcl_WinUtfToTChar(valueName, length, &nameBuf); if (type == REG_DWORD || type == REG_DWORD_BIG_ENDIAN) { int value; @@ -1375,9 +1375,9 @@ SetValue( Tcl_DStringFree(&buf); } else if (type == REG_SZ || type == REG_EXPAND_SZ) { Tcl_DString buf; - char *data = Tcl_GetStringFromObj(dataObj, &length); + const char *data = Tcl_GetStringFromObj(dataObj, &length); - data = (char *) Tcl_WinUtfToTChar(data, length, &buf); + data = Tcl_WinUtfToTChar(data, length, &buf); /* * Include the null in the length, padding if needed for Unicode. @@ -1441,7 +1441,7 @@ BroadcastValue( LRESULT result, sendResult; UINT timeout = 3000; int len; - char *str; + const char *str; Tcl_Obj *objPtr; if ((objc != 3) && (objc != 5)) { diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 29e4974..35e7348 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTest.c,v 1.24 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinTest.c,v 1.25 2009/02/03 23:10:58 nijtmans Exp $ */ #include "tclInt.h" @@ -189,7 +189,7 @@ TestvolumetypeCmd( #define VOL_BUF_SIZE 32 int found; char volType[VOL_BUF_SIZE]; - char *path; + const char *path; if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?name?"); -- cgit v0.12 From 22d5aa3e9618d2c3f426a16282fbdb93be01b417 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 3 Feb 2009 23:34:32 +0000 Subject: - eliminate some unnessary type casts - some internal const decorations - spacing --- ChangeLog | 7 +++++++ generic/tclBasic.c | 20 ++++++++++---------- generic/tclBinary.c | 18 +++++++++--------- generic/tclCmdAH.c | 8 ++++---- generic/tclCmdIL.c | 28 ++++++++++++++-------------- generic/tclCmdMZ.c | 32 ++++++++++++++++++-------------- generic/tclCompCmds.c | 8 ++++---- generic/tclDictObj.c | 21 ++++++++++----------- 8 files changed, 76 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6f8800..56a77f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,13 @@ * win/tclWinPipe.c * win/tclWinReg.c * win/tclWinTest.c + * generic/tclBasic.c + * generic/tclBinary.c + * generic/tclCmdAH.c + * generic/tclCmdIL.c + * generic/tclCmdMZ.c + * generic/tclCompCmds.c + * generic/tclDictObj.c 2009-02-03 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0cd1196..b1a8d35 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.384 2009/01/28 16:28:32 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.385 2009/02/03 23:34:33 nijtmans Exp $ */ #include "tclInt.h" @@ -4141,7 +4141,7 @@ TclNREvalObjv( } if (TCL_DTRACE_CMD_ARGS_ENABLED()) { - char *a[10]; + const char *a[10]; int i = 0; while (i < 10) { @@ -4460,7 +4460,7 @@ TEOV_Error( { Interp *iPtr = (Interp *) interp; Tcl_Obj *listPtr; - char *cmdString; + const char *cmdString; int cmdLen; int objc = PTR2INT(data[0]); Tcl_Obj **objv = data[1]; @@ -4590,7 +4590,7 @@ TEOV_RunEnterTraces( int traceCode = TCL_OK; int cmdEpoch = cmdPtr->cmdEpoch; int newEpoch; - char *command; + const char *command; int length; Tcl_Obj *commandPtr; @@ -4648,7 +4648,7 @@ TEOV_RunLeaveTraces( int result) { Interp *iPtr = (Interp *) interp; - char *command; + const char *command; int length, objc; Tcl_Obj **objv; int traceCode = PTR2INT(data[0]); @@ -5862,7 +5862,7 @@ TclNREvalObjEx( * in the bytecode compiler. */ - char *script; + const char *script; int numSrcBytes; Tcl_IncrRefCount(objPtr); @@ -5953,7 +5953,7 @@ TEOEx_ByteCodeCallback( result = TclUpdateReturnInfo(iPtr); } if ((result != TCL_OK) && (result != TCL_ERROR) && !allowExceptions) { - char *script; + const char *script; int numSrcBytes; ProcessUnexpectedResult(interp, result); @@ -6363,7 +6363,7 @@ TclObjInvoke( { register Interp *iPtr = (Interp *) interp; Tcl_HashTable *hTblPtr; /* Table of hidden commands. */ - char *cmdName; /* Name of the command from objv[0]. */ + const char *cmdName; /* Name of the command from objv[0]. */ Tcl_HashEntry *hPtr = NULL; Command *cmdPtr; int result; @@ -7844,7 +7844,7 @@ Tcl_NRCallObjProc( TEOV_callback *rootPtr = TOP_CB(interp); if (TCL_DTRACE_CMD_ARGS_ENABLED()) { - char *a[10]; + const char *a[10]; int i = 0; while (i < 10) { @@ -8399,7 +8399,7 @@ TclNRCoroutineObjCmd( Tcl_Obj *cmdObjPtr; CallFrame *framePtr, **framePtrPtr; TEOV_callback *rootPtr = TOP_CB(interp); - char *fullName; + const char *fullName; const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 6802c10..68409d1 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.53 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.54 2009/02/03 23:34:32 nijtmans Exp $ */ #include "tclInt.h" @@ -61,7 +61,7 @@ static void DupByteArrayInternalRep(Tcl_Obj *srcPtr, static int FormatNumber(Tcl_Interp *interp, int type, Tcl_Obj *src, unsigned char **cursorPtr); static void FreeByteArrayInternalRep(Tcl_Obj *objPtr); -static int GetFormatSpec(char **formatPtr, char *cmdPtr, +static int GetFormatSpec(const char **formatPtr, char *cmdPtr, int *countPtr, int *flagsPtr); static Tcl_Obj * ScanNumber(unsigned char *buffer, int type, int flags, Tcl_HashTable **numberCachePtr); @@ -425,7 +425,7 @@ SetByteArrayFromAny( Tcl_Obj *objPtr) /* The object to convert to type ByteArray. */ { int length; - char *src, *srcEnd; + const char *src, *srcEnd; unsigned char *dst; ByteArray *byteArrayPtr; Tcl_UniChar ch; @@ -651,7 +651,7 @@ BinaryFormatCmd( int count; /* Count associated with current format * character. */ int flags; /* Format field flags */ - char *format; /* Pointer to current position in format + const char *format; /* Pointer to current position in format * string. */ Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */ unsigned char *buffer; /* Start of result buffer. */ @@ -659,7 +659,7 @@ BinaryFormatCmd( unsigned char *maxPos; /* Greatest position within result buffer that * cursor has visited.*/ const char *errorString; - char *errorValue, *str; + const char *errorValue, *str; int offset, size, length; if (objc < 2) { @@ -1155,13 +1155,13 @@ BinaryScanCmd( int count; /* Count associated with current format * character. */ int flags; /* Format field flags */ - char *format; /* Pointer to current position in format + const char *format; /* Pointer to current position in format * string. */ Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */ unsigned char *buffer; /* Start of result buffer. */ unsigned char *cursor; /* Current position within result buffer. */ const char *errorString; - char *str; + const char *str; int offset, size, length; int i; @@ -1520,7 +1520,7 @@ BinaryScanCmd( static int GetFormatSpec( - char **formatPtr, /* Pointer to format string. */ + const char **formatPtr, /* Pointer to format string. */ char *cmdPtr, /* Pointer to location of command char. */ int *countPtr, /* Pointer to repeat count value. */ int *flagsPtr) /* Pointer to field flags */ @@ -1555,7 +1555,7 @@ GetFormatSpec( (*formatPtr)++; *countPtr = BINARY_ALL; } else if (isdigit(UCHAR(**formatPtr))) { /* INTL: digit */ - *countPtr = strtoul(*formatPtr, formatPtr, 10); + *countPtr = strtoul(*formatPtr, (char **) formatPtr, 10); } else { *countPtr = BINARY_NOCOUNT; } diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 988f21f..c8829f8 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.114 2009/01/04 22:57:39 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.115 2009/02/03 23:34:33 nijtmans Exp $ */ #include "tclInt.h" @@ -126,7 +126,7 @@ Tcl_CaseObjCmd( { register int i; int body, result, caseObjc; - char *stringPtr, *arg; + const char *stringPtr, *arg; Tcl_Obj *const *caseObjv; Tcl_Obj *armPtr; @@ -163,7 +163,7 @@ Tcl_CaseObjCmd( for (i = 0; i < caseObjc; i += 2) { int patObjc, j; const char **patObjv; - char *pat; + const char *pat; unsigned char *p; if (i == caseObjc-1) { @@ -514,7 +514,7 @@ Tcl_EncodingObjCmd( Tcl_DString ds; Tcl_Encoding encoding; int length; - char *stringPtr; + const char *stringPtr; if (objc == 3) { encoding = Tcl_GetEncoding(interp, NULL); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 8dc4c12..be62444 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.164 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.165 2009/02/03 23:34:32 nijtmans Exp $ */ #include "tclInt.h" @@ -30,7 +30,7 @@ typedef struct SortElement { union { - char *strValuePtr; + const char *strValuePtr; long intValue; double doubleValue; Tcl_Obj *objValuePtr; @@ -103,7 +103,7 @@ typedef struct SortInfo { * Forward declarations for procedures defined in this file: */ -static int DictionaryCompare(char *left, char *right); +static int DictionaryCompare(const char *left, const char *right); static int InfoArgsCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int InfoBodyCmd(ClientData dummy, Tcl_Interp *interp, @@ -223,7 +223,7 @@ TclNRIfObjCmd( * check. */ Interp *iPtr = (Interp *) interp; int i, result, value; - char *clause; + const char *clause; i = 1; while (1) { @@ -431,7 +431,7 @@ InfoArgsCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; - char *name; + const char *name; Proc *procPtr; CompiledLocal *localPtr; Tcl_Obj *listObjPtr; @@ -492,7 +492,7 @@ InfoBodyCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; - char *name; + const char *name; Proc *procPtr; Tcl_Obj *bodyPtr, *resultPtr; @@ -602,7 +602,7 @@ InfoCommandsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *cmdName, *pattern; + const char *cmdName, *pattern; const char *simplePattern; register Tcl_HashEntry *entryPtr; Tcl_HashSearch search; @@ -917,7 +917,7 @@ InfoDefaultCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; - char *procName, *argName, *varName; + const char *procName, *argName, *varName; Proc *procPtr; CompiledLocal *localPtr; Tcl_Obj *valueObjPtr; @@ -998,7 +998,7 @@ TclInfoExistsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *varName; + const char *varName; Var *varPtr; if (objc != 2) { @@ -1357,7 +1357,7 @@ InfoFunctionsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *pattern; + const char *pattern; if (objc == 1) { pattern = NULL; @@ -1558,7 +1558,7 @@ InfoLoadedCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *interpName; + const char *interpName; int result; if ((objc != 1) && (objc != 2)) { @@ -1686,7 +1686,7 @@ InfoProcsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *cmdName, *pattern; + const char *cmdName, *pattern; const char *simplePattern; Namespace *nsPtr; #ifdef INFO_PROCS_SEARCH_GLOBAL_NS @@ -2750,7 +2750,7 @@ Tcl_LsearchObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - char *bytes, *patternBytes; + const char *bytes, *patternBytes; int i, match, index, result, listc, length, elemLen, bisect; int dataType, isIncreasing, lower, upper, patInt, objInt, offset; int allMatches, inlineReturn, negatedMatch, returnSubindices, noCase; @@ -4194,7 +4194,7 @@ SortCompare( static int DictionaryCompare( - char *left, char *right) /* The strings to compare. */ + const char *left, const char *right) /* The strings to compare. */ { Tcl_UniChar uniLeft, uniRight, uniLeftLower, uniRightLower; int diff, zeros; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 7cb14b5..22de674 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.176 2009/01/13 20:30:03 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.177 2009/02/03 23:34:32 nijtmans Exp $ */ #include "tclInt.h" @@ -121,7 +121,7 @@ Tcl_RegexpObjCmd( doinline = 0; for (i = 1; i < objc; i++) { - char *name; + const char *name; int index; name = TclGetString(objv[i]); @@ -470,7 +470,7 @@ Tcl_RegsubObjCmd( resultPtr = NULL; for (idx = 1; idx < objc; idx++) { - char *name; + const char *name; int index; name = TclGetString(objv[idx]); @@ -855,7 +855,7 @@ Tcl_RenameObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *oldName, *newName; + const char *oldName, *newName; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "oldName newName"); @@ -1001,7 +1001,8 @@ Tcl_SplitObjCmd( Tcl_UniChar ch; int len; const char *splitChars; - char *stringPtr, *end; + const char *stringPtr; + const char *end; int splitCharLen, stringLen; Tcl_Obj *listPtr, *objPtr; @@ -2458,7 +2459,7 @@ StringEqualCmd( * the expr string comparison in INST_EQ/INST_NEQ/INST_LT/...). */ - char *string1, *string2; + const char *string1, *string2; int length1, length2, i, match, length, nocase = 0, reqlength = -1; typedef int (*strCmpFn_t)(const char *, const char *, unsigned int); strCmpFn_t strCmpFn; @@ -2605,7 +2606,7 @@ StringCmpCmd( * the expr string comparison in INST_EQ/INST_NEQ/INST_LT/...). */ - char *string1, *string2; + const char *string1, *string2; int length1, length2, i, match, length, nocase = 0, reqlength = -1; typedef int (*strCmpFn_t)(const char *, const char *, unsigned int); strCmpFn_t strCmpFn; @@ -2829,7 +2830,8 @@ StringLowerCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int length1, length2; - char *string1, *string2; + const char *string1; + char *string2; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "string ?first? ?last?"); @@ -2913,7 +2915,8 @@ StringUpperCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int length1, length2; - char *string1, *string2; + const char *string1; + char *string2; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "string ?first? ?last?"); @@ -2997,7 +3000,8 @@ StringTitleCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int length1, length2; - char *string1, *string2; + const char *string1; + char *string2; if (objc < 2 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, "string ?first? ?last?"); @@ -3454,7 +3458,7 @@ Tcl_SwitchObjCmd( { int i,j, index, mode, foundmode, result, splitObjs, numMatchesSaved; int noCase, patternLength; - char *pattern; + const char *pattern; Tcl_Obj *stringObj, *indexVarObj, *matchVarObj; Tcl_Obj *const *savedObjv = objv; Tcl_RegExp regExpr = NULL; @@ -4085,7 +4089,7 @@ Tcl_TryObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRTryObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRTryObjCmd, dummy, objc, objv); } int @@ -4095,7 +4099,7 @@ TclNRTryObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - + } #endif /* not yet implemented */ @@ -4127,7 +4131,7 @@ Tcl_WhileObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - return Tcl_NRCallObjProc(interp, TclNRWhileObjCmd, dummy, objc, objv); + return Tcl_NRCallObjProc(interp, TclNRWhileObjCmd, dummy, objc, objv); } int diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 5d8e31a..8403a98 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.151 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.152 2009/02/03 23:34:32 nijtmans Exp $ */ #include "tclInt.h" @@ -3107,7 +3107,7 @@ TclCompileRegexpCmd( Tcl_Token *varTokenPtr; /* Pointer to the Tcl_Token representing the * parse of the RE or string. */ int i, len, nocase, exact, sawLast, simple; - char *str; + const char *str; DefineLineInformation; /* TIP #280 */ /* @@ -3141,7 +3141,7 @@ TclCompileRegexpCmd( return TCL_ERROR; } - str = (char *) varTokenPtr[1].start; + str = varTokenPtr[1].start; len = varTokenPtr[1].size; if ((len == 2) && (str[0] == '-') && (str[1] == '-')) { sawLast++; @@ -3177,7 +3177,7 @@ TclCompileRegexpCmd( if (varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { Tcl_DString ds; - str = (char *) varTokenPtr[1].start; + str = varTokenPtr[1].start; len = varTokenPtr[1].size; /* * If it has a '-', it could be an incorrectly formed regexp command. diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index c800441..ef0ebe9 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.76 2009/01/28 16:28:32 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.77 2009/02/03 23:34:32 nijtmans Exp $ */ #include "tclInt.h" @@ -473,7 +473,8 @@ UpdateStringOfDict( ChainEntry *cPtr; Tcl_Obj *keyPtr, *valuePtr; int numElems, i, length; - char *elem, *dst; + const char *elem; + char *dst; /* * This field is the most useful one in the whole hash structure, and it @@ -564,10 +565,11 @@ SetDictFromAny( Tcl_Interp *interp, Tcl_Obj *objPtr) { - char *string, *s; + const char *string; + char *s; const char *elemStart, *nextElem; int lenRemain, length, elemSize, hasBrace, result, isNew; - char *limit; /* Points just after string's last byte. */ + const char *limit; /* Points just after string's last byte. */ register const char *p; register Tcl_Obj *keyPtr, *valuePtr; Dict *dict; @@ -1835,7 +1837,7 @@ DictKeysCmd( Tcl_Obj *const *objv) { Tcl_Obj *listPtr; - char *pattern = NULL; + const char *pattern = NULL; if (objc!=2 && objc!=3) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?pattern?"); @@ -1920,7 +1922,7 @@ DictValuesCmd( Tcl_Obj *valuePtr = NULL, *listPtr; Tcl_DictSearch search; int done; - char *pattern; + const char *pattern; if (objc!=2 && objc!=3) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?pattern?"); @@ -2067,7 +2069,6 @@ DictInfoCmd( { Tcl_Obj *dictPtr; Dict *dict; - char *buf; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary"); @@ -2083,9 +2084,7 @@ DictInfoCmd( } dict = dictPtr->internalRep.otherValuePtr; - buf = Tcl_HashStats(&dict->table); - Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); - ckfree(buf); + Tcl_SetResult(interp, Tcl_HashStats(&dict->table), TCL_DYNAMIC); return TCL_OK; } @@ -2720,7 +2719,7 @@ DictFilterCmd( Tcl_Obj **varv, *keyObj = NULL, *valueObj = NULL, *resultObj, *boolObj; Tcl_DictSearch search; int index, varc, done, result, satisfied; - char *pattern; + const char *pattern; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "dictionary filterType ?arg ...?"); -- cgit v0.12 From 49dfd861199470b98849897f9d94ad4691438d4e Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 4 Feb 2009 18:15:47 +0000 Subject: * generic/tclCmdMZ.c: Prevent crashes due to int overflow of the length of the result of [string repeat]. [Bug 2561746] --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56a77f9..cc51b8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-04 Don Porter + + * generic/tclCmdMZ.c: Prevent crashes due to int overflow of the + length of the result of [string repeat]. [Bug 2561746] + 2009-02-03 Jan Nijtmans * macosx/tclMacOSXFCmd.c - eliminate some unnessary type casts diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 22de674..b0c90a4 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.177 2009/02/03 23:34:32 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.178 2009/02/04 18:15:48 dgp Exp $ */ #include "tclInt.h" @@ -2155,22 +2155,25 @@ StringReptCmd( /* * Only build up a string that has data. Instead of building it up with * repeated appends, we just allocate the necessary space once and copy - * the string value in. Check for overflow with back-division. [Bug - * #714106] + * the string value in. + * + * We have to worry about overflow [Bugs 714106, 2561746]. + * At this point we know 1 <= length1 <= INT_MAX and 2 <= count <= INT_MAX. + * We need to keep 2 <= length2 <= INT_MAX. */ - length2 = length1 * count + 1; - if ((length2-1) / count != length1) { + if (count > (INT_MAX / length1)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "string size overflow, must be less than %d", INT_MAX)); + "max size for a Tcl value (%d bytes) exceeded", INT_MAX)); return TCL_ERROR; } + length2 = length1 * count; /* * Include space for the NUL. */ - string2 = attemptckalloc((size_t) length2); + string2 = attemptckalloc((unsigned) length2 + 1); if (string2 == NULL) { /* * Alloc failed. Note that in this case we try to do an error message @@ -2180,14 +2183,14 @@ StringReptCmd( */ Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "string size overflow, out of memory allocating %d bytes", - length2)); + "string size overflow, out of memory allocating %u bytes", + length2 + 1)); return TCL_ERROR; } for (index = 0; index < count; index++) { memcpy(string2 + (length1 * index), string1, (size_t) length1); } - string2[length2-1] = '\0'; + string2[length2] = '\0'; /* * We have to directly assign this instead of using Tcl_SetStringObj (and @@ -2197,7 +2200,7 @@ StringReptCmd( TclNewObj(resultPtr); resultPtr->bytes = string2; - resultPtr->length = length2-1; + resultPtr->length = length2; Tcl_SetObjResult(interp, resultPtr); done: -- cgit v0.12 From 3739c0af948b9cfc9ccbe00fa2764f9bb5364308 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 4 Feb 2009 19:59:25 +0000 Subject: * generic/tclStringObj.c: Added overflow protections to the AppendUtfToUtfRep routine to either avoid invalid arguments and crashes, or to replace them with controlled panics. [Bug 2561794] --- ChangeLog | 4 ++++ generic/tclStringObj.c | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc51b8d..9136545 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-02-04 Don Porter + * generic/tclStringObj.c: Added overflow protections to the + AppendUtfToUtfRep routine to either avoid invalid arguments and + crashes, or to replace them with controlled panics. [Bug 2561794] + * generic/tclCmdMZ.c: Prevent crashes due to int overflow of the length of the result of [string repeat]. [Bug 2561746] diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index df7521d..6171db6 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.82 2009/02/03 18:10:22 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.83 2009/02/04 19:59:25 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -879,7 +879,7 @@ Tcl_AttemptSetObjLength( * Check that we're not extending a pure unicode string. */ - if (length > (int) stringPtr->allocated && + if ((size_t)length > stringPtr->allocated && (objPtr->bytes != NULL || stringPtr->hasUnicode == 0)) { char *newBytes; @@ -1477,6 +1477,9 @@ AppendUtfToUtfRep( */ oldLength = objPtr->length; + if (numBytes > INT_MAX - oldLength) { + Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); + } newLength = numBytes + oldLength; stringPtr = GET_STRING(objPtr); @@ -1490,8 +1493,15 @@ AppendUtfToUtfRep( */ if (Tcl_AttemptSetObjLength(objPtr, 2 * newLength) == 0) { - Tcl_SetObjLength(objPtr, - newLength + numBytes + TCL_GROWTH_MIN_ALLOC); + /* + * Take care computing the amount of modest growth to avoid + * overflow into invalid argument values for Tcl_SetObjLength. + */ + unsigned int limit = INT_MAX - newLength; + unsigned int extra = numBytes + TCL_GROWTH_MIN_ALLOC; + int growth = (int) ((extra > limit) ? limit : extra); + + Tcl_SetObjLength(objPtr, newLength + growth); } } -- cgit v0.12 From 14af5bfacb1ca6bee54d51c398e8df0adf092d41 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 4 Feb 2009 21:45:19 +0000 Subject: comment typo --- generic/tclStringObj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 6171db6..fc19ce6 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.83 2009/02/04 19:59:25 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.84 2009/02/04 21:45:19 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -961,7 +961,7 @@ Tcl_AttemptSetObjLength( /* *--------------------------------------------------------------------------- * - * TclSetUnicodeObj -- + * Tcl_SetUnicodeObj -- * * Modify an object to hold the Unicode string indicated by "unicode". * -- cgit v0.12 From 1508a4647865986ad56b7f73c13f7829e1a23c3f Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Feb 2009 01:21:59 +0000 Subject: Improve efficiency of Tcl_AppendObjToObj's bytearray handling. --- ChangeLog | 7 +++++++ generic/tclStringObj.c | 31 ++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9136545..65a4067 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-05 Donal K. Fellows + + * generic/tclStringObj.c (Tcl_AppendObjToObj): Special-case the + appending of one bytearray to another, which can be extremely rapid. + Part of scheme to address [Bug 1665628] by making the basic string + operations more efficient on byte arrays. + 2009-02-04 Don Porter * generic/tclStringObj.c: Added overflow protections to the diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index fc19ce6..b7961b8 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.84 2009/02/04 21:45:19 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.85 2009/02/05 01:21:59 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1216,6 +1216,35 @@ Tcl_AppendObjToObj( int length, numChars, allOneByteChars; char *bytes; + /* + * Handle append of one bytearray object to another as a special case. + * Note that we only do this when the object being written doesn't have a + * string rep; if it did, then appending the byte arrays together could + * well lose information; this is a special-case optimization only. + */ + + if (objPtr->typePtr == &tclByteArrayType && objPtr->bytes == NULL + && appendObjPtr->typePtr == &tclByteArrayType) { + unsigned char *bytesDst, *bytesSrc; + int lengthSrc, lengthTotal; + + /* + * Note that we do not assume that objPtr and appendObjPtr must be + * distinct! + */ + + (void) Tcl_GetByteArrayFromObj(objPtr, &length); + (void) Tcl_GetByteArrayFromObj(appendObjPtr, &lengthSrc); + lengthTotal = length + lengthSrc; + if (((length > lengthSrc) ? length : lengthSrc) > lengthTotal) { + Tcl_Panic("overflow when calculating byte array size"); + } + bytesDst = Tcl_SetByteArrayLength(objPtr, lengthTotal); + bytesSrc = Tcl_GetByteArrayFromObj(appendObjPtr, NULL); + memcpy(bytesDst + length, bytesSrc, lengthSrc); + return; + } + SetStringFromAny(NULL, objPtr); /* -- cgit v0.12 From 7933720835766c9a797749bd47fd1501ae6871d2 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Feb 2009 11:57:25 +0000 Subject: More/better/cleaner handling of the bytearray special casing for string ops. --- ChangeLog | 8 +++-- generic/tclStringObj.c | 96 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 87 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65a4067..265120d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ appending of one bytearray to another, which can be extremely rapid. Part of scheme to address [Bug 1665628] by making the basic string operations more efficient on byte arrays. + (Tcl_GetCharLength, Tcl_GetUniChar, Tcl_GetRange): More special casing + work for bytearrays. 2009-02-04 Don Porter @@ -16,9 +18,9 @@ 2009-02-03 Jan Nijtmans - * macosx/tclMacOSXFCmd.c - eliminate some unnessary type casts - * unix/tclLoadDyld.c - some internal const decorations - * unix/tclUnixCompat.c - spacing + * macosx/tclMacOSXFCmd.c: Eliminate some unnessary type casts + * unix/tclLoadDyld.c: some internal const decorations + * unix/tclUnixCompat.c: spacing * unix/tclUnixFCmd.c * unix/tclUnixFile.c * win/tclWinDde.c diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index b7961b8..e7a8880 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.85 2009/02/05 01:21:59 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.86 2009/02/05 11:57:26 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -135,6 +135,19 @@ typedef struct String { ((objPtr)->internalRep.otherValuePtr = (void *) (stringPtr)) /* + * Macro that encapsulates the logic that determines when it is safe to + * interpret a string as a byte array directly. In summary, the object must be + * a byte array and must not have a string representation (as the operations + * that it is used in are defined on strings, not byte arrays). Theoretically + * it is possible to also be efficient in the case where the object's bytes + * field is filled by generation from the byte array (c.f. list canonicality) + * but we don't do that at the moment since this is purely about efficiency. + */ + +#define IS_PURE_BYTE_ARRAY(objPtr) \ + (((objPtr)->typePtr==&tclByteArrayType) && ((objPtr)->bytes==NULL)) + +/* * TCL STRING GROWTH ALGORITHM * * When growing strings (during an append, for example), the following growth @@ -357,6 +370,23 @@ Tcl_GetCharLength( { String *stringPtr; + /* + * Optimize the case where we're really dealing with a bytearray object + * without string representation; we don't need to convert to a string to + * perform the get-length operation. + */ + + if (IS_PURE_BYTE_ARRAY(objPtr)) { + int length; + + (void) Tcl_GetByteArrayFromObj(objPtr, &length); + return length; + } + + /* + * OK, need to work with the object as a string. + */ + SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); @@ -442,6 +472,22 @@ Tcl_GetUniChar( Tcl_UniChar unichar; String *stringPtr; + /* + * Optimize the case where we're really dealing with a bytearray object + * without string representation; we don't need to convert to a string to + * perform the indexing operation. + */ + + if (IS_PURE_BYTE_ARRAY(objPtr)) { + unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, NULL); + + return bytes[index]; + } + + /* + * OK, need to work with the object as a string. + */ + SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); @@ -609,6 +655,22 @@ Tcl_GetRange( Tcl_Obj *newObjPtr; /* The Tcl object to find the range of. */ String *stringPtr; + /* + * Optimize the case where we're really dealing with a bytearray object + * without string representation; we don't need to convert to a string to + * perform the substring operation. + */ + + if (IS_PURE_BYTE_ARRAY(objPtr)) { + unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, NULL); + + return Tcl_NewByteArrayObj(bytes+first, last-first+1); + } + + /* + * OK, need to work with the object as a string. + */ + SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); @@ -637,7 +699,7 @@ Tcl_GetRange( * the specified range of chars. */ - newObjPtr = Tcl_NewStringObj(&str[first], last-first+1); + newObjPtr = Tcl_NewStringObj(str+first, last-first+1); /* * Since we know the new string only has 1-byte chars, we can set it's @@ -742,11 +804,12 @@ Tcl_SetObjLength( if (length < 0) { /* - * Setting to a negative length is nonsense. This is probably the + * Setting to a negative length is nonsense. This is probably the * result of overflowing the signed integer range. */ - Tcl_Panic( "Tcl_SetObjLength: negative length requested: " - "%d (integer overflow?)", length); + + Tcl_Panic("Tcl_SetObjLength: negative length requested: " + "%d (integer overflow?)", length); } if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetObjLength"); @@ -1218,19 +1281,19 @@ Tcl_AppendObjToObj( /* * Handle append of one bytearray object to another as a special case. - * Note that we only do this when the object being written doesn't have a - * string rep; if it did, then appending the byte arrays together could - * well lose information; this is a special-case optimization only. + * Note that we only do this when the objects don't have string reps; if + * it did, then appending the byte arrays together could well lose + * information; this is a special-case optimization only. */ - if (objPtr->typePtr == &tclByteArrayType && objPtr->bytes == NULL - && appendObjPtr->typePtr == &tclByteArrayType) { + if (IS_PURE_BYTE_ARRAY(objPtr) && IS_PURE_BYTE_ARRAY(appendObjPtr)) { unsigned char *bytesDst, *bytesSrc; int lengthSrc, lengthTotal; /* - * Note that we do not assume that objPtr and appendObjPtr must be - * distinct! + * We do not assume that objPtr and appendObjPtr must be distinct! + * This makes this code a bit more complex than it otherwise would be, + * but in turn makes it much safer. */ (void) Tcl_GetByteArrayFromObj(objPtr, &length); @@ -1245,6 +1308,10 @@ Tcl_AppendObjToObj( return; } + /* + * Must append as strings. + */ + SetStringFromAny(NULL, objPtr); /* @@ -2054,8 +2121,9 @@ Tcl_AppendFormatToObj( allocSegment = 1; Tcl_IncrRefCount(segment); - if ((isNegative || gotPlus || gotSpace) && (useBig || (ch == 'd'))) { - Tcl_AppendToObj(segment, (isNegative ? "-" : gotPlus ? "+" : " "), 1); + if ((isNegative || gotPlus || gotSpace) && (useBig || ch=='d')) { + Tcl_AppendToObj(segment, + (isNegative ? "-" : gotPlus ? "+" : " "), 1); } if (gotHash) { -- cgit v0.12 From cd89b9ea6457cd428033dbb8b2f7746dd35222ed Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Feb 2009 14:21:42 +0000 Subject: Fix [Bug 2568434] --- ChangeLog | 3 +++ generic/tclExecute.c | 8 +++++-- tests/execute.test | 68 +++++++++++++++++++++++----------------------------- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 265120d..3d3710b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-02-05 Donal K. Fellows + * generic/tclExecute.c (TclExecuteByteCode): Make sure that + INST_CONCAT1 will not lose string reps wrongly. [Bug 2568434] + * generic/tclStringObj.c (Tcl_AppendObjToObj): Special-case the appending of one bytearray to another, which can be extremely rapid. Part of scheme to address [Bug 1665628] by making the basic string diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d1c29eb..601fe6e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.424 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.425 2009/02/05 14:21:42 dkf Exp $ */ #include "tclInt.h" @@ -2448,7 +2448,7 @@ TclExecuteByteCode( opnd = TclGetUInt1AtPtr(pc+1); /* - * Detect only-bytearray-or-null case + * Detect only-bytearray-or-null case. */ for (currPtr=&OBJ_AT_DEPTH(opnd-1); currPtr<=&OBJ_AT_TOS; currPtr++) { @@ -2456,6 +2456,10 @@ TclExecuteByteCode( && ((*currPtr)->bytes != tclEmptyStringRep)) { onlyb = 0; break; + } else if (((*currPtr)->typePtr == &tclByteArrayType) && + ((*currPtr)->bytes != NULL)) { + onlyb = 0; + break; } } diff --git a/tests/execute.test b/tests/execute.test index d9f02e0..f6174d0 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.29 2008/08/05 15:52:24 msofer Exp $ +# RCS: @(#) $Id: execute.test,v 1.30 2009/02/05 14:21:43 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -43,14 +43,12 @@ testConstraint testexprlongobj [llength [info commands testexprlongobj]] # INST_PUSH4 not tested # INST_POP not tested # INST_DUP not tested -# INST_CONCAT1 not tested # INST_INVOKE_STK4 not tested # INST_INVOKE_STK1 not tested # INST_EVAL_STK not tested # INST_EXPR_STK not tested # INST_LOAD_SCALAR1 - test execute-1.1 {TclExecuteByteCode, INST_LOAD_SCALAR1, small opnd} { proc foo {} { set x 1 @@ -68,7 +66,6 @@ test execute-1.2 {TclExecuteByteCode, INST_LOAD_SCALAR1, large opnd} { set y 1 return $y } - proc foo {} $body foo } 1 @@ -81,9 +78,7 @@ test execute-1.3 {TclExecuteByteCode, INST_LOAD_SCALAR1, error} { list [catch {foo} msg] $msg } {1 {can't read "x": no such variable}} - # INST_LOAD_SCALAR4 - test execute-2.1 {TclExecuteByteCode, INST_LOAD_SCALAR4, simple case} { set body {} for {set i 0} {$i < 256} {incr i} { @@ -93,7 +88,6 @@ test execute-2.1 {TclExecuteByteCode, INST_LOAD_SCALAR4, simple case} { set y 1 return $y } - proc foo {} $body foo } 1 @@ -107,12 +101,10 @@ test execute-2.2 {TclExecuteByteCode, INST_LOAD_SCALAR4, error} { unset y return $y } - proc foo {} $body list [catch {foo} msg] $msg } {1 {can't read "y": no such variable}} - # INST_LOAD_SCALAR_STK not tested # INST_LOAD_ARRAY4 not tested # INST_LOAD_ARRAY1 not tested @@ -900,43 +892,40 @@ test execute-8.1 {Stack protection} -setup { trace remove variable ::errorInfo {write unset} whatever rename whatever {} } -returnCodes error -match glob -result * - test execute-8.2 {Stack restoration} -body { # Test for [Bug #816641], correct restoration # of the stack top after the stack is grown - proc f {args} { f bee bop } - catch f msg - set msg - } -setup { + proc f {args} { f bee bop } + catch f msg + set msg +} -setup { # Avoid crashes when system stack size is limited (thread-enabled!) - set limit [interp recursionlimit {}] - interp recursionlimit {} 100 - } -cleanup { - interp recursionlimit {} $limit - } -result {too many nested evaluations (infinite loop?)} - + set limit [interp recursionlimit {}] + interp recursionlimit {} 100 +} -cleanup { + interp recursionlimit {} $limit +} -result {too many nested evaluations (infinite loop?)} test execute-8.3 {Stack restoration} -body { # Test for [Bug #1055676], correct restoration # of the stack top after the epoch is bumped and # the stack is grown in a call from a nested evaluation - set arglst [string repeat "a " 1000] - proc f {args} "f $arglst" - proc run {} { - # bump the interp's epoch - rename ::set ::dummy - rename ::dummy ::set - catch f msg - set msg - } - run - } -setup { + set arglst [string repeat "a " 1000] + proc f {args} "f $arglst" + proc run {} { + # bump the interp's epoch + rename ::set ::dummy + rename ::dummy ::set + catch f msg + set msg + } + run +} -setup { # Avoid crashes when system stack size is limited (thread-enabled!) - set limit [interp recursionlimit {}] - interp recursionlimit {} 100 - } -cleanup { - interp recursionlimit {} $limit - } -result {too many nested evaluations (infinite loop?)} - + set limit [interp recursionlimit {}] + interp recursionlimit {} 100 +} -cleanup { + interp recursionlimit {} $limit +} -result {too many nested evaluations (infinite loop?)} test execute-8.4 {Compile epoch bump effect on stack trace} -setup { proc foo {} { error bar @@ -957,7 +946,6 @@ test execute-8.4 {Compile epoch bump effect on stack trace} -setup { rename foo {} rename FOO {} } -result {} - test execute-8.5 {Bug 2038069} -setup { proc demo {} { catch [list error FOO] m o @@ -987,6 +975,10 @@ test execute-9.1 {Interp result resetting [Bug 1522803]} { set result } SUCCESS +test execute-10.1 {TclExecuteByteCode, INST_CONCAT1, bytearrays} { + apply {s {binary scan $s c x; list $x [scan $s$s %c%c]}} \u0130 +} {48 {304 304}} + # cleanup if {[info commands testobj] != {}} { testobj freeallvars -- cgit v0.12 From 9e192ac67cdb8d8226839dfda1c6411cb216f392 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Feb 2009 21:27:45 +0000 Subject: Add missing cast --- generic/tclStringObj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index e7a8880..589d046 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.86 2009/02/05 11:57:26 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.87 2009/02/05 21:27:45 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -481,7 +481,7 @@ Tcl_GetUniChar( if (IS_PURE_BYTE_ARRAY(objPtr)) { unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, NULL); - return bytes[index]; + return (Tcl_UniChar) bytes[index]; } /* -- cgit v0.12 From b29f3df591b0bc0c7cdeba75727b7005e7cd6235 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Feb 2009 22:12:44 +0000 Subject: Simplify the implementation of some commands now that the underlying string API knows more about bytearrays. --- ChangeLog | 8 ++- generic/tclCmdMZ.c | 158 ++++++++++++++++++++--------------------------------- 2 files changed, 65 insertions(+), 101 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d3710b..4c5e47b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,11 @@ 2009-02-05 Donal K. Fellows - * generic/tclExecute.c (TclExecuteByteCode): Make sure that - INST_CONCAT1 will not lose string reps wrongly. [Bug 2568434] + * generic/tclCmdMZ.c (StringIndexCmd, StringRangeCmd, StringLenCmd): + Simplify the implementation of some commands now that the underlying + string API knows more about bytearrays. + + * generic/tclExecute.c (TclExecuteByteCode): [Bug 2568434]: Make sure + that INST_CONCAT1 will not lose string reps wrongly. * generic/tclStringObj.c (Tcl_AppendObjToObj): Special-case the appending of one bytearray to another, which can be extremely rapid. diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index b0c90a4..15895c1 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.178 2009/02/04 18:15:48 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.179 2009/02/05 22:12:44 dkf Exp $ */ #include "tclInt.h" @@ -1136,8 +1136,8 @@ StringFirstCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_UniChar *ustring1, *ustring2; - int match, start, length1, length2; + Tcl_UniChar *needleStr, *haystackStr; + int match, start, needleLen, haystackLen; if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -1146,15 +1146,15 @@ StringFirstCmd( } /* - * We are searching string2 for the sequence string1. + * We are searching haystackStr for the sequence needleStr. */ match = -1; start = 0; - length2 = -1; + haystackLen = -1; - ustring1 = Tcl_GetUnicodeFromObj(objv[1], &length1); - ustring2 = Tcl_GetUnicodeFromObj(objv[2], &length2); + needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen); + haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen); if (objc == 4) { /* @@ -1162,7 +1162,8 @@ StringFirstCmd( * point in the string before we think about a match. */ - if (TclGetIntForIndexM(interp, objv[3], length2-1, &start) != TCL_OK){ + if (TclGetIntForIndexM(interp, objv[3], haystackLen-1, + &start) != TCL_OK){ return TCL_ERROR; } @@ -1170,14 +1171,14 @@ StringFirstCmd( * Reread to prevent shimmering problems. */ - ustring1 = Tcl_GetUnicodeFromObj(objv[1], &length1); - ustring2 = Tcl_GetUnicodeFromObj(objv[2], &length2); + needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen); + haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen); - if (start >= length2) { + if (start >= haystackLen) { goto str_first_done; } else if (start > 0) { - ustring2 += start; - length2 -= start; + haystackStr += start; + haystackLen -= start; } else if (start < 0) { /* * Invalid start index mapped to string start; Bug #423581 @@ -1187,18 +1188,18 @@ StringFirstCmd( } } - if (length1 > 0) { + if (needleLen > 0) { register Tcl_UniChar *p, *end; - end = ustring2 + length2 - length1 + 1; - for (p = ustring2; p < end; p++) { + end = haystackStr + haystackLen - needleLen + 1; + for (p = haystackStr; p < end; p++) { /* * Scan forward to find the first character. */ - if ((*p == *ustring1) && (TclUniCharNcmp(ustring1, p, - (unsigned long) length1) == 0)) { - match = p - ustring2; + if ((*p == *needleStr) && (TclUniCharNcmp(needleStr, p, + (unsigned long) needleLen) == 0)) { + match = p - haystackStr; break; } } @@ -1243,8 +1244,8 @@ StringLastCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_UniChar *ustring1, *ustring2, *p; - int match, start, length1, length2; + Tcl_UniChar *needleStr, *haystackStr, *p; + int match, start, needleLen, haystackLen; if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 1, objv, @@ -1253,15 +1254,15 @@ StringLastCmd( } /* - * We are searching string2 for the sequence string1. + * We are searching haystackString for the sequence needleString. */ match = -1; start = 0; - length2 = -1; + haystackLen = -1; - ustring1 = Tcl_GetUnicodeFromObj(objv[1], &length1); - ustring2 = Tcl_GetUnicodeFromObj(objv[2], &length2); + needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen); + haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen); if (objc == 4) { /* @@ -1269,7 +1270,8 @@ StringLastCmd( * range to that char index in the string */ - if (TclGetIntForIndexM(interp, objv[3], length2-1, &start) != TCL_OK){ + if (TclGetIntForIndexM(interp, objv[3], haystackLen-1, + &start) != TCL_OK){ return TCL_ERROR; } @@ -1277,29 +1279,29 @@ StringLastCmd( * Reread to prevent shimmering problems. */ - ustring1 = Tcl_GetUnicodeFromObj(objv[1], &length1); - ustring2 = Tcl_GetUnicodeFromObj(objv[2], &length2); + needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen); + haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen); if (start < 0) { goto str_last_done; - } else if (start < length2) { - p = ustring2 + start + 1 - length1; + } else if (start < haystackLen) { + p = haystackStr + start + 1 - needleLen; } else { - p = ustring2 + length2 - length1; + p = haystackStr + haystackLen - needleLen; } } else { - p = ustring2 + length2 - length1; + p = haystackStr + haystackLen - needleLen; } - if (length1 > 0) { - for (; p >= ustring2; p--) { + if (needleLen > 0) { + for (; p >= haystackStr; p--) { /* * Scan backwards to find the first character. */ - if ((*p == *ustring1) && !memcmp(ustring1, p, - sizeof(Tcl_UniChar) * (size_t)length1)) { - match = p - ustring2; + if ((*p == *needleStr) && !memcmp(needleStr, p, + sizeof(Tcl_UniChar) * (size_t)needleLen)) { + match = p - haystackStr; break; } } @@ -1343,37 +1345,29 @@ StringIndexCmd( } /* - * If we have a ByteArray object, avoid indexing in the Utf string since - * the byte array contains one byte per character. Otherwise, use the - * Unicode string rep to get the index'th char. + * Get Unicode or byte-array char length to calulate what 'end' means. */ - if (objv[1]->typePtr == &tclByteArrayType) { - const unsigned char *string = - Tcl_GetByteArrayFromObj(objv[1], &length); + length = Tcl_GetCharLength(objv[1]); + if (TclGetIntForIndexM(interp, objv[2], length-1, &index) != TCL_OK) { + return TCL_ERROR; + } + + if ((index >= 0) && (index < length)) { + Tcl_UniChar ch = Tcl_GetUniChar(objv[1], index); - if (TclGetIntForIndexM(interp, objv[2], length-1, &index) != TCL_OK){ - return TCL_ERROR; - } - string = Tcl_GetByteArrayFromObj(objv[1], &length); - if ((index >= 0) && (index < length)) { - Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(string + index, 1)); - } - } else { /* - * Get Unicode char length to calulate what 'end' means. + * If we have a ByteArray object, we're careful to generate a new + * bytearray for a result. */ - length = Tcl_GetCharLength(objv[1]); + if (objv[1]->typePtr == &tclByteArrayType) { + unsigned char uch = (unsigned char) ch; - if (TclGetIntForIndexM(interp, objv[2], length-1, &index) != TCL_OK){ - return TCL_ERROR; - } - if ((index >= 0) && (index < length)) { + Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(&uch, 1)); + } else { char buf[TCL_UTF_MAX]; - Tcl_UniChar ch; - ch = Tcl_GetUniChar(objv[1], index); length = Tcl_UniCharToUtf(ch, buf); Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, length)); } @@ -2045,7 +2039,6 @@ StringRangeCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - const unsigned char *string; int length, first, last; if (objc != 4) { @@ -2054,22 +2047,12 @@ StringRangeCmd( } /* - * If we have a ByteArray object, avoid indexing in the Utf string since - * the byte array contains one byte per character. Otherwise, use the - * Unicode string rep to get the range. + * Get the length in actual characters; this uses the unicode string rep + * or the byte-array rep. We then reduce it by one because 'end' refers to + * the last character, not one past it. */ - if (objv[1]->typePtr == &tclByteArrayType) { - string = Tcl_GetByteArrayFromObj(objv[1], &length); - length--; - } else { - /* - * Get the length in actual characters. - */ - - string = NULL; - length = Tcl_GetCharLength(objv[1]) - 1; - } + length = Tcl_GetCharLength(objv[1]) - 1; if (TclGetIntForIndexM(interp, objv[2], length, &first) != TCL_OK || TclGetIntForIndexM(interp, objv[3], length, &last) != TCL_OK) { @@ -2083,17 +2066,7 @@ StringRangeCmd( last = length; } if (last >= first) { - if (string != NULL) { - /* - * Reread the string to prevent shimmering nasties. - */ - - string = Tcl_GetByteArrayFromObj(objv[1], &length); - Tcl_SetObjResult(interp, - Tcl_NewByteArrayObj(string+first, last - first + 1)); - } else { - Tcl_SetObjResult(interp, Tcl_GetRange(objv[1], first, last)); - } + Tcl_SetObjResult(interp, Tcl_GetRange(objv[1], first, last)); } return TCL_OK; } @@ -2785,25 +2758,12 @@ StringLenCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int length; - if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "string"); return TCL_ERROR; } - /* - * If we have a ByteArray object, avoid recomputing the string since the - * byte array contains one byte per character. Otherwise, use the Unicode - * string rep to calculate the length. - */ - - if (objv[1]->typePtr == &tclByteArrayType) { - (void) Tcl_GetByteArrayFromObj(objv[1], &length); - } else { - length = Tcl_GetCharLength(objv[1]); - } - Tcl_SetObjResult(interp, Tcl_NewIntObj(length)); + Tcl_SetObjResult(interp, Tcl_NewIntObj(Tcl_GetCharLength(objv[1]))); return TCL_OK; } -- cgit v0.12 From fad852b20196ac0d2093a7c6dcfca1b24fcdd7de Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Fri, 6 Feb 2009 00:59:59 +0000 Subject: Fix for [Bug 2544618] --- ChangeLog | 7 +++++++ generic/tclInterp.c | 12 ++++++------ unix/Makefile.in | 26 +++++++++++++------------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c5e47b..4b6422a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-05 Joe Mistachkin + + * generic/tclInterp.c: Fix argument checking for [interp cancel]. [Bug + 2544618] + * unix/Makefile.in: Fix build issue with zlib on FreeBSD (and possibly + other platforms). + 2009-02-05 Donal K. Fellows * generic/tclCmdMZ.c (StringIndexCmd, StringRangeCmd, StringLenCmd): diff --git a/generic/tclInterp.c b/generic/tclInterp.c index c6b53c0..643b7e0 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.102 2009/02/02 06:02:41 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.103 2009/02/06 01:00:00 mistachkin Exp $ */ #include "tclInt.h" @@ -652,11 +652,6 @@ Tcl_InterpObjCmd( OPT_UNWIND, OPT_LAST }; - if (objc > 6) { - Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); - return TCL_ERROR; - } - flags = 0; for (i = 2; i < objc; i++) { @@ -684,6 +679,11 @@ Tcl_InterpObjCmd( endOfForLoop: + if ((i + 2) < objc) { + Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); + return TCL_ERROR; + } + /* * Did they specify a slave interp to cancel the script in * progress in? If not, use the current interp. diff --git a/unix/Makefile.in b/unix/Makefile.in index 5dd34f7..df10a4e 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.261 2009/01/20 03:38:01 kennykb Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.262 2009/02/06 01:00:00 mistachkin Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1576,29 +1576,29 @@ waitpid.o: $(COMPAT_DIR)/waitpid.c # For building zlib, only used in some build configurations Zadler32.o: $(ZLIB_DIR)/adler32.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/adler32.c Zcompress.o: $(ZLIB_DIR)/compress.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/compress.c Zcrc32.o: $(ZLIB_DIR)/crc32.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/crc32.c Zdeflate.o: $(ZLIB_DIR)/deflate.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/deflate.c Zgzio.o: $(ZLIB_DIR)/gzio.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/gzio.c Zinfback.o: $(ZLIB_DIR)/infback.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/infback.c Zinffast.o: $(ZLIB_DIR)/inffast.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/inffast.c Zinflate.o: $(ZLIB_DIR)/inflate.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/inflate.c Zinftrees.o: $(ZLIB_DIR)/inftrees.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/inftrees.c Ztrees.o: $(ZLIB_DIR)/trees.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/trees.c Zuncompr.o: $(ZLIB_DIR)/uncompr.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/uncompr.c Zzutil.o: $(ZLIB_DIR)/zutil.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $< + $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/zutil.c # Stub library binaries, these must be compiled for use in a shared library # even though they will be placed in a static archive -- cgit v0.12 From 3b7eb4d17e69ac774f55927c2086019d01e65967 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 7 Feb 2009 22:42:00 +0000 Subject: Improve error messages. [Bug 2573172] --- ChangeLog | 7 + generic/tclZlib.c | 379 ++++++++++++++++++++++++++++-------------------------- 2 files changed, 205 insertions(+), 181 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b6422a..094901f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-07 Donal K. Fellows + + * generic/tclZlib.c (TclZlibCmd): [Bug 2573172]: Ensure that when + invalid subcommand name is given, the list of valid subcommands is + produced. This gives a better experience when using the command + interactively. + 2009-02-05 Joe Mistachkin * generic/tclInterp.c: Fix argument checking for [interp cancel]. [Bug diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 033251b..95de991 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -5,7 +5,7 @@ * * Copyright (C) 2004-2005 Pascal Scheffers * Copyright (C) 2005 Unitas Software B.V. - * Copyright (c) 2008 Donal K. Fellows + * Copyright (c) 2008-2009 Donal K. Fellows * * Parts written by Jean-Claude Wippler, as part of Tclkit, placed in the * public domain March 2003. @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.22 2009/01/26 16:25:59 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.23 2009/02/07 22:42:01 dkf Exp $ */ #include "tclInt.h" @@ -144,7 +144,7 @@ static int TclZlibCmd(ClientData dummy, Tcl_Interp *ip, int objc, static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static void ZlibStreamCmdDelete(ClientData cd); -static void ZlibStreamCleanup(ZlibStreamHandle *zsh); +static void ZlibStreamCleanup(ZlibStreamHandle *zshPtr); static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int mode, int format, int level, Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr); @@ -216,6 +216,12 @@ ConvertError( break; } Tcl_SetObjResult(interp, Tcl_NewStringObj(zError(code), -1)); + + /* + * Tricky point! We might pass NULL twice here (and will when the + * error type is known). + */ + Tcl_SetErrorCode(interp, "TCL", "ZLIB", codeStr, codeStr2, NULL); } } @@ -247,7 +253,7 @@ GetValue( Tcl_Obj **valuePtrPtr) { Tcl_Obj *name = Tcl_NewStringObj(nameStr, -1); - int result = Tcl_DictObjGet(interp, dictObj, name, valuePtrPtr); + int result = Tcl_DictObjGet(interp, dictObj, name, valuePtrPtr); TclDecrRefCount(name); return result; @@ -444,9 +450,13 @@ ExtractHeader( * A standard Tcl result. * * Side effects: - * zshandle is initialised and memory allocated for internal state. - * Additionally, if interp is not null, a Tcl command is created and its - * name placed in the interp result obj. + * The variable pointed to by zshandlePtr is initialised and memory + * allocated for internal state. Additionally, if interp is not null, a + * Tcl command is created and its name placed in the interp result obj. + * + * Note: + * At least one of interp and zshandlePtr should be non-NULL or the + * reference to the stream will be completely lost. * *---------------------------------------------------------------------- */ @@ -459,11 +469,11 @@ Tcl_ZlibStreamInit( int format, /* Flags from the TCL_ZLIB_FORMAT_* set. */ int level, /* 0-9 or TCL_ZLIB_COMPRESS_DEFAULT. */ Tcl_Obj *dictObj, /* Dictionary containing headers for gzip. */ - Tcl_ZlibStream *zshandle) + Tcl_ZlibStream *zshandlePtr) { int wbits = 0; int e; - ZlibStreamHandle *zsh = NULL; + ZlibStreamHandle *zshPtr = NULL; Tcl_DString cmdname; Tcl_CmdInfo cmdinfo; @@ -524,33 +534,33 @@ Tcl_ZlibStreamInit( " TCL_ZLIB_STREAM_INFLATE"); } - zsh = (ZlibStreamHandle *) ckalloc(sizeof(ZlibStreamHandle)); - zsh->interp = interp; - zsh->mode = mode; - zsh->format = format; - zsh->level = level; - zsh->wbits = wbits; - zsh->currentInput = NULL; - zsh->streamEnd = 0; - zsh->stream.avail_in = 0; - zsh->stream.next_in = 0; - zsh->stream.zalloc = 0; - zsh->stream.zfree = 0; - zsh->stream.opaque = 0; /* Must be initialized before calling + zshPtr = (ZlibStreamHandle *) ckalloc(sizeof(ZlibStreamHandle)); + zshPtr->interp = interp; + zshPtr->mode = mode; + zshPtr->format = format; + zshPtr->level = level; + zshPtr->wbits = wbits; + zshPtr->currentInput = NULL; + zshPtr->streamEnd = 0; + zshPtr->stream.avail_in = 0; + zshPtr->stream.next_in = 0; + zshPtr->stream.zalloc = 0; + zshPtr->stream.zfree = 0; + zshPtr->stream.opaque = 0; /* Must be initialized before calling * (de|in)flateInit2 */ /* * No output buffer available yet */ - zsh->stream.avail_out = 0; - zsh->stream.next_out = NULL; + zshPtr->stream.avail_out = 0; + zshPtr->stream.next_out = NULL; if (mode == TCL_ZLIB_STREAM_DEFLATE) { - e = deflateInit2(&zsh->stream, level, Z_DEFLATED, wbits, + e = deflateInit2(&zshPtr->stream, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); } else { - e = inflateInit2(&zsh->stream, wbits); + e = inflateInit2(&zshPtr->stream, wbits); } if (e != Z_OK) { @@ -583,39 +593,39 @@ Tcl_ZlibStreamInit( * Create the command. */ - zsh->cmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdname), - ZlibStreamCmd, zsh, ZlibStreamCmdDelete); + zshPtr->cmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdname), + ZlibStreamCmd, zshPtr, ZlibStreamCmdDelete); Tcl_DStringFree(&cmdname); - if (zsh->cmd == NULL) { + if (zshPtr->cmd == NULL) { goto error; } } else { - zsh->cmd = NULL; + zshPtr->cmd = NULL; } /* * Prepare the buffers for use. */ - zsh->inData = Tcl_NewListObj(0, NULL); - Tcl_IncrRefCount(zsh->inData); - zsh->outData = Tcl_NewListObj(0, NULL); - Tcl_IncrRefCount(zsh->outData); + zshPtr->inData = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(zshPtr->inData); + zshPtr->outData = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(zshPtr->outData); - zsh->outPos = 0; + zshPtr->outPos = 0; /* - * Now set the int pointed to by *zshandle to the pointer to the zsh - * struct. + * Now set the variable pointed to by *zshandlePtr to the pointer to the + * zsh struct. */ - if (zshandle) { - *zshandle = (Tcl_ZlibStream) zsh; + if (zshandlePtr) { + *zshandlePtr = (Tcl_ZlibStream) zshPtr; } return TCL_OK; error: - ckfree((char *) zsh); + ckfree((char *) zshPtr); return TCL_ERROR; } @@ -640,10 +650,10 @@ static void ZlibStreamCmdDelete( ClientData cd) { - ZlibStreamHandle *zsh = cd; + ZlibStreamHandle *zshPtr = cd; - zsh->cmd = NULL; - ZlibStreamCleanup(zsh); + zshPtr->cmd = NULL; + ZlibStreamCleanup(zshPtr); } /* @@ -668,7 +678,7 @@ int Tcl_ZlibStreamClose( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit. */ { - ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; + ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; /* * If the interp is set, deleting the command will trigger @@ -676,10 +686,10 @@ Tcl_ZlibStreamClose( * ZlibStreamCleanup directly. */ - if (zsh->interp && zsh->cmd) { - Tcl_DeleteCommandFromToken(zsh->interp, zsh->cmd); + if (zshPtr->interp && zshPtr->cmd) { + Tcl_DeleteCommandFromToken(zshPtr->interp, zshPtr->cmd); } else { - ZlibStreamCleanup(zsh); + ZlibStreamCleanup(zshPtr); } return TCL_OK; } @@ -703,27 +713,27 @@ Tcl_ZlibStreamClose( void ZlibStreamCleanup( - ZlibStreamHandle *zsh) + ZlibStreamHandle *zshPtr) { - if (!zsh->streamEnd) { - if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { - deflateEnd(&zsh->stream); + if (!zshPtr->streamEnd) { + if (zshPtr->mode == TCL_ZLIB_STREAM_DEFLATE) { + deflateEnd(&zshPtr->stream); } else { - inflateEnd(&zsh->stream); + inflateEnd(&zshPtr->stream); } } - if (zsh->inData) { - Tcl_DecrRefCount(zsh->inData); + if (zshPtr->inData) { + Tcl_DecrRefCount(zshPtr->inData); } - if (zsh->outData) { - Tcl_DecrRefCount(zsh->outData); + if (zshPtr->outData) { + Tcl_DecrRefCount(zshPtr->outData); } - if (zsh->currentInput) { - Tcl_DecrRefCount(zsh->currentInput); + if (zshPtr->currentInput) { + Tcl_DecrRefCount(zshPtr->currentInput); } - ckfree((char *) zsh); + ckfree((char *) zshPtr); } /* @@ -746,48 +756,48 @@ int Tcl_ZlibStreamReset( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { - ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; + ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; int e; - if (!zsh->streamEnd) { - if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { - deflateEnd(&zsh->stream); + if (!zshPtr->streamEnd) { + if (zshPtr->mode == TCL_ZLIB_STREAM_DEFLATE) { + deflateEnd(&zshPtr->stream); } else { - inflateEnd(&zsh->stream); + inflateEnd(&zshPtr->stream); } } - Tcl_SetByteArrayLength(zsh->inData, 0); - Tcl_SetByteArrayLength(zsh->outData, 0); - if (zsh->currentInput) { - Tcl_DecrRefCount(zsh->currentInput); - zsh->currentInput = NULL; + Tcl_SetByteArrayLength(zshPtr->inData, 0); + Tcl_SetByteArrayLength(zshPtr->outData, 0); + if (zshPtr->currentInput) { + Tcl_DecrRefCount(zshPtr->currentInput); + zshPtr->currentInput = NULL; } - zsh->outPos = 0; - zsh->streamEnd = 0; - zsh->stream.avail_in = 0; - zsh->stream.next_in = 0; - zsh->stream.zalloc = 0; - zsh->stream.zfree = 0; - zsh->stream.opaque = 0; /* Must be initialized before calling + zshPtr->outPos = 0; + zshPtr->streamEnd = 0; + zshPtr->stream.avail_in = 0; + zshPtr->stream.next_in = 0; + zshPtr->stream.zalloc = 0; + zshPtr->stream.zfree = 0; + zshPtr->stream.opaque = 0; /* Must be initialized before calling * (de|in)flateInit2 */ /* * No output buffer available yet. */ - zsh->stream.avail_out = 0; - zsh->stream.next_out = NULL; + zshPtr->stream.avail_out = 0; + zshPtr->stream.next_out = NULL; - if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { - e = deflateInit2(&zsh->stream, zsh->level, Z_DEFLATED, zsh->wbits, - MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); + if (zshPtr->mode == TCL_ZLIB_STREAM_DEFLATE) { + e = deflateInit2(&zshPtr->stream, zshPtr->level, Z_DEFLATED, + zshPtr->wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); } else { - e = inflateInit2(&zsh->stream, zsh->wbits); + e = inflateInit2(&zshPtr->stream, zshPtr->wbits); } if (e != Z_OK) { - ConvertError(zsh->interp, e); + ConvertError(zshPtr->interp, e); /* TODO:cleanup */ return TCL_ERROR; } @@ -815,17 +825,17 @@ Tcl_ZlibStreamReset( Tcl_Obj * Tcl_ZlibStreamGetCommandName( - Tcl_ZlibStream zshandle) /* as obtained from Tcl_ZlibStreamInit */ + Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { - ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; + ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; Tcl_Obj *objPtr; - if (!zsh->interp) { + if (!zshPtr->interp) { return NULL; } TclNewObj(objPtr); - Tcl_GetCommandFullName(zsh->interp, zsh->cmd, objPtr); + Tcl_GetCommandFullName(zshPtr->interp, zshPtr->cmd, objPtr); return objPtr; } @@ -852,9 +862,9 @@ int Tcl_ZlibStreamEof( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { - ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; + ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; - return zsh->streamEnd; + return zshPtr->streamEnd; } /* @@ -872,9 +882,9 @@ int Tcl_ZlibStreamChecksum( Tcl_ZlibStream zshandle) /* As obtained from Tcl_ZlibStreamInit */ { - ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; + ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; - return zsh->stream.adler; + return zshPtr->stream.adler; } /* @@ -895,47 +905,48 @@ Tcl_ZlibStreamPut( int flush) /* TCL_ZLIB_NO_FLUSH, TCL_ZLIB_FLUSH, * TCL_ZLIB_FULLFLUSH, or TCL_ZLIB_FINALIZE */ { - ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; + ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; char *dataTmp = NULL; int e, size, outSize; Tcl_Obj *obj; - if (zsh->streamEnd) { - if (zsh->interp) { - Tcl_SetResult(zsh->interp, "already past compressed stream end", - TCL_STATIC); + if (zshPtr->streamEnd) { + if (zshPtr->interp) { + Tcl_SetResult(zshPtr->interp, + "already past compressed stream end", TCL_STATIC); } return TCL_ERROR; } - if (zsh->mode == TCL_ZLIB_STREAM_DEFLATE) { - zsh->stream.next_in = Tcl_GetByteArrayFromObj(data, &size); - zsh->stream.avail_in = size; + if (zshPtr->mode == TCL_ZLIB_STREAM_DEFLATE) { + zshPtr->stream.next_in = Tcl_GetByteArrayFromObj(data, &size); + zshPtr->stream.avail_in = size; /* * Deflatebound doesn't seem to take various header sizes into * account, so we add 100 extra bytes. */ - outSize = deflateBound(&zsh->stream, zsh->stream.avail_in) + 100; - zsh->stream.avail_out = outSize; - dataTmp = ckalloc(zsh->stream.avail_out); - zsh->stream.next_out = (Bytef *) dataTmp; + outSize = deflateBound(&zshPtr->stream, zshPtr->stream.avail_in)+100; + zshPtr->stream.avail_out = outSize; + dataTmp = ckalloc(zshPtr->stream.avail_out); + zshPtr->stream.next_out = (Bytef *) dataTmp; - e = deflate(&zsh->stream, flush); - if ((e==Z_OK || e==Z_BUF_ERROR) && (zsh->stream.avail_out == 0)) { - if (outSize - zsh->stream.avail_out > 0) { + e = deflate(&zshPtr->stream, flush); + if ((e==Z_OK || e==Z_BUF_ERROR) && (zshPtr->stream.avail_out == 0)) { + if (outSize - zshPtr->stream.avail_out > 0) { /* * Output buffer too small. */ obj = Tcl_NewByteArrayObj((unsigned char *) dataTmp, - outSize - zsh->stream.avail_out); + outSize - zshPtr->stream.avail_out); + /* * Now append the compressed data to the outData list. */ - Tcl_ListObjAppendElement(NULL, zsh->outData, obj); + Tcl_ListObjAppendElement(NULL, zshPtr->outData, obj); } if (outSize < 0xFFFF) { outSize = 0xFFFF; /* There may be *lots* of data left to @@ -943,25 +954,25 @@ Tcl_ZlibStreamPut( ckfree(dataTmp); dataTmp = ckalloc(outSize); } - zsh->stream.avail_out = outSize; - zsh->stream.next_out = (Bytef *) dataTmp; + zshPtr->stream.avail_out = outSize; + zshPtr->stream.next_out = (Bytef *) dataTmp; - e = deflate(&zsh->stream, flush); + e = deflate(&zshPtr->stream, flush); } /* * And append the final data block. */ - if (outSize - zsh->stream.avail_out > 0) { + if (outSize - zshPtr->stream.avail_out > 0) { obj = Tcl_NewByteArrayObj((unsigned char *) dataTmp, - outSize - zsh->stream.avail_out); + outSize - zshPtr->stream.avail_out); /* * Now append the compressed data to the outData list. */ - Tcl_ListObjAppendElement(NULL, zsh->outData, obj); + Tcl_ListObjAppendElement(NULL, zshPtr->outData, obj); } if (dataTmp) { @@ -972,13 +983,13 @@ Tcl_ZlibStreamPut( * This is easy. Just append to the inData list. */ - Tcl_ListObjAppendElement(NULL, zsh->inData, data); + Tcl_ListObjAppendElement(NULL, zshPtr->inData, data); /* * and we'll need the flush parameter for the Inflate call. */ - zsh->flush = flush; + zshPtr->flush = flush; } return TCL_OK; @@ -1002,7 +1013,7 @@ Tcl_ZlibStreamGet( int count) /* Number of bytes to grab as a maximum, you * may get less! */ { - ZlibStreamHandle *zsh = (ZlibStreamHandle *) zshandle; + ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle; int e, i, listLen, itemLen, dataPos = 0; Tcl_Obj *itemObj; unsigned char *dataPtr, *itemPtr; @@ -1012,13 +1023,13 @@ Tcl_ZlibStreamGet( * Getting beyond the of stream, just return empty string. */ - if (zsh->streamEnd) { + if (zshPtr->streamEnd) { return TCL_OK; } (void) Tcl_GetByteArrayFromObj(data, &existing); - if (zsh->mode == TCL_ZLIB_STREAM_INFLATE) { + if (zshPtr->mode == TCL_ZLIB_STREAM_INFLATE) { if (count == -1) { /* * The only safe thing to do is restict to 65k. We might cause a @@ -1035,53 +1046,53 @@ Tcl_ZlibStreamGet( dataPtr = Tcl_SetByteArrayLength(data, existing+count); dataPtr += existing; - zsh->stream.next_out = dataPtr; - zsh->stream.avail_out = count; - if (zsh->stream.avail_in == 0) { + zshPtr->stream.next_out = dataPtr; + zshPtr->stream.avail_out = count; + if (zshPtr->stream.avail_in == 0) { /* * zlib will probably need more data to decompress. */ - if (zsh->currentInput) { - Tcl_DecrRefCount(zsh->currentInput); - zsh->currentInput = NULL; + if (zshPtr->currentInput) { + Tcl_DecrRefCount(zshPtr->currentInput); + zshPtr->currentInput = NULL; } - Tcl_ListObjLength(NULL, zsh->inData, &listLen); + Tcl_ListObjLength(NULL, zshPtr->inData, &listLen); if (listLen > 0) { /* * There is more input available, get it from the list and * give it to zlib. */ - Tcl_ListObjIndex(NULL, zsh->inData, 0, &itemObj); + Tcl_ListObjIndex(NULL, zshPtr->inData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); Tcl_IncrRefCount(itemObj); - zsh->currentInput = itemObj; - zsh->stream.next_in = itemPtr; - zsh->stream.avail_in = itemLen; + zshPtr->currentInput = itemObj; + zshPtr->stream.next_in = itemPtr; + zshPtr->stream.avail_in = itemLen; /* * And remove it from the list */ - Tcl_ListObjReplace(NULL, zsh->inData, 0, 1, 0, NULL); + Tcl_ListObjReplace(NULL, zshPtr->inData, 0, 1, 0, NULL); listLen--; } } - e = inflate(&zsh->stream, zsh->flush); - Tcl_ListObjLength(NULL, zsh->inData, &listLen); + e = inflate(&zshPtr->stream, zshPtr->flush); + Tcl_ListObjLength(NULL, zshPtr->inData, &listLen); - while ((zsh->stream.avail_out > 0) && (e == Z_OK || e == Z_BUF_ERROR) - && (listLen > 0)) { + while ((zshPtr->stream.avail_out > 0) + && (e == Z_OK || e == Z_BUF_ERROR) && (listLen > 0)) { /* * State: We have not satisfied the request yet and there may be * more to inflate. */ - if (zsh->stream.avail_in > 0) { - if (zsh->interp) { - Tcl_SetResult(zsh->interp, + if (zshPtr->stream.avail_in > 0) { + if (zshPtr->interp) { + Tcl_SetResult(zshPtr->interp, "Unexpected zlib internal state during decompression", TCL_STATIC); } @@ -1089,61 +1100,61 @@ Tcl_ZlibStreamGet( return TCL_ERROR; } - if (zsh->currentInput) { - Tcl_DecrRefCount(zsh->currentInput); - zsh->currentInput = 0; + if (zshPtr->currentInput) { + Tcl_DecrRefCount(zshPtr->currentInput); + zshPtr->currentInput = 0; } /* * Get the next block of data to go to inflate. */ - Tcl_ListObjIndex(zsh->interp, zsh->inData, 0, &itemObj); + Tcl_ListObjIndex(zshPtr->interp, zshPtr->inData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); Tcl_IncrRefCount(itemObj); - zsh->currentInput = itemObj; - zsh->stream.next_in = itemPtr; - zsh->stream.avail_in = itemLen; + zshPtr->currentInput = itemObj; + zshPtr->stream.next_in = itemPtr; + zshPtr->stream.avail_in = itemLen; /* * Remove it from the list. */ - Tcl_ListObjReplace(NULL, zsh->inData, 0, 1, 0, NULL); + Tcl_ListObjReplace(NULL, zshPtr->inData, 0, 1, 0, NULL); listLen--; /* * And call inflate again. */ - e = inflate(&zsh->stream, zsh->flush); + e = inflate(&zshPtr->stream, zshPtr->flush); } - if (zsh->stream.avail_out > 0) { + if (zshPtr->stream.avail_out > 0) { Tcl_SetByteArrayLength(data, - existing + count - zsh->stream.avail_out); + existing + count - zshPtr->stream.avail_out); } if (!(e==Z_OK || e==Z_STREAM_END || e==Z_BUF_ERROR)) { Tcl_SetByteArrayLength(data, existing); - ConvertError(zsh->interp, e); + ConvertError(zshPtr->interp, e); return TCL_ERROR; } if (e == Z_STREAM_END) { - zsh->streamEnd = 1; - if (zsh->currentInput) { - Tcl_DecrRefCount(zsh->currentInput); - zsh->currentInput = 0; + zshPtr->streamEnd = 1; + if (zshPtr->currentInput) { + Tcl_DecrRefCount(zshPtr->currentInput); + zshPtr->currentInput = 0; } - inflateEnd(&zsh->stream); + inflateEnd(&zshPtr->stream); } } else { - Tcl_ListObjLength(NULL, zsh->outData, &listLen); + Tcl_ListObjLength(NULL, zshPtr->outData, &listLen); if (count == -1) { count = 0; for (i=0; ioutData, i, &itemObj); + Tcl_ListObjIndex(NULL, zshPtr->outData, i, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); if (i == 0) { - count += itemLen - zsh->outPos; + count += itemLen - zshPtr->outPos; } else { count += itemLen; } @@ -1157,28 +1168,34 @@ Tcl_ZlibStreamGet( dataPtr = Tcl_SetByteArrayLength(data, existing + count); dataPtr += existing; - while ((count > dataPos) && (Tcl_ListObjLength(NULL, zsh->outData, - &listLen) == TCL_OK) && (listLen > 0)) { - Tcl_ListObjIndex(NULL, zsh->outData, 0, &itemObj); + while ((count > dataPos) && + (Tcl_ListObjLength(NULL, zshPtr->outData, &listLen) == TCL_OK) + && (listLen > 0)) { + /* + * Get the next chunk off our list of chunks and grab the data out + * of it. + */ + + Tcl_ListObjIndex(NULL, zshPtr->outData, 0, &itemObj); itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen); - if (itemLen-zsh->outPos >= count-dataPos) { + if (itemLen-zshPtr->outPos >= count-dataPos) { unsigned len = count - dataPos; - memcpy(dataPtr + dataPos, itemPtr + zsh->outPos, len); - zsh->outPos += len; + memcpy(dataPtr + dataPos, itemPtr + zshPtr->outPos, len); + zshPtr->outPos += len; dataPos += len; - if (zsh->outPos == itemLen) { - zsh->outPos = 0; + if (zshPtr->outPos == itemLen) { + zshPtr->outPos = 0; } } else { - unsigned len = itemLen - zsh->outPos; + unsigned len = itemLen - zshPtr->outPos; - memcpy(dataPtr + dataPos, itemPtr + zsh->outPos, len); + memcpy(dataPtr + dataPos, itemPtr + zshPtr->outPos, len); dataPos += len; - zsh->outPos = 0; + zshPtr->outPos = 0; } - if (zsh->outPos == 0) { - Tcl_ListObjReplace(NULL, zsh->outData, 0, 1, 0, NULL); + if (zshPtr->outPos == 0) { + Tcl_ListObjReplace(NULL, zshPtr->outData, 0, 1, 0, NULL); listLen--; } } @@ -1599,7 +1616,7 @@ TclZlibCmd( f_compress, f_decompress, f_deflate, f_gunzip, f_gzip, f_inflate }; - if (objc < 3) { + if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command arg ?...?"); return TCL_ERROR; } @@ -1611,7 +1628,7 @@ TclZlibCmd( switch ((enum zlibCommands) command) { case z_adler32: /* adler32 str ?startvalue? * -> checksum */ - if (objc > 4) { + if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); return TCL_ERROR; } @@ -1627,7 +1644,7 @@ TclZlibCmd( return TCL_OK; case z_crc32: /* crc32 str ?startvalue? * -> checksum */ - if (objc > 4) { + if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); return TCL_ERROR; } @@ -1643,7 +1660,7 @@ TclZlibCmd( return TCL_OK; case z_deflate: /* deflate data ?level? * -> rawCompressedData */ - if (objc > 4) { + if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); return TCL_ERROR; } @@ -1659,7 +1676,7 @@ TclZlibCmd( NULL); case z_compress: /* compress data ?level? * -> zlibCompressedData */ - if (objc > 4) { + if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); return TCL_ERROR; } @@ -1675,7 +1692,7 @@ TclZlibCmd( NULL); case z_gzip: /* gzip data ?level? * -> gzippedCompressedData */ - if (objc > 7 || ((objc & 1) == 0)) { + if (objc < 3 || objc > 7 || ((objc & 1) == 0)) { Tcl_WrongNumArgs(interp, 2, objv, "data ?-level level? ?-header header?"); return TCL_ERROR; @@ -1710,7 +1727,7 @@ TclZlibCmd( headerDictObj); case z_inflate: /* inflate rawcomprdata ?bufferSize? * -> decompressedData */ - if (objc > 4) { + if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); return TCL_ERROR; } @@ -1727,7 +1744,7 @@ TclZlibCmd( buffersize, NULL); case z_decompress: /* decompress zlibcomprdata ?bufferSize? * -> decompressedData */ - if (objc > 4) { + if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); return TCL_ERROR; } @@ -1744,7 +1761,7 @@ TclZlibCmd( buffersize, NULL); case z_gunzip: /* gunzip gzippeddata ?bufferSize? * -> decompressedData */ - if (objc > 5 || ((objc & 1) == 0)) { + if (objc < 3 || objc > 5 || ((objc & 1) == 0)) { Tcl_WrongNumArgs(interp, 2, objv, "data ?-headerVar varName?"); return TCL_ERROR; } @@ -1790,7 +1807,7 @@ TclZlibCmd( } return TCL_OK; case z_stream: /* stream deflate/inflate/...gunzip ?level?*/ - if (objc > 4) { + if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "mode ?level?"); return TCL_ERROR; } -- cgit v0.12 From 5ffa1f30e55d3d1b85da545dcc36aa8c482789e2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 9 Feb 2009 22:55:44 +0000 Subject: fix [Bug 2555129] const compiler warning (as error) in tclCompile.c --- ChangeLog | 4 ++++ generic/tclCompile.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 094901f..d6b1cd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-05 Jan Nijtmans + * generic/tclCompile.c fix [Bug 2555129] const compiler + warning (as error) in tclCompile.c + 2009-02-07 Donal K. Fellows * generic/tclZlib.c (TclZlibCmd): [Bug 2573172]: Ensure that when diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 8e68d7d..63a95aa 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.165 2009/01/22 06:42:33 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.166 2009/02/09 22:55:44 nijtmans Exp $ */ #include "tclInt.h" @@ -422,7 +422,7 @@ static void RecordByteCodeStats(ByteCode *codePtr); static int SetByteCodeFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static int FormatInstruction(ByteCode *codePtr, - unsigned char *pc, Tcl_Obj *bufferObj); + const unsigned char *pc, Tcl_Obj *bufferObj); static void PrintSourceToObj(Tcl_Obj *appendObj, const char *stringPtr, int maxChars); /* @@ -3738,7 +3738,7 @@ TclDisassembleByteCodeObj( static int FormatInstruction( ByteCode *codePtr, /* Bytecode containing the instruction. */ - unsigned char *pc, /* Points to first byte of instruction. */ + const unsigned char *pc, /* Points to first byte of instruction. */ Tcl_Obj *bufferObj) /* Object to append instruction info to. */ { Proc *procPtr = codePtr->procPtr; -- cgit v0.12 From 70737b4c24853238f8a5ec5ef6a878022e94c978 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 03:55:51 +0000 Subject: formatting --- ChangeLog | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6b1cd7..187317d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ -2009-02-05 Jan Nijtmans - * generic/tclCompile.c fix [Bug 2555129] const compiler - warning (as error) in tclCompile.c +2009-02-09 Jan Nijtmans + + * generic/tclCompile.c: fix [Bug 2555129] const compiler warning (as + error) in tclCompile.c 2009-02-07 Donal K. Fellows -- cgit v0.12 From 34980e46f1c6693dba7bcab875f6a227085a87ec Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 14:38:55 +0000 Subject: * generic/tclStringObj.c (Tcl_GetUnicode*): Reduce code duplication. --- ChangeLog | 4 ++++ generic/tclStringObj.c | 27 ++------------------------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 187317d..4a15b01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-02-10 Don Porter + + * generic/tclStringObj.c (Tcl_GetUnicode*): Reduce code duplication. + 2009-02-09 Jan Nijtmans * generic/tclCompile.c: fix [Bug 2555129] const compiler warning (as diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 589d046..da17c2f 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.87 2009/02/05 21:27:45 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.88 2009/02/10 14:38:55 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -544,30 +544,7 @@ Tcl_GetUnicode( Tcl_Obj *objPtr) /* The object to find the unicode string * for. */ { - String *stringPtr; - - SetStringFromAny(NULL, objPtr); - stringPtr = GET_STRING(objPtr); - - if ((stringPtr->numChars == -1) || (stringPtr->hasUnicode == 0)) { - /* - * We haven't yet calculated the length, or all of the characters in - * the Utf string are 1 byte chars (so we didn't store the unicode - * str). Since this function must return a unicode string, and one has - * not yet been stored, force the Unicode to be calculated and stored - * now. - */ - - FillUnicodeRep(objPtr); - - /* - * We need to fetch the pointer again because we have just reallocated - * the structure to make room for the Unicode data. - */ - - stringPtr = GET_STRING(objPtr); - } - return stringPtr->unicode; + return Tcl_GetUnicodeFromObj(objPtr, NULL); } /* -- cgit v0.12 From 526787f45e75e5f6fb736b3f4b3938ec4eaf2c44 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 14:59:34 +0000 Subject: * generic/tclStringObj.c: Reduce code duplication in Tcl_GetUnicode*. Restrict AppendUtfToUtfRep to non-negative length appends. --- ChangeLog | 3 ++- generic/tclStringObj.c | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a15b01..5a24360 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2009-02-10 Don Porter - * generic/tclStringObj.c (Tcl_GetUnicode*): Reduce code duplication. + * generic/tclStringObj.c: Reduce code duplication in Tcl_GetUnicode*. + Restrict AppendUtfToUtfRep to non-negative length appends. 2009-02-09 Jan Nijtmans diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index da17c2f..f74f90b 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.88 2009/02/10 14:38:55 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.89 2009/02/10 14:59:34 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1146,7 +1146,7 @@ Tcl_AppendLimitedToObj( if (stringPtr->hasUnicode != 0) { AppendUtfToUnicodeRep(objPtr, ellipsis, -1); } else { - AppendUtfToUtfRep(objPtr, ellipsis, -1); + AppendUtfToUtfRep(objPtr, ellipsis, strlen(ellipsis)); } } @@ -1518,6 +1518,7 @@ AppendUtfToUnicodeRep( * * This function appends "numBytes" bytes of "bytes" to the UTF string * rep of "objPtr". objPtr must already have a valid String rep. + * numBytes must be non-negative. * * Results: * None. @@ -1537,9 +1538,6 @@ AppendUtfToUtfRep( String *stringPtr; int newLength, oldLength; - if (numBytes < 0) { - numBytes = (bytes ? strlen(bytes) : 0); - } if (numBytes == 0) { return; } -- cgit v0.12 From 7b3c951b15a0055349ce9b6514624ea3eee60caa Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 15:37:18 +0000 Subject: Convert all Tcl_InvalidateStringRep() calls into macros. --- ChangeLog | 1 + generic/tclStringObj.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a24360..9f0aa06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclStringObj.c: Reduce code duplication in Tcl_GetUnicode*. Restrict AppendUtfToUtfRep to non-negative length appends. + Convert all Tcl_InvalidateStringRep() calls into macros. 2009-02-09 Jan Nijtmans diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index f74f90b..2b0157e 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.89 2009/02/10 14:59:34 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.90 2009/02/10 15:37:19 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -739,7 +739,7 @@ Tcl_SetStringObj( * length bytes starting at "bytes". */ - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); if (length < 0) { length = (bytes? strlen(bytes) : 0); } @@ -814,7 +814,7 @@ Tcl_SetObjLength( if (objPtr->bytes != NULL && objPtr->length != 0) { memcpy(newBytes, objPtr->bytes, (size_t) objPtr->length); - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); } objPtr->bytes = newBytes; } @@ -940,7 +940,7 @@ Tcl_AttemptSetObjLength( } if (objPtr->bytes != NULL && objPtr->length != 0) { memcpy(newBytes, objPtr->bytes, (size_t) objPtr->length); - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); } } objPtr->bytes = newBytes; @@ -1063,7 +1063,7 @@ SetUnicodeObj( memcpy(stringPtr->unicode, unicode, uallocated); stringPtr->unicode[numChars] = 0; - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); objPtr->typePtr = &tclStringType; SET_STRING(objPtr, stringPtr); } @@ -1422,7 +1422,7 @@ AppendUnicodeToUnicodeRep( stringPtr->unicode[numChars] = 0; stringPtr->numChars = numChars; - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); } /* @@ -2674,7 +2674,7 @@ TclStringObjReverse( source[lastCharIdx--] = source[i]; source[i++] = tmp; } - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); return objPtr; } -- cgit v0.12 From 53dbabfac015bf2ff02f18a116d9543d1bfb90c9 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 17:09:09 +0000 Subject: * generic/tclObj.c (Tcl_GetString): Added comments and validity checks following the call to an UpdateStringProc. Simplify Tcl_AttemptSetObjLength by removing unreachable code. --- ChangeLog | 4 ++++ generic/tclObj.c | 19 ++++++++++++++++++- generic/tclStringObj.c | 15 ++++----------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f0aa06..07c2111 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,12 @@ 2009-02-10 Don Porter + * generic/tclObj.c (Tcl_GetString): Added comments and validity + checks following the call to an UpdateStringProc. + * generic/tclStringObj.c: Reduce code duplication in Tcl_GetUnicode*. Restrict AppendUtfToUtfRep to non-negative length appends. Convert all Tcl_InvalidateStringRep() calls into macros. + Simplify Tcl_AttemptSetObjLength by removing unreachable code. 2009-02-09 Jan Nijtmans diff --git a/generic/tclObj.c b/generic/tclObj.c index 72de8f4..56d42a6 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.149 2009/02/03 18:16:07 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.150 2009/02/10 17:09:09 dgp Exp $ */ #include "tclInt.h" @@ -1068,11 +1068,28 @@ Tcl_GetString( return objPtr->bytes; } + /* + * Note we do not check for objPtr->typePtr == NULL. An invariant of + * a properly maintained Tcl_Obj is that at least one of objPtr->bytes + * and objPtr->typePtr must not be NULL. If broken extensions fail to + * maintain that invariant, we can crash here. + */ + if (objPtr->typePtr->updateStringProc == NULL) { + /* + * Those Tcl_ObjTypes which choose not to define an updateStringProc + * must be written in such a way that (objPtr->bytes) never becomes + * NULL. This panic was added in Tcl 8.1. + */ Tcl_Panic("UpdateStringProc should not be invoked for type %s", objPtr->typePtr->name); } objPtr->typePtr->updateStringProc(objPtr); + if (objPtr->bytes == NULL || objPtr->length < 0 + || objPtr->bytes[objPtr->length] != '\0') { + Tcl_Panic("UpdateStringProc for type '%s' " + "failed to create a valid string rep", objPtr->typePtr->name); + } return objPtr->bytes; } diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 2b0157e..eef8b1d 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.90 2009/02/10 15:37:19 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.91 2009/02/10 17:09:09 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -930,18 +930,11 @@ Tcl_AttemptSetObjLength( if (objPtr->bytes != tclEmptyStringRep) { newBytes = attemptckrealloc(objPtr->bytes, (unsigned) length+1); - if (newBytes == NULL) { - return 0; - } } else { newBytes = attemptckalloc((unsigned) length+1); - if (newBytes == NULL) { - return 0; - } - if (objPtr->bytes != NULL && objPtr->length != 0) { - memcpy(newBytes, objPtr->bytes, (size_t) objPtr->length); - TclInvalidateStringRep(objPtr); - } + } + if (newBytes == NULL) { + return 0; } objPtr->bytes = newBytes; stringPtr->allocated = length; -- cgit v0.12 From d1aef8650a1ebf59f57b1c605264aadcc928fa57 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 17:28:37 +0000 Subject: Simplify SetStringFromAny() by removing unreachable and duplicate code. --- ChangeLog | 1 + generic/tclStringObj.c | 38 +++++++++++++------------------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07c2111..cf6e42d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ Restrict AppendUtfToUtfRep to non-negative length appends. Convert all Tcl_InvalidateStringRep() calls into macros. Simplify Tcl_AttemptSetObjLength by removing unreachable code. + Simplify SetStringFromAny() by removing unreachable and duplicate code. 2009-02-09 Jan Nijtmans diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index eef8b1d..15ed7af 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.91 2009/02/10 17:09:09 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.92 2009/02/10 17:28:37 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2841,39 +2841,27 @@ SetStringFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr) /* The object to convert. */ { - /* - * The Unicode object is optimized for the case where each UTF char in a - * string is only one byte. In this case, we store the value of numChars, - * but we don't copy the bytes to the unicodeObj->unicode. - */ - if (objPtr->typePtr != &tclStringType) { - String *stringPtr; + String *stringPtr = (String *) ckalloc((unsigned) sizeof(String)); - if (objPtr->typePtr != NULL) { - if (objPtr->bytes == NULL) { - objPtr->typePtr->updateStringProc(objPtr); - } - TclFreeIntRep(objPtr); - } - objPtr->typePtr = &tclStringType; + /* + * Convert whatever we have into an untyped value. Just A String. + */ + + (void) TclGetString(objPtr); + TclFreeIntRep(objPtr); /* - * Allocate enough space for the basic String structure. + * Create a basic String intrep that just points to the UTF-8 string + * already in place at objPtr->bytes. */ - stringPtr = stringAlloc(STRING_UALLOC(0)); stringPtr->numChars = -1; - stringPtr->uallocated = STRING_UALLOC(0); + stringPtr->allocated = objPtr->length; + stringPtr->uallocated = 0; stringPtr->hasUnicode = 0; - - if (objPtr->bytes != NULL) { - stringPtr->allocated = objPtr->length; - objPtr->bytes[objPtr->length] = 0; - } else { - objPtr->length = 0; - } SET_STRING(objPtr, stringPtr); + objPtr->typePtr = &tclStringType; } return TCL_OK; } -- cgit v0.12 From 0de29ee94bd90a5b0401dd31599c0c5a44c387e2 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 17:37:35 +0000 Subject: Simplify Tcl_SetObjLength by removing unreachable code. --- ChangeLog | 1 + generic/tclStringObj.c | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf6e42d..c05dd16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Convert all Tcl_InvalidateStringRep() calls into macros. Simplify Tcl_AttemptSetObjLength by removing unreachable code. Simplify SetStringFromAny() by removing unreachable and duplicate code. + Simplify Tcl_SetObjLength by removing unreachable code. 2009-02-09 Jan Nijtmans diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 15ed7af..940e6d1 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.92 2009/02/10 17:28:37 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.93 2009/02/10 17:37:35 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -807,16 +807,9 @@ Tcl_SetObjLength( */ if (objPtr->bytes != tclEmptyStringRep) { - objPtr->bytes = ckrealloc((char *) objPtr->bytes, - (unsigned) (length + 1)); + objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) length+1); } else { - char *newBytes = ckalloc((unsigned) (length+1)); - - if (objPtr->bytes != NULL && objPtr->length != 0) { - memcpy(newBytes, objPtr->bytes, (size_t) objPtr->length); - TclInvalidateStringRep(objPtr); - } - objPtr->bytes = newBytes; + objPtr->bytes = ckalloc((unsigned) length+1); } stringPtr->allocated = length; -- cgit v0.12 From 23f46a304464683d61975cfe1622a61b52b2d86a Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Feb 2009 21:04:05 +0000 Subject: Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString, which is only called when objPtr->bytes is NULL. --- ChangeLog | 2 ++ generic/tclStringObj.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c05dd16..f3978af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ Simplify Tcl_AttemptSetObjLength by removing unreachable code. Simplify SetStringFromAny() by removing unreachable and duplicate code. Simplify Tcl_SetObjLength by removing unreachable code. + Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString, + which is only called when objPtr->bytes is NULL. 2009-02-09 Jan Nijtmans diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 940e6d1..2d2622c 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.93 2009/02/10 17:37:35 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.94 2009/02/10 21:04:06 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2888,7 +2888,6 @@ UpdateStringOfString( String *stringPtr; stringPtr = GET_STRING(objPtr); - if ((objPtr->bytes == NULL) || (stringPtr->allocated == 0)) { if (stringPtr->numChars <= 0) { /* * If there is no Unicode rep, or the string has 0 chars, then set @@ -2921,7 +2920,6 @@ UpdateStringOfString( dst += Tcl_UniCharToUtf(unicode[i], dst); } *dst = '\0'; - } return; } -- cgit v0.12 From 9968eece0a412b8035a5437db0e8c52723c94e7f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 10 Feb 2009 21:57:16 +0000 Subject: fix [tcl-Bug 2502365] Building of head on HPUX is broken when using the native CC. --- ChangeLog | 6 ++++++ unix/configure | 13 ++++++++----- unix/tcl.m4 | 13 ++++++++----- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3978af..176f465 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-10 Jan Nijtmans + + * unix/tcl.m4: fix [tcl-Bug 2502365] Building of head on HPUX is + broken when using the native CC. + * unix/configure (autoconf-2.59) + 2009-02-10 Don Porter * generic/tclObj.c (Tcl_GetString): Added comments and validity diff --git a/unix/configure b/unix/configure index d7bfe2c..3b7b926 100755 --- a/unix/configure +++ b/unix/configure @@ -7111,12 +7111,14 @@ fi if test "$tcl_ok" = yes; then + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi @@ -7124,18 +7126,19 @@ fi if test "$GCC" = yes; then SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} else CFLAGS="$CFLAGS -z" - # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc - #CFLAGS="$CFLAGS +DAportable" - SHLIB_CFLAGS="+z" - SHLIB_LD="${CC} -b" fi + # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc + #CFLAGS="$CFLAGS +DAportable" + # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes"; then diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 3c82975..bcd3611 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1268,24 +1268,27 @@ dnl AC_CHECK_TOOL(AR, ar) ]) AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) AS_IF([test "$tcl_ok" = yes], [ + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" ]) AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ], [ CFLAGS="$CFLAGS -z" - # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc - #CFLAGS="$CFLAGS +DAportable" - SHLIB_CFLAGS="+z" - SHLIB_LD="${CC} -b" ]) + # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc + #CFLAGS="$CFLAGS +DAportable" + # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = "yes"], [ AS_IF([test "$GCC" = yes], [ -- cgit v0.12 From b07274fff759a29a06f8c988c019d09d583fe435 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 10 Feb 2009 22:49:42 +0000 Subject: - eliminate some unnessary type casts - some internal const decorations - spacing --- ChangeLog | 20 ++++++++++++++++++++ generic/tclEncoding.c | 6 +++--- generic/tclEvent.c | 4 ++-- generic/tclExecute.c | 24 ++++++++++++------------ generic/tclIO.c | 16 ++++++++-------- generic/tclIOCmd.c | 20 ++++++++++---------- generic/tclIORChan.c | 4 ++-- generic/tclIOUtil.c | 20 ++++++++++---------- generic/tclIndexObj.c | 14 +++++++------- generic/tclInterp.c | 12 ++++++------ generic/tclListObj.c | 8 +++++--- generic/tclLiteral.c | 16 ++++++++-------- generic/tclNamesp.c | 36 ++++++++++++++++++------------------ generic/tclOOBasic.c | 4 ++-- generic/tclObj.c | 11 ++++++----- generic/tclPathObj.c | 4 ++-- generic/tclPkg.c | 9 +++++---- generic/tclProc.c | 12 ++++++------ generic/tclRegexp.c | 4 ++-- 19 files changed, 134 insertions(+), 110 deletions(-) diff --git a/ChangeLog b/ChangeLog index 176f465..6454f89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2009-02-05 Jan Nijtmans + * generic/tclEncoding.c - eliminate some unnessary type casts + * generic/tclEvent.c - some internal const decorations + * generic/tclExecute.c - spacing + * generic/tclIndexObj.c + * generic/tclInterp.c + * generic/tclIO.c + * generic/tclIOCmd.c + * generic/tclIORChan.c + * generic/tclIOUtil.c + * generic/tclListObj.c + * generic/tclLiteral.c + * generic/tclNamesp.c + * generic/tclObj.c + * generic/tclOOBasic.c + * generic/tclPathObj.c + * generic/tclPkg.c + * generic/tclProc.c + * generic/tclRegexp.c + 2009-02-10 Jan Nijtmans * unix/tcl.m4: fix [tcl-Bug 2502365] Building of head on HPUX is diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 843d46c..441e099 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.65 2008/10/27 19:08:53 dgp Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.66 2009/02/10 22:49:55 nijtmans Exp $ */ #include "tclInt.h" @@ -1727,7 +1727,7 @@ LoadTableEncoding( Tcl_IncrRefCount(objPtr); for (i = 0; i < numPages; i++) { int ch; - char *p; + const char *p; Tcl_ReadChars(chan, objPtr, 3 + 16 * (16 * 4 + 1), 0); p = Tcl_GetString(objPtr); @@ -3494,7 +3494,7 @@ InitializeEncodingSearchPath( int *lengthPtr, Tcl_Encoding *encodingPtr) { - char *bytes; + const char *bytes; int i, numDirs, numBytes; Tcl_Obj *libPath, *encodingObj, *searchPath; diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 40e1fe6..ada7ecb 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.87 2009/01/27 00:01:45 ferrieux Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.88 2009/02/10 22:49:42 nijtmans Exp $ */ #include "tclInt.h" @@ -1332,7 +1332,7 @@ Tcl_VwaitObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int done, foundEvent; - char *nameString; + const char *nameString; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 601fe6e..0a86306 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.425 2009/02/05 14:21:42 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.426 2009/02/10 22:50:00 nijtmans Exp $ */ #include "tclInt.h" @@ -179,7 +179,7 @@ typedef struct BottomData { /* ------------------------------------------*/ TEOV_callback *atExitPtr; /* This field is used on return FROM here */ /* ------------------------------------------*/ - unsigned char *pc; /* These fields are used on return TO this */ + const unsigned char *pc; /* These fields are used on return TO this */ ptrdiff_t *catchTop; /* this level: they record the state when a */ int cleanup; /* new codePtr was received for NR execution */ Tcl_Obj *auxObjList; @@ -671,14 +671,14 @@ static void DeleteExecStack(ExecStack *esPtr); static void DupExprCodeInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static void FreeExprCodeInternalRep(Tcl_Obj *objPtr); -static ExceptionRange * GetExceptRangeForPc(unsigned char *pc, int catchOnly, +static ExceptionRange * GetExceptRangeForPc(const unsigned char *pc, int catchOnly, ByteCode *codePtr); -static const char * GetSrcInfoForPc(unsigned char *pc, ByteCode *codePtr, +static const char * GetSrcInfoForPc(const unsigned char *pc, ByteCode *codePtr, int *lengthPtr); static Tcl_Obj ** GrowEvaluationStack(ExecEnv *eePtr, int growth, int move); static void IllegalExprOperandType(Tcl_Interp *interp, - unsigned char *pc, Tcl_Obj *opndPtr); + const unsigned char *pc, Tcl_Obj *opndPtr); static void InitByteCodeExecution(Tcl_Interp *interp); /* Useful elsewhere, make available in tclInt.h or stubs? */ static Tcl_Obj ** StackAllocWords(Tcl_Interp *interp, int numWords); @@ -1788,7 +1788,7 @@ TclExecuteByteCode( register Tcl_Obj **tosPtr = NULL; /* Cached pointer to top of evaluation * stack. */ - register unsigned char *pc = NULL; + register const unsigned char *pc = NULL; /* The current program counter. */ int instructionCount = 0; /* Counter that is used to work out when to * call Tcl_AsyncReady() */ @@ -4407,7 +4407,7 @@ TclExecuteByteCode( int found, s1len, s2len, llen, i; Tcl_Obj *valuePtr, *value2Ptr, *o; - char *s1; + const char *s1; const char *s2; value2Ptr = OBJ_AT_TOS; @@ -4497,7 +4497,7 @@ TclExecuteByteCode( iResult = (*pc == INST_STR_EQ); } else { - char *s1, *s2; + const char *s1, *s2; int s1len, s2len; s1 = TclGetStringFromObj(valuePtr, &s1len); @@ -8125,14 +8125,14 @@ static void IllegalExprOperandType( Tcl_Interp *interp, /* Interpreter to which error information * pertains. */ - unsigned char *pc, /* Points to the instruction being executed + const unsigned char *pc, /* Points to the instruction being executed * when the illegal type was found. */ Tcl_Obj *opndPtr) /* Points to the operand holding the value * with the illegal type. */ { ClientData ptr; int type; - unsigned char opcode = *pc; + const unsigned char opcode = *pc; const char *description, *operator = operatorStrings[opcode - INST_LOR]; if (opcode == INST_EXPON) { @@ -8259,7 +8259,7 @@ TclGetSrcInfoForPc( static const char * GetSrcInfoForPc( - unsigned char *pc, /* The program counter value for which to + const unsigned char *pc, /* The program counter value for which to * return the closest command's source info. * This points to a bytecode instruction in * codePtr's code. */ @@ -8383,7 +8383,7 @@ GetSrcInfoForPc( static ExceptionRange * GetExceptRangeForPc( - unsigned char *pc, /* The program counter value for which to + const unsigned char *pc, /* The program counter value for which to * search for a closest enclosing exception * range. This points to a bytecode * instruction in codePtr's code. */ diff --git a/generic/tclIO.c b/generic/tclIO.c index 3ed45a2..7814e32 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.158 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.159 2009/02/10 22:49:45 nijtmans Exp $ */ #include "tclInt.h" @@ -3158,7 +3158,7 @@ Tcl_CloseEx( NULL); return TCL_ERROR; } - + /* * Check direction against channel mode. It is an error if we try to close * a direction not supported by the channel (already closed, or never @@ -3192,14 +3192,14 @@ Tcl_CloseEx( return TCL_ERROR; } - if (flags & TCL_CLOSE_READ) { + if (flags & TCL_CLOSE_READ) { /* * Call the finalization code directly. There are no events to handle, * there cannot be for the read-side. */ return CloseChannelPart(interp, chanPtr, 0, flags); - } else if (flags & TCL_CLOSE_WRITE) { + } else if (flags & TCL_CLOSE_WRITE) { if ((statePtr->curOutPtr != NULL) && IsBufferReady(statePtr->curOutPtr)) { SetFlag(statePtr, BUFFER_READY); @@ -3785,7 +3785,7 @@ Tcl_WriteObj( Channel *chanPtr; ChannelState *statePtr; /* State info for channel */ - char *src; + const char *src; int srcLen; statePtr = ((Channel *) chan)->state; @@ -4324,7 +4324,7 @@ Tcl_Gets( { Tcl_Obj *objPtr; int charsStored, length; - char *string; + const char *string; TclNewObj(objPtr); charsStored = Tcl_GetsObj(chan, objPtr); @@ -8714,7 +8714,7 @@ Tcl_FileEventObjCmd( Channel *chanPtr; /* The channel to create the handler for. */ ChannelState *statePtr; /* State info for channel */ Tcl_Channel chan; /* The opaque type for the channel. */ - char *chanName; + const char *chanName; int modeIndex; /* Index of mode argument. */ int mask; static const char *const modeOptions[] = {"readable", "writable", NULL}; @@ -8922,7 +8922,7 @@ CopyData( Tcl_Channel inChan, outChan; ChannelState *inStatePtr, *outStatePtr; int result = TCL_OK, size, total, sizeb; - char *buffer; + const char *buffer; int inBinary, outBinary, sameEncoding; /* Encoding control */ int underflow; /* Input underflow */ diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 95f4ebc..3ee768f 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.62 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.63 2009/02/10 22:49:58 nijtmans Exp $ */ #include "tclInt.h" @@ -145,7 +145,7 @@ Tcl_PutsObjCmd( * documented. */ - char *arg; + const char *arg; int length; arg = TclGetStringFromObj(objv[3], &length); @@ -435,7 +435,7 @@ Tcl_ReadObjCmd( toRead = -1; if (i < objc) { - char *arg; + const char *arg; arg = TclGetString(objv[i]); if (isdigit(UCHAR(arg[0]))) { /* INTL: digit */ @@ -477,7 +477,7 @@ Tcl_ReadObjCmd( */ if ((charactersRead > 0) && (newline != 0)) { - char *result; + const char *result; int length; result = TclGetStringFromObj(resultPtr, &length); @@ -714,7 +714,7 @@ Tcl_CloseObjCmd( */ Tcl_Obj *resultPtr = Tcl_GetObjResult(interp); - char *string; + const char *string; int len; if (Tcl_IsShared(resultPtr)) { @@ -756,7 +756,7 @@ Tcl_FconfigureObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *optionName, *valueName; + const char *optionName, *valueName; Tcl_Channel chan; /* The channel to set a mode on. */ int i; /* Iterate over arg-value pairs. */ @@ -881,7 +881,7 @@ Tcl_ExecObjCmd( Tcl_Obj *resultPtr; const char **argv; - char *string; + const char *string; Tcl_Channel chan; int argc, background, i, index, keepNewline, result, skip, length; int ignoreStderr; @@ -1107,7 +1107,7 @@ Tcl_OpenObjCmd( } else { modeString = TclGetString(objv[2]); if (objc == 4) { - char *permString = TclGetString(objv[3]); + const char *permString = TclGetString(objv[3]); int code = TCL_ERROR; int scanned = TclParseAllWhiteSpace(permString, -1); @@ -1469,7 +1469,7 @@ Tcl_SocketObjCmd( SKT_ASYNC, SKT_MYADDR, SKT_MYPORT, SKT_SERVER }; int optionIndex, a, server = 0, port, myport = 0, async = 0; - char *host, *script = NULL, *myaddr = NULL; + const char *host, *script = NULL, *myaddr = NULL; Tcl_Channel chan; if (TclpHasSockets(interp) != TCL_OK) { @@ -1505,7 +1505,7 @@ Tcl_SocketObjCmd( myaddr = TclGetString(objv[a]); break; case SKT_MYPORT: { - char *myPortName; + const char *myPortName; a++; if (a >= objc) { diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index cdda068..554380a 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.38 2009/01/26 16:42:39 dkf Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.39 2009/02/10 22:50:09 nijtmans Exp $ */ #include @@ -1801,7 +1801,7 @@ ReflectGetOption( return TCL_ERROR; } else { int len; - char *str = Tcl_GetStringFromObj(resObj, &len); + const char *str = Tcl_GetStringFromObj(resObj, &len); if (len) { Tcl_DStringAppend(dsPtr, " ", 1); diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 6cc9fd2..44df324 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.162 2009/01/06 10:08:10 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.163 2009/02/10 22:50:05 nijtmans Exp $ */ #include "tclInt.h" @@ -631,7 +631,7 @@ FsUpdateCwd( ClientData clientData) { int len; - char *str = NULL; + const char *str = NULL; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey); if (cwdObj != NULL) { @@ -1684,7 +1684,7 @@ Tcl_FSEvalFileEx( Tcl_StatBuf statBuf; Tcl_Obj *oldScriptFile; Interp *iPtr; - char *string; + const char *string; Tcl_Channel chan; Tcl_Obj *objPtr; @@ -1797,7 +1797,7 @@ TclNREvalFile( Tcl_StatBuf statBuf; Tcl_Obj *oldScriptFile, *objPtr; Interp *iPtr; - char *string; + const char *string; Tcl_Channel chan; if (Tcl_FSGetNormalizedPath(interp, pathPtr) == NULL) { @@ -2745,7 +2745,7 @@ Tcl_FSGetCwd( */ int len1, len2; - char *str1, *str2; + const char *str1, *str2; str1 = Tcl_GetStringFromObj(tsdPtr->cwdPathPtr, &len1); str2 = Tcl_GetStringFromObj(norm, &len2); @@ -3664,7 +3664,7 @@ Tcl_FSSplitPath( const Tcl_Filesystem *fsPtr; char separator = '/'; int driveNameLength; - char *p; + const char *p; /* * Perform platform specific splitting. @@ -3710,7 +3710,7 @@ Tcl_FSSplitPath( */ for (;;) { - char *elementStart = p; + const char *elementStart = p; int length; while ((*p != '\0') && (*p != separator)) { @@ -3803,7 +3803,7 @@ TclGetPathType( * caller. */ { int pathLen; - char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); + const char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); Tcl_PathType type; type = TclFSNonnativePathType(path, pathLen, filesystemPtrPtr, @@ -3910,7 +3910,7 @@ TclFSNonnativePathType( while (numVolumes > 0) { Tcl_Obj *vol; int len; - char *strVol; + const char *strVol; numVolumes--; Tcl_ListObjIndex(NULL, thisFsVolumes, numVolumes, &vol); @@ -4255,7 +4255,7 @@ Tcl_FSRemoveDirectory( Tcl_Obj *cwdPtr = Tcl_FSGetCwd(NULL); if (cwdPtr != NULL) { - char *cwdStr, *normPathStr; + const char *cwdStr, *normPathStr; int cwdLen, normLen; Tcl_Obj *normPath = Tcl_FSGetNormalizedPath(NULL, pathPtr); diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index db2c0d1..6edd577 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.49 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.50 2009/02/10 22:49:49 nijtmans Exp $ */ #include "tclInt.h" @@ -180,7 +180,7 @@ GetIndexFromObjList( int objc, result, t; Tcl_Obj **objv; - char **tablePtr; + const char **tablePtr; /* * Use Tcl_GetIndexFromObjStruct to do the work to avoid duplicating @@ -196,7 +196,7 @@ GetIndexFromObjList( * Build a string table from the list. */ - tablePtr = (char **) ckalloc((objc + 1) * sizeof(char *)); + tablePtr = (const char **) ckalloc((objc + 1) * sizeof(char *)); for (t = 0; t < objc; t++) { if (objv[t] == objPtr) { /* @@ -268,7 +268,7 @@ Tcl_GetIndexFromObjStruct( int *indexPtr) /* Place to store resulting integer index. */ { int index, idx, numAbbrev; - char *key, *p1; + const char *key, *p1; const char *p2; const char *const *entryPtr; Tcl_Obj *resultPtr; @@ -678,7 +678,7 @@ PrefixAllObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int tableObjc, result, t, length, elemLength; - char *string, *elemString; + const char *string, *elemString; Tcl_Obj **tableObjv, *resultPtr; if (objc != 3) { @@ -735,7 +735,7 @@ PrefixLongestObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int tableObjc, result, i, t, length, elemLength, resultLength; - char *string, *elemString, *resultString; + const char *string, *elemString, *resultString; Tcl_Obj **tableObjv; if (objc != 3) { @@ -1085,7 +1085,7 @@ Tcl_ParseArgsObjv( const Tcl_ArgvInfo *matchPtr; /* Descriptor that matches current argument. */ Tcl_Obj *curArg; /* Current argument */ - char *str = NULL; + const char *str = NULL; register char c; /* Second character of current arg (used for * quick check for matching; use 2nd char. * because first char. will almost always be diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 643b7e0..3105dc9 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.103 2009/02/06 01:00:00 mistachkin Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.104 2009/02/10 22:50:04 nijtmans Exp $ */ #include "tclInt.h" @@ -1037,7 +1037,7 @@ Tcl_InterpObjCmd( InterpInfo *iiPtr; Tcl_HashEntry *hPtr; Alias *aliasPtr; - char *aliasName; + const char *aliasName; if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, "path alias"); @@ -1536,7 +1536,7 @@ AliasCreate( slavePtr = &((InterpInfo *) ((Interp *) slaveInterp)->interpInfo)->slave; while (1) { Tcl_Obj *newToken; - char *string; + const char *string; string = TclGetString(aliasPtr->token); hPtr = Tcl_CreateHashEntry(&slavePtr->aliasTable, string, &isNew); @@ -2237,7 +2237,7 @@ SlaveCreate( Slave *slavePtr; InterpInfo *masterInfoPtr; Tcl_HashEntry *hPtr; - char *path; + const char *path; int isNew, objc; Tcl_Obj **objv; @@ -2671,7 +2671,7 @@ SlaveExpose( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - char *name; + const char *name; if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -2770,7 +2770,7 @@ SlaveHide( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - char *name; + const char *name; if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( diff --git a/generic/tclListObj.c b/generic/tclListObj.c index be18699..50653ab 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.56 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.57 2009/02/10 22:49:52 nijtmans Exp $ */ #include "tclInt.h" @@ -1670,7 +1670,8 @@ SetListFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr) /* The object to convert. */ { - char *string, *s; + const char *string; + char *s; const char *elemStart, *nextElem; int lenRemain, length, estCount, elemSize, hasBrace, i, j, result; const char *limit; /* Points just after string's last byte. */ @@ -1860,7 +1861,8 @@ UpdateStringOfList( List *listRepPtr = (List *) listPtr->internalRep.twoPtrValue.ptr1; int numElems = listRepPtr->elemCount; register int i; - char *elem, *dst; + const char *elem; + char *dst; int length; Tcl_Obj **elemPtrs; diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index a176e8d..ccee1c4 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.34 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.35 2009/02/10 22:49:50 nijtmans Exp $ */ #include "tclInt.h" @@ -221,7 +221,7 @@ TclDeleteLiteralTable( * Find, or if necessary create, an object in the interpreter's literal * table that has a string representation matching the argument * string. If nsPtr!=NULL then only literals stored for the namespace are - * considered. + * considered. * * Results: * The literal object. If it was created in this call *newPtr is set to @@ -255,7 +255,7 @@ TclCreateLiteral( LiteralEntry *globalPtr; int globalHash; Tcl_Obj *objPtr; - + /* * Is it in the interpreter's global literal table? */ @@ -508,7 +508,7 @@ TclLookupLiteralEntry( Interp *iPtr = (Interp *) interp; LiteralTable *globalTablePtr = &(iPtr->literalTable); register LiteralEntry *entryPtr; - char *bytes; + const char *bytes; int length, globalHash; bytes = TclGetStringFromObj(objPtr, &length); @@ -554,7 +554,7 @@ TclHideLiteral( LiteralEntry **nextPtrPtr, *entryPtr, *lPtr; LiteralTable *localTablePtr = &(envPtr->localLitTable); int localHash, length; - char *bytes; + const char *bytes; Tcl_Obj *newObjPtr; lPtr = &(envPtr->literalArrayPtr[index]); @@ -770,7 +770,7 @@ ExpandLocalLiteralArray( if (currArrayPtr != newArrayPtr) { for (i=0 ; iliteralTable); register LiteralEntry *entryPtr, *prevPtr; - char *bytes; + const char *bytes; int length, index; bytes = TclGetStringFromObj(objPtr, &length); @@ -942,7 +942,7 @@ RebuildLiteralTable( register LiteralEntry **oldChainPtr, **newChainPtr; register LiteralEntry *entryPtr; LiteralEntry **bucketPtr; - char *bytes; + const char *bytes; int oldSize, count, index, length; oldSize = tablePtr->numBuckets; diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 42e5a2b..20b28eb 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.188 2009/01/29 15:57:54 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.189 2009/02/10 22:50:07 nijtmans Exp $ */ #include "tclInt.h" @@ -2942,7 +2942,7 @@ NamespaceChildrenCmd( Tcl_Namespace *namespacePtr; Namespace *nsPtr, *childNsPtr; Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace(interp); - char *pattern = NULL; + const char *pattern = NULL; Tcl_DString buffer; register Tcl_HashEntry *entryPtr; Tcl_HashSearch search; @@ -2970,7 +2970,7 @@ NamespaceChildrenCmd( Tcl_DStringInit(&buffer); if (objc == 4) { - char *name = TclGetString(objv[3]); + const char *name = TclGetString(objv[3]); if ((*name == ':') && (*(name+1) == ':')) { pattern = name; @@ -3056,7 +3056,7 @@ NamespaceCodeCmd( { Namespace *currNsPtr; Tcl_Obj *listPtr, *objPtr; - register char *arg, *p; + register const char *arg, *p; int length; if (objc != 3) { @@ -3203,7 +3203,7 @@ NamespaceDeleteCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Namespace *namespacePtr; - char *name; + const char *name; register int i; if (objc < 2) { @@ -3304,7 +3304,7 @@ NamespaceEvalCmd( */ if (result == TCL_ERROR) { - char *name = TclGetString(objv[2]); + const char *name = TclGetString(objv[2]); namespacePtr = Tcl_CreateNamespace(interp, name, NULL, NULL); if (namespacePtr == NULL) { @@ -3471,7 +3471,7 @@ NamespaceExportCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Namespace *currNsPtr = (Namespace *) TclGetCurrentNamespace(interp); - char *pattern, *string; + const char *pattern, *string; int resetListFirst = 0; int firstArg, patternCt, i, result; @@ -3570,7 +3570,7 @@ NamespaceForgetCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *pattern; + const char *pattern; register int i, result; if (objc < 2) { @@ -3636,7 +3636,7 @@ NamespaceImportCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int allowOverwrite = 0; - char *string, *pattern; + const char *string, *pattern; register int i, result; int firstArg; @@ -4183,7 +4183,7 @@ NamespaceQualifiersCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register char *name, *p; + register const char *name, *p; int length; if (objc != 3) { @@ -4438,7 +4438,7 @@ NamespaceTailCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register char *name, *p; + register const char *name, *p; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "string"); @@ -4499,7 +4499,7 @@ NamespaceUpvarCmd( Interp *iPtr = (Interp *) interp; Tcl_Namespace *nsPtr, *savedNsPtr; Var *otherPtr, *arrayPtr; - char *myName; + const char *myName; if (objc < 3 || !(objc & 1)) { Tcl_WrongNumArgs(interp, 2, objv, @@ -4849,7 +4849,7 @@ NamespaceEnsembleCmd( switch ((enum EnsSubcmds) index) { case ENS_CREATE: { - char *name; + const char *name; Tcl_DictSearch search; Tcl_Obj *listObj; int done, len, allocatedMapFlag = 0; @@ -4938,7 +4938,7 @@ NamespaceEnsembleCmd( } do { Tcl_Obj **listv; - char *cmd; + const char *cmd; if (TclListObjGetElements(interp, listObj, &len, &listv) != TCL_OK) { @@ -5236,7 +5236,7 @@ NamespaceEnsembleCmd( } do { Tcl_Obj **listv; - char *cmd; + const char *cmd; if (TclListObjGetElements(interp, listObj, &len, &listv) != TCL_OK) { @@ -6414,7 +6414,7 @@ NsEnsembleImplementationCmdNR( * matches. */ - char *subcmdName; /* Name of the subcommand, or unique prefix of + const char *subcmdName; /* Name of the subcommand, or unique prefix of * it (will be an error for a non-unique * prefix). */ char *fullName = NULL; /* Full name of the subcommand. */ @@ -7004,7 +7004,7 @@ BuildEnsembleConfig( TclListObjGetElements(NULL, ensemblePtr->subcmdList, &subcmdc, &subcmdv); for (i=0 ; isubcommandDict, &dictSearch, &keyObj, &valueObj, &done); while (!done) { - char *name = TclGetString(keyObj); + const char *name = TclGetString(keyObj); hPtr = Tcl_CreateHashEntry(hash, name, &isNew); Tcl_SetHashValue(hPtr, valueObj); diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 887e80c..8be8773 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.16 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.17 2009/02/10 22:49:55 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -942,7 +942,7 @@ TclOOCopyObjectCmd( if (objc == 2) { o2Ptr = Tcl_CopyObjectInstance(interp, oPtr, NULL, NULL); } else { - char *name; + const char *name; Tcl_DString buffer; name = TclGetString(objv[2]); diff --git a/generic/tclObj.c b/generic/tclObj.c index 56d42a6..e130dbb 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.150 2009/02/10 17:09:09 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.151 2009/02/10 22:49:48 nijtmans Exp $ */ #include "tclInt.h" @@ -1423,7 +1423,7 @@ SetBooleanFromAny( badBoolean: if (interp != NULL) { int length; - char *str = Tcl_GetStringFromObj(objPtr, &length); + const char *str = Tcl_GetStringFromObj(objPtr, &length); Tcl_Obj *msg; TclNewLiteralStringObj(msg, "expected boolean value but got \""); @@ -1440,7 +1440,8 @@ ParseBoolean( register Tcl_Obj *objPtr) /* The object to parse/convert. */ { int i, length, newBool; - char lowerCase[6], *str = TclGetStringFromObj(objPtr, &length); + char lowerCase[6]; + const char *str = TclGetStringFromObj(objPtr, &length); if ((length == 0) || (length > 5)) { /* longest valid boolean string rep. is "false" */ @@ -3605,7 +3606,7 @@ TclSetCmdNameObj( Interp *iPtr = (Interp *) interp; register ResolvedCmdName *resPtr; register Namespace *currNsPtr; - char *name; + const char *name; if (objPtr->typePtr == &tclCmdNameType) { return; @@ -3755,7 +3756,7 @@ SetCmdNameFromAny( register Tcl_Obj *objPtr) /* The object to convert. */ { Interp *iPtr = (Interp *) interp; - char *name; + const char *name; register Command *cmdPtr; Namespace *currNsPtr; register ResolvedCmdName *resPtr; diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index b6681a6..74f526a 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.77 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.78 2009/02/10 22:49:50 nijtmans Exp $ */ #include "tclInt.h" @@ -2300,7 +2300,7 @@ Tcl_FSEqualPaths( Tcl_Obj *firstPtr, Tcl_Obj *secondPtr) { - char *firstStr, *secondStr; + const char *firstStr, *secondStr; int firstLen, secondLen, tempErrno; if (firstPtr == secondPtr) { diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 558ccd9..7bac7eb 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.38 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.39 2009/02/10 22:49:49 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -760,7 +760,8 @@ Tcl_PackageObjCmd( Tcl_HashSearch search; Tcl_HashTable *tablePtr; const char *version; - char *argv2, *argv3, *argv4, *iva = NULL, *ivb = NULL; + const char *argv2, *argv3, *argv4; + char *iva = NULL, *ivb = NULL; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?"); @@ -773,7 +774,7 @@ Tcl_PackageObjCmd( } switch ((enum pkgOptions) optionIndex) { case PKG_FORGET: { - char *keyString; + const char *keyString; for (i = 2; i < objc; i++) { keyString = TclGetString(objv[i]); @@ -1645,7 +1646,7 @@ AddRequirementsToResult( for (i = 0; i < reqc; i++) { int length; - char *v = Tcl_GetStringFromObj(reqv[i], &length); + const char *v = Tcl_GetStringFromObj(reqv[i], &length); if ((length & 0x1) && (v[length/2] == '-') && (strncmp(v, v+((length+1)/2), length/2) == 0)) { diff --git a/generic/tclProc.c b/generic/tclProc.c index 99aee95..611ae45 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.169 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.170 2009/02/10 22:50:07 nijtmans Exp $ */ #include "tclInt.h" @@ -132,7 +132,7 @@ Tcl_ProcObjCmd( { register Interp *iPtr = (Interp *) interp; Proc *procPtr; - char *fullName; + const char *fullName; const char *procName, *procArgs, *procBody; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_Command cmd; @@ -584,7 +584,7 @@ TclCreateProc( if (localPtr->defValuePtr != NULL) { int tmpLength; - char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr, + const char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr, &tmpLength); if ((valueLength != tmpLength) || @@ -1754,7 +1754,7 @@ TclNRInterpProcCore( if (TCL_DTRACE_PROC_ARGS_ENABLED()) { int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; - char *a[10]; + const char *a[10]; int i; for (i = 0 ; i < 10 ; i++) { @@ -2432,7 +2432,7 @@ SetLambdaFromAny( register Tcl_Obj *objPtr) /* The object to convert. */ { Interp *iPtr = (Interp *) interp; - char *name; + const char *name; Tcl_Obj *argsPtr, *bodyPtr, *nsObjPtr, **objv, *errPtr; int objc, result; Proc *procPtr; @@ -2571,7 +2571,7 @@ SetLambdaFromAny( if (objc == 2) { TclNewLiteralStringObj(nsObjPtr, "::"); } else { - char *nsName = TclGetString(objv[2]); + const char *nsName = TclGetString(objv[2]); if ((*nsName != ':') || (*(nsName+1) != ':')) { TclNewLiteralStringObj(nsObjPtr, "::"); diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 4748e58..d0505e0 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.c,v 1.30 2008/10/15 06:17:04 nijtmans Exp $ + * RCS: @(#) $Id: tclRegexp.c,v 1.31 2009/02/10 22:49:54 nijtmans Exp $ */ #include "tclInt.h" @@ -573,7 +573,7 @@ Tcl_GetRegExpFromObj( { int length; TclRegexp *regexpPtr; - char *pattern; + const char *pattern; /* * This is OK because we only actually interpret this value properly as a -- cgit v0.12 From bfcd65034eb86288bb554aef03df7c98101c3089 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 10 Feb 2009 23:08:56 +0000 Subject: - eliminate some unnessary type casts - some internal const decorations - spacing --- ChangeLog | 20 ++++++++++++++---- generic/tclScan.c | 20 +++++++++--------- generic/tclStringObj.c | 6 +++--- generic/tclStubInit.c | 50 +------------------------------------------- generic/tclTest.c | 38 ++++++++++++++++----------------- generic/tclTestObj.c | 20 +++++++++--------- generic/tclTestProcBodyObj.c | 4 ++-- generic/tclThread.c | 26 +++++++++++------------ generic/tclThreadTest.c | 19 ++++++++--------- generic/tclTimer.c | 6 +++--- generic/tclTrace.c | 35 ++++++++++++++++--------------- generic/tclUtil.c | 11 +++++----- generic/tclVar.c | 45 ++++++++++++++++++++------------------- 13 files changed, 133 insertions(+), 167 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6454f89..556116a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ -2009-02-05 Jan Nijtmans - * generic/tclEncoding.c - eliminate some unnessary type casts - * generic/tclEvent.c - some internal const decorations - * generic/tclExecute.c - spacing +2009-02-10 Jan Nijtmans + + * generic/tclEncoding.c Eliminate some unnessary type casts + * generic/tclEvent.c some internal const decorations + * generic/tclExecute.c spacing * generic/tclIndexObj.c * generic/tclInterp.c * generic/tclIO.c @@ -17,6 +18,17 @@ * generic/tclPkg.c * generic/tclProc.c * generic/tclRegexp.c + * generic/tclScan.c + * generic/tclStringObj.c + * generic/tclTest.c + * generic/tclTestProcBodyObj.c + * generic/tclThread.c + * generic/tclThreadTest.c + * generic/tclTimer.c + * generic/tclTrace.c + * generic/tclUtil.c + * generic/tclVar.c + * generic/tclStubInit.c (regenerated) 2009-02-10 Jan Nijtmans diff --git a/generic/tclScan.c b/generic/tclScan.c index d05cb8f..07bbedd 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.30 2008/12/10 18:21:47 ferrieux Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.31 2009/02/10 23:09:04 nijtmans Exp $ */ #include "tclInt.h" @@ -45,10 +45,10 @@ typedef struct CharSet { * Declarations for functions used only in this file. */ -static char * BuildCharSet(CharSet *cset, char *format); +static const char * BuildCharSet(CharSet *cset, const char *format); static int CharInSet(CharSet *cset, int ch); static void ReleaseCharSet(CharSet *cset); -static int ValidateFormat(Tcl_Interp *interp, char *format, +static int ValidateFormat(Tcl_Interp *interp, const char *format, int numVars, int *totalVars); /* @@ -69,14 +69,14 @@ static int ValidateFormat(Tcl_Interp *interp, char *format, *---------------------------------------------------------------------- */ -static char * +static const char * BuildCharSet( CharSet *cset, - char *format) /* Points to first char of set. */ + const char *format) /* Points to first char of set. */ { Tcl_UniChar ch, start; int offset, nranges; - char *end; + const char *end; memset(cset, 0, sizeof(CharSet)); @@ -252,7 +252,7 @@ ReleaseCharSet( static int ValidateFormat( Tcl_Interp *interp, /* Current interpreter. */ - char *format, /* The format string. */ + const char *format, /* The format string. */ int numVars, /* The number of variables passed to the scan * command. */ int *totalSubs) /* The number of variables that will be @@ -343,7 +343,7 @@ ValidateFormat( */ if ((ch < 0x80) && isdigit(UCHAR(ch))) { /* INTL: "C" locale. */ - value = strtoul(format-1, &format, 10); /* INTL: "C" locale. */ + value = strtoul(format-1, (char **) &format, 10); /* INTL: "C" locale. */ flags |= SCAN_WIDTH; format += Tcl_UtfToUniChar(format, &ch); } @@ -559,7 +559,7 @@ Tcl_ScanObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *format; + const char *format; int numVars, nconversions, totalVars = -1; int objIndex, offset, i, result, code; long value; @@ -676,7 +676,7 @@ Tcl_ScanObjCmd( */ if ((ch < 0x80) && isdigit(UCHAR(ch))) { /* INTL: "C" locale. */ - width = (int) strtoul(format-1, &format, 10);/* INTL: "C" locale. */ + width = (int) strtoul(format-1, (char **) &format, 10);/* INTL: "C" locale. */ format += Tcl_UtfToUniChar(format, &ch); } else { width = 0; diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 2d2622c..b2dd292 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.94 2009/02/10 21:04:06 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.95 2009/02/10 23:09:05 nijtmans Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -668,7 +668,7 @@ Tcl_GetRange( } if (objPtr->bytes && (stringPtr->numChars == objPtr->length)) { - char *str = TclGetString(objPtr); + const char *str = TclGetString(objPtr); /* * All of the characters in the Utf string are 1 byte chars, so we @@ -1240,7 +1240,7 @@ Tcl_AppendObjToObj( { String *stringPtr; int length, numChars, allOneByteChars; - char *bytes; + const char *bytes; /* * Handle append of one bytearray object to another as a special case. diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 818abf1..f33086d 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.178 2008/12/27 00:04:17 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.179 2009/02/10 23:09:08 nijtmans Exp $ */ #include "tclInt.h" @@ -50,27 +50,11 @@ static const TclIntStubs tclIntStubs = { NULL, /* 2 */ TclAllocateFreeObjects, /* 3 */ NULL, /* 4 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCleanupChildren, /* 5 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclCleanupChildren, /* 5 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ TclCleanupChildren, /* 5 */ -#endif /* MACOSX */ TclCleanupCommand, /* 6 */ TclCopyAndCollapse, /* 7 */ TclCopyChannel, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclCreatePipeline, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ TclCreatePipeline, /* 9 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - TclCreatePipeline, /* 9 */ -#endif /* MACOSX */ TclCreateProc, /* 10 */ TclDeleteCompiledLocalVars, /* 11 */ TclDeleteVars, /* 12 */ @@ -165,15 +149,7 @@ static const TclIntStubs tclIntStubs = { TclSetPreInitScript, /* 101 */ TclSetupEnv, /* 102 */ TclSockGetPort, /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - TclSockMinimumBuffers, /* 104 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - TclSockMinimumBuffers, /* 104 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ TclSockMinimumBuffers, /* 104 */ -#endif /* MACOSX */ NULL, /* 105 */ NULL, /* 106 */ NULL, /* 107 */ @@ -604,15 +580,7 @@ static const TclStubs tclStubs = { Tcl_DeleteHashEntry, /* 108 */ Tcl_DeleteHashTable, /* 109 */ Tcl_DeleteInterp, /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_DetachPids, /* 111 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_DetachPids, /* 111 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ Tcl_DetachPids, /* 111 */ -#endif /* MACOSX */ Tcl_DeleteTimerHandler, /* 112 */ Tcl_DeleteTrace, /* 113 */ Tcl_DontCallWhenDeleted, /* 114 */ @@ -706,15 +674,7 @@ static const TclStubs tclStubs = { Tcl_NotifyChannel, /* 194 */ Tcl_ObjGetVar2, /* 195 */ Tcl_ObjSetVar2, /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ Tcl_OpenCommandChannel, /* 197 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ - Tcl_OpenCommandChannel, /* 197 */ -#endif /* MACOSX */ Tcl_OpenFileChannel, /* 198 */ Tcl_OpenTcpClient, /* 199 */ Tcl_OpenTcpServer, /* 200 */ @@ -724,15 +684,7 @@ static const TclStubs tclStubs = { Tcl_PosixError, /* 204 */ Tcl_QueueEvent, /* 205 */ Tcl_Read, /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* UNIX */ -#ifdef __WIN32__ /* WIN */ - Tcl_ReapDetachedProcs, /* 207 */ -#endif /* WIN */ -#ifdef MAC_OSX_TCL /* MACOSX */ Tcl_ReapDetachedProcs, /* 207 */ -#endif /* MACOSX */ Tcl_RecordAndEval, /* 208 */ Tcl_RecordAndEvalObj, /* 209 */ Tcl_RegisterChannel, /* 210 */ diff --git a/generic/tclTest.c b/generic/tclTest.c index ebcdb97..da00e84 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.135 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.136 2009/02/10 23:09:08 nijtmans Exp $ */ #define TCL_TEST @@ -305,7 +305,7 @@ static int TestregexpObjCmd(ClientData dummy, static int TestreturnObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static void TestregexpXflags(char *string, +static void TestregexpXflags(const char *string, int length, int *cflagsPtr, int *eflagsPtr); static int TestsaveresultCmd(ClientData dummy, Tcl_Interp *interp, int objc, @@ -1719,7 +1719,7 @@ TestencodingObjCmd( { Tcl_Encoding encoding; int index, length; - char *string; + const char *string; TclEncoding *encodingPtr; static const char *const optionStrings[] = { "create", "delete", NULL @@ -1876,11 +1876,11 @@ TestevalexObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int length, flags; - char *script; + const char *script; flags = 0; if (objc == 3) { - char *global = Tcl_GetStringFromObj(objv[2], &length); + const char *global = Tcl_GetStringFromObj(objv[2], &length); if (strcmp(global, "global") != 0) { Tcl_AppendResult(interp, "bad value \"", global, "\": must be global", NULL); @@ -2104,9 +2104,9 @@ TesteventDeleteProc( * to remove */ { TestEvent *ev; /* Event to examine */ - char *evNameStr; + const char *evNameStr; Tcl_Obj *targetName; /* Name of the event(s) to delete */ - char *targetNameStr; + const char *targetNameStr; if (event->proc != TesteventProc) { return 0; @@ -3075,7 +3075,7 @@ TestlocaleCmd( Tcl_Obj *const objv[]) /* The argument objects. */ { int index; - char *locale; + const char *locale; static const char *const optionStrings[] = { "ctype", "numeric", "time", "collate", "monetary", @@ -3299,7 +3299,7 @@ TestparserObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { - char *script; + const char *script; int length, dummy; Tcl_Parse parse; @@ -3355,7 +3355,7 @@ TestexprparserObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { - char *script; + const char *script; int length, dummy; Tcl_Parse parse; @@ -3543,7 +3543,7 @@ TestparsevarnameObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { - char *script; + const char *script; int append, length, dummy; Tcl_Parse parse; @@ -3611,7 +3611,7 @@ TestregexpObjCmd( int i, ii, indices, stringLength, match, about; int hasxflags, cflags, eflags; Tcl_RegExp regExpr; - char *string; + const char *string; Tcl_Obj *objPtr; Tcl_RegExpInfo info; static const char *const options[] = { @@ -3634,7 +3634,7 @@ TestregexpObjCmd( hasxflags = 0; for (i = 1; i < objc; i++) { - char *name; + const char *name; int index; name = Tcl_GetString(objv[i]); @@ -3719,7 +3719,7 @@ TestregexpObjCmd( Tcl_SetIntObj(Tcl_GetObjResult(interp), 0); if (objc > 2 && (cflags®_EXPECT) && indices) { - char *varName; + const char *varName; const char *value; int start, end; char resinfo[TCL_INTEGER_SPACE * 2]; @@ -3734,7 +3734,7 @@ TestregexpObjCmd( return TCL_ERROR; } } else if (cflags & TCL_REG_CANMATCH) { - char *varName; + const char *varName; const char *value; char resinfo[TCL_INTEGER_SPACE * 2]; @@ -3838,7 +3838,7 @@ TestregexpObjCmd( static void TestregexpXflags( - char *string, /* The string of flags. */ + const char *string, /* The string of flags. */ int length, /* The length of the string in bytes. */ int *cflagsPtr, /* compile flags word */ int *eflagsPtr) /* exec flags word */ @@ -4368,7 +4368,7 @@ TestfileCmd( { int force, i, j, result; Tcl_Obj *error = NULL; - char *subcmd; + const char *subcmd; if (argc < 3) { return TCL_ERROR; @@ -4448,7 +4448,7 @@ TestgetvarfullnameCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* The argument objects. */ { - char *name, *arg; + const char *name, *arg; int flags = 0; Tcl_Namespace *namespacePtr; Tcl_CallFrame *framePtr; @@ -5777,7 +5777,7 @@ TestWrongNumArgsObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int i, length; - char *msg; + const char *msg; if (objc < 3) { /* diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 680dd18..e0dddce 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.28 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.29 2009/02/10 23:09:07 nijtmans Exp $ */ #include "tclInt.h" @@ -34,7 +34,7 @@ static Tcl_Obj *varPtr[NUMBER_OF_OBJECT_VARS]; static int CheckIfVarUnset(Tcl_Interp *interp, int varIndex); static int GetVariableIndex(Tcl_Interp *interp, - char *string, int *indexPtr); + const char *string, int *indexPtr); static void SetVarToObj(int varIndex, Tcl_Obj *objPtr); int TclObjTest_Init(Tcl_Interp *interp); static int TestbignumobjCmd(ClientData dummy, Tcl_Interp *interp, @@ -136,7 +136,7 @@ TestbignumobjCmd( BIGNUM_SET, BIGNUM_GET, BIGNUM_MULT10, BIGNUM_DIV10 }; int index, varIndex; - char *string; + const char *string; mp_int bignumValue, newValue; if (objc < 3) { @@ -282,7 +282,7 @@ TestbooleanobjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int varIndex, boolValue; - char *index, *subCmd; + const char *index, *subCmd; if (objc < 3) { wrongNumArgs: @@ -380,7 +380,7 @@ TestdoubleobjCmd( { int varIndex; double doubleValue; - char *index, *subCmd, *string; + const char *index, *subCmd, *string; if (objc < 3) { wrongNumArgs: @@ -599,7 +599,7 @@ TestintobjCmd( { int intValue, varIndex, i; long longValue; - char *index, *subCmd, *string; + const char *index, *subCmd, *string; if (objc < 3) { wrongNumArgs: @@ -799,7 +799,7 @@ TestobjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int varIndex, destIndex, i; - char *index, *subCmd, *string; + const char *index, *subCmd, *string; const Tcl_ObjType *targetType; if (objc < 2) { @@ -827,7 +827,7 @@ TestobjCmd( SetVarToObj(destIndex, varPtr[varIndex]); Tcl_SetObjResult(interp, varPtr[destIndex]); } else if (strcmp(subCmd, "convert") == 0) { - char *typeName; + const char *typeName; if (objc != 4) { goto wrongNumArgs; @@ -991,7 +991,7 @@ TeststringobjCmd( { int varIndex, option, i, length; #define MAX_STRINGS 11 - char *index, *string, *strings[MAX_STRINGS+1]; + const char *index, *string, *strings[MAX_STRINGS+1]; TestString *strPtr; static const char *const options[] = { "append", "appendstrings", "get", "get2", "length", "length2", @@ -1220,7 +1220,7 @@ SetVarToObj( static int GetVariableIndex( Tcl_Interp *interp, /* Interpreter for error reporting. */ - char *string, /* String containing a variable index + const char *string, /* String containing a variable index * specified as a nonnegative number less than * NUMBER_OF_OBJECT_VARS. */ int *indexPtr) /* Place to store converted result. */ diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index 234b267..b961e3c 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.8 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.9 2009/02/10 23:08:56 nijtmans Exp $ */ #include "tclInt.h" @@ -229,7 +229,7 @@ ProcBodyTestProcObjCmd( int objc, /* argument count */ Tcl_Obj *const objv[]) /* arguments */ { - char *fullName; + const char *fullName; Tcl_Command procCmd; Command *cmdPtr; Proc *procPtr = NULL; diff --git a/generic/tclThread.c b/generic/tclThread.c index 7d5d4dd..a538316 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThread.c,v 1.22 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclThread.c,v 1.23 2009/02/10 23:09:06 nijtmans Exp $ */ #include "tclInt.h" @@ -27,7 +27,7 @@ typedef struct { int num; /* Number of objects remembered */ int max; /* Max size of the array */ - char **list; /* List of pointers */ + void **list; /* List of pointers */ } SyncObjRecord; static SyncObjRecord keyRecord = {0, 0, NULL}; @@ -38,8 +38,8 @@ static SyncObjRecord condRecord = {0, 0, NULL}; * Prototypes of functions used only in this file. */ -static void ForgetSyncObject(char *objPtr, SyncObjRecord *recPtr); -static void RememberSyncObject(char *objPtr, +static void ForgetSyncObject(void *objPtr, SyncObjRecord *recPtr); +static void RememberSyncObject(void *objPtr, SyncObjRecord *recPtr); /* @@ -97,7 +97,7 @@ Tcl_GetThreadData( result = ckalloc((size_t)size); memset(result, 0, (size_t)size); *keyPtr = result; - RememberSyncObject((char *) keyPtr, &keyRecord); + RememberSyncObject(keyPtr, &keyRecord); } else { result = *keyPtr; } @@ -156,10 +156,10 @@ TclThreadDataKeyGet( static void RememberSyncObject( - char *objPtr, /* Pointer to sync object */ + void *objPtr, /* Pointer to sync object */ SyncObjRecord *recPtr) /* Record of sync objects */ { - char **newList; + void **newList; int i, j; @@ -181,7 +181,7 @@ RememberSyncObject( if (recPtr->num >= recPtr->max) { recPtr->max += 8; - newList = (char **) ckalloc(recPtr->max * sizeof(char *)); + newList = (void **) ckalloc(recPtr->max * sizeof(void *)); for (i=0,j=0 ; inum ; i++) { if (recPtr->list[i] != NULL) { newList[j++] = recPtr->list[i]; @@ -217,7 +217,7 @@ RememberSyncObject( static void ForgetSyncObject( - char *objPtr, /* Pointer to sync object */ + void *objPtr, /* Pointer to sync object */ SyncObjRecord *recPtr) /* Record of sync objects */ { int i; @@ -251,7 +251,7 @@ void TclRememberMutex( Tcl_Mutex *mutexPtr) { - RememberSyncObject((char *)mutexPtr, &mutexRecord); + RememberSyncObject(mutexPtr, &mutexRecord); } /* @@ -279,7 +279,7 @@ Tcl_MutexFinalize( TclpFinalizeMutex(mutexPtr); #endif TclpMasterLock(); - ForgetSyncObject((char *) mutexPtr, &mutexRecord); + ForgetSyncObject(mutexPtr, &mutexRecord); TclpMasterUnlock(); } @@ -304,7 +304,7 @@ void TclRememberCondition( Tcl_Condition *condPtr) { - RememberSyncObject((char *) condPtr, &condRecord); + RememberSyncObject(condPtr, &condRecord); } /* @@ -332,7 +332,7 @@ Tcl_ConditionFinalize( TclpFinalizeCondition(condPtr); #endif TclpMasterLock(); - ForgetSyncObject((char *) condPtr, &condRecord); + ForgetSyncObject(condPtr, &condRecord); TclpMasterUnlock(); } diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 7ee5704..3b7c506 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.30 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.31 2009/02/10 23:09:05 nijtmans Exp $ */ #include "tclInt.h" @@ -130,9 +130,9 @@ EXTERN int TclCreateThread(Tcl_Interp *interp, const char *script, int joinable); EXTERN int TclThreadList(Tcl_Interp *interp); EXTERN int TclThreadSend(Tcl_Interp *interp, Tcl_ThreadId id, - char *script, int wait); + const char *script, int wait); EXTERN int TclThreadCancel(Tcl_Interp *interp, Tcl_ThreadId id, - char *result, int flags); + const char *result, int flags); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT @@ -255,7 +255,7 @@ Tcl_ThreadObjCmd( switch ((enum options)option) { case THREAD_CANCEL: { long id; - char *result; + const char *result; int flags, arg; if ((objc < 3) || (objc > 5)) { @@ -391,7 +391,7 @@ Tcl_ThreadObjCmd( return TclThreadList(interp); case THREAD_SEND: { long id; - char *script; + const char *script; int wait, arg; if ((objc != 4) && (objc != 5)) { @@ -429,7 +429,7 @@ Tcl_ThreadObjCmd( * Arrange for this proc to handle thread death errors. */ - char *proc; + const char *proc; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "proc"); @@ -800,7 +800,7 @@ int TclThreadSend( Tcl_Interp *interp, /* The current interpreter. */ Tcl_ThreadId id, /* Thread Id of other interpreter. */ - char *script, /* The script to evaluate. */ + const char *script, /* The script to evaluate. */ int wait) /* If 1, we block for the result. */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -926,8 +926,7 @@ TclThreadSend( ckfree(resultPtr->errorInfo); } } - Tcl_SetResult(interp, resultPtr->result, TCL_VOLATILE); - ckfree(resultPtr->result); + Tcl_SetResult(interp, resultPtr->result, TCL_DYNAMIC); Tcl_ConditionFinalize(&resultPtr->done); code = resultPtr->code; @@ -956,7 +955,7 @@ int TclThreadCancel( Tcl_Interp *interp, /* The current interpreter. */ Tcl_ThreadId id, /* Thread Id of other interpreter. */ - char *result, /* The result or NULL for default. */ + const char *result, /* The result or NULL for default. */ int flags) /* Flags for Tcl_CancelEval. */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); diff --git a/generic/tclTimer.c b/generic/tclTimer.c index b970d50..94a8c16 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.38 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.39 2009/02/10 23:09:04 nijtmans Exp $ */ #include "tclInt.h" @@ -879,7 +879,7 @@ Tcl_AfterObjCmd( } case AFTER_CANCEL: { Tcl_Obj *commandPtr; - char *command, *tempCommand; + const char *command, *tempCommand; int tempLength; if (objc < 3) { @@ -1096,7 +1096,7 @@ GetAfterEvent( * this interpreter. */ Tcl_Obj *commandPtr) { - char *cmdString; /* Textual identifier for after event, such as + const char *cmdString; /* Textual identifier for after event, such as * "after#6". */ AfterInfo *afterPtr; int id; diff --git a/generic/tclTrace.c b/generic/tclTrace.c index e411488..cb40fd7 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.54 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.55 2009/02/10 23:09:05 nijtmans Exp $ */ #include "tclInt.h" @@ -193,7 +193,8 @@ Tcl_TraceObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int optionIndex; - char *name, *flagOps, *p; + const char *name; + const char *flagOps, *p; /* Main sub commands to 'trace' */ static const char *const traceOptions[] = { "add", "info", "remove", @@ -325,26 +326,26 @@ Tcl_TraceObjCmd( name = Tcl_GetString(objv[2]); FOREACH_VAR_TRACE(interp, name, clientData) { TraceVarInfo *tvarPtr = clientData; + char *q = ops; pairObjPtr = Tcl_NewListObj(0, NULL); - p = ops; if (tvarPtr->flags & TCL_TRACE_READS) { - *p = 'r'; - p++; + *q = 'r'; + q++; } if (tvarPtr->flags & TCL_TRACE_WRITES) { - *p = 'w'; - p++; + *q = 'w'; + q++; } if (tvarPtr->flags & TCL_TRACE_UNSETS) { - *p = 'u'; - p++; + *q = 'u'; + q++; } if (tvarPtr->flags & TCL_TRACE_ARRAY) { - *p = 'a'; - p++; + *q = 'a'; + q++; } - *p = '\0'; + *q = '\0'; /* * Build a pair (2-item list) with the ops string as the first obj @@ -399,7 +400,7 @@ TraceExecutionObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int commandLength, index; - char *name, *command; + const char *name, *command; size_t length; enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE @@ -648,7 +649,7 @@ TraceCommandObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int commandLength, index; - char *name, *command; + const char *name, *command; size_t length; enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE }; static const char *const opStrings[] = { "delete", "rename", NULL }; @@ -840,7 +841,7 @@ TraceVariableObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int commandLength, index; - char *name, *command; + const char *name, *command; size_t length; enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE }; static const char *const opStrings[] = { @@ -1814,7 +1815,7 @@ TraceExecutionProc( } } else if (flags & TCL_TRACE_LEAVE_EXEC) { Tcl_Obj *resultCode; - char *resultCodeStr; + const char *resultCodeStr; /* * Append result code. @@ -2477,7 +2478,7 @@ TclObjCallVarTraces( * variable, or -1. Only used when part1Ptr is * NULL. */ { - char *part1, *part2; + const char *part1, *part2; if (!part1Ptr) { part1Ptr = localName(iPtr->varFramePtr, index); diff --git a/generic/tclUtil.c b/generic/tclUtil.c index bc189c0..9ea54b0 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.108 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.109 2009/02/10 23:09:05 nijtmans Exp $ */ #include "tclInt.h" @@ -1146,7 +1146,7 @@ Tcl_ConcatObj( { int allocSize, finalSize, length, elemLength, i; char *p; - char *element; + const char *element; char *concatStr; Tcl_Obj *objPtr, *resPtr; @@ -2561,7 +2561,8 @@ TclGetIntForIndex( * representing an index. */ { int length; - char *opPtr, *bytes; + char *opPtr; + const char *bytes; if (TclGetIntFromObj(NULL, objPtr, indexPtr) == TCL_OK) { return TCL_OK; @@ -2622,7 +2623,7 @@ TclGetIntForIndex( parseError: if (interp != NULL) { - char *bytes = Tcl_GetString(objPtr); + const char *bytes = Tcl_GetString(objPtr); /* * The result might not be empty; this resets it which should be both @@ -2705,7 +2706,7 @@ SetEndOffsetFromAny( Tcl_Obj *objPtr) /* Pointer to the object to parse */ { int offset; /* Offset in the "end-offset" expression */ - register char* bytes; /* String rep of the object */ + register const char* bytes; /* String rep of the object */ int length; /* Length of the object's string rep */ /* diff --git a/generic/tclVar.c b/generic/tclVar.c index 6c5e382..0af352c 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.175 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.176 2009/02/10 23:08:57 nijtmans Exp $ */ #include "tclInt.h" @@ -509,7 +509,7 @@ TclObjLookupVarEx( Interp *iPtr = (Interp *) interp; register Var *varPtr; /* Points to the variable's in-frame Var * structure. */ - char *part1; + const char *part1; int index, len1, len2; int parsed = 0; Tcl_Obj *objPtr; @@ -517,7 +517,7 @@ TclObjLookupVarEx( const char *errMsg = NULL; CallFrame *varFramePtr = iPtr->varFramePtr; Namespace *nsPtr; - char *part2 = part2Ptr? TclGetString(part2Ptr):NULL; + const char *part2 = part2Ptr? TclGetString(part2Ptr):NULL; char *newPart2 = NULL; *arrayPtrPtr = NULL; @@ -1013,7 +1013,7 @@ TclLookupSimpleVar( register Tcl_Obj *objPtr = *objPtrPtr; if (objPtr) { - char *localName = TclGetString(objPtr); + const char *localName = TclGetString(objPtr); if ((varName[0] == localName[0]) && (strcmp(varName, localName) == 0)) { @@ -2457,7 +2457,7 @@ Tcl_UnsetObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { register int i, flags = TCL_LEAVE_ERR_MSG; - register char *name; + register const char *name; if (objc == 1) { /* @@ -2899,7 +2899,7 @@ Tcl_ArrayObjCmd( case ARRAY_STARTSEARCH: { ArraySearch *searchPtr; int isNew; - char *varName = TclGetString(varNamePtr); + const char *varName = TclGetString(varNamePtr); if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "arrayName"); @@ -2941,8 +2941,8 @@ Tcl_ArrayObjCmd( case ARRAY_GET: { Tcl_HashSearch search; Var *varPtr2; - char *pattern = NULL; - char *name; + const char *pattern = NULL; + const char *name; Tcl_Obj *namePtr, *valuePtr, *nameLstPtr, *tmpResPtr, **namePtrPtr; int i, count; @@ -3064,8 +3064,8 @@ Tcl_ArrayObjCmd( case ARRAY_NAMES: { Tcl_HashSearch search; Var *varPtr2; - char *pattern; - char *name; + const char *pattern; + const char *name; Tcl_Obj *namePtr, *resultPtr, *patternPtr; int mode, matched = 0; static const char *const options[] = { @@ -3157,7 +3157,7 @@ Tcl_ArrayObjCmd( case ARRAY_UNSET: { Tcl_HashSearch search; Var *varPtr2; - char *pattern = NULL; + const char *pattern = NULL; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "arrayName ?pattern?"); @@ -3847,8 +3847,8 @@ Tcl_GlobalObjCmd( { Interp *iPtr = (Interp *) interp; register Tcl_Obj *objPtr, *tailPtr; - char *varName; - register char *tail; + const char *varName; + register const char *tail; int result, i; /* @@ -3950,7 +3950,7 @@ Tcl_VariableObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; - char *varName, *tail, *cp; + const char *varName, *tail, *cp; Var *varPtr, *arrayPtr; Tcl_Obj *varValuePtr; int i, result; @@ -4147,7 +4147,7 @@ SetArraySearchObj( Tcl_Interp *interp, Tcl_Obj *objPtr) { - char *string; + const char *string; char *end; int id; size_t offset; @@ -4221,11 +4221,11 @@ ParseSearchId( * name. */ { Interp *iPtr = (Interp *) interp; - register char *string; + register const char *string; register size_t offset; int id; ArraySearch *searchPtr; - char *varName = TclGetString(varNamePtr); + const char *varName = TclGetString(varNamePtr); /* * Parse the id. @@ -4828,7 +4828,8 @@ UpdateParsedVarName( { Tcl_Obj *arrayPtr = objPtr->internalRep.twoPtrValue.ptr1; char *part2 = objPtr->internalRep.twoPtrValue.ptr2; - char *part1, *p; + const char *part1; + char *p; int len1, len2, totalLen; if (arrayPtr == NULL) { @@ -4939,7 +4940,7 @@ ObjFindNamespaceVar( int result; Tcl_Var var; Tcl_Obj *simpleNamePtr; - char *name = TclGetString(namePtr); + const char *name = TclGetString(namePtr); /* * If this namespace has a variable resolver, then give it first crack at @@ -5050,7 +5051,7 @@ TclInfoVarsCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; - char *varName, *pattern; + const char *varName, *pattern; const char *simplePattern; Tcl_HashSearch search; Var *varPtr; @@ -5243,7 +5244,7 @@ TclInfoGlobalsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - char *varName, *pattern; + const char *varName, *pattern; Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp); Tcl_HashSearch search; Var *varPtr; @@ -5393,7 +5394,7 @@ AppendLocals( Var *varPtr; int i, localVarCt; Tcl_Obj **varNamePtr; - char *varName; + const char *varName; TclVarHashTable *localVarTablePtr; Tcl_HashSearch search; const char *pattern = patternPtr? TclGetString(patternPtr) : NULL; -- cgit v0.12 From 93480ff215923ba215001b05e93b3316e4742487 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 11 Feb 2009 15:28:41 +0000 Subject: * generic/tclStringObj.c: Changed type of the 'allocated' field of the String struct from size_t to int since only int values are ever stored in it. --- ChangeLog | 6 ++++++ generic/tclStringObj.c | 4 ++-- generic/tclUtf.c | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 556116a..af98add 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-11 Don Porter + + * generic/tclStringObj.c: Changed type of the 'allocated' field + of the String struct from size_t to int since only int values are + ever stored in it. + 2009-02-10 Jan Nijtmans * generic/tclEncoding.c Eliminate some unnessary type casts diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index b2dd292..3fa8528 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.95 2009/02/10 23:09:05 nijtmans Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.96 2009/02/11 15:28:56 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -94,7 +94,7 @@ typedef struct String { * means that there is a valid Unicode rep, or * that the number of UTF bytes == the number * of chars. */ - size_t allocated; /* The amount of space actually allocated for + int allocated; /* The amount of space actually allocated for * the UTF string (minus 1 byte for the * termination char). */ size_t uallocated; /* The amount of space actually allocated for diff --git a/generic/tclUtf.c b/generic/tclUtf.c index aed3ff7..16acab2 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtf.c,v 1.38 2008/04/27 22:21:33 dkf Exp $ + * RCS: @(#) $Id: tclUtf.c,v 1.39 2009/02/11 15:28:59 dgp Exp $ */ #include "tclInt.h" @@ -417,6 +417,7 @@ Tcl_UtfToUniCharDString( */ oldLength = Tcl_DStringLength(dsPtr); +/* TODO: fix overreach! */ Tcl_DStringSetLength(dsPtr, (int) ((oldLength + length + 1) * sizeof(Tcl_UniChar))); wString = (Tcl_UniChar *) (Tcl_DStringValue(dsPtr) + oldLength); -- cgit v0.12 From d30eaa00001670c9031797d534be65f1c21a868b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 11 Feb 2009 18:07:48 +0000 Subject: * generic/tclStringObj.c: Changed type of the 'allocated' field * generic/tclTestObj.c: of the String struct (and the TestString counterpart) from size_t to int since only int values are ever stored in it. --- ChangeLog | 5 +++-- generic/tclTestObj.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index af98add..cf18b17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2009-02-11 Don Porter - * generic/tclStringObj.c: Changed type of the 'allocated' field - of the String struct from size_t to int since only int values are + * generic/tclStringObj.c: Changed type of the 'allocated' field + * generic/tclTestObj.c: of the String struct (and the + TestString counterpart) from size_t to int since only int values are ever stored in it. 2009-02-10 Jan Nijtmans diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index e0dddce..73cca56 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.29 2009/02/10 23:09:07 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.30 2009/02/11 18:07:56 dgp Exp $ */ #include "tclInt.h" @@ -55,7 +55,7 @@ static int TeststringobjCmd(ClientData dummy, Tcl_Interp *interp, typedef struct TestString { int numChars; - size_t allocated; + int allocated; size_t uallocated; Tcl_UniChar unicode[2]; } TestString; -- cgit v0.12 From 95504e489088e89fb179000ccf42553b620183d8 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 11 Feb 2009 19:33:24 +0000 Subject: Removed casts now unnecessary after type of stringPtr->allocated changed. --- generic/tclStringObj.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 3fa8528..8e1aacf 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.96 2009/02/11 15:28:56 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.97 2009/02/11 19:33:24 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -799,7 +799,7 @@ Tcl_SetObjLength( * Check that we're not extending a pure unicode string. */ - if (length > (int) stringPtr->allocated && + if (length > stringPtr->allocated && (objPtr->bytes != NULL || stringPtr->hasUnicode == 0)) { /* * Not enough space in current string. Reallocate the string space and @@ -912,7 +912,7 @@ Tcl_AttemptSetObjLength( * Check that we're not extending a pure unicode string. */ - if ((size_t)length > stringPtr->allocated && + if (length > stringPtr->allocated && (objPtr->bytes != NULL || stringPtr->hasUnicode == 0)) { char *newBytes; @@ -1540,7 +1540,7 @@ AppendUtfToUtfRep( newLength = numBytes + oldLength; stringPtr = GET_STRING(objPtr); - if (newLength > (int) stringPtr->allocated) { + if (newLength > stringPtr->allocated) { /* * There isn't currently enough space in the string representation so * allocate additional space. First, try to double the length @@ -1651,7 +1651,7 @@ Tcl_AppendStringsToObjVA( } stringPtr = GET_STRING(objPtr); - if (oldLength + newLength > (int) stringPtr->allocated) { + if (oldLength + newLength > stringPtr->allocated) { /* * There isn't currently enough space in the string representation, so * allocate additional space. If the current string representation -- cgit v0.12 From 17a69ae4cf88c0a60211daa415a3d7cd1d77238d Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 12 Feb 2009 03:46:32 +0000 Subject: * generic/tclStringObj.c: Re-implemented AppendUnicodeToUtfRep so that we no longer pass through Tcl_DStrings which have their own sets of problems when lengths overflow the int range. Now AUTUR and UpdateStringOfString share a common core routine. --- ChangeLog | 5 ++ generic/tclStringObj.c | 133 +++++++++++++++++++++++++++++-------------------- 2 files changed, 84 insertions(+), 54 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf18b17..cb2db93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-02-11 Don Porter + * generic/tclStringObj.c: Re-implemented AppendUnicodeToUtfRep + so that we no longer pass through Tcl_DStrings which have their own + sets of problems when lengths overflow the int range. Now AUTUR and + UpdateStringOfString share a common core routine. + * generic/tclStringObj.c: Changed type of the 'allocated' field * generic/tclTestObj.c: of the String struct (and the TestString counterpart) from size_t to int since only int values are diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 8e1aacf..5283e6e 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.97 2009/02/11 19:33:24 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.98 2009/02/12 03:46:40 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -42,6 +42,8 @@ * Prototypes for functions defined later in this file: */ +static void AppendPrintfToObjVA(Tcl_Obj *objPtr, + const char *format, va_list argList); static void AppendUnicodeToUnicodeRep(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int appendNumChars); static void AppendUnicodeToUtfRep(Tcl_Obj *objPtr, @@ -50,12 +52,12 @@ static void AppendUtfToUnicodeRep(Tcl_Obj *objPtr, const char *bytes, int numBytes); static void AppendUtfToUtfRep(Tcl_Obj *objPtr, const char *bytes, int numBytes); -static void FillUnicodeRep(Tcl_Obj *objPtr); -static void AppendPrintfToObjVA(Tcl_Obj *objPtr, - const char *format, va_list argList); -static void FreeStringInternalRep(Tcl_Obj *objPtr); static void DupStringInternalRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); +static void ExtendStringRepWithUnicode(Tcl_Obj *objPtr, + const Tcl_UniChar *unicode, int numChars); +static void FillUnicodeRep(Tcl_Obj *objPtr); +static void FreeStringInternalRep(Tcl_Obj *objPtr); static int SetStringFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); @@ -1407,6 +1409,7 @@ AppendUnicodeToUnicodeRep( appendNumChars * sizeof(Tcl_UniChar)); stringPtr->unicode[numChars] = 0; stringPtr->numChars = numChars; + stringPtr->allocated = 0; TclInvalidateStringRep(objPtr); } @@ -1434,25 +1437,13 @@ AppendUnicodeToUtfRep( const Tcl_UniChar *unicode, /* String to convert to UTF. */ int numChars) /* Number of chars of "unicode" to convert. */ { - Tcl_DString dsPtr; - const char *bytes; + String *stringPtr = GET_STRING(objPtr); - if (numChars < 0) { - numChars = 0; - if (unicode) { - while (unicode[numChars] != 0) { - numChars++; - } - } - } - if (numChars == 0) { - return; - } + ExtendStringRepWithUnicode(objPtr, unicode, numChars); - Tcl_DStringInit(&dsPtr); - bytes = Tcl_UniCharToUtfDString(unicode, numChars, &dsPtr); - AppendUtfToUtfRep(objPtr, bytes, Tcl_DStringLength(&dsPtr)); - Tcl_DStringFree(&dsPtr); + /* Invalidate the unicode rep */ + stringPtr->numChars = -1; + stringPtr->hasUnicode = 0; } /* @@ -2661,9 +2652,12 @@ TclStringObjReverse( source[i++] = tmp; } TclInvalidateStringRep(objPtr); + stringPtr->allocated = 0; return objPtr; } + /* TODO: Document the dangers here! */ + bytes = TclGetString(objPtr); if (Tcl_IsShared(objPtr)) { char *dest; @@ -2881,46 +2875,77 @@ static void UpdateStringOfString( Tcl_Obj *objPtr) /* Object with string rep to update. */ { - int i, size; - Tcl_UniChar *unicode; - char dummy[TCL_UTF_MAX]; - char *dst; - String *stringPtr; + String *stringPtr = GET_STRING(objPtr); + ExtendStringRepWithUnicode(objPtr, stringPtr->unicode, stringPtr->numChars); + return; +} - stringPtr = GET_STRING(objPtr); - if (stringPtr->numChars <= 0) { - /* - * If there is no Unicode rep, or the string has 0 chars, then set - * the string rep to an empty string. - */ +static void +ExtendStringRepWithUnicode( + Tcl_Obj *objPtr, + const Tcl_UniChar *unicode, + int numChars) +{ + int i, size = 0; + char *dst, buf[TCL_UTF_MAX]; + + /* Pre-condition: this is the "string" Tcl_ObjType */ + String *stringPtr = GET_STRING(objPtr); - objPtr->bytes = tclEmptyStringRep; - objPtr->length = 0; - return; + if (numChars < 0) { + numChars = 0; + if (unicode) { + while (numChars >= 0 && unicode[numChars] != 0) { + numChars++; + } + if (numChars < 0) { + Tcl_Panic("max length for a Tcl value (%d chars) exceeded", + INT_MAX); + } } + } - unicode = stringPtr->unicode; + if (numChars == 0) { + if (objPtr->bytes == NULL) { + TclInitStringRep(objPtr, buf, 0); + } + return; + } - /* - * Translate the Unicode string to UTF. "size" will hold the amount of - * space the UTF string needs. - */ + if (objPtr->bytes == tclEmptyStringRep) { + TclInvalidateStringRep(objPtr); + /*stringPtr->allocated = 0;*/ + } + if (objPtr->bytes) { + size = objPtr->length; + } else { + objPtr->length = 0; + } + + /* + * TODO: Consider fast overallocation of numChars*TCL_UTF_MAX bytes. + * Then we could make one pass instead of two. Trade away memory + * efficiency for speed. + */ - size = 0; - for (i = 0; i < stringPtr->numChars; i++) { - size += Tcl_UniCharToUtf((int) unicode[i], dummy); - } + for (i = 0; i < numChars && size >= 0; i++) { + size += Tcl_UniCharToUtf((int) unicode[i], buf); + } + if (size < 0) { + Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); + } - dst = (char *) ckalloc((unsigned) (size + 1)); - objPtr->bytes = dst; - objPtr->length = size; + /* Grow space if needed */ + if (size > stringPtr->allocated) { + objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) size+1); stringPtr->allocated = size; - - for (i = 0; i < stringPtr->numChars; i++) { - dst += Tcl_UniCharToUtf(unicode[i], dst); - } - *dst = '\0'; - return; + } + dst = objPtr->bytes + objPtr->length; + for (i = 0; i < numChars; i++) { + dst += Tcl_UniCharToUtf((int) unicode[i], dst); + } + objPtr->length = size; + objPtr->bytes[size] = '\0'; } /* -- cgit v0.12 From b58cb50d92072977c7a7ed1f51f7c928268a2be6 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 12 Feb 2009 04:35:30 +0000 Subject: Revise latest commit to better maintain stringPtr->numChars. --- generic/tclStringObj.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 5283e6e..16331dc 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.98 2009/02/12 03:46:40 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.99 2009/02/12 04:35:30 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -54,7 +54,7 @@ static void AppendUtfToUtfRep(Tcl_Obj *objPtr, const char *bytes, int numBytes); static void DupStringInternalRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); -static void ExtendStringRepWithUnicode(Tcl_Obj *objPtr, +static int ExtendStringRepWithUnicode(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); static void FillUnicodeRep(Tcl_Obj *objPtr); static void FreeStringInternalRep(Tcl_Obj *objPtr); @@ -1439,10 +1439,13 @@ AppendUnicodeToUtfRep( { String *stringPtr = GET_STRING(objPtr); - ExtendStringRepWithUnicode(objPtr, unicode, numChars); + numChars = ExtendStringRepWithUnicode(objPtr, unicode, numChars); + + if (stringPtr->numChars != -1) { + stringPtr->numChars += numChars; + } /* Invalidate the unicode rep */ - stringPtr->numChars = -1; stringPtr->hasUnicode = 0; } @@ -2876,11 +2879,11 @@ UpdateStringOfString( Tcl_Obj *objPtr) /* Object with string rep to update. */ { String *stringPtr = GET_STRING(objPtr); - ExtendStringRepWithUnicode(objPtr, stringPtr->unicode, stringPtr->numChars); - return; + (void) ExtendStringRepWithUnicode(objPtr, stringPtr->unicode, + stringPtr->numChars); } -static void +static int ExtendStringRepWithUnicode( Tcl_Obj *objPtr, const Tcl_UniChar *unicode, @@ -2909,7 +2912,7 @@ ExtendStringRepWithUnicode( if (objPtr->bytes == NULL) { TclInitStringRep(objPtr, buf, 0); } - return; + return 0; } if (objPtr->bytes == tclEmptyStringRep) { @@ -2946,6 +2949,7 @@ ExtendStringRepWithUnicode( } objPtr->length = size; objPtr->bytes[size] = '\0'; + return numChars; } /* -- cgit v0.12 From bf722c6315c4ee0b75907cb81d40c7d7a68bc938 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 12 Feb 2009 09:27:43 +0000 Subject: Fix tricky point that meant it was next to impossible to extend [oo::define]. --- ChangeLog | 7 +++++++ generic/tclOODefineCmds.c | 8 ++++---- tests/oo.test | 21 ++++++++++++++++++++- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb2db93..3bbfd36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-12 Donal K. Fellows + + * generic/tclOODefineCmds.c (TclOOGetDefineCmdContext): Use the + correct field in the Interp structure for retrieving the frame to get + the context object so that people can extend [oo::define] without deep + shenanigans. Bug found by Federico Ferri. + 2009-02-11 Don Porter * generic/tclStringObj.c: Re-implemented AppendUnicodeToUtfRep diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index ac65ee4..b732eec 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.9 2009/01/27 11:11:47 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.10 2009/02/12 09:27:43 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -594,14 +594,14 @@ TclOOGetDefineCmdContext( { Interp *iPtr = (Interp *) interp; - if ((iPtr->framePtr == NULL) - || (iPtr->framePtr->isProcCallFrame != FRAME_IS_OO_DEFINE)) { + if ((iPtr->varFramePtr == NULL) + || (iPtr->varFramePtr->isProcCallFrame != FRAME_IS_OO_DEFINE)) { Tcl_AppendResult(interp, "this command may only be called from within" " the context of an ::oo::define or ::oo::objdefine command", NULL); return NULL; } - return (Tcl_Object) iPtr->framePtr->clientData; + return (Tcl_Object) iPtr->varFramePtr->clientData; } /* diff --git a/tests/oo.test b/tests/oo.test index e0b07b2..1f5573b 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.22 2009/01/29 15:57:54 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.23 2009/02/12 09:27:44 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -2164,6 +2164,25 @@ test oo-27.11 {variables declaration - no instance var leaks with class resolver inst1 step list [inst1 value] [inst2 value] } -result {3 2} + +# A feature that's not supported because the mechanism may change without +# warning, but is supposed to work... +test oo-28.1 {scripted extensions to oo::define} -setup { + interp create foo + foo eval {oo::class create cls {export eval}} +} -cleanup { + interp delete foo +} -body { + foo eval { + proc oo::define::privateMethod {name arguments body} { + uplevel 1 [list method $name $arguments $body] + uplevel 1 [list unexport $name] + } + oo::define cls privateMethod m {x y} {return $x,$y} + cls create obj + list [catch {obj m 1 2}] [obj eval my m 3 4] + } +} -result {1 3,4} cleanupTests return -- cgit v0.12 From 50707cc831683d99d683b35c712cdbb238ffa2d2 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 12 Feb 2009 14:45:34 +0000 Subject: * generic/tclStringObj.c: Re-implemented AppendUtfToUnicodeRep so that we no longer pass through Tcl_DStrings which have their own sets of problems when lengths overflow the int range. Now AUTUR and FillUnicodeRep share a common core routine. --- ChangeLog | 7 +++++ generic/tclStringObj.c | 81 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 56 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3bbfd36..d193180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-12 Don Porter + + * generic/tclStringObj.c: Re-implemented AppendUtfToUnicodeRep + so that we no longer pass through Tcl_DStrings which have their own + sets of problems when lengths overflow the int range. Now AUTUR and + FillUnicodeRep share a common core routine. + 2009-02-12 Donal K. Fellows * generic/tclOODefineCmds.c (TclOOGetDefineCmdContext): Use the diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 16331dc..3f6a74f 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.99 2009/02/12 04:35:30 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.100 2009/02/12 14:45:35 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -56,6 +56,9 @@ static void DupStringInternalRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); static int ExtendStringRepWithUnicode(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); +static void ExtendUnicodeRepWithString(Tcl_Obj *objPtr, + const char *bytes, int numBytes, + int numAppendChars); static void FillUnicodeRep(Tcl_Obj *objPtr); static void FreeStringInternalRep(Tcl_Obj *objPtr); static int SetStringFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); @@ -1132,7 +1135,7 @@ Tcl_AppendLimitedToObj( stringPtr = GET_STRING(objPtr); if (stringPtr->hasUnicode != 0) { - AppendUtfToUnicodeRep(objPtr, ellipsis, -1); + AppendUtfToUnicodeRep(objPtr, ellipsis, strlen(ellipsis)); } else { AppendUtfToUtfRep(objPtr, ellipsis, strlen(ellipsis)); } @@ -1456,7 +1459,7 @@ AppendUnicodeToUtfRep( * * This function converts the contents of "bytes" to Unicode and appends * the Unicode to the Unicode rep of "objPtr". objPtr must already have a - * valid Unicode rep. + * valid Unicode rep. numBytes must be non-negative. * * Results: * None. @@ -1473,22 +1476,16 @@ AppendUtfToUnicodeRep( const char *bytes, /* String to convert to Unicode. */ int numBytes) /* Number of bytes of "bytes" to convert. */ { - Tcl_DString dsPtr; - int numChars; - Tcl_UniChar *unicode; + String *stringPtr; - if (numBytes < 0) { - numBytes = (bytes ? strlen(bytes) : 0); - } if (numBytes == 0) { return; } - Tcl_DStringInit(&dsPtr); - numChars = Tcl_NumUtfChars(bytes, numBytes); - unicode = (Tcl_UniChar *)Tcl_UtfToUniCharDString(bytes, numBytes, &dsPtr); - AppendUnicodeToUnicodeRep(objPtr, unicode, numChars); - Tcl_DStringFree(&dsPtr); + ExtendUnicodeRepWithString(objPtr, bytes, numBytes, -1); + TclInvalidateStringRep(objPtr); + stringPtr = GET_STRING(objPtr); + stringPtr->allocated = 0; } /* @@ -2703,18 +2700,35 @@ FillUnicodeRep( Tcl_Obj *objPtr) /* The object in which to fill the unicode * rep. */ { - String *stringPtr; + String *stringPtr = GET_STRING(objPtr); + ExtendUnicodeRepWithString(objPtr, objPtr->bytes, objPtr->length, + stringPtr->numChars); +} + +static void +ExtendUnicodeRepWithString( + Tcl_Obj *objPtr, + const char *bytes, + int numBytes, + int numAppendChars) +{ + String *stringPtr = GET_STRING(objPtr); + int needed, numOrigChars = 0; size_t uallocated; - char *srcEnd, *src = objPtr->bytes; Tcl_UniChar *dst; - stringPtr = GET_STRING(objPtr); - if (stringPtr->numChars == -1) { - stringPtr->numChars = Tcl_NumUtfChars(src, objPtr->length); + if (stringPtr->hasUnicode) { + numOrigChars = stringPtr->numChars; } - stringPtr->hasUnicode = (stringPtr->numChars > 0); - - uallocated = STRING_UALLOC(stringPtr->numChars); + if (numAppendChars == -1) { + numAppendChars = Tcl_NumUtfChars(bytes, numBytes); + } + needed = numOrigChars + numAppendChars; + if (needed < 0) { + Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); + } + + uallocated = STRING_UALLOC(needed); if (uallocated > stringPtr->uallocated) { /* * If not enough space has been allocated for the unicode rep, @@ -2728,23 +2742,26 @@ FillUnicodeRep( */ if (stringPtr->uallocated > 0) { - uallocated *= 2; + size_t limit = STRING_UALLOC(INT_MAX); + + if (uallocated <= limit/2) { + uallocated *= 2; + } else { + uallocated = limit; + } } + /* TODO: proper fallback */ stringPtr = stringRealloc(stringPtr, uallocated); stringPtr->uallocated = uallocated; + SET_STRING(objPtr, stringPtr); } - /* - * Convert src to Unicode and store the coverted data in "unicode". - */ - - srcEnd = src + objPtr->length; - for (dst = stringPtr->unicode; src < srcEnd; dst++) { - src += TclUtfToUniChar(src, dst); + stringPtr->hasUnicode = (needed > 0); + stringPtr->numChars = needed; + for (dst=stringPtr->unicode + numOrigChars; numAppendChars-- > 0; dst++) { + bytes += TclUtfToUniChar(bytes, dst); } *dst = 0; - - SET_STRING(objPtr, stringPtr); } /* -- cgit v0.12 From ebd799b7e4d40a843ff6c49f8fc77670acf6b67a Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 12 Feb 2009 17:08:44 +0000 Subject: * generic/tclStringObj.c: Simplified Tcl_GetCharLength by * generic/tclTestObj.c: removing code that did nothing. Added early returns from Tcl_*SetObjLength when the desired length is already present; adapted test command to the change. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 49 +++++++++++++++++++++++++------------------------ generic/tclTestObj.c | 8 +++++++- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index d193180..3bae1b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-02-12 Don Porter + * generic/tclStringObj.c: Simplified Tcl_GetCharLength by + * generic/tclTestObj.c: removing code that did nothing. + Added early returns from Tcl_*SetObjLength when the desired length + is already present; adapted test command to the change. + * generic/tclStringObj.c: Re-implemented AppendUtfToUnicodeRep so that we no longer pass through Tcl_DStrings which have their own sets of problems when lengths overflow the int range. Now AUTUR and diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 3f6a74f..1a8a395 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.100 2009/02/12 14:45:35 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.101 2009/02/12 17:08:45 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -374,6 +374,7 @@ Tcl_GetCharLength( * of. */ { String *stringPtr; + int numChars; /* * Optimize the case where we're really dealing with a bytearray object @@ -394,13 +395,14 @@ Tcl_GetCharLength( SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); + numChars = stringPtr->numChars; /* * If numChars is unknown, then calculate the number of characaters while * populating the Unicode string. */ - if (stringPtr->numChars == -1) { + if (numChars == -1) { register int i = objPtr->length; register unsigned char *str = (unsigned char *) objPtr->bytes; @@ -417,21 +419,14 @@ Tcl_GetCharLength( i--; str++; } - stringPtr->numChars = objPtr->length - i; + numChars = objPtr->length - i; if (i) { - stringPtr->numChars += Tcl_NumUtfChars(objPtr->bytes + numChars += Tcl_NumUtfChars(objPtr->bytes + (objPtr->length - i), i); } - if (stringPtr->numChars == objPtr->length) { - /* - * Since we've just calculated the number of chars, and all UTF - * chars are 1-byte long, we don't need to store the unicode - * string. - */ - - stringPtr->hasUnicode = 0; - } else { + stringPtr->numChars = numChars; + if (numChars < objPtr->length) { /* * Since we've just calucalated the number of chars, and not all * UTF chars are 1-byte long, go ahead and populate the unicode @@ -439,16 +434,9 @@ Tcl_GetCharLength( */ FillUnicodeRep(objPtr); - - /* - * We need to fetch the pointer again because we have just - * reallocated the structure to make room for the Unicode data. - */ - - stringPtr = GET_STRING(objPtr); } } - return stringPtr->numChars; + return numChars; } /* @@ -690,6 +678,7 @@ Tcl_GetRange( SetStringFromAny(NULL, newObjPtr); stringPtr = GET_STRING(newObjPtr); + /* TODO: validity check! */ stringPtr->numChars = last-first+1; } else { newObjPtr = Tcl_NewUnicodeObj(stringPtr->unicode + first, @@ -796,6 +785,11 @@ Tcl_SetObjLength( if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetObjLength"); } + + if (objPtr->bytes && objPtr->length == length) { + return; + } + SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); @@ -909,6 +903,10 @@ Tcl_AttemptSetObjLength( if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_AttemptSetObjLength"); } + if (objPtr->bytes && objPtr->length == length) { + return 1; + } + SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); @@ -1388,6 +1386,7 @@ AppendUnicodeToUnicodeRep( * explanation of this growth algorithm. */ + /* TODO: overflow check */ numChars = stringPtr->numChars + appendNumChars; if (STRING_UALLOC(numChars) >= stringPtr->uallocated) { @@ -2792,6 +2791,9 @@ DupStringInternalRep( String *srcStringPtr = GET_STRING(srcPtr); String *copyStringPtr = NULL; + /* TODO: Consider not copying String intrep when just a utf string. */ + /* TODO: Consider not copying extra space. */ + /* * If the src obj is a string of 1-byte Utf chars, then copy the string * rep of the source object and create an "empty" Unicode internal rep for @@ -2800,8 +2802,8 @@ DupStringInternalRep( */ if (srcStringPtr->hasUnicode == 0) { - copyStringPtr = stringAlloc(STRING_UALLOC(0)); - copyStringPtr->uallocated = STRING_UALLOC(0); + copyStringPtr = (String *) ckalloc((unsigned) sizeof(String)); + copyStringPtr->uallocated = 0; } else { copyStringPtr = stringAlloc(srcStringPtr->uallocated); copyStringPtr->uallocated = srcStringPtr->uallocated; @@ -2812,7 +2814,6 @@ DupStringInternalRep( } copyStringPtr->numChars = srcStringPtr->numChars; copyStringPtr->hasUnicode = srcStringPtr->hasUnicode; - copyStringPtr->allocated = srcStringPtr->allocated; /* * Tricky point: the string value was copied by generic object management diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 73cca56..524f05a 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.30 2009/02/11 18:07:56 dgp Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.31 2009/02/12 17:08:45 dgp Exp $ */ #include "tclInt.h" @@ -1096,6 +1096,9 @@ TeststringobjCmd( goto wrongNumArgs; } if (varPtr[varIndex] != NULL) { + if ((varPtr[varIndex])->typePtr != &tclStringType) { + Tcl_ConvertToType(NULL, varPtr[varIndex], &tclStringType); + } strPtr = (TestString *) (varPtr[varIndex])->internalRep.otherValuePtr; length = (int) strPtr->allocated; @@ -1149,6 +1152,9 @@ TeststringobjCmd( goto wrongNumArgs; } if (varPtr[varIndex] != NULL) { + if ((varPtr[varIndex])->typePtr != &tclStringType) { + Tcl_ConvertToType(NULL, varPtr[varIndex], &tclStringType); + } strPtr = (TestString *) (varPtr[varIndex])->internalRep.otherValuePtr; length = (int) strPtr->uallocated; -- cgit v0.12 From f819f7990a8794c9429eb83b8f912950b85d0a91 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 13 Feb 2009 03:22:51 +0000 Subject: * generic/tclStringObj.c: Rewrites of the routines Tcl_GetCharLength, Tcl_GetUniChar, Tcl_GetUnicodeFromObj, Tcl_GetRange, and TclStringObjReverse to use the new macro, and to more simply and clearly split the cases depending on whether a valid unicode rep is present or needs to be created. * generic/tclInt.h: New macro TclNumUtfChars meant to be a faster replacement for a full Tcl_NumUtfChars() call when the string has all single-byte characters. --- ChangeLog | 10 ++ generic/tclInt.h | 27 +++++- generic/tclStringObj.c | 250 +++++++++++++++++++------------------------------ 3 files changed, 134 insertions(+), 153 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3bae1b1..803ee95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2009-02-12 Don Porter + * generic/tclStringObj.c: Rewrites of the routines + Tcl_GetCharLength, Tcl_GetUniChar, Tcl_GetUnicodeFromObj, + Tcl_GetRange, and TclStringObjReverse to use the new macro, and + to more simply and clearly split the cases depending on whether + a valid unicode rep is present or needs to be created. + + * generic/tclInt.h: New macro TclNumUtfChars meant to be a faster + replacement for a full Tcl_NumUtfChars() call when the string has all + single-byte characters. + * generic/tclStringObj.c: Simplified Tcl_GetCharLength by * generic/tclTestObj.c: removing code that did nothing. Added early returns from Tcl_*SetObjLength when the desired length diff --git a/generic/tclInt.h b/generic/tclInt.h index dba84fb..3de0ea2 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.416 2009/02/03 18:48:25 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.417 2009/02/13 03:22:52 dgp Exp $ */ #ifndef _TCLINT @@ -3805,6 +3805,31 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr); /* *---------------------------------------------------------------- + * Macro counterpart of the Tcl_NumUtfChars() function. To be used + * in speed-sensitive points where it pays to avoid a function call + * in the common case of counting along a string of all one-byte characters. + * The ANSI C "prototype" for this macro is: + * + * MODULE_SCOPE void TclNumUtfChars(int numChars, const char *bytes, + * int numBytes); + *---------------------------------------------------------------- + */ + +#define TclNumUtfChars(numChars, bytes, numBytes) \ + do { \ + int count, i = (numBytes); \ + unsigned char *str = (unsigned char *) (bytes); \ + while (i && (*str < 0xC0)) { i--; str++; } \ + count = (numBytes) - i; \ + if (i) { \ + count += Tcl_NumUtfChars((bytes) + count, i); \ + } \ + (numChars) = count; \ + } while (0); + + +/* + *---------------------------------------------------------------- * Macro used by the Tcl core to compare Unicode strings. On big-endian * systems we can use the more efficient memcmp, but this would not be * lexically correct on little-endian systems. The ANSI C "prototype" for diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 1a8a395..f6c3bc8 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.101 2009/02/12 17:08:45 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.102 2009/02/13 03:22:52 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -397,44 +397,28 @@ Tcl_GetCharLength( stringPtr = GET_STRING(objPtr); numChars = stringPtr->numChars; - /* - * If numChars is unknown, then calculate the number of characaters while - * populating the Unicode string. - */ - + /* If numChars is unknown, compute it. */ if (numChars == -1) { - register int i = objPtr->length; - register unsigned char *str = (unsigned char *) objPtr->bytes; + TclNumUtfChars(numChars, objPtr->bytes, objPtr->length); + stringPtr->numChars = numChars; /* - * This is a speed sensitive function, so run specially over the - * string to count continuous ascii characters before resorting to the - * Tcl_NumUtfChars call. This is a long form of: - stringPtr->numChars = Tcl_NumUtfChars(objPtr->bytes,objPtr->length); - * - * TODO: Consider macro-izing this. + * Disabled the auto-fill of the unicode rep when multi-byte + * characters have been detected, on the YAGNI principle. */ - - while (i && (*str < 0xC0)) { - i--; - str++; - } - numChars = objPtr->length - i; - if (i) { - numChars += Tcl_NumUtfChars(objPtr->bytes - + (objPtr->length - i), i); - } - - stringPtr->numChars = numChars; +#if 0 if (numChars < objPtr->length) { /* - * Since we've just calucalated the number of chars, and not all + * Since we've just computed the number of chars, and not all * UTF chars are 1-byte long, go ahead and populate the unicode * string. + * + * TODO: Examine does this really help? How? */ FillUnicodeRep(objPtr); } +#endif } return numChars; } @@ -462,7 +446,6 @@ Tcl_GetUniChar( * from. */ int index) /* Get the index'th Unicode character. */ { - Tcl_UniChar unichar; String *stringPtr; /* @@ -484,33 +467,18 @@ Tcl_GetUniChar( SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - if (stringPtr->numChars == -1) { - /* - * We haven't yet calculated the length, so we don't have the Unicode - * str. We need to know the number of chars before we can do indexing. - */ - - Tcl_GetCharLength(objPtr); - - /* - * We need to fetch the pointer again because we may have just - * reallocated the structure. - */ - - stringPtr = GET_STRING(objPtr); - } if (stringPtr->hasUnicode == 0) { - /* - * All of the characters in the Utf string are 1 byte chars, so we - * don't store the unicode char. We get the Utf string and convert the - * index'th byte to a Unicode character. - */ - - unichar = (Tcl_UniChar) objPtr->bytes[index]; - } else { - unichar = stringPtr->unicode[index]; + /* If numChars is unknown, compute it. */ + if (stringPtr->numChars == -1) { + TclNumUtfChars(stringPtr->numChars, objPtr->bytes, objPtr->length); + } + if (stringPtr->numChars == objPtr->length) { + return (Tcl_UniChar) objPtr->bytes[index]; + } + FillUnicodeRep(objPtr); + stringPtr = GET_STRING(objPtr); } - return unichar; + return stringPtr->unicode[index]; } /* @@ -572,22 +540,8 @@ Tcl_GetUnicodeFromObj( SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - if ((stringPtr->numChars == -1) || (stringPtr->hasUnicode == 0)) { - /* - * We haven't yet calculated the length, or all of the characters in - * the Utf string are 1 byte chars (so we didn't store the unicode - * str). Since this function must return a unicode string, and one has - * not yet been stored, force the Unicode to be calculated and stored - * now. - */ - + if (stringPtr->hasUnicode == 0) { FillUnicodeRep(objPtr); - - /* - * We need to fetch the pointer again because we have just reallocated - * the structure to make room for the Unicode data. - */ - stringPtr = GET_STRING(objPtr); } @@ -644,47 +598,25 @@ Tcl_GetRange( SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - if (stringPtr->numChars == -1) { - /* - * We haven't yet calculated the length, so we don't have the Unicode - * str. We need to know the number of chars before we can do indexing. - */ - - Tcl_GetCharLength(objPtr); - - /* - * We need to fetch the pointer again because we may have just - * reallocated the structure. - */ - + if (stringPtr->hasUnicode == 0) { + /* If numChars is unknown, compute it. */ + if (stringPtr->numChars == -1) { + TclNumUtfChars(stringPtr->numChars, objPtr->bytes, objPtr->length); + } + if (stringPtr->numChars == objPtr->length) { + newObjPtr = Tcl_NewStringObj(objPtr->bytes + first, last-first+1); + + /* Since we know the char length of the result, store it. */ + SetStringFromAny(NULL, newObjPtr); + stringPtr = GET_STRING(newObjPtr); + stringPtr->numChars = newObjPtr->length; + return newObjPtr; + } + FillUnicodeRep(objPtr); stringPtr = GET_STRING(objPtr); } - if (objPtr->bytes && (stringPtr->numChars == objPtr->length)) { - const char *str = TclGetString(objPtr); - - /* - * All of the characters in the Utf string are 1 byte chars, so we - * don't store the unicode char. Create a new string object containing - * the specified range of chars. - */ - - newObjPtr = Tcl_NewStringObj(str+first, last-first+1); - - /* - * Since we know the new string only has 1-byte chars, we can set it's - * numChars field. - */ - - SetStringFromAny(NULL, newObjPtr); - stringPtr = GET_STRING(newObjPtr); - /* TODO: validity check! */ - stringPtr->numChars = last-first+1; - } else { - newObjPtr = Tcl_NewUnicodeObj(stringPtr->unicode + first, - last-first+1); - } - return newObjPtr; + return Tcl_NewUnicodeObj(stringPtr->unicode + first, last-first+1); } /* @@ -2615,65 +2547,79 @@ TclStringObjReverse( Tcl_Obj *objPtr) { String *stringPtr; - int numChars = Tcl_GetCharLength(objPtr); - int i = 0, lastCharIdx = numChars - 1; - char *bytes; - - if (numChars <= 1) { - return objPtr; - } + char *src = NULL, *dest = NULL; + Tcl_UniChar *usrc = NULL, *udest = NULL; + Tcl_Obj *resultPtr = NULL; + SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - if (stringPtr->hasUnicode) { - Tcl_UniChar *source = stringPtr->unicode; - - if (Tcl_IsShared(objPtr)) { - Tcl_UniChar *dest, ch = 0; - - /* - * Create a non-empty, pure unicode value, so we can coax - * Tcl_SetObjLength into growing the unicode rep buffer. - */ - Tcl_Obj *resultPtr = Tcl_NewUnicodeObj(&ch, 1); - Tcl_SetObjLength(resultPtr, numChars); - dest = Tcl_GetUnicode(resultPtr); - - while (i < numChars) { - dest[i++] = source[lastCharIdx--]; - } - return resultPtr; + if (stringPtr->hasUnicode == 0) { + if (stringPtr->numChars == -1) { + TclNumUtfChars(stringPtr->numChars, objPtr->bytes, objPtr->length); } - - while (i < lastCharIdx) { - Tcl_UniChar tmp = source[lastCharIdx]; - source[lastCharIdx--] = source[i]; - source[i++] = tmp; + if (stringPtr->numChars <= 1) { + return objPtr; } - TclInvalidateStringRep(objPtr); - stringPtr->allocated = 0; + if (stringPtr->numChars == objPtr->length) { + /* All one-byte chars. Reverse in objPtr->bytes. */ + if (Tcl_IsShared(objPtr)) { + resultPtr = Tcl_NewObj(); + Tcl_SetObjLength(resultPtr, objPtr->length); + dest = TclGetString(resultPtr); + src = objPtr->bytes + objPtr->length - 1; + while (src >= objPtr->bytes) { + *dest++ = *src--; + } + return resultPtr; + } + /* Unshared. Reverse objPtr->bytes in place. */ + dest = objPtr->bytes; + src = dest + objPtr->length - 1; + while (dest < src) { + char tmp = *src; + *src-- = *dest; + *dest++ = tmp; + } + return objPtr; + } + FillUnicodeRep(objPtr); + stringPtr = GET_STRING(objPtr); + } + if (stringPtr->numChars <= 1) { return objPtr; } - /* TODO: Document the dangers here! */ - - bytes = TclGetString(objPtr); + /* Reverse the Unicode rep. */ if (Tcl_IsShared(objPtr)) { - char *dest; - Tcl_Obj *resultPtr = Tcl_NewObj(); - Tcl_SetObjLength(resultPtr, numChars); - dest = TclGetString(resultPtr); - while (i < numChars) { - dest[i++] = bytes[lastCharIdx--]; + Tcl_UniChar ch = 0; + + /* + * Create a non-empty, pure unicode value, so we can coax + * Tcl_SetObjLength into growing the unicode rep buffer. + */ + + resultPtr = Tcl_NewUnicodeObj(&ch, 1); + Tcl_SetObjLength(resultPtr, stringPtr->numChars); + udest = Tcl_GetUnicode(resultPtr); + usrc = stringPtr->unicode + stringPtr->numChars - 1; + while (usrc >= stringPtr->unicode) { + *udest++ = *usrc--; } return resultPtr; } - while (i < lastCharIdx) { - char tmp = bytes[lastCharIdx]; - bytes[lastCharIdx--] = bytes[i]; - bytes[i++] = tmp; + /* Unshared. Reverse objPtr->bytes in place. */ + udest = stringPtr->unicode; + usrc = udest + stringPtr->numChars - 1; + while (udest < usrc) { + Tcl_UniChar tmp = *usrc; + *usrc-- = *udest; + *udest++ = tmp; } + + TclInvalidateStringRep(objPtr); + stringPtr->allocated = 0; return objPtr; } @@ -2720,7 +2666,7 @@ ExtendUnicodeRepWithString( numOrigChars = stringPtr->numChars; } if (numAppendChars == -1) { - numAppendChars = Tcl_NumUtfChars(bytes, numBytes); + TclNumUtfChars(numAppendChars, bytes, numBytes); } needed = numOrigChars + numAppendChars; if (needed < 0) { -- cgit v0.12 From cff88797e19e9d9e0a3fd02e8936ae008e43db36 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 13 Feb 2009 04:01:46 +0000 Subject: New utility routine UnicodeLength(), to compute the length of unicode buffer arguments when no length is passed in, with built-in overflow protection included. Update three callers to use it. --- ChangeLog | 3 +++ generic/tclStringObj.c | 44 +++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 803ee95..c211fac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ Tcl_GetRange, and TclStringObjReverse to use the new macro, and to more simply and clearly split the cases depending on whether a valid unicode rep is present or needs to be created. + New utility routine UnicodeLength(), to compute the length of unicode + buffer arguments when no length is passed in, with built-in + overflow protection included. Update three callers to use it. * generic/tclInt.h: New macro TclNumUtfChars meant to be a faster replacement for a full Tcl_NumUtfChars() call when the string has all diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index f6c3bc8..c1f7e64 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.102 2009/02/13 03:22:52 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.103 2009/02/13 04:01:46 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -950,6 +950,23 @@ Tcl_SetUnicodeObj( SetUnicodeObj(objPtr, unicode, numChars); } +static int +UnicodeLength( + const Tcl_UniChar *unicode) +{ + int numChars = 0; + + if (unicode) { + while (numChars >= 0 && unicode[numChars] != 0) { + numChars++; + } + } + if (numChars < 0) { + Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); + } + return numChars; +} + static void SetUnicodeObj( Tcl_Obj *objPtr, /* The object to set the string of. */ @@ -962,12 +979,7 @@ SetUnicodeObj( size_t uallocated; if (numChars < 0) { - numChars = 0; - if (unicode) { - while (unicode[numChars] != 0) { - numChars++; - } - } + numChars = UnicodeLength(unicode); } /* @@ -1296,12 +1308,7 @@ AppendUnicodeToUnicodeRep( size_t numChars; if (appendNumChars < 0) { - appendNumChars = 0; - if (unicode) { - while (unicode[appendNumChars] != 0) { - appendNumChars++; - } - } + appendNumChars = UnicodeLength(unicode); } if (appendNumChars == 0) { return; @@ -2860,16 +2867,7 @@ ExtendStringRepWithUnicode( String *stringPtr = GET_STRING(objPtr); if (numChars < 0) { - numChars = 0; - if (unicode) { - while (numChars >= 0 && unicode[numChars] != 0) { - numChars++; - } - if (numChars < 0) { - Tcl_Panic("max length for a Tcl value (%d chars) exceeded", - INT_MAX); - } - } + numChars = UnicodeLength(unicode); } if (numChars == 0) { -- cgit v0.12 From e39ebe63ed55f1fe9e30421ef4bcb28316bc0c0e Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 13 Feb 2009 14:45:54 +0000 Subject: Remove all "register" keywords. --- generic/tclStringObj.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index c1f7e64..8d24001 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.103 2009/02/13 04:01:46 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.104 2009/02/13 14:45:54 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -238,7 +238,7 @@ Tcl_NewStringObj( * negative, use bytes up to the first NUL * byte. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; if (length < 0) { length = (bytes? strlen(bytes) : 0); @@ -291,7 +291,7 @@ Tcl_DbNewStringObj( int line) /* Line number in the source file; used for * debugging. */ { - register Tcl_Obj *objPtr; + Tcl_Obj *objPtr; if (length < 0) { length = (bytes? strlen(bytes) : 0); @@ -305,7 +305,7 @@ Tcl_Obj * Tcl_DbNewStringObj( const char *bytes, /* Points to the first of the length bytes * used to initialize the new object. */ - register int length, /* The number of bytes to copy from "bytes" + int length, /* The number of bytes to copy from "bytes" * when initializing the new object. If * negative, use bytes up to the first NUL * byte. */ @@ -642,10 +642,10 @@ Tcl_GetRange( void Tcl_SetStringObj( - register Tcl_Obj *objPtr, /* Object whose internal rep to init. */ + Tcl_Obj *objPtr, /* Object whose internal rep to init. */ const char *bytes, /* Points to the first of the length bytes * used to initialize the object. */ - register int length) /* The number of bytes to copy from "bytes" + int length) /* The number of bytes to copy from "bytes" * when initializing the object. If negative, * use bytes up to the first NUL byte.*/ { @@ -697,9 +697,9 @@ Tcl_SetStringObj( void Tcl_SetObjLength( - register Tcl_Obj *objPtr, /* Pointer to object. This object must not + Tcl_Obj *objPtr, /* Pointer to object. This object must not * currently be shared. */ - register int length) /* Number of bytes desired for string + int length) /* Number of bytes desired for string * representation of object, not including * terminating null byte. */ { @@ -817,9 +817,9 @@ Tcl_SetObjLength( int Tcl_AttemptSetObjLength( - register Tcl_Obj *objPtr, /* Pointer to object. This object must not + Tcl_Obj *objPtr, /* Pointer to object. This object must not * currently be shared. */ - register int length) /* Number of bytes desired for string + int length) /* Number of bytes desired for string * representation of object, not including * terminating null byte. */ { @@ -1021,13 +1021,13 @@ SetUnicodeObj( void Tcl_AppendLimitedToObj( - register Tcl_Obj *objPtr, /* Points to the object to append to. */ + Tcl_Obj *objPtr, /* Points to the object to append to. */ const char *bytes, /* Points to the bytes to append to the * object. */ - register int length, /* The number of bytes available to be + int length, /* The number of bytes available to be * appended from "bytes". If < 0, then all * bytes up to a NUL byte are available. */ - register int limit, /* The maximum number of bytes to append to + int limit, /* The maximum number of bytes to append to * the object. */ const char *ellipsis) /* Ellipsis marker string, appended to the * object to indicate not all available bytes @@ -1102,10 +1102,10 @@ Tcl_AppendLimitedToObj( void Tcl_AppendToObj( - register Tcl_Obj *objPtr, /* Points to the object to append to. */ + Tcl_Obj *objPtr, /* Points to the object to append to. */ const char *bytes, /* Points to the bytes to append to the * object. */ - register int length) /* The number of bytes to append from "bytes". + int length) /* The number of bytes to append from "bytes". * If < 0, then append all bytes up to NUL * byte. */ { @@ -1131,7 +1131,7 @@ Tcl_AppendToObj( void Tcl_AppendUnicodeToObj( - register Tcl_Obj *objPtr, /* Points to the object to append to. */ + Tcl_Obj *objPtr, /* Points to the object to append to. */ const Tcl_UniChar *unicode, /* The unicode string to append to the * object. */ int length) /* Number of chars in "unicode". */ @@ -1529,7 +1529,7 @@ Tcl_AppendStringsToObjVA( #define STATIC_LIST_SIZE 16 String *stringPtr; int newLength, oldLength, attemptLength; - register char *string, *dst; + char *string, *dst; char *static_list[STATIC_LIST_SIZE]; char **args = static_list; int nargs_space = STATIC_LIST_SIZE; @@ -2736,9 +2736,9 @@ ExtendUnicodeRepWithString( static void DupStringInternalRep( - register Tcl_Obj *srcPtr, /* Object with internal rep to copy. Must have + Tcl_Obj *srcPtr, /* Object with internal rep to copy. Must have * an internal rep of type "String". */ - register Tcl_Obj *copyPtr) /* Object with internal rep to set. Must not + Tcl_Obj *copyPtr) /* Object with internal rep to set. Must not * currently have an internal rep.*/ { String *srcStringPtr = GET_STRING(srcPtr); @@ -2800,7 +2800,7 @@ DupStringInternalRep( static int SetStringFromAny( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ + Tcl_Obj *objPtr) /* The object to convert. */ { if (objPtr->typePtr != &tclStringType) { String *stringPtr = (String *) ckalloc((unsigned) sizeof(String)); -- cgit v0.12 From fa44b044329477881fa019cb851c184812368416 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 14 Feb 2009 20:30:13 +0000 Subject: Const correctness fixes in the debug build. --- generic/tclExecute.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0a86306..ca4312a 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.426 2009/02/10 22:50:00 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.427 2009/02/14 20:30:13 dgp Exp $ */ #include "tclInt.h" @@ -660,11 +660,11 @@ static int EvalStatsCmd(ClientData clientData, Tcl_Obj *const objv[]); #endif /* TCL_COMPILE_STATS */ #ifdef TCL_COMPILE_DEBUG -static const char * GetOpcodeName(unsigned char *pc); +static const char * GetOpcodeName(const unsigned char *pc); static void PrintByteCodeInfo(ByteCode *codePtr); static const char * StringForResultCode(int result); static void ValidatePcAndStackTop(ByteCode *codePtr, - unsigned char *pc, int stackTop, + const unsigned char *pc, int stackTop, int stackLowerBound, int checkStack); #endif /* TCL_COMPILE_DEBUG */ static void DeleteExecStack(ExecStack *esPtr); @@ -8053,7 +8053,7 @@ static void ValidatePcAndStackTop( register ByteCode *codePtr, /* The bytecode whose summary is printed to * stdout. */ - unsigned char *pc, /* Points to first byte of a bytecode + const unsigned char *pc, /* Points to first byte of a bytecode * instruction. The program counter. */ int stackTop, /* Current stack top. Must be between * stackLowerBound and stackUpperBound @@ -8446,7 +8446,7 @@ GetExceptRangeForPc( #ifdef TCL_COMPILE_DEBUG static const char * GetOpcodeName( - unsigned char *pc) /* Points to the instruction whose name should + const unsigned char *pc) /* Points to the instruction whose name should * be returned. */ { unsigned char opCode = *pc; -- cgit v0.12 From 34bab026d12e407d9bf7e5d9eca2012f2e9a1f97 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 14 Feb 2009 22:54:18 +0000 Subject: * generic/tclTestObj.c: Revise updates to [teststringobj] so we don't get blocked by MODULE_SCOPE limits. --- ChangeLog | 5 +++++ generic/tclTestObj.c | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c211fac..207e308 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-14 Don Porter + + * generic/tclTestObj.c: Revise updates to [teststringobj] so we don't + get blocked by MODULE_SCOPE limits. + 2009-02-12 Don Porter * generic/tclStringObj.c: Rewrites of the routines diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 524f05a..cc194b8 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.31 2009/02/12 17:08:45 dgp Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.32 2009/02/14 22:54:19 dgp Exp $ */ #include "tclInt.h" @@ -1096,9 +1096,8 @@ TeststringobjCmd( goto wrongNumArgs; } if (varPtr[varIndex] != NULL) { - if ((varPtr[varIndex])->typePtr != &tclStringType) { - Tcl_ConvertToType(NULL, varPtr[varIndex], &tclStringType); - } + Tcl_ConvertToType(NULL, varPtr[varIndex], + Tcl_GetObjType("string")); strPtr = (TestString *) (varPtr[varIndex])->internalRep.otherValuePtr; length = (int) strPtr->allocated; @@ -1152,9 +1151,8 @@ TeststringobjCmd( goto wrongNumArgs; } if (varPtr[varIndex] != NULL) { - if ((varPtr[varIndex])->typePtr != &tclStringType) { - Tcl_ConvertToType(NULL, varPtr[varIndex], &tclStringType); - } + Tcl_ConvertToType(NULL, varPtr[varIndex], + Tcl_GetObjType("string")); strPtr = (TestString *) (varPtr[varIndex])->internalRep.otherValuePtr; length = (int) strPtr->uallocated; -- cgit v0.12 From 9325ac89905cf6cadf12491e007de22301362651 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 14 Feb 2009 23:07:17 +0000 Subject: * generic/tclStringObj.c: Revisions so that we avoid creating the strange representation of an empty string with objPtr->bytes == NULL and stringPtr->hasUnicode == 0. Instead in the situations where that was being created, create a traditional two-legged stork representation (objPtr->bytes = tclEmptyStringRep and stringPtr->hasUnicode = 1). In the situations where the strange rep was treated differently, continue to do so by testing stringPtr->numChars == 0 to detect it. These changes make the code more conventional so easier for new maintainers to pick up. Also sets up further simplifications. --- ChangeLog | 11 +++++ generic/tclStringObj.c | 124 +++++++++++++++++++++++++++++-------------------- 2 files changed, 84 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 207e308..d13ce75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2009-02-14 Don Porter + * generic/tclStringObj.c: Revisions so that we avoid creating + the strange representation of an empty string with + objPtr->bytes == NULL and stringPtr->hasUnicode == 0. Instead in + the situations where that was being created, create a traditional + two-legged stork representation (objPtr->bytes = tclEmptyStringRep + and stringPtr->hasUnicode = 1). In the situations where the strange + rep was treated differently, continue to do so by testing + stringPtr->numChars == 0 to detect it. These changes make the code + more conventional so easier for new maintainers to pick up. Also + sets up further simplifications. + * generic/tclTestObj.c: Revise updates to [teststringobj] so we don't get blocked by MODULE_SCOPE limits. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 8d24001..9112572 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.104 2009/02/13 14:45:54 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.105 2009/02/14 23:07:17 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -64,6 +64,7 @@ static void FreeStringInternalRep(Tcl_Obj *objPtr); static int SetStringFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); +static int UnicodeLength(const Tcl_UniChar *unicode); static void UpdateStringOfString(Tcl_Obj *objPtr); /* @@ -406,7 +407,7 @@ Tcl_GetCharLength( * Disabled the auto-fill of the unicode rep when multi-byte * characters have been detected, on the YAGNI principle. */ -#if 0 +#if 1 if (numChars < objPtr->length) { /* * Since we've just computed the number of chars, and not all @@ -723,7 +724,6 @@ Tcl_SetObjLength( } SetStringFromAny(NULL, objPtr); - stringPtr = GET_STRING(objPtr); /* @@ -761,6 +761,8 @@ Tcl_SetObjLength( objPtr->bytes[length] = 0; } + /* Note: here we can get an empty string != tclEmptyStringRep */ + /* * Invalidate the unicode data. */ @@ -779,16 +781,21 @@ Tcl_SetObjLength( SET_STRING(objPtr, stringPtr); stringPtr->uallocated = uallocated; } + + /* Mark the new end of the unicode string */ stringPtr->numChars = length; - stringPtr->hasUnicode = (length > 0); + stringPtr->unicode[length] = 0; + stringPtr->hasUnicode = 1; /* - * Ensure the string is NUL-terminated. + * Can only get here when objPtr->bytes == NULL. + * No need to invalidate the string rep. */ - stringPtr->unicode[length] = 0; - stringPtr->allocated = 0; - objPtr->length = 0; + if (length == 0) { + /* For the empty string case, set the string rep. */ + TclInitStringRep(objPtr, tclEmptyStringRep, 0); + } } } @@ -840,7 +847,6 @@ Tcl_AttemptSetObjLength( } SetStringFromAny(NULL, objPtr); - stringPtr = GET_STRING(objPtr); /* @@ -905,16 +911,21 @@ Tcl_AttemptSetObjLength( SET_STRING(objPtr, stringPtr); stringPtr->uallocated = uallocated; } + + /* Mark the new end of the unicode string */ + stringPtr->unicode[length] = 0; stringPtr->numChars = length; - stringPtr->hasUnicode = (length > 0); + stringPtr->hasUnicode = 1; /* - * Ensure the string is NUL-terminated. + * Can only get here when objPtr->bytes == NULL. + * No need to invalidate the string rep. */ - stringPtr->unicode[length] = 0; - stringPtr->allocated = 0; - objPtr->length = 0; + if (length == 0) { + /* For the empty string case, set the string rep. */ + TclInitStringRep(objPtr, tclEmptyStringRep, 0); + } } return 1; } @@ -988,17 +999,22 @@ SetUnicodeObj( uallocated = STRING_UALLOC(numChars); stringPtr = stringAlloc(uallocated); + SET_STRING(objPtr, stringPtr); + objPtr->typePtr = &tclStringType; - stringPtr->numChars = numChars; stringPtr->uallocated = uallocated; - stringPtr->hasUnicode = (numChars > 0); - stringPtr->allocated = 0; memcpy(stringPtr->unicode, unicode, uallocated); stringPtr->unicode[numChars] = 0; + stringPtr->numChars = numChars; + stringPtr->hasUnicode = 1; TclInvalidateStringRep(objPtr); - objPtr->typePtr = &tclStringType; - SET_STRING(objPtr, stringPtr); + stringPtr->allocated = 0; + + if (numChars == 0) { + /* For the empty string case, set the string rep. */ + TclInitStringRep(objPtr, tclEmptyStringRep, 0); + } } /* @@ -1040,8 +1056,6 @@ Tcl_AppendLimitedToObj( Tcl_Panic("%s called with shared object", "Tcl_AppendLimitedToObj"); } - SetStringFromAny(NULL, objPtr); - if (length < 0) { length = (bytes ? strlen(bytes) : 0); } @@ -1064,8 +1078,10 @@ Tcl_AppendLimitedToObj( * objPtr's string rep. */ + SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - if (stringPtr->hasUnicode != 0) { + + if (stringPtr->hasUnicode && stringPtr->numChars > 0) { AppendUtfToUnicodeRep(objPtr, bytes, toCopy); } else { AppendUtfToUtfRep(objPtr, bytes, toCopy); @@ -1076,7 +1092,7 @@ Tcl_AppendLimitedToObj( } stringPtr = GET_STRING(objPtr); - if (stringPtr->hasUnicode != 0) { + if (stringPtr->hasUnicode && stringPtr->numChars > 0) { AppendUtfToUnicodeRep(objPtr, ellipsis, strlen(ellipsis)); } else { AppendUtfToUtfRep(objPtr, ellipsis, strlen(ellipsis)); @@ -1155,7 +1171,8 @@ Tcl_AppendUnicodeToObj( * objPtr's string rep. */ - if (stringPtr->hasUnicode != 0) { + /* TODO: shift appends to empty to work on Unicode? */ + if (stringPtr->hasUnicode && stringPtr->numChars > 0) { AppendUnicodeToUnicodeRep(objPtr, unicode, length); } else { AppendUnicodeToUtfRep(objPtr, unicode, length); @@ -1223,21 +1240,23 @@ Tcl_AppendObjToObj( */ SetStringFromAny(NULL, objPtr); + stringPtr = GET_STRING(objPtr); /* * If objPtr has a valid Unicode rep, then get a Unicode string from * appendObjPtr and append it. */ - stringPtr = GET_STRING(objPtr); - if (stringPtr->hasUnicode != 0) { + /* TODO: Check that append to self works */ + + if (stringPtr->hasUnicode && stringPtr->numChars > 0) { /* * If appendObjPtr is not of the "String" type, don't convert it. */ if (appendObjPtr->typePtr == &tclStringType) { stringPtr = GET_STRING(appendObjPtr); - if ((stringPtr->numChars == -1) || (stringPtr->hasUnicode == 0)) { + if (stringPtr->hasUnicode == 0) { /* * If appendObjPtr is a string obj with no valid Unicode rep, * then fill its unicode rep. @@ -1267,6 +1286,7 @@ Tcl_AppendObjToObj( numChars = stringPtr->numChars; if ((numChars >= 0) && (appendObjPtr->typePtr == &tclStringType)) { stringPtr = GET_STRING(appendObjPtr); + /* TODO why is the == length test needed here? */ if ((stringPtr->numChars >= 0) && (stringPtr->numChars == length)) { numChars += stringPtr->numChars; allOneByteChars = 1; @@ -1386,6 +1406,7 @@ AppendUnicodeToUtfRep( stringPtr->numChars += numChars; } + /* TODO: Condition on (numChars > 0) ? or change caller & eliminate ? */ /* Invalidate the unicode rep */ stringPtr->hasUnicode = 0; } @@ -1580,6 +1601,7 @@ Tcl_AppendStringsToObjVA( } stringPtr = GET_STRING(objPtr); + /* TODO: pure unicode will crash! */ if (oldLength + newLength > stringPtr->allocated) { /* * There isn't currently enough space in the string representation, so @@ -2708,12 +2730,16 @@ ExtendUnicodeRepWithString( SET_STRING(objPtr, stringPtr); } - stringPtr->hasUnicode = (needed > 0); + stringPtr->hasUnicode = 1; stringPtr->numChars = needed; for (dst=stringPtr->unicode + numOrigChars; numAppendChars-- > 0; dst++) { bytes += TclUtfToUniChar(bytes, dst); } *dst = 0; + if (needed == 0) { + /* For the empty string case, set the string rep. */ + TclInitStringRep(objPtr, tclEmptyStringRep, 0); + } } /* @@ -2744,9 +2770,6 @@ DupStringInternalRep( String *srcStringPtr = GET_STRING(srcPtr); String *copyStringPtr = NULL; - /* TODO: Consider not copying String intrep when just a utf string. */ - /* TODO: Consider not copying extra space. */ - /* * If the src obj is a string of 1-byte Utf chars, then copy the string * rep of the source object and create an "empty" Unicode internal rep for @@ -2754,28 +2777,31 @@ DupStringInternalRep( * the string rep of the new object. */ - if (srcStringPtr->hasUnicode == 0) { - copyStringPtr = (String *) ckalloc((unsigned) sizeof(String)); - copyStringPtr->uallocated = 0; - } else { + if (srcStringPtr->hasUnicode && srcStringPtr->numChars > 0) { + /* Copy the full allocation for the Unicode buffer. */ + /* TODO: consider a more limited copy to the min of + * the current uallocated value and twice the current numChars */ copyStringPtr = stringAlloc(srcStringPtr->uallocated); copyStringPtr->uallocated = srcStringPtr->uallocated; - memcpy(copyStringPtr->unicode, srcStringPtr->unicode, (size_t) srcStringPtr->numChars * sizeof(Tcl_UniChar)); copyStringPtr->unicode[srcStringPtr->numChars] = 0; + copyStringPtr->allocated = 0; + } else { + /* TODO: consider not bothering to make a String intrep. */ + copyStringPtr = (String *) ckalloc((unsigned) sizeof(String)); + copyStringPtr->unicode[0] = 0; + copyStringPtr->uallocated = 0; + /* + * Tricky point: the string value was copied by generic object + * management code, so it doesn't contain any extra bytes that + * might exist in the source object. + */ + copyStringPtr->allocated = copyPtr->length; } copyStringPtr->numChars = srcStringPtr->numChars; copyStringPtr->hasUnicode = srcStringPtr->hasUnicode; - /* - * Tricky point: the string value was copied by generic object management - * code, so it doesn't contain any extra bytes that might exist in the - * source object. - */ - - copyStringPtr->allocated = copyPtr->length; - SET_STRING(copyPtr, copyStringPtr); copyPtr->typePtr = &tclStringType; } @@ -2871,17 +2897,12 @@ ExtendStringRepWithUnicode( } if (numChars == 0) { - if (objPtr->bytes == NULL) { - TclInitStringRep(objPtr, buf, 0); - } return 0; } if (objPtr->bytes == tclEmptyStringRep) { - TclInvalidateStringRep(objPtr); - /*stringPtr->allocated = 0;*/ - } - if (objPtr->bytes) { + objPtr->bytes = NULL; + } else if (objPtr->bytes) { size = objPtr->length; } else { objPtr->length = 0; @@ -2902,6 +2923,7 @@ ExtendStringRepWithUnicode( /* Grow space if needed */ if (size > stringPtr->allocated) { + /* TODO: Growth algorithm for appends ? */ objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) size+1); stringPtr->allocated = size; } -- cgit v0.12 From cf9a0cad9436ae952feb777e2e5e5c931e37d73e Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 15 Feb 2009 16:49:40 +0000 Subject: * generic/tclStringObj.c: Removed limitation in Tcl_AppendObjToObj where the char length of the result was only computed if the appended string was all single byte characters. This limitation was in place to dodge a bug in Tcl_GetUniChar. With that bug gone, we can take advantage of always recording the length of append results when we know it. --- ChangeLog | 9 +++++++++ generic/tclStringObj.c | 19 +++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d13ce75..c546174 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-02-15 Don Porter + + * generic/tclStringObj.c: Removed limitation in + Tcl_AppendObjToObj where the char length of the result was only + computed if the appended string was all single byte characters. + This limitation was in place to dodge a bug in Tcl_GetUniChar. + With that bug gone, we can take advantage of always recording the + length of append results when we know it. + 2009-02-14 Don Porter * generic/tclStringObj.c: Revisions so that we avoid creating diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 9112572..2b1a658 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.105 2009/02/14 23:07:17 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.106 2009/02/15 16:49:40 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1203,7 +1203,7 @@ Tcl_AppendObjToObj( Tcl_Obj *appendObjPtr) /* Object to append. */ { String *stringPtr; - int length, numChars, allOneByteChars; + int length, numChars, appendNumChars = -1; const char *bytes; /* @@ -1280,24 +1280,19 @@ Tcl_AppendObjToObj( * characters in the final (appended-to) object. */ + /* TODO: Check that append to self works */ bytes = TclGetStringFromObj(appendObjPtr, &length); - allOneByteChars = 0; numChars = stringPtr->numChars; if ((numChars >= 0) && (appendObjPtr->typePtr == &tclStringType)) { - stringPtr = GET_STRING(appendObjPtr); - /* TODO why is the == length test needed here? */ - if ((stringPtr->numChars >= 0) && (stringPtr->numChars == length)) { - numChars += stringPtr->numChars; - allOneByteChars = 1; - } + String *appendStringPtr = GET_STRING(appendObjPtr); + appendNumChars = appendStringPtr->numChars; } AppendUtfToUtfRep(objPtr, bytes, length); - if (allOneByteChars) { - stringPtr = GET_STRING(objPtr); - stringPtr->numChars = numChars; + if (numChars >= 0 && appendNumChars >= 0) { + stringPtr->numChars = numChars + appendNumChars; } } -- cgit v0.12 From 6c361fffabf21b1adb6113a86da85c4dc64a9f9d Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 15 Feb 2009 22:32:19 +0000 Subject: * generic/tclStringObj.c: Replace the 'size_t uallocated' field of the String struct, storing the number of bytes allocated to store the Tcl_UniChar array, with an 'int maxChars' field, storing the number of Tcl_UniChars that may be stored in the allocated space. This reduces memory requirement a small bit, and makes some range checks simpler to code. --- ChangeLog | 7 ++++ generic/tclStringObj.c | 88 ++++++++++++++++++++++++-------------------------- 2 files changed, 49 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index c546174..969da70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-02-15 Don Porter + * generic/tclStringObj.c: Replace the 'size_t uallocated' field + of the String struct, storing the number of bytes allocated to store + the Tcl_UniChar array, with an 'int maxChars' field, storing the + number of Tcl_UniChars that may be stored in the allocated space. + This reduces memory requirement a small bit, and makes some range + checks simpler to code. + * generic/tclStringObj.c: Removed limitation in Tcl_AppendObjToObj where the char length of the result was only computed if the appended string was all single byte characters. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 2b1a658..df4e9fc 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.106 2009/02/15 16:49:40 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.107 2009/02/15 22:32:19 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -103,13 +103,12 @@ typedef struct String { int allocated; /* The amount of space actually allocated for * the UTF string (minus 1 byte for the * termination char). */ - size_t uallocated; /* The amount of space actually allocated for - * the Unicode string (minus 2 bytes for the - * termination char). */ + int maxChars; /* Max number of chars that can fit in the + * space allocated for the unicode array. */ int hasUnicode; /* Boolean determining whether the string has * a Unicode representation. */ Tcl_UniChar unicode[2]; /* The array of Unicode chars. The actual size - * of this field depends on the 'uallocated' + * of this field depends on the 'maxChars' * field above. */ } String; @@ -774,12 +773,11 @@ Tcl_SetObjLength( * Changing length of pure unicode string. */ - size_t uallocated = STRING_UALLOC(length); - if (uallocated > stringPtr->uallocated) { - stringPtr = stringRealloc(stringPtr, uallocated); + if (length > stringPtr->maxChars) { + stringPtr = stringRealloc(stringPtr, STRING_UALLOC(length)); SET_STRING(objPtr, stringPtr); - stringPtr->uallocated = uallocated; + stringPtr->maxChars = length; } /* Mark the new end of the unicode string */ @@ -901,15 +899,13 @@ Tcl_AttemptSetObjLength( * Changing length of pure unicode string. */ - size_t uallocated = STRING_UALLOC(length); - - if (uallocated > stringPtr->uallocated) { - stringPtr = stringAttemptRealloc(stringPtr, uallocated); + if (length > stringPtr->maxChars) { + stringPtr = stringAttemptRealloc(stringPtr, STRING_UALLOC(length)); if (stringPtr == NULL) { return 0; } SET_STRING(objPtr, stringPtr); - stringPtr->uallocated = uallocated; + stringPtr->maxChars = length; } /* Mark the new end of the unicode string */ @@ -987,7 +983,6 @@ SetUnicodeObj( * string. */ { String *stringPtr; - size_t uallocated; if (numChars < 0) { numChars = UnicodeLength(unicode); @@ -997,13 +992,12 @@ SetUnicodeObj( * Allocate enough space for the String structure + Unicode string. */ - uallocated = STRING_UALLOC(numChars); - stringPtr = stringAlloc(uallocated); + stringPtr = stringAlloc(STRING_UALLOC(numChars)); SET_STRING(objPtr, stringPtr); objPtr->typePtr = &tclStringType; - stringPtr->uallocated = uallocated; - memcpy(stringPtr->unicode, unicode, uallocated); + stringPtr->maxChars = numChars; + memcpy(stringPtr->unicode, unicode, numChars * sizeof(Tcl_UniChar)); stringPtr->unicode[numChars] = 0; stringPtr->numChars = numChars; stringPtr->hasUnicode = 1; @@ -1320,7 +1314,7 @@ AppendUnicodeToUnicodeRep( int appendNumChars) /* Number of chars of "unicode" to append. */ { String *stringPtr, *tmpString; - size_t numChars; + int numChars; if (appendNumChars < 0) { appendNumChars = UnicodeLength(unicode); @@ -1340,17 +1334,21 @@ AppendUnicodeToUnicodeRep( * explanation of this growth algorithm. */ - /* TODO: overflow check */ numChars = stringPtr->numChars + appendNumChars; + if (numChars < 0) { + Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); + } + + if (numChars >= stringPtr->maxChars) { - if (STRING_UALLOC(numChars) >= stringPtr->uallocated) { - stringPtr->uallocated = STRING_UALLOC(2 * numChars); - tmpString = stringAttemptRealloc(stringPtr, stringPtr->uallocated); + /* TODO: overflow check */ + stringPtr->maxChars = 2 * numChars; + tmpString = stringAttemptRealloc(stringPtr, + STRING_UALLOC(2 * numChars)); if (tmpString == NULL) { - stringPtr->uallocated = - STRING_UALLOC(numChars + appendNumChars) - + TCL_GROWTH_MIN_ALLOC; - tmpString = stringRealloc(stringPtr, stringPtr->uallocated); + stringPtr->maxChars = numChars + appendNumChars + + TCL_GROWTH_MIN_ALLOC/sizeof(Tcl_UniChar); + tmpString = stringRealloc(stringPtr, STRING_UALLOC(stringPtr->maxChars)); } stringPtr = tmpString; SET_STRING(objPtr, stringPtr); @@ -1514,7 +1512,7 @@ AppendUtfToUtfRep( stringPtr->numChars = -1; stringPtr->hasUnicode = 0; - memcpy(objPtr->bytes + oldLength, bytes, (size_t) numBytes); + memcpy(objPtr->bytes + oldLength, bytes, numBytes); objPtr->bytes[newLength] = 0; objPtr->length = newLength; } @@ -2683,7 +2681,6 @@ ExtendUnicodeRepWithString( { String *stringPtr = GET_STRING(objPtr); int needed, numOrigChars = 0; - size_t uallocated; Tcl_UniChar *dst; if (stringPtr->hasUnicode) { @@ -2697,8 +2694,7 @@ ExtendUnicodeRepWithString( Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); } - uallocated = STRING_UALLOC(needed); - if (uallocated > stringPtr->uallocated) { + if (needed > stringPtr->maxChars) { /* * If not enough space has been allocated for the unicode rep, * reallocate the internal rep object. @@ -2709,19 +2705,19 @@ ExtendUnicodeRepWithString( * overallocate the space so that we won't have to do as much * reallocation in the future. */ + int growChars = needed; - if (stringPtr->uallocated > 0) { - size_t limit = STRING_UALLOC(INT_MAX); - - if (uallocated <= limit/2) { - uallocated *= 2; + if (stringPtr->maxChars > 0) { + if (growChars <= INT_MAX/2) { + growChars *= 2; } else { - uallocated = limit; + growChars = INT_MAX; } } /* TODO: proper fallback */ - stringPtr = stringRealloc(stringPtr, uallocated); - stringPtr->uallocated = uallocated; + stringPtr = stringRealloc(stringPtr, STRING_UALLOC(growChars)); + stringPtr->maxChars = growChars; + SET_STRING(objPtr, stringPtr); } @@ -2775,18 +2771,18 @@ DupStringInternalRep( if (srcStringPtr->hasUnicode && srcStringPtr->numChars > 0) { /* Copy the full allocation for the Unicode buffer. */ /* TODO: consider a more limited copy to the min of - * the current uallocated value and twice the current numChars */ - copyStringPtr = stringAlloc(srcStringPtr->uallocated); - copyStringPtr->uallocated = srcStringPtr->uallocated; + * the current maxChars value and twice the current numChars */ + copyStringPtr = stringAlloc(STRING_UALLOC(srcStringPtr->maxChars)); + copyStringPtr->maxChars = srcStringPtr->maxChars; memcpy(copyStringPtr->unicode, srcStringPtr->unicode, - (size_t) srcStringPtr->numChars * sizeof(Tcl_UniChar)); + srcStringPtr->numChars * sizeof(Tcl_UniChar)); copyStringPtr->unicode[srcStringPtr->numChars] = 0; copyStringPtr->allocated = 0; } else { /* TODO: consider not bothering to make a String intrep. */ copyStringPtr = (String *) ckalloc((unsigned) sizeof(String)); copyStringPtr->unicode[0] = 0; - copyStringPtr->uallocated = 0; + copyStringPtr->maxChars = 0; /* * Tricky point: the string value was copied by generic object * management code, so it doesn't contain any extra bytes that @@ -2840,7 +2836,7 @@ SetStringFromAny( stringPtr->numChars = -1; stringPtr->allocated = objPtr->length; - stringPtr->uallocated = 0; + stringPtr->maxChars = 0; stringPtr->hasUnicode = 0; SET_STRING(objPtr, stringPtr); objPtr->typePtr = &tclStringType; -- cgit v0.12 From 53a6c6e15b5a20bc8c7bb870aba701855f8da484 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 15 Feb 2009 23:13:11 +0000 Subject: * generic/tclStringObj.c: Factor out duplicate code from Tcl_AppendObjToObj. --- ChangeLog | 3 +++ generic/tclStringObj.c | 16 ++++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 969da70..2c22914 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-02-15 Don Porter + * generic/tclStringObj.c: Factor out duplicate code from + Tcl_AppendObjToObj. + * generic/tclStringObj.c: Replace the 'size_t uallocated' field of the String struct, storing the number of bytes allocated to store the Tcl_UniChar array, with an 'int maxChars' field, storing the diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index df4e9fc..1bfe70d 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.107 2009/02/15 22:32:19 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.108 2009/02/15 23:13:11 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1249,18 +1249,10 @@ Tcl_AppendObjToObj( */ if (appendObjPtr->typePtr == &tclStringType) { - stringPtr = GET_STRING(appendObjPtr); - if (stringPtr->hasUnicode == 0) { - /* - * If appendObjPtr is a string obj with no valid Unicode rep, - * then fill its unicode rep. - */ + Tcl_UniChar *unicode = + Tcl_GetUnicodeFromObj(appendObjPtr, &numChars); - FillUnicodeRep(appendObjPtr); - stringPtr = GET_STRING(appendObjPtr); - } - AppendUnicodeToUnicodeRep(objPtr, stringPtr->unicode, - stringPtr->numChars); + AppendUnicodeToUnicodeRep(objPtr, unicode, numChars); } else { bytes = TclGetStringFromObj(appendObjPtr, &length); AppendUtfToUnicodeRep(objPtr, bytes, length); -- cgit v0.12 From 83b89e4cb82d0744ad11a21b568e43fc6398f605 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 16 Feb 2009 04:06:07 +0000 Subject: * generic/tclStringObj.c: Added protections from invalid memory * generic/tclTestObj.c: accesses when we append (some part of) * tests/stringObj.test: a Tcl_Obj to itself. Added the appendself and appendself2 subcommands to the [teststringobj] testing command and added tests to the test suite. [Bug 2603158] --- ChangeLog | 6 +++++ generic/tclStringObj.c | 36 +++++++++++++++++++++++--- generic/tclTestObj.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++-- tests/stringObj.test | 36 +++++++++++++++++++++++++- 4 files changed, 139 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c22914..e01210a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-02-15 Don Porter + * generic/tclStringObj.c: Added protections from invalid memory + * generic/tclTestObj.c: accesses when we append (some part of) + * tests/stringObj.test: a Tcl_Obj to itself. Added the + appendself and appendself2 subcommands to the [teststringobj] testing + command and added tests to the test suite. [Bug 2603158] + * generic/tclStringObj.c: Factor out duplicate code from Tcl_AppendObjToObj. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 1bfe70d..ecea7be 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.108 2009/02/15 23:13:11 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.109 2009/02/16 04:06:07 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1241,8 +1241,6 @@ Tcl_AppendObjToObj( * appendObjPtr and append it. */ - /* TODO: Check that append to self works */ - if (stringPtr->hasUnicode && stringPtr->numChars > 0) { /* * If appendObjPtr is not of the "String" type, don't convert it. @@ -1266,7 +1264,6 @@ Tcl_AppendObjToObj( * characters in the final (appended-to) object. */ - /* TODO: Check that append to self works */ bytes = TclGetStringFromObj(appendObjPtr, &length); numChars = stringPtr->numChars; @@ -1332,6 +1329,16 @@ AppendUnicodeToUnicodeRep( } if (numChars >= stringPtr->maxChars) { + /* + * Protect against case where unicode points into the existing + * stringPtr->unicode array. Force it to follow any relocations + * due to the reallocs below. + */ + int offset = -1; + if (unicode >= stringPtr->unicode + && unicode <= stringPtr->unicode + stringPtr->maxChars) { + offset = unicode - stringPtr->unicode; + } /* TODO: overflow check */ stringPtr->maxChars = 2 * numChars; @@ -1344,6 +1351,11 @@ AppendUnicodeToUnicodeRep( } stringPtr = tmpString; SET_STRING(objPtr, stringPtr); + + /* Relocate unicode if needed; see above. */ + if (offset >= 0) { + unicode = stringPtr->unicode + offset; + } } /* @@ -1484,6 +1496,17 @@ AppendUtfToUtfRep( * explanation of this growth algorithm. */ + /* + * Protect against case where unicode points into the existing + * stringPtr->unicode array. Force it to follow any relocations + * due to the reallocs below. + */ + int offset = -1; + if (bytes >= objPtr->bytes + && bytes <= objPtr->bytes + objPtr->length) { + offset = bytes - objPtr->bytes; + } + if (Tcl_AttemptSetObjLength(objPtr, 2 * newLength) == 0) { /* * Take care computing the amount of modest growth to avoid @@ -1495,6 +1518,11 @@ AppendUtfToUtfRep( Tcl_SetObjLength(objPtr, newLength + growth); } + + /* Relocate bytes if needed; see above. */ + if (offset >= 0) { + bytes = objPtr->bytes + offset; + } } /* diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index cc194b8..55aec66 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.32 2009/02/14 22:54:19 dgp Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.33 2009/02/16 04:06:08 dgp Exp $ */ #include "tclInt.h" @@ -989,13 +989,15 @@ TeststringobjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + Tcl_UniChar *unicode; int varIndex, option, i, length; #define MAX_STRINGS 11 const char *index, *string, *strings[MAX_STRINGS+1]; TestString *strPtr; static const char *const options[] = { "append", "appendstrings", "get", "get2", "length", "length2", - "set", "set2", "setlength", "ualloc", "getunicode", NULL + "set", "set2", "setlength", "ualloc", "getunicode", + "appendself", "appendself2", NULL }; if (objc < 3) { @@ -1167,6 +1169,68 @@ TeststringobjCmd( } Tcl_GetUnicodeFromObj(varPtr[varIndex], NULL); break; + case 11: /* appendself */ + if (objc != 4) { + goto wrongNumArgs; + } + if (varPtr[varIndex] == NULL) { + SetVarToObj(varIndex, Tcl_NewObj()); + } + + /* + * If the object bound to variable "varIndex" is shared, we must + * "copy on write" and append to a copy of the object. + */ + + if (Tcl_IsShared(varPtr[varIndex])) { + SetVarToObj(varIndex, Tcl_DuplicateObj(varPtr[varIndex])); + } + + string = Tcl_GetStringFromObj(varPtr[varIndex], &length); + + if (Tcl_GetIntFromObj(interp, objv[3], &i) != TCL_OK) { + return TCL_ERROR; + } + if ((i < 0) || (i > length)) { + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "index value out of range", -1)); + return TCL_ERROR; + } + + Tcl_AppendToObj(varPtr[varIndex], string + i, length - i); + Tcl_SetObjResult(interp, varPtr[varIndex]); + break; + case 12: /* appendself2 */ + if (objc != 4) { + goto wrongNumArgs; + } + if (varPtr[varIndex] == NULL) { + SetVarToObj(varIndex, Tcl_NewObj()); + } + + /* + * If the object bound to variable "varIndex" is shared, we must + * "copy on write" and append to a copy of the object. + */ + + if (Tcl_IsShared(varPtr[varIndex])) { + SetVarToObj(varIndex, Tcl_DuplicateObj(varPtr[varIndex])); + } + + unicode = Tcl_GetUnicodeFromObj(varPtr[varIndex], &length); + + if (Tcl_GetIntFromObj(interp, objv[3], &i) != TCL_OK) { + return TCL_ERROR; + } + if ((i < 0) || (i > length)) { + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "index value out of range", -1)); + return TCL_ERROR; + } + + Tcl_AppendUnicodeToObj(varPtr[varIndex], unicode + i, length - i); + Tcl_SetObjResult(interp, varPtr[varIndex]); + break; } return TCL_OK; diff --git a/tests/stringObj.test b/tests/stringObj.test index 8b38542..7489df2 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringObj.test,v 1.18 2009/01/29 22:14:56 dkf Exp $ +# RCS: @(#) $Id: stringObj.test,v 1.19 2009/02/16 04:06:08 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -439,6 +439,40 @@ test stringObj-14.1 {Tcl_SetObjLength on pure unicode object} testobj { teststringobj append 1 bar -1 teststringobj get 1 } {bar} + +test stringObj-15.1 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself 1 0 +} foofoo +test stringObj-15.2 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself 1 1 +} foooo +test stringObj-15.3 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself 1 2 +} fooo +test stringObj-15.4 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself 1 3 +} foo +test stringObj-15.5 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself2 1 0 +} foofoo +test stringObj-15.6 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself2 1 1 +} foooo +test stringObj-15.7 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself2 1 2 +} fooo +test stringObj-15.8 {Tcl_Append*ToObj: self appends} { + teststringobj set 1 foo + teststringobj appendself2 1 3 +} foo + if {[testConstraint testobj]} { testobj freeallvars -- cgit v0.12 From da4f0d06bf46a3ce2f768e602066d711bb8b5ba7 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 16 Feb 2009 04:33:10 +0000 Subject: * generic/tclTestObj.c: Replace the [teststringobj ualloc] testing * tests/stringObj.test: command with [teststringobj maxchars] and update the tests. --- ChangeLog | 3 +++ generic/tclTestObj.c | 10 +++++----- tests/stringObj.test | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e01210a..f0d0e3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,9 @@ number of Tcl_UniChars that may be stored in the allocated space. This reduces memory requirement a small bit, and makes some range checks simpler to code. + * generic/tclTestObj.c: Replace the [teststringobj ualloc] testing + * tests/stringObj.test: command with [teststringobj maxchars] and + update the tests. * generic/tclStringObj.c: Removed limitation in Tcl_AppendObjToObj where the char length of the result was only diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 55aec66..dba06f9 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.33 2009/02/16 04:06:08 dgp Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.34 2009/02/16 04:33:10 dgp Exp $ */ #include "tclInt.h" @@ -56,7 +56,7 @@ static int TeststringobjCmd(ClientData dummy, Tcl_Interp *interp, typedef struct TestString { int numChars; int allocated; - size_t uallocated; + int maxChars; Tcl_UniChar unicode[2]; } TestString; @@ -996,7 +996,7 @@ TeststringobjCmd( TestString *strPtr; static const char *const options[] = { "append", "appendstrings", "get", "get2", "length", "length2", - "set", "set2", "setlength", "ualloc", "getunicode", + "set", "set2", "setlength", "maxchars", "getunicode", "appendself", "appendself2", NULL }; @@ -1148,7 +1148,7 @@ TeststringobjCmd( Tcl_SetObjLength(varPtr[varIndex], length); } break; - case 9: /* ualloc */ + case 9: /* maxchars */ if (objc != 3) { goto wrongNumArgs; } @@ -1157,7 +1157,7 @@ TeststringobjCmd( Tcl_GetObjType("string")); strPtr = (TestString *) (varPtr[varIndex])->internalRep.otherValuePtr; - length = (int) strPtr->uallocated; + length = strPtr->maxChars; } else { length = -1; } diff --git a/tests/stringObj.test b/tests/stringObj.test index 7489df2..6b8e739 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringObj.test,v 1.19 2009/02/16 04:06:08 dgp Exp $ +# RCS: @(#) $Id: stringObj.test,v 1.20 2009/02/16 04:33:10 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -193,9 +193,9 @@ test stringObj-8.1 {DupStringInternalRep procedure} testobj { teststringobj append 1 abcde -1 testobj duplicate 1 2 list [teststringobj length 1] [teststringobj length2 1] \ - [teststringobj ualloc 1] [teststringobj get 1] \ + [teststringobj maxchars 1] [teststringobj get 1] \ [teststringobj length 2] [teststringobj length2 2] \ - [teststringobj ualloc 2] [teststringobj get 2] + [teststringobj maxchars 2] [teststringobj get 2] } {5 10 0 abcde 5 5 0 abcde} test stringObj-8.2 {DupUnicodeInternalRep, mixed width chars} testobj { set x abc\u00ef\u00bf\u00aeghi -- cgit v0.12 From eccf49ac252fc88532e302433a4cc5caef4ddd9f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 16 Feb 2009 21:41:55 +0000 Subject: fix [Bug 2605232] tdbc doesn't build when Tcl is compiled with --disable-shared. --- ChangeLog | 5 +++++ win/Makefile.in | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0d0e3d..69b90df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-10 Jan Nijtmans + + * win/Makefile.in fix [Bug 2605232] tdbc doesn't build when + Tcl is compiled with --disable-shared. + 2009-02-15 Don Porter * generic/tclStringObj.c: Added protections from invalid memory diff --git a/win/Makefile.in b/win/Makefile.in index 29097c2..ac0b052 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.148 2008/12/23 16:46:19 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.149 2009/02/16 21:41:56 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -143,7 +143,7 @@ PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX} SHARED_LIBRARIES = $(TCL_DLL_FILE) $(TCL_STUB_LIB_FILE) \ $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE) -STATIC_LIBRARIES = $(TCL_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) +STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) # TCL_EXE is the name of a tclsh executable that is available *BEFORE* running # make for the first time. Certain build targets (make genstubs) need it to be -- cgit v0.12 From 030c53711206ecdcbb31ae7d50b8dac10e53a8d6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 16 Feb 2009 22:56:14 +0000 Subject: fix [Feature Request 2605263] use official zlib build. --- ChangeLog | 9 +++- compat/zlib/win32/zdll.lib | Bin 0 -> 10590 bytes compat/zlib/win32/zlib1.dll | Bin 0 -> 59904 bytes generic/tclZlib.c | 112 ++++++++++++++++++++++++++++++++------------ win/Makefile.in | 17 ++++--- win/configure | 39 ++++++++++++++- win/configure.in | 18 ++++++- 7 files changed, 156 insertions(+), 39 deletions(-) create mode 100644 compat/zlib/win32/zdll.lib create mode 100644 compat/zlib/win32/zlib1.dll diff --git a/ChangeLog b/ChangeLog index 69b90df..3a1f7be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ -2009-02-10 Jan Nijtmans +2009-02-16 Jan Nijtmans + + * generic/tclZlib.c hack needed for official zlib1.dll build. + * win/configure.in fix [Feature Request 2605263] use official + * win/Makefile.in zlib build. + * win/configure (regenerated) + +2009-02-16 Jan Nijtmans * win/Makefile.in fix [Bug 2605232] tdbc doesn't build when Tcl is compiled with --disable-shared. diff --git a/compat/zlib/win32/zdll.lib b/compat/zlib/win32/zdll.lib new file mode 100644 index 0000000..01f4e10 Binary files /dev/null and b/compat/zlib/win32/zdll.lib differ diff --git a/compat/zlib/win32/zlib1.dll b/compat/zlib/win32/zlib1.dll new file mode 100644 index 0000000..1cf8a47 Binary files /dev/null and b/compat/zlib/win32/zlib1.dll differ diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 95de991..13d7e27 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,11 +13,21 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.23 2009/02/07 22:42:01 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.24 2009/02/16 22:56:14 nijtmans Exp $ */ #include "tclInt.h" #ifdef HAVE_ZLIB +#ifdef _WIN32 +# ifndef STATIC_BUILD +/* HACK needed for zlib1.dll version 1.2.3 on Win32. See comment below. + * As soon as zlib 1.2.4 is reasonable mainstream, remove this hack! */ +# include "../compat/zlib/zutil.h" +# include "../compat/zlib/inftrees.h" +# include "../compat/zlib/deflate.h" +# include "../compat/zlib/inflate.h" +# endif /* !STATIC_BUILD */ +#endif /* _WIN32 */ #include /* @@ -149,6 +159,48 @@ static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int mode, int format, int level, Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr); +#ifdef _WIN32 +# ifndef STATIC_BUILD + +/* + * zlib 1.2.3 on Windows has a bug that the functions deflateSetHeader and + * inflateGetHeader are not exported from the dll. Hopefully, this bug + * will be fixed in zlib 1.2.4 and higher. It is already reported to the + * zlib people. The functions deflateSetHeader and inflateGetHeader here + * are just copied from the zlib 1.2.3 source. This is dangerous, but works. + * In practice, the only fields used from the internal state are "wrap" and + * "head", which are rather at the beginning of the structure. As long as the + * offsets of those fields don't change, this code will continue to work. + */ +#define deflateSetHeader dsetheader +#define inflateGetHeader igetheader +static int +deflateSetHeader( + z_streamp strm, + gz_headerp head) +{ + struct internal_state *state; + if (strm == Z_NULL) return Z_STREAM_ERROR; + state = (struct internal_state *) strm->state; + if ((state == Z_NULL) || (state->wrap != 2)) return Z_STREAM_ERROR; + state->gzhead = head; + return Z_OK; +} +static int inflateGetHeader( + z_streamp strm, + gz_headerp head) +{ + struct inflate_state *state; + if (strm == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state *) strm->state; + if ((state == Z_NULL) || ((state->wrap & 2) == 0)) return Z_STREAM_ERROR; + state->head = head; + head->done = 0; + return Z_OK; +} +# endif /* !STATIC_BUILD */ +#endif /* _WIN32 */ + /* * Type of zlib-based compressing and decompressing channels. */ @@ -170,7 +222,7 @@ static const Tcl_ChannelType zlibChannelType = { NULL /*ChanHandler*/, NULL /* wideSeekProc */ }; - + /* *---------------------------------------------------------------------- * @@ -225,7 +277,7 @@ ConvertError( Tcl_SetErrorCode(interp, "TCL", "ZLIB", codeStr, codeStr2, NULL); } } - + /* *---------------------------------------------------------------------- * @@ -270,7 +322,7 @@ GenerateHeader( { Tcl_Obj *value; int len, result = TCL_ERROR; - char *valueStr; + const char *valueStr; Tcl_Encoding latin1enc; static const char *const types[] = { "binary", "text" @@ -346,7 +398,7 @@ GenerateHeader( Tcl_FreeEncoding(latin1enc); return result; } - + /* *---------------------------------------------------------------------- * @@ -437,7 +489,7 @@ ExtractHeader( Tcl_FreeEncoding(latin1enc); } } - + /* *---------------------------------------------------------------------- * @@ -628,7 +680,7 @@ Tcl_ZlibStreamInit( ckfree((char *) zshPtr); return TCL_ERROR; } - + /* *---------------------------------------------------------------------- * @@ -655,7 +707,7 @@ ZlibStreamCmdDelete( zshPtr->cmd = NULL; ZlibStreamCleanup(zshPtr); } - + /* *---------------------------------------------------------------------- * @@ -693,7 +745,7 @@ Tcl_ZlibStreamClose( } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -735,7 +787,7 @@ ZlibStreamCleanup( ckfree((char *) zshPtr); } - + /* *---------------------------------------------------------------------- * @@ -804,7 +856,7 @@ Tcl_ZlibStreamReset( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -838,7 +890,7 @@ Tcl_ZlibStreamGetCommandName( Tcl_GetCommandFullName(zshPtr->interp, zshPtr->cmd, objPtr); return objPtr; } - + /* *---------------------------------------------------------------------- * @@ -866,7 +918,7 @@ Tcl_ZlibStreamEof( return zshPtr->streamEnd; } - + /* *---------------------------------------------------------------------- * @@ -886,7 +938,7 @@ Tcl_ZlibStreamChecksum( return zshPtr->stream.adler; } - + /* *---------------------------------------------------------------------- * @@ -994,7 +1046,7 @@ Tcl_ZlibStreamPut( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1203,7 +1255,7 @@ Tcl_ZlibStreamGet( } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1358,7 +1410,7 @@ Tcl_ZlibDeflate( ConvertError(interp, e); return TCL_ERROR; } - + /* *---------------------------------------------------------------------- * @@ -1545,7 +1597,7 @@ Tcl_ZlibInflate( } return TCL_ERROR; } - + /* *---------------------------------------------------------------------- * @@ -1574,7 +1626,7 @@ Tcl_ZlibAdler32( { return adler32(adler, (Bytef *) buf, (unsigned) len); } - + /* *---------------------------------------------------------------------- * @@ -1699,7 +1751,7 @@ TclZlibCmd( } headerDictObj = NULL; for (i=3 ; ioutStream.avail_out; } @@ -2501,7 +2553,7 @@ ChanGetOption( Tcl_DecrRefCount(tmpObj); } else { int len; - char *str = Tcl_GetStringFromObj(tmpObj, &len); + const char *str = Tcl_GetStringFromObj(tmpObj, &len); Tcl_DStringAppend(dsPtr, str, len); Tcl_DecrRefCount(tmpObj); @@ -2570,7 +2622,7 @@ ChanHandler( return interestMask; } #endif - + /* *---------------------------------------------------------------------- * @@ -2707,7 +2759,7 @@ ZlibStackChannel( ckfree((char *) cd); return NULL; } - + /* *---------------------------------------------------------------------- * Finally, the TclZlibInit function. Used to install the zlib API. @@ -2733,7 +2785,7 @@ TclZlibInit( Tcl_CreateObjCommand(interp, "zlib", TclZlibCmd, 0, 0); return TCL_OK; } - + /* *---------------------------------------------------------------------- * Stubs used when a suitable zlib installation was not found during @@ -2850,7 +2902,7 @@ Tcl_ZlibAdler32( return 0; } #endif /* HAVE_ZLIB */ - + /* * Local Variables: * mode: c diff --git a/win/Makefile.in b/win/Makefile.in index ac0b052..343c3d3 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.149 2009/02/16 21:41:56 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.150 2009/02/16 22:56:14 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -135,13 +135,14 @@ TCL_DLL_FILE = @TCL_DLL_FILE@ TCL_STATIC_LIB_FILE = @TCL_STATIC_LIB_FILE@ TCL_IMPORT_LIB_FILE = @TCL_IMPORT_LIB_FILE@ TCL_LIB_FILE = @TCL_LIB_FILE@ +ZLIB_DLL_FILE = zlib1${DLLSUFFIX} DDE_DLL_FILE = tcldde$(DDEVER)${DLLSUFFIX} DDE_LIB_FILE = tcldde$(DDEVER)${LIBSUFFIX} REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX} REG_LIB_FILE = tclreg$(REGVER)${LIBSUFFIX} PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX} -SHARED_LIBRARIES = $(TCL_DLL_FILE) $(TCL_STUB_LIB_FILE) \ +SHARED_LIBRARIES = $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TCL_STUB_LIB_FILE) \ $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE) STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) @@ -182,7 +183,7 @@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ -LIBS = @LIBS@ +LIBS = @LIBS@ @ZLIB_LIBS@ RMDIR = rm -rf MKDIR = mkdir -p @@ -400,7 +401,7 @@ ZLIB_OBJS = \ Zuncompr.$(OBJEXT) \ Zzutil.$(OBJEXT) -TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} ${ZLIB_OBJS} +TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} @ZLIB_OBJS@ TCL_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n] @@ -436,7 +437,7 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} @MAKE_LIB@ ${STUB_OBJS} @POST_MAKE_LIB@ -${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} tcl.$(RES) +${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @$(RM) ${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE) @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) @@ -463,6 +464,10 @@ ${REG_LIB_FILE}: ${REG_OBJS} ${TCL_LIB_FILE} @$(RM) ${REG_LIB_FILE} @MAKE_LIB@ ${REG_OBJS} ${TCL_LIB_FILE} +# use pre-built zlib1.dll +${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} + @$(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE} + # PIPE_DLL_FILE is actually an executable, don't build it like a DLL. ${PIPE_DLL_FILE}: ${PIPE_OBJS} @@ -617,7 +622,7 @@ install-binaries: binaries else true; \ fi; \ done; - @for i in $(TCL_DLL_FILE) $(TCLSH) $(PIPE_DLL_FILE); \ + @for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TCLSH) $(PIPE_DLL_FILE); \ do \ if [ -f $$i ]; then \ echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \ diff --git a/win/configure b/win/configure index 399c326..819c2de 100755 --- a/win/configure +++ b/win/configure @@ -272,7 +272,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../generic/tcl.h" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3664,6 +3664,40 @@ _ACEOF # as we just assume that the platform hasn't got a usable z.lib #------------------------------------------------------------------------ +if test "$do64bit" = "yes"; then + + tcl_ok=no + +else + +if test "${enable_shared+set}" = "set"; then + + enableval="$enable_shared" + tcl_ok=$enableval + +else + + tcl_ok=yes + +fi + + +fi + +if test "$tcl_ok" = "yes"; then + + ZLIB_DLL_FILE=\${ZLIB_DLL_FILE} + + ZLIB_LIBS=\${ZLIB_DIR}/win32/zdll.lib + + +else + + ZLIB_OBJS=\${ZLIB_OBJS} + + +fi + cat >>confdefs.h <<\_ACEOF #define HAVE_ZLIB 1 @@ -5079,6 +5113,9 @@ s,@RANLIB@,$RANLIB,;t t s,@RC@,$RC,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@ZLIB_DLL_FILE@,$ZLIB_DLL_FILE,;t t +s,@ZLIB_LIBS@,$ZLIB_LIBS,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t s,@CYGPATH@,$CYGPATH,;t t s,@CELIB_DIR@,$CELIB_DIR,;t t s,@DL_LIBS@,$DL_LIBS,;t t diff --git a/win/configure.in b/win/configure.in index 33f40cc..5c8a3f7 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.116 2009/01/16 20:44:25 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.117 2009/02/16 22:56:14 nijtmans Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -343,6 +343,22 @@ SC_ENABLE_SHARED # as we just assume that the platform hasn't got a usable z.lib #------------------------------------------------------------------------ +AS_IF([test "$do64bit" = "yes"], [ + tcl_ok=no +], [ +AS_IF([test "${enable_shared+set}" = "set"], [ + enableval="$enable_shared" + tcl_ok=$enableval +], [ + tcl_ok=yes +]) +]) +AS_IF([test "$tcl_ok" = "yes"], [ + AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}]) + AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win32/zdll.lib]) +], [ + AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}]) +]) AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) #-------------------------------------------------------------------- -- cgit v0.12 From 6c8a61b4c4ced636c66d653d11459edac7232d74 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 16 Feb 2009 23:03:11 +0000 Subject: fix [Feature Request 2605263] use official zlib build. --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3a1f7be..b896f98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ * win/configure.in fix [Feature Request 2605263] use official * win/Makefile.in zlib build. * win/configure (regenerated) + * compat/zlib/zdll.lib new files + * compat/zlib/zlib1.dll 2009-02-16 Jan Nijtmans -- cgit v0.12 From 28f3aa0a8e86ea3ecd2e2699fa20fd08c6c22763 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 17 Feb 2009 06:52:05 +0000 Subject: * generic/tclStringObj.c: Revise buffer growth implementation in ExtendStringRepWithUnicode. Use cheap checks to determine that no reallocation is necessary without cost of computing the precise number of bytes needed. Also make use of the string growth algortihm in the case of repeated appends. --- ChangeLog | 22 ++++++++++++++-------- generic/tclStringObj.c | 45 ++++++++++++++++++++++++++++++++------------- 2 files changed, 46 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index b896f98..a51a52c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,21 @@ -2009-02-16 Jan Nijtmans +2009-02-17 Don Porter - * generic/tclZlib.c hack needed for official zlib1.dll build. - * win/configure.in fix [Feature Request 2605263] use official - * win/Makefile.in zlib build. - * win/configure (regenerated) - * compat/zlib/zdll.lib new files - * compat/zlib/zlib1.dll + * generic/tclStringObj.c: Revise buffer growth implementation + in ExtendStringRepWithUnicode. Use cheap checks to determine that + no reallocation is necessary without cost of computing the precise + number of bytes needed. Also make use of the string growth algortihm + in the case of repeated appends. 2009-02-16 Jan Nijtmans - * win/Makefile.in fix [Bug 2605232] tdbc doesn't build when + * generic/tclZlib.c: hack needed for official zlib1.dll build. + * win/configure.in: fix [Feature Request 2605263] use official + * win/Makefile.in: zlib build. + * win/configure: (regenerated) + * compat/zlib/zdll.lib: new files + * compat/zlib/zlib1.dll: + + * win/Makefile.in: fix [Bug 2605232] tdbc doesn't build when Tcl is compiled with --disable-shared. 2009-02-15 Don Porter diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index ecea7be..52e6019 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.109 2009/02/16 04:06:07 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.110 2009/02/17 06:52:05 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2897,7 +2897,7 @@ ExtendStringRepWithUnicode( const Tcl_UniChar *unicode, int numChars) { - int i, size = 0; + int i, origLength, size = 0; char *dst, buf[TCL_UTF_MAX]; /* Pre-condition: this is the "string" Tcl_ObjType */ @@ -2918,12 +2918,13 @@ ExtendStringRepWithUnicode( } else { objPtr->length = 0; } + origLength = objPtr->length; - /* - * TODO: Consider fast overallocation of numChars*TCL_UTF_MAX bytes. - * Then we could make one pass instead of two. Trade away memory - * efficiency for speed. - */ + /* Quick cheap check in case we have more than enough room. */ + if (numChars <= (INT_MAX - size)/TCL_UTF_MAX + && stringPtr->allocated >= size + numChars * TCL_UTF_MAX) { + goto copyBytes; + } for (i = 0; i < numChars && size >= 0; i++) { size += Tcl_UniCharToUtf((int) unicode[i], buf); @@ -2934,16 +2935,34 @@ ExtendStringRepWithUnicode( /* Grow space if needed */ if (size > stringPtr->allocated) { - /* TODO: Growth algorithm for appends ? */ - objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) size+1); - stringPtr->allocated = size; + if (stringPtr->allocated == 0) { + /* First allocation - just big enough */ + objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) size+1); + stringPtr->allocated = size; + } else { + /* Subsequent appends - apply the growth algorithm. */ + if (Tcl_AttemptSetObjLength(objPtr, 2 * size) == 0) { + /* + * Take care computing the amount of modest growth to avoid + * overflow into invalid argument values for Tcl_SetObjLength. + */ + unsigned int limit = INT_MAX - size; + unsigned int extra = size - objPtr->length + + TCL_GROWTH_MIN_ALLOC; + int growth = (int) ((extra > limit) ? limit : extra); + + Tcl_SetObjLength(objPtr, size + growth); + } + } } - dst = objPtr->bytes + objPtr->length; + + copyBytes: + dst = objPtr->bytes + origLength; for (i = 0; i < numChars; i++) { dst += Tcl_UniCharToUtf((int) unicode[i], dst); } - objPtr->length = size; - objPtr->bytes[size] = '\0'; + *dst = '\0'; + objPtr->length = dst - objPtr->bytes; return numChars; } -- cgit v0.12 From f48011341a542c319bbdae8fa307edc8d5c4efa2 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 17 Feb 2009 17:17:32 +0000 Subject: * generic/tclStringObj.c: Factor out common GrowStringBuffer(). * generic/tclStringObj.c: Convert Tcl_AppendStringsToObj into * tests/stringObj.test: a radically simpler implementation where we just loop over calls to Tcl_AppendToObj. This fixes [Bug 2597185]. It also creates a *** POTENTIAL INCOMPATIBILITY *** in that T_ASTO can now allocate more space than is strictly required, like all the other Tcl_Append* routines. The incompatibility was detected by test stringObj-6.5, which I've updated to reflect the new behavior. --- ChangeLog | 11 +++ generic/tclStringObj.c | 197 ++++++++++++------------------------------------- tests/stringObj.test | 4 +- 3 files changed, 60 insertions(+), 152 deletions(-) diff --git a/ChangeLog b/ChangeLog index a51a52c..5fa916a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2009-02-17 Don Porter + * generic/tclStringObj.c: Factor out common GrowStringBuffer(). + + * generic/tclStringObj.c: Convert Tcl_AppendStringsToObj into + * tests/stringObj.test: a radically simpler implementation + where we just loop over calls to Tcl_AppendToObj. This fixes [Bug + 2597185]. It also creates a *** POTENTIAL INCOMPATIBILITY *** in + that T_ASTO can now allocate more space than is strictly required, + like all the other Tcl_Append* routines. The incompatibility was + detected by test stringObj-6.5, which I've updated to reflect the + new behavior. + * generic/tclStringObj.c: Revise buffer growth implementation in ExtendStringRepWithUnicode. Use cheap checks to determine that no reallocation is necessary without cost of computing the precise diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 52e6019..ad8ec05 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.110 2009/02/17 06:52:05 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.111 2009/02/17 17:17:32 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -61,6 +61,7 @@ static void ExtendUnicodeRepWithString(Tcl_Obj *objPtr, int numAppendChars); static void FillUnicodeRep(Tcl_Obj *objPtr); static void FreeStringInternalRep(Tcl_Obj *objPtr); +static void GrowStringBuffer(Tcl_Obj *objPtr, int needed, int flag); static int SetStringFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); @@ -189,6 +190,43 @@ typedef struct String { #ifndef TCL_GROWTH_MIN_ALLOC #define TCL_GROWTH_MIN_ALLOC 1024 #endif + +static void +GrowStringBuffer( + Tcl_Obj *objPtr, + int needed, + int flag) +{ + /* Pre-conditions: + * objPtr->typePtr == &tclStringType + * needed > stringPtr->allocated + * flag || objPtr->bytes != NULL + */ + String *stringPtr = GET_STRING(objPtr); + + if (flag && stringPtr->allocated == 0) { + /* First allocation - just big enough */ + if (objPtr->bytes == tclEmptyStringRep) { + objPtr->bytes = ckalloc((unsigned) needed + 1); + } else { + objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) needed + 1); + } + stringPtr->allocated = needed; + } else { + /* Subsequent appends - apply the growth algorithm. */ + if (Tcl_AttemptSetObjLength(objPtr, 2 * needed) == 0) { + /* + * Take care computing the amount of modest growth to avoid + * overflow into invalid argument values for Tcl_SetObjLength. + */ + unsigned int limit = INT_MAX - needed; + unsigned int extra = needed - objPtr->length + TCL_GROWTH_MIN_ALLOC; + int growth = (int) ((extra > limit) ? limit : extra); + + Tcl_SetObjLength(objPtr, needed + growth); + } + } +} /* *---------------------------------------------------------------------- @@ -1489,14 +1527,6 @@ AppendUtfToUtfRep( stringPtr = GET_STRING(objPtr); if (newLength > stringPtr->allocated) { /* - * There isn't currently enough space in the string representation so - * allocate additional space. First, try to double the length - * required. If that fails, try a more modest allocation. See the "TCL - * STRING GROWTH ALGORITHM" comment at the top of this file for an - * explanation of this growth algorithm. - */ - - /* * Protect against case where unicode points into the existing * stringPtr->unicode array. Force it to follow any relocations * due to the reallocs below. @@ -1507,17 +1537,9 @@ AppendUtfToUtfRep( offset = bytes - objPtr->bytes; } - if (Tcl_AttemptSetObjLength(objPtr, 2 * newLength) == 0) { - /* - * Take care computing the amount of modest growth to avoid - * overflow into invalid argument values for Tcl_SetObjLength. - */ - unsigned int limit = INT_MAX - newLength; - unsigned int extra = numBytes + TCL_GROWTH_MIN_ALLOC; - int growth = (int) ((extra > limit) ? limit : extra); - - Tcl_SetObjLength(objPtr, newLength + growth); - } + /* TODO: consider passing flag=1: no overalloc on first append. + * This would make test stringObj-8.1 fail.*/ + GrowStringBuffer(objPtr, newLength, 0); /* Relocate bytes if needed; see above. */ if (offset >= 0) { @@ -1536,6 +1558,7 @@ AppendUtfToUtfRep( objPtr->bytes[newLength] = 0; objPtr->length = newLength; } + /* *---------------------------------------------------------------------- @@ -1560,125 +1583,17 @@ Tcl_AppendStringsToObjVA( Tcl_Obj *objPtr, /* Points to the object to append to. */ va_list argList) /* Variable argument list. */ { -#define STATIC_LIST_SIZE 16 - String *stringPtr; - int newLength, oldLength, attemptLength; - char *string, *dst; - char *static_list[STATIC_LIST_SIZE]; - char **args = static_list; - int nargs_space = STATIC_LIST_SIZE; - int nargs, i; - if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_AppendStringsToObj"); } - SetStringFromAny(NULL, objPtr); - - /* - * Figure out how much space is needed for all the strings, and expand the - * string representation if it isn't big enough. If no bytes would be - * appended, just return. Note that on some platforms (notably OS/390) the - * argList is an array so we need to use memcpy. - */ - - nargs = 0; - newLength = 0; - oldLength = objPtr->length; while (1) { - string = va_arg(argList, char *); - if (string == NULL) { + const char *bytes = va_arg(argList, char *); + if (bytes == NULL) { break; } - if (nargs >= nargs_space) { - /* - * Expand the args buffer. - */ - - nargs_space += STATIC_LIST_SIZE; - if (args == static_list) { - args = (void *) ckalloc(nargs_space * sizeof(char *)); - for (i = 0; i < nargs; ++i) { - args[i] = static_list[i]; - } - } else { - args = (void *) ckrealloc((void *) args, - nargs_space * sizeof(char *)); - } - } - newLength += strlen(string); - args[nargs++] = string; - } - if (newLength == 0) { - goto done; - } - - stringPtr = GET_STRING(objPtr); - /* TODO: pure unicode will crash! */ - if (oldLength + newLength > stringPtr->allocated) { - /* - * There isn't currently enough space in the string representation, so - * allocate additional space. If the current string representation - * isn't empty (i.e. it looks like we're doing a series of appends) - * then try to allocate extra space to accomodate future growth: first - * try to double the required memory; if that fails, try a more modest - * allocation. See the "TCL STRING GROWTH ALGORITHM" comment at the - * top of this file for an explanation of this growth algorithm. - * Otherwise, if the current string representation is empty, exactly - * enough memory is allocated. - */ - - if (oldLength == 0) { - Tcl_SetObjLength(objPtr, newLength); - } else { - attemptLength = 2 * (oldLength + newLength); - if (Tcl_AttemptSetObjLength(objPtr, attemptLength) == 0) { - attemptLength = oldLength + (2 * newLength) + - TCL_GROWTH_MIN_ALLOC; - Tcl_SetObjLength(objPtr, attemptLength); - } - } + Tcl_AppendToObj(objPtr, bytes, -1); } - - /* - * Make a second pass through the arguments, appending all the strings to - * the object. - */ - - dst = objPtr->bytes + oldLength; - for (i = 0; i < nargs; ++i) { - string = args[i]; - if (string == NULL) { - break; - } - while (*string != 0) { - *dst = *string; - dst++; - string++; - } - } - - /* - * Add a null byte to terminate the string. However, be careful: it's - * possible that the object is totally empty (if it was empty originally - * and there was nothing to append). In this case dst is NULL; just leave - * everything alone. - */ - - if (dst != NULL) { - *dst = 0; - } - objPtr->length = oldLength + newLength; - - done: - /* - * If we had to allocate a buffer from the heap, free it now. - */ - - if (args != static_list) { - ckfree((char *) args); - } -#undef STATIC_LIST_SIZE } /* @@ -2935,25 +2850,7 @@ ExtendStringRepWithUnicode( /* Grow space if needed */ if (size > stringPtr->allocated) { - if (stringPtr->allocated == 0) { - /* First allocation - just big enough */ - objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) size+1); - stringPtr->allocated = size; - } else { - /* Subsequent appends - apply the growth algorithm. */ - if (Tcl_AttemptSetObjLength(objPtr, 2 * size) == 0) { - /* - * Take care computing the amount of modest growth to avoid - * overflow into invalid argument values for Tcl_SetObjLength. - */ - unsigned int limit = INT_MAX - size; - unsigned int extra = size - objPtr->length - + TCL_GROWTH_MIN_ALLOC; - int growth = (int) ((extra > limit) ? limit : extra); - - Tcl_SetObjLength(objPtr, size + growth); - } - } + GrowStringBuffer(objPtr, size, 1); } copyBytes: diff --git a/tests/stringObj.test b/tests/stringObj.test index 6b8e739..057d8e8 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringObj.test,v 1.20 2009/02/16 04:33:10 dgp Exp $ +# RCS: @(#) $Id: stringObj.test,v 1.21 2009/02/17 17:17:32 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -136,7 +136,7 @@ test stringObj-6.5 {Tcl_AppendStringsToObj procedure, don't double space if init testobj newobj 1 teststringobj appendstrings 1 123 abcdefg list [teststringobj length 1] [teststringobj length2 1] [teststringobj get 1] -} {10 10 123abcdefg} +} {10 20 123abcdefg} test stringObj-6.6 {Tcl_AppendStringsToObj procedure, space reallocation} testobj { testobj freeallvars teststringobj set 1 abc -- cgit v0.12 From 17a25327f7cbb0069baa3dbfa9cc989dc39541a3 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 17 Feb 2009 18:10:37 +0000 Subject: * win/tcl.m4, win/configure: Check if cl groks _WIN64 already to avoid CC manipulation that can screw up later configure checks. Use 'd'ebug runtime in 64-bit builds. --- ChangeLog | 6 ++ win/configure | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- win/tcl.m4 | 10 +++- 3 files changed, 189 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fa916a..2fe7864 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-17 Jeff Hobbs + + * win/tcl.m4, win/configure: Check if cl groks _WIN64 already to + avoid CC manipulation that can screw up later configure checks. + Use 'd'ebug runtime in 64-bit builds. + 2009-02-17 Don Porter * generic/tclStringObj.c: Factor out common GrowStringBuffer(). diff --git a/win/configure b/win/configure index 819c2de..b71451d 100755 --- a/win/configure +++ b/win/configure @@ -272,6 +272,43 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../generic/tcl.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -3710,6 +3747,78 @@ _ACEOF # after SC_ENABLE_SHARED checks the configure switches. #-------------------------------------------------------------------- +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + # Step 0: Enable 64 bit support? @@ -4028,10 +4137,74 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the # TEA_PATH_NOSPACE to avoid this issue. - CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ - -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" + # Check if _WIN64 is already recognized, and if so we don't + # need to modify CC. + echo "$as_me:$LINENO: checking whether _WIN64 is declared" >&5 +echo $ECHO_N "checking whether _WIN64 is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl__WIN64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef _WIN64 + char *p = (char *) _WIN64; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl__WIN64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl__WIN64=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl__WIN64" >&5 +echo "${ECHO_T}$ac_cv_have_decl__WIN64" >&6 +if test $ac_cv_have_decl__WIN64 = yes; then + : +else + CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ + -I\"${MSSDK}/Include/crt\" \ + -I\"${MSSDK}/Include/crt/sys\"" +fi + RC="\"${MSSDK}/bin/rc.exe\"" - CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}" + CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" diff --git a/win/tcl.m4 b/win/tcl.m4 index 1a46527..4b55dc4 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -619,10 +619,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the # TEA_PATH_NOSPACE to avoid this issue. - CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ - -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" + # Check if _WIN64 is already recognized, and if so we don't + # need to modify CC. + AC_CHECK_DECL([_WIN64], [], + [CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ + -I\"${MSSDK}/Include/crt\" \ + -I\"${MSSDK}/Include/crt/sys\""]) RC="\"${MSSDK}/bin/rc.exe\"" - CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}" + CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" -- cgit v0.12 From 2a06ac14dadfef67de933e930cfec32263642fef Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 17 Feb 2009 21:05:41 +0000 Subject: * generic/tclStringObj.c: Factor out common GrowUnicodeBuffer() and solve overflow and growth algorithm fallbacks in it. --- ChangeLog | 3 ++ generic/tclStringObj.c | 95 +++++++++++++++++++++++++++----------------------- 2 files changed, 54 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2fe7864..fb11b08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ 2009-02-17 Don Porter + * generic/tclStringObj.c: Factor out common GrowUnicodeBuffer() + and solve overflow and growth algorithm fallbacks in it. + * generic/tclStringObj.c: Factor out common GrowStringBuffer(). * generic/tclStringObj.c: Convert Tcl_AppendStringsToObj into diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index ad8ec05..d79a565 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.111 2009/02/17 17:17:32 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.112 2009/02/17 21:05:41 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -62,6 +62,7 @@ static void ExtendUnicodeRepWithString(Tcl_Obj *objPtr, static void FillUnicodeRep(Tcl_Obj *objPtr); static void FreeStringInternalRep(Tcl_Obj *objPtr); static void GrowStringBuffer(Tcl_Obj *objPtr, int needed, int flag); +static void GrowUnicodeBuffer(Tcl_Obj *objPtr, int needed); static int SetStringFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void SetUnicodeObj(Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); @@ -227,6 +228,47 @@ GrowStringBuffer( } } } + +static void +GrowUnicodeBuffer( + Tcl_Obj *objPtr, + int needed) +{ + /* Pre-conditions: + * objPtr->typePtr == &tclStringType + * needed > stringPtr->maxChars + */ + String *ptr = NULL, *stringPtr = GET_STRING(objPtr); + int attempt; + + if (stringPtr->maxChars > 0) { + /* Subsequent appends - apply the growth algorithm. */ + attempt = 2 * needed; + if (attempt >= 0) { + ptr = stringAttemptRealloc(stringPtr, STRING_UALLOC(attempt)); + } + if (ptr == NULL) { + /* + * Take care computing the amount of modest growth to avoid + * overflow into invalid argument values for attempt. + */ + unsigned int limit = INT_MAX - needed; + unsigned int extra = needed - stringPtr->numChars + + TCL_GROWTH_MIN_ALLOC; + int growth = (int) ((extra > limit) ? limit : extra); + attempt = needed + growth; + ptr = stringAttemptRealloc(stringPtr, STRING_UALLOC(attempt)); + } + } + if (ptr == NULL) { + /* First allocation - just big enough; or last chance fallback. */ + attempt = needed; + ptr = stringRealloc(stringPtr, STRING_UALLOC(attempt)); + } + stringPtr = ptr; + stringPtr->maxChars = attempt; + SET_STRING(objPtr, stringPtr); +} /* *---------------------------------------------------------------------- @@ -1340,7 +1382,7 @@ AppendUnicodeToUnicodeRep( const Tcl_UniChar *unicode, /* String to append. */ int appendNumChars) /* Number of chars of "unicode" to append. */ { - String *stringPtr, *tmpString; + String *stringPtr; int numChars; if (appendNumChars < 0) { @@ -1366,7 +1408,7 @@ AppendUnicodeToUnicodeRep( Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); } - if (numChars >= stringPtr->maxChars) { + if (numChars > stringPtr->maxChars) { /* * Protect against case where unicode points into the existing * stringPtr->unicode array. Force it to follow any relocations @@ -1378,17 +1420,8 @@ AppendUnicodeToUnicodeRep( offset = unicode - stringPtr->unicode; } - /* TODO: overflow check */ - stringPtr->maxChars = 2 * numChars; - tmpString = stringAttemptRealloc(stringPtr, - STRING_UALLOC(2 * numChars)); - if (tmpString == NULL) { - stringPtr->maxChars = numChars + appendNumChars - + TCL_GROWTH_MIN_ALLOC/sizeof(Tcl_UniChar); - tmpString = stringRealloc(stringPtr, STRING_UALLOC(stringPtr->maxChars)); - } - stringPtr = tmpString; - SET_STRING(objPtr, stringPtr); + GrowUnicodeBuffer(objPtr, numChars); + stringPtr = GET_STRING(objPtr); /* Relocate unicode if needed; see above. */ if (offset >= 0) { @@ -2630,30 +2663,8 @@ ExtendUnicodeRepWithString( } if (needed > stringPtr->maxChars) { - /* - * If not enough space has been allocated for the unicode rep, - * reallocate the internal rep object. - * - * There isn't currently enough space in the Unicode representation so - * allocate additional space. If the current Unicode representation - * isn't empty (i.e. it looks like we've done some appends) then - * overallocate the space so that we won't have to do as much - * reallocation in the future. - */ - int growChars = needed; - - if (stringPtr->maxChars > 0) { - if (growChars <= INT_MAX/2) { - growChars *= 2; - } else { - growChars = INT_MAX; - } - } - /* TODO: proper fallback */ - stringPtr = stringRealloc(stringPtr, STRING_UALLOC(growChars)); - stringPtr->maxChars = growChars; - - SET_STRING(objPtr, stringPtr); + GrowUnicodeBuffer(objPtr, needed); + stringPtr = GET_STRING(objPtr); } stringPtr->hasUnicode = 1; @@ -2826,14 +2837,10 @@ ExtendStringRepWithUnicode( return 0; } - if (objPtr->bytes == tclEmptyStringRep) { - objPtr->bytes = NULL; - } else if (objPtr->bytes) { - size = objPtr->length; - } else { + if (objPtr->bytes == NULL) { objPtr->length = 0; } - origLength = objPtr->length; + size = origLength = objPtr->length; /* Quick cheap check in case we have more than enough room. */ if (numChars <= (INT_MAX - size)/TCL_UTF_MAX -- cgit v0.12 From 72ccff69bc0257f9100758149d569b6299654067 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 17 Feb 2009 21:40:48 +0000 Subject: * generic/tclStringObj.c: Pare back the length of the unicode array in a non-extended String struct to one Tcl_UniChar, meant to hold the terminating NUL character. Non-empty unicode strings are then stored by extending the String struct by stringPtr->maxChars additional slots in that array with sizeof(Tcl_UniChar) bytes per slot. This revision makes the allocation macros much simpler. --- ChangeLog | 7 +++++++ generic/tclStringObj.c | 22 ++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb11b08..7509a02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,13 @@ 2009-02-17 Don Porter + * generic/tclStringObj.c: Pare back the length of the unicode + array in a non-extended String struct to one Tcl_UniChar, meant to + hold the terminating NUL character. Non-empty unicode strings are + then stored by extending the String struct by stringPtr->maxChars + additional slots in that array with sizeof(Tcl_UniChar) bytes per slot. + This revision makes the allocation macros much simpler. + * generic/tclStringObj.c: Factor out common GrowUnicodeBuffer() and solve overflow and growth algorithm fallbacks in it. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index d79a565..a4968d6 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.112 2009/02/17 21:05:41 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.113 2009/02/17 21:40:48 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -109,7 +109,7 @@ typedef struct String { * space allocated for the unicode array. */ int hasUnicode; /* Boolean determining whether the string has * a Unicode representation. */ - Tcl_UniChar unicode[2]; /* The array of Unicode chars. The actual size + Tcl_UniChar unicode[1]; /* The array of Unicode chars. The actual size * of this field depends on the 'maxChars' * field above. */ } String; @@ -117,25 +117,23 @@ typedef struct String { #define STRING_UALLOC(numChars) \ ((numChars) * sizeof(Tcl_UniChar)) #define STRING_SIZE(numBytes) \ - (sizeof(String) - sizeof(Tcl_UniChar) + (numBytes)) + (sizeof(String) + (numBytes)) #define STRING_NOMEM(numBytes) \ (Tcl_Panic("unable to alloc %u bytes", STRING_SIZE(numBytes)), \ (char *) NULL) #define stringAlloc(numBytes) \ - (String *) (((numBytes) > INT_MAX - STRING_SIZE(0)) \ + (String *) (((numBytes) > INT_MAX - sizeof(String)) \ ? STRING_NOMEM(numBytes) \ - : ckalloc((unsigned) STRING_SIZE( \ - (numBytes) ? (numBytes) : sizeof(Tcl_UniChar)) )) + : ckalloc((unsigned) STRING_SIZE(numBytes) )) #define stringRealloc(ptr, numBytes) \ - (String *) (((numBytes) > INT_MAX - STRING_SIZE(0)) \ + (String *) (((numBytes) > INT_MAX - sizeof(String)) \ ? STRING_NOMEM(numBytes) \ - : ckrealloc((char *) ptr, (unsigned) STRING_SIZE( \ - (numBytes) ? (numBytes) : sizeof(Tcl_UniChar)) )) + : ckrealloc((char *) ptr, (unsigned) STRING_SIZE(numBytes) )) #define stringAttemptRealloc(ptr, numBytes) \ - (String *) (((numBytes) > INT_MAX - STRING_SIZE(0)) \ + (String *) (((numBytes) > INT_MAX - sizeof(String)) \ ? NULL \ - : attemptckrealloc((char *) ptr, (unsigned) STRING_SIZE( \ - (numBytes) ? (numBytes) : sizeof(Tcl_UniChar)) )) + : attemptckrealloc((char *) ptr, \ + (unsigned) STRING_SIZE(numBytes) )) #define GET_STRING(objPtr) \ ((String *) (objPtr)->internalRep.otherValuePtr) #define SET_STRING(objPtr, stringPtr) \ -- cgit v0.12 From ad462a089c2e63335f6aaab5365e1351b17c2d46 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 18 Feb 2009 06:26:01 +0000 Subject: * generic/tclStringObj.c: Another round of simplification on the allocation macros. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 54 +++++++++++++++++++++++--------------------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7509a02..f852e57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-18 Don Porter + + * generic/tclStringObj.c: Another round of simplification on + the allocation macros. + 2009-02-17 Jeff Hobbs * win/tcl.m4, win/configure: Check if cl groks _WIN64 already to diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index a4968d6..cb7429c 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.113 2009/02/17 21:40:48 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.114 2009/02/18 06:26:01 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -114,26 +114,22 @@ typedef struct String { * field above. */ } String; -#define STRING_UALLOC(numChars) \ - ((numChars) * sizeof(Tcl_UniChar)) -#define STRING_SIZE(numBytes) \ - (sizeof(String) + (numBytes)) -#define STRING_NOMEM(numBytes) \ - (Tcl_Panic("unable to alloc %u bytes", STRING_SIZE(numBytes)), \ +#define STRING_MAXCHARS \ + (((size_t)UINT_MAX - sizeof(String))/sizeof(Tcl_UniChar)) +#define STRING_SIZE(numChars) \ + (sizeof(String) + ((numChars) * sizeof(Tcl_UniChar))) +#define STRING_NOMEM(numChars) \ + (Tcl_Panic("unable to alloc %u bytes", STRING_SIZE(numChars)), \ (char *) NULL) -#define stringAlloc(numBytes) \ - (String *) (((numBytes) > INT_MAX - sizeof(String)) \ - ? STRING_NOMEM(numBytes) \ - : ckalloc((unsigned) STRING_SIZE(numBytes) )) -#define stringRealloc(ptr, numBytes) \ - (String *) (((numBytes) > INT_MAX - sizeof(String)) \ - ? STRING_NOMEM(numBytes) \ - : ckrealloc((char *) ptr, (unsigned) STRING_SIZE(numBytes) )) -#define stringAttemptRealloc(ptr, numBytes) \ - (String *) (((numBytes) > INT_MAX - sizeof(String)) \ - ? NULL \ - : attemptckrealloc((char *) ptr, \ - (unsigned) STRING_SIZE(numBytes) )) +#define stringAlloc(numChars) \ + (String *) ( ((numChars) > STRING_MAXCHARS) ? STRING_NOMEM(numChars) \ + : ckalloc((unsigned) STRING_SIZE(numChars) )) +#define stringRealloc(ptr, numChars) \ + (String *) ( ((numChars) > STRING_MAXCHARS) ? STRING_NOMEM(numChars) \ + : ckrealloc((char *) ptr, (unsigned) STRING_SIZE(numChars) )) +#define stringAttemptRealloc(ptr, numChars) \ + (String *) ( ((numChars) > STRING_MAXCHARS) ? NULL \ + : attemptckrealloc((char *) ptr, (unsigned) STRING_SIZE(numChars) )) #define GET_STRING(objPtr) \ ((String *) (objPtr)->internalRep.otherValuePtr) #define SET_STRING(objPtr, stringPtr) \ @@ -243,7 +239,7 @@ GrowUnicodeBuffer( /* Subsequent appends - apply the growth algorithm. */ attempt = 2 * needed; if (attempt >= 0) { - ptr = stringAttemptRealloc(stringPtr, STRING_UALLOC(attempt)); + ptr = stringAttemptRealloc(stringPtr, attempt); } if (ptr == NULL) { /* @@ -255,13 +251,13 @@ GrowUnicodeBuffer( + TCL_GROWTH_MIN_ALLOC; int growth = (int) ((extra > limit) ? limit : extra); attempt = needed + growth; - ptr = stringAttemptRealloc(stringPtr, STRING_UALLOC(attempt)); + ptr = stringAttemptRealloc(stringPtr, attempt); } } if (ptr == NULL) { /* First allocation - just big enough; or last chance fallback. */ attempt = needed; - ptr = stringRealloc(stringPtr, STRING_UALLOC(attempt)); + ptr = stringRealloc(stringPtr, attempt); } stringPtr = ptr; stringPtr->maxChars = attempt; @@ -853,7 +849,7 @@ Tcl_SetObjLength( if (length > stringPtr->maxChars) { - stringPtr = stringRealloc(stringPtr, STRING_UALLOC(length)); + stringPtr = stringRealloc(stringPtr, length); SET_STRING(objPtr, stringPtr); stringPtr->maxChars = length; } @@ -978,7 +974,7 @@ Tcl_AttemptSetObjLength( */ if (length > stringPtr->maxChars) { - stringPtr = stringAttemptRealloc(stringPtr, STRING_UALLOC(length)); + stringPtr = stringAttemptRealloc(stringPtr, length); if (stringPtr == NULL) { return 0; } @@ -1070,7 +1066,7 @@ SetUnicodeObj( * Allocate enough space for the String structure + Unicode string. */ - stringPtr = stringAlloc(STRING_UALLOC(numChars)); + stringPtr = stringAlloc(numChars); SET_STRING(objPtr, stringPtr); objPtr->typePtr = &tclStringType; @@ -2716,7 +2712,7 @@ DupStringInternalRep( /* Copy the full allocation for the Unicode buffer. */ /* TODO: consider a more limited copy to the min of * the current maxChars value and twice the current numChars */ - copyStringPtr = stringAlloc(STRING_UALLOC(srcStringPtr->maxChars)); + copyStringPtr = stringAlloc(srcStringPtr->maxChars); copyStringPtr->maxChars = srcStringPtr->maxChars; memcpy(copyStringPtr->unicode, srcStringPtr->unicode, srcStringPtr->numChars * sizeof(Tcl_UniChar)); @@ -2724,7 +2720,7 @@ DupStringInternalRep( copyStringPtr->allocated = 0; } else { /* TODO: consider not bothering to make a String intrep. */ - copyStringPtr = (String *) ckalloc((unsigned) sizeof(String)); + copyStringPtr = stringAlloc(0); copyStringPtr->unicode[0] = 0; copyStringPtr->maxChars = 0; /* @@ -2764,7 +2760,7 @@ SetStringFromAny( Tcl_Obj *objPtr) /* The object to convert. */ { if (objPtr->typePtr != &tclStringType) { - String *stringPtr = (String *) ckalloc((unsigned) sizeof(String)); + String *stringPtr = stringAlloc(0); /* * Convert whatever we have into an untyped value. Just A String. -- cgit v0.12 From a0395ee4d5dd6b0c16c1ed5ce76395a28572f407 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 18 Feb 2009 17:45:35 +0000 Subject: * generic/tclStringObj.c: Another round of simplification on the allocation macros. --- generic/tclStringObj.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index cb7429c..5707c50 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.114 2009/02/18 06:26:01 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.115 2009/02/18 17:45:35 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -118,18 +118,18 @@ typedef struct String { (((size_t)UINT_MAX - sizeof(String))/sizeof(Tcl_UniChar)) #define STRING_SIZE(numChars) \ (sizeof(String) + ((numChars) * sizeof(Tcl_UniChar))) -#define STRING_NOMEM(numChars) \ - (Tcl_Panic("unable to alloc %u bytes", STRING_SIZE(numChars)), \ - (char *) NULL) +#define stringCheckLimits(numChars) \ + if ((numChars) < 0 || (numChars) > STRING_MAXCHARS) { \ + Tcl_Panic("max length for a Tcl unicode value (%d chars) exceeded", \ + STRING_MAXCHARS); \ + } #define stringAlloc(numChars) \ - (String *) ( ((numChars) > STRING_MAXCHARS) ? STRING_NOMEM(numChars) \ - : ckalloc((unsigned) STRING_SIZE(numChars) )) + (String *) ckalloc((unsigned) STRING_SIZE(numChars) ) #define stringRealloc(ptr, numChars) \ - (String *) ( ((numChars) > STRING_MAXCHARS) ? STRING_NOMEM(numChars) \ - : ckrealloc((char *) ptr, (unsigned) STRING_SIZE(numChars) )) + (String *) ckrealloc((char *) ptr, (unsigned) STRING_SIZE(numChars) ) #define stringAttemptRealloc(ptr, numChars) \ - (String *) ( ((numChars) > STRING_MAXCHARS) ? NULL \ - : attemptckrealloc((char *) ptr, (unsigned) STRING_SIZE(numChars) )) + (String *) attemptckrealloc((char *) ptr, \ + (unsigned) STRING_SIZE(numChars) ) #define GET_STRING(objPtr) \ ((String *) (objPtr)->internalRep.otherValuePtr) #define SET_STRING(objPtr, stringPtr) \ @@ -231,6 +231,7 @@ GrowUnicodeBuffer( /* Pre-conditions: * objPtr->typePtr == &tclStringType * needed > stringPtr->maxChars + * needed < STRING_MAXCHARS */ String *ptr = NULL, *stringPtr = GET_STRING(objPtr); int attempt; @@ -238,7 +239,7 @@ GrowUnicodeBuffer( if (stringPtr->maxChars > 0) { /* Subsequent appends - apply the growth algorithm. */ attempt = 2 * needed; - if (attempt >= 0) { + if (attempt >= 0 && attempt <= STRING_MAXCHARS) { ptr = stringAttemptRealloc(stringPtr, attempt); } if (ptr == NULL) { @@ -246,7 +247,7 @@ GrowUnicodeBuffer( * Take care computing the amount of modest growth to avoid * overflow into invalid argument values for attempt. */ - unsigned int limit = INT_MAX - needed; + unsigned int limit = STRING_MAXCHARS - needed; unsigned int extra = needed - stringPtr->numChars + TCL_GROWTH_MIN_ALLOC; int growth = (int) ((extra > limit) ? limit : extra); @@ -848,6 +849,7 @@ Tcl_SetObjLength( */ + stringCheckLimits(length); if (length > stringPtr->maxChars) { stringPtr = stringRealloc(stringPtr, length); SET_STRING(objPtr, stringPtr); @@ -973,6 +975,9 @@ Tcl_AttemptSetObjLength( * Changing length of pure unicode string. */ + if (length > STRING_MAXCHARS) { + return 0; + } if (length > stringPtr->maxChars) { stringPtr = stringAttemptRealloc(stringPtr, length); if (stringPtr == NULL) { @@ -1042,9 +1047,7 @@ UnicodeLength( numChars++; } } - if (numChars < 0) { - Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); - } + stringCheckLimits(numChars); return numChars; } @@ -1066,6 +1069,7 @@ SetUnicodeObj( * Allocate enough space for the String structure + Unicode string. */ + stringCheckLimits(numChars); stringPtr = stringAlloc(numChars); SET_STRING(objPtr, stringPtr); objPtr->typePtr = &tclStringType; @@ -1398,9 +1402,7 @@ AppendUnicodeToUnicodeRep( */ numChars = stringPtr->numChars + appendNumChars; - if (numChars < 0) { - Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); - } + stringCheckLimits(numChars); if (numChars > stringPtr->maxChars) { /* @@ -2652,9 +2654,7 @@ ExtendUnicodeRepWithString( TclNumUtfChars(numAppendChars, bytes, numBytes); } needed = numOrigChars + numAppendChars; - if (needed < 0) { - Tcl_Panic("max length for a Tcl value (%d chars) exceeded", INT_MAX); - } + stringCheckLimits(needed); if (needed > stringPtr->maxChars) { GrowUnicodeBuffer(objPtr, needed); -- cgit v0.12 From 22bb1e220dfeb679e0f7985503d2ab229694e35a Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 18 Feb 2009 18:31:36 +0000 Subject: * generic/tclStringObj.c: Rewrite GrowStringBuffer() so that it has parallel structure with GrowUnicodeBuffer(). The revision permits allocation attempts to continue all the way up to failure, with no gap. It also directly manipulates the String and Tcl_Obj internals instead of inefficiently operating via Tcl_*SetObjLength() with all of its extra protections and underdocumented special cases. --- ChangeLog | 7 +++++++ generic/tclStringObj.c | 39 +++++++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index f852e57..00dc9c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-02-18 Don Porter + * generic/tclStringObj.c: Rewrite GrowStringBuffer() so that it + has parallel structure with GrowUnicodeBuffer(). The revision permits + allocation attempts to continue all the way up to failure, with no gap. + It also directly manipulates the String and Tcl_Obj internals instead + of inefficiently operating via Tcl_*SetObjLength() with all of its + extra protections and underdocumented special cases. + * generic/tclStringObj.c: Another round of simplification on the allocation macros. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 5707c50..24ae5ef 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.115 2009/02/18 17:45:35 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.116 2009/02/18 18:31:55 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -198,29 +198,36 @@ GrowStringBuffer( * flag || objPtr->bytes != NULL */ String *stringPtr = GET_STRING(objPtr); + char *ptr = NULL; + int attempt; - if (flag && stringPtr->allocated == 0) { - /* First allocation - just big enough */ - if (objPtr->bytes == tclEmptyStringRep) { - objPtr->bytes = ckalloc((unsigned) needed + 1); - } else { - objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) needed + 1); + if (objPtr->bytes == tclEmptyStringRep) { + objPtr->bytes = NULL; + } + if (flag == 0 || stringPtr->allocated > 0) { + attempt = 2 * needed; + if (attempt >= 0) { + ptr = attemptckrealloc(objPtr->bytes, (unsigned) attempt + 1); } - stringPtr->allocated = needed; - } else { - /* Subsequent appends - apply the growth algorithm. */ - if (Tcl_AttemptSetObjLength(objPtr, 2 * needed) == 0) { + if (ptr == NULL) { /* * Take care computing the amount of modest growth to avoid - * overflow into invalid argument values for Tcl_SetObjLength. + * overflow into invalid argument values for attempt. */ unsigned int limit = INT_MAX - needed; unsigned int extra = needed - objPtr->length + TCL_GROWTH_MIN_ALLOC; int growth = (int) ((extra > limit) ? limit : extra); - - Tcl_SetObjLength(objPtr, needed + growth); + attempt = needed + growth; + ptr = attemptckrealloc(objPtr->bytes, (unsigned) attempt + 1); } } + if (ptr == NULL) { + /* First allocation - just big enough; or last chance fallback. */ + attempt = needed; + ptr = ckrealloc(objPtr->bytes, (unsigned) attempt + 1); + } + objPtr->bytes = ptr; + stringPtr->allocated = attempt; } static void @@ -1548,10 +1555,10 @@ AppendUtfToUtfRep( */ oldLength = objPtr->length; - if (numBytes > INT_MAX - oldLength) { + newLength = numBytes + oldLength; + if (newLength < 0) { Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } - newLength = numBytes + oldLength; stringPtr = GET_STRING(objPtr); if (newLength > stringPtr->allocated) { -- cgit v0.12 From d6e613c86fae19a602868da81cf6077c49e5c214 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 18 Feb 2009 19:47:06 +0000 Subject: another TODO --- generic/tclStringObj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 24ae5ef..d97c1e1 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.116 2009/02/18 18:31:55 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.117 2009/02/18 19:47:06 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1326,6 +1326,7 @@ Tcl_AppendObjToObj( * appendObjPtr and append it. */ + /* TODO: optimize unicode appends */ if (stringPtr->hasUnicode && stringPtr->numChars > 0) { /* * If appendObjPtr is not of the "String" type, don't convert it. -- cgit v0.12 From 26a75c8619e638a8cb57c46899fa77eb6fa1c8d8 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 18 Feb 2009 20:10:30 +0000 Subject: * generic/tclStringObj.c: Simplify the logic of the Tcl_*SetObjLength() routines. --- ChangeLog | 3 ++ generic/tclStringObj.c | 97 ++++++++++++++++---------------------------------- 2 files changed, 34 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00dc9c4..93b560b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-02-18 Don Porter + * generic/tclStringObj.c: Simplify the logic of the + Tcl_*SetObjLength() routines. + * generic/tclStringObj.c: Rewrite GrowStringBuffer() so that it has parallel structure with GrowUnicodeBuffer(). The revision permits allocation attempts to continue all the way up to failure, with no gap. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index d97c1e1..2925a80 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.117 2009/02/18 19:47:06 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.118 2009/02/18 20:10:34 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -807,42 +807,24 @@ Tcl_SetObjLength( SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - /* - * Check that we're not extending a pure unicode string. - */ - - if (length > stringPtr->allocated && - (objPtr->bytes != NULL || stringPtr->hasUnicode == 0)) { - /* - * Not enough space in current string. Reallocate the string space and - * free the old string. - */ - - if (objPtr->bytes != tclEmptyStringRep) { - objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) length+1); - } else { - objPtr->bytes = ckalloc((unsigned) length+1); - } - stringPtr->allocated = length; - + if (objPtr->bytes != NULL) { /* - * Invalidate the unicode data. + * Change length of an existing string rep. */ - - stringPtr->hasUnicode = 0; - } - - if (objPtr->bytes != NULL) { - objPtr->length = length; - if (objPtr->bytes != tclEmptyStringRep) { + if (length > stringPtr->allocated) { /* - * Ensure the string is NUL-terminated. + * Need to enlarge the buffer. */ - - objPtr->bytes[length] = 0; + if (objPtr->bytes == tclEmptyStringRep) { + objPtr->bytes = ckalloc((unsigned) length+1); + } else { + objPtr->bytes = ckrealloc(objPtr->bytes, (unsigned) length+1); + } + stringPtr->allocated = length; } - /* Note: here we can get an empty string != tclEmptyStringRep */ + objPtr->length = length; + objPtr->bytes[length] = 0; /* * Invalidate the unicode data. @@ -855,7 +837,6 @@ Tcl_SetObjLength( * Changing length of pure unicode string. */ - stringCheckLimits(length); if (length > stringPtr->maxChars) { stringPtr = stringRealloc(stringPtr, length); @@ -930,47 +911,31 @@ Tcl_AttemptSetObjLength( SetStringFromAny(NULL, objPtr); stringPtr = GET_STRING(objPtr); - /* - * Check that we're not extending a pure unicode string. - */ - - if (length > stringPtr->allocated && - (objPtr->bytes != NULL || stringPtr->hasUnicode == 0)) { - char *newBytes; - - /* - * Not enough space in current string. Reallocate the string space and - * free the old string. - */ - - if (objPtr->bytes != tclEmptyStringRep) { - newBytes = attemptckrealloc(objPtr->bytes, (unsigned) length+1); - } else { - newBytes = attemptckalloc((unsigned) length+1); - } - if (newBytes == NULL) { - return 0; - } - objPtr->bytes = newBytes; - stringPtr->allocated = length; - + if (objPtr->bytes != NULL) { /* - * Invalidate the unicode data. + * Change length of an existing string rep. */ - - stringPtr->hasUnicode = 0; - } - - if (objPtr->bytes != NULL) { - objPtr->length = length; - if (objPtr->bytes != tclEmptyStringRep) { + if (length > stringPtr->allocated) { /* - * Ensure the string is NULL-terminated. + * Need to enlarge the buffer. */ + char *newBytes; - objPtr->bytes[length] = 0; + if (objPtr->bytes == tclEmptyStringRep) { + newBytes = attemptckalloc((unsigned) length+1); + } else { + newBytes = attemptckrealloc(objPtr->bytes, (unsigned) length+1); + } + if (newBytes == NULL) { + return 0; + } + objPtr->bytes = newBytes; + stringPtr->allocated = length; } + objPtr->length = length; + objPtr->bytes[length] = 0; + /* * Invalidate the unicode data. */ -- cgit v0.12 From 59207d524457ce50296ceb2e91eba66bc0e1f4ec Mon Sep 17 00:00:00 2001 From: das Date: Thu, 19 Feb 2009 06:35:01 +0000 Subject: fix signed/unsigned comparison warnings --- generic/tclStringObj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 2925a80..eb11b43 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.118 2009/02/18 20:10:34 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.119 2009/02/19 06:35:01 das Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -119,7 +119,7 @@ typedef struct String { #define STRING_SIZE(numChars) \ (sizeof(String) + ((numChars) * sizeof(Tcl_UniChar))) #define stringCheckLimits(numChars) \ - if ((numChars) < 0 || (numChars) > STRING_MAXCHARS) { \ + if ((numChars) < 0 || (size_t)(numChars) > STRING_MAXCHARS) { \ Tcl_Panic("max length for a Tcl unicode value (%d chars) exceeded", \ STRING_MAXCHARS); \ } @@ -246,7 +246,7 @@ GrowUnicodeBuffer( if (stringPtr->maxChars > 0) { /* Subsequent appends - apply the growth algorithm. */ attempt = 2 * needed; - if (attempt >= 0 && attempt <= STRING_MAXCHARS) { + if (attempt >= 0 && (size_t)attempt <= STRING_MAXCHARS) { ptr = stringAttemptRealloc(stringPtr, attempt); } if (ptr == NULL) { @@ -947,7 +947,7 @@ Tcl_AttemptSetObjLength( * Changing length of pure unicode string. */ - if (length > STRING_MAXCHARS) { + if ((size_t)length > STRING_MAXCHARS) { return 0; } if (length > stringPtr->maxChars) { -- cgit v0.12 From 0c058bc1950888b1d4c5744c7f4a26698ff3606b Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 19 Feb 2009 14:55:55 +0000 Subject: alternative solution to the signed/unsigned warnings --- generic/tclStringObj.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index eb11b43..23f98e0 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.119 2009/02/19 06:35:01 das Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.120 2009/02/19 14:55:55 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -115,11 +115,11 @@ typedef struct String { } String; #define STRING_MAXCHARS \ - (((size_t)UINT_MAX - sizeof(String))/sizeof(Tcl_UniChar)) + (int)(((size_t)UINT_MAX - sizeof(String))/sizeof(Tcl_UniChar)) #define STRING_SIZE(numChars) \ (sizeof(String) + ((numChars) * sizeof(Tcl_UniChar))) #define stringCheckLimits(numChars) \ - if ((numChars) < 0 || (size_t)(numChars) > STRING_MAXCHARS) { \ + if ((numChars) < 0 || (numChars) > STRING_MAXCHARS) { \ Tcl_Panic("max length for a Tcl unicode value (%d chars) exceeded", \ STRING_MAXCHARS); \ } @@ -246,7 +246,7 @@ GrowUnicodeBuffer( if (stringPtr->maxChars > 0) { /* Subsequent appends - apply the growth algorithm. */ attempt = 2 * needed; - if (attempt >= 0 && (size_t)attempt <= STRING_MAXCHARS) { + if (attempt >= 0 && attempt <= STRING_MAXCHARS) { ptr = stringAttemptRealloc(stringPtr, attempt); } if (ptr == NULL) { @@ -947,7 +947,7 @@ Tcl_AttemptSetObjLength( * Changing length of pure unicode string. */ - if ((size_t)length > STRING_MAXCHARS) { + if (length > STRING_MAXCHARS) { return 0; } if (length > stringPtr->maxChars) { -- cgit v0.12 From cabffe92aa625b6d83881d3f28857b4c50775aa5 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 20 Feb 2009 18:19:15 +0000 Subject: * generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType() * tests/fileName.test: that assumed (not "absolute" => "relative"). This is a false assumption on Windows, where "volumerelative" is another possibility. [Bug 2571597]. --- ChangeLog | 7 +++++++ generic/tclPathObj.c | 11 ++++++++++- tests/fileName.test | 8 +++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93b560b..d456acb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-20 Don Porter + + * generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType() + * tests/fileName.test: that assumed (not "absolute" => "relative"). + This is a false assumption on Windows, where "volumerelative" is + another possibility. [Bug 2571597]. + 2009-02-18 Don Porter * generic/tclStringObj.c: Simplify the logic of the diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 74f526a..725f2a9 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.78 2009/02/10 22:49:50 nijtmans Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.79 2009/02/20 18:19:16 dgp Exp $ */ #include "tclInt.h" @@ -511,7 +511,16 @@ TclFSGetPathType( } if (PATHFLAGS(pathPtr) == 0) { + /* The path is not absolute... */ +#ifdef __WIN32__ + /* ... on Windows we must make another call to determine whether + * it's relative or volumerelative [Bug 2571597]. */ + return TclGetPathType(pathPtr, filesystemPtrPtr, driveNameLengthPtr, + NULL); +#else + /* On other systems, quickly deduce !absolute -> relative */ return TCL_PATH_RELATIVE; +#endif } return TclFSGetPathType(fsPathPtr->cwdPtr, filesystemPtrPtr, driveNameLengthPtr); diff --git a/tests/fileName.test b/tests/fileName.test index 1d1f3ce..c40b8ac 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.57 2008/09/29 16:03:30 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.58 2009/02/20 18:19:16 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1443,6 +1443,12 @@ test filename-17.2 {windows specific glob with executable} -body { removeFile execglob/abc.notexecutable removeDirectory execglob } -result {abc.exe} +test filename-17.3 {Bug 2571597} win { + set p /a + file pathtype $p + file normalize $p + file pathtype $p +} volumerelative test fileName-18.1 {windows - split ADS name correctly} {win} { # bug 1194458 -- cgit v0.12 From 300db4575ea04674f1f3ec8a0659075db7d18ac3 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 22 Feb 2009 04:38:58 +0000 Subject: * generic/tclStringObj.c: Several revisions to the shimmering patterns between Unicode and UTF string reps. Most notably the call: objPtr = Tcl_NewUnicodeObj(...,0); followed by a loop of calls: Tcl_AppendUnicodeToObj(objPtr, u, n); will now grow and append to the Unicode representation. Before this commit, the sequence would convert each append to UTF and perform the append to the UTF rep. This is puzzling and likely a bug. The performance of [string map] is significantly improved by this change (according to the MAP collection of benchmarks in tclbench). Just in case there was some wisdom in the old ways that I missed, I left in the ability to restore the old patterns with a #define COMPAT 1 at the top of the file. --- ChangeLog | 14 +++++++++ generic/tclStringObj.c | 82 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 79 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index d456acb..44c049d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-02-21 Don Porter + + * generic/tclStringObj.c: Several revisions to the shimmering + patterns between Unicode and UTF string reps. Most notably the + call: objPtr = Tcl_NewUnicodeObj(...,0); followed by a loop of calls: + Tcl_AppendUnicodeToObj(objPtr, u, n); will now grow and append to + the Unicode representation. Before this commit, the sequence would + convert each append to UTF and perform the append to the UTF rep. + This is puzzling and likely a bug. The performance of [string map] + is significantly improved by this change (according to the MAP + collection of benchmarks in tclbench). Just in case there was some + wisdom in the old ways that I missed, I left in the ability to restore + the old patterns with a #define COMPAT 1 at the top of the file. + 2009-02-20 Don Porter * generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType() diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 23f98e0..716c272 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,12 +33,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.120 2009/02/19 14:55:55 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.121 2009/02/22 04:38:58 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" /* + * Set COMPAT to 1 to restore the shimmering patterns to those of Tcl 8.5. + * This is an escape hatch in case the changes have some unexpected unwelcome + * impact on performance. If things go well, this mechanism can go away when + * post-8.6 development begins. + */ +#define COMPAT 0 + +/* * Prototypes for functions defined later in this file: */ @@ -484,18 +492,12 @@ Tcl_GetCharLength( TclNumUtfChars(numChars, objPtr->bytes, objPtr->length); stringPtr->numChars = numChars; - /* - * Disabled the auto-fill of the unicode rep when multi-byte - * characters have been detected, on the YAGNI principle. - */ -#if 1 +#if COMPAT if (numChars < objPtr->length) { /* * Since we've just computed the number of chars, and not all * UTF chars are 1-byte long, go ahead and populate the unicode * string. - * - * TODO: Examine does this really help? How? */ FillUnicodeRep(objPtr); @@ -1215,8 +1217,11 @@ Tcl_AppendUnicodeToObj( * objPtr's string rep. */ - /* TODO: shift appends to empty to work on Unicode? */ - if (stringPtr->hasUnicode && stringPtr->numChars > 0) { + if (stringPtr->hasUnicode +#if COMPAT + && stringPtr->numChars > 0 +#endif + ) { AppendUnicodeToUnicodeRep(objPtr, unicode, length); } else { AppendUnicodeToUtfRep(objPtr, unicode, length); @@ -1291,8 +1296,11 @@ Tcl_AppendObjToObj( * appendObjPtr and append it. */ - /* TODO: optimize unicode appends */ - if (stringPtr->hasUnicode && stringPtr->numChars > 0) { + if (stringPtr->hasUnicode +#if COMPAT + && stringPtr->numChars > 0 +#endif + ) { /* * If appendObjPtr is not of the "String" type, don't convert it. */ @@ -1325,7 +1333,11 @@ Tcl_AppendObjToObj( AppendUtfToUtfRep(objPtr, bytes, length); - if (numChars >= 0 && appendNumChars >= 0) { + if (numChars >= 0 && appendNumChars >= 0 +#if COMPAT + && appendNumChars == length +#endif + ) { stringPtr->numChars = numChars + appendNumChars; } } @@ -1443,9 +1455,10 @@ AppendUnicodeToUtfRep( stringPtr->numChars += numChars; } - /* TODO: Condition on (numChars > 0) ? or change caller & eliminate ? */ +#if COMPAT /* Invalidate the unicode rep */ stringPtr->hasUnicode = 0; +#endif } /* @@ -2674,6 +2687,43 @@ DupStringInternalRep( String *srcStringPtr = GET_STRING(srcPtr); String *copyStringPtr = NULL; +#if COMPAT==0 + if (srcStringPtr->numChars == -1) { + /* + * The String struct in the source value holds zero useful data. + * Don't bother copying it. Don't even bother allocating space in + * which to copy it. Just let the copy be untyped. + */ + return; + } + + if (srcStringPtr->hasUnicode) { + int copyMaxChars; + if (srcStringPtr->maxChars / 2 >= srcStringPtr->numChars) { + copyMaxChars = 2 * srcStringPtr->numChars; + } else { + copyMaxChars = srcStringPtr->maxChars; + } + copyStringPtr = stringAlloc(copyMaxChars); + copyStringPtr->maxChars = copyMaxChars; + memcpy(copyStringPtr->unicode, srcStringPtr->unicode, + srcStringPtr->numChars * sizeof(Tcl_UniChar)); + copyStringPtr->unicode[srcStringPtr->numChars] = 0; + } else { + copyStringPtr = stringAlloc(0); + copyStringPtr->maxChars = 0; + copyStringPtr->unicode[0] = 0; + } + copyStringPtr->hasUnicode = srcStringPtr->hasUnicode; + copyStringPtr->numChars = srcStringPtr->numChars; + + /* + * Tricky point: the string value was copied by generic object + * management code, so it doesn't contain any extra bytes that + * might exist in the source object. + */ + copyStringPtr->allocated = copyPtr->bytes ? copyPtr->length : 0; +#else /* * If the src obj is a string of 1-byte Utf chars, then copy the string * rep of the source object and create an "empty" Unicode internal rep for @@ -2683,8 +2733,6 @@ DupStringInternalRep( if (srcStringPtr->hasUnicode && srcStringPtr->numChars > 0) { /* Copy the full allocation for the Unicode buffer. */ - /* TODO: consider a more limited copy to the min of - * the current maxChars value and twice the current numChars */ copyStringPtr = stringAlloc(srcStringPtr->maxChars); copyStringPtr->maxChars = srcStringPtr->maxChars; memcpy(copyStringPtr->unicode, srcStringPtr->unicode, @@ -2692,7 +2740,6 @@ DupStringInternalRep( copyStringPtr->unicode[srcStringPtr->numChars] = 0; copyStringPtr->allocated = 0; } else { - /* TODO: consider not bothering to make a String intrep. */ copyStringPtr = stringAlloc(0); copyStringPtr->unicode[0] = 0; copyStringPtr->maxChars = 0; @@ -2705,6 +2752,7 @@ DupStringInternalRep( } copyStringPtr->numChars = srcStringPtr->numChars; copyStringPtr->hasUnicode = srcStringPtr->hasUnicode; +#endif SET_STRING(copyPtr, copyStringPtr); copyPtr->typePtr = &tclStringType; -- cgit v0.12 From 2f7164a07ccf7f1803f0f2a169bbc07169fd7084 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Sun, 22 Feb 2009 17:45:20 +0000 Subject: Revert commits of 20080723. Those were speed tests, that are inherently brittle. --- ChangeLog | 5 +++++ tests/binary.test | 13 +------------ tests/lrange.test | 8 +------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44c049d..a544df3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-22 Alexandre Ferrieux + + * tests/lrange.test: Revert commits of 20080723. Those were + * tests/binary.test: speed tests, that are inherently brittle. + 2009-02-21 Don Porter * generic/tclStringObj.c: Several revisions to the shimmering diff --git a/tests/binary.test b/tests/binary.test index b23548e..c01cdde 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.38 2008/12/15 17:11:34 ferrieux Exp $ +# RCS: @(#) $Id: binary.test,v 1.39 2009/02/22 17:45:21 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -2727,17 +2727,6 @@ test binary-75.25 {binary decode uuencode} -body { binary decode uuencode $s } -returnCodes error -match glob -result {invalid uuencode character "z" at position 4} -test binary-76.1 {byte array concat speed} -body { - set b1 [binary format H* [string repeat E9 1000000]] - set b2 [binary format H* 41] - set t1 [lindex [time {set z ${b1}${b2}}] 0] - unset z - set b1 [binary format H* [string repeat E9 1000000]] - set b2 [binary format H* 41] - set t2 [lindex [time {set z ${b1}é}] 0] - expr {($t2/$t1)>3} -} -result 1 - # cleanup ::tcltest::cleanupTests return diff --git a/tests/lrange.test b/tests/lrange.test index f218d38..6f8f88d 100644 --- a/tests/lrange.test +++ b/tests/lrange.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: lrange.test,v 1.11 2008/08/09 00:16:06 das Exp $ +# RCS: @(#) $Id: lrange.test,v 1.12 2009/02/22 17:45:21 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -66,12 +66,6 @@ test lrange-1.15 {range of list elements} { test lrange-1.16 {list element quoting} { lrange {[append a .b]} 0 end } {{[append} a .b\]} -test lrange-1.17 {lrange in-place speed} -body { - set l [lrepeat 1000000 0] - set t1 [lindex [time {set l [lrange $l 0 end-1]}] 0] - set t2 [lindex [time {set l [lrange $l[unset l] 0 end-1]}] 0] - expr {($t1/$t2)>100} -} -result 1 -cleanup {unset l t1 t2} test lrange-2.1 {error conditions} { list [catch {lrange a b} msg] $msg } {1 {wrong # args: should be "lrange list first last"}} -- cgit v0.12 From ce5966c8e1a2b9236dd9edec5c779679cf4ee5e7 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 24 Feb 2009 14:39:14 +0000 Subject: Added support for 8.6's zlib integration. --- ChangeLog | 5 + library/http/http.tcl | 313 ++++++++++++++++++++++++++-------------------- library/http/pkgIndex.tcl | 2 +- 3 files changed, 182 insertions(+), 138 deletions(-) diff --git a/ChangeLog b/ChangeLog index a544df3..118a7bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-24 Donal K. Fellows + + * library/http/http.tcl (geturl, Eof): Added support for 8.6's built + in zlib routines. + 2009-02-22 Alexandre Ferrieux * tests/lrange.test: Revert commits of 20080723. Those were diff --git a/library/http/http.tcl b/library/http/http.tcl index fab054f..a98e145 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -1,19 +1,19 @@ # http.tcl -- # # Client-side HTTP for GET, POST, and HEAD commands. These routines can -# be used in untrusted code that uses the Safesock security policy. These -# procedures use a callback interface to avoid using vwait, which is not -# defined in the safe base. +# be used in untrusted code that uses the Safesock security policy. +# These procedures use a callback interface to avoid using vwait, which +# is not defined in the safe base. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.72 2008/10/23 23:17:38 patthoyts Exp $ +# RCS: @(#) $Id: http.tcl,v 1.73 2009/02/24 14:39:15 dkf Exp $ package require Tcl 8.4 -# Keep this in sync with pkgIndex.tcl and with the install directories -# in Makefiles -package provide http 2.7.2 +# Keep this in sync with pkgIndex.tcl and with the install directories in +# Makefiles +package provide http 2.7.3 namespace eval http { # Allow resourcing to not clobber existing data @@ -32,9 +32,9 @@ namespace eval http { proc init {} { # Set up the map for quoting chars. RFC3986 Section 2.3 say percent - # encode all except: "... percent-encoded octets in the ranges of ALPHA - # (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), - # underscore (%5F), or tilde (%7E) should not be created by URI + # encode all except: "... percent-encoded octets in the ranges of + # ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period + # (%2E), underscore (%5F), or tilde (%7E) should not be created by URI # producers ..." for {set i 0} {$i <= 256} {incr i} { set c [format %c $i] @@ -101,9 +101,9 @@ proc http::Log {args} {} # See documentation for details. # # Arguments: -# proto URL protocol prefix, e.g. https -# port Default port for protocol -# command Command to use to create socket +# proto URL protocol prefix, e.g. https +# port Default port for protocol +# command Command to use to create socket # Results: # list of port and command that was registered. @@ -117,7 +117,7 @@ proc http::register {proto port command} { # Unregisters URL protocol handler # # Arguments: -# proto URL protocol prefix, e.g. https +# proto URL protocol prefix, e.g. https # Results: # list of port and command that was unregistered. @@ -152,21 +152,19 @@ proc http::config {args} { return $result } set options [string map {- ""} $options] - set pat ^-([join $options |])$ + set pat ^-(?:[join $options |])$ if {[llength $args] == 1} { set flag [lindex $args 0] - if {[regexp -- $pat $flag]} { - return $http($flag) - } else { + if {![regexp -- $pat $flag]} { return -code error "Unknown option $flag, must be: $usage" } + return $http($flag) } else { foreach {flag value} $args { - if {[regexp -- $pat $flag]} { - set http($flag) $value - } else { + if {![regexp -- $pat $flag]} { return -code error "Unknown option $flag, must be: $usage" } + set http($flag) $value } } } @@ -179,14 +177,14 @@ proc http::config {args} { # token Connection token. # errormsg (optional) If set, forces status to error. # skipCB (optional) If set, don't call the -command callback. This -# is useful when geturl wants to throw an exception instead -# of calling the callback. That way, the same error isn't -# reported to two places. +# is useful when geturl wants to throw an exception instead +# of calling the callback. That way, the same error isn't +# reported to two places. # # Side Effects: # Closes the socket -proc http::Finish { token {errormsg ""} {skipCB 0}} { +proc http::Finish {token {errormsg ""} {skipCB 0}} { variable $token upvar 0 $token state global errorInfo errorCode @@ -194,12 +192,15 @@ proc http::Finish { token {errormsg ""} {skipCB 0}} { set state(error) [list $errormsg $errorInfo $errorCode] set state(status) "error" } - if {($state(status) eq "timeout") || ($state(status) eq "error") - || ([info exists state(connection)] && ($state(connection) eq "close")) - } { + if { + ($state(status) eq "timeout") || ($state(status) eq "error") || + ([info exists state(connection)] && ($state(connection) eq "close")) + } then { CloseSocket $state(sock) $token } - if {[info exists state(after)]} { after cancel $state(after) } + if {[info exists state(after)]} { + after cancel $state(after) + } if {[info exists state(-command)] && !$skipCB} { if {[catch {eval $state(-command) {$token}} err]} { if {$errormsg eq ""} { @@ -214,10 +215,10 @@ proc http::Finish { token {errormsg ""} {skipCB 0}} { # http::CloseSocket - # -# Close a socket and remove it from the persistent sockets table. -# If possible an http token is included here but when we are called -# from a fileevent on remote closure we need to find the correct -# entry - hence the second section. +# Close a socket and remove it from the persistent sockets table. If +# possible an http token is included here but when we are called from a +# fileevent on remote closure we need to find the correct entry - hence +# the second section. proc ::http::CloseSocket {s {token {}}} { variable socketmap @@ -227,23 +228,27 @@ proc ::http::CloseSocket {s {token {}}} { variable $token upvar 0 $token state if {[info exists state(socketinfo)]} { - set conn_id $state(socketinfo) + set conn_id $state(socketinfo) } } else { set map [array get socketmap] set ndx [lsearch -exact $map $s] if {$ndx != -1} { - incr ndx -1 - set conn_id [lindex $map $ndx] + incr ndx -1 + set conn_id [lindex $map $ndx] } } if {$conn_id eq {} || ![info exists socketmap($conn_id)]} { Log "Closing socket $s (no connection info)" - if {[catch {close $s} err]} { Log "Error: $err" } + if {[catch {close $s} err]} { + Log "Error: $err" + } } else { if {[info exists socketmap($conn_id)]} { Log "Closing connection $conn_id (sock $socketmap($conn_id))" - if {[catch {close $socketmap($conn_id)} err]} { Log "Error: $err" } + if {[catch {close $socketmap($conn_id)} err]} { + Log "Error: $err" + } unset socketmap($conn_id) } else { Log "Cannot close connection $conn_id - no socket in socket map" @@ -262,7 +267,7 @@ proc ::http::CloseSocket {s {token {}}} { # Side Effects: # See Finish -proc http::reset { token {why reset} } { +proc http::reset {token {why reset}} { variable $token upvar 0 $token state set state(status) $why @@ -285,10 +290,10 @@ proc http::reset { token {why reset} } { # args Option value pairs. Valid options include: # -blocksize, -validate, -headers, -timeout # Results: -# Returns a token for this connection. This token is the name of an array -# that the caller should unset to garbage collect the state. +# Returns a token for this connection. This token is the name of an +# array that the caller should unset to garbage collect the state. -proc http::geturl { url args } { +proc http::geturl {url args} { variable http variable urlTypes variable defaultCharset @@ -351,14 +356,17 @@ proc http::geturl { url args } { } set usage [join [lsort $options] ", "] set options [string map {- ""} $options] - set pat ^-([join $options |])$ + set pat ^-(?:[join $options |])$ foreach {flag value} $args { if {[regexp -- $pat $flag]} { # Validate numbers - if {[info exists type($flag)] && - ![string is $type($flag) -strict $value]} { + if { + [info exists type($flag)] && + ![string is $type($flag) -strict $value] + } then { unset $token - return -code error "Bad value for $flag ($value), must be $type($flag)" + return -code error \ + "Bad value for $flag ($value), must be $type($flag)" } set state($flag) $value } else { @@ -397,7 +405,9 @@ proc http::geturl { url args } { # pass it in here, but it's cheap to strip). # # An example of a URL that has all the parts: - # http://jschmoe:xyzzy@www.bogus.net:8000/foo/bar.tml?q=foo#changes + # + # http://jschmoe:xyzzy@www.bogus.net:8000/foo/bar.tml?q=foo#changes + # # The "http" is the protocol, the user is "jschmoe", the password is # "xyzzy", the host is "www.bogus.net", the port is "8000", the path is # "/foo/bar.tml", the query is "q=foo", and the fragment is "changes". @@ -408,9 +418,8 @@ proc http::geturl { url args } { # Also note that we do not currently support IPv6 addresses. # # From a validation perspective, we need to ensure that the parts of the - # URL that are going to the server are correctly encoded. - # This is only done if $state(-strict) is true (inherited from - # $::http::strict). + # URL that are going to the server are correctly encoded. This is only + # done if $state(-strict) is true (inherited from $::http::strict). set URLmatcher {(?x) # this is _expanded_ syntax ^ @@ -481,7 +490,7 @@ proc http::geturl { url args } { # Provide a better error message in this error case if {[regexp {(?i)%(?![0-9a-f][0-9a-f])..} $srvurl bad]} { return -code error \ - "Illegal encoding character usage \"$bad\" in URL path" + "Illegal encoding character usage \"$bad\" in URL path" } return -code error "Illegal characters in URL path" } @@ -565,15 +574,15 @@ proc http::geturl { url args } { lappend sockopts -myaddr $state(-myaddr) } if {[catch {eval $defcmd $sockopts $targetAddr} sock]} { - # something went wrong while trying to establish the - # connection. Clean up after events and such, but DON'T call the - # command callback (if available) because we're going to throw an - # exception from here instead. + # something went wrong while trying to establish the connection. + # Clean up after events and such, but DON'T call the command + # callback (if available) because we're going to throw an + # exception from here instead. set state(sock) $sock - Finish $token "" 1 - cleanup $token - return -code error $sock + Finish $token "" 1 + cleanup $token + return -code error $sock } } set state(sock) $sock @@ -591,8 +600,8 @@ proc http::geturl { url args } { if {![info exists state]} { # If we timed out then Finish has been called and the users - # command callback may have cleaned up the token. If so - # we end up here with nothing left to do. + # command callback may have cleaned up the token. If so we end up + # here with nothing left to do. return $token } elseif {$state(status) eq "error"} { # Something went wrong while trying to establish the connection. @@ -646,11 +655,11 @@ proc http::geturl { url args } { puts $sock "Accept: $http(-accept)" array set hdrs $state(-headers) if {[info exists hdrs(Host)]} { - # Allow Host spoofing [Bug 928154] + # Allow Host spoofing. [Bug 928154] puts $sock "Host: $hdrs(Host)" } elseif {$port == $defport} { - # Don't add port in this case, to handle broken servers. - # [Bug #504508] + # Don't add port in this case, to handle broken servers. [Bug + # #504508] puts $sock "Host: $host" } else { puts $sock "Host: $host:$port" @@ -658,20 +667,22 @@ proc http::geturl { url args } { unset hdrs puts $sock "User-Agent: $http(-useragent)" if {$state(-protocol) == 1.0 && $state(-keepalive)} { - puts $sock "Connection: keep-alive" + puts $sock "Connection: keep-alive" } if {$state(-protocol) > 1.0 && !$state(-keepalive)} { - puts $sock "Connection: close" ;# RFC2616 sec 8.1.2.1 + puts $sock "Connection: close" ;# RFC2616 sec 8.1.2.1 } if {[info exists phost] && ($phost ne "") && $state(-keepalive)} { - puts $sock "Proxy-Connection: Keep-Alive" + puts $sock "Proxy-Connection: Keep-Alive" } set accept_encoding_seen 0 foreach {key value} $state(-headers) { - if {[string equal -nocase $key "host"]} { continue } - if {[string equal -nocase $key "accept-encoding"]} { - set accept_encoding_seen 1 - } + if {[string equal -nocase $key "host"]} { + continue + } + if {[string equal -nocase $key "accept-encoding"]} { + set accept_encoding_seen 1 + } set value [string map [list \n "" \r ""] $value] set key [string trim $key] if {[string equal -nocase $key "content-length"]} { @@ -683,10 +694,13 @@ proc http::geturl { url args } { } } # Soft zlib dependency check - no package require - if {!$accept_encoding_seen && [llength [package provide zlib]] - && !([info exists state(-channel)] || [info exists state(-handler)]) - } { - puts $sock "Accept-Encoding: gzip, identity, *;q=0.1" + if { + !$accept_encoding_seen && + ([package vsatisfies [package provide Tcl] 8.6] + || [llength [package provide zlib]]) && + !([info exists state(-channel)] || [info exists state(-handler)]) + } then { + puts $sock "Accept-Encoding: gzip, identity, *;q=0.1" } if {$isQueryChannel && $state(querylength) == 0} { # Try to determine size of data in channel. If we cannot seek, the @@ -707,13 +721,14 @@ proc http::geturl { url args } { # It is possible to have both the read and write fileevents active at # this point. The only scenario it seems to affect is a server that # closes the connection without reading the POST data. (e.g., early - # versions TclHttpd in various error cases). Depending on the platform, - # the client may or may not be able to get the response from the server - # because of the error it will get trying to write the post data. - # Having both fileevents active changes the timing and the behavior, - # but no two platforms (among Solaris, Linux, and NT) behave the same, - # and none behave all that well in any case. Servers should always read - # their POST data if they expect the client to read their response. + # versions TclHttpd in various error cases). Depending on the + # platform, the client may or may not be able to get the response from + # the server because of the error it will get trying to write the post + # data. Having both fileevents active changes the timing and the + # behavior, but no two platforms (among Solaris, Linux, and NT) behave + # the same, and none behave all that well in any case. Servers should + # always read their POST data if they expect the client to read their + # response. if {$isQuery || $isQueryChannel} { puts $sock "Content-Type: $state(-type)" @@ -729,7 +744,7 @@ proc http::geturl { url args } { fileevent $sock readable [list http::Event $sock $token] } - if {! [info exists state(-command)]} { + if {![info exists state(-command)]} { # geturl does EVERYTHING asynchronously, so if the user calls it # synchronously, we just do a wait here. @@ -740,7 +755,7 @@ proc http::geturl { url args } { return -code error [lindex $state(error) 0] } } - } err]} { + } err]} then { # The socket probably was never connected, or the connection dropped # later. @@ -772,7 +787,9 @@ proc http::data {token} { return $state(body) } proc http::status {token} { - if {![info exists $token]} { return "error" } + if {![info exists $token]} { + return "error" + } variable $token upvar 0 $token state return $state(status) @@ -843,9 +860,11 @@ proc http::Connect {token} { variable $token upvar 0 $token state global errorInfo errorCode - if {[eof $state(sock)] || - [string length [fconfigure $state(sock) -error]]} { - Finish $token "connect failed [fconfigure $state(sock) -error]" 1 + if { + [eof $state(sock)] || + [string length [fconfigure $state(sock) -error]] + } then { + Finish $token "connect failed [fconfigure $state(sock) -error]" 1 } else { set state(status) connect fileevent $state(sock) writable {} @@ -896,7 +915,7 @@ proc http::Write {token} { set done 1 } } - } err]} { + } err]} then { # Do not call Finish here, but instead let the read half of the socket # process whatever server reply there is to get. @@ -934,8 +953,8 @@ proc http::Event {sock token} { if {![info exists state]} { Log "Event $sock with invalid token '$token' - remote close?" - if {! [eof $sock]} { - if {[string length [set d [read $sock]]] != 0} { + if {![eof $sock]} { + if {[set d [read $sock]] ne ""} { Log "WARNING: additional data left on closed socket" } } @@ -953,7 +972,9 @@ proc http::Event {sock token} { } elseif {$n == 0} { # We have now read all headers # We ignore HTTP/1.1 100 Continue returns. RFC2616 sec 8.2.3 - if {$state(http) == "" || [lindex $state(http) 1] == 100} { return } + if {$state(http) == "" || [lindex $state(http) 1] == 100} { + return + } set state(state) body @@ -963,14 +984,15 @@ proc http::Event {sock token} { return } - # For non-chunked transfer we may have no body -- in this case we - # may get no further file event if the connection doesn't close and - # no more data is sent. We can tell and must finish up now - not - # later. - if {!(([info exists state(connection)] - && ($state(connection) eq "close")) - || [info exists state(transfer)]) - && $state(totalsize) == 0 + # For non-chunked transfer we may have no body - in this case we + # may get no further file event if the connection doesn't close + # and no more data is sent. We can tell and must finish up now - + # not later. + if { + !(([info exists state(connection)] + && ($state(connection) eq "close")) + || [info exists state(transfer)]) + && ($state(totalsize) == 0) } then { Log "body size is 0 and no events likely - complete." Eof $token @@ -980,18 +1002,24 @@ proc http::Event {sock token} { # We have to use binary translation to count bytes properly. fconfigure $sock -translation binary - if {$state(-binary) || ![string match -nocase text* $state(type)]} { + if { + $state(-binary) || ![string match -nocase text* $state(type)] + } then { # Turn off conversions for non-text data set state(binary) 1 } - if {$state(binary) || [string match *gzip* $state(coding)] - || [string match *compress* $state(coding)]} { + if { + $state(binary) || [string match *gzip* $state(coding)] || + [string match *compress* $state(coding)] + } then { if {[info exists state(-channel)]} { fconfigure $state(-channel) -translation binary } } - if {[info exists state(-channel)] && - ![info exists state(-handler)]} { + if { + [info exists state(-channel)] && + ![info exists state(-handler)] + } then { # Initiate a sequence of background fcopies fileevent $sock readable {} CopyStart $sock $token @@ -1041,8 +1069,10 @@ proc http::Event {sock token} { Log "final chunk part" Eof $token } - } elseif {[info exists state(transfer)] - && $state(transfer) eq "chunked"} { + } elseif { + [info exists state(transfer)] + && $state(transfer) eq "chunked" + } then { set size 0 set chunk [getTextLine $sock] set n [string length $chunk] @@ -1079,12 +1109,14 @@ proc http::Event {sock token} { incr state(currentsize) $n } # If Content-Length - check for end of data. - if {($state(totalsize) > 0) - && ($state(currentsize) >= $state(totalsize))} { + if { + ($state(totalsize) > 0) + && ($state(currentsize) >= $state(totalsize)) + } then { Eof $token } } - } err]} { + } err]} then { return [Finish $token $err] } else { if {[info exists state(-progress)]} { @@ -1143,7 +1175,7 @@ proc http::CopyStart {sock token} { if {[catch { fcopy $sock $state(-channel) -size $state(-blocksize) -command \ [list http::CopyDone $token] - } err]} { + } err]} then { Finish $token $err } } @@ -1200,22 +1232,26 @@ proc http::Eof {token {force 0}} { if {($state(coding) eq "gzip") && [string length $state(body)] > 0} { if {[catch { - set state(body) [Gunzip $state(body)] - } err]} { - return [Finish $token $err] + if {[package vsatisfies [package present Tcl] 8.6]} { + # The zlib integration into 8.6 includes proper gzip support + set state(body) [zlib gunzip $state(body)] + } else { + set state(body) [Gunzip $state(body)] + } + } err]} then { + return [Finish $token $err] } } if {!$state(binary)} { - - # If we are getting text, set the incoming channel's - # encoding correctly. iso8859-1 is the RFC default, but - # this could be any IANA charset. However, we only know - # how to convert what we have encodings for. + # If we are getting text, set the incoming channel's encoding + # correctly. iso8859-1 is the RFC default, but this could be any IANA + # charset. However, we only know how to convert what we have + # encodings for. set enc [CharsetToEncoding $state(charset)] if {$enc ne "binary"} { - set state(body) [encoding convertfrom $enc $state(body)] + set state(body) [encoding convertfrom $enc $state(body)] } # Translate text line endings. @@ -1317,8 +1353,10 @@ proc http::mapReply {string} { proc http::ProxyRequired {host} { variable http if {[info exists http(-proxyhost)] && [string length $http(-proxyhost)]} { - if {![info exists http(-proxyport)] || \ - ![string length $http(-proxyport)]} { + if { + ![info exists http(-proxyport)] || + ![string length $http(-proxyport)] + } then { set http(-proxyport) 8080 } return [list $http(-proxyhost) $http(-proxyport)] @@ -1327,33 +1365,33 @@ proc http::ProxyRequired {host} { # http::CharsetToEncoding -- # -# Tries to map a given IANA charset to a tcl encoding. -# If no encoding can be found, returns binary. +# Tries to map a given IANA charset to a tcl encoding. If no encoding +# can be found, returns binary. # proc http::CharsetToEncoding {charset} { variable encodings set charset [string tolower $charset] - if {[regexp {iso-?8859-([0-9]+)} $charset - num]} { + if {[regexp {iso-?8859-([0-9]+)} $charset -> num]} { set encoding "iso8859-$num" - } elseif {[regexp {iso-?2022-(jp|kr)} $charset - ext]} { + } elseif {[regexp {iso-?2022-(jp|kr)} $charset -> ext]} { set encoding "iso2022-$ext" - } elseif {[regexp {shift[-_]?js} $charset -]} { + } elseif {[regexp {shift[-_]?js} $charset]} { set encoding "shiftjis" - } elseif {[regexp {(windows|cp)-?([0-9]+)} $charset - - num]} { + } elseif {[regexp {(?:windows|cp)-?([0-9]+)} $charset -> num]} { set encoding "cp$num" } elseif {$charset eq "us-ascii"} { set encoding "ascii" - } elseif {[regexp {(iso-?)?lat(in)?-?([0-9]+)} $charset - - - num]} { + } elseif {[regexp {(?:iso-?)?lat(?:in)?-?([0-9]+)} $charset -> num]} { switch -- $num { 5 {set encoding "iso8859-9"} - 1 - - 2 - - 3 {set encoding "iso8859-$num"} + 1 - 2 - 3 { + set encoding "iso8859-$num" + } } } else { - # other charset, like euc-xx, utf-8,... may directly maps to encoding + # other charset, like euc-xx, utf-8,... may directly map to encoding set encoding $charset } set idx [lsearch -exact $encodings $encoding] @@ -1380,9 +1418,10 @@ proc http::Gunzip {data} { return -code error "invalid compression method" } + # lassign [split $flags ""] f_text f_crc f_extra f_name f_comment foreach {f_text f_crc f_extra f_name f_comment} [split $flags ""] break set extra "" - if { $f_extra } { + if {$f_extra} { binary scan $data @${pos}S xlen incr pos 2 set extra [string range $data $pos $xlen] @@ -1390,21 +1429,21 @@ proc http::Gunzip {data} { } set name "" - if { $f_name } { + if {$f_name} { set ndx [string first \0 $data $pos] set name [string range $data $pos $ndx] set pos [incr ndx] } set comment "" - if { $f_comment } { + if {$f_comment} { set ndx [string first \0 $data $pos] set comment [string range $data $pos $ndx] set pos [incr ndx] } set fcrc "" - if { $f_crc } { + if {$f_crc} { set fcrc [string range $data $pos [incr pos]] incr pos } @@ -1412,7 +1451,7 @@ proc http::Gunzip {data} { binary scan [string range $data end-7 end] ii crc size set inflated [zlib inflate [string range $data $pos end-8]] set chk [zlib crc32 $inflated] - if { ($crc & 0xffffffff) != ($chk & 0xffffffff)} { + if {($crc & 0xffffffff) != ($chk & 0xffffffff)} { return -code error "invalid data: checksum mismatch $crc != $chk" } return $inflated diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 6badcea..07724d3 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,4 +1,4 @@ # Tcl package index file, version 1.1 if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded http 2.7.2 [list tclPkgSetup $dir http 2.7.2 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.7.3 [list tclPkgSetup $dir http 2.7.3 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] -- cgit v0.12 From b51f251bd053d6532d178b3f1b101d5cfd15f610 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 24 Feb 2009 14:42:20 +0000 Subject: Update to installed module version number --- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index df10a4e..b68c692 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.262 2009/02/06 01:00:00 mistachkin Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.263 2009/02/24 14:42:20 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -817,8 +817,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.7.2 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.2.tm; + @echo "Installing package http 2.7.3 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.3.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index 343c3d3..9ce403e 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.150 2009/02/16 22:56:14 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.151 2009/02/24 14:42:21 dkf Exp $ VERSION = @TCL_VERSION@ @@ -696,8 +696,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.7.2 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.2.tm; + @echo "Installing package http 2.7.3 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.3.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ -- cgit v0.12 From d24c35f276199a428012749034360a0ab17c00da Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 24 Feb 2009 21:04:58 +0000 Subject: General minor documentation improvements. --- ChangeLog | 24 ++++++++++++++---------- doc/clock.n | 9 +++++++++ doc/fblocked.n | 4 +--- doc/format.n | 14 +++++++++++--- doc/lsort.n | 26 +++++++++++++------------- doc/pkgMkIndex.n | 6 +++--- doc/regsub.n | 18 +++++++++--------- doc/scan.n | 29 ++++++++++++++++------------- doc/tclvars.n | 12 ++++++------ 9 files changed, 82 insertions(+), 60 deletions(-) diff --git a/ChangeLog b/ChangeLog index 118a7bf..eba9c9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,21 @@ 2009-02-24 Donal K. Fellows + * doc/clock.n, doc/fblocked.n, doc/format.n, doc/lsort.n, + * doc/pkgMkIndex.n, doc/regsub.n, doc/scan.n, doc/tclvars.n: + General minor documentation improvements. + * library/http/http.tcl (geturl, Eof): Added support for 8.6's built in zlib routines. 2009-02-22 Alexandre Ferrieux - * tests/lrange.test: Revert commits of 20080723. Those were - * tests/binary.test: speed tests, that are inherently brittle. + * tests/lrange.test: Revert commits of 2008-07-23. Those were speed + * tests/binary.test: tests, that are inherently brittle. 2009-02-21 Don Porter * generic/tclStringObj.c: Several revisions to the shimmering - patterns between Unicode and UTF string reps. Most notably the + patterns between Unicode and UTF string reps. Most notably the call: objPtr = Tcl_NewUnicodeObj(...,0); followed by a loop of calls: Tcl_AppendUnicodeToObj(objPtr, u, n); will now grow and append to the Unicode representation. Before this commit, the sequence would @@ -27,7 +31,7 @@ * generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType() * tests/fileName.test: that assumed (not "absolute" => "relative"). This is a false assumption on Windows, where "volumerelative" is - another possibility. [Bug 2571597]. + another possibility. [Bug 2571597] 2009-02-18 Don Porter @@ -36,10 +40,10 @@ * generic/tclStringObj.c: Rewrite GrowStringBuffer() so that it has parallel structure with GrowUnicodeBuffer(). The revision permits - allocation attempts to continue all the way up to failure, with no gap. - It also directly manipulates the String and Tcl_Obj internals instead - of inefficiently operating via Tcl_*SetObjLength() with all of its - extra protections and underdocumented special cases. + allocation attempts to continue all the way up to failure, with no + gap. It also directly manipulates the String and Tcl_Obj internals + instead of inefficiently operating via Tcl_*SetObjLength() with all of + its extra protections and underdocumented special cases. * generic/tclStringObj.c: Another round of simplification on the allocation macros. @@ -56,8 +60,8 @@ array in a non-extended String struct to one Tcl_UniChar, meant to hold the terminating NUL character. Non-empty unicode strings are then stored by extending the String struct by stringPtr->maxChars - additional slots in that array with sizeof(Tcl_UniChar) bytes per slot. - This revision makes the allocation macros much simpler. + additional slots in that array with sizeof(Tcl_UniChar) bytes per + slot. This revision makes the allocation macros much simpler. * generic/tclStringObj.c: Factor out common GrowUnicodeBuffer() and solve overflow and growth algorithm fallbacks in it. diff --git a/doc/clock.n b/doc/clock.n index f4c3805..56a139e 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -161,12 +161,14 @@ the environment variable \fBTZ\fR. .IP [3] on Windows systems, the time zone settings from the Control Panel. .RE +.PP If none of these is present, the C \fBlocaltime\fR and \fBmktime\fR functions are used to attempt to convert times between local and Greenwich. On 32-bit systems, this approach is likely to have bugs, particularly for times that lie outside the window (approximately the years 1902 to 2037) that can be represented in a 32-bit integer. .SH "CLOCK ARITHMETIC" +.PP The \fBclock add\fR command performs clock arithmetic on a value (expressed as nominal seconds from the epoch time of 1 January 1970, 00:00 UTC) given as its first argument. The remaining arguments (other than the @@ -275,6 +277,7 @@ years as they are when adding/subtracting days and weeks. If multiple \fIcount unit\fR pairs are present on the command, they are evaluated consecutively, from left to right. .SH "HIGH RESOLUTION TIMERS" +.PP Most of the subcommands supported by the \fBclock\fR command deal with times represented as a count of seconds from the epoch time, and this is the representation that \fBclock seconds\fR returns. There are three exceptions, @@ -289,6 +292,7 @@ epoch; it is simply intended to be the most precise interval timer available, and is intended only for relative timing studies such as benchmarks. .SH "FORMATTING TIMES" +.PP The \fBclock format\fR command produces times for display to a user or writing to an external medium. The command accepts times that are expressed in seconds from the epoch time of 1 January 1970, 00:00 UTC, @@ -327,6 +331,7 @@ platforms that do not define a user selection of date and time formats separate from \fBLC_TIME\fR, \fB\-locale\fR \fBsystem\fR is synonymous with \fB\-locale\fR \fBcurrent\fR. .SH "SCANNING TIMES" +.PP The \fBclock scan\fR command accepts times that are formatted as strings and converts them to counts of seconds from the epoch time of 1 January 1970, 00:00 UTC. It normally takes a \fB\-format\fR @@ -449,6 +454,7 @@ If this situation occurs, the first occurrence of the time is chosen. time zone when converting local times. This caveat does not apply to UTC times.) .SH "FORMAT GROUPS" +.PP The following format groups are recognized by the \fBclock scan\fR and \fBclock format\fR commands. .TP @@ -738,6 +744,7 @@ character. Synonymous with .QW "\fB%a %b %e %H:%M:%S %Z %Y\fR" . .SH "TIME ZONES" +.PP When the \fBclock\fR command is processing a local time, it has several possible sources for the time zone to use. In order of preference, they are: @@ -825,10 +832,12 @@ rules change again. Any other time zone string is processed by prefixing a colon and attempting to use it as a location name, as above. .SH "LOCALIZATION" +.PP Developers wishing to localize the date and time formatting and parsing are referred to \fIhttp://tip.tcl.tk/173\fR for a specification. .SH "FREE FORM SCAN" +.PP If the \fBclock scan\fR command is invoked without a \fB\-format\fR option, then it requests a \fIfree-form scan.\fR \fI This form of scan is deprecated.\fR The reason for the deprecation diff --git a/doc/fblocked.n b/doc/fblocked.n index 5b5efac..a426b27 100644 --- a/doc/fblocked.n +++ b/doc/fblocked.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fblocked.n,v 1.8 2005/05/10 18:33:59 kennykb Exp $ +'\" RCS: @(#) $Id: fblocked.n,v 1.9 2009/02/24 21:04:58 dkf Exp $ .so man.macros .TH fblocked n 7.5 Tcl "Tcl Built-In Commands" .BS @@ -63,9 +63,7 @@ proc echoLine {chan clientName} { socket -server connect 12345 vwait forever .CE - .SH "SEE ALSO" gets(n), open(n), read(n), socket(n), Tcl_StandardChannels(3) - .SH KEYWORDS blocking, nonblocking diff --git a/doc/format.n b/doc/format.n index efb3a4d..24f35df 100644 --- a/doc/format.n +++ b/doc/format.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: format.n,v 1.22 2008/12/10 18:21:46 ferrieux Exp $ +'\" RCS: @(#) $Id: format.n,v 1.23 2009/02/24 21:04:58 dkf Exp $ '\" .so man.macros .TH format n 8.1 Tcl "Tcl Built-In Commands" @@ -48,6 +48,7 @@ and a conversion character. Any of these fields may be omitted except for the conversion character. The fields that are present must appear in the order given above. The paragraphs below discuss each of these fields in turn. +.SS "OPTIONAL POSITIONAL SPECIFIER" .PP If the \fB%\fR is followed by a decimal number and a \fB$\fR, as in .QW \fB%2$d\fR , @@ -61,6 +62,7 @@ given by the number. This follows the XPG3 conventions for positional specifiers. If there are any positional specifiers in \fIformatString\fR then all of the specifiers must be positional. +.SS "OPTIONAL FLAGS" .PP The second portion of a conversion specifier may contain any of the following flag characters, in any order: @@ -94,6 +96,7 @@ For all floating-point conversions (\fBe\fR, \fBE\fR, \fBf\fR, has a decimal point. For \fBg\fR and \fBG\fR conversions it specifies that trailing zeroes should not be removed. +.SS "OPTIONAL FIELD WIDTH" .PP The third portion of a conversion specifier is a decimal number giving a minimum field width for this conversion. @@ -108,6 +111,7 @@ spaces on the right, respectively. If the minimum field width is specified as \fB*\fR rather than a number, then the next argument to the \fBformat\fR command determines the minimum field width; it must be an integer value. +.SS "OPTIONAL PRECISION/BOUND" .PP The fourth portion of a conversion specifier is a precision, which consists of a period followed by a number. @@ -125,6 +129,7 @@ printed; if the string is longer than this then the trailing characters will be If the precision is specified with \fB*\fR rather than a number then the next argument to the \fBformat\fR command determines the precision; it must be a numeric string. +.SS "OPTIONAL SIZE MODIFIER" .PP The fifth part of a conversion specifier is a size modifier, which must be \fBll\fR, \fBh\fR, or \fBl\fR. @@ -139,6 +144,7 @@ If neither \fBh\fR nor \fBl\fR are present, the integer value is truncated to the same range as that produced by the \fBint()\fR function of the \fBexpr\fR command (at least a 32-bit range, but determined by the value of \fBtcl_platform(wordSize)\fR). +.SS "MANDATORY CONVERSION TYPE" .PP The last thing in a conversion specifier is an alphabetic character that determines what kind of conversion to perform. @@ -201,11 +207,13 @@ The behavior of the format command is the same as the ANSI C \fBsprintf\fR procedure except for the following differences: .IP [1] -\fB%p\fR and \fB%n\fR specifiers are not supported. +Tcl guarantees that it will be working with UNICODE characters. .IP [2] +\fB%p\fR and \fB%n\fR specifiers are not supported. +.IP [3] For \fB%c\fR conversions the argument must be an integer value, which will then be converted to the corresponding character value. -.IP [3] +.IP [4] The size modifiers are ignored when formatting floating-point values. The \fBll\fR modifier has no \fBsprintf\fR counterpart. The \fBb\fR specifier has no \fBsprintf\fR counterpart. diff --git a/doc/lsort.n b/doc/lsort.n index f83ace5..568f283 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsort.n,v 1.32 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: lsort.n,v 1.33 2009/02/24 21:04:58 dkf Exp $ '\" .so man.macros .TH lsort n 8.5 Tcl "Tcl Built-In Commands" @@ -29,12 +29,12 @@ By default ASCII sorting is used with the result returned in increasing order. However, any of the following options may be specified before \fIlist\fR to control the sorting process (unique abbreviations are accepted): -.TP 20 +.TP \fB\-ascii\fR . Use string comparison with Unicode code-point collation order (the name is for backward-compatibility reasons.) This is the default. -.TP 20 +.TP \fB\-dictionary\fR . Use dictionary-style comparison. This is the same as \fB\-ascii\fR @@ -43,15 +43,15 @@ strings contain embedded numbers, the numbers compare as integers, not characters. For example, in \fB\-dictionary\fR mode, \fBbigBoy\fR sorts between \fBbigbang\fR and \fBbigboy\fR, and \fBx10y\fR sorts between \fBx9y\fR and \fBx11y\fR. -.TP 20 +.TP \fB\-integer\fR . Convert list elements to integers and use integer comparison. -.TP 20 +.TP \fB\-real\fR . Convert list elements to floating-point values and use floating comparison. -.TP 20 +.TP \fB\-command\0\fIcommand\fR . Use \fIcommand\fR as a comparison command. @@ -61,23 +61,23 @@ arguments. The script should return an integer less than, equal to, or greater than zero if the first element is to be considered less than, equal to, or greater than the second, respectively. -.TP 20 +.TP \fB\-increasing\fR . Sort the list in increasing order .PQ smallest "items first" . This is the default. -.TP 20 +.TP \fB\-decreasing\fR . Sort the list in decreasing order .PQ largest "items first" . -.TP 20 +.TP \fB\-indices\fR . Return a list of indices into \fIlist\fR in sorted order instead of the values themselves. -.TP 20 +.TP \fB\-index\0\fIindexList\fR . If this option is specified, each of the elements of \fIlist\fR must @@ -120,7 +120,7 @@ returns \fB{{d e m o} 34512} {{b i g} 12345} {{c o d e} 54321}\fR This option is much more efficient than using \fB\-command\fR to achieve the same effect. .RE -.TP 20 +.TP \fB\-stride\0\fIstrideLength\fR . If this option is specified, the list is treated as consisting of @@ -151,13 +151,13 @@ lsort \-stride 2 \-index 1 \-integer {carrot 10 apple 50 banana 25} returns .QW "carrot 10 banana 25 apple 50" . .RE -.TP 20 +.TP \fB\-nocase\fR . Causes comparisons to be handled in a case-insensitive manner. Has no effect if combined with the \fB\-dictionary\fR, \fB\-integer\fR, or \fB\-real\fR options. -.TP 20 +.TP \fB\-unique\fR . If this option is specified, then only the last set of duplicate diff --git a/doc/pkgMkIndex.n b/doc/pkgMkIndex.n index 809c63c..90d87b1 100644 --- a/doc/pkgMkIndex.n +++ b/doc/pkgMkIndex.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.23 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.24 2009/02/24 21:04:58 dkf Exp $ '\" .so man.macros .TH pkg_mkIndex n 8.3 Tcl "Tcl Built-In Commands" @@ -14,7 +14,7 @@ pkg_mkIndex \- Build an index for automatic loading of packages .SH SYNOPSIS .nf -\fBpkg_mkIndex ?\fI\-direct\fR? ?\fI\-lazy\fR? ?\fI\-load pkgPat\fR? ?\fI\-verbose\fR? \fIdir\fR ?\fIpattern pattern ...\fR? +\fBpkg_mkIndex ?\fIoptions...\fR? \fIdir\fR ?\fIpattern pattern ...\fR? .fi .BE .SH DESCRIPTION @@ -114,7 +114,7 @@ The index process will pre-load any packages that exist in the current interpreter and match \fIpkgPat\fR into the slave interpreter used to generate the index. The pattern match uses string match rules, but without making case distinctions. -See COMPLEX CASES below. +See \fBCOMPLEX CASES\fR below. .TP 15 \fB\-verbose\fR Generate output during the indexing process. Output is via diff --git a/doc/regsub.n b/doc/regsub.n index 33a2e6f..471063e 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.26 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.27 2009/02/24 21:04:58 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -56,7 +56,7 @@ backslashes. If the initial arguments to \fBregsub\fR start with \fB\-\fR then they are treated as switches. The following switches are currently supported: -.TP 10 +.TP \fB\-all\fR . All ranges in \fIstring\fR that match \fIexp\fR are found and @@ -69,13 +69,13 @@ and .QW \e\fIn\fR sequences are handled for each substitution using the information from the corresponding match. -.TP 15 +.TP \fB\-expanded\fR . Enables use of the expanded regular expression syntax where whitespace and comments are ignored. This is the same as specifying the \fB(?x)\fR embedded option (see the \fBre_syntax\fR manual page). -.TP 15 +.TP \fB\-line\fR . Enables newline-sensitive matching. By default, newline is a @@ -92,7 +92,7 @@ matches an empty string before any newline in addition to its normal function. This flag is equivalent to specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the \fB(?n)\fR embedded option (see the \fBre_syntax\fR manual page). -.TP 15 +.TP \fB\-linestop\fR . Changes the behavior of @@ -102,7 +102,7 @@ bracket expressions and so that they stop at newlines. This is the same as specifying the \fB(?p)\fR embedded option (see the \fBre_syntax\fR manual page). -.TP 15 +.TP \fB\-lineanchor\fR . Changes the behavior of @@ -115,13 +115,13 @@ so they match the beginning and end of a line respectively. This is the same as specifying the \fB(?w)\fR embedded option (see the \fBre_syntax\fR manual page). -.TP 10 +.TP \fB\-nocase\fR . Upper-case characters in \fIstring\fR will be converted to lower-case before matching against \fIexp\fR; however, substitutions specified by \fIsubSpec\fR use the original unconverted form of \fIstring\fR. -.TP 10 +.TP \fB\-start\fR \fIindex\fR . Specifies a character index offset into the string to start @@ -133,7 +133,7 @@ When using this switch, will not match the beginning of the line, and \eA will still match the start of the string at \fIindex\fR. \fIindex\fR will be constrained to the bounds of the input string. -.TP 10 +.TP \fB\-\|\-\fR . Marks the end of switches. The argument following this one will diff --git a/doc/scan.n b/doc/scan.n index f37ca59..48b5df1 100644 --- a/doc/scan.n +++ b/doc/scan.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scan.n,v 1.27 2008/12/10 18:21:46 ferrieux Exp $ +'\" RCS: @(#) $Id: scan.n,v 1.28 2009/02/24 21:04:58 dkf Exp $ '\" .so man.macros .TH scan n 8.4 Tcl "Tcl Built-In Commands" @@ -57,6 +57,7 @@ conversion character is \fB[\fR or \fBc\fR). Then it converts the next input characters according to the conversion specifier and stores the result in the variable given by the next argument to \fBscan\fR. +.SS "OPTIONAL POSITIONAL SPECIFIER" .PP If the \fB%\fR is followed by a decimal number and a \fB$\fR, as in .QW \fB%2$d\fR , @@ -68,6 +69,7 @@ specifiers must be positional. Every \fIvarName\fR on the argument list must correspond to exactly one conversion specifier or an error is generated, or in the inline case, any position can be specified at most once and the empty positions will be filled in with empty strings. +.SS "OPTIONAL SIZE MODIFIER" .PP The size modifier field is used only when scanning a substring into one of Tcl's integer values. The size modifier field dictates the @@ -83,33 +85,34 @@ modifier. Either one indicates the integer range to be stored is limited to the same range produced by the \fBwide()\fR function of the \fBexpr\fR command. The \fBll\fR size modifier indicates that the integer range to be stored is unlimited. +.SS "MANDATORY CONVERSION CHARACTER" .PP The following conversion characters are supported: -.TP 10 +.TP \fBd\fR . The input substring must be a decimal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP 10 +.TP \fBo\fR . The input substring must be an octal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP 10 +.TP \fBx\fR . The input substring must be a hexadecimal integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP 10 +.TP \fBb\fR . The input substring must be a binary integer. It is read in and the integer value is stored in the variable, truncated as required by the size modifier value. -.TP 10 +.TP \fBu\fR . The input substring must be a decimal integer. @@ -119,26 +122,26 @@ range is computed and stored in the variable as a decimal string. The conversion makes no sense without reference to a truncation range, so the size modifier \fBll\fR is not permitted in combination with conversion character \fBu\fR. -.TP 10 +.TP \fBi\fR . The input substring must be an integer. The base (i.e. decimal, binary, octal, or hexadecimal) is determined in the same fashion as described in \fBexpr\fR. The integer value is stored in the variable, truncated as required by the size modifier value. -.TP 10 +.TP \fBc\fR . A single character is read in and its Unicode value is stored in the variable as an integer value. Initial white space is not skipped in this case, so the input substring may be a white-space character. -.TP 10 +.TP \fBs\fR . The input substring consists of all the characters up to the next white-space character; the characters are copied to the variable. -.TP 10 +.TP \fBe\fR or \fBf\fR or \fBg\fR . The input substring must be a floating-point number consisting @@ -147,7 +150,7 @@ containing a decimal point, and an optional exponent consisting of an \fBe\fR or \fBE\fR followed by an optional sign and a string of decimal digits. It is read in and stored in the variable as a floating-point value. -.TP 10 +.TP \fB[\fIchars\fB]\fR . The input substring consists of one or more characters in \fIchars\fR. @@ -160,7 +163,7 @@ contains a sequence of the form \fIa\fB\-\fIb\fR then any character between \fIa\fR and \fIb\fR (inclusive) will match. If the first or last character between the brackets is a \fB\-\fR, then it is treated as part of \fIchars\fR rather than indicating a range. -.TP 10 +.TP \fB[^\fIchars\fB]\fR . The input substring consists of one or more characters not in \fIchars\fR. @@ -174,7 +177,7 @@ character between \fIa\fR and \fIb\fR (inclusive) will be excluded from the set. If the first or last character between the brackets is a \fB\-\fR, then it is treated as part of \fIchars\fR rather than indicating a range value. -.TP 10 +.TP \fBn\fR . No input is consumed from the input string. Instead, the total number diff --git a/doc/tclvars.n b/doc/tclvars.n index 3e3f7ac..60a16d7 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.39 2008/10/02 19:01:30 mistachkin Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.40 2009/02/24 21:04:58 dkf Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" @@ -184,6 +184,11 @@ The \fImsg\fR element will be a human-readable message corresponding to \fIerrName\fR, such as .QW "no such file or directory" for the \fBENOENT\fR case. +.TP +\fBTCL\fR ... +. +Indicates some sort of problem generated in relation to Tcl itself, e.g. a +failure to look up a channel or variable. .PP To set the \fB\-errorcode\fR return option, applications should use library procedures such as \fBTcl_SetObjErrorCode\fR, \fBTcl_SetReturnOptions\fR, @@ -194,11 +199,6 @@ the Tcl interpreter will reset the variable to \fBNONE\fR after the next error. .RE .TP -\fBTCL\fR ... -. -Indicates some sort of problem generated in relation to Tcl itself, e.g. a -failure to look up a channel or variable. -.TP \fBerrorInfo\fR . This variable holds the value of the \fB\-errorinfo\fR return option -- cgit v0.12 From 57ca69ee1a85fea74e73766265b67cc85d74081d Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 25 Feb 2009 14:55:43 +0000 Subject: * generic/tclCmdMZ.c: Since Tcl_GetCharLength() has its own * generic/tclExecute.c: optimizations for the tclByteArrayType, stop having the callers do them. --- ChangeLog | 6 ++++++ generic/tclCmdMZ.c | 9 ++++----- generic/tclExecute.c | 28 ++++++---------------------- 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index eba9c9c..defffef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-25 Don Porter + + * generic/tclCmdMZ.c: Since Tcl_GetCharLength() has its own + * generic/tclExecute.c: optimizations for the tclByteArrayType, stop + having the callers do them. + 2009-02-24 Donal K. Fellows * doc/clock.n, doc/fblocked.n, doc/format.n, doc/lsort.n, diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 15895c1..5a6f947 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.179 2009/02/05 22:12:44 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.180 2009/02/25 14:56:05 dgp Exp $ */ #include "tclInt.h" @@ -1345,7 +1345,7 @@ StringIndexCmd( } /* - * Get Unicode or byte-array char length to calulate what 'end' means. + * Get the char length to calulate what 'end' means. */ length = Tcl_GetCharLength(objv[1]); @@ -2047,9 +2047,8 @@ StringRangeCmd( } /* - * Get the length in actual characters; this uses the unicode string rep - * or the byte-array rep. We then reduce it by one because 'end' refers to - * the last character, not one past it. + * Get the length in actual characters; Then reduce it by one because + * 'end' refers to the last character, not one past it. */ length = Tcl_GetCharLength(objv[1]) - 1; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ca4312a..e98545e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.427 2009/02/14 20:30:13 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.428 2009/02/25 14:56:07 dgp Exp $ */ #include "tclInt.h" @@ -4657,11 +4657,7 @@ TclExecuteByteCode( valuePtr = OBJ_AT_TOS; - if (valuePtr->typePtr == &tclByteArrayType) { - (void) Tcl_GetByteArrayFromObj(valuePtr, &length); - } else { - length = Tcl_GetCharLength(valuePtr); - } + length = Tcl_GetCharLength(valuePtr); TclNewIntObj(objResultPtr, length); TRACE(("%.20s => %d\n", O2S(valuePtr), length)); NEXT_INST_F(1, 1, 1); @@ -4681,21 +4677,9 @@ TclExecuteByteCode( valuePtr = OBJ_UNDER_TOS; /* - * If we have a ByteArray object, avoid indexing in the Utf string - * since the byte array contains one byte per character. Otherwise, - * use the Unicode string rep to get the index'th char. + * Get char length to calulate what 'end' means. */ - - if (valuePtr->typePtr == &tclByteArrayType) { - bytes = (char *)Tcl_GetByteArrayFromObj(valuePtr, &length); - } else { - /* - * Get Unicode char length to calulate what 'end' means. - */ - - length = Tcl_GetCharLength(valuePtr); - } - + length = Tcl_GetCharLength(valuePtr); result = TclGetIntForIndexM(interp, value2Ptr, length - 1, &index); if (result != TCL_OK) { goto checkForCatch; @@ -4703,8 +4687,8 @@ TclExecuteByteCode( if ((index >= 0) && (index < length)) { if (valuePtr->typePtr == &tclByteArrayType) { - objResultPtr = Tcl_NewByteArrayObj((unsigned char *) - (&bytes[index]), 1); + objResultPtr = Tcl_NewByteArrayObj( + Tcl_GetByteArrayFromObj(valuePtr, &length)+index, 1); } else if (valuePtr->bytes && length == valuePtr->length) { objResultPtr = Tcl_NewStringObj((const char *) (&valuePtr->bytes[index]), 1); -- cgit v0.12 From cef4c16d5ab82ead5e327bd9a97a69f7e4b7e2c2 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 25 Feb 2009 19:59:30 +0000 Subject: * generic/tclUtil.c (TclStringMatchObj): Revised the branching on the strObj->typePtr so that untyped values get converted to the "string" type and pass through the Unicode matcher. [Bug 2613766] Also added checks to only perform "bytearray" optimization on pure bytearray values. [Bug 2637173]. --- ChangeLog | 6 ++++++ generic/tclUtil.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index defffef..3f670b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-02-25 Don Porter + * generic/tclUtil.c (TclStringMatchObj): Revised the branching + on the strObj->typePtr so that untyped values get converted to the + "string" type and pass through the Unicode matcher. [Bug 2613766] + Also added checks to only perform "bytearray" optimization on pure + bytearray values. [Bug 2637173]. + * generic/tclCmdMZ.c: Since Tcl_GetCharLength() has its own * generic/tclExecute.c: optimizations for the tclByteArrayType, stop having the callers do them. diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 9ea54b0..881edca 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.109 2009/02/10 23:09:05 nijtmans Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.110 2009/02/25 19:59:52 dgp Exp $ */ #include "tclInt.h" @@ -1760,13 +1760,14 @@ TclStringMatchObj( trivial = nocase ? 0 : TclMatchIsTrivial(TclGetString(ptnObj)); */ - if ((strObj->typePtr == &tclStringType)) { + if ((strObj->typePtr == &tclStringType) || (strObj->typePtr == NULL)) { Tcl_UniChar *udata, *uptn; udata = Tcl_GetUnicodeFromObj(strObj, &length); uptn = Tcl_GetUnicodeFromObj(ptnObj, &plen); match = TclUniCharMatch(udata, length, uptn, plen, flags); - } else if ((strObj->typePtr == &tclByteArrayType) && !flags) { + } else if ((strObj->typePtr == &tclByteArrayType) + && (strObj->bytes == NULL) && !flags) { unsigned char *data, *ptn; data = Tcl_GetByteArrayFromObj(strObj, &length); -- cgit v0.12 From 5119564c4202954fb6ad5bba77a1371f4a1d7920 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 27 Feb 2009 23:03:41 +0000 Subject: [Bug 218977] Tcl_DbCkfree needs a return value don't use CONST84/CONST86 in internal header files --- ChangeLog | 10 ++++++++++ generic/tcl.decls | 4 ++-- generic/tclCkalloc.c | 11 ++++------- generic/tclCompile.h | 18 +++++++++--------- generic/tclDecls.h | 6 +++--- generic/tclIO.h | 4 ++-- generic/tclInt.decls | 20 ++++++++++---------- generic/tclIntDecls.h | 23 +++++++++++------------ 8 files changed, 51 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f670b5..e3c7b09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-02-27 Jan Nijtmans + + * generic/tcl.decls: [Bug 218977] Tcl_DbCkfree needs a return value + * generic/tclCkalloc.c + * generic/tclDecls.h (regenerated) + * generic/tclInt.decls: don't use CONST84/CONST86 here + * generic/tclCompile.h: don't use CONST86 here, comment fixing. + * generic/tclIO.h: don't use CONST86 here, comment fixing. + * generic/tclIntDecls.h (regenerated) + 2009-02-25 Don Porter * generic/tclUtil.c (TclStringMatchObj): Revised the branching diff --git a/generic/tcl.decls b/generic/tcl.decls index a95acf8..0ce6825 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.168 2009/01/22 06:42:33 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.169 2009/02/27 23:03:42 nijtmans Exp $ library tcl @@ -53,7 +53,7 @@ declare 6 generic { char *Tcl_DbCkalloc(unsigned int size, const char *file, int line) } declare 7 generic { - int Tcl_DbCkfree(char *ptr, const char *file, int line) + void Tcl_DbCkfree(char *ptr, const char *file, int line) } declare 8 generic { char *Tcl_DbCkrealloc(char *ptr, unsigned int size, diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index fa7d376..2cbff69 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -14,7 +14,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.34 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.35 2009/02/27 23:03:41 nijtmans Exp $ */ #include "tclInt.h" @@ -569,7 +569,7 @@ Tcl_AttemptDbCkalloc( *---------------------------------------------------------------------- */ -int +void Tcl_DbCkfree( char *ptr, const char *file, @@ -578,7 +578,7 @@ Tcl_DbCkfree( struct mem_header *memp; if (ptr == NULL) { - return 0; + return; } /* @@ -632,8 +632,6 @@ Tcl_DbCkfree( } TclpFree((char *) memp); Tcl_MutexUnlock(ckallocMutexPtr); - - return 0; } /* @@ -1182,14 +1180,13 @@ Tcl_Free( TclpFree(ptr); } -int +void Tcl_DbCkfree( char *ptr, const char *file, int line) { TclpFree(ptr); - return 0; } /* diff --git a/generic/tclCompile.h b/generic/tclCompile.h index c0d18e4..fb5bdb9 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.114 2009/01/22 06:42:33 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.115 2009/02/27 23:03:42 nijtmans Exp $ */ #ifndef _TCLCOMPILATION @@ -177,7 +177,7 @@ typedef void (AuxDataPrintProc)(ClientData clientData, */ typedef struct AuxDataType { - CONST86 char *name; /* The name of the type. Types can be + const char *name; /* The name of the type. Types can be * registered and found by name */ AuxDataDupProc *dupProc; /* Callback procedure to invoke when the aux * data is duplicated (e.g., when the ByteCode @@ -200,7 +200,7 @@ typedef struct AuxDataType { */ typedef struct AuxData { - CONST86 AuxDataType *type; /* Pointer to the AuxData type associated with + const AuxDataType *type; /* Pointer to the AuxData type associated with * this ClientData. */ ClientData clientData; /* The compilation data itself. */ } AuxData; @@ -682,7 +682,7 @@ typedef enum InstOperandType { } InstOperandType; typedef struct InstructionDesc { - CONST86 char *name; /* Name of instruction. */ + const char *name; /* Name of instruction. */ int numBytes; /* Total number of bytes for instruction. */ int stackEffect; /* The worst-case balance stack effect of the * instruction, used for stack requirements @@ -784,7 +784,7 @@ typedef struct ForeachInfo { * LAST FIELD IN THE STRUCTURE! */ } ForeachInfo; -MODULE_SCOPE CONST86 AuxDataType tclForeachInfoType; +MODULE_SCOPE const AuxDataType tclForeachInfoType; /* * Structure used to hold information about a switch command that is needed @@ -797,7 +797,7 @@ typedef struct JumptableInfo { * offsets). */ } JumptableInfo; -MODULE_SCOPE CONST86 AuxDataType tclJumptableInfoType; +MODULE_SCOPE const AuxDataType tclJumptableInfoType; /* * Structure used to hold information about a [dict update] command that is @@ -815,7 +815,7 @@ typedef struct { * STRUCTURE. */ } DictUpdateInfo; -MODULE_SCOPE CONST86 AuxDataType tclDictUpdateInfoType; +MODULE_SCOPE const AuxDataType tclDictUpdateInfoType; /* * ClientData type used by the math operator commands. @@ -964,7 +964,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define LITERAL_NS_SCOPE 0x02 /* - * Form of TclRegisterLiteral with onHeap == 0. In that case, it is safe to + * Form of TclRegisterLiteral with flags == 0. In that case, it is safe to * cast away constness, and it is cleanest to do that here, all in one place. * * int TclRegisterNewLiteral(CompileEnv *envPtr, const char *bytes, @@ -975,7 +975,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, TclRegisterLiteral(envPtr, (char *)(bytes), length, /*flags*/ 0) /* - * Form of TclRegisterNSLiteral with onHeap == 0. In that case, it is safe to + * Form of TclRegisterLiteral with flags == LITERAL_NS_SCOPE. In that case, it is safe to * cast away constness, and it is cleanest to do that here, all in one place. * * int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes, diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 4eadfa2..6c3869f 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.169 2009/01/22 06:42:33 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.170 2009/02/27 23:03:42 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -80,7 +80,7 @@ EXTERN char * Tcl_DbCkalloc (unsigned int size, const char * file, #ifndef Tcl_DbCkfree_TCL_DECLARED #define Tcl_DbCkfree_TCL_DECLARED /* 7 */ -EXTERN int Tcl_DbCkfree (char * ptr, const char * file, +EXTERN void Tcl_DbCkfree (char * ptr, const char * file, int line); #endif #ifndef Tcl_DbCkrealloc_TCL_DECLARED @@ -3743,7 +3743,7 @@ typedef struct TclStubs { void (*tcl_Free) (char * ptr); /* 4 */ char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ char * (*tcl_DbCkalloc) (unsigned int size, const char * file, int line); /* 6 */ - int (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ + void (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 8 */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ diff --git a/generic/tclIO.h b/generic/tclIO.h index fa78769..5f330f5 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.15 2008/12/18 23:48:39 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.16 2009/02/27 23:03:42 nijtmans Exp $ */ /* @@ -132,7 +132,7 @@ typedef struct Channel { struct ChannelState *state; /* Split out state information */ ClientData instanceData; /* Instance-specific data provided by creator * of channel. */ - CONST86 Tcl_ChannelType *typePtr; /* Pointer to channel type structure. */ + const Tcl_ChannelType *typePtr; /* Pointer to channel type structure. */ struct Channel *downChanPtr;/* Refers to channel this one was stacked * upon. This reference is NULL for normal * channels. See Tcl_StackChannel. */ diff --git a/generic/tclInt.decls b/generic/tclInt.decls index a3229e3..b464b91 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.136 2009/01/22 06:42:33 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.137 2009/02/27 23:03:42 nijtmans Exp $ library tcl @@ -190,7 +190,7 @@ declare 42 generic { } # Removed in Tcl 8.5a2 #declare 43 generic { -# int TclGlobalInvoke(Tcl_Interp *interp, int argc, CONST84 char **argv, +# int TclGlobalInvoke(Tcl_Interp *interp, int argc, const char **argv, # int flags) #} declare 44 generic { @@ -225,12 +225,12 @@ declare 51 generic { } # Removed in Tcl 8.5a2 #declare 52 generic { -# int TclInvoke(Tcl_Interp *interp, int argc, CONST84 char **argv, +# int TclInvoke(Tcl_Interp *interp, int argc, const char **argv, # int flags) #} declare 53 generic { int TclInvokeObjectCommand(ClientData clientData, Tcl_Interp *interp, - int argc, CONST84 char **argv) + int argc, const char **argv) } declare 54 generic { int TclInvokeStringCommand(ClientData clientData, Tcl_Interp *interp, @@ -385,7 +385,7 @@ declare 93 generic { # Removed in Tcl 8.5: #declare 94 generic { # int TclProcInterpProc(ClientData clientData, Tcl_Interp *interp, -# int argc, CONST84 char **argv) +# int argc, const char **argv) #} # Replaced by Tcl_FSStat in 8.4: #declare 95 generic { @@ -549,7 +549,7 @@ declare 133 generic { # int TclpChdir(const char *dirName) #} declare 138 generic { - CONST84_RETURN char *TclGetEnv(const char *name, Tcl_DString *valuePtr) + const char *TclGetEnv(const char *name, Tcl_DString *valuePtr) } #declare 139 generic { # int TclpLoadFile(Tcl_Interp *interp, char *fileName, char *sym1, @@ -561,7 +561,7 @@ declare 138 generic { #} # This is used by TclX, but should otherwise be considered private declare 141 generic { - CONST84_RETURN char *TclpGetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr) + const char *TclpGetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr) } declare 142 generic { int TclSetByteCodeFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -576,7 +576,7 @@ declare 144 generic { int index) } declare 145 generic { - CONST86 struct AuxDataType *TclGetAuxDataType(const char *typeName) + const struct AuxDataType *TclGetAuxDataType(const char *typeName) } declare 146 generic { TclHandle TclHandleCreate(void *ptr) @@ -630,7 +630,7 @@ declare 157 generic { #} # REMOVED - use public Tcl_GetStartupScript() #declare 159 generic { -# CONST84_RETURN char *TclGetStartupScriptFileName(void) +# const char *TclGetStartupScriptFileName(void) #} #declare 160 generic { # int TclpMatchFilesTypes(Tcl_Interp *interp, char *separators, @@ -653,7 +653,7 @@ declare 162 generic { # correct type when calling this procedure. declare 163 generic { - CONST86 void *TclGetInstructionTable(void) + const void *TclGetInstructionTable(void) } # ALERT: The argument of 'TclExpandCodeArray' is actually a diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index c728614..a432255 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.131 2009/01/22 06:42:33 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.132 2009/02/27 23:03:41 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -248,7 +248,7 @@ EXTERN int TclInterpInit (Tcl_Interp * interp); /* 53 */ EXTERN int TclInvokeObjectCommand (ClientData clientData, Tcl_Interp * interp, int argc, - CONST84 char ** argv); + const char ** argv); #endif #ifndef TclInvokeStringCommand_TCL_DECLARED #define TclInvokeStringCommand_TCL_DECLARED @@ -595,15 +595,14 @@ EXTERN struct tm * TclpGetDate (const time_t * time, int useGMT); #ifndef TclGetEnv_TCL_DECLARED #define TclGetEnv_TCL_DECLARED /* 138 */ -EXTERN CONST84_RETURN char * TclGetEnv (const char * name, - Tcl_DString * valuePtr); +EXTERN const char * TclGetEnv (const char * name, Tcl_DString * valuePtr); #endif /* Slot 139 is reserved */ /* Slot 140 is reserved */ #ifndef TclpGetCwd_TCL_DECLARED #define TclpGetCwd_TCL_DECLARED /* 141 */ -EXTERN CONST84_RETURN char * TclpGetCwd (Tcl_Interp * interp, +EXTERN const char * TclpGetCwd (Tcl_Interp * interp, Tcl_DString * cwdPtr); #endif #ifndef TclSetByteCodeFromAny_TCL_DECLARED @@ -628,7 +627,7 @@ EXTERN void TclHideLiteral (Tcl_Interp * interp, #ifndef TclGetAuxDataType_TCL_DECLARED #define TclGetAuxDataType_TCL_DECLARED /* 145 */ -EXTERN CONST86 struct AuxDataType * TclGetAuxDataType (const char * typeName); +EXTERN const struct AuxDataType * TclGetAuxDataType (const char * typeName); #endif #ifndef TclHandleCreate_TCL_DECLARED #define TclHandleCreate_TCL_DECLARED @@ -703,7 +702,7 @@ EXTERN void TclChannelEventScriptInvoker (ClientData clientData, #ifndef TclGetInstructionTable_TCL_DECLARED #define TclGetInstructionTable_TCL_DECLARED /* 163 */ -EXTERN CONST86 void * TclGetInstructionTable (void); +EXTERN const void * TclGetInstructionTable (void); #endif #ifndef TclExpandCodeArray_TCL_DECLARED #define TclExpandCodeArray_TCL_DECLARED @@ -1084,7 +1083,7 @@ typedef struct TclIntStubs { void (*tclInitCompiledLocals) (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); /* 50 */ int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ void *reserved52; - int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ + int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, const char ** argv); /* 53 */ int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 54 */ Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ void *reserved56; @@ -1169,14 +1168,14 @@ typedef struct TclIntStubs { void *reserved135; void *reserved136; void *reserved137; - CONST84_RETURN char * (*tclGetEnv) (const char * name, Tcl_DString * valuePtr); /* 138 */ + const char * (*tclGetEnv) (const char * name, Tcl_DString * valuePtr); /* 138 */ void *reserved139; void *reserved140; - CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ + const char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ - CONST86 struct AuxDataType * (*tclGetAuxDataType) (const char * typeName); /* 145 */ + const struct AuxDataType * (*tclGetAuxDataType) (const char * typeName); /* 145 */ TclHandle (*tclHandleCreate) (void * ptr); /* 146 */ void (*tclHandleFree) (TclHandle handle); /* 147 */ TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ @@ -1194,7 +1193,7 @@ typedef struct TclIntStubs { void *reserved160; int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ - CONST86 void * (*tclGetInstructionTable) (void); /* 163 */ + const void * (*tclGetInstructionTable) (void); /* 163 */ void (*tclExpandCodeArray) (void * envPtr); /* 164 */ void (*tclpSetInitialEncodings) (void); /* 165 */ int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ -- cgit v0.12 From 4c420cfc0c8b98ec83ac96e46902749d47720223 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 4 Mar 2009 17:26:10 +0000 Subject: Fix bug 2662434 --- ChangeLog | 5 +++++ generic/tclZlib.c | 8 +++++--- tests/zlib.test | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3c7b09..9ebfbbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-04 Donal K. Fellows + + * generic/tclZlib.c (TclZlibCmd): Checksums are defined to be unsigned + 32-bit integers, use Tcl_WideInt to pass to scripts. [Bug 2662434] + 2009-02-27 Jan Nijtmans * generic/tcl.decls: [Bug 218977] Tcl_DbCkfree needs a return value diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 13d7e27..968c0ed 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.24 2009/02/16 22:56:14 nijtmans Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.25 2009/03/04 17:26:23 dkf Exp $ */ #include "tclInt.h" @@ -1692,7 +1692,8 @@ TclZlibCmd( start = Tcl_ZlibAdler32(0, NULL, 0); } data = Tcl_GetByteArrayFromObj(objv[2], &dlen); - Tcl_SetIntObj(obj, (int) Tcl_ZlibAdler32(start, data, dlen)); + Tcl_SetWideIntObj(obj, + (Tcl_WideInt) Tcl_ZlibAdler32(start, data, dlen)); return TCL_OK; case z_crc32: /* crc32 str ?startvalue? * -> checksum */ @@ -1708,7 +1709,8 @@ TclZlibCmd( start = Tcl_ZlibCRC32(0, NULL, 0); } data = Tcl_GetByteArrayFromObj(objv[2], &dlen); - Tcl_SetIntObj(obj, (int) Tcl_ZlibCRC32(start, data, dlen)); + Tcl_SetWideIntObj(obj, + (Tcl_WideInt) Tcl_ZlibCRC32(start, data, dlen)); return TCL_OK; case z_deflate: /* deflate data ?level? * -> rawCompressedData */ diff --git a/tests/zlib.test b/tests/zlib.test index dd0b1dc..41599a6 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.6 2008/12/21 21:17:19 das Exp $ +# RCS: @(#) $Id: zlib.test,v 1.7 2009/03/04 17:26:24 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -62,6 +62,9 @@ test zlib-6.2 {zlib crc32} zlib { test zlib-6.3 {zlib crc32} -constraints zlib -returnCodes error -body { zlib crc32 abcdeabcdeabcdeabcdeabcdeabcde 42 x } -result {wrong # args: should be "zlib crc32 data ?startValue?"} +test zlib-6.4 {zlib crc32: bug 2662434} -constraints zlib -body { + zlib crc32 "dabale arroz a la zorra el abad" +} -result 3842832571 test zlib-7.0 {zlib stream} -constraints zlib -returnCodes error -setup { set s [zlib stream compress] -- cgit v0.12 From e7ae31d6d3e1a343991401b5795fc1b04c6e8236 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 4 Mar 2009 17:52:34 +0000 Subject: Related corrections --- ChangeLog | 1 + generic/tclZlib.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ebfbbe..19582a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclZlib.c (TclZlibCmd): Checksums are defined to be unsigned 32-bit integers, use Tcl_WideInt to pass to scripts. [Bug 2662434] + (ZlibStreamCmd, ChanGetOption): A few other related corrections. 2009-02-27 Jan Nijtmans diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 968c0ed..7bac35a 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.25 2009/03/04 17:26:23 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.26 2009/03/04 17:52:34 dkf Exp $ */ #include "tclInt.h" @@ -2264,7 +2264,7 @@ ZlibStreamCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } - Tcl_SetIntObj(obj, Tcl_ZlibStreamChecksum(zstream)); + Tcl_SetWideIntObj(obj, (Tcl_WideInt) Tcl_ZlibStreamChecksum(zstream)); return TCL_OK; case zs_reset: /* $strm reset */ if (objc != 2) { @@ -2529,7 +2529,7 @@ ChanGetOption( crc = cd->inStream.adler; } - sprintf(buf, "0x%lx", crc); + sprintf(buf, "%lu", crc); if (optionName == NULL) { Tcl_DStringAppendElement(dsPtr, "-checksum"); Tcl_DStringAppendElement(dsPtr, buf); @@ -2838,7 +2838,7 @@ Tcl_ZlibStreamEof( } int -Tcl_ZlibStreamAdler32( +Tcl_ZlibStreamChecksum( Tcl_ZlibStream zshandle) { return 0; -- cgit v0.12 From 0f443aa5cb126f232e2ffb85bb63b1e93f89564c Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 9 Mar 2009 09:12:38 +0000 Subject: Move the implementation of [try] from Tcl to C. Not yet bytecoded. --- ChangeLog | 6 + generic/tclBasic.c | 3 +- generic/tclCmdMZ.c | 503 ++++++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclInt.h | 6 +- library/init.tcl | 184 +------------------- tests/error.test | 26 +-- 6 files changed, 524 insertions(+), 204 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19582a6..78eb759 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-03-09 Donal K. Fellows + + * generic/tclCmdMZ.c (Tcl_TryObjCmd, TclNRTryObjCmd): Moved the + implementation of [try] from Tcl code into C. Still lacks a bytecode + version, but should be better than what was before. + 2009-03-04 Donal K. Fellows * generic/tclZlib.c (TclZlibCmd): Checksums are defined to be unsigned diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b1a8d35..9f4d0dc 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.385 2009/02/03 23:34:33 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.386 2009/03/09 09:12:39 dkf Exp $ */ #include "tclInt.h" @@ -210,6 +210,7 @@ static const CmdInfo builtInCmds[] = { {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, NULL, 1}, {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, + {"try", Tcl_TryObjCmd, NULL, TclNRTryObjCmd, 1}, {"unset", Tcl_UnsetObjCmd, NULL, NULL, 1}, {"uplevel", Tcl_UplevelObjCmd, NULL, TclNRUplevelObjCmd, 1}, {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 5a6f947..dbff659 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,12 +15,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.180 2009/02/25 14:56:05 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.181 2009/03/09 09:12:39 dkf Exp $ */ #include "tclInt.h" #include "tclRegexp.h" +static inline Tcl_Obj * During(Tcl_Interp *interp, int resultCode, + Tcl_Obj *oldOptions, Tcl_Obj *errorInfo); +static int TryPostBody(ClientData data[], Tcl_Interp *interp, + int result); +static int TryPostFinal(ClientData data[], Tcl_Interp *interp, + int result); +static int TryPostHandler(ClientData data[], Tcl_Interp *interp, + int result); static int UniCharIsAscii(int character); /* @@ -4026,14 +4034,13 @@ Tcl_TimeObjCmd( return TCL_OK; } -#if 0 /* not yet implemented */ /* *---------------------------------------------------------------------- * - * Tcl_TryObjCmd -- + * Tcl_TryObjCmd, TclNRTryObjCmd -- * * This procedure is invoked to process the "try" Tcl command. See the - * user documentation for details on what it does. + * user documentation (or TIP #329) for details on what it does. * * Results: * A standard Tcl object result. @@ -4056,14 +4063,498 @@ Tcl_TryObjCmd( int TclNRTryObjCmd( - ClientData dummy, /* Not used. */ + ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + Tcl_Obj *bodyObj, *handlersObj, *finallyObj = NULL; + int i, bodyShared, haveHandlers, dummy, code; + static const char *handlerNames[] = { + "finally", "on", "trap", NULL + }; + enum Handlers { + TryFinally, TryOn, TryTrap + }; + static const char *exceptionNames[] = { + "ok", "error", "return", "break", "continue", NULL + }; + + /* + * Parse the arguments. The handlers are passed to subsequent callbacks as + * a Tcl_Obj list of the 5-tuples like (type, returnCode, errorCodePrefix, + * bindVariables, script), and the finally script is just passed as it is. + */ + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, + "body ?handler ...? ?finally script?"); + return TCL_ERROR; + } + bodyObj = objv[1]; + handlersObj = Tcl_NewObj(); + bodyShared = 0; + haveHandlers = 0; + for (i=2 ; i objc-4) { + Tcl_AppendResult(interp, "wrong # args to on clause: ", + "must be \"", TclGetString(objv[0]), + " ... on code variableList script\"", NULL); + Tcl_DecrRefCount(handlersObj); + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(NULL, objv[i+1], &code) != TCL_OK + && Tcl_GetIndexFromObj(NULL, objv[i+1], exceptionNames, + "code", 0, &code) != TCL_OK) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "bad code '%s': must be integer, \"ok\", \"error\", " + "\"return\", \"break\" or \"continue\"", + Tcl_GetString(objv[i+1]))); + Tcl_DecrRefCount(handlersObj); + return TCL_ERROR; + } + handlerItems[2] = NULL; + goto commonHandler; + + case TryTrap: /* trap pattern variableList script */ + if (i > objc-4) { + Tcl_AppendResult(interp, "wrong # args to trap clause: ", + "must be \"... trap pattern variableList script\"", + NULL); + Tcl_DecrRefCount(handlersObj); + return TCL_ERROR; + } + code = 1; + if (Tcl_ListObjLength(NULL, objv[i+1], &dummy) != TCL_OK) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "bad prefix '%s': must be a list", + Tcl_GetString(objv[i+1]))); + Tcl_DecrRefCount(handlersObj); + return TCL_ERROR; + } + handlerItems[2] = objv[i+1]; + + commonHandler: + if (Tcl_ListObjLength(interp, objv[i+2], &dummy) != TCL_OK) { + Tcl_DecrRefCount(handlersObj); + return TCL_ERROR; + } + + handlerItems[0] = objv[i]; /* type */ + TclNewIntObj(handlerItems[1], code); /* returnCode */ + if (handlerItems[2] == NULL) { /* errorCodePrefix */ + TclNewObj(handlerItems[2]); + } + handlerItems[3] = objv[i+2]; /* bindVariables */ + handlerItems[4] = objv[i+3]; /* script */ + + bodyShared = !strcmp(TclGetString(objv[i+3]), "-"); + Tcl_ListObjAppendElement(NULL, handlersObj, + Tcl_NewListObj(5, handlerItems)); + haveHandlers = 1; + i += 3; + break; + } + } + if (bodyShared) { + Tcl_AppendResult(interp, + "last non-finally clause must not have a body of \"-\"", + NULL); + Tcl_DecrRefCount(handlersObj); + return TCL_ERROR; + } + if (!haveHandlers) { + Tcl_DecrRefCount(handlersObj); + handlersObj = NULL; + } + + /* + * Execute the body. + */ + + Tcl_NRAddCallback(interp, TryPostBody, handlersObj, finallyObj, objv[0], + NULL); + return TclNREvalObjEx(interp, bodyObj, 0, + ((Interp *) interp)->cmdFramePtr, 1); +} + +/* + *---------------------------------------------------------------------- + * + * During -- + * + * This helper function patches together the updates to the interpreter's + * return options that are needed when things fail during the processing + * of a handler or finally script for the [try] command. + * + * Returns: + * The new option dictionary. + * + *---------------------------------------------------------------------- + */ + +static inline Tcl_Obj * +During( + Tcl_Interp *interp, + int resultCode, /* The result code from the just-evaluated + * script. */ + Tcl_Obj *oldOptions, /* The old option dictionary. */ + Tcl_Obj *errorInfo) /* An object to append to the errorinfo and + * release, or NULL if nothing is to be added. + * Designed to be used with Tcl_ObjPrintf. */ +{ + Tcl_Obj *during, *options; + + if (errorInfo != NULL) { + Tcl_AppendObjToErrorInfo(interp, errorInfo); + } + options = Tcl_GetReturnOptions(interp, resultCode); + TclNewLiteralStringObj(during, "-during"); + Tcl_IncrRefCount(during); + Tcl_DictObjPut(interp, options, during, oldOptions); + Tcl_DecrRefCount(during); + Tcl_IncrRefCount(options); + Tcl_DecrRefCount(oldOptions); + return options; +} + +/* + *---------------------------------------------------------------------- + * + * TryPostBody -- + * + * Callback to handle the outcome of the execution of the body of a 'try' + * command. + * + *---------------------------------------------------------------------- + */ + +static int +TryPostBody( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj *resultObj, *options, *handlersObj, *finallyObj, *cmdObj; + int i, dummy, code; + + handlersObj = data[0]; + finallyObj = data[1]; + cmdObj = data[2]; + + /* + * Basic processing of the outcome of the script, including adding of + * errorinfo trace. + */ + + resultObj = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(resultObj); + if (result == TCL_ERROR) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"%s\" body line %d)", TclGetString(cmdObj), + Tcl_GetErrorLine(interp))); + } + if (handlersObj != NULL || finallyObj != NULL) { + options = Tcl_GetReturnOptions(interp, result); + Tcl_IncrRefCount(options); + } else { + options = NULL; + } + Tcl_ResetResult(interp); + + /* + * Handle the results. + */ + + if (handlersObj != NULL) { + int numHandlers, found = 0; + Tcl_Obj **handlers, **info; + + Tcl_ListObjGetElements(NULL, handlersObj, &numHandlers, &handlers); + for (i=0 ; i 0) { + Tcl_Obj *varName; + + Tcl_ListObjIndex(NULL, info[3], 0, &varName); + if (Tcl_ObjSetVar2(interp, varName, NULL, resultObj, + TCL_LEAVE_ERR_MSG) == NULL) { + goto handlerFailed; + } + if (dummy > 1) { + Tcl_ListObjIndex(NULL, info[3], 1, &varName); + if (Tcl_ObjSetVar2(interp, varName, NULL, options, + TCL_LEAVE_ERR_MSG) == NULL) { + goto handlerFailed; + } + } + } + + /* + * Evaluate the handler body and process the outcome. Note that we + * need to keep the type of handler for debugging purposes. + */ + + handlerObj = info[0]; + Tcl_IncrRefCount(handlerObj); + Tcl_DecrRefCount(handlersObj); + Tcl_NRAddCallback(interp, TryPostHandler, cmdObj, options, + handlerObj, finallyObj); + return TclNREvalObjEx(interp, info[4], 0, + ((Interp *) interp)->cmdFramePtr, -1); + + handlerFailed: + options = During(interp, result, options, NULL); + break; + } + + /* + * No handler matched; get rid of the list of handlers. + */ + + Tcl_DecrRefCount(handlersObj); + } + + /* + * Process the finally clause. + */ + + if (finallyObj != NULL) { + Tcl_NRAddCallback(interp, TryPostFinal, resultObj, INT2PTR(result), + options, cmdObj); + return TclNREvalObjEx(interp, finallyObj, 0, + ((Interp *) interp)->cmdFramePtr, -1); + } + + /* + * Install the correct result/options into the interpreter and clean up + * any temporary storage. + */ + + if (options != NULL) { + result = TclProcessReturn(interp, result, 0, options); + Tcl_DecrRefCount(options); + } + if (resultObj != NULL) { + Tcl_SetObjResult(interp, resultObj); + Tcl_DecrRefCount(resultObj); + } + return result; +} + +/* + *---------------------------------------------------------------------- + * + * TryPostHandler -- + * + * Callback to handle the outcome of the execution of a handler of a + * 'try' command. + * + *---------------------------------------------------------------------- + */ + +static int +TryPostHandler( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj *resultObj, *cmdObj, *options, *handlerObj; + Tcl_Obj *finallyObj; + + cmdObj = data[0]; + options = data[1]; + handlerObj = data[2]; + finallyObj = data[3]; + + /* + * The handler result completely substitutes for the result of the body. + */ + + resultObj = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(resultObj); + if (result == TCL_ERROR) { + options = During(interp, result, options, Tcl_ObjPrintf( + "\n (\"%s ... %s\" handler line %d)", + TclGetString(cmdObj), TclGetString(handlerObj), + Tcl_GetErrorLine(interp))); + } else { + Tcl_DecrRefCount(options); + options = Tcl_GetReturnOptions(interp, result); + Tcl_IncrRefCount(options); + } + Tcl_DecrRefCount(handlerObj); + + /* + * Process the finally clause if it is present. + */ + + if (finallyObj != NULL) { + Tcl_NRAddCallback(interp, TryPostFinal, resultObj, INT2PTR(result), + options, cmdObj); + return TclNREvalObjEx(interp, finallyObj, 0, + ((Interp *) interp)->cmdFramePtr, -1); + } + + /* + * Install the correct result/options into the interpreter and clean up + * any temporary storage. + */ + + result = TclProcessReturn(interp, result, 0, options); + Tcl_DecrRefCount(options); + Tcl_SetObjResult(interp, resultObj); + Tcl_DecrRefCount(resultObj); + return result; +} + +/* + *---------------------------------------------------------------------- + * + * TryPostFinal -- + * + * Callback to handle the outcome of the execution of the finally script + * of a 'try' command. + * + *---------------------------------------------------------------------- + */ + +static int +TryPostFinal( + ClientData data[], + Tcl_Interp *interp, + int finalResult) +{ + Tcl_Obj *resultObj, *options, *cmdObj; + int result; + + resultObj = data[0]; + result = PTR2INT(data[1]); + options = data[2]; + cmdObj = data[3]; + + /* + * If the result wasn't OK, we need to adjust the result options. + */ + + if (finalResult != TCL_OK) { + Tcl_DecrRefCount(resultObj); + resultObj = NULL; + result = finalResult; + if (result == TCL_ERROR) { + options = During(interp, result, options, Tcl_ObjPrintf( + "\n (\"%s ... finally\" body line %d)", + TclGetString(cmdObj), Tcl_GetErrorLine(interp))); + } else { + Tcl_Obj *origOptions = options; + + options = Tcl_GetReturnOptions(interp, result); + Tcl_IncrRefCount(options); + Tcl_DecrRefCount(origOptions); + } + } + + /* + * Install the correct result/options into the interpreter and clean up + * any temporary storage. + */ + result = TclProcessReturn(interp, result, 0, options); + Tcl_DecrRefCount(options); + if (resultObj != NULL) { + Tcl_SetObjResult(interp, resultObj); + Tcl_DecrRefCount(resultObj); + } + return result; } -#endif /* not yet implemented */ /* *---------------------------------------------------------------------- diff --git a/generic/tclInt.h b/generic/tclInt.h index 3de0ea2..3f7a2dc 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.417 2009/02/13 03:22:52 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.418 2009/03/09 09:12:39 dkf Exp $ */ #ifndef _TCLINT @@ -2585,6 +2585,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForeachCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRSourceObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRTryObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; @@ -3126,6 +3127,9 @@ MODULE_SCOPE int Tcl_TimeObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_TraceObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int Tcl_TryObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); MODULE_SCOPE int Tcl_UnloadObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/library/init.tcl b/library/init.tcl index 3ec3079..6ca4873 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.120 2009/01/16 20:44:25 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.121 2009/03/09 09:12:39 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -113,188 +113,6 @@ namespace eval tcl { } } -# TIP #329: [try] -# This is a *temporary* implementation, to be replaced with one in C and -# bytecode at a later date before 8.6.0 -namespace eval ::tcl::control { - # These are not local, since this allows us to [uplevel] a [catch] rather - # than [catch] the [uplevel]ing of something, resulting in a cleaner - # -errorinfo: - variable em {} - variable opts {} - - variable magicCodes { ok 0 error 1 return 2 break 3 continue 4 } - - namespace export try - - # ::tcl::control::try -- - # - # Advanced error handling construct. - # - # Arguments: - # See try(n) for details - proc try {args} { - variable magicCodes - - # ----- Parse arguments ----- - - set trybody [lindex $args 0] - set finallybody {} - set handlers [list] - set i 1 - - while {$i < [llength $args]} { - switch -- [lindex $args $i] { - "on" { - incr i - set code [lindex $args $i] - if {[dict exists $magicCodes $code]} { - set code [dict get $magicCodes $code] - } elseif {![string is integer -strict $code]} { - set msgPart [join [dict keys $magicCodes] {", "}] - error "bad code '[lindex $args $i]': must be\ - integer or \"$msgPart\"" - } - lappend handlers [lrange $args $i $i] \ - [format %d $code] {} {*}[lrange $args $i+1 $i+2] - incr i 3 - } - "trap" { - incr i - if {![string is list [lindex $args $i]]} { - error "bad prefix '[lindex $args $i]':\ - must be a list" - } - lappend handlers [lrange $args $i $i] 1 \ - {*}[lrange $args $i $i+2] - incr i 3 - } - "finally" { - incr i - set finallybody [lindex $args $i] - incr i - break - } - default { - error "bad handler '[lindex $args $i]': must be\ - \"on code varlist body\", or\ - \"trap prefix varlist body\"" - } - } - } - - if {($i != [llength $args]) || ([lindex $handlers end] eq "-")} { - error "wrong # args: should be\ - \"try body ?handler ...? ?finally body?\"" - } - - # ----- Execute 'try' body ----- - - variable em - variable opts - set EMVAR [namespace which -variable em] - set OPTVAR [namespace which -variable opts] - set code [uplevel 1 [list ::catch $trybody $EMVAR $OPTVAR]] - - if {$code == 1} { - set line [dict get $opts -errorline] - dict append opts -errorinfo \ - "\n (\"[lindex [info level 0] 0]\" body line $line)" - } - - # Keep track of the original error message & options - set _em $em - set _opts $opts - - # ----- Find and execute handler ----- - - set errorcode {} - if {[dict exists $opts -errorcode]} { - set errorcode [dict get $opts -errorcode] - } - set found false - foreach {descrip oncode pattern varlist body} $handlers { - if {!$found} { - if { - ($code != $oncode) || ([lrange $pattern 0 end] ne - [lrange $errorcode 0 [llength $pattern]-1] ) - } then { - continue - } - } - set found true - if {$body eq "-"} { - continue - } - - # Handler found ... - - # Assign trybody results into variables - lassign $varlist resultsVarName optionsVarName - if {[llength $varlist] >= 1} { - upvar 1 $resultsVarName resultsvar - set resultsvar $em - } - if {[llength $varlist] >= 2} { - upvar 1 $optionsVarName optsvar - set optsvar $opts - } - - # Execute the handler - set code [uplevel 1 [list ::catch $body $EMVAR $OPTVAR]] - - if {$code == 1} { - set line [dict get $opts -errorline] - dict append opts -errorinfo \ - "\n (\"[lindex [info level 0] 0] ... $descrip\"\ - body line $line)" - # On error chain to original outcome - dict set opts -during $_opts - } - - # Handler result replaces the original result (whether success or - # failure); capture context of original exception for reference. - set _em $em - set _opts $opts - - # Handler has been executed - stop looking for more - break - } - - # No catch handler found -- error falls through to caller - # OR catch handler executed -- result falls through to caller - - # ----- If we have a finally block then execute it ----- - - if {$finallybody ne {}} { - set code [uplevel 1 [list ::catch $finallybody $EMVAR $OPTVAR]] - - # Finally result takes precedence except on success - - if {$code == 1} { - set line [dict get $opts -errorline] - dict append opts -errorinfo \ - "\n (\"[lindex [info level 0] 0] ... finally\"\ - body line $line)" - # On error chain to original outcome - dict set opts -during $_opts - } - if {$code != 0} { - set _em $em - set _opts $opts - } - - # Otherwise our result is not affected - } - - # Propagate the error or the result of the executed catch body to the - # caller. - dict incr _opts -level - return -options $_opts $_em - } -} -namespace import ::tcl::control::try - # Windows specific end of initialization if {(![interp issafe]) && ($tcl_platform(platform) eq "windows")} { diff --git a/tests/error.test b/tests/error.test index 6125dd4..4eb765e 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.18 2009/01/13 20:30:04 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.19 2009/03/09 09:12:39 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -396,38 +396,38 @@ test error-13.1 {try with no arguments} -body { # warning: error message may change try } -returnCodes error -match glob -result {wrong # args: *} -test error-13.2 {try with body only (ok) } { +test error-13.2 {try with body only (ok)} { try list } {} -test error-13.3 {try with missing finally body } -body { +test error-13.3 {try with missing finally body} -body { # warning: error message may change try list finally -} -returnCodes error -match glob -result {wrong # args: *} -test error-13.4 {try with bad handler keyword } -body { +} -returnCodes error -match glob -result {wrong # args to finally clause: *} +test error-13.4 {try with bad handler keyword} -body { # warning: error message may change try list then a b c } -returnCodes error -match glob -result {bad handler *} -test error-13.5 {try with partial handler #1 } -body { +test error-13.5 {try with partial handler #1} -body { # warning: error message may change try list on -} -returnCodes error -match glob -result {bad code *} -test error-13.6 {try with partial handler #2 } -body { +} -returnCodes error -match glob -result {wrong # args to on clause: *} +test error-13.6 {try with partial handler #2} -body { # warning: error message may change try list on error -} -returnCodes error -match glob -result {wrong # args: *} -test error-13.7 {try with partial handler #3 } -body { +} -returnCodes error -match glob -result {wrong # args to on clause: *} +test error-13.7 {try with partial handler #3} -body { # warning: error message may change try list on error {em opts} -} -returnCodes error -match glob -result {wrong # args: *} +} -returnCodes error -match glob -result {wrong # args to on clause: *} test error-13.8 {try with multiple handlers and finally (ok)} { try list on error {} {} trap {} {} {} finally {} } {} test error-13.9 {last handler body can't be a fallthrough #1} -body { try list on error {} {} on break {} - -} -returnCodes error -match glob -result {wrong # args: *} +} -returnCodes error -result {last non-finally clause must not have a body of "-"} test error-13.10 {last handler body can't be a fallthrough #2} -body { try list on error {} {} on break {} - finally { list d e f } -} -returnCodes error -match glob -result {wrong # args: *} +} -returnCodes error -result {last non-finally clause must not have a body of "-"} # try tests - multiple handlers (left-to-right matching, only one runs) -- cgit v0.12 From cd22f95d41584006165f126690c1183321de74f8 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 11 Mar 2009 10:44:20 +0000 Subject: * generic/tclBasic.c (TclNRCoroutineObjCmd): fix Tcl_Obj leak. Diagnose and fix thx to GPS. --- ChangeLog | 5 +++++ generic/tclBasic.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78eb759..7a6f9a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-11 Miguel Sofer + + * generic/tclBasic.c (TclNRCoroutineObjCmd): fix Tcl_Obj leak. + Diagnose and fix thx to GPS. + 2009-03-09 Donal K. Fellows * generic/tclCmdMZ.c (Tcl_TryObjCmd, TclNRTryObjCmd): Moved the diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9f4d0dc..50230ba 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.386 2009/03/09 09:12:39 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.387 2009/03/11 10:44:20 msofer Exp $ */ #include "tclInt.h" @@ -8471,7 +8471,6 @@ TclNRCoroutineObjCmd( TclGetString(cmdObjPtr); TclFreeIntRep(cmdObjPtr); cmdObjPtr->typePtr = NULL; - Tcl_IncrRefCount(cmdObjPtr); /* * Set up the callback in caller execEnv and switch to the new execEnv. -- cgit v0.12 From cf3c59ff7d954075f319cb28eb6e6d72c2d455d3 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 14 Mar 2009 17:20:24 +0000 Subject: Added support for reporting TEA-like info via pkg-config. --- ChangeLog | 10 +++++++++- unix/Makefile.in | 12 ++++++++---- unix/configure.in | 3 ++- unix/tcl.pc.in | 16 ++++++++++++++++ 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 unix/tcl.pc.in diff --git a/ChangeLog b/ChangeLog index 7a6f9a6..69ea0b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,15 @@ +2009-03-14 Donal K. Fellows + + * unix/tcl.pc.in (new file): [Patch 2243948] (hat0) + * unix/configure.in, unix/Makefile.in: Added support for reporting + Tcl's public build configuration via the pkg-config system. TEA is + still the official mechanism though, in part because pkg-config is not + universally supported across all Tcl's supported platforms. + 2009-03-11 Miguel Sofer * generic/tclBasic.c (TclNRCoroutineObjCmd): fix Tcl_Obj leak. - Diagnose and fix thx to GPS. + Diagnosis and fix thanks to GPS. 2009-03-09 Donal K. Fellows diff --git a/unix/Makefile.in b/unix/Makefile.in index b68c692..32ebc6c 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.263 2009/02/24 14:42:20 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.264 2009/03/14 17:20:24 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -774,6 +774,9 @@ install-binaries: binaries @INSTALL_STUB_LIB@ ; \ fi @EXTRA_INSTALL_BINARIES@ + @echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/" + @mkdir -p $(LIB_INSTALL_DIR)/pkgconfig + @$(INSTALL_DATA) tcl.pc $(LIB_INSTALL_DIR)/pkgconfig/tcl.pc install-libraries: libraries $(INSTALL_TZDATA) install-msgs @for i in "$(INCLUDE_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)"; \ @@ -924,7 +927,8 @@ clean: clean-packages distclean: distclean-packages clean rm -rf Makefile config.status config.cache config.log tclConfig.sh \ - $(PACKAGE).* prototype tclConfig.h *.plist Tcl.framework + $(PACKAGE).* prototype tclConfig.h *.plist Tcl.framework \ + tcl.pc cd dltest ; $(MAKE) distclean depend: @@ -1820,7 +1824,7 @@ $(MAC_OSX_DIR)/configure: $(MAC_OSX_DIR)/configure.ac $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in: $(MAC_OSX_DIR)/configure cd $(MAC_OSX_DIR); autoheader; touch $@ -dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(MAC_OSX_DIR)/configure genstubs dist-packages +dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(MAC_OSX_DIR)/configure genstubs dist-packages rm -rf $(DISTDIR) mkdir -p $(DISTDIR)/unix cp -p $(UNIX_DIR)/*.[ch] $(DISTDIR)/unix @@ -1831,7 +1835,7 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(MAC_OSX_DIR)/configure $(UNIX_DIR)/tclConfig.sh.in $(UNIX_DIR)/install-sh \ $(UNIX_DIR)/README $(UNIX_DIR)/ldAix $(UNIX_DIR)/tcl.spec \ $(UNIX_DIR)/installManPage $(UNIX_DIR)/tclConfig.h.in \ - $(DISTDIR)/unix + $(UNIX_DIR)/tcl.pc.in $(DISTDIR)/unix chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in chmod 775 $(DISTDIR)/unix/ldAix chmod +x $(DISTDIR)/unix/install-sh diff --git a/unix/configure.in b/unix/configure.in index d569862..4ba97a0 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.205 2009/01/16 20:44:25 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.206 2009/03/14 17:20:24 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -940,6 +940,7 @@ AC_CONFIG_FILES([ Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in + tcl.pc:../unix/tcl.pc.in ]) AC_OUTPUT diff --git a/unix/tcl.pc.in b/unix/tcl.pc.in new file mode 100644 index 0000000..9b090fa --- /dev/null +++ b/unix/tcl.pc.in @@ -0,0 +1,16 @@ +# tcl pkg-config source file +# $Id: tcl.pc.in,v 1.1 2009/03/14 17:20:24 dkf Exp $ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Tool Command Language +Description: Tcl is a powerful, easy-to-learn dynamic programming language, suitable for a wide range of uses. +URL: http://www.tcl.tk/ +Version: @TCL_VERSION@ +Requires: +Conflicts: +Libs: -L${libdir} @TCL_LIBS@ +Cflags: -I${includedir} -- cgit v0.12 From 1a3d859ba4af2849601d1793b65e3cb5b3141e15 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 14 Mar 2009 17:41:54 +0000 Subject: regen --- unix/configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/configure b/unix/configure index 3b7b926..94735cf 100755 --- a/unix/configure +++ b/unix/configure @@ -18941,7 +18941,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -19495,6 +19495,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -- cgit v0.12 From f700f9df947178952eab7555ad480c1b37ae6e90 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 15 Mar 2009 15:35:46 +0000 Subject: Added support for SIGINFO. [Patch 1513655] --- ChangeLog | 5 +++++ generic/tclPosixStr.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 69ea0b5..03361cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-15 Donal K. Fellows + + * generic/tclPosixStr.c (Tcl_SignalId,Tcl_SignalMsg): [Patch 1513655]: + Added support for SIGINFO, which is present on BSD platforms. + 2009-03-14 Donal K. Fellows * unix/tcl.pc.in (new file): [Patch 2243948] (hat0) diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index 376815e..5c1a1b9 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPosixStr.c,v 1.14 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclPosixStr.c,v 1.15 2009/03/15 15:35:46 dkf Exp $ */ #include "tclInt.h" @@ -1039,6 +1039,9 @@ Tcl_SignalId( #ifdef SIGXFSZ case SIGXFSZ: return "SIGXFSZ"; #endif +#if defined(SIGINFO) && (!defined(SIGPWR) || (SIGINFO != SIGPWR)) + case SIGINFO: return "SIGINFO"; +#endif } return "unknown signal"; } @@ -1170,6 +1173,9 @@ Tcl_SignalMsg( #ifdef SIGXFSZ case SIGXFSZ: return "exceeded file size limit"; #endif +#if defined(SIGINFO) && (!defined(SIGPWR) || (SIGINFO != SIGPWR)) + case SIGINFO: return "information request"; +#endif } return "unknown signal"; } -- cgit v0.12 From a8ac6c3230544ef6ce40e973f040b489706d5ed2 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 15 Mar 2009 22:34:58 +0000 Subject: Fix [Bug 2687952] --- ChangeLog | 4 ++++ generic/tclThread.c | 10 ++++++---- generic/tclThreadStorage.c | 15 ++++++++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03361cd..a0ed390 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-03-15 Donal K. Fellows + * generic/tclThreadStorage.c (TSDTableDelete): [Bug 2687952]: Ensure + * generic/tclThread.c (Tcl_GetThreadData): that structures in + Tcl's TSD system are all freed. Use the correct matching allocator. + * generic/tclPosixStr.c (Tcl_SignalId,Tcl_SignalMsg): [Patch 1513655]: Added support for SIGINFO, which is present on BSD platforms. diff --git a/generic/tclThread.c b/generic/tclThread.c index a538316..314a4fb 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThread.c,v 1.23 2009/02/10 23:09:06 nijtmans Exp $ + * RCS: @(#) $Id: tclThread.c,v 1.24 2009/03/15 22:34:59 dkf Exp $ */ #include "tclInt.h" @@ -88,8 +88,11 @@ Tcl_GetThreadData( result = TclThreadStorageKeyGet(keyPtr); if (result == NULL) { - result = ckalloc((size_t)size); - memset(result, 0, (size_t)size); + result = TclpSysAlloc((size_t) size, 0); + if (result == NULL) { + Tcl_Panic("unable to alloc %u bytes", (unsigned) size); + } + memset(result, 0, (size_t) size); TclThreadStorageKeySet(keyPtr, result); } #else /* TCL_THREADS */ @@ -133,7 +136,6 @@ TclThreadDataKeyGet( return *keyPtr; #endif /* TCL_THREADS */ } - /* *---------------------------------------------------------------------- diff --git a/generic/tclThreadStorage.c b/generic/tclThreadStorage.c index 1568998..adcf1d3 100644 --- a/generic/tclThreadStorage.c +++ b/generic/tclThreadStorage.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadStorage.c,v 1.18 2008/11/29 12:18:35 dkf Exp $ + * RCS: @(#) $Id: tclThreadStorage.c,v 1.19 2009/03/15 22:34:59 dkf Exp $ */ #include "tclInt.h" @@ -110,6 +110,19 @@ static void TSDTableDelete( TSDTable *tsdTablePtr) { + sig_atomic_t i; + + for (i=0 ; iallocated ; i++) { + if (tsdTablePtr->tablePtr[i] != NULL) { + /* + * These values were allocated in Tcl_GetThreadData in tclThread.c + * and must now be deallocated or they will leak. + */ + + TclpSysFree((char *) tsdTablePtr->tablePtr[i]); + } + } + TclpSysFree(tsdTablePtr->tablePtr); TclpSysFree(tsdTablePtr); } -- cgit v0.12 From c24409225ce9d89cb1c7c4406cb2da6e3e537cea Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Mon, 16 Mar 2009 00:43:08 +0000 Subject: revise fix for [Bug 2687952] --- ChangeLog | 6 ++++++ generic/tclThread.c | 7 ++----- generic/tclThreadStorage.c | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0ed390..57e55d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-03-15 Joe Mistachkin + + * generic/tclThread.c: Modify fix for TSD leak to match Tcl 8.5 + * generic/tclThreadStorage.c: (and prior) allocation semantics. [Bug + 2687952] + 2009-03-15 Donal K. Fellows * generic/tclThreadStorage.c (TSDTableDelete): [Bug 2687952]: Ensure diff --git a/generic/tclThread.c b/generic/tclThread.c index 314a4fb..58cc18d 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThread.c,v 1.24 2009/03/15 22:34:59 dkf Exp $ + * RCS: @(#) $Id: tclThread.c,v 1.25 2009/03/16 00:43:09 mistachkin Exp $ */ #include "tclInt.h" @@ -88,10 +88,7 @@ Tcl_GetThreadData( result = TclThreadStorageKeyGet(keyPtr); if (result == NULL) { - result = TclpSysAlloc((size_t) size, 0); - if (result == NULL) { - Tcl_Panic("unable to alloc %u bytes", (unsigned) size); - } + result = ckalloc((size_t)size); memset(result, 0, (size_t) size); TclThreadStorageKeySet(keyPtr, result); } diff --git a/generic/tclThreadStorage.c b/generic/tclThreadStorage.c index adcf1d3..1a0a89d 100644 --- a/generic/tclThreadStorage.c +++ b/generic/tclThreadStorage.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadStorage.c,v 1.19 2009/03/15 22:34:59 dkf Exp $ + * RCS: @(#) $Id: tclThreadStorage.c,v 1.20 2009/03/16 00:43:09 mistachkin Exp $ */ #include "tclInt.h" @@ -119,7 +119,7 @@ TSDTableDelete( * and must now be deallocated or they will leak. */ - TclpSysFree((char *) tsdTablePtr->tablePtr[i]); + ckfree((char *) tsdTablePtr->tablePtr[i]); } } -- cgit v0.12 From f958d7ae6277ff54eb419844904bdde05383b732 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 16 Mar 2009 10:21:42 +0000 Subject: Fix [Bug 2688063] --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 61 ++++++++++++++++++++++++++++++------------------------ 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57e55d4..a693a81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-16 Donal K. Fellows + + * generic/tclCmdMZ.c (TryPostBody): [Bug 2688063]: Extract information + from list before getting rid of last reference to it. + 2009-03-15 Joe Mistachkin * generic/tclThread.c: Modify fix for TSD leak to match Tcl 8.5 diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index dbff659..296271c 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.181 2009/03/09 09:12:39 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.182 2009/03/16 10:21:42 dkf Exp $ */ #include "tclInt.h" @@ -4097,7 +4097,7 @@ TclNRTryObjCmd( haveHandlers = 0; for (i=2 ; icmdFramePtr, -1); handlerFailed: options = During(interp, result, options, NULL); break; + + didNotMatch: + continue; } /* @@ -4447,12 +4455,12 @@ TryPostHandler( Tcl_Interp *interp, int result) { - Tcl_Obj *resultObj, *cmdObj, *options, *handlerObj; + Tcl_Obj *resultObj, *cmdObj, *options, *handlerKindObj; Tcl_Obj *finallyObj; cmdObj = data[0]; options = data[1]; - handlerObj = data[2]; + handlerKindObj = data[2]; finallyObj = data[3]; /* @@ -4464,14 +4472,13 @@ TryPostHandler( if (result == TCL_ERROR) { options = During(interp, result, options, Tcl_ObjPrintf( "\n (\"%s ... %s\" handler line %d)", - TclGetString(cmdObj), TclGetString(handlerObj), + TclGetString(cmdObj), TclGetString(handlerKindObj), Tcl_GetErrorLine(interp))); } else { Tcl_DecrRefCount(options); options = Tcl_GetReturnOptions(interp, result); Tcl_IncrRefCount(options); } - Tcl_DecrRefCount(handlerObj); /* * Process the finally clause if it is present. -- cgit v0.12 From c108da9362a1f3ad12bd7e73ad6524e9991762f3 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 18 Mar 2009 16:52:05 +0000 Subject: * generic/tclVar.c (TclLookupSimpleVar): Shift all calls to Tcl_SetErrorCode() out of TclLookupSimpleVar and onto its callers, where control with TCL_LEAVE_ERR_MSG flag is more easily handled. [Bug 2689307] --- ChangeLog | 7 +++++++ generic/tclVar.c | 9 ++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a693a81..d52c8e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-03-18 Don Porter + + * generic/tclVar.c (TclLookupSimpleVar): Shift all calls to + Tcl_SetErrorCode() out of TclLookupSimpleVar and onto its callers, + where control with TCL_LEAVE_ERR_MSG flag is more easily handled. + [Bug 2689307] + 2009-03-16 Donal K. Fellows * generic/tclCmdMZ.c (TryPostBody): [Bug 2688063]: Extract information diff --git a/generic/tclVar.c b/generic/tclVar.c index 0af352c..e61e06e 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.176 2009/02/10 23:08:57 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.177 2009/03/18 16:52:20 dgp Exp $ */ #include "tclInt.h" @@ -972,13 +972,9 @@ TclLookupSimpleVar( flags, &varNsPtr, &dummy1Ptr, &dummy2Ptr, &tail); if (varNsPtr == NULL) { *errMsgPtr = badNamespace; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - NULL); return NULL; } else if (tail == NULL) { *errMsgPtr = missingName; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", - NULL); return NULL; } if (tail != varName) { @@ -1001,7 +997,6 @@ TclLookupSimpleVar( } } else { /* Var wasn't found and not to create it. */ *errMsgPtr = noSuchVar; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); return NULL; } } @@ -1038,7 +1033,6 @@ TclLookupSimpleVar( } if (varPtr == NULL) { *errMsgPtr = noSuchVar; - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } } } @@ -3621,6 +3615,7 @@ TclPtrObjMakeUpvar( myFlags|AVOID_RESOLVERS, /* create */ 1, &errMsg, &index); if (varPtr == NULL) { TclObjVarErrMsg(interp, myNamePtr, NULL, "create", errMsg, -1); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); return TCL_ERROR; } } -- cgit v0.12 From 538c2afa4a7741c3a8a459feb9c27f13848b9e7b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 18 Mar 2009 17:08:11 +0000 Subject: * win/tclWinFile.c (TclpObjNormalizePath): Corrected Tcl_Obj leak. Thanks to Joe Mistachkin for detection and patch. [Bug 2688184]. --- ChangeLog | 3 +++ win/tclWinFile.c | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d52c8e5..f8e4462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-03-18 Don Porter + * win/tclWinFile.c (TclpObjNormalizePath): Corrected Tcl_Obj leak. + Thanks to Joe Mistachkin for detection and patch. [Bug 2688184]. + * generic/tclVar.c (TclLookupSimpleVar): Shift all calls to Tcl_SetErrorCode() out of TclLookupSimpleVar and onto its callers, where control with TCL_LEAVE_ERR_MSG flag is more easily handled. diff --git a/win/tclWinFile.c b/win/tclWinFile.c index bdbad41..46c8489 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.97 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.98 2009/03/18 17:08:11 dgp Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -2554,6 +2554,7 @@ TclpObjNormalizePath( char *lastValidPathEnd = NULL; Tcl_DString dsNorm; /* This will hold the normalized string. */ char *path, *currentPathEndPosition; + Tcl_Obj *temp = NULL; Tcl_DStringInit(&dsNorm); path = Tcl_GetString(pathPtr); @@ -2711,7 +2712,6 @@ TclpObjNormalizePath( * We're on WinNT (or 2000 or XP; something with an NT core). */ - Tcl_Obj *temp = NULL; int isDrive = 1; Tcl_DString ds; @@ -2983,6 +2983,16 @@ TclpObjNormalizePath( Tcl_DStringFree(&dsTemp); } Tcl_DStringFree(&dsNorm); + + /* + * This must be done after we are totally finished with 'path' as we are + * sharing the same underlying string. + */ + + if (temp != NULL) { + Tcl_DecrRefCount(temp); + } + return nextCheckpoint; } -- cgit v0.12 From e77ab61acdd95f64d2222c71c72f2b2db1a39f65 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Mar 2009 16:14:38 +0000 Subject: Added documentation for tailcall. --- ChangeLog | 4 ++++ doc/tailcall.n | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 doc/tailcall.n diff --git a/ChangeLog b/ChangeLog index f8e4462..f6e932a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-03-19 Donal K. Fellows + + * doc/tailcall.n: Added documentation for tailcall command. + 2009-03-18 Don Porter * win/tclWinFile.c (TclpObjNormalizePath): Corrected Tcl_Obj leak. diff --git a/doc/tailcall.n b/doc/tailcall.n new file mode 100644 index 0000000..2f8a305 --- /dev/null +++ b/doc/tailcall.n @@ -0,0 +1,69 @@ +'\" +'\" Copyright (c) 1993 The Regents of the University of California. +'\" Copyright (c) 1994-1996 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: tailcall.n,v 1.1 2009/03/19 16:14:52 dkf Exp $ +'\" +.so man.macros +.TH tailcall n 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +tailcall \- Replace the current procedure with another command +.SH SYNOPSIS +\fBtailcall \fIcommand\fR ?\fIarg ...\fR? +.BE +.SH DESCRIPTION +.PP +The \fBtailcall\fR command replaces the currently executing procedure, lambda +application, or method with another command. The \fIcommand\fR, which will +have \fIarg ...\fR passed as arguments if they are supplied, will be looked up +in the current namespace context, not in the caller's. Apart from that +difference in resolution, it is equivalent to: +.PP +.CS +uplevel 1 [list \fIcommand\fR ?\fIarg ...\fR?] +.CE +.PP +This command may not be invoked from within an \fBuplevel\fR into a procedure. +.SH EXAMPLE +.PP +Compute the factorial of a number. +.PP +.CS +proc factorial {n {accum 1}} { + if {$n < 2} { + return $accum + } + \fBtailcall\fR factorial [expr {$n - 1}] [expr {$accum * $n}] +} +.CE +.PP +Print the elements of a list with alternating lines having different +indentations. +.PP +.CS +proc printList {theList} { + if {[llength $theList]} { + puts "> [lindex $theList 0]" + \fBtailcall\fR printList2 [lrange $theList 1 end] + } +} +proc printList2 {theList} { + if {[llength $theList]} { + puts "< [lindex $theList 0]" + \fBtailcall\fR printList [lrange $theList 1 end] + } +} +.CE +.SH "SEE ALSO" +apply(n), proc(n), uplevel(n) +.SH KEYWORDS +call, recursion, tail recursion +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: -- cgit v0.12 From e6e54e79e2d7333a81f91a9525ed518f9d96a0cd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 19 Mar 2009 23:31:36 +0000 Subject: * generic/tcl.h: * generic/tclInt.h: * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclNamesp.c (Tcl_PopCallFrame): Rewritten tailcall implementation, ::unsupported::atProcExit is (temporarily?) gone. The new approach is much simpler, and also closer to being correct. This commit fixes [Bug 2649975] and [Bug 2695587]. * tests/coroutine.test: Moved the tests to their own files, * tests/tailcall.test: removed the unsupported.test. Added * tests/unsupported.test: tests for the fixed bugs. --- ChangeLog | 15 + generic/tcl.h | 3 +- generic/tclBasic.c | 102 +++--- generic/tclExecute.c | 145 +------- generic/tclInt.h | 49 ++- generic/tclNamesp.c | 31 +- tests/coroutine.test | 544 +++++++++++++++++++++++++++++ tests/tailcall.test | 428 +++++++++++++++++++++++ tests/unsupported.test | 914 ------------------------------------------------- 9 files changed, 1123 insertions(+), 1108 deletions(-) create mode 100644 tests/coroutine.test create mode 100644 tests/tailcall.test delete mode 100644 tests/unsupported.test diff --git a/ChangeLog b/ChangeLog index f6e932a..014bcde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2009-03-19 Miguel Sofer + + * generic/tcl.h: + * generic/tclInt.h: + * generic/tclBasic.c: + * generic/tclExecute.c: + * generic/tclNamesp.c (Tcl_PopCallFrame): Rewritten tailcall + implementation, ::unsupported::atProcExit is (temporarily?) + gone. The new approach is much simpler, and also closer to being + correct. This commit fixes [Bug 2649975] and [Bug 2695587]. + + * tests/coroutine.test: Moved the tests to their own files, + * tests/tailcall.test: removed the unsupported.test. Added + * tests/unsupported.test: tests for the fixed bugs. + 2009-03-19 Donal K. Fellows * doc/tailcall.n: Added documentation for tailcall command. diff --git a/generic/tcl.h b/generic/tcl.h index 72c4acd..b5bced7 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.288 2009/01/16 20:44:24 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.289 2009/03/19 23:31:36 msofer Exp $ */ #ifndef _TCL @@ -887,6 +887,7 @@ typedef struct Tcl_CallFrame { char *dummy10; char *dummy11; char *dummy12; + char *dummy13; } Tcl_CallFrame; /* diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 50230ba..739732f 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.387 2009/03/11 10:44:20 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.388 2009/03/19 23:31:37 msofer Exp $ */ #include "tclInt.h" @@ -136,8 +136,8 @@ static Tcl_NRPostProc TEOEx_ByteCodeCallback; static Tcl_NRPostProc NRRunObjProc; -static Tcl_NRPostProc AtProcExitCleanup; -static Tcl_NRPostProc NRAtProcExitEval; +static Tcl_NRPostProc TailcallCleanup; +static Tcl_NRPostProc NRTailcallEval; /* * The following structure define the commands in the Tcl core. @@ -698,7 +698,7 @@ Tcl_CreateInterp(void) #endif iPtr->pendingObjDataPtr = NULL; iPtr->asyncReadyPtr = TclGetAsyncReadyPtr(); - iPtr->atExitPtr = NULL; + iPtr->deferredCallbacks = NULL; /* * Create the core commands. Do it here, rather than calling @@ -782,14 +782,11 @@ Tcl_CreateInterp(void) Tcl_DisassembleObjCmd, NULL, NULL); /* - * Create the 'tailcall' command an unsupported command for 'atProcExit' + * Create the 'tailcall' command */ - Tcl_NRCreateCommand(interp, "tailcall", NULL, TclNRAtProcExitObjCmd, - INT2PTR(TCL_NR_TAILCALL_TYPE), NULL); - - Tcl_NRCreateCommand(interp, "::tcl::unsupported::atProcExit", NULL, - TclNRAtProcExitObjCmd, INT2PTR(TCL_NR_ATEXIT_TYPE), NULL); + Tcl_NRCreateCommand(interp, "tailcall", NULL, TclNRTailcallObjCmd, + NULL, NULL); #ifdef USE_DTRACE /* @@ -4056,7 +4053,7 @@ TclNREvalObjv( * will be filled later when the command is found: save its address at * objProcPtr. * - * data[1] stores a marker for use by tailcalls; it will be reset to 0 by + * data[1] stores a marker for use by tailcalls; it will be set to 1 by * command redirectors (imports, alias, ensembles) so that tailcalls * finishes the source command and not just the target. */ @@ -4064,6 +4061,8 @@ TclNREvalObjv( TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); + TclNRSpliceDeferred(interp); + iPtr->numLevels++; result = TclInterpReady(interp); @@ -4220,7 +4219,6 @@ TclNRRunCallbacks( (void) Tcl_GetObjResult(interp); } - restart: while (TOP_CB(interp) != rootPtr) { callbackPtr = TOP_CB(interp); @@ -4244,16 +4242,6 @@ TclNRRunCallbacks( result = procPtr(callbackPtr->data, interp, result); TCLNR_FREE(interp, callbackPtr); } - if (iPtr->atExitPtr) { - callbackPtr = iPtr->atExitPtr; - while (callbackPtr->nextPtr) { - callbackPtr = callbackPtr->nextPtr; - } - callbackPtr->nextPtr = rootPtr; - TOP_CB(iPtr) = iPtr->atExitPtr; - iPtr->atExitPtr = NULL; - goto restart; - } return result; } @@ -4286,6 +4274,7 @@ NRCommand( if (result == TCL_OK && TclLimitReady(iPtr->limit)) { result = Tcl_LimitCheck(interp); } + return result; } @@ -4327,11 +4316,10 @@ NRCallTEBC( switch (type) { case TCL_NR_BC_TYPE: return TclExecuteByteCode(interp, data[1]); - case TCL_NR_ATEXIT_TYPE: case TCL_NR_TAILCALL_TYPE: - /* For atProcExit and tailcalls */ + /* For tailcalls */ Tcl_SetResult(interp, - "atProcExit/tailcall can only be called from a proc or lambda", + "tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; case TCL_NR_YIELD_TYPE: @@ -5767,6 +5755,20 @@ TclNREvalObjEx( * UpdateStringOfList from the internal rep). */ + /* + * Shimmer protection! Always pass an unshared obj. The caller could + * incr the refCount of objPtr AFTER calling us! To be completely safe + * we always make a copy. The callback takes care od the refCounts for + * both listPtr and objPtr. + * + * FIXME OPT: preserve just the internal rep? + */ + + Tcl_IncrRefCount(objPtr); + listPtr = TclListObjCopy(interp, objPtr); + Tcl_IncrRefCount(listPtr); + TclDecrRefCount(objPtr); + if (word != INT_MIN) { /* * TIP #280 Structures for tracking lines. As we know that this is @@ -5795,26 +5797,14 @@ TclNREvalObjEx( eoFramePtr->framePtr = iPtr->framePtr; eoFramePtr->nextPtr = iPtr->cmdFramePtr; - eoFramePtr->cmd.listPtr = objPtr; + eoFramePtr->cmd.listPtr = listPtr; eoFramePtr->data.eval.path = NULL; iPtr->cmdFramePtr = eoFramePtr; } - /* - * Shimmer protection! Always pass an unshared obj. The caller could - * incr the refCount of objPtr AFTER calling us! To be completely safe - * we always make a copy. The callback takes care od the refCounts for - * both listPtr and objPtr. - * - * FIXME OPT: preserve just the internal rep? - */ - - Tcl_IncrRefCount(objPtr); - listPtr = TclListObjCopy(interp, objPtr); - Tcl_IncrRefCount(listPtr); - TclNRAddCallback(interp, TEOEx_ListCallback, objPtr, eoFramePtr, - listPtr, NULL); + TclNRDeferCallback(interp, TEOEx_ListCallback, listPtr, eoFramePtr, + NULL, NULL); ListObjGetElements(listPtr, objc, objv); return TclNREvalObjv(interp, objc, objv, flags, NULL); @@ -5991,9 +5981,8 @@ TEOEx_ListCallback( int result) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *objPtr = data[0]; + Tcl_Obj *listPtr = data[0]; CmdFrame *eoFramePtr = data[1]; - Tcl_Obj *listPtr = data[2]; /* * Remove the cmdFrame @@ -6003,7 +5992,6 @@ TEOEx_ListCallback( iPtr->cmdFramePtr = eoFramePtr->nextPtr; TclStackFree(interp, eoFramePtr); } - TclDecrRefCount(objPtr); TclDecrRefCount(listPtr); return result; @@ -7992,25 +7980,26 @@ Tcl_NRCmdSwap( */ int -TclNRAtProcExitObjCmd( +TclNRTailcallObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; + TEOV_callback *tailcallPtr; Tcl_Obj *listPtr; Namespace *nsPtr = iPtr->varFramePtr->nsPtr; - + if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); return TCL_ERROR; } - + if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ Tcl_SetResult(interp, - "atProcExit/tailcall can only be called from a proc or lambda", + "tailcall can only be called from a proc or lambda", TCL_STATIC); return TCL_ERROR; } @@ -8023,15 +8012,21 @@ TclNRAtProcExitObjCmd( * Add two callbacks: first the one to actually evaluate the tailcalled * command, then the one that signals TEBC to stash the first at its * proper place. + * + * Being lazy: add the callback, then remove it (to exploit the + * TclNRAddCallBack macro to build the callback) */ - TclNRAddCallback(interp, NRAtProcExitEval, listPtr, nsPtr, NULL, NULL); - TclNRAddCallback(interp, NRCallTEBC, clientData, NULL, NULL, NULL); + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, NULL, NULL); + tailcallPtr = TOP_CB(interp); + TOP_CB(interp) = tailcallPtr->nextPtr; + + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_TAILCALL_TYPE), tailcallPtr, NULL, NULL); return TCL_OK; } int -NRAtProcExitEval( +NRTailcallEval( ClientData data[], Tcl_Interp *interp, int result) @@ -8039,11 +8034,12 @@ NRAtProcExitEval( Interp *iPtr = (Interp *) interp; Tcl_Obj *listPtr = data[0]; Namespace *nsPtr = data[1]; + int omit = PTR2INT(data[2]); int objc; Tcl_Obj **objv; - TclNRAddCallback(interp, AtProcExitCleanup, listPtr, NULL, NULL, NULL); - if (result == TCL_OK) { + TclNRDeferCallback(interp, TailcallCleanup, listPtr, NULL, NULL, NULL); + if (!omit && (result == TCL_OK)) { iPtr->lookupNsPtr = nsPtr; ListObjGetElements(listPtr, objc, objv); result = TclNREvalObjv(interp, objc, objv, 0, NULL); @@ -8063,7 +8059,7 @@ NRAtProcExitEval( } static int -AtProcExitCleanup( +TailcallCleanup( ClientData data[], Tcl_Interp *interp, int result) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index e98545e..49862ae 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.428 2009/02/25 14:56:07 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.429 2009/03/19 23:31:37 msofer Exp $ */ #include "tclInt.h" @@ -177,8 +177,6 @@ typedef struct BottomData { TEOV_callback *rootPtr; /* State when this bytecode execution began: */ ByteCode *codePtr; /* constant until it returns */ /* ------------------------------------------*/ - TEOV_callback *atExitPtr; /* This field is used on return FROM here */ - /* ------------------------------------------*/ const unsigned char *pc; /* These fields are used on return TO this */ ptrdiff_t *catchTop; /* this level: they record the state when a */ int cleanup; /* new codePtr was received for NR execution */ @@ -189,7 +187,6 @@ typedef struct BottomData { bottomPtr->prevBottomPtr = oldBottomPtr; \ bottomPtr->rootPtr = TOP_CB(iPtr); \ bottomPtr->codePtr = codePtr; \ - bottomPtr->atExitPtr = NULL #define NR_DATA_BURY() \ bottomPtr->pc = pc; \ @@ -207,8 +204,6 @@ typedef struct BottomData { esPtr = iPtr->execEnvPtr->execStackPtr; \ tosPtr = esPtr->tosPtr -static Tcl_NRPostProc NRRestoreInterpState; - #define PUSH_AUX_OBJ(objPtr) \ objPtr->internalRep.twoPtrValue.ptr2 = auxObjList; \ auxObjList = objPtr @@ -1722,22 +1717,6 @@ TclIncrObj( *---------------------------------------------------------------------- */ -static int -NRRestoreInterpState( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - /* FIXME - * Save the current state somewhere for instrospection of what happened in - * the atExit handlers? - */ - - Tcl_InterpState state = data[0]; - - return Tcl_RestoreInterpState(interp, state); -} - int TclExecuteByteCode( Tcl_Interp *interp, /* Token for command interpreter. */ @@ -1835,8 +1814,6 @@ TclExecuteByteCode( */ int nested = 0; - TEOV_callback *atExitPtr = NULL; - int isTailcall = 0; if (!codePtr) { /* @@ -1884,65 +1861,28 @@ TclExecuteByteCode( codePtr = param; break; - case TCL_NR_ATEXIT_TYPE: { - /* - * A request to perform a command at exit: put it in the stack - * and continue exec'ing the current bytecode - */ - - TEOV_callback *newPtr = TOP_CB(interp); - - TOP_CB(interp) = newPtr->nextPtr; - -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " atProcExit request received\n"); - } -#endif - newPtr->nextPtr = bottomPtr->atExitPtr; - bottomPtr->atExitPtr = newPtr; - oldBottomPtr = bottomPtr; - goto returnToCaller; - } case TCL_NR_TAILCALL_TYPE: { /* - * A request to perform a tailcall: put it at the front of the - * atExit stack and abandon the current bytecode. + * A request to perform a tailcall: just drop this bytecode. */ - TEOV_callback *newPtr = TOP_CB(interp); - - TOP_CB(interp) = newPtr->nextPtr; - isTailcall = 1; #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " Tailcall request received\n"); } #endif + TEOV_callback *tailcallPtr = param; + + iPtr->varFramePtr->tailcallPtr = tailcallPtr; + if (catchTop != initCatchTop) { - isTailcall = 0; + tailcallPtr->data[2] = INT2PTR(1); result = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); + pc--; goto checkForCatch; } - - newPtr->nextPtr = NULL; - if (!bottomPtr->atExitPtr) { - newPtr->nextPtr = NULL; - bottomPtr->atExitPtr = newPtr; - } else { - /* - * There are already atExit callbacks: run last. - */ - - TEOV_callback *tmpPtr = bottomPtr->atExitPtr; - - while (tmpPtr->nextPtr) { - tmpPtr = tmpPtr->nextPtr; - } - tmpPtr->nextPtr = newPtr; - } goto abnormalReturn; } case TCL_NR_YIELD_TYPE: { /*[yield] */ @@ -1954,6 +1894,7 @@ TclExecuteByteCode( TCL_STATIC); Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); result = TCL_ERROR; + pc--; goto checkForCatch; } NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); @@ -1964,6 +1905,7 @@ TclExecuteByteCode( TCL_STATIC); Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); result = TCL_ERROR; + pc--; goto checkForCatch; } @@ -7823,7 +7765,6 @@ TclExecuteByteCode( TclArgumentBCRelease((Tcl_Interp*) iPtr,codePtr); oldBottomPtr = bottomPtr->prevBottomPtr; - atExitPtr = bottomPtr->atExitPtr; iPtr->cmdFramePtr = bcFramePtr->nextPtr; TclStackFree(interp, bottomPtr); /* free my stack */ @@ -7835,7 +7776,7 @@ TclExecuteByteCode( if (oldBottomPtr) { /* * Restore the state to what it was previous to this bytecode, deal - * with atExit handlers and tailcalls. + * with tailcalls. */ bottomPtr = oldBottomPtr; /* back to old bc */ @@ -7846,43 +7787,10 @@ TclExecuteByteCode( NR_DATA_DIG(); if (TOP_CB(interp) == bottomPtr->rootPtr) { /* - * The bytecode is returning, all callbacks were run. Run atExit - * handlers, remove the caller's arguments and keep processing the - * caller. + * The bytecode is returning, all callbacks were run. Remove the + * caller's arguments and keep processing the caller. */ - if (atExitPtr) { - /* - * Find the last one - */ - - TEOV_callback *lastPtr = atExitPtr; - while (lastPtr->nextPtr) { - lastPtr = lastPtr->nextPtr; - } - NRE_ASSERT(lastPtr->nextPtr == NULL); - if (!isTailcall) { - /* - * Save the interp state, arrange for restoring it after - * running the callbacks. - */ - - TclNRAddCallback(interp, NRRestoreInterpState, - Tcl_SaveInterpState(interp, result), NULL, - NULL, NULL); - } - - /* - * splice in the atExit callbacks and rerun all callbacks - */ - - lastPtr->nextPtr = TOP_CB(interp); - TOP_CB(interp) = atExitPtr; - isTailcall = 0; - atExitPtr = NULL; - goto rerunCallbacks; - } - while (cleanup--) { Tcl_Obj *objPtr = POP_OBJECT(); Tcl_DecrRefCount(objPtr); @@ -7903,7 +7811,6 @@ TclExecuteByteCode( */ goto nonRecursiveCallStart; - case TCL_NR_ATEXIT_TYPE: case TCL_NR_TAILCALL_TYPE: TOP_CB(iPtr) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); @@ -7919,32 +7826,6 @@ TclExecuteByteCode( } } - - if (atExitPtr) { - if (!isTailcall) { - /* - * Save the interp state, arrange for restoring it after running - * the callbacks. Put the callback at the bottom of the atExit - * stack. - */ - - Tcl_InterpState state = Tcl_SaveInterpState(interp, result); - TEOV_callback *lastPtr = atExitPtr; - - while (lastPtr->nextPtr) { - lastPtr = lastPtr->nextPtr; - } - NRE_ASSERT(lastPtr->nextPtr == NULL); - - TclNRAddCallback(interp, NRRestoreInterpState, state, NULL, - NULL, NULL); - lastPtr->nextPtr = TOP_CB(iPtr); - TOP_CB(iPtr) = TOP_CB(iPtr)->nextPtr; - lastPtr->nextPtr->nextPtr = NULL; - } - iPtr->atExitPtr = atExitPtr; - } - iPtr->execEnvPtr->bottomPtr = NULL; return result; } diff --git a/generic/tclInt.h b/generic/tclInt.h index 3f7a2dc..48473bd 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.418 2009/03/09 09:12:39 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.419 2009/03/19 23:31:37 msofer Exp $ */ #ifndef _TCLINT @@ -1056,6 +1056,13 @@ typedef struct CallFrame { * meaning of the value is, which we do not * specify. */ LocalCache *localCachePtr; + struct TEOV_callback *tailcallPtr; + /* The callback implementing the call to be + * executed by the command that pushed this + * frame. It can be TAILCALL_NONE to signal + * that we are tailcalling a frame further up + * the stack. + */ } CallFrame; #define FRAME_IS_PROC 0x1 @@ -2006,10 +2013,13 @@ typedef struct Interp { * tclOOInt.h and tclOO.c for real definition * and setup. */ - struct TEOV_callback *atExitPtr; - /* Callbacks to be run after a command exited; - * this is only set for atProcExirt or - * tailcalls that fall back out of tebc. */ + struct TEOV_callback *deferredCallbacks; + /* Callbacks that are set previous to a call + * to some Eval function but that actually + * belong to the command that is about to be + * called - ie, they should be run *before* + * any tailcall is invoked. + */ #ifdef TCL_COMPILE_STATS /* @@ -2589,7 +2599,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRTryObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; -MODULE_SCOPE Tcl_ObjCmdProc TclNRAtProcExitObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRTailcallObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; @@ -4208,6 +4218,33 @@ typedef struct TEOV_callback { TOP_CB(interp) = callbackPtr; \ } +#define TclNRDeferCallback(interp,postProcPtr,data0,data1,data2,data3) { \ + TEOV_callback *callbackPtr; \ + TCLNR_ALLOC((interp), (callbackPtr)); \ + callbackPtr->procPtr = (postProcPtr); \ + callbackPtr->data[0] = (ClientData)(data0); \ + callbackPtr->data[1] = (ClientData)(data1); \ + callbackPtr->data[2] = (ClientData)(data2); \ + callbackPtr->data[3] = (ClientData)(data3); \ + callbackPtr->nextPtr = ((Interp *)interp)->deferredCallbacks; \ + ((Interp *)interp)->deferredCallbacks = callbackPtr; \ + } + +#define TclNRSpliceCallbacks(interp,topPtr) { \ + TEOV_callback *bottomPtr = topPtr; \ + while (bottomPtr->nextPtr) { \ + bottomPtr = bottomPtr->nextPtr; \ + } \ + bottomPtr->nextPtr = TOP_CB(interp); \ + TOP_CB(interp) = topPtr; \ + } + +#define TclNRSpliceDeferred(interp) \ + if (((Interp *)interp)->deferredCallbacks) { \ + TclNRSpliceCallbacks(interp, ((Interp *)interp)->deferredCallbacks); \ + ((Interp *)interp)->deferredCallbacks = NULL; \ + } + #if NRE_USE_SMALL_ALLOC #define TCLNR_ALLOC(interp, ptr) \ TclSmallAllocEx(interp, sizeof(TEOV_callback), (ptr)) diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 20b28eb..8caf7db 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,10 +23,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.189 2009/02/10 22:50:07 nijtmans Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.190 2009/03/19 23:31:37 msofer Exp $ */ #include "tclInt.h" +#include "tclCompile.h" /* just for NRCommand */ /* * Thread-local storage used to avoid having a global lock on data that is not @@ -428,7 +429,8 @@ Tcl_PushCallFrame( framePtr->compiledLocals = NULL; framePtr->clientData = NULL; framePtr->localCachePtr = NULL; - + framePtr->tailcallPtr = NULL; + /* * Push the new call frame onto the interpreter's stack of procedure call * frames making it the current frame. @@ -454,6 +456,7 @@ Tcl_PushCallFrame( * Modifies the call stack of the interpreter. Resets various fields of * the popped call frame. If a namespace has been deleted and has no more * activations on the call stack, the namespace is destroyed. + * Schedules a tailcall if one is present. * *---------------------------------------------------------------------- */ @@ -505,6 +508,30 @@ Tcl_PopCallFrame( Tcl_DeleteNamespace((Tcl_Namespace *) nsPtr); } framePtr->nsPtr = NULL; + + if (framePtr->tailcallPtr) { + /* + * Find the splicing spot: right before the NRCommand of the thing being + * tailcalled. Note that we skip NRCommands marked in data[1] (used by + * command redirectors) + */ + + TEOV_callback *tailcallPtr, *runPtr; + + for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { + if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { + break; + } + } + if (!runPtr) { + Tcl_Panic("Tailcall cannot find the right splicing spot: should not happen!"); + } + + tailcallPtr = framePtr->tailcallPtr; + + tailcallPtr->nextPtr = runPtr->nextPtr; + runPtr->nextPtr = tailcallPtr; + } } /* diff --git a/tests/coroutine.test b/tests/coroutine.test new file mode 100644 index 0000000..fd3a3a1 --- /dev/null +++ b/tests/coroutine.test @@ -0,0 +1,544 @@ +# Commands covered: coroutine, yield, [info coroutine] +# +# This file contains a collection of tests for experimental commands that are +# found in ::tcl::unsupported. The tests will migrate to normal test files +# if/when the commands find their way into the core. +# +# Copyright (c) 2008 by Miguel Sofer. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: coroutine.test,v 1.1 2009/03/19 23:31:37 msofer Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* +} + +testConstraint testnrelevels [llength [info commands testnrelevels]] + +if {[testConstraint testnrelevels]} { + namespace eval testnre { + # + # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, + # cmdFrame level, callFrame level, tosPtr and callback depth + # + variable last [testnrelevels] + proc depthDiff {} { + variable last + set depth [testnrelevels] + set res {} + foreach t $depth l $last { + lappend res [expr {$t-$l}] + } + set last $depth + return $res + } + proc setabs {} { + uplevel 1 variable abs -[lindex [testnrelevels] 0] + } + + variable body0 { + set x [depthDiff] + if {[incr i] > 10} { + variable abs + incr abs [lindex [testnrelevels] 0] + return [list [lrange $x 0 3] $abs] + } + } + proc makebody txt { + variable body0 + return "$body0; $txt" + } + namespace export * + } + namespace import testnre::* +} + +set lambda [list {{start 0} {stop 10}} { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + yield [expr {$i*$stop}] + incr i + } +}] + + +test coroutine-1.1 {coroutine basic} -setup { + coroutine foo ::apply $lambda + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo] + } + set res +} -cleanup { + rename foo {} + unset res +} -result {0 10 20} + +test coroutine-1.2 {coroutine basic} -setup { + coroutine foo ::apply $lambda 2 8 + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo] + } + set res +} -cleanup { + rename foo {} + unset res +} -result {16 24 32} + +test coroutine-1.3 {yield returns new arg} -setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + set stop [yield [expr {$i*$stop}]] + incr i + } + } + coroutine foo ::apply [list {{start 2} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo $k] + } + set res +} -cleanup { + rename foo {} + unset res +} -result {20 6 12} + +test coroutine-1.4 {yield in nested proc} -setup { + proc moo {} { + upvar 1 i i stop stop + yield [expr {$i*$stop}] + } + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + moo + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo $k] + } + set res +} -cleanup { + rename foo {} + rename moo {} + unset body res +} -result {0 10 20} + +test coroutine-1.5 {just yield} -body { + coroutine foo yield + list [foo] [catch foo msg] $msg +} -cleanup { + unset msg +} -result {{} 1 {invalid command name "foo"}} + +test coroutine-1.6 {just yield} -body { + coroutine foo [list yield] + list [foo] [catch foo msg] $msg +} -cleanup { + unset msg +} -result {{} 1 {invalid command name "foo"}} + +test coroutine-1.7 {yield in nested uplevel} -setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + uplevel 0 [list yield [expr {$i*$stop}]] + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [eval foo $k] + } + set res +} -cleanup { + rename foo {} + unset body res +} -result {0 10 20} + +test coroutine-1.8 {yield in nested uplevel} -setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + uplevel 0 yield [expr {$i*$stop}] + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [eval foo $k] + } + set res +} -cleanup { + rename foo {} + unset body res +} -result {0 10 20} + +test coroutine-1.9 {yield in nested eval} -setup { + proc moo {} { + upvar 1 i i stop stop + yield [expr {$i*$stop}] + } + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + eval moo + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [foo $k] + } + set res +} -cleanup { + rename moo {} + unset body res +} -result {0 10 20} + +test coroutine-1.10 {yield in nested eval} -setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + eval yield [expr {$i*$stop}] + incr i + } + } + coroutine foo ::apply [list {{start 0} {stop 10}} $body] + set res {} +} -body { + for {set k 1} {$k < 4} {incr k} { + lappend res [eval foo $k] + } + set res +} -cleanup { + unset body res +} -result {0 10 20} + +test coroutine-1.11 {yield outside coroutine} -setup { + proc moo {} { + upvar 1 i i stop stop + yield [expr {$i*$stop}] + } +} -body { + variable i 5 stop 6 + moo +} -cleanup { + rename moo {} + unset i stop +} -returnCodes error -result {yield can only be called in a coroutine} + +test coroutine-1.12 {proc as coroutine} -setup { + set body { + # init + set i $start + set imax $stop + yield + + while {$i < $imax} { + uplevel 0 [list yield [expr {$i*$stop}]] + incr i + } + } + proc moo {{start 0} {stop 10}} $body + coroutine foo moo 2 8 +} -body { + list [foo] [foo] +} -cleanup { + unset body + rename moo {} + rename foo {} +} -result {16 24} + +test coroutine-2.1 {self deletion on return} -body { + coroutine foo set x 3 + foo +} -returnCodes error -result {invalid command name "foo"} + +test coroutine-2.2 {self deletion on return} -body { + coroutine foo ::apply [list {} {yield; yield 1; return 2}] + list [foo] [foo] [catch foo msg] $msg +} -result {1 2 1 {invalid command name "foo"}} + +test coroutine-2.3 {self deletion on error return} -body { + coroutine foo ::apply [list {} {yield;yield 1; error ouch!}] + list [foo] [catch foo msg] $msg [catch foo msg] $msg +} -result {1 1 ouch! 1 {invalid command name "foo"}} + +test coroutine-2.4 {self deletion on other return} -body { + coroutine foo ::apply [list {} {yield;yield 1; return -code 100 ouch!}] + list [foo] [catch foo msg] $msg [catch foo msg] $msg +} -result {1 100 ouch! 1 {invalid command name "foo"}} + +test coroutine-2.5 {deletion of suspended coroutine} -body { + coroutine foo ::apply [list {} {yield; yield 1; return 2}] + list [foo] [rename foo {}] [catch foo msg] $msg +} -result {1 {} 1 {invalid command name "foo"}} + +test coroutine-2.6 {deletion of running coroutine} -body { + coroutine foo ::apply [list {} {yield; rename foo {}; yield 1; return 2}] + list [foo] [catch foo msg] $msg +} -result {1 1 {invalid command name "foo"}} + +test coroutine-3.1 {info level computation} -setup { + proc a {} {while 1 {yield [info level]}} + proc b {} foo +} -body { + # note that coroutines execute in uplevel #0 + set l0 [coroutine foo a] + set l1 [foo] + set l2 [b] + list $l0 $l1 $l2 +} -cleanup { + rename a {} + rename b {} +} -result {1 1 1} + +test coroutine-3.2 {info frame computation} -setup { + proc a {} {while 1 {yield [info frame]}} + proc b {} foo +} -body { + set l0 [coroutine foo a] + set l1 [foo] + set l2 [b] + expr {$l2 - $l1} +} -cleanup { + rename a {} + rename b {} +} -result 1 + +test coroutine-3.3 {info coroutine} -setup { + proc a {} {info coroutine} + proc b {} a +} -body { + b +} -cleanup { + rename a {} + rename b {} +} -result {} + +test coroutine-3.4 {info coroutine} -setup { + proc a {} {info coroutine} + proc b {} a +} -body { + coroutine foo b +} -cleanup { + rename a {} + rename b {} +} -result ::foo + +test coroutine-3.5 {info coroutine} -setup { + proc a {} {info coroutine} + proc b {} {rename [info coroutine] {}; a} +} -body { + coroutine foo b +} -cleanup { + rename a {} + rename b {} +} -result {} + + +test coroutine-4.1 {bug #2093188} -setup { + proc foo {} { + set v 1 + trace add variable v {write unset} bar + yield + set v 2 + yield + set v 3 + } + proc bar args {lappend ::res $args} + coroutine a foo +} -body { + list [a] [a] $::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{} 3 {{v {} write} {v {} write} {v {} unset}}} + +test coroutine-4.2 {bug #2093188} -setup { + proc foo {} { + set v 1 + trace add variable v {read unset} bar + yield + set v 2 + set v + yield + set v 3 + } + proc bar args {lappend ::res $args} + coroutine a foo +} -body { + list [a] [a] $::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{} 3 {{v {} read} {v {} unset}}} + +test coroutine-4.3 {bug #2093947} -setup { + proc foo {} { + set v 1 + trace add variable v {write unset} bar + yield + set v 2 + yield + set v 3 + } + proc bar args {lappend ::res $args} +} -body { + coroutine a foo + a + a + coroutine a foo + a + rename a {} + set ::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{v {} write} {v {} write} {v {} unset} {v {} write} {v {} unset}} + +test coroutine-5.1 {right numLevels on coro return} -constraints {testnrelevels} \ +-setup { + proc nestedYield {{val {}}} { + yield $val + } + proc getNumLevel {} { + # remove the level for this proc's call + expr {[lindex [testnrelevels] 1] - 1} + } + proc relativeLevel base { + # remove the level for this proc's call + expr {[getNumLevel] - $base - 1} + } + proc foo {} { + while 1 { + nestedYield + } + } + set res {} +} -body { + set base [getNumLevel] + lappend res [relativeLevel $base] + eval {coroutine a foo} + + # back to base level + lappend res [relativeLevel $base] + a + lappend res [relativeLevel $base] + eval a + lappend res [relativeLevel $base] + eval {eval a} + lappend res [relativeLevel $base] + rename a {} + lappend res [relativeLevel $base] + set res +} -cleanup { + rename foo {} + rename nestedYield {} + rename getNumLevel {} + rename relativeLevel {} + unset res +} -result {0 0 0 0 0 0} + +test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ +-setup { + proc nestedYield {{val {}}} { + yield $val + } + proc getNumLevel {} { + # remove the level for this proc's call + expr {[lindex [testnrelevels] 1] - 1} + } + proc relativeLevel base { + # remove the level for this proc's call + expr {[getNumLevel] - $base - 1} + } + proc foo base { + while 1 { + set base [nestedYield [relativeLevel $base]] + } + } + set res {} +} -body { + lappend res [eval {coroutine a foo [getNumLevel]}] + lappend res [a [getNumLevel]] + lappend res [eval {a [getNumLevel]}] + lappend res [eval {eval {a [getNumLevel]}}] + set base [lindex $res 0] + foreach x $res[set res {}] { + lappend res [expr {$x-$base}] + } + set res +} -cleanup { + rename a {} + rename foo {} + rename nestedYield {} + rename getNumLevel {} + rename relativeLevel {} + unset res +} -result {0 0 0 0} + + + +# cleanup +::tcltest::cleanupTests + + +unset -nocomplain lambda + +if {[testConstraint testnrelevels]} { + namespace forget testnre::* + namespace delete testnre +} + +return diff --git a/tests/tailcall.test b/tests/tailcall.test new file mode 100644 index 0000000..a3cf88e --- /dev/null +++ b/tests/tailcall.test @@ -0,0 +1,428 @@ +# Commands covered: tailcall +# +# This file contains a collection of tests for experimental commands that are +# found in ::tcl::unsupported. The tests will migrate to normal test files +# if/when the commands find their way into the core. +# +# Copyright (c) 2008 by Miguel Sofer. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# +# RCS: @(#) $Id: tailcall.test,v 1.1 2009/03/19 23:31:37 msofer Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* +} + +testConstraint testnrelevels [llength [info commands testnrelevels]] + +# +# The tests that risked blowing the C stack on failure have been removed: we +# can now actually measure using testnrelevels. +# + +if {[testConstraint testnrelevels]} { + namespace eval testnre { + # + # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, + # cmdFrame level, callFrame level, tosPtr and callback depth + # + variable last [testnrelevels] + proc depthDiff {} { + variable last + set depth [testnrelevels] + set res {} + foreach t $depth l $last { + lappend res [expr {$t-$l}] + } + set last $depth + return $res + } + proc setabs {} { + uplevel 1 variable abs -[lindex [testnrelevels] 0] + } + + variable body0 { + set x [depthDiff] + if {[incr i] > 10} { + variable abs + incr abs [lindex [testnrelevels] 0] + return [list [lrange $x 0 3] $abs] + } + } + proc makebody txt { + variable body0 + return "$body0; $txt" + } + namespace export * + } + namespace import testnre::* +} + +test tailcall-0 {tailcall is constant space} -constraints testnrelevels -setup { + proc a i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + tailcall a $i + } +} -body { + a 0 +} -cleanup { + rename a {} +} -result {0 0 0 0 0 0} + +test tailcall-1 {tailcall} -body { + namespace eval a { + variable x *::a + proc xset {} { + set tmp {} + set ns {[namespace current]} + set level [info level] + for {set i 0} {$i <= [info level]} {incr i} { + uplevel #$i "set x $i$ns" + lappend tmp "$i [info level $i]" + } + lrange $tmp 1 end + } + proc foo {} {tailcall xset; set x noreach} + } + namespace eval b { + variable x *::b + proc xset args {error b::xset} + proc moo {} {set x 0; variable y [::a::foo]; set x} + } + variable x *:: + proc xset args {error ::xset} + list [::b::moo] | $x $a::x $b::x | $::b::y +} -cleanup { + unset x + rename xset {} + namespace delete a b +} -result {1::b | 0:: *::a *::b | {{1 ::b::moo} {2 xset}}} + + +test tailcall-2 {tailcall in non-proc} -body { + namespace eval a [list tailcall set x 1] +} -match glob -result *tailcall* -returnCodes error + +test tailcall-3 {tailcall falls off tebc} -body { + unset -nocomplain x + proc foo {} {tailcall set x 1} + list [catch foo msg] $msg [set x] +} -cleanup { + rename foo {} + unset x +} -result {0 1 1} + +test tailcall-4 {tailcall falls off tebc} -body { + set x 2 + proc foo {} {tailcall set x 1} + foo + set x +} -cleanup { + rename foo {} + unset x +} -result 1 + +test tailcall-5 {tailcall falls off tebc} -body { + set x 2 + namespace eval bar { + variable x 3 + proc foo {} {tailcall set x 1} + } + bar::foo + list $x $bar::x +} -cleanup { + unset x + namespace delete bar +} -result {1 3} + +test tailcall-6 {tailcall does remove callframes} -body { + proc foo {} {info level} + proc moo {} {tailcall foo} + proc boo {} {expr {[moo] - [info level]}} + boo +} -cleanup { + rename foo {} + rename moo {} + rename boo {} +} -result 1 + +test tailcall-7 {tailcall does return} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall set x 1 + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + } +} -body { + namespace eval ::foo c +} -cleanup { + namespace delete ::foo +} -result cbabc + +test tailcall-8 {tailcall tailcall} -setup { + namespace eval ::foo { + variable res {} + proc a {} { + variable res + append res a + tailcall tailcall set x 1 + append res a + } + proc b {} { + variable res + append res b + a + append res b + } + proc c {} { + variable res + append res c + b + append res c + } + } +} -body { + namespace eval ::foo c +} -cleanup { + namespace delete ::foo +} -match glob -result *tailcall* -returnCodes error + +test tailcall-9 {tailcall factorial} -setup { + proc fact {n {b 1}} { + if {$n == 1} { + return $b + } + tailcall fact [expr {$n-1}] [expr {$n*$b}] + } +} -body { + list [fact 1] [fact 5] [fact 10] [fact 15] +} -cleanup { + rename fact {} +} -result {1 120 3628800 1307674368000} + +test tailcall-10 {tailcall and eval} -constraints {knownBug} -setup { + proc a {} { + eval [list tailcall lappend ::x 2] + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -result {1 2} + +test tailcall-11 {tailcall and uplevel} -constraints {knownBug} -setup { + proc a {} { + uplevel 1 [list tailcall set ::x 2] + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -result {1 2} + +# cleanup +::tcltest::cleanupTests + + +test tailcall-12.1 {[Bug 2649975]} -setup { + proc dump {{text {}}} { + set text [uplevel 1 [list subst $text]] + set l [expr {[info level] -1}] + if {$text eq {}} { + set text [info level $l] + } + puts "$l: $text" + } + # proc dump args {} + proc bravo {} { + upvar 1 v w + dump {inside bravo, v -> $w} + set v "procedure bravo" + #uplevel 1 [list delta ::betty] + uplevel 1 {delta ::betty} + return $::resolution + } + proc delta name { + upvar 1 v w + dump {inside delta, v -> $w} + set v "procedure delta" + tailcall foxtrot + } + proc foxtrot {} { + upvar 1 v w + dump {inside foxtrot, v -> $w} + global resolution + set ::resolution $w + } + set v "global level" +} -body { + set result [bravo] + if {$result ne $v} { + puts "v should have been found at $v but was found in $result" + } +} -cleanup { + unset v + rename dump {} + rename bravo {} + rename delta {} + rename foxtrot {} +} -output {1: inside bravo, v -> global level +1: inside delta, v -> global level +1: inside foxtrot, v -> global level +} + +test tailcall-12.2 {[Bug 2649975]} -setup { + proc dump {{text {}}} { + set text [uplevel 1 [list subst $text]] + set l [expr {[info level] -1}] + if {$text eq {}} { + set text [info level $l] + } + puts "$l: $text" + } + # proc dump args {} + set v "global level" + oo::class create foo { # like connection + method alpha {} { # like connections 'tables' method + dump + upvar 1 v w + dump {inside foo's alpha, v resolves to $w} + set v "foo's method alpha" + dump {foo's alpha is calling [self] bravo - v should resolve at global level} + set result [uplevel 1 [list [self] bravo]] + dump {exiting from foo's alpha} + return $result + } + method bravo {} { # like connections 'foreach' method + dump + upvar 1 v w + dump {inside foo's bravo, v resolves to $w} + set v "foo's method bravo" + dump {foo's bravo is calling charlie to create barney} + set barney [my charlie ::barney] + dump {foo's bravo is calling bravo on $barney} + dump {v should resolve at global scope there} + set result [uplevel 1 [list $barney bravo]] + dump {exiting from foo's bravo} + return $result + } + method charlie {name} { # like tdbc prepare + dump + set v "foo's method charlie" + dump {tailcalling bar's constructor} + tailcall ::bar create $name + } + } + oo::class create bar { # like statement + method bravo {} { # like statement foreach method + dump + upvar 1 v w + dump {inside bar's bravo, v is resolving to $w} + set v "bar's method bravo" + dump {calling delta to construct betty - v should resolve global there} + uplevel 1 [list [self] delta ::betty] + dump {exiting from bar's bravo} + return [::betty whathappened] + } + method delta {name} { # like statement execute method + dump + upvar 1 v w + dump {inside bar's delta, v is resolving to $w} + set v "bar's method delta" + dump {tailcalling to construct $name as instance of grill} + dump {v should resolve at global level in grill's constructor} + dump {grill's constructor should run at level [info level]} + tailcall grill create $name + } + } + oo::class create grill { + variable resolution + constructor {} { + dump + upvar 1 v w + dump "in grill's constructor, v resolves to $w" + set resolution $w + } + method whathappened {} { + return $resolution + } + } + foo create fred +} -body { + set result [fred alpha] + if {$result ne "global level"} { + puts "v should have been found at global level but was found in $result" + } +} -cleanup { + unset result + rename fred {} + rename dump {} + rename foo {} + rename bar {} + rename grill {} +} -output {1: fred alpha +1: inside foo's alpha, v resolves to global level +1: foo's alpha is calling ::fred bravo - v should resolve at global level +1: ::fred bravo +1: inside foo's bravo, v resolves to global level +1: foo's bravo is calling charlie to create barney +2: my charlie ::barney +2: tailcalling bar's constructor +1: foo's bravo is calling bravo on ::barney +1: v should resolve at global scope there +1: ::barney bravo +1: inside bar's bravo, v is resolving to global level +1: calling delta to construct betty - v should resolve global there +1: ::barney delta ::betty +1: inside bar's delta, v is resolving to global level +1: tailcalling to construct ::betty as instance of grill +1: v should resolve at global level in grill's constructor +1: grill's constructor should run at level 1 +1: grill create ::betty +1: in grill's constructor, v resolves to global level +1: exiting from bar's bravo +1: exiting from foo's bravo +1: exiting from foo's alpha +} + +test tailcall-12.3 {[Bug 2695587]} -setup { + proc a {} { + list [catch {tailcall foo} msg] $msg + } +} -body { + a +} -cleanup { + rename a {} +} -result {1 {Tailcall called from within a catch environment}} + + +if {[testConstraint testnrelevels]} { + namespace forget testnre::* + namespace delete testnre +} + +# cleanup +::tcltest::cleanupTests diff --git a/tests/unsupported.test b/tests/unsupported.test deleted file mode 100644 index 0c706b8..0000000 --- a/tests/unsupported.test +++ /dev/null @@ -1,914 +0,0 @@ -# Commands covered: tailcall, atProcExit, coroutine, yield -# -# This file contains a collection of tests for experimental commands that are -# found in ::tcl::unsupported. The tests will migrate to normal test files -# if/when the commands find their way into the core. -# -# Copyright (c) 2008 by Miguel Sofer. -# -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: unsupported.test,v 1.15 2008/10/14 18:49:47 dgp Exp $ - -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest - namespace import -force ::tcltest::* -} - -testConstraint testnrelevels [llength [info commands testnrelevels]] -testConstraint atProcExit [llength [info commands ::tcl::unsupported::atProcExit]] - -if {[namespace exists tcl::unsupported]} { - namespace eval tcl::unsupported namespace export * - namespace import tcl::unsupported::* -} - -# -# The tests that risked blowing the C stack on failure have been removed: we -# can now actually measure using testnrelevels. -# - -if {[testConstraint testnrelevels]} { - namespace eval testnre { - # - # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, - # cmdFrame level, callFrame level, tosPtr and callback depth - # - variable last [testnrelevels] - proc depthDiff {} { - variable last - set depth [testnrelevels] - set res {} - foreach t $depth l $last { - lappend res [expr {$t-$l}] - } - set last $depth - return $res - } - proc setabs {} { - uplevel 1 variable abs -[lindex [testnrelevels] 0] - } - - variable body0 { - set x [depthDiff] - if {[incr i] > 10} { - variable abs - incr abs [lindex [testnrelevels] 0] - return [list [lrange $x 0 3] $abs] - } - } - proc makebody txt { - variable body0 - return "$body0; $txt" - } - namespace export * - } - namespace import testnre::* -} - -# -# Test atProcExit -# - -test unsupported-A.1 {atProcExit works} -constraints {atProcExit} -setup { - variable x x y y - proc a {} { - variable x 0 y 0 - atProcExit set ::x 1 - set x 2 - set y $x - set x 3 - } - proc b {} a -} -body { - list [b] $x $y -} -cleanup { - unset x y - rename a {} - rename b {} -} -result {3 1 2} - -test unsupported-A.2 {atProcExit} -constraints {atProcExit} -setup { - variable x x y x - proc a {} { - variable x 0 y 0 - atProcExit set ::x 1 - set x 2 - set y $x - set x 3 - } -} -body { - list [a] $x $y -} -cleanup { - unset x y - rename a {} -} -result {3 1 2} - -test unsupported-A.3 {atProcExit} -constraints {atProcExit} -setup { - variable x x y y - proc a {} { - variable x 0 y 0 - atProcExit lappend ::x 1 - lappend x 2 - atProcExit lappend ::x 3 - lappend y $x - lappend x 4 - return 5 - } -} -body { - list [a] $x $y -} -cleanup { - unset x y - rename a {} -} -result {5 {0 2 4 3 1} {0 {0 2}}} - -test unsupported-A.4 {atProcExit errors} -constraints {atProcExit} -setup { - variable x x y y - proc a {} { - variable x 0 y 0 - atProcExit lappend ::x 1 - lappend x 2 - atProcExit lappend ::x 3 - lappend y $x - lappend x 4 - error foo - } -} -body { - list [a] $x $y -} -cleanup { - unset x y - rename a {} -} -returnCodes error -result foo - -test unsupported-A.5 {atProcExit errors} -constraints {atProcExit} -setup { - variable x x y y - proc a {} { - variable x 0 y 0 - atProcExit error foo - lappend x 2 - atProcExit lappend ::x 3 - lappend y $x - lappend x 4 - return 5 - } -} -body { - list [a] $x $y -} -cleanup { - unset x y - rename a {} -} -result {5 {0 2 4 3} {0 {0 2}}} - -test unsupported-A.6 {atProcExit errors} -constraints {atProcExit} -setup { - variable x x y y - proc a {} { - variable x 0 y 0 - atProcExit lappend ::x 1 - lappend x 2 - atProcExit error foo - lappend y $x - lappend x 4 - return 5 - } -} -body { - list [a] $x $y -} -cleanup { - unset x y - rename a {} -} -result {5 {0 2 4} {0 {0 2}}} - -test unsupported-A.7 {atProcExit non-proc} -constraints {atProcExit} -body { - atProcExit set x 2 - set x 1 -} -cleanup { - unset -nocomplain x -} -match glob -result *atProcExit* -returnCodes error - -test unsupported-A.8 {atProcExit and eval} -constraints {knownBug atProcExit} -setup { - proc a {} { - eval atProcExit lappend ::x 2 - set ::x 1 - } -} -body { - list [a] $::x -} -cleanup { - unset -nocomplain ::x -} -result {1 2} - -test unsupported-A9 {atProcExit and uplevel} -constraints {knownBug atProcExit} -setup { - proc a {} { - uplevel 1 [list atProcExit set ::x 2] - set ::x 1 - } -} -body { - list [a] $::x -} -cleanup { - unset -nocomplain ::x -} -result {1 2} - - -# -# Test tailcalls -# - -test unsupported-T.0 {tailcall is constant space} -constraints testnrelevels -setup { - proc a i { - if {[incr i] > 10} { - return [depthDiff] - } - depthDiff - tailcall a $i - } -} -body { - a 0 -} -cleanup { - rename a {} -} -result {0 0 0 0 0 0} - -test unsupported-T.1 {tailcall} -body { - namespace eval a { - variable x *::a - proc xset {} { - set tmp {} - set ns {[namespace current]} - set level [info level] - for {set i 0} {$i <= [info level]} {incr i} { - uplevel #$i "set x $i$ns" - lappend tmp "$i [info level $i]" - } - lrange $tmp 1 end - } - proc foo {} {tailcall xset; set x noreach} - } - namespace eval b { - variable x *::b - proc xset args {error b::xset} - proc moo {} {set x 0; variable y [::a::foo]; set x} - } - variable x *:: - proc xset args {error ::xset} - list [::b::moo] | $x $a::x $b::x | $::b::y -} -cleanup { - unset x - rename xset {} - namespace delete a b -} -result {1::b | 0:: *::a *::b | {{1 ::b::moo} {2 xset}}} - - -test unsupported-T.2 {tailcall in non-proc} -body { - namespace eval a [list tailcall set x 1] -} -match glob -result *tailcall* -returnCodes error - -test unsupported-T.3 {tailcall falls off tebc} -body { - unset -nocomplain x - proc foo {} {tailcall set x 1} - list [catch foo msg] $msg [set x] -} -cleanup { - rename foo {} - unset x -} -result {0 1 1} - -test unsupported-T.4 {tailcall falls off tebc} -body { - set x 2 - proc foo {} {tailcall set x 1} - foo - set x -} -cleanup { - rename foo {} - unset x -} -result 1 - -test unsupported-T.5 {tailcall falls off tebc} -body { - set x 2 - namespace eval bar { - variable x 3 - proc foo {} {tailcall set x 1} - } - bar::foo - list $x $bar::x -} -cleanup { - unset x - namespace delete bar -} -result {1 3} - -test unsupported-T.6 {tailcall does remove callframes} -body { - proc foo {} {info level} - proc moo {} {tailcall foo} - proc boo {} {expr {[moo] - [info level]}} - boo -} -cleanup { - rename foo {} - rename moo {} - rename boo {} -} -result 1 - -test unsupported-T.7 {tailcall does return} -setup { - namespace eval ::foo { - variable res {} - proc a {} { - variable res - append res a - tailcall set x 1 - append res a - } - proc b {} { - variable res - append res b - a - append res b - } - proc c {} { - variable res - append res c - b - append res c - } - } -} -body { - namespace eval ::foo c -} -cleanup { - namespace delete ::foo -} -result cbabc - -test unsupported-T.8 {tailcall tailcall} -setup { - namespace eval ::foo { - variable res {} - proc a {} { - variable res - append res a - tailcall tailcall set x 1 - append res a - } - proc b {} { - variable res - append res b - a - append res b - } - proc c {} { - variable res - append res c - b - append res c - } - } -} -body { - namespace eval ::foo c -} -cleanup { - namespace delete ::foo -} -match glob -result *tailcall* -returnCodes error - -test unsupported-T.9 {tailcall factorial} -setup { - proc fact {n {b 1}} { - if {$n == 1} { - return $b - } - tailcall fact [expr {$n-1}] [expr {$n*$b}] - } -} -body { - list [fact 1] [fact 5] [fact 10] [fact 15] -} -cleanup { - rename fact {} -} -result {1 120 3628800 1307674368000} - -test unsupported-T.10 {tailcall and eval} -constraints {knownBug atProcExit} -setup { - proc a {} { - eval [list tailcall lappend ::x 2] - set ::x 1 - } -} -body { - list [a] $::x -} -cleanup { - unset -nocomplain ::x -} -result {1 2} - -test unsupported-T.11 {tailcall and uplevel} -constraints {knownBug atProcExit} -setup { - proc a {} { - uplevel 1 [list tailcall set ::x 2] - set ::x 1 - } -} -body { - list [a] $::x -} -cleanup { - unset -nocomplain ::x -} -result {1 2} - -# -# Test both together -# - -test unsupported-AT.1 {atProcExit and tailcall} -constraints { - atProcExit -} -setup { - variable x x y y - proc a {} { - variable x 0 y 0 - atProcExit lappend ::x 1 - lappend x 2 - atProcExit lappend ::x 3 - tailcall lappend ::x 6 - lappend y $x - lappend x 4 - return 5 - } -} -body { - list [a] $x $y -} -cleanup { - unset x y - rename a {} -} -result {{0 2 3 1 6} {0 2 3 1 6} 0} - -# -# Test coroutines -# - -set lambda [list {{start 0} {stop 10}} { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - yield [expr {$i*$stop}] - incr i - } -}] - - -test unsupported-C.1.1 {coroutine basic} -setup { - coroutine foo ::apply $lambda - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [foo] - } - set res -} -cleanup { - rename foo {} - unset res -} -result {0 10 20} - -test unsupported-C.1.2 {coroutine basic} -setup { - coroutine foo ::apply $lambda 2 8 - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [foo] - } - set res -} -cleanup { - rename foo {} - unset res -} -result {16 24 32} - -test unsupported-C.1.3 {yield returns new arg} -setup { - set body { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - set stop [yield [expr {$i*$stop}]] - incr i - } - } - coroutine foo ::apply [list {{start 2} {stop 10}} $body] - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [foo $k] - } - set res -} -cleanup { - rename foo {} - unset res -} -result {20 6 12} - -test unsupported-C.1.4 {yield in nested proc} -setup { - proc moo {} { - upvar 1 i i stop stop - yield [expr {$i*$stop}] - } - set body { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - moo - incr i - } - } - coroutine foo ::apply [list {{start 0} {stop 10}} $body] - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [foo $k] - } - set res -} -cleanup { - rename foo {} - rename moo {} - unset body res -} -result {0 10 20} - -test unsupported-C.1.5 {just yield} -body { - coroutine foo yield - list [foo] [catch foo msg] $msg -} -cleanup { - unset msg -} -result {{} 1 {invalid command name "foo"}} - -test unsupported-C.1.6 {just yield} -body { - coroutine foo [list yield] - list [foo] [catch foo msg] $msg -} -cleanup { - unset msg -} -result {{} 1 {invalid command name "foo"}} - -test unsupported-C.1.7 {yield in nested uplevel} -setup { - set body { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - uplevel 0 [list yield [expr {$i*$stop}]] - incr i - } - } - coroutine foo ::apply [list {{start 0} {stop 10}} $body] - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [eval foo $k] - } - set res -} -cleanup { - rename foo {} - unset body res -} -result {0 10 20} - -test unsupported-C.1.8 {yield in nested uplevel} -setup { - set body { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - uplevel 0 yield [expr {$i*$stop}] - incr i - } - } - coroutine foo ::apply [list {{start 0} {stop 10}} $body] - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [eval foo $k] - } - set res -} -cleanup { - rename foo {} - unset body res -} -result {0 10 20} - -test unsupported-C.1.9 {yield in nested eval} -setup { - proc moo {} { - upvar 1 i i stop stop - yield [expr {$i*$stop}] - } - set body { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - eval moo - incr i - } - } - coroutine foo ::apply [list {{start 0} {stop 10}} $body] - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [foo $k] - } - set res -} -cleanup { - rename moo {} - unset body res -} -result {0 10 20} - -test unsupported-C.1.10 {yield in nested eval} -setup { - set body { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - eval yield [expr {$i*$stop}] - incr i - } - } - coroutine foo ::apply [list {{start 0} {stop 10}} $body] - set res {} -} -body { - for {set k 1} {$k < 4} {incr k} { - lappend res [eval foo $k] - } - set res -} -cleanup { - unset body res -} -result {0 10 20} - -test unsupported-C.1.11 {yield outside coroutine} -setup { - proc moo {} { - upvar 1 i i stop stop - yield [expr {$i*$stop}] - } -} -body { - variable i 5 stop 6 - moo -} -cleanup { - rename moo {} - unset i stop -} -returnCodes error -result {yield can only be called in a coroutine} - -test unsupported-C.1.12 {proc as coroutine} -setup { - set body { - # init - set i $start - set imax $stop - yield - - while {$i < $imax} { - uplevel 0 [list yield [expr {$i*$stop}]] - incr i - } - } - proc moo {{start 0} {stop 10}} $body - coroutine foo moo 2 8 -} -body { - list [foo] [foo] -} -cleanup { - unset body - rename moo {} - rename foo {} -} -result {16 24} - -test unsupported-C.2.1 {self deletion on return} -body { - coroutine foo set x 3 - foo -} -returnCodes error -result {invalid command name "foo"} - -test unsupported-C.2.2 {self deletion on return} -body { - coroutine foo ::apply [list {} {yield; yield 1; return 2}] - list [foo] [foo] [catch foo msg] $msg -} -result {1 2 1 {invalid command name "foo"}} - -test unsupported-C.2.3 {self deletion on error return} -body { - coroutine foo ::apply [list {} {yield;yield 1; error ouch!}] - list [foo] [catch foo msg] $msg [catch foo msg] $msg -} -result {1 1 ouch! 1 {invalid command name "foo"}} - -test unsupported-C.2.4 {self deletion on other return} -body { - coroutine foo ::apply [list {} {yield;yield 1; return -code 100 ouch!}] - list [foo] [catch foo msg] $msg [catch foo msg] $msg -} -result {1 100 ouch! 1 {invalid command name "foo"}} - -test unsupported-C.2.5 {deletion of suspended coroutine} -body { - coroutine foo ::apply [list {} {yield; yield 1; return 2}] - list [foo] [rename foo {}] [catch foo msg] $msg -} -result {1 {} 1 {invalid command name "foo"}} - -test unsupported-C.2.6 {deletion of running coroutine} -body { - coroutine foo ::apply [list {} {yield; rename foo {}; yield 1; return 2}] - list [foo] [catch foo msg] $msg -} -result {1 1 {invalid command name "foo"}} - -test unsupported-C.3.1 {info level computation} -setup { - proc a {} {while 1 {yield [info level]}} - proc b {} foo -} -body { - # note that coroutines execute in uplevel #0 - set l0 [coroutine foo a] - set l1 [foo] - set l2 [b] - list $l0 $l1 $l2 -} -cleanup { - rename a {} - rename b {} -} -result {1 1 1} - -test unsupported-C.3.2 {info frame computation} -setup { - proc a {} {while 1 {yield [info frame]}} - proc b {} foo -} -body { - set l0 [coroutine foo a] - set l1 [foo] - set l2 [b] - expr {$l2 - $l1} -} -cleanup { - rename a {} - rename b {} -} -result 1 - -test unsupported-C.3.3 {info coroutine} -setup { - proc a {} {info coroutine} - proc b {} a -} -body { - b -} -cleanup { - rename a {} - rename b {} -} -result {} - -test unsupported-C.3.4 {info coroutine} -setup { - proc a {} {info coroutine} - proc b {} a -} -body { - coroutine foo b -} -cleanup { - rename a {} - rename b {} -} -result ::foo - -test unsupported-C.3.5 {info coroutine} -setup { - proc a {} {info coroutine} - proc b {} {rename [info coroutine] {}; a} -} -body { - coroutine foo b -} -cleanup { - rename a {} - rename b {} -} -result {} - - -test unsupported-C.4.1 {bug #2093188} -setup { - proc foo {} { - set v 1 - trace add variable v {write unset} bar - yield - set v 2 - yield - set v 3 - } - proc bar args {lappend ::res $args} - coroutine a foo -} -body { - list [a] [a] $::res -} -cleanup { - rename foo {} - rename bar {} - unset ::res -} -result {{} 3 {{v {} write} {v {} write} {v {} unset}}} - -test unsupported-C.4.2 {bug #2093188} -setup { - proc foo {} { - set v 1 - trace add variable v {read unset} bar - yield - set v 2 - set v - yield - set v 3 - } - proc bar args {lappend ::res $args} - coroutine a foo -} -body { - list [a] [a] $::res -} -cleanup { - rename foo {} - rename bar {} - unset ::res -} -result {{} 3 {{v {} read} {v {} unset}}} - -test unsupported-C.4.3 {bug #2093947} -setup { - proc foo {} { - set v 1 - trace add variable v {write unset} bar - yield - set v 2 - yield - set v 3 - } - proc bar args {lappend ::res $args} -} -body { - coroutine a foo - a - a - coroutine a foo - a - rename a {} - set ::res -} -cleanup { - rename foo {} - rename bar {} - unset ::res -} -result {{v {} write} {v {} write} {v {} unset} {v {} write} {v {} unset}} - -test unsupported-C.5.1 {right numLevels on coro return} -constraints {testnrelevels} \ --setup { - proc nestedYield {{val {}}} { - yield $val - } - proc getNumLevel {} { - # remove the level for this proc's call - expr {[lindex [testnrelevels] 1] - 1} - } - proc relativeLevel base { - # remove the level for this proc's call - expr {[getNumLevel] - $base - 1} - } - proc foo {} { - while 1 { - nestedYield - } - } - set res {} -} -body { - set base [getNumLevel] - lappend res [relativeLevel $base] - eval {coroutine a foo} - - # back to base level - lappend res [relativeLevel $base] - a - lappend res [relativeLevel $base] - eval a - lappend res [relativeLevel $base] - eval {eval a} - lappend res [relativeLevel $base] - rename a {} - lappend res [relativeLevel $base] - set res -} -cleanup { - rename foo {} - rename nestedYield {} - rename getNumLevel {} - rename relativeLevel {} - unset res -} -result {0 0 0 0 0 0} - -test unsupported-C.5.2 {right numLevels within coro} -constraints {testnrelevels} \ --setup { - proc nestedYield {{val {}}} { - yield $val - } - proc getNumLevel {} { - # remove the level for this proc's call - expr {[lindex [testnrelevels] 1] - 1} - } - proc relativeLevel base { - # remove the level for this proc's call - expr {[getNumLevel] - $base - 1} - } - proc foo base { - while 1 { - set base [nestedYield [relativeLevel $base]] - } - } - set res {} -} -body { - lappend res [eval {coroutine a foo [getNumLevel]}] - lappend res [a [getNumLevel]] - lappend res [eval {a [getNumLevel]}] - lappend res [eval {eval {a [getNumLevel]}}] - set base [lindex $res 0] - foreach x $res[set res {}] { - lappend res [expr {$x-$base}] - } - set res -} -cleanup { - rename a {} - rename foo {} - rename nestedYield {} - rename getNumLevel {} - rename relativeLevel {} - unset res -} -result {0 0 0 0} - - - -# cleanup -::tcltest::cleanupTests - - -unset -nocomplain lambda - -if {[testConstraint atProcExit]} { - namespace forget tcl::unsupported::atProcExit -} - -if {[testConstraint testnrelevels]} { - namespace forget testnre::* - namespace delete testnre -} - -return -- cgit v0.12 From dfe41925f76a800c5abaaffdbe7b7676fca1430c Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 20 Mar 2009 14:43:27 +0000 Subject: * generic/tclExecute.c (INST_CONCAT1): Panic when appends overflow the max length of a Tcl value. [Bug 2669109] --- ChangeLog | 5 +++++ generic/tclExecute.c | 22 +++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 014bcde..12d4812 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-20 Don Porter + + * generic/tclExecute.c (INST_CONCAT1): Panic when appends overflow + the max length of a Tcl value. [Bug 2669109] + 2009-03-19 Miguel Sofer * generic/tcl.h: diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 49862ae..5e8b1a7 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.429 2009/03/19 23:31:37 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.430 2009/03/20 14:43:27 dgp Exp $ */ #include "tclInt.h" @@ -2410,16 +2410,16 @@ TclExecuteByteCode( */ if (onlyb) { - for (currPtr = &OBJ_AT_DEPTH(opnd-2); currPtr <= &OBJ_AT_TOS; - currPtr++) { + for (currPtr = &OBJ_AT_DEPTH(opnd-2); + appendLen >= 0 && currPtr <= &OBJ_AT_TOS; currPtr++) { if ((*currPtr)->bytes != tclEmptyStringRep) { Tcl_GetByteArrayFromObj(*currPtr, &length); appendLen += length; } } } else { - for (currPtr = &OBJ_AT_DEPTH(opnd-2); currPtr <= &OBJ_AT_TOS; - currPtr++) { + for (currPtr = &OBJ_AT_DEPTH(opnd-2); + appendLen >= 0 && currPtr <= &OBJ_AT_TOS; currPtr++) { bytes = TclGetStringFromObj(*currPtr, &length); if (bytes != NULL) { appendLen += length; @@ -2427,6 +2427,10 @@ TclExecuteByteCode( } } + if (appendLen < 0) { + Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); + } + /* * If nothing is to be appended, just return the first object by * dropping all the others from the stack; this saves both the @@ -2451,6 +2455,10 @@ TclExecuteByteCode( objResultPtr = OBJ_AT_DEPTH(opnd-1); if (!onlyb) { bytes = TclGetStringFromObj(objResultPtr, &length); + if (length + appendLen < 0) { + Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", + INT_MAX); + } #if !TCL_COMPILE_DEBUG if (bytes != tclEmptyStringRep && !Tcl_IsShared(objResultPtr)) { TclFreeIntRep(objResultPtr); @@ -2483,6 +2491,10 @@ TclExecuteByteCode( *p = '\0'; } else { bytes = (char *) Tcl_GetByteArrayFromObj(objResultPtr, &length); + if (length + appendLen < 0) { + Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", + INT_MAX); + } #if !TCL_COMPILE_DEBUG if (!Tcl_IsShared(objResultPtr)) { bytes = (char *) Tcl_SetByteArrayLength(objResultPtr, -- cgit v0.12 From 613d3aaac8fffe35fccf988a875051486deb383d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 01:23:38 +0000 Subject: * tests/tailcall.test: slightly improved tests --- ChangeLog | 4 ++++ tests/tailcall.test | 32 +++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12d4812..214fc02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-03-20 Miguel Sofer + + * tests/tailcall.test: slightly improved tests + 2009-03-20 Don Porter * generic/tclExecute.c (INST_CONCAT1): Panic when appends overflow diff --git a/tests/tailcall.test b/tests/tailcall.test index a3cf88e..0c91488 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.1 2009/03/19 23:31:37 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.2 2009/03/21 01:23:38 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -221,7 +221,7 @@ test tailcall-9 {tailcall factorial} -setup { rename fact {} } -result {1 120 3628800 1307674368000} -test tailcall-10 {tailcall and eval} -constraints {knownBug} -setup { +test tailcall-10a {tailcall and eval} -constraints {knownBug} -setup { proc a {} { eval [list tailcall lappend ::x 2] set ::x 1 @@ -230,9 +230,20 @@ test tailcall-10 {tailcall and eval} -constraints {knownBug} -setup { list [a] $::x } -cleanup { unset -nocomplain ::x -} -result {1 2} +} -result {{1 2} {1 2}} -test tailcall-11 {tailcall and uplevel} -constraints {knownBug} -setup { +test tailcall-10b {tailcall and eval} -setup { + proc a {} { + eval {tailcall lappend ::x 2} + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -result {{1 2} {1 2}} + +test tailcall-11a {tailcall and uplevel} -setup { proc a {} { uplevel 1 [list tailcall set ::x 2] set ::x 1 @@ -241,7 +252,18 @@ test tailcall-11 {tailcall and uplevel} -constraints {knownBug} -setup { list [a] $::x } -cleanup { unset -nocomplain ::x -} -result {1 2} +} -match glob -result *tailcall* -returnCodes error + +test tailcall-11b {tailcall and uplevel} -setup { + proc a {} { + uplevel 1 {tailcall set ::x 2} + set ::x 1 + } +} -body { + list [a] $::x +} -cleanup { + unset -nocomplain ::x +} -match glob -result *tailcall* -returnCodes error # cleanup ::tcltest::cleanupTests -- cgit v0.12 From b694e6b4fab8a3ac24df527d0ce9d9089c215316 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 21 Mar 2009 02:55:48 +0000 Subject: * tests/stringObj.test: Test stringObj-6.9 checks that Tcl_AppendStringsToObj() no longer crashes when operating on a pure unicode value. [Bug 2597185] --- ChangeLog | 4 ++++ tests/stringObj.test | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 214fc02..0d95bad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ 2009-03-20 Don Porter + * tests/stringObj.test: Test stringObj-6.9 checks that + Tcl_AppendStringsToObj() no longer crashes when operating on a + pure unicode value. [Bug 2597185] + * generic/tclExecute.c (INST_CONCAT1): Panic when appends overflow the max length of a Tcl value. [Bug 2669109] diff --git a/tests/stringObj.test b/tests/stringObj.test index 057d8e8..921deef 100644 --- a/tests/stringObj.test +++ b/tests/stringObj.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringObj.test,v 1.21 2009/02/17 17:17:32 dgp Exp $ +# RCS: @(#) $Id: stringObj.test,v 1.22 2009/03/21 02:55:49 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -161,6 +161,12 @@ test stringObj-6.8 {Tcl_AppendStringsToObj procedure, object totally empty} test teststringobj appendstrings 1 {} list [teststringobj length2 1] [teststringobj get 1] } {0 {}} +test stringObj-6.9 {Tcl_AppendStringToObj, pure unicode} testobj { + testobj freeallvars + teststringobj set2 1 [string replace abc 1 1 d] + teststringobj appendstrings 1 foo bar soom + teststringobj get 1 +} adcfoobarsoom test stringObj-7.1 {SetStringFromAny procedure} testobj { testobj freeallvars -- cgit v0.12 From 4ff9be7699dc5b15cd2272692d62e89432866d64 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 03:43:53 +0000 Subject: * generic/tclExecute.c: fix both test and code for tailcall * tests/tailcall.test: from within a compiled [eval] body. --- ChangeLog | 5 ++++- generic/tclExecute.c | 10 +++++++++- tests/tailcall.test | 8 +++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d95bad..6fec71e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -2009-03-20 Miguel Sofer +2009-03-21 Miguel Sofer + + * generic/tclExecute.c: fix both test and code for tailcall + * tests/tailcall.test: from within a compiled [eval] body. * tests/tailcall.test: slightly improved tests diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5e8b1a7..56bace2 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.430 2009/03/20 14:43:27 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.431 2009/03/21 03:43:53 msofer Exp $ */ #include "tclInt.h" @@ -1992,6 +1992,14 @@ TclExecuteByteCode( /*NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr);*/ iPtr->cmdFramePtr = bcFramePtr->nextPtr; + /* + * If the CallFrame is marked as tailcalling, keep tailcalling + */ + + if (iPtr->varFramePtr->tailcallPtr) { + goto abnormalReturn; + } + if (iPtr->execEnvPtr->rewind) { result = TCL_ERROR; goto abnormalReturn; diff --git a/tests/tailcall.test b/tests/tailcall.test index 0c91488..fb6d662 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.2 2009/03/21 01:23:38 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.3 2009/03/21 03:43:53 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -222,6 +222,7 @@ test tailcall-9 {tailcall factorial} -setup { } -result {1 120 3628800 1307674368000} test tailcall-10a {tailcall and eval} -constraints {knownBug} -setup { + set ::x 0 proc a {} { eval [list tailcall lappend ::x 2] set ::x 1 @@ -230,9 +231,10 @@ test tailcall-10a {tailcall and eval} -constraints {knownBug} -setup { list [a] $::x } -cleanup { unset -nocomplain ::x -} -result {{1 2} {1 2}} +} -result {{0 2} {0 2}} test tailcall-10b {tailcall and eval} -setup { + set ::x 0 proc a {} { eval {tailcall lappend ::x 2} set ::x 1 @@ -241,7 +243,7 @@ test tailcall-10b {tailcall and eval} -setup { list [a] $::x } -cleanup { unset -nocomplain ::x -} -result {{1 2} {1 2}} +} -result {{0 2} {0 2}} test tailcall-11a {tailcall and uplevel} -setup { proc a {} { -- cgit v0.12 From 0a098f986c82c3df2107386ae53a6e40da726c27 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 06:55:31 +0000 Subject: * generic/tclExecute.c: proper fix for [Bug 2415422]. Reenabled * tests/nre.test: the failing assertion that was disabled on 2008-12-18: the assertion is correct, the fault was in the management of expansions. --- ChangeLog | 5 +++++ generic/tclExecute.c | 19 +++++++++++-------- tests/nre.test | 19 ++++++++++++++++++- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fec71e..72138dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-03-21 Miguel Sofer + * generic/tclExecute.c: proper fix for [Bug 2415422]. Reenabled + * tests/nre.test: the failing assertion that was disabled on + 2008-12-18: the assertion is correct, the fault was in the + management of expansions. + * generic/tclExecute.c: fix both test and code for tailcall * tests/tailcall.test: from within a compiled [eval] body. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 56bace2..99bf84e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.431 2009/03/21 03:43:53 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.432 2009/03/21 06:55:31 msofer Exp $ */ #include "tclInt.h" @@ -1987,9 +1987,7 @@ TclExecuteByteCode( * reset, now process the return. */ - /* Disabled the following assertion to solve the trouble reported - * in Tcl Bug 2415422. Needs review. */ - /*NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr);*/ + NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); iPtr->cmdFramePtr = bcFramePtr->nextPtr; /* @@ -2592,15 +2590,20 @@ TclExecuteByteCode( if (moved) { /* - * Change the global data to point to the new stack. + * Change the global data to point to the new stack: move the + * bottomPtr, recompute the position of every other + * stack-allocated parameter, update the stack pointers. */ bottomPtr = (BottomData *) (((Tcl_Obj **)bottomPtr) + moved); - initCatchTop += moved; + + bcFramePtr = (CmdFrame *) (bottomPtr + 1); + initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; + initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); + esPtr = iPtr->execEnvPtr->execStackPtr; + catchTop += moved; - initTosPtr += moved; tosPtr += moved; - esPtr = iPtr->execEnvPtr->execStackPtr; } /* diff --git a/tests/nre.test b/tests/nre.test index dd86e18..e823234 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.8 2009/02/02 06:02:41 dgp Exp $ +# RCS: @(#) $Id: nre.test,v 1.9 2009/03/21 06:55:32 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -304,6 +304,23 @@ test nre-8.1 {nre and {*}} -body { rename inner {} rename outer {} } -result {1 1 1} +test nre-8.2 {nre and {*}, [Bug 2415422]} -body { + # force an expansion that grows the evaluation stack, check that nre + # adapts the bcFramePtr. This causes an NRE assertion to fail if it is not + # done properly. + + proc nop {} {} + proc crash {} { + foreach val [list {*}[lrepeat 100000 x]] { + nop + } + } + + crash +} -cleanup { + rename nop {} + rename crash {} +} # -- cgit v0.12 From 61861981e390fd931fe6af2bb3fa9b2d984eb307 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 09:42:06 +0000 Subject: * generic/tclBasic.c: Fix for (among others) [Bug 2699087] * generic/tclCmdAH.c: Tailcalls now perform properly even from * generic/tclExecute.c: within [eval]ed scripts. * generic/tclInt.h: More tests missing, as well as proper exploration and testing of the interaction with "redirectors" like interp-alias (suspect that it does not happen in constant space) and pure-eval commands. --- ChangeLog | 8 ++++++++ generic/tclBasic.c | 56 +++++++++++++++++++++++++++++++--------------------- generic/tclCmdAH.c | 16 ++++++++++++++- generic/tclExecute.c | 31 +++++++++++++++++++++++------ generic/tclInt.h | 6 +++++- tests/tailcall.test | 16 ++++++++++++--- 6 files changed, 99 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72138dc..1cb2ce0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-03-21 Miguel Sofer + * generic/tclBasic.c: Fix for (among others) [Bug 2699087] + * generic/tclCmdAH.c: Tailcalls now perform properly even from + * generic/tclExecute.c: within [eval]ed scripts. + * generic/tclInt.h: More tests missing, as well as proper + exploration and testing of the interaction with "redirectors" like + interp-alias (suspect that it does not happen in constant space) + and pure-eval commands. + * generic/tclExecute.c: proper fix for [Bug 2415422]. Reenabled * tests/nre.test: the failing assertion that was disabled on 2008-12-18: the assertion is correct, the fault was in the diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 739732f..c40cd49 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.388 2009/03/19 23:31:37 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.389 2009/03/21 09:42:06 msofer Exp $ */ #include "tclInt.h" @@ -7988,8 +7988,9 @@ TclNRTailcallObjCmd( { Interp *iPtr = (Interp *) interp; TEOV_callback *tailcallPtr; - Tcl_Obj *listPtr; - Namespace *nsPtr = iPtr->varFramePtr->nsPtr; + Tcl_Obj *listPtr, *nsObjPtr; + Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; + Tcl_Namespace *ns1Ptr; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); @@ -8004,10 +8005,16 @@ TclNRTailcallObjCmd( return TCL_ERROR; } - nsPtr->activationCount++; listPtr = Tcl_NewListObj(objc-1, objv+1); Tcl_IncrRefCount(listPtr); + nsObjPtr = Tcl_NewStringObj(nsPtr->fullName, -1); + if ((TCL_OK != TclGetNamespaceFromObj(interp, nsObjPtr, &ns1Ptr)) + || (nsPtr != ns1Ptr)) { + Tcl_Panic("Tailcall failed to find the proper namespace"); + } + Tcl_IncrRefCount(nsObjPtr); + /* * Add two callbacks: first the one to actually evaluate the tailcalled * command, then the one that signals TEBC to stash the first at its @@ -8017,7 +8024,7 @@ TclNRTailcallObjCmd( * TclNRAddCallBack macro to build the callback) */ - TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, NULL, NULL); + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); tailcallPtr = TOP_CB(interp); TOP_CB(interp) = tailcallPtr->nextPtr; @@ -8033,27 +8040,19 @@ NRTailcallEval( { Interp *iPtr = (Interp *) interp; Tcl_Obj *listPtr = data[0]; - Namespace *nsPtr = data[1]; - int omit = PTR2INT(data[2]); + Tcl_Obj *nsObjPtr = data[1]; + Tcl_Namespace *nsPtr; int objc; Tcl_Obj **objv; - TclNRDeferCallback(interp, TailcallCleanup, listPtr, NULL, NULL, NULL); - if (!omit && (result == TCL_OK)) { - iPtr->lookupNsPtr = nsPtr; - ListObjGetElements(listPtr, objc, objv); - result = TclNREvalObjv(interp, objc, objv, 0, NULL); - } - - nsPtr->activationCount--; - if ((nsPtr->flags & NS_DYING) - && (nsPtr->activationCount - (nsPtr == iPtr->globalNsPtr) == 0)) { - /* - * FIXME NRE tailcall: is this the proper way to manage this? This is - * like what CallFrames do. - */ - - Tcl_DeleteNamespace((Tcl_Namespace *) nsPtr); + TclNRDeferCallback(interp, TailcallCleanup, listPtr, nsObjPtr, NULL, NULL); + if (result == TCL_OK) { + result = TclGetNamespaceFromObj(interp, nsObjPtr, &nsPtr); + if (result == TCL_OK) { + iPtr->lookupNsPtr = (Namespace *) nsPtr; + ListObjGetElements(listPtr, objc, objv); + result = TclNREvalObjv(interp, objc, objv, 0, NULL); + } } return result; } @@ -8065,8 +8064,19 @@ TailcallCleanup( int result) { Tcl_DecrRefCount((Tcl_Obj *) data[0]); + Tcl_DecrRefCount((Tcl_Obj *) data[1]); return result; } + +void +TclClearTailcall( + Tcl_Interp *interp, + TEOV_callback *tailcallPtr) +{ + TailcallCleanup(tailcallPtr->data, interp, TCL_OK); + TCLNR_FREE(interp, tailcallPtr); +} + void Tcl_NRAddCallback( diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index c8829f8..a00fff8 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.115 2009/02/03 23:34:33 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.116 2009/03/21 09:42:06 msofer Exp $ */ #include "tclInt.h" @@ -302,12 +302,26 @@ CatchObjCmdCallback( Tcl_Interp *interp, int result) { + Interp *iPtr = (Interp *) interp; int objc = PTR2INT(data[0]); Tcl_Obj *varNamePtr = data[1]; Tcl_Obj *optionVarNamePtr = data[2]; int rewind = ((Interp *) interp)->execEnvPtr->rewind; /* + * catch has to disable any tailcall + */ + + if (iPtr->varFramePtr->tailcallPtr) { + TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + } + + + /* * We disable catch in interpreters where the limit has been exceeded. */ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 99bf84e..b00848a 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.432 2009/03/21 06:55:31 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.433 2009/03/21 09:42:07 msofer Exp $ */ #include "tclInt.h" @@ -1871,18 +1871,15 @@ TclExecuteByteCode( fprintf(stdout, " Tailcall request received\n"); } #endif - TEOV_callback *tailcallPtr = param; - - iPtr->varFramePtr->tailcallPtr = tailcallPtr; - if (catchTop != initCatchTop) { - tailcallPtr->data[2] = INT2PTR(1); + TclClearTailcall(interp, param); result = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); pc--; goto checkForCatch; } + iPtr->varFramePtr->tailcallPtr = param; goto abnormalReturn; } case TCL_NR_YIELD_TYPE: { /*[yield] */ @@ -1995,6 +1992,15 @@ TclExecuteByteCode( */ if (iPtr->varFramePtr->tailcallPtr) { + if (catchTop != initCatchTop) { + TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + pc--; + goto checkForCatch; + } goto abnormalReturn; } @@ -7759,6 +7765,19 @@ TclExecuteByteCode( abnormalReturn: TCL_DTRACE_INST_LAST(); + + /* + * Winding down: insure that all pending cleanups are done before + * dropping out of this bytecode. + */ + if (TOP_CB(interp) != bottomPtr->rootPtr) { + result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); + + if (TOP_CB(interp) != bottomPtr->rootPtr) { + Tcl_Panic("Abnormal return with busy callback stack"); + } + } + /* * Clear all expansions and same-level NR calls. * diff --git a/generic/tclInt.h b/generic/tclInt.h index 48473bd..3c45cc1 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.419 2009/03/19 23:31:37 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.420 2009/03/21 09:42:07 msofer Exp $ */ #ifndef _TCLINT @@ -2603,6 +2603,10 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRTailcallObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; +MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, + struct TEOV_callback *tailcallPtr); + + /* *---------------------------------------------------------------- * Procedures shared among Tcl modules but not used by the outside world: diff --git a/tests/tailcall.test b/tests/tailcall.test index fb6d662..4cfbebf 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.3 2009/03/21 03:43:53 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.4 2009/03/21 09:42:07 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -221,7 +221,7 @@ test tailcall-9 {tailcall factorial} -setup { rename fact {} } -result {1 120 3628800 1307674368000} -test tailcall-10a {tailcall and eval} -constraints {knownBug} -setup { +test tailcall-10a {tailcall and eval} -setup { set ::x 0 proc a {} { eval [list tailcall lappend ::x 2] @@ -432,7 +432,17 @@ test tailcall-12.2 {[Bug 2649975]} -setup { 1: exiting from foo's alpha } -test tailcall-12.3 {[Bug 2695587]} -setup { +test tailcall-12.3a {[Bug 2695587]} -setup { + proc a {} { + list [catch [list tailcall foo] msg] $msg + } +} -body { + a +} -cleanup { + rename a {} +} -result {1 {Tailcall called from within a catch environment}} + +test tailcall-12.3b {[Bug 2695587]} -setup { proc a {} { list [catch {tailcall foo} msg] $msg } -- cgit v0.12 From 61e311e5b2192389f6791a15f4d1227769b95772 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 10:20:04 +0000 Subject: * tests/nre.test: [foreach] has been NR-enabled for a while, the test was marked 'knownBug': unmark it. --- ChangeLog | 3 +++ tests/nre.test | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1cb2ce0..00b05d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-03-21 Miguel Sofer + * tests/nre.test: [foreach] has been NR-enabled for a while, the + test was marked 'knownBug': unmark it. + * generic/tclBasic.c: Fix for (among others) [Bug 2699087] * generic/tclCmdAH.c: Tailcalls now perform properly even from * generic/tclExecute.c: within [eval]ed scripts. diff --git a/tests/nre.test b/tests/nre.test index e823234..b0ee702 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.9 2009/03/21 06:55:32 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.10 2009/03/21 10:20:04 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -251,7 +251,7 @@ test nre-7.4 {[for] is not recursive} -setup { testnrelevels } -result {{0 2 2 0} 0} -test nre-7.5 {[foreach] is not recursive} -constraints {knownBug} -setup { +test nre-7.5 {[foreach] is not recursive} -setup { # # Enable once [foreach] is NR-enabled # -- cgit v0.12 From 260a0df5b742697276b762bcddd34c141aed9942 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 11:46:09 +0000 Subject: * tclInt.h: comments * tests/tailcall.test: added tests to show that [tailcall] does not currently always execute in constant space: interp-alias, ns-imports and ensembles "leak" as of this commit. --- ChangeLog | 6 ++++ generic/tclInt.h | 6 ++-- tests/tailcall.test | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 96 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00b05d0..bb6eb0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-03-21 Miguel Sofer + * tclInt.h: comments + + * tests/tailcall.test: added tests to show that [tailcall] does + not currently always execute in constant space: interp-alias, + ns-imports and ensembles "leak" as of this commit. + * tests/nre.test: [foreach] has been NR-enabled for a while, the test was marked 'knownBug': unmark it. diff --git a/generic/tclInt.h b/generic/tclInt.h index 3c45cc1..5c9e127 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.420 2009/03/21 09:42:07 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.421 2009/03/21 11:46:10 msofer Exp $ */ #ifndef _TCLINT @@ -1059,9 +1059,7 @@ typedef struct CallFrame { struct TEOV_callback *tailcallPtr; /* The callback implementing the call to be * executed by the command that pushed this - * frame. It can be TAILCALL_NONE to signal - * that we are tailcalling a frame further up - * the stack. + * frame. */ } CallFrame; diff --git a/tests/tailcall.test b/tests/tailcall.test index 4cfbebf..f67a5e9 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.4 2009/03/21 09:42:07 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.5 2009/03/21 11:46:10 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -61,7 +61,7 @@ if {[testConstraint testnrelevels]} { namespace import testnre::* } -test tailcall-0 {tailcall is constant space} -constraints testnrelevels -setup { +test tailcall-0.1 {tailcall is constant space} -constraints testnrelevels -setup { proc a i { if {[incr i] > 10} { return [depthDiff] @@ -75,6 +75,92 @@ test tailcall-0 {tailcall is constant space} -constraints testnrelevels -setup { rename a {} } -result {0 0 0 0 0 0} +test tailcall-0.2 {tailcall is constant space} -constraints testnrelevels -setup { + set a { i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + upvar 1 a a + tailcall apply $a $i + }} +} -body { + apply $a 0 +} -cleanup { + unset a +} -result {0 0 0 0 0 0} + +test tailcall-0.3 {tailcall is constant space} -constraints testnrelevels -setup { + proc a i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + tailcall b $i + } + interp alias {} b {} a +} -body { + b 0 +} -cleanup { + rename a {} + rename b {} +} -result {0 0 0 0 0 0} + +test tailcall-0.4 {tailcall is constant space} -constraints testnrelevels -setup { + namespace eval ::ns { + namespace export * + } + proc ::ns::a i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + set b [uplevel 1 [list namespace which b]] + tailcall $b $i + } + namespace import ::ns::a + rename a b +} -body { + b 0 +} -cleanup { + rename b {} + namespace delete ::ns +} -result {0 0 0 0 0 0} + +test tailcall-0.5 {tailcall is constant space} -constraints testnrelevels -setup { + proc b i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + tailcall a b $i + } + namespace ensemble create -command a -map {b b} +} -body { + a b 0 +} -cleanup { + rename a {} + rename b {} +} -result {0 0 0 0 0 0} + +test tailcall-0.6 {tailcall is constant space} -constraints testnrelevels -setup { + oo::class create foo { + method b i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + tailcall [self] b $i + } + } +} -body { + foo create a + a b 0 +} -cleanup { + rename a {} + rename foo {} +} -result {0 0 0 0 0 0} + test tailcall-1 {tailcall} -body { namespace eval a { variable x *::a -- cgit v0.12 From 24ad5055202aab332c748c20e2bd0471e3aab234 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 12:24:48 +0000 Subject: * generic/tclBasic.c: fixed "leaks" in aliases, imports and * generic/tclInt.h: ensembles. Only remaining known leak * generic/tclInterp.c: is in ensemble unknown dispatch (as it * generic/tclNamesp.c: not NR-enabled) * tests/tailcall.test: --- ChangeLog | 6 ++++++ generic/tclBasic.c | 9 +++++++-- generic/tclInt.h | 3 ++- generic/tclInterp.c | 3 ++- generic/tclNamesp.c | 5 ++++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb6eb0d..54c7361 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-03-21 Miguel Sofer + * generic/tclBasic.c: fixed "leaks" in aliases, imports and + * generic/tclInt.h: ensembles. Only remaining known leak + * generic/tclInterp.c: is in ensemble unknown dispatch (as it + * generic/tclNamesp.c: not NR-enabled) + * tests/tailcall.test: + * tclInt.h: comments * tests/tailcall.test: added tests to show that [tailcall] does diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c40cd49..24a1368 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.389 2009/03/21 09:42:06 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.390 2009/03/21 12:24:48 msofer Exp $ */ #include "tclInt.h" @@ -4058,7 +4058,12 @@ TclNREvalObjv( * finishes the source command and not just the target. */ - TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); + if (iPtr->evalFlags & TCL_EVAL_REDIRECT) { + TclNRAddCallback(interp, NRCommand, NULL, INT2PTR(1), NULL, NULL); + iPtr->evalFlags &= ~TCL_EVAL_REDIRECT; + } else { + TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); + } cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); TclNRSpliceDeferred(interp); diff --git a/generic/tclInt.h b/generic/tclInt.h index 5c9e127..3028ff1 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.421 2009/03/21 11:46:10 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.422 2009/03/21 12:24:49 msofer Exp $ */ #ifndef _TCLINT @@ -2086,6 +2086,7 @@ typedef struct InterpList { #define TCL_ALLOW_EXCEPTIONS 4 #define TCL_EVAL_FILE 2 #define TCL_EVAL_CTX 8 +#define TCL_EVAL_REDIRECT 16 /* * Flag bits for Interp structures: diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 3105dc9..0972602 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.104 2009/02/10 22:50:04 nijtmans Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.105 2009/03/21 12:24:49 msofer Exp $ */ #include "tclInt.h" @@ -1807,6 +1807,7 @@ AliasNRCmd( if (isRootEnsemble) { TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } + iPtr->evalFlags |= TCL_EVAL_REDIRECT; return Tcl_NREvalObj(interp, listPtr, flags); } diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 8caf7db..ff0bf99 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.190 2009/03/19 23:31:37 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.191 2009/03/21 12:24:49 msofer Exp $ */ #include "tclInt.h" @@ -1938,6 +1938,7 @@ InvokeImportedNRCmd( ImportedCmdData *dataPtr = clientData; Command *realCmdPtr = dataPtr->realCmdPtr; + ((Interp *)interp)->evalFlags |= TCL_EVAL_REDIRECT; return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv, 0); } @@ -6591,6 +6592,7 @@ NsEnsembleImplementationCmdNR( * Hand off to the target command. */ + iPtr->evalFlags |= TCL_EVAL_REDIRECT; return Tcl_NREvalObj(interp, copyPtr, TCL_EVAL_INVOKE); } @@ -6726,6 +6728,7 @@ EnsembleUnknownCallback( */ Tcl_Preserve(ensemblePtr); + ((Interp *)interp)->evalFlags |= TCL_EVAL_REDIRECT; result = Tcl_EvalObjv(interp, paramc, paramv, 0); if ((result == TCL_OK) && (ensemblePtr->flags & ENS_DEAD)) { Tcl_SetResult(interp, -- cgit v0.12 From 30abb158de1f9a67dce9c82012db2b1c826107bd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 12:26:56 +0000 Subject: forgot one file :} --- tests/tailcall.test | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tests/tailcall.test b/tests/tailcall.test index f67a5e9..c0e7cdb 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.5 2009/03/21 11:46:10 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.6 2009/03/21 12:26:56 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -143,7 +143,30 @@ test tailcall-0.5 {tailcall is constant space} -constraints testnrelevels -setup rename b {} } -result {0 0 0 0 0 0} -test tailcall-0.6 {tailcall is constant space} -constraints testnrelevels -setup { +test tailcall-0.6 {tailcall is constant space} -constraints {testnrelevels knownBug} -setup { + # + # This test fails because ns-unknown is not NR-enabled + # + proc c i { + if {[incr i] > 10} { + return [depthDiff] + } + depthDiff + tailcall a b $i + } + proc d {ens sub args} { + return [list $ens c] + } + namespace ensemble create -command a -unknown d +} -body { + a b 0 +} -cleanup { + rename a {} + rename c {} + rename d {} +} -result {0 0 0 0 0 0} + +test tailcall-0.7 {tailcall is constant space} -constraints testnrelevels -setup { oo::class create foo { method b i { if {[incr i] > 10} { -- cgit v0.12 From ab9a47e0ff72d649bf59699ad82b58f2719afe8f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 21 Mar 2009 12:56:32 +0000 Subject: removed extra cleanupTests call --- tests/tailcall.test | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/tailcall.test b/tests/tailcall.test index c0e7cdb..0d0bf65 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.6 2009/03/21 12:26:56 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.7 2009/03/21 12:56:32 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -376,10 +376,6 @@ test tailcall-11b {tailcall and uplevel} -setup { unset -nocomplain ::x } -match glob -result *tailcall* -returnCodes error -# cleanup -::tcltest::cleanupTests - - test tailcall-12.1 {[Bug 2649975]} -setup { proc dump {{text {}}} { set text [uplevel 1 [list subst $text]] -- cgit v0.12 From 1d1487bad788b9e5db9a68b1a397db54e23c2875 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 22 Mar 2009 14:46:27 +0000 Subject: * generic/tclBasic.c: NR-enable the handling of unknown commands [Bug 2502037]. --- ChangeLog | 5 +++++ generic/tclBasic.c | 63 ++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54c7361..2ae03aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-22 Miguel Sofer + + * generic/tclBasic.c: NR-enable the handling of unknown commands + [Bug 2502037]. + 2009-03-21 Miguel Sofer * generic/tclBasic.c: fixed "leaks" in aliases, imports and diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 24a1368..919a031 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.390 2009/03/21 12:24:48 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.391 2009/03/22 14:46:28 msofer Exp $ */ #include "tclInt.h" @@ -131,6 +131,8 @@ static Tcl_NRPostProc TEOV_RestoreVarFrame; static Tcl_NRPostProc TEOV_RunLeaveTraces; static Tcl_NRPostProc TEOV_Exception; static Tcl_NRPostProc TEOV_Error; +static Tcl_NRPostProc TEOV_NotFoundCallback; + static Tcl_NRPostProc TEOEx_ListCallback; static Tcl_NRPostProc TEOEx_ByteCodeCallback; @@ -4115,9 +4117,7 @@ TclNREvalObjv( cmdPtr = TEOV_LookupCmdFromObj(interp, objv[0], lookupNsPtr); if (!cmdPtr) { - notFound: - result = TEOV_NotFound(interp, objc, objv, lookupNsPtr); - return result; + return TEOV_NotFound(interp, objc, objv, lookupNsPtr); } iPtr->cmdCount++; @@ -4138,7 +4138,7 @@ TclNREvalObjv( result = TEOV_RunEnterTraces(interp, &cmdPtr, objc, objv, lookupNsPtr); if (!cmdPtr) { - goto notFound; + return TEOV_NotFound(interp, objc, objv, lookupNsPtr); } if (result != TCL_OK) { return result; @@ -4487,7 +4487,6 @@ TEOV_NotFound( int i, newObjc, handlerObjc; Tcl_Obj **newObjv, **handlerObjv; CallFrame *varFramePtr = iPtr->varFramePtr; - int result = TCL_OK; Namespace *currNsPtr = NULL;/* Used to check for and invoke any registered * unknown command handler for the current * namespace (TIP 181). */ @@ -4548,28 +4547,54 @@ TEOV_NotFound( if (cmdPtr == NULL) { Tcl_AppendResult(interp, "invalid command name \"", TclGetString(objv[0]), "\"", NULL); - result = TCL_ERROR; - } else { - if (lookupNsPtr) { - savedNsPtr = varFramePtr->nsPtr; - varFramePtr->nsPtr = lookupNsPtr; - } - result = Tcl_EvalObjv(interp, newObjc, newObjv, TCL_EVAL_NOERR); - if (savedNsPtr) { - varFramePtr->nsPtr = savedNsPtr; + /* + * Release any resources we locked and allocated during the handler call. + */ + + for (i = 0; i < handlerObjc; ++i) { + Tcl_DecrRefCount(newObjv[i]); } + TclStackFree(interp, newObjv); + return TCL_ERROR; + } + + if (lookupNsPtr) { + savedNsPtr = varFramePtr->nsPtr; + varFramePtr->nsPtr = lookupNsPtr; + } + TclNRDeferCallback(interp, TEOV_NotFoundCallback, INT2PTR(handlerObjc), newObjv, savedNsPtr, NULL); + iPtr->evalFlags |= TCL_EVAL_REDIRECT; + return TclNREvalObjv(interp, newObjc, newObjv, TCL_EVAL_NOERR, NULL); +} + +static int +TEOV_NotFoundCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + int objc = PTR2INT(data[0]); + Tcl_Obj **objv = data[1]; + Namespace *savedNsPtr = data[2]; + + int i; + + if (savedNsPtr) { + iPtr->varFramePtr->nsPtr = savedNsPtr; } /* * Release any resources we locked and allocated during the handler call. */ - for (i = 0; i < handlerObjc; ++i) { - Tcl_DecrRefCount(newObjv[i]); + for (i = 0; i < objc; ++i) { + Tcl_DecrRefCount(objv[i]); } - TclStackFree(interp, newObjv); + TclStackFree(interp, objv); + return result; -} +} static int TEOV_RunEnterTraces( -- cgit v0.12 From 08383aee88a03fe8cc880c10b9fc242fe3804ebd Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 24 Mar 2009 09:30:06 +0000 Subject: Fix [Bug 2673163] --- ChangeLog | 109 ++++++++++++++++++++++++++++------------------------ generic/tclProc.c | 14 +++++-- generic/tclVar.c | 46 ++++++++++++++++++---- tests/upvar.test | 113 ++++++++++++++++++++++++++---------------------------- 4 files changed, 161 insertions(+), 121 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ae03aa..c857492 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,51 +1,57 @@ +2009-03-24 Donal K. Fellows + + * generic/tclVar.c (Tcl_UpvarObjCmd): [Bug 2673163] (ferrieux) + * generic/tclProc.c (TclObjGetFrame): Make the upvar command more able + to handle its officially documented syntax. + 2009-03-22 Miguel Sofer - * generic/tclBasic.c: NR-enable the handling of unknown commands - [Bug 2502037]. - + * generic/tclBasic.c: [Bug 2502037]: NR-enable the handling of unknown + commands. + 2009-03-21 Miguel Sofer - * generic/tclBasic.c: fixed "leaks" in aliases, imports and - * generic/tclInt.h: ensembles. Only remaining known leak - * generic/tclInterp.c: is in ensemble unknown dispatch (as it - * generic/tclNamesp.c: not NR-enabled) + * generic/tclBasic.c: Fixed "leaks" in aliases, imports and + * generic/tclInt.h: ensembles. Only remaining known leak is in + * generic/tclInterp.c: ensemble unknown dispatch (as it not + * generic/tclNamesp.c: NR-enabled) * tests/tailcall.test: - + * tclInt.h: comments - * tests/tailcall.test: added tests to show that [tailcall] does - not currently always execute in constant space: interp-alias, - ns-imports and ensembles "leak" as of this commit. - - * tests/nre.test: [foreach] has been NR-enabled for a while, the - test was marked 'knownBug': unmark it. - + * tests/tailcall.test: Added tests to show that [tailcall] does not + currently always execute in constant space: interp-alias, ns-imports + and ensembles "leak" as of this commit. + + * tests/nre.test: [foreach] has been NR-enabled for a while, the test + was marked 'knownBug': unmark it. + * generic/tclBasic.c: Fix for (among others) [Bug 2699087] - * generic/tclCmdAH.c: Tailcalls now perform properly even from + * generic/tclCmdAH.c: Tailcalls now perform properly even from * generic/tclExecute.c: within [eval]ed scripts. * generic/tclInt.h: More tests missing, as well as proper - exploration and testing of the interaction with "redirectors" like + exploration and testing of the interaction with "redirectors" like interp-alias (suspect that it does not happen in constant space) and pure-eval commands. - * generic/tclExecute.c: proper fix for [Bug 2415422]. Reenabled - * tests/nre.test: the failing assertion that was disabled on + * generic/tclExecute.c: Proper fix for [Bug 2415422]. Reenabled + * tests/nre.test: the failing assertion that was disabled on 2008-12-18: the assertion is correct, the fault was in the - management of expansions. - - * generic/tclExecute.c: fix both test and code for tailcall + management of expansions. + + * generic/tclExecute.c: Fix both test and code for tailcall * tests/tailcall.test: from within a compiled [eval] body. - * tests/tailcall.test: slightly improved tests + * tests/tailcall.test: Slightly improved tests 2009-03-20 Don Porter - * tests/stringObj.test: Test stringObj-6.9 checks that - Tcl_AppendStringsToObj() no longer crashes when operating on a - pure unicode value. [Bug 2597185] + * tests/stringObj.test: [Bug 2597185]: Test stringObj-6.9 + checks that Tcl_AppendStringsToObj() no longer crashes when operating + on a pure unicode value. - * generic/tclExecute.c (INST_CONCAT1): Panic when appends overflow - the max length of a Tcl value. [Bug 2669109] + * generic/tclExecute.c (INST_CONCAT1): [Bug 2669109]: Panic when + appends overflow the max length of a Tcl value. 2009-03-19 Miguel Sofer @@ -54,27 +60,28 @@ * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclNamesp.c (Tcl_PopCallFrame): Rewritten tailcall - implementation, ::unsupported::atProcExit is (temporarily?) - gone. The new approach is much simpler, and also closer to being - correct. This commit fixes [Bug 2649975] and [Bug 2695587]. + implementation, ::unsupported::atProcExit is (temporarily?) gone. The + new approach is much simpler, and also closer to being correct. This + commit fixes [Bug 2649975] and [Bug 2695587]. - * tests/coroutine.test: Moved the tests to their own files, + * tests/coroutine.test: Moved the tests to their own files, * tests/tailcall.test: removed the unsupported.test. Added * tests/unsupported.test: tests for the fixed bugs. - + 2009-03-19 Donal K. Fellows * doc/tailcall.n: Added documentation for tailcall command. 2009-03-18 Don Porter - * win/tclWinFile.c (TclpObjNormalizePath): Corrected Tcl_Obj leak. - Thanks to Joe Mistachkin for detection and patch. [Bug 2688184]. + * win/tclWinFile.c (TclpObjNormalizePath): [Bug 2688184]: + Corrected Tcl_Obj leak. Thanks to Joe Mistachkin for detection and + patch. - * generic/tclVar.c (TclLookupSimpleVar): Shift all calls to - Tcl_SetErrorCode() out of TclLookupSimpleVar and onto its callers, - where control with TCL_LEAVE_ERR_MSG flag is more easily handled. - [Bug 2689307] + * generic/tclVar.c (TclLookupSimpleVar): [Bug 2689307]: Shift + all calls to Tcl_SetErrorCode() out of TclLookupSimpleVar and onto its + callers, where control with TCL_LEAVE_ERR_MSG flag is more easily + handled. 2009-03-16 Donal K. Fellows @@ -106,7 +113,7 @@ 2009-03-11 Miguel Sofer - * generic/tclBasic.c (TclNRCoroutineObjCmd): fix Tcl_Obj leak. + * generic/tclBasic.c (TclNRCoroutineObjCmd): fix Tcl_Obj leak. Diagnosis and fix thanks to GPS. 2009-03-09 Donal K. Fellows @@ -123,7 +130,7 @@ 2009-02-27 Jan Nijtmans - * generic/tcl.decls: [Bug 218977] Tcl_DbCkfree needs a return value + * generic/tcl.decls: [Bug 218977]: Tcl_DbCkfree needs return value * generic/tclCkalloc.c * generic/tclDecls.h (regenerated) * generic/tclInt.decls: don't use CONST84/CONST86 here @@ -133,11 +140,11 @@ 2009-02-25 Don Porter - * generic/tclUtil.c (TclStringMatchObj): Revised the branching - on the strObj->typePtr so that untyped values get converted to the - "string" type and pass through the Unicode matcher. [Bug 2613766] - Also added checks to only perform "bytearray" optimization on pure - bytearray values. [Bug 2637173]. + * generic/tclUtil.c (TclStringMatchObj): [Bug 2637173]: Revised + the branching on the strObj->typePtr so that untyped values get + converted to the "string" type and pass through the Unicode matcher. + [Bug 2613766]: Also added checks to only perform "bytearray" + optimization on pure bytearray values. * generic/tclCmdMZ.c: Since Tcl_GetCharLength() has its own * generic/tclExecute.c: optimizations for the tclByteArrayType, stop @@ -230,7 +237,7 @@ 2009-02-16 Jan Nijtmans - * generic/tclZlib.c: hack needed for official zlib1.dll build. + * generic/tclZlib.c: hack needed for official zlib1.dll build. * win/configure.in: fix [Feature Request 2605263] use official * win/Makefile.in: zlib build. * win/configure: (regenerated) @@ -299,7 +306,7 @@ replacement for a full Tcl_NumUtfChars() call when the string has all single-byte characters. - * generic/tclStringObj.c: Simplified Tcl_GetCharLength by + * generic/tclStringObj.c: Simplified Tcl_GetCharLength by * generic/tclTestObj.c: removing code that did nothing. Added early returns from Tcl_*SetObjLength when the desired length is already present; adapted test command to the change. @@ -539,7 +546,7 @@ * win/tclWinSock.c: Fix [Bug 2446662]: resync Win behavior on RST with that of unix (EOF). - + 2009-01-26 Donal K. Fellows * generic/tclZlib.c (ChanClose): Only generate error messages in the @@ -717,7 +724,7 @@ in the case where [clock add] is presented with a bad switch. * tests/clock.test (clock-65.1) Added a test case for the above problem [Bug 2481670]. - + 2009-01-02 Donal K. Fellows * unix/tcl.m4 (SC_CONFIG_CFLAGS): Force the use of the compatibility @@ -820,7 +827,7 @@ I couldn't figure out how to sort this out any other way. * win/configure: Autoconf 2.59 - + 2008-12-20 Donal K. Fellows * win/Makefile.in: Minor updates to make building work better with diff --git a/generic/tclProc.c b/generic/tclProc.c index 611ae45..2062672 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.170 2009/02/10 22:50:07 nijtmans Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.171 2009/03/24 09:30:07 dkf Exp $ */ #include "tclInt.h" @@ -787,7 +787,7 @@ TclObjGetFrame( register Interp *iPtr = (Interp *) interp; int curLevel, level, result; CallFrame *framePtr; - const char *name = TclGetString(objPtr); + const char *name; /* * Parse object to figure out which level number to go to. @@ -795,6 +795,12 @@ TclObjGetFrame( result = 1; curLevel = iPtr->varFramePtr->level; + if (objPtr == NULL) { + name = "1"; + goto haveLevel1; + } + + name = TclGetString(objPtr); if (objPtr->typePtr == &levelReferenceType) { if (objPtr->internalRep.ptrAndLongRep.ptr != NULL) { level = curLevel - objPtr->internalRep.ptrAndLongRep.value; @@ -847,9 +853,11 @@ TclObjGetFrame( level = curLevel - level; } else { /* - * Don't cache as the object *isn't* a level reference. + * Don't cache as the object *isn't* a level reference (might even be + * NULL...) */ + haveLevel1: level = curLevel - 1; result = 0; } diff --git a/generic/tclVar.c b/generic/tclVar.c index e61e06e..d87cdf9 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.177 2009/03/18 16:52:20 dgp Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.178 2009/03/24 09:30:07 dkf Exp $ */ #include "tclInt.h" @@ -4077,29 +4077,59 @@ Tcl_UpvarObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { CallFrame *framePtr; - int result; + int result, hasLevel; + Tcl_Obj *levelObj; if (objc < 3) { - upvarSyntax: Tcl_WrongNumArgs(interp, 1, objv, "?level? otherVar localVar ?otherVar localVar ...?"); return TCL_ERROR; } + if (objc & 1) { + /* + * Even number of arguments, so use the default level of "1" by + * passing NULL to TclObjGetFrame. + */ + + levelObj = NULL; + hasLevel = 0; + } else { + /* + * Odd number of arguments, so objv[1] must contain the level. + */ + + levelObj = objv[1]; + hasLevel = 1; + } + /* * Find the call frame containing each of the "other variables" to be * linked to. */ - result = TclObjGetFrame(interp, objv[1], &framePtr); + result = TclObjGetFrame(interp, levelObj, &framePtr); if (result == -1) { return TCL_ERROR; } - objc -= result+1; - if ((objc & 1) != 0) { - goto upvarSyntax; + if ((result == 0) && hasLevel) { + /* + * Synthesize an error message since TclObjGetFrame doesn't do this + * for this particular case. + */ + + Tcl_AppendResult(interp, "bad level \"", TclGetString(levelObj), "\"", + NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "LEVEL", NULL); + return TCL_ERROR; } - objv += result+1; + + /* + * We've now finished with parsing levels; skip to the variable names. + */ + + objc -= hasLevel+1; + objv += hasLevel+1; /* * Iterate over each (other variable, local variable) pair. Divide the diff --git a/tests/upvar.test b/tests/upvar.test index 9e1b2d9..86a5a20 100644 --- a/tests/upvar.test +++ b/tests/upvar.test @@ -1,17 +1,17 @@ # Commands covered: 'upvar', 'namespace upvar' # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: upvar.test,v 1.18 2008/10/14 18:49:47 dgp Exp $ +# RCS: @(#) $Id: upvar.test,v 1.19 2009/03/24 09:30:07 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -19,7 +19,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testupvar [llength [info commands testupvar]] - + test upvar-1.1 {reading variables with upvar} { proc p1 {a b} {set c 22; set d 33; p2} proc p2 {} {upvar a x1 b x2 c x3 d x4; set a abc; list $x1 $x2 $x3 $x4 $a} @@ -290,58 +290,64 @@ test upvar-7.5 {potential memory leak when deleting variable table} { leak } {} -test upvar-8.1 {errors in upvar command} { - list [catch upvar msg] $msg -} {1 {wrong # args: should be "upvar ?level? otherVar localVar ?otherVar localVar ...?"}} -test upvar-8.2 {errors in upvar command} { - list [catch {upvar 1} msg] $msg -} {1 {wrong # args: should be "upvar ?level? otherVar localVar ?otherVar localVar ...?"}} -test upvar-8.3 {errors in upvar command} { +test upvar-8.1 {errors in upvar command} -returnCodes error -body { + upvar +} -result {wrong # args: should be "upvar ?level? otherVar localVar ?otherVar localVar ...?"} +test upvar-8.2 {errors in upvar command} -returnCodes error -body { + upvar 1 +} -result {wrong # args: should be "upvar ?level? otherVar localVar ?otherVar localVar ...?"} +test upvar-8.2.1 {upvar with numeric first argument} { + apply {{} {set 0 ok; apply {{} {upvar 0 x; return $x}}}} +} ok +test upvar-8.3 {errors in upvar command} -returnCodes error -body { proc p1 {} {upvar a b c} - list [catch p1 msg] $msg -} {1 {wrong # args: should be "upvar ?level? otherVar localVar ?otherVar localVar ...?"}} -test upvar-8.4 {errors in upvar command} { + p1 +} -result {bad level "a"} +test upvar-8.4 {errors in upvar command} -returnCodes error -body { proc p1 {} {upvar 0 b b} - list [catch p1 msg] $msg -} {1 {can't upvar from variable to itself}} -test upvar-8.5 {errors in upvar command} { + p1 +} -result {can't upvar from variable to itself} +test upvar-8.5 {errors in upvar command} -returnCodes error -body { proc p1 {} {upvar 0 a b; upvar 0 b a} - list [catch p1 msg] $msg -} {1 {can't upvar from variable to itself}} -test upvar-8.6 {errors in upvar command} { + p1 +} -result {can't upvar from variable to itself} +test upvar-8.6 {errors in upvar command} -returnCodes error -body { proc p1 {} {set a 33; upvar b a} - list [catch p1 msg] $msg -} {1 {variable "a" already exists}} -test upvar-8.7 {errors in upvar command} { + p1 +} -result {variable "a" already exists} +test upvar-8.7 {errors in upvar command} -returnCodes error -body { proc p1 {} {trace variable a w foo; upvar b a} - list [catch p1 msg] $msg -} {1 {variable "a" has traces: can't use for upvar}} + p1 +} -result {variable "a" has traces: can't use for upvar} test upvar-8.8 {create nested array with upvar} -body { proc p1 {} {upvar x(a) b; set b(2) 44} catch {unset x} - list [catch p1 msg] $msg -} -cleanup { + p1 +} -returnCodes error -cleanup { unset x -} -result {1 {can't set "b(2)": variable isn't array}} -test upvar-8.9 {upvar won't create namespace variable that refers to procedure variable} { +} -result {can't set "b(2)": variable isn't array} +test upvar-8.9 {upvar won't create namespace variable that refers to procedure variable} -setup { catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename MakeLink ""} namespace eval ::test_ns_1 {} +} -returnCodes error -body { proc MakeLink {a} { - namespace eval ::test_ns_1 { + namespace eval ::test_ns_1 { upvar a a - } - unset ::test_ns_1::a + } + unset ::test_ns_1::a } - list [catch {MakeLink 1} msg] $msg -} {1 {bad variable name "a": upvar won't create namespace variable that refers to procedure variable}} -test upvar-8.10 {upvar will create element alias for new array element} { + MakeLink 1 +} -result {bad variable name "a": upvar won't create namespace variable that refers to procedure variable} +test upvar-8.10 {upvar will create element alias for new array element} -setup { catch {unset upvarArray} +} -body { array set upvarArray {} catch {upvar 0 upvarArray(elem) upvarArrayElemAlias} -} {0} -test upvar-8.11 {upvar will not create a variable that looks like an array} -body { +} -result {0} +test upvar-8.11 {upvar will not create a variable that looks like an array} -setup { catch {unset upvarArray} +} -body { array set upvarArray {} upvar 0 upvarArray(elem) upvarArrayElemAlias(elem) } -returnCodes 1 -match glob -result * @@ -407,23 +413,19 @@ test upvar-9.7 {Tcl_UpVar procedure} testupvar { } {1234} catch {unset a} - # # Tests for 'namespace upvar'. As the implementation is essentially the same as -# for 'upvar', we only test that the variables are linked correctly. Ie, we -# assume that the behaviour of variables once the link is established has +# for 'upvar', we only test that the variables are linked correctly, i.e., we +# assume that the behaviour of variables once the link is established has # already been tested above. # -# # Clear out any namespaces called test_ns_* catch {namespace delete {*}[namespace children :: test_ns_*]} - namespace eval test_ns_0 { variable x test_ns_0 } - -set x test_global +set ::x test_global test upvar-NS-1.1 {nsupvar links to correct variable} \ -body { @@ -434,7 +436,6 @@ test upvar-NS-1.1 {nsupvar links to correct variable} \ } \ -result {test_ns_0} \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.2 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -447,7 +448,6 @@ test upvar-NS-1.2 {nsupvar links to correct variable} \ } \ -result {test_ns_0} \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.3 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -458,7 +458,6 @@ test upvar-NS-1.3 {nsupvar links to correct variable} \ -result {namespace "test_ns_0" not found in "::test_ns_1"} \ -returnCodes error \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.4 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -472,7 +471,6 @@ test upvar-NS-1.4 {nsupvar links to correct variable} \ -result {namespace "test_ns_0" not found in "::test_ns_1"} \ -returnCodes error \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.5 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -484,7 +482,6 @@ test upvar-NS-1.5 {nsupvar links to correct variable} \ -result {can't read "w": no such variable} \ -returnCodes error \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.6 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -499,7 +496,6 @@ test upvar-NS-1.6 {nsupvar links to correct variable} \ -result {can't read "w": no such variable} \ -returnCodes error \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.7 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -512,7 +508,6 @@ test upvar-NS-1.7 {nsupvar links to correct variable} \ } \ -result {test_ns_1::test_ns_0} \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.8 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -528,7 +523,6 @@ test upvar-NS-1.8 {nsupvar links to correct variable} \ } \ -result {test_ns_1::test_ns_0} \ -cleanup {namespace delete test_ns_1} - test upvar-NS-1.9 {nsupvar links to correct variable} \ -body { namespace eval test_ns_1 { @@ -547,7 +541,6 @@ test upvar-NS-1.9 {nsupvar links to correct variable} \ test upvar-NS-2.1 {TIP 323} -returnCodes error -body { namespace upvar } -result {wrong # args: should be "namespace upvar ns ?otherVar myVar ...?"} - test upvar-NS-2.2 {TIP 323} -setup { namespace eval test_ns_1 {} } -body { @@ -555,9 +548,11 @@ test upvar-NS-2.2 {TIP 323} -setup { } -cleanup { namespace delete test_ns_1 } -result {} - - - + # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 0dde2f0c154556f8f812078b8eb894e2d248974e Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 24 Mar 2009 10:46:03 +0000 Subject: Fix [Bug 2704302] --- ChangeLog | 3 +++ doc/self.n | 9 +++++---- generic/tclOOBasic.c | 19 +++++-------------- tests/oo.test | 27 ++++++++++++++++++++++++++- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index c857492..0422af5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-03-24 Donal K. Fellows + * generic/tclOOBasic.c (TclOOSelfObjCmd): [Bug 2704302]: Make 'self + class' better defined in the context of objects that change class. + * generic/tclVar.c (Tcl_UpvarObjCmd): [Bug 2673163] (ferrieux) * generic/tclProc.c (TclObjGetFrame): Make the upvar command more able to handle its officially documented syntax. diff --git a/doc/self.n b/doc/self.n index 7e564b7..a82be96 100644 --- a/doc/self.n +++ b/doc/self.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: self.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: self.n,v 1.3 2009/03/24 10:46:04 dkf Exp $ '\" .so man.macros .TH self n 0.1 TclOO "TclOO Commands" @@ -39,9 +39,10 @@ destructors respectively). .TP \fBself class\fR . -This returns the name of the class or object that the current method was -defined within. Note that this will change as the chain of method -implementations is traversed with \fBnext\fR. +This returns the name of the class that the current method was defined within. +Note that this will change as the chain of method implementations is traversed +with \fBnext\fR, and that if the method was defined on an object then this +will fail. .TP \fBself filter\fR . diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 8be8773..f70d4f9 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.17 2009/02/10 22:49:55 nijtmans Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.18 2009/03/24 10:46:04 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -740,23 +740,14 @@ TclOOSelfObjCmd( contextPtr->oPtr->namespacePtr->fullName,-1)); return TCL_OK; case SELF_CLASS: { - Method *mPtr = CurrentlyInvoked(contextPtr).mPtr; - Object *declarerPtr; + Class *clsPtr = CurrentlyInvoked(contextPtr).mPtr->declaringClassPtr; - if (mPtr->declaringClassPtr != NULL) { - declarerPtr = mPtr->declaringClassPtr->thisPtr; - } else if (mPtr->declaringObjectPtr != NULL) { - declarerPtr = mPtr->declaringObjectPtr; - } else { - /* - * This should be unreachable code. - */ - - Tcl_AppendResult(interp, "method without declarer!", NULL); + if (clsPtr == NULL) { + Tcl_AppendResult(interp, "method not defined by a class", NULL); return TCL_ERROR; } - Tcl_SetObjResult(interp, TclOOObjectName(interp, declarerPtr)); + Tcl_SetObjResult(interp, TclOOObjectName(interp, clsPtr->thisPtr)); return TCL_OK; } case SELF_METHOD: diff --git a/tests/oo.test b/tests/oo.test index 1f5573b..6c3187b 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.23 2009/02/12 09:27:44 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.24 2009/03/24 10:46:04 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -979,6 +979,20 @@ test oo-13.3 {OO: changing an object's class} -body { } -cleanup { foo destroy } -returnCodes 1 -result {may not change a class object into a non-class object} +test oo-13.4 {OO: changing an object's class} -body { + oo::class create foo { + method m {} { + set result [list [self class] [info object class [self]]] + oo::objdefine [self] class ::bar + lappend result [self class] [info object class [self]] + } + } + oo::class create bar + [foo new] m +} -cleanup { + foo destroy + bar destroy +} -result {::foo ::foo ::foo ::bar} # todo: changing a class subtype (metaclass) to another class subtype test oo-14.1 {OO: mixins} { @@ -2183,6 +2197,17 @@ test oo-28.1 {scripted extensions to oo::define} -setup { list [catch {obj m 1 2}] [obj eval my m 3 4] } } -result {1 3,4} + +test oo-29.1 {self class with object-defined methods} -setup { + oo::object create obj +} -body { + oo::objdefine obj method demo {} { + self class + } + obj demo +} -returnCodes error -cleanup { + obj destroy +} -result {method not defined by a class} cleanupTests return -- cgit v0.12 From 9af3b5f8c9624875b3824b588948e889708ce322 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 25 Mar 2009 10:26:11 +0000 Subject: Documented [coroutine] and [yield]. [Bug 2152285] --- ChangeLog | 5 +++ doc/coroutine.n | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 doc/coroutine.n diff --git a/ChangeLog b/ChangeLog index 0422af5..81b5966 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-25 Donal K. Fellows + + * doc/coroutine.n: [Bug 2152285]: Added basic documentation for the + coroutine and yield commands. + 2009-03-24 Donal K. Fellows * generic/tclOOBasic.c (TclOOSelfObjCmd): [Bug 2704302]: Make 'self diff --git a/doc/coroutine.n b/doc/coroutine.n new file mode 100644 index 0000000..ad9fddd --- /dev/null +++ b/doc/coroutine.n @@ -0,0 +1,108 @@ +'\" +'\" Copyright (c) 2009 Donal K. Fellows. +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: coroutine.n,v 1.1 2009/03/25 10:26:11 dkf Exp $ +'\" +.so man.macros +.TH coroutine n 8.6 Tcl "Tcl Built-In Commands" +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +coroutine, yield \- Create and produce values from coroutines +.SH SYNOPSIS +.nf +\fBcoroutine \fIname command\fR ?\fIarg...\fR? +\fByield\fR ?\fIvalue\fR? +\fIname\fR ?\fIvalue\fR? +.fi +.BE +.SH DESCRIPTION +.PP +The \fBcoroutine\fR command creates a new coroutine context (with associated +command) named \fIname\fR and executes that context by calling \fIcommand\fR, +passing in the other remaining arguments without further interpretation. Once +\fIcommand\fR returns normally or with an exception (e.g., an error) the +coroutine context \fIname\fR is deleted. +.PP +Within the context, values may be generated as results by using the +\fByield\fR command; if no \fIvalue\fR is supplied, the empty string is used. +When that is called, the context will suspend execution and the +\fBcoroutine\fR command will return the argument to \fByield\fR. The execution +of the context can then be resumed by calling the context command, optionally +passing in the value to use as the result of the \fByield\fR call that caused +the context to be suspended. If the coroutine context never yields and instead +returns conventionally, the result of the \fBcoroutine\fR command will be the +result of the evaluation of the context. +.PP +The coroutine can also be deleted by destroying the command \fIname\fR, and +the name of the current coroutine can be retrieved by using \fBinfo +coroutine\fR. If there are deletion traces on variables in the coroutine's +implementation, they will fire at the point when the coroutine is explicitly +deleted (or, naturally, if the command returns conventionally). +.SH EXAMPLES +.PP +This example shows a coroutine that will produce an infinite sequence of +even values, and a loop that consumes the first ten of them. +.PP +.CS +proc allNumbers {} { + \fByield\fR + set i 0 + while 1 { + \fByield\fR $i + incr i 2 + } +} +\fBcoroutine\fR nextNumber allNumbers +for {set i 0} {$i < 10} {incr i} { + puts "received [\fInextNumber\fR]" +} +rename nextNumber {} +.CE +.PP +In this example, the coroutine acts to add up the arguments passed to it. +.PP +.CS +\fBcoroutine\fR accumulator apply {{} { + set x 0 + while 1 { + incr x [\fByield\fR $x] + } +}} +for {set i 0} {$i < 10} {incr i} { + puts "$i -> [\fIaccumulator\fR $i]" +} +.CE +.PP +This example demonstrates the use of coroutines to implement the classic Sieve +of Eratosthenes algorithm for finding prime numbers. +.PP +.CS +proc filterByFactor {source n} { + \fByield\fR [info coroutine] + while 1 { + set x [$source] + if {$x % $n} { + \fByield\fR $x + } + } +} +\fBcoroutine\fR allNumbers apply {{} {while 1 {\fByield\fR [incr x]}}} +set c allNumbers +for {set i 1} {$i <= 20} {incr i} { + set n [$c] + puts "prime#$i = $n" + set c [\fBcoroutine\fR prime$i filterByFactor $c $n] +} +.CE +.SH "SEE ALSO" +apply(n), info(n), proc(n), return(n) +.SH KEYWORDS +coroutine, generator +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: -- cgit v0.12 From 1b05e7e8c78a2ddf831f0a35b90114a44bda6fff Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 25 Mar 2009 23:22:36 +0000 Subject: bring doc and tools in line with http://wiki.tcl.tk/812 --- ChangeLog | 7 +++++++ doc/tclsh.1 | 4 ++-- tools/installData.tcl | 4 ++-- tools/str2c | 4 ++-- tools/tcltk-man2html.tcl | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81b5966..4b704e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-03-09 Jan Nijtmans + + * doc/tclsh.1 bring doc and tools in line with http://wiki.tcl.tk/812 + * tools/installData.tcl + * tools/str2c + * tools/tcltk-man2html.tcl + 2009-03-25 Donal K. Fellows * doc/coroutine.n: [Bug 2152285]: Added basic documentation for the diff --git a/doc/tclsh.1 b/doc/tclsh.1 index db07346..8e2163a 100644 --- a/doc/tclsh.1 +++ b/doc/tclsh.1 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclsh.1,v 1.16 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: tclsh.1,v 1.17 2009/03/25 23:22:42 nijtmans Exp $ '\" .so man.macros .TH tclsh 1 "" Tcl "Tcl Applications" @@ -75,7 +75,7 @@ following three lines: .CS \fB#!/bin/sh # the next line restarts using tclsh \e -exec tclsh "$0" "$@"\fR +exec tclsh "$0" ${1+"$@"}\fR .CE .PP This approach has three advantages over the approach in the previous diff --git a/tools/installData.tcl b/tools/installData.tcl index cf067a3..5bf0ad1 100644 --- a/tools/installData.tcl +++ b/tools/installData.tcl @@ -1,6 +1,6 @@ #!/bin/sh #\ - exec tclsh "$0" ${1+"$@"} +exec tclsh "$0" ${1+"$@"} #---------------------------------------------------------------------- # @@ -16,7 +16,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: installData.tcl,v 1.1 2004/08/18 19:59:09 kennykb Exp $ +# RCS: @(#) $Id: installData.tcl,v 1.2 2009/03/25 23:22:38 nijtmans Exp $ # #---------------------------------------------------------------------- diff --git a/tools/str2c b/tools/str2c index 15cb8e6..c151c0f 100644 --- a/tools/str2c +++ b/tools/str2c @@ -4,10 +4,10 @@ # # 1997/10 -- dl # -# $Id: str2c,v 1.2 1999/04/16 00:47:40 stanton Exp $ +# $Id: str2c,v 1.3 2009/03/25 23:22:37 nijtmans Exp $ # # restart with tclsh \ -exec tclsh8.0 "$0" "$@" +exec tclsh "$0" ${1+"$@"} # Max string length # (some C compiler have a 2048 chars limits (so 2047 real chars with diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 4379f22..0cb3ac7 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -1,6 +1,6 @@ #!/bin/sh # The next line is executed by /bin/sh, but not tcl \ -exec tclsh8.4 "$0" ${1+"$@"} +exec tclsh "$0" ${1+"$@"} package require Tcl 8.5 -- cgit v0.12 From 0b1bed54ab922c6a8d0f9a3471a1115ddad907da Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 25 Mar 2009 23:24:01 +0000 Subject: bring doc and tools in line with http://wiki.tcl.tk/812 --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4b704e6..5e45494 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2009-03-09 Jan Nijtmans +2009-03-25 Jan Nijtmans * doc/tclsh.1 bring doc and tools in line with http://wiki.tcl.tk/812 * tools/installData.tcl -- cgit v0.12 From 17fa409b18efb7df83ed36881fad903c1bd43670 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 26 Mar 2009 10:43:47 +0000 Subject: Some small improvements to the last example --- doc/coroutine.n | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/coroutine.n b/doc/coroutine.n index ad9fddd..08662c8 100644 --- a/doc/coroutine.n +++ b/doc/coroutine.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: coroutine.n,v 1.1 2009/03/25 10:26:11 dkf Exp $ +'\" RCS: @(#) $Id: coroutine.n,v 1.2 2009/03/26 10:43:47 dkf Exp $ '\" .so man.macros .TH coroutine n 8.6 Tcl "Tcl Built-In Commands" @@ -78,24 +78,30 @@ for {set i 0} {$i < 10} {incr i} { .CE .PP This example demonstrates the use of coroutines to implement the classic Sieve -of Eratosthenes algorithm for finding prime numbers. +of Eratosthenes algorithm for finding prime numbers. Note the creation of +coroutines inside a coroutine. .PP .CS proc filterByFactor {source n} { \fByield\fR [info coroutine] while 1 { - set x [$source] + set x [\fI$source\fR] if {$x % $n} { \fByield\fR $x } } } \fBcoroutine\fR allNumbers apply {{} {while 1 {\fByield\fR [incr x]}}} -set c allNumbers +\fBcoroutine\fR eratosthenes apply {c { + \fByield\fR + while 1 { + set n [\fI$c\fR] + \fByield\fR $n + set c [\fBcoroutine\fR prime$n filterByFactor $c $n] + } +}} allNumbers for {set i 1} {$i <= 20} {incr i} { - set n [$c] - puts "prime#$i = $n" - set c [\fBcoroutine\fR prime$i filterByFactor $c $n] + puts "prime#$i = [\fIeratosthenes\fR]" } .CE .SH "SEE ALSO" -- cgit v0.12 From 58087b825208917336f1f10d38628e76d415174c Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 26 Mar 2009 19:58:32 +0000 Subject: typo --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5e45494..cedc795 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3273,7 +3273,7 @@ new (underscored) form of environment variable names, but make it the encouraged form as well. [Bug 1914604] -2006-06-17 Kevin Kenny +2008-06-17 Kevin Kenny * generic/tclClock.c (ConvertLocalToUTC): * tests/clock.test (clock-63.1): Fixed a bug where the internal -- cgit v0.12 From ea2ebe5242290d7fa2b53cd32d27e12e53a41b87 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 27 Mar 2009 19:17:54 +0000 Subject: * generic/tclPathObj.c (TclPathPart): TclPathPart() was computing * tests/fileName.test: the wrong results for both [file dirname] and [file tail] on "path" arguments with the PATHFLAGS != 0 intrep and with an empty string for the "joined-on" part. [Bug 2710920] --- ChangeLog | 7 +++++++ generic/tclPathObj.c | 32 +++++++++++++++++++++++++++++--- tests/fileName.test | 14 +++++++++++++- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cedc795..3fb29f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-03-27 Don Porter + + * generic/tclPathObj.c (TclPathPart): TclPathPart() was computing + * tests/fileName.test: the wrong results for both [file dirname] and + [file tail] on "path" arguments with the PATHFLAGS != 0 intrep and + with an empty string for the "joined-on" part. [Bug 2710920] + 2009-03-25 Jan Nijtmans * doc/tclsh.1 bring doc and tools in line with http://wiki.tcl.tk/812 diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 725f2a9..3c7cce5 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.79 2009/02/20 18:19:16 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.80 2009/03/27 19:17:54 dgp Exp $ */ #include "tclInt.h" @@ -578,11 +578,24 @@ TclPathPart( * the standardPath code. */ - const char *rest = TclGetString(fsPathPtr->normPathPtr); + int numBytes; + const char *rest = + Tcl_GetStringFromObj(fsPathPtr->normPathPtr, &numBytes); if (strchr(rest, '/') != NULL) { goto standardPath; } + /* + * If the joined-on bit is empty, then [file dirname] is + * documented to return all but the last non-empty element + * of the path, so we need to split apart the main part to + * get the right answer. We could do that here, but it's + * simpler to fall back to the standardPath code. + * [Bug 2710920] + */ + if (numBytes == 0) { + goto standardPath; + } if (tclPlatform == TCL_PLATFORM_WINDOWS && strchr(rest, '\\') != NULL) { goto standardPath; @@ -603,11 +616,24 @@ TclPathPart( * we don't, and instead just use the standardPath code. */ - const char *rest = TclGetString(fsPathPtr->normPathPtr); + int numBytes; + const char *rest = + Tcl_GetStringFromObj(fsPathPtr->normPathPtr, &numBytes); if (strchr(rest, '/') != NULL) { goto standardPath; } + /* + * If the joined-on bit is empty, then [file tail] is + * documented to return the last non-empty element + * of the path, so we need to split off the last element + * of the main part to get the right answer. We could do + * that here, but it's simpler to fall back to the + * standardPath code. [Bug 2710920] + */ + if (numBytes == 0) { + goto standardPath; + } if (tclPlatform == TCL_PLATFORM_WINDOWS && strchr(rest, '\\') != NULL) { goto standardPath; diff --git a/tests/fileName.test b/tests/fileName.test index c40b8ac..78f2e58 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.58 2009/02/20 18:19:16 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.59 2009/03/27 19:17:54 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1277,6 +1277,18 @@ test filename-14.25.1 {type specific globbing} {win} { test filename-14.26 {type specific globbing} { glob -nocomplain -dir globTest -types {readonly} * } {} +test filename-14.27 {Bug 2710920} {unixOrPc} { + file tail [lindex [lsort [glob globTest/*/]] 0] +} a1 +test filename-14.28 {Bug 2710920} {unixOrPc} { + file dirname [lindex [lsort [glob globTest/*/]] 0] +} globTest +test filename-14.29 {Bug 2710920} {unixOrPc} { + file extension [lindex [lsort [glob globTest/*/]] 0] +} {} +test filename-14.30 {Bug 2710920} {unixOrPc} { + file rootname [lindex [lsort [glob globTest/*/]] 0] +} globTest/a1/ unset globname -- cgit v0.12 From 543a9cb0f2306de1770f95ba67834ae3409ca065 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 30 Mar 2009 18:49:12 +0000 Subject: * doc/Alloc.3: Size argument is "unsigned int". [Bug 2556263] --- ChangeLog | 4 ++++ doc/Alloc.3 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3fb29f7..f33e2bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-03-30 Don Porter + + * doc/Alloc.3: Size argument is "unsigned int". [Bug 2556263] + 2009-03-27 Don Porter * generic/tclPathObj.c (TclPathPart): TclPathPart() was computing diff --git a/doc/Alloc.3 b/doc/Alloc.3 index 2027d6c..3204026 100644 --- a/doc/Alloc.3 +++ b/doc/Alloc.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Alloc.3,v 1.10 2006/06/05 10:04:33 dkf Exp $ +'\" RCS: @(#) $Id: Alloc.3,v 1.11 2009/03/30 18:49:12 dgp Exp $ '\" .so man.macros .TH Tcl_Alloc 3 7.5 Tcl "Tcl Library Procedures" @@ -46,7 +46,7 @@ char * \fBattemptckrealloc\fR(\fIptr, size\fR) .SH ARGUMENTS .AS char *size -.AP int size in +.AP "unsigned int" size in Size in bytes of the memory block to allocate. .AP char *ptr in Pointer to memory block to free or realloc. -- cgit v0.12 From f645033318ef3df0653babe269de18aebcca34f1 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 4 Apr 2009 17:31:59 +0000 Subject: Fix [Bug 1910136]. --- ChangeLog | 19 ++++++++++++------- doc/vwait.n | 32 +++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f33e2bf..ec0289f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,18 +1,23 @@ +2009-04-04 Donal K. Fellows + + * doc/vwait.n: [Bug 1910136]: Extend description and examples to make + it clearer just how this command interprets variable names. + 2009-03-30 Don Porter - * doc/Alloc.3: Size argument is "unsigned int". [Bug 2556263] + * doc/Alloc.3: [Bug 2556263]: Size argument is "unsigned int". 2009-03-27 Don Porter - * generic/tclPathObj.c (TclPathPart): TclPathPart() was computing - * tests/fileName.test: the wrong results for both [file dirname] and - [file tail] on "path" arguments with the PATHFLAGS != 0 intrep and - with an empty string for the "joined-on" part. [Bug 2710920] + * generic/tclPathObj.c (TclPathPart): [Bug 2710920]: TclPathPart() + * tests/fileName.test: was computing the wrong results for both [file + dirname] and [file tail] on "path" arguments with the PATHFLAGS != 0 + intrep and with an empty string for the "joined-on" part. 2009-03-25 Jan Nijtmans - * doc/tclsh.1 bring doc and tools in line with http://wiki.tcl.tk/812 - * tools/installData.tcl + * doc/tclsh.1: Bring doc and tools in line with + * tools/installData.tcl: http://wiki.tcl.tk/812 * tools/str2c * tools/tcltk-man2html.tcl diff --git a/doc/vwait.n b/doc/vwait.n index 89796c6..fb62fdf 100644 --- a/doc/vwait.n +++ b/doc/vwait.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: vwait.n,v 1.8 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: vwait.n,v 1.9 2009/04/04 17:32:00 dkf Exp $ '\" .so man.macros .TH vwait n 8.0 Tcl "Tcl Built-In Commands" @@ -19,12 +19,12 @@ vwait \- Process events until a variable is written .PP This command enters the Tcl event loop to process events, blocking the application if no events are ready. It continues processing -events until some event handler sets the value of variable +events until some event handler sets the value of the global variable \fIvarName\fR. Once \fIvarName\fR has been set, the \fBvwait\fR command will return as soon as the event handler that modified -\fIvarName\fR completes. \fIvarName\fR must be globally scoped -(either with a call to \fBglobal\fR for the \fIvarName\fR, or with -the full namespace path specification). +\fIvarName\fR completes. The \fIvarName\fR argument is always interpreted as +a variable name with respect to the global namespace, but can refer to any +namespace's variables if the fully-qualified name is given. .PP In some cases the \fBvwait\fR command may not return immediately after \fIvarName\fR is set. This can happen if the event handler @@ -75,7 +75,29 @@ switch $state { } } .CE +.PP +A command that will wait for some time delay by waiting for a namespace +variable to be set. Includes an interlock to prevent nested waits. +.PP +.CS +namespace eval example { + variable v done + proc wait {delay} { + variable v + if {$v ne "waiting"} { + set v waiting + after $delay [namespace code {set v done}] + \fBvwait\fR [namespace which -variable v] + } + return $v + } +} +.CE .SH "SEE ALSO" global(n), update(n) .SH KEYWORDS event, variable, wait +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: -- cgit v0.12 From 6df16152535178264e5b70e09d4f5adf03fcd404 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 7 Apr 2009 18:45:54 +0000 Subject: * generic/tclStringObj.c: Correction so that value of TCL_GROWTH_MIN_ALLOC is everywhere expressed in bytes as comment claims. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec0289f..fae2448 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-07 Don Porter + + * generic/tclStringObj.c: Correction so that value of + TCL_GROWTH_MIN_ALLOC is everywhere expressed in bytes as comment claims. + 2009-04-04 Donal K. Fellows * doc/vwait.n: [Bug 1910136]: Extend description and examples to make diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 716c272..7bd7526 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.121 2009/02/22 04:38:58 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.122 2009/04/07 18:45:54 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -264,7 +264,7 @@ GrowUnicodeBuffer( */ unsigned int limit = STRING_MAXCHARS - needed; unsigned int extra = needed - stringPtr->numChars - + TCL_GROWTH_MIN_ALLOC; + + TCL_GROWTH_MIN_ALLOC/sizeof(Tcl_UniChar); int growth = (int) ((extra > limit) ? limit : extra); attempt = needed + growth; ptr = stringAttemptRealloc(stringPtr, attempt); -- cgit v0.12 From ffc8f6440e2b529e2f41d8952fa7392213511ef6 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 8 Apr 2009 16:05:15 +0000 Subject: * library/tcltest/tcltest.tcl: Converted [eval]s (some unsafe!) to * library/tcltest/pkgIndex.tcl: {*} in tcltest package. [Bug 2570363] * unix/Makefile.in: => tcltest 2.3.1 * win/Makefile.in: --- ChangeLog | 7 +++++++ library/tcltest/pkgIndex.tcl | 2 +- library/tcltest/tcltest.tcl | 20 ++++++++++---------- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index fae2448..c8fda18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-04-08 Don Porter + + * library/tcltest/tcltest.tcl: Converted [eval]s (some unsafe!) to + * library/tcltest/pkgIndex.tcl: {*} in tcltest package. [Bug 2570363] + * unix/Makefile.in: => tcltest 2.3.1 + * win/Makefile.in: + 2009-04-07 Don Porter * generic/tclStringObj.c: Correction so that value of diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl index f062cde..5b33ac7 100644 --- a/library/tcltest/pkgIndex.tcl +++ b/library/tcltest/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded tcltest 2.3.0 [list source [file join $dir tcltest.tcl]] +package ifneeded tcltest 2.3.1 [list source [file join $dir tcltest.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index d799eb0..f363c80 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.103 2007/12/13 15:26:03 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.104 2009/04/08 16:05:15 dgp Exp $ package require Tcl 8.5 ;# -verbose line uses [info frame] namespace eval tcltest { @@ -24,7 +24,7 @@ namespace eval tcltest { # When the version number changes, be sure to update the pkgIndex.tcl file, # and the install directory in the Makefiles. When the minor version # changes (new feature) be sure to update the man page as well. - variable Version 2.3.0 + variable Version 2.3.1 # Compatibility support for dumb variables defined in tcltest 1 # Do not use these. Call [package provide Tcl] and [info patchlevel] @@ -602,7 +602,7 @@ namespace eval tcltest { } proc configure args { RemoveAutoConfigureTraces - set code [catch {eval Configure $args} msg] + set code [catch {Configure {*}$args} msg] return -code $code $msg } @@ -1420,7 +1420,7 @@ proc tcltest::ProcessFlags {flagArray} { RemoveAutoConfigureTraces } else { set args $flagArray - while {[llength $args]>1 && [catch {eval configure $args} msg]} { + while {[llength $args]>1 && [catch {configure {*}$args} msg]} { # Something went wrong parsing $args for tcltest options # Check whether the problem is "unknown option" @@ -1585,7 +1585,7 @@ proc tcltest::Replace::puts {args} { # If we haven't returned by now, we don't know how to handle the # input. Let puts handle it. - return [eval Puts $args] + return [Puts {*}$args] } # tcltest::Eval -- @@ -2242,12 +2242,12 @@ proc tcltest::Skipped {name constraints} { set doTest 0 if {[string match {*[$\[]*} $constraints] != 0} { # full expression, e.g. {$foo > [info tclversion]} - catch {set doTest [uplevel #0 expr $constraints]} + catch {set doTest [uplevel #0 [list expr $constraints]]} } elseif {[regexp {[^.:_a-zA-Z0-9 \n\r\t]+} $constraints] != 0} { # something like {a || b} should be turned into # $testConstraints(a) || $testConstraints(b). regsub -all {[.\w]+} $constraints {$testConstraints(&)} c - catch {set doTest [eval expr $c]} + catch {set doTest [eval [list expr $c]]} } elseif {![catch {llength $constraints}]} { # just simple constraints such as {unixOnly fonts}. set doTest 1 @@ -2571,7 +2571,7 @@ proc tcltest::cleanupTests {{calledFromAllFile 0}} { # None # a lower case version is needed for compatibility with tcltest 1.0 -proc tcltest::getMatchingFiles args {eval GetMatchingFiles $args} +proc tcltest::getMatchingFiles args {GetMatchingFiles {*}$args} proc tcltest::GetMatchingFiles { args } { if {[llength $args]} { @@ -3326,12 +3326,12 @@ namespace eval tcltest { Tcl list: $msg" return } - if {[llength $::env(TCLTEST_OPTIONS)] % 2} { + if {[llength $options] % 2} { Warn "invalid TCLTEST_OPTIONS: \"$options\":\n should be\ -option value ?-option value ...?" return } - if {[catch {eval Configure $::env(TCLTEST_OPTIONS)} msg]} { + if {[catch {Configure {*}$options} msg]} { Warn "invalid TCLTEST_OPTIONS: \"$options\":\n $msg" return } diff --git a/unix/Makefile.in b/unix/Makefile.in index 32ebc6c..2230396 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.264 2009/03/14 17:20:24 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.265 2009/04/08 16:05:15 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -829,8 +829,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs done; @echo "Installing package msgcat 1.4.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.4.2.tm; - @echo "Installing package tcltest 2.3.0 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.0.tm; + @echo "Installing package tcltest 2.3.1 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.1.tm; @echo "Installing package platform 1.0.3 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.3.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 9ce403e..4469d05 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.151 2009/02/24 14:42:21 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.152 2009/04/08 16:05:15 dgp Exp $ VERSION = @TCL_VERSION@ @@ -705,8 +705,8 @@ install-libraries: libraries install-tzdata install-msgs done; @echo "Installing package msgcat 1.4.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm; - @echo "Installing package tcltest 2.3.0 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.0.tm; + @echo "Installing package tcltest 2.3.1 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.1.tm; @echo "Installing package platform 1.0.3 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.3.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; -- cgit v0.12 From 9bc6349d687303e2396272aa45de0d38a16e87f5 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 8 Apr 2009 19:17:44 +0000 Subject: * library/platform/platform.tcl: Extended the darwin sections to * library/platform/pkgIndex.tcl: add a kernel version number to * unix/Makefile.in: the identifier for anything from Leopard (10.5) * win/Makefile.in: on up. Extended patterns for same. Extended cpu * doc/platform.n: recognition for 64bit Tcl running on a 32bit kernel on a 64bit processor (By Daniel Steffen). Bumped version to 1.0.4. Updated Makefiles. --- ChangeLog | 10 ++++++++++ doc/platform.n | 6 +++--- library/platform/pkgIndex.tcl | 2 +- library/platform/platform.tcl | 40 +++++++++++++++++++++++++++++++++++++++- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 6 files changed, 59 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8fda18..786610f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-04-08 Andreas Kupries + + * library/platform/platform.tcl: Extended the darwin sections to + * library/platform/pkgIndex.tcl: add a kernel version number to + * unix/Makefile.in: the identifier for anything from Leopard (10.5) + * win/Makefile.in: on up. Extended patterns for same. Extended cpu + * doc/platform.n: recognition for 64bit Tcl running on a 32bit + kernel on a 64bit processor (By Daniel Steffen). Bumped version to + 1.0.4. Updated Makefiles. + 2009-04-08 Don Porter * library/tcltest/tcltest.tcl: Converted [eval]s (some unsafe!) to diff --git a/doc/platform.n b/doc/platform.n index eaf7d78..c73c730 100644 --- a/doc/platform.n +++ b/doc/platform.n @@ -4,17 +4,17 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: platform.n,v 1.5 2008/03/26 09:59:22 dkf Exp $ +'\" RCS: @(#) $Id: platform.n,v 1.6 2009/04/08 19:17:45 andreas_kupries Exp $ '\" .so man.macros -.TH "platform" n 1.0.3 platform "Tcl Bundled Packages" +.TH "platform" n 1.0.4 platform "Tcl Bundled Packages" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME platform \- System identification support code and utilities .SH SYNOPSIS .nf -\fBpackage require platform ?1.0.3?\fR +\fBpackage require platform ?1.0.4?\fR .sp \fBplatform::generic\fR \fBplatform::identify\fR diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 27d596f..a63f4aa 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.3 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.4 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 143cdc5..b42c419 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -111,6 +111,13 @@ proc ::platform::generic {} { } darwin { set plat macosx + # Correctly identify the cpu when running as a 64bit + # process on a machine with a 32bit kernel + if {$cpu eq "ix86"} { + if {$tcl_platform(wordSize) == 8} { + set cpu x86_64 + } + } } aix { set cpu powerpc @@ -154,6 +161,14 @@ proc ::platform::identify {} { append plat $text return "${plat}-${cpu}" } + macosx { + set major [lindex [split $tcl_platform(osVersion) .] 0] + if {$major > 8} { + incr major -4 + append plat 10.$major + return "${plat}-${cpu}" + } + } linux { # Look for the libc*.so and determine its version # (libc5/6, libc6 further glibc 2.X) @@ -238,6 +253,29 @@ proc ::platform::patterns {id} { } } } + macosx*-* { + # 10.5+ + if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} { + if {$v ne ""} { + foreach {major minor} [split $v .] break + + # Add 10.5 to 10.minor to patterns. + set res {} + for {set j $minor} {$j >= 5} {incr j -1} { + lappend res macosx${major}.${j}-${cpu} + lappend res macosx${major}.${j}-universal + } + + # Add unversioned patterns for 10.3/10.4 builds. + lappend res macosx-${cpu} + lappend res macosx-universal + } else { + lappend res macosx-universal + } + } else { + lappend res macosx-universal + } + } macosx-powerpc - macosx-ix86 { lappend res macosx-universal @@ -251,7 +289,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.3 +package provide platform 1.0.4 # ### ### ### ######### ######### ######### ## Demo application diff --git a/unix/Makefile.in b/unix/Makefile.in index 2230396..0a4b918 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.265 2009/04/08 16:05:15 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.266 2009/04/08 19:17:45 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -832,8 +832,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.3.1 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.1.tm; - @echo "Installing package platform 1.0.3 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.3.tm; + @echo "Installing package platform 1.0.4 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.4.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 4469d05..378f0e7 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.152 2009/04/08 16:05:15 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.153 2009/04/08 19:17:45 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -707,8 +707,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm; @echo "Installing package tcltest 2.3.1 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.1.tm; - @echo "Installing package platform 1.0.3 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.3.tm; + @echo "Installing package platform 1.0.4 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.4.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12 From c67ebc59a77414e7ae761c6b723c2bf49821c829 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 9 Apr 2009 17:01:35 +0000 Subject: * library/http/http.tcl: Handle incomplete lines in the "connecting" state. Thanks to Sergei Golovan. [Bug 26245326] --- ChangeLog | 5 +++++ library/http/http.tcl | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 786610f..e580aca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-09 Don Porter + + * library/http/http.tcl: Handle incomplete lines in the + "connecting" state. Thanks to Sergei Golovan. [Bug 26245326] + 2009-04-08 Andreas Kupries * library/platform/platform.tcl: Extended the darwin sections to diff --git a/library/http/http.tcl b/library/http/http.tcl index a98e145..f40221e 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.73 2009/02/24 14:39:15 dkf Exp $ +# RCS: @(#) $Id: http.tcl,v 1.74 2009/04/09 17:01:38 dgp Exp $ package require Tcl 8.4 # Keep this in sync with pkgIndex.tcl and with the install directories in @@ -962,9 +962,10 @@ proc http::Event {sock token} { return } if {$state(state) eq "connecting"} { - set state(state) "header" if {[catch {gets $sock state(http)} n]} { return [Finish $token $n] + } elseif {$n >= 0} { + set state(state) "header" } } elseif {$state(state) eq "header"} { if {[catch {gets $sock line} n]} { -- cgit v0.12 From 9185b616460eb962ba1546ffb5db0eabd0d68619 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Thu, 9 Apr 2009 20:07:18 +0000 Subject: Olson's tzdata2009e --- ChangeLog | 5 + library/tzdata/Africa/Casablanca | 2 + library/tzdata/Africa/Tunis | 2 - library/tzdata/America/Argentina/San_Luis | 183 +++++++++++++++ library/tzdata/America/Havana | 184 ++++++++------- library/tzdata/America/Resolute | 187 +++++++++++++++ library/tzdata/Asia/Amman | 204 ++++++++--------- library/tzdata/Asia/Damascus | 182 +++++++-------- library/tzdata/Asia/Gaza | 366 +++++++++++++++--------------- library/tzdata/Asia/Kathmandu | 7 + library/tzdata/Asia/Katmandu | 8 +- library/tzdata/Europe/Zurich | 10 +- tools/tclZIC.tcl | 4 +- 13 files changed, 861 insertions(+), 483 deletions(-) create mode 100644 library/tzdata/Asia/Kathmandu diff --git a/ChangeLog b/ChangeLog index e580aca..81d42e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-08 Kevin B. Kenny + + * tools/tclZIC.tcl: Always emit files with Unix line termination. + * library/tzdata: Olson's tzdata2009e + 2009-04-09 Don Porter * library/http/http.tcl: Handle incomplete lines in the diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca index da64c44..d976aa5 100644 --- a/library/tzdata/Africa/Casablanca +++ b/library/tzdata/Africa/Casablanca @@ -23,4 +23,6 @@ set TZData(:Africa/Casablanca) { {504918000 0 0 WET} {1212278400 3600 1 WEST} {1220223600 0 0 WET} + {1243814400 3600 1 WEST} + {1250809200 0 0 WET} } diff --git a/library/tzdata/Africa/Tunis b/library/tzdata/Africa/Tunis index 8fdb11b..8a7ec16 100644 --- a/library/tzdata/Africa/Tunis +++ b/library/tzdata/Africa/Tunis @@ -36,8 +36,6 @@ set TZData(:Africa/Tunis) { {1193533200 3600 0 CET} {1206838800 7200 1 CEST} {1224982800 3600 0 CET} - {1238288400 7200 1 CEST} - {1256432400 3600 0 CET} {1269738000 7200 1 CEST} {1288486800 3600 0 CET} {1301187600 7200 1 CEST} diff --git a/library/tzdata/America/Argentina/San_Luis b/library/tzdata/America/Argentina/San_Luis index 60a7995..1d06652 100644 --- a/library/tzdata/America/Argentina/San_Luis +++ b/library/tzdata/America/Argentina/San_Luis @@ -61,4 +61,187 @@ set TZData(:America/Argentina/San_Luis) { {1090728000 -10800 0 ART} {1198983600 -7200 1 ARST} {1200880800 -10800 0 ART} + {1237086000 -14400 0 WART} + {1237089600 -14400 0 WART} + {1255838400 -10800 1 WARST} + {1269140400 -14400 0 WART} + {1287288000 -10800 1 WARST} + {1300590000 -14400 0 WART} + {1318737600 -10800 1 WARST} + {1332039600 -14400 0 WART} + {1350792000 -10800 1 WARST} + {1363489200 -14400 0 WART} + {1382241600 -10800 1 WARST} + {1394938800 -14400 0 WART} + {1413691200 -10800 1 WARST} + {1426388400 -14400 0 WART} + {1445140800 -10800 1 WARST} + {1458442800 -14400 0 WART} + {1476590400 -10800 1 WARST} + {1489892400 -14400 0 WART} + {1508040000 -10800 1 WARST} + {1521342000 -14400 0 WART} + {1540094400 -10800 1 WARST} + {1552791600 -14400 0 WART} + {1571544000 -10800 1 WARST} + {1584241200 -14400 0 WART} + {1602993600 -10800 1 WARST} + {1616295600 -14400 0 WART} + {1634443200 -10800 1 WARST} + {1647745200 -14400 0 WART} + {1665892800 -10800 1 WARST} + {1679194800 -14400 0 WART} + {1697342400 -10800 1 WARST} + {1710644400 -14400 0 WART} + {1729396800 -10800 1 WARST} + {1742094000 -14400 0 WART} + {1760846400 -10800 1 WARST} + {1773543600 -14400 0 WART} + {1792296000 -10800 1 WARST} + {1805598000 -14400 0 WART} + {1823745600 -10800 1 WARST} + {1837047600 -14400 0 WART} + {1855195200 -10800 1 WARST} + {1868497200 -14400 0 WART} + {1887249600 -10800 1 WARST} + {1899946800 -14400 0 WART} + {1918699200 -10800 1 WARST} + {1931396400 -14400 0 WART} + {1950148800 -10800 1 WARST} + {1963450800 -14400 0 WART} + {1981598400 -10800 1 WARST} + {1994900400 -14400 0 WART} + {2013048000 -10800 1 WARST} + {2026350000 -14400 0 WART} + {2044497600 -10800 1 WARST} + {2057799600 -14400 0 WART} + {2076552000 -10800 1 WARST} + {2089249200 -14400 0 WART} + {2108001600 -10800 1 WARST} + {2120698800 -14400 0 WART} + {2139451200 -10800 1 WARST} + {2152753200 -14400 0 WART} + {2170900800 -10800 1 WARST} + {2184202800 -14400 0 WART} + {2202350400 -10800 1 WARST} + {2215652400 -14400 0 WART} + {2234404800 -10800 1 WARST} + {2247102000 -14400 0 WART} + {2265854400 -10800 1 WARST} + {2278551600 -14400 0 WART} + {2297304000 -10800 1 WARST} + {2310001200 -14400 0 WART} + {2328753600 -10800 1 WARST} + {2342055600 -14400 0 WART} + {2360203200 -10800 1 WARST} + {2373505200 -14400 0 WART} + {2391652800 -10800 1 WARST} + {2404954800 -14400 0 WART} + {2423707200 -10800 1 WARST} + {2436404400 -14400 0 WART} + {2455156800 -10800 1 WARST} + {2467854000 -14400 0 WART} + {2486606400 -10800 1 WARST} + {2499908400 -14400 0 WART} + {2518056000 -10800 1 WARST} + {2531358000 -14400 0 WART} + {2549505600 -10800 1 WARST} + {2562807600 -14400 0 WART} + {2580955200 -10800 1 WARST} + {2594257200 -14400 0 WART} + {2613009600 -10800 1 WARST} + {2625706800 -14400 0 WART} + {2644459200 -10800 1 WARST} + {2657156400 -14400 0 WART} + {2675908800 -10800 1 WARST} + {2689210800 -14400 0 WART} + {2707358400 -10800 1 WARST} + {2720660400 -14400 0 WART} + {2738808000 -10800 1 WARST} + {2752110000 -14400 0 WART} + {2770862400 -10800 1 WARST} + {2783559600 -14400 0 WART} + {2802312000 -10800 1 WARST} + {2815009200 -14400 0 WART} + {2833761600 -10800 1 WARST} + {2847063600 -14400 0 WART} + {2865211200 -10800 1 WARST} + {2878513200 -14400 0 WART} + {2896660800 -10800 1 WARST} + {2909962800 -14400 0 WART} + {2928110400 -10800 1 WARST} + {2941412400 -14400 0 WART} + {2960164800 -10800 1 WARST} + {2972862000 -14400 0 WART} + {2991614400 -10800 1 WARST} + {3004311600 -14400 0 WART} + {3023064000 -10800 1 WARST} + {3036366000 -14400 0 WART} + {3054513600 -10800 1 WARST} + {3067815600 -14400 0 WART} + {3085963200 -10800 1 WARST} + {3099265200 -14400 0 WART} + {3118017600 -10800 1 WARST} + {3130714800 -14400 0 WART} + {3149467200 -10800 1 WARST} + {3162164400 -14400 0 WART} + {3180916800 -10800 1 WARST} + {3193614000 -14400 0 WART} + {3212366400 -10800 1 WARST} + {3225668400 -14400 0 WART} + {3243816000 -10800 1 WARST} + {3257118000 -14400 0 WART} + {3275265600 -10800 1 WARST} + {3288567600 -14400 0 WART} + {3307320000 -10800 1 WARST} + {3320017200 -14400 0 WART} + {3338769600 -10800 1 WARST} + {3351466800 -14400 0 WART} + {3370219200 -10800 1 WARST} + {3383521200 -14400 0 WART} + {3401668800 -10800 1 WARST} + {3414970800 -14400 0 WART} + {3433118400 -10800 1 WARST} + {3446420400 -14400 0 WART} + {3464568000 -10800 1 WARST} + {3477870000 -14400 0 WART} + {3496622400 -10800 1 WARST} + {3509319600 -14400 0 WART} + {3528072000 -10800 1 WARST} + {3540769200 -14400 0 WART} + {3559521600 -10800 1 WARST} + {3572823600 -14400 0 WART} + {3590971200 -10800 1 WARST} + {3604273200 -14400 0 WART} + {3622420800 -10800 1 WARST} + {3635722800 -14400 0 WART} + {3654475200 -10800 1 WARST} + {3667172400 -14400 0 WART} + {3685924800 -10800 1 WARST} + {3698622000 -14400 0 WART} + {3717374400 -10800 1 WARST} + {3730676400 -14400 0 WART} + {3748824000 -10800 1 WARST} + {3762126000 -14400 0 WART} + {3780273600 -10800 1 WARST} + {3793575600 -14400 0 WART} + {3811723200 -10800 1 WARST} + {3825025200 -14400 0 WART} + {3843777600 -10800 1 WARST} + {3856474800 -14400 0 WART} + {3875227200 -10800 1 WARST} + {3887924400 -14400 0 WART} + {3906676800 -10800 1 WARST} + {3919978800 -14400 0 WART} + {3938126400 -10800 1 WARST} + {3951428400 -14400 0 WART} + {3969576000 -10800 1 WARST} + {3982878000 -14400 0 WART} + {4001630400 -10800 1 WARST} + {4014327600 -14400 0 WART} + {4033080000 -10800 1 WARST} + {4045777200 -14400 0 WART} + {4064529600 -10800 1 WARST} + {4077226800 -14400 0 WART} + {4095979200 -10800 1 WARST} } diff --git a/library/tzdata/America/Havana b/library/tzdata/America/Havana index fd66cb6..7fc6305 100644 --- a/library/tzdata/America/Havana +++ b/library/tzdata/America/Havana @@ -95,193 +95,191 @@ set TZData(:America/Havana) { {1049605200 -14400 1 CDT} {1067144400 -18000 0 CST} {1081054800 -14400 1 CDT} - {1112504400 -14400 1 CDT} - {1143954000 -14400 1 CDT} {1162098000 -18000 0 CST} {1173589200 -14400 1 CDT} {1193547600 -18000 0 CST} {1205643600 -14400 1 CDT} {1224997200 -18000 0 CST} - {1237093200 -14400 1 CDT} + {1236488400 -14400 1 CDT} {1256446800 -18000 0 CST} - {1269147600 -14400 1 CDT} + {1268542800 -14400 1 CDT} {1288501200 -18000 0 CST} - {1300597200 -14400 1 CDT} + {1299992400 -14400 1 CDT} {1319950800 -18000 0 CST} - {1332046800 -14400 1 CDT} + {1331442000 -14400 1 CDT} {1351400400 -18000 0 CST} - {1363496400 -14400 1 CDT} + {1362891600 -14400 1 CDT} {1382850000 -18000 0 CST} - {1394946000 -14400 1 CDT} + {1394341200 -14400 1 CDT} {1414299600 -18000 0 CST} - {1426395600 -14400 1 CDT} + {1425790800 -14400 1 CDT} {1445749200 -18000 0 CST} - {1458450000 -14400 1 CDT} + {1457845200 -14400 1 CDT} {1477803600 -18000 0 CST} - {1489899600 -14400 1 CDT} + {1489294800 -14400 1 CDT} {1509253200 -18000 0 CST} - {1521349200 -14400 1 CDT} + {1520744400 -14400 1 CDT} {1540702800 -18000 0 CST} - {1552798800 -14400 1 CDT} + {1552194000 -14400 1 CDT} {1572152400 -18000 0 CST} - {1584248400 -14400 1 CDT} + {1583643600 -14400 1 CDT} {1603602000 -18000 0 CST} - {1616302800 -14400 1 CDT} + {1615698000 -14400 1 CDT} {1635656400 -18000 0 CST} - {1647752400 -14400 1 CDT} + {1647147600 -14400 1 CDT} {1667106000 -18000 0 CST} - {1679202000 -14400 1 CDT} + {1678597200 -14400 1 CDT} {1698555600 -18000 0 CST} - {1710651600 -14400 1 CDT} + {1710046800 -14400 1 CDT} {1730005200 -18000 0 CST} - {1742101200 -14400 1 CDT} + {1741496400 -14400 1 CDT} {1761454800 -18000 0 CST} - {1773550800 -14400 1 CDT} + {1772946000 -14400 1 CDT} {1792904400 -18000 0 CST} - {1805605200 -14400 1 CDT} + {1805000400 -14400 1 CDT} {1824958800 -18000 0 CST} - {1837054800 -14400 1 CDT} + {1836450000 -14400 1 CDT} {1856408400 -18000 0 CST} - {1868504400 -14400 1 CDT} + {1867899600 -14400 1 CDT} {1887858000 -18000 0 CST} - {1899954000 -14400 1 CDT} + {1899349200 -14400 1 CDT} {1919307600 -18000 0 CST} - {1931403600 -14400 1 CDT} + {1930798800 -14400 1 CDT} {1950757200 -18000 0 CST} - {1963458000 -14400 1 CDT} + {1962853200 -14400 1 CDT} {1982811600 -18000 0 CST} - {1994907600 -14400 1 CDT} + {1994302800 -14400 1 CDT} {2014261200 -18000 0 CST} - {2026357200 -14400 1 CDT} + {2025752400 -14400 1 CDT} {2045710800 -18000 0 CST} - {2057806800 -14400 1 CDT} + {2057202000 -14400 1 CDT} {2077160400 -18000 0 CST} - {2089256400 -14400 1 CDT} + {2088651600 -14400 1 CDT} {2108610000 -18000 0 CST} - {2120706000 -14400 1 CDT} + {2120101200 -14400 1 CDT} {2140059600 -18000 0 CST} - {2152760400 -14400 1 CDT} + {2152155600 -14400 1 CDT} {2172114000 -18000 0 CST} - {2184210000 -14400 1 CDT} + {2183605200 -14400 1 CDT} {2203563600 -18000 0 CST} - {2215659600 -14400 1 CDT} + {2215054800 -14400 1 CDT} {2235013200 -18000 0 CST} - {2247109200 -14400 1 CDT} + {2246504400 -14400 1 CDT} {2266462800 -18000 0 CST} - {2278558800 -14400 1 CDT} + {2277954000 -14400 1 CDT} {2297912400 -18000 0 CST} - {2310008400 -14400 1 CDT} + {2309403600 -14400 1 CDT} {2329362000 -18000 0 CST} - {2342062800 -14400 1 CDT} + {2341458000 -14400 1 CDT} {2361416400 -18000 0 CST} - {2373512400 -14400 1 CDT} + {2372907600 -14400 1 CDT} {2392866000 -18000 0 CST} - {2404962000 -14400 1 CDT} + {2404357200 -14400 1 CDT} {2424315600 -18000 0 CST} - {2436411600 -14400 1 CDT} + {2435806800 -14400 1 CDT} {2455765200 -18000 0 CST} - {2467861200 -14400 1 CDT} + {2467256400 -14400 1 CDT} {2487214800 -18000 0 CST} - {2499915600 -14400 1 CDT} + {2499310800 -14400 1 CDT} {2519269200 -18000 0 CST} - {2531365200 -14400 1 CDT} + {2530760400 -14400 1 CDT} {2550718800 -18000 0 CST} - {2562814800 -14400 1 CDT} + {2562210000 -14400 1 CDT} {2582168400 -18000 0 CST} - {2594264400 -14400 1 CDT} + {2593659600 -14400 1 CDT} {2613618000 -18000 0 CST} - {2625714000 -14400 1 CDT} + {2625109200 -14400 1 CDT} {2645067600 -18000 0 CST} - {2657163600 -14400 1 CDT} + {2656558800 -14400 1 CDT} {2676517200 -18000 0 CST} - {2689218000 -14400 1 CDT} + {2688613200 -14400 1 CDT} {2708571600 -18000 0 CST} - {2720667600 -14400 1 CDT} + {2720062800 -14400 1 CDT} {2740021200 -18000 0 CST} - {2752117200 -14400 1 CDT} + {2751512400 -14400 1 CDT} {2771470800 -18000 0 CST} - {2783566800 -14400 1 CDT} + {2782962000 -14400 1 CDT} {2802920400 -18000 0 CST} - {2815016400 -14400 1 CDT} + {2814411600 -14400 1 CDT} {2834370000 -18000 0 CST} - {2847070800 -14400 1 CDT} + {2846466000 -14400 1 CDT} {2866424400 -18000 0 CST} - {2878520400 -14400 1 CDT} + {2877915600 -14400 1 CDT} {2897874000 -18000 0 CST} - {2909970000 -14400 1 CDT} + {2909365200 -14400 1 CDT} {2929323600 -18000 0 CST} - {2941419600 -14400 1 CDT} + {2940814800 -14400 1 CDT} {2960773200 -18000 0 CST} - {2972869200 -14400 1 CDT} + {2972264400 -14400 1 CDT} {2992222800 -18000 0 CST} - {3004318800 -14400 1 CDT} + {3003714000 -14400 1 CDT} {3023672400 -18000 0 CST} - {3036373200 -14400 1 CDT} + {3035768400 -14400 1 CDT} {3055726800 -18000 0 CST} - {3067822800 -14400 1 CDT} + {3067218000 -14400 1 CDT} {3087176400 -18000 0 CST} - {3099272400 -14400 1 CDT} + {3098667600 -14400 1 CDT} {3118626000 -18000 0 CST} - {3130722000 -14400 1 CDT} + {3130117200 -14400 1 CDT} {3150075600 -18000 0 CST} - {3162171600 -14400 1 CDT} + {3161566800 -14400 1 CDT} {3181525200 -18000 0 CST} - {3193621200 -14400 1 CDT} + {3193016400 -14400 1 CDT} {3212974800 -18000 0 CST} - {3225675600 -14400 1 CDT} + {3225070800 -14400 1 CDT} {3245029200 -18000 0 CST} - {3257125200 -14400 1 CDT} + {3256520400 -14400 1 CDT} {3276478800 -18000 0 CST} - {3288574800 -14400 1 CDT} + {3287970000 -14400 1 CDT} {3307928400 -18000 0 CST} - {3320024400 -14400 1 CDT} + {3319419600 -14400 1 CDT} {3339378000 -18000 0 CST} - {3351474000 -14400 1 CDT} + {3350869200 -14400 1 CDT} {3370827600 -18000 0 CST} - {3383528400 -14400 1 CDT} + {3382923600 -14400 1 CDT} {3402882000 -18000 0 CST} - {3414978000 -14400 1 CDT} + {3414373200 -14400 1 CDT} {3434331600 -18000 0 CST} - {3446427600 -14400 1 CDT} + {3445822800 -14400 1 CDT} {3465781200 -18000 0 CST} - {3477877200 -14400 1 CDT} + {3477272400 -14400 1 CDT} {3497230800 -18000 0 CST} - {3509326800 -14400 1 CDT} + {3508722000 -14400 1 CDT} {3528680400 -18000 0 CST} - {3540776400 -14400 1 CDT} + {3540171600 -14400 1 CDT} {3560130000 -18000 0 CST} - {3572830800 -14400 1 CDT} + {3572226000 -14400 1 CDT} {3592184400 -18000 0 CST} - {3604280400 -14400 1 CDT} + {3603675600 -14400 1 CDT} {3623634000 -18000 0 CST} - {3635730000 -14400 1 CDT} + {3635125200 -14400 1 CDT} {3655083600 -18000 0 CST} - {3667179600 -14400 1 CDT} + {3666574800 -14400 1 CDT} {3686533200 -18000 0 CST} - {3698629200 -14400 1 CDT} + {3698024400 -14400 1 CDT} {3717982800 -18000 0 CST} - {3730683600 -14400 1 CDT} + {3730078800 -14400 1 CDT} {3750037200 -18000 0 CST} - {3762133200 -14400 1 CDT} + {3761528400 -14400 1 CDT} {3781486800 -18000 0 CST} - {3793582800 -14400 1 CDT} + {3792978000 -14400 1 CDT} {3812936400 -18000 0 CST} - {3825032400 -14400 1 CDT} + {3824427600 -14400 1 CDT} {3844386000 -18000 0 CST} - {3856482000 -14400 1 CDT} + {3855877200 -14400 1 CDT} {3875835600 -18000 0 CST} - {3887931600 -14400 1 CDT} + {3887326800 -14400 1 CDT} {3907285200 -18000 0 CST} - {3919986000 -14400 1 CDT} + {3919381200 -14400 1 CDT} {3939339600 -18000 0 CST} - {3951435600 -14400 1 CDT} + {3950830800 -14400 1 CDT} {3970789200 -18000 0 CST} - {3982885200 -14400 1 CDT} + {3982280400 -14400 1 CDT} {4002238800 -18000 0 CST} - {4014334800 -14400 1 CDT} + {4013730000 -14400 1 CDT} {4033688400 -18000 0 CST} - {4045784400 -14400 1 CDT} + {4045179600 -14400 1 CDT} {4065138000 -18000 0 CST} - {4077234000 -14400 1 CDT} + {4076629200 -14400 1 CDT} {4096587600 -18000 0 CST} } diff --git a/library/tzdata/America/Resolute b/library/tzdata/America/Resolute index d82a837..50ab9df 100755 --- a/library/tzdata/America/Resolute +++ b/library/tzdata/America/Resolute @@ -59,4 +59,191 @@ set TZData(:America/Resolute) { {1130655600 -21600 0 CST} {1143964800 -18000 1 CDT} {1162108800 -18000 0 EST} + {1162710000 -18000 0 EST} + {1173596400 -18000 0 CDT} + {1194159600 -18000 0 EST} + {1205046000 -18000 0 CDT} + {1225609200 -18000 0 EST} + {1236495600 -18000 0 CDT} + {1257058800 -18000 0 EST} + {1268550000 -18000 0 CDT} + {1289113200 -18000 0 EST} + {1299999600 -18000 0 CDT} + {1320562800 -18000 0 EST} + {1331449200 -18000 0 CDT} + {1352012400 -18000 0 EST} + {1362898800 -18000 0 CDT} + {1383462000 -18000 0 EST} + {1394348400 -18000 0 CDT} + {1414911600 -18000 0 EST} + {1425798000 -18000 0 CDT} + {1446361200 -18000 0 EST} + {1457852400 -18000 0 CDT} + {1478415600 -18000 0 EST} + {1489302000 -18000 0 CDT} + {1509865200 -18000 0 EST} + {1520751600 -18000 0 CDT} + {1541314800 -18000 0 EST} + {1552201200 -18000 0 CDT} + {1572764400 -18000 0 EST} + {1583650800 -18000 0 CDT} + {1604214000 -18000 0 EST} + {1615705200 -18000 0 CDT} + {1636268400 -18000 0 EST} + {1647154800 -18000 0 CDT} + {1667718000 -18000 0 EST} + {1678604400 -18000 0 CDT} + {1699167600 -18000 0 EST} + {1710054000 -18000 0 CDT} + {1730617200 -18000 0 EST} + {1741503600 -18000 0 CDT} + {1762066800 -18000 0 EST} + {1772953200 -18000 0 CDT} + {1793516400 -18000 0 EST} + {1805007600 -18000 0 CDT} + {1825570800 -18000 0 EST} + {1836457200 -18000 0 CDT} + {1857020400 -18000 0 EST} + {1867906800 -18000 0 CDT} + {1888470000 -18000 0 EST} + {1899356400 -18000 0 CDT} + {1919919600 -18000 0 EST} + {1930806000 -18000 0 CDT} + {1951369200 -18000 0 EST} + {1962860400 -18000 0 CDT} + {1983423600 -18000 0 EST} + {1994310000 -18000 0 CDT} + {2014873200 -18000 0 EST} + {2025759600 -18000 0 CDT} + {2046322800 -18000 0 EST} + {2057209200 -18000 0 CDT} + {2077772400 -18000 0 EST} + {2088658800 -18000 0 CDT} + {2109222000 -18000 0 EST} + {2120108400 -18000 0 CDT} + {2140671600 -18000 0 EST} + {2152162800 -18000 0 CDT} + {2172726000 -18000 0 EST} + {2183612400 -18000 0 CDT} + {2204175600 -18000 0 EST} + {2215062000 -18000 0 CDT} + {2235625200 -18000 0 EST} + {2246511600 -18000 0 CDT} + {2267074800 -18000 0 EST} + {2277961200 -18000 0 CDT} + {2298524400 -18000 0 EST} + {2309410800 -18000 0 CDT} + {2329974000 -18000 0 EST} + {2341465200 -18000 0 CDT} + {2362028400 -18000 0 EST} + {2372914800 -18000 0 CDT} + {2393478000 -18000 0 EST} + {2404364400 -18000 0 CDT} + {2424927600 -18000 0 EST} + {2435814000 -18000 0 CDT} + {2456377200 -18000 0 EST} + {2467263600 -18000 0 CDT} + {2487826800 -18000 0 EST} + {2499318000 -18000 0 CDT} + {2519881200 -18000 0 EST} + {2530767600 -18000 0 CDT} + {2551330800 -18000 0 EST} + {2562217200 -18000 0 CDT} + {2582780400 -18000 0 EST} + {2593666800 -18000 0 CDT} + {2614230000 -18000 0 EST} + {2625116400 -18000 0 CDT} + {2645679600 -18000 0 EST} + {2656566000 -18000 0 CDT} + {2677129200 -18000 0 EST} + {2688620400 -18000 0 CDT} + {2709183600 -18000 0 EST} + {2720070000 -18000 0 CDT} + {2740633200 -18000 0 EST} + {2751519600 -18000 0 CDT} + {2772082800 -18000 0 EST} + {2782969200 -18000 0 CDT} + {2803532400 -18000 0 EST} + {2814418800 -18000 0 CDT} + {2834982000 -18000 0 EST} + {2846473200 -18000 0 CDT} + {2867036400 -18000 0 EST} + {2877922800 -18000 0 CDT} + {2898486000 -18000 0 EST} + {2909372400 -18000 0 CDT} + {2929935600 -18000 0 EST} + {2940822000 -18000 0 CDT} + {2961385200 -18000 0 EST} + {2972271600 -18000 0 CDT} + {2992834800 -18000 0 EST} + {3003721200 -18000 0 CDT} + {3024284400 -18000 0 EST} + {3035775600 -18000 0 CDT} + {3056338800 -18000 0 EST} + {3067225200 -18000 0 CDT} + {3087788400 -18000 0 EST} + {3098674800 -18000 0 CDT} + {3119238000 -18000 0 EST} + {3130124400 -18000 0 CDT} + {3150687600 -18000 0 EST} + {3161574000 -18000 0 CDT} + {3182137200 -18000 0 EST} + {3193023600 -18000 0 CDT} + {3213586800 -18000 0 EST} + {3225078000 -18000 0 CDT} + {3245641200 -18000 0 EST} + {3256527600 -18000 0 CDT} + {3277090800 -18000 0 EST} + {3287977200 -18000 0 CDT} + {3308540400 -18000 0 EST} + {3319426800 -18000 0 CDT} + {3339990000 -18000 0 EST} + {3350876400 -18000 0 CDT} + {3371439600 -18000 0 EST} + {3382930800 -18000 0 CDT} + {3403494000 -18000 0 EST} + {3414380400 -18000 0 CDT} + {3434943600 -18000 0 EST} + {3445830000 -18000 0 CDT} + {3466393200 -18000 0 EST} + {3477279600 -18000 0 CDT} + {3497842800 -18000 0 EST} + {3508729200 -18000 0 CDT} + {3529292400 -18000 0 EST} + {3540178800 -18000 0 CDT} + {3560742000 -18000 0 EST} + {3572233200 -18000 0 CDT} + {3592796400 -18000 0 EST} + {3603682800 -18000 0 CDT} + {3624246000 -18000 0 EST} + {3635132400 -18000 0 CDT} + {3655695600 -18000 0 EST} + {3666582000 -18000 0 CDT} + {3687145200 -18000 0 EST} + {3698031600 -18000 0 CDT} + {3718594800 -18000 0 EST} + {3730086000 -18000 0 CDT} + {3750649200 -18000 0 EST} + {3761535600 -18000 0 CDT} + {3782098800 -18000 0 EST} + {3792985200 -18000 0 CDT} + {3813548400 -18000 0 EST} + {3824434800 -18000 0 CDT} + {3844998000 -18000 0 EST} + {3855884400 -18000 0 CDT} + {3876447600 -18000 0 EST} + {3887334000 -18000 0 CDT} + {3907897200 -18000 0 EST} + {3919388400 -18000 0 CDT} + {3939951600 -18000 0 EST} + {3950838000 -18000 0 CDT} + {3971401200 -18000 0 EST} + {3982287600 -18000 0 CDT} + {4002850800 -18000 0 EST} + {4013737200 -18000 0 CDT} + {4034300400 -18000 0 EST} + {4045186800 -18000 0 CDT} + {4065750000 -18000 0 EST} + {4076636400 -18000 0 CDT} + {4097199600 -18000 0 EST} } diff --git a/library/tzdata/Asia/Amman b/library/tzdata/Asia/Amman index 5b34dbd..0c6ffcb 100644 --- a/library/tzdata/Asia/Amman +++ b/library/tzdata/Asia/Amman @@ -44,205 +44,205 @@ set TZData(:Asia/Amman) { {891554400 10800 1 EEST} {906069600 7200 0 EET} {930780000 10800 1 EEST} - {938642400 7200 0 EET} + {938124000 7200 0 EET} {954367200 10800 1 EEST} - {970092000 7200 0 EET} + {970178400 7200 0 EET} {985816800 10800 1 EEST} - {1001541600 7200 0 EET} - {1017266400 10800 1 EEST} - {1032991200 7200 0 EET} - {1048716000 10800 1 EEST} + {1001628000 7200 0 EET} + {1017352800 10800 1 EEST} + {1033077600 7200 0 EET} + {1048802400 10800 1 EEST} {1066946400 7200 0 EET} - {1080165600 10800 1 EEST} + {1080252000 10800 1 EEST} {1097791200 7200 0 EET} - {1112220000 10800 1 EEST} + {1111701600 10800 1 EEST} {1128031200 7200 0 EET} - {1143669600 10800 1 EEST} + {1143756000 10800 1 EEST} {1161900000 7200 0 EET} - {1175119200 10800 1 EEST} + {1175205600 10800 1 EEST} {1193349600 7200 0 EET} - {1206568800 10800 1 EEST} + {1206655200 10800 1 EEST} {1225404000 7200 0 EET} - {1238018400 10800 1 EEST} + {1238104800 10800 1 EEST} {1256853600 7200 0 EET} - {1269468000 10800 1 EEST} + {1269554400 10800 1 EEST} {1288303200 7200 0 EET} - {1301522400 10800 1 EEST} + {1301004000 10800 1 EEST} {1319752800 7200 0 EET} - {1332972000 10800 1 EEST} + {1333058400 10800 1 EEST} {1351202400 7200 0 EET} - {1364421600 10800 1 EEST} + {1364508000 10800 1 EEST} {1382652000 7200 0 EET} - {1395871200 10800 1 EEST} + {1395957600 10800 1 EEST} {1414706400 7200 0 EET} - {1427320800 10800 1 EEST} + {1427407200 10800 1 EEST} {1446156000 7200 0 EET} - {1459375200 10800 1 EEST} + {1458856800 10800 1 EEST} {1477605600 7200 0 EET} - {1490824800 10800 1 EEST} + {1490911200 10800 1 EEST} {1509055200 7200 0 EET} - {1522274400 10800 1 EEST} + {1522360800 10800 1 EEST} {1540504800 7200 0 EET} - {1553724000 10800 1 EEST} + {1553810400 10800 1 EEST} {1571954400 7200 0 EET} - {1585173600 10800 1 EEST} + {1585260000 10800 1 EEST} {1604008800 7200 0 EET} - {1616623200 10800 1 EEST} + {1616709600 10800 1 EEST} {1635458400 7200 0 EET} - {1648677600 10800 1 EEST} + {1648159200 10800 1 EEST} {1666908000 7200 0 EET} - {1680127200 10800 1 EEST} + {1680213600 10800 1 EEST} {1698357600 7200 0 EET} - {1711576800 10800 1 EEST} + {1711663200 10800 1 EEST} {1729807200 7200 0 EET} - {1743026400 10800 1 EEST} + {1743112800 10800 1 EEST} {1761861600 7200 0 EET} - {1774476000 10800 1 EEST} + {1774562400 10800 1 EEST} {1793311200 7200 0 EET} - {1805925600 10800 1 EEST} + {1806012000 10800 1 EEST} {1824760800 7200 0 EET} - {1837980000 10800 1 EEST} + {1838066400 10800 1 EEST} {1856210400 7200 0 EET} - {1869429600 10800 1 EEST} + {1869516000 10800 1 EEST} {1887660000 7200 0 EET} - {1900879200 10800 1 EEST} + {1900965600 10800 1 EEST} {1919109600 7200 0 EET} - {1932328800 10800 1 EEST} + {1932415200 10800 1 EEST} {1951164000 7200 0 EET} - {1963778400 10800 1 EEST} + {1963864800 10800 1 EEST} {1982613600 7200 0 EET} - {1995832800 10800 1 EEST} + {1995314400 10800 1 EEST} {2014063200 7200 0 EET} - {2027282400 10800 1 EEST} + {2027368800 10800 1 EEST} {2045512800 7200 0 EET} - {2058732000 10800 1 EEST} + {2058818400 10800 1 EEST} {2076962400 7200 0 EET} - {2090181600 10800 1 EEST} + {2090268000 10800 1 EEST} {2109016800 7200 0 EET} - {2121631200 10800 1 EEST} + {2121717600 10800 1 EEST} {2140466400 7200 0 EET} - {2153080800 10800 1 EEST} + {2153167200 10800 1 EEST} {2171916000 7200 0 EET} - {2185135200 10800 1 EEST} + {2184616800 10800 1 EEST} {2203365600 7200 0 EET} - {2216584800 10800 1 EEST} + {2216671200 10800 1 EEST} {2234815200 7200 0 EET} - {2248034400 10800 1 EEST} + {2248120800 10800 1 EEST} {2266264800 7200 0 EET} - {2279484000 10800 1 EEST} + {2279570400 10800 1 EEST} {2298319200 7200 0 EET} - {2310933600 10800 1 EEST} + {2311020000 10800 1 EEST} {2329768800 7200 0 EET} - {2342988000 10800 1 EEST} + {2342469600 10800 1 EEST} {2361218400 7200 0 EET} - {2374437600 10800 1 EEST} + {2374524000 10800 1 EEST} {2392668000 7200 0 EET} - {2405887200 10800 1 EEST} + {2405973600 10800 1 EEST} {2424117600 7200 0 EET} - {2437336800 10800 1 EEST} + {2437423200 10800 1 EEST} {2455567200 7200 0 EET} - {2468786400 10800 1 EEST} + {2468872800 10800 1 EEST} {2487621600 7200 0 EET} - {2500236000 10800 1 EEST} + {2500322400 10800 1 EEST} {2519071200 7200 0 EET} - {2532290400 10800 1 EEST} + {2531772000 10800 1 EEST} {2550520800 7200 0 EET} - {2563740000 10800 1 EEST} + {2563826400 10800 1 EEST} {2581970400 7200 0 EET} - {2595189600 10800 1 EEST} + {2595276000 10800 1 EEST} {2613420000 7200 0 EET} - {2626639200 10800 1 EEST} + {2626725600 10800 1 EEST} {2645474400 7200 0 EET} - {2658088800 10800 1 EEST} + {2658175200 10800 1 EEST} {2676924000 7200 0 EET} - {2689538400 10800 1 EEST} + {2689624800 10800 1 EEST} {2708373600 7200 0 EET} - {2721592800 10800 1 EEST} + {2721679200 10800 1 EEST} {2739823200 7200 0 EET} - {2753042400 10800 1 EEST} + {2753128800 10800 1 EEST} {2771272800 7200 0 EET} - {2784492000 10800 1 EEST} + {2784578400 10800 1 EEST} {2802722400 7200 0 EET} - {2815941600 10800 1 EEST} + {2816028000 10800 1 EEST} {2834776800 7200 0 EET} - {2847391200 10800 1 EEST} + {2847477600 10800 1 EEST} {2866226400 7200 0 EET} - {2879445600 10800 1 EEST} + {2878927200 10800 1 EEST} {2897676000 7200 0 EET} - {2910895200 10800 1 EEST} + {2910981600 10800 1 EEST} {2929125600 7200 0 EET} - {2942344800 10800 1 EEST} + {2942431200 10800 1 EEST} {2960575200 7200 0 EET} - {2973794400 10800 1 EEST} + {2973880800 10800 1 EEST} {2992629600 7200 0 EET} - {3005244000 10800 1 EEST} + {3005330400 10800 1 EEST} {3024079200 7200 0 EET} - {3036693600 10800 1 EEST} + {3036780000 10800 1 EEST} {3055528800 7200 0 EET} - {3068748000 10800 1 EEST} + {3068229600 10800 1 EEST} {3086978400 7200 0 EET} - {3100197600 10800 1 EEST} + {3100284000 10800 1 EEST} {3118428000 7200 0 EET} - {3131647200 10800 1 EEST} + {3131733600 10800 1 EEST} {3149877600 7200 0 EET} - {3163096800 10800 1 EEST} + {3163183200 10800 1 EEST} {3181932000 7200 0 EET} - {3194546400 10800 1 EEST} + {3194632800 10800 1 EEST} {3213381600 7200 0 EET} - {3226600800 10800 1 EEST} + {3226082400 10800 1 EEST} {3244831200 7200 0 EET} - {3258050400 10800 1 EEST} + {3258136800 10800 1 EEST} {3276280800 7200 0 EET} - {3289500000 10800 1 EEST} + {3289586400 10800 1 EEST} {3307730400 7200 0 EET} - {3320949600 10800 1 EEST} + {3321036000 10800 1 EEST} {3339180000 7200 0 EET} - {3352399200 10800 1 EEST} + {3352485600 10800 1 EEST} {3371234400 7200 0 EET} - {3383848800 10800 1 EEST} + {3383935200 10800 1 EEST} {3402684000 7200 0 EET} - {3415903200 10800 1 EEST} + {3415384800 10800 1 EEST} {3434133600 7200 0 EET} - {3447352800 10800 1 EEST} + {3447439200 10800 1 EEST} {3465583200 7200 0 EET} - {3478802400 10800 1 EEST} + {3478888800 10800 1 EEST} {3497032800 7200 0 EET} - {3510252000 10800 1 EEST} + {3510338400 10800 1 EEST} {3529087200 7200 0 EET} - {3541701600 10800 1 EEST} + {3541788000 10800 1 EEST} {3560536800 7200 0 EET} - {3573151200 10800 1 EEST} + {3573237600 10800 1 EEST} {3591986400 7200 0 EET} - {3605205600 10800 1 EEST} + {3605292000 10800 1 EEST} {3623436000 7200 0 EET} - {3636655200 10800 1 EEST} + {3636741600 10800 1 EEST} {3654885600 7200 0 EET} - {3668104800 10800 1 EEST} + {3668191200 10800 1 EEST} {3686335200 7200 0 EET} - {3699554400 10800 1 EEST} + {3699640800 10800 1 EEST} {3718389600 7200 0 EET} - {3731004000 10800 1 EEST} + {3731090400 10800 1 EEST} {3749839200 7200 0 EET} - {3763058400 10800 1 EEST} + {3762540000 10800 1 EEST} {3781288800 7200 0 EET} - {3794508000 10800 1 EEST} + {3794594400 10800 1 EEST} {3812738400 7200 0 EET} - {3825957600 10800 1 EEST} + {3826044000 10800 1 EEST} {3844188000 7200 0 EET} - {3857407200 10800 1 EEST} + {3857493600 10800 1 EEST} {3876242400 7200 0 EET} - {3888856800 10800 1 EEST} + {3888943200 10800 1 EEST} {3907692000 7200 0 EET} - {3920306400 10800 1 EEST} + {3920392800 10800 1 EEST} {3939141600 7200 0 EET} - {3952360800 10800 1 EEST} + {3951842400 10800 1 EEST} {3970591200 7200 0 EET} - {3983810400 10800 1 EEST} + {3983896800 10800 1 EEST} {4002040800 7200 0 EET} - {4015260000 10800 1 EEST} + {4015346400 10800 1 EEST} {4033490400 7200 0 EET} - {4046709600 10800 1 EEST} + {4046796000 10800 1 EEST} {4065544800 7200 0 EET} - {4078159200 10800 1 EEST} + {4078245600 10800 1 EEST} {4096994400 7200 0 EET} } diff --git a/library/tzdata/Asia/Damascus b/library/tzdata/Asia/Damascus index 4cfeee7..d57aeea 100644 --- a/library/tzdata/Asia/Damascus +++ b/library/tzdata/Asia/Damascus @@ -95,186 +95,186 @@ set TZData(:Asia/Damascus) { {1193950800 7200 0 EET} {1207260000 10800 1 EEST} {1225486800 7200 0 EET} - {1238709600 10800 1 EEST} + {1238104800 10800 1 EEST} {1257022800 7200 0 EET} - {1270159200 10800 1 EEST} + {1269554400 10800 1 EEST} {1288558800 7200 0 EET} - {1301608800 10800 1 EEST} + {1301004000 10800 1 EEST} {1320094800 7200 0 EET} - {1333663200 10800 1 EEST} + {1333058400 10800 1 EEST} {1351717200 7200 0 EET} - {1365112800 10800 1 EEST} + {1364508000 10800 1 EEST} {1383253200 7200 0 EET} - {1396562400 10800 1 EEST} + {1395957600 10800 1 EEST} {1414789200 7200 0 EET} - {1428012000 10800 1 EEST} + {1427407200 10800 1 EEST} {1446325200 7200 0 EET} - {1459461600 10800 1 EEST} + {1458856800 10800 1 EEST} {1477947600 7200 0 EET} - {1491516000 10800 1 EEST} + {1490911200 10800 1 EEST} {1509483600 7200 0 EET} - {1522965600 10800 1 EEST} + {1522360800 10800 1 EEST} {1541019600 7200 0 EET} - {1554415200 10800 1 EEST} + {1553810400 10800 1 EEST} {1572555600 7200 0 EET} - {1585864800 10800 1 EEST} + {1585260000 10800 1 EEST} {1604178000 7200 0 EET} - {1617314400 10800 1 EEST} + {1616709600 10800 1 EEST} {1635714000 7200 0 EET} - {1648764000 10800 1 EEST} + {1648159200 10800 1 EEST} {1667250000 7200 0 EET} - {1680818400 10800 1 EEST} + {1680213600 10800 1 EEST} {1698786000 7200 0 EET} - {1712268000 10800 1 EEST} + {1711663200 10800 1 EEST} {1730408400 7200 0 EET} - {1743717600 10800 1 EEST} + {1743112800 10800 1 EEST} {1761944400 7200 0 EET} - {1775167200 10800 1 EEST} + {1774562400 10800 1 EEST} {1793480400 7200 0 EET} - {1806616800 10800 1 EEST} + {1806012000 10800 1 EEST} {1825016400 7200 0 EET} - {1838671200 10800 1 EEST} + {1838066400 10800 1 EEST} {1856638800 7200 0 EET} - {1870120800 10800 1 EEST} + {1869516000 10800 1 EEST} {1888174800 7200 0 EET} - {1901570400 10800 1 EEST} + {1900965600 10800 1 EEST} {1919710800 7200 0 EET} - {1933020000 10800 1 EEST} + {1932415200 10800 1 EEST} {1951246800 7200 0 EET} - {1964469600 10800 1 EEST} + {1963864800 10800 1 EEST} {1982869200 7200 0 EET} - {1995919200 10800 1 EEST} + {1995314400 10800 1 EEST} {2014405200 7200 0 EET} - {2027973600 10800 1 EEST} + {2027368800 10800 1 EEST} {2045941200 7200 0 EET} - {2059423200 10800 1 EEST} + {2058818400 10800 1 EEST} {2077477200 7200 0 EET} - {2090872800 10800 1 EEST} + {2090268000 10800 1 EEST} {2109099600 7200 0 EET} - {2122322400 10800 1 EEST} + {2121717600 10800 1 EEST} {2140635600 7200 0 EET} - {2153772000 10800 1 EEST} + {2153167200 10800 1 EEST} {2172171600 7200 0 EET} - {2185221600 10800 1 EEST} + {2184616800 10800 1 EEST} {2203707600 7200 0 EET} - {2217276000 10800 1 EEST} + {2216671200 10800 1 EEST} {2235330000 7200 0 EET} - {2248725600 10800 1 EEST} + {2248120800 10800 1 EEST} {2266866000 7200 0 EET} - {2280175200 10800 1 EEST} + {2279570400 10800 1 EEST} {2298402000 7200 0 EET} - {2311624800 10800 1 EEST} + {2311020000 10800 1 EEST} {2329938000 7200 0 EET} - {2343074400 10800 1 EEST} + {2342469600 10800 1 EEST} {2361560400 7200 0 EET} - {2375128800 10800 1 EEST} + {2374524000 10800 1 EEST} {2393096400 7200 0 EET} - {2406578400 10800 1 EEST} + {2405973600 10800 1 EEST} {2424632400 7200 0 EET} - {2438028000 10800 1 EEST} + {2437423200 10800 1 EEST} {2456168400 7200 0 EET} - {2469477600 10800 1 EEST} + {2468872800 10800 1 EEST} {2487790800 7200 0 EET} - {2500927200 10800 1 EEST} + {2500322400 10800 1 EEST} {2519326800 7200 0 EET} - {2532376800 10800 1 EEST} + {2531772000 10800 1 EEST} {2550862800 7200 0 EET} - {2564431200 10800 1 EEST} + {2563826400 10800 1 EEST} {2582398800 7200 0 EET} - {2595880800 10800 1 EEST} + {2595276000 10800 1 EEST} {2614021200 7200 0 EET} - {2627330400 10800 1 EEST} + {2626725600 10800 1 EEST} {2645557200 7200 0 EET} - {2658780000 10800 1 EEST} + {2658175200 10800 1 EEST} {2677093200 7200 0 EET} - {2690229600 10800 1 EEST} + {2689624800 10800 1 EEST} {2708629200 7200 0 EET} - {2722284000 10800 1 EEST} + {2721679200 10800 1 EEST} {2740251600 7200 0 EET} - {2753733600 10800 1 EEST} + {2753128800 10800 1 EEST} {2771787600 7200 0 EET} - {2785183200 10800 1 EEST} + {2784578400 10800 1 EEST} {2803323600 7200 0 EET} - {2816632800 10800 1 EEST} + {2816028000 10800 1 EEST} {2834859600 7200 0 EET} - {2848082400 10800 1 EEST} + {2847477600 10800 1 EEST} {2866482000 7200 0 EET} - {2879532000 10800 1 EEST} + {2878927200 10800 1 EEST} {2898018000 7200 0 EET} - {2911586400 10800 1 EEST} + {2910981600 10800 1 EEST} {2929554000 7200 0 EET} - {2943036000 10800 1 EEST} + {2942431200 10800 1 EEST} {2961090000 7200 0 EET} - {2974485600 10800 1 EEST} + {2973880800 10800 1 EEST} {2992712400 7200 0 EET} - {3005935200 10800 1 EEST} + {3005330400 10800 1 EEST} {3024248400 7200 0 EET} - {3037384800 10800 1 EEST} + {3036780000 10800 1 EEST} {3055784400 7200 0 EET} - {3068834400 10800 1 EEST} + {3068229600 10800 1 EEST} {3087320400 7200 0 EET} - {3100888800 10800 1 EEST} + {3100284000 10800 1 EEST} {3118942800 7200 0 EET} - {3132338400 10800 1 EEST} + {3131733600 10800 1 EEST} {3150478800 7200 0 EET} - {3163788000 10800 1 EEST} + {3163183200 10800 1 EEST} {3182014800 7200 0 EET} - {3195237600 10800 1 EEST} + {3194632800 10800 1 EEST} {3213550800 7200 0 EET} - {3226687200 10800 1 EEST} + {3226082400 10800 1 EEST} {3245173200 7200 0 EET} - {3258741600 10800 1 EEST} + {3258136800 10800 1 EEST} {3276709200 7200 0 EET} - {3290191200 10800 1 EEST} + {3289586400 10800 1 EEST} {3308245200 7200 0 EET} - {3321640800 10800 1 EEST} + {3321036000 10800 1 EEST} {3339781200 7200 0 EET} - {3353090400 10800 1 EEST} + {3352485600 10800 1 EEST} {3371403600 7200 0 EET} - {3384540000 10800 1 EEST} + {3383935200 10800 1 EEST} {3402939600 7200 0 EET} - {3415989600 10800 1 EEST} + {3415384800 10800 1 EEST} {3434475600 7200 0 EET} - {3448044000 10800 1 EEST} + {3447439200 10800 1 EEST} {3466011600 7200 0 EET} - {3479493600 10800 1 EEST} + {3478888800 10800 1 EEST} {3497634000 7200 0 EET} - {3510943200 10800 1 EEST} + {3510338400 10800 1 EEST} {3529170000 7200 0 EET} - {3542392800 10800 1 EEST} + {3541788000 10800 1 EEST} {3560706000 7200 0 EET} - {3573842400 10800 1 EEST} + {3573237600 10800 1 EEST} {3592242000 7200 0 EET} - {3605896800 10800 1 EEST} + {3605292000 10800 1 EEST} {3623864400 7200 0 EET} - {3637346400 10800 1 EEST} + {3636741600 10800 1 EEST} {3655400400 7200 0 EET} - {3668796000 10800 1 EEST} + {3668191200 10800 1 EEST} {3686936400 7200 0 EET} - {3700245600 10800 1 EEST} + {3699640800 10800 1 EEST} {3718472400 7200 0 EET} - {3731695200 10800 1 EEST} + {3731090400 10800 1 EEST} {3750094800 7200 0 EET} - {3763144800 10800 1 EEST} + {3762540000 10800 1 EEST} {3781630800 7200 0 EET} - {3795199200 10800 1 EEST} + {3794594400 10800 1 EEST} {3813166800 7200 0 EET} - {3826648800 10800 1 EEST} + {3826044000 10800 1 EEST} {3844702800 7200 0 EET} - {3858098400 10800 1 EEST} + {3857493600 10800 1 EEST} {3876325200 7200 0 EET} - {3889548000 10800 1 EEST} + {3888943200 10800 1 EEST} {3907861200 7200 0 EET} - {3920997600 10800 1 EEST} + {3920392800 10800 1 EEST} {3939397200 7200 0 EET} - {3952447200 10800 1 EEST} + {3951842400 10800 1 EEST} {3970933200 7200 0 EET} - {3984501600 10800 1 EEST} + {3983896800 10800 1 EEST} {4002555600 7200 0 EET} - {4015951200 10800 1 EEST} + {4015346400 10800 1 EEST} {4034091600 7200 0 EET} - {4047400800 10800 1 EEST} + {4046796000 10800 1 EEST} {4065627600 7200 0 EET} - {4078850400 10800 1 EEST} + {4078245600 10800 1 EEST} {4097163600 7200 0 EET} } diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index 80f53c9..e0c8eb0 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -89,187 +89,187 @@ set TZData(:Asia/Gaza) { {1175378400 10800 1 EEST} {1189638000 7200 0 EET} {1207000800 10800 1 EEST} - {1219878000 7200 0 EET} - {1238536800 10800 1 EEST} - {1251327600 7200 0 EET} - {1270072800 10800 1 EEST} - {1282777200 7200 0 EET} - {1301608800 10800 1 EEST} - {1314226800 7200 0 EET} - {1333231200 10800 1 EEST} - {1346281200 7200 0 EET} - {1364767200 10800 1 EEST} - {1377730800 7200 0 EET} - {1396303200 10800 1 EEST} - {1409180400 7200 0 EET} - {1427839200 10800 1 EEST} - {1440630000 7200 0 EET} - {1459461600 10800 1 EEST} - {1472079600 7200 0 EET} - {1490997600 10800 1 EEST} - {1504134000 7200 0 EET} - {1522533600 10800 1 EEST} - {1535583600 7200 0 EET} - {1554069600 10800 1 EEST} - {1567033200 7200 0 EET} - {1585692000 10800 1 EEST} - {1598482800 7200 0 EET} - {1617228000 10800 1 EEST} - {1629932400 7200 0 EET} - {1648764000 10800 1 EEST} - {1661382000 7200 0 EET} - {1680300000 10800 1 EEST} - {1693436400 7200 0 EET} - {1711922400 10800 1 EEST} - {1724886000 7200 0 EET} - {1743458400 10800 1 EEST} - {1756335600 7200 0 EET} - {1774994400 10800 1 EEST} - {1787785200 7200 0 EET} - {1806530400 10800 1 EEST} - {1819234800 7200 0 EET} - {1838152800 10800 1 EEST} - {1851289200 7200 0 EET} - {1869688800 10800 1 EEST} - {1882738800 7200 0 EET} - {1901224800 10800 1 EEST} - {1914188400 7200 0 EET} - {1932760800 10800 1 EEST} - {1945638000 7200 0 EET} - {1964383200 10800 1 EEST} - {1977087600 7200 0 EET} - {1995919200 10800 1 EEST} - {2008537200 7200 0 EET} - {2027455200 10800 1 EEST} - {2040591600 7200 0 EET} - {2058991200 10800 1 EEST} - {2072041200 7200 0 EET} - {2090613600 10800 1 EEST} - {2103490800 7200 0 EET} - {2122149600 10800 1 EEST} - {2134940400 7200 0 EET} - {2153685600 10800 1 EEST} - {2166390000 7200 0 EET} - {2185221600 10800 1 EEST} - {2197839600 7200 0 EET} - {2216844000 10800 1 EEST} - {2229894000 7200 0 EET} - {2248380000 10800 1 EEST} - {2261343600 7200 0 EET} - {2279916000 10800 1 EEST} - {2292793200 7200 0 EET} - {2311452000 10800 1 EEST} - {2324242800 7200 0 EET} - {2343074400 10800 1 EEST} - {2355692400 7200 0 EET} - {2374610400 10800 1 EEST} - {2387746800 7200 0 EET} - {2406146400 10800 1 EEST} - {2419196400 7200 0 EET} - {2437682400 10800 1 EEST} - {2450646000 7200 0 EET} - {2469304800 10800 1 EEST} - {2482095600 7200 0 EET} - {2500840800 10800 1 EEST} - {2513545200 7200 0 EET} - {2532376800 10800 1 EEST} - {2544994800 7200 0 EET} - {2563912800 10800 1 EEST} - {2577049200 7200 0 EET} - {2595535200 10800 1 EEST} - {2608498800 7200 0 EET} - {2627071200 10800 1 EEST} - {2639948400 7200 0 EET} - {2658607200 10800 1 EEST} - {2671398000 7200 0 EET} - {2690143200 10800 1 EEST} - {2702847600 7200 0 EET} - {2721765600 10800 1 EEST} - {2734902000 7200 0 EET} - {2753301600 10800 1 EEST} - {2766351600 7200 0 EET} - {2784837600 10800 1 EEST} - {2797801200 7200 0 EET} - {2816373600 10800 1 EEST} - {2829250800 7200 0 EET} - {2847996000 10800 1 EEST} - {2860700400 7200 0 EET} - {2879532000 10800 1 EEST} - {2892150000 7200 0 EET} - {2911068000 10800 1 EEST} - {2924204400 7200 0 EET} - {2942604000 10800 1 EEST} - {2955654000 7200 0 EET} - {2974226400 10800 1 EEST} - {2987103600 7200 0 EET} - {3005762400 10800 1 EEST} - {3018553200 7200 0 EET} - {3037298400 10800 1 EEST} - {3050002800 7200 0 EET} - {3068834400 10800 1 EEST} - {3081452400 7200 0 EET} - {3100456800 10800 1 EEST} - {3113506800 7200 0 EET} - {3131992800 10800 1 EEST} - {3144956400 7200 0 EET} - {3163528800 10800 1 EEST} - {3176406000 7200 0 EET} - {3195064800 10800 1 EEST} - {3207855600 7200 0 EET} - {3226687200 10800 1 EEST} - {3239305200 7200 0 EET} - {3258223200 10800 1 EEST} - {3271359600 7200 0 EET} - {3289759200 10800 1 EEST} - {3302809200 7200 0 EET} - {3321295200 10800 1 EEST} - {3334258800 7200 0 EET} - {3352917600 10800 1 EEST} - {3365708400 7200 0 EET} - {3384453600 10800 1 EEST} - {3397158000 7200 0 EET} - {3415989600 10800 1 EEST} - {3428607600 7200 0 EET} - {3447525600 10800 1 EEST} - {3460662000 7200 0 EET} - {3479148000 10800 1 EEST} - {3492111600 7200 0 EET} - {3510684000 10800 1 EEST} - {3523561200 7200 0 EET} - {3542220000 10800 1 EEST} - {3555010800 7200 0 EET} - {3573756000 10800 1 EEST} - {3586460400 7200 0 EET} - {3605378400 10800 1 EEST} - {3618514800 7200 0 EET} - {3636914400 10800 1 EEST} - {3649964400 7200 0 EET} - {3668450400 10800 1 EEST} - {3681414000 7200 0 EET} - {3699986400 10800 1 EEST} - {3712863600 7200 0 EET} - {3731608800 10800 1 EEST} - {3744313200 7200 0 EET} - {3763144800 10800 1 EEST} - {3775762800 7200 0 EET} - {3794680800 10800 1 EEST} - {3807817200 7200 0 EET} - {3826216800 10800 1 EEST} - {3839266800 7200 0 EET} - {3857839200 10800 1 EEST} - {3870716400 7200 0 EET} - {3889375200 10800 1 EEST} - {3902166000 7200 0 EET} - {3920911200 10800 1 EEST} - {3933615600 7200 0 EET} - {3952447200 10800 1 EEST} - {3965065200 7200 0 EET} - {3984069600 10800 1 EEST} - {3997119600 7200 0 EET} - {4015605600 10800 1 EEST} - {4028569200 7200 0 EET} - {4047141600 10800 1 EEST} - {4060018800 7200 0 EET} - {4078677600 10800 1 EEST} - {4091468400 7200 0 EET} + {1219964400 7200 0 EET} + {1238104800 10800 1 EEST} + {1254092400 7200 0 EET} + {1269554400 10800 1 EEST} + {1285542000 7200 0 EET} + {1301004000 10800 1 EEST} + {1316991600 7200 0 EET} + {1333058400 10800 1 EEST} + {1348441200 7200 0 EET} + {1364508000 10800 1 EEST} + {1380495600 7200 0 EET} + {1395957600 10800 1 EEST} + {1411945200 7200 0 EET} + {1427407200 10800 1 EEST} + {1443394800 7200 0 EET} + {1458856800 10800 1 EEST} + {1474844400 7200 0 EET} + {1490911200 10800 1 EEST} + {1506294000 7200 0 EET} + {1522360800 10800 1 EEST} + {1537743600 7200 0 EET} + {1553810400 10800 1 EEST} + {1569798000 7200 0 EET} + {1585260000 10800 1 EEST} + {1601247600 7200 0 EET} + {1616709600 10800 1 EEST} + {1632697200 7200 0 EET} + {1648159200 10800 1 EEST} + {1664146800 7200 0 EET} + {1680213600 10800 1 EEST} + {1695596400 7200 0 EET} + {1711663200 10800 1 EEST} + {1727650800 7200 0 EET} + {1743112800 10800 1 EEST} + {1759100400 7200 0 EET} + {1774562400 10800 1 EEST} + {1790550000 7200 0 EET} + {1806012000 10800 1 EEST} + {1821999600 7200 0 EET} + {1838066400 10800 1 EEST} + {1853449200 7200 0 EET} + {1869516000 10800 1 EEST} + {1884898800 7200 0 EET} + {1900965600 10800 1 EEST} + {1916953200 7200 0 EET} + {1932415200 10800 1 EEST} + {1948402800 7200 0 EET} + {1963864800 10800 1 EEST} + {1979852400 7200 0 EET} + {1995314400 10800 1 EEST} + {2011302000 7200 0 EET} + {2027368800 10800 1 EEST} + {2042751600 7200 0 EET} + {2058818400 10800 1 EEST} + {2074201200 7200 0 EET} + {2090268000 10800 1 EEST} + {2106255600 7200 0 EET} + {2121717600 10800 1 EEST} + {2137705200 7200 0 EET} + {2153167200 10800 1 EEST} + {2169154800 7200 0 EET} + {2184616800 10800 1 EEST} + {2200604400 7200 0 EET} + {2216671200 10800 1 EEST} + {2232054000 7200 0 EET} + {2248120800 10800 1 EEST} + {2264108400 7200 0 EET} + {2279570400 10800 1 EEST} + {2295558000 7200 0 EET} + {2311020000 10800 1 EEST} + {2327007600 7200 0 EET} + {2342469600 10800 1 EEST} + {2358457200 7200 0 EET} + {2374524000 10800 1 EEST} + {2389906800 7200 0 EET} + {2405973600 10800 1 EEST} + {2421356400 7200 0 EET} + {2437423200 10800 1 EEST} + {2453410800 7200 0 EET} + {2468872800 10800 1 EEST} + {2484860400 7200 0 EET} + {2500322400 10800 1 EEST} + {2516310000 7200 0 EET} + {2531772000 10800 1 EEST} + {2547759600 7200 0 EET} + {2563826400 10800 1 EEST} + {2579209200 7200 0 EET} + {2595276000 10800 1 EEST} + {2611263600 7200 0 EET} + {2626725600 10800 1 EEST} + {2642713200 7200 0 EET} + {2658175200 10800 1 EEST} + {2674162800 7200 0 EET} + {2689624800 10800 1 EEST} + {2705612400 7200 0 EET} + {2721679200 10800 1 EEST} + {2737062000 7200 0 EET} + {2753128800 10800 1 EEST} + {2768511600 7200 0 EET} + {2784578400 10800 1 EEST} + {2800566000 7200 0 EET} + {2816028000 10800 1 EEST} + {2832015600 7200 0 EET} + {2847477600 10800 1 EEST} + {2863465200 7200 0 EET} + {2878927200 10800 1 EEST} + {2894914800 7200 0 EET} + {2910981600 10800 1 EEST} + {2926364400 7200 0 EET} + {2942431200 10800 1 EEST} + {2957814000 7200 0 EET} + {2973880800 10800 1 EEST} + {2989868400 7200 0 EET} + {3005330400 10800 1 EEST} + {3021318000 7200 0 EET} + {3036780000 10800 1 EEST} + {3052767600 7200 0 EET} + {3068229600 10800 1 EEST} + {3084217200 7200 0 EET} + {3100284000 10800 1 EEST} + {3115666800 7200 0 EET} + {3131733600 10800 1 EEST} + {3147721200 7200 0 EET} + {3163183200 10800 1 EEST} + {3179170800 7200 0 EET} + {3194632800 10800 1 EEST} + {3210620400 7200 0 EET} + {3226082400 10800 1 EEST} + {3242070000 7200 0 EET} + {3258136800 10800 1 EEST} + {3273519600 7200 0 EET} + {3289586400 10800 1 EEST} + {3304969200 7200 0 EET} + {3321036000 10800 1 EEST} + {3337023600 7200 0 EET} + {3352485600 10800 1 EEST} + {3368473200 7200 0 EET} + {3383935200 10800 1 EEST} + {3399922800 7200 0 EET} + {3415384800 10800 1 EEST} + {3431372400 7200 0 EET} + {3447439200 10800 1 EEST} + {3462822000 7200 0 EET} + {3478888800 10800 1 EEST} + {3494876400 7200 0 EET} + {3510338400 10800 1 EEST} + {3526326000 7200 0 EET} + {3541788000 10800 1 EEST} + {3557775600 7200 0 EET} + {3573237600 10800 1 EEST} + {3589225200 7200 0 EET} + {3605292000 10800 1 EEST} + {3620674800 7200 0 EET} + {3636741600 10800 1 EEST} + {3652124400 7200 0 EET} + {3668191200 10800 1 EEST} + {3684178800 7200 0 EET} + {3699640800 10800 1 EEST} + {3715628400 7200 0 EET} + {3731090400 10800 1 EEST} + {3747078000 7200 0 EET} + {3762540000 10800 1 EEST} + {3778527600 7200 0 EET} + {3794594400 10800 1 EEST} + {3809977200 7200 0 EET} + {3826044000 10800 1 EEST} + {3841426800 7200 0 EET} + {3857493600 10800 1 EEST} + {3873481200 7200 0 EET} + {3888943200 10800 1 EEST} + {3904930800 7200 0 EET} + {3920392800 10800 1 EEST} + {3936380400 7200 0 EET} + {3951842400 10800 1 EEST} + {3967830000 7200 0 EET} + {3983896800 10800 1 EEST} + {3999279600 7200 0 EET} + {4015346400 10800 1 EEST} + {4031334000 7200 0 EET} + {4046796000 10800 1 EEST} + {4062783600 7200 0 EET} + {4078245600 10800 1 EEST} + {4094233200 7200 0 EET} } diff --git a/library/tzdata/Asia/Kathmandu b/library/tzdata/Asia/Kathmandu new file mode 100644 index 0000000..dbec1f0 --- /dev/null +++ b/library/tzdata/Asia/Kathmandu @@ -0,0 +1,7 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:Asia/Kathmandu) { + {-9223372036854775808 20476 0 LMT} + {-1577943676 19800 0 IST} + {504901800 20700 0 NPT} +} diff --git a/library/tzdata/Asia/Katmandu b/library/tzdata/Asia/Katmandu index 12f7662..2d6d060 100644 --- a/library/tzdata/Asia/Katmandu +++ b/library/tzdata/Asia/Katmandu @@ -1,7 +1,5 @@ # created by tools/tclZIC.tcl - do not edit - -set TZData(:Asia/Katmandu) { - {-9223372036854775808 20476 0 LMT} - {-1577943676 19800 0 IST} - {504901800 20700 0 NPT} +if {![info exists TZData(Asia/Kathmandu)]} { + LoadTimeZoneFile Asia/Kathmandu } +set TZData(:Asia/Katmandu) $TZData(:Asia/Kathmandu) diff --git a/library/tzdata/Europe/Zurich b/library/tzdata/Europe/Zurich index b6b44d1..33831c3 100644 --- a/library/tzdata/Europe/Zurich +++ b/library/tzdata/Europe/Zurich @@ -4,12 +4,10 @@ set TZData(:Europe/Zurich) { {-9223372036854775808 2048 0 LMT} {-3827954048 1784 0 BMT} {-2385246584 3600 0 CET} - {-920336400 7200 1 CEST} - {-915242400 3600 0 CET} - {-904518000 7200 1 CEST} - {-891223200 3600 0 CET} - {-873068400 7200 1 CEST} - {-859773600 3600 0 CET} + {-904435200 7200 1 CEST} + {-891129600 3600 0 CET} + {-872985600 7200 1 CEST} + {-859680000 3600 0 CET} {347151600 3600 0 CET} {354675600 7200 1 CEST} {370400400 3600 0 CET} diff --git a/tools/tclZIC.tcl b/tools/tclZIC.tcl index 07ecd5e..8355a8a 100755 --- a/tools/tclZIC.tcl +++ b/tools/tclZIC.tcl @@ -29,7 +29,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclZIC.tcl,v 1.9 2006/11/03 00:34:53 hobbs Exp $ +# RCS: @(#) $Id: tclZIC.tcl,v 1.10 2009/04/09 20:07:18 kennykb Exp $ # #---------------------------------------------------------------------- @@ -1265,6 +1265,7 @@ proc writeZones {outDir} { # Write the data to the information file set f [open $fileName w] + fconfigure $f -translation lf puts $f "\# created by $::argv0 - do not edit" puts $f "" puts $f [list set TZData(:$zoneName) $data] @@ -1317,6 +1318,7 @@ proc writeLinks {outDir} { # Write the file set f [open $fileName w] + fconfigure $f -translation lf puts $f "\# created by $::argv0 - do not edit" puts $f $ifCmd puts $f $setCmd -- cgit v0.12 From 6626a523f72667a745e0137510e8b65b4984bed0 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 10 Apr 2009 09:37:52 +0000 Subject: Specific check for [Bug 26245326] This bug is caused by receiving a partial HTTP response line which caused premature switching of the state in the client package before we received the whole line. --- ChangeLog | 5 +++++ tests/http.test | 16 +++++++++++++++- tests/httpd | 16 ++++++++++++++-- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81d42e7..ebe410b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-10 Pat Thoyts + + * tests/http.test: Added specific check for [Bug 26245326] + * tests/httpd: (return incomplete HTTP response header) + 2009-04-08 Kevin B. Kenny * tools/tclZIC.tcl: Always emit files with Unix line termination. diff --git a/tests/http.test b/tests/http.test index dfc884c..c4006f9 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.49 2008/12/09 22:38:05 patthoyts Exp $ +# RCS: @(#) $Id: http.test,v 1.50 2009/04/10 09:37:52 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -330,6 +330,16 @@ test http-3.23 {http::geturl parse failures} -body { test http-3.24 {http::geturl parse failures} -body { http::geturl http://somewhere/path?%query } -returnCodes error -result {Illegal encoding character usage "%qu" in URL path} +test http-3.25 {http::meta} { + set token [http::geturl $url -timeout 2000] + array set m [http::meta $token] + lsort [array names m] +} {Content-Length Content-Type Date} +test http-3.26 {http::meta} { + set token [http::geturl $url -headers {X-Check 1} -timeout 2000] + array set m [http::meta $token] + lsort [array names m] +} {Content-Length Content-Type Date X-Check} test http-4.1 {http::Event} { set token [http::geturl $url -keepalive 0] @@ -531,3 +541,7 @@ if {[info exists removeHttpd]} { rename bgerror {} ::tcltest::cleanupTests + +# Local variables: +# mode: tcl +# End: \ No newline at end of file diff --git a/tests/httpd b/tests/httpd index b46a3f0..93ee08a 100644 --- a/tests/httpd +++ b/tests/httpd @@ -72,6 +72,10 @@ proc httpdRead { sock } { # Read the HTTP headers set readCount [gets $sock line] + if {[regexp {^([^:]+):(.*)$} $line -> key val]} { + lappend data(meta) $key [string trim $val] + } + } elseif {$data(state) == "query"} { # Read the query data @@ -195,17 +199,25 @@ proc httpdRespond { sock } { } # Catch errors from premature client closes - + catch { if {$data(proto) == "HEAD"} { puts $sock "HTTP/1.0 200 OK" } else { - puts $sock "HTTP/1.0 200 Data follows" + # Split the response to test for [Bug 26245326] + puts -nonewline $sock "HT" + flush $sock + puts $sock "TP/1.0 200 Data follows" } puts $sock "Date: [clock format [clock seconds] \ -format {%a, %d %b %Y %H:%M:%S %Z}]" puts $sock "Content-Type: $type" puts $sock "Content-Length: [string length $html]" + foreach {key val} $data(meta) { + if {[string match "X-*" $key]} { + puts $sock "$key: $val" + } + } puts $sock "" flush $sock if {$data(proto) != "HEAD"} { -- cgit v0.12 From eec238cfa6822ad7a80ba6e1678b59e8b01863e6 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 10 Apr 2009 13:14:38 +0000 Subject: Fix for immediate problem in [Bug 2089279]. --- ChangeLog | 34 ++++++++++++++++++++-------------- doc/StringObj.3 | 6 +++--- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebe410b..01172d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2009-04-10 Donal K. Fellows + + * doc/StringObj.3: [Bug 2089279]: Corrected example so that it works + on 64-bit machines as well. + 2009-04-10 Pat Thoyts - * tests/http.test: Added specific check for [Bug 26245326] - * tests/httpd: (return incomplete HTTP response header) + * tests/http.test: [Bug 26245326]: Added specific check for problem + * tests/httpd: (return incomplete HTTP response header). 2009-04-08 Kevin B. Kenny @@ -10,30 +15,31 @@ 2009-04-09 Don Porter - * library/http/http.tcl: Handle incomplete lines in the - "connecting" state. Thanks to Sergei Golovan. [Bug 26245326] + * library/http/http.tcl: [Bug 26245326]: Handle incomplete + lines in the "connecting" state. Thanks to Sergei Golovan. 2009-04-08 Andreas Kupries - * library/platform/platform.tcl: Extended the darwin sections to - * library/platform/pkgIndex.tcl: add a kernel version number to - * unix/Makefile.in: the identifier for anything from Leopard (10.5) - * win/Makefile.in: on up. Extended patterns for same. Extended cpu - * doc/platform.n: recognition for 64bit Tcl running on a 32bit - kernel on a 64bit processor (By Daniel Steffen). Bumped version to - 1.0.4. Updated Makefiles. + * library/platform/platform.tcl: Extended the darwin sections to add + * library/platform/pkgIndex.tcl: a kernel version number to the + * unix/Makefile.in: identifier for anything from Leopard (10.5) on up. + * win/Makefile.in: Extended patterns for same. Extended cpu + * doc/platform.n: recognition for 64bit Tcl running on a 32bit kernel + on a 64bit processor (By Daniel Steffen). Bumped version to 1.0.4. + Updated Makefiles. 2009-04-08 Don Porter - * library/tcltest/tcltest.tcl: Converted [eval]s (some unsafe!) to - * library/tcltest/pkgIndex.tcl: {*} in tcltest package. [Bug 2570363] + * library/tcltest/tcltest.tcl: [Bug 2570363]: Converted [eval]s (some + * library/tcltest/pkgIndex.tcl: unsafe!) to {*} in tcltest package. * unix/Makefile.in: => tcltest 2.3.1 * win/Makefile.in: 2009-04-07 Don Porter * generic/tclStringObj.c: Correction so that value of - TCL_GROWTH_MIN_ALLOC is everywhere expressed in bytes as comment claims. + TCL_GROWTH_MIN_ALLOC is everywhere expressed in bytes as comment + claims. 2009-04-04 Donal K. Fellows diff --git a/doc/StringObj.3 b/doc/StringObj.3 index f8e6552..8091e2b 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: StringObj.3,v 1.30 2008/12/18 21:23:47 dkf Exp $ +'\" RCS: @(#) $Id: StringObj.3,v 1.31 2009/04/10 13:14:38 dkf Exp $ '\" .so man.macros .TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures" @@ -321,10 +321,10 @@ assumption that C code is more likely to know how many bytes it is passing around than the number of encoded characters those bytes happen to represent. The variable number of arguments passed in should be of the types that would be suitable for passing to \fBsprintf\fR. Note in -this example usage, \fIx\fR is of type \fBlong\fR. +this example usage, \fIx\fR is of type \fBint\fR. .PP .CS -long x = 5; +int x = 5; Tcl_Obj *objPtr = \fBTcl_ObjPrintf\fR("Value is %d", x); .CE .PP -- cgit v0.12 From 7f03bcedc4828e74d510884c108c632aaae9fed2 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 10 Apr 2009 14:19:44 +0000 Subject: Improved HTTP/1.1 support and added specific HTTP/1.1 testing. This patch makes use of the 8.6 zlib support to provide for deflate and gzip support and handles the -channel option with compression and chunked transfer encoding. For the -handler option we currently disable HTTP/1.1 features as we cannot properly pass the data through to the caller. --- library/http/http.tcl | 257 +++++++++++--------- library/http/pkgIndex.tcl | 6 +- tests/http.test | 5 +- tests/http11.test | 579 ++++++++++++++++++++++++++++++++++++++++++++++ tests/httpd11.tcl | 225 ++++++++++++++++++ unix/Makefile.in | 6 +- win/Makefile.in | 8 +- win/makefile.bc | 6 +- win/makefile.vc | 11 +- win/rules.vc | 30 ++- 10 files changed, 997 insertions(+), 136 deletions(-) create mode 100644 tests/http11.test create mode 100644 tests/httpd11.tcl diff --git a/library/http/http.tcl b/library/http/http.tcl index f40221e..8de0a9d 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,12 +8,12 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.74 2009/04/09 17:01:38 dgp Exp $ +# RCS: @(#) $Id: http.tcl,v 1.75 2009/04/10 14:19:44 patthoyts Exp $ -package require Tcl 8.4 +package require Tcl 8.6 # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles -package provide http 2.7.3 +package provide http 2.8.0 namespace eval http { # Allow resourcing to not clobber existing data @@ -27,7 +27,13 @@ namespace eval http { -proxyfilter http::ProxyRequired -urlencoding utf-8 } - set http(-useragent) "Tcl http client package [package provide http]" + # We need a useragent string of this style or various servers will refuse to + # send us compressed content even when we ask for it. This follows the + # de-facto layout of user-agent strings in current browsers. + set http(-useragent) "Mozilla/5.0\ + ([string totitle $::tcl_platform(platform)]; U;\ + $::tcl_platform(os) $::tcl_platform(osVersion))\ + http/[package provide http] Tcl/[package provide Tcl]" } proc init {} { @@ -94,7 +100,7 @@ namespace eval http { # Arguments: # msg Message to output # -proc http::Log {args} {} +if {[info command http::Log] eq {}} { proc http::Log {args} {} } # http::register -- # @@ -649,7 +655,11 @@ proc http::geturl {url args} { if {[info exists state(-method)] && $state(-method) ne ""} { set how $state(-method) } - + # We cannot handle chunked encodings with -handler, so force HTTP/1.0 + # until we can manage this. + if {[info exists state(-handler)]} { + set state(-protocol) 1.0 + } if {[catch { puts $sock "$how $srvurl HTTP/$state(-protocol)" puts $sock "Accept: $http(-accept)" @@ -693,14 +703,8 @@ proc http::geturl {url args} { puts $sock "$key: $value" } } - # Soft zlib dependency check - no package require - if { - !$accept_encoding_seen && - ([package vsatisfies [package provide Tcl] 8.6] - || [llength [package provide zlib]]) && - !([info exists state(-channel)] || [info exists state(-handler)]) - } then { - puts $sock "Accept-Encoding: gzip, identity, *;q=0.1" + if {!$accept_encoding_seen && ![info exists state(-handler)]} { + puts $sock "Accept-Encoding: deflate,gzip,compress" } if {$isQueryChannel && $state(querylength) == 0} { # Try to determine size of data in channel. If we cannot seek, the @@ -1009,22 +1013,16 @@ proc http::Event {sock token} { # Turn off conversions for non-text data set state(binary) 1 } - if { - $state(binary) || [string match *gzip* $state(coding)] || - [string match *compress* $state(coding)] - } then { - if {[info exists state(-channel)]} { + if {[info exists state(-channel)]} { + if {$state(binary) || [llength [ContentEncoding $token]]} { fconfigure $state(-channel) -translation binary } - } - if { - [info exists state(-channel)] && - ![info exists state(-handler)] - } then { - # Initiate a sequence of background fcopies - fileevent $sock readable {} - CopyStart $sock $token - return + if {![info exists state(-handler)]} { + # Initiate a sequence of background fcopies + fileevent $sock readable {} + CopyStart $sock $token + return + } } } elseif {$n > 0} { # Process header lines @@ -1170,14 +1168,54 @@ proc http::getTextLine {sock} { # Side Effects # This closes the connection upon error -proc http::CopyStart {sock token} { - variable $token +proc http::CopyStart {sock token {initial 1}} { + upvar #0 $token state + if {[info exists state(transfer)] && $state(transfer) eq "chunked"} { + foreach coding [ContentEncoding $token] { + lappend state(zlib) [zlib stream $coding] + } + make-transformation-chunked $sock [namespace code [list CopyChunk $token]] + } else { + if {$initial} { + foreach coding [ContentEncoding $token] { + zlib push $coding $sock + } + } + if {[catch { + fcopy $sock $state(-channel) -size $state(-blocksize) -command \ + [list http::CopyDone $token] + } err]} { + Finish $token $err + } + } +} + +proc http::CopyChunk {token chunk} { upvar 0 $token state - if {[catch { - fcopy $sock $state(-channel) -size $state(-blocksize) -command \ - [list http::CopyDone $token] - } err]} then { - Finish $token $err + if {[set count [string length $chunk]]} { + incr state(currentsize) $count + if {[info exists state(zlib)]} { + foreach stream $state(zlib) { + set chunk [$stream add $chunk] + } + } + puts -nonewline $state(-channel) $chunk + if {[info exists state(-progress)]} { + eval [linsert $state(-progress) end \ + $token $state(totalsize) $state(currentsize)] + } + } else { + Log "CopyChunk Finish $token" + if {[info exists state(zlib)]} { + set excess "" + foreach stream $state(zlib) { + catch {set excess [$stream add -finalize $excess]} + } + puts -nonewline $state(-channel) $excess + foreach stream $state(zlib) { $stream close } + unset state(zlib) + } + Eof $token ;# FIX ME: pipelining. } } @@ -1207,7 +1245,7 @@ proc http::CopyDone {token count {error {}}} { } elseif {[catch {eof $sock} iseof] || $iseof} { Eof $token } else { - CopyStart $sock $token + CopyStart $sock $token 0 } } @@ -1231,34 +1269,31 @@ proc http::Eof {token {force 0}} { set state(status) ok } - if {($state(coding) eq "gzip") && [string length $state(body)] > 0} { - if {[catch { - if {[package vsatisfies [package present Tcl] 8.6]} { - # The zlib integration into 8.6 includes proper gzip support - set state(body) [zlib gunzip $state(body)] - } else { - set state(body) [Gunzip $state(body)] + if {[string length $state(body)] > 0} { + if {[catch { + foreach coding [ContentEncoding $token] { + set state(body) [zlib $coding $state(body)] } - } err]} then { + } err]} { + Log "error doing $coding '$state(body)'" return [Finish $token $err] - } - } - - if {!$state(binary)} { - # If we are getting text, set the incoming channel's encoding - # correctly. iso8859-1 is the RFC default, but this could be any IANA - # charset. However, we only know how to convert what we have - # encodings for. - - set enc [CharsetToEncoding $state(charset)] - if {$enc ne "binary"} { - set state(body) [encoding convertfrom $enc $state(body)] - } - - # Translate text line endings. - set state(body) [string map {\r\n \n \r \n} $state(body)] + } + + if {!$state(binary)} { + # If we are getting text, set the incoming channel's encoding + # correctly. iso8859-1 is the RFC default, but this could be any IANA + # charset. However, we only know how to convert what we have + # encodings for. + + set enc [CharsetToEncoding $state(charset)] + if {$enc ne "binary"} { + set state(body) [encoding convertfrom $enc $state(body)] + } + + # Translate text line endings. + set state(body) [string map {\r\n \n \r \n} $state(body)] + } } - Finish $token } @@ -1403,59 +1438,57 @@ proc http::CharsetToEncoding {charset} { } } -# http::Gunzip -- -# -# Decompress data transmitted using the gzip transfer coding. -# - -# FIX ME: redo using zlib sinflate -proc http::Gunzip {data} { - binary scan $data Scb5icc magic method flags time xfl os - set pos 10 - if {$magic != 0x1f8b} { - return -code error "invalid data: supplied data is not in gzip format" - } - if {$method != 8} { - return -code error "invalid compression method" - } - - # lassign [split $flags ""] f_text f_crc f_extra f_name f_comment - foreach {f_text f_crc f_extra f_name f_comment} [split $flags ""] break - set extra "" - if {$f_extra} { - binary scan $data @${pos}S xlen - incr pos 2 - set extra [string range $data $pos $xlen] - set pos [incr xlen] - } - - set name "" - if {$f_name} { - set ndx [string first \0 $data $pos] - set name [string range $data $pos $ndx] - set pos [incr ndx] - } - - set comment "" - if {$f_comment} { - set ndx [string first \0 $data $pos] - set comment [string range $data $pos $ndx] - set pos [incr ndx] - } - - set fcrc "" - if {$f_crc} { - set fcrc [string range $data $pos [incr pos]] - incr pos +# Return the list of content-encoding transformations we need to do in order. +proc http::ContentEncoding {token} { + upvar 0 $token state + set r {} + if {[info exists state(coding)]} { + foreach coding [split $state(coding) ,] { + switch -exact -- $coding { + deflate { lappend r inflate } + gzip - x-gzip { lappend r gunzip } + compress - x-compress { lappend r decompress } + identity {} + default { + return -code error "unsupported content-encoding \"$coding\"" + } + } + } } + return $r +} - binary scan [string range $data end-7 end] ii crc size - set inflated [zlib inflate [string range $data $pos end-8]] - set chk [zlib crc32 $inflated] - if {($crc & 0xffffffff) != ($chk & 0xffffffff)} { - return -code error "invalid data: checksum mismatch $crc != $chk" - } - return $inflated +proc http::make-transformation-chunked {chan command} { + set lambda {{chan command} { + set data "" + set size -1 + yield + while {1} { + chan configure $chan -translation {crlf binary} + while {[gets $chan line] < 1} { yield } + chan configure $chan -translation {binary binary} + if {[scan $line %x size] != 1} { return -code error "invalid size: \"$line\"" } + set chunk "" + while {$size && ![chan eof $chan]} { + set part [chan read $chan $size] + incr size -[string length $part] + append chunk $part + } + if {[catch { + uplevel #0 [linsert $command end $chunk] + }]} then { + http::Log "Error in callback: $::errorInfo" + } + if {[string length $chunk] == 0} { + # channel might have been closed in the callback + catch {chan event $chan readable {}} + return + } + } + }} + coroutine dechunk$chan ::apply $lambda $chan $command + chan event $chan readable [namespace origin dechunk$chan] + return } # Local variables: diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 07724d3..c7029be 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,4 +1,2 @@ -# Tcl package index file, version 1.1 - -if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded http 2.7.3 [list tclPkgSetup $dir http 2.7.3 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +if {![package vsatisfies [package provide Tcl] 8.6]} {return} +package ifneeded http 2.8.0 [list tclPkgSetup $dir http 2.8.0 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/tests/http.test b/tests/http.test index c4006f9..7fac104 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.50 2009/04/10 09:37:52 patthoyts Exp $ +# RCS: @(#) $Id: http.test,v 1.51 2009/04/10 14:19:45 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -83,8 +83,9 @@ if {[info commands testthread] == "testthread" && [file exists $httpdFile]} { } test http-1.1 {http::config} { + http::config -useragent UserAgent http::config -} [list -accept */* -proxyfilter http::ProxyRequired -proxyhost {} -proxyport {} -urlencoding utf-8 -useragent "Tcl http client package $version"] +} [list -accept */* -proxyfilter http::ProxyRequired -proxyhost {} -proxyport {} -urlencoding utf-8 -useragent "UserAgent"] test http-1.2 {http::config} { http::config -proxyfilter } http::ProxyRequired diff --git a/tests/http11.test b/tests/http11.test new file mode 100644 index 0000000..58bb091 --- /dev/null +++ b/tests/http11.test @@ -0,0 +1,579 @@ +# http11.test -- -*- tcl-*- +# +# Test HTTP/1.1 features. +# +# Copyright (C) 2009 Pat Thoyts +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. + +package require tcltest 2 +namespace import -force ::tcltest::* + +package require http 2.8 + +# start the server +variable httpd_output +proc create_httpd {} { + proc httpd_read {chan} { + variable httpd_output + if {[gets $chan line] != -1} { + #puts stderr "read '$line'" + set httpd_output $line + } + if {[eof $chan]} { + puts stderr "eof from httpd" + fileevent $chan readable {} + close $chan + } + } + variable httpd_output + set httpd_script [file join [pwd] [file dirname [info script]] httpd11.tcl] + set httpd [open "|[list [interpreter] -encoding utf-8 $httpd_script]" r+] + fconfigure $httpd -buffering line -blocking 0 + fileevent $httpd readable [list httpd_read $httpd] + vwait httpd_output + variable httpd_port [lindex $httpd_output 2] + return $httpd +} + +proc halt_httpd {} { + variable httpd_output + variable httpd + if {[info exists httpd]} { + puts $httpd "quit" + vwait httpd_output + close $httpd + } + unset -nocomplain httpd_output httpd +} + +proc meta {tok {key ""}} { + set meta [http::meta $tok] + if {$key ne ""} { + if {[dict exists $meta $key]} { + return [dict get $meta $key] + } else { + return "" + } + } + return $meta +} + +proc check_crc {tok args} { + set crc [meta $tok x-crc32] + if {[llength $args]} {set data [lindex $args 0]} else {set data [http::data $tok]} + set chk [format %x [zlib crc32 $data]] + if {$crc ne $chk} { + return "crc32 mismatch: $crc ne $chk" + } + return "ok" +} + +makeFile "test\ +

this is a test

\n\ +[string repeat {

This is a tcl test file.

} 4192]\n\ +" testdoc.html + +# ------------------------------------------------------------------------- + +test http-1.0 "normal request for document " -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html -timeout 10000] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] [meta $tok connection] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close} + +test http-1.1 "normal,gzip,non-chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 10000 -headers {accept-encoding gzip}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok gzip {}} + +test http-1.2 "normal,deflated,non-chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 10000 -headers {accept-encoding deflate}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok deflate {}} + +test http-1.3 "normal,compressed,non-chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 10000 -headers {accept-encoding compress}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok compress {}} + +test http-1.4 "normal,identity,non-chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 10000 -headers {accept-encoding identity}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok {} {}} + +test http-1.5 "normal request for document, unsupported coding" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 10000 -headers {accept-encoding unsupported}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok {}} + +test http-1.6 "normal, specify 1.1 " -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -protocol 1.1 -timeout 10000] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok connection] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close chunked} + +test http-1.7 "normal, 1.1 and keepalive " -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -protocol 1.1 -keepalive 1 -timeout 10000] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok connection] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok {} chunked} + +test http-1.8 "normal, 1.1 and keepalive, server close" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -protocol 1.1 -keepalive 1 -timeout 10000] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok connection] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close {}} + +test http-1.9 "normal,gzip,chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 10000 -headers {accept-encoding gzip}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok gzip chunked} + +test http-1.10 "normal,deflate,chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 10000 -headers {accept-encoding deflate}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok deflate chunked} + +test http-1.11 "normal,compress,chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 10000 -headers {accept-encoding compress}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok compress chunked} + +test http-1.11 "normal,identity,chunked" -setup { + variable httpd [create_httpd] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 10000 -headers {accept-encoding identity}] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok] \ + [meta $tok content-encoding] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok {} chunked} + +# ------------------------------------------------------------------------- + +test http-2.0 "-channel" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 5000 -channel $chan] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close chunked} + +test http-2.1 "-channel, encoding gzip" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 5000 -channel $chan -headers {accept-encoding gzip}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close gzip chunked} + +test http-2.2 "-channel, encoding deflate" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 5000 -channel $chan -headers {accept-encoding deflate}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close deflate chunked} + +test http-2.3 "-channel,encoding compress" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 5000 -channel $chan \ + -headers {accept-encoding compress}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close compress chunked} + +test http-2.4 "-channel,encoding identity" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 5000 -channel $chan \ + -headers {accept-encoding identity}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close {} chunked} + +test http-2.5 "-channel,encoding unsupported" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 5000 -channel $chan \ + -headers {accept-encoding unsupported}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close {} chunked} + +test http-2.6 "-channel,encoding gzip,non-chunked" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 5000 -channel $chan -headers {accept-encoding gzip}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding]\ + [expr {[file size testdoc.html]-[file size testfile.tmp]}] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close gzip {} 0} + +test http-2.7 "-channel,encoding deflate,non-chunked" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 5000 -channel $chan -headers {accept-encoding deflate}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding]\ + [expr {[file size testdoc.html]-[file size testfile.tmp]}] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close deflate {} 0} + +test http-2.8 "-channel,encoding compress,non-chunked" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 5000 -channel $chan -headers {accept-encoding compress}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding]\ + [expr {[file size testdoc.html]-[file size testfile.tmp]}] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close compress {} 0} + +test http-2.9 "-channel,encoding identity,non-chunked" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 5000 -channel $chan -headers {accept-encoding identity}] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding]\ + [expr {[file size testdoc.html]-[file size testfile.tmp]}] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok close {} {} 0} + +test http-2.10 "-channel,deflate,keepalive" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 5000 -channel $chan -keepalive 1] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding]\ + [expr {[file size testdoc.html]-[file size testfile.tmp]}] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok {} deflate chunked 0} + +test http-2.11 "-channel,identity,keepalive" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -headers {accept-encoding identity} \ + -timeout 5000 -channel $chan -keepalive 1] + http::wait $tok + seek $chan 0 + set data [read $chan] + list [http::status $tok] [http::code $tok] [check_crc $tok $data]\ + [meta $tok connection] [meta $tok content-encoding]\ + [meta $tok transfer-encoding] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {ok {HTTP/1.1 200 OK} ok {} {} chunked} + +# ------------------------------------------------------------------------- +# +# The following tests for the -handler option will require changes in +# the future. At the moment we cannot handler chunked data with this +# option. Therefore we currently force HTTP/1.0 protocol version. +# +# Once this is solved, these tests should be fixed to assume chunked +# returns in 3.2 and 3.3 and HTTP/1.1 in all but test 3.1 + +proc handler {var sock token} { + upvar #0 $var data + set chunk [read $sock] + append data $chunk + #::http::Log "handler read [string length $chunk] ([chan configure $sock -buffersize])" + if {[eof $sock]} { + #::http::Log "handler eof $sock" + chan event $sock readable {} + } +} + +test http-3.0 "-handler,close,identity" -setup { + variable httpd [create_httpd] + set testdata "" +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 10000 -handler [namespace code [list handler testdata]]] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok $testdata]\ + [meta $tok connection] [meta $tok content-encoding] \ + [meta $tok transfer-encoding] \ + [expr {[file size testdoc.html]-[string length $testdata]}] +} -cleanup { + http::cleanup $tok + unset -nocomplain testdata + halt_httpd +} -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} + +test http-3.1 "-handler,protocol1.0" -setup { + variable httpd [create_httpd] + set testdata "" +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ + -timeout 10000 -protocol 1.0 \ + -handler [namespace code [list handler testdata]]] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok $testdata]\ + [meta $tok connection] [meta $tok content-encoding] \ + [meta $tok transfer-encoding] \ + [expr {[file size testdoc.html]-[string length $testdata]}] +} -cleanup { + http::cleanup $tok + unset -nocomplain testdata + halt_httpd +} -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} + +test http-3.2 "-handler,close,chunked" -setup { + variable httpd [create_httpd] + set testdata "" +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 10000 -keepalive 0 -binary 1\ + -handler [namespace code [list handler testdata]]] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok $testdata]\ + [meta $tok connection] [meta $tok content-encoding] \ + [meta $tok transfer-encoding] \ + [expr {[file size testdoc.html]-[string length $testdata]}] +} -cleanup { + http::cleanup $tok + unset -nocomplain testdata + halt_httpd +} -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} + +test http-3.3 "-handler,keepalive,chunked" -setup { + variable httpd [create_httpd] + set testdata "" +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -timeout 10000 -keepalive 1 -binary 1\ + -handler [namespace code [list handler testdata]]] + http::wait $tok + list [http::status $tok] [http::code $tok] [check_crc $tok $testdata]\ + [meta $tok connection] [meta $tok content-encoding] \ + [meta $tok transfer-encoding] \ + [expr {[file size testdoc.html]-[string length $testdata]}] +} -cleanup { + http::cleanup $tok + unset -nocomplain testdata + halt_httpd +} -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} + +# ------------------------------------------------------------------------- + +unset -nocomplain httpd_port +::tcltest::cleanupTests diff --git a/tests/httpd11.tcl b/tests/httpd11.tcl new file mode 100644 index 0000000..afa5f5d --- /dev/null +++ b/tests/httpd11.tcl @@ -0,0 +1,225 @@ +# httpd11.tcl -- -*- tcl -*- +# +# A simple httpd for testing HTTP/1.1 client features. +# Not suitable for use on a internet connected port. +# +# Copyright (C) 2009 Pat Thoyts +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. + +package require Tcl 8.6 + +proc ::tcl::dict::get? {dict key} { + if {[dict exists $dict $key]} { + return [dict get $dict $key] + } + return +} +namespace ensemble configure dict \ + -map [linsert [namespace ensemble configure dict -map] end get? ::tcl::dict::get?] + +proc make-chunk-generator {data {size 4096}} { + variable _chunk_gen_uid + if {![info exists _chunk_gen_uid]} {set _chunk_gen_uid 0} + set lambda {{data size} { + set pos 0 + yield + while {1} { + set payload [string range $data $pos [expr {$pos + $size - 1}]] + incr pos $size + set chunk [format %x [string length $payload]]\r\n$payload\r\n + yield $chunk + if {![string length $payload]} {return} + } + }} + set name chunker[incr _chunk_gen_uid] + coroutine $name ::apply $lambda $data $size + return $name +} + +proc get-chunks {data {compression gzip}} { + switch -exact -- $compression { + gzip { set data [zlib gzip $data] } + deflate { set data [zlib deflate $data] } + compress { set data [zlib compress $data] } + } + + set data "" + set chunker [make-chunk-generator $data 512] + while {[string length [set chunk [$chunker]]]} { + append data $chunk + } + return $data +} + +proc blow-chunks {data {ochan stdout} {compression gzip}} { + switch -exact -- $compression { + gzip { set data [zlib gzip $data] } + deflate { set data [zlib deflate $data] } + compress { set data [zlib compress $data] } + } + + set chunker [make-chunk-generator $data 512] + while {[string length [set chunk [$chunker]]]} { + puts -nonewline $ochan $chunk + } + return +} + +proc mime-type {filename} { + switch -exact -- [file extension $filename] { + .htm - .html { return {text text/html}} + .png { return {binary image/png} } + .jpg { return {binary image/jpeg} } + .gif { return {binary image/gif} } + .css { return {text text/css} } + .xml { return {text text/xml} } + .xhtml {return {text application/xml+html} } + .svg { return {text image/svg+xml} } + .txt - .tcl - .c - .h { return {text text/plain}} + } + return {binary text/plain} +} + +proc Puts {chan s} {puts $chan $s; puts $s} + +proc Service {chan addr port} { + chan event $chan readable [info coroutine] + while {1} { + set meta {} + chan configure $chan -buffering line -encoding iso8859-1 -translation crlf + yield + while {[gets $chan line] < 0} { + if {[eof $chan]} {chan event $chan readable {}; close $chan; return} + yield + } + if {[eof $chan]} {chan event $chan readable {}; close $chan; return} + foreach {req url protocol} {GET {} HTTP/1.1} break + regexp {^(\S+)\s+(.*)\s(\S+)?$} $line -> req url protocol + + puts $line + while {[gets $chan line] > 0} { + if {[regexp {^([^:]+):(.*)$} $line -> key val]} { + #puts "$key $val" + lappend meta [string tolower $key] [string trim $val] + } + yield + } + + if {[scan $url {%[^?]?%s} path query] < 2} { + set query "" + } + + set encoding identity + set transfer "" + set close 1 + set type text/html + set code "404 Not Found" + set data "Error 404" + append data "

Not Found

Try again.

" + + set path [string trimleft $path /] + set path [file join [pwd] $path] + if {[file exists $path] && [file isfile $path]} { + foreach {what type} [mime-type $path] break + set f [open $path r] + if {$what eq "binary"} {chan configure $f -translation binary} + set data [read $f] + close $f + set code "200 OK" + set close [expr {[dict get? $meta connection] eq "close"}] + } + + if {$protocol eq "HTTP/1.1"} { + if {[string match "*deflate*" [dict get? $meta accept-encoding]]} { + set encoding deflate + } elseif {[string match "*gzip*" [dict get? $meta accept-encoding]]} { + set encoding gzip + } elseif {[string match "*compress*" [dict get? $meta accept-encoding]]} { + set encoding compress + } + set transfer chunked + } else { + set close 1 + } + + foreach pair [split $query &] { + if {[scan $pair {%[^=]=%s} key val] != 2} {set val ""} + switch -exact -- $key { + close {set close 1 ; set transfer 0} + transfer {set transfer $val} + content-type {set type $val} + } + } + + chan configure $chan -translation crlf + Puts $chan "$protocol $code" + Puts $chan "content-type: $type" + Puts $chan [format "x-crc32: %x" [zlib crc32 $data]] + if {$close} { + Puts $chan "connection: close" + } + if {$encoding eq "identity"} { + Puts $chan "content-length: [string length $data]" + } else { + Puts $chan "content-encoding: $encoding" + } + if {$transfer eq "chunked"} { + Puts $chan "transfer-encoding: chunked" + } + puts $chan "" + flush $chan + + chan configure $chan -translation binary + if {$transfer eq "chunked"} { + blow-chunks $data $chan $encoding + } elseif {$encoding ne "identity"} { + puts -nonewline $chan [zlib $encoding $data] + } else { + puts -nonewline $chan $data + } + + if {$close} { + chan event $chan readable {} + close $chan + puts "close $chan" + return + } else { + flush $chan + } + puts "pipeline $chan" + } +} + +proc Accept {chan addr port} { + coroutine client$chan Service $chan $addr $port + return +} + +proc Control {chan} { + if {[gets $chan line] != -1} { + if {[string trim $line] eq "quit"} { + set ::forever 1 + } + } + if {[eof $chan]} { + chan event $chan readable {} + } +} + +proc Main {{port 0}} { + set server [socket -server Accept -myaddr localhost $port] + puts [chan configure $server -sockname] + flush stdout + chan event stdin readable [list Control stdin] + vwait ::forever + close $server + return "done" +} + +if {!$tcl_interactive} { + set r [catch [linsert $argv 0 Main] err] + if {$r} {puts stderr $errorInfo} elseif {[string length $err]} {puts $err} + exit $r +} diff --git a/unix/Makefile.in b/unix/Makefile.in index 0a4b918..42790de 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.266 2009/04/08 19:17:45 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.267 2009/04/10 14:19:45 patthoyts Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -820,8 +820,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.7.3 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/http-2.7.3.tm; + @echo "Installing package http 2.8.0 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.0.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index 378f0e7..ed0632f 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.153 2009/04/08 19:17:45 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.154 2009/04/10 14:19:45 patthoyts Exp $ VERSION = @TCL_VERSION@ @@ -667,7 +667,7 @@ install-libraries: libraries install-tzdata install-msgs else true; \ fi; \ done; - @for i in http1.0 opt0.4 encoding ../tcl8 ../tcl8/8.2 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5; \ + @for i in http1.0 opt0.4 encoding ../tcl8 ../tcl8/8.2 ../tcl8/8.3 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6; \ do \ if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \ echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \ @@ -696,8 +696,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.7.3 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/http-2.7.3.tm; + @echo "Installing package http 2.8.0 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.0.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ diff --git a/win/makefile.bc b/win/makefile.bc index 46d7ec3..758eff6 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -430,9 +430,9 @@ install-libraries: -@copy "$(ROOT)\library\http1.0\http.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" -@copy "$(ROOT)\library\http1.0\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" @echo installing http2.7 - -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http2.7" - -@copy "$(ROOT)\library\http\http.tcl" "$(SCRIPT_INSTALL_DIR)\http2.7" - -@copy "$(ROOT)\library\http\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http2.7" + -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http2.8" + -@copy "$(ROOT)\library\http\http.tcl" "$(SCRIPT_INSTALL_DIR)\http2.8" + -@copy "$(ROOT)\library\http\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http2.8" @echo installing opt0.4 -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\opt0.4" -@copy "$(ROOT)\library\opt\optparse.tcl" "$(SCRIPT_INSTALL_DIR)\opt0.4" diff --git a/win/makefile.vc b/win/makefile.vc index 1ec42e6..42ca196 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.198 2009/02/01 19:35:15 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.199 2009/04/10 14:19:45 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -594,7 +594,6 @@ $** $** << $(_VC_MANIFEST_EMBED_DLL) - -@del $*.exp !endif $(TCLSTUBLIB): $(TCLSTUBOBJS) @@ -625,8 +624,6 @@ $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tcldde -out:$@ \ $** $(baselibs) $(_VC_MANIFEST_EMBED_DLL) - -@del $*.exp - -@del $*.lib !endif !if $(STATIC_BUILD) @@ -641,8 +638,6 @@ $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tclreg -out:$@ \ $** $(baselibs) $(_VC_MANIFEST_EMBED_DLL) - -@del $*.exp - -@del $*.lib !endif pkgs: @@ -1117,7 +1112,7 @@ install-libraries: tclConfig install-msgs install-tzdata "$(SCRIPT_INSTALL_DIR)\opt0.4\" @echo Installing package http $(PKG_HTTP_VER) as a Tcl Module @$(COPY) "$(ROOT)\library\http\http.tcl" \ - "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\http-$(PKG_HTTP_VER).tm" + "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.6\http-$(PKG_HTTP_VER).tm" @echo Installing package msgcat $(PKG_MSGCAT_VER) as a Tcl Module @$(COPY) "$(ROOT)\library\msgcat\msgcat.tcl" \ "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\msgcat-$(PKG_MSGCAT_VER).tm" @@ -1204,6 +1199,8 @@ clean: clean-pkgs @echo Cleaning $(WINDIR)\versions.vc ... @if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc +realclean: hose + hose: @echo Hosing $(OUT_DIR)\* ... @if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR) diff --git a/win/rules.vc b/win/rules.vc index 1e42e6d..ee216ab 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.39 2008/06/25 10:25:12 patthoyts Exp $ +# RCS: @(#) $Id: rules.vc,v 1.40 2009/04/10 14:19:45 patthoyts Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -216,6 +216,7 @@ TCL_THREADS = 0 DEBUG = 0 SYMBOLS = 0 PROFILE = 0 +PGO = 0 MSVCRT = 0 LOIMPACT = 0 TCL_USE_STATIC_PACKAGES = 0 @@ -265,6 +266,15 @@ PROFILE = 1 !else PROFILE = 0 !endif +!if [nmakehlp -f $(OPTS) "pgi"] +!message *** Doing profile guided optimization instrumentation +PGO = 1 +!elseif [nmakehlp -f $(OPTS) "pgo"] +!message *** Doing profile guided optimization +PGO = 2 +!else +PGO = 0 +!endif !if [nmakehlp -f $(OPTS) "loimpact"] !message *** Doing loimpact LOIMPACT = 1 @@ -419,6 +429,24 @@ WARNINGS = $(WARNINGS) -Wp64 !endif !endif +!if $(PGO) > 1 +!if [nmakehlp -l -ltcg:pgoptimize] +LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pgoptimize +!else +MSG=^ +This compiler does not support profile guided optimization. +!error $(MSG) +!endif +!elseif $(PGO) > 0 +!if [nmakehlp -l -ltcg:pginstrument] +LINKERFLAGS = $(LINKERFLAGS:-ltcg=) -ltcg:pginstrument +!else +MSG=^ +This compiler does not support profile guided optimization. +!error $(MSG) +!endif +!endif + #---------------------------------------------------------- # Set our defines now armed with our options. #---------------------------------------------------------- -- cgit v0.12 From 823edac52c51fd85660d75007473f05c8c29f84d Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 16:59:19 +0000 Subject: * macosx/tclMacOSXBundle.c: on Mac OS X 10.4 and later, replace deprecated NSModule API by dlfcn API. --- ChangeLog | 5 +++ macosx/tclMacOSXBundle.c | 87 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 84 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01172d7..f5e1597 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-10 Daniel Steffen + + * macosx/tclMacOSXBundle.c: on Mac OS X 10.4 and later, replace + deprecated NSModule API by dlfcn API. + 2009-04-10 Donal K. Fellows * doc/StringObj.3: [Bug 2089279]: Corrected example so that it works diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 14be2f0..635eb7c 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -48,14 +48,64 @@ * permission to use and distribute the software in accordance with the * terms specified in this license. * - * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.13 2008/12/07 16:28:44 das Exp $ + * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.14 2009/04/10 16:59:19 das Exp $ */ #include "tclPort.h" #ifdef HAVE_COREFOUNDATION #include + +#ifndef TCL_DYLD_USE_DLFCN +/* + * Use preferred dlfcn API on 10.4 and later + */ +# if !defined(NO_DLFCN_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 +# define TCL_DYLD_USE_DLFCN 1 +# else +# define TCL_DYLD_USE_DLFCN 0 +# endif +#endif + +#ifndef TCL_DYLD_USE_NSMODULE +/* + * Use deprecated NSModule API only to support 10.3 and earlier: + */ +# if MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +# define TCL_DYLD_USE_NSMODULE 1 +# else +# define TCL_DYLD_USE_NSMODULE 0 +# endif +#endif + +#if TCL_DYLD_USE_DLFCN +#include +#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +/* + * Support for weakly importing dlfcn API. + */ +extern void *dlsym(void *handle, const char *symbol) WEAK_IMPORT_ATTRIBUTE; +extern char *dlerror(void) WEAK_IMPORT_ATTRIBUTE; +#endif +#endif + +#if TCL_DYLD_USE_NSMODULE #include +#endif + +#if TCL_DYLD_USE_DLFCN && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +MODULE_SCOPE long tclMacOSXDarwinRelease; +#endif + +#ifdef TCL_DEBUG_LOAD +#define TclLoadDbgMsg(m, ...) do { \ + fprintf(stderr, "%s:%d: %s(): " m ".\n", \ + strrchr(__FILE__, '/')+1, __LINE__, __func__, ##__VA_ARGS__); \ + } while (0) +#else +#define TclLoadDbgMsg(m, ...) +#endif + #endif /* HAVE_COREFOUNDATION */ /* @@ -192,14 +242,35 @@ Tcl_MacOSXOpenVersionedBundleResources( static short (*openresourcemap)(CFBundleRef) = NULL; if (!initialized) { - NSSymbol nsSymbol = NULL; - if (NSIsSymbolNameDefinedWithHint( - "_CFBundleOpenBundleResourceMap", "CoreFoundation")) { - nsSymbol = NSLookupAndBindSymbolWithHint( - "_CFBundleOpenBundleResourceMap","CoreFoundation"); - if (nsSymbol) { - openresourcemap = NSAddressOfSymbol(nsSymbol); +#if TCL_DYLD_USE_DLFCN +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1040 + if (tclMacOSXDarwinRelease >= 8) +#endif + { + const char *errMsg = nil; + openresourcemap = dlsym(RTLD_NEXT, + "CFBundleOpenBundleResourceMap"); + if (!openresourcemap) { + errMsg = dlerror(); + TclLoadDbgMsg("dlsym() failed: %s", errMsg); + } + } + if (!openresourcemap) +#endif + { +#if TCL_DYLD_USE_NSMODULE + NSSymbol nsSymbol = NULL; + if (NSIsSymbolNameDefinedWithHint( + "_CFBundleOpenBundleResourceMap", + "CoreFoundation")) { + nsSymbol = NSLookupAndBindSymbolWithHint( + "_CFBundleOpenBundleResourceMap", + "CoreFoundation"); + if (nsSymbol) { + openresourcemap = NSAddressOfSymbol(nsSymbol); + } } +#endif } initialized = TRUE; } -- cgit v0.12 From 9bdf20b285315e722860d65d2ada928f6ece07f0 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 18:01:31 +0000 Subject: * unix/configure.in (Darwin): use Darwin SUSv3 extensions if available; remove /Network locations from default tcl package search path (NFS mounted locations and thus slow). * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 --- unix/configure | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++-- unix/configure.in | 25 +++++++++++++++-- unix/tclConfig.h.in | 3 ++ 3 files changed, 101 insertions(+), 6 deletions(-) diff --git a/unix/configure b/unix/configure index 94735cf..503f4f5 100755 --- a/unix/configure +++ b/unix/configure @@ -17908,6 +17908,79 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi + echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 +echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6 +if test "${tcl_cv_cc_darwin_c_source+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ + #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 + #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 + #endif + #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1050 + #error MAC_OS_X_VERSION_MIN_REQUIRED < 1050 + #endif + #define _DARWIN_C_SOURCE 1 + #include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_darwin_c_source=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_darwin_c_source=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 +echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6 + if test $tcl_cv_cc_darwin_c_source = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _DARWIN_C_SOURCE 1 +_ACEOF + + fi fi # Build .bundle dltest binaries in addition to .dylib DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}' @@ -18836,9 +18909,9 @@ VERSION=${TCL_VERSION} if test "$FRAMEWORK_BUILD" = "1" ; then test -z "$TCL_PACKAGE_PATH" && \ - TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" + TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks" test -z "$TCL_MODULE_PATH" && \ - TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl" + TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl" elif test "$prefix/lib" != "$libdir"; then TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" else @@ -18941,7 +19014,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure diff --git a/unix/configure.in b/unix/configure.in index 4ba97a0..815c9be 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.206 2009/03/14 17:20:24 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.207 2009/04/10 18:01:31 das Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -576,6 +576,25 @@ if test "`uname -s`" = "Darwin" ; then if test $tcl_cv_cc_weak_import = yes; then AC_DEFINE(HAVE_WEAK_IMPORT, 1, [Is weak import available?]) fi + AC_CACHE_CHECK([if Darwin SUSv3 extensions are available], + tcl_cv_cc_darwin_c_source, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + AC_TRY_COMPILE([ + #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ + #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 + #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 + #endif + #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1050 + #error MAC_OS_X_VERSION_MIN_REQUIRED < 1050 + #endif + #define _DARWIN_C_SOURCE 1 + #include + ],,tcl_cv_cc_darwin_c_source=yes, tcl_cv_cc_darwin_c_source=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_darwin_c_source = yes; then + AC_DEFINE(_DARWIN_C_SOURCE, 1, + [Are Darwin SUSv3 extensions available?]) + fi fi # Build .bundle dltest binaries in addition to .dylib DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}' @@ -829,9 +848,9 @@ VERSION=${TCL_VERSION} if test "$FRAMEWORK_BUILD" = "1" ; then test -z "$TCL_PACKAGE_PATH" && \ - TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" + TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks" test -z "$TCL_MODULE_PATH" && \ - TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl" + TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl" elif test "$prefix/lib" != "$libdir"; then TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" else diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 7922346..9879254 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -431,6 +431,9 @@ first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN +/* Are Darwin SUSv3 extensions available? */ +#undef _DARWIN_C_SOURCE + /* Add the _ISOC99_SOURCE flag when building */ #undef _ISOC99_SOURCE -- cgit v0.12 From 2858f83307b48cadf03d1ae69cb92820edf3e1cc Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 18:02:36 +0000 Subject: * macosx/tclMacOSXNotify.c: revise CoreFoundation notifier to allow * unix/tclUnixChan.c: embedding into applications that * unix/tclUnixEvent.c: already have a CFRunLoop running and want to run the tcl event loop via Tcl_ServiceModeHook(TCL_SERVICE_ALL). * macosx/tclMacOSXNotify.c: add CFRunLoop based Tcl_Sleep() and * unix/tclUnixChan.c: TclUnixWaitForFile() implementations * unix/tclUnixEvent.c: and disable select() based ones in CoreFoundation builds. * unix/tclUnixNotify.c: simplify, sync with tclMacOSXNotify.c. * generic/tclInt.decls: add TclMacOSXNotifierAddRunLoopMode() * generic/tclIntPlatDecls.h: internal API, regen. * generic/tclStubInit.c: --- ChangeLog | 28 +- generic/tclInt.decls | 5 +- generic/tclIntPlatDecls.h | 13 +- generic/tclStubInit.c | 3 +- macosx/tclMacOSXNotify.c | 1661 ++++++++++++++++++++++++++++++--------------- unix/tclUnixChan.c | 5 +- unix/tclUnixEvent.c | 5 +- unix/tclUnixNotfy.c | 48 +- 8 files changed, 1201 insertions(+), 567 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5e1597..393c38c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,31 @@ 2008-04-10 Daniel Steffen - * macosx/tclMacOSXBundle.c: on Mac OS X 10.4 and later, replace - deprecated NSModule API by dlfcn API. + * macosx/tclMacOSXNotify.c: revise CoreFoundation notifier to allow + * unix/tclUnixChan.c: embedding into applications that + * unix/tclUnixEvent.c: already have a CFRunLoop running and + want to run the tcl event loop via + Tcl_ServiceModeHook(TCL_SERVICE_ALL). + + * macosx/tclMacOSXNotify.c: add CFRunLoop based Tcl_Sleep() and + * unix/tclUnixChan.c: TclUnixWaitForFile() implementations + * unix/tclUnixEvent.c: and disable select() based ones in + CoreFoundation builds. + + * unix/tclUnixNotify.c: simplify, sync with tclMacOSXNotify.c. + + * generic/tclInt.decls: add TclMacOSXNotifierAddRunLoopMode() + * generic/tclIntPlatDecls.h: internal API, regen. + * generic/tclStubInit.c: + + * unix/configure.in (Darwin): use Darwin SUSv3 extensions if + available; remove /Network locations + from default tcl package search path + (NFS mounted locations and thus slow). + * unix/configure: autoconf-2.59 + * unix/tclConfig.h.in: autoheader-2.59 + + * macosx/tclMacOSXBundle.c: on Mac OS X 10.4 and later, replace + deprecated NSModule API by dlfcn API. 2009-04-10 Donal K. Fellows diff --git a/generic/tclInt.decls b/generic/tclInt.decls index b464b91..0db9059 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.137 2009/02/27 23:03:42 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.138 2009/04/10 18:02:36 das Exp $ library tcl @@ -1181,3 +1181,6 @@ declare 18 macosx { const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types) } +declare 19 macosx { + void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode) +} diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 35c7e52..b3a55ac 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.38 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.39 2009/04/10 18:02:36 das Exp $ */ #ifndef _TCLINTPLATDECLS @@ -368,6 +368,12 @@ EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); #endif +#ifndef TclMacOSXNotifierAddRunLoopMode_TCL_DECLARED +#define TclMacOSXNotifierAddRunLoopMode_TCL_DECLARED +/* 19 */ +EXTERN void TclMacOSXNotifierAddRunLoopMode ( + const void * runLoopMode); +#endif #endif /* MACOSX */ typedef struct TclIntPlatStubs { @@ -443,6 +449,7 @@ typedef struct TclIntPlatStubs { int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ int (*tclMacOSXCopyFileAttributes) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr); /* 17 */ int (*tclMacOSXMatchType) (Tcl_Interp * interp, const char * pathName, const char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ + void (*tclMacOSXNotifierAddRunLoopMode) (const void * runLoopMode); /* 19 */ #endif /* MACOSX */ } TclIntPlatStubs; @@ -693,6 +700,10 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr; #define TclMacOSXMatchType \ (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ #endif +#ifndef TclMacOSXNotifierAddRunLoopMode +#define TclMacOSXNotifierAddRunLoopMode \ + (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */ +#endif #endif /* MACOSX */ #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f33086d..fb032ea 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.179 2009/02/10 23:09:08 nijtmans Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.180 2009/04/10 18:02:36 das Exp $ */ #include "tclInt.h" @@ -362,6 +362,7 @@ static const TclIntPlatStubs tclIntPlatStubs = { TclMacOSXSetFileAttribute, /* 16 */ TclMacOSXCopyFileAttributes, /* 17 */ TclMacOSXMatchType, /* 18 */ + TclMacOSXNotifierAddRunLoopMode, /* 19 */ #endif /* MACOSX */ }; diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 8edbda2..e3e619c 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -7,12 +7,12 @@ * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * Copyright 2001, Apple Computer, Inc. - * Copyright (c) 2005-2008 Daniel A. Steffen + * Copyright (c) 2005-2009 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.22 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.23 2009/04/10 18:02:37 das Exp $ */ #include "tclInt.h" @@ -21,128 +21,7 @@ #include #include -/* - * This structure is used to keep track of the notifier info for a registered - * file. - */ - -typedef struct FileHandler { - int fd; - int mask; /* Mask of desired events: TCL_READABLE, - * etc. */ - int readyMask; /* Mask of events that have been seen since - * the last time file handlers were invoked - * for this file. */ - Tcl_FileProc *proc; /* Function to call, in the style of - * Tcl_CreateFileHandler. */ - ClientData clientData; /* Argument to pass to proc. */ - struct FileHandler *nextPtr;/* Next in list of all files we care about. */ -} FileHandler; - -/* - * The following structure is what is added to the Tcl event queue when file - * handlers are ready to fire. - */ - -typedef struct FileHandlerEvent { - Tcl_Event header; /* Information that is standard for all - * events. */ - int fd; /* File descriptor that is ready. Used to find - * the FileHandler structure for the file - * (can't point directly to the FileHandler - * structure because it could go away while - * the event is queued). */ -} FileHandlerEvent; - -/* - * The following structure contains a set of select() masks to track readable, - * writable, and exceptional conditions. - */ - -typedef struct SelectMasks { - fd_set readable; - fd_set writable; - fd_set exceptional; -} SelectMasks; - -/* - * The following static structure contains the state information for the - * select based implementation of the Tcl notifier. One of these structures is - * created for each thread that is using the notifier. - */ - -typedef struct ThreadSpecificData { - FileHandler *firstFileHandlerPtr; - /* Pointer to head of file handler list. */ - SelectMasks checkMasks; /* This structure is used to build up the - * masks to be used in the next call to - * select. Bits are set in response to calls - * to Tcl_CreateFileHandler. */ - SelectMasks readyMasks; /* This array reflects the readable/writable - * conditions that were found to exist by the - * last call to select. */ - int numFdBits; /* Number of valid bits in checkMasks (one - * more than highest fd for which - * Tcl_WatchFile has been called). */ - int onList; /* True if it is in this list */ - unsigned int pollState; /* pollState is used to implement a polling - * handshake between each thread and the - * notifier thread. Bits defined below. */ - struct ThreadSpecificData *nextPtr, *prevPtr; - /* All threads that are currently waiting on - * an event have their ThreadSpecificData - * structure on a doubly-linked listed formed - * from these pointers. You must hold the - * notifierLock before accessing these - * fields. */ - CFRunLoopSourceRef runLoopSource; - /* Any other thread alerts a notifier that an - * event is ready to be processed by signaling - * this CFRunLoopSource. */ - CFRunLoopRef runLoop; /* This thread's CFRunLoop, needs to be woken - * up whenever the runLoopSource is - * signaled. */ - int eventReady; /* True if an event is ready to be - * processed. */ -} ThreadSpecificData; - -static Tcl_ThreadDataKey dataKey; - -/* - * The following static indicates the number of threads that have initialized - * notifiers. - * - * You must hold the notifierInitLock before accessing this variable. - */ - -static int notifierCount = 0; - -/* - * The following variable points to the head of a doubly-linked list of - * ThreadSpecificData structures for all threads that are currently waiting on - * an event. - * - * You must hold the notifierLock before accessing this list. - */ - -static ThreadSpecificData *waitingListPtr = NULL; - -/* - * The notifier thread spends all its time in select() waiting for a file - * descriptor associated with one of the threads on the waitingListPtr list to - * do something interesting. But if the contents of the waitingListPtr list - * ever changes, we need to wake up and restart the select() system call. You - * can wake up the notifier thread by writing a single byte to the file - * descriptor defined below. This file descriptor is the input-end of a pipe - * and the notifier thread is listening for data on the output-end of the same - * pipe. Hence writing to this file descriptor will cause the select() system - * call to return and wake up the notifier thread. - * - * You must hold the notifierLock lock before writing to the pipe. - */ - -static int triggerPipe = -1; -static int receivePipe = -1; /* Output end of triggerPipe */ +/* #define TCL_MAC_DEBUG_NOTIFIER 1 */ /* * We use the Darwin-native spinlock API rather than pthread mutexes for @@ -233,8 +112,17 @@ static OSSpinLock notifierLock = SPINLOCK_INIT; #define UNLOCK_NOTIFIER_INIT SpinLockUnlock(¬ifierInitLock) #define LOCK_NOTIFIER SpinLockLock(¬ifierLock) #define UNLOCK_NOTIFIER SpinLockUnlock(¬ifierLock) +#define LOCK_NOTIFIER_TSD SpinLockLock(&tsdPtr->tsdLock) +#define UNLOCK_NOTIFIER_TSD SpinLockUnlock(&tsdPtr->tsdLock) #ifdef TCL_MAC_DEBUG_NOTIFIER +#define TclMacOSXNotifierDbgMsg(m, ...) do { \ + fprintf(notifierLog?notifierLog:stderr, "tclMacOSXNotify.c:%d: " \ + "%s() pid %5d thread %10p: " m "\n", __LINE__, __func__, \ + getpid(), pthread_self(), ##__VA_ARGS__); \ + fflush(notifierLog?notifierLog:stderr); \ + } while (0) + /* * Debug version of SpinLockLock that logs the time spent waiting for the lock */ @@ -242,68 +130,253 @@ static OSSpinLock notifierLock = SPINLOCK_INIT; #define SpinLockLockDbg(p) if (!SpinLockTry(p)) { \ Tcl_WideInt s = TclpGetWideClicks(), e; \ SpinLockLock(p); e = TclpGetWideClicks(); \ - fprintf(notifierLog, "tclMacOSXNotify.c:" \ - "%4d: thread %10p waited on %s for " \ - "%8llu ns\n", __LINE__, pthread_self(), \ + TclMacOSXNotifierDbgMsg("waited on %s for %8.0f ns", \ #p, TclpWideClicksToNanoseconds(e-s)); \ - fflush(notifierLog); \ } #undef LOCK_NOTIFIER_INIT #define LOCK_NOTIFIER_INIT SpinLockLockDbg(¬ifierInitLock) #undef LOCK_NOTIFIER #define LOCK_NOTIFIER SpinLockLockDbg(¬ifierLock) -static FILE *notifierLog = stderr; +#undef LOCK_NOTIFIER_TSD +#define LOCK_NOTIFIER_TSD SpinLockLockDbg(&tsdPtr->tsdLock) +#include +static FILE *notifierLog = NULL; #ifndef NOTIFIER_LOG #define NOTIFIER_LOG "/tmp/tclMacOSXNotify.log" #endif -#define OPEN_NOTIFIER_LOG if (notifierLog == stderr) { \ +#define OPEN_NOTIFIER_LOG if (!notifierLog) { \ notifierLog = fopen(NOTIFIER_LOG, "a"); \ + /*TclMacOSXNotifierDbgMsg("open log"); \ + asl_set_filter(NULL, \ + ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); \ + asl_add_log_file(NULL, \ + fileno(notifierLog));*/ \ } -#define CLOSE_NOTIFIER_LOG if (notifierLog != stderr) { \ +#define CLOSE_NOTIFIER_LOG if (notifierLog) { \ + /*asl_remove_log_file(NULL, \ + fileno(notifierLog)); \ + TclMacOSXNotifierDbgMsg("close log");*/ \ fclose(notifierLog); \ - notifierLog = stderr; \ + notifierLog = NULL; \ } +#define ENABLE_ASL if (notifierLog) { \ + /*tsdPtr->asl = asl_open(NULL, "com.apple.console", ASL_OPT_NO_REMOTE); \ + asl_set_filter(tsdPtr->asl, \ + ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); \ + asl_add_log_file(tsdPtr->asl, \ + fileno(notifierLog));*/ \ + } +#define DISABLE_ASL /*if (tsdPtr->asl) { \ + if (notifierLog) { \ + asl_remove_log_file(tsdPtr->asl, \ + fileno(notifierLog)); \ + } \ + asl_close(tsdPtr->asl); \ + }*/ +#define ASLCLIENT /*aslclient asl*/ +#else +#define TclMacOSXNotifierDbgMsg(m, ...) +#define OPEN_NOTIFIER_LOG +#define CLOSE_NOTIFIER_LOG +#define ENABLE_ASL +#define DISABLE_ASL #endif /* TCL_MAC_DEBUG_NOTIFIER */ /* - * The pollState bits - * POLL_WANT is set by each thread before it waits on its condition - * variable. It is checked by the notifier before it does select. - * POLL_DONE is set by the notifier if it goes into select after seeing - * POLL_WANT. The idea is to ensure it tries a select with the - * same bits the initial thread had set. + * This structure is used to keep track of the notifier info for a registered + * file. + */ + +typedef struct FileHandler { + int fd; + int mask; /* Mask of desired events: TCL_READABLE, + * etc. */ + int readyMask; /* Mask of events that have been seen since + * the last time file handlers were invoked + * for this file. */ + Tcl_FileProc *proc; /* Function to call, in the style of + * Tcl_CreateFileHandler. */ + ClientData clientData; /* Argument to pass to proc. */ + struct FileHandler *nextPtr;/* Next in list of all files we care about. */ +} FileHandler; + +/* + * The following structure is what is added to the Tcl event queue when file + * handlers are ready to fire. + */ + +typedef struct FileHandlerEvent { + Tcl_Event header; /* Information that is standard for all + * events. */ + int fd; /* File descriptor that is ready. Used to find + * the FileHandler structure for the file + * (can't point directly to the FileHandler + * structure because it could go away while + * the event is queued). */ +} FileHandlerEvent; + +/* + * The following structure contains a set of select() masks to track readable, + * writable, and exceptional conditions. + */ + +typedef struct SelectMasks { + fd_set readable; + fd_set writable; + fd_set exceptional; +} SelectMasks; + +/* + * The following static structure contains the state information for the + * select based implementation of the Tcl notifier. One of these structures is + * created for each thread that is using the notifier. + */ + +typedef struct ThreadSpecificData { + FileHandler *firstFileHandlerPtr; + /* Pointer to head of file handler list. */ + int polled; /* True if the notifier thread has polled for + * this thread. + */ + int sleeping; /* True if runloop is inside Tcl_Sleep. */ + int runLoopSourcePerformed; /* True after the runLoopSource callack was + * performed. */ + int runLoopRunning; /* True if this thread's Tcl runLoop is running */ + int runLoopNestingLevel; /* Level of nested runLoop invocations */ + /* Must hold the notifierLock before accessing the following fields: */ + /* Start notifierLock section */ + int onList; /* True if this thread is on the waitingList */ + struct ThreadSpecificData *nextPtr, *prevPtr; + /* All threads that are currently waiting on + * an event have their ThreadSpecificData + * structure on a doubly-linked listed formed + * from these pointers. + */ + /* End notifierLock section */ + OSSpinLock tsdLock; /* Must hold this lock before acessing the + * following fields from more than one thread. + */ + /* Start tsdLock section */ + SelectMasks checkMasks; /* This structure is used to build up the + * masks to be used in the next call to + * select. Bits are set in response to calls + * to Tcl_CreateFileHandler. */ + SelectMasks readyMasks; /* This array reflects the readable/writable + * conditions that were found to exist by the + * last call to select. */ + int numFdBits; /* Number of valid bits in checkMasks (one + * more than highest fd for which + * Tcl_WatchFile has been called). */ + int polling; /* True if this thread is polling for events */ + CFRunLoopRef runLoop; /* This thread's CFRunLoop, needs to be woken + * up whenever the runLoopSource is signaled */ + CFRunLoopSourceRef runLoopSource; + /* Any other thread alerts a notifier that an + * event is ready to be processed by signaling + * this CFRunLoopSource. */ + CFRunLoopObserverRef runLoopObserver; + /* Adds/removes this thread from waitingList + * when the CFRunLoop starts/stops. */ + CFRunLoopTimerRef runLoopTimer; + /* Wakes up CFRunLoop after given timeout when + * running embedded. */ + /* End tsdLock section */ + CFTimeInterval waitTime; /* runLoopTimer wait time when running + * embedded. */ +#ifdef TCL_MAC_DEBUG_NOTIFIER + ASLCLIENT; +#endif +} ThreadSpecificData; + +static Tcl_ThreadDataKey dataKey; + +/* + * The following static indicates the number of threads that have initialized + * notifiers. + * + * You must hold the notifierInitLock before accessing this variable. + */ + +static int notifierCount = 0; + +/* + * The following variable points to the head of a doubly-linked list of + * ThreadSpecificData structures for all threads that are currently waiting on + * an event. + * + * You must hold the notifierLock before accessing this list. + */ + +static ThreadSpecificData *waitingListPtr = NULL; + +/* + * The notifier thread spends all its time in select() waiting for a file + * descriptor associated with one of the threads on the waitingListPtr list to + * do something interesting. But if the contents of the waitingListPtr list + * ever changes, we need to wake up and restart the select() system call. You + * can wake up the notifier thread by writing a single byte to the file + * descriptor defined below. This file descriptor is the input-end of a pipe + * and the notifier thread is listening for data on the output-end of the same + * pipe. Hence writing to this file descriptor will cause the select() system + * call to return and wake up the notifier thread. + * + * You must hold the notifierLock lock before writing to the pipe. + */ + +static int triggerPipe = -1; +static int receivePipe = -1; /* Output end of triggerPipe */ + +/* + * The following static indicates if the notifier thread is running. + * + * You must hold the notifierInitLock before accessing this variable. */ -#define POLL_WANT 0x1 -#define POLL_DONE 0x2 +static int notifierThreadRunning; /* * This is the thread ID of the notifier thread that does select. + * Only valid when notifierThreadRunning is non-zero. + * + * You must hold the notifierInitLock before accessing this variable. */ static pthread_t notifierThread; /* - * Custom run loop mode containing only the run loop source for the - * notifier thread. + * Custom runloop mode for running with only the runloop source for the + * notifier thread */ #ifndef TCL_EVENTS_ONLY_RUN_LOOP_MODE -#define TCL_EVENTS_ONLY_RUN_LOOP_MODE "com.tcltk.tclEventsOnlyRunLoopMode" +#define TCL_EVENTS_ONLY_RUN_LOOP_MODE "com.tcltk.tclEventsOnlyRunLoopMode" #endif #ifdef __CONSTANT_CFSTRINGS__ -#define tclEventsOnlyRunLoopMode CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE) +#define tclEventsOnlyRunLoopMode CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE) #else static CFStringRef tclEventsOnlyRunLoopMode = NULL; #endif /* + * CFTimeInterval to wait forever. + */ + +#define CF_TIMEINTERVAL_FOREVER 5.05e8 + +/* * Static routines defined in this file. */ +static void StartNotifierThread(void); static void NotifierThreadProc(ClientData clientData) - __attribute__ ((__noreturn__)); + __attribute__ ((__noreturn__)); static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); +static void TimerWakeUp(CFRunLoopTimerRef timer, void *info); +static void QueueFileEvents(void *info); +static void UpdateWaitingListAndServiceEvents(CFRunLoopObserverRef observer, + CFRunLoopActivity activity, void *info); +static int OnOffWaitingList(ThreadSpecificData *tsdPtr, int onList, + int signalNotifier); #ifdef HAVE_PTHREAD_ATFORK static int atForkInit = 0; @@ -355,7 +428,6 @@ Tcl_InitNotifier(void) } tsdPtr = TCL_TSD_INIT(&dataKey); - tsdPtr->eventReady = 0; #ifdef WEAK_IMPORT_SPINLOCKLOCK /* @@ -381,17 +453,40 @@ Tcl_InitNotifier(void) CFRunLoopRef runLoop = CFRunLoopGetCurrent(); CFRunLoopSourceRef runLoopSource; CFRunLoopSourceContext runLoopSourceContext; + CFRunLoopObserverContext runLoopObserverContext; + CFRunLoopObserverRef runLoopObserver; bzero(&runLoopSourceContext, sizeof(CFRunLoopSourceContext)); runLoopSourceContext.info = tsdPtr; - runLoopSource = CFRunLoopSourceCreate(NULL, 0, &runLoopSourceContext); + runLoopSourceContext.perform = QueueFileEvents; + runLoopSource = CFRunLoopSourceCreate(NULL, LONG_MIN, + &runLoopSourceContext); if (!runLoopSource) { Tcl_Panic("Tcl_InitNotifier: could not create CFRunLoopSource"); } CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopCommonModes); CFRunLoopAddSource(runLoop, runLoopSource, tclEventsOnlyRunLoopMode); - tsdPtr->runLoopSource = runLoopSource; + + bzero(&runLoopObserverContext, sizeof(CFRunLoopObserverContext)); + runLoopObserverContext.info = tsdPtr; + runLoopObserver = CFRunLoopObserverCreate(NULL, + kCFRunLoopEntry|kCFRunLoopExit|kCFRunLoopBeforeWaiting, TRUE, + LONG_MIN, UpdateWaitingListAndServiceEvents, + &runLoopObserverContext); + if (!runLoopObserver) { + Tcl_Panic("Tcl_InitNotifier: could not create " + "CFRunLoopObserver"); + } + CFRunLoopAddObserver(runLoop, runLoopObserver, kCFRunLoopCommonModes); + CFRunLoopAddObserver(runLoop, runLoopObserver, + tclEventsOnlyRunLoopMode); + tsdPtr->runLoop = runLoop; + tsdPtr->runLoopSource = runLoopSource; + tsdPtr->runLoopObserver = runLoopObserver; + tsdPtr->runLoopTimer = NULL; + tsdPtr->waitTime = CF_TIMEINTERVAL_FOREVER; + tsdPtr->tsdLock = SPINLOCK_INIT; } LOCK_NOTIFIER_INIT; @@ -428,12 +523,14 @@ Tcl_InitNotifier(void) status = fcntl(fds[0], F_GETFL); status |= O_NONBLOCK; if (fcntl(fds[0], F_SETFL, status) < 0) { - Tcl_Panic("Tcl_InitNotifier: could not make receive pipe non blocking"); + Tcl_Panic("Tcl_InitNotifier: could not make receive pipe non " + "blocking"); } status = fcntl(fds[1], F_GETFL); status |= O_NONBLOCK; if (fcntl(fds[1], F_SETFL, status) < 0) { - Tcl_Panic("Tcl_InitNotifier: could not make trigger pipe non blocking"); + Tcl_Panic("Tcl_InitNotifier: could not make trigger pipe non " + "blocking"); } receivePipe = fds[0]; @@ -445,11 +542,10 @@ Tcl_InitNotifier(void) * execve() when more than one thread is present). */ - notifierThread = 0; -#ifdef TCL_MAC_DEBUG_NOTIFIER + notifierThreadRunning = 0; OPEN_NOTIFIER_LOG; -#endif } + ENABLE_ASL; notifierCount++; UNLOCK_NOTIFIER_INIT; @@ -459,35 +555,113 @@ Tcl_InitNotifier(void) /* *---------------------------------------------------------------------- * - * Tcl_FinalizeNotifier -- + * TclMacOSXNotifierAddRunLoopMode -- * - * This function is called to cleanup the notifier state before a thread - * is terminated. + * Add the tcl notifier RunLoop source, observer and timer (if any) + * to the given RunLoop mode. * * Results: * None. * * Side effects: - * May terminate the background notifier thread if this is the last - * notifier instance. + * None. * *---------------------------------------------------------------------- */ void -Tcl_FinalizeNotifier( - ClientData clientData) /* Not used. */ +TclMacOSXNotifierAddRunLoopMode( + const void *runLoopMode) { - ThreadSpecificData *tsdPtr; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + CFStringRef mode = (CFStringRef) runLoopMode; - if (tclNotifierHooks.finalizeNotifierProc) { - tclNotifierHooks.finalizeNotifierProc(clientData); - return; + if (tsdPtr->runLoop) { + CFRunLoopAddSource(tsdPtr->runLoop, tsdPtr->runLoopSource, mode); + CFRunLoopAddObserver(tsdPtr->runLoop, tsdPtr->runLoopObserver, mode); + if (tsdPtr->runLoopTimer) { + CFRunLoopAddTimer(tsdPtr->runLoop, tsdPtr->runLoopTimer, mode); + } + } +} + +/* + *---------------------------------------------------------------------- + * + * StartNotifierThread -- + * + * Start notifier thread if necessary. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +StartNotifierThread(void) +{ + LOCK_NOTIFIER_INIT; + if (!notifierCount) { + Tcl_Panic("StartNotifierThread: notifier not initialized"); + } + if (!notifierThreadRunning) { + int result; + pthread_attr_t attr; + + pthread_attr_init(&attr); + pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); + pthread_attr_setstacksize(&attr, 60 * 1024); + result = pthread_create(¬ifierThread, &attr, + (void * (*)(void *))NotifierThreadProc, NULL); + pthread_attr_destroy(&attr); + if (result) { + Tcl_Panic("StartNotifierThread: unable to start notifier thread"); + } + notifierThreadRunning = 1; + } + UNLOCK_NOTIFIER_INIT; +} + + +/* + *---------------------------------------------------------------------- + * + * Tcl_FinalizeNotifier -- + * + * This function is called to cleanup the notifier state before a thread + * is terminated. + * + * Results: + * None. + * + * Side effects: + * May terminate the background notifier thread if this is the last + * notifier instance. + * + *---------------------------------------------------------------------- + */ + +void +Tcl_FinalizeNotifier( + ClientData clientData) /* Not used. */ +{ + ThreadSpecificData *tsdPtr; + + if (tclNotifierHooks.finalizeNotifierProc) { + tclNotifierHooks.finalizeNotifierProc(clientData); + return; } tsdPtr = TCL_TSD_INIT(&dataKey); + LOCK_NOTIFIER_INIT; notifierCount--; + DISABLE_ASL; /* * If this is the last thread to use the notifier, close the notifier pipe @@ -495,55 +669,60 @@ Tcl_FinalizeNotifier( */ if (notifierCount == 0) { - int result; + if (triggerPipe != -1) { + /* + * Send "q" message to the notifier thread so that it will + * terminate. The notifier will return from its call to select() + * and notice that a "q" message has arrived, it will then close + * its side of the pipe and terminate its thread. Note the we can + * not just close the pipe and check for EOF in the notifier thread + * because if a background child process was created with exec, + * select() would not register the EOF on the pipe until the child + * processes had terminated. [Bug: 4139] [Bug: 1222872] + */ - if (triggerPipe < 0) { - Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); - } + write(triggerPipe, "q", 1); + close(triggerPipe); - /* - * Send "q" message to the notifier thread so that it will terminate. - * The notifier will return from its call to select() and notice that - * a "q" message has arrived, it will then close its side of the pipe - * and terminate its thread. Note the we can not just close the pipe - * and check for EOF in the notifier thread because if a background - * child process was created with exec, select() would not register - * the EOF on the pipe until the child processes had terminated. [Bug: - * 4139] [Bug: 1222872] - */ + if (notifierThreadRunning) { + int result = pthread_join(notifierThread, NULL); - write(triggerPipe, "q", 1); - close(triggerPipe); - - if (notifierThread) { - result = pthread_join(notifierThread, NULL); - if (result) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); + if (result) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier " + "thread"); + } + notifierThreadRunning = 0; } - notifierThread = 0; - } - close(receivePipe); - triggerPipe = -1; -#ifdef TCL_MAC_DEBUG_NOTIFIER + close(receivePipe); + triggerPipe = -1; + } CLOSE_NOTIFIER_LOG; -#endif } UNLOCK_NOTIFIER_INIT; - LOCK_NOTIFIER; /* For concurrency with Tcl_AlertNotifier */ + LOCK_NOTIFIER_TSD; /* For concurrency with Tcl_AlertNotifier */ if (tsdPtr->runLoop) { tsdPtr->runLoop = NULL; /* - * Remove runLoopSource from all CFRunLoops and release it. + * Remove runLoopSource, runLoopObserver and runLoopTimer from all + * CFRunLoops. */ CFRunLoopSourceInvalidate(tsdPtr->runLoopSource); CFRelease(tsdPtr->runLoopSource); tsdPtr->runLoopSource = NULL; + CFRunLoopObserverInvalidate(tsdPtr->runLoopObserver); + CFRelease(tsdPtr->runLoopObserver); + tsdPtr->runLoopObserver = NULL; + if (tsdPtr->runLoopTimer) { + CFRunLoopTimerInvalidate(tsdPtr->runLoopTimer); + CFRelease(tsdPtr->runLoopTimer); + tsdPtr->runLoopTimer = NULL; + } } - UNLOCK_NOTIFIER; + UNLOCK_NOTIFIER_TSD; } /* @@ -576,13 +755,12 @@ Tcl_AlertNotifier( return; } - LOCK_NOTIFIER; + LOCK_NOTIFIER_TSD; if (tsdPtr->runLoop) { - tsdPtr->eventReady = 1; CFRunLoopSourceSignal(tsdPtr->runLoopSource); CFRunLoopWakeUp(tsdPtr->runLoop); } - UNLOCK_NOTIFIER; + UNLOCK_NOTIFIER_TSD; } /* @@ -590,15 +768,13 @@ Tcl_AlertNotifier( * * Tcl_SetTimer -- * - * This function sets the current notifier timer value. This interface is - * not implemented in this notifier because we are always running inside - * of Tcl_DoOneEvent. + * This function sets the current notifier timer value. * * Results: * None. * * Side effects: - * None. + * Replaces any previous timer. * *---------------------------------------------------------------------- */ @@ -607,16 +783,58 @@ void Tcl_SetTimer( const Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { + ThreadSpecificData *tsdPtr; + CFRunLoopTimerRef runLoopTimer; + CFTimeInterval waitTime; + if (tclNotifierHooks.setTimerProc) { tclNotifierHooks.setTimerProc(timePtr); return; } - /* - * The interval timer doesn't do anything in this implementation, because - * the only event loop is via Tcl_DoOneEvent, which passes timeout values - * to Tcl_WaitForEvent. - */ + tsdPtr = TCL_TSD_INIT(&dataKey); + runLoopTimer = tsdPtr->runLoopTimer; + if (!runLoopTimer) { + return; + } + if (timePtr) { + Tcl_Time vTime = *timePtr; + + if (vTime.sec != 0 || vTime.usec != 0) { + tclScaleTimeProcPtr(&vTime, tclTimeClientData); + waitTime = vTime.sec + 1.0e-6 * vTime.usec; + } else { + waitTime = 0; + } + } else { + waitTime = CF_TIMEINTERVAL_FOREVER; + } + tsdPtr->waitTime = waitTime; + CFRunLoopTimerSetNextFireDate(runLoopTimer, + CFAbsoluteTimeGetCurrent() + waitTime); +} + +/* + *---------------------------------------------------------------------- + * + * TimerWakeUp -- + * + * CFRunLoopTimer callback. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +TimerWakeUp( + CFRunLoopTimerRef timer, + void *info) +{ } /* @@ -640,11 +858,27 @@ Tcl_ServiceModeHook( int mode) /* Either TCL_SERVICE_ALL, or * TCL_SERVICE_NONE. */ { + ThreadSpecificData *tsdPtr; + if (tclNotifierHooks.serviceModeHookProc) { tclNotifierHooks.serviceModeHookProc(mode); return; - } else { - /* Does nothing in this implementation. */ + } + + tsdPtr = TCL_TSD_INIT(&dataKey); + + if (mode == TCL_SERVICE_ALL && !tsdPtr->runLoopTimer) { + if (!tsdPtr->runLoop) { + Tcl_Panic("Tcl_ServiceModeHook: Notifier not initialized"); + } + tsdPtr->runLoopTimer = CFRunLoopTimerCreate(NULL, + CFAbsoluteTimeGetCurrent() + CF_TIMEINTERVAL_FOREVER, + CF_TIMEINTERVAL_FOREVER, 0, 0, TimerWakeUp, NULL); + if (tsdPtr->runLoopTimer) { + CFRunLoopAddTimer(tsdPtr->runLoop, tsdPtr->runLoopTimer, + kCFRunLoopCommonModes); + StartNotifierThread(); + } } } @@ -706,6 +940,7 @@ Tcl_CreateFileHandler( * Update the check masks for this file. */ + LOCK_NOTIFIER_TSD; if (mask & TCL_READABLE) { FD_SET(fd, &(tsdPtr->checkMasks.readable)); } else { @@ -724,6 +959,7 @@ Tcl_CreateFileHandler( if (tsdPtr->numFdBits <= fd) { tsdPtr->numFdBits = fd+1; } + UNLOCK_NOTIFIER_TSD; } /* @@ -731,380 +967,721 @@ Tcl_CreateFileHandler( * * Tcl_DeleteFileHandler -- * - * Cancel a previously-arranged callback arrangement for a file. + * Cancel a previously-arranged callback arrangement for a file. + * + * Results: + * None. + * + * Side effects: + * If a callback was previously registered on file, remove it. + * + *---------------------------------------------------------------------- + */ + +void +Tcl_DeleteFileHandler( + int fd) /* Stream id for which to remove callback + * function. */ +{ + FileHandler *filePtr, *prevPtr; + int i, numFdBits; + ThreadSpecificData *tsdPtr; + + if (tclNotifierHooks.deleteFileHandlerProc) { + tclNotifierHooks.deleteFileHandlerProc(fd); + return; + } + + tsdPtr = TCL_TSD_INIT(&dataKey); + numFdBits = -1; + + /* + * Find the entry for the given file (and return if there isn't one). + */ + + for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; + prevPtr = filePtr, filePtr = filePtr->nextPtr) { + if (filePtr == NULL) { + return; + } + if (filePtr->fd == fd) { + break; + } + } + + /* + * Find current max fd. + */ + + if (fd+1 == tsdPtr->numFdBits) { + numFdBits = 0; + for (i = fd-1; i >= 0; i--) { + if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) + || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { + numFdBits = i+1; + break; + } + } + } + + LOCK_NOTIFIER_TSD; + if (numFdBits != -1) { + tsdPtr->numFdBits = numFdBits; + } + + /* + * Update the check masks for this file. + */ + + if (filePtr->mask & TCL_READABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + } + if (filePtr->mask & TCL_WRITABLE) { + FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + } + if (filePtr->mask & TCL_EXCEPTION) { + FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + } + UNLOCK_NOTIFIER_TSD; + + /* + * Clean up information in the callback record. + */ + + if (prevPtr == NULL) { + tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; + } else { + prevPtr->nextPtr = filePtr->nextPtr; + } + ckfree((char *) filePtr); +} + +/* + *---------------------------------------------------------------------- + * + * FileHandlerEventProc -- + * + * This function is called by Tcl_ServiceEvent when a file event reaches + * the front of the event queue. This function is responsible for + * actually handling the event by invoking the callback for the file + * handler. + * + * Results: + * Returns 1 if the event was handled, meaning it should be removed from + * the queue. Returns 0 if the event was not handled, meaning it should + * stay on the queue. The only time the event isn't handled is if the + * TCL_FILE_EVENTS flag bit isn't set. + * + * Side effects: + * Whatever the file handler's callback function does. + * + *---------------------------------------------------------------------- + */ + +static int +FileHandlerEventProc( + Tcl_Event *evPtr, /* Event to service. */ + int flags) /* Flags that indicate what events to handle, + * such as TCL_FILE_EVENTS. */ +{ + int mask; + FileHandler *filePtr; + FileHandlerEvent *fileEvPtr = (FileHandlerEvent *) evPtr; + ThreadSpecificData *tsdPtr; + + if (!(flags & TCL_FILE_EVENTS)) { + return 0; + } + + /* + * Search through the file handlers to find the one whose handle matches + * the event. We do this rather than keeping a pointer to the file handler + * directly in the event, so that the handler can be deleted while the + * event is queued without leaving a dangling pointer. + */ + + tsdPtr = TCL_TSD_INIT(&dataKey); + for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; + filePtr = filePtr->nextPtr) { + if (filePtr->fd != fileEvPtr->fd) { + continue; + } + + /* + * The code is tricky for two reasons: + * 1. The file handler's desired events could have changed since the + * time when the event was queued, so AND the ready mask with the + * desired mask. + * 2. The file could have been closed and re-opened since the time + * when the event was queued. This is why the ready mask is stored + * in the file handler rather than the queued event: it will be + * zeroed when a new file handler is created for the newly opened + * file. + */ + + mask = filePtr->readyMask & filePtr->mask; + filePtr->readyMask = 0; + if (mask != 0) { + LOCK_NOTIFIER_TSD; + if (mask & TCL_READABLE) { + FD_CLR(filePtr->fd, &(tsdPtr->readyMasks.readable)); + } + if (mask & TCL_WRITABLE) { + FD_CLR(filePtr->fd, &(tsdPtr->readyMasks.writable)); + } + if (mask & TCL_EXCEPTION) { + FD_CLR(filePtr->fd, &(tsdPtr->readyMasks.exceptional)); + } + UNLOCK_NOTIFIER_TSD; + filePtr->proc(filePtr->clientData, mask); + } + break; + } + return 1; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_WaitForEvent -- + * + * This function is called by Tcl_DoOneEvent to wait for new events on + * the message queue. If the block time is 0, then Tcl_WaitForEvent just + * polls without blocking. + * + * Results: + * Returns 0 if a tcl event or timeout ocurred and 1 if a non-tcl + * CFRunLoop source was processed. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_WaitForEvent( + const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ +{ + int result, polling; + CFTimeInterval waitTime; + CFStringRef runLoopMode; + SInt32 runLoopStatus; + ThreadSpecificData *tsdPtr; + + if (tclNotifierHooks.waitForEventProc) { + return tclNotifierHooks.waitForEventProc(timePtr); + } + result = -1; + polling = 0; + waitTime = CF_TIMEINTERVAL_FOREVER; + tsdPtr = TCL_TSD_INIT(&dataKey); + + if (!tsdPtr->runLoop) { + Tcl_Panic("Tcl_WaitForEvent: Notifier not initialized"); + } + + if (timePtr) { + Tcl_Time vTime = *timePtr; + + /* + * TIP #233 (Virtualized Time). Is virtual time in effect? And do we + * actually have something to scale? If yes to both then we call the + * handler to do this scaling. + */ + + if (vTime.sec != 0 || vTime.usec != 0) { + tclScaleTimeProcPtr(&vTime, tclTimeClientData); + waitTime = vTime.sec + 1.0e-6 * vTime.usec; + } else { + /* + * Polling: pretend to wait for files and tell the notifier thread + * what we are doing. The notifier thread makes sure it goes + * through select with its select mask in the same state as ours + * currently is. We block until that happens. + */ + + polling = 1; + } + } + + StartNotifierThread(); + + LOCK_NOTIFIER_TSD; + tsdPtr->polling = polling; + UNLOCK_NOTIFIER_TSD; + tsdPtr->runLoopSourcePerformed = 0; + + /* + * If the Tcl run loop is already running (e.g. if Tcl_WaitForEvent was + * called recursively), re-run it in a custom run loop mode containing only + * the source for the notifier thread, otherwise wakeups from other sources + * added to the common run loop modes might get lost. + */ + + if (tsdPtr->runLoopRunning) { + runLoopMode = tclEventsOnlyRunLoopMode; + } else { + runLoopMode = kCFRunLoopDefaultMode; + tsdPtr->runLoopRunning = 1; + } + runLoopStatus = CFRunLoopRunInMode(runLoopMode, waitTime, TRUE); + if (runLoopMode == kCFRunLoopDefaultMode) { + tsdPtr->runLoopRunning = 0; + } + + LOCK_NOTIFIER_TSD; + tsdPtr->polling = 0; + UNLOCK_NOTIFIER_TSD; + switch (runLoopStatus) { + case kCFRunLoopRunFinished: + Tcl_Panic("Tcl_WaitForEvent: CFRunLoop finished"); + break; + case kCFRunLoopRunTimedOut: + QueueFileEvents(tsdPtr); + result = 0; + break; + case kCFRunLoopRunStopped: + case kCFRunLoopRunHandledSource: + result = tsdPtr->runLoopSourcePerformed ? 0 : 1; + break; + } + + return result; +} + +/* + *---------------------------------------------------------------------- + * + * QueueFileEvents -- + * + * CFRunLoopSource callback for queueing file events. + * + * Results: + * None. + * + * Side effects: + * Queues file events that are detected by the select. + * + *---------------------------------------------------------------------- + */ + +static void +QueueFileEvents( + void *info) +{ + SelectMasks readyMasks; + FileHandler *filePtr; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) info; + + /* + * Queue all detected file events. + */ + + LOCK_NOTIFIER_TSD; + FD_COPY(&(tsdPtr->readyMasks.readable), &readyMasks.readable); + FD_COPY(&(tsdPtr->readyMasks.writable), &readyMasks.writable); + FD_COPY(&(tsdPtr->readyMasks.exceptional), &readyMasks.exceptional); + FD_ZERO(&(tsdPtr->readyMasks.readable)); + FD_ZERO(&(tsdPtr->readyMasks.writable)); + FD_ZERO(&(tsdPtr->readyMasks.exceptional)); + UNLOCK_NOTIFIER_TSD; + tsdPtr->runLoopSourcePerformed = 1; + + for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); + filePtr = filePtr->nextPtr) { + int mask = 0; + + if (FD_ISSET(filePtr->fd, &readyMasks.readable)) { + mask |= TCL_READABLE; + } + if (FD_ISSET(filePtr->fd, &readyMasks.writable)) { + mask |= TCL_WRITABLE; + } + if (FD_ISSET(filePtr->fd, &readyMasks.exceptional)) { + mask |= TCL_EXCEPTION; + } + if (!mask) { + continue; + } + + /* + * Don't bother to queue an event if the mask was previously non-zero + * since an event must still be on the queue. + */ + + if (filePtr->readyMask == 0) { + FileHandlerEvent *fileEvPtr = (FileHandlerEvent *) + ckalloc(sizeof(FileHandlerEvent)); + fileEvPtr->header.proc = FileHandlerEventProc; + fileEvPtr->fd = filePtr->fd; + Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); + } + filePtr->readyMask = mask; + } +} + +/* + *---------------------------------------------------------------------- + * + * UpdateWaitingListAndServiceEvents -- + * + * CFRunLoopObserver callback for updating waitingList and + * servicing Tcl events. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static void +UpdateWaitingListAndServiceEvents( + CFRunLoopObserverRef observer, + CFRunLoopActivity activity, + void *info) +{ + ThreadSpecificData *tsdPtr = (ThreadSpecificData*) info; + + switch (activity) { + case kCFRunLoopEntry: + tsdPtr->runLoopNestingLevel++; + if (tsdPtr->runLoopNestingLevel == 1 && !tsdPtr->sleeping && + (tsdPtr->numFdBits > 0 || tsdPtr->polling)) { + LOCK_NOTIFIER; + OnOffWaitingList(tsdPtr, 1, 1); + UNLOCK_NOTIFIER; + } + break; + case kCFRunLoopExit: + if (tsdPtr->runLoopNestingLevel == 1 && !tsdPtr->sleeping && + (tsdPtr->numFdBits > 0 || tsdPtr->polling)) { + LOCK_NOTIFIER; + OnOffWaitingList(tsdPtr, 0, 1); + UNLOCK_NOTIFIER; + } + tsdPtr->runLoopNestingLevel--; + break; + case kCFRunLoopBeforeWaiting: + if (!tsdPtr->sleeping && tsdPtr->runLoopTimer && + (tsdPtr->runLoopNestingLevel > 1 || !tsdPtr->runLoopRunning)) { + while (Tcl_ServiceAll() && tsdPtr->waitTime == 0) {} + } + break; + } +} + +/* + *---------------------------------------------------------------------- + * + * OnOffWaitingList -- + * + * Add/remove the specified thread to/from the global waitingList + * and optionally signal the notifier. + * + * !!! Requires notifierLock to be held !!! * * Results: - * None. + * Boolean indicating whether the waitingList was changed. * * Side effects: - * If a callback was previously registered on file, remove it. + * None. * *---------------------------------------------------------------------- */ -void -Tcl_DeleteFileHandler( - int fd) /* Stream id for which to remove callback - * function. */ +static int +OnOffWaitingList( + ThreadSpecificData *tsdPtr, + int onList, + int signalNotifier) { - FileHandler *filePtr, *prevPtr; - int i; - ThreadSpecificData *tsdPtr; - - if (tclNotifierHooks.deleteFileHandlerProc) { - tclNotifierHooks.deleteFileHandlerProc(fd); - return; - } - - tsdPtr = TCL_TSD_INIT(&dataKey); - - /* - * Find the entry for the given file (and return if there isn't one). - */ - - for (prevPtr = NULL, filePtr = tsdPtr->firstFileHandlerPtr; ; - prevPtr = filePtr, filePtr = filePtr->nextPtr) { - if (filePtr == NULL) { - return; - } - if (filePtr->fd == fd) { - break; - } - } - - /* - * Update the check masks for this file. - */ - - if (filePtr->mask & TCL_READABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); - } - if (filePtr->mask & TCL_WRITABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); - } - if (filePtr->mask & TCL_EXCEPTION) { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + int changeWaitingList; +#ifdef TCL_MAC_DEBUG_NOTIFIER + if(SpinLockTry(¬ifierLock)) { + Tcl_Panic("OnOffWaitingList: notifierLock unlocked"); } - - /* - * Find current max fd. - */ - - if (fd+1 == tsdPtr->numFdBits) { - tsdPtr->numFdBits = 0; - for (i = fd-1; i >= 0; i--) { - if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { - tsdPtr->numFdBits = i+1; - break; +#endif + changeWaitingList = (!onList ^ !tsdPtr->onList); + if (changeWaitingList) { + if (onList) { + tsdPtr->nextPtr = waitingListPtr; + if (waitingListPtr) { + waitingListPtr->prevPtr = tsdPtr; + } + tsdPtr->prevPtr = NULL; + waitingListPtr = tsdPtr; + tsdPtr->onList = 1; + } else { + if (tsdPtr->prevPtr) { + tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; + } else { + waitingListPtr = tsdPtr->nextPtr; } + if (tsdPtr->nextPtr) { + tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; + } + tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; + tsdPtr->onList = 0; + } + if (signalNotifier) { + write(triggerPipe, "", 1); } } - /* - * Clean up information in the callback record. - */ - - if (prevPtr == NULL) { - tsdPtr->firstFileHandlerPtr = filePtr->nextPtr; - } else { - prevPtr->nextPtr = filePtr->nextPtr; - } - ckfree((char *) filePtr); + return changeWaitingList; } /* *---------------------------------------------------------------------- * - * FileHandlerEventProc -- + * Tcl_Sleep -- * - * This function is called by Tcl_ServiceEvent when a file event reaches - * the front of the event queue. This function is responsible for - * actually handling the event by invoking the callback for the file - * handler. + * Delay execution for the specified number of milliseconds. * * Results: - * Returns 1 if the event was handled, meaning it should be removed from - * the queue. Returns 0 if the event was not handled, meaning it should - * stay on the queue. The only time the event isn't handled is if the - * TCL_FILE_EVENTS flag bit isn't set. + * None. * * Side effects: - * Whatever the file handler's callback function does. + * Time passes. * *---------------------------------------------------------------------- */ -static int -FileHandlerEventProc( - Tcl_Event *evPtr, /* Event to service. */ - int flags) /* Flags that indicate what events to handle, - * such as TCL_FILE_EVENTS. */ +void +Tcl_Sleep( + int ms) /* Number of milliseconds to sleep. */ { - int mask; - FileHandler *filePtr; - FileHandlerEvent *fileEvPtr = (FileHandlerEvent *) evPtr; - ThreadSpecificData *tsdPtr; + Tcl_Time vdelay; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - if (!(flags & TCL_FILE_EVENTS)) { - return 0; + if (ms <= 0) { + return; } /* - * Search through the file handlers to find the one whose handle matches - * the event. We do this rather than keeping a pointer to the file handler - * directly in the event, so that the handler can be deleted while the - * event is queued without leaving a dangling pointer. + * TIP #233: Scale from virtual time to real-time. */ - tsdPtr = TCL_TSD_INIT(&dataKey); - for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL; - filePtr = filePtr->nextPtr) { - if (filePtr->fd != fileEvPtr->fd) { - continue; - } + vdelay.sec = ms / 1000; + vdelay.usec = (ms % 1000) * 1000; + tclScaleTimeProcPtr(&vdelay, tclTimeClientData); - /* - * The code is tricky for two reasons: - * 1. The file handler's desired events could have changed since the - * time when the event was queued, so AND the ready mask with the - * desired mask. - * 2. The file could have been closed and re-opened since the time - * when the event was queued. This is why the ready mask is stored - * in the file handler rather than the queued event: it will be - * zeroed when a new file handler is created for the newly opened - * file. - */ - mask = filePtr->readyMask & filePtr->mask; - filePtr->readyMask = 0; - if (mask != 0) { - filePtr->proc(filePtr->clientData, mask); + if (tsdPtr->runLoop) { + CFTimeInterval waitTime; + CFRunLoopTimerRef runLoopTimer = tsdPtr->runLoopTimer; + CFAbsoluteTime nextTimerFire = 0, waitEnd, now; + SInt32 runLoopStatus; + + waitTime = vdelay.sec + 1.0e-6 * vdelay.usec; + now = CFAbsoluteTimeGetCurrent(); + waitEnd = now + waitTime; + + if (runLoopTimer) { + nextTimerFire = CFRunLoopTimerGetNextFireDate(runLoopTimer); + if (nextTimerFire < waitEnd) { + CFRunLoopTimerSetNextFireDate(runLoopTimer, now + + CF_TIMEINTERVAL_FOREVER); + } else { + runLoopTimer = NULL; + } } - break; + tsdPtr->sleeping = 1; + do { + runLoopStatus = CFRunLoopRunInMode(kCFRunLoopDefaultMode, waitTime, + FALSE); + switch (runLoopStatus) { + case kCFRunLoopRunFinished: + Tcl_Panic("Tcl_Sleep: CFRunLoop finished"); + break; + case kCFRunLoopRunStopped: + TclMacOSXNotifierDbgMsg("CFRunLoop stopped"); + waitTime = waitEnd - CFAbsoluteTimeGetCurrent(); + break; + case kCFRunLoopRunTimedOut: + waitTime = 0; + break; + } + } while (waitTime > 0); + tsdPtr->sleeping = 0; + if (runLoopTimer) { + CFRunLoopTimerSetNextFireDate(runLoopTimer, nextTimerFire); + } + } else { + struct timespec waitTime; + + waitTime.tv_sec = vdelay.sec; + waitTime.tv_nsec = vdelay.usec * 1000; + while (nanosleep(&waitTime, &waitTime)); } - return 1; } /* *---------------------------------------------------------------------- * - * Tcl_WaitForEvent -- + * TclUnixWaitForFile -- * - * This function is called by Tcl_DoOneEvent to wait for new events on - * the message queue. If the block time is 0, then Tcl_WaitForEvent just - * polls without blocking. + * This function waits synchronously for a file to become readable or + * writable, with an optional timeout. * * Results: - * Returns -1 if the select would block forever, otherwise returns 0. + * The return value is an OR'ed combination of TCL_READABLE, + * TCL_WRITABLE, and TCL_EXCEPTION, indicating the conditions that are + * present on file at the time of the return. This function will not + * return until either "timeout" milliseconds have elapsed or at least + * one of the conditions given by mask has occurred for file (a return + * value of 0 means that a timeout occurred). No normal events will be + * serviced during the execution of this function. * * Side effects: - * Queues file events that are detected by the select. + * Time passes. * *---------------------------------------------------------------------- */ int -Tcl_WaitForEvent( - const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ +TclUnixWaitForFile( + int fd, /* Handle for file on which to wait. */ + int mask, /* What to wait for: OR'ed combination of + * TCL_READABLE, TCL_WRITABLE, and + * TCL_EXCEPTION. */ + int timeout) /* Maximum amount of time to wait for one of + * the conditions in mask to occur, in + * milliseconds. A value of 0 means don't wait + * at all, and a value of -1 means wait + * forever. */ { - FileHandler *filePtr; - FileHandlerEvent *fileEvPtr; - int mask, waitForFiles; - Tcl_Time myTime, *myTimePtr; - ThreadSpecificData *tsdPtr; - - if (tclNotifierHooks.waitForEventProc) { - return tclNotifierHooks.waitForEventProc(timePtr); - } + Tcl_Time abortTime = {0, 0}, now; /* silence gcc 4 warning */ + struct timeval blockTime, *timeoutPtr; + int index, numFound, result = 0; + fd_mask bit; + fd_mask readyMasks[3*MASK_SIZE]; + fd_mask *maskp[3]; /* This array reflects the readable/writable + * conditions that were found to exist by the + * last call to select. */ - tsdPtr = TCL_TSD_INIT(&dataKey); +#define SET_BITS(var, bits) ((var) |= (bits)) +#define CLEAR_BITS(var, bits) ((var) &= ~(bits)) /* - * Set up the timeout structure. Note that if there are no events to check - * for, we return with a negative result rather than blocking forever. + * If there is a non-zero finite timeout, compute the time when we give + * up. */ - if (timePtr != NULL) { - /* - * TIP #233 (Virtualized Time). Is virtual time in effect? And do we - * actually have something to scale? If yes to both then we call the - * handler to do this scaling. - */ - - myTime.sec = timePtr->sec; - myTime.usec = timePtr->usec; - - if (myTime.sec != 0 || myTime.usec != 0) { - tclScaleTimeProcPtr(&myTime, tclTimeClientData); + if (timeout > 0) { + Tcl_GetTime(&now); + abortTime.sec = now.sec + timeout/1000; + abortTime.usec = now.usec + (timeout%1000)*1000; + if (abortTime.usec >= 1000000) { + abortTime.usec -= 1000000; + abortTime.sec += 1; } - - myTimePtr = &myTime; + timeoutPtr = &blockTime; + } else if (timeout == 0) { + timeoutPtr = &blockTime; + blockTime.tv_sec = 0; + blockTime.tv_usec = 0; } else { - myTimePtr = NULL; + timeoutPtr = NULL; } /* - * Start notifier thread if necessary. + * Initialize the ready masks and compute the mask offsets. */ - LOCK_NOTIFIER_INIT; - if (!notifierCount) { - Tcl_Panic("Tcl_WaitForEvent: notifier not initialized"); - } - if (!notifierThread) { - int result; - pthread_attr_t attr; - - pthread_attr_init(&attr); - pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); - pthread_attr_setstacksize(&attr, 60 * 1024); - result = pthread_create(¬ifierThread, &attr, - (void * (*)(void *))NotifierThreadProc, NULL); - pthread_attr_destroy(&attr); - if (result || !notifierThread) { - Tcl_Panic("Tcl_WaitForEvent: unable to start notifier thread"); - } + if (fd >= FD_SETSIZE) { + Tcl_Panic("TclWaitForFile can't handle file id %d", fd); + /* must never get here, or readyMasks overrun will occur below */ } - UNLOCK_NOTIFIER_INIT; + memset(readyMasks, 0, 3*MASK_SIZE*sizeof(fd_mask)); + index = fd / (NBBY*sizeof(fd_mask)); + bit = ((fd_mask)1) << (fd % (NBBY*sizeof(fd_mask))); /* - * Place this thread on the list of interested threads, signal the - * notifier thread, and wait for a response or a timeout. + * Loop in a mini-event loop of our own, waiting for either the file to + * become ready or a timeout to occur. */ - LOCK_NOTIFIER; - if (!tsdPtr->runLoop) { - Tcl_Panic("Tcl_WaitForEvent: CFRunLoop not initialized"); - } - waitForFiles = (tsdPtr->numFdBits > 0); - if (myTimePtr != NULL && myTimePtr->sec == 0 && myTimePtr->usec == 0) { - /* - * Cannot emulate a polling select with a polling condition variable. - * Instead, pretend to wait for files and tell the notifier thread - * what we are doing. The notifier thread makes sure it goes through - * select with its select mask in the same state as ours currently is. - * We block until that happens. - */ - - waitForFiles = 1; - tsdPtr->pollState = POLL_WANT; - myTimePtr = NULL; - } else { - tsdPtr->pollState = 0; - } + while (1) { + if (timeout > 0) { + blockTime.tv_sec = abortTime.sec - now.sec; + blockTime.tv_usec = abortTime.usec - now.usec; + if (blockTime.tv_usec < 0) { + blockTime.tv_sec -= 1; + blockTime.tv_usec += 1000000; + } + if (blockTime.tv_sec < 0) { + blockTime.tv_sec = 0; + blockTime.tv_usec = 0; + } + } - if (waitForFiles) { /* - * Add the ThreadSpecificData structure of this thread to the list of - * ThreadSpecificData structures of all threads that are waiting on - * file events. + * Set the appropriate bit in the ready masks for the fd. */ - tsdPtr->nextPtr = waitingListPtr; - if (waitingListPtr) { - waitingListPtr->prevPtr = tsdPtr; + if (mask & TCL_READABLE) { + readyMasks[index] |= bit; } - tsdPtr->prevPtr = 0; - waitingListPtr = tsdPtr; - tsdPtr->onList = 1; - - write(triggerPipe, "", 1); - } - - FD_ZERO(&(tsdPtr->readyMasks.readable)); - FD_ZERO(&(tsdPtr->readyMasks.writable)); - FD_ZERO(&(tsdPtr->readyMasks.exceptional)); - - if (!tsdPtr->eventReady) { - CFTimeInterval waitTime; - CFStringRef runLoopMode; - - if (myTimePtr == NULL) { - waitTime = 1.0e10; /* Wait forever, as per CFRunLoop.c */ - } else { - waitTime = myTimePtr->sec + 1.0e-6 * myTimePtr->usec; + if (mask & TCL_WRITABLE) { + (readyMasks+MASK_SIZE)[index] |= bit; + } + if (mask & TCL_EXCEPTION) { + (readyMasks+2*(MASK_SIZE))[index] |= bit; } /* - * If the run loop is already running (e.g. if Tcl_WaitForEvent was - * called recursively), re-run it in a custom run loop mode containing - * only the source for the notifier thread, otherwise wakeups from - * other sources added to the common run loop modes might get lost. + * Wait for the event or a timeout. */ - if ((runLoopMode = CFRunLoopCopyCurrentMode(tsdPtr->runLoop))) { - CFRelease(runLoopMode); - runLoopMode = tclEventsOnlyRunLoopMode; - } else { - runLoopMode = kCFRunLoopDefaultMode; - } - UNLOCK_NOTIFIER; - CFRunLoopRunInMode(runLoopMode, waitTime, TRUE); - LOCK_NOTIFIER; - } - tsdPtr->eventReady = 0; - - if (waitForFiles && tsdPtr->onList) { /* - * Remove the ThreadSpecificData structure of this thread from the - * waiting list. Alert the notifier thread to recompute its select - * masks; skipping this caused a hang when trying to close a pipe - * which the notifier thread was still doing a select on. + * This is needed to satisfy GCC 3.3's strict aliasing rules. */ - if (tsdPtr->prevPtr) { - tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; - } else { - waitingListPtr = tsdPtr->nextPtr; - } - if (tsdPtr->nextPtr) { - tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; - } - tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; - tsdPtr->onList = 0; - write(triggerPipe, "", 1); - } - - /* - * Queue all detected file events before returning. - */ - - for (filePtr = tsdPtr->firstFileHandlerPtr; (filePtr != NULL); - filePtr = filePtr->nextPtr) { - mask = 0; - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.readable))) { - mask |= TCL_READABLE; - } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.writable))) { - mask |= TCL_WRITABLE; + maskp[0] = &readyMasks[0]; + maskp[1] = &readyMasks[MASK_SIZE]; + maskp[2] = &readyMasks[2*MASK_SIZE]; + numFound = select(fd+1, (SELECT_MASK *) maskp[0], + (SELECT_MASK *) maskp[1], + (SELECT_MASK *) maskp[2], timeoutPtr); + if (numFound == 1) { + if (readyMasks[index] & bit) { + SET_BITS(result, TCL_READABLE); + } + if ((readyMasks+MASK_SIZE)[index] & bit) { + SET_BITS(result, TCL_WRITABLE); + } + if ((readyMasks+2*(MASK_SIZE))[index] & bit) { + SET_BITS(result, TCL_EXCEPTION); + } + result &= mask; + if (result) { + break; + } } - if (FD_ISSET(filePtr->fd, &(tsdPtr->readyMasks.exceptional))) { - mask |= TCL_EXCEPTION; + if (timeout == 0) { + break; } - - if (!mask) { + if (timeout < 0) { continue; } /* - * Don't bother to queue an event if the mask was previously non-zero - * since an event must still be on the queue. + * The select returned early, so we need to recompute the timeout. */ - if (filePtr->readyMask == 0) { - fileEvPtr = (FileHandlerEvent *) - ckalloc(sizeof(FileHandlerEvent)); - fileEvPtr->header.proc = FileHandlerEventProc; - fileEvPtr->fd = filePtr->fd; - Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); + Tcl_GetTime(&now); + if ((abortTime.sec < now.sec) + || (abortTime.sec==now.sec && abortTime.usec<=now.usec)) { + break; } - filePtr->readyMask = mask; } - UNLOCK_NOTIFIER; - return 0; + return result; } /* @@ -1136,11 +1713,8 @@ NotifierThreadProc( ClientData clientData) /* Not used. */ { ThreadSpecificData *tsdPtr; - fd_set readableMask; - fd_set writableMask; - fd_set exceptionalMask; - int i, numFdBits = 0; - long found; + fd_set readableMask, writableMask, exceptionalMask; + int i, numFdBits = 0, polling; struct timeval poll = {0., 0.}, *timePtr; char buf[2]; @@ -1158,9 +1732,10 @@ NotifierThreadProc( * notifiers. */ - LOCK_NOTIFIER; timePtr = NULL; + LOCK_NOTIFIER; for (tsdPtr = waitingListPtr; tsdPtr; tsdPtr = tsdPtr->nextPtr) { + LOCK_NOTIFIER_TSD; for (i = tsdPtr->numFdBits-1; i >= 0; --i) { if (FD_ISSET(i, &(tsdPtr->checkMasks.readable))) { FD_SET(i, &readableMask); @@ -1175,13 +1750,9 @@ NotifierThreadProc( if (tsdPtr->numFdBits > numFdBits) { numFdBits = tsdPtr->numFdBits; } - if (tsdPtr->pollState & POLL_WANT) { - /* - * Here we make sure we go through select() with the same mask - * bits that were present when the thread tried to poll. - */ - - tsdPtr->pollState |= POLL_DONE; + polling = tsdPtr->polling; + UNLOCK_NOTIFIER_TSD; + if ((tsdPtr->polled = polling)) { timePtr = &poll; } } @@ -1211,48 +1782,53 @@ NotifierThreadProc( LOCK_NOTIFIER; for (tsdPtr = waitingListPtr; tsdPtr; tsdPtr = tsdPtr->nextPtr) { - found = 0; + int found = 0; + SelectMasks readyMasks, checkMasks; + + LOCK_NOTIFIER_TSD; + FD_COPY(&(tsdPtr->checkMasks.readable), &checkMasks.readable); + FD_COPY(&(tsdPtr->checkMasks.writable), &checkMasks.writable); + FD_COPY(&(tsdPtr->checkMasks.exceptional), &checkMasks.exceptional); + UNLOCK_NOTIFIER_TSD; + found = tsdPtr->polled; + FD_ZERO(&readyMasks.readable); + FD_ZERO(&readyMasks.writable); + FD_ZERO(&readyMasks.exceptional); for (i = tsdPtr->numFdBits-1; i >= 0; --i) { - if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) + if (FD_ISSET(i, &checkMasks.readable) && FD_ISSET(i, &readableMask)) { - FD_SET(i, &(tsdPtr->readyMasks.readable)); + FD_SET(i, &readyMasks.readable); found = 1; } - if (FD_ISSET(i, &(tsdPtr->checkMasks.writable)) + if (FD_ISSET(i, &checkMasks.writable) && FD_ISSET(i, &writableMask)) { - FD_SET(i, &(tsdPtr->readyMasks.writable)); + FD_SET(i, &readyMasks.writable); found = 1; } - if (FD_ISSET(i, &(tsdPtr->checkMasks.exceptional)) + if (FD_ISSET(i, &checkMasks.exceptional) && FD_ISSET(i, &exceptionalMask)) { - FD_SET(i, &(tsdPtr->readyMasks.exceptional)); + FD_SET(i, &readyMasks.exceptional); found = 1; } } - if (found || (tsdPtr->pollState & POLL_DONE)) { - tsdPtr->eventReady = 1; - if (tsdPtr->onList) { - /* - * Remove the ThreadSpecificData structure of this thread - * from the waiting list. This prevents us from spinning - * continuously on select until the other threads runs and - * services the file event. - */ - - if (tsdPtr->prevPtr) { - tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; - } else { - waitingListPtr = tsdPtr->nextPtr; - } - if (tsdPtr->nextPtr) { - tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; - } - tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; - tsdPtr->onList = 0; - tsdPtr->pollState = 0; - } + if (found) { + /* + * Remove the ThreadSpecificData structure of this thread from + * the waiting list. This prevents us from spinning + * continuously on select until the other threads runs and + * services the file event. + */ + + OnOffWaitingList(tsdPtr, 0, 0); + + LOCK_NOTIFIER_TSD; + FD_COPY(&readyMasks.readable, &(tsdPtr->readyMasks.readable)); + FD_COPY(&readyMasks.writable, &(tsdPtr->readyMasks.writable)); + FD_COPY(&readyMasks.exceptional, &(tsdPtr->readyMasks.exceptional)); + UNLOCK_NOTIFIER_TSD; + tsdPtr->polled = 0; if (tsdPtr->runLoop) { CFRunLoopSourceSignal(tsdPtr->runLoopSource); CFRunLoopWakeUp(tsdPtr->runLoop); @@ -1304,8 +1880,11 @@ NotifierThreadProc( static void AtForkPrepare(void) { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + LOCK_NOTIFIER_INIT; LOCK_NOTIFIER; + LOCK_NOTIFIER_TSD; } /* @@ -1327,6 +1906,9 @@ AtForkPrepare(void) static void AtForkParent(void) { + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + + UNLOCK_NOTIFIER_TSD; UNLOCK_NOTIFIER; UNLOCK_NOTIFIER_INIT; } @@ -1352,18 +1934,25 @@ AtForkChild(void) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + UNLOCK_NOTIFIER_TSD; UNLOCK_NOTIFIER; UNLOCK_NOTIFIER_INIT; if (tsdPtr->runLoop) { tsdPtr->runLoop = NULL; if (!noCFafterFork) { CFRunLoopSourceInvalidate(tsdPtr->runLoopSource); + CFRelease(tsdPtr->runLoopSource); + if (tsdPtr->runLoopTimer) { + CFRunLoopTimerInvalidate(tsdPtr->runLoopTimer); + CFRelease(tsdPtr->runLoopTimer); + } } - CFRelease(tsdPtr->runLoopSource); tsdPtr->runLoopSource = NULL; + tsdPtr->runLoopTimer = NULL; } if (notifierCount > 0) { - notifierCount = 0; + notifierCount = 1; + notifierThreadRunning = 0; /* * Assume that the return value of Tcl_InitNotifier in the child will @@ -1381,6 +1970,16 @@ AtForkChild(void) } #endif /* HAVE_PTHREAD_ATFORK */ +#else /* HAVE_COREFOUNDATION */ + +void +TclMacOSXNotifierAddRunLoopMode( + CONST void *runLoopMode) +{ + Tcl_Panic("TclMacOSXNotifierAddRunLoopMode: " + "Tcl not built with CoreFoundation support"); +} + #endif /* HAVE_COREFOUNDATION */ /* diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 51781c0..18faa99 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.97 2008/12/18 01:14:16 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.98 2009/04/10 18:02:37 das Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -3012,6 +3012,8 @@ Tcl_GetOpenFile( return TCL_ERROR; } +#ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is + * in tclMacOSXNotify.c */ /* *---------------------------------------------------------------------- * @@ -3171,6 +3173,7 @@ TclUnixWaitForFile( } return result; } +#endif /* HAVE_COREFOUNDATION */ /* *---------------------------------------------------------------------- diff --git a/unix/tclUnixEvent.c b/unix/tclUnixEvent.c index a5edb3a..b49c4bf 100644 --- a/unix/tclUnixEvent.c +++ b/unix/tclUnixEvent.c @@ -8,10 +8,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixEvent.c,v 1.10 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixEvent.c,v 1.11 2009/04/10 18:02:37 das Exp $ */ #include "tclInt.h" +#ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is + * in tclMacOSXNotify.c */ /* *---------------------------------------------------------------------- @@ -85,6 +87,7 @@ Tcl_Sleep( } } +#endif /* HAVE_COREFOUNDATION */ /* * Local Variables: * mode: c diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 434ae84..edcd884 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.38 2008/12/12 16:07:18 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.39 2009/04/10 18:02:37 das Exp $ */ #include "tclInt.h" @@ -135,7 +135,7 @@ static ThreadSpecificData *waitingListPtr = NULL; * pipe. Hence writing to this file descriptor will cause the select() system * call to return and wake up the notifier thread. * - * You must hold the notifierMutex lock before accessing this list. + * You must hold the notifierMutex lock before writing to the pipe. */ static int triggerPipe = -1; @@ -552,15 +552,17 @@ Tcl_DeleteFileHandler( */ if (fd+1 == tsdPtr->numFdBits) { - tsdPtr->numFdBits = 0; + int numFdBits = 0; + for (i = fd-1; i >= 0; i--) { if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { - tsdPtr->numFdBits = i+1; + numFdBits = i+1; break; } } + tsdPtr->numFdBits = numFdBits; } /* @@ -677,10 +679,9 @@ Tcl_WaitForEvent( FileHandler *filePtr; FileHandlerEvent *fileEvPtr; int mask; - Tcl_Time myTime; + Tcl_Time vTime; #ifdef TCL_THREADS int waitForFiles; - Tcl_Time *myTimePtr; #else /* * Impl. notes: timeout & timeoutPtr are used if, and only if threads @@ -706,22 +707,15 @@ Tcl_WaitForEvent( * the handler to do this scaling. */ - myTime.sec = timePtr->sec; - myTime.usec = timePtr->usec; - - if (myTime.sec != 0 || myTime.usec != 0) { - tclScaleTimeProcPtr(&myTime, tclTimeClientData); + if (timePtr->sec != 0 || timePtr->usec != 0) { + vTime = *timePtr; + tclScaleTimeProcPtr(&vTime, tclTimeClientData); + timePtr = &vTime; } - -#ifdef TCL_THREADS - myTimePtr = &myTime; -#else - timeout.tv_sec = myTime.sec; - timeout.tv_usec = myTime.usec; - timeoutPtr = &timeout; -#endif /* TCL_THREADS */ - #ifndef TCL_THREADS + timeout.tv_sec = timePtr->sec; + timeout.tv_usec = timePtr->usec; + timeoutPtr = &timeout; } else if (tsdPtr->numFdBits == 0) { /* * If there are no threads, no timeout, and no fds registered, then @@ -732,11 +726,7 @@ Tcl_WaitForEvent( */ return -1; -#endif /* !TCL_THREADS */ } else { -#ifdef TCL_THREADS - myTimePtr = NULL; -#else timeoutPtr = NULL; #endif /* TCL_THREADS */ } @@ -749,8 +739,7 @@ Tcl_WaitForEvent( Tcl_MutexLock(¬ifierMutex); - waitForFiles = (tsdPtr->numFdBits > 0); - if (myTimePtr != NULL && myTimePtr->sec == 0 && (myTimePtr->usec == 0 + if (timePtr != NULL && timePtr->sec == 0 && (timePtr->usec == 0 #if defined(__APPLE__) && defined(__LP64__) /* * On 64-bit Darwin, pthread_cond_timedwait() appears to have a @@ -759,7 +748,7 @@ Tcl_WaitForEvent( * a workaround, when given a very brief timeout, just do a * poll. [Bug 1457797] */ - || myTimePtr->usec < 10 + || timePtr->usec < 10 #endif )) { /* @@ -772,8 +761,9 @@ Tcl_WaitForEvent( waitForFiles = 1; tsdPtr->pollState = POLL_WANT; - myTimePtr = NULL; + timePtr = NULL; } else { + waitForFiles = (tsdPtr->numFdBits > 0); tsdPtr->pollState = 0; } @@ -800,7 +790,7 @@ Tcl_WaitForEvent( FD_ZERO(&(tsdPtr->readyMasks.exceptional)); if (!tsdPtr->eventReady) { - Tcl_ConditionWait(&tsdPtr->waitCV, ¬ifierMutex, myTimePtr); + Tcl_ConditionWait(&tsdPtr->waitCV, ¬ifierMutex, timePtr); } tsdPtr->eventReady = 0; -- cgit v0.12 From da81669adaca006923b1f2f0bbd2dc1c7e9ebf94 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 18:04:25 +0000 Subject: typo --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 393c38c..4c7f01b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2008-04-10 Daniel Steffen * macosx/tclMacOSXNotify.c: revise CoreFoundation notifier to allow - * unix/tclUnixChan.c: embedding into applications that - * unix/tclUnixEvent.c: already have a CFRunLoop running and + embedding into applications that + already have a CFRunLoop running and want to run the tcl event loop via Tcl_ServiceModeHook(TCL_SERVICE_ALL). -- cgit v0.12 From a9bb49b48e59b917e2493b99426057fdf9484e35 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 18:10:39 +0000 Subject: * unix/tclLoadDyld.c: use RTLD_GLOBAL instead of RTLD_LOCAL. [Bug 1961211] --- ChangeLog | 3 +++ unix/tclLoadDyld.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c7f01b..77cf1d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-04-10 Daniel Steffen + * unix/tclLoadDyld.c: use RTLD_GLOBAL instead of RTLD_LOCAL. + [Bug 1961211] + * macosx/tclMacOSXNotify.c: revise CoreFoundation notifier to allow embedding into applications that already have a CFRunLoop running and diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index e30742b..5e330c8 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.31 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.32 2009/04/10 18:10:39 das Exp $ */ #include "tclInt.h" @@ -198,7 +198,7 @@ TclpDlopen( if (tclMacOSXDarwinRelease >= 8) #endif { - dlHandle = dlopen(nativePath, RTLD_NOW | RTLD_LOCAL); + dlHandle = dlopen(nativePath, RTLD_NOW | RTLD_GLOBAL); if (!dlHandle) { /* * Let the OS loader examine the binary search path for whatever @@ -208,7 +208,7 @@ TclpDlopen( fileName = Tcl_GetString(pathPtr); nativeFileName = Tcl_UtfToExternalDString(NULL, fileName, -1, &ds); - dlHandle = dlopen(nativeFileName, RTLD_NOW | RTLD_LOCAL); + dlHandle = dlopen(nativeFileName, RTLD_NOW | RTLD_GLOBAL); } if (dlHandle) { TclLoadDbgMsg("dlopen() successful"); -- cgit v0.12 From bd0c824cbd2ddcd1696ab853ba64a33290bd62da Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 20:46:01 +0000 Subject: * unix/tclUnixChan.c: TclUnixWaitForFile(): use FD_* macros * macosx/tclMacOSXNotify.c: to manipulate select masks (Cassoff). [Bug 1960647] --- ChangeLog | 4 +++ macosx/tclMacOSXNotify.c | 65 +++++++++++++++++++++++------------------------- unix/tclUnixChan.c | 63 ++++++++++++++++++++++------------------------ 3 files changed, 65 insertions(+), 67 deletions(-) diff --git a/ChangeLog b/ChangeLog index 77cf1d9..b733402 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-04-10 Daniel Steffen + * unix/tclUnixChan.c: TclUnixWaitForFile(): use FD_* macros + * macosx/tclMacOSXNotify.c: to manipulate select masks (Cassoff). + [Bug 1960647] + * unix/tclLoadDyld.c: use RTLD_GLOBAL instead of RTLD_LOCAL. [Bug 1961211] diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index e3e619c..b627321 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.23 2009/04/10 18:02:37 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.24 2009/04/10 20:46:01 das Exp $ */ #include "tclInt.h" @@ -1558,16 +1558,25 @@ TclUnixWaitForFile( { Tcl_Time abortTime = {0, 0}, now; /* silence gcc 4 warning */ struct timeval blockTime, *timeoutPtr; - int index, numFound, result = 0; - fd_mask bit; - fd_mask readyMasks[3*MASK_SIZE]; - fd_mask *maskp[3]; /* This array reflects the readable/writable - * conditions that were found to exist by the - * last call to select. */ + int numFound, result = 0; + fd_set readableMask; + fd_set writableMask; + fd_set exceptionalMask; #define SET_BITS(var, bits) ((var) |= (bits)) #define CLEAR_BITS(var, bits) ((var) &= ~(bits)) +#ifndef _DARWIN_C_SOURCE + /* + * Sanity check fd. + */ + + if (fd >= FD_SETSIZE) { + Tcl_Panic("TclUnixWaitForFile can't handle file id %d", fd); + /* must never get here, or select masks overrun will occur below */ + } +#endif + /* * If there is a non-zero finite timeout, compute the time when we give * up. @@ -1591,16 +1600,12 @@ TclUnixWaitForFile( } /* - * Initialize the ready masks and compute the mask offsets. + * Initialize the select masks. */ - if (fd >= FD_SETSIZE) { - Tcl_Panic("TclWaitForFile can't handle file id %d", fd); - /* must never get here, or readyMasks overrun will occur below */ - } - memset(readyMasks, 0, 3*MASK_SIZE*sizeof(fd_mask)); - index = fd / (NBBY*sizeof(fd_mask)); - bit = ((fd_mask)1) << (fd % (NBBY*sizeof(fd_mask))); + FD_ZERO(&readableMask); + FD_ZERO(&writableMask); + FD_ZERO(&exceptionalMask); /* * Loop in a mini-event loop of our own, waiting for either the file to @@ -1622,41 +1627,33 @@ TclUnixWaitForFile( } /* - * Set the appropriate bit in the ready masks for the fd. + * Setup the select masks for the fd. */ - if (mask & TCL_READABLE) { - readyMasks[index] |= bit; + if (mask & TCL_READABLE) { + FD_SET(fd, &readableMask); } - if (mask & TCL_WRITABLE) { - (readyMasks+MASK_SIZE)[index] |= bit; + if (mask & TCL_WRITABLE) { + FD_SET(fd, &writableMask); } if (mask & TCL_EXCEPTION) { - (readyMasks+2*(MASK_SIZE))[index] |= bit; + FD_SET(fd, &exceptionalMask); } /* * Wait for the event or a timeout. */ - /* - * This is needed to satisfy GCC 3.3's strict aliasing rules. - */ - - maskp[0] = &readyMasks[0]; - maskp[1] = &readyMasks[MASK_SIZE]; - maskp[2] = &readyMasks[2*MASK_SIZE]; - numFound = select(fd+1, (SELECT_MASK *) maskp[0], - (SELECT_MASK *) maskp[1], - (SELECT_MASK *) maskp[2], timeoutPtr); + numFound = select(fd + 1, &readableMask, &writableMask, + &exceptionalMask, timeoutPtr); if (numFound == 1) { - if (readyMasks[index] & bit) { + if (FD_ISSET(fd, &readableMask)) { SET_BITS(result, TCL_READABLE); } - if ((readyMasks+MASK_SIZE)[index] & bit) { + if (FD_ISSET(fd, &writableMask)) { SET_BITS(result, TCL_WRITABLE); } - if ((readyMasks+2*(MASK_SIZE))[index] & bit) { + if (FD_ISSET(fd, &exceptionalMask)) { SET_BITS(result, TCL_EXCEPTION); } result &= mask; diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 18faa99..47cba16 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.98 2009/04/10 18:02:37 das Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.99 2009/04/10 20:46:01 das Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -3052,11 +3052,20 @@ TclUnixWaitForFile( Tcl_Time abortTime = {0, 0}, now; /* silence gcc 4 warning */ struct timeval blockTime, *timeoutPtr; int index, numFound, result = 0; - fd_mask bit; - fd_mask readyMasks[3*MASK_SIZE]; - fd_mask *maskp[3]; /* This array reflects the readable/writable - * conditions that were found to exist by the - * last call to select. */ + fd_set readableMask; + fd_set writableMask; + fd_set exceptionalMask; + +#ifndef _DARWIN_C_SOURCE + /* + * Sanity check fd. + */ + + if (fd >= FD_SETSIZE) { + Tcl_Panic("TclUnixWaitForFile can't handle file id %d", fd); + /* must never get here, or select masks overrun will occur below */ + } +#endif /* * If there is a non-zero finite timeout, compute the time when we give @@ -3081,16 +3090,12 @@ TclUnixWaitForFile( } /* - * Initialize the ready masks and compute the mask offsets. + * Initialize the select masks. */ - if (fd >= FD_SETSIZE) { - Tcl_Panic("TclWaitForFile can't handle file id %d", fd); - /* must never get here, or readyMasks overrun will occur below */ - } - memset(readyMasks, 0, 3*MASK_SIZE*sizeof(fd_mask)); - index = fd / (NBBY*sizeof(fd_mask)); - bit = ((fd_mask)1) << (fd % (NBBY*sizeof(fd_mask))); + FD_ZERO(&readableMask); + FD_ZERO(&writableMask); + FD_ZERO(&exceptionalMask); /* * Loop in a mini-event loop of our own, waiting for either the file to @@ -3112,41 +3117,33 @@ TclUnixWaitForFile( } /* - * Set the appropriate bit in the ready masks for the fd. + * Setup the select masks for the fd. */ - if (mask & TCL_READABLE) { - readyMasks[index] |= bit; + if (mask & TCL_READABLE) { + FD_SET(fd, &readableMask); } - if (mask & TCL_WRITABLE) { - (readyMasks+MASK_SIZE)[index] |= bit; + if (mask & TCL_WRITABLE) { + FD_SET(fd, &writableMask); } if (mask & TCL_EXCEPTION) { - (readyMasks+2*(MASK_SIZE))[index] |= bit; + FD_SET(fd, &exceptionalMask); } /* * Wait for the event or a timeout. */ - /* - * This is needed to satisfy GCC 3.3's strict aliasing rules. - */ - - maskp[0] = &readyMasks[0]; - maskp[1] = &readyMasks[MASK_SIZE]; - maskp[2] = &readyMasks[2*MASK_SIZE]; - numFound = select(fd+1, (SELECT_MASK *) maskp[0], - (SELECT_MASK *) maskp[1], - (SELECT_MASK *) maskp[2], timeoutPtr); + numFound = select(fd + 1, &readableMask, &writableMask, + &exceptionalMask, timeoutPtr); if (numFound == 1) { - if (readyMasks[index] & bit) { + if (FD_ISSET(fd, &readableMask)) { SET_BITS(result, TCL_READABLE); } - if ((readyMasks+MASK_SIZE)[index] & bit) { + if (FD_ISSET(fd, &writableMask)) { SET_BITS(result, TCL_WRITABLE); } - if ((readyMasks+2*(MASK_SIZE))[index] & bit) { + if (FD_ISSET(fd, &exceptionalMask)) { SET_BITS(result, TCL_EXCEPTION); } result &= mask; -- cgit v0.12 From bd47c76800ec6de95366210adcfdd88bbf238bc3 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 10 Apr 2009 21:40:55 +0000 Subject: Remove unused variable (compiler warning) --- unix/tclUnixChan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 47cba16..29da9e4 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.99 2009/04/10 20:46:01 das Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.100 2009/04/10 21:40:55 dgp Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -3051,7 +3051,7 @@ TclUnixWaitForFile( { Tcl_Time abortTime = {0, 0}, now; /* silence gcc 4 warning */ struct timeval blockTime, *timeoutPtr; - int index, numFound, result = 0; + int numFound, result = 0; fd_set readableMask; fd_set writableMask; fd_set exceptionalMask; -- cgit v0.12 From b59a745f0fe91d48ec355193d4161fef4f6807bd Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 10 Apr 2009 21:50:12 +0000 Subject: Forgot to add changelog for http commit --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index b733402..a17f130 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-10 Pat Thoyts + + * library/http/http.tcl: Improved HTTP/1.1 support and added + * library/http/pkgIndex.tcl: specific HTTP/1.1 testing to ensure + * tests/http11.test: we handle chunked+gzip for the various + * tests/httpd11.test: modes (normal, -channel and -handler) + * makefiles: package version set to 2.8.0 + 2008-04-10 Daniel Steffen * unix/tclUnixChan.c: TclUnixWaitForFile(): use FD_* macros -- cgit v0.12 From 2574ae420c67a14ba926853a6ac2a5d6828222a6 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 10 Apr 2009 22:53:27 +0000 Subject: fix warning --- macosx/tclMacOSXNotify.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index b627321..cd4d4f2 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.24 2009/04/10 20:46:01 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.25 2009/04/10 22:53:27 das Exp $ */ #include "tclInt.h" @@ -1372,6 +1372,8 @@ UpdateWaitingListAndServiceEvents( while (Tcl_ServiceAll() && tsdPtr->waitTime == 0) {} } break; + default: + break; } } -- cgit v0.12 From e77f7f0935b2ac4f3f02ec972fc4d14366f880c3 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 11 Apr 2009 00:22:13 +0000 Subject: D'oh --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a17f130..36ac90a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,7 @@ * tests/httpd11.test: modes (normal, -channel and -handler) * makefiles: package version set to 2.8.0 -2008-04-10 Daniel Steffen +2009-04-10 Daniel Steffen * unix/tclUnixChan.c: TclUnixWaitForFile(): use FD_* macros * macosx/tclMacOSXNotify.c: to manipulate select masks (Cassoff). -- cgit v0.12 From 82bda7f2081c47a741b7e6217cf061137fd35219 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 11 Apr 2009 11:18:51 +0000 Subject: Clarify the rules for resolution of what forwarded methods forward to. --- ChangeLog | 8 +++++ doc/define.n | 32 ++++++++++-------- generic/tclOOInt.h | 16 ++++++--- generic/tclOOMethod.c | 18 ++++++++-- tests/oo.test | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 146 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36ac90a..0b4bf6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-11 Donal K. Fellows + + * generic/tclOOMethod.c (InvokeForwardMethod): Clarify the resolution + behaviour of the name of the command that is forwarded to: it's now + resolved using the object's namespace as context, which is much more + useful than the previous (somewhat random) behaviour of using the + caller's current namespace. + 2009-04-10 Pat Thoyts * library/http/http.tcl: Improved HTTP/1.1 support and added diff --git a/doc/define.n b/doc/define.n index ddbf476..e3f2e39 100644 --- a/doc/define.n +++ b/doc/define.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: define.n,v 1.2 2008/09/23 05:05:47 dkf Exp $ +'\" RCS: @(#) $Id: define.n,v 1.3 2009/04/11 11:18:51 dkf Exp $ '\" .so man.macros .TH define n 0.3 TclOO "TclOO Commands" @@ -94,23 +94,27 @@ arguments are present, the list of filter names is set to empty. .TP \fBforward\fI name cmdName \fR?\fIarg ...\fR? . -This creates or updates a forwarded method called \fIname\fR. The method -is defined be forwarded to the command called \fIcmdName\fR, with additional +This creates or updates a forwarded method called \fIname\fR. The method is +defined be forwarded to the command called \fIcmdName\fR, with additional arguments, \fIarg\fR etc., added before those arguments specified by the -caller of the method. Forwarded methods should be deleted using the -\fBmethod\fR subcommand. The method will be exported if \fIname\fR starts with -a lower-case letter, and non-exported otherwise. +caller of the method. The \fIcmdName\fR will always be resolved using the +rules of the invoking objects' namespaces, i.e., when \fIcmdName\fR is not +fully-qualified, the command will be searched for in each object's namespace, +using the instances' namespace's path, or by looking in the global namespace. +The method will be exported if \fIname\fR starts with a lower-case letter, and +non-exported otherwise. .TP \fBmethod\fI name argList bodyScript\fR . -This creates, updates or deletes a method. The name of the method is -\fIname\fR, the formal arguments to the method (defined using the same format -as for the Tcl \fBproc\fR command) will be \fIargList\fR, and the body of the -method will be \fIbodyScript\fR. When the body of the method is evaluated, the -current namespace of the method will be a namespace that is unique to the -current object. The method will be exported if \fIname\fR starts with a -lower-case letter, and non-exported otherwise; this behavior can be overridden -via \fBexport\fR and \fBunexport\fR. +This creates or updates a method that is implemented as a procedure-like +script. The name of the method is \fIname\fR, the formal arguments to the +method (defined using the same format as for the Tcl \fBproc\fR command) will +be \fIargList\fR, and the body of the method will be \fIbodyScript\fR. When +the body of the method is evaluated, the current namespace of the method will +be a namespace that is unique to the current object. The method will be +exported if \fIname\fR starts with a lower-case letter, and non-exported +otherwise; this behavior can be overridden via \fBexport\fR and +\fBunexport\fR. .TP \fBmixin\fR ?\fIclassName ...\fR? . diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 3221fcc..1579ddb 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.10 2008/10/31 22:08:32 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.11 2009/04/11 11:18:51 dkf Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -117,13 +117,19 @@ typedef struct ProcedureMethod { #define USE_DECLARER_NS 0x80 /* - * Forwarded methods have the following extra information. It is a - * single-field structure because this allows for future expansion without - * changing vast amounts of code. + * Forwarded methods have the following extra information. */ typedef struct ForwardMethod { - Tcl_Obj *prefixObj; + Tcl_Obj *prefixObj; /* The list of values to use to replace the + * object and method name with. Will be a + * non-empty list. */ + int fullyQualified; /* If 1, the command name is fully qualified + * and we should let the default Tcl mechanism + * handle the command lookup because it is + * more efficient. If 0, we need to do a + * specialized lookup based on the current + * object's namespace. */ } ForwardMethod; /* diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 2606f0a..3422660 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.21 2008/12/02 19:40:41 dgp Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.22 2009/04/11 11:18:51 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1316,6 +1316,7 @@ TclOONewForwardInstanceMethod( { int prefixLen; register ForwardMethod *fmPtr; + Tcl_Obj *cmdObj; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; @@ -1328,6 +1329,8 @@ TclOONewForwardInstanceMethod( fmPtr = (ForwardMethod *) ckalloc(sizeof(ForwardMethod)); fmPtr->prefixObj = prefixObj; + Tcl_ListObjIndex(interp, prefixObj, 0, &cmdObj); + fmPtr->fullyQualified = (strncmp(TclGetString(cmdObj), "::", 2) == 0); Tcl_IncrRefCount(prefixObj); return (Method *) Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, nameObj, flags, &fwdMethodType, fmPtr); @@ -1354,6 +1357,7 @@ TclOONewForwardMethod( { int prefixLen; register ForwardMethod *fmPtr; + Tcl_Obj *cmdObj; if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) { return NULL; @@ -1366,6 +1370,8 @@ TclOONewForwardMethod( fmPtr = (ForwardMethod *) ckalloc(sizeof(ForwardMethod)); fmPtr->prefixObj = prefixObj; + Tcl_ListObjIndex(interp, prefixObj, 0, &cmdObj); + fmPtr->fullyQualified = (strncmp(TclGetString(cmdObj), "::", 2) == 0); Tcl_IncrRefCount(prefixObj); return (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr, nameObj, flags, &fwdMethodType, fmPtr); @@ -1394,6 +1400,7 @@ InvokeForwardMethod( ForwardMethod *fmPtr = clientData; Tcl_Obj **argObjs, **prefixObjs; int numPrefixes, len, skip = contextPtr->skip; + Command *cmdPtr; /* * Build the real list of arguments to use. Note that we know that the @@ -1406,8 +1413,14 @@ InvokeForwardMethod( argObjs = InitEnsembleRewrite(interp, objc, objv, skip, numPrefixes, prefixObjs, &len); + if (fmPtr->fullyQualified) { + cmdPtr = NULL; + } else { + cmdPtr = (Command *) Tcl_FindCommand(interp, TclGetString(argObjs[0]), + contextPtr->oPtr->namespacePtr, 0 /* normal lookup */); + } Tcl_NRAddCallback(interp, FinalizeForwardCall, argObjs, NULL, NULL, NULL); - return Tcl_NREvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE); + return TclNREvalObjv(interp, len, argObjs, TCL_EVAL_INVOKE, cmdPtr); } static int @@ -1452,6 +1465,7 @@ CloneForwardMethod( ForwardMethod *fm2Ptr = (ForwardMethod *) ckalloc(sizeof(ForwardMethod)); fm2Ptr->prefixObj = fmPtr->prefixObj; + fm2Ptr->fullyQualified = fmPtr->fullyQualified; Tcl_IncrRefCount(fm2Ptr->prefixObj); *newClientData = fm2Ptr; return TCL_OK; diff --git a/tests/oo.test b/tests/oo.test index 6c3187b..6b81f37 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.24 2009/03/24 10:46:04 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.25 2009/04/11 11:18:51 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -448,6 +448,98 @@ test oo-6.1 {OO: forward} { foo destroy return $result } {1 2} +test oo-6.2 {OO: forward resolution scope} -setup { + oo::class create fooClass +} -body { + proc foo {} {return bad} + oo::define fooClass { + constructor {} { + proc foo {} {return good} + } + forward bar foo + } + [fooClass new] bar +} -cleanup { + fooClass destroy + rename foo {} +} -result good +test oo-6.3 {OO: forward resolution scope} -setup { + oo::class create fooClass +} -body { + proc foo {} {return bad} + oo::define fooClass { + constructor {} { + proc foo {} {return good} + } + } + oo::define fooClass forward bar foo + [fooClass new] bar +} -cleanup { + fooClass destroy + rename foo {} +} -result good +test oo-6.4 {OO: forward resolution scope} -setup { + oo::class create fooClass +} -body { + proc foo {} {return good} + oo::define fooClass { + constructor {} { + proc foo {} {return bad} + } + forward bar ::foo + } + [fooClass new] bar +} -cleanup { + fooClass destroy + rename foo {} +} -result good +test oo-6.5 {OO: forward resolution scope} -setup { + oo::class create fooClass + namespace eval foo {} +} -body { + proc foo::foo {} {return good} + oo::define fooClass { + constructor {} { + proc foo {} {return bad} + } + forward bar foo::foo + } + [fooClass new] bar +} -cleanup { + fooClass destroy + namespace delete foo +} -result good +test oo-6.6 {OO: forward resolution scope} -setup { + oo::class create fooClass + namespace eval foo {} +} -body { + proc foo::foo {} {return bad} + oo::define fooClass { + constructor {} { + namespace eval foo { + proc foo {} {return good} + } + } + forward bar foo::foo + } + [fooClass new] bar +} -cleanup { + fooClass destroy + namespace delete foo +} -result good +test oo-6.7 {OO: forward resolution scope is per-object} -setup { + oo::class create fooClass +} -body { + oo::define fooClass { + constructor {} { + proc curns {} {namespace current} + } + forward ns curns + } + expr {[[fooClass new] ns] ne [[fooClass new] ns]} +} -cleanup { + fooClass destroy +} -result 1 test oo-7.1 {OO: inheritance 101} -setup { oo::class create superClass -- cgit v0.12 From b630130bc2b72f3d70ffb638097e767dc723036d Mon Sep 17 00:00:00 2001 From: das Date: Tue, 14 Apr 2009 00:55:31 +0000 Subject: update Apple copyright notice for 2009-04-10 changes --- macosx/Tcl-Info.plist.in | 8 ++++---- macosx/Tclsh-Info.plist.in | 8 ++++---- macosx/tclMacOSXBundle.c | 44 +++----------------------------------------- macosx/tclMacOSXNotify.c | 4 ++-- 4 files changed, 13 insertions(+), 51 deletions(-) diff --git a/macosx/Tcl-Info.plist.in b/macosx/Tcl-Info.plist.in index 0c82343..431b0a9 100644 --- a/macosx/Tcl-Info.plist.in +++ b/macosx/Tcl-Info.plist.in @@ -6,7 +6,7 @@ See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - RCS: @(#) $Id: Tcl-Info.plist.in,v 1.2 2007/04/23 20:46:13 das Exp $ + RCS: @(#) $Id: Tcl-Info.plist.in,v 1.3 2009/04/14 00:55:31 das Exp $ --> @@ -16,10 +16,10 @@ @TCL_LIB_FILE@ CFBundleGetInfoString Tcl @TCL_VERSION@@TCL_PATCH_LEVEL@, -Copyright © @TCL_YEAR@ Tcl Core Team, +Copyright © 1987-@TCL_YEAR@ Tcl Core Team, Copyright © 2001-@TCL_YEAR@ Daniel A. Steffen, -Initial MacOS X Port by Jim Ingham & Ian Reid, -Copyright © 2001-2002, Apple Computer, Inc. +Copyright © 2001-2009 Apple Inc., +Copyright © 2001-2002 Jim Ingham & Ian Reid
CFBundleIdentifier com.tcltk.tcllibrary CFBundleInfoDictionaryVersion diff --git a/macosx/Tclsh-Info.plist.in b/macosx/Tclsh-Info.plist.in index bf2333a..ef2711d 100644 --- a/macosx/Tclsh-Info.plist.in +++ b/macosx/Tclsh-Info.plist.in @@ -6,7 +6,7 @@ See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. - RCS: @(#) $Id: Tclsh-Info.plist.in,v 1.2 2007/12/13 15:26:03 dgp Exp $ + RCS: @(#) $Id: Tclsh-Info.plist.in,v 1.3 2009/04/14 00:55:31 das Exp $ --> @@ -16,10 +16,10 @@ tclsh@TCL_VERSION@ CFBundleGetInfoString Tcl Shell @TCL_VERSION@@TCL_PATCH_LEVEL@, -Copyright © @TCL_YEAR@ Tcl Core Team, +Copyright © 1987-@TCL_YEAR@ Tcl Core Team, Copyright © 2001-@TCL_YEAR@ Daniel A. Steffen, -Initial MacOS X Port by Jim Ingham & Ian Reid, -Copyright © 2001-2002, Apple Computer, Inc. +Copyright © 2001-2009 Apple Inc., +Copyright © 2001-2002 Jim Ingham & Ian Reid CFBundleIdentifier com.tcltk.tclsh CFBundleInfoDictionaryVersion diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 635eb7c..69ffd2f 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -4,51 +4,13 @@ * This file implements functions that inspect CFBundle structures on * MacOS X. * - * Copyright 2001, Apple Computer, Inc. - * Copyright (c) 2003-2007 Daniel A. Steffen + * Copyright 2001-2009, Apple Inc. + * Copyright (c) 2003-2009 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * The following terms apply to all files originating from Apple - * Computer, Inc. ("Apple") and associated with the software unless - * explicitly disclaimed in individual files. - * - * Apple hereby grants permission to use, copy, modify, distribute, and - * license this software and its documentation for any purpose, provided - * that existing copyright notices are retained in all copies and that - * this notice is included verbatim in any distributions. No written - * agreement, license, or royalty fee is required for any of the - * authorized uses. Modifications to this software may be copyrighted by - * their authors and need not follow the licensing terms described here, - * provided that the new terms are clearly indicated on the first page of - * each file where they apply. - * - * IN NO EVENT SHALL APPLE, THE AUTHORS OR DISTRIBUTORS OF THE SOFTWARE - * BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS - * DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF APPLE OR THE - * AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. APPLE, - * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND - * NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND - * APPLE,THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE - * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - * - * GOVERNMENT USE: If you are acquiring this software on behalf of the - * U.S. government, the Government shall have only "Restricted Rights" in - * the software and related documentation as defined in the Federal - * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are - * acquiring the software on behalf of the Department of Defense, the - * software shall be classified as "Commercial Computer Software" and the - * Government shall have only "Restricted Rights" as defined in Clause - * 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the - * authors grant the U.S. Government and others acting in its behalf - * permission to use and distribute the software in accordance with the - * terms specified in this license. - * - * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.14 2009/04/10 16:59:19 das Exp $ + * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.15 2009/04/14 00:55:31 das Exp $ */ #include "tclPort.h" diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index cd4d4f2..a1bc7c1 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -6,13 +6,13 @@ * This file works together with generic/tclNotify.c. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright 2001, Apple Computer, Inc. + * Copyright 2001-2009, Apple Inc. * Copyright (c) 2005-2009 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.25 2009/04/10 22:53:27 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.26 2009/04/14 00:55:31 das Exp $ */ #include "tclInt.h" -- cgit v0.12 From 2c4e6d6523c5d72eeb8a2ed9125eb61febcf60f1 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 14 Apr 2009 19:57:57 +0000 Subject: * library/tzdata/Asia/Karachi: Updated rules for Pakistan Summer Time (Olson's tzdata2009f) --- ChangeLog | 5 +++++ library/tzdata/Asia/Karachi | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0b4bf6f..65ad93c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-14 Kevin B. Kenny + + * library/tzdata/Asia/Karachi: Updated rules for Pakistan Summer + Time (Olson's tzdata2009f) + 2009-04-11 Donal K. Fellows * generic/tclOOMethod.c (InvokeForwardMethod): Clarify the resolution diff --git a/library/tzdata/Asia/Karachi b/library/tzdata/Asia/Karachi index 9db002c..3faa31e 100644 --- a/library/tzdata/Asia/Karachi +++ b/library/tzdata/Asia/Karachi @@ -11,4 +11,6 @@ set TZData(:Asia/Karachi) { {1033840860 18000 0 PKT} {1212260400 21600 1 PKST} {1225476000 18000 0 PKT} + {1239735600 21600 1 PKST} + {1257012000 18000 0 PKT} } -- cgit v0.12 From 0faf3c561ee72b67abea7c34667c19344d759d18 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 15 Apr 2009 12:31:24 +0000 Subject: Doc improvements. --- ChangeLog | 4 ++++ doc/chan.n | 50 ++++++++++++++++++++++++++++++++++++-------------- doc/close.n | 28 +++++++++++++++++++++------- 3 files changed, 61 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65ad93c..4fb2c3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-15 Donal K. Fellows + + * doc/chan.n, doc/close.n: Tidy up documentation of TIP #332. + 2009-04-14 Kevin B. Kenny * library/tzdata/Asia/Karachi: Updated rules for Pakistan Summer diff --git a/doc/chan.n b/doc/chan.n index 2924465..d353fab 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.23 2009/01/30 11:34:36 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.24 2009/04/15 12:31:24 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -33,22 +33,35 @@ otherwise. Note that this only ever returns 1 when the channel has been configured to be non-blocking; all Tcl channels have blocking turned on by default. .TP -\fBchan close \fIchannelId\fR +\fBchan close \fIchannelId\fR ?\fIdirection\fR? . Close and destroy the channel called \fIchannelId\fR. Note that this deletes all existing file-events registered on the channel. +.VS 8.6 +If the \fIdirection\fR argument (which must be \fBread\fR or \fBwrite\fR or +any unique abbreviation of them) is present, the channel will only be +half-closed, so that it can go from being read-write to write-only or +read-only respectively. If a read-only channel is closed for reading, it is +the same as if the channel is fully closed, and respectively similar for +write-only channels. Without the \fIdirection\fR argument, the channel is +closed for both reading and writing (but only if those directions are +currently open). It is an error to close a read-only channel for writing, or a +write-only channel for reading. +.VE 8.6 .RS .PP As part of closing the channel, all buffered output is flushed to the -channel's output device, any buffered input is discarded, the -underlying operating system resource is closed and \fIchannelId\fR -becomes unavailable for future use. -.PP -If the channel is blocking, the command does not return until all -output is flushed. If the channel is nonblocking and there is -unflushed output, the channel remains open and the command returns -immediately; output will be flushed in the background and the channel -will be closed when all the flushing is complete. +channel's output device (only if the channel is ceasing to be writable), any +buffered input is discarded (only if the channel is ceasing to be readable), +the underlying operating system resource is closed and \fIchannelId\fR becomes +unavailable for future use (both only if the channel is being completely +closed). +.PP +If the channel is blocking and the channel is ceasing to be writable, the +command does not return until all output is flushed. If the channel is +nonblocking and there is unflushed output, the channel remains open and the +command returns immediately; output will be flushed in the background and the +channel will be closed when all the flushing is complete. .PP If \fIchannelId\fR is a blocking channel for a command pipeline then \fBchan close\fR waits for the child processes to complete. @@ -58,10 +71,12 @@ makes \fIchannelId\fR unavailable in the invoking interpreter but has no other effect until all of the sharing interpreters have closed the channel. When the last interpreter in which the channel is registered invokes \fBchan close\fR (or \fBclose\fR), the cleanup actions -described above occur. See the \fBinterp\fR command for a description -of channel sharing. +described above occur. With half-closing, the half-close of the channel only +applies to the current interpreter's view of the channel until all channels +have closed it in that direction (or completely). +See the \fBinterp\fR command for a description of channel sharing. .PP -Channels are automatically closed when an interpreter is destroyed and +Channels are automatically fully closed when an interpreter is destroyed and when the process exits. Channels are switched to blocking mode, to ensure that all output is correctly flushed before the process exits. .PP @@ -69,6 +84,13 @@ The command returns an empty string, and may generate an error if an error occurs while flushing output. If a command in a command pipeline created with \fBopen\fR returns an error, \fBchan close\fR generates an error (similar to the \fBexec\fR command.) +.PP +.VS 8.6 +Note that half-closes of sockets and command pipelines can have important side +effects because they result in a shutdown() or close() of the underlying +system resource, which can change how other processes or systems respond to +the Tcl program. +.VE 8.6 .RE .TP \fBchan configure \fIchannelId\fR ?\fIoptionName\fR? ?\fIvalue\fR? ?\fIoptionName value\fR?... diff --git a/doc/close.n b/doc/close.n index c4b1612..60a8b97 100644 --- a/doc/close.n +++ b/doc/close.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: close.n,v 1.15 2008/12/18 01:14:16 ferrieux Exp $ +'\" RCS: @(#) $Id: close.n,v 1.16 2009/04/15 12:31:24 dkf Exp $ '\" .so man.macros .TH close n 7.5 Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ close \- Close an open channel .SH SYNOPSIS \fBclose \fIchannelId\fR ?r(ead)|w(rite)? .BE - .SH DESCRIPTION .PP Closes or half-closes the channel given by \fIchannelId\fR. @@ -58,14 +57,25 @@ an error occurs while flushing output. If a command in a command pipeline created with \fBopen\fR returns an error, \fBclose\fR generates an error (similar to the \fBexec\fR command.) .PP -The two-argument form is a "half-close": given a bidirectional channel like a socket or command pipeline and a (possibly abbreviated) direction, it closes only the substream going in that direction. This means a shutdown() on a socket, and a close() of one end of a pipe for a command pipeline. Then, the Tcl-level channel data structure is either kept or freed depending on whether the other direction is still open. +.VS 8.6 +The two-argument form is a "half-close": given a bidirectional channel like a +socket or command pipeline and a (possibly abbreviated) direction, it closes +only the substream going in that direction. This means a shutdown() on a +socket, and a close() of one end of a pipe for a command pipeline. Then, the +Tcl-level channel data structure is either kept or freed depending on whether +the other direction is still open. .PP -A single-argument close on an already half-closed bi-channel is defined to just "finish the job. A half-close on an already closed half, or on a wrong-sided unidirectional channel, raises an error. +A single-argument close on an already half-closed bi-channel is defined to +just "finish the job. A half-close on an already closed half, or on a +wrong-sided unidirectional channel, raises an error. .PP -In the case of a command pipeline, the child-reaping duty falls upon the shoulders of the last close or half-close, which is thus allowed to report an abnormal exit error. +In the case of a command pipeline, the child-reaping duty falls upon the +shoulders of the last close or half-close, which is thus allowed to report an +abnormal exit error. .PP -Currently only sockets and command pipelines support half-close. A future extension will allow reflected and stacked channels to do so. - +Currently only sockets and command pipelines support half-close. A future +extension will allow reflected and stacked channels to do so. +.VE 8.6 .SH EXAMPLE .PP This illustrates how you can use Tcl to ensure that files get closed @@ -87,3 +97,7 @@ proc withOpenFile {filename channelVar script} { file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3) .SH KEYWORDS blocking, channel, close, nonblocking, half-close +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: -- cgit v0.12 From 088d91e5be449b50b2330892fc611bed5a4a6c6a Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sun, 19 Apr 2009 18:27:59 +0000 Subject: Removed newline appended to POST data. Added tests to check that the data provided by a POST is as stated in the content-length [Bug 2715421] --- ChangeLog | 8 +++++ library/http/http.tcl | 5 ++-- library/http/pkgIndex.tcl | 2 +- tests/http11.test | 74 ++++++++++++++++++++++++++++++++++++++++++++++- tests/httpd11.tcl | 45 +++++++++++++++++++++++----- unix/Makefile.in | 6 ++-- win/Makefile.in | 6 ++-- 7 files changed, 127 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fb2c3d..c95f36d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-19 Pat Thoyts + + * library/http/http.tcl: Removed spurious newline added after POST + * tests/http11.test: and added tests to detect excess bytes + * tests/httpd11.tcl: being POSTed. [Bug 2715421] + * library/http/pkgIndex.tcl: + * makefiles: package version now 2.8.1 + 2009-04-15 Donal K. Fellows * doc/chan.n, doc/close.n: Tidy up documentation of TIP #332. diff --git a/library/http/http.tcl b/library/http/http.tcl index 8de0a9d..654d8b0 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,12 +8,12 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.75 2009/04/10 14:19:44 patthoyts Exp $ +# RCS: @(#) $Id: http.tcl,v 1.76 2009/04/19 18:27:59 patthoyts Exp $ package require Tcl 8.6 # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles -package provide http 2.8.0 +package provide http 2.8.1 namespace eval http { # Allow resourcing to not clobber existing data @@ -906,7 +906,6 @@ proc http::Write {token} { incr state(queryoffset) $state(-queryblocksize) if {$state(queryoffset) >= $state(querylength)} { set state(queryoffset) $state(querylength) - puts $sock "" set done 1 } } else { diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index c7029be..b953d49 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.6]} {return} -package ifneeded http 2.8.0 [list tclPkgSetup $dir http 2.8.0 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.8.1 [list tclPkgSetup $dir http 2.8.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/tests/http11.test b/tests/http11.test index 58bb091..967e5e6 100644 --- a/tests/http11.test +++ b/tests/http11.test @@ -231,7 +231,7 @@ test http-1.11 "normal,compress,chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok compress chunked} -test http-1.11 "normal,identity,chunked" -setup { +test http-1.12 "normal,identity,chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -573,6 +573,78 @@ test http-3.3 "-handler,keepalive,chunked" -setup { halt_httpd } -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} +test http-4.0 "normal post request" -setup { + variable httpd [create_httpd] +} -body { + set query [http::formatQuery q 1 z 2] + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -query $query -timeout 10000] + http::wait $tok + list status [http::status $tok] code [http::code $tok]\ + crc [check_crc $tok]\ + connection [meta $tok connection]\ + query-length [meta $tok x-query-length] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {status ok code {HTTP/1.1 200 OK} crc ok connection close query-length 7} + +test http-4.1 "normal post request, check query length" -setup { + variable httpd [create_httpd] +} -body { + set query [http::formatQuery q 1 z 2] + set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ + -headers [list x-check-query yes] \ + -query $query -timeout 10000] + http::wait $tok + list status [http::status $tok] code [http::code $tok]\ + crc [check_crc $tok]\ + connection [meta $tok connection]\ + query-length [meta $tok x-query-length] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {status ok code {HTTP/1.1 200 OK} crc ok connection close query-length 7} + +test http-4.2 "normal post request, check long query length" -setup { + variable httpd [create_httpd] +} -body { + set query [string repeat a 24576] + set tok [http::geturl http://localhost:$httpd_port/testdoc.html\ + -headers [list x-check-query yes]\ + -query $query -timeout 10000] + http::wait $tok + list status [http::status $tok] code [http::code $tok]\ + crc [check_crc $tok]\ + connection [meta $tok connection]\ + query-length [meta $tok x-query-length] +} -cleanup { + http::cleanup $tok + halt_httpd +} -result {status ok code {HTTP/1.1 200 OK} crc ok connection close query-length 24576} + +test http-4.3 "normal post request, check channel query length" -setup { + variable httpd [create_httpd] + set chan [open [makeFile {} testfile.tmp] wb+] + puts -nonewline $chan [string repeat [encoding convertto utf-8 "This is a test\n"] 8192] + flush $chan + seek $chan 0 +} -body { + set tok [http::geturl http://localhost:$httpd_port/testdoc.html\ + -headers [list x-check-query yes]\ + -querychannel $chan -timeout 10000] + http::wait $tok + list status [http::status $tok] code [http::code $tok]\ + crc [check_crc $tok]\ + connection [meta $tok connection]\ + query-length [meta $tok x-query-length] +} -cleanup { + http::cleanup $tok + close $chan + removeFile testfile.tmp + halt_httpd +} -result {status ok code {HTTP/1.1 200 OK} crc ok connection close query-length 122880} + # ------------------------------------------------------------------------- unset -nocomplain httpd_port diff --git a/tests/httpd11.tcl b/tests/httpd11.tcl index afa5f5d..9c543dc 100644 --- a/tests/httpd11.tcl +++ b/tests/httpd11.tcl @@ -89,6 +89,7 @@ proc Service {chan addr port} { while {1} { set meta {} chan configure $chan -buffering line -encoding iso8859-1 -translation crlf + chan configure $chan -blocking 0 yield while {[gets $chan line] < 0} { if {[eof $chan]} {chan event $chan readable {}; close $chan; return} @@ -101,16 +102,12 @@ proc Service {chan addr port} { puts $line while {[gets $chan line] > 0} { if {[regexp {^([^:]+):(.*)$} $line -> key val]} { - #puts "$key $val" + puts [list $key [string trim $val]] lappend meta [string tolower $key] [string trim $val] } yield } - if {[scan $url {%[^?]?%s} path query] < 2} { - set query "" - } - set encoding identity set transfer "" set close 1 @@ -119,6 +116,35 @@ proc Service {chan addr port} { set data "Error 404" append data "

Not Found

Try again.

" + if {[scan $url {%[^?]?%s} path query] < 2} { + set query "" + } + + switch -exact -- $req { + GET - HEAD { + } + POST { + # Read the query. + set qlen [dict get? $meta content-length] + if {[string is integer -strict $qlen]} { + chan configure $chan -buffering none -translation binary + while {[string length $query] < $qlen} { + append query [read $chan $qlen] + if {[string length $query] < $qlen} {yield} + } + # Check for excess query bytes [Bug 2715421] + if {[dict get? $meta x-check-query] eq "yes"} { + chan configure $chan -blocking 0 + append query [read $chan] + } + } + } + default { + # invalid request error 5?? + } + } + if {$query ne ""} {puts $query} + set path [string trimleft $path /] set path [file join [pwd] $path] if {[file exists $path] && [file isfile $path]} { @@ -153,10 +179,13 @@ proc Service {chan addr port} { } } - chan configure $chan -translation crlf + chan configure $chan -buffering line -encoding iso8859-1 -translation crlf Puts $chan "$protocol $code" Puts $chan "content-type: $type" - Puts $chan [format "x-crc32: %x" [zlib crc32 $data]] + Puts $chan [format "x-crc32: %08x" [zlib crc32 $data]] + if {$req eq "POST"} { + Puts $chan [format "x-query-length: %d" [string length $query]] + } if {$close} { Puts $chan "connection: close" } @@ -171,7 +200,7 @@ proc Service {chan addr port} { puts $chan "" flush $chan - chan configure $chan -translation binary + chan configure $chan -buffering full -translation binary if {$transfer eq "chunked"} { blow-chunks $data $chan $encoding } elseif {$encoding ne "identity"} { diff --git a/unix/Makefile.in b/unix/Makefile.in index 42790de..4fa5b12 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.267 2009/04/10 14:19:45 patthoyts Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.268 2009/04/19 18:27:59 patthoyts Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -820,8 +820,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.8.0 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.0.tm; + @echo "Installing package http 2.8.1 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.1.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index ed0632f..1f6d5ce 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.154 2009/04/10 14:19:45 patthoyts Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.155 2009/04/19 18:28:00 patthoyts Exp $ VERSION = @TCL_VERSION@ @@ -696,8 +696,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.8.0 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.0.tm; + @echo "Installing package http 2.8.1 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.1.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ -- cgit v0.12 From 0854aced624501e369a6a5e90cfbbbcd03ba8319 Mon Sep 17 00:00:00 2001 From: stwo Date: Fri, 24 Apr 2009 15:07:20 +0000 Subject: Don't chmod/exec installManPage. [Patch 2769530] --- ChangeLog | 5 +++++ unix/Makefile.in | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c95f36d..c7c7b97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-24 Stuart Cassoff + + * unix/Makefile.in: Don't chmod/exec installManPage. + [Patch 2769530] + 2009-04-19 Pat Thoyts * library/http/http.tcl: Removed spurious newline added after POST diff --git a/unix/Makefile.in b/unix/Makefile.in index 4fa5b12..f4f6ae9 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.268 2009/04/19 18:27:59 patthoyts Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.269 2009/04/24 15:07:21 stwo Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -862,9 +862,6 @@ install-msgs: tclsh $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs install-doc: doc - @if test ! -x $(UNIX_DIR)/installManPage; then \ - chmod +x $(UNIX_DIR)/installManPage; \ - fi @for i in "$(MAN_INSTALL_DIR)" "$(MAN1_INSTALL_DIR)" "$(MAN3_INSTALL_DIR)" "$(MANN_INSTALL_DIR)" ; \ do \ if [ ! -d "$$i" ] ; then \ @@ -876,17 +873,17 @@ install-doc: doc done; @echo "Installing and cross-linking top-level (.1) docs"; @for i in $(TOP_DIR)/doc/*.1; do \ - $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN1_INSTALL_DIR)"; \ + $(SHELL) $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN1_INSTALL_DIR)"; \ done @echo "Installing and cross-linking C API (.3) docs"; @for i in $(TOP_DIR)/doc/*.3; do \ - $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN3_INSTALL_DIR)"; \ + $(SHELL) $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN3_INSTALL_DIR)"; \ done @echo "Installing and cross-linking command (.n) docs"; @for i in $(TOP_DIR)/doc/*.n; do \ - $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MANN_INSTALL_DIR)"; \ + $(SHELL) $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MANN_INSTALL_DIR)"; \ done # Optional target to install private headers -- cgit v0.12 From ada61c0c5642494617b9efd6a667fc3939803da3 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 27 Apr 2009 09:41:49 +0000 Subject: Reset internal INTERP_ALTERNATE_WRONG_ARGS flag inside the Tcl_WrongNumArgs function, so the caller no longer has to do the reset. --- ChangeLog | 6 ++++++ generic/tclIOCmd.c | 4 +--- generic/tclIndexObj.c | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7c7b97..1c976ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-04-27 Jan Nijtmans + + * generic/tclIndexObj.c: Reset internal INTERP_ALTERNATE_WRONG_ARGS + * generic/tclIOCmd.c flag inside the Tcl_WrongNumArgs function, + so the caller no longer has to do the reset. + 2009-04-24 Stuart Cassoff * unix/Makefile.in: Don't chmod/exec installManPage. diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 3ee768f..13a6853 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.63 2009/02/10 22:49:58 nijtmans Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.64 2009/04/27 09:41:49 nijtmans Exp $ */ #include "tclInt.h" @@ -402,7 +402,6 @@ Tcl_ReadObjCmd( iPtr->flags |= INTERP_ALTERNATE_WRONG_ARGS; Tcl_WrongNumArgs(interp, 1, objv, "?-nonewline? channelId"); - iPtr->flags &= ~INTERP_ALTERNATE_WRONG_ARGS; return TCL_ERROR; } @@ -1558,7 +1557,6 @@ Tcl_SocketObjCmd( iPtr->flags |= INTERP_ALTERNATE_WRONG_ARGS; Tcl_WrongNumArgs(interp, 1, objv, "-server command ?-myaddr addr? port"); - iPtr->flags &= ~INTERP_ALTERNATE_WRONG_ARGS; return TCL_ERROR; } diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 6edd577..bbdae95 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.50 2009/02/10 22:49:49 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.51 2009/04/27 09:41:49 nijtmans Exp $ */ #include "tclInt.h" @@ -886,6 +886,7 @@ Tcl_WrongNumArgs( TclNewObj(objPtr); if (iPtr->flags & INTERP_ALTERNATE_WRONG_ARGS) { + iPtr->flags &= ~INTERP_ALTERNATE_WRONG_ARGS; Tcl_AppendObjToObj(objPtr, Tcl_GetObjResult(interp)); Tcl_AppendToObj(objPtr, " or \"", -1); } else { -- cgit v0.12 From 654740f1977f59f7a256d1361589f3dd97083339 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 27 Apr 2009 12:31:38 +0000 Subject: Fix examples. [Bug 2780680] --- ChangeLog | 18 ++++++++++++------ doc/concat.n | 38 +++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c976ed..3e4f251 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-04-27 Donal K. Fellows + + * doc/concat.n (EXAMPLES): [Bug 2780680]: Rewrote so that the spacing + of result messages is correct. (The exact way they were wrong was + different when rendered through groff or as HTML, but it was still + wrong both ways.) + 2009-04-27 Jan Nijtmans * generic/tclIndexObj.c: Reset internal INTERP_ALTERNATE_WRONG_ARGS @@ -6,14 +13,13 @@ 2009-04-24 Stuart Cassoff - * unix/Makefile.in: Don't chmod/exec installManPage. - [Patch 2769530] + * unix/Makefile.in: [Patch 2769530]: Don't chmod/exec installManPage. 2009-04-19 Pat Thoyts - * library/http/http.tcl: Removed spurious newline added after POST - * tests/http11.test: and added tests to detect excess bytes - * tests/httpd11.tcl: being POSTed. [Bug 2715421] + * library/http/http.tcl: [Bug 2715421]: Removed spurious newline added + * tests/http11.test: after POST and added tests to detect excess + * tests/httpd11.tcl: bytes being POSTed. * library/http/pkgIndex.tcl: * makefiles: package version now 2.8.1 @@ -25,7 +31,7 @@ * library/tzdata/Asia/Karachi: Updated rules for Pakistan Summer Time (Olson's tzdata2009f) - + 2009-04-11 Donal K. Fellows * generic/tclOOMethod.c (InvokeForwardMethod): Clarify the resolution diff --git a/doc/concat.n b/doc/concat.n index d34d48c..23ecb2d 100644 --- a/doc/concat.n +++ b/doc/concat.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: concat.n,v 1.12 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: concat.n,v 1.13 2009/04/27 12:31:38 dkf Exp $ '\" .so man.macros .TH concat n 8.3 Tcl "Tcl Built-In Commands" @@ -19,44 +19,40 @@ concat \- Join lists together .SH DESCRIPTION .PP This command joins each of its arguments together with spaces after -trimming leading and trailing white-space from each of them. If all the +trimming leading and trailing white-space from each of them. If all of the arguments are lists, this has the same effect as concatenating them into a single list. It permits any number of arguments; if no \fIarg\fRs are supplied, the result is an empty string. .SH EXAMPLES -Although \fBconcat\fR will concatenate lists (so the command: +Although \fBconcat\fR will concatenate lists, flattening them in the process +(so giving the following interactive session): .PP .CS -\fBconcat\fR a b {c d e} {f {g h}} +\fI%\fR \fBconcat\fR a b {c d e} {f {g h}} +\fIa b c d e f {g h}\fR .CE .PP -will return -.QW "\fBa b c d e f {g h}\fR" -as its result), it will also -concatenate things that are not lists, and hence the command: +it will also concatenate things that are not lists, as can be seen from this +session: .PP .CS -\fBconcat\fR " a b {c " d " e} f" +\fI%\fR \fBconcat\fR " a b {c " d " e} f" +\fIa b {c d e} f\fR .CE .PP -will return -.QW "\fBa b {c d e} f\fR" -as its result. -.PP -Note that the concatenation does not remove spaces from the middle of -its arguments, so the command: +Note also that the concatenation does not remove spaces from the middle of +values, as can be seen here: .PP .CS -\fBconcat\fR "a b c" { d e f } +\fI%\fR \fBconcat\fR "a b c" { d e f } +\fIa b c d e f\fR .CE .PP -will return -.QW "\fBa b c d e f\fR" -(i.e. with three spaces between -the \fBa\fR, the \fBb\fR and the \fBc\fR). +(i.e., there are three spaces between each of the \fBa\fR, the \fBb\fR and the +\fBc\fR). .SH "SEE ALSO" -append(n), eval(n) +append(n), eval(n), join(n) .SH KEYWORDS concatenate, join, lists '\" Local Variables: -- cgit v0.12 From a084e20d7a737e54cee53c89b1ac6e0c0ecd5e8f Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 28 Apr 2009 16:46:20 +0000 Subject: * unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check to add _r to CC on AIX with threads. --- ChangeLog | 5 +++++ unix/configure | 5 +++-- unix/tcl.m4 | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e4f251..28165b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-28 Jeff Hobbs + + * unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check + to add _r to CC on AIX with threads. + 2009-04-27 Donal K. Fellows * doc/concat.n (EXAMPLES): [Bug 2780680]: Rewrote so that the spacing diff --git a/unix/configure b/unix/configure index 503f4f5..6b4b375 100755 --- a/unix/configure +++ b/unix/configure @@ -6708,11 +6708,12 @@ fi # AIX requires the _r compiler when gcc isn't being used case "${CC}" in - *_r) + *_r|*_r\ *) # ok ... ;; *) - CC=${CC}_r + # Make sure only first arg gets _r + CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 diff --git a/unix/tcl.m4 b/unix/tcl.m4 index bcd3611..479ea08 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1128,11 +1128,12 @@ dnl AC_CHECK_TOOL(AR, ar) AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ # AIX requires the _r compiler when gcc isn't being used case "${CC}" in - *_r) + *_r|*_r\ *) # ok ... ;; *) - CC=${CC}_r + # Make sure only first arg gets _r + CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'` ;; esac AC_MSG_RESULT([Using $CC for compiling with threads]) -- cgit v0.12 From bd059b3e984f4ed7094e35e91d6298cee7f4342f Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 29 Apr 2009 14:56:56 +0000 Subject: Fix [Bug 2651823]. --- ChangeLog | 5 +++++ generic/tcl.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28165b3..db508b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-29 Donal K. Fellows + + * generic/tcl.h (Tcl_StatBuf): [Bug 2651823]: Improved logic for + detecting what base API to use on Win64, supplied by Fausto Lubatti. + 2009-04-28 Jeff Hobbs * unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check diff --git a/generic/tcl.h b/generic/tcl.h index b5bced7..dd3dc41 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.289 2009/03/19 23:31:36 msofer Exp $ + * RCS: @(#) $Id: tcl.h,v 1.290 2009/04/29 14:57:01 dkf Exp $ */ #ifndef _TCL @@ -380,12 +380,12 @@ typedef struct stat Tcl_StatBuf; # ifdef __BORLANDC__ typedef struct stati64 Tcl_StatBuf; # define TCL_LL_MODIFIER "L" -# else /* __BORLANDC__ */ -# if _MSC_VER < 1400 || !defined(_M_IX86) +# else /* !__BORLANDC__ */ +# if _MSC_VER < 1400 && defined(_WIN64) typedef struct _stati64 Tcl_StatBuf; # else typedef struct _stat64 Tcl_StatBuf; -# endif /* _MSC_VER < 1400 */ +# endif /* _MSC_VER < 1400 && _WIN64 */ # define TCL_LL_MODIFIER "I64" # endif /* __BORLANDC__ */ # else /* __WIN32__ */ -- cgit v0.12 From 268de519126607c8691aea2e50f22ffee53dab6a Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 29 Apr 2009 15:24:16 +0000 Subject: Revert last commit which fails to build with msvc2005 and msvc6 --- ChangeLog | 5 ----- generic/tcl.h | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index db508b2..28165b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,3 @@ -2009-04-29 Donal K. Fellows - - * generic/tcl.h (Tcl_StatBuf): [Bug 2651823]: Improved logic for - detecting what base API to use on Win64, supplied by Fausto Lubatti. - 2009-04-28 Jeff Hobbs * unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check diff --git a/generic/tcl.h b/generic/tcl.h index dd3dc41..a57d683 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.290 2009/04/29 14:57:01 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.291 2009/04/29 15:24:20 patthoyts Exp $ */ #ifndef _TCL @@ -380,12 +380,12 @@ typedef struct stat Tcl_StatBuf; # ifdef __BORLANDC__ typedef struct stati64 Tcl_StatBuf; # define TCL_LL_MODIFIER "L" -# else /* !__BORLANDC__ */ -# if _MSC_VER < 1400 && defined(_WIN64) +# else /* __BORLANDC__ */ +# if _MSC_VER < 1400 || !defined(_M_IX86) typedef struct _stati64 Tcl_StatBuf; # else typedef struct _stat64 Tcl_StatBuf; -# endif /* _MSC_VER < 1400 && _WIN64 */ +# endif /* _MSC_VER < 1400 */ # define TCL_LL_MODIFIER "I64" # endif /* __BORLANDC__ */ # else /* __WIN32__ */ -- cgit v0.12 From fc14cb7392349efcc99e221cefa6f328f0c9de2a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 30 Apr 2009 22:37:46 +0000 Subject: Fix 64-bit detection for zlib on Win64 --- ChangeLog | 5 +++ win/configure | 98 ++++++++++++++++++++++++++++---------------------------- win/configure.in | 18 +++++------ 3 files changed, 63 insertions(+), 58 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28165b3..62427ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-01 Jan Nijtmans + + * win/configure.in Fix 64-bit detection for zlib on Win64 + * win/configure (regenerated) + 2009-04-28 Jeff Hobbs * unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check diff --git a/win/configure b/win/configure index b71451d..e17858b 100755 --- a/win/configure +++ b/win/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3696,51 +3696,6 @@ _ACEOF fi -#------------------------------------------------------------------------ -# Add stuff for zlib; note that this is mostly done in the makefile now -# as we just assume that the platform hasn't got a usable z.lib -#------------------------------------------------------------------------ - -if test "$do64bit" = "yes"; then - - tcl_ok=no - -else - -if test "${enable_shared+set}" = "set"; then - - enableval="$enable_shared" - tcl_ok=$enableval - -else - - tcl_ok=yes - -fi - - -fi - -if test "$tcl_ok" = "yes"; then - - ZLIB_DLL_FILE=\${ZLIB_DLL_FILE} - - ZLIB_LIBS=\${ZLIB_DIR}/win32/zdll.lib - - -else - - ZLIB_OBJS=\${ZLIB_OBJS} - - -fi - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZLIB 1 -_ACEOF - - #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called @@ -4379,6 +4334,51 @@ _ACEOF +#------------------------------------------------------------------------ +# Add stuff for zlib; note that this is mostly done in the makefile now +# as we just assume that the platform hasn't got a usable z.lib +#------------------------------------------------------------------------ + +if test "$do64bit" = "yes"; then + + tcl_ok=no + +else + +if test "${enable_shared+set}" = "set"; then + + enableval="$enable_shared" + tcl_ok=$enableval + +else + + tcl_ok=yes + +fi + + +fi + +if test "$tcl_ok" = "yes"; then + + ZLIB_DLL_FILE=\${ZLIB_DLL_FILE} + + ZLIB_LIBS=\${ZLIB_DIR}/win32/zdll.lib + + +else + + ZLIB_OBJS=\${ZLIB_OBJS} + + +fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB 1 +_ACEOF + + #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called @@ -5286,15 +5286,15 @@ s,@RANLIB@,$RANLIB,;t t s,@RC@,$RC,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@ZLIB_DLL_FILE@,$ZLIB_DLL_FILE,;t t -s,@ZLIB_LIBS@,$ZLIB_LIBS,;t t -s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t s,@CYGPATH@,$CYGPATH,;t t s,@CELIB_DIR@,$CELIB_DIR,;t t s,@DL_LIBS@,$DL_LIBS,;t t s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@ZLIB_DLL_FILE@,$ZLIB_DLL_FILE,;t t +s,@ZLIB_LIBS@,$ZLIB_LIBS,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t s,@TCL_VERSION@,$TCL_VERSION,;t t diff --git a/win/configure.in b/win/configure.in index 5c8a3f7..4f6356e 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.117 2009/02/16 22:56:14 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.118 2009/04/30 22:37:46 nijtmans Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -338,6 +338,14 @@ SC_TCL_CFG_ENCODING SC_ENABLE_SHARED +#-------------------------------------------------------------------- +# The statements below define a collection of compile flags. This +# macro depends on the value of SHARED_BUILD, and should be called +# after SC_ENABLE_SHARED checks the configure switches. +#-------------------------------------------------------------------- + +SC_CONFIG_CFLAGS + #------------------------------------------------------------------------ # Add stuff for zlib; note that this is mostly done in the makefile now # as we just assume that the platform hasn't got a usable z.lib @@ -362,14 +370,6 @@ AS_IF([test "$tcl_ok" = "yes"], [ AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?]) #-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This -# macro depends on the value of SHARED_BUILD, and should be called -# after SC_ENABLE_SHARED checks the configure switches. -#-------------------------------------------------------------------- - -SC_CONFIG_CFLAGS - -#-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. -- cgit v0.12 From 7b070a7c3c4ebcf234242d7a3dc3d6e84fad44a9 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 30 Apr 2009 23:25:32 +0000 Subject: * generic/tclBasic.c (TclObjInvoke): Make sure that a null objProc is not used, use Tcl_NRCallObjProc instead [Bug 2486550]. --- ChangeLog | 5 +++++ generic/tclBasic.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62427ce..3c4651f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-30 Miguel Sofer + + * generic/tclBasic.c (TclObjInvoke): Make sure that a null objProc + is not used, use Tcl_NRCallObjProc instead [Bug 2486550]. + 2009-05-01 Jan Nijtmans * win/configure.in Fix 64-bit detection for zlib on Win64 diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 919a031..d5aad5d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.391 2009/03/22 14:46:28 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.392 2009/04/30 23:25:32 msofer Exp $ */ #include "tclInt.h" @@ -6421,7 +6421,12 @@ TclObjInvoke( */ iPtr->cmdCount++; - result = cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv); + if (cmdPtr->objProc != NULL) { + result = cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv); + } else { + result = Tcl_NRCallObjProc(interp, cmdPtr->nreProc, + cmdPtr->objClientData, objc, objv); + } /* * If an error occurred, record information about what was being executed -- cgit v0.12 From bced9b54274c34b3cb12fa8875327756c728ab18 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 1 May 2009 20:18:43 +0000 Subject: Tcl icon upgraded and SVG file added. Windows 7 makes significant use of large icon resources. An SVG version of the tcl feather is included and has been used to generate the set of icons recommended for use on Vista except for the 256x256 PNG version. Inclusion of this prevents building with MSVC6 and a number of other tools which cannot handle PNG in in ico files. Hence the largest icon included is 64x64 at 32bit depth. --- tools/tclsh.svg | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ win/tclsh.ico | Bin 3630 -> 45934 bytes 2 files changed, 67 insertions(+) create mode 100644 tools/tclsh.svg diff --git a/tools/tclsh.svg b/tools/tclsh.svg new file mode 100644 index 0000000..34d45a4 --- /dev/null +++ b/tools/tclsh.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + diff --git a/win/tclsh.ico b/win/tclsh.ico index 8bcaf48..6800dc2 100644 Binary files a/win/tclsh.ico and b/win/tclsh.ico differ -- cgit v0.12 From ba58e6442af44bef063652e496e60f09826716ec Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 3 May 2009 18:05:38 +0000 Subject: Fix [Bug 2538432] through clarification. --- ChangeLog | 6 ++++++ doc/Tcl.n | 19 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c4651f..91c6ff7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-03 Donal K. Fellows + + * doc/Tcl.n: [Bug 2538432]: Clarified exact treatment of ${arr(idx)} + form of variable substitution. This is not a change of behavior, just + an improved description of the current situation. + 2009-04-30 Miguel Sofer * generic/tclBasic.c (TclObjInvoke): Make sure that a null objProc diff --git a/doc/Tcl.n b/doc/Tcl.n index e486869..d3ed71c 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl.n,v 1.20 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Tcl.n,v 1.21 2009/05/03 18:05:39 dkf Exp $ '\" .so man.macros .TH Tcl n "8.5" Tcl "Tcl Built-In Commands" @@ -121,8 +121,17 @@ substitutions are performed on the characters of \fIindex\fR. .TP 15 \fB${\fIname\fB}\fR . -\fIName\fR is the name of a scalar variable. It may contain any -characters whatsoever except for close braces. +\fIName\fR is the name of a scalar variable or array element. It may contain +any characters whatsoever except for close braces. It indicates an array +element if \fIname\fR is in the form +.QW \fIarrayName\fB(\fIindex\fB)\fR +where \fIarrayName\fR does not contain any open parenthesis characters, +.QW \fB(\fR , +or close brace characters, +.QW \fB}\fR , +and \fIindex\fR can be any sequence of characters except for close brace +characters. No further +substitutions are performed during the parsing of \fIname\fR. .PP There may be any number of variable substitutions in a single word. Variable substitution is not performed on words enclosed in braces. @@ -236,3 +245,7 @@ except for argument expansion as specified in rule [5]. For example, during variable substitution the entire value of the variable becomes part of a single word, even if the variable's value contains spaces. +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: -- cgit v0.12 From fd6cead82a2f2f559fa5376d1e8cf520ef79da95 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 4 May 2009 17:39:50 +0000 Subject: Stop deletion of support namespaces leading to a potential crash. --- ChangeLog | 7 +++++ generic/tclOO.c | 68 ++++++++++++++++++++++++++++++++++++++++------- generic/tclOODefineCmds.c | 9 ++++++- 3 files changed, 73 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91c6ff7..d81ce5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-05-04 Donal K. Fellows + + * generic/tclOO.c (InitFoundation, Deleted*Namespace, AllocClass): + * generic/tclOODefineCmds.c (InitDefineContext): Make sure that when + support namespaces are deleted, nothing bad can subsequently happen. + Issue spotted by Don Porter. + 2009-05-03 Donal K. Fellows * doc/Tcl.n: [Bug 2538432]: Clarified exact treatment of ${arr(idx)} diff --git a/generic/tclOO.c b/generic/tclOO.c index 430e1cc..4c0b253 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.19 2009/01/06 10:20:54 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.20 2009/05/04 17:39:51 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -72,6 +72,9 @@ static int CloneClassMethod(Tcl_Interp *interp, Class *clsPtr, Method **newMPtrPtr); static int CloneObjectMethod(Tcl_Interp *interp, Object *oPtr, Method *mPtr, Tcl_Obj *namePtr); +static void DeletedDefineNamespace(ClientData clientData); +static void DeletedObjdefNamespace(ClientData clientData); +static void DeletedHelpersNamespace(ClientData clientData); static int FinalizeAlloc(ClientData data[], Tcl_Interp *interp, int result); static int FinalizeNext(ClientData data[], @@ -233,11 +236,12 @@ InitFoundation( fPtr->interp = interp; fPtr->ooNs = Tcl_CreateNamespace(interp, "::oo", fPtr, NULL); Tcl_Export(interp, fPtr->ooNs, "[a-z]*", 1); - fPtr->defineNs = Tcl_CreateNamespace(interp, "::oo::define", NULL, NULL); - fPtr->objdefNs = Tcl_CreateNamespace(interp, "::oo::objdefine", NULL, - NULL); - fPtr->helpersNs = Tcl_CreateNamespace(interp, "::oo::Helpers", NULL, - NULL); + fPtr->defineNs = Tcl_CreateNamespace(interp, "::oo::define", fPtr, + DeletedDefineNamespace); + fPtr->objdefNs = Tcl_CreateNamespace(interp, "::oo::objdefine", fPtr, + DeletedObjdefNamespace); + fPtr->helpersNs = Tcl_CreateNamespace(interp, "::oo::Helpers", fPtr, + DeletedHelpersNamespace); fPtr->epoch = 0; fPtr->tsdPtr = tsdPtr; fPtr->unknownMethodNameObj = Tcl_NewStringObj("unknown", -1); @@ -354,6 +358,44 @@ InitFoundation( /* * ---------------------------------------------------------------------- * + * DeletedDefineNamespace, DeletedObjdefNamespace, DeletedHelpersNamespace -- + * + * Simple helpers used to clear fields of the foundation when they no + * longer hold useful information. + * + * ---------------------------------------------------------------------- + */ + +static void +DeletedDefineNamespace( + ClientData clientData) +{ + Foundation *fPtr = clientData; + + fPtr->defineNs = NULL; +} + +static void +DeletedObjdefNamespace( + ClientData clientData) +{ + Foundation *fPtr = clientData; + + fPtr->objdefNs = NULL; +} + +static void +DeletedHelpersNamespace( + ClientData clientData) +{ + Foundation *fPtr = clientData; + + fPtr->helpersNs = NULL; +} + +/* + * ---------------------------------------------------------------------- + * * KillFoundation -- * * Delete those parts of the OO core that are not deleted automatically @@ -1154,7 +1196,6 @@ AllocClass( { Foundation *fPtr = GetFoundation(interp); Class *clsPtr = (Class *) ckalloc(sizeof(Class)); - Tcl_Namespace *path[2]; /* * Make an object if we haven't been given one. @@ -1171,9 +1212,16 @@ AllocClass( * Configure the namespace path for the class's object. */ - path[0] = fPtr->helpersNs; - path[1] = fPtr->ooNs; - TclSetNsPath((Namespace *) clsPtr->thisPtr->namespacePtr, 2, path); + if (fPtr->helpersNs != NULL) { + Tcl_Namespace *path[2]; + + path[0] = fPtr->helpersNs; + path[1] = fPtr->ooNs; + TclSetNsPath((Namespace *) clsPtr->thisPtr->namespacePtr, 2, path); + } else { + TclSetNsPath((Namespace *) clsPtr->thisPtr->namespacePtr, 1, + &fPtr->ooNs); + } /* * Class objects inherit from the class of classes unless they inherit diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index b732eec..2fb9ce5 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.10 2009/02/12 09:27:43 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.11 2009/05/04 17:39:51 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -564,6 +564,13 @@ InitDefineContext( CallFrame *framePtr, **framePtrPtr = &framePtr; int result; + if (namespacePtr == NULL) { + Tcl_AppendResult(interp, + "cannot process definitions; support namespace deleted", + NULL); + return TCL_ERROR; + } + /* framePtrPtr is needed to satisfy GCC 3.3's strict aliasing rules */ result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, -- cgit v0.12 From aa4da1d985b67660713fd845ff3667898d8e977b Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 5 May 2009 15:47:45 +0000 Subject: Missed a spot. --- generic/tclOO.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generic/tclOO.c b/generic/tclOO.c index 4c0b253..6e476e9 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.20 2009/05/04 17:39:51 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.21 2009/05/05 15:47:45 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -502,7 +502,9 @@ AllocObject( */ configNamespace: - TclSetNsPath((Namespace *) oPtr->namespacePtr, 1, &fPtr->helpersNs); + if (fPtr->helpersNs != NULL) { + TclSetNsPath((Namespace *) oPtr->namespacePtr, 1, &fPtr->helpersNs); + } TclOOSetupVariableResolver(oPtr->namespacePtr); /* -- cgit v0.12 From 3abb13eb877c41445b9a6752b05928b8a3aab0b2 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 5 May 2009 15:51:51 +0000 Subject: Corrected changelog entry --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d81ce5d..a48f080 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2009-05-04 Donal K. Fellows - * generic/tclOO.c (InitFoundation, Deleted*Namespace, AllocClass): + * generic/tclOO.c (InitFoundation, AllocObject, AllocClass): * generic/tclOODefineCmds.c (InitDefineContext): Make sure that when support namespaces are deleted, nothing bad can subsequently happen. Issue spotted by Don Porter. -- cgit v0.12 From 3f9c03e559afb22460b355892e961c54863e7e6d Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 6 May 2009 15:50:36 +0000 Subject: * tests/interp.test: interp-20.50 test for Bug 2486550. --- ChangeLog | 4 ++++ tests/interp.test | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a48f080..d2b0610 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-05-06 Don Porter + + * tests/interp.test: interp-20.50 test for Bug 2486550. + 2009-05-04 Donal K. Fellows * generic/tclOO.c (InitFoundation, AllocObject, AllocClass): diff --git a/tests/interp.test b/tests/interp.test index 6a5ba41..e41eb45 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.64 2009/02/02 06:02:41 dgp Exp $ +# RCS: @(#) $Id: interp.test,v 1.65 2009/05/06 15:50:37 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1594,6 +1594,14 @@ test interp-20.49 {interp invokehidden -namespace} -setup { interp delete slave removeFile script } -result ::foo +test interp-20.50 {Bug 2486550} -setup { + interp create slave +} -body { + slave hide coroutine + slave invokehidden coroutine +} -cleanup { + interp delete slave +} -returnCodes error -match glob -result * test interp-21.1 {interp hidden} { -- cgit v0.12 From 8af7bf38453d71fecfc5e4e507d92e5220b5d5be Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 6 May 2009 20:16:16 +0000 Subject: * generic/tclCmdMZ.c: Improve overflow error message from [string repeat]. [Bug 2582327] --- ChangeLog | 3 +++ generic/tclCmdMZ.c | 4 ++-- generic/tclExecute.c | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2b0610..9a8fb7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-05-06 Don Porter + * generic/tclCmdMZ.c: Improve overflow error message from + [string repeat]. [Bug 2582327] + * tests/interp.test: interp-20.50 test for Bug 2486550. 2009-05-04 Donal K. Fellows diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 296271c..bb0d3bd 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.182 2009/03/16 10:21:42 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.183 2009/05/06 20:16:17 dgp Exp $ */ #include "tclInt.h" @@ -2144,7 +2144,7 @@ StringReptCmd( if (count > (INT_MAX / length1)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "max size for a Tcl value (%d bytes) exceeded", INT_MAX)); + "result exceeds max size for a Tcl value (%d bytes)", INT_MAX)); return TCL_ERROR; } length2 = length1 * count; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index b00848a..a30c46e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.433 2009/03/21 09:42:07 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.434 2009/05/06 20:16:17 dgp Exp $ */ #include "tclInt.h" @@ -2440,6 +2440,7 @@ TclExecuteByteCode( } if (appendLen < 0) { + /* TODO: convert panic to error ? */ Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } @@ -2468,6 +2469,7 @@ TclExecuteByteCode( if (!onlyb) { bytes = TclGetStringFromObj(objResultPtr, &length); if (length + appendLen < 0) { + /* TODO: convert panic to error ? */ Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } @@ -2504,6 +2506,7 @@ TclExecuteByteCode( } else { bytes = (char *) Tcl_GetByteArrayFromObj(objResultPtr, &length); if (length + appendLen < 0) { + /* TODO: convert panic to error ? */ Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } -- cgit v0.12 From 33fd9238dc467ef70e757a917e4c8ddd2dd7d78e Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 7 May 2009 10:34:42 +0000 Subject: Fix [Bug 1513659]. --- ChangeLog | 11 ++++-- tests/env.test | 107 +++++++++++++++++++++++++++++++++++++++----------------- tests/exec.test | 17 +++++++-- 3 files changed, 97 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a8fb7d..af2adbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ +2009-05-07 Donal K. Fellows + + * tests/env.test (printenvScript, env-4.3, env-4.5): [Bug 1513659]: + * tests/exec.test (exec-2.6): These tests had subtle dependencies on + being on platforms that were either ISO 8859-1 or UTF-8. Stabilized + the results by forcing the encoding. + 2009-05-06 Don Porter - * generic/tclCmdMZ.c: Improve overflow error message from - [string repeat]. [Bug 2582327] + * generic/tclCmdMZ.c: [Bug 2582327]: Improve overflow error message + from [string repeat]. * tests/interp.test: interp-20.50 test for Bug 2486550. diff --git a/tests/env.test b/tests/env.test index 043748a..7d7e5fa 100644 --- a/tests/env.test +++ b/tests/env.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: env.test,v 1.30 2008/07/19 21:47:55 dkf Exp $ +# RCS: @(#) $Id: env.test,v 1.31 2009/05/07 10:34:42 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -61,6 +61,7 @@ test env-1.3 {reflection of env by "array names"} -setup { } -result {1} set printenvScript [makeFile { + encoding system iso8859-1 proc lrem {listname name} { upvar $listname list set i [lsearch -nocase $list $name] @@ -71,7 +72,7 @@ set printenvScript [makeFile { } proc mangle s { regsub -all {\[|\\|\]} $s {\\&} s - regsub -all {[\u007f-\uffff]} $s {[manglechar &]} s + regsub -all {[\u0000-\u001f\u007f-\uffff]} $s {[manglechar &]} s return [subst -novariables $s] } proc manglechar c { @@ -125,60 +126,100 @@ foreach name [array names env] { } } -test env-2.1 {adding environment variables} {exec} { +# Need to run 'getenv' in known encoding, so save the current one here... +set sysenc [encoding system] + +test env-2.1 {adding environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { getenv -} {} -set env(NAME1) "test string" -test env-2.2 {adding environment variables} {exec} { +} -cleanup { + encoding system $sysenc +} -result {} +test env-2.2 {adding environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { + set env(NAME1) "test string" getenv -} {NAME1=test string} -set env(NAME2) "more" -test env-2.3 {adding environment variables} {exec} { +} -cleanup { + encoding system $sysenc +} -result {NAME1=test string} +test env-2.3 {adding environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { + set env(NAME2) "more" getenv -} {NAME1=test string +} -cleanup { + encoding system $sysenc +} -result {NAME1=test string NAME2=more} -set env(XYZZY) "garbage" -test env-2.4 {adding environment variables} {exec} { +test env-2.4 {adding environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { + set env(XYZZY) "garbage" getenv -} {NAME1=test string +} -cleanup { + encoding system $sysenc +} -result {NAME1=test string NAME2=more XYZZY=garbage} set env(NAME2) "new value" -test env-3.1 {changing environment variables} {exec} { +test env-3.1 {changing environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { set result [getenv] unset env(NAME2) set result -} {NAME1=test string +} -cleanup { + encoding system $sysenc +} -result {NAME1=test string NAME2=new value XYZZY=garbage} -test env-4.1 {unsetting environment variables} {exec} { - set result [getenv] - unset env(NAME1) - set result -} {NAME1=test string +test env-4.1 {unsetting environment variables: default} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { + getenv +} -cleanup { + encoding system $sysenc +} -result {NAME1=test string XYZZY=garbage} -test env-4.2 {unsetting environment variables} {exec} { - set result [getenv] +test env-4.2 {unsetting environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { + unset env(NAME1) + getenv +} -cleanup { unset env(XYZZY) - set result -} {XYZZY=garbage} -test env-4.3 {setting international environment variables} {exec} { + encoding system $sysenc +} -result {XYZZY=garbage} +test env-4.3 {setting international environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { set env(\ua7) \ub6 getenv -} {\u00a7=\u00b6} -test env-4.4 {changing international environment variables} {exec} { +} -cleanup { + encoding system $sysenc +} -result {\u00a7=\u00b6} +test env-4.4 {changing international environment variables} -setup { + encoding system iso8859-1 +} -constraints {exec} -body { set env(\ua7) \ua7 getenv -} {\u00a7=\u00a7} -test env-4.5 {unsetting international environment variables} {exec} { +} -cleanup { + encoding system $sysenc +} -result {\u00a7=\u00a7} +test env-4.5 {unsetting international environment variables} -setup { + encoding system iso8859-1 +} -body { set env(\ub6) \ua7 unset env(\ua7) - set result [getenv] + getenv +} -constraints {exec} -cleanup { + encoding system $sysenc unset env(\ub6) - set result -} {\u00b6=\u00a7} +} -result {\u00b6=\u00a7} test env-5.0 {corner cases - set a value, it should exist} -body { set env(temp) a @@ -212,7 +253,7 @@ test env-5.2 {corner cases - unset the env array} -setup { } -cleanup { interp delete i } -result {0} -test env-5.3 {corner cases - unset the env in master should unset child} -setup { +test env-5.3 {corner cases: unset the env in master should unset child} -setup { interp create i } -body { # Variables deleted in a master interp should be deleted in child interp diff --git a/tests/exec.test b/tests/exec.test index e8b0e66..297278f 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: exec.test,v 1.31 2008/07/21 21:25:21 nijtmans Exp $ +# RCS: @(#) $Id: exec.test,v 1.32 2009/05/07 10:34:42 dkf Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -114,7 +114,8 @@ proc readfile filename { close $f return [string trimright $d \n] } - + +# ---------------------------------------------------------------------- # Basic operations. test exec-1.1 {basic exec operation} {exec} { @@ -152,6 +153,8 @@ test exec-2.5 {redirecting input from immediate source} {exec} { exec [interpreter] $path(cat) "< external conversion did not occur # before writing out the temp file. quotenonascii [exec [interpreter] $path(cat) << "\uE9\uE0\uFC\uF1"] +} -cleanup { + encoding system $sysenc + rename quotenonascii {} } -result {\u00e9\u00e0\u00fc\u00f1} # I/O redirection: output to file. @@ -669,7 +675,8 @@ test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup { } -cleanup { removeFile $tmpfile } -result 14 - + +# ---------------------------------------------------------------------- # cleanup foreach file {gorp.file gorp.file2 echo echo2 cat wc sh sh2 sleep exit err} { @@ -679,3 +686,7 @@ unset -nocomplain path ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 7592bff0075283d77566536c9bea32df7073e73d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 8 May 2009 01:02:26 +0000 Subject: * generic/tclBasic.c: Let coroutines start with a much smaller * generic/tclCompile.h: stack: 200 words (previously was 2000, * generic/tclExecute.c: the same as interps) --- ChangeLog | 6 ++++++ generic/tclBasic.c | 11 ++++++++--- generic/tclCompile.h | 4 ++-- generic/tclExecute.c | 13 ++++++------- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index af2adbe..993e6d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-04-30 Miguel Sofer + + * generic/tclBasic.c: Let coroutines start with a much smaller + * generic/tclCompile.h: stack: 200 words (previously was 2000, + * generic/tclExecute.c: the same as interps) + 2009-05-07 Donal K. Fellows * tests/env.test (printenvScript, env-4.3, env-4.5): [Bug 1513659]: diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d5aad5d..41e3824 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.392 2009/04/30 23:25:32 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.393 2009/05/08 01:02:26 msofer Exp $ */ #include "tclInt.h" @@ -31,6 +31,11 @@ #include #endif + +#define INTERP_STACK_INITIAL_SIZE 2000 +#define CORO_STACK_INITIAL_SIZE 200 + + /* * Determine whether we're using IEEE floating point */ @@ -608,7 +613,7 @@ Tcl_CreateInterp(void) * variable). */ - iPtr->execEnvPtr = TclCreateExecEnv(interp); + iPtr->execEnvPtr = TclCreateExecEnv(interp, INTERP_STACK_INITIAL_SIZE); /* * TIP #219, Tcl Channel Reflection API support. @@ -8479,7 +8484,7 @@ TclNRCoroutineObjCmd( } corPtr = (CoroutineData *) ckalloc(sizeof(CoroutineData)); - corPtr->eePtr = TclCreateExecEnv(interp); + corPtr->eePtr = TclCreateExecEnv(interp, CORO_STACK_INITIAL_SIZE); corPtr->callerEEPtr = iPtr->execEnvPtr; corPtr->eePtr->corPtr = corPtr; corPtr->stackLevel = NULL; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index fb5bdb9..a9b8545 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.115 2009/02/27 23:03:42 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.116 2009/05/08 01:02:26 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -882,7 +882,7 @@ MODULE_SCOPE int TclCreateAuxData(ClientData clientData, const AuxDataType *typePtr, CompileEnv *envPtr); MODULE_SCOPE int TclCreateExceptRange(ExceptionRangeType type, CompileEnv *envPtr); -MODULE_SCOPE ExecEnv * TclCreateExecEnv(Tcl_Interp *interp); +MODULE_SCOPE ExecEnv * TclCreateExecEnv(Tcl_Interp *interp, int size); MODULE_SCOPE Tcl_Obj * TclCreateLiteral(Interp *iPtr, char *bytes, int length, unsigned int hash, int *newPtr, Namespace *nsPtr, int flags, diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a30c46e..e6eff03 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.434 2009/05/06 20:16:17 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.435 2009/05/08 01:02:26 msofer Exp $ */ #include "tclInt.h" @@ -788,16 +788,16 @@ InitByteCodeExecution( *---------------------------------------------------------------------- */ -#define TCL_STACK_INITIAL_SIZE 2000 - ExecEnv * TclCreateExecEnv( - Tcl_Interp *interp) /* Interpreter for which the execution + Tcl_Interp *interp, /* Interpreter for which the execution * environment is being created. */ + int size) /* the initial stack size, in number of words + * [sizeof(Tcl_Obj*)] */ { ExecEnv *eePtr = (ExecEnv *) ckalloc(sizeof(ExecEnv)); ExecStack *esPtr = (ExecStack *) ckalloc(sizeof(ExecStack) - + (size_t) (TCL_STACK_INITIAL_SIZE-1) * sizeof(Tcl_Obj *)); + + (size_t) (size-1) * sizeof(Tcl_Obj *)); eePtr->execStackPtr = esPtr; TclNewBooleanObj(eePtr->constants[0], 0); @@ -813,7 +813,7 @@ TclCreateExecEnv( esPtr->prevPtr = NULL; esPtr->nextPtr = NULL; esPtr->markerPtr = NULL; - esPtr->endPtr = &esPtr->stackWords[TCL_STACK_INITIAL_SIZE-1]; + esPtr->endPtr = &esPtr->stackWords[size-1]; esPtr->tosPtr = &esPtr->stackWords[-1]; Tcl_MutexLock(&execMutex); @@ -826,7 +826,6 @@ TclCreateExecEnv( return eePtr; } -#undef TCL_STACK_INITIAL_SIZE /* *---------------------------------------------------------------------- -- cgit v0.12 From b0db7876f6b3796fdaaf44512cf1fb86966b870d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 8 May 2009 02:21:09 +0000 Subject: * generic/tclObj.c (Tcl_GetCommandFromObj): fix for bug [2785893], insure that a command in a deleted namespace cannot be found through a cached name. --- ChangeLog | 6 +++++- generic/tclObj.c | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 993e6d5..76314a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ -2009-04-30 Miguel Sofer +2009-05-07 Miguel Sofer + * generic/tclObj.c (Tcl_GetCommandFromObj): fix for bug [2785893], + insure that a command in a deleted namespace cannot be found + through a cached name. + * generic/tclBasic.c: Let coroutines start with a much smaller * generic/tclCompile.h: stack: 200 words (previously was 2000, * generic/tclExecute.c: the same as interps) diff --git a/generic/tclObj.c b/generic/tclObj.c index e130dbb..f143eb2 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.151 2009/02/10 22:49:48 nijtmans Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.152 2009/05/08 02:21:09 msofer Exp $ */ #include "tclInt.h" @@ -3554,6 +3554,7 @@ Tcl_GetCommandFromObj( || (cmdPtr = resPtr->cmdPtr, cmdPtr->cmdEpoch != resPtr->cmdEpoch) || (interp != cmdPtr->nsPtr->interp) || (cmdPtr->flags & CMD_IS_DELETED) + || (cmdPtr->nsPtr->flags & NS_DYING) || ((resPtr->refNsPtr != NULL) && (((refNsPtr = (Namespace *) TclGetCurrentNamespace(interp)) != resPtr->refNsPtr) -- cgit v0.12 From 0aacbdde5731d13b37f89453b2c72c1ff5250a51 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 8 May 2009 08:13:31 +0000 Subject: Fix [Bug 2788468]. --- ChangeLog | 35 ++++++++++++---------- tests/exec.test | 93 +++++++++++++++++++++++++++++++-------------------------- 2 files changed, 71 insertions(+), 57 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76314a1..7a7bb1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,17 @@ +2009-05-08 Donal K. Fellows + + * tests/exec.test (cat): [Bug 2788468]: Adjust the scripted version of + cat so that it does not perform transformations on the data it is + working with, making it more like the standard Unix 'cat' program. + 2009-05-07 Miguel Sofer - * generic/tclObj.c (Tcl_GetCommandFromObj): fix for bug [2785893], - insure that a command in a deleted namespace cannot be found - through a cached name. - - * generic/tclBasic.c: Let coroutines start with a much smaller - * generic/tclCompile.h: stack: 200 words (previously was 2000, - * generic/tclExecute.c: the same as interps) + * generic/tclObj.c (Tcl_GetCommandFromObj): [Bug 2785893]: Ensure that + a command in a deleted namespace can't be found through a cached name. + + * generic/tclBasic.c: Let coroutines start with a much smaller + * generic/tclCompile.h: stack: 200 words (previously was 2000, the + * generic/tclExecute.c: same as interps). 2009-05-07 Donal K. Fellows @@ -37,8 +42,8 @@ 2009-04-30 Miguel Sofer - * generic/tclBasic.c (TclObjInvoke): Make sure that a null objProc - is not used, use Tcl_NRCallObjProc instead [Bug 2486550]. + * generic/tclBasic.c (TclObjInvoke): [Bug 2486550]: Make sure that a + null objProc is not used, use Tcl_NRCallObjProc instead. 2009-05-01 Jan Nijtmans @@ -47,8 +52,8 @@ 2009-04-28 Jeff Hobbs - * unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check - to add _r to CC on AIX with threads. + * unix/tcl.m4, unix/configure (SC_CONFIG_CFLAGS): harden the check to + add _r to CC on AIX with threads. 2009-04-27 Donal K. Fellows @@ -71,7 +76,7 @@ * library/http/http.tcl: [Bug 2715421]: Removed spurious newline added * tests/http11.test: after POST and added tests to detect excess - * tests/httpd11.tcl: bytes being POSTed. + * tests/httpd11.tcl: bytes being POSTed. * library/http/pkgIndex.tcl: * makefiles: package version now 2.8.1 @@ -115,7 +120,7 @@ want to run the tcl event loop via Tcl_ServiceModeHook(TCL_SERVICE_ALL). - * macosx/tclMacOSXNotify.c: add CFRunLoop based Tcl_Sleep() and + * macosx/tclMacOSXNotify.c: add CFRunLoop based Tcl_Sleep() and * unix/tclUnixChan.c: TclUnixWaitForFile() implementations * unix/tclUnixEvent.c: and disable select() based ones in CoreFoundation builds. @@ -150,7 +155,7 @@ * tools/tclZIC.tcl: Always emit files with Unix line termination. * library/tzdata: Olson's tzdata2009e - + 2009-04-09 Don Porter * library/http/http.tcl: [Bug 26245326]: Handle incomplete @@ -169,7 +174,7 @@ 2009-04-08 Don Porter * library/tcltest/tcltest.tcl: [Bug 2570363]: Converted [eval]s (some - * library/tcltest/pkgIndex.tcl: unsafe!) to {*} in tcltest package. + * library/tcltest/pkgIndex.tcl: unsafe!) to {*} in tcltest package. * unix/Makefile.in: => tcltest 2.3.1 * win/Makefile.in: diff --git a/tests/exec.test b/tests/exec.test index 297278f..61b818e 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: exec.test,v 1.32 2009/05/07 10:34:42 dkf Exp $ +# RCS: @(#) $Id: exec.test,v 1.33 2009/05/08 08:13:31 dkf Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -39,6 +39,7 @@ set path(cat) [makeFile { if {$argv eq ""} { set argv - } + fconfigure stdout -translation binary foreach name $argv { if {$name eq "-"} { set f stdin @@ -46,6 +47,7 @@ set path(cat) [makeFile { puts stderr $f continue } + fconfigure $f -translation binary while {[eof $f] == 0} { puts -nonewline [read $f] } @@ -72,7 +74,7 @@ set path(sh) [makeFile { set newcmd {} foreach arg $cmd { if {$arg eq ";"} { - eval exec >@stdout 2>@stderr [list [info nameofexecutable]] $newcmd + exec >@stdout 2>@stderr [info nameofexecutable] {*}$newcmd set newcmd {} continue } @@ -92,7 +94,7 @@ set path(sh2) [makeFile { set newcmd {} foreach arg $cmd { if {$arg eq ";"} { - eval exec -ignorestderr >@stdout [list [info nameofexecutable]] $newcmd + exec -ignorestderr >@stdout [info nameofexecutable] {*}$newcmd set newcmd {} continue } @@ -218,37 +220,37 @@ test exec-3.7 {redirecting output to file} {exec} { file delete $path(gorp.file) test exec-4.1 {redirecting output and stderr to file} {exec} { - exec [interpreter] "$path(echo)" "test output" >& $path(gorp.file) - exec [interpreter] "$path(cat)" "$path(gorp.file)" + exec [interpreter] $path(echo) "test output" >& $path(gorp.file) + exec [interpreter] $path(cat) $path(gorp.file) } "test output" test exec-4.2 {redirecting output and stderr to file} {exec} { - list [exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" >&$path(gorp.file)] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file)"] + list [exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" >&$path(gorp.file)] \ + [exec [interpreter] $path(cat) $path(gorp.file)] } {{} {foo bar}} test exec-4.3 {redirecting output and stderr to file} {exec} { exec [interpreter] $path(echo) "first line" > $path(gorp.file) - list [exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" >>&$path(gorp.file)] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file)"] + list [exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" >>&$path(gorp.file)] \ + [exec [interpreter] $path(cat) $path(gorp.file)] } "{} {first line\nfoo bar}" test exec-4.4 {redirecting output and stderr to file} {exec} { - set f [open "$path(gorp.file)" w] + set f [open $path(gorp.file) w] puts $f "Line 1" flush $f - exec [interpreter] "$path(echo)" "More text" >&@ $f - exec [interpreter] "$path(echo)" >&@$f "Even more" + exec [interpreter] $path(echo) "More text" >&@ $f + exec [interpreter] $path(echo) >&@$f "Even more" puts $f "Line 3" close $f - exec [interpreter] "$path(cat)" "$path(gorp.file)" + exec [interpreter] $path(cat) $path(gorp.file) } "Line 1\nMore text\nEven more\nLine 3" test exec-4.5 {redirecting output and stderr to file} {exec} { - set f [open "$path(gorp.file)" w] + set f [open $path(gorp.file) w] puts $f "Line 1" flush $f - exec >&@ $f [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" - exec >&@$f [interpreter] "$path(sh)" -c "\"$path(echo)\" xyzzy 1>&2" + exec >&@ $f [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" + exec >&@$f [interpreter] $path(sh) -c "\"$path(echo)\" xyzzy 1>&2" puts $f "Line 3" close $f - exec [interpreter] "$path(cat)" "$path(gorp.file)" + exec [interpreter] $path(cat) $path(gorp.file) } "Line 1\nfoo bar\nxyzzy\nLine 3" # I/O redirection: input from file. @@ -287,14 +289,14 @@ test exec-5.7 {redirecting input from file} -constraints {exec} -body { # I/O redirection: standard error through a pipeline. test exec-6.1 {redirecting stderr through a pipeline} {exec stdio} { - exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar" |& [interpreter] "$path(cat)" + exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar" |& [interpreter] $path(cat) } "foo bar" test exec-6.2 {redirecting stderr through a pipeline} {exec stdio} { - exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" |& [interpreter] "$path(cat)" + exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" |& [interpreter] $path(cat) } "foo bar" test exec-6.3 {redirecting stderr through a pipeline} {exec stdio} { - exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" \ - |& [interpreter] "$path(sh)" -c "\"$path(echo)\" second msg 1>&2 ; \"$path(cat)\"" |& [interpreter] "$path(cat)" + exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" \ + |& [interpreter] $path(sh) -c "\"$path(echo)\" second msg 1>&2 ; \"$path(cat)\"" |& [interpreter] $path(cat) } "second msg\nfoo bar" # I/O redirection: combinations. @@ -344,12 +346,12 @@ test exec-9.5 {commands returning errors} -constraints {exec stdio} -body { exec gorp456 | [interpreter] echo a b c } -returnCodes error -result {couldn't execute "gorp456": no such file or directory} test exec-9.6 {commands returning errors} -constraints {exec} -body { - exec [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2" + exec [interpreter] $path(sh) -c "\"$path(echo)\" error msg 1>&2" } -returnCodes error -result {error msg} test exec-9.7 {commands returning errors} -constraints {exec stdio nonPortable} -body { # This test can fail easily on multiprocessor machines - exec [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1" \ - | [interpreter] "$path(sh)" -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1" + exec [interpreter] $path(sh) -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1" \ + | [interpreter] $path(sh) -c "\"$path(echo)\" error msg 1>&2 ; \"$path(sleep)\" 1" } -returnCodes error -result {error msg error msg} set path(err) [makeFile {} err] @@ -560,27 +562,27 @@ test exec-14.5 {-ignorestderr switch} {exec} { # Redirecting standard error separately from standard output test exec-15.1 {standard error redirection} {exec} { - exec [interpreter] "$path(echo)" "First line" > "$path(gorp.file)" - list [exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" 2> "$path(gorp.file)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file)"] + exec [interpreter] $path(echo) "First line" > $path(gorp.file) + list [exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" 2> $path(gorp.file)] \ + [exec [interpreter] $path(cat) $path(gorp.file)] } {{} {foo bar}} test exec-15.2 {standard error redirection} {exec stdio} { - list [exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" \ - | [interpreter] "$path(echo)" biz baz >$path(gorp.file) 2> "$path(gorp.file2)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file2)"] + list [exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" \ + | [interpreter] $path(echo) biz baz >$path(gorp.file) 2> $path(gorp.file2)] \ + [exec [interpreter] $path(cat) $path(gorp.file)] \ + [exec [interpreter] $path(cat) $path(gorp.file2)] } {{} {biz baz} {foo bar}} test exec-15.3 {standard error redirection} {exec stdio} { - list [exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" \ - | [interpreter] "$path(echo)" biz baz 2>$path(gorp.file) > "$path(gorp.file2)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file)"] \ - [exec [interpreter] "$path(cat)" "$path(gorp.file2)"] + list [exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" \ + | [interpreter] $path(echo) biz baz 2>$path(gorp.file) > $path(gorp.file2)] \ + [exec [interpreter] $path(cat) $path(gorp.file)] \ + [exec [interpreter] $path(cat) $path(gorp.file2)] } {{} {foo bar} {biz baz}} test exec-15.4 {standard error redirection} {exec} { - set f [open "$path(gorp.file)" w] + set f [open $path(gorp.file) w] puts $f "Line 1" flush $f - exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" 2>@ $f + exec [interpreter] $path(sh) -c "\"$path(echo)\" foo bar 1>&2" 2>@ $f puts $f "Line 3" close $f readfile $path(gorp.file) @@ -588,14 +590,14 @@ test exec-15.4 {standard error redirection} {exec} { foo bar Line 3} test exec-15.5 {standard error redirection} {exec} { - exec [interpreter] "$path(echo)" "First line" > "$path(gorp.file)" + exec [interpreter] $path(echo) "First line" > "$path(gorp.file)" exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" 2>> "$path(gorp.file)" readfile $path(gorp.file) } {First line foo bar} test exec-15.6 {standard error redirection} {exec stdio} { exec [interpreter] "$path(sh)" -c "\"$path(echo)\" foo bar 1>&2" > "$path(gorp.file2)" 2> "$path(gorp.file)" \ - >& "$path(gorp.file)" 2> "$path(gorp.file2)" | [interpreter] "$path(echo)" biz baz + >& "$path(gorp.file)" 2> "$path(gorp.file2)" | [interpreter] $path(echo) biz baz list [readfile $path(gorp.file)] [readfile $path(gorp.file2)] } {{biz baz} {foo bar}} test exec-15.7 {standard error redirection 2>@1} {exec stdio} { @@ -624,7 +626,7 @@ test exec-16.2 {flush output before exec} {exec} { Second line Third line} -test exec-17.1 { inheriting standard I/O } -constraints {exec} -setup { +test exec-17.1 {inheriting standard I/O} -constraints {exec} -setup { set path(script) [makeFile {} script] set f [open $path(script) w] puts $f [list lassign [list \ @@ -645,7 +647,13 @@ test exec-17.1 { inheriting standard I/O } -constraints {exec} -setup { removeFile $path(script) } -result {{} foobar} -test exec-18.1 { exec cat deals with weird file names} -body { +test exec-18.1 {exec deals with weird file names} -body { + set path(fooblah) [makeFile {contents} "foo\[\{blah"] + exec [interpreter] $path(cat) $path(fooblah) +} -constraints {exec} -cleanup { + removeFile $path(fooblah) +} -result contents +test exec-18.2 {exec cat deals with weird file names} -body { # This is cross-platform, but the cat isn't predictably correct on # Windows. set path(fooblah) [makeFile {contents} "foo\[\{blah"] @@ -655,7 +663,8 @@ test exec-18.1 { exec cat deals with weird file names} -body { } -result contents # Note that this test cannot be adapted to work on Windows; that platform has -# no kernel support for an analog of O_APPEND. +# no kernel support for an analog of O_APPEND. OTOH, that means we can assume +# that there is a POSIX shell... test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup { set tmpfile [makeFile {0} tmpfile.exec-19.1] } -body { -- cgit v0.12 From 8e841a82ee24a19f46b5242cc2a989361da94dd9 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 8 May 2009 08:48:19 +0000 Subject: Fix [Bug 2414858]. --- generic/tclBasic.c | 10 +++++++++- generic/tclInt.h | 3 ++- generic/tclOO.c | 3 ++- tests/oo.test | 17 ++++++++++++++--- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 41e3824..264fdc8 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.393 2009/05/08 01:02:26 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.394 2009/05/08 08:48:19 dkf Exp $ */ #include "tclInt.h" @@ -4200,6 +4200,14 @@ TclNREvalObjv( return TCL_OK; } +void +TclPushTailcallPoint( + Tcl_Interp *interp) +{ + TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); + ((Interp *) interp)->numLevels++; +} + int TclNRRunCallbacks( Tcl_Interp *interp, diff --git a/generic/tclInt.h b/generic/tclInt.h index 3028ff1..9562d6b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.422 2009/03/21 12:24:49 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.423 2009/05/08 08:48:19 dkf Exp $ */ #ifndef _TCLINT @@ -2614,6 +2614,7 @@ MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, MODULE_SCOPE int TclNREvalCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); +MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp, diff --git a/generic/tclOO.c b/generic/tclOO.c index 6e476e9..1ba0ba8 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.21 2009/05/05 15:47:45 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.22 2009/05/08 08:48:19 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1443,6 +1443,7 @@ TclNRNewObjectInstance( TclNRAddCallback(interp, FinalizeAlloc, contextPtr, oPtr, state, objectPtr); + TclPushTailcallPoint(interp); return TclOOInvokeContext(contextPtr, interp, objc, objv); } diff --git a/tests/oo.test b/tests/oo.test index 6b81f37..c8957b3 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.25 2009/04/11 11:18:51 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.26 2009/05/08 08:48:19 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -278,10 +278,21 @@ test oo-2.5 {OO constructor - Bug 2531577} -setup { } -cleanup { foo destroy } -result {1 1} +test oo-2.6 {OO constructor and tailcall - Bug 2414858} -setup { + oo::class create foo +} -body { + oo::define foo { + constructor {} { tailcall my bar } + method bar {} { return bad } + } + namespace tail [foo create good] +} -cleanup { + foo destroy +} -result good test oo-3.1 {basic test of OO functionality: destructor} -setup { - # This is a bit complex because it needs to run in a sub-interp as - # we're modifying the root object class's constructor + # This is a bit complex because it needs to run in a sub-interp as we're + # modifying the root object class's constructor interp create subinterp initInterpreter subinterp subinterp eval { -- cgit v0.12 From 9336e00b814e5a54eb52156cf83382b234a4091d Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 8 May 2009 09:56:09 +0000 Subject: Oops, forgot to do a ChangeLog entry for the fix for [Bug 2414858]. --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7a7bb1b..4cda0ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-05-08 Donal K. Fellows + * generic/tclOO.c (TclNRNewObjectInstance): [Bug 2414858]: Add a + * generic/tclBasic.c (TclPushTailcallPoint): marker to the stack of + NRE callbacks at the right point so that tailcall works correctly in a + constructor. + * tests/exec.test (cat): [Bug 2788468]: Adjust the scripted version of cat so that it does not perform transformations on the data it is working with, making it more like the standard Unix 'cat' program. -- cgit v0.12 From b22f54f848812fa00c28429de1d615a35ae84edc Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 12 May 2009 20:26:03 +0000 Subject: Make our mkstemp() replacement build on IRIX 6.5. --- ChangeLog | 5 +++++ compat/mkstemp.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4cda0ee..144b70d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-12 Donal K. Fellows + + * compat/mkstemp.c: Add more headers to make this file build on IRIX + 6.5. Thanks to Larry McVoy for this. + 2009-05-08 Donal K. Fellows * generic/tclOO.c (TclNRNewObjectInstance): [Bug 2414858]: Add a diff --git a/compat/mkstemp.c b/compat/mkstemp.c index 8adc11b..f86bde2 100644 --- a/compat/mkstemp.c +++ b/compat/mkstemp.c @@ -8,9 +8,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: mkstemp.c,v 1.1 2009/01/02 16:43:50 dkf Exp $ + * RCS: @(#) $Id: mkstemp.c,v 1.2 2009/05/12 20:26:04 dkf Exp $ */ +#include +#include #include #include -- cgit v0.12 From d74e8071c1c7f3f6beab32de661594d4ff492786 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 12 May 2009 22:48:42 +0000 Subject: "There's something very important I forgot to tell you." "What?" "Don't nest the vwaits." "Why?" "It would be bad." "I'm fuzzy on the whole good/bad thing. What do you mean, 'bad'?" "Try to imagine all processing as you know it stopping gradually and every stack frame in your process spewing their guts at you." "Stack space exhaustion." "Right. That's bad. Okay. All right. Important safety tip." --- ChangeLog | 3 +++ doc/vwait.n | 57 ++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 144b70d..6cefa27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-05-12 Donal K. Fellows + * doc/vwait.n: Added more words to make it clear just how bad it is to + nest [vwait]s. DON'T DO IT GUYS! + * compat/mkstemp.c: Add more headers to make this file build on IRIX 6.5. Thanks to Larry McVoy for this. diff --git a/doc/vwait.n b/doc/vwait.n index fb62fdf..9a63813 100644 --- a/doc/vwait.n +++ b/doc/vwait.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: vwait.n,v 1.9 2009/04/04 17:32:00 dkf Exp $ +'\" RCS: @(#) $Id: vwait.n,v 1.10 2009/05/12 22:48:42 dkf Exp $ '\" .so man.macros .TH vwait n 8.0 Tcl "Tcl Built-In Commands" @@ -27,13 +27,21 @@ a variable name with respect to the global namespace, but can refer to any namespace's variables if the fully-qualified name is given. .PP In some cases the \fBvwait\fR command may not return immediately -after \fIvarName\fR is set. This can happen if the event handler +after \fIvarName\fR is set. This happens if the event handler that sets \fIvarName\fR does not complete immediately. For example, if an event handler sets \fIvarName\fR and then itself calls \fBvwait\fR to wait for a different variable, then it may not return for a long time. During this time the top-level \fBvwait\fR is blocked waiting for the event handler to complete, so it cannot return either. +.PP +To be clear, \fImultiple \fBvwait\fI calls will nest and will not happen in +parallel\fR. The outermost call to \fBvwait\fR will not return until all the +inner ones do. It is recommended that code should never nest \fBvwait\fR +calls (by avoiding putting them in event callbacks) but when that is not +possible, care should be taken to add interlock variables to the code to +prevent all reentrant calls to \fBvwait\fR that are not \fIstrictly\fR +necessary. .SH EXAMPLES .PP Run the event-loop continually until some event calls \fBexit\fR. @@ -77,22 +85,45 @@ switch $state { .CE .PP A command that will wait for some time delay by waiting for a namespace -variable to be set. Includes an interlock to prevent nested waits. +variable to be set. Includes an interlock to prevent nested waits. .PP .CS namespace eval example { - variable v done - proc wait {delay} { - variable v - if {$v ne "waiting"} { - set v waiting - after $delay [namespace code {set v done}] - \fBvwait\fR [namespace which -variable v] - } - return $v - } + variable v done + proc wait {delay} { + variable v + if {$v ne "waiting"} { + set v waiting + after $delay [namespace code {set v done}] + \fBvwait\fR [namespace which -variable v] + } + return $v + } } .CE +.PP +When running inside a \fBcoroutine\fR, an alternative to using \fBvwait\fR is +to \fByield\fR to an outer event loop and to get recommenced when the variable +is set, or at an idle moment after that. +.PP +.CS +coroutine task apply {{} { + # simulate [after 1000] + after 1000 [info coroutine] + yield + + # schedule the setting of a global variable, as normal + after 2000 {set var 1} + + # simulate [\fBvwait\fR var] + proc updatedVar {task args} { + after idle $task + trace remove variable ::var write "updatedVar $task" + } + trace add variable ::var write "updatedVar [info coroutine]" + yield +}} +.CE .SH "SEE ALSO" global(n), update(n) .SH KEYWORDS -- cgit v0.12 From 3df4112fe292b761482313d90a8d7612a8853da0 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 12 May 2009 22:53:23 +0000 Subject: (With apologies to Ghostbusters...) --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6cefa27..b5f6716 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2009-05-12 Donal K. Fellows * doc/vwait.n: Added more words to make it clear just how bad it is to - nest [vwait]s. DON'T DO IT GUYS! + nest [vwait]s. * compat/mkstemp.c: Add more headers to make this file build on IRIX 6.5. Thanks to Larry McVoy for this. -- cgit v0.12 From c17a6f4f80e5bb7dcdf8e5c1740443906d6ae89a Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 15 May 2009 09:14:45 +0000 Subject: a little minor emacs niceness --- doc/return.n | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/return.n b/doc/return.n index 5630206..d771c28 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.21 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: return.n,v 1.22 2009/05/15 09:14:45 dkf Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -304,3 +304,6 @@ proc myReturn {args} { break(n), catch(n), continue(n), dict(n), error(n), proc(n), source(n), tclvars(n) .SH KEYWORDS break, catch, continue, error, procedure, return +.\" Local Variables: +.\" mode: nroff +.\" End: -- cgit v0.12 From 11bd2610c43ddd48a8bbf6b2e594df74b4f2ac4c Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 15 May 2009 10:08:02 +0000 Subject: Added more introspection: ability to look up namespace of an object. --- ChangeLog | 6 ++++++ doc/info.n | 8 +++++++- generic/tclOOInfo.c | 37 ++++++++++++++++++++++++++++++++++++- tests/oo.test | 12 ++++++++++-- 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b5f6716..e53961f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-14 Donal K. Fellows + + * generic/tclOOInfo.c (InfoObjectNsCmd): Added introspection mechanism + for finding out what an object's namespace is. Experience suggests + that it is just too useful to be able to do without it. + 2009-05-12 Donal K. Fellows * doc/vwait.n: Added more words to make it clear just how bad it is to diff --git a/doc/info.n b/doc/info.n index 58bf428..b4c4b60 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.32 2008/10/19 16:27:58 dkf Exp $ +'\" RCS: @(#) $Id: info.n,v 1.33 2009/05/15 10:08:02 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -567,6 +567,12 @@ This subcommand returns a list of all classes that have been mixed into the object named \fIobject\fR. .VE 8.6 .TP +\fBinfo object namespace\fI object\fR +.VS 8.6 +This subcommand returns the name of the internal namespace of the object named +\fIobject\fR. +.VE 8.6 +.TP \fBinfo object variables\fI object\fR .VS 8.6 This subcommand returns a list of all variables that have been declared for diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index daacc02..9874864 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.12 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.13 2009/05/15 10:08:02 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -26,6 +26,7 @@ static Tcl_ObjCmdProc InfoObjectForwardCmd; static Tcl_ObjCmdProc InfoObjectIsACmd; static Tcl_ObjCmdProc InfoObjectMethodsCmd; static Tcl_ObjCmdProc InfoObjectMixinsCmd; +static Tcl_ObjCmdProc InfoObjectNsCmd; static Tcl_ObjCmdProc InfoObjectVarsCmd; static Tcl_ObjCmdProc InfoObjectVariablesCmd; static Tcl_ObjCmdProc InfoClassConstrCmd; @@ -54,6 +55,7 @@ static const struct NameProcMap infoObjectCmds[] = { {"::oo::InfoObject::isa", InfoObjectIsACmd}, {"::oo::InfoObject::methods", InfoObjectMethodsCmd}, {"::oo::InfoObject::mixins", InfoObjectMixinsCmd}, + {"::oo::InfoObject::namespace", InfoObjectNsCmd}, {"::oo::InfoObject::variables", InfoObjectVariablesCmd}, {"::oo::InfoObject::vars", InfoObjectVarsCmd}, {NULL, NULL} @@ -643,6 +645,39 @@ InfoObjectMixinsCmd( /* * ---------------------------------------------------------------------- * + * InfoObjectNsCmd -- + * + * Implements [info object namespace $objName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectNsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "objName"); + return TCL_ERROR; + } + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + Tcl_SetObjResult(interp, + Tcl_NewStringObj(oPtr->namespacePtr->fullName, -1)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * * InfoObjectVariablesCmd -- * * Implements [info object variables $objName] diff --git a/tests/oo.test b/tests/oo.test index c8957b3..da295a6 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.26 2009/05/08 08:48:19 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.27 2009/05/15 10:08:02 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1319,7 +1319,7 @@ test oo-16.2 {OO: object introspection} -body { } -returnCodes 1 -result {NOTANOBJECT does not refer to an object} test oo-16.3 {OO: object introspection} -body { info object gorp oo::object -} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, variables, or vars} +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, namespace, variables, or vars} test oo-16.4 {OO: object introspection} -setup { oo::class create meta { superclass oo::class } [meta create instance1] create instance2 @@ -1416,6 +1416,14 @@ test oo-16.12 {OO: object introspection} -setup { oo::objdefine foo unexport {*}[info object methods foo -all] info object methods foo -all } -result {} +test oo-16.13 {OO: object introspection} -setup { + oo::object create foo +} -cleanup { + rename foo {} +} -body { + oo::objdefine foo method Bar {} {return "ok in foo"} + [info object namespace foo]::my Bar +} -result "ok in foo" test oo-17.1 {OO: class introspection} -body { info class -- cgit v0.12 From 2c662b5c9124de8ddab0d178bb7950d3633b96b4 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 16 May 2009 03:43:56 +0000 Subject: fix TCL_COMPILE_DEBUG 64bit warnings --- generic/tclExecute.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index e6eff03..9b7784e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.435 2009/05/08 01:02:26 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.436 2009/05/16 03:43:56 das Exp $ */ #include "tclInt.h" @@ -2046,7 +2046,7 @@ TclExecuteByteCode( #ifdef TCL_COMPILE_DEBUG if (tclTraceExec >= 2) { PrintByteCodeInfo(codePtr); - fprintf(stdout, " Starting stack top=%d\n", CURR_DEPTH); + fprintf(stdout, " Starting stack top=%d\n", (int) CURR_DEPTH); fflush(stdout); } #endif @@ -6979,7 +6979,7 @@ TclExecuteByteCode( *(++catchTop) = CURR_DEPTH; TRACE(("%u => catchTop=%d, stackTop=%d\n", - TclGetUInt4AtPtr(pc+1), (catchTop - initCatchTop - 1), + TclGetUInt4AtPtr(pc+1), (int) (catchTop - initCatchTop - 1), (int) CURR_DEPTH)); NEXT_INST_F(5, 0, 0); @@ -6987,7 +6987,7 @@ TclExecuteByteCode( catchTop--; Tcl_ResetResult(interp); result = TCL_OK; - TRACE(("=> catchTop=%d\n", (catchTop - initCatchTop - 1))); + TRACE(("=> catchTop=%d\n", (int) (catchTop - initCatchTop - 1))); NEXT_INST_F(1, 0, 0); case INST_PUSH_RESULT: @@ -7748,7 +7748,7 @@ TclExecuteByteCode( if (traceInstructions) { fprintf(stdout, " ... found catch at %d, catchTop=%d, " "unwound to %ld, new pc %u\n", - rangePtr->codeOffset, catchTop - initCatchTop - 1, + rangePtr->codeOffset, (int) (catchTop - initCatchTop - 1), (long) *catchTop, (unsigned) rangePtr->catchOffset); } #endif -- cgit v0.12 From 686a9ae36c1dd80c640cfd86c054fc097a9931d5 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 26 May 2009 09:08:05 +0000 Subject: Fixed documentation of the right-associativity of the ** operator. --- ChangeLog | 5 +++++ doc/expr.n | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e53961f..78c0bba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-26 Alexandre Ferrieux + + * doc/expr.n: Fixed documentation of the right-associativity of + the ** operator. + 2009-05-14 Donal K. Fellows * generic/tclOOInfo.c (InfoObjectNsCmd): Added introspection mechanism diff --git a/doc/expr.n b/doc/expr.n index b3c80cc..c9a81bb 100644 --- a/doc/expr.n +++ b/doc/expr.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: expr.n,v 1.37 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: expr.n,v 1.38 2009/05/26 09:08:05 ferrieux Exp $ '\" .so man.macros .TH expr n 8.5 Tcl "Tcl Built-In Commands" @@ -206,14 +206,20 @@ produced by each operator. The exponentiation operator promotes types like the multiply and divide operators, and produces a result that is the same as the output of the \fBpow\fR function (after any type conversions.) -All of the binary operators group left-to-right within the same -precedence level. For example, the command +All of the binary operators but exponentiation group left-to-right +within the same precedence level; exponentiation groups right-to-left. For example, the command .PP .CS \fBexpr\fR {4*2 < 7} .CE .PP -returns 0. +returns 0, while +.PP +.CS +\fBexpr\fR {2**3**2} +.CE +.PP +returns 512. .PP The \fB&&\fR, \fB||\fR, and \fB?:\fR operators have .QW "lazy evaluation" , -- cgit v0.12 From cec98104c9b7cc006a347b3b517fb1303d77ee2d Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 26 May 2009 09:26:59 +0000 Subject: Ascribe due credit in ChangeLog. --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 78c0bba..fa0a55c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2009-05-26 Alexandre Ferrieux * doc/expr.n: Fixed documentation of the right-associativity of - the ** operator. + the ** operator. (spotted by kbk) 2009-05-14 Donal K. Fellows -- cgit v0.12 From 352b739216839cdb9ba6fadbbd71e59fef7353a9 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 29 May 2009 16:28:40 +0000 Subject: * library/platform/platform.tcl: Fixed handling of cpu ia64, * library/platform/pkgIndex.tcl: taking ia64_32 into account * unix/Makefile.in: now. Bumped version to 1.0.5. Updated the * win/Makefile.in: installation commands. --- ChangeLog | 7 +++++++ library/platform/pkgIndex.tcl | 2 +- library/platform/platform.tcl | 6 +++--- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa0a55c..0e88eb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-05-29 Andreas Kupries + + * library/platform/platform.tcl: Fixed handling of cpu ia64, + * library/platform/pkgIndex.tcl: taking ia64_32 into account + * unix/Makefile.in: now. Bumped version to 1.0.5. Updated the + * win/Makefile.in: installation commands. + 2009-05-26 Alexandre Ferrieux * doc/expr.n: Fixed documentation of the right-associativity of diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index a63f4aa..0b69432 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.4 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.5 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index b42c419..1a454cd 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -103,7 +103,7 @@ proc ::platform::generic {} { } sunos { set plat solaris - if {$cpu ne "ia64"} { + if {![string match "ia64*" $cpu]} { if {$tcl_platform(wordSize) == 8} { append cpu 64 } @@ -127,7 +127,7 @@ proc ::platform::generic {} { } hp-ux { set plat hpux - if {$cpu ne "ia64"} { + if {![string match "ia64*" $cpu]} { set cpu parisc if {$tcl_platform(wordSize) == 8} { append cpu 64 @@ -289,7 +289,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.4 +package provide platform 1.0.5 # ### ### ### ######### ######### ######### ## Demo application diff --git a/unix/Makefile.in b/unix/Makefile.in index f4f6ae9..301cd7f 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.269 2009/04/24 15:07:21 stwo Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.270 2009/05/29 16:28:40 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -832,8 +832,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.3.1 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.1.tm; - @echo "Installing package platform 1.0.4 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.4.tm; + @echo "Installing package platform 1.0.5 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.5.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 1f6d5ce..21c9990 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.155 2009/04/19 18:28:00 patthoyts Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.156 2009/05/29 16:28:40 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -707,8 +707,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm; @echo "Installing package tcltest 2.3.1 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.1.tm; - @echo "Installing package platform 1.0.4 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.4.tm; + @echo "Installing package platform 1.0.5 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.5.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12 From a429ec2085c23377f5746492ce8c8cc87de6223d Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 30 May 2009 03:32:39 +0000 Subject: Applied Olson's tzdata2009h --- ChangeLog | 5 ++ library/tzdata/Africa/Cairo | 182 ++++++++++++++++++++++---------------------- library/tzdata/Asia/Amman | 28 +++---- 3 files changed, 110 insertions(+), 105 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e88eb3..a005fa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-30 Kevin B. Kenny + + * library/tzdata/Africa/Cairo: + * library/tzdata/Asia/Amman: Olson's tzdata2009h. + 2009-05-29 Andreas Kupries * library/platform/platform.tcl: Fixed handling of cpu ia64, diff --git a/library/tzdata/Africa/Cairo b/library/tzdata/Africa/Cairo index d812a44..5eca6e2 100644 --- a/library/tzdata/Africa/Cairo +++ b/library/tzdata/Africa/Cairo @@ -120,185 +120,185 @@ set TZData(:Africa/Cairo) { {1209074400 10800 1 EEST} {1219957200 7200 0 EET} {1240524000 10800 1 EEST} - {1251406800 7200 0 EET} + {1253826000 7200 0 EET} {1272578400 10800 1 EEST} - {1282856400 7200 0 EET} + {1285880400 7200 0 EET} {1304028000 10800 1 EEST} - {1314306000 7200 0 EET} + {1317330000 7200 0 EET} {1335477600 10800 1 EEST} - {1346360400 7200 0 EET} + {1348779600 7200 0 EET} {1366927200 10800 1 EEST} - {1377810000 7200 0 EET} + {1380229200 7200 0 EET} {1398376800 10800 1 EEST} - {1409259600 7200 0 EET} + {1411678800 7200 0 EET} {1429826400 10800 1 EEST} - {1440709200 7200 0 EET} + {1443128400 7200 0 EET} {1461880800 10800 1 EEST} - {1472158800 7200 0 EET} + {1475182800 7200 0 EET} {1493330400 10800 1 EEST} - {1504213200 7200 0 EET} + {1506632400 7200 0 EET} {1524780000 10800 1 EEST} - {1535662800 7200 0 EET} + {1538082000 7200 0 EET} {1556229600 10800 1 EEST} - {1567112400 7200 0 EET} + {1569531600 7200 0 EET} {1587679200 10800 1 EEST} - {1598562000 7200 0 EET} + {1600981200 7200 0 EET} {1619733600 10800 1 EEST} - {1630011600 7200 0 EET} + {1633035600 7200 0 EET} {1651183200 10800 1 EEST} - {1661461200 7200 0 EET} + {1664485200 7200 0 EET} {1682632800 10800 1 EEST} - {1693515600 7200 0 EET} + {1695934800 7200 0 EET} {1714082400 10800 1 EEST} - {1724965200 7200 0 EET} + {1727384400 7200 0 EET} {1745532000 10800 1 EEST} - {1756414800 7200 0 EET} + {1758834000 7200 0 EET} {1776981600 10800 1 EEST} - {1787864400 7200 0 EET} + {1790283600 7200 0 EET} {1809036000 10800 1 EEST} - {1819314000 7200 0 EET} + {1822338000 7200 0 EET} {1840485600 10800 1 EEST} - {1851368400 7200 0 EET} + {1853787600 7200 0 EET} {1871935200 10800 1 EEST} - {1882818000 7200 0 EET} + {1885237200 7200 0 EET} {1903384800 10800 1 EEST} - {1914267600 7200 0 EET} + {1916686800 7200 0 EET} {1934834400 10800 1 EEST} - {1945717200 7200 0 EET} + {1948136400 7200 0 EET} {1966888800 10800 1 EEST} - {1977166800 7200 0 EET} + {1980190800 7200 0 EET} {1998338400 10800 1 EEST} - {2008616400 7200 0 EET} + {2011640400 7200 0 EET} {2029788000 10800 1 EEST} - {2040670800 7200 0 EET} + {2043090000 7200 0 EET} {2061237600 10800 1 EEST} - {2072120400 7200 0 EET} + {2074539600 7200 0 EET} {2092687200 10800 1 EEST} - {2103570000 7200 0 EET} + {2105989200 7200 0 EET} {2124136800 10800 1 EEST} - {2135019600 7200 0 EET} + {2137438800 7200 0 EET} {2156191200 10800 1 EEST} - {2166469200 7200 0 EET} + {2169493200 7200 0 EET} {2187640800 10800 1 EEST} - {2197918800 7200 0 EET} + {2200942800 7200 0 EET} {2219090400 10800 1 EEST} - {2229973200 7200 0 EET} + {2232392400 7200 0 EET} {2250540000 10800 1 EEST} - {2261422800 7200 0 EET} + {2263842000 7200 0 EET} {2281989600 10800 1 EEST} - {2292872400 7200 0 EET} + {2295291600 7200 0 EET} {2313439200 10800 1 EEST} - {2324322000 7200 0 EET} + {2326741200 7200 0 EET} {2345493600 10800 1 EEST} - {2355771600 7200 0 EET} + {2358795600 7200 0 EET} {2376943200 10800 1 EEST} - {2387826000 7200 0 EET} + {2390245200 7200 0 EET} {2408392800 10800 1 EEST} - {2419275600 7200 0 EET} + {2421694800 7200 0 EET} {2439842400 10800 1 EEST} - {2450725200 7200 0 EET} + {2453144400 7200 0 EET} {2471292000 10800 1 EEST} - {2482174800 7200 0 EET} + {2484594000 7200 0 EET} {2503346400 10800 1 EEST} - {2513624400 7200 0 EET} + {2516648400 7200 0 EET} {2534796000 10800 1 EEST} - {2545074000 7200 0 EET} + {2548098000 7200 0 EET} {2566245600 10800 1 EEST} - {2577128400 7200 0 EET} + {2579547600 7200 0 EET} {2597695200 10800 1 EEST} - {2608578000 7200 0 EET} + {2610997200 7200 0 EET} {2629144800 10800 1 EEST} - {2640027600 7200 0 EET} + {2642446800 7200 0 EET} {2660594400 10800 1 EEST} - {2671477200 7200 0 EET} + {2673896400 7200 0 EET} {2692648800 10800 1 EEST} - {2702926800 7200 0 EET} + {2705950800 7200 0 EET} {2724098400 10800 1 EEST} - {2734981200 7200 0 EET} + {2737400400 7200 0 EET} {2755548000 10800 1 EEST} - {2766430800 7200 0 EET} + {2768850000 7200 0 EET} {2786997600 10800 1 EEST} - {2797880400 7200 0 EET} + {2800299600 7200 0 EET} {2818447200 10800 1 EEST} - {2829330000 7200 0 EET} + {2831749200 7200 0 EET} {2850501600 10800 1 EEST} - {2860779600 7200 0 EET} + {2863803600 7200 0 EET} {2881951200 10800 1 EEST} - {2892229200 7200 0 EET} + {2895253200 7200 0 EET} {2913400800 10800 1 EEST} - {2924283600 7200 0 EET} + {2926702800 7200 0 EET} {2944850400 10800 1 EEST} - {2955733200 7200 0 EET} + {2958152400 7200 0 EET} {2976300000 10800 1 EEST} - {2987182800 7200 0 EET} + {2989602000 7200 0 EET} {3007749600 10800 1 EEST} - {3018632400 7200 0 EET} + {3021051600 7200 0 EET} {3039804000 10800 1 EEST} - {3050082000 7200 0 EET} + {3053106000 7200 0 EET} {3071253600 10800 1 EEST} - {3081531600 7200 0 EET} + {3084555600 7200 0 EET} {3102703200 10800 1 EEST} - {3113586000 7200 0 EET} + {3116005200 7200 0 EET} {3134152800 10800 1 EEST} - {3145035600 7200 0 EET} + {3147454800 7200 0 EET} {3165602400 10800 1 EEST} - {3176485200 7200 0 EET} + {3178904400 7200 0 EET} {3197052000 10800 1 EEST} - {3207934800 7200 0 EET} + {3210354000 7200 0 EET} {3229106400 10800 1 EEST} - {3239384400 7200 0 EET} + {3242408400 7200 0 EET} {3260556000 10800 1 EEST} - {3271438800 7200 0 EET} + {3273858000 7200 0 EET} {3292005600 10800 1 EEST} - {3302888400 7200 0 EET} + {3305307600 7200 0 EET} {3323455200 10800 1 EEST} - {3334338000 7200 0 EET} + {3336757200 7200 0 EET} {3354904800 10800 1 EEST} - {3365787600 7200 0 EET} + {3368206800 7200 0 EET} {3386959200 10800 1 EEST} - {3397237200 7200 0 EET} + {3400261200 7200 0 EET} {3418408800 10800 1 EEST} - {3428686800 7200 0 EET} + {3431710800 7200 0 EET} {3449858400 10800 1 EEST} - {3460741200 7200 0 EET} + {3463160400 7200 0 EET} {3481308000 10800 1 EEST} - {3492190800 7200 0 EET} + {3494610000 7200 0 EET} {3512757600 10800 1 EEST} - {3523640400 7200 0 EET} + {3526059600 7200 0 EET} {3544207200 10800 1 EEST} - {3555090000 7200 0 EET} + {3557509200 7200 0 EET} {3576261600 10800 1 EEST} - {3586539600 7200 0 EET} + {3589563600 7200 0 EET} {3607711200 10800 1 EEST} - {3618594000 7200 0 EET} + {3621013200 7200 0 EET} {3639160800 10800 1 EEST} - {3650043600 7200 0 EET} + {3652462800 7200 0 EET} {3670610400 10800 1 EEST} - {3681493200 7200 0 EET} + {3683912400 7200 0 EET} {3702060000 10800 1 EEST} - {3712942800 7200 0 EET} + {3715362000 7200 0 EET} {3734114400 10800 1 EEST} - {3744392400 7200 0 EET} + {3747416400 7200 0 EET} {3765564000 10800 1 EEST} - {3775842000 7200 0 EET} + {3778866000 7200 0 EET} {3797013600 10800 1 EEST} - {3807896400 7200 0 EET} + {3810315600 7200 0 EET} {3828463200 10800 1 EEST} - {3839346000 7200 0 EET} + {3841765200 7200 0 EET} {3859912800 10800 1 EEST} - {3870795600 7200 0 EET} + {3873214800 7200 0 EET} {3891362400 10800 1 EEST} - {3902245200 7200 0 EET} + {3904664400 7200 0 EET} {3923416800 10800 1 EEST} - {3933694800 7200 0 EET} + {3936718800 7200 0 EET} {3954866400 10800 1 EEST} - {3965144400 7200 0 EET} + {3968168400 7200 0 EET} {3986316000 10800 1 EEST} - {3997198800 7200 0 EET} + {3999618000 7200 0 EET} {4017765600 10800 1 EEST} - {4028648400 7200 0 EET} + {4031067600 7200 0 EET} {4049215200 10800 1 EEST} - {4060098000 7200 0 EET} + {4062517200 7200 0 EET} {4080664800 10800 1 EEST} - {4091547600 7200 0 EET} + {4093966800 7200 0 EET} } diff --git a/library/tzdata/Asia/Amman b/library/tzdata/Asia/Amman index 0c6ffcb..bf30508 100644 --- a/library/tzdata/Asia/Amman +++ b/library/tzdata/Asia/Amman @@ -55,7 +55,7 @@ set TZData(:Asia/Amman) { {1066946400 7200 0 EET} {1080252000 10800 1 EEST} {1097791200 7200 0 EET} - {1111701600 10800 1 EEST} + {1112306400 10800 1 EEST} {1128031200 7200 0 EET} {1143756000 10800 1 EEST} {1161900000 7200 0 EET} @@ -67,7 +67,7 @@ set TZData(:Asia/Amman) { {1256853600 7200 0 EET} {1269554400 10800 1 EEST} {1288303200 7200 0 EET} - {1301004000 10800 1 EEST} + {1301608800 10800 1 EEST} {1319752800 7200 0 EET} {1333058400 10800 1 EEST} {1351202400 7200 0 EET} @@ -77,7 +77,7 @@ set TZData(:Asia/Amman) { {1414706400 7200 0 EET} {1427407200 10800 1 EEST} {1446156000 7200 0 EET} - {1458856800 10800 1 EEST} + {1459461600 10800 1 EEST} {1477605600 7200 0 EET} {1490911200 10800 1 EEST} {1509055200 7200 0 EET} @@ -89,7 +89,7 @@ set TZData(:Asia/Amman) { {1604008800 7200 0 EET} {1616709600 10800 1 EEST} {1635458400 7200 0 EET} - {1648159200 10800 1 EEST} + {1648764000 10800 1 EEST} {1666908000 7200 0 EET} {1680213600 10800 1 EEST} {1698357600 7200 0 EET} @@ -111,7 +111,7 @@ set TZData(:Asia/Amman) { {1951164000 7200 0 EET} {1963864800 10800 1 EEST} {1982613600 7200 0 EET} - {1995314400 10800 1 EEST} + {1995919200 10800 1 EEST} {2014063200 7200 0 EET} {2027368800 10800 1 EEST} {2045512800 7200 0 EET} @@ -123,7 +123,7 @@ set TZData(:Asia/Amman) { {2140466400 7200 0 EET} {2153167200 10800 1 EEST} {2171916000 7200 0 EET} - {2184616800 10800 1 EEST} + {2185221600 10800 1 EEST} {2203365600 7200 0 EET} {2216671200 10800 1 EEST} {2234815200 7200 0 EET} @@ -133,7 +133,7 @@ set TZData(:Asia/Amman) { {2298319200 7200 0 EET} {2311020000 10800 1 EEST} {2329768800 7200 0 EET} - {2342469600 10800 1 EEST} + {2343074400 10800 1 EEST} {2361218400 7200 0 EET} {2374524000 10800 1 EEST} {2392668000 7200 0 EET} @@ -145,7 +145,7 @@ set TZData(:Asia/Amman) { {2487621600 7200 0 EET} {2500322400 10800 1 EEST} {2519071200 7200 0 EET} - {2531772000 10800 1 EEST} + {2532376800 10800 1 EEST} {2550520800 7200 0 EET} {2563826400 10800 1 EEST} {2581970400 7200 0 EET} @@ -167,7 +167,7 @@ set TZData(:Asia/Amman) { {2834776800 7200 0 EET} {2847477600 10800 1 EEST} {2866226400 7200 0 EET} - {2878927200 10800 1 EEST} + {2879532000 10800 1 EEST} {2897676000 7200 0 EET} {2910981600 10800 1 EEST} {2929125600 7200 0 EET} @@ -179,7 +179,7 @@ set TZData(:Asia/Amman) { {3024079200 7200 0 EET} {3036780000 10800 1 EEST} {3055528800 7200 0 EET} - {3068229600 10800 1 EEST} + {3068834400 10800 1 EEST} {3086978400 7200 0 EET} {3100284000 10800 1 EEST} {3118428000 7200 0 EET} @@ -189,7 +189,7 @@ set TZData(:Asia/Amman) { {3181932000 7200 0 EET} {3194632800 10800 1 EEST} {3213381600 7200 0 EET} - {3226082400 10800 1 EEST} + {3226687200 10800 1 EEST} {3244831200 7200 0 EET} {3258136800 10800 1 EEST} {3276280800 7200 0 EET} @@ -201,7 +201,7 @@ set TZData(:Asia/Amman) { {3371234400 7200 0 EET} {3383935200 10800 1 EEST} {3402684000 7200 0 EET} - {3415384800 10800 1 EEST} + {3415989600 10800 1 EEST} {3434133600 7200 0 EET} {3447439200 10800 1 EEST} {3465583200 7200 0 EET} @@ -223,7 +223,7 @@ set TZData(:Asia/Amman) { {3718389600 7200 0 EET} {3731090400 10800 1 EEST} {3749839200 7200 0 EET} - {3762540000 10800 1 EEST} + {3763144800 10800 1 EEST} {3781288800 7200 0 EET} {3794594400 10800 1 EEST} {3812738400 7200 0 EET} @@ -235,7 +235,7 @@ set TZData(:Asia/Amman) { {3907692000 7200 0 EET} {3920392800 10800 1 EEST} {3939141600 7200 0 EET} - {3951842400 10800 1 EEST} + {3952447200 10800 1 EEST} {3970591200 7200 0 EET} {3983896800 10800 1 EEST} {4002040800 7200 0 EET} -- cgit v0.12 From 185d4d9fcac0b74cf424872662dec1af7c201d2f Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 1 Jun 2009 21:34:22 +0000 Subject: * tests/expr.test: Added many tests demonstrating the broken cases of [Bug 2798543]. --- ChangeLog | 7 +- tests/expr.test | 327 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 332 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a005fa9..912c7e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2009-05-30 Kevin B. Kenny +2009-06-01 Don Porter + + * tests/expr.test: Added many tests demonstrating the broken + cases of [Bug 2798543]. + +009-05-30 Kevin B. Kenny * library/tzdata/Africa/Cairo: * library/tzdata/Asia/Amman: Olson's tzdata2009h. diff --git a/tests/expr.test b/tests/expr.test index d9612ac..5662169 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.74 2009/01/06 15:24:49 dkf Exp $ +# RCS: @(#) $Id: expr.test,v 1.75 2009/06/01 21:34:22 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1103,6 +1103,331 @@ test expr-23.53 {INST_EXPON: intermediate powers of 64-bit integers} { } set trouble } {test intermediate powers of 64-bit ints} +test expr-23.54.0 {INST_EXPON: Bug 2798543} { + expr {3**9 == 3**65545} +} 0 +test expr-23.54.1 {INST_EXPON: Bug 2798543} { + expr {3**10 == 3**65546} +} 0 +test expr-23.54.2 {INST_EXPON: Bug 2798543} { + expr {3**11 == 3**65547} +} 0 +test expr-23.54.3 {INST_EXPON: Bug 2798543} { + expr {3**12 == 3**65548} +} 0 +test expr-23.54.4 {INST_EXPON: Bug 2798543} { + expr {3**13 == 3**65549} +} 0 +test expr-23.54.5 {INST_EXPON: Bug 2798543} { + expr {3**14 == 3**65550} +} 0 +test expr-23.54.6 {INST_EXPON: Bug 2798543} { + expr {3**15 == 3**65551} +} 0 +test expr-23.54.7 {INST_EXPON: Bug 2798543} { + expr {3**16 == 3**65552} +} 0 +test expr-23.54.8 {INST_EXPON: Bug 2798543} { + expr {3**17 == 3**65553} +} 0 +test expr-23.54.9 {INST_EXPON: Bug 2798543} { + expr {3**18 == 3**65554} +} 0 +test expr-23.54.10 {INST_EXPON: Bug 2798543} { + expr {3**19 == 3**65555} +} 0 +test expr-23.54.11 {INST_EXPON: Bug 2798543} { + expr {3**9 == 3**131081} +} 0 +test expr-23.54.12 {INST_EXPON: Bug 2798543} -body { + expr {3**9 == 3**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.54.13 {INST_EXPON: Bug 2798543} { + expr {(-3)**9 == (-3)**65545} +} 0 +test expr-23.55.0 {INST_EXPON: Bug 2798543} { + expr {4**9 == 4**65545} +} 0 +test expr-23.55.1 {INST_EXPON: Bug 2798543} { + expr {4**15 == 4**65551} +} 0 +test expr-23.55.2 {INST_EXPON: Bug 2798543} { + expr {4**9 == 4**131081} +} 0 +test expr-23.55.3 {INST_EXPON: Bug 2798543} -body { + expr {4**9 == 4**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.55.4 {INST_EXPON: Bug 2798543} { + expr {(-4)**9 == (-4)**65545} +} 0 +test expr-23.56.0 {INST_EXPON: Bug 2798543} { + expr {5**9 == 5**65545} +} 0 +test expr-23.56.1 {INST_EXPON: Bug 2798543} { + expr {5**13 == 5**65549} +} 0 +test expr-23.56.2 {INST_EXPON: Bug 2798543} { + expr {5**9 == 5**131081} +} 0 +test expr-23.56.3 {INST_EXPON: Bug 2798543} -body { + expr {5**9 == 5**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.56.4 {INST_EXPON: Bug 2798543} { + expr {(-5)**9 == (-5)**65545} +} 0 +test expr-23.57.0 {INST_EXPON: Bug 2798543} { + expr {6**9 == 6**65545} +} 0 +test expr-23.57.1 {INST_EXPON: Bug 2798543} { + expr {6**11 == 6**65547} +} 0 +test expr-23.57.2 {INST_EXPON: Bug 2798543} { + expr {6**9 == 6**131081} +} 0 +test expr-23.57.3 {INST_EXPON: Bug 2798543} -body { + expr {6**9 == 6**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.57.4 {INST_EXPON: Bug 2798543} { + expr {(-6)**9 == (-6)**65545} +} 0 +test expr-23.58.0 {INST_EXPON: Bug 2798543} { + expr {7**9 == 7**65545} +} 0 +test expr-23.58.1 {INST_EXPON: Bug 2798543} { + expr {7**11 == 7**65547} +} 0 +test expr-23.58.2 {INST_EXPON: Bug 2798543} { + expr {7**9 == 7**131081} +} 0 +test expr-23.58.3 {INST_EXPON: Bug 2798543} -body { + expr {7**9 == 7**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.58.4 {INST_EXPON: Bug 2798543} { + expr {(-7)**9 == (-7)**65545} +} 0 +test expr-23.59.0 {INST_EXPON: Bug 2798543} { + expr {8**9 == 8**65545} +} 0 +test expr-23.59.1 {INST_EXPON: Bug 2798543} { + expr {8**10 == 8**65546} +} 0 +test expr-23.59.2 {INST_EXPON: Bug 2798543} { + expr {8**9 == 8**131081} +} 0 +test expr-23.59.3 {INST_EXPON: Bug 2798543} -body { + expr {8**9 == 8**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.59.4 {INST_EXPON: Bug 2798543} { + expr {(-8)**9 == (-8)**65545} +} 0 +test expr-23.60.0 {INST_EXPON: Bug 2798543} { + expr {9**9 == 9**65545} +} 0 +test expr-23.60.1 {INST_EXPON: Bug 2798543} { + expr {9**9 == 9**131081} +} 0 +test expr-23.60.2 {INST_EXPON: Bug 2798543} -body { + expr {9**9 == 9**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.60.3 {INST_EXPON: Bug 2798543} { + expr {(-9)**9 == (-9)**65545} +} 0 +test expr-23.61.0 {INST_EXPON: Bug 2798543} { + expr {10**9 == 10**65545} +} 0 +test expr-23.61.1 {INST_EXPON: Bug 2798543} { + expr {10**9 == 10**131081} +} 0 +test expr-23.61.2 {INST_EXPON: Bug 2798543} -body { + expr {10**9 == 10**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.61.3 {INST_EXPON: Bug 2798543} { + expr {(-10)**9 == (-10)**65545} +} 0 +test expr-23.62.0 {INST_EXPON: Bug 2798543} { + expr {11**9 == 11**65545} +} 0 +test expr-23.62.1 {INST_EXPON: Bug 2798543} { + expr {11**9 == 11**131081} +} 0 +test expr-23.62.2 {INST_EXPON: Bug 2798543} -body { + expr {11**9 == 11**268435465} +} -returnCodes error -result {exponent too large} +test expr-23.62.3 {INST_EXPON: Bug 2798543} { + expr {(-11)**9 == (-11)**65545} +} 0 +test expr-23.63.0 {INST_EXPON: Bug 2798543} { + expr {3**20 == 3**65556} +} 0 +test expr-23.63.1 {INST_EXPON: Bug 2798543} { + expr {3**39 == 3**65575} +} 0 +test expr-23.63.2 {INST_EXPON: Bug 2798543} { + expr {3**20 == 3**131092} +} 0 +test expr-23.63.3 {INST_EXPON: Bug 2798543} -body { + expr {3**20 == 3**268435476} +} -returnCodes error -result {exponent too large} +test expr-23.63.4 {INST_EXPON: Bug 2798543} { + expr {(-3)**20 == (-3)**65556} +} 0 +test expr-23.64.0 {INST_EXPON: Bug 2798543} { + expr {4**17 == 4**65553} +} 0 +test expr-23.64.1 {INST_EXPON: Bug 2798543} { + expr {4**31 == 4**65567} +} 0 +test expr-23.64.2 {INST_EXPON: Bug 2798543} { + expr {4**17 == 4**131089} +} 0 +test expr-23.64.3 {INST_EXPON: Bug 2798543} -body { + expr {4**17 == 4**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.64.4 {INST_EXPON: Bug 2798543} { + expr {(-4)**17 == (-4)**65553} +} 0 +test expr-23.65.0 {INST_EXPON: Bug 2798543} { + expr {5**17 == 5**65553} +} 0 +test expr-23.65.1 {INST_EXPON: Bug 2798543} { + expr {5**27 == 5**65563} +} 0 +test expr-23.65.2 {INST_EXPON: Bug 2798543} { + expr {5**17 == 5**131089} +} 0 +test expr-23.65.3 {INST_EXPON: Bug 2798543} -body { + expr {5**17 == 5**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.65.4 {INST_EXPON: Bug 2798543} { + expr {(-5)**17 == (-5)**65553} +} 0 +test expr-23.66.0 {INST_EXPON: Bug 2798543} { + expr {6**17 == 6**65553} +} 0 +test expr-23.66.1 {INST_EXPON: Bug 2798543} { + expr {6**24 == 6**65560} +} 0 +test expr-23.66.2 {INST_EXPON: Bug 2798543} { + expr {6**17 == 6**131089} +} 0 +test expr-23.66.3 {INST_EXPON: Bug 2798543} -body { + expr {6**17 == 6**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.66.4 {INST_EXPON: Bug 2798543} { + expr {(-6)**17 == (-6)**65553} +} 0 +test expr-23.67.0 {INST_EXPON: Bug 2798543} { + expr {7**17 == 7**65553} +} 0 +test expr-23.67.1 {INST_EXPON: Bug 2798543} { + expr {7**22 == 7**65558} +} 0 +test expr-23.67.2 {INST_EXPON: Bug 2798543} { + expr {7**17 == 7**131089} +} 0 +test expr-23.67.3 {INST_EXPON: Bug 2798543} -body { + expr {7**17 == 7**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.67.4 {INST_EXPON: Bug 2798543} { + expr {(-7)**17 == (-7)**65553} +} 0 +test expr-23.68.0 {INST_EXPON: Bug 2798543} { + expr {8**17 == 8**65553} +} 0 +test expr-23.68.1 {INST_EXPON: Bug 2798543} { + expr {8**20 == 8**65556} +} 0 +test expr-23.68.2 {INST_EXPON: Bug 2798543} { + expr {8**17 == 8**131089} +} 0 +test expr-23.68.3 {INST_EXPON: Bug 2798543} -body { + expr {8**17 == 8**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.68.4 {INST_EXPON: Bug 2798543} { + expr {(-8)**17 == (-8)**65553} +} 0 +test expr-23.69.0 {INST_EXPON: Bug 2798543} { + expr {9**17 == 9**65553} +} 0 +test expr-23.69.1 {INST_EXPON: Bug 2798543} { + expr {9**19 == 9**65555} +} 0 +test expr-23.69.2 {INST_EXPON: Bug 2798543} { + expr {9**17 == 9**131089} +} 0 +test expr-23.69.3 {INST_EXPON: Bug 2798543} -body { + expr {9**17 == 9**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.69.4 {INST_EXPON: Bug 2798543} { + expr {(-9)**17 == (-9)**65553} +} 0 +test expr-23.70.0 {INST_EXPON: Bug 2798543} { + expr {10**17 == 10**65553} +} 0 +test expr-23.70.1 {INST_EXPON: Bug 2798543} { + expr {10**18 == 10**65554} +} 0 +test expr-23.70.2 {INST_EXPON: Bug 2798543} { + expr {10**17 == 10**131089} +} 0 +test expr-23.70.3 {INST_EXPON: Bug 2798543} -body { + expr {10**17 == 10**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.70.4 {INST_EXPON: Bug 2798543} { + expr {(-10)**17 == (-10)**65553} +} 0 +test expr-23.71.0 {INST_EXPON: Bug 2798543} { + expr {11**17 == 11**65553} +} 0 +test expr-23.71.1 {INST_EXPON: Bug 2798543} { + expr {11**18 == 11**65554} +} 0 +test expr-23.71.2 {INST_EXPON: Bug 2798543} { + expr {11**17 == 11**131089} +} 0 +test expr-23.71.3 {INST_EXPON: Bug 2798543} -body { + expr {11**17 == 11**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.71.4 {INST_EXPON: Bug 2798543} { + expr {(-11)**17 == (-11)**65553} +} 0 +test expr-23.72.0 {INST_EXPON: Bug 2798543} { + expr {12**17 == 12**65553} +} 0 +test expr-23.72.1 {INST_EXPON: Bug 2798543} { + expr {12**17 == 12**131089} +} 0 +test expr-23.72.2 {INST_EXPON: Bug 2798543} -body { + expr {12**17 == 12**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.72.3 {INST_EXPON: Bug 2798543} { + expr {(-12)**17 == (-12)**65553} +} 0 +test expr-23.73.0 {INST_EXPON: Bug 2798543} { + expr {13**17 == 13**65553} +} 0 +test expr-23.73.1 {INST_EXPON: Bug 2798543} { + expr {13**17 == 13**131089} +} 0 +test expr-23.73.2 {INST_EXPON: Bug 2798543} -body { + expr {13**17 == 13**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.73.3 {INST_EXPON: Bug 2798543} { + expr {(-13)**17 == (-13)**65553} +} 0 +test expr-23.74.0 {INST_EXPON: Bug 2798543} { + expr {14**17 == 14**65553} +} 0 +test expr-23.74.1 {INST_EXPON: Bug 2798543} { + expr {14**17 == 14**131089} +} 0 +test expr-23.74.2 {INST_EXPON: Bug 2798543} -body { + expr {14**17 == 14**268435473} +} -returnCodes error -result {exponent too large} +test expr-23.74.3 {INST_EXPON: Bug 2798543} { + expr {(-14)**17 == (-14)**65553} +} 0 + # Some compilers get this wrong; ensure that we work around it correctly test expr-24.1 {expr edge cases; shifting} {expr int(5)>>32} 0 -- cgit v0.12 From 3241e16a0e8aab3db467cc667e23278b164bf10c Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 2 Jun 2009 17:56:19 +0000 Subject: * generic/tclExecute.c: Corrected implementations and selection logic of the INST_EXPON instruction to fix [Bug 2798543]. --- ChangeLog | 5 +++ generic/tclExecute.c | 104 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 68 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 912c7e7..c5a354d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-06-02 Don Porter + + * generic/tclExecute.c: Corrected implementations and selection + logic of the INST_EXPON instruction to fix [Bug 2798543]. + 2009-06-01 Don Porter * tests/expr.test: Added many tests demonstrating the broken diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9b7784e..3d7fcb4 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.436 2009/05/16 03:43:56 das Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.437 2009/06/02 17:56:19 dgp Exp $ */ #include "tclInt.h" @@ -525,7 +525,8 @@ static const Tcl_ObjType dictIteratorType = { * signed integer */ -static const long MaxBase32[7] = {46340, 1290, 215, 73, 35, 21, 14}; +static const long MaxBase32[] = {46340, 1290, 215, 73, 35, 21, 14}; +static const size_t MaxBase32Size = sizeof(MaxBase32)/sizeof(long); /* * Table giving 3, 4, ..., 11, raised to the powers 9, 10, ..., as far as they @@ -536,6 +537,7 @@ static const long MaxBase32[7] = {46340, 1290, 215, 73, 35, 21, 14}; static const unsigned short Exp32Index[] = { 0, 11, 18, 23, 26, 29, 31, 32, 33 }; +static const size_t Exp32IndexSize = sizeof(Exp32Index)/sizeof(unsigned short); static const long Exp32Value[] = { 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 262144, 1048576, 4194304, @@ -544,6 +546,7 @@ static const long Exp32Value[] = { 40353607, 282475249, 1977326743, 134217728, 1073741824, 387420489, 1000000000 }; +static const size_t Exp32ValueSize = sizeof(Exp32Value)/sizeof(long); #endif /* LONG_MAX == 0x7fffffff -- 32 bit machine */ @@ -554,7 +557,8 @@ static const long Exp32Value[] = { * Tcl_WideInt. */ -static Tcl_WideInt MaxBaseWide[15]; +static Tcl_WideInt MaxBase64[15]; +static const size_t MaxBase64Size = 15; /* *Table giving 3, 4, ..., 13 raised to powers greater than 16 when the @@ -564,6 +568,7 @@ static Tcl_WideInt MaxBaseWide[15]; static const unsigned short Exp64Index[] = { 0, 23, 38, 49, 57, 63, 67, 70, 72, 74, 75, 76 }; +static const size_t Exp64IndexSize = sizeof(Exp64Index)/sizeof(unsigned short); static const Tcl_WideInt Exp64Value[] = { (Tcl_WideInt)243*243*243*3*3, (Tcl_WideInt)243*243*243*3*3*3, @@ -642,6 +647,7 @@ static const Tcl_WideInt Exp64Value[] = { (Tcl_WideInt)248832*248832*248832*12*12, (Tcl_WideInt)371293*371293*371293*13*13 }; +static const size_t Exp64ValueSize = sizeof(Exp64Value)/sizeof(Tcl_WideInt); #endif @@ -739,7 +745,7 @@ InitByteCodeExecution( * without overflowing a Tcl_WideInt */ - for (i = 2; i <= 16; ++i) { + for (i = 2; i - 2 < MaxBase64Size; ++i) { /* * Compute an initial guess in floating point. */ @@ -758,10 +764,14 @@ InitByteCodeExecution( if (x == 1) { break; } +/* +fprintf(stdout, "Adjust %d: %lld to %lld\n", i, w, w-1); +fflush(stdout); +*/ --w; } - MaxBaseWide[i-2] = w; + MaxBase64[i - 2] = w; } #endif } @@ -5960,8 +5970,10 @@ TclExecuteByteCode( /* TODO: Attempts to re-use unshared operands on stack. */ if (*pc == INST_EXPON) { long l1 = 0, l2 = 0; - Tcl_WideInt w1; int oddExponent = 0, negativeExponent = 0; +#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) + Tcl_WideInt w1; +#endif if (type2 == TCL_NUMBER_LONG) { l2 = *((const long *) ptr2); @@ -6007,9 +6019,11 @@ TclExecuteByteCode( } } + if (type1 == TCL_NUMBER_LONG) { + l1 = *((const long *)ptr1); + } if (negativeExponent) { if (type1 == TCL_NUMBER_LONG) { - l1 = *((const long *)ptr1); switch (l1) { case 0: /* @@ -6046,7 +6060,6 @@ TclExecuteByteCode( } if (type1 == TCL_NUMBER_LONG) { - l1 = *((const long *)ptr1); switch (l1) { case 0: /* @@ -6071,13 +6084,22 @@ TclExecuteByteCode( NEXT_INST_F(1, 2, 1); } } - if (type2 == TCL_NUMBER_BIG) { + /* + * We refuse to accept exponent arguments that exceed + * one mp_digit which means the max exponent value is + * 2**28-1 = 0x0fffffff = 268435455, which fits into + * a signed 32 bit int which is within the range of the + * long int type. This means any numeric Tcl_Obj value + * not using TCL_NUMBER_LONG type must hold a value larger + * than we accept. + */ + if (type2 != TCL_NUMBER_LONG) { Tcl_SetResult(interp, "exponent too large", TCL_STATIC); result = TCL_ERROR; goto checkForCatch; } - if (type1 == TCL_NUMBER_LONG && type2 == TCL_NUMBER_LONG) { + if (type1 == TCL_NUMBER_LONG) { if (l1 == 2) { /* * Reduce small powers of 2 to shifts. @@ -6098,6 +6120,7 @@ TclExecuteByteCode( NEXT_INST_F(1, 2, 1); } #endif + goto overflow; } if (l1 == -2) { int signum = oddExponent ? -1 : 1; @@ -6121,10 +6144,12 @@ TclExecuteByteCode( NEXT_INST_F(1, 2, 1); } #endif + goto overflow; } #if (LONG_MAX == 0x7fffffff) - if (l2 <= 8 && - l1 <= MaxBase32[l2-2] && l1 >= -MaxBase32[l2-2]) { + if (l2 - 2 < MaxBase32Size + && l1 <= MaxBase32[l2 - 2] + && l1 >= -MaxBase32[l2 - 2]) { /* * Small powers of 32-bit integers. */ @@ -6167,13 +6192,12 @@ TclExecuteByteCode( TRACE(("%s\n", O2S(valuePtr))); NEXT_INST_F(1, 1, 0); } - if (l1 >= 3 && - ((unsigned long) l1 < (sizeof(Exp32Index) - / sizeof(unsigned short)) - 1)) { - unsigned short base = Exp32Index[l1-3] - + (unsigned short) l2 - 9; + if (l1 - 3 >= 0 && l1 -2 < Exp32IndexSize + && l2 - 2 < Exp32ValueSize + MaxBase32Size) { - if (base < Exp32Index[l1-2]) { + unsigned short base = Exp32Index[l1 - 3] + + (unsigned short) (l2 - 2 - MaxBase32Size); + if (base < Exp32Index[l1 - 2]) { /* * 32-bit number raised to intermediate power, done by * table lookup. @@ -6190,12 +6214,11 @@ TclExecuteByteCode( NEXT_INST_F(1, 1, 0); } } - if (-l1 >= 3 && (unsigned long)(-l1) < - (sizeof(Exp32Index) / sizeof(unsigned short)) - 1) { - unsigned short base = - Exp32Index[-l1-3] + (unsigned short) l2 - 9; - - if (base < Exp32Index[-l1-2]) { + if (-l1 - 3 >= 0 && -l1 - 2 < Exp32IndexSize + && l2 - 2 < Exp32ValueSize + MaxBase32Size) { + unsigned short base = Exp32Index[-l1 - 3] + + (unsigned short) (l2 - 2 - MaxBase32Size); + if (base < Exp32Index[-l1 - 2]) { long lResult = (oddExponent) ? -Exp32Value[base] : Exp32Value[base]; @@ -6217,6 +6240,7 @@ TclExecuteByteCode( } #endif } +#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) if (type1 == TCL_NUMBER_LONG) { w1 = l1; #ifndef NO_WIDE_TYPE @@ -6224,11 +6248,11 @@ TclExecuteByteCode( w1 = *((const Tcl_WideInt*) ptr1); #endif } else { - w1 = 0; + goto overflow; } -#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) - if (w1 != 0 && type2 == TCL_NUMBER_LONG && l2 <= 16 - && w1 <= MaxBaseWide[l2-2] && w1 >= -MaxBaseWide[l2-2]) { + if (l2 - 2 <= MaxBase64Size + && w1 <= MaxBase64[l2 - 2] + && w1 >= -MaxBase64[l2 - 2]) { /* * Small powers of integers whose result is wide. */ @@ -6318,14 +6342,12 @@ TclExecuteByteCode( * Handle cases of powers > 16 that still fit in a 64-bit word by * doing table lookup. */ + if (w1 - 3 >= 0 && w1 - 2 < Exp64IndexSize + && l2 - 2 < Exp64ValueSize + MaxBase64Size) { + unsigned short base = Exp64Index[w1 - 3] + + (unsigned short) (l2 - 2 - MaxBase64Size); - if (w1 >= 3 && - (Tcl_WideUInt) w1 < (sizeof(Exp64Index) - / sizeof(unsigned short)) - 1) { - unsigned short base = - Exp64Index[w1-3] + (unsigned short) l2 - 17; - - if (base < Exp64Index[w1-2]) { + if (base < Exp64Index[w1 - 2]) { /* * 64-bit number raised to intermediate power, done by * table lookup. @@ -6342,13 +6364,13 @@ TclExecuteByteCode( NEXT_INST_F(1, 1, 0); } } - if (-w1 >= 3 && - (Tcl_WideUInt) (-w1) < (sizeof(Exp64Index) - / sizeof(unsigned short)) - 1) { - unsigned short base = - Exp64Index[-w1-3] + (unsigned short) l2 - 17; - if (base < Exp64Index[-w1-2]) { + if (-w1 - 3 >= 0 && -w1 - 2 < Exp64IndexSize + && l2 - 2 < Exp64ValueSize + MaxBase64Size) { + unsigned short base = Exp64Index[-w1 - 3] + + (unsigned short) (l2 - 2 - MaxBase64Size); + + if (base < Exp64Index[-w1 - 2]) { Tcl_WideInt wResult = (oddExponent) ? -Exp64Value[base] : Exp64Value[base]; /* -- cgit v0.12 From 624410f029718d71c5ce455f9a4533e7a7b4f232 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 2 Jun 2009 19:11:12 +0000 Subject: * generic/tclExecute.c: Replace dynamically-initialized table with a table of static constants in the lookup table for exponent operator computations that fit in a 64 bit integer result. --- ChangeLog | 4 ++++ generic/tclExecute.c | 54 ++++++++++------------------------------------------ 2 files changed, 14 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5a354d..235fe6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-06-02 Don Porter + * generic/tclExecute.c: Replace dynamically-initialized table with + a table of static constants in the lookup table for exponent operator + computations that fit in a 64 bit integer result. + * generic/tclExecute.c: Corrected implementations and selection logic of the INST_EXPON instruction to fix [Bug 2798543]. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3d7fcb4..9a906ea 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.437 2009/06/02 17:56:19 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.438 2009/06/02 19:11:12 dgp Exp $ */ #include "tclInt.h" @@ -557,8 +557,14 @@ static const size_t Exp32ValueSize = sizeof(Exp32Value)/sizeof(long); * Tcl_WideInt. */ -static Tcl_WideInt MaxBase64[15]; -static const size_t MaxBase64Size = 15; +static const Tcl_WideInt MaxBase64[] = { + (Tcl_WideInt)46340*65536+62259, /* 3037000499 == isqrt(2**63-1) */ + (Tcl_WideInt)2097151, (Tcl_WideInt)55108, (Tcl_WideInt)6208, + (Tcl_WideInt)1448, (Tcl_WideInt)511, (Tcl_WideInt)234, (Tcl_WideInt)127, + (Tcl_WideInt)78, (Tcl_WideInt)52, (Tcl_WideInt)38, (Tcl_WideInt)28, + (Tcl_WideInt)22, (Tcl_WideInt)18, (Tcl_WideInt)15 +}; +static const size_t MaxBase64Size = sizeof(MaxBase64)/sizeof(Tcl_WideInt); /* *Table giving 3, 4, ..., 13 raised to powers greater than 16 when the @@ -725,10 +731,6 @@ InitByteCodeExecution( * "tcl_traceExec" is linked to control * instruction tracing. */ { -#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) - int i, j; - Tcl_WideInt w, x; -#endif #ifdef TCL_COMPILE_DEBUG if (Tcl_LinkVar(interp, "tcl_traceExec", (char *) &tclTraceExec, TCL_LINK_INT) != TCL_OK) { @@ -738,42 +740,6 @@ InitByteCodeExecution( #ifdef TCL_COMPILE_STATS Tcl_CreateObjCommand(interp, "evalstats", EvalStatsCmd, NULL, NULL); #endif /* TCL_COMPILE_STATS */ -#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) - - /* - * Fill in a table of what base can be raised to powers 2, 3, ... 16 - * without overflowing a Tcl_WideInt - */ - - for (i = 2; i - 2 < MaxBase64Size; ++i) { - /* - * Compute an initial guess in floating point. - */ - - w = (Tcl_WideInt) pow((double) LLONG_MAX, 1.0 / i) + 1; - - /* - * Correct the guess if it's too high. - */ - - for (;;) { - x = LLONG_MAX; - for (j = 0; j < i; ++j) { - x /= w; - } - if (x == 1) { - break; - } -/* -fprintf(stdout, "Adjust %d: %lld to %lld\n", i, w, w-1); -fflush(stdout); -*/ - --w; - } - - MaxBase64[i - 2] = w; - } -#endif } /* @@ -6250,7 +6216,7 @@ TclExecuteByteCode( } else { goto overflow; } - if (l2 - 2 <= MaxBase64Size + if (l2 - 2 < MaxBase64Size && w1 <= MaxBase64[l2 - 2] && w1 >= -MaxBase64[l2 - 2]) { /* -- cgit v0.12 From 3cd93e3d444a4e12d4172b09ad1ec752afc02ead Mon Sep 17 00:00:00 2001 From: das Date: Wed, 3 Jun 2009 23:12:11 +0000 Subject: fix signed vs unsigned comparison warnings --- generic/tclExecute.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9a906ea..6c89523 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.438 2009/06/02 19:11:12 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.439 2009/06/03 23:12:11 das Exp $ */ #include "tclInt.h" @@ -6113,8 +6113,8 @@ TclExecuteByteCode( goto overflow; } #if (LONG_MAX == 0x7fffffff) - if (l2 - 2 < MaxBase32Size - && l1 <= MaxBase32[l2 - 2] + if (l2 - 2 < (long)MaxBase32Size + && l1 <= MaxBase32[l2 - 2] && l1 >= -MaxBase32[l2 - 2]) { /* * Small powers of 32-bit integers. @@ -6158,8 +6158,8 @@ TclExecuteByteCode( TRACE(("%s\n", O2S(valuePtr))); NEXT_INST_F(1, 1, 0); } - if (l1 - 3 >= 0 && l1 -2 < Exp32IndexSize - && l2 - 2 < Exp32ValueSize + MaxBase32Size) { + if (l1 - 3 >= 0 && l1 -2 < (long)Exp32IndexSize + && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { unsigned short base = Exp32Index[l1 - 3] + (unsigned short) (l2 - 2 - MaxBase32Size); @@ -6180,8 +6180,8 @@ TclExecuteByteCode( NEXT_INST_F(1, 1, 0); } } - if (-l1 - 3 >= 0 && -l1 - 2 < Exp32IndexSize - && l2 - 2 < Exp32ValueSize + MaxBase32Size) { + if (-l1 - 3 >= 0 && -l1 - 2 < (long)Exp32IndexSize + && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { unsigned short base = Exp32Index[-l1 - 3] + (unsigned short) (l2 - 2 - MaxBase32Size); if (base < Exp32Index[-l1 - 2]) { @@ -6216,7 +6216,7 @@ TclExecuteByteCode( } else { goto overflow; } - if (l2 - 2 < MaxBase64Size + if (l2 - 2 < (long)MaxBase64Size && w1 <= MaxBase64[l2 - 2] && w1 >= -MaxBase64[l2 - 2]) { /* @@ -6308,8 +6308,8 @@ TclExecuteByteCode( * Handle cases of powers > 16 that still fit in a 64-bit word by * doing table lookup. */ - if (w1 - 3 >= 0 && w1 - 2 < Exp64IndexSize - && l2 - 2 < Exp64ValueSize + MaxBase64Size) { + if (w1 - 3 >= 0 && w1 - 2 < (long)Exp64IndexSize + && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { unsigned short base = Exp64Index[w1 - 3] + (unsigned short) (l2 - 2 - MaxBase64Size); @@ -6331,8 +6331,8 @@ TclExecuteByteCode( } } - if (-w1 - 3 >= 0 && -w1 - 2 < Exp64IndexSize - && l2 - 2 < Exp64ValueSize + MaxBase64Size) { + if (-w1 - 3 >= 0 && -w1 - 2 < (long)Exp64IndexSize + && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { unsigned short base = Exp64Index[-w1 - 3] + (unsigned short) (l2 - 2 - MaxBase64Size); -- cgit v0.12 From 1c1ca73a68dc896e783d8ca54d1cae51d93380cd Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 7 Jun 2009 23:33:22 +0000 Subject: Fix docbug. --- ChangeLog | 4 ++++ doc/copy.n | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 235fe6b..f565152 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-08 Donal K. Fellows + + * doc/copy.n: Fix error in example spotted by Venkat Iyer. + 2009-06-02 Don Porter * generic/tclExecute.c: Replace dynamically-initialized table with diff --git a/doc/copy.n b/doc/copy.n index 023a281..018c696 100644 --- a/doc/copy.n +++ b/doc/copy.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: copy.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: copy.n,v 1.3 2009/06/07 23:33:23 dkf Exp $ '\" .so man.macros .TH copy n 0.1 TclOO "TclOO Commands" @@ -39,9 +39,9 @@ then demonstrates that the copied object is indeed a copy. .PP .CS oo::object create src -oo::define src method msg {} {puts foo} +oo::objdefine src method msg {} {puts foo} \fBoo::copy\fR src dst -oo::define src method msg {} {puts bar} +oo::objdefine src method msg {} {puts bar} src msg \fI\(-> prints "bar"\fR dst msg \fI\(-> prints "foo"\fR .CE -- cgit v0.12 From a7d705dbe689171d9fe8c79b7fc19bb2ef0ae7a1 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 8 Jun 2009 16:28:45 +0000 Subject: New DST rule for Bangladesh (Olson's tzdata2009i) --- ChangeLog | 5 +++++ library/tzdata/Asia/Dhaka | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index f565152..dd773d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-08 Kevin B. Kenny + + * library/tzdata/Asia/Dhaka: New DST rule for Bangladesh. + (Olson's tzdata2009i.) + 2009-06-08 Donal K. Fellows * doc/copy.n: Fix error in example spotted by Venkat Iyer. diff --git a/library/tzdata/Asia/Dhaka b/library/tzdata/Asia/Dhaka index 8eac24f..98967ed 100644 --- a/library/tzdata/Asia/Dhaka +++ b/library/tzdata/Asia/Dhaka @@ -8,4 +8,6 @@ set TZData(:Asia/Dhaka) { {-862637400 23400 0 BURT} {-576138600 21600 0 DACT} {38772000 21600 0 BDT} + {1230746400 21600 0 BDT} + {1245434400 25200 1 BDST} } -- cgit v0.12 From 77651df52750776dce287030cc8a1d2c0bf61385 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 9 Jun 2009 13:52:36 +0000 Subject: * generic/tclGetDate.y: Fixed a thread safety bug in the generated * library/clock.tcl: Bison parser (needed a %pure-parser * tests/clock.test: declaration to avoid static variables). Discovered that the %pure-parser declaration allowed for returning the Bison error message to the Tcl caller in the event of a syntax error, so did so. * generic/tclDate.c: bison 2.3 --- ChangeLog | 11 ++ generic/tclDate.c | 532 ++++++++++++++++++++++++++++++--------------------- generic/tclGetDate.y | 212 ++++++++++++++------ library/clock.tcl | 4 +- tests/clock.test | 43 ++++- 5 files changed, 516 insertions(+), 286 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd773d6..a2df5de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-06-09 Kevin B. Kenny + + * generic/tclGetDate.y: Fixed a thread safety bug in the generated + * library/clock.tcl: Bison parser (needed a %pure-parser + * tests/clock.test: declaration to avoid static variables). + Discovered that the %pure-parser declaration + allowed for returning the Bison error message + to the Tcl caller in the event of a syntax + error, so did so. + * generic/tclDate.c: bison 2.3 + 2006-06-08 Kevin B. Kenny * library/tzdata/Asia/Dhaka: New DST rule for Bangladesh. diff --git a/generic/tclDate.c b/generic/tclDate.c index 94b3caf..432225d 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -53,10 +53,10 @@ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ -#define YYPURE 0 +#define YYPURE 1 /* Using locations. */ -#define YYLSP_NEEDED 0 +#define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ #define yyparse TclDateparse @@ -66,7 +66,7 @@ #define yychar TclDatechar #define yydebug TclDatedebug #define yynerrs TclDatenerrs - +#define yylloc TclDatelloc /* Tokens. */ #ifndef YYTOKENTYPE @@ -79,19 +79,18 @@ tDAYZONE = 260, tID = 261, tMERIDIAN = 262, - tMINUTE_UNIT = 263, - tMONTH = 264, - tMONTH_UNIT = 265, - tSTARDATE = 266, - tSEC_UNIT = 267, - tSNUMBER = 268, - tUNUMBER = 269, - tZONE = 270, - tEPOCH = 271, - tDST = 272, - tISOBASE = 273, - tDAY_UNIT = 274, - tNEXT = 275 + tMONTH = 263, + tMONTH_UNIT = 264, + tSTARDATE = 265, + tSEC_UNIT = 266, + tSNUMBER = 267, + tUNUMBER = 268, + tZONE = 269, + tEPOCH = 270, + tDST = 271, + tISOBASE = 272, + tDAY_UNIT = 273, + tNEXT = 274 }; #endif /* Tokens. */ @@ -100,19 +99,18 @@ #define tDAYZONE 260 #define tID 261 #define tMERIDIAN 262 -#define tMINUTE_UNIT 263 -#define tMONTH 264 -#define tMONTH_UNIT 265 -#define tSTARDATE 266 -#define tSEC_UNIT 267 -#define tSNUMBER 268 -#define tUNUMBER 269 -#define tZONE 270 -#define tEPOCH 271 -#define tDST 272 -#define tISOBASE 273 -#define tDAY_UNIT 274 -#define tNEXT 275 +#define tMONTH 263 +#define tMONTH_UNIT 264 +#define tSTARDATE 265 +#define tSEC_UNIT 266 +#define tSNUMBER 267 +#define tUNUMBER 268 +#define tZONE 269 +#define tEPOCH 270 +#define tDST 271 +#define tISOBASE 272 +#define tDAY_UNIT 273 +#define tNEXT 274 @@ -133,7 +131,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * */ - #include "tclInt.h" /* @@ -151,6 +148,10 @@ */ typedef struct DateInfo { + + Tcl_Obj* messages; /* Error messages */ + const char* separatrix; /* String separating messages */ + time_t dateYear; time_t dateMonth; time_t dateDay; @@ -178,42 +179,40 @@ typedef struct DateInfo { time_t dateDayNumber; int dateHaveDay; + const char *dateStart; const char *dateInput; time_t *dateRelPointer; int dateDigitCount; } DateInfo; -#define YYPARSE_PARAM info -#define YYLEX_PARAM info - #define YYMALLOC ckalloc #define YYFREE(x) (ckfree((void*) (x))) -#define yyDSTmode (((DateInfo *) info)->dateDSTmode) -#define yyDayOrdinal (((DateInfo *) info)->dateDayOrdinal) -#define yyDayNumber (((DateInfo *) info)->dateDayNumber) -#define yyMonthOrdinal (((DateInfo *) info)->dateMonthOrdinal) -#define yyHaveDate (((DateInfo *) info)->dateHaveDate) -#define yyHaveDay (((DateInfo *) info)->dateHaveDay) -#define yyHaveOrdinalMonth (((DateInfo *) info)->dateHaveOrdinalMonth) -#define yyHaveRel (((DateInfo *) info)->dateHaveRel) -#define yyHaveTime (((DateInfo *) info)->dateHaveTime) -#define yyHaveZone (((DateInfo *) info)->dateHaveZone) -#define yyTimezone (((DateInfo *) info)->dateTimezone) -#define yyDay (((DateInfo *) info)->dateDay) -#define yyMonth (((DateInfo *) info)->dateMonth) -#define yyYear (((DateInfo *) info)->dateYear) -#define yyHour (((DateInfo *) info)->dateHour) -#define yyMinutes (((DateInfo *) info)->dateMinutes) -#define yySeconds (((DateInfo *) info)->dateSeconds) -#define yyMeridian (((DateInfo *) info)->dateMeridian) -#define yyRelMonth (((DateInfo *) info)->dateRelMonth) -#define yyRelDay (((DateInfo *) info)->dateRelDay) -#define yyRelSeconds (((DateInfo *) info)->dateRelSeconds) -#define yyRelPointer (((DateInfo *) info)->dateRelPointer) -#define yyInput (((DateInfo *) info)->dateInput) -#define yyDigitCount (((DateInfo *) info)->dateDigitCount) +#define yyDSTmode (info->dateDSTmode) +#define yyDayOrdinal (info->dateDayOrdinal) +#define yyDayNumber (info->dateDayNumber) +#define yyMonthOrdinal (info->dateMonthOrdinal) +#define yyHaveDate (info->dateHaveDate) +#define yyHaveDay (info->dateHaveDay) +#define yyHaveOrdinalMonth (info->dateHaveOrdinalMonth) +#define yyHaveRel (info->dateHaveRel) +#define yyHaveTime (info->dateHaveTime) +#define yyHaveZone (info->dateHaveZone) +#define yyTimezone (info->dateTimezone) +#define yyDay (info->dateDay) +#define yyMonth (info->dateMonth) +#define yyYear (info->dateYear) +#define yyHour (info->dateHour) +#define yyMinutes (info->dateMinutes) +#define yySeconds (info->dateSeconds) +#define yyMeridian (info->dateMeridian) +#define yyRelMonth (info->dateRelMonth) +#define yyRelDay (info->dateRelDay) +#define yyRelSeconds (info->dateRelSeconds) +#define yyRelPointer (info->dateRelPointer) +#define yyInput (info->dateInput) +#define yyDigitCount (info->dateDigitCount) #define EPOCH 1970 #define START_OF_TIME 1902 @@ -256,17 +255,6 @@ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; -/* - * Prototypes of internal functions. - */ - -static int LookupWord(char *buff); -static void TclDateerror(const char *s); -static int TclDatelex(void *info); -static time_t ToSeconds(time_t Hours, time_t Minutes, - time_t Seconds, MERIDIAN Meridian); -MODULE_SCOPE int yyparse(void *); - /* Enabling traces. */ @@ -302,11 +290,39 @@ typedef union YYSTYPE # define YYSTYPE_IS_TRIVIAL 1 #endif +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif /* Copy the second part of user declarations. */ + +/* + * Prototypes of internal functions. + */ + +static int LookupWord(YYSTYPE* yylvalPtr, char *buff); + static void TclDateerror(YYLTYPE* location, + DateInfo* info, const char *s); + static int TclDatelex(YYSTYPE* yylvalPtr, YYLTYPE* location, + DateInfo* info); +static time_t ToSeconds(time_t Hours, time_t Minutes, + time_t Seconds, MERIDIAN Meridian); +MODULE_SCOPE int yyparse(DateInfo*); + + + /* Line 216 of yacc.c. */ @@ -466,14 +482,16 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss; YYSTYPE yyvs; - }; + YYLTYPE yyls; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -481,8 +499,8 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ @@ -526,7 +544,7 @@ union yyalloc #define YYLAST 79 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 27 +#define YYNTOKENS 26 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 16 /* YYNRULES -- Number of rules. */ @@ -536,7 +554,7 @@ union yyalloc /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 275 +#define YYMAXUTOK 274 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -548,8 +566,8 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 26, 23, 22, 25, 24, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 21, 2, + 2, 2, 2, 25, 22, 21, 24, 23, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -571,7 +589,7 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20 + 15, 16, 17, 18, 19 }; #if YYDEBUG @@ -590,35 +608,35 @@ static const yytype_uint8 yyprhs[] = /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 28, 0, -1, -1, 28, 29, -1, 30, -1, 31, - -1, 33, -1, 34, -1, 32, -1, 37, -1, 35, - -1, 36, -1, 41, -1, 14, 7, -1, 14, 21, - 14, 42, -1, 14, 21, 14, 22, 14, -1, 14, - 21, 14, 21, 14, 42, -1, 14, 21, 14, 21, - 14, 22, 14, -1, 15, 17, -1, 15, -1, 5, - -1, 4, -1, 4, 23, -1, 14, 4, -1, 39, - 14, 4, -1, 20, 4, -1, 14, 24, 14, -1, - 14, 24, 14, 24, 14, -1, 18, -1, 14, 22, - 9, 22, 14, -1, 14, 22, 14, 22, 14, -1, - 9, 14, -1, 9, 14, 23, 14, -1, 14, 9, - -1, 16, -1, 14, 9, 14, -1, 20, 9, -1, - 20, 14, 9, -1, 18, 15, 18, -1, 18, 15, - 14, 21, 14, 21, 14, -1, 18, 18, -1, 11, - 14, 25, 14, -1, 38, 3, -1, 38, -1, 39, - 14, 40, -1, 14, 40, -1, 20, 40, -1, 20, - 14, 40, -1, 40, -1, 22, -1, 26, -1, 12, - -1, 19, -1, 10, -1, 14, -1, -1, 7, -1 + 27, 0, -1, -1, 27, 28, -1, 29, -1, 30, + -1, 32, -1, 33, -1, 31, -1, 36, -1, 34, + -1, 35, -1, 40, -1, 13, 7, -1, 13, 20, + 13, 41, -1, 13, 20, 13, 21, 13, -1, 13, + 20, 13, 20, 13, 41, -1, 13, 20, 13, 20, + 13, 21, 13, -1, 14, 16, -1, 14, -1, 5, + -1, 4, -1, 4, 22, -1, 13, 4, -1, 38, + 13, 4, -1, 19, 4, -1, 13, 23, 13, -1, + 13, 23, 13, 23, 13, -1, 17, -1, 13, 21, + 8, 21, 13, -1, 13, 21, 13, 21, 13, -1, + 8, 13, -1, 8, 13, 22, 13, -1, 13, 8, + -1, 15, -1, 13, 8, 13, -1, 19, 8, -1, + 19, 13, 8, -1, 17, 14, 17, -1, 17, 14, + 13, 20, 13, 20, 13, -1, 17, 17, -1, 10, + 13, 24, 13, -1, 37, 3, -1, 37, -1, 38, + 13, 39, -1, 13, 39, -1, 19, 39, -1, 19, + 13, 39, -1, 39, -1, 21, -1, 25, -1, 11, + -1, 18, -1, 9, -1, 13, -1, -1, 7, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 185, 185, 186, 189, 192, 195, 198, 201, 204, - 207, 211, 216, 219, 225, 231, 239, 245, 256, 260, - 264, 270, 274, 278, 282, 286, 292, 296, 301, 306, - 311, 316, 320, 325, 329, 334, 341, 345, 351, 360, - 369, 379, 393, 398, 401, 404, 407, 410, 413, 418, - 421, 426, 430, 434, 440, 458, 461 + 0, 225, 225, 226, 229, 232, 235, 238, 241, 244, + 247, 251, 256, 259, 265, 271, 279, 285, 296, 300, + 304, 310, 314, 318, 322, 326, 332, 336, 341, 346, + 351, 356, 360, 365, 369, 374, 381, 385, 391, 400, + 409, 419, 433, 438, 441, 444, 447, 450, 453, 458, + 461, 466, 470, 474, 480, 498, 501 }; #endif @@ -628,12 +646,12 @@ static const yytype_uint16 yyrline[] = static const char *const yytname[] = { "$end", "error", "$undefined", "tAGO", "tDAY", "tDAYZONE", "tID", - "tMERIDIAN", "tMINUTE_UNIT", "tMONTH", "tMONTH_UNIT", "tSTARDATE", - "tSEC_UNIT", "tSNUMBER", "tUNUMBER", "tZONE", "tEPOCH", "tDST", - "tISOBASE", "tDAY_UNIT", "tNEXT", "':'", "'-'", "','", "'/'", "'.'", - "'+'", "$accept", "spec", "item", "time", "zone", "day", "date", - "ordMonth", "iso", "trek", "relspec", "relunits", "sign", "unit", - "number", "o_merid", 0 + "tMERIDIAN", "tMONTH", "tMONTH_UNIT", "tSTARDATE", "tSEC_UNIT", + "tSNUMBER", "tUNUMBER", "tZONE", "tEPOCH", "tDST", "tISOBASE", + "tDAY_UNIT", "tNEXT", "':'", "'-'", "','", "'/'", "'.'", "'+'", + "$accept", "spec", "item", "time", "zone", "day", "date", "ordMonth", + "iso", "trek", "relspec", "relunits", "sign", "unit", "number", + "o_merid", 0 }; #endif @@ -644,19 +662,19 @@ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 58, 45, 44, 47, 46, 43 + 58, 45, 44, 47, 46, 43 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 27, 28, 28, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, - 31, 32, 32, 32, 32, 32, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 34, 34, 35, 35, - 35, 36, 37, 37, 38, 38, 38, 38, 38, 39, - 39, 40, 40, 40, 41, 42, 42 + 0, 26, 27, 27, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, + 30, 31, 31, 31, 31, 31, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 33, 33, 34, 34, + 34, 35, 36, 36, 37, 37, 37, 37, 37, 38, + 38, 39, 39, 39, 40, 41, 41 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -695,25 +713,25 @@ static const yytype_int8 yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -23 +#define YYPACT_NINF -22 static const yytype_int8 yypact[] = { - -23, 2, -23, -22, -23, -5, -23, -4, -23, 22, - -2, -23, 12, -23, 38, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, 30, 11, -23, -23, - -23, 17, 10, -23, -23, 35, 40, -6, 47, -23, - -23, 45, -23, -23, -23, 46, -23, -23, 41, 48, - 50, -23, 16, 44, 49, 43, 51, -23, -23, -23, - -23, -23, -23, -23, -23, 54, 55, -23, 56, 59, - 60, 61, -3, -23, -23, -23, -23, 57, 62, -23, - 63, -23, -23 + -22, 2, -22, -21, -22, -4, -22, 1, -22, 22, + 18, -22, 8, -22, 40, -22, -22, -22, -22, -22, + -22, -22, -22, -22, -22, -22, 32, 28, -22, -22, + -22, 24, 26, -22, -22, 42, 47, -5, 49, -22, + -22, 15, -22, -22, -22, 48, -22, -22, 43, 50, + 51, -22, 17, 44, 46, 45, 52, -22, -22, -22, + -22, -22, -22, -22, -22, 56, 57, -22, 58, 60, + 61, 62, -3, -22, -22, -22, -22, 59, 63, -22, + 64, -22, -22 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -9, -23, 7 + -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, + -22, -22, -22, -9, -22, 6 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -724,40 +742,40 @@ static const yytype_int8 yypgoto[] = static const yytype_uint8 yytable[] = { 39, 30, 2, 53, 64, 46, 3, 4, 54, 31, - 32, 5, 6, 7, 8, 40, 9, 10, 11, 78, - 12, 13, 14, 64, 15, 48, 33, 41, 16, 34, - 42, 35, 6, 47, 8, 50, 59, 65, 66, 61, - 49, 13, 43, 36, 37, 60, 38, 44, 6, 51, - 8, 6, 45, 8, 52, 58, 6, 13, 8, 56, - 13, 55, 62, 57, 63, 13, 68, 70, 72, 73, - 74, 69, 71, 75, 76, 77, 81, 82, 80, 79 + 5, 6, 7, 8, 32, 9, 10, 11, 78, 12, + 13, 14, 41, 15, 64, 42, 33, 16, 56, 34, + 35, 6, 57, 8, 40, 47, 59, 65, 66, 61, + 13, 48, 36, 37, 43, 38, 49, 60, 44, 6, + 50, 8, 6, 45, 8, 51, 58, 6, 13, 8, + 52, 13, 55, 62, 63, 68, 13, 69, 70, 72, + 73, 74, 71, 75, 76, 77, 81, 82, 79, 80 }; static const yytype_uint8 yycheck[] = { - 9, 23, 0, 9, 7, 14, 4, 5, 14, 14, - 14, 9, 10, 11, 12, 17, 14, 15, 16, 22, - 18, 19, 20, 7, 22, 14, 4, 15, 26, 7, - 18, 9, 10, 3, 12, 25, 45, 21, 22, 48, - 23, 19, 4, 21, 22, 4, 24, 9, 10, 14, - 12, 10, 14, 12, 14, 9, 10, 19, 12, 14, - 19, 14, 14, 18, 14, 19, 22, 24, 14, 14, - 14, 22, 21, 14, 14, 14, 14, 14, 21, 72 + 9, 22, 0, 8, 7, 14, 4, 5, 13, 13, + 8, 9, 10, 11, 13, 13, 14, 15, 21, 17, + 18, 19, 14, 21, 7, 17, 4, 25, 13, 7, + 8, 9, 17, 11, 16, 3, 45, 20, 21, 48, + 18, 13, 20, 21, 4, 23, 22, 4, 8, 9, + 24, 11, 9, 13, 11, 13, 8, 9, 18, 11, + 13, 18, 13, 13, 13, 21, 18, 21, 23, 13, + 13, 13, 20, 13, 13, 13, 13, 13, 72, 20 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 28, 0, 4, 5, 9, 10, 11, 12, 14, - 15, 16, 18, 19, 20, 22, 26, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 23, 14, 14, 4, 7, 9, 21, 22, 24, 40, - 17, 15, 18, 4, 9, 14, 40, 3, 14, 23, - 25, 14, 14, 9, 14, 14, 14, 18, 9, 40, - 4, 40, 14, 14, 7, 21, 22, 42, 22, 22, - 24, 21, 14, 14, 14, 14, 14, 14, 22, 42, - 21, 14, 14 + 0, 27, 0, 4, 5, 8, 9, 10, 11, 13, + 14, 15, 17, 18, 19, 21, 25, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 22, 13, 13, 4, 7, 8, 20, 21, 23, 39, + 16, 14, 17, 4, 8, 13, 39, 3, 13, 22, + 24, 13, 13, 8, 13, 13, 13, 17, 8, 39, + 4, 39, 13, 13, 7, 20, 21, 41, 21, 21, + 23, 20, 13, 13, 13, 13, 13, 13, 21, 41, + 20, 13, 13 }; #define yyerrok (yyerrstatus = 0) @@ -790,7 +808,7 @@ do \ } \ else \ { \ - yyerror (YY_("syntax error: cannot back up")); \ + yyerror (&yylloc, info, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) @@ -845,9 +863,9 @@ while (YYID (0)) /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) +# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) #else -# define YYLEX yylex () +# define YYLEX yylex (&yylval, &yylloc, info) #endif /* Enable debugging if requested. */ @@ -870,7 +888,7 @@ do { \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value); \ + Type, Value, Location, info); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) @@ -884,17 +902,21 @@ do { \ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) #else static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, info) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; + DateInfo* info; #endif { if (!yyvaluep) return; + YYUSE (yylocationp); + YYUSE (info); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); @@ -916,13 +938,15 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, DateInfo* info) #else static void -yy_symbol_print (yyoutput, yytype, yyvaluep) +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, info) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; + DateInfo* info; #endif { if (yytype < YYNTOKENS) @@ -930,7 +954,9 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, info); YYFPRINTF (yyoutput, ")"); } @@ -970,12 +996,14 @@ do { \ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, DateInfo* info) #else static void -yy_reduce_print (yyvsp, yyrule) +yy_reduce_print (yyvsp, yylsp, yyrule, info) YYSTYPE *yyvsp; + YYLTYPE *yylsp; int yyrule; + DateInfo* info; #endif { int yynrhs = yyr2[yyrule]; @@ -989,7 +1017,7 @@ yy_reduce_print (yyvsp, yyrule) fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + , &(yylsp[(yyi + 1) - (yynrhs)]) , info); fprintf (stderr, "\n"); } } @@ -997,7 +1025,7 @@ yy_reduce_print (yyvsp, yyrule) # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ + yy_reduce_print (yyvsp, yylsp, Rule, info); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that @@ -1248,16 +1276,20 @@ yysyntax_error (char *yyresult, int yystate, int yychar) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, DateInfo* info) #else static void -yydestruct (yymsg, yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep, yylocationp, info) const char *yymsg; int yytype; YYSTYPE *yyvaluep; + YYLTYPE *yylocationp; + DateInfo* info; #endif { YYUSE (yyvaluep); + YYUSE (yylocationp); + YYUSE (info); if (!yymsg) yymsg = "Deleting"; @@ -1282,7 +1314,7 @@ int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus -int yyparse (void); +int yyparse (DateInfo* info); #else int yyparse (); #endif @@ -1290,14 +1322,6 @@ int yyparse (); -/* The look-ahead symbol. */ -int yychar; - -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; @@ -1319,15 +1343,25 @@ yyparse (YYPARSE_PARAM) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int -yyparse (void) +yyparse (DateInfo* info) #else int -yyparse () - +yyparse (info) + DateInfo* info; #endif #endif { - + /* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; +/* Location data for the look-ahead symbol. */ +YYLTYPE yylloc; + int yystate; int yyn; int yyresult; @@ -1360,16 +1394,21 @@ yyparse () YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp; + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[2]; - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; - + YYLTYPE yyloc; /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ @@ -1389,6 +1428,12 @@ yyparse () yyssp = yyss; yyvsp = yyvs; + yylsp = yyls; +#if YYLTYPE_IS_TRIVIAL + /* Initialize the default location before parsing starts. */ + yylloc.first_line = yylloc.last_line = 1; + yylloc.first_column = yylloc.last_column = 0; +#endif goto yysetstate; @@ -1415,7 +1460,7 @@ yyparse () memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - + YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a @@ -1424,9 +1469,9 @@ yyparse () yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - + &yyls1, yysize * sizeof (*yylsp), &yystacksize); - + yyls = yyls1; yyss = yyss1; yyvs = yyvs1; } @@ -1449,7 +1494,7 @@ yyparse () goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1459,7 +1504,7 @@ yyparse () yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - + yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1536,7 +1581,7 @@ yybackup: yystate = yyn; *++yyvsp = yylval; - + *++yylsp = yylloc; goto yynewstate; @@ -1567,7 +1612,8 @@ yyreduce: GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; - + /* Default location. */ + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); YY_REDUCE_PRINT (yyn); switch (yyn) { @@ -2034,7 +2080,7 @@ yyreduce: YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; - + *++yylsp = yyloc; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule @@ -2060,7 +2106,7 @@ yyerrlab: { ++yynerrs; #if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); + yyerror (&yylloc, info, YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); @@ -2084,11 +2130,11 @@ yyerrlab: if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); + yyerror (&yylloc, info, yymsg); } else { - yyerror (YY_("syntax error")); + yyerror (&yylloc, info, YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } @@ -2096,7 +2142,7 @@ yyerrlab: #endif } - + yyerror_range[0] = yylloc; if (yyerrstatus == 3) { @@ -2112,7 +2158,7 @@ yyerrlab: else { yydestruct ("Error: discarding", - yytoken, &yylval); + yytoken, &yylval, &yylloc, info); yychar = YYEMPTY; } } @@ -2133,6 +2179,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; + yyerror_range[0] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -2166,9 +2213,9 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - + yyerror_range[0] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp, yylsp, info); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2179,6 +2226,11 @@ yyerrlab1: *++yyvsp = yylval; + yyerror_range[1] = yylloc; + /* Using YYLLOC is tempting, but would change the location of + the look-ahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + *++yylsp = yyloc; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); @@ -2206,7 +2258,7 @@ yyabortlab: | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: - yyerror (YY_("memory exhausted")); + yyerror (&yylloc, info, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif @@ -2214,7 +2266,7 @@ yyexhaustedlab: yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); + yytoken, &yylval, &yylloc, info); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -2222,7 +2274,7 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp, yylsp, info); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2451,8 +2503,25 @@ static TABLE MilitaryTable[] = { static void TclDateerror( + YYLTYPE* location, + DateInfo* infoPtr, const char *s) { + Tcl_Obj* t; + Tcl_AppendToObj(infoPtr->messages, infoPtr->separatrix, -1); + Tcl_AppendToObj(infoPtr->messages, s, -1); + Tcl_AppendToObj(infoPtr->messages, " (characters ", -1); + t = Tcl_NewIntObj(location->first_column); + Tcl_IncrRefCount(t); + Tcl_AppendObjToObj(infoPtr->messages, t); + Tcl_DecrRefCount(t); + Tcl_AppendToObj(infoPtr->messages, "-", -1); + t = Tcl_NewIntObj(location->last_column); + Tcl_IncrRefCount(t); + Tcl_AppendObjToObj(infoPtr->messages, t); + Tcl_DecrRefCount(t); + Tcl_AppendToObj(infoPtr->messages, ")", -1); + infoPtr->separatrix = "\n"; } static time_t @@ -2487,6 +2556,7 @@ ToSeconds( static int LookupWord( + YYSTYPE* yylvalPtr, char *buff) { register char *p; @@ -2501,11 +2571,11 @@ LookupWord( Tcl_UtfToLower(buff); if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) { - yylval.Meridian = MERam; + yylvalPtr->Meridian = MERam; return tMERIDIAN; } if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) { - yylval.Meridian = MERpm; + yylvalPtr->Meridian = MERpm; return tMERIDIAN; } @@ -2525,25 +2595,25 @@ LookupWord( for (tp = MonthDayTable; tp->name; tp++) { if (abbrev) { if (strncmp(buff, tp->name, 3) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } else if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } for (tp = TimezoneTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } for (tp = UnitsTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -2557,7 +2627,7 @@ LookupWord( buff[i] = '\0'; for (tp = UnitsTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -2565,7 +2635,7 @@ LookupWord( for (tp = OtherTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -2578,7 +2648,7 @@ LookupWord( && isalpha(UCHAR(*buff))) { /* INTL: ISO only */ for (tp = MilitaryTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -2599,7 +2669,7 @@ LookupWord( if (i) { for (tp = TimezoneTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -2610,13 +2680,16 @@ LookupWord( static int TclDatelex( - void *info) + YYSTYPE* yylvalPtr, + YYLTYPE* location, + DateInfo *info) { register char c; register char *p; char buff[20]; int Count; + location->first_column = yyInput - info->dateStart; for ( ; ; ) { while (isspace(UCHAR(*yyInput))) { yyInput++; @@ -2628,9 +2701,9 @@ TclDatelex( */ Count = 0; - for (yylval.Number = 0; + for (yylvalPtr->Number = 0; isdigit(UCHAR(c = *yyInput++)); ) { /* INTL: digit */ - yylval.Number = 10 * yylval.Number + c - '0'; + yylvalPtr->Number = 10 * yylvalPtr->Number + c - '0'; Count++; } yyInput--; @@ -2641,8 +2714,10 @@ TclDatelex( */ if (Count >= 6) { + location->last_column = yyInput - info->dateStart - 1; return tISOBASE; } else { + location->last_column = yyInput - info->dateStart - 1; return tUNUMBER; } } @@ -2655,15 +2730,18 @@ TclDatelex( } *p = '\0'; yyInput--; - return LookupWord(buff); + location->last_column = yyInput - info->dateStart - 1; + return LookupWord(yylvalPtr, buff); } if (c != '(') { + location->last_column = yyInput - info->dateStart; return *yyInput++; } Count = 0; do { c = *yyInput++; if (c == '\0') { + location->last_column = yyInput - info->dateStart - 1; return c; } else if (c == '(') { Count++; @@ -2679,12 +2757,13 @@ TclClockOldscanObjCmd( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ - Tcl_Obj *const *objv) /* Parameters */ + Tcl_Obj *CONST *objv) /* Parameters */ { Tcl_Obj *result, *resultElement; int yr, mo, da; DateInfo dateInfo; - void *info = (void *) &dateInfo; + DateInfo* info = &dateInfo; + int status; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, @@ -2693,6 +2772,7 @@ TclClockOldscanObjCmd( } yyInput = Tcl_GetString( objv[1] ); + dateInfo.dateStart = yyInput; yyHaveDate = 0; if (Tcl_GetIntFromObj(interp, objv[2], &yr) != TCL_OK @@ -2717,10 +2797,28 @@ TclClockOldscanObjCmd( yyHaveRel = 0; yyRelMonth = 0; yyRelDay = 0; yyRelSeconds = 0; yyRelPointer = NULL; - if (yyparse(info)) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("syntax error", -1)); + dateInfo.messages = Tcl_NewObj(); + dateInfo.separatrix = ""; + Tcl_IncrRefCount(dateInfo.messages); + + status = yyparse(&dateInfo); + if (status == 1) { + Tcl_SetObjResult(interp, dateInfo.messages); + Tcl_DecrRefCount(dateInfo.messages); + return TCL_ERROR; + } else if (status == 2) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("memory exhausted", -1)); + Tcl_DecrRefCount(dateInfo.messages); + return TCL_ERROR; + } else if (status != 0) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown status returned " + "from date parser. Please " + "report this error as a " + "bug in Tcl.", -1)); + Tcl_DecrRefCount(dateInfo.messages); return TCL_ERROR; } + Tcl_DecrRefCount(dateInfo.messages); if (yyHaveDate > 1) { Tcl_SetObjResult(interp, diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 8a7d167..844632e 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,9 +13,15 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.40 2009/01/22 06:42:33 nijtmans Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.41 2009/06/09 13:52:37 kennykb Exp $ */ +%parse-param {DateInfo* info} +%lex-param {DateInfo* info} +%pure-parser + /* %error-verbose would be nice, but our token names are meaningless */ +%locations + %{ /* * tclDate.c -- @@ -30,7 +36,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * */ - #include "tclInt.h" /* @@ -48,6 +53,10 @@ */ typedef struct DateInfo { + + Tcl_Obj* messages; /* Error messages */ + const char* separatrix; /* String separating messages */ + time_t dateYear; time_t dateMonth; time_t dateDay; @@ -75,42 +84,40 @@ typedef struct DateInfo { time_t dateDayNumber; int dateHaveDay; + const char *dateStart; const char *dateInput; time_t *dateRelPointer; int dateDigitCount; } DateInfo; -#define YYPARSE_PARAM info -#define YYLEX_PARAM info - #define YYMALLOC ckalloc #define YYFREE(x) (ckfree((void*) (x))) -#define yyDSTmode (((DateInfo *) info)->dateDSTmode) -#define yyDayOrdinal (((DateInfo *) info)->dateDayOrdinal) -#define yyDayNumber (((DateInfo *) info)->dateDayNumber) -#define yyMonthOrdinal (((DateInfo *) info)->dateMonthOrdinal) -#define yyHaveDate (((DateInfo *) info)->dateHaveDate) -#define yyHaveDay (((DateInfo *) info)->dateHaveDay) -#define yyHaveOrdinalMonth (((DateInfo *) info)->dateHaveOrdinalMonth) -#define yyHaveRel (((DateInfo *) info)->dateHaveRel) -#define yyHaveTime (((DateInfo *) info)->dateHaveTime) -#define yyHaveZone (((DateInfo *) info)->dateHaveZone) -#define yyTimezone (((DateInfo *) info)->dateTimezone) -#define yyDay (((DateInfo *) info)->dateDay) -#define yyMonth (((DateInfo *) info)->dateMonth) -#define yyYear (((DateInfo *) info)->dateYear) -#define yyHour (((DateInfo *) info)->dateHour) -#define yyMinutes (((DateInfo *) info)->dateMinutes) -#define yySeconds (((DateInfo *) info)->dateSeconds) -#define yyMeridian (((DateInfo *) info)->dateMeridian) -#define yyRelMonth (((DateInfo *) info)->dateRelMonth) -#define yyRelDay (((DateInfo *) info)->dateRelDay) -#define yyRelSeconds (((DateInfo *) info)->dateRelSeconds) -#define yyRelPointer (((DateInfo *) info)->dateRelPointer) -#define yyInput (((DateInfo *) info)->dateInput) -#define yyDigitCount (((DateInfo *) info)->dateDigitCount) +#define yyDSTmode (info->dateDSTmode) +#define yyDayOrdinal (info->dateDayOrdinal) +#define yyDayNumber (info->dateDayNumber) +#define yyMonthOrdinal (info->dateMonthOrdinal) +#define yyHaveDate (info->dateHaveDate) +#define yyHaveDay (info->dateHaveDay) +#define yyHaveOrdinalMonth (info->dateHaveOrdinalMonth) +#define yyHaveRel (info->dateHaveRel) +#define yyHaveTime (info->dateHaveTime) +#define yyHaveZone (info->dateHaveZone) +#define yyTimezone (info->dateTimezone) +#define yyDay (info->dateDay) +#define yyMonth (info->dateMonth) +#define yyYear (info->dateYear) +#define yyHour (info->dateHour) +#define yyMinutes (info->dateMinutes) +#define yySeconds (info->dateSeconds) +#define yyMeridian (info->dateMeridian) +#define yyRelMonth (info->dateRelMonth) +#define yyRelDay (info->dateRelDay) +#define yyRelSeconds (info->dateRelSeconds) +#define yyRelPointer (info->dateRelPointer) +#define yyInput (info->dateInput) +#define yyDigitCount (info->dateDigitCount) #define EPOCH 1970 #define START_OF_TIME 1902 @@ -153,32 +160,65 @@ typedef enum _MERIDIAN { MERam, MERpm, MER24 } MERIDIAN; +%} + +%union { + time_t Number; + enum _MERIDIAN Meridian; +} + +%{ + /* * Prototypes of internal functions. */ -static int LookupWord(char *buff); -static void TclDateerror(const char *s); -static int TclDatelex(void *info); +static int LookupWord(YYSTYPE* yylvalPtr, char *buff); + static void TclDateerror(YYLTYPE* location, + DateInfo* info, const char *s); + static int TclDatelex(YYSTYPE* yylvalPtr, YYLTYPE* location, + DateInfo* info); static time_t ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian); -MODULE_SCOPE int yyparse(void *); +MODULE_SCOPE int yyparse(DateInfo*); %} -%union { - time_t Number; - enum _MERIDIAN Meridian; -} - -%token tAGO tDAY tDAYZONE tID tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT -%token tSTARDATE tSEC_UNIT tSNUMBER tUNUMBER tZONE tEPOCH tDST tISOBASE -%token tDAY_UNIT tNEXT - -%type tDAY tDAYZONE tMINUTE_UNIT tMONTH tMONTH_UNIT tDST -%type tSEC_UNIT tSNUMBER tUNUMBER tZONE tISOBASE tDAY_UNIT -%type unit sign tNEXT tSTARDATE -%type tMERIDIAN o_merid +%token tAGO +%token tDAY +%token tDAYZONE +%token tID +%token tMERIDIAN +%token tMONTH +%token tMONTH_UNIT +%token tSTARDATE +%token tSEC_UNIT +%token tSNUMBER +%token tUNUMBER +%token tZONE +%token tEPOCH +%token tDST +%token tISOBASE +%token tDAY_UNIT +%token tNEXT + +%type tDAY +%type tDAYZONE +%type tMONTH +%type tMONTH_UNIT +%type tDST +%type tSEC_UNIT +%type tSNUMBER +%type tUNUMBER +%type tZONE +%type tISOBASE +%type tDAY_UNIT +%type unit +%type sign +%type tNEXT +%type tSTARDATE +%type tMERIDIAN +%type o_merid %% @@ -675,8 +715,25 @@ static TABLE MilitaryTable[] = { static void TclDateerror( + YYLTYPE* location, + DateInfo* infoPtr, const char *s) { + Tcl_Obj* t; + Tcl_AppendToObj(infoPtr->messages, infoPtr->separatrix, -1); + Tcl_AppendToObj(infoPtr->messages, s, -1); + Tcl_AppendToObj(infoPtr->messages, " (characters ", -1); + t = Tcl_NewIntObj(location->first_column); + Tcl_IncrRefCount(t); + Tcl_AppendObjToObj(infoPtr->messages, t); + Tcl_DecrRefCount(t); + Tcl_AppendToObj(infoPtr->messages, "-", -1); + t = Tcl_NewIntObj(location->last_column); + Tcl_IncrRefCount(t); + Tcl_AppendObjToObj(infoPtr->messages, t); + Tcl_DecrRefCount(t); + Tcl_AppendToObj(infoPtr->messages, ")", -1); + infoPtr->separatrix = "\n"; } static time_t @@ -711,6 +768,7 @@ ToSeconds( static int LookupWord( + YYSTYPE* yylvalPtr, char *buff) { register char *p; @@ -725,11 +783,11 @@ LookupWord( Tcl_UtfToLower(buff); if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) { - yylval.Meridian = MERam; + yylvalPtr->Meridian = MERam; return tMERIDIAN; } if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) { - yylval.Meridian = MERpm; + yylvalPtr->Meridian = MERpm; return tMERIDIAN; } @@ -749,25 +807,25 @@ LookupWord( for (tp = MonthDayTable; tp->name; tp++) { if (abbrev) { if (strncmp(buff, tp->name, 3) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } else if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } for (tp = TimezoneTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } for (tp = UnitsTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -781,7 +839,7 @@ LookupWord( buff[i] = '\0'; for (tp = UnitsTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -789,7 +847,7 @@ LookupWord( for (tp = OtherTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -802,7 +860,7 @@ LookupWord( && isalpha(UCHAR(*buff))) { /* INTL: ISO only */ for (tp = MilitaryTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -823,7 +881,7 @@ LookupWord( if (i) { for (tp = TimezoneTable; tp->name; tp++) { if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; + yylvalPtr->Number = tp->value; return tp->type; } } @@ -834,13 +892,16 @@ LookupWord( static int TclDatelex( - void *info) + YYSTYPE* yylvalPtr, + YYLTYPE* location, + DateInfo *info) { register char c; register char *p; char buff[20]; int Count; + location->first_column = yyInput - info->dateStart; for ( ; ; ) { while (isspace(UCHAR(*yyInput))) { yyInput++; @@ -852,9 +913,9 @@ TclDatelex( */ Count = 0; - for (yylval.Number = 0; + for (yylvalPtr->Number = 0; isdigit(UCHAR(c = *yyInput++)); ) { /* INTL: digit */ - yylval.Number = 10 * yylval.Number + c - '0'; + yylvalPtr->Number = 10 * yylvalPtr->Number + c - '0'; Count++; } yyInput--; @@ -865,8 +926,10 @@ TclDatelex( */ if (Count >= 6) { + location->last_column = yyInput - info->dateStart - 1; return tISOBASE; } else { + location->last_column = yyInput - info->dateStart - 1; return tUNUMBER; } } @@ -879,15 +942,18 @@ TclDatelex( } *p = '\0'; yyInput--; - return LookupWord(buff); + location->last_column = yyInput - info->dateStart - 1; + return LookupWord(yylvalPtr, buff); } if (c != '(') { + location->last_column = yyInput - info->dateStart; return *yyInput++; } Count = 0; do { c = *yyInput++; if (c == '\0') { + location->last_column = yyInput - info->dateStart - 1; return c; } else if (c == '(') { Count++; @@ -908,7 +974,8 @@ TclClockOldscanObjCmd( Tcl_Obj *result, *resultElement; int yr, mo, da; DateInfo dateInfo; - void *info = (void *) &dateInfo; + DateInfo* info = &dateInfo; + int status; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, @@ -917,6 +984,7 @@ TclClockOldscanObjCmd( } yyInput = Tcl_GetString( objv[1] ); + dateInfo.dateStart = yyInput; yyHaveDate = 0; if (Tcl_GetIntFromObj(interp, objv[2], &yr) != TCL_OK @@ -941,10 +1009,28 @@ TclClockOldscanObjCmd( yyHaveRel = 0; yyRelMonth = 0; yyRelDay = 0; yyRelSeconds = 0; yyRelPointer = NULL; - if (yyparse(info)) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("syntax error", -1)); + dateInfo.messages = Tcl_NewObj(); + dateInfo.separatrix = ""; + Tcl_IncrRefCount(dateInfo.messages); + + status = yyparse(&dateInfo); + if (status == 1) { + Tcl_SetObjResult(interp, dateInfo.messages); + Tcl_DecrRefCount(dateInfo.messages); + return TCL_ERROR; + } else if (status == 2) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("memory exhausted", -1)); + Tcl_DecrRefCount(dateInfo.messages); + return TCL_ERROR; + } else if (status != 0) { + Tcl_SetObjResult(interp, Tcl_NewStringObj("Unknown status returned " + "from date parser. Please " + "report this error as a " + "bug in Tcl.", -1)); + Tcl_DecrRefCount(dateInfo.messages); return TCL_ERROR; } + Tcl_DecrRefCount(dateInfo.messages); if (yyHaveDate > 1) { Tcl_SetObjResult(interp, diff --git a/library/clock.tcl b/library/clock.tcl index 22b7f67..e76fb13 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.52 2009/01/03 04:26:49 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.53 2009/06/09 13:52:38 kennykb Exp $ # #---------------------------------------------------------------------- @@ -1369,7 +1369,7 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { [dict get $date dayOfMonth] } result] if { $status != 0 } { - return -code error "unable to convert date-time string \"$string\"" + return -code error "unable to convert date-time string \"$string\": $result" } lassign $result parseDate parseTime parseZone parseRel \ diff --git a/tests/clock.test b/tests/clock.test index 7eb1b25..0f1e9da 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.90 2009/01/03 04:38:12 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.91 2009/06/09 13:52:38 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35578,9 +35578,12 @@ test clock-33.11a {clock test, millis align with micros} { test clock-34.1 {clock scan tests} { list [catch {clock scan} msg] $msg } {1 {wrong # args: should be "clock scan string ?-base seconds? ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"}} -test clock-34.2 {clock scan tests} { - list [catch {clock scan "bad-string"} msg] $msg -} {1 {unable to convert date-time string "bad-string"}} +test clock-34.2 {clock scan tests} {*}{ + -body {clock scan "bad-string"} + -returnCodes error + -match glob + -result {unable to convert date-time string "bad-string"*} +} test clock-34.3 {clock scan tests} { clock format [clock scan "14 Feb 92" -gmt true] \ -format {%m/%d/%y %I:%M:%S %p} -gmt true @@ -35804,6 +35807,38 @@ test clock-34.47 {ago with multiple relative units} { expr {$base - $res} } 180000 +test clock-34.48 {more than one ToD} {*}{ + -body {clock scan {10:00 11:00}} + -returnCodes error + -result {unable to convert date-time string "10:00 11:00": more than one time of day in string} +} + +test clock-34.49 {more than one date} {*}{ + -body {clock scan {1/1/2001 2/2/2002}} + -returnCodes error + -result {unable to convert date-time string "1/1/2001 2/2/2002": more than one date in string} +} + +test clock-34.50 {more than one time zone} {*}{ + -body {clock scan {10:00 EST CST}} + -returnCodes error + -result {unable to convert date-time string "10:00 EST CST": more than one time zone in string} +} + +test clock-34.51 {more than one weekday} {*}{ + -body {clock scan {Monday Tuesday}} + -returnCodes error + -result {unable to convert date-time string "Monday Tuesday": more than one weekday in string} +} + +test clock-34.52 {more than one ordinal month} {*}{ + -body {clock scan {next January next March}} + -returnCodes error + -result {unable to convert date-time string "next January next March": more than one ordinal month in string} +} + + + # clock seconds test clock-35.1 {clock seconds tests} { expr [clock seconds]+1 -- cgit v0.12 From 2a3653593e13fea9eee1652863db7b373b0b3fa7 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 10 Jun 2009 14:44:29 +0000 Subject: * generic/tclStringObj.c: Corrected failures to deal with the "pure unicode" representation of an empty string. Thanks to Julian Noble for reporting the problem. [Bug 2803109] --- ChangeLog | 8 +++++++- generic/tclStringObj.c | 32 ++++++++++---------------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2df5de..d645d55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-06-10 Don Porter + + * generic/tclStringObj.c: Corrected failures to deal with the + "pure unicode" representation of an empty string. Thanks to Julian + Noble for reporting the problem. [Bug 2803109] + 2006-06-09 Kevin B. Kenny * generic/tclGetDate.y: Fixed a thread safety bug in the generated @@ -13,7 +19,7 @@ * library/tzdata/Asia/Dhaka: New DST rule for Bangladesh. (Olson's tzdata2009i.) - + 2009-06-08 Donal K. Fellows * doc/copy.n: Fix error in example spotted by Venkat Iyer. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 7bd7526..ded77e9 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.122 2009/04/07 18:45:54 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.123 2009/06/10 14:44:29 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -855,11 +855,6 @@ Tcl_SetObjLength( * Can only get here when objPtr->bytes == NULL. * No need to invalidate the string rep. */ - - if (length == 0) { - /* For the empty string case, set the string rep. */ - TclInitStringRep(objPtr, tclEmptyStringRep, 0); - } } } @@ -970,11 +965,6 @@ Tcl_AttemptSetObjLength( * Can only get here when objPtr->bytes == NULL. * No need to invalidate the string rep. */ - - if (length == 0) { - /* For the empty string case, set the string rep. */ - TclInitStringRep(objPtr, tclEmptyStringRep, 0); - } } return 1; } @@ -1056,11 +1046,6 @@ SetUnicodeObj( TclInvalidateStringRep(objPtr); stringPtr->allocated = 0; - - if (numChars == 0) { - /* For the empty string case, set the string rep. */ - TclInitStringRep(objPtr, tclEmptyStringRep, 0); - } } /* @@ -1533,6 +1518,9 @@ AppendUtfToUtfRep( * trailing null. */ + if (objPtr->bytes == NULL) { + objPtr->length = 0; + } oldLength = objPtr->length; newLength = numBytes + oldLength; if (newLength < 0) { @@ -2653,10 +2641,6 @@ ExtendUnicodeRepWithString( bytes += TclUtfToUniChar(bytes, dst); } *dst = 0; - if (needed == 0) { - /* For the empty string case, set the string rep. */ - TclInitStringRep(objPtr, tclEmptyStringRep, 0); - } } /* @@ -2828,8 +2812,12 @@ UpdateStringOfString( Tcl_Obj *objPtr) /* Object with string rep to update. */ { String *stringPtr = GET_STRING(objPtr); - (void) ExtendStringRepWithUnicode(objPtr, stringPtr->unicode, - stringPtr->numChars); + if (stringPtr->numChars == 0) { + TclInitStringRep(objPtr, tclEmptyStringRep, 0); + } else { + (void) ExtendStringRepWithUnicode(objPtr, stringPtr->unicode, + stringPtr->numChars); + } } static int -- cgit v0.12 From 6e902e710f444b6f54b6134c61317a4d37a22804 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 10 Jun 2009 21:39:49 +0000 Subject: * generic/tclStringObj.c: Revised [format] to not overflow the integer calculations computing the length of the %ll formats of really big integers. Also added protections so that [format]s that would produce results overflowing the maximum string length of Tcl values throw a normal Tcl error instead of a panic. [Bug 2801413] --- ChangeLog | 6 ++++ generic/tclStringObj.c | 77 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 75 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index d645d55..d3462ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-06-10 Don Porter + * generic/tclStringObj.c: Revised [format] to not overflow the + integer calculations computing the length of the %ll formats of + really big integers. Also added protections so that [format]s that + would produce results overflowing the maximum string length of Tcl + values throw a normal Tcl error instead of a panic. [Bug 2801413] + * generic/tclStringObj.c: Corrected failures to deal with the "pure unicode" representation of an empty string. Thanks to Julian Noble for reporting the problem. [Bug 2803109] diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index ded77e9..ebc15b3 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.123 2009/06/10 14:44:29 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.124 2009/06/10 21:39:49 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1659,18 +1659,20 @@ Tcl_AppendFormatToObj( { const char *span = format, *msg; int numBytes = 0, objIndex = 0, gotXpg = 0, gotSequential = 0; - int originalLength; + int originalLength, limit; static const char *mixedXPG = "cannot mix \"%\" and \"%n$\" conversion specifiers"; static const char *const badIndex[2] = { "not enough arguments for all format specifiers", "\"%n$\" argument index out of range" }; + static const char *overflow = "max size for a Tcl value exceeded"; if (Tcl_IsShared(appendObj)) { Tcl_Panic("%s called with shared object", "Tcl_AppendFormatToObj"); } TclGetStringFromObj(appendObj, &originalLength); + limit = INT_MAX - originalLength; /* * Format string is NUL-terminated. @@ -1680,7 +1682,7 @@ Tcl_AppendFormatToObj( char *end; int gotMinus, gotHash, gotZero, gotSpace, gotPlus, sawFlag; int width, gotPrecision, precision, useShort, useWide, useBig; - int newXpg, numChars, allocSegment = 0; + int newXpg, numChars, allocSegment = 0, segmentLimit, segmentNumBytes; Tcl_Obj *segment; Tcl_UniChar ch; int step = Tcl_UtfToUniChar(format, &ch); @@ -1691,7 +1693,12 @@ Tcl_AppendFormatToObj( continue; } if (numBytes) { + if (numBytes > limit) { + msg = overflow; + goto errorMsg; + } Tcl_AppendToObj(appendObj, span, numBytes); + limit -= numBytes; numBytes = 0; } @@ -1798,6 +1805,10 @@ Tcl_AppendFormatToObj( format += step; step = Tcl_UtfToUniChar(format, &ch); } + if (width > limit) { + msg = overflow; + goto errorMsg; + } /* * Step 4. Precision. @@ -1911,7 +1922,7 @@ Tcl_AppendFormatToObj( long l; Tcl_WideInt w; mp_int big; - int isNegative = 0; + int toAppend, isNegative = 0; if (useBig) { if (Tcl_GetBignumFromObj(interp, segment, &big) != TCL_OK) { @@ -1962,25 +1973,30 @@ Tcl_AppendFormatToObj( segment = Tcl_NewObj(); allocSegment = 1; + segmentLimit = INT_MAX; Tcl_IncrRefCount(segment); if ((isNegative || gotPlus || gotSpace) && (useBig || ch=='d')) { Tcl_AppendToObj(segment, (isNegative ? "-" : gotPlus ? "+" : " "), 1); + segmentLimit -= 1; } if (gotHash) { switch (ch) { case 'o': Tcl_AppendToObj(segment, "0", 1); + segmentLimit -= 1; precision--; break; case 'x': case 'X': Tcl_AppendToObj(segment, "0x", 2); + segmentLimit -= 2; break; case 'b': Tcl_AppendToObj(segment, "0b", 2); + segmentLimit -= 2; break; } } @@ -2011,6 +2027,7 @@ Tcl_AppendFormatToObj( length--; bytes++; } + toAppend = length; /* * Canonical decimal string reps for integers are composed @@ -2019,6 +2036,9 @@ Tcl_AppendFormatToObj( */ if (gotPrecision) { + if (length < precision) { + segmentLimit -= (precision - length); + } while (length < precision) { Tcl_AppendToObj(segment, "0", 1); length++; @@ -2027,12 +2047,19 @@ Tcl_AppendFormatToObj( } if (gotZero) { length += Tcl_GetCharLength(segment); + if (length < width) { + segmentLimit -= (width - length); + } while (length < width) { Tcl_AppendToObj(segment, "0", 1); length++; } } - Tcl_AppendToObj(segment, bytes, -1); + if (toAppend > segmentLimit) { + msg = overflow; + goto errorMsg; + } + Tcl_AppendToObj(segment, bytes, toAppend); Tcl_DecrRefCount(pure); break; } @@ -2043,7 +2070,8 @@ Tcl_AppendFormatToObj( case 'X': case 'b': { Tcl_WideUInt bits = (Tcl_WideUInt)0; - int length, numBits = 4, numDigits = 0, base = 16; + Tcl_WideInt numDigits = (Tcl_WideInt)0; + int length, numBits = 4, base = 16; int index = 0, shift = 0; Tcl_Obj *pure; char *bytes; @@ -2077,11 +2105,16 @@ Tcl_AppendFormatToObj( int leftover = (big.used * DIGIT_BIT) % numBits; mp_digit mask = (~(mp_digit)0) << (DIGIT_BIT-leftover); - numDigits = 1 + ((big.used * DIGIT_BIT) / numBits); + numDigits = 1 + + (((Tcl_WideInt)big.used * DIGIT_BIT) / numBits); while ((mask & big.dp[big.used-1]) == 0) { numDigits--; mask >>= numBits; } + if (numDigits > INT_MAX) { + msg = overflow; + goto errorMsg; + } } else if (!useBig) { unsigned long int ul = (unsigned long int) l; @@ -2102,7 +2135,7 @@ Tcl_AppendFormatToObj( pure = Tcl_NewObj(); Tcl_SetObjLength(pure, numDigits); bytes = TclGetString(pure); - length = numDigits; + toAppend = length = numDigits; while (numDigits--) { int digitOffset; @@ -2126,6 +2159,9 @@ Tcl_AppendFormatToObj( mp_clear(&big); } if (gotPrecision) { + if (length < precision) { + segmentLimit -= (precision - length); + } while (length < precision) { Tcl_AppendToObj(segment, "0", 1); length++; @@ -2134,11 +2170,18 @@ Tcl_AppendFormatToObj( } if (gotZero) { length += Tcl_GetCharLength(segment); + if (length < width) { + segmentLimit -= (width - length); + } while (length < width) { Tcl_AppendToObj(segment, "0", 1); length++; } } + if (toAppend > segmentLimit) { + msg = overflow; + goto errorMsg; + } Tcl_AppendObjToObj(segment, pure); Tcl_DecrRefCount(pure); break; @@ -2222,15 +2265,28 @@ Tcl_AppendFormatToObj( numChars = Tcl_GetCharLength(segment); if (!gotMinus) { + if (numChars < width) { + limit -= (width - numChars); + } while (numChars < width) { Tcl_AppendToObj(appendObj, (gotZero ? "0" : " "), 1); numChars++; } } + + Tcl_GetStringFromObj(segment, &segmentNumBytes); + if (segmentNumBytes > limit) { + msg = overflow; + goto errorMsg; + } Tcl_AppendObjToObj(appendObj, segment); + limit -= segmentNumBytes; if (allocSegment) { Tcl_DecrRefCount(segment); } + if (numChars < width) { + limit -= (width - numChars); + } while (numChars < width) { Tcl_AppendToObj(appendObj, (gotZero ? "0" : " "), 1); numChars++; @@ -2239,7 +2295,12 @@ Tcl_AppendFormatToObj( objIndex += gotSequential; } if (numBytes) { + if (numBytes > limit) { + msg = overflow; + goto errorMsg; + } Tcl_AppendToObj(appendObj, span, numBytes); + limit -= numBytes; numBytes = 0; } -- cgit v0.12 From fdb97a3d7dd85152f33c8232bc038c32e995f8af Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 13 Jun 2009 14:31:54 +0000 Subject: * generic/tclCompile.c: The value stashed in iPtr->compiledProcPtr * generic/tclProc.c: when compiling a proc survives too long. We * tests/execute.test: only need it there long enough for the right TclInitCompileEnv() call to re-stash it into envPtr->procPtr. Once that is done, the CompileEnv controls. If we let the value of iPtr->compiledProcPtr linger, though, then any other bytecode compile operation that takes place will also have its CompileEnv initialized with it, and that's not correct. The value is meant to control the compile of the proc body only, not other compile tasks that happen along. Thanks to Carlos Tasada for discovering and reporting the problem. [Bug 2802881]. --- ChangeLog | 14 ++++++++++++++ generic/tclCompile.c | 3 ++- generic/tclProc.c | 5 +---- tests/execute.test | 15 ++++++++++++++- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3462ad..3e744c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-06-13 Don Porter + + * generic/tclCompile.c: The value stashed in iPtr->compiledProcPtr + * generic/tclProc.c: when compiling a proc survives too long. We + * tests/execute.test: only need it there long enough for the right + TclInitCompileEnv() call to re-stash it into envPtr->procPtr. Once + that is done, the CompileEnv controls. If we let the value of + iPtr->compiledProcPtr linger, though, then any other bytecode compile + operation that takes place will also have its CompileEnv initialized + with it, and that's not correct. The value is meant to control the + compile of the proc body only, not other compile tasks that happen + along. Thanks to Carlos Tasada for discovering and reporting the + problem. [Bug 2802881]. + 2009-06-10 Don Porter * generic/tclStringObj.c: Revised [format] to not overflow the diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 63a95aa..14ed9a0 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.166 2009/02/09 22:55:44 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.167 2009/06/13 14:31:54 dgp Exp $ */ #include "tclInt.h" @@ -868,6 +868,7 @@ TclInitCompileEnv( envPtr->source = stringPtr; envPtr->numSrcBytes = numBytes; envPtr->procPtr = iPtr->compiledProcPtr; + iPtr->compiledProcPtr = NULL; envPtr->numCommands = 0; envPtr->exceptDepth = 0; envPtr->maxExceptDepth = 0; diff --git a/generic/tclProc.c b/generic/tclProc.c index 2062672..7696015 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.171 2009/03/24 09:30:07 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.172 2009/06/13 14:31:54 dgp Exp $ */ #include "tclInt.h" @@ -1939,7 +1939,6 @@ TclProcCompileProc( { Interp *iPtr = (Interp *) interp; Tcl_CallFrame *framePtr; - Proc *saveProcPtr; ByteCode *codePtr = bodyPtr->internalRep.otherValuePtr; /* @@ -2009,7 +2008,6 @@ TclProcCompileProc( * appropriate class context. */ - saveProcPtr = iPtr->compiledProcPtr; iPtr->compiledProcPtr = procPtr; if (procPtr->numCompiledLocals > procPtr->numArgs) { @@ -2055,7 +2053,6 @@ TclProcCompileProc( tclByteCodeType.setFromAnyProc(interp, bodyPtr); iPtr->invokeCmdFramePtr = NULL; TclPopStackFrame(interp); - iPtr->compiledProcPtr = saveProcPtr; } else if (codePtr->nsEpoch != nsPtr->resolverEpoch) { /* * The resolver epoch has changed, but we only need to invalidate the diff --git a/tests/execute.test b/tests/execute.test index f6174d0..fad153b 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.30 2009/02/05 14:21:43 dkf Exp $ +# RCS: @(#) $Id: execute.test,v 1.31 2009/06/13 14:31:54 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -979,6 +979,19 @@ test execute-10.1 {TclExecuteByteCode, INST_CONCAT1, bytearrays} { apply {s {binary scan $s c x; list $x [scan $s$s %c%c]}} \u0130 } {48 {304 304}} +test execute-10.2 {Bug 2802881} -setup { + interp create slave +} -body { + # If [Bug 2802881] is not fixed, this will segfault + slave eval { + trace add variable ::errorInfo write {expr {$foo} ;#} + proc demo {} {a {}{}} + demo + } +} -cleanup { + interp delete slave +} -returnCodes error -match glob -result * + # cleanup if {[info commands testobj] != {}} { testobj freeallvars -- cgit v0.12 From c664dc994a0c00a615120c01bda0f55ddd4e428f Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 15 Jun 2009 09:41:43 +0000 Subject: Apply last useful bit of [Patch 557486]. --- ChangeLog | 60 ++++++++++++++++++++++++++---------------------- tools/tcltk-man2html.tcl | 2 +- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e744c2..3e4ba6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,28 +1,34 @@ +2009-06-15 Donal K. Fellows + + * tools/tcltk-man2html.tcl (make-man-pages): [Patch 557486]: Apply + last remaining meaningful part of this patch, a clean up of some + closing tags. + 2009-06-13 Don Porter - * generic/tclCompile.c: The value stashed in iPtr->compiledProcPtr - * generic/tclProc.c: when compiling a proc survives too long. We - * tests/execute.test: only need it there long enough for the right - TclInitCompileEnv() call to re-stash it into envPtr->procPtr. Once - that is done, the CompileEnv controls. If we let the value of - iPtr->compiledProcPtr linger, though, then any other bytecode compile - operation that takes place will also have its CompileEnv initialized - with it, and that's not correct. The value is meant to control the - compile of the proc body only, not other compile tasks that happen - along. Thanks to Carlos Tasada for discovering and reporting the - problem. [Bug 2802881]. + * generic/tclCompile.c: [Bug 2802881]: The value stashed in + * generic/tclProc.c: iPtr->compiledProcPtr when compiling a proc + * tests/execute.test: survives too long. We only need it there long + enough for the right TclInitCompileEnv() call to re-stash it into + envPtr->procPtr. Once that is done, the CompileEnv controls. If we + let the value of iPtr->compiledProcPtr linger, though, then any other + bytecode compile operation that takes place will also have its + CompileEnv initialized with it, and that's not correct. The value is + meant to control the compile of the proc body only, not other compile + tasks that happen along. Thanks to Carlos Tasada for discovering and + reporting the problem. 2009-06-10 Don Porter - * generic/tclStringObj.c: Revised [format] to not overflow the - integer calculations computing the length of the %ll formats of - really big integers. Also added protections so that [format]s that - would produce results overflowing the maximum string length of Tcl - values throw a normal Tcl error instead of a panic. [Bug 2801413] + * generic/tclStringObj.c: [Bug 2801413]: Revised [format] to not + overflow the integer calculations computing the length of the %ll + formats of really big integers. Also added protections so that + [format]s that would produce results overflowing the maximum string + length of Tcl values throw a normal Tcl error instead of a panic. - * generic/tclStringObj.c: Corrected failures to deal with the - "pure unicode" representation of an empty string. Thanks to Julian - Noble for reporting the problem. [Bug 2803109] + * generic/tclStringObj.c: [Bug 2803109]: Corrected failures to + deal with the "pure unicode" representation of an empty string. + Thanks to Julian Noble for reporting the problem. 2006-06-09 Kevin B. Kenny @@ -37,8 +43,8 @@ 2006-06-08 Kevin B. Kenny - * library/tzdata/Asia/Dhaka: New DST rule for Bangladesh. - (Olson's tzdata2009i.) + * library/tzdata/Asia/Dhaka: New DST rule for Bangladesh. (Olson's + tzdata2009i.) 2009-06-08 Donal K. Fellows @@ -46,17 +52,17 @@ 2009-06-02 Don Porter - * generic/tclExecute.c: Replace dynamically-initialized table with - a table of static constants in the lookup table for exponent operator + * generic/tclExecute.c: Replace dynamically-initialized table with a + table of static constants in the lookup table for exponent operator computations that fit in a 64 bit integer result. - * generic/tclExecute.c: Corrected implementations and selection - logic of the INST_EXPON instruction to fix [Bug 2798543]. + * generic/tclExecute.c: [Bug 2798543]: Corrected implementations and + selection logic of the INST_EXPON instruction. 2009-06-01 Don Porter - * tests/expr.test: Added many tests demonstrating the broken - cases of [Bug 2798543]. + * tests/expr.test: [Bug 2798543]: Added many tests demonstrating + the broken cases. 009-05-30 Kevin B. Kenny diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 0cb3ac7..23b0d30 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -1796,7 +1796,7 @@ proc make-man-pages {html args} { } set tail [file tail $tail] append rows([expr {$n%$nrows}]) \ - " $name" + " $name " incr n } puts $manual(wing-toc-fp) -- cgit v0.12 From 0acb18f87feafbdd931076405ca98c3ce30deca5 Mon Sep 17 00:00:00 2001 From: rmax Date: Mon, 15 Jun 2009 16:24:44 +0000 Subject: * unix/tclUnixPort.h: Move all socket-related code from tclUnixChan.c * unix/tclUnixChan.c: to tclUnixSock.c. * unix/tclUnixSock.c: --- ChangeLog | 6 + unix/tclUnixChan.c | 1143 +-------------------------------------------------- unix/tclUnixPort.h | 4 +- unix/tclUnixSock.c | 1152 +++++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 1163 insertions(+), 1142 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e4ba6d..84b5b14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-06-15 Reinhard Max + + * unix/tclUnixPort.h: Move all socket-related code from tclUnixChan.c + * unix/tclUnixChan.c: to tclUnixSock.c. + * unix/tclUnixSock.c: + 2009-06-15 Donal K. Fellows * tools/tcltk-man2html.tcl (make-man-pages): [Patch 557486]: Apply diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 29da9e4..d8eaccc 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.100 2009/04/10 21:40:55 dgp Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.101 2009/06/15 16:24:45 rmax Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -144,60 +144,9 @@ typedef struct TtyAttrs { } /* - * This structure describes per-instance state of a tcp based channel. - */ - -typedef struct TcpState { - Tcl_Channel channel; /* Channel associated with this file. */ - int fd; /* The socket itself. */ - int flags; /* ORed combination of the bitfields defined - * below. */ - Tcl_TcpAcceptProc *acceptProc; - /* Proc to call on accept. */ - ClientData acceptProcData; /* The data for the accept proc. */ -} TcpState; - -/* - * These bits may be ORed together into the "flags" field of a TcpState - * structure. - */ - -#define TCP_ASYNC_SOCKET (1<<0) /* Asynchronous socket. */ -#define TCP_ASYNC_CONNECT (1<<1) /* Async connect in progress. */ - -/* - * The following defines the maximum length of the listen queue. This is the - * number of outstanding yet-to-be-serviced requests for a connection on a - * server socket, more than this number of outstanding requests and the - * connection request will fail. - */ - -#ifndef SOMAXCONN -# define SOMAXCONN 100 -#endif /* SOMAXCONN */ - -#if (SOMAXCONN < 100) -# undef SOMAXCONN -# define SOMAXCONN 100 -#endif /* SOMAXCONN < 100 */ - -/* - * The following defines how much buffer space the kernel should maintain for - * a socket. - */ - -#define SOCKET_BUFSIZE 4096 - -/* * Static routines for this file: */ -static TcpState * CreateSocket(Tcl_Interp *interp, int port, - const char *host, int server, const char *myaddr, - int myport, int async); -static int CreateSocketAddress(struct sockaddr_in *sockaddrPtr, - const char *host, int port, int willBind, - const char **errorMsgPtr); static int FileBlockModeProc(ClientData instanceData, int mode); static int FileCloseProc(ClientData instanceData, Tcl_Interp *interp); @@ -214,23 +163,6 @@ static int FileTruncateProc(ClientData instanceData, static Tcl_WideInt FileWideSeekProc(ClientData instanceData, Tcl_WideInt offset, int mode, int *errorCode); static void FileWatchProc(ClientData instanceData, int mask); -static void TcpAccept(ClientData data, int mask); -static int TcpBlockModeProc(ClientData data, int mode); -static int TcpCloseProc(ClientData instanceData, - Tcl_Interp *interp); -static int TcpClose2Proc(ClientData instanceData, - Tcl_Interp *interp, - int flags); -static int TcpGetHandleProc(ClientData instanceData, - int direction, ClientData *handlePtr); -static int TcpGetOptionProc(ClientData instanceData, - Tcl_Interp *interp, const char *optionName, - Tcl_DString *dsPtr); -static int TcpInputProc(ClientData instanceData, char *buf, - int toRead, int *errorCode); -static int TcpOutputProc(ClientData instanceData, - const char *buf, int toWrite, int *errorCode); -static void TcpWatchProc(ClientData instanceData, int mask); #ifdef SUPPORTS_TTY static void TtyGetAttributes(int fd, TtyAttrs *ttyPtr); static int TtyGetOptionProc(ClientData instanceData, @@ -250,9 +182,6 @@ static int TtySetOptionProc(ClientData instanceData, Tcl_Interp *interp, const char *optionName, const char *value); #endif /* SUPPORTS_TTY */ -static int WaitForConnect(TcpState *statePtr, int *errorCodePtr); -static Tcl_Channel MakeTcpClientChannelMode(ClientData tcpSocket, - int mode); /* * This structure describes the channel type structure for file based IO: @@ -305,30 +234,6 @@ static Tcl_ChannelType ttyChannelType = { }; #endif /* SUPPORTS_TTY */ -/* - * This structure describes the channel type structure for TCP socket - * based IO: - */ - -static Tcl_ChannelType tcpChannelType = { - "tcp", /* Type name. */ - TCL_CHANNEL_VERSION_5, /* v5 channel */ - TcpCloseProc, /* Close proc. */ - TcpInputProc, /* Input proc. */ - TcpOutputProc, /* Output proc. */ - NULL, /* Seek proc. */ - NULL, /* Set option proc. */ - TcpGetOptionProc, /* Get option proc. */ - TcpWatchProc, /* Initialize notifier. */ - TcpGetHandleProc, /* Get OS handles out of channel. */ - TcpClose2Proc, /* Close2 proc. */ - TcpBlockModeProc, /* Set blocking or non-blocking mode.*/ - NULL, /* flush proc. */ - NULL, /* handler proc. */ - NULL, /* wide seek proc. */ - NULL, /* thread action proc. */ - NULL, /* truncate proc. */ -}; /* *---------------------------------------------------------------------- @@ -1773,7 +1678,7 @@ Tcl_MakeFileChannel( if (getsockname(fd, (struct sockaddr *)&sockaddr, &sockaddrLen) == 0 && sockaddrLen > 0 && sockaddr.sa_family == AF_INET) { - return MakeTcpClientChannelMode((ClientData) INT2PTR(fd), mode); + return TclpMakeTcpClientChannelMode((ClientData) INT2PTR(fd), mode); } else { channelTypePtr = &fileChannelType; fsPtr = (FileState *) ckalloc((unsigned) sizeof(FileState)); @@ -1791,1048 +1696,6 @@ Tcl_MakeFileChannel( /* *---------------------------------------------------------------------- * - * TcpBlockModeProc -- - * - * This function is invoked by the generic IO level to set blocking and - * nonblocking mode on a TCP socket based channel. - * - * Results: - * 0 if successful, errno when failed. - * - * Side effects: - * Sets the device into blocking or nonblocking mode. - * - *---------------------------------------------------------------------- - */ - - /* ARGSUSED */ -static int -TcpBlockModeProc( - ClientData instanceData, /* Socket state. */ - int mode) /* The mode to set. Can be one of - * TCL_MODE_BLOCKING or - * TCL_MODE_NONBLOCKING. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - - if (mode == TCL_MODE_BLOCKING) { - CLEAR_BITS(statePtr->flags, TCP_ASYNC_SOCKET); - } else { - SET_BITS(statePtr->flags, TCP_ASYNC_SOCKET); - } - if (TclUnixSetBlockingMode(statePtr->fd, mode) < 0) { - return errno; - } - return 0; -} - -/* - *---------------------------------------------------------------------- - * - * WaitForConnect -- - * - * Wait for a connection on an asynchronously opened socket to be - * completed. In nonblocking mode, just test if the connection - * has completed without blocking. - * - * Results: - * 0 if the connection has completed, -1 if still in progress - * or there is an error. - * - *---------------------------------------------------------------------- - */ - -static int -WaitForConnect( - TcpState *statePtr, /* State of the socket. */ - int *errorCodePtr) /* Where to store errors? */ -{ - int timeOut; /* How long to wait. */ - int state; /* Of calling TclWaitForFile. */ - - /* - * If an asynchronous connect is in progress, attempt to wait for it to - * complete before reading. - */ - - if (statePtr->flags & TCP_ASYNC_CONNECT) { - if (statePtr->flags & TCP_ASYNC_SOCKET) { - timeOut = 0; - } else { - timeOut = -1; - } - errno = 0; - state = TclUnixWaitForFile(statePtr->fd, - TCL_WRITABLE | TCL_EXCEPTION, timeOut); - if (state & TCL_EXCEPTION) { - return -1; - } - if (state & TCL_WRITABLE) { - CLEAR_BITS(statePtr->flags, TCP_ASYNC_CONNECT); - } else if (timeOut == 0) { - *errorCodePtr = errno = EWOULDBLOCK; - return -1; - } - } - return 0; -} - -/* - *---------------------------------------------------------------------- - * - * TcpInputProc -- - * - * This function is invoked by the generic IO level to read input from a - * TCP socket based channel. - * - * NOTE: We cannot share code with FilePipeInputProc because here we must - * use recv to obtain the input from the channel, not read. - * - * Results: - * The number of bytes read is returned or -1 on error. An output - * argument contains the POSIX error code on error, or zero if no error - * occurred. - * - * Side effects: - * Reads input from the input device of the channel. - * - *---------------------------------------------------------------------- - */ - - /* ARGSUSED */ -static int -TcpInputProc( - ClientData instanceData, /* Socket state. */ - char *buf, /* Where to store data read. */ - int bufSize, /* How much space is available in the - * buffer? */ - int *errorCodePtr) /* Where to store error code. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - int bytesRead; - - *errorCodePtr = 0; - if (WaitForConnect(statePtr, errorCodePtr) != 0) { - return -1; - } - bytesRead = recv(statePtr->fd, buf, (size_t) bufSize, 0); - if (bytesRead > -1) { - return bytesRead; - } - if (errno == ECONNRESET) { - /* - * Turn ECONNRESET into a soft EOF condition. - */ - - return 0; - } - *errorCodePtr = errno; - return -1; -} - -/* - *---------------------------------------------------------------------- - * - * TcpOutputProc -- - * - * This function is invoked by the generic IO level to write output to a - * TCP socket based channel. - * - * NOTE: We cannot share code with FilePipeOutputProc because here we - * must use send, not write, to get reliable error reporting. - * - * Results: - * The number of bytes written is returned. An output argument is set to - * a POSIX error code if an error occurred, or zero. - * - * Side effects: - * Writes output on the output device of the channel. - * - *---------------------------------------------------------------------- - */ - -static int -TcpOutputProc( - ClientData instanceData, /* Socket state. */ - const char *buf, /* The data buffer. */ - int toWrite, /* How many bytes to write? */ - int *errorCodePtr) /* Where to store error code. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - int written; - - *errorCodePtr = 0; - if (WaitForConnect(statePtr, errorCodePtr) != 0) { - return -1; - } - written = send(statePtr->fd, buf, (size_t) toWrite, 0); - if (written > -1) { - return written; - } - *errorCodePtr = errno; - return -1; -} - -/* - *---------------------------------------------------------------------- - * - * TcpCloseProc -- - * - * This function is invoked by the generic IO level to perform - * channel-type-specific cleanup when a TCP socket based channel is - * closed. - * - * Results: - * 0 if successful, the value of errno if failed. - * - * Side effects: - * Closes the socket of the channel. - * - *---------------------------------------------------------------------- - */ - - /* ARGSUSED */ -static int -TcpCloseProc( - ClientData instanceData, /* The socket to close. */ - Tcl_Interp *interp) /* For error reporting - unused. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - int errorCode = 0; - - /* - * Delete a file handler that may be active for this socket if this is a - * server socket - the file handler was created automatically by Tcl as - * part of the mechanism to accept new client connections. Channel - * handlers are already deleted in the generic IO channel closing code - * that called this function, so we do not have to delete them here. - */ - - Tcl_DeleteFileHandler(statePtr->fd); - - if (close(statePtr->fd) < 0) { - errorCode = errno; - } - ckfree((char *) statePtr); - - return errorCode; -} - -/* - *---------------------------------------------------------------------- - * - * TcpClose2Proc -- - * - * This function is called by the generic IO level to perform the channel - * type specific part of a half-close: namely, a shutdown() on a socket. - * - * Results: - * 0 if successful, the value of errno if failed. - * - * Side effects: - * Shuts down one side of the socket. - * - *---------------------------------------------------------------------- - */ - -static int -TcpClose2Proc( - ClientData instanceData, /* The socket to close. */ - Tcl_Interp *interp, /* For error reporting. */ - int flags) /* Flags that indicate which side to close. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - int errorCode = 0; - int sd; - - /* - * Shutdown the OS socket handle. - */ - switch(flags) - { - case TCL_CLOSE_READ: - sd=SHUT_RD; - break; - case TCL_CLOSE_WRITE: - sd=SHUT_WR; - break; - default: - if (interp) { - Tcl_AppendResult(interp, "Socket close2proc called bidirectionally", NULL); - } - return TCL_ERROR; - } - if (shutdown(statePtr->fd,sd)<0) { - errorCode = errno; - } - - return errorCode; -} - -/* - *---------------------------------------------------------------------- - * - * TcpGetOptionProc -- - * - * Computes an option value for a TCP socket based channel, or a list of - * all options and their values. - * - * Note: This code is based on code contributed by John Haxby. - * - * Results: - * A standard Tcl result. The value of the specified option or a list of - * all options and their values is returned in the supplied DString. Sets - * Error message if needed. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -TcpGetOptionProc( - ClientData instanceData, /* Socket state. */ - Tcl_Interp *interp, /* For error reporting - can be NULL. */ - const char *optionName, /* Name of the option to retrieve the value - * for, or NULL to get all options and their - * values. */ - Tcl_DString *dsPtr) /* Where to store the computed value; - * initialized by caller. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - struct sockaddr_in sockname; - struct sockaddr_in peername; - struct hostent *hostEntPtr; - socklen_t size = sizeof(struct sockaddr_in); - size_t len = 0; - char buf[TCL_INTEGER_SPACE]; - - if (optionName != NULL) { - len = strlen(optionName); - } - - if ((len > 1) && (optionName[1] == 'e') && - (strncmp(optionName, "-error", len) == 0)) { - socklen_t optlen = sizeof(int); - int err, ret; - - ret = getsockopt(statePtr->fd, SOL_SOCKET, SO_ERROR, - (char *)&err, &optlen); - if (ret < 0) { - err = errno; - } - if (err != 0) { - Tcl_DStringAppend(dsPtr, Tcl_ErrnoMsg(err), -1); - } - return TCL_OK; - } - - if ((len == 0) || - ((len > 1) && (optionName[1] == 'p') && - (strncmp(optionName, "-peername", len) == 0))) { - if (getpeername(statePtr->fd, (struct sockaddr *) &peername, - &size) >= 0) { - if (len == 0) { - Tcl_DStringAppendElement(dsPtr, "-peername"); - Tcl_DStringStartSublist(dsPtr); - } - Tcl_DStringAppendElement(dsPtr, inet_ntoa(peername.sin_addr)); - hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ - (char *) &peername.sin_addr, - sizeof(peername.sin_addr), AF_INET); - if (hostEntPtr != NULL) { - Tcl_DString ds; - - Tcl_ExternalToUtfDString(NULL, hostEntPtr->h_name, -1, &ds); - Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); - Tcl_DStringFree(&ds); - } else { - Tcl_DStringAppendElement(dsPtr, inet_ntoa(peername.sin_addr)); - } - TclFormatInt(buf, ntohs(peername.sin_port)); - Tcl_DStringAppendElement(dsPtr, buf); - if (len == 0) { - Tcl_DStringEndSublist(dsPtr); - } else { - return TCL_OK; - } - } else { - /* - * getpeername failed - but if we were asked for all the options - * (len==0), don't flag an error at that point because it could be - * an fconfigure request on a server socket (which have no peer). - * Same must be done on win&mac. - */ - - if (len) { - if (interp) { - Tcl_AppendResult(interp, "can't get peername: ", - Tcl_PosixError(interp), NULL); - } - return TCL_ERROR; - } - } - } - - if ((len == 0) || - ((len > 1) && (optionName[1] == 's') && - (strncmp(optionName, "-sockname", len) == 0))) { - if (getsockname(statePtr->fd, (struct sockaddr *) &sockname, - &size) >= 0) { - if (len == 0) { - Tcl_DStringAppendElement(dsPtr, "-sockname"); - Tcl_DStringStartSublist(dsPtr); - } - Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); - hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ - (char *) &sockname.sin_addr, - sizeof(sockname.sin_addr), AF_INET); - if (hostEntPtr != NULL) { - Tcl_DString ds; - - Tcl_ExternalToUtfDString(NULL, hostEntPtr->h_name, -1, &ds); - Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); - Tcl_DStringFree(&ds); - } else { - Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); - } - TclFormatInt(buf, ntohs(sockname.sin_port)); - Tcl_DStringAppendElement(dsPtr, buf); - if (len == 0) { - Tcl_DStringEndSublist(dsPtr); - } else { - return TCL_OK; - } - } else { - if (interp) { - Tcl_AppendResult(interp, "can't get sockname: ", - Tcl_PosixError(interp), NULL); - } - return TCL_ERROR; - } - } - - if (len > 0) { - return Tcl_BadChannelOption(interp, optionName, "peername sockname"); - } - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TcpWatchProc -- - * - * Initialize the notifier to watch the fd from this channel. - * - * Results: - * None. - * - * Side effects: - * Sets up the notifier so that a future event on the channel will be - * seen by Tcl. - * - *---------------------------------------------------------------------- - */ - -static void -TcpWatchProc( - ClientData instanceData, /* The socket state. */ - int mask) /* Events of interest; an OR-ed combination of - * TCL_READABLE, TCL_WRITABLE and - * TCL_EXCEPTION. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - - /* - * Make sure we don't mess with server sockets since they will never be - * readable or writable at the Tcl level. This keeps Tcl scripts from - * interfering with the -accept behavior. - */ - - if (!statePtr->acceptProc) { - if (mask) { - Tcl_CreateFileHandler(statePtr->fd, mask, - (Tcl_FileProc *) Tcl_NotifyChannel, - (ClientData) statePtr->channel); - } else { - Tcl_DeleteFileHandler(statePtr->fd); - } - } -} - -/* - *---------------------------------------------------------------------- - * - * TcpGetHandleProc -- - * - * Called from Tcl_GetChannelHandle to retrieve OS handles from inside a - * TCP socket based channel. - * - * Results: - * Returns TCL_OK with the fd in handlePtr, or TCL_ERROR if there is no - * handle for the specified direction. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - - /* ARGSUSED */ -static int -TcpGetHandleProc( - ClientData instanceData, /* The socket state. */ - int direction, /* Not used. */ - ClientData *handlePtr) /* Where to store the handle. */ -{ - TcpState *statePtr = (TcpState *) instanceData; - - *handlePtr = (ClientData) INT2PTR(statePtr->fd); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * CreateSocket -- - * - * This function opens a new socket in client or server mode and - * initializes the TcpState structure. - * - * Results: - * Returns a new TcpState, or NULL with an error in the interp's result, - * if interp is not NULL. - * - * Side effects: - * Opens a socket. - * - *---------------------------------------------------------------------- - */ - -static TcpState * -CreateSocket( - Tcl_Interp *interp, /* For error reporting; can be NULL. */ - int port, /* Port number to open. */ - const char *host, /* Name of host on which to open port. NULL - * implies INADDR_ANY */ - int server, /* 1 if socket should be a server socket, else - * 0 for a client socket. */ - const char *myaddr, /* Optional client-side address */ - int myport, /* Optional client-side port */ - int async) /* If nonzero and creating a client socket, - * attempt to do an async connect. Otherwise - * do a synchronous connect or bind. */ -{ - int status = 0, sock = -1; - struct sockaddr_in sockaddr; /* socket address */ - struct sockaddr_in mysockaddr; /* Socket address for client */ - TcpState *statePtr; - const char *errorMsg = NULL; - - if (!CreateSocketAddress(&sockaddr, host, port, 0, &errorMsg)) { - goto error; - } - if ((myaddr != NULL || myport != 0) && - !CreateSocketAddress(&mysockaddr, myaddr, myport, 1, &errorMsg)) { - goto error; - } - - sock = socket(AF_INET, SOCK_STREAM, 0); - if (sock < 0) { - goto error; - } - - /* - * Set the close-on-exec flag so that the socket will not get inherited by - * child processes. - */ - - fcntl(sock, F_SETFD, FD_CLOEXEC); - - /* - * Set kernel space buffering - */ - - TclSockMinimumBuffers(sock, SOCKET_BUFSIZE); - - status = 0; - if (server) { - /* - * Set up to reuse server addresses automatically and bind to the - * specified port. - */ - - int reuseaddr = 1; - (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, - (char *) &reuseaddr, sizeof(reuseaddr)); - status = bind(sock, (struct sockaddr *) &sockaddr, - sizeof(struct sockaddr)); - if (status != -1) { - status = listen(sock, SOMAXCONN); - } - } else { - if (myaddr != NULL || myport != 0) { - int reuseaddr = 1; - (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, - (char *) &reuseaddr, sizeof(reuseaddr)); - status = bind(sock, (struct sockaddr *) &mysockaddr, - sizeof(struct sockaddr)); - if (status < 0) { - goto error; - } - } - - /* - * Attempt to connect. The connect may fail at present with an - * EINPROGRESS but at a later time it will complete. The caller will - * set up a file handler on the socket if she is interested in being - * informed when the connect completes. - */ - - if (async) { - status = TclUnixSetBlockingMode(sock, TCL_MODE_NONBLOCKING); - if (status < 0) { - goto error; - } - } - - status = connect(sock, (struct sockaddr *) &sockaddr, - sizeof(sockaddr)); - if (status < 0) { - if (errno == EINPROGRESS) { - status = 0; - } else { - goto error; - } - } - if (async) { - /* - * Restore blocking mode. - */ - status = TclUnixSetBlockingMode(sock, TCL_MODE_BLOCKING); - } - } - - if (status < 0) { -error: - if (interp != NULL) { - Tcl_AppendResult(interp, "couldn't open socket: ", - Tcl_PosixError(interp), NULL); - if (errorMsg != NULL) { - Tcl_AppendResult(interp, " (", errorMsg, ")", NULL); - } - } - if (sock != -1) { - close(sock); - } - return NULL; - } - - /* - * Allocate a new TcpState for this socket. - */ - - statePtr = (TcpState *) ckalloc((unsigned) sizeof(TcpState)); - statePtr->flags = async ? TCP_ASYNC_CONNECT : 0; - statePtr->fd = sock; - - return statePtr; -} - -/* - *---------------------------------------------------------------------- - * - * CreateSocketAddress -- - * - * This function initializes a sockaddr structure for a host and port. - * - * Results: - * 1 if the host was valid, 0 if the host could not be converted to an IP - * address. - * - * Side effects: - * Fills in the *sockaddrPtr structure. - * - *---------------------------------------------------------------------- - */ - -static int -CreateSocketAddress( - struct sockaddr_in *sockaddrPtr, /* Socket address */ - const char *host, /* Host. NULL implies INADDR_ANY */ - int port, /* Port number */ - int willBind, /* Is this an address to bind() to or - * to connect() to? */ - const char **errorMsgPtr) /* Place to store the error message - * detail, if available. */ -{ -#ifdef HAVE_GETADDRINFO - struct addrinfo hints, *resPtr = NULL; - char *native; - Tcl_DString ds; - int result; - - if (host == NULL) { - sockaddrPtr->sin_family = AF_INET; - sockaddrPtr->sin_addr.s_addr = INADDR_ANY; - addPort: - sockaddrPtr->sin_port = htons((unsigned short) (port & 0xFFFF)); - return 1; - } - - (void) memset(&hints, 0, sizeof(struct addrinfo)); - hints.ai_family = AF_INET; - hints.ai_socktype = SOCK_STREAM; - if (willBind) { - hints.ai_flags |= AI_PASSIVE; - } - - /* - * Note that getaddrinfo() *is* thread-safe. If a platform doesn't get - * that right, it shouldn't use this part of the code. - */ - - native = Tcl_UtfToExternalDString(NULL, host, -1, &ds); - result = getaddrinfo(native, NULL, &hints, &resPtr); - Tcl_DStringFree(&ds); - if (result == 0) { - memcpy(sockaddrPtr, resPtr->ai_addr, sizeof(struct sockaddr_in)); - freeaddrinfo(resPtr); - goto addPort; - } - - /* - * Ought to use gai_strerror() here... - */ - - switch (result) { - case EAI_NONAME: - case EAI_SERVICE: -#if defined(EAI_ADDRFAMILY) && EAI_ADDRFAMILY != EAI_NONAME - case EAI_ADDRFAMILY: -#endif -#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME - case EAI_NODATA: -#endif - *errorMsgPtr = gai_strerror(result); - errno = EHOSTUNREACH; - return 0; - case EAI_SYSTEM: - return 0; - default: - *errorMsgPtr = gai_strerror(result); - errno = ENXIO; - return 0; - } -#else /* !HAVE_GETADDRINFO */ - struct in_addr addr; /* For 64/32 bit madness */ - - (void) memset(sockaddrPtr, '\0', sizeof(struct sockaddr_in)); - sockaddrPtr->sin_family = AF_INET; - sockaddrPtr->sin_port = htons((unsigned short) (port & 0xFFFF)); - if (host == NULL) { - addr.s_addr = INADDR_ANY; - } else { - struct hostent *hostent; /* Host database entry */ - Tcl_DString ds; - const char *native; - - if (host == NULL) { - native = NULL; - } else { - native = Tcl_UtfToExternalDString(NULL, host, -1, &ds); - } - addr.s_addr = inet_addr(native); /* INTL: Native. */ - - /* - * This is 0xFFFFFFFF to ensure that it compares as a 32bit -1 on - * either 32 or 64 bits systems. - */ - - if (addr.s_addr == 0xFFFFFFFF) { - hostent = TclpGetHostByName(native); /* INTL: Native. */ - if (hostent != NULL) { - memcpy(&addr, hostent->h_addr_list[0], - (size_t) hostent->h_length); - } else { -#ifdef EHOSTUNREACH - errno = EHOSTUNREACH; -#else /* !EHOSTUNREACH */ -#ifdef ENXIO - errno = ENXIO; -#endif /* ENXIO */ -#endif /* EHOSTUNREACH */ - if (native != NULL) { - Tcl_DStringFree(&ds); - } - return 0; /* Error. */ - } - } - if (native != NULL) { - Tcl_DStringFree(&ds); - } - } - - /* - * NOTE: On 64 bit machines the assignment below is rumored to not do the - * right thing. Please report errors related to this if you observe - * incorrect behavior on 64 bit machines such as DEC Alphas. Should we - * modify this code to do an explicit memcpy? - */ - - sockaddrPtr->sin_addr.s_addr = addr.s_addr; - return 1; /* Success. */ -#endif /* HAVE_GETADDRINFO */ -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_OpenTcpClient -- - * - * Opens a TCP client socket and creates a channel around it. - * - * Results: - * The channel or NULL if failed. An error message is returned in the - * interpreter on failure. - * - * Side effects: - * Opens a client socket and creates a new channel. - * - *---------------------------------------------------------------------- - */ - -Tcl_Channel -Tcl_OpenTcpClient( - Tcl_Interp *interp, /* For error reporting; can be NULL. */ - int port, /* Port number to open. */ - const char *host, /* Host on which to open port. */ - const char *myaddr, /* Client-side address */ - int myport, /* Client-side port */ - int async) /* If nonzero, attempt to do an asynchronous - * connect. Otherwise we do a blocking - * connect. */ -{ - TcpState *statePtr; - char channelName[16 + TCL_INTEGER_SPACE]; - - /* - * Create a new client socket and wrap it in a channel. - */ - - statePtr = CreateSocket(interp, port, host, 0, myaddr, myport, async); - if (statePtr == NULL) { - return NULL; - } - - statePtr->acceptProc = NULL; - statePtr->acceptProcData = NULL; - - sprintf(channelName, "sock%d", statePtr->fd); - - statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) statePtr, (TCL_READABLE | TCL_WRITABLE)); - if (Tcl_SetChannelOption(interp, statePtr->channel, "-translation", - "auto crlf") == TCL_ERROR) { - Tcl_Close(NULL, statePtr->channel); - return NULL; - } - return statePtr->channel; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_MakeTcpClientChannel -- - * - * Creates a Tcl_Channel from an existing client TCP socket. - * - * Results: - * The Tcl_Channel wrapped around the preexisting TCP socket. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -Tcl_Channel -Tcl_MakeTcpClientChannel( - ClientData sock) /* The socket to wrap up into a channel. */ -{ - return MakeTcpClientChannelMode(sock, (TCL_READABLE | TCL_WRITABLE)); -} - -/* - *---------------------------------------------------------------------- - * - * MakeTcpClientChannelMode -- - * - * Creates a Tcl_Channel from an existing client TCP socket - * with given mode. - * - * Results: - * The Tcl_Channel wrapped around the preexisting TCP socket. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static Tcl_Channel -MakeTcpClientChannelMode( - ClientData sock, /* The socket to wrap up into a channel. */ - int mode) /* ORed combination of TCL_READABLE and - * TCL_WRITABLE to indicate file mode. */ -{ - TcpState *statePtr; - char channelName[16 + TCL_INTEGER_SPACE]; - - statePtr = (TcpState *) ckalloc((unsigned) sizeof(TcpState)); - statePtr->fd = PTR2INT(sock); - statePtr->flags = 0; - statePtr->acceptProc = NULL; - statePtr->acceptProcData = NULL; - - sprintf(channelName, "sock%d", statePtr->fd); - - statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) statePtr, mode); - if (Tcl_SetChannelOption(NULL, statePtr->channel, "-translation", - "auto crlf") == TCL_ERROR) { - Tcl_Close(NULL, statePtr->channel); - return NULL; - } - return statePtr->channel; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_OpenTcpServer -- - * - * Opens a TCP server socket and creates a channel around it. - * - * Results: - * The channel or NULL if failed. If an error occurred, an error message - * is left in the interp's result if interp is not NULL. - * - * Side effects: - * Opens a server socket and creates a new channel. - * - *---------------------------------------------------------------------- - */ - -Tcl_Channel -Tcl_OpenTcpServer( - Tcl_Interp *interp, /* For error reporting - may be NULL. */ - int port, /* Port number to open. */ - const char *myHost, /* Name of local host. */ - Tcl_TcpAcceptProc *acceptProc, - /* Callback for accepting connections from new - * clients. */ - ClientData acceptProcData) /* Data for the callback. */ -{ - TcpState *statePtr; - char channelName[16 + TCL_INTEGER_SPACE]; - - /* - * Create a new client socket and wrap it in a channel. - */ - - statePtr = CreateSocket(interp, port, myHost, 1, NULL, 0, 0); - if (statePtr == NULL) { - return NULL; - } - - statePtr->acceptProc = acceptProc; - statePtr->acceptProcData = acceptProcData; - - /* - * Set up the callback mechanism for accepting connections from new - * clients. - */ - - Tcl_CreateFileHandler(statePtr->fd, TCL_READABLE, TcpAccept, - (ClientData) statePtr); - sprintf(channelName, "sock%d", statePtr->fd); - statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) statePtr, 0); - return statePtr->channel; -} - -/* - *---------------------------------------------------------------------- - * - * TcpAccept -- - * Accept a TCP socket connection. This is called by the event loop. - * - * Results: - * None. - * - * Side effects: - * Creates a new connection socket. Calls the registered callback for the - * connection acceptance mechanism. - * - *---------------------------------------------------------------------- - */ - - /* ARGSUSED */ -static void -TcpAccept( - ClientData data, /* Callback token. */ - int mask) /* Not used. */ -{ - TcpState *sockState; /* Client data of server socket. */ - int newsock; /* The new client socket */ - TcpState *newSockState; /* State for new socket. */ - struct sockaddr_in addr; /* The remote address */ - socklen_t len; /* For accept interface */ - char channelName[16 + TCL_INTEGER_SPACE]; - - sockState = (TcpState *) data; - - len = sizeof(struct sockaddr_in); - newsock = accept(sockState->fd, (struct sockaddr *) &addr, &len); - if (newsock < 0) { - return; - } - - /* - * Set close-on-exec flag to prevent the newly accepted socket from being - * inherited by child processes. - */ - - (void) fcntl(newsock, F_SETFD, FD_CLOEXEC); - - newSockState = (TcpState *) ckalloc((unsigned) sizeof(TcpState)); - - newSockState->flags = 0; - newSockState->fd = newsock; - newSockState->acceptProc = NULL; - newSockState->acceptProcData = NULL; - - sprintf(channelName, "sock%d", newsock); - newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) newSockState, (TCL_READABLE | TCL_WRITABLE)); - - Tcl_SetChannelOption(NULL, newSockState->channel, "-translation", - "auto crlf"); - - if (sockState->acceptProc != NULL) { - sockState->acceptProc(sockState->acceptProcData, - newSockState->channel, inet_ntoa(addr.sin_addr), - ntohs(addr.sin_port)); - } -} - -/* - *---------------------------------------------------------------------- - * * TclpGetDefaultStdChannel -- * * Creates channels for standard input, standard output or standard error @@ -2983,7 +1846,7 @@ Tcl_GetOpenFile( #ifdef SUPPORTS_TTY || (chanTypePtr == &ttyChannelType) #endif /* SUPPORTS_TTY */ - || (chanTypePtr == &tcpChannelType) + || (strcmp(chanTypePtr->typeName, "tcp") == 0) || (strcmp(chanTypePtr->typeName, "pipe") == 0)) { if (Tcl_GetChannelHandle(chan, (forWriting ? TCL_WRITABLE : TCL_READABLE), diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 4b7d20b..bc387ca 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.68 2008/09/03 05:43:32 dgp Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.69 2009/06/15 16:24:45 rmax Exp $ */ #ifndef _TCLUNIXPORT @@ -620,5 +620,7 @@ MODULE_SCOPE struct passwd* TclpGetPwUid(uid_t uid); MODULE_SCOPE struct group* TclpGetGrGid(gid_t gid); MODULE_SCOPE struct hostent* TclpGetHostByName(const char *name); MODULE_SCOPE struct hostent* TclpGetHostByAddr(const char *addr, int length, int type); +MODULE_SCOPE Tcl_Channel TclpMakeTcpClientChannelMode(ClientData tcpSocket, int mode); + #endif /* _TCLUNIXPORT */ diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index cbfe546..4ed2392 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -8,12 +8,120 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixSock.c,v 1.21 2008/04/27 22:21:35 dkf Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.22 2009/06/15 16:24:45 rmax Exp $ */ #include "tclInt.h" /* + * Helper macros to make parts of this file clearer. The macros do exactly + * what they say on the tin. :-) They also only ever refer to their arguments + * once, and so can be used without regard to side effects. + */ + +#define SET_BITS(var, bits) ((var) |= (bits)) +#define CLEAR_BITS(var, bits) ((var) &= ~(bits)) + +/* + * This structure describes per-instance state of a tcp based channel. + */ + +typedef struct TcpState { + Tcl_Channel channel; /* Channel associated with this file. */ + int fd; /* The socket itself. */ + int flags; /* ORed combination of the bitfields defined + * below. */ + Tcl_TcpAcceptProc *acceptProc; + /* Proc to call on accept. */ + ClientData acceptProcData; /* The data for the accept proc. */ +} TcpState; + +/* + * These bits may be ORed together into the "flags" field of a TcpState + * structure. + */ + +#define TCP_ASYNC_SOCKET (1<<0) /* Asynchronous socket. */ +#define TCP_ASYNC_CONNECT (1<<1) /* Async connect in progress. */ + +/* + * The following defines the maximum length of the listen queue. This is the + * number of outstanding yet-to-be-serviced requests for a connection on a + * server socket, more than this number of outstanding requests and the + * connection request will fail. + */ + +#ifndef SOMAXCONN +# define SOMAXCONN 100 +#endif /* SOMAXCONN */ + +#if (SOMAXCONN < 100) +# undef SOMAXCONN +# define SOMAXCONN 100 +#endif /* SOMAXCONN < 100 */ + +/* + * The following defines how much buffer space the kernel should maintain for + * a socket. + */ + +#define SOCKET_BUFSIZE 4096 + +/* + * Static routines for this file: + */ + +static TcpState * CreateSocket(Tcl_Interp *interp, int port, + const char *host, int server, const char *myaddr, + int myport, int async); +static int CreateSocketAddress(struct sockaddr_in *sockaddrPtr, + const char *host, int port, int willBind, + const char **errorMsgPtr); +static void TcpAccept(ClientData data, int mask); +static int TcpBlockModeProc(ClientData data, int mode); +static int TcpCloseProc(ClientData instanceData, + Tcl_Interp *interp); +static int TcpClose2Proc(ClientData instanceData, + Tcl_Interp *interp, + int flags); +static int TcpGetHandleProc(ClientData instanceData, + int direction, ClientData *handlePtr); +static int TcpGetOptionProc(ClientData instanceData, + Tcl_Interp *interp, const char *optionName, + Tcl_DString *dsPtr); +static int TcpInputProc(ClientData instanceData, char *buf, + int toRead, int *errorCode); +static int TcpOutputProc(ClientData instanceData, + const char *buf, int toWrite, int *errorCode); +static void TcpWatchProc(ClientData instanceData, int mask); +static int WaitForConnect(TcpState *statePtr, int *errorCodePtr); +/* + * This structure describes the channel type structure for TCP socket + * based IO: + */ + +static Tcl_ChannelType tcpChannelType = { + "tcp", /* Type name. */ + TCL_CHANNEL_VERSION_5, /* v5 channel */ + TcpCloseProc, /* Close proc. */ + TcpInputProc, /* Input proc. */ + TcpOutputProc, /* Output proc. */ + NULL, /* Seek proc. */ + NULL, /* Set option proc. */ + TcpGetOptionProc, /* Get option proc. */ + TcpWatchProc, /* Initialize notifier. */ + TcpGetHandleProc, /* Get OS handles out of channel. */ + TcpClose2Proc, /* Close2 proc. */ + TcpBlockModeProc, /* Set blocking or non-blocking mode.*/ + NULL, /* flush proc. */ + NULL, /* handler proc. */ + NULL, /* wide seek proc. */ + NULL, /* thread action proc. */ + NULL, /* truncate proc. */ +}; + + +/* * The following variable holds the network name of this host. */ @@ -181,6 +289,1048 @@ TclpFinalizeSockets(void) } /* + *---------------------------------------------------------------------- + * + * TcpBlockModeProc -- + * + * This function is invoked by the generic IO level to set blocking and + * nonblocking mode on a TCP socket based channel. + * + * Results: + * 0 if successful, errno when failed. + * + * Side effects: + * Sets the device into blocking or nonblocking mode. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +TcpBlockModeProc( + ClientData instanceData, /* Socket state. */ + int mode) /* The mode to set. Can be one of + * TCL_MODE_BLOCKING or + * TCL_MODE_NONBLOCKING. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + + if (mode == TCL_MODE_BLOCKING) { + CLEAR_BITS(statePtr->flags, TCP_ASYNC_SOCKET); + } else { + SET_BITS(statePtr->flags, TCP_ASYNC_SOCKET); + } + if (TclUnixSetBlockingMode(statePtr->fd, mode) < 0) { + return errno; + } + return 0; +} + +/* + *---------------------------------------------------------------------- + * + * WaitForConnect -- + * + * Wait for a connection on an asynchronously opened socket to be + * completed. In nonblocking mode, just test if the connection + * has completed without blocking. + * + * Results: + * 0 if the connection has completed, -1 if still in progress + * or there is an error. + * + *---------------------------------------------------------------------- + */ + +static int +WaitForConnect( + TcpState *statePtr, /* State of the socket. */ + int *errorCodePtr) /* Where to store errors? */ +{ + int timeOut; /* How long to wait. */ + int state; /* Of calling TclWaitForFile. */ + + /* + * If an asynchronous connect is in progress, attempt to wait for it to + * complete before reading. + */ + + if (statePtr->flags & TCP_ASYNC_CONNECT) { + if (statePtr->flags & TCP_ASYNC_SOCKET) { + timeOut = 0; + } else { + timeOut = -1; + } + errno = 0; + state = TclUnixWaitForFile(statePtr->fd, + TCL_WRITABLE | TCL_EXCEPTION, timeOut); + if (state & TCL_EXCEPTION) { + return -1; + } + if (state & TCL_WRITABLE) { + CLEAR_BITS(statePtr->flags, TCP_ASYNC_CONNECT); + } else if (timeOut == 0) { + *errorCodePtr = errno = EWOULDBLOCK; + return -1; + } + } + return 0; +} + +/* + *---------------------------------------------------------------------- + * + * TcpInputProc -- + * + * This function is invoked by the generic IO level to read input from a + * TCP socket based channel. + * + * NOTE: We cannot share code with FilePipeInputProc because here we must + * use recv to obtain the input from the channel, not read. + * + * Results: + * The number of bytes read is returned or -1 on error. An output + * argument contains the POSIX error code on error, or zero if no error + * occurred. + * + * Side effects: + * Reads input from the input device of the channel. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +TcpInputProc( + ClientData instanceData, /* Socket state. */ + char *buf, /* Where to store data read. */ + int bufSize, /* How much space is available in the + * buffer? */ + int *errorCodePtr) /* Where to store error code. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + int bytesRead; + + *errorCodePtr = 0; + if (WaitForConnect(statePtr, errorCodePtr) != 0) { + return -1; + } + bytesRead = recv(statePtr->fd, buf, (size_t) bufSize, 0); + if (bytesRead > -1) { + return bytesRead; + } + if (errno == ECONNRESET) { + /* + * Turn ECONNRESET into a soft EOF condition. + */ + + return 0; + } + *errorCodePtr = errno; + return -1; +} + +/* + *---------------------------------------------------------------------- + * + * TcpOutputProc -- + * + * This function is invoked by the generic IO level to write output to a + * TCP socket based channel. + * + * NOTE: We cannot share code with FilePipeOutputProc because here we + * must use send, not write, to get reliable error reporting. + * + * Results: + * The number of bytes written is returned. An output argument is set to + * a POSIX error code if an error occurred, or zero. + * + * Side effects: + * Writes output on the output device of the channel. + * + *---------------------------------------------------------------------- + */ + +static int +TcpOutputProc( + ClientData instanceData, /* Socket state. */ + const char *buf, /* The data buffer. */ + int toWrite, /* How many bytes to write? */ + int *errorCodePtr) /* Where to store error code. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + int written; + + *errorCodePtr = 0; + if (WaitForConnect(statePtr, errorCodePtr) != 0) { + return -1; + } + written = send(statePtr->fd, buf, (size_t) toWrite, 0); + if (written > -1) { + return written; + } + *errorCodePtr = errno; + return -1; +} + +/* + *---------------------------------------------------------------------- + * + * TcpCloseProc -- + * + * This function is invoked by the generic IO level to perform + * channel-type-specific cleanup when a TCP socket based channel is + * closed. + * + * Results: + * 0 if successful, the value of errno if failed. + * + * Side effects: + * Closes the socket of the channel. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +TcpCloseProc( + ClientData instanceData, /* The socket to close. */ + Tcl_Interp *interp) /* For error reporting - unused. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + int errorCode = 0; + + /* + * Delete a file handler that may be active for this socket if this is a + * server socket - the file handler was created automatically by Tcl as + * part of the mechanism to accept new client connections. Channel + * handlers are already deleted in the generic IO channel closing code + * that called this function, so we do not have to delete them here. + */ + + Tcl_DeleteFileHandler(statePtr->fd); + + if (close(statePtr->fd) < 0) { + errorCode = errno; + } + ckfree((char *) statePtr); + + return errorCode; +} + +/* + *---------------------------------------------------------------------- + * + * TcpClose2Proc -- + * + * This function is called by the generic IO level to perform the channel + * type specific part of a half-close: namely, a shutdown() on a socket. + * + * Results: + * 0 if successful, the value of errno if failed. + * + * Side effects: + * Shuts down one side of the socket. + * + *---------------------------------------------------------------------- + */ + +static int +TcpClose2Proc( + ClientData instanceData, /* The socket to close. */ + Tcl_Interp *interp, /* For error reporting. */ + int flags) /* Flags that indicate which side to close. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + int errorCode = 0; + int sd; + + /* + * Shutdown the OS socket handle. + */ + switch(flags) + { + case TCL_CLOSE_READ: + sd=SHUT_RD; + break; + case TCL_CLOSE_WRITE: + sd=SHUT_WR; + break; + default: + if (interp) { + Tcl_AppendResult(interp, "Socket close2proc called bidirectionally", NULL); + } + return TCL_ERROR; + } + if (shutdown(statePtr->fd,sd)<0) { + errorCode = errno; + } + + return errorCode; +} + +/* + *---------------------------------------------------------------------- + * + * TcpGetOptionProc -- + * + * Computes an option value for a TCP socket based channel, or a list of + * all options and their values. + * + * Note: This code is based on code contributed by John Haxby. + * + * Results: + * A standard Tcl result. The value of the specified option or a list of + * all options and their values is returned in the supplied DString. Sets + * Error message if needed. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +TcpGetOptionProc( + ClientData instanceData, /* Socket state. */ + Tcl_Interp *interp, /* For error reporting - can be NULL. */ + const char *optionName, /* Name of the option to retrieve the value + * for, or NULL to get all options and their + * values. */ + Tcl_DString *dsPtr) /* Where to store the computed value; + * initialized by caller. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + struct sockaddr_in sockname; + struct sockaddr_in peername; + struct hostent *hostEntPtr; + socklen_t size = sizeof(struct sockaddr_in); + size_t len = 0; + char buf[TCL_INTEGER_SPACE]; + + if (optionName != NULL) { + len = strlen(optionName); + } + + if ((len > 1) && (optionName[1] == 'e') && + (strncmp(optionName, "-error", len) == 0)) { + socklen_t optlen = sizeof(int); + int err, ret; + + ret = getsockopt(statePtr->fd, SOL_SOCKET, SO_ERROR, + (char *)&err, &optlen); + if (ret < 0) { + err = errno; + } + if (err != 0) { + Tcl_DStringAppend(dsPtr, Tcl_ErrnoMsg(err), -1); + } + return TCL_OK; + } + + if ((len == 0) || + ((len > 1) && (optionName[1] == 'p') && + (strncmp(optionName, "-peername", len) == 0))) { + if (getpeername(statePtr->fd, (struct sockaddr *) &peername, + &size) >= 0) { + if (len == 0) { + Tcl_DStringAppendElement(dsPtr, "-peername"); + Tcl_DStringStartSublist(dsPtr); + } + Tcl_DStringAppendElement(dsPtr, inet_ntoa(peername.sin_addr)); + hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ + (char *) &peername.sin_addr, + sizeof(peername.sin_addr), AF_INET); + if (hostEntPtr != NULL) { + Tcl_DString ds; + + Tcl_ExternalToUtfDString(NULL, hostEntPtr->h_name, -1, &ds); + Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); + Tcl_DStringFree(&ds); + } else { + Tcl_DStringAppendElement(dsPtr, inet_ntoa(peername.sin_addr)); + } + TclFormatInt(buf, ntohs(peername.sin_port)); + Tcl_DStringAppendElement(dsPtr, buf); + if (len == 0) { + Tcl_DStringEndSublist(dsPtr); + } else { + return TCL_OK; + } + } else { + /* + * getpeername failed - but if we were asked for all the options + * (len==0), don't flag an error at that point because it could be + * an fconfigure request on a server socket (which have no peer). + * Same must be done on win&mac. + */ + + if (len) { + if (interp) { + Tcl_AppendResult(interp, "can't get peername: ", + Tcl_PosixError(interp), NULL); + } + return TCL_ERROR; + } + } + } + + if ((len == 0) || + ((len > 1) && (optionName[1] == 's') && + (strncmp(optionName, "-sockname", len) == 0))) { + if (getsockname(statePtr->fd, (struct sockaddr *) &sockname, + &size) >= 0) { + if (len == 0) { + Tcl_DStringAppendElement(dsPtr, "-sockname"); + Tcl_DStringStartSublist(dsPtr); + } + Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); + hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ + (char *) &sockname.sin_addr, + sizeof(sockname.sin_addr), AF_INET); + if (hostEntPtr != NULL) { + Tcl_DString ds; + + Tcl_ExternalToUtfDString(NULL, hostEntPtr->h_name, -1, &ds); + Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); + Tcl_DStringFree(&ds); + } else { + Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); + } + TclFormatInt(buf, ntohs(sockname.sin_port)); + Tcl_DStringAppendElement(dsPtr, buf); + if (len == 0) { + Tcl_DStringEndSublist(dsPtr); + } else { + return TCL_OK; + } + } else { + if (interp) { + Tcl_AppendResult(interp, "can't get sockname: ", + Tcl_PosixError(interp), NULL); + } + return TCL_ERROR; + } + } + + if (len > 0) { + return Tcl_BadChannelOption(interp, optionName, "peername sockname"); + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TcpWatchProc -- + * + * Initialize the notifier to watch the fd from this channel. + * + * Results: + * None. + * + * Side effects: + * Sets up the notifier so that a future event on the channel will be + * seen by Tcl. + * + *---------------------------------------------------------------------- + */ + +static void +TcpWatchProc( + ClientData instanceData, /* The socket state. */ + int mask) /* Events of interest; an OR-ed combination of + * TCL_READABLE, TCL_WRITABLE and + * TCL_EXCEPTION. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + + /* + * Make sure we don't mess with server sockets since they will never be + * readable or writable at the Tcl level. This keeps Tcl scripts from + * interfering with the -accept behavior. + */ + + if (!statePtr->acceptProc) { + if (mask) { + Tcl_CreateFileHandler(statePtr->fd, mask, + (Tcl_FileProc *) Tcl_NotifyChannel, + (ClientData) statePtr->channel); + } else { + Tcl_DeleteFileHandler(statePtr->fd); + } + } +} + +/* + *---------------------------------------------------------------------- + * + * TcpGetHandleProc -- + * + * Called from Tcl_GetChannelHandle to retrieve OS handles from inside a + * TCP socket based channel. + * + * Results: + * Returns TCL_OK with the fd in handlePtr, or TCL_ERROR if there is no + * handle for the specified direction. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +TcpGetHandleProc( + ClientData instanceData, /* The socket state. */ + int direction, /* Not used. */ + ClientData *handlePtr) /* Where to store the handle. */ +{ + TcpState *statePtr = (TcpState *) instanceData; + + *handlePtr = (ClientData) INT2PTR(statePtr->fd); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * CreateSocket -- + * + * This function opens a new socket in client or server mode and + * initializes the TcpState structure. + * + * Results: + * Returns a new TcpState, or NULL with an error in the interp's result, + * if interp is not NULL. + * + * Side effects: + * Opens a socket. + * + *---------------------------------------------------------------------- + */ + +static TcpState * +CreateSocket( + Tcl_Interp *interp, /* For error reporting; can be NULL. */ + int port, /* Port number to open. */ + const char *host, /* Name of host on which to open port. NULL + * implies INADDR_ANY */ + int server, /* 1 if socket should be a server socket, else + * 0 for a client socket. */ + const char *myaddr, /* Optional client-side address */ + int myport, /* Optional client-side port */ + int async) /* If nonzero and creating a client socket, + * attempt to do an async connect. Otherwise + * do a synchronous connect or bind. */ +{ + int status = 0, sock = -1; + struct sockaddr_in sockaddr; /* socket address */ + struct sockaddr_in mysockaddr; /* Socket address for client */ + TcpState *statePtr; + const char *errorMsg = NULL; + + if (!CreateSocketAddress(&sockaddr, host, port, 0, &errorMsg)) { + goto error; + } + if ((myaddr != NULL || myport != 0) && + !CreateSocketAddress(&mysockaddr, myaddr, myport, 1, &errorMsg)) { + goto error; + } + + sock = socket(AF_INET, SOCK_STREAM, 0); + if (sock < 0) { + goto error; + } + + /* + * Set the close-on-exec flag so that the socket will not get inherited by + * child processes. + */ + + fcntl(sock, F_SETFD, FD_CLOEXEC); + + /* + * Set kernel space buffering + */ + + TclSockMinimumBuffers(sock, SOCKET_BUFSIZE); + + status = 0; + if (server) { + /* + * Set up to reuse server addresses automatically and bind to the + * specified port. + */ + + int reuseaddr = 1; + (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, + (char *) &reuseaddr, sizeof(reuseaddr)); + status = bind(sock, (struct sockaddr *) &sockaddr, + sizeof(struct sockaddr)); + if (status != -1) { + status = listen(sock, SOMAXCONN); + } + } else { + if (myaddr != NULL || myport != 0) { + int reuseaddr = 1; + (void) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, + (char *) &reuseaddr, sizeof(reuseaddr)); + status = bind(sock, (struct sockaddr *) &mysockaddr, + sizeof(struct sockaddr)); + if (status < 0) { + goto error; + } + } + + /* + * Attempt to connect. The connect may fail at present with an + * EINPROGRESS but at a later time it will complete. The caller will + * set up a file handler on the socket if she is interested in being + * informed when the connect completes. + */ + + if (async) { + status = TclUnixSetBlockingMode(sock, TCL_MODE_NONBLOCKING); + if (status < 0) { + goto error; + } + } + + status = connect(sock, (struct sockaddr *) &sockaddr, + sizeof(sockaddr)); + if (status < 0) { + if (errno == EINPROGRESS) { + status = 0; + } else { + goto error; + } + } + if (async) { + /* + * Restore blocking mode. + */ + status = TclUnixSetBlockingMode(sock, TCL_MODE_BLOCKING); + } + } + + if (status < 0) { +error: + if (interp != NULL) { + Tcl_AppendResult(interp, "couldn't open socket: ", + Tcl_PosixError(interp), NULL); + if (errorMsg != NULL) { + Tcl_AppendResult(interp, " (", errorMsg, ")", NULL); + } + } + if (sock != -1) { + close(sock); + } + return NULL; + } + + /* + * Allocate a new TcpState for this socket. + */ + + statePtr = (TcpState *) ckalloc((unsigned) sizeof(TcpState)); + statePtr->flags = async ? TCP_ASYNC_CONNECT : 0; + statePtr->fd = sock; + + return statePtr; +} + +/* + *---------------------------------------------------------------------- + * + * CreateSocketAddress -- + * + * This function initializes a sockaddr structure for a host and port. + * + * Results: + * 1 if the host was valid, 0 if the host could not be converted to an IP + * address. + * + * Side effects: + * Fills in the *sockaddrPtr structure. + * + *---------------------------------------------------------------------- + */ + +static int +CreateSocketAddress( + struct sockaddr_in *sockaddrPtr, /* Socket address */ + const char *host, /* Host. NULL implies INADDR_ANY */ + int port, /* Port number */ + int willBind, /* Is this an address to bind() to or + * to connect() to? */ + const char **errorMsgPtr) /* Place to store the error message + * detail, if available. */ +{ +#ifdef HAVE_GETADDRINFO + struct addrinfo hints, *resPtr = NULL; + char *native; + Tcl_DString ds; + int result; + + if (host == NULL) { + sockaddrPtr->sin_family = AF_INET; + sockaddrPtr->sin_addr.s_addr = INADDR_ANY; + addPort: + sockaddrPtr->sin_port = htons((unsigned short) (port & 0xFFFF)); + return 1; + } + + (void) memset(&hints, 0, sizeof(struct addrinfo)); + hints.ai_family = AF_INET; + hints.ai_socktype = SOCK_STREAM; + if (willBind) { + hints.ai_flags |= AI_PASSIVE; + } + + /* + * Note that getaddrinfo() *is* thread-safe. If a platform doesn't get + * that right, it shouldn't use this part of the code. + */ + + native = Tcl_UtfToExternalDString(NULL, host, -1, &ds); + result = getaddrinfo(native, NULL, &hints, &resPtr); + Tcl_DStringFree(&ds); + if (result == 0) { + memcpy(sockaddrPtr, resPtr->ai_addr, sizeof(struct sockaddr_in)); + freeaddrinfo(resPtr); + goto addPort; + } + + /* + * Ought to use gai_strerror() here... + */ + + switch (result) { + case EAI_NONAME: + case EAI_SERVICE: +#if defined(EAI_ADDRFAMILY) && EAI_ADDRFAMILY != EAI_NONAME + case EAI_ADDRFAMILY: +#endif +#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME + case EAI_NODATA: +#endif + *errorMsgPtr = gai_strerror(result); + errno = EHOSTUNREACH; + return 0; + case EAI_SYSTEM: + return 0; + default: + *errorMsgPtr = gai_strerror(result); + errno = ENXIO; + return 0; + } +#else /* !HAVE_GETADDRINFO */ + struct in_addr addr; /* For 64/32 bit madness */ + + (void) memset(sockaddrPtr, '\0', sizeof(struct sockaddr_in)); + sockaddrPtr->sin_family = AF_INET; + sockaddrPtr->sin_port = htons((unsigned short) (port & 0xFFFF)); + if (host == NULL) { + addr.s_addr = INADDR_ANY; + } else { + struct hostent *hostent; /* Host database entry */ + Tcl_DString ds; + const char *native; + + if (host == NULL) { + native = NULL; + } else { + native = Tcl_UtfToExternalDString(NULL, host, -1, &ds); + } + addr.s_addr = inet_addr(native); /* INTL: Native. */ + + /* + * This is 0xFFFFFFFF to ensure that it compares as a 32bit -1 on + * either 32 or 64 bits systems. + */ + + if (addr.s_addr == 0xFFFFFFFF) { + hostent = TclpGetHostByName(native); /* INTL: Native. */ + if (hostent != NULL) { + memcpy(&addr, hostent->h_addr_list[0], + (size_t) hostent->h_length); + } else { +#ifdef EHOSTUNREACH + errno = EHOSTUNREACH; +#else /* !EHOSTUNREACH */ +#ifdef ENXIO + errno = ENXIO; +#endif /* ENXIO */ +#endif /* EHOSTUNREACH */ + if (native != NULL) { + Tcl_DStringFree(&ds); + } + return 0; /* Error. */ + } + } + if (native != NULL) { + Tcl_DStringFree(&ds); + } + } + + /* + * NOTE: On 64 bit machines the assignment below is rumored to not do the + * right thing. Please report errors related to this if you observe + * incorrect behavior on 64 bit machines such as DEC Alphas. Should we + * modify this code to do an explicit memcpy? + */ + + sockaddrPtr->sin_addr.s_addr = addr.s_addr; + return 1; /* Success. */ +#endif /* HAVE_GETADDRINFO */ +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_OpenTcpClient -- + * + * Opens a TCP client socket and creates a channel around it. + * + * Results: + * The channel or NULL if failed. An error message is returned in the + * interpreter on failure. + * + * Side effects: + * Opens a client socket and creates a new channel. + * + *---------------------------------------------------------------------- + */ + +Tcl_Channel +Tcl_OpenTcpClient( + Tcl_Interp *interp, /* For error reporting; can be NULL. */ + int port, /* Port number to open. */ + const char *host, /* Host on which to open port. */ + const char *myaddr, /* Client-side address */ + int myport, /* Client-side port */ + int async) /* If nonzero, attempt to do an asynchronous + * connect. Otherwise we do a blocking + * connect. */ +{ + TcpState *statePtr; + char channelName[16 + TCL_INTEGER_SPACE]; + + /* + * Create a new client socket and wrap it in a channel. + */ + + statePtr = CreateSocket(interp, port, host, 0, myaddr, myport, async); + if (statePtr == NULL) { + return NULL; + } + + statePtr->acceptProc = NULL; + statePtr->acceptProcData = NULL; + + sprintf(channelName, "sock%d", statePtr->fd); + + statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, + (ClientData) statePtr, (TCL_READABLE | TCL_WRITABLE)); + if (Tcl_SetChannelOption(interp, statePtr->channel, "-translation", + "auto crlf") == TCL_ERROR) { + Tcl_Close(NULL, statePtr->channel); + return NULL; + } + return statePtr->channel; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_MakeTcpClientChannel -- + * + * Creates a Tcl_Channel from an existing client TCP socket. + * + * Results: + * The Tcl_Channel wrapped around the preexisting TCP socket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_Channel +Tcl_MakeTcpClientChannel( + ClientData sock) /* The socket to wrap up into a channel. */ +{ + return TclpMakeTcpClientChannelMode(sock, (TCL_READABLE | TCL_WRITABLE)); +} + +/* + *---------------------------------------------------------------------- + * + * TclpMakeTcpClientChannelMode -- + * + * Creates a Tcl_Channel from an existing client TCP socket + * with given mode. + * + * Results: + * The Tcl_Channel wrapped around the preexisting TCP socket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_Channel +TclpMakeTcpClientChannelMode( + ClientData sock, /* The socket to wrap up into a channel. */ + int mode) /* ORed combination of TCL_READABLE and + * TCL_WRITABLE to indicate file mode. */ +{ + TcpState *statePtr; + char channelName[16 + TCL_INTEGER_SPACE]; + + statePtr = (TcpState *) ckalloc((unsigned) sizeof(TcpState)); + statePtr->fd = PTR2INT(sock); + statePtr->flags = 0; + statePtr->acceptProc = NULL; + statePtr->acceptProcData = NULL; + + sprintf(channelName, "sock%d", statePtr->fd); + + statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, + (ClientData) statePtr, mode); + if (Tcl_SetChannelOption(NULL, statePtr->channel, "-translation", + "auto crlf") == TCL_ERROR) { + Tcl_Close(NULL, statePtr->channel); + return NULL; + } + return statePtr->channel; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_OpenTcpServer -- + * + * Opens a TCP server socket and creates a channel around it. + * + * Results: + * The channel or NULL if failed. If an error occurred, an error message + * is left in the interp's result if interp is not NULL. + * + * Side effects: + * Opens a server socket and creates a new channel. + * + *---------------------------------------------------------------------- + */ + +Tcl_Channel +Tcl_OpenTcpServer( + Tcl_Interp *interp, /* For error reporting - may be NULL. */ + int port, /* Port number to open. */ + const char *myHost, /* Name of local host. */ + Tcl_TcpAcceptProc *acceptProc, + /* Callback for accepting connections from new + * clients. */ + ClientData acceptProcData) /* Data for the callback. */ +{ + TcpState *statePtr; + char channelName[16 + TCL_INTEGER_SPACE]; + + /* + * Create a new client socket and wrap it in a channel. + */ + + statePtr = CreateSocket(interp, port, myHost, 1, NULL, 0, 0); + if (statePtr == NULL) { + return NULL; + } + + statePtr->acceptProc = acceptProc; + statePtr->acceptProcData = acceptProcData; + + /* + * Set up the callback mechanism for accepting connections from new + * clients. + */ + + Tcl_CreateFileHandler(statePtr->fd, TCL_READABLE, TcpAccept, + (ClientData) statePtr); + sprintf(channelName, "sock%d", statePtr->fd); + statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, + (ClientData) statePtr, 0); + return statePtr->channel; +} + +/* + *---------------------------------------------------------------------- + * + * TcpAccept -- + * Accept a TCP socket connection. This is called by the event loop. + * + * Results: + * None. + * + * Side effects: + * Creates a new connection socket. Calls the registered callback for the + * connection acceptance mechanism. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static void +TcpAccept( + ClientData data, /* Callback token. */ + int mask) /* Not used. */ +{ + TcpState *sockState; /* Client data of server socket. */ + int newsock; /* The new client socket */ + TcpState *newSockState; /* State for new socket. */ + struct sockaddr_in addr; /* The remote address */ + socklen_t len; /* For accept interface */ + char channelName[16 + TCL_INTEGER_SPACE]; + + sockState = (TcpState *) data; + + len = sizeof(struct sockaddr_in); + newsock = accept(sockState->fd, (struct sockaddr *) &addr, &len); + if (newsock < 0) { + return; + } + + /* + * Set close-on-exec flag to prevent the newly accepted socket from being + * inherited by child processes. + */ + + (void) fcntl(newsock, F_SETFD, FD_CLOEXEC); + + newSockState = (TcpState *) ckalloc((unsigned) sizeof(TcpState)); + + newSockState->flags = 0; + newSockState->fd = newsock; + newSockState->acceptProc = NULL; + newSockState->acceptProcData = NULL; + + sprintf(channelName, "sock%d", newsock); + newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName, + (ClientData) newSockState, (TCL_READABLE | TCL_WRITABLE)); + + Tcl_SetChannelOption(NULL, newSockState->channel, "-translation", + "auto crlf"); + + if (sockState->acceptProc != NULL) { + sockState->acceptProc(sockState->acceptProcData, + newSockState->channel, inet_ntoa(addr.sin_addr), + ntohs(addr.sin_port)); + } +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 -- cgit v0.12 From 0cb4610865b2d7ca1536e0236d8915fd58b441fd Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 15 Jun 2009 18:51:35 +0000 Subject: * generic/tclStringObj.c: sprintf() -> Tcl_ObjPrintf() conversion. --- ChangeLog | 4 ++++ generic/tclStringObj.c | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84b5b14..026c39b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-15 Don Porter + + * generic/tclStringObj.c: sprintf() -> Tcl_ObjPrintf() conversion. + 2009-06-15 Reinhard Max * unix/tclUnixPort.h: Move all socket-related code from tclUnixChan.c diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index ebc15b3..4535c64 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.124 2009/06/10 21:39:49 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.125 2009/06/15 18:51:35 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2247,10 +2247,8 @@ Tcl_AppendFormatToObj( } default: if (interp != NULL) { - char buf[40]; - - sprintf(buf, "bad field specifier \"%c\"", ch); - Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); + Tcl_SetObjResult(interp, + Tcl_ObjPrintf("bad field specifier \"%c\"", ch)); } goto error; } -- cgit v0.12 From 9061f4d8529c1f16c80c71cc3d2bbe9bf33a8b97 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 17 Jun 2009 19:24:04 +0000 Subject: Applied a patch by George Peter Staplin drastically reducing the ambition of [exit] wrt finalization, and thus solving many multi-thread teardown issues [Bugs 2001201, 486399, and possibly 597575, 990457, 1437595, 2750491]. --- ChangeLog | 7 ++++ generic/tclEvent.c | 98 ++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 72 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 026c39b..08b8bed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-06-17 Alexandre Ferrieux + + * generic/tclEvent.c: Applied a patch by George Peter Staplin + drastically reducing the ambition of [exit] wrt finalization, and + thus solving many multi-thread teardown issues [Bugs 2001201, + 486399, and possibly 597575, 990457, 1437595, 2750491]. + 2009-06-15 Don Porter * generic/tclStringObj.c: sprintf() -> Tcl_ObjPrintf() conversion. diff --git a/generic/tclEvent.c b/generic/tclEvent.c index ada7ecb..1495899 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.88 2009/02/10 22:49:42 nijtmans Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.89 2009/06/17 19:24:05 ferrieux Exp $ */ #include "tclInt.h" @@ -76,13 +76,13 @@ static ExitHandler *firstLateExitPtr = NULL; TCL_DECLARE_MUTEX(exitMutex) /* - * This variable is set to 1 when Tcl_Finalize is called, and at the end of - * its work, it is reset to 0. The variable is checked by TclInExit() to allow - * different behavior for exit-time processing, e.g. in closing of files and - * pipes. + * This variable is set to 1 when Tcl_Exit is called. The variable is + * checked by TclInExit() to allow different behavior for + * exit-time processing, e.g. in closing of files and pipes. */ -static int inFinalize = 0; +static int inExit = 0; + static int subsystemsInitialized = 0; /* @@ -119,6 +119,8 @@ static void BgErrorDeleteProc(ClientData clientData, static void HandleBgErrors(ClientData clientData); static char * VwaitVarProc(ClientData clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); +static void InvokeExitHandlers(void); + /* *---------------------------------------------------------------------- @@ -862,6 +864,49 @@ Tcl_SetExitProc( return prevExitProc; } + + +/* + *---------------------------------------------------------------------- + * + * InvokeExitHandlers -- + * + * Call the registered exit handlers. + * + * Results: + * None. + * + * Side effects: + * The exit handlers are invoked, and the ExitHandler struct is + * freed. + * + *---------------------------------------------------------------------- + */ +static void +InvokeExitHandlers(void) +{ + ExitHandler *exitPtr; + + Tcl_MutexLock(&exitMutex); + inExit = 1; + + for (exitPtr = firstExitPtr; exitPtr != NULL; exitPtr = firstExitPtr) { + /* + * Be careful to remove the handler from the list before invoking its + * callback. This protects us against double-freeing if the callback + * should call Tcl_DeleteExitHandler on itself. + */ + + firstExitPtr = exitPtr->nextPtr; + Tcl_MutexUnlock(&exitMutex); + (*exitPtr->proc)(exitPtr->clientData); + ckfree((char *) exitPtr); + Tcl_MutexLock(&exitMutex); + } + firstExitPtr = NULL; + Tcl_MutexUnlock(&exitMutex); +} + /* *---------------------------------------------------------------------- @@ -904,7 +949,14 @@ Tcl_Exit( * Use default handling. */ - Tcl_Finalize(); + InvokeExitHandlers(); + + /* + * This triggers a flush of the Tcl_Channels that may have + * data enqueued. + */ + TclFinalizeIOSubsystem(); + TclpExit(status); Tcl_Panic("OS exit failed!"); } @@ -938,8 +990,8 @@ Tcl_Exit( void TclInitSubsystems(void) { - if (inFinalize != 0) { - Tcl_Panic("TclInitSubsystems called while finalizing"); + if (inExit != 0) { + Tcl_Panic("TclInitSubsystems called while exiting"); } if (subsystemsInitialized == 0) { @@ -993,9 +1045,8 @@ TclInitSubsystems(void) * Tcl_Finalize -- * * Shut down Tcl. First calls registered exit handlers, then carefully - * shuts down various subsystems. Called by Tcl_Exit, or should be - * invoked by user before the Tcl shared library is being unloaded in - * an embedded context. + * shuts down various subsystems. Should be invoked by user before the + * Tcl shared library is being unloaded in an embedded context. * * Results: * None. @@ -1010,28 +1061,10 @@ void Tcl_Finalize(void) { ExitHandler *exitPtr; - /* * Invoke exit handlers first. */ - - Tcl_MutexLock(&exitMutex); - inFinalize = 1; - for (exitPtr = firstExitPtr; exitPtr != NULL; exitPtr = firstExitPtr) { - /* - * Be careful to remove the handler from the list before invoking its - * callback. This protects us against double-freeing if the callback - * should call Tcl_DeleteExitHandler on itself. - */ - - firstExitPtr = exitPtr->nextPtr; - Tcl_MutexUnlock(&exitMutex); - exitPtr->proc(exitPtr->clientData); - ckfree((char *) exitPtr); - Tcl_MutexLock(&exitMutex); - } - firstExitPtr = NULL; - Tcl_MutexUnlock(&exitMutex); + InvokeExitHandlers(); TclpInitLock(); if (subsystemsInitialized == 0) { @@ -1187,7 +1220,6 @@ Tcl_Finalize(void) */ TclFinalizeMemorySubsystem(); - inFinalize = 0; alreadyFinalized: TclFinalizeLock(); @@ -1275,7 +1307,7 @@ Tcl_FinalizeThread(void) int TclInExit(void) { - return inFinalize; + return inExit; } /* -- cgit v0.12 From bf70bdd02363606dc3d81c1a97059be6ecaec3b6 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Jun 2009 09:41:25 +0000 Subject: Apply patch from [Bug 988703]. Many thanks to Joe Mistachkin for development. --- ChangeLog | 11 +++- doc/memory.n | 13 +++-- generic/tclCkalloc.c | 23 ++++++++- generic/tclEvent.c | 3 +- generic/tclInt.decls | 8 ++- generic/tclInt.h | 8 +-- generic/tclObj.c | 140 +++++++++++++++++++++++++++++++++++++++++++++++++-- 7 files changed, 190 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08b8bed..5f2223d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,16 @@ +2009-06-18 Donal K. Fellows + + * generic/tclCkalloc.c (MemoryCmd): [Bug 988703]: + * generic/tclObj.c (ObjData, TclFinalizeThreadObjects): Add + mechanism for discovering what Tcl_Objs are allocated when built + for memory debugging. Developed by Joe Mistachkin. + 2009-06-17 Alexandre Ferrieux * generic/tclEvent.c: Applied a patch by George Peter Staplin drastically reducing the ambition of [exit] wrt finalization, and - thus solving many multi-thread teardown issues [Bugs 2001201, - 486399, and possibly 597575, 990457, 1437595, 2750491]. + thus solving many multi-thread teardown issues. [Bugs 2001201, + 486399, and possibly 597575, 990457, 1437595, 2750491] 2009-06-15 Don Porter diff --git a/doc/memory.n b/doc/memory.n index 0bc1b64..b269d7a 100644 --- a/doc/memory.n +++ b/doc/memory.n @@ -3,7 +3,7 @@ '\" Copyright (c) 2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: memory.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: memory.n,v 1.14 2009/06/18 09:41:30 dkf Exp $ '\" .so man.macros .TH memory n 8.1 Tcl "Tcl Built-In Commands" @@ -41,10 +41,17 @@ number of calls to \fBckalloc\fR not met by a corresponding call to \fBckfree\fR), the current bytes allocated, and the maximum number of packets and bytes allocated. .TP -\fB memory init \fR[\fBon\fR|\fBoff\fR] +\fBmemory init \fR[\fBon\fR|\fBoff\fR] . Turn on or off the pre-initialization of all allocated memory -with bogus bytes. Useful for detecting the use of uninitialized values. +with bogus bytes. Useful for detecting the use of uninitialized +values. +.TP +\fBmemory objs \fIfile\fR +. +Causes a list of all allocated Tcl_Obj values to be written to the specified +\fIfile\fR immediately, together with where they were allocated. Useful for +checking for leaks of values. .TP \fBmemory onexit\fR \fIfile\fR . diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 2cbff69..9a3b4e3 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -14,7 +14,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.35 2009/02/27 23:03:41 nijtmans Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.36 2009/06/18 09:41:26 dkf Exp $ */ #include "tclInt.h" @@ -803,6 +803,7 @@ MemoryCmd( const char *argv[]) { const char *fileName; + FILE *fileP; Tcl_DString buffer; int result; @@ -856,6 +857,26 @@ MemoryCmd( init_malloced_bodies = (strcmp(argv[2],"on") == 0); return TCL_OK; } + if (strcmp(argv[1],"objs") == 0) { + if (argc != 3) { + Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], + " objs file\"", NULL); + return TCL_ERROR; + } + fileName = Tcl_TranslateFileName(interp, argv[2], &buffer); + if (fileName == NULL) { + return TCL_ERROR; + } + fileP = fopen(fileName, "w"); + if (fileP == NULL) { + Tcl_AppendResult(interp, "cannot open output file", NULL); + return TCL_ERROR; + } + TclDbDumpActiveObjects(fileP); + fclose(fileP); + Tcl_DStringFree(&buffer); + return TCL_OK; + } if (strcmp(argv[1],"onexit") == 0) { if (argc != 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 1495899..6c55ef0 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.89 2009/06/17 19:24:05 ferrieux Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.90 2009/06/18 09:41:26 dkf Exp $ */ #include "tclInt.h" @@ -1273,6 +1273,7 @@ Tcl_FinalizeThread(void) TclFinalizeIOSubsystem(); TclFinalizeNotifier(); TclFinalizeAsync(); + TclFinalizeThreadObjects(); } /* diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 0db9059..0847324 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.138 2009/04/10 18:02:36 das Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.139 2009/06/18 09:41:26 dkf Exp $ library tcl @@ -970,6 +970,12 @@ declare 242 generic { int TclNREvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags, Command *cmdPtr) } + +# Tcl_Obj leak detection support. +declare 243 generic { + void TclDbDumpActiveObjects(FILE *outFile) +} + ############################################################################## # Define the platform specific internal Tcl interface. These functions are diff --git a/generic/tclInt.h b/generic/tclInt.h index 9562d6b..d75eaa6 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.423 2009/05/08 08:48:19 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.424 2009/06/18 09:41:27 dkf Exp $ */ #ifndef _TCLINT @@ -2679,6 +2679,7 @@ MODULE_SCOPE void TclFinalizePreserve(void); MODULE_SCOPE void TclFinalizeSynchronization(void); MODULE_SCOPE void TclFinalizeThreadAlloc(void); MODULE_SCOPE void TclFinalizeThreadData(void); +MODULE_SCOPE void TclFinalizeThreadObjects(void); MODULE_SCOPE double TclFloor(mp_int *a); MODULE_SCOPE void TclFormatNaN(double value, char *buffer); MODULE_SCOPE int TclFSFileAttrIndex(Tcl_Obj *pathPtr, @@ -3659,12 +3660,13 @@ MODULE_SCOPE Tcl_Mutex tclObjMutex; #endif #else /* TCL_MEM_DEBUG */ -MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr); +MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, + int line); # define TclDbNewObj(objPtr, file, line) \ TclIncrObjsAllocated(); \ (objPtr) = (Tcl_Obj *) Tcl_DbCkalloc(sizeof(Tcl_Obj), (file), (line)); \ - TclDbInitNewObj(objPtr); \ + TclDbInitNewObj((objPtr), (file), (line)); \ TCL_DTRACE_OBJ_CREATE(objPtr) # define TclNewObj(objPtr) \ diff --git a/generic/tclObj.c b/generic/tclObj.c index f143eb2..edc203c 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.152 2009/05/08 02:21:09 msofer Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.153 2009/06/18 09:41:29 dkf Exp $ */ #include "tclInt.h" @@ -56,9 +56,24 @@ char *tclEmptyStringRep = &tclEmptyString; #if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) /* + * Structure for tracking the source file and line number where a given Tcl_Obj + * was allocated. We also track the pointer to the Tcl_Obj itself, for sanity + * checking purposes. + */ + +typedef struct ObjData { + Tcl_Obj *objPtr; /* The pointer to the allocated Tcl_Obj. */ + const char *file; /* The name of the source file calling this + * function; used for debugging. */ + int line; /* Line number in the source file; used for + * debugging. */ +} ObjData; + +/* * Thread local table that is used to check that a Tcl_Obj was not allocated * by some other thread. */ + typedef struct ThreadSpecificData { Tcl_HashTable *objThreadMap; } ThreadSpecificData; @@ -393,6 +408,49 @@ TclInitObjSubsystem(void) /* *---------------------------------------------------------------------- * + * TclFinalizeThreadObjects -- + * + * This function is called by Tcl_FinalizeThread to clean up thread + * specific Tcl_Obj information. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void +TclFinalizeThreadObjects(void) +{ +#if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) + Tcl_HashEntry *hPtr; + Tcl_HashSearch hSearch; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + Tcl_HashTable *tablePtr = tsdPtr->objThreadMap; + + if (tablePtr != NULL) { + for (hPtr = Tcl_FirstHashEntry(tablePtr, &hSearch); + hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { + ObjData *objData = Tcl_GetHashValue(hPtr); + + if (objData != NULL) { + ckfree((char *) objData); + } + } + + Tcl_DeleteHashTable(tablePtr); + ckfree((char *) tablePtr); + tsdPtr->objThreadMap = NULL; + } +#endif +} + +/* + *---------------------------------------------------------------------- + * * TclFinalizeObjects -- * * This function is called by Tcl_Finalize to clean up all registered @@ -595,6 +653,55 @@ Tcl_ConvertToType( } /* + *-------------------------------------------------------------- + * + * TclDbDumpActiveObjects -- + * + * This function is called to dump all of the active Tcl_Obj structs this + * allocator knows about. + * + * Results: + * None. + * + * Side effects: + * None. + * + *-------------------------------------------------------------- + */ + +void +TclDbDumpActiveObjects( + FILE *outFile) +{ +#if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) + Tcl_HashSearch hSearch; + Tcl_HashEntry *hPtr; + Tcl_HashTable *tablePtr; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + + tablePtr = tsdPtr->objThreadMap; + + if (tablePtr != NULL) { + fprintf(outFile, "total objects: %d\n", tablePtr->numEntries); + for (hPtr = Tcl_FirstHashEntry(tablePtr, &hSearch); hPtr != NULL; + hPtr = Tcl_NextHashEntry(&hSearch)) { + ObjData *objData = Tcl_GetHashValue(hPtr); + + if (objData != NULL) { + fprintf(outFile, + "key = 0x%p, objPtr = 0x%p, file = %s, line = %d\n", + Tcl_GetHashKey(tablePtr, hPtr), objData->objPtr, + objData->file, objData->line); + } else { + fprintf(outFile, "key = 0x%p\n", + Tcl_GetHashKey(tablePtr, hPtr)); + } + } + } +#endif +} + +/* *---------------------------------------------------------------------- * * TclDbInitNewObj -- @@ -615,7 +722,11 @@ Tcl_ConvertToType( #ifdef TCL_MEM_DEBUG void TclDbInitNewObj( - register Tcl_Obj *objPtr) + register Tcl_Obj *objPtr, + register const char *file, /* The name of the source file calling this + * function; used for debugging. */ + register int line) /* Line number in the source file; used for + * debugging. */ { objPtr->refCount = 0; objPtr->bytes = tclEmptyStringRep; @@ -632,6 +743,7 @@ TclDbInitNewObj( Tcl_HashEntry *hPtr; Tcl_HashTable *tablePtr; int isNew; + ObjData *objData; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); if (tsdPtr->objThreadMap == NULL) { @@ -644,7 +756,16 @@ TclDbInitNewObj( if (!isNew) { Tcl_Panic("expected to create new entry for object map"); } - Tcl_SetHashValue(hPtr, NULL); + + /* + * Record the debugging information. + */ + + objData = (ObjData *) ckalloc(sizeof(ObjData)); + objData->objPtr = objPtr; + objData->file = file; + objData->line = line; + Tcl_SetHashValue(hPtr, objData); } #endif /* TCL_THREADS */ } @@ -3207,8 +3328,17 @@ Tcl_DbDecrRefCount( "Tcl_Obj allocated in another thread"); } - /* If the Tcl_Obj is going to be deleted, remove the entry */ - if ((((objPtr)->refCount) - 1) <= 0) { + /* + * If the Tcl_Obj is going to be deleted, remove the entry. + */ + + if ((objPtr->refCount - 1) <= 0) { + ObjData *objData = Tcl_GetHashValue(hPtr); + + if (objData != NULL) { + ckfree((char *) objData); + } + Tcl_DeleteHashEntry(hPtr); } } -- cgit v0.12 From b1c6f1ed60dd86412f73409643e28320283c8cc6 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Jun 2009 09:42:40 +0000 Subject: regen --- generic/tclIntDecls.h | 12 +++++++++++- generic/tclStubInit.c | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index a432255..bdcdf29 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.132 2009/02/27 23:03:41 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.133 2009/06/18 09:42:40 dkf Exp $ */ #ifndef _TCLINTDECLS @@ -1025,6 +1025,11 @@ EXTERN int TclNREvalObjv (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags, Command * cmdPtr); #endif +#ifndef TclDbDumpActiveObjects_TCL_DECLARED +#define TclDbDumpActiveObjects_TCL_DECLARED +/* 243 */ +EXTERN void TclDbDumpActiveObjects (FILE * outFile); +#endif typedef struct TclIntStubs { int magic; @@ -1273,6 +1278,7 @@ typedef struct TclIntStubs { int (*tclNRRunCallbacks) (Tcl_Interp * interp, int result, struct TEOV_callback * rootPtr, int tebcCall); /* 240 */ int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 241 */ int (*tclNREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags, Command * cmdPtr); /* 242 */ + void (*tclDbDumpActiveObjects) (FILE * outFile); /* 243 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -1975,6 +1981,10 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclNREvalObjv \ (tclIntStubsPtr->tclNREvalObjv) /* 242 */ #endif +#ifndef TclDbDumpActiveObjects +#define TclDbDumpActiveObjects \ + (tclIntStubsPtr->tclDbDumpActiveObjects) /* 243 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index fb032ea..a5a627d 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.180 2009/04/10 18:02:36 das Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.181 2009/06/18 09:42:40 dkf Exp $ */ #include "tclInt.h" @@ -288,6 +288,7 @@ static const TclIntStubs tclIntStubs = { TclNRRunCallbacks, /* 240 */ TclNREvalObjEx, /* 241 */ TclNREvalObjv, /* 242 */ + TclDbDumpActiveObjects, /* 243 */ }; static const TclIntPlatStubs tclIntPlatStubs = { -- cgit v0.12 From c850bb8798a952623336cca73d9196af1454db02 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 24 Jun 2009 13:13:48 +0000 Subject: Clean up procs after testing to avoid problems with -singleproc testing [Bug 2811492] --- ChangeLog | 4 ++++ tests/http11.test | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5f2223d..87e210e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-24 Pat Thoyts + + * tests/http11.test: Clean up procs after testing. [Bug 2811492] + 2009-06-18 Donal K. Fellows * generic/tclCkalloc.c (MemoryCmd): [Bug 988703]: diff --git a/tests/http11.test b/tests/http11.test index 967e5e6..85526f5 100644 --- a/tests/http11.test +++ b/tests/http11.test @@ -647,5 +647,9 @@ test http-4.3 "normal post request, check channel query length" -setup { # ------------------------------------------------------------------------- -unset -nocomplain httpd_port +foreach p {create_httpd httpd_read halt_httpd meta check_crc} { + rename $p {} +} +unset -nocomplain httpd_port httpd p + ::tcltest::cleanupTests -- cgit v0.12 From 4fd9789c692f218dc5b7b34eb3b4029674ffaa03 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 24 Jun 2009 13:51:36 +0000 Subject: Correct failures during -singleproc 1 test suite run. Correct duplicate test names. --- tests/execute.test | 3 ++- tests/http.test | 12 ++++++---- tests/http11.test | 66 +++++++++++++++++++++++++++--------------------------- 3 files changed, 43 insertions(+), 38 deletions(-) diff --git a/tests/execute.test b/tests/execute.test index fad153b..b277da8 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.31 2009/06/13 14:31:54 dgp Exp $ +# RCS: @(#) $Id: execute.test,v 1.32 2009/06/24 13:51:36 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -945,6 +945,7 @@ test execute-8.4 {Compile epoch bump effect on stack trace} -setup { } -cleanup { rename foo {} rename FOO {} + unset -nocomplain m o stack1 stack2 } -result {} test execute-8.5 {Bug 2038069} -setup { proc demo {} { diff --git a/tests/http.test b/tests/http.test index 7fac104..526dffa 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.51 2009/04/10 14:19:45 patthoyts Exp $ +# RCS: @(#) $Id: http.test,v 1.52 2009/06/24 13:51:36 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -331,11 +331,15 @@ test http-3.23 {http::geturl parse failures} -body { test http-3.24 {http::geturl parse failures} -body { http::geturl http://somewhere/path?%query } -returnCodes error -result {Illegal encoding character usage "%qu" in URL path} -test http-3.25 {http::meta} { +test http-3.25 {http::meta} -setup { + unset -nocomplain m token +} -body { set token [http::geturl $url -timeout 2000] array set m [http::meta $token] lsort [array names m] -} {Content-Length Content-Type Date} +} -cleanup { + unset -nocomplain m token +} -result {Content-Length Content-Type Date} test http-3.26 {http::meta} { set token [http::geturl $url -headers {X-Check 1} -timeout 2000] array set m [http::meta $token] @@ -545,4 +549,4 @@ rename bgerror {} # Local variables: # mode: tcl -# End: \ No newline at end of file +# End: diff --git a/tests/http11.test b/tests/http11.test index 85526f5..7fe13fa 100644 --- a/tests/http11.test +++ b/tests/http11.test @@ -77,7 +77,7 @@ makeFile "test\ # ------------------------------------------------------------------------- -test http-1.0 "normal request for document " -setup { +test http11-1.0 "normal request for document " -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html -timeout 10000] @@ -88,7 +88,7 @@ test http-1.0 "normal request for document " -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close} -test http-1.1 "normal,gzip,non-chunked" -setup { +test http11-1.1 "normal,gzip,non-chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ @@ -101,7 +101,7 @@ test http-1.1 "normal,gzip,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok gzip {}} -test http-1.2 "normal,deflated,non-chunked" -setup { +test http11-1.2 "normal,deflated,non-chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ @@ -114,7 +114,7 @@ test http-1.2 "normal,deflated,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok deflate {}} -test http-1.3 "normal,compressed,non-chunked" -setup { +test http11-1.3 "normal,compressed,non-chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ @@ -127,7 +127,7 @@ test http-1.3 "normal,compressed,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok compress {}} -test http-1.4 "normal,identity,non-chunked" -setup { +test http11-1.4 "normal,identity,non-chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ @@ -140,7 +140,7 @@ test http-1.4 "normal,identity,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok {} {}} -test http-1.5 "normal request for document, unsupported coding" -setup { +test http11-1.5 "normal request for document, unsupported coding" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -153,7 +153,7 @@ test http-1.5 "normal request for document, unsupported coding" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok {}} -test http-1.6 "normal, specify 1.1 " -setup { +test http11-1.6 "normal, specify 1.1 " -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -166,7 +166,7 @@ test http-1.6 "normal, specify 1.1 " -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close chunked} -test http-1.7 "normal, 1.1 and keepalive " -setup { +test http11-1.7 "normal, 1.1 and keepalive " -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -179,7 +179,7 @@ test http-1.7 "normal, 1.1 and keepalive " -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok {} chunked} -test http-1.8 "normal, 1.1 and keepalive, server close" -setup { +test http11-1.8 "normal, 1.1 and keepalive, server close" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html?close=1 \ @@ -192,7 +192,7 @@ test http-1.8 "normal, 1.1 and keepalive, server close" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close {}} -test http-1.9 "normal,gzip,chunked" -setup { +test http11-1.9 "normal,gzip,chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -205,7 +205,7 @@ test http-1.9 "normal,gzip,chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok gzip chunked} -test http-1.10 "normal,deflate,chunked" -setup { +test http11-1.10 "normal,deflate,chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -218,7 +218,7 @@ test http-1.10 "normal,deflate,chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok deflate chunked} -test http-1.11 "normal,compress,chunked" -setup { +test http11-1.11 "normal,compress,chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -231,7 +231,7 @@ test http-1.11 "normal,compress,chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok compress chunked} -test http-1.12 "normal,identity,chunked" -setup { +test http11-1.12 "normal,identity,chunked" -setup { variable httpd [create_httpd] } -body { set tok [http::geturl http://localhost:$httpd_port/testdoc.html \ @@ -246,7 +246,7 @@ test http-1.12 "normal,identity,chunked" -setup { # ------------------------------------------------------------------------- -test http-2.0 "-channel" -setup { +test http11-2.0 "-channel" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -264,7 +264,7 @@ test http-2.0 "-channel" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close chunked} -test http-2.1 "-channel, encoding gzip" -setup { +test http11-2.1 "-channel, encoding gzip" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -283,7 +283,7 @@ test http-2.1 "-channel, encoding gzip" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close gzip chunked} -test http-2.2 "-channel, encoding deflate" -setup { +test http11-2.2 "-channel, encoding deflate" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -302,7 +302,7 @@ test http-2.2 "-channel, encoding deflate" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close deflate chunked} -test http-2.3 "-channel,encoding compress" -setup { +test http11-2.3 "-channel,encoding compress" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -322,7 +322,7 @@ test http-2.3 "-channel,encoding compress" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close compress chunked} -test http-2.4 "-channel,encoding identity" -setup { +test http11-2.4 "-channel,encoding identity" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -342,7 +342,7 @@ test http-2.4 "-channel,encoding identity" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close {} chunked} -test http-2.5 "-channel,encoding unsupported" -setup { +test http11-2.5 "-channel,encoding unsupported" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -362,7 +362,7 @@ test http-2.5 "-channel,encoding unsupported" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close {} chunked} -test http-2.6 "-channel,encoding gzip,non-chunked" -setup { +test http11-2.6 "-channel,encoding gzip,non-chunked" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -382,7 +382,7 @@ test http-2.6 "-channel,encoding gzip,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close gzip {} 0} -test http-2.7 "-channel,encoding deflate,non-chunked" -setup { +test http11-2.7 "-channel,encoding deflate,non-chunked" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -402,7 +402,7 @@ test http-2.7 "-channel,encoding deflate,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close deflate {} 0} -test http-2.8 "-channel,encoding compress,non-chunked" -setup { +test http11-2.8 "-channel,encoding compress,non-chunked" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -422,7 +422,7 @@ test http-2.8 "-channel,encoding compress,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close compress {} 0} -test http-2.9 "-channel,encoding identity,non-chunked" -setup { +test http11-2.9 "-channel,encoding identity,non-chunked" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -442,7 +442,7 @@ test http-2.9 "-channel,encoding identity,non-chunked" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok close {} {} 0} -test http-2.10 "-channel,deflate,keepalive" -setup { +test http11-2.10 "-channel,deflate,keepalive" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -462,7 +462,7 @@ test http-2.10 "-channel,deflate,keepalive" -setup { halt_httpd } -result {ok {HTTP/1.1 200 OK} ok {} deflate chunked 0} -test http-2.11 "-channel,identity,keepalive" -setup { +test http11-2.11 "-channel,identity,keepalive" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] } -body { @@ -502,7 +502,7 @@ proc handler {var sock token} { } } -test http-3.0 "-handler,close,identity" -setup { +test http11-3.0 "-handler,close,identity" -setup { variable httpd [create_httpd] set testdata "" } -body { @@ -519,7 +519,7 @@ test http-3.0 "-handler,close,identity" -setup { halt_httpd } -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} -test http-3.1 "-handler,protocol1.0" -setup { +test http11-3.1 "-handler,protocol1.0" -setup { variable httpd [create_httpd] set testdata "" } -body { @@ -537,7 +537,7 @@ test http-3.1 "-handler,protocol1.0" -setup { halt_httpd } -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} -test http-3.2 "-handler,close,chunked" -setup { +test http11-3.2 "-handler,close,chunked" -setup { variable httpd [create_httpd] set testdata "" } -body { @@ -555,7 +555,7 @@ test http-3.2 "-handler,close,chunked" -setup { halt_httpd } -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} -test http-3.3 "-handler,keepalive,chunked" -setup { +test http11-3.3 "-handler,keepalive,chunked" -setup { variable httpd [create_httpd] set testdata "" } -body { @@ -573,7 +573,7 @@ test http-3.3 "-handler,keepalive,chunked" -setup { halt_httpd } -result {ok {HTTP/1.0 200 OK} ok close {} {} 0} -test http-4.0 "normal post request" -setup { +test http11-4.0 "normal post request" -setup { variable httpd [create_httpd] } -body { set query [http::formatQuery q 1 z 2] @@ -589,7 +589,7 @@ test http-4.0 "normal post request" -setup { halt_httpd } -result {status ok code {HTTP/1.1 200 OK} crc ok connection close query-length 7} -test http-4.1 "normal post request, check query length" -setup { +test http11-4.1 "normal post request, check query length" -setup { variable httpd [create_httpd] } -body { set query [http::formatQuery q 1 z 2] @@ -606,7 +606,7 @@ test http-4.1 "normal post request, check query length" -setup { halt_httpd } -result {status ok code {HTTP/1.1 200 OK} crc ok connection close query-length 7} -test http-4.2 "normal post request, check long query length" -setup { +test http11-4.2 "normal post request, check long query length" -setup { variable httpd [create_httpd] } -body { set query [string repeat a 24576] @@ -623,7 +623,7 @@ test http-4.2 "normal post request, check long query length" -setup { halt_httpd } -result {status ok code {HTTP/1.1 200 OK} crc ok connection close query-length 24576} -test http-4.3 "normal post request, check channel query length" -setup { +test http11-4.3 "normal post request, check channel query length" -setup { variable httpd [create_httpd] set chan [open [makeFile {} testfile.tmp] wb+] puts -nonewline $chan [string repeat [encoding convertto utf-8 "This is a test\n"] 8192] -- cgit v0.12 From 113714d1cf9bf670cbb99691146b8c105374678b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 24 Jun 2009 15:17:40 +0000 Subject: More test suite cleanup for "-singleproc 1 -debug 1" testing. --- tests/foreach.test | 3 ++- tests/http.test | 10 +++++++--- tests/http11.test | 1 + tests/oo.test | 3 ++- tests/set-old.test | 3 ++- tests/string.test | 3 ++- tests/stringComp.test | 3 ++- tests/switch.test | 3 ++- tests/tailcall.test | 3 ++- 9 files changed, 22 insertions(+), 10 deletions(-) diff --git a/tests/foreach.test b/tests/foreach.test index 07fbe22..4042b3c 100644 --- a/tests/foreach.test +++ b/tests/foreach.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: foreach.test,v 1.14 2008/03/14 17:43:25 dgp Exp $ +# RCS: @(#) $Id: foreach.test,v 1.15 2009/06/24 15:17:40 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -271,5 +271,6 @@ test foreach-10.1 {foreach: [Bug 1671087]} -setup { # cleanup catch {unset a} catch {unset x} +catch {rename foo {}} ::tcltest::cleanupTests return diff --git a/tests/http.test b/tests/http.test index 526dffa..2516a48 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.52 2009/06/24 13:51:36 dgp Exp $ +# RCS: @(#) $Id: http.test,v 1.53 2009/06/24 15:17:40 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -340,11 +340,15 @@ test http-3.25 {http::meta} -setup { } -cleanup { unset -nocomplain m token } -result {Content-Length Content-Type Date} -test http-3.26 {http::meta} { +test http-3.26 {http::meta} -setup { + unset -nocomplain m token +} -body { set token [http::geturl $url -headers {X-Check 1} -timeout 2000] array set m [http::meta $token] lsort [array names m] -} {Content-Length Content-Type Date X-Check} +} -cleanup { + unset -nocomplain m token +} -result {Content-Length Content-Type Date X-Check} test http-4.1 {http::Event} { set token [http::geturl $url -keepalive 0] diff --git a/tests/http11.test b/tests/http11.test index 7fe13fa..0ed60c9 100644 --- a/tests/http11.test +++ b/tests/http11.test @@ -650,6 +650,7 @@ test http11-4.3 "normal post request, check channel query length" -setup { foreach p {create_httpd httpd_read halt_httpd meta check_crc} { rename $p {} } +removeFile testdoc.html unset -nocomplain httpd_port httpd p ::tcltest::cleanupTests diff --git a/tests/oo.test b/tests/oo.test index da295a6..7b28f00 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.27 2009/05/15 10:08:02 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.28 2009/06/24 15:17:40 dgp Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -690,6 +690,7 @@ test oo-7.6 {OO: inheritance 101 - overridden methods should be oblivious} -setu lappend result [Binstance incr x] lappend result x=$x } -result {x=10 x 1 returning:11 11 x=11} -cleanup { + unset -nocomplain x Aclass destroy } test oo-7.7 {OO: inheritance and errorInfo} -setup { diff --git a/tests/set-old.test b/tests/set-old.test index 1a0d5e9..150d6f7 100644 --- a/tests/set-old.test +++ b/tests/set-old.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: set-old.test,v 1.20 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: set-old.test,v 1.21 2009/06/24 15:17:40 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -913,6 +913,7 @@ catch {unset a} catch {unset b} catch {unset c} catch {unset aVaRnAmE} +catch {rename foo {}} # cleanup ::tcltest::cleanupTests diff --git a/tests/string.test b/tests/string.test index 536189f..3fc1153 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.76 2008/10/14 18:49:47 dgp Exp $ +# RCS: @(#) $Id: string.test,v 1.77 2009/06/24 15:17:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1868,6 +1868,7 @@ test string-28.13 {tcl::prefix longest} { # cleanup rename MemStress {} +catch {rename foo {}} ::tcltest::cleanupTests return diff --git a/tests/stringComp.test b/tests/stringComp.test index c4680fb..2f187be 100644 --- a/tests/stringComp.test +++ b/tests/stringComp.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stringComp.test,v 1.16 2008/07/19 22:50:38 nijtmans Exp $ +# RCS: @(#) $Id: stringComp.test,v 1.17 2009/06/24 15:17:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -714,5 +714,6 @@ test stringComp-11.54 {string match, failure} { ## not yet bc # cleanup +catch {rename foo {}} ::tcltest::cleanupTests return diff --git a/tests/switch.test b/tests/switch.test index db346e9..2652a70 100644 --- a/tests/switch.test +++ b/tests/switch.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: switch.test,v 1.23 2008/07/21 22:22:28 nijtmans Exp $ +# RCS: @(#) $Id: switch.test,v 1.24 2009/06/24 15:17:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -739,6 +739,7 @@ test switch-14.16 {switch -regexp compilation} { } no # cleanup +catch {rename foo {}} ::tcltest::cleanupTests return diff --git a/tests/tailcall.test b/tests/tailcall.test index 0d0bf65..8eea3e9 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.7 2009/03/21 12:56:32 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.8 2009/06/24 15:17:41 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -167,6 +167,7 @@ test tailcall-0.6 {tailcall is constant space} -constraints {testnrelevels known } -result {0 0 0 0 0 0} test tailcall-0.7 {tailcall is constant space} -constraints testnrelevels -setup { + catch {rename foo {}} oo::class create foo { method b i { if {[incr i] > 10} { -- cgit v0.12 From d013ac36802f1a94c8629dde40cfae06e492d4ce Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Jun 2009 15:29:39 +0000 Subject: Fix [Bug 2811598]. --- ChangeLog | 6 +++++- tests/oo.test | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87e210e..55fc635 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ +2009-06-24 Donal K. Fellows + + * tests/oo.test (oo-19.1): [Bug 2811598]: Make more resilient. + 2009-06-24 Pat Thoyts - * tests/http11.test: Clean up procs after testing. [Bug 2811492] + * tests/http11.test: [Bug 2811492]: Clean up procs after testing. 2009-06-18 Donal K. Fellows diff --git a/tests/oo.test b/tests/oo.test index 7b28f00..829c8ce 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.28 2009/06/24 15:17:40 dgp Exp $ +# RCS: @(#) $Id: oo.test,v 1.29 2009/06/24 15:29:40 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1608,6 +1608,7 @@ test oo-19.1 {OO: varname method} -setup { oo::object create inst oo::objdefine inst export eval set result {} + inst eval { variable x } } -body { inst eval {trace add variable x write foo} set ns [inst eval namespace current] -- cgit v0.12 From 234eb4d7556c017fc6dee98267a56c844150ee5c Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 25 Jun 2009 19:24:16 +0000 Subject: Made namespace scope corrections to some of the testing machinery surrounding [testnrelevels]. Fixes up some -singleproc 1 failures. --- tests/coroutine.test | 8 +++++--- tests/nre.test | 29 +++++++---------------------- tests/tailcall.test | 8 +++++--- 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/tests/coroutine.test b/tests/coroutine.test index fd3a3a1..7820e9a 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.1 2009/03/19 23:31:37 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.2 2009/06/25 19:24:16 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -20,6 +20,7 @@ testConstraint testnrelevels [llength [info commands testnrelevels]] if {[testConstraint testnrelevels]} { namespace eval testnre { + namespace path ::tcl::mathop # # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, # cmdFrame level, callFrame level, tosPtr and callback depth @@ -36,13 +37,14 @@ if {[testConstraint testnrelevels]} { return $res } proc setabs {} { - uplevel 1 variable abs -[lindex [testnrelevels] 0] + variable abs [- [lindex [testnrelevels] 0] } variable body0 { set x [depthDiff] if {[incr i] > 10} { - variable abs + namespace upvar [namespace qualifiers \ + [namespace origin depthDiff]] abs abs incr abs [lindex [testnrelevels] 0] return [list [lrange $x 0 3] $abs] } diff --git a/tests/nre.test b/tests/nre.test index b0ee702..2c91e7a 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.10 2009/03/21 10:20:04 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.11 2009/06/25 19:24:16 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -25,6 +25,7 @@ testConstraint testnrelevels [llength [info commands testnrelevels]] if {[testConstraint testnrelevels]} { namespace eval testnre { + namespace path ::tcl::mathop # # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, # cmdFrame level, callFrame level, tosPtr and callback depth @@ -41,13 +42,14 @@ if {[testConstraint testnrelevels]} { return $res } proc setabs {} { - uplevel 1 variable abs -[lindex [testnrelevels] 0] + variable abs [- [lindex [testnrelevels] 0]] } variable body0 { set x [depthDiff] if {[incr i] > 10} { - variable abs + namespace upvar [namespace qualifiers \ + [namespace origin depthDiff]] abs abs incr abs [lindex [testnrelevels] 0] return [list [lrange $x 0 3] $abs] } @@ -68,7 +70,6 @@ test nre-1.1 {self-recursive procs} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 1 1 1} 0} @@ -79,7 +80,7 @@ test nre-1.2 {self-recursive lambdas} -setup { setabs apply $a 0 } -cleanup { - unset a abs + unset a } -constraints { testnrelevels } -result {{0 1 1 1} 0} @@ -94,7 +95,7 @@ test nre-1.3 {mutually recursive procs and lambdas} -setup { a 0 } -cleanup { rename a {} - unset b abs + unset b } -constraints { testnrelevels } -result {{0 2 2 2} 0} @@ -112,7 +113,6 @@ test nre-2.1 {alias is not recursive} -setup { } -cleanup { rename a {} rename b {} - unset abs } -constraints { testnrelevels } -result {{0 2 1 1} 0} @@ -148,7 +148,6 @@ test nre-4.1 {ensembles are not recursive} -setup { } -cleanup { rename a {} rename b {} - unset abs } -constraints { testnrelevels } -result {{0 2 1 1} 0} @@ -186,7 +185,6 @@ test nre-6.1 {[uplevel] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 2 2 0} 0} @@ -198,7 +196,6 @@ test nre-6.2 {[uplevel] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 2 2 0} 0} @@ -210,7 +207,6 @@ test nre-7.1 {[catch] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 3 3 0} 0} @@ -222,7 +218,6 @@ test nre-7.2 {[if] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 2 2 0} 0} @@ -234,7 +229,6 @@ test nre-7.3 {[while] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 2 2 0} 0} @@ -246,7 +240,6 @@ test nre-7.4 {[for] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 2 2 0} 0} @@ -261,7 +254,6 @@ test nre-7.5 {[foreach] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 3 3 0} 0} @@ -273,7 +265,6 @@ test nre-7.6 {[eval] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 2 2 1} 0} @@ -285,7 +276,6 @@ test nre-7.7 {[eval] is not recursive} -setup { a 0 } -cleanup { rename a {} - unset abs } -constraints { testnrelevels } -result {{0 2 2 1} 0} @@ -335,7 +325,6 @@ test nre-oo.1 {really deep calls in oo - direct} -setup { foo bar 0 } -cleanup { foo destroy - unset abs } -constraints { testnrelevels } -result {{0 1 1 1} 0} @@ -348,7 +337,6 @@ test nre-oo.2 {really deep calls in oo - call via [self]} -setup { foo bar 0 } -cleanup { foo destroy - unset abs } -constraints { testnrelevels } -result {{0 1 1 1} 0} @@ -361,7 +349,6 @@ test nre-oo.3 {really deep calls in oo - private calls} -setup { foo bar 0 } -cleanup { foo destroy - unset abs } -constraints { testnrelevels } -result {{0 1 1 1} 0} @@ -379,7 +366,6 @@ test nre-oo.4 {really deep calls in oo - overriding} -setup { [boo new] bar 0 } -cleanup { foo destroy - unset abs } -constraints { testnrelevels } -result {{0 1 1 1} 0} @@ -396,7 +382,6 @@ test nre-oo.5 {really deep calls in oo - forwards} -setup { foo bar 0 } -cleanup { foo destroy - unset abs } -constraints { testnrelevels } -result {{0 2 1 1} 0} diff --git a/tests/tailcall.test b/tests/tailcall.test index 8eea3e9..335492a 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.8 2009/06/24 15:17:41 dgp Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.9 2009/06/25 19:24:16 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -25,6 +25,7 @@ testConstraint testnrelevels [llength [info commands testnrelevels]] if {[testConstraint testnrelevels]} { namespace eval testnre { + namespace path ::tcl::mathop # # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, # cmdFrame level, callFrame level, tosPtr and callback depth @@ -41,13 +42,14 @@ if {[testConstraint testnrelevels]} { return $res } proc setabs {} { - uplevel 1 variable abs -[lindex [testnrelevels] 0] + variable abs [- [lindex [testnrelevels] 0]] } variable body0 { set x [depthDiff] if {[incr i] > 10} { - variable abs + namespace upvar [namespace qualifiers \ + [namespace origin depthDiff]] abs abs incr abs [lindex [testnrelevels] 0] return [list [lrange $x 0 3] $abs] } -- cgit v0.12 From 0d7a2b27ab8079b4426b96cfbc665534e01e89bb Mon Sep 17 00:00:00 2001 From: patthoyts Date: Thu, 25 Jun 2009 22:53:41 +0000 Subject: Handle cleanup when all tests skipped [Bug 2812355] --- tests/http11.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/http11.test b/tests/http11.test index 0ed60c9..0cecaa1 100644 --- a/tests/http11.test +++ b/tests/http11.test @@ -648,7 +648,7 @@ test http11-4.3 "normal post request, check channel query length" -setup { # ------------------------------------------------------------------------- foreach p {create_httpd httpd_read halt_httpd meta check_crc} { - rename $p {} + if {[llength [info proc $p]]} {rename $p {}} } removeFile testdoc.html unset -nocomplain httpd_port httpd p -- cgit v0.12 From ccc761ddde222870a23a9ab6a3b3ee16e6bb2924 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 26 Jun 2009 18:14:24 +0000 Subject: * macosx/Tcl-Common.xcconfig: update projects for Xcode 3.1 and 3.2, * macosx/Tcl.xcode/*: standardize on gcc 4.2, remove obsolete * macosx/Tcl.xcodeproj/*: configurations and pre-Xcode project. * macosx/Tcl.pbproj/* (removed): * macosx/README: update project docs, cleanup. * unix/Makefile.in: update dist target for project changes. --- ChangeLog | 11 + macosx/README | 194 ++--- macosx/Tcl-Common.xcconfig | 11 +- macosx/Tcl.pbproj/default.pbxuser | 173 ---- macosx/Tcl.pbproj/jingham.pbxuser | 173 ---- macosx/Tcl.pbproj/project.pbxproj | 1539 ---------------------------------- macosx/Tcl.xcode/default.pbxuser | 12 +- macosx/Tcl.xcode/project.pbxproj | 670 ++++++++------- macosx/Tcl.xcodeproj/default.pbxuser | 19 +- macosx/Tcl.xcodeproj/project.pbxproj | 597 ++++++------- unix/Makefile.in | 12 +- 11 files changed, 739 insertions(+), 2672 deletions(-) delete mode 100644 macosx/Tcl.pbproj/default.pbxuser delete mode 100644 macosx/Tcl.pbproj/jingham.pbxuser delete mode 100644 macosx/Tcl.pbproj/project.pbxproj diff --git a/ChangeLog b/ChangeLog index 55fc635..4717abd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-06-26 Daniel Steffen + + * macosx/Tcl-Common.xcconfig: update projects for Xcode 3.1 and 3.2, + * macosx/Tcl.xcode/*: standardize on gcc 4.2, remove obsolete + * macosx/Tcl.xcodeproj/*: configurations and pre-Xcode project. + * macosx/Tcl.pbproj/* (removed): + + * macosx/README: update project docs, cleanup. + + * unix/Makefile.in: update dist target for project changes. + 2009-06-24 Donal K. Fellows * tests/oo.test (oo-19.1): [Bug 2811598]: Make more resilient. diff --git a/macosx/README b/macosx/README index ebe2bdf..11a7dcf 100644 --- a/macosx/README +++ b/macosx/README @@ -1,7 +1,7 @@ Tcl Mac OS X README ------------------- -RCS: @(#) $Id: README,v 1.18 2008/06/12 06:26:58 das Exp $ +RCS: @(#) $Id: README,v 1.19 2009/06/26 18:14:25 das Exp $ This is the README file for the Mac OS X/Darwin version of Tcl. @@ -27,14 +27,13 @@ before asking on the list, many questions have already been answered). Tk: http://sf.net/tracker/?func=add&group_id=12997&atid=112997 please make sure that your report Tk specific bugs to the tktoolkit project bug tracker rather than the tcl project bug tracker. -Mac OS X specific bugs should usually be assigned to 'das' or 'wolfsuit'. +Mac OS X specific bugs should in general be assigned to user 'das'. 2. Using Tcl on Mac OS X ------------------------ -- At a minimum, Mac OS X 10.1 is required to run Tcl, but OS X 10.3 or higher is -recommended (certain [file] operations behave incorrectly on earlier releases). +- At a minimum, Mac OS X 10.3 is required to run Tcl. - Unless weak-linking is used, Tcl built on Mac OS X 10.x will not run on 10.y with y < x; on the other hand Tcl built on 10.y will always run on 10.x with @@ -44,18 +43,19 @@ Weak-linking is available on OS X 10.2 or later, it additionally allows Tcl built on 10.x to run on any 10.y with x > y >= z (for a chosen z >= 2). - Tcl extensions can be installed in any of: - $HOME/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl - $HOME/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks - /System/Library/Frameworks (searched in that order). + $HOME/Library/Tcl /Library/Tcl /System/Library/Tcl + $HOME/Library/Frameworks /Library/Frameworks /System/Library/Frameworks + (searched in that order). Given a potential package directory $pkg, Tcl on OSX checks for the file $pkg/Resources/Scripts/pkgIndex.tcl as well as the usual $pkg/pkgIndex.tcl. This allows building extensions as frameworks with all script files contained in the Resources/Scripts directory of the framework. - [load]able binary extensions can linked as either ordinary shared libraries -(.dylib) or as MachO bundles (since 8.4.10/8.5a3); only bundles can be unloaded, -and bundles are also loaded more efficiently from VFS (no temporary copy to the -native filesystem required). +(.dylib) or as MachO bundles (since 8.4.10/8.5a3); bundles have the advantage +that they are [load]ed more efficiently from a tcl VFS (no temporary copy to the +native filesystem required), and prior to Mac OS X 10.5, only bundles can be +[unload]ed. - The 'deploy' target of macosx/GNUmakefile installs the html manpages into the standard documentation location in the Tcl framework: @@ -64,19 +64,18 @@ No nroff manpages are installed by default by the GNUmakefile. - The Tcl framework can be installed in any of the system's standard framework directories: - $HOME/Library/Frameworks /Library/Frameworks - /Network/Library/Frameworks /System/Library/Frameworks + $HOME/Library/Frameworks /Library/Frameworks /System/Library/Frameworks 3. Building Tcl on Mac OS X --------------------------- -- At least Mac OS X 10.1 is required to build Tcl, and Apple's Developer Tools -need to be installed (only the most recent version matching your OS release is -supported). The Developer Tools installer is available on Mac OS X retail disks -or is present in /Applications/Installers on Macs that came with OS X -preinstalled. The most recent version can be downloaded from the ADC website -http://connect.apple.com (after you register for free ADC membership). +- At least Mac OS X 10.3 is required to build Tcl. +Apple's Xcode Developer Tools need to be installed (only the most recent version +matching your OS release is supported), the Xcode installer is available on Mac +OS X install media or may be present in /Applications/Installers on Macs that +came with OS X preinstalled. The most recent version can always be downloaded +from the ADC website http://connect.apple.com (free ADC membership required). - Tcl is most easily built as a Mac OS X framework via GNUmakefile in tcl/macosx (see below for details), but can also be built with the standard unix configure @@ -86,68 +85,50 @@ The Mac OS X specific configure flags are --enable-framework and --disable-corefoundation (which disables CF and notably reverts to the standard select based notifier). -- It is also possible to build with Apple's IDE via the projects in tcl/macosx, -take care to only use the project matching your DevTools and OS version: - * Tcl.pbproj for Xcode or ProjectBuilder on 10.3 and earlier, this has a - 'Tcl' target that simply calls through to the tcl/macosx/GNUMakefile. - * Tcl.xcode for Xcode 2.4 on 10.4 and Xcode 2.5 on 10.4 and later, which - additionally has native 'tcltest' and 'tests' targets for debugging and - running the testsuite, these targets' 'Debug' build configuration has - ZeroLink and Fix&Continue enabled, use the 'DebugNoFixZL' build - configuration if you need a debug build without these features. The - following build configurations are available: - 'DebugUnthreaded': debug build with threading turned off. - 'DebugNoCF': debug build with corefoundation turned off. - 'DebugNoCFUnthreaded': debug build with corefoundation & threading off. - 'DebugMemCompile': debug build with memory and bytecode debugging on. - 'DebugLeaks': debug build with PURIFY defined. - 'DebugGCov': debug build with generation of gcov data files enabled. - 'Debug64bit': builds the targets as 64bit with debugging enabled, - requires a 64bit capable processor (i.e. G5 or Core2/Xeon). - 'ReleaseUniversal': builds the targets as universal binaries for the - ppc, ppc64, i386 and x86_64 architectures. - 'ReleaseUniversal10.4uSDK': same as 'ReleaseUniversal' but builds - against the 10.4u SDK, required to build universal binaries on - PowerPC Tiger (where the system libraries are not universal). - 'ReleasePPC10.3.9SDK': builds for PowerPC against the 10.3.9 SDK, useful - for verifying on Tiger that building on Panther would succeed. - 'ReleasePPC10.2.8SDK': builds for PowerPC with gcc-3.3 against the - 10.2.8 SDK, useful to verify on Tiger that building on Jaguar - would succeed. - * Tcl.xcodeproj for Xcode 3.1 on 10.5 and later, which has the following - additional build configurations: - 'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds - against the 10.5 SDK on Leopard (with 10.5 deployment target). - 'Debug gcc42': same as 'Debug' but builds with gcc 4.2. - 'Debug llvmgcc42': same as 'Debug' but builds with llvm-gcc 4.2. - 'ReleaseUniversal gcc42': same as 'ReleaseUniversal' but builds with - gcc 4.2. - 'ReleaseUniversal llvmgcc42': same as 'ReleaseUniversal' but builds - with llvm-gcc 4.2. - Note that all non-SDK configurations have 10.5 deployment target. - -Notes about the native targets of the Xcode projects: - * the Xcode projects refer to the toplevel tcl source directory through the - TCL_SRCROOT user build setting, by default this is set to the - project-relative path '../../tcl', if your tcl source directory is named - differently, e.g. '../../tcl8.5', you'll need to manually change the - TCL_SRCROOT setting by editing your ${USER}.pbxuser file (located inside - the Tcl.xcodeproj bundle directory) with a text editor. - * the native targets need a version of the unix configure script with config - headers enabled, this is automatically generated as tcl/macosx/configure - by the project but that requires 2.59 versions of autoconf & autoheader. - These are not available on Mac OS X 10.5 by default and need to be - installed manually. By default they are assumed to be installed as - /usr/local/bin/autoconf-2.59 and /usr/local/bin/autoheader-2.59, set the - AUTOCONF and AUTOHEADER build settings in ${USER}.pbxuser to their true - locations if necessary. - -- To build universal binaries outside of Tcl.xcodeproj, set CFLAGS as follows: - export CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 \ - -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" +- It is also possible to build with the Xcode IDE via the projects in +tcl/macosx, take care to use the project matching your DevTools and OS version: + Tcl.xcode: for Xcode 3.1 on 10.5 + Tcl.xcodeproj: for Xcode 3.2 on 10.6 +These have the following targets: + Tcl: calls through to tcl/macosx/GNUMakefile. + tcltest: static build of tcltest for debugging. + tests: build tcltest target and run tcl testsuite. +The following build configurations are available: + Debug: debug build for the active architecture, + with Fix & Continue enabled. + Debug clang: use clang compiler. + Debug llvm-gcc: use llvm-gcc compiler. + Debug gcc40: use gcc 4.0 compiler. + DebugNoFixAndContinue: disable Fix & Continue. + DebugUnthreaded: disable threading. + DebugNoCF: disable corefoundation. + DebugNoCFUnthreaded: disable corefoundation an threading. + DebugMemCompile: enable memory and bytecode debugging. + DebugLeaks: define PURIFY. + DebugGCov: enable generation of gcov data files. + Debug64bit: configure with --enable-64bit (requires + building on a 64bit capable processor). + Release: release build for the active architecture. + ReleaseUniversal: 32/64-bit universal build. + ReleaseUniversal clang: use clang compiler. + ReleaseUniversal llvm-gcc: use llvm-gcc compiler. + ReleaseUniversal gcc40: use gcc 4.0 compiler. + ReleaseUniversal10.5SDK: build against the 10.5 SDK (with 10.5 + deployment target). + Note that the non-SDK configurations have their deployment target set to + 10.5 (Tcl.xcode) resp. 10.6 (Tcl.xcodeproj). +The Xcode projects refer to the toplevel tcl source directory via the +TCL_SRCROOT user build setting, by default this is set to the project-relative +path '../../tcl', if your tcl source directory is named differently, e.g. +'../../tcl8.6', you need to manually change the TCL_SRCROOT setting by editing +your ${USER}.pbxuser file (located inside the Tcl.xcodeproj bundle directory) +with a text editor. + +- To build universal binaries outside of the Xcode IDE, set CFLAGS as follows: + export CFLAGS="-arch i386 -arch x86_64 -arch ppc" This requires Mac OS X 10.4 and Xcode 2.4 (or Xcode 2.2 if -arch x86_64 is -omitted, but _not_ Xcode 2.1) and will work on any of the architectures (the --isysroot flag is only required on PowerPC Tiger). +omitted, but _not_ Xcode 2.1) and will work on any architecture (on PowerPC +Tiger you need to add "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"). Note that configure requires CFLAGS to contain a least one architecture that can be run on the build machine (i.e. ppc on G3/G4, ppc or ppc64 on G5, ppc or i386 on Core and ppc, i386 or x86_64 on Core2/Xeon). @@ -155,51 +136,46 @@ Universal builds of Tcl TEA extensions are also possible with CFLAGS set as above, they will be [load]able by universal as well as thin binaries of Tcl. - To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable -to the minimal OS version (>= 10.2) the binaries should be able to run on, e.g: - export MACOSX_DEPLOYMENT_TARGET=10.2 -This requires Mac OS X 10.2 and gcc 3.1; if you have gcc 4 or later you can set -CFLAGS instead: - export CFLAGS="-mmacosx-version-min=10.2" -The Tcl.xcode project is setup to produce binaries that can run on 10.2 or -later (except for the Universal and SDK configurations). -Support for weak-linking was added to the code for 8.4.14/8.5a5. +to the minimal OS version the binaries should be able to run on, e.g: + export MACOSX_DEPLOYMENT_TARGET=10.4 +This requires at least gcc 3.1; with gcc 4 or later, set/add to CFLAGS instead: + export CFLAGS="-mmacosx-version-min=10.4" +Support for weak-linking was added with 8.4.14/8.5a5. Detailed Instructions for building with macosx/GNUmakefile ---------------------------------------------------------- -- Unpack the tcl source release archive. - -- The following instructions assume the tcl source tree is named "tcl${ver}", -where ${ver} is a shell variable containing the tcl version number (for example -'8.4.12'). -Setup the shell variable as follows: - set ver="8.4.12" ;: if your shell is csh - ver="8.4.12" ;: if your shell is sh -The source tree will be named this way only if you are building from a release -archive, if you are building from CVS, the version numbers will be missing; so -set ${ver} to the empty string instead: - set ver="" ;: if your shell is csh - ver="" ;: if your shell is sh - -- The following steps will build Tcl from the Terminal, assuming you are located -in the directory containing the tcl source tree: +- Unpack the Tcl source release archive. + +- The following instructions assume the Tcl source tree is named "tcl${ver}", +(where ${ver} is a shell variable containing the Tcl version number e.g. '8.6'). +Setup this shell variable as follows: + ver="8.6" +If you are building from CVS, omit this step (CVS source tree names usually do +not contain a version number). + +- Setup environment variables as desired, e.g. for a universal build on 10.5: + CFLAGS="-arch i386 -arch x86_64 -arch ppc -mmacosx-version-min=10.5" + export CFLAGS + +- Change to the directory containing the Tcl source tree and build: make -C tcl${ver}/macosx -and the following will then install Tcl onto the root volume (admin password -required): + +- Install Tcl onto the root volume (admin password required): sudo make -C tcl${ver}/macosx install -if you don't have the admin password, you can install into your home directory, +if you don't have an admin password, you can install into your home directory instead by passing an INSTALL_ROOT argument to make: make -C tcl${ver}/macosx install INSTALL_ROOT="${HOME}/" -- The default Makefile targets will build _both_ debug and optimized versions of -the Tcl framework with the standard convention of naming the debug library +- The default GNUmakefile targets will build _both_ debug and optimized versions +of the Tcl framework with the standard convention of naming the debug library Tcl.framework/Tcl_debug. This allows switching to the debug libraries at runtime by setting export DYLD_IMAGE_SUFFIX=_debug (c.f. man dyld for more details) If you only want to build and install the debug or optimized build, use the -'develop' or 'deploy' target variants of the Makefiles, respectively. +'develop' or 'deploy' target variants of the GNUmakefile, respectively. For example, to build and install only the optimized versions: make -C tcl${ver}/macosx deploy sudo make -C tcl${ver}/macosx install-deploy diff --git a/macosx/Tcl-Common.xcconfig b/macosx/Tcl-Common.xcconfig index 9f7f1b4..5c8267e 100644 --- a/macosx/Tcl-Common.xcconfig +++ b/macosx/Tcl-Common.xcconfig @@ -9,7 +9,7 @@ // See the file "license.terms" for information on usage and redistribution // of this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.12 2008/11/14 13:00:31 das Exp $ +// RCS: @(#) $Id: Tcl-Common.xcconfig,v 1.13 2009/06/26 18:14:25 das Exp $ // HEADER_SEARCH_PATHS = "$(DERIVED_FILE_DIR)/tcl" $(HEADER_SEARCH_PATHS) @@ -20,12 +20,9 @@ GCC_PREFIX_HEADER = $(DERIVED_FILE_DIR)/tcl/tclConfig.h GCC_GENERATE_DEBUGGING_SYMBOLS = YES GCC_NO_COMMON_BLOCKS = YES GCC_DYNAMIC_NO_PIC = YES -GCC = $(DEVELOPER_DIR)/usr/bin/gcc -GCC_VERSION = 4.0 -CC = $(GCC)-$(GCC_VERSION) -LD = $(CC) -WARNING_CFLAGS_GCC3 = -Wall -Wno-unused-parameter -Wno-deprecated-declarations -WARNING_CFLAGS = -Wextra -Wno-missing-field-initializers -Winit-self -Wpointer-arith -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS_GCC3) $(WARNING_CFLAGS) +GCC_VERSION = 4.2 +GCC = gcc-$(GCC_VERSION) +WARNING_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-value -Winit-self -Wpointer-arith -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS) BINDIR = $(PREFIX)/bin CFLAGS = $(CFLAGS) CPPFLAGS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) $(CPPFLAGS) diff --git a/macosx/Tcl.pbproj/default.pbxuser b/macosx/Tcl.pbproj/default.pbxuser deleted file mode 100644 index 2ac716d..0000000 --- a/macosx/Tcl.pbproj/default.pbxuser +++ /dev/null @@ -1,173 +0,0 @@ -// !$*UTF8*$! -{ - 00E2F845016E82EB0ACA28DC = { - activeBuildStyle = 00E2F847016E82EB0ACA28DC; - activeExecutable = F594E5F1030774B1016F146B; - activeTarget = 00E2F84C016E8B780ACA28DC; - addToTargets = ( - ); - codeSenseManager = F9D167E40610239A0027C147; - executables = ( - F53ACC52031D9AFE016F146B, - F594E5F1030774B1016F146B, - ); - sourceControlManager = F9D167E30610239A0027C147; - userBuildSettings = { - SYMROOT = "${SRCROOT}/../../build/tcl"; - }; - }; - 00E2F84C016E8B780ACA28DC = { - activeExec = 0; - }; - F53ACC52031D9AFE016F146B = { - activeArgIndex = 2147483647; - activeArgIndices = ( - NO, - NO, - ); - argumentStrings = ( - "${SRCROOT}/../../tcl/tests/all.tcl", - "-verbose \"\"", - ); - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - displayName = "Executable Runner"; - identifier = com.apple.Xcode.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - "PBXLSLaunchAction-1" = { - PBXLSLaunchAction = 1; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXGDB_LaunchConfig; - displayName = GDB; - identifier = com.apple.Xcode.launch.GDBMI_Config; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = _debug; - enableDebugStr = 0; - environmentEntries = ( - { - active = YES; - name = TCL_LIBRARY; - value = "${SRCROOT}/../../tcl/library"; - }, - { - active = NO; - name = DYLD_PRINT_LIBRARIES; - }, - ); - isa = PBXExecutable; - launchableReference = F5C37CF303D5BEDF016F146B; - libgmallocEnabled = 0; - name = tcltest; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - startupPath = "<>"; - }; - F594E5F1030774B1016F146B = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - displayName = "Executable Runner"; - identifier = com.apple.Xcode.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - "PBXLSLaunchAction-1" = { - PBXLSLaunchAction = 1; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXGDB_LaunchConfig; - displayName = GDB; - identifier = com.apple.Xcode.launch.GDBMI_Config; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = _debug; - enableDebugStr = 0; - environmentEntries = ( - { - active = NO; - name = DYLD_PRINT_LIBRARIES; - }, - ); - isa = PBXExecutable; - launchableReference = F98F02E608E7EF9A00D0320A; - libgmallocEnabled = 0; - name = tclsh; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - startupPath = "<>"; - }; - F5C37CF303D5BEDF016F146B = { - isa = PBXFileReference; - lastKnownFileType = "compiled.mach-o.executable"; - path = tcltest; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F98F02E608E7EF9A00D0320A = { - isa = PBXFileReference; - lastKnownFileType = "compiled.mach-o.executable"; - path = tclsh8.6; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F9D167E30610239A0027C147 = { - fallbackIsa = XCSourceControlManager; - isSCMEnabled = 0; - isa = PBXSourceControlManager; - scmConfiguration = { - }; - scmType = scm.cvs; - }; - F9D167E40610239A0027C147 = { - indexTemplatePath = ""; - isa = PBXCodeSenseManager; - usesDefaults = 1; - wantsCodeCompletion = 1; - wantsCodeCompletionAutoSuggestions = 1; - wantsCodeCompletionCaseSensitivity = 1; - wantsCodeCompletionListAlways = 1; - wantsCodeCompletionOnlyMatchingItems = 1; - wantsCodeCompletionParametersIncluded = 1; - wantsCodeCompletionPlaceholdersInserted = 1; - wantsCodeCompletionTabCompletes = 1; - wantsIndex = 1; - }; -} diff --git a/macosx/Tcl.pbproj/jingham.pbxuser b/macosx/Tcl.pbproj/jingham.pbxuser deleted file mode 100644 index 2472114..0000000 --- a/macosx/Tcl.pbproj/jingham.pbxuser +++ /dev/null @@ -1,173 +0,0 @@ -// !$*UTF8*$! -{ - 00E2F845016E82EB0ACA28DC = { - activeBuildStyle = 00E2F847016E82EB0ACA28DC; - activeExecutable = F594E5F1030774B1016F146B; - activeTarget = 00E2F84C016E8B780ACA28DC; - addToTargets = ( - ); - codeSenseManager = F9D167E40610239A0027C147; - executables = ( - F53ACC52031D9AFE016F146B, - F594E5F1030774B1016F146B, - ); - sourceControlManager = F9D167E30610239A0027C147; - userBuildSettings = { - SYMROOT = "${SRCROOT}/../../build/tcl"; - }; - }; - 00E2F84C016E8B780ACA28DC = { - activeExec = 0; - }; - F53ACC52031D9AFE016F146B = { - activeArgIndex = 2147483647; - activeArgIndices = ( - NO, - NO, - ); - argumentStrings = ( - "${SRCROOT}/../../tcl/tests/all.tcl", - "-verbose \"\"", - ); - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - displayName = "Executable Runner"; - identifier = com.apple.Xcode.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - "PBXLSLaunchAction-1" = { - PBXLSLaunchAction = 1; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXGDB_LaunchConfig; - displayName = GDB; - identifier = com.apple.Xcode.launch.GDBMI_Config; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = _debug; - enableDebugStr = 0; - environmentEntries = ( - { - active = YES; - name = TCL_LIBRARY; - value = "${SRCROOT}/../../tcl/library"; - }, - { - active = NO; - name = DYLD_PRINT_LIBRARIES; - }, - ); - isa = PBXExecutable; - launchableReference = F5C37CF303D5BEDF016F146B; - libgmallocEnabled = 0; - name = tcltest; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - startupPath = "<>"; - }; - F594E5F1030774B1016F146B = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - displayName = "Executable Runner"; - identifier = com.apple.Xcode.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - "PBXLSLaunchAction-1" = { - PBXLSLaunchAction = 1; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 2; - PBXLSLaunchStyle = 0; - class = PBXGDB_LaunchConfig; - displayName = GDB; - identifier = com.apple.Xcode.launch.GDBMI_Config; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = _debug; - enableDebugStr = 0; - environmentEntries = ( - { - active = NO; - name = DYLD_PRINT_LIBRARIES; - }, - ); - isa = PBXExecutable; - launchableReference = F98F02E608E7EF9A00D0320A; - libgmallocEnabled = 0; - name = tclsh; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - startupPath = "<>"; - }; - F5C37CF303D5BEDF016F146B = { - isa = PBXFileReference; - lastKnownFileType = "compiled.mach-o.executable"; - path = tcltest; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F98F02E608E7EF9A00D0320A = { - isa = PBXFileReference; - lastKnownFileType = "compiled.mach-o.executable"; - path = tclsh8.5; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F9D167E30610239A0027C147 = { - fallbackIsa = XCSourceControlManager; - isSCMEnabled = 0; - isa = PBXSourceControlManager; - scmConfiguration = { - }; - scmType = scm.cvs; - }; - F9D167E40610239A0027C147 = { - indexTemplatePath = ""; - isa = PBXCodeSenseManager; - usesDefaults = 1; - wantsCodeCompletion = 1; - wantsCodeCompletionAutoSuggestions = 1; - wantsCodeCompletionCaseSensitivity = 1; - wantsCodeCompletionListAlways = 1; - wantsCodeCompletionOnlyMatchingItems = 1; - wantsCodeCompletionParametersIncluded = 1; - wantsCodeCompletionPlaceholdersInserted = 1; - wantsCodeCompletionTabCompletes = 1; - wantsIndex = 1; - }; -} diff --git a/macosx/Tcl.pbproj/project.pbxproj b/macosx/Tcl.pbproj/project.pbxproj deleted file mode 100644 index e284063..0000000 --- a/macosx/Tcl.pbproj/project.pbxproj +++ /dev/null @@ -1,1539 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 39; - objects = { - 00E2F845016E82EB0ACA28DC = { - buildSettings = { - }; - buildStyles = ( - 00E2F847016E82EB0ACA28DC, - 00E2F848016E82EB0ACA28DC, - ); - hasScannedForEncodings = 1; - isa = PBXProject; - mainGroup = 00E2F846016E82EB0ACA28DC; - productRefGroup = 00E2F84A016E8A830ACA28DC; - projectDirPath = ""; - targets = ( - 00E2F84C016E8B780ACA28DC, - ); - }; - 00E2F846016E82EB0ACA28DC = { - children = ( - F5306CA003CAC9AE016F146B, - F5306C9F03CAC979016F146B, - F5C88655017D604601DC9062, - F5F24FEE016ED0DF01DC9062, - 00E2F855016E922C0ACA28DC, - 00E2F857016E92B00ACA28DC, - 00E2F85A016E92B00ACA28DC, - 00E2F84A016E8A830ACA28DC, - ); - isa = PBXGroup; - refType = 4; - sourceTree = ""; - }; - 00E2F847016E82EB0ACA28DC = { - buildSettings = { - MAKE_TARGET = develop; - }; - isa = PBXBuildStyle; - name = Development; - }; - 00E2F848016E82EB0ACA28DC = { - buildSettings = { - MAKE_TARGET = deploy; - }; - isa = PBXBuildStyle; - name = Deployment; - }; - 00E2F84A016E8A830ACA28DC = { - children = ( - F53ACC73031DA405016F146B, - F53ACC5C031D9D11016F146B, - F9A61C9D04C2B4E3006F5A0B, - ); - isa = PBXGroup; - name = Products; - refType = 4; - sourceTree = ""; - }; - 00E2F84C016E8B780ACA28DC = { - buildArgumentsString = "-c \"cd \\\"${TCL_SRCROOT}/macosx\\\" && ACTION=${ACTION} && CFLAGS=\\\"${CFLAGS}\\\" gnumake \\${ACTION:+\\${ACTION/clean/distclean}-}${MAKE_TARGET} INSTALL_ROOT=\\\"${DSTROOT}\\\" INSTALL_PATH=\\\"${INSTALL_PATH}\\\" PREFIX=\\\"${PREFIX}\\\" BINDIR=\\\"${BINDIR}\\\" MANDIR=\\\"${MANDIR}\\\" \\${EXTRA_MAKE_FLAGS} ${ALL_SETTINGS}\""; - buildPhases = ( - ); - buildSettings = { - BINDIR = "${PREFIX}/bin"; - CFLAGS = ""; - INSTALL_PATH = /Library/Frameworks; - MANDIR = "${PREFIX}/man"; - PREFIX = /usr/local; - PRODUCT_NAME = Tcl; - TCL_SRCROOT = "${SRCROOT}/../../tcl"; - TEMP_DIR = "${PROJECT_TEMP_DIR}"; - }; - buildToolPath = /bin/bash; - buildWorkingDirectory = "${SRCROOT}"; - dependencies = ( - ); - isa = PBXLegacyTarget; - name = Tcl; - passBuildSettingsInEnvironment = 0; - productName = Tcl; - }; - 00E2F854016E922C0ACA28DC = { - children = ( - F5F24F87016ECAFC01DC9062, - F5F24F88016ECAFC01DC9062, - F5F24F89016ECAFC01DC9062, - F5F24F8A016ECAFC01DC9062, - F5F24F8B016ECAFC01DC9062, - F5F24F8C016ECAFC01DC9062, - F5F24F8D016ECAFC01DC9062, - F5F24F8E016ECAFC01DC9062, - F5F24F8F016ECAFC01DC9062, - F5F24F90016ECAFC01DC9062, - F5F24F91016ECAFC01DC9062, - F5F24F92016ECAFC01DC9062, - F5F24F93016ECAFC01DC9062, - F5F24F94016ECAFC01DC9062, - F5F24F95016ECAFC01DC9062, - F5F24F96016ECAFC01DC9062, - F5F24F97016ECAFC01DC9062, - F5F24F98016ECAFC01DC9062, - F5F24F99016ECAFC01DC9062, - F5F24F9A016ECAFC01DC9062, - F5F24F9B016ECAFC01DC9062, - F5F24F9C016ECAFC01DC9062, - F5F24F9D016ECAFC01DC9062, - F5F24F9E016ECAFC01DC9062, - F5F24F9F016ECAFC01DC9062, - F5F24FA0016ECAFC01DC9062, - F5F24FA1016ECAFC01DC9062, - F5F24FA2016ECAFC01DC9062, - F5F24FA3016ECAFC01DC9062, - F5F24FA4016ECAFC01DC9062, - F5F24FA5016ECAFC01DC9062, - F5F24FA6016ECAFC01DC9062, - F5F24FA7016ECAFC01DC9062, - F5F24FA8016ECAFC01DC9062, - F5F24FA9016ECAFC01DC9062, - F5F24FAA016ECAFC01DC9062, - F5F24FAB016ECAFC01DC9062, - F5F24FAC016ECAFC01DC9062, - F5F24FAD016ECAFC01DC9062, - F5F24FAE016ECAFC01DC9062, - F5F24FAF016ECAFC01DC9062, - F5F24FB0016ECAFC01DC9062, - F5F24FB1016ECAFC01DC9062, - F5F24FB2016ECAFC01DC9062, - F5F24FB3016ECAFC01DC9062, - F5F24FB4016ECAFC01DC9062, - F5F24FB5016ECAFC01DC9062, - F5F24FB6016ECAFC01DC9062, - F5F24FB7016ECAFC01DC9062, - F5F24FB8016ECAFC01DC9062, - F5F24FB9016ECAFC01DC9062, - F5F24FBA016ECAFC01DC9062, - F9FED5C7047C7D1B006F146B, - F5F24FBB016ECAFC01DC9062, - F5F24FD3016ECB4901DC9062, - F5F24FBC016ECAFC01DC9062, - F5F24FBD016ECAFC01DC9062, - F5F24FBE016ECAFC01DC9062, - F5F24FBF016ECAFC01DC9062, - F5F24FC0016ECAFC01DC9062, - F5F24FC1016ECAFC01DC9062, - F5F24FC2016ECAFC01DC9062, - F5F24FC3016ECAFC01DC9062, - F5F24FC4016ECAFC01DC9062, - F5F24FC5016ECAFC01DC9062, - F5F24FC6016ECAFC01DC9062, - F5F24FC7016ECAFC01DC9062, - F5F24FC8016ECAFC01DC9062, - F5F24FC9016ECAFC01DC9062, - F5F24FCA016ECAFC01DC9062, - F5F24FCB016ECAFC01DC9062, - F5F24FCC016ECAFC01DC9062, - F5F24FCD016ECAFC01DC9062, - F5F24FCE016ECAFC01DC9062, - F5F24FCF016ECAFC01DC9062, - F5F24FD0016ECAFC01DC9062, - ); - isa = PBXGroup; - name = Sources; - path = ""; - refType = 4; - sourceTree = ""; - }; - 00E2F855016E922C0ACA28DC = { - children = ( - 00E2F856016E92B00ACA28DC, - 00E2F854016E922C0ACA28DC, - ); - isa = PBXGroup; - name = generic; - refType = 4; - sourceTree = ""; - }; - 00E2F856016E92B00ACA28DC = { - children = ( - F5F24F6B016ECAA401DC9062, - F5F24F6C016ECAA401DC9062, - F5F24F6D016ECAA401DC9062, - F5F24F6E016ECAA401DC9062, - F5F24F6F016ECAA401DC9062, - F5F24F70016ECAA401DC9062, - F5F24F72016ECAA401DC9062, - F5F24F73016ECAA401DC9062, - F5F24F74016ECAA401DC9062, - F5F24F75016ECAA401DC9062, - F5F24F77016ECAA401DC9062, - F5F24F78016ECAA401DC9062, - F5F24FD1016ECB1E01DC9062, - F5F24FD2016ECB1E01DC9062, - ); - isa = PBXGroup; - name = Headers; - refType = 4; - sourceTree = ""; - }; - 00E2F857016E92B00ACA28DC = { - children = ( - 00E2F858016E92B00ACA28DC, - 00E2F859016E92B00ACA28DC, - ); - isa = PBXGroup; - name = macosx; - refType = 4; - sourceTree = ""; - }; - 00E2F858016E92B00ACA28DC = { - children = ( - ); - isa = PBXGroup; - name = Headers; - refType = 4; - sourceTree = ""; - }; - 00E2F859016E92B00ACA28DC = { - children = ( - F5A1836F018242A501DC9062, - F9FED5C6047C7CEC006F146B, - ); - isa = PBXGroup; - name = Sources; - refType = 4; - sourceTree = ""; - }; - 00E2F85A016E92B00ACA28DC = { - children = ( - 00E2F85B016E92B00ACA28DC, - 00E2F85C016E92B00ACA28DC, - ); - isa = PBXGroup; - name = unix; - refType = 4; - sourceTree = ""; - }; - 00E2F85B016E92B00ACA28DC = { - children = ( - F5F24FD6016ECC0F01DC9062, - F5F24FD7016ECC0F01DC9062, - ); - isa = PBXGroup; - name = Headers; - refType = 4; - sourceTree = ""; - }; - 00E2F85C016E92B00ACA28DC = { - children = ( - F5F24FD8016ECC0F01DC9062, - F5F24FD9016ECC0F01DC9062, - F5F24FDB016ECC0F01DC9062, - F5F24FDC016ECC0F01DC9062, - F5F24FDD016ECC0F01DC9062, - F5F24FDE016ECC0F01DC9062, - F5F24FDF016ECC0F01DC9062, - F5F24FE0016ECC0F01DC9062, - F5F24FE1016ECC0F01DC9062, - F5F24FE2016ECC0F01DC9062, - F5F24FE3016ECC0F01DC9062, - F5F24FE4016ECC0F01DC9062, - F5F24FE5016ECC0F01DC9062, - F5F24FE6016ECC0F01DC9062, - F5F24FE7016ECC0F01DC9062, - ); - isa = PBXGroup; - name = Sources; - refType = 4; - sourceTree = ""; - }; -//000 -//001 -//002 -//003 -//004 -//F50 -//F51 -//F52 -//F53 -//F54 - F5306C9F03CAC979016F146B = { - children = ( - F5306CA303CAC9DE016F146B, - F5306CA103CAC9DE016F146B, - F5306CA203CAC9DE016F146B, - ); - isa = PBXGroup; - name = "Build System"; - refType = 4; - sourceTree = ""; - }; - F5306CA003CAC9AE016F146B = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = text; - name = ChangeLog; - path = ../ChangeLog; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5306CA103CAC9DE016F146B = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = text.script.sh; - name = configure.in; - path = ../unix/configure.in; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5306CA203CAC9DE016F146B = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = text; - name = Makefile.in; - path = ../unix/Makefile.in; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5306CA303CAC9DE016F146B = { - isa = PBXFileReference; - lastKnownFileType = text; - name = tcl.m4; - path = ../unix/tcl.m4; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F53ACC5C031D9D11016F146B = { - isa = PBXFileReference; - lastKnownFileType = "compiled.mach-o.executable"; - path = tclsh8.6; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F53ACC73031DA405016F146B = { - isa = PBXFileReference; - lastKnownFileType = "compiled.mach-o.executable"; - path = tcltest; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F5A1836F018242A501DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = tclMacOSXBundle.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5C88655017D604601DC9062 = { - children = ( - F5C88656017D604601DC9062, - F5C88657017D60C901DC9062, - F5C88658017D60C901DC9062, - ); - isa = PBXGroup; - name = "Header Tools"; - refType = 4; - sourceTree = ""; - }; - F5C88656017D604601DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = genStubs.tcl; - path = ../tools/genStubs.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5C88657017D60C901DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = tcl.decls; - path = ../generic/tcl.decls; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5C88658017D60C901DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = tclInt.decls; - path = ../generic/tclInt.decls; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F6B016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = regcustom.h; - path = ../generic/regcustom.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F6C016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = regerrs.h; - path = ../generic/regerrs.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F6D016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = regguts.h; - path = ../generic/regguts.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F6E016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tcl.h; - path = ../generic/tcl.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F6F016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclCompile.h; - path = ../generic/tclCompile.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F70016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclDecls.h; - path = ../generic/tclDecls.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F72016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclInt.h; - path = ../generic/tclInt.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F73016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclIntDecls.h; - path = ../generic/tclIntDecls.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F74016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclIntPlatDecls.h; - path = ../generic/tclIntPlatDecls.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F75016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclIO.h; - path = ../generic/tclIO.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F77016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclPlatDecls.h; - path = ../generic/tclPlatDecls.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F78016ECAA401DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclRegexp.h; - path = ../generic/tclRegexp.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F87016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regc_color.c; - path = ../generic/regc_color.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F88016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regc_cvec.c; - path = ../generic/regc_cvec.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F89016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regc_lex.c; - path = ../generic/regc_lex.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F8A016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regc_locale.c; - path = ../generic/regc_locale.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F8B016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regc_nfa.c; - path = ../generic/regc_nfa.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F8C016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regcomp.c; - path = ../generic/regcomp.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F8D016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = rege_dfa.c; - path = ../generic/rege_dfa.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F8E016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regerror.c; - path = ../generic/regerror.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F8F016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regexec.c; - path = ../generic/regexec.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F90016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regfree.c; - path = ../generic/regfree.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F91016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = regfronts.c; - path = ../generic/regfronts.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F92016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclAlloc.c; - path = ../generic/tclAlloc.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F93016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclAsync.c; - path = ../generic/tclAsync.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F94016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclBasic.c; - path = ../generic/tclBasic.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F95016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclBinary.c; - path = ../generic/tclBinary.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F96016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclCkalloc.c; - path = ../generic/tclCkalloc.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F97016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclClock.c; - path = ../generic/tclClock.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F98016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclCmdAH.c; - path = ../generic/tclCmdAH.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F99016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclCmdIL.c; - path = ../generic/tclCmdIL.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F9A016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclCmdMZ.c; - path = ../generic/tclCmdMZ.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F9B016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclCompCmds.c; - path = ../generic/tclCompCmds.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F9C016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclCompExpr.c; - path = ../generic/tclCompExpr.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F9D016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclCompile.c; - path = ../generic/tclCompile.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F9E016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclDate.c; - path = ../generic/tclDate.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24F9F016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclEncoding.c; - path = ../generic/tclEncoding.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA0016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclEnv.c; - path = ../generic/tclEnv.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA1016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclEvent.c; - path = ../generic/tclEvent.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA2016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclExecute.c; - path = ../generic/tclExecute.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA3016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclFCmd.c; - path = ../generic/tclFCmd.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA4016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclFileName.c; - path = ../generic/tclFileName.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA5016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclGet.c; - path = ../generic/tclGet.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA6016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclHash.c; - path = ../generic/tclHash.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA7016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclHistory.c; - path = ../generic/tclHistory.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA8016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclIndexObj.c; - path = ../generic/tclIndexObj.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FA9016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclInterp.c; - path = ../generic/tclInterp.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FAA016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclIO.c; - path = ../generic/tclIO.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FAB016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclIOCmd.c; - path = ../generic/tclIOCmd.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FAC016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclIOGT.c; - path = ../generic/tclIOGT.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FAD016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclIOSock.c; - path = ../generic/tclIOSock.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FAE016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclIOUtil.c; - path = ../generic/tclIOUtil.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FAF016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclLink.c; - path = ../generic/tclLink.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB0016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclListObj.c; - path = ../generic/tclListObj.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB1016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclLiteral.c; - path = ../generic/tclLiteral.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB2016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclLoad.c; - path = ../generic/tclLoad.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB3016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclLoadNone.c; - path = ../generic/tclLoadNone.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB4016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclMain.c; - path = ../generic/tclMain.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB5016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclNamesp.c; - path = ../generic/tclNamesp.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB6016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclNotify.c; - path = ../generic/tclNotify.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB7016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclObj.c; - path = ../generic/tclObj.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB8016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclPanic.c; - path = ../generic/tclPanic.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FB9016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclParse.c; - path = ../generic/tclParse.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FBA016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclParseExpr.c; - path = ../generic/tclParseExpr.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FBB016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclPipe.c; - path = ../generic/tclPipe.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FBC016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclPosixStr.c; - path = ../generic/tclPosixStr.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FBD016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclPreserve.c; - path = ../generic/tclPreserve.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FBE016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclProc.c; - path = ../generic/tclProc.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FBF016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclRegexp.c; - path = ../generic/tclRegexp.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC0016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclResolve.c; - path = ../generic/tclResolve.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC1016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclResult.c; - path = ../generic/tclResult.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC2016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclScan.c; - path = ../generic/tclScan.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC3016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclStringObj.c; - path = ../generic/tclStringObj.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC4016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclStubInit.c; - path = ../generic/tclStubInit.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC5016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclStubLib.c; - path = ../generic/tclStubLib.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC6016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclTest.c; - path = ../generic/tclTest.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC7016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclTestObj.c; - path = ../generic/tclTestObj.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC8016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclTestProcBodyObj.c; - path = ../generic/tclTestProcBodyObj.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FC9016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclThread.c; - path = ../generic/tclThread.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FCA016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclThreadJoin.c; - path = ../generic/tclThreadJoin.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FCB016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclThreadTest.c; - path = ../generic/tclThreadTest.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FCC016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclTimer.c; - path = ../generic/tclTimer.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FCD016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUniData.c; - path = ../generic/tclUniData.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FCE016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUtf.c; - path = ../generic/tclUtf.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FCF016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUtil.c; - path = ../generic/tclUtil.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD0016ECAFC01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclVar.c; - path = ../generic/tclVar.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD1016ECB1E01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = regex.h; - path = ../generic/regex.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD2016ECB1E01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclPort.h; - path = ../generic/tclPort.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD3016ECB4901DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclPkg.c; - path = ../generic/tclPkg.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD6016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclUnixPort.h; - path = ../unix/tclUnixPort.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD7016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = tclUnixThrd.h; - path = ../unix/tclUnixThrd.h; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD8016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclAppInit.c; - path = ../unix/tclAppInit.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FD9016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclLoadDyld.c; - path = ../unix/tclLoadDyld.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FDB016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixChan.c; - path = ../unix/tclUnixChan.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FDC016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixEvent.c; - path = ../unix/tclUnixEvent.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FDD016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixFCmd.c; - path = ../unix/tclUnixFCmd.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FDE016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixFile.c; - path = ../unix/tclUnixFile.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FDF016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixInit.c; - path = ../unix/tclUnixInit.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE0016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixNotfy.c; - path = ../unix/tclUnixNotfy.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE1016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixPipe.c; - path = ../unix/tclUnixPipe.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE2016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixSock.c; - path = ../unix/tclUnixSock.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE3016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixTest.c; - path = ../unix/tclUnixTest.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE4016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixThrd.c; - path = ../unix/tclUnixThrd.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE5016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclUnixTime.c; - path = ../unix/tclUnixTime.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE6016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclXtNotify.c; - path = ../unix/tclXtNotify.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FE7016ECC0F01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclXtTest.c; - path = ../unix/tclXtTest.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FEE016ED0DF01DC9062 = { - children = ( - F5F24FEF016ED0DF01DC9062, - F5F24FF0016ED0DF01DC9062, - F5F24FF3016ED0DF01DC9062, - F5F24FF4016ED0DF01DC9062, - F5F24FF5016ED0DF01DC9062, - F5F24FF6016ED0DF01DC9062, - F5F24FFA016ED0DF01DC9062, - F5F24FFC016ED0DF01DC9062, - F5F24FFE016ED0DF01DC9062, - F5F25001016ED0DF01DC9062, - F5F25002016ED0DF01DC9062, - F5F25003016ED0DF01DC9062, - F5F25005016ED0DF01DC9062, - F5F25007016ED0DF01DC9062, - F5F25008016ED0DF01DC9062, - F5F2500A016ED0DF01DC9062, - ); - isa = PBXGroup; - name = Scripts; - refType = 4; - sourceTree = ""; - }; - F5F24FEF016ED0DF01DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = auto.tcl; - path = ../library/auto.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FF0016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = dde; - path = ../library/dde; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FF3016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = encoding; - path = ../library/encoding; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FF4016ED0DF01DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = history.tcl; - path = ../library/history.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FF5016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = http; - path = ../library/http; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FF6016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = http1.0; - path = ../library/http1.0; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FFA016ED0DF01DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = init.tcl; - path = ../library/init.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FFC016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = msgcat; - path = ../library/msgcat; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F24FFE016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = opt; - path = ../library/opt; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F25001016ED0DF01DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = package.tcl; - path = ../library/package.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F25002016ED0DF01DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = parray.tcl; - path = ../library/parray.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F25003016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = reg; - path = ../library/reg; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F25005016ED0DF01DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = safe.tcl; - path = ../library/safe.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F25007016ED0DF01DC9062 = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = text; - name = tclIndex; - path = ../library/tclIndex; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F25008016ED0DF01DC9062 = { - includeInIndex = 0; - isa = PBXFileReference; - lastKnownFileType = folder; - name = tcltest; - path = ../library/tcltest; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - F5F2500A016ED0DF01DC9062 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = word.tcl; - path = ../library/word.tcl; - refType = 2; - sourceTree = SOURCE_ROOT; - }; -//F50 -//F51 -//F52 -//F53 -//F54 -//F90 -//F91 -//F92 -//F93 -//F94 - F9A61C9D04C2B4E3006F5A0B = { - explicitFileType = wrapper.framework; - isa = PBXFileReference; - path = Tcl.framework; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F9FED5C6047C7CEC006F146B = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = tclMacOSXFCmd.c; - refType = 4; - sourceTree = ""; - }; - F9FED5C7047C7D1B006F146B = { - fileEncoding = 5; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - name = tclPathObj.c; - path = ../generic/tclPathObj.c; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - }; - rootObject = 00E2F845016E82EB0ACA28DC; -} diff --git a/macosx/Tcl.xcode/default.pbxuser b/macosx/Tcl.xcode/default.pbxuser index 5c67540..22ffa9e 100644 --- a/macosx/Tcl.xcode/default.pbxuser +++ b/macosx/Tcl.xcode/default.pbxuser @@ -10,11 +10,10 @@ F944EB8F08F798100049FDD4 /* tcltest */, ); perUserDictionary = { - com.apple.ide.smrt.PBXUserSmartGroupsKey.Rev10 = <040b747970656473747265616d8103e88401408484840e4e534d757461626c654172726179008484074e534172726179008484084e534f626a65637400858401690192848484134e534d757461626c6544696374696f6e6172790084840c4e5344696374696f6e6172790095960792848484084e53537472696e67019584012b146162736f6c75746550617468546f42756e646c658692849a9a008692849a9a046e616d658692849a9a14496d706c656d656e746174696f6e2046696c65738692849a9a03636c7a8692849a9a1550425846696c656e616d65536d61727447726f75708692849a9a0b6465736372697074696f6e8692849a9a103c6e6f206465736372697074696f6e3e8692849a9a08676c6f62616c49448692849a9a183143433045413430303433353045463930303434343130428692849a9a195042585472616e7369656e744c6f636174696f6e4174546f708692849a9a06626f74746f6d8692849a9a0b707265666572656e63657386928497960892849a9a1250425850726f6a65637453636f70654b65798692849a9a035945538692849a9a05696d6167658692849a9a0b536d617274466f6c6465728692849a9a0763616e536176658692848484084e534e756d626572008484074e5356616c7565009584012a849696018692849a9a0572656765788692849a9a065c2e286329248692849a9a04726f6f748692849a9a093c50524f4a4543543e8692849a9a097265637572736976658692ad92849a9a0669734c656166869284ae9db096008692849a9a07666e6d617463688692849a9a0086868686>; + com.apple.ide.smrt.PBXUserSmartGroupsKey.Rev10 = <040b73747265616d747970656481e8038401408484840e4e534d757461626c654172726179008484074e534172726179008484084e534f626a65637400858401690192848484134e534d757461626c6544696374696f6e6172790084840c4e5344696374696f6e6172790095960792848484084e53537472696e67019584012b046e616d658692849a9a14496d706c656d656e746174696f6e2046696c65738692849a9a146162736f6c75746550617468546f42756e646c658692849a9a008692849a9a195042585472616e7369656e744c6f636174696f6e4174546f708692849a9a06626f74746f6d8692849a9a03636c7a8692849a9a1550425846696c656e616d65536d61727447726f75708692849a9a0b6465736372697074696f6e8692849a9a103c6e6f206465736372697074696f6e3e8692849a9a0b707265666572656e63657386928497960892849a9a07666e6d617463688692849a9a008692849a9a05696d6167658692849a9a0b536d617274466f6c6465728692849a9a04726f6f748692849a9a093c50524f4a4543543e8692849a9a0572656765788692849a9a065c2e286329248692849a9a097265637572736976658692848484084e534e756d626572008484074e5356616c7565009584012a849696018692849a9a0669734c656166869284b09db296008692849a9a0763616e536176658692af92849a9a1250425850726f6a65637453636f70654b65798692849a9a03594553868692849a9a08676c6f62616c49448692849a9a18314343304541343030343335304546393030343434313042868686>; }; sourceControlManager = F944EB9C08F798180049FDD4 /* Source Control */; userBuildSettings = { - GCC = "${DEVELOPER_DIR}/usr/bin/gcc"; SYMROOT = "${SRCROOT}/../../build/tcl"; TCL_SRCROOT = "${SRCROOT}/../../tcl"; }; @@ -27,7 +26,6 @@ }; F944EB8F08F798100049FDD4 /* tcltest */ = { isa = PBXExecutable; - activeArgIndex = 2147483647; activeArgIndices = ( NO, NO, @@ -39,6 +37,7 @@ "-verbose \"bet\"", ); autoAttachOnCrash = 1; + breakpointsEnabled = 1; configStateDict = { "PBXLSLaunchAction-0" = { PBXLSLaunchAction = 0; @@ -128,7 +127,10 @@ scmConfiguration = { CVSToolPath = /usr/bin/cvs; CVSUseSSH = NO; - SubversionToolPath = /usr/local/bin/svn; + SubversionToolPath = /usr/bin/svn; + repositoryNamesForRoots = { + .. = ""; + }; }; scmType = scm.cvs; }; @@ -147,12 +149,12 @@ }; F9E61D1C090A4282002B3151 /* tclsh */ = { isa = PBXExecutable; - activeArgIndex = 2147483647; activeArgIndices = ( ); argumentStrings = ( ); autoAttachOnCrash = 1; + breakpointsEnabled = 1; configStateDict = { "PBXLSLaunchAction-0" = { PBXLSLaunchAction = 0; diff --git a/macosx/Tcl.xcode/project.pbxproj b/macosx/Tcl.xcode/project.pbxproj index bfa915f..37bf6c1 100644 --- a/macosx/Tcl.xcode/project.pbxproj +++ b/macosx/Tcl.xcode/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 42; + objectVersion = 45; objects = { /* Begin PBXBuildFile section */ @@ -148,7 +148,7 @@ F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; }; F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; }; F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; }; - F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; }; + F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445F08F272B9004A47F5 /* tclUnixChan.c */; }; F96D4ACB08F272C9004A47F5 /* tclUnixEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446008F272B9004A47F5 /* tclUnixEvent.c */; }; F96D4ACC08F272C9004A47F5 /* tclUnixFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446108F272B9004A47F5 /* tclUnixFCmd.c */; }; @@ -171,6 +171,7 @@ F9E61D30090A48E2002B3151 /* bn_mp_to_unsigned_bin_n.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */; }; F9E61D31090A48F9002B3151 /* bn_mp_to_unsigned_bin.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */; }; F9E61D32090A48FA002B3151 /* bn_mp_unsigned_bin_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */; }; + F9F4415E0C8BAE6F00BCCD67 /* tclDTrace.d in Sources */ = {isa = PBXBuildFile; fileRef = F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */; }; F9FC77B80AB29E9100B7077D /* tclUnixCompat.c in Sources */ = {isa = PBXBuildFile; fileRef = F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */; }; /* End PBXBuildFile section */ @@ -193,10 +194,8 @@ F9183E6A0EFC81560030B814 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; F9183E8F0EFC817B0030B814 /* tdbc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tdbc; sourceTree = ""; }; F91DC23C0E44C51B002CB8D1 /* nre.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = nre.test; sourceTree = ""; }; - F91DC23D0E44C530002CB8D1 /* unsupported.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unsupported.test; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; F92D7F100DE777240033A13A /* tsdPerf.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tsdPerf.tcl; sourceTree = ""; }; - F92D7F140DE777670033A13A /* tsdPerf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsdPerf.c; sourceTree = ""; }; F93599B20DF1F75400E04F67 /* tclOO.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOO.c; sourceTree = ""; }; F93599B40DF1F75900E04F67 /* tclOO.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclOO.decls; sourceTree = ""; }; F93599B50DF1F75D00E04F67 /* tclOO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOO.h; sourceTree = ""; }; @@ -220,6 +219,7 @@ F93599D60DF1F95000E04F67 /* next.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = next.n; sourceTree = ""; }; F93599D70DF1F96800E04F67 /* object.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = object.n; sourceTree = ""; }; F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = ""; }; + F946FB8B0FBE3AED00CD6495 /* itcl */ = {isa = PBXFileReference; lastKnownFileType = folder; path = itcl; sourceTree = ""; }; F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORTrans.c; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = ""; }; F96437C90EF0D4B2003F468E /* tclZlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclZlib.c; sourceTree = ""; }; @@ -558,18 +558,10 @@ F96D402208F272AA004A47F5 /* tcltest.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tcltest.tcl; sourceTree = ""; }; F96D402308F272AA004A47F5 /* tm.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tm.tcl; sourceTree = ""; }; F96D425B08F272B2004A47F5 /* word.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = word.tcl; sourceTree = ""; }; - F96D425F08F272B3004A47F5 /* bn.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = bn.pdf; sourceTree = ""; }; - F96D426108F272B3004A47F5 /* bn_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_error.c; sourceTree = ""; }; - F96D426208F272B3004A47F5 /* bn_fast_mp_invmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_mp_invmod.c; sourceTree = ""; }; - F96D426308F272B3004A47F5 /* bn_fast_mp_montgomery_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_mp_montgomery_reduce.c; sourceTree = ""; }; F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_mul_digs.c; sourceTree = ""; }; - F96D426508F272B3004A47F5 /* bn_fast_s_mp_mul_high_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_mul_high_digs.c; sourceTree = ""; }; F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_sqr.c; sourceTree = ""; }; - F96D426708F272B3004A47F5 /* bn_mp_2expt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_2expt.c; sourceTree = ""; }; - F96D426808F272B3004A47F5 /* bn_mp_abs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_abs.c; sourceTree = ""; }; F96D426908F272B3004A47F5 /* bn_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_add.c; sourceTree = ""; }; F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_add_d.c; sourceTree = ""; }; - F96D426B08F272B3004A47F5 /* bn_mp_addmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_addmod.c; sourceTree = ""; }; F96D426C08F272B3004A47F5 /* bn_mp_and.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_and.c; sourceTree = ""; }; F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_clamp.c; sourceTree = ""; }; F96D426E08F272B3004A47F5 /* bn_mp_clear.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_clear.c; sourceTree = ""; }; @@ -577,7 +569,6 @@ F96D427008F272B3004A47F5 /* bn_mp_cmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp.c; sourceTree = ""; }; F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp_d.c; sourceTree = ""; }; F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp_mag.c; sourceTree = ""; }; - F96D427308F272B3004A47F5 /* bn_mp_cnt_lsb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cnt_lsb.c; sourceTree = ""; }; F96D427408F272B3004A47F5 /* bn_mp_copy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_copy.c; sourceTree = ""; }; F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_count_bits.c; sourceTree = ""; }; F96D427608F272B3004A47F5 /* bn_mp_div.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div.c; sourceTree = ""; }; @@ -585,104 +576,49 @@ F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_2d.c; sourceTree = ""; }; F96D427908F272B3004A47F5 /* bn_mp_div_3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_3.c; sourceTree = ""; }; F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_d.c; sourceTree = ""; }; - F96D427B08F272B3004A47F5 /* bn_mp_dr_is_modulus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_dr_is_modulus.c; sourceTree = ""; }; - F96D427C08F272B3004A47F5 /* bn_mp_dr_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_dr_reduce.c; sourceTree = ""; }; - F96D427D08F272B3004A47F5 /* bn_mp_dr_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_dr_setup.c; sourceTree = ""; }; F96D427E08F272B3004A47F5 /* bn_mp_exch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exch.c; sourceTree = ""; }; F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_expt_d.c; sourceTree = ""; }; - F96D428008F272B3004A47F5 /* bn_mp_exptmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exptmod.c; sourceTree = ""; }; - F96D428108F272B3004A47F5 /* bn_mp_exptmod_fast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exptmod_fast.c; sourceTree = ""; }; - F96D428208F272B3004A47F5 /* bn_mp_exteuclid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exteuclid.c; sourceTree = ""; }; - F96D428308F272B3004A47F5 /* bn_mp_fread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_fread.c; sourceTree = ""; }; - F96D428408F272B3004A47F5 /* bn_mp_fwrite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_fwrite.c; sourceTree = ""; }; - F96D428508F272B3004A47F5 /* bn_mp_gcd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_gcd.c; sourceTree = ""; }; - F96D428608F272B3004A47F5 /* bn_mp_get_int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_get_int.c; sourceTree = ""; }; F96D428708F272B3004A47F5 /* bn_mp_grow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_grow.c; sourceTree = ""; }; F96D428808F272B3004A47F5 /* bn_mp_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init.c; sourceTree = ""; }; F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_copy.c; sourceTree = ""; }; F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_multi.c; sourceTree = ""; }; F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_set.c; sourceTree = ""; }; - F96D428C08F272B3004A47F5 /* bn_mp_init_set_int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_set_int.c; sourceTree = ""; }; F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_size.c; sourceTree = ""; }; - F96D428E08F272B3004A47F5 /* bn_mp_invmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_invmod.c; sourceTree = ""; }; - F96D428F08F272B3004A47F5 /* bn_mp_invmod_slow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_invmod_slow.c; sourceTree = ""; }; - F96D429008F272B3004A47F5 /* bn_mp_is_square.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_is_square.c; sourceTree = ""; }; - F96D429108F272B3004A47F5 /* bn_mp_jacobi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_jacobi.c; sourceTree = ""; }; F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_karatsuba_mul.c; sourceTree = ""; }; F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_karatsuba_sqr.c; sourceTree = ""; }; - F96D429408F272B3004A47F5 /* bn_mp_lcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_lcm.c; sourceTree = ""; }; F96D429508F272B3004A47F5 /* bn_mp_lshd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_lshd.c; sourceTree = ""; }; F96D429608F272B3004A47F5 /* bn_mp_mod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod.c; sourceTree = ""; }; F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod_2d.c; sourceTree = ""; }; - F96D429808F272B3004A47F5 /* bn_mp_mod_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod_d.c; sourceTree = ""; }; - F96D429908F272B3004A47F5 /* bn_mp_montgomery_calc_normalization.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_montgomery_calc_normalization.c; sourceTree = ""; }; - F96D429A08F272B3004A47F5 /* bn_mp_montgomery_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_montgomery_reduce.c; sourceTree = ""; }; - F96D429B08F272B3004A47F5 /* bn_mp_montgomery_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_montgomery_setup.c; sourceTree = ""; }; F96D429C08F272B3004A47F5 /* bn_mp_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul.c; sourceTree = ""; }; F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_2.c; sourceTree = ""; }; F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_2d.c; sourceTree = ""; }; F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_d.c; sourceTree = ""; }; - F96D42A008F272B3004A47F5 /* bn_mp_mulmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mulmod.c; sourceTree = ""; }; - F96D42A108F272B3004A47F5 /* bn_mp_n_root.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_n_root.c; sourceTree = ""; }; F96D42A208F272B3004A47F5 /* bn_mp_neg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_neg.c; sourceTree = ""; }; F96D42A308F272B3004A47F5 /* bn_mp_or.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_or.c; sourceTree = ""; }; - F96D42A408F272B3004A47F5 /* bn_mp_prime_fermat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_fermat.c; sourceTree = ""; }; - F96D42A508F272B3004A47F5 /* bn_mp_prime_is_divisible.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_is_divisible.c; sourceTree = ""; }; - F96D42A608F272B3004A47F5 /* bn_mp_prime_is_prime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_is_prime.c; sourceTree = ""; }; - F96D42A708F272B3004A47F5 /* bn_mp_prime_miller_rabin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_miller_rabin.c; sourceTree = ""; }; - F96D42A808F272B3004A47F5 /* bn_mp_prime_next_prime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_next_prime.c; sourceTree = ""; }; - F96D42A908F272B3004A47F5 /* bn_mp_prime_rabin_miller_trials.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_rabin_miller_trials.c; sourceTree = ""; }; - F96D42AA08F272B3004A47F5 /* bn_mp_prime_random_ex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_random_ex.c; sourceTree = ""; }; F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_radix_size.c; sourceTree = ""; }; F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_radix_smap.c; sourceTree = ""; }; - F96D42AD08F272B3004A47F5 /* bn_mp_rand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_rand.c; sourceTree = ""; }; F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_read_radix.c; sourceTree = ""; }; - F96D42AF08F272B3004A47F5 /* bn_mp_read_signed_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_read_signed_bin.c; sourceTree = ""; }; - F96D42B008F272B3004A47F5 /* bn_mp_read_unsigned_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_read_unsigned_bin.c; sourceTree = ""; }; - F96D42B108F272B3004A47F5 /* bn_mp_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce.c; sourceTree = ""; }; - F96D42B208F272B3004A47F5 /* bn_mp_reduce_2k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k.c; sourceTree = ""; }; - F96D42B308F272B3004A47F5 /* bn_mp_reduce_2k_l.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k_l.c; sourceTree = ""; }; - F96D42B408F272B3004A47F5 /* bn_mp_reduce_2k_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k_setup.c; sourceTree = ""; }; - F96D42B508F272B3004A47F5 /* bn_mp_reduce_2k_setup_l.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k_setup_l.c; sourceTree = ""; }; - F96D42B608F272B3004A47F5 /* bn_mp_reduce_is_2k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_is_2k.c; sourceTree = ""; }; - F96D42B708F272B3004A47F5 /* bn_mp_reduce_is_2k_l.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_is_2k_l.c; sourceTree = ""; }; - F96D42B808F272B3004A47F5 /* bn_mp_reduce_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_setup.c; sourceTree = ""; }; F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_rshd.c; sourceTree = ""; }; F96D42BA08F272B3004A47F5 /* bn_mp_set.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_set.c; sourceTree = ""; }; - F96D42BB08F272B3004A47F5 /* bn_mp_set_int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_set_int.c; sourceTree = ""; }; F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_shrink.c; sourceTree = ""; }; - F96D42BD08F272B3004A47F5 /* bn_mp_signed_bin_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_signed_bin_size.c; sourceTree = ""; }; F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqr.c; sourceTree = ""; }; - F96D42BF08F272B3004A47F5 /* bn_mp_sqrmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqrmod.c; sourceTree = ""; }; F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqrt.c; sourceTree = ""; }; F96D42C108F272B3004A47F5 /* bn_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sub.c; sourceTree = ""; }; F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sub_d.c; sourceTree = ""; }; - F96D42C308F272B3004A47F5 /* bn_mp_submod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_submod.c; sourceTree = ""; }; - F96D42C408F272B3004A47F5 /* bn_mp_to_signed_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_signed_bin.c; sourceTree = ""; }; - F96D42C508F272B3004A47F5 /* bn_mp_to_signed_bin_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_signed_bin_n.c; sourceTree = ""; }; F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_unsigned_bin.c; sourceTree = ""; }; F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_unsigned_bin_n.c; sourceTree = ""; }; F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toom_mul.c; sourceTree = ""; }; F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toom_sqr.c; sourceTree = ""; }; - F96D42CA08F272B3004A47F5 /* bn_mp_toradix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toradix.c; sourceTree = ""; }; F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toradix_n.c; sourceTree = ""; }; F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_unsigned_bin_size.c; sourceTree = ""; }; F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_xor.c; sourceTree = ""; }; F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_zero.c; sourceTree = ""; }; - F96D42CF08F272B3004A47F5 /* bn_prime_tab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_prime_tab.c; sourceTree = ""; }; F96D42D008F272B3004A47F5 /* bn_reverse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_reverse.c; sourceTree = ""; }; F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_add.c; sourceTree = ""; }; - F96D42D208F272B3004A47F5 /* bn_s_mp_exptmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_exptmod.c; sourceTree = ""; }; F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_digs.c; sourceTree = ""; }; - F96D42D408F272B3004A47F5 /* bn_s_mp_mul_high_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_high_digs.c; sourceTree = ""; }; F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sqr.c; sourceTree = ""; }; F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sub.c; sourceTree = ""; }; F96D42D708F272B3004A47F5 /* bncore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bncore.c; sourceTree = ""; }; - F96D42D908F272B3004A47F5 /* callgraph.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = callgraph.txt; sourceTree = ""; }; - F96D42DA08F272B3004A47F5 /* changes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = changes.txt; sourceTree = ""; }; - F96D42F008F272B3004A47F5 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - F96D431D08F272B4004A47F5 /* poster.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = poster.pdf; sourceTree = ""; }; - F96D432608F272B4004A47F5 /* tommath.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = tommath.pdf; sourceTree = ""; }; F96D432908F272B4004A47F5 /* tommath_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_class.h; sourceTree = ""; }; F96D432A08F272B4004A47F5 /* tommath_superclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_superclass.h; sourceTree = ""; }; F96D432B08F272B4004A47F5 /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = ""; }; @@ -736,7 +672,7 @@ F96D436E08F272B6004A47F5 /* get.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = get.test; sourceTree = ""; }; F96D436F08F272B6004A47F5 /* history.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = history.test; sourceTree = ""; }; F96D437008F272B6004A47F5 /* http.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http.test; sourceTree = ""; }; - F96D437108F272B6004A47F5 /* httpd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = httpd; sourceTree = ""; }; + F96D437108F272B6004A47F5 /* httpd */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd; sourceTree = ""; }; F96D437208F272B6004A47F5 /* httpold.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpold.test; sourceTree = ""; }; F96D437308F272B6004A47F5 /* if-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "if-old.test"; sourceTree = ""; }; F96D437408F272B6004A47F5 /* if.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = if.test; sourceTree = ""; }; @@ -849,10 +785,8 @@ F96D443108F272B8004A47F5 /* man2tcl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = man2tcl.c; sourceTree = ""; }; F96D443208F272B8004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; F96D443308F272B8004A47F5 /* regexpTestLib.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = regexpTestLib.tcl; sourceTree = ""; }; - F96D443408F272B8004A47F5 /* str2c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = str2c; sourceTree = ""; }; F96D443508F272B8004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = ""; }; F96D443608F272B8004A47F5 /* tcl.wse.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.wse.in; sourceTree = ""; }; - F96D443708F272B9004A47F5 /* tclmin.wse */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tclmin.wse; sourceTree = ""; }; F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "tcltk-man2html.tcl"; sourceTree = ""; }; F96D443A08F272B9004A47F5 /* tclZIC.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclZIC.tcl; sourceTree = ""; }; F96D443B08F272B9004A47F5 /* uniClass.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniClass.tcl; sourceTree = ""; }; @@ -940,6 +874,13 @@ F96D449808F272BA004A47F5 /* tclWinThrd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinThrd.c; sourceTree = ""; }; F96D449908F272BA004A47F5 /* tclWinThrd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclWinThrd.h; sourceTree = ""; }; F96D449A08F272BA004A47F5 /* tclWinTime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTime.c; sourceTree = ""; }; + F974D56C0FBE7D6300BF728B /* http11.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http11.test; sourceTree = ""; }; + F974D56D0FBE7D6300BF728B /* httpd11.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd11.tcl; sourceTree = ""; }; + F974D5720FBE7DC600BF728B /* coroutine.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = coroutine.n; sourceTree = ""; }; + F974D5760FBE7E1900BF728B /* tailcall.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tailcall.n; sourceTree = ""; }; + F974D5770FBE7E6100BF728B /* coroutine.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = coroutine.test; sourceTree = ""; }; + F974D5780FBE7E6100BF728B /* tailcall.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tailcall.test; sourceTree = ""; }; + F974D5790FBE7E9C00BF728B /* tcl.pc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.pc.in; sourceTree = ""; }; F97AE7F10B65C1E900310EA2 /* Tcl-Common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Common.xcconfig"; sourceTree = ""; }; F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Release.xcconfig"; sourceTree = ""; }; F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Debug.xcconfig"; sourceTree = ""; }; @@ -956,6 +897,7 @@ F9ECB1CB0B26534C00A28025 /* mathop.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = mathop.test; sourceTree = ""; }; F9ECB1E10B26543C00A28025 /* platform_shell.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform_shell.n; sourceTree = ""; }; F9ECB1E20B26543C00A28025 /* platform.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = platform.n; sourceTree = ""; }; + F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.dtrace; path = tclDTrace.d; sourceTree = ""; }; F9FC77B70AB29E9100B7077D /* tclUnixCompat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclUnixCompat.c; sourceTree = ""; }; /* End PBXFileReference section */ @@ -979,7 +921,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.13 2008/12/20 02:02:54 das Exp $\n"; + comments = "Copyright (c) 2004-2009 Daniel A. Steffen \nCopyright 2008-2009, Apple Inc.\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.14 2009/06/26 18:14:25 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -999,6 +941,7 @@ isa = PBXGroup; children = ( F9183E6A0EFC81560030B814 /* README */, + F946FB8B0FBE3AED00CD6495 /* itcl */, F9183E8F0EFC817B0030B814 /* tdbc */, ); path = pkgs; @@ -1069,6 +1012,7 @@ F96D3E1808F272A5004A47F5 /* concat.n */, F96D3E1908F272A5004A47F5 /* continue.n */, F93599D20DF1F8DF00E04F67 /* copy.n */, + F974D5720FBE7DC600BF728B /* coroutine.n */, F96D3E1A08F272A5004A47F5 /* CrtChannel.3 */, F96D3E1B08F272A5004A47F5 /* CrtChnlHdlr.3 */, F96D3E1C08F272A5004A47F5 /* CrtCloseHdlr.3 */, @@ -1224,6 +1168,7 @@ F96D3EAA08F272A7004A47F5 /* subst.n */, F96D3EAB08F272A7004A47F5 /* SubstObj.3 */, F96D3EAC08F272A7004A47F5 /* switch.n */, + F974D5760FBE7E1900BF728B /* tailcall.n */, F96D3EAD08F272A7004A47F5 /* Tcl.n */, F99D61180EF5573A00BBFE01 /* TclZlib.3 */, F96D3EAE08F272A7004A47F5 /* Tcl_Main.3 */, @@ -1298,6 +1243,7 @@ F96D3EEA08F272A7004A47F5 /* tclDate.c */, F96D3EEB08F272A7004A47F5 /* tclDecls.h */, F96D3EEC08F272A7004A47F5 /* tclDictObj.c */, + F9F4415D0C8BAE6F00BCCD67 /* tclDTrace.d */, F96D3EED08F272A7004A47F5 /* tclEncoding.c */, F96D3EEE08F272A7004A47F5 /* tclEnv.c */, F96D3EEF08F272A7004A47F5 /* tclEvent.c */, @@ -1478,18 +1424,10 @@ F96D425C08F272B2004A47F5 /* libtommath */ = { isa = PBXGroup; children = ( - F96D425F08F272B3004A47F5 /* bn.pdf */, - F96D426108F272B3004A47F5 /* bn_error.c */, - F96D426208F272B3004A47F5 /* bn_fast_mp_invmod.c */, - F96D426308F272B3004A47F5 /* bn_fast_mp_montgomery_reduce.c */, F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */, - F96D426508F272B3004A47F5 /* bn_fast_s_mp_mul_high_digs.c */, F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */, - F96D426708F272B3004A47F5 /* bn_mp_2expt.c */, - F96D426808F272B3004A47F5 /* bn_mp_abs.c */, F96D426908F272B3004A47F5 /* bn_mp_add.c */, F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */, - F96D426B08F272B3004A47F5 /* bn_mp_addmod.c */, F96D426C08F272B3004A47F5 /* bn_mp_and.c */, F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */, F96D426E08F272B3004A47F5 /* bn_mp_clear.c */, @@ -1497,7 +1435,6 @@ F96D427008F272B3004A47F5 /* bn_mp_cmp.c */, F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */, F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */, - F96D427308F272B3004A47F5 /* bn_mp_cnt_lsb.c */, F96D427408F272B3004A47F5 /* bn_mp_copy.c */, F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */, F96D427608F272B3004A47F5 /* bn_mp_div.c */, @@ -1505,104 +1442,49 @@ F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */, F96D427908F272B3004A47F5 /* bn_mp_div_3.c */, F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */, - F96D427B08F272B3004A47F5 /* bn_mp_dr_is_modulus.c */, - F96D427C08F272B3004A47F5 /* bn_mp_dr_reduce.c */, - F96D427D08F272B3004A47F5 /* bn_mp_dr_setup.c */, F96D427E08F272B3004A47F5 /* bn_mp_exch.c */, F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */, - F96D428008F272B3004A47F5 /* bn_mp_exptmod.c */, - F96D428108F272B3004A47F5 /* bn_mp_exptmod_fast.c */, - F96D428208F272B3004A47F5 /* bn_mp_exteuclid.c */, - F96D428308F272B3004A47F5 /* bn_mp_fread.c */, - F96D428408F272B3004A47F5 /* bn_mp_fwrite.c */, - F96D428508F272B3004A47F5 /* bn_mp_gcd.c */, - F96D428608F272B3004A47F5 /* bn_mp_get_int.c */, F96D428708F272B3004A47F5 /* bn_mp_grow.c */, F96D428808F272B3004A47F5 /* bn_mp_init.c */, F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */, F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */, F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */, - F96D428C08F272B3004A47F5 /* bn_mp_init_set_int.c */, F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */, - F96D428E08F272B3004A47F5 /* bn_mp_invmod.c */, - F96D428F08F272B3004A47F5 /* bn_mp_invmod_slow.c */, - F96D429008F272B3004A47F5 /* bn_mp_is_square.c */, - F96D429108F272B3004A47F5 /* bn_mp_jacobi.c */, F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */, F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */, - F96D429408F272B3004A47F5 /* bn_mp_lcm.c */, F96D429508F272B3004A47F5 /* bn_mp_lshd.c */, F96D429608F272B3004A47F5 /* bn_mp_mod.c */, F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */, - F96D429808F272B3004A47F5 /* bn_mp_mod_d.c */, - F96D429908F272B3004A47F5 /* bn_mp_montgomery_calc_normalization.c */, - F96D429A08F272B3004A47F5 /* bn_mp_montgomery_reduce.c */, - F96D429B08F272B3004A47F5 /* bn_mp_montgomery_setup.c */, F96D429C08F272B3004A47F5 /* bn_mp_mul.c */, F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */, F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */, F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */, - F96D42A008F272B3004A47F5 /* bn_mp_mulmod.c */, - F96D42A108F272B3004A47F5 /* bn_mp_n_root.c */, F96D42A208F272B3004A47F5 /* bn_mp_neg.c */, F96D42A308F272B3004A47F5 /* bn_mp_or.c */, - F96D42A408F272B3004A47F5 /* bn_mp_prime_fermat.c */, - F96D42A508F272B3004A47F5 /* bn_mp_prime_is_divisible.c */, - F96D42A608F272B3004A47F5 /* bn_mp_prime_is_prime.c */, - F96D42A708F272B3004A47F5 /* bn_mp_prime_miller_rabin.c */, - F96D42A808F272B3004A47F5 /* bn_mp_prime_next_prime.c */, - F96D42A908F272B3004A47F5 /* bn_mp_prime_rabin_miller_trials.c */, - F96D42AA08F272B3004A47F5 /* bn_mp_prime_random_ex.c */, F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */, F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */, - F96D42AD08F272B3004A47F5 /* bn_mp_rand.c */, F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */, - F96D42AF08F272B3004A47F5 /* bn_mp_read_signed_bin.c */, - F96D42B008F272B3004A47F5 /* bn_mp_read_unsigned_bin.c */, - F96D42B108F272B3004A47F5 /* bn_mp_reduce.c */, - F96D42B208F272B3004A47F5 /* bn_mp_reduce_2k.c */, - F96D42B308F272B3004A47F5 /* bn_mp_reduce_2k_l.c */, - F96D42B408F272B3004A47F5 /* bn_mp_reduce_2k_setup.c */, - F96D42B508F272B3004A47F5 /* bn_mp_reduce_2k_setup_l.c */, - F96D42B608F272B3004A47F5 /* bn_mp_reduce_is_2k.c */, - F96D42B708F272B3004A47F5 /* bn_mp_reduce_is_2k_l.c */, - F96D42B808F272B3004A47F5 /* bn_mp_reduce_setup.c */, F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */, F96D42BA08F272B3004A47F5 /* bn_mp_set.c */, - F96D42BB08F272B3004A47F5 /* bn_mp_set_int.c */, F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */, - F96D42BD08F272B3004A47F5 /* bn_mp_signed_bin_size.c */, F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */, - F96D42BF08F272B3004A47F5 /* bn_mp_sqrmod.c */, F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */, F96D42C108F272B3004A47F5 /* bn_mp_sub.c */, F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */, - F96D42C308F272B3004A47F5 /* bn_mp_submod.c */, - F96D42C408F272B3004A47F5 /* bn_mp_to_signed_bin.c */, - F96D42C508F272B3004A47F5 /* bn_mp_to_signed_bin_n.c */, F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */, F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */, F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */, F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */, - F96D42CA08F272B3004A47F5 /* bn_mp_toradix.c */, F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */, F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */, F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */, F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */, - F96D42CF08F272B3004A47F5 /* bn_prime_tab.c */, F96D42D008F272B3004A47F5 /* bn_reverse.c */, F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */, - F96D42D208F272B3004A47F5 /* bn_s_mp_exptmod.c */, F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */, - F96D42D408F272B3004A47F5 /* bn_s_mp_mul_high_digs.c */, F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */, F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */, F96D42D708F272B3004A47F5 /* bncore.c */, - F96D42D908F272B3004A47F5 /* callgraph.txt */, - F96D42DA08F272B3004A47F5 /* changes.txt */, - F96D42F008F272B3004A47F5 /* LICENSE */, - F96D431D08F272B4004A47F5 /* poster.pdf */, - F96D432608F272B4004A47F5 /* tommath.pdf */, F96D432908F272B4004A47F5 /* tommath_class.h */, F96D432A08F272B4004A47F5 /* tommath_superclass.h */, ); @@ -1652,6 +1534,7 @@ F96D435608F272B5004A47F5 /* compile.test */, F96D435708F272B5004A47F5 /* concat.test */, F96D435808F272B5004A47F5 /* config.test */, + F974D5770FBE7E6100BF728B /* coroutine.test */, F96D435908F272B5004A47F5 /* dcall.test */, F96D435A08F272B5004A47F5 /* dict.test */, F96D435C08F272B5004A47F5 /* dstring.test */, @@ -1674,7 +1557,9 @@ F96D436E08F272B6004A47F5 /* get.test */, F96D436F08F272B6004A47F5 /* history.test */, F96D437008F272B6004A47F5 /* http.test */, + F974D56C0FBE7D6300BF728B /* http11.test */, F96D437108F272B6004A47F5 /* httpd */, + F974D56D0FBE7D6300BF728B /* httpd11.tcl */, F96D437208F272B6004A47F5 /* httpold.test */, F96D437308F272B6004A47F5 /* if-old.test */, F96D437408F272B6004A47F5 /* if.test */, @@ -1747,6 +1632,7 @@ F96D43B408F272B7004A47F5 /* stringObj.test */, F96D43B508F272B7004A47F5 /* subst.test */, F96D43B608F272B7004A47F5 /* switch.test */, + F974D5780FBE7E6100BF728B /* tailcall.test */, F96D43B708F272B7004A47F5 /* tcltest.test */, F96D43B808F272B7004A47F5 /* thread.test */, F96D43B908F272B7004A47F5 /* timer.test */, @@ -1758,7 +1644,6 @@ F96D43BF08F272B7004A47F5 /* unixNotfy.test */, F96D43C008F272B7004A47F5 /* unknown.test */, F96D43C108F272B7004A47F5 /* unload.test */, - F91DC23D0E44C530002CB8D1 /* unsupported.test */, F96D43C208F272B7004A47F5 /* uplevel.test */, F96D43C308F272B7004A47F5 /* upvar.test */, F96D43C408F272B7004A47F5 /* utf.test */, @@ -1800,13 +1685,10 @@ F96D443108F272B8004A47F5 /* man2tcl.c */, F96D443208F272B8004A47F5 /* README */, F96D443308F272B8004A47F5 /* regexpTestLib.tcl */, - F96D443408F272B8004A47F5 /* str2c */, F96D443508F272B8004A47F5 /* tcl.hpj.in */, F96D443608F272B8004A47F5 /* tcl.wse.in */, - F96D443708F272B9004A47F5 /* tclmin.wse */, F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */, F96D443A08F272B9004A47F5 /* tclZIC.tcl */, - F92D7F140DE777670033A13A /* tsdPerf.c */, F92D7F100DE777240033A13A /* tsdPerf.tcl */, F96D443B08F272B9004A47F5 /* uniClass.tcl */, F96D443C08F272B9004A47F5 /* uniParse.tcl */, @@ -1827,6 +1709,7 @@ F96D445008F272B9004A47F5 /* Makefile.in */, F96D445208F272B9004A47F5 /* README */, F96D445308F272B9004A47F5 /* tcl.m4 */, + F974D5790FBE7E9C00BF728B /* tcl.pc.in */, F96D445408F272B9004A47F5 /* tcl.spec */, F96D445508F272B9004A47F5 /* tclAppInit.c */, F96D445608F272B9004A47F5 /* tclConfig.h.in */, @@ -1937,10 +1820,10 @@ isa = PBXNativeTarget; buildConfigurationList = F95CC8B009158F3100EA5ACE /* Build configuration list for PBXNativeTarget "tcltest" */; buildPhases = ( - F9A5C5F508F651A2008AE941 /* ShellScript */, + F9A5C5F508F651A2008AE941 /* Configure Tcl */, 8DD76FAB0486AB0100D96B5E /* Sources */, 8DD76FAD0486AB0100D96B5E /* Frameworks */, - F95FA74C0B32CE190072E431 /* ShellScript */, + F95FA74C0B32CE190072E431 /* Build dltest */, ); buildRules = ( ); @@ -1956,7 +1839,7 @@ isa = PBXNativeTarget; buildConfigurationList = F97258A80A86873D00096C78 /* Build configuration list for PBXNativeTarget "tests" */; buildPhases = ( - F97258A40A86873C00096C78 /* ShellScript */, + F97258A40A86873C00096C78 /* Run Testsuite */, ); buildRules = ( ); @@ -1971,7 +1854,7 @@ isa = PBXNativeTarget; buildConfigurationList = F95CC8AB09158F3100EA5ACE /* Build configuration list for PBXNativeTarget "Tcl" */; buildPhases = ( - F97AF02F0B665DA900310EA2 /* ShellScript */, + F97AF02F0B665DA900310EA2 /* Build Tcl */, ); buildRules = ( ); @@ -1987,7 +1870,11 @@ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + }; buildConfigurationList = F95CC8B509158F3100EA5ACE /* Build configuration list for PBXProject "Tcl" */; + compatibilityVersion = "Xcode 3.1"; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* Tcl */; projectDirPath = ""; @@ -2001,7 +1888,7 @@ /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ - F95FA74C0B32CE190072E431 /* ShellScript */ = { + F95FA74C0B32CE190072E431 /* Build dltest */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2016,27 +1903,31 @@ "$(TCL_SRCROOT)/unix/dltest/pkge.c", "$(TCL_SRCROOT)/unix/dltest/pkgua.c", ); + name = "Build dltest"; outputPaths = ( "$(DERIVED_FILE_DIR)/tcl/dltest.marker", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; shellScript = "## dltest build script phase\n\nrm -f \"${DERIVED_FILE_DIR}/tcl/dltest.marker\"\nmake -C \"${DERIVED_FILE_DIR}/tcl\" dltest.marker\nln -fsh \"${DERIVED_FILE_DIR}/tcl/dltest\" \"${CONFIGURATION_BUILD_DIR}\"\n"; + showEnvVarsInLog = 0; }; - F97258A40A86873C00096C78 /* ShellScript */ = { + F97258A40A86873C00096C78 /* Run Testsuite */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Run Testsuite"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\nif [ -z \"${HOME}\" ]; then export HOME=\"$(echo ~)\"; fi\ncd \"${TARGET_TEMP_DIR}\"; rm -rf \"${DERIVED_FILE_DIR}\"; mkdir -p \"${DERIVED_FILE_DIR}\"\nprintf '%s%s%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${TCL_SRCROOT}\" '/tests}]\nconfigure -tmpdir [file normalize {' \"${DERIVED_FILE_DIR}\" '}]\nconfigure -verbose [concat [configure -verbose] line]\n# following test only fails when testsuite is run from inside Xcode, so skip it\nconfigure -skip [concat [configure -skip] stack-3.1]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi"; + shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\nif [ -z \"${HOME}\" ]; then export HOME=\"$(echo ~)\"; fi\ncd \"${TARGET_TEMP_DIR}\"; rm -rf \"${DERIVED_FILE_DIR}\"; mkdir -p \"${DERIVED_FILE_DIR}\"\nprintf '%s%s%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${TCL_SRCROOT}\" '/tests}]\nconfigure -tmpdir [file normalize {' \"${DERIVED_FILE_DIR}\" '}]\nconfigure -verbose [concat [configure -verbose] line]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi"; + showEnvVarsInLog = 0; }; - F97AF02F0B665DA900310EA2 /* ShellScript */ = { + F97AF02F0B665DA900310EA2 /* Build Tcl */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2044,14 +1935,16 @@ inputPaths = ( "${TARGET_TEMP_DIR}/.none", ); + name = "Build Tcl"; outputPaths = ( "${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "if [ -e \"${TARGET_BUILD_DIR}/tclsh\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh\" \"${TARGET_BUILD_DIR}/tclsh${VERSION}\"\nfi\ngnumake -C \"${TCL_SRCROOT}/macosx\" -j \"$(sysctl -n hw.activecpu)\" \"$(echo \"${ACTION}\" | sed -e s/build// -e s/clean/distclean/ -e s/..\\*/\\&-/)${MAKE_TARGET}\" CFLAGS_WARNING=\"${WARNING_CFLAGS}\" CFLAGS_OPTIMIZE=\"-O${GCC_OPTIMIZATION_LEVEL}\" SYMROOT=\"${BUILT_PRODUCTS_DIR}\" OBJ_DIR=\"${OBJECT_FILE_DIR}\" INSTALL_ROOT=\"${DSTROOT}\" PREFIX=\"${PREFIX}\" BINDIR=\"${BINDIR}\" LIBDIR=\"${FRAMEWORK_INSTALL_PATH}\" MANDIR=\"${MANDIR}\" EXTRA_CONFIGURE_ARGS=\"${CONFIGURE_ARGS}\" ${EXTRA_MAKE_FLAGS}\nresult=$?\nif [ -e \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" \"${TARGET_BUILD_DIR}/tclsh\"\nfi\nif [ -e \"${BUILT_PRODUCTS_DIR}/tcltest\" ]; then\n\trm -f \"${BUILT_PRODUCTS_DIR}/tcltest\"\nfi\necho \"Done\"\nrm -f \"${SCRIPT_INPUT_FILE_0}\"\nexit ${result}\n"; + shellScript = "if [ -e \"${TARGET_BUILD_DIR}/tclsh\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh\" \"${TARGET_BUILD_DIR}/tclsh${VERSION}\"\nfi\nexport CC=$(xcrun -find ${GCC} || echo ${GCC}); export LD=${CC}\ngnumake -C \"${TCL_SRCROOT}/macosx\" -j \"$(sysctl -n hw.activecpu)\" \"$(echo \"${ACTION}\" | sed -e s/build// -e s/clean/distclean/ -e s/..\\*/\\&-/)${MAKE_TARGET}\" CFLAGS_WARNING=\"${WARNING_CFLAGS}\" CFLAGS_OPTIMIZE=\"-O${GCC_OPTIMIZATION_LEVEL}\" SYMROOT=\"${BUILT_PRODUCTS_DIR}\" OBJ_DIR=\"${OBJECT_FILE_DIR}\" INSTALL_ROOT=\"${DSTROOT}\" PREFIX=\"${PREFIX}\" BINDIR=\"${BINDIR}\" LIBDIR=\"${FRAMEWORK_INSTALL_PATH}\" MANDIR=\"${MANDIR}\" EXTRA_CONFIGURE_ARGS=\"${CONFIGURE_ARGS}\" ${EXTRA_MAKE_FLAGS}\nresult=$?\nif [ -e \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" \"${TARGET_BUILD_DIR}/tclsh\"\nfi\nif [ -e \"${BUILT_PRODUCTS_DIR}/tcltest\" ]; then\n\trm -f \"${BUILT_PRODUCTS_DIR}/tcltest\"\nfi\necho \"Done\"\nrm -f \"${SCRIPT_INPUT_FILE_0}\"\nexit ${result}\n"; + showEnvVarsInLog = 0; }; - F9A5C5F508F651A2008AE941 /* ShellScript */ = { + F9A5C5F508F651A2008AE941 /* Configure Tcl */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2065,12 +1958,14 @@ "$(TCL_SRCROOT)/unix/Makefile.in", "$(TCL_SRCROOT)/unix/dltest/Makefile.in", ); + name = "Configure Tcl"; outputPaths = ( "$(DERIVED_FILE_DIR)/tcl/tclConfig.sh", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n"; + shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -2242,6 +2137,7 @@ F96D4AD308F272CA004A47F5 /* tclUnixTest.c in Sources */, F96D4AD408F272CA004A47F5 /* tclUnixThrd.c in Sources */, F96D4AD608F272CA004A47F5 /* tclUnixTime.c in Sources */, + F9F4415E0C8BAE6F00BCCD67 /* tclDTrace.d in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2275,18 +2171,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ( - ppc, - ppc64, - i386, - x86_64, - ); - CFLAGS = "-arch ppc -arch ppc64 -arch i386 -arch x86_64 $(CFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.4; - OTHER_LDFLAGS = ( - "-Wl,-no_arch_warnings", - "$(OTHER_LDFLAGS)", - ); + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; PREBINDING = NO; }; name = ReleaseUniversal; @@ -2309,6 +2196,7 @@ F93084390BB93D2800CD0B9E /* DebugMemCompile */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2320,8 +2208,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --enable-symbols=all"; - MACOSX_DEPLOYMENT_TARGET = 10.2; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugMemCompile; @@ -2330,9 +2224,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; - MACOSX_DEPLOYMENT_TARGET = 10.2; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(OTHER_LDFLAGS)", "-lgcov", @@ -2359,8 +2259,9 @@ F9359B280DF212DA00E04F67 /* DebugGCov */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; - TCLTEST_OPTIONS = "-notfile http.test"; + TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; @@ -2382,13 +2283,13 @@ }; name = Release; }; - F95CC8AE09158F3100EA5ACE /* DebugNoFixZL */ = { + F95CC8AE09158F3100EA5ACE /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F95CC8B109158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; @@ -2402,7 +2303,6 @@ ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = tcltest; - ZERO_LINK = YES; }; name = Debug; }; @@ -2413,18 +2313,24 @@ }; name = Release; }; - F95CC8B309158F3100EA5ACE /* DebugNoFixZL */ = { + F95CC8B309158F3100EA5ACE /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tcltest; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F95CC8B609158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - MACOSX_DEPLOYMENT_TARGET = 10.2; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = Debug; @@ -2433,23 +2339,36 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - MACOSX_DEPLOYMENT_TARGET = 10.2; - PREBINDING = YES; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; }; name = Release; }; - F95CC8B809158F3100EA5ACE /* DebugNoFixZL */ = { + F95CC8B809158F3100EA5ACE /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - MACOSX_DEPLOYMENT_TARGET = 10.2; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F97258A90A86873D00096C78 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2460,6 +2379,7 @@ F97258AA0A86873D00096C78 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2467,19 +2387,21 @@ }; name = Release; }; - F97258AB0A86873D00096C78 /* DebugNoFixZL */ = { + F97258AB0A86873D00096C78 /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F97258AC0A86873D00096C78 /* ReleaseUniversal */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2487,36 +2409,6 @@ }; name = ReleaseUniversal; }; - F97AED080B660A6C00310EA2 /* ReleaseUniversal10.4uSDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = tests; - TCLTEST_OPTIONS = ""; - TCL_LIBRARY = "$(TCL_SRCROOT)/library"; - TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; - }; - name = ReleaseUniversal10.4uSDK; - }; - F97AED0F0B660AA300310EA2 /* ReleasePPC10.3.9SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = tests; - TCLTEST_OPTIONS = ""; - TCL_LIBRARY = "$(TCL_SRCROOT)/library"; - TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; - }; - name = ReleasePPC10.3.9SDK; - }; - F97AED160B660AF100310EA2 /* ReleasePPC10.2.8SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = tests; - TCLTEST_OPTIONS = ""; - TCL_LIBRARY = "$(TCL_SRCROOT)/library"; - TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; - }; - name = ReleasePPC10.2.8SDK; - }; F97AED1B0B660B2100310EA2 /* Debug64bit */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2535,6 +2427,7 @@ F97AED1D0B660B2100310EA2 /* Debug64bit */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2549,7 +2442,7 @@ ARCHS = "$(NATIVE_ARCH_64_BIT)"; CONFIGURE_ARGS = "--enable-64bit $(CONFIGURE_ARGS)"; CPPFLAGS = "-arch $(NATIVE_ARCH_64_BIT) $(CPPFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.2; + MACOSX_DEPLOYMENT_TARGET = 10.5; PREBINDING = NO; }; name = Debug64bit; @@ -2558,8 +2451,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-corefoundation"; - MACOSX_DEPLOYMENT_TARGET = 10.2; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugNoCF; @@ -2582,6 +2481,7 @@ F98751320DE7B57E00B1C9EC /* DebugNoCF */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2593,8 +2493,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-threads --disable-corefoundation"; - MACOSX_DEPLOYMENT_TARGET = 10.2; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugNoCFUnthreaded; @@ -2617,6 +2523,7 @@ F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2624,6 +2531,186 @@ }; name = DebugNoCFUnthreaded; }; + F9988AB10D814C6500B6B03B /* Debug gcc40 */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + GCC_VERSION = 4.0; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + }; + name = "Debug gcc40"; + }; + F9988AB20D814C6500B6B03B /* Debug gcc40 */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = "Debug gcc40"; + }; + F9988AB30D814C6500B6B03B /* Debug gcc40 */ = { + isa = XCBuildConfiguration; + buildSettings = { + CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "__private_extern__=extern", + "$(GCC_PREPROCESSOR_DEFINITIONS)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + PRODUCT_NAME = tcltest; + }; + name = "Debug gcc40"; + }; + F9988AB40D814C6500B6B03B /* Debug gcc40 */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = "Debug gcc40"; + }; + F9988AB50D814C7500B6B03B /* Debug llvm-gcc */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + GCC = "llvm-gcc"; + GCC_VERSION = com.apple.compilers.llvmgcc42; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + }; + name = "Debug llvm-gcc"; + }; + F9988AB60D814C7500B6B03B /* Debug llvm-gcc */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = "Debug llvm-gcc"; + }; + F9988AB70D814C7500B6B03B /* Debug llvm-gcc */ = { + isa = XCBuildConfiguration; + buildSettings = { + CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "__private_extern__=extern", + "$(GCC_PREPROCESSOR_DEFINITIONS)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + PRODUCT_NAME = tcltest; + }; + name = "Debug llvm-gcc"; + }; + F9988AB80D814C7500B6B03B /* Debug llvm-gcc */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = "Debug llvm-gcc"; + }; + F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; + GCC_VERSION = 4.0; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + }; + name = "ReleaseUniversal gcc40"; + }; + F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = "ReleaseUniversal gcc40"; + }; + F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = "ReleaseUniversal gcc40"; + }; + F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = "ReleaseUniversal gcc40"; + }; + F9988BB50D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC = "llvm-gcc"; + GCC_OPTIMIZATION_LEVEL = 4; + GCC_VERSION = com.apple.compilers.llvmgcc42; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + }; + name = "ReleaseUniversal llvm-gcc"; + }; + F9988BB60D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + SKIP_INSTALL = NO; + }; + name = "ReleaseUniversal llvm-gcc"; + }; + F9988BB70D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = "ReleaseUniversal llvm-gcc"; + }; + F9988BB80D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = "ReleaseUniversal llvm-gcc"; + }; F99EE73B0BE835310060D4AF /* DebugUnthreaded */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2657,6 +2744,7 @@ F99EE73F0BE835310060D4AF /* DebugUnthreaded */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2667,6 +2755,7 @@ F99EE7400BE835310060D4AF /* DebugLeaks */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; @@ -2678,8 +2767,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-threads"; - MACOSX_DEPLOYMENT_TARGET = 10.2; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugUnthreaded; @@ -2688,116 +2783,59 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; GCC_PREPROCESSOR_DEFINITIONS = ( PURIFY, "$(GCC_PREPROCESSOR_DEFINITIONS)", ); - MACOSX_DEPLOYMENT_TARGET = 10.2; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugLeaks; }; - F9DB62080B65ADA800A370FB /* ReleaseUniversal10.4uSDK */ = { + F9EEED960C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = ReleaseUniversal10.4uSDK; + name = ReleaseUniversal10.5SDK; }; - F9DB62090B65ADA800A370FB /* ReleaseUniversal10.4uSDK */ = { + F9EEED970C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tcltest; }; - name = ReleaseUniversal10.4uSDK; + name = ReleaseUniversal10.5SDK; }; - F9DB620A0B65ADA800A370FB /* ReleaseUniversal10.4uSDK */ = { + F9EEED980C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ( - ppc, - ppc64, - i386, - x86_64, - ); - CFLAGS = "-arch ppc -arch ppc64 -arch i386 -arch x86_64 $(CFLAGS)"; - CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.4; - OTHER_LDFLAGS = ( - "-Wl,-no_arch_warnings", - "$(OTHER_LDFLAGS)", - ); - PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; - }; - name = ReleaseUniversal10.4uSDK; - }; - F9DB621F0B65AFDE00A370FB /* ReleasePPC10.3.9SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - LDFLAGS = "-force_cpusubtype_ALL $(LDFLAGS)"; - PRODUCT_NAME = tclsh; - SKIP_INSTALL = NO; - }; - name = ReleasePPC10.3.9SDK; - }; - F9DB62200B65AFDE00A370FB /* ReleasePPC10.3.9SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = tcltest; - }; - name = ReleasePPC10.3.9SDK; - }; - F9DB62210B65AFDE00A370FB /* ReleasePPC10.3.9SDK */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; - buildSettings = { - ARCHS = ppc; - CFLAGS = "$(PER_ARCH_CFLAGS_ppc) $(CFLAGS)"; - CPPFLAGS = "-arch ppc -isysroot $(SDKROOT) $(CPPFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.3; - PREBINDING = YES; - SDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk; - }; - name = ReleasePPC10.3.9SDK; - }; - F9DB62350B65B03A00A370FB /* ReleasePPC10.2.8SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = tclsh; - SKIP_INSTALL = NO; - }; - name = ReleasePPC10.2.8SDK; - }; - F9DB62360B65B03A00A370FB /* ReleasePPC10.2.8SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = tcltest; + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = ReleasePPC10.2.8SDK; + name = ReleaseUniversal10.5SDK; }; - F9DB62370B65B03A00A370FB /* ReleasePPC10.2.8SDK */ = { + F9EEED990C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ppc; - CFLAGS = "$(PER_ARCH_CFLAGS_ppc) -fconstant-cfstrings $(CFLAGS)"; - CPPFLAGS = "-arch ppc -D__CONSTANT_CFSTRINGS__ -DMAC_OS_X_VERSION_MIN_REQUIRED=1020 -nostdinc -isystem $(SDKROOT)/usr/include/gcc/darwin/$(GCC_VERSION) -isystem $(SDKROOT)/usr/include -F$(SDKROOT)/System/Library/Frameworks"; - DEBUG_INFORMATION_FORMAT = stabs; - GCC = /usr/bin/gcc; - GCC_VERSION = 3.3; - LDFLAGS = "-L$(SDKROOT)/usr/lib/gcc/darwin/$(GCC_VERSION) -Wl,-syslibroot,$(SDKROOT)"; - MACOSX_DEPLOYMENT_TARGET = 10.2; - PREBINDING = YES; - SDKROOT = /Developer/SDKs/MacOSX10.2.8.sdk; - WARNING_CFLAGS = ( - "$(WARNING_CFLAGS_GCC3)", - "-Wno-long-double", - ); + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; + CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + SDKROOT = macosx10.5; }; - name = ReleasePPC10.2.8SDK; + name = ReleaseUniversal10.5SDK; }; /* End XCBuildConfiguration section */ @@ -2806,7 +2844,9 @@ isa = XCConfigurationList; buildConfigurations = ( F95CC8AC09158F3100EA5ACE /* Debug */, - F95CC8AE09158F3100EA5ACE /* DebugNoFixZL */, + F9988AB60D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB20D814C6500B6B03B /* Debug gcc40 */, + F95CC8AE09158F3100EA5ACE /* DebugNoFixAndContinue */, F99EE73B0BE835310060D4AF /* DebugUnthreaded */, F98751300DE7B57E00B1C9EC /* DebugNoCF */, F98751340DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -2816,9 +2856,9 @@ F97AED1B0B660B2100310EA2 /* Debug64bit */, F95CC8AD09158F3100EA5ACE /* Release */, F91BCC4F093152310042A6BF /* ReleaseUniversal */, - F9DB62080B65ADA800A370FB /* ReleaseUniversal10.4uSDK */, - F9DB621F0B65AFDE00A370FB /* ReleasePPC10.3.9SDK */, - F9DB62350B65B03A00A370FB /* ReleasePPC10.2.8SDK */, + F9988BB60D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc40 */, + F9EEED960C2FEFD300396116 /* ReleaseUniversal10.5SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2827,7 +2867,9 @@ isa = XCConfigurationList; buildConfigurations = ( F95CC8B109158F3100EA5ACE /* Debug */, - F95CC8B309158F3100EA5ACE /* DebugNoFixZL */, + F9988AB70D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB30D814C6500B6B03B /* Debug gcc40 */, + F95CC8B309158F3100EA5ACE /* DebugNoFixAndContinue */, F99EE73D0BE835310060D4AF /* DebugUnthreaded */, F98751310DE7B57E00B1C9EC /* DebugNoCF */, F98751350DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -2837,9 +2879,9 @@ F97AED1C0B660B2100310EA2 /* Debug64bit */, F95CC8B209158F3100EA5ACE /* Release */, F91BCC50093152310042A6BF /* ReleaseUniversal */, - F9DB62090B65ADA800A370FB /* ReleaseUniversal10.4uSDK */, - F9DB62200B65AFDE00A370FB /* ReleasePPC10.3.9SDK */, - F9DB62360B65B03A00A370FB /* ReleasePPC10.2.8SDK */, + F9988BB70D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc40 */, + F9EEED970C2FEFD300396116 /* ReleaseUniversal10.5SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2848,7 +2890,9 @@ isa = XCConfigurationList; buildConfigurations = ( F95CC8B609158F3100EA5ACE /* Debug */, - F95CC8B809158F3100EA5ACE /* DebugNoFixZL */, + F9988AB50D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB10D814C6500B6B03B /* Debug gcc40 */, + F95CC8B809158F3100EA5ACE /* DebugNoFixAndContinue */, F99EE7410BE835310060D4AF /* DebugUnthreaded */, F987512F0DE7B57E00B1C9EC /* DebugNoCF */, F98751330DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -2858,9 +2902,9 @@ F97AED1E0B660B2100310EA2 /* Debug64bit */, F95CC8B709158F3100EA5ACE /* Release */, F91BCC51093152310042A6BF /* ReleaseUniversal */, - F9DB620A0B65ADA800A370FB /* ReleaseUniversal10.4uSDK */, - F9DB62210B65AFDE00A370FB /* ReleasePPC10.3.9SDK */, - F9DB62370B65B03A00A370FB /* ReleasePPC10.2.8SDK */, + F9988BB50D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc40 */, + F9EEED990C2FEFD300396116 /* ReleaseUniversal10.5SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2869,7 +2913,9 @@ isa = XCConfigurationList; buildConfigurations = ( F97258A90A86873D00096C78 /* Debug */, - F97258AB0A86873D00096C78 /* DebugNoFixZL */, + F9988AB80D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB40D814C6500B6B03B /* Debug gcc40 */, + F97258AB0A86873D00096C78 /* DebugNoFixAndContinue */, F99EE73F0BE835310060D4AF /* DebugUnthreaded */, F98751320DE7B57E00B1C9EC /* DebugNoCF */, F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -2879,9 +2925,9 @@ F97AED1D0B660B2100310EA2 /* Debug64bit */, F97258AA0A86873D00096C78 /* Release */, F97258AC0A86873D00096C78 /* ReleaseUniversal */, - F97AED080B660A6C00310EA2 /* ReleaseUniversal10.4uSDK */, - F97AED0F0B660AA300310EA2 /* ReleasePPC10.3.9SDK */, - F97AED160B660AF100310EA2 /* ReleasePPC10.2.8SDK */, + F9988BB80D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc40 */, + F9EEED980C2FEFD300396116 /* ReleaseUniversal10.5SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; diff --git a/macosx/Tcl.xcodeproj/default.pbxuser b/macosx/Tcl.xcodeproj/default.pbxuser index 45224d6..0399c7b 100644 --- a/macosx/Tcl.xcodeproj/default.pbxuser +++ b/macosx/Tcl.xcodeproj/default.pbxuser @@ -10,13 +10,10 @@ F944EB8F08F798100049FDD4 /* tcltest */, ); perUserDictionary = { - com.apple.ide.smrt.PBXUserSmartGroupsKey.Rev10 = <040b73747265616d747970656481e8038401408484840e4e534d757461626c654172726179008484074e534172726179008484084e534f626a65637400858401690192848484134e534d757461626c6544696374696f6e6172790084840c4e5344696374696f6e6172790095960792848484084e53537472696e67019584012b046e616d658692849a9a14496d706c656d656e746174696f6e2046696c65738692849a9a146162736f6c75746550617468546f42756e646c658692849a9a008692849a9a195042585472616e7369656e744c6f636174696f6e4174546f708692849a9a06626f74746f6d8692849a9a03636c7a8692849a9a1550425846696c656e616d65536d61727447726f75708692849a9a0b6465736372697074696f6e8692849a9a103c6e6f206465736372697074696f6e3e8692849a9a0b707265666572656e63657386928497960892849a9a07666e6d617463688692849a9a008692849a9a05696d6167658692849a9a0b536d617274466f6c6465728692849a9a04726f6f748692849a9a093c50524f4a4543543e8692849a9a0572656765788692849a9a065c2e286329248692849a9a097265637572736976658692848484084e534e756d626572008484074e5356616c7565009584012a849696018692849a9a0669734c656166869284b09db296008692849a9a0763616e536176658692af92849a9a1250425850726f6a65637453636f70654b65798692849a9a03594553868692849a9a08676c6f62616c49448692849a9a18314343304541343030343335304546393030343434313042868686>; + com.apple.ide.smrt.PBXUserSmartGroupsKey.Rev10 = <040b73747265616d747970656481e8038401408484840e4e534d757461626c654172726179008484074e534172726179008484084e534f626a65637400858401690192848484134e534d757461626c6544696374696f6e6172790084840c4e5344696374696f6e6172790095960792848484084e53537472696e67019584012b046e616d658692849a9a14496d706c656d656e746174696f6e2046696c65738692849a9a195042585472616e7369656e744c6f636174696f6e4174546f708692849a9a06626f74746f6d8692849a9a0b707265666572656e63657386928497960892849a9a0669734c6561668692848484084e534e756d626572008484074e5356616c7565009584012a849696008692849a9a04726f6f748692849a9a093c50524f4a4543543e8692849a9a09726563757273697665869284a29da496018692849a9a05696d6167658692849a9a0b536d617274466f6c6465728692849a9a0763616e536176658692a892849a9a1250425850726f6a65637453636f70654b65798692849a9a035945538692849a9a0572656765788692849a9a065c2e286329248692849a9a07666e6d617463688692849a9a00868692849a9a146162736f6c75746550617468546f42756e646c658692849a9a008692849a9a0b6465736372697074696f6e8692849a9a103c6e6f206465736372697074696f6e3e8692849a9a08676c6f62616c49448692849a9a183143433045413430303433353045463930303434343130428692849a9a03636c7a8692849a9a1550425846696c656e616d65536d61727447726f7570868686>; }; sourceControlManager = F944EB9C08F798180049FDD4 /* Source Control */; userBuildSettings = { - AUTOCONF = "/usr/local/bin/autoconf-2.59"; - AUTOHEADER = "/usr/local/bin/autoheader-2.59"; - CODE_SIGN_IDENTITY = ""; SYMROOT = "${SRCROOT}/../../build/tcl"; TCL_SRCROOT = "${SRCROOT}/../../tcl"; }; @@ -66,6 +63,9 @@ }; }; customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = ""; @@ -120,6 +120,7 @@ executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = tcltest; + showTypeColumn = 0; sourceDirectories = ( ); }; @@ -127,10 +128,16 @@ isa = PBXSourceControlManager; fallbackIsa = XCSourceControlManager; isSCMEnabled = 0; + repositoryNamesForRoots = { + .. = ""; + }; scmConfiguration = { CVSToolPath = /usr/bin/cvs; CVSUseSSH = NO; SubversionToolPath = /usr/bin/svn; + repositoryNamesForRoots = { + .. = ""; + }; }; scmType = scm.cvs; }; @@ -180,6 +187,9 @@ }; }; customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = _debug; @@ -194,6 +204,7 @@ executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = tclsh; + showTypeColumn = 0; sourceDirectories = ( ); }; diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 124e933..1b22535 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -148,7 +148,7 @@ F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; }; F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; }; F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; }; - F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; }; + F96D4AC608F272C9004A47F5 /* tclLoadDyld.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445B08F272B9004A47F5 /* tclLoadDyld.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; }; F96D4ACA08F272C9004A47F5 /* tclUnixChan.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D445F08F272B9004A47F5 /* tclUnixChan.c */; }; F96D4ACB08F272C9004A47F5 /* tclUnixEvent.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446008F272B9004A47F5 /* tclUnixEvent.c */; }; F96D4ACC08F272C9004A47F5 /* tclUnixFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D446108F272B9004A47F5 /* tclUnixFCmd.c */; }; @@ -194,10 +194,8 @@ F9183E6A0EFC81560030B814 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; F9183E8F0EFC817B0030B814 /* tdbc */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tdbc; sourceTree = ""; }; F91DC23C0E44C51B002CB8D1 /* nre.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = nre.test; sourceTree = ""; }; - F91DC23D0E44C530002CB8D1 /* unsupported.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = unsupported.test; sourceTree = ""; }; F91E62260C1AE686006C9D96 /* Tclsh-Info.plist.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Tclsh-Info.plist.in"; sourceTree = ""; }; F92D7F100DE777240033A13A /* tsdPerf.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tsdPerf.tcl; sourceTree = ""; }; - F92D7F140DE777670033A13A /* tsdPerf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tsdPerf.c; sourceTree = ""; }; F93599B20DF1F75400E04F67 /* tclOO.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclOO.c; sourceTree = ""; }; F93599B40DF1F75900E04F67 /* tclOO.decls */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclOO.decls; sourceTree = ""; }; F93599B50DF1F75D00E04F67 /* tclOO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclOO.h; sourceTree = ""; }; @@ -221,6 +219,7 @@ F93599D60DF1F95000E04F67 /* next.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = next.n; sourceTree = ""; }; F93599D70DF1F96800E04F67 /* object.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = object.n; sourceTree = ""; }; F93599D80DF1F98300E04F67 /* self.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = self.n; sourceTree = ""; }; + F946FB8B0FBE3AED00CD6495 /* itcl */ = {isa = PBXFileReference; lastKnownFileType = folder; path = itcl; sourceTree = ""; }; F95D77E90DFD820D00A8BF6F /* tclIORTrans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclIORTrans.c; sourceTree = ""; }; F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = macOSXLoad.test; sourceTree = ""; }; F96437C90EF0D4B2003F468E /* tclZlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclZlib.c; sourceTree = ""; }; @@ -559,18 +558,10 @@ F96D402208F272AA004A47F5 /* tcltest.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tcltest.tcl; sourceTree = ""; }; F96D402308F272AA004A47F5 /* tm.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tm.tcl; sourceTree = ""; }; F96D425B08F272B2004A47F5 /* word.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = word.tcl; sourceTree = ""; }; - F96D425F08F272B3004A47F5 /* bn.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = bn.pdf; sourceTree = ""; }; - F96D426108F272B3004A47F5 /* bn_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_error.c; sourceTree = ""; }; - F96D426208F272B3004A47F5 /* bn_fast_mp_invmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_mp_invmod.c; sourceTree = ""; }; - F96D426308F272B3004A47F5 /* bn_fast_mp_montgomery_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_mp_montgomery_reduce.c; sourceTree = ""; }; F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_mul_digs.c; sourceTree = ""; }; - F96D426508F272B3004A47F5 /* bn_fast_s_mp_mul_high_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_mul_high_digs.c; sourceTree = ""; }; F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_fast_s_mp_sqr.c; sourceTree = ""; }; - F96D426708F272B3004A47F5 /* bn_mp_2expt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_2expt.c; sourceTree = ""; }; - F96D426808F272B3004A47F5 /* bn_mp_abs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_abs.c; sourceTree = ""; }; F96D426908F272B3004A47F5 /* bn_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_add.c; sourceTree = ""; }; F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_add_d.c; sourceTree = ""; }; - F96D426B08F272B3004A47F5 /* bn_mp_addmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_addmod.c; sourceTree = ""; }; F96D426C08F272B3004A47F5 /* bn_mp_and.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_and.c; sourceTree = ""; }; F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_clamp.c; sourceTree = ""; }; F96D426E08F272B3004A47F5 /* bn_mp_clear.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_clear.c; sourceTree = ""; }; @@ -578,7 +569,6 @@ F96D427008F272B3004A47F5 /* bn_mp_cmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp.c; sourceTree = ""; }; F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp_d.c; sourceTree = ""; }; F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cmp_mag.c; sourceTree = ""; }; - F96D427308F272B3004A47F5 /* bn_mp_cnt_lsb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_cnt_lsb.c; sourceTree = ""; }; F96D427408F272B3004A47F5 /* bn_mp_copy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_copy.c; sourceTree = ""; }; F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_count_bits.c; sourceTree = ""; }; F96D427608F272B3004A47F5 /* bn_mp_div.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div.c; sourceTree = ""; }; @@ -586,104 +576,49 @@ F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_2d.c; sourceTree = ""; }; F96D427908F272B3004A47F5 /* bn_mp_div_3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_3.c; sourceTree = ""; }; F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_div_d.c; sourceTree = ""; }; - F96D427B08F272B3004A47F5 /* bn_mp_dr_is_modulus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_dr_is_modulus.c; sourceTree = ""; }; - F96D427C08F272B3004A47F5 /* bn_mp_dr_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_dr_reduce.c; sourceTree = ""; }; - F96D427D08F272B3004A47F5 /* bn_mp_dr_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_dr_setup.c; sourceTree = ""; }; F96D427E08F272B3004A47F5 /* bn_mp_exch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exch.c; sourceTree = ""; }; F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_expt_d.c; sourceTree = ""; }; - F96D428008F272B3004A47F5 /* bn_mp_exptmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exptmod.c; sourceTree = ""; }; - F96D428108F272B3004A47F5 /* bn_mp_exptmod_fast.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exptmod_fast.c; sourceTree = ""; }; - F96D428208F272B3004A47F5 /* bn_mp_exteuclid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_exteuclid.c; sourceTree = ""; }; - F96D428308F272B3004A47F5 /* bn_mp_fread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_fread.c; sourceTree = ""; }; - F96D428408F272B3004A47F5 /* bn_mp_fwrite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_fwrite.c; sourceTree = ""; }; - F96D428508F272B3004A47F5 /* bn_mp_gcd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_gcd.c; sourceTree = ""; }; - F96D428608F272B3004A47F5 /* bn_mp_get_int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_get_int.c; sourceTree = ""; }; F96D428708F272B3004A47F5 /* bn_mp_grow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_grow.c; sourceTree = ""; }; F96D428808F272B3004A47F5 /* bn_mp_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init.c; sourceTree = ""; }; F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_copy.c; sourceTree = ""; }; F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_multi.c; sourceTree = ""; }; F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_set.c; sourceTree = ""; }; - F96D428C08F272B3004A47F5 /* bn_mp_init_set_int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_set_int.c; sourceTree = ""; }; F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_init_size.c; sourceTree = ""; }; - F96D428E08F272B3004A47F5 /* bn_mp_invmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_invmod.c; sourceTree = ""; }; - F96D428F08F272B3004A47F5 /* bn_mp_invmod_slow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_invmod_slow.c; sourceTree = ""; }; - F96D429008F272B3004A47F5 /* bn_mp_is_square.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_is_square.c; sourceTree = ""; }; - F96D429108F272B3004A47F5 /* bn_mp_jacobi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_jacobi.c; sourceTree = ""; }; F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_karatsuba_mul.c; sourceTree = ""; }; F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_karatsuba_sqr.c; sourceTree = ""; }; - F96D429408F272B3004A47F5 /* bn_mp_lcm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_lcm.c; sourceTree = ""; }; F96D429508F272B3004A47F5 /* bn_mp_lshd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_lshd.c; sourceTree = ""; }; F96D429608F272B3004A47F5 /* bn_mp_mod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod.c; sourceTree = ""; }; F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod_2d.c; sourceTree = ""; }; - F96D429808F272B3004A47F5 /* bn_mp_mod_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mod_d.c; sourceTree = ""; }; - F96D429908F272B3004A47F5 /* bn_mp_montgomery_calc_normalization.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_montgomery_calc_normalization.c; sourceTree = ""; }; - F96D429A08F272B3004A47F5 /* bn_mp_montgomery_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_montgomery_reduce.c; sourceTree = ""; }; - F96D429B08F272B3004A47F5 /* bn_mp_montgomery_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_montgomery_setup.c; sourceTree = ""; }; F96D429C08F272B3004A47F5 /* bn_mp_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul.c; sourceTree = ""; }; F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_2.c; sourceTree = ""; }; F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_2d.c; sourceTree = ""; }; F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mul_d.c; sourceTree = ""; }; - F96D42A008F272B3004A47F5 /* bn_mp_mulmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_mulmod.c; sourceTree = ""; }; - F96D42A108F272B3004A47F5 /* bn_mp_n_root.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_n_root.c; sourceTree = ""; }; F96D42A208F272B3004A47F5 /* bn_mp_neg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_neg.c; sourceTree = ""; }; F96D42A308F272B3004A47F5 /* bn_mp_or.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_or.c; sourceTree = ""; }; - F96D42A408F272B3004A47F5 /* bn_mp_prime_fermat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_fermat.c; sourceTree = ""; }; - F96D42A508F272B3004A47F5 /* bn_mp_prime_is_divisible.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_is_divisible.c; sourceTree = ""; }; - F96D42A608F272B3004A47F5 /* bn_mp_prime_is_prime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_is_prime.c; sourceTree = ""; }; - F96D42A708F272B3004A47F5 /* bn_mp_prime_miller_rabin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_miller_rabin.c; sourceTree = ""; }; - F96D42A808F272B3004A47F5 /* bn_mp_prime_next_prime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_next_prime.c; sourceTree = ""; }; - F96D42A908F272B3004A47F5 /* bn_mp_prime_rabin_miller_trials.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_rabin_miller_trials.c; sourceTree = ""; }; - F96D42AA08F272B3004A47F5 /* bn_mp_prime_random_ex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_prime_random_ex.c; sourceTree = ""; }; F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_radix_size.c; sourceTree = ""; }; F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_radix_smap.c; sourceTree = ""; }; - F96D42AD08F272B3004A47F5 /* bn_mp_rand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_rand.c; sourceTree = ""; }; F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_read_radix.c; sourceTree = ""; }; - F96D42AF08F272B3004A47F5 /* bn_mp_read_signed_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_read_signed_bin.c; sourceTree = ""; }; - F96D42B008F272B3004A47F5 /* bn_mp_read_unsigned_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_read_unsigned_bin.c; sourceTree = ""; }; - F96D42B108F272B3004A47F5 /* bn_mp_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce.c; sourceTree = ""; }; - F96D42B208F272B3004A47F5 /* bn_mp_reduce_2k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k.c; sourceTree = ""; }; - F96D42B308F272B3004A47F5 /* bn_mp_reduce_2k_l.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k_l.c; sourceTree = ""; }; - F96D42B408F272B3004A47F5 /* bn_mp_reduce_2k_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k_setup.c; sourceTree = ""; }; - F96D42B508F272B3004A47F5 /* bn_mp_reduce_2k_setup_l.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_2k_setup_l.c; sourceTree = ""; }; - F96D42B608F272B3004A47F5 /* bn_mp_reduce_is_2k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_is_2k.c; sourceTree = ""; }; - F96D42B708F272B3004A47F5 /* bn_mp_reduce_is_2k_l.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_is_2k_l.c; sourceTree = ""; }; - F96D42B808F272B3004A47F5 /* bn_mp_reduce_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_reduce_setup.c; sourceTree = ""; }; F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_rshd.c; sourceTree = ""; }; F96D42BA08F272B3004A47F5 /* bn_mp_set.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_set.c; sourceTree = ""; }; - F96D42BB08F272B3004A47F5 /* bn_mp_set_int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_set_int.c; sourceTree = ""; }; F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_shrink.c; sourceTree = ""; }; - F96D42BD08F272B3004A47F5 /* bn_mp_signed_bin_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_signed_bin_size.c; sourceTree = ""; }; F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqr.c; sourceTree = ""; }; - F96D42BF08F272B3004A47F5 /* bn_mp_sqrmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqrmod.c; sourceTree = ""; }; F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sqrt.c; sourceTree = ""; }; F96D42C108F272B3004A47F5 /* bn_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sub.c; sourceTree = ""; }; F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_sub_d.c; sourceTree = ""; }; - F96D42C308F272B3004A47F5 /* bn_mp_submod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_submod.c; sourceTree = ""; }; - F96D42C408F272B3004A47F5 /* bn_mp_to_signed_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_signed_bin.c; sourceTree = ""; }; - F96D42C508F272B3004A47F5 /* bn_mp_to_signed_bin_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_signed_bin_n.c; sourceTree = ""; }; F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_unsigned_bin.c; sourceTree = ""; }; F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_to_unsigned_bin_n.c; sourceTree = ""; }; F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toom_mul.c; sourceTree = ""; }; F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toom_sqr.c; sourceTree = ""; }; - F96D42CA08F272B3004A47F5 /* bn_mp_toradix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toradix.c; sourceTree = ""; }; F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_toradix_n.c; sourceTree = ""; }; F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_unsigned_bin_size.c; sourceTree = ""; }; F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_xor.c; sourceTree = ""; }; F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_mp_zero.c; sourceTree = ""; }; - F96D42CF08F272B3004A47F5 /* bn_prime_tab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_prime_tab.c; sourceTree = ""; }; F96D42D008F272B3004A47F5 /* bn_reverse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_reverse.c; sourceTree = ""; }; F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_add.c; sourceTree = ""; }; - F96D42D208F272B3004A47F5 /* bn_s_mp_exptmod.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_exptmod.c; sourceTree = ""; }; F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_digs.c; sourceTree = ""; }; - F96D42D408F272B3004A47F5 /* bn_s_mp_mul_high_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_high_digs.c; sourceTree = ""; }; F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sqr.c; sourceTree = ""; }; F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sub.c; sourceTree = ""; }; F96D42D708F272B3004A47F5 /* bncore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bncore.c; sourceTree = ""; }; - F96D42D908F272B3004A47F5 /* callgraph.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = callgraph.txt; sourceTree = ""; }; - F96D42DA08F272B3004A47F5 /* changes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = changes.txt; sourceTree = ""; }; - F96D42F008F272B3004A47F5 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - F96D431D08F272B4004A47F5 /* poster.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = poster.pdf; sourceTree = ""; }; - F96D432608F272B4004A47F5 /* tommath.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = tommath.pdf; sourceTree = ""; }; F96D432908F272B4004A47F5 /* tommath_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_class.h; sourceTree = ""; }; F96D432A08F272B4004A47F5 /* tommath_superclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_superclass.h; sourceTree = ""; }; F96D432B08F272B4004A47F5 /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = ""; }; @@ -737,7 +672,7 @@ F96D436E08F272B6004A47F5 /* get.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = get.test; sourceTree = ""; }; F96D436F08F272B6004A47F5 /* history.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = history.test; sourceTree = ""; }; F96D437008F272B6004A47F5 /* http.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http.test; sourceTree = ""; }; - F96D437108F272B6004A47F5 /* httpd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = httpd; sourceTree = ""; }; + F96D437108F272B6004A47F5 /* httpd */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd; sourceTree = ""; }; F96D437208F272B6004A47F5 /* httpold.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpold.test; sourceTree = ""; }; F96D437308F272B6004A47F5 /* if-old.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "if-old.test"; sourceTree = ""; }; F96D437408F272B6004A47F5 /* if.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = if.test; sourceTree = ""; }; @@ -850,10 +785,8 @@ F96D443108F272B8004A47F5 /* man2tcl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = man2tcl.c; sourceTree = ""; }; F96D443208F272B8004A47F5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; F96D443308F272B8004A47F5 /* regexpTestLib.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = regexpTestLib.tcl; sourceTree = ""; }; - F96D443408F272B8004A47F5 /* str2c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = str2c; sourceTree = ""; }; F96D443508F272B8004A47F5 /* tcl.hpj.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.hpj.in; sourceTree = ""; }; F96D443608F272B8004A47F5 /* tcl.wse.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.wse.in; sourceTree = ""; }; - F96D443708F272B9004A47F5 /* tclmin.wse */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tclmin.wse; sourceTree = ""; }; F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = "tcltk-man2html.tcl"; sourceTree = ""; }; F96D443A08F272B9004A47F5 /* tclZIC.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tclZIC.tcl; sourceTree = ""; }; F96D443B08F272B9004A47F5 /* uniClass.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniClass.tcl; sourceTree = ""; }; @@ -941,6 +874,13 @@ F96D449808F272BA004A47F5 /* tclWinThrd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinThrd.c; sourceTree = ""; }; F96D449908F272BA004A47F5 /* tclWinThrd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclWinThrd.h; sourceTree = ""; }; F96D449A08F272BA004A47F5 /* tclWinTime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTime.c; sourceTree = ""; }; + F974D56C0FBE7D6300BF728B /* http11.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http11.test; sourceTree = ""; }; + F974D56D0FBE7D6300BF728B /* httpd11.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd11.tcl; sourceTree = ""; }; + F974D5720FBE7DC600BF728B /* coroutine.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = coroutine.n; sourceTree = ""; }; + F974D5760FBE7E1900BF728B /* tailcall.n */ = {isa = PBXFileReference; explicitFileType = text.man; fileEncoding = 4; path = tailcall.n; sourceTree = ""; }; + F974D5770FBE7E6100BF728B /* coroutine.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = coroutine.test; sourceTree = ""; }; + F974D5780FBE7E6100BF728B /* tailcall.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = tailcall.test; sourceTree = ""; }; + F974D5790FBE7E9C00BF728B /* tcl.pc.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tcl.pc.in; sourceTree = ""; }; F97AE7F10B65C1E900310EA2 /* Tcl-Common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Common.xcconfig"; sourceTree = ""; }; F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Release.xcconfig"; sourceTree = ""; }; F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tcl-Debug.xcconfig"; sourceTree = ""; }; @@ -981,7 +921,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2008 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.43 2008/12/20 01:56:40 das Exp $\n"; + comments = "Copyright (c) 2004-2009 Daniel A. Steffen \nCopyright 2008-2009, Apple Inc.\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.44 2009/06/26 18:14:25 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -1001,6 +941,7 @@ isa = PBXGroup; children = ( F9183E6A0EFC81560030B814 /* README */, + F946FB8B0FBE3AED00CD6495 /* itcl */, F9183E8F0EFC817B0030B814 /* tdbc */, ); path = pkgs; @@ -1071,6 +1012,7 @@ F96D3E1808F272A5004A47F5 /* concat.n */, F96D3E1908F272A5004A47F5 /* continue.n */, F93599D20DF1F8DF00E04F67 /* copy.n */, + F974D5720FBE7DC600BF728B /* coroutine.n */, F96D3E1A08F272A5004A47F5 /* CrtChannel.3 */, F96D3E1B08F272A5004A47F5 /* CrtChnlHdlr.3 */, F96D3E1C08F272A5004A47F5 /* CrtCloseHdlr.3 */, @@ -1226,6 +1168,7 @@ F96D3EAA08F272A7004A47F5 /* subst.n */, F96D3EAB08F272A7004A47F5 /* SubstObj.3 */, F96D3EAC08F272A7004A47F5 /* switch.n */, + F974D5760FBE7E1900BF728B /* tailcall.n */, F96D3EAD08F272A7004A47F5 /* Tcl.n */, F99D61180EF5573A00BBFE01 /* TclZlib.3 */, F96D3EAE08F272A7004A47F5 /* Tcl_Main.3 */, @@ -1481,18 +1424,10 @@ F96D425C08F272B2004A47F5 /* libtommath */ = { isa = PBXGroup; children = ( - F96D425F08F272B3004A47F5 /* bn.pdf */, - F96D426108F272B3004A47F5 /* bn_error.c */, - F96D426208F272B3004A47F5 /* bn_fast_mp_invmod.c */, - F96D426308F272B3004A47F5 /* bn_fast_mp_montgomery_reduce.c */, F96D426408F272B3004A47F5 /* bn_fast_s_mp_mul_digs.c */, - F96D426508F272B3004A47F5 /* bn_fast_s_mp_mul_high_digs.c */, F96D426608F272B3004A47F5 /* bn_fast_s_mp_sqr.c */, - F96D426708F272B3004A47F5 /* bn_mp_2expt.c */, - F96D426808F272B3004A47F5 /* bn_mp_abs.c */, F96D426908F272B3004A47F5 /* bn_mp_add.c */, F96D426A08F272B3004A47F5 /* bn_mp_add_d.c */, - F96D426B08F272B3004A47F5 /* bn_mp_addmod.c */, F96D426C08F272B3004A47F5 /* bn_mp_and.c */, F96D426D08F272B3004A47F5 /* bn_mp_clamp.c */, F96D426E08F272B3004A47F5 /* bn_mp_clear.c */, @@ -1500,7 +1435,6 @@ F96D427008F272B3004A47F5 /* bn_mp_cmp.c */, F96D427108F272B3004A47F5 /* bn_mp_cmp_d.c */, F96D427208F272B3004A47F5 /* bn_mp_cmp_mag.c */, - F96D427308F272B3004A47F5 /* bn_mp_cnt_lsb.c */, F96D427408F272B3004A47F5 /* bn_mp_copy.c */, F96D427508F272B3004A47F5 /* bn_mp_count_bits.c */, F96D427608F272B3004A47F5 /* bn_mp_div.c */, @@ -1508,104 +1442,49 @@ F96D427808F272B3004A47F5 /* bn_mp_div_2d.c */, F96D427908F272B3004A47F5 /* bn_mp_div_3.c */, F96D427A08F272B3004A47F5 /* bn_mp_div_d.c */, - F96D427B08F272B3004A47F5 /* bn_mp_dr_is_modulus.c */, - F96D427C08F272B3004A47F5 /* bn_mp_dr_reduce.c */, - F96D427D08F272B3004A47F5 /* bn_mp_dr_setup.c */, F96D427E08F272B3004A47F5 /* bn_mp_exch.c */, F96D427F08F272B3004A47F5 /* bn_mp_expt_d.c */, - F96D428008F272B3004A47F5 /* bn_mp_exptmod.c */, - F96D428108F272B3004A47F5 /* bn_mp_exptmod_fast.c */, - F96D428208F272B3004A47F5 /* bn_mp_exteuclid.c */, - F96D428308F272B3004A47F5 /* bn_mp_fread.c */, - F96D428408F272B3004A47F5 /* bn_mp_fwrite.c */, - F96D428508F272B3004A47F5 /* bn_mp_gcd.c */, - F96D428608F272B3004A47F5 /* bn_mp_get_int.c */, F96D428708F272B3004A47F5 /* bn_mp_grow.c */, F96D428808F272B3004A47F5 /* bn_mp_init.c */, F96D428908F272B3004A47F5 /* bn_mp_init_copy.c */, F96D428A08F272B3004A47F5 /* bn_mp_init_multi.c */, F96D428B08F272B3004A47F5 /* bn_mp_init_set.c */, - F96D428C08F272B3004A47F5 /* bn_mp_init_set_int.c */, F96D428D08F272B3004A47F5 /* bn_mp_init_size.c */, - F96D428E08F272B3004A47F5 /* bn_mp_invmod.c */, - F96D428F08F272B3004A47F5 /* bn_mp_invmod_slow.c */, - F96D429008F272B3004A47F5 /* bn_mp_is_square.c */, - F96D429108F272B3004A47F5 /* bn_mp_jacobi.c */, F96D429208F272B3004A47F5 /* bn_mp_karatsuba_mul.c */, F96D429308F272B3004A47F5 /* bn_mp_karatsuba_sqr.c */, - F96D429408F272B3004A47F5 /* bn_mp_lcm.c */, F96D429508F272B3004A47F5 /* bn_mp_lshd.c */, F96D429608F272B3004A47F5 /* bn_mp_mod.c */, F96D429708F272B3004A47F5 /* bn_mp_mod_2d.c */, - F96D429808F272B3004A47F5 /* bn_mp_mod_d.c */, - F96D429908F272B3004A47F5 /* bn_mp_montgomery_calc_normalization.c */, - F96D429A08F272B3004A47F5 /* bn_mp_montgomery_reduce.c */, - F96D429B08F272B3004A47F5 /* bn_mp_montgomery_setup.c */, F96D429C08F272B3004A47F5 /* bn_mp_mul.c */, F96D429D08F272B3004A47F5 /* bn_mp_mul_2.c */, F96D429E08F272B3004A47F5 /* bn_mp_mul_2d.c */, F96D429F08F272B3004A47F5 /* bn_mp_mul_d.c */, - F96D42A008F272B3004A47F5 /* bn_mp_mulmod.c */, - F96D42A108F272B3004A47F5 /* bn_mp_n_root.c */, F96D42A208F272B3004A47F5 /* bn_mp_neg.c */, F96D42A308F272B3004A47F5 /* bn_mp_or.c */, - F96D42A408F272B3004A47F5 /* bn_mp_prime_fermat.c */, - F96D42A508F272B3004A47F5 /* bn_mp_prime_is_divisible.c */, - F96D42A608F272B3004A47F5 /* bn_mp_prime_is_prime.c */, - F96D42A708F272B3004A47F5 /* bn_mp_prime_miller_rabin.c */, - F96D42A808F272B3004A47F5 /* bn_mp_prime_next_prime.c */, - F96D42A908F272B3004A47F5 /* bn_mp_prime_rabin_miller_trials.c */, - F96D42AA08F272B3004A47F5 /* bn_mp_prime_random_ex.c */, F96D42AB08F272B3004A47F5 /* bn_mp_radix_size.c */, F96D42AC08F272B3004A47F5 /* bn_mp_radix_smap.c */, - F96D42AD08F272B3004A47F5 /* bn_mp_rand.c */, F96D42AE08F272B3004A47F5 /* bn_mp_read_radix.c */, - F96D42AF08F272B3004A47F5 /* bn_mp_read_signed_bin.c */, - F96D42B008F272B3004A47F5 /* bn_mp_read_unsigned_bin.c */, - F96D42B108F272B3004A47F5 /* bn_mp_reduce.c */, - F96D42B208F272B3004A47F5 /* bn_mp_reduce_2k.c */, - F96D42B308F272B3004A47F5 /* bn_mp_reduce_2k_l.c */, - F96D42B408F272B3004A47F5 /* bn_mp_reduce_2k_setup.c */, - F96D42B508F272B3004A47F5 /* bn_mp_reduce_2k_setup_l.c */, - F96D42B608F272B3004A47F5 /* bn_mp_reduce_is_2k.c */, - F96D42B708F272B3004A47F5 /* bn_mp_reduce_is_2k_l.c */, - F96D42B808F272B3004A47F5 /* bn_mp_reduce_setup.c */, F96D42B908F272B3004A47F5 /* bn_mp_rshd.c */, F96D42BA08F272B3004A47F5 /* bn_mp_set.c */, - F96D42BB08F272B3004A47F5 /* bn_mp_set_int.c */, F96D42BC08F272B3004A47F5 /* bn_mp_shrink.c */, - F96D42BD08F272B3004A47F5 /* bn_mp_signed_bin_size.c */, F96D42BE08F272B3004A47F5 /* bn_mp_sqr.c */, - F96D42BF08F272B3004A47F5 /* bn_mp_sqrmod.c */, F96D42C008F272B3004A47F5 /* bn_mp_sqrt.c */, F96D42C108F272B3004A47F5 /* bn_mp_sub.c */, F96D42C208F272B3004A47F5 /* bn_mp_sub_d.c */, - F96D42C308F272B3004A47F5 /* bn_mp_submod.c */, - F96D42C408F272B3004A47F5 /* bn_mp_to_signed_bin.c */, - F96D42C508F272B3004A47F5 /* bn_mp_to_signed_bin_n.c */, F96D42C608F272B3004A47F5 /* bn_mp_to_unsigned_bin.c */, F96D42C708F272B3004A47F5 /* bn_mp_to_unsigned_bin_n.c */, F96D42C808F272B3004A47F5 /* bn_mp_toom_mul.c */, F96D42C908F272B3004A47F5 /* bn_mp_toom_sqr.c */, - F96D42CA08F272B3004A47F5 /* bn_mp_toradix.c */, F96D42CB08F272B3004A47F5 /* bn_mp_toradix_n.c */, F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */, F96D42CD08F272B3004A47F5 /* bn_mp_xor.c */, F96D42CE08F272B3004A47F5 /* bn_mp_zero.c */, - F96D42CF08F272B3004A47F5 /* bn_prime_tab.c */, F96D42D008F272B3004A47F5 /* bn_reverse.c */, F96D42D108F272B3004A47F5 /* bn_s_mp_add.c */, - F96D42D208F272B3004A47F5 /* bn_s_mp_exptmod.c */, F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */, - F96D42D408F272B3004A47F5 /* bn_s_mp_mul_high_digs.c */, F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */, F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */, F96D42D708F272B3004A47F5 /* bncore.c */, - F96D42D908F272B3004A47F5 /* callgraph.txt */, - F96D42DA08F272B3004A47F5 /* changes.txt */, - F96D42F008F272B3004A47F5 /* LICENSE */, - F96D431D08F272B4004A47F5 /* poster.pdf */, - F96D432608F272B4004A47F5 /* tommath.pdf */, F96D432908F272B4004A47F5 /* tommath_class.h */, F96D432A08F272B4004A47F5 /* tommath_superclass.h */, ); @@ -1655,6 +1534,7 @@ F96D435608F272B5004A47F5 /* compile.test */, F96D435708F272B5004A47F5 /* concat.test */, F96D435808F272B5004A47F5 /* config.test */, + F974D5770FBE7E6100BF728B /* coroutine.test */, F96D435908F272B5004A47F5 /* dcall.test */, F96D435A08F272B5004A47F5 /* dict.test */, F96D435C08F272B5004A47F5 /* dstring.test */, @@ -1677,7 +1557,9 @@ F96D436E08F272B6004A47F5 /* get.test */, F96D436F08F272B6004A47F5 /* history.test */, F96D437008F272B6004A47F5 /* http.test */, + F974D56C0FBE7D6300BF728B /* http11.test */, F96D437108F272B6004A47F5 /* httpd */, + F974D56D0FBE7D6300BF728B /* httpd11.tcl */, F96D437208F272B6004A47F5 /* httpold.test */, F96D437308F272B6004A47F5 /* if-old.test */, F96D437408F272B6004A47F5 /* if.test */, @@ -1750,6 +1632,7 @@ F96D43B408F272B7004A47F5 /* stringObj.test */, F96D43B508F272B7004A47F5 /* subst.test */, F96D43B608F272B7004A47F5 /* switch.test */, + F974D5780FBE7E6100BF728B /* tailcall.test */, F96D43B708F272B7004A47F5 /* tcltest.test */, F96D43B808F272B7004A47F5 /* thread.test */, F96D43B908F272B7004A47F5 /* timer.test */, @@ -1761,7 +1644,6 @@ F96D43BF08F272B7004A47F5 /* unixNotfy.test */, F96D43C008F272B7004A47F5 /* unknown.test */, F96D43C108F272B7004A47F5 /* unload.test */, - F91DC23D0E44C530002CB8D1 /* unsupported.test */, F96D43C208F272B7004A47F5 /* uplevel.test */, F96D43C308F272B7004A47F5 /* upvar.test */, F96D43C408F272B7004A47F5 /* utf.test */, @@ -1803,13 +1685,10 @@ F96D443108F272B8004A47F5 /* man2tcl.c */, F96D443208F272B8004A47F5 /* README */, F96D443308F272B8004A47F5 /* regexpTestLib.tcl */, - F96D443408F272B8004A47F5 /* str2c */, F96D443508F272B8004A47F5 /* tcl.hpj.in */, F96D443608F272B8004A47F5 /* tcl.wse.in */, - F96D443708F272B9004A47F5 /* tclmin.wse */, F96D443908F272B9004A47F5 /* tcltk-man2html.tcl */, F96D443A08F272B9004A47F5 /* tclZIC.tcl */, - F92D7F140DE777670033A13A /* tsdPerf.c */, F92D7F100DE777240033A13A /* tsdPerf.tcl */, F96D443B08F272B9004A47F5 /* uniClass.tcl */, F96D443C08F272B9004A47F5 /* uniParse.tcl */, @@ -1830,6 +1709,7 @@ F96D445008F272B9004A47F5 /* Makefile.in */, F96D445208F272B9004A47F5 /* README */, F96D445308F272B9004A47F5 /* tcl.m4 */, + F974D5790FBE7E9C00BF728B /* tcl.pc.in */, F96D445408F272B9004A47F5 /* tcl.spec */, F96D445508F272B9004A47F5 /* tclAppInit.c */, F96D445608F272B9004A47F5 /* tclConfig.h.in */, @@ -1940,10 +1820,10 @@ isa = PBXNativeTarget; buildConfigurationList = F95CC8B009158F3100EA5ACE /* Build configuration list for PBXNativeTarget "tcltest" */; buildPhases = ( - F9A5C5F508F651A2008AE941 /* ShellScript */, + F9A5C5F508F651A2008AE941 /* Configure Tcl */, 8DD76FAB0486AB0100D96B5E /* Sources */, 8DD76FAD0486AB0100D96B5E /* Frameworks */, - F95FA74C0B32CE190072E431 /* ShellScript */, + F95FA74C0B32CE190072E431 /* Build dltest */, ); buildRules = ( ); @@ -1959,7 +1839,7 @@ isa = PBXNativeTarget; buildConfigurationList = F97258A80A86873D00096C78 /* Build configuration list for PBXNativeTarget "tests" */; buildPhases = ( - F97258A40A86873C00096C78 /* ShellScript */, + F97258A40A86873C00096C78 /* Run Testsuite */, ); buildRules = ( ); @@ -1974,7 +1854,7 @@ isa = PBXNativeTarget; buildConfigurationList = F95CC8AB09158F3100EA5ACE /* Build configuration list for PBXNativeTarget "Tcl" */; buildPhases = ( - F97AF02F0B665DA900310EA2 /* ShellScript */, + F97AF02F0B665DA900310EA2 /* Build Tcl */, ); buildRules = ( ); @@ -1994,7 +1874,7 @@ BuildIndependentTargetsInParallel = YES; }; buildConfigurationList = F95CC8B509158F3100EA5ACE /* Build configuration list for PBXProject "Tcl" */; - compatibilityVersion = "Xcode 3.1"; + compatibilityVersion = "Xcode 3.2"; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* Tcl */; projectDirPath = ""; @@ -2008,7 +1888,7 @@ /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ - F95FA74C0B32CE190072E431 /* ShellScript */ = { + F95FA74C0B32CE190072E431 /* Build dltest */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2023,6 +1903,7 @@ "$(TCL_SRCROOT)/unix/dltest/pkge.c", "$(TCL_SRCROOT)/unix/dltest/pkgua.c", ); + name = "Build dltest"; outputPaths = ( "$(DERIVED_FILE_DIR)/tcl/dltest.marker", ); @@ -2031,13 +1912,14 @@ shellScript = "## dltest build script phase\n\nrm -f \"${DERIVED_FILE_DIR}/tcl/dltest.marker\"\nmake -C \"${DERIVED_FILE_DIR}/tcl\" dltest.marker\nln -fsh \"${DERIVED_FILE_DIR}/tcl/dltest\" \"${CONFIGURATION_BUILD_DIR}\"\n"; showEnvVarsInLog = 0; }; - F97258A40A86873C00096C78 /* ShellScript */ = { + F97258A40A86873C00096C78 /* Run Testsuite */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Run Testsuite"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -2045,7 +1927,7 @@ shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\nif [ -z \"${HOME}\" ]; then export HOME=\"$(echo ~)\"; fi\ncd \"${TARGET_TEMP_DIR}\"; rm -rf \"${DERIVED_FILE_DIR}\"; mkdir -p \"${DERIVED_FILE_DIR}\"\nprintf '%s%s%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${TCL_SRCROOT}\" '/tests}]\nconfigure -tmpdir [file normalize {' \"${DERIVED_FILE_DIR}\" '}]\nconfigure -verbose [concat [configure -verbose] line]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi"; showEnvVarsInLog = 0; }; - F97AF02F0B665DA900310EA2 /* ShellScript */ = { + F97AF02F0B665DA900310EA2 /* Build Tcl */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2053,15 +1935,16 @@ inputPaths = ( "${TARGET_TEMP_DIR}/.none", ); + name = "Build Tcl"; outputPaths = ( "${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "if [ -e \"${TARGET_BUILD_DIR}/tclsh\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh\" \"${TARGET_BUILD_DIR}/tclsh${VERSION}\"\nfi\ngnumake -C \"${TCL_SRCROOT}/macosx\" -j \"$(sysctl -n hw.activecpu)\" \"$(echo \"${ACTION}\" | sed -e s/build// -e s/clean/distclean/ -e s/..\\*/\\&-/)${MAKE_TARGET}\" CFLAGS_WARNING=\"${WARNING_CFLAGS}\" CFLAGS_OPTIMIZE=\"-O${GCC_OPTIMIZATION_LEVEL}\" SYMROOT=\"${BUILT_PRODUCTS_DIR}\" OBJ_DIR=\"${OBJECT_FILE_DIR}\" INSTALL_ROOT=\"${DSTROOT}\" PREFIX=\"${PREFIX}\" BINDIR=\"${BINDIR}\" LIBDIR=\"${FRAMEWORK_INSTALL_PATH}\" MANDIR=\"${MANDIR}\" EXTRA_CONFIGURE_ARGS=\"${CONFIGURE_ARGS}\" ${EXTRA_MAKE_FLAGS}\nresult=$?\nif [ -e \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" \"${TARGET_BUILD_DIR}/tclsh\"\nfi\nif [ -e \"${BUILT_PRODUCTS_DIR}/tcltest\" ]; then\n\trm -f \"${BUILT_PRODUCTS_DIR}/tcltest\"\nfi\necho \"Done\"\nrm -f \"${SCRIPT_INPUT_FILE_0}\"\nexit ${result}\n"; + shellScript = "if [ -e \"${TARGET_BUILD_DIR}/tclsh\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh\" \"${TARGET_BUILD_DIR}/tclsh${VERSION}\"\nfi\nexport CC=$(xcrun -find ${GCC} || echo ${GCC}); export LD=${CC}\ngnumake -C \"${TCL_SRCROOT}/macosx\" -j \"$(sysctl -n hw.activecpu)\" \"$(echo \"${ACTION}\" | sed -e s/build// -e s/clean/distclean/ -e s/..\\*/\\&-/)${MAKE_TARGET}\" CFLAGS_WARNING=\"${WARNING_CFLAGS}\" CFLAGS_OPTIMIZE=\"-O${GCC_OPTIMIZATION_LEVEL}\" SYMROOT=\"${BUILT_PRODUCTS_DIR}\" OBJ_DIR=\"${OBJECT_FILE_DIR}\" INSTALL_ROOT=\"${DSTROOT}\" PREFIX=\"${PREFIX}\" BINDIR=\"${BINDIR}\" LIBDIR=\"${FRAMEWORK_INSTALL_PATH}\" MANDIR=\"${MANDIR}\" EXTRA_CONFIGURE_ARGS=\"${CONFIGURE_ARGS}\" ${EXTRA_MAKE_FLAGS}\nresult=$?\nif [ -e \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" ]; then\n mv -f \"${TARGET_BUILD_DIR}/tclsh${VERSION}\" \"${TARGET_BUILD_DIR}/tclsh\"\nfi\nif [ -e \"${BUILT_PRODUCTS_DIR}/tcltest\" ]; then\n\trm -f \"${BUILT_PRODUCTS_DIR}/tcltest\"\nfi\necho \"Done\"\nrm -f \"${SCRIPT_INPUT_FILE_0}\"\nexit ${result}\n"; showEnvVarsInLog = 0; }; - F9A5C5F508F651A2008AE941 /* ShellScript */ = { + F9A5C5F508F651A2008AE941 /* Configure Tcl */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2075,12 +1958,13 @@ "$(TCL_SRCROOT)/unix/Makefile.in", "$(TCL_SRCROOT)/unix/dltest/Makefile.in", ); + name = "Configure Tcl"; outputPaths = ( "$(DERIVED_FILE_DIR)/tcl/tclConfig.sh", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n"; + shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -2288,8 +2172,8 @@ baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.5; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; PREBINDING = NO; }; name = ReleaseUniversal; @@ -2324,8 +2208,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --enable-symbols=all"; - MACOSX_DEPLOYMENT_TARGET = 10.5; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugMemCompile; @@ -2334,9 +2224,15 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; - MACOSX_DEPLOYMENT_TARGET = 10.5; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(OTHER_LDFLAGS)", "-lgcov", @@ -2365,7 +2261,7 @@ buildSettings = { CODE_SIGN_IDENTITY = ""; PRODUCT_NAME = tests; - TCLTEST_OPTIONS = "-notfile http.test"; + TCLTEST_OPTIONS = ""; TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; @@ -2387,13 +2283,13 @@ }; name = Release; }; - F95CC8AE09158F3100EA5ACE /* DebugNoFixZL */ = { + F95CC8AE09158F3100EA5ACE /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F95CC8B109158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; @@ -2417,18 +2313,24 @@ }; name = Release; }; - F95CC8B309158F3100EA5ACE /* DebugNoFixZL */ = { + F95CC8B309158F3100EA5ACE /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tcltest; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F95CC8B609158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - MACOSX_DEPLOYMENT_TARGET = 10.5; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = Debug; @@ -2437,19 +2339,31 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - MACOSX_DEPLOYMENT_TARGET = 10.5; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = Release; }; - F95CC8B809158F3100EA5ACE /* DebugNoFixZL */ = { + F95CC8B809158F3100EA5ACE /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - MACOSX_DEPLOYMENT_TARGET = 10.5; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F97258A90A86873D00096C78 /* Debug */ = { isa = XCBuildConfiguration; @@ -2473,7 +2387,7 @@ }; name = Release; }; - F97258AB0A86873D00096C78 /* DebugNoFixZL */ = { + F97258AB0A86873D00096C78 /* DebugNoFixAndContinue */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -2482,7 +2396,7 @@ TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = DebugNoFixZL; + name = DebugNoFixAndContinue; }; F97258AC0A86873D00096C78 /* ReleaseUniversal */ = { isa = XCBuildConfiguration; @@ -2495,39 +2409,6 @@ }; name = ReleaseUniversal; }; - F97AED080B660A6C00310EA2 /* ReleaseUniversal10.4uSDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - PRODUCT_NAME = tests; - TCLTEST_OPTIONS = ""; - TCL_LIBRARY = "$(TCL_SRCROOT)/library"; - TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; - }; - name = ReleaseUniversal10.4uSDK; - }; - F97AED0F0B660AA300310EA2 /* ReleasePPC10.3.9SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - PRODUCT_NAME = tests; - TCLTEST_OPTIONS = ""; - TCL_LIBRARY = "$(TCL_SRCROOT)/library"; - TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; - }; - name = ReleasePPC10.3.9SDK; - }; - F97AED160B660AF100310EA2 /* ReleasePPC10.2.8SDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - PRODUCT_NAME = tests; - TCLTEST_OPTIONS = ""; - TCL_LIBRARY = "$(TCL_SRCROOT)/library"; - TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; - }; - name = ReleasePPC10.2.8SDK; - }; F97AED1B0B660B2100310EA2 /* Debug64bit */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2561,7 +2442,7 @@ ARCHS = "$(NATIVE_ARCH_64_BIT)"; CONFIGURE_ARGS = "--enable-64bit $(CONFIGURE_ARGS)"; CPPFLAGS = "-arch $(NATIVE_ARCH_64_BIT) $(CPPFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.5; + MACOSX_DEPLOYMENT_TARGET = 10.6; PREBINDING = NO; }; name = Debug64bit; @@ -2570,8 +2451,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-corefoundation"; - MACOSX_DEPLOYMENT_TARGET = 10.5; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugNoCF; @@ -2606,8 +2493,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-threads --disable-corefoundation"; - MACOSX_DEPLOYMENT_TARGET = 10.5; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugNoCFUnthreaded; @@ -2638,25 +2531,31 @@ }; name = DebugNoCFUnthreaded; }; - F9988AB10D814C6500B6B03B /* Debug gcc42 */ = { + F9988AB10D814C6500B6B03B /* Debug gcc40 */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - GCC_VERSION = 4.2; - MACOSX_DEPLOYMENT_TARGET = 10.5; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + GCC_VERSION = 4.0; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; - name = "Debug gcc42"; + name = "Debug gcc40"; }; - F9988AB20D814C6500B6B03B /* Debug gcc42 */ = { + F9988AB20D814C6500B6B03B /* Debug gcc40 */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = "Debug gcc42"; + name = "Debug gcc40"; }; - F9988AB30D814C6500B6B03B /* Debug gcc42 */ = { + F9988AB30D814C6500B6B03B /* Debug gcc40 */ = { isa = XCBuildConfiguration; buildSettings = { CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; @@ -2669,9 +2568,9 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = tcltest; }; - name = "Debug gcc42"; + name = "Debug gcc40"; }; - F9988AB40D814C6500B6B03B /* Debug gcc42 */ = { + F9988AB40D814C6500B6B03B /* Debug gcc40 */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -2680,28 +2579,34 @@ TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = "Debug gcc42"; + name = "Debug gcc40"; }; - F9988AB50D814C7500B6B03B /* Debug llvmgcc42 */ = { + F9988AB50D814C7500B6B03B /* Debug llvm-gcc */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - CC = "$(DEVELOPER_DIR)/usr/bin/llvm-gcc-4.2"; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + GCC = "llvm-gcc"; GCC_VERSION = com.apple.compilers.llvmgcc42; - MACOSX_DEPLOYMENT_TARGET = 10.5; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; - name = "Debug llvmgcc42"; + name = "Debug llvm-gcc"; }; - F9988AB60D814C7500B6B03B /* Debug llvmgcc42 */ = { + F9988AB60D814C7500B6B03B /* Debug llvm-gcc */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = "Debug llvmgcc42"; + name = "Debug llvm-gcc"; }; - F9988AB70D814C7500B6B03B /* Debug llvmgcc42 */ = { + F9988AB70D814C7500B6B03B /* Debug llvm-gcc */ = { isa = XCBuildConfiguration; buildSettings = { CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; @@ -2714,9 +2619,9 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = tcltest; }; - name = "Debug llvmgcc42"; + name = "Debug llvm-gcc"; }; - F9988AB80D814C7500B6B03B /* Debug llvmgcc42 */ = { + F9988AB80D814C7500B6B03B /* Debug llvm-gcc */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -2725,36 +2630,36 @@ TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = "Debug llvmgcc42"; + name = "Debug llvm-gcc"; }; - F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc42 */ = { + F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; - GCC_VERSION = 4.2; - MACOSX_DEPLOYMENT_TARGET = 10.5; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; + GCC_VERSION = 4.0; + MACOSX_DEPLOYMENT_TARGET = 10.6; PREBINDING = NO; }; - name = "ReleaseUniversal gcc42"; + name = "ReleaseUniversal gcc40"; }; - F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc42 */ = { + F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = "ReleaseUniversal gcc42"; + name = "ReleaseUniversal gcc40"; }; - F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc42 */ = { + F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tcltest; }; - name = "ReleaseUniversal gcc42"; + name = "ReleaseUniversal gcc40"; }; - F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc42 */ = { + F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc40 */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -2763,44 +2668,39 @@ TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = "ReleaseUniversal gcc42"; + name = "ReleaseUniversal gcc40"; }; - F9988BB50D81587400B6B03B /* ReleaseUniversal llvmgcc42 */ = { + F9988BB50D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CC = "$(DEVELOPER_DIR)/usr/bin/llvm-gcc-4.2"; - CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; DEBUG_INFORMATION_FORMAT = dwarf; + GCC = "llvm-gcc"; GCC_OPTIMIZATION_LEVEL = 4; GCC_VERSION = com.apple.compilers.llvmgcc42; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ( - "$(OTHER_CFLAGS)", - "-emit-llvm", - ); + MACOSX_DEPLOYMENT_TARGET = 10.6; PREBINDING = NO; - TCL_CONFIGURE_ARGS = "$(TCL_CONFIGURE_ARGS) --disable-dtrace"; }; - name = "ReleaseUniversal llvmgcc42"; + name = "ReleaseUniversal llvm-gcc"; }; - F9988BB60D81587400B6B03B /* ReleaseUniversal llvmgcc42 */ = { + F9988BB60D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = "ReleaseUniversal llvmgcc42"; + name = "ReleaseUniversal llvm-gcc"; }; - F9988BB70D81587400B6B03B /* ReleaseUniversal llvmgcc42 */ = { + F9988BB70D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tcltest; }; - name = "ReleaseUniversal llvmgcc42"; + name = "ReleaseUniversal llvm-gcc"; }; - F9988BB80D81587400B6B03B /* ReleaseUniversal llvmgcc42 */ = { + F9988BB80D81587400B6B03B /* ReleaseUniversal llvm-gcc */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -2809,7 +2709,7 @@ TCL_LIBRARY = "$(TCL_SRCROOT)/library"; TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = "ReleaseUniversal llvmgcc42"; + name = "ReleaseUniversal llvm-gcc"; }; F99EE73B0BE835310060D4AF /* DebugUnthreaded */ = { isa = XCBuildConfiguration; @@ -2867,8 +2767,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --disable-threads"; - MACOSX_DEPLOYMENT_TARGET = 10.5; + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; }; name = DebugUnthreaded; @@ -2877,111 +2783,116 @@ isa = XCBuildConfiguration; baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; GCC_PREPROCESSOR_DEFINITIONS = ( PURIFY, "$(GCC_PREPROCESSOR_DEFINITIONS)", ); - MACOSX_DEPLOYMENT_TARGET = 10.5; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; + RUN_CLANG_STATIC_ANALYZER = YES; }; name = DebugLeaks; }; - F9DB62080B65ADA800A370FB /* ReleaseUniversal10.4uSDK */ = { + F9A9D1EF0FC77787002A2BE3 /* Debug clang */ = { isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; buildSettings = { - PRODUCT_NAME = tclsh; - SKIP_INSTALL = NO; - }; - name = ReleaseUniversal10.4uSDK; - }; - F9DB62090B65ADA800A370FB /* ReleaseUniversal10.4uSDK */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = tcltest; - }; - name = ReleaseUniversal10.4uSDK; - }; - F9DB620A0B65ADA800A370FB /* ReleaseUniversal10.4uSDK */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; - CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.4; - OTHER_LDFLAGS = ( - "-Wl,-no_arch_warnings", - "$(OTHER_LDFLAGS)", + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", ); + CPPFLAGS = "-arch $(CURRENT_ARCH) $(CPPFLAGS)"; + GCC = clang; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; - SDKROOT = macosx10.4; }; - name = ReleaseUniversal10.4uSDK; + name = "Debug clang"; }; - F9DB621F0B65AFDE00A370FB /* ReleasePPC10.3.9SDK */ = { + F9A9D1F00FC77787002A2BE3 /* Debug clang */ = { isa = XCBuildConfiguration; buildSettings = { - LDFLAGS = "-force_cpusubtype_ALL $(LDFLAGS)"; PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = ReleasePPC10.3.9SDK; + name = "Debug clang"; }; - F9DB62200B65AFDE00A370FB /* ReleasePPC10.3.9SDK */ = { + F9A9D1F10FC77787002A2BE3 /* Debug clang */ = { isa = XCBuildConfiguration; buildSettings = { + CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "__private_extern__=extern", + "$(GCC_PREPROCESSOR_DEFINITIONS)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; PRODUCT_NAME = tcltest; }; - name = ReleasePPC10.3.9SDK; + name = "Debug clang"; }; - F9DB62210B65AFDE00A370FB /* ReleasePPC10.3.9SDK */ = { + F9A9D1F20FC77787002A2BE3 /* Debug clang */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = "Debug clang"; + }; + F9A9D1F30FC77799002A2BE3 /* ReleaseUniversal clang */ = { isa = XCBuildConfiguration; baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ppc; - CFLAGS = "$(PER_ARCH_CFLAGS_ppc) $(CFLAGS)"; - CPPFLAGS = "-arch ppc -isysroot $(SDKROOT) $(CPPFLAGS)"; - MACOSX_DEPLOYMENT_TARGET = 10.3; - PREBINDING = YES; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; + ARCHS = ( + "$(NATIVE_ARCH_64_BIT)", + "$(NATIVE_ARCH_32_BIT)", + ); + CFLAGS = "-arch i386 -arch x86_64 $(CFLAGS)"; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC = clang; + GCC_OPTIMIZATION_LEVEL = 4; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + MACOSX_DEPLOYMENT_TARGET = 10.6; + PREBINDING = NO; }; - name = ReleasePPC10.3.9SDK; + name = "ReleaseUniversal clang"; }; - F9DB62350B65B03A00A370FB /* ReleasePPC10.2.8SDK */ = { + F9A9D1F40FC77799002A2BE3 /* ReleaseUniversal clang */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tclsh; SKIP_INSTALL = NO; }; - name = ReleasePPC10.2.8SDK; + name = "ReleaseUniversal clang"; }; - F9DB62360B65B03A00A370FB /* ReleasePPC10.2.8SDK */ = { + F9A9D1F50FC77799002A2BE3 /* ReleaseUniversal clang */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = tcltest; }; - name = ReleasePPC10.2.8SDK; + name = "ReleaseUniversal clang"; }; - F9DB62370B65B03A00A370FB /* ReleasePPC10.2.8SDK */ = { + F9A9D1F60FC77799002A2BE3 /* ReleaseUniversal clang */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { - ARCHS = ppc; - CFLAGS = "$(PER_ARCH_CFLAGS_ppc) -fconstant-cfstrings $(CFLAGS)"; - CPPFLAGS = "-arch ppc -D__CONSTANT_CFSTRINGS__ -DMAC_OS_X_VERSION_MIN_REQUIRED=1020 -nostdinc -isystem $(SDKROOT)/usr/include/gcc/darwin/$(GCC_VERSION) -isystem $(SDKROOT)/usr/include -F$(SDKROOT)/System/Library/Frameworks"; - DEBUG_INFORMATION_FORMAT = stabs; - GCC = /usr/bin/gcc; - GCC_VERSION = 3.3; - LDFLAGS = "-L$(SDKROOT)/usr/lib/gcc/darwin/$(GCC_VERSION) -Wl,-syslibroot,$(SDKROOT)"; - MACOSX_DEPLOYMENT_TARGET = 10.2; - PREBINDING = YES; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.2.8.sdk"; - WARNING_CFLAGS = ( - "$(WARNING_CFLAGS_GCC3)", - "-Wno-long-double", - ); + CODE_SIGN_IDENTITY = ""; + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; }; - name = ReleasePPC10.2.8SDK; + name = "ReleaseUniversal clang"; }; F9EEED960C2FEFD300396116 /* ReleaseUniversal10.5SDK */ = { isa = XCBuildConfiguration; @@ -3014,7 +2925,7 @@ baseConfigurationReference = F97AE82B0B65C69B00310EA2 /* Tcl-Release.xcconfig */; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CFLAGS = "-arch i386 -arch x86_64 -arch ppc -arch ppc64 $(CFLAGS)"; + CFLAGS = "-arch i386 -arch x86_64 -arch ppc $(CFLAGS)"; CPPFLAGS = "-isysroot $(SDKROOT) $(CPPFLAGS)"; MACOSX_DEPLOYMENT_TARGET = 10.5; PREBINDING = NO; @@ -3029,9 +2940,10 @@ isa = XCConfigurationList; buildConfigurations = ( F95CC8AC09158F3100EA5ACE /* Debug */, - F9988AB20D814C6500B6B03B /* Debug gcc42 */, - F9988AB60D814C7500B6B03B /* Debug llvmgcc42 */, - F95CC8AE09158F3100EA5ACE /* DebugNoFixZL */, + F9A9D1F00FC77787002A2BE3 /* Debug clang */, + F9988AB60D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB20D814C6500B6B03B /* Debug gcc40 */, + F95CC8AE09158F3100EA5ACE /* DebugNoFixAndContinue */, F99EE73B0BE835310060D4AF /* DebugUnthreaded */, F98751300DE7B57E00B1C9EC /* DebugNoCF */, F98751340DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -3041,12 +2953,10 @@ F97AED1B0B660B2100310EA2 /* Debug64bit */, F95CC8AD09158F3100EA5ACE /* Release */, F91BCC4F093152310042A6BF /* ReleaseUniversal */, - F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc42 */, - F9988BB60D81587400B6B03B /* ReleaseUniversal llvmgcc42 */, + F9A9D1F40FC77799002A2BE3 /* ReleaseUniversal clang */, + F9988BB60D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB20D81586D00B6B03B /* ReleaseUniversal gcc40 */, F9EEED960C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - F9DB62080B65ADA800A370FB /* ReleaseUniversal10.4uSDK */, - F9DB621F0B65AFDE00A370FB /* ReleasePPC10.3.9SDK */, - F9DB62350B65B03A00A370FB /* ReleasePPC10.2.8SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -3055,9 +2965,10 @@ isa = XCConfigurationList; buildConfigurations = ( F95CC8B109158F3100EA5ACE /* Debug */, - F9988AB30D814C6500B6B03B /* Debug gcc42 */, - F9988AB70D814C7500B6B03B /* Debug llvmgcc42 */, - F95CC8B309158F3100EA5ACE /* DebugNoFixZL */, + F9A9D1F10FC77787002A2BE3 /* Debug clang */, + F9988AB70D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB30D814C6500B6B03B /* Debug gcc40 */, + F95CC8B309158F3100EA5ACE /* DebugNoFixAndContinue */, F99EE73D0BE835310060D4AF /* DebugUnthreaded */, F98751310DE7B57E00B1C9EC /* DebugNoCF */, F98751350DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -3067,12 +2978,10 @@ F97AED1C0B660B2100310EA2 /* Debug64bit */, F95CC8B209158F3100EA5ACE /* Release */, F91BCC50093152310042A6BF /* ReleaseUniversal */, - F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc42 */, - F9988BB70D81587400B6B03B /* ReleaseUniversal llvmgcc42 */, + F9A9D1F50FC77799002A2BE3 /* ReleaseUniversal clang */, + F9988BB70D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB30D81586D00B6B03B /* ReleaseUniversal gcc40 */, F9EEED970C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - F9DB62090B65ADA800A370FB /* ReleaseUniversal10.4uSDK */, - F9DB62200B65AFDE00A370FB /* ReleasePPC10.3.9SDK */, - F9DB62360B65B03A00A370FB /* ReleasePPC10.2.8SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -3081,9 +2990,10 @@ isa = XCConfigurationList; buildConfigurations = ( F95CC8B609158F3100EA5ACE /* Debug */, - F9988AB10D814C6500B6B03B /* Debug gcc42 */, - F9988AB50D814C7500B6B03B /* Debug llvmgcc42 */, - F95CC8B809158F3100EA5ACE /* DebugNoFixZL */, + F9A9D1EF0FC77787002A2BE3 /* Debug clang */, + F9988AB50D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB10D814C6500B6B03B /* Debug gcc40 */, + F95CC8B809158F3100EA5ACE /* DebugNoFixAndContinue */, F99EE7410BE835310060D4AF /* DebugUnthreaded */, F987512F0DE7B57E00B1C9EC /* DebugNoCF */, F98751330DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -3093,12 +3003,10 @@ F97AED1E0B660B2100310EA2 /* Debug64bit */, F95CC8B709158F3100EA5ACE /* Release */, F91BCC51093152310042A6BF /* ReleaseUniversal */, - F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc42 */, - F9988BB50D81587400B6B03B /* ReleaseUniversal llvmgcc42 */, + F9A9D1F30FC77799002A2BE3 /* ReleaseUniversal clang */, + F9988BB50D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB10D81586D00B6B03B /* ReleaseUniversal gcc40 */, F9EEED990C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - F9DB620A0B65ADA800A370FB /* ReleaseUniversal10.4uSDK */, - F9DB62210B65AFDE00A370FB /* ReleasePPC10.3.9SDK */, - F9DB62370B65B03A00A370FB /* ReleasePPC10.2.8SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -3107,9 +3015,10 @@ isa = XCConfigurationList; buildConfigurations = ( F97258A90A86873D00096C78 /* Debug */, - F9988AB40D814C6500B6B03B /* Debug gcc42 */, - F9988AB80D814C7500B6B03B /* Debug llvmgcc42 */, - F97258AB0A86873D00096C78 /* DebugNoFixZL */, + F9A9D1F20FC77787002A2BE3 /* Debug clang */, + F9988AB80D814C7500B6B03B /* Debug llvm-gcc */, + F9988AB40D814C6500B6B03B /* Debug gcc40 */, + F97258AB0A86873D00096C78 /* DebugNoFixAndContinue */, F99EE73F0BE835310060D4AF /* DebugUnthreaded */, F98751320DE7B57E00B1C9EC /* DebugNoCF */, F98751360DE7B5A200B1C9EC /* DebugNoCFUnthreaded */, @@ -3119,12 +3028,10 @@ F97AED1D0B660B2100310EA2 /* Debug64bit */, F97258AA0A86873D00096C78 /* Release */, F97258AC0A86873D00096C78 /* ReleaseUniversal */, - F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc42 */, - F9988BB80D81587400B6B03B /* ReleaseUniversal llvmgcc42 */, + F9A9D1F60FC77799002A2BE3 /* ReleaseUniversal clang */, + F9988BB80D81587400B6B03B /* ReleaseUniversal llvm-gcc */, + F9988BB40D81586D00B6B03B /* ReleaseUniversal gcc40 */, F9EEED980C2FEFD300396116 /* ReleaseUniversal10.5SDK */, - F97AED080B660A6C00310EA2 /* ReleaseUniversal10.4uSDK */, - F97AED0F0B660AA300310EA2 /* ReleasePPC10.3.9SDK */, - F97AED160B660AF100310EA2 /* ReleasePPC10.2.8SDK */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; diff --git a/unix/Makefile.in b/unix/Makefile.in index 301cd7f..312eac2 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.270 2009/05/29 16:28:40 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.271 2009/06/26 18:14:25 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1904,12 +1904,14 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(M $(MAC_OSX_DIR)/*.ac $(MAC_OSX_DIR)/*.xcconfig \ $(MAC_OSX_DIR)/configure $(DISTDIR)/macosx cp -p $(TOP_DIR)/license.terms $(DISTDIR)/macosx - mkdir $(DISTDIR)/macosx/Tcl.pbproj - cp -p $(MAC_OSX_DIR)/Tcl.pbproj/*.pbx* $(DISTDIR)/macosx/Tcl.pbproj mkdir $(DISTDIR)/macosx/Tcl.xcode - cp -p $(MAC_OSX_DIR)/Tcl.xcode/*.pbx* $(DISTDIR)/macosx/Tcl.xcode + cp -p $(MAC_OSX_DIR)/Tcl.xcode/project.pbxproj \ + $(MAC_OSX_DIR)/Tcl.xcode/default.pbxuser \ + $(DISTDIR)/macosx/Tcl.xcode mkdir $(DISTDIR)/macosx/Tcl.xcodeproj - cp -p $(TOP_DIR)/macosx/Tcl.xcodeproj/*.pbx* $(DISTDIR)/macosx/Tcl.xcodeproj + cp -p $(MAC_OSX_DIR)/Tcl.xcodeproj/project.pbxproj \ + $(MAC_OSX_DIR)/Tcl.xcodeproj/default.pbxuser \ + $(DISTDIR)/macosx/Tcl.xcodeproj mkdir $(DISTDIR)/unix/dltest cp -p $(UNIX_DIR)/dltest/*.c $(UNIX_DIR)/dltest/Makefile.in \ $(UNIX_DIR)/dltest/README \ -- cgit v0.12 From 93288b1b6b66e279ff92700ad78627879c3e3531 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 30 Jun 2009 00:56:08 +0000 Subject: * generic/tclInt.h: add assert macros for clang static * generic/tclPanic.c: analyzer and redefine Tcl_Panic to * generic/tclStubInit.c: assert after panic in clang PURIFY builds. * generic/tclCmdIL.c: add clang assert for false positive from static analyzer. --- ChangeLog | 10 ++++++++++ generic/tclCmdIL.c | 3 ++- generic/tclInt.h | 16 +++++++++++++++- generic/tclPanic.c | 3 ++- generic/tclStubInit.c | 3 ++- 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4717abd..79a0301 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-06-30 Daniel Steffen + + * generic/tclInt.h: add assert macros for clang static + * generic/tclPanic.c: analyzer and redefine Tcl_Panic to + * generic/tclStubInit.c: assert after panic in clang PURIFY + builds. + + * generic/tclCmdIL.c: add clang assert for false positive + from static analyzer. + 2009-06-26 Daniel Steffen * macosx/Tcl-Common.xcconfig: update projects for Xcode 3.1 and 3.2, diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index be62444..e86f686 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.165 2009/02/03 23:34:32 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.166 2009/06/30 00:56:08 das Exp $ */ #include "tclInt.h" @@ -2508,6 +2508,7 @@ Tcl_LrepeatObjCmd( * number of times. */ + CLANG_ASSERT(dataArray); if (objc == 1) { register Tcl_Obj *tmpPtr = objv[0]; diff --git a/generic/tclInt.h b/generic/tclInt.h index d75eaa6..80aec34 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.424 2009/06/18 09:41:27 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.425 2009/06/30 00:56:08 das Exp $ */ #ifndef _TCLINT @@ -4186,6 +4186,20 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #endif /* TCL_MEM_DEBUG */ /* + * Macros for clang static analyzer + */ + +#if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT) +#include +#define CLANG_ASSERT(x) assert(x) +#define Tcl_PanicEx Tcl_Panic +#undef Tcl_Panic +#define Tcl_Panic(f, ...) Tcl_PanicEx(f,##__VA_ARGS__); CLANG_ASSERT(0) +#elif !defined(CLANG_ASSERT) +#define CLANG_ASSERT(x) +#endif + +/* *---------------------------------------------------------------- * Parameters, structs and macros for the non-recursive engine (NRE) *---------------------------------------------------------------- diff --git a/generic/tclPanic.c b/generic/tclPanic.c index 0a63076..e74df68 100644 --- a/generic/tclPanic.c +++ b/generic/tclPanic.c @@ -12,10 +12,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPanic.c,v 1.12 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclPanic.c,v 1.13 2009/06/30 00:56:08 das Exp $ */ #include "tclInt.h" +#undef Tcl_Panic /* * The panicProc variable contains a pointer to an application specific panic diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index a5a627d..9241677 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.181 2009/06/18 09:42:40 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.182 2009/06/30 00:56:08 das Exp $ */ #include "tclInt.h" @@ -33,6 +33,7 @@ #undef Tcl_ValidateAllMemory #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry +#undef Tcl_Panic /* * WARNING: The contents of this file is automatically generated by the -- cgit v0.12 From 0df2c997699d7473522308e26a99742d375548d2 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 30 Jun 2009 14:21:43 +0000 Subject: s/Tcl_PanicEx/TclPanic/; improve clang assert Tcl_Panic macrology --- generic/tclInt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 80aec34..42915e0 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.425 2009/06/30 00:56:08 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.426 2009/06/30 14:21:43 das Exp $ */ #ifndef _TCLINT @@ -4192,9 +4192,9 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT) #include #define CLANG_ASSERT(x) assert(x) -#define Tcl_PanicEx Tcl_Panic +#define TclPanic Tcl_Panic #undef Tcl_Panic -#define Tcl_Panic(f, ...) Tcl_PanicEx(f,##__VA_ARGS__); CLANG_ASSERT(0) +#define Tcl_Panic(f, ...) do { TclPanic(f,##__VA_ARGS__); CLANG_ASSERT(0); } while(0) #elif !defined(CLANG_ASSERT) #define CLANG_ASSERT(x) #endif -- cgit v0.12 From 910e24fb04f5006fb5f14730497c27c89c1d83fb Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 1 Jul 2009 14:38:05 +0000 Subject: Handle the GetUserName API call appropriately for wide/narrow versions. [Bug 2806622] --- ChangeLog | 7 +++++++ win/tclWin32Dll.c | 8 +++++--- win/tclWinInit.c | 13 ++++++++----- win/tclWinInt.h | 3 ++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79a0301..edd9aed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-01 Pat Thoyts + + * win/tclWinInt.h: Handle the GetUserName API call via the + * win/tclWin32Dll.c: tclWinProcs indirection structure. This + * win/tclWinInit.c: fixes a problem obtaining the username when + the USERNAME environment variable is unset [Bug 2806622] + 2009-06-30 Daniel Steffen * generic/tclInt.h: add assert macros for clang static diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 8b7387f..eb50cb1 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.58 2008/10/26 18:43:26 dkf Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.59 2009/07/01 14:38:07 patthoyts Exp $ */ #include "tclWinInt.h" @@ -124,7 +124,8 @@ static TclWinProcs asciiProcs = { NULL, NULL, NULL, NULL, NULL, NULL, /* ReadConsole and WriteConsole */ (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsoleA, - (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleA + (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleA, + (BOOL (WINAPI *)(LPTSTR, LPDWORD)) GetUserNameA }; static TclWinProcs unicodeProcs = { @@ -182,7 +183,8 @@ static TclWinProcs unicodeProcs = { NULL, NULL, NULL, NULL, NULL, NULL, /* ReadConsole and WriteConsole */ (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsoleW, - (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleW + (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleW, + (BOOL (WINAPI *)(LPTSTR, LPDWORD))GetUserNameW }; TclWinProcs *tclWinProcs; diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 1d348a7..8d709e9 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.81 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.82 2009/07/01 14:38:07 patthoyts Exp $ */ #include "tclWinInt.h" @@ -503,8 +503,8 @@ TclpSetVariables( OemId *oemId; OSVERSIONINFOA osInfo; Tcl_DString ds; - TCHAR szUserName[UNLEN+1]; - DWORD dwUserNameLen = sizeof(szUserName); + WCHAR szUserName[UNLEN+1]; + DWORD cchUserNameLen = UNLEN; Tcl_SetVar2Ex(interp, "tclDefaultLibrary", NULL, TclGetProcessGlobalValue(&defaultLibraryDir), TCL_GLOBAL_ONLY); @@ -573,12 +573,15 @@ TclpSetVariables( /* * Initialize the user name from the environment first, since this is much * faster than asking the system. + * Note: cchUserNameLen is number of characters including nul terminator. */ Tcl_DStringInit(&ds); if (TclGetEnv("USERNAME", &ds) == NULL) { - if (GetUserName(szUserName, &dwUserNameLen) != 0) { - Tcl_WinTCharToUtf(szUserName, (int) dwUserNameLen, &ds); + if (tclWinProcs->getUserName((LPTSTR)szUserName, &cchUserNameLen) != 0) { + int cbUserNameLen = cchUserNameLen - 1; + if (tclWinProcs->useWide) cbUserNameLen *= sizeof(WCHAR); + Tcl_WinTCharToUtf((LPTSTR)szUserName, cbUserNameLen, &ds); } } Tcl_SetVar2(interp, "tcl_platform", "user", Tcl_DStringValue(&ds), diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 0843bf1..546cf17 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInt.h,v 1.30 2008/05/02 10:27:08 dkf Exp $ + * RCS: @(#) $Id: tclWinInt.h,v 1.31 2009/07/01 14:38:08 patthoyts Exp $ */ #ifndef _TCLWININT @@ -144,6 +144,7 @@ typedef struct TclWinProcs { LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved ); + BOOL (WINAPI *getUserName)(LPTSTR lpBuffer, LPDWORD lpnSize); } TclWinProcs; MODULE_SCOPE TclWinProcs *tclWinProcs; -- cgit v0.12 From fa19918ab8db3c00417ce14f4a578554f6694300 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Wed, 1 Jul 2009 15:06:06 +0000 Subject: Cast wide integer to int conversion (silence msvc6 warning) --- generic/tclStringObj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 4535c64..09ac25a 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.125 2009/06/15 18:51:35 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.126 2009/07/01 15:06:06 patthoyts Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2133,9 +2133,9 @@ Tcl_AppendFormatToObj( numDigits = 1; } pure = Tcl_NewObj(); - Tcl_SetObjLength(pure, numDigits); + Tcl_SetObjLength(pure, (int)numDigits); bytes = TclGetString(pure); - toAppend = length = numDigits; + toAppend = length = (int)numDigits; while (numDigits--) { int digitOffset; -- cgit v0.12 From cfa39b67096861fc66251643dfa7e91be2f3385d Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 5 Jul 2009 16:05:56 +0000 Subject: Make [zlib push] work with [fcopy]. --- ChangeLog | 31 ++++--- generic/tclZlib.c | 235 +++++++++++++++++++++++++++++++++--------------------- tests/zlib.test | 30 ++++++- 3 files changed, 193 insertions(+), 103 deletions(-) diff --git a/ChangeLog b/ChangeLog index edd9aed..58cdc2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,30 +1,37 @@ +2009-07-05 Donal K. Fellows + + * generic/tclZlib.c (ZlibTransformWatch): Correct the handling of + events so that channel transforms work with things like an asynch + [chan copy]. Problem reported by Pat Thoyts. + 2009-07-01 Pat Thoyts - * win/tclWinInt.h: Handle the GetUserName API call via the - * win/tclWin32Dll.c: tclWinProcs indirection structure. This - * win/tclWinInit.c: fixes a problem obtaining the username when - the USERNAME environment variable is unset [Bug 2806622] + * win/tclWinInt.h: [Bug 2806622]: Handle the GetUserName API call + * win/tclWin32Dll.c: via the tclWinProcs indirection structure. This + * win/tclWinInit.c: fixes a problem obtaining the username when the + USERNAME environment variable is unset. 2009-06-30 Daniel Steffen - * generic/tclInt.h: add assert macros for clang static + * generic/tclInt.h: Add assert macros for clang static * generic/tclPanic.c: analyzer and redefine Tcl_Panic to * generic/tclStubInit.c: assert after panic in clang PURIFY builds. - * generic/tclCmdIL.c: add clang assert for false positive + * generic/tclCmdIL.c: Add clang assert for false positive from static analyzer. 2009-06-26 Daniel Steffen - * macosx/Tcl-Common.xcconfig: update projects for Xcode 3.1 and 3.2, - * macosx/Tcl.xcode/*: standardize on gcc 4.2, remove obsolete - * macosx/Tcl.xcodeproj/*: configurations and pre-Xcode project. - * macosx/Tcl.pbproj/* (removed): + * macosx/Tcl-Common.xcconfig: Update projects for Xcode 3.1 and + * macosx/Tcl.xcode/*: 3.2, standardize on gcc 4.2, remove + * macosx/Tcl.xcodeproj/*: obsolete configurations and pre-Xcode + * macosx/Tcl.pbproj/* (removed): project. - * macosx/README: update project docs, cleanup. + * macosx/README: Update project docs, cleanup. - * unix/Makefile.in: update dist target for project changes. + * unix/Makefile.in: Update dist target for project + changes. 2009-06-24 Donal K. Fellows diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 7bac35a..8204da3 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.26 2009/03/04 17:52:34 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.27 2009/07/05 16:05:59 dkf Exp $ */ #include "tclInt.h" @@ -83,6 +83,7 @@ typedef struct { */ typedef struct { + Tcl_Channel chan; /* Reference to the channel itself. */ Tcl_Channel parent; /* The underlying source and sink of bytes. */ int flags; /* General flag bits, see below... */ int mode; /* Either the value TCL_ZLIB_STREAM_DEFLATE @@ -100,6 +101,7 @@ typedef struct { * decompressing a gzip stream. */ GzipHeader outHeader; /* Header to write to an output stream, when * compressing a gzip stream. */ + Tcl_TimerToken timer; /* Timer used for keeping events fresh. */ } ZlibChannelData; /* @@ -122,29 +124,38 @@ typedef struct { #define DEFAULT_BUFFER_SIZE 4096 /* + * Time to wait (in milliseconds) before flushing the channel when reading + * data through the transform. + */ + +#define TRANSFORM_FLUSH_DELAY 5 + +/* * Prototypes for private procedures defined later in this file: */ -static int ChanClose(ClientData instanceData, +static int ZlibTransformClose(ClientData instanceData, Tcl_Interp *interp); -static int ChanInput(ClientData instanceData, char *buf, +static int ZlibTransformInput(ClientData instanceData, char *buf, int toRead, int *errorCodePtr); -static int ChanOutput(ClientData instanceData, const char *buf, - int toWrite, int*errorCodePtr); -static int ChanSetOption(ClientData instanceData, +static int ZlibTransformOutput(ClientData instanceData, + const char *buf, int toWrite, int*errorCodePtr); +static int ZlibTransformSetOption(ClientData instanceData, Tcl_Interp *interp, const char *optionName, const char *value); -static int ChanGetOption(ClientData instanceData, +static int ZlibTransformGetOption(ClientData instanceData, Tcl_Interp *interp, const char *optionName, Tcl_DString *dsPtr); -static void ChanWatch(ClientData instanceData, int mask); -static int ChanGetHandle(ClientData instanceData, int direction, - ClientData *handlePtr); -static int ChanBlockMode(ClientData instanceData, int mode); -#if 0 /* unused */ -static int ChanHandler(ClientData instanceData, +static void ZlibTransformWatch(ClientData instanceData, int mask); +static int ZlibTransformGetHandle(ClientData instanceData, + int direction, ClientData *handlePtr); +static int ZlibTransformBlockMode(ClientData instanceData, + int mode); +static int ZlibTransformHandler(ClientData instanceData, int interestMask); -#endif +static void ZlibTransformTimerSetup(ZlibChannelData *cd); +static void ZlibTransformTimerKill(ZlibChannelData *cd); +static void ZlibTransformTimerRun(ClientData clientData); static void ConvertError(Tcl_Interp *interp, int code); static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj); static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj, @@ -155,42 +166,67 @@ static int ZlibStreamCmd(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static void ZlibStreamCmdDelete(ClientData cd); static void ZlibStreamCleanup(ZlibStreamHandle *zshPtr); -static Tcl_Channel ZlibStackChannel(Tcl_Interp *interp, int mode, - int format, int level, Tcl_Channel channel, - Tcl_Obj *gzipHeaderDictPtr); +static Tcl_Channel ZlibStackChannelTransform(Tcl_Interp *interp, + int mode, int format, int level, + Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr); -#ifdef _WIN32 -# ifndef STATIC_BUILD +/* + * Type of zlib-based compressing and decompressing channels. + */ +static const Tcl_ChannelType zlibChannelType = { + "zlib", + TCL_CHANNEL_VERSION_3, + ZlibTransformClose, + ZlibTransformInput, + ZlibTransformOutput, + NULL, /* seekProc */ + ZlibTransformSetOption, + ZlibTransformGetOption, + ZlibTransformWatch, + ZlibTransformGetHandle, + NULL, /* close2Proc */ + ZlibTransformBlockMode, + NULL, /* flushProc */ + ZlibTransformHandler, + NULL /* wideSeekProc */ +}; + /* * zlib 1.2.3 on Windows has a bug that the functions deflateSetHeader and - * inflateGetHeader are not exported from the dll. Hopefully, this bug - * will be fixed in zlib 1.2.4 and higher. It is already reported to the - * zlib people. The functions deflateSetHeader and inflateGetHeader here - * are just copied from the zlib 1.2.3 source. This is dangerous, but works. - * In practice, the only fields used from the internal state are "wrap" and - * "head", which are rather at the beginning of the structure. As long as the - * offsets of those fields don't change, this code will continue to work. + * inflateGetHeader are not exported from the dll. Hopefully, this bug will be + * fixed in zlib 1.2.4 and higher. It is already reported to the zlib people. + * The functions deflateSetHeader and inflateGetHeader here are just copied + * from the zlib 1.2.3 source. This is dangerous, but works. In practice, the + * only fields used from the internal state are "wrap" and "head", which are + * rather at the beginning of the structure. As long as the offsets of those + * fields don't change, this code will continue to work. */ + +#if defined(_WIN32) && !defined(STATIC_BUILD) #define deflateSetHeader dsetheader #define inflateGetHeader igetheader + static int deflateSetHeader( z_streamp strm, gz_headerp head) { struct internal_state *state; + if (strm == Z_NULL) return Z_STREAM_ERROR; state = (struct internal_state *) strm->state; if ((state == Z_NULL) || (state->wrap != 2)) return Z_STREAM_ERROR; state->gzhead = head; return Z_OK; } + static int inflateGetHeader( z_streamp strm, gz_headerp head) { struct inflate_state *state; + if (strm == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state *) strm->state; if ((state == Z_NULL) || ((state->wrap & 2) == 0)) return Z_STREAM_ERROR; @@ -198,31 +234,8 @@ static int inflateGetHeader( head->done = 0; return Z_OK; } -# endif /* !STATIC_BUILD */ -#endif /* _WIN32 */ - -/* - * Type of zlib-based compressing and decompressing channels. - */ - -static const Tcl_ChannelType zlibChannelType = { - "zlib", - TCL_CHANNEL_VERSION_3, - ChanClose, - ChanInput, - ChanOutput, - NULL, /* seekProc */ - ChanSetOption, - ChanGetOption, - ChanWatch, - ChanGetHandle, - NULL, /* close2Proc */ - ChanBlockMode, - NULL, /* flushProc */ - NULL /*ChanHandler*/, - NULL /* wideSeekProc */ -}; - +#endif /* _WIN32 && !STATIC_BUILD */ + /* *---------------------------------------------------------------------- * @@ -277,7 +290,7 @@ ConvertError( Tcl_SetErrorCode(interp, "TCL", "ZLIB", codeStr, codeStr2, NULL); } } - + /* *---------------------------------------------------------------------- * @@ -398,7 +411,7 @@ GenerateHeader( Tcl_FreeEncoding(latin1enc); return result; } - + /* *---------------------------------------------------------------------- * @@ -489,7 +502,7 @@ ExtractHeader( Tcl_FreeEncoding(latin1enc); } } - + /* *---------------------------------------------------------------------- * @@ -680,7 +693,7 @@ Tcl_ZlibStreamInit( ckfree((char *) zshPtr); return TCL_ERROR; } - + /* *---------------------------------------------------------------------- * @@ -707,7 +720,7 @@ ZlibStreamCmdDelete( zshPtr->cmd = NULL; ZlibStreamCleanup(zshPtr); } - + /* *---------------------------------------------------------------------- * @@ -745,7 +758,7 @@ Tcl_ZlibStreamClose( } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -787,7 +800,7 @@ ZlibStreamCleanup( ckfree((char *) zshPtr); } - + /* *---------------------------------------------------------------------- * @@ -856,7 +869,7 @@ Tcl_ZlibStreamReset( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -890,7 +903,7 @@ Tcl_ZlibStreamGetCommandName( Tcl_GetCommandFullName(zshPtr->interp, zshPtr->cmd, objPtr); return objPtr; } - + /* *---------------------------------------------------------------------- * @@ -918,7 +931,7 @@ Tcl_ZlibStreamEof( return zshPtr->streamEnd; } - + /* *---------------------------------------------------------------------- * @@ -938,7 +951,7 @@ Tcl_ZlibStreamChecksum( return zshPtr->stream.adler; } - + /* *---------------------------------------------------------------------- * @@ -1046,7 +1059,7 @@ Tcl_ZlibStreamPut( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1255,7 +1268,7 @@ Tcl_ZlibStreamGet( } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1410,7 +1423,7 @@ Tcl_ZlibDeflate( ConvertError(interp, e); return TCL_ERROR; } - + /* *---------------------------------------------------------------------- * @@ -1597,7 +1610,7 @@ Tcl_ZlibInflate( } return TCL_ERROR; } - + /* *---------------------------------------------------------------------- * @@ -1626,7 +1639,7 @@ Tcl_ZlibAdler32( { return adler32(adler, (Bytef *) buf, (unsigned) len); } - + /* *---------------------------------------------------------------------- * @@ -2033,7 +2046,7 @@ TclZlibCmd( } } - if (ZlibStackChannel(interp, mode, format, level, chan, + if (ZlibStackChannelTransform(interp, mode, format, level, chan, headerObj) == NULL) { return TCL_ERROR; } @@ -2054,7 +2067,7 @@ TclZlibCmd( Tcl_AppendResult(interp, "buffer size must be 32 to 65536", NULL); return TCL_ERROR; } - + /* *---------------------------------------------------------------------- * @@ -2276,7 +2289,7 @@ ZlibStreamCmd( return TCL_OK; } - + /* *---------------------------------------------------------------------- * Set of functions to support channel stacking. @@ -2284,13 +2297,14 @@ ZlibStreamCmd( */ static int -ChanClose( +ZlibTransformClose( ClientData instanceData, Tcl_Interp *interp) { ZlibChannelData *cd = instanceData; int e, result = TCL_OK; + ZlibTransformTimerKill(cd); if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { cd->outStream.avail_in = 0; do { @@ -2336,7 +2350,7 @@ ChanClose( } static int -ChanInput( +ZlibTransformInput( ClientData instanceData, char *buf, int toRead, @@ -2396,7 +2410,7 @@ ChanInput( } static int -ChanOutput( +ZlibTransformOutput( ClientData instanceData, const char *buf, int toWrite, @@ -2440,7 +2454,7 @@ ChanOutput( } static int -ChanSetOption( /* not used */ +ZlibTransformSetOption( /* not used */ ClientData instanceData, Tcl_Interp *interp, const char *optionName, @@ -2502,7 +2516,7 @@ ChanSetOption( /* not used */ } static int -ChanGetOption( +ZlibTransformGetOption( ClientData instanceData, Tcl_Interp *interp, const char *optionName, @@ -2578,15 +2592,28 @@ ChanGetOption( } static void -ChanWatch( +ZlibTransformWatch( ClientData instanceData, int mask) { - return; + ZlibChannelData *cd = instanceData; + Tcl_DriverWatchProc *watchProc; + + /* + * This code is based on the code in tclIORTrans.c + */ + + watchProc = Tcl_ChannelWatchProc(Tcl_GetChannelType(cd->parent)); + watchProc(Tcl_GetChannelInstanceData(cd->parent), mask); + if (!(mask & TCL_READABLE) || (cd->inStream.avail_in==cd->inAllocated)) { + ZlibTransformTimerKill(cd); + } else { + ZlibTransformTimerSetup(cd); + } } static int -ChanGetHandle( +ZlibTransformGetHandle( ClientData instanceData, int direction, ClientData *handlePtr) @@ -2597,7 +2624,7 @@ ChanGetHandle( } static int -ChanBlockMode( +ZlibTransformBlockMode( ClientData instanceData, int mode) { @@ -2611,24 +2638,51 @@ ChanBlockMode( return TCL_OK; } -#if 0 /* unused */ static int -ChanHandler( +ZlibTransformHandler( ClientData instanceData, int interestMask) { - /* - * We don't handle this here. Assume it came from the underlying channel. - */ + ZlibChannelData *cd = instanceData; + ZlibTransformTimerKill(cd); return interestMask; } -#endif +static void +ZlibTransformTimerSetup( + ZlibChannelData *cd) +{ + if (cd->timer == NULL) { + cd->timer = Tcl_CreateTimerHandler(TRANSFORM_FLUSH_DELAY, + ZlibTransformTimerRun, cd); + } +} + +static void +ZlibTransformTimerKill( + ZlibChannelData *cd) +{ + if (cd->timer != NULL) { + Tcl_DeleteTimerHandler(cd->timer); + cd->timer = NULL; + } +} + +static void +ZlibTransformTimerRun( + ClientData clientData) +{ + ZlibChannelData *cd = clientData; + + cd->timer = NULL; + Tcl_NotifyChannel(cd->chan, TCL_READABLE); +} + /* *---------------------------------------------------------------------- * - * ZlibStackChannel -- + * ZlibStackChannelTransform -- * * Stacks either compression or decompression onto a channel. * @@ -2639,7 +2693,7 @@ ChanHandler( */ static Tcl_Channel -ZlibStackChannel( +ZlibStackChannelTransform( Tcl_Interp *interp, /* Where to write error messages. */ int mode, /* Whether this is a compressing transform * (TCL_ZLIB_STREAM_DEFLATE) or a @@ -2745,6 +2799,7 @@ ZlibStackChannel( if (chan == NULL) { goto error; } + cd->chan = chan; cd->parent = Tcl_GetStackedChannel(chan); Tcl_SetObjResult(interp, Tcl_NewStringObj(Tcl_GetChannelName(chan), -1)); return chan; @@ -2761,7 +2816,7 @@ ZlibStackChannel( ckfree((char *) cd); return NULL; } - + /* *---------------------------------------------------------------------- * Finally, the TclZlibInit function. Used to install the zlib API. @@ -2787,7 +2842,7 @@ TclZlibInit( Tcl_CreateObjCommand(interp, "zlib", TclZlibCmd, 0, 0); return TCL_OK; } - + /* *---------------------------------------------------------------------- * Stubs used when a suitable zlib installation was not found during @@ -2904,7 +2959,7 @@ Tcl_ZlibAdler32( return 0; } #endif /* HAVE_ZLIB */ - + /* * Local Variables: * mode: c diff --git a/tests/zlib.test b/tests/zlib.test index 41599a6..dae1861 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.7 2009/03/04 17:26:24 dkf Exp $ +# RCS: @(#) $Id: zlib.test,v 1.8 2009/07/05 16:05:59 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -130,6 +130,34 @@ test zlib-8.2 {zlib transformation} -constraints zlib -setup { close $f removeFile $file } -result ok +test zlib-8.3 {zlib transformation and fileevent} -constraints zlib -setup { + set srv [socket -myaddr localhost -server {apply {{c a p} { + fconfigure $c -translation binary + puts -nonewline $c [zlib gzip [string repeat a 81920]] + close $c + }}} 0] + set port [lindex [fconfigure $srv -sockname] 2] + set file [makeFile {} test.gz] + set fout [open $file wb] +} -body { + set sin [socket localhost $port] + try { + fconfigure $sin -translation binary + zlib push gunzip $sin + after 1000 {set total timeout} + fcopy $sin $fout -command {apply {{c {e {}}} { + set ::total [expr {$e eq {} ? $c : $e}] + }}} + vwait total + } finally { + close $sin + } + append total --> [file size $file] +} -cleanup { + close $fout + close $srv + removeFile $file +} -result 81920-->81920 ::tcltest::cleanupTests return -- cgit v0.12 From 48a923c5b4899bc7055153a8e28e25489b33fab6 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sun, 5 Jul 2009 21:46:27 +0000 Subject: Additional tests for zlib stacked channel with fcopy in various modes. --- tests/zlib.test | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/tests/zlib.test b/tests/zlib.test index dae1861..b8d6e66 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.8 2009/07/05 16:05:59 dkf Exp $ +# RCS: @(#) $Id: zlib.test,v 1.9 2009/07/05 21:46:27 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -158,6 +158,125 @@ test zlib-8.3 {zlib transformation and fileevent} -constraints zlib -setup { close $srv removeFile $file } -result 81920-->81920 +test zlib-9.1 "check fcopy with push" -constraints zlib -setup { + set sfile [makeFile {} testsrc.gz] + set file [makeFile {} test.gz] + set f [open $sfile wb] + puts -nonewline $f [zlib gzip [string repeat a 81920]] + close $f +} -body { + set fin [zlib push gunzip [open $sfile rb]] + set fout [open $file wb] + set total [fcopy $fin $fout] + close $fin ; close $fout + list copied $total size [file size $file] +} -cleanup { + removeFile $file + removeFile $sfile +} -returnCodes {ok} -result {copied 81920 size 81920} +test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { + set srv [socket -server {apply {{c a p} { + chan configure $c -encoding binary -translation binary + puts -nonewline $c [zlib gzip [string repeat a 81920]] + close $c + }}} 0] + set file [makeFile {} test.gz] +} -body { + lassign [chan configure $srv -sockname] addr name port + set sin [socket $addr $port] + chan configure $sin -translation binary + zlib push gunzip $sin + update + set total [fcopy $sin [set fout [open $file wb]]] + close $sin + close $fout + list read $total size [file size $file] +} -cleanup { + close $srv + removeFile $file +} -returnCodes {ok error} -result {read 81920 size 81920} +test zlib-9.3 "socket fcopy bg (identity)" -constraints zlib -setup { + set srv [socket -server {apply {{c a p} { + chan configure $c -encoding binary -translation binary + puts -nonewline $c [string repeat a 81920] + close $c + }}} 0] + set file [makeFile {} test.gz] +} -body { + lassign [chan configure $srv -sockname] addr name port + set sin [socket $addr $port] + chan configure $sin -translation binary + update + set fout [open $file wb] + after 1000 {set ::total timeout} + fcopy $sin $fout -command {apply {{c {e {}}} { + set ::total [expr {$e eq {} ? $c : $e}] + }}} + vwait ::total + close $sin; close $fout + list read $::total size [file size $file] +} -cleanup { + close $srv +} -returnCodes {ok error} -result {read 81920 size 81920} +test zlib-9.4 "socket fcopy bg (gzip)" -constraints zlib -setup { + set srv [socket -server {apply {{c a p} { + chan configure $c -encoding binary -translation binary + puts -nonewline $c [zlib gzip [string repeat a 81920]] + close $c + }}} 0] + set file [makeFile {} test.gz] +} -body { + lassign [chan configure $srv -sockname] addr name port + set sin [socket $addr $port] + chan configure $sin -translation binary + zlib push gunzip $sin + update + set fout [open $file wb] + after 1000 {set ::total timeout} + fcopy $sin $fout -command {apply {{c {e {}}} { + set ::total [expr {$e eq {} ? $c : $e}] + }}} + vwait ::total + close $sin; close $fout + list read $::total size [file size $file] +} -cleanup { + close $srv + removeFile $file +} -result {read 81920 size 81920} +test zlib-9.5 "socket fcopy incremental (gzip)" -constraints zlib -setup { + set srv [socket -server {apply {{c a p} { + chan configure $c -encoding binary -translation binary + puts -nonewline $c [zlib gzip [string repeat a 81920]] + close $c + }}} 0] + proc zlib95copy {i o t c {e {}}} { + incr t $c + if {$e ne {}} { + set ::total [list error $e] + } elseif {[eof $i]} { + set ::total [list eof $t] + } else { + fcopy $i $o -size 8192 -command [list zlib95copy $i $o $t] + } + } + set file [makeFile {} test.gz] +} -body { + lassign [chan configure $srv -sockname] addr name port + set sin [socket $addr $port] + chan configure $sin -translation binary + zlib push gunzip $sin + update + set fout [open $file wb] + after 1000 {set ::total timeout} + fcopy $sin $fout -size 8192 -command [list zlib95copy $sin $fout 0] + vwait ::total + close $sin; close $fout + list $::total size [file size $file] +} -cleanup { + close $srv + rename zlib95copy {} + removeFile $file +} -result {{eof 81920} size 81920} ::tcltest::cleanupTests return -- cgit v0.12 From 56f47889313ee29693e673df5982ac523d3baac0 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 6 Jul 2009 21:38:21 +0000 Subject: Silence a signed/unsigned warning that annoys msvc --- generic/tclZlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 8204da3..378c123 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.27 2009/07/05 16:05:59 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.28 2009/07/06 21:38:21 patthoyts Exp $ */ #include "tclInt.h" @@ -2605,7 +2605,7 @@ ZlibTransformWatch( watchProc = Tcl_ChannelWatchProc(Tcl_GetChannelType(cd->parent)); watchProc(Tcl_GetChannelInstanceData(cd->parent), mask); - if (!(mask & TCL_READABLE) || (cd->inStream.avail_in==cd->inAllocated)) { + if (!(mask & TCL_READABLE) || (cd->inStream.avail_in==(uInt)cd->inAllocated)) { ZlibTransformTimerKill(cd); } else { ZlibTransformTimerSetup(cd); -- cgit v0.12 From 8d66bea70e3b60faed905bf41460eb10c2fdc20b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 9 Jul 2009 22:28:37 +0000 Subject: Fix [Bug 2819227] by using a function from C89 rather than POSIX. --- ChangeLog | 5 +++++ compat/mkstemp.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58cdc2f..a3de07b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-09 Donal K. Fellows + + * compat/mkstemp.c (mkstemp): [Bug 2819227]: Use rand() for random + numbers as it is more portable. + 2009-07-05 Donal K. Fellows * generic/tclZlib.c (ZlibTransformWatch): Correct the handling of diff --git a/compat/mkstemp.c b/compat/mkstemp.c index f86bde2..f396993 100644 --- a/compat/mkstemp.c +++ b/compat/mkstemp.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: mkstemp.c,v 1.2 2009/05/12 20:26:04 dkf Exp $ + * RCS: @(#) $Id: mkstemp.c,v 1.3 2009/07/09 22:28:38 dkf Exp $ */ #include @@ -64,7 +64,7 @@ mkstemp( */ for (b=a ; *b ; b++) { - float r = random() / ((float) RAND_MAX); + float r = rand() / ((float) RAND_MAX); *b = alphanumerics[(int)(r * alphanumericsLen)]; } -- cgit v0.12 From aa9d6e35ecc0a79757a530c4a4b95e90887e5635 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Thu, 9 Jul 2009 22:48:44 +0000 Subject: [Bug #2818131] Added tests and fixed a typo that broke zlib push for deflate format. --- ChangeLog | 5 +++ generic/tclZlib.c | 4 +-- tests/zlib.test | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 101 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3de07b..29d88db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-09 Pat Thoyts + + * tests/zlib.test: [Bug #2818131] Added tests and fixed a typo + that broke zlib push for deflate format. + 2009-07-09 Donal K. Fellows * compat/mkstemp.c (mkstemp): [Bug 2819227]: Use rand() for random diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 378c123..96d68c1 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.28 2009/07/06 21:38:21 patthoyts Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.29 2009/07/09 22:48:44 patthoyts Exp $ */ #include "tclInt.h" @@ -1940,7 +1940,7 @@ TclZlibCmd( switch ((enum zlibFormats) format) { case f_deflate: mode = TCL_ZLIB_STREAM_DEFLATE; - format = TCL_ZLIB_FORMAT_GZIP; + format = TCL_ZLIB_FORMAT_RAW; break; case f_inflate: mode = TCL_ZLIB_STREAM_INFLATE; diff --git a/tests/zlib.test b/tests/zlib.test index b8d6e66..3705419 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.9 2009/07/05 21:46:27 patthoyts Exp $ +# RCS: @(#) $Id: zlib.test,v 1.10 2009/07/09 22:48:44 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -175,7 +175,7 @@ test zlib-9.1 "check fcopy with push" -constraints zlib -setup { removeFile $sfile } -returnCodes {ok} -result {copied 81920 size 81920} test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { - set srv [socket -server {apply {{c a p} { + set srv [socket -myaddr localhost -server {apply {{c a p} { chan configure $c -encoding binary -translation binary puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c @@ -196,7 +196,8 @@ test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { removeFile $file } -returnCodes {ok error} -result {read 81920 size 81920} test zlib-9.3 "socket fcopy bg (identity)" -constraints zlib -setup { - set srv [socket -server {apply {{c a p} { + set srv [socket -myaddr localhost -server {apply {{c a p} { + puts "connection from $a:$p on $c" chan configure $c -encoding binary -translation binary puts -nonewline $c [string repeat a 81920] close $c @@ -204,7 +205,8 @@ test zlib-9.3 "socket fcopy bg (identity)" -constraints zlib -setup { set file [makeFile {} test.gz] } -body { lassign [chan configure $srv -sockname] addr name port - set sin [socket $addr $port] + puts "listening for connections on $addr $port" + set sin [socket localhost $port] chan configure $sin -translation binary update set fout [open $file wb] @@ -217,9 +219,10 @@ test zlib-9.3 "socket fcopy bg (identity)" -constraints zlib -setup { list read $::total size [file size $file] } -cleanup { close $srv + removeFile $file } -returnCodes {ok error} -result {read 81920 size 81920} test zlib-9.4 "socket fcopy bg (gzip)" -constraints zlib -setup { - set srv [socket -server {apply {{c a p} { + set srv [socket -myaddr localhost -server {apply {{c a p} { chan configure $c -encoding binary -translation binary puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c @@ -244,7 +247,7 @@ test zlib-9.4 "socket fcopy bg (gzip)" -constraints zlib -setup { removeFile $file } -result {read 81920 size 81920} test zlib-9.5 "socket fcopy incremental (gzip)" -constraints zlib -setup { - set srv [socket -server {apply {{c a p} { + set srv [socket -myaddr localhost -server {apply {{c a p} { chan configure $c -encoding binary -translation binary puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c @@ -277,6 +280,91 @@ test zlib-9.5 "socket fcopy incremental (gzip)" -constraints zlib -setup { rename zlib95copy {} removeFile $file } -result {{eof 81920} size 81920} + +test zlib-9.6 "bug #2818131 (gzip)" -constraints zlib -setup { + proc zlib96read {c} { + set d [read $c] + if {[eof $c]} { + chan event $c readable {} + set ::total [list eof [string length $d]] + } + } + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push gzip $c + puts -nonewline $c [string repeat hello 100] + close $c + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + chan configure $s -translation binary -buffering none + zlib push gunzip $s + chan event $s readable [list zlib96read $s] + vwait ::total + close $s + set ::total +} -cleanup { + close $srv + rename zlib96read {} +} -returnCodes {ok error} -result {eof 500} +test zlib-9.7 "bug #2818131 (compress)" -constraints zlib -setup { + proc zlib97read {c} { + set d [read $c] + if {[eof $c]} { + chan event $c readable {} + set ::total [list eof [string length $d]] + } + } + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push compress $c + puts -nonewline $c [string repeat hello 100] + close $c + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + chan configure $s -translation binary -buffering none + zlib push decompress $s + chan event $s readable [list zlib97read $s] + vwait ::total + close $s + set ::total +} -cleanup { + close $srv + rename zlib97read {} +} -returnCodes {ok error} -result {eof 500} +test zlib-9.8 "bug #2818131 (deflate)" -constraints zlib -setup { + proc zlib98read {c} { + set d [read $c] + if {[eof $c]} { + chan event $c readable {} + set ::total [list eof [string length $d]] + } + } + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push deflate $c + puts -nonewline $c [string repeat hello 100] + close $c + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + chan configure $s -translation binary -buffering none + zlib push inflate $s + chan event $s readable [list zlib98read $s] + vwait ::total + close $s + set ::total +} -cleanup { + close $srv + rename zlib98read {} +} -returnCodes {ok error} -result {eof 500} ::tcltest::cleanupTests return -- cgit v0.12 From 02ba54c693aaea66388d4d5293c510e999209910 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 10 Jul 2009 10:06:32 +0000 Subject: Slight improvement of wording --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29d88db..6b87e79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2009-07-09 Pat Thoyts - * tests/zlib.test: [Bug #2818131] Added tests and fixed a typo - that broke zlib push for deflate format. + * tests/zlib.test: [Bug 2818131]: Added tests and fixed a typo that + broke [zlib push] for deflate format. 2009-07-09 Donal K. Fellows -- cgit v0.12 From b1b828fd60bfd07a6e17453f3d2ffe646bcad60c Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 10 Jul 2009 17:37:18 +0000 Subject: ZlibTransformClose may be called with a NULL interpreter during finalization and Tcl_SetChannelError requires a list. Added some tests to ensure error propagation from the zlib library to the interp. --- ChangeLog | 7 ++ generic/tclZlib.c | 18 +++-- tests/zlib.test | 204 ++++++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 188 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b87e79..f278101 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-10 Pat Thoyts + + * tests/zlib.test: ZlibTransformClose may be called with a NULL + * generic/tclZlib.c: interpreter during finalization and + Tcl_SetChannelError requires a list. Added some tests to ensure + error propagation from the zlib library to the interp. + 2009-07-09 Pat Thoyts * tests/zlib.test: [Bug 2818131]: Added tests and fixed a typo that diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 96d68c1..5dc8c2e 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.29 2009/07/09 22:48:44 patthoyts Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.30 2009/07/10 17:37:18 patthoyts Exp $ */ #include "tclInt.h" @@ -2322,11 +2322,16 @@ ZlibTransformClose( if (cd->outStream.avail_out != (unsigned) cd->outAllocated) { if (Tcl_WriteRaw(cd->parent, cd->outBuffer, cd->outAllocated - cd->outStream.avail_out) < 0) { - /* TODO: is this the right way to do errors on close? */ + /* TODO: is this the right way to do errors on close? + * Note: when close is called from FinalizeIOSubsystem + * then interp may be NULL + */ if (!TclInThreadExit()) { - Tcl_AppendResult(interp, + if (interp) { + Tcl_AppendResult(interp, "error while finalizing file: ", Tcl_PosixError(interp), NULL); + } } result = TCL_ERROR; break; @@ -2377,8 +2382,11 @@ ZlibTransformInput( return toRead - cd->inStream.avail_out; } if (e != Z_OK) { - Tcl_SetChannelError(cd->parent, - Tcl_NewStringObj(cd->inStream.msg, -1)); + Tcl_Obj *errObj = Tcl_NewListObj(0, NULL); + Tcl_ListObjAppendElement(NULL, errObj, + Tcl_NewStringObj(cd->inStream.msg, -1)); + Tcl_SetChannelError(cd->parent, errObj); + *errorCodePtr = EINVAL; return -1; } diff --git a/tests/zlib.test b/tests/zlib.test index 3705419..4903df4 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.10 2009/07/09 22:48:44 patthoyts Exp $ +# RCS: @(#) $Id: zlib.test,v 1.11 2009/07/10 17:37:19 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -173,7 +173,7 @@ test zlib-9.1 "check fcopy with push" -constraints zlib -setup { } -cleanup { removeFile $file removeFile $sfile -} -returnCodes {ok} -result {copied 81920 size 81920} +} -result {copied 81920 size 81920} test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { chan configure $c -encoding binary -translation binary @@ -194,10 +194,10 @@ test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { } -cleanup { close $srv removeFile $file -} -returnCodes {ok error} -result {read 81920 size 81920} -test zlib-9.3 "socket fcopy bg (identity)" -constraints zlib -setup { +} -result {read 81920 size 81920} +test zlib-9.3 "socket fcopy bg (identity)" -constraints {tempNotWin zlib} -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - puts "connection from $a:$p on $c" + #puts "connection from $a:$p on $c" chan configure $c -encoding binary -translation binary puts -nonewline $c [string repeat a 81920] close $c @@ -205,7 +205,7 @@ test zlib-9.3 "socket fcopy bg (identity)" -constraints zlib -setup { set file [makeFile {} test.gz] } -body { lassign [chan configure $srv -sockname] addr name port - puts "listening for connections on $addr $port" + #puts "listening for connections on $addr $port" set sin [socket localhost $port] chan configure $sin -translation binary update @@ -280,15 +280,7 @@ test zlib-9.5 "socket fcopy incremental (gzip)" -constraints zlib -setup { rename zlib95copy {} removeFile $file } -result {{eof 81920} size 81920} - test zlib-9.6 "bug #2818131 (gzip)" -constraints zlib -setup { - proc zlib96read {c} { - set d [read $c] - if {[eof $c]} { - chan event $c readable {} - set ::total [list eof [string length $d]] - } - } set srv [socket -myaddr localhost -server {apply {{c a p} { chan configure $c -translation binary -buffering none zlib push gzip $c @@ -301,22 +293,21 @@ test zlib-9.6 "bug #2818131 (gzip)" -constraints zlib -setup { set s [socket $addr $port] chan configure $s -translation binary -buffering none zlib push gunzip $s - chan event $s readable [list zlib96read $s] + chan event $s readable [list apply {{s} { + set d [read $s] + if {[eof $s]} { + chan event $s readable {} + set ::total [list eof [string length $d]] + } + }} $s] vwait ::total close $s set ::total } -cleanup { close $srv - rename zlib96read {} -} -returnCodes {ok error} -result {eof 500} + unset -nocomplain total +} -result {eof 500} test zlib-9.7 "bug #2818131 (compress)" -constraints zlib -setup { - proc zlib97read {c} { - set d [read $c] - if {[eof $c]} { - chan event $c readable {} - set ::total [list eof [string length $d]] - } - } set srv [socket -myaddr localhost -server {apply {{c a p} { chan configure $c -translation binary -buffering none zlib push compress $c @@ -329,22 +320,113 @@ test zlib-9.7 "bug #2818131 (compress)" -constraints zlib -setup { set s [socket $addr $port] chan configure $s -translation binary -buffering none zlib push decompress $s - chan event $s readable [list zlib97read $s] + chan event $s readable [list apply {{s} { + set d [read $s] + if {[eof $s]} { + chan event $s readable {} + set ::total [list eof [string length $d]] + } + }} $s] vwait ::total close $s set ::total } -cleanup { close $srv - rename zlib97read {} -} -returnCodes {ok error} -result {eof 500} + unset -nocomplain total +} -result {eof 500} test zlib-9.8 "bug #2818131 (deflate)" -constraints zlib -setup { - proc zlib98read {c} { - set d [read $c] - if {[eof $c]} { - chan event $c readable {} + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push deflate $c + puts -nonewline $c [string repeat hello 100] + close $c + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + chan configure $s -translation binary -buffering none + zlib push inflate $s + chan event $s readable [list apply {{s} { + set d [read $s] + if {[eof $s]} { + chan event $s readable {} set ::total [list eof [string length $d]] } + }} $s] + vwait ::total + close $s + set ::total +} -cleanup { + unset -nocomplain total + close $srv +} -result {eof 500} +test zlib-9.9 "bug #2818131 (gzip mismatch)" -constraints zlib -setup { + proc bgerror {s} {set ::total [list error $s]} + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push gzip $c + puts -nonewline $c [string repeat hello 100] + close $c + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + try { + chan configure $s -translation binary -buffering none + zlib push inflate $s + chan event $s readable [list apply {{s} { + set d [read $s] + if {[eof $s]} { + chan event $s readable {} + set ::total [list eof [string length $d]] + } + }} $s] + vwait ::total + } finally { + close $s } + set ::total +} -cleanup { + unset -nocomplain total + close $srv + rename bgerror {} +} -result {error {invalid block type}} +test zlib-9.10 "bug #2818131 (compress mismatch)" -constraints zlib -setup { + proc bgerror {s} {set ::total [list error $s]} + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push compress $c + puts -nonewline $c [string repeat hello 100] + close $c + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + try { + chan configure $s -translation binary -buffering none + zlib push inflate $s + chan event $s readable [list apply {{s} { + set d [read $s] + if {[eof $s]} { + chan event $s readable {} + set ::total [list eof [string length $d]] + } + }} $s] + vwait ::total + } finally { + close $s + } + set ::total +} -cleanup { + unset -nocomplain total + close $srv + rename bgerror {} +} -result {error {invalid stored block lengths}} +test zlib-9.11 "bug #2818131 (deflate mismatch)" -constraints zlib -setup { + proc bgerror {s} {set ::total [list error $s]} set srv [socket -myaddr localhost -server {apply {{c a p} { chan configure $c -translation binary -buffering none zlib push deflate $c @@ -355,16 +437,66 @@ test zlib-9.8 "bug #2818131 (deflate)" -constraints zlib -setup { lassign [chan configure $srv -sockname] addr name port after 1000 {set ::total timeout} set s [socket $addr $port] + try { + chan configure $s -translation binary -buffering none + zlib push gunzip $s + chan event $s readable [list apply {{s} { + set d [read $s] + if {[eof $s]} { + chan event $s readable {} + set ::total [list eof [string length $d]] + } + }} $s] + vwait ::total + } finally { + close $s + } + set ::total +} -cleanup { + unset -nocomplain total + close $srv + rename bgerror {} +} -result {error {incorrect header check}} + +test zlib-10.1 "bug #2818131 (close with null interp)" -constraints { + zlib +} -setup { + proc bgerror {s} {set ::total [list error $s]} + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push inflate $c + chan event $c readable [list apply {{c} { + set d [read $c] + if {[eof $c]} { + chan event $c readable {} + close $c + set ::total [list eof [string length $d]] + } + }} $c] + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] chan configure $s -translation binary -buffering none - zlib push inflate $s - chan event $s readable [list zlib98read $s] + zlib push gzip $s + chan event $s xyzzy [list apply {{s} { + if {[gets $s line] < 0} { + chan close $s + } + }} $s] + after idle [list apply {{s} { + puts $s test + chan close $s + after 100 {set ::total done} + }} $s] vwait ::total - close $s set ::total } -cleanup { close $srv - rename zlib98read {} -} -returnCodes {ok error} -result {eof 500} + rename bgerror {} +} -returnCodes error \ + -result {bad event name "xyzzy": must be readable or writable} ::tcltest::cleanupTests return -- cgit v0.12 From e399f035d3e7643dee420ed549aab4e3c38da4ff Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 11 Jul 2009 08:32:29 +0000 Subject: backslash quoting --- doc/refchan.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/refchan.n b/doc/refchan.n index a314c33..b30898b 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.14 2009/01/31 15:11:28 dkf Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.15 2009/07/11 08:32:29 patthoyts Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -300,7 +300,7 @@ oo::class create stringchan { return $d } } -set string "The quick brown fox jumps over the lazy dog.\n" +set string "The quick brown fox jumps over the lazy dog.\\n" set ch [\fBchan create\fR read [stringchan new $string]] .CE .SH "SEE ALSO" -- cgit v0.12 From d59b9d14e5d9e802eade0803b8d120e00923a59e Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 11 Jul 2009 08:57:08 +0000 Subject: Added optional script option to runtest and a runshell target. Silence output from html help compiler --- win/makefile.vc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index 42ca196..0d4117f 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.199 2009/04/10 14:19:45 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.200 2009/07/11 08:57:08 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -573,7 +573,11 @@ test-core: setup $(TCLTEST) dlls $(CAT32) runtest: setup $(TCLTEST) dlls $(CAT32) set TCL_LIBRARY=$(ROOT)/library - $(DEBUGGER) $(TCLTEST) + $(DEBUGGER) $(TCLTEST) $(SCRIPT) + +runshell: setup $(TCLSH) dlls + set TCL_LIBRARY=$(ROOT)/library + $(DEBUGGER) $(TCLSH) $(SCRIPT) setup: @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR) @@ -713,6 +717,7 @@ gentommath_h: # Build the Windows HTML help file. #--------------------------------------------------------------------- +# NOTE: you can define HHC on the command-line to override this !ifndef HHC HHC="%ProgramFiles%\HTML Help Workshop\hhc.exe" !endif @@ -724,8 +729,9 @@ CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm htmlhelp: chmsetup $(CHMFILE) $(CHMFILE): $(DOCDIR)\* - $(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl - $(HHC) <<$(HHPFILE) + @$(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl + @echo Compiling html help project + @$(HHC) <<$(HHPFILE) >NUL [OPTIONS] Compatibility=1.1 or later Compiled file=$(HTMLBASE).chm -- cgit v0.12 From dd1d583ae03e2348fe8bc8a8b1918ea5e49be545 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 11 Jul 2009 11:23:06 +0000 Subject: General improvement of the documentation --- doc/refchan.n | 114 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 42 deletions(-) diff --git a/doc/refchan.n b/doc/refchan.n index b30898b..80a4305 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.15 2009/07/11 08:32:29 patthoyts Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.16 2009/07/11 11:23:06 dkf Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -20,7 +20,8 @@ The Tcl-level handler for a reflected channel has to be a command with subcommands (termed an \fIensemble\fR, as it is a command such as that created by \fBnamespace ensemble create\fR, though the implementation of handlers for reflected channel \fIis not\fR tied to \fBnamespace -ensemble\fRs in any way). Note that \fIcmdPrefix\fR is whatever was +ensemble\fRs in any way; see \fBEXAMPLE\fR below for how to build a +\fBclass\fR that supports the API). Note that \fIcmdPrefix\fR is whatever was specified in the call to \fBchan create\fR, and may consist of multiple arguments; this will be expanded to multiple words in place of the prefix. @@ -46,7 +47,7 @@ this command handler. Any error thrown by the method will abort the creation of the channel and no channel will be created. The thrown error will appear as error thrown by \fBchan create\fR. Any exception other than an \fBerror\fR -(e.g. \fBbreak\fR, etc.) is treated as (and converted to) an error. +(e.g.,\ \fBbreak\fR, etc.) is treated as (and converted to) an error. .PP \fBNote:\fR If the creation of the channel was aborted due to failures here, then the \fBfinalize\fR subcommand will not be called. @@ -74,8 +75,8 @@ cleaned up. The return value of this subcommand is ignored. .PP If the subcommand throws an error the command which caused its -invocation (usually \fBclose\fR) will appear to have thrown this -error. Any exception beyond \fIerror\fR (e.g. \fIbreak\fR, etc.) is +invocation (usually \fBchan close\fR) will appear to have thrown this +error. Any exception beyond \fBerror\fR (e.g.,\ \fBbreak\fR, etc.) is treated as (and converted to) an error. .PP This subcommand is not invoked if the creation of the channel was @@ -93,7 +94,7 @@ the handler should disable event generation completely. .RS .PP \fBWarning:\fR Any return value of the subcommand is ignored. This -includes all errors thrown by the subcommand, break, continue, and +includes all errors thrown by the subcommand, \fBbreak\fR, \fBcontinue\fR, and custom return codes. .PP This subcommand interacts with \fBchan postevent\fR. Trying to post an @@ -105,7 +106,7 @@ event which was not listed in the last call to \fBwatch\fR will cause \fIcmdPrefix \fBread \fIchannelId count\fR . This \fIoptional\fR subcommand is called when the user requests data from the -channel \fIchannelId\fR. \fIcount\fR specifies how many \fBbytes\fR have been +channel \fIchannelId\fR. \fIcount\fR specifies how many \fIbytes\fR have been requested. If the subcommand is not supported then it is not possible to read from the channel handled by the command. .RS @@ -118,8 +119,8 @@ returning fewer bytes than requested is acceptable. .PP If the subcommand throws an error, the command which caused its invocation (usually \fBgets\fR, or \fBread\fR) will appear to have -thrown this error. Any exception beyond \fIerror\fR, (e.g. -\fIbreak\fR, etc.) is treated as and converted to an error. +thrown this error. Any exception beyond \fBerror\fR, (e.g.,\ \fBbreak\fR, +etc.) is treated as and converted to an error. .RE .TP \fIcmdPrefix \fBwrite \fIchannelId data\fR @@ -141,18 +142,20 @@ forbidden and will cause the Tcl core to throw an error. .PP If the subcommand throws an error the command which caused its invocation (usually \fBputs\fR) will appear to have thrown this error. -Any exception beyond \fIerror\fR (e.g. \fIbreak\fR, etc.) is treated +Any exception beyond \fBerror\fR (e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. .RE .TP \fIcmdPrefix \fBseek \fIchannelId offset base\fR . This \fIoptional\fR subcommand is responsible for the handling of -\fBseek\fR and \fBtell\fR requests on the channel \fIchannelId\fR. If it is not -supported then seeking will not be possible for the channel. +\fBchan seek\fR and \fBchan tell\fR requests on the channel +\fIchannelId\fR. If it is not supported then seeking will not be possible for +the channel. .RS .PP -The \fIbase\fR argument is one of +The \fIbase\fR argument is the same as the equivalent argument of the +builtin \fBchan seek\fR, namely: .TP 10 \fBstart\fR . @@ -166,27 +169,22 @@ Seeking is relative to the current seek position. . Seeking is relative to the end of the channel. .PP -The \fIbase\fR argument of the builtin \fBchan seek\fR command takes -the same names. -.PP The \fIoffset\fR is an integer number specifying the amount of \fBbytes\fR to seek forward or backward. A positive number should seek forward, and a negative number should seek backward. -.PP A channel may provide only limited seeking. For example sockets can seek forward, but not backward. .PP The return value of the subcommand is taken as the (new) location of the channel, counted from the start. This has to be an integer number greater than or equal to zero. -.PP If the subcommand throws an error the command which caused its -invocation (usually \fBseek\fR, or \fBtell\fR) will appear to have -thrown this error. Any exception beyond \fIerror\fR (e.g. \fIbreak\fR, +invocation (usually \fBchan seek\fR, or \fBchan tell\fR) will appear to have +thrown this error. Any exception beyond \fBerror\fR (e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. .PP -The offset/base combination of 0/\fBcurrent\fR signals a \fBtell\fR -request, i.e. seek nothing relative to the current location, making +The offset/base combination of 0/\fBcurrent\fR signals a \fBchan tell\fR +request, i.e.,\ seek nothing relative to the current location, making the new location identical to the current one, which is then returned. .RE .TP @@ -205,7 +203,7 @@ The return value of the subcommand is ignored. If the subcommand throws an error the command which performed the (re)configuration or query (usually \fBfconfigure\fR or \fBchan configure\fR) will appear to have thrown this error. Any exception -beyond \fIerror\fR (e.g. \fIbreak\fR, etc.) is treated as and +beyond \fBerror\fR (e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. .RE .TP @@ -219,9 +217,9 @@ subcommand \fBcgetall\fR must be supported as well. The subcommand should return the value of the specified \fIoption\fR. .PP If the subcommand throws an error, the command which performed the -(re)configuration or query (usually \fBfconfigure\fR) will appear to -have thrown this error. Any exception beyond \fIerror\fR (e.g. -\fIbreak\fR, etc.) is treated as and converted to an error. +(re)configuration or query (usually \fBfconfigure\fR or \fBchan configure\fR) +will appear to have thrown this error. Any exception beyond \fIerror\fR +(e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. .RE .TP \fIcmdPrefix \fBcgetall \fIchannelId\fR @@ -235,9 +233,9 @@ The subcommand should return a list of all options and their values. This list must have an even number of elements. .PP If the subcommand throws an error the command which performed the -(re)configuration or query (usually \fBfconfigure\fR) will appear to -have thrown this error. Any exception beyond \fIerror\fR (e.g. -\fIbreak\fR, etc.) is treated as and converted to an error. +(re)configuration or query (usually \fBfconfigure\fR or \fBchan configure\fR) +will appear to have thrown this error. Any exception beyond \fBerror\fR +(e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. .RE .TP \fIcmdPrefix \fBblocking \fIchannelId mode\fR @@ -251,19 +249,19 @@ channel should be non-blocking. The return value of the subcommand is ignored. .PP If the subcommand throws an error the command which caused its -invocation (usually \fBfconfigure\fR) will appear to have thrown this -error. Any exception beyond \fIerror\fR (e.g. \fIbreak\fR, etc.) is -treated as and converted to an error. +invocation (usually \fBfconfigure\fR or \fBchan configure\fR) will appear to +have thrown this error. Any exception beyond \fBerror\fR (e.g.,\ \fBbreak\fR, +etc.) is treated as and converted to an error. .RE .SH NOTES Some of the functions supported in channels defined in Tcl's C interface are not available to channels reflected to the Tcl level. .PP -The function \fBTcl_DriverGetHandleProc\fR is not supported; i.e. -reflected channels do not have OS specific handles. +The function \fBTcl_DriverGetHandleProc\fR is not supported; +i.e.,\ reflected channels do not have OS specific handles. .PP The function \fBTcl_DriverHandlerProc\fR is not supported. This driver -function is relevant only for stacked channels, i.e. transformations. +function is relevant only for stacked channels, i.e.,\ transformations. Reflected channels are always base channels, not transformations. .PP The function \fBTcl_DriverFlushProc\fR is not supported. This is @@ -278,30 +276,62 @@ This demonstrates how to make a channel that reads from a string. .PP .CS oo::class create stringchan { - variable data offset + variable data pos constructor {string {encoding {}}} { if {$encoding eq ""} {set encoding [encoding system]} set data [encoding convertto $encoding $string] - set offset 0 + set pos 0 } + method \fBinitialize\fR {ch mode} { - return "initialize finalize watch read" + return "initialize finalize watch read seek" } method \fBfinalize\fR {ch} { my destroy } method \fBwatch\fR {ch events} { - # Must be present but we ignore it because we do not post - # any events + # Must be present but we ignore it because we do not + # post any events } + + # Must be present on a readable channel method \fBread\fR {ch count} { - set d [string range $data $offset [expr {$offset+$count-1}]] - incr offset [string length $d] + set d [string range $data $pos [expr {$pos+$count-1}]] + incr pos [string length $d] return $d } + + # This method is optional, but useful for the example below + method \fBseek\fR {ch offset base} { + switch $base { + start { + set pos $offset + } + current { + incr pos $offset + } + end { + set pos [string length $data] + incr pos $offset + } + } + if {$pos < 0} { + set pos 0 + } elseif {$pos > [string length $data]} { + set pos [string length $data] + } + return $pos + } } + +# Now we create an instance... set string "The quick brown fox jumps over the lazy dog.\\n" set ch [\fBchan create\fR read [stringchan new $string]] + +puts [gets $ch]; # Prints the whole string + +seek $ch -5 end; +puts [read $ch]; # Prints just the last word .CE .SH "SEE ALSO" chan(n), transchan(n) -- cgit v0.12 From 616fced29acb8d7baf98bcd84637e59b465d8f09 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 11 Jul 2009 11:26:20 +0000 Subject: Extended the warning about vwait gotchas --- doc/vwait.n | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/vwait.n b/doc/vwait.n index 9a63813..43a2618 100644 --- a/doc/vwait.n +++ b/doc/vwait.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: vwait.n,v 1.10 2009/05/12 22:48:42 dkf Exp $ +'\" RCS: @(#) $Id: vwait.n,v 1.11 2009/07/11 11:26:20 dkf Exp $ '\" .so man.macros .TH vwait n 8.0 Tcl "Tcl Built-In Commands" @@ -41,7 +41,10 @@ inner ones do. It is recommended that code should never nest \fBvwait\fR calls (by avoiding putting them in event callbacks) but when that is not possible, care should be taken to add interlock variables to the code to prevent all reentrant calls to \fBvwait\fR that are not \fIstrictly\fR -necessary. +necessary. Be aware that the synchronous modes of operation of some Tcl +packages (e.g.,\ \fBhttp\fR) use \fBvwait\fR internally; if using the event +loop, it is best to use the asynchronous callback-based modes of operation of +those packages where available. .SH EXAMPLES .PP Run the event-loop continually until some event calls \fBexit\fR. -- cgit v0.12 From a4d180ffc2e06910053cba53b3700cdd6de82a00 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 11 Jul 2009 13:34:24 +0000 Subject: tweaks --- generic/tclCmdIL.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index e86f686..cbc2b60 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.166 2009/06/30 00:56:08 das Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.167 2009/07/11 13:34:24 dkf Exp $ */ #include "tclInt.h" @@ -2363,7 +2363,7 @@ Tcl_LrangeObjCmd( } result = TclGetIntForIndexM(interp, objv[2], /*endValue*/ listLen - 1, - &first); + &first); if (result != TCL_OK) { return result; } @@ -2372,7 +2372,7 @@ Tcl_LrangeObjCmd( } result = TclGetIntForIndexM(interp, objv[3], /*endValue*/ listLen - 1, - &last); + &last); if (result != TCL_OK) { return result; } @@ -2408,8 +2408,8 @@ Tcl_LrangeObjCmd( } /* - * This one is not conditioned on (first>0) in order to - * preserve the string-canonizing effect of [lrange 0 end]. + * This one is not conditioned on (first>0) in order to preserve the + * string-canonizing effect of [lrange 0 end]. */ Tcl_ListObjReplace(interp, objv[1], 0, first, 0, NULL); @@ -2497,6 +2497,7 @@ Tcl_LrepeatObjCmd( listPtr = Tcl_NewListObj(totalElems, NULL); if (totalElems) { List *listRepPtr = listPtr->internalRep.twoPtrValue.ptr1; + listRepPtr->elemCount = elementCount*objc; dataArray = &listRepPtr->elements; } -- cgit v0.12 From 044907f34579d3b64afa81854a8b9ffce76562ad Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 11 Jul 2009 17:11:44 +0000 Subject: Substantially increased the discussion of issues and work-arounds relating to nested vwaits, following discussion on the tcl-core mailing list on the topic. --- ChangeLog | 6 ++++ doc/vwait.n | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 117 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f278101..015eb9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-11 Donal K. Fellows + + * doc/vwait.n: Substantially increased the discussion of issues and + work-arounds relating to nested vwaits, following discussion on the + tcl-core mailing list on the topic. + 2009-07-10 Pat Thoyts * tests/zlib.test: ZlibTransformClose may be called with a NULL diff --git a/doc/vwait.n b/doc/vwait.n index 43a2618..ed0bac2 100644 --- a/doc/vwait.n +++ b/doc/vwait.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: vwait.n,v 1.11 2009/07/11 11:26:20 dkf Exp $ +'\" RCS: @(#) $Id: vwait.n,v 1.12 2009/07/11 17:11:44 dkf Exp $ '\" .so man.macros .TH vwait n 8.0 Tcl "Tcl Built-In Commands" @@ -33,7 +33,7 @@ if an event handler sets \fIvarName\fR and then itself calls \fBvwait\fR to wait for a different variable, then it may not return for a long time. During this time the top-level \fBvwait\fR is blocked waiting for the event handler to complete, so it cannot -return either. +return either. (See the \fBNESTED VWAITS BY EXAMPLE\fR below.) .PP To be clear, \fImultiple \fBvwait\fI calls will nest and will not happen in parallel\fR. The outermost call to \fBvwait\fR will not return until all the @@ -127,6 +127,115 @@ coroutine task apply {{} { yield }} .CE +.SS "NESTED VWAITS BY EXAMPLE" +.PP +This example demonstrates what can happen when the \fBvwait\fR command is +nested. The script will never finish because the waiting for the \fIa\fR +variable never finishes; that \fBvwait\fR command is still waiting for a +script scheduled with \fBafter\fR to complete, which just happens to be +running an inner \fBvwait\fR (for \fIb\fR) even though the event that the +outer \fBvwait\fR was waiting for (the setting of \fIa\fR) has occurred. +.PP +.CS +after 500 { + puts "waiting for b" + \fBvwait\fR b + puts "b was set" +} +after 1000 { + puts "setting a" + set a 10 +} +puts "waiting for a" +\fBvwait\fR a +puts "a was set" +puts "setting b" +set b 42 +.CE +.PP +If you run the above code, you get this output: +.PP +.CS +waiting for a +waiting for b +setting a +.CE +.PP +The script will never print +.QW "a was set" +until after it has printed +.QW "b was set" +because of the nesting of \fBvwait\fR commands, and yet \fIb\fR will not be +set until after the outer \fBvwait\fR returns, so the script has deadlocked. +The only ways to avoid this are to either structure the overall program in +continuation-passing style or to use \fBcoroutine\fR to make the continuations +implicit. The first of these options would be written as: +.PP +.CS +after 500 { + puts "waiting for b" + trace add variable b write {apply {args { + global a b + trace remove variable ::b write [lrange [info level 0] 0 1] + puts "b was set" + set ::done ok + }}} +} +after 1000 { + puts "setting a" + set a 10 +} +puts "waiting for a" +trace add variable a write {apply {args { + global a b + trace remove variable a write [lrange [info level 0] 0 1] + puts "a was set" + puts "setting b" + set b 42 +}}} +\fBvwait\fR done +.CE +.PP +The second option, with \fBcoroutine\fR and some helper procedures, is done +like this: +.PP +.CS +# A coroutine-based wait-for-variable command +proc waitvar globalVar { + trace add variable ::$globalVar write \e + [list apply {{v c args} { + trace remove variable $v write [lrange [info level 0] 0 3] + after 0 $c + }} ::$globalVar [info coroutine]] + yield +} +# A coroutine-based wait-for-some-time command +proc waittime ms { + after $ms [info coroutine] + yield +} + +coroutine task-1 eval { + puts "waiting for a" + waitvar a + puts "a was set" + puts "setting b" + set b 42 +} +coroutine task-2 eval { + waittime 500 + puts "waiting for b" + waitvar b + puts "b was set" + set done ok +} +coroutine task-3 eval { + waittime 1000 + puts "setting a" + set a 10 +} +\fBvwait\fR done +.CE .SH "SEE ALSO" global(n), update(n) .SH KEYWORDS -- cgit v0.12 From 08c08fbd919645722f3a2fe5db61c2e4dfa97d2c Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 12 Jul 2009 14:51:30 +0000 Subject: Reorganize method cache handling a bit to better support itcl nasty cases. [Bug 1895546] --- ChangeLog | 7 +++++++ generic/tclOO.c | 60 +++++++++++++++++++++++++++++++++-------------------- generic/tclOOCall.c | 18 ++++++++++------ generic/tclOOInt.h | 5 +++-- 4 files changed, 60 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 015eb9a..4ba0279 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-12 Donal K. Fellows + + * generic/tclOOCall.c (TclOOGetCallContext): [Bug 1895546]: Changed + * generic/tclOO.c (TclOOObjectCmdCore): the way that the cache is + managed so that when itcl does cunning things, those cunning things + can be cached properly. + 2009-07-11 Donal K. Fellows * doc/vwait.n: Substantially increased the discussion of issues and diff --git a/generic/tclOO.c b/generic/tclOO.c index 1ba0ba8..c1e8678 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.22 2009/05/08 08:48:19 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.23 2009/07/12 14:51:30 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -625,7 +625,7 @@ ObjectRenamedTrace( AddRef(oPtr); oPtr->flags |= OBJECT_DELETED; - contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); + contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); if (contextPtr != NULL) { int result; Tcl_InterpState state; @@ -1330,7 +1330,8 @@ Tcl_NewObjectInstance( */ if (objc >= 0) { - CallContext *contextPtr = TclOOGetCallContext(oPtr,NULL,CONSTRUCTOR); + CallContext *contextPtr = + TclOOGetCallContext(oPtr, NULL, CONSTRUCTOR, NULL); if (contextPtr != NULL) { int result; @@ -1426,7 +1427,7 @@ TclNRNewObjectInstance( *objectPtr = (Tcl_Object) oPtr; return TCL_OK; } - contextPtr = TclOOGetCallContext(oPtr,NULL,CONSTRUCTOR); + contextPtr = TclOOGetCallContext(oPtr, NULL, CONSTRUCTOR, NULL); if (contextPtr == NULL) { *objectPtr = (Tcl_Object) oPtr; return TCL_OK; @@ -2097,34 +2098,49 @@ TclOOObjectCmdCore( methodNamePtr = objv[1]; if (oPtr->mapMethodNameProc != NULL) { register Class **startClsPtr = &startCls; + Tcl_Obj *mappedMethodName = Tcl_DuplicateObj(methodNamePtr); - methodNamePtr = Tcl_DuplicateObj(methodNamePtr); result = oPtr->mapMethodNameProc(interp, (Tcl_Object) oPtr, - (Tcl_Class *) startClsPtr, methodNamePtr); + (Tcl_Class *) startClsPtr, mappedMethodName); if (result != TCL_OK) { - if (result == TCL_ERROR) { + Tcl_DecrRefCount(mappedMethodName); + if (result == TCL_BREAK) { + goto noMapping; + } else if (result == TCL_ERROR) { Tcl_AddErrorInfo(interp, "\n (while mapping method name)"); } - Tcl_DecrRefCount(methodNamePtr); return result; } - } - Tcl_IncrRefCount(methodNamePtr); - /* - * Get the call chain. - */ + /* + * Get the call chain for the remapped name. + */ - contextPtr = TclOOGetCallContext(oPtr, methodNamePtr, - flags | (oPtr->flags & FILTER_HANDLING)); - if (contextPtr == NULL) { - Tcl_AppendResult(interp, "impossible to invoke method \"", - TclGetString(methodNamePtr), - "\": no defined method or unknown method", NULL); - Tcl_DecrRefCount(methodNamePtr); - return TCL_ERROR; + Tcl_IncrRefCount(mappedMethodName); + contextPtr = TclOOGetCallContext(oPtr, mappedMethodName, + flags | (oPtr->flags & FILTER_HANDLING), methodNamePtr); + Tcl_DecrRefCount(mappedMethodName); + if (contextPtr == NULL) { + Tcl_AppendResult(interp, "impossible to invoke method \"", + TclGetString(methodNamePtr), + "\": no defined method or unknown method", NULL); + return TCL_ERROR; + } + } else { + /* + * Get the call chain. + */ + + noMapping: + contextPtr = TclOOGetCallContext(oPtr, methodNamePtr, + flags | (oPtr->flags & FILTER_HANDLING), NULL); + if (contextPtr == NULL) { + Tcl_AppendResult(interp, "impossible to invoke method \"", + TclGetString(methodNamePtr), + "\": no defined method or unknown method", NULL); + return TCL_ERROR; + } } - Tcl_DecrRefCount(methodNamePtr); /* * Check to see if we need to apply magical tricks to start part way diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index c4b9ab2..e9760f7 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.13 2008/10/16 22:34:18 nijtmans Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.14 2009/07/12 14:51:30 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -897,10 +897,13 @@ TclOOGetCallContext( Tcl_Obj *methodNameObj, /* The name of the method to get the context * for. NULL when getting a constructor or * destructor chain. */ - int flags) /* What sort of context are we looking for. + int flags, /* What sort of context are we looking for. * Only the bits PUBLIC_METHOD, CONSTRUCTOR, * PRIVATE_METHOD, DESTRUCTOR and * FILTER_HANDLING are useful. */ + Tcl_Obj *cacheInThisObj) /* What object to cache in, or NULL if it is + * to be in the same object as the + * methodNameObj. */ { CallContext *contextPtr; CallChain *callPtr; @@ -909,6 +912,9 @@ TclOOGetCallContext( Tcl_HashEntry *hPtr; Tcl_HashTable doneFilters; + if (cacheInThisObj == NULL) { + cacheInThisObj = methodNameObj; + } if (flags&(SPECIAL|FILTER_HANDLING) || (oPtr->flags&FILTER_HANDLING)) { hPtr = NULL; doFilters = 0; @@ -944,13 +950,13 @@ TclOOGetCallContext( const int reuseMask = ((flags & PUBLIC_METHOD) ? ~0 : ~PUBLIC_METHOD); - if (methodNameObj->typePtr == &methodNameType) { - callPtr = methodNameObj->internalRep.otherValuePtr; + if (cacheInThisObj->typePtr == &methodNameType) { + callPtr = cacheInThisObj->internalRep.otherValuePtr; if (IsStillValid(callPtr, oPtr, flags, reuseMask)) { callPtr->refCount++; goto returnContext; } - methodNameObj->typePtr->freeIntRepProc(methodNameObj); + cacheInThisObj->typePtr->freeIntRepProc(cacheInThisObj); } if (oPtr->flags & USE_CLASS_CACHE) { @@ -1067,7 +1073,7 @@ TclOOGetCallContext( } callPtr->refCount++; Tcl_SetHashValue(hPtr, callPtr); - StashCallChain(methodNameObj, callPtr); + StashCallChain(cacheInThisObj, callPtr); } else if (flags & CONSTRUCTOR) { if (oPtr->selfCls->constructorChainPtr) { TclOODeleteChain(oPtr->selfCls->constructorChainPtr); diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 1579ddb..17db3f1 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.11 2009/04/11 11:18:51 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.12 2009/07/12 14:51:30 dkf Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -512,7 +512,8 @@ MODULE_SCOPE void TclOODeleteChainCache(Tcl_HashTable *tablePtr); MODULE_SCOPE void TclOODeleteContext(CallContext *contextPtr); MODULE_SCOPE void TclOODelMethodRef(Method *method); MODULE_SCOPE CallContext *TclOOGetCallContext(Object *oPtr, - Tcl_Obj *methodNameObj, int flags); + Tcl_Obj *methodNameObj, int flags, + Tcl_Obj *cacheInThisObj); MODULE_SCOPE Foundation *TclOOGetFoundation(Tcl_Interp *interp); MODULE_SCOPE Tcl_Obj * TclOOGetFwdFromMethod(Method *mPtr); MODULE_SCOPE Proc * TclOOGetProcFromMethod(Method *mPtr); -- cgit v0.12 From fde10a8fbff3c774f95f668f51b6d60c1489d50d Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 12 Jul 2009 14:57:56 +0000 Subject: Updated documentation to provide better description of this advanced feature. --- doc/Class.3 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/Class.3 b/doc/Class.3 index b7e17db..e7b0881 100644 --- a/doc/Class.3 +++ b/doc/Class.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Class.3,v 1.2 2008/06/29 22:28:23 dkf Exp $ +'\" RCS: @(#) $Id: Class.3,v 1.3 2009/07/12 14:57:56 dkf Exp $ '\" .so man.macros .TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions" @@ -211,20 +211,21 @@ typedef int \fBTcl_ObjectMapMethodNameProc\fR( Tcl_Obj *\fImethodNameObj\fR); .CE .PP -The \fIinterp\fR parameter (and the integer result) follow normal Tcl result -rules for error reporting. The \fIobject\fR parameter says which object is -being processed. The \fIstartClsPtr\fR parameter points to a variable that -contains the first class to provide a definition in the method chain to -process, or NULL if the whole chain is to be processed (the argument itself is -never NULL); this variable may be updated by the callback. The -\fImethodNameObj\fR parameter gives an unshared object containing the name of -the method being invoked, as provided by the user; this object may be updated -by the callback. +If the result is TCL_OK, the remapping is assumed to have been done. If the +result is TCL_ERROR, an error message will have been left in \fIinterp\fR and +the method call will fail. If the result is TCL_BREAK, the standard method +name lookup rules will be used; the behavior of other result codes is +currently undefined. The \fIobject\fR parameter says which object is being +processed. The \fIstartClsPtr\fR parameter points to a variable that contains +the first class to provide a definition in the method chain to process, or +NULL if the whole chain is to be processed (the argument itself is never +NULL); this variable may be updated by the callback. The \fImethodNameObj\fR +parameter gives an unshared object containing the name of the method being +invoked, as provided by the user; this object may be updated by the callback. .SH "SEE ALSO" Method(3), oo::class(n), oo::copy(n), oo::define(n), oo::object(n) .SH KEYWORDS class, constructor, object - .\" Local variables: .\" mode: nroff .\" fill-column: 78 -- cgit v0.12 From 02457f7d6507f76fac8b308899e6592ab8214cb3 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 12 Jul 2009 18:04:33 +0000 Subject: Fix [Bug 2637173] by consolidating bytearray purity check. --- ChangeLog | 6 ++++++ generic/tclCmdMZ.c | 12 ++++++------ generic/tclExecute.c | 10 +++++----- generic/tclInt.h | 26 +++++++++++++++++++++++++- generic/tclStringObj.c | 23 +++++------------------ generic/tclUtil.c | 12 ++++++------ 6 files changed, 53 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ba0279..ae48b2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-07-12 Donal K. Fellows + * generic/tclCmdMZ.c (StringIndexCmd, StringEqualCmd, StringCmpCmd): + * generic/tclExecute.c (TclExecuteByteCode): [Bug 2637173]: Factor out + * generic/tclInt.h (TclIsPureByteArray): the code to determine if + * generic/tclUtil.c (TclStringMatchObj): it is safe to work with + byte arrays directly, so that we get the check correct _once_. + * generic/tclOOCall.c (TclOOGetCallContext): [Bug 1895546]: Changed * generic/tclOO.c (TclOOObjectCmdCore): the way that the cache is managed so that when itcl does cunning things, those cunning things diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index bb0d3bd..2021b5b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.183 2009/05/06 20:16:17 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.184 2009/07/12 18:04:33 dkf Exp $ */ #include "tclInt.h" @@ -1369,7 +1369,7 @@ StringIndexCmd( * bytearray for a result. */ - if (objv[1]->typePtr == &tclByteArrayType) { + if (TclIsPureByteArray(objv[1])) { unsigned char uch = (unsigned char) ch; Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(&uch, 1)); @@ -2490,8 +2490,8 @@ StringEqualCmd( return TCL_OK; } - if (!nocase && objv[0]->typePtr == &tclByteArrayType && - objv[1]->typePtr == &tclByteArrayType) { + if (!nocase && TclIsPureByteArray(objv[0]) && + TclIsPureByteArray(objv[1])) { /* * Use binary versions of comparisons since that won't cause undue * type conversions and it is much faster. Only do this if we're @@ -2637,8 +2637,8 @@ StringCmpCmd( return TCL_OK; } - if (!nocase && objv[0]->typePtr == &tclByteArrayType && - objv[1]->typePtr == &tclByteArrayType) { + if (!nocase && TclIsPureByteArray(objv[0]) && + TclIsPureByteArray(objv[1])) { /* * Use binary versions of comparisons since that won't cause undue * type conversions and it is much faster. Only do this if we're diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 6c89523..aac36da 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.439 2009/06/03 23:12:11 das Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.440 2009/07/12 18:04:33 dkf Exp $ */ #include "tclInt.h" @@ -4516,8 +4516,8 @@ TclExecuteByteCode( */ iResult = s1len = s2len = 0; - } else if ((valuePtr->typePtr == &tclByteArrayType) - && (value2Ptr->typePtr == &tclByteArrayType)) { + } else if (TclIsPureByteArray(valuePtr) + && TclIsPureByteArray(value2Ptr)) { s1 = (char *) Tcl_GetByteArrayFromObj(valuePtr, &s1len); s2 = (char *) Tcl_GetByteArrayFromObj(value2Ptr, &s2len); iResult = memcmp(s1, s2, @@ -4635,7 +4635,7 @@ TclExecuteByteCode( } if ((index >= 0) && (index < length)) { - if (valuePtr->typePtr == &tclByteArrayType) { + if (TclIsPureByteArray(valuePtr)) { objResultPtr = Tcl_NewByteArrayObj( Tcl_GetByteArrayFromObj(valuePtr, &length)+index, 1); } else if (valuePtr->bytes && length == valuePtr->length) { @@ -4687,7 +4687,7 @@ TclExecuteByteCode( ustring2 = Tcl_GetUnicodeFromObj(value2Ptr, &length2); match = TclUniCharMatch(ustring1, length1, ustring2, length2, nocase); - } else if ((valuePtr->typePtr == &tclByteArrayType) && !nocase) { + } else if (TclIsPureByteArray(valuePtr) && !nocase) { unsigned char *string1, *string2; int length1, length2; diff --git a/generic/tclInt.h b/generic/tclInt.h index 42915e0..007facd 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.426 2009/06/30 14:21:43 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.427 2009/07/12 18:04:33 dkf Exp $ */ #ifndef _TCLINT @@ -236,8 +236,15 @@ typedef struct Namespace { struct Namespace *parentPtr;/* Points to the namespace that contains this * one. NULL if this is the global * namespace. */ +#if 1 Tcl_HashTable childTable; /* Contains any child namespaces. Indexed by * strings; values have type (Namespace *). */ +#else + Tcl_HashTable *childTablePtr; + /* Contains any child namespaces. Indexed by + * strings; values have type (Namespace *). If + * NULL, there are no children. */ +#endif long nsId; /* Unique id for the namespace. */ Tcl_Interp *interp; /* The interpreter containing this * namespace. */ @@ -3847,6 +3854,23 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, (numChars) = count; \ } while (0); +/* + *---------------------------------------------------------------- + * Macro that encapsulates the logic that determines when it is safe to + * interpret a string as a byte array directly. In summary, the object must be + * a byte array and must not have a string representation (as the operations + * that it is used in are defined on strings, not byte arrays). Theoretically + * it is possible to also be efficient in the case where the object's bytes + * field is filled by generation from the byte array (c.f. list canonicality) + * but we don't do that at the moment since this is purely about efficiency. + * The ANSI C "prototype" for this macro is: + * + * MODULE_SCOPE int TclIsPureByteArray(Tcl_Obj *objPtr); + *---------------------------------------------------------------- + */ + +#define TclIsPureByteArray(objPtr) \ + (((objPtr)->typePtr==&tclByteArrayType) && ((objPtr)->bytes==NULL)) /* *---------------------------------------------------------------- diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 09ac25a..7804e1f 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.126 2009/07/01 15:06:06 patthoyts Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.127 2009/07/12 18:04:33 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -144,19 +144,6 @@ typedef struct String { ((objPtr)->internalRep.otherValuePtr = (void *) (stringPtr)) /* - * Macro that encapsulates the logic that determines when it is safe to - * interpret a string as a byte array directly. In summary, the object must be - * a byte array and must not have a string representation (as the operations - * that it is used in are defined on strings, not byte arrays). Theoretically - * it is possible to also be efficient in the case where the object's bytes - * field is filled by generation from the byte array (c.f. list canonicality) - * but we don't do that at the moment since this is purely about efficiency. - */ - -#define IS_PURE_BYTE_ARRAY(objPtr) \ - (((objPtr)->typePtr==&tclByteArrayType) && ((objPtr)->bytes==NULL)) - -/* * TCL STRING GROWTH ALGORITHM * * When growing strings (during an append, for example), the following growth @@ -472,7 +459,7 @@ Tcl_GetCharLength( * perform the get-length operation. */ - if (IS_PURE_BYTE_ARRAY(objPtr)) { + if (TclIsPureByteArray(objPtr)) { int length; (void) Tcl_GetByteArrayFromObj(objPtr, &length); @@ -538,7 +525,7 @@ Tcl_GetUniChar( * perform the indexing operation. */ - if (IS_PURE_BYTE_ARRAY(objPtr)) { + if (TclIsPureByteArray(objPtr)) { unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, NULL); return (Tcl_UniChar) bytes[index]; @@ -669,7 +656,7 @@ Tcl_GetRange( * perform the substring operation. */ - if (IS_PURE_BYTE_ARRAY(objPtr)) { + if (TclIsPureByteArray(objPtr)) { unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, NULL); return Tcl_NewByteArrayObj(bytes+first, last-first+1); @@ -1247,7 +1234,7 @@ Tcl_AppendObjToObj( * information; this is a special-case optimization only. */ - if (IS_PURE_BYTE_ARRAY(objPtr) && IS_PURE_BYTE_ARRAY(appendObjPtr)) { + if (TclIsPureByteArray(objPtr) && TclIsPureByteArray(appendObjPtr)) { unsigned char *bytesDst, *bytesSrc; int lengthSrc, lengthTotal; diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 881edca..862470f 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.110 2009/02/25 19:59:52 dgp Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.111 2009/07/12 18:04:33 dkf Exp $ */ #include "tclInt.h" @@ -1747,9 +1747,10 @@ TclByteArrayMatch( int TclStringMatchObj( - Tcl_Obj *strObj, /* string object. */ - Tcl_Obj *ptnObj, /* pattern object. */ - int flags) /* Only TCL_MATCH_NOCASE should be passed or 0. */ + Tcl_Obj *strObj, /* string object. */ + Tcl_Obj *ptnObj, /* pattern object. */ + int flags) /* Only TCL_MATCH_NOCASE should be passed, or + * 0. */ { int match, length, plen; @@ -1766,8 +1767,7 @@ TclStringMatchObj( udata = Tcl_GetUnicodeFromObj(strObj, &length); uptn = Tcl_GetUnicodeFromObj(ptnObj, &plen); match = TclUniCharMatch(udata, length, uptn, plen, flags); - } else if ((strObj->typePtr == &tclByteArrayType) - && (strObj->bytes == NULL) && !flags) { + } else if (TclIsPureByteArray(strObj) && !flags) { unsigned char *data, *ptn; data = Tcl_GetByteArrayFromObj(strObj, &length); -- cgit v0.12 From 08604cad04da0d67c84406f99bda814f6a416386 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 14 Jul 2009 16:34:08 +0000 Subject: * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex, TclCleanupByteCode, TclCompileScript): * generic/tclExecute.c (TclCompileObj, TclExecuteByteCode): * tclCompile.h (ExtCmdLoc): * tclInt.h (ExtIndex, CFWordBC, CmdFrame): * tclBasic.c (DeleteInterpProc, TclArgumentBCEnter, TclArgumentBCRelease, TclArgumentGet, SAVE_CONTEXT, RESTORE_CONTEXT, NRCoroutineExitCallback, TclNRCoroutineObjCmd): * generic/tclCmdAH.c (TclNRForObjCmd, TclNRForIterCallback, ForNextCallback): * generic/tclCmdMZ.c (TclNRWhileObjCmd): Extended the bytecode compiler initialization to recognize the compilation of whole files (NRE enabled 'source' command) and switch to the counting of absolute lines in that case. Further extended the bytecode compiler to track the start line in the generated information, and modified the bytecode execution to recompile an object if the location as per the calling context doesn't match the location saved in the bytecode. This part could be optimized more by using more memory to keep all possibilities which occur around, or by just adjusting the location information instead of a total recompile. Reworked the handling of literal command arguments in bytecode to be saved (compiler) and used (execution) per command (See the TCL_INVOKE_STK* instructions), and not per the whole bytecode. This, and the previous change remove the problems with location data caused by literal sharing (across whole files, but also proc bodies). Simplified the associated datastructures (ExtIndex is gone, as is the function EnterCmdWordIndex). The last change causes the hashtable 'lineLABCPtr' to be state which has to be kept per coroutine, like the CmdFrame stack. Reworked the coroutine support code to create, delete and switch the information as needed. Further reworked the tailcall command as well, it has to pop its own arguments when run in a bytecode context to keep a proper stack in 'lineLABCPtr'. Fixed the mishandling of line information in the NRE-enabled 'for' and 'while' commands introduced when both were made to share their iteration callbacks without taking into account that the loop body is found in different words of the command. Introduced a separate data structure to hold all the callback information, as we went over the limit of 4 direct client-data values for NRE callbacks. The above fixes [Bug 1605269]. --- ChangeLog | 50 ++++++++++++ generic/tclBasic.c | 220 +++++++++++++++++++++++++++++++++++---------------- generic/tclCmdAH.c | 43 ++++++---- generic/tclCmdMZ.c | 15 +++- generic/tclCompile.c | 98 +++++++++++------------ generic/tclCompile.h | 17 ++-- generic/tclExecute.c | 100 +++++++++++++++++++++-- generic/tclInt.h | 47 +++++++---- tests/info.test | 20 ++++- 9 files changed, 443 insertions(+), 167 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae48b2e..717c1d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,53 @@ +2009-07-13 Andreas Kupries + + * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex, + TclCleanupByteCode, TclCompileScript): + * generic/tclExecute.c (TclCompileObj, TclExecuteByteCode): + * tclCompile.h (ExtCmdLoc): + * tclInt.h (ExtIndex, CFWordBC, CmdFrame): + * tclBasic.c (DeleteInterpProc, TclArgumentBCEnter, + TclArgumentBCRelease, TclArgumentGet, SAVE_CONTEXT, + RESTORE_CONTEXT, NRCoroutineExitCallback, TclNRCoroutineObjCmd): + * generic/tclCmdAH.c (TclNRForObjCmd, TclNRForIterCallback, + ForNextCallback): + * generic/tclCmdMZ.c (TclNRWhileObjCmd): + + Extended the bytecode compiler initialization to recognize the + compilation of whole files (NRE enabled 'source' command) and + switch to the counting of absolute lines in that case. + + Further extended the bytecode compiler to track the start line in + the generated information, and modified the bytecode execution to + recompile an object if the location as per the calling context + doesn't match the location saved in the bytecode. This part could + be optimized more by using more memory to keep all possibilities + which occur around, or by just adjusting the location information + instead of a total recompile. + + Reworked the handling of literal command arguments in bytecode to + be saved (compiler) and used (execution) per command (See the + TCL_INVOKE_STK* instructions), and not per the whole bytecode. + This, and the previous change remove the problems with location + data caused by literal sharing (across whole files, but also proc + bodies). Simplified the associated datastructures (ExtIndex is + gone, as is the function EnterCmdWordIndex). + + The last change causes the hashtable 'lineLABCPtr' to be state + which has to be kept per coroutine, like the CmdFrame stack. + Reworked the coroutine support code to create, delete and switch + the information as needed. Further reworked the tailcall command + as well, it has to pop its own arguments when run in a bytecode + context to keep a proper stack in 'lineLABCPtr'. + + Fixed the mishandling of line information in the NRE-enabled 'for' + and 'while' commands introduced when both were made to share their + iteration callbacks without taking into account that the loop body + is found in different words of the command. Introduced a separate + data structure to hold all the callback information, as we went + over the limit of 4 direct client-data values for NRE callbacks. + + The above fixes [Bug 1605269]. + 2009-07-12 Donal K. Fellows * generic/tclCmdMZ.c (StringIndexCmd, StringEqualCmd, StringCmpCmd): diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 264fdc8..a097976 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.394 2009/05/08 08:48:19 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.395 2009/07/14 16:34:08 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1545,9 +1545,7 @@ DeleteInterpProc( ckfree((char *) eclPtr->loc); } - if (eclPtr->eiloc != NULL) { - ckfree((char *) eclPtr->eiloc); - } + Tcl_DeleteHashTable (&eclPtr->litInfo); ckfree((char *) eclPtr); Tcl_DeleteHashEntry(hPtr); @@ -5448,49 +5446,74 @@ TclArgumentRelease( void TclArgumentBCEnter( - Tcl_Interp *interp, - void *codePtr, - CmdFrame *cfPtr) + Tcl_Interp* interp, + Tcl_Obj* objv[], + int objc, + void* codePtr, + CmdFrame* cfPtr, + int pc) { - Interp *iPtr = (Interp *) interp; - Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, - (char *) codePtr); + Interp* iPtr = (Interp*) interp; + Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); if (hePtr) { - ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); - int i; + ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); + hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, (char*) pc); - for (i = 0; i < eclPtr->nueiloc; i++) { - ExtIndex *eiPtr = &eclPtr->eiloc[i]; - Tcl_Obj *obj = eiPtr->obj; - int new; - Tcl_HashEntry *hPtr; - CFWordBC *cfwPtr; + if (hePtr) { + int word; + int cmd = (int) Tcl_GetHashValue(hePtr); + ECL* ePtr = &eclPtr->loc[cmd]; + CFWordBC* lastPtr = 0; - hPtr = Tcl_CreateHashEntry(iPtr->lineLABCPtr, (char *) obj, &new); - if (new) { - /* - * The word is not on the stack yet, remember the current - * location and initialize references. - */ + /* + * A few truths ... + * (1) ePtr->nline == objc + * (2) (ePtr->line[word] < 0) => !literal, for all words + * (3) (word == 0) => !literal + * + * Item (2) is why we can use objv to get the literals, and do not + * have to save them at compile time. + */ - cfwPtr = (CFWordBC *) ckalloc(sizeof(CFWordBC)); - cfwPtr->framePtr = cfPtr; - cfwPtr->eiPtr = eiPtr; - cfwPtr->refCount = 1; - Tcl_SetHashValue(hPtr, cfwPtr); - } else { - /* - * The word is already on the stack, its current location is - * not relevant. Just remember the reference to prevent early - * removal. - */ + for (word = 1; word < objc; word++) { + if (ePtr->line[word] >= 0) { + int isnew; + Tcl_HashEntry* hPtr = + Tcl_CreateHashEntry (iPtr->lineLABCPtr, + (char*) objv[word], &isnew); + CFWordBC* cfwPtr = (CFWordBC*) ckalloc (sizeof (CFWordBC)); + + cfwPtr->framePtr = cfPtr; + cfwPtr->obj = objv[word]; + cfwPtr->pc = pc; + cfwPtr->word = word; + cfwPtr->nextPtr = lastPtr; + lastPtr = cfwPtr; + + if (isnew) { + /* + * The word is not on the stack yet, remember the + * current location and initialize references. + */ + cfwPtr->prevPtr = NULL; + } else { + /* + * The object is already on the stack, however it may + * have a different location now (literal sharing may + * map multiple location to a single Tcl_Obj*. Save + * the old information in the new structure. + */ + cfwPtr->prevPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); + } - cfwPtr = Tcl_GetHashValue(hPtr); - cfwPtr->refCount++; - } - } - } + Tcl_SetHashValue (hPtr, cfwPtr); + } + } /* for */ + + cfPtr->litarg = lastPtr; + } /* if */ + } /* if */ } /* @@ -5516,37 +5539,33 @@ TclArgumentBCEnter( void TclArgumentBCRelease( Tcl_Interp *interp, - void *codePtr) + CmdFrame* cfPtr) { - Interp *iPtr = (Interp *) interp; - Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, - (char *) codePtr); + Interp* iPtr = (Interp*) interp; + CFWordBC* cfwPtr = (CFWordBC*) cfPtr->litarg; - if (hePtr) { - ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); - int i; - - for (i = 0; i < eclPtr->nueiloc; i++) { - Tcl_Obj *obj = eclPtr->eiloc[i].obj; - Tcl_HashEntry *hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, - (char *) obj); - CFWordBC *cfwPtr; - - if (!hPtr) { - continue; - } - - cfwPtr = Tcl_GetHashValue(hPtr); + while (cfwPtr) { + CFWordBC* nextPtr = cfwPtr->nextPtr; + Tcl_HashEntry* hPtr = + Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) cfwPtr->obj); + CFWordBC* xPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); - cfwPtr->refCount--; - if (cfwPtr->refCount > 0) { - continue; - } + if (xPtr != cfwPtr) { + Tcl_Panic ("TclArgumentBC Enter/Release Mismatch"); + } - ckfree((char *) cfwPtr); + if (cfwPtr->prevPtr) { + Tcl_SetHashValue(hPtr, cfwPtr->prevPtr); + } else { Tcl_DeleteHashEntry(hPtr); } + + ckfree((char *) cfwPtr); + + cfwPtr = nextPtr; } + + cfPtr->litarg = NULL; } /* @@ -5612,13 +5631,12 @@ TclArgumentGet( hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) obj); if (hPtr) { CFWordBC *cfwPtr = Tcl_GetHashValue(hPtr); - ExtIndex *eiPtr = cfwPtr->eiPtr; framePtr = cfwPtr->framePtr; framePtr->data.tebc.pc = (char *) (((ByteCode *) - framePtr->data.tebc.codePtr)->codeStart + eiPtr->pc); + framePtr->data.tebc.codePtr)->codeStart + cfwPtr->pc); *cfPtrPtr = cfwPtr->framePtr; - *wordPtr = eiPtr->word; + *wordPtr = cfwPtr->word; return; } } @@ -8072,6 +8090,16 @@ TclNRTailcallObjCmd( * TclNRAddCallBack macro to build the callback) */ + /* + * In a bytecode execution context the engine has called + * TclArgumentBCEnter() which, due to the tailcall, is not paired with a + * regular TclArgumentBCRelease. Get rid of it on our own. + */ + + if (iPtr->cmdFramePtr->type == TCL_LOCATION_BC) { + TclArgumentBCRelease (interp, iPtr->cmdFramePtr); + } + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); tailcallPtr = TOP_CB(interp); TOP_CB(interp) = tailcallPtr->nextPtr; @@ -8182,12 +8210,14 @@ static const CorContext NULL_CONTEXT = {NULL, NULL, NULL}; #define SAVE_CONTEXT(context) \ (context).framePtr = iPtr->framePtr; \ (context).varFramePtr = iPtr->varFramePtr; \ - (context).cmdFramePtr = iPtr->cmdFramePtr + (context).cmdFramePtr = iPtr->cmdFramePtr; \ + (context).lineLABCPtr = iPtr->lineLABCPtr #define RESTORE_CONTEXT(context) \ iPtr->framePtr = (context).framePtr; \ iPtr->varFramePtr = (context).varFramePtr; \ - iPtr->cmdFramePtr = (context).cmdFramePtr + iPtr->cmdFramePtr = (context).cmdFramePtr; \ + iPtr->lineLABCPtr = (context).lineLABCPtr #define iPtr ((Interp *) interp) @@ -8384,7 +8414,8 @@ NRCoroutineExitCallback( TclDeleteExecEnv(corPtr->eePtr); corPtr->eePtr = NULL; - /* RESTORE_CONTEXT(corPtr->caller); AUTOMATIC! */ + SAVE_CONTEXT(corPtr->running); + RESTORE_CONTEXT(corPtr->caller); NRE_ASSERT(iPtr->framePtr == corPtr->caller.framePtr); NRE_ASSERT(iPtr->cmdFramePtr == corPtr->caller.cmdFramePtr); @@ -8392,6 +8423,16 @@ NRCoroutineExitCallback( iPtr->execEnvPtr = corPtr->callerEEPtr; + /* + * #280. + * Drop the coroutine-owned copy of the lineLABCPtr hashtable for literal + * command arguments in bytecode. + */ + + Tcl_DeleteHashTable(corPtr->base.lineLABCPtr); + ckfree((char *) corPtr->base.lineLABCPtr); + corPtr->base.lineLABCPtr = NULL; + return result; } @@ -8555,6 +8596,45 @@ TclNRCoroutineObjCmd( corPtr->running = NULL_CONTEXT; /* + * #280. + * Provide the new coroutine with its own copy of the lineLABCPtr + * hashtable for literal command arguments in bytecode. Note that that + * CFWordBC chains are not duplicated, only the entrypoints to them. This + * means that in the presence of coroutines each chain is potentially a + * tree. Like the chain -> tree conversion of the CmdFrame stack. + */ + + { + Tcl_HashSearch hSearch; + Tcl_HashEntry* hePtr; + + corPtr->base.lineLABCPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitHashTable(corPtr->base.lineLABCPtr, TCL_ONE_WORD_KEYS); + + for (hePtr = Tcl_FirstHashEntry(iPtr->lineLABCPtr,&hSearch); + hePtr; + hePtr = Tcl_NextHashEntry(&hSearch)) { + int isNew; + Tcl_HashEntry* newPtr = + Tcl_CreateHashEntry(corPtr->base.lineLABCPtr, + (char *) Tcl_GetHashKey (iPtr->lineLABCPtr, hePtr), + &isNew); + Tcl_SetHashValue(newPtr, Tcl_GetHashValue(hePtr)); + } + + /* + * The new copy is immediately plugged interpreter for use by the + * first coroutine commands (see below). The interp's copy of the + * table is already saved, see the SAVE_CONTEXT found just above this + * whole code block. This also properly prepares us for the + * SAVE/RESTORE dances during yields which swizzle the pointers + * around. + */ + + iPtr->lineLABCPtr = corPtr->base.lineLABCPtr; + } + + /* * Eval things in 'uplevel #0', except for the very first command lookup * which should be looked up in caller's context. * diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index a00fff8..a3a5841 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.116 2009/03/21 09:42:06 msofer Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.117 2009/07/14 16:34:08 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1852,6 +1852,7 @@ TclNRForObjCmd( { int result; Interp *iPtr = (Interp *) interp; + ForIterData* iterPtr; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, "start test next command"); @@ -1870,8 +1871,15 @@ TclNRForObjCmd( return result; } - TclNRAddCallback(interp, TclNRForIterCallback, objv[2], objv[4], - objv[3], "\n (\"for\" body line %d)"); + TclSmallAllocEx (interp, sizeof(ForIterData), iterPtr); + iterPtr->cond = objv[2]; + iterPtr->body = objv[4]; + iterPtr->next = objv[3]; + iterPtr->msg = "\n (\"for\" body line %d)"; + iterPtr->word = 4; + + TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, + NULL, NULL); return TCL_OK; } @@ -1882,10 +1890,11 @@ TclNRForIterCallback( int result) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *cond = data[0]; - Tcl_Obj *body = data[1]; - Tcl_Obj *next = data[2]; - char *msg = data[3]; + ForIterData* iterPtr = data[0]; + Tcl_Obj *cond = iterPtr->cond; + Tcl_Obj *body = iterPtr->body; + Tcl_Obj *next = iterPtr->next; + char *msg = iterPtr->msg; int value; if ((result != TCL_OK) && (result != TCL_CONTINUE)) { @@ -1901,17 +1910,19 @@ TclNRForIterCallback( Tcl_ResetResult(interp); result = Tcl_ExprBooleanObj(interp, cond, &value); if (result != TCL_OK) { + TclSmallFreeEx (interp, iterPtr); return result; } if (value) { /* TIP #280. */ if (next) { - TclNRAddCallback(interp, ForNextCallback, cond, body, next, msg); + TclNRAddCallback(interp, ForNextCallback, iterPtr, NULL, NULL, + NULL); } else { - TclNRAddCallback(interp, TclNRForIterCallback, cond, body, NULL, - msg); + TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, NULL, + NULL); } - return TclNREvalObjEx(interp, body, 0, iPtr->cmdFramePtr, 2); + return TclNREvalObjEx(interp, body, 0, iPtr->cmdFramePtr, iterPtr->word); } done: @@ -1925,6 +1936,7 @@ TclNRForIterCallback( Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(msg, Tcl_GetErrorLine(interp))); } + TclSmallFreeEx (interp, iterPtr); return result; } @@ -1935,10 +1947,8 @@ ForNextCallback( int result) { Interp *iPtr = (Interp *) interp; - Tcl_Obj *cond = data[0]; - Tcl_Obj *body = data[1]; - Tcl_Obj *next = data[2]; - char *msg = data[3]; + ForIterData* iterPtr = data[0]; + Tcl_Obj *next = iterPtr->next; if ((result == TCL_OK) || (result == TCL_CONTINUE)) { /* @@ -1952,12 +1962,13 @@ ForNextCallback( if ((result != TCL_BREAK) && (result != TCL_OK)) { if (result == TCL_ERROR) { Tcl_AddErrorInfo(interp, "\n (\"for\" loop-end command)"); + TclSmallFreeEx (interp, iterPtr); } return result; } } - TclNRAddCallback(interp, TclNRForIterCallback, cond, body, next, msg); + TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, NULL, NULL); return result; } diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 2021b5b..d6f2987 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.184 2009/07/12 18:04:33 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.185 2009/07/14 16:34:08 andreas_kupries Exp $ */ #include "tclInt.h" @@ -4601,6 +4601,8 @@ TclNRWhileObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { + ForIterData* iterPtr; + if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "test command"); return TCL_ERROR; @@ -4610,8 +4612,15 @@ TclNRWhileObjCmd( * We reuse [for]'s callback, passing a NULL for the 'next' script. */ - TclNRAddCallback(interp, TclNRForIterCallback, objv[1], objv[2], - NULL, "\n (\"while\" body line %d)"); + TclSmallAllocEx (interp, sizeof(ForIterData), iterPtr); + iterPtr->cond = objv[1]; + iterPtr->body = objv[2]; + iterPtr->next = NULL; + iterPtr->msg = "\n (\"while\" body line %d)"; + iterPtr->word = 2; + + TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, + NULL, NULL); return TCL_OK; } diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 14ed9a0..a1a7168 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.167 2009/06/13 14:31:54 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.168 2009/07/14 16:34:08 andreas_kupries Exp $ */ #include "tclInt.h" @@ -432,8 +432,6 @@ static void PrintSourceToObj(Tcl_Obj *appendObj, static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset, Tcl_Token *tokenPtr, const char *cmd, int len, int numWords, int line, int **lines); -static void EnterCmdWordIndex(ExtCmdLoc *eclPtr, Tcl_Obj* obj, - int pc, int word); /* * The structure below defines the bytecode Tcl object type by means of @@ -815,10 +813,7 @@ TclCleanupByteCode( ckfree((char *) eclPtr->loc); } - /* Release index of literals as well. */ - if (eclPtr->eiloc != NULL) { - ckfree((char *) eclPtr->eiloc); - } + Tcl_DeleteHashTable (&eclPtr->litInfo); ckfree((char *) eclPtr); Tcl_DeleteHashEntry(hePtr); @@ -910,9 +905,7 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->nloc = 0; envPtr->extCmdMapPtr->nuloc = 0; envPtr->extCmdMapPtr->path = NULL; - envPtr->extCmdMapPtr->eiloc = NULL; - envPtr->extCmdMapPtr->neiloc = 0; - envPtr->extCmdMapPtr->nueiloc = 0; + Tcl_InitHashTable(&envPtr->extCmdMapPtr->litInfo, TCL_ONE_WORD_KEYS); if ((invoker == NULL) || (invoker->type == TCL_LOCATION_EVAL_LIST)) { /* @@ -921,8 +914,40 @@ TclInitCompileEnv( */ envPtr->line = 1; - envPtr->extCmdMapPtr->type = + if (iPtr->evalFlags & TCL_EVAL_FILE) { + iPtr->evalFlags &= ~TCL_EVAL_FILE; + envPtr->extCmdMapPtr->type = TCL_LOCATION_SOURCE; + + if (iPtr->scriptFile) { + /* + * Normalization here, to have the correct pwd. Should have + * negligible impact on performance, as the norm should have + * been done already by the 'source' invoking us, and it + * caches the result. + */ + + Tcl_Obj *norm = Tcl_FSGetNormalizedPath(interp, iPtr->scriptFile); + + if (norm == NULL) { + /* + * Error message in the interp result. No place to put + * it. And no place to serve the error itself to either. + * Fake a path, empty string. + */ + + TclNewLiteralStringObj(envPtr->extCmdMapPtr->path, ""); + } else { + envPtr->extCmdMapPtr->path = norm; + } + } else { + TclNewLiteralStringObj(envPtr->extCmdMapPtr->path, ""); + } + + Tcl_IncrRefCount(envPtr->extCmdMapPtr->path); + } else { + envPtr->extCmdMapPtr->type = (envPtr->procPtr ? TCL_LOCATION_PROC : TCL_LOCATION_BC); + } } else { /* * Initialize the compiler using the context, making counting absolute @@ -988,6 +1013,8 @@ TclInitCompileEnv( TclStackFree(interp, ctxPtr); } + envPtr->extCmdMapPtr->start = envPtr->line; + envPtr->auxDataArrayPtr = envPtr->staticAuxDataArraySpace; envPtr->auxDataArrayNext = 0; envPtr->auxDataArrayEnd = COMPILEENV_INIT_AUX_DATA_SIZE; @@ -1473,13 +1500,6 @@ TclCompileScript( */ objIndex = TclRegisterNewLiteral(envPtr, tokenPtr[1].start, tokenPtr[1].size); - - if (eclPtr->type == TCL_LOCATION_SOURCE) { - EnterCmdWordIndex(eclPtr, - envPtr->literalArrayPtr[objIndex].objPtr, - envPtr->codeNext - envPtr->codeStart, - wordIdx); - } } TclEmitPush(objIndex, envPtr); } /* for loop */ @@ -1509,6 +1529,15 @@ TclCompileScript( TclEmitOpcode(INST_INVOKE_EXPANDED, envPtr); TclAdjustStackDepth((1-wordIdx), envPtr); } else if (wordIdx > 0) { + /* + * Save PC -> command map for the TclArgumentBC* functions. + */ + + int isnew; + Tcl_HashEntry* hePtr = Tcl_CreateHashEntry(&eclPtr->litInfo, + (char*) (envPtr->codeNext - envPtr->codeStart), &isnew); + Tcl_SetHashValue(hePtr, (char*) wlineat); + if (wordIdx <= 255) { TclEmitInstInt1(INST_INVOKE_STK1, wordIdx, envPtr); } else { @@ -2477,39 +2506,6 @@ EnterCmdWordData( eclPtr->nuloc ++; } -static void -EnterCmdWordIndex( - ExtCmdLoc *eclPtr, - Tcl_Obj *obj, - int pc, - int word) -{ - ExtIndex* eiPtr; - - if (eclPtr->nueiloc >= eclPtr->neiloc) { - /* - * Expand the ExtIndex array by allocating more storage from the heap. - * The currently allocated ECL entries are stored from eclPtr->loc[0] - * up to eclPtr->loc[eclPtr->nuloc-1] (inclusive). - */ - - size_t currElems = eclPtr->neiloc; - size_t newElems = (currElems ? 2*currElems : 1); - size_t newBytes = newElems * sizeof(ExtIndex); - - eclPtr->eiloc = (ExtIndex *) - ckrealloc((char *)(eclPtr->eiloc), newBytes); - eclPtr->neiloc = newElems; - } - - eiPtr = &eclPtr->eiloc[eclPtr->nueiloc]; - eiPtr->obj = obj; - eiPtr->pc = pc; - eiPtr->word = word; - - eclPtr->nueiloc++; -} - /* *---------------------------------------------------------------------- * diff --git a/generic/tclCompile.h b/generic/tclCompile.h index a9b8545..75dc236 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.116 2009/05/08 01:02:26 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.117 2009/07/14 16:34:08 andreas_kupries Exp $ */ #ifndef _TCLCOMPILATION @@ -134,18 +134,23 @@ typedef struct ECL { * command. */ } ECL; -/* ExtIndex defined in tclInt.h */ - typedef struct ExtCmdLoc { int type; /* Context type. */ + int start; /* Starting line for compiled script. Needed + * for the extended recompile check in + * tclCompileObj. */ Tcl_Obj *path; /* Path of the sourced file the command is * in. */ ECL *loc; /* Command word locations (lines). */ int nloc; /* Number of allocated entries in 'loc'. */ int nuloc; /* Number of used entries in 'loc'. */ - ExtIndex* eiloc; - int neiloc; - int nueiloc; + Tcl_HashTable litInfo; /* Indexed by bytecode 'PC', to have the + * information accessible per command and + * argument, not per whole bytecode. Value is + * index of command in 'loc', giving us the + * literals to associate with line information + * as command argument, see + * TclArgumentBCEnter() */ } ExtCmdLoc; /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index aac36da..5139dad 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.440 2009/07/12 18:04:33 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.441 2009/07/14 16:34:08 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1517,6 +1517,91 @@ TclCompileObj( } /* + * #280. + * Literal sharing fix. This part of the fix is not required by 8.4 + * nor 8.5, because they eval-direct any literals, so just saving the + * argument locations per command in bytecode is enough, embedded + * 'eval' commands, etc. get the correct information. + * + * But in 8.6 all the embedded script are compiled, and the resulting + * bytecode stored in the literal. Now the shared literal has bytecode + * with location data for _one_ particular location this literal is + * found at. If we get executed from a different location the bytecode + * has to be recompiled to get the correct locations. Not doing this + * will execute the saved bytecode with data for a different location, + * causing 'info frame' to point to the wrong place in the sources. + * + * Future optimizations ... + * (1) Save the location data (ExtCmdLoc) keyed by start line. In that + * case we recompile once per location of the literal, but not + * continously, because the moment we have all locations we do not + * need to recompile any longer. + * + * (2) Alternative: Do not recompile, tell the execution engine the + * offset between saved starting line and actual one. Then modify + * the users to adjust the locations they have by this offset. + * + * (3) Alternative 2: Do not fully recompile, adjust just the location + * information. + */ + + { + Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, + (char *) codePtr); + if (hePtr) { + ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); + int redo = 0; + + if (invoker) { + CmdFrame *ctxPtr = (CmdFrame *) + TclStackAlloc(interp, sizeof(CmdFrame)); + *ctxPtr = *invoker; + + if (invoker->type == TCL_LOCATION_BC) { + /* + * Note: Type BC => ctx.data.eval.path is not used. + * ctx.data.tebc.codePtr is used instead. + */ + + TclGetSrcInfoForPc(ctxPtr); + if (ctxPtr->type == TCL_LOCATION_SOURCE) { + /* + * The reference made by 'TclGetSrcInfoForPc' is dead. + */ + Tcl_DecrRefCount(ctxPtr->data.eval.path); + ctxPtr->data.eval.path = NULL; + } + } + + if (word < ctxPtr->nline) { + /* + * Note: We do not care if the line[word] is -1. This + * is a difference and requires a recompile (location + * changed from absolute to relative, literal is used + * fixed and through variable) + * + * Example: + * test info-32.0 using literal of info-24.8 + * (dict with ... vs set body ...). + */ + redo = + ((eclPtr->type == TCL_LOCATION_SOURCE) && + (eclPtr->start != ctxPtr->line[word])) || + ((eclPtr->type == TCL_LOCATION_BC) && + (ctxPtr->type == TCL_LOCATION_SOURCE)) + ; + } + + TclStackFree(interp, ctxPtr); + } + + if (redo) { + goto recompileObj; + } + } + } + + /* * Increment the code's ref count while it is being executed. If * afterwards no references to it remain, free the code. */ @@ -1940,14 +2025,12 @@ TclExecuteByteCode( bcFramePtr->nextPtr = iPtr->cmdFramePtr; bcFramePtr->nline = 0; bcFramePtr->line = NULL; - + bcFramePtr->litarg = NULL; bcFramePtr->data.tebc.codePtr = codePtr; bcFramePtr->data.tebc.pc = NULL; bcFramePtr->cmd.str.cmd = NULL; bcFramePtr->cmd.str.len = 0; - TclArgumentBCEnter((Tcl_Interp*) iPtr,codePtr,bcFramePtr); - if (iPtr->execEnvPtr->rewind) { result = TCL_ERROR; goto abnormalReturn; @@ -1962,6 +2045,8 @@ TclExecuteByteCode( NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclArgumentBCRelease((Tcl_Interp*) iPtr, bcFramePtr); + /* * If the CallFrame is marked as tailcalling, keep tailcalling */ @@ -2760,6 +2845,9 @@ TclExecuteByteCode( instructionCount = 1; + TclArgumentBCEnter((Tcl_Interp*) iPtr, objv, objc, + codePtr, bcFramePtr, pc - codePtr->codeStart); + DECACHE_STACK_INFO(); result = TclNREvalObjv(interp, objc, objv, @@ -2773,6 +2861,8 @@ TclExecuteByteCode( goto nonRecursiveCallStart; } + TclArgumentBCRelease((Tcl_Interp*) iPtr, bcFramePtr); + iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr->nextPtr); @@ -7794,8 +7884,6 @@ TclExecuteByteCode( } } - TclArgumentBCRelease((Tcl_Interp*) iPtr,codePtr); - oldBottomPtr = bottomPtr->prevBottomPtr; iPtr->cmdFramePtr = bcFramePtr->nextPtr; TclStackFree(interp, bottomPtr); /* free my stack */ diff --git a/generic/tclInt.h b/generic/tclInt.h index 007facd..7374b23 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.427 2009/07/12 18:04:33 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.428 2009/07/14 16:34:09 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -1114,7 +1114,10 @@ typedef struct CmdFrame { CallFrame *framePtr; /* Procedure activation record, may be * NULL. */ struct CmdFrame *nextPtr; /* Link to calling frame. */ - + const struct CFWordBC* litarg; /* Link to set of literal arguments which + * have ben pushed on the lineLABCPtr stack + * by TclArgumentBCEnter(). These will be + * removed by TclArgumentBCRelease. */ /* * Data needed for Eval vs TEBC * @@ -1171,19 +1174,16 @@ typedef struct CFWord { * stack. */ } CFWord; -typedef struct ExtIndex { - Tcl_Obj *obj; /* Reference to the word. */ +typedef struct CFWordBC { + Tcl_Obj* obj; /* Back reference to hashtable key */ + CmdFrame *framePtr; /* CmdFrame to access. */ int pc; /* Instruction pointer of a command in * ExtCmdLoc.loc[.] */ int word; /* Index of word in * ExtCmdLoc.loc[cmd]->line[.] */ -} ExtIndex; - -typedef struct CFWordBC { - CmdFrame *framePtr; /* CmdFrame to access. */ - ExtIndex *eiPtr; /* Word info: PC and index. */ - int refCount; /* Number of times the word is on the - * stack. */ + struct CFWordBC* prevPtr; /* Previous entry in stack for same Tcl_Obj */ + struct CFWordBC* nextPtr; /* Next entry for same command call. See + * CmdFrame litarg field for the list start. */ } CFWordBC; /* @@ -1345,7 +1345,8 @@ typedef struct ExecStack { typedef struct CorContext { struct CallFrame *framePtr; struct CallFrame *varFramePtr; - struct CmdFrame *cmdFramePtr; + struct CmdFrame *cmdFramePtr; /* See Interp.cmdFramePtr */ + Tcl_HashTable *lineLABCPtr; /* See Interp.lineLABCPtr */ } CorContext; typedef struct CoroutineData { @@ -2612,6 +2613,23 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, struct TEOV_callback *tailcallPtr); +/* + * This structure holds the data for the various iteration callbacks used to + * NRE the 'for' and 'while' commands. We need a separate structure because we + * have more than the 4 client data entries we can provide directly thorugh + * the callback API. It is the 'word' information which puts us over the + * limit. It is needed because the loop body is argument 4 of 'for' and + * argument 2 of 'while'. Not providing the correct index confuses the #280 + * code. We TclSmallAlloc/Free this. + */ + +typedef struct ForIterData { + Tcl_Obj* cond; /* loop condition expression */ + Tcl_Obj* body; /* loop body */ + Tcl_Obj* next; /* loop step script, NULL for 'while' */ + char* msg; /* error message part */ + int word; /* Index of the body script in the command */ +} ForIterData; /* *---------------------------------------------------------------- @@ -2629,9 +2647,10 @@ MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp, MODULE_SCOPE void TclArgumentRelease(Tcl_Interp *interp, Tcl_Obj *objv[], int objc); MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp *interp, - void *codePtr, CmdFrame *cfPtr); + Tcl_Obj* objv[], int objc, + void *codePtr, CmdFrame *cfPtr, int pc); MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp *interp, - void *codePtr); + CmdFrame *cfPtr); MODULE_SCOPE void TclArgumentGet(Tcl_Interp *interp, Tcl_Obj *obj, CmdFrame **cfPtrPtr, int *wordPtr); MODULE_SCOPE int TclArraySet(Tcl_Interp *interp, diff --git a/tests/info.test b/tests/info.test index c062861..53a0e76 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.63 2008/10/14 16:48:11 dgp Exp $ +# RCS: @(#) $Id: info.test,v 1.64 2009/07/14 16:34:09 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1418,6 +1418,24 @@ test info-38.7 {location information for arg substitution} -constraints testeval * {type source line 2298 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}} # ------------------------------------------------------------------------- +# literal sharing + +test info-39.0 {location information not confused by literal sharing} -body { + namespace eval ::foo {} + proc ::foo::bar {} { + lappend res {} + lappend res [reduce [eval {info frame 0}]] + lappend res [reduce [eval {info frame 0}]] + return $res + } + set res [::foo::bar] + namespace delete ::foo + join $res \n +} -result { +type source line 1427 file info.test cmd {info frame 0} proc ::foo::bar level 0 +type source line 1428 file info.test cmd {info frame 0} proc ::foo::bar level 0} + +# ------------------------------------------------------------------------- # cleanup catch {namespace delete test_ns_info1 test_ns_info2} -- cgit v0.12 From 67e100ed95642d0ec30b5718d5c2eb66535c3cbe Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 14 Jul 2009 16:52:28 +0000 Subject: * generic/tclInt.h (TclNRSwitchObjCmd): * generic/tclBasic.c (builtInCmds): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * tests/switch.test (switch-15.1): Make non-bytecoded [switch] command aware of NRE. [Bug 2821401] --- ChangeLog | 8 ++++++++ generic/tclBasic.c | 4 ++-- generic/tclCmdMZ.c | 39 ++++++++++++++++++++++++++++++++++++--- generic/tclInt.h | 3 ++- tests/switch.test | 18 +++++++++++++++++- 5 files changed, 65 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 717c1d5..4b3545c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-07-14 Kevin B. Kenny + + * generic/tclInt.h (TclNRSwitchObjCmd): + * generic/tclBasic.c (builtInCmds): + * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): + * tests/switch.test (switch-15.1): + Make non-bytecoded [switch] command aware of NRE. [Bug 2821401] + 2009-07-13 Andreas Kupries * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex, diff --git a/generic/tclBasic.c b/generic/tclBasic.c index a097976..fcc7d46 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.395 2009/07/14 16:34:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.396 2009/07/14 16:52:28 kennykb Exp $ */ #include "tclInt.h" @@ -214,7 +214,7 @@ static const CmdInfo builtInCmds[] = { {"set", Tcl_SetObjCmd, TclCompileSetCmd, NULL, 1}, {"split", Tcl_SplitObjCmd, NULL, NULL, 1}, {"subst", Tcl_SubstObjCmd, NULL, NULL, 1}, - {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, NULL, 1}, + {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, TclNRSwitchObjCmd, 1}, {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, {"try", Tcl_TryObjCmd, NULL, TclNRTryObjCmd, 1}, diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index d6f2987..9d416bc 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.185 2009/07/14 16:34:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.186 2009/07/14 16:52:28 kennykb Exp $ */ #include "tclInt.h" @@ -23,6 +23,8 @@ static inline Tcl_Obj * During(Tcl_Interp *interp, int resultCode, Tcl_Obj *oldOptions, Tcl_Obj *errorInfo); +static int SwitchPostProc(ClientData data[], Tcl_Interp* interp, + int result); static int TryPostBody(ClientData data[], Tcl_Interp *interp, int result); static int TryPostFinal(ClientData data[], Tcl_Interp *interp, @@ -3426,7 +3428,16 @@ Tcl_SwitchObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int i,j, index, mode, foundmode, result, splitObjs, numMatchesSaved; + return Tcl_NRCallObjProc(interp, TclNRSwitchObjCmd, dummy, objc, objv); +} +int +TclNRSwitchObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int i,j, index, mode, foundmode, splitObjs, numMatchesSaved; int noCase, patternLength; const char *pattern; Tcl_Obj *stringObj, *indexVarObj, *matchVarObj; @@ -3853,7 +3864,29 @@ Tcl_SwitchObjCmd( * TIP #280: Make invoking context available to switch branch. */ - result = TclEvalObjEx(interp, objv[j], 0, ctxPtr, j); + Tcl_NRAddCallback(interp, SwitchPostProc, (ClientData) splitObjs, + (ClientData) ctxPtr, (ClientData) pc, + (ClientData) pattern); + return TclNREvalObjEx(interp, objv[j], 0, ctxPtr, j); +} +static int +SwitchPostProc( + ClientData data[], /* Data passed from Tcl_NRAddCallback above */ + Tcl_Interp* interp, /* Tcl interpreter */ + int result) /* Result to return*/ +{ + /* Unpack the preserved data */ + + int splitObjs = (int) data[0]; + CmdFrame* ctxPtr = (CmdFrame*) data[1]; + int pc = (int) data[2]; + const char* pattern = (const char*) data[3]; + int patternLength = strlen(pattern); + + /* + * Clean up TIP 280 context information + */ + if (splitObjs) { ckfree((char *) ctxPtr->line); if (pc && (ctxPtr->type == TCL_LOCATION_SOURCE)) { diff --git a/generic/tclInt.h b/generic/tclInt.h index 7374b23..8c5cf3d 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.428 2009/07/14 16:34:09 andreas_kupries Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.429 2009/07/14 16:52:28 kennykb Exp $ */ #ifndef _TCLINT @@ -2602,6 +2602,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForeachCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRSourceObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRSwitchObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRTryObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; diff --git a/tests/switch.test b/tests/switch.test index 2652a70..738565f 100644 --- a/tests/switch.test +++ b/tests/switch.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: switch.test,v 1.24 2009/06/24 15:17:41 dgp Exp $ +# RCS: @(#) $Id: switch.test,v 1.25 2009/07/14 16:52:28 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -738,6 +738,22 @@ test switch-14.16 {switch -regexp compilation} { }} } no +test switch-15.1 {coroutine safety of non-bytecoded switch} {*}{ + -body { + proc coro {} { + switch -glob a { + a {yield ok1} + } + return ok2 + } + list [coroutine c coro] [c] + } + -result {ok1 ok2} + -cleanup { + rename coro {} + } +} + # cleanup catch {rename foo {}} ::tcltest::cleanupTests -- cgit v0.12 From 0a901b4dd0d5f48c4258a435a7015b391a292f65 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 14 Jul 2009 21:47:42 +0000 Subject: fix 64bit int <-> ptr cast warnings --- generic/tclBasic.c | 6 +++--- generic/tclCmdMZ.c | 10 +++++----- generic/tclCompile.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index fcc7d46..b6a87d7 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.396 2009/07/14 16:52:28 kennykb Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.397 2009/07/14 21:47:42 das Exp $ */ #include "tclInt.h" @@ -5458,11 +5458,11 @@ TclArgumentBCEnter( if (hePtr) { ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); - hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, (char*) pc); + hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, INT2PTR(pc)); if (hePtr) { int word; - int cmd = (int) Tcl_GetHashValue(hePtr); + int cmd = PTR2INT(Tcl_GetHashValue(hePtr)); ECL* ePtr = &eclPtr->loc[cmd]; CFWordBC* lastPtr = 0; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 9d416bc..1fb32df 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.186 2009/07/14 16:52:28 kennykb Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.187 2009/07/14 21:47:42 das Exp $ */ #include "tclInt.h" @@ -3864,8 +3864,8 @@ TclNRSwitchObjCmd( * TIP #280: Make invoking context available to switch branch. */ - Tcl_NRAddCallback(interp, SwitchPostProc, (ClientData) splitObjs, - (ClientData) ctxPtr, (ClientData) pc, + Tcl_NRAddCallback(interp, SwitchPostProc, INT2PTR(splitObjs), + (ClientData) ctxPtr, INT2PTR(pc), (ClientData) pattern); return TclNREvalObjEx(interp, objv[j], 0, ctxPtr, j); } @@ -3877,9 +3877,9 @@ SwitchPostProc( { /* Unpack the preserved data */ - int splitObjs = (int) data[0]; + int splitObjs = PTR2INT(data[0]); CmdFrame* ctxPtr = (CmdFrame*) data[1]; - int pc = (int) data[2]; + int pc = PTR2INT(data[2]); const char* pattern = (const char*) data[3]; int patternLength = strlen(pattern); diff --git a/generic/tclCompile.c b/generic/tclCompile.c index a1a7168..6168133 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.168 2009/07/14 16:34:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.169 2009/07/14 21:47:42 das Exp $ */ #include "tclInt.h" @@ -1536,7 +1536,7 @@ TclCompileScript( int isnew; Tcl_HashEntry* hePtr = Tcl_CreateHashEntry(&eclPtr->litInfo, (char*) (envPtr->codeNext - envPtr->codeStart), &isnew); - Tcl_SetHashValue(hePtr, (char*) wlineat); + Tcl_SetHashValue(hePtr, INT2PTR(wlineat)); if (wordIdx <= 255) { TclEmitInstInt1(INST_INVOKE_STK1, wordIdx, envPtr); -- cgit v0.12 From b5f035d9c80dbec4986ba4e7e2ba4a1881d90d38 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 15 Jul 2009 13:17:17 +0000 Subject: Added code to save space in namespaces. Currently #ifdef'ed out for compat. Also added code from itcl-ng for better separation of concerns. --- ChangeLog | 88 +++++++++-------- generic/tclInt.decls | 24 ++++- generic/tclInt.h | 13 ++- generic/tclIntDecls.h | 45 ++++++++- generic/tclNamesp.c | 257 +++++++++++++++++++++++++++++++++++++++++++++----- generic/tclResolve.c | 13 ++- generic/tclStubInit.c | 6 +- 7 files changed, 375 insertions(+), 71 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b3545c..3e79fb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,58 +1,68 @@ +2009-07-15 Donal K. Fellows + + * generic/tclInt.h (Namespace): Added machinery to allow + * generic/tclNamesp.c (many functions): reduction of memory used + * generic/tclResolve.c (BumpCmdRefEpochs): by namespaces. Currently + #ifdef'ed out because of compatibility concerns. + + * generic/tclInt.decls: Added four functions for better integration + with itcl-ng. + 2009-07-14 Kevin B. Kenny * generic/tclInt.h (TclNRSwitchObjCmd): * generic/tclBasic.c (builtInCmds): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * tests/switch.test (switch-15.1): - Make non-bytecoded [switch] command aware of NRE. [Bug 2821401] + [Bug 2821401]: Make non-bytecoded [switch] command aware of NRE. 2009-07-13 Andreas Kupries - * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex, - TclCleanupByteCode, TclCompileScript): + * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex) + (TclCleanupByteCode, TclCompileScript): * generic/tclExecute.c (TclCompileObj, TclExecuteByteCode): * tclCompile.h (ExtCmdLoc): * tclInt.h (ExtIndex, CFWordBC, CmdFrame): - * tclBasic.c (DeleteInterpProc, TclArgumentBCEnter, - TclArgumentBCRelease, TclArgumentGet, SAVE_CONTEXT, - RESTORE_CONTEXT, NRCoroutineExitCallback, TclNRCoroutineObjCmd): + * tclBasic.c (DeleteInterpProc, TclArgumentBCEnter) + (TclArgumentBCRelease, TclArgumentGet, SAVE_CONTEXT) + (RESTORE_CONTEXT, NRCoroutineExitCallback, TclNRCoroutineObjCmd): * generic/tclCmdAH.c (TclNRForObjCmd, TclNRForIterCallback, - ForNextCallback): + (ForNextCallback): * generic/tclCmdMZ.c (TclNRWhileObjCmd): Extended the bytecode compiler initialization to recognize the - compilation of whole files (NRE enabled 'source' command) and - switch to the counting of absolute lines in that case. - - Further extended the bytecode compiler to track the start line in - the generated information, and modified the bytecode execution to - recompile an object if the location as per the calling context - doesn't match the location saved in the bytecode. This part could - be optimized more by using more memory to keep all possibilities - which occur around, or by just adjusting the location information - instead of a total recompile. - - Reworked the handling of literal command arguments in bytecode to - be saved (compiler) and used (execution) per command (See the - TCL_INVOKE_STK* instructions), and not per the whole bytecode. - This, and the previous change remove the problems with location - data caused by literal sharing (across whole files, but also proc - bodies). Simplified the associated datastructures (ExtIndex is - gone, as is the function EnterCmdWordIndex). - - The last change causes the hashtable 'lineLABCPtr' to be state - which has to be kept per coroutine, like the CmdFrame stack. - Reworked the coroutine support code to create, delete and switch - the information as needed. Further reworked the tailcall command - as well, it has to pop its own arguments when run in a bytecode - context to keep a proper stack in 'lineLABCPtr'. - - Fixed the mishandling of line information in the NRE-enabled 'for' - and 'while' commands introduced when both were made to share their - iteration callbacks without taking into account that the loop body - is found in different words of the command. Introduced a separate - data structure to hold all the callback information, as we went - over the limit of 4 direct client-data values for NRE callbacks. + compilation of whole files (NRE enabled 'source' command) and switch + to the counting of absolute lines in that case. + + Further extended the bytecode compiler to track the start line in the + generated information, and modified the bytecode execution to + recompile an object if the location as per the calling context doesn't + match the location saved in the bytecode. This part could be optimized + more by using more memory to keep all possibilities which occur + around, or by just adjusting the location information instead of a + total recompile. + + Reworked the handling of literal command arguments in bytecode to be + saved (compiler) and used (execution) per command (See the + TCL_INVOKE_STK* instructions), and not per the whole bytecode. This, + and the previous change remove the problems with location data caused + by literal sharing (across whole files, but also proc bodies). + Simplified the associated datastructures (ExtIndex is gone, as is the + function EnterCmdWordIndex). + + The last change causes the hashtable 'lineLABCPtr' to be state which + has to be kept per coroutine, like the CmdFrame stack. Reworked the + coroutine support code to create, delete and switch the information as + needed. Further reworked the tailcall command as well, it has to pop + its own arguments when run in a bytecode context to keep a proper + stack in 'lineLABCPtr'. + + Fixed the mishandling of line information in the NRE-enabled 'for' and + 'while' commands introduced when both were made to share their + iteration callbacks without taking into account that the loop body is + found in different words of the command. Introduced a separate data + structure to hold all the callback information, as we went over the + limit of 4 direct client-data values for NRE callbacks. The above fixes [Bug 1605269]. diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 0847324..dc4a7ff 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,10 +13,10 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.139 2009/06/18 09:41:26 dkf Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.140 2009/07/15 13:17:18 dkf Exp $ library tcl - + # Define the unsupported generic interfaces. interface tclInt @@ -976,6 +976,21 @@ declare 243 generic { void TclDbDumpActiveObjects(FILE *outFile) } +# Functions to make things better for itcl +declare 244 generic { + Tcl_HashTable *TclGetNamespaceChildTable(Tcl_Namespace *nsPtr) +} +declare 245 generic { + Tcl_HashTable *TclGetNamespaceCommandTable(Tcl_Namespace *nsPtr) +} +declare 246 generic { + int TclInitRewriteEnsemble(Tcl_Interp *interp, int numRemoved, + int numInserted, Tcl_Obj *const *objv) +} +declare 247 generic { + void TclResetRewriteEnsemble(Tcl_Interp *interp, int isRootEnsemble) +} + ############################################################################## # Define the platform specific internal Tcl interface. These functions are @@ -1190,3 +1205,8 @@ declare 18 macosx { declare 19 macosx { void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode) } + + +# Local Variables: +# mode: tcl +# End: diff --git a/generic/tclInt.h b/generic/tclInt.h index 8c5cf3d..d2d8830 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.429 2009/07/14 16:52:28 kennykb Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.430 2009/07/15 13:17:18 dkf Exp $ */ #ifndef _TCLINT @@ -215,6 +215,15 @@ typedef struct TclVarHashTable { TclVarHashCreateVar((tablePtr), (key), NULL) /* + * Define this to reduce the amount of space that the average namespace + * consumes by only allocating the table of child namespaces when necessary. + * Defining it breaks compatibility for Tcl extensions (e.g., itcl) which + * reach directly into the Namespace structure. + */ + +#undef BREAK_NAMESPACE_COMPAT + +/* * The structure below defines a namespace. * Note: the first five fields must match exactly the fields in a * Tcl_Namespace structure (see tcl.h). If you change one, be sure to change @@ -236,7 +245,7 @@ typedef struct Namespace { struct Namespace *parentPtr;/* Points to the namespace that contains this * one. NULL if this is the global * namespace. */ -#if 1 +#ifndef BREAK_NAMESPACE_COMPAT Tcl_HashTable childTable; /* Contains any child namespaces. Indexed by * strings; values have type (Namespace *). */ #else diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index bdcdf29..5672e25 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.133 2009/06/18 09:42:40 dkf Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.134 2009/07/15 13:17:18 dkf Exp $ */ #ifndef _TCLINTDECLS @@ -1030,6 +1030,29 @@ EXTERN int TclNREvalObjv (Tcl_Interp * interp, int objc, /* 243 */ EXTERN void TclDbDumpActiveObjects (FILE * outFile); #endif +#ifndef TclGetNamespaceChildTable_TCL_DECLARED +#define TclGetNamespaceChildTable_TCL_DECLARED +/* 244 */ +EXTERN Tcl_HashTable * TclGetNamespaceChildTable (Tcl_Namespace * nsPtr); +#endif +#ifndef TclGetNamespaceCommandTable_TCL_DECLARED +#define TclGetNamespaceCommandTable_TCL_DECLARED +/* 245 */ +EXTERN Tcl_HashTable * TclGetNamespaceCommandTable (Tcl_Namespace * nsPtr); +#endif +#ifndef TclInitRewriteEnsemble_TCL_DECLARED +#define TclInitRewriteEnsemble_TCL_DECLARED +/* 246 */ +EXTERN int TclInitRewriteEnsemble (Tcl_Interp * interp, + int numRemoved, int numInserted, + Tcl_Obj *const * objv); +#endif +#ifndef TclResetRewriteEnsemble_TCL_DECLARED +#define TclResetRewriteEnsemble_TCL_DECLARED +/* 247 */ +EXTERN void TclResetRewriteEnsemble (Tcl_Interp * interp, + int isRootEnsemble); +#endif typedef struct TclIntStubs { int magic; @@ -1279,6 +1302,10 @@ typedef struct TclIntStubs { int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 241 */ int (*tclNREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags, Command * cmdPtr); /* 242 */ void (*tclDbDumpActiveObjects) (FILE * outFile); /* 243 */ + Tcl_HashTable * (*tclGetNamespaceChildTable) (Tcl_Namespace * nsPtr); /* 244 */ + Tcl_HashTable * (*tclGetNamespaceCommandTable) (Tcl_Namespace * nsPtr); /* 245 */ + int (*tclInitRewriteEnsemble) (Tcl_Interp * interp, int numRemoved, int numInserted, Tcl_Obj *const * objv); /* 246 */ + void (*tclResetRewriteEnsemble) (Tcl_Interp * interp, int isRootEnsemble); /* 247 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -1985,6 +2012,22 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclDbDumpActiveObjects \ (tclIntStubsPtr->tclDbDumpActiveObjects) /* 243 */ #endif +#ifndef TclGetNamespaceChildTable +#define TclGetNamespaceChildTable \ + (tclIntStubsPtr->tclGetNamespaceChildTable) /* 244 */ +#endif +#ifndef TclGetNamespaceCommandTable +#define TclGetNamespaceCommandTable \ + (tclIntStubsPtr->tclGetNamespaceCommandTable) /* 245 */ +#endif +#ifndef TclInitRewriteEnsemble +#define TclInitRewriteEnsemble \ + (tclIntStubsPtr->tclInitRewriteEnsemble) /* 246 */ +#endif +#ifndef TclResetRewriteEnsemble +#define TclResetRewriteEnsemble \ + (tclIntStubsPtr->tclResetRewriteEnsemble) /* 247 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index ff0bf99..74d5ebb 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.191 2009/03/21 12:24:49 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.192 2009/07/15 13:17:18 dkf Exp $ */ #include "tclInt.h" @@ -511,9 +511,9 @@ Tcl_PopCallFrame( if (framePtr->tailcallPtr) { /* - * Find the splicing spot: right before the NRCommand of the thing being - * tailcalled. Note that we skip NRCommands marked in data[1] (used by - * command redirectors) + * Find the splicing spot: right before the NRCommand of the thing + * being tailcalled. Note that we skip NRCommands marked in data[1] + * (used by command redirectors) */ TEOV_callback *tailcallPtr, *runPtr; @@ -822,7 +822,14 @@ Tcl_CreateNamespace( * already exist in the parent namespace. */ - if (Tcl_FindHashEntry(&parentPtr->childTable, simpleName) != NULL) { + if ( +#ifndef BREAK_NAMESPACE_COMPAT + Tcl_FindHashEntry(&parentPtr->childTable, simpleName) != NULL +#else + parentPtr->childTablePtr != NULL && + Tcl_FindHashEntry(parentPtr->childTablePtr, simpleName) != NULL +#endif + ) { Tcl_AppendResult(interp, "can't create namespace \"", name, "\": already exists", NULL); return NULL; @@ -841,7 +848,11 @@ Tcl_CreateNamespace( nsPtr->clientData = clientData; nsPtr->deleteProc = deleteProc; nsPtr->parentPtr = parentPtr; +#ifndef BREAK_NAMESPACE_COMPAT Tcl_InitHashTable(&nsPtr->childTable, TCL_STRING_KEYS); +#else + nsPtr->childTablePtr = NULL; +#endif nsPtr->nsId = ++(tsdPtr->numNsCreated); nsPtr->interp = interp; nsPtr->flags = 0; @@ -865,8 +876,9 @@ Tcl_CreateNamespace( nsPtr->commandPathSourceList = NULL; if (parentPtr != NULL) { - entryPtr = Tcl_CreateHashEntry(&parentPtr->childTable, simpleName, - &newEntry); + entryPtr = Tcl_CreateHashEntry( + TclGetNamespaceChildTable((Tcl_Namespace *)parentPtr), + simpleName, &newEntry); Tcl_SetHashValue(entryPtr, nsPtr); } else { /* @@ -1019,8 +1031,9 @@ Tcl_DeleteNamespace( if (nsPtr->activationCount - (nsPtr == globalNsPtr) > 0) { nsPtr->flags |= NS_DYING; if (nsPtr->parentPtr != NULL) { - entryPtr = Tcl_FindHashEntry(&nsPtr->parentPtr->childTable, - nsPtr->name); + entryPtr = Tcl_FindHashEntry( + TclGetNamespaceChildTable((Tcl_Namespace *) + nsPtr->parentPtr), nsPtr->name); if (entryPtr != NULL) { Tcl_DeleteHashEntry(entryPtr); } @@ -1049,7 +1062,14 @@ Tcl_DeleteNamespace( TclDeleteNamespaceVars(nsPtr); +#ifndef BREAK_NAMESPACE_COMPAT Tcl_DeleteHashTable(&nsPtr->childTable); +#else + if (nsPtr->childTablePtr != NULL) { + Tcl_DeleteHashTable(nsPtr->childTablePtr); + ckfree((char *) nsPtr->childTablePtr); + } +#endif Tcl_DeleteHashTable(&nsPtr->cmdTable); /* @@ -1145,8 +1165,9 @@ TclTeardownNamespace( */ if (nsPtr->parentPtr != NULL) { - entryPtr = Tcl_FindHashEntry(&nsPtr->parentPtr->childTable, - nsPtr->name); + entryPtr = Tcl_FindHashEntry( + TclGetNamespaceChildTable((Tcl_Namespace *) + nsPtr->parentPtr), nsPtr->name); if (entryPtr != NULL) { Tcl_DeleteHashEntry(entryPtr); } @@ -1183,12 +1204,23 @@ TclTeardownNamespace( * Don't optimize to Tcl_NextHashEntry() because of traces. */ +#ifndef BREAK_NAMESPACE_COMPAT for (entryPtr = Tcl_FirstHashEntry(&nsPtr->childTable, &search); entryPtr != NULL; entryPtr = Tcl_FirstHashEntry(&nsPtr->childTable, &search)) { childNsPtr = Tcl_GetHashValue(entryPtr); Tcl_DeleteNamespace(childNsPtr); } +#else + if (nsPtr->childTablePtr != NULL) { + for (entryPtr = Tcl_FirstHashEntry(nsPtr->childTablePtr, &search); + entryPtr != NULL; + entryPtr = Tcl_FirstHashEntry(nsPtr->childTablePtr,&search)) { + childNsPtr = Tcl_GetHashValue(entryPtr); + Tcl_DeleteNamespace(childNsPtr); + } + } +#endif /* * Free the namespace's export pattern array. @@ -1541,7 +1573,7 @@ Tcl_Import( */ if (strlen(pattern) == 0) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("empty import pattern", -1)); + Tcl_SetObjResult(interp, Tcl_NewStringObj("empty import pattern",-1)); return TCL_ERROR; } TclGetNamespaceForQualName(interp, pattern, nsPtr, @@ -1632,7 +1664,8 @@ DoImport( */ while (!exported && (i < importNsPtr->numExportPatterns)) { - exported |= Tcl_StringMatch(cmdName, importNsPtr->exportArrayPtr[i++]); + exported |= Tcl_StringMatch(cmdName, + importNsPtr->exportArrayPtr[i++]); } if (!exported) { return TCL_OK; @@ -1859,7 +1892,7 @@ Tcl_ForgetImport( } origin = firstToken; } - if (Tcl_StringMatch(Tcl_GetCommandName(NULL, origin), simplePattern)) { + if (Tcl_StringMatch(Tcl_GetCommandName(NULL, origin), simplePattern)){ Tcl_DeleteCommandFromToken(interp, token); } } @@ -2246,7 +2279,15 @@ TclGetNamespaceForQualName( */ if (nsPtr != NULL) { +#ifndef BREAK_NAMESPACE_COMPAT entryPtr = Tcl_FindHashEntry(&nsPtr->childTable, nsName); +#else + if (nsPtr->childTablePtr == NULL) { + entryPtr = NULL; + } else { + entryPtr = Tcl_FindHashEntry(nsPtr->childTablePtr, nsName); + } +#endif if (entryPtr != NULL) { nsPtr = Tcl_GetHashValue(entryPtr); } else if (flags & TCL_CREATE_NS_IF_UNKNOWN) { @@ -2255,8 +2296,8 @@ TclGetNamespaceForQualName( (void) TclPushStackFrame(interp, &framePtr, (Tcl_Namespace *) nsPtr, /*isProcCallFrame*/ 0); - nsPtr = (Namespace *) Tcl_CreateNamespace(interp, nsName, - NULL, NULL); + nsPtr = (Namespace *) + Tcl_CreateNamespace(interp, nsName, NULL, NULL); TclPopStackFrame(interp); if (nsPtr == NULL) { @@ -2273,7 +2314,15 @@ TclGetNamespaceForQualName( */ if (altNsPtr != NULL) { +#ifndef BREAK_NAMESPACE_COMPAT entryPtr = Tcl_FindHashEntry(&altNsPtr->childTable, nsName); +#else + if (altNsPtr->childTablePtr != NULL) { + entryPtr = Tcl_FindHashEntry(altNsPtr->childTablePtr, nsName); + } else { + entryPtr = NULL; + } +#endif if (entryPtr != NULL) { altNsPtr = Tcl_GetHashValue(entryPtr); } else { @@ -2653,8 +2702,17 @@ TclResetShadowedCmdRefs( for (i = trailFront; i >= 0; i--) { trailNsPtr = trailPtr[i]; +#ifndef BREAK_NAMESPACE_COMPAT hPtr = Tcl_FindHashEntry(&shadowNsPtr->childTable, trailNsPtr->name); +#else + if (shadowNsPtr->childTablePtr != NULL) { + hPtr = Tcl_FindHashEntry(shadowNsPtr->childTablePtr, + trailNsPtr->name); + } else { + hPtr = NULL; + } +#endif if (hPtr != NULL) { shadowNsPtr = Tcl_GetHashValue(hPtr); } else { @@ -2983,7 +3041,7 @@ NamespaceChildrenCmd( if (objc == 2) { nsPtr = (Namespace *) TclGetCurrentNamespace(interp); } else if ((objc == 3) || (objc == 4)) { - if (TclGetNamespaceFromObj(interp, objv[2], &namespacePtr) != TCL_OK) { + if (TclGetNamespaceFromObj(interp, objv[2], &namespacePtr) != TCL_OK){ return TCL_ERROR; } nsPtr = (Namespace *) namespacePtr; @@ -3024,13 +3082,27 @@ NamespaceChildrenCmd( if (strncmp(pattern, nsPtr->fullName, length) != 0) { goto searchDone; } - if (Tcl_FindHashEntry(&nsPtr->childTable, pattern+length) != NULL) { + if ( +#ifndef BREAK_NAMESPACE_COMPAT + Tcl_FindHashEntry(&nsPtr->childTable, pattern+length) != NULL +#else + nsPtr->childTablePtr != NULL && + Tcl_FindHashEntry(nsPtr->childTablePtr, pattern+length) != NULL +#endif + ) { Tcl_ListObjAppendElement(interp, listPtr, Tcl_NewStringObj(pattern, -1)); } goto searchDone; } +#ifndef BREAK_NAMESPACE_COMPAT entryPtr = Tcl_FirstHashEntry(&nsPtr->childTable, &search); +#else + if (nsPtr->childTablePtr == NULL) { + goto searchDone; + } + entryPtr = Tcl_FirstHashEntry(nsPtr->childTablePtr, &search); +#endif while (entryPtr != NULL) { childNsPtr = Tcl_GetHashValue(entryPtr); if ((pattern == NULL) @@ -3815,7 +3887,7 @@ NamespaceInscopeCmd( listPtr = Tcl_NewListObj(0, NULL); for (i = 4; i < objc; i++) { - if (Tcl_ListObjAppendElement(interp, listPtr, objv[i]) != TCL_OK) { + if (Tcl_ListObjAppendElement(interp, listPtr, objv[i]) != TCL_OK){ Tcl_DecrRefCount(listPtr); /* Free unneeded obj. */ return TCL_ERROR; } @@ -4806,6 +4878,61 @@ SetNsNameFromAny( /* *---------------------------------------------------------------------- * + * TclGetNamespaceCommandTable -- + * + * Returns the hash table of commands. + * + * Results: + * Pointer to the hash table. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_HashTable * +TclGetNamespaceCommandTable( + Tcl_Namespace *nsPtr) +{ + return &((Namespace *) nsPtr)->cmdTable; +} + +/* + *---------------------------------------------------------------------- + * + * TclGetNamespaceChildTable -- + * + * Returns the hash table of child namespaces. + * + * Results: + * Pointer to the hash table. + * + * Side effects: + * Might allocate memory. + * + *---------------------------------------------------------------------- + */ + +Tcl_HashTable * +TclGetNamespaceChildTable( + Tcl_Namespace *nsPtr) +{ + Namespace *nPtr = (Namespace *) nsPtr; +#ifndef BREAK_NAMESPACE_COMPAT + return &nPtr->childTable; +#else + if (nPtr->childTablePtr == NULL) { + nPtr->childTablePtr = (Tcl_HashTable*) ckalloc(sizeof(Tcl_HashTable)); + Tcl_InitHashTable(nPtr->childTablePtr, TCL_STRING_KEYS); + } + return nPtr->childTablePtr; +#endif +} + +/* + *---------------------------------------------------------------------- + * * NamespaceEnsembleCmd -- * * Invoked to implement the "namespace ensemble" command that creates and @@ -6109,7 +6236,7 @@ Tcl_FindEnsemble( cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr); - if (cmdPtr == NULL || cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (cmdPtr == NULL || cmdPtr->objProc != NsEnsembleImplementationCmd){ if (flags & TCL_LEAVE_ERR_MSG) { Tcl_AppendResult(interp, "\"", TclGetString(cmdNameObj), "\" is not an ensemble command", NULL); @@ -6167,7 +6294,7 @@ Tcl_IsEnsemble( * The 'name' parameter may be a single command name or a list if * creating an ensemble subcommand (see the binary implementation). * - * Currently, the TCL_ENSEMBLE_PREFIX ensemble flag is only used on + * Currently, the TCL_ENSEMBLE_PREFIX ensemble flag is only used on * top-level ensemble commands. * * Results: @@ -6567,6 +6694,11 @@ NsEnsembleImplementationCmdNR( * count both as inserted and removed arguments. */ +#if 0 + if (TclInitRewriteEnsemble(interp, 2 + ensemblePtr->numParameters, prefixObjc + ensemblePtr->numParameters, objv)) { + TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); + } +#else if (iPtr->ensembleRewrite.sourceObjs == NULL) { iPtr->ensembleRewrite.sourceObjs = objv; iPtr->ensembleRewrite.numRemovedObjs = @@ -6587,6 +6719,7 @@ NsEnsembleImplementationCmdNR( iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-2; } } +#endif /* * Hand off to the target command. @@ -6662,13 +6795,87 @@ TclClearRootEnsemble( Tcl_Interp *interp, int result) { + TclResetRewriteEnsemble(interp, 1); + return result; +} + +/* + *---------------------------------------------------------------------- + * + * TclInitRewriteEnsemble -- + * + * Applies a rewrite of arguments so that an ensemble subcommand will + * report error messages correctly for the overall command. + * + * Results: + * Whether this is the first rewrite applied, a value which must be + * passed to TclResetRewriteEnsemble when undoing this command's + * behaviour. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +TclInitRewriteEnsemble( + Tcl_Interp *interp, + int numRemoved, + int numInserted, + Tcl_Obj *const *objv) +{ Interp *iPtr = (Interp *) interp; - iPtr->ensembleRewrite.sourceObjs = NULL; - iPtr->ensembleRewrite.numRemovedObjs = 0; - iPtr->ensembleRewrite.numInsertedObjs = 0; + int isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); - return result; + if (isRootEnsemble) { + iPtr->ensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = numRemoved; + iPtr->ensembleRewrite.numInsertedObjs = numInserted; + } else { + int numIns = iPtr->ensembleRewrite.numInsertedObjs; + + if (numIns < numRemoved) { + iPtr->ensembleRewrite.numRemovedObjs += numRemoved - numIns; + iPtr->ensembleRewrite.numInsertedObjs += numInserted - 1; + } else { + iPtr->ensembleRewrite.numInsertedObjs += numInserted - numRemoved; + } + } + return isRootEnsemble; +} + +/* + *---------------------------------------------------------------------- + * + * TclResetRewriteEnsemble -- + * + * Removes any rewrites applied to support proper reporting of error + * messages used in ensembles. Should be paired with + * TclInitRewriteEnsemble. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void +TclResetRewriteEnsemble( + Tcl_Interp *interp, + int isRootEnsemble) +{ + Interp *iPtr = (Interp *) interp; + + if (isRootEnsemble) { + iPtr->ensembleRewrite.sourceObjs = NULL; + iPtr->ensembleRewrite.numRemovedObjs = 0; + iPtr->ensembleRewrite.numInsertedObjs = 0; + } } /* diff --git a/generic/tclResolve.c b/generic/tclResolve.c index af7d4cb..8455793 100644 --- a/generic/tclResolve.c +++ b/generic/tclResolve.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResolve.c,v 1.10 2008/04/27 22:21:32 dkf Exp $ + * RCS: @(#) $Id: tclResolve.c,v 1.11 2009/07/15 13:17:19 dkf Exp $ */ #include "tclInt.h" @@ -262,12 +262,23 @@ BumpCmdRefEpochs( nsPtr->cmdRefEpoch++; +#ifndef BREAK_NAMESPACE_COMPAT for (entry = Tcl_FirstHashEntry(&nsPtr->childTable, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { Namespace *childNsPtr = Tcl_GetHashValue(entry); BumpCmdRefEpochs(childNsPtr); } +#else + if (nsPtr->childTablePtr != NULL) { + for (entry = Tcl_FirstHashEntry(nsPtr->childTablePtr, &search); + entry != NULL; entry = Tcl_NextHashEntry(&search)) { + Namespace *childNsPtr = Tcl_GetHashValue(entry); + + BumpCmdRefEpochs(childNsPtr); + } + } +#endif TclInvalidateNsPath(nsPtr); } diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 9241677..d80c19a 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.182 2009/06/30 00:56:08 das Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.183 2009/07/15 13:17:19 dkf Exp $ */ #include "tclInt.h" @@ -290,6 +290,10 @@ static const TclIntStubs tclIntStubs = { TclNREvalObjEx, /* 241 */ TclNREvalObjv, /* 242 */ TclDbDumpActiveObjects, /* 243 */ + TclGetNamespaceChildTable, /* 244 */ + TclGetNamespaceCommandTable, /* 245 */ + TclInitRewriteEnsemble, /* 246 */ + TclResetRewriteEnsemble, /* 247 */ }; static const TclIntPlatStubs tclIntPlatStubs = { -- cgit v0.12 From 47696f530aabf1a5ddab3d36eb8481b469d44397 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 16 Jul 2009 21:24:38 +0000 Subject: * generic/tclBinary.c: Removed unused variables. * generic/tclCmdIL.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclHash.c: * generic/tclIOUtil.c: * generic/tclVar.c: * generic/tclBasic.c: Silence compiler warnings about ClientData. * generic/tclProc.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200] --- ChangeLog | 19 +++++++++++++++++++ generic/tclBasic.c | 4 ++-- generic/tclBinary.c | 4 +--- generic/tclCmdIL.c | 6 ++---- generic/tclCompile.c | 7 ++----- generic/tclExecute.c | 4 +--- generic/tclHash.c | 14 +------------- generic/tclIOUtil.c | 5 +---- generic/tclProc.c | 4 ++-- generic/tclScan.c | 4 ++-- generic/tclStrToD.c | 18 +++++++++++++++++- generic/tclVar.c | 6 +++++- 12 files changed, 55 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e79fb1..7cd5e76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2009-07-16 Don Porter + + * generic/tclBinary.c: Removed unused variables. + * generic/tclCmdIL.c: + * generic/tclCompile.c: + * generic/tclExecute.c: + * generic/tclHash.c: + * generic/tclIOUtil.c: + * generic/tclVar.c: + + * generic/tclBasic.c: Silence compiler warnings about ClientData. + * generic/tclProc.c: + + * generic/tclScan.c: Typo in ACCEPT_NAN configuration. + + * generic/tclStrToD.c: Set floating point control register on + MIPS systems so that the gradual underflow expected by Tcl is + in effect. [Bug 2819200] + 2009-07-15 Donal K. Fellows * generic/tclInt.h (Namespace): Added machinery to allow diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b6a87d7..3b5bad1 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.397 2009/07/14 21:47:42 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.398 2009/07/16 21:24:39 dgp Exp $ */ #include "tclInt.h" @@ -4302,7 +4302,7 @@ NRRunObjProc( { /* OPT: do not call? */ - Tcl_ObjCmdProc *objProc = data[0]; + Tcl_ObjCmdProc *objProc = (Tcl_ObjCmdProc *)data[0]; ClientData objClientData = data[1]; int objc = PTR2INT(data[2]); Tcl_Obj **objv = data[3]; diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 68409d1..8a3aeac 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.54 2009/02/03 23:34:32 nijtmans Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.55 2009/07/16 21:24:39 dgp Exp $ */ #include "tclInt.h" @@ -1159,7 +1159,6 @@ BinaryScanCmd( * string. */ Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */ unsigned char *buffer; /* Start of result buffer. */ - unsigned char *cursor; /* Current position within result buffer. */ const char *errorString; const char *str; int offset, size, length; @@ -1178,7 +1177,6 @@ BinaryScanCmd( Tcl_InitHashTable(numberCachePtr, TCL_ONE_WORD_KEYS); buffer = Tcl_GetByteArrayFromObj(objv[1], &length); format = TclGetString(objv[2]); - cursor = buffer; arg = 3; offset = 0; while (*format != '\0') { diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index cbc2b60..0049b18 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.167 2009/07/11 13:34:24 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.168 2009/07/16 21:24:39 dgp Exp $ */ #include "tclInt.h" @@ -3521,7 +3521,7 @@ Tcl_LsortObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - int i, j, index, unique, indices, length, nocase = 0, sortMode, indexc; + int i, j, index, indices, length, nocase = 0, sortMode, indexc; int group, groupSize, groupOffset, idx; Tcl_Obj *resultPtr, *cmdPtr, **listObjPtrs, *listObj, *indexPtr; SortElement *elementArray, *elementPtr; @@ -3562,7 +3562,6 @@ Tcl_LsortObjCmd( sortInfo.interp = interp; sortInfo.resultCode = TCL_OK; cmdPtr = NULL; - unique = 0; indices = 0; group = 0; groupSize = 1; @@ -3661,7 +3660,6 @@ Tcl_LsortObjCmd( sortInfo.sortMode = SORTMODE_REAL; break; case LSORT_UNIQUE: - unique = 1; sortInfo.unique = 1; break; case LSORT_INDICES: diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 6168133..6b8b7a5 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.169 2009/07/14 21:47:42 das Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.170 2009/07/16 21:24:39 dgp Exp $ */ #include "tclInt.h" @@ -1190,7 +1190,7 @@ TclCompileScript( Namespace *cmdNsPtr; Command *cmdPtr; Tcl_Token *tokenPtr; - int bytesLeft, isFirstCmd, gotParse, wordIdx, currCmdIndex; + int bytesLeft, isFirstCmd, wordIdx, currCmdIndex; int commandLength, objIndex; Tcl_DString ds; /* TIP #280 */ @@ -1220,7 +1220,6 @@ TclCompileScript( p = script; bytesLeft = numBytes; - gotParse = 0; cmdLine = envPtr->line; do { if (Tcl_ParseCommand(interp, p, bytesLeft, 0, parsePtr) != TCL_OK) { @@ -1236,7 +1235,6 @@ TclCompileScript( TclCompileSyntaxError(interp, envPtr); break; } - gotParse = 1; if (parsePtr->numWords > 0) { int expand = 0; /* Set if there are dynamic expansions to * handle */ @@ -1578,7 +1576,6 @@ TclCompileScript( TclAdvanceLines(&cmdLine, parsePtr->commandStart, p); Tcl_FreeParse(parsePtr); - gotParse = 0; } while (bytesLeft > 0); /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5139dad..8ccdbe1 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.441 2009/07/14 16:34:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.442 2009/07/16 21:24:39 dgp Exp $ */ #include "tclInt.h" @@ -4708,10 +4708,8 @@ TclExecuteByteCode( */ int index, length; - char *bytes; Tcl_Obj *valuePtr, *value2Ptr; - bytes = NULL; /* lint */ value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; diff --git a/generic/tclHash.c b/generic/tclHash.c index 218d8e1..9ed941e 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.38 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.39 2009/07/16 21:24:39 dgp Exp $ */ #include "tclInt.h" @@ -624,18 +624,6 @@ Tcl_HashStats( double average, tmp; register Tcl_HashEntry *hPtr; char *result, *p; - const Tcl_HashKeyType *typePtr; - - if (tablePtr->keyType == TCL_STRING_KEYS) { - typePtr = &tclStringHashKeyType; - } else if (tablePtr->keyType == TCL_ONE_WORD_KEYS) { - typePtr = &tclOneWordHashKeyType; - } else if (tablePtr->keyType == TCL_CUSTOM_TYPE_KEYS - || tablePtr->keyType == TCL_CUSTOM_PTR_KEYS) { - typePtr = tablePtr->typePtr; - } else { - typePtr = &tclArrayHashKeyType; - } /* * Compute a histogram of bucket usage. diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 44df324..f77e737 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.163 2009/02/10 22:50:05 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.164 2009/07/16 21:24:39 dgp Exp $ */ #include "tclInt.h" @@ -1793,11 +1793,9 @@ TclNREvalFile( const char *encodingName) /* If non-NULL, then use this encoding for the * file. NULL means use the system encoding. */ { - int length; Tcl_StatBuf statBuf; Tcl_Obj *oldScriptFile, *objPtr; Interp *iPtr; - const char *string; Tcl_Channel chan; if (Tcl_FSGetNormalizedPath(interp, pathPtr) == NULL) { @@ -1857,7 +1855,6 @@ TclNREvalFile( oldScriptFile = iPtr->scriptFile; iPtr->scriptFile = pathPtr; Tcl_IncrRefCount(iPtr->scriptFile); - string = Tcl_GetStringFromObj(objPtr, &length); /* * TIP #280: Force the evaluator to open a frame for a sourced file. diff --git a/generic/tclProc.c b/generic/tclProc.c index 7696015..98784c3 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.172 2009/06/13 14:31:54 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.173 2009/07/16 21:24:40 dgp Exp $ */ #include "tclInt.h" @@ -1814,7 +1814,7 @@ InterpProcNR2( Proc *procPtr = iPtr->varFramePtr->procPtr; CallFrame *freePtr; Tcl_Obj *procNameObj = data[0]; - ProcErrorProc *errorProc = data[1]; + ProcErrorProc *errorProc = (ProcErrorProc *)data[1]; if (TCL_DTRACE_PROC_RETURN_ENABLED()) { int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0; diff --git a/generic/tclScan.c b/generic/tclScan.c index 07bbedd..47fa025 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.31 2009/02/10 23:09:04 nijtmans Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.32 2009/07/16 21:24:40 dgp Exp $ */ #include "tclInt.h" @@ -964,7 +964,7 @@ Tcl_ScanObjCmd( if (Tcl_GetDoubleFromObj(NULL, objPtr, &dvalue) != TCL_OK) { #ifdef ACCEPT_NAN if (objPtr->typePtr == &tclDoubleType) { - dValue = objPtr->internalRep.doubleValue; + dvalue = objPtr->internalRep.doubleValue; } else #endif { diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 5db3d66..fbe4105 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.37 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.38 2009/07/16 21:24:40 dgp Exp $ * *---------------------------------------------------------------------- */ @@ -68,6 +68,14 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); #if defined(__sun) && defined(__i386) && !defined(__GNUC__) #include #endif + +/* + * MIPS floating-point units need special settings in control registers + * to use gradual underflow as we expect. + */ +#if defined(__mips) +#include +#endif /* * HP's PA_RISC architecture uses 7ff4000000000000 to represent a quiet NaN. * Everyone else uses 7ff8000000000000. (Why, HP, why?) @@ -2166,6 +2174,14 @@ TclInitDoubleConversion(void) } bitwhack; #endif +#if defined(__mips) + union fpc_csr mipsCR; + + mipsCR.fc_word = get_fpc_csr(); + mipsCR.fc_struct.flush = 0; + set_fpc_csr(mipsCR.fc_word); +#endif + /* * Initialize table of powers of 10 expressed as wide integers. */ diff --git a/generic/tclVar.c b/generic/tclVar.c index d87cdf9..eb7cf53 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.178 2009/03/24 09:30:07 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.179 2009/07/16 21:24:40 dgp Exp $ */ #include "tclInt.h" @@ -516,12 +516,15 @@ TclObjLookupVarEx( const Tcl_ObjType *typePtr = part1Ptr->typePtr; const char *errMsg = NULL; CallFrame *varFramePtr = iPtr->varFramePtr; +#if ENABLE_NS_VARNAME_CACHING Namespace *nsPtr; +#endif const char *part2 = part2Ptr? TclGetString(part2Ptr):NULL; char *newPart2 = NULL; *arrayPtrPtr = NULL; +#if ENABLE_NS_VARNAME_CACHING if (varFramePtr) { nsPtr = varFramePtr->nsPtr; } else { @@ -532,6 +535,7 @@ TclObjLookupVarEx( nsPtr = NULL; } +#endif if (typePtr == &localVarNameType) { int localIndex; -- cgit v0.12 From 87edf9c39870a062040ef47d131ee19dfc4161d8 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 18 Jul 2009 08:16:06 +0000 Subject: * unix/Makefile.in: Define NDEBUG in optimized (non-symbols) build to disable NRE assert()s and threaded allocator range checks. --- ChangeLog | 5 +++++ unix/Makefile.in | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7cd5e76..4d978f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-18 Daniel Steffen + + * unix/Makefile.in: Define NDEBUG in optimized (non-symbols) build to + disable NRE assert()s and threaded allocator range checks. + 2009-07-16 Don Porter * generic/tclBinary.c: Removed unused variables. diff --git a/unix/Makefile.in b/unix/Makefile.in index 312eac2..d210013 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.271 2009/06/26 18:14:25 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.272 2009/07/18 08:16:06 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -97,7 +97,7 @@ CFLAGS_WARNING = @CFLAGS_WARNING@ # The default switches for optimization or debugging CFLAGS_DEBUG = @CFLAGS_DEBUG@ -CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ +CFLAGS_OPTIMIZE = -DNDEBUG @CFLAGS_OPTIMIZE@ # To change the compiler switches, for example to change from optimization to # debugging symbols, change the following line: -- cgit v0.12 From d63bf48fae3c37de04f6f82c8bde59587e1ed2aa Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 19 Jul 2009 11:46:52 +0000 Subject: Expose function to efficiently return current name of an object. --- ChangeLog | 11 ++++++++--- doc/Class.3 | 12 +++++++++--- generic/tclOO.c | 12 ++++++++++-- generic/tclOO.decls | 24 ++++++++++++++++++++---- generic/tclOODecls.h | 13 ++++++++++++- generic/tclOOStubInit.c | 3 ++- 6 files changed, 61 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d978f2..9023354 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-19 Donal K. Fellows + + * generic/tclOO.decls, generic/tclOO.c (Tcl_GetObjectName): Expose a + function for efficiently returning the current name of an object. + 2009-07-18 Daniel Steffen * unix/Makefile.in: Define NDEBUG in optimized (non-symbols) build to @@ -18,9 +23,9 @@ * generic/tclScan.c: Typo in ACCEPT_NAN configuration. - * generic/tclStrToD.c: Set floating point control register on - MIPS systems so that the gradual underflow expected by Tcl is - in effect. [Bug 2819200] + * generic/tclStrToD.c: [Bug 2819200]: Set floating point control + register on MIPS systems so that the gradual underflow expected by Tcl + is in effect. 2009-07-15 Donal K. Fellows diff --git a/doc/Class.3 b/doc/Class.3 index e7b0881..5792b17 100644 --- a/doc/Class.3 +++ b/doc/Class.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Class.3,v 1.3 2009/07/12 14:57:56 dkf Exp $ +'\" RCS: @(#) $Id: Class.3,v 1.4 2009/07/19 11:46:53 dkf Exp $ '\" .so man.macros .TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions" @@ -25,6 +25,9 @@ Tcl_Object Tcl_Class \fBTcl_GetObjectAsClass\fR(\fIobject\fR) .sp +Tcl_Obj * +\fBTcl_GetObjectName\fR(\fIinterp, object\fR) +.sp Tcl_Command \fBTcl_GetObjectCommand\fR(\fIobject\fR) .sp @@ -103,8 +106,11 @@ found. The correct way to look up a class by name is to look up the object with that name, and then to use \fBTcl_GetObjectAsClass\fR. .PP Every object has its own command and namespace associated with it. The command -may be retrieved using the \fBTcl_GetObjectCommand\fR function, and the -namespace may be retrieved using the \fBTcl_GetObjectNamespace\fR function. +may be retrieved using the \fBTcl_GetObjectCommand\fR function, the name of +the object (and hence the name of the command) with \fBTcl_GetObjectName\fR, +and the namespace may be retrieved using the \fBTcl_GetObjectNamespace\fR +function. Note that the Tcl_Obj reference returned by \fBTcl_GetObjectName\fR +is a shared reference. .PP Instances of classes are created using \fBTcl_NewObjectInstance\fR, which takes creates an object from any class (and which is internally called by both diff --git a/generic/tclOO.c b/generic/tclOO.c index c1e8678..4233020 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.23 2009/07/12 14:51:30 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.24 2009/07/19 11:46:53 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -2439,7 +2439,7 @@ TclOOIsReachable( /* * ---------------------------------------------------------------------- * - * TclOOObjectName -- + * TclOOObjectName, Tcl_GetObjectName -- * * Utility function that returns the name of the object. Note that this * simplifies cache management by keeping the code to do it in one place @@ -2465,6 +2465,14 @@ TclOOObjectName( oPtr->cachedNameObj = namePtr; return namePtr; } + +Tcl_Obj * +Tcl_GetObjectName( + Tcl_Interp *interp, + Tcl_Object object) +{ + return TclOOObjectName(interp, (Object *) object); +} /* * ---------------------------------------------------------------------- diff --git a/generic/tclOO.decls b/generic/tclOO.decls index dd33f14..f06dd6b 100644 --- a/generic/tclOO.decls +++ b/generic/tclOO.decls @@ -1,8 +1,11 @@ -# -*- tcl -*- -# $Id: tclOO.decls,v 1.4 2008/10/17 18:42:12 nijtmans Exp $ +# $Id: tclOO.decls,v 1.5 2009/07/19 11:46:53 dkf Exp $ -# public API library tclOO + +###################################################################### +# public API +# + interface tclOO hooks tclOOInt @@ -109,9 +112,16 @@ declare 27 generic { void Tcl_ClassSetDestructor(Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method) } - +declare 28 generic { + Tcl_Obj *Tcl_GetObjectName(Tcl_Interp *interp, Tcl_Object object) +} + +###################################################################### # private API, exposed to support advanced OO systems that plug in on top +# + interface tclOOInt + declare 0 generic { Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp) } @@ -187,3 +197,9 @@ declare 15 generic { void TclOOClassSetMixins(Tcl_Interp *interp, Class *classPtr, int numMixins, Class *const *mixins) } + +return + +# Local Variables: +# mode: tcl +# End: diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 1a0c262..c42c02f 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.11 2009/01/29 14:53:36 dkf Exp $ + * $Id: tclOODecls.h,v 1.12 2009/07/19 11:46:53 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -207,6 +207,12 @@ EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); #endif +#ifndef Tcl_GetObjectName_TCL_DECLARED +#define Tcl_GetObjectName_TCL_DECLARED +/* 28 */ +EXTERN Tcl_Obj * Tcl_GetObjectName (Tcl_Interp * interp, + Tcl_Object object); +#endif typedef struct TclOOStubHooks { const struct TclOOIntStubs *tclOOIntStubs; @@ -244,6 +250,7 @@ typedef struct TclOOStubs { void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ + Tcl_Obj * (*tcl_GetObjectName) (Tcl_Interp * interp, Tcl_Object object); /* 28 */ } TclOOStubs; #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) @@ -368,6 +375,10 @@ extern const TclOOStubs *tclOOStubsPtr; #define Tcl_ClassSetDestructor \ (tclOOStubsPtr->tcl_ClassSetDestructor) /* 27 */ #endif +#ifndef Tcl_GetObjectName +#define Tcl_GetObjectName \ + (tclOOStubsPtr->tcl_GetObjectName) /* 28 */ +#endif #endif /* defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) */ diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index 400eeef..4ec3992 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubInit.c,v 1.6 2008/07/22 23:01:39 das Exp $ + * $Id: tclOOStubInit.c,v 1.7 2009/07/19 11:46:53 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. * It is compiled and linked in with the tclOO package proper. @@ -69,6 +69,7 @@ static const TclOOStubs tclOOStubs = { Tcl_ObjectSetMethodNameMapper, /* 25 */ Tcl_ClassSetConstructor, /* 26 */ Tcl_ClassSetDestructor, /* 27 */ + Tcl_GetObjectName, /* 28 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 6662c3248a0690dd85923e868c6d4d2d0d91cf22 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 20 Jul 2009 09:13:44 +0000 Subject: Performance boost for [string is]. --- ChangeLog | 8 +++++ generic/tclCmdMZ.c | 103 ++++++++++++++++++++++++++++++++++------------------- 2 files changed, 75 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9023354..31820e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-07-20 Donal K. Fellows + + * generic/tclCmdMZ.c (StringIsCmd): Reorganize so that [string is] is + more efficient when parsing things that are correct, at a cost of + making the empty string test slightly more costly. With this, the cost + of doing [string is integer -strict $x] matches [catch {expr {$x+0}}] + in the successful case, and greatly outstrips it in the failing case. + 2009-07-19 Donal K. Fellows * generic/tclOO.decls, generic/tclOO.c (Tcl_GetObjectName): Expose a diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 1fb32df..554097f 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.187 2009/07/14 21:47:42 das Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.188 2009/07/20 09:13:44 dkf Exp $ */ #include "tclInt.h" @@ -32,6 +32,7 @@ static int TryPostFinal(ClientData data[], Tcl_Interp *interp, static int TryPostHandler(ClientData data[], Tcl_Interp *interp, int result); static int UniCharIsAscii(int character); +static int UniCharIsHexDigit(int character); /* * Default set of characters to trim in [string trim] and friends. This is a @@ -1410,14 +1411,14 @@ StringIsCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - const char *string1, *string2, *end, *stop; + const char *string1, *end, *stop; Tcl_UniChar ch; int (*chcomp)(int) = NULL; /* The UniChar comparison function. */ int i, failat = 0, result = 1, strict = 0, index, length1, length2; Tcl_Obj *objPtr, *failVarObj = NULL; Tcl_WideInt w; - static const char *const isOptions[] = { + static const char *const isClasses[] = { "alnum", "alpha", "ascii", "control", "boolean", "digit", "double", "false", "graph", "integer", "list", "lower", @@ -1425,42 +1426,50 @@ StringIsCmd( "upper", "wideinteger", "wordchar", "xdigit", NULL }; - enum isOptions { + enum isClasses { STR_IS_ALNUM, STR_IS_ALPHA, STR_IS_ASCII, STR_IS_CONTROL, STR_IS_BOOL, STR_IS_DIGIT, STR_IS_DOUBLE, STR_IS_FALSE, STR_IS_GRAPH, STR_IS_INT, STR_IS_LIST, STR_IS_LOWER, STR_IS_PRINT, STR_IS_PUNCT, STR_IS_SPACE, STR_IS_TRUE, STR_IS_UPPER, STR_IS_WIDE, STR_IS_WORD, STR_IS_XDIGIT }; + static const char *const isOptions[] = { + "-strict", "-failindex", NULL + }; + enum isOptions { + OPT_STRICT, OPT_FAILIDX + }; if (objc < 3 || objc > 6) { Tcl_WrongNumArgs(interp, 1, objv, "class ?-strict? ?-failindex var? str"); return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[1], isOptions, "class", 0, + if (Tcl_GetIndexFromObj(interp, objv[1], isClasses, "class", 0, &index) != TCL_OK) { return TCL_ERROR; } if (objc != 3) { for (i = 2; i < objc-1; i++) { - string2 = TclGetStringFromObj(objv[i], &length2); - if ((length2 > 1) && - strncmp(string2, "-strict", (size_t) length2) == 0) { + int idx2; + + if (Tcl_GetIndexFromObj(interp, objv[i], isOptions, "option", 0, + &idx2) != TCL_OK) { + return TCL_ERROR; + } + switch ((enum isOptions) idx2) { + case OPT_STRICT: strict = 1; - } else if ((length2 > 1) && - strncmp(string2, "-failindex", (size_t)length2) == 0){ + break; + case OPT_FAILIDX: if (i+1 >= objc-1) { Tcl_WrongNumArgs(interp, 2, objv, "?-strict? ?-failindex var? str"); return TCL_ERROR; } failVarObj = objv[++i]; - } else { - Tcl_AppendResult(interp, "bad option \"", string2, - "\": must be -strict or -failindex", NULL); - return TCL_ERROR; + break; } } } @@ -1473,20 +1482,12 @@ StringIsCmd( */ objPtr = objv[objc-1]; - string1 = TclGetStringFromObj(objPtr, &length1); - if (length1 == 0 && index != STR_IS_LIST) { - if (strict) { - result = 0; - } - goto str_is_done; - } - end = string1 + length1; /* * When entering here, result == 1 and failat == 0. */ - switch ((enum isOptions) index) { + switch ((enum isClasses) index) { case STR_IS_ALNUM: chcomp = Tcl_UniCharIsAlnum; break; @@ -1500,7 +1501,12 @@ StringIsCmd( case STR_IS_TRUE: case STR_IS_FALSE: if (TCL_OK != Tcl_ConvertToType(NULL, objPtr, &tclBooleanType)) { - result = 0; + if (strict) { + result = 0; + } else { + string1 = TclGetStringFromObj(objPtr, &length1); + result = length1 == 0; + } } else if (((index == STR_IS_TRUE) && objPtr->internalRep.longValue == 0) || ((index == STR_IS_FALSE) && @@ -1524,6 +1530,14 @@ StringIsCmd( (objPtr->typePtr == &tclBignumType)) { break; } + string1 = TclGetStringFromObj(objPtr, &length1); + if (length1 == 0) { + if (strict) { + result = 0; + } + goto str_is_done; + } + end = string1 + length1; if (TclParseNumber(NULL, objPtr, NULL, NULL, -1, (const char **) &stop, 0) != TCL_OK) { result = 0; @@ -1552,8 +1566,14 @@ StringIsCmd( } failedIntParse: + string1 = TclGetStringFromObj(objPtr, &length1); + if (length1 == 0) { + if (strict) { + result = 0; + } + goto str_is_done; + } result = 0; - if (failVarObj == NULL) { /* * Don't bother computing the failure point if we're not going to @@ -1562,6 +1582,7 @@ StringIsCmd( break; } + end = string1 + length1; if (TclParseNumber(NULL, objPtr, NULL, NULL, -1, (const char **) &stop, TCL_PARSE_INTEGER_ONLY) == TCL_OK) { if (stop == end) { @@ -1610,14 +1631,15 @@ StringIsCmd( * SetListFromAny(). */ - const char *elemStart, *nextElem, *limit; + const char *elemStart, *nextElem; int lenRemain, elemSize, hasBrace; register const char *p; - limit = string1 + length1; + string1 = TclGetStringFromObj(objPtr, &length1); + end = string1 + length1; failat = -1; for (p=string1, lenRemain=length1; lenRemain > 0; - p=nextElem, lenRemain=limit-nextElem) { + p=nextElem, lenRemain=end-nextElem) { if (TCL_ERROR == TclFindElement(NULL, p, lenRemain, &elemStart, &nextElem, &elemSize, &hasBrace)) { Tcl_Obj *tmpStr; @@ -1663,17 +1685,19 @@ StringIsCmd( chcomp = Tcl_UniCharIsWordChar; break; case STR_IS_XDIGIT: - for (; string1 < end; string1++, failat++) { - /* INTL: We assume unicode is bad for this class. */ - if ((*((unsigned char *)string1) >= 0xC0) || - !isxdigit(*(unsigned char *)string1)) { - result = 0; - break; - } - } + chcomp = UniCharIsHexDigit; break; } + if (chcomp != NULL) { + string1 = TclGetStringFromObj(objPtr, &length1); + if (length1 == 0) { + if (strict) { + result = 0; + } + goto str_is_done; + } + end = string1 + length1; for (; string1 < end; string1 += length2, failat++) { length2 = TclUtfToUniChar(string1, &ch); if (!chcomp(ch)) { @@ -1704,6 +1728,13 @@ UniCharIsAscii( { return (character >= 0) && (character < 0x80); } + +static int +UniCharIsHexDigit( + int character) +{ + return (character >= 0) && (character < 0x80) && isxdigit(character); +} /* *---------------------------------------------------------------------- -- cgit v0.12 From 84dd98f930dfe07339e9c8ea45423ba3fe0a2d92 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 21 Jul 2009 19:03:25 +0000 Subject: 2009-07-21 Kevin B. Kenny * library/tzdata/Asia/Dhaka: * library/tzdata/Indian/Mauritius: Olson's tzdata2009k. --- ChangeLog | 5 ++ library/tzdata/Asia/Dhaka | 4 +- library/tzdata/Indian/Mauritius | 183 +--------------------------------------- 3 files changed, 8 insertions(+), 184 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31820e9..2eb01c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-21 Kevin B. Kenny + + * library/tzdata/Asia/Dhaka: + * library/tzdata/Indian/Mauritius: Olson's tzdata2009k. + 2009-07-20 Donal K. Fellows * generic/tclCmdMZ.c (StringIsCmd): Reorganize so that [string is] is diff --git a/library/tzdata/Asia/Dhaka b/library/tzdata/Asia/Dhaka index 98967ed..70fc865 100644 --- a/library/tzdata/Asia/Dhaka +++ b/library/tzdata/Asia/Dhaka @@ -8,6 +8,6 @@ set TZData(:Asia/Dhaka) { {-862637400 23400 0 BURT} {-576138600 21600 0 DACT} {38772000 21600 0 BDT} - {1230746400 21600 0 BDT} - {1245434400 25200 1 BDST} + {1245430800 25200 1 BDST} + {1262278800 21600 0 BDT} } diff --git a/library/tzdata/Indian/Mauritius b/library/tzdata/Indian/Mauritius index 69fe8fe..a9c07eb 100644 --- a/library/tzdata/Indian/Mauritius +++ b/library/tzdata/Indian/Mauritius @@ -6,186 +6,5 @@ set TZData(:Indian/Mauritius) { {403041600 18000 1 MUST} {417034800 14400 0 MUT} {1224972000 18000 1 MUST} - {1238277600 14400 0 MUT} - {1256421600 18000 1 MUST} - {1269727200 14400 0 MUT} - {1288476000 18000 1 MUST} - {1301176800 14400 0 MUT} - {1319925600 18000 1 MUST} - {1332626400 14400 0 MUT} - {1351375200 18000 1 MUST} - {1364680800 14400 0 MUT} - {1382824800 18000 1 MUST} - {1396130400 14400 0 MUT} - {1414274400 18000 1 MUST} - {1427580000 14400 0 MUT} - {1445724000 18000 1 MUST} - {1459029600 14400 0 MUT} - {1477778400 18000 1 MUST} - {1490479200 14400 0 MUT} - {1509228000 18000 1 MUST} - {1521928800 14400 0 MUT} - {1540677600 18000 1 MUST} - {1553983200 14400 0 MUT} - {1572127200 18000 1 MUST} - {1585432800 14400 0 MUT} - {1603576800 18000 1 MUST} - {1616882400 14400 0 MUT} - {1635631200 18000 1 MUST} - {1648332000 14400 0 MUT} - {1667080800 18000 1 MUST} - {1679781600 14400 0 MUT} - {1698530400 18000 1 MUST} - {1711836000 14400 0 MUT} - {1729980000 18000 1 MUST} - {1743285600 14400 0 MUT} - {1761429600 18000 1 MUST} - {1774735200 14400 0 MUT} - {1792879200 18000 1 MUST} - {1806184800 14400 0 MUT} - {1824933600 18000 1 MUST} - {1837634400 14400 0 MUT} - {1856383200 18000 1 MUST} - {1869084000 14400 0 MUT} - {1887832800 18000 1 MUST} - {1901138400 14400 0 MUT} - {1919282400 18000 1 MUST} - {1932588000 14400 0 MUT} - {1950732000 18000 1 MUST} - {1964037600 14400 0 MUT} - {1982786400 18000 1 MUST} - {1995487200 14400 0 MUT} - {2014236000 18000 1 MUST} - {2026936800 14400 0 MUT} - {2045685600 18000 1 MUST} - {2058386400 14400 0 MUT} - {2077135200 18000 1 MUST} - {2090440800 14400 0 MUT} - {2108584800 18000 1 MUST} - {2121890400 14400 0 MUT} - {2140034400 18000 1 MUST} - {2153340000 14400 0 MUT} - {2172088800 18000 1 MUST} - {2184789600 14400 0 MUT} - {2203538400 18000 1 MUST} - {2216239200 14400 0 MUT} - {2234988000 18000 1 MUST} - {2248293600 14400 0 MUT} - {2266437600 18000 1 MUST} - {2279743200 14400 0 MUT} - {2297887200 18000 1 MUST} - {2311192800 14400 0 MUT} - {2329336800 18000 1 MUST} - {2342642400 14400 0 MUT} - {2361391200 18000 1 MUST} - {2374092000 14400 0 MUT} - {2392840800 18000 1 MUST} - {2405541600 14400 0 MUT} - {2424290400 18000 1 MUST} - {2437596000 14400 0 MUT} - {2455740000 18000 1 MUST} - {2469045600 14400 0 MUT} - {2487189600 18000 1 MUST} - {2500495200 14400 0 MUT} - {2519244000 18000 1 MUST} - {2531944800 14400 0 MUT} - {2550693600 18000 1 MUST} - {2563394400 14400 0 MUT} - {2582143200 18000 1 MUST} - {2595448800 14400 0 MUT} - {2613592800 18000 1 MUST} - {2626898400 14400 0 MUT} - {2645042400 18000 1 MUST} - {2658348000 14400 0 MUT} - {2676492000 18000 1 MUST} - {2689797600 14400 0 MUT} - {2708546400 18000 1 MUST} - {2721247200 14400 0 MUT} - {2739996000 18000 1 MUST} - {2752696800 14400 0 MUT} - {2771445600 18000 1 MUST} - {2784751200 14400 0 MUT} - {2802895200 18000 1 MUST} - {2816200800 14400 0 MUT} - {2834344800 18000 1 MUST} - {2847650400 14400 0 MUT} - {2866399200 18000 1 MUST} - {2879100000 14400 0 MUT} - {2897848800 18000 1 MUST} - {2910549600 14400 0 MUT} - {2929298400 18000 1 MUST} - {2941999200 14400 0 MUT} - {2960748000 18000 1 MUST} - {2974053600 14400 0 MUT} - {2992197600 18000 1 MUST} - {3005503200 14400 0 MUT} - {3023647200 18000 1 MUST} - {3036952800 14400 0 MUT} - {3055701600 18000 1 MUST} - {3068402400 14400 0 MUT} - {3087151200 18000 1 MUST} - {3099852000 14400 0 MUT} - {3118600800 18000 1 MUST} - {3131906400 14400 0 MUT} - {3150050400 18000 1 MUST} - {3163356000 14400 0 MUT} - {3181500000 18000 1 MUST} - {3194805600 14400 0 MUT} - {3212949600 18000 1 MUST} - {3226255200 14400 0 MUT} - {3245004000 18000 1 MUST} - {3257704800 14400 0 MUT} - {3276453600 18000 1 MUST} - {3289154400 14400 0 MUT} - {3307903200 18000 1 MUST} - {3321208800 14400 0 MUT} - {3339352800 18000 1 MUST} - {3352658400 14400 0 MUT} - {3370802400 18000 1 MUST} - {3384108000 14400 0 MUT} - {3402856800 18000 1 MUST} - {3415557600 14400 0 MUT} - {3434306400 18000 1 MUST} - {3447007200 14400 0 MUT} - {3465756000 18000 1 MUST} - {3479061600 14400 0 MUT} - {3497205600 18000 1 MUST} - {3510511200 14400 0 MUT} - {3528655200 18000 1 MUST} - {3541960800 14400 0 MUT} - {3560104800 18000 1 MUST} - {3573410400 14400 0 MUT} - {3592159200 18000 1 MUST} - {3604860000 14400 0 MUT} - {3623608800 18000 1 MUST} - {3636309600 14400 0 MUT} - {3655058400 18000 1 MUST} - {3668364000 14400 0 MUT} - {3686508000 18000 1 MUST} - {3699813600 14400 0 MUT} - {3717957600 18000 1 MUST} - {3731263200 14400 0 MUT} - {3750012000 18000 1 MUST} - {3762712800 14400 0 MUT} - {3781461600 18000 1 MUST} - {3794162400 14400 0 MUT} - {3812911200 18000 1 MUST} - {3825612000 14400 0 MUT} - {3844360800 18000 1 MUST} - {3857666400 14400 0 MUT} - {3875810400 18000 1 MUST} - {3889116000 14400 0 MUT} - {3907260000 18000 1 MUST} - {3920565600 14400 0 MUT} - {3939314400 18000 1 MUST} - {3952015200 14400 0 MUT} - {3970764000 18000 1 MUST} - {3983464800 14400 0 MUT} - {4002213600 18000 1 MUST} - {4015519200 14400 0 MUT} - {4033663200 18000 1 MUST} - {4046968800 14400 0 MUT} - {4065112800 18000 1 MUST} - {4078418400 14400 0 MUT} - {4096562400 18000 1 MUST} + {1238274000 14400 0 MUT} } -- cgit v0.12 From 598551ed4987a7a3cd237cd8b66cf5becb3e8b1f Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 22 Jul 2009 08:41:59 +0000 Subject: Refined the 20090617 patch on [exit] streamlining, so that it now correctly calls thread exit handlers for the calling thread, which includes bindings in Tk [Bug 2001201 again]. --- ChangeLog | 7 +++++++ generic/tclEvent.c | 19 ++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2eb01c7..f95c3ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-22 Alexandre Ferrieux + + * generic/tclEvent.c: Refined the 20090617 patch on [exit] + streamlining, so that it now correctly calls thread exit handlers + for the calling thread, which includes bindings in Tk + [Bug 2001201 again]. + 2009-07-21 Kevin B. Kenny * library/tzdata/Asia/Dhaka: diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 6c55ef0..4f67608 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.90 2009/06/18 09:41:26 dkf Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.91 2009/07/22 08:41:59 ferrieux Exp $ */ #include "tclInt.h" @@ -952,11 +952,20 @@ Tcl_Exit( InvokeExitHandlers(); /* - * This triggers a flush of the Tcl_Channels that may have - * data enqueued. + * Ensure the thread-specific data is initialised as it is used in + * Tcl_FinalizeThread() */ - TclFinalizeIOSubsystem(); - + + (void) TCL_TSD_INIT(&dataKey); + + /* + * Now finalize the calling thread only (others are not safely + * reachable). Among other things, this triggers a flush of the + * Tcl_Channels that may have data enqueued. + */ + + Tcl_FinalizeThread(); + TclpExit(status); Tcl_Panic("OS exit failed!"); } -- cgit v0.12 From 223b313a0cf97cf513b18df35a99f4c58cee7b39 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 22 Jul 2009 12:00:42 +0000 Subject: * macosx/tclMacOSXFCmd.c: CONST -> const * generic/tclGetDate.y: * generic/tclDate.c: * generic/tclLiteral.c: (char *) cast in ckfree call --- ChangeLog | 7 +++++++ generic/tclDate.c | 2 +- generic/tclGetDate.y | 4 ++-- generic/tclLiteral.c | 8 ++++---- macosx/tclMacOSXNotify.c | 6 +++--- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f95c3ce..9420174 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-22 Jan Nijtmans + + * macosx/tclMacOSXFCmd.c: CONST -> const + * generic/tclGetDate.y: + * generic/tclDate.c: + * generic/tclLiteral.c: (char *) cast in ckfree call + 2009-07-22 Alexandre Ferrieux * generic/tclEvent.c: Refined the 20090617 patch on [exit] diff --git a/generic/tclDate.c b/generic/tclDate.c index 432225d..7f67156 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2757,7 +2757,7 @@ TclClockOldscanObjCmd( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ - Tcl_Obj *CONST *objv) /* Parameters */ + Tcl_Obj *const *objv) /* Parameters */ { Tcl_Obj *result, *resultElement; int yr, mo, da; diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 844632e..8014b73 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.41 2009/06/09 13:52:37 kennykb Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.42 2009/07/22 12:00:42 nijtmans Exp $ */ %parse-param {DateInfo* info} @@ -969,7 +969,7 @@ TclClockOldscanObjCmd( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* Tcl interpreter */ int objc, /* Count of paraneters */ - Tcl_Obj *CONST *objv) /* Parameters */ + Tcl_Obj *const *objv) /* Parameters */ { Tcl_Obj *result, *resultElement; int yr, mo, da; diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index ccee1c4..5d4974a 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.35 2009/02/10 22:49:50 nijtmans Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.36 2009/07/22 12:00:42 nijtmans Exp $ */ #include "tclInt.h" @@ -282,7 +282,7 @@ TclCreateLiteral( *globalPtrPtr = globalPtr; } if (flags & LITERAL_ON_HEAP) { - ckfree(bytes); + ckfree((char *) bytes); } globalPtr->refCount++; return objPtr; @@ -290,7 +290,7 @@ TclCreateLiteral( } if (!newPtr) { if (flags & LITERAL_ON_HEAP) { - ckfree(bytes); + ckfree((char *) bytes); } return NULL; } @@ -438,7 +438,7 @@ TclRegisterLiteral( || ((objPtr->bytes[0] == bytes[0]) && (memcmp(objPtr->bytes, bytes, (unsigned) length) == 0)))) { if (flags & LITERAL_ON_HEAP) { - ckfree(bytes); + ckfree((char *) bytes); } objIndex = (localPtr - envPtr->literalArrayPtr); #ifdef TCL_COMPILE_DEBUG diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index a1bc7c1..ee4335a 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.26 2009/04/14 00:55:31 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.27 2009/07/22 12:00:42 nijtmans Exp $ */ #include "tclInt.h" @@ -1655,7 +1655,7 @@ TclUnixWaitForFile( if (FD_ISSET(fd, &writableMask)) { SET_BITS(result, TCL_WRITABLE); } - if (FD_ISSET(fd, &exceptionalMask)) { + if (FD_ISSET(fd, &exceptionalMask)) { SET_BITS(result, TCL_EXCEPTION); } result &= mask; @@ -1973,7 +1973,7 @@ AtForkChild(void) void TclMacOSXNotifierAddRunLoopMode( - CONST void *runLoopMode) + const void *runLoopMode) { Tcl_Panic("TclMacOSXNotifierAddRunLoopMode: " "Tcl not built with CoreFoundation support"); -- cgit v0.12 From 432b10e730341c0769705ac13e8b21ceb665d1b5 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 22 Jul 2009 19:54:49 +0000 Subject: Feature Request 2814786: remove TclpPanic --- ChangeLog | 4 ++++ generic/tclInt.h | 3 +-- generic/tclPanic.c | 12 +----------- unix/tclUnixPort.h | 16 +++++----------- win/tclWinPort.h | 18 ++++++------------ 5 files changed, 17 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9420174..9e30ac7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ * generic/tclGetDate.y: * generic/tclDate.c: * generic/tclLiteral.c: (char *) cast in ckfree call + * generic/tclPanic.c: Feature Request 2814786: remove TclpPanic + * generic/tclInt.h + * unix/tclUnixPort.h + * win/tclWinPort.h 2009-07-22 Alexandre Ferrieux diff --git a/generic/tclInt.h b/generic/tclInt.h index d2d8830..2f521eb 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.430 2009/07/15 13:17:18 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.431 2009/07/22 19:54:49 nijtmans Exp $ */ #ifndef _TCLINT @@ -2868,7 +2868,6 @@ MODULE_SCOPE Tcl_Channel TclpOpenTemporaryFile(Tcl_Obj *dirObj, Tcl_Obj *resultingNameObj); MODULE_SCOPE Tcl_Obj * TclPathPart(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_PathPart portion); -MODULE_SCOPE void TclpPanic(const char *format, ...); MODULE_SCOPE char * TclpReadlink(const char *fileName, Tcl_DString *linkPtr); MODULE_SCOPE void TclpReleaseFile(TclFile file); diff --git a/generic/tclPanic.c b/generic/tclPanic.c index e74df68..b3a5ed6 100644 --- a/generic/tclPanic.c +++ b/generic/tclPanic.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPanic.c,v 1.13 2009/06/30 00:56:08 das Exp $ + * RCS: @(#) $Id: tclPanic.c,v 1.14 2009/07/22 19:54:50 nijtmans Exp $ */ #include "tclInt.h" @@ -24,13 +24,6 @@ */ static Tcl_PanicProc *panicProc = NULL; - -/* - * The platformPanicProc variable contains a pointer to a platform specific - * panic procedure, if any. (TclpPanic may be NULL via a macro.) - */ - -static Tcl_PanicProc *const platformPanicProc = TclpPanic; /* *---------------------------------------------------------------------- @@ -92,9 +85,6 @@ Tcl_PanicVA( if (panicProc != NULL) { panicProc(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); - } else if (platformPanicProc != NULL) { - platformPanicProc(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, - arg8); } else { fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index bc387ca..f740c48 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.69 2009/06/15 16:24:45 rmax Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.70 2009/07/22 19:54:50 nijtmans Exp $ */ #ifndef _TCLUNIXPORT @@ -459,12 +459,6 @@ extern char **environ; #endif /* - * There is no platform-specific panic routine for Unix in the Tcl internals. - */ - -#define TclpPanic ((Tcl_PanicProc *) NULL) - -/* * Darwin specifc configure overrides. */ @@ -553,8 +547,8 @@ extern char **environ; /* *--------------------------------------------------------------------------- - * The following macros and declarations represent the interface between - * generic and unix-specific parts of Tcl. Some of the macros may override + * The following macros and declarations represent the interface between + * generic and unix-specific parts of Tcl. Some of the macros may override * functions declared in tclInt.h. *--------------------------------------------------------------------------- */ @@ -571,7 +565,7 @@ typedef int socklen_t; #endif /* - * The following macros have trivial definitions, allowing generic code to + * The following macros have trivial definitions, allowing generic code to * address platform-specific issues. */ @@ -608,7 +602,7 @@ EXTERN char * TclpInetNtoa(struct in_addr); * known-to-be-MT-unsafe library calls. * Instead of returning pointers to the * static storage, those return pointers - * to the TSD data. + * to the TSD data. */ #include diff --git a/win/tclWinPort.h b/win/tclWinPort.h index bca0b7e..93eca70 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.50 2007/12/13 15:28:44 dgp Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.51 2009/07/22 19:54:49 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -403,7 +403,7 @@ #ifdef __WATCOMC__ - /* + /* * OpenWatcom uses a wine derived winsock2.h that is missing the * LPFN_* typedefs. */ @@ -425,15 +425,9 @@ /* - * There is no platform-specific panic routine for Windows in the Tcl internals. - */ - -#define TclpPanic ((Tcl_PanicProc *) NULL) - -/* *--------------------------------------------------------------------------- - * The following macros and declarations represent the interface between - * generic and windows-specific parts of Tcl. Some of the macros may + * The following macros and declarations represent the interface between + * generic and windows-specific parts of Tcl. Some of the macros may * override functions declared in tclInt.h. *--------------------------------------------------------------------------- */ @@ -507,14 +501,14 @@ /* - * The following macros have trivial definitions, allowing generic code to + * The following macros have trivial definitions, allowing generic code to * address platform-specific issues. */ #define TclpReleaseFile(file) ckfree((char *) file) /* - * The following macros and declarations wrap the C runtime library + * The following macros and declarations wrap the C runtime library * functions. */ -- cgit v0.12 From ea4656103530af226ad5280ef0f2465ac6554347 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Thu, 23 Jul 2009 10:07:03 +0000 Subject: Fix for [Bug 2820349] --- ChangeLog | 4 ++++ generic/tclNotify.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9e30ac7..b4b4001 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-07-23 Joe Mistachkin + + * generic/tclNotify.c: Fix for [Bug 2820349]. + 2009-07-22 Jan Nijtmans * macosx/tclMacOSXFCmd.c: CONST -> const diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 53ef23e..5646ebc 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNotify.c,v 1.29 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.30 2009/07/23 10:07:05 mistachkin Exp $ */ #include "tclInt.h" @@ -412,6 +412,8 @@ Tcl_ThreadQueueEvent( if (tsdPtr) { QueueEvent(tsdPtr, evPtr, position); + } else { + ckfree((char *) evPtr); } Tcl_MutexUnlock(&listLock); } -- cgit v0.12 From c1fefc1d02ee22ae574e79cc397b5a477b0efcf4 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 23 Jul 2009 15:23:43 +0000 Subject: fix SunCC warning --- generic/tclBasic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3b5bad1..54d3b47 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.398 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.399 2009/07/23 15:23:43 das Exp $ */ #include "tclInt.h" @@ -7863,7 +7863,7 @@ DTraceCmdReturn( return result; } -TCL_DTRACE_DEBUG_LOG(); +TCL_DTRACE_DEBUG_LOG() #endif /* USE_DTRACE */ -- cgit v0.12 From bd734d2cf44d9550acd5c2ca3e6c5b17f9b03f72 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 23 Jul 2009 22:49:15 +0000 Subject: * generic/tclIO.c (Tcl_GetChannelHandle): Do not crash for * generic/tclPipe.c (FileForRedirect): getHandleProc == NULL, this is allowed. Provide a nice error message in the bypass area. Updated caller to check the bypass for a mesage. This fixes the bug [Bug 2826248] reported by Andy Sonnenburg --- ChangeLog | 9 +++++++++ generic/tclIO.c | 10 +++++++++- generic/tclPipe.c | 14 ++++++++++---- generic/tclVar.c | 15 ++++++++++++--- tools/genStubs.tcl | 5 ++++- unix/Makefile.in | 6 +++--- unix/configure | 6 ++++++ unix/tcl.m4 | 8 +++++++- win/Makefile.in | 6 +++--- 9 files changed, 63 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4b4001..e81578a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-07-23 Andreas Kupries + + * generic/tclIO.c (Tcl_GetChannelHandle): Do not crash for + * generic/tclPipe.c (FileForRedirect): getHandleProc == NULL, this + is allowed. Provide a nice error message in the bypass + area. Updated caller to check the bypass for a mesage. This fixes + the bug [Bug 2826248] reported by Andy Sonnenburg + + 2009-07-23 Joe Mistachkin * generic/tclNotify.c: Fix for [Bug 2820349]. diff --git a/generic/tclIO.c b/generic/tclIO.c index 7814e32..4f676e6 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.159 2009/02/10 22:49:45 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.160 2009/07/23 22:49:15 andreas_kupries Exp $ */ #include "tclInt.h" @@ -2085,6 +2085,14 @@ Tcl_GetChannelHandle( int result; chanPtr = ((Channel *) chan)->state->bottomChanPtr; + if (!chanPtr->typePtr->getHandleProc) { + Tcl_Obj* err; + TclNewLiteralStringObj(err, "channel \""); + Tcl_AppendToObj(err, Tcl_GetChannelName(chan), -1); + Tcl_AppendToObj(err, "\" does not support OS handles", -1); + Tcl_SetChannelError (chan,err); + return TCL_ERROR; + } result = chanPtr->typePtr->getHandleProc(chanPtr->instanceData, direction, &handle); if (handlePtr) { diff --git a/generic/tclPipe.c b/generic/tclPipe.c index b20ffe1..e8e4f74 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPipe.c,v 1.21 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclPipe.c,v 1.22 2009/07/23 22:49:15 andreas_kupries Exp $ */ #include "tclInt.h" @@ -102,9 +102,15 @@ FileForRedirect( } file = TclpMakeFile(chan, writing ? TCL_WRITABLE : TCL_READABLE); if (file == NULL) { - Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(chan), - "\" wasn't opened for ", - ((writing) ? "writing" : "reading"), NULL); + Tcl_Obj* msg; + Tcl_GetChannelError(chan, &msg); + if (msg) { + Tcl_SetObjResult (interp, msg); + } else { + Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(chan), + "\" wasn't opened for ", + ((writing) ? "writing" : "reading"), NULL); + } return NULL; } *releasePtr = 1; diff --git a/generic/tclVar.c b/generic/tclVar.c index eb7cf53..c733dce 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.179 2009/07/16 21:24:40 dgp Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.180 2009/07/23 22:49:15 andreas_kupries Exp $ */ #include "tclInt.h" @@ -67,10 +67,19 @@ VarHashCreateVar( #define VarHashFindVar(tablePtr, key) \ VarHashCreateVar((tablePtr), (key), NULL) - +#ifdef _AIX +/* Work around AIX cc problem causing crash in TclDeleteVars. Possible + * optimizer bug. Do _NOT_ inline this function, this re-activates the + * problem. + */ +static void +VarHashInvalidateEntry(Var* varPtr) { + varPtr->flags |= VAR_DEAD_HASH; +} +#else #define VarHashInvalidateEntry(varPtr) \ ((varPtr)->flags |= VAR_DEAD_HASH) - +#endif #define VarHashDeleteEntry(varPtr) \ Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry)) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 17fb4ac..96a1a83 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.29 2008/10/22 20:24:00 nijtmans Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.30 2009/07/23 22:49:15 andreas_kupries Exp $ package require Tcl 8.4 @@ -208,6 +208,9 @@ proc genStubs::rewriteFile {file text} { set in [open ${file} r] set out [open ${file}.new w] + # Hardwire the genstubs output to Unix eol. + fconfigure $out -translation lf + while {![eof $in]} { set line [gets $in] if {[string match "*!BEGIN!*" $line]} { diff --git a/unix/Makefile.in b/unix/Makefile.in index d210013..2e1dcc6 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.272 2009/07/18 08:16:06 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.273 2009/07/23 22:49:15 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -912,8 +912,8 @@ install-private-headers: libraries $(INSTALL_DATA) tclConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ fi; -Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in - $(SHELL) config.status +#Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in +# $(SHELL) config.status #tclConfig.h: $(UNIX_DIR)/tclConfig.h.in # $(SHELL) config.status diff --git a/unix/configure b/unix/configure index 6b4b375..f490ca6 100755 --- a/unix/configure +++ b/unix/configure @@ -7174,6 +7174,12 @@ fi fi + + # 64bit not requested or not, may still be a 64bit platform. + if test "`uname -m`" = ia64 ; then + SHLIB_LD_LIBS="-L/lib/hpux64 ${SHLIB_LD_LIBS}" +fi + ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 479ea08..28050dd 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1312,7 +1312,13 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS="$CFLAGS +DD64" LDFLAGS_ARCH="+DD64" ]) - ]) ;; + ]) + + # 64bit not requested or not, may still be a 64bit platform. + AS_IF([test "`uname -m`" = ia64], [ + SHLIB_LD_LIBS="-L/lib/hpux64 ${SHLIB_LD_LIBS}" + ]) + ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) diff --git a/win/Makefile.in b/win/Makefile.in index 21c9990..6983879 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.156 2009/05/29 16:28:40 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.157 2009/07/23 22:49:16 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -779,8 +779,8 @@ gdb: binaries depend: -Makefile: $(SRC_DIR)/Makefile.in - ./config.status +#Makefile: $(SRC_DIR)/Makefile.in +# ./config.status cleanhelp: $(RM) *.hlp *.cnt *.GID *.rtf man2tcl.exe -- cgit v0.12 From 2bab3ed49e96d767dafcf287960de0598225dfa1 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 23 Jul 2009 23:01:59 +0000 Subject: Revert series of local changes not relevant to the last commit. --- generic/tclVar.c | 15 +++------------ tools/genStubs.tcl | 5 +---- unix/Makefile.in | 6 +++--- unix/configure | 5 ----- unix/tcl.m4 | 8 +------- win/Makefile.in | 6 +++--- 6 files changed, 11 insertions(+), 34 deletions(-) diff --git a/generic/tclVar.c b/generic/tclVar.c index c733dce..52eaf9f 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.180 2009/07/23 22:49:15 andreas_kupries Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.181 2009/07/23 23:01:59 andreas_kupries Exp $ */ #include "tclInt.h" @@ -67,19 +67,10 @@ VarHashCreateVar( #define VarHashFindVar(tablePtr, key) \ VarHashCreateVar((tablePtr), (key), NULL) -#ifdef _AIX -/* Work around AIX cc problem causing crash in TclDeleteVars. Possible - * optimizer bug. Do _NOT_ inline this function, this re-activates the - * problem. - */ -static void -VarHashInvalidateEntry(Var* varPtr) { - varPtr->flags |= VAR_DEAD_HASH; -} -#else + #define VarHashInvalidateEntry(varPtr) \ ((varPtr)->flags |= VAR_DEAD_HASH) -#endif + #define VarHashDeleteEntry(varPtr) \ Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry)) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 96a1a83..03f7ba5 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.30 2009/07/23 22:49:15 andreas_kupries Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.31 2009/07/23 23:02:00 andreas_kupries Exp $ package require Tcl 8.4 @@ -208,9 +208,6 @@ proc genStubs::rewriteFile {file text} { set in [open ${file} r] set out [open ${file}.new w] - # Hardwire the genstubs output to Unix eol. - fconfigure $out -translation lf - while {![eof $in]} { set line [gets $in] if {[string match "*!BEGIN!*" $line]} { diff --git a/unix/Makefile.in b/unix/Makefile.in index 2e1dcc6..8d56305 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.273 2009/07/23 22:49:15 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.274 2009/07/23 23:02:00 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -912,8 +912,8 @@ install-private-headers: libraries $(INSTALL_DATA) tclConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ fi; -#Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in -# $(SHELL) config.status +Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in + $(SHELL) config.status #tclConfig.h: $(UNIX_DIR)/tclConfig.h.in # $(SHELL) config.status diff --git a/unix/configure b/unix/configure index f490ca6..a926936 100755 --- a/unix/configure +++ b/unix/configure @@ -7175,11 +7175,6 @@ fi fi - # 64bit not requested or not, may still be a 64bit platform. - if test "`uname -m`" = ia64 ; then - SHLIB_LD_LIBS="-L/lib/hpux64 ${SHLIB_LD_LIBS}" -fi - ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 28050dd..479ea08 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1312,13 +1312,7 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS="$CFLAGS +DD64" LDFLAGS_ARCH="+DD64" ]) - ]) - - # 64bit not requested or not, may still be a 64bit platform. - AS_IF([test "`uname -m`" = ia64], [ - SHLIB_LD_LIBS="-L/lib/hpux64 ${SHLIB_LD_LIBS}" - ]) - ;; + ]) ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) diff --git a/win/Makefile.in b/win/Makefile.in index 6983879..f83000e 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.157 2009/07/23 22:49:16 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.158 2009/07/23 23:02:00 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -779,8 +779,8 @@ gdb: binaries depend: -#Makefile: $(SRC_DIR)/Makefile.in -# ./config.status +Makefile: $(SRC_DIR)/Makefile.in + ./config.status cleanhelp: $(RM) *.hlp *.cnt *.GID *.rtf man2tcl.exe -- cgit v0.12 From 8569a517d4490cb136c99a73fb036eef3d05bd25 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 24 Jul 2009 08:23:00 +0000 Subject: Made it clearer what most people want instead of [self class]. --- ChangeLog | 28 ++++++++++++++++------------ doc/self.n | 11 ++++++++++- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e81578a..12ff42e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,20 @@ +2009-07-24 Donal K. Fellows + + * doc/self.n (self class): [Bug 2704302]: Add some text to make it + clearer how to get the name of the current object's class. + 2009-07-23 Andreas Kupries - * generic/tclIO.c (Tcl_GetChannelHandle): Do not crash for - * generic/tclPipe.c (FileForRedirect): getHandleProc == NULL, this - is allowed. Provide a nice error message in the bypass - area. Updated caller to check the bypass for a mesage. This fixes - the bug [Bug 2826248] reported by Andy Sonnenburg - + * generic/tclIO.c (Tcl_GetChannelHandle): [Bug 2826248]: Do not crash + * generic/tclPipe.c (FileForRedirect): for getHandleProc == NULL, this + is allowed. Provide a nice error message in the bypass area. Updated + caller to check the bypass for a mesage. Bug reported by Andy + Sonnenburg 2009-07-23 Joe Mistachkin - * generic/tclNotify.c: Fix for [Bug 2820349]. + * generic/tclNotify.c: [Bug 2820349]: Ensure that queued events are + freed once processed. 2009-07-22 Jan Nijtmans @@ -17,17 +22,16 @@ * generic/tclGetDate.y: * generic/tclDate.c: * generic/tclLiteral.c: (char *) cast in ckfree call - * generic/tclPanic.c: Feature Request 2814786: remove TclpPanic + * generic/tclPanic.c: [Feature Request 2814786]: remove TclpPanic * generic/tclInt.h * unix/tclUnixPort.h * win/tclWinPort.h 2009-07-22 Alexandre Ferrieux - * generic/tclEvent.c: Refined the 20090617 patch on [exit] - streamlining, so that it now correctly calls thread exit handlers - for the calling thread, which includes bindings in Tk - [Bug 2001201 again]. + * generic/tclEvent.c: [Bug 2001201 again]: Refined the 20090617 patch + on [exit] streamlining, so that it now correctly calls thread exit + handlers for the calling thread, including bindings in Tk. 2009-07-21 Kevin B. Kenny diff --git a/doc/self.n b/doc/self.n index a82be96..a616d30 100644 --- a/doc/self.n +++ b/doc/self.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: self.n,v 1.3 2009/03/24 10:46:04 dkf Exp $ +'\" RCS: @(#) $Id: self.n,v 1.4 2009/07/24 08:23:00 dkf Exp $ '\" .so man.macros .TH self n 0.1 TclOO "TclOO Commands" @@ -43,6 +43,15 @@ This returns the name of the class that the current method was defined within. Note that this will change as the chain of method implementations is traversed with \fBnext\fR, and that if the method was defined on an object then this will fail. +.RS +.PP +If you want the class of the current object, you need to use this other +construct: +.PP +.CS +info object class [\fBself object\fR] +.CE +.RE .TP \fBself filter\fR . -- cgit v0.12 From 2e48744c8edfe050bbe2ac99b4fac911eb2aa1fa Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 24 Jul 2009 09:27:17 +0000 Subject: Removed mention of auto_mkindex_old from indexed locations; we really don't want people finding out about it and using it if they're not already doing so... --- doc/library.n | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/library.n b/doc/library.n index 572c0eb..7fcd574 100644 --- a/doc/library.n +++ b/doc/library.n @@ -5,19 +5,18 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: library.n,v 1.25 2008/11/26 19:19:16 kennykb Exp $ +'\" RCS: @(#) $Id: library.n,v 1.26 2009/07/24 09:27:17 dkf Exp $ .so man.macros .TH library n "8.0" Tcl "Tcl Built-In Commands" .BS .SH NAME -auto_execok, auto_import, auto_load, auto_mkindex, auto_mkindex_old, auto_qualify, auto_reset, tcl_findLibrary, parray, tcl_endOfWord, tcl_startOfNextWord, tcl_startOfPreviousWord, tcl_wordBreakAfter, tcl_wordBreakBefore \- standard library of Tcl procedures +auto_execok, auto_import, auto_load, auto_mkindex, auto_qualify, auto_reset, tcl_findLibrary, parray, tcl_endOfWord, tcl_startOfNextWord, tcl_startOfPreviousWord, tcl_wordBreakAfter, tcl_wordBreakBefore \- standard library of Tcl procedures .SH SYNOPSIS .nf \fBauto_execok \fIcmd\fR \fBauto_import \fIpattern\fR \fBauto_load \fIcmd\fR \fBauto_mkindex \fIdir pattern pattern ...\fR -\fBauto_mkindex_old \fIdir pattern pattern ...\fR \fBauto_qualify \fIcommand namespace\fR \fBauto_reset\fR \fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR @@ -132,18 +131,21 @@ auto_mkindex_parser package to register other commands that can contribute to the auto_load index. You will have to read through auto.tcl to see how this works. .PP -\fBAuto_mkindex_old\fR parses the Tcl scripts in a relatively -unsophisticated way: if any line contains the word \fBproc\fR +\fBAuto_mkindex_old\fR +(which has the same syntax as \fBauto_mkindex\fR) +parses the Tcl scripts in a relatively +unsophisticated way: if any line contains the word +.QW \fBproc\fR as its first characters then it is assumed to be a procedure definition and the next word of the line is taken as the procedure's name. -Procedure definitions that do not appear in this way (e.g. they +Procedure definitions that do not appear in this way (e.g.\ they have spaces before the \fBproc\fR) will not be indexed. If your script contains .QW dangerous code, such as global initialization code or procedure names with special characters like \fB$\fR, -\fB*\fR, \fB[\fR or \fB]\fR, you are safer using auto_mkindex_old. +\fB*\fR, \fB[\fR or \fB]\fR, you are safer using \fBauto_mkindex_old\fR. .RE .TP \fBauto_reset\fR -- cgit v0.12 From 710802429c69bb7c6e322c2fc6f2fa2298381a64 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 24 Jul 2009 10:53:47 +0000 Subject: Clarify code by using [try] instead of [catch] in a few places --- library/clock.tcl | 983 +++++++++++++++++++++++------------------------------- 1 file changed, 426 insertions(+), 557 deletions(-) diff --git a/library/clock.tcl b/library/clock.tcl index e76fb13..36e3a4e 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -2,9 +2,9 @@ # # clock.tcl -- # -# This file implements the portions of the [clock] ensemble that -# are coded in Tcl. Refer to the users' manual to see the description -# of the [clock] command and its subcommands. +# This file implements the portions of the [clock] ensemble that are +# coded in Tcl. Refer to the users' manual to see the description of +# the [clock] command and its subcommands. # # #---------------------------------------------------------------------- @@ -13,12 +13,12 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.53 2009/06/09 13:52:38 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.54 2009/07/24 10:53:47 dkf Exp $ # #---------------------------------------------------------------------- -# We must have message catalogs that support the root locale, and -# we need access to the Registry on Windows systems. +# We must have message catalogs that support the root locale, and we need +# access to the Registry on Windows systems. uplevel \#0 { package require msgcat 1.4 @@ -29,9 +29,8 @@ uplevel \#0 { } } -# Put the library directory into the namespace for the ensemble -# so that the library code can find message catalogs and time zone -# definition files. +# Put the library directory into the namespace for the ensemble so that the +# library code can find message catalogs and time zone definition files. namespace eval ::tcl::clock \ [list variable LibDir [file dirname [info script]]] @@ -42,8 +41,8 @@ namespace eval ::tcl::clock \ # # Manipulate times. # -# The 'clock' command manipulates time. Refer to the user documentation -# for the available subcommands and what they do. +# The 'clock' command manipulates time. Refer to the user documentation for +# the available subcommands and what they do. # #---------------------------------------------------------------------- @@ -78,11 +77,11 @@ namespace eval ::tcl::clock { # Side effects: # Namespace variable in the 'clock' subsystem are initialized. # -# The '::tcl::clock::Initialize' procedure initializes the namespace -# variables and root locale message catalog for the 'clock' subsystem. -# It is broken into a procedure rather than simply evaluated as a script -# so that it will be able to use local variables, avoiding the dangers -# of 'creative writing' as in Bug 1185933. +# The '::tcl::clock::Initialize' procedure initializes the namespace variables +# and root locale message catalog for the 'clock' subsystem. It is broken +# into a procedure rather than simply evaluated as a script so that it will be +# able to use local variables, avoiding the dangers of 'creative writing' as +# in Bug 1185933. # #---------------------------------------------------------------------- @@ -174,8 +173,8 @@ proc ::tcl::clock::Initialize {} { ::msgcat::mcset fr GREGORIAN_CHANGE_DATE 2299227 - # For Belgium, we follow Southern Netherlands; Liege Diocese - # changed several weeks later. + # For Belgium, we follow Southern Netherlands; Liege Diocese changed + # several weeks later. ::msgcat::mcset fr_BE GREGORIAN_CHANGE_DATE 2299238 ::msgcat::mcset nl_BE GREGORIAN_CHANGE_DATE 2299238 @@ -196,8 +195,8 @@ proc ::tcl::clock::Initialize {} { ::msgcat::mcset no GREGORIAN_CHANGE_DATE 2342032 ::msgcat::mcset da GREGORIAN_CHANGE_DATE 2342032 - # Holland (Brabant, Gelderland, Flanders, Friesland, etc. changed - # at various times) + # Holland (Brabant, Gelderland, Flanders, Friesland, etc. changed at + # various times) ::msgcat::mcset nl GREGORIAN_CHANGE_DATE 2342165 @@ -219,8 +218,8 @@ proc ::tcl::clock::Initialize {} { ::msgcat::mcset ru GREGORIAN_CHANGE_DATE 2421639 - # Romania (Transylvania changed earler - perhaps de_RO should show - # the earlier date?) + # Romania (Transylvania changed earler - perhaps de_RO should show the + # earlier date?) ::msgcat::mcset ro GREGORIAN_CHANGE_DATE 2422063 @@ -234,8 +233,8 @@ proc ::tcl::clock::Initialize {} { # #------------------------------------------------------------------ - # Paths at which binary time zone data for the Olson libraries - # are known to reside on various operating systems + # Paths at which binary time zone data for the Olson libraries are known + # to reside on various operating systems variable ZoneinfoPaths {} foreach path { @@ -284,10 +283,10 @@ proc ::tcl::clock::Initialize {} { variable FEB_28 58 - # Translation table to map Windows TZI onto cities, so that - # the Olson rules can apply. In some cases the mapping is ambiguous, - # so it's wise to specify $::env(TCL_TZ) rather than simply depending - # on the system time zone. + # Translation table to map Windows TZI onto cities, so that the Olson + # rules can apply. In some cases the mapping is ambiguous, so it's wise + # to specify $::env(TCL_TZ) rather than simply depending on the system + # time zone. # The keys are long lists of values obtained from the time zone # information in the Registry. In order, the list elements are: @@ -298,10 +297,10 @@ proc ::tcl::clock::Initialize {} { # DaylightDate.wYear DaylightDate.wMonth DaylightDate.wDayOfWeek # DaylightDate.wDay DaylightDate.wHour DaylightDate.wMinute # DaylightDate.wSecond DaylightDate.wMilliseconds - # The values are the names of time zones where those rules apply. - # There is considerable ambiguity in certain zones; an attempt has - # been made to make a reasonable guess, but this table needs to be - # taken with a grain of salt. + # The values are the names of time zones where those rules apply. There + # is considerable ambiguity in certain zones; an attempt has been made to + # make a reasonable guess, but this table needs to be taken with a grain + # of salt. variable WinZoneInfo [dict create {*}{ {-43200 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Kwajalein @@ -380,10 +379,10 @@ proc ::tcl::clock::Initialize {} { {46800 0 3600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} :Pacific/Tongatapu }] - # Groups of fields that specify the date, priorities, and - # code bursts that determine Julian Day Number given those groups. - # The code in [clock scan] will choose the highest priority - # (lowest numbered) set of fields that determines the date. + # Groups of fields that specify the date, priorities, and code bursts that + # determine Julian Day Number given those groups. The code in [clock + # scan] will choose the highest priority (lowest numbered) set of fields + # that determines the date. variable DateParseActions { @@ -487,8 +486,8 @@ proc ::tcl::clock::Initialize {} { } } - # Groups of fields that specify time of day, priorities, - # and code that processes them + # Groups of fields that specify time of day, priorities, and code that + # processes them variable TimeParseActions { @@ -654,16 +653,14 @@ proc ::tcl::clock::Initialize {} { # # clock format -- # -# Formats a count of seconds since the Posix Epoch as a time -# of day. +# Formats a count of seconds since the Posix Epoch as a time of day. # -# The 'clock format' command formats times of day for output. -# Refer to the user documentation to see what it does. +# The 'clock format' command formats times of day for output. Refer to the +# user documentation to see what it does. # #---------------------------------------------------------------------- proc ::tcl::clock::format { args } { - variable FormatProc variable TZData @@ -683,9 +680,9 @@ proc ::tcl::clock::format { args } { } } - # Build a procedure to format the result. Cache the built procedure's - # name in the 'FormatProc' array to avoid losing its internal - # representation, which contains the name resolution. + # Build a procedure to format the result. Cache the built procedure's name + # in the 'FormatProc' array to avoid losing its internal representation, + # which contains the name resolution. set procName formatproc'$format'$locale set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName] @@ -697,7 +694,6 @@ proc ::tcl::clock::format { args } { } return [$procName $clockval $timezone] - } #---------------------------------------------------------------------- @@ -716,7 +712,6 @@ proc ::tcl::clock::format { args } { #---------------------------------------------------------------------- proc ::tcl::clock::ParseClockFormatFormat {procName format locale} { - if {[namespace which $procName] ne {}} { return $procName } @@ -727,34 +722,21 @@ proc ::tcl::clock::ParseClockFormatFormat {procName format locale} { # Change locale if a fresh locale has been given on the command line. - set status [catch { - - ParseClockFormatFormat2 $format $locale $procName - - } result opts] - - # Restore the locale - - if { [info exists oldLocale] } { - mclocale $oldLocale - } - - # Return either the error or the proc name + try { + return [ParseClockFormatFormat2 $format $locale $procName] + } trap clock {result opts} { + dict unset opts -errorinfo + return -options $opts $result + } finally { + # Restore the locale - if { $status == 1 } { - if { [lindex [dict get $opts -errorcode] 0] eq {clock} } { - return -code error $result - } else { - return -options $opts $result + if { [info exists oldLocale] } { + mclocale $oldLocale } - } else { - return $result } - } proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { - set didLocaleEra 0 set didLocaleNumerals 0 set preFormatCode \ @@ -1193,16 +1175,14 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { # # clock scan -- # -# Inputs a count of seconds since the Posix Epoch as a time -# of day. +# Inputs a count of seconds since the Posix Epoch as a time of day. # -# The 'clock format' command scans times of day on input. -# Refer to the user documentation to see what it does. +# The 'clock format' command scans times of day on input. Refer to the user +# documentation to see what it does. # #---------------------------------------------------------------------- proc ::tcl::clock::scan { args } { - set format {} # Check the count of args @@ -1264,21 +1244,17 @@ proc ::tcl::clock::scan { args } { "cannot use -gmt and -timezone in same call" } if { [catch { expr { wide($base) } } result] } { - return -code error \ - "expected integer but got \"$base\"" + return -code error "expected integer but got \"$base\"" } - if { ![string is boolean $gmt] } { - return -code error \ - "expected boolean value but got \"$gmt\"" - } else { - if { $gmt } { - set timezone :GMT - } + if { ![string is boolean -strict $gmt] } { + return -code error "expected boolean value but got \"$gmt\"" + } elseif { $gmt } { + set timezone :GMT } if { ![info exists saw(-format)] } { - # Perhaps someday we'll localize the legacy code. Right now, - # it's not localized. + # Perhaps someday we'll localize the legacy code. Right now, it's not + # localized. if { [info exists saw(-locale)] } { return -code error \ -errorcode [list CLOCK flagWithLegacyFormat] \ @@ -1292,31 +1268,23 @@ proc ::tcl::clock::scan { args } { EnterLocale $locale oldLocale - set status [catch { - + try { # Map away the locale-dependent composite format groups set scanner [ParseClockScanFormat $format $locale] - $scanner $string $base $timezone - - } result opts] + return [$scanner $string $base $timezone] + } trap CLOCK {result opts} { + # Conceal location of generation of expected errors - # Restore the locale - - if { [info exists oldLocale] } { - mclocale $oldLocale - } + dict unset opts -errorinfo + return -options $opts $result + } finally { + # Restore the locale - if { $status == 1 } { - if { [lindex [dict get $opts -errorcode] 0] eq {clock} } { - return -code error $result - } else { - return -options $opts $result + if { [info exists oldLocale] } { + mclocale $oldLocale } - } else { - return $result } - } #---------------------------------------------------------------------- @@ -1332,52 +1300,50 @@ proc ::tcl::clock::scan { args } { # locale - (Unused) Name of the locale where the time will be scanned. # # Results: -# Returns the date and time extracted from the string in seconds -# from the epoch +# Returns the date and time extracted from the string in seconds from +# the epoch # #---------------------------------------------------------------------- proc ::tcl::clock::FreeScan { string base timezone locale } { - variable TZData # Get the data for time changes in the given zone - if {[catch {SetupTimeZone $timezone} retval opts]} { + try { + SetupTimeZone $timezone + } on error {retval opts} { dict unset opts -errorinfo return -options $opts $retval } - # Extract year, month and day from the base time for the - # parser to use as defaults - - set date [GetDateFields \ - $base \ - $TZData($timezone) \ - 2361222] - dict set date secondOfDay [expr { [dict get $date localSeconds] - % 86400 }] - - # Parse the date. The parser will return a list comprising - # date, time, time zone, relative month/day/seconds, relative - # weekday, ordinal month. - - set status [catch { - Oldscan $string \ - [dict get $date year] \ - [dict get $date month] \ - [dict get $date dayOfMonth] - } result] - if { $status != 0 } { - return -code error "unable to convert date-time string \"$string\": $result" - } + # Extract year, month and day from the base time for the parser to use as + # defaults - lassign $result parseDate parseTime parseZone parseRel \ - parseWeekday parseOrdinalMonth + set date [GetDateFields $base $TZData($timezone) 2361222] + dict set date secondOfDay [expr { + [dict get $date localSeconds] % 86400 + }] - # If the caller supplied a date in the string, update the 'date' dict - # with the value. If the caller didn't specify a time with the date, - # default to midnight. + # Parse the date. The parser will return a list comprising date, time, + # time zone, relative month/day/seconds, relative weekday, ordinal month. + + try { + set scanned [Oldscan $string \ + [dict get $date year] \ + [dict get $date month] \ + [dict get $date dayOfMonth]] + lassign $scanned \ + parseDate parseTime parseZone parseRel \ + parseWeekday parseOrdinalMonth + } on error message { + return -code error \ + "unable to convert date-time string \"$string\": $message" + } + + # If the caller supplied a date in the string, update the 'date' dict with + # the value. If the caller didn't specify a time with the date, default to + # midnight. if { [llength $parseDate] > 0 } { lassign $parseDate y m d @@ -1397,11 +1363,11 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { } } - # If the caller supplied a time zone in the string, it comes back - # as a two-element list; the first element is the number of minutes - # east of Greenwich, and the second is a Daylight Saving Time - # indicator ( 1 == yes, 0 == no, -1 == unknown ). We make it into - # a time zone indicator of +-hhmm. + # If the caller supplied a time zone in the string, it comes back as a + # two-element list; the first element is the number of minutes east of + # Greenwich, and the second is a Daylight Saving Time indicator (1 == yes, + # 0 == no, -1 == unknown). We make it into a time zone indicator of + # +-hhmm. if { [llength $parseZone] > 0 } { lassign $parseZone minEast dstFlag @@ -1424,10 +1390,11 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { dict set date secondOfDay 0 } - dict set date localSeconds \ - [expr { -210866803200 - + ( 86400 * wide([dict get $date julianDay]) ) - + [dict get $date secondOfDay] }] + dict set date localSeconds [expr { + -210866803200 + + ( 86400 * wide([dict get $date julianDay]) ) + + [dict get $date secondOfDay] + }] dict set date tzName $timezone set date [ConvertLocalToUTC $date[set date {}] $TZData($timezone) 2361222] set seconds [dict get $date seconds] @@ -1444,13 +1411,12 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { # Do relative weekday if { [llength $parseWeekday] > 0 } { - lassign $parseWeekday dayOrdinal dayOfWeek set date2 [GetDateFields $seconds $TZData($timezone) 2361222] dict set date2 era CE - set jdwkday [WeekdayOnOrBefore $dayOfWeek \ - [expr { [dict get $date2 julianDay] - + 6 }]] + set jdwkday [WeekdayOnOrBefore $dayOfWeek [expr { + [dict get $date2 julianDay] + 6 + }]] incr jdwkday [expr { 7 * $dayOrdinal }] if { $dayOrdinal > 0 } { incr jdwkday -7 @@ -1458,21 +1424,20 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { dict set date2 secondOfDay \ [expr { [dict get $date2 localSeconds] % 86400 }] dict set date2 julianDay $jdwkday - dict set date2 localSeconds \ - [expr { -210866803200 - + ( 86400 * wide([dict get $date2 julianDay]) ) - + [dict get $date secondOfDay] }] + dict set date2 localSeconds [expr { + -210866803200 + + ( 86400 * wide([dict get $date2 julianDay]) ) + + [dict get $date secondOfDay] + }] dict set date2 tzName $timezone set date2 [ConvertLocalToUTC $date2[set date2 {}] $TZData($timezone) \ 2361222] set seconds [dict get $date2 seconds] - } # Do relative month if { [llength $parseOrdinalMonth] > 0 } { - lassign $parseOrdinalMonth monthOrdinal monthNumber if { $monthOrdinal > 0 } { set monthDiff [expr { $monthNumber - [dict get $date month] }] @@ -1489,7 +1454,6 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { } set seconds [add $seconds $monthOrdinal years $monthDiff months \ -timezone $timezone -locale $locale] - } return $seconds @@ -1507,30 +1471,27 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { # locale - The current locale # # Results: -# Constructs and returns a procedure that accepts the -# string being scanned, the base time, and the time zone. -# The procedure will either return the scanned time or -# else throw an error that should be rethrown to the caller -# of [clock scan] +# Constructs and returns a procedure that accepts the string being +# scanned, the base time, and the time zone. The procedure will either +# return the scanned time or else throw an error that should be rethrown +# to the caller of [clock scan] # # Side effects: -# The given procedure is defined in the ::tcl::clock -# namespace. Scan procedures are not deleted once installed. -# -# Why do we parse dates by defining a procedure to parse them? -# The reason is that by doing so, we have one convenient place to -# cache all the information: the regular expressions that match the -# patterns (which will be compiled), the code that assembles the -# date information, everything lands in one place. In this way, -# when a given format is reused at run time, all the information +# The given procedure is defined in the ::tcl::clock namespace. Scan +# procedures are not deleted once installed. +# +# Why do we parse dates by defining a procedure to parse them? The reason is +# that by doing so, we have one convenient place to cache all the information: +# the regular expressions that match the patterns (which will be compiled), +# the code that assembles the date information, everything lands in one place. +# In this way, when a given format is reused at run time, all the information # of how to apply it is available in a single place. # #---------------------------------------------------------------------- proc ::tcl::clock::ParseClockScanFormat {formatString locale} { - - # Check whether the format has been parsed previously, and return - # the existing recognizer if it has. + # Check whether the format has been parsed previously, and return the + # existing recognizer if it has. set procName scanproc'$formatString'$locale set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName] @@ -1574,8 +1535,8 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { append re {[[:space:]]+} } else { if { ! [string is alnum $c] } { - append re \\ - } + append re "\\" + } append re $c } } @@ -1692,7 +1653,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { "::scan \$field" [incr captureCount] " %ld" \ "\]\n" } - m - N { # Month number + m - N { # Month number append re \\s*(\\d\\d?) dict set fieldSet month [incr fieldCount] append postcode "dict set date month \[" \ @@ -1735,10 +1696,9 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { \] \n } s { # Seconds from Posix Epoch - # This next case is insanely difficult, - # because it's problematic to determine - # whether the field is actually within - # the range of a wide integer. + # This next case is insanely difficult, because it's + # problematic to determine whether the field is + # actually within the range of a wide integer. append re {\s*([-+]?\d+)} dict set fieldSet seconds [incr fieldCount] append postcode {dict set date seconds } \[ \ @@ -1771,10 +1731,9 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { dict set date dayOfWeek $dow } } - U { # Week of year. The - # first Sunday of the year is the - # first day of week 01. No scan rule - # uses this group. + U { # Week of year. The first Sunday of + # the year is the first day of week + # 01. No scan rule uses this group. append re \\s*\\d\\d? } V { # Week of ISO8601 year @@ -2013,15 +1972,16 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { return -code error -errorcode [list CLOCK dateTooLarge] \ "requested date too large to represent" } - dict set date localSeconds \ - [expr { -210866803200 - + ( 86400 * wide([dict get $date julianDay]) ) - + [dict get $date secondOfDay] }] + dict set date localSeconds [expr { + -210866803200 + + ( 86400 * wide([dict get $date julianDay]) ) + + [dict get $date secondOfDay] + }] } } if { ![dict exists $fieldSet seconds] - && ![dict exists $fieldSet starDate] } { + && ![dict exists $fieldSet starDate] } { if { [dict exists $fieldSet tzName] } { append procBody { set timeZone [dict get $date tzName] @@ -2030,8 +1990,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { append procBody { ::tcl::clock::SetupTimeZone $timeZone set date [::tcl::clock::ConvertLocalToUTC $date[set date {}] \ - $TZData($timeZone) \ - $changeover] + $TZData($timeZone) $changeover] } } @@ -2050,15 +2009,14 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { # # LocaleNumeralMatcher -- # -# Composes a regexp that captures the numerals in the given -# locale, and a dictionary to map them to conventional numerals. +# Composes a regexp that captures the numerals in the given locale, and +# a dictionary to map them to conventional numerals. # # Parameters: # locale - Name of the current locale # # Results: -# Returns a two-element list comprising the regexp and the -# dictionary. +# Returns a two-element list comprising the regexp and the dictionary. # # Side effects: # Caches the result. @@ -2066,7 +2024,6 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { #---------------------------------------------------------------------- proc ::tcl::clock::LocaleNumeralMatcher {l} { - variable LocaleNumeralCache if { ![dict exists $LocaleNumeralCache $l] } { @@ -2092,9 +2049,9 @@ proc ::tcl::clock::LocaleNumeralMatcher {l} { # # UniquePrefixRegexp -- # -# Composes a regexp that performs unique-prefix matching. The -# RE matches one of a supplied set of strings, or any unique -# prefix thereof. +# Composes a regexp that performs unique-prefix matching. The RE +# matches one of a supplied set of strings, or any unique prefix +# thereof. # # Parameters: # data - List of alternating match-strings and values. @@ -2102,10 +2059,10 @@ proc ::tcl::clock::LocaleNumeralMatcher {l} { # distinct. # # Results: -# Returns a two-element list. The first is a regexp that -# matches any unique prefix of any of the strings. The second -# is a dictionary whose keys are match values from the regexp -# and whose values are the corresponding values from 'data'. +# Returns a two-element list. The first is a regexp that matches any +# unique prefix of any of the strings. The second is a dictionary whose +# keys are match values from the regexp and whose values are the +# corresponding values from 'data'. # # Side effects: # None. @@ -2113,11 +2070,10 @@ proc ::tcl::clock::LocaleNumeralMatcher {l} { #---------------------------------------------------------------------- proc ::tcl::clock::UniquePrefixRegexp { data } { - - # The 'successors' dictionary will contain, for each string that - # is a prefix of any key, all characters that may follow that - # prefix. The 'prefixMapping' dictionary will have keys that - # are prefixes of keys and values that correspond to the keys. + # The 'successors' dictionary will contain, for each string that is a + # prefix of any key, all characters that may follow that prefix. The + # 'prefixMapping' dictionary will have keys that are prefixes of keys and + # values that correspond to the keys. set prefixMapping [dict create] set successors [dict create {} {}] @@ -2125,7 +2081,6 @@ proc ::tcl::clock::UniquePrefixRegexp { data } { # Walk the key-value pairs foreach { key value } $data { - # Construct all prefixes of the key; set prefix {} @@ -2144,8 +2099,8 @@ proc ::tcl::clock::UniquePrefixRegexp { data } { } } - # Identify those prefixes that designate unique values, and - # those that are the full keys + # Identify those prefixes that designate unique values, and those that are + # the full keys set uniquePrefixMapping {} dict for { key valueList } $prefixMapping { @@ -2168,8 +2123,8 @@ proc ::tcl::clock::UniquePrefixRegexp { data } { # # MakeUniquePrefixRegexp -- # -# Service procedure for 'UniquePrefixRegexp' that constructs -# a regular expresison that matches the unique prefixes. +# Service procedure for 'UniquePrefixRegexp' that constructs a regular +# expresison that matches the unique prefixes. # # Parameters: # successors - Dictionary whose keys are all prefixes @@ -2181,8 +2136,8 @@ proc ::tcl::clock::UniquePrefixRegexp { data } { # prefixString - Current prefix being processed. # # Results: -# Returns a constructed regular expression that matches the set -# of unique prefixes beginning with the 'prefixString'. +# Returns a constructed regular expression that matches the set of +# unique prefixes beginning with the 'prefixString'. # # Side effects: # None. @@ -2192,7 +2147,6 @@ proc ::tcl::clock::UniquePrefixRegexp { data } { proc ::tcl::clock::MakeUniquePrefixRegexp { successors uniquePrefixMapping prefixString } { - # Get the characters that may follow the current prefix string set schars [lsort -ascii [dict keys [dict get $successors $prefixString]]] @@ -2200,13 +2154,15 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors return {} } - # If there is more than one successor character, or if the current - # prefix is a unique prefix, surround the generated re with non-capturing + # If there is more than one successor character, or if the current prefix + # is a unique prefix, surround the generated re with non-capturing # parentheses. set re {} - if { [dict exists $uniquePrefixMapping $prefixString] - || [llength $schars] > 1 } { + if { + [dict exists $uniquePrefixMapping $prefixString] + || [llength $schars] > 1 + } then { append re "(?:" } @@ -2228,7 +2184,7 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors if { [dict exists $uniquePrefixMapping $prefixString] } { append re ")?" - } elseif { [llength $schars] > 1 } { + } elseif { [llength $schars] > 1 } { append re ")" } @@ -2239,8 +2195,8 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors # # MakeParseCodeFromFields -- # -# Composes Tcl code to extract the Julian Day Number from a -# dictionary containing date fields. +# Composes Tcl code to extract the Julian Day Number from a dictionary +# containing date fields. # # Parameters: # dateFields -- Dictionary whose keys are fields of the date, @@ -2251,8 +2207,8 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors # the list must be in ascending order by priority # # Results: -# Returns a burst of code that extracts the day number from the -# given date. +# Returns a burst of code that extracts the day number from the given +# date. # # Side effects: # None. @@ -2260,7 +2216,6 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors #---------------------------------------------------------------------- proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { - set currPrio 999 set currFieldPos [list] set currCodeBurst { @@ -2268,16 +2223,15 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { } foreach { fieldSet prio parseAction } $parseActions { - - # If we've found an answer that's better than any that follow, - # quit now. + # If we've found an answer that's better than any that follow, quit + # now. if { $prio > $currPrio } { break } - # Accumulate the field positions that are used in the current - # field grouping. + # Accumulate the field positions that are used in the current field + # grouping. set fieldPos [list] set ok true @@ -2300,9 +2254,11 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { if { $prio == $currPrio } { foreach currPos $currFieldPos newPos $fPos { - if { ![string is integer $newPos] - || ![string is integer $currPos] - || $newPos > $currPos } { + if { + ![string is integer $newPos] + || ![string is integer $currPos] + || $newPos > $currPos + } then { break } if { $newPos < $currPos } { @@ -2320,11 +2276,9 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { set currPrio $prio set currFieldPos $fPos set currCodeBurst $parseAction - } return $currCodeBurst - } #---------------------------------------------------------------------- @@ -2342,14 +2296,13 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { # Returns the locale that was previously current. # # Side effects: -# Does [mclocale]. If necessary, uses [mcload] to load the -# designated locale's files, and tracks that it has done so -# in the 'McLoaded' variable. +# Does [mclocale]. If necessary, uses [mcload] to load the designated +# locale's files, and tracks that it has done so in the 'McLoaded' +# variable. # #---------------------------------------------------------------------- proc ::tcl::clock::EnterLocale { locale oldLocaleVar } { - upvar 1 $oldLocaleVar oldLocale variable MsgDir @@ -2357,27 +2310,24 @@ proc ::tcl::clock::EnterLocale { locale oldLocaleVar } { set oldLocale [mclocale] if { $locale eq {system} } { - if { $::tcl_platform(platform) ne {windows} } { - - # On a non-windows platform, the 'system' locale is - # the same as the 'current' locale + # On a non-windows platform, the 'system' locale is the same as + # the 'current' locale set locale current } else { - - # On a windows platform, the 'system' locale is - # adapted from the 'current' locale by applying the - # date and time formats from the Control Panel. - # First, load the 'current' locale if it's not yet loaded + # On a windows platform, the 'system' locale is adapted from the + # 'current' locale by applying the date and time formats from the + # Control Panel. First, load the 'current' locale if it's not yet + # loaded if {![dict exists $McLoaded $oldLocale] } { mcload $MsgDir dict set McLoaded $oldLocale {} } - # Make a new locale string for the system locale, and - # get the Control Panel information + # Make a new locale string for the system locale, and get the + # Control Panel information set locale ${oldLocale}_windows if { ![dict exists $McLoaded $locale] } { @@ -2398,15 +2348,14 @@ proc ::tcl::clock::EnterLocale { locale oldLocaleVar } { mcload $MsgDir dict set McLoaded $locale {} } - } #---------------------------------------------------------------------- # # LoadWindowsDateTimeFormats -- # -# Load the date/time formats from the Control Panel in Windows -# and convert them so that they're usable by Tcl. +# Load the date/time formats from the Control Panel in Windows and +# convert them so that they're usable by Tcl. # # Parameters: # locale - Name of the locale in whose message catalog @@ -2418,14 +2367,12 @@ proc ::tcl::clock::EnterLocale { locale oldLocaleVar } { # Side effects: # Updates the given message catalog with the locale strings. # -# Presumes that on entry, [mclocale] is set to the current locale, -# so that default strings can be obtained if the Registry query -# fails. +# Presumes that on entry, [mclocale] is set to the current locale, so that +# default strings can be obtained if the Registry query fails. # #---------------------------------------------------------------------- proc ::tcl::clock::LoadWindowsDateTimeFormats { locale } { - # Bail out if we can't find the Registry variable NoRegistry @@ -2527,7 +2474,6 @@ proc ::tcl::clock::LoadWindowsDateTimeFormats { locale } { } return - } #---------------------------------------------------------------------- @@ -2542,8 +2488,8 @@ proc ::tcl::clock::LoadWindowsDateTimeFormats { locale } { # format -- Format supplied to [clock scan] or [clock format] # # Results: -# Returns the string with locale-dependent composite format -# groups substituted out. +# Returns the string with locale-dependent composite format groups +# substituted out. # # Side effects: # None. @@ -2551,7 +2497,6 @@ proc ::tcl::clock::LoadWindowsDateTimeFormats { locale } { #---------------------------------------------------------------------- proc ::tcl::clock::LocalizeFormat { locale format } { - variable McLoaded if { [dict exists $McLoaded $locale FORMAT $format] } { @@ -2559,11 +2504,10 @@ proc ::tcl::clock::LocalizeFormat { locale format } { } set inFormat $format - # Handle locale-dependent format groups by mapping them out of - # the input string. Note that the order of the [string map] - # operations is significant because earlier formats can refer - # to later ones; for example %c can refer to %X, which in turn - # can refer to %T. + # Handle locale-dependent format groups by mapping them out of the input + # string. Note that the order of the [string map] operations is + # significant because earlier formats can refer to later ones; for example + # %c can refer to %X, which in turn can refer to %T. set format [string map [list %c [mc DATE_TIME_FORMAT] \ %Ec [mc LOCALE_DATE_TIME_FORMAT]] $format] @@ -2600,7 +2544,6 @@ proc ::tcl::clock::LocalizeFormat { locale format } { #---------------------------------------------------------------------- proc ::tcl::clock::FormatNumericTimeZone { z } { - if { $z < 0 } { set z [expr { - $z }] set retval - @@ -2615,7 +2558,6 @@ proc ::tcl::clock::FormatNumericTimeZone { z } { append retval [::format %02d $z] } return $retval - } #---------------------------------------------------------------------- @@ -2640,7 +2582,6 @@ proc ::tcl::clock::FormatNumericTimeZone { z } { #---------------------------------------------------------------------- proc ::tcl::clock::FormatStarDate { date } { - variable Roddenberry # Get day of year, zero based @@ -2691,7 +2632,6 @@ proc ::tcl::clock::FormatStarDate { date } { #---------------------------------------------------------------------- proc ::tcl::clock::ParseStarDate { year fractYear fractDay } { - variable Roddenberry # Build a tentative date from year and fraction. @@ -2707,8 +2647,8 @@ proc ::tcl::clock::ParseStarDate { year fractYear fractDay } { set lp [IsGregorianLeapYear $date] - # Reconvert the fractional year according to whether the given - # year is a leap year + # Reconvert the fractional year according to whether the given year is a + # leap year if { $lp } { dict set date dayOfYear \ @@ -2721,10 +2661,11 @@ proc ::tcl::clock::ParseStarDate { year fractYear fractDay } { dict unset date gregorian set date [GetJulianDayFromGregorianEraYearDay $date[set date {}]] - return [expr { 86400 * [dict get $date julianDay] - - 210866803200 - + ( 86400 / 10 ) * $fractDay }] - + return [expr { + 86400 * [dict get $date julianDay] + - 210866803200 + + ( 86400 / 10 ) * $fractDay + }] } #---------------------------------------------------------------------- @@ -2737,8 +2678,8 @@ proc ::tcl::clock::ParseStarDate { year fractYear fractDay } { # str - String containing a decimal wide integer # # Results: -# Returns the string as a pure wide integer. Throws an error if -# the string is misformatted or out of range. +# Returns the string as a pure wide integer. Throws an error if the +# string is misformatted or out of range. # #---------------------------------------------------------------------- @@ -2759,8 +2700,8 @@ proc ::tcl::clock::ScanWide { str } { # # InterpretTwoDigitYear -- # -# Given a date that contains only the year of the century, -# determines the target value of a two-digit year. +# Given a date that contains only the year of the century, determines +# the target value of a two-digit year. # # Parameters: # date - Dictionary containing fields of the date. @@ -2777,18 +2718,17 @@ proc ::tcl::clock::ScanWide { str } { # Side effects: # None. # -# The current rule for interpreting a two-digit year is that the year -# shall be between 1937 and 2037, thus staying within the range of a -# 32-bit signed value for time. This rule may change to a sliding -# window in future versions, so the 'baseTime' parameter (which is -# currently ignored) is provided in the procedure signature. +# The current rule for interpreting a two-digit year is that the year shall be +# between 1937 and 2037, thus staying within the range of a 32-bit signed +# value for time. This rule may change to a sliding window in future +# versions, so the 'baseTime' parameter (which is currently ignored) is +# provided in the procedure signature. # #---------------------------------------------------------------------- proc ::tcl::clock::InterpretTwoDigitYear { date baseTime { twoDigitField yearOfCentury } { fourDigitField year } } { - set yr [dict get $date $twoDigitField] if { $yr <= 37 } { dict set date $fourDigitField [expr { $yr + 2000 }] @@ -2796,7 +2736,6 @@ proc ::tcl::clock::InterpretTwoDigitYear { date baseTime dict set date $fourDigitField [expr { $yr + 1900 }] } return $date - } #---------------------------------------------------------------------- @@ -2822,7 +2761,6 @@ proc ::tcl::clock::InterpretTwoDigitYear { date baseTime #---------------------------------------------------------------------- proc ::tcl::clock::AssignBaseYear { date baseTime timezone changeover } { - variable TZData # Find the Julian Day Number corresponding to the base time, and @@ -2836,7 +2774,6 @@ proc ::tcl::clock::AssignBaseYear { date baseTime timezone changeover } { dict set date year [dict get $date2 year] return $date - } #---------------------------------------------------------------------- @@ -2863,7 +2800,6 @@ proc ::tcl::clock::AssignBaseYear { date baseTime timezone changeover } { #---------------------------------------------------------------------- proc ::tcl::clock::AssignBaseIso8601Year {date baseTime timeZone changeover} { - variable TZData # Find the Julian Day Number corresponding to the base time @@ -2900,7 +2836,6 @@ proc ::tcl::clock::AssignBaseIso8601Year {date baseTime timeZone changeover} { #---------------------------------------------------------------------- proc ::tcl::clock::AssignBaseMonth {date baseTime timezone changeover} { - variable TZData # Find the year and month corresponding to the base time @@ -2910,7 +2845,6 @@ proc ::tcl::clock::AssignBaseMonth {date baseTime timezone changeover} { dict set date year [dict get $date2 year] dict set date month [dict get $date2 month] return $date - } #---------------------------------------------------------------------- @@ -2936,7 +2870,6 @@ proc ::tcl::clock::AssignBaseMonth {date baseTime timezone changeover} { #---------------------------------------------------------------------- proc ::tcl::clock::AssignBaseWeek {date baseTime timeZone changeover} { - variable TZData # Find the Julian Day Number corresponding to the base time @@ -2973,7 +2906,6 @@ proc ::tcl::clock::AssignBaseWeek {date baseTime timeZone changeover} { #---------------------------------------------------------------------- proc ::tcl::clock::AssignBaseJulianDay { date baseTime timeZone changeover } { - variable TZData # Find the Julian Day Number corresponding to the base time @@ -3003,7 +2935,6 @@ proc ::tcl::clock::AssignBaseJulianDay { date baseTime timeZone changeover } { #---------------------------------------------------------------------- proc ::tcl::clock::InterpretHMSP { date } { - set hr [dict get $date hourAMPM] if { $hr == 12 } { set hr 0 @@ -3013,7 +2944,6 @@ proc ::tcl::clock::InterpretHMSP { date } { } dict set date hour $hr return [InterpretHMS $date[set date {}]] - } #---------------------------------------------------------------------- @@ -3036,11 +2966,11 @@ proc ::tcl::clock::InterpretHMSP { date } { #---------------------------------------------------------------------- proc ::tcl::clock::InterpretHMS { date } { - - return [expr { ( [dict get $date hour] * 60 - + [dict get $date minute] ) * 60 - + [dict get $date second] }] - + return [expr { + ( [dict get $date hour] * 60 + + [dict get $date minute] ) * 60 + + [dict get $date second] + }] } #---------------------------------------------------------------------- @@ -3063,7 +2993,6 @@ proc ::tcl::clock::InterpretHMS { date } { #---------------------------------------------------------------------- proc ::tcl::clock::GetSystemTimeZone {} { - variable CachedSystemTimeZone variable TimeZoneBad @@ -3091,76 +3020,69 @@ proc ::tcl::clock::GetSystemTimeZone {} { } else { return $timezone } - } #---------------------------------------------------------------------- # # ConvertLegacyTimeZone -- # -# Given an alphanumeric time zone identifier and the system -# time zone, convert the alphanumeric identifier to an -# unambiguous time zone. +# Given an alphanumeric time zone identifier and the system time zone, +# convert the alphanumeric identifier to an unambiguous time zone. # # Parameters: # tzname - Name of the time zone to convert # # Results: -# Returns a time zone name corresponding to tzname, but -# in an unambiguous form, generally +hhmm. +# Returns a time zone name corresponding to tzname, but in an +# unambiguous form, generally +hhmm. # -# This procedure is implemented primarily to allow the parsing of -# RFC822 date/time strings. Processing a time zone name on input -# is not recommended practice, because there is considerable room -# for ambiguity; for instance, is BST Brazilian Standard Time, or -# British Summer Time? +# This procedure is implemented primarily to allow the parsing of RFC822 +# date/time strings. Processing a time zone name on input is not recommended +# practice, because there is considerable room for ambiguity; for instance, is +# BST Brazilian Standard Time, or British Summer Time? # #---------------------------------------------------------------------- proc ::tcl::clock::ConvertLegacyTimeZone { tzname } { - variable LegacyTimeZone set tzname [string tolower $tzname] if { ![dict exists $LegacyTimeZone $tzname] } { return -code error -errorcode [list CLOCK badTZName $tzname] \ "time zone \"$tzname\" not found" - } else { - return [dict get $LegacyTimeZone $tzname] } - + return [dict get $LegacyTimeZone $tzname] } #---------------------------------------------------------------------- # # SetupTimeZone -- # -# Given the name or specification of a time zone, sets up -# its in-memory data. +# Given the name or specification of a time zone, sets up its in-memory +# data. # # Parameters: # tzname - Name of a time zone # # Results: -# Unless the time zone is ':localtime', sets the TZData array -# to contain the lookup table for local<->UTC conversion. -# Returns an error if the time zone cannot be parsed. +# Unless the time zone is ':localtime', sets the TZData array to contain +# the lookup table for local<->UTC conversion. Returns an error if the +# time zone cannot be parsed. # #---------------------------------------------------------------------- proc ::tcl::clock::SetupTimeZone { timezone } { - variable TZData if {! [info exists TZData($timezone)] } { variable MINWIDE if { $timezone eq {:localtime} } { - # Nothing to do, we'll convert using the localtime function - } elseif { [regexp {^([-+])(\d\d)(?::?(\d\d)(?::?(\d\d))?)?} $timezone \ - -> s hh mm ss] } { - + } elseif { + [regexp {^([-+])(\d\d)(?::?(\d\d)(?::?(\d\d))?)?} $timezone \ + -> s hh mm ss] + } then { # Make a fixed offset ::scan $hh %d hh @@ -3181,14 +3103,12 @@ proc ::tcl::clock::SetupTimeZone { timezone } { set TZData($timezone) [list [list $MINWIDE $offset -1 $timezone]] } elseif { [string index $timezone 0] eq {:} } { - # Convert using a time zone file if { [catch { LoadTimeZoneFile [string range $timezone 1 end] - }] - && [catch { + }] && [catch { LoadZoneinfoFile [string range $timezone 1 end] }] } { @@ -3198,7 +3118,6 @@ proc ::tcl::clock::SetupTimeZone { timezone } { } } elseif { ![catch {ParsePosixTimeZone $timezone} tzfields] } { - # This looks like a POSIX time zone - try to process it if { [catch {ProcessPosixTimeZone $tzfields} data opts] } { @@ -3211,9 +3130,8 @@ proc ::tcl::clock::SetupTimeZone { timezone } { } } else { - - # We couldn't parse this as a POSIX time zone. Try - # again with a time zone file - this time without a colon + # We couldn't parse this as a POSIX time zone. Try again with a + # time zone file - this time without a colon if { [catch { LoadTimeZoneFile $timezone }] && [catch { LoadZoneinfoFile $timezone } - opts] } { @@ -3237,25 +3155,22 @@ proc ::tcl::clock::SetupTimeZone { timezone } { # None. # # Results: -# Returns a time zone specifier that corresponds to the system -# time zone information found in the Registry. +# Returns a time zone specifier that corresponds to the system time zone +# information found in the Registry. # # Bugs: -# Fixed dates for DST change are unimplemented at present, because -# no time zone information supplied with Windows actually uses -# them! +# Fixed dates for DST change are unimplemented at present, because no +# time zone information supplied with Windows actually uses them! # -# On a Windows system where neither $env(TCL_TZ) nor $env(TZ) is -# specified, GuessWindowsTimeZone looks in the Registry for the -# system time zone information. It then attempts to find an entry -# in WinZoneInfo for a time zone that uses the same rules. If -# it finds one, it returns it; otherwise, it constructs a Posix-style -# time zone string and returns that. +# On a Windows system where neither $env(TCL_TZ) nor $env(TZ) is specified, +# GuessWindowsTimeZone looks in the Registry for the system time zone +# information. It then attempts to find an entry in WinZoneInfo for a time +# zone that uses the same rules. If it finds one, it returns it; otherwise, +# it constructs a Posix-style time zone string and returns that. # #---------------------------------------------------------------------- proc ::tcl::clock::GuessWindowsTimeZone {} { - variable WinZoneInfo variable NoRegistry variable TimeZoneBad @@ -3286,16 +3201,14 @@ proc ::tcl::clock::GuessWindowsTimeZone {} { lappend data $val } }] } { - # Missing values in the Registry - bail out return :localtime } - # Make up a Posix time zone specifier if we can't find one. - # Check here that the tzdata file exists, in case we're running - # in an environment (e.g. starpack) where tzdata is incomplete. - # (Bug 1237907) + # Make up a Posix time zone specifier if we can't find one. Check here + # that the tzdata file exists, in case we're running in an environment + # (e.g. starpack) where tzdata is incomplete. (Bug 1237907) if { [dict exists $WinZoneInfo $data] } { set tzname [dict get $WinZoneInfo $data] @@ -3343,11 +3256,11 @@ proc ::tcl::clock::GuessWindowsTimeZone {} { if { $dstYear == 0 } { append tzname ,M $dstMonth . $dstDayOfMonth . $dstDayOfWeek } else { - # I have not been able to find any locale on which - # Windows converts time zone on a fixed day of the year, - # hence don't know how to interpret the fields. - # If someone can inform me, I'd be glad to code it up. - # For right now, we bail out in such a case. + # I have not been able to find any locale on which Windows + # converts time zone on a fixed day of the year, hence don't + # know how to interpret the fields. If someone can inform me, + # I'd be glad to code it up. For right now, we bail out in + # such a case. return :localtime } append tzname / [::format %02d $dstHour] \ @@ -3356,11 +3269,11 @@ proc ::tcl::clock::GuessWindowsTimeZone {} { if { $stdYear == 0 } { append tzname ,M $stdMonth . $stdDayOfMonth . $stdDayOfWeek } else { - # I have not been able to find any locale on which - # Windows converts time zone on a fixed day of the year, - # hence don't know how to interpret the fields. - # If someone can inform me, I'd be glad to code it up. - # For right now, we bail out in such a case. + # I have not been able to find any locale on which Windows + # converts time zone on a fixed day of the year, hence don't + # know how to interpret the fields. If someone can inform me, + # I'd be glad to code it up. For right now, we bail out in + # such a case. return :localtime } append tzname / [::format %02d $stdHour] \ @@ -3371,7 +3284,6 @@ proc ::tcl::clock::GuessWindowsTimeZone {} { } return [dict get $WinZoneInfo $data] - } #---------------------------------------------------------------------- @@ -3400,18 +3312,18 @@ proc ::tcl::clock::LoadTimeZoneFile { fileName } { return } - # Since an unsafe interp uses the [clock] command in the master, - # this code is security sensitive. Make sure that the path name - # cannot escape the given directory. + # Since an unsafe interp uses the [clock] command in the master, this code + # is security sensitive. Make sure that the path name cannot escape the + # given directory. if { ![regexp {^[[.-.][:alpha:]_]+(?:/[[.-.][:alpha:]_]+)*$} $fileName] } { return -code error \ -errorcode [list CLOCK badTimeZone $:fileName] \ "time zone \":$fileName\" not valid" } - if { [catch { + try { source -encoding utf-8 [file join $DataDir $fileName] - }] } { + } on error {} { return -code error \ -errorcode [list CLOCK badTimeZone :$fileName] \ "time zone \":$fileName\" not found" @@ -3429,8 +3341,8 @@ proc ::tcl::clock::LoadTimeZoneFile { fileName } { # fileName - Relative path name of the file to load. # # Results: -# Returns an empty result normally; returns an error if no -# Olson file was found or the file was malformed in some way. +# Returns an empty result normally; returns an error if no Olson file +# was found or the file was malformed in some way. # # Side effects: # TZData(:fileName) contains the time zone data @@ -3438,12 +3350,11 @@ proc ::tcl::clock::LoadTimeZoneFile { fileName } { #---------------------------------------------------------------------- proc ::tcl::clock::LoadZoneinfoFile { fileName } { - variable ZoneinfoPaths - # Since an unsafe interp uses the [clock] command in the master, - # this code is security sensitive. Make sure that the path name - # cannot escape the given directory. + # Since an unsafe interp uses the [clock] command in the master, this code + # is security sensitive. Make sure that the path name cannot escape the + # given directory. if { ![regexp {^[[.-.][:alpha:]_]+(?:/[[.-.][:alpha:]_]+)*$} $fileName] } { return -code error \ @@ -3472,15 +3383,14 @@ proc ::tcl::clock::LoadZoneinfoFile { fileName } { # fname - Absolute path name of the file. # # Results: -# Returns an empty result normally; returns an error if no -# Olson file was found or the file was malformed in some way. +# Returns an empty result normally; returns an error if no Olson file +# was found or the file was malformed in some way. # # Side effects: # TZData(:fileName) contains the time zone data # #---------------------------------------------------------------------- - proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { variable MINWIDE variable TZData @@ -3499,8 +3409,8 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { set d [read $f] close $f - # The file begins with a magic number, sixteen reserved bytes, - # and then six 4-byte integers giving counts of fileds in the file. + # The file begins with a magic number, sixteen reserved bytes, and then + # six 4-byte integers giving counts of fileds in the file. binary scan $d a4a1x15IIIIII \ magic version nIsGMT nIsStd nLeap nTime nType nChar @@ -3518,18 +3428,19 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { return -code error "$fileName contains leap seconds" } - # In a version 2 file, we use the second part of the file, which - # contains 64-bit transition times. + # In a version 2 file, we use the second part of the file, which contains + # 64-bit transition times. if {$version eq "2"} { - set seek [expr {44 - + 5 * $nTime - + 6 * $nType - + 4 * $nLeap - + $nIsStd - + $nIsGMT - + $nChar - }] + set seek [expr { + 44 + + 5 * $nTime + + 6 * $nType + + 4 * $nLeap + + $nIsStd + + $nIsGMT + + $nChar + }] binary scan $d @${seek}a4a1x15IIIIII \ magic version nIsGMT nIsStd nLeap nTime nType nChar if {$magic ne {TZif}} { @@ -3553,9 +3464,9 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { } set codes [linsert $codes 0 0] - # Next come ${nType} time type descriptions, each of which has an - # offset (seconds east of GMT), a DST indicator, and an index into - # the abbreviation text. + # Next come ${nType} time type descriptions, each of which has an offset + # (seconds east of GMT), a DST indicator, and an index into the + # abbreviation text. for { set i 0 } { $i < $nType } { incr i } { binary scan $d @${seek}Icc gmtOff isDst abbrInd @@ -3563,10 +3474,10 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { incr seek 6 } - # Next come $nChar characters of time zone name abbreviations, - # which are null-terminated. - # We build them up into a dictionary indexed by character index, - # because that's what's in the indices above. + # Next come $nChar characters of time zone name abbreviations, which are + # null-terminated. + # We build them up into a dictionary indexed by character index, because + # that's what's in the indices above. binary scan $d @${seek}a${nChar} abbrs incr seek ${nChar} @@ -3594,8 +3505,8 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { } # In a version 2 file, there is also a POSIX-style time zone description - # at the very end of the file. To get to it, skip over - # nLeap leap second values (8 bytes each), + # at the very end of the file. To get to it, skip over nLeap leap second + # values (8 bytes each), # nIsStd standard/DST indicators and nIsGMT UTC/local indicators. if {$version eq {2}} { @@ -3628,8 +3539,8 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { # tz Time zone specifier to be interpreted # # Results: -# Returns a dictionary whose values contain the various pieces of -# the time zone specification. +# Returns a dictionary whose values contain the various pieces of the +# time zone specification. # # Side effects: # None. @@ -3686,13 +3597,12 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { # Specify the end of DST in the same way that the start* fields # specify the beginning of DST. # -# This procedure serves only to break the time specifier into fields. -# No attempt is made to canonicalize the fields or supply default values. +# This procedure serves only to break the time specifier into fields. No +# attempt is made to canonicalize the fields or supply default values. # #---------------------------------------------------------------------- proc ::tcl::clock::ParsePosixTimeZone { tz } { - if {[regexp -expanded -nocase -- { ^ # 1 - Standard time zone name @@ -3784,27 +3694,21 @@ proc ::tcl::clock::ParsePosixTimeZone { tz } { x(endJ) x(endDayOfYear) \ x(endMonth) x(endWeekOfMonth) x(endDayOfWeek) \ x(endHours) x(endMinutes) x(endSeconds)] } { - # it's a good timezone return [array get x] - - } else { - - return -code error\ - -errorcode [list CLOCK badTimeZone $tz] \ - "unable to parse time zone specification \"$tz\"" - } + return -code error\ + -errorcode [list CLOCK badTimeZone $tz] \ + "unable to parse time zone specification \"$tz\"" } #---------------------------------------------------------------------- # # ProcessPosixTimeZone -- # -# Handle a Posix time zone after it's been broken out into -# fields. +# Handle a Posix time zone after it's been broken out into fields. # # Parameters: # z - Dictionary returned from 'ParsePosixTimeZone' @@ -3818,7 +3722,6 @@ proc ::tcl::clock::ParsePosixTimeZone { tz } { #---------------------------------------------------------------------- proc ::tcl::clock::ProcessPosixTimeZone { z } { - variable MINWIDE variable TZData @@ -3844,9 +3747,9 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { } else { set stdSeconds 0 } - set stdOffset [expr { ( ( $stdHours * 60 + $stdMinutes ) - * 60 + $stdSeconds ) - * $stdSignum }] + set stdOffset [expr { + (($stdHours * 60 + $stdMinutes) * 60 + $stdSeconds) * $stdSignum + }] set data [list [list $MINWIDE $stdOffset 0 $stdName]] # If there's no daylight zone, we're done @@ -3880,15 +3783,16 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { } else { set dstSeconds 0 } - set dstOffset [expr { ( ( $dstHours * 60 + $dstMinutes ) - * 60 + $dstSeconds ) - * $dstSignum }] + set dstOffset [expr { + (($dstHours*60 + $dstMinutes) * 60 + $dstSeconds) * $dstSignum + }] } # Fill in defaults for European or US DST rules - if { [dict get $z startDayOfYear] eq {} - && [dict get $z startMonth] eq {} } { + if { + [dict get $z startDayOfYear] eq {} && [dict get $z startMonth] eq {} + } then { if {($stdHours>=0) && ($stdHours<=12)} { dict set z startWeekOfMonth 5 if {$stdHours>2} { @@ -3905,8 +3809,9 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { dict set z startMinutes 0 dict set z startSeconds 0 } - if { [dict get $z endDayOfYear] eq {} - && [dict get $z endMonth] eq {} } { + if { + [dict get $z endDayOfYear] eq {} && [dict get $z endMonth] eq {} + } then { if {($stdHours>=0) && ($stdHours<=12)} { dict set z endMonth 10 dict set z endWeekOfMonth 5 @@ -3944,15 +3849,14 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { } return $data - } #---------------------------------------------------------------------- # # DeterminePosixDSTTime -- # -# Determines the time that Daylight Saving Time starts or ends -# from a Posix time zone specification. +# Determines the time that Daylight Saving Time starts or ends from a +# Posix time zone specification. # # Parameters: # z - Time zone data returned from ParsePosixTimeZone. @@ -3962,13 +3866,12 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { # y - The year for which the transition time is to be determined. # # Results: -# Returns the transition time as a count of seconds from -# the epoch. The time is relative to the wall clock, not UTC. +# Returns the transition time as a count of seconds from the epoch. The +# time is relative to the wall clock, not UTC. # #---------------------------------------------------------------------- proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { - variable FEB_28 # Determine the start or end day of DST @@ -3976,7 +3879,6 @@ proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { set date [dict create era CE year $y] set doy [dict get $z ${bound}DayOfYear] if { $doy ne {} } { - # Time was specified as a day of the year if { [dict get $z ${bound}J] ne {} @@ -3987,7 +3889,6 @@ proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { dict set date dayOfYear $doy set date [GetJulianDayFromEraYearDay $date[set date {}] 2361222] } else { - # Time was specified as a day of the week within a month dict set date month [dict get $z ${bound}Month] @@ -4002,8 +3903,9 @@ proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { } set jd [dict get $date julianDay] - set seconds [expr { wide($jd) * wide(86400) - - wide(210866803200) }] + set seconds [expr { + wide($jd) * wide(86400) - wide(210866803200) + }] set h [dict get $z ${bound}Hours] if { $h eq {} } { @@ -4025,7 +3927,6 @@ proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { } set tod [expr { ( $h * 60 + $m ) * 60 + $s }] return [expr { $seconds + $tod }] - } #---------------------------------------------------------------------- @@ -4043,26 +3944,26 @@ proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { # for the target locale. # # Results: -# Returns the dictionary, augmented with the keys, 'localeEra' -# and 'localeYear'. +# Returns the dictionary, augmented with the keys, 'localeEra' and +# 'localeYear'. # #---------------------------------------------------------------------- proc ::tcl::clock::GetLocaleEra { date etable } { - set index [BSearch $etable [dict get $date localSeconds]] if { $index < 0} { dict set date localeEra \ [::format %02d [expr { [dict get $date year] / 100 }]] - dict set date localeYear \ - [expr { [dict get $date year] % 100 }] + dict set date localeYear [expr { + [dict get $date year] % 100 + }] } else { dict set date localeEra [lindex $etable $index 1] - dict set date localeYear [expr { [dict get $date year] - - [lindex $etable $index 2] }] + dict set date localeYear [expr { + [dict get $date year] - [lindex $etable $index 2] + }] } return $date - } #---------------------------------------------------------------------- @@ -4080,10 +3981,9 @@ proc ::tcl::clock::GetLocaleEra { date etable } { # adopted in the current locale. # # Results: -# Returns the given dictionary augmented with a 'julianDay' key -# whose value is the desired Julian Day Number, and a 'gregorian' -# key that specifies whether the calendar is Gregorian (1) or -# Julian (0). +# Returns the given dictionary augmented with a 'julianDay' key whose +# value is the desired Julian Day Number, and a 'gregorian' key that +# specifies whether the calendar is Gregorian (1) or Julian (0). # # Side effects: # None. @@ -4094,7 +3994,6 @@ proc ::tcl::clock::GetLocaleEra { date etable } { #---------------------------------------------------------------------- proc ::tcl::clock::GetJulianDayFromEraYearDay {date changeover} { - # Get absolute year number from the civil year switch -exact -- [dict get $date era] { @@ -4110,21 +4009,25 @@ proc ::tcl::clock::GetJulianDayFromEraYearDay {date changeover} { # Try the Gregorian calendar first. dict set date gregorian 1 - set jd [expr { 1721425 - + [dict get $date dayOfYear] - + ( 365 * $ym1 ) - + ( $ym1 / 4 ) - - ( $ym1 / 100 ) - + ( $ym1 / 400 ) }] + set jd [expr { + 1721425 + + [dict get $date dayOfYear] + + ( 365 * $ym1 ) + + ( $ym1 / 4 ) + - ( $ym1 / 100 ) + + ( $ym1 / 400 ) + }] # If the date is before the Gregorian change, use the Julian calendar. if { $jd < $changeover } { dict set date gregorian 0 - set jd [expr { 1721423 - + [dict get $date dayOfYear] - + ( 365 * $ym1 ) - + ( $ym1 / 4 ) }] + set jd [expr { + 1721423 + + [dict get $date dayOfYear] + + ( 365 * $ym1 ) + + ( $ym1 / 4 ) + }] } dict set date julianDay $jd @@ -4135,8 +4038,8 @@ proc ::tcl::clock::GetJulianDayFromEraYearDay {date changeover} { # # GetJulianDayFromEraYearMonthWeekDay -- # -# Determines the Julian Day number corresponding to the nth -# given day-of-the-week in a given month. +# Determines the Julian Day number corresponding to the nth given +# day-of-the-week in a given month. # # Parameters: # date - Dictionary containing the keys, 'era', 'year', 'month' @@ -4155,10 +4058,9 @@ proc ::tcl::clock::GetJulianDayFromEraYearDay {date changeover} { #---------------------------------------------------------------------- proc ::tcl::clock::GetJulianDayFromEraYearMonthWeekDay {date changeover} { - - # Come up with a reference day; either the zeroeth day of the - # given month (dayOfWeekInMonth >= 0) or the seventh day of the - # following month (dayOfWeekInMonth < 0) + # Come up with a reference day; either the zeroeth day of the given month + # (dayOfWeekInMonth >= 0) or the seventh day of the following month + # (dayOfWeekInMonth < 0) set date2 $date set week [dict get $date dayOfWeekInMonth] @@ -4174,7 +4076,6 @@ proc ::tcl::clock::GetJulianDayFromEraYearMonthWeekDay {date changeover} { [dict get $date2 julianDay]] dict set date julianDay [expr { $wd0 + 7 * $week }] return $date - } #---------------------------------------------------------------------- @@ -4197,7 +4098,6 @@ proc ::tcl::clock::GetJulianDayFromEraYearMonthWeekDay {date changeover} { #---------------------------------------------------------------------- proc ::tcl::clock::IsGregorianLeapYear { date } { - switch -exact -- [dict get $date era] { BCE { set year [expr { 1 - [dict get $date year]}] @@ -4217,15 +4117,14 @@ proc ::tcl::clock::IsGregorianLeapYear { date } { } else { return 1 } - } #---------------------------------------------------------------------- # # WeekdayOnOrBefore -- # -# Determine the nearest day of week (given by the 'weekday' -# parameter, Sunday==0) on or before a given Julian Day. +# Determine the nearest day of week (given by the 'weekday' parameter, +# Sunday==0) on or before a given Julian Day. # # Parameters: # weekday -- Day of the week @@ -4240,18 +4139,16 @@ proc ::tcl::clock::IsGregorianLeapYear { date } { #---------------------------------------------------------------------- proc ::tcl::clock::WeekdayOnOrBefore { weekday j } { - set k [expr { ( $weekday + 6 ) % 7 }] return [expr { $j - ( $j - $k ) % 7 }] - } #---------------------------------------------------------------------- # # BSearch -- # -# Service procedure that does binary search in several places -# inside the 'clock' command. +# Service procedure that does binary search in several places inside the +# 'clock' command. # # Parameters: # list - List of lists, sorted in ascending order by the @@ -4259,8 +4156,8 @@ proc ::tcl::clock::WeekdayOnOrBefore { weekday j } { # key - Value to search for # # Results: -# Returns the index of the greatest element in $list that is less -# than or equal to $key. +# Returns the index of the greatest element in $list that is less than +# or equal to $key. # # Side effects: # None. @@ -4268,7 +4165,6 @@ proc ::tcl::clock::WeekdayOnOrBefore { weekday j } { #---------------------------------------------------------------------- proc ::tcl::clock::BSearch { list key } { - if {[llength $list] == 0} { return -1 } @@ -4280,13 +4176,12 @@ proc ::tcl::clock::BSearch { list key } { set u [expr { [llength $list] - 1 }] while { $l < $u } { - # At this point, we know that # $k >= [lindex $list $l 0] # Either $u == [llength $list] or else $k < [lindex $list $u+1 0] # We find the midpoint of the interval {l,u} rounded UP, compare - # against it, and set l or u to maintain the invariant. Note - # that the interval shrinks at each step, guaranteeing convergence. + # against it, and set l or u to maintain the invariant. Note that the + # interval shrinks at each step, guaranteeing convergence. set m [expr { ( $l + $u + 1 ) / 2 }] if { $key >= [lindex $list $m 0] } { @@ -4330,15 +4225,14 @@ proc ::tcl::clock::BSearch { list key } { # order. # # Notes: -# It is possible that adding a number of months or years will adjust -# the day of the month as well. For instance, the time at -# one month after 31 January is either 28 or 29 February, because -# February has fewer than 31 days. +# It is possible that adding a number of months or years will adjust the +# day of the month as well. For instance, the time at one month after +# 31 January is either 28 or 29 February, because February has fewer +# than 31 days. # #---------------------------------------------------------------------- proc ::tcl::clock::add { clockval args } { - if { [llength $args] % 2 != 0 } { set cmdName "clock add" return -code error \ @@ -4357,15 +4251,10 @@ proc ::tcl::clock::add { clockval args } { set timezone [GetSystemTimeZone] foreach { a b } $args { - if { [string is integer -strict $a] } { - lappend offsets $a $b - } else { - switch -exact -- $a { - -g - -gm - -gmt { set gmt $b } @@ -4377,8 +4266,7 @@ proc ::tcl::clock::add { clockval args } { set timezone $b } default { - return -code error \ - -errorcode [list CLOCK badSwitch $a] \ + throw [list CLOCK badSwitch $a] \ "bad switch \"$a\",\ must be -gmt, -locale or -timezone" } @@ -4394,16 +4282,12 @@ proc ::tcl::clock::add { clockval args } { "cannot use -gmt and -timezone in same call" } if { [catch { expr { wide($clockval) } } result] } { - return -code error \ - "expected integer but got \"$clockval\"" + return -code error "expected integer but got \"$clockval\"" } - if { ![string is boolean $gmt] } { - return -code error \ - "expected boolean value but got \"$gmt\"" - } else { - if { $gmt } { - set timezone :GMT - } + if { ![string is boolean -strict $gmt] } { + return -code error "expected boolean value but got \"$gmt\"" + } elseif { $gmt } { + set timezone :GMT } EnterLocale $locale oldLocale @@ -4415,29 +4299,25 @@ proc ::tcl::clock::add { clockval args } { return -options $opts $retval } - set status [catch { - + try { foreach { quantity unit } $offsets { - switch -exact -- $unit { - years - year { - set clockval \ - [AddMonths [expr { 12 * $quantity }] \ - $clockval $timezone $changeover] + set clockval [AddMonths [expr { 12 * $quantity }] \ + $clockval $timezone $changeover] } months - month { set clockval [AddMonths $quantity $clockval $timezone \ - $changeover] + $changeover] } weeks - week { set clockval [AddDays [expr { 7 * $quantity }] \ - $clockval $timezone $changeover] + $clockval $timezone $changeover] } days - day { set clockval [AddDays $quantity $clockval $timezone \ - $changeover] + $changeover] } hours - hour { @@ -4451,31 +4331,24 @@ proc ::tcl::clock::add { clockval args } { } default { - error "unknown unit \"$unit\", must be \ - years, months, weeks, days, hours, minutes or seconds" \ - "unknown unit \"$unit\", must be \ - years, months, weeks, days, hours, minutes or seconds" \ - [list CLOCK badUnit $unit] + throw [list CLOCK badUnit $unit] \ + "unknown unit \"$unit\", must be \ + years, months, weeks, days, hours, minutes or seconds" } } } - } result opts] - - # Restore the locale - - if { [info exists oldLocale] } { - mclocale $oldLocale - } + return $clockval + } trap CLOCK {result opts} { + # Conceal the innards of [clock] when it's an expected error + dict unset opts -errorinfo + return -options $opts $result + } finally { + # Restore the locale - if { $status == 1 } { - if { [lindex [dict get $opts -errorcode] 0] eq {CLOCK} } { - dict unset opts -errorinfo + if { [info exists oldLocale] } { + mclocale $oldLocale } - return -options $opts $result - } else { - return $clockval } - } #---------------------------------------------------------------------- @@ -4500,7 +4373,6 @@ proc ::tcl::clock::add { clockval args } { #---------------------------------------------------------------------- proc ::tcl::clock::AddMonths { months clockval timezone changeover } { - variable DaysInRomanMonthInCommonYear variable DaysInRomanMonthInLeapYear variable TZData @@ -4508,8 +4380,9 @@ proc ::tcl::clock::AddMonths { months clockval timezone changeover } { # Convert the time to year, month, day, and fraction of day. set date [GetDateFields $clockval $TZData($timezone) $changeover] - dict set date secondOfDay [expr { [dict get $date localSeconds] - % 86400 }] + dict set date secondOfDay [expr { + [dict get $date localSeconds] % 86400 + }] dict set date tzName $timezone # Add the requisite number of months @@ -4538,23 +4411,23 @@ proc ::tcl::clock::AddMonths { months clockval timezone changeover } { set date [GetJulianDayFromEraYearMonthDay \ $date[set date {}]\ $changeover] - dict set date localSeconds \ - [expr { -210866803200 - + ( 86400 * wide([dict get $date julianDay]) ) - + [dict get $date secondOfDay] }] + dict set date localSeconds [expr { + -210866803200 + + ( 86400 * wide([dict get $date julianDay]) ) + + [dict get $date secondOfDay] + }] set date [ConvertLocalToUTC $date[set date {}] $TZData($timezone) \ $changeover] return [dict get $date seconds] - } #---------------------------------------------------------------------- # # AddDays -- # -# Add a given number of days to a given clock value in a given -# time zone. +# Add a given number of days to a given clock value in a given time +# zone. # # Parameters: # days - Number of days to add (may be negative) @@ -4564,8 +4437,7 @@ proc ::tcl::clock::AddMonths { months clockval timezone changeover } { # in the target locale. # # Results: -# Returns the new clock value as a number of seconds since -# the epoch. +# Returns the new clock value as a number of seconds since the epoch. # # Side effects: # None. @@ -4573,14 +4445,14 @@ proc ::tcl::clock::AddMonths { months clockval timezone changeover } { #---------------------------------------------------------------------- proc ::tcl::clock::AddDays { days clockval timezone changeover } { - variable TZData # Convert the time to Julian Day set date [GetDateFields $clockval $TZData($timezone) $changeover] - dict set date secondOfDay [expr { [dict get $date localSeconds] - % 86400 }] + dict set date secondOfDay [expr { + [dict get $date localSeconds] % 86400 + }] dict set date tzName $timezone # Add the requisite number of days @@ -4589,23 +4461,23 @@ proc ::tcl::clock::AddDays { days clockval timezone changeover } { # Reconvert to a number of seconds - dict set date localSeconds \ - [expr { -210866803200 - + ( 86400 * wide([dict get $date julianDay]) ) - + [dict get $date secondOfDay] }] + dict set date localSeconds [expr { + -210866803200 + + ( 86400 * wide([dict get $date julianDay]) ) + + [dict get $date secondOfDay] + }] set date [ConvertLocalToUTC $date[set date {}] $TZData($timezone) \ $changeover] return [dict get $date seconds] - } #---------------------------------------------------------------------- # # mc -- # -# Wrapper around ::msgcat::mc that caches the result according -# to the locale. +# Wrapper around ::msgcat::mc that caches the result according to the +# locale. # # Parameters: # Accepts the name of the message to retrieve. @@ -4626,11 +4498,10 @@ proc ::tcl::clock::mc { name } { set Locale [mclocale] if { [dict exists $McLoaded $Locale $name] } { return [dict get $McLoaded $Locale $name] - } else { - set val [::msgcat::mc $name] - dict set McLoaded $Locale $name $val - return $val } + set val [::msgcat::mc $name] + dict set McLoaded $Locale $name $val + return $val } #---------------------------------------------------------------------- @@ -4651,7 +4522,6 @@ proc ::tcl::clock::mc { name } { #---------------------------------------------------------------------- proc ::tcl::clock::ClearCaches {} { - variable FormatProc variable LocaleNumeralCache variable McLoaded @@ -4671,5 +4541,4 @@ proc ::tcl::clock::ClearCaches {} { catch {unset CachedSystemTimeZone} set TimeZoneBad {} InitTZData - } -- cgit v0.12 From e1465aee3a159ab7eb67703d6b658593ed7e8cee Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 24 Jul 2009 20:45:22 +0000 Subject: minor cleanups --- generic/tclCmdAH.c | 4 ++-- generic/tclExecute.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index a3a5841..b268bfc 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.117 2009/07/14 16:34:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.118 2009/07/24 20:45:22 dgp Exp $ */ #include "tclInt.h" @@ -290,7 +290,7 @@ TclNRCatchObjCmd( * TIP #280. Make invoking context available to caught script. */ - Tcl_NRAddCallback(interp, CatchObjCmdCallback, INT2PTR(objc), + TclNRAddCallback(interp, CatchObjCmdCallback, INT2PTR(objc), varNamePtr, optionVarNamePtr, NULL); return TclNREvalObjEx(interp, objv[1], 0, iPtr->cmdFramePtr, 1); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 8ccdbe1..1a9c9a9 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.442 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.443 2009/07/24 20:45:23 dgp Exp $ */ #include "tclInt.h" @@ -674,6 +674,7 @@ static void ValidatePcAndStackTop(ByteCode *codePtr, const unsigned char *pc, int stackTop, int stackLowerBound, int checkStack); #endif /* TCL_COMPILE_DEBUG */ +static ByteCode * CompileExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr); static void DeleteExecStack(ExecStack *esPtr); static void DupExprCodeInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); @@ -687,6 +688,7 @@ static Tcl_Obj ** GrowEvaluationStack(ExecEnv *eePtr, int growth, static void IllegalExprOperandType(Tcl_Interp *interp, const unsigned char *pc, Tcl_Obj *opndPtr); static void InitByteCodeExecution(Tcl_Interp *interp); +static inline int OFFSET(void *ptr); /* Useful elsewhere, make available in tclInt.h or stubs? */ static Tcl_Obj ** StackAllocWords(Tcl_Interp *interp, int numWords); static Tcl_Obj ** StackReallocWords(Tcl_Interp *interp, int numWords); -- cgit v0.12 From 5e86c93adf8d3a23361d8e09aaae609f3a550f05 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 25 Jul 2009 21:51:02 +0000 Subject: Make [history] (well, [::tcl::history]) be a real ensemble. --- ChangeLog | 6 ++ library/history.tcl | 300 +++++++++++++++++++++------------------------------- tests/history.test | 18 ++-- 3 files changed, 134 insertions(+), 190 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12ff42e..3be3af2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-25 Donal K. Fellows + + * library/history.tcl (history): Reworked the history mechanism in + terms of ensembles, rather than the ad hoc ensemble-lite mechanism + used previously. + 2009-07-24 Donal K. Fellows * doc/self.n (self class): [Bug 2704302]: Add some text to make it diff --git a/library/history.tcl b/library/history.tcl index 3a3f16a..077d604 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -2,22 +2,22 @@ # # Implementation of the history command. # -# RCS: @(#) $Id: history.tcl,v 1.7 2005/07/23 04:12:49 dgp Exp $ +# RCS: @(#) $Id: history.tcl,v 1.8 2009/07/25 21:51:02 dkf Exp $ # # Copyright (c) 1997 Sun Microsystems, Inc. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # - -# The tcl::history array holds the history list and -# some additional bookkeeping variables. + +# The tcl::history array holds the history list and some additional +# bookkeeping variables. # # nextid the index used for the next history list item. # keep the max size of the history list # oldest the index of the oldest item in the history. -namespace eval tcl { +namespace eval ::tcl { variable history if {![info exists history]} { array set history { @@ -26,163 +26,78 @@ namespace eval tcl { oldest -20 } } -} + namespace ensemble create -command ::tcl::history -map { + add ::tcl::HistAdd + change ::tcl::HistChange + clear ::tcl::HistClear + event ::tcl::HistEvent + info ::tcl::HistInfo + keep ::tcl::HistKeep + nextid ::tcl::HistNextID + redo ::tcl::HistRedo + } +} + # history -- # # This is the main history command. See the man page for its interface. -# This does argument checking and calls helper procedures in the -# history namespace. - -proc history {args} { - set len [llength $args] - if {$len == 0} { - return [tcl::HistInfo] - } - set key [lindex $args 0] - set options "add, change, clear, event, info, keep, nextid, or redo" - switch -glob -- $key { - a* { # history add - - if {$len > 3} { - return -code error "wrong # args: should be \"history add event ?exec?\"" - } - if {![string match $key* add]} { - return -code error "bad option \"$key\": must be $options" - } - if {$len == 3} { - set arg [lindex $args 2] - if {! ([string match e* $arg] && [string match $arg* exec])} { - return -code error "bad argument \"$arg\": should be \"exec\"" - } - } - return [tcl::HistAdd [lindex $args 1] [lindex $args 2]] - } - ch* { # history change - - if {($len > 3) || ($len < 2)} { - return -code error "wrong # args: should be \"history change newValue ?event?\"" - } - if {![string match $key* change]} { - return -code error "bad option \"$key\": must be $options" - } - if {$len == 2} { - set event 0 - } else { - set event [lindex $args 2] - } - - return [tcl::HistChange [lindex $args 1] $event] - } - cl* { # history clear - - if {($len > 1)} { - return -code error "wrong # args: should be \"history clear\"" - } - if {![string match $key* clear]} { - return -code error "bad option \"$key\": must be $options" - } - return [tcl::HistClear] - } - e* { # history event - - if {$len > 2} { - return -code error "wrong # args: should be \"history event ?event?\"" - } - if {![string match $key* event]} { - return -code error "bad option \"$key\": must be $options" - } - if {$len == 1} { - set event -1 - } else { - set event [lindex $args 1] - } - return [tcl::HistEvent $event] - } - i* { # history info - - if {$len > 2} { - return -code error "wrong # args: should be \"history info ?count?\"" - } - if {![string match $key* info]} { - return -code error "bad option \"$key\": must be $options" - } - return [tcl::HistInfo [lindex $args 1]] - } - k* { # history keep +# This does some argument checking and calls the helper ensemble in the +# tcl namespace. - if {$len > 2} { - return -code error "wrong # args: should be \"history keep ?count?\"" - } - if {$len == 1} { - return [tcl::HistKeep] - } else { - set limit [lindex $args 1] - if {[catch {expr {~$limit}}] || ($limit < 0)} { - return -code error "illegal keep count \"$limit\"" - } - return [tcl::HistKeep $limit] - } - } - n* { # history nextid - - if {$len > 1} { - return -code error "wrong # args: should be \"history nextid\"" - } - if {![string match $key* nextid]} { - return -code error "bad option \"$key\": must be $options" - } - return [expr {$tcl::history(nextid) + 1}] - } - r* { # history redo +proc ::history {args} { + # If no command given, we're doing 'history info'. Can't be done with an + # ensemble unknown handler, as those don't fire when no subcommand is + # given at all. - if {$len > 2} { - return -code error "wrong # args: should be \"history redo ?event?\"" - } - if {![string match $key* redo]} { - return -code error "bad option \"$key\": must be $options" - } - return [tcl::HistRedo [lindex $args 1]] - } - default { - return -code error "bad option \"$key\": must be $options" - } + if {[llength $args] == 0} { + set args info } -} + # Tricky stuff needed to make stack and errors come out right! + tailcall apply {args {tailcall history {*}$args} ::tcl} {*}$args +} + # tcl::HistAdd -- # # Add an item to the history, and optionally eval it at the global scope # # Parameters: -# command the command to add -# exec (optional) a substring of "exec" causes the -# command to be evaled. +# event the command to add +# exec (optional) a substring of "exec" causes the command to +# be evaled. # Results: # If executing, then the results of the command are returned # # Side Effects: # Adds to the history list - proc tcl::HistAdd {command {exec {}}} { +proc ::tcl::HistAdd {event {exec {}}} { variable history + if { + [prefix longest {exec {}} $exec] eq "" + && [llength [info level 0]] == 3 + } then { + return -code error "bad argument \"$exec\": should be \"exec\"" + } + # Do not add empty commands to the history - if {[string trim $command] eq ""} { + if {[string trim $event] eq ""} { return "" } - set i [incr history(nextid)] - set history($i) $command - set j [incr history(oldest)] - unset -nocomplain history($j) - if {[string match e* $exec]} { - return [uplevel #0 $command] - } else { - return {} + # Maintain the history + set history([incr history(nextid)]) $event + unset -nocomplain history([incr history(oldest)]) + + # Only execute if 'exec' (or non-empty prefix of it) given + if {$exec eq ""} { + return "" } + tailcall eval $event } - + # tcl::HistKeep -- # # Set or query the limit on the length of the history list @@ -196,20 +111,22 @@ proc history {args} { # Side Effects: # Updates history(keep) if a limit is specified - proc tcl::HistKeep {{limit {}}} { +proc ::tcl::HistKeep {{count {}}} { variable history - if {$limit eq ""} { + if {[llength [info level 0]] == 1} { return $history(keep) - } else { - set oldold $history(oldest) - set history(oldest) [expr {$history(nextid) - $limit}] - for {} {$oldold <= $history(oldest)} {incr oldold} { - unset -nocomplain history($oldold) - } - set history(keep) $limit } + if {![string is integer -strict $count] || ($count < 0)} { + return -code error "illegal keep count \"$count\"" + } + set oldold $history(oldest) + set history(oldest) [expr {$history(nextid) - $count}] + for {} {$oldold <= $history(oldest)} {incr oldold} { + unset -nocomplain history($oldold) + } + set history(keep) $count } - + # tcl::HistClear -- # # Erase the history list @@ -223,7 +140,7 @@ proc history {args} { # Side Effects: # Resets the history array, except for the keep limit - proc tcl::HistClear {} { +proc ::tcl::HistClear {} { variable history set keep $history(keep) unset history @@ -233,7 +150,7 @@ proc history {args} { oldest -$keep \ ] } - + # tcl::HistInfo -- # # Return a pretty-printed version of the history list @@ -244,14 +161,16 @@ proc history {args} { # Results: # A formatted history list - proc tcl::HistInfo {{num {}}} { +proc ::tcl::HistInfo {{count {}}} { variable history - if {$num eq ""} { - set num [expr {$history(keep) + 1}] + if {[llength [info level 0]] == 1} { + set count [expr {$history(keep) + 1}] + } elseif {![string is integer -strict $count]} { + return -code error "bad integer \"$count\"" } set result {} set newline "" - for {set i [expr {$history(nextid) - $num + 1}]} \ + for {set i [expr {$history(nextid) - $count + 1}]} \ {$i <= $history(nextid)} {incr i} { if {![info exists history($i)]} { continue @@ -262,11 +181,11 @@ proc history {args} { } return $result } - + # tcl::HistRedo -- # -# Fetch the previous or specified event, execute it, and then -# replace the current history item with that event. +# Fetch the previous or specified event, execute it, and then replace +# the current history item with that event. # # Parameters: # event (optional) index of history item to redo. Defaults to -1, @@ -278,20 +197,18 @@ proc history {args} { # Side Effects: # Replaces the current history list item with the one being redone. - proc tcl::HistRedo {{event -1}} { +proc ::tcl::HistRedo {{event -1}} { variable history - if {$event eq ""} { - set event -1 - } + set i [HistIndex $event] if {$i == $history(nextid)} { return -code error "cannot redo the current event" } set cmd $history($i) HistChange $cmd 0 - uplevel #0 $cmd + tailcall eval $cmd } - + # tcl::HistIndex -- # # Map from an event specifier to an index in the history list. @@ -301,15 +218,15 @@ proc history {args} { # If this is a positive number, it is used directly. # If it is a negative number, then it counts back to a previous # event, where -1 is the most recent event. -# A string can be matched, either by being the prefix of -# a command or by matching a command with string match. +# A string can be matched, either by being the prefix of a +# command or by matching a command with string match. # # Results: # The index into history, or an error if the index didn't match. - proc tcl::HistIndex {event} { +proc ::tcl::HistIndex {event} { variable history - if {[catch {expr {~$event}}]} { + if {![string is integer -strict $event]} { for {set i [expr {$history(nextid)-1}]} {[info exists history($i)]} \ {incr i -1} { if {[string match $event* $history($i)]} { @@ -333,43 +250,64 @@ proc history {args} { } return $i } - + # tcl::HistEvent -- # # Map from an event specifier to the value in the history list. # # Parameters: -# event index of history item to redo. See index for a -# description of possible event patterns. +# event index of history item to redo. See index for a description of +# possible event patterns. # # Results: # The value from the history list. - proc tcl::HistEvent {event} { +proc ::tcl::HistEvent {{event -1}} { variable history set i [HistIndex $event] - if {[info exists history($i)]} { - return [string trimright $history($i) \ \n] - } else { - return ""; + if {![info exists history($i)]} { + return "" } + return [string trimright $history($i) \ \n] } - + # tcl::HistChange -- # # Replace a value in the history list. # # Parameters: -# cmd The new value to put into the history list. -# event (optional) index of history item to redo. See index for a -# description of possible event patterns. This defaults -# to 0, which specifies the current event. +# newValue The new value to put into the history list. +# event (optional) index of history item to redo. See index for a +# description of possible event patterns. This defaults to 0, +# which specifies the current event. # # Side Effects: # Changes the history list. - proc tcl::HistChange {cmd {event 0}} { +proc ::tcl::HistChange {newValue {event 0}} { variable history set i [HistIndex $event] - set history($i) $cmd + set history($i) $newValue } + +# tcl::HistNextID -- +# +# Returns the number of the next history event. +# +# Parameters: +# None. +# +# Side Effects: +# None. + +proc ::tcl::HistNextID {} { + variable history + return [expr {$history(nextid) + 1}] +} + +return + +# Local Variables: +# mode: tcl +# fill-column: 78 +# End: diff --git a/tests/history.test b/tests/history.test index b283b1a..3f02aa0 100644 --- a/tests/history.test +++ b/tests/history.test @@ -1,17 +1,17 @@ # Commands covered: history # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: history.test,v 1.6 2004/05/19 12:43:03 dkf Exp $ +# RCS: @(#) $Id: history.test,v 1.7 2009/07/25 21:51:02 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -35,7 +35,7 @@ if {[testConstraint history]} { # Dummy value, must be numeric set num 0 } - + # "history event" test history-1.1 {event option} history {history event -1} \ @@ -245,8 +245,8 @@ test history-9.1 {miscellaneous} history {catch {history gorp} msg} 1 test history-9.2 {miscellaneous} history { catch {history gorp} msg set msg -} {bad option "gorp": must be add, change, clear, event, info, keep, nextid, or redo} - +} {unknown or ambiguous subcommand "gorp": must be add, change, clear, event, info, keep, nextid, or redo} + # cleanup ::tcltest::cleanupTests return -- cgit v0.12 From 0f7eef166b3bb7356a7ffa55ea7e157e7e389634 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 25 Jul 2009 22:00:10 +0000 Subject: Correct "incidental" test failure; exact error message generated by ::tcl::HistAdd changed --- tests/init.test | 88 ++++++++++++++++++++++----------------------------------- 1 file changed, 33 insertions(+), 55 deletions(-) diff --git a/tests/init.test b/tests/init.test index 4e9f8bb..41b8382 100644 --- a/tests/init.test +++ b/tests/init.test @@ -1,16 +1,16 @@ -# Functionality covered: this file contains a collection of tests for the -# auto loading and namespaces. +# Functionality covered: this file contains a collection of tests for the auto +# loading and namespaces. # -# Sourcing this file into Tcl runs the tests and generates output for -# errors. No output means no errors were found. +# Sourcing this file into Tcl runs the tests and generates output for errors. +# No output means no errors were found. # # Copyright (c) 1997 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: init.test,v 1.18 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: init.test,v 1.19 2009/07/25 22:00:10 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -19,45 +19,36 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Clear out any namespaces called test_ns_* catch {namespace delete {*}[namespace children :: test_ns_*]} - + # Six cases - white box testing test init-1.1 {auto_qualify - absolute cmd - namespace} { auto_qualify ::foo::bar ::blue } ::foo::bar - test init-1.2 {auto_qualify - absolute cmd - global} { auto_qualify ::global ::sub } global - test init-1.3 {auto_qualify - no colons cmd - global} { auto_qualify nocolons :: } nocolons - test init-1.4 {auto_qualify - no colons cmd - namespace} { auto_qualify nocolons ::sub } {::sub::nocolons nocolons} - test init-1.5 {auto_qualify - colons in cmd - global} { auto_qualify foo::bar :: } ::foo::bar - test init-1.6 {auto_qualify - colons in cmd - namespace} { auto_qualify foo::bar ::sub } {::sub::foo::bar ::foo::bar} - # Some additional tests - test init-1.7 {auto_qualify - multiples colons 1} { auto_qualify :::foo::::bar ::blue } ::foo::bar - test init-1.8 {auto_qualify - multiple colons 2} { auto_qualify :::foo ::bar } foo - - -# we use a sub interp and auto_reset and double the tests because there is 2 + +# We use a sub-interp and auto_reset and double the tests because there is 2 # places where auto_loading occur (before loading the indexes files and after) set testInterp [interp create] @@ -69,63 +60,48 @@ interp eval $testInterp { auto_reset catch {rename parray {}} - + test init-2.0 {load parray - stage 1} { set ret [catch {parray} error] - rename parray {} ; # remove it, for the next test - that should not fail. + rename parray {} ;# remove it, for the next test - that should not fail. list $ret $error } {1 {wrong # args: should be "parray a ?pattern?"}} - - test init-2.1 {load parray - stage 2} { set ret [catch {parray} error] list $ret $error } {1 {wrong # args: should be "parray a ?pattern?"}} - - auto_reset catch {rename ::safe::setLogCmd {}} #unset auto_index(::safe::setLogCmd) #unset auto_oldpath - test init-2.2 {load ::safe::setLogCmd - stage 1} { ::safe::setLogCmd - rename ::safe::setLogCmd {} ; # should not fail + rename ::safe::setLogCmd {} ;# should not fail } {} - test init-2.3 {load ::safe::setLogCmd - stage 2} { ::safe::setLogCmd - rename ::safe::setLogCmd {} ; # should not fail + rename ::safe::setLogCmd {} ;# should not fail } {} - auto_reset catch {rename ::safe::setLogCmd {}} - test init-2.4 {load safe:::setLogCmd - stage 1} { - safe:::setLogCmd ; # intentionally 3 : - rename ::safe::setLogCmd {} ; # should not fail + safe:::setLogCmd ;# intentionally 3 : + rename ::safe::setLogCmd {} ;# should not fail } {} - test init-2.5 {load safe:::setLogCmd - stage 2} { - safe:::setLogCmd ; # intentionally 3 : - rename ::safe::setLogCmd {} ; # should not fail + safe:::setLogCmd ;# intentionally 3 : + rename ::safe::setLogCmd {} ;# should not fail } {} - auto_reset catch {rename ::safe::setLogCmd {}} - test init-2.6 {load setLogCmd from safe:: - stage 1} { namespace eval safe setLogCmd - rename ::safe::setLogCmd {} ; # should not fail + rename ::safe::setLogCmd {} ;# should not fail } {} - test init-2.7 {oad setLogCmd from safe:: - stage 2} { namespace eval safe setLogCmd - rename ::safe::setLogCmd {} ; # should not fail + rename ::safe::setLogCmd {} ;# should not fail } {} - - - test init-2.8 {load tcl::HistAdd} -setup { auto_reset catch {rename ::tcl::HistAdd {}} @@ -133,20 +109,19 @@ test init-2.8 {load tcl::HistAdd} -setup { # 3 ':' on purpose list [catch {tcl:::HistAdd} error] $error } -cleanup { - rename ::tcl::HistAdd {} ; -} -result {1 {wrong # args: should be "tcl:::HistAdd command ?exec?"}} - - + rename ::tcl::HistAdd {} +} -result {1 {wrong # args: should be "tcl:::HistAdd event ?exec?"}} + test init-3.0 {random stuff in the auto_index, should still work} { set auto_index(foo:::bar::blah) { namespace eval foo {namespace eval bar {proc blah {} {return 1}}} } foo:::bar::blah } 1 - -# Tests that compare the error stack trace generated when autoloading -# with that generated when no autoloading is necessary. Ideally they -# should be the same. + +# Tests that compare the error stack trace generated when autoloading with +# that generated when no autoloading is necessary. Ideally they should be the +# same. set count 0 foreach arg [subst -nocommands -novariables { @@ -180,7 +155,6 @@ foreach arg [subst -nocommands -novariables { set second $::errorInfo string equal $first $second } 1 - test init-4.$count.1 {::errorInfo produced by [unknown]} { auto_reset namespace eval junk [list array set $arg [list 1 2 3 4]] @@ -195,7 +169,7 @@ foreach arg [subst -nocommands -novariables { incr count } - + test init-5.0 {return options passed through ::unknown} -setup { catch {rename xxx {}} set ::auto_index(::xxx) {proc ::xxx {} { @@ -208,7 +182,7 @@ test init-5.0 {return options passed through ::unknown} -setup { } -cleanup { unset ::auto_index(::xxx) } -result {2 xxx {-errorcode NONE -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE}} - + cleanupTests } ;# End of [interp eval $testInterp] @@ -217,3 +191,7 @@ interp delete $testInterp ::tcltest::cleanupTests return +# Local Variables: +# mode: tcl +# fill-column: 78 +# End: -- cgit v0.12 From 6a8a3ddd0048b448c24644805f40800eab6464dd Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 26 Jul 2009 07:57:56 +0000 Subject: [Bug 2827066] msys build --enable-symbols broken And modified the same for unicows.dll, as a preparation for [Enh 2819611] --- ChangeLog | 6 ++++++ win/Makefile.in | 15 ++++++++++----- win/configure | 4 +++- win/tcl.m4 | 1 + 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3be3af2..85fcd40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-26 Jan Nijtmans + + * win/Makefile.in: [Bug 2827066] msys build --enable-symbols broken + * win/tcl.m4 And modified the same for unicows.dll, as a + * win/configure preparation for [Enh 2819611] + 2009-07-25 Donal K. Fellows * library/history.tcl (history): Reworked the history mechanism in diff --git a/win/Makefile.in b/win/Makefile.in index f83000e..4b9c6df 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.158 2009/07/23 23:02:00 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.159 2009/07/26 07:57:57 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -135,14 +135,15 @@ TCL_DLL_FILE = @TCL_DLL_FILE@ TCL_STATIC_LIB_FILE = @TCL_STATIC_LIB_FILE@ TCL_IMPORT_LIB_FILE = @TCL_IMPORT_LIB_FILE@ TCL_LIB_FILE = @TCL_LIB_FILE@ -ZLIB_DLL_FILE = zlib1${DLLSUFFIX} +ZLIB_DLL_FILE = zlib1.dll +UNICOWS_DLL_FILE = unicows.dll DDE_DLL_FILE = tcldde$(DDEVER)${DLLSUFFIX} DDE_LIB_FILE = tcldde$(DDEVER)${LIBSUFFIX} REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX} REG_LIB_FILE = tclreg$(REGVER)${LIBSUFFIX} PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX} -SHARED_LIBRARIES = $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TCL_STUB_LIB_FILE) \ +SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @UNICOWS_DLL_FILE@ $(TCL_STUB_LIB_FILE) \ $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE) STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) @@ -437,7 +438,7 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} @MAKE_LIB@ ${STUB_OBJS} @POST_MAKE_LIB@ -${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ +${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @UNICOWS_DLL_FILE@ @$(RM) ${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE) @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) @@ -468,6 +469,10 @@ ${REG_LIB_FILE}: ${REG_OBJS} ${TCL_LIB_FILE} ${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} @$(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE} +# use pre-built unicows.dll +${UNICOWS_DLL_FILE}: $(COMPAT_DIR)/mslu/${UNICOWS_DLL_FILE} + @$(COPY) $(COMPAT_DIR)/mslu/${UNICOWS_DLL_FILE} ${UNICOWS_DLL_FILE} + # PIPE_DLL_FILE is actually an executable, don't build it like a DLL. ${PIPE_DLL_FILE}: ${PIPE_OBJS} @@ -622,7 +627,7 @@ install-binaries: binaries else true; \ fi; \ done; - @for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TCLSH) $(PIPE_DLL_FILE); \ + @for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(UNICOWS_DLL_FILE) $(TCLSH) $(PIPE_DLL_FILE); \ do \ if [ -f $$i ]; then \ echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \ diff --git a/win/configure b/win/configure index e17858b..2dba16e 100755 --- a/win/configure +++ b/win/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR UNICOWS_DLL_FILE DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -4327,6 +4327,7 @@ _ACEOF fi + # DL_LIBS is empty, but then we match the Unix version @@ -5288,6 +5289,7 @@ s,@SET_MAKE@,$SET_MAKE,;t t s,@TCL_THREADS@,$TCL_THREADS,;t t s,@CYGPATH@,$CYGPATH,;t t s,@CELIB_DIR@,$CELIB_DIR,;t t +s,@UNICOWS_DLL_FILE@,$UNICOWS_DLL_FILE,;t t s,@DL_LIBS@,$DL_LIBS,;t t s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t diff --git a/win/tcl.m4 b/win/tcl.m4 index 4b55dc4..6872a99 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -777,6 +777,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ if test "$do64bit" != "no" ; then AC_DEFINE(TCL_CFG_DO64BIT) fi + AC_SUBST(UNICOWS_DLL_FILE) # DL_LIBS is empty, but then we match the Unix version AC_SUBST(DL_LIBS) -- cgit v0.12 From e63d03a4041d0bad29310200c93a63dbc132363d Mon Sep 17 00:00:00 2001 From: ferrieux Date: Sun, 26 Jul 2009 11:26:13 +0000 Subject: Forced LF translation when generating .h's to avoid spurious diffs when regenerating on a Windows box. --- ChangeLog | 5 +++++ tools/genStubs.tcl | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 85fcd40..12d2258 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-26 Alexandre Ferrieux + + * tools/genStubs.tcl: Forced LF translation when generating .h's + to avoid spurious diffs when regenerating on a Windows box. + 2009-07-26 Jan Nijtmans * win/Makefile.in: [Bug 2827066] msys build --enable-symbols broken diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 03f7ba5..7b89fe9 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.31 2009/07/23 23:02:00 andreas_kupries Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.32 2009/07/26 11:26:14 ferrieux Exp $ package require Tcl 8.4 @@ -207,6 +207,7 @@ proc genStubs::rewriteFile {file text} { } set in [open ${file} r] set out [open ${file}.new w] + fconfigure $out -translation lf while {![eof $in]} { set line [gets $in] -- cgit v0.12 From 28382cdb6fac8d003aae6aa6f51e1f697a98b0bb Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 26 Jul 2009 11:40:23 +0000 Subject: Use [try] to replace obscurer uses of [catch]. --- ChangeLog | 43 +++-- library/auto.tcl | 262 +++++++++++++++--------------- library/package.tcl | 252 ++++++++++++++--------------- library/safe.tcl | 452 ++++++++++++++++++++++++++-------------------------- library/tm.tcl | 214 ++++++++++++------------- 5 files changed, 612 insertions(+), 611 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12d2258..f907b8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,22 @@ +2009-07-26 Donal K. Fellows + + * library/auto.tcl (tcl_findLibrary, auto_mkindex): + * library/package.tcl (pkg_mkIndex, tclPkgUnknown, MacOSXPkgUnknown): + * library/safe.tcl (interpAddToAccessPath, interpDelete, AliasGlob): + (AliasSource, AliasLoad, AliasEncoding): + * library/tm.tcl (UnknownHandler): Simplify by swapping some [catch] + gymnastics for use of [try]. + 2009-07-26 Alexandre Ferrieux - * tools/genStubs.tcl: Forced LF translation when generating .h's - to avoid spurious diffs when regenerating on a Windows box. + * tools/genStubs.tcl: Forced LF translation when generating .h's to + avoid spurious diffs when regenerating on a Windows box. 2009-07-26 Jan Nijtmans - * win/Makefile.in: [Bug 2827066] msys build --enable-symbols broken - * win/tcl.m4 And modified the same for unicows.dll, as a - * win/configure preparation for [Enh 2819611] + * win/Makefile.in: [Bug 2827066]: msys build --enable-symbols broken + * win/tcl.m4: And modified the same for unicows.dll, as a + * win/configure: preparation for [Enh 2819611]. 2009-07-25 Donal K. Fellows @@ -52,9 +61,9 @@ 2009-07-21 Kevin B. Kenny - * library/tzdata/Asia/Dhaka: + * library/tzdata/Asia/Dhaka: * library/tzdata/Indian/Mauritius: Olson's tzdata2009k. - + 2009-07-20 Donal K. Fellows * generic/tclCmdMZ.c (StringIsCmd): Reorganize so that [string is] is @@ -109,13 +118,13 @@ * generic/tclCmdMZ.c (Tcl_SwitchObjCmd): * tests/switch.test (switch-15.1): [Bug 2821401]: Make non-bytecoded [switch] command aware of NRE. - + 2009-07-13 Andreas Kupries * generic/tclCompile.c (TclInitCompileEnv, EnterCmdWordIndex) (TclCleanupByteCode, TclCompileScript): - * generic/tclExecute.c (TclCompileObj, TclExecuteByteCode): - * tclCompile.h (ExtCmdLoc): + * generic/tclExecute.c (TclCompileObj, TclExecuteByteCode): + * tclCompile.h (ExtCmdLoc): * tclInt.h (ExtIndex, CFWordBC, CmdFrame): * tclBasic.c (DeleteInterpProc, TclArgumentBCEnter) (TclArgumentBCRelease, TclArgumentGet, SAVE_CONTEXT) @@ -183,8 +192,8 @@ * tests/zlib.test: ZlibTransformClose may be called with a NULL * generic/tclZlib.c: interpreter during finalization and - Tcl_SetChannelError requires a list. Added some tests to ensure - error propagation from the zlib library to the interp. + Tcl_SetChannelError requires a list. Added some tests to ensure error + propagation from the zlib library to the interp. 2009-07-09 Pat Thoyts @@ -242,9 +251,9 @@ 2009-06-18 Donal K. Fellows * generic/tclCkalloc.c (MemoryCmd): [Bug 988703]: - * generic/tclObj.c (ObjData, TclFinalizeThreadObjects): Add - mechanism for discovering what Tcl_Objs are allocated when built - for memory debugging. Developed by Joe Mistachkin. + * generic/tclObj.c (ObjData, TclFinalizeThreadObjects): Add mechanism + for discovering what Tcl_Objs are allocated when built for memory + debugging. Developed by Joe Mistachkin. 2009-06-17 Alexandre Ferrieux @@ -305,7 +314,7 @@ to the Tcl caller in the event of a syntax error, so did so. * generic/tclDate.c: bison 2.3 - + 2006-06-08 Kevin B. Kenny * library/tzdata/Asia/Dhaka: New DST rule for Bangladesh. (Olson's @@ -333,7 +342,7 @@ * library/tzdata/Africa/Cairo: * library/tzdata/Asia/Amman: Olson's tzdata2009h. - + 2009-05-29 Andreas Kupries * library/platform/platform.tcl: Fixed handling of cpu ia64, diff --git a/library/auto.tcl b/library/auto.tcl index 881e6b9..7d4c340 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -1,22 +1,22 @@ # auto.tcl -- # -# utility procs formerly in init.tcl dealing with auto execution -# of commands and can be auto loaded themselves. +# utility procs formerly in init.tcl dealing with auto execution of commands +# and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.28 2006/11/03 00:34:52 hobbs Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.29 2009/07/26 11:40:23 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # # auto_reset -- # -# Destroy all cached information for auto-loading and auto-execution, -# so that the information gets recomputed the next time it's needed. -# Also delete any commands that are listed in the auto-load index. +# Destroy all cached information for auto-loading and auto-execution, so that +# the information gets recomputed the next time it's needed. Also delete any +# commands that are listed in the auto-load index. # # Arguments: # None. @@ -32,18 +32,16 @@ proc auto_reset {} { unset -nocomplain ::auto_execs ::auto_index ::tcl::auto_oldpath if {[catch {llength $::auto_path}]} { set ::auto_path [list [info library]] - } else { - if {[info library] ni $::auto_path} { - lappend ::auto_path [info library] - } + } elseif {[info library] ni $::auto_path} { + lappend ::auto_path [info library] } } # tcl_findLibrary -- # # This is a utility for extensions that searches for a library directory -# using a canonical searching algorithm. A side effect is to source -# the initialization script and set a global library variable. +# using a canonical searching algorithm. A side effect is to source the +# initialization script and set a global library variable. # # Arguments: # basename Prefix of the directory name, (e.g., "tk") @@ -68,21 +66,25 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # Do the canonical search - # 1. From an environment variable, if it exists. - # Placing this first gives the end-user ultimate control - # to work-around any bugs, or to customize. + # 1. From an environment variable, if it exists. Placing this first + # gives the end-user ultimate control to work-around any bugs, or + # to customize. if {[info exists env($enVarName)]} { lappend dirs $env($enVarName) } - # 2. In the package script directory registered within - # the configuration of the package itself. + # 2. In the package script directory registered within the + # configuration of the package itself. - if {[catch { + try { ::${basename}::pkgconfig get scriptdir,runtime - } value] == 0} { + } on ok value { lappend dirs $value + } on error {msg opts} { + if {![string match "invalid command name *" $msg]} { + return -options $opts $msg + } } # 3. Relative to auto_path directories. This checks relative to the @@ -90,8 +92,10 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # auto_path that is not relative to the core library or binary paths. foreach d $::auto_path { lappend dirs [file join $d $basename$version] - if {$::tcl_platform(platform) eq "unix" - && $::tcl_platform(os) eq "Darwin"} { + if { + $::tcl_platform(platform) eq "unix" + && $::tcl_platform(os) eq "Darwin" + } then { # 4. On MacOSX, check the Resources/Scripts subdir too lappend dirs [file join $d $basename$version Resources Scripts] } @@ -102,8 +106,8 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # ../../lib/foo1.0 (From bin/arch directory in install hierarchy) # ../library (From unix directory in build hierarchy) # - # Remaining locations are out of date (when relevant, they ought - # to be covered by the $::auto_path seach above) and disabled. + # Remaining locations are out of date (when relevant, they ought to be + # covered by the $::auto_path seach above) and disabled. # # ../../library (From unix/arch directory in build hierarchy) # ../../foo1.0.1/library @@ -126,10 +130,10 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # uniquify $dirs in order array set seen {} foreach i $dirs { - # Take note that the [file normalize] below has been noted to - # cause difficulties for the freewrap utility. See Bug 1072136. - # Until freewrap resolves the matter, one might work around the - # problem by disabling that branch. + # Take note that the [file normalize] below has been noted to cause + # difficulties for the freewrap utility. See Bug 1072136. Until + # freewrap resolves the matter, one might work around the problem by + # disabling that branch. if {[interp issafe]} { set norm $i } else { @@ -144,16 +148,15 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { set the_library $i set file [file join $i $initScript] - # source everything when in a safe interpreter because - # we have a source command, but no file exists command + # source everything when in a safe interpreter because we have a + # source command, but no file exists command if {[interp issafe] || [file exists $file]} { if {![catch {uplevel #0 [list source $file]} msg opts]} { return - } else { - append errors "$file: $msg\n" - append errors [dict get $opts -errorinfo]\n } + append errors "$file: $msg\n" + append errors [dict get $opts -errorinfo]\n } } unset -nocomplain the_library @@ -168,28 +171,28 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # ---------------------------------------------------------------------- # auto_mkindex # ---------------------------------------------------------------------- -# The following procedures are used to generate the tclIndex file -# from Tcl source files. They use a special safe interpreter to -# parse Tcl source files, writing out index entries as "proc" -# commands are encountered. This implementation won't work in a -# safe interpreter, since a safe interpreter can't create the -# special parser and mess with its commands. +# The following procedures are used to generate the tclIndex file from Tcl +# source files. They use a special safe interpreter to parse Tcl source +# files, writing out index entries as "proc" commands are encountered. This +# implementation won't work in a safe interpreter, since a safe interpreter +# can't create the special parser and mess with its commands. if {[interp issafe]} { return ;# Stop sourcing the file here } # auto_mkindex -- -# Regenerate a tclIndex file from Tcl source files. Takes as argument -# the name of the directory in which the tclIndex file is to be placed, -# followed by any number of glob patterns to use in that directory to -# locate all of the relevant files. +# Regenerate a tclIndex file from Tcl source files. Takes as argument the +# name of the directory in which the tclIndex file is to be placed, followed +# by any number of glob patterns to use in that directory to locate all of the +# relevant files. # # Arguments: # dir - Name of the directory in which to create an index. -# args - Any number of additional arguments giving the -# names of files within dir. If no additional -# are given auto_mkindex will look for *.tcl. + +# args - Any number of additional arguments giving the names of files +# within dir. If no additional are given auto_mkindex will look +# for *.tcl. proc auto_mkindex {dir args} { if {[interp issafe]} { @@ -198,7 +201,6 @@ proc auto_mkindex {dir args} { set oldDir [pwd] cd $dir - set dir [pwd] append index "# Tcl autoload index file, version 2.0\n" append index "# This file is generated by the \"auto_mkindex\" command\n" @@ -213,12 +215,12 @@ proc auto_mkindex {dir args} { auto_mkindex_parser::init foreach file [glob -- {*}$args] { - if {[catch {auto_mkindex_parser::mkindex $file} msg opts] == 0} { - append index $msg - } else { - cd $oldDir + try { + append index [auto_mkindex_parser::mkindex $file] + } on error {msg opts} { + cd $oldDir return -options $opts $msg - } + } } auto_mkindex_parser::cleanup @@ -228,8 +230,8 @@ proc auto_mkindex {dir args} { cd $oldDir } -# Original version of auto_mkindex that just searches the source -# code for "proc" at the beginning of the line. +# Original version of auto_mkindex that just searches the source code for +# "proc" at the beginning of the line. proc auto_mkindex_old {dir args} { set oldDir [pwd] @@ -280,9 +282,9 @@ proc auto_mkindex_old {dir args} { } # Create a safe interpreter that can be used to parse Tcl source files -# generate a tclIndex file for autoloading. This interp contains -# commands for things that need index entries. Each time a command -# is executed, it writes an entry out to the index file. +# generate a tclIndex file for autoloading. This interp contains commands for +# things that need index entries. Each time a command is executed, it writes +# an entry out to the index file. namespace eval auto_mkindex_parser { variable parser "" ;# parser used to build index @@ -334,10 +336,10 @@ namespace eval auto_mkindex_parser { # auto_mkindex_parser::mkindex -- # -# Used by the "auto_mkindex" command to create a "tclIndex" file for -# the given Tcl source file. Executes the commands in the file, and -# handles things like the "proc" command by adding an entry for the -# index file. Returns a string that represents the index file. +# Used by the "auto_mkindex" command to create a "tclIndex" file for the given +# Tcl source file. Executes the commands in the file, and handles things like +# the "proc" command by adding an entry for the index file. Returns a string +# that represents the index file. # # Arguments: # file Name of Tcl source file to be indexed. @@ -355,14 +357,13 @@ proc auto_mkindex_parser::mkindex {file} { set contents [read $fid] close $fid - # There is one problem with sourcing files into the safe - # interpreter: references like "$x" will fail since code is not - # really being executed and variables do not really exist. - # To avoid this, we replace all $ with \0 (literally, the null char) - # later, when getting proc names we will have to reverse this replacement, - # in case there were any $ in the proc name. This will cause a problem - # if somebody actually tries to have a \0 in their proc name. Too bad - # for them. + # There is one problem with sourcing files into the safe interpreter: + # references like "$x" will fail since code is not really being executed + # and variables do not really exist. To avoid this, we replace all $ with + # \0 (literally, the null char) later, when getting proc names we will + # have to reverse this replacement, in case there were any $ in the proc + # name. This will cause a problem if somebody actually tries to have a \0 + # in their proc name. Too bad for them. set contents [string map [list \$ \0] $contents] set index "" @@ -379,10 +380,10 @@ proc auto_mkindex_parser::mkindex {file} { # auto_mkindex_parser::hook command # -# Registers a Tcl command to evaluate when initializing the -# slave interpreter used by the mkindex parser. -# The command is evaluated in the master interpreter, and can -# use the variable auto_mkindex_parser::parser to get to the slave +# Registers a Tcl command to evaluate when initializing the slave interpreter +# used by the mkindex parser. The command is evaluated in the master +# interpreter, and can use the variable auto_mkindex_parser::parser to get to +# the slave proc auto_mkindex_parser::hook {cmd} { variable initCommands @@ -392,30 +393,30 @@ proc auto_mkindex_parser::hook {cmd} { # auto_mkindex_parser::slavehook command # -# Registers a Tcl command to evaluate when initializing the -# slave interpreter used by the mkindex parser. -# The command is evaluated in the slave interpreter. +# Registers a Tcl command to evaluate when initializing the slave interpreter +# used by the mkindex parser. The command is evaluated in the slave +# interpreter. proc auto_mkindex_parser::slavehook {cmd} { variable initCommands - # The $parser variable is defined to be the name of the - # slave interpreter when this command is used later. + # The $parser variable is defined to be the name of the slave interpreter + # when this command is used later. lappend initCommands "\$parser eval [list $cmd]" } # auto_mkindex_parser::command -- # -# Registers a new command with the "auto_mkindex_parser" interpreter -# that parses Tcl files. These commands are fake versions of things -# like the "proc" command. When you execute them, they simply write -# out an entry to a "tclIndex" file for auto-loading. +# Registers a new command with the "auto_mkindex_parser" interpreter that +# parses Tcl files. These commands are fake versions of things like the +# "proc" command. When you execute them, they simply write out an entry to a +# "tclIndex" file for auto-loading. # -# This procedure allows extensions to register their own commands -# with the auto_mkindex facility. For example, a package like -# [incr Tcl] might register a "class" command so that class definitions -# could be added to a "tclIndex" file for auto-loading. +# This procedure allows extensions to register their own commands with the +# auto_mkindex facility. For example, a package like [incr Tcl] might +# register a "class" command so that class definitions could be added to a +# "tclIndex" file for auto-loading. # # Arguments: # name Name of command recognized in Tcl files. @@ -428,8 +429,8 @@ proc auto_mkindex_parser::command {name arglist body} { # auto_mkindex_parser::commandInit -- # -# This does the actual work set up by auto_mkindex_parser::command -# This is called when the interpreter used by the parser is created. +# This does the actual work set up by auto_mkindex_parser::command. This is +# called when the interpreter used by the parser is created. # # Arguments: # name Name of command recognized in Tcl files. @@ -448,25 +449,23 @@ proc auto_mkindex_parser::commandInit {name arglist body} { } proc $fakeName $arglist $body - # YUK! Tcl won't let us alias fully qualified command names, - # so we can't handle names like "::itcl::class". Instead, - # we have to build procs with the fully qualified names, and - # have the procs point to the aliases. + # YUK! Tcl won't let us alias fully qualified command names, so we can't + # handle names like "::itcl::class". Instead, we have to build procs with + # the fully qualified names, and have the procs point to the aliases. if {[string match *::* $name]} { set exportCmd [list _%@namespace export [namespace tail $name]] $parser eval [list _%@namespace eval $ns $exportCmd] - # The following proc definition does not work if you - # want to tolerate space or something else diabolical - # in the procedure name, (i.e., space in $alias) - # The following does not work: + # The following proc definition does not work if you want to tolerate + # space or something else diabolical in the procedure name, (i.e., + # space in $alias). The following does not work: # "_%@eval {$alias} \$args" - # because $alias gets concat'ed to $args. - # The following does not work because $cmd is somehow undefined + # because $alias gets concat'ed to $args. The following does not work + # because $cmd is somehow undefined # "set cmd {$alias} \; _%@eval {\$cmd} \$args" - # A gold star to someone that can make test - # autoMkindex-3.3 work properly + # A gold star to someone that can make test autoMkindex-3.3 work + # properly set alias [namespace tail $fakeName] $parser invokehidden proc $name {args} "_%@eval {$alias} \$args" @@ -478,15 +477,14 @@ proc auto_mkindex_parser::commandInit {name arglist body} { } # auto_mkindex_parser::fullname -- -# Used by commands like "proc" within the auto_mkindex parser. -# Returns the qualified namespace name for the "name" argument. -# If the "name" does not start with "::", elements are added from -# the current namespace stack to produce a qualified name. Then, -# the name is examined to see whether or not it should really be -# qualified. If the name has more than the leading "::", it is -# returned as a fully qualified name. Otherwise, it is returned -# as a simple name. That way, the Tcl autoloader will recognize -# it properly. +# +# Used by commands like "proc" within the auto_mkindex parser. Returns the +# qualified namespace name for the "name" argument. If the "name" does not +# start with "::", elements are added from the current namespace stack to +# produce a qualified name. Then, the name is examined to see whether or not +# it should really be qualified. If the name has more than the leading "::", +# it is returned as a fully qualified name. Otherwise, it is returned as a +# simple name. That way, the Tcl autoloader will recognize it properly. # # Arguments: # name - Name that is being added to index. @@ -509,8 +507,8 @@ proc auto_mkindex_parser::fullname {name} { set name "::$name" } - # Earlier, mkindex replaced all $'s with \0. Now, we have to reverse - # that replacement. + # Earlier, mkindex replaced all $'s with \0. Now, we have to reverse that + # replacement. return [string map [list \0 \$] $name] } @@ -518,8 +516,8 @@ if {[llength $::auto_mkindex_parser::initCommands]} { return } -# Register all of the procedures for the auto_mkindex parser that -# will build the "tclIndex" file. +# Register all of the procedures for the auto_mkindex parser that will build +# the "tclIndex" file. # AUTO MKINDEX: proc name arglist body # Adds an entry to the auto index list for the given procedure name. @@ -536,17 +534,20 @@ auto_mkindex_parser::command proc {name args} { [file split $scriptFile]] "\n" } -# Conditionally add support for Tcl byte code files. There are some -# tricky details here. First, we need to get the tbcload library -# initialized in the current interpreter. We cannot load tbcload into the -# slave until we have done so because it needs access to the tcl_patchLevel -# variable. Second, because the package index file may defer loading the -# library until we invoke a command, we need to explicitly invoke auto_load -# to force it to be loaded. This should be a noop if the package has -# already been loaded +# Conditionally add support for Tcl byte code files. There are some tricky +# details here. First, we need to get the tbcload library initialized in the +# current interpreter. We cannot load tbcload into the slave until we have +# done so because it needs access to the tcl_patchLevel variable. Second, +# because the package index file may defer loading the library until we invoke +# a command, we need to explicitly invoke auto_load to force it to be loaded. +# This should be a noop if the package has already been loaded auto_mkindex_parser::hook { - if {![catch {package require tbcload}]} { + try { + package require tbcload + } on error {} { + # OK, don't have it so do nothing + } on ok {} { if {[namespace which -command tbcload::bcproc] eq ""} { auto_load tbcload::bcproc } @@ -570,16 +571,15 @@ auto_mkindex_parser::hook { } # AUTO MKINDEX: namespace eval name command ?arg arg...? -# Adds the namespace name onto the context stack and evaluates the -# associated body of commands. +# Adds the namespace name onto the context stack and evaluates the associated +# body of commands. # # AUTO MKINDEX: namespace import ?-force? pattern ?pattern...? -# Performs the "import" action in the parser interpreter. This is -# important for any commands contained in a namespace that affect -# the index. For example, a script may say "itcl::class ...", -# or it may import "itcl::*" and then say "class ...". This -# procedure does the import operation, but keeps track of imported -# patterns so we can remove the imports later. +# Performs the "import" action in the parser interpreter. This is important +# for any commands contained in a namespace that affect the index. For +# example, a script may say "itcl::class ...", or it may import "itcl::*" and +# then say "class ...". This procedure does the import operation, but keeps +# track of imported patterns so we can remove the imports later. auto_mkindex_parser::command namespace {op args} { switch -- $op { diff --git a/library/package.tcl b/library/package.tcl index 56dccd0..d8729b2 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl which can be loaded on demand # for package management. # -# RCS: @(#) $Id: package.tcl,v 1.36 2008/07/03 17:28:46 dgp Exp $ +# RCS: @(#) $Id: package.tcl,v 1.37 2009/07/26 11:40:23 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -16,9 +16,9 @@ namespace eval tcl::Pkg {} # ::tcl::Pkg::CompareExtension -- # -# Used internally by pkg_mkIndex to compare the extension of a file to -# a given extension. On Windows, it uses a case-insensitive comparison -# because the file system can be file insensitive. +# Used internally by pkg_mkIndex to compare the extension of a file to a given +# extension. On Windows, it uses a case-insensitive comparison because the +# file system can be file insensitive. # # Arguments: # fileName name of a file whose extension is compared @@ -59,11 +59,10 @@ proc tcl::Pkg::CompareExtension { fileName {ext {}} } { } # pkg_mkIndex -- -# This procedure creates a package index in a given directory. The -# package index consists of a "pkgIndex.tcl" file whose contents are -# a Tcl script that sets up package information with "package require" -# commands. The commands describe all of the packages defined by the -# files given as arguments. +# This procedure creates a package index in a given directory. The package +# index consists of a "pkgIndex.tcl" file whose contents are a Tcl script that +# sets up package information with "package require" commands. The commands +# describe all of the packages defined by the files given as arguments. # # Arguments: # -direct (optional) If this flag is present, the generated @@ -134,16 +133,17 @@ proc pkg_mkIndex {args} { set patternList [list "*.tcl" "*[info sharedlibextension]"] } - if {[catch { - glob -directory $dir -tails -types {r f} -- {*}$patternList - } fileList o]} { - return -options $o $fileList + try { + set fileList [glob -directory $dir -tails -types {r f} -- \ + {*}$patternList] + } on error {msg opt} { + return -options $opt $msg } foreach file $fileList { # For each file, figure out what commands and packages it provides. # To do this, create a child interpreter, load the file into the - # interpreter, and get a list of the new commands and packages - # that are defined. + # interpreter, and get a list of the new commands and packages that + # are defined. if {$file eq "pkgIndex.tcl"} { continue @@ -171,14 +171,17 @@ proc pkg_mkIndex {args} { if {$doVerbose} { tclLog "package [lindex $pkg 1] matches '$loadPat'" } - if {[catch { + try { load [lindex $pkg 0] [lindex $pkg 1] $c - } err]} { + } on error err { if {$doVerbose} { - tclLog "warning: load [lindex $pkg 0] [lindex $pkg 1]\nfailed with: $err" + tclLog "warning: load [lindex $pkg 0]\ + [lindex $pkg 1]\nfailed with: $err" + } + } on ok {} { + if {$doVerbose} { + tclLog "loaded [lindex $pkg 0] [lindex $pkg 1]" } - } elseif {$doVerbose} { - tclLog "loaded [lindex $pkg 0] [lindex $pkg 1]" } if {[lindex $pkg 1] eq "Tk"} { # Withdraw . if Tk was loaded, to avoid showing a window. @@ -187,21 +190,25 @@ proc pkg_mkIndex {args} { } $c eval { - # Stub out the package command so packages can - # require other packages. + # Stub out the package command so packages can require other + # packages. rename package __package_orig proc package {what args} { switch -- $what { - require { return ; # ignore transitive requires } - default { __package_orig $what {*}$args } + require { + return; # Ignore transitive requires + } + default { + __package_orig $what {*}$args + } } } proc tclPkgUnknown args {} package unknown tclPkgUnknown - # Stub out the unknown command so package can call - # into each other during their initialilzation. + # Stub out the unknown command so package can call into each other + # during their initialilzation. proc unknown {args} {} @@ -209,9 +216,9 @@ proc pkg_mkIndex {args} { proc auto_import {args} {} - # reserve the ::tcl namespace for support procs - # and temporary variables. This might make it awkward - # to generate a pkgIndex.tcl file for the ::tcl namespace. + # reserve the ::tcl namespace for support procs and temporary + # variables. This might make it awkward to generate a + # pkgIndex.tcl file for the ::tcl namespace. namespace eval ::tcl { variable dir ;# Current directory being processed @@ -232,22 +239,22 @@ proc pkg_mkIndex {args} { $c eval [list set ::tcl::file $file] $c eval [list set ::tcl::direct $direct] - # Download needed procedures into the slave because we've - # just deleted the unknown procedure. This doesn't handle - # procedures with default arguments. + # Download needed procedures into the slave because we've just deleted + # the unknown procedure. This doesn't handle procedures with default + # arguments. foreach p {::tcl::Pkg::CompareExtension} { $c eval [list namespace eval [namespace qualifiers $p] {}] $c eval [list proc $p [info args $p] [info body $p]] } - if {[catch { + try { $c eval { set ::tcl::debug "loading or sourcing" - # we need to track command defined by each package even in - # the -direct case, because they are needed internally by - # the "partial pkgIndex.tcl" step above. + # we need to track command defined by each package even in the + # -direct case, because they are needed internally by the + # "partial pkgIndex.tcl" step above. proc ::tcl::GetAllNamespaces {{root ::}} { set list $root @@ -269,18 +276,17 @@ proc pkg_mkIndex {args} { } set ::tcl::origCmds [info commands] - # Try to load the file if it has the shared library - # extension, otherwise source it. It's important not to - # try to load files that aren't shared libraries, because - # on some systems (like SunOS) the loader will abort the - # whole application when it gets an error. + # Try to load the file if it has the shared library extension, + # otherwise source it. It's important not to try to load + # files that aren't shared libraries, because on some systems + # (like SunOS) the loader will abort the whole application + # when it gets an error. if {[::tcl::Pkg::CompareExtension $::tcl::file [info sharedlibextension]]} { - # The "file join ." command below is necessary. - # Without it, if the file name has no \'s and we're - # on UNIX, the load command will invoke the - # LD_LIBRARY_PATH search mechanism, which could cause - # the wrong file to be used. + # The "file join ." command below is necessary. Without + # it, if the file name has no \'s and we're on UNIX, the + # load command will invoke the LD_LIBRARY_PATH search + # mechanism, which could cause the wrong file to be used. set ::tcl::debug loading load [file join $::tcl::dir $::tcl::file] @@ -291,11 +297,10 @@ proc pkg_mkIndex {args} { set ::tcl::type source } - # As a performance optimization, if we are creating - # direct load packages, don't bother figuring out the - # set of commands created by the new packages. We - # only need that list for setting up the autoloading - # used in the non-direct case. + # As a performance optimization, if we are creating direct + # load packages, don't bother figuring out the set of commands + # created by the new packages. We only need that list for + # setting up the autoloading used in the non-direct case. if { !$::tcl::direct } { # See what new namespaces appeared, and import commands # from them. Only exported commands go into the index. @@ -318,8 +323,9 @@ proc pkg_mkIndex {args} { set ::tcl::abs [namespace origin $::tcl::x] - # special case so that global names have no leading - # ::, this is required by the unknown command + # special case so that global names have no + # leading ::, this is required by the unknown + # command set ::tcl::abs \ [lindex [auto_qualify $::tcl::abs ::] 0] @@ -334,8 +340,8 @@ proc pkg_mkIndex {args} { } } - # Look through the packages that appeared, and if there is - # a version provided, then record it + # Look through the packages that appeared, and if there is a + # version provided, then record it foreach ::tcl::x [package names] { if {[package provide $::tcl::x] ne "" @@ -345,12 +351,12 @@ proc pkg_mkIndex {args} { } } } - } msg] == 1} { + } on error msg { set what [$c eval set ::tcl::debug] if {$doVerbose} { tclLog "warning: error while $what $file: $msg" } - } else { + } on ok {} { set what [$c eval set ::tcl::debug] if {$doVerbose} { tclLog "successful $what of $file" @@ -412,11 +418,10 @@ proc pkg_mkIndex {args} { } # tclPkgSetup -- -# This is a utility procedure use by pkgIndex.tcl files. It is invoked -# as part of a "package ifneeded" script. It calls "package provide" -# to indicate that a package is available, then sets entries in the -# auto_index array so that the package's files will be auto-loaded when -# the commands are used. +# This is a utility procedure use by pkgIndex.tcl files. It is invoked as +# part of a "package ifneeded" script. It calls "package provide" to indicate +# that a package is available, then sets entries in the auto_index array so +# that the package's files will be auto-loaded when the commands are used. # # Arguments: # dir - Directory containing all the files for this package. @@ -447,12 +452,12 @@ proc tclPkgSetup {dir pkg version files} { } # tclPkgUnknown -- -# This procedure provides the default for the "package unknown" function. -# It is invoked when a package that's needed can't be found. It scans -# the auto_path directories and their immediate children looking for -# pkgIndex.tcl files and sources any such files that are found to setup -# the package database. As it searches, it will recognize changes -# to the auto_path and scan any new directories. +# This procedure provides the default for the "package unknown" function. It +# is invoked when a package that's needed can't be found. It scans the +# auto_path directories and their immediate children looking for pkgIndex.tcl +# files and sources any such files that are found to setup the package +# database. As it searches, it will recognize changes to the auto_path and +# scan any new directories. # # Arguments: # name - Name of desired package. Not used. @@ -465,8 +470,8 @@ proc tclPkgUnknown {name args} { if {![info exists auto_path]} { return } - # Cache the auto_path, because it may change while we run through - # the first set of pkgIndex.tcl files + # Cache the auto_path, because it may change while we run through the + # first set of pkgIndex.tcl files set old_path [set use_path $auto_path] while {[llength $use_path]} { set dir [lindex $use_path end] @@ -478,24 +483,22 @@ proc tclPkgUnknown {name args} { } set tclSeenPath($dir) 1 - # we can't use glob in safe interps, so enclose the following - # in a catch statement, where we get the pkgIndex files out - # of the subdirectories + # we can't use glob in safe interps, so enclose the following in a + # catch statement, where we get the pkgIndex files out of the + # subdirectories catch { foreach file [glob -directory $dir -join -nocomplain \ * pkgIndex.tcl] { set dir [file dirname $file] if {![info exists procdDirs($dir)]} { - set code [catch {source $file} msg opt] - if {$code == 1 && - [lindex [dict get $opt -errorcode] 0] eq "POSIX" && - [lindex [dict get $opt -errorcode] 1] eq "EACCES"} { + try { + source $file + } trap {POSIX EACCES} {} { # $file was not readable; silently ignore continue - } - if {$code} { + } on error msg { tclLog "error reading package index file $file: $msg" - } else { + } on ok {} { set procdDirs($dir) 1 } } @@ -506,16 +509,14 @@ proc tclPkgUnknown {name args} { set file [file join $dir pkgIndex.tcl] # safe interps usually don't have "file exists", if {([interp issafe] || [file exists $file])} { - set code [catch {source $file} msg opt] - if {$code == 1 && - [lindex [dict get $opt -errorcode] 0] eq "POSIX" && - [lindex [dict get $opt -errorcode] 1] eq "EACCES"} { + try { + source $file + } trap {POSIX EACCES} {} { # $file was not readable; silently ignore continue - } - if {$code} { + } on error msg { tclLog "error reading package index file $file: $msg" - } else { + } on ok {} { set procdDirs($dir) 1 } } @@ -523,12 +524,11 @@ proc tclPkgUnknown {name args} { set use_path [lrange $use_path 0 end-1] - # Check whether any of the index scripts we [source]d above - # set a new value for $::auto_path. If so, then find any - # new directories on the $::auto_path, and lappend them to - # the $use_path we are working from. This gives index scripts - # the (arguably unwise) power to expand the index script search - # path while the search is in progress. + # Check whether any of the index scripts we [source]d above set a new + # value for $::auto_path. If so, then find any new directories on the + # $::auto_path, and lappend them to the $use_path we are working from. + # This gives index scripts the (arguably unwise) power to expand the + # index script search path while the search is in progress. set index 0 if {[llength $old_path] == [llength $auto_path]} { foreach dir $auto_path old $old_path { @@ -540,11 +540,11 @@ proc tclPkgUnknown {name args} { } } - # $index now points to the first element of $auto_path that - # has changed, or the beginning if $auto_path has changed length - # Scan the new elements of $auto_path for directories to add to - # $use_path. Don't add directories we've already seen, or ones - # already on the $use_path. + # $index now points to the first element of $auto_path that has + # changed, or the beginning if $auto_path has changed length Scan the + # new elements of $auto_path for directories to add to $use_path. + # Don't add directories we've already seen, or ones already on the + # $use_path. foreach dir [lrange $auto_path $index end] { if {![info exists tclSeenPath($dir)] && ([lsearch -exact $use_path $dir] == -1) } { @@ -556,9 +556,9 @@ proc tclPkgUnknown {name args} { } # tcl::MacOSXPkgUnknown -- -# This procedure extends the "package unknown" function for MacOSX. -# It scans the Resources/Scripts directories of the immediate children -# of the auto_path directories for pkgIndex files. +# This procedure extends the "package unknown" function for MacOSX. It scans +# the Resources/Scripts directories of the immediate children of the auto_path +# directories for pkgIndex files. # # Arguments: # original - original [package unknown] procedure @@ -567,7 +567,6 @@ proc tclPkgUnknown {name args} { # exact - Either "-exact" or omitted. Not used. proc tcl::MacOSXPkgUnknown {original name args} { - # First do the cross-platform default search uplevel 1 $original [linsert $args 0 $name] @@ -577,8 +576,8 @@ proc tcl::MacOSXPkgUnknown {original name args} { if {![info exists auto_path]} { return } - # Cache the auto_path, because it may change while we run through - # the first set of pkgIndex.tcl files + # Cache the auto_path, because it may change while we run through the + # first set of pkgIndex.tcl files set old_path [set use_path $auto_path] while {[llength $use_path]} { set dir [lindex $use_path end] @@ -595,28 +594,25 @@ proc tcl::MacOSXPkgUnknown {original name args} { * Resources Scripts pkgIndex.tcl] { set dir [file dirname $file] if {![info exists procdDirs($dir)]} { - set code [catch {source $file} msg opt] - if {$code == 1 && - [lindex [dict get $opt -errorcode] 0] eq "POSIX" && - [lindex [dict get $opt -errorcode] 1] eq "EACCES"} { + try { + source $file + } trap {POSIX EACCES} {} { # $file was not readable; silently ignore continue - } - if {$code} { + } on error msg { tclLog "error reading package index file $file: $msg" - } else { + } on ok {} { set procdDirs($dir) 1 } } } set use_path [lrange $use_path 0 end-1] - # Check whether any of the index scripts we [source]d above - # set a new value for $::auto_path. If so, then find any - # new directories on the $::auto_path, and lappend them to - # the $use_path we are working from. This gives index scripts - # the (arguably unwise) power to expand the index script search - # path while the search is in progress. + # Check whether any of the index scripts we [source]d above set a new + # value for $::auto_path. If so, then find any new directories on the + # $::auto_path, and lappend them to the $use_path we are working from. + # This gives index scripts the (arguably unwise) power to expand the + # index script search path while the search is in progress. set index 0 if {[llength $old_path] == [llength $auto_path]} { foreach dir $auto_path old $old_path { @@ -628,11 +624,11 @@ proc tcl::MacOSXPkgUnknown {original name args} { } } - # $index now points to the first element of $auto_path that - # has changed, or the beginning if $auto_path has changed length - # Scan the new elements of $auto_path for directories to add to - # $use_path. Don't add directories we've already seen, or ones - # already on the $use_path. + # $index now points to the first element of $auto_path that has + # changed, or the beginning if $auto_path has changed length Scan the + # new elements of $auto_path for directories to add to $use_path. + # Don't add directories we've already seen, or ones already on the + # $use_path. foreach dir [lrange $auto_path $index end] { if {![info exists tclSeenPath($dir)] && ([lsearch -exact $use_path $dir] == -1) } { @@ -659,12 +655,12 @@ proc tcl::MacOSXPkgUnknown {original name args} { # # Any number of -load and -source parameters may be # specified, so long as there is at least one -load or -# -source parameter. If the procs component of a -# module specifier is left off, that module will be -# set up for direct loading; otherwise, it will be -# set up for lazy loading. If both -source and -load -# are specified, the -load'ed files will be loaded -# first, followed by the -source'd files. +# -source parameter. If the procs component of a module +# specifier is left off, that module will be set up for +# direct loading; otherwise, it will be set up for lazy +# loading. If both -source and -load are specified, the +# -load'ed files will be loaded first, followed by the +# -source'd files. # # Results: # An appropriate "package ifneeded" statement for the package. diff --git a/library/safe.tcl b/library/safe.tcl index afdf639..5a3d4d0 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -9,20 +9,20 @@ # # Copyright (c) 1996-1997 Sun Microsystems, Inc. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.17 2008/06/25 17:40:03 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.18 2009/07/26 11:40:24 dkf Exp $ # -# The implementation is based on namespaces. These naming conventions -# are followed: +# The implementation is based on namespaces. These naming conventions are +# followed: # Private procs starts with uppercase. # Public procs are exported and starts with lowercase # # Needed utilities package -package require opt 0.4.1; +package require opt 0.4.1 # Create the safe namespace namespace eval ::safe { @@ -37,8 +37,8 @@ namespace eval ::safe { # #### - # Make sure that our temporary variable is local to this - # namespace. [Bug 981733] + # Make sure that our temporary variable is local to this namespace. [Bug + # 981733] variable temp # Share the descriptions @@ -55,28 +55,27 @@ namespace eval ::safe { ::tcl::OptKeyRegister { {?slave? -name {} "name of the slave (optional)"} } ::safe::interpCreate - # adding the flags sub programs to the command program - # (relying on Opt's internal implementation details) + # adding the flags sub programs to the command program (relying on Opt's + # internal implementation details) lappend ::tcl::OptDesc(::safe::interpCreate) $::tcl::OptDesc($temp) # init and configure (slave is needed) ::tcl::OptKeyRegister { {slave -name {} "name of the slave"} } ::safe::interpIC - # adding the flags sub programs to the command program - # (relying on Opt's internal implementation details) + # adding the flags sub programs to the command program (relying on Opt's + # internal implementation details) lappend ::tcl::OptDesc(::safe::interpIC) $::tcl::OptDesc($temp) # temp not needed anymore ::tcl::OptKeyDelete $temp - - # Helper function to resolve the dual way of specifying staticsok - # (either by -noStatics or -statics 0) + # Helper function to resolve the dual way of specifying staticsok (either + # by -noStatics or -statics 0) proc InterpStatics {} { foreach v {Args statics noStatics} { upvar $v $v } - set flag [::tcl::OptProcArgGiven -noStatics]; + set flag [::tcl::OptProcArgGiven -noStatics] if {$flag && (!$noStatics == !$statics) && ([::tcl::OptProcArgGiven -statics])} { return -code error\ @@ -95,9 +94,9 @@ namespace eval ::safe { foreach v {Args nested nestedLoadOk} { upvar $v $v } - set flag [::tcl::OptProcArgGiven -nestedLoadOk]; - # note that the test here is the opposite of the "InterpStatics" - # one (it is not -noNested... because of the wanted default value) + set flag [::tcl::OptProcArgGiven -nestedLoadOk] + # note that the test here is the opposite of the "InterpStatics" one + # (it is not -noNested... because of the wanted default value) if {$flag && (!$nestedLoadOk != !$nested) && ([::tcl::OptProcArgGiven -nested])} { return -code error\ @@ -117,7 +116,6 @@ namespace eval ::safe { # #### - # Interface/entry point function and front end for "Create" proc interpCreate {args} { set Args [::tcl::OptKeyParse ::safe::interpCreate $args] @@ -131,7 +129,7 @@ namespace eval ::safe { return -code error "\"$slave\" is not an interpreter" } InterpInit $slave $accessPath \ - [InterpStatics] [InterpNested] $deleteHook; + [InterpStatics] [InterpNested] $deleteHook } proc CheckInterp {slave} { @@ -141,27 +139,26 @@ namespace eval ::safe { } } - # Interface/entry point function and front end for "Configure" - # This code is awfully pedestrian because it would need - # more coupling and support between the way we store the - # configuration values in safe::interp's and the Opt package - # Obviously we would like an OptConfigure - # to avoid duplicating all this code everywhere. -> TODO - # (the app should share or access easily the program/value - # stored by opt) - # This is even more complicated by the boolean flags with no values - # that we had the bad idea to support for the sake of user simplicity - # in create/init but which makes life hard in configure... + # Interface/entry point function and front end for "Configure". This code + # is awfully pedestrian because it would need more coupling and support + # between the way we store the configuration values in safe::interp's and + # the Opt package. Obviously we would like an OptConfigure to avoid + # duplicating all this code everywhere. + # -> TODO (the app should share or access easily the program/value stored + # by opt) + + # This is even more complicated by the boolean flags with no values that + # we had the bad idea to support for the sake of user simplicity in + # create/init but which makes life hard in configure... # So this will be hopefully written and some integrated with opt1.0 # (hopefully for tcl8.1 ?) proc interpConfigure {args} { switch [llength $args] { 1 { - # If we have exactly 1 argument - # the semantic is to return all the current configuration - # We still call OptKeyParse though we know that "slave" - # is our given argument because it also checks - # for the "-help" option. + # If we have exactly 1 argument the semantic is to return all + # the current configuration. We still call OptKeyParse though + # we know that "slave" is our given argument because it also + # checks for the "-help" option. set Args [::tcl::OptKeyParse ::safe::interpIC $args] CheckInterp $slave set res {} @@ -172,9 +169,10 @@ namespace eval ::safe { join $res } 2 { - # If we have exactly 2 arguments - # the semantic is a "configure get" + # If we have exactly 2 arguments the semantic is a "configure + # get" ::tcl::Lassign $args slave arg + # get the flag sub program (we 'know' about Opt's internal # representation of data) set desc [lindex [::tcl::OptKeyGetDesc ::safe::interpIC] 2] @@ -201,11 +199,10 @@ namespace eval ::safe { return [list -deleteHook [Set [DeleteHookName $slave]]] } -noStatics { - # it is most probably a set in fact - # but we would need then to jump to the set part - # and it is not *sure* that it is a set action - # that the user want, so force it to use the - # unambigous -statics ?value? instead: + # it is most probably a set in fact but we would need + # then to jump to the set part and it is not *sure* + # that it is a set action that the user want, so force + # it to use the unambigous -statics ?value? instead: return -code error\ "ambigous query (get or set -noStatics ?)\ use -statics instead" @@ -221,26 +218,31 @@ namespace eval ::safe { } } default { - # Otherwise we want to parse the arguments like init and create - # did + # Otherwise we want to parse the arguments like init and + # create did set Args [::tcl::OptKeyParse ::safe::interpIC $args] CheckInterp $slave - # Get the current (and not the default) values of - # whatever has not been given: + + # Get the current (and not the default) values of whatever has + # not been given: if {![::tcl::OptProcArgGiven -accessPath]} { set doreset 1 set accessPath [Set [PathListName $slave]] } else { set doreset 0 } - if {(![::tcl::OptProcArgGiven -statics]) \ - && (![::tcl::OptProcArgGiven -noStatics]) } { + if { + ![::tcl::OptProcArgGiven -statics] + && ![::tcl::OptProcArgGiven -noStatics] + } then { set statics [Set [StaticsOkName $slave]] } else { set statics [InterpStatics] } - if {([::tcl::OptProcArgGiven -nested]) \ - || ([::tcl::OptProcArgGiven -nestedLoadOk]) } { + if { + [::tcl::OptProcArgGiven -nested] || + [::tcl::OptProcArgGiven -nestedLoadOk] + } then { set nested [InterpNested] } else { set nested [Set [NestedOkName $slave]] @@ -262,21 +264,19 @@ namespace eval ::safe { } } - #### # # Functions that actually implements the exported APIs # #### - # # safe::InterpCreate : doing the real job # - # This procedure creates a safe slave and initializes it with the - # safe base aliases. - # NB: slave name must be simple alphanumeric string, no spaces, - # no (), no {},... {because the state array is stored as part of the name} + # This procedure creates a safe slave and initializes it with the safe + # base aliases. + # NB: slave name must be simple alphanumeric string, no spaces, no (), no + # {},... {because the state array is stored as part of the name} # # Returns the slave name. # @@ -310,24 +310,22 @@ namespace eval ::safe { InterpInit $slave $access_path $staticsok $nestedok $deletehook } - # # InterpSetConfig (was setAccessPath) : - # Sets up slave virtual auto_path and corresponding structure - # within the master. Also sets the tcl_library in the slave - # to be the first directory in the path. - # Nb: If you change the path after the slave has been initialized - # you probably need to call "auto_reset" in the slave in order that it - # gets the right auto_index() array values. + # Sets up slave virtual auto_path and corresponding structure within + # the master. Also sets the tcl_library in the slave to be the first + # directory in the path. + # NB: If you change the path after the slave has been initialized you + # probably need to call "auto_reset" in the slave in order that it gets + # the right auto_index() array values. proc ::safe::InterpSetConfig {slave access_path staticsok\ nestedok deletehook} { - # determine and store the access path if empty if {$access_path eq ""} { set access_path [uplevel \#0 set auto_path] - # Make sure that tcl_library is in auto_path - # and at the first position (needed by setAccessPath) + # Make sure that tcl_library is in auto_path and at the first + # position (needed by setAccessPath) set where [lsearch -exact $access_path [info library]] if {$where == -1} { # not found, add it. @@ -344,8 +342,8 @@ namespace eval ::safe { } # Add 1st level sub dirs (will searched by auto loading from tcl - # code in the slave using glob and thus fail, so we add them - # here so by default it works the same). + # code in the slave using glob and thus fail, so we add them here + # so by default it works the same). set access_path [AddSubDirs $access_path] } @@ -369,10 +367,10 @@ namespace eval ::safe { lappend slave_auto_path "\$[PathToken $i]" incr i } - # Extend the access list with the paths used to look for Tcl - # Modules. We safe the virtual form separately as well, as - # syncing it with the slave has to be defered until the - # necessary commands are present for setup. + # Extend the access list with the paths used to look for Tcl Modules. + # We save the virtual form separately as well, as syncing it with the + # slave has to be defered until the necessary commands are present for + # setup. foreach dir [::tcl::tm::list] { lappend access_path $dir Set [PathToken $i $slave] $dir @@ -395,8 +393,8 @@ namespace eval ::safe { # # # FindInAccessPath: - # Search for a real directory and returns its virtual Id - # (including the "$") + # Search for a real directory and returns its virtual Id (including the + # "$") proc ::safe::interpFindInAccessPath {slave path} { set access_path [GetAccessPath $slave] set where [lsearch -exact $access_path $path] @@ -408,32 +406,33 @@ proc ::safe::interpFindInAccessPath {slave path} { # # addToAccessPath: - # add (if needed) a real directory to access path - # and return its virtual token (including the "$"). + # add (if needed) a real directory to access path and return its + # virtual token (including the "$"). proc ::safe::interpAddToAccessPath {slave path} { # first check if the directory is already in there - if {![catch {interpFindInAccessPath $slave $path} res]} { - return $res - } - # new one, add it: - set nname [PathNumberName $slave] - set n [Set $nname] - Set [PathToken $n $slave] $path + try { + return [interpFindInAccessPath $slave $path] + } on error {} { + # new one, add it: + set nname [PathNumberName $slave] + set n [Set $nname] + Set [PathToken $n $slave] $path - set token "\$[PathToken $n]" + set token "\$[PathToken $n]" - Lappend [VirtualPathListName $slave] $token - Lappend [PathListName $slave] $path - Set $nname [expr {$n+1}] + Lappend [VirtualPathListName $slave] $token + Lappend [PathListName $slave] $path + Set $nname [expr {$n+1}] - SyncAccessPath $slave + SyncAccessPath $slave - return $token + return $token + } } # This procedure applies the initializations to an already existing - # interpreter. It is useful when you want to install the safe base - # aliases into a preexisting safe interpreter. + # interpreter. It is useful when you want to install the safe base aliases + # into a preexisting safe interpreter. proc ::safe::InterpInit { slave access_path @@ -441,76 +440,77 @@ proc ::safe::interpAddToAccessPath {slave path} { nestedok deletehook } { - - # Configure will generate an access_path when access_path is - # empty. + # Configure will generate an access_path when access_path is empty. InterpSetConfig $slave $access_path $staticsok $nestedok $deletehook # These aliases let the slave load files to define new commands - # NB we need to add [namespace current], aliases are always - # absolute paths. - ::interp alias $slave source {} [namespace current]::AliasSource $slave - ::interp alias $slave load {} [namespace current]::AliasLoad $slave + # NB we need to add [namespace current], aliases are always absolute + # paths. + ::interp alias $slave source {} \ + [namespace current]::AliasSource $slave + ::interp alias $slave load {} \ + [namespace current]::AliasLoad $slave # This alias lets the slave use the encoding names, convertfrom, - # convertto, and system, but not "encoding system " to set - # the system encoding. + # convertto, and system, but not "encoding system " to set the + # system encoding. - ::interp alias $slave encoding {} [namespace current]::AliasEncoding \ - $slave + ::interp alias $slave encoding {} \ + [namespace current]::AliasEncoding $slave # Handling Tcl Modules, we need a restricted form of Glob. - ::interp alias $slave glob {} [namespace current]::AliasGlob \ - $slave + ::interp alias $slave glob {} \ + [namespace current]::AliasGlob $slave # This alias lets the slave have access to a subset of the 'file' # command functionality. - AliasSubset $slave file file dir.* join root.* ext.* tail \ - path.* split + AliasSubset $slave file \ + file dir.* join root.* ext.* tail path.* split # This alias interposes on the 'exit' command and cleanly terminates # the slave. - ::interp alias $slave exit {} [namespace current]::interpDelete $slave + ::interp alias $slave exit {} \ + [namespace current]::interpDelete $slave - # The allowed slave variables already have been set - # by Tcl_MakeSafe(3) + # The allowed slave variables already have been set by Tcl_MakeSafe(3) + # Source init.tcl and tm.tcl into the slave, to get auto_load and + # other procedures defined: - # Source init.tcl and tm.tcl into the slave, to get auto_load - # and other procedures defined: - - if {[catch {::interp eval $slave\ - {source [file join $tcl_library init.tcl]}} msg]} { + if {[catch {::interp eval $slave { + source [file join $tcl_library init.tcl] + }} msg]} then { Log $slave "can't source init.tcl ($msg)" error "can't source init.tcl into slave $slave ($msg)" } - if {[catch {::interp eval $slave \ - {source [file join $tcl_library tm.tcl]}} msg]} { + if {[catch {::interp eval $slave { + source [file join $tcl_library tm.tcl] + }} msg]} then { Log $slave "can't source tm.tcl ($msg)" error "can't source tm.tcl into slave $slave ($msg)" } - # Sync the paths used to search for Tcl modules. This can be - # done only now, after tm.tcl was loaded. - ::interp eval $slave [list ::tcl::tm::add {*}[Set [TmPathListName $slave]]] + # Sync the paths used to search for Tcl modules. This can be done only + # now, after tm.tcl was loaded. + ::interp eval $slave [list \ + ::tcl::tm::add {*}[Set [TmPathListName $slave]] ] return $slave } - - # Add (only if needed, avoid duplicates) 1 level of - # sub directories to an existing path list. - # Also removes non directories from the returned list. + # Add (only if needed, avoid duplicates) 1 level of sub directories to an + # existing path list. Also removes non directories from the returned + # list. proc AddSubDirs {pathList} { set res {} foreach dir $pathList { if {[file isdirectory $dir]} { - # check that we don't have it yet as a children - # of a previous dir + # check that we don't have it yet as a children of a previous + # dir if {[lsearch -exact $res $dir]<0} { lappend res $dir } @@ -526,24 +526,25 @@ proc ::safe::interpAddToAccessPath {slave path} { return $res } - # This procedure deletes a safe slave managed by Safe Tcl and - # cleans up associated state: + # This procedure deletes a safe slave managed by Safe Tcl and cleans up + # associated state: proc ::safe::interpDelete {slave} { - Log $slave "About to delete" NOTICE - # If the slave has a cleanup hook registered, call it. - # check the existance because we might be called to delete an interp - # which has not been registered with us at all + # If the slave has a cleanup hook registered, call it. Check the + # existance because we might be called to delete an interp which has + # not been registered with us at all set hookname [DeleteHookName $slave] if {[Exists $hookname]} { set hook [Set $hookname] if {![::tcl::Lempty $hook]} { - # remove the hook now, otherwise if the hook - # calls us somehow, we'll loop + # remove the hook now, otherwise if the hook calls us somehow, + # we'll loop Unset $hookname - if {[catch {{*}$hook $slave} err]} { + try { + {*}$hook $slave + } on error err { Log $slave "Delete hook error ($err)" } } @@ -570,27 +571,24 @@ proc ::safe::interpDelete {slave} { # Set (or get) the loging mecanism proc ::safe::setLogCmd {args} { - variable Log - if {[llength $args] == 0} { - return $Log - } else { - if {[llength $args] == 1} { + variable Log + if {[llength $args] == 0} { + return $Log + } elseif {[llength $args] == 1} { set Log [lindex $args 0] } else { set Log $args } } -} # internal variable variable Log {} # ------------------- END OF PUBLIC METHODS ------------ - # - # sets the slave auto_path to the master recorded value. - # also sets tcl_library to the first token of the virtual path. + # Sets the slave auto_path to the master recorded value. Also sets + # tcl_library to the first token of the virtual path. # proc SyncAccessPath {slave} { set slave_auto_path [Set [VirtualPathListName $slave]] @@ -600,12 +598,10 @@ proc ::safe::setLogCmd {args} { ::interp eval $slave [list set tcl_library [lindex $slave_auto_path 0]] } - # base name for storing all the slave states - # the array variable name for slave foo is thus "Sfoo" - # and for sub slave {foo bar} "Sfoo bar" (spaces are handled - # ok everywhere (or should)) - # We add the S prefix to avoid that a slave interp called "Log" - # would smash our "Log" variable. + # Base name for storing all the slave states. The array variable name for + # slave foo is thus "Sfoo" and for sub slave {foo bar} "Sfoo bar" (spaces + # are handled ok everywhere (or should)). We add the S prefix to avoid + # that a slave interp called "Log" would smash our "Log" variable. proc InterpStateName {slave} { return "S$slave" } @@ -615,16 +611,14 @@ proc ::safe::setLogCmd {args} { expr {[Exists [InterpStateName $slave]] && [::interp exists $slave]} } - # returns the virtual token for directory number N - # if the slave argument is given, - # it will return the corresponding master global variable name + # Returns the virtual token for directory number N. If the slave argument + # is given, it will return the corresponding master global variable name proc PathToken {n {slave ""}} { if {$slave ne ""} { return "[InterpStateName $slave](access_path,$n)" } else { - # We need to have a ":" in the token string so - # [file join] on the mac won't turn it into a relative - # path. + # We need to have a ":" in the token string so [file join] on the + # mac won't turn it into a relative path. return "p(:$n:)" } } @@ -693,8 +687,8 @@ proc ::safe::setLogCmd {args} { # translate virtual path into real path # proc TranslatePath {slave path} { - # somehow strip the namespaces 'functionality' out (the danger - # is that we would strip valid macintosh "../" queries... : + # somehow strip the namespaces 'functionality' out (the danger is that + # we would strip valid macintosh "../" queries... : if {[string match "*::*" $path] || [string match "*..*" $path]} { error "invalid characters in path $path" } @@ -708,8 +702,8 @@ proc ::safe::setLogCmd {args} { } - # Log eventually log an error - # to enable error logging, set Log to {puts stderr} for instance + # Log eventually log an error; to enable error logging, set Log to {puts + # stderr} for instance proc Log {slave msg {type ERROR}} { variable Log if {[info exists Log] && [llength $Log]} { @@ -718,13 +712,13 @@ proc ::safe::setLogCmd {args} { } - # file name control (limit access to files/ressources that should be - # a valid tcl source file) + # file name control (limit access to files/resources that should be a + # valid tcl source file) proc CheckFileName {slave file} { # This used to limit what can be sourced to ".tcl" and forbid files # with more than 1 dot and longer than 14 chars, but I changed that - # for 8.4 as a safe interp has enough internal protection already - # to allow sourcing anything. - hobbs + # for 8.4 as a safe interp has enough internal protection already to + # allow sourcing anything. - hobbs if {![file exists $file]} { # don't tell the file path @@ -750,29 +744,37 @@ proc ::safe::setLogCmd {args} { while {$at < [llength $args]} { switch -glob -- [set opt [lindex $args $at]] { -nocomplain - - -join { lappend cmd $opt ; incr at } + -join { + lappend cmd $opt + incr at + } -directory { - lappend cmd $opt ; incr at + lappend cmd $opt + incr at set virtualdir [lindex $args $at] # get the real path from the virtual one. - if {[catch {set dir [TranslatePath $slave $virtualdir]} msg]} { + try { + set dir [TranslatePath $slave $virtualdir] + } on error msg { Log $slave $msg return -code error "permission denied" } # check that the path is in the access path of that slave - if {[catch {DirInAccessPath $slave $dir} msg]} { + try { + DirInAccessPath $slave $dir + } on error msg { Log $slave $msg return -code error "permission denied" } - lappend cmd $dir ; incr at + lappend cmd $dir + incr at } pkgIndex.tcl { - # Oops, this is globbing a subdirectory in regular - # package search. That is not wanted. Abort, - # handler does catch already (because glob was not - # defined before). See package.tcl, lines 484ff in - # tclPkgUnknown. + # Oops, this is globbing a subdirectory in regular package + # search. That is not wanted. Abort, handler does catch + # already (because glob was not defined before). See + # package.tcl, lines 484ff in tclPkgUnknown. error "unknown command glob" } -* { @@ -780,14 +782,17 @@ proc ::safe::setLogCmd {args} { error "Safe base rejecting glob option '$opt'" } default { - lappend cmd $opt ; incr at + lappend cmd $opt + incr at } } } Log $slave "GLOB = $cmd" NOTICE - if {[catch {::interp invokehidden $slave glob {*}$cmd} msg]} { + try { + ::interp invokehidden $slave glob {*}$cmd + } on error msg { Log $slave $msg return -code error "script error" } @@ -808,11 +813,9 @@ proc ::safe::setLogCmd {args} { # AliasSource is the target of the "source" alias in safe interpreters. proc AliasSource {slave args} { - set argc [llength $args] - # Extended for handling of Tcl Modules to allow not only - # "source filename", but "source -encoding E filename" as - # well. + # Extended for handling of Tcl Modules to allow not only "source + # filename", but "source -encoding E filename" as well. if {[lindex $args 0] eq "-encoding"} { incr argc -2 set encoding [lrange $args 0 1] @@ -829,25 +832,34 @@ proc ::safe::setLogCmd {args} { set file [lindex $args $at] # get the real path from the virtual one. - if {[catch {set file [TranslatePath $slave $file]} msg]} { + try { + set file [TranslatePath $slave $file] + } on error msg { Log $slave $msg return -code error "permission denied" } # check that the path is in the access path of that slave - if {[catch {FileInAccessPath $slave $file} msg]} { + try { + FileInAccessPath $slave $file + } on error msg { Log $slave $msg return -code error "permission denied" } # do the checks on the filename : - if {[catch {CheckFileName $slave $file} msg]} { + try { + CheckFileName $slave $file + } on error msg { Log $slave "$file:$msg" return -code error $msg } # passed all the tests , lets source it: - if {[catch {::interp invokehidden $slave source {*}$encoding $file} msg]} { + if {[catch { + # We use catch here because we want to catch non-error/ok too + ::interp invokehidden $slave source {*}$encoding $file + } msg]} then { Log $slave $msg return -code error "script error" } @@ -857,7 +869,6 @@ proc ::safe::setLogCmd {args} { # AliasLoad is the target of the "load" alias in safe interpreters. proc AliasLoad {slave file args} { - set argc [llength $args] if {$argc > 2} { set msg "load error: too many arguments" @@ -868,18 +879,17 @@ proc ::safe::setLogCmd {args} { # package name (can be empty if file is not). set package [lindex $args 0] - # Determine where to load. load use a relative interp path - # and {} means self, so we can directly and safely use passed arg. + # Determine where to load. load use a relative interp path and {} + # means self, so we can directly and safely use passed arg. set target [lindex $args 1] if {$target ne ""} { - # we will try to load into a sub sub interp - # check that we want to authorize that. + # we will try to load into a sub sub interp; check that we want to + # authorize that. if {![NestedOk $slave]} { Log $slave "loading to a sub interp (nestedok)\ disabled (trying to load $package to $target)" return -code error "permission denied (nested load)" } - } # Determine what kind of load is requested @@ -899,20 +909,25 @@ proc ::safe::setLogCmd {args} { # file loading # get the real path from the virtual one. - if {[catch {set file [TranslatePath $slave $file]} msg]} { + try { + set file [TranslatePath $slave $file] + } on error msg { Log $slave $msg return -code error "permission denied" } # check the translated path - if {[catch {FileInAccessPath $slave $file} msg]} { + try { + FileInAccessPath $slave $file + } on error msg { Log $slave $msg return -code error "permission denied (path)" } } - if {[catch {::interp invokehidden\ - $slave load $file $package $target} msg]} { + try { + ::interp invokehidden $slave load $file $package $target + } on error msg { Log $slave $msg return -code error $msg } @@ -920,14 +935,12 @@ proc ::safe::setLogCmd {args} { return $msg } - # FileInAccessPath raises an error if the file is not found in - # the list of directories contained in the (master side recorded) slave's - # access path. + # FileInAccessPath raises an error if the file is not found in the list of + # directories contained in the (master side recorded) slave's access path. # the security here relies on "file dirname" answering the proper - # result.... needs checking ? + # result... needs checking ? proc FileInAccessPath {slave file} { - set access_path [GetAccessPath $slave] if {[file isdirectory $file]} { @@ -942,7 +955,7 @@ proc ::safe::setLogCmd {args} { lappend norm_access_path [file normalize $path] } - if {[lsearch -exact $norm_access_path $norm_parent] == -1} { + if {$norm_parent ni $norm_access_path} { error "\"$file\": not in access_path" } } @@ -961,13 +974,13 @@ proc ::safe::setLogCmd {args} { lappend norm_access_path [file normalize $path] } - if {[lsearch -exact $norm_access_path $norm_dir] == -1} { + if {$norm_dir ni $norm_access_path} { error "\"$dir\": not in access_path" } } - # This procedure enables access from a safe interpreter to only a subset of - # the subcommands of a command: + # This procedure enables access from a safe interpreter to only a subset + # of the subcommands of a command: proc Subset {slave command okpat args} { set subcommand [lindex $args 0] @@ -979,20 +992,21 @@ proc ::safe::setLogCmd {args} { error $msg } - # This procedure installs an alias in a slave that invokes "safesubset" - # in the master to execute allowed subcommands. It precomputes the pattern - # of allowed subcommands; you can use wildcards in the pattern if you wish - # to allow subcommand abbreviation. + # This procedure installs an alias in a slave that invokes "safesubset" in + # the master to execute allowed subcommands. It precomputes the pattern of + # allowed subcommands; you can use wildcards in the pattern if you wish to + # allow subcommand abbreviation. # # Syntax is: AliasSubset slave alias target subcommand1 subcommand2... proc AliasSubset {slave alias target args} { - set pat ^(; set sep "" + set pat "^(" + set sep "" foreach sub $args { append pat $sep$sub set sep | } - append pat )\$ + append pat ")\$" ::interp alias $slave $alias {}\ [namespace current]::Subset $slave $target $pat } @@ -1000,7 +1014,6 @@ proc ::safe::setLogCmd {args} { # AliasEncoding is the target of the "encoding" alias in safe interpreters. proc AliasEncoding {slave args} { - set argc [llength $args] set okpat "^(name.*|convert.*)\$" @@ -1013,23 +1026,18 @@ proc ::safe::setLogCmd {args} { if {[string first $subcommand system] == 0} { if {$argc == 1} { # passed all the tests , lets source it: - if {[catch {::interp invokehidden \ - $slave encoding system} msg]} { + try { + return [::interp invokehidden $slave encoding system] + } on error msg { Log $slave $msg return -code error "script error" } - } else { - set msg "wrong # args: should be \"encoding system\"" - Log $slave $msg - error $msg } + set msg "wrong # args: should be \"encoding system\"" } else { set msg "wrong # args: should be \"encoding option ?arg ...?\"" - Log $slave $msg - error $msg } - - return $msg + Log $slave $msg + error $msg } - } diff --git a/library/tm.tcl b/library/tm.tcl index a2476ce..ca0bbf7 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -1,48 +1,44 @@ # -*- tcl -*- # -# Searching for Tcl Modules. Defines a procedure, declares it as the -# primary command for finding packages, however also uses the former -# 'package unknown' command as a fallback. +# Searching for Tcl Modules. Defines a procedure, declares it as the primary +# command for finding packages, however also uses the former 'package unknown' +# command as a fallback. # -# Locates all possible packages in a directory via a less restricted -# glob. The targeted directory is derived from the name of the -# requested package. I.e. the TM scan will look only at directories -# which can contain the requested package. It will register all -# packages it found in the directory so that future requests have a -# higher chance of being fulfilled by the ifneeded database without -# having to come to us again. +# Locates all possible packages in a directory via a less restricted glob. The +# targeted directory is derived from the name of the requested package, i.e. +# the TM scan will look only at directories which can contain the requested +# package. It will register all packages it found in the directory so that +# future requests have a higher chance of being fulfilled by the ifneeded +# database without having to come to us again. # -# We do not remember where we have been and simply rescan targeted -# directories when invoked again. The reasoning is this: +# We do not remember where we have been and simply rescan targeted directories +# when invoked again. The reasoning is this: # -# - The only way we get back to the same directory is if someone is -# trying to [package require] something that wasn't there on the -# first scan. +# - The only way we get back to the same directory is if someone is trying to +# [package require] something that wasn't there on the first scan. # # Either # 1) It is there now: If we rescan, you get it; if not you don't. # -# This covers the possibility that the application asked for a -# package late, and the package was actually added to the -# installation after the application was started. It shoukld -# still be able to find it. +# This covers the possibility that the application asked for a package +# late, and the package was actually added to the installation after the +# application was started. It shoukld still be able to find it. # -# 2) It still is not there: Either way, you don't get it, but the -# rescan takes time. This is however an error case and we dont't -# care that much about it +# 2) It still is not there: Either way, you don't get it, but the rescan +# takes time. This is however an error case and we dont't care that much +# about it # -# 3) It was there the first time; but for some reason a "package -# forget" has been run, and "package" doesn't know about it -# anymore. +# 3) It was there the first time; but for some reason a "package forget" has +# been run, and "package" doesn't know about it anymore. # -# This can be an indication that the application wishes to reload -# some functionality. And should work as well. +# This can be an indication that the application wishes to reload some +# functionality. And should work as well. # -# Note that this also strikes a balance between doing a glob targeting -# a single package, and thus most likely requiring multiple globs of -# the same directory when the application is asking for many packages, -# and trying to glob for _everything_ in all subdirectories when -# looking for a package, which comes with a heavy startup cost. +# Note that this also strikes a balance between doing a glob targeting a +# single package, and thus most likely requiring multiple globs of the same +# directory when the application is asking for many packages, and trying to +# glob for _everything_ in all subdirectories when looking for a package, +# which comes with a heavy startup cost. # # We scan for regular packages only if no satisfying module was found. @@ -71,35 +67,33 @@ namespace eval ::tcl::tm { # path with 'list'. # # Results -# No result for subcommands 'add' and 'remove'. A list of paths -# for 'list'. +# No result for subcommands 'add' and 'remove'. A list of paths for +# 'list'. # # Sideeffects -# The subcommands 'add' and 'remove' manipulate the list of -# paths to search for Tcl Modules. The subcommand 'list' has no -# sideeffects. +# The subcommands 'add' and 'remove' manipulate the list of paths to +# search for Tcl Modules. The subcommand 'list' has no sideeffects. proc ::tcl::tm::add {args} { # PART OF THE ::tcl::tm::path ENSEMBLE # # The path is added at the head to the list of module paths. # - # The command enforces the restriction that no path may be an - # ancestor directory of any other path on the list. If the new - # path violates this restriction an error wil be raised. + # The command enforces the restriction that no path may be an ancestor + # directory of any other path on the list. If the new path violates this + # restriction an error wil be raised. # - # If the path is already present as is no error will be raised and - # no action will be taken. + # If the path is already present as is no error will be raised and no + # action will be taken. variable paths - # We use a copy of the path as source during validation, and - # extend it as well. Because we not only have to detect if the new - # paths are bogus with respect to the existing paths, but also - # between themselves. Otherwise we can still add bogus paths, by - # specifying them in a single call. This makes the use of the new - # paths simpler as well, a trivial assignment of the collected - # paths to the official state var. + # We use a copy of the path as source during validation, and extend it as + # well. Because we not only have to detect if the new paths are bogus with + # respect to the existing paths, but also between themselves. Otherwise we + # can still add bogus paths, by specifying them in a single call. This + # makes the use of the new paths simpler as well, a trivial assignment of + # the collected paths to the official state var. set newpaths $paths foreach p $args { @@ -108,9 +102,8 @@ proc ::tcl::tm::add {args} { continue } - # Search for paths which are subdirectories of the new one. If - # there are any then the new path violates the restriction - # about ancestors. + # Search for paths which are subdirectories of the new one. If there + # are any then the new path violates the restriction about ancestors. set pos [lsearch -glob $newpaths ${p}/*] # Cannot use "in", we need the position for the message. @@ -119,10 +112,9 @@ proc ::tcl::tm::add {args} { "$p is ancestor of existing module path [lindex $newpaths $pos]." } - # Now look for existing paths which are ancestors of the new - # one. This reverse question forces us to loop over the - # existing paths, as each element is the pattern, not the new - # path :( + # Now look for existing paths which are ancestors of the new one. This + # reverse question forces us to loop over the existing paths, as each + # element is the pattern, not the new path :( foreach ep $newpaths { if {[string match ${ep}/* $p]} { @@ -134,10 +126,9 @@ proc ::tcl::tm::add {args} { set newpaths [linsert $newpaths 0 $p] } - # The validation of the input is complete and successful, and - # everything in newpaths is either an old path, or added. We can - # now extend the official list of paths, a simple assignment is - # sufficient. + # The validation of the input is complete and successful, and everything + # in newpaths is either an old path, or added. We can now extend the + # official list of paths, a simple assignment is sufficient. set paths $newpaths return @@ -146,8 +137,8 @@ proc ::tcl::tm::add {args} { proc ::tcl::tm::remove {args} { # PART OF THE ::tcl::tm::path ENSEMBLE # - # Removes the path from the list of module paths. The command is - # silently ignored if the path is not on the list. + # Removes the path from the list of module paths. The command is silently + # ignored if the path is not on the list. variable paths @@ -177,17 +168,16 @@ proc ::tcl::tm::list {} { # empty string. # exact - Either -exact or ommitted. # -# Name, version, and exact are used to determine -# satisfaction. The original is called iff no satisfaction was -# achieved. The name is also used to compute the directory to -# target in the search. +# Name, version, and exact are used to determine satisfaction. The +# original is called iff no satisfaction was achieved. The name is also +# used to compute the directory to target in the search. # # Results # None. # # Sideeffects -# May populate the package ifneeded database with additional -# provide scripts. +# May populate the package ifneeded database with additional provide +# scripts. proc ::tcl::tm::UnknownHandler {original name args} { # Import the list of paths to search for packages in module form. @@ -196,8 +186,8 @@ proc ::tcl::tm::UnknownHandler {original name args} { variable paths variable pkgpattern - # Without paths to search we can do nothing. (Except falling back - # to the regular search). + # Without paths to search we can do nothing. (Except falling back to the + # regular search). if {[llength $paths]} { set pkgpath [string map {:: /} $name] @@ -206,11 +196,10 @@ proc ::tcl::tm::UnknownHandler {original name args} { set pkgroot "" } - # We don't remember a copy of the paths while looping. Tcl - # Modules are unable to change the list while we are searching - # for them. This also simplifies the loop, as we cannot get - # additional directories while iterating over the list. A - # simple foreach is sufficient. + # We don't remember a copy of the paths while looping. Tcl Modules are + # unable to change the list while we are searching for them. This also + # simplifies the loop, as we cannot get additional directories while + # iterating over the list. A simple foreach is sufficient. set satisfied 0 foreach path $paths { @@ -223,12 +212,11 @@ proc ::tcl::tm::UnknownHandler {original name args} { } set strip [llength [file split $path]] - # We can't use glob in safe interps, so enclose the following - # in a catch statement, where we get the module files out - # of the subdirectories. In other words, Tcl Modules are - # not-functional in such an interpreter. This is the same - # as for the command "tclPkgUnknown", i.e. the search for - # regular packages. + # We can't use glob in safe interps, so enclose the following in a + # catch statement, where we get the module files out of the + # subdirectories. In other words, Tcl Modules are not-functional + # in such an interpreter. This is the same as for the command + # "tclPkgUnknown", i.e. the search for regular packages. catch { # We always look for _all_ possible modules in the current @@ -238,50 +226,50 @@ proc ::tcl::tm::UnknownHandler {original name args} { set pkgfilename [join [lrange [file split $file] $strip end] ::] if {![regexp -- $pkgpattern $pkgfilename --> pkgname pkgversion]} { - # Ignore everything not matching our pattern - # for package names. + # Ignore everything not matching our pattern for + # package names. continue } - if {[catch {package vcompare $pkgversion 0}]} { - # Ignore everything where the version part is - # not acceptable to "package vcompare". + try { + package vcompare $pkgversion 0 + } on error {} { + # Ignore everything where the version part is not + # acceptable to "package vcompare". continue } - # We have found a candidate, generate a "provide - # script" for it, and remember it. Note that we - # are using ::list to do this; locally [list] - # means something else without the namespace - # specifier. - - # NOTE. When making changes to the format of the - # provide command generated below CHECK that the - # 'LOCATE' procedure in core file - # 'platform/shell.tcl' still understands it, or, - # if not, update its implementation appropriately. + # We have found a candidate, generate a "provide script" + # for it, and remember it. Note that we are using ::list + # to do this; locally [list] means something else without + # the namespace specifier. + + # NOTE. When making changes to the format of the provide + # command generated below CHECK that the 'LOCATE' + # procedure in core file 'platform/shell.tcl' still + # understands it, or, if not, update its implementation + # appropriately. # - # Right now LOCATE's implementation assumes that - # the path of the package file is the last element - # in the list. + # Right now LOCATE's implementation assumes that the path + # of the package file is the last element in the list. package ifneeded $pkgname $pkgversion \ "[::list package provide $pkgname $pkgversion];[::list source -encoding utf-8 $file]" - # We abort in this unknown handler only if we got - # a satisfying candidate for the requested - # package. Otherwise we still have to fallback to - # the regular package search to complete the - # processing. + # We abort in this unknown handler only if we got a + # satisfying candidate for the requested package. + # Otherwise we still have to fallback to the regular + # package search to complete the processing. if { ($pkgname eq $name) && [package vsatisfies $pkgversion {*}$args] } then { set satisfied 1 - # We do not abort the loop, and keep adding - # provide scripts for every candidate in the - # directory, just remember to not fall back to - # the regular search anymore. + + # We do not abort the loop, and keep adding provide + # scripts for every candidate in the directory, just + # remember to not fall back to the regular search + # anymore. } } } @@ -292,8 +280,8 @@ proc ::tcl::tm::UnknownHandler {original name args} { } } - # Fallback to previous command, if existing. See comment above - # about ::list... + # Fallback to previous command, if existing. See comment above about + # ::list... if {[llength $original]} { uplevel 1 $original [::linsert $args 0 $name] @@ -374,7 +362,7 @@ proc ::tcl::tm::roots {paths} { return } -# Initialization. Set up the default paths, then insert the new -# handler into the chain. +# Initialization. Set up the default paths, then insert the new handler into +# the chain. if {![interp issafe]} { ::tcl::tm::Defaults } -- cgit v0.12 From 6cfb3d987a48cb1ed8dcde2df5c84a5dddae1dde Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 26 Jul 2009 21:48:45 +0000 Subject: Simplify a bit further following more testing --- library/auto.tcl | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/library/auto.tcl b/library/auto.tcl index 7d4c340..42ffa72 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution of commands # and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.29 2009/07/26 11:40:23 dkf Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.30 2009/07/26 21:48:45 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -63,7 +63,6 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { if {[info exists the_library] && $the_library ne ""} { lappend dirs $the_library } else { - # Do the canonical search # 1. From an environment variable, if it exists. Placing this first @@ -77,14 +76,8 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # 2. In the package script directory registered within the # configuration of the package itself. - try { - ::${basename}::pkgconfig get scriptdir,runtime - } on ok value { - lappend dirs $value - } on error {msg opts} { - if {![string match "invalid command name *" $msg]} { - return -options $opts $msg - } + catch { + lappend dirs [::${basename}::pkgconfig get scriptdir,runtime] } # 3. Relative to auto_path directories. This checks relative to the -- cgit v0.12 From 71048d27d0a64c0fa11da33a09037c820babf6e5 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 31 Jul 2009 16:55:58 +0000 Subject: * generic/tclStringObj.c: Corrected failure to grow buffer * tests/format.test: when format spec request large width floating point values. Thanks to Clemens Misch. [Bug 2830354] --- ChangeLog | 6 ++++++ generic/tclStringObj.c | 5 ++++- tests/format.test | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f907b8d..b3463a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-31 Don Porter + + * generic/tclStringObj.c: Corrected failure to grow buffer + * tests/format.test: when format spec request large width + floating point values. Thanks to Clemens Misch. [Bug 2830354] + 2009-07-26 Donal K. Fellows * library/auto.tcl (tcl_findLibrary, auto_mkindex): diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 7804e1f..9ba62f5 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.127 2009/07/12 18:04:33 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.128 2009/07/31 16:55:58 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2211,6 +2211,9 @@ Tcl_AppendFormatToObj( } if (width) { p += sprintf(p, "%d", width); + if (width > length) { + length = width; + } } if (gotPrecision) { *p++ = '.'; diff --git a/tests/format.test b/tests/format.test index d2cbcde..8aa7d0b 100644 --- a/tests/format.test +++ b/tests/format.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: format.test,v 1.28 2008/12/10 18:21:47 ferrieux Exp $ +# RCS: @(#) $Id: format.test,v 1.29 2009/07/31 16:55:58 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -566,6 +566,10 @@ test format-19.2 {Bug 1867855} { format %llx 0 } 0 +test format-19.3 {Bug 2830354} { + string length [format %340f 0] +} 340 + # cleanup catch {unset a} catch {unset b} -- cgit v0.12 From ad16cb700076b09c515d59baee67ff5e235326eb Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 2 Aug 2009 10:41:09 +0000 Subject: eliminate TclWinResetInterfaceEncodings, because it does exactly the same as TclWinEncodingsCleanup, make sure that tclWinProcs and tclWinTCharEncoding are always set and reset concurrently. --- ChangeLog | 8 ++++++++ win/tclWin32Dll.c | 28 ++++++++++++++-------------- win/tclWinFCmd.c | 6 +++--- win/tclWinInit.c | 33 +++------------------------------ win/tclWinInt.h | 37 ++++++++++++++++++------------------- 5 files changed, 46 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3463a9..eb400b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-08-02 Jan Nijtmans + + * win/tclWin32Dll.c eliminate TclWinResetInterfaceEncodings, because + * win/tclWinInit.c it does exactly the same as TclWinEncodingsCleanup, + * win/tclWinInt.h make sure that tclWinProcs and tclWinTCharEncoding + are always set and reset concurrently. + * win/tclWinFCmd.c: correct check for win95 + 2009-07-31 Don Porter * generic/tclStringObj.c: Corrected failure to grow buffer diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index eb50cb1..1295c26 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.59 2009/07/01 14:38:07 patthoyts Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.60 2009/08/02 10:41:09 nijtmans Exp $ */ #include "tclWinInt.h" @@ -184,10 +184,10 @@ static TclWinProcs unicodeProcs = { /* ReadConsole and WriteConsole */ (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsoleW, (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleW, - (BOOL (WINAPI *)(LPTSTR, LPDWORD))GetUserNameW + (BOOL (WINAPI *)(LPTSTR, LPDWORD)) GetUserNameW }; -TclWinProcs *tclWinProcs; +TclWinProcs *tclWinProcs = &asciiProcs; static Tcl_Encoding tclWinTCharEncoding; /* @@ -354,7 +354,7 @@ TclWinInit( Tcl_Panic("Win32s is not a supported platform"); } - tclWinProcs = &asciiProcs; + TclWinResetInterfaces(); } /* @@ -370,6 +370,7 @@ TclWinInit( * VER_PLATFORM_WIN32s Win32s on Windows 3.1. (not supported) * VER_PLATFORM_WIN32_WINDOWS Win32 on Windows 95, 98, ME. * VER_PLATFORM_WIN32_NT Win32 on Windows NT, 2000, XP + * VER_PLATFORM_WIN32_CE Win32 on Windows CE * * Side effects: * None. @@ -442,7 +443,7 @@ TclWinSetInterfaces( int wide) /* Non-zero to use wide interfaces, 0 * otherwise. */ { - Tcl_FreeEncoding(tclWinTCharEncoding); + TclWinResetInterfaces(); if (wide) { tclWinProcs = &unicodeProcs; @@ -504,8 +505,6 @@ TclWinSetInterfaces( } } } else { - tclWinProcs = &asciiProcs; - tclWinTCharEncoding = NULL; if (tclWinProcs->getFileAttributesExProc == NULL) { HINSTANCE hInstance = LoadLibraryA("kernel32"); if (hInstance != NULL) { @@ -543,7 +542,7 @@ TclWinSetInterfaces( /* *--------------------------------------------------------------------------- * - * TclWinResetInterfaceEncodings -- + * TclWinEncodingsCleanup -- * * Called during finalization to free up any encodings we use. The * tclWinProcs-> look up table is still ok to use after this call, @@ -563,14 +562,11 @@ TclWinSetInterfaces( */ void -TclWinResetInterfaceEncodings(void) +TclWinEncodingsCleanup(void) { MountPointMap *dlIter, *dlIter2; - if (tclWinTCharEncoding != NULL) { - Tcl_FreeEncoding(tclWinTCharEncoding); - tclWinTCharEncoding = NULL; - } + TclWinResetInterfaces(); /* * Clean up the mount point map. @@ -607,7 +603,11 @@ TclWinResetInterfaceEncodings(void) void TclWinResetInterfaces(void) { - tclWinProcs = &asciiProcs; + if (tclWinTCharEncoding != NULL) { + Tcl_FreeEncoding(tclWinTCharEncoding); + tclWinTCharEncoding = NULL; + } + tclWinProcs = &asciiProcs; } /* diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 5b8e0d8..6f5cd8d 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.57 2009/02/03 23:10:58 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.58 2009/08/02 10:41:09 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1108,12 +1108,12 @@ DoRemoveJustDirectory( } /* - * Windows 95 and Win32s report removing a non-empty directory as + * Windows 95 reports removing a non-empty directory as * EACCES, not EEXIST. If the directory is not empty, change errno * so caller knows what's going on. */ - if (TclWinGetPlatformId() != VER_PLATFORM_WIN32_NT) { + if (TclWinGetPlatformId() == VER_PLATFORM_WIN32_WINDOWS) { const char *path, *find; HANDLE handle; WIN32_FIND_DATAA data; diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 8d709e9..8043971 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.82 2009/07/01 14:38:07 patthoyts Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.83 2009/08/02 10:41:09 nijtmans Exp $ */ #include "tclWinInt.h" @@ -397,31 +397,6 @@ ToUtf( /* *--------------------------------------------------------------------------- * - * TclWinEncodingsCleanup -- - * - * Reset information to its original state in finalization to allow for - * reinitialization to be possible. This must not be called until after - * the filesystem has been finalised, or exit crashes may occur when - * using virtual filesystems. - * - * Results: - * None. - * - * Side effects: - * Static information reset to startup state. - * - *--------------------------------------------------------------------------- - */ - -void -TclWinEncodingsCleanup(void) -{ - TclWinResetInterfaceEncodings(); -} - -/* - *--------------------------------------------------------------------------- - * * TclpSetInitialEncodings -- * * Based on the locale, determine the encoding of the operating system @@ -457,11 +432,9 @@ TclpSetInitialEncodings(void) void TclpSetInterfaces(void) { - int platformId, useWide; + int useWide; - platformId = TclWinGetPlatformId(); - useWide = ((platformId == VER_PLATFORM_WIN32_NT) - || (platformId == VER_PLATFORM_WIN32_CE)); + useWide = (TclWinGetPlatformId() != VER_PLATFORM_WIN32_WINDOWS); TclWinSetInterfaces(useWide); } diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 546cf17..c0222f9 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInt.h,v 1.31 2009/07/01 14:38:08 patthoyts Exp $ + * RCS: @(#) $Id: tclWinInt.h,v 1.32 2009/08/02 10:41:09 nijtmans Exp $ */ #ifndef _TCLWININT @@ -38,7 +38,7 @@ #endif /* - * The following structure keeps track of whether we are using the + * The following structure keeps track of whether we are using the * multi-byte or the wide-character interfaces to the operating system. * System calls should be made through the following function table. */ @@ -55,10 +55,10 @@ typedef struct TclWinProcs { TCHAR *(WINAPI *charLowerProc)(TCHAR *); BOOL (WINAPI *copyFileProc)(const TCHAR *, const TCHAR *, BOOL); BOOL (WINAPI *createDirectoryProc)(const TCHAR *, LPSECURITY_ATTRIBUTES); - HANDLE (WINAPI *createFileProc)(const TCHAR *, DWORD, DWORD, + HANDLE (WINAPI *createFileProc)(const TCHAR *, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE); - BOOL (WINAPI *createProcessProc)(const TCHAR *, TCHAR *, - LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, + BOOL (WINAPI *createProcessProc)(const TCHAR *, TCHAR *, + LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, const TCHAR *, LPSTARTUPINFOA, LPPROCESS_INFORMATION); BOOL (WINAPI *deleteFileProc)(const TCHAR *); HANDLE (WINAPI *findFirstFileProc)(const TCHAR *, WIN32_FIND_DATAT *); @@ -66,35 +66,35 @@ typedef struct TclWinProcs { BOOL (WINAPI *getComputerNameProc)(WCHAR *, LPDWORD); DWORD (WINAPI *getCurrentDirectoryProc)(DWORD, WCHAR *); DWORD (WINAPI *getFileAttributesProc)(const TCHAR *); - DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD nBufferLength, + DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD nBufferLength, WCHAR *, TCHAR **); DWORD (WINAPI *getModuleFileNameProc)(HMODULE, WCHAR *, int); - DWORD (WINAPI *getShortPathNameProc)(const TCHAR *, WCHAR *, DWORD); - UINT (WINAPI *getTempFileNameProc)(const TCHAR *, const TCHAR *, UINT, + DWORD (WINAPI *getShortPathNameProc)(const TCHAR *, WCHAR *, DWORD); + UINT (WINAPI *getTempFileNameProc)(const TCHAR *, const TCHAR *, UINT, WCHAR *); DWORD (WINAPI *getTempPathProc)(DWORD, WCHAR *); - BOOL (WINAPI *getVolumeInformationProc)(const TCHAR *, WCHAR *, DWORD, + BOOL (WINAPI *getVolumeInformationProc)(const TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, WCHAR *, DWORD); HINSTANCE (WINAPI *loadLibraryProc)(const TCHAR *); TCHAR (WINAPI *lstrcpyProc)(WCHAR *, const TCHAR *); BOOL (WINAPI *moveFileProc)(const TCHAR *, const TCHAR *); BOOL (WINAPI *removeDirectoryProc)(const TCHAR *); - DWORD (WINAPI *searchPathProc)(const TCHAR *, const TCHAR *, + DWORD (WINAPI *searchPathProc)(const TCHAR *, const TCHAR *, const TCHAR *, DWORD, WCHAR *, TCHAR **); BOOL (WINAPI *setCurrentDirectoryProc)(const TCHAR *); BOOL (WINAPI *setFileAttributesProc)(const TCHAR *, DWORD); - /* + /* * These two function pointers will only be set when * Tcl_FindExecutable is called. If you don't ever call that * function, the application will crash whenever WinTcl tries to call * functions through these null pointers. That is not a bug in Tcl * -- Tcl_FindExecutable is obligatory in recent Tcl releases. */ - BOOL (WINAPI *getFileAttributesExProc)(const TCHAR *, + BOOL (WINAPI *getFileAttributesExProc)(const TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID); - BOOL (WINAPI *createHardLinkProc)(const TCHAR*, const TCHAR*, + BOOL (WINAPI *createHardLinkProc)(const TCHAR*, const TCHAR*, LPSECURITY_ATTRIBUTES); - + /* deleted INT (__cdecl *utimeProc)(const TCHAR*, struct _utimbuf *); */ /* These two are also NULL at start; see comment above */ HANDLE (WINAPI *findFirstFileExProc)(const TCHAR*, UINT, @@ -102,7 +102,7 @@ typedef struct TclWinProcs { LPVOID, DWORD); BOOL (WINAPI *getVolumeNameForVMPProc)(const TCHAR*, TCHAR*, DWORD); DWORD (WINAPI *getLongPathNameProc)(const TCHAR*, TCHAR*, DWORD); - /* + /* * These six are for the security sdk to get correct file * permissions on NT, 2000, XP, etc. On 95,98,ME they are * always null. @@ -110,9 +110,9 @@ typedef struct TclWinProcs { BOOL (WINAPI *getFileSecurityProc)(LPCTSTR lpFileName, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, - DWORD nLength, + DWORD nLength, LPDWORD lpnLengthNeeded); - BOOL (WINAPI *impersonateSelfProc) (SECURITY_IMPERSONATION_LEVEL + BOOL (WINAPI *impersonateSelfProc) (SECURITY_IMPERSONATION_LEVEL ImpersonationLevel); BOOL (WINAPI *openThreadTokenProc) (HANDLE ThreadHandle, DWORD DesiredAccess, BOOL OpenAsSelf, @@ -165,12 +165,11 @@ MODULE_SCOPE Tcl_Channel TclWinOpenFileChannel(HANDLE handle, char *channelName, int permissions, int appendMode); MODULE_SCOPE Tcl_Channel TclWinOpenSerialChannel(HANDLE handle, char *channelName, int permissions); -MODULE_SCOPE void TclWinResetInterfaceEncodings(); MODULE_SCOPE HANDLE TclWinSerialReopen(HANDLE handle, const TCHAR *name, DWORD access); MODULE_SCOPE int TclWinSymLinkCopyDirectory(const TCHAR* LinkOriginal, const TCHAR* LinkCopy); -MODULE_SCOPE int TclWinSymLinkDelete(const TCHAR* LinkOriginal, +MODULE_SCOPE int TclWinSymLinkDelete(const TCHAR* LinkOriginal, int linkOnly); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) MODULE_SCOPE void TclWinFreeAllocCache(void); -- cgit v0.12 From caf9f82c8c57615ac532064b2eb0c7649ea7eb40 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 2 Aug 2009 12:08:16 +0000 Subject: Stop calling endpwent() and endgrent(); unneeded. [Bug 1942222] --- ChangeLog | 24 ++++++++++++++++-------- unix/tclUnixFCmd.c | 8 ++------ unix/tclUnixFile.c | 6 ++---- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb400b1..1d3f768 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,24 @@ +2009-08-02 Donal K. Fellows + + * unix/tclUnixFCmd.c (GetOwnerAttribute, SetOwnerAttribute) + (GetGroupAttribute, SetGroupAttribute): [Bug 1942222]: Stop calling + * unix/tclUnixFile.c (TclpGetUserHome): endpwent() and endgrent(); + they've been unnecessary for ages. + 2009-08-02 Jan Nijtmans - * win/tclWin32Dll.c eliminate TclWinResetInterfaceEncodings, because - * win/tclWinInit.c it does exactly the same as TclWinEncodingsCleanup, - * win/tclWinInt.h make sure that tclWinProcs and tclWinTCharEncoding - are always set and reset concurrently. - * win/tclWinFCmd.c: correct check for win95 + * win/tclWin32Dll.c: Eliminate TclWinResetInterfaceEncodings, since it + * win/tclWinInit.c: does exactly the same as TclWinEncodingsCleanup, + * win/tclWinInt.h: make sure that tclWinProcs and + tclWinTCharEncoding are always set and reset + concurrently. + * win/tclWinFCmd.c: Correct check for win95 2009-07-31 Don Porter - * generic/tclStringObj.c: Corrected failure to grow buffer - * tests/format.test: when format spec request large width - floating point values. Thanks to Clemens Misch. [Bug 2830354] + * generic/tclStringObj.c: [Bug 2830354]: Corrected failure to + * tests/format.test: grow buffer when format spec request + large width floating point values. Thanks to Clemens Misch. 2009-07-26 Donal K. Fellows diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 75fc727..e450589 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.72 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.73 2009/08/02 12:08:17 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -1341,7 +1341,6 @@ GetGroupAttribute( *attributePtrPtr = Tcl_NewStringObj(utf, -1); Tcl_DStringFree(&ds); } - endgrent(); return TCL_OK; } @@ -1396,7 +1395,6 @@ GetOwnerAttribute( *attributePtrPtr = Tcl_NewStringObj(utf, Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); } - endpwent(); return TCL_OK; } @@ -1483,7 +1481,6 @@ SetGroupAttribute( Tcl_DStringFree(&ds); if (groupPtr == NULL) { - endgrent(); if (interp != NULL) { Tcl_AppendResult(interp, "could not set group for file \"", TclGetString(fileName), "\": group \"", string, @@ -1497,7 +1494,6 @@ SetGroupAttribute( native = Tcl_FSGetNativePath(fileName); result = chown(native, (uid_t) -1, (gid_t) gid); /* INTL: Native. */ - endgrent(); if (result != 0) { if (interp != NULL) { Tcl_AppendResult(interp, "could not set group for file \"", @@ -1545,7 +1541,7 @@ SetOwnerAttribute( string = Tcl_GetStringFromObj(attributePtr, &length); native = Tcl_UtfToExternalDString(NULL, string, length, &ds); - pwPtr = TclpGetPwNam(native); /* INTL: Native. */ + pwPtr = TclpGetPwNam(native); /* INTL: Native. */ Tcl_DStringFree(&ds); if (pwPtr == NULL) { diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 8eabbbb..c8ac03a 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFile.c,v 1.54 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.55 2009/08/02 12:08:17 dkf Exp $ */ #include "tclInt.h" @@ -578,15 +578,13 @@ TclpGetUserHome( Tcl_DString ds; const char *native = Tcl_UtfToExternalDString(NULL, name, -1, &ds); - pwPtr = getpwnam(native); /* INTL: Native. */ + pwPtr = TclpGetPwNam(native); /* INTL: Native. */ Tcl_DStringFree(&ds); if (pwPtr == NULL) { - endpwent(); return NULL; } Tcl_ExternalToUtfDString(NULL, pwPtr->pw_dir, -1, bufferPtr); - endpwent(); return Tcl_DStringValue(bufferPtr); } -- cgit v0.12 From 9b243d8861a7ba96ab64928edc9795beb02a4997 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 2 Aug 2009 13:03:46 +0000 Subject: Added *unsupported* command to report an object's representation. --- ChangeLog | 5 +++++ generic/tclBasic.c | 6 ++++-- generic/tclInt.h | 5 ++++- generic/tclObj.c | 40 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d3f768..352fd5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-02 Donal K. Fellows + * generic/tclObj.c (Tcl_RepresentationCmd): Added an unsupported + command for reporting the representation of an object. Result string + is deliberately a bit obstructive so that people are not encouraged to + make code that depends on it; it's a debugging tool only! + * unix/tclUnixFCmd.c (GetOwnerAttribute, SetOwnerAttribute) (GetGroupAttribute, SetGroupAttribute): [Bug 1942222]: Stop calling * unix/tclUnixFile.c (TclpGetUserHome): endpwent() and endgrent(); diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 54d3b47..7941c7d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.399 2009/07/23 15:23:43 das Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.400 2009/08/02 13:03:47 dkf Exp $ */ #include "tclInt.h" @@ -782,11 +782,13 @@ Tcl_CreateInterp(void) TclDefaultBgErrorHandlerObjCmd, NULL, NULL); /* - * Create an unsupported command for debugging bytecode. + * Create unsupported commands for debugging bytecode and objects. */ Tcl_CreateObjCommand(interp, "::tcl::unsupported::disassemble", Tcl_DisassembleObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "::tcl::unsupported::representation", + Tcl_RepresentationCmd, NULL, NULL); /* * Create the 'tailcall' command diff --git a/generic/tclInt.h b/generic/tclInt.h index 2f521eb..ac3b3bc 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.431 2009/07/22 19:54:49 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.432 2009/08/02 13:03:47 dkf Exp $ */ #ifndef _TCLINT @@ -3138,6 +3138,9 @@ MODULE_SCOPE int Tcl_RegsubObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_RenameObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int Tcl_RepresentationCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); MODULE_SCOPE int Tcl_ReturnObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/generic/tclObj.c b/generic/tclObj.c index edc203c..46758fa 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.153 2009/06/18 09:41:29 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.154 2009/08/02 13:03:47 dkf Exp $ */ #include "tclInt.h" @@ -3962,6 +3962,44 @@ SetCmdNameFromAny( } /* + *---------------------------------------------------------------------- + * + * Tcl_RepresentationCmd -- + * + * Implementation of the "tcl::unsupported::representation" command. + * + * Results: + * Reports the current representation (Tcl_Obj type) of its argument. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_RepresentationCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "value"); + return TCL_ERROR; + } + + if (objv[1]->typePtr == NULL) { + Tcl_AppendResult(interp, "value has no internal representation set", + NULL); + } else { + Tcl_AppendResult(interp, "value has internal representation of ", + objv[1]->typePtr->name, " currently", NULL); + } + return TCL_OK; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 -- cgit v0.12 From dff3fc1f53f49695e31f07d4b00ac359c4f1e728 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 2 Aug 2009 14:26:07 +0000 Subject: * tests/coroutine.test: fix testfile cleanup --- ChangeLog | 4 ++++ tests/coroutine.test | 14 ++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 352fd5e..3a4cab8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-08-02 Miguel Sofer + + * tests/coroutine.test: fix testfile cleanup + 2009-08-02 Donal K. Fellows * generic/tclObj.c (Tcl_RepresentationCmd): Added an unsupported diff --git a/tests/coroutine.test b/tests/coroutine.test index 7820e9a..29c68e9 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.2 2009/06/25 19:24:16 dgp Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.3 2009/08/02 14:26:07 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -530,17 +530,15 @@ test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ unset res } -result {0 0 0 0} - - -# cleanup -::tcltest::cleanupTests - - -unset -nocomplain lambda +unset lambda if {[testConstraint testnrelevels]} { namespace forget testnre::* namespace delete testnre } +# cleanup +::tcltest::cleanupTests + + return -- cgit v0.12 From f92b24a616e3a96bef3765e9bda4b66f3c7e5010 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 6 Aug 2009 22:28:11 +0000 Subject: * doc/refchan.n [Bug 2827000]: Extended the implementation of * generic/tclIORChan.c: reflective channels (TIP 219, method * tests/ioCmd.test: 'read'), enabling handlers to signal EAGAIN to indicate 'no data, but not at EOF either', and other system errors. Updated documentation, extended testsuite (New test cases iocmd*-23.{9,10}). --- ChangeLog | 9 +++++++ doc/refchan.n | 33 +++++++++++++++++++++-- generic/tclIORChan.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++--- tests/ioCmd.test | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 184 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a4cab8..6df7583 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-08-06 Andreas Kupries + + * doc/refchan.n [Bug 2827000]: Extended the implementation of + * generic/tclIORChan.c: reflective channels (TIP 219, method + * tests/ioCmd.test: 'read'), enabling handlers to signal EAGAIN to + indicate 'no data, but not at EOF either', and other system + errors. Updated documentation, extended testsuite (New test cases + iocmd*-23.{9,10}). + 2009-08-02 Miguel Sofer * tests/coroutine.test: fix testfile cleanup diff --git a/doc/refchan.n b/doc/refchan.n index 80a4305..6032340 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.16 2009/07/11 11:23:06 dkf Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.17 2009/08/06 22:28:11 andreas_kupries Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -117,7 +117,36 @@ an error will be signaled and later thrown by the command which performed the read (usually \fBgets\fR or \fBread\fR). However, returning fewer bytes than requested is acceptable. .PP -If the subcommand throws an error, the command which caused its +Note that returning nothing (0 bytes) is a signal to the higher layers +that \fBEOF\fR has been reached on the channel. To signal that the +channel is out of data right now, but has not yet reached \fBEOF\fR, +it is necessary to throw the error "EAGAIN", i.e. to either +.PP +.CS +return -code error EAGAIN +.CE +or +.CS +error EAGAIN +.CE +.PP +For extensibility any error whose value is a negative integer number +will cause the higher layers to set the C-level variable "\fBerrno\fR" +to the absolute value of this number, signaling a system error. This +means that both +.PP +.CS +return -code error -11 +.CE +and +.CS +error -11 +.CE +.PP +are equivalent to the examples above, using the more readable string "EAGAIN". +No other error value has such a mapping to a symbolic string. +.PP +If the subcommand throws any other error, the command which caused its invocation (usually \fBgets\fR, or \fBread\fR) will appear to have thrown this error. Any exception beyond \fBerror\fR, (e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 554380a..5a83eca 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.39 2009/02/10 22:50:09 nijtmans Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.40 2009/08/06 22:28:11 andreas_kupries Exp $ */ #include @@ -448,6 +448,7 @@ static int InvokeTclMethod(ReflectedChannel *rcPtr, static ReflectedChannelMap * GetReflectedChannelMap(Tcl_Interp *interp); static void DeleteReflectedChannelMap(ClientData clientData, Tcl_Interp *interp); +static int ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj* resObj); /* * Global constant strings (messages). ================== @@ -1222,8 +1223,13 @@ ReflectInput( ForwardOpToOwnerThread(rcPtr, ForwardedInput, &p); if (p.base.code != TCL_OK) { - PassReceivedError(rcPtr->chan, &p); - *errorCodePtr = EINVAL; + if (p.base.code < 0) { + /* No error message, this is an errno signal. */ + *errorCodePtr = -p.base.code; + } else { + PassReceivedError(rcPtr->chan, &p); + *errorCodePtr = EINVAL; + } p.input.toRead = -1; } else { *errorCodePtr = EOK; @@ -1238,6 +1244,14 @@ ReflectInput( toReadObj = Tcl_NewIntObj(toRead); if (InvokeTclMethod(rcPtr, "read", toReadObj, NULL, &resObj)!=TCL_OK) { + int code = ErrnoReturn (rcPtr, resObj); + + if (code < 0) { + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + *errorCodePtr = -code; + return -1; + } + Tcl_SetChannelError(rcPtr->chan, resObj); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ *errorCodePtr = EINVAL; @@ -2270,6 +2284,53 @@ InvokeTclMethod( /* *---------------------------------------------------------------------- * + * ErrnoReturn -- + * + * Checks a method error result if it returned an 'errno'. + * + * Results: + * The negative errno found in the error result, or 0. + * + * Side effects: + * None. + * + * Users: + * Currently only ReflectInput(), to enable the signaling of EAGAIN. + * by non-blocking channels at buffer-empty, but not EOF. + * + *---------------------------------------------------------------------- + */ + +static int +ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj* resObj) +{ + int code; + Tcl_InterpState sr; /* State of handler interp */ + + if (!rcPtr->interp) { + return 0; + } + + sr = Tcl_SaveInterpState(rcPtr->interp, 0 /* Dummy */); + UnmarshallErrorResult(rcPtr->interp, resObj); + + resObj = Tcl_GetObjResult(rcPtr->interp); + + if (((Tcl_GetIntFromObj(rcPtr->interp, resObj, &code) != TCL_OK) || (code >= 0))) { + if (strcmp ("EAGAIN",Tcl_GetString(resObj)) == 0) { + code = -11; + } else { + code = 0; + } + } + + Tcl_RestoreInterpState(rcPtr->interp, sr); + return code; +} + +/* + *---------------------------------------------------------------------- + * * GetReflectedChannelMap -- * * Gets and potentially initializes the reflected channel map for an @@ -2759,7 +2820,13 @@ ForwardProc( Tcl_Obj *toReadObj = Tcl_NewIntObj(paramPtr->input.toRead); if (InvokeTclMethod(rcPtr, "read", toReadObj, NULL, &resObj)!=TCL_OK){ - ForwardSetObjError(paramPtr, resObj); + int code = ErrnoReturn (rcPtr, resObj); + + if (code < 0) { + paramPtr->base.code = code; + } else { + ForwardSetObjError(paramPtr, resObj); + } paramPtr->input.toRead = -1; } else { /* diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 1754dcd..ce9c98e 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.49 2009/01/08 16:41:35 dkf Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.50 2009/08/06 22:28:12 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1015,6 +1015,38 @@ test iocmd-23.8 {chan read, level is squashed} -match glob -body { rename foo {} set res } -result {{read rc* 4096} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "read"*}} +test iocmd-23.9 {chan read, no data means eof} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + return "" + } + set c [chan create {r w} foo] +} -body { + note [read $c 2] + note [eof $c] + set res +} -cleanup { + close $c + rename foo {} + unset res +} -result {{read rc* 4096} {} 1} +test iocmd-23.10 {chan read, EAGAIN means no data, yet no eof either} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + error EAGAIN + } + set c [chan create {r w} foo] +} -body { + note [read $c 2] + note [eof $c] + set res +} -cleanup { + close $c + rename foo {} + unset res +} -result {{read rc* 4096} {} 0} # --- === *** ########################### # method write @@ -2246,6 +2278,46 @@ test iocmd.tf-23.8 {chan read, level is squashed} -match glob -body { set res } -result {{read rc* 4096} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "read"*}} \ -constraints {testchannel testthread} +test iocmd.tf-23.9 {chan read, no data means eof} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + return "" + } + set c [chan create {r w} foo] +} -body { + notes [inthread $c { + note [read $c 2] + note [eof $c] + close $c + notes + } c] + set res +} -cleanup { + rename foo {} + unset res +} -result {{read rc* 4096} {} 1} \ + -constraints {testchannel testthread} +test iocmd.tf-23.10 {chan read, EAGAIN means no data, yet no eof either} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + error EAGAIN + } + set c [chan create {r w} foo] +} -body { + notes [inthread $c { + note [read $c 2] + note [eof $c] + close $c + notes + } c] + set res +} -cleanup { + rename foo {} + unset res +} -result {{read rc* 4096} {} 0} \ + -constraints {testchannel testthread} # --- === *** ########################### # method write -- cgit v0.12 From 0c4df9767cafc8b3a0d1c1e472b87610bfa7a84f Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 12 Aug 2009 16:06:35 +0000 Subject: TIP #353 IMPLEMENTATION * doc/NRE.3: New public routine Tcl_NRExprObj() permits * generic/tcl.decls: extension commands to evaluate Tcl expressions * generic/tclBasic.c: in NR-enabled command procedures. * generic/tclCmdAH.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclObj.c: * tests/expr.test: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: --- ChangeLog | 16 +++++ doc/NRE.3 | 27 ++++++-- generic/tcl.decls | 7 +- generic/tclBasic.c | 4 +- generic/tclCmdAH.c | 43 +++++++++--- generic/tclDecls.h | 13 +++- generic/tclExecute.c | 182 ++++++++++++++++++++++++++++++++++---------------- generic/tclInt.h | 4 +- generic/tclObj.c | 53 ++++++++++----- generic/tclStubInit.c | 3 +- tests/expr.test | 9 ++- 11 files changed, 264 insertions(+), 97 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6df7583..92ddd99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2009-08-12 Don Porter + + TIP #353 IMPLEMENTATION + + * doc/NRE.3: New public routine Tcl_NRExprObj() permits + * generic/tcl.decls: extension commands to evaluate Tcl expressions + * generic/tclBasic.c: in NR-enabled command procedures. + * generic/tclCmdAH.c: + * generic/tclExecute.c: + * generic/tclInt.h: + * generic/tclObj.c: + * tests/expr.test: + + * generic/tclDecls.h: make genstubs + * generic/tclStubInit.c: + 2009-08-06 Andreas Kupries * doc/refchan.n [Bug 2827000]: Extended the implementation of diff --git a/doc/NRE.3 b/doc/NRE.3 index 331e406..4103e3d 100644 --- a/doc/NRE.3 +++ b/doc/NRE.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: NRE.3,v 1.3 2008/12/19 18:23:04 dgp Exp $ +'\" RCS: @(#) $Id: NRE.3,v 1.4 2009/08/12 16:06:38 dgp Exp $ '\" .so man.macros .TH NRE 3 8.6 Tcl "Tcl Library Procedures" @@ -31,6 +31,9 @@ int int \fBTcl_NRCmdSwap\fR(\fIinterp, cmd, objc, objv, flags\fR) .sp +int +\fBTcl_NRExprObj\fR(\fIinterp, objPtr, resultPtr\fR) +.sp void \fBTcl_NRAddCallback\fR(\fIinterp, postProcPtr, data0, data1, data2, data3\fR) .fi @@ -59,13 +62,16 @@ Count of parameters provided to the implementation of a command. Pointer to an array of Tcl objects. Each object holds the value of a single word in the command to execute. .AP Tcl_Obj *objPtr in -Pointer to a Tcl_Obj whose value is a script to execute. +Pointer to a Tcl_Obj whose value is a script or expression to execute. .AP int flags in ORed combination of flag bits that specify additional options. \fBTCL_EVAL_GLOBAL\fR is the only flag that is currently supported. .\" TODO: This is a lie. But kbk didn't grasp TCL_EVAL_INVOKE and .\" TCL_EVAL_NOERR well enough to document them. .AP Tcl_Command cmd in +.AP Tcl_Obj *resultPtr out +Pointer to an unshared Tcl_Obj where the result of expression +evaluation is written. .AP Tcl_NRPostProc *postProcPtr in Pointer to a function that will be invoked when the command currently executing in the interpreter designated by \fIinterp\fR completes. @@ -150,9 +156,18 @@ If the \fBTCL_EVAL_GLOBAL\fR flag is set, the script or command is evaluated in the global namespace. If it is not set, it is evaluated in the current namespace. .PP -All three of the routines return \fBTCL_OK\fR if command invocation -has been scheduled successfully. If for any reason command invocation -cannot be scheduled (for example, if the interpreter is unable to find +\fBTcl_NRExprObj\fR arranges for the expression contained in \fIobjPtr\fR +to be evaluated in the interpreter designated by \fIinterp\fR after +the current command (which must be trampoline-enabled) returns. It is +the method by which a command may evaluate a Tcl expression without consuming +space on the C stack. The argument \fIresultPtr\fR is a pointer to an +unshared Tcl_Obj where the result of expression evaluation is to be written. +If expression evaluation returns any code other than TCL_OK, the +\fIresultPtr\fR value is left untouched. +.PP +All of the routines return \fBTCL_OK\fR if command or expression invocation +has been scheduled successfully. If for any reason the scheduling cannot +be completed (for example, if the interpreter is unable to find the requested command), they return \fBTCL_ERROR\fR with an appropriate message left in the interpreter's result. .PP @@ -296,7 +311,7 @@ and the second is for use when there is already a trampoline in place. \fITheCmdDeleteProc\fR); .CE .SH "SEE ALSO" -Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandFromObj(3) +Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandFromObj(3), Tcl_ExprObj(3) .SH KEYWORDS stackless, nonrecursive, execute, command, global, object, result, script .SH COPYRIGHT diff --git a/generic/tcl.decls b/generic/tcl.decls index 0ce6825..26f3a83 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.169 2009/02/27 23:03:42 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.170 2009/08/12 16:06:39 dgp Exp $ library tcl @@ -2295,6 +2295,11 @@ declare 624 generic { int Tcl_CloseEx(Tcl_Interp *interp, Tcl_Channel chan, int flags) } +# TIP #353 (NR-enabled expressions) dgp +declare 625 generic { + int Tcl_NRExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *resultPtr) +} + # ----- BASELINE -- FOR -- 8.6.0 ----- # ############################################################################## diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7941c7d..b83afe5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.400 2009/08/02 13:03:47 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.401 2009/08/12 16:06:41 dgp Exp $ */ #include "tclInt.h" @@ -182,7 +182,7 @@ static const CmdInfo builtInCmds[] = { {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1}, {"error", Tcl_ErrorObjCmd, NULL, NULL, 1}, {"eval", Tcl_EvalObjCmd, NULL, NULL, 1}, - {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, NULL, 1}, + {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, TclNRExprObjCmd, 1}, {"for", Tcl_ForObjCmd, TclCompileForCmd, TclNRForObjCmd, 1}, {"foreach", Tcl_ForeachObjCmd, TclCompileForeachCmd, TclNRForeachCmd, 1}, {"format", Tcl_FormatObjCmd, NULL, NULL, 1}, diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index b268bfc..85b098a 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.118 2009/07/24 20:45:22 dgp Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.119 2009/08/12 16:06:43 dgp Exp $ */ #include "tclInt.h" @@ -58,6 +58,7 @@ static const char * GetTypeFromMode(int mode); static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); static Tcl_NRPostProc CatchObjCmdCallback; +static Tcl_NRPostProc ExprCallback; static Tcl_NRPostProc ForNextCallback; static Tcl_NRPostProc ForeachLoopStep; static Tcl_NRPostProc EvalCmdErrMsg; @@ -837,29 +838,53 @@ Tcl_ExprObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_Obj *resultPtr; - int result; + return Tcl_NRCallObjProc(interp, TclNRExprObjCmd, dummy, objc, objv); +} + +int +TclNRExprObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Obj *resultPtr, *objPtr; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?"); return TCL_ERROR; } + TclNewObj(resultPtr); + Tcl_IncrRefCount(resultPtr); if (objc == 2) { - result = Tcl_ExprObj(interp, objv[1], &resultPtr); + objPtr = objv[1]; + TclNRAddCallback(interp, ExprCallback, resultPtr, NULL, NULL, NULL); } else { - Tcl_Obj *objPtr = Tcl_ConcatObj(objc-1, objv+1); + objPtr = Tcl_ConcatObj(objc-1, objv+1); + TclNRAddCallback(interp, ExprCallback, resultPtr, objPtr, NULL, NULL); + } + + return Tcl_NRExprObj(interp, objPtr, resultPtr); +} + +static int +ExprCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj *resultPtr = data[0]; + Tcl_Obj *objPtr = data[1]; - Tcl_IncrRefCount(objPtr); - result = Tcl_ExprObj(interp, objPtr, &resultPtr); + if (objPtr != NULL) { Tcl_DecrRefCount(objPtr); } if (result == TCL_OK) { Tcl_SetObjResult(interp, resultPtr); - Tcl_DecrRefCount(resultPtr); /* Done with the result object */ } - + Tcl_DecrRefCount(resultPtr); return result; } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 6c3869f..032fb75 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.170 2009/02/27 23:03:42 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.171 2009/08/12 16:06:43 dgp Exp $ */ #ifndef _TCLDECLS @@ -3725,6 +3725,12 @@ EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingPtr); EXTERN int Tcl_CloseEx (Tcl_Interp * interp, Tcl_Channel chan, int flags); #endif +#ifndef Tcl_NRExprObj_TCL_DECLARED +#define Tcl_NRExprObj_TCL_DECLARED +/* 625 */ +EXTERN int Tcl_NRExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, + Tcl_Obj * resultPtr); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4385,6 +4391,7 @@ typedef struct TclStubs { void (*tcl_SetStartupScript) (Tcl_Obj * path, const char * encoding); /* 622 */ Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ int (*tcl_CloseEx) (Tcl_Interp * interp, Tcl_Channel chan, int flags); /* 624 */ + int (*tcl_NRExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj * resultPtr); /* 625 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6915,6 +6922,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_CloseEx \ (tclStubsPtr->tcl_CloseEx) /* 624 */ #endif +#ifndef Tcl_NRExprObj +#define Tcl_NRExprObj \ + (tclStubsPtr->tcl_NRExprObj) /* 625 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 1a9c9a9..c668539 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.443 2009/07/24 20:45:23 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.444 2009/08/12 16:06:43 dgp Exp $ */ #include "tclInt.h" @@ -693,6 +693,9 @@ static inline int OFFSET(void *ptr); static Tcl_Obj ** StackAllocWords(Tcl_Interp *interp, int numWords); static Tcl_Obj ** StackReallocWords(Tcl_Interp *interp, int numWords); +static Tcl_NRPostProc CopyCallback; +static Tcl_NRPostProc ExprObjCallback; + /* * The structure below defines a bytecode Tcl object type to hold the * compiled bytecode for Tcl expressions. @@ -1243,6 +1246,127 @@ TclStackRealloc( *-------------------------------------------------------------- */ +int +Tcl_ExprObj( + Tcl_Interp *interp, /* Context in which to evaluate the + * expression. */ + register Tcl_Obj *objPtr, /* Points to Tcl object containing expression + * to evaluate. */ + Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression + * result is stored if no errors occur. */ +{ + TEOV_callback *rootPtr = TOP_CB(interp); + Tcl_Obj *resultPtr; + + TclNewObj(resultPtr); + TclNRAddCallback(interp, CopyCallback, resultPtrPtr, resultPtr, + NULL, NULL); + Tcl_NRExprObj(interp, objPtr, resultPtr); + return TclNRRunCallbacks(interp, TCL_OK, rootPtr, 0); +} + +static int +CopyCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj **resultPtrPtr = data[0]; + Tcl_Obj *resultPtr = data[1]; + + if (result == TCL_OK) { + *resultPtrPtr = resultPtr; + Tcl_IncrRefCount(resultPtr); + } else { + Tcl_DecrRefCount(resultPtr); + } + return result; +} + +/* + *-------------------------------------------------------------- + * + * Tcl_NRExprObj -- + * + * Request evaluation of the expression in a Tcl_Obj by the NR stack. + * + * Results: + * Returns TCL_OK. + * + * Side effects: + * Compiles objPtr as a Tcl expression and places callbacks on the + * NR stack to execute the bytecode and store the result in resultPtr. + * If bytecode execution raises an exception, nothing is written + * to resultPtr, and the exceptional return code flows up the NR + * stack. If the exception is TCL_ERROR, an error message is left + * in the interp result and the interp's return options dictionary + * holds additional error information too. Execution of the bytecode + * may have other side effects, depending on the expression. + * + *-------------------------------------------------------------- + */ + +int +Tcl_NRExprObj( + Tcl_Interp *interp, + Tcl_Obj *objPtr, + Tcl_Obj *resultPtr) +{ + ByteCode *codePtr; + + /* TODO: consider saving whole state? */ + Tcl_Obj *saveObjPtr = Tcl_GetObjResult(interp); + + Tcl_IncrRefCount(saveObjPtr); + + codePtr = CompileExprObj(interp, objPtr); + + /* TODO: Confirm reset not required? */ + /*Tcl_ResetResult(interp);*/ + Tcl_NRAddCallback(interp, ExprObjCallback, saveObjPtr, resultPtr, + NULL, NULL); + Tcl_NRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), codePtr, + NULL, NULL); + return TCL_OK; +} + +static int +ExprObjCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Tcl_Obj *saveObjPtr = data[0]; + Tcl_Obj *resultPtr = data[1]; + + if (result == TCL_OK) { + TclSetDuplicateObj(resultPtr, Tcl_GetObjResult(interp)); + Tcl_IncrRefCount(resultPtr); + Tcl_SetObjResult(interp, saveObjPtr); + } + TclDecrRefCount(saveObjPtr); + return result; +} + +/* + *---------------------------------------------------------------------- + * + * CompileExprObj -- + * Compile a Tcl expression value into ByteCode. + * + * Results: + * A (ByteCode *) is returned pointing to the resulting ByteCode. + * The caller must manage its refCount and arrange for a call to + * TclCleanupByteCode() when the last reference disappears. + * + * Side effects: + * The Tcl_ObjType of objPtr is changed to the "bytecode" type, + * and the ByteCode is kept in the internal rep (along with context + * data for checking validity) for faster operations the next time + * CompileExprObj is called on the same value. + * + *---------------------------------------------------------------------- + */ static ByteCode * CompileExprObj( @@ -1318,62 +1442,6 @@ CompileExprObj( } return codePtr; } - -int -Tcl_ExprObj( - Tcl_Interp *interp, /* Context in which to evaluate the - * expression. */ - register Tcl_Obj *objPtr, /* Points to Tcl object containing expression - * to evaluate. */ - Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression - * result is stored if no errors occur. */ -{ - Interp *iPtr = (Interp *) interp; - int result; - ByteCode *codePtr; - - /* - * Execute the expression after first saving the interpreter's result. - */ - - Tcl_Obj *saveObjPtr = Tcl_GetObjResult(interp); - Tcl_IncrRefCount(saveObjPtr); - - codePtr = CompileExprObj(interp, objPtr); - - - Tcl_ResetResult(interp); - - /* - * Increment the code's ref count while it is being executed. If - * afterwards no references to it remain, free the code. - */ - - codePtr->refCount++; - result = TclExecuteByteCode(interp, codePtr); - codePtr->refCount--; - if (codePtr->refCount <= 0) { - TclCleanupByteCode(codePtr); - } - - /* - * If the expression evaluated successfully, store a pointer to its value - * object in resultPtrPtr then restore the old interpreter result. We - * increment the object's ref count to reflect the reference that we are - * returning to the caller. We also decrement the ref count of the - * interpreter's result object after calling Tcl_SetResult since we next - * store into that field directly. - */ - - if (result == TCL_OK) { - *resultPtrPtr = iPtr->objResultPtr; - Tcl_IncrRefCount(iPtr->objResultPtr); - - Tcl_SetObjResult(interp, saveObjPtr); - } - TclDecrRefCount(saveObjPtr); - return result; -} /* *---------------------------------------------------------------------- diff --git a/generic/tclInt.h b/generic/tclInt.h index ac3b3bc..b441bf6b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.432 2009/08/02 13:03:47 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.433 2009/08/12 16:06:44 dgp Exp $ */ #ifndef _TCLINT @@ -2607,6 +2607,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRNamespaceObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRExprObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForeachCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; @@ -2890,6 +2891,7 @@ MODULE_SCOPE void TclSetBignumIntRep(Tcl_Obj *objPtr, mp_int *bignumValue); MODULE_SCOPE void TclSetCmdNameObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Command *cmdPtr); +MODULE_SCOPE void TclSetDuplicateObj(Tcl_Obj *dupPtr, Tcl_Obj *objPtr); MODULE_SCOPE void TclSetProcessGlobalValue(ProcessGlobalValue *pgvPtr, Tcl_Obj *newValue, Tcl_Encoding encoding); MODULE_SCOPE void TclSignalExitThread(Tcl_ThreadId id, int result); diff --git a/generic/tclObj.c b/generic/tclObj.c index 46758fa..8052028 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.154 2009/08/02 13:03:47 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.155 2009/08/12 16:06:44 dgp Exp $ */ #include "tclInt.h" @@ -1133,30 +1133,47 @@ TclObjBeingDeleted( *---------------------------------------------------------------------- */ +#define SetDuplicateObj(dupPtr, objPtr) \ + { \ + const Tcl_ObjType *typePtr = (objPtr)->typePtr; \ + const char *bytes = (objPtr)->bytes; \ + if (bytes) { \ + TclInitStringRep((dupPtr), bytes, (objPtr)->length); \ + } else { \ + (dupPtr)->bytes = NULL; \ + } \ + if (typePtr) { \ + if (typePtr->dupIntRepProc) { \ + typePtr->dupIntRepProc((objPtr), (dupPtr)); \ + } else { \ + (dupPtr)->internalRep = (objPtr)->internalRep; \ + (dupPtr)->typePtr = typePtr; \ + } \ + } \ + } + Tcl_Obj * Tcl_DuplicateObj( - register Tcl_Obj *objPtr) /* The object to duplicate. */ + Tcl_Obj *objPtr) /* The object to duplicate. */ { - register const Tcl_ObjType *typePtr = objPtr->typePtr; - register Tcl_Obj *dupPtr; + Tcl_Obj *dupPtr; TclNewObj(dupPtr); + SetDuplicateObj(dupPtr, objPtr); + return dupPtr; +} - if (objPtr->bytes == NULL) { - dupPtr->bytes = NULL; - } else if (objPtr->bytes != tclEmptyStringRep) { - TclInitStringRep(dupPtr, objPtr->bytes, objPtr->length); - } - - if (typePtr != NULL) { - if (typePtr->dupIntRepProc == NULL) { - dupPtr->internalRep = objPtr->internalRep; - dupPtr->typePtr = typePtr; - } else { - typePtr->dupIntRepProc(objPtr, dupPtr); - } +void +TclSetDuplicateObj( + Tcl_Obj *dupPtr, + Tcl_Obj *objPtr) +{ + if (Tcl_IsShared(dupPtr)) { + Tcl_Panic("%s called with shared object", "TclSetDuplicateObj"); } - return dupPtr; + TclInvalidateStringRep(dupPtr); + TclFreeIntRep(dupPtr); + SetDuplicateObj(dupPtr, objPtr); } /* diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index d80c19a..c71b944 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.183 2009/07/15 13:17:19 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.184 2009/08/12 16:06:44 dgp Exp $ */ #include "tclInt.h" @@ -1109,6 +1109,7 @@ static const TclStubs tclStubs = { Tcl_SetStartupScript, /* 622 */ Tcl_GetStartupScript, /* 623 */ Tcl_CloseEx, /* 624 */ + Tcl_NRExprObj, /* 625 */ }; /* !END!: Do not edit above this line. */ diff --git a/tests/expr.test b/tests/expr.test index 5662169..f1612b6 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.75 2009/06/01 21:34:22 dgp Exp $ +# RCS: @(#) $Id: expr.test,v 1.76 2009/08/12 16:06:44 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -7146,6 +7146,13 @@ test expr-48.1 {Bug 1770224} { expr {-0x8000000000000001 >> 0x8000000000000000} } -1 +test expr-49.1 {Bug 2823282} { + coroutine foo apply {{} {set expr expr; $expr {[yield]}}} + foo 1 +} 1 + + + # cleanup if {[info exists a]} { unset a -- cgit v0.12 From 0df63f4a63fa3825fa00a0744a5d4868cebf3fd2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 16 Aug 2009 10:20:19 +0000 Subject: const addition (pkge.c) Use in stead of "pthread.h" Eliminate some more gcc warnings --- ChangeLog | 7 +++++++ unix/dltest/pkge.c | 4 ++-- unix/tclUnixThrd.c | 4 ++-- win/tclWinDde.c | 32 ++++++++++++++++---------------- win/tclWinReg.c | 16 +++++++--------- 5 files changed, 34 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92ddd99..d408fe8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-08-06 Jan Nijtmans + + * unix/dltest/pkge.c: const addition + * unix/tclUnixThrd.c: Use in stead of "pthread.h" + * win/tclWinDde.c: Eliminate some more gcc warnings + * win/tclWinReg.c + 2009-08-12 Don Porter TIP #353 IMPLEMENTATION diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c index a64ba26..827ee4e 100644 --- a/unix/dltest/pkge.c +++ b/unix/dltest/pkge.c @@ -10,7 +10,7 @@ * 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.10 2007/12/13 15:28:43 dgp Exp $ + * RCS: @(#) $Id: pkge.c,v 1.11 2009/08/16 10:20:20 nijtmans Exp $ */ #include "tcl.h" @@ -38,7 +38,7 @@ Pkge_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ { - static char script[] = "if 44 {open non_existent}"; + static const char script[] = "if 44 {open non_existent}"; if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index eac1bc8..b4ba1a0 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -10,14 +10,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixThrd.c,v 1.60 2008/08/13 23:08:39 das Exp $ + * RCS: @(#) $Id: tclUnixThrd.c,v 1.61 2009/08/16 10:20:20 nijtmans Exp $ */ #include "tclInt.h" #ifdef TCL_THREADS -#include "pthread.h" +#include typedef struct ThreadSpecificData { char nabuf[16]; diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 1425e94..4c7fc5b 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.34 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.35 2009/08/16 10:20:19 nijtmans Exp $ */ #include "tclInt.h" @@ -722,7 +722,7 @@ DdeServerProc( if (stricmp(utilString, TCL_DDE_EXECUTE_RESULT) == 0) { returnString = Tcl_GetStringFromObj(convPtr->returnPackagePtr, &len); - ddeReturn = DdeCreateDataHandle(ddeInstance, (char *)returnString, + ddeReturn = DdeCreateDataHandle(ddeInstance, (LPBYTE)returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT, 0); } else { if (Tcl_IsSafe(convPtr->riPtr->interp)) { @@ -735,7 +735,7 @@ DdeServerProc( returnString = Tcl_GetStringFromObj(variableObjPtr, &len); ddeReturn = DdeCreateDataHandle(ddeInstance, - (char *)returnString, (DWORD) len+1, 0, ddeItem, + (PBYTE)returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT, 0); } else { ddeReturn = NULL; @@ -995,8 +995,8 @@ DdeServicesOnAck( es = (struct DdeEnumServices *) GetWindowLong(hwnd, GWL_USERDATA); #endif - if ((es->service == (ATOM)NULL || es->service == service) - && (es->topic == (ATOM)NULL || es->topic == topic)) { + if ((es->service == (ATOM)0 || es->service == service) + && (es->topic == (ATOM)0 || es->topic == topic)) { Tcl_Obj *matchPtr = Tcl_NewListObj(0, NULL); Tcl_Obj *resultPtr = Tcl_GetObjResult(es->interp); @@ -1043,7 +1043,7 @@ DdeEnumWindowsCallback( SendMessageTimeout(hwndTarget, WM_DDE_INITIATE, (WPARAM)es->hwnd, MAKELONG(es->service, es->topic), SMTO_ABORTIFHUNG, 1000, - &dwResult); + (PDWORD_PTR) &dwResult); return TRUE; } @@ -1058,8 +1058,8 @@ DdeGetServicesList( es.interp = interp; es.result = TCL_OK; es.service = (serviceName == NULL) - ? (ATOM)NULL : GlobalAddAtom(serviceName); - es.topic = (topicName == NULL) ? (ATOM)NULL : GlobalAddAtom(topicName); + ? (ATOM)0 : GlobalAddAtom(serviceName); + es.topic = (topicName == NULL) ? (ATOM)0 : GlobalAddAtom(topicName); Tcl_ResetResult(interp); /* our list is to be appended to result. */ DdeCreateClient(&es); @@ -1068,10 +1068,10 @@ DdeGetServicesList( if (IsWindow(es.hwnd)) { DestroyWindow(es.hwnd); } - if (es.service != (ATOM)NULL) { + if (es.service != (ATOM)0) { GlobalDeleteAtom(es.service); } - if (es.topic != (ATOM)NULL) { + if (es.topic != (ATOM)0) { GlobalDeleteAtom(es.topic); } return es.result; @@ -1364,7 +1364,7 @@ Tcl_DdeObjCmd( break; } - ddeData = DdeCreateDataHandle(ddeInstance, (char *)dataString, + ddeData = DdeCreateDataHandle(ddeInstance, (PBYTE)dataString, (DWORD) dataLength+1, 0, 0, CF_TEXT, 0); if (ddeData != NULL) { if (async) { @@ -1414,10 +1414,10 @@ Tcl_DdeObjCmd( result = TCL_ERROR; } else { DWORD tmp; - char *dataString = DdeAccessData(ddeData, &tmp); + char *dataString = (char *) DdeAccessData(ddeData, &tmp); if (binary) { - returnObjPtr = Tcl_NewByteArrayObj(dataString, + returnObjPtr = Tcl_NewByteArrayObj((unsigned char *)dataString, (int) tmp); } else { returnObjPtr = Tcl_NewStringObj(dataString, -1); @@ -1457,7 +1457,7 @@ Tcl_DdeObjCmd( ddeItem = DdeCreateStringHandle(ddeInstance, itemString, CP_WINANSI); if (ddeItem != NULL) { - ddeData = DdeClientTransaction((char *)dataString, (DWORD) length+1, + ddeData = DdeClientTransaction((PBYTE)dataString, (DWORD) length+1, hConv, ddeItem, CF_TEXT, XTYP_POKE, 5000, NULL); if (ddeData == NULL) { SetDdeError(interp); @@ -1599,7 +1599,7 @@ Tcl_DdeObjCmd( objPtr = Tcl_ConcatObj(objc, objv); string = Tcl_GetStringFromObj(objPtr, &length); - ddeItemData = DdeCreateDataHandle(ddeInstance, (char *)string, + ddeItemData = DdeCreateDataHandle(ddeInstance, (PBYTE)string, (DWORD) length+1, 0, 0, CF_TEXT, 0); if (async) { @@ -1642,7 +1642,7 @@ Tcl_DdeObjCmd( length = DdeGetData(ddeData, NULL, 0, 0); Tcl_SetObjLength(resultPtr, length); string = Tcl_GetString(resultPtr); - DdeGetData(ddeData, (char *)string, (DWORD) length, 0); + DdeGetData(ddeData, (PBYTE)string, (DWORD) length, 0); Tcl_SetObjLength(resultPtr, (int) strlen(string)); if (Tcl_ListObjIndex(NULL, resultPtr, 0, &objPtr) != TCL_OK) { diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 16b4b3e..849e9a9 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.45 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.46 2009/08/16 10:20:19 nijtmans Exp $ */ #include "tclInt.h" @@ -218,6 +218,7 @@ int Registry_Init( Tcl_Interp *interp) { + int useWide; Tcl_Command cmd; if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { @@ -229,11 +230,8 @@ Registry_Init( * appropriate registry function table. */ - if (TclWinGetPlatformId() == VER_PLATFORM_WIN32_NT) { - regWinProcs = &unicodeProcs; - } else { - regWinProcs = &asciiProcs; - } + useWide = (TclWinGetPlatformId() != VER_PLATFORM_WIN32_WINDOWS); + regWinProcs = useWide ? &unicodeProcs : &asciiProcs; cmd = Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, (ClientData)interp, DeleteCmd); @@ -878,7 +876,7 @@ GetValue( */ Tcl_SetObjResult(interp, Tcl_NewByteArrayObj( - Tcl_DStringValue(&data), (int) length)); + (const unsigned char *)Tcl_DStringValue(&data), (int) length)); } Tcl_DStringFree(&data); return result; @@ -1398,7 +1396,7 @@ SetValue( * Store binary data in the registry. */ - data = Tcl_GetByteArrayFromObj(dataObj, &length); + data = (char *) Tcl_GetByteArrayFromObj(dataObj, &length); result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) data, (DWORD) length); } @@ -1471,7 +1469,7 @@ BroadcastValue( */ result = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, - (WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, &sendResult); + (WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, (PDWORD_PTR) &sendResult); objPtr = Tcl_NewObj(); Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewLongObj((long) result)); -- cgit v0.12 From 03f782be0e25217842dcc317a1055d15054f2ca6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 16 Aug 2009 10:21:04 +0000 Subject: const addition (pkge.c) Use in stead of "pthread.h" Eliminate some more gcc warnings --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d408fe8..85e9fbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2009-08-06 Jan Nijtmans +2009-08-16 Jan Nijtmans * unix/dltest/pkge.c: const addition * unix/tclUnixThrd.c: Use in stead of "pthread.h" -- cgit v0.12 From 7224aab4417a253cc7246233a59a1a0e368ce191 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 16 Aug 2009 12:25:06 +0000 Subject: Change ForIterData, make it const-safe. --- ChangeLog | 2 ++ generic/tclCmdAH.c | 4 ++-- generic/tclInt.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85e9fbe..e93139b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ * unix/tclUnixThrd.c: Use in stead of "pthread.h" * win/tclWinDde.c: Eliminate some more gcc warnings * win/tclWinReg.c + * generic/tclInt.h Change ForIterData, make it const-safe. + * generic/tclCmdAH.c 2009-08-12 Don Porter diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 85b098a..44fe3d6 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.119 2009/08/12 16:06:43 dgp Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.120 2009/08/16 12:25:07 nijtmans Exp $ */ #include "tclInt.h" @@ -1919,7 +1919,7 @@ TclNRForIterCallback( Tcl_Obj *cond = iterPtr->cond; Tcl_Obj *body = iterPtr->body; Tcl_Obj *next = iterPtr->next; - char *msg = iterPtr->msg; + const char *msg = iterPtr->msg; int value; if ((result != TCL_OK) && (result != TCL_CONTINUE)) { diff --git a/generic/tclInt.h b/generic/tclInt.h index b441bf6b..a381678 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.433 2009/08/12 16:06:44 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.434 2009/08/16 12:25:06 nijtmans Exp $ */ #ifndef _TCLINT @@ -2638,7 +2638,7 @@ typedef struct ForIterData { Tcl_Obj* cond; /* loop condition expression */ Tcl_Obj* body; /* loop body */ Tcl_Obj* next; /* loop step script, NULL for 'while' */ - char* msg; /* error message part */ + const char* msg; /* error message part */ int word; /* Index of the body script in the command */ } ForIterData; -- cgit v0.12 From 2a9cfcc7744dc99bb7f19869ccec28b275cca147 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 18 Aug 2009 14:44:21 +0000 Subject: * generic/tclPathObj.c: Added NULL check to prevent crashes during * tests/fileName.test: [glob]. [Bug 2837800] --- ChangeLog | 5 +++++ generic/tclPathObj.c | 5 ++++- tests/fileName.test | 34 +++++++++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e93139b..3351815 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-18 Don Porter + + * generic/tclPathObj.c: Added NULL check to prevent crashes during + * tests/fileName.test: [glob]. [Bug 2837800] + 2009-08-16 Jan Nijtmans * unix/dltest/pkge.c: const addition diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 3c7cce5..6c368e5 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.80 2009/03/27 19:17:54 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.81 2009/08/18 14:44:21 dgp Exp $ */ #include "tclInt.h" @@ -1684,6 +1684,9 @@ Tcl_FSGetTranslatedPath( Tcl_Obj *translatedCwdPtr = Tcl_FSGetTranslatedPath(interp, srcFsPathPtr->cwdPtr); + if (translatedCwdPtr == NULL) { + return NULL; + } retObj = Tcl_FSJoinToPath(translatedCwdPtr, 1, &srcFsPathPtr->normPathPtr); diff --git a/tests/fileName.test b/tests/fileName.test index 78f2e58..6043b36 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.59 2009/03/27 19:17:54 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.60 2009/08/18 14:44:21 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1510,6 +1510,38 @@ test fileName-20.4 {Bug 1750300} -setup { removeDirectory foo } -result 0 +test fileName-20.5 {Bug 2837800} -setup { + set dd [makeDirectory isolate] + set d [makeDirectory ./~foo $dd] + makeFile {} test $d + set savewd [pwd] + cd $dd +} -body { + glob */test +} -cleanup { + cd $savewd + removeFile test $d + removeDirectory ./~foo $dd + removeDirectory isolate +} -result ~foo/test + +test fileName-20.6 {Bug 2837800} -setup { + # Recall that we have $env(HOME) set so that references + # to ~ point to [temporaryDirectory] + makeFile {} test ~ + set dd [makeDirectory isolate] + set d [makeDirectory ./~ $dd] + set savewd [pwd] + cd $dd +} -body { + glob -nocomplain */test +} -cleanup { + cd $savewd + removeDirectory ./~ $dd + removeDirectory isolate + removeFile test ~ +} -result {} + # cleanup catch {file delete -force C:/globTest} cd [temporaryDirectory] -- cgit v0.12 From 7658599bd873f2f1e5d1feabe6415aba45255203 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 18 Aug 2009 16:27:00 +0000 Subject: nicer test failure mode --- tests/fileName.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fileName.test b/tests/fileName.test index 6043b36..1f2d978 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.60 2009/08/18 14:44:21 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.61 2009/08/18 16:27:00 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1517,7 +1517,7 @@ test fileName-20.5 {Bug 2837800} -setup { set savewd [pwd] cd $dd } -body { - glob */test + glob -nocomplain */test } -cleanup { cd $savewd removeFile test $d -- cgit v0.12 From aaf5ab291c239170c32f62ed8a800ec13b863484 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 18 Aug 2009 17:42:30 +0000 Subject: test for 2806250 --- tests/fileName.test | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/fileName.test b/tests/fileName.test index 1f2d978..4164388 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.61 2009/08/18 16:27:00 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.62 2009/08/18 17:42:30 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1542,6 +1542,16 @@ test fileName-20.6 {Bug 2837800} -setup { removeFile test ~ } -result {} +test fileName-20.7 {Bug 2806250} -setup { + set d [makeDirectory isolate] + makeFile {} ./~test $d +} -body { + file exists [lindex [glob -nocomplain isolate/*] 0] +} -cleanup { + removeFile ./~test $d + removeDirectory isolate +} -result 1 + # cleanup catch {file delete -force C:/globTest} cd [temporaryDirectory] -- cgit v0.12 From 292a05b86ebbf9c8aae085fb829cb63a1086673e Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 19 Aug 2009 14:25:37 +0000 Subject: Formatting corrections --- generic/tclCmdMZ.c | 11 +++++------ generic/tclInt.h | 16 ++++++++-------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 554097f..c5817bc 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.188 2009/07/20 09:13:44 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.189 2009/08/19 14:25:37 dkf Exp $ */ #include "tclInt.h" @@ -24,7 +24,7 @@ static inline Tcl_Obj * During(Tcl_Interp *interp, int resultCode, Tcl_Obj *oldOptions, Tcl_Obj *errorInfo); static int SwitchPostProc(ClientData data[], Tcl_Interp* interp, - int result); + int result); static int TryPostBody(ClientData data[], Tcl_Interp *interp, int result); static int TryPostFinal(ClientData data[], Tcl_Interp *interp, @@ -3895,9 +3895,8 @@ TclNRSwitchObjCmd( * TIP #280: Make invoking context available to switch branch. */ - Tcl_NRAddCallback(interp, SwitchPostProc, INT2PTR(splitObjs), - (ClientData) ctxPtr, INT2PTR(pc), - (ClientData) pattern); + Tcl_NRAddCallback(interp, SwitchPostProc, INT2PTR(splitObjs), ctxPtr, + INT2PTR(pc), (ClientData) pattern); return TclNREvalObjEx(interp, objv[j], 0, ctxPtr, j); } static int @@ -4676,7 +4675,7 @@ TclNRWhileObjCmd( * We reuse [for]'s callback, passing a NULL for the 'next' script. */ - TclSmallAllocEx (interp, sizeof(ForIterData), iterPtr); + TclSmallAllocEx(interp, sizeof(ForIterData), iterPtr); iterPtr->cond = objv[1]; iterPtr->body = objv[2]; iterPtr->next = NULL; diff --git a/generic/tclInt.h b/generic/tclInt.h index a381678..93dbf01 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.434 2009/08/16 12:25:06 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.435 2009/08/19 14:26:18 dkf Exp $ */ #ifndef _TCLINT @@ -2621,8 +2621,8 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRTailcallObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; -MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, - struct TEOV_callback *tailcallPtr); +MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, + struct TEOV_callback *tailcallPtr); /* * This structure holds the data for the various iteration callbacks used to @@ -2635,11 +2635,11 @@ MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, */ typedef struct ForIterData { - Tcl_Obj* cond; /* loop condition expression */ - Tcl_Obj* body; /* loop body */ - Tcl_Obj* next; /* loop step script, NULL for 'while' */ - const char* msg; /* error message part */ - int word; /* Index of the body script in the command */ + Tcl_Obj *cond; /* Loop condition expression. */ + Tcl_Obj *body; /* Loop body. */ + Tcl_Obj *next; /* Loop step script, NULL for 'while'. */ + const char *msg; /* Error message part. */ + int word; /* Index of the body script in the command */ } ForIterData; /* -- cgit v0.12 From 88d19b646b5f7b79e36eb5a52c2dcb770a4121fd Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 19 Aug 2009 14:32:12 +0000 Subject: Make interpreted [for] and [while] NRE-safe. [Bug 2823276] --- ChangeLog | 9 ++- generic/tclCmdAH.c | 182 +++++++++++++++++++++++++++++++++++------------------ 2 files changed, 128 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3351815..29a36db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2009-08-19 Donal K. Fellows + + * generic/tclCmdAH.c (TclNRForObjCmd, etc.): [Bug 2823276]: Make [for] + and [while] into NRE-safe commands, even when interpreted. + 2009-08-18 Don Porter - * generic/tclPathObj.c: Added NULL check to prevent crashes during - * tests/fileName.test: [glob]. [Bug 2837800] + * generic/tclPathObj.c: [Bug 2837800]: Added NULL check to prevent + * tests/fileName.test: crashes during [glob]. 2009-08-16 Jan Nijtmans diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 44fe3d6..9a0c677 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.120 2009/08/16 12:25:07 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.121 2009/08/19 14:32:12 dkf Exp $ */ #include "tclInt.h" @@ -59,7 +59,10 @@ static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); static Tcl_NRPostProc CatchObjCmdCallback; static Tcl_NRPostProc ExprCallback; +static Tcl_NRPostProc ForSetupCallback; +static Tcl_NRPostProc ForCondCallback; static Tcl_NRPostProc ForNextCallback; +static Tcl_NRPostProc ForPostNextCallback; static Tcl_NRPostProc ForeachLoopStep; static Tcl_NRPostProc EvalCmdErrMsg; @@ -307,7 +310,7 @@ CatchObjCmdCallback( int objc = PTR2INT(data[0]); Tcl_Obj *varNamePtr = data[1]; Tcl_Obj *optionVarNamePtr = data[2]; - int rewind = ((Interp *) interp)->execEnvPtr->rewind; + int rewind = iPtr->execEnvPtr->rewind; /* * catch has to disable any tailcall @@ -1854,6 +1857,25 @@ FileTempfileCmd( * Side effects: * See the user documentation. * + * Notes: + * This command is split into a lot of pieces so that it can avoid doing + * reentrant TEBC calls. This makes things rather hard to follow, but + * here's the plan: + * + * NR: ---------------_\ + * Direct: Tcl_ForObjCmd -> TclNRForObjCmd + * | + * ForSetupCallback + * | + * [while] ------------> TclNRForIterCallback <---------. + * | | + * ForCondCallback | + * | | + * ForNextCallback ------------| + * | | + * ForPostNextCallback | + * |____________________| + * *---------------------------------------------------------------------- */ @@ -1875,36 +1897,46 @@ TclNRForObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int result; Interp *iPtr = (Interp *) interp; - ForIterData* iterPtr; + ForIterData *iterPtr; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, "start test next command"); return TCL_ERROR; } + TclSmallAllocEx(interp, sizeof(ForIterData), iterPtr); + iterPtr->cond = objv[2]; + iterPtr->body = objv[4]; + iterPtr->next = objv[3]; + iterPtr->msg = "\n (\"for\" body line %d)"; + iterPtr->word = 4; + + TclNRAddCallback(interp, ForSetupCallback, iterPtr, NULL, NULL, NULL); + /* * TIP #280. Make invoking context available to initial script. */ - result = TclEvalObjEx(interp, objv[1], 0, iPtr->cmdFramePtr, 1); + return TclNREvalObjEx(interp, objv[1], 0, iPtr->cmdFramePtr, 1); +} + +static int +ForSetupCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + ForIterData *iterPtr = data[0]; + if (result != TCL_OK) { if (result == TCL_ERROR) { Tcl_AddErrorInfo(interp, "\n (\"for\" initial command)"); } + TclSmallFreeEx(interp, iterPtr); return result; } - - TclSmallAllocEx (interp, sizeof(ForIterData), iterPtr); - iterPtr->cond = objv[2]; - iterPtr->body = objv[4]; - iterPtr->next = objv[3]; - iterPtr->msg = "\n (\"for\" body line %d)"; - iterPtr->word = 4; - - TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, - NULL, NULL); + TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, NULL, NULL); return TCL_OK; } @@ -1914,54 +1946,70 @@ TclNRForIterCallback( Tcl_Interp *interp, int result) { - Interp *iPtr = (Interp *) interp; - ForIterData* iterPtr = data[0]; - Tcl_Obj *cond = iterPtr->cond; - Tcl_Obj *body = iterPtr->body; - Tcl_Obj *next = iterPtr->next; - const char *msg = iterPtr->msg; - int value; + ForIterData *iterPtr = data[0]; + Tcl_Obj *boolObj; - if ((result != TCL_OK) && (result != TCL_CONTINUE)) { - goto done; + switch (result) { + case TCL_OK: + case TCL_CONTINUE: + /* + * We need to reset the result before evaluating the expression. + * Otherwise, any error message will be appended to the result of the + * last evaluation. + */ + + Tcl_ResetResult(interp); + TclNewObj(boolObj); + TclNRAddCallback(interp, ForCondCallback, iterPtr, boolObj, NULL, + NULL); + return Tcl_NRExprObj(interp, iterPtr->cond, boolObj); + case TCL_BREAK: + result = TCL_OK; + Tcl_ResetResult(interp); + break; + case TCL_ERROR: + Tcl_AppendObjToErrorInfo(interp, + Tcl_ObjPrintf(iterPtr->msg, Tcl_GetErrorLine(interp))); } + TclSmallFreeEx(interp, iterPtr); + return result; +} - /* - * We need to reset the result before passing it off to - * Tcl_ExprBooleanObj. Otherwise, any error message will be appended - * to the result of the last evaluation. - */ +static int +ForCondCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Interp *iPtr = (Interp *) interp; + ForIterData *iterPtr = data[0]; + Tcl_Obj *boolObj = data[1]; + int value; - Tcl_ResetResult(interp); - result = Tcl_ExprBooleanObj(interp, cond, &value); if (result != TCL_OK) { - TclSmallFreeEx (interp, iterPtr); + Tcl_DecrRefCount(boolObj); + TclSmallFreeEx(interp, iterPtr); return result; + } else if (Tcl_GetBooleanFromObj(interp, boolObj, &value) != TCL_OK) { + Tcl_DecrRefCount(boolObj); + TclSmallFreeEx(interp, iterPtr); + return TCL_ERROR; } + Tcl_DecrRefCount(boolObj); + if (value) { /* TIP #280. */ - if (next) { + if (iterPtr->next) { TclNRAddCallback(interp, ForNextCallback, iterPtr, NULL, NULL, NULL); } else { - TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, NULL, - NULL); + TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, + NULL, NULL); } - return TclNREvalObjEx(interp, body, 0, iPtr->cmdFramePtr, iterPtr->word); - } - - done: - switch (result) { - case TCL_BREAK: - result = TCL_OK; - case TCL_OK: - Tcl_ResetResult(interp); - break; - case TCL_ERROR: - Tcl_AppendObjToErrorInfo(interp, - Tcl_ObjPrintf(msg, Tcl_GetErrorLine(interp))); + return TclNREvalObjEx(interp, iterPtr->body, 0, iPtr->cmdFramePtr, + iterPtr->word); } - TclSmallFreeEx (interp, iterPtr); + TclSmallFreeEx(interp, iterPtr); return result; } @@ -1972,30 +2020,42 @@ ForNextCallback( int result) { Interp *iPtr = (Interp *) interp; - ForIterData* iterPtr = data[0]; + ForIterData *iterPtr = data[0]; Tcl_Obj *next = iterPtr->next; if ((result == TCL_OK) || (result == TCL_CONTINUE)) { + TclNRAddCallback(interp, ForPostNextCallback, iterPtr, NULL, NULL, + NULL); + /* * TIP #280. Make invoking context available to next script. - * - * NRE: we let the next script run in a new TEBC instance, ie, it is - * not nr-enabled. */ - result = TclEvalObjEx(interp, next, 0, iPtr->cmdFramePtr, 3); - if ((result != TCL_BREAK) && (result != TCL_OK)) { - if (result == TCL_ERROR) { - Tcl_AddErrorInfo(interp, "\n (\"for\" loop-end command)"); - TclSmallFreeEx (interp, iterPtr); - } - return result; - } + return TclNREvalObjEx(interp, next, 0, iPtr->cmdFramePtr, 3); } TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, NULL, NULL); return result; } + +static int +ForPostNextCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + ForIterData *iterPtr = data[0]; + + if ((result != TCL_BREAK) && (result != TCL_OK)) { + if (result == TCL_ERROR) { + Tcl_AddErrorInfo(interp, "\n (\"for\" loop-end command)"); + TclSmallFreeEx(interp, iterPtr); + } + return result; + } + TclNRAddCallback(interp, TclNRForIterCallback, iterPtr, NULL, NULL, NULL); + return result; +} /* *---------------------------------------------------------------------- -- cgit v0.12 From 0b0318425b93c4cab2b6a356d7f196dce6393883 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 19 Aug 2009 17:30:07 +0000 Subject: another test --- tests/fileName.test | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/fileName.test b/tests/fileName.test index 4164388..88495f2 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.62 2009/08/18 17:42:30 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.63 2009/08/19 17:30:07 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1552,6 +1552,16 @@ test fileName-20.7 {Bug 2806250} -setup { removeDirectory isolate } -result 1 +test fileName-20.8 {Bug 2806250} -setup { + set d [makeDirectory isolate] + makeFile {} ./~test $d +} -body { + file tail [lindex [glob -nocomplain isolate/*] 0] +} -cleanup { + removeFile ./~test $d + removeDirectory isolate +} -result ./~test + # cleanup catch {file delete -force C:/globTest} cd [temporaryDirectory] -- cgit v0.12 From 13295adc2421cdeacbac60fd9556f3ab27c609d8 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 19 Aug 2009 23:23:21 +0000 Subject: Interpreted [if] is now fully NRE-enabled. [Bug 2823276] --- ChangeLog | 5 +++ generic/tclCmdIL.c | 114 ++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 83 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29a36db..c52582e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-20 Donal K. Fellows + + * generic/tclCmdIL.c (TclNRIfObjCmd): [Bug 2823276]: Make [if] + NRE-safe on all arguments when interpreted. + 2009-08-19 Donal K. Fellows * generic/tclCmdAH.c (TclNRForObjCmd, etc.): [Bug 2823276]: Make [for] diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 0049b18..274d9b8 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.168 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.169 2009/08/19 23:23:22 dkf Exp $ */ #include "tclInt.h" @@ -104,6 +104,8 @@ typedef struct SortInfo { */ static int DictionaryCompare(const char *left, const char *right); +static int IfConditionCallback(ClientData data[], + Tcl_Interp *interp, int result); static int InfoArgsCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int InfoBodyCmd(ClientData dummy, Tcl_Interp *interp, @@ -219,40 +221,55 @@ TclNRIfObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - int thenScriptIndex = 0; /* "then" script to be evaled after syntax - * check. */ + Tcl_Obj *boolObj; + + if (objc <= 1) { + Tcl_AppendResult(interp, "wrong # args: no expression after \"", + TclGetString(objv[0]), "\" argument", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + return TCL_ERROR; + } + + /* + * At this point, objv[1] refers to the main expression to test. The + * arguments after the expression must be "then" (optional) and a script + * to execute if the expression is true. + */ + + TclNewObj(boolObj); + Tcl_NRAddCallback(interp, IfConditionCallback, INT2PTR(objc), + (ClientData) objv, INT2PTR(1), boolObj); + return Tcl_NRExprObj(interp, objv[1], boolObj); +} + +static int +IfConditionCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ Interp *iPtr = (Interp *) interp; - int i, result, value; + int objc = PTR2INT(data[0]); + Tcl_Obj *const *objv = data[1]; + int i = PTR2INT(data[2]); + Tcl_Obj *boolObj = data[3]; + int value, thenScriptIndex = 0; const char *clause; - i = 1; - while (1) { - /* - * At this point in the loop, objv and objc refer to an expression to - * test, either for the main expression or an expression following an - * "elseif". The arguments after the expression must be "then" - * (optional) and a script to execute if the expression is true. - */ + if (result != TCL_OK) { + TclDecrRefCount(boolObj); + return result; + } + if (Tcl_GetBooleanFromObj(interp, boolObj, &value) != TCL_OK) { + TclDecrRefCount(boolObj); + return TCL_ERROR; + } + TclDecrRefCount(boolObj); - if (i >= objc) { - clause = TclGetString(objv[i-1]); - Tcl_AppendResult(interp, "wrong # args: ", - "no expression after \"", clause, "\" argument", NULL); - return TCL_ERROR; - } - if (!thenScriptIndex) { - result = Tcl_ExprBooleanObj(interp, objv[i], &value); - if (result != TCL_OK) { - return result; - } - } + while (1) { i++; if (i >= objc) { - missingScript: - clause = TclGetString(objv[i-1]); - Tcl_AppendResult(interp, "wrong # args: ", - "no script following \"", clause, "\" argument", NULL); - return TCL_ERROR; + goto missingScript; } clause = TclGetString(objv[i]); if ((i < objc) && (strcmp(clause, "then") == 0)) { @@ -284,11 +301,30 @@ TclNRIfObjCmd( return TCL_OK; } clause = TclGetString(objv[i]); - if ((clause[0] == 'e') && (strcmp(clause, "elseif") == 0)) { - i++; - continue; + if ((clause[0] != 'e') || (strcmp(clause, "elseif") != 0)) { + break; + } + i++; + + /* + * At this point in the loop, objv and objc refer to an expression to + * test, either for the main expression or an expression following an + * "elseif". The arguments after the expression must be "then" + * (optional) and a script to execute if the expression is true. + */ + + if (i >= objc) { + Tcl_AppendResult(interp, "wrong # args: ", + "no expression after \"", clause, "\" argument", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + return TCL_ERROR; + } + if (!thenScriptIndex) { + TclNewObj(boolObj); + Tcl_NRAddCallback(interp, IfConditionCallback, data[0], data[1], + INT2PTR(i), boolObj); + return Tcl_NRExprObj(interp, objv[i], boolObj); } - break; } /* @@ -300,14 +336,13 @@ TclNRIfObjCmd( if (strcmp(clause, "else") == 0) { i++; if (i >= objc) { - Tcl_AppendResult(interp, "wrong # args: ", - "no script following \"else\" argument", NULL); - return TCL_ERROR; + goto missingScript; } } if (i < objc - 1) { Tcl_AppendResult(interp, "wrong # args: ", "extra words after \"else\" clause in \"if\" command", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); return TCL_ERROR; } if (thenScriptIndex) { @@ -319,6 +354,13 @@ TclNRIfObjCmd( iPtr->cmdFramePtr, thenScriptIndex); } return TclNREvalObjEx(interp, objv[i], 0, iPtr->cmdFramePtr, i); + + missingScript: + clause = TclGetString(objv[i-1]); + Tcl_AppendResult(interp, "wrong # args: no script following \"", clause, + "\" argument", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + return TCL_ERROR; } /* -- cgit v0.12 From b541bbc3b70e0ab71edd12c00b498928c720a856 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 20 Aug 2009 08:31:16 +0000 Subject: Close off memory leak in [lsort]. --- ChangeLog | 1 + generic/tclCmdIL.c | 142 +++++++++++++++++++++++++---------------------------- 2 files changed, 69 insertions(+), 74 deletions(-) diff --git a/ChangeLog b/ChangeLog index c52582e..6285475 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclCmdIL.c (TclNRIfObjCmd): [Bug 2823276]: Make [if] NRE-safe on all arguments when interpreted. + (Tcl_LsortObjCmd): Close off memory leak. 2009-08-19 Donal K. Fellows diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 274d9b8..e10a899 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -3,7 +3,7 @@ * * This file contains the top-level command routines for most of the Tcl * built-in commands whose names begin with the letters I through L. It - * contains only commands in the generic core (i.e. those that don't + * contains only commands in the generic core (i.e., those that don't * depend much upon UNIX facilities). * * Copyright (c) 1987-1993 The Regents of the University of California. @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.169 2009/08/19 23:23:22 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.170 2009/08/20 08:31:16 dkf Exp $ */ #include "tclInt.h" @@ -677,8 +677,8 @@ InfoCommandsCmd( Namespace *dummy1NsPtr, *dummy2NsPtr; pattern = TclGetString(objv[1]); - TclGetNamespaceForQualName(interp, pattern, (Namespace *) NULL, 0, - &nsPtr, &dummy1NsPtr, &dummy2NsPtr, &simplePattern); + TclGetNamespaceForQualName(interp, pattern, NULL, 0, &nsPtr, + &dummy1NsPtr, &dummy2NsPtr, &simplePattern); if (nsPtr != NULL) { /* We successfully found the pattern's ns. */ specificNsInPattern = (strcmp(simplePattern, pattern) != 0); @@ -991,6 +991,7 @@ InfoDefaultCmd( Tcl_SetObjResult(interp, Tcl_NewIntObj(1)); } else { Tcl_Obj *nullObjPtr = Tcl_NewObj(); + valueObjPtr = Tcl_ObjSetVar2(interp, objv[3], NULL, nullObjPtr, 0); if (valueObjPtr == NULL) { @@ -1172,6 +1173,7 @@ TclInfoFrame( CmdFrame *framePtr) /* Frame to get info for. */ { Interp *iPtr = (Interp *) interp; + Tcl_Obj *tmpObj; Tcl_Obj *lv[20]; /* Keep uptodate when more keys are added to * the dict. */ int lc = 0; @@ -1182,12 +1184,9 @@ TclInfoFrame( static const char *const typeString[TCL_LOCATION_LAST] = { "eval", "eval", "eval", "precompiled", "source", "proc" }; - Tcl_Obj *tmpObj; - - Proc *procPtr = - framePtr->framePtr ? framePtr->framePtr->procPtr : NULL; + Proc *procPtr = framePtr->framePtr ? framePtr->framePtr->procPtr : NULL; - /* + /* * Pull the information and construct the dictionary to return, as list. * Regarding use of the CmdFrame fields see tclInt.h, and its definition. */ @@ -1242,9 +1241,8 @@ TclInfoFrame( * Execution of bytecode. Talk to the BC engine to fill out the frame. */ - CmdFrame *fPtr; + CmdFrame *fPtr = TclStackAlloc(interp, sizeof(CmdFrame)); - fPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); *fPtr = *framePtr; /* @@ -1313,13 +1311,13 @@ TclInfoFrame( Tcl_HashEntry *namePtr = procPtr->cmdPtr->hPtr; if (namePtr) { + char *procName = Tcl_GetHashKey(namePtr->tablePtr, namePtr); + char *nsName = procPtr->cmdPtr->nsPtr->fullName; + /* * This is a regular command. */ - char *procName = Tcl_GetHashKey(namePtr->tablePtr, namePtr); - char *nsName = procPtr->cmdPtr->nsPtr->fullName; - ADD_PAIR("proc", Tcl_NewStringObj(nsName, -1)); if (strcmp(nsName, "::") != 0) { @@ -1762,9 +1760,8 @@ InfoProcsCmd( Namespace *dummy1NsPtr, *dummy2NsPtr; pattern = TclGetString(objv[1]); - TclGetNamespaceForQualName(interp, pattern, (Namespace *) NULL, - /*flags*/ 0, &nsPtr, &dummy1NsPtr, &dummy2NsPtr, - &simplePattern); + TclGetNamespaceForQualName(interp, pattern, NULL, /*flags*/ 0, &nsPtr, + &dummy1NsPtr, &dummy2NsPtr, &simplePattern); if (nsPtr != NULL) { /* We successfully found the pattern's ns. */ specificNsInPattern = (strcmp(simplePattern, pattern) != 0); @@ -2118,20 +2115,22 @@ Tcl_LassignObjCmd( objc -= 2; objv += 2; while (code == TCL_OK && objc > 0 && listObjc > 0) { - if (NULL == Tcl_ObjSetVar2(interp, *objv++, NULL, - *listObjv++, TCL_LEAVE_ERR_MSG)) { + if (Tcl_ObjSetVar2(interp, *objv++, NULL, *listObjv++, + TCL_LEAVE_ERR_MSG) == NULL) { code = TCL_ERROR; } - objc--; listObjc--; + objc--; + listObjc--; } if (code == TCL_OK && objc > 0) { Tcl_Obj *emptyObj; + TclNewObj(emptyObj); Tcl_IncrRefCount(emptyObj); while (code == TCL_OK && objc-- > 0) { - if (NULL == Tcl_ObjSetVar2(interp, *objv++, NULL, - emptyObj, TCL_LEAVE_ERR_MSG)) { + if (Tcl_ObjSetVar2(interp, *objv++, NULL, emptyObj, + TCL_LEAVE_ERR_MSG) == NULL) { code = TCL_ERROR; } } @@ -2419,7 +2418,7 @@ Tcl_LrangeObjCmd( return result; } if (last >= listLen) { - last = (listLen - 1); + last = listLen - 1; } if (first > last) { @@ -2450,7 +2449,7 @@ Tcl_LrangeObjCmd( } /* - * This one is not conditioned on (first>0) in order to preserve the + * This one is not conditioned on (first > 0) in order to preserve the * string-canonizing effect of [lrange 0 end]. */ @@ -2646,10 +2645,10 @@ Tcl_LreplaceObjCmd( return TCL_ERROR; } if (last >= listLen) { - last = (listLen - 1); + last = listLen - 1; } if (first <= last) { - numToDelete = (last - first + 1); + numToDelete = last - first + 1; } else { numToDelete = 0; } @@ -2672,7 +2671,7 @@ Tcl_LreplaceObjCmd( * optimize this case away. */ - Tcl_ListObjReplace(NULL, listPtr, first, numToDelete, objc-4, &(objv[4])); + Tcl_ListObjReplace(NULL, listPtr, first, numToDelete, objc-4, objv+4); /* * Set the interpreter's object result. @@ -2718,7 +2717,7 @@ Tcl_LreverseObjCmd( } /* - * If the list is empty, just return it [Bug 1876793] + * If the list is empty, just return it. [Bug 1876793] */ if (!elemc) { @@ -2732,7 +2731,7 @@ Tcl_LreverseObjCmd( makeNewReversedList: resultObj = Tcl_NewListObj(elemc, NULL); - listPtr = (List *) resultObj->internalRep.twoPtrValue.ptr1; + listPtr = resultObj->internalRep.twoPtrValue.ptr1; listPtr->elemCount = elemc; dataArray = &listPtr->elements; @@ -3494,8 +3493,7 @@ Tcl_LsetObjCmd( * Look up the list variable's value. */ - listPtr = Tcl_ObjGetVar2(interp, objv[1], (Tcl_Obj *) NULL, - TCL_LEAVE_ERR_MSG); + listPtr = Tcl_ObjGetVar2(interp, objv[1], NULL, TCL_LEAVE_ERR_MSG); if (listPtr == NULL) { return TCL_ERROR; } @@ -3569,6 +3567,12 @@ Tcl_LsortObjCmd( SortElement *elementArray, *elementPtr; SortInfo sortInfo; /* Information about this sort that needs to * be passed to the comparison function. */ +# define NUM_LISTS 30 + SortElement *subList[NUM_LISTS+1]; + /* This array holds pointers to temporary + * lists built during the merge sort. Element + * i of the array holds a list of length + * 2**i. */ static const char *const switches[] = { "-ascii", "-command", "-decreasing", "-dictionary", "-increasing", "-index", "-indices", "-integer", "-nocase", "-real", "-stride", @@ -3580,13 +3584,6 @@ Tcl_LsortObjCmd( LSORT_NOCASE, LSORT_REAL, LSORT_STRIDE, LSORT_UNIQUE }; - /* - * The subList array below holds pointers to temporary lists built during - * the merge sort. Element i of the array holds a list of length 2**i. - */ -# define NUM_LISTS 30 - SortElement *subList[NUM_LISTS+1]; - if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...? list"); return TCL_ERROR; @@ -3611,21 +3608,20 @@ Tcl_LsortObjCmd( for (i = 1; i < objc-1; i++) { if (Tcl_GetIndexFromObj(interp, objv[i], switches, "option", 0, &index) != TCL_OK) { - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } switch ((enum Lsort_Switches) index) { case LSORT_ASCII: sortInfo.sortMode = SORTMODE_ASCII; break; case LSORT_COMMAND: - if (i == (objc-2)) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } + if (i == objc-2) { Tcl_AppendResult(interp, "\"-command\" option must be followed " "by comparison command", NULL); - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } sortInfo.sortMode = SORTMODE_COMMAND; cmdPtr = objv[i+1]; @@ -3643,10 +3639,18 @@ Tcl_LsortObjCmd( case LSORT_INDEX: { Tcl_Obj **indices; + /* === START SPECIAL CASE === + * + * When reviewing code flow in this function, note that from here + * to the line a bit below (END SPECIAL CASE) the contents of the + * indexc and indexv fields of the sortInfo structure may not be + * matched, so jumping to the done2 label to exit is wrong. + */ + if (sortInfo.indexc > 1) { ckfree((char *) sortInfo.indexv); } - if (i == (objc-2)) { + if (i == objc-2) { Tcl_AppendResult(interp, "\"-index\" option must be " "followed by list index", NULL); return TCL_ERROR; @@ -3660,6 +3664,8 @@ Tcl_LsortObjCmd( &indices) != TCL_OK) { return TCL_ERROR; } + /* === END SPECIAL CASE === */ + switch (sortInfo.indexc) { case 0: sortInfo.indexv = NULL; @@ -3681,12 +3687,10 @@ Tcl_LsortObjCmd( for (j=0 ; j 1) { - ckfree((char *) sortInfo.indexv); - } Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (-index option item number %d)", j)); - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } } i++; @@ -3708,28 +3712,22 @@ Tcl_LsortObjCmd( indices = 1; break; case LSORT_STRIDE: - if (i == (objc-2)) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } + if (i == objc-2) { Tcl_AppendResult(interp, "\"-stride\" option must be followed by stride length", NULL); - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } if (Tcl_GetIntFromObj(interp, objv[i+1], &groupSize) != TCL_OK) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } if (groupSize < 2) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } Tcl_AppendResult(interp, "stride length must be at least 2", NULL); - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } group = 1; i++; @@ -3754,10 +3752,8 @@ Tcl_LsortObjCmd( listObj = TclListObjCopy(interp, listObj); if (listObj == NULL) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } /* @@ -3774,10 +3770,8 @@ Tcl_LsortObjCmd( TclDecrRefCount(listObj); Tcl_IncrRefCount(newObjPtr); TclDecrRefCount(newObjPtr); - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return TCL_ERROR; + sortInfo.resultCode = TCL_ERROR; + goto done2; } Tcl_ListObjAppendElement(interp, newCommandPtr, Tcl_NewObj()); sortInfo.compareCmdPtr = newCommandPtr; @@ -3997,6 +3991,7 @@ Tcl_LsortObjCmd( TclDecrRefCount(listObj); sortInfo.compareCmdPtr = NULL; } + done2: if (sortInfo.indexc > 1) { ckfree((char *) sortInfo.indexv); } @@ -4186,8 +4181,7 @@ SortCompare( infoPtr->resultCode = Tcl_EvalObjv(infoPtr->interp, objc, objv, 0); if (infoPtr->resultCode != TCL_OK) { - Tcl_AddErrorInfo(infoPtr->interp, - "\n (-compare command)"); + Tcl_AddErrorInfo(infoPtr->interp, "\n (-compare command)"); return 0; } @@ -4253,11 +4247,11 @@ DictionaryCompare( */ zeros = 0; - while ((*right == '0') && (isdigit(UCHAR(right[1])))) { + while ((*right == '0') && isdigit(UCHAR(right[1]))) { right++; zeros--; } - while ((*left == '0') && (isdigit(UCHAR(left[1])))) { + while ((*left == '0') && isdigit(UCHAR(left[1]))) { left++; zeros++; } -- cgit v0.12 From 24b687579eb31157729137b910df1f0b718d5d15 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 20 Aug 2009 10:55:51 +0000 Subject: Small tweaks --- generic/tclCmdMZ.c | 82 ++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index c5817bc..706b905 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.189 2009/08/19 14:25:37 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.190 2009/08/20 10:55:51 dkf Exp $ */ #include "tclInt.h" @@ -1817,8 +1817,7 @@ StringMapCmd( * adapt this code... */ - mapElemv = (Tcl_Obj **) - TclStackAlloc(interp, sizeof(Tcl_Obj *) * mapElemc); + mapElemv = TclStackAlloc(interp, sizeof(Tcl_Obj *) * mapElemc); Tcl_DictObjFirst(interp, objv[objc-2], &search, mapElemv+0, mapElemv+1, &done); for (i=2 ; i (INT_MAX / length1)) { + if (count > INT_MAX/length1) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "result exceeds max size for a Tcl value (%d bytes)", INT_MAX)); + "result exceeds max size for a Tcl value (%d bytes)", + INT_MAX)); return TCL_ERROR; } length2 = length1 * count; @@ -3538,11 +3536,10 @@ TclNRSwitchObjCmd( TclGetString(objv[i]), "\": ", options[mode], " option already found", NULL); return TCL_ERROR; - } else { - foundmode = 1; - mode = index; - break; } + foundmode = 1; + mode = index; + break; /* * Check for TIP#75 options specifying the variables to write @@ -3606,8 +3603,8 @@ TclNRSwitchObjCmd( splitObjs = 0; if (objc == 1) { Tcl_Obj **listv; - blist = objv[0]; + blist = objv[0]; if (TclListObjGetElements(interp, objv[0], &objc, &listv) != TCL_OK){ return TCL_ERROR; } @@ -3704,36 +3701,35 @@ TclNRSwitchObjCmd( } } goto matchFound; - } else { - switch (mode) { - case OPT_EXACT: - if (strCmpFn(TclGetString(stringObj), pattern) == 0) { - goto matchFound; - } - break; - case OPT_GLOB: - if (Tcl_StringCaseMatch(TclGetString(stringObj), pattern, - noCase)) { - goto matchFound; - } - break; - case OPT_REGEXP: - regExpr = Tcl_GetRegExpFromObj(interp, objv[i], - TCL_REG_ADVANCED | (noCase ? TCL_REG_NOCASE : 0)); - if (regExpr == NULL) { - return TCL_ERROR; - } else { - int matched = Tcl_RegExpExecObj(interp, regExpr, - stringObj, 0, numMatchesSaved, 0); + } - if (matched < 0) { - return TCL_ERROR; - } else if (matched) { - goto matchFoundRegexp; - } + switch (mode) { + case OPT_EXACT: + if (strCmpFn(TclGetString(stringObj), pattern) == 0) { + goto matchFound; + } + break; + case OPT_GLOB: + if (Tcl_StringCaseMatch(TclGetString(stringObj),pattern,noCase)) { + goto matchFound; + } + break; + case OPT_REGEXP: + regExpr = Tcl_GetRegExpFromObj(interp, objv[i], + TCL_REG_ADVANCED | (noCase ? TCL_REG_NOCASE : 0)); + if (regExpr == NULL) { + return TCL_ERROR; + } else { + int matched = Tcl_RegExpExecObj(interp, regExpr, stringObj, 0, + numMatchesSaved, 0); + + if (matched < 0) { + return TCL_ERROR; + } else if (matched) { + goto matchFoundRegexp; } - break; } + break; } } return TCL_OK; @@ -3825,7 +3821,7 @@ TclNRSwitchObjCmd( */ matchFound: - ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); + ctxPtr = TclStackAlloc(interp, sizeof(CmdFrame)); *ctxPtr = *iPtr->cmdFramePtr; if (splitObjs) { -- cgit v0.12 From e8e7278e6387c71d1e820193ac6e58b0be5caf89 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 20 Aug 2009 10:56:55 +0000 Subject: Use the Tcl value stack more, simplify exit paths in [lsearch] --- generic/tclCmdIL.c | 115 +++++++++++++++++++---------------------------------- 1 file changed, 40 insertions(+), 75 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index e10a899..03f5593 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.170 2009/08/20 08:31:16 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.171 2009/08/20 10:56:55 dkf Exp $ */ #include "tclInt.h" @@ -2855,10 +2855,8 @@ Tcl_LsearchObjCmd( if (startPtr != NULL) { Tcl_DecrRefCount(startPtr); } - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return TCL_ERROR; + result = TCL_ERROR; + goto done; } switch ((enum options) index) { case LSEARCH_ALL: /* -all */ @@ -2923,11 +2921,9 @@ Tcl_LsearchObjCmd( Tcl_DecrRefCount(startPtr); } if (i > objc-4) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } Tcl_AppendResult(interp, "missing starting index", NULL); - return TCL_ERROR; + result = TCL_ERROR; + goto done; } i++; if (objv[i] == objv[objc - 2]) { @@ -2949,7 +2945,7 @@ Tcl_LsearchObjCmd( int j; if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); + TclStackFree(interp, sortInfo.indexv); } if (i > objc-4) { if (startPtr != NULL) { @@ -2983,8 +2979,8 @@ Tcl_LsearchObjCmd( sortInfo.indexv = &sortInfo.singleIndex; break; default: - sortInfo.indexv = (int *) - ckalloc(sizeof(int) * sortInfo.indexc); + sortInfo.indexv = + TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); } /* @@ -2996,12 +2992,10 @@ Tcl_LsearchObjCmd( for (j=0 ; j 1) { - ckfree((char *) sortInfo.indexv); - } Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (-index option item number %d)", j)); - return TCL_ERROR; + result = TCL_ERROR; + goto done; } } break; @@ -3054,10 +3048,8 @@ Tcl_LsearchObjCmd( if (startPtr != NULL) { Tcl_DecrRefCount(startPtr); } - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return TCL_ERROR; + result = TCL_ERROR; + goto done; } } @@ -3071,10 +3063,7 @@ Tcl_LsearchObjCmd( if (startPtr != NULL) { Tcl_DecrRefCount(startPtr); } - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } /* @@ -3085,10 +3074,7 @@ Tcl_LsearchObjCmd( result = TclGetIntForIndexM(interp, startPtr, listc-1, &offset); Tcl_DecrRefCount(startPtr); if (result != TCL_OK) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } if (offset < 0) { offset = 0; @@ -3101,7 +3087,7 @@ Tcl_LsearchObjCmd( if (offset > listc-1) { if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); + TclStackFree(interp, sortInfo.indexv); } if (allMatches || inlineReturn) { Tcl_ResetResult(interp); @@ -3123,10 +3109,7 @@ Tcl_LsearchObjCmd( case INTEGER: result = TclGetIntFromObj(interp, patObj, &patInt); if (result != TCL_OK) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } /* @@ -3139,10 +3122,7 @@ Tcl_LsearchObjCmd( case REAL: result = Tcl_GetDoubleFromObj(interp, patObj, &patDouble); if (result != TCL_OK) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } /* @@ -3180,10 +3160,8 @@ Tcl_LsearchObjCmd( if (sortInfo.indexc != 0) { itemPtr = SelectObjFromSublist(listv[i], &sortInfo); if (sortInfo.resultCode != TCL_OK) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return sortInfo.resultCode; + result = sortInfo.resultCode; + goto done; } } else { itemPtr = listv[i]; @@ -3200,10 +3178,7 @@ Tcl_LsearchObjCmd( case INTEGER: result = TclGetIntFromObj(interp, itemPtr, &objInt); if (result != TCL_OK) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } if (patInt == objInt) { match = 0; @@ -3216,10 +3191,7 @@ Tcl_LsearchObjCmd( case REAL: result = Tcl_GetDoubleFromObj(interp, itemPtr, &objDouble); if (result != TCL_OK) { - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } if (patDouble == objDouble) { match = 0; @@ -3289,10 +3261,8 @@ Tcl_LsearchObjCmd( if (listPtr != NULL) { Tcl_DecrRefCount(listPtr); } - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return sortInfo.resultCode; + result = sortInfo.resultCode; + goto done; } } else { itemPtr = listv[i]; @@ -3330,10 +3300,7 @@ Tcl_LsearchObjCmd( if (listPtr != NULL) { Tcl_DecrRefCount(listPtr); } - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } match = (objInt == patInt); break; @@ -3344,10 +3311,7 @@ Tcl_LsearchObjCmd( if (listPtr) { Tcl_DecrRefCount(listPtr); } - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return result; + goto done; } match = (objDouble == patDouble); break; @@ -3366,10 +3330,8 @@ Tcl_LsearchObjCmd( if (listPtr != NULL) { Tcl_DecrRefCount(listPtr); } - if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); - } - return TCL_ERROR; + result = TCL_ERROR; + goto done; } break; } @@ -3442,15 +3404,17 @@ Tcl_LsearchObjCmd( } else { Tcl_SetObjResult(interp, listv[index]); } + result = TCL_OK; /* * Cleanup the index list array. */ + done: if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); + TclStackFree(interp, sortInfo.indexv); } - return TCL_OK; + return result; } /* @@ -3648,7 +3612,7 @@ Tcl_LsortObjCmd( */ if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); + TclStackFree(interp, sortInfo.indexv); } if (i == objc-2) { Tcl_AppendResult(interp, "\"-index\" option must be " @@ -3674,8 +3638,8 @@ Tcl_LsortObjCmd( sortInfo.indexv = &sortInfo.singleIndex; break; default: - sortInfo.indexv = (int *) - ckalloc(sizeof(int) * sortInfo.indexc); + sortInfo.indexv = + TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); } /* @@ -3821,11 +3785,12 @@ Tcl_LsortObjCmd( int *new_indexv; sortInfo.indexc--; - new_indexv = (int *) ckalloc(sizeof(int) * sortInfo.indexc); + new_indexv = + TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); for (i = 0; i < sortInfo.indexc; i++) { new_indexv[i] = sortInfo.indexv[i+1]; } - ckfree((char *) sortInfo.indexv); + TclStackFree(interp, sortInfo.indexv); sortInfo.indexv = new_indexv; } } @@ -3859,7 +3824,7 @@ Tcl_LsortObjCmd( * begins sorting it into the sublists as it appears. */ - elementArray = (SortElement *) ckalloc(length * sizeof(SortElement)); + elementArray = TclStackAlloc(interp, length * sizeof(SortElement)); for (i=0; i < length; i++){ idx = groupSize * i + groupOffset; @@ -3983,7 +3948,7 @@ Tcl_LsortObjCmd( } done1: - ckfree((char *) elementArray); + TclStackFree(interp, elementArray); done: if (sortInfo.sortMode == SORTMODE_COMMAND) { @@ -3993,7 +3958,7 @@ Tcl_LsortObjCmd( } done2: if (sortInfo.indexc > 1) { - ckfree((char *) sortInfo.indexv); + TclStackFree(interp, sortInfo.indexv); } return sortInfo.resultCode; } -- cgit v0.12 From 98d5d18c168e0eb4ac463f011898476550f81592 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 20 Aug 2009 15:17:39 +0000 Subject: * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of strings starting with ~ in the "tail" part (normPathPtr field) of the path intrep when PATHFLAGS != 0. This establishes the assumptions relied on elsewhere that the name stored there is a relative path. Also refactored to make an AppendPath() routine instead of the cut/paste stanzas that were littered throughout. --- ChangeLog | 9 ++ generic/tclPathObj.c | 229 ++++++++++++++++++--------------------------------- 2 files changed, 89 insertions(+), 149 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6285475..451fc32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-08-20 Don Porter + + * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of strings + starting with ~ in the "tail" part (normPathPtr field) of the path + intrep when PATHFLAGS != 0. This establishes the assumptions relied + on elsewhere that the name stored there is a relative path. Also + refactored to make an AppendPath() routine instead of the cut/paste + stanzas that were littered throughout. + 2009-08-20 Donal K. Fellows * generic/tclCmdIL.c (TclNRIfObjCmd): [Bug 2823276]: Make [if] diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 6c368e5..3b907a4 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.81 2009/08/18 14:44:21 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.82 2009/08/20 15:17:39 dgp Exp $ */ #include "tclInt.h" @@ -20,6 +20,7 @@ * Prototypes for functions defined later in this file. */ +static Tcl_Obj * AppendPath(Tcl_Obj *head, Tcl_Obj *tail); static void DupFsPathInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static void FreeFsPathInternalRep(Tcl_Obj *pathPtr); @@ -1287,6 +1288,30 @@ TclNewFSPathObj( const char *p; int state = 0, count = 0; + /* [Bug 2806250] - this is only a partial solution of the problem. + * The PATHFLAGS != 0 representation assumes in many places that + * the "tail" part stored in the normPathPtr field is itself a + * relative path. Strings that begin with "~" are not relative paths, + * so we must prevent their storage in the normPathPtr field. + * + * More generally we ought to be testing "addStrRep" for any value + * that is not a relative path, but in an unconstrained VFS world + * that could be just about anything, and testing could be expensive. + * Since this routine plays a big role in [glob], anything that slows + * it down would be unwelcome. For now, continue the risk of further + * bugs when some Tcl_Filesystem uses otherwise relative path strings + * as absolute path strings. Sensible Tcl_Filesystems will avoid + * that by mounting on path prefixes like foo:// which cannot be the + * name of a file or directory read from a native [glob] operation. + */ + if (addStrRep[0] == '~') { + Tcl_Obj *tail = Tcl_NewStringObj(addStrRep, len); + + pathPtr = AppendPath(dirPtr, tail); + Tcl_DecrRefCount(tail); + return pathPtr; + } + tsdPtr = TCL_TSD_INIT(&tclFsDataKey); pathPtr = Tcl_NewObj(); @@ -1352,6 +1377,49 @@ TclNewFSPathObj( return pathPtr; } + +static Tcl_Obj * +AppendPath( + Tcl_Obj *head, + Tcl_Obj *tail) +{ + int numBytes; + const char *bytes; + Tcl_Obj *copy = Tcl_DuplicateObj(head); + + bytes = Tcl_GetStringFromObj(copy, &numBytes); + + /* + * Should we perhaps use 'Tcl_FSPathSeparator'? But then what about the + * Windows special case? Perhaps we should just check if cwd is a root + * volume. We should never get numBytes == 0 in this code path. + */ + + switch (tclPlatform) { + case TCL_PLATFORM_UNIX: + if (bytes[numBytes-1] != '/') { + Tcl_AppendToObj(copy, "/", 1); + } + break; + + case TCL_PLATFORM_WINDOWS: + /* + * We need the extra 'numBytes != 2', and ':' checks because a volume + * relative path doesn't get a '/'. For example 'glob C:*cat*.exe' + * will return 'C:cat32.exe' + */ + + if (bytes[numBytes-1] != '/' && bytes[numBytes-1] != '\\') { + if (numBytes!= 2 || bytes[1] != ':') { + Tcl_AppendToObj(copy, "/", 1); + } + } + break; + } + + Tcl_AppendObjToObj(copy, tail); + return copy; +} /* *--------------------------------------------------------------------------- @@ -1365,11 +1433,6 @@ TclNewFSPathObj( * directory. Returns a Tcl_Obj representing filename of the path * relative to the directory. * - * In the case where the resulting path would start with a '~', we take - * special care to return an ordinary string. This means to use that path - * (and not have it interpreted as a user name), one must prepend './'. - * This may seem strange, but that is how 'glob' is currently defined. - * * Results: * NULL on error, otherwise a valid object, typically with refCount of * zero, which it is assumed the caller will increment. @@ -1388,67 +1451,13 @@ TclFSMakePathRelative( { int cwdLen, len; const char *tempStr; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey); if (pathPtr->typePtr == &tclFsPathType) { FsPath *fsPathPtr = PATHOBJ(pathPtr); if (PATHFLAGS(pathPtr) != 0 && fsPathPtr->cwdPtr == cwdPtr) { - pathPtr = fsPathPtr->normPathPtr; - - /* - * Free old representation. - */ - - if (pathPtr->typePtr != NULL) { - if (pathPtr->bytes == NULL) { - if (pathPtr->typePtr->updateStringProc == NULL) { - if (interp != NULL) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "can't find object" - "string representation", NULL); - } - return NULL; - } - pathPtr->typePtr->updateStringProc(pathPtr); - } - TclFreeIntRep(pathPtr); - } - - /* - * Now pathPtr is a string object. - */ - - if (Tcl_GetString(pathPtr)[0] == '~') { - /* - * If the first character of the path is a tilde, we must just - * return the path as is, to agree with the defined behaviour - * of 'glob'. - */ - - return pathPtr; - } - - fsPathPtr = (FsPath *) ckalloc(sizeof(FsPath)); - - /* - * Circular reference, by design. - */ - - fsPathPtr->translatedPathPtr = pathPtr; - fsPathPtr->normPathPtr = NULL; - fsPathPtr->cwdPtr = cwdPtr; - Tcl_IncrRefCount(cwdPtr); - fsPathPtr->nativePathPtr = NULL; - fsPathPtr->fsRecPtr = NULL; - fsPathPtr->filesystemEpoch = tsdPtr->filesystemEpoch; - - SETPATHOBJ(pathPtr, fsPathPtr); - PATHFLAGS(pathPtr) = 0; - pathPtr->typePtr = &tclFsPathType; - - return pathPtr; + return fsPathPtr->normPathPtr; } } @@ -1794,7 +1803,6 @@ Tcl_FSGetNormalizedPath( Tcl_Obj *dir, *copy; int cwdLen, pathType; - const char *cwdStr; ClientData clientData = NULL; pathType = Tcl_FSGetPathType(fsPathPtr->cwdPtr); @@ -1802,40 +1810,21 @@ Tcl_FSGetNormalizedPath( if (dir == NULL) { return NULL; } + /* TODO: Figure out why this is needed. */ if (pathPtr->bytes == NULL) { UpdateStringOfFsPath(pathPtr); } - copy = Tcl_DuplicateObj(dir); - Tcl_IncrRefCount(copy); + + copy = AppendPath(dir, fsPathPtr->normPathPtr); Tcl_IncrRefCount(dir); + Tcl_IncrRefCount(copy); /* * We now own a reference on both 'dir' and 'copy' */ - cwdStr = Tcl_GetStringFromObj(copy, &cwdLen); - - /* - * Should we perhaps use 'Tcl_FSPathSeparator'? But then what about - * the Windows special case? Perhaps we should just check if cwd is a - * root volume. We should never get cwdLen == 0 in this code path. - */ - - switch (tclPlatform) { - case TCL_PLATFORM_UNIX: - if (cwdStr[cwdLen-1] != '/') { - Tcl_AppendToObj(copy, "/", 1); - cwdLen++; - } - break; - case TCL_PLATFORM_WINDOWS: - if (cwdStr[cwdLen-1] != '/' && cwdStr[cwdLen-1] != '\\') { - Tcl_AppendToObj(copy, "/", 1); - cwdLen++; - } - break; - } - Tcl_AppendObjToObj(copy, fsPathPtr->normPathPtr); + (void) Tcl_GetStringFromObj(dir, &cwdLen); + cwdLen += (Tcl_GetString(copy)[cwdLen] == '/'); /* Normalize the combined string. */ @@ -1936,35 +1925,12 @@ Tcl_FSGetNormalizedPath( } else if (fsPathPtr->normPathPtr == NULL) { int cwdLen; Tcl_Obj *copy; - const char *cwdStr; ClientData clientData = NULL; - copy = Tcl_DuplicateObj(fsPathPtr->cwdPtr); - Tcl_IncrRefCount(copy); - cwdStr = Tcl_GetStringFromObj(copy, &cwdLen); + copy = AppendPath(fsPathPtr->cwdPtr, pathPtr); - /* - * Should we perhaps use 'Tcl_FSPathSeparator'? But then what - * about the Windows special case? Perhaps we should just check if - * cwd is a root volume. We should never get cwdLen == 0 in this - * code path. - */ - - switch (tclPlatform) { - case TCL_PLATFORM_UNIX: - if (cwdStr[cwdLen-1] != '/') { - Tcl_AppendToObj(copy, "/", 1); - cwdLen++; - } - break; - case TCL_PLATFORM_WINDOWS: - if (cwdStr[cwdLen-1] != '/' && cwdStr[cwdLen-1] != '\\') { - Tcl_AppendToObj(copy, "/", 1); - cwdLen++; - } - break; - } - Tcl_AppendObjToObj(copy, pathPtr); + (void) Tcl_GetStringFromObj(fsPathPtr->cwdPtr, &cwdLen); + cwdLen += (Tcl_GetString(copy)[cwdLen] == '/'); /* * Normalize the combined string, but only starting after the end @@ -2718,7 +2684,6 @@ UpdateStringOfFsPath( register Tcl_Obj *pathPtr) /* path obj with string rep to update. */ { FsPath *fsPathPtr = PATHOBJ(pathPtr); - const char *cwdStr; int cwdLen; Tcl_Obj *copy; @@ -2726,42 +2691,8 @@ UpdateStringOfFsPath( Tcl_Panic("Called UpdateStringOfFsPath with invalid object"); } - copy = Tcl_DuplicateObj(fsPathPtr->cwdPtr); - Tcl_IncrRefCount(copy); - - cwdStr = Tcl_GetStringFromObj(copy, &cwdLen); - - /* - * Should we perhaps use 'Tcl_FSPathSeparator'? But then what about the - * Windows special case? Perhaps we should just check if cwd is a root - * volume. We should never get cwdLen == 0 in this code path. - */ - - switch (tclPlatform) { - case TCL_PLATFORM_UNIX: - if (cwdStr[cwdLen-1] != '/') { - Tcl_AppendToObj(copy, "/", 1); - cwdLen++; - } - break; - - case TCL_PLATFORM_WINDOWS: - /* - * We need the extra 'cwdLen != 2', and ':' checks because a volume - * relative path doesn't get a '/'. For example 'glob C:*cat*.exe' - * will return 'C:cat32.exe' - */ - - if (cwdStr[cwdLen-1] != '/' && cwdStr[cwdLen-1] != '\\') { - if (cwdLen != 2 || cwdStr[1] != ':') { - Tcl_AppendToObj(copy, "/", 1); - cwdLen++; - } - } - break; - } + copy = AppendPath(fsPathPtr->cwdPtr, fsPathPtr->normPathPtr); - Tcl_AppendObjToObj(copy, fsPathPtr->normPathPtr); pathPtr->bytes = Tcl_GetStringFromObj(copy, &cwdLen); pathPtr->length = cwdLen; copy->bytes = tclEmptyStringRep; -- cgit v0.12 From e645a06ed98f083f07698164c56a986e56094fb3 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 20 Aug 2009 22:09:45 +0000 Subject: * generic/tclFileName.c: Correct result from [glob */test] when * matches something like ~foo. [Bug 2837800] --- ChangeLog | 3 +++ generic/tclFileName.c | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 451fc32..0aaed72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-08-20 Don Porter + * generic/tclFileName.c: Correct result from [glob */test] when * + matches something like ~foo. [Bug 2837800] + * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of strings starting with ~ in the "tail" part (normPathPtr field) of the path intrep when PATHFLAGS != 0. This establishes the assumptions relied diff --git a/generic/tclFileName.c b/generic/tclFileName.c index c621aff..ad71008 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.96 2009/01/22 06:42:33 nijtmans Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.97 2009/08/20 22:09:45 dgp Exp $ */ #include "tclInt.h" @@ -2361,14 +2361,42 @@ DoGlob( pattern, &dirOnly); *p = save; if (result == TCL_OK) { - int subdirc, i; + int subdirc, i, repair = -1; Tcl_Obj **subdirv; result = Tcl_ListObjGetElements(interp, subdirsPtr, &subdirc, &subdirv); for (i=0; result==TCL_OK && i Date: Fri, 21 Aug 2009 18:32:08 +0000 Subject: regression tests --- tests/fileName.test | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/fileName.test b/tests/fileName.test index 88495f2..a35cf86 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.63 2009/08/19 17:30:07 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.64 2009/08/21 18:32:08 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1562,6 +1562,34 @@ test fileName-20.8 {Bug 2806250} -setup { removeDirectory isolate } -result ./~test +test fileName-20.9 {} -setup { + makeFile {} test ~ + set d [makeDirectory isolate] + set savewd [pwd] + cd $d +} -body { + glob -nocomplain -directory ~ test +} -cleanup { + cd $savewd + removeDirectory isolate + removeFile test ~ +} -result ~/test + +test fileName-20.10 {} -setup { + set s [makeDirectory sub ~] + makeFile {} fileName-20.10 $s + set d [makeDirectory isolate] + set savewd [pwd] + cd $d +} -body { + glob -nocomplain -directory ~ -join * fileName-20.10 +} -cleanup { + cd $savewd + removeDirectory isolate + removeFile fileName-20.10 $s + removeDirectory sub ~ +} -result ~/sub/fileName-20.10 + # cleanup catch {file delete -force C:/globTest} cd [temporaryDirectory] -- cgit v0.12 From b7d5c914b5af4512f6eabc9ae4e9b3c49003a59f Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 21 Aug 2009 19:06:05 +0000 Subject: * generic/tclFileName.c: Correct regression in [Bug 2837800] fix. * tests/fileName.test: --- ChangeLog | 5 +++++ generic/tclFileName.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0aaed72..db4e7b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-21 Don Porter + + * generic/tclFileName.c: Correct regression in [Bug 2837800] fix. + * tests/fileName.test: + 2009-08-20 Don Porter * generic/tclFileName.c: Correct result from [glob */test] when * diff --git a/generic/tclFileName.c b/generic/tclFileName.c index ad71008..1070c42 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.97 2009/08/20 22:09:45 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.98 2009/08/21 19:06:06 dgp Exp $ */ #include "tclInt.h" @@ -2369,7 +2369,7 @@ DoGlob( for (i=0; result==TCL_OK && i Date: Sat, 22 Aug 2009 11:29:22 +0000 Subject: Typo found by Andreas Kupries --- doc/class.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/class.n b/doc/class.n index ec06706..d62b4a5 100644 --- a/doc/class.n +++ b/doc/class.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: class.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: class.n,v 1.3 2009/08/22 11:29:22 dkf Exp $ '\" .so man.macros .TH class n 0.1 TclOO "TclOO Commands" @@ -69,7 +69,7 @@ method. .PP The \fBoo::class\fR class supports the following non-exported methods: .TP -\fIobj \fBcreateWithNamespace\fI name nsName\fR ?\fIarg ...\fR? +\fIcls \fBcreateWithNamespace\fI name nsName\fR ?\fIarg ...\fR? . This creates a new instance of the class \fIcls\fR called \fIname\fR (which is resolved within the calling context's namespace if not fully qualified), -- cgit v0.12 From 2e2467e1e0a386b1bd53818a449cccc41f27dc87 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 24 Aug 2009 00:27:47 +0000 Subject: * macosx/tclMacOSXNotify.c: fix multiple issues with nested event loops when CoreFoundation notifier is running in embedded mode. (fixes problems in TkAqua Cocoa reported by Youness Alaoui on tcl-mac) --- ChangeLog | 6 ++++ macosx/tclMacOSXNotify.c | 77 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 57 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index db4e7b6..efa8543 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-24 Daniel Steffen + + * macosx/tclMacOSXNotify.c: fix multiple issues with nested event loops + when CoreFoundation notifier is running in embedded mode. (fixes + problems in TkAqua Cocoa reported by Youness Alaoui on tcl-mac) + 2009-08-21 Don Porter * generic/tclFileName.c: Correct regression in [Bug 2837800] fix. diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index ee4335a..2fae4b6 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.27 2009/07/22 12:00:42 nijtmans Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.28 2009/08/24 00:27:47 das Exp $ */ #include "tclInt.h" @@ -243,6 +243,8 @@ typedef struct ThreadSpecificData { * performed. */ int runLoopRunning; /* True if this thread's Tcl runLoop is running */ int runLoopNestingLevel; /* Level of nested runLoop invocations */ + int runLoopServicingEvents; /* True if this thread's runLoop is servicing + * tcl events */ /* Must hold the notifierLock before accessing the following fields: */ /* Start notifierLock section */ int onList; /* True if this thread is on the waitingList */ @@ -274,7 +276,7 @@ typedef struct ThreadSpecificData { /* Any other thread alerts a notifier that an * event is ready to be processed by signaling * this CFRunLoopSource. */ - CFRunLoopObserverRef runLoopObserver; + CFRunLoopObserverRef runLoopObserver, runLoopObserverTcl; /* Adds/removes this thread from waitingList * when the CFRunLoop starts/stops. */ CFRunLoopTimerRef runLoopTimer; @@ -454,7 +456,7 @@ Tcl_InitNotifier(void) CFRunLoopSourceRef runLoopSource; CFRunLoopSourceContext runLoopSourceContext; CFRunLoopObserverContext runLoopObserverContext; - CFRunLoopObserverRef runLoopObserver; + CFRunLoopObserverRef runLoopObserver, runLoopObserverTcl; bzero(&runLoopSourceContext, sizeof(CFRunLoopSourceContext)); runLoopSourceContext.info = tsdPtr; @@ -478,12 +480,30 @@ Tcl_InitNotifier(void) "CFRunLoopObserver"); } CFRunLoopAddObserver(runLoop, runLoopObserver, kCFRunLoopCommonModes); - CFRunLoopAddObserver(runLoop, runLoopObserver, + + /* + * Create a second CFRunLoopObserver with the same callback as above + * for the tclEventsOnlyRunLoopMode to ensure that the callback can be + * re-entered via Tcl_ServiceAll() in the kCFRunLoopBeforeWaiting case + * (CFRunLoop prevents observer callback re-entry of a given observer + * instance). + */ + + runLoopObserverTcl = CFRunLoopObserverCreate(NULL, + kCFRunLoopEntry|kCFRunLoopExit|kCFRunLoopBeforeWaiting, TRUE, + LONG_MIN, UpdateWaitingListAndServiceEvents, + &runLoopObserverContext); + if (!runLoopObserverTcl) { + Tcl_Panic("Tcl_InitNotifier: could not create " + "CFRunLoopObserver"); + } + CFRunLoopAddObserver(runLoop, runLoopObserverTcl, tclEventsOnlyRunLoopMode); tsdPtr->runLoop = runLoop; tsdPtr->runLoopSource = runLoopSource; tsdPtr->runLoopObserver = runLoopObserver; + tsdPtr->runLoopObserverTcl = runLoopObserverTcl; tsdPtr->runLoopTimer = NULL; tsdPtr->waitTime = CF_TIMEINTERVAL_FOREVER; tsdPtr->tsdLock = SPINLOCK_INIT; @@ -716,6 +736,9 @@ Tcl_FinalizeNotifier( CFRunLoopObserverInvalidate(tsdPtr->runLoopObserver); CFRelease(tsdPtr->runLoopObserver); tsdPtr->runLoopObserver = NULL; + CFRunLoopObserverInvalidate(tsdPtr->runLoopObserverTcl); + CFRelease(tsdPtr->runLoopObserverTcl); + tsdPtr->runLoopObserverTcl = NULL; if (tsdPtr->runLoopTimer) { CFRunLoopTimerInvalidate(tsdPtr->runLoopTimer); CFRelease(tsdPtr->runLoopTimer); @@ -1164,9 +1187,8 @@ int Tcl_WaitForEvent( const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { - int result, polling; + int result, polling, runLoopRunning; CFTimeInterval waitTime; - CFStringRef runLoopMode; SInt32 runLoopStatus; ThreadSpecificData *tsdPtr; @@ -1214,22 +1236,20 @@ Tcl_WaitForEvent( tsdPtr->runLoopSourcePerformed = 0; /* - * If the Tcl run loop is already running (e.g. if Tcl_WaitForEvent was - * called recursively), re-run it in a custom run loop mode containing only - * the source for the notifier thread, otherwise wakeups from other sources - * added to the common run loop modes might get lost. + * If the Tcl runloop is already running (e.g. if Tcl_WaitForEvent was + * called recursively) or is servicing events via the runloop observer, + * re-run it in a custom runloop mode containing only the source for the + * notifier thread, otherwise wakeups from other sources added to the + * common runloop modes might get lost or 3rd party event handlers might + * get called when they do not expect to be. */ - if (tsdPtr->runLoopRunning) { - runLoopMode = tclEventsOnlyRunLoopMode; - } else { - runLoopMode = kCFRunLoopDefaultMode; - tsdPtr->runLoopRunning = 1; - } - runLoopStatus = CFRunLoopRunInMode(runLoopMode, waitTime, TRUE); - if (runLoopMode == kCFRunLoopDefaultMode) { - tsdPtr->runLoopRunning = 0; - } + runLoopRunning = tsdPtr->runLoopRunning; + tsdPtr->runLoopRunning = 1; + runLoopStatus = CFRunLoopRunInMode(tsdPtr->runLoopServicingEvents || + runLoopRunning ? tclEventsOnlyRunLoopMode : kCFRunLoopDefaultMode, + waitTime, TRUE); + tsdPtr->runLoopRunning = runLoopRunning; LOCK_NOTIFIER_TSD; tsdPtr->polling = 0; @@ -1347,19 +1367,22 @@ UpdateWaitingListAndServiceEvents( { ThreadSpecificData *tsdPtr = (ThreadSpecificData*) info; + if (tsdPtr->sleeping) { + return; + } switch (activity) { case kCFRunLoopEntry: tsdPtr->runLoopNestingLevel++; - if (tsdPtr->runLoopNestingLevel == 1 && !tsdPtr->sleeping && - (tsdPtr->numFdBits > 0 || tsdPtr->polling)) { + if (tsdPtr->numFdBits > 0 || tsdPtr->polling) { LOCK_NOTIFIER; - OnOffWaitingList(tsdPtr, 1, 1); + if (!OnOffWaitingList(tsdPtr, 1, 1) && tsdPtr->polling) { + write(triggerPipe, "", 1); + } UNLOCK_NOTIFIER; } break; case kCFRunLoopExit: - if (tsdPtr->runLoopNestingLevel == 1 && !tsdPtr->sleeping && - (tsdPtr->numFdBits > 0 || tsdPtr->polling)) { + if (tsdPtr->runLoopNestingLevel == 1) { LOCK_NOTIFIER; OnOffWaitingList(tsdPtr, 0, 1); UNLOCK_NOTIFIER; @@ -1367,9 +1390,11 @@ UpdateWaitingListAndServiceEvents( tsdPtr->runLoopNestingLevel--; break; case kCFRunLoopBeforeWaiting: - if (!tsdPtr->sleeping && tsdPtr->runLoopTimer && + if (tsdPtr->runLoopTimer && !tsdPtr->runLoopServicingEvents && (tsdPtr->runLoopNestingLevel > 1 || !tsdPtr->runLoopRunning)) { + tsdPtr->runLoopServicingEvents = 1; while (Tcl_ServiceAll() && tsdPtr->waitTime == 0) {} + tsdPtr->runLoopServicingEvents = 0; } break; default: -- cgit v0.12 From fd792e63142bfc709a0136d403c98daf781ebe48 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 24 Aug 2009 03:18:23 +0000 Subject: * generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang static analyzer in PURIFY builds, replacing preprocessor/assert technique. --- ChangeLog | 3 +++ generic/tclInt.h | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index efa8543..f38f2a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-08-24 Daniel Steffen + * generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang static + analyzer in PURIFY builds, replacing preprocessor/assert technique. + * macosx/tclMacOSXNotify.c: fix multiple issues with nested event loops when CoreFoundation notifier is running in embedded mode. (fixes problems in TkAqua Cocoa reported by Youness Alaoui on tcl-mac) diff --git a/generic/tclInt.h b/generic/tclInt.h index 93dbf01..3501083 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.435 2009/08/19 14:26:18 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.436 2009/08/24 03:18:23 das Exp $ */ #ifndef _TCLINT @@ -4249,9 +4249,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT) #include #define CLANG_ASSERT(x) assert(x) -#define TclPanic Tcl_Panic -#undef Tcl_Panic -#define Tcl_Panic(f, ...) do { TclPanic(f,##__VA_ARGS__); CLANG_ASSERT(0); } while(0) +EXTERN void Tcl_Panic(const char * format, ...) __attribute__((analyzer_noreturn)); #elif !defined(CLANG_ASSERT) #define CLANG_ASSERT(x) #endif -- cgit v0.12 From 875ca13780241d27fe74f005232bd5201ed4433b Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 24 Aug 2009 09:32:57 +0000 Subject: Better formatting --- ChangeLog | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f38f2a3..df090b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,8 +3,8 @@ * generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang static analyzer in PURIFY builds, replacing preprocessor/assert technique. - * macosx/tclMacOSXNotify.c: fix multiple issues with nested event loops - when CoreFoundation notifier is running in embedded mode. (fixes + * macosx/tclMacOSXNotify.c: Fix multiple issues with nested event loops + when CoreFoundation notifier is running in embedded mode. (Fixes problems in TkAqua Cocoa reported by Youness Alaoui on tcl-mac) 2009-08-21 Don Porter @@ -14,10 +14,10 @@ 2009-08-20 Don Porter - * generic/tclFileName.c: Correct result from [glob */test] when * - matches something like ~foo. [Bug 2837800] + * generic/tclFileName.c: [Bug 2837800]: Correct the result produced by + [glob */test] when * matches something like ~foo. - * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of strings + * generic/tclPathObj.c: [Bug 2806250]: Prevent the storage of strings starting with ~ in the "tail" part (normPathPtr field) of the path intrep when PATHFLAGS != 0. This establishes the assumptions relied on elsewhere that the name stored there is a relative path. Also -- cgit v0.12 From 130082d57a8eecf64d27adcb53065841cffae765 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 25 Aug 2009 21:03:25 +0000 Subject: * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard, Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript, TclCompileTokens): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended the parser, compiler, and execution engine with code and attendant data structures tracking the position of continuation lines which are not visible in the resulting script Tcl_Obj*'s, to properly account for them while counting lines for #280. --- ChangeLog | 24 +++ generic/tclBasic.c | 162 ++++++++++++++++++-- generic/tclCmdMZ.c | 27 +++- generic/tclCompCmds.c | 113 ++++++++------ generic/tclCompile.c | 156 +++++++++++++++++++- generic/tclCompile.h | 12 +- generic/tclInt.h | 57 ++++++- generic/tclObj.c | 400 ++++++++++++++++++++++++++++++++++++++++++++++++-- generic/tclParse.c | 131 ++++++++++++++++- generic/tclProc.c | 14 +- generic/tclVar.c | 5 +- tests/info.test | 297 +++++++++++++++++++++++++++++++++++-- 12 files changed, 1288 insertions(+), 110 deletions(-) diff --git a/ChangeLog b/ChangeLog index df090b8..2b3e396 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2009-08-25 Andreas Kupries + + * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard, + Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): + * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): + * generic/tclCompCmds.c (*): + * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, + TclFreeCompileEnv, TclCompileScript, TclCompileTokens): + * generic/tclCompile.h (CompileEnv): + * generic/tclInt.h (ContLineLoc, Interp): + * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, + TclThreadFinalizeObjects, TclInitObjSubsystem, + TclContinuationsEnter, TclContinuationsEnterDerived, + TclContinuationsCopy, TclContinuationsGet, TclFreeObj): + * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): + * generic/tclProc.c (TclCreateProc): + * generic/tclVar.c (TclPtrSetVar): + * tests/info.test (info-30.0-24): + + Extended the parser, compiler, and execution engine with code and + attendant data structures tracking the position of continuation + lines which are not visible in the resulting script Tcl_Obj*'s, to + properly account for them while counting lines for #280. + 2009-08-24 Daniel Steffen * generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang static diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b83afe5..d97194c 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.401 2009/08/12 16:06:41 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.402 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -522,6 +522,7 @@ Tcl_CreateInterp(void) Tcl_InitHashTable(iPtr->lineBCPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineLAPtr, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(iPtr->lineLABCPtr, TCL_ONE_WORD_KEYS); + iPtr->scriptCLLocPtr = NULL; iPtr->activeVarTracePtr = NULL; @@ -4767,7 +4768,8 @@ Tcl_EvalTokensStandard( int count) /* Number of tokens to consider at tokenPtr. * Must be at least 1. */ { - return TclSubstTokens(interp, tokenPtr, count, /* numLeftPtr */ NULL, 1); + return TclSubstTokens(interp, tokenPtr, count, /* numLeftPtr */ NULL, 1, + NULL, NULL); } /* @@ -4851,7 +4853,7 @@ Tcl_EvalEx( * evaluation of the script. Only * TCL_EVAL_GLOBAL is currently supported. */ { - return TclEvalEx(interp, script, numBytes, flags, 1); + return TclEvalEx(interp, script, numBytes, flags, 1, NULL, script); } int @@ -4865,7 +4867,24 @@ TclEvalEx( int flags, /* Collection of OR-ed bits that control the * evaluation of the script. Only * TCL_EVAL_GLOBAL is currently supported. */ - int line) /* The line the script starts on. */ + int line, /* The line the script starts on. */ + int* clNextOuter, /* Information about an outer context for */ + CONST char* outerScript) /* continuation line data. This is set only in + * EvalTokensStandard(), to properly handle + * [...]-nested commands. The 'outerScript' + * refers to the most-outer script containing the + * embedded command, which is refered to by + * 'script'. The 'clNextOuter' refers to the + * current entry in the table of continuation + * lines in this "master script", and the + * character offsets are relative to the + * 'outerScript' as well. + * + * If outerScript == script, then this call is + * for the outer-most script/command. See + * Tcl_EvalEx() and TclEvalObjEx() for places + * generating arguments for which this is true. + */ { Interp *iPtr = (Interp *) interp; const char *p, *next; @@ -4891,6 +4910,23 @@ TclEvalEx( int *linesStack = TclStackAlloc(interp, minObjs * sizeof(int)); /* TIP #280 Structures for tracking of command * locations. */ + /* + * Pointer for the tracking of invisible continuation lines. Initialized + * only if the caller gave us a table of locations to track, via + * scriptCLLocPtr. It always refers to the table entry holding the + * location of the next invisible continuation line to look for, while + * parsing the script. + */ + + int* clNext = NULL; + + if (iPtr->scriptCLLocPtr) { + if (clNextOuter) { + clNext = clNextOuter; + } else { + clNext = &iPtr->scriptCLLocPtr->loc[0]; + } + } if (numBytes < 0) { numBytes = strlen(script); @@ -4916,12 +4952,12 @@ TclEvalEx( /* * TIP #280 Initialize tracking. Do not push on the frame stack yet. * - * We may cont. counting based on a specific context (CTX), or open a new - * context, either for a sourced script, or 'eval'. For sourced files we - * always have a path object, even if nothing was specified in the interp - * itself. That makes code using it simpler as NULL checks can be left - * out. Sourced file without path in the 'scriptFile' is possible during - * Tcl initialization. + * We may continue counting based on a specific context (CTX), or open a + * new context, either for a sourced script, or 'eval'. For sourced files + * we always have a path object, even if nothing was specified in the + * interp itself. That makes code using it simpler as NULL checks can be + * left out. Sourced file without path in the 'scriptFile' is possible + * during Tcl initialization. */ eeFramePtr->level = iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level + 1 : 1; @@ -4989,19 +5025,25 @@ TclEvalEx( /* * TIP #280 Track lines. The parser may have skipped text till it * found the command we are now at. We have to count the lines in this - * block. + * block, and do not forget invisible continuation lines. */ TclAdvanceLines(&line, p, parsePtr->commandStart); + TclAdvanceContinuations (&line, &clNext, + parsePtr->commandStart - outerScript); gotParse = 1; if (parsePtr->numWords > 0) { /* - * TIP #280. Track lines within the words of the current command. + * TIP #280. Track lines within the words of the current + * command. We use a separate pointer into the table of + * continuation line locations to not lose our position for the + * per-command parsing. */ int wordLine = line; const char *wordStart = parsePtr->commandStart; + int* wordCLNext = clNext; /* * Generate an array of objects for the words of the command. @@ -5033,6 +5075,8 @@ TclEvalEx( */ TclAdvanceLines(&wordLine, wordStart, tokenPtr->start); + TclAdvanceContinuations (&wordLine, &wordCLNext, + tokenPtr->start - outerScript); wordStart = tokenPtr->start; lines[objectsUsed] = TclWordKnownAtCompileTime(tokenPtr, NULL) @@ -5043,7 +5087,8 @@ TclEvalEx( } code = TclSubstTokens(interp, tokenPtr+1, - tokenPtr->numComponents, NULL, wordLine); + tokenPtr->numComponents, NULL, wordLine, + wordCLNext, outerScript); iPtr->evalFlags = 0; @@ -5075,6 +5120,11 @@ TclEvalEx( expand[objectsUsed] = 0; objectsNeeded++; } + + if (wordCLNext) { + TclContinuationsEnterDerived (objv[objectsUsed], + wordStart - outerScript, wordCLNext); + } } /* for loop */ iPtr->cmdFramePtr = eeFramePtr; if (code != TCL_OK) { @@ -5302,6 +5352,53 @@ TclAdvanceLines( /* *---------------------------------------------------------------------- + * + * TclAdvanceContinuations -- + * + * This procedure is a helper which counts the number of continuation + * lines (CL) in a block of text using a table of CL locations and + * advances an external counter, and the pointer into the table. + * + * Results: + * None. + * + * Side effects: + * The specified counter is advanced per the number of continuation lines + * found. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +void +TclAdvanceContinuations (line,clNextPtrPtr,loc) + int* line; + int** clNextPtrPtr; + int loc; +{ + /* + * Track the invisible continuation lines embedded in a script, if + * any. Here they are just spaces (already). They were removed by + * EvalTokensStandard() via Tcl_UtfBackslash(). + * + * *clNextPtrPtr <=> We have continuation lines to track. + * **clNextPtrPtr >= 0 <=> We are not beyond the last possible location. + * loc >= **clNextPtrPtr <=> We stepped beyond the current cont. line. + */ + + while (*clNextPtrPtr && (**clNextPtrPtr >= 0) && (loc >= **clNextPtrPtr)) { + /* + * We just stepped over an invisible continuation line. Adjust the + * line counter and step to the table entry holding the location of + * the next continuation line to track. + */ + (*line) ++; + (*clNextPtrPtr) ++; + } +} + +/* + *---------------------------------------------------------------------- * Note: The whole data structure access for argument location tracking is * hidden behind these three functions. The only parts open are the lineLAPtr * field in the Interp structure. The CFWord definition is internal to here. @@ -5919,6 +6016,33 @@ TclNREvalObjEx( const char *script; int numSrcBytes; + /* + * Now we check if we have data about invisible continuation lines for + * the script, and make it available to the direct script parser and + * evaluator we are about to call, if so. + * + * It may be possible that the script Tcl_Obj* can be free'd while the + * evaluator is using it, leading to the release of the associated + * ContLineLoc structure as well. To ensure that the latter doesn't + * happen we set a lock on it. We release this lock later in this + * function, after the evaluator is done. The relevant "lineCLPtr" + * hashtable is managed in the file "tclObj.c". + * + * Another important action is to save (and later restore) the + * continuation line information of the caller, in case we are + * executing nested commands in the eval/direct path. + */ + + ContLineLoc* saveCLLocPtr = iPtr->scriptCLLocPtr; + ContLineLoc* clLocPtr = TclContinuationsGet (objPtr); + + if (clLocPtr) { + iPtr->scriptCLLocPtr = clLocPtr; + Tcl_Preserve (iPtr->scriptCLLocPtr); + } else { + iPtr->scriptCLLocPtr = NULL; + } + Tcl_IncrRefCount(objPtr); if (invoker == NULL) { /* @@ -5974,7 +6098,7 @@ TclNREvalObjEx( iPtr->evalFlags |= TCL_EVAL_CTX; result = TclEvalEx(interp, script, numSrcBytes, flags, - ctxPtr->line[word]); + ctxPtr->line[word], NULL, script); if (pc) { /* @@ -5985,6 +6109,16 @@ TclNREvalObjEx( } } TclStackFree(interp, ctxPtr); + + /* + * Now release the lock on the continuation line information, if + * any, and restore the caller's settings. + */ + + if (iPtr->scriptCLLocPtr) { + Tcl_Release (iPtr->scriptCLLocPtr); + } + iPtr->scriptCLLocPtr = saveCLLocPtr; } TclDecrRefCount(objPtr); return result; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 706b905..2cce7be 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.190 2009/08/20 10:55:51 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.191 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -3853,7 +3853,7 @@ TclNRSwitchObjCmd( ctxPtr->line = (int *) ckalloc(objc * sizeof(int)); ctxPtr->nline = objc; - TclListLines(TclGetString(blist), bline, objc, ctxPtr->line); + TclListLines(blist, bline, objc, ctxPtr->line, objv); } else { /* * This is either a dynamic code word, when all elements are @@ -3893,7 +3893,7 @@ TclNRSwitchObjCmd( Tcl_NRAddCallback(interp, SwitchPostProc, INT2PTR(splitObjs), ctxPtr, INT2PTR(pc), (ClientData) pattern); - return TclNREvalObjEx(interp, objv[j], 0, ctxPtr, j); + return TclNREvalObjEx(interp, objv[j], 0, ctxPtr, splitObjs ? j : bidx+j); } static int SwitchPostProc( @@ -4701,21 +4701,34 @@ TclNRWhileObjCmd( void TclListLines( - const char *listStr, /* Pointer to string with list structure. - * Assumed to be valid. Assumed to contain n - * elements. */ + Tcl_Obj* listObj, /* Pointer to obj holding a string with list + * structure. Assumed to be valid. Assumed to + * contain n elements. + */ int line, /* Line the list as a whole starts on. */ int n, /* #elements in lines */ - int *lines) /* Array of line numbers, to fill. */ + int *lines, /* Array of line numbers, to fill. */ + Tcl_Obj* const* elems) /* The list elems as Tcl_Obj*, in need of + * derived continuation data */ { + CONST char* listStr = Tcl_GetString (listObj); + CONST char* listHead = listStr; int i, length = strlen(listStr); const char *element = NULL, *next = NULL; + ContLineLoc* clLocPtr = TclContinuationsGet(listObj); + int* clNext = (clLocPtr ? &clLocPtr->loc[0] : NULL); for (i = 0; i < n; i++) { TclFindElement(NULL, listStr, length, &element, &next, NULL, NULL); TclAdvanceLines(&line, listStr, element); /* Leading whitespace */ + TclAdvanceContinuations (&line, &clNext, element - listHead); + if (elems && clNext) { + TclContinuationsEnterDerived (elems[i], + element - listHead, + clNext); + } lines[i] = line; length -= (next - listStr); TclAdvanceLines(&line, element, next); diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 8403a98..5b5871f 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.152 2009/02/03 23:34:32 nijtmans Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.153 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -32,6 +32,7 @@ (tokenPtr)[1].size), (envPtr)); \ } else { \ envPtr->line = mapPtr->loc[eclIndex].line[word]; \ + envPtr->clNext = mapPtr->loc[eclIndex].next[word]; \ TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ (envPtr)); \ } @@ -49,6 +50,10 @@ ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \ int eclIndex = mapPtr->nuloc - 1 +#define SetLineInformation(word) \ + envPtr->line = mapPtr->loc [eclIndex].line [(word)]; \ + envPtr->clNext = mapPtr->loc [eclIndex].next [(word)] + /* * Convenience macro for use when compiling bodies of commands. The ANSI C * "prototype" for this macro is: @@ -160,7 +165,8 @@ static void PrintJumptableInfo(ClientData clientData, static int PushVarName(Tcl_Interp *interp, Tcl_Token *varTokenPtr, CompileEnv *envPtr, int flags, int *localIndexPtr, - int *simpleVarNamePtr, int *isScalarPtr, int line); + int *simpleVarNamePtr, int *isScalarPtr, + int line, int* clNext); static int CompileAssociativeBinaryOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, const char *identity, int instruction, CompileEnv *envPtr); @@ -177,6 +183,11 @@ static void CompileReturnInternal(CompileEnv *envPtr, unsigned char op, int code, int level, Tcl_Obj *returnOpts); +#define PushVarNameWord(i,v,e,f,l,s,sc,word) \ + PushVarName (i,v,e,f,l,s,sc, \ + mapPtr->loc [eclIndex].line [(word)], \ + mapPtr->loc [eclIndex].next [(word)]) + /* * Flags bits used by PushVarName. */ @@ -266,9 +277,8 @@ TclCompileAppendCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, - mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, varTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); /* * We are doing an assignment, otherwise TclCompileSetCmd was called, so @@ -462,7 +472,7 @@ TclCompileCatchCmd( * range so that errors in the substitution are not catched [Bug 219184] */ - envPtr->line = mapPtr->loc[eclIndex].line[1]; + SetLineInformation (1); if (cmdTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { ExceptionRangeStarts(envPtr, range); CompileBody(envPtr, cmdTokenPtr, interp); @@ -944,7 +954,7 @@ TclCompileDictForCmd( * Compile the loop body itself. It should be stack-neutral. */ - envPtr->line = mapPtr->loc[eclIndex].line[4]; + SetLineInformation (4); CompileBody(envPtr, bodyTokenPtr, interp); TclEmitOpcode( INST_POP, envPtr); @@ -1481,7 +1491,7 @@ TclCompileForCmd( * Inline compile the initial command. */ - envPtr->line = mapPtr->loc[eclIndex].line[1]; + SetLineInformation (1); CompileBody(envPtr, startTokenPtr, interp); TclEmitOpcode(INST_POP, envPtr); @@ -1504,7 +1514,7 @@ TclCompileForCmd( */ bodyCodeOffset = ExceptionRangeStarts(envPtr, bodyRange); - envPtr->line = mapPtr->loc[eclIndex].line[4]; + SetLineInformation (4); CompileBody(envPtr, bodyTokenPtr, interp); ExceptionRangeEnds(envPtr, bodyRange); envPtr->currStackDepth = savedStackDepth + 1; @@ -1516,7 +1526,7 @@ TclCompileForCmd( envPtr->currStackDepth = savedStackDepth; nextCodeOffset = ExceptionRangeStarts(envPtr, nextRange); - envPtr->line = mapPtr->loc[eclIndex].line[3]; + SetLineInformation (3); CompileBody(envPtr, nextTokenPtr, interp); ExceptionRangeEnds(envPtr, nextRange); envPtr->currStackDepth = savedStackDepth + 1; @@ -1537,7 +1547,7 @@ TclCompileForCmd( testCodeOffset += 3; } - envPtr->line = mapPtr->loc[eclIndex].line[2]; + SetLineInformation (2); envPtr->currStackDepth = savedStackDepth; TclCompileExprWords(interp, testTokenPtr, 1, envPtr); envPtr->currStackDepth = savedStackDepth + 1; @@ -1787,7 +1797,7 @@ TclCompileForeachCmd( i < numWords-1; i++, tokenPtr = TokenAfter(tokenPtr)) { if ((i%2 == 0) && (i > 0)) { - envPtr->line = mapPtr->loc[eclIndex].line[i]; + SetLineInformation (i); CompileTokens(envPtr, tokenPtr, interp); tempVar = (firstValueTemp + loopIndex); if (tempVar <= 255) { @@ -1819,7 +1829,7 @@ TclCompileForeachCmd( * Inline compile the loop body. */ - envPtr->line = mapPtr->loc[eclIndex].line[bodyIndex]; + SetLineInformation (bodyIndex); ExceptionRangeStarts(envPtr, range); CompileBody(envPtr, bodyTokenPtr, interp); ExceptionRangeEnds(envPtr, range); @@ -2158,7 +2168,7 @@ TclCompileIfCmd( compileScripts = 0; } } else { - envPtr->line = mapPtr->loc[eclIndex].line[wordIdx]; + SetLineInformation (wordIdx); Tcl_ResetResult(interp); TclCompileExprWords(interp, testTokenPtr, 1, envPtr); if (jumpFalseFixupArray.next >= jumpFalseFixupArray.end) { @@ -2200,7 +2210,7 @@ TclCompileIfCmd( */ if (compileScripts) { - envPtr->line = mapPtr->loc[eclIndex].line[wordIdx]; + SetLineInformation (wordIdx); envPtr->currStackDepth = savedStackDepth; CompileBody(envPtr, tokenPtr, interp); } @@ -2288,7 +2298,7 @@ TclCompileIfCmd( * Compile the else command body. */ - envPtr->line = mapPtr->loc[eclIndex].line[wordIdx]; + SetLineInformation (wordIdx); CompileBody(envPtr, tokenPtr, interp); } @@ -2390,9 +2400,8 @@ TclCompileIncrCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, TCL_NO_LARGE_INDEX, - &localIndex, &simpleVarName, &isScalar, - mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, varTokenPtr, envPtr, TCL_NO_LARGE_INDEX, + &localIndex, &simpleVarName, &isScalar, 1); /* * If an increment is given, push it, but see first if it's a small @@ -2418,7 +2427,7 @@ TclCompileIncrCmd( PushLiteral(envPtr, word, numBytes); } } else { - envPtr->line = mapPtr->loc[eclIndex].line[2]; + SetLineInformation (2); CompileTokens(envPtr, incrTokenPtr, interp); } } else { /* No incr amount given so use 1. */ @@ -2533,9 +2542,8 @@ TclCompileLappendCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, - mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, varTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); /* * If we are doing an assignment, push the new value. In the no values @@ -2640,8 +2648,8 @@ TclCompileLassignCmd( * Generate the next variable name. */ - PushVarName(interp, tokenPtr, envPtr, 0, &localIndex, - &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[idx+2]); + PushVarNameWord(interp, tokenPtr, envPtr, 0, &localIndex, + &simpleVarName, &isScalar, idx+2); /* * Emit instructions to get the idx'th item out of the list value on @@ -2977,9 +2985,8 @@ TclCompileLsetCmd( */ varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, - mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, varTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); /* * Push the "index" args and the new element value. @@ -3479,9 +3486,8 @@ TclCompileSetCmd( */ varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, - mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, varTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); /* * If we are doing an assignment, push the new value. @@ -3762,7 +3768,7 @@ TclCompileStringMatchCmd( } PushLiteral(envPtr, str, length); } else { - envPtr->line = mapPtr->loc[eclIndex].line[i+1+nocase]; + SetLineInformation (i+1+nocase); CompileTokens(envPtr, tokenPtr, interp); } tokenPtr = TokenAfter(tokenPtr); @@ -3828,7 +3834,7 @@ TclCompileStringLenCmd( len = sprintf(buf, "%d", len); PushLiteral(envPtr, buf, len); } else { - envPtr->line = mapPtr->loc[eclIndex].line[1]; + SetLineInformation (1); CompileTokens(envPtr, tokenPtr, interp); TclEmitOpcode(INST_STR_LEN, envPtr); } @@ -3878,6 +3884,7 @@ TclCompileSwitchCmd( Tcl_Token **bodyToken; /* Array of pointers to pattern list items. */ int *bodyLines; /* Array of line numbers for body list * items. */ + int** bodyNext; int foundDefault; /* Flag to indicate whether a "default" clause * is present. */ @@ -3896,6 +3903,7 @@ TclCompileSwitchCmd( int isListedArms = 0; int i, valueIndex; DefineLineInformation; /* TIP #280 */ + int* clNext = envPtr->clNext; /* * Only handle the following versions: @@ -4074,6 +4082,7 @@ TclCompileSwitchCmd( bodyTokenArray = (Tcl_Token *) ckalloc(sizeof(Tcl_Token) * numWords); bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); bodyLines = (int *) ckalloc(sizeof(int) * numWords); + bodyNext = (int **) ckalloc(sizeof(int*) * numWords); /* * Locate the start of the arms within the overall word. @@ -4117,6 +4126,7 @@ TclCompileSwitchCmd( ckfree((char *) bodyToken); ckfree((char *) bodyTokenArray); ckfree((char *) bodyLines); + ckfree((char *) bodyNext); return TCL_ERROR; } @@ -4127,7 +4137,10 @@ TclCompileSwitchCmd( */ TclAdvanceLines(&bline, p, bodyTokenArray[i].start); + TclAdvanceContinuations (&bline, &clNext, + bodyTokenArray[i].start - envPtr->source); bodyLines[i] = bline; + bodyNext[i] = clNext; p = bodyTokenArray[i].start; while (isspace(UCHAR(*tokenStartPtr))) { @@ -4155,6 +4168,7 @@ TclCompileSwitchCmd( ckfree((char *) bodyToken); ckfree((char *) bodyTokenArray); ckfree((char *) bodyLines); + ckfree((char *) bodyNext); return TCL_ERROR; } @@ -4175,6 +4189,7 @@ TclCompileSwitchCmd( bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); bodyLines = (int *) ckalloc(sizeof(int) * numWords); + bodyNext = (int **) ckalloc(sizeof(int*) * numWords); bodyTokenArray = NULL; for (i=0 ; inumComponents != 1) { ckfree((char *) bodyToken); ckfree((char *) bodyLines); + ckfree((char *) bodyNext); return TCL_ERROR; } bodyToken[i] = tokenPtr+1; @@ -4196,6 +4212,7 @@ TclCompileSwitchCmd( */ bodyLines[i] = mapPtr->loc[eclIndex].line[valueIndex+1+i]; + bodyNext[i] = mapPtr->loc[eclIndex].next[valueIndex+1+i]; tokenPtr = TokenAfter(tokenPtr); } } @@ -4209,6 +4226,7 @@ TclCompileSwitchCmd( bodyToken[numWords-1]->start[0] == '-') { ckfree((char *) bodyToken); ckfree((char *) bodyLines); + ckfree((char *) bodyNext); if (bodyTokenArray != NULL) { ckfree((char *) bodyTokenArray); } @@ -4220,7 +4238,7 @@ TclCompileSwitchCmd( * First, we push the value we're matching against on the stack. */ - envPtr->line = mapPtr->loc[eclIndex].line[valueIndex]; + SetLineInformation (valueIndex); CompileTokens(envPtr, valueTokenPtr, interp); /* @@ -4342,6 +4360,7 @@ TclCompileSwitchCmd( */ envPtr->line = bodyLines[i+1]; /* TIP #280 */ + envPtr->clNext = bodyNext[i+1]; /* TIP #280 */ TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); /* @@ -4393,6 +4412,7 @@ TclCompileSwitchCmd( ckfree((char *) finalFixups); ckfree((char *) bodyToken); ckfree((char *) bodyLines); + ckfree((char *) bodyNext); if (bodyTokenArray != NULL) { ckfree((char *) bodyTokenArray); } @@ -4554,6 +4574,7 @@ TclCompileSwitchCmd( TclEmitOpcode(INST_POP, envPtr); envPtr->currStackDepth = savedStackDepth + 1; envPtr->line = bodyLines[i+1]; /* TIP #280 */ + envPtr->clNext = bodyNext[i+1]; /* TIP #280 */ TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); if (!foundDefault) { @@ -4570,6 +4591,7 @@ TclCompileSwitchCmd( ckfree((char *) bodyToken); ckfree((char *) bodyLines); + ckfree((char *) bodyNext); if (bodyTokenArray != NULL) { ckfree((char *) bodyTokenArray); } @@ -4826,7 +4848,7 @@ TclCompileWhileCmd( * Compile the loop body. */ - envPtr->line = mapPtr->loc[eclIndex].line[2]; + SetLineInformation (2); bodyCodeOffset = ExceptionRangeStarts(envPtr, range); CompileBody(envPtr, bodyTokenPtr, interp); ExceptionRangeEnds(envPtr, range); @@ -4846,7 +4868,7 @@ TclCompileWhileCmd( testCodeOffset += 3; } envPtr->currStackDepth = savedStackDepth; - envPtr->line = mapPtr->loc[eclIndex].line[1]; + SetLineInformation (1); TclCompileExprWords(interp, testTokenPtr, 1, envPtr); envPtr->currStackDepth = savedStackDepth + 1; @@ -4911,7 +4933,8 @@ PushVarName( int *localIndexPtr, /* Must not be NULL. */ int *simpleVarNamePtr, /* Must not be NULL. */ int *isScalarPtr, /* Must not be NULL. */ - int line) /* Line the token starts on. */ + int line, /* Line the token starts on. */ + int* clNext) /* Reference to offset of next hidden cont. line */ { register const char *p; const char *name, *elName; @@ -5094,6 +5117,7 @@ PushVarName( if (elName != NULL) { if (elNameChars) { envPtr->line = line; + envPtr->clNext = clNext; TclCompileTokens(interp, elemTokenPtr, elemTokenCount, envPtr); } else { PushLiteral(envPtr, "", 0); @@ -5105,6 +5129,7 @@ PushVarName( */ envPtr->line = line; + envPtr->clNext = clNext; CompileTokens(envPtr, varTokenPtr, interp); } @@ -5881,9 +5906,8 @@ TclCompileUpvarCmd( localTokenPtr = TokenAfter(otherTokenPtr); CompileWord(envPtr, otherTokenPtr, interp, 1); - PushVarName(interp, localTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, - mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, localTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); if((localIndex < 0) || !isScalar) { return TCL_ERROR; @@ -5974,9 +5998,8 @@ TclCompileNamespaceCmd( localTokenPtr = TokenAfter(otherTokenPtr); CompileWord(envPtr, otherTokenPtr, interp, 1); - PushVarName(interp, localTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, - mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, localTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); if((localIndex < 0) || !isScalar) { return TCL_ERROR; @@ -6490,8 +6513,8 @@ TclCompileInfoExistsCmd( */ tokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarName(interp, tokenPtr, envPtr, 0, &localIndex, - &simpleVarName, &isScalar, mapPtr->loc[eclIndex].line[1]); + PushVarNameWord(interp, tokenPtr, envPtr, 0, &localIndex, + &simpleVarName, &isScalar, 1); /* * Emit instruction to check the variable for existence. diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 6b8b7a5..a0ac9d3 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.170 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.171 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -431,7 +431,8 @@ static void PrintSourceToObj(Tcl_Obj *appendObj, */ static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset, Tcl_Token *tokenPtr, const char *cmd, int len, - int numWords, int line, int **lines); + int numWords, int line, int* clNext, int **lines, + CompileEnv* envPtr); /* * The structure below defines the bytecode Tcl object type by means of @@ -487,6 +488,7 @@ TclSetByteCodeFromAny( register int i; int length, result = TCL_OK; const char *stringPtr; + ContLineLoc* clLocPtr; #ifdef TCL_COMPILE_DEBUG if (!traceInitialized) { @@ -508,6 +510,25 @@ TclSetByteCodeFromAny( TclInitCompileEnv(interp, &compEnv, stringPtr, length, iPtr->invokeCmdFramePtr, iPtr->invokeWord); + /* + * Now we check if we have data about invisible continuation lines for the + * script, and make it available to the compile environment, if so. + * + * It is not clear if the script Tcl_Obj* can be free'd while the compiler + * is using it, leading to the release of the associated ContLineLoc + * structure as well. To ensure that the latter doesn't happen we set a + * lock on it. We release this lock in the function TclFreeCompileEnv (), + * found in this file. The "lineCLPtr" hashtable is managed in the file + * "tclObj.c". + */ + + clLocPtr = TclContinuationsGet (objPtr); + if (clLocPtr) { + compEnv.clLoc = clLocPtr; + compEnv.clNext = &compEnv.clLoc->loc[0]; + Tcl_Preserve (compEnv.clLoc); + } + TclCompileScript(interp, stringPtr, length, &compEnv); /* @@ -1015,6 +1036,15 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->start = envPtr->line; + /* + * Initialize the data about invisible continuation lines as empty, + * i.e. not used. The caller (TclSetByteCodeFromAny) will set this up, if + * such data is available. + */ + + envPtr->clLoc = NULL; + envPtr->clNext = NULL; + envPtr->auxDataArrayPtr = envPtr->staticAuxDataArraySpace; envPtr->auxDataArrayNext = 0; envPtr->auxDataArrayEnd = COMPILEENV_INIT_AUX_DATA_SIZE; @@ -1069,6 +1099,16 @@ TclFreeCompileEnv( if (envPtr->extCmdMapPtr) { ckfree((char *) envPtr->extCmdMapPtr); } + + /* + * If we used data about invisible continuation lines, then now is the + * time to release on our hold on it. The lock was set in function + * TclSetByteCodeFromAny(), found in this file. + */ + + if (envPtr->clLoc) { + Tcl_Release (envPtr->clLoc); + } } /* @@ -1196,6 +1236,7 @@ TclCompileScript( /* TIP #280 */ ExtCmdLoc *eclPtr = envPtr->extCmdMapPtr; int *wlines, wlineat, cmdLine; + int* clNext; Tcl_Parse *parsePtr = (Tcl_Parse *) TclStackAlloc(interp, sizeof(Tcl_Parse)); @@ -1221,6 +1262,7 @@ TclCompileScript( p = script; bytesLeft = numBytes; cmdLine = envPtr->line; + clNext = envPtr->clNext; do { if (Tcl_ParseCommand(interp, p, bytesLeft, 0, parsePtr) != TCL_OK) { /* @@ -1320,10 +1362,12 @@ TclCompileScript( */ TclAdvanceLines(&cmdLine, p, parsePtr->commandStart); + TclAdvanceContinuations (&cmdLine, &clNext, + parsePtr->commandStart - envPtr->source); EnterCmdWordData(eclPtr, parsePtr->commandStart - envPtr->source, parsePtr->tokenPtr, parsePtr->commandStart, parsePtr->commandSize, parsePtr->numWords, cmdLine, - &wlines); + clNext, &wlines, envPtr); wlineat = eclPtr->nuloc - 1; /* @@ -1336,6 +1380,7 @@ TclCompileScript( tokenPtr += (tokenPtr->numComponents + 1)) { envPtr->line = eclPtr->loc[wlineat].line[wordIdx]; + envPtr->clNext = eclPtr->loc [wlineat].next [wordIdx]; if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { /* * The word is not a simple string of characters. @@ -1498,6 +1543,12 @@ TclCompileScript( */ objIndex = TclRegisterNewLiteral(envPtr, tokenPtr[1].start, tokenPtr[1].size); + + if (envPtr->clNext) { + TclContinuationsEnterDerived (envPtr->literalArrayPtr[objIndex].objPtr, + tokenPtr[1].start - envPtr->source, + eclPtr->loc [wlineat].next [wordIdx]); + } } TclEmitPush(objIndex, envPtr); } /* for loop */ @@ -1559,7 +1610,9 @@ TclCompileScript( */ ckfree((char *) eclPtr->loc[wlineat].line); + ckfree((char *) eclPtr->loc[wlineat].next); eclPtr->loc[wlineat].line = wlines; + eclPtr->loc[wlineat].next = NULL; } /* end if parsePtr->numWords > 0 */ /* @@ -1575,6 +1628,7 @@ TclCompileScript( */ TclAdvanceLines(&cmdLine, parsePtr->commandStart, p); + TclAdvanceContinuations (&cmdLine, &clNext, p - envPtr->source); Tcl_FreeParse(parsePtr); } while (bytesLeft > 0); @@ -1635,6 +1689,41 @@ TclCompileTokens( int numObjsToConcat, nameBytes, localVarName, localVar; int length, i; unsigned char *entryCodeNext = envPtr->codeNext; +#define NUM_STATIC_POS 20 + int isLiteral, maxNumCL, numCL; + int* clPosition; + + /* + * For the handling of continuation lines in literals we first check if + * this is actually a literal. For if not we can forego the additional + * processing. Otherwise we pre-allocate a small table to store the + * locations of all continuation lines we find in this literal, if + * any. The table is extended if needed. + * + * Note: Different to the equivalent code in function 'TclSubstTokens()' + * (see file "tclParse.c") we do not seem to need the 'adjust' + * variable. We also do not seem to need code which merges continuation + * line information of multiple words which concat'd at runtime. Either + * that or I have not managed to find a test case for these two + * possibilities yet. It might be a difference between compile- versus + * runtime processing. + */ + + numCL = 0; + maxNumCL = 0; + isLiteral = 1; + for (i=0 ; i < count; i++) { + if ((tokenPtr[i].type != TCL_TOKEN_TEXT) && + (tokenPtr[i].type != TCL_TOKEN_BS)) { + isLiteral = 0; + break; + } + } + + if (isLiteral) { + maxNumCL = NUM_STATIC_POS; + clPosition = (int*) ckalloc (maxNumCL*sizeof(int)); + } Tcl_DStringInit(&textBuffer); numObjsToConcat = 0; @@ -1647,6 +1736,36 @@ TclCompileTokens( case TCL_TOKEN_BS: length = Tcl_UtfBackslash(tokenPtr->start, NULL, buffer); Tcl_DStringAppend(&textBuffer, buffer, length); + + /* + * If the backslash sequence we found is in a literal, and + * represented a continuation line, we compute and store its + * location (as char offset to the beginning of the _result_ + * script). We may have to extend the table of locations. + * + * Note that the continuation line information is relevant even if + * the word we are processing is not a literal, as it can affect + * nested commands. See the branch for TCL_TOKEN_COMMAND below, + * where the adjustment we are tracking here is taken into + * account. The good thing is that we do not need a table of + * everything, just the number of lines we have to add as + * correction. + */ + + if ((length == 1) && (buffer[0] == ' ') && + (tokenPtr->start[1] == '\n')) { + if (isLiteral) { + int clPos = Tcl_DStringLength (&textBuffer); + + if (numCL >= maxNumCL) { + maxNumCL *= 2; + clPosition = (int*) ckrealloc ((char*)clPosition, + maxNumCL*sizeof(int)); + } + clPosition[numCL] = clPos; + numCL ++; + } + } break; case TCL_TOKEN_COMMAND: @@ -1662,6 +1781,12 @@ TclCompileTokens( TclEmitPush(literal, envPtr); numObjsToConcat++; Tcl_DStringFree(&textBuffer); + + if (numCL) { + TclContinuationsEnter(envPtr->literalArrayPtr[literal].objPtr, + numCL, clPosition); + } + numCL = 0; } TclCompileScript(interp, tokenPtr->start+1, @@ -1770,6 +1895,12 @@ TclCompileTokens( Tcl_DStringLength(&textBuffer)); TclEmitPush(literal, envPtr); numObjsToConcat++; + + if (numCL) { + TclContinuationsEnter(envPtr->literalArrayPtr[literal].objPtr, + numCL, clPosition); + } + numCL = 0; } /* @@ -1792,6 +1923,15 @@ TclCompileTokens( TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr); } Tcl_DStringFree(&textBuffer); + + /* + * Release the temp table we used to collect the locations of + * continuation lines, if any. + */ + + if (maxNumCL) { + ckfree ((char*) clPosition); + } } /* @@ -2461,11 +2601,14 @@ EnterCmdWordData( int len, int numWords, int line, - int **wlines) + int* clNext, + int **wlines, + CompileEnv* envPtr) { ECL *ePtr; const char *last; int wordIdx, wordLine, *wwlines; + int* wordNext; if (eclPtr->nuloc >= eclPtr->nloc) { /* @@ -2485,17 +2628,22 @@ EnterCmdWordData( ePtr = &eclPtr->loc[eclPtr->nuloc]; ePtr->srcOffset = srcOffset; ePtr->line = (int *) ckalloc(numWords * sizeof(int)); + ePtr->next = (int**) ckalloc (numWords * sizeof (int*)); ePtr->nline = numWords; wwlines = (int *) ckalloc(numWords * sizeof(int)); last = cmd; wordLine = line; + wordNext = clNext; for (wordIdx=0 ; wordIdxnumComponents + 1) { TclAdvanceLines(&wordLine, last, tokenPtr->start); + TclAdvanceContinuations (&wordLine, &wordNext, + tokenPtr->start - envPtr->source); wwlines[wordIdx] = (TclWordKnownAtCompileTime(tokenPtr, NULL) ? wordLine : -1); ePtr->line[wordIdx] = wordLine; + ePtr->next[wordIdx] = wordNext; last = tokenPtr->start; } diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 75dc236..4d9dbd1 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.117 2009/07/14 16:34:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.118 2009/08/25 21:03:25 andreas_kupries Exp $ */ #ifndef _TCLCOMPILATION @@ -132,6 +132,9 @@ typedef struct ECL { int nline; /* Number of words in the command */ int *line; /* Line information for all words in the * command. */ + int** next; /* Transient information used by the compiler + * for tracking of hidden continuation + * lines. */ } ECL; typedef struct ExtCmdLoc { @@ -309,6 +312,13 @@ typedef struct CompileEnv { * should be issued; they should never be * issued repeatedly, as that is significantly * inefficient. */ + ContLineLoc* clLoc; /* If not NULL, the table holding the + * locations of the invisible continuation + * lines in the input script, to adjust the + * line counter. */ + int* clNext; /* If not NULL, it refers to the next slot in + * clLoc to check for an invisible + * continuation line. */ } CompileEnv; /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 3501083..6443c6f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.436 2009/08/24 03:18:23 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.437 2009/08/25 21:03:25 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -1196,6 +1196,36 @@ typedef struct CFWordBC { } CFWordBC; /* + * Structure to record the locations of invisible continuation lines in + * literal scripts, as character offset from the beginning of the script. Both + * compiler and direct evaluator use this information to adjust their line + * counters when tracking through the script, because when it is invoked the + * continuation line marker as a whole has been removed already, meaning that + * the \n which was part of it is gone as well, breaking regular line + * tracking. + * + * These structures are allocated and filled by both the function + * TclSubstTokens() in the file "tclParse.c" and its caller TclEvalEx() in the + * file "tclBasic.c", and stored in the thread-global hashtable "lineCLPtr" in + * file "tclObj.c". They are used by the functions TclSetByteCodeFromAny() and + * TclCompileScript(), both found in the file "tclCompile.c". Their memory is + * released by the function TclFreeObj(), in the file "tclObj.c", and also by + * the function TclThreadFinalizeObjects(), in the same file. + */ + +#define CLL_END (-1) + +typedef struct ContLineLoc { + int num; /* Number of entries in loc, not counting the final -1 + * marker entry */ + int loc[1]; /* Table of locations, as character offsets. The table + * is allocated as part of the structure, i.e. the loc + * array extends behind the nominal end of the + * structure. An entry containing the value -1 is put + * after the last location, as end-marker/sentinel. */ +} ContLineLoc; + +/* * The following macros define the allowed values for the type field of the * CmdFrame structure above. Some of the values occur only in the extended * location data referenced via the 'baseLocPtr'. @@ -1983,6 +2013,16 @@ typedef struct Interp { * invoking command. Alt view: An index to the * CmdFrame stack keyed by command argument * holders. */ + ContLineLoc* scriptCLLocPtr; + /* This table points to the location data for + * invisible continuation lines in the script, + * if any. This pointer is set by the function + * TclEvalObjEx() in file "tclBasic.c", and + * used by function ...() in the same file. + * It does for the eval/direct path of script + * execution what CompileEnv.clLoc does for + * the bytecode compiler. + */ /* * TIP #268. The currently active selection mode, i.e. the package require * preferences. @@ -2651,6 +2691,7 @@ typedef struct ForIterData { MODULE_SCOPE int TclNREvalCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp); +MODULE_SCOPE void TclAdvanceContinuations(int* line, int** next, int loc); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp, @@ -2678,11 +2719,16 @@ MODULE_SCOPE int TclClearRootEnsemble(ClientData data[], Tcl_Interp *interp, int result); MODULE_SCOPE void TclCleanupLiteralTable(Tcl_Interp *interp, LiteralTable *tablePtr); +MODULE_SCOPE ContLineLoc* TclContinuationsEnter(Tcl_Obj* objPtr, int num, int* loc); +MODULE_SCOPE void TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext); +MODULE_SCOPE ContLineLoc* TclContinuationsGet(Tcl_Obj* objPtr); +MODULE_SCOPE void TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr); MODULE_SCOPE int TclDoubleDigits(char *buf, double value, int *signum); MODULE_SCOPE void TclDeleteNamespaceVars(Namespace *nsPtr); /* TIP #280 - Modified token based evulation, with line information. */ MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script, - int numBytes, int flags, int line); + int numBytes, int flags, int line, + int* clNextOuter, CONST char* outerScript); MODULE_SCOPE int TclFileAttrsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int TclFileCopyCmd(Tcl_Interp *interp, @@ -2776,8 +2822,8 @@ MODULE_SCOPE Tcl_Obj * TclLindexList(Tcl_Interp *interp, MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, int indexCount, Tcl_Obj *const indexArray[]); /* TIP #280 */ -MODULE_SCOPE void TclListLines(const char *listStr, int line, int n, - int *lines); +MODULE_SCOPE void TclListLines(Tcl_Obj *listObj, int line, int n, + int *lines, Tcl_Obj* const* elems); MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr); MODULE_SCOPE int TclLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, int symc, const char *symbols[], @@ -2903,7 +2949,8 @@ MODULE_SCOPE int TclStringMatchObj(Tcl_Obj *stringObj, Tcl_Obj *patternObj, int flags); MODULE_SCOPE Tcl_Obj * TclStringObjReverse(Tcl_Obj *objPtr); MODULE_SCOPE int TclSubstTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, - int count, int *tokensLeftPtr, int line); + int count, int *tokensLeftPtr, int line, + int* clNextOuter, CONST char* outerScript); MODULE_SCOPE Tcl_Obj * TclpNativeToNormalized(ClientData clientData); MODULE_SCOPE Tcl_Obj * TclpFilesystemPathType(Tcl_Obj *pathPtr); MODULE_SCOPE Tcl_PackageInitProc *TclpFindSymbol(Tcl_Interp *interp, diff --git a/generic/tclObj.c b/generic/tclObj.c index 8052028..0bdb371 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.155 2009/08/12 16:06:44 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.156 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -68,18 +68,45 @@ typedef struct ObjData { int line; /* Line number in the source file; used for * debugging. */ } ObjData; - +#endif /* TCL_MEM_DEBUG && TCL_THREADS */ + /* - * Thread local table that is used to check that a Tcl_Obj was not allocated - * by some other thread. + * All static variables used in this file are collected into a single instance + * of the following structure. For multi-threaded implementations, there is + * one instance of this structure for each thread. + * + * Notice that different structures with the same name appear in other files. + * The structure defined below is used in this file only. */ typedef struct ThreadSpecificData { + Tcl_HashTable* lineCLPtr; /* This table remembers for each Tcl_Obj + * generated by a call to the function + * EvalTokensStandard() from a literal text + * where bs+nl sequences occured in it, if + * any. I.e. this table keeps track of + * invisible/stripped continuation lines. Its + * keys are Tcl_Obj pointers, the values are + * ContLineLoc pointers. See the file + * tclCompile.h for the definition of this + * structure, and for references to all related + * places in the core. + */ +#if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) + /* + * Thread local table that is used to check that a Tcl_Obj was not + * allocated by some other thread. + */ + Tcl_HashTable *objThreadMap; +#endif /* TCL_MEM_DEBUG && TCL_THREADS */ } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; -#endif /* TCL_MEM_DEBUG && TCL_THREADS */ + +static void ContLineLocFree (char* clientData); +static void TclThreadFinalizeObjects (ClientData clientData); +static ThreadSpecificData* TclGetTables (void); /* * Nested Tcl_Obj deletion management support @@ -428,7 +455,7 @@ TclFinalizeThreadObjects(void) #if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) Tcl_HashEntry *hPtr; Tcl_HashSearch hSearch; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TclGetTables(); Tcl_HashTable *tablePtr = tsdPtr->objThreadMap; if (tablePtr != NULL) { @@ -486,6 +513,313 @@ TclFinalizeObjects(void) } /* + *---------------------------------------------------------------------- + * + * TclGetTables -- + * + * This procedure is a helper which returns the thread-specific + * hash-table used to track continuation line information associated with + * Tcl_Obj*, and the objThreadMap, etc. + * + * Results: + * A reference to the thread-data. + * + * Side effects: + * May allocate memory for the thread-data. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +static ThreadSpecificData* +TclGetTables() +{ + /* + * Initialize the hashtable tracking invisible continuation lines. For + * the release we use a thread exit handler to ensure that this is done + * before TSD blocks are made invalid. The TclFinalizeObjects() which + * would be the natural place for this is invoked afterwards, meaning that + * we try to operate on a data structure already gone. + */ + + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + if (!tsdPtr->lineCLPtr) { + tsdPtr->lineCLPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); + Tcl_InitHashTable(tsdPtr->lineCLPtr, TCL_ONE_WORD_KEYS); + Tcl_CreateThreadExitHandler (TclThreadFinalizeObjects,NULL); +#if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) + tsdPtr->objThreadMap = NULL; +#endif /* TCL_MEM_DEBUG && TCL_THREADS */ + } + return tsdPtr; +} + +/* + *---------------------------------------------------------------------- + * + * TclContinuationsEnter -- + * + * This procedure is a helper which saves the continuation line + * information associated with a Tcl_Obj*. + * + * Results: + * A reference to the newly created continuation line location table. + * + * Side effects: + * Allocates memory for the table of continuation line locations. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +ContLineLoc* +TclContinuationsEnter(Tcl_Obj* objPtr, + int num, + int* loc) +{ + int newEntry; + ThreadSpecificData *tsdPtr = TclGetTables(); + Tcl_HashEntry* hPtr = + Tcl_CreateHashEntry (tsdPtr->lineCLPtr, (char*) objPtr, &newEntry); + + ContLineLoc* clLocPtr = + (ContLineLoc*) ckalloc (sizeof(ContLineLoc) + num*sizeof(int)); + + clLocPtr->num = num; + memcpy (&clLocPtr->loc, loc, num*sizeof(int)); + clLocPtr->loc[num] = CLL_END; /* Sentinel */ + Tcl_SetHashValue (hPtr, clLocPtr); + + return clLocPtr; +} + +/* + *---------------------------------------------------------------------- + * + * TclContinuationsEnterDerived -- + * + * This procedure is a helper which computes the continuation line + * information associated with a Tcl_Obj* cut from the middle of a + * script. + * + * Results: + * None. + * + * Side effects: + * Allocates memory for the table of continuation line locations. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +void +TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext) +{ + /* + * We have to handle invisible continuations lines here as well, despite + * the code we have in TclSubstTokens (TST) for that. Why ? Nesting. If + * our script is the sole argument to an 'eval' command, for example, the + * scriptCLLocPtr we are using was generated by a previous call to TST, + * and while the words we have here may contain continuation lines they + * are invisible already, and the inner call to TST had no bs+nl sequences + * to trigger its code. + * + * Luckily for us, the table we have to create here for the current word + * has to be a slice of the table currently in use, with the locations + * suitably modified to be relative to the start of the word instead of + * relative to the script. + * + * That is what we are doing now. Determine the slice we need, and if not + * empty, wrap it into a new table, and save the result into our + * thread-global hashtable, as usual. + */ + + /* + * First compute the range of the word within the script. + */ + + int length, end, num; + int* wordCLLast = clNext; + + Tcl_GetStringFromObj(objPtr, &length); + /* Is there a better way which doesn't shimmer ? */ + + end = start + length; /* first char after the word */ + + /* + * Then compute the table slice covering the range of + * the word. + */ + + while (*wordCLLast >= 0 && *wordCLLast < end) { + wordCLLast++; + } + + /* + * And generate the table from the slice, if it was + * not empty. + */ + + num = wordCLLast - clNext; + if (num) { + int i; + ContLineLoc* clLocPtr = + TclContinuationsEnter(objPtr, num, clNext); + + /* + * Re-base the locations. + */ + + for (i=0;iloc[i] -= start; + + /* + * Continuation lines coming before the string and affecting us + * should not happen, due to the proper maintenance of clNext + * during compilation. + */ + + if (clLocPtr->loc[i] < 0) { + Tcl_Panic("Derived ICL data for object using offsets from before the script"); + } + } + } +} + +/* + *---------------------------------------------------------------------- + * + * TclContinuationsCopy -- + * + * This procedure is a helper which copies the continuation line + * information associated with a Tcl_Obj* to another Tcl_Obj*. + * It is assumed that both contain the same string/script. Use + * this when a script is duplicated because it was shared. + * + * Results: + * None. + * + * Side effects: + * Allocates memory for the table of continuation line locations. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +void +TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr) +{ + ThreadSpecificData *tsdPtr = TclGetTables(); + Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char*) originObjPtr); + + if (hPtr) { + ContLineLoc* clLocPtr = (ContLineLoc*) Tcl_GetHashValue (hPtr); + + TclContinuationsEnter(objPtr, clLocPtr->num, clLocPtr->loc); + } +} + +/* + *---------------------------------------------------------------------- + * + * TclContinuationsGet -- + * + * This procedure is a helper which retrieves the continuation line + * information associated with a Tcl_Obj*, if it has any. + * + * Results: + * A reference to the continuation line location table, or NULL + * if the Tcl_Obj* has no such information associated with it. + * + * Side effects: + * None. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +ContLineLoc* +TclContinuationsGet(Tcl_Obj* objPtr) +{ + ThreadSpecificData *tsdPtr = TclGetTables(); + Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char*) objPtr); + + if (hPtr) { + return (ContLineLoc*) Tcl_GetHashValue (hPtr); + } else { + return NULL; + } +} + +/* + *---------------------------------------------------------------------- + * + * TclThreadFinalizeObjects -- + * + * This procedure is a helper which releases all continuation line + * information currently known. It is run as a thread exit handler. + * + * Results: + * None. + * + * Side effects: + * Releases memory. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +static void +TclThreadFinalizeObjects (ClientData clientData) +{ + /* + * Release the hashtable tracking invisible continuation lines. + */ + + Tcl_HashEntry *hPtr; + Tcl_HashSearch hSearch; + ThreadSpecificData *tsdPtr = TclGetTables(); + + for (hPtr = Tcl_FirstHashEntry(tsdPtr->lineCLPtr, &hSearch); + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&hSearch)) { + /* + * We are not using Tcl_EventuallyFree (as in TclFreeObj()) because + * here we can be sure that the compiler will not hold references to + * the data in the hashtable, and using TEF might bork the + * finalization sequence. + */ + ContLineLocFree (Tcl_GetHashValue (hPtr)); + Tcl_DeleteHashEntry (hPtr); + } + Tcl_DeleteHashTable (tsdPtr->lineCLPtr); + tsdPtr->lineCLPtr = NULL; +} + +/* + *---------------------------------------------------------------------- + * + * ContLineLocFree -- + * + * The freProc for continuation line location tables. + * + * Results: + * None. + * + * Side effects: + * Releases memory. + * + * TIP #280 + *---------------------------------------------------------------------- + */ + +static void +ContLineLocFree (char* clientData) +{ + ckfree (clientData); +} + +/* *-------------------------------------------------------------- * * Tcl_RegisterObjType -- @@ -677,7 +1011,7 @@ TclDbDumpActiveObjects( Tcl_HashSearch hSearch; Tcl_HashEntry *hPtr; Tcl_HashTable *tablePtr; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TclGetTables(); tablePtr = tsdPtr->objThreadMap; @@ -744,7 +1078,7 @@ TclDbInitNewObj( Tcl_HashTable *tablePtr; int isNew; ObjData *objData; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TclGetTables(); if (tsdPtr->objThreadMap == NULL) { tsdPtr->objThreadMap = (Tcl_HashTable *) @@ -1010,6 +1344,28 @@ TclFreeObj( } ObjDeletionUnlock(context); } + + /* + * We cannot use TclGetContinuationTable() here, because that may + * re-initialize the thread-data for calls coming after the + * finalization. We have to access it using the low-level call and then + * check for validity. This function can be called after + * TclFinalizeThreadData() has already killed the thread-global data + * structures. Performing TCL_TSD_INIT will leave us with an + * un-initialized memory block upon which we crash (if we where to access + * the uninitialized hashtable). + */ + + { + ThreadSpecificData* tsdPtr = TCL_TSD_INIT(&dataKey); + if (tsdPtr->lineCLPtr) { + Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char *) objPtr); + if (hPtr) { + Tcl_EventuallyFree (Tcl_GetHashValue (hPtr), ContLineLocFree); + Tcl_DeleteHashEntry (hPtr); + } + } + } } #else /* TCL_MEM_DEBUG */ @@ -1075,6 +1431,28 @@ TclFreeObj( ObjDeletionUnlock(context); } } + + /* + * We cannot use TclGetContinuationTable() here, because that may + * re-initialize the thread-data for calls coming after the + * finalization. We have to access it using the low-level call and then + * check for validity. This function can be called after + * TclFinalizeThreadData() has already killed the thread-global data + * structures. Performing TCL_TSD_INIT will leave us with an + * un-initialized memory block upon which we crash (if we where to access + * the uninitialized hashtable). + */ + + { + ThreadSpecificData* tsdPtr = TCL_TSD_INIT(&dataKey); + if (tsdPtr->lineCLPtr) { + Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char *) objPtr); + if (hPtr) { + Tcl_EventuallyFree (Tcl_GetHashValue (hPtr), ContLineLocFree); + Tcl_DeleteHashEntry (hPtr); + } + } + } } #endif @@ -3267,7 +3645,7 @@ Tcl_DbIncrRefCount( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TclGetTables(); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { @@ -3332,7 +3710,7 @@ Tcl_DbDecrRefCount( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TclGetTables(); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { @@ -3412,7 +3790,7 @@ Tcl_DbIsShared( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TclGetTables(); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { Tcl_Panic("object table not initialized"); diff --git a/generic/tclParse.c b/generic/tclParse.c index db64728..69cc830 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -1553,7 +1553,7 @@ Tcl_ParseVar( } code = TclSubstTokens(interp, parsePtr->tokenPtr, parsePtr->numTokens, - NULL, 1); + NULL, 1, NULL, NULL); TclStackFree(interp, parsePtr); if (code != TCL_OK) { return NULL; @@ -2062,7 +2062,7 @@ Tcl_SubstObj( endTokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; tokensLeft = parsePtr->numTokens; code = TclSubstTokens(interp, endTokenPtr - tokensLeft, tokensLeft, - &tokensLeft, 1); + &tokensLeft, 1, NULL, NULL); if (code == TCL_OK) { Tcl_FreeParse(parsePtr); TclStackFree(interp, parsePtr); @@ -2107,7 +2107,7 @@ Tcl_SubstObj( } code = TclSubstTokens(interp, endTokenPtr - tokensLeft, tokensLeft, - &tokensLeft, 1); + &tokensLeft, 1, NULL, NULL); } } @@ -2145,10 +2145,31 @@ TclSubstTokens( int *tokensLeftPtr, /* If not NULL, points to memory where an * integer representing the number of tokens * left to be substituted will be written */ - int line) /* The line the script starts on. */ + int line, /* The line the script starts on. */ + int* clNextOuter, /* Information about an outer context for */ + CONST char* outerScript) /* continuation line data. This is set by + * EvalEx() to properly handle [...]-nested + * commands. The 'outerScript' refers to the + * most-outer script containing the embedded + * command, which is refered to by 'script'. The + * 'clNextOuter' refers to the current entry in + * the table of continuation lines in this + * "master script", and the character offsets are + * relative to the 'outerScript' as well. + * + * If outerScript == script, then this call is for + * words in the outer-most script/command. See + * Tcl_EvalEx() and TclEvalObjEx() for the places + * generating arguments for which this is true. + */ { Tcl_Obj *result; int code = TCL_OK; +#define NUM_STATIC_POS 20 + int isLiteral, maxNumCL, numCL, i, adjust; + int* clPosition; + Interp* iPtr = (Interp*) interp; + int inFile = iPtr->evalFlags & TCL_EVAL_FILE; /* * Each pass through this loop will substitute one token, and its @@ -2160,6 +2181,31 @@ TclSubstTokens( * of Tcl_SetObjResult(interp, Tcl_GetObjResult(interp)) and omit them. */ + /* + * For the handling of continuation lines in literals we first check if + * this is actually a literal. For if not we can forego the additional + * processing. Otherwise we pre-allocate a small table to store the + * locations of all continuation lines we find in this literal, if + * any. The table is extended if needed. + */ + + numCL = 0; + maxNumCL = 0; + isLiteral = 1; + for (i=0 ; i < count; i++) { + if ((tokenPtr[i].type != TCL_TOKEN_TEXT) && + (tokenPtr[i].type != TCL_TOKEN_BS)) { + isLiteral = 0; + break; + } + } + + if (isLiteral) { + maxNumCL = NUM_STATIC_POS; + clPosition = (int*) ckalloc (maxNumCL*sizeof(int)); + } + + adjust = 0; result = NULL; for (; count>0 && code==TCL_OK ; count--, tokenPtr++) { Tcl_Obj *appendObj = NULL; @@ -2177,17 +2223,66 @@ TclSubstTokens( appendByteLength = Tcl_UtfBackslash(tokenPtr->start, NULL, utfCharBytes); append = utfCharBytes; + + /* + * If the backslash sequence we found is in a literal, and + * represented a continuation line, we compute and store its + * location (as char offset to the beginning of the _result_ + * script). We may have to extend the table of locations. + * + * Note that the continuation line information is relevant even if + * the word we are processing is not a literal, as it can affect + * nested commands. See the branch for TCL_TOKEN_COMMAND below, + * where the adjustment we are tracking here is taken into + * account. The good thing is that we do not need a table of + * everything, just the number of lines we have to add as + * correction. + */ + + if ((appendByteLength == 1) && (utfCharBytes[0] == ' ') && + (tokenPtr->start[1] == '\n')) { + if (isLiteral) { + int clPos; + if (result == 0) { + clPos = 0; + } else { + Tcl_GetStringFromObj(result, &clPos); + } + + if (numCL >= maxNumCL) { + maxNumCL *= 2; + clPosition = (int*) ckrealloc ((char*)clPosition, + maxNumCL*sizeof(int)); + } + clPosition[numCL] = clPos; + numCL ++; + } + adjust ++; + } break; case TCL_TOKEN_COMMAND: { - Interp *iPtr = (Interp *) interp; - /* TIP #280: Transfer line information to nested command */ iPtr->numLevels++; code = TclInterpReady(interp); if (code == TCL_OK) { + /* + * Test cases: info-30.{6,8,9} + */ + + int theline; + TclAdvanceContinuations (&line, &clNextOuter, + tokenPtr->start - outerScript); + theline = line + adjust; code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, - 0, line); + 0, theline, clNextOuter, outerScript); + /* + * Restore flag reset by nested eval for future bracketed + * commands and their cmdframe setup + */ + if (inFile) { + iPtr->evalFlags |= TCL_EVAL_FILE; + } } iPtr->numLevels--; TclResetCancellation(interp, 0); @@ -2205,7 +2300,7 @@ TclSubstTokens( */ code = TclSubstTokens(interp, tokenPtr+2, - tokenPtr->numComponents - 1, NULL, line); + tokenPtr->numComponents - 1, NULL, line, NULL, NULL); arrayIndex = Tcl_GetObjResult(interp); Tcl_IncrRefCount(arrayIndex); } @@ -2289,6 +2384,26 @@ TclSubstTokens( if (code != TCL_ERROR) { /* Keep error message in result! */ if (result != NULL) { Tcl_SetObjResult(interp, result); + /* + * If the code found continuation lines (which implies that this + * word is a literal), then we store the accumulated table of + * locations in the thread-global data structure for the bytecode + * compiler to find later, assuming that the literal is a script + * which will be compiled. + */ + + if (numCL) { + TclContinuationsEnter(result, numCL, clPosition); + } + + /* + * Release the temp table we used to collect the locations of + * continuation lines, if any. + */ + + if (maxNumCL) { + ckfree ((char*) clPosition); + } } else { Tcl_ResetResult(interp); } diff --git a/generic/tclProc.c b/generic/tclProc.c index 98784c3..12e19da 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.173 2009/07/16 21:24:40 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.174 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -440,8 +440,18 @@ TclCreateProc( */ if (Tcl_IsShared(bodyPtr)) { + Tcl_Obj* sharedBodyPtr = bodyPtr; + bytes = TclGetStringFromObj(bodyPtr, &length); bodyPtr = Tcl_NewStringObj(bytes, length); + + /* + * TIP #280. + * Ensure that the continuation line data for the original body is + * not lost and applies to the new body as well. + */ + + TclContinuationsCopy (bodyPtr, sharedBodyPtr); } /* @@ -2538,7 +2548,7 @@ SetLambdaFromAny( * location (line of 2nd list element). */ - TclListLines(name, contextPtr->line[1], 2, buf); + TclListLines(objPtr, contextPtr->line[1], 2, buf, NULL); cfPtr->level = -1; cfPtr->type = contextPtr->type; diff --git a/generic/tclVar.c b/generic/tclVar.c index 52eaf9f..ebd9d96 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.181 2009/07/23 23:01:59 andreas_kupries Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.182 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1876,6 +1876,9 @@ TclPtrSetVar( } else { if (Tcl_IsShared(oldValuePtr)) { /* Append to copy. */ varPtr->value.objPtr = Tcl_DuplicateObj(oldValuePtr); + + TclContinuationsCopy (varPtr->value.objPtr, oldValuePtr); + TclDecrRefCount(oldValuePtr); oldValuePtr = varPtr->value.objPtr; Tcl_IncrRefCount(oldValuePtr); /* Since var is ref */ diff --git a/tests/info.test b/tests/info.test index 53a0e76..65d71bc 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.64 2009/07/14 16:34:09 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.65 2009/08/25 21:03:25 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -767,7 +767,7 @@ test info-22.8 {info frame, basic trace} -match glob -body { * {type source line 765 file info.test cmd etrace proc ::tcltest::RunTest} * {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::RunTest}} -## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 + test info-23.0.0 {eval'd info frame} {!singleTestInterp} { eval {info frame} } 8 @@ -806,7 +806,7 @@ test info-23.6 {eval'd info frame, trace} -match glob -body { } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type eval line 1 cmd etrace proc ::tcltest::RunTest} * {type source line 805 file info.test cmd {eval $script} proc ::tcltest::RunTest}} -## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 + # ------------------------------------------------------------------------- # Procedures defined in scripts which are arguments to control @@ -1011,20 +1011,20 @@ test info-25.1 {info frame, regular proc} { rename bar {} # ------------------------------------------------------------------------- - -test info-30.0 {bs+nl in literal words} knownBug { +# More info-30.x test cases at the end of the file. +test info-30.0 {bs+nl in literal words} { if {1} { set res \ - [reduce [info frame 0]] + [reduce [info frame 0]];#1018 } set res - # This is reporting line 3 instead of the correct 4 because the + # This was reporting line 3 instead of the correct 4 because the # bs+nl combination is subst by the parser before the 'if' - # command, and the the bcc sees the word. To fix record the - # offsets of all bs+nl sequences in literal words, then use the - # information in the bcc to bump line numbers when parsing over - # the location. Also affected: testcases 22.8 and 23.6. -} {type eval line 4 cmd {info frame 0} proc ::tcltest::RunTest} + # command, and the bcc, see the word. Fixed by recording the + # offsets of all bs+nl sequences in literal words, then using the + # information in the bcc and other places to bump line numbers when + # parsing over the location. Also affected: testcases 22.8 and 23.6. +} {type source line 1018 file info.test cmd {info frame 0} proc ::tcltest::RunTest} # ------------------------------------------------------------------------- # See 24.0 - 24.5 for similar situations, using literal scripts. @@ -1436,6 +1436,279 @@ type source line 1427 file info.test cmd {info frame 0} proc ::foo::bar level 0 type source line 1428 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- +# Additional tests for info-30.*, handling of continuation lines (bs+nl sequences). + +test info-30.1 {bs+nl in literal words, procedure body, compiled} { + proc abra {} { + if {1} \ + { + return \ + [reduce [info frame 0]];# line 1446 + } + } + set res [abra] + rename abra {} + set res +} {type source line 1446 file info.test cmd {info frame 0} proc ::abra level 0} + +test info-30.2 {bs+nl in literal words, namespace script} { + namespace eval xxx { + set res \ + [reduce [info frame 0]];# line 1457 + } + set res +} {type source line 1457 file info.test cmd {info frame 0} level 0} + +test info-30.3 {bs+nl in literal words, namespace multi-word script} { + namespace eval xxx set res \ + [list [reduce [info frame 0]]];# line 1464 + set res +} {type source line 1464 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.4 {bs+nl in literal words, eval script} { + eval { + set ::res \ + [reduce [info frame 0]];# line 1471 + } + set res +} {type source line 1471 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.5 {bs+nl in literal words, eval script, with nested words} { + eval { + if {1} \ + { + set ::res \ + [reduce [info frame 0]];# line 1481 + } + } + set res +} {type source line 1481 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.6 {bs+nl in computed word} { + set res "\ +[reduce [info frame 0]]";# line 1489 +} { type source line 1489 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.7 {bs+nl in computed word, in proc} { + proc abra {} { + return "\ +[reduce [info frame 0]]";# line 1495 + } + set res [abra] + rename abra {} + set res +} { type source line 1495 file info.test cmd {info frame 0} proc ::abra level 0} + +test info-30.8 {bs+nl in computed word, nested eval} { + eval { + set \ + res "\ +[reduce [info frame 0]]";# line 1506 +} +} { type source line 1506 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.9 {bs+nl in computed word, nested eval} { + eval { + set \ + res "\ +[reduce \ + [info frame 0]]";# line 1515 +} +} { type source line 1515 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.10 {bs+nl in computed word, key to array} { + set tmp([set \ + res "\ +[reduce \ + [info frame 0]]"]) x ; #1523 + unset tmp + set res +} { type source line 1523 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.11 {bs+nl in subst arguments, no true counting} { + subst {[set \ + res "\ +[reduce \ + [info frame 0]]"]} +} { type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.12 {bs+nl in computed word, nested eval} { + eval { + set \ + res "\ +[set x {}] \ +[reduce \ + [info frame 0]]";# line 1541 +} +} { type source line 1541 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.13 {bs+nl in literal words, uplevel script, with nested words} { + uplevel #0 { + if {1} \ + { + set ::res \ + [reduce [info frame 0]];# line 1550 + } + } + set res +} {type source line 1550 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.14 {bs+nl, literal word, uplevel through proc} { + proc abra {script} { + uplevel 1 $script + } + set res [abra { + return "\ +[reduce [info frame 0]]";# line 1562 + }] + rename abra {} + set res +} { type source line 1562 file info.test cmd {info frame 0} proc ::abra} + +test info-30.15 {bs+nl in literal words, nested proc body, compiled} { + proc a {} { + proc b {} { + if {1} \ + { + return \ + [reduce [info frame 0]];# line 1574 + } + } + } + a ; set res [b] + rename a {} + rename b {} + set res +} {type source line 1574 file info.test cmd {info frame 0} proc ::b level 0} + +test info-30.16 {bs+nl in multi-body switch, compiled} { + proc a {value} { + switch -regexp -- $value \ + ^key { info frame 0; # 1587 } \ + \t### { info frame 0; # 1588 } \ + {[0-9]*} { info frame 0; # 1589 } + } + set res {} + lappend res [reduce [a {key }]] + lappend res [reduce [a {1alpha}]] + set res "\n[join $res \n]" +} { +type source line 1587 file info.test cmd {info frame 0} proc ::a level 0 +type source line 1589 file info.test cmd {info frame 0} proc ::a level 0} + +test info-30.17 {bs+nl in multi-body switch, direct} { + switch -regexp -- {key } \ + ^key { reduce [info frame 0] ;# 1601 } \ + \t### { } \ + {[0-9]*} { } +} {type source line 1601 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.18 {bs+nl, literal word, uplevel through proc, appended, loss of primary tracking data} { + proc abra {script} { + append script "\n# end of script" + uplevel 1 $script + } + set res [abra { + return "\ +[reduce [info frame 0]]";# line 1613, still line of 3 appended script + }] + rename abra {} + set res +} { type eval line 3 cmd {info frame 0} proc ::abra} +# { type source line 1606 file info.test cmd {info frame 0} proc ::abra} + +test info-30.19 {bs+nl in single-body switch, compiled} { + proc a {value} { + switch -regexp -- $value { + ^key { reduce \ + [info frame 0] } + \t { reduce \ + [info frame 0] } + {[0-9]*} { reduce \ + [info frame 0] } + } + } + set res {} + lappend res [a {key }] + lappend res [a {1alpha}] + set res "\n[join $res \n]" +} { +type source line 1624 file info.test cmd {info frame 0} proc ::a level 0 +type source line 1628 file info.test cmd {info frame 0} proc ::a level 0} + +test info-30.20 {bs+nl in single-body switch, direct} { + switch -regexp -- {key } { \ + + ^key { reduce \ + [info frame 0] } + \t### { } + {[0-9]*} { } + } +} {type source line 1643 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + +test info-30.21 {bs+nl in if, full compiled} { + proc a {value} { + if {$value} \ + {info frame 0} \ + {info frame 0} ; # 1653 + } + set res {} + lappend res [reduce [a 1]] + lappend res [reduce [a 0]] + set res "\n[join $res \n]" +} { +type source line 1652 file info.test cmd {info frame 0} proc ::a level 0 +type source line 1653 file info.test cmd {info frame 0} proc ::a level 0} + +test info-30.22 {bs+nl in computed word, key to array, compiled} { + proc a {} { + set tmp([set \ + res "\ +[reduce \ + [info frame 0]]"]) x ; #1668 + unset tmp + set res + } + set res [a] + rename a {} + set res +} { type source line 1668 file info.test cmd {info frame 0} proc ::a level 0} + +test info-30.23 {bs+nl in multi-body switch, full compiled} { + proc a {value} { + switch -exact -- $value \ + key { info frame 0; # 1680 } \ + xxx { info frame 0; # 1681 } \ + 000 { info frame 0; # 1682 } + } + set res {} + lappend res [reduce [a key]] + lappend res [reduce [a 000]] + set res "\n[join $res \n]" +} { +type source line 1680 file info.test cmd {info frame 0} proc ::a level 0 +type source line 1682 file info.test cmd {info frame 0} proc ::a level 0} + +test info-30.24 {bs+nl in single-body switch, full compiled} { + proc a {value} { + switch -exact -- $value { + key { reduce \ + [info frame 0] } + xxx { reduce \ + [info frame 0] } + 000 { reduce \ + [info frame 0] } + } + } + set res {} + lappend res [a key] + lappend res [a 000] + set res "\n[join $res \n]" +} { +type source line 1696 file info.test cmd {info frame 0} proc ::a level 0 +type source line 1700 file info.test cmd {info frame 0} proc ::a level 0} + +# ------------------------------------------------------------------------- # cleanup catch {namespace delete test_ns_info1 test_ns_info2} -- cgit v0.12 From 9302cb822e80f3566365632db5bdbb88469866e1 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 25 Aug 2009 23:20:36 +0000 Subject: fix warnings --- generic/tclCompile.c | 4 ++-- generic/tclParse.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclCompile.c b/generic/tclCompile.c index a0ac9d3..970c1ef 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.171 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.172 2009/08/25 23:20:36 das Exp $ */ #include "tclInt.h" @@ -1691,7 +1691,7 @@ TclCompileTokens( unsigned char *entryCodeNext = envPtr->codeNext; #define NUM_STATIC_POS 20 int isLiteral, maxNumCL, numCL; - int* clPosition; + int *clPosition = NULL; /* * For the handling of continuation lines in literals we first check if diff --git a/generic/tclParse.c b/generic/tclParse.c index 69cc830..aca6048 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -2167,7 +2167,7 @@ TclSubstTokens( int code = TCL_OK; #define NUM_STATIC_POS 20 int isLiteral, maxNumCL, numCL, i, adjust; - int* clPosition; + int *clPosition = NULL; Interp* iPtr = (Interp*) interp; int inFile = iPtr->evalFlags & TCL_EVAL_FILE; -- cgit v0.12 From 0dafa2ef355723cf20e2f300e00ac2ea12f52317 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 25 Aug 2009 23:49:39 +0000 Subject: guard clang analyzer Tcl_Panic annotation with #ifndef USE_TCL_STUBS --- generic/tclInt.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 6443c6f..d19442d 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.437 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.438 2009/08/25 23:49:39 das Exp $ */ #ifndef _TCLINT @@ -4296,7 +4296,10 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT) #include #define CLANG_ASSERT(x) assert(x) -EXTERN void Tcl_Panic(const char * format, ...) __attribute__((analyzer_noreturn)); +#ifndef USE_TCL_STUBS +EXTERN void Tcl_Panic(const char * format, ...) + __attribute__((analyzer_noreturn)); +#endif #elif !defined(CLANG_ASSERT) #define CLANG_ASSERT(x) #endif -- cgit v0.12 From c664b11f1bbac55099085e6d49731f0c023bb7d6 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 27 Aug 2009 19:34:24 +0000 Subject: * generic/tclStringObj.c: A few more string overflow cases in [format]. [Bug 2845535] --- ChangeLog | 5 +++++ generic/tclStringObj.c | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b3e396..17e91fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-27 Don Porter + + * generic/tclStringObj.c: A few more string overflow cases in + [format]. [Bug 2845535] + 2009-08-25 Andreas Kupries * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard, diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 9ba62f5..8b33fe1 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.128 2009/07/31 16:55:58 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.129 2009/08/27 19:34:24 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2218,6 +2218,10 @@ Tcl_AppendFormatToObj( if (gotPrecision) { *p++ = '.'; p += sprintf(p, "%d", precision); + if (precision > INT_MAX - length) { + msg=overflow; + goto errorMsg; + } length += precision; } @@ -2230,9 +2234,15 @@ Tcl_AppendFormatToObj( segment = Tcl_NewObj(); allocSegment = 1; - Tcl_SetObjLength(segment, length); + if (!Tcl_AttemptSetObjLength(segment, length)) { + msg = overflow; + goto errorMsg; + } bytes = TclGetString(segment); - Tcl_SetObjLength(segment, sprintf(bytes, spec, d)); + if (!Tcl_AttemptSetObjLength(segment, sprintf(bytes, spec, d))) { + msg = overflow; + goto errorMsg; + } break; } default: -- cgit v0.12 From f79643279e56c8e153c9ece42f9cf83b88e817f5 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 28 Aug 2009 23:04:09 +0000 Subject: workaround llvm LTO bug on ppc --- macosx/Tcl.xcodeproj/project.pbxproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index 1b22535..1882eb8 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -921,7 +921,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); - comments = "Copyright (c) 2004-2009 Daniel A. Steffen \nCopyright 2008-2009, Apple Inc.\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.44 2009/06/26 18:14:25 das Exp $\n"; + comments = "Copyright (c) 2004-2009 Daniel A. Steffen \nCopyright 2008-2009, Apple Inc.\n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id: project.pbxproj,v 1.45 2009/08/28 23:04:09 das Exp $\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -2679,6 +2679,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; GCC = "llvm-gcc"; GCC_OPTIMIZATION_LEVEL = 4; + "GCC_OPTIMIZATION_LEVEL[arch=ppc]" = s; GCC_VERSION = com.apple.compilers.llvmgcc42; MACOSX_DEPLOYMENT_TARGET = 10.6; PREBINDING = NO; -- cgit v0.12 From d4ddb3cf109ed11eb4f01f7a5d8e0f17fd722c6a Mon Sep 17 00:00:00 2001 From: das Date: Sun, 30 Aug 2009 19:18:39 +0000 Subject: add "error:" to -verbose line test failure output to satisfy stricter log parsers like Xcode 3.2 --- library/tcltest/tcltest.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index f363c80..64a9c08 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.104 2009/04/08 16:05:15 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.105 2009/08/30 19:18:39 das Exp $ package require Tcl 8.5 ;# -verbose line uses [info frame] namespace eval tcltest { @@ -2104,7 +2104,7 @@ proc tcltest::test {name description args} { } } if {[info exists testLine]} { - puts [outputChannel] "$testFile:$testLine: test failed:\ + puts [outputChannel] "$testFile:$testLine: error: test failed:\ $name [string trim $description]" } } -- cgit v0.12 From fba4c630a694890fb444eb5ca69f54ebc2bc4c13 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 1 Sep 2009 14:13:23 +0000 Subject: * library/tcltest/tcltest.tcl: Bump to tcltest 2.3.2 after revision * library/tcltest/pkgIndex.tcl: to verbose error message. * unix/Makefile.in: * win/Makefile.in: --- ChangeLog | 7 +++++++ library/tcltest/pkgIndex.tcl | 2 +- library/tcltest/tcltest.tcl | 4 ++-- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17e91fb..6a59a01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-09-01 Don Porter + + * library/tcltest/tcltest.tcl: Bump to tcltest 2.3.2 after revision + * library/tcltest/pkgIndex.tcl: to verbose error message. + * unix/Makefile.in: + * win/Makefile.in: + 2009-08-27 Don Porter * generic/tclStringObj.c: A few more string overflow cases in diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl index 5b33ac7..fe80272 100644 --- a/library/tcltest/pkgIndex.tcl +++ b/library/tcltest/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded tcltest 2.3.1 [list source [file join $dir tcltest.tcl]] +package ifneeded tcltest 2.3.2 [list source [file join $dir tcltest.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 64a9c08..1bfbaa9 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.105 2009/08/30 19:18:39 das Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.106 2009/09/01 14:13:23 dgp Exp $ package require Tcl 8.5 ;# -verbose line uses [info frame] namespace eval tcltest { @@ -24,7 +24,7 @@ namespace eval tcltest { # When the version number changes, be sure to update the pkgIndex.tcl file, # and the install directory in the Makefiles. When the minor version # changes (new feature) be sure to update the man page as well. - variable Version 2.3.1 + variable Version 2.3.2 # Compatibility support for dumb variables defined in tcltest 1 # Do not use these. Call [package provide Tcl] and [info patchlevel] diff --git a/unix/Makefile.in b/unix/Makefile.in index 8d56305..044b156 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.274 2009/07/23 23:02:00 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.275 2009/09/01 14:13:23 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -829,8 +829,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs done; @echo "Installing package msgcat 1.4.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.4.2.tm; - @echo "Installing package tcltest 2.3.1 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.1.tm; + @echo "Installing package tcltest 2.3.2 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.2.tm; @echo "Installing package platform 1.0.5 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.5.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 4b9c6df..ab56d80 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.159 2009/07/26 07:57:57 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.160 2009/09/01 14:13:23 dgp Exp $ VERSION = @TCL_VERSION@ @@ -710,8 +710,8 @@ install-libraries: libraries install-tzdata install-msgs done; @echo "Installing package msgcat 1.4.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm; - @echo "Installing package tcltest 2.3.1 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.1.tm; + @echo "Installing package tcltest 2.3.2 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.2.tm; @echo "Installing package platform 1.0.5 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.5.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; -- cgit v0.12 From e2f9593018e694ea4db44610c096ba4df5a3a3d3 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 1 Sep 2009 17:31:53 +0000 Subject: * generic/tclIORTrans.c (ReflectInput): Remove error response to 0-result from method 'limit?' of transformations. Return the number of copied bytes instead, which is possibly nothing. The latter then triggers EOF handling in the higher layers, making the 0-result of limit? the way to inject artificial EOF's into the data stream. --- ChangeLog | 9 +++++++++ generic/tclIORTrans.c | 7 ++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a59a01..85fcec9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-09-01 Andreas Kupries + + * generic/tclIORTrans.c (ReflectInput): Remove error response to + 0-result from method 'limit?' of transformations. Return the + number of copied bytes instead, which is possibly nothing. The + latter then triggers EOF handling in the higher layers, making the + 0-result of limit? the way to inject artificial EOF's into the + data stream. + 2009-09-01 Don Porter * library/tcltest/tcltest.tcl: Bump to tcltest 2.3.2 after revision diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 2cf38b1..cb91829 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.8 2009/01/22 00:11:24 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.9 2009/09/01 17:31:53 andreas_kupries Exp $ */ #include @@ -424,8 +424,6 @@ static void DeleteReflectedTransformMap(ClientData clientData, * list-quoting to keep the words of the message together. See also [x]. */ -static const char *msg_read_badlimit = - "{Tcl driver returned bad read limit '0'}"; static const char *msg_read_unsup = "{read not supported by Tcl driver}"; static const char *msg_write_unsup = "{write not supported by Tcl driver}"; #ifdef TCL_THREADS @@ -1112,8 +1110,7 @@ ReflectInput( return -1; } if (maxRead == 0) { - SetChannelErrorStr(rtPtr->chan, msg_read_badlimit); - return -1; + return gotBytes; } else if (maxRead > 0) { if (maxRead < toRead) { toRead = maxRead; -- cgit v0.12 From 26c688888436fd83e093f6bdb0f200234902d0ee Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 3 Sep 2009 08:01:22 +0000 Subject: Add xref to script-level documentation --- doc/TraceVar.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/TraceVar.3 b/doc/TraceVar.3 index 65fa9a7..7ba525d 100644 --- a/doc/TraceVar.3 +++ b/doc/TraceVar.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TraceVar.3,v 1.21 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: TraceVar.3,v 1.22 2009/09/03 08:01:22 dkf Exp $ '\" .so man.macros .TH Tcl_TraceVar 3 7.4 Tcl "Tcl Library Procedures" @@ -376,5 +376,7 @@ set. .PP Array traces are not yet integrated with the Tcl \fBinfo exists\fR command, nor is there Tcl-level access to array traces. +.SH "SEE ALSO" +trace(n) .SH KEYWORDS clientData, trace, variable -- cgit v0.12 From bf275faafb5e7f06980740056beb289feda2af67 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 3 Sep 2009 08:07:07 +0000 Subject: Added suggestions for how to handle the multithreaded case. [Bug 2844962] --- ChangeLog | 40 ++++++++++++++++++++++------------------ doc/LinkVar.3 | 13 ++++++++++++- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85fcec9..c913e45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,15 @@ +2009-09-03 Donal K. Fellows + + * doc/LinkVar.3: [Bug 2844962]: Added documentation of issues relating + to use of this API in a multi-threaded environment. + 2009-09-01 Andreas Kupries * generic/tclIORTrans.c (ReflectInput): Remove error response to - 0-result from method 'limit?' of transformations. Return the - number of copied bytes instead, which is possibly nothing. The - latter then triggers EOF handling in the higher layers, making the - 0-result of limit? the way to inject artificial EOF's into the - data stream. + 0-result from method 'limit?' of transformations. Return the number of + copied bytes instead, which is possibly nothing. The latter then + triggers EOF handling in the higher layers, making the 0-result of + limit? the way to inject artificial EOF's into the data stream. 2009-09-01 Don Porter @@ -16,32 +20,32 @@ 2009-08-27 Don Porter - * generic/tclStringObj.c: A few more string overflow cases in - [format]. [Bug 2845535] + * generic/tclStringObj.c: [Bug 2845535]: A few more string + overflow cases in [format]. 2009-08-25 Andreas Kupries - * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard, - Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): + * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard) + (Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): - * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, - TclFreeCompileEnv, TclCompileScript, TclCompileTokens): + * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv) + (TclFreeCompileEnv, TclCompileScript, TclCompileTokens): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): - * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, - TclThreadFinalizeObjects, TclInitObjSubsystem, - TclContinuationsEnter, TclContinuationsEnterDerived, - TclContinuationsCopy, TclContinuationsGet, TclFreeObj): + * generic/tclObj.c (ThreadSpecificData, ContLineLocFree) + (TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, + (TclContinuationsEnterDerived, TclContinuationsCopy, TclFreeObj) + (TclContinuationsGet): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended the parser, compiler, and execution engine with code and - attendant data structures tracking the position of continuation - lines which are not visible in the resulting script Tcl_Obj*'s, to - properly account for them while counting lines for #280. + attendant data structures tracking the position of continuation lines + which are not visible in the resulting script Tcl_Obj*'s, to properly + account for them while counting lines for #280. 2009-08-24 Daniel Steffen diff --git a/doc/LinkVar.3 b/doc/LinkVar.3 index ad6d5f6..5ff0565 100644 --- a/doc/LinkVar.3 +++ b/doc/LinkVar.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: LinkVar.3,v 1.17 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: LinkVar.3,v 1.18 2009/09/03 08:07:07 dkf Exp $ '\" .so man.macros .TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures" @@ -194,5 +194,16 @@ Tk widget that wishes to display the value of the variable), the trace will not trigger when the C variable has changed. \fBTcl_UpdateLinkedVar\fR ensures that any traces on the Tcl variable are invoked. +.PP +Note that, as with any call to a Tcl interpreter, \fBTcl_UpdateLinkedVar\fR +must be called from the same thread that created the interpreter. The safest +mechanism is to ensure that the C variable is only ever updated from the same +thread that created the interpreter (possibly in response to an event posted +with \fBTcl_ThreadQueueEvent\fR), but when it is necessary to update the +variable in a separate thread, it is advised that \fBTcl_AsyncMark\fR be used +to indicate to the thread hosting the interpreter that it is ready to run +\fBTcl_UpdateLinkedVar\fR. +.SH "SEE ALSO" +Tcl_TraceVar(3) .SH KEYWORDS boolean, integer, link, read-only, real, string, traces, variable -- cgit v0.12 From 923c5dca54d5508b1fe4ca3f9b388545ffcba1ba Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 4 Sep 2009 09:38:20 +0000 Subject: Improve consistency of formatting of comments and function decls --- generic/tclInt.h | 92 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index d19442d..dd073d2 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.438 2009/08/25 23:49:39 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.439 2009/09/04 09:38:20 dkf Exp $ */ #ifndef _TCLINT @@ -970,8 +970,8 @@ typedef struct ActiveInterpTrace { * TCL_TRACE_LEAVE_EXEC - triggers leave/leavestep traces. * - passed to Tcl_CreateObjTrace to set up * "leavestep" traces. - * */ + #define TCL_TRACE_ENTER_EXEC 1 #define TCL_TRACE_LEAVE_EXEC 2 @@ -1073,10 +1073,9 @@ typedef struct CallFrame { * specify. */ LocalCache *localCachePtr; struct TEOV_callback *tailcallPtr; - /* The callback implementing the call to be + /* The callback implementing the call to be * executed by the command that pushed this - * frame. - */ + * frame. */ } CallFrame; #define FRAME_IS_PROC 0x1 @@ -1123,10 +1122,11 @@ typedef struct CmdFrame { CallFrame *framePtr; /* Procedure activation record, may be * NULL. */ struct CmdFrame *nextPtr; /* Link to calling frame. */ - const struct CFWordBC* litarg; /* Link to set of literal arguments which - * have ben pushed on the lineLABCPtr stack - * by TclArgumentBCEnter(). These will be - * removed by TclArgumentBCRelease. */ + const struct CFWordBC *litarg; + /* Link to set of literal arguments which have + * ben pushed on the lineLABCPtr stack by + * TclArgumentBCEnter(). These will be removed + * by TclArgumentBCRelease. */ /* * Data needed for Eval vs TEBC * @@ -1184,14 +1184,14 @@ typedef struct CFWord { } CFWord; typedef struct CFWordBC { - Tcl_Obj* obj; /* Back reference to hashtable key */ + Tcl_Obj *obj; /* Back reference to hashtable key */ CmdFrame *framePtr; /* CmdFrame to access. */ int pc; /* Instruction pointer of a command in * ExtCmdLoc.loc[.] */ int word; /* Index of word in * ExtCmdLoc.loc[cmd]->line[.] */ - struct CFWordBC* prevPtr; /* Previous entry in stack for same Tcl_Obj */ - struct CFWordBC* nextPtr; /* Next entry for same command call. See + struct CFWordBC *prevPtr; /* Previous entry in stack for same Tcl_Obj. */ + struct CFWordBC *nextPtr; /* Next entry for same command call. See * CmdFrame litarg field for the list start. */ } CFWordBC; @@ -1213,16 +1213,17 @@ typedef struct CFWordBC { * the function TclThreadFinalizeObjects(), in the same file. */ -#define CLL_END (-1) +#define CLL_END (-1) typedef struct ContLineLoc { - int num; /* Number of entries in loc, not counting the final -1 - * marker entry */ - int loc[1]; /* Table of locations, as character offsets. The table - * is allocated as part of the structure, i.e. the loc - * array extends behind the nominal end of the - * structure. An entry containing the value -1 is put - * after the last location, as end-marker/sentinel. */ + int num; /* Number of entries in loc, not counting the + * final -1 marker entry. */ + int loc[1]; /* Table of locations, as character offsets. + * The table is allocated as part of the + * structure, extending behind the nominal end + * of the structure. An entry containing the + * value -1 is put after the last location, as + * end-marker/sentinel. */ } ContLineLoc; /* @@ -2013,8 +2014,7 @@ typedef struct Interp { * invoking command. Alt view: An index to the * CmdFrame stack keyed by command argument * holders. */ - ContLineLoc* scriptCLLocPtr; - /* This table points to the location data for + ContLineLoc *scriptCLLocPtr;/* This table points to the location data for * invisible continuation lines in the script, * if any. This pointer is set by the function * TclEvalObjEx() in file "tclBasic.c", and @@ -2069,12 +2069,11 @@ typedef struct Interp { * and setup. */ struct TEOV_callback *deferredCallbacks; - /* Callbacks that are set previous to a call + /* Callbacks that are set previous to a call * to some Eval function but that actually * belong to the command that is about to be - * called - ie, they should be run *before* - * any tailcall is invoked. - */ + * called - i.e., they should be run *before* + * any tailcall is invoked. */ #ifdef TCL_COMPILE_STATS /* @@ -2143,7 +2142,7 @@ typedef struct InterpList { #define TCL_ALLOW_EXCEPTIONS 4 #define TCL_EVAL_FILE 2 #define TCL_EVAL_CTX 8 -#define TCL_EVAL_REDIRECT 16 +#define TCL_EVAL_REDIRECT 16 /* * Flag bits for Interp structures: @@ -2691,7 +2690,7 @@ typedef struct ForIterData { MODULE_SCOPE int TclNREvalCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp); -MODULE_SCOPE void TclAdvanceContinuations(int* line, int** next, int loc); +MODULE_SCOPE void TclAdvanceContinuations(int *line, int **next, int loc); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp, @@ -2699,7 +2698,7 @@ MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp, MODULE_SCOPE void TclArgumentRelease(Tcl_Interp *interp, Tcl_Obj *objv[], int objc); MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp *interp, - Tcl_Obj* objv[], int objc, + Tcl_Obj *objv[], int objc, void *codePtr, CmdFrame *cfPtr, int pc); MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp *interp, CmdFrame *cfPtr); @@ -2719,16 +2718,19 @@ MODULE_SCOPE int TclClearRootEnsemble(ClientData data[], Tcl_Interp *interp, int result); MODULE_SCOPE void TclCleanupLiteralTable(Tcl_Interp *interp, LiteralTable *tablePtr); -MODULE_SCOPE ContLineLoc* TclContinuationsEnter(Tcl_Obj* objPtr, int num, int* loc); -MODULE_SCOPE void TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext); -MODULE_SCOPE ContLineLoc* TclContinuationsGet(Tcl_Obj* objPtr); -MODULE_SCOPE void TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr); +MODULE_SCOPE ContLineLoc* TclContinuationsEnter(Tcl_Obj *objPtr, int num, + int *loc); +MODULE_SCOPE void TclContinuationsEnterDerived(Tcl_Obj *objPtr, + int start, int *clNext); +MODULE_SCOPE ContLineLoc* TclContinuationsGet(Tcl_Obj *objPtr); +MODULE_SCOPE void TclContinuationsCopy(Tcl_Obj *objPtr, + Tcl_Obj *originObjPtr); MODULE_SCOPE int TclDoubleDigits(char *buf, double value, int *signum); MODULE_SCOPE void TclDeleteNamespaceVars(Namespace *nsPtr); /* TIP #280 - Modified token based evulation, with line information. */ MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script, int numBytes, int flags, int line, - int* clNextOuter, CONST char* outerScript); + int *clNextOuter, const char *outerScript); MODULE_SCOPE int TclFileAttrsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int TclFileCopyCmd(Tcl_Interp *interp, @@ -2739,10 +2741,10 @@ MODULE_SCOPE int TclFileMakeDirsCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int TclFileRenameCmd(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -MODULE_SCOPE void TclCreateLateExitHandler (Tcl_ExitProc * proc, - ClientData clientData); -MODULE_SCOPE void TclDeleteLateExitHandler (Tcl_ExitProc * proc, - ClientData clientData); +MODULE_SCOPE void TclCreateLateExitHandler(Tcl_ExitProc *proc, + ClientData clientData); +MODULE_SCOPE void TclDeleteLateExitHandler(Tcl_ExitProc *proc, + ClientData clientData); MODULE_SCOPE void TclFinalizeAllocSubsystem(void); MODULE_SCOPE void TclFinalizeAsync(void); MODULE_SCOPE void TclFinalizeDoubleConversion(void); @@ -2823,7 +2825,7 @@ MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, int indexCount, Tcl_Obj *const indexArray[]); /* TIP #280 */ MODULE_SCOPE void TclListLines(Tcl_Obj *listObj, int line, int n, - int *lines, Tcl_Obj* const* elems); + int *lines, Tcl_Obj *const *elems); MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr); MODULE_SCOPE int TclLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, int symc, const char *symbols[], @@ -2950,7 +2952,7 @@ MODULE_SCOPE int TclStringMatchObj(Tcl_Obj *stringObj, MODULE_SCOPE Tcl_Obj * TclStringObjReverse(Tcl_Obj *objPtr); MODULE_SCOPE int TclSubstTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, int *tokensLeftPtr, int line, - int* clNextOuter, CONST char* outerScript); + int *clNextOuter, const char *outerScript); MODULE_SCOPE Tcl_Obj * TclpNativeToNormalized(ClientData clientData); MODULE_SCOPE Tcl_Obj * TclpFilesystemPathType(Tcl_Obj *pathPtr); MODULE_SCOPE Tcl_PackageInitProc *TclpFindSymbol(Tcl_Interp *interp, @@ -3593,7 +3595,7 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr); #ifdef USE_DTRACE #ifndef _TCLDTRACE_H -typedef const char* TclDTraceStr; +typedef const char *TclDTraceStr; #include "tclDTrace.h" #endif #define TCL_DTRACE_OBJ_CREATE(objPtr) TCL_OBJ_CREATE(objPtr) @@ -3912,10 +3914,10 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, /* *---------------------------------------------------------------- - * Macro counterpart of the Tcl_NumUtfChars() function. To be used - * in speed-sensitive points where it pays to avoid a function call - * in the common case of counting along a string of all one-byte characters. - * The ANSI C "prototype" for this macro is: + * Macro counterpart of the Tcl_NumUtfChars() function. To be used in speed- + * -sensitive points where it pays to avoid a function call in the common case + * of counting along a string of all one-byte characters. The ANSI C + * "prototype" for this macro is: * * MODULE_SCOPE void TclNumUtfChars(int numChars, const char *bytes, * int numBytes); -- cgit v0.12 From ec6f24d1c6194c2ea9a6a128f03ec6ef8c5e3e3b Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 4 Sep 2009 17:33:11 +0000 Subject: * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecode * generic/tclBasic.c: compiler routine for the [subst] command. * generic/tclCmdMZ.c: This is a partial solution to the need to * generic/tclCompile.c: NR-enable [subst] since bytecode execution is * generic/tclCompile.h: already NR-enabled. [Bug 2314561] Two new * generic/tclExecute.c: bytecode instructions, INST_NOP and * generic/tclInt.h: INST_RETURN_CODE_BRANCH were added to support * generic/tclParse.c: the new routine. INST_RETURN_CODE_BRANCH is * tests/basic.test: likely to be useful in any future effort to * tests/info.test: add a bytecode compiler routine for [try]. * tests/parse.test: --- ChangeLog | 14 +++ generic/tclBasic.c | 4 +- generic/tclCmdMZ.c | 50 ++++++---- generic/tclCompCmds.c | 271 +++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclCompile.c | 172 +++++++++++++++++++------------- generic/tclCompile.h | 10 +- generic/tclExecute.c | 21 +++- generic/tclInt.h | 10 +- generic/tclParse.c | 61 +++++++----- tests/basic.test | 4 +- tests/info.test | 123 ++++++++++++++++++++++- tests/parse.test | 8 +- 12 files changed, 616 insertions(+), 132 deletions(-) diff --git a/ChangeLog b/ChangeLog index c913e45..eb36290 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-09-04 Don Porter + + * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecode + * generic/tclBasic.c: compiler routine for the [subst] command. + * generic/tclCmdMZ.c: This is a partial solution to the need to + * generic/tclCompile.c: NR-enable [subst] since bytecode execution is + * generic/tclCompile.h: already NR-enabled. [Bug 2314561] Two new + * generic/tclExecute.c: bytecode instructions, INST_NOP and + * generic/tclInt.h: INST_RETURN_CODE_BRANCH were added to support + * generic/tclParse.c: the new routine. INST_RETURN_CODE_BRANCH is + * tests/basic.test: likely to be useful in any future effort to + * tests/info.test: add a bytecode compiler routine for [try]. + * tests/parse.test: + 2009-09-03 Donal K. Fellows * doc/LinkVar.3: [Bug 2844962]: Added documentation of issues relating diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d97194c..b5abbc2 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.402 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.403 2009/09/04 17:33:11 dgp Exp $ */ #include "tclInt.h" @@ -213,7 +213,7 @@ static const CmdInfo builtInCmds[] = { {"scan", Tcl_ScanObjCmd, NULL, NULL, 1}, {"set", Tcl_SetObjCmd, TclCompileSetCmd, NULL, 1}, {"split", Tcl_SplitObjCmd, NULL, NULL, 1}, - {"subst", Tcl_SubstObjCmd, NULL, NULL, 1}, + {"subst", Tcl_SubstObjCmd, TclCompileSubstCmd, NULL, 1}, {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, TclNRSwitchObjCmd, 1}, {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 2cce7be..a5a2f1b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.191 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.192 2009/09/04 17:33:11 dgp Exp $ */ #include "tclInt.h" @@ -3373,30 +3373,24 @@ TclInitStringCmd( */ int -Tcl_SubstObjCmd( - ClientData dummy, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ +TclSubstOptions( + Tcl_Interp *interp, + int numOpts, + Tcl_Obj *const opts[], + int *flagPtr) { static const char *const substOptions[] = { "-nobackslashes", "-nocommands", "-novariables", NULL }; - enum substOptions { + enum { SUBST_NOBACKSLASHES, SUBST_NOCOMMANDS, SUBST_NOVARS }; - Tcl_Obj *resultPtr; - int flags, i; + int i, flags = TCL_SUBST_ALL; - /* - * Parse command-line options. - */ - - flags = TCL_SUBST_ALL; - for (i = 1; i < (objc-1); i++) { + for (i = 0; i < numOpts; i++) { int optionIndex; - if (Tcl_GetIndexFromObj(interp, objv[i], substOptions, "switch", 0, + if (Tcl_GetIndexFromObj(interp, opts[i], substOptions, "switch", 0, &optionIndex) != TCL_OK) { return TCL_ERROR; } @@ -3414,17 +3408,31 @@ Tcl_SubstObjCmd( Tcl_Panic("Tcl_SubstObjCmd: bad option index to SubstOptions"); } } - if (i != objc-1) { + *flagPtr = flags; + return TCL_OK; +} + +int +Tcl_SubstObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Obj *resultPtr; + int flags; + + if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "?-nobackslashes? ?-nocommands? ?-novariables? string"); return TCL_ERROR; } - /* - * Perform the substitution. - */ + if (TclSubstOptions(interp, objc-2, objv+1, &flags) != TCL_OK) { + return TCL_ERROR; + } - resultPtr = Tcl_SubstObj(interp, objv[i], flags); + resultPtr = Tcl_SubstObj(interp, objv[objc-1], flags); if (resultPtr == NULL) { return TCL_ERROR; diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 5b5871f..ffcd22a 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.153 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.154 2009/09/04 17:33:11 dgp Exp $ */ #include "tclInt.h" @@ -3844,6 +3844,275 @@ TclCompileStringLenCmd( /* *---------------------------------------------------------------------- * + * TclCompileSubstCmd -- + * + * Procedure called to compile the "subst" command. + * + * Results: + * Returns TCL_OK for successful compile, or TCL_ERROR to defer + * evaluation to runtime (either when it is too complex to get the + * semantics right, or when we know for sure that it is an error but need + * the error to happen at the right time). + * + * Side effects: + * Instructions are added to envPtr to execute the "subst" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileSubstCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + int numArgs = parsePtr->numWords - 1; + int numOpts = numArgs - 1; + int objc, flags = TCL_SUBST_ALL; + Tcl_Obj **objv/*, *toSubst = NULL*/; + Tcl_Parse parse; + Tcl_InterpState state = NULL; + Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); + int breakOffset = 0, count = 0, code = TCL_OK; + Tcl_Token *endTokenPtr, *tokenPtr; + DefineLineInformation; /* TIP #280 */ + int bline = mapPtr->loc[eclIndex].line[numArgs]; + SetLineInformation(numArgs); + + if (numArgs == 0) { + return TCL_ERROR; + } + + objv = (Tcl_Obj **) TclStackAlloc(interp, /*numArgs*/ numOpts * sizeof(Tcl_Obj *)); + + for (objc = 0; objc < /*numArgs*/ numOpts; objc++) { + objv[objc] = Tcl_NewObj(); + Tcl_IncrRefCount(objv[objc]); + if (!TclWordKnownAtCompileTime(wordTokenPtr, objv[objc])) { + objc++; + goto cleanup; + } + wordTokenPtr = TokenAfter(wordTokenPtr); + } + +/* + if (TclSubstOptions(NULL, numOpts, objv, &flags) == TCL_OK) { + toSubst = objv[numOpts]; + Tcl_IncrRefCount(toSubst); + } +*/ + + /* TODO: Figure out expansion to cover WordKnownAtCompileTime + * The difficulty is that WKACT makes a copy, and if TclSubstParse + * below parses the copy of the original source string, some deep + * parts of the compile machinery get upset. They want all pointers + * stored in Tcl_Tokens to point back to the same original string. + */ + if (wordTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { + code = TCL_ERROR; + } + if (code == TCL_OK) { + code = TclSubstOptions(NULL, numOpts, objv, &flags); + } + + cleanup: + while (--objc >= 0) { + TclDecrRefCount(objv[objc]); + } + TclStackFree(interp, objv); + if (/*toSubst == NULL*/ code != TCL_OK) { + return TCL_ERROR; + } + + TclSubstParse(interp, /*toSubst,*/ wordTokenPtr[1].start, + wordTokenPtr[1].size, flags, &parse, &state); + + for (tokenPtr = parse.tokenPtr, endTokenPtr = tokenPtr + parse.numTokens; + tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) { + int length, literal, catchRange, breakJump; + char buf[TCL_UTF_MAX]; + JumpFixup startFixup, okFixup, returnFixup, breakFixup; + JumpFixup continueFixup, otherFixup, endFixup; + + switch (tokenPtr->type) { + case TCL_TOKEN_TEXT: + literal = TclRegisterNewLiteral(envPtr, + tokenPtr->start, tokenPtr->size); + TclEmitPush(literal, envPtr); + TclAdvanceLines(&bline, tokenPtr->start, + tokenPtr->start + tokenPtr->size); + count++; + continue; + case TCL_TOKEN_BS: + length = Tcl_UtfBackslash(tokenPtr->start, NULL, buf); + literal = TclRegisterNewLiteral(envPtr, buf, length); + TclEmitPush(literal, envPtr); + count++; + continue; + } + + while (count > 255) { + TclEmitInstInt1(INST_CONCAT1, 255, envPtr); + count -= 254; + } + if (count > 1) { + TclEmitInstInt1(INST_CONCAT1, count, envPtr); + count = 1; + } + + if (breakOffset == 0) { + /* Jump to the start (jump over the jump to end) */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &startFixup); + + /* Jump to the end (all BREAKs land here) */ + breakOffset = CurrentOffset(envPtr); + TclEmitInstInt4(INST_JUMP4, 0, envPtr); + + /* Start */ + if (TclFixupForwardJumpToHere(envPtr, &startFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad start jump distance %d", + CurrentOffset(envPtr) - startFixup.codeOffset); + } + } + + envPtr->line = bline; + catchRange = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); + TclEmitInstInt4(INST_BEGIN_CATCH4, catchRange, envPtr); + ExceptionRangeStarts(envPtr, catchRange); + + switch (tokenPtr->type) { + case TCL_TOKEN_COMMAND: + TclCompileScript(interp, tokenPtr->start+1, tokenPtr->size-2, + envPtr); + count++; + break; + case TCL_TOKEN_VARIABLE: + TclCompileVarSubst(interp, tokenPtr, envPtr); + count++; + break; + default: + Tcl_Panic("unexpected token type in TclCompileSubstCmd: %d", + tokenPtr->type); + } + + ExceptionRangeEnds(envPtr, catchRange); + + /* Substitution produced TCL_OK */ + TclEmitOpcode(INST_END_CATCH, envPtr); + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &okFixup); + + /* Exceptional return codes processed here */ + ExceptionRangeTarget(envPtr, catchRange, catchOffset); + TclEmitOpcode(INST_PUSH_RETURN_OPTIONS, envPtr); + TclEmitOpcode(INST_PUSH_RESULT, envPtr); + TclEmitOpcode(INST_PUSH_RETURN_CODE, envPtr); + TclEmitOpcode(INST_END_CATCH, envPtr); + TclEmitOpcode(INST_RETURN_CODE_BRANCH, envPtr); + + /* ERROR -> reraise it */ + TclEmitOpcode(INST_RETURN_STK, envPtr); + TclEmitOpcode(INST_NOP, envPtr); + + /* RETURN */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &returnFixup); + + /* BREAK */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &breakFixup); + + /* CONTINUE */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &continueFixup); + + /* OTHER */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &otherFixup); + + /* BREAK destination */ + if (TclFixupForwardJumpToHere(envPtr, &breakFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad break jump distance %d", + CurrentOffset(envPtr) - breakFixup.codeOffset); + } + TclEmitOpcode(INST_POP, envPtr); + TclEmitOpcode(INST_POP, envPtr); + + breakJump = CurrentOffset(envPtr) - breakOffset; + if (breakJump > 127) { + TclEmitInstInt4(INST_JUMP4, -breakJump, envPtr) + } else { + TclEmitInstInt1(INST_JUMP1, -breakJump, envPtr) + } + + /* CONTINUE destination */ + if (TclFixupForwardJumpToHere(envPtr, &continueFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad continue jump distance %d", + CurrentOffset(envPtr) - continueFixup.codeOffset); + } + TclEmitOpcode(INST_POP, envPtr); + TclEmitOpcode(INST_POP, envPtr); + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &endFixup); + + /* RETURN + other destination */ + if (TclFixupForwardJumpToHere(envPtr, &returnFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad return jump distance %d", + CurrentOffset(envPtr) - returnFixup.codeOffset); + } + if (TclFixupForwardJumpToHere(envPtr, &otherFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad other jump distance %d", + CurrentOffset(envPtr) - otherFixup.codeOffset); + } + /* Pull the result to top of stack, discard options dict */ + TclEmitInstInt4(INST_REVERSE, 2, envPtr); + TclEmitOpcode(INST_POP, envPtr); + + /* OK destination */ + if (TclFixupForwardJumpToHere(envPtr, &okFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad ok jump distance %d", + CurrentOffset(envPtr) - okFixup.codeOffset); + } + if (count > 1) { + TclEmitInstInt1(INST_CONCAT1, count, envPtr); + count = 1; + } + + /* CONTINUE jump to here */ + if (TclFixupForwardJumpToHere(envPtr, &endFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad end jump distance %d", + CurrentOffset(envPtr) - endFixup.codeOffset); + } + bline = envPtr->line; + } + + + while (count > 255) { + TclEmitInstInt1(INST_CONCAT1, 255, envPtr); + count -= 254; + } + if (count > 1) { + TclEmitInstInt1(INST_CONCAT1, count, envPtr); + } + + Tcl_FreeParse(&parse); +/* TclDecrRefCount(toSubst);*/ + + if (state != NULL) { + Tcl_RestoreInterpState(interp, state); + TclCompileSyntaxError(interp, envPtr); + } + + /* Final target of the multi-jump from all BREAKs */ + if (breakOffset > 0) { + TclUpdateInstInt4AtPc(INST_JUMP4, CurrentOffset(envPtr) - breakOffset, + envPtr->codeStart + breakOffset); + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclCompileSwitchCmd -- * * Procedure called to compile the "switch" command. diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 970c1ef..b6b270b 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.172 2009/08/25 23:20:36 das Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.173 2009/09/04 17:33:11 dgp Exp $ */ #include "tclInt.h" @@ -399,6 +399,13 @@ InstructionDesc const tclInstructionTable[] = { * stknext */ {"existStk", 1, 0, 0, {OPERAND_NONE}}, /* Test if general variable exists; unparsed variable name is stktop*/ + {"nop", 1, 0, 0, {OPERAND_NONE}}, + /* Do nothing */ + {"returnCodeBranch", 1, -1, 0, {OPERAND_NONE}}, + /* Jump to next instruction based on the return code on top of stack + * ERROR: +1; RETURN: +3; BREAK: +5; CONTINUE: +7; + * Other non-OK: +9 + */ {0} }; @@ -1277,6 +1284,17 @@ TclCompileScript( TclCompileSyntaxError(interp, envPtr); break; } + + /* + * TIP #280: We have to count newlines before the command even + * in the degenerate case when the command has no words. (See + * test info-30.33). So make that counting here, and not in + * the (numWords > 0) branch below. + */ + TclAdvanceLines(&cmdLine, p, parsePtr->commandStart); + TclAdvanceContinuations(&cmdLine, &clNext, + parsePtr->commandStart - envPtr->source); + if (parsePtr->numWords > 0) { int expand = 0; /* Set if there are dynamic expansions to * handle */ @@ -1361,9 +1379,6 @@ TclCompileScript( * 'wlines'. */ - TclAdvanceLines(&cmdLine, p, parsePtr->commandStart); - TclAdvanceContinuations (&cmdLine, &clNext, - parsePtr->commandStart - envPtr->source); EnterCmdWordData(eclPtr, parsePtr->commandStart - envPtr->source, parsePtr->tokenPtr, parsePtr->commandStart, parsePtr->commandSize, parsePtr->numWords, cmdLine, @@ -1633,6 +1648,14 @@ TclCompileScript( } while (bytesLeft > 0); /* + * TIP #280: Bring the line counts in the CompEnv up to date. + * See tests info-30.33,34,35 . + */ + + envPtr->line = cmdLine; + envPtr->clNext = clNext; + + /* * If the source script yielded no instructions (e.g., if it was empty), * push an empty string as the command's result. * @@ -1674,6 +1697,77 @@ TclCompileScript( */ void +TclCompileVarSubst( + Tcl_Interp *interp, + Tcl_Token *tokenPtr, + CompileEnv *envPtr) +{ + const char *p, *name = tokenPtr[1].start; + int nameBytes = tokenPtr[1].size; + int i, localVar, localVarName = 1; + + /* + * Determine how the variable name should be handled: if it + * contains any namespace qualifiers it is not a local variable + * (localVarName=-1); if it looks like an array element and the + * token has a single component, it should not be created here + * [Bug 569438] (localVarName=0); otherwise, the local variable + * can safely be created (localVarName=1). + */ + + for (i = 0, p = name; i < nameBytes; i++, p++) { + if ((*p == ':') && (i < nameBytes-1) && (*(p+1) == ':')) { + localVarName = -1; + break; + } else if ((*p == '(') + && (tokenPtr->numComponents == 1) + && (*(name + nameBytes - 1) == ')')) { + localVarName = 0; + break; + } + } + + /* + * Either push the variable's name, or find its index in the array + * of local variables in a procedure frame. + */ + + localVar = -1; + if (localVarName != -1) { + localVar = TclFindCompiledLocal(name, nameBytes, localVarName, envPtr); + } + if (localVar < 0) { + TclEmitPush(TclRegisterNewLiteral(envPtr, name, nameBytes), envPtr); + } + + /* + * Emit instructions to load the variable. + */ + + TclAdvanceLines(&(envPtr->line), tokenPtr[1].start, + tokenPtr[1].start + tokenPtr[1].size); + + if (tokenPtr->numComponents == 1) { + if (localVar < 0) { + TclEmitOpcode(INST_LOAD_SCALAR_STK, envPtr); + } else if (localVar <= 255) { + TclEmitInstInt1(INST_LOAD_SCALAR1, localVar, envPtr); + } else { + TclEmitInstInt4(INST_LOAD_SCALAR4, localVar, envPtr); + } + } else { + TclCompileTokens(interp, tokenPtr+2, tokenPtr->numComponents-1, envPtr); + if (localVar < 0) { + TclEmitOpcode(INST_LOAD_ARRAY_STK, envPtr); + } else if (localVar <= 255) { + TclEmitInstInt1(INST_LOAD_ARRAY1, localVar, envPtr); + } else { + TclEmitInstInt4(INST_LOAD_ARRAY4, localVar, envPtr); + } + } +} + +void TclCompileTokens( Tcl_Interp *interp, /* Used for error and status reporting. */ Tcl_Token *tokenPtr, /* Pointer to first in an array of tokens to @@ -1685,9 +1779,7 @@ TclCompileTokens( Tcl_DString textBuffer; /* Holds concatenated chars from adjacent * TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */ char buffer[TCL_UTF_MAX]; - const char *name, *p; - int numObjsToConcat, nameBytes, localVarName, localVar; - int length, i; + int i, numObjsToConcat, length; unsigned char *entryCodeNext = envPtr->codeNext; #define NUM_STATIC_POS 20 int isLiteral, maxNumCL, numCL; @@ -1731,6 +1823,8 @@ TclCompileTokens( switch (tokenPtr->type) { case TCL_TOKEN_TEXT: Tcl_DStringAppend(&textBuffer, tokenPtr->start, tokenPtr->size); + TclAdvanceLines(&(envPtr->line), tokenPtr->start, + tokenPtr->start + tokenPtr->size); break; case TCL_TOKEN_BS: @@ -1810,69 +1904,7 @@ TclCompileTokens( Tcl_DStringFree(&textBuffer); } - /* - * Determine how the variable name should be handled: if it - * contains any namespace qualifiers it is not a local variable - * (localVarName=-1); if it looks like an array element and the - * token has a single component, it should not be created here - * [Bug 569438] (localVarName=0); otherwise, the local variable - * can safely be created (localVarName=1). - */ - - name = tokenPtr[1].start; - nameBytes = tokenPtr[1].size; - - localVarName = 1; - for (i = 0, p = name; i < nameBytes; i++, p++) { - if ((*p == ':') && (i < nameBytes-1) && (*(p+1) == ':')) { - localVarName = -1; - break; - } else if ((*p == '(') - && (tokenPtr->numComponents == 1) - && (*(name + nameBytes - 1) == ')')) { - localVarName = 0; - break; - } - } - - /* - * Either push the variable's name, or find its index in the array - * of local variables in a procedure frame. - */ - - localVar = -1; - if (localVarName != -1) { - localVar = TclFindCompiledLocal(name, nameBytes, localVarName, - envPtr); - } - if (localVar < 0) { - TclEmitPush(TclRegisterNewLiteral(envPtr, name, nameBytes), - envPtr); - } - - /* - * Emit instructions to load the variable. - */ - - if (tokenPtr->numComponents == 1) { - if (localVar < 0) { - TclEmitOpcode(INST_LOAD_SCALAR_STK, envPtr); - } else if (localVar <= 255) { - TclEmitInstInt1(INST_LOAD_SCALAR1, localVar, envPtr); - } else { - TclEmitInstInt4(INST_LOAD_SCALAR4, localVar, envPtr); - } - } else { - TclCompileTokens(interp, tokenPtr+2, - tokenPtr->numComponents-1, envPtr); - if (localVar < 0) { - TclEmitOpcode(INST_LOAD_ARRAY_STK, envPtr); - } else if (localVar <= 255) { - TclEmitInstInt1(INST_LOAD_ARRAY1, localVar, envPtr); - } else { - TclEmitInstInt4(INST_LOAD_ARRAY4, localVar, envPtr); - } - } + TclCompileVarSubst(interp, tokenPtr, envPtr); numObjsToConcat++; count -= tokenPtr->numComponents; tokenPtr += tokenPtr->numComponents; diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 4d9dbd1..25dec86 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.118 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.119 2009/09/04 17:33:11 dgp Exp $ */ #ifndef _TCLCOMPILATION @@ -666,8 +666,12 @@ typedef struct ByteCode { #define INST_EXIST_ARRAY_STK 130 #define INST_EXIST_STK 131 +/* For [subst] compilation */ +#define INST_NOP 132 +#define INST_RETURN_CODE_BRANCH 133 + /* The last opcode */ -#define LAST_INST_OPCODE 131 +#define LAST_INST_OPCODE 133 /* * Table describing the Tcl bytecode instructions: their name (for displaying @@ -893,6 +897,8 @@ MODULE_SCOPE void TclCompileSyntaxError(Tcl_Interp *interp, MODULE_SCOPE void TclCompileTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, CompileEnv *envPtr); +MODULE_SCOPE void TclCompileVarSubst(Tcl_Interp *interp, + Tcl_Token *tokenPtr, CompileEnv *envPtr); MODULE_SCOPE int TclCreateAuxData(ClientData clientData, const AuxDataType *typePtr, CompileEnv *envPtr); MODULE_SCOPE int TclCreateExceptRange(ExceptionRangeType type, diff --git a/generic/tclExecute.c b/generic/tclExecute.c index c668539..662d2a0 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.444 2009/08/12 16:06:43 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.445 2009/09/04 17:33:11 dgp Exp $ */ #include "tclInt.h" @@ -2493,6 +2493,10 @@ TclExecuteByteCode( NEXT_INST_F(opnd, 0, -1); } + case INST_NOP: + pc += 1; + goto cleanup0; + case INST_DUP: objResultPtr = OBJ_AT_TOS; TRACE_WITH_OBJ(("=> "), objResultPtr); @@ -7163,6 +7167,21 @@ TclExecuteByteCode( TRACE_WITH_OBJ(("=> "), objResultPtr); NEXT_INST_F(1, 0, 1); + case INST_RETURN_CODE_BRANCH: { + int code; + + if (TclGetIntFromObj(NULL, OBJ_AT_TOS, &code) != TCL_OK) { + Tcl_Panic("INST_RETURN_CODE_BRANCH: TOS not a return code!"); + } + if (code == TCL_OK) { + Tcl_Panic("INST_RETURN_CODE_BRANCH: TOS is TCL_OK!"); + } + if (code < TCL_ERROR || code > TCL_CONTINUE) { + code = TCL_CONTINUE + 1; + } + NEXT_INST_F(2*code -1, 1, 0); + } + /* TODO: normalize "valPtr" to "valuePtr" */ { int opnd, opnd2, allocateDict; diff --git a/generic/tclInt.h b/generic/tclInt.h index dd073d2..97cb891 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.439 2009/09/04 09:38:20 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.440 2009/09/04 17:33:12 dgp Exp $ */ #ifndef _TCLINT @@ -2950,6 +2950,11 @@ MODULE_SCOPE int TclStringMatch(const char *str, int strLen, MODULE_SCOPE int TclStringMatchObj(Tcl_Obj *stringObj, Tcl_Obj *patternObj, int flags); MODULE_SCOPE Tcl_Obj * TclStringObjReverse(Tcl_Obj *objPtr); +MODULE_SCOPE int TclSubstOptions(Tcl_Interp *interp, int numOpts, + Tcl_Obj *const opts[], int *flagPtr); +MODULE_SCOPE void TclSubstParse(Tcl_Interp *interp, const char *bytes, + int numBytes, int flags, Tcl_Parse *parsePtr, + Tcl_InterpState *statePtr); MODULE_SCOPE int TclSubstTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, int *tokensLeftPtr, int line, int *clNextOuter, const char *outerScript); @@ -3370,6 +3375,9 @@ MODULE_SCOPE int TclCompileStringLenCmd(Tcl_Interp *interp, MODULE_SCOPE int TclCompileStringMatchCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); +MODULE_SCOPE int TclCompileSubstCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, Command *cmdPtr, + struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileSwitchCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); diff --git a/generic/tclParse.c b/generic/tclParse.c index aca6048..efb4422 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -1880,18 +1880,17 @@ Tcl_ParseQuotedString( *---------------------------------------------------------------------- */ -Tcl_Obj * -Tcl_SubstObj( - Tcl_Interp *interp, /* Interpreter in which substitution occurs */ - Tcl_Obj *objPtr, /* The value to be substituted. */ - int flags) /* What substitutions to do. */ +void +TclSubstParse( + Tcl_Interp *interp, + const char *bytes, + int numBytes, + int flags, + Tcl_Parse *parsePtr, + Tcl_InterpState *statePtr) { - int length, tokensLeft, code; - Tcl_Token *endTokenPtr; - Tcl_Obj *result, *errMsg = NULL; - const char *p = TclGetStringFromObj(objPtr, &length); - Tcl_Parse *parsePtr = (Tcl_Parse *) - TclStackAlloc(interp, sizeof(Tcl_Parse)); + int length = numBytes; + const char *p = bytes; TclParseInit(interp, p, length, parsePtr); @@ -1903,12 +1902,11 @@ Tcl_SubstObj( if (TCL_OK != ParseTokens(p, length, /* mask */ 0, flags, parsePtr)) { /* - * There was a parse error. Save the error message for possible - * reporting later. + * There was a parse error. Save the interpreter state for possible + * error reporting later. */ - errMsg = Tcl_GetObjResult(interp); - Tcl_IncrRefCount(errMsg); + *statePtr = Tcl_SaveInterpState(interp, TCL_ERROR); /* * We need to re-parse to get the portion of the string we can [subst] @@ -2054,6 +2052,23 @@ Tcl_SubstObj( Tcl_Panic("bad parse in Tcl_SubstObj: %c", p[length]); } } +} + +Tcl_Obj * +Tcl_SubstObj( + Tcl_Interp *interp, /* Interpreter in which substitution occurs */ + Tcl_Obj *objPtr, /* The value to be substituted. */ + int flags) /* What substitutions to do. */ +{ + int tokensLeft, code, numBytes; + Tcl_Token *endTokenPtr; + Tcl_Obj *result; + Tcl_Parse *parsePtr = (Tcl_Parse *) + TclStackAlloc(interp, sizeof(Tcl_Parse)); + Tcl_InterpState state = NULL; + const char *bytes = TclGetStringFromObj(objPtr, &numBytes); + + TclSubstParse(interp, bytes, numBytes, flags, parsePtr, &state); /* * Next, substitute the parsed tokens just as in normal Tcl evaluation. @@ -2066,9 +2081,8 @@ Tcl_SubstObj( if (code == TCL_OK) { Tcl_FreeParse(parsePtr); TclStackFree(interp, parsePtr); - if (errMsg != NULL) { - Tcl_SetObjResult(interp, errMsg); - Tcl_DecrRefCount(errMsg); + if (state != NULL) { + Tcl_RestoreInterpState(interp, state); return NULL; } return Tcl_GetObjResult(interp); @@ -2081,8 +2095,8 @@ Tcl_SubstObj( Tcl_FreeParse(parsePtr); TclStackFree(interp, parsePtr); Tcl_DecrRefCount(result); - if (errMsg != NULL) { - Tcl_DecrRefCount(errMsg); + if (state != NULL) { + Tcl_DiscardInterpState(state); } return NULL; case TCL_BREAK: @@ -2094,14 +2108,13 @@ Tcl_SubstObj( if (tokensLeft == 0) { Tcl_FreeParse(parsePtr); TclStackFree(interp, parsePtr); - if (errMsg != NULL) { + if (state != NULL) { if (code != TCL_BREAK) { Tcl_DecrRefCount(result); - Tcl_SetObjResult(interp, errMsg); - Tcl_DecrRefCount(errMsg); + Tcl_RestoreInterpState(interp, state); return NULL; } - Tcl_DecrRefCount(errMsg); + Tcl_DiscardInterpState(state); } return result; } diff --git a/tests/basic.test b/tests/basic.test index b8d608e..881b329 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: basic.test,v 1.44 2007/04/20 05:51:11 kennykb Exp $ +# RCS: @(#) $Id: basic.test,v 1.45 2009/09/04 17:33:12 dgp Exp $ # package require tcltest 2 @@ -632,7 +632,7 @@ test basic-46.5 {Tcl_AllowExceptions: exception return not allowed} -setup { (file "*BREAKtest" line 2)} test basic-47.1 {Tcl_EvalEx: check for missing close-bracket} -body { - subst {a[set b [format cd]} + set subst subst; $subst {a[set b [format cd]} } -returnCodes error -result {missing close-bracket} # Some lists for expansion tests to work with diff --git a/tests/info.test b/tests/info.test index 65d71bc..e538a23 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.65 2009/08/25 21:03:25 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.66 2009/09/04 17:33:12 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1525,12 +1525,12 @@ test info-30.10 {bs+nl in computed word, key to array} { set res } { type source line 1523 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.11 {bs+nl in subst arguments, no true counting} { +test info-30.11 {bs+nl in subst arguments} { subst {[set \ res "\ [reduce \ - [info frame 0]]"]} -} { type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} + [info frame 0]]"]} ; #1532 +} { type source line 1532 file info.test cmd {info frame 0} proc ::tcltest::RunTest} test info-30.12 {bs+nl in computed word, nested eval} { eval { @@ -1708,6 +1708,121 @@ test info-30.24 {bs+nl in single-body switch, full compiled} { type source line 1696 file info.test cmd {info frame 0} proc ::a level 0 type source line 1700 file info.test cmd {info frame 0} proc ::a level 0} +test info-30.25 {TIP 280 for compiled [subst]} { + subst {[reduce [info frame 0]]} ; # 1712 +} {type source line 1712 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.26 {TIP 280 for compiled [subst]} { + subst \ + {[reduce [info frame 0]]} ; # 1716 +} {type source line 1716 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.27 {TIP 280 for compiled [subst]} { + subst { +[reduce [info frame 0]]} ; # 1720 +} { +type source line 1720 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.28 {TIP 280 for compiled [subst]} { + subst {\ +[reduce [info frame 0]]} ; # 1725 +} { type source line 1725 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.29 {TIP 280 for compiled [subst]} { + subst {foo\ +[reduce [info frame 0]]} ; # 1729 +} {foo type source line 1729 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.30 {TIP 280 for compiled [subst]} { + subst {foo +[reduce [info frame 0]]} ; # 1733 +} {foo +type source line 1733 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.31 {TIP 280 for compiled [subst]} { + subst {[][reduce [info frame 0]]} ; # 1737 +} {type source line 1737 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.32 {TIP 280 for compiled [subst]} { + subst {[\ +][reduce [info frame 0]]} ; # 1741 +} {type source line 1741 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.33 {TIP 280 for compiled [subst]} { + subst {[ +][reduce [info frame 0]]} ; # 1745 +} {type source line 1745 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.34 {TIP 280 for compiled [subst]} { + subst {[format %s {} +][reduce [info frame 0]]} ; # 1749 +} {type source line 1749 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.35 {TIP 280 for compiled [subst]} { + subst {[format %s {} +] +[reduce [info frame 0]]} ; # 1754 +} { +type source line 1754 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.36 {TIP 280 for compiled [subst]} { + subst { +[format %s {}][reduce [info frame 0]]} ; # 1759 +} { +type source line 1759 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.37 {TIP 280 for compiled [subst]} { + subst { +[format %s {}] +[reduce [info frame 0]]} ; # 1765 +} { + +type source line 1765 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.38 {TIP 280 for compiled [subst]} { + subst {\ +[format %s {}][reduce [info frame 0]]} ; # 1771 +} { type source line 1771 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.39 {TIP 280 for compiled [subst]} { + subst {\ +[format %s {}]\ +[reduce [info frame 0]]} ; # 1776 +} { type source line 1776 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.40 {TIP 280 for compiled [subst]} { + unset -nocomplain empty + set empty {} + subst {$empty[reduce [info frame 0]]} ; # 1781 +} {type source line 1781 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.41 {TIP 280 for compiled [subst]} { + unset -nocomplain empty + set empty {} + subst {$empty +[reduce [info frame 0]]} ; # 1787 +} { +type source line 1787 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.42 {TIP 280 for compiled [subst]} { + unset -nocomplain empty + set empty {} + subst {$empty\ +[reduce [info frame 0]]} ; # 1794 +} { type source line 1794 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.43 {TIP 280 for compiled [subst]} { + unset -nocomplain a\nb + set a\nb {} + subst {${a +b}[reduce [info frame 0]]} ; # 1800 +} {type source line 1800 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.44 {TIP 280 for compiled [subst]} { + unset -nocomplain a + set a(\n) {} + subst {$a( +)[reduce [info frame 0]]} ; # 1806 +} {type source line 1806 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.45 {TIP 280 for compiled [subst]} { + unset -nocomplain a + set a() {} + subst {$a([ +return -level 0])[reduce [info frame 0]]} ; # 1812 +} {type source line 1812 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.46 {TIP 280 for compiled [subst]} { + unset -nocomplain a + set a(1817) YES; set a(1816) 1816; set a(1818) 1818 + subst {$a([dict get [info frame 0] line])} ; # 1817 +} YES +test info-30.47 {TIP 280 for compiled [subst]} { + unset -nocomplain a + set a(\n1823) YES; set a(\n1822) 1822; set a(\n1824) 1824 + subst {$a( +[dict get [info frame 0] line])} ; # 1823 +} YES + # ------------------------------------------------------------------------- # cleanup diff --git a/tests/parse.test b/tests/parse.test index 9427254..b745a97 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.36 2008/11/27 08:23:52 ferrieux Exp $ +# RCS: @(#) $Id: parse.test,v 1.37 2009/09/04 17:33:12 dgp Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -896,7 +896,7 @@ test parse-15.60 {CommandComplete procedure} { } 0 test parse-16.1 {Tcl_EvalEx, check termOffset is set correctly for non TCL_OK cases, bug 2535} { - subst {[eval {return foo}]bar} + set subst subst; $subst {[eval {return foo}]bar} } foobar test parse-17.1 {Correct return codes from errors during substitution} { @@ -1043,7 +1043,7 @@ test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { i eval {proc {} args {}} interp recursionlimit i 3 } -body { - i eval {subst {[]}} + i eval {set subst subst; $subst {[]}} } -cleanup { interp delete i } @@ -1053,7 +1053,7 @@ test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { i eval {proc {} args {}} interp recursionlimit i 2 } -body { - i eval {subst {[[]]}} + i eval {set subst subst; $subst {[[]]}} } -cleanup { interp delete i } -returnCodes error -match glob -result {too many nested*} -- cgit v0.12 From 8b0b3531f3dd05e5a4fd6a5d144f83c7e6b28b07 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 4 Sep 2009 21:07:18 +0000 Subject: Patched up flaw in option syntax checking --- generic/tclCompCmds.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index ffcd22a..c9b60dc 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.154 2009/09/04 17:33:11 dgp Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.155 2009/09/04 21:07:18 dgp Exp $ */ #include "tclInt.h" @@ -3877,7 +3877,7 @@ TclCompileSubstCmd( Tcl_Parse parse; Tcl_InterpState state = NULL; Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); - int breakOffset = 0, count = 0, code = TCL_OK; + int breakOffset = 0, count = 0, code = TCL_ERROR; Tcl_Token *endTokenPtr, *tokenPtr; DefineLineInformation; /* TIP #280 */ int bline = mapPtr->loc[eclIndex].line[numArgs]; @@ -3912,10 +3912,7 @@ TclCompileSubstCmd( * parts of the compile machinery get upset. They want all pointers * stored in Tcl_Tokens to point back to the same original string. */ - if (wordTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { - code = TCL_ERROR; - } - if (code == TCL_OK) { + if (wordTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { code = TclSubstOptions(NULL, numOpts, objv, &flags); } -- cgit v0.12 From e569b1fb491d02be089d87f32688368deb30ef12 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 4 Sep 2009 23:14:32 +0000 Subject: Fixed up error in stack requirement estimation that made debug builds panic during execution of [subst] bytecode. --- generic/tclCompCmds.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index c9b60dc..9b33b41 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.155 2009/09/04 21:07:18 dgp Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.156 2009/09/04 23:14:32 dgp Exp $ */ #include "tclInt.h" @@ -4063,6 +4063,16 @@ TclCompileSubstCmd( TclEmitInstInt4(INST_REVERSE, 2, envPtr); TclEmitOpcode(INST_POP, envPtr); + /* + * We've emitted several POP instructions, and the automatic + * computations for stack depth requirements have been decrementing + * for every one. However, we know that every branch actually taken + * only encounters some of those instructions. No branch passes + * through them all. So, we now have a stack requirements estimate + * that is too low. Here we manually fix that up. + */ + TclAdjustStackDepth(5, envPtr); + /* OK destination */ if (TclFixupForwardJumpToHere(envPtr, &okFixup, 127)) { Tcl_Panic("TclCompileSubstCmd: bad ok jump distance %d", -- cgit v0.12 From c70d85c03e5455903df2df0534bb0a8ac25b32ac Mon Sep 17 00:00:00 2001 From: das Date: Mon, 7 Sep 2009 06:20:47 +0000 Subject: make support for clang static analyzer safer & cleaner --- generic/tclInt.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 97cb891..a27b0f4 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.440 2009/09/04 17:33:12 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.441 2009/09/07 06:20:47 das Exp $ */ #ifndef _TCLINT @@ -4300,19 +4300,21 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #endif /* TCL_MEM_DEBUG */ /* - * Macros for clang static analyzer + * Support for Clang Static Analyzer */ -#if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT) +#if defined(PURIFY) && defined(__clang__) +#if __has_feature(attribute_analyzer_noreturn) && \ + !defined(Tcl_Panic) && defined(Tcl_Panic_TCL_DECLARED) +void Tcl_Panic(const char *, ...) __attribute__((analyzer_noreturn)); +#endif +#if !defined(CLANG_ASSERT) #include #define CLANG_ASSERT(x) assert(x) -#ifndef USE_TCL_STUBS -EXTERN void Tcl_Panic(const char * format, ...) - __attribute__((analyzer_noreturn)); #endif #elif !defined(CLANG_ASSERT) #define CLANG_ASSERT(x) -#endif +#endif /* PURIFY && __clang__ */ /* *---------------------------------------------------------------- -- cgit v0.12 From 71eeb99bfbfdcf1437799cb69d10b599f7633293 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 7 Sep 2009 07:28:38 +0000 Subject: * generic/tclExecute.c: fix potential uninitialized variable use and * generic/tclFCmd.c: null dereference flagged by clang static * generic/tclProc.c: analyzer. * generic/tclTimer.c: * generic/tclUtf.c: * generic/tclExecute.c: silence false positives from clang static * generic/tclIO.c: analyzer about potential null dereference. * generic/tclScan.c: * generic/tclCompExpr.c: --- ChangeLog | 13 +++++++++++ generic/tclCompExpr.c | 5 ++++- generic/tclExecute.c | 6 ++++-- generic/tclFCmd.c | 3 ++- generic/tclIO.c | 3 ++- generic/tclProc.c | 60 ++++++++++++++++++++++++++------------------------- generic/tclScan.c | 6 +++++- generic/tclTimer.c | 4 ++-- generic/tclUtf.c | 4 ++-- 9 files changed, 65 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb36290..3ada763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-09-07 Daniel Steffen + + * generic/tclExecute.c: fix potential uninitialized variable use and + * generic/tclFCmd.c: null dereference flagged by clang static + * generic/tclProc.c: analyzer. + * generic/tclTimer.c: + * generic/tclUtf.c: + + * generic/tclExecute.c: silence false positives from clang static + * generic/tclIO.c: analyzer about potential null dereference. + * generic/tclScan.c: + * generic/tclCompExpr.c: + 2009-09-04 Don Porter * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecode diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 48f3cc1..47c8671 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.99 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.100 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -2231,6 +2231,7 @@ CompileExprTree( TclEmitForwardJump(envPtr, TCL_FALSE_JUMP, &(jumpPtr->jump)); break; case COLON: + CLANG_ASSERT(jumpPtr); TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &(jumpPtr->next->jump)); envPtr->currStackDepth = jumpPtr->depth; @@ -2284,6 +2285,7 @@ CompileExprTree( numWords++; break; case COLON: + CLANG_ASSERT(jumpPtr); if (TclFixupForwardJump(envPtr, &(jumpPtr->next->jump), (envPtr->codeNext - envPtr->codeStart) - jumpPtr->next->jump.codeOffset, 127)) { @@ -2302,6 +2304,7 @@ CompileExprTree( break; case AND: case OR: + CLANG_ASSERT(jumpPtr); TclEmitForwardJump(envPtr, (nodePtr->lexeme == AND) ? TCL_FALSE_JUMP : TCL_TRUE_JUMP, &(jumpPtr->next->jump)); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 662d2a0..778b679 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.445 2009/09/04 17:33:11 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.446 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -2850,6 +2850,7 @@ TclExecuteByteCode( case INST_INVOKE_EXPANDED: { + CLANG_ASSERT(auxObjList); objc = CURR_DEPTH - (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1; POP_AUX_OBJ(); @@ -4546,7 +4547,7 @@ TclExecuteByteCode( if (o != NULL) { s2 = TclGetStringFromObj(o, &s2len); } else { - s2 = ""; + s2 = ""; s2len = 0; } if (s1len == s2len) { found = (strcmp(s1, s2) == 0); @@ -7969,6 +7970,7 @@ TclExecuteByteCode( (unsigned) CURR_DEPTH, (unsigned) 0); Tcl_Panic("TclExecuteByteCode execution failure: end stack top < start stack top"); } + CLANG_ASSERT(bcFramePtr); } oldBottomPtr = bottomPtr->prevBottomPtr; diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 0e78c4b..6e84177 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.49 2008/10/06 21:00:37 patthoyts Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.50 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -754,6 +754,7 @@ CopyRenameOneFile( if (S_ISDIR(sourceStatBuf.st_mode)) { result = Tcl_FSRemoveDirectory(source, 1, &errorBuffer); if (result != TCL_OK) { + errfile = errorBuffer; if (Tcl_FSEqualPaths(errfile, source) == 0) { errfile = source; } diff --git a/generic/tclIO.c b/generic/tclIO.c index 4f676e6..6ace57a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.160 2009/07/23 22:49:15 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.161 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -8565,6 +8565,7 @@ DeleteScriptRecord( if (esPtr == statePtr->scriptRecordPtr) { statePtr->scriptRecordPtr = esPtr->nextPtr; } else { + CLANG_ASSERT(prevEsPtr); prevEsPtr->nextPtr = esPtr->nextPtr; } diff --git a/generic/tclProc.c b/generic/tclProc.c index 12e19da..4eb6c17 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.174 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.175 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -1086,26 +1086,6 @@ TclIsProc( return NULL; } -/* - *---------------------------------------------------------------------- - * - * InitArgsAndLocals -- - * - * This routine is invoked in order to initialize the arguments and other - * compiled locals table for a new call frame. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * Allocates memory on the stack for the compiled local variables, the - * caller is responsible for freeing them. Initialises all variables. May - * invoke various name resolvers in order to determine which variables - * are being referenced at runtime. - * - *---------------------------------------------------------------------- - */ - static int ProcWrongNumArgs( Tcl_Interp *interp, @@ -1175,7 +1155,6 @@ ProcWrongNumArgs( * DEPRECATED: functionality has been inlined elsewhere; this function * remains to insure binary compatibility with Itcl. * - * Results: * None. * @@ -1185,6 +1164,7 @@ ProcWrongNumArgs( * *---------------------------------------------------------------------- */ + void TclInitCompiledLocals( Tcl_Interp *interp, /* Current interpreter. */ @@ -1337,7 +1317,7 @@ InitResolvedLocals( } } } - + void TclFreeLocalCache( Tcl_Interp *interp, @@ -1364,7 +1344,7 @@ TclFreeLocalCache( } ckfree((char *) localCachePtr); } - + static void InitLocalCache( Proc *procPtr) @@ -1416,6 +1396,26 @@ InitLocalCache( localCachePtr->refCount = 1; localCachePtr->numVars = localCt; } + +/* + *---------------------------------------------------------------------- + * + * InitArgsAndLocals -- + * + * This routine is invoked in order to initialize the arguments and other + * compiled locals table for a new call frame. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * Allocates memory on the stack for the compiled local variables, the + * caller is responsible for freeing them. Initialises all variables. May + * invoke various name resolvers in order to determine which variables + * are being referenced at runtime. + * + *---------------------------------------------------------------------- + */ static int InitArgsAndLocals( @@ -1477,7 +1477,7 @@ InitArgsAndLocals( } } imax = ((argCt < numArgs-1) ? argCt : numArgs-1); - for (i = 0; i < imax; i++, varPtr++, defPtr++) { + for (i = 0; i < imax; i++, varPtr++, defPtr ? defPtr++ : defPtr) { /* * "Normal" arguments; last formal is special, depends on it being * 'args'. @@ -1489,13 +1489,13 @@ InitArgsAndLocals( varPtr->value.objPtr = objPtr; Tcl_IncrRefCount(objPtr); /* Local var is a reference. */ } - for (; i < numArgs-1; i++, varPtr++, defPtr++) { + for (; i < numArgs-1; i++, varPtr++, defPtr ? defPtr++ : defPtr) { /* * This loop is entered if argCt < (numArgs-1). Set default values; * last formal is special. */ - Tcl_Obj *objPtr = defPtr->value.objPtr; + Tcl_Obj *objPtr = defPtr ? defPtr->value.objPtr : NULL; if (!objPtr) { goto incorrectArgs; @@ -1511,7 +1511,7 @@ InitArgsAndLocals( */ varPtr->flags = 0; - if (defPtr->flags & VAR_IS_ARGS) { + if (defPtr && defPtr->flags & VAR_IS_ARGS) { Tcl_Obj *listPtr = Tcl_NewListObj(argCt-i, argObjs+i); varPtr->value.objPtr = listPtr; @@ -1521,7 +1521,7 @@ InitArgsAndLocals( varPtr->value.objPtr = objPtr; Tcl_IncrRefCount(objPtr); /* Local var is a reference. */ - } else if ((argCt < numArgs) && (defPtr->value.objPtr != NULL)) { + } else if ((argCt < numArgs) && defPtr && defPtr->value.objPtr) { Tcl_Obj *objPtr = defPtr->value.objPtr; varPtr->value.objPtr = objPtr; @@ -3003,6 +3003,8 @@ Tcl_DisassembleObjCmd( } codeObjPtr = procPtr->bodyPtr; break; + default: + CLANG_ASSERT(0); } /* diff --git a/generic/tclScan.c b/generic/tclScan.c index 47fa025..f5ec509 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.32 2009/07/16 21:24:40 dgp Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.33 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -712,6 +712,7 @@ Tcl_ScanObjCmd( if (!(flags & SCAN_SUPPRESS)) { objPtr = Tcl_NewIntObj(string - baseString); Tcl_IncrRefCount(objPtr); + CLANG_ASSERT(objs); objs[objIndex++] = objPtr; } nconversions++; @@ -819,6 +820,7 @@ Tcl_ScanObjCmd( if (!(flags & SCAN_SUPPRESS)) { objPtr = Tcl_NewStringObj(string, end-string); Tcl_IncrRefCount(objPtr); + CLANG_ASSERT(objs); objs[objIndex++] = objPtr; } string = end; @@ -869,6 +871,7 @@ Tcl_ScanObjCmd( if (!(flags & SCAN_SUPPRESS)) { objPtr = Tcl_NewIntObj((int)sch); Tcl_IncrRefCount(objPtr); + CLANG_ASSERT(objs); objs[objIndex++] = objPtr; } break; @@ -973,6 +976,7 @@ Tcl_ScanObjCmd( } } Tcl_SetDoubleObj(objPtr, dvalue); + CLANG_ASSERT(objs); objs[objIndex++] = objPtr; string = end; } diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 94a8c16..4f40490 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.39 2009/02/10 23:09:04 nijtmans Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.40 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -778,7 +778,7 @@ Tcl_AfterObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_WideInt ms; /* Number of milliseconds to wait */ + Tcl_WideInt ms = 0; /* Number of milliseconds to wait */ Tcl_Time wakeup; AfterInfo *afterPtr; AfterAssocData *assocPtr; diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 16acab2..31e52ba 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtf.c,v 1.39 2009/02/11 15:28:59 dgp Exp $ + * RCS: @(#) $Id: tclUtf.c,v 1.40 2009/09/07 07:28:38 das Exp $ */ #include "tclInt.h" @@ -707,7 +707,7 @@ Tcl_UniCharAtIndex( register const char *src, /* The UTF-8 string to dereference. */ register int index) /* The position of the desired character. */ { - Tcl_UniChar ch; + Tcl_UniChar ch = 0; while (index >= 0) { index--; -- cgit v0.12 From 90160300cca05030f3f2330337a1d2693268dc41 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 7 Sep 2009 09:43:32 +0000 Subject: Basic test of yielding inside a subst --- tests/coroutine.test | 48 ++++++++++-------------------------------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/tests/coroutine.test b/tests/coroutine.test index 29c68e9..9b26e09 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.3 2009/08/02 14:26:07 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.4 2009/09/07 09:43:32 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -63,14 +63,12 @@ set lambda [list {{start 0} {stop 10}} { set i $start set imax $stop yield - while {$i < $imax} { yield [expr {$i*$stop}] incr i } }] - - + test coroutine-1.1 {coroutine basic} -setup { coroutine foo ::apply $lambda set res {} @@ -83,7 +81,6 @@ test coroutine-1.1 {coroutine basic} -setup { rename foo {} unset res } -result {0 10 20} - test coroutine-1.2 {coroutine basic} -setup { coroutine foo ::apply $lambda 2 8 set res {} @@ -96,14 +93,12 @@ test coroutine-1.2 {coroutine basic} -setup { rename foo {} unset res } -result {16 24 32} - test coroutine-1.3 {yield returns new arg} -setup { set body { # init set i $start set imax $stop yield - while {$i < $imax} { set stop [yield [expr {$i*$stop}]] incr i @@ -120,7 +115,6 @@ test coroutine-1.3 {yield returns new arg} -setup { rename foo {} unset res } -result {20 6 12} - test coroutine-1.4 {yield in nested proc} -setup { proc moo {} { upvar 1 i i stop stop @@ -131,7 +125,6 @@ test coroutine-1.4 {yield in nested proc} -setup { set i $start set imax $stop yield - while {$i < $imax} { moo incr i @@ -149,28 +142,24 @@ test coroutine-1.4 {yield in nested proc} -setup { rename moo {} unset body res } -result {0 10 20} - test coroutine-1.5 {just yield} -body { coroutine foo yield list [foo] [catch foo msg] $msg } -cleanup { unset msg } -result {{} 1 {invalid command name "foo"}} - test coroutine-1.6 {just yield} -body { coroutine foo [list yield] list [foo] [catch foo msg] $msg } -cleanup { unset msg } -result {{} 1 {invalid command name "foo"}} - test coroutine-1.7 {yield in nested uplevel} -setup { set body { # init set i $start set imax $stop yield - while {$i < $imax} { uplevel 0 [list yield [expr {$i*$stop}]] incr i @@ -187,14 +176,12 @@ test coroutine-1.7 {yield in nested uplevel} -setup { rename foo {} unset body res } -result {0 10 20} - test coroutine-1.8 {yield in nested uplevel} -setup { set body { # init set i $start set imax $stop yield - while {$i < $imax} { uplevel 0 yield [expr {$i*$stop}] incr i @@ -211,7 +198,6 @@ test coroutine-1.8 {yield in nested uplevel} -setup { rename foo {} unset body res } -result {0 10 20} - test coroutine-1.9 {yield in nested eval} -setup { proc moo {} { upvar 1 i i stop stop @@ -222,7 +208,6 @@ test coroutine-1.9 {yield in nested eval} -setup { set i $start set imax $stop yield - while {$i < $imax} { eval moo incr i @@ -239,14 +224,12 @@ test coroutine-1.9 {yield in nested eval} -setup { rename moo {} unset body res } -result {0 10 20} - test coroutine-1.10 {yield in nested eval} -setup { set body { # init set i $start set imax $stop yield - while {$i < $imax} { eval yield [expr {$i*$stop}] incr i @@ -262,7 +245,6 @@ test coroutine-1.10 {yield in nested eval} -setup { } -cleanup { unset body res } -result {0 10 20} - test coroutine-1.11 {yield outside coroutine} -setup { proc moo {} { upvar 1 i i stop stop @@ -275,14 +257,12 @@ test coroutine-1.11 {yield outside coroutine} -setup { rename moo {} unset i stop } -returnCodes error -result {yield can only be called in a coroutine} - test coroutine-1.12 {proc as coroutine} -setup { set body { # init set i $start set imax $stop yield - while {$i < $imax} { uplevel 0 [list yield [expr {$i*$stop}]] incr i @@ -297,32 +277,30 @@ test coroutine-1.12 {proc as coroutine} -setup { rename moo {} rename foo {} } -result {16 24} +test coroutine-1.13 {subst as coroutine} { + list [coroutine foo subst {>>[yield a],[yield b]<<}] [foo x] [foo y] +} {a b >>x,y<<} test coroutine-2.1 {self deletion on return} -body { coroutine foo set x 3 foo } -returnCodes error -result {invalid command name "foo"} - test coroutine-2.2 {self deletion on return} -body { coroutine foo ::apply [list {} {yield; yield 1; return 2}] list [foo] [foo] [catch foo msg] $msg } -result {1 2 1 {invalid command name "foo"}} - test coroutine-2.3 {self deletion on error return} -body { coroutine foo ::apply [list {} {yield;yield 1; error ouch!}] list [foo] [catch foo msg] $msg [catch foo msg] $msg } -result {1 1 ouch! 1 {invalid command name "foo"}} - test coroutine-2.4 {self deletion on other return} -body { coroutine foo ::apply [list {} {yield;yield 1; return -code 100 ouch!}] list [foo] [catch foo msg] $msg [catch foo msg] $msg } -result {1 100 ouch! 1 {invalid command name "foo"}} - test coroutine-2.5 {deletion of suspended coroutine} -body { coroutine foo ::apply [list {} {yield; yield 1; return 2}] list [foo] [rename foo {}] [catch foo msg] $msg } -result {1 {} 1 {invalid command name "foo"}} - test coroutine-2.6 {deletion of running coroutine} -body { coroutine foo ::apply [list {} {yield; rename foo {}; yield 1; return 2}] list [foo] [catch foo msg] $msg @@ -341,7 +319,6 @@ test coroutine-3.1 {info level computation} -setup { rename a {} rename b {} } -result {1 1 1} - test coroutine-3.2 {info frame computation} -setup { proc a {} {while 1 {yield [info frame]}} proc b {} foo @@ -354,7 +331,6 @@ test coroutine-3.2 {info frame computation} -setup { rename a {} rename b {} } -result 1 - test coroutine-3.3 {info coroutine} -setup { proc a {} {info coroutine} proc b {} a @@ -364,7 +340,6 @@ test coroutine-3.3 {info coroutine} -setup { rename a {} rename b {} } -result {} - test coroutine-3.4 {info coroutine} -setup { proc a {} {info coroutine} proc b {} a @@ -374,7 +349,6 @@ test coroutine-3.4 {info coroutine} -setup { rename a {} rename b {} } -result ::foo - test coroutine-3.5 {info coroutine} -setup { proc a {} {info coroutine} proc b {} {rename [info coroutine] {}; a} @@ -385,7 +359,6 @@ test coroutine-3.5 {info coroutine} -setup { rename b {} } -result {} - test coroutine-4.1 {bug #2093188} -setup { proc foo {} { set v 1 @@ -404,7 +377,6 @@ test coroutine-4.1 {bug #2093188} -setup { rename bar {} unset ::res } -result {{} 3 {{v {} write} {v {} write} {v {} unset}}} - test coroutine-4.2 {bug #2093188} -setup { proc foo {} { set v 1 @@ -424,7 +396,6 @@ test coroutine-4.2 {bug #2093188} -setup { rename bar {} unset ::res } -result {{} 3 {{v {} read} {v {} unset}}} - test coroutine-4.3 {bug #2093947} -setup { proc foo {} { set v 1 @@ -472,7 +443,6 @@ test coroutine-5.1 {right numLevels on coro return} -constraints {testnrelevels} set base [getNumLevel] lappend res [relativeLevel $base] eval {coroutine a foo} - # back to base level lappend res [relativeLevel $base] a @@ -491,7 +461,6 @@ test coroutine-5.1 {right numLevels on coro return} -constraints {testnrelevels} rename relativeLevel {} unset res } -result {0 0 0 0 0 0} - test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ -setup { proc nestedYield {{val {}}} { @@ -529,7 +498,7 @@ test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ rename relativeLevel {} unset res } -result {0 0 0 0} - + unset lambda if {[testConstraint testnrelevels]} { @@ -540,5 +509,8 @@ if {[testConstraint testnrelevels]} { # cleanup ::tcltest::cleanupTests - return + +# Local-Variables: +# mode: tcl +# End: -- cgit v0.12 From 34a2da49423f4a5836b9b4c6acd2f4f2b11f02ae Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 7 Sep 2009 14:47:16 +0000 Subject: Added another test case, "known bug" because of [Bug 2314561] incompleteness --- tests/coroutine.test | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/coroutine.test b/tests/coroutine.test index 9b26e09..b3ae02a 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.4 2009/09/07 09:43:32 dkf Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.5 2009/09/07 14:47:16 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -277,9 +277,13 @@ test coroutine-1.12 {proc as coroutine} -setup { rename moo {} rename foo {} } -result {16 24} -test coroutine-1.13 {subst as coroutine} { - list [coroutine foo subst {>>[yield a],[yield b]<<}] [foo x] [foo y] +test coroutine-1.13 {subst as coroutine: literal} { + list [coroutine foo eval {subst {>>[yield a],[yield b]<<}}] [foo x] [foo y] } {a b >>x,y<<} +test coroutine-1.14 {subst as coroutine: in variable} knownBug { + set pattern {>>[yield c],[yield d]<<} + list [coroutine foo eval {subst $pattern}] [foo p] [foo q] +} {c d >>p,q<<} test coroutine-2.1 {self deletion on return} -body { coroutine foo set x 3 @@ -511,6 +515,6 @@ if {[testConstraint testnrelevels]} { return -# Local-Variables: +# Local Variables: # mode: tcl # End: -- cgit v0.12 From 71c8cdedc9efe9c3ee31c2592cbd4cc63c6472b0 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 7 Sep 2009 19:59:59 +0000 Subject: * generic/tclParse.c Corrected line counting error in multi-command * tests/into.test: script substitutions. [Bug 2850901]. --- ChangeLog | 5 +++++ generic/tclParse.c | 4 ++++ tests/info.test | 7 ++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3ada763..ead2f52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-07 Don Porter + + * generic/tclParse.c Corrected line counting error in multi-command + * tests/into.test: script substitutions. [Bug 2850901]. + 2009-09-07 Daniel Steffen * generic/tclExecute.c: fix potential uninitialized variable use and diff --git a/generic/tclParse.c b/generic/tclParse.c index efb4422..939c5d1 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -2289,6 +2289,10 @@ TclSubstTokens( theline = line + adjust; code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, 0, theline, clNextOuter, outerScript); + + TclAdvanceLines(&line, tokenPtr->start+1, + tokenPtr->start + tokenPtr->size - 1); + /* * Restore flag reset by nested eval for future bracketed * commands and their cmdframe setup diff --git a/tests/info.test b/tests/info.test index e538a23..24c966a 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.66 2009/09/04 17:33:12 dgp Exp $ +# RCS: @(#) $Id: info.test,v 1.67 2009/09/07 19:59:59 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1823,6 +1823,11 @@ test info-30.47 {TIP 280 for compiled [subst]} { [dict get [info frame 0] line])} ; # 1823 } YES +test info-30.48 {Bug 2850901} testevalex { + testevalex {return -level 0 [format %s {} +][reduce [info frame 0]]} ; # line 2 of the eval +} {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} + # ------------------------------------------------------------------------- # cleanup -- cgit v0.12 From 5a6e90c59531d0de0bb1a203987bf1e8972b4ddc Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 10 Sep 2009 21:20:00 +0000 Subject: Correct handling of quoted charset names. [Bug 2849860] --- ChangeLog | 23 ++++++++++++++--------- library/http/http.tcl | 12 +++++++++--- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ead2f52..4620b9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,28 +1,33 @@ +2009-09-10 Donal K. Fellows + + * library/http/http.tcl (http::Event): [Bug 2849860]: Handle charset + names in double quotes; some servers like generating them like that. + 2009-09-07 Don Porter - * generic/tclParse.c Corrected line counting error in multi-command - * tests/into.test: script substitutions. [Bug 2850901]. + * generic/tclParse.c: [Bug 2850901]: Corrected line counting error + * tests/into.test: in multi-command script substitutions. 2009-09-07 Daniel Steffen - * generic/tclExecute.c: fix potential uninitialized variable use and + * generic/tclExecute.c: Fix potential uninitialized variable use and * generic/tclFCmd.c: null dereference flagged by clang static * generic/tclProc.c: analyzer. * generic/tclTimer.c: * generic/tclUtf.c: - * generic/tclExecute.c: silence false positives from clang static + * generic/tclExecute.c: Silence false positives from clang static * generic/tclIO.c: analyzer about potential null dereference. * generic/tclScan.c: * generic/tclCompExpr.c: 2009-09-04 Don Porter - * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecode - * generic/tclBasic.c: compiler routine for the [subst] command. - * generic/tclCmdMZ.c: This is a partial solution to the need to - * generic/tclCompile.c: NR-enable [subst] since bytecode execution is - * generic/tclCompile.h: already NR-enabled. [Bug 2314561] Two new + * generic/tclCompCmds.c (TclCompileSubstCmd): [Bug 2314561]: + * generic/tclBasic.c: Added a bytecode compiler routine for the + * generic/tclCmdMZ.c: [subst] command. This is a partial solution to + * generic/tclCompile.c: the need to NR-enable [subst] since bytecode + * generic/tclCompile.h: execution is already NR-enabled. Two new * generic/tclExecute.c: bytecode instructions, INST_NOP and * generic/tclInt.h: INST_RETURN_CODE_BRANCH were added to support * generic/tclParse.c: the new routine. INST_RETURN_CODE_BRANCH is diff --git a/library/http/http.tcl b/library/http/http.tcl index 654d8b0..18487fb 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.76 2009/04/19 18:27:59 patthoyts Exp $ +# RCS: @(#) $Id: http.tcl,v 1.77 2009/09/10 21:20:01 dkf Exp $ package require Tcl 8.6 # Keep this in sync with pkgIndex.tcl and with the install directories in @@ -1030,8 +1030,14 @@ proc http::Event {sock token} { content-type { set state(type) [string trim [string tolower $value]] # grab the optional charset information - regexp -nocase {charset\s*=\s*(\S+?);?} \ - $state(type) -> state(charset) + if {[regexp -nocase \ + {charset\s*=\s*\"((?:[^""]|\\\")*)\"} \ + $state(type) -> cs]} { + set state(charset) [string map {{\"} \"} $cs] + } else { + regexp -nocase {charset\s*=\s*(\S+?);?} \ + $state(type) -> state(charset) + } } content-length { set state(totalsize) [string trim $value] -- cgit v0.12 From 8bfbb0cd8dbc0d85beef1db77403d7c60a39df65 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 11 Sep 2009 15:45:19 +0000 Subject: Clean up http tokens properly. --- ChangeLog | 5 ++ tests/http.test | 269 ++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 167 insertions(+), 107 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4620b9f..a597ccc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-11 Donal K. Fellows + + * tests/http.test: Added in cleaning up of http tokens for each test + to reduce amount of global-variable pollution. + 2009-09-10 Donal K. Fellows * library/http/http.tcl (http::Event): [Bug 2849860]: Handle charset diff --git a/tests/http.test b/tests/http.test index 2516a48..a62f1c1 100644 --- a/tests/http.test +++ b/tests/http.test @@ -1,23 +1,20 @@ # Commands covered: http::config, http::geturl, http::wait, http::reset # # This file contains a collection of tests for the http script library. -# Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# Sourcing this file into Tcl runs the tests and generates output for errors. +# No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-2000 by Ajuba Solutions. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# -# RCS: @(#) $Id: http.test,v 1.53 2009/06/24 15:17:40 dgp Exp $ +# RCS: @(#) $Id: http.test,v 1.54 2009/09/11 15:45:19 dkf Exp $ -if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest 2 - namespace import -force ::tcltest::* -} +package require tcltest 2 +namespace import -force ::tcltest::* if {[catch {package require http 2} version]} { if {[info exists http2]} { @@ -81,7 +78,7 @@ if {[info commands testthread] == "testthread" && [file exists $httpdFile]} { set port [lindex [fconfigure $listen -sockname] 2] } } - + test http-1.1 {http::config} { http::config -useragent UserAgent http::config @@ -101,34 +98,37 @@ test http-1.4 {http::config} { http::config {*}$savedconf set x } {-accept */* -proxyfilter myFilter -proxyhost nowhere.come -proxyport 8080 -urlencoding iso8859-1 -useragent {Tcl Test Suite}} -test http-1.5 {http::config} { - list [catch {http::config -proxyhost {} -junk 8080} msg] $msg -} {1 {Unknown option -junk, must be: -accept, -proxyfilter, -proxyhost, -proxyport, -urlencoding, -useragent}} -test http-1.6 {http::config} { +test http-1.5 {http::config} -returnCodes error -body { + http::config -proxyhost {} -junk 8080 +} -result {Unknown option -junk, must be: -accept, -proxyfilter, -proxyhost, -proxyport, -urlencoding, -useragent} +test http-1.6 {http::config} -setup { + set oldenc [http::config -urlencoding] +} -body { set enc [list [http::config -urlencoding]] http::config -urlencoding iso8859-1 lappend enc [http::config -urlencoding] - http::config -urlencoding [lindex $enc 0] - set enc -} {utf-8 iso8859-1} +} -cleanup { + http::config -urlencoding $oldenc +} -result {utf-8 iso8859-1} test http-2.1 {http::reset} { catch {http::reset http#1} } 0 -test http-3.1 {http::geturl} { - list [catch {http::geturl -bogus flag} msg] $msg -} {1 {Unknown option flag, can be: -binary, -blocksize, -channel, -command, -handler, -headers, -keepalive, -method, -myaddr, -progress, -protocol, -query, -queryblocksize, -querychannel, -queryprogress, -strict, -timeout, -type, -validate}} -test http-3.2 {http::geturl} { - catch {http::geturl http:junk} err - set err -} {Unsupported URL: http:junk} +test http-3.1 {http::geturl} -returnCodes error -body { + http::geturl -bogus flag +} -result {Unknown option flag, can be: -binary, -blocksize, -channel, -command, -handler, -headers, -keepalive, -method, -myaddr, -progress, -protocol, -query, -queryblocksize, -querychannel, -queryprogress, -strict, -timeout, -type, -validate} +test http-3.2 {http::geturl} -returnCodes error -body { + http::geturl http:junk +} -result {Unsupported URL: http:junk} set url //[info hostname]:$port set badurl //[info hostname]:6666 -test http-3.3 {http::geturl} { +test http-3.3 {http::geturl} -body { set token [http::geturl $url] http::data $token -} "HTTP/1.0 TEST +} -cleanup { + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

GET /

" @@ -138,10 +138,12 @@ set fullurl http://user:pass@[info hostname]:$port/a/b/c set binurl //[info hostname]:$port/binary set posturl //[info hostname]:$port/post set badposturl //[info hostname]:$port/droppost -test http-3.4 {http::geturl} { +test http-3.4 {http::geturl} -body { set token [http::geturl $url] http::data $token -} "HTTP/1.0 TEST +} -cleanup { + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

GET $tail

" @@ -149,35 +151,43 @@ proc selfproxy {host} { global port return [list [info hostname] $port] } -test http-3.5 {http::geturl} { +test http-3.5 {http::geturl} -body { http::config -proxyfilter selfproxy set token [http::geturl $url] - http::config -proxyfilter http::ProxyRequired http::data $token -} "HTTP/1.0 TEST +} -cleanup { + http::config -proxyfilter http::ProxyRequired + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

GET http:$url

" -test http-3.6 {http::geturl} { +test http-3.6 {http::geturl} -body { http::config -proxyfilter bogus set token [http::geturl $url] - http::config -proxyfilter http::ProxyRequired http::data $token -} "HTTP/1.0 TEST +} -cleanup { + http::config -proxyfilter http::ProxyRequired + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

GET $tail

" -test http-3.7 {http::geturl} { +test http-3.7 {http::geturl} -body { set token [http::geturl $url -headers {Pragma no-cache}] http::data $token -} "HTTP/1.0 TEST +} -cleanup { + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

GET $tail

" -test http-3.8 {http::geturl} { +test http-3.8 {http::geturl} -body { set token [http::geturl $url -query Name=Value&Foo=Bar -timeout 2000] http::data $token -} "HTTP/1.0 TEST +} -cleanup { + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

POST $tail

Query

@@ -186,11 +196,13 @@ test http-3.8 {http::geturl} {
Foo
Bar " -test http-3.9 {http::geturl} { +test http-3.9 {http::geturl} -body { set token [http::geturl $url -validate 1] http::code $token -} "HTTP/1.0 200 OK" -test http-3.10 {http::geturl queryprogress} { +} -cleanup { + http::cleanup $token +} -result "HTTP/1.0 200 OK" +test http-3.10 {http::geturl queryprogress} -setup { set query foo=bar set sep "" set i 0 @@ -200,7 +212,7 @@ test http-3.10 {http::geturl queryprogress} { append query $sep$query set sep & } - +} -body { proc postProgress {token x y} { global postProgress lappend postProgress $y @@ -210,8 +222,10 @@ test http-3.10 {http::geturl queryprogress} { -queryprogress postProgress -queryblocksize 16384] http::wait $t list [http::status $t] [string length $query] $postProgress [http::data $t] -} {ok 122879 {16384 32768 49152 65536 81920 98304 114688 122879} {Got 122879 bytes}} -test http-3.11 {http::geturl querychannel with -command} { +} -cleanup { + http::cleanup $t +} -result {ok 122879 {16384 32768 49152 65536 81920 98304 114688 122879} {Got 122879 bytes}} +test http-3.11 {http::geturl querychannel with -command} -setup { set query foo=bar set sep "" set i 0 @@ -222,8 +236,8 @@ test http-3.11 {http::geturl querychannel with -command} { set sep & } set file [makeFile $query outdata] +} -body { set fp [open $file] - proc asyncCB {token} { global postResult lappend postResult [http::data $token] @@ -232,7 +246,6 @@ test http-3.11 {http::geturl querychannel with -command} { set t [http::geturl $posturl -querychannel $fp] http::wait $t set testRes [list [http::status $t] [string length $query] [http::data $t]] - # Now do async http::cleanup $t close $fp @@ -241,17 +254,17 @@ test http-3.11 {http::geturl querychannel with -command} { set postResult [list PostStart] http::wait $t close $fp - lappend testRes [http::status $t] $postResult +} -cleanup { removeFile outdata - set testRes -} {ok 122879 {Got 122880 bytes} ok {PostStart {Got 122880 bytes}}} + http::cleanup $t +} -result {ok 122879 {Got 122880 bytes} ok {PostStart {Got 122880 bytes}}} # On Linux platforms when the client and server are on the same host, the # client is unable to read the server's response one it hits the write error. # The status is "eof". # On Windows, the http::wait procedure gets a "connection reset by peer" error # while reading the reply. -test http-3.12 {http::geturl querychannel with aborted request} {nonPortable} { +test http-3.12 {http::geturl querychannel with aborted request} -setup { set query foo=bar set sep "" set i 0 @@ -262,8 +275,8 @@ test http-3.12 {http::geturl querychannel with aborted request} {nonPortable} { set sep & } set file [makeFile $query outdata] +} -constraints {nonPortable} -body { set fp [open $file] - proc asyncCB {token} { global postResult lappend postResult [http::data $token] @@ -284,10 +297,11 @@ test http-3.12 {http::geturl querychannel with aborted request} {nonPortable} { puts $::errorInfo error $err } - - removeFile outdata list [http::status $t] [http::code $t] -} {ok {HTTP/1.0 200 Data follows}} +} -cleanup { + removeFile outdata + http::cleanup $t +} -result {ok {HTTP/1.0 200 Data follows}} test http-3.13 {http::geturl socket leak test} { set chanCount [llength [file channels]] for {set i 0} {$i < 3} {incr i} { @@ -297,10 +311,12 @@ test http-3.13 {http::geturl socket leak test} { # No extra channels should be taken expr {[llength [file channels]] == $chanCount} } 1 -test http-3.14 "http::geturl $fullurl" { +test http-3.14 "http::geturl $fullurl" -body { set token [http::geturl $fullurl -validate 1] http::code $token -} "HTTP/1.0 200 OK" +} -cleanup { + http::cleanup $token +} -result "HTTP/1.0 200 OK" test http-3.15 {http::geturl parse failures} -body { http::geturl "{invalid}:url" } -returnCodes error -result {Unsupported URL: {invalid}:url} @@ -338,6 +354,7 @@ test http-3.25 {http::meta} -setup { array set m [http::meta $token] lsort [array names m] } -cleanup { + http::cleanup $token unset -nocomplain m token } -result {Content-Length Content-Type Date} test http-3.26 {http::meta} -setup { @@ -347,61 +364,77 @@ test http-3.26 {http::meta} -setup { array set m [http::meta $token] lsort [array names m] } -cleanup { + http::cleanup $token unset -nocomplain m token } -result {Content-Length Content-Type Date X-Check} -test http-4.1 {http::Event} { +test http-4.1 {http::Event} -body { set token [http::geturl $url -keepalive 0] upvar #0 $token data array set meta $data(meta) expr {($data(totalsize) == $meta(Content-Length))} -} 1 -test http-4.2 {http::Event} { +} -cleanup { + http::cleanup $token +} -result 1 +test http-4.2 {http::Event} -body { set token [http::geturl $url] upvar #0 $token data array set meta $data(meta) string compare $data(type) [string trim $meta(Content-Type)] -} 0 -test http-4.3 {http::Event} { +} -cleanup { + http::cleanup $token +} -result 0 +test http-4.3 {http::Event} -body { set token [http::geturl $url] http::code $token -} {HTTP/1.0 200 Data follows} -test http-4.4 {http::Event} { +} -cleanup { + http::cleanup $token +} -result {HTTP/1.0 200 Data follows} +test http-4.4 {http::Event} -setup { set testfile [makeFile "" testfile] +} -body { set out [open $testfile w] set token [http::geturl $url -channel $out] close $out set in [open $testfile] set x [read $in] - close $in +} -cleanup { + catch {close $in} + catch {close $out} removeFile $testfile - set x -} "HTTP/1.0 TEST + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

GET $tail

" -test http-4.5 {http::Event} { +test http-4.5 {http::Event} -setup { set testfile [makeFile "" testfile] +} -body { set out [open $testfile w] fconfigure $out -translation lf set token [http::geturl $url -channel $out] close $out upvar #0 $token data - removeFile $testfile expr {$data(currentsize) == $data(totalsize)} -} 1 -test http-4.6 {http::Event} { +} -cleanup { + removeFile $testfile + http::cleanup $token +} -result 1 +test http-4.6 {http::Event} -setup { set testfile [makeFile "" testfile] +} -body { set out [open $testfile w] set token [http::geturl $binurl -channel $out] close $out set in [open $testfile] fconfigure $in -translation binary - set x [read $in] - close $in + read $in +} -cleanup { + catch {close $in} + catch {close $out} removeFile $testfile - set x -} "$bindata[string trimleft $binurl /]" + http::cleanup $token +} -result "$bindata[string trimleft $binurl /]" proc myProgress {token total current} { global progress httpLog if {[info exists httpLog] && $httpLog} { @@ -414,46 +447,60 @@ if 0 { set httpLog 1 test http-4.6.1 {http::Event} knownBug { set token [http::geturl $url -blocksize 50 -progress myProgress] - set progress + return $progress } {111 111} } -test http-4.7 {http::Event} { +test http-4.7 {http::Event} -body { set token [http::geturl $url -keepalive 0 -progress myProgress] - set progress -} {111 111} -test http-4.8 {http::Event} { + return $progress +} -cleanup { + http::cleanup $token +} -result {111 111} +test http-4.8 {http::Event} -body { set token [http::geturl $url] http::status $token -} {ok} -test http-4.9 {http::Event} { +} -cleanup { + http::cleanup $token +} -result {ok} +test http-4.9 {http::Event} -body { set token [http::geturl $url -progress myProgress] http::code $token -} {HTTP/1.0 200 Data follows} -test http-4.10 {http::Event} { +} -cleanup { + http::cleanup $token +} -result {HTTP/1.0 200 Data follows} +test http-4.10 {http::Event} -body { set token [http::geturl $url -progress myProgress] http::size $token -} {111} +} -cleanup { + http::cleanup $token +} -result {111} # Timeout cases # Short timeout to working server (the test server). This lets us try a # reset during the connection. -test http-4.11 {http::Event} { - set token [http::geturl $url -timeout 1 -keepalive 0 -command {#}] +test http-4.11 {http::Event} -body { + set token [http::geturl $url -timeout 1 -keepalive 0 -command \#] http::reset $token http::status $token -} {reset} +} -cleanup { + http::cleanup $token +} -result {reset} # Longer timeout with reset. -test http-4.12 {http::Event} { - set token [http::geturl $url/?timeout=10 -keepalive 0 -command {#}] +test http-4.12 {http::Event} -body { + set token [http::geturl $url/?timeout=10 -keepalive 0 -command \#] http::reset $token http::status $token -} {reset} +} -cleanup { + http::cleanup $token +} -result {reset} # Medium timeout to working server that waits even longer. The timeout # hits while waiting for a reply. -test http-4.13 {http::Event} { - set token [http::geturl $url?timeout=30 -keepalive 0 -timeout 10 -command {#}] +test http-4.13 {http::Event} -body { + set token [http::geturl $url?timeout=30 -keepalive 0 -timeout 10 -command \#] http::wait $token http::status $token -} {timeout} +} -cleanup { + http::cleanup $token +} -result {timeout} # Longer timeout to good host, bad port, gets an error after the # connection "completes" but the socket is bad. test http-4.14 {http::Event} -body { @@ -464,7 +511,9 @@ test http-4.14 {http::Event} -body { http::wait $token http::status $token # error code varies among platforms. -} -returnCodes 1 -match regexp -result {(connect failed|couldn't open socket)} +} -returnCodes 1 -match regexp -cleanup { + catch {http::cleanup $token} +} -result {(connect failed|couldn't open socket)} # Bogus host test http-4.15 {http::Event} -body { # This test may fail if you use a proxy server. That is to be @@ -473,6 +522,8 @@ test http-4.15 {http::Event} -body { http::wait $token http::status $token # error codes vary among platforms. +} -cleanup { + http::cleanup $token } -returnCodes 1 -match glob -result "couldn't open socket*" test http-5.1 {http::formatQuery} { @@ -493,14 +544,16 @@ test http-5.5 {http::formatQuery} { set res } {name1=~bwelch&name2=%a1%a2%a2} -test http-6.1 {http::ProxyRequired} { +test http-6.1 {http::ProxyRequired} -body { http::config -proxyhost [info hostname] -proxyport $port set token [http::geturl $url] http::wait $token - http::config -proxyhost {} -proxyport {} upvar #0 $token data set data(body) -} "HTTP/1.0 TEST +} -cleanup { + http::config -proxyhost {} -proxyport {} + http::cleanup $token +} -result "HTTP/1.0 TEST

Hello, World!

GET http:$url

" @@ -513,24 +566,26 @@ test http-7.2 {http::mapReply} { # so make sure this gets converted to utf-8 then urlencoded. http::mapReply "\u2208" } {%e2%88%88} -test http-7.3 {http::formatQuery} { +test http-7.3 {http::formatQuery} -setup { set enc [http::config -urlencoding] +} -returnCodes error -body { # this would be reverting to http <=2.4 behavior http::config -urlencoding "" - set res [list [catch {http::mapReply "\u2208"} msg] $msg] + http::mapReply "\u2208" +} -cleanup { http::config -urlencoding $enc - set res -} [list 1 "can't read \"formMap(\u2208)\": no such element in array"] -test http-7.4 {http::formatQuery} { +} -result "can't read \"formMap(\u2208)\": no such element in array" +test http-7.4 {http::formatQuery} -setup { set enc [http::config -urlencoding] +} -body { # this would be reverting to http <=2.4 behavior w/o errors # (unknown chars become '?') http::config -urlencoding "iso8859-1" - set res [http::mapReply "\u2208"] + http::mapReply "\u2208" +} -cleanup { http::config -urlencoding $enc - set res -} {%3f} - +} -result {%3f} + # cleanup catch {unset url} catch {unset badurl} -- cgit v0.12 From c30ce8dcf495febef9d5111ae53ac2a614e593c1 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 11 Sep 2009 20:13:27 +0000 Subject: * generic/tclBasic.c: Completed the NR-enabling of [subst]. * generic/tclCmdMZ.c: [Bug 2314561]. * generic/tclCompCmds.c: * generic/tclCompile.c: * generic/tclInt.h: * tests/coroutine.test: * tests/parse.test: --- ChangeLog | 10 ++++ generic/tclBasic.c | 4 +- generic/tclCmdMZ.c | 22 +++---- generic/tclCompCmds.c | 37 ++++++++---- generic/tclCompile.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclInt.h | 8 ++- tests/coroutine.test | 4 +- tests/parse.test | 4 +- 8 files changed, 215 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index a597ccc..b0efb5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-09-11 Don Porter + + * generic/tclBasic.c: Completed the NR-enabling of [subst]. + * generic/tclCmdMZ.c: [Bug 2314561]. + * generic/tclCompCmds.c: + * generic/tclCompile.c: + * generic/tclInt.h: + * tests/coroutine.test: + * tests/parse.test: + 2009-09-11 Donal K. Fellows * tests/http.test: Added in cleaning up of http tokens for each test diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b5abbc2..7064b86 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.403 2009/09/04 17:33:11 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.404 2009/09/11 20:13:27 dgp Exp $ */ #include "tclInt.h" @@ -213,7 +213,7 @@ static const CmdInfo builtInCmds[] = { {"scan", Tcl_ScanObjCmd, NULL, NULL, 1}, {"set", Tcl_SetObjCmd, TclCompileSetCmd, NULL, 1}, {"split", Tcl_SplitObjCmd, NULL, NULL, 1}, - {"subst", Tcl_SubstObjCmd, TclCompileSubstCmd, NULL, 1}, + {"subst", Tcl_SubstObjCmd, TclCompileSubstCmd, TclNRSubstObjCmd, 1}, {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, TclNRSwitchObjCmd, 1}, {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index a5a2f1b..72b46af 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.192 2009/09/04 17:33:11 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.193 2009/09/11 20:13:27 dgp Exp $ */ #include "tclInt.h" @@ -3419,7 +3419,16 @@ Tcl_SubstObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tcl_Obj *resultPtr; + return Tcl_NRCallObjProc(interp, TclNRSubstObjCmd, dummy, objc, objv); +} + +int +TclNRSubstObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ int flags; if (objc < 2) { @@ -3431,14 +3440,7 @@ Tcl_SubstObjCmd( if (TclSubstOptions(interp, objc-2, objv+1, &flags) != TCL_OK) { return TCL_ERROR; } - - resultPtr = Tcl_SubstObj(interp, objv[objc-1], flags); - - if (resultPtr == NULL) { - return TCL_ERROR; - } - Tcl_SetObjResult(interp, resultPtr); - return TCL_OK; + return TclNRSubstObj(interp, objv[objc-1], flags); } /* diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 9b33b41..6ec2265 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.156 2009/09/04 23:14:32 dgp Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.157 2009/09/11 20:13:27 dgp Exp $ */ #include "tclInt.h" @@ -3874,14 +3874,9 @@ TclCompileSubstCmd( int numOpts = numArgs - 1; int objc, flags = TCL_SUBST_ALL; Tcl_Obj **objv/*, *toSubst = NULL*/; - Tcl_Parse parse; - Tcl_InterpState state = NULL; Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); - int breakOffset = 0, count = 0, code = TCL_ERROR; - Tcl_Token *endTokenPtr, *tokenPtr; + int code = TCL_ERROR; DefineLineInformation; /* TIP #280 */ - int bline = mapPtr->loc[eclIndex].line[numArgs]; - SetLineInformation(numArgs); if (numArgs == 0) { return TCL_ERROR; @@ -3925,8 +3920,29 @@ TclCompileSubstCmd( return TCL_ERROR; } - TclSubstParse(interp, /*toSubst,*/ wordTokenPtr[1].start, - wordTokenPtr[1].size, flags, &parse, &state); + SetLineInformation(numArgs); + TclSubstCompile(interp, wordTokenPtr[1].start, wordTokenPtr[1].size, flags, + mapPtr->loc[eclIndex].line[numArgs], envPtr); + +/* TclDecrRefCount(toSubst);*/ + return TCL_OK; +} + +void +TclSubstCompile( + Tcl_Interp *interp, + const char *bytes, + int numBytes, + int flags, + int line, + CompileEnv *envPtr) +{ + Tcl_Token *endTokenPtr, *tokenPtr; + int breakOffset = 0, count = 0, bline = line; + Tcl_Parse parse; + Tcl_InterpState state = NULL; + + TclSubstParse(interp, bytes, numBytes, flags, &parse, &state); for (tokenPtr = parse.tokenPtr, endTokenPtr = tokenPtr + parse.numTokens; tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) { @@ -4101,7 +4117,6 @@ TclCompileSubstCmd( } Tcl_FreeParse(&parse); -/* TclDecrRefCount(toSubst);*/ if (state != NULL) { Tcl_RestoreInterpState(interp, state); @@ -4113,8 +4128,6 @@ TclCompileSubstCmd( TclUpdateInstInt4AtPc(INST_JUMP4, CurrentOffset(envPtr) - breakOffset, envPtr->codeStart + breakOffset); } - - return TCL_OK; } /* diff --git a/generic/tclCompile.c b/generic/tclCompile.c index b6b270b..3fa57db 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.173 2009/09/04 17:33:11 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.174 2009/09/11 20:13:27 dgp Exp $ */ #include "tclInt.h" @@ -413,6 +413,8 @@ InstructionDesc const tclInstructionTable[] = { * Prototypes for procedures defined later in this file: */ +static ByteCode * CompileSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, + int flags); static void DupByteCodeInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static unsigned char * EncodeCmdLocMap(CompileEnv *envPtr, @@ -422,6 +424,7 @@ static void EnterCmdExtentData(CompileEnv *envPtr, static void EnterCmdStartData(CompileEnv *envPtr, int cmdNumber, int srcOffset, int codeOffset); static void FreeByteCodeInternalRep(Tcl_Obj *objPtr); +static void FreeSubstCodeInternalRep(Tcl_Obj *objPtr); static int GetCmdLocEncodingSize(CompileEnv *envPtr); #ifdef TCL_COMPILE_STATS static void RecordByteCodeStats(ByteCode *codePtr); @@ -453,6 +456,19 @@ const Tcl_ObjType tclByteCodeType = { NULL, /* updateStringProc */ SetByteCodeFromAny /* setFromAnyProc */ }; + +/* + * The structure below defines a bytecode Tcl object type to hold the + * compiled bytecode for the [subst]itution of Tcl values. + */ + +static const Tcl_ObjType substCodeType = { + "substcode", /* name */ + FreeSubstCodeInternalRep, /* freeIntRepProc */ + DupByteCodeInternalRep, /* dupIntRepProc - shared with bytecode */ + NULL, /* updateStringProc */ + NULL, /* setFromAnyProc */ +}; /* *---------------------------------------------------------------------- @@ -859,6 +875,144 @@ TclCleanupByteCode( /* *---------------------------------------------------------------------- * + * TclNRSubstObj -- + * + * Request substitution of a Tcl value by the NR stack. + * + * Results: + * Returns TCL_OK. + * + * Side effects: + * Compiles objPtr into bytecode that performs the substitutions as + * governed by flags and places callbacks on the NR stack to execute + * the bytecode and store the result in the interp. + * + *---------------------------------------------------------------------- + */ + +int +TclNRSubstObj( + Tcl_Interp *interp, + Tcl_Obj *objPtr, + int flags) +{ + ByteCode *codePtr = CompileSubstObj(interp, objPtr, flags); + + /* TODO: Confirm we do not need this. */ + /* Tcl_ResetResult(interp); */ + Tcl_NRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), codePtr, + NULL, NULL); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * CompileSubstObj -- + * + * Compile a Tcl value into ByteCode implementing its substitution, + * as governed by flags. + * + * Results: + * A (ByteCode *) is returned pointing to the resulting ByteCode. + * The caller must manage its refCount and arrange for a call to + * TclCleanupByteCode() when the last reference disappears. + * + * Side effects: + * The Tcl_ObjType of objPtr is changed to the "substcode" type, + * and the ByteCode and governing flags value are kept in the internal + * rep for faster operations the next time CompileSubstObj is called + * on the same value. + * + *---------------------------------------------------------------------- + */ + +static ByteCode * +CompileSubstObj( + Tcl_Interp *interp, + Tcl_Obj *objPtr, + int flags) +{ + Interp *iPtr = (Interp *) interp; + ByteCode *codePtr = NULL; + + if (objPtr->typePtr == &substCodeType) { + Namespace *nsPtr = iPtr->varFramePtr->nsPtr; + + codePtr = (ByteCode *) objPtr->internalRep.ptrAndLongRep.ptr; + if (flags != objPtr->internalRep.ptrAndLongRep.value + || ((Interp *) *codePtr->interpHandle != iPtr) + || (codePtr->compileEpoch != iPtr->compileEpoch) + || (codePtr->nsPtr != nsPtr) + || (codePtr->nsEpoch != nsPtr->resolverEpoch) + || (codePtr->localCachePtr != + iPtr->varFramePtr->localCachePtr)) { + FreeSubstCodeInternalRep(objPtr); + } + } + if (objPtr->typePtr != &substCodeType) { + CompileEnv compEnv; + int numBytes; + const char *bytes = Tcl_GetStringFromObj(objPtr, &numBytes); + + /* TODO: Check for more TIP 280 */ + TclInitCompileEnv(interp, &compEnv, bytes, numBytes, NULL, 0); + + TclSubstCompile(interp, bytes, numBytes, flags, 1, &compEnv); + + TclEmitOpcode(INST_DONE, &compEnv); + TclInitByteCodeObj(objPtr, &compEnv); + objPtr->typePtr = &substCodeType; + TclFreeCompileEnv(&compEnv); + codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr; + objPtr->internalRep.ptrAndLongRep.ptr = codePtr; + objPtr->internalRep.ptrAndLongRep.value = flags; + if (iPtr->varFramePtr->localCachePtr) { + codePtr->localCachePtr = iPtr->varFramePtr->localCachePtr; + codePtr->localCachePtr->refCount++; + } + /* TODO: Debug printing? */ + } + return codePtr; +} + +/* + *---------------------------------------------------------------------- + * + * FreeSubstCodeInternalRep -- + * + * Part of the substcode Tcl object type implementation. Frees the storage + * associated with a substcode object's internal representation unless its + * code is actively being executed. + * + * Results: + * None. + * + * Side effects: + * The substcode object's internal rep is marked invalid and its code gets + * freed unless the code is actively being executed. In that case the + * cleanup is delayed until the last execution of the code completes. + * + *---------------------------------------------------------------------- + */ + +static void +FreeSubstCodeInternalRep( + register Tcl_Obj *objPtr) /* Object whose internal rep to free. */ +{ + register ByteCode *codePtr = objPtr->internalRep.ptrAndLongRep.ptr; + + codePtr->refCount--; + if (codePtr->refCount <= 0) { + TclCleanupByteCode(codePtr); + } + objPtr->typePtr = NULL; + objPtr->internalRep.otherValuePtr = NULL; +} + +/* + *---------------------------------------------------------------------- + * * TclInitCompileEnv -- * * Initializes a CompileEnv compilation environment structure for the diff --git a/generic/tclInt.h b/generic/tclInt.h index a27b0f4..6f7972f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.441 2009/09/07 06:20:47 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.442 2009/09/11 20:13:27 dgp Exp $ */ #ifndef _TCLINT @@ -2651,6 +2651,7 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRForeachCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRSourceObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRSubstObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRSwitchObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRTryObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd; @@ -2846,6 +2847,8 @@ MODULE_SCOPE int TclMarkList(Tcl_Interp *interp, const char *list, MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr, int *codePtr, int *levelPtr); +MODULE_SCOPE int TclNRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, + int flags); MODULE_SCOPE int TclNokia770Doubles(); MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const char *operation, @@ -2950,6 +2953,9 @@ MODULE_SCOPE int TclStringMatch(const char *str, int strLen, MODULE_SCOPE int TclStringMatchObj(Tcl_Obj *stringObj, Tcl_Obj *patternObj, int flags); MODULE_SCOPE Tcl_Obj * TclStringObjReverse(Tcl_Obj *objPtr); +MODULE_SCOPE void TclSubstCompile(Tcl_Interp *interp, const char *bytes, + int numBytes, int flags, int line, + struct CompileEnv *envPtr); MODULE_SCOPE int TclSubstOptions(Tcl_Interp *interp, int numOpts, Tcl_Obj *const opts[], int *flagPtr); MODULE_SCOPE void TclSubstParse(Tcl_Interp *interp, const char *bytes, diff --git a/tests/coroutine.test b/tests/coroutine.test index b3ae02a..776dda5 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.5 2009/09/07 14:47:16 dkf Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.6 2009/09/11 20:13:27 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -280,7 +280,7 @@ test coroutine-1.12 {proc as coroutine} -setup { test coroutine-1.13 {subst as coroutine: literal} { list [coroutine foo eval {subst {>>[yield a],[yield b]<<}}] [foo x] [foo y] } {a b >>x,y<<} -test coroutine-1.14 {subst as coroutine: in variable} knownBug { +test coroutine-1.14 {subst as coroutine: in variable} { set pattern {>>[yield c],[yield d]<<} list [coroutine foo eval {subst $pattern}] [foo p] [foo q] } {c d >>p,q<<} diff --git a/tests/parse.test b/tests/parse.test index b745a97..482c3b8 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.37 2009/09/04 17:33:12 dgp Exp $ +# RCS: @(#) $Id: parse.test,v 1.38 2009/09/11 20:13:27 dgp Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -1048,7 +1048,7 @@ test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { interp delete i } -test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { +test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints knownBug -setup { interp create i i eval {proc {} args {}} interp recursionlimit i 2 -- cgit v0.12 From 251f50f6236ef99b2bf52ce136bb8d31798d86d6 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 12 Sep 2009 06:43:12 +0000 Subject: fix warning --- generic/tclCompile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 3fa57db..9fa8f6a 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.174 2009/09/11 20:13:27 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.175 2009/09/12 06:43:12 das Exp $ */ #include "tclInt.h" @@ -940,7 +940,7 @@ CompileSubstObj( Namespace *nsPtr = iPtr->varFramePtr->nsPtr; codePtr = (ByteCode *) objPtr->internalRep.ptrAndLongRep.ptr; - if (flags != objPtr->internalRep.ptrAndLongRep.value + if ((unsigned long)flags != objPtr->internalRep.ptrAndLongRep.value || ((Interp *) *codePtr->interpHandle != iPtr) || (codePtr->compileEpoch != iPtr->compileEpoch) || (codePtr->nsPtr != nsPtr) -- cgit v0.12 From b7c880a857b80f8c7e8c5338bf18a0bedd499061 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 16 Sep 2009 21:17:22 +0000 Subject: Extended ::tcl::unsupported::representation. --- ChangeLog | 4 ++++ generic/tclObj.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0efb5e..af6e767 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-09-16 Alexandre Ferrieux + + * generic/tclObj.c: Extended ::tcl::unsupported::representation. + 2009-09-11 Don Porter * generic/tclBasic.c: Completed the NR-enabling of [subst]. diff --git a/generic/tclObj.c b/generic/tclObj.c index 0bdb371..a6621e3 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.156 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.157 2009/09/16 21:17:24 ferrieux Exp $ */ #include "tclInt.h" @@ -4379,18 +4379,56 @@ Tcl_RepresentationCmd( int objc, Tcl_Obj *const objv[]) { + char s_refcount[TCL_INTEGER_SPACE+1]; + char s_tclobj[TCL_INTEGER_SPACE+1]; + char s_intrep[2*TCL_INTEGER_SPACE+3]; +#define TCLOBJ_TRUNCATE_STREP 16 + char s_strep[TCLOBJ_TRUNCATE_STREP+1]; + if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); return TCL_ERROR; } + + /* + value is a bignum with a refcount of 14, object pointer at + 0x12345678 and intrep 0x45671234:0x98765432, strep: "1872361827361287"... + */ + + sprintf(s_refcount,"%d",objv[1]->refCount); + sprintf(s_tclobj,"%p",(void *)objv[1]); + Tcl_AppendResult(interp, + "value is a ", + (objv[1]->typePtr != NULL)?objv[1]->typePtr->name:"pure string", + " with a refcount of ", + s_refcount, + ", object pointer at ", + s_tclobj, + NULL); + + if (objv[1]->typePtr != NULL) { + sprintf(s_intrep,"%p:%p",(void *)objv[1]->internalRep.twoPtrValue.ptr1,(void *)objv[1]->internalRep.twoPtrValue.ptr2); + Tcl_AppendResult(interp, + " and intrep ", + s_intrep, + NULL); + } - if (objv[1]->typePtr == NULL) { - Tcl_AppendResult(interp, "value has no internal representation set", - NULL); + if (objv[1]->bytes != NULL) { + strncpy(s_strep,objv[1]->bytes,TCLOBJ_TRUNCATE_STREP); + s_strep[TCLOBJ_TRUNCATE_STREP]=0; + Tcl_AppendResult(interp, + ", strep: \"", + s_strep, + (objv[1]->length>TCLOBJ_TRUNCATE_STREP)?"\"...":"\".", + NULL); } else { - Tcl_AppendResult(interp, "value has internal representation of ", - objv[1]->typePtr->name, " currently", NULL); + Tcl_AppendResult(interp, + ", no strep.", + NULL); + } + return TCL_OK; } @@ -4399,5 +4437,7 @@ Tcl_RepresentationCmd( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ -- cgit v0.12 From 5951ff339f3a77f54758ca0bfc35142130e9041a Mon Sep 17 00:00:00 2001 From: das Date: Thu, 17 Sep 2009 08:37:03 +0000 Subject: fix string buffer sizes for pointer printing fix whitespace, formatting & style to match codebase conventions --- generic/tclObj.c | 72 +++++++++++++++++++++++--------------------------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/generic/tclObj.c b/generic/tclObj.c index a6621e3..adcf131 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.157 2009/09/16 21:17:24 ferrieux Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.158 2009/09/17 08:37:03 das Exp $ */ #include "tclInt.h" @@ -4379,56 +4379,44 @@ Tcl_RepresentationCmd( int objc, Tcl_Obj *const objv[]) { - char s_refcount[TCL_INTEGER_SPACE+1]; - char s_tclobj[TCL_INTEGER_SPACE+1]; - char s_intrep[2*TCL_INTEGER_SPACE+3]; -#define TCLOBJ_TRUNCATE_STREP 16 - char s_strep[TCLOBJ_TRUNCATE_STREP+1]; + char refcountBuffer[TCL_INTEGER_SPACE+1]; + char objPtrBuffer[TCL_INTEGER_SPACE+3]; + char internalRepBuffer[2*(TCL_INTEGER_SPACE+3)+1]; +#define TCLOBJ_TRUNCATE_STRINGREP 16 + char stringRepBuffer[TCLOBJ_TRUNCATE_STRINGREP+1]; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "value"); return TCL_ERROR; } - /* - value is a bignum with a refcount of 14, object pointer at - 0x12345678 and intrep 0x45671234:0x98765432, strep: "1872361827361287"... - */ - - sprintf(s_refcount,"%d",objv[1]->refCount); - sprintf(s_tclobj,"%p",(void *)objv[1]); - Tcl_AppendResult(interp, - "value is a ", - (objv[1]->typePtr != NULL)?objv[1]->typePtr->name:"pure string", - " with a refcount of ", - s_refcount, - ", object pointer at ", - s_tclobj, - NULL); - - if (objv[1]->typePtr != NULL) { - sprintf(s_intrep,"%p:%p",(void *)objv[1]->internalRep.twoPtrValue.ptr1,(void *)objv[1]->internalRep.twoPtrValue.ptr2); - Tcl_AppendResult(interp, - " and intrep ", - s_intrep, - NULL); - } + /* + * value is a bignum with a refcount of 14, object pointer at + * 0x12345678, internal representation 0x45671234:0x98765432, + * string representation "1872361827361287" + */ - if (objv[1]->bytes != NULL) { - strncpy(s_strep,objv[1]->bytes,TCLOBJ_TRUNCATE_STREP); - s_strep[TCLOBJ_TRUNCATE_STREP]=0; - Tcl_AppendResult(interp, - ", strep: \"", - s_strep, - (objv[1]->length>TCLOBJ_TRUNCATE_STREP)?"\"...":"\".", - NULL); + sprintf(refcountBuffer, "%d", objv[1]->refCount); + sprintf(objPtrBuffer, "%p", (void *)objv[1]); + Tcl_AppendResult(interp, "value is a ", objv[1]->typePtr ? + objv[1]->typePtr->name : "pure string", " with a refcount of ", + refcountBuffer, ", object pointer at ", objPtrBuffer, NULL); + if (objv[1]->typePtr) { + sprintf(internalRepBuffer, "%p:%p", + (void *)objv[1]->internalRep.twoPtrValue.ptr1, + (void *)objv[1]->internalRep.twoPtrValue.ptr2); + Tcl_AppendResult(interp, ", internal representation ", + internalRepBuffer, NULL); + } + if (objv[1]->bytes) { + strncpy(stringRepBuffer, objv[1]->bytes, TCLOBJ_TRUNCATE_STRINGREP); + stringRepBuffer[TCLOBJ_TRUNCATE_STRINGREP] = 0; + Tcl_AppendResult(interp, ", string representation \"", + stringRepBuffer, objv[1]->length > TCLOBJ_TRUNCATE_STRINGREP ? + "\"..." : "\".", NULL); } else { - Tcl_AppendResult(interp, - ", no strep.", - NULL); - + Tcl_AppendResult(interp, ", no string representation.", NULL); } - return TCL_OK; } -- cgit v0.12 From ae8aeadf52da208b9b4d7d603bdcdb53b615951a Mon Sep 17 00:00:00 2001 From: das Date: Thu, 17 Sep 2009 08:37:39 +0000 Subject: typo --- generic/tclObj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclObj.c b/generic/tclObj.c index adcf131..73fcbcd 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.158 2009/09/17 08:37:03 das Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.159 2009/09/17 08:37:39 das Exp $ */ #include "tclInt.h" @@ -4381,7 +4381,7 @@ Tcl_RepresentationCmd( { char refcountBuffer[TCL_INTEGER_SPACE+1]; char objPtrBuffer[TCL_INTEGER_SPACE+3]; - char internalRepBuffer[2*(TCL_INTEGER_SPACE+3)+1]; + char internalRepBuffer[2*(TCL_INTEGER_SPACE+2)+1]; #define TCLOBJ_TRUNCATE_STRINGREP 16 char stringRepBuffer[TCLOBJ_TRUNCATE_STRINGREP+1]; -- cgit v0.12 From cfef008bffcfc7b272e5fd62ff6f62f333e0c4d3 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 17 Sep 2009 08:39:40 +0000 Subject: need to remember to save before commit... --- generic/tclObj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclObj.c b/generic/tclObj.c index 73fcbcd..2bbc009 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.159 2009/09/17 08:37:39 das Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.160 2009/09/17 08:39:40 das Exp $ */ #include "tclInt.h" @@ -4381,7 +4381,7 @@ Tcl_RepresentationCmd( { char refcountBuffer[TCL_INTEGER_SPACE+1]; char objPtrBuffer[TCL_INTEGER_SPACE+3]; - char internalRepBuffer[2*(TCL_INTEGER_SPACE+2)+1]; + char internalRepBuffer[2*(TCL_INTEGER_SPACE+2)+2]; #define TCLOBJ_TRUNCATE_STRINGREP 16 char stringRepBuffer[TCLOBJ_TRUNCATE_STRINGREP+1]; -- cgit v0.12 From 76a7b7436a2b6d136bd796fbc2dd53cd3f4385dc Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 17 Sep 2009 17:58:09 +0000 Subject: * generic/tclCompile.c: Re-implement Tcl_SubstObj() as a simple * generic/tclParse.c: wrapper around TclNRSubstObj(). This has * tests/basic.test: the effect of caching compiled bytecode in * tests/parse.test: the value to be substituted. Note that Tcl_SubstObj() now exists only for extensions. Tcl itself no longer makes any use of it. Note also that TclSubstTokens() is now reachable only by Tcl_EvalEx() and Tcl_ParseVar() so tests aiming to test its functioning needed adjustment to still have the intended effect. --- ChangeLog | 11 ++++++ generic/tclCompile.c | 33 ++++++++++++++++- generic/tclParse.c | 101 ++++++++++----------------------------------------- tests/basic.test | 8 ++-- tests/parse.test | 31 +++++----------- 5 files changed, 77 insertions(+), 107 deletions(-) diff --git a/ChangeLog b/ChangeLog index af6e767..363e1a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-09-17 Don Porter + + * generic/tclCompile.c: Re-implement Tcl_SubstObj() as a simple + * generic/tclParse.c: wrapper around TclNRSubstObj(). This has + * tests/basic.test: the effect of caching compiled bytecode in + * tests/parse.test: the value to be substituted. Note that + Tcl_SubstObj() now exists only for extensions. Tcl itself no longer + makes any use of it. Note also that TclSubstTokens() is now reachable + only by Tcl_EvalEx() and Tcl_ParseVar() so tests aiming to test its + functioning needed adjustment to still have the intended effect. + 2009-09-16 Alexandre Ferrieux * generic/tclObj.c: Extended ::tcl::unsupported::representation. diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 9fa8f6a..36e24d2 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.175 2009/09/12 06:43:12 das Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.176 2009/09/17 17:58:10 dgp Exp $ */ #include "tclInt.h" @@ -875,6 +875,37 @@ TclCleanupByteCode( /* *---------------------------------------------------------------------- * + * Tcl_SubstObj -- + * + * This function performs the substitutions specified on the given string + * as described in the user documentation for the "subst" Tcl command. + * + * Results: + * A Tcl_Obj* containing the substituted string, or NULL to indicate that + * an error occurred. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +Tcl_Obj * +Tcl_SubstObj( + Tcl_Interp *interp, /* Interpreter in which substitution occurs */ + Tcl_Obj *objPtr, /* The value to be substituted. */ + int flags) /* What substitutions to do. */ +{ + if (TclNRRunCallbacks(interp, TclNRSubstObj(interp, objPtr, flags), + TOP_CB(interp), 0) != TCL_OK) { + return NULL; + } + return Tcl_GetObjResult(interp); +} + +/* + *---------------------------------------------------------------------- + * * TclNRSubstObj -- * * Request substitution of a Tcl value by the NR stack. diff --git a/generic/tclParse.c b/generic/tclParse.c index 939c5d1..b06b106 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -1865,17 +1865,26 @@ Tcl_ParseQuotedString( /* *---------------------------------------------------------------------- * - * Tcl_SubstObj -- - * - * This function performs the substitutions specified on the given string - * as described in the user documentation for the "subst" Tcl command. - * + * TclSubstParse -- + * + * Token parser used by the [subst] command. Parses the string made + * up of 'numBytes' bytes starting at 'bytes'. Parsing is controlled + * by the flags argument to provide support for the -nobackslashes, + * -nocommands, and -novariables options, as represented by the flag + * values TCL_SUBST_BACKSLASHES, TCL_SUBST_COMMANDS, TCL_SUBST_VARIABLES. + * * Results: - * A Tcl_Obj* containing the substituted string, or NULL to indicate that - * an error occurred. + * None. * * Side effects: - * See the user documentation. + * The Tcl_Parse struct '*parsePtr' is filled with parse results. + * The caller is expected to eventually call Tcl_FreeParse() to + * properly cleanup the value written there. + * If a parse error occurs, the Tcl_InterpState value '*statePtr' + * is filled with the state created by that error. When *statePtr + * is written to, the caller is expected to make the required calls + * to either Tcl_RestoreInterpState() or Tcl_DiscardInterpState() + * to dispose of the value written there. * *---------------------------------------------------------------------- */ @@ -1972,10 +1981,10 @@ TclSubstParse( parsePtr->tokenPtr + parsePtr->numTokens - 2; if (varTokenPtr->type != TCL_TOKEN_VARIABLE) { - Tcl_Panic("Tcl_SubstObj: programming error"); + Tcl_Panic("TclSubstParse: programming error"); } if (varTokenPtr[1].type != TCL_TOKEN_TEXT) { - Tcl_Panic("Tcl_SubstObj: programming error"); + Tcl_Panic("TclSubstParse: programming error"); } parsePtr->numTokens -= 2; } @@ -2049,78 +2058,8 @@ TclSubstParse( break; default: - Tcl_Panic("bad parse in Tcl_SubstObj: %c", p[length]); - } - } -} - -Tcl_Obj * -Tcl_SubstObj( - Tcl_Interp *interp, /* Interpreter in which substitution occurs */ - Tcl_Obj *objPtr, /* The value to be substituted. */ - int flags) /* What substitutions to do. */ -{ - int tokensLeft, code, numBytes; - Tcl_Token *endTokenPtr; - Tcl_Obj *result; - Tcl_Parse *parsePtr = (Tcl_Parse *) - TclStackAlloc(interp, sizeof(Tcl_Parse)); - Tcl_InterpState state = NULL; - const char *bytes = TclGetStringFromObj(objPtr, &numBytes); - - TclSubstParse(interp, bytes, numBytes, flags, parsePtr, &state); - - /* - * Next, substitute the parsed tokens just as in normal Tcl evaluation. - */ - - endTokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; - tokensLeft = parsePtr->numTokens; - code = TclSubstTokens(interp, endTokenPtr - tokensLeft, tokensLeft, - &tokensLeft, 1, NULL, NULL); - if (code == TCL_OK) { - Tcl_FreeParse(parsePtr); - TclStackFree(interp, parsePtr); - if (state != NULL) { - Tcl_RestoreInterpState(interp, state); - return NULL; - } - return Tcl_GetObjResult(interp); - } - - result = Tcl_NewObj(); - while (1) { - switch (code) { - case TCL_ERROR: - Tcl_FreeParse(parsePtr); - TclStackFree(interp, parsePtr); - Tcl_DecrRefCount(result); - if (state != NULL) { - Tcl_DiscardInterpState(state); - } - return NULL; - case TCL_BREAK: - tokensLeft = 0; /* Halt substitution */ - default: - Tcl_AppendObjToObj(result, Tcl_GetObjResult(interp)); + Tcl_Panic("bad parse in TclSubstParse: %c", p[length]); } - - if (tokensLeft == 0) { - Tcl_FreeParse(parsePtr); - TclStackFree(interp, parsePtr); - if (state != NULL) { - if (code != TCL_BREAK) { - Tcl_DecrRefCount(result); - Tcl_RestoreInterpState(interp, state); - return NULL; - } - Tcl_DiscardInterpState(state); - } - return result; - } - - code = TclSubstTokens(interp, endTokenPtr - tokensLeft, tokensLeft, - &tokensLeft, 1, NULL, NULL); } } diff --git a/tests/basic.test b/tests/basic.test index 881b329..c07d805 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: basic.test,v 1.45 2009/09/04 17:33:12 dgp Exp $ +# RCS: @(#) $Id: basic.test,v 1.46 2009/09/17 17:58:10 dgp Exp $ # package require tcltest 2 @@ -631,8 +631,10 @@ test basic-46.5 {Tcl_AllowExceptions: exception return not allowed} -setup { "return -code return" (file "*BREAKtest" line 2)} -test basic-47.1 {Tcl_EvalEx: check for missing close-bracket} -body { - set subst subst; $subst {a[set b [format cd]} +test basic-47.1 {Tcl_EvalEx: check for missing close-bracket} -constraints { + testevalex +} -body { + testevalex {a[set b [format cd]} } -returnCodes error -result {missing close-bracket} # Some lists for expansion tests to work with diff --git a/tests/parse.test b/tests/parse.test index 482c3b8..b83d20e 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.38 2009/09/11 20:13:27 dgp Exp $ +# RCS: @(#) $Id: parse.test,v 1.39 2009/09/17 17:58:10 dgp Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -895,8 +895,8 @@ test parse-15.60 {CommandComplete procedure} { info complete \\\n } 0 -test parse-16.1 {Tcl_EvalEx, check termOffset is set correctly for non TCL_OK cases, bug 2535} { - set subst subst; $subst {[eval {return foo}]bar} +test parse-16.1 {Bug 218885 (Scriptics bug 2535)} { + subst {[eval {return foo}]bar} } foobar test parse-17.1 {Correct return codes from errors during substitution} { @@ -1038,25 +1038,12 @@ test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { interp delete i } -returnCodes error -match glob -result {too many nested*} -test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { - interp create i - i eval {proc {} args {}} - interp recursionlimit i 3 -} -body { - i eval {set subst subst; $subst {[]}} -} -cleanup { - interp delete i -} - -test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints knownBug -setup { - interp create i - i eval {proc {} args {}} - interp recursionlimit i 2 -} -body { - i eval {set subst subst; $subst {[[]]}} -} -cleanup { - interp delete i -} -returnCodes error -match glob -result {too many nested*} +test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} emptyTest { + # Test no longer valid in Tcl 8.6 +} {} +test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} emptyTest { + # Test no longer valid in Tcl 8.6 +} {} cleanupTests } -- cgit v0.12 From 9badd9a07bfa6ee391090b99b1805824a894b856 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 21 Sep 2009 16:16:04 +0000 Subject: * generic/tclCompile.c: Correct botch in the conversion of Tcl_SubstObj(). Thanks to Kevin Kenny for detection and report. --- ChangeLog | 5 +++++ generic/tclCompile.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 363e1a1..d83e595 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-21 Don Porter + + * generic/tclCompile.c: Correct botch in the conversion of + Tcl_SubstObj(). Thanks to Kevin Kenny for detection and report. + 2009-09-17 Don Porter * generic/tclCompile.c: Re-implement Tcl_SubstObj() as a simple diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 36e24d2..7104f94 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.176 2009/09/17 17:58:10 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.177 2009/09/21 16:16:05 dgp Exp $ */ #include "tclInt.h" @@ -896,8 +896,10 @@ Tcl_SubstObj( Tcl_Obj *objPtr, /* The value to be substituted. */ int flags) /* What substitutions to do. */ { + TEOV_callback *rootPtr = TOP_CB(interp); + if (TclNRRunCallbacks(interp, TclNRSubstObj(interp, objPtr, flags), - TOP_CB(interp), 0) != TCL_OK) { + rootPtr, 0) != TCL_OK) { return NULL; } return Tcl_GetObjResult(interp); -- cgit v0.12 From 4fec8cdfead1265eae20b7fc9460b0d1bdc0e820 Mon Sep 17 00:00:00 2001 From: mdejong Date: Mon, 21 Sep 2009 21:30:41 +0000 Subject: * tests/regexp.test: Added check for error message from unbalanced [] in regexp. Added additional simple test cases of basic regsub command. --- ChangeLog | 6 ++++++ tests/regexp.test | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d83e595..b3614d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-09-21 Mo DeJong + + * tests/regexp.test: Added check for error message from + unbalanced [] in regexp. Added additional simple test cases + of basic regsub command. + 2009-09-21 Don Porter * generic/tclCompile.c: Correct botch in the conversion of diff --git a/tests/regexp.test b/tests/regexp.test index c4b4cab..2fe87b9 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.33 2008/08/21 23:19:51 hobbs Exp $ +# RCS: @(#) $Id: regexp.test,v 1.34 2009/09/21 21:30:41 mdejong Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -246,6 +246,9 @@ test regexp-6.8 {regexp errors} { test regexp-6.9 {regexp errors, -start bad int check} { list [catch {regexp -start bogus {^$} {}} msg] $msg } {1 {bad index "bogus": must be integer?[+-]integer? or end?[+-]integer?}} +test regexp-6.10 {regexp errors} { + list [catch {regexp {a[} b} msg] $msg +} {1 {couldn't compile regular expression pattern: brackets [] not balanced}} test regexp-7.1 {basic regsub operation} { list [regsub aa+ xaxaaaxaa 111&222 foo] $foo @@ -305,6 +308,15 @@ test regexp-7.17 {regsub utf compliance} { regsub a\u4e4eb xyza\u4e4ebijka\u4e4ebpqr 555 bar list [string compare $foo $bar] [regexp 4 $bar] } {0 0} +test regexp-7.18 {basic regsub replacement} { + list [regsub a+ aaa {&} foo] $foo +} {1 aaa} +test regexp-7.19 {basic regsub backslash replacement} { + list [regsub a+ aaa {\0} foo] $foo +} {1 aaa} +test regexp-7.20 {basic regsub backslash replacement} { + list [regsub a+ aaa {\\\0} foo] $foo +} {1 {\aaa}} test regexp-8.1 {case conversion in regsub} { list [regsub -nocase a(a+) xaAAaAAay & foo] $foo -- cgit v0.12 From 228d54da529d3af8f34d07a6007502fff640b733 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 22 Sep 2009 01:14:25 +0000 Subject: edit --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3614d4..ff10d34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2009-09-21 Mo DeJong * tests/regexp.test: Added check for error message from - unbalanced [] in regexp. Added additional simple test cases - of basic regsub command. + unbalanced [] in regexp. Added additional simple test cases + of basic regsub command. 2009-09-21 Don Porter -- cgit v0.12 From 4b18bbd6f4b8ba02af4fc3d8fe895b61280246c2 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 23 Sep 2009 23:36:50 +0000 Subject: * doc/namespace.n: the description of [namespace unknown] failed to mention [namespace path]: fixed. Thx emiliano. --- ChangeLog | 5 +++++ doc/namespace.n | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff10d34..aeb1218 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-23 Miguel Sofer + + * doc/namespace.n: the description of [namespace unknown] failed + to mention [namespace path]: fixed. Thx emiliano. + 2009-09-21 Mo DeJong * tests/regexp.test: Added check for error message from diff --git a/doc/namespace.n b/doc/namespace.n index dfd0467..52dde94 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.35 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.36 2009/09/23 23:36:50 msofer Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -296,7 +296,8 @@ used for qualified namespace or variable names. . Sets or returns the unknown command handler for the current namespace. The handler is invoked when a command called from within the namespace -cannot be found (in either the current namespace or the global namespace). +cannot be found in the current namespace, the namespace's path nor in +the global namespace. The \fIscript\fR argument, if given, should be a well formed list representing a command name and optional arguments. When the handler is invoked, the full invocation line will be appended to the -- cgit v0.12 From d979bd019aca7a87ce8bb62692fb3ebb66ff0117 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 24 Sep 2009 17:19:17 +0000 Subject: TIP #356 IMPLEMENTATION * generic/tcl.decls: Promote internal routine TclNRSubstObj() * generic/tclCmdMZ.c: to public Tcl_NRSubstObj(). Still needs docs. * generic/tclCompile.c: * generic/tclInt.h: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: --- ChangeLog | 12 ++++++++++++ generic/tcl.decls | 7 ++++++- generic/tclCmdMZ.c | 4 ++-- generic/tclCompile.c | 8 ++++---- generic/tclDecls.h | 13 ++++++++++++- generic/tclInt.h | 4 +--- generic/tclStubInit.c | 3 ++- 7 files changed, 39 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index aeb1218..bb2d572 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-09-24 Don Porter + + TIP #356 IMPLEMENTATION + + * generic/tcl.decls: Promote internal routine TclNRSubstObj() + * generic/tclCmdMZ.c: to public Tcl_NRSubstObj(). Still needs docs. + * generic/tclCompile.c: + * generic/tclInt.h: + + * generic/tclDecls.h: make genstubs + * generic/tclStubInit.c: + 2009-09-23 Miguel Sofer * doc/namespace.n: the description of [namespace unknown] failed diff --git a/generic/tcl.decls b/generic/tcl.decls index 26f3a83..b0644ae 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.170 2009/08/12 16:06:39 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.171 2009/09/24 17:19:17 dgp Exp $ library tcl @@ -2300,6 +2300,11 @@ declare 625 generic { int Tcl_NRExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *resultPtr) } +# TIP #356 (NR-enabled substitution) dgp +declare 626 generic { + int Tcl_NRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) +} + # ----- BASELINE -- FOR -- 8.6.0 ----- # ############################################################################## diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 72b46af..8824c48 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.193 2009/09/11 20:13:27 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.194 2009/09/24 17:19:18 dgp Exp $ */ #include "tclInt.h" @@ -3440,7 +3440,7 @@ TclNRSubstObjCmd( if (TclSubstOptions(interp, objc-2, objv+1, &flags) != TCL_OK) { return TCL_ERROR; } - return TclNRSubstObj(interp, objv[objc-1], flags); + return Tcl_NRSubstObj(interp, objv[objc-1], flags); } /* diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 7104f94..ed4e8f0 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.177 2009/09/21 16:16:05 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.178 2009/09/24 17:19:18 dgp Exp $ */ #include "tclInt.h" @@ -898,7 +898,7 @@ Tcl_SubstObj( { TEOV_callback *rootPtr = TOP_CB(interp); - if (TclNRRunCallbacks(interp, TclNRSubstObj(interp, objPtr, flags), + if (TclNRRunCallbacks(interp, Tcl_NRSubstObj(interp, objPtr, flags), rootPtr, 0) != TCL_OK) { return NULL; } @@ -908,7 +908,7 @@ Tcl_SubstObj( /* *---------------------------------------------------------------------- * - * TclNRSubstObj -- + * Tcl_NRSubstObj -- * * Request substitution of a Tcl value by the NR stack. * @@ -924,7 +924,7 @@ Tcl_SubstObj( */ int -TclNRSubstObj( +Tcl_NRSubstObj( Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 032fb75..23061a6 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.171 2009/08/12 16:06:43 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.172 2009/09/24 17:19:18 dgp Exp $ */ #ifndef _TCLDECLS @@ -3731,6 +3731,12 @@ EXTERN int Tcl_CloseEx (Tcl_Interp * interp, Tcl_Channel chan, EXTERN int Tcl_NRExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj * resultPtr); #endif +#ifndef Tcl_NRSubstObj_TCL_DECLARED +#define Tcl_NRSubstObj_TCL_DECLARED +/* 626 */ +EXTERN int Tcl_NRSubstObj (Tcl_Interp * interp, + Tcl_Obj * objPtr, int flags); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4392,6 +4398,7 @@ typedef struct TclStubs { Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ int (*tcl_CloseEx) (Tcl_Interp * interp, Tcl_Channel chan, int flags); /* 624 */ int (*tcl_NRExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj * resultPtr); /* 625 */ + int (*tcl_NRSubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 626 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6926,6 +6933,10 @@ extern const TclStubs *tclStubsPtr; #define Tcl_NRExprObj \ (tclStubsPtr->tcl_NRExprObj) /* 625 */ #endif +#ifndef Tcl_NRSubstObj +#define Tcl_NRSubstObj \ + (tclStubsPtr->tcl_NRSubstObj) /* 626 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclInt.h b/generic/tclInt.h index 6f7972f..d34be28 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.442 2009/09/11 20:13:27 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.443 2009/09/24 17:19:18 dgp Exp $ */ #ifndef _TCLINT @@ -2847,8 +2847,6 @@ MODULE_SCOPE int TclMarkList(Tcl_Interp *interp, const char *list, MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr, int *codePtr, int *levelPtr); -MODULE_SCOPE int TclNRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - int flags); MODULE_SCOPE int TclNokia770Doubles(); MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const char *operation, diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index c71b944..40b5e89 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.184 2009/08/12 16:06:44 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.185 2009/09/24 17:19:18 dgp Exp $ */ #include "tclInt.h" @@ -1110,6 +1110,7 @@ static const TclStubs tclStubs = { Tcl_GetStartupScript, /* 623 */ Tcl_CloseEx, /* 624 */ Tcl_NRExprObj, /* 625 */ + Tcl_NRSubstObj, /* 626 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 816780ff7b5566020f5e676eb6ca0e77c6347e41 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 26 Sep 2009 21:42:04 +0000 Subject: Added dummy tclooConfig.sh files for easier cross-version building. [2026844] --- ChangeLog | 6 ++++++ generic/tclOO.h | 8 ++++++-- unix/Makefile.in | 9 ++++++--- unix/tclooConfig.sh | 21 +++++++++++++++++++++ win/Makefile.in | 4 ++-- win/makefile.bc | 4 +++- win/makefile.vc | 3 ++- win/tclooConfig.sh | 21 +++++++++++++++++++++ 8 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 unix/tclooConfig.sh create mode 100644 win/tclooConfig.sh diff --git a/ChangeLog b/ChangeLog index bb2d572..d844a9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-09-26 Donal K. Fellows + + * unix/tclooConfig.sh, win/tclooConfig.sh: [Bug 2026844]: Added dummy + versions of tclooConfig.sh that make it easier to build extensions + against both Tcl8.5+TclOO-standalone and Tcl8.6. + 2009-09-24 Don Porter TIP #356 IMPLEMENTATION diff --git a/generic/tclOO.h b/generic/tclOO.h index 7bcb4a7..85bc514 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.h,v 1.7 2008/11/01 08:05:49 dkf Exp $ + * RCS: @(#) $Id: tclOO.h,v 1.8 2009/09/26 21:42:05 dkf Exp $ */ #ifndef TCLOO_H_INCLUDED @@ -25,7 +25,11 @@ /* * Be careful when it comes to versioning; need to make sure that the - * standalone TclOO version matches... + * standalone TclOO version matches. Also make sure that this matches the + * version in the files: + * + * unix/tclooConfig.sh + * win/tclooConfig.sh */ #define TCLOO_VERSION "0.6.1" diff --git a/unix/Makefile.in b/unix/Makefile.in index 044b156..64f35dd 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.275 2009/09/01 14:13:23 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.276 2009/09/26 21:42:05 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -769,6 +769,8 @@ install-binaries: binaries @$(INSTALL_PROGRAM) tclsh "$(BIN_INSTALL_DIR)"/tclsh$(VERSION) @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" @$(INSTALL_DATA) tclConfig.sh "$(CONFIG_INSTALL_DIR)"/tclConfig.sh + @echo "Installing tclooConfig.sh to $(CONFIG_INSTALL_DIR)/" + @$(INSTALL_DATA) tclooConfig.sh "$(CONFIG_INSTALL_DIR)"/tclooConfig.sh @if test "$(STUB_LIB_FILE)" != "" ; then \ echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \ @INSTALL_STUB_LIB@ ; \ @@ -1829,7 +1831,8 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(M chmod 664 $(DISTDIR)/unix/Makefile.in cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in \ $(UNIX_DIR)/tcl.m4 $(UNIX_DIR)/aclocal.m4 \ - $(UNIX_DIR)/tclConfig.sh.in $(UNIX_DIR)/install-sh \ + $(UNIX_DIR)/tclConfig.sh.in $(UNIX_DIR)/tclooConfig.sh \ + $(UNIX_DIR)/install-sh \ $(UNIX_DIR)/README $(UNIX_DIR)/ldAix $(UNIX_DIR)/tcl.spec \ $(UNIX_DIR)/installManPage $(UNIX_DIR)/tclConfig.h.in \ $(UNIX_DIR)/tcl.pc.in $(DISTDIR)/unix @@ -1879,7 +1882,7 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(M mkdir $(DISTDIR)/win cp $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win cp $(TOP_DIR)/win/configure.in $(TOP_DIR)/win/configure \ - $(TOP_DIR)/win/tclConfig.sh.in \ + $(TOP_DIR)/win/tclConfig.sh.in $(TOP_DIR)/win/tclooConfig.sh \ $(TOP_DIR)/win/tcl.m4 $(TOP_DIR)/win/aclocal.m4 \ $(DISTDIR)/win cp -p $(TOP_DIR)/win/*.[ch] $(TOP_DIR)/win/*.ico $(TOP_DIR)/win/*.rc \ diff --git a/unix/tclooConfig.sh b/unix/tclooConfig.sh new file mode 100644 index 0000000..565fe98 --- /dev/null +++ b/unix/tclooConfig.sh @@ -0,0 +1,21 @@ +# tclooConfig.sh -- +# +# This shell script (for sh) is generated automatically by TclOO's configure +# script, or would be except it has no values that we substitute. It will +# create shell variables for most of the configuration options discovered by +# the configure script. This script is intended to be included by TEA-based +# configure scripts for TclOO extensions so that they don't have to figure +# this all out for themselves. +# +# The information in this file is specific to a single platform. +# +# RCS: @(#) $Id: tclooConfig.sh,v 1.1 2009/09/26 21:42:05 dkf Exp $ + +# These are mostly empty because no special steps are ever needed from Tcl 8.6 +# onwards; all libraries and include files are just part of Tcl. +TCLOO_LIB_SPEC="" +TCLOO_STUB_LIB_SPEC="" +TCLOO_INCLUDE_SPEC="" +TCLOO_PRIVATE_INCLUDE_SPEC="" +TCLOO_CFLAGS=-DUSE_TCLOO_STUBS +TCLOO_VERSION=0.6.1 diff --git a/win/Makefile.in b/win/Makefile.in index ab56d80..1fee6c8 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.160 2009/09/01 14:13:23 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.161 2009/09/26 21:42:05 dkf Exp $ VERSION = @TCL_VERSION@ @@ -634,7 +634,7 @@ install-binaries: binaries $(COPY) $$i "$(BIN_INSTALL_DIR)"; \ fi; \ done - @for i in tclConfig.sh $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE); \ + @for i in tclConfig.sh tclooConfig.sh $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE); \ do \ if [ -f $$i ]; then \ echo "Installing $$i to $(LIB_INSTALL_DIR)/"; \ diff --git a/win/makefile.bc b/win/makefile.bc index 758eff6..7666309 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -420,6 +420,8 @@ install-binaries: $(TCLSH) @copy "$(TCLPIPEDLL)" "$(BIN_INSTALL_DIR)" @echo installing $(TCLSTUBLIBNAME) @copy "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)" + @echo installing $(WINDIR)\tclooConfig.sh + @copy "$(WINDIR)\tclooConfig.sh" "$(LIB_INSTALL_DIR)" install-libraries: -@$(MKDIR) "$(LIB_INSTALL_DIR)" @@ -429,7 +431,7 @@ install-libraries: -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http1.0" -@copy "$(ROOT)\library\http1.0\http.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" -@copy "$(ROOT)\library\http1.0\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" - @echo installing http2.7 + @echo installing http2.8 -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http2.8" -@copy "$(ROOT)\library\http\http.tcl" "$(SCRIPT_INSTALL_DIR)\http2.8" -@copy "$(ROOT)\library\http\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http2.8" diff --git a/win/makefile.vc b/win/makefile.vc index 0d4117f..6b525021 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.200 2009/07/11 08:57:08 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.201 2009/09/26 21:42:05 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -1110,6 +1110,7 @@ install-libraries: tclConfig install-msgs install-tzdata @$(CPY) "$(ROOT)\library\word.tcl" "$(SCRIPT_INSTALL_DIR)\" @$(CPY) "$(ROOT)\library\auto.tcl" "$(SCRIPT_INSTALL_DIR)\" @$(CPY) "$(OUT_DIR)\tclConfig.sh" "$(LIB_INSTALL_DIR)\" + @$(CPY) "$(WINDIR)\tclooConfig.sh" "$(LIB_INSTALL_DIR)\" @echo Installing library http1.0 directory @$(CPY) "$(ROOT)\library\http1.0\*.tcl" \ "$(SCRIPT_INSTALL_DIR)\http1.0\" diff --git a/win/tclooConfig.sh b/win/tclooConfig.sh new file mode 100644 index 0000000..565fe98 --- /dev/null +++ b/win/tclooConfig.sh @@ -0,0 +1,21 @@ +# tclooConfig.sh -- +# +# This shell script (for sh) is generated automatically by TclOO's configure +# script, or would be except it has no values that we substitute. It will +# create shell variables for most of the configuration options discovered by +# the configure script. This script is intended to be included by TEA-based +# configure scripts for TclOO extensions so that they don't have to figure +# this all out for themselves. +# +# The information in this file is specific to a single platform. +# +# RCS: @(#) $Id: tclooConfig.sh,v 1.1 2009/09/26 21:42:05 dkf Exp $ + +# These are mostly empty because no special steps are ever needed from Tcl 8.6 +# onwards; all libraries and include files are just part of Tcl. +TCLOO_LIB_SPEC="" +TCLOO_STUB_LIB_SPEC="" +TCLOO_INCLUDE_SPEC="" +TCLOO_PRIVATE_INCLUDE_SPEC="" +TCLOO_CFLAGS=-DUSE_TCLOO_STUBS +TCLOO_VERSION=0.6.1 -- cgit v0.12 From 46de449b25360bf9fc69f9e2acfc177db7dd7ee6 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 28 Sep 2009 03:22:04 +0000 Subject: * tests/error.test (error-15.8.*): Coverage tests illustrating flaws in the propagation of return options by [try]. --- ChangeLog | 5 +++++ tests/error.test | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d844a9c..f2071d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-27 Don Porter + + * tests/error.test (error-15.8.*): Coverage tests illustrating + flaws in the propagation of return options by [try]. + 2009-09-26 Donal K. Fellows * unix/tclooConfig.sh, win/tclooConfig.sh: [Bug 2026844]: Added dummy diff --git a/tests/error.test b/tests/error.test index 4eb765e..334ba29 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.19 2009/03/09 09:12:39 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.20 2009/09/28 03:22:04 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -491,6 +491,23 @@ test error-15.7 {try with no matching handler (unknown integer result propagates try { return -level 0 -code 123456 } trap {} {} { list a b c } } -returnCodes 123456 -result {} +foreach level {0 1 2} { + foreach code {0 1 2 3 4 5} { + + # Following cases have different -errorinfo; avoid false alarms + if {$level == 0 && $code == 1} continue + + foreach extras {{} {-bar soom}} { +test error-15.8.$level.$code.[llength $extras] {[try] coverage} { + set script {return -level $level -code $code {*}$extras foo} + catch $script m1 o1 + catch {try $script} m2 o2 + expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} +} ok + } + } +} + # try tests - propagation (exceptions in handlers, exception chaining) test error-16.1 {try with successfully executed handler} { -- cgit v0.12 From bf83bf5f46a2ec5105fac6f5a25b43535dcac49f Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 28 Sep 2009 16:34:39 +0000 Subject: * tests/error.test (error-15.9.*): More coverage tests for [try]. Test error-15.9.3.0.0 covers [Bug 2855247]. --- ChangeLog | 5 +++++ tests/error.test | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2071d7..86fd3b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-28 Don Porter + + * tests/error.test (error-15.9.*): More coverage tests for [try]. + Test error-15.9.3.0.0 covers [Bug 2855247]. + 2009-09-27 Don Porter * tests/error.test (error-15.8.*): Coverage tests illustrating diff --git a/tests/error.test b/tests/error.test index 334ba29..3106ca9 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.20 2009/09/28 03:22:04 dgp Exp $ +# RCS: @(#) $Id: error.test,v 1.21 2009/09/28 16:34:40 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -491,19 +491,28 @@ test error-15.7 {try with no matching handler (unknown integer result propagates try { return -level 0 -code 123456 } trap {} {} { list a b c } } -returnCodes 123456 -result {} -foreach level {0 1 2} { +foreach level {0 1 2 3} { foreach code {0 1 2 3 4 5} { # Following cases have different -errorinfo; avoid false alarms if {$level == 0 && $code == 1} continue foreach extras {{} {-bar soom}} { + test error-15.8.$level.$code.[llength $extras] {[try] coverage} { set script {return -level $level -code $code {*}$extras foo} catch $script m1 o1 catch {try $script} m2 o2 expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} } ok + +test error-15.9.$level.$code.[llength $extras] {[try] coverage} { + set script {return -level $level -code $code {*}$extras foo} + catch $script m1 o1 + catch {try $script finally {}} m2 o2 + expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} +} ok + } } } -- cgit v0.12 From 9ed15c4edf59c0dda55797c0debad69464c092c0 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 28 Sep 2009 18:02:19 +0000 Subject: * generic/tclCmdMZ.c: Replaced TclProcessReturn() calls with * tests/error.test: Tcl_SetReturnOptions() calls as a simple fix for [Bug 2855247]. Thanks to Anton Kovalenko for the report and fix. Additional fixes for other failures demonstrated by new tests. --- ChangeLog | 6 ++++-- generic/tclCmdMZ.c | 26 +++++++++----------------- tests/error.test | 16 +++++++++++++++- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86fd3b5..c0b5b3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ 2009-09-28 Don Porter - * tests/error.test (error-15.9.*): More coverage tests for [try]. - Test error-15.9.3.0.0 covers [Bug 2855247]. + * generic/tclCmdMZ.c: Replaced TclProcessReturn() calls with + * tests/error.test: Tcl_SetReturnOptions() calls as a simple fix + for [Bug 2855247]. Thanks to Anton Kovalenko for the report and fix. + Additional fixes for other failures demonstrated by new tests. 2009-09-27 Don Porter diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 8824c48..9aed082 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.194 2009/09/24 17:19:18 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.195 2009/09/28 18:02:20 dgp Exp $ */ #include "tclInt.h" @@ -4348,12 +4348,8 @@ TryPostBody( "\n (\"%s\" body line %d)", TclGetString(cmdObj), Tcl_GetErrorLine(interp))); } - if (handlersObj != NULL || finallyObj != NULL) { - options = Tcl_GetReturnOptions(interp, result); - Tcl_IncrRefCount(options); - } else { - options = NULL; - } + options = Tcl_GetReturnOptions(interp, result); + Tcl_IncrRefCount(options); Tcl_ResetResult(interp); /* @@ -4496,14 +4492,10 @@ TryPostBody( * any temporary storage. */ - if (options != NULL) { - result = TclProcessReturn(interp, result, 0, options); - Tcl_DecrRefCount(options); - } - if (resultObj != NULL) { - Tcl_SetObjResult(interp, resultObj); - Tcl_DecrRefCount(resultObj); - } + result = Tcl_SetReturnOptions(interp, options); + Tcl_DecrRefCount(options); + Tcl_SetObjResult(interp, resultObj); + Tcl_DecrRefCount(resultObj); return result; } @@ -4565,7 +4557,7 @@ TryPostHandler( * any temporary storage. */ - result = TclProcessReturn(interp, result, 0, options); + result = Tcl_SetReturnOptions(interp, options); Tcl_DecrRefCount(options); Tcl_SetObjResult(interp, resultObj); Tcl_DecrRefCount(resultObj); @@ -4623,7 +4615,7 @@ TryPostFinal( * any temporary storage. */ - result = TclProcessReturn(interp, result, 0, options); + result = Tcl_SetReturnOptions(interp, options); Tcl_DecrRefCount(options); if (resultObj != NULL) { Tcl_SetObjResult(interp, resultObj); diff --git a/tests/error.test b/tests/error.test index 3106ca9..e18afad 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.21 2009/09/28 16:34:40 dgp Exp $ +# RCS: @(#) $Id: error.test,v 1.22 2009/09/28 18:02:20 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -495,6 +495,7 @@ foreach level {0 1 2 3} { foreach code {0 1 2 3 4 5} { # Following cases have different -errorinfo; avoid false alarms + # TODO: examine whether these difference are as they ought to be. if {$level == 0 && $code == 1} continue foreach extras {{} {-bar soom}} { @@ -503,6 +504,8 @@ test error-15.8.$level.$code.[llength $extras] {[try] coverage} { set script {return -level $level -code $code {*}$extras foo} catch $script m1 o1 catch {try $script} m2 o2 + set o1 [lsort -stride 2 $o1] + set o2 [lsort -stride 2 $o2] expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} } ok @@ -510,6 +513,17 @@ test error-15.9.$level.$code.[llength $extras] {[try] coverage} { set script {return -level $level -code $code {*}$extras foo} catch $script m1 o1 catch {try $script finally {}} m2 o2 + set o1 [lsort -stride 2 $o1] + set o2 [lsort -stride 2 $o2] + expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} +} ok + +test error-15.10.$level.$code.[llength $extras] {[try] coverage} { + set script {return -level $level -code $code {*}$extras foo} + catch $script m1 o1 + catch {try $script on $code {x y} {return -options $y $x}} m2 o2 + set o1 [lsort -stride 2 $o1] + set o2 [lsort -stride 2 $o2] expr {$o1 eq $o2 ? "ok" : "$o1\n\tis not equal to\n$o2"} } ok -- cgit v0.12 From 1d9466df83ad7999d5e606e39121eb3dd68b737f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 29 Sep 2009 05:03:46 +0000 Subject: * generic/tclAlloc.c: Cleaned up various routines in the * generic/tclCkalloc.c: call stacks for memory allocation to * generic/tclInt.h: guarantee that any size values computed * generic/tclThreadAlloc.c: are within the domains of the routines they get passed to. [Bugs 2557696 and 2557796]. --- ChangeLog | 8 ++++++++ generic/tclAlloc.c | 12 +++++++----- generic/tclCkalloc.c | 30 ++++++++++++++++++------------ generic/tclInt.h | 17 ++++++++++++++--- generic/tclThreadAlloc.c | 30 +++++++++++++++++++++++++++--- 5 files changed, 74 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0b5b3d..5fcf4a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-09-29 Don Porter + + * generic/tclAlloc.c: Cleaned up various routines in the + * generic/tclCkalloc.c: call stacks for memory allocation to + * generic/tclInt.h: guarantee that any size values computed + * generic/tclThreadAlloc.c: are within the domains of the routines + they get passed to. [Bugs 2557696 and 2557796]. + 2009-09-28 Don Porter * generic/tclCmdMZ.c: Replaced TclProcessReturn() calls with diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index de21c7c..04627a6 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAlloc.c,v 1.27 2007/12/17 15:28:27 msofer Exp $ + * RCS: @(#) $Id: tclAlloc.c,v 1.28 2009/09/29 05:03:46 dgp Exp $ */ /* @@ -265,7 +265,7 @@ TclpAlloc( register union overhead *overPtr; register long bucket; register unsigned amount; - struct block *bigBlockPtr; + struct block *bigBlockPtr = NULL; if (!allocInit) { /* @@ -281,9 +281,11 @@ TclpAlloc( * First the simple case: we simple allocate big blocks directly. */ - if (numBytes + OVERHEAD >= MAXMALLOC) { - bigBlockPtr = (struct block *) TclpSysAlloc((unsigned) - (sizeof(struct block) + OVERHEAD + numBytes), 0); + if (numBytes >= MAXMALLOC - OVERHEAD) { + if (numBytes <= UINT_MAX - OVERHEAD -sizeof(struct block)) { + bigBlockPtr = (struct block *) TclpSysAlloc((unsigned) + (sizeof(struct block) + OVERHEAD + numBytes), 0); + } if (bigBlockPtr == NULL) { Tcl_MutexUnlock(allocMutexPtr); return NULL; diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 9a3b4e3..9d9343f 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -14,7 +14,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.36 2009/06/18 09:41:26 dkf Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.37 2009/09/29 05:03:46 dgp Exp $ */ #include "tclInt.h" @@ -87,8 +87,8 @@ static struct mem_header *allocHead = NULL; /* List of allocated structures */ static int total_mallocs = 0; static int total_frees = 0; -static int current_bytes_malloced = 0; -static int maximum_bytes_malloced = 0; +static size_t current_bytes_malloced = 0; +static size_t maximum_bytes_malloced = 0; static int current_malloc_packets = 0; static int maximum_malloc_packets = 0; static int break_on_malloc = 0; @@ -175,11 +175,11 @@ TclDumpMemoryInfo( total_frees); fprintf(outFile,"current packets allocated %10d\n", current_malloc_packets); - fprintf(outFile,"current bytes allocated %10d\n", + fprintf(outFile,"current bytes allocated %10lu\n", current_bytes_malloced); fprintf(outFile,"maximum packets allocated %10d\n", maximum_malloc_packets); - fprintf(outFile,"maximum bytes allocated %10d\n", + fprintf(outFile,"maximum bytes allocated %10lu\n", maximum_bytes_malloced); } @@ -376,14 +376,17 @@ Tcl_DbCkalloc( const char *file, int line) { - struct mem_header *result; + struct mem_header *result = NULL; if (validate_memory) { Tcl_ValidateAllMemory(file, line); } - result = (struct mem_header *) TclpAlloc((unsigned)size + - sizeof(struct mem_header) + HIGH_GUARD_SIZE); + /* Don't let size argument to TclpAlloc overflow */ + if (size <= UINT_MAX - HIGH_GUARD_SIZE -sizeof(struct mem_header)) { + result = (struct mem_header *) TclpAlloc((unsigned)size + + sizeof(struct mem_header) + HIGH_GUARD_SIZE); + } if (result == NULL) { fflush(stdout); TclDumpMemoryInfo(stderr); @@ -467,14 +470,17 @@ Tcl_AttemptDbCkalloc( const char *file, int line) { - struct mem_header *result; + struct mem_header *result = NULL; if (validate_memory) { Tcl_ValidateAllMemory(file, line); } - result = (struct mem_header *) TclpAlloc((unsigned)size + - sizeof(struct mem_header) + HIGH_GUARD_SIZE); + /* Don't let size argument to TclpAlloc overflow */ + if (size <= UINT_MAX - HIGH_GUARD_SIZE - sizeof(struct mem_header)) { + result = (struct mem_header *) TclpAlloc((unsigned)size + + sizeof(struct mem_header) + HIGH_GUARD_SIZE); + } if (result == NULL) { fflush(stdout); TclDumpMemoryInfo(stderr); @@ -842,7 +848,7 @@ MemoryCmd( } if (strcmp(argv[1],"info") == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n", + "%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10lu\n%-25s %10d\n%-25s %10lu\n", "total mallocs", total_mallocs, "total frees", total_frees, "current packets allocated", current_malloc_packets, "current bytes allocated", current_bytes_malloced, diff --git a/generic/tclInt.h b/generic/tclInt.h index d34be28..1d1851e 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.443 2009/09/24 17:19:18 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.444 2009/09/29 05:03:46 dgp Exp $ */ #ifndef _TCLINT @@ -3875,10 +3875,15 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, *---------------------------------------------------------------- */ +#define TCL_MAX_TOKENS (int)(UINT_MAX / sizeof(Tcl_Token)) #define TCL_MIN_TOKEN_GROWTH 50 #define TclGrowTokenArray(tokenPtr, used, available, append, staticPtr) \ { \ int needed = (used) + (append); \ + if (needed > TCL_MAX_TOKENS) { \ + Tcl_Panic("max # of tokens for a Tcl parse (%d) exceeded", \ + TCL_MAX_TOKENS); \ + } \ if (needed > (available)) { \ int allocated = 2 * needed; \ Tcl_Token *oldPtr = (tokenPtr); \ @@ -3886,12 +3891,18 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, if (oldPtr == (staticPtr)) { \ oldPtr = NULL; \ } \ + if (allocated > TCL_MAX_TOKENS) { \ + allocated = TCL_MAX_TOKENS; \ + } \ newPtr = (Tcl_Token *) attemptckrealloc((char *) oldPtr, \ - (unsigned) (allocated * sizeof(Tcl_Token))); \ + (unsigned int) (allocated * sizeof(Tcl_Token))); \ if (newPtr == NULL) { \ allocated = needed + (append) + TCL_MIN_TOKEN_GROWTH; \ + if (allocated > TCL_MAX_TOKENS) { \ + allocated = TCL_MAX_TOKENS; \ + } \ newPtr = (Tcl_Token *) ckrealloc((char *) oldPtr, \ - (unsigned) (allocated * sizeof(Tcl_Token))); \ + (unsigned int) (allocated * sizeof(Tcl_Token))); \ } \ (available) = allocated; \ if (oldPtr == NULL) { \ diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index ba30637..a47b0d8 100755 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadAlloc.c,v 1.29 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclThreadAlloc.c,v 1.30 2009/09/29 05:03:46 dgp Exp $ */ #include "tclInt.h" @@ -292,11 +292,23 @@ char * TclpAlloc( unsigned int reqSize) { - Cache *cachePtr = TclpGetAllocCache(); + Cache *cachePtr; Block *blockPtr; register int bucket; size_t size; + if (sizeof(int) >= sizeof(size_t)) { + /* An unsigned int overflow can also be a size_t overflow */ + const size_t zero = 0; + const size_t max = ~zero; + + if (((size_t) reqSize) > max - sizeof(Block) - RCHECK) { + /* Requested allocation exceeds memory */ + return NULL; + } + } + + cachePtr = TclpGetAllocCache(); if (cachePtr == NULL) { cachePtr = GetCache(); } @@ -418,7 +430,7 @@ TclpRealloc( char *ptr, unsigned int reqSize) { - Cache *cachePtr = TclpGetAllocCache(); + Cache *cachePtr; Block *blockPtr; void *newPtr; size_t size, min; @@ -428,6 +440,18 @@ TclpRealloc( return TclpAlloc(reqSize); } + if (sizeof(int) >= sizeof(size_t)) { + /* An unsigned int overflow can also be a size_t overflow */ + const size_t zero = 0; + const size_t max = ~zero; + + if (((size_t) reqSize) > max - sizeof(Block) - RCHECK) { + /* Requested allocation exceeds memory */ + return NULL; + } + } + + cachePtr = TclpGetAllocCache(); if (cachePtr == NULL) { cachePtr = GetCache(); } -- cgit v0.12 From 31597e659d7ed47cae7a3637544fc8810a12109e Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 30 Sep 2009 03:11:24 +0000 Subject: * generic/tclDictObj.c: Updated freeIntRepProc routines so * generic/tclExecute.c: that they set the typePtr field to * generic/tclIO.c: NULL so that the Tcl_Obj is not left * generic/tclIndexObj.c: in an inconsistent state. * generic/tclInt.h: [Bug 2857044] * generic/tclListObj.c: * generic/tclNamesp.c: * generic/tclOOCall.c: * generic/tclObj.c: * generic/tclPathObj.c: * generic/tclProc.c: * generic/tclRegexp.c: * generic/tclStringObj.c: --- ChangeLog | 14 ++++++++++++++ generic/tclDictObj.c | 3 ++- generic/tclExecute.c | 5 ++--- generic/tclIO.c | 3 ++- generic/tclIndexObj.c | 3 ++- generic/tclInt.h | 3 ++- generic/tclListObj.c | 3 ++- generic/tclNamesp.c | 4 +++- generic/tclOOCall.c | 8 +++----- generic/tclObj.c | 4 +++- generic/tclPathObj.c | 3 ++- generic/tclProc.c | 3 ++- generic/tclRegexp.c | 3 ++- generic/tclStringObj.c | 3 ++- 14 files changed, 43 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fcf4a7..1d0b2f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2009-09-29 Don Porter + * generic/tclDictObj.c: Updated freeIntRepProc routines so + * generic/tclExecute.c: that they set the typePtr field to + * generic/tclIO.c: NULL so that the Tcl_Obj is not left + * generic/tclIndexObj.c: in an inconsistent state. + * generic/tclInt.h: [Bug 2857044] + * generic/tclListObj.c: + * generic/tclNamesp.c: + * generic/tclOOCall.c: + * generic/tclObj.c: + * generic/tclPathObj.c: + * generic/tclProc.c: + * generic/tclRegexp.c: + * generic/tclStringObj.c: + * generic/tclAlloc.c: Cleaned up various routines in the * generic/tclCkalloc.c: call stacks for memory allocation to * generic/tclInt.h: guarantee that any size values computed diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index ef0ebe9..d30a769 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.77 2009/02/03 23:34:32 nijtmans Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.78 2009/09/30 03:11:24 dgp Exp $ */ #include "tclInt.h" @@ -411,6 +411,7 @@ FreeDictInternalRep( } dictPtr->internalRep.otherValuePtr = NULL; /* Belt and braces! */ + dictPtr->typePtr = NULL; } /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 778b679..587dd3e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.446 2009/09/07 07:28:38 das Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.447 2009/09/30 03:11:25 dgp Exp $ */ #include "tclInt.h" @@ -1393,8 +1393,7 @@ CompileExprObj( || (codePtr->nsPtr != namespacePtr) || (codePtr->nsEpoch != namespacePtr->resolverEpoch) || (codePtr->localCachePtr != iPtr->varFramePtr->localCachePtr)) { - objPtr->typePtr->freeIntRepProc(objPtr); - objPtr->typePtr = (Tcl_ObjType *) NULL; + FreeExprCodeInternalRep(objPtr); } } if (objPtr->typePtr != &exprCodeType) { diff --git a/generic/tclIO.c b/generic/tclIO.c index 6ace57a..737e64e 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.161 2009/09/07 07:28:38 das Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.162 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -11131,6 +11131,7 @@ FreeChannelIntRep( Tcl_Obj *objPtr) /* Object with internal rep to free. */ { Tcl_Release(GET_CHANNELSTATE(objPtr)); + objPtr->typePtr = NULL; } #if 0 diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index bbdae95..7125891 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.51 2009/04/27 09:41:49 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.52 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -499,6 +499,7 @@ FreeIndex( Tcl_Obj *objPtr) { ckfree((char *) objPtr->internalRep.otherValuePtr); + objPtr->typePtr = NULL; } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 1d1851e..0f6654b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.444 2009/09/29 05:03:46 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.445 2009/09/30 03:11:26 dgp Exp $ */ #ifndef _TCLINT @@ -3842,6 +3842,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, if ((objPtr)->typePtr != NULL && \ (objPtr)->typePtr->freeIntRepProc != NULL) { \ (objPtr)->typePtr->freeIntRepProc(objPtr); \ + (objPtr)->typePtr = NULL; \ } /* diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 50653ab..659017c 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.57 2009/02/10 22:49:52 nijtmans Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.58 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -1614,6 +1614,7 @@ FreeListInternalRep( listPtr->internalRep.twoPtrValue.ptr1 = NULL; listPtr->internalRep.twoPtrValue.ptr2 = NULL; + listPtr->typePtr = NULL; } /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 74d5ebb..94ade8f 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.192 2009/07/15 13:17:18 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.193 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -4770,6 +4770,7 @@ FreeNsNameInternalRep( } ckfree((char *) resNamePtr); } + objPtr->typePtr = NULL; } /* @@ -7469,6 +7470,7 @@ FreeEnsembleCmdRep( NamespaceFree(ensembleCmd->nsPtr); } ckfree((char *) ensembleCmd); + objPtr->typePtr = NULL; } /* diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index e9760f7..e8f9757 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOCall.c,v 1.14 2009/07/12 14:51:30 dkf Exp $ + * RCS: @(#) $Id: tclOOCall.c,v 1.15 2009/09/30 03:11:26 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -173,9 +173,7 @@ StashCallChain( CallChain *callPtr) { callPtr->refCount++; - if (objPtr->typePtr && objPtr->typePtr->freeIntRepProc) { - objPtr->typePtr->freeIntRepProc(objPtr); - } + TclFreeIntRep(objPtr); objPtr->typePtr = &methodNameType; objPtr->internalRep.otherValuePtr = callPtr; } @@ -956,7 +954,7 @@ TclOOGetCallContext( callPtr->refCount++; goto returnContext; } - cacheInThisObj->typePtr->freeIntRepProc(cacheInThisObj); + FreeMethodNameRep(cacheInThisObj); } if (oPtr->flags & USE_CLASS_CACHE) { diff --git a/generic/tclObj.c b/generic/tclObj.c index 2bbc009..e32819d 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.160 2009/09/17 08:39:40 das Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.161 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -3130,6 +3130,7 @@ FreeBignum( if ((long) objPtr->internalRep.ptrAndLongRep.value < 0) { ckfree((char *) objPtr->internalRep.ptrAndLongRep.ptr); } + objPtr->typePtr = NULL; } /* @@ -4218,6 +4219,7 @@ FreeCmdNameInternalRep( ckfree((char *) resPtr); } } + objPtr->typePtr = NULL; } /* diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 3b907a4..7599529 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.82 2009/08/20 15:17:39 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.83 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -2601,6 +2601,7 @@ FreeFsPathInternalRep( } ckfree((char*) fsPathPtr); + pathPtr->typePtr = NULL; } static void diff --git a/generic/tclProc.c b/generic/tclProc.c index 4eb6c17..806bf11 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.175 2009/09/07 07:28:38 das Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.176 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -2439,6 +2439,7 @@ FreeLambdaInternalRep( TclProcCleanupProc(procPtr); } TclDecrRefCount(nsObjPtr); + objPtr->typePtr = NULL; } static int diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index d0505e0..b912345 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.c,v 1.31 2009/02/10 22:49:54 nijtmans Exp $ + * RCS: @(#) $Id: tclRegexp.c,v 1.32 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" @@ -760,6 +760,7 @@ FreeRegexpInternalRep( if (--(regexpRepPtr->refCount) <= 0) { FreeRegexp(regexpRepPtr); } + objPtr->typePtr = NULL; } /* diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 8b33fe1..8787fd9 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.129 2009/08/27 19:34:24 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.130 2009/09/30 03:11:26 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2954,6 +2954,7 @@ FreeStringInternalRep( Tcl_Obj *objPtr) /* Object with internal rep to free. */ { ckfree((char *) GET_STRING(objPtr)); + objPtr->typePtr = NULL; } /* -- cgit v0.12 From 6de9f3e9644ef3077ed175cfeb8c6ea25ed98691 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 2 Oct 2009 17:59:19 +0000 Subject: * library/tzdata/Africa/Cairo: * library/tzdata/Asia/Gaza: * library/tzdata/Asia/Karachi: * library/tzdata/Pacific/Apia: Olson's tzdata2009n. --- ChangeLog | 7 ++ library/tzdata/Africa/Cairo | 2 +- library/tzdata/Asia/Gaza | 182 ++++++++++++++++++++++---------------------- library/tzdata/Asia/Karachi | 2 +- library/tzdata/Pacific/Apia | 2 + 5 files changed, 102 insertions(+), 93 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d0b2f1..a514a58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-02 Kevin B. Kenny + + * library/tzdata/Africa/Cairo: + * library/tzdata/Asia/Gaza: + * library/tzdata/Asia/Karachi: + * library/tzdata/Pacific/Apia: Olson's tzdata2009n. + 2009-09-29 Don Porter * generic/tclDictObj.c: Updated freeIntRepProc routines so diff --git a/library/tzdata/Africa/Cairo b/library/tzdata/Africa/Cairo index 5eca6e2..e65ea66 100644 --- a/library/tzdata/Africa/Cairo +++ b/library/tzdata/Africa/Cairo @@ -120,7 +120,7 @@ set TZData(:Africa/Cairo) { {1209074400 10800 1 EEST} {1219957200 7200 0 EET} {1240524000 10800 1 EEST} - {1253826000 7200 0 EET} + {1250802000 7200 0 EET} {1272578400 10800 1 EEST} {1285880400 7200 0 EET} {1304028000 10800 1 EEST} diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index e0c8eb0..127855d 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -91,185 +91,185 @@ set TZData(:Asia/Gaza) { {1207000800 10800 1 EEST} {1219964400 7200 0 EET} {1238104800 10800 1 EEST} - {1254092400 7200 0 EET} + {1252018800 7200 0 EET} {1269554400 10800 1 EEST} - {1285542000 7200 0 EET} + {1283468400 7200 0 EET} {1301004000 10800 1 EEST} - {1316991600 7200 0 EET} + {1314918000 7200 0 EET} {1333058400 10800 1 EEST} - {1348441200 7200 0 EET} + {1346972400 7200 0 EET} {1364508000 10800 1 EEST} - {1380495600 7200 0 EET} + {1378422000 7200 0 EET} {1395957600 10800 1 EEST} - {1411945200 7200 0 EET} + {1409871600 7200 0 EET} {1427407200 10800 1 EEST} - {1443394800 7200 0 EET} + {1441321200 7200 0 EET} {1458856800 10800 1 EEST} - {1474844400 7200 0 EET} + {1472770800 7200 0 EET} {1490911200 10800 1 EEST} - {1506294000 7200 0 EET} + {1504220400 7200 0 EET} {1522360800 10800 1 EEST} - {1537743600 7200 0 EET} + {1536274800 7200 0 EET} {1553810400 10800 1 EEST} - {1569798000 7200 0 EET} + {1567724400 7200 0 EET} {1585260000 10800 1 EEST} - {1601247600 7200 0 EET} + {1599174000 7200 0 EET} {1616709600 10800 1 EEST} - {1632697200 7200 0 EET} + {1630623600 7200 0 EET} {1648159200 10800 1 EEST} - {1664146800 7200 0 EET} + {1662073200 7200 0 EET} {1680213600 10800 1 EEST} - {1695596400 7200 0 EET} + {1693522800 7200 0 EET} {1711663200 10800 1 EEST} - {1727650800 7200 0 EET} + {1725577200 7200 0 EET} {1743112800 10800 1 EEST} - {1759100400 7200 0 EET} + {1757026800 7200 0 EET} {1774562400 10800 1 EEST} - {1790550000 7200 0 EET} + {1788476400 7200 0 EET} {1806012000 10800 1 EEST} - {1821999600 7200 0 EET} + {1819926000 7200 0 EET} {1838066400 10800 1 EEST} - {1853449200 7200 0 EET} + {1851375600 7200 0 EET} {1869516000 10800 1 EEST} - {1884898800 7200 0 EET} + {1883430000 7200 0 EET} {1900965600 10800 1 EEST} - {1916953200 7200 0 EET} + {1914879600 7200 0 EET} {1932415200 10800 1 EEST} - {1948402800 7200 0 EET} + {1946329200 7200 0 EET} {1963864800 10800 1 EEST} - {1979852400 7200 0 EET} + {1977778800 7200 0 EET} {1995314400 10800 1 EEST} - {2011302000 7200 0 EET} + {2009228400 7200 0 EET} {2027368800 10800 1 EEST} - {2042751600 7200 0 EET} + {2040678000 7200 0 EET} {2058818400 10800 1 EEST} - {2074201200 7200 0 EET} + {2072732400 7200 0 EET} {2090268000 10800 1 EEST} - {2106255600 7200 0 EET} + {2104182000 7200 0 EET} {2121717600 10800 1 EEST} - {2137705200 7200 0 EET} + {2135631600 7200 0 EET} {2153167200 10800 1 EEST} - {2169154800 7200 0 EET} + {2167081200 7200 0 EET} {2184616800 10800 1 EEST} - {2200604400 7200 0 EET} + {2198530800 7200 0 EET} {2216671200 10800 1 EEST} - {2232054000 7200 0 EET} + {2230585200 7200 0 EET} {2248120800 10800 1 EEST} - {2264108400 7200 0 EET} + {2262034800 7200 0 EET} {2279570400 10800 1 EEST} - {2295558000 7200 0 EET} + {2293484400 7200 0 EET} {2311020000 10800 1 EEST} - {2327007600 7200 0 EET} + {2324934000 7200 0 EET} {2342469600 10800 1 EEST} - {2358457200 7200 0 EET} + {2356383600 7200 0 EET} {2374524000 10800 1 EEST} - {2389906800 7200 0 EET} + {2387833200 7200 0 EET} {2405973600 10800 1 EEST} - {2421356400 7200 0 EET} + {2419887600 7200 0 EET} {2437423200 10800 1 EEST} - {2453410800 7200 0 EET} + {2451337200 7200 0 EET} {2468872800 10800 1 EEST} - {2484860400 7200 0 EET} + {2482786800 7200 0 EET} {2500322400 10800 1 EEST} - {2516310000 7200 0 EET} + {2514236400 7200 0 EET} {2531772000 10800 1 EEST} - {2547759600 7200 0 EET} + {2545686000 7200 0 EET} {2563826400 10800 1 EEST} - {2579209200 7200 0 EET} + {2577135600 7200 0 EET} {2595276000 10800 1 EEST} - {2611263600 7200 0 EET} + {2609190000 7200 0 EET} {2626725600 10800 1 EEST} - {2642713200 7200 0 EET} + {2640639600 7200 0 EET} {2658175200 10800 1 EEST} - {2674162800 7200 0 EET} + {2672089200 7200 0 EET} {2689624800 10800 1 EEST} - {2705612400 7200 0 EET} + {2703538800 7200 0 EET} {2721679200 10800 1 EEST} - {2737062000 7200 0 EET} + {2734988400 7200 0 EET} {2753128800 10800 1 EEST} - {2768511600 7200 0 EET} + {2767042800 7200 0 EET} {2784578400 10800 1 EEST} - {2800566000 7200 0 EET} + {2798492400 7200 0 EET} {2816028000 10800 1 EEST} - {2832015600 7200 0 EET} + {2829942000 7200 0 EET} {2847477600 10800 1 EEST} - {2863465200 7200 0 EET} + {2861391600 7200 0 EET} {2878927200 10800 1 EEST} - {2894914800 7200 0 EET} + {2892841200 7200 0 EET} {2910981600 10800 1 EEST} - {2926364400 7200 0 EET} + {2924290800 7200 0 EET} {2942431200 10800 1 EEST} - {2957814000 7200 0 EET} + {2956345200 7200 0 EET} {2973880800 10800 1 EEST} - {2989868400 7200 0 EET} + {2987794800 7200 0 EET} {3005330400 10800 1 EEST} - {3021318000 7200 0 EET} + {3019244400 7200 0 EET} {3036780000 10800 1 EEST} - {3052767600 7200 0 EET} + {3050694000 7200 0 EET} {3068229600 10800 1 EEST} - {3084217200 7200 0 EET} + {3082143600 7200 0 EET} {3100284000 10800 1 EEST} - {3115666800 7200 0 EET} + {3114198000 7200 0 EET} {3131733600 10800 1 EEST} - {3147721200 7200 0 EET} + {3145647600 7200 0 EET} {3163183200 10800 1 EEST} - {3179170800 7200 0 EET} + {3177097200 7200 0 EET} {3194632800 10800 1 EEST} - {3210620400 7200 0 EET} + {3208546800 7200 0 EET} {3226082400 10800 1 EEST} - {3242070000 7200 0 EET} + {3239996400 7200 0 EET} {3258136800 10800 1 EEST} - {3273519600 7200 0 EET} + {3271446000 7200 0 EET} {3289586400 10800 1 EEST} - {3304969200 7200 0 EET} + {3303500400 7200 0 EET} {3321036000 10800 1 EEST} - {3337023600 7200 0 EET} + {3334950000 7200 0 EET} {3352485600 10800 1 EEST} - {3368473200 7200 0 EET} + {3366399600 7200 0 EET} {3383935200 10800 1 EEST} - {3399922800 7200 0 EET} + {3397849200 7200 0 EET} {3415384800 10800 1 EEST} - {3431372400 7200 0 EET} + {3429298800 7200 0 EET} {3447439200 10800 1 EEST} - {3462822000 7200 0 EET} + {3460748400 7200 0 EET} {3478888800 10800 1 EEST} - {3494876400 7200 0 EET} + {3492802800 7200 0 EET} {3510338400 10800 1 EEST} - {3526326000 7200 0 EET} + {3524252400 7200 0 EET} {3541788000 10800 1 EEST} - {3557775600 7200 0 EET} + {3555702000 7200 0 EET} {3573237600 10800 1 EEST} - {3589225200 7200 0 EET} + {3587151600 7200 0 EET} {3605292000 10800 1 EEST} - {3620674800 7200 0 EET} + {3618601200 7200 0 EET} {3636741600 10800 1 EEST} - {3652124400 7200 0 EET} + {3650655600 7200 0 EET} {3668191200 10800 1 EEST} - {3684178800 7200 0 EET} + {3682105200 7200 0 EET} {3699640800 10800 1 EEST} - {3715628400 7200 0 EET} + {3713554800 7200 0 EET} {3731090400 10800 1 EEST} - {3747078000 7200 0 EET} + {3745004400 7200 0 EET} {3762540000 10800 1 EEST} - {3778527600 7200 0 EET} + {3776454000 7200 0 EET} {3794594400 10800 1 EEST} - {3809977200 7200 0 EET} + {3807903600 7200 0 EET} {3826044000 10800 1 EEST} - {3841426800 7200 0 EET} + {3839958000 7200 0 EET} {3857493600 10800 1 EEST} - {3873481200 7200 0 EET} + {3871407600 7200 0 EET} {3888943200 10800 1 EEST} - {3904930800 7200 0 EET} + {3902857200 7200 0 EET} {3920392800 10800 1 EEST} - {3936380400 7200 0 EET} + {3934306800 7200 0 EET} {3951842400 10800 1 EEST} - {3967830000 7200 0 EET} + {3965756400 7200 0 EET} {3983896800 10800 1 EEST} - {3999279600 7200 0 EET} + {3997810800 7200 0 EET} {4015346400 10800 1 EEST} - {4031334000 7200 0 EET} + {4029260400 7200 0 EET} {4046796000 10800 1 EEST} - {4062783600 7200 0 EET} + {4060710000 7200 0 EET} {4078245600 10800 1 EEST} - {4094233200 7200 0 EET} + {4092159600 7200 0 EET} } diff --git a/library/tzdata/Asia/Karachi b/library/tzdata/Asia/Karachi index 3faa31e..6535471 100644 --- a/library/tzdata/Asia/Karachi +++ b/library/tzdata/Asia/Karachi @@ -12,5 +12,5 @@ set TZData(:Asia/Karachi) { {1212260400 21600 1 PKST} {1225476000 18000 0 PKT} {1239735600 21600 1 PKST} - {1257012000 18000 0 PKT} + {1254333600 18000 0 PKT} } diff --git a/library/tzdata/Pacific/Apia b/library/tzdata/Pacific/Apia index 5d34ed1..60e4b2c 100644 --- a/library/tzdata/Pacific/Apia +++ b/library/tzdata/Pacific/Apia @@ -5,4 +5,6 @@ set TZData(:Pacific/Apia) { {-2855737984 -41216 0 LMT} {-1861878784 -41400 0 SAMT} {-631110600 -39600 0 WST} + {1254654000 -36000 1 WSDT} + {1269770400 -39600 0 WST} } -- cgit v0.12 From dda9b564a137908b96659dcd5184d12941e0e4c8 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 5 Oct 2009 02:40:04 +0000 Subject: fix tclooConfig.sh install --- unix/Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 64f35dd..07e3fcc 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.276 2009/09/26 21:42:05 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.277 2009/10/05 02:40:04 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -770,7 +770,8 @@ install-binaries: binaries @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" @$(INSTALL_DATA) tclConfig.sh "$(CONFIG_INSTALL_DIR)"/tclConfig.sh @echo "Installing tclooConfig.sh to $(CONFIG_INSTALL_DIR)/" - @$(INSTALL_DATA) tclooConfig.sh "$(CONFIG_INSTALL_DIR)"/tclooConfig.sh + @$(INSTALL_DATA) $(UNIX_DIR)/tclooConfig.sh \ + "$(CONFIG_INSTALL_DIR)"/tclooConfig.sh @if test "$(STUB_LIB_FILE)" != "" ; then \ echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \ @INSTALL_STUB_LIB@ ; \ -- cgit v0.12 From 17c811e76499761b3348f848a50bb3946b821ae9 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 5 Oct 2009 02:41:07 +0000 Subject: * macosx/tclMacOSXBundle.c: Workaround CF memory managment bug in * unix/tclUnixInit.c: Mac OS X 10.4 & earlier. [Bug 2569449] --- ChangeLog | 5 +++++ macosx/tclMacOSXBundle.c | 29 ++++++++++++++++++----------- unix/tclUnixInit.c | 11 ++++++----- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index a514a58..3da653d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-04 Daniel Steffen + + * macosx/tclMacOSXBundle.c: Workaround CF memory managment bug in + * unix/tclUnixInit.c: Mac OS X 10.4 & earlier. [Bug 2569449] + 2009-10-02 Kevin B. Kenny * library/tzdata/Africa/Cairo: diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 69ffd2f..97124cf 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.15 2009/04/14 00:55:31 das Exp $ + * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.16 2009/10/05 02:41:07 das Exp $ */ #include "tclPort.h" @@ -55,7 +55,8 @@ extern char *dlerror(void) WEAK_IMPORT_ATTRIBUTE; #include #endif -#if TCL_DYLD_USE_DLFCN && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +#if (TCL_DYLD_USE_DLFCN && MAC_OS_X_VERSION_MIN_REQUIRED < 1040) || \ + (MAC_OS_X_VERSION_MIN_REQUIRED < 1050) MODULE_SCOPE long tclMacOSXDarwinRelease; #endif @@ -157,17 +158,16 @@ Tcl_MacOSXOpenVersionedBundleResources( bundleVersion, kCFStringEncodingUTF8); if (bundleVersionRef) { + CFComparisonResult versionComparison = kCFCompareLessThan; CFStringRef bundleTailRef = CFURLCopyLastPathComponent( bundleURL); if (bundleTailRef) { - if (CFStringCompare(bundleTailRef, bundleVersionRef, 0) == - kCFCompareEqualTo) { - versionedBundleRef = (CFBundleRef) CFRetain(bundleRef); - } + versionComparison = CFStringCompare(bundleTailRef, + bundleVersionRef, 0); CFRelease(bundleTailRef); } - if (!versionedBundleRef) { + if (versionComparison != kCFCompareEqualTo) { CFURLRef versURL = CFURLCreateCopyAppendingPathComponent( NULL, bundleURL, CFSTR("Versions"), TRUE); @@ -175,9 +175,13 @@ Tcl_MacOSXOpenVersionedBundleResources( CFURLRef versionedBundleURL = CFURLCreateCopyAppendingPathComponent( NULL, versURL, bundleVersionRef, TRUE); + if (versionedBundleURL) { versionedBundleRef = CFBundleCreate(NULL, versionedBundleURL); + if (versionedBundleRef) { + bundleRef = versionedBundleRef; + } CFRelease(versionedBundleURL); } CFRelease(versURL); @@ -187,9 +191,6 @@ Tcl_MacOSXOpenVersionedBundleResources( } CFRelease(bundleURL); } - if (versionedBundleRef) { - bundleRef = versionedBundleRef; - } } if (bundleRef) { @@ -258,7 +259,13 @@ Tcl_MacOSXOpenVersionedBundleResources( CFRelease(libURL); } if (versionedBundleRef) { - CFRelease(versionedBundleRef); +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 + /* Workaround CFBundle bug in Tiger and earlier. [Bug 2569449] */ + if (tclMacOSXDarwinRelease >= 9) +#endif + { + CFRelease(versionedBundleRef); + } } } diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 2df4d2a..db7bbfe 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -7,7 +7,7 @@ * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUnixInit.c,v 1.86 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclUnixInit.c,v 1.87 2009/10/05 02:41:07 das Exp $ */ #include "tclInt.h" @@ -274,10 +274,11 @@ static int MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tclLibPath); #endif /* HAVE_COREFOUNDATION */ #if defined(__APPLE__) && (defined(TCL_LOAD_FROM_MEMORY) || ( \ - defined(TCL_THREADS) && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ - MAC_OS_X_VERSION_MIN_REQUIRED < 1030) || ( \ - defined(__LP64__) && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ - MAC_OS_X_VERSION_MIN_REQUIRED < 1050)) + defined(MAC_OS_X_VERSION_MIN_REQUIRED) && ( \ + (defined(TCL_THREADS) && MAC_OS_X_VERSION_MIN_REQUIRED < 1030) || \ + (defined(__LP64__) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050) || \ + (defined(HAVE_COREFOUNDATION) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050)\ + ))) /* * Need to check Darwin release at runtime in tclUnixFCmd.c and tclLoadDyld.c: * initialize release global at startup from uname(). -- cgit v0.12 From 2e39402782031ee79d14b572fae56c5d7f5d73a0 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 5 Oct 2009 20:02:55 +0000 Subject: * library/safe.tcl (AliasGlob): Fixed conversion of catch to try/finally, it had an 'on ok msg' branch missing, causing a silent error immediately, and bogus glob results, breaking search for Tcl modules. --- ChangeLog | 7 +++++++ library/safe.tcl | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3da653d..76df6b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-05 Andreas Kupries + + * library/safe.tcl (AliasGlob): Fixed conversion of catch to + try/finally, it had an 'on ok msg' branch missing, causing a + silent error immediately, and bogus glob results, breaking + search for Tcl modules. + 2009-10-04 Daniel Steffen * macosx/tclMacOSXBundle.c: Workaround CF memory managment bug in diff --git a/library/safe.tcl b/library/safe.tcl index 5a3d4d0..ba1c4f5 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.18 2009/07/26 11:40:24 dkf Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.19 2009/10/05 20:02:55 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -792,6 +792,8 @@ proc ::safe::setLogCmd {args} { try { ::interp invokehidden $slave glob {*}$cmd + } on ok msg { + # Nothing to be done, just capture the 'msg' for later. } on error msg { Log $slave $msg return -code error "script error" -- cgit v0.12 From 557af2c1ada9cecaa0e11f3a7f5c3c19056c5061 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 6 Oct 2009 16:31:01 +0000 Subject: * generic/tclTomMathInt.h (new): Public header tclTomMath.h had * generic/tclTomMath.h: dependence on private headers, breaking use * generic/tommath.h: by extensions [Bug 1941434]. --- ChangeLog | 6 ++++++ generic/tclTomMath.h | 6 ++---- generic/tclTomMathInt.h | 2 ++ generic/tommath.h | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 generic/tclTomMathInt.h diff --git a/ChangeLog b/ChangeLog index 76df6b7..6eac1bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-06 Don Porter + + * generic/tclTomMathInt.h (new): Public header tclTomMath.h had + * generic/tclTomMath.h: dependence on private headers, breaking use + * generic/tommath.h: by extensions [Bug 1941434]. + 2009-10-05 Andreas Kupries * library/safe.tcl (AliasGlob): Fixed conversion of catch to diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h index d794316..48bb603 100644 --- a/generic/tclTomMath.h +++ b/generic/tclTomMath.h @@ -26,8 +26,6 @@ #include #include -#include - #ifndef MIN #define MIN(x,y) ((x)<(y)?(x):(y)) #endif @@ -840,6 +838,6 @@ MODULE_SCOPE const char *mp_s_rmap; /* $Source: /root/tcl/repos-to-convert/tcl/generic/tclTomMath.h,v $ */ /* Based on Tom's version 1.8 */ -/* $Revision: 1.10 $ */ -/* $Date: 2007/02/14 17:59:21 $ */ +/* $Revision: 1.11 $ */ +/* $Date: 2009/10/06 16:31:01 $ */ diff --git a/generic/tclTomMathInt.h b/generic/tclTomMathInt.h new file mode 100644 index 0000000..1b9eb64 --- /dev/null +++ b/generic/tclTomMathInt.h @@ -0,0 +1,2 @@ +#include "tclTomMath.h" +#include "tommath_class.h" diff --git a/generic/tommath.h b/generic/tommath.h index 4ce3e43..028a84d 100644 --- a/generic/tommath.h +++ b/generic/tommath.h @@ -1 +1 @@ -#include "tclTomMath.h" +#include "tclTomMathInt.h" -- cgit v0.12 From 7b4b4ce6883578d1bc4bdd773251d1899787df6b Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 6 Oct 2009 16:55:59 +0000 Subject: * generic/tclInterp.c (SlaveEval): Agressive stomping of internal reps was added as part of the NRE patch of 2008-07-13. This doesn't appear to actually be needed, and it hurts quite a bit when large lists lose their intreps and require reparsing. Thanks to Ashok Nadkarni for reporting the problem. --- ChangeLog | 6 ++++++ generic/tclInterp.c | 21 ++++----------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6eac1bf..e035f7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-10-06 Don Porter + * generic/tclInterp.c (SlaveEval): Agressive stomping of internal reps + was added as part of the NRE patch of 2008-07-13. This doesn't appear + to actually be needed, and it hurts quite a bit when large lists lose + their intreps and require reparsing. Thanks to Ashok Nadkarni for + reporting the problem. + * generic/tclTomMathInt.h (new): Public header tclTomMath.h had * generic/tclTomMath.h: dependence on private headers, breaking use * generic/tommath.h: by extensions [Bug 1941434]. diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 0972602..3c841d9 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.105 2009/03/21 12:24:49 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.106 2009/10/06 16:55:59 dgp Exp $ */ #include "tclInt.h" @@ -2607,7 +2607,6 @@ SlaveEval( Tcl_Obj *const objv[]) /* Argument objects. */ { int result; - Tcl_Obj *objPtr; Tcl_Preserve(slaveInterp); Tcl_AllowExceptions(slaveInterp); @@ -2615,29 +2614,17 @@ SlaveEval( if (objc == 1) { /* * TIP #280: Make actual argument location available to eval'd script. - * - * Do not let any intReps accross, with the exception of - * bytecodes. The intrep spoiling is due to happen anyway when - * compiling. */ Interp *iPtr = (Interp *) interp; CmdFrame *invoker = iPtr->cmdFramePtr; int word = 0; - objPtr = objv[0]; - if (objPtr->typePtr && (objPtr->typePtr != &tclByteCodeType) - && objPtr->typePtr->freeIntRepProc) { - (void) TclGetString(objPtr); - TclFreeIntRep(objPtr); - objPtr->typePtr = NULL; - } - - TclArgumentGet(interp, objPtr, &invoker, &word); + TclArgumentGet(interp, objv[0], &invoker, &word); - result = TclEvalObjEx(slaveInterp, objPtr, 0, invoker, word); + result = TclEvalObjEx(slaveInterp, objv[0], 0, invoker, word); } else { - objPtr = Tcl_ConcatObj(objc, objv); + Tcl_Obj *objPtr = Tcl_ConcatObj(objc, objv); Tcl_IncrRefCount(objPtr); result = Tcl_EvalObjEx(slaveInterp, objPtr, 0); Tcl_DecrRefCount(objPtr); -- cgit v0.12 From 112d28fc3f4af8849035b9d786ca0a1e4978987b Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 7 Oct 2009 17:07:05 +0000 Subject: * generic/tclIORChan.c (ErrnoReturn): Replace the hardwired constant 11 with the proper errno define, EAGAIN. What was I thinking ? The BSD's have a different errno assignment and break with the hardwired number. Reported by emiliano on the chat. --- ChangeLog | 7 +++++++ generic/tclIORChan.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e035f7f..0902daa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-07 Andreas Kupries + + * generic/tclIORChan.c (ErrnoReturn): Replace the hardwired + constant 11 with the proper errno define, EAGAIN. What was I + thinking ? The BSD's have a different errno assignment and break + with the hardwired number. Reported by emiliano on the chat. + 2009-10-06 Don Porter * generic/tclInterp.c (SlaveEval): Agressive stomping of internal reps diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 5a83eca..15e41d8 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.40 2009/08/06 22:28:11 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.41 2009/10/07 17:07:07 andreas_kupries Exp $ */ #include @@ -2318,7 +2318,7 @@ ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj* resObj) if (((Tcl_GetIntFromObj(rcPtr->interp, resObj, &code) != TCL_OK) || (code >= 0))) { if (strcmp ("EAGAIN",Tcl_GetString(resObj)) == 0) { - code = -11; + code = - EAGAIN; } else { code = 0; } -- cgit v0.12 From 4b5432b3e850af2f49c5d0d58d48a3736dcf0012 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 7 Oct 2009 23:09:15 +0000 Subject: * generic/tclObj.c: [Bug 2871908]: Plug memory leaks of the objThreadMap and lineCLPtr hashtables. Also make the names of the continuation line information initialization and finalization functions more consistent. Patch supplied by Joe Mistachkin . --- ChangeLog | 6 ++++++ generic/tclObj.c | 40 +++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0902daa..dbc0860 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-10-07 Andreas Kupries + * generic/tclObj.c: [Bug 2871908]: Plug memory leaks of the + objThreadMap and lineCLPtr hashtables. Also make the names of the + continuation line information initialization and finalization + functions more consistent. Patch supplied by Joe Mistachkin + . + * generic/tclIORChan.c (ErrnoReturn): Replace the hardwired constant 11 with the proper errno define, EAGAIN. What was I thinking ? The BSD's have a different errno assignment and break diff --git a/generic/tclObj.c b/generic/tclObj.c index e32819d..d0e1115 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.161 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.162 2009/10/07 23:09:17 andreas_kupries Exp $ */ #include "tclInt.h" @@ -105,8 +105,8 @@ typedef struct ThreadSpecificData { static Tcl_ThreadDataKey dataKey; static void ContLineLocFree (char* clientData); -static void TclThreadFinalizeObjects (ClientData clientData); -static ThreadSpecificData* TclGetTables (void); +static void TclThreadFinalizeContLines (ClientData clientData); +static ThreadSpecificData* TclGetContLineTable (void); /* * Nested Tcl_Obj deletion management support @@ -455,7 +455,7 @@ TclFinalizeThreadObjects(void) #if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) Tcl_HashEntry *hPtr; Tcl_HashSearch hSearch; - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); Tcl_HashTable *tablePtr = tsdPtr->objThreadMap; if (tablePtr != NULL) { @@ -515,7 +515,7 @@ TclFinalizeObjects(void) /* *---------------------------------------------------------------------- * - * TclGetTables -- + * TclGetContLineTable -- * * This procedure is a helper which returns the thread-specific * hash-table used to track continuation line information associated with @@ -532,7 +532,7 @@ TclFinalizeObjects(void) */ static ThreadSpecificData* -TclGetTables() +TclGetContLineTable() { /* * Initialize the hashtable tracking invisible continuation lines. For @@ -546,10 +546,7 @@ TclGetTables() if (!tsdPtr->lineCLPtr) { tsdPtr->lineCLPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); Tcl_InitHashTable(tsdPtr->lineCLPtr, TCL_ONE_WORD_KEYS); - Tcl_CreateThreadExitHandler (TclThreadFinalizeObjects,NULL); -#if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) - tsdPtr->objThreadMap = NULL; -#endif /* TCL_MEM_DEBUG && TCL_THREADS */ + Tcl_CreateThreadExitHandler (TclThreadFinalizeContLines,NULL); } return tsdPtr; } @@ -578,7 +575,7 @@ TclContinuationsEnter(Tcl_Obj* objPtr, int* loc) { int newEntry; - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); Tcl_HashEntry* hPtr = Tcl_CreateHashEntry (tsdPtr->lineCLPtr, (char*) objPtr, &newEntry); @@ -709,7 +706,7 @@ TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext) void TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr) { - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char*) originObjPtr); if (hPtr) { @@ -741,7 +738,7 @@ TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr) ContLineLoc* TclContinuationsGet(Tcl_Obj* objPtr) { - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char*) objPtr); if (hPtr) { @@ -754,7 +751,7 @@ TclContinuationsGet(Tcl_Obj* objPtr) /* *---------------------------------------------------------------------- * - * TclThreadFinalizeObjects -- + * TclThreadFinalizeContLines -- * * This procedure is a helper which releases all continuation line * information currently known. It is run as a thread exit handler. @@ -770,15 +767,15 @@ TclContinuationsGet(Tcl_Obj* objPtr) */ static void -TclThreadFinalizeObjects (ClientData clientData) +TclThreadFinalizeContLines (ClientData clientData) { /* * Release the hashtable tracking invisible continuation lines. */ + ThreadSpecificData *tsdPtr = TclGetContLineTable(); Tcl_HashEntry *hPtr; Tcl_HashSearch hSearch; - ThreadSpecificData *tsdPtr = TclGetTables(); for (hPtr = Tcl_FirstHashEntry(tsdPtr->lineCLPtr, &hSearch); hPtr != NULL; @@ -793,6 +790,7 @@ TclThreadFinalizeObjects (ClientData clientData) Tcl_DeleteHashEntry (hPtr); } Tcl_DeleteHashTable (tsdPtr->lineCLPtr); + ckfree((char *) tsdPtr->lineCLPtr); tsdPtr->lineCLPtr = NULL; } @@ -1011,7 +1009,7 @@ TclDbDumpActiveObjects( Tcl_HashSearch hSearch; Tcl_HashEntry *hPtr; Tcl_HashTable *tablePtr; - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); tablePtr = tsdPtr->objThreadMap; @@ -1078,7 +1076,7 @@ TclDbInitNewObj( Tcl_HashTable *tablePtr; int isNew; ObjData *objData; - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); if (tsdPtr->objThreadMap == NULL) { tsdPtr->objThreadMap = (Tcl_HashTable *) @@ -3646,7 +3644,7 @@ Tcl_DbIncrRefCount( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { @@ -3711,7 +3709,7 @@ Tcl_DbDecrRefCount( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { @@ -3791,7 +3789,7 @@ Tcl_DbIsShared( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TclGetTables(); + ThreadSpecificData *tsdPtr = TclGetContLineTable(); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { Tcl_Panic("object table not initialized"); -- cgit v0.12 From 96e6cf13bf6f34d470255420538843d45d04aed9 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 8 Oct 2009 14:37:36 +0000 Subject: [Bug 2874678]: Don't leak bignums in [dict incr]... --- ChangeLog | 41 +++++++++++++++++++++++------------------ generic/tclDictObj.c | 8 +++++++- tests/dict.test | 37 ++++++++++++++++++++++--------------- 3 files changed, 52 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbc0860..a12bdc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,20 @@ +2009-10-08 Donal K. Fellows + + * generic/tclDictObj.c (DictIncrCmd): [Bug 2874678]: Don't leak any + bignums when doing [dict incr] with a value. + * tests/dict.test (dict-19.3): Memory leak detection code. + 2009-10-07 Andreas Kupries - * generic/tclObj.c: [Bug 2871908]: Plug memory leaks of the - objThreadMap and lineCLPtr hashtables. Also make the names of the - continuation line information initialization and finalization - functions more consistent. Patch supplied by Joe Mistachkin - . + * generic/tclObj.c: [Bug 2871908]: Plug memory leaks of objThreadMap + and lineCLPtr hashtables. Also make the names of the continuation + line information initialization and finalization functions more + consistent. Patch supplied by Joe Mistachkin . - * generic/tclIORChan.c (ErrnoReturn): Replace the hardwired - constant 11 with the proper errno define, EAGAIN. What was I - thinking ? The BSD's have a different errno assignment and break - with the hardwired number. Reported by emiliano on the chat. + * generic/tclIORChan.c (ErrnoReturn): Replace hardwired constant 11 + with proper errno #define, EAGAIN. What was I thinking? The BSD's have + a different errno assignment and break with the hardwired number. + Reported by emiliano on the chat. 2009-10-06 Don Porter @@ -19,7 +24,7 @@ their intreps and require reparsing. Thanks to Ashok Nadkarni for reporting the problem. - * generic/tclTomMathInt.h (new): Public header tclTomMath.h had + * generic/tclTomMathInt.h (new): Public header tclTomMath.h had * generic/tclTomMath.h: dependence on private headers, breaking use * generic/tommath.h: by extensions [Bug 1941434]. @@ -41,14 +46,14 @@ * library/tzdata/Asia/Gaza: * library/tzdata/Asia/Karachi: * library/tzdata/Pacific/Apia: Olson's tzdata2009n. - + 2009-09-29 Don Porter - * generic/tclDictObj.c: Updated freeIntRepProc routines so - * generic/tclExecute.c: that they set the typePtr field to - * generic/tclIO.c: NULL so that the Tcl_Obj is not left - * generic/tclIndexObj.c: in an inconsistent state. - * generic/tclInt.h: [Bug 2857044] + * generic/tclDictObj.c: [Bug 2857044]: Updated freeIntRepProc + * generic/tclExecute.c: routines so that they set the typePtr + * generic/tclIO.c: field to NULL so that the Tcl_Obj is + * generic/tclIndexObj.c: not left in an inconsistent state. + * generic/tclInt.h: * generic/tclListObj.c: * generic/tclNamesp.c: * generic/tclOOCall.c: @@ -124,7 +129,7 @@ 2009-09-16 Alexandre Ferrieux * generic/tclObj.c: Extended ::tcl::unsupported::representation. - + 2009-09-11 Don Porter * generic/tclBasic.c: Completed the NR-enabling of [subst]. @@ -148,7 +153,7 @@ 2009-09-07 Don Porter * generic/tclParse.c: [Bug 2850901]: Corrected line counting error - * tests/into.test: in multi-command script substitutions. + * tests/into.test: in multi-command script substitutions. 2009-09-07 Daniel Steffen diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index d30a769..32a5cb0 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.78 2009/09/30 03:11:24 dgp Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.79 2009/10/08 14:37:36 dkf Exp $ */ #include "tclInt.h" @@ -2165,6 +2165,12 @@ DictIncrCmd( if (code != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (reading increment)"); } else { + /* + * Remember to dispose with the bignum as we're not actually + * using it directly. [Bug 2874678] + */ + + mp_clear(&increment); Tcl_DictObjPut(interp, dictPtr, objv[2], objv[3]); } } else { diff --git a/tests/dict.test b/tests/dict.test index b83a5ed..b4f0f0e 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.32 2008/12/15 23:09:24 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.33 2009/10/08 14:37:36 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -18,6 +18,17 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Used for constraining memory leak tests testConstraint memory [llength [info commands memory]] +if {[testConstraint memory]} { + proc memtest script { + set end [lindex [split [memory info] \n] 3 3] + for {set i 0} {$i < 5} {incr i} { + uplevel 1 $script + set tmp $end + set end [lindex [split [memory info] \n] 3 3] + } + expr {$end - $tmp} + } +} # Procedure to help check the contents of a dictionary. Note that we # can't just compare the string version because the order of the @@ -818,15 +829,9 @@ test dict-19.1 {memory bug} { dict get $successors x }} } [dict create c d a b] -test dict-19.2 {dict: testing for leaks} -setup { - proc getbytes {} { - set lines [split [memory info] "\n"] - lindex [lindex $lines 3] 3 - } -} -constraints memory -body { +test dict-19.2 {dict: testing for leaks} -constraints memory -body { # This test is made to stress object reference management - set end [getbytes] - for {set i 0} {$i < 5} {incr i} { + memtest { apply {{} { # A shared invalid dictinary set apa {a {}b c d} @@ -929,14 +934,16 @@ test dict-19.2 {dict: testing for leaks} -setup { trace remove variable bepa write {error hej} unset bepa }} - set tmp $end - set end [getbytes] } - expr {$end - $tmp} +} -result 0 +test dict-19.3 {testing for leaks - Bug 2874678} -constraints memory -body { + set d aDictVar; # Force interpreted [dict incr] + memtest { + dict incr $d aKey 0 + unset $d + } } -cleanup { - unset -nocomplain end i tmp - rename getbytes {} -# rename stress {} + unset d } -result 0 test dict-20.1 {dict merge command} { -- cgit v0.12 From e513a2af4d14837117981f12dc2a11c116cd7683 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 14 Oct 2009 15:59:15 +0000 Subject: Added missing text. Noticed by Emiliano Gavilan. --- doc/try.n | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/try.n b/doc/try.n index f6ccb7f..84bef03 100644 --- a/doc/try.n +++ b/doc/try.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: try.n,v 1.1 2008/12/16 21:29:10 dkf Exp $ +'\" RCS: @(#) $Id: try.n,v 1.2 2009/10/14 15:59:15 dkf Exp $ '\" .so man.macros .TH try n 8.6 Tcl "Tcl Built-In Commands" @@ -51,7 +51,8 @@ non-empty, it names a variable into which the result of the evaluation of \fIbody\fR (from the main \fBtry\fR) will be placed; this will contain the human-readable form of any errors. If the second word of the list is present and non-empty, it names a variable into which the options dictionary of the -interpreter at the moment of completion of execution of \fIbody\fR. +interpreter at the moment of completion of execution of \fIbody\fR +will be placed. .PP The \fIscript\fR word of each \fIhandler\fR is also always interpreted the same: as a Tcl script to evaluate if the clause is matched. If \fIscript\fR is -- cgit v0.12 From 0e16374028b1faf8f321a454f9a965b065bd5a1e Mon Sep 17 00:00:00 2001 From: patthoyts Date: Thu, 15 Oct 2009 20:33:54 +0000 Subject: Fix the icon to have 48x48 size (mistakenly made a 46px icon) --- win/tclsh.ico | Bin 45934 -> 57022 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/win/tclsh.ico b/win/tclsh.ico index 6800dc2..e254318 100644 Binary files a/win/tclsh.ico and b/win/tclsh.ico differ -- cgit v0.12 From e37850ab1c67a3e6c3b23fddc07afeaefd699994 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 17 Oct 2009 22:24:38 +0000 Subject: Fix [Bug 2629338]: Stop evil unset traces from accessing freed memory. --- ChangeLog | 8 ++++++++ generic/tclTrace.c | 15 ++++++++------- generic/tclVar.c | 52 +++++++++++++++++++++++++++++++++++++--------------- 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index a12bdc8..263c1b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-17 Donal K. Fellows + + * generic/tclVar.c (UnsetVarStruct, TclDeleteNamespaceVars) + (TclDeleteCompiledLocalVars, DeleteArray): + * generic/tclTrace.c (Tcl_UntraceVar2): [Bug 2629338]: Stop traces + that are deleted part way through (a feature used by tdom) from + causing freed memory to be accessed. + 2009-10-08 Donal K. Fellows * generic/tclDictObj.c (DictIncrCmd): [Bug 2874678]: Don't leak any diff --git a/generic/tclTrace.c b/generic/tclTrace.c index cb40fd7..e35b7a3 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.55 2009/02/10 23:09:05 nijtmans Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.56 2009/10/17 22:24:38 dkf Exp $ */ #include "tclInt.h" @@ -2258,7 +2258,7 @@ StringTraceProc( data->proc(data->clientData, interp, level, (char *) command, cmdPtr->proc, cmdPtr->clientData, objc, argv); - TclStackFree(interp, (void *) argv); + TclStackFree(interp, argv); return TCL_OK; } @@ -2283,7 +2283,7 @@ static void StringTraceDeleteProc( ClientData clientData) { - ckfree((char *) clientData); + ckfree(clientData); } /* @@ -2311,7 +2311,7 @@ Tcl_DeleteTrace( { Interp *iPtr = (Interp *) interp; Trace *prevPtr, *tracePtr = (Trace *) trace; - register Trace **tracePtr2 = &(iPtr->tracePtr); + register Trace **tracePtr2 = &iPtr->tracePtr; ActiveInterpTrace *activePtr; /* @@ -2320,14 +2320,14 @@ Tcl_DeleteTrace( */ prevPtr = NULL; - while ((*tracePtr2) != NULL && (*tracePtr2) != tracePtr) { + while (*tracePtr2 != NULL && *tracePtr2 != tracePtr) { prevPtr = *tracePtr2; - tracePtr2 = &((*tracePtr2)->nextPtr); + tracePtr2 = &prevPtr->nextPtr; } if (*tracePtr2 == NULL) { return; } - (*tracePtr2) = (*tracePtr2)->nextPtr; + *tracePtr2 = (*tracePtr2)->nextPtr; /* * The code below makes it possible to delete traces while traces are @@ -2899,6 +2899,7 @@ Tcl_UntraceVar2( } else { prevPtr->nextPtr = nextPtr; } + tracePtr->nextPtr = NULL; Tcl_EventuallyFree(tracePtr, TCL_DYNAMIC); for (tracePtr = nextPtr; tracePtr != NULL; diff --git a/generic/tclVar.c b/generic/tclVar.c index ebd9d96..3bbe63f 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.182 2009/08/25 21:03:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.183 2009/10/17 22:24:38 dkf Exp $ */ #include "tclInt.h" @@ -2361,11 +2361,22 @@ UnsetVarStruct( if ((dummyVar.flags & VAR_TRACED_UNSET) || (arrayPtr && (arrayPtr->flags & VAR_TRACED_UNSET))) { dummyVar.flags &= ~VAR_TRACE_ACTIVE; - TclObjCallVarTraces(iPtr, arrayPtr, (Var *) &dummyVar, - part1Ptr, part2Ptr, + TclObjCallVarTraces(iPtr, arrayPtr, &dummyVar, part1Ptr, part2Ptr, (flags & (TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY)) | TCL_TRACE_UNSETS, /* leaveErrMsg */ 0, -1); + + /* + * The traces that we just called may have triggered a change in + * the set of traces. If so, reload the traces to manipulate. + */ + + tracePtr = NULL; + if (TclIsVarTraced(&dummyVar)) { + tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) &dummyVar); + tracePtr = Tcl_GetHashValue(tPtr); + } + if (tPtr) { Tcl_DeleteHashEntry(tPtr); } @@ -2378,6 +2389,7 @@ UnsetVarStruct( VarTrace *prevPtr = tracePtr; tracePtr = tracePtr->nextPtr; + prevPtr->nextPtr = NULL; Tcl_EventuallyFree(prevPtr, TCL_DYNAMIC); } for (activePtr = iPtr->activeVarTracePtr; activePtr != NULL; @@ -4307,8 +4319,8 @@ ParseSearchId( Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&iPtr->varSearches, (char *) varPtr); - for (searchPtr = (ArraySearch *) Tcl_GetHashValue(hPtr); - searchPtr != NULL; searchPtr = searchPtr->nextPtr) { + for (searchPtr = Tcl_GetHashValue(hPtr); searchPtr != NULL; + searchPtr = searchPtr->nextPtr) { if (searchPtr->id == id) { return searchPtr; } @@ -4348,8 +4360,8 @@ DeleteSearches( if (arrayVarPtr->flags & VAR_SEARCH_ACTIVE) { sPtr = Tcl_FindHashEntry(&iPtr->varSearches, (char *) arrayVarPtr); - for (searchPtr = (ArraySearch *) Tcl_GetHashValue(sPtr); - searchPtr != NULL; searchPtr = nextPtr) { + for (searchPtr = Tcl_GetHashValue(sPtr); searchPtr != NULL; + searchPtr = nextPtr) { nextPtr = searchPtr->nextPtr; ckfree((char *) searchPtr); } @@ -4418,16 +4430,24 @@ TclDeleteNamespaceVars( if (TclIsVarTraced(varPtr)) { Tcl_HashEntry *tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); - VarTrace *tracePtr = (VarTrace *) Tcl_GetHashValue(tPtr); + VarTrace *tracePtr = Tcl_GetHashValue(tPtr); + ActiveVarTrace *activePtr; while (tracePtr) { VarTrace *prevPtr = tracePtr; tracePtr = tracePtr->nextPtr; - Tcl_EventuallyFree((ClientData) prevPtr, TCL_DYNAMIC); + prevPtr->nextPtr = NULL; + Tcl_EventuallyFree(prevPtr, TCL_DYNAMIC); } Tcl_DeleteHashEntry(tPtr); varPtr->flags &= ~VAR_ALL_TRACES; + for (activePtr = iPtr->activeVarTracePtr; activePtr != NULL; + activePtr = activePtr->nextPtr) { + if (activePtr->varPtr == varPtr) { + activePtr->nextTracePtr = NULL; + } + } } VarHashRefCount(varPtr)--; VarHashDeleteEntry(varPtr); @@ -4530,6 +4550,7 @@ TclDeleteCompiledLocalVars( UnsetVarStruct(varPtr, NULL, iPtr, *namePtrPtr, NULL, TCL_TRACE_UNSETS); } + framePtr->numCompiledLocals = 0; } /* @@ -4601,12 +4622,13 @@ DeleteArray( elNamePtr, flags,/* leaveErrMsg */ 0, -1); } tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) elPtr); - tracePtr = (VarTrace *) Tcl_GetHashValue(tPtr); + tracePtr = Tcl_GetHashValue(tPtr); while (tracePtr) { VarTrace *prevPtr = tracePtr; tracePtr = tracePtr->nextPtr; - Tcl_EventuallyFree((ClientData) prevPtr, TCL_DYNAMIC); + prevPtr->nextPtr = NULL; + Tcl_EventuallyFree(prevPtr, TCL_DYNAMIC); } Tcl_DeleteHashEntry(tPtr); elPtr->flags &= ~VAR_ALL_TRACES; @@ -5513,7 +5535,7 @@ AllocVarEntry( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key to store in the hash table entry. */ { - Tcl_Obj *objPtr = (Tcl_Obj *) keyPtr; + Tcl_Obj *objPtr = keyPtr; Tcl_HashEntry *hPtr; Var *varPtr; @@ -5522,7 +5544,7 @@ AllocVarEntry( varPtr->value.objPtr = NULL; VarHashRefCount(varPtr) = 1; - hPtr = &(((VarInHash *)varPtr)->entry); + hPtr = &(((VarInHash *) varPtr)->entry); Tcl_SetHashValue(hPtr, varPtr); hPtr->key.objPtr = objPtr; Tcl_IncrRefCount(objPtr); @@ -5553,7 +5575,7 @@ CompareVarKeys( void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { - Tcl_Obj *objPtr1 = (Tcl_Obj *) keyPtr; + Tcl_Obj *objPtr1 = keyPtr; Tcl_Obj *objPtr2 = hPtr->key.objPtr; register const char *p1, *p2; register int l1, l2; @@ -5599,7 +5621,7 @@ HashVarKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - Tcl_Obj *objPtr = (Tcl_Obj *) keyPtr; + Tcl_Obj *objPtr = keyPtr; const char *string = TclGetString(objPtr); int length = objPtr->length; unsigned int result = 0; -- cgit v0.12 From ced84e1de5cdbd9a1c6a9e1850ab53968facc2d6 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Sun, 18 Oct 2009 08:00:40 +0000 Subject: Fix for [Bug 1565466] --- ChangeLog | 8 ++++++++ tests/thread.test | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 263c1b8..1814f7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-18 Joe Mistachkin + + * tests/thread.test (thread-4.[345]): [Bug 1565466]: Correct tests to + save their error state before the final call to threadReap just in case + it triggers an "invalid thread id" error. This error can occur if one + or more of the target threads has exited prior to the attempt to send + it an asynchronous exit command. + 2009-10-17 Donal K. Fellows * generic/tclVar.c (UnsetVarStruct, TclDeleteNamespaceVars) diff --git a/tests/thread.test b/tests/thread.test index be2bd40..15988bd 100644 --- a/tests/thread.test +++ b/tests/thread.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: thread.test,v 1.20 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: thread.test,v 1.21 2009/10/18 08:00:40 mistachkin Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -186,8 +186,9 @@ test thread-4.3 {TclThreadSend preserve errorInfo} {testthread} { set len [llength [testthread names]] set serverthread [testthread create] set x [catch {testthread send $serverthread {set undef}} msg] + set savedErrorInfo $::errorInfo threadReap - list $len $x $msg $::errorInfo + list $len $x $msg $savedErrorInfo } {1 1 {can't read "undef": no such variable} {can't read "undef": no such variable while executing "set undef" @@ -199,16 +200,18 @@ test thread-4.4 {TclThreadSend preserve code} {testthread} { set serverthread [testthread create] set ::errorInfo {} set x [catch {testthread send $serverthread {set ::errorInfo {}; break}} msg] + set savedErrorInfo $::errorInfo threadReap - list $len $x $msg $::errorInfo + list $len $x $msg $savedErrorInfo } {1 3 {} {}} test thread-4.5 {TclThreadSend preserve errorCode} {testthread} { threadReap set ::tcltest::mainThread [testthread names] set serverthread [testthread create] set x [catch {testthread send $serverthread {error ERR INFO CODE}} msg] + set savedErrorCode $::errorCode threadReap - list $x $msg $::errorCode + list $x $msg $savedErrorCode } {1 ERR CODE} -- cgit v0.12 From 87322cc40198a30c474da4769e08103cb41e7576 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Sun, 18 Oct 2009 10:39:39 +0000 Subject: Fix for [Bug 2871908] --- ChangeLog | 7 +++++++ generic/tclObj.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1814f7a..f3b82ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-10-18 Joe Mistachkin + * generic/tclObj.c (TclDbDumpActiveObjects, TclDbInitNewObj) + (Tcl_DbIncrRefCount, Tcl_DbDecrRefCount, Tcl_DbIsShared): [Bug 2871908] + Enforce separation of concerns between the lineCLPtr and objThreadMap + thread specific data members. + +2009-10-18 Joe Mistachkin + * tests/thread.test (thread-4.[345]): [Bug 1565466]: Correct tests to save their error state before the final call to threadReap just in case it triggers an "invalid thread id" error. This error can occur if one diff --git a/generic/tclObj.c b/generic/tclObj.c index d0e1115..8869e9b 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.162 2009/10/07 23:09:17 andreas_kupries Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.163 2009/10/18 10:39:41 mistachkin Exp $ */ #include "tclInt.h" @@ -1009,7 +1009,7 @@ TclDbDumpActiveObjects( Tcl_HashSearch hSearch; Tcl_HashEntry *hPtr; Tcl_HashTable *tablePtr; - ThreadSpecificData *tsdPtr = TclGetContLineTable(); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); tablePtr = tsdPtr->objThreadMap; @@ -1076,7 +1076,7 @@ TclDbInitNewObj( Tcl_HashTable *tablePtr; int isNew; ObjData *objData; - ThreadSpecificData *tsdPtr = TclGetContLineTable(); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); if (tsdPtr->objThreadMap == NULL) { tsdPtr->objThreadMap = (Tcl_HashTable *) @@ -3644,7 +3644,7 @@ Tcl_DbIncrRefCount( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TclGetContLineTable(); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { @@ -3709,7 +3709,7 @@ Tcl_DbDecrRefCount( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TclGetContLineTable(); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { @@ -3789,7 +3789,7 @@ Tcl_DbIsShared( if (!TclInExit()) { Tcl_HashTable *tablePtr; Tcl_HashEntry *hPtr; - ThreadSpecificData *tsdPtr = TclGetContLineTable(); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); tablePtr = tsdPtr->objThreadMap; if (!tablePtr) { Tcl_Panic("object table not initialized"); -- cgit v0.12 From e6b9dc1ca77df45483a0daaba818bffd3989363e Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 19 Oct 2009 22:00:19 +0000 Subject: * generic/tclIO.c: Revised ReadChars and FilterInputBytes routines to permit reads to continue up to the string limits of Tcl values. Before revisions, large read attempts could panic when as little as half the limiting value length was reached. [Patch 2107634] Thanks to Sean Morrison and Bob Parker for their roles in the fix. --- ChangeLog | 8 ++++++++ generic/tclIO.c | 44 +++++++++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3b82ae..18b8933 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-19 Don Porter + + * generic/tclIO.c: Revised ReadChars and FilterInputBytes routines + to permit reads to continue up to the string limits of Tcl values. + Before revisions, large read attempts could panic when as little as + half the limiting value length was reached. [Patch 2107634] + Thanks to Sean Morrison and Bob Parker for their roles in the fix. + 2009-10-18 Joe Mistachkin * generic/tclObj.c (TclDbDumpActiveObjects, TclDbInitNewObj) diff --git a/generic/tclIO.c b/generic/tclIO.c index 737e64e..28e9fbc 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.162 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.163 2009/10/19 22:00:19 dgp Exp $ */ #include "tclInt.h" @@ -5016,7 +5016,7 @@ FilterInputBytes( /* State info for channel */ ChannelBuffer *bufPtr; char *raw, *rawStart, *dst; - int offset, toRead, dstNeeded, spaceLeft, result, rawLen, length; + int offset, toRead, dstNeeded, spaceLeft, result, rawLen; Tcl_Obj *objPtr; #define ENCODING_LINESIZE 20 /* Lower bound on how many bytes to convert at * a time. Since we don't know a priori how @@ -5082,15 +5082,19 @@ FilterInputBytes( if (toRead > rawLen) { toRead = rawLen; } - dstNeeded = toRead * TCL_UTF_MAX + 1; - spaceLeft = objPtr->length - offset - TCL_UTF_MAX - 1; + dstNeeded = toRead * TCL_UTF_MAX; + spaceLeft = objPtr->length - offset; if (dstNeeded > spaceLeft) { - length = offset * 2; - if (offset < dstNeeded) { + int length = offset + ((offset < dstNeeded) ? dstNeeded : offset); + + if (Tcl_AttemptSetObjLength(objPtr, length) == 0) { length = offset + dstNeeded; + if (Tcl_AttemptSetObjLength(objPtr, length) == 0) { + dstNeeded = TCL_UTF_MAX - 1 + toRead; + length = offset + dstNeeded; + Tcl_SetObjLength(objPtr, length); + } } - length += TCL_UTF_MAX + 1; - Tcl_SetObjLength(objPtr, length); spaceLeft = length - offset; dst = objPtr->bytes + offset; *gsPtr->dstPtr = dst; @@ -5098,7 +5102,7 @@ FilterInputBytes( gsPtr->state = statePtr->inputEncodingState; result = Tcl_ExternalToUtf(NULL, gsPtr->encoding, raw, rawLen, statePtr->inputEncodingFlags, &statePtr->inputEncodingState, - dst, spaceLeft, &gsPtr->rawRead, &gsPtr->bytesWrote, + dst, spaceLeft+1, &gsPtr->rawRead, &gsPtr->bytesWrote, &gsPtr->charsWrote); /* @@ -5817,6 +5821,8 @@ ReadBytes( * 'charsToRead' can safely be a very large number because space is only * allocated to hold data read from the channel as needed. * + * 'charsToRead' may *not* be 0. + * * Results: * The return value is the number of characters appended to the object, * *offsetPtr is filled with the number of bytes that were appended, and @@ -5854,7 +5860,7 @@ ReadChars( * UTF-8. On output, contains another guess * based on the data seen so far. */ { - int toRead, factor, offset, spaceLeft, length, srcLen, dstNeeded; + int toRead, factor, offset, spaceLeft, srcLen, dstNeeded; int srcRead, dstWrote, numChars, dstRead; ChannelBuffer *bufPtr; char *src, *dst; @@ -5879,8 +5885,8 @@ ReadChars( * how many characters were produced by the previous pass. */ - dstNeeded = toRead * factor / UTF_EXPANSION_FACTOR; - spaceLeft = objPtr->length - offset - TCL_UTF_MAX - 1; + dstNeeded = TCL_UTF_MAX - 1 + toRead * factor / UTF_EXPANSION_FACTOR; + spaceLeft = objPtr->length - offset; if (dstNeeded > spaceLeft) { /* @@ -5889,13 +5895,17 @@ ReadChars( * larger. */ - length = offset * 2; - if (offset < dstNeeded) { + int length = offset + ((offset < dstNeeded) ? dstNeeded : offset); + + if (Tcl_AttemptSetObjLength(objPtr, length) == 0) { length = offset + dstNeeded; + if (Tcl_AttemptSetObjLength(objPtr, length) == 0) { + dstNeeded = TCL_UTF_MAX - 1 + toRead; + length = offset + dstNeeded; + Tcl_SetObjLength(objPtr, length); + } } spaceLeft = length - offset; - length += TCL_UTF_MAX + 1; - Tcl_SetObjLength(objPtr, length); } if (toRead == srcLen) { /* @@ -5987,7 +5997,7 @@ ReadChars( Tcl_ExternalToUtf(NULL, statePtr->encoding, src, srcLen, statePtr->inputEncodingFlags, &statePtr->inputEncodingState, dst, - dstNeeded + TCL_UTF_MAX, &srcRead, &dstWrote, &numChars); + dstNeeded + 1, &srcRead, &dstWrote, &numChars); if (encEndFlagSuppressed) { statePtr->inputEncodingFlags |= TCL_ENCODING_END; -- cgit v0.12 From 259d383e8d57a792f15ecc31734381dc6216b0cc Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 20 Oct 2009 17:21:22 +0000 Subject: * unix/Makefile.in: Removed the long outdated and broken targets package-* that were for building Solaris packages. Appears that the pieces needed for these targets to function have never been present in the current era of Tcl development and belong completely to Tcl pre-history. --- ChangeLog | 8 ++++++ unix/Makefile.in | 80 +------------------------------------------------------- unix/configure | 1 - 3 files changed, 9 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18b8933..0fd658a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-20 Don Porter + + * unix/Makefile.in: Removed the long outdated and broken targets + package-* that were for building Solaris packages. Appears that + the pieces needed for these targets to function have never been + present in the current era of Tcl development and belong completely + to Tcl pre-history. + 2009-10-19 Don Porter * generic/tclIO.c: Revised ReadChars and FilterInputBytes routines diff --git a/unix/Makefile.in b/unix/Makefile.in index 07e3fcc..f190222 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.277 2009/10/05 02:40:04 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.278 2009/10/20 17:21:23 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -1988,82 +1988,4 @@ BUILD_HTML = \ ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS) -# -# Targets to build Solaris package of the distribution for the current -# architecture. To build stream packages for both sun4 and i86pc -# architectures: -# -# On the sun4 machine, execute the following: -# make distclean; ./configure -# make DISTDIR= package -# -# Once the build is complete, execute the following on the i86pc machine: -# make DISTDIR= package-quick -# -# is the absolute path to a directory where the build should take -# place. These steps will generate the $(PACKAGE).sun4 and $(PACKAGE).i86pc -# stream packages. It is important that the packages be built in this fashion -# in order to ensure that the architecture independent files are exactly the -# same, including timestamps, in both packages. -# - -PACKAGE=SCRPtcl - -package: dist package-config package-common package-binaries package-generate -package-quick: package-config package-binaries package-generate - -# -# Configure for the current architecture in the dist directory. -# -package-config: - mkdir -p $(DISTDIR)/unix/`arch` - cd $(DISTDIR)/unix/`arch`; \ - ../configure --prefix=/opt/$(PACKAGE)/$(VERSION) \ - --exec_prefix=/opt/$(PACKAGE)/$(VERSION)/`arch` \ - --enable-shared - mkdir -p $(DISTDIR)/$(PACKAGE)/$(VERSION) - mkdir -p $(DISTDIR)/$(PACKAGE)/$(VERSION)/`arch` - -# -# Build and install the architecture independent files in the dist directory. -# - -package-common: - cd $(DISTDIR)/unix/`arch`;\ - $(MAKE); \ - $(MAKE) prefix=$(DISTDIR)/$(PACKAGE)/$(VERSION) \ - exec_prefix=$(DISTDIR)/$(PACKAGE)/$(VERSION)/`arch` \ - install-libraries install-man - mkdir -p $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin - sed -e "s/TCLVERSION/$(VERSION)/g" < $(UNIX_DIR)/tclsh.sh \ - > $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin/tclsh$(VERSION) - chmod 755 $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin/tclsh$(VERSION) - -# -# Build and install the architecture specific files in the dist directory. -# - -package-binaries: - cd $(DISTDIR)/unix/`arch`; \ - $(MAKE); \ - $(MAKE) install-binaries prefix=$(DISTDIR)/$(PACKAGE)/$(VERSION) \ - exec_prefix=$(DISTDIR)/$(PACKAGE)/$(VERSION)/`arch` - -# -# Generate a package from the installed files in the dist directory for the -# current architecture. -# - -package-generate: - pkgproto $(DISTDIR)/$(PACKAGE)/$(VERSION)/bin=bin \ - $(DISTDIR)/$(PACKAGE)/$(VERSION)/include=include \ - $(DISTDIR)/$(PACKAGE)/$(VERSION)/lib=lib \ - $(DISTDIR)/$(PACKAGE)/$(VERSION)/man=man \ - $(DISTDIR)/$(PACKAGE)/$(VERSION)/`arch`=`arch` \ - | $(TCL_EXE) $(UNIX_DIR)/mkProto.tcl \ - $(VERSION) $(UNIX_DIR) > prototype - pkgmk -o -d . -f prototype -a `arch` - pkgtrans -s . $(PACKAGE).`arch` $(PACKAGE) - rm -rf $(PACKAGE) - # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/unix/configure b/unix/configure index a926936..6b4b375 100755 --- a/unix/configure +++ b/unix/configure @@ -7174,7 +7174,6 @@ fi fi - ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" -- cgit v0.12 From 206803edd2a7c10a2b1d5413762aa326169a39cb Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 21 Oct 2009 13:36:22 +0000 Subject: Fix [Bug 2881259]. --- ChangeLog | 19 ++++++++++++------- generic/tclTrace.c | 4 ++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fd658a..fc73113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-21 Donal K. Fellows + + * generic/tclTrace.c (StringTraceProc): [Bug 2881259]: Added back cast + to work around silly bug in MSVC's handling of auto-casting. + 2009-10-20 Don Porter * unix/Makefile.in: Removed the long outdated and broken targets @@ -8,18 +13,18 @@ 2009-10-19 Don Porter - * generic/tclIO.c: Revised ReadChars and FilterInputBytes routines - to permit reads to continue up to the string limits of Tcl values. - Before revisions, large read attempts could panic when as little as - half the limiting value length was reached. [Patch 2107634] + * generic/tclIO.c: [Patch 2107634]: Revised ReadChars and + FilterInputBytes routines to permit reads to continue up to the string + limits of Tcl values. Before revisions, large read attempts could + panic when as little as half the limiting value length was reached. Thanks to Sean Morrison and Bob Parker for their roles in the fix. 2009-10-18 Joe Mistachkin * generic/tclObj.c (TclDbDumpActiveObjects, TclDbInitNewObj) - (Tcl_DbIncrRefCount, Tcl_DbDecrRefCount, Tcl_DbIsShared): [Bug 2871908] - Enforce separation of concerns between the lineCLPtr and objThreadMap - thread specific data members. + (Tcl_DbIncrRefCount, Tcl_DbDecrRefCount, Tcl_DbIsShared): + [Bug 2871908]: Enforce separation of concerns between the lineCLPtr + and objThreadMap thread specific data members. 2009-10-18 Joe Mistachkin diff --git a/generic/tclTrace.c b/generic/tclTrace.c index e35b7a3..ca1f736 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.56 2009/10/17 22:24:38 dkf Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.57 2009/10/21 13:36:23 dkf Exp $ */ #include "tclInt.h" @@ -2258,7 +2258,7 @@ StringTraceProc( data->proc(data->clientData, interp, level, (char *) command, cmdPtr->proc, cmdPtr->clientData, objc, argv); - TclStackFree(interp, argv); + TclStackFree(interp, (void *) argv); return TCL_OK; } -- cgit v0.12 From 5be98e8c4e3aa5d4c7c98af3b165e62e7be15d7e Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 21 Oct 2009 13:53:14 +0000 Subject: Fix [Bug 2882561]. --- ChangeLog | 3 +++ generic/tclPosixStr.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc73113..f5e6f58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-10-21 Donal K. Fellows + * generic/tclPosixStr.c: [Bug 2882561]: Work around oddity on Haiku OS + where SIGSEGV and SIGBUS are the same value. + * generic/tclTrace.c (StringTraceProc): [Bug 2881259]: Added back cast to work around silly bug in MSVC's handling of auto-casting. diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index 5c1a1b9..4d7c559 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPosixStr.c,v 1.15 2009/03/15 15:35:46 dkf Exp $ + * RCS: @(#) $Id: tclPosixStr.c,v 1.16 2009/10/21 13:53:14 dkf Exp $ */ #include "tclInt.h" @@ -994,7 +994,7 @@ Tcl_SignalId( #ifdef SIGQUIT case SIGQUIT: return "SIGQUIT"; #endif -#ifdef SIGSEGV +#if defined(SIGSEGV) && (!defined(SIGBUS) || (SIGSEGV != SIGBUS)) case SIGSEGV: return "SIGSEGV"; #endif #ifdef SIGSTOP @@ -1128,7 +1128,7 @@ Tcl_SignalMsg( #ifdef SIGQUIT case SIGQUIT: return "quit signal"; #endif -#ifdef SIGSEGV +#if defined(SIGSEGV) && (!defined(SIGBUS) || (SIGSEGV != SIGBUS)) case SIGSEGV: return "segmentation violation"; #endif #ifdef SIGSTOP -- cgit v0.12 From 0fca0c346fbe4fb05578bffffc93048a9e0db914 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 21 Oct 2009 15:13:15 +0000 Subject: Typo --- doc/lset.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/lset.n b/doc/lset.n index 74d47e6..dfc3d2b 100755 --- a/doc/lset.n +++ b/doc/lset.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lset.n,v 1.19 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: lset.n,v 1.20 2009/10/21 15:13:15 dkf Exp $ '\" .so man.macros .TH lset n 8.4 Tcl "Tcl Built-In Commands" @@ -56,7 +56,7 @@ command. If \fIindex\fR is negative or greater than the number of elements in \fI$varName\fR, then an error occurs. .PP -If \fIindex\fR is equal to the numnber of elements in \fI$varName\fR, +If \fIindex\fR is equal to the number of elements in \fI$varName\fR, then the given element is appended to the list. .PP The interpretation of each simple \fIindex\fR value is the same as -- cgit v0.12 From a14cd9979de8b9856c979aae40f3c8889b2d8d9b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 22 Oct 2009 15:39:58 +0000 Subject: Let [$obj varname x(y)] work. [Bug 2883857] --- ChangeLog | 5 +++++ generic/tclOOBasic.c | 27 +++++++++++++++++++++++++-- tests/oo.test | 13 ++++++++++++- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5e6f58..42b3dd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-22 Donal K. Fellows + + * generic/tclOOBasic.c (TclOO_Object_VarName): [Bug 2883857]: Allow + the passing of array element names through this method. + 2009-10-21 Donal K. Fellows * generic/tclPosixStr.c: [Bug 2882561]: Work around oddity on Haiku OS diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index f70d4f9..f6e4542 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.18 2009/03/24 10:46:04 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.19 2009/10/22 15:39:58 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -608,7 +608,30 @@ TclOO_Object_VarName( } varNamePtr = Tcl_NewObj(); - Tcl_GetVariableFullName(interp, (Tcl_Var) varPtr, varNamePtr); + if (aryVar != NULL) { + Tcl_HashEntry *hPtr; + Tcl_HashSearch search; + + Tcl_GetVariableFullName(interp, (Tcl_Var) aryVar, varNamePtr); + + /* + * WARNING! This code pokes inside the implementation of hash tables! + */ + + hPtr = Tcl_FirstHashEntry((Tcl_HashTable *) aryVar->value.tablePtr, + &search); + while (hPtr != NULL) { + if (varPtr == Tcl_GetHashValue(hPtr)) { + Tcl_AppendToObj(varNamePtr, "(", -1); + Tcl_AppendObjToObj(varNamePtr, hPtr->key.objPtr); + Tcl_AppendToObj(varNamePtr, ")", -1); + break; + } + hPtr = Tcl_NextHashEntry(&search); + } + } else { + Tcl_GetVariableFullName(interp, (Tcl_Var) varPtr, varNamePtr); + } Tcl_SetObjResult(interp, varNamePtr); return TCL_OK; } diff --git a/tests/oo.test b/tests/oo.test index 829c8ce..a976a7d 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.29 2009/06/24 15:29:40 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.30 2009/10/22 15:39:58 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1626,6 +1626,17 @@ test oo-19.1 {OO: varname method} -setup { inst destroy rename foo {} } -result {{x {} write} ok ok 0} +test oo-19.2 {OO: varname method: Bug 2883857} -setup { + oo::class create SpecialClass + oo::objdefine SpecialClass export createWithNamespace + SpecialClass createWithNamespace inst ::oo_test + oo::objdefine inst export varname eval +} -body { + inst eval { variable x; array set x {y z} } + inst varname x(y) +} -cleanup { + SpecialClass destroy +} -result ::oo_test::x(y) test oo-20.1 {OO: variable method} -body { oo::class create testClass { -- cgit v0.12 From 4c918aeb8891267ba470fbb2734bc5f0f711df00 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 23 Oct 2009 19:09:17 +0000 Subject: * generic/tclIO.c (FlushChannel): Skip OutputProc for low-level 0-length writes. When closing pipes which have already been closed not skipping leads to spurious SIG_PIPE signals. Reported by Mikhail Teterin . --- ChangeLog | 7 +++++++ generic/tclIO.c | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42b3dd3..47f0a53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-23 Andreas Kupries + + * generic/tclIO.c (FlushChannel): Skip OutputProc for low-level + 0-length writes. When closing pipes which have already been closed + not skipping leads to spurious SIG_PIPE signals. Reported by + Mikhail Teterin . + 2009-10-22 Donal K. Fellows * generic/tclOOBasic.c (TclOO_Object_VarName): [Bug 2883857]: Allow diff --git a/generic/tclIO.c b/generic/tclIO.c index 28e9fbc..57960f5 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.163 2009/10/19 22:00:19 dgp Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.164 2009/10/23 19:09:17 andreas_kupries Exp $ */ #include "tclInt.h" @@ -2393,7 +2393,11 @@ FlushChannel( */ toWrite = BytesLeft(bufPtr); - written = ChanWrite(chanPtr, RemovePoint(bufPtr),toWrite, &errorCode); + if (toWrite == 0) { + written = 0; + } else { + written = ChanWrite(chanPtr, RemovePoint(bufPtr),toWrite, &errorCode); + } /* * If the write failed completely attempt to start the asynchronous -- cgit v0.12 From 2a552ac984e719a90dd9e9b554e2c3eb929359f9 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Sat, 24 Oct 2009 22:20:10 +0000 Subject: * library/clock.tcl (ProcessPosixTimeZone): Corrected a regression in the fix to [Bug 2207436] that caused [clock] to apply EU daylight saving time rules in the US. Thanks to Karl Lehenbauer for reporting this regression. * tests/clock.test (clock-52.4): Added a regression test for the above bug. * library/tzdata/Asia/Dhaka: * library/tzdata/Asia/Karachi: New DST rules for Bangladesh and Pakistan. (Olson's tzdata2009o.) --- ChangeLog | 12 +++ library/clock.tcl | 14 +++- library/tzdata/Asia/Dhaka | 1 - library/tzdata/Asia/Karachi | 182 +++++++++++++++++++++++++++++++++++++++++++- tests/clock.test | 12 ++- 5 files changed, 215 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47f0a53..23eaa35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-10-24 Kevin B. Kenny + + * library/clock.tcl (ProcessPosixTimeZone): + Corrected a regression in the fix to [Bug 2207436] that caused + [clock] to apply EU daylight saving time rules in the US. + Thanks to Karl Lehenbauer for reporting this regression. + * tests/clock.test (clock-52.4): + Added a regression test for the above bug. + * library/tzdata/Asia/Dhaka: + * library/tzdata/Asia/Karachi: + New DST rules for Bangladesh and Pakistan. (Olson's tzdata2009o.) + 2009-10-23 Andreas Kupries * generic/tclIO.c (FlushChannel): Skip OutputProc for low-level diff --git a/library/clock.tcl b/library/clock.tcl index 36e3a4e..bc4ec4d 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.54 2009/07/24 10:53:47 dkf Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.55 2009/10/24 22:20:10 kennykb Exp $ # #---------------------------------------------------------------------- @@ -3789,11 +3789,16 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { } # Fill in defaults for European or US DST rules + # US start time is the second Sunday in March + # EU start time is the last Sunday in March + # US end time is the first Sunday in November. + # EU end time is the last Sunday in October if { [dict get $z startDayOfYear] eq {} && [dict get $z startMonth] eq {} } then { - if {($stdHours>=0) && ($stdHours<=12)} { + if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { + # EU dict set z startWeekOfMonth 5 if {$stdHours>2} { dict set z startHours 2 @@ -3801,6 +3806,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { dict set z startHours [expr {$stdHours+1}] } } else { + # US dict set z startWeekOfMonth 2 dict set z startHours 2 } @@ -3812,7 +3818,8 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { if { [dict get $z endDayOfYear] eq {} && [dict get $z endMonth] eq {} } then { - if {($stdHours>=0) && ($stdHours<=12)} { + if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { + # EU dict set z endMonth 10 dict set z endWeekOfMonth 5 if {$stdHours>2} { @@ -3821,6 +3828,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { dict set z endHours [expr {$stdHours+2}] } } else { + # US dict set z endMonth 11 dict set z endWeekOfMonth 1 dict set z endHours 2 diff --git a/library/tzdata/Asia/Dhaka b/library/tzdata/Asia/Dhaka index 70fc865..7ce68ce 100644 --- a/library/tzdata/Asia/Dhaka +++ b/library/tzdata/Asia/Dhaka @@ -9,5 +9,4 @@ set TZData(:Asia/Dhaka) { {-576138600 21600 0 DACT} {38772000 21600 0 BDT} {1245430800 25200 1 BDST} - {1262278800 21600 0 BDT} } diff --git a/library/tzdata/Asia/Karachi b/library/tzdata/Asia/Karachi index 6535471..acd69f4 100644 --- a/library/tzdata/Asia/Karachi +++ b/library/tzdata/Asia/Karachi @@ -12,5 +12,185 @@ set TZData(:Asia/Karachi) { {1212260400 21600 1 PKST} {1225476000 18000 0 PKT} {1239735600 21600 1 PKST} - {1254333600 18000 0 PKT} + {1257012000 18000 0 PKT} + {1271271600 21600 1 PKST} + {1288548000 18000 0 PKT} + {1302807600 21600 1 PKST} + {1320084000 18000 0 PKT} + {1334430000 21600 1 PKST} + {1351706400 18000 0 PKT} + {1365966000 21600 1 PKST} + {1383242400 18000 0 PKT} + {1397502000 21600 1 PKST} + {1414778400 18000 0 PKT} + {1429038000 21600 1 PKST} + {1446314400 18000 0 PKT} + {1460660400 21600 1 PKST} + {1477936800 18000 0 PKT} + {1492196400 21600 1 PKST} + {1509472800 18000 0 PKT} + {1523732400 21600 1 PKST} + {1541008800 18000 0 PKT} + {1555268400 21600 1 PKST} + {1572544800 18000 0 PKT} + {1586890800 21600 1 PKST} + {1604167200 18000 0 PKT} + {1618426800 21600 1 PKST} + {1635703200 18000 0 PKT} + {1649962800 21600 1 PKST} + {1667239200 18000 0 PKT} + {1681498800 21600 1 PKST} + {1698775200 18000 0 PKT} + {1713121200 21600 1 PKST} + {1730397600 18000 0 PKT} + {1744657200 21600 1 PKST} + {1761933600 18000 0 PKT} + {1776193200 21600 1 PKST} + {1793469600 18000 0 PKT} + {1807729200 21600 1 PKST} + {1825005600 18000 0 PKT} + {1839351600 21600 1 PKST} + {1856628000 18000 0 PKT} + {1870887600 21600 1 PKST} + {1888164000 18000 0 PKT} + {1902423600 21600 1 PKST} + {1919700000 18000 0 PKT} + {1933959600 21600 1 PKST} + {1951236000 18000 0 PKT} + {1965582000 21600 1 PKST} + {1982858400 18000 0 PKT} + {1997118000 21600 1 PKST} + {2014394400 18000 0 PKT} + {2028654000 21600 1 PKST} + {2045930400 18000 0 PKT} + {2060190000 21600 1 PKST} + {2077466400 18000 0 PKT} + {2091812400 21600 1 PKST} + {2109088800 18000 0 PKT} + {2123348400 21600 1 PKST} + {2140624800 18000 0 PKT} + {2154884400 21600 1 PKST} + {2172160800 18000 0 PKT} + {2186420400 21600 1 PKST} + {2203696800 18000 0 PKT} + {2218042800 21600 1 PKST} + {2235319200 18000 0 PKT} + {2249578800 21600 1 PKST} + {2266855200 18000 0 PKT} + {2281114800 21600 1 PKST} + {2298391200 18000 0 PKT} + {2312650800 21600 1 PKST} + {2329927200 18000 0 PKT} + {2344273200 21600 1 PKST} + {2361549600 18000 0 PKT} + {2375809200 21600 1 PKST} + {2393085600 18000 0 PKT} + {2407345200 21600 1 PKST} + {2424621600 18000 0 PKT} + {2438881200 21600 1 PKST} + {2456157600 18000 0 PKT} + {2470503600 21600 1 PKST} + {2487780000 18000 0 PKT} + {2502039600 21600 1 PKST} + {2519316000 18000 0 PKT} + {2533575600 21600 1 PKST} + {2550852000 18000 0 PKT} + {2565111600 21600 1 PKST} + {2582388000 18000 0 PKT} + {2596734000 21600 1 PKST} + {2614010400 18000 0 PKT} + {2628270000 21600 1 PKST} + {2645546400 18000 0 PKT} + {2659806000 21600 1 PKST} + {2677082400 18000 0 PKT} + {2691342000 21600 1 PKST} + {2708618400 18000 0 PKT} + {2722964400 21600 1 PKST} + {2740240800 18000 0 PKT} + {2754500400 21600 1 PKST} + {2771776800 18000 0 PKT} + {2786036400 21600 1 PKST} + {2803312800 18000 0 PKT} + {2817572400 21600 1 PKST} + {2834848800 18000 0 PKT} + {2849194800 21600 1 PKST} + {2866471200 18000 0 PKT} + {2880730800 21600 1 PKST} + {2898007200 18000 0 PKT} + {2912266800 21600 1 PKST} + {2929543200 18000 0 PKT} + {2943802800 21600 1 PKST} + {2961079200 18000 0 PKT} + {2975425200 21600 1 PKST} + {2992701600 18000 0 PKT} + {3006961200 21600 1 PKST} + {3024237600 18000 0 PKT} + {3038497200 21600 1 PKST} + {3055773600 18000 0 PKT} + {3070033200 21600 1 PKST} + {3087309600 18000 0 PKT} + {3101655600 21600 1 PKST} + {3118932000 18000 0 PKT} + {3133191600 21600 1 PKST} + {3150468000 18000 0 PKT} + {3164727600 21600 1 PKST} + {3182004000 18000 0 PKT} + {3196263600 21600 1 PKST} + {3213540000 18000 0 PKT} + {3227886000 21600 1 PKST} + {3245162400 18000 0 PKT} + {3259422000 21600 1 PKST} + {3276698400 18000 0 PKT} + {3290958000 21600 1 PKST} + {3308234400 18000 0 PKT} + {3322494000 21600 1 PKST} + {3339770400 18000 0 PKT} + {3354116400 21600 1 PKST} + {3371392800 18000 0 PKT} + {3385652400 21600 1 PKST} + {3402928800 18000 0 PKT} + {3417188400 21600 1 PKST} + {3434464800 18000 0 PKT} + {3448724400 21600 1 PKST} + {3466000800 18000 0 PKT} + {3480346800 21600 1 PKST} + {3497623200 18000 0 PKT} + {3511882800 21600 1 PKST} + {3529159200 18000 0 PKT} + {3543418800 21600 1 PKST} + {3560695200 18000 0 PKT} + {3574954800 21600 1 PKST} + {3592231200 18000 0 PKT} + {3606577200 21600 1 PKST} + {3623853600 18000 0 PKT} + {3638113200 21600 1 PKST} + {3655389600 18000 0 PKT} + {3669649200 21600 1 PKST} + {3686925600 18000 0 PKT} + {3701185200 21600 1 PKST} + {3718461600 18000 0 PKT} + {3732807600 21600 1 PKST} + {3750084000 18000 0 PKT} + {3764343600 21600 1 PKST} + {3781620000 18000 0 PKT} + {3795879600 21600 1 PKST} + {3813156000 18000 0 PKT} + {3827415600 21600 1 PKST} + {3844692000 18000 0 PKT} + {3859038000 21600 1 PKST} + {3876314400 18000 0 PKT} + {3890574000 21600 1 PKST} + {3907850400 18000 0 PKT} + {3922110000 21600 1 PKST} + {3939386400 18000 0 PKT} + {3953646000 21600 1 PKST} + {3970922400 18000 0 PKT} + {3985268400 21600 1 PKST} + {4002544800 18000 0 PKT} + {4016804400 21600 1 PKST} + {4034080800 18000 0 PKT} + {4048340400 21600 1 PKST} + {4065616800 18000 0 PKT} + {4079876400 21600 1 PKST} + {4097152800 18000 0 PKT} } diff --git a/tests/clock.test b/tests/clock.test index 0f1e9da..39f9142 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.91 2009/06/09 13:52:38 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.92 2009/10/24 22:20:10 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36140,6 +36140,16 @@ test clock-52.3 {correct conversion of times in Russia} { set result } {01:59:59 03:00:00 02:59:59 02:00:00} +test clock-52.4 {correct conversion of times in USA} { + # [Bug 2207436] + set result {} + foreach t [list 1268549999 1268550000 1257055199 1257055200] { + lappend result [clock format $t -format %H:%M:%S \ + -timezone EST5EDT] + } + set result +} {01:59:59 03:00:00 01:59:59 01:00:00} + # Regression test for Bug # 1505383 test clock-53.1 {%EC %Ey} { -- cgit v0.12 From a105e211c00630f0a0cbee1031379b3f187c3b9c Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 26 Oct 2009 16:56:23 +0000 Subject: * unix/Makefile.in: Remove $(PACKAGE).* and prototype from the `make distclean` target. Completes 2009-10-20 commit. --- ChangeLog | 5 +++++ unix/Makefile.in | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23eaa35..5ae9e9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-26 Don Porter + + * unix/Makefile.in: Remove $(PACKAGE).* and prototype from the + `make distclean` target. Completes 2009-10-20 commit. + 2009-10-24 Kevin B. Kenny * library/clock.tcl (ProcessPosixTimeZone): diff --git a/unix/Makefile.in b/unix/Makefile.in index f190222..6f40a1d 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.278 2009/10/20 17:21:23 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.279 2009/10/26 16:56:23 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -927,8 +927,7 @@ clean: clean-packages distclean: distclean-packages clean rm -rf Makefile config.status config.cache config.log tclConfig.sh \ - $(PACKAGE).* prototype tclConfig.h *.plist Tcl.framework \ - tcl.pc + tclConfig.h *.plist Tcl.framework tcl.pc cd dltest ; $(MAKE) distclean depend: -- cgit v0.12 From 42f969aa26927fe8d84250dbc72ce1dc9e7f8836 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 27 Oct 2009 03:23:32 +0000 Subject: * library/clock.tcl (ParseClockScanFormat): Corrected a problem where [clock scan] didn't load the timezone soon enough when processing a time format that lacked a complete date. [Bug 2886852] * tests/clock.test (clock-66.1): Added a test case for the above bug. --- ChangeLog | 9 +++++++++ library/clock.tcl | 32 +++++++++++++++++++++----------- tests/clock.test | 15 ++++++++++++++- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ae9e9d..686d717 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-10-27 Kevin B. Kenny + + * library/clock.tcl (ParseClockScanFormat): + Corrected a problem where [clock scan] didn't load the timezone + soon enough when processing a time format that lacked a complete + date. [Bug 2886852] + * tests/clock.test (clock-66.1): + Added a test case for the above bug. + 2009-10-26 Don Porter * unix/Makefile.in: Remove $(PACKAGE).* and prototype from the diff --git a/library/clock.tcl b/library/clock.tcl index bc4ec4d..51118e1 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.55 2009/10/24 22:20:10 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.56 2009/10/27 03:23:32 kennykb Exp $ # #---------------------------------------------------------------------- @@ -1955,6 +1955,21 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { append procBody $postcode append procBody [list set changeover [mc GREGORIAN_CHANGE_DATE]] \n + # Set up the time zone before doing anything with a default base date + # that might need a timezone to interpret it. + + if { ![dict exists $fieldSet seconds] + && ![dict exists $fieldSet starDate] } { + if { [dict exists $fieldSet tzName] } { + append procBody { + set timeZone [dict get $date tzName] + } + } + append procBody { + ::tcl::clock::SetupTimeZone $timeZone + } + } + # Add code that gets Julian Day Number from the fields. append procBody [MakeParseCodeFromFields $fieldSet $DateParseActions] @@ -1963,7 +1978,9 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { append procBody [MakeParseCodeFromFields $fieldSet $TimeParseActions] - # Assemble seconds, and convert local nominal time to UTC. + # Assemble seconds from the Julian day and second of the day. + # Convert to local time unless epoch seconds or stardate are + # being processed - they're always absolute if { ![dict exists $fieldSet seconds] && ![dict exists $fieldSet starDate] } { @@ -1978,17 +1995,10 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { + [dict get $date secondOfDay] }] } - } - if { ![dict exists $fieldSet seconds] - && ![dict exists $fieldSet starDate] } { - if { [dict exists $fieldSet tzName] } { - append procBody { - set timeZone [dict get $date tzName] - } - } + # Finally, convert the date to local time + append procBody { - ::tcl::clock::SetupTimeZone $timeZone set date [::tcl::clock::ConvertLocalToUTC $date[set date {}] \ $TZData($timeZone) $changeover] } diff --git a/tests/clock.test b/tests/clock.test index 39f9142..51d5655 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.92 2009/10/24 22:20:10 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.93 2009/10/27 03:23:32 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36733,6 +36733,19 @@ test clock-65.1 {clock add, bad option [Bug 2481670]} {*}{ -result {bad switch "-foo"*} } +test clock-66.1 {clock scan, no date, never-before-seen timezone} {*}{ + -setup { + ::tcl::clock::ClearCaches + } + -body { + clock scan 1200 \ + -timezone {+05:00:00+04:00:00,M3.2.0/02:00:00,M11.1.0/02:00:00} \ + -base 1256529600 \ + -format %H%M + } + -result 1256572800 +} + # cleanup namespace delete ::testClock -- cgit v0.12 From 097f32ff2cb5272d1ce612b32486caf8feaee9e5 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 27 Oct 2009 03:35:39 +0000 Subject: * library/tzdata/America/Argentina/Buenos_Aires: * library/tzdata/America/Argentina/Cordoba: * library/tzdata/America/Argentina/San_Luis: * library/tzdata/America/Argentina/Tucuman: New DST rules for Argentina. (Olson's tzdata2009p.) --- ChangeLog | 5 + library/tzdata/America/Argentina/Buenos_Aires | 181 ------------- library/tzdata/America/Argentina/Cordoba | 181 ------------- library/tzdata/America/Argentina/San_Luis | 369 +++++++++++++------------- library/tzdata/America/Argentina/Tucuman | 181 ------------- 5 files changed, 190 insertions(+), 727 deletions(-) diff --git a/ChangeLog b/ChangeLog index 686d717..59ff2fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,11 @@ date. [Bug 2886852] * tests/clock.test (clock-66.1): Added a test case for the above bug. + * library/tzdata/America/Argentina/Buenos_Aires: + * library/tzdata/America/Argentina/Cordoba: + * library/tzdata/America/Argentina/San_Luis: + * library/tzdata/America/Argentina/Tucuman: + New DST rules for Argentina. (Olson's tzdata2009p.) 2009-10-26 Don Porter diff --git a/library/tzdata/America/Argentina/Buenos_Aires b/library/tzdata/America/Argentina/Buenos_Aires index beccff3..73cc8e9 100644 --- a/library/tzdata/America/Argentina/Buenos_Aires +++ b/library/tzdata/America/Argentina/Buenos_Aires @@ -64,185 +64,4 @@ set TZData(:America/Argentina/Buenos_Aires) { {1205632800 -10800 0 ART} {1224385200 -7200 1 ARST} {1237082400 -10800 0 ART} - {1255834800 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1287284400 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1318734000 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1350788400 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1382238000 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1413687600 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1445137200 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1476586800 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1508036400 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1540090800 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1571540400 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1602990000 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1634439600 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1665889200 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1697338800 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1729393200 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1760842800 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1792292400 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1823742000 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1855191600 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1887246000 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1918695600 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1950145200 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1981594800 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2013044400 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2044494000 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2076548400 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2107998000 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2139447600 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2170897200 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2202346800 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2234401200 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2265850800 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2297300400 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2328750000 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2360199600 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2391649200 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2423703600 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2455153200 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2486602800 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2518052400 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2549502000 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2580951600 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2613006000 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2644455600 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2675905200 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2707354800 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2738804400 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2770858800 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2802308400 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2833758000 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2865207600 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2896657200 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2928106800 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2960161200 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2991610800 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3023060400 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3054510000 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3085959600 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3118014000 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3149463600 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3180913200 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3212362800 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3243812400 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3275262000 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3307316400 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3338766000 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3370215600 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3401665200 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3433114800 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3464564400 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3496618800 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3528068400 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3559518000 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3590967600 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3622417200 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3654471600 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3685921200 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3717370800 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3748820400 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3780270000 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3811719600 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3843774000 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3875223600 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3906673200 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3938122800 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3969572400 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4001626800 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4033076400 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4064526000 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4095975600 -7200 1 ARST} } diff --git a/library/tzdata/America/Argentina/Cordoba b/library/tzdata/America/Argentina/Cordoba index 798ee86..b08539e 100644 --- a/library/tzdata/America/Argentina/Cordoba +++ b/library/tzdata/America/Argentina/Cordoba @@ -64,185 +64,4 @@ set TZData(:America/Argentina/Cordoba) { {1205632800 -10800 0 ART} {1224385200 -7200 1 ARST} {1237082400 -10800 0 ART} - {1255834800 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1287284400 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1318734000 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1350788400 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1382238000 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1413687600 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1445137200 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1476586800 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1508036400 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1540090800 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1571540400 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1602990000 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1634439600 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1665889200 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1697338800 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1729393200 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1760842800 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1792292400 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1823742000 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1855191600 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1887246000 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1918695600 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1950145200 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1981594800 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2013044400 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2044494000 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2076548400 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2107998000 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2139447600 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2170897200 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2202346800 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2234401200 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2265850800 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2297300400 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2328750000 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2360199600 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2391649200 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2423703600 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2455153200 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2486602800 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2518052400 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2549502000 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2580951600 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2613006000 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2644455600 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2675905200 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2707354800 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2738804400 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2770858800 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2802308400 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2833758000 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2865207600 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2896657200 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2928106800 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2960161200 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2991610800 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3023060400 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3054510000 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3085959600 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3118014000 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3149463600 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3180913200 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3212362800 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3243812400 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3275262000 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3307316400 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3338766000 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3370215600 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3401665200 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3433114800 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3464564400 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3496618800 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3528068400 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3559518000 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3590967600 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3622417200 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3654471600 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3685921200 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3717370800 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3748820400 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3780270000 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3811719600 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3843774000 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3875223600 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3906673200 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3938122800 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3969572400 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4001626800 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4033076400 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4064526000 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4095975600 -7200 1 ARST} } diff --git a/library/tzdata/America/Argentina/San_Luis b/library/tzdata/America/Argentina/San_Luis index 1d06652..b93f3bf 100644 --- a/library/tzdata/America/Argentina/San_Luis +++ b/library/tzdata/America/Argentina/San_Luis @@ -60,188 +60,189 @@ set TZData(:America/Argentina/San_Luis) { {1085972400 -14400 0 WART} {1090728000 -10800 0 ART} {1198983600 -7200 1 ARST} - {1200880800 -10800 0 ART} - {1237086000 -14400 0 WART} - {1237089600 -14400 0 WART} - {1255838400 -10800 1 WARST} - {1269140400 -14400 0 WART} - {1287288000 -10800 1 WARST} - {1300590000 -14400 0 WART} - {1318737600 -10800 1 WARST} - {1332039600 -14400 0 WART} - {1350792000 -10800 1 WARST} - {1363489200 -14400 0 WART} - {1382241600 -10800 1 WARST} - {1394938800 -14400 0 WART} - {1413691200 -10800 1 WARST} - {1426388400 -14400 0 WART} - {1445140800 -10800 1 WARST} - {1458442800 -14400 0 WART} - {1476590400 -10800 1 WARST} - {1489892400 -14400 0 WART} - {1508040000 -10800 1 WARST} - {1521342000 -14400 0 WART} - {1540094400 -10800 1 WARST} - {1552791600 -14400 0 WART} - {1571544000 -10800 1 WARST} - {1584241200 -14400 0 WART} - {1602993600 -10800 1 WARST} - {1616295600 -14400 0 WART} - {1634443200 -10800 1 WARST} - {1647745200 -14400 0 WART} - {1665892800 -10800 1 WARST} - {1679194800 -14400 0 WART} - {1697342400 -10800 1 WARST} - {1710644400 -14400 0 WART} - {1729396800 -10800 1 WARST} - {1742094000 -14400 0 WART} - {1760846400 -10800 1 WARST} - {1773543600 -14400 0 WART} - {1792296000 -10800 1 WARST} - {1805598000 -14400 0 WART} - {1823745600 -10800 1 WARST} - {1837047600 -14400 0 WART} - {1855195200 -10800 1 WARST} - {1868497200 -14400 0 WART} - {1887249600 -10800 1 WARST} - {1899946800 -14400 0 WART} - {1918699200 -10800 1 WARST} - {1931396400 -14400 0 WART} - {1950148800 -10800 1 WARST} - {1963450800 -14400 0 WART} - {1981598400 -10800 1 WARST} - {1994900400 -14400 0 WART} - {2013048000 -10800 1 WARST} - {2026350000 -14400 0 WART} - {2044497600 -10800 1 WARST} - {2057799600 -14400 0 WART} - {2076552000 -10800 1 WARST} - {2089249200 -14400 0 WART} - {2108001600 -10800 1 WARST} - {2120698800 -14400 0 WART} - {2139451200 -10800 1 WARST} - {2152753200 -14400 0 WART} - {2170900800 -10800 1 WARST} - {2184202800 -14400 0 WART} - {2202350400 -10800 1 WARST} - {2215652400 -14400 0 WART} - {2234404800 -10800 1 WARST} - {2247102000 -14400 0 WART} - {2265854400 -10800 1 WARST} - {2278551600 -14400 0 WART} - {2297304000 -10800 1 WARST} - {2310001200 -14400 0 WART} - {2328753600 -10800 1 WARST} - {2342055600 -14400 0 WART} - {2360203200 -10800 1 WARST} - {2373505200 -14400 0 WART} - {2391652800 -10800 1 WARST} - {2404954800 -14400 0 WART} - {2423707200 -10800 1 WARST} - {2436404400 -14400 0 WART} - {2455156800 -10800 1 WARST} - {2467854000 -14400 0 WART} - {2486606400 -10800 1 WARST} - {2499908400 -14400 0 WART} - {2518056000 -10800 1 WARST} - {2531358000 -14400 0 WART} - {2549505600 -10800 1 WARST} - {2562807600 -14400 0 WART} - {2580955200 -10800 1 WARST} - {2594257200 -14400 0 WART} - {2613009600 -10800 1 WARST} - {2625706800 -14400 0 WART} - {2644459200 -10800 1 WARST} - {2657156400 -14400 0 WART} - {2675908800 -10800 1 WARST} - {2689210800 -14400 0 WART} - {2707358400 -10800 1 WARST} - {2720660400 -14400 0 WART} - {2738808000 -10800 1 WARST} - {2752110000 -14400 0 WART} - {2770862400 -10800 1 WARST} - {2783559600 -14400 0 WART} - {2802312000 -10800 1 WARST} - {2815009200 -14400 0 WART} - {2833761600 -10800 1 WARST} - {2847063600 -14400 0 WART} - {2865211200 -10800 1 WARST} - {2878513200 -14400 0 WART} - {2896660800 -10800 1 WARST} - {2909962800 -14400 0 WART} - {2928110400 -10800 1 WARST} - {2941412400 -14400 0 WART} - {2960164800 -10800 1 WARST} - {2972862000 -14400 0 WART} - {2991614400 -10800 1 WARST} - {3004311600 -14400 0 WART} - {3023064000 -10800 1 WARST} - {3036366000 -14400 0 WART} - {3054513600 -10800 1 WARST} - {3067815600 -14400 0 WART} - {3085963200 -10800 1 WARST} - {3099265200 -14400 0 WART} - {3118017600 -10800 1 WARST} - {3130714800 -14400 0 WART} - {3149467200 -10800 1 WARST} - {3162164400 -14400 0 WART} - {3180916800 -10800 1 WARST} - {3193614000 -14400 0 WART} - {3212366400 -10800 1 WARST} - {3225668400 -14400 0 WART} - {3243816000 -10800 1 WARST} - {3257118000 -14400 0 WART} - {3275265600 -10800 1 WARST} - {3288567600 -14400 0 WART} - {3307320000 -10800 1 WARST} - {3320017200 -14400 0 WART} - {3338769600 -10800 1 WARST} - {3351466800 -14400 0 WART} - {3370219200 -10800 1 WARST} - {3383521200 -14400 0 WART} - {3401668800 -10800 1 WARST} - {3414970800 -14400 0 WART} - {3433118400 -10800 1 WARST} - {3446420400 -14400 0 WART} - {3464568000 -10800 1 WARST} - {3477870000 -14400 0 WART} - {3496622400 -10800 1 WARST} - {3509319600 -14400 0 WART} - {3528072000 -10800 1 WARST} - {3540769200 -14400 0 WART} - {3559521600 -10800 1 WARST} - {3572823600 -14400 0 WART} - {3590971200 -10800 1 WARST} - {3604273200 -14400 0 WART} - {3622420800 -10800 1 WARST} - {3635722800 -14400 0 WART} - {3654475200 -10800 1 WARST} - {3667172400 -14400 0 WART} - {3685924800 -10800 1 WARST} - {3698622000 -14400 0 WART} - {3717374400 -10800 1 WARST} - {3730676400 -14400 0 WART} - {3748824000 -10800 1 WARST} - {3762126000 -14400 0 WART} - {3780273600 -10800 1 WARST} - {3793575600 -14400 0 WART} - {3811723200 -10800 1 WARST} - {3825025200 -14400 0 WART} - {3843777600 -10800 1 WARST} - {3856474800 -14400 0 WART} - {3875227200 -10800 1 WARST} - {3887924400 -14400 0 WART} - {3906676800 -10800 1 WARST} - {3919978800 -14400 0 WART} - {3938126400 -10800 1 WARST} - {3951428400 -14400 0 WART} - {3969576000 -10800 1 WARST} - {3982878000 -14400 0 WART} - {4001630400 -10800 1 WARST} - {4014327600 -14400 0 WART} - {4033080000 -10800 1 WARST} - {4045777200 -14400 0 WART} - {4064529600 -10800 1 WARST} - {4077226800 -14400 0 WART} - {4095979200 -10800 1 WARST} + {1200880800 -10800 0 WART} + {1205031600 -14400 0 WART} + {1223784000 -10800 1 WARST} + {1236481200 -14400 0 WART} + {1255233600 -10800 1 WARST} + {1268535600 -14400 0 WART} + {1286683200 -10800 1 WARST} + {1299985200 -14400 0 WART} + {1318132800 -10800 1 WARST} + {1331434800 -14400 0 WART} + {1350187200 -10800 1 WARST} + {1362884400 -14400 0 WART} + {1381636800 -10800 1 WARST} + {1394334000 -14400 0 WART} + {1413086400 -10800 1 WARST} + {1425783600 -14400 0 WART} + {1444536000 -10800 1 WARST} + {1457838000 -14400 0 WART} + {1475985600 -10800 1 WARST} + {1489287600 -14400 0 WART} + {1507435200 -10800 1 WARST} + {1520737200 -14400 0 WART} + {1539489600 -10800 1 WARST} + {1552186800 -14400 0 WART} + {1570939200 -10800 1 WARST} + {1583636400 -14400 0 WART} + {1602388800 -10800 1 WARST} + {1615690800 -14400 0 WART} + {1633838400 -10800 1 WARST} + {1647140400 -14400 0 WART} + {1665288000 -10800 1 WARST} + {1678590000 -14400 0 WART} + {1696737600 -10800 1 WARST} + {1710039600 -14400 0 WART} + {1728792000 -10800 1 WARST} + {1741489200 -14400 0 WART} + {1760241600 -10800 1 WARST} + {1772938800 -14400 0 WART} + {1791691200 -10800 1 WARST} + {1804993200 -14400 0 WART} + {1823140800 -10800 1 WARST} + {1836442800 -14400 0 WART} + {1854590400 -10800 1 WARST} + {1867892400 -14400 0 WART} + {1886644800 -10800 1 WARST} + {1899342000 -14400 0 WART} + {1918094400 -10800 1 WARST} + {1930791600 -14400 0 WART} + {1949544000 -10800 1 WARST} + {1962846000 -14400 0 WART} + {1980993600 -10800 1 WARST} + {1994295600 -14400 0 WART} + {2012443200 -10800 1 WARST} + {2025745200 -14400 0 WART} + {2043892800 -10800 1 WARST} + {2057194800 -14400 0 WART} + {2075947200 -10800 1 WARST} + {2088644400 -14400 0 WART} + {2107396800 -10800 1 WARST} + {2120094000 -14400 0 WART} + {2138846400 -10800 1 WARST} + {2152148400 -14400 0 WART} + {2170296000 -10800 1 WARST} + {2183598000 -14400 0 WART} + {2201745600 -10800 1 WARST} + {2215047600 -14400 0 WART} + {2233800000 -10800 1 WARST} + {2246497200 -14400 0 WART} + {2265249600 -10800 1 WARST} + {2277946800 -14400 0 WART} + {2296699200 -10800 1 WARST} + {2309396400 -14400 0 WART} + {2328148800 -10800 1 WARST} + {2341450800 -14400 0 WART} + {2359598400 -10800 1 WARST} + {2372900400 -14400 0 WART} + {2391048000 -10800 1 WARST} + {2404350000 -14400 0 WART} + {2423102400 -10800 1 WARST} + {2435799600 -14400 0 WART} + {2454552000 -10800 1 WARST} + {2467249200 -14400 0 WART} + {2486001600 -10800 1 WARST} + {2499303600 -14400 0 WART} + {2517451200 -10800 1 WARST} + {2530753200 -14400 0 WART} + {2548900800 -10800 1 WARST} + {2562202800 -14400 0 WART} + {2580350400 -10800 1 WARST} + {2593652400 -14400 0 WART} + {2612404800 -10800 1 WARST} + {2625102000 -14400 0 WART} + {2643854400 -10800 1 WARST} + {2656551600 -14400 0 WART} + {2675304000 -10800 1 WARST} + {2688606000 -14400 0 WART} + {2706753600 -10800 1 WARST} + {2720055600 -14400 0 WART} + {2738203200 -10800 1 WARST} + {2751505200 -14400 0 WART} + {2770257600 -10800 1 WARST} + {2782954800 -14400 0 WART} + {2801707200 -10800 1 WARST} + {2814404400 -14400 0 WART} + {2833156800 -10800 1 WARST} + {2846458800 -14400 0 WART} + {2864606400 -10800 1 WARST} + {2877908400 -14400 0 WART} + {2896056000 -10800 1 WARST} + {2909358000 -14400 0 WART} + {2927505600 -10800 1 WARST} + {2940807600 -14400 0 WART} + {2959560000 -10800 1 WARST} + {2972257200 -14400 0 WART} + {2991009600 -10800 1 WARST} + {3003706800 -14400 0 WART} + {3022459200 -10800 1 WARST} + {3035761200 -14400 0 WART} + {3053908800 -10800 1 WARST} + {3067210800 -14400 0 WART} + {3085358400 -10800 1 WARST} + {3098660400 -14400 0 WART} + {3117412800 -10800 1 WARST} + {3130110000 -14400 0 WART} + {3148862400 -10800 1 WARST} + {3161559600 -14400 0 WART} + {3180312000 -10800 1 WARST} + {3193009200 -14400 0 WART} + {3211761600 -10800 1 WARST} + {3225063600 -14400 0 WART} + {3243211200 -10800 1 WARST} + {3256513200 -14400 0 WART} + {3274660800 -10800 1 WARST} + {3287962800 -14400 0 WART} + {3306715200 -10800 1 WARST} + {3319412400 -14400 0 WART} + {3338164800 -10800 1 WARST} + {3350862000 -14400 0 WART} + {3369614400 -10800 1 WARST} + {3382916400 -14400 0 WART} + {3401064000 -10800 1 WARST} + {3414366000 -14400 0 WART} + {3432513600 -10800 1 WARST} + {3445815600 -14400 0 WART} + {3463963200 -10800 1 WARST} + {3477265200 -14400 0 WART} + {3496017600 -10800 1 WARST} + {3508714800 -14400 0 WART} + {3527467200 -10800 1 WARST} + {3540164400 -14400 0 WART} + {3558916800 -10800 1 WARST} + {3572218800 -14400 0 WART} + {3590366400 -10800 1 WARST} + {3603668400 -14400 0 WART} + {3621816000 -10800 1 WARST} + {3635118000 -14400 0 WART} + {3653870400 -10800 1 WARST} + {3666567600 -14400 0 WART} + {3685320000 -10800 1 WARST} + {3698017200 -14400 0 WART} + {3716769600 -10800 1 WARST} + {3730071600 -14400 0 WART} + {3748219200 -10800 1 WARST} + {3761521200 -14400 0 WART} + {3779668800 -10800 1 WARST} + {3792970800 -14400 0 WART} + {3811118400 -10800 1 WARST} + {3824420400 -14400 0 WART} + {3843172800 -10800 1 WARST} + {3855870000 -14400 0 WART} + {3874622400 -10800 1 WARST} + {3887319600 -14400 0 WART} + {3906072000 -10800 1 WARST} + {3919374000 -14400 0 WART} + {3937521600 -10800 1 WARST} + {3950823600 -14400 0 WART} + {3968971200 -10800 1 WARST} + {3982273200 -14400 0 WART} + {4001025600 -10800 1 WARST} + {4013722800 -14400 0 WART} + {4032475200 -10800 1 WARST} + {4045172400 -14400 0 WART} + {4063924800 -10800 1 WARST} + {4076622000 -14400 0 WART} + {4095374400 -10800 1 WARST} } diff --git a/library/tzdata/America/Argentina/Tucuman b/library/tzdata/America/Argentina/Tucuman index 6d12cb6..3500986 100644 --- a/library/tzdata/America/Argentina/Tucuman +++ b/library/tzdata/America/Argentina/Tucuman @@ -66,185 +66,4 @@ set TZData(:America/Argentina/Tucuman) { {1205632800 -10800 0 ART} {1224385200 -7200 1 ARST} {1237082400 -10800 0 ART} - {1255834800 -7200 1 ARST} - {1269136800 -10800 0 ART} - {1287284400 -7200 1 ARST} - {1300586400 -10800 0 ART} - {1318734000 -7200 1 ARST} - {1332036000 -10800 0 ART} - {1350788400 -7200 1 ARST} - {1363485600 -10800 0 ART} - {1382238000 -7200 1 ARST} - {1394935200 -10800 0 ART} - {1413687600 -7200 1 ARST} - {1426384800 -10800 0 ART} - {1445137200 -7200 1 ARST} - {1458439200 -10800 0 ART} - {1476586800 -7200 1 ARST} - {1489888800 -10800 0 ART} - {1508036400 -7200 1 ARST} - {1521338400 -10800 0 ART} - {1540090800 -7200 1 ARST} - {1552788000 -10800 0 ART} - {1571540400 -7200 1 ARST} - {1584237600 -10800 0 ART} - {1602990000 -7200 1 ARST} - {1616292000 -10800 0 ART} - {1634439600 -7200 1 ARST} - {1647741600 -10800 0 ART} - {1665889200 -7200 1 ARST} - {1679191200 -10800 0 ART} - {1697338800 -7200 1 ARST} - {1710640800 -10800 0 ART} - {1729393200 -7200 1 ARST} - {1742090400 -10800 0 ART} - {1760842800 -7200 1 ARST} - {1773540000 -10800 0 ART} - {1792292400 -7200 1 ARST} - {1805594400 -10800 0 ART} - {1823742000 -7200 1 ARST} - {1837044000 -10800 0 ART} - {1855191600 -7200 1 ARST} - {1868493600 -10800 0 ART} - {1887246000 -7200 1 ARST} - {1899943200 -10800 0 ART} - {1918695600 -7200 1 ARST} - {1931392800 -10800 0 ART} - {1950145200 -7200 1 ARST} - {1963447200 -10800 0 ART} - {1981594800 -7200 1 ARST} - {1994896800 -10800 0 ART} - {2013044400 -7200 1 ARST} - {2026346400 -10800 0 ART} - {2044494000 -7200 1 ARST} - {2057796000 -10800 0 ART} - {2076548400 -7200 1 ARST} - {2089245600 -10800 0 ART} - {2107998000 -7200 1 ARST} - {2120695200 -10800 0 ART} - {2139447600 -7200 1 ARST} - {2152749600 -10800 0 ART} - {2170897200 -7200 1 ARST} - {2184199200 -10800 0 ART} - {2202346800 -7200 1 ARST} - {2215648800 -10800 0 ART} - {2234401200 -7200 1 ARST} - {2247098400 -10800 0 ART} - {2265850800 -7200 1 ARST} - {2278548000 -10800 0 ART} - {2297300400 -7200 1 ARST} - {2309997600 -10800 0 ART} - {2328750000 -7200 1 ARST} - {2342052000 -10800 0 ART} - {2360199600 -7200 1 ARST} - {2373501600 -10800 0 ART} - {2391649200 -7200 1 ARST} - {2404951200 -10800 0 ART} - {2423703600 -7200 1 ARST} - {2436400800 -10800 0 ART} - {2455153200 -7200 1 ARST} - {2467850400 -10800 0 ART} - {2486602800 -7200 1 ARST} - {2499904800 -10800 0 ART} - {2518052400 -7200 1 ARST} - {2531354400 -10800 0 ART} - {2549502000 -7200 1 ARST} - {2562804000 -10800 0 ART} - {2580951600 -7200 1 ARST} - {2594253600 -10800 0 ART} - {2613006000 -7200 1 ARST} - {2625703200 -10800 0 ART} - {2644455600 -7200 1 ARST} - {2657152800 -10800 0 ART} - {2675905200 -7200 1 ARST} - {2689207200 -10800 0 ART} - {2707354800 -7200 1 ARST} - {2720656800 -10800 0 ART} - {2738804400 -7200 1 ARST} - {2752106400 -10800 0 ART} - {2770858800 -7200 1 ARST} - {2783556000 -10800 0 ART} - {2802308400 -7200 1 ARST} - {2815005600 -10800 0 ART} - {2833758000 -7200 1 ARST} - {2847060000 -10800 0 ART} - {2865207600 -7200 1 ARST} - {2878509600 -10800 0 ART} - {2896657200 -7200 1 ARST} - {2909959200 -10800 0 ART} - {2928106800 -7200 1 ARST} - {2941408800 -10800 0 ART} - {2960161200 -7200 1 ARST} - {2972858400 -10800 0 ART} - {2991610800 -7200 1 ARST} - {3004308000 -10800 0 ART} - {3023060400 -7200 1 ARST} - {3036362400 -10800 0 ART} - {3054510000 -7200 1 ARST} - {3067812000 -10800 0 ART} - {3085959600 -7200 1 ARST} - {3099261600 -10800 0 ART} - {3118014000 -7200 1 ARST} - {3130711200 -10800 0 ART} - {3149463600 -7200 1 ARST} - {3162160800 -10800 0 ART} - {3180913200 -7200 1 ARST} - {3193610400 -10800 0 ART} - {3212362800 -7200 1 ARST} - {3225664800 -10800 0 ART} - {3243812400 -7200 1 ARST} - {3257114400 -10800 0 ART} - {3275262000 -7200 1 ARST} - {3288564000 -10800 0 ART} - {3307316400 -7200 1 ARST} - {3320013600 -10800 0 ART} - {3338766000 -7200 1 ARST} - {3351463200 -10800 0 ART} - {3370215600 -7200 1 ARST} - {3383517600 -10800 0 ART} - {3401665200 -7200 1 ARST} - {3414967200 -10800 0 ART} - {3433114800 -7200 1 ARST} - {3446416800 -10800 0 ART} - {3464564400 -7200 1 ARST} - {3477866400 -10800 0 ART} - {3496618800 -7200 1 ARST} - {3509316000 -10800 0 ART} - {3528068400 -7200 1 ARST} - {3540765600 -10800 0 ART} - {3559518000 -7200 1 ARST} - {3572820000 -10800 0 ART} - {3590967600 -7200 1 ARST} - {3604269600 -10800 0 ART} - {3622417200 -7200 1 ARST} - {3635719200 -10800 0 ART} - {3654471600 -7200 1 ARST} - {3667168800 -10800 0 ART} - {3685921200 -7200 1 ARST} - {3698618400 -10800 0 ART} - {3717370800 -7200 1 ARST} - {3730672800 -10800 0 ART} - {3748820400 -7200 1 ARST} - {3762122400 -10800 0 ART} - {3780270000 -7200 1 ARST} - {3793572000 -10800 0 ART} - {3811719600 -7200 1 ARST} - {3825021600 -10800 0 ART} - {3843774000 -7200 1 ARST} - {3856471200 -10800 0 ART} - {3875223600 -7200 1 ARST} - {3887920800 -10800 0 ART} - {3906673200 -7200 1 ARST} - {3919975200 -10800 0 ART} - {3938122800 -7200 1 ARST} - {3951424800 -10800 0 ART} - {3969572400 -7200 1 ARST} - {3982874400 -10800 0 ART} - {4001626800 -7200 1 ARST} - {4014324000 -10800 0 ART} - {4033076400 -7200 1 ARST} - {4045773600 -10800 0 ART} - {4064526000 -7200 1 ARST} - {4077223200 -10800 0 ART} - {4095975600 -7200 1 ARST} } -- cgit v0.12 From 667646d2977ff01762169575231252c9e9988ee8 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 27 Oct 2009 20:31:08 +0000 Subject: * generic/tclPathObj.c: Missing refcount on cached normalized path caused crashes. [Bug 2884203]. --- ChangeLog | 5 +++++ generic/tclPathObj.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 59ff2fd..5d67ecd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-27 Don Porter + + * generic/tclPathObj.c: Missing refcount on cached normalized path + caused crashes. [Bug 2884203]. + 2009-10-27 Kevin B. Kenny * library/clock.tcl (ParseClockScanFormat): diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 7599529..6d36fe4 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.83 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.84 2009/10/27 20:31:08 dgp Exp $ */ #include "tclInt.h" @@ -1940,6 +1940,7 @@ Tcl_FSGetNormalizedPath( TclFSNormalizeToUniquePath(interp, copy, cwdLen-1, (fsPathPtr->nativePathPtr == NULL ? &clientData : NULL)); fsPathPtr->normPathPtr = copy; + Tcl_IncrRefCount(fsPathPtr->normPathPtr); if (clientData != NULL) { fsPathPtr->nativePathPtr = clientData; } -- cgit v0.12 From 1968b054ce6cb77985b7fabcad41ec530209fad5 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Wed, 28 Oct 2009 16:46:33 +0000 Subject: * tests/fileName.test (fileName-20.[78]): Corrected poor test hygiene (failure to save and restore the working directory) that caused these two tests to fail on Windows (and [Bug 2806250] to be reopened). --- ChangeLog | 7 +++++++ tests/fileName.test | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5d67ecd..cabe9f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-28 Kevin B. Kenny + + * tests/fileName.test (fileName-20.[78]): Corrected poor test + hygiene (failure to save and restore the working directory) that + caused these two tests to fail on Windows (and [Bug 2806250] + to be reopened). + 2009-10-27 Don Porter * generic/tclPathObj.c: Missing refcount on cached normalized path diff --git a/tests/fileName.test b/tests/fileName.test index a35cf86..c02cea3 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.64 2009/08/21 18:32:08 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.65 2009/10/28 16:46:33 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1436,6 +1436,11 @@ test filename-16.17 {windows specific globbing} -constraints {win} -body { [glob -nocomplain -tails -dir C: *] } -match compareWords -result equal +# Put the working directory back now that we're done with globbing in C:/ +if {[testConstraint win]} { + cd $oldDir +} + test filename-17.1 {windows specific special files} {testsetplatform} { testsetplatform win list [file pathtype com1] [file pathtype con] [file pathtype lpt3] \ @@ -1543,6 +1548,8 @@ test fileName-20.6 {Bug 2837800} -setup { } -result {} test fileName-20.7 {Bug 2806250} -setup { + set savewd [pwd] + cd [temporaryDirectory] set d [makeDirectory isolate] makeFile {} ./~test $d } -body { @@ -1550,9 +1557,12 @@ test fileName-20.7 {Bug 2806250} -setup { } -cleanup { removeFile ./~test $d removeDirectory isolate + cd $savewd } -result 1 test fileName-20.8 {Bug 2806250} -setup { + set savewd [pwd] + cd [temporaryDirectory] set d [makeDirectory isolate] makeFile {} ./~test $d } -body { @@ -1560,6 +1570,7 @@ test fileName-20.8 {Bug 2806250} -setup { } -cleanup { removeFile ./~test $d removeDirectory isolate + cd $savewd } -result ./~test test fileName-20.9 {} -setup { -- cgit v0.12 From 78dd3b3955f6c2f710b83b1cbdde2aa96be2aecb Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 28 Oct 2009 21:03:19 +0000 Subject: * generic/tclLiteral.c: Fixed 2 bugs reported in [Bug 2888044]. * tests/info.test: First, as noted in the comments of the TclCleanupLiteralTable routine, since the teardown of the intrep of one Tcl_Obj can cause the teardown of others in the same table, the full table cleanup must be done with care, but the code did not contain the same care demanded in the comment. Second, recent additions to the info.test file had poor hygiene, leaving an array variable ::a lying around, which breaks later interp.test tests during a -singleproc 1 run of the test suite. --- ChangeLog | 12 ++++++++++++ generic/tclLiteral.c | 3 ++- tests/info.test | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cabe9f4..e548e4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-10-28 Don Porter + + * generic/tclLiteral.c: Fixed 2 bugs reported in [Bug 2888044]. + * tests/info.test: First, as noted in the comments of the + TclCleanupLiteralTable routine, since the teardown of the intrep + of one Tcl_Obj can cause the teardown of others in the same table, + the full table cleanup must be done with care, but the code did not + contain the same care demanded in the comment. Second, recent + additions to the info.test file had poor hygiene, leaving an array + variable ::a lying around, which breaks later interp.test tests during + a -singleproc 1 run of the test suite. + 2009-10-28 Kevin B. Kenny * tests/fileName.test (fileName-20.[78]): Corrected poor test diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 5d4974a..10a18f8 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.36 2009/07/22 12:00:42 nijtmans Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.37 2009/10/28 21:03:19 dgp Exp $ */ #include "tclInt.h" @@ -136,6 +136,7 @@ TclCleanupLiteralTable( objPtr->typePtr = NULL; typePtr->freeIntRepProc(objPtr); didOne = 1; + break; } else { entryPtr = nextPtr; } diff --git a/tests/info.test b/tests/info.test index 24c966a..f983a0c 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.67 2009/09/07 19:59:59 dgp Exp $ +# RCS: @(#) $Id: info.test,v 1.68 2009/10/28 21:03:19 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1822,6 +1822,7 @@ test info-30.47 {TIP 280 for compiled [subst]} { subst {$a( [dict get [info frame 0] line])} ; # 1823 } YES +unset -nocomplain a test info-30.48 {Bug 2850901} testevalex { testevalex {return -level 0 [format %s {} -- cgit v0.12 From d6e3f26a3c15aa9926fafac19a13388a9fae9367 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Thu, 29 Oct 2009 01:17:54 +0000 Subject: * library/clock.tcl (LocalizeFormat): * tests/clock.test (clock-67.1): Corrected a problem where '%%' followed by a letter in a format group could expand recursively: %%R would turn into %%H:%M:%S. [Bug 2819334] --- ChangeLog | 7 +++++++ library/clock.tcl | 36 ++++++++++++++++++++---------------- tests/clock.test | 6 +++++- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index e548e4a..17377c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-29 Kevin B. Kenny + + * library/clock.tcl (LocalizeFormat): + * tests/clock.test (clock-67.1): + Corrected a problem where '%%' followed by a letter in a format group + could expand recursively: %%R would turn into %%H:%M:%S. [Bug 2819334] + 2009-10-28 Don Porter * generic/tclLiteral.c: Fixed 2 bugs reported in [Bug 2888044]. diff --git a/library/clock.tcl b/library/clock.tcl index 51118e1..c75a9e2 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.56 2009/10/27 03:23:32 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.57 2009/10/29 01:17:54 kennykb Exp $ # #---------------------------------------------------------------------- @@ -2514,24 +2514,28 @@ proc ::tcl::clock::LocalizeFormat { locale format } { } set inFormat $format - # Handle locale-dependent format groups by mapping them out of the input + # Handle locale-dependent format groups by mapping them out of the format # string. Note that the order of the [string map] operations is - # significant because earlier formats can refer to later ones; for example + # significant because later formats can refer to later ones; for example # %c can refer to %X, which in turn can refer to %T. - set format [string map [list %c [mc DATE_TIME_FORMAT] \ - %Ec [mc LOCALE_DATE_TIME_FORMAT]] $format] - set format [string map [list %x [mc DATE_FORMAT] \ - %Ex [mc LOCALE_DATE_FORMAT] \ - %X [mc TIME_FORMAT] \ - %EX [mc LOCALE_TIME_FORMAT]] $format] - set format [string map [list %r [mc TIME_FORMAT_12] \ - %R [mc TIME_FORMAT_24] \ - %T [mc TIME_FORMAT_24_SECS]] $format] - set format [string map [list %D %m/%d/%Y \ - %EY [mc LOCALE_YEAR_FORMAT]\ - %+ {%a %b %e %H:%M:%S %Z %Y}] $format] - + set list { + %% %% + %D %m/%d/%Y + %+ {%a %b %e %H:%M:%S %Z %Y} + } + lappend list %EY [string map $list [mc LOCALE_YEAR_FORMAT]] + lappend list %T [string map $list [mc TIME_FORMAT_24_SECS]] + lappend list %R [string map $list [mc TIME_FORMAT_24]] + lappend list %r [string map $list [mc TIME_FORMAT_12]] + lappend list %X [string map $list [mc TIME_FORMAT]] + lappend list %EX [string map $list [mc LOCALE_TIME_FORMAT]] + lappend list %x [string map $list [mc DATE_FORMAT]] + lappend list %Ex [string map $list [mc LOCALE_DATE_FORMAT]] + lappend list %c [string map $list [mc DATE_TIME_FORMAT]] + lappend list %Ec [string map $list [mc LOCALE_DATE_TIME_FORMAT]] + set format [string map $list $format] + dict set McLoaded $locale FORMAT $inFormat $format return $format } diff --git a/tests/clock.test b/tests/clock.test index 51d5655..d5957bd 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.93 2009/10/27 03:23:32 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.94 2009/10/29 01:17:54 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -36746,6 +36746,10 @@ test clock-66.1 {clock scan, no date, never-before-seen timezone} {*}{ -result 1256572800 } +test clock-67.1 {clock format, %% with a letter following [Bug 2819334]} { + clock format [clock seconds] -format %%r +} %r + # cleanup namespace delete ::testClock -- cgit v0.12 From 4110908a9c6a3510c762409aadf6d887a640baa4 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Oct 2009 08:08:32 +0000 Subject: Remove accidental C99-ism which reportedly makes the AIX native compiler choke. --- ChangeLog | 42 +++++++++++++++++++++++------------------- generic/tclZlib.c | 50 +++++++++++++++++++++++++++++++------------------- 2 files changed, 54 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17377c5..c621064 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,22 @@ +2009-10-29 Donal K. Fellows + + * generic/tclZlib.c (TclZlibCmd): Remove accidental C99-ism which + reportedly makes the AIX native compiler choke. + 2009-10-29 Kevin B. Kenny * library/clock.tcl (LocalizeFormat): * tests/clock.test (clock-67.1): - Corrected a problem where '%%' followed by a letter in a format group - could expand recursively: %%R would turn into %%H:%M:%S. [Bug 2819334] + [Bug 2819334]: Corrected a problem where '%%' followed by a letter in + a format group could expand recursively: %%R would turn into %%H:%M:%S 2009-10-28 Don Porter - * generic/tclLiteral.c: Fixed 2 bugs reported in [Bug 2888044]. + * generic/tclLiteral.c: [Bug 2888044]: Fixed 2 bugs. * tests/info.test: First, as noted in the comments of the - TclCleanupLiteralTable routine, since the teardown of the intrep - of one Tcl_Obj can cause the teardown of others in the same table, - the full table cleanup must be done with care, but the code did not + TclCleanupLiteralTable routine, since the teardown of the intrep of + one Tcl_Obj can cause the teardown of others in the same table, the + full table cleanup must be done with care, but the code did not contain the same care demanded in the comment. Second, recent additions to the info.test file had poor hygiene, leaving an array variable ::a lying around, which breaks later interp.test tests during @@ -21,20 +26,19 @@ * tests/fileName.test (fileName-20.[78]): Corrected poor test hygiene (failure to save and restore the working directory) that - caused these two tests to fail on Windows (and [Bug 2806250] - to be reopened). - + caused these two tests to fail on Windows (and [Bug 2806250] to be + reopened). + 2009-10-27 Don Porter - * generic/tclPathObj.c: Missing refcount on cached normalized path - caused crashes. [Bug 2884203]. + * generic/tclPathObj.c: [Bug 2884203]: Missing refcount on cached + normalized path caused crashes. 2009-10-27 Kevin B. Kenny - * library/clock.tcl (ParseClockScanFormat): - Corrected a problem where [clock scan] didn't load the timezone - soon enough when processing a time format that lacked a complete - date. [Bug 2886852] + * library/clock.tcl (ParseClockScanFormat): [Bug 2886852]: Corrected a + problem where [clock scan] didn't load the timezone soon enough when + processing a time format that lacked a complete date. * tests/clock.test (clock-66.1): Added a test case for the above bug. * library/tzdata/America/Argentina/Buenos_Aires: @@ -83,10 +87,10 @@ 2009-10-20 Don Porter * unix/Makefile.in: Removed the long outdated and broken targets - package-* that were for building Solaris packages. Appears that - the pieces needed for these targets to function have never been - present in the current era of Tcl development and belong completely - to Tcl pre-history. + package-* that were for building Solaris packages. Appears that the + pieces needed for these targets to function have never been present in + the current era of Tcl development and belong completely to Tcl + pre-history. 2009-10-19 Don Porter diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 5dc8c2e..7f5ff7b 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.30 2009/07/10 17:37:18 patthoyts Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.31 2009/10/29 08:08:33 dkf Exp $ */ #include "tclInt.h" @@ -214,9 +214,13 @@ deflateSetHeader( { struct internal_state *state; - if (strm == Z_NULL) return Z_STREAM_ERROR; + if (strm == Z_NULL) { + return Z_STREAM_ERROR; + } state = (struct internal_state *) strm->state; - if ((state == Z_NULL) || (state->wrap != 2)) return Z_STREAM_ERROR; + if ((state == Z_NULL) || (state->wrap != 2)) { + return Z_STREAM_ERROR; + } state->gzhead = head; return Z_OK; } @@ -227,9 +231,13 @@ static int inflateGetHeader( { struct inflate_state *state; - if (strm == Z_NULL) return Z_STREAM_ERROR; + if (strm == Z_NULL) { + return Z_STREAM_ERROR; + } state = (struct inflate_state *) strm->state; - if ((state == Z_NULL) || ((state->wrap & 2) == 0)) return Z_STREAM_ERROR; + if ((state == Z_NULL) || ((state->wrap & 2) == 0)) { + return Z_STREAM_ERROR; + } state->head = head; head->done = 0; return Z_OK; @@ -1671,7 +1679,7 @@ TclZlibCmd( }; enum zlibCommands { z_adler32, z_compress, z_crc32, z_decompress, z_deflate, z_gunzip, - z_gzip, z_inflate, z_push, z_stream, + z_gzip, z_inflate, z_push, z_stream }; static const char *const stream_formats[] = { "compress", "decompress", "deflate", "gunzip", "gzip", "inflate", @@ -1792,8 +1800,8 @@ TclZlibCmd( } return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], level, headerDictObj); - case z_inflate: /* inflate rawcomprdata ?bufferSize? - * -> decompressedData */ + case z_inflate: /* inflate rawcomprdata ?bufferSize? + * -> decompressedData */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); return TCL_ERROR; @@ -1809,8 +1817,9 @@ TclZlibCmd( } return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], buffersize, NULL); - case z_decompress: /* decompress zlibcomprdata ?bufferSize? - * -> decompressedData */ + case z_decompress: /* decompress zlibcomprdata \ + * ?bufferSize? + * -> decompressedData */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); return TCL_ERROR; @@ -1826,8 +1835,8 @@ TclZlibCmd( } return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], buffersize, NULL); - case z_gunzip: /* gunzip gzippeddata ?bufferSize? - * -> decompressedData */ + case z_gunzip: /* gunzip gzippeddata ?bufferSize? + * -> decompressedData */ if (objc < 3 || objc > 5 || ((objc & 1) == 0)) { Tcl_WrongNumArgs(interp, 2, objv, "data ?-headerVar varName?"); return TCL_ERROR; @@ -1873,7 +1882,9 @@ TclZlibCmd( return TCL_ERROR; } return TCL_OK; - case z_stream: /* stream deflate/inflate/...gunzip ?level?*/ + case z_stream: /* stream deflate/inflate/...gunzip \ + * ?level? + * -> handleCmd */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "mode ?level?"); return TCL_ERROR; @@ -1917,7 +1928,8 @@ TclZlibCmd( } Tcl_SetObjResult(interp, Tcl_ZlibStreamGetCommandName(zh)); return TCL_OK; - case z_push: { /* push mode channel options...*/ + case z_push: { /* push mode channel options... + * -> channel */ Tcl_Channel chan; int chanMode, mode; static const char *const pushOptions[] = { @@ -2324,13 +2336,12 @@ ZlibTransformClose( cd->outAllocated - cd->outStream.avail_out) < 0) { /* TODO: is this the right way to do errors on close? * Note: when close is called from FinalizeIOSubsystem - * then interp may be NULL - */ + * then interp may be NULL */ if (!TclInThreadExit()) { if (interp) { Tcl_AppendResult(interp, - "error while finalizing file: ", - Tcl_PosixError(interp), NULL); + "error while finalizing file: ", + Tcl_PosixError(interp), NULL); } } result = TCL_ERROR; @@ -2383,8 +2394,9 @@ ZlibTransformInput( } if (e != Z_OK) { Tcl_Obj *errObj = Tcl_NewListObj(0, NULL); + Tcl_ListObjAppendElement(NULL, errObj, - Tcl_NewStringObj(cd->inStream.msg, -1)); + Tcl_NewStringObj(cd->inStream.msg, -1)); Tcl_SetChannelError(cd->parent, errObj); *errorCodePtr = EINVAL; return -1; -- cgit v0.12 From cbb055ea7121a4a61a3c9b7bbc57298cc564d3d7 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Oct 2009 11:49:24 +0000 Subject: General cleanliness improvements. --- ChangeLog | 3 + tests/dict.test | 663 ++++++++++++++++++++++++++++++++++---------------------- 2 files changed, 411 insertions(+), 255 deletions(-) diff --git a/ChangeLog b/ChangeLog index c621064..d658232 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-10-29 Donal K. Fellows + * tests/dict.test: Make variable-clean and simplify tests by utilizing + the fact that dictionaries have defined orders. + * generic/tclZlib.c (TclZlibCmd): Remove accidental C99-ism which reportedly makes the AIX native compiler choke. diff --git a/tests/dict.test b/tests/dict.test index b4f0f0e..7c16c5f 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -1,15 +1,15 @@ -# This test file covers the dictionary object type and the dict -# command used to work with values of that type. +# This test file covers the dictionary object type and the dict command used +# to work with values of that type. # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # -# Copyright (c) 2003 Donal K. Fellows -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# Copyright (c) 2003-2009 Donal K. Fellows +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.33 2009/10/08 14:37:36 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.34 2009/10/29 11:49:25 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -30,20 +30,6 @@ if {[testConstraint memory]} { } } -# Procedure to help check the contents of a dictionary. Note that we -# can't just compare the string version because the order of the -# elements is (deliberately) not defined. This is because it is -# dependent on the underlying hash table implementation and also -# potentially on the history of the value itself. Net result: you -# cannot safely assume anything about the ordering of values. -proc getOrder {dictVal args} { - foreach key $args { - lappend result $key [dict get $dictVal $key] - } - lappend result [dict size $dictVal] - return $result -} - test dict-1.1 {dict command basic syntax} -returnCodes error -body { dict } -result {wrong # args: should be "dict subcommand ?arg ...?"} @@ -57,7 +43,7 @@ test dict-2.1 {dict create command} { test dict-2.2 {dict create command} { dict create a b } {a b} -test dict-2.3 {dict create command} { +test dict-2.3 {dict create command} -body { set result {} set dict [dict create a b c d] # Can't compare directly as ordering of values is undefined @@ -68,22 +54,26 @@ test dict-2.3 {dict create command} { } lappend result [lindex $dict [expr {$idx+1}]] } - set result -} {b d} + return $result +} -cleanup { + unset result dict key idx +} -result {b d} test dict-2.4 {dict create command} -returnCodes error -body { dict create a } -result {wrong # args: should be "dict create ?key value ...?"} test dict-2.5 {dict create command} -returnCodes error -body { dict create a b c } -result {wrong # args: should be "dict create ?key value ...?"} -test dict-2.6 {dict create command - initialse refcount field!} { +test dict-2.6 {dict create command - initialse refcount field!} -body { # Bug 715751 will show up in memory debuggers like purify for {set i 0} {$i<10} {incr i} { set dictv [dict create a 0] set share [dict values $dictv] list [dict incr dictv a] } -} {} +} -cleanup { + unset i dictv share +} -result {} test dict-2.7 {dict create command - #-quoting in string rep} { dict create # #comment } {{#} #comment} @@ -111,16 +101,18 @@ test dict-3.11 {dict get command} {dict get [dict create a b c d] a} b test dict-3.12 {dict get command} -returnCodes error -body { dict get } -result {wrong # args: should be "dict get dictionary ?key ...?"} -test dict-3.13 {dict get command} { +test dict-3.13 {dict get command} -body { set dict [dict get {a b c d}] if {$dict eq "a b c d"} { - subst OK + return OK } elseif {$dict eq "c d a b"} { - subst OK + return reordered } else { - set dict + return $dict } -} OK +} -cleanup { + unset dict +} -result OK test dict-3.14 {dict get command} -returnCodes error -body { dict get {a b c d} a c } -result {missing value to go with key} @@ -132,17 +124,17 @@ test dict-3.15 {compiled dict get error cleanliness - Bug 2431847} -body { } -returnCodes error -result {key "d" not known in dictionary} test dict-4.1 {dict replace command} { - getOrder [dict replace {a b c d}] a c -} {a b c d 2} + dict replace {a b c d} +} {a b c d} test dict-4.2 {dict replace command} { - getOrder [dict replace {a b c d} e f] a c e -} {a b c d e f 3} + dict replace {a b c d} e f +} {a b c d e f} test dict-4.3 {dict replace command} { - getOrder [dict replace {a b c d} c f] a c -} {a b c f 2} + dict replace {a b c d} c f +} {a b c f} test dict-4.4 {dict replace command} { - getOrder [dict replace {a b c d} c x a y] a c -} {a y c x 2} + dict replace {a b c d} c x a y +} {a y c x} test dict-4.5 {dict replace command} -returnCodes error -body { dict replace } -result {wrong # args: should be "dict replace dictionary ?key value ...?"} @@ -163,8 +155,8 @@ test dict-5.2 {dict remove command} {dict remove {a b c d} c} {a b} test dict-5.3 {dict remove command} {dict remove {a b c d} a c} {} test dict-5.4 {dict remove command} {dict remove {a b c d} c a} {} test dict-5.5 {dict remove command} { - getOrder [dict remove {a b c d}] a c -} {a b c d 2} + dict remove {a b c d} +} {a b c d} test dict-5.6 {dict remove command} {dict remove {a b} c} {a b} test dict-5.7 {dict remove command} -returnCodes error -body { dict remove @@ -247,82 +239,110 @@ test dict-10.4 {dict info command} -returnCodes error -body { dict info x } -result {missing value to go with key} -test dict-11.1 {dict incr command: unshared value} { +test dict-11.1 {dict incr command: unshared value} -body { set dictv [dict create \ a [string index "=0=" 1] \ b [expr {1+2}] \ c [expr {wide(0x80000000)+1}]] - getOrder [dict incr dictv a] a b c -} {a 1 b 3 c 2147483649 3} -test dict-11.2 {dict incr command: unshared value} { + dict incr dictv a +} -cleanup { + unset dictv +} -result {a 1 b 3 c 2147483649} +test dict-11.2 {dict incr command: unshared value} -body { set dictv [dict create \ a [string index "=0=" 1] \ b [expr {1+2}] \ c [expr {wide(0x80000000)+1}]] - getOrder [dict incr dictv b] a b c -} {a 0 b 4 c 2147483649 3} -test dict-11.3 {dict incr command: unshared value} { + dict incr dictv b +} -cleanup { + unset dictv +} -result {a 0 b 4 c 2147483649} +test dict-11.3 {dict incr command: unshared value} -body { set dictv [dict create \ a [string index "=0=" 1] \ b [expr {1+2}] \ c [expr {wide(0x80000000)+1}]] - getOrder [dict incr dictv c] a b c -} {a 0 b 3 c 2147483650 3} -test dict-11.4 {dict incr command: shared value} { + dict incr dictv c +} -cleanup { + unset dictv +} -result {a 0 b 3 c 2147483650} +test dict-11.4 {dict incr command: shared value} -body { set dictv [dict create a 0 b [expr {1+2}] c [expr {wide(0x80000000)+1}]] set sharing [dict values $dictv] - getOrder [dict incr dictv a] a b c -} {a 1 b 3 c 2147483649 3} -test dict-11.5 {dict incr command: shared value} { + dict incr dictv a +} -cleanup { + unset dictv sharing +} -result {a 1 b 3 c 2147483649} +test dict-11.5 {dict incr command: shared value} -body { set dictv [dict create a 0 b [expr {1+2}] c [expr {wide(0x80000000)+1}]] set sharing [dict values $dictv] - getOrder [dict incr dictv b] a b c -} {a 0 b 4 c 2147483649 3} -test dict-11.6 {dict incr command: shared value} { + dict incr dictv b +} -cleanup { + unset dictv sharing +} -result {a 0 b 4 c 2147483649} +test dict-11.6 {dict incr command: shared value} -body { set dictv [dict create a 0 b [expr {1+2}] c [expr {wide(0x80000000)+1}]] set sharing [dict values $dictv] - getOrder [dict incr dictv c] a b c -} {a 0 b 3 c 2147483650 3} -test dict-11.7 {dict incr command: unknown values} { + dict incr dictv c +} -cleanup { + unset dictv sharing +} -result {a 0 b 3 c 2147483650} +test dict-11.7 {dict incr command: unknown values} -body { set dictv [dict create a 0 b [expr {1+2}] c [expr {wide(0x80000000)+1}]] - getOrder [dict incr dictv d] a b c d -} {a 0 b 3 c 2147483649 d 1 4} -test dict-11.8 {dict incr command} { + dict incr dictv d +} -cleanup { + unset dictv +} -result {a 0 b 3 c 2147483649 d 1} +test dict-11.8 {dict incr command} -body { set dictv {a 1} dict incr dictv a 2 -} {a 3} +} -cleanup { + unset dictv +} -result {a 3} test dict-11.9 {dict incr command} -returnCodes error -body { set dictv {a dummy} dict incr dictv a +} -cleanup { + unset dictv } -result {expected integer but got "dummy"} test dict-11.10 {dict incr command} -returnCodes error -body { set dictv {a 1} dict incr dictv a dummy +} -cleanup { + unset dictv } -result {expected integer but got "dummy"} test dict-11.11 {dict incr command} -setup { - catch {unset dictv} + unset -nocomplain dictv } -body { dict incr dictv a +} -cleanup { + unset dictv } -result {a 1} test dict-11.12 {dict incr command} -returnCodes error -body { set dictv a dict incr dictv a +} -cleanup { + unset dictv } -result {missing value to go with key} test dict-11.13 {dict incr command} -returnCodes error -body { set dictv a dict incr dictv a a a +} -cleanup { + unset dictv } -result {wrong # args: should be "dict incr varName key ?increment?"} test dict-11.14 {dict incr command} -returnCodes error -body { set dictv a dict incr dictv +} -cleanup { + unset dictv } -result {wrong # args: should be "dict incr varName key ?increment?"} test dict-11.15 {dict incr command: write failure} -setup { - catch {unset dictVar} + unset -nocomplain dictVar } -body { set dictVar(block) {} dict incr dictVar a } -returnCodes error -cleanup { - catch {unset dictVar} + unset dictVar } -result {can't set "dictVar": variable is array} test dict-11.16 {dict incr command: compilation} { apply {{} { @@ -341,34 +361,48 @@ test dict-11.17 {dict incr command: compilation} { }} } {a 3} -test dict-12.1 {dict lappend command} { +test dict-12.1 {dict lappend command} -body { set dictv {a a} dict lappend dictv a -} {a a} -test dict-12.2 {dict lappend command} { +} -cleanup { + unset dictv +} -result {a a} +test dict-12.2 {dict lappend command} -body { set dictv {a a} set sharing [dict values $dictv] dict lappend dictv a b -} {a {a b}} -test dict-12.3 {dict lappend command} { +} -cleanup { + unset dictv sharing +} -result {a {a b}} +test dict-12.3 {dict lappend command} -body { set dictv {a a} dict lappend dictv a b c -} {a {a b c}} -test dict-12.2.1 {dict lappend command} { +} -cleanup { + unset dictv +} -result {a {a b c}} +test dict-12.2.1 {dict lappend command} -body { set dictv [dict create a [string index =a= 1]] dict lappend dictv a b -} {a {a b}} -test dict-12.4 {dict lappend command} { +} -cleanup { + unset dictv +} -result {a {a b}} +test dict-12.4 {dict lappend command} -body { set dictv {} dict lappend dictv a x y z -} {a {x y z}} -test dict-12.5 {dict lappend command} { - catch {unset dictv} +} -cleanup { + unset dictv +} -result {a {x y z}} +test dict-12.5 {dict lappend command} -body { + unset -nocomplain dictv dict lappend dictv a b -} {a b} +} -cleanup { + unset dictv +} -result {a b} test dict-12.6 {dict lappend command} -returnCodes error -body { set dictv a dict lappend dictv a a +} -cleanup { + unset dictv } -result {missing value to go with key} test dict-12.7 {dict lappend command} -returnCodes error -body { dict lappend @@ -379,44 +413,60 @@ test dict-12.8 {dict lappend command} -returnCodes error -body { test dict-12.9 {dict lappend command} -returnCodes error -body { set dictv [dict create a "\{"] dict lappend dictv a a +} -cleanup { + unset dictv } -result {unmatched open brace in list} test dict-12.10 {dict lappend command: write failure} -setup { - catch {unset dictVar} + unset -nocomplain dictVar } -body { set dictVar(block) {} dict lappend dictVar a x } -returnCodes error -cleanup { - catch {unset dictVar} + unset dictVar } -result {can't set "dictVar": variable is array} -test dict-13.1 {dict append command} { +test dict-13.1 {dict append command} -body { set dictv {a a} dict append dictv a -} {a a} -test dict-13.2 {dict append command} { +} -cleanup { + unset dictv +} -result {a a} +test dict-13.2 {dict append command} -body { set dictv {a a} set sharing [dict values $dictv] dict append dictv a b -} {a ab} -test dict-13.3 {dict append command} { +} -cleanup { + unset dictv sharing +} -result {a ab} +test dict-13.3 {dict append command} -body { set dictv {a a} dict append dictv a b c -} {a abc} -test dict-13.2.1 {dict append command} { +} -cleanup { + unset dictv +} -result {a abc} +test dict-13.2.1 {dict append command} -body { set dictv [dict create a [string index =a= 1]] dict append dictv a b -} {a ab} -test dict-13.4 {dict append command} { +} -cleanup { + unset dictv +} -result {a ab} +test dict-13.4 {dict append command} -body { set dictv {} dict append dictv a x y z -} {a xyz} -test dict-13.5 {dict append command} { - catch {unset dictv} +} -cleanup { + unset dictv +} -result {a xyz} +test dict-13.5 {dict append command} -body { + unset -nocomplain dictv dict append dictv a b -} {a b} +} -cleanup { + unset dictv +} -result {a b} test dict-13.6 {dict append command} -returnCodes error -body { set dictv a dict append dictv a a +} -cleanup { + unset dictv } -result {missing value to go with key} test dict-13.7 {dict append command} -returnCodes error -body { dict append @@ -425,12 +475,12 @@ test dict-13.8 {dict append command} -returnCodes error -body { dict append dictv } -result {wrong # args: should be "dict append varName key ?value ...?"} test dict-13.9 {dict append command: write failure} -setup { - catch {unset dictVar} + unset -nocomplain dictVar } -body { set dictVar(block) {} dict append dictVar a x } -returnCodes error -cleanup { - catch {unset dictVar} + unset dictVar } -result {can't set "dictVar": variable is array} test dict-13.10 {compiled dict append: crash case} { apply {{} {dict append dictVar a o k}} @@ -457,7 +507,7 @@ test dict-14.6 {dict for command: syntax} -returnCodes error -body { test dict-14.7 {dict for command: syntax} -returnCodes error -body { dict for "\{x" x x } -result {unmatched open brace in list} -test dict-14.8 {dict for command} { +test dict-14.8 {dict for command} -body { # This test confirms that [dict keys], [dict values] and [dict for] # all traverse a dictionary in the same order. set dictv {a A b B c C} @@ -471,13 +521,15 @@ test dict-14.8 {dict for command} { $keys eq [dict keys $dictv] && $values eq [dict values $dictv] }] expr {$result ? "YES" : [list "NO" $dictv $keys $values]} -} YES +} -cleanup { + unset result keys values k v dictv +} -result YES test dict-14.9 {dict for command} { dict for {k v} {} { error "unexpected execution of 'dict for' body" } } {} -test dict-14.10 {dict for command: script results} { +test dict-14.10 {dict for command: script results} -body { set times 0 dict for {k v} {a a b b} { incr times @@ -485,8 +537,10 @@ test dict-14.10 {dict for command: script results} { error "shouldn't get here" } return $times -} 2 -test dict-14.11 {dict for command: script results} { +} -cleanup { + unset times k v +} -result 2 +test dict-14.11 {dict for command: script results} -body { set times 0 dict for {k v} {a a b b} { incr times @@ -494,8 +548,10 @@ test dict-14.11 {dict for command: script results} { error "shouldn't get here" } return $times -} 1 -test dict-14.12 {dict for command: script results} { +} -cleanup { + unset times k v +} -result 1 +test dict-14.12 {dict for command: script results} -body { set times 0 list [catch { dict for {k v} {a a b b} { @@ -503,7 +559,9 @@ test dict-14.12 {dict for command: script results} { error test } } msg] $msg $times $::errorInfo -} {1 test 1 {test +} -cleanup { + unset times k v msg +} -result {1 test 1 {test while executing "error test" ("dict for" body line 3) @@ -521,7 +579,7 @@ test dict-14.13 {dict for command: script results} { error "return didn't go far enough" }} } ok,a,b -test dict-14.14 {dict for command: handle representation loss} { +test dict-14.14 {dict for command: handle representation loss} -body { set dictVar {a b c d e f g h} set keys {} set values {} @@ -532,11 +590,14 @@ test dict-14.14 {dict for command: handle representation loss} { } } list [lsort $keys] [lsort $values] -} {{a c e g} {b d f h}} -test dict-14.15 {dict for command: keys are unique and iterated over once only} { - set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} - catch {unset accum} +} -cleanup { + unset dictVar keys values k v +} -result {{a c e g} {b d f h}} +test dict-14.15 {dict for command: keys are unique and iterated over once only} -setup { + unset -nocomplain accum array set accum {} +} -body { + set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} dict for {k v} $dictVar { append accum($k) $v, } @@ -545,9 +606,10 @@ test dict-14.15 {dict for command: keys are unique and iterated over once only} foreach k $result { catch {lappend result $accum($k)} } - catch {unset accum} - set result -} {a1 a2 b1 b2 bar foo : a, b, c, d, foo, bar,} + return $result +} -cleanup { + unset dictVar k v result accum +} -result {a1 a2 b1 b2 bar foo : a, b, c, d, foo, bar,} test dict-14.16 {dict for command in compilation context} { apply {{} { set res {x x x x x x} @@ -587,46 +649,63 @@ test dict-14.20 {dict for stack space compilation: bug 1903325} { # There's probably a lot more tests to add here. Really ought to use a # coverage tool for this job... -test dict-15.1 {dict set command} { +test dict-15.1 {dict set command} -body { set dictVar {} dict set dictVar a x -} {a x} -test dict-15.2 {dict set command} { +} -cleanup { + unset dictVar +} -result {a x} +test dict-15.2 {dict set command} -body { set dictvar {a {}} dict set dictvar a b x -} {a {b x}} -test dict-15.3 {dict set command} { +} -cleanup { + unset dictvar +} -result {a {b x}} +test dict-15.3 {dict set command} -body { set dictvar {a {b {}}} dict set dictvar a b c x -} {a {b {c x}}} -test dict-15.4 {dict set command} { +} -cleanup { + unset dictvar +} -result {a {b {c x}}} +test dict-15.4 {dict set command} -body { set dictVar {a y} dict set dictVar a x -} {a x} -test dict-15.5 {dict set command} { +} -cleanup { + unset dictVar +} -result {a x} +test dict-15.5 {dict set command} -body { set dictVar {a {b y}} dict set dictVar a b x -} {a {b x}} -test dict-15.6 {dict set command} { +} -cleanup { + unset dictVar +} -result {a {b x}} +test dict-15.6 {dict set command} -body { set dictVar {a {b {c y}}} dict set dictVar a b c x -} {a {b {c x}}} -test dict-15.7 {dict set command: path creation} { +} -cleanup { + unset dictVar +} -result {a {b {c x}}} +test dict-15.7 {dict set command: path creation} -body { set dictVar {} dict set dictVar a b x -} {a {b x}} -test dict-15.8 {dict set command: creates variables} { - catch {unset dictVar} +} -cleanup { + unset dictVar +} -result {a {b x}} +test dict-15.8 {dict set command: creates variables} -setup { + unset -nocomplain dictVar +} -body { dict set dictVar a x - set dictVar -} {a x} + return $dictVar +} -cleanup { + unset dictVar +} -result {a x} test dict-15.9 {dict set command: write failure} -setup { - catch {unset dictVar} + unset -nocomplain dictVar } -body { set dictVar(block) {} dict set dictVar a x } -returnCodes error -cleanup { - catch {unset dictVar} + unset dictVar } -result {can't set "dictVar": variable is array} test dict-15.10 {dict set command: syntax} -returnCodes error -body { dict set @@ -640,61 +719,83 @@ test dict-15.12 {dict set command: syntax} -returnCodes error -body { test dict-15.13 {dict set command} -returnCodes error -body { set dictVar a dict set dictVar b c +} -cleanup { + unset dictVar } -result {missing value to go with key} -test dict-16.1 {dict unset command} { +test dict-16.1 {dict unset command} -body { set dictVar {a b c d} dict unset dictVar a -} {c d} -test dict-16.2 {dict unset command} { +} -cleanup { + unset dictVar +} -result {c d} +test dict-16.2 {dict unset command} -body { set dictVar {a b c d} dict unset dictVar c -} {a b} -test dict-16.3 {dict unset command} { +} -cleanup { + unset dictVar +} -result {a b} +test dict-16.3 {dict unset command} -body { set dictVar {a b} dict unset dictVar c -} {a b} -test dict-16.4 {dict unset command} { +} -cleanup { + unset dictVar +} -result {a b} +test dict-16.4 {dict unset command} -body { set dictVar {a {b c d e}} dict unset dictVar a b -} {a {d e}} +} -cleanup { + unset dictVar +} -result {a {d e}} test dict-16.5 {dict unset command} -returnCodes error -body { set dictVar a dict unset dictVar a +} -cleanup { + unset dictVar } -result {missing value to go with key} test dict-16.6 {dict unset command} -returnCodes error -body { set dictVar {a b} dict unset dictVar c d +} -cleanup { + unset dictVar } -result {key "c" not known in dictionary} test dict-16.7 {dict unset command} -setup { - catch {unset dictVar} + unset -nocomplain dictVar } -body { list [info exists dictVar] [dict unset dictVar a] [info exists dictVar] +} -cleanup { + unset dictVar } -result {0 {} 1} test dict-16.8 {dict unset command} -returnCodes error -body { dict unset dictVar } -result {wrong # args: should be "dict unset varName key ?key ...?"} test dict-16.9 {dict unset command: write failure} -setup { - catch {unset dictVar} + unset -nocomplain dictVar } -body { set dictVar(block) {} dict unset dictVar a } -returnCodes error -cleanup { - catch {unset dictVar} + unset dictVar } -result {can't set "dictVar": variable is array} -test dict-17.1 {dict filter command: key} { +test dict-17.1 {dict filter command: key} -body { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} dict filter $dictVar key a2 -} {a2 b} -test dict-17.2 {dict filter command: key} { +} -cleanup { + unset dictVar +} -result {a2 b} +test dict-17.2 {dict filter command: key} -body { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} dict size [dict filter $dictVar key *] -} 6 -test dict-17.3 {dict filter command: key} { +} -cleanup { + unset dictVar +} -result 6 +test dict-17.3 {dict filter command: key} -body { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} - getOrder [dict filter $dictVar key ???] bar foo -} {bar foo foo bar 2} + dict filter $dictVar key ??? +} -cleanup { + unset dictVar +} -result {foo bar bar foo} test dict-17.4 {dict filter command: key - no patterns} { dict filter {a b c d} key } {} @@ -704,18 +805,24 @@ test dict-17.4.1 {dict filter command: key - many patterns} { test dict-17.5 {dict filter command: key - bad dict} -returnCodes error -body { dict filter {a b c} key } -result {missing value to go with key} -test dict-17.6 {dict filter command: value} { +test dict-17.6 {dict filter command: value} -body { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} dict filter $dictVar value c -} {b1 c} -test dict-17.7 {dict filter command: value} { +} -cleanup { + unset dictVar +} -result {b1 c} +test dict-17.7 {dict filter command: value} -body { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} dict size [dict filter $dictVar value *] -} 6 -test dict-17.8 {dict filter command: value} { +} -cleanup { + unset dictVar +} -result 6 +test dict-17.8 {dict filter command: value} -body { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} - getOrder [dict filter $dictVar value ???] bar foo -} {bar foo foo bar 2} + dict filter $dictVar value ??? +} -cleanup { + unset dictVar +} -result {foo bar bar foo} test dict-17.9 {dict filter command: value - no patterns} { dict filter {a b c d} value } {} @@ -725,44 +832,56 @@ test dict-17.9.1 {dict filter command: value - many patterns} { test dict-17.10 {dict filter command: value - bad dict} -body { dict filter {a b c} value a } -returnCodes error -result {missing value to go with key} -test dict-17.11 {dict filter command: script} { +test dict-17.11 {dict filter command: script} -body { set dictVar {a1 a a2 b b1 c b2 d foo bar bar foo} set n 0 - list [getOrder [dict filter $dictVar script {k v} { + list [dict filter $dictVar script {k v} { incr n expr {[string length $k] == [string length $v]} - }] bar foo] $n -} {{bar foo foo bar 2} 6} + }] $n +} -cleanup { + unset dictVar n k v +} -result {{foo bar bar foo} 6} test dict-17.12 {dict filter command: script} -returnCodes error -body { dict filter {a b} script {k v} { concat $k $v } +} -cleanup { + unset k v } -result {expected boolean value but got "a b"} -test dict-17.13 {dict filter command: script} { +test dict-17.13 {dict filter command: script} -body { list [catch {dict filter {a b} script {k v} {error x}} msg] $msg \ $::errorInfo -} {1 x {x +} -cleanup { + unset k v msg +} -result {1 x {x while executing "error x" ("dict filter" script line 1) invoked from within "dict filter {a b} script {k v} {error x}"}} -test dict-17.14 {dict filter command: script} { +test dict-17.14 {dict filter command: script} -setup { set n 0 +} -body { list [dict filter {a b c d} script {k v} { incr n break error boom! }] $n -} {{} 1} -test dict-17.15 {dict filter command: script} { +} -cleanup { + unset n k v +} -result {{} 1} +test dict-17.15 {dict filter command: script} -setup { set n 0 +} -body { list [dict filter {a b c d} script {k v} { incr n continue error boom! }] $n -} {{} 2} +} -cleanup { + unset n k v +} -result {{} 2} test dict-17.16 {dict filter command: script} { apply {{} { dict filter {a b} script {k v} { @@ -772,10 +891,12 @@ test dict-17.16 {dict filter command: script} { error "return didn't go far enough" }} } ok,a,b -test dict-17.17 {dict filter command: script} { +test dict-17.17 {dict filter command: script} -body { dict filter {a b} script {k k} {continue} - set k -} b + return $k +} -cleanup { + unset k +} -result b test dict-17.18 {dict filter command: script} -returnCodes error -body { dict filter {a b} script {k k} } -result {wrong # args: should be "dict filter dictionary script {keyVar valueVar} filterScript"} @@ -795,30 +916,28 @@ test dict-17.23 {dict filter command} -returnCodes error -body { dict filter a key * } -result {missing value to go with key} -test dict-18.1 {dict-list relationship} { - -body { - # Test that any internal conversion between list and dict - # does not change the object - set l [list 1 2 3 4 5 6 7 8 9 0 q w e r t y] - dict values $l - set l - } - -result {1 2 3 4 5 6 7 8 9 0 q w e r t y} -} -test dict-18.2 {dict-list relationship} { - -body { - # Test that the dictionary is a valid list - set d [dict create "abc def" 0 "a\{b" 1 "c\}d" 2] - for {set t 0} {$t < 5} {incr t} { - llength $d - dict lappend d "abc def" "\}\{" - dict append d "a\{b" "\}" - dict incr d "c\}d" 1 - } - llength $d +test dict-18.1 {dict-list relationship} -body { + # Test that any internal conversion between list and dict does not change + # the object + set l [list 1 2 3 4 5 6 7 8 9 0 q w e r t y] + dict values $l + return $l +} -cleanup { + unset l +} -result {1 2 3 4 5 6 7 8 9 0 q w e r t y} +test dict-18.2 {dict-list relationship} -body { + # Test that the dictionary is a valid list + set d [dict create "abc def" 0 "a\{b" 1 "c\}d" 2] + for {set t 0} {$t < 5} {incr t} { + llength $d + dict lappend d "abc def" "\}\{" + dict append d "a\{b" "\}" + dict incr d "c\}d" 1 } - -result 6 -} + llength $d +} -cleanup { + unset d t +} -result 6 # This is a test for a specific bug. # It shows a bad ref counter when running with memdebug on. @@ -950,14 +1069,14 @@ test dict-20.1 {dict merge command} { dict merge } {} test dict-20.2 {dict merge command} { - getOrder [dict merge {a b c d e f}] a c e -} {a b c d e f 3} + dict merge {a b c d e f} +} {a b c d e f} test dict-20.3 {dict merge command} -body { dict merge {a b c d e} } -result {missing value to go with key} -returnCodes error test dict-20.4 {dict merge command} { - getOrder [dict merge {a b c d} {e f g h}] a c e g -} {a b c d e f g h 4} + dict merge {a b c d} {e f g h} +} {a b c d e f g h} test dict-20.5 {dict merge command} -body { dict merge {a b c d e} {e f g h} } -result {missing value to go with key} -returnCodes error @@ -965,17 +1084,17 @@ test dict-20.6 {dict merge command} -body { dict merge {a b c d} {e f g h i} } -result {missing value to go with key} -returnCodes error test dict-20.7 {dict merge command} { - getOrder [dict merge {a b c d e f} {e x g h}] a c e g -} {a b c d e x g h 4} + dict merge {a b c d e f} {e x g h} +} {a b c d e x g h} test dict-20.8 {dict merge command} { - getOrder [dict merge {a b c d} {a x c y}] a c -} {a x c y 2} + dict merge {a b c d} {a x c y} +} {a x c y} test dict-20.9 {dict merge command} { - getOrder [dict merge {a b c d} {a x c y}] a c -} {a x c y 2} + dict merge {a b c d} {c y a x} +} {a x c y} test dict-20.10 {dict merge command} { - getOrder [dict merge {a b c d e f} {a x 1 2 3 4} {a - 1 -}] a c e 1 3 -} {a - c d e f 1 - 3 4 5} + dict merge {a b c d e f} {a x 1 2 3 4} {a - 1 -} +} {a - c d e f 1 - 3 4} test dict-21.1 {dict update command} -returnCodes 1 -body { dict update @@ -989,7 +1108,7 @@ test dict-21.3 {dict update command} -returnCodes 1 -body { test dict-21.4 {dict update command} -returnCodes 1 -body { dict update v k v } -result {wrong # args: should be "dict update varName key varName ?key varName ...? script"} -test dict-21.5 {dict update command} { +test dict-21.5 {dict update command} -body { set a {b c} set result {} set bb {} @@ -997,8 +1116,10 @@ test dict-21.5 {dict update command} { lappend result $a $bb } lappend result $a -} {{b c} c {b c}} -test dict-21.6 {dict update command} { +} -cleanup { + unset a result bb +} -result {{b c} c {b c}} +test dict-21.6 {dict update command} -body { set a {b c} set result {} set bb {} @@ -1006,8 +1127,10 @@ test dict-21.6 {dict update command} { lappend result $a $bb [set bb d] } lappend result $a -} {{b c} c d {b d}} -test dict-21.7 {dict update command} { +} -cleanup { + unset a result bb +} -result {{b c} c d {b d}} +test dict-21.7 {dict update command} -body { set a {b c} set result {} set bb {} @@ -1015,42 +1138,54 @@ test dict-21.7 {dict update command} { lappend result $a $bb [unset bb] } lappend result $a -} {{b c} c {} {}} -test dict-21.8 {dict update command} { +} -cleanup { + unset a result +} -result {{b c} c {} {}} +test dict-21.8 {dict update command} -body { set a {b c d e} dict update a b v1 d v2 { lassign "$v1 $v2" v2 v1 } - getOrder $a b d -} {b e d c 2} -test dict-21.9 {dict update command} { + return $a +} -cleanup { + unset a v1 v2 +} -result {b e d c} +test dict-21.9 {dict update command} -body { set a {b c d e} dict update a b v1 d v2 {unset a} info exist a -} 0 -test dict-21.10 {dict update command} { +} -cleanup { + unset v1 v2 +} -result 0 +test dict-21.10 {dict update command} -body { set a {b {c d}} dict update a b v1 { dict update v1 c v2 { set v2 foo } } - set a -} {b {c foo}} -test dict-21.11 {dict update command} { + return $a +} -cleanup { + unset a v1 v2 +} -result {b {c foo}} +test dict-21.11 {dict update command} -body { set a {b c d e} dict update a b v1 d v2 { dict set a f g } - getOrder $a b d f -} {b c d e f g 3} -test dict-21.12 {dict update command} { + return $a +} -cleanup { + unset a v1 v2 +} -result {b c d e f g} +test dict-21.12 {dict update command} -body { set a {b c d e} dict update a b v1 d v2 f v3 { set v3 g } - getOrder $a b d f -} {b c d e f g 3} + return $a +} -cleanup { + unset a v1 v2 v3 +} -result {b c d e f g} test dict-21.13 {dict update command: compilation} { apply {d { while 1 { @@ -1060,9 +1195,9 @@ test dict-21.13 {dict update command: compilation} { break } } - return [getOrder $d b c] + return $d }} {a 1 c 2} -} {b 1 c 2 2} +} {c 2 b 1} test dict-21.14 {dict update command: compilation} { apply {x { set indices {2 3} @@ -1077,7 +1212,7 @@ test dict-21.15 {dict update command: compilation} { dict update x k aa l bb {} }} {k 1 l 2} } {} -test dict-21.16 {dict update command: no recursive structures [Bug 1786481]} { +test dict-21.16 {dict update command: no recursive structures [Bug 1786481]} -body { set foo {a {b {c {d {e 1}}}}} dict update foo a t { dict update t b t { @@ -1089,7 +1224,9 @@ test dict-21.16 {dict update command: no recursive structures [Bug 1786481]} { } } string range [append foo OK] end-1 end -} OK +} -cleanup { + unset foo t +} -result OK test dict-21.17 {dict update command: no recursive structures [Bug 1786481]} { apply {{} { set foo {a {b {c {d {e 1}}}}} @@ -1102,8 +1239,8 @@ test dict-21.17 {dict update command: no recursive structures [Bug 1786481]} { } } } + string range [append foo OK] end-1 end }} - string range [append foo OK] end-1 end } OK test dict-22.1 {dict with command} -body { @@ -1116,53 +1253,65 @@ test dict-22.3 {dict with command} -body { unset -nocomplain v dict with v {error "in body"} } -returnCodes 1 -result {can't read "v": no such variable} -test dict-22.4 {dict with command} { +test dict-22.4 {dict with command} -body { set a {b c d e} unset -nocomplain b d set result [list [info exist b] [info exist d]] dict with a { lappend result [info exist b] [info exist d] $b $d } - set result -} {0 0 1 1 c e} -test dict-22.5 {dict with command} { + return $result +} -cleanup { + unset a b d result +} -result {0 0 1 1 c e} +test dict-22.5 {dict with command} -body { set a {b c d e} dict with a { lassign "$b $d" d b } - getOrder $a b d -} {b e d c 2} -test dict-22.6 {dict with command} { + return $a +} -cleanup { + unset a b d +} -result {b e d c} +test dict-22.6 {dict with command} -body { set a {b c d e} dict with a { unset b # This *won't* go into the dict... set f g } - set a -} {d e} -test dict-22.7 {dict with command} { + return $a +} -cleanup { + unset a d f +} -result {d e} +test dict-22.7 {dict with command} -body { set a {b c d e} dict with a { dict unset a b } - getOrder $a b d -} {b c d e 2} -test dict-22.8 {dict with command} { + return $a +} -cleanup { + unset a +} -result {d e b c} +test dict-22.8 {dict with command} -body { set a [dict create b c] dict with a { set b $a } - set a -} {b {b c}} -test dict-22.9 {dict with command} { + return $a +} -cleanup { + unset a b +} -result {b {b c}} +test dict-22.9 {dict with command} -body { set a {b {c d}} dict with a b { set c $c$c } - set a -} {b {c dd}} -test dict-22.10 {dict with command: result handling tricky case} { + return $a +} -cleanup { + unset a c +} -result {b {c dd}} +test dict-22.10 {dict with command: result handling tricky case} -body { set a {b {c d}} foreach i {0 1} { if {$i} break @@ -1173,8 +1322,10 @@ test dict-22.10 {dict with command: result handling tricky case} { } } list $i $a -} {0 {}} -test dict-22.11 {dict with command: no recursive structures [Bug 1786481]} { +} -cleanup { + unset a i c +} -result {0 {}} +test dict-22.11 {dict with command: no recursive structures [Bug 1786481]} -body { set foo {t {t {t {inner 1}}}} dict with foo { dict with t { @@ -1186,7 +1337,9 @@ test dict-22.11 {dict with command: no recursive structures [Bug 1786481]} { } } string range [append foo OK] end-1 end -} OK +} -cleanup { + unset foo t inner +} -result OK # cleanup ::tcltest::cleanupTests -- cgit v0.12 From e06f616f4b1db4e440fd0883a4987547208d8dd9 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Oct 2009 15:51:50 +0000 Subject: More variable cleansing --- tests/if.test | 679 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 432 insertions(+), 247 deletions(-) diff --git a/tests/if.test b/tests/if.test index 4f46354..59fb24a 100644 --- a/tests/if.test +++ b/tests/if.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: if.test,v 1.12 2006/10/09 19:15:44 msofer Exp $ +# RCS: @(#) $Id: if.test,v 1.13 2009/10/29 15:51:50 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -20,83 +20,109 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Basic "if" operation. catch {unset a} -test if-1.1 {TclCompileIfCmd: missing if/elseif test} { - list [catch {if} msg] $msg -} {1 {wrong # args: no expression after "if" argument}} -test if-1.2 {TclCompileIfCmd: error in if/elseif test} { - list [catch {if {[error "error in condition"]} foo} msg] $msg -} {1 {error in condition}} +test if-1.1 {TclCompileIfCmd: missing if/elseif test} -body { + if +} -returnCodes error -result {wrong # args: no expression after "if" argument} +test if-1.2 {TclCompileIfCmd: error in if/elseif test} -body { + if {[error "error in condition"]} foo +} -returnCodes error -result {error in condition} test if-1.3 {TclCompileIfCmd: error in if/elseif test} -body { list [catch {if {1+}} msg] $msg $::errorInfo -} -match glob -result {1 * {*"if {1+}"}} -test if-1.4 {TclCompileIfCmd: if/elseif test in braces} { +} -match glob -cleanup { + unset msg +} -result {1 * {*"if {1+}"}} +test if-1.4 {TclCompileIfCmd: if/elseif test in braces} -body { set a {} if {1<2} {set a 1} - set a -} {1} -test if-1.5 {TclCompileIfCmd: if/elseif test not in braces} { + return $a +} -cleanup { + unset a +} -result {1} +test if-1.5 {TclCompileIfCmd: if/elseif test not in braces} -body { set a {} if 1<2 {set a 1} - set a -} {1} -test if-1.6 {TclCompileIfCmd: multiline test expr} { + return $a +} -cleanup { + unset a +} -result {1} +test if-1.6 {TclCompileIfCmd: multiline test expr} -setup { set a {} +} -body { if {($tcl_platform(platform) != "foobar1") && \ ($tcl_platform(platform) != "foobar2")} {set a 3} else {set a 4} - set a -} 3 -test if-1.7 {TclCompileIfCmd: "then" after if/elseif test} { + return $a +} -cleanup { + unset a +} -result 3 +test if-1.7 {TclCompileIfCmd: "then" after if/elseif test} -body { set a {} if 4>3 then {set a 1} - set a -} {1} -test if-1.8 {TclCompileIfCmd: keyword other than "then" after if/elseif test} { + return $a +} -cleanup { + unset a +} -result {1} +test if-1.8 {TclCompileIfCmd: keyword other than "then" after if/elseif test} -setup { set a {} - catch {if 1<2 therefore {set a 1}} msg - set msg -} {invalid command name "therefore"} -test if-1.9 {TclCompileIfCmd: missing "then" body} { +} -body { + if 1<2 therefore {set a 1} +} -cleanup { + unset a +} -returnCodes error -result {invalid command name "therefore"} +test if-1.9 {TclCompileIfCmd: missing "then" body} -setup { set a {} - catch {if 1<2 then} msg - set msg -} {wrong # args: no script following "then" argument} +} -body { + if 1<2 then +} -cleanup { + unset a +} -returnCodes error -result {wrong # args: no script following "then" argument} test if-1.10 {TclCompileIfCmd: error in "then" body} -body { set a {} list [catch {if {$a!="xxx"} then {set}} msg] $msg $::errorInfo -} -match glob -result {1 {wrong # args: should be "set varName ?newValue?"} {wrong # args: should be "set varName ?newValue?" +} -match glob -cleanup { + unset a msg +} -result {1 {wrong # args: should be "set varName ?newValue?"} {wrong # args: should be "set varName ?newValue?" while *ing "set"*}} -test if-1.11 {TclCompileIfCmd: error in "then" body} { - list [catch {if 2 then {[error "error in then clause"]}} msg] $msg -} {1 {error in then clause}} -test if-1.12 {TclCompileIfCmd: "then" body in quotes} { +test if-1.11 {TclCompileIfCmd: error in "then" body} -body { + if 2 then {[error "error in then clause"]} +} -returnCodes error -result {error in then clause} +test if-1.12 {TclCompileIfCmd: "then" body in quotes} -body { set a {} if 27>17 "append a x" - set a -} {x} -test if-1.13 {TclCompileIfCmd: computed "then" body} { + return $a +} -cleanup { + unset a +} -result {x} +test if-1.13 {TclCompileIfCmd: computed "then" body} -setup { catch {unset x1} catch {unset x2} - set a {} +} -body { set x1 {append a x1} set x2 {; append a x2} set a {} if 1 $x1$x2 - set a -} {x1x2} -test if-1.14 {TclCompileIfCmd: taking proper branch} { + return $a +} -cleanup { + unset a x1 x2 +} -result {x1x2} +test if-1.14 {TclCompileIfCmd: taking proper branch} -body { set a {} if 1<2 {set a 1} - set a -} 1 -test if-1.15 {TclCompileIfCmd: taking proper branch} { + return $a +} -cleanup { + unset a +} -result 1 +test if-1.15 {TclCompileIfCmd: taking proper branch} -body { set a {} if 1>2 {set a 1} - set a -} {} -test if-1.16 {TclCompileIfCmd: test jumpFalse instruction replacement after long "then" body} { + return $a +} -cleanup { + unset a +} -result {} +test if-1.16 {TclCompileIfCmd: test jumpFalse instruction replacement after long "then" body} -setup { catch {unset i} set a {} +} -body { if 1<2 { set a 1 while {$a != "xxx"} { @@ -146,38 +172,54 @@ test if-1.16 {TclCompileIfCmd: test jumpFalse instruction replacement after long } set a 3 } - set a -} 3 -test if-1.17 {TclCompileIfCmd: if/elseif test in quotes} { + return $a +} -cleanup { + unset a + unset -nocomplain i +} -result 3 +test if-1.17 {TclCompileIfCmd: if/elseif test in quotes} -setup { set a {} - list [catch {if {"0 < 3"} {set a 1}} msg] $msg -} {1 {expected boolean value but got "0 < 3"}} - +} -body { + if {"0 < 3"} {set a 1} +} -returnCodes error -cleanup { + unset a +} -result {expected boolean value but got "0 < 3"} -test if-2.1 {TclCompileIfCmd: "elseif" after if/elseif test} { +test if-2.1 {TclCompileIfCmd: "elseif" after if/elseif test} -setup { set a {} +} -body { if 3>4 {set a 1} elseif 1 {set a 2} - set a -} {2} + return $a +} -cleanup { + unset a +} -result {2} # Since "else" is optional, the "elwood" below is treated as a command. # But then there shouldn't be any additional argument words for the "if". -test if-2.2 {TclCompileIfCmd: keyword other than "elseif"} { +test if-2.2 {TclCompileIfCmd: keyword other than "elseif"} -setup { set a {} - catch {if 1<2 {set a 1} elwood {set a 2}} msg - set msg -} {wrong # args: extra words after "else" clause in "if" command} -test if-2.3 {TclCompileIfCmd: missing expression after "elseif"} { +} -body { + if 1<2 {set a 1} elwood {set a 2} +} -returnCodes error -cleanup { + unset a +} -result {wrong # args: extra words after "else" clause in "if" command} +test if-2.3 {TclCompileIfCmd: missing expression after "elseif"} -setup { set a {} - catch {if 1<2 {set a 1} elseif} msg - set msg -} {wrong # args: no expression after "elseif" argument} -test if-2.4 {TclCompileIfCmd: error in expression after "elseif"} -body { +} -body { + if 1<2 {set a 1} elseif +} -returnCodes error -cleanup { + unset a +} -result {wrong # args: no expression after "elseif" argument} +test if-2.4 {TclCompileIfCmd: error in expression after "elseif"} -setup { set a {} +} -body { list [catch {if 3>4 {set a 1} elseif {1>}} msg] $msg $::errorInfo -} -match glob -result {1 * {*"if 3>4 {set a 1} elseif {1>}"}} -test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long "elseif" body} { +} -match glob -cleanup { + unset a msg +} -result {1 * {*"if 3>4 {set a 1} elseif {1>}"}} +test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long "elseif" body} -setup { catch {unset i} set a {} +} -body { if 1>2 { set a 1 while {$a != "xxx"} { @@ -275,44 +317,59 @@ test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long } set a 6 } - set a -} 6 + return $a +} -cleanup { + unset a + unset -nocomplain i +} -result 6 -test if-3.1 {TclCompileIfCmd: "else" clause} { +test if-3.1 {TclCompileIfCmd: "else" clause} -body { set a {} if 3>4 {set a 1} elseif {$a == "foo"} {set a 2} else {set a 3} - set a -} 3 + return $a +} -cleanup { + unset a +} -result 3 # Since "else" is optional, the "elsex" below is treated as a command. # But then there shouldn't be any additional argument words for the "if". -test if-3.2 {TclCompileIfCmd: keyword other than "else"} { +test if-3.2 {TclCompileIfCmd: keyword other than "else"} -setup { set a {} - catch {if 1<2 then {set a 1} elsex {set a 2}} msg - set msg -} {wrong # args: extra words after "else" clause in "if" command} -test if-3.3 {TclCompileIfCmd: missing body after "else"} { +} -body { + if 1<2 then {set a 1} elsex {set a 2} +} -returnCodes error -cleanup { + unset a +} -result {wrong # args: extra words after "else" clause in "if" command} +test if-3.3 {TclCompileIfCmd: missing body after "else"} -setup { set a {} - catch {if 2<1 {set a 1} else} msg - set msg -} {wrong # args: no script following "else" argument} -test if-3.4 {TclCompileIfCmd: error compiling body after "else"} -body { +} -body { + if 2<1 {set a 1} else +} -returnCodes error -cleanup { + unset a +} -result {wrong # args: no script following "else" argument} +test if-3.4 {TclCompileIfCmd: error compiling body after "else"} -setup { set a {} - catch {if 2<1 {set a 1} else {set}} msg +} -body { + catch {if 2<1 {set a 1} else {set}} set ::errorInfo -} -match glob -result {wrong # args: should be "set varName ?newValue?" +} -match glob -cleanup { + unset a +} -result {wrong # args: should be "set varName ?newValue?" while *ing "set"*} -test if-3.5 {TclCompileIfCmd: extra arguments after "else" argument} { +test if-3.5 {TclCompileIfCmd: extra arguments after "else" argument} -setup { set a {} - catch {if 2<1 {set a 1} else {set a 2} or something} msg - set msg -} {wrong # args: extra words after "else" clause in "if" command} +} -body { + if 2<1 {set a 1} else {set a 2} or something +} -returnCodes error -cleanup { + unset a +} -result {wrong # args: extra words after "else" clause in "if" command} # The following test also checks whether contained loops and other # commands are properly relocated because a short jump must be replaced # by a "long distance" one. -test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long "else" clause} { +test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long "else" clause} -setup { catch {unset i} set a {} +} -body { if 1>2 { set a 1 while {$a != "xxx"} { @@ -458,132 +515,185 @@ test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long } set a 9 } - set a -} 9 + return $a +} -cleanup { + unset a + unset -nocomplain i +} -result 9 -test if-4.1 {TclCompileIfCmd: "if" command result} { +test if-4.1 {TclCompileIfCmd: "if" command result} -setup { set a {} +} -body { set a [if 3<4 {set i 27}] - set a -} 27 -test if-4.2 {TclCompileIfCmd: "if" command result} { + return $a +} -cleanup { + unset a + unset -nocomplain i +} -result 27 +test if-4.2 {TclCompileIfCmd: "if" command result} -setup { set a {} +} -body { set a [if 3>4 {set i 27}] - set a -} {} -test if-4.3 {TclCompileIfCmd: "if" command result} { + return $a +} -cleanup { + unset a + unset -nocomplain i +} -result {} +test if-4.3 {TclCompileIfCmd: "if" command result} -setup { set a {} +} -body { set a [if 0 {set i 1} elseif 1 {set i 2}] - set a -} 2 -test if-4.4 {TclCompileIfCmd: "if" command result} { + return $a +} -cleanup { + unset a + unset -nocomplain i +} -result 2 +test if-4.4 {TclCompileIfCmd: "if" command result} -setup { set a {} +} -body { set a [if 0 {set i 1} elseif 0 {set i 2} elseif 2>5 {set i 3} else {set i 4}] - set a -} 4 -test if-4.5 {TclCompileIfCmd: return value} { + return $a +} -cleanup { + unset a i +} -result 4 +test if-4.5 {TclCompileIfCmd: return value} -body { if 0 then {set a 22; concat abc} elseif 1 {concat def} {concat ghi} -} def +} -cleanup { + unset -nocomplain a +} -result def # Check "if" and computed command names. -catch {unset a} -test if-5.1 {if cmd with computed command names: missing if/elseif test} { +test if-5.1 {if cmd with computed command names: missing if/elseif test} -body { set z if - list [catch {$z} msg] $msg -} {1 {wrong # args: no expression after "if" argument}} - -test if-5.2 {if cmd with computed command names: error in if/elseif test} { + $z +} -returnCodes error -cleanup { + unset z +} -result {wrong # args: no expression after "if" argument} +test if-5.2 {if cmd with computed command names: error in if/elseif test} -body { set z if - list [catch {$z {[error "error in condition"]} foo} msg] $msg -} {1 {error in condition}} + $z {[error "error in condition"]} foo +} -returnCodes error -cleanup { + unset z +} -result {error in condition} test if-5.3 {if cmd with computed command names: error in if/elseif test} -body { set z if - list [catch {$z {1+}} msg] $msg $::errorInfo -} -match glob -result {1 * {*"$z {1+}"}} -test if-5.4 {if cmd with computed command names: if/elseif test in braces} { - set z if + list [catch {$z {1+}}] $::errorInfo +} -match glob -cleanup { + unset z +} -result {1 {*"$z {1+}"}} +test if-5.4 {if cmd with computed command names: if/elseif test in braces} -setup { set a {} - $z {1<2} {set a 1} - set a -} {1} -test if-5.5 {if cmd with computed command names: if/elseif test not in braces} { +} -body { set z if + $z {1<2} {set a 1} + return $a +} -cleanup { + unset a z +} -result {1} +test if-5.5 {if cmd with computed command names: if/elseif test not in braces} -setup { set a {} +} -body { + set z if $z 1<2 {set a 1} - set a -} {1} -test if-5.6 {if cmd with computed command names: multiline test expr} { + return $a +} -cleanup { + unset a z +} -result {1} +test if-5.6 {if cmd with computed command names: multiline test expr} -body { set z if - set a {} $z {($tcl_platform(platform) != "foobar1") && \ ($tcl_platform(platform) != "foobar2")} {set a 3} else {set a 4} - set a -} 3 -test if-5.7 {if cmd with computed command names: "then" after if/elseif test} { - set z if + return $a +} -cleanup { + unset a z +} -result 3 +test if-5.7 {if cmd with computed command names: "then" after if/elseif test} -setup { set a {} - $z 4>3 then {set a 1} - set a -} {1} -test if-5.8 {if cmd with computed command names: keyword other than "then" after if/elseif test} { +} -body { set z if + $z 4>3 then {set a 1} + return $a +} -cleanup { + unset a z +} -result {1} +test if-5.8 {if cmd with computed command names: keyword other than "then" after if/elseif test} -setup { set a {} - catch {$z 1<2 therefore {set a 1}} msg - set msg -} {invalid command name "therefore"} -test if-5.9 {if cmd with computed command names: missing "then" body} { +} -body { set z if + $z 1<2 therefore {set a 1} +} -returnCodes error -cleanup { + unset a z +} -result {invalid command name "therefore"} +test if-5.9 {if cmd with computed command names: missing "then" body} -setup { set a {} - catch {$z 1<2 then} msg - set msg -} {wrong # args: no script following "then" argument} +} -body { + set z if + $z 1<2 then +} -returnCodes error -cleanup { + unset a z +} -result {wrong # args: no script following "then" argument} test if-5.10 {if cmd with computed command names: error in "then" body} -body { set z if set a {} list [catch {$z {$a!="xxx"} then {set}} msg] $msg $::errorInfo -} -match glob -result {1 {wrong # args: should be "set varName ?newValue?"} {wrong # args: should be "set varName ?newValue?" +} -match glob -cleanup { + unset a z msg +} -result {1 {wrong # args: should be "set varName ?newValue?"} {wrong # args: should be "set varName ?newValue?" while *ing "set" invoked from within "$z {$a!="xxx"} then {set}"}} -test if-5.11 {if cmd with computed command names: error in "then" body} { - set z if - list [catch {$z 2 then {[error "error in then clause"]}} msg] $msg -} {1 {error in then clause}} -test if-5.12 {if cmd with computed command names: "then" body in quotes} { +test if-5.11 {if cmd with computed command names: error in "then" body} -body { set z if + $z 2 then {[error "error in then clause"]} +} -returnCodes error -cleanup { + unset z +} -result {error in then clause} +test if-5.12 {if cmd with computed command names: "then" body in quotes} -setup { set a {} - $z 27>17 "append a x" - set a -} {x} -test if-5.13 {if cmd with computed command names: computed "then" body} { +} -body { set z if + $z 27>17 "append a x" + return $a +} -cleanup { + unset a z +} -result {x} +test if-5.13 {if cmd with computed command names: computed "then" body} -setup { catch {unset x1} catch {unset x2} - set a {} +} -body { + set z if set x1 {append a x1} set x2 {; append a x2} set a {} $z 1 $x1$x2 - set a -} {x1x2} -test if-5.14 {if cmd with computed command names: taking proper branch} { - set z if + return $a +} -cleanup { + unset a z x1 x2 +} -result {x1x2} +test if-5.14 {if cmd with computed command names: taking proper branch} -setup { set a {} - $z 1<2 {set a 1} - set a -} 1 -test if-5.15 {if cmd with computed command names: taking proper branch} { +} -body { set z if + $z 1<2 {set a 1} + return $a +} -cleanup { + unset a z +} -result 1 +test if-5.15 {if cmd with computed command names: taking proper branch} -body { set a {} - $z 1>2 {set a 1} - set a -} {} -test if-5.16 {if cmd with computed command names: test jumpFalse instruction replacement after long "then" body} { set z if + $z 1>2 {set a 1} + return $a +} -cleanup { + unset a z +} -result {} +test if-5.16 {if cmd with computed command names: test jumpFalse instruction replacement after long "then" body} -setup { catch {unset i} set a {} +} -body { + set z if $z 1<2 { set a 1 while {$a != "xxx"} { @@ -633,44 +743,60 @@ test if-5.16 {if cmd with computed command names: test jumpFalse instruction rep } set a 3 } - set a -} 3 -test if-5.17 {if cmd with computed command names: if/elseif test in quotes} { - set z if + return $a +} -cleanup { + unset a z + unset -nocomplain i +} -result 3 +test if-5.17 {if cmd with computed command names: if/elseif test in quotes} -setup { set a {} - list [catch {$z {"0 < 3"} {set a 1}} msg] $msg -} {1 {expected boolean value but got "0 < 3"}} - - -test if-6.1 {if cmd with computed command names: "elseif" after if/elseif test} { +} -body { set z if + $z {"0 < 3"} {set a 1} +} -returnCodes error -cleanup { + unset a z +} -result {expected boolean value but got "0 < 3"} + +test if-6.1 {if cmd with computed command names: "elseif" after if/elseif test} -setup { set a {} +} -body { + set z if $z 3>4 {set a 1} elseif 1 {set a 2} - set a -} {2} + return $a +} -cleanup { + unset a z +} -result {2} # Since "else" is optional, the "elwood" below is treated as a command. # But then there shouldn't be any additional argument words for the "if". -test if-6.2 {if cmd with computed command names: keyword other than "elseif"} { - set z if +test if-6.2 {if cmd with computed command names: keyword other than "elseif"} -setup { set a {} - catch {$z 1<2 {set a 1} elwood {set a 2}} msg - set msg -} {wrong # args: extra words after "else" clause in "if" command} -test if-6.3 {if cmd with computed command names: missing expression after "elseif"} { +} -body { set z if + $z 1<2 {set a 1} elwood {set a 2} +} -returnCodes error -cleanup { + unset a z +} -result {wrong # args: extra words after "else" clause in "if" command} +test if-6.3 {if cmd with computed command names: missing expression after "elseif"} -setup { set a {} - catch {$z 1<2 {set a 1} elseif} msg - set msg -} {wrong # args: no expression after "elseif" argument} -test if-6.4 {if cmd with computed command names: error in expression after "elseif"} -body { +} -body { set z if + $z 1<2 {set a 1} elseif +} -returnCodes error -cleanup { + unset a z +} -result {wrong # args: no expression after "elseif" argument} +test if-6.4 {if cmd with computed command names: error in expression after "elseif"} -setup { set a {} - list [catch {$z 3>4 {set a 1} elseif {1>}} msg] $msg $::errorInfo -} -match glob -result {1 * {*"$z 3>4 {set a 1} elseif {1>}"}} -test if-6.5 {if cmd with computed command names: test jumpFalse instruction replacement after long "elseif" body} { +} -body { set z if + list [catch {$z 3>4 {set a 1} elseif {1>}}] $::errorInfo +} -match glob -cleanup { + unset a z +} -result {1 {*"$z 3>4 {set a 1} elseif {1>}"}} +test if-6.5 {if cmd with computed command names: test jumpFalse instruction replacement after long "elseif" body} -setup { catch {unset i} set a {} +} -body { + set z if $z 1>2 { set a 1 while {$a != "xxx"} { @@ -768,52 +894,68 @@ test if-6.5 {if cmd with computed command names: test jumpFalse instruction repl } set a 6 } - set a -} 6 + return $a +} -cleanup { + unset a z + unset -nocomplain i +} -result 6 -test if-7.1 {if cmd with computed command names: "else" clause} { - set z if +test if-7.1 {if cmd with computed command names: "else" clause} -setup { set a {} +} -body { + set z if $z 3>4 {set a 1} elseif {$a == "foo"} {set a 2} else {set a 3} - set a -} 3 + return $a +} -cleanup { + unset a z +} -result 3 # Since "else" is optional, the "elsex" below is treated as a command. # But then there shouldn't be any additional argument words for the "if". -test if-7.2 {if cmd with computed command names: keyword other than "else"} { - set z if +test if-7.2 {if cmd with computed command names: keyword other than "else"} -setup { set a {} - catch {$z 1<2 then {set a 1} elsex {set a 2}} msg - set msg -} {wrong # args: extra words after "else" clause in "if" command} -test if-7.3 {if cmd with computed command names: missing body after "else"} { +} -body { set z if + $z 1<2 then {set a 1} elsex {set a 2} +} -returnCodes error -cleanup { + unset a z +} -result {wrong # args: extra words after "else" clause in "if" command} +test if-7.3 {if cmd with computed command names: missing body after "else"} -setup { set a {} - catch {$z 2<1 {set a 1} else} msg - set msg -} {wrong # args: no script following "else" argument} -test if-7.4 {if cmd with computed command names: error compiling body after "else"} -body { +} -body { set z if + $z 2<1 {set a 1} else +} -returnCodes error -cleanup { + unset a z +} -result {wrong # args: no script following "else" argument} +test if-7.4 {if cmd with computed command names: error compiling body after "else"} -setup { set a {} - catch {$z 2<1 {set a 1} else {set}} msg - set ::errorInfo -} -match glob -result {wrong # args: should be "set varName ?newValue?" +} -body { + set z if + catch {$z 2<1 {set a 1} else {set}} + return $::errorInfo +} -match glob -cleanup { + unset a z +} -result {wrong # args: should be "set varName ?newValue?" while *ing "set" invoked from within "$z 2<1 {set a 1} else {set}"} -test if-7.5 {if cmd with computed command names: extra arguments after "else" argument} { - set z if +test if-7.5 {if cmd with computed command names: extra arguments after "else" argument} -setup { set a {} - catch {$z 2<1 {set a 1} else {set a 2} or something} msg - set msg -} {wrong # args: extra words after "else" clause in "if" command} +} -body { + set z if + $z 2<1 {set a 1} else {set a 2} or something +} -returnCodes error -cleanup { + unset a z +} -result {wrong # args: extra words after "else" clause in "if" command} # The following test also checks whether contained loops and other # commands are properly relocated because a short jump must be replaced # by a "long distance" one. -test if-7.6 {if cmd with computed command names: test jumpFalse instruction replacement after long "else" clause} { - set z if +test if-7.6 {if cmd with computed command names: test jumpFalse instruction replacement after long "else" clause} -setup { catch {unset i} set a {} +} -body { + set z if $z 1>2 { set a 1 while {$a != "xxx"} { @@ -959,45 +1101,69 @@ test if-7.6 {if cmd with computed command names: test jumpFalse instruction repl } set a 9 } - set a -} 9 + return $a +} -cleanup { + unset a z + unset -nocomplain i +} -result 9 -test if-8.1 {if cmd with computed command names: "if" command result} { - set z if +test if-8.1 {if cmd with computed command names: "if" command result} -setup { set a {} - set a [$z 3<4 {set i 27}] - set a -} 27 -test if-8.2 {if cmd with computed command names: "if" command result} { +} -body { set z if + set a [$z 3<4 {set i 27}] + return $a +} -cleanup { + unset a z + unset -nocomplain i +} -result 27 +test if-8.2 {if cmd with computed command names: "if" command result} -setup { set a {} - set a [$z 3>4 {set i 27}] - set a -} {} -test if-8.3 {if cmd with computed command names: "if" command result} { +} -body { set z if + set a [$z 3>4 {set i 27}] + return $a +} -cleanup { + unset a z + unset -nocomplain i +} -result {} +test if-8.3 {if cmd with computed command names: "if" command result} -setup { set a {} - set a [$z 0 {set i 1} elseif 1 {set i 2}] - set a -} 2 -test if-8.4 {if cmd with computed command names: "if" command result} { +} -body { set z if + set a [$z 0 {set i 1} elseif 1 {set i 2}] + return $a +} -cleanup { + unset a z + unset -nocomplain i +} -result 2 +test if-8.4 {if cmd with computed command names: "if" command result} -setup { set a {} +} -body { + set z if set a [$z 0 {set i 1} elseif 0 {set i 2} elseif 2>5 {set i 3} else {set i 4}] - set a -} 4 -test if-8.5 {if cmd with computed command names: return value} { + return $a +} -cleanup { + unset a z + unset -nocomplain i +} -result 4 +test if-8.5 {if cmd with computed command names: return value} -body { set z if $z 0 then {set a 22; concat abc} elseif 1 {concat def} {concat ghi} -} def +} -cleanup { + unset z + unset -nocomplain a +} -result def -test if-9.1 {if cmd with namespace qualifiers} { +test if-9.1 {if cmd with namespace qualifiers} -body { ::if {1} {set x 4} -} 4 +} -cleanup { + unset x +} -result 4 # Test for incorrect "double evaluation semantics" -test if-10.1 {delayed substitution of then body} { +test if-10.1 {delayed substitution of then body} -body { set j 0 set if if # this is not compiled @@ -1013,8 +1179,11 @@ test if-10.1 {delayed substitution of then body} { set result } append result [p] -} {00} -test if-10.2 {delayed substitution of elseif expression} { +} -cleanup { + unset j if result + rename p {} +} -result {00} +test if-10.2 {delayed substitution of elseif expression} -body { set j 0 set if if # this is not compiled @@ -1038,8 +1207,11 @@ test if-10.2 {delayed substitution of elseif expression} { set result } append result [p] -} {00} -test if-10.3 {delayed substitution of elseif body} { +} -cleanup { + unset j if result + rename p {} +} -result {00} +test if-10.3 {delayed substitution of elseif body} -body { set j 0 set if if # this is not compiled @@ -1058,22 +1230,29 @@ test if-10.3 {delayed substitution of elseif body} { " } append result [p] -} {00} -test if-10.4 {delayed substitution of else body} { +} -cleanup { + unset j if result + rename p {} +} -result {00} +test if-10.4 {delayed substitution of else body} -body { set j 0 if {[incr j] == 0} { set result badthen } else " set result $j " - set result -} {0} -test if-10.5 {substituted control words} { + return $result +} -cleanup { + unset j result +} -result {0} +test if-10.5 {substituted control words} -body { set then then; proc then {} {return badthen} set else else; proc else {} {return badelse} set elseif elseif; proc elseif {} {return badelseif} list [catch {if 1 $then {if 0 {} $elseif 1 {if 0 {} $else {list ok}}}} a] $a -} {0 ok} +} -cleanup { + unset then else elseif a +} -result {0 ok} test if-10.6 {double invocation of variable traces} -body { set iftracecounter 0 proc iftraceproc {args} { @@ -1090,10 +1269,16 @@ test if-10.6 {double invocation of variable traces} -body { } trace variable iftracevar r [list iftraceproc 10] list [catch {if "$iftracevar + 20" {}} a] $a \ - [catch {if "$iftracevar + 20" {}} b] $b \ - [unset iftracevar iftracecounter] -} -match glob -result {1 {*} 0 {} {}} + [catch {if "$iftracevar + 20" {}} b] $b +} -cleanup { + unset iftracevar iftracecounter a b +} -match glob -result {1 {*} 0 {}} # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# fill-column: 78 +# End: -- cgit v0.12 From 4c88e5710e2844b84cd5893e41bc3d369c37d65c Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 29 Oct 2009 17:21:48 +0000 Subject: test hygiene for the ::tmp variable --- tests/apply.test | 6 ++++-- tests/compile.test | 3 ++- tests/proc.test | 3 ++- tests/reg.test | 14 +++++++++----- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/apply.test b/tests/apply.test index 95f4fd8..809fdbe 100644 --- a/tests/apply.test +++ b/tests/apply.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: apply.test,v 1.13 2008/07/19 22:50:39 nijtmans Exp $ +# RCS: @(#) $Id: apply.test,v 1.14 2009/10/29 17:21:48 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.2 @@ -277,7 +277,7 @@ test apply-9.1 {leaking internal rep} -setup { set leakedBytes [expr {$end - $tmp}] } -cleanup { rename getbytes {} - unset lam + unset -nocomplain lam end i tmp leakedBytes } -result 0 test apply-9.2 {leaking internal rep} -setup { proc getbytes {} { @@ -294,6 +294,7 @@ test apply-9.2 {leaking internal rep} -setup { set leakedBytes [expr {$end - $tmp}] } -cleanup { rename getbytes {} + unset -nocomplain end i tmp leakedBytes } -result 0 test apply-9.3 {leaking internal rep} -setup { proc getbytes {} { @@ -312,6 +313,7 @@ test apply-9.3 {leaking internal rep} -setup { set leakedBytes [expr {$end - $tmp}] } -cleanup { rename getbytes {} + unset -nocomplain end i x tmp leakedBytes } -result 0 # Tests for the avoidance of recompilation diff --git a/tests/compile.test b/tests/compile.test index 557b3b5..d9567cc 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compile.test,v 1.50 2008/11/17 22:37:36 ferrieux Exp $ +# RCS: @(#) $Id: compile.test,v 1.51 2009/10/29 17:21:48 dgp Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -296,6 +296,7 @@ test compile-12.1 {testing literal leak on interp delete} -setup { set leakedBytes [expr {$end - $tmp}] } -cleanup { rename getbytes {} + unset -nocomplain end i tmp leakedBytes } -result 0 # Special test for a memory error in a preliminary fix of [Bug 467523]. # It requires executing a helpfile. Presumably the child process is diff --git a/tests/proc.test b/tests/proc.test index 6ef6811..789c671 100644 --- a/tests/proc.test +++ b/tests/proc.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: proc.test,v 1.20 2008/08/11 20:40:41 andreas_kupries Exp $ +# RCS: @(#) $Id: proc.test,v 1.21 2009/10/29 17:21:48 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -322,6 +322,7 @@ test proc-4.8 {TclCreateProc, procbody obj, no leak on multiple iterations} -set set leakedBytes [expr {$end - $tmp}] } -cleanup { rename getbytes {} + unset -nocomplain end i tmp leakedBytes } -result 0 test proc-5.1 {Bytecompiling noop; test for correct argument substitution} { diff --git a/tests/reg.test b/tests/reg.test index 79eaaa0..46b5e64 100644 --- a/tests/reg.test +++ b/tests/reg.test @@ -9,7 +9,7 @@ # # Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. # -# RCS: @(#) $Id: reg.test,v 1.25 2008/03/19 13:39:28 dkf Exp $ +# RCS: @(#) $Id: reg.test,v 1.26 2009/10/29 17:21:48 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1050,13 +1050,17 @@ test reg-33.8 {Bug 505048} { test reg-33.9 {Bug 505048} { regexp -indices -inline {\A\s*[^b]*b} ab } {{0 1}} -test reg-33.10 {Bug 840258} { +test reg-33.10 {Bug 840258} -body { regsub {(^|\n)+\.*b} \n.b {} tmp -} 1 -test reg-33.11 {Bug 840258} { +} -cleanup { + unset tmp +} -result 1 +test reg-33.11 {Bug 840258} -body { regsub {(^|[\n\r]+)\.*\?<.*?(\n|\r)+} \ "TQ\r\n.?<5000267>Test already stopped\r\n" {} tmp -} 1 +} -cleanup { + unset tmp +} -result 1 test reg-33.12 {Bug 1810264 - bad read} { regexp {\3161573148} {\3161573148} } 0 -- cgit v0.12 From a0ea6b9acaf35b4c2dd743bf83c74bc0209efff1 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 29 Oct 2009 18:38:08 +0000 Subject: * generic/tcl.h: Changed the typedef for the mp_digit type from: typedef unsigned long mp_digit; to: typedef unsigned int mp_digit; For 32-bit builds where "long" and "int" are two names for the same thing, this is no change at all. For 64-bit builds, though, this causes the dp[] array of an mp_int to be made up of 32-bit elements instead of 64-bit elements. This is a huge improvement because details elsewhere in the mp_int implementation cause only 28 bits of each element to be actually used storing number data. Without this change bignums are over 50% wasted space on 64-bit systems. [Bug 2800740]. ***POTENTIAL INCOMPATIBILITY*** For 64-bit builds, callers of routines with (mp_digit) or (mp_digit *) arguments *will*, and callers of routines with (mp_int *) arguments *may* suffer both binary and stubs incompatibilities with Tcl releases 8.5.0 - 8.5.7. Such possibilities should be checked, and if such incompatibilities are present, suitable [package require] requirements on the Tcl release should be put in place to keep such built code [load]-ing only in Tcl interps that are compatible. --- ChangeLog | 24 ++++++++++++++++++++++++ generic/tcl.h | 8 ++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d658232..b4b29d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2009-10-29 Don Porter + + * generic/tcl.h: Changed the typedef for the mp_digit type + from: + typedef unsigned long mp_digit; + to: + typedef unsigned int mp_digit; + For 32-bit builds where "long" and "int" are two names for the same + thing, this is no change at all. For 64-bit builds, though, this + causes the dp[] array of an mp_int to be made up of 32-bit elements + instead of 64-bit elements. This is a huge improvement because details + elsewhere in the mp_int implementation cause only 28 bits of each + element to be actually used storing number data. Without this change + bignums are over 50% wasted space on 64-bit systems. [Bug 2800740]. + + ***POTENTIAL INCOMPATIBILITY*** + For 64-bit builds, callers of routines with (mp_digit) or (mp_digit *) + arguments *will*, and callers of routines with (mp_int *) arguments + *may* suffer both binary and stubs incompatibilities with Tcl releases + 8.5.0 - 8.5.7. Such possibilities should be checked, and if such + incompatibilities are present, suitable [package require] requirements + on the Tcl release should be put in place to keep such built code + [load]-ing only in Tcl interps that are compatible. + 2009-10-29 Donal K. Fellows * tests/dict.test: Make variable-clean and simplify tests by utilizing diff --git a/generic/tcl.h b/generic/tcl.h index a57d683..756015d 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.291 2009/04/29 15:24:20 patthoyts Exp $ + * RCS: @(#) $Id: tcl.h,v 1.292 2009/10/29 18:38:08 dgp Exp $ */ #ifndef _TCL @@ -2186,14 +2186,10 @@ typedef struct Tcl_Config { typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp); typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData); -#ifndef MP_INT_DECLARED typedef struct mp_int mp_int; #define MP_INT_DECLARED -#endif -#ifndef MP_DIGIT_DECLARED -typedef unsigned long mp_digit; +typedef unsigned int mp_digit; #define MP_DIGIT_DECLARED -#endif /* *---------------------------------------------------------------------------- -- cgit v0.12 From 65015eda554d17cf58f79746f53b203e10bc77a2 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Oct 2009 22:20:12 +0000 Subject: More variable cleansing --- tests/info.test | 369 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 189 insertions(+), 180 deletions(-) diff --git a/tests/info.test b/tests/info.test index f983a0c..7e89d8e 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,9 +13,9 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.68 2009/10/28 21:03:19 dgp Exp $ +# RCS: @(#) $Id: info.test,v 1.69 2009/10/29 22:20:12 dkf Exp $ -if {[lsearch [namespace children] ::tcltest] == -1} { +if {{::tcltest} ni [namespace children]} { package require tcltest 2 namespace import -force ::tcltest::* } @@ -84,7 +84,7 @@ test info-2.4 {info body option} { # would return the bytecompiled version of foo, which the catch # would then try and eval out of the foo context, accessing # compiled local indices -test info-2.5 {info body option, returning bytecompiled bodies} { +test info-2.5 {info body option, returning bytecompiled bodies} -body { catch {unset args} proc foo {args} { foreach v $args { @@ -93,8 +93,8 @@ test info-2.5 {info body option, returning bytecompiled bodies} { } } foo a - list [catch [info body foo] msg] $msg -} {1 {can't read "args": no such variable}} + eval [info body foo] +} -returnCodes error -result {can't read "args": no such variable} # Fix for problem tested for in info-2.5 caused problems when # procedure body had no string rep (i.e. was not yet bytecode) # causing an empty string to be returned [Bug #545644] @@ -108,35 +108,35 @@ proc testinfocmdcount {} { set x [info cmdcount] set y 12345 set z [info cm] - expr $z-$x + expr {$z-$x} } test info-3.1 {info cmdcount compiled} { testinfocmdcount } 4 -test info-3.2 {info cmdcount evaled} { +test info-3.2 {info cmdcount evaled} -body { set x [info cmdcount] set y 12345 set z [info cm] - expr $z-$x -} 4 -test info-3.3 {info cmdcount evaled} [info body testinfocmdcount] 4 + expr {$z-$x} +} -cleanup {unset x y z} -result 4 +test info-3.3 {info cmdcount evaled} -body [info body testinfocmdcount] -cleanup {unset x y z} -result 4 test info-3.4 {info cmdcount option} -body { info cmdcount 1 } -returnCodes error -result {wrong # args: should be "info cmdcount"} -test info-4.1 {info commands option} { +test info-4.1 {info commands option} -body { proc t1 {} {} proc t2 {} {} set x " [info commands] " list [string match {* t1 *} $x] [string match {* t2 *} $x] \ [string match {* set *} $x] [string match {* list *} $x] -} {1 1 1 1} -test info-4.2 {info commands option} { +} -cleanup {unset x} -result {1 1 1 1} +test info-4.2 {info commands option} -body { proc t1 {} {} rename t1 {} - set x [info comm] - string match {* t1 *} $x -} 0 + string match {* t1 *} \ + [info comm] +} -result 0 test info-4.3 {info commands option} { proc _t1_ {} {} proc _t2_ {} {} @@ -177,28 +177,28 @@ test info-6.1 {info default option} { proc t1 {a b {c d} {e "long default value"}} {} info default t1 a value } 0 -test info-6.2 {info default option} { +test info-6.2 {info default option} -body { proc t1 {a b {c d} {e "long default value"}} {} set value 12345 info d t1 a value - set value -} {} -test info-6.3 {info default option} { + return $value +} -cleanup {unset value} -result {} +test info-6.3 {info default option} -body { proc t1 {a b {c d} {e "long default value"}} {} info default t1 c value -} 1 -test info-6.4 {info default option} { +} -cleanup {unset value} -result 1 +test info-6.4 {info default option} -body { proc t1 {a b {c d} {e "long default value"}} {} set value 12345 info default t1 c value - set value -} d -test info-6.5 {info default option} { + return $value +} -cleanup {unset value} -result d +test info-6.5 {info default option} -body { proc t1 {a b {c d} {e "long default value"}} {} set value 12345 set x [info default t1 e value] list $x $value -} {1 {long default value}} +} -cleanup {unset x value} -result {1 {long default value}} test info-6.6 {info default option} -returnCodes error -body { info default a b } -result {wrong # args: should be "info default procname arg varname"} @@ -211,14 +211,14 @@ test info-6.8 {info default option} -returnCodes error -body { } -result {procedure "t1" doesn't have an argument "x"} test info-6.9 {info default option} -returnCodes error -setup { catch {unset a} -} -body { +} -cleanup {unset a} -body { set a(0) 88 proc t1 {a b} {} info default t1 a a } -returnCodes error -result {couldn't store default value in variable "a"} test info-6.10 {info default option} -setup { catch {unset a} -} -body { +} -cleanup {unset a} -body { set a(0) 88 proc t1 {{a 18} b} {} info default t1 a a @@ -230,27 +230,27 @@ test info-6.11 {info default option} { list [info default p x foo] $foo [info default q y bar] $bar } } {0 {} 1 27} -catch {unset a} -test info-7.1 {info exists option} { + +test info-7.1 {info exists option} -body { set value foo info exists value -} 1 -catch {unset _nonexistent_} -test info-7.2 {info exists option} { +} -cleanup {unset value} -result 1 + +test info-7.2 {info exists option} -setup {catch {unset _nonexistent_}} -body { info exists _nonexistent_ -} 0 +} -result 0 test info-7.3 {info exists option} { proc t1 {x} {return [info exists x]} t1 2 } 1 -test info-7.4 {info exists option} { +test info-7.4 {info exists option} -body { proc t1 {x} { global _nonexistent_ return [info exists _nonexistent_] } t1 2 -} 0 +} -setup {unset -nocomplain _nonexistent_} -result 0 test info-7.5 {info exists option} { proc t1 {x} { set y 47 @@ -276,29 +276,29 @@ test info-7.9 {info exists option} -body { info exists 1 2 } -returnCodes error -result {wrong # args: should be "info exists varName"} -test info-8.1 {info globals option} { +test info-8.1 {info globals option} -body { set x 1 set y 2 set value 23 set a " [info globals] " list [string match {* x *} $a] [string match {* y *} $a] \ [string match {* value *} $a] [string match {* _foobar_ *} $a] -} {1 1 1 0} -test info-8.2 {info globals option} { +} -cleanup {unset x y value a} -result {1 1 1 0} +test info-8.2 {info globals option} -body { set _xxx1 1 set _xxx2 2 lsort [info g _xxx*] -} {_xxx1 _xxx2} +} -cleanup {unset _xxx1 _xxx2} -result {_xxx1 _xxx2} test info-8.3 {info globals option} -returnCodes error -body { info globals 1 2 } -result {wrong # args: should be "info globals ?pattern?"} -test info-8.4 {info globals option: may have leading namespace qualifiers} { +test info-8.4 {info globals option: may have leading namespace qualifiers} -body { set x 0 list [info globals x] [info globals :x] [info globals ::x] [info globals :::x] [info globals ::::x] -} {x {} x x x} +} -cleanup {unset x} -result {x {} x x x} test info-8.5 {info globals option: only return existing global variables} { -setup { - catch {unset ::NO_SUCH_VAR} + unset -nocomplain ::NO_SUCH_VAR proc evalInProc script {eval $script} } -body { @@ -356,11 +356,11 @@ test info-9.9 {info level option} -body { proc t1 {x} {info level $x} t1 -3 } -returnCodes error -result {bad level "-3"} -test info-9.10 {info level option, namespaces} { - set msg [namespace eval t {info level 0}] +test info-9.10 {info level option, namespaces} -body { + namespace eval t {info level 0} +} -cleanup { namespace delete t - set msg -} {namespace eval t {info level 0}} +} -result {namespace eval t {info level 0}} test info-9.11 {info level option, aliases} -constraints knownBug -setup { proc w {x y z} {info level 0} interp alias {} a {} w a b @@ -392,16 +392,16 @@ test info-10.3 {info library option} -body { unset tcl_library info library } -returnCodes error -result {no library has been specified for Tcl} -set tcl_library $savedLibrary +set tcl_library $savedLibrary; unset savedLibrary test info-11.1 {info loaded option} -body { info loaded a b } -returnCodes error -result {wrong # args: should be "info loaded ?interp?"} -test info-11.2 {info loaded option} { - list [catch {info loaded {}}] [catch {info loaded gorp} msg] $msg -} {0 1 {could not find interpreter "gorp"}} +test info-11.2 {info loaded option} -body { + info loaded {}; info loaded gorp +} -returnCodes error -result {could not find interpreter "gorp"} -test info-12.1 {info locals option} { +test info-12.1 {info locals option} -body { set a 22 proc t1 {x y} { set b 13 @@ -412,7 +412,7 @@ test info-12.1 {info locals option} { return [info locals] } lsort [t1 23 24] -} {b c x y} +} -cleanup {unset a aa} -result {b c x y} test info-12.2 {info locals option} { proc t1 {x y} { set xx1 2 @@ -452,10 +452,10 @@ test info-13.1 {info nameofexecutable option} -returnCodes error -body { info nameofexecutable foo } -result {wrong # args: should be "info nameofexecutable"} -test info-14.1 {info patchlevel option} { +test info-14.1 {info patchlevel option} -body { set a [info patchlevel] regexp {[0-9]+\.[0-9]+([p[0-9]+)?} $a -} 1 +} -cleanup {unset a} -result 1 test info-14.2 {info patchlevel option} -returnCodes error -body { info patchlevel a } -result {wrong # args: should be "info patchlevel"} @@ -465,16 +465,16 @@ test info-14.3 {info patchlevel option} -setup { unset tcl_patchLevel info patchlevel } -cleanup { - set tcl_patchLevel $t + set tcl_patchLevel $t; unset t } -returnCodes error -result {can't read "tcl_patchLevel": no such variable} -test info-15.1 {info procs option} { +test info-15.1 {info procs option} -body { proc t1 {} {} proc t2 {} {} set x " [info procs] " list [string match {* t1 *} $x] [string match {* t2 *} $x] \ [string match {* _undefined_ *} $x] -} {1 1 0} +} -cleanup {unset x} -result {1 1 0} test info-15.2 {info procs option} { proc _tt1 {} {} proc _tt2 {} {} @@ -573,32 +573,32 @@ test info-16.5 {resetting "info script" after errors} { catch {source _nonexistent_} file tail [info script] } "info.test" -test info-16.6 {info script option} { +test info-16.6 {info script option} -body { set script [info script] list [file tail [info script]] \ [info script newname.txt] \ [file tail [info script $script]] -} [list info.test newname.txt info.test] -test info-16.7 {info script option} { +} -result [list info.test newname.txt info.test] -cleanup {unset script} +test info-16.7 {info script option} -body { set script [info script] info script newname.txt list [source $gorpfile] [file tail [info script]] \ [file tail [info script $script]] -} [list $gorpfile newname.txt info.test] +} -result [list $gorpfile newname.txt info.test] -cleanup {unset script} removeFile gorp.info set gorpfile [makeFile {list [info script] [info script foo.bar]} gorp.info] test info-16.8 {info script option} { list [source $gorpfile] [file tail [info script]] } [list [list $gorpfile foo.bar] info.test] -removeFile gorp.info +removeFile gorp.info; unset gorpfile test info-17.1 {info sharedlibextension option} -returnCodes error -body { info sharedlibextension foo } -result {wrong # args: should be "info sharedlibextension"} -test info-18.1 {info tclversion option} { +test info-18.1 {info tclversion option} -body { scan [info tclversion] "%d.%d%c" a b c -} 2 +} -cleanup {unset -nocomplain a b c} -result 2 test info-18.2 {info tclversion option} -body { info t 2 } -returnCodes error -result {wrong # args: should be "info tclversion"} @@ -608,10 +608,10 @@ test info-18.3 {info tclversion option} -body { } -returnCodes error -setup { set t $tcl_version } -cleanup { - set tcl_version $t + set tcl_version $t; unset t } -result {can't read "tcl_version": no such variable} -test info-19.1 {info vars option} { +test info-19.1 {info vars option} -body { set a 1 set b 2 proc t1 {x y} { @@ -620,8 +620,8 @@ test info-19.1 {info vars option} { return [info vars] } lsort [t1 18 19] -} {a b c x y} -test info-19.2 {info vars option} { +} -cleanup {unset a b} -result {a b c x y} +test info-19.2 {info vars option} -body { set xxx1 1 set xxx2 2 proc t1 {xxa y} { @@ -630,7 +630,7 @@ test info-19.2 {info vars option} { return [info vars x*] } lsort [t1 18 19] -} {xxa xxx1 xxx2} +} -cleanup {unset xxx1 xxx2} -result {xxa xxx1 xxx2} test info-19.3 {info vars option} { lsort [info vars] } [lsort [info globals]] @@ -669,6 +669,7 @@ test info-20.4 {info functions option} { test info-20.5 {info functions option} -returnCodes error -body { info functions raise an error } -result {wrong # args: should be "info functions ?pattern?"} +unset functions msg test info-21.1 {miscellaneous error conditions} -returnCodes error -body { info @@ -691,12 +692,11 @@ test info-21.5 {miscellaneous error conditions} -returnCodes error -body { ## info frame ## Helper -# For the more complex results we cut the file name down to remove -# path dependencies, and we use only part of the first line of the -# reported command. The latter is required because otherwise the whole -# test case may appear in some results, but the result is part of the -# testcase. An infinite string would be required to describe that. The -# cutting-down breaks this. +# For the more complex results we cut the file name down to remove path +# dependencies, and we use only part of the first line of the reported +# command. The latter is required because otherwise the whole test case may +# appear in some results, but the result is part of the testcase. An infinite +# string would be required to describe that. The cutting-down breaks this. proc reduce {frame} { set pos [lsearch -exact $frame cmd] @@ -751,7 +751,7 @@ test info-22.3 {info frame, current, relative} -match glob -body { } -result {type source line 750 file */info.test cmd {info frame 0} proc ::tcltest::RunTest} test info-22.4 {info frame, current, relative, nested} -match glob -body { set res [info frame 0] -} -result {type source line 753 file */info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -result {type source line 753 file */info.test cmd {info frame 0} proc ::tcltest::RunTest} -cleanup {unset res} test info-22.5 {info frame, current, absolute} -constraints {!singleTestInterp} -match glob -body { reduce [info frame 7] } -result {type source line 756 file info.test cmd {info frame 7} proc ::tcltest::RunTest} @@ -766,7 +766,7 @@ test info-22.8 {info frame, basic trace} -match glob -body { } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type source line 765 file info.test cmd etrace proc ::tcltest::RunTest} * {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::RunTest}} - +unset -nocomplain msg test info-23.0.0 {eval'd info frame} {!singleTestInterp} { eval {info frame} @@ -780,14 +780,14 @@ test info-23.1.0 {eval'd info frame, semi-dynamic} {!singleTestInterp} { test info-23.1.1 {eval'd info frame, semi-dynamic} -constraints {singleTestInterp} -match glob -body { eval info frame } -result {1[12]} -test info-23.2.0 {eval'd info frame, dynamic} {!singleTestInterp} { +test info-23.2.0 {eval'd info frame, dynamic} -constraints {!singleTestInterp} -body { set script {info frame} eval $script -} 8 +} -cleanup {unset script} -result 8 test info-23.2.1 {eval'd info frame, dynamic} -constraints {singleTestInterp} -match glob -body { set script {info frame} eval $script -} -result {1[12]} +} -cleanup {unset script} -result {1[12]} test info-23.3 {eval'd info frame, literal} -match glob -body { eval { info frame 0 @@ -796,11 +796,11 @@ test info-23.3 {eval'd info frame, literal} -match glob -body { test info-23.4 {eval'd info frame, semi-dynamic} { eval info frame 0 } {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} -test info-23.5 {eval'd info frame, dynamic} { +test info-23.5 {eval'd info frame, dynamic} -cleanup {unset script} -body { set script {info frame 0} eval $script -} {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} -test info-23.6 {eval'd info frame, trace} -match glob -body { +} -result {type eval line 1 cmd {info frame 0} proc ::tcltest::RunTest} +test info-23.6 {eval'd info frame, trace} -match glob -cleanup {unset script} -body { set script {etrace} join [lrange [eval $script] 0 2] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} @@ -852,7 +852,7 @@ while {$flag} { namespace eval foo {} proc ::foo::bar {} {info frame 0} set flag 0 -} +};unset flag test info-24.2 {info frame, interaction, while} -body { reduce [foo::bar] @@ -879,7 +879,7 @@ foreach var val { namespace eval foo {} proc ::foo::bar {} {info frame 0} break -} +}; unset var test info-24.4 {info frame, interaction, foreach} -body { reduce [foo::bar] @@ -959,7 +959,7 @@ test info-24.7 {info frame, interaction, dict for} { reduce [foo::bar] } {type source line 955 file info.test cmd {info frame 0} proc ::foo::bar level 0} -namespace delete foo +namespace delete foo; unset k v # ------------------------------------------------------------------------- @@ -974,7 +974,7 @@ test info-24.8 {info frame, interaction, dict with} { } {type source line 969 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo -unset thedict +unset thedict foo # ------------------------------------------------------------------------- @@ -982,14 +982,14 @@ namespace eval foo {} dict filter {foo bar} script {k v} { proc ::foo::bar {} {info frame 0} set x 1 -} +}; unset k v x test info-24.9 {info frame, interaction, dict filter} { reduce [foo::bar] } {type source line 983 file info.test cmd {info frame 0} proc ::foo::bar level 0} namespace delete foo -unset x +#unset x # ------------------------------------------------------------------------- @@ -1012,19 +1012,19 @@ rename bar {} # ------------------------------------------------------------------------- # More info-30.x test cases at the end of the file. -test info-30.0 {bs+nl in literal words} { +test info-30.0 {bs+nl in literal words} -cleanup {unset res} -body { if {1} { set res \ [reduce [info frame 0]];#1018 } - set res + return $res # This was reporting line 3 instead of the correct 4 because the # bs+nl combination is subst by the parser before the 'if' # command, and the bcc, see the word. Fixed by recording the # offsets of all bs+nl sequences in literal words, then using the # information in the bcc and other places to bump line numbers when # parsing over the location. Also affected: testcases 22.8 and 23.6. -} {type source line 1018 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -result {type source line 1018 file info.test cmd {info frame 0} proc ::tcltest::RunTest} # ------------------------------------------------------------------------- # See 24.0 - 24.5 for similar situations, using literal scripts. @@ -1033,45 +1033,45 @@ set body {set flag 0 set a c set res [info frame 0]} ;# line 3! -test info-31.0 {ns eval, script in variable} { +test info-31.0 {ns eval, script in variable} -body { namespace eval foo $body - set res -} {type eval line 3 cmd {info frame 0} level 0} -catch {namespace delete foo} - -test info-31.1 {if, script in variable} { + return $foo::res +} -result {type eval line 3 cmd {info frame 0} level 0} -cleanup { + catch {namespace delete foo} +} +test info-31.1 {if, script in variable} -cleanup {unset res a flag} -body { if 1 $body - set res -} {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} -test info-31.1a {if, script in variable} { +test info-31.1a {if, script in variable} -cleanup {unset res a flag} -body { if 1 then $body - set res -} {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} -test info-31.2 {while, script in variable} { +test info-31.2 {while, script in variable} -cleanup {unset flag res a} -body { set flag 1 while {$flag} $body - set res -} {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} # .3 - proc - scoping prevent return of result ... -test info-31.4 {foreach, script in variable} { +test info-31.4 {foreach, script in variable} -cleanup {unset var res a flag} -body { foreach var val $body set res -} {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} +} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} -test info-31.5 {for, script in variable} { +test info-31.5 {for, script in variable} -cleanup {unset flag res a} -body { set flag 1 for {} {$flag} {} $body - set res -} {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} -test info-31.6 {eval, script in variable} { +test info-31.6 {eval, script in variable} -cleanup {unset res a flag} -body { eval $body - set res -} {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -result {type eval line 3 cmd {info frame 0} proc ::tcltest::RunTest} # ------------------------------------------------------------------------- @@ -1083,7 +1083,7 @@ set body { namespace eval foo {} set x foo -switch -exact -- $x $body +switch -exact -- $x $body; unset body test info-31.7 {info frame, interaction, switch, dynamic} -body { reduce [foo::bar] @@ -1317,10 +1317,10 @@ test info-37.0 {eval pure list, single line} -match glob -body { break }] eval $cmd - set res + return $res } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type eval line 2 cmd etrace proc ::tcltest::RunTest} -* {type eval line 1 cmd foreac proc ::tcltest::RunTest}} +* {type eval line 1 cmd foreac proc ::tcltest::RunTest}} -cleanup {unset foo cmd res b c} # ------------------------------------------------------------------------- @@ -1361,7 +1361,7 @@ test info-38.1 {location information for uplevel, dv, direct-var} -match glob -b join [lrange [uplevel \#0 $script] 0 2] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type eval line 3 cmd etrace proc ::tcltest::RunTest} -* {type source line 1361 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}} +* {type source line 1361 file info.test cmd {uplevel \\#0 $script} proc ::tcltest::RunTest}} -cleanup {unset script y} test info-38.2 {location information for uplevel, dl, direct-literal} -match glob -body { join [lrange [uplevel \#0 { @@ -1370,7 +1370,7 @@ test info-38.2 {location information for uplevel, dl, direct-literal} -match glo }] 0 2] \n } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type source line 1369 file info.test cmd etrace proc ::tcltest::RunTest} -* {type source line 1367 file info.test cmd uplevel\\ \\\\ proc ::tcltest::RunTest}} +* {type source line 1367 file info.test cmd uplevel\\ \\\\ proc ::tcltest::RunTest}} -cleanup {unset y} test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match glob -body { set script { @@ -1381,7 +1381,7 @@ test info-38.3 {location information for uplevel, dpv, direct-proc-var} -match g } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type eval line 3 cmd etrace proc ::control} * {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control} -* {type source line 1380 file info.test cmd {control y $script} proc ::tcltest::RunTest}} +* {type source line 1380 file info.test cmd {control y $script} proc ::tcltest::RunTest}} -cleanup {unset script y} test info-38.4 {location information for uplevel, dpv, direct-proc-literal} -match glob -body { join [lrange [control y { @@ -1391,7 +1391,7 @@ test info-38.4 {location information for uplevel, dpv, direct-proc-literal} -mat } -result {* {type source line 728 file info.test cmd {info frame $level} proc ::etrace level 0} * {type source line 1389 file info.test cmd etrace proc ::control} * {type source line 1338 file info.test cmd {uplevel 1 $script} proc ::control} -* {type source line 1387 file info.test cmd control proc ::tcltest::RunTest}} +* {type source line 1387 file info.test cmd control proc ::tcltest::RunTest}} -cleanup {unset y} test info-38.5 {location information for uplevel, ppv, proc-proc-var} -match glob -body { join [lrange [datav] 0 4] \n @@ -1431,14 +1431,14 @@ test info-39.0 {location information not confused by literal sharing} -body { set res [::foo::bar] namespace delete ::foo join $res \n -} -result { +} -cleanup {unset res} -result { type source line 1427 file info.test cmd {info frame 0} proc ::foo::bar level 0 type source line 1428 file info.test cmd {info frame 0} proc ::foo::bar level 0} # ------------------------------------------------------------------------- # Additional tests for info-30.*, handling of continuation lines (bs+nl sequences). -test info-30.1 {bs+nl in literal words, procedure body, compiled} { +test info-30.1 {bs+nl in literal words, procedure body, compiled} -body { proc abra {} { if {1} \ { @@ -1446,34 +1446,34 @@ test info-30.1 {bs+nl in literal words, procedure body, compiled} { [reduce [info frame 0]];# line 1446 } } - set res [abra] + abra +} -cleanup { rename abra {} - set res -} {type source line 1446 file info.test cmd {info frame 0} proc ::abra level 0} +} -result {type source line 1446 file info.test cmd {info frame 0} proc ::abra level 0} test info-30.2 {bs+nl in literal words, namespace script} { namespace eval xxx { - set res \ + variable res \ [reduce [info frame 0]];# line 1457 } - set res + return $xxx::res } {type source line 1457 file info.test cmd {info frame 0} level 0} test info-30.3 {bs+nl in literal words, namespace multi-word script} { - namespace eval xxx set res \ + namespace eval xxx variable res \ [list [reduce [info frame 0]]];# line 1464 - set res + return $xxx::res } {type source line 1464 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.4 {bs+nl in literal words, eval script} { +test info-30.4 {bs+nl in literal words, eval script} -cleanup {unset res} -body { eval { set ::res \ [reduce [info frame 0]];# line 1471 } - set res -} {type source line 1471 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -result {type source line 1471 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.5 {bs+nl in literal words, eval script, with nested words} { +test info-30.5 {bs+nl in literal words, eval script, with nested words} -body { eval { if {1} \ { @@ -1481,58 +1481,58 @@ test info-30.5 {bs+nl in literal words, eval script, with nested words} { [reduce [info frame 0]];# line 1481 } } - set res -} {type source line 1481 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -cleanup {unset res} -result {type source line 1481 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.6 {bs+nl in computed word} { +test info-30.6 {bs+nl in computed word} -cleanup {unset res} -body { set res "\ [reduce [info frame 0]]";# line 1489 -} { type source line 1489 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -result { type source line 1489 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.7 {bs+nl in computed word, in proc} { +test info-30.7 {bs+nl in computed word, in proc} -body { proc abra {} { return "\ [reduce [info frame 0]]";# line 1495 } - set res [abra] + abra +} -cleanup { rename abra {} - set res -} { type source line 1495 file info.test cmd {info frame 0} proc ::abra level 0} +} -result { type source line 1495 file info.test cmd {info frame 0} proc ::abra level 0} -test info-30.8 {bs+nl in computed word, nested eval} { +test info-30.8 {bs+nl in computed word, nested eval} -body { eval { set \ res "\ [reduce [info frame 0]]";# line 1506 } -} { type source line 1506 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -cleanup {unset res} -result { type source line 1506 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.9 {bs+nl in computed word, nested eval} { +test info-30.9 {bs+nl in computed word, nested eval} -body { eval { set \ res "\ [reduce \ [info frame 0]]";# line 1515 } -} { type source line 1515 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -cleanup {unset res} -result { type source line 1515 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.10 {bs+nl in computed word, key to array} { +test info-30.10 {bs+nl in computed word, key to array} -body { set tmp([set \ res "\ [reduce \ [info frame 0]]"]) x ; #1523 unset tmp set res -} { type source line 1523 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -cleanup {unset res} -result { type source line 1523 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.11 {bs+nl in subst arguments} { +test info-30.11 {bs+nl in subst arguments} -body { subst {[set \ res "\ [reduce \ [info frame 0]]"]} ; #1532 -} { type source line 1532 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -cleanup {unset res} -result { type source line 1532 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.12 {bs+nl in computed word, nested eval} { +test info-30.12 {bs+nl in computed word, nested eval} -body { eval { set \ res "\ @@ -1540,9 +1540,9 @@ test info-30.12 {bs+nl in computed word, nested eval} { [reduce \ [info frame 0]]";# line 1541 } -} { type source line 1541 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +} -cleanup {unset res x} -result { type source line 1541 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.13 {bs+nl in literal words, uplevel script, with nested words} { +test info-30.13 {bs+nl in literal words, uplevel script, with nested words} -body { uplevel #0 { if {1} \ { @@ -1550,8 +1550,8 @@ test info-30.13 {bs+nl in literal words, uplevel script, with nested words} { [reduce [info frame 0]];# line 1550 } } - set res -} {type source line 1550 file info.test cmd {info frame 0} proc ::tcltest::RunTest} + return $res +} -cleanup {unset res} -result {type source line 1550 file info.test cmd {info frame 0} proc ::tcltest::RunTest} test info-30.14 {bs+nl, literal word, uplevel through proc} { proc abra {script} { @@ -1775,52 +1775,60 @@ test info-30.39 {TIP 280 for compiled [subst]} { [format %s {}]\ [reduce [info frame 0]]} ; # 1776 } { type source line 1776 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.40 {TIP 280 for compiled [subst]} { +test info-30.40 {TIP 280 for compiled [subst]} -setup { unset -nocomplain empty +} -body { set empty {} - subst {$empty[reduce [info frame 0]]} ; # 1781 -} {type source line 1781 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.41 {TIP 280 for compiled [subst]} { + subst {$empty[reduce [info frame 0]]} ; # 1782 +} -cleanup { + unset empty +} -result {type source line 1782 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.41 {TIP 280 for compiled [subst]} -setup { unset -nocomplain empty +} -body { set empty {} subst {$empty -[reduce [info frame 0]]} ; # 1787 -} { -type source line 1787 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.42 {TIP 280 for compiled [subst]} { +[reduce [info frame 0]]} ; # 1791 +} -cleanup { + unset empty +} -result { +type source line 1791 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.42 {TIP 280 for compiled [subst]} -setup { unset -nocomplain empty - set empty {} - subst {$empty\ -[reduce [info frame 0]]} ; # 1794 -} { type source line 1794 file info.test cmd {info frame 0} proc ::tcltest::RunTest} -test info-30.43 {TIP 280 for compiled [subst]} { +} -body { + set empty {}; subst {$empty\ +[reduce [info frame 0]]} ; # 1800 +} -cleanup { + unset empty +} -result { type source line 1800 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +test info-30.43 {TIP 280 for compiled [subst]} -body { unset -nocomplain a\nb set a\nb {} subst {${a -b}[reduce [info frame 0]]} ; # 1800 -} {type source line 1800 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +b}[reduce [info frame 0]]} ; # 1808 +} -cleanup {unset a\nb} -result {type source line 1808 file info.test cmd {info frame 0} proc ::tcltest::RunTest} test info-30.44 {TIP 280 for compiled [subst]} { unset -nocomplain a set a(\n) {} subst {$a( -)[reduce [info frame 0]]} ; # 1806 -} {type source line 1806 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +)[reduce [info frame 0]]} ; # 1814 +} {type source line 1814 file info.test cmd {info frame 0} proc ::tcltest::RunTest} test info-30.45 {TIP 280 for compiled [subst]} { unset -nocomplain a set a() {} subst {$a([ -return -level 0])[reduce [info frame 0]]} ; # 1812 -} {type source line 1812 file info.test cmd {info frame 0} proc ::tcltest::RunTest} +return -level 0])[reduce [info frame 0]]} ; # 1820 +} {type source line 1820 file info.test cmd {info frame 0} proc ::tcltest::RunTest} test info-30.46 {TIP 280 for compiled [subst]} { unset -nocomplain a - set a(1817) YES; set a(1816) 1816; set a(1818) 1818 - subst {$a([dict get [info frame 0] line])} ; # 1817 + set a(1825) YES; set a(1824) 1824; set a(1826) 1826 + subst {$a([dict get [info frame 0] line])} ; # 1825 } YES test info-30.47 {TIP 280 for compiled [subst]} { unset -nocomplain a - set a(\n1823) YES; set a(\n1822) 1822; set a(\n1824) 1824 + set a(\n1831) YES; set a(\n1830) 1830; set a(\n1832) 1832 subst {$a( -[dict get [info frame 0] line])} ; # 1823 +[dict get [info frame 0] line])} ; # 1831 } YES unset -nocomplain a @@ -1828,8 +1836,9 @@ test info-30.48 {Bug 2850901} testevalex { testevalex {return -level 0 [format %s {} ][reduce [info frame 0]]} ; # line 2 of the eval } {type eval line 2 cmd {info frame 0} proc ::tcltest::RunTest} - + # ------------------------------------------------------------------------- +unset -nocomplain res # cleanup catch {namespace delete test_ns_info1 test_ns_info2} -- cgit v0.12 From ee8dc99cffadf1e777695523f3838774648707df Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 30 Oct 2009 11:13:21 +0000 Subject: Cleanup non-writable test directory on Windows. When creating the notwritabledir we deny the current user access to delete the file. We must grant this right when we cleanup. Required on Windows 7 when the user does not automatically have administrator rights. --- ChangeLog | 7 +++++++ tests/tcltest.test | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b4b29d9..6bc2a22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-30 Pat Thoyts + + * tests/tcltest.test: When creating the notwritabledir we deny + the current user access to delete the file. We must grant this + right when we cleanup. Required on Windows 7 when the user does + not automatically have administrator rights. + 2009-10-29 Don Porter * generic/tcl.h: Changed the typedef for the mp_digit type diff --git a/tests/tcltest.test b/tests/tcltest.test index 637612d..f235fac 100755 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -6,7 +6,7 @@ # Copyright (c) 2000 by Ajuba Solutions # All rights reserved. # -# RCS: @(#) $Id: tcltest.test,v 1.55 2007/01/18 22:09:44 dkf Exp $ +# RCS: @(#) $Id: tcltest.test,v 1.56 2009/10/30 11:13:21 patthoyts Exp $ # Note that there are several places where the value of # tcltest::currentFailure is stored/reset in the -setup/-cleanup @@ -724,6 +724,7 @@ switch $::tcl_platform(platform) { file attributes $notWriteableDir -permissions 777 } default { + catch {testchmod 777 $notWriteableDir} catch {file attributes $notWriteableDir -readonly 0} } } -- cgit v0.12 From fa6b7f2da5eb55b89dee6899b3421c3490bed77c Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Oct 2009 16:28:02 +0000 Subject: More variable hygiene. --- tests/while.test | 375 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 229 insertions(+), 146 deletions(-) diff --git a/tests/while.test b/tests/while.test index 5aadd10..323e160 100644 --- a/tests/while.test +++ b/tests/while.test @@ -1,18 +1,18 @@ # Commands covered: while # -# This file contains a collection of tests for one or more of the Tcl -# built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# This file contains a collection of tests for one or more of the Tcl built-in +# commands. Sourcing this file into Tcl runs the tests and generates output +# for errors. No output means no errors were found. # # Copyright (c) 1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: while.test,v 1.13 2006/10/09 19:15:45 msofer Exp $ +# RCS: @(#) $Id: while.test,v 1.14 2009/10/30 16:28:02 dkf Exp $ -if {[lsearch [namespace children] ::tcltest] == -1} { +if {"::tcltest" ni [namespace children]} { package require tcltest 2 namespace import -force ::tcltest::* } @@ -22,29 +22,31 @@ if {[lsearch [namespace children] ::tcltest] == -1} { catch {unset i} catch {unset a} -test while-1.1 {TclCompileWhileCmd: missing test expression} { - catch {while } msg - set msg -} {wrong # args: should be "while test command"} +test while-1.1 {TclCompileWhileCmd: missing test expression} -body { + while +} -returnCodes error -result {wrong # args: should be "while test command"} test while-1.2 {TclCompileWhileCmd: error in test expression} -body { set i 0 - catch {while {$i<} break} msg - set ::errorInfo + catch {while {$i<} break} + return $::errorInfo +} -cleanup { + unset i } -match glob -result {*"while {$i<} break"} -test while-1.3 {TclCompileWhileCmd: error in test expression} { - set err [catch {while {"a"+"b"} {error "loop aborted"}} msg] - list $err $msg -} {1 {can't use non-numeric string as operand of "+"}} -test while-1.4 {TclCompileWhileCmd: multiline test expr} { +test while-1.3 {TclCompileWhileCmd: error in test expression} -body { + while {"a"+"b"} {error "loop aborted"} +} -returnCodes error -result {can't use non-numeric string as operand of "+"} +test while-1.4 {TclCompileWhileCmd: multiline test expr} -body { set value 1 while {($tcl_platform(platform) != "foobar1") && \ ($tcl_platform(platform) != "foobar2")} { incr value break } - set value -} {2} -test while-1.5 {TclCompileWhileCmd: non-numeric boolean test expr} { + return $value +} -cleanup { + unset value +} -result {2} +test while-1.5 {TclCompileWhileCmd: non-numeric boolean test expr} -body { set value 1 while {"true"} { incr value; @@ -52,25 +54,28 @@ test while-1.5 {TclCompileWhileCmd: non-numeric boolean test expr} { break; } } - set value -} 6 + return $value +} -cleanup { + unset value +} -result 6 test while-1.6 {TclCompileWhileCmd: test expr is enclosed in quotes} { set i 0 while "$i > 5" {} } {} -test while-1.7 {TclCompileWhileCmd: missing command body} { +test while-1.7 {TclCompileWhileCmd: missing command body} -body { set i 0 - catch {while {$i < 5} } msg - set msg -} {wrong # args: should be "while test command"} + while {$i < 5} +} -returnCodes error -result {wrong # args: should be "while test command"} test while-1.8 {TclCompileWhileCmd: error compiling command body} -body { set i 0 - catch {while {$i < 5} {set}} msg - set ::errorInfo -} -match glob -result {wrong # args: should be "set varName ?newValue?" + catch {while {$i < 5} {set}} + return $::errorInfo +} -match glob -cleanup { + unset i +} -result {wrong # args: should be "set varName ?newValue?" while *ing "set"*} -test while-1.9 {TclCompileWhileCmd: simple command body} { +test while-1.9 {TclCompileWhileCmd: simple command body} -body { set a {} set i 1 while {$i<6} { @@ -78,27 +83,34 @@ test while-1.9 {TclCompileWhileCmd: simple command body} { set a [concat $a $i] incr i } - set a -} {1 2 3} -test while-1.10 {TclCompileWhileCmd: command body in quotes} { + return $a +} -cleanup { + unset a i +} -result {1 2 3} +test while-1.10 {TclCompileWhileCmd: command body in quotes} -body { set a {} set i 1 while {$i<6} "append a x; incr i" - set a -} {xxxxx} -test while-1.11 {TclCompileWhileCmd: computed command body} { + return $a +} -cleanup { + unset a i +} -result {xxxxx} +test while-1.11 {TclCompileWhileCmd: computed command body} -setup { catch {unset x1} catch {unset bb} catch {unset x2} +} -body { set x1 {append a x1; } set bb {break} set x2 {; append a x2; incr i} set a {} set i 1 while {$i<6} $x1$bb$x2 - set a -} {x1} -test while-1.12 {TclCompileWhileCmd: long command body} { + return $a +} -cleanup { + unset x1 bb x2 a i +} -result {x1} +test while-1.12 {TclCompileWhileCmd: long command body} -body { set a {} set i 1 while {$i<6} { @@ -132,22 +144,28 @@ test while-1.12 {TclCompileWhileCmd: long command body} { set a [concat $a $i] incr i } - set a -} {1 2 3} -test while-1.13 {TclCompileWhileCmd: while command result} { + return $a +} -cleanup { + unset a i +} -result {1 2 3} +test while-1.13 {TclCompileWhileCmd: while command result} -body { set i 0 set a [while {$i < 5} {incr i}] - set a -} {} -test while-1.14 {TclCompileWhileCmd: while command result} { + return $a +} -cleanup { + unset a i +} -result {} +test while-1.14 {TclCompileWhileCmd: while command result} -body { set i 0 set a [while {$i < 5} {if $i==3 break; incr i}] - set a -} {} + return $a +} -cleanup { + unset a i +} -result {} # Check "while" and "continue". -test while-2.1 {continue tests} { +test while-2.1 {continue tests} -body { set a {} set i 1 while {$i <= 4} { @@ -155,9 +173,11 @@ test while-2.1 {continue tests} { if {$i == 3} continue set a [concat $a $i] } - set a -} {2 4 5} -test while-2.2 {continue tests} { + return $a +} -cleanup { + unset a i +} -result {2 4 5} +test while-2.2 {continue tests} -body { set a {} set i 1 while {$i <= 4} { @@ -165,9 +185,11 @@ test while-2.2 {continue tests} { if {$i != 2} continue set a [concat $a $i] } - set a -} {2} -test while-2.3 {continue tests, nested loops} { + return $a +} -cleanup { + unset a i +} -result {2} +test while-2.3 {continue tests, nested loops} -body { set msg {} set i 1 while {$i <= 4} { @@ -179,9 +201,11 @@ test while-2.3 {continue tests, nested loops} { set msg [concat $msg "$i.$a"] } } - set msg -} {2.2 2.3 3.2 4.2 5.2} -test while-2.4 {continue tests, long command body} { + return $msg +} -cleanup { + unset a i msg +} -result {2.2 2.3 3.2 4.2 5.2} +test while-2.4 {continue tests, long command body} -body { set a {} set i 1 while {$i<6} { @@ -216,12 +240,14 @@ test while-2.4 {continue tests, long command body} { set a [concat $a $i] incr i } - set a -} {1 3} + return $a +} -cleanup { + unset a i +} -result {1 3} # Check "while" and "break". -test while-3.1 {break tests} { +test while-3.1 {break tests} -body { set a {} set i 1 while {$i <= 4} { @@ -229,9 +255,11 @@ test while-3.1 {break tests} { set a [concat $a $i] incr i } - set a -} {1 2} -test while-3.2 {break tests, nested loops} { + return $a +} -cleanup { + unset a i +} -result {1 2} +test while-3.2 {break tests, nested loops} -body { set msg {} set i 1 while {$i <= 4} { @@ -243,9 +271,11 @@ test while-3.2 {break tests, nested loops} { } incr i } - set msg -} {1.1 1.2 2.1 3.1 4.1} -test while-3.3 {break tests, long command body} { + return $msg +} -cleanup { + unset a i msg +} -result {1.1 1.2 2.1 3.1 4.1} +test while-3.3 {break tests, long command body} -body { set a {} set i 1 while {$i<6} { @@ -281,36 +311,42 @@ test while-3.3 {break tests, long command body} { set a [concat $a $i] incr i } - set a -} {1 3} + return $a +} -cleanup { + unset a i +} -result {1 3} # Check "while" with computed command names. -test while-4.1 {while and computed command names} { +test while-4.1 {while and computed command names} -body { set i 0 set z while $z {$i < 10} { incr i } - set i -} 10 -test while-4.2 {while (not compiled): missing test expression} { + return $i +} -cleanup { + unset i z +} -result 10 +test while-4.2 {while (not compiled): missing test expression} -body { set z while - catch {$z } msg - set msg -} {wrong # args: should be "while test command"} + $z +} -returnCodes error -cleanup { + unset z +} -result {wrong # args: should be "while test command"} test while-4.3 {while (not compiled): error in test expression} -body { set i 0 set z while - catch {$z {$i<} {set x 1}} msg - set ::errorInfo -} -match glob -result {*"$z {$i<} {set x 1}"} -test while-4.4 {while (not compiled): error in test expression} { + catch {$z {$i<} {set x 1}} + return $::errorInfo +} -match glob -cleanup { + unset i z +} -result {*"$z {$i<} {set x 1}"} +test while-4.4 {while (not compiled): error in test expression} -body { set z while - set err [catch {$z {"a"+"b"} {error "loop aborted"}} msg] - list $err $msg -} {1 {can't use non-numeric string as operand of "+"}} -test while-4.5 {while (not compiled): multiline test expr} { + $z {"a"+"b"} {error "loop aborted"} +} -returnCodes error -result {can't use non-numeric string as operand of "+"} +test while-4.5 {while (not compiled): multiline test expr} -body { set value 1 set z while $z {($tcl_platform(platform) != "foobar1") && \ @@ -318,9 +354,11 @@ test while-4.5 {while (not compiled): multiline test expr} { incr value break } - set value -} {2} -test while-4.6 {while (not compiled): non-numeric boolean test expr} { + return $value +} -cleanup { + unset value z +} -result {2} +test while-4.6 {while (not compiled): non-numeric boolean test expr} -body { set value 1 set z while $z {"true"} { @@ -329,31 +367,38 @@ test while-4.6 {while (not compiled): non-numeric boolean test expr} { break; } } - set value -} 6 -test while-4.7 {while (not compiled): test expr is enclosed in quotes} { + return $value +} -cleanup { + unset value z +} -result 6 +test while-4.7 {while (not compiled): test expr is enclosed in quotes} -body { set i 0 set z while $z "$i > 5" {} -} {} -test while-4.8 {while (not compiled): missing command body} { +} -cleanup { + unset i z +} -result {} +test while-4.8 {while (not compiled): missing command body} -body { set i 0 set z while - catch {$z {$i < 5} } msg - set msg -} {wrong # args: should be "while test command"} + $z {$i < 5} +} -returnCodes error -cleanup { + unset i z +} -result {wrong # args: should be "while test command"} test while-4.9 {while (not compiled): error compiling command body} -body { set i 0 set z while - catch {$z {$i < 5} {set}} msg + catch {$z {$i < 5} {set}} set ::errorInfo -} -match glob -result {wrong # args: should be "set varName ?newValue?" +} -match glob -cleanup { + unset i z +} -result {wrong # args: should be "set varName ?newValue?" while *ing "set" ("while" body line 1) invoked from within "$z {$i < 5} {set}"} -test while-4.10 {while (not compiled): simple command body} { +test while-4.10 {while (not compiled): simple command body} -body { set a {} set i 1 set z while @@ -362,29 +407,36 @@ test while-4.10 {while (not compiled): simple command body} { set a [concat $a $i] incr i } - set a -} {1 2 3} -test while-4.11 {while (not compiled): command body in quotes} { + return $a +} -cleanup { + unset a i z +} -result {1 2 3} +test while-4.11 {while (not compiled): command body in quotes} -body { set a {} set i 1 set z while $z {$i<6} "append a x; incr i" - set a -} {xxxxx} -test while-4.12 {while (not compiled): computed command body} { - set z while + return $a +} -cleanup { + unset a i z +} -result {xxxxx} +test while-4.12 {while (not compiled): computed command body} -setup { catch {unset x1} catch {unset bb} catch {unset x2} +} -body { + set z while set x1 {append a x1; } set bb {break} set x2 {; append a x2; incr i} set a {} set i 1 $z {$i<6} $x1$bb$x2 - set a -} {x1} -test while-4.13 {while (not compiled): long command body} { + return $a +} -cleanup { + unset z x1 bb x2 a i +} -result {x1} +test while-4.13 {while (not compiled): long command body} -body { set a {} set z while set i 1 @@ -419,33 +471,41 @@ test while-4.13 {while (not compiled): long command body} { set a [concat $a $i] incr i } - set a -} {1 2 3} -test while-4.14 {while (not compiled): while command result} { + return $a +} -cleanup { + unset a i z +} -result {1 2 3} +test while-4.14 {while (not compiled): while command result} -body { set i 0 set z while set a [$z {$i < 5} {incr i}] - set a -} {} -test while-4.15 {while (not compiled): while command result} { + return $a +} -cleanup { + unset a i z +} -result {} +test while-4.15 {while (not compiled): while command result} -body { set i 0 set z while set a [$z {$i < 5} {if $i==3 break; incr i}] - set a -} {} + return $a +} -cleanup { + unset a i z +} -result {} # Check "break" with computed command names. -test while-5.1 {break and computed command names} { +test while-5.1 {break and computed command names} -body { set i 0 set z break while 1 { if {$i > 10} $z incr i } - set i -} 11 -test while-5.2 {break tests with computed command names} { + return $i +} -cleanup { + unset i z +} -result 11 +test while-5.2 {break tests with computed command names} -body { set a {} set i 1 set z break @@ -454,9 +514,11 @@ test while-5.2 {break tests with computed command names} { set a [concat $a $i] incr i } - set a -} {1 2} -test while-5.3 {break tests, nested loops with computed command names} { + return $a +} -cleanup { + unset a i z +} -result {1 2} +test while-5.3 {break tests, nested loops with computed command names} -body { set msg {} set i 1 set z break @@ -469,9 +531,11 @@ test while-5.3 {break tests, nested loops with computed command names} { } incr i } - set msg -} {1.1 1.2 2.1 3.1 4.1} -test while-5.4 {break tests, long command body with computed command names} { + return $msg +} -cleanup { + unset a i z msg +} -result {1.1 1.2 2.1 3.1 4.1} +test while-5.4 {break tests, long command body with computed command names} -body { set a {} set i 1 set z break @@ -508,12 +572,14 @@ test while-5.4 {break tests, long command body with computed command names} { set a [concat $a $i] incr i } - set a -} {1 3} + return $a +} -cleanup { + unset a i z +} -result {1 3} # Check "continue" with computed command names. -test while-6.1 {continue and computed command names} { +test while-6.1 {continue and computed command names} -body { set i 0 set z continue while 1 { @@ -521,9 +587,11 @@ test while-6.1 {continue and computed command names} { if {$i < 10} $z break } - set i -} 10 -test while-6.2 {continue tests} { + return $i +} -cleanup { + unset i z +} -result 10 +test while-6.2 {continue tests} -body { set a {} set i 1 set z continue @@ -532,9 +600,11 @@ test while-6.2 {continue tests} { if {$i == 3} $z set a [concat $a $i] } - set a -} {2 4 5} -test while-6.3 {continue tests with computed command names} { + return $a +} -cleanup { + unset a i z +} -result {2 4 5} +test while-6.3 {continue tests with computed command names} -body { set a {} set i 1 set z continue @@ -543,9 +613,11 @@ test while-6.3 {continue tests with computed command names} { if {$i != 2} $z set a [concat $a $i] } - set a -} {2} -test while-6.4 {continue tests, nested loops with computed command names} { + return $a +} -cleanup { + unset a i z +} -result {2} +test while-6.4 {continue tests, nested loops with computed command names} -body { set msg {} set i 1 set z continue @@ -558,9 +630,11 @@ test while-6.4 {continue tests, nested loops with computed command names} { set msg [concat $msg "$i.$a"] } } - set msg -} {2.2 2.3 3.2 4.2 5.2} -test while-6.5 {continue tests, long command body with computed command names} { + return $msg +} -cleanup { + unset a i z msg +} -result {2.2 2.3 3.2 4.2 5.2} +test while-6.5 {continue tests, long command body with computed command names} -body { set a {} set i 1 set z continue @@ -596,12 +670,14 @@ test while-6.5 {continue tests, long command body with computed command names} { set a [concat $a $i] incr i } - set a -} {1 3} + return $a +} -cleanup { + unset a i z +} -result {1 3} # Test for incorrect "double evaluation" semantics -test while-7.1 {delayed substitution of body} { +test while-7.1 {delayed substitution of body} -body { set i 0 while {[incr i] < 10} " set result $i @@ -611,11 +687,18 @@ test while-7.1 {delayed substitution of body} { while {[incr i] < 10} " set result $i " - set result + return $result } append result [p] -} {00} +} -cleanup { + unset result i +} -result {00} # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# fill-column: 78 +# End: -- cgit v0.12 From c2fed0e61c584f3a6d54a0c4479d43d8982505db Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 31 Oct 2009 20:18:43 +0000 Subject: [Bug 2889593]: Make [expr round()] give the right error. --- ChangeLog | 13 +++++++++---- generic/tclBasic.c | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bc2a22..a01a097 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,14 @@ +2009-10-31 Donal K. Fellows + + * generic/tclBasic.c (ExprRoundFunc): [Bug 2889593]: Correctly report + the expected number of arguments when generating an error for round(). + 2009-10-30 Pat Thoyts - * tests/tcltest.test: When creating the notwritabledir we deny - the current user access to delete the file. We must grant this - right when we cleanup. Required on Windows 7 when the user does - not automatically have administrator rights. + * tests/tcltest.test: When creating the notwritabledir we deny the + current user access to delete the file. We must grant this right when + we cleanup. Required on Windows 7 when the user does not automatically + have administrator rights. 2009-10-29 Don Porter diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7064b86..68fe439 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.404 2009/09/11 20:13:27 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.405 2009/10/31 20:18:43 dkf Exp $ */ #include "tclInt.h" @@ -7710,7 +7710,7 @@ ExprRoundFunc( int type; if (objc != 2) { - MathFuncWrongNumArgs(interp, 1, objc, objv); + MathFuncWrongNumArgs(interp, 2, objc, objv); return TCL_ERROR; } -- cgit v0.12 From e19206dbbcf18caa8799630e9e9fcc73f7b5c32a Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 1 Nov 2009 00:26:02 +0000 Subject: Improve with more explanation of what's going on. --- doc/coroutine.n | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/doc/coroutine.n b/doc/coroutine.n index 08662c8..f310e13 100644 --- a/doc/coroutine.n +++ b/doc/coroutine.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: coroutine.n,v 1.2 2009/03/26 10:43:47 dkf Exp $ +'\" RCS: @(#) $Id: coroutine.n,v 1.3 2009/11/01 00:26:02 dkf Exp $ '\" .so man.macros .TH coroutine n 8.6 Tcl "Tcl Built-In Commands" @@ -42,6 +42,11 @@ the name of the current coroutine can be retrieved by using \fBinfo coroutine\fR. If there are deletion traces on variables in the coroutine's implementation, they will fire at the point when the coroutine is explicitly deleted (or, naturally, if the command returns conventionally). +.PP +At the point when \fIcommand\fR is called, the current namespace will be the +global namespace and there will be no stack frames above it (in the sense of +\fBupvar\fR and \fBuplevel\fR). However, which command to call will be +determined in the namespace that the \fBcoroutine\fR command was called from. .SH EXAMPLES .PP This example shows a coroutine that will produce an infinite sequence of @@ -104,6 +109,43 @@ for {set i 1} {$i <= 20} {incr i} { puts "prime#$i = [\fIeratosthenes\fR]" } .CE +.SS "DETAILED SEMANTICS" +.PP +This example demonstrates that coroutines start from the global namespace, and +that\fIcommand\fR resolution happens before the coroutine stack is created. +.PP +.CS +proc report {where level} { + # Where was the caller called from? + set ns [uplevel 2 {namespace current}] + \fByield\fR "made $where $level context=$ns name=[info coroutine]" +} +proc example {} { + report outer [info level] +} +namespace eval demo { + proc example {} { + report inner [info level] + } + proc makeExample {} { + puts "making from [info level]" + puts [coroutine coroEg example] + } + makeExample +} +.CE +.PP +Which produces the output below. In particular, we can see that stack +manipulation has occurred (comparing the levels from the first and second +line) and that the parent level in the coroutine is the global namespace. We +can also see that coroutine names are local to the current namespace if not +qualified, and that coroutines may yield at depth (e.g., in called +procedures). +.PP +.CS +making from 2 +made inner 1 context=:: name=::demo::coroEg +.CE .SH "SEE ALSO" apply(n), info(n), proc(n), return(n) .SH KEYWORDS -- cgit v0.12 From 61be21c8b6c66bc992de68777ad798b24cd55df2 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 1 Nov 2009 00:27:29 +0000 Subject: Minor formatting fix. --- doc/coroutine.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/coroutine.n b/doc/coroutine.n index f310e13..4985e52 100644 --- a/doc/coroutine.n +++ b/doc/coroutine.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: coroutine.n,v 1.3 2009/11/01 00:26:02 dkf Exp $ +'\" RCS: @(#) $Id: coroutine.n,v 1.4 2009/11/01 00:27:29 dkf Exp $ '\" .so man.macros .TH coroutine n 8.6 Tcl "Tcl Built-In Commands" @@ -129,7 +129,7 @@ namespace eval demo { } proc makeExample {} { puts "making from [info level]" - puts [coroutine coroEg example] + puts [\fBcoroutine\fR coroEg example] } makeExample } -- cgit v0.12 From 4320ee4771f6a07f9a4a064f02de3e117df909ca Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 1 Nov 2009 12:10:17 +0000 Subject: Apply a bit more polish --- doc/tcltest.n | 463 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 294 insertions(+), 169 deletions(-) diff --git a/doc/tcltest.n b/doc/tcltest.n index 82691f9..d6b00e5 100644 --- a/doc/tcltest.n +++ b/doc/tcltest.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tcltest.n,v 1.57 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: tcltest.n,v 1.58 2009/11/01 12:10:17 dkf Exp $ '\" .so man.macros .TH "tcltest" n 2.3 tcltest "Tcl Bundled Packages" @@ -18,52 +18,52 @@ tcltest \- Test harness support code and utilities .SH SYNOPSIS .nf -\fBpackage require tcltest ?2.3?\fR +\fBpackage require tcltest\fR ?\fB2.3\fR? .sp -\fBtcltest::test \fIname description ?-option value ...?\fR -\fBtcltest::test \fIname description ?constraints? body result\fR +\fBtcltest::test \fIname description\fR ?\fI\-option value ...\fR? +\fBtcltest::test \fIname description\fR ?\fIconstraints\fR? \fIbody result\fR .sp \fBtcltest::loadTestedCommands\fR -\fBtcltest::makeDirectory \fIname ?directory?\fR -\fBtcltest::removeDirectory \fIname ?directory?\fR -\fBtcltest::makeFile \fIcontents name ?directory?\fR -\fBtcltest::removeFile \fIname ?directory?\fR -\fBtcltest::viewFile \fIname ?directory?\fR -\fBtcltest::cleanupTests \fI?runningMultipleTests?\fR +\fBtcltest::makeDirectory \fIname\fR ?\fIdirectory\fR? +\fBtcltest::removeDirectory \fIname\fR ?\fIdirectory\fR? +\fBtcltest::makeFile \fIcontents name\fR ?\fIdirectory\fR? +\fBtcltest::removeFile \fIname\fR ?\fIdirectory\fR? +\fBtcltest::viewFile \fIname\fR ?\fIdirectory\fR? +\fBtcltest::cleanupTests \fR?\fIrunningMultipleTests\fR? \fBtcltest::runAllTests\fR .sp \fBtcltest::configure\fR -\fBtcltest::configure \fIoption\fR -\fBtcltest::configure \fIoption value ?-option value ...?\fR +\fBtcltest::configure \fI\-option\fR +\fBtcltest::configure \fI\-option value\fR ?\fI-option value ...\fR? \fBtcltest::customMatch \fImode command\fR -\fBtcltest::testConstraint \fIconstraint ?value?\fR -\fBtcltest::outputChannel \fI?channelID?\fR -\fBtcltest::errorChannel \fI?channelID?\fR -\fBtcltest::interpreter \fI?interp?\fR +\fBtcltest::testConstraint \fIconstraint\fR ?\fIvalue\fR? +\fBtcltest::outputChannel \fR?\fIchannelID\fR? +\fBtcltest::errorChannel \fR?\fIchannelID\fR? +\fBtcltest::interpreter \fR?\fIinterp\fR? .sp -\fBtcltest::debug \fI?level?\fR -\fBtcltest::errorFile \fI?filename?\fR -\fBtcltest::limitConstraints \fI?boolean?\fR -\fBtcltest::loadFile \fI?filename?\fR -\fBtcltest::loadScript \fI?script?\fR -\fBtcltest::match \fI?patternList?\fR -\fBtcltest::matchDirectories \fI?patternList?\fR -\fBtcltest::matchFiles \fI?patternList?\fR -\fBtcltest::outputFile \fI?filename?\fR -\fBtcltest::preserveCore \fI?level?\fR -\fBtcltest::singleProcess \fI?boolean?\fR -\fBtcltest::skip \fI?patternList?\fR -\fBtcltest::skipDirectories \fI?patternList?\fR -\fBtcltest::skipFiles \fI?patternList?\fR -\fBtcltest::temporaryDirectory \fI?directory?\fR -\fBtcltest::testsDirectory \fI?directory?\fR -\fBtcltest::verbose \fI?level?\fR +\fBtcltest::debug \fR?\fIlevel\fR? +\fBtcltest::errorFile \fR?\fIfilename\fR? +\fBtcltest::limitConstraints \fR?\fIboolean\fR? +\fBtcltest::loadFile \fR?\fIfilename\fR? +\fBtcltest::loadScript \fR?\fIscript\fR? +\fBtcltest::match \fR?\fIpatternList\fR? +\fBtcltest::matchDirectories \fR?\fIpatternList\fR? +\fBtcltest::matchFiles \fR?\fIpatternList\fR? +\fBtcltest::outputFile \fR?\fIfilename\fR? +\fBtcltest::preserveCore \fR?\fIlevel\fR? +\fBtcltest::singleProcess \fR?\fIboolean\fR? +\fBtcltest::skip \fR?\fIpatternList\fR? +\fBtcltest::skipDirectories \fR?\fIpatternList\fR? +\fBtcltest::skipFiles \fR?\fIpatternList\fR? +\fBtcltest::temporaryDirectory \fR?\fIdirectory\fR? +\fBtcltest::testsDirectory \fR?\fIdirectory\fR? +\fBtcltest::verbose \fR?\fIlevel\fR? .sp \fBtcltest::test \fIname description optionList\fR \fBtcltest::bytestring \fIstring\fR \fBtcltest::normalizeMsg \fImsg\fR \fBtcltest::normalizePath \fIpathVar\fR -\fBtcltest::workingDirectory \fI?dir?\fR +\fBtcltest::workingDirectory \fR?\fIdir\fR? .fi .BE .SH DESCRIPTION @@ -92,7 +92,8 @@ of how to use the commands of \fBtcltest\fR to produce test suites for your Tcl-enabled code. .SH COMMANDS .TP -\fBtest\fR \fIname description ?-option value ...?\fR +\fBtest\fR \fIname description\fR ?\fI-option value ...\fR? +. Defines and possibly runs a test with the name \fIname\fR and description \fIdescription\fR. The name and description of a test are used in messages reported by \fBtest\fR during the @@ -105,7 +106,8 @@ See \fBTESTS\fR below for a complete description of the valid options and how they define a test. The \fBtest\fR command returns an empty string. .TP -\fBtest\fR \fIname description ?constraints? body result\fR +\fBtest\fR \fIname description\fR ?\fIconstraints\fR? \fIbody result\fR +. This form of \fBtest\fR is provided to support test suites written for version 1 of the \fBtcltest\fR package, and also a simpler interface for a common usage. It is the same as @@ -117,6 +119,7 @@ all \fIoption\fRs begin with .QW \- . .TP \fBloadTestedCommands\fR +. Evaluates in the caller's context the script specified by \fBconfigure \-load\fR or \fBconfigure \-loadfile\fR. Returns the result of that script evaluation, including any error @@ -124,7 +127,8 @@ raised by the script. Use this command and the related configuration options to provide the commands to be tested to the interpreter running the test suite. .TP -\fBmakeFile\fR \fIcontents name ?directory?\fR +\fBmakeFile\fR \fIcontents name\fR ?\fIdirectory\fR? +. Creates a file named \fIname\fR relative to directory \fIdirectory\fR and write \fIcontents\fR to that file using the encoding \fBencoding system\fR. @@ -139,14 +143,16 @@ of \fBcleanupTests\fR, unless it is removed by Returns the full path of the file created. Use this command to create any text file required by a test with contents as needed. .TP -\fBremoveFile\fR \fIname ?directory?\fR +\fBremoveFile\fR \fIname\fR ?\fIdirectory\fR? +. Forces the file referenced by \fIname\fR to be removed. This file name should be relative to \fIdirectory\fR. The default value of \fIdirectory\fR is the directory \fBconfigure \-tmpdir\fR. Returns an empty string. Use this command to delete files created by \fBmakeFile\fR. .TP -\fBmakeDirectory\fR \fIname ?directory?\fR +\fBmakeDirectory\fR \fIname\fR ?\fIdirectory\fR? +. Creates a directory named \fIname\fR relative to directory \fIdirectory\fR. The directory will be removed by the next evaluation of \fBcleanupTests\fR, unless it is removed by \fBremoveDirectory\fR first. @@ -155,7 +161,8 @@ The default value of \fIdirectory\fR is the directory Returns the full path of the directory created. Use this command to create any directories that are required to exist by a test. .TP -\fBremoveDirectory\fR \fIname ?directory?\fR +\fBremoveDirectory\fR \fIname\fR ?\fIdirectory\fR? +. Forces the directory referenced by \fIname\fR to be removed. This directory should be relative to \fIdirectory\fR. The default value of \fIdirectory\fR is the directory @@ -163,7 +170,8 @@ The default value of \fIdirectory\fR is the directory Returns an empty string. Use this command to delete any directories created by \fBmakeDirectory\fR. .TP -\fBviewFile\fR \fIfile ?directory?\fR +\fBviewFile\fR \fIfile\fR ?\fIdirectory\fR? +. Returns the contents of \fIfile\fR, except for any final newline, just as \fBread \-nonewline\fR would return. This file name should be relative to \fIdirectory\fR. @@ -176,6 +184,7 @@ the system encoding, so its usefulness is limited to text files. .TP \fBcleanupTests\fR +. Intended to clean up and summarize after several tests have been run. Typically called once per test file, at the end of the file after all tests have been completed. For best effectiveness, be @@ -195,23 +204,27 @@ array. Returns an empty string. .RE .TP \fBrunAllTests\fR +. This is a master command meant to run an entire suite of tests, spanning multiple files and/or directories, as governed by the configurable options of \fBtcltest\fR. See \fBRUNNING ALL TESTS\fR below for a complete description of the many variations possible with \fBrunAllTests\fR. -.SH "CONFIGURATION COMMANDS" +.SS "CONFIGURATION COMMANDS" .TP \fBconfigure\fR +. Returns the list of configurable options supported by \fBtcltest\fR. See \fBCONFIGURABLE OPTIONS\fR below for the full list of options, their valid values, and their effect on \fBtcltest\fR operations. .TP \fBconfigure \fIoption\fR +. Returns the current value of the supported configurable option \fIoption\fR. Raises an error if \fIoption\fR is not a supported configurable option. .TP -\fBconfigure \fIoption value ?-option value ...?\fR +\fBconfigure \fIoption value\fR ?\fI\-option value ...\fR? +. Sets the value of each configurable option \fIoption\fR to the corresponding value \fIvalue\fR, in order. Raises an error if an \fIoption\fR is not a supported configurable option, or if @@ -229,6 +242,7 @@ set by the environment. .RE .TP \fBcustomMatch \fImode script\fR +. Registers \fImode\fR as a new legal value of the \fB\-match\fR option to \fBtest\fR. When the \fB\-match \fImode\fR option is passed to \fBtest\fR, the script \fIscript\fR will be evaluated @@ -241,81 +255,119 @@ The completed script is expected to return a boolean value indicating whether or not the results match. The built-in matching modes of \fBtest\fR are \fBexact\fR, \fBglob\fR, and \fBregexp\fR. .TP -\fBtestConstraint \fIconstraint ?boolean?\fR +\fBtestConstraint \fIconstraint\fR ?\fIboolean\fR? +. Sets or returns the boolean value associated with the named \fIconstraint\fR. See \fBTEST CONSTRAINTS\fR below for more information. .TP -\fBinterpreter\fR \fI?executableName?\fR +\fBinterpreter\fR ?\fIexecutableName\fR? +. Sets or returns the name of the executable to be \fBexec\fRed by \fBrunAllTests\fR to run each test file when \fBconfigure \-singleproc\fR is false. The default value for \fBinterpreter\fR is the name of the currently running program as returned by \fBinfo nameofexecutable\fR. .TP -\fBoutputChannel\fR \fI?channelID?\fR +\fBoutputChannel\fR ?\fIchannelID\fR? +. Sets or returns the output channel ID. This defaults to stdout. Any test that prints test related output should send that output to \fBoutputChannel\fR rather than letting that output default to stdout. .TP -\fBerrorChannel\fR \fI?channelID?\fR +\fBerrorChannel\fR ?\fIchannelID\fR? +. Sets or returns the error channel ID. This defaults to stderr. Any test that prints error messages should send that output to \fBerrorChannel\fR rather than printing directly to stderr. -.SH "SHORTCUT COMMANDS" -.TP -\fBdebug \fI?level?\fR -Same as \fBconfigure \-debug \fI?level?\fR. -.TP -\fBerrorFile \fI?filename?\fR -Same as \fBconfigure \-errfile \fI?filename?\fR. -.TP -\fBlimitConstraints \fI?boolean?\fR -Same as \fBconfigure \-limitconstraints \fI?boolean?\fR. -.TP -\fBloadFile \fI?filename?\fR -Same as \fBconfigure \-loadfile \fI?filename?\fR. -.TP -\fBloadScript \fI?script?\fR -Same as \fBconfigure \-load \fI?script?\fR. -.TP -\fBmatch \fI?patternList?\fR -Same as \fBconfigure \-match \fI?patternList?\fR. -.TP -\fBmatchDirectories \fI?patternList?\fR -Same as \fBconfigure \-relateddir \fI?patternList?\fR. -.TP -\fBmatchFiles \fI?patternList?\fR -Same as \fBconfigure \-file \fI?patternList?\fR. -.TP -\fBoutputFile \fI?filename?\fR -Same as \fBconfigure \-outfile \fI?filename?\fR. -.TP -\fBpreserveCore \fI?level?\fR -Same as \fBconfigure \-preservecore \fI?level?\fR. -.TP -\fBsingleProcess \fI?boolean?\fR -Same as \fBconfigure \-singleproc \fI?boolean?\fR. -.TP -\fBskip \fI?patternList?\fR -Same as \fBconfigure \-skip \fI?patternList?\fR. -.TP -\fBskipDirectories \fI?patternList?\fR -Same as \fBconfigure \-asidefromdir \fI?patternList?\fR. -.TP -\fBskipFiles \fI?patternList?\fR -Same as \fBconfigure \-notfile \fI?patternList?\fR. -.TP -\fBtemporaryDirectory \fI?directory?\fR -Same as \fBconfigure \-tmpdir \fI?directory?\fR. -.TP -\fBtestsDirectory \fI?directory?\fR -Same as \fBconfigure \-testdir \fI?directory?\fR. -.TP -\fBverbose \fI?level?\fR -Same as \fBconfigure \-verbose \fI?level?\fR. -.SH "OTHER COMMANDS" +.SS "SHORTCUT CONFIGURATION COMMANDS" +.TP +\fBdebug\fR ?\fIlevel\fR? +. +Same as +.QW "\fBconfigure \-debug\fR ?\fIlevel\fR?" . +.TP +\fBerrorFile\fR ?\fIfilename\fR? +. +Same as +.QW "\fBconfigure \-errfile\fR ?\fIfilename\fR?" . +.TP +\fBlimitConstraints\fR ?\fIboolean\fR? +. +Same as +.QW "\fBconfigure \-limitconstraints\fR ?\fIboolean\fR?" . +.TP +\fBloadFile\fR ?\fIfilename\fR? +. +Same as +.QW "\fBconfigure \-loadfile\fR ?\fIfilename\fR?" . +.TP +\fBloadScript\fR ?\fIscript\fR? +. +Same as +.QW "\fBconfigure \-load\fR ?\fIscript\fR?" . +.TP +\fBmatch\fR ?\fIpatternList\fR? +. +Same as +.QW "\fBconfigure \-match\fR ?\fIpatternList\fR?" . +.TP +\fBmatchDirectories\fR ?\fIpatternList\fR? +. +Same as +.QW "\fBconfigure \-relateddir\fR ?\fIpatternList\fR?" . +.TP +\fBmatchFiles\fR ?\fIpatternList\fR? +. +Same as +.QW "\fBconfigure \-file\fR ?\fIpatternList\fR?" . +.TP +\fBoutputFile\fR ?\fIfilename\fR? +. +Same as +.QW "\fBconfigure \-outfile\fR ?\fIfilename\fR?" . +.TP +\fBpreserveCore\fR ?\fIlevel\fR? +. +Same as +.QW "\fBconfigure \-preservecore\fR ?\fIlevel\fR?" . +.TP +\fBsingleProcess\fR ?\fIboolean\fR? +. +Same as +.QW "\fBconfigure \-singleproc\fR ?\fIboolean\fR?" . +.TP +\fBskip\fR ?\fIpatternList\fR? +. +Same as +.QW "\fBconfigure \-skip\fR ?\fIpatternList\fR?" . +.TP +\fBskipDirectories\fR ?\fIpatternList\fR? +. +Same as +.QW "\fBconfigure \-asidefromdir\fR ?\fIpatternList\fR?" . +.TP +\fBskipFiles\fR ?\fIpatternList\fR? +. +Same as +.QW "\fBconfigure \-notfile\fR ?\fIpatternList\fR?" . +.TP +\fBtemporaryDirectory\fR ?\fIdirectory\fR? +. +Same as +.QW "\fBconfigure \-tmpdir\fR ?\fIdirectory\fR?" . +.TP +\fBtestsDirectory\fR ?\fIdirectory\fR? +. +Same as +.QW "\fBconfigure \-testdir\fR ?\fIdirectory\fR?" . +.TP +\fBverbose\fR ?\fIlevel\fR? +. +Same as +.QW "\fBconfigure \-verbose\fR ?\fIlevel\fR?" . +.SS "OTHER COMMANDS" .PP The remaining commands provided by \fBtcltest\fR have better alternatives provided by \fBtcltest\fR or \fBTcl\fR itself. They @@ -323,6 +375,7 @@ are retained to support existing test suites, but should be avoided in new code. .TP \fBtest\fR \fIname description optionList\fR +. This form of \fBtest\fR was provided to enable passing many options spanning several lines to \fBtest\fR as a single argument quoted by braces, rather than needing to backslash quote @@ -346,13 +399,15 @@ the source code of \fBtcltest\fR if you want to know the substitution details, or just enclose the third through last argument to \fBtest\fR in braces and hope for the best. .TP -\fBworkingDirectory\fR \fI?directoryName?\fR +\fBworkingDirectory\fR ?\fIdirectoryName\fR? +. Sets or returns the current working directory when the test suite is running. The default value for workingDirectory is the directory in which the test suite was launched. The Tcl commands \fBcd\fR and \fBpwd\fR are sufficient replacements. .TP -\fBnormalizeMsg\fR \fImsg\fR +\fBnormalizeMsg \fImsg\fR +. Returns the result of removing the .QW extra newlines from \fImsg\fR, where @@ -362,13 +417,15 @@ processing commands to modify strings as you wish, and \fBcustomMatch\fR allows flexible matching of actual and expected results. .TP -\fBnormalizePath\fR \fIpathVar\fR +\fBnormalizePath \fIpathVar\fR +. Resolves symlinks in a path, thus creating a path without internal redirection. It is assumed that \fIpathVar\fR is absolute. \fIpathVar\fR is modified in place. The Tcl command \fBfile normalize\fR is a sufficient replacement. .TP -\fBbytestring\fR \fIstring\fR +\fBbytestring \fIstring\fR +. Construct a string that consists of the requested sequence of bytes, as opposed to a string of properly formed UTF-8 characters using the value supplied in \fIstring\fR. This allows the tester to create @@ -390,15 +447,15 @@ The valid options for \fBtest\fR are summarized: .PP .CS \fBtest\fR \fIname\fR \fIdescription\fR - ?-constraints \fIkeywordList|expression\fR? - ?-setup \fIsetupScript\fR? - ?-body \fItestScript\fR? - ?-cleanup \fIcleanupScript\fR? - ?-result \fIexpectedAnswer\fR? - ?-output \fIexpectedOutput\fR? - ?-errorOutput \fIexpectedError\fR? - ?-returnCodes \fIcodeList\fR? - ?-match \fImode\fR? + ?\fB\-constraints \fIkeywordList|expression\fR? + ?\fB\-setup \fIsetupScript\fR? + ?\fB\-body \fItestScript\fR? + ?\fB\-cleanup \fIcleanupScript\fR? + ?\fB\-result \fIexpectedAnswer\fR? + ?\fB\-output \fIexpectedOutput\fR? + ?\fB\-errorOutput \fIexpectedError\fR? + ?\fB\-returnCodes \fIcodeList\fR? + ?\fB\-match \fImode\fR? .CE .PP The \fIname\fR may be any string. It is conventional to choose @@ -434,7 +491,8 @@ a bug, include the bug ID in the description. .PP Valid attributes and associated values are: .TP -\fB\-constraints \fIkeywordList|expression\fR +\fB\-constraints \fIkeywordList\fR|\fIexpression\fR +. The optional \fB\-constraints\fR attribute can be list of one or more keywords or an expression. If the \fB\-constraints\fR value is a list of keywords, each of these keywords should be the name of a constraint @@ -456,24 +514,30 @@ See \fBTEST CONSTRAINTS\fR below for a list of built-in constraints and information on how to add your own constraints. .TP \fB\-setup \fIscript\fR +. The optional \fB\-setup\fR attribute indicates a \fIscript\fR that will be run before the script indicated by the \fB\-body\fR attribute. If evaluation of \fIscript\fR raises an error, the test will fail. The default value is an empty script. .TP \fB\-body \fIscript\fR +. The \fB\-body\fR attribute indicates the \fIscript\fR to run to carry out the -test. It must return a result that can be checked for correctness. -If evaluation of \fIscript\fR raises an error, the test will fail. +test, which must return a result that can be checked for correctness. +If evaluation of \fIscript\fR raises an error, the test will fail +(unless the \fB\-returnCodes\fR option is used to state that an error +is expected). The default value is an empty script. .TP \fB\-cleanup \fIscript\fR +. The optional \fB\-cleanup\fR attribute indicates a \fIscript\fR that will be run after the script indicated by the \fB\-body\fR attribute. If evaluation of \fIscript\fR raises an error, the test will fail. The default value is an empty script. .TP \fB\-match \fImode\fR +. The \fB\-match\fR attribute determines how expected answers supplied by \fB\-result\fR, \fB\-output\fR, and \fB\-errorOutput\fR are compared. Valid values for \fImode\fR are \fBregexp\fR, \fBglob\fR, \fBexact\fR, and @@ -481,27 +545,31 @@ any value registered by a prior call to \fBcustomMatch\fR. The default value is \fBexact\fR. .TP \fB\-result \fIexpectedValue\fR +. The \fB\-result\fR attribute supplies the \fIexpectedValue\fR against which the return value from script will be compared. The default value is an empty string. .TP \fB\-output \fIexpectedValue\fR +. The \fB\-output\fR attribute supplies the \fIexpectedValue\fR against which any output sent to \fBstdout\fR or \fBoutputChannel\fR during evaluation of the script(s) will be compared. Note that only output printed using -\fB::puts\fR is used for comparison. If \fB\-output\fR is not specified, -output sent to \fBstdout\fR and \fBoutputChannel\fR is not processed for -comparison. +the global \fBputs\fR command is used for comparison. If \fB\-output\fR is +not specified, output sent to \fBstdout\fR and \fBoutputChannel\fR is not +processed for comparison. .TP \fB\-errorOutput \fIexpectedValue\fR +. The \fB\-errorOutput\fR attribute supplies the \fIexpectedValue\fR against which any output sent to \fBstderr\fR or \fBerrorChannel\fR during evaluation of the script(s) will be compared. Note that only output -printed using \fB::puts\fR is used for comparison. If \fB\-errorOutput\fR -is not specified, output sent to \fBstderr\fR and \fBerrorChannel\fR is -not processed for comparison. +printed using the global \fBputs\fR command is used for comparison. If +\fB\-errorOutput\fR is not specified, output sent to \fBstderr\fR and +\fBerrorChannel\fR is not processed for comparison. .TP \fB\-returnCodes \fIexpectedCodeList\fR +. The optional \fB\-returnCodes\fR attribute supplies \fIexpectedCodeList\fR, a list of return codes that may be accepted from evaluation of the \fB\-body\fR script. If evaluation of the \fB\-body\fR script returns @@ -509,7 +577,7 @@ a code not in the \fIexpectedCodeList\fR, the test fails. All return codes known to \fBreturn\fR, in both numeric and symbolic form, including extended return codes, are acceptable elements in the \fIexpectedCodeList\fR. Default value is -.QW \fBok return\fR. +.QW "\fBok return\fR" . .PP To pass, a test must successfully evaluate its \fB\-setup\fR, \fB\-body\fR, and \fB\-cleanup\fR scripts. The return code of the \fB\-body\fR script and @@ -531,7 +599,7 @@ produced using \fB::puts\fR to \fBoutputChannel\fR or easily capture output with the \fBconfigure \-outfile\fR and \fBconfigure \-errfile\fR options, and so that the \fB\-output\fR and \fB\-errorOutput\fR attributes work properly. -.SH "TEST CONSTRAINTS" +.SS "TEST CONSTRAINTS" .PP Constraints are used to determine whether or not a test should be skipped. Each constraint has a name, which may be any string, and a boolean @@ -559,112 +627,141 @@ The following is a list of constraints pre-defined by the \fBtcltest\fR package itself: .TP \fIsingleTestInterp\fR -test can only be run if all test files are sourced into a single interpreter +. +This test can only be run if all test files are sourced into a single +interpreter. .TP \fIunix\fR -test can only be run on any Unix platform +. +This test can only be run on any Unix platform. .TP \fIwin\fR -test can only be run on any Windows platform +. +This test can only be run on any Windows platform. .TP \fInt\fR -test can only be run on any Windows NT platform +. +This test can only be run on any Windows NT platform. .TP \fI95\fR -test can only be run on any Windows 95 platform +. +This test can only be run on any Windows 95 platform. .TP \fI98\fR -test can only be run on any Windows 98 platform +. +This test can only be run on any Windows 98 platform. .TP \fImac\fR -test can only be run on any Mac platform +. +This test can only be run on any Mac platform. .TP \fIunixOrWin\fR -test can only be run on a Unix or Windows platform +. +This test can only be run on a Unix or Windows platform. .TP \fImacOrWin\fR -test can only be run on a Mac or Windows platform +. +This test can only be run on a Mac or Windows platform. .TP \fImacOrUnix\fR -test can only be run on a Mac or Unix platform +. +This test can only be run on a Mac or Unix platform. .TP \fItempNotWin\fR -test can not be run on Windows. This flag is used to temporarily +. +This test can not be run on Windows. This flag is used to temporarily disable a test. .TP \fItempNotMac\fR -test can not be run on a Mac. This flag is used +. +This test can not be run on a Mac. This flag is used to temporarily disable a test. .TP \fIunixCrash\fR -test crashes if it is run on Unix. This flag is used to temporarily +. +This test crashes if it is run on Unix. This flag is used to temporarily disable a test. .TP \fIwinCrash\fR -test crashes if it is run on Windows. This flag is used to temporarily +. +This test crashes if it is run on Windows. This flag is used to temporarily disable a test. .TP \fImacCrash\fR -test crashes if it is run on a Mac. This flag is used to temporarily +. +This test crashes if it is run on a Mac. This flag is used to temporarily disable a test. .TP \fIemptyTest\fR -test is empty, and so not worth running, but it remains as a +. +This test is empty, and so not worth running, but it remains as a place-holder for a test to be written in the future. This constraint has value false to cause tests to be skipped unless the user specifies otherwise. .TP \fIknownBug\fR -test is known to fail and the bug is not yet fixed. This constraint +. +This test is known to fail and the bug is not yet fixed. This constraint has value false to cause tests to be skipped unless the user specifies otherwise. .TP \fInonPortable\fR -test can only be run in some known development environment. +. +This test can only be run in some known development environment. Some tests are inherently non-portable because they depend on things like word length, file system configuration, window manager, etc. This constraint has value false to cause tests to be skipped unless the user specifies otherwise. .TP \fIuserInteraction\fR -test requires interaction from the user. This constraint has +. +This test requires interaction from the user. This constraint has value false to causes tests to be skipped unless the user specifies otherwise. .TP \fIinteractive\fR -test can only be run in if the interpreter is in interactive mode +. +This test can only be run in if the interpreter is in interactive mode (when the global tcl_interactive variable is set to 1). .TP \fInonBlockFiles\fR -test can only be run if platform supports setting files into -nonblocking mode +. +This test can only be run if platform supports setting files into +nonblocking mode. .TP \fIasyncPipeClose\fR -test can only be run if platform supports async flush and async close -on a pipe +. +This test can only be run if platform supports async flush and async close +on a pipe. .TP \fIunixExecs\fR -test can only be run if this machine has Unix-style commands +. +This test can only be run if this machine has Unix-style commands \fBcat\fR, \fBecho\fR, \fBsh\fR, \fBwc\fR, \fBrm\fR, \fBsleep\fR, -\fBfgrep\fR, \fBps\fR, \fBchmod\fR, and \fBmkdir\fR available +\fBfgrep\fR, \fBps\fR, \fBchmod\fR, and \fBmkdir\fR available. .TP \fIhasIsoLocale\fR -test can only be run if can switch to an ISO locale +. +This test can only be run if can switch to an ISO locale. .TP \fIroot\fR -test can only run if Unix user is root +. +This test can only run if Unix user is root. .TP \fInotRoot\fR -test can only run if Unix user is not root +. +This test can only run if Unix user is not root. .TP \fIeformat\fR -test can only run if app has a working version of sprintf with respect +. +This test can only run if app has a working version of sprintf with respect to the .QW e format of floating-point numbers. .TP \fIstdio\fR -test can only be run if \fBinterpreter\fR can be \fBopen\fRed +. +This test can only be run if \fBinterpreter\fR can be \fBopen\fRed as a pipe. .PP The alternative mode of constraint control is enabled by setting @@ -687,7 +784,7 @@ up a configuration with .PP to run exactly those tests that exercise known bugs, and discover whether any of them pass, indicating the bug had been fixed. -.SH "RUNNING ALL TESTS" +.SS "RUNNING ALL TESTS" .PP The single command \fBrunAllTests\fR is evaluated to run an entire test suite, spanning many files and directories. The configuration @@ -750,17 +847,19 @@ The \fBconfigure\fR command is used to set and query the configurable options of \fBtcltest\fR. The valid options are: .TP \fB\-singleproc \fIboolean\fR +. Controls whether or not \fBrunAllTests\fR spawns a child process for each test file. No spawning when \fIboolean\fR is true. Default value is false. .TP \fB\-debug \fIlevel\fR +. Sets the debug level to \fIlevel\fR, an integer value indicating how much debugging information should be printed to stdout. Note that debug messages always go to stdout, independent of the value of \fBconfigure \-outfile\fR. Default value is 0. Levels are defined as: .RS -.IP 0 +.IP 0 4 Do not display any debug information. .IP 1 Display information regarding whether a test is skipped because it @@ -779,33 +878,37 @@ harness are doing. .RE .TP \fB\-verbose \fIlevel\fR +. Sets the type of output verbosity desired to \fIlevel\fR, a list of zero or more of the elements \fBbody\fR, \fBpass\fR, \fBskip\fR, \fBstart\fR, \fBerror\fR and \fBline\fR. Default value -is \fB{body error}\fR. +is +.QW "\fBbody error\fR" . Levels are defined as: .RS -.IP "body (b)" +.IP "body (\fBb\fR)" Display the body of failed tests -.IP "pass (p)" +.IP "pass (\fBp\fR)" Print output when a test passes -.IP "skip (s)" +.IP "skip (\fBs\fR)" Print output when a test is skipped -.IP "start (t)" +.IP "start (\fBt\fR)" Print output whenever a test starts -.IP "error (e)" +.IP "error (\fBe\fR)" Print errorInfo and errorCode, if they exist, when a test return code does not match its expected return code -.IP "line (l)" +.IP "line (\fBl\fR)" Print source file line information of failed tests -.RE +.PP The single letter abbreviations noted above are also recognized so that .QW "\fBconfigure \-verbose pt\fR" is the same as .QW "\fBconfigure \-verbose {pass start}\fR" . +.RE .TP \fB\-preservecore \fIlevel\fR +. Sets the core preservation level to \fIlevel\fR. This level determines how stringent checks for core files are. Default value is 0. Levels are defined as: @@ -822,16 +925,19 @@ copy of each core file produced in \fBconfigure \-tmpdir\fR. .RE .TP \fB\-limitconstraints \fIboolean\fR +. Sets the mode by which \fBtest\fR honors constraints as described in \fBTESTS\fR above. Default value is false. .TP \fB\-constraints \fIlist\fR +. Sets all the constraints in \fIlist\fR to true. Also used in combination with \fBconfigure \-limitconstraints true\fR to control an alternative constraint mode as described in \fBTESTS\fR above. Default value is an empty list. .TP \fB\-tmpdir \fIdirectory\fR +. Sets the temporary directory to be used by \fBmakeFile\fR, \fBmakeDirectory\fR, \fBviewFile\fR, \fBremoveFile\fR, and \fBremoveDirectory\fR as the default directory where @@ -839,55 +945,66 @@ temporary files and directories created by test files should be created. Default value is \fBworkingDirectory\fR. .TP \fB\-testdir \fIdirectory\fR +. Sets the directory searched by \fBrunAllTests\fR for test files and subdirectories. Default value is \fBworkingDirectory\fR. .TP \fB\-file \fIpatternList\fR +. Sets the list of patterns used by \fBrunAllTests\fR to determine what test files to evaluate. Default value is .QW \fB*.test\fR . .TP \fB\-notfile \fIpatternList\fR +. Sets the list of patterns used by \fBrunAllTests\fR to determine what test files to skip. Default value is .QW \fBl.*.test\fR , so that any SCCS lock files are skipped. .TP \fB\-relateddir \fIpatternList\fR +. Sets the list of patterns used by \fBrunAllTests\fR to determine what subdirectories to search for an \fBall.tcl\fR file. Default value is .QW \fB*\fR . .TP \fB\-asidefromdir \fIpatternList\fR +. Sets the list of patterns used by \fBrunAllTests\fR to determine what subdirectories to skip when searching for an \fBall.tcl\fR file. Default value is an empty list. .TP \fB\-match \fIpatternList\fR +. Set the list of patterns used by \fBtest\fR to determine whether a test should be run. Default value is .QW \fB*\fR . .TP \fB\-skip \fIpatternList\fR +. Set the list of patterns used by \fBtest\fR to determine whether a test should be skipped. Default value is an empty list. .TP \fB\-load \fIscript\fR +. Sets a script to be evaluated by \fBloadTestedCommands\fR. Default value is an empty script. .TP \fB\-loadfile \fIfilename\fR +. Sets the filename from which to read a script to be evaluated by \fBloadTestedCommands\fR. This is an alternative to \fB\-load\fR. They cannot be used together. .TP \fB\-outfile \fIfilename\fR +. Sets the file to which all output produced by tcltest should be written. A file named \fIfilename\fR will be \fBopen\fRed for writing, and the resulting channel will be set as the value of \fBoutputChannel\fR. .TP \fB\-errfile \fIfilename\fR +. Sets the file to which all error output produced by tcltest should be written. A file named \fIfilename\fR will be \fBopen\fRed for writing, and the resulting channel will be set as the value @@ -950,7 +1067,9 @@ Test with a constraint. .PP At the next higher layer of organization, several \fBtest\fR commands are gathered together into a single test file. Test files should have -names with the \fB.test\fR extension, because that is the default pattern +names with the +.QW \fB.test\fR +extension, because that is the default pattern used by \fBrunAllTests\fR to find test files. It is a good rule of thumb to have one test file for each source code file of your project. It is good practice to edit the test file and the source code file @@ -978,7 +1097,7 @@ guard: .PP .CS if $myRequirement { - test badConditionalTest {} { + \fBtest\fR badConditionalTest {} { #body } result } @@ -1078,6 +1197,12 @@ depend on this, but should explicitly include eval \fB::tcltest::configure\fR $::argv .CE .PP +or +.PP +.CS +\fB::tcltest::configure\fR {*}$::argv +.CE +.PP to establish a configuration from command line arguments. .SH "KNOWN ISSUES" There are two known issues related to nested evaluations of \fBtest\fR. @@ -1119,8 +1244,8 @@ and refer to tests that were run at the same test level as test level-1.1. .PP Implementation of output and error comparison in the test command -depends on usage of ::puts in your application code. Output is -intercepted by redefining the ::puts command while the defined test +depends on usage of \fB::puts\fR in your application code. Output is +intercepted by redefining the \fB::puts\fR command while the defined test script is being run. Errors thrown by C procedures or printed directly from C applications will not be caught by the test command. Therefore, usage of the \fB\-output\fR and \fB\-errorOutput\fR -- cgit v0.12 From 49e406bc1ce2d46e428fda956d146421c3d23ccb Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 1 Nov 2009 13:00:07 +0000 Subject: Apply a bit more polish --- doc/NRE.3 | 103 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/doc/NRE.3 b/doc/NRE.3 index 4103e3d..633733f 100644 --- a/doc/NRE.3 +++ b/doc/NRE.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: NRE.3,v 1.4 2009/08/12 16:06:38 dgp Exp $ +'\" RCS: @(#) $Id: NRE.3,v 1.5 2009/11/01 13:00:07 dkf Exp $ '\" .so man.macros .TH NRE 3 8.6 Tcl "Tcl Library Procedures" @@ -17,7 +17,8 @@ Tcl_NRCreateCommand, Tcl_NRCallObjProc, Tcl_NREvalObj, Tcl_NREvalObjv, Tcl_NRCmd \fB#include \fR .sp Tcl_Command -\fBTcl_NRCreateCommand\fR(\fIinterp, cmdName, proc, nreProc, clientData, deleteProc\fR) +\fBTcl_NRCreateCommand\fR(\fIinterp, cmdName, proc, nreProc, clientData, + deleteProc\fR) .sp int \fBTcl_NRCallObjProc\fR(\fIinterp, nreProc, clientData, objc, objv\fR) @@ -38,7 +39,7 @@ void \fBTcl_NRAddCallback\fR(\fIinterp, postProcPtr, data0, data1, data2, data3\fR) .fi .SH ARGUMENTS -.AS Tcl_CmdDeleteProc *postProcPtr in +.AS Tcl_CmdDeleteProc *interp in .AP Tcl_Interp *interp in Interpreter in which to create or evaluate a command. .AP char *cmdName in @@ -54,7 +55,7 @@ Arbitrary one-word value that will be passed to \fIproc\fR, \fInreProc\fR, \fIdeleteProc\fR and \fIobjProc\fR. .AP Tcl_CmdDeleteProc *deleteProc in/out Procedure to call before \fIcmdName\fR is deleted from the interpreter. -This procedure allows for command-specific cleanup. If \fIdeletProc\fR +This procedure allows for command-specific cleanup. If \fIdeleteProc\fR is \fBNULL\fR, then no procedure is called before the command is deleted. .AP int objc in Count of parameters provided to the implementation of a command. @@ -139,7 +140,7 @@ and substituted. The \fIobjc\fR and \fIobjv\fR parameters give the words of the command to be evaluated when execution reaches the trampoline. .PP -\fBTcl_NRCmdSwap allows for trampoline evaluation of a command whose +\fBTcl_NRCmdSwap\fR allows for trampoline evaluation of a command whose resolution is already known. The \fIcmd\fR parameter gives a \fBTcl_Command\fR object (returned from \fBTcl_CreateObjCmd\fR or \fBTcl_GetCommandFromObj\fR) identifying the command to be invoked in @@ -148,7 +149,7 @@ The remaining arguments are as for \fBTcl_NREvalObj\fR. .PP \fBTcl_NREvalObj\fR, \fBTcl_NREvalObjv\fR and \fBTcl_NRCmdSwap\fR all accept a \fIflags\fR parameter, which is an OR-ed-together set of -bits to control evaluation. At the present time, the only flag +bits to control evaluation. At the present time, the only supported flag available to callers is \fBTCL_EVAL_GLOBAL\fR. .\" TODO: Again, this is a lie. Do we want to explain TCL_EVAL_INVOKE .\" and TCL_EVAL_NOERR? @@ -180,9 +181,9 @@ consistent with the \fBTcl_NRPostProc\fR data type: .CS typedef int \fBTcl_NRPostProc\fR( - \fBClientData\fR \fIdata\fR[], - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIresult\fR); + \fBClientData\fR \fIdata\fR[], + \fBTcl_Interp\fR *\fIinterp\fR, + int \fIresult\fR); .CE .PP When the trampoline invokes the callback function, the \fIdata\fR @@ -206,22 +207,26 @@ The usual pattern for Tcl commands that invoke other Tcl commands is something like: .PP .CS -int \fITheCmdObjProc\fR( - \fBClientData\fR \fIclientData\fR, - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIobjc\fR, - \fBTcl_Obj\fR *const \fIobjv\fR[]) +int +\fITheCmdObjProc\fR( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { - int \fIresult\fR; - \fBTcl_Obj\fR *\fIobjPtr\fR; + int result; + Tcl_Obj *objPtr; + \fI... preparation ...\fR - \fIresult\fR = \fBTcl_EvalObjEx\fR(\fIinterp\fR, \fIobjPtr\fR, 0); + + result = \fBTcl_EvalObjEx\fR(interp, objPtr, 0); + \fI... postprocessing ...\fR - return \fIresult\fR; + + return result; } -\fBTcl_CreateObjCommand\fR(\fIinterp\fR, "theCommand", - \fITheCmdObjProc\fR, \fIclientData\fR, - \fITheCmdDeleteProc\fR); +\fBTcl_CreateObjCommand\fR(interp, "theCommand", + \fITheCmdObjProc\fR, clientData, TheCmdDeleteProc); .CE .PP To enable a command like this one for trampoline-based evaluation, @@ -245,14 +250,14 @@ a single statement: .PP .CS int -TheCmdNewObjProc - \fBClientData\fR \fIclientData\fR, - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIobjc\fR, - \fBTcl_Obj\fR *const \fIobjv\fR[]) +\fITheCmdNewObjProc\fR( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { - return \fBTcl_NRCallObjProc\fR(\fIinterp, name,\fR - \fITheCmdNRObjProc, clientData, objc, objv\fR); + return \fBTcl_NRCallObjProc\fR(interp, name, + \fITheCmdNRObjProc\fR, clientData, objc, objv); } .CE .PP @@ -261,18 +266,22 @@ and returns to the trampoline requesting command evaluation. .PP .CS int -TheCmdNRObjProc - \fBClientData\fR \fIclientData\fR, - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIobjc\fR, - \fBTcl_Obj\fR *const \fIobjv\fR[]) +\fITheCmdNRObjProc\fR + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { + Tcl_Obj *objPtr; + \fI... preparation ...\fR - \fBTcl_NRAddCallback\fR(\fIinterp, TheCmdPostProc,\fR - \fIdata0, data1, data2, data3\fR); - /* \fIdata0 .. data3\fR are up to four one-word items - * to pass to the postprocessing procedure */ - return \fBTcl_NREvalObj\fR(\fIinterp, objPtr, 0\fR); + + \fBTcl_NRAddCallback\fR(interp, \fITheCmdPostProc\fR, + data0, data1, data2, data3); + /* \fIdata0 .. data3\fR are up to four one-word items to + * pass to the postprocessing procedure */ + + return \fBTcl_NREvalObj\fR(interp, objPtr, 0); } .CE .PP @@ -281,14 +290,16 @@ upon return from the inner evaluation. .PP .CS int -TheCmdNRPostProc - \fBClientData\fR \fIdata\fR[], - \fBTcl_Interp\fR *\fIinterp\fR, - int \fIresult\fR +\fITheCmdNRPostProc\fR( + ClientData data[], + Tcl_Interp *interp, + int result) { - /* \fIdata[0] .. data[4]\fR are the four words of data + /* \fIdata[0] .. data[3]\fR are the four words of data * passed to \fBTcl_NREvalObj\fR */ + \fI... postprocessing ...\fR + return result; } .CE @@ -306,9 +317,9 @@ of one. The first is for use when no trampoline is yet on the stack, and the second is for use when there is already a trampoline in place. .PP .CS -\fBTcl_NRCreateCommand\fR(\fIinterp\fR, "theCommand", - \fITheCmdObjProc\fR, \fITheCmdNRObjProc\fR, \fIclientData\fR, - \fITheCmdDeleteProc\fR); +\fBTcl_NRCreateCommand\fR(interp, "theCommand", + \fITheCmdObjProc\fR, \fITheCmdNRObjProc\fR, clientData, + TheCmdDeleteProc); .CE .SH "SEE ALSO" Tcl_CreateCommand(3), Tcl_CreateObjCommand(3), Tcl_EvalObjEx(3), Tcl_GetCommandFromObj(3), Tcl_ExprObj(3) -- cgit v0.12 From 0ef5b9412ae2939f58eb34644d07dcf47ef9b639 Mon Sep 17 00:00:00 2001 From: jenglish Date: Sun, 1 Nov 2009 18:15:39 +0000 Subject: Move TIP#285 routines out of Tcl_Eval(3) into their own manpage. --- ChangeLog | 5 +++++ doc/Cancel.3 | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/Eval.3 | 52 ++++++----------------------------------------- doc/NRE.3 | 3 +-- 4 files changed, 78 insertions(+), 48 deletions(-) create mode 100644 doc/Cancel.3 diff --git a/ChangeLog b/ChangeLog index a01a097..bde4771 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-01 Joe English + + * doc/Eval.3, doc/Cancel.3: Move TIP#285 routines out of + Tcl_Eval(3) into their own manpage. + 2009-10-31 Donal K. Fellows * generic/tclBasic.c (ExprRoundFunc): [Bug 2889593]: Correctly report diff --git a/doc/Cancel.3 b/doc/Cancel.3 new file mode 100644 index 0000000..8c95e07 --- /dev/null +++ b/doc/Cancel.3 @@ -0,0 +1,66 @@ +'\" Copyright (c) 2006-2008 Joe Mistachkin. +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: Cancel.3,v 1.1 2009/11/01 18:15:40 jenglish Exp $ +'\" +.so man.macros +.TH Tcl_Cancel 3 8.6 Tcl "Tcl Library Procedures" +.BS +.SH NAME +Tcl_CancelEval, Tcl_Canceled \- cancel Tcl scripts +.SH SYNOPSIS +.nf +\fB#include \fR +int +\fBTcl_CancelEval\fR(\fIinterp, clientData, flags\fR) +.sp +int +\fBTcl_Canceled\fR(\fIinterp, flags\fR) +.SH ARGUMENTS +.AP Tcl_Interp *interp in +Interpreter in which to cancel the script. +.AP int flags in +ORed combination of flag bits that specify additional options. +For \fBTcl_CancelEval\fR, only \fBTCL_CANCEL_UNWIND\fR is currently +supported. For \fBTcl_Canceled\fR, only \fBTCL_LEAVE_ERR_MSG\fR and +\fBTCL_CANCEL_UNWIND\fR are currently supported. +.AP ClientData clientData in +Currently, reserved for future use. +It should be set to NULL. +.BE +.SH DESCRIPTION +\fBTcl_CancelEval\fR cancels or unwinds the script in progress soon after +the next invocation of asynchronous handlers, causing \fBTCL_ERROR\fR to be +the return code for that script. This function is thread-safe and may be +called from any thread in the process. +.PP +\fBTcl_Canceled\fR checks if the script in progress has been canceled and +returns \fBTCL_ERROR\fR if it has. Otherwise, \fBTCL_OK\fR is returned. +Extensions can use this function to check to see if they should abort a long +running command. This function is thread sensitive and may only be called +from the thread the interpreter was created in. +.SH "FLAG BITS" +Any ORed combination of the following values may be used for the +\fIflags\fR argument to procedures such as \fBTcl_CancelEval\fR: +.TP 23 +\fBTCL_CANCEL_UNWIND\fR +This flag is used by \fBTcl_CancelEval\fR and \fBTcl_Canceled\fR. +For \fBTcl_CancelEval\fR, if this flag is set, the script in progress +is canceled and the evaluation stack for the interpreter is unwound. +For \fBTcl_Canceled\fR, if this flag is set, the script in progress +is considered to be canceled only if the evaluation stack for the +interpreter is being unwound. +.TP 23 +\fBTCL_LEAVE_ERR_MSG\fR +This flag is only used by \fBTcl_Canceled\fR; it is ignored by +other procedures. If an error is returned and this bit is set in +\fIflags\fR, then an error message will be left in the interpreter's +result, where it can be retrieved with \fBTcl_GetObjResult\fR or +\fBTcl_GetStringResult\fR. If this flag bit is not set then no error +message is left and the interpreter's result will not be modified. +.SH "SEE ALSO" +TIP 285 +.SH KEYWORDS +cancel, unwind diff --git a/doc/Eval.3 b/doc/Eval.3 index 313406c..efd82ad 100644 --- a/doc/Eval.3 +++ b/doc/Eval.3 @@ -2,18 +2,17 @@ '\" Copyright (c) 1989-1993 The Regents of the University of California. '\" Copyright (c) 1994-1997 Sun Microsystems, Inc. '\" Copyright (c) 2000 Scriptics Corporation. -'\" Copyright (c) 2006-2008 Joe Mistachkin. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Eval.3,v 1.28 2008/06/13 05:45:07 mistachkin Exp $ +'\" RCS: @(#) $Id: Eval.3,v 1.29 2009/11/01 18:15:40 jenglish Exp $ '\" .so man.macros -.TH Tcl_Eval 3 8.6 Tcl "Tcl Library Procedures" +.TH Tcl_Eval 3 8.1 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA, Tcl_CancelEval, Tcl_Canceled \- execute and cancel Tcl scripts +Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA \- execute Tcl scripts .SH SYNOPSIS .nf \fB#include \fR @@ -44,25 +43,16 @@ int .sp int \fBTcl_VarEvalVA\fR(\fIinterp, argList\fR) -.sp -int -\fBTcl_CancelEval\fR(\fIinterp, clientData, flags\fR) -.sp -int -\fBTcl_Canceled\fR(\fIinterp, flags\fR) .SH ARGUMENTS .AS Tcl_Interp **termPtr .AP Tcl_Interp *interp in -Interpreter in which to execute or cancel the script. The interpreter's -result is modified to hold the result or error message from the script. +Interpreter in which to execute the script. The interpreter's result is +modified to hold the result or error message from the script. .AP Tcl_Obj *objPtr in A Tcl object containing the script to execute. .AP int flags in ORed combination of flag bits that specify additional options. \fBTCL_EVAL_GLOBAL\fR and \fBTCL_EVAL_DIRECT\fR are currently supported. -For \fBTcl_CancelEval\fR, only \fBTCL_CANCEL_UNWIND\fR is currently -supported. For \fBTcl_Canceled\fR, only \fBTCL_LEAVE_ERR_MSG\fR and -\fBTCL_CANCEL_UNWIND\fR are currently supported. .AP "const char" *fileName in Name of a file containing a Tcl script. .AP int objc in @@ -82,9 +72,6 @@ String forming part of a Tcl script. .AP va_list argList in An argument list which must have been initialized using \fBva_start\fR, and cleared using \fBva_end\fR. -.AP ClientData clientData in -Currently, reserved for future use. -It should be set to NULL. .BE .SH DESCRIPTION @@ -172,17 +159,6 @@ of arguments. \fBTcl_VarEval\fR is now deprecated. \fBTcl_VarEvalVA\fR is the same as \fBTcl_VarEval\fR except that instead of taking a variable number of arguments it takes an argument list. Like \fBTcl_VarEval\fR, \fBTcl_VarEvalVA\fR is deprecated. -.PP -\fBTcl_CancelEval\fR cancels or unwinds the script in progress soon after -the next invocation of asynchronous handlers, causing \fBTCL_ERROR\fR to be -the return code for that script. This function is thread-safe and may be -called from any thread in the process. -.PP -\fBTcl_Canceled\fR checks if the script in progress has been canceled and -returns \fBTCL_ERROR\fR if it has. Otherwise, \fBTCL_OK\fR is returned. -Extensions can use this function to check to see if they should abort a long -running command. This function is thread sensitive and may only be called -from the thread the interpreter was created in. .SH "FLAG BITS" Any ORed combination of the following values may be used for the @@ -203,22 +179,6 @@ If this flag is set, the script is processed at global level. This means that it is evaluated in the global namespace and its variable context consists of global variables only (it ignores any Tcl procedures at are active). -.TP 23 -\fBTCL_CANCEL_UNWIND\fR -This flag is only used by \fBTcl_CancelEval\fR and \fBTcl_Canceled\fR; -it is ignored by other procedures. For \fBTcl_CancelEval\fR, if this -flag is set, the script in progress is canceled and the evaluation -stack for the interpreter is unwound. For \fBTcl_Canceled\fR, if this -flag is set, the script in progress is considered to be canceled only -if the evaluation stack for the interpreter is being unwound. -.TP 23 -\fBTCL_LEAVE_ERR_MSG\fR -This flag is only used by \fBTcl_Canceled\fR; it is ignored by -other procedures. If an error is returned and this bit is set in -\fIflags\fR, then an error message will be left in the interpreter's -result, where it can be retrieved with \fBTcl_GetObjResult\fR or -\fBTcl_GetStringResult\fR. If this flag bit is not set then no error -message is left and the interpreter's result will not be modified. .SH "MISCELLANEOUS DETAILS" .PP @@ -247,4 +207,4 @@ This means that top-level applications should never see a return code from \fBTcl_EvalObjEx\fR other then \fBTCL_OK\fR or \fBTCL_ERROR\fR. .SH KEYWORDS -cancel, execute, file, global, object, result, script, unwind +execute, file, global, object, result, script diff --git a/doc/NRE.3 b/doc/NRE.3 index 633733f..94d2ba2 100644 --- a/doc/NRE.3 +++ b/doc/NRE.3 @@ -1,11 +1,10 @@ .\" .\" Copyright (c) 2008 by Kevin B. Eknny. .\" - '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: NRE.3,v 1.5 2009/11/01 13:00:07 dkf Exp $ +'\" RCS: @(#) $Id: NRE.3,v 1.6 2009/11/01 18:15:40 jenglish Exp $ '\" .so man.macros .TH NRE 3 8.6 Tcl "Tcl Library Procedures" -- cgit v0.12 From 43e9577d9668906d453aac7d1af0f8fa831a1070 Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Mon, 2 Nov 2009 00:04:47 +0000 Subject: fixes for htmlhelp target --- ChangeLog | 17 +++++++++++++++++ doc/Cancel.3 | 4 +++- win/makefile.vc | 8 ++++---- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bde4771..7281cac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2009-11-01 Joe Mistachkin + + * doc/Cancel.3: Minor cosmetic fixes. + * win/makefile.vc: Make htmlhelp target work again. An extra set of + double quotes around the definition of the HTML help compiler tool + appears to be required. Previously, there was one set of double + quotes around the definition of the tool and one around the actual + invocation. This led to confusion because it was the only such tool + path to include double quotes around its invocation. Also, it was + somewhat inflexible in the event that somebody needed to override the + tool command to include arguments. Therefore, even though it may + look "wrong", there are now two double quotes on either side of the + tool path definition. This fixes the problem that currently prevents + the htmlhelp target from building and maintains flexibility in case + somebody needs to override it via the command line or an environment + variable. + 2009-11-01 Joe English * doc/Eval.3, doc/Cancel.3: Move TIP#285 routines out of diff --git a/doc/Cancel.3 b/doc/Cancel.3 index 8c95e07..506b0fe 100644 --- a/doc/Cancel.3 +++ b/doc/Cancel.3 @@ -1,9 +1,10 @@ +'\" '\" Copyright (c) 2006-2008 Joe Mistachkin. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Cancel.3,v 1.1 2009/11/01 18:15:40 jenglish Exp $ +'\" RCS: @(#) $Id: Cancel.3,v 1.2 2009/11/02 00:04:48 mistachkin Exp $ '\" .so man.macros .TH Tcl_Cancel 3 8.6 Tcl "Tcl Library Procedures" @@ -31,6 +32,7 @@ Currently, reserved for future use. It should be set to NULL. .BE .SH DESCRIPTION +.PP \fBTcl_CancelEval\fR cancels or unwinds the script in progress soon after the next invocation of asynchronous handlers, causing \fBTCL_ERROR\fR to be the return code for that script. This function is thread-safe and may be diff --git a/win/makefile.vc b/win/makefile.vc index 6b525021..3bcbbd1 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.201 2009/09/26 21:42:05 dkf Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.202 2009/11/02 00:04:48 mistachkin Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -719,7 +719,7 @@ gentommath_h: # NOTE: you can define HHC on the command-line to override this !ifndef HHC -HHC="%ProgramFiles%\HTML Help Workshop\hhc.exe" +HHC=""%ProgramFiles%\HTML Help Workshop\hhc.exe"" !endif HTMLDIR=$(ROOT)\html HTMLBASE=TclTk$(VERSION) @@ -730,7 +730,7 @@ htmlhelp: chmsetup $(CHMFILE) $(CHMFILE): $(DOCDIR)\* @$(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl - @echo Compiling html help project + @echo Compiling HTML help project @$(HHC) <<$(HHPFILE) >NUL [OPTIONS] Compatibility=1.1 or later @@ -815,7 +815,7 @@ $(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX) $(DOCDIR)\* install-docs: !if exist("$(CHMFILE)") - @echo Installing compiled html help + @echo Installing compiled HTML help @$(CPY) "$(CHMFILE)" "$(DOC_INSTALL_DIR)\" !endif !if exist("$(HELPFILE)") -- cgit v0.12 From e62716c266ab1511101551c6dd792bbad4d905cc Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 2 Nov 2009 09:54:44 +0000 Subject: Improve the general description. --- ChangeLog | 17 +++++++++++------ doc/object.n | 22 +++++++++++++++++----- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7281cac..c117e70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-02 Donal K. Fellows + + * doc/object.n (DESCRIPTION): Substantive revision to make it clearer + what the fundamental semantics of an object actually are. + 2009-11-01 Joe Mistachkin * doc/Cancel.3: Minor cosmetic fixes. @@ -8,17 +13,17 @@ invocation. This led to confusion because it was the only such tool path to include double quotes around its invocation. Also, it was somewhat inflexible in the event that somebody needed to override the - tool command to include arguments. Therefore, even though it may - look "wrong", there are now two double quotes on either side of the - tool path definition. This fixes the problem that currently prevents - the htmlhelp target from building and maintains flexibility in case + tool command to include arguments. Therefore, even though it may look + "wrong", there are now two double quotes on either side of the tool + path definition. This fixes the problem that currently prevents the + htmlhelp target from building and maintains flexibility in case somebody needs to override it via the command line or an environment variable. 2009-11-01 Joe English - * doc/Eval.3, doc/Cancel.3: Move TIP#285 routines out of - Tcl_Eval(3) into their own manpage. + * doc/Eval.3, doc/Cancel.3: Move TIP#285 routines out of Eval.3 into + their own manpage. 2009-10-31 Donal K. Fellows diff --git a/doc/object.n b/doc/object.n index 0836728..68d642b 100644 --- a/doc/object.n +++ b/doc/object.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: object.n,v 1.4 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: object.n,v 1.5 2009/11/02 09:54:45 dkf Exp $ '\" .so man.macros .TH object n 0.1 TclOO "TclOO Commands" @@ -26,12 +26,24 @@ package require TclOO .SH DESCRIPTION .PP The \fBoo::object\fR class is the root class of the object hierarchy; every -object (and hence every class) is an instance of this class. Objects are -always referred to by their name, and may be \fBrename\fRd while maintaining -their identity. Each object has a unique namespace associated with it. +object is an instance of this class. Since classes are themselves objects, +they are instances of this class too. Objects are always referred to by their +name, and may be \fBrename\fRd while maintaining their identity. +.PP Instances of objects may be made with either the \fBcreate\fR or \fBnew\fR methods of the \fBoo::object\fR object itself, or by invoking those methods on -any of the subclass objects; see \fBoo::class\fR for more details. +any of the subclass objects; see \fBoo::class\fR for more details. The +configuration of individual objects (i.e., instance-specific methods, mixed-in +classes, etc.) may be controlled with the \fBoo::objdefine\fR command. +.PP +Each object has a unique namespace associated with it, the instance namespace. +This namespace holds all the instance variables of the object, and will be the +current namespace whenever a method of the object is invoked (including a +method of the class of the object). When the object is destroyed, its instance +namespace is deleted. The instance namespace contains the object's \fBmy\fR +command, which may be used to invoke non-exported methods of the object or to +create a reference to the object for the purpose of invokation which persists +across renamings of the object. .SS CONSTRUCTOR The \fBoo::object\fR class does not define an explicit constructor. .SS DESTRUCTOR -- cgit v0.12 From c3e8db2bc4a00a3b7367c21a0c6666a317ab9304 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 2 Nov 2009 10:03:12 +0000 Subject: Minor correction --- doc/my.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/my.n b/doc/my.n index fed03d6..2fe0ce7 100644 --- a/doc/my.n +++ b/doc/my.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: my.n,v 1.2 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: my.n,v 1.3 2009/11/02 10:03:12 dkf Exp $ '\" .so man.macros .TH my n 0.1 TclOO "TclOO Commands" @@ -29,7 +29,7 @@ method is invoked is always the one that is the current context of the method (i.e. the object that is returned by \fBself object\fR) from which the \fBmy\fR command is invoked. .PP -Each object has its own \fBmy\fR command, contained in its unique namespace. +Each object has its own \fBmy\fR command, contained in its instance namespace. .SH EXAMPLES .PP This example shows basic use of \fBmy\fR to use the \fBvariables\fR method of -- cgit v0.12 From 97be959b57d57492a48a9af06ffa4e9576a916ff Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Wed, 4 Nov 2009 00:35:27 +0000 Subject: * library/tzdata/Asia/Novokuznetsk: New tzdata locale for Kemerovo oblast', which now keeps Novosibirsk time and not Kranoyarsk time. * library/tzdata/Asia/Damascus: Syrian DST changes. * library/tzdata/Asia/Hong_Kong: Hong Kong historic DST corrections. Olson tzdata2009q. --- ChangeLog | 9 ++ library/tzdata/Asia/Damascus | 182 ++++++++++++++-------------- library/tzdata/Asia/Hong_Kong | 11 +- library/tzdata/Asia/Novokuznetsk | 248 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 355 insertions(+), 95 deletions(-) create mode 100644 library/tzdata/Asia/Novokuznetsk diff --git a/ChangeLog b/ChangeLog index c117e70..9293b28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-02 Kevin B. Kenny + + * library/tzdata/Asia/Novokuznetsk: New tzdata locale for + Kemerovo oblast', which now keeps Novosibirsk time and not + Kranoyarsk time. + * library/tzdata/Asia/Damascus: Syrian DST changes. + * library/tzdata/Asia/Hong_Kong: Hong Kong historic DST corrections. + Olson tzdata2009q. + 2009-11-02 Donal K. Fellows * doc/object.n (DESCRIPTION): Substantive revision to make it clearer diff --git a/library/tzdata/Asia/Damascus b/library/tzdata/Asia/Damascus index d57aeea..1a66b1d 100644 --- a/library/tzdata/Asia/Damascus +++ b/library/tzdata/Asia/Damascus @@ -96,185 +96,185 @@ set TZData(:Asia/Damascus) { {1207260000 10800 1 EEST} {1225486800 7200 0 EET} {1238104800 10800 1 EEST} - {1257022800 7200 0 EET} + {1256850000 7200 0 EET} {1269554400 10800 1 EEST} - {1288558800 7200 0 EET} + {1288299600 7200 0 EET} {1301004000 10800 1 EEST} - {1320094800 7200 0 EET} + {1319749200 7200 0 EET} {1333058400 10800 1 EEST} - {1351717200 7200 0 EET} + {1351198800 7200 0 EET} {1364508000 10800 1 EEST} - {1383253200 7200 0 EET} + {1382648400 7200 0 EET} {1395957600 10800 1 EEST} - {1414789200 7200 0 EET} + {1414702800 7200 0 EET} {1427407200 10800 1 EEST} - {1446325200 7200 0 EET} + {1446152400 7200 0 EET} {1458856800 10800 1 EEST} - {1477947600 7200 0 EET} + {1477602000 7200 0 EET} {1490911200 10800 1 EEST} - {1509483600 7200 0 EET} + {1509051600 7200 0 EET} {1522360800 10800 1 EEST} - {1541019600 7200 0 EET} + {1540501200 7200 0 EET} {1553810400 10800 1 EEST} - {1572555600 7200 0 EET} + {1571950800 7200 0 EET} {1585260000 10800 1 EEST} - {1604178000 7200 0 EET} + {1604005200 7200 0 EET} {1616709600 10800 1 EEST} - {1635714000 7200 0 EET} + {1635454800 7200 0 EET} {1648159200 10800 1 EEST} - {1667250000 7200 0 EET} + {1666904400 7200 0 EET} {1680213600 10800 1 EEST} - {1698786000 7200 0 EET} + {1698354000 7200 0 EET} {1711663200 10800 1 EEST} - {1730408400 7200 0 EET} + {1729803600 7200 0 EET} {1743112800 10800 1 EEST} - {1761944400 7200 0 EET} + {1761858000 7200 0 EET} {1774562400 10800 1 EEST} - {1793480400 7200 0 EET} + {1793307600 7200 0 EET} {1806012000 10800 1 EEST} - {1825016400 7200 0 EET} + {1824757200 7200 0 EET} {1838066400 10800 1 EEST} - {1856638800 7200 0 EET} + {1856206800 7200 0 EET} {1869516000 10800 1 EEST} - {1888174800 7200 0 EET} + {1887656400 7200 0 EET} {1900965600 10800 1 EEST} - {1919710800 7200 0 EET} + {1919106000 7200 0 EET} {1932415200 10800 1 EEST} - {1951246800 7200 0 EET} + {1951160400 7200 0 EET} {1963864800 10800 1 EEST} - {1982869200 7200 0 EET} + {1982610000 7200 0 EET} {1995314400 10800 1 EEST} - {2014405200 7200 0 EET} + {2014059600 7200 0 EET} {2027368800 10800 1 EEST} - {2045941200 7200 0 EET} + {2045509200 7200 0 EET} {2058818400 10800 1 EEST} - {2077477200 7200 0 EET} + {2076958800 7200 0 EET} {2090268000 10800 1 EEST} - {2109099600 7200 0 EET} + {2109013200 7200 0 EET} {2121717600 10800 1 EEST} - {2140635600 7200 0 EET} + {2140462800 7200 0 EET} {2153167200 10800 1 EEST} - {2172171600 7200 0 EET} + {2171912400 7200 0 EET} {2184616800 10800 1 EEST} - {2203707600 7200 0 EET} + {2203362000 7200 0 EET} {2216671200 10800 1 EEST} - {2235330000 7200 0 EET} + {2234811600 7200 0 EET} {2248120800 10800 1 EEST} - {2266866000 7200 0 EET} + {2266261200 7200 0 EET} {2279570400 10800 1 EEST} - {2298402000 7200 0 EET} + {2298315600 7200 0 EET} {2311020000 10800 1 EEST} - {2329938000 7200 0 EET} + {2329765200 7200 0 EET} {2342469600 10800 1 EEST} - {2361560400 7200 0 EET} + {2361214800 7200 0 EET} {2374524000 10800 1 EEST} - {2393096400 7200 0 EET} + {2392664400 7200 0 EET} {2405973600 10800 1 EEST} - {2424632400 7200 0 EET} + {2424114000 7200 0 EET} {2437423200 10800 1 EEST} - {2456168400 7200 0 EET} + {2455563600 7200 0 EET} {2468872800 10800 1 EEST} - {2487790800 7200 0 EET} + {2487618000 7200 0 EET} {2500322400 10800 1 EEST} - {2519326800 7200 0 EET} + {2519067600 7200 0 EET} {2531772000 10800 1 EEST} - {2550862800 7200 0 EET} + {2550517200 7200 0 EET} {2563826400 10800 1 EEST} - {2582398800 7200 0 EET} + {2581966800 7200 0 EET} {2595276000 10800 1 EEST} - {2614021200 7200 0 EET} + {2613416400 7200 0 EET} {2626725600 10800 1 EEST} - {2645557200 7200 0 EET} + {2645470800 7200 0 EET} {2658175200 10800 1 EEST} - {2677093200 7200 0 EET} + {2676920400 7200 0 EET} {2689624800 10800 1 EEST} - {2708629200 7200 0 EET} + {2708370000 7200 0 EET} {2721679200 10800 1 EEST} - {2740251600 7200 0 EET} + {2739819600 7200 0 EET} {2753128800 10800 1 EEST} - {2771787600 7200 0 EET} + {2771269200 7200 0 EET} {2784578400 10800 1 EEST} - {2803323600 7200 0 EET} + {2802718800 7200 0 EET} {2816028000 10800 1 EEST} - {2834859600 7200 0 EET} + {2834773200 7200 0 EET} {2847477600 10800 1 EEST} - {2866482000 7200 0 EET} + {2866222800 7200 0 EET} {2878927200 10800 1 EEST} - {2898018000 7200 0 EET} + {2897672400 7200 0 EET} {2910981600 10800 1 EEST} - {2929554000 7200 0 EET} + {2929122000 7200 0 EET} {2942431200 10800 1 EEST} - {2961090000 7200 0 EET} + {2960571600 7200 0 EET} {2973880800 10800 1 EEST} - {2992712400 7200 0 EET} + {2992626000 7200 0 EET} {3005330400 10800 1 EEST} - {3024248400 7200 0 EET} + {3024075600 7200 0 EET} {3036780000 10800 1 EEST} - {3055784400 7200 0 EET} + {3055525200 7200 0 EET} {3068229600 10800 1 EEST} - {3087320400 7200 0 EET} + {3086974800 7200 0 EET} {3100284000 10800 1 EEST} - {3118942800 7200 0 EET} + {3118424400 7200 0 EET} {3131733600 10800 1 EEST} - {3150478800 7200 0 EET} + {3149874000 7200 0 EET} {3163183200 10800 1 EEST} - {3182014800 7200 0 EET} + {3181928400 7200 0 EET} {3194632800 10800 1 EEST} - {3213550800 7200 0 EET} + {3213378000 7200 0 EET} {3226082400 10800 1 EEST} - {3245173200 7200 0 EET} + {3244827600 7200 0 EET} {3258136800 10800 1 EEST} - {3276709200 7200 0 EET} + {3276277200 7200 0 EET} {3289586400 10800 1 EEST} - {3308245200 7200 0 EET} + {3307726800 7200 0 EET} {3321036000 10800 1 EEST} - {3339781200 7200 0 EET} + {3339176400 7200 0 EET} {3352485600 10800 1 EEST} - {3371403600 7200 0 EET} + {3371230800 7200 0 EET} {3383935200 10800 1 EEST} - {3402939600 7200 0 EET} + {3402680400 7200 0 EET} {3415384800 10800 1 EEST} - {3434475600 7200 0 EET} + {3434130000 7200 0 EET} {3447439200 10800 1 EEST} - {3466011600 7200 0 EET} + {3465579600 7200 0 EET} {3478888800 10800 1 EEST} - {3497634000 7200 0 EET} + {3497029200 7200 0 EET} {3510338400 10800 1 EEST} - {3529170000 7200 0 EET} + {3529083600 7200 0 EET} {3541788000 10800 1 EEST} - {3560706000 7200 0 EET} + {3560533200 7200 0 EET} {3573237600 10800 1 EEST} - {3592242000 7200 0 EET} + {3591982800 7200 0 EET} {3605292000 10800 1 EEST} - {3623864400 7200 0 EET} + {3623432400 7200 0 EET} {3636741600 10800 1 EEST} - {3655400400 7200 0 EET} + {3654882000 7200 0 EET} {3668191200 10800 1 EEST} - {3686936400 7200 0 EET} + {3686331600 7200 0 EET} {3699640800 10800 1 EEST} - {3718472400 7200 0 EET} + {3718386000 7200 0 EET} {3731090400 10800 1 EEST} - {3750094800 7200 0 EET} + {3749835600 7200 0 EET} {3762540000 10800 1 EEST} - {3781630800 7200 0 EET} + {3781285200 7200 0 EET} {3794594400 10800 1 EEST} - {3813166800 7200 0 EET} + {3812734800 7200 0 EET} {3826044000 10800 1 EEST} - {3844702800 7200 0 EET} + {3844184400 7200 0 EET} {3857493600 10800 1 EEST} - {3876325200 7200 0 EET} + {3876238800 7200 0 EET} {3888943200 10800 1 EEST} - {3907861200 7200 0 EET} + {3907688400 7200 0 EET} {3920392800 10800 1 EEST} - {3939397200 7200 0 EET} + {3939138000 7200 0 EET} {3951842400 10800 1 EEST} - {3970933200 7200 0 EET} + {3970587600 7200 0 EET} {3983896800 10800 1 EEST} - {4002555600 7200 0 EET} + {4002037200 7200 0 EET} {4015346400 10800 1 EEST} - {4034091600 7200 0 EET} + {4033486800 7200 0 EET} {4046796000 10800 1 EEST} - {4065627600 7200 0 EET} + {4065541200 7200 0 EET} {4078245600 10800 1 EEST} - {4097163600 7200 0 EET} + {4096990800 7200 0 EET} } diff --git a/library/tzdata/Asia/Hong_Kong b/library/tzdata/Asia/Hong_Kong index 88d8091..8304a62 100644 --- a/library/tzdata/Asia/Hong_Kong +++ b/library/tzdata/Asia/Hong_Kong @@ -3,6 +3,10 @@ set TZData(:Asia/Hong_Kong) { {-9223372036854775808 27396 0 LMT} {-2056692996 28800 0 HKT} + {-907389000 32400 1 HKST} + {-891667800 28800 0 HKT} + {-884246400 32400 0 JST} + {-766746000 28800 0 HKT} {-747981000 32400 1 HKST} {-728544600 28800 0 HKT} {-717049800 32400 1 HKST} @@ -16,7 +20,7 @@ set TZData(:Asia/Hong_Kong) { {-591856200 32400 1 HKST} {-573715800 28800 0 HKT} {-559801800 32400 1 HKST} - {-542266200 28800 0 HKT} + {-542352600 28800 0 HKT} {-528352200 32400 1 HKST} {-510211800 28800 0 HKT} {-498112200 32400 1 HKST} @@ -59,7 +63,8 @@ set TZData(:Asia/Hong_Kong) { {88540200 28800 0 HKT} {104268600 32400 1 HKST} {119989800 28800 0 HKT} - {135718200 32400 1 HKST} + {126041400 32400 1 HKST} + {135714600 32400 1 HKST} {151439400 28800 0 HKT} {167167800 32400 1 HKST} {182889000 28800 0 HKT} @@ -69,6 +74,4 @@ set TZData(:Asia/Hong_Kong) { {245788200 28800 0 HKT} {295385400 32400 1 HKST} {309292200 28800 0 HKT} - {326835000 32400 1 HKST} - {340741800 28800 0 HKT} } diff --git a/library/tzdata/Asia/Novokuznetsk b/library/tzdata/Asia/Novokuznetsk new file mode 100644 index 0000000..d3d611d --- /dev/null +++ b/library/tzdata/Asia/Novokuznetsk @@ -0,0 +1,248 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:Asia/Novokuznetsk) { + {-9223372036854775808 20928 0 NMT} + {-1577512128 21600 0 KRAT} + {-1247551200 25200 0 KRAMMTT} + {354906000 28800 1 KRAST} + {370713600 25200 0 KRAT} + {386442000 28800 1 KRAST} + {402249600 25200 0 KRAT} + {417978000 28800 1 KRAST} + {433785600 25200 0 KRAT} + {449600400 28800 1 KRAST} + {465332400 25200 0 KRAT} + {481057200 28800 1 KRAST} + {496782000 25200 0 KRAT} + {512506800 28800 1 KRAST} + {528231600 25200 0 KRAT} + {543956400 28800 1 KRAST} + {559681200 25200 0 KRAT} + {575406000 28800 1 KRAST} + {591130800 25200 0 KRAT} + {606855600 28800 1 KRAST} + {622580400 25200 0 KRAT} + {638305200 28800 1 KRAST} + {654634800 25200 0 KRAT} + {670359600 21600 0 KRAMMTT} + {670363200 25200 1 KRAST} + {686088000 21600 0 KRAT} + {695764800 25200 0 KRAMMTT} + {701798400 28800 1 KRAST} + {717519600 25200 0 KRAT} + {733258800 28800 1 KRAST} + {748983600 25200 0 KRAT} + {764708400 28800 1 KRAST} + {780433200 25200 0 KRAT} + {796158000 28800 1 KRAST} + {811882800 25200 0 KRAT} + {828212400 28800 1 KRAST} + {846356400 25200 0 KRAT} + {859662000 28800 1 KRAST} + {877806000 25200 0 KRAT} + {891111600 28800 1 KRAST} + {909255600 25200 0 KRAT} + {922561200 28800 1 KRAST} + {941310000 25200 0 KRAT} + {954010800 28800 1 KRAST} + {972759600 25200 0 KRAT} + {985460400 28800 1 KRAST} + {1004209200 25200 0 KRAT} + {1017514800 28800 1 KRAST} + {1035658800 25200 0 KRAT} + {1048964400 28800 1 KRAST} + {1067108400 25200 0 KRAT} + {1080414000 28800 1 KRAST} + {1099162800 25200 0 KRAT} + {1111863600 28800 1 KRAST} + {1130612400 25200 0 KRAT} + {1143313200 28800 1 KRAST} + {1162062000 25200 0 KRAT} + {1174762800 28800 1 KRAST} + {1193511600 25200 0 KRAT} + {1206817200 28800 1 KRAST} + {1224961200 25200 0 KRAT} + {1238266800 28800 1 KRAST} + {1256410800 25200 0 KRAT} + {1269716400 21600 0 NOVMMTT} + {1269720000 25200 1 NOVST} + {1288468800 21600 0 NOVT} + {1301169600 25200 1 NOVST} + {1319918400 21600 0 NOVT} + {1332619200 25200 1 NOVST} + {1351368000 21600 0 NOVT} + {1364673600 25200 1 NOVST} + {1382817600 21600 0 NOVT} + {1396123200 25200 1 NOVST} + {1414267200 21600 0 NOVT} + {1427572800 25200 1 NOVST} + {1445716800 21600 0 NOVT} + {1459022400 25200 1 NOVST} + {1477771200 21600 0 NOVT} + {1490472000 25200 1 NOVST} + {1509220800 21600 0 NOVT} + {1521921600 25200 1 NOVST} + {1540670400 21600 0 NOVT} + {1553976000 25200 1 NOVST} + {1572120000 21600 0 NOVT} + {1585425600 25200 1 NOVST} + {1603569600 21600 0 NOVT} + {1616875200 25200 1 NOVST} + {1635624000 21600 0 NOVT} + {1648324800 25200 1 NOVST} + {1667073600 21600 0 NOVT} + {1679774400 25200 1 NOVST} + {1698523200 21600 0 NOVT} + {1711828800 25200 1 NOVST} + {1729972800 21600 0 NOVT} + {1743278400 25200 1 NOVST} + {1761422400 21600 0 NOVT} + {1774728000 25200 1 NOVST} + {1792872000 21600 0 NOVT} + {1806177600 25200 1 NOVST} + {1824926400 21600 0 NOVT} + {1837627200 25200 1 NOVST} + {1856376000 21600 0 NOVT} + {1869076800 25200 1 NOVST} + {1887825600 21600 0 NOVT} + {1901131200 25200 1 NOVST} + {1919275200 21600 0 NOVT} + {1932580800 25200 1 NOVST} + {1950724800 21600 0 NOVT} + {1964030400 25200 1 NOVST} + {1982779200 21600 0 NOVT} + {1995480000 25200 1 NOVST} + {2014228800 21600 0 NOVT} + {2026929600 25200 1 NOVST} + {2045678400 21600 0 NOVT} + {2058379200 25200 1 NOVST} + {2077128000 21600 0 NOVT} + {2090433600 25200 1 NOVST} + {2108577600 21600 0 NOVT} + {2121883200 25200 1 NOVST} + {2140027200 21600 0 NOVT} + {2153332800 25200 1 NOVST} + {2172081600 21600 0 NOVT} + {2184782400 25200 1 NOVST} + {2203531200 21600 0 NOVT} + {2216232000 25200 1 NOVST} + {2234980800 21600 0 NOVT} + {2248286400 25200 1 NOVST} + {2266430400 21600 0 NOVT} + {2279736000 25200 1 NOVST} + {2297880000 21600 0 NOVT} + {2311185600 25200 1 NOVST} + {2329329600 21600 0 NOVT} + {2342635200 25200 1 NOVST} + {2361384000 21600 0 NOVT} + {2374084800 25200 1 NOVST} + {2392833600 21600 0 NOVT} + {2405534400 25200 1 NOVST} + {2424283200 21600 0 NOVT} + {2437588800 25200 1 NOVST} + {2455732800 21600 0 NOVT} + {2469038400 25200 1 NOVST} + {2487182400 21600 0 NOVT} + {2500488000 25200 1 NOVST} + {2519236800 21600 0 NOVT} + {2531937600 25200 1 NOVST} + {2550686400 21600 0 NOVT} + {2563387200 25200 1 NOVST} + {2582136000 21600 0 NOVT} + {2595441600 25200 1 NOVST} + {2613585600 21600 0 NOVT} + {2626891200 25200 1 NOVST} + {2645035200 21600 0 NOVT} + {2658340800 25200 1 NOVST} + {2676484800 21600 0 NOVT} + {2689790400 25200 1 NOVST} + {2708539200 21600 0 NOVT} + {2721240000 25200 1 NOVST} + {2739988800 21600 0 NOVT} + {2752689600 25200 1 NOVST} + {2771438400 21600 0 NOVT} + {2784744000 25200 1 NOVST} + {2802888000 21600 0 NOVT} + {2816193600 25200 1 NOVST} + {2834337600 21600 0 NOVT} + {2847643200 25200 1 NOVST} + {2866392000 21600 0 NOVT} + {2879092800 25200 1 NOVST} + {2897841600 21600 0 NOVT} + {2910542400 25200 1 NOVST} + {2929291200 21600 0 NOVT} + {2941992000 25200 1 NOVST} + {2960740800 21600 0 NOVT} + {2974046400 25200 1 NOVST} + {2992190400 21600 0 NOVT} + {3005496000 25200 1 NOVST} + {3023640000 21600 0 NOVT} + {3036945600 25200 1 NOVST} + {3055694400 21600 0 NOVT} + {3068395200 25200 1 NOVST} + {3087144000 21600 0 NOVT} + {3099844800 25200 1 NOVST} + {3118593600 21600 0 NOVT} + {3131899200 25200 1 NOVST} + {3150043200 21600 0 NOVT} + {3163348800 25200 1 NOVST} + {3181492800 21600 0 NOVT} + {3194798400 25200 1 NOVST} + {3212942400 21600 0 NOVT} + {3226248000 25200 1 NOVST} + {3244996800 21600 0 NOVT} + {3257697600 25200 1 NOVST} + {3276446400 21600 0 NOVT} + {3289147200 25200 1 NOVST} + {3307896000 21600 0 NOVT} + {3321201600 25200 1 NOVST} + {3339345600 21600 0 NOVT} + {3352651200 25200 1 NOVST} + {3370795200 21600 0 NOVT} + {3384100800 25200 1 NOVST} + {3402849600 21600 0 NOVT} + {3415550400 25200 1 NOVST} + {3434299200 21600 0 NOVT} + {3447000000 25200 1 NOVST} + {3465748800 21600 0 NOVT} + {3479054400 25200 1 NOVST} + {3497198400 21600 0 NOVT} + {3510504000 25200 1 NOVST} + {3528648000 21600 0 NOVT} + {3541953600 25200 1 NOVST} + {3560097600 21600 0 NOVT} + {3573403200 25200 1 NOVST} + {3592152000 21600 0 NOVT} + {3604852800 25200 1 NOVST} + {3623601600 21600 0 NOVT} + {3636302400 25200 1 NOVST} + {3655051200 21600 0 NOVT} + {3668356800 25200 1 NOVST} + {3686500800 21600 0 NOVT} + {3699806400 25200 1 NOVST} + {3717950400 21600 0 NOVT} + {3731256000 25200 1 NOVST} + {3750004800 21600 0 NOVT} + {3762705600 25200 1 NOVST} + {3781454400 21600 0 NOVT} + {3794155200 25200 1 NOVST} + {3812904000 21600 0 NOVT} + {3825604800 25200 1 NOVST} + {3844353600 21600 0 NOVT} + {3857659200 25200 1 NOVST} + {3875803200 21600 0 NOVT} + {3889108800 25200 1 NOVST} + {3907252800 21600 0 NOVT} + {3920558400 25200 1 NOVST} + {3939307200 21600 0 NOVT} + {3952008000 25200 1 NOVST} + {3970756800 21600 0 NOVT} + {3983457600 25200 1 NOVST} + {4002206400 21600 0 NOVT} + {4015512000 25200 1 NOVST} + {4033656000 21600 0 NOVT} + {4046961600 25200 1 NOVST} + {4065105600 21600 0 NOVT} + {4078411200 25200 1 NOVST} + {4096555200 21600 0 NOVT} +} -- cgit v0.12 From 0eeb8c70aaeec2c83523759cdc4e183991bef445 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Nov 2009 17:49:16 +0000 Subject: Clarified [namespace import] and NAME RESOLUTION --- doc/namespace.n | 157 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 83 insertions(+), 74 deletions(-) diff --git a/doc/namespace.n b/doc/namespace.n index 52dde94..6d9fae2 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.36 2009/09/23 23:36:50 msofer Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.37 2009/11/05 17:49:16 dkf Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -175,6 +175,8 @@ namespaces. The commands in the returned list are in the format of simple names, with no namespace qualifiers at all. This format is suitable for composition with \fBnamespace forget\fR (see \fBEXAMPLES\fR below). +.RS +.PP When \fIpattern\fR arguments are present, each \fIpattern\fR is a qualified name like \fBfoo::x\fR or \fBa::p*\fR. @@ -182,6 +184,11 @@ That is, it includes the name of an exporting namespace and may have glob-style special characters in the command name at the end of the qualified name. Glob characters may not appear in a namespace name. +When the namespace name is not fully qualified (i.e., does not start +with a namespace separator) it is resolved as a namespace name in the +way described in the \fBNAME RESOLUTION\fR section; it is an error if +no namespace with that name can be found. +.PP All the commands that match a \fIpattern\fR string and which are currently exported from their namespace are added to the current namespace. @@ -190,7 +197,7 @@ that points to the exported command in its original namespace; when the new imported command is called, it invokes the exported command. This command normally returns an error if an imported command conflicts with an existing command. -However, if the \-\fBforce\fR option is given, +However, if the \fB\-force\fR option is given, imported commands will silently replace existing commands. The \fBnamespace import\fR command has snapshot semantics: that is, only requested commands that are currently defined @@ -199,6 +206,7 @@ In other words, you can import only the commands that are in a namespace at the time when the \fBnamespace import\fR command is executed. If another command is defined and exported in this namespace later on, it will not be imported. +.RE .TP \fBnamespace inscope\fR \fInamespace\fR \fIscript\fR ?\fIarg ...\fR? . @@ -333,13 +341,13 @@ For example, .PP .CS \fBnamespace eval\fR Counter { - \fBnamespace export\fR bump - variable num 0 + \fBnamespace export\fR bump + variable num 0 - proc bump {} { - variable num - incr num - } + proc bump {} { + variable num + incr num + } } .CE .PP @@ -365,19 +373,19 @@ as the namespace definition shown above: .PP .CS \fBnamespace eval\fR Counter { - variable num 0 - proc bump {} { - variable num - return [incr num] - } + variable num 0 + proc bump {} { + variable num + return [incr num] + } } \fBnamespace eval\fR Counter { - proc test {args} { - return $args - } + proc test {args} { + return $args + } } \fBnamespace eval\fR Counter { - rename test "" + rename test "" } .CE .PP @@ -470,24 +478,25 @@ you mean. However, if the name does not start with a \fB::\fR (i.e., is \fIrelative\fR), Tcl follows basic rules for looking it up: -Variable names are always resolved -by looking first in the current namespace, -and then in the global namespace. -Command names are also always resolved by looking in the current -namespace first. If not found there, they are searched for in every -namespace on the current namespace's command path (which is empty by -default). If not found there, command names are looked up in the -global namespace (or, failing that, are processed by the \fBunknown\fR -command.) -Namespace names, on the other hand, are always resolved -by looking in only the current namespace. +.IP \(bu +\fBVariable names\fR are always resolved by looking first in the current +namespace, and then in the global namespace. +.IP \(bu +\fBCommand names\fR are always resolved by looking in the current namespace +first. If not found there, they are searched for in every namespace on the +current namespace's command path (which is empty by default). If not found +there, command names are looked up in the global namespace (or, failing that, +are processed by the appropriate \fBnamespace unknown\fR handler.) +.IP \(bu +\fBNamespace names\fR are always resolved by looking in only the current +namespace. .PP In the following example, .PP .CS set traceLevel 0 \fBnamespace eval\fR Debug { - printTrace $traceLevel + printTrace $traceLevel } .CE .PP @@ -501,11 +510,11 @@ To make this point absolutely clear, consider the following example: .CS set traceLevel 0 \fBnamespace eval\fR Foo { - variable traceLevel 3 + variable traceLevel 3 - \fBnamespace eval\fR Debug { - printTrace $traceLevel - } + \fBnamespace eval\fR Debug { + printTrace $traceLevel + } } .CE .PP @@ -642,27 +651,27 @@ You can export commands from a namespace like this: .PP .CS \fBnamespace eval\fR Counter { - \fBnamespace export\fR bump reset - variable Num 0 - variable Max 100 + \fBnamespace export\fR bump reset + variable Num 0 + variable Max 100 - proc bump {{by 1}} { - variable Num - incr Num $by - Check - return $Num - } - proc reset {} { - variable Num - set Num 0 - } - proc Check {} { - variable Num - variable Max - if {$Num > $Max} { - error "too high!" - } - } + proc bump {{by 1}} { + variable Num + incr Num $by + Check + return $Num + } + proc reset {} { + variable Num + set Num 0 + } + proc Check {} { + variable Num + variable Max + if {$Num > $Max} { + error "too high!" + } + } } .CE .PP @@ -693,13 +702,13 @@ namespace: .PP .CS \fBnamespace eval\fR a { - variable b - proc theTraceCallback { n1 n2 op } { - upvar 1 $n1 var - puts "the value of $n1 has changed to $var" - return - } - trace variable b w [\fBnamespace code\fR theTraceCallback] + variable b + proc theTraceCallback { n1 n2 op } { + upvar 1 $n1 var + puts "the value of $n1 has changed to $var" + return + } + trace variable b w [\fBnamespace code\fR theTraceCallback] } set a::b c .CE @@ -885,12 +894,12 @@ Create a namespace containing a variable and an exported command: .PP .CS \fBnamespace eval\fR foo { - variable bar 0 - proc grill {} { - variable bar - puts "called [incr bar] times" - } - \fBnamespace export\fR grill + variable bar 0 + proc grill {} { + variable bar + puts "called [incr bar] times" + } + \fBnamespace export\fR grill } .CE .PP @@ -902,8 +911,8 @@ Call the command defined in the previous example in various ways. # Use the command resolution path to find the name \fBnamespace eval\fR boo { - \fBnamespace path\fR ::foo - grill + \fBnamespace path\fR ::foo + grill } # Import into current namespace, then call local alias @@ -913,8 +922,8 @@ grill # Create two ensembles, one with the default name and one with a # specified name. Then call through the ensembles. \fBnamespace eval\fR foo { - \fBnamespace ensemble\fR create - \fBnamespace ensemble\fR create -command ::foobar + \fBnamespace ensemble\fR create + \fBnamespace ensemble\fR create -command ::foobar } foo grill foobar grill @@ -939,10 +948,10 @@ and second arguments. .PP .CS \fBnamespace eval\fR do { - \fBnamespace export\fR * - \fBnamespace ensemble\fR create -parameters x - proc plus {x y} {expr { $x + $y }} - proc minus {x y} {expr { $x - $y }} + \fBnamespace export\fR * + \fBnamespace ensemble\fR create -parameters x + proc plus {x y} {expr { $x + $y }} + proc minus {x y} {expr { $x - $y }} } # In use, the ensemble works like this: -- cgit v0.12 From c730a4d0e41f630e5663304d9265925b5bd3fd34 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Nov 2009 17:56:45 +0000 Subject: Clarification --- doc/class.n | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/doc/class.n b/doc/class.n index d62b4a5..0d29076 100644 --- a/doc/class.n +++ b/doc/class.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: class.n,v 1.3 2009/08/22 11:29:22 dkf Exp $ +'\" RCS: @(#) $Id: class.n,v 1.4 2009/11/05 17:56:45 dkf Exp $ '\" .so man.macros .TH class n 0.1 TclOO "TclOO Commands" @@ -26,10 +26,16 @@ package require TclOO .BE .SH DESCRIPTION .PP +Classes are objects that can manufacture other objects according to a pattern +stored in the factory object (the class). An instance of the class is created +by calling one of the class's factory methods, typically either \fBcreate\fR +if an explicit name is being given, or \fBnew\fR if an arbitrary unique name +is to be automatically selected. +.PP The \fBoo::class\fR class is the class of all classes; every class is an instance of this class, which is consequently an instance of itself. This class is a subclass of \fBoo::object\fR, so every class is also an object. -Additional metaclasses (i.e. classes of classes) can be defined if necessary +Additional metaclasses (i.e., classes of classes) can be defined if necessary by subclassing \fBoo::class\fR. Note that the \fBoo::class\fR object hides the \fBnew\fR method on itself, so new classes should always be made using the \fBcreate\fR method. @@ -60,11 +66,14 @@ the result of this method call. This creates a new instance of the class \fIcls\fR with a new unique name, passing the arguments, \fIarg ...\fR, to the constructor, and (if that returns a successful result) returning the fully qualified name of the created object -(the result of the constructor is ignored). If the constructor fails (i.e. +(the result of the constructor is ignored). If the constructor fails (i.e., returns a non-OK result) then the object is destroyed and the error message is -the result of this method call. Note that this method is not exported by the -\fBoo::class\fR object itself, so classes should not be created using this -method. +the result of this method call. +.RS +.PP +Note that this method is not exported by the \fBoo::class\fR object itself, so +classes should not be created using this method. +.RE .SS "NON-EXPORTED METHODS" .PP The \fBoo::class\fR class supports the following non-exported methods: @@ -78,7 +87,7 @@ a successful result) returning the fully qualified name of the created object (the result of the constructor is ignored). The name of the instance's internal namespace will be \fInsName\fR unless that namespace already exists (when an arbitrary name will be chosen instead). If the constructor fails -(i.e. returns a non-OK result) then the object is destroyed and the error +(i.e., returns a non-OK result) then the object is destroyed and the error message is the result of this method call. .SH EXAMPLES .PP -- cgit v0.12 From 73280bfc7d6e25cbf5ae3c71e6d1e8f4829a2d28 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 19:07:35 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (1) Change all procedure names to be fully qualified. --- ChangeLog | 7 +++++ library/safe.tcl | 78 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9293b28..75f4d1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-05 Andreas Kupries + + * library/safe.tcl: A series of patches which bring the SafeBase + up to date with code guidelines, Tcl's features, also eliminating + a number of inefficiencies along the way. + (1) Change all procedure names to be fully qualified. + 2009-11-02 Kevin B. Kenny * library/tzdata/Asia/Novokuznetsk: New tzdata locale for diff --git a/library/safe.tcl b/library/safe.tcl index ba1c4f5..4d42f2e 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.19 2009/10/05 20:02:55 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.20 2009/11/05 19:07:35 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -71,7 +71,7 @@ namespace eval ::safe { # Helper function to resolve the dual way of specifying staticsok (either # by -noStatics or -statics 0) - proc InterpStatics {} { + proc ::safe::InterpStatics {} { foreach v {Args statics noStatics} { upvar $v $v } @@ -90,7 +90,7 @@ namespace eval ::safe { # Helper function to resolve the dual way of specifying nested loading # (either by -nestedLoadOk or -nested 1) - proc InterpNested {} { + proc ::safe::InterpNested {} { foreach v {Args nested nestedLoadOk} { upvar $v $v } @@ -117,13 +117,13 @@ namespace eval ::safe { #### # Interface/entry point function and front end for "Create" - proc interpCreate {args} { + proc ::safe::interpCreate {args} { set Args [::tcl::OptKeyParse ::safe::interpCreate $args] InterpCreate $slave $accessPath \ [InterpStatics] [InterpNested] $deleteHook } - proc interpInit {args} { + proc ::safe::interpInit {args} { set Args [::tcl::OptKeyParse ::safe::interpIC $args] if {![::interp exists $slave]} { return -code error "\"$slave\" is not an interpreter" @@ -132,7 +132,7 @@ namespace eval ::safe { [InterpStatics] [InterpNested] $deleteHook } - proc CheckInterp {slave} { + proc ::safe::CheckInterp {slave} { if {![IsInterp $slave]} { return -code error \ "\"$slave\" is not an interpreter managed by ::safe::" @@ -152,7 +152,7 @@ namespace eval ::safe { # create/init but which makes life hard in configure... # So this will be hopefully written and some integrated with opt1.0 # (hopefully for tcl8.1 ?) - proc interpConfigure {args} { + proc ::safe::interpConfigure {args} { switch [llength $args] { 1 { # If we have exactly 1 argument the semantic is to return all @@ -505,7 +505,7 @@ proc ::safe::interpAddToAccessPath {slave path} { # Add (only if needed, avoid duplicates) 1 level of sub directories to an # existing path list. Also removes non directories from the returned # list. - proc AddSubDirs {pathList} { + proc ::safe::AddSubDirs {pathList} { set res {} foreach dir $pathList { if {[file isdirectory $dir]} { @@ -568,7 +568,7 @@ proc ::safe::interpDelete {slave} { return } - # Set (or get) the loging mecanism + # Set (or get) the logging mecanism proc ::safe::setLogCmd {args} { variable Log @@ -590,7 +590,7 @@ proc ::safe::setLogCmd {args} { # Sets the slave auto_path to the master recorded value. Also sets # tcl_library to the first token of the virtual path. # - proc SyncAccessPath {slave} { + proc ::safe::SyncAccessPath {slave} { set slave_auto_path [Set [VirtualPathListName $slave]] ::interp eval $slave [list set auto_path $slave_auto_path] Log $slave "auto_path in $slave has been set to $slave_auto_path"\ @@ -602,18 +602,18 @@ proc ::safe::setLogCmd {args} { # slave foo is thus "Sfoo" and for sub slave {foo bar} "Sfoo bar" (spaces # are handled ok everywhere (or should)). We add the S prefix to avoid # that a slave interp called "Log" would smash our "Log" variable. - proc InterpStateName {slave} { + proc ::safe::InterpStateName {slave} { return "S$slave" } # Check that the given slave is "one of us" - proc IsInterp {slave} { + proc ::safe::IsInterp {slave} { expr {[Exists [InterpStateName $slave]] && [::interp exists $slave]} } # Returns the virtual token for directory number N. If the slave argument # is given, it will return the corresponding master global variable name - proc PathToken {n {slave ""}} { + proc ::safe::PathToken {n {slave ""}} { if {$slave ne ""} { return "[InterpStateName $slave](access_path,$n)" } else { @@ -623,70 +623,70 @@ proc ::safe::setLogCmd {args} { } } # returns the variable name of the complete path list - proc PathListName {slave} { + proc ::safe::PathListName {slave} { return "[InterpStateName $slave](access_path)" } # returns the variable name of the complete path list - proc VirtualPathListName {slave} { + proc ::safe::VirtualPathListName {slave} { return "[InterpStateName $slave](access_path_slave)" } # returns the variable name of the complete tm path list - proc TmPathListName {slave} { + proc ::safe::TmPathListName {slave} { return "[InterpStateName $slave](tm_path_slave)" } # returns the variable name of the number of items - proc PathNumberName {slave} { + proc ::safe::PathNumberName {slave} { return "[InterpStateName $slave](access_path,n)" } # returns the staticsok flag var name - proc StaticsOkName {slave} { + proc ::safe::StaticsOkName {slave} { return "[InterpStateName $slave](staticsok)" } # returns the nestedok flag var name - proc NestedOkName {slave} { + proc ::safe::NestedOkName {slave} { return "[InterpStateName $slave](nestedok)" } # Run some code at the namespace toplevel - proc Toplevel {args} { + proc ::safe::Toplevel {args} { namespace eval [namespace current] $args } # set/get values - proc Set {args} { + proc ::safe::Set {args} { Toplevel set {*}$args } # lappend on toplevel vars - proc Lappend {args} { + proc ::safe::Lappend {args} { Toplevel lappend {*}$args } # unset a var/token (currently just an global level eval) - proc Unset {args} { + proc ::safe::Unset {args} { Toplevel unset {*}$args } # test existance - proc Exists {varname} { + proc ::safe::Exists {varname} { Toplevel info exists $varname } # short cut for access path getting - proc GetAccessPath {slave} { + proc ::safe::GetAccessPath {slave} { Set [PathListName $slave] } # short cut for statics ok flag getting - proc StaticsOk {slave} { + proc ::safe::StaticsOk {slave} { Set [StaticsOkName $slave] } # short cut for getting the multiples interps sub loading ok flag - proc NestedOk {slave} { + proc ::safe::NestedOk {slave} { Set [NestedOkName $slave] } # interp deletion storing hook name - proc DeleteHookName {slave} { + proc ::safe::DeleteHookName {slave} { return [InterpStateName $slave](cleanupHook) } # # translate virtual path into real path # - proc TranslatePath {slave path} { + proc ::safe::TranslatePath {slave path} { # somehow strip the namespaces 'functionality' out (the danger is that # we would strip valid macintosh "../" queries... : if {[string match "*::*" $path] || [string match "*..*" $path]} { @@ -704,7 +704,7 @@ proc ::safe::setLogCmd {args} { # Log eventually log an error; to enable error logging, set Log to {puts # stderr} for instance - proc Log {slave msg {type ERROR}} { + proc ::safe::Log {slave msg {type ERROR}} { variable Log if {[info exists Log] && [llength $Log]} { {*}$Log "$type for slave $slave : $msg" @@ -714,7 +714,7 @@ proc ::safe::setLogCmd {args} { # file name control (limit access to files/resources that should be a # valid tcl source file) - proc CheckFileName {slave file} { + proc ::safe::CheckFileName {slave file} { # This used to limit what can be sourced to ".tcl" and forbid files # with more than 1 dot and longer than 14 chars, but I changed that # for 8.4 as a safe interp has enough internal protection already to @@ -733,7 +733,7 @@ proc ::safe::setLogCmd {args} { # AliasGlob is the target of the "glob" alias in safe interpreters. - proc AliasGlob {slave args} { + proc ::safe::AliasGlob {slave args} { Log $slave "GLOB ! $args" NOTICE set cmd {} set at 0 @@ -814,7 +814,7 @@ proc ::safe::setLogCmd {args} { # AliasSource is the target of the "source" alias in safe interpreters. - proc AliasSource {slave args} { + proc ::safe::AliasSource {slave args} { set argc [llength $args] # Extended for handling of Tcl Modules to allow not only "source # filename", but "source -encoding E filename" as well. @@ -870,7 +870,7 @@ proc ::safe::setLogCmd {args} { # AliasLoad is the target of the "load" alias in safe interpreters. - proc AliasLoad {slave file args} { + proc ::safe::AliasLoad {slave file args} { set argc [llength $args] if {$argc > 2} { set msg "load error: too many arguments" @@ -942,7 +942,7 @@ proc ::safe::setLogCmd {args} { # the security here relies on "file dirname" answering the proper # result... needs checking ? - proc FileInAccessPath {slave file} { + proc ::safe::FileInAccessPath {slave file} { set access_path [GetAccessPath $slave] if {[file isdirectory $file]} { @@ -962,7 +962,7 @@ proc ::safe::setLogCmd {args} { } } - proc DirInAccessPath {slave dir} { + proc ::safe::DirInAccessPath {slave dir} { set access_path [GetAccessPath $slave] if {[file isfile $dir]} { @@ -984,7 +984,7 @@ proc ::safe::setLogCmd {args} { # This procedure enables access from a safe interpreter to only a subset # of the subcommands of a command: - proc Subset {slave command okpat args} { + proc ::safe::Subset {slave command okpat args} { set subcommand [lindex $args 0] if {[regexp $okpat $subcommand]} { return [$command {*}$args] @@ -1001,7 +1001,7 @@ proc ::safe::setLogCmd {args} { # # Syntax is: AliasSubset slave alias target subcommand1 subcommand2... - proc AliasSubset {slave alias target args} { + proc ::safe::AliasSubset {slave alias target args} { set pat "^(" set sep "" foreach sub $args { @@ -1015,7 +1015,7 @@ proc ::safe::setLogCmd {args} { # AliasEncoding is the target of the "encoding" alias in safe interpreters. - proc AliasEncoding {slave args} { + proc ::safe::AliasEncoding {slave args} { set argc [llength $args] set okpat "^(name.*|convert.*)\$" -- cgit v0.12 From c4f418ddbd4f1743368cb4b3f70c4cb9f83f7d9a Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 19:18:52 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (2) Move the procedures out of the namespace eval. Keep their locations. IOW, break the namespace eval apart into small sectionsnot covering the procedure definitions. --- ChangeLog | 3 +++ library/safe.tcl | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75f4d1b..942d74f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (1) Change all procedure names to be fully qualified. + (2) Move the procedures out of the namespace eval. Keep their + locations. IOW, break the namespace eval apart into small + sectionsnot covering the procedure definitions. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index 4d42f2e..5520261 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.20 2009/11/05 19:07:35 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.21 2009/11/05 19:18:52 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -68,6 +68,7 @@ namespace eval ::safe { lappend ::tcl::OptDesc(::safe::interpIC) $::tcl::OptDesc($temp) # temp not needed anymore ::tcl::OptKeyDelete $temp +} # Helper function to resolve the dual way of specifying staticsok (either # by -noStatics or -statics 0) @@ -581,8 +582,10 @@ proc ::safe::setLogCmd {args} { } } +namespace eval ::safe { # internal variable variable Log {} +} # ------------------- END OF PUBLIC METHODS ------------ @@ -1042,4 +1045,3 @@ proc ::safe::setLogCmd {args} { Log $slave $msg error $msg } -} -- cgit v0.12 From a27ebb15203548a964fd1ff14415b61b853dc154 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 19:22:04 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (3) Reindent the code. Just lots of whitespace changes. Functionality unchanged. --- ChangeLog | 2 + library/safe.tcl | 1662 +++++++++++++++++++++++++++--------------------------- 2 files changed, 833 insertions(+), 831 deletions(-) diff --git a/ChangeLog b/ChangeLog index 942d74f..3d77a52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ (2) Move the procedures out of the namespace eval. Keep their locations. IOW, break the namespace eval apart into small sectionsnot covering the procedure definitions. + (3) Reindent the code. Just lots of whitespace + changes. Functionality unchanged. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index 5520261..0b6cf1c 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.21 2009/11/05 19:18:52 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.22 2009/11/05 19:22:04 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -29,7 +29,7 @@ namespace eval ::safe { # Exported API: namespace export interpCreate interpInit interpConfigure interpDelete \ - interpAddToAccessPath interpFindInAccessPath setLogCmd + interpAddToAccessPath interpFindInAccessPath setLogCmd #### # @@ -70,772 +70,849 @@ namespace eval ::safe { ::tcl::OptKeyDelete $temp } - # Helper function to resolve the dual way of specifying staticsok (either - # by -noStatics or -statics 0) - proc ::safe::InterpStatics {} { - foreach v {Args statics noStatics} { - upvar $v $v - } - set flag [::tcl::OptProcArgGiven -noStatics] - if {$flag && (!$noStatics == !$statics) - && ([::tcl::OptProcArgGiven -statics])} { - return -code error\ - "conflicting values given for -statics and -noStatics" - } - if {$flag} { - return [expr {!$noStatics}] - } else { - return $statics - } +# Helper function to resolve the dual way of specifying staticsok (either +# by -noStatics or -statics 0) +proc ::safe::InterpStatics {} { + foreach v {Args statics noStatics} { + upvar $v $v + } + set flag [::tcl::OptProcArgGiven -noStatics] + if {$flag && (!$noStatics == !$statics) + && ([::tcl::OptProcArgGiven -statics])} { + return -code error\ + "conflicting values given for -statics and -noStatics" + } + if {$flag} { + return [expr {!$noStatics}] + } else { + return $statics } +} - # Helper function to resolve the dual way of specifying nested loading - # (either by -nestedLoadOk or -nested 1) - proc ::safe::InterpNested {} { - foreach v {Args nested nestedLoadOk} { - upvar $v $v - } - set flag [::tcl::OptProcArgGiven -nestedLoadOk] - # note that the test here is the opposite of the "InterpStatics" one - # (it is not -noNested... because of the wanted default value) - if {$flag && (!$nestedLoadOk != !$nested) - && ([::tcl::OptProcArgGiven -nested])} { - return -code error\ - "conflicting values given for -nested and -nestedLoadOk" - } - if {$flag} { - # another difference with "InterpStatics" - return $nestedLoadOk - } else { - return $nested - } +# Helper function to resolve the dual way of specifying nested loading +# (either by -nestedLoadOk or -nested 1) +proc ::safe::InterpNested {} { + foreach v {Args nested nestedLoadOk} { + upvar $v $v + } + set flag [::tcl::OptProcArgGiven -nestedLoadOk] + # note that the test here is the opposite of the "InterpStatics" one + # (it is not -noNested... because of the wanted default value) + if {$flag && (!$nestedLoadOk != !$nested) + && ([::tcl::OptProcArgGiven -nested])} { + return -code error\ + "conflicting values given for -nested and -nestedLoadOk" } + if {$flag} { + # another difference with "InterpStatics" + return $nestedLoadOk + } else { + return $nested + } +} - #### - # - # API entry points that needs argument parsing : - # - #### +#### +# +# API entry points that needs argument parsing : +# +#### - # Interface/entry point function and front end for "Create" - proc ::safe::interpCreate {args} { - set Args [::tcl::OptKeyParse ::safe::interpCreate $args] - InterpCreate $slave $accessPath \ - [InterpStatics] [InterpNested] $deleteHook - } +# Interface/entry point function and front end for "Create" +proc ::safe::interpCreate {args} { + set Args [::tcl::OptKeyParse ::safe::interpCreate $args] + InterpCreate $slave $accessPath \ + [InterpStatics] [InterpNested] $deleteHook +} - proc ::safe::interpInit {args} { - set Args [::tcl::OptKeyParse ::safe::interpIC $args] - if {![::interp exists $slave]} { - return -code error "\"$slave\" is not an interpreter" - } - InterpInit $slave $accessPath \ - [InterpStatics] [InterpNested] $deleteHook +proc ::safe::interpInit {args} { + set Args [::tcl::OptKeyParse ::safe::interpIC $args] + if {![::interp exists $slave]} { + return -code error "\"$slave\" is not an interpreter" } + InterpInit $slave $accessPath \ + [InterpStatics] [InterpNested] $deleteHook +} - proc ::safe::CheckInterp {slave} { - if {![IsInterp $slave]} { - return -code error \ - "\"$slave\" is not an interpreter managed by ::safe::" - } +proc ::safe::CheckInterp {slave} { + if {![IsInterp $slave]} { + return -code error \ + "\"$slave\" is not an interpreter managed by ::safe::" } +} - # Interface/entry point function and front end for "Configure". This code - # is awfully pedestrian because it would need more coupling and support - # between the way we store the configuration values in safe::interp's and - # the Opt package. Obviously we would like an OptConfigure to avoid - # duplicating all this code everywhere. - # -> TODO (the app should share or access easily the program/value stored - # by opt) - - # This is even more complicated by the boolean flags with no values that - # we had the bad idea to support for the sake of user simplicity in - # create/init but which makes life hard in configure... - # So this will be hopefully written and some integrated with opt1.0 - # (hopefully for tcl8.1 ?) - proc ::safe::interpConfigure {args} { - switch [llength $args] { - 1 { - # If we have exactly 1 argument the semantic is to return all - # the current configuration. We still call OptKeyParse though - # we know that "slave" is our given argument because it also - # checks for the "-help" option. - set Args [::tcl::OptKeyParse ::safe::interpIC $args] - CheckInterp $slave - set res {} - lappend res [list -accessPath [Set [PathListName $slave]]] - lappend res [list -statics [Set [StaticsOkName $slave]]] - lappend res [list -nested [Set [NestedOkName $slave]]] - lappend res [list -deleteHook [Set [DeleteHookName $slave]]] - join $res +# Interface/entry point function and front end for "Configure". This code +# is awfully pedestrian because it would need more coupling and support +# between the way we store the configuration values in safe::interp's and +# the Opt package. Obviously we would like an OptConfigure to avoid +# duplicating all this code everywhere. +# -> TODO (the app should share or access easily the program/value stored +# by opt) + +# This is even more complicated by the boolean flags with no values that +# we had the bad idea to support for the sake of user simplicity in +# create/init but which makes life hard in configure... +# So this will be hopefully written and some integrated with opt1.0 +# (hopefully for tcl8.1 ?) +proc ::safe::interpConfigure {args} { + switch [llength $args] { + 1 { + # If we have exactly 1 argument the semantic is to return all + # the current configuration. We still call OptKeyParse though + # we know that "slave" is our given argument because it also + # checks for the "-help" option. + set Args [::tcl::OptKeyParse ::safe::interpIC $args] + CheckInterp $slave + set res {} + lappend res [list -accessPath [Set [PathListName $slave]]] + lappend res [list -statics [Set [StaticsOkName $slave]]] + lappend res [list -nested [Set [NestedOkName $slave]]] + lappend res [list -deleteHook [Set [DeleteHookName $slave]]] + join $res + } + 2 { + # If we have exactly 2 arguments the semantic is a "configure + # get" + ::tcl::Lassign $args slave arg + + # get the flag sub program (we 'know' about Opt's internal + # representation of data) + set desc [lindex [::tcl::OptKeyGetDesc ::safe::interpIC] 2] + set hits [::tcl::OptHits desc $arg] + if {$hits > 1} { + return -code error [::tcl::OptAmbigous $desc $arg] + } elseif {$hits == 0} { + return -code error [::tcl::OptFlagUsage $desc $arg] } - 2 { - # If we have exactly 2 arguments the semantic is a "configure - # get" - ::tcl::Lassign $args slave arg - - # get the flag sub program (we 'know' about Opt's internal - # representation of data) - set desc [lindex [::tcl::OptKeyGetDesc ::safe::interpIC] 2] - set hits [::tcl::OptHits desc $arg] - if {$hits > 1} { - return -code error [::tcl::OptAmbigous $desc $arg] - } elseif {$hits == 0} { - return -code error [::tcl::OptFlagUsage $desc $arg] - } - CheckInterp $slave - set item [::tcl::OptCurDesc $desc] - set name [::tcl::OptName $item] - switch -exact -- $name { - -accessPath { - return [list -accessPath [Set [PathListName $slave]]] - } - -statics { - return [list -statics [Set [StaticsOkName $slave]]] - } - -nested { - return [list -nested [Set [NestedOkName $slave]]] - } - -deleteHook { - return [list -deleteHook [Set [DeleteHookName $slave]]] - } - -noStatics { - # it is most probably a set in fact but we would need - # then to jump to the set part and it is not *sure* - # that it is a set action that the user want, so force - # it to use the unambigous -statics ?value? instead: - return -code error\ - "ambigous query (get or set -noStatics ?)\ - use -statics instead" - } - -nestedLoadOk { - return -code error\ - "ambigous query (get or set -nestedLoadOk ?)\ - use -nested instead" - } - default { - return -code error "unknown flag $name (bug)" - } + CheckInterp $slave + set item [::tcl::OptCurDesc $desc] + set name [::tcl::OptName $item] + switch -exact -- $name { + -accessPath { + return [list -accessPath [Set [PathListName $slave]]] } - } - default { - # Otherwise we want to parse the arguments like init and - # create did - set Args [::tcl::OptKeyParse ::safe::interpIC $args] - CheckInterp $slave - - # Get the current (and not the default) values of whatever has - # not been given: - if {![::tcl::OptProcArgGiven -accessPath]} { - set doreset 1 - set accessPath [Set [PathListName $slave]] - } else { - set doreset 0 + -statics { + return [list -statics [Set [StaticsOkName $slave]]] } - if { - ![::tcl::OptProcArgGiven -statics] - && ![::tcl::OptProcArgGiven -noStatics] - } then { - set statics [Set [StaticsOkName $slave]] - } else { - set statics [InterpStatics] + -nested { + return [list -nested [Set [NestedOkName $slave]]] } - if { - [::tcl::OptProcArgGiven -nested] || - [::tcl::OptProcArgGiven -nestedLoadOk] - } then { - set nested [InterpNested] - } else { - set nested [Set [NestedOkName $slave]] + -deleteHook { + return [list -deleteHook [Set [DeleteHookName $slave]]] } - if {![::tcl::OptProcArgGiven -deleteHook]} { - set deleteHook [Set [DeleteHookName $slave]] + -noStatics { + # it is most probably a set in fact but we would need + # then to jump to the set part and it is not *sure* + # that it is a set action that the user want, so force + # it to use the unambigous -statics ?value? instead: + return -code error\ + "ambigous query (get or set -noStatics ?)\ + use -statics instead" + } + -nestedLoadOk { + return -code error\ + "ambigous query (get or set -nestedLoadOk ?)\ + use -nested instead" + } + default { + return -code error "unknown flag $name (bug)" } - # we can now reconfigure : - InterpSetConfig $slave $accessPath $statics $nested $deleteHook - # auto_reset the slave (to completly synch the new access_path) - if {$doreset} { - if {[catch {::interp eval $slave {auto_reset}} msg]} { - Log $slave "auto_reset failed: $msg" - } else { - Log $slave "successful auto_reset" NOTICE - } + } + } + default { + # Otherwise we want to parse the arguments like init and + # create did + set Args [::tcl::OptKeyParse ::safe::interpIC $args] + CheckInterp $slave + + # Get the current (and not the default) values of whatever has + # not been given: + if {![::tcl::OptProcArgGiven -accessPath]} { + set doreset 1 + set accessPath [Set [PathListName $slave]] + } else { + set doreset 0 + } + if { + ![::tcl::OptProcArgGiven -statics] + && ![::tcl::OptProcArgGiven -noStatics] + } then { + set statics [Set [StaticsOkName $slave]] + } else { + set statics [InterpStatics] + } + if { + [::tcl::OptProcArgGiven -nested] || + [::tcl::OptProcArgGiven -nestedLoadOk] + } then { + set nested [InterpNested] + } else { + set nested [Set [NestedOkName $slave]] + } + if {![::tcl::OptProcArgGiven -deleteHook]} { + set deleteHook [Set [DeleteHookName $slave]] + } + # we can now reconfigure : + InterpSetConfig $slave $accessPath $statics $nested $deleteHook + # auto_reset the slave (to completly synch the new access_path) + if {$doreset} { + if {[catch {::interp eval $slave {auto_reset}} msg]} { + Log $slave "auto_reset failed: $msg" + } else { + Log $slave "successful auto_reset" NOTICE } } } } +} - #### - # - # Functions that actually implements the exported APIs - # - #### - - # - # safe::InterpCreate : doing the real job - # - # This procedure creates a safe slave and initializes it with the safe - # base aliases. - # NB: slave name must be simple alphanumeric string, no spaces, no (), no - # {},... {because the state array is stored as part of the name} - # - # Returns the slave name. - # - # Optional Arguments : - # + slave name : if empty, generated name will be used - # + access_path: path list controlling where load/source can occur, - # if empty: the master auto_path will be used. - # + staticsok : flag, if 0 :no static package can be loaded (load {} Xxx) - # if 1 :static packages are ok. - # + nestedok: flag, if 0 :no loading to sub-sub interps (load xx xx sub) - # if 1 : multiple levels are ok. - - # use the full name and no indent so auto_mkIndex can find us - proc ::safe::InterpCreate { - slave - access_path - staticsok - nestedok - deletehook - } { - # Create the slave. - if {$slave ne ""} { - ::interp create -safe $slave - } else { - # empty argument: generate slave name - set slave [::interp create -safe] - } - Log $slave "Created" NOTICE +#### +# +# Functions that actually implements the exported APIs +# +#### - # Initialize it. (returns slave name) - InterpInit $slave $access_path $staticsok $nestedok $deletehook +# +# safe::InterpCreate : doing the real job +# +# This procedure creates a safe slave and initializes it with the safe +# base aliases. +# NB: slave name must be simple alphanumeric string, no spaces, no (), no +# {},... {because the state array is stored as part of the name} +# +# Returns the slave name. +# +# Optional Arguments : +# + slave name : if empty, generated name will be used +# + access_path: path list controlling where load/source can occur, +# if empty: the master auto_path will be used. +# + staticsok : flag, if 0 :no static package can be loaded (load {} Xxx) +# if 1 :static packages are ok. +# + nestedok: flag, if 0 :no loading to sub-sub interps (load xx xx sub) +# if 1 : multiple levels are ok. + +# use the full name and no indent so auto_mkIndex can find us +proc ::safe::InterpCreate { + slave + access_path + staticsok + nestedok + deletehook + } { + # Create the slave. + if {$slave ne ""} { + ::interp create -safe $slave + } else { + # empty argument: generate slave name + set slave [::interp create -safe] } + Log $slave "Created" NOTICE - # - # InterpSetConfig (was setAccessPath) : - # Sets up slave virtual auto_path and corresponding structure within - # the master. Also sets the tcl_library in the slave to be the first - # directory in the path. - # NB: If you change the path after the slave has been initialized you - # probably need to call "auto_reset" in the slave in order that it gets - # the right auto_index() array values. - - proc ::safe::InterpSetConfig {slave access_path staticsok\ - nestedok deletehook} { - # determine and store the access path if empty - if {$access_path eq ""} { - set access_path [uplevel \#0 set auto_path] - # Make sure that tcl_library is in auto_path and at the first - # position (needed by setAccessPath) - set where [lsearch -exact $access_path [info library]] - if {$where == -1} { - # not found, add it. - set access_path [concat [list [info library]] $access_path] - Log $slave "tcl_library was not in auto_path,\ + # Initialize it. (returns slave name) + InterpInit $slave $access_path $staticsok $nestedok $deletehook +} + +# +# InterpSetConfig (was setAccessPath) : +# Sets up slave virtual auto_path and corresponding structure within +# the master. Also sets the tcl_library in the slave to be the first +# directory in the path. +# NB: If you change the path after the slave has been initialized you +# probably need to call "auto_reset" in the slave in order that it gets +# the right auto_index() array values. + +proc ::safe::InterpSetConfig {slave access_path staticsok\ + nestedok deletehook} { + # determine and store the access path if empty + if {$access_path eq ""} { + set access_path [uplevel \#0 set auto_path] + # Make sure that tcl_library is in auto_path and at the first + # position (needed by setAccessPath) + set where [lsearch -exact $access_path [info library]] + if {$where == -1} { + # not found, add it. + set access_path [concat [list [info library]] $access_path] + Log $slave "tcl_library was not in auto_path,\ added it to slave's access_path" NOTICE - } elseif {$where != 0} { - # not first, move it first - set access_path [concat [list [info library]]\ - [lreplace $access_path $where $where]] - Log $slave "tcl_libray was not in first in auto_path,\ + } elseif {$where != 0} { + # not first, move it first + set access_path [concat [list [info library]]\ + [lreplace $access_path $where $where]] + Log $slave "tcl_libray was not in first in auto_path,\ moved it to front of slave's access_path" NOTICE - } - - # Add 1st level sub dirs (will searched by auto loading from tcl - # code in the slave using glob and thus fail, so we add them here - # so by default it works the same). - set access_path [AddSubDirs $access_path] } - Log $slave "Setting accessPath=($access_path) staticsok=$staticsok\ + # Add 1st level sub dirs (will searched by auto loading from tcl + # code in the slave using glob and thus fail, so we add them here + # so by default it works the same). + set access_path [AddSubDirs $access_path] + } + + Log $slave "Setting accessPath=($access_path) staticsok=$staticsok\ nestedok=$nestedok deletehook=($deletehook)" NOTICE - # clear old autopath if it existed - set nname [PathNumberName $slave] - if {[Exists $nname]} { - set n [Set $nname] - for {set i 0} {$i<$n} {incr i} { - Unset [PathToken $i $slave] - } + # clear old autopath if it existed + set nname [PathNumberName $slave] + if {[Exists $nname]} { + set n [Set $nname] + for {set i 0} {$i<$n} {incr i} { + Unset [PathToken $i $slave] } + } - # build new one - set slave_auto_path {} - set i 0 - foreach dir $access_path { - Set [PathToken $i $slave] $dir - lappend slave_auto_path "\$[PathToken $i]" - incr i - } - # Extend the access list with the paths used to look for Tcl Modules. - # We save the virtual form separately as well, as syncing it with the - # slave has to be defered until the necessary commands are present for - # setup. - foreach dir [::tcl::tm::list] { - lappend access_path $dir - Set [PathToken $i $slave] $dir - lappend slave_auto_path "\$[PathToken $i]" - lappend slave_tm_path "\$[PathToken $i]" - incr i - } - Set $nname $i - Set [PathListName $slave] $access_path - Set [VirtualPathListName $slave] $slave_auto_path - Set [TmPathListName $slave] $slave_tm_path + # build new one + set slave_auto_path {} + set i 0 + foreach dir $access_path { + Set [PathToken $i $slave] $dir + lappend slave_auto_path "\$[PathToken $i]" + incr i + } + # Extend the access list with the paths used to look for Tcl Modules. + # We save the virtual form separately as well, as syncing it with the + # slave has to be defered until the necessary commands are present for + # setup. + foreach dir [::tcl::tm::list] { + lappend access_path $dir + Set [PathToken $i $slave] $dir + lappend slave_auto_path "\$[PathToken $i]" + lappend slave_tm_path "\$[PathToken $i]" + incr i + } + Set $nname $i + Set [PathListName $slave] $access_path + Set [VirtualPathListName $slave] $slave_auto_path + Set [TmPathListName $slave] $slave_tm_path - Set [StaticsOkName $slave] $staticsok - Set [NestedOkName $slave] $nestedok - Set [DeleteHookName $slave] $deletehook + Set [StaticsOkName $slave] $staticsok + Set [NestedOkName $slave] $nestedok + Set [DeleteHookName $slave] $deletehook - SyncAccessPath $slave - } + SyncAccessPath $slave +} - # - # - # FindInAccessPath: - # Search for a real directory and returns its virtual Id (including the - # "$") +# +# +# FindInAccessPath: +# Search for a real directory and returns its virtual Id (including the +# "$") proc ::safe::interpFindInAccessPath {slave path} { - set access_path [GetAccessPath $slave] - set where [lsearch -exact $access_path $path] - if {$where == -1} { - return -code error "$path not found in access path $access_path" - } - return "\$[PathToken $where]" + set access_path [GetAccessPath $slave] + set where [lsearch -exact $access_path $path] + if {$where == -1} { + return -code error "$path not found in access path $access_path" } + return "\$[PathToken $where]" +} - # - # addToAccessPath: - # add (if needed) a real directory to access path and return its - # virtual token (including the "$"). +# +# addToAccessPath: +# add (if needed) a real directory to access path and return its +# virtual token (including the "$"). proc ::safe::interpAddToAccessPath {slave path} { - # first check if the directory is already in there - try { - return [interpFindInAccessPath $slave $path] - } on error {} { - # new one, add it: - set nname [PathNumberName $slave] - set n [Set $nname] - Set [PathToken $n $slave] $path + # first check if the directory is already in there + try { + return [interpFindInAccessPath $slave $path] + } on error {} { + # new one, add it: + set nname [PathNumberName $slave] + set n [Set $nname] + Set [PathToken $n $slave] $path - set token "\$[PathToken $n]" + set token "\$[PathToken $n]" - Lappend [VirtualPathListName $slave] $token - Lappend [PathListName $slave] $path - Set $nname [expr {$n+1}] + Lappend [VirtualPathListName $slave] $token + Lappend [PathListName $slave] $path + Set $nname [expr {$n+1}] - SyncAccessPath $slave + SyncAccessPath $slave - return $token - } + return $token } +} - # This procedure applies the initializations to an already existing - # interpreter. It is useful when you want to install the safe base aliases - # into a preexisting safe interpreter. - proc ::safe::InterpInit { - slave - access_path - staticsok - nestedok - deletehook - } { - # Configure will generate an access_path when access_path is empty. - InterpSetConfig $slave $access_path $staticsok $nestedok $deletehook - - # These aliases let the slave load files to define new commands - - # NB we need to add [namespace current], aliases are always absolute - # paths. - ::interp alias $slave source {} \ - [namespace current]::AliasSource $slave - ::interp alias $slave load {} \ - [namespace current]::AliasLoad $slave - - # This alias lets the slave use the encoding names, convertfrom, - # convertto, and system, but not "encoding system " to set the - # system encoding. - - ::interp alias $slave encoding {} \ - [namespace current]::AliasEncoding $slave - - # Handling Tcl Modules, we need a restricted form of Glob. - ::interp alias $slave glob {} \ - [namespace current]::AliasGlob $slave - - # This alias lets the slave have access to a subset of the 'file' - # command functionality. - - AliasSubset $slave file \ - file dir.* join root.* ext.* tail path.* split - - # This alias interposes on the 'exit' command and cleanly terminates - # the slave. - - ::interp alias $slave exit {} \ - [namespace current]::interpDelete $slave - - # The allowed slave variables already have been set by Tcl_MakeSafe(3) - - # Source init.tcl and tm.tcl into the slave, to get auto_load and - # other procedures defined: - - if {[catch {::interp eval $slave { - source [file join $tcl_library init.tcl] - }} msg]} then { - Log $slave "can't source init.tcl ($msg)" - error "can't source init.tcl into slave $slave ($msg)" - } +# This procedure applies the initializations to an already existing +# interpreter. It is useful when you want to install the safe base aliases +# into a preexisting safe interpreter. +proc ::safe::InterpInit { + slave + access_path + staticsok + nestedok + deletehook + } { + # Configure will generate an access_path when access_path is empty. + InterpSetConfig $slave $access_path $staticsok $nestedok $deletehook + + # These aliases let the slave load files to define new commands + + # NB we need to add [namespace current], aliases are always absolute + # paths. + ::interp alias $slave source {} \ + [namespace current]::AliasSource $slave + ::interp alias $slave load {} \ + [namespace current]::AliasLoad $slave + + # This alias lets the slave use the encoding names, convertfrom, + # convertto, and system, but not "encoding system " to set the + # system encoding. + + ::interp alias $slave encoding {} \ + [namespace current]::AliasEncoding $slave + + # Handling Tcl Modules, we need a restricted form of Glob. + ::interp alias $slave glob {} \ + [namespace current]::AliasGlob $slave + + # This alias lets the slave have access to a subset of the 'file' + # command functionality. + + AliasSubset $slave file \ + file dir.* join root.* ext.* tail path.* split + + # This alias interposes on the 'exit' command and cleanly terminates + # the slave. + + ::interp alias $slave exit {} \ + [namespace current]::interpDelete $slave + + # The allowed slave variables already have been set by Tcl_MakeSafe(3) + + # Source init.tcl and tm.tcl into the slave, to get auto_load and + # other procedures defined: + + if {[catch {::interp eval $slave { + source [file join $tcl_library init.tcl] + }} msg]} then { + Log $slave "can't source init.tcl ($msg)" + error "can't source init.tcl into slave $slave ($msg)" + } - if {[catch {::interp eval $slave { - source [file join $tcl_library tm.tcl] - }} msg]} then { - Log $slave "can't source tm.tcl ($msg)" - error "can't source tm.tcl into slave $slave ($msg)" - } + if {[catch {::interp eval $slave { + source [file join $tcl_library tm.tcl] + }} msg]} then { + Log $slave "can't source tm.tcl ($msg)" + error "can't source tm.tcl into slave $slave ($msg)" + } - # Sync the paths used to search for Tcl modules. This can be done only - # now, after tm.tcl was loaded. - ::interp eval $slave [list \ - ::tcl::tm::add {*}[Set [TmPathListName $slave]] ] + # Sync the paths used to search for Tcl modules. This can be done only + # now, after tm.tcl was loaded. + ::interp eval $slave [list \ + ::tcl::tm::add {*}[Set [TmPathListName $slave]] ] - return $slave - } + return $slave +} - # Add (only if needed, avoid duplicates) 1 level of sub directories to an - # existing path list. Also removes non directories from the returned - # list. - proc ::safe::AddSubDirs {pathList} { - set res {} - foreach dir $pathList { - if {[file isdirectory $dir]} { - # check that we don't have it yet as a children of a previous - # dir - if {[lsearch -exact $res $dir]<0} { - lappend res $dir - } - foreach sub [glob -directory $dir -nocomplain *] { - if {([file isdirectory $sub]) \ - && ([lsearch -exact $res $sub]<0) } { - # new sub dir, add it ! - lappend res $sub - } +# Add (only if needed, avoid duplicates) 1 level of sub directories to an +# existing path list. Also removes non directories from the returned +# list. +proc ::safe::AddSubDirs {pathList} { + set res {} + foreach dir $pathList { + if {[file isdirectory $dir]} { + # check that we don't have it yet as a children of a previous + # dir + if {[lsearch -exact $res $dir]<0} { + lappend res $dir + } + foreach sub [glob -directory $dir -nocomplain *] { + if {([file isdirectory $sub]) \ + && ([lsearch -exact $res $sub]<0) } { + # new sub dir, add it ! + lappend res $sub } } } - return $res } + return $res +} - # This procedure deletes a safe slave managed by Safe Tcl and cleans up - # associated state: +# This procedure deletes a safe slave managed by Safe Tcl and cleans up +# associated state: proc ::safe::interpDelete {slave} { - Log $slave "About to delete" NOTICE - - # If the slave has a cleanup hook registered, call it. Check the - # existance because we might be called to delete an interp which has - # not been registered with us at all - set hookname [DeleteHookName $slave] - if {[Exists $hookname]} { - set hook [Set $hookname] - if {![::tcl::Lempty $hook]} { - # remove the hook now, otherwise if the hook calls us somehow, - # we'll loop - Unset $hookname - try { - {*}$hook $slave - } on error err { - Log $slave "Delete hook error ($err)" - } + Log $slave "About to delete" NOTICE + + # If the slave has a cleanup hook registered, call it. Check the + # existance because we might be called to delete an interp which has + # not been registered with us at all + set hookname [DeleteHookName $slave] + if {[Exists $hookname]} { + set hook [Set $hookname] + if {![::tcl::Lempty $hook]} { + # remove the hook now, otherwise if the hook calls us somehow, + # we'll loop + Unset $hookname + try { + {*}$hook $slave + } on error err { + Log $slave "Delete hook error ($err)" } } + } - # Discard the global array of state associated with the slave, and - # delete the interpreter. - - set statename [InterpStateName $slave] - if {[Exists $statename]} { - Unset $statename - } + # Discard the global array of state associated with the slave, and + # delete the interpreter. - # if we have been called twice, the interp might have been deleted - # already - if {[::interp exists $slave]} { - ::interp delete $slave - Log $slave "Deleted" NOTICE - } + set statename [InterpStateName $slave] + if {[Exists $statename]} { + Unset $statename + } - return + # if we have been called twice, the interp might have been deleted + # already + if {[::interp exists $slave]} { + ::interp delete $slave + Log $slave "Deleted" NOTICE } - # Set (or get) the logging mecanism + return +} + +# Set (or get) the logging mecanism proc ::safe::setLogCmd {args} { - variable Log - if {[llength $args] == 0} { - return $Log - } elseif {[llength $args] == 1} { - set Log [lindex $args 0] - } else { - set Log $args - } + variable Log + if {[llength $args] == 0} { + return $Log + } elseif {[llength $args] == 1} { + set Log [lindex $args 0] + } else { + set Log $args } +} namespace eval ::safe { # internal variable variable Log {} } - # ------------------- END OF PUBLIC METHODS ------------ +# ------------------- END OF PUBLIC METHODS ------------ - # - # Sets the slave auto_path to the master recorded value. Also sets - # tcl_library to the first token of the virtual path. - # - proc ::safe::SyncAccessPath {slave} { - set slave_auto_path [Set [VirtualPathListName $slave]] - ::interp eval $slave [list set auto_path $slave_auto_path] - Log $slave "auto_path in $slave has been set to $slave_auto_path"\ - NOTICE - ::interp eval $slave [list set tcl_library [lindex $slave_auto_path 0]] - } +# +# Sets the slave auto_path to the master recorded value. Also sets +# tcl_library to the first token of the virtual path. +# +proc ::safe::SyncAccessPath {slave} { + set slave_auto_path [Set [VirtualPathListName $slave]] + ::interp eval $slave [list set auto_path $slave_auto_path] + Log $slave "auto_path in $slave has been set to $slave_auto_path"\ + NOTICE + ::interp eval $slave [list set tcl_library [lindex $slave_auto_path 0]] +} - # Base name for storing all the slave states. The array variable name for - # slave foo is thus "Sfoo" and for sub slave {foo bar} "Sfoo bar" (spaces - # are handled ok everywhere (or should)). We add the S prefix to avoid - # that a slave interp called "Log" would smash our "Log" variable. - proc ::safe::InterpStateName {slave} { - return "S$slave" - } +# Base name for storing all the slave states. The array variable name for +# slave foo is thus "Sfoo" and for sub slave {foo bar} "Sfoo bar" (spaces +# are handled ok everywhere (or should)). We add the S prefix to avoid +# that a slave interp called "Log" would smash our "Log" variable. +proc ::safe::InterpStateName {slave} { + return "S$slave" +} - # Check that the given slave is "one of us" - proc ::safe::IsInterp {slave} { - expr {[Exists [InterpStateName $slave]] && [::interp exists $slave]} - } +# Check that the given slave is "one of us" +proc ::safe::IsInterp {slave} { + expr {[Exists [InterpStateName $slave]] && [::interp exists $slave]} +} - # Returns the virtual token for directory number N. If the slave argument - # is given, it will return the corresponding master global variable name - proc ::safe::PathToken {n {slave ""}} { - if {$slave ne ""} { - return "[InterpStateName $slave](access_path,$n)" - } else { - # We need to have a ":" in the token string so [file join] on the - # mac won't turn it into a relative path. - return "p(:$n:)" - } - } - # returns the variable name of the complete path list - proc ::safe::PathListName {slave} { - return "[InterpStateName $slave](access_path)" - } - # returns the variable name of the complete path list - proc ::safe::VirtualPathListName {slave} { - return "[InterpStateName $slave](access_path_slave)" - } - # returns the variable name of the complete tm path list - proc ::safe::TmPathListName {slave} { - return "[InterpStateName $slave](tm_path_slave)" - } - # returns the variable name of the number of items - proc ::safe::PathNumberName {slave} { - return "[InterpStateName $slave](access_path,n)" - } - # returns the staticsok flag var name - proc ::safe::StaticsOkName {slave} { - return "[InterpStateName $slave](staticsok)" - } - # returns the nestedok flag var name - proc ::safe::NestedOkName {slave} { - return "[InterpStateName $slave](nestedok)" - } - # Run some code at the namespace toplevel - proc ::safe::Toplevel {args} { - namespace eval [namespace current] $args - } - # set/get values - proc ::safe::Set {args} { - Toplevel set {*}$args - } - # lappend on toplevel vars - proc ::safe::Lappend {args} { - Toplevel lappend {*}$args - } - # unset a var/token (currently just an global level eval) - proc ::safe::Unset {args} { - Toplevel unset {*}$args - } - # test existance - proc ::safe::Exists {varname} { - Toplevel info exists $varname - } - # short cut for access path getting - proc ::safe::GetAccessPath {slave} { - Set [PathListName $slave] - } - # short cut for statics ok flag getting - proc ::safe::StaticsOk {slave} { - Set [StaticsOkName $slave] - } - # short cut for getting the multiples interps sub loading ok flag - proc ::safe::NestedOk {slave} { - Set [NestedOkName $slave] - } - # interp deletion storing hook name - proc ::safe::DeleteHookName {slave} { - return [InterpStateName $slave](cleanupHook) +# Returns the virtual token for directory number N. If the slave argument +# is given, it will return the corresponding master global variable name +proc ::safe::PathToken {n {slave ""}} { + if {$slave ne ""} { + return "[InterpStateName $slave](access_path,$n)" + } else { + # We need to have a ":" in the token string so [file join] on the + # mac won't turn it into a relative path. + return "p(:$n:)" } +} +# returns the variable name of the complete path list +proc ::safe::PathListName {slave} { + return "[InterpStateName $slave](access_path)" +} +# returns the variable name of the complete path list +proc ::safe::VirtualPathListName {slave} { + return "[InterpStateName $slave](access_path_slave)" +} +# returns the variable name of the complete tm path list +proc ::safe::TmPathListName {slave} { + return "[InterpStateName $slave](tm_path_slave)" +} +# returns the variable name of the number of items +proc ::safe::PathNumberName {slave} { + return "[InterpStateName $slave](access_path,n)" +} +# returns the staticsok flag var name +proc ::safe::StaticsOkName {slave} { + return "[InterpStateName $slave](staticsok)" +} +# returns the nestedok flag var name +proc ::safe::NestedOkName {slave} { + return "[InterpStateName $slave](nestedok)" +} +# Run some code at the namespace toplevel +proc ::safe::Toplevel {args} { + namespace eval [namespace current] $args +} +# set/get values +proc ::safe::Set {args} { + Toplevel set {*}$args +} +# lappend on toplevel vars +proc ::safe::Lappend {args} { + Toplevel lappend {*}$args +} +# unset a var/token (currently just an global level eval) +proc ::safe::Unset {args} { + Toplevel unset {*}$args +} +# test existance +proc ::safe::Exists {varname} { + Toplevel info exists $varname +} +# short cut for access path getting +proc ::safe::GetAccessPath {slave} { + Set [PathListName $slave] +} +# short cut for statics ok flag getting +proc ::safe::StaticsOk {slave} { + Set [StaticsOkName $slave] +} +# short cut for getting the multiples interps sub loading ok flag +proc ::safe::NestedOk {slave} { + Set [NestedOkName $slave] +} +# interp deletion storing hook name +proc ::safe::DeleteHookName {slave} { + return [InterpStateName $slave](cleanupHook) +} - # - # translate virtual path into real path - # - proc ::safe::TranslatePath {slave path} { - # somehow strip the namespaces 'functionality' out (the danger is that - # we would strip valid macintosh "../" queries... : - if {[string match "*::*" $path] || [string match "*..*" $path]} { - error "invalid characters in path $path" - } - set n [expr {[Set [PathNumberName $slave]]-1}] - for {} {$n>=0} {incr n -1} { - # fill the token virtual names with their real value - set [PathToken $n] [Set [PathToken $n $slave]] - } - # replaces the token by their value - subst -nobackslashes -nocommands $path +# +# translate virtual path into real path +# +proc ::safe::TranslatePath {slave path} { + # somehow strip the namespaces 'functionality' out (the danger is that + # we would strip valid macintosh "../" queries... : + if {[string match "*::*" $path] || [string match "*..*" $path]} { + error "invalid characters in path $path" + } + set n [expr {[Set [PathNumberName $slave]]-1}] + for {} {$n>=0} {incr n -1} { + # fill the token virtual names with their real value + set [PathToken $n] [Set [PathToken $n $slave]] } + # replaces the token by their value + subst -nobackslashes -nocommands $path +} - # Log eventually log an error; to enable error logging, set Log to {puts - # stderr} for instance - proc ::safe::Log {slave msg {type ERROR}} { - variable Log - if {[info exists Log] && [llength $Log]} { - {*}$Log "$type for slave $slave : $msg" - } +# Log eventually log an error; to enable error logging, set Log to {puts +# stderr} for instance +proc ::safe::Log {slave msg {type ERROR}} { + variable Log + if {[info exists Log] && [llength $Log]} { + {*}$Log "$type for slave $slave : $msg" } +} - # file name control (limit access to files/resources that should be a - # valid tcl source file) - proc ::safe::CheckFileName {slave file} { - # This used to limit what can be sourced to ".tcl" and forbid files - # with more than 1 dot and longer than 14 chars, but I changed that - # for 8.4 as a safe interp has enough internal protection already to - # allow sourcing anything. - hobbs +# file name control (limit access to files/resources that should be a +# valid tcl source file) +proc ::safe::CheckFileName {slave file} { + # This used to limit what can be sourced to ".tcl" and forbid files + # with more than 1 dot and longer than 14 chars, but I changed that + # for 8.4 as a safe interp has enough internal protection already to + # allow sourcing anything. - hobbs - if {![file exists $file]} { - # don't tell the file path - error "no such file or directory" - } + if {![file exists $file]} { + # don't tell the file path + error "no such file or directory" + } - if {![file readable $file]} { - # don't tell the file path - error "not readable" - } + if {![file readable $file]} { + # don't tell the file path + error "not readable" } +} - # AliasGlob is the target of the "glob" alias in safe interpreters. +# AliasGlob is the target of the "glob" alias in safe interpreters. - proc ::safe::AliasGlob {slave args} { - Log $slave "GLOB ! $args" NOTICE - set cmd {} - set at 0 +proc ::safe::AliasGlob {slave args} { + Log $slave "GLOB ! $args" NOTICE + set cmd {} + set at 0 - set dir {} - set virtualdir {} + set dir {} + set virtualdir {} - while {$at < [llength $args]} { - switch -glob -- [set opt [lindex $args $at]] { - -nocomplain - - -join { - lappend cmd $opt - incr at - } - -directory { - lappend cmd $opt - incr at - set virtualdir [lindex $args $at] - - # get the real path from the virtual one. - try { - set dir [TranslatePath $slave $virtualdir] - } on error msg { - Log $slave $msg - return -code error "permission denied" - } - # check that the path is in the access path of that slave - try { - DirInAccessPath $slave $dir - } on error msg { - Log $slave $msg - return -code error "permission denied" - } - lappend cmd $dir - incr at - } - pkgIndex.tcl { - # Oops, this is globbing a subdirectory in regular package - # search. That is not wanted. Abort, handler does catch - # already (because glob was not defined before). See - # package.tcl, lines 484ff in tclPkgUnknown. - error "unknown command glob" - } - -* { - Log $slave "Safe base rejecting glob option '$opt'" - error "Safe base rejecting glob option '$opt'" + while {$at < [llength $args]} { + switch -glob -- [set opt [lindex $args $at]] { + -nocomplain - + -join { + lappend cmd $opt + incr at + } + -directory { + lappend cmd $opt + incr at + set virtualdir [lindex $args $at] + + # get the real path from the virtual one. + try { + set dir [TranslatePath $slave $virtualdir] + } on error msg { + Log $slave $msg + return -code error "permission denied" } - default { - lappend cmd $opt - incr at + # check that the path is in the access path of that slave + try { + DirInAccessPath $slave $dir + } on error msg { + Log $slave $msg + return -code error "permission denied" } + lappend cmd $dir + incr at + } + pkgIndex.tcl { + # Oops, this is globbing a subdirectory in regular package + # search. That is not wanted. Abort, handler does catch + # already (because glob was not defined before). See + # package.tcl, lines 484ff in tclPkgUnknown. + error "unknown command glob" + } + -* { + Log $slave "Safe base rejecting glob option '$opt'" + error "Safe base rejecting glob option '$opt'" + } + default { + lappend cmd $opt + incr at } } + } - Log $slave "GLOB = $cmd" NOTICE + Log $slave "GLOB = $cmd" NOTICE - try { - ::interp invokehidden $slave glob {*}$cmd - } on ok msg { - # Nothing to be done, just capture the 'msg' for later. - } on error msg { - Log $slave $msg - return -code error "script error" - } + try { + ::interp invokehidden $slave glob {*}$cmd + } on ok msg { + # Nothing to be done, just capture the 'msg' for later. + } on error msg { + Log $slave $msg + return -code error "script error" + } - Log $slave "GLOB @ $msg" NOTICE + Log $slave "GLOB @ $msg" NOTICE - # Translate path back to what the slave should see. - set res {} - foreach p $msg { - regsub -- ^$dir $p $virtualdir p - lappend res $p - } + # Translate path back to what the slave should see. + set res {} + foreach p $msg { + regsub -- ^$dir $p $virtualdir p + lappend res $p + } + + Log $slave "GLOB @ $res" NOTICE + return $res +} - Log $slave "GLOB @ $res" NOTICE - return $res +# AliasSource is the target of the "source" alias in safe interpreters. + +proc ::safe::AliasSource {slave args} { + set argc [llength $args] + # Extended for handling of Tcl Modules to allow not only "source + # filename", but "source -encoding E filename" as well. + if {[lindex $args 0] eq "-encoding"} { + incr argc -2 + set encoding [lrange $args 0 1] + set at 2 + } else { + set at 0 + set encoding {} + } + if {$argc != 1} { + set msg "wrong # args: should be \"source ?-encoding E? fileName\"" + Log $slave "$msg ($args)" + return -code error $msg } + set file [lindex $args $at] + + # get the real path from the virtual one. + try { + set file [TranslatePath $slave $file] + } on error msg { + Log $slave $msg + return -code error "permission denied" + } + + # check that the path is in the access path of that slave + try { + FileInAccessPath $slave $file + } on error msg { + Log $slave $msg + return -code error "permission denied" + } + + # do the checks on the filename : + try { + CheckFileName $slave $file + } on error msg { + Log $slave "$file:$msg" + return -code error $msg + } + + # passed all the tests , lets source it: + if {[catch { + # We use catch here because we want to catch non-error/ok too + ::interp invokehidden $slave source {*}$encoding $file + } msg]} then { + Log $slave $msg + return -code error "script error" + } + return $msg +} + +# AliasLoad is the target of the "load" alias in safe interpreters. - # AliasSource is the target of the "source" alias in safe interpreters. - - proc ::safe::AliasSource {slave args} { - set argc [llength $args] - # Extended for handling of Tcl Modules to allow not only "source - # filename", but "source -encoding E filename" as well. - if {[lindex $args 0] eq "-encoding"} { - incr argc -2 - set encoding [lrange $args 0 1] - set at 2 - } else { - set at 0 - set encoding {} +proc ::safe::AliasLoad {slave file args} { + set argc [llength $args] + if {$argc > 2} { + set msg "load error: too many arguments" + Log $slave "$msg ($argc) {$file $args}" + return -code error $msg + } + + # package name (can be empty if file is not). + set package [lindex $args 0] + + # Determine where to load. load use a relative interp path and {} + # means self, so we can directly and safely use passed arg. + set target [lindex $args 1] + if {$target ne ""} { + # we will try to load into a sub sub interp; check that we want to + # authorize that. + if {![NestedOk $slave]} { + Log $slave "loading to a sub interp (nestedok)\ + disabled (trying to load $package to $target)" + return -code error "permission denied (nested load)" } - if {$argc != 1} { - set msg "wrong # args: should be \"source ?-encoding E? fileName\"" - Log $slave "$msg ($args)" + } + + # Determine what kind of load is requested + if {$file eq ""} { + # static package loading + if {$package eq ""} { + set msg "load error: empty filename and no package name" + Log $slave $msg return -code error $msg } - set file [lindex $args $at] - + if {![StaticsOk $slave]} { + Log $slave "static packages loading disabled\ + (trying to load $package to $target)" + return -code error "permission denied (static package)" + } + } else { + # file loading + # get the real path from the virtual one. try { set file [TranslatePath $slave $file] @@ -843,205 +920,128 @@ namespace eval ::safe { Log $slave $msg return -code error "permission denied" } - - # check that the path is in the access path of that slave + + # check the translated path try { FileInAccessPath $slave $file } on error msg { Log $slave $msg - return -code error "permission denied" - } - - # do the checks on the filename : - try { - CheckFileName $slave $file - } on error msg { - Log $slave "$file:$msg" - return -code error $msg + return -code error "permission denied (path)" } - - # passed all the tests , lets source it: - if {[catch { - # We use catch here because we want to catch non-error/ok too - ::interp invokehidden $slave source {*}$encoding $file - } msg]} then { - Log $slave $msg - return -code error "script error" - } - return $msg } - # AliasLoad is the target of the "load" alias in safe interpreters. - - proc ::safe::AliasLoad {slave file args} { - set argc [llength $args] - if {$argc > 2} { - set msg "load error: too many arguments" - Log $slave "$msg ($argc) {$file $args}" - return -code error $msg - } - - # package name (can be empty if file is not). - set package [lindex $args 0] - - # Determine where to load. load use a relative interp path and {} - # means self, so we can directly and safely use passed arg. - set target [lindex $args 1] - if {$target ne ""} { - # we will try to load into a sub sub interp; check that we want to - # authorize that. - if {![NestedOk $slave]} { - Log $slave "loading to a sub interp (nestedok)\ - disabled (trying to load $package to $target)" - return -code error "permission denied (nested load)" - } - } + try { + ::interp invokehidden $slave load $file $package $target + } on error msg { + Log $slave $msg + return -code error $msg + } - # Determine what kind of load is requested - if {$file eq ""} { - # static package loading - if {$package eq ""} { - set msg "load error: empty filename and no package name" - Log $slave $msg - return -code error $msg - } - if {![StaticsOk $slave]} { - Log $slave "static packages loading disabled\ - (trying to load $package to $target)" - return -code error "permission denied (static package)" - } - } else { - # file loading + return $msg +} - # get the real path from the virtual one. - try { - set file [TranslatePath $slave $file] - } on error msg { - Log $slave $msg - return -code error "permission denied" - } +# FileInAccessPath raises an error if the file is not found in the list of +# directories contained in the (master side recorded) slave's access path. - # check the translated path - try { - FileInAccessPath $slave $file - } on error msg { - Log $slave $msg - return -code error "permission denied (path)" - } - } +# the security here relies on "file dirname" answering the proper +# result... needs checking ? +proc ::safe::FileInAccessPath {slave file} { + set access_path [GetAccessPath $slave] - try { - ::interp invokehidden $slave load $file $package $target - } on error msg { - Log $slave $msg - return -code error $msg - } - - return $msg + if {[file isdirectory $file]} { + error "\"$file\": is a directory" } + set parent [file dirname $file] - # FileInAccessPath raises an error if the file is not found in the list of - # directories contained in the (master side recorded) slave's access path. - - # the security here relies on "file dirname" answering the proper - # result... needs checking ? - proc ::safe::FileInAccessPath {slave file} { - set access_path [GetAccessPath $slave] - - if {[file isdirectory $file]} { - error "\"$file\": is a directory" - } - set parent [file dirname $file] - - # Normalize paths for comparison since lsearch knows nothing of - # potential pathname anomalies. - set norm_parent [file normalize $parent] - foreach path $access_path { - lappend norm_access_path [file normalize $path] - } + # Normalize paths for comparison since lsearch knows nothing of + # potential pathname anomalies. + set norm_parent [file normalize $parent] + foreach path $access_path { + lappend norm_access_path [file normalize $path] + } - if {$norm_parent ni $norm_access_path} { - error "\"$file\": not in access_path" - } + if {$norm_parent ni $norm_access_path} { + error "\"$file\": not in access_path" } +} - proc ::safe::DirInAccessPath {slave dir} { - set access_path [GetAccessPath $slave] +proc ::safe::DirInAccessPath {slave dir} { + set access_path [GetAccessPath $slave] - if {[file isfile $dir]} { - error "\"$dir\": is a file" - } + if {[file isfile $dir]} { + error "\"$dir\": is a file" + } - # Normalize paths for comparison since lsearch knows nothing of - # potential pathname anomalies. - set norm_dir [file normalize $dir] - foreach path $access_path { - lappend norm_access_path [file normalize $path] - } + # Normalize paths for comparison since lsearch knows nothing of + # potential pathname anomalies. + set norm_dir [file normalize $dir] + foreach path $access_path { + lappend norm_access_path [file normalize $path] + } - if {$norm_dir ni $norm_access_path} { - error "\"$dir\": not in access_path" - } + if {$norm_dir ni $norm_access_path} { + error "\"$dir\": not in access_path" } +} - # This procedure enables access from a safe interpreter to only a subset - # of the subcommands of a command: +# This procedure enables access from a safe interpreter to only a subset +# of the subcommands of a command: - proc ::safe::Subset {slave command okpat args} { - set subcommand [lindex $args 0] - if {[regexp $okpat $subcommand]} { - return [$command {*}$args] - } - set msg "not allowed to invoke subcommand $subcommand of $command" - Log $slave $msg - error $msg +proc ::safe::Subset {slave command okpat args} { + set subcommand [lindex $args 0] + if {[regexp $okpat $subcommand]} { + return [$command {*}$args] } + set msg "not allowed to invoke subcommand $subcommand of $command" + Log $slave $msg + error $msg +} - # This procedure installs an alias in a slave that invokes "safesubset" in - # the master to execute allowed subcommands. It precomputes the pattern of - # allowed subcommands; you can use wildcards in the pattern if you wish to - # allow subcommand abbreviation. - # - # Syntax is: AliasSubset slave alias target subcommand1 subcommand2... - - proc ::safe::AliasSubset {slave alias target args} { - set pat "^(" - set sep "" - foreach sub $args { - append pat $sep$sub - set sep | - } - append pat ")\$" - ::interp alias $slave $alias {}\ - [namespace current]::Subset $slave $target $pat +# This procedure installs an alias in a slave that invokes "safesubset" in +# the master to execute allowed subcommands. It precomputes the pattern of +# allowed subcommands; you can use wildcards in the pattern if you wish to +# allow subcommand abbreviation. +# +# Syntax is: AliasSubset slave alias target subcommand1 subcommand2... + +proc ::safe::AliasSubset {slave alias target args} { + set pat "^(" + set sep "" + foreach sub $args { + append pat $sep$sub + set sep | } + append pat ")\$" + ::interp alias $slave $alias {}\ + [namespace current]::Subset $slave $target $pat +} - # AliasEncoding is the target of the "encoding" alias in safe interpreters. +# AliasEncoding is the target of the "encoding" alias in safe interpreters. - proc ::safe::AliasEncoding {slave args} { - set argc [llength $args] +proc ::safe::AliasEncoding {slave args} { + set argc [llength $args] - set okpat "^(name.*|convert.*)\$" - set subcommand [lindex $args 0] + set okpat "^(name.*|convert.*)\$" + set subcommand [lindex $args 0] - if {[regexp $okpat $subcommand]} { - return [::interp invokehidden $slave encoding {*}$args] - } + if {[regexp $okpat $subcommand]} { + return [::interp invokehidden $slave encoding {*}$args] + } - if {[string first $subcommand system] == 0} { - if {$argc == 1} { - # passed all the tests , lets source it: - try { - return [::interp invokehidden $slave encoding system] - } on error msg { - Log $slave $msg - return -code error "script error" - } + if {[string first $subcommand system] == 0} { + if {$argc == 1} { + # passed all the tests , lets source it: + try { + return [::interp invokehidden $slave encoding system] + } on error msg { + Log $slave $msg + return -code error "script error" } - set msg "wrong # args: should be \"encoding system\"" - } else { - set msg "wrong # args: should be \"encoding option ?arg ...?\"" } - Log $slave $msg - error $msg + set msg "wrong # args: should be \"encoding system\"" + } else { + set msg "wrong # args: should be \"encoding option ?arg ...?\"" } + Log $slave $msg + error $msg +} -- cgit v0.12 From 8f57a0b74ebdd06b863f18306f18ff4790020cf6 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 19:35:20 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (4) Moved the multiple namespace eval's around. Command export at the top, everything else (var decls, argument parsing setup) at the bottom. --- ChangeLog | 13 ++++---- library/safe.tcl | 90 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d77a52..63d2e86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,12 +3,15 @@ * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. - (1) Change all procedure names to be fully qualified. - (2) Move the procedures out of the namespace eval. Keep their - locations. IOW, break the namespace eval apart into small - sectionsnot covering the procedure definitions. - (3) Reindent the code. Just lots of whitespace + (1) Changed all procedure names to be fully qualified. + (2) Moved the procedures out of the namespace eval. Kept their + locations. IOW, broke the namespace eval apart into small sections + not covering the procedure definitions. + (3) Reindented the code. Just lots of whitespace changes. Functionality unchanged. + (4) Moved the multiple namespace eval's around. Command export at + the top, everything else (var decls, argument parsing setup) at + the bottom. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index 0b6cf1c..b6622cf 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.22 2009/11/05 19:22:04 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.23 2009/11/05 19:35:21 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -26,48 +26,9 @@ package require opt 0.4.1 # Create the safe namespace namespace eval ::safe { - # Exported API: namespace export interpCreate interpInit interpConfigure interpDelete \ interpAddToAccessPath interpFindInAccessPath setLogCmd - - #### - # - # Setup the arguments parsing - # - #### - - # Make sure that our temporary variable is local to this namespace. [Bug - # 981733] - variable temp - - # Share the descriptions - set temp [::tcl::OptKeyRegister { - {-accessPath -list {} "access path for the slave"} - {-noStatics "prevent loading of statically linked pkgs"} - {-statics true "loading of statically linked pkgs"} - {-nestedLoadOk "allow nested loading"} - {-nested false "nested loading"} - {-deleteHook -script {} "delete hook"} - }] - - # create case (slave is optional) - ::tcl::OptKeyRegister { - {?slave? -name {} "name of the slave (optional)"} - } ::safe::interpCreate - # adding the flags sub programs to the command program (relying on Opt's - # internal implementation details) - lappend ::tcl::OptDesc(::safe::interpCreate) $::tcl::OptDesc($temp) - - # init and configure (slave is needed) - ::tcl::OptKeyRegister { - {slave -name {} "name of the slave"} - } ::safe::interpIC - # adding the flags sub programs to the command program (relying on Opt's - # internal implementation details) - lappend ::tcl::OptDesc(::safe::interpIC) $::tcl::OptDesc($temp) - # temp not needed anymore - ::tcl::OptKeyDelete $temp } # Helper function to resolve the dual way of specifying staticsok (either @@ -582,11 +543,6 @@ proc ::safe::setLogCmd {args} { } } -namespace eval ::safe { - # internal variable - variable Log {} -} - # ------------------- END OF PUBLIC METHODS ------------ # @@ -1045,3 +1001,47 @@ proc ::safe::AliasEncoding {slave args} { Log $slave $msg error $msg } + + +namespace eval ::safe { + # internal variable + variable Log {} + + #### + # + # Setup the arguments parsing + # + #### + + # Make sure that our temporary variable is local to this namespace. [Bug + # 981733] + variable temp + + # Share the descriptions + set temp [::tcl::OptKeyRegister { + {-accessPath -list {} "access path for the slave"} + {-noStatics "prevent loading of statically linked pkgs"} + {-statics true "loading of statically linked pkgs"} + {-nestedLoadOk "allow nested loading"} + {-nested false "nested loading"} + {-deleteHook -script {} "delete hook"} + }] + + # create case (slave is optional) + ::tcl::OptKeyRegister { + {?slave? -name {} "name of the slave (optional)"} + } ::safe::interpCreate + # adding the flags sub programs to the command program (relying on Opt's + # internal implementation details) + lappend ::tcl::OptDesc(::safe::interpCreate) $::tcl::OptDesc($temp) + + # init and configure (slave is needed) + ::tcl::OptKeyRegister { + {slave -name {} "name of the slave"} + } ::safe::interpIC + # adding the flags sub programs to the command program (relying on Opt's + # internal implementation details) + lappend ::tcl::OptDesc(::safe::interpIC) $::tcl::OptDesc($temp) + # temp not needed anymore + ::tcl::OptKeyDelete $temp +} -- cgit v0.12 From ac577f7e11a3948b96350bf08a039dccc4c0f84c Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 19:47:17 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (5) Moved the argument parsing setup into a procedure called when the code is loaded. Easier management of temporary data. --- ChangeLog | 2 ++ library/safe.tcl | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63d2e86..2b63065 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ (4) Moved the multiple namespace eval's around. Command export at the top, everything else (var decls, argument parsing setup) at the bottom. + (5) Moved the argument parsing setup into a procedure called when + the code is loaded. Easier management of temporary data. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index b6622cf..9914759 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.23 2009/11/05 19:35:21 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.24 2009/11/05 19:47:17 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -1003,9 +1003,7 @@ proc ::safe::AliasEncoding {slave args} { } -namespace eval ::safe { - # internal variable - variable Log {} +proc ::safe::Setup {} { #### # @@ -1013,10 +1011,6 @@ namespace eval ::safe { # #### - # Make sure that our temporary variable is local to this namespace. [Bug - # 981733] - variable temp - # Share the descriptions set temp [::tcl::OptKeyRegister { {-accessPath -list {} "access path for the slave"} @@ -1031,6 +1025,7 @@ namespace eval ::safe { ::tcl::OptKeyRegister { {?slave? -name {} "name of the slave (optional)"} } ::safe::interpCreate + # adding the flags sub programs to the command program (relying on Opt's # internal implementation details) lappend ::tcl::OptDesc(::safe::interpCreate) $::tcl::OptDesc($temp) @@ -1039,9 +1034,20 @@ namespace eval ::safe { ::tcl::OptKeyRegister { {slave -name {} "name of the slave"} } ::safe::interpIC + # adding the flags sub programs to the command program (relying on Opt's # internal implementation details) lappend ::tcl::OptDesc(::safe::interpIC) $::tcl::OptDesc($temp) + # temp not needed anymore ::tcl::OptKeyDelete $temp + + return } + +namespace eval ::safe { + # internal variable + variable Log {} +} + +::safe::Setup -- cgit v0.12 From b5720a0898beeb59ea7767c357196579ff0f1efe Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 19:55:32 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (6) Replaced several uses of 'Set' with calls to the new procedure 'InterpState' and direct access to the per-slave state array. --- ChangeLog | 2 + library/safe.tcl | 128 ++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 82 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b63065..d786dab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,8 @@ the bottom. (5) Moved the argument parsing setup into a procedure called when the code is loaded. Easier management of temporary data. + (6) Replaced several uses of 'Set' with calls to the new procedure + 'InterpState' and direct access to the per-slave state array. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index 9914759..b8244c5 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.24 2009/11/05 19:47:17 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.25 2009/11/05 19:55:33 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -123,12 +123,13 @@ proc ::safe::interpConfigure {args} { # checks for the "-help" option. set Args [::tcl::OptKeyParse ::safe::interpIC $args] CheckInterp $slave - set res {} - lappend res [list -accessPath [Set [PathListName $slave]]] - lappend res [list -statics [Set [StaticsOkName $slave]]] - lappend res [list -nested [Set [NestedOkName $slave]]] - lappend res [list -deleteHook [Set [DeleteHookName $slave]]] - join $res + InterpState $slave + + return [join [list \ + [list -accessPath $state(access_path)] \ + [list -statics $state(staticsok)] \ + [list -nested $state(nestedok)] \ + [list -deleteHook $state(cleanupHook)]]] } 2 { # If we have exactly 2 arguments the semantic is a "configure @@ -145,21 +146,15 @@ proc ::safe::interpConfigure {args} { return -code error [::tcl::OptFlagUsage $desc $arg] } CheckInterp $slave + InterpState $slave + set item [::tcl::OptCurDesc $desc] set name [::tcl::OptName $item] switch -exact -- $name { - -accessPath { - return [list -accessPath [Set [PathListName $slave]]] - } - -statics { - return [list -statics [Set [StaticsOkName $slave]]] - } - -nested { - return [list -nested [Set [NestedOkName $slave]]] - } - -deleteHook { - return [list -deleteHook [Set [DeleteHookName $slave]]] - } + -accessPath {return [list -accessPath $state(access_path)]} + -statics {return [list -statics $state(staticsok)]} + -nested {return [list -nested $state(nestedok)]} + -deleteHook {return [list -deleteHook $state(cleanupHook)]} -noStatics { # it is most probably a set in fact but we would need # then to jump to the set part and it is not *sure* @@ -184,12 +179,13 @@ proc ::safe::interpConfigure {args} { # create did set Args [::tcl::OptKeyParse ::safe::interpIC $args] CheckInterp $slave + InterpState $slave # Get the current (and not the default) values of whatever has # not been given: if {![::tcl::OptProcArgGiven -accessPath]} { set doreset 1 - set accessPath [Set [PathListName $slave]] + set accessPath $state(access_path) } else { set doreset 0 } @@ -197,7 +193,7 @@ proc ::safe::interpConfigure {args} { ![::tcl::OptProcArgGiven -statics] && ![::tcl::OptProcArgGiven -noStatics] } then { - set statics [Set [StaticsOkName $slave]] + set statics $state(staticsok) } else { set statics [InterpStatics] } @@ -207,10 +203,10 @@ proc ::safe::interpConfigure {args} { } then { set nested [InterpNested] } else { - set nested [Set [NestedOkName $slave]] + set nested $state(nestedok) } if {![::tcl::OptProcArgGiven -deleteHook]} { - set deleteHook [Set [DeleteHookName $slave]] + set deleteHook $state(cleanupHook) } # we can now reconfigure : InterpSetConfig $slave $accessPath $statics $nested $deleteHook @@ -312,6 +308,8 @@ proc ::safe::InterpSetConfig {slave access_path staticsok\ Log $slave "Setting accessPath=($access_path) staticsok=$staticsok\ nestedok=$nestedok deletehook=($deletehook)" NOTICE + InterpState $slave + # clear old autopath if it existed set nname [PathNumberName $slave] if {[Exists $nname]} { @@ -341,13 +339,14 @@ proc ::safe::InterpSetConfig {slave access_path staticsok\ incr i } Set $nname $i - Set [PathListName $slave] $access_path - Set [VirtualPathListName $slave] $slave_auto_path - Set [TmPathListName $slave] $slave_tm_path - Set [StaticsOkName $slave] $staticsok - Set [NestedOkName $slave] $nestedok - Set [DeleteHookName $slave] $deletehook + set state(access_path) $access_path + set state(access_path_slave) $slave_auto_path + set state(tm_path_slave) $slave_tm_path + + set state(staticsok) $staticsok + set state(nestedok) $nestedok + set state(cleanupHook) $deletehook SyncAccessPath $slave } @@ -358,7 +357,9 @@ proc ::safe::InterpSetConfig {slave access_path staticsok\ # Search for a real directory and returns its virtual Id (including the # "$") proc ::safe::interpFindInAccessPath {slave path} { - set access_path [GetAccessPath $slave] + InterpState $slave + set access_path $state(access_path) + set where [lsearch -exact $access_path $path] if {$where == -1} { return -code error "$path not found in access path $access_path" @@ -373,6 +374,7 @@ proc ::safe::interpFindInAccessPath {slave path} { proc ::safe::interpAddToAccessPath {slave path} { # first check if the directory is already in there try { + # inline interpFindInAccessPath, avoid try/error return [interpFindInAccessPath $slave $path] } on error {} { # new one, add it: @@ -382,8 +384,10 @@ proc ::safe::interpAddToAccessPath {slave path} { set token "\$[PathToken $n]" - Lappend [VirtualPathListName $slave] $token - Lappend [PathListName $slave] $path + InterpState $slave + lappend state(access_path_slave) $token + lappend state(access_path) $path + Set $nname [expr {$n+1}] SyncAccessPath $slave @@ -494,16 +498,18 @@ proc ::safe::AddSubDirs {pathList} { proc ::safe::interpDelete {slave} { Log $slave "About to delete" NOTICE + InterpState $slave + # If the slave has a cleanup hook registered, call it. Check the # existance because we might be called to delete an interp which has # not been registered with us at all - set hookname [DeleteHookName $slave] - if {[Exists $hookname]} { - set hook [Set $hookname] + + if {[info exists state(cleanupHook)]} { + set hook $state(cleanupHook) if {![::tcl::Lempty $hook]} { # remove the hook now, otherwise if the hook calls us somehow, # we'll loop - Unset $hookname + unset state(cleanupHook) try { {*}$hook $slave } on error err { @@ -515,9 +521,8 @@ proc ::safe::interpDelete {slave} { # Discard the global array of state associated with the slave, and # delete the interpreter. - set statename [InterpStateName $slave] - if {[Exists $statename]} { - Unset $statename + if {[info exists state]} { + unset state } # if we have been called twice, the interp might have been deleted @@ -550,11 +555,20 @@ proc ::safe::setLogCmd {args} { # tcl_library to the first token of the virtual path. # proc ::safe::SyncAccessPath {slave} { - set slave_auto_path [Set [VirtualPathListName $slave]] - ::interp eval $slave [list set auto_path $slave_auto_path] - Log $slave "auto_path in $slave has been set to $slave_auto_path"\ + InterpState $slave + + set slave_access_path $state(access_path_slave) + ::interp eval $slave [list set auto_path $slave_access_path] + + Log $slave "auto_path in $slave has been set to $slave_access_path"\ NOTICE - ::interp eval $slave [list set tcl_library [lindex $slave_auto_path 0]] + + # This code assumes that info library is the first element in the + # list of auto_path's. See -> InterpSetConfig for the code which + # ensures this condition. + + ::interp eval $slave [list \ + set tcl_library [lindex $slave_access_path 0]] } # Base name for storing all the slave states. The array variable name for @@ -565,9 +579,23 @@ proc ::safe::InterpStateName {slave} { return "S$slave" } +# base name for storing all the slave states +# the array variable name for slave foo is thus "Sfoo" +# and for sub slave {foo bar} "Sfoo bar" (spaces are handled +# ok everywhere (or should)) +# We add the S prefix to avoid that a slave interp called "Log" +# would smash our "Log" variable. + +proc ::safe::InterpState {slave} { + uplevel 1 [list variable S$slave] + uplevel 1 [list upvar 0 S$slave state] + return +} + # Check that the given slave is "one of us" proc ::safe::IsInterp {slave} { - expr {[Exists [InterpStateName $slave]] && [::interp exists $slave]} + InterpState $slave + return [expr {[info exists state] && [::interp exists $slave]}] } # Returns the virtual token for directory number N. If the slave argument @@ -631,11 +659,13 @@ proc ::safe::GetAccessPath {slave} { } # short cut for statics ok flag getting proc ::safe::StaticsOk {slave} { - Set [StaticsOkName $slave] + InterpState $slave + return $state(staticsok) } # short cut for getting the multiples interps sub loading ok flag proc ::safe::NestedOk {slave} { - Set [NestedOkName $slave] + InterpState $slave + return $state(nestedok) } # interp deletion storing hook name proc ::safe::DeleteHookName {slave} { @@ -902,7 +932,8 @@ proc ::safe::AliasLoad {slave file args} { # the security here relies on "file dirname" answering the proper # result... needs checking ? proc ::safe::FileInAccessPath {slave file} { - set access_path [GetAccessPath $slave] + InterpState $slave + set access_path $state(access_path) if {[file isdirectory $file]} { error "\"$file\": is a directory" @@ -922,7 +953,8 @@ proc ::safe::FileInAccessPath {slave file} { } proc ::safe::DirInAccessPath {slave dir} { - set access_path [GetAccessPath $slave] + InterpState $slave + set access_path $state(access_path) if {[file isfile $dir]} { error "\"$dir\": is a file" -- cgit v0.12 From b9978f4d217439867aee45c210e1e6e5a18da3ec Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 20:04:41 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (7) Replaced the remaining uses of 'Set' and others outside of the path/token handling, and deleted a number of procedures related to state array access which are not used any longer. --- ChangeLog | 3 +++ library/safe.tcl | 53 +++++++---------------------------------------------- 2 files changed, 10 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index d786dab..0ebdfc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,9 @@ the code is loaded. Easier management of temporary data. (6) Replaced several uses of 'Set' with calls to the new procedure 'InterpState' and direct access to the per-slave state array. + (7) Replaced the remaining uses of 'Set' and others outside of the + path/token handling, and deleted a number of procedures related to + state array access which are not used any longer. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index b8244c5..c139f93 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.25 2009/11/05 19:55:33 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.26 2009/11/05 20:04:41 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -462,8 +462,9 @@ proc ::safe::InterpInit { # Sync the paths used to search for Tcl modules. This can be done only # now, after tm.tcl was loaded. + InterpState $slave ::interp eval $slave [list \ - ::tcl::tm::add {*}[Set [TmPathListName $slave]] ] + ::tcl::tm::add {*}$state(tm_path_slave)] return $slave } @@ -609,30 +610,10 @@ proc ::safe::PathToken {n {slave ""}} { return "p(:$n:)" } } -# returns the variable name of the complete path list -proc ::safe::PathListName {slave} { - return "[InterpStateName $slave](access_path)" -} -# returns the variable name of the complete path list -proc ::safe::VirtualPathListName {slave} { - return "[InterpStateName $slave](access_path_slave)" -} -# returns the variable name of the complete tm path list -proc ::safe::TmPathListName {slave} { - return "[InterpStateName $slave](tm_path_slave)" -} # returns the variable name of the number of items proc ::safe::PathNumberName {slave} { return "[InterpStateName $slave](access_path,n)" } -# returns the staticsok flag var name -proc ::safe::StaticsOkName {slave} { - return "[InterpStateName $slave](staticsok)" -} -# returns the nestedok flag var name -proc ::safe::NestedOkName {slave} { - return "[InterpStateName $slave](nestedok)" -} # Run some code at the namespace toplevel proc ::safe::Toplevel {args} { namespace eval [namespace current] $args @@ -641,10 +622,6 @@ proc ::safe::Toplevel {args} { proc ::safe::Set {args} { Toplevel set {*}$args } -# lappend on toplevel vars -proc ::safe::Lappend {args} { - Toplevel lappend {*}$args -} # unset a var/token (currently just an global level eval) proc ::safe::Unset {args} { Toplevel unset {*}$args @@ -653,24 +630,6 @@ proc ::safe::Unset {args} { proc ::safe::Exists {varname} { Toplevel info exists $varname } -# short cut for access path getting -proc ::safe::GetAccessPath {slave} { - Set [PathListName $slave] -} -# short cut for statics ok flag getting -proc ::safe::StaticsOk {slave} { - InterpState $slave - return $state(staticsok) -} -# short cut for getting the multiples interps sub loading ok flag -proc ::safe::NestedOk {slave} { - InterpState $slave - return $state(nestedok) -} -# interp deletion storing hook name -proc ::safe::DeleteHookName {slave} { - return [InterpStateName $slave](cleanupHook) -} # # translate virtual path into real path @@ -870,13 +829,15 @@ proc ::safe::AliasLoad {slave file args} { # package name (can be empty if file is not). set package [lindex $args 0] + InterpState $slave + # Determine where to load. load use a relative interp path and {} # means self, so we can directly and safely use passed arg. set target [lindex $args 1] if {$target ne ""} { # we will try to load into a sub sub interp; check that we want to # authorize that. - if {![NestedOk $slave]} { + if {!$state(nestedok)} { Log $slave "loading to a sub interp (nestedok)\ disabled (trying to load $package to $target)" return -code error "permission denied (nested load)" @@ -891,7 +852,7 @@ proc ::safe::AliasLoad {slave file args} { Log $slave $msg return -code error $msg } - if {![StaticsOk $slave]} { + if {!$state(staticsok)} { Log $slave "static packages loading disabled\ (trying to load $package to $target)" return -code error "permission denied (static package)" -- cgit v0.12 From b977ee0d9d914e5cd1ab95214d34b7f950d4c331 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 20:15:36 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (8) Converted the path token system to cache normalized paths and path <-> token conversions. Removed more procedures not used any longer. Removed the test cases 4.3 and 4.4 from safe.test. They were testing the now deleted command "InterpStateName". --- ChangeLog | 4 ++ library/safe.tcl | 166 ++++++++++++++++++++++--------------------------------- tests/safe.test | 19 +------ 3 files changed, 70 insertions(+), 119 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ebdfc9..3608d79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,10 @@ (7) Replaced the remaining uses of 'Set' and others outside of the path/token handling, and deleted a number of procedures related to state array access which are not used any longer. + (8) Converted the path token system to cache normalized paths and + path <-> token conversions. Removed more procedures not used any + longer. Removed the test cases 4.3 and 4.4 from safe.test. They + were testing the now deleted command "InterpStateName". 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index c139f93..db4a41b 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.26 2009/11/05 20:04:41 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.27 2009/11/05 20:15:36 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -277,11 +277,13 @@ proc ::safe::InterpCreate { # probably need to call "auto_reset" in the slave in order that it gets # the right auto_index() array values. -proc ::safe::InterpSetConfig {slave access_path staticsok\ - nestedok deletehook} { +proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { + global auto_path + # determine and store the access path if empty if {$access_path eq ""} { - set access_path [uplevel \#0 set auto_path] + set access_path $auto_path + # Make sure that tcl_library is in auto_path and at the first # position (needed by setAccessPath) set where [lsearch -exact $access_path [info library]] @@ -311,39 +313,43 @@ proc ::safe::InterpSetConfig {slave access_path staticsok\ InterpState $slave # clear old autopath if it existed - set nname [PathNumberName $slave] - if {[Exists $nname]} { - set n [Set $nname] - for {set i 0} {$i<$n} {incr i} { - Unset [PathToken $i $slave] - } - } - # build new one - set slave_auto_path {} - set i 0 - foreach dir $access_path { - Set [PathToken $i $slave] $dir - lappend slave_auto_path "\$[PathToken $i]" - incr i - } # Extend the access list with the paths used to look for Tcl Modules. # We save the virtual form separately as well, as syncing it with the # slave has to be defered until the necessary commands are present for # setup. + + set norm_access_path {} + set slave_access_path {} + set map_access_path {} + + set i 0 + foreach dir $access_path { + set token [PathToken $i] + lappend slave_access_path $token + lappend map_access_path $token $dir + lappend norm_access_path [file normalize $dir] + incr i + } + + # NOTE / TODO : Prevent addition of dirs on the tm list if they + # are already on the result list, i.e. known. + foreach dir [::tcl::tm::list] { - lappend access_path $dir - Set [PathToken $i $slave] $dir - lappend slave_auto_path "\$[PathToken $i]" - lappend slave_tm_path "\$[PathToken $i]" + set token [PathToken $i] + lappend access_path $dir + lappend slave_access_path $token + lappend map_access_path $token $dir + lappend norm_access_path [file normalize $dir] + lappend slave_tm_path $token incr i } - Set $nname $i set state(access_path) $access_path - set state(access_path_slave) $slave_auto_path + set state(access_path,map) $map_access_path + set state(access_path,norm) $norm_access_path + set state(access_path,slave) $slave_access_path set state(tm_path_slave) $slave_tm_path - set state(staticsok) $staticsok set state(nestedok) $nestedok set state(cleanupHook) $deletehook @@ -358,13 +364,12 @@ proc ::safe::InterpSetConfig {slave access_path staticsok\ # "$") proc ::safe::interpFindInAccessPath {slave path} { InterpState $slave - set access_path $state(access_path) - set where [lsearch -exact $access_path $path] - if {$where == -1} { + set where [lsearch -exact $state(access_path) $path] + if {$where < 0} { return -code error "$path not found in access path $access_path" } - return "\$[PathToken $where]" + return [PathToken $where] } # @@ -373,27 +378,24 @@ proc ::safe::interpFindInAccessPath {slave path} { # virtual token (including the "$"). proc ::safe::interpAddToAccessPath {slave path} { # first check if the directory is already in there - try { - # inline interpFindInAccessPath, avoid try/error - return [interpFindInAccessPath $slave $path] - } on error {} { - # new one, add it: - set nname [PathNumberName $slave] - set n [Set $nname] - Set [PathToken $n $slave] $path - - set token "\$[PathToken $n]" + # (inlined interpFindInAccessPath). + InterpState $slave - InterpState $slave - lappend state(access_path_slave) $token - lappend state(access_path) $path + set where [lsearch -exact $state(access_path) $path] + if {$where >= 0} { + return [PathToken $where] + } - Set $nname [expr {$n+1}] + # new one, add it: + set token [PathToken [llength $state(access_path)]] - SyncAccessPath $slave + lappend state(access_path) $path + lappend state(access_path,slave) $token + lappend state(access_path,map) $token $path + lappend state(access_path,norm) [file normalize $path] - return $token - } + SyncAccessPath $slave + return $token } # This procedure applies the initializations to an already existing @@ -558,7 +560,7 @@ proc ::safe::setLogCmd {args} { proc ::safe::SyncAccessPath {slave} { InterpState $slave - set slave_access_path $state(access_path_slave) + set slave_access_path $state(access_path,slave) ::interp eval $slave [list set auto_path $slave_access_path] Log $slave "auto_path in $slave has been set to $slave_access_path"\ @@ -572,14 +574,6 @@ proc ::safe::SyncAccessPath {slave} { set tcl_library [lindex $slave_access_path 0]] } -# Base name for storing all the slave states. The array variable name for -# slave foo is thus "Sfoo" and for sub slave {foo bar} "Sfoo bar" (spaces -# are handled ok everywhere (or should)). We add the S prefix to avoid -# that a slave interp called "Log" would smash our "Log" variable. -proc ::safe::InterpStateName {slave} { - return "S$slave" -} - # base name for storing all the slave states # the array variable name for slave foo is thus "Sfoo" # and for sub slave {foo bar} "Sfoo bar" (spaces are handled @@ -599,54 +593,28 @@ proc ::safe::IsInterp {slave} { return [expr {[info exists state] && [::interp exists $slave]}] } -# Returns the virtual token for directory number N. If the slave argument -# is given, it will return the corresponding master global variable name -proc ::safe::PathToken {n {slave ""}} { - if {$slave ne ""} { - return "[InterpStateName $slave](access_path,$n)" - } else { - # We need to have a ":" in the token string so [file join] on the - # mac won't turn it into a relative path. - return "p(:$n:)" - } -} -# returns the variable name of the number of items -proc ::safe::PathNumberName {slave} { - return "[InterpStateName $slave](access_path,n)" -} -# Run some code at the namespace toplevel -proc ::safe::Toplevel {args} { - namespace eval [namespace current] $args -} -# set/get values -proc ::safe::Set {args} { - Toplevel set {*}$args -} -# unset a var/token (currently just an global level eval) -proc ::safe::Unset {args} { - Toplevel unset {*}$args -} -# test existance -proc ::safe::Exists {varname} { - Toplevel info exists $varname +# Returns the virtual token for directory number N. +proc ::safe::PathToken {n} { + # We need to have a ":" in the token string so [file join] on the + # mac won't turn it into a relative path. + return "\$p(:$n:)" ;# Form tested by case 7.2 } # # translate virtual path into real path # proc ::safe::TranslatePath {slave path} { + InterpState $slave + # somehow strip the namespaces 'functionality' out (the danger is that # we would strip valid macintosh "../" queries... : if {[string match "*::*" $path] || [string match "*..*" $path]} { error "invalid characters in path $path" } - set n [expr {[Set [PathNumberName $slave]]-1}] - for {} {$n>=0} {incr n -1} { - # fill the token virtual names with their real value - set [PathToken $n] [Set [PathToken $n $slave]] - } - # replaces the token by their value - subst -nobackslashes -nocommands $path + + # Use a cached map instead of computed local vars and subst. + + return [string map $state(access_path,map) $path] } @@ -904,11 +872,9 @@ proc ::safe::FileInAccessPath {slave file} { # Normalize paths for comparison since lsearch knows nothing of # potential pathname anomalies. set norm_parent [file normalize $parent] - foreach path $access_path { - lappend norm_access_path [file normalize $path] - } - if {$norm_parent ni $norm_access_path} { + InterpState $slave + if {$norm_parent ni $state(access_path,norm)} { error "\"$file\": not in access_path" } } @@ -924,11 +890,9 @@ proc ::safe::DirInAccessPath {slave dir} { # Normalize paths for comparison since lsearch knows nothing of # potential pathname anomalies. set norm_dir [file normalize $dir] - foreach path $access_path { - lappend norm_access_path [file normalize $path] - } - if {$norm_dir ni $norm_access_path} { + InterpState $slave + if {$norm_dir ni $state(access_path,norm)} { error "\"$dir\": not in access_path" } } diff --git a/tests/safe.test b/tests/safe.test index 6368b83..22ef475 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.25 2008/10/14 17:17:46 dgp Exp $ +# RCS: @(#) $Id: safe.test,v 1.26 2009/11/05 20:15:36 andreas_kupries Exp $ package require Tcl 8.5 @@ -117,23 +117,6 @@ test safe-4.2 {safe::interpDelete, indirectly} { a alias exit safe::interpDelete a a eval exit } "" -test safe-4.3 {safe::interpDelete, state array (not a public api)} { - catch {safe::interpDelete a} - namespace eval safe {set [InterpStateName a](foo) 33} - # not an error anymore to call it if interp is already - # deleted, to make trhings smooth if it's called twice... - catch {safe::interpDelete a} m1 - catch {namespace eval safe {set [InterpStateName a](foo)}} m2 - list $m1 $m2 -} "{}\ - {can't read \"[safe::InterpStateName a](foo)\": no such variable}" -test safe-4.4 {safe::interpDelete, state array, indirectly (not a public api)} { - catch {safe::interpDelete a} - safe::interpCreate a - namespace eval safe {set [InterpStateName a](foo) 33} - a eval exit - catch {namespace eval safe {set [InterpStateName a](foo)}} msg -} 1 test safe-4.5 {safe::interpDelete} { catch {safe::interpDelete a} safe::interpCreate a -- cgit v0.12 From 6b92eaeb72848bb82826716a7a18f3291042db19 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 20:26:24 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (9) Changed the log command setup so that logging is compiled out completely when disabled (default). --- ChangeLog | 2 ++ library/safe.tcl | 43 +++++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3608d79..1663363 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,8 @@ path <-> token conversions. Removed more procedures not used any longer. Removed the test cases 4.3 and 4.4 from safe.test. They were testing the now deleted command "InterpStateName". + (9) Changed the log command setup so that logging is compiled out + completely when disabled (default). 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index db4a41b..dc50e52 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.27 2009/11/05 20:15:36 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.28 2009/11/05 20:26:25 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -542,13 +542,28 @@ proc ::safe::interpDelete {slave} { proc ::safe::setLogCmd {args} { variable Log - if {[llength $args] == 0} { + set la [llength $args] + if {$la == 0} { return $Log - } elseif {[llength $args] == 1} { + } elseif {$la == 1} { set Log [lindex $args 0] } else { set Log $args } + + if {$Log eq ""} { + # Disable logging completely. Calls to it will be compiled out + # of all users. + proc ::safe::Log {args} {} + } else { + # Activate logging, define proper command. + + proc ::safe::Log {slave msg {type ERROR}} { + variable Log + {*}$Log "$type for slave $slave : $msg" + return + } + } } # ------------------- END OF PUBLIC METHODS ------------ @@ -617,17 +632,6 @@ proc ::safe::TranslatePath {slave path} { return [string map $state(access_path,map) $path] } - -# Log eventually log an error; to enable error logging, set Log to {puts -# stderr} for instance -proc ::safe::Log {slave msg {type ERROR}} { - variable Log - if {[info exists Log] && [llength $Log]} { - {*}$Log "$type for slave $slave : $msg" - } -} - - # file name control (limit access to files/resources that should be a # valid tcl source file) proc ::safe::CheckFileName {slave file} { @@ -999,6 +1003,17 @@ proc ::safe::Setup {} { # temp not needed anymore ::tcl::OptKeyDelete $temp + #### + # + # Default: No logging. + # + #### + + setLogCmd {} + + # Log eventually. + # To enable error logging, set Log to {puts stderr} for instance, + # via setLogCmd. return } -- cgit v0.12 From aae466d267a22fa7ffe3a9d0695ad56fa6270dd4 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 20:41:46 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (10) Misc. cleanup. Inlined IsInterp into CheckInterp, its only user. Consistent 'return -code error' for error reporting. Updated to use modern features (lassign, in/ni, dicts). The latter are used to keep a reverse path -> token map and quicker check of existence. --- ChangeLog | 5 +++ library/safe.tcl | 120 ++++++++++++++++++++++++++----------------------------- 2 files changed, 61 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1663363..a781ba7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,11 @@ were testing the now deleted command "InterpStateName". (9) Changed the log command setup so that logging is compiled out completely when disabled (default). + (10) Misc. cleanup. Inlined IsInterp into CheckInterp, its only + user. Consistent 'return -code error' for error reporting. Updated + to use modern features (lassign, in/ni, dicts). The latter are + used to keep a reverse path -> token map and quicker check of + existence. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index dc50e52..166ec7e 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.28 2009/11/05 20:26:25 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.29 2009/11/05 20:41:46 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -94,8 +94,10 @@ proc ::safe::interpInit {args} { [InterpStatics] [InterpNested] $deleteHook } +# Check that the given slave is "one of us" proc ::safe::CheckInterp {slave} { - if {![IsInterp $slave]} { + InterpState $slave + if {![info exists state] || ![::interp exists $slave]} { return -code error \ "\"$slave\" is not an interpreter managed by ::safe::" } @@ -134,7 +136,7 @@ proc ::safe::interpConfigure {args} { 2 { # If we have exactly 2 arguments the semantic is a "configure # get" - ::tcl::Lassign $args slave arg + lassign $args slave arg # get the flag sub program (we 'know' about Opt's internal # representation of data) @@ -289,16 +291,16 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { set where [lsearch -exact $access_path [info library]] if {$where == -1} { # not found, add it. - set access_path [concat [list [info library]] $access_path] + set access_path [linsert $access_path 0 [info library]] Log $slave "tcl_library was not in auto_path,\ added it to slave's access_path" NOTICE } elseif {$where != 0} { # not first, move it first - set access_path [concat [list [info library]]\ - [lreplace $access_path $where $where]] + set access_path [linsert \ + [lreplace $access_path $where $where] \ + 0 [info library]] Log $slave "tcl_libray was not in first in auto_path,\ moved it to front of slave's access_path" NOTICE - } # Add 1st level sub dirs (will searched by auto loading from tcl @@ -322,24 +324,31 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { set norm_access_path {} set slave_access_path {} set map_access_path {} + set remap_access_path {} + set slave_tm_path {} set i 0 foreach dir $access_path { set token [PathToken $i] lappend slave_access_path $token lappend map_access_path $token $dir + lappend remap_access_path $dir $token lappend norm_access_path [file normalize $dir] incr i } - # NOTE / TODO : Prevent addition of dirs on the tm list if they - # are already on the result list, i.e. known. - foreach dir [::tcl::tm::list] { + # Prevent the addition of dirs on the tm list to the result if + # they are already known. + if {[dict exists $remap_access_path $dir]} { + continue + } + set token [PathToken $i] lappend access_path $dir lappend slave_access_path $token lappend map_access_path $token $dir + lappend remap_access_path $dir $token lappend norm_access_path [file normalize $dir] lappend slave_tm_path $token incr i @@ -347,6 +356,7 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { set state(access_path) $access_path set state(access_path,map) $map_access_path + set state(access_path,remap) $remap_access_path set state(access_path,norm) $norm_access_path set state(access_path,slave) $slave_access_path set state(tm_path_slave) $slave_tm_path @@ -365,11 +375,11 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { proc ::safe::interpFindInAccessPath {slave path} { InterpState $slave - set where [lsearch -exact $state(access_path) $path] - if {$where < 0} { + if {![dict exists $state(access_path,remap) $path]} { return -code error "$path not found in access path $access_path" } - return [PathToken $where] + + return [dict get $state(access_path,remap) $path] } # @@ -381,9 +391,8 @@ proc ::safe::interpAddToAccessPath {slave path} { # (inlined interpFindInAccessPath). InterpState $slave - set where [lsearch -exact $state(access_path) $path] - if {$where >= 0} { - return [PathToken $where] + if {[dict exists $state(access_path,remap) $path]} { + return [dict get $state(access_path,remap) $path] } # new one, add it: @@ -392,6 +401,7 @@ proc ::safe::interpAddToAccessPath {slave path} { lappend state(access_path) $path lappend state(access_path,slave) $token lappend state(access_path,map) $token $path + lappend state(access_path,remap) $path $token lappend state(access_path,norm) [file normalize $path] SyncAccessPath $slave @@ -411,25 +421,26 @@ proc ::safe::InterpInit { # Configure will generate an access_path when access_path is empty. InterpSetConfig $slave $access_path $staticsok $nestedok $deletehook - # These aliases let the slave load files to define new commands - # NB we need to add [namespace current], aliases are always absolute # paths. - ::interp alias $slave source {} \ - [namespace current]::AliasSource $slave - ::interp alias $slave load {} \ - [namespace current]::AliasLoad $slave + # These aliases let the slave load files to define new commands # This alias lets the slave use the encoding names, convertfrom, # convertto, and system, but not "encoding system " to set the # system encoding. - - ::interp alias $slave encoding {} \ - [namespace current]::AliasEncoding $slave - # Handling Tcl Modules, we need a restricted form of Glob. - ::interp alias $slave glob {} \ - [namespace current]::AliasGlob $slave + # This alias interposes on the 'exit' command and cleanly terminates + # the slave. + + foreach {command alias} { + source AliasSource + load AliasLoad + encoding AliasEncoding + exit interpDelete + glob AliasGlob + } { + ::interp alias $slave $command {} [namespace current]::$alias $slave + } # This alias lets the slave have access to a subset of the 'file' # command functionality. @@ -437,12 +448,6 @@ proc ::safe::InterpInit { AliasSubset $slave file \ file dir.* join root.* ext.* tail path.* split - # This alias interposes on the 'exit' command and cleanly terminates - # the slave. - - ::interp alias $slave exit {} \ - [namespace current]::interpDelete $slave - # The allowed slave variables already have been set by Tcl_MakeSafe(3) # Source init.tcl and tm.tcl into the slave, to get auto_load and @@ -452,14 +457,14 @@ proc ::safe::InterpInit { source [file join $tcl_library init.tcl] }} msg]} then { Log $slave "can't source init.tcl ($msg)" - error "can't source init.tcl into slave $slave ($msg)" + return -code error "can't source init.tcl into slave $slave ($msg)" } if {[catch {::interp eval $slave { source [file join $tcl_library tm.tcl] }} msg]} then { Log $slave "can't source tm.tcl ($msg)" - error "can't source tm.tcl into slave $slave ($msg)" + return -code error "can't source tm.tcl into slave $slave ($msg)" } # Sync the paths used to search for Tcl modules. This can be done only @@ -480,12 +485,11 @@ proc ::safe::AddSubDirs {pathList} { if {[file isdirectory $dir]} { # check that we don't have it yet as a children of a previous # dir - if {[lsearch -exact $res $dir]<0} { + if {$dir ni $res} { lappend res $dir } foreach sub [glob -directory $dir -nocomplain *] { - if {([file isdirectory $sub]) \ - && ([lsearch -exact $res $sub]<0) } { + if {[file isdirectory $sub] && ($sub ni $res)} { # new sub dir, add it ! lappend res $sub } @@ -509,7 +513,7 @@ proc ::safe::interpDelete {slave} { if {[info exists state(cleanupHook)]} { set hook $state(cleanupHook) - if {![::tcl::Lempty $hook]} { + if {[llength $hook]} { # remove the hook now, otherwise if the hook calls us somehow, # we'll loop unset state(cleanupHook) @@ -602,12 +606,6 @@ proc ::safe::InterpState {slave} { return } -# Check that the given slave is "one of us" -proc ::safe::IsInterp {slave} { - InterpState $slave - return [expr {[info exists state] && [::interp exists $slave]}] -} - # Returns the virtual token for directory number N. proc ::safe::PathToken {n} { # We need to have a ":" in the token string so [file join] on the @@ -624,7 +622,7 @@ proc ::safe::TranslatePath {slave path} { # somehow strip the namespaces 'functionality' out (the danger is that # we would strip valid macintosh "../" queries... : if {[string match "*::*" $path] || [string match "*..*" $path]} { - error "invalid characters in path $path" + return -code error "invalid characters in path $path" } # Use a cached map instead of computed local vars and subst. @@ -642,12 +640,12 @@ proc ::safe::CheckFileName {slave file} { if {![file exists $file]} { # don't tell the file path - error "no such file or directory" + return -code error "no such file or directory" } if {![file readable $file]} { # don't tell the file path - error "not readable" + return -code error "not readable" } } @@ -695,11 +693,11 @@ proc ::safe::AliasGlob {slave args} { # search. That is not wanted. Abort, handler does catch # already (because glob was not defined before). See # package.tcl, lines 484ff in tclPkgUnknown. - error "unknown command glob" + return -code error "unknown command glob" } -* { Log $slave "Safe base rejecting glob option '$opt'" - error "Safe base rejecting glob option '$opt'" + return -code error "Safe base rejecting glob option '$opt'" } default { lappend cmd $opt @@ -869,7 +867,7 @@ proc ::safe::FileInAccessPath {slave file} { set access_path $state(access_path) if {[file isdirectory $file]} { - error "\"$file\": is a directory" + return -code error "\"$file\": is a directory" } set parent [file dirname $file] @@ -879,7 +877,7 @@ proc ::safe::FileInAccessPath {slave file} { InterpState $slave if {$norm_parent ni $state(access_path,norm)} { - error "\"$file\": not in access_path" + return -code error "\"$file\": not in access_path" } } @@ -888,7 +886,7 @@ proc ::safe::DirInAccessPath {slave dir} { set access_path $state(access_path) if {[file isfile $dir]} { - error "\"$dir\": is a file" + return -code error "\"$dir\": is a file" } # Normalize paths for comparison since lsearch knows nothing of @@ -897,7 +895,7 @@ proc ::safe::DirInAccessPath {slave dir} { InterpState $slave if {$norm_dir ni $state(access_path,norm)} { - error "\"$dir\": not in access_path" + return -code error "\"$dir\": not in access_path" } } @@ -911,7 +909,7 @@ proc ::safe::Subset {slave command okpat args} { } set msg "not allowed to invoke subcommand $subcommand of $command" Log $slave $msg - error $msg + return -code error $msg } # This procedure installs an alias in a slave that invokes "safesubset" in @@ -922,13 +920,7 @@ proc ::safe::Subset {slave command okpat args} { # Syntax is: AliasSubset slave alias target subcommand1 subcommand2... proc ::safe::AliasSubset {slave alias target args} { - set pat "^(" - set sep "" - foreach sub $args { - append pat $sep$sub - set sep | - } - append pat ")\$" + set pat "^([join $args |])\$" ::interp alias $slave $alias {}\ [namespace current]::Subset $slave $target $pat } @@ -960,7 +952,7 @@ proc ::safe::AliasEncoding {slave args} { set msg "wrong # args: should be \"encoding option ?arg ...?\"" } Log $slave $msg - error $msg + return -code error $msg } -- cgit v0.12 From 0097085615a9826bb1914c1b4ed49ab588415ed9 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 5 Nov 2009 20:51:25 +0000 Subject: * library/safe.tcl: A series of patches which bring the SafeBase up to date with code guidelines, Tcl's features, also eliminating a number of inefficiencies along the way. (11) Fixed bug 2854929. Recurse into all subdirs under all TM root dirs and put them on the access path. --- ChangeLog | 2 ++ library/safe.tcl | 44 +++++++++++++++++++++++++++++--------------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index a781ba7..085c119 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,8 @@ to use modern features (lassign, in/ni, dicts). The latter are used to keep a reverse path -> token map and quicker check of existence. + (11) Fixed bug 2854929. Recurse into all subdirs under all TM root + dirs and put them on the access path. 2009-11-02 Kevin B. Kenny diff --git a/library/safe.tcl b/library/safe.tcl index 166ec7e..758e1db 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.29 2009/11/05 20:41:46 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.30 2009/11/05 20:51:25 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -337,21 +337,35 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { incr i } - foreach dir [::tcl::tm::list] { - # Prevent the addition of dirs on the tm list to the result if - # they are already known. - if {[dict exists $remap_access_path $dir]} { - continue - } + set morepaths [::tcl::tm::list] + while {[llength $morepaths]} { + set addpaths $morepaths + set morepaths {} - set token [PathToken $i] - lappend access_path $dir - lappend slave_access_path $token - lappend map_access_path $token $dir - lappend remap_access_path $dir $token - lappend norm_access_path [file normalize $dir] - lappend slave_tm_path $token - incr i + foreach dir $addpaths { + # Prevent the addition of dirs on the tm list to the + # result if they are already known. + if {[dict exists $remap_access_path $dir]} { + continue + } + + set token [PathToken $i] + lappend access_path $dir + lappend slave_access_path $token + lappend map_access_path $token $dir + lappend remap_access_path $dir $token + lappend norm_access_path [file normalize $dir] + lappend slave_tm_path $token + incr i + + # [Bug 2854929] + # Recursively find deeper paths which may contain + # modules. Required to handle modules with names like + # 'platform::shell', which translate into + # 'platform/shell-X.tm', i.e arbitrarily deep + # subdirectories. + lappend morepaths {*}[glob -nocomplain -directory $dir -type d *] + } } set state(access_path) $access_path -- cgit v0.12 From 7b628883ba94899516793d2f04aa7879fc264793 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 6 Nov 2009 18:16:58 +0000 Subject: * library/safe.tcl (::safe::Setup): Added documentation of the contents of the state array. Also killed the 'InterpState' procedure with its upleveled variable/upvar combination, and replaced all uses with 'namespace upvar'. --- ChangeLog | 7 ++++++ library/safe.tcl | 69 +++++++++++++++++++++++++++++++------------------------- 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 085c119..5dd91df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-06 Andreas Kupries + + * library/safe.tcl (::safe::Setup): Added documentation of the + contents of the state array. Also killed the 'InterpState' + procedure with its upleveled variable/upvar combination, and + replaced all uses with 'namespace upvar'. + 2009-11-05 Andreas Kupries * library/safe.tcl: A series of patches which bring the SafeBase diff --git a/library/safe.tcl b/library/safe.tcl index 758e1db..5ea12b1 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.30 2009/11/05 20:51:25 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.31 2009/11/06 18:16:58 andreas_kupries Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -96,7 +96,7 @@ proc ::safe::interpInit {args} { # Check that the given slave is "one of us" proc ::safe::CheckInterp {slave} { - InterpState $slave + namespace upvar ::safe S$slave state if {![info exists state] || ![::interp exists $slave]} { return -code error \ "\"$slave\" is not an interpreter managed by ::safe::" @@ -125,7 +125,7 @@ proc ::safe::interpConfigure {args} { # checks for the "-help" option. set Args [::tcl::OptKeyParse ::safe::interpIC $args] CheckInterp $slave - InterpState $slave + namespace upvar ::safe S$slave state return [join [list \ [list -accessPath $state(access_path)] \ @@ -148,7 +148,7 @@ proc ::safe::interpConfigure {args} { return -code error [::tcl::OptFlagUsage $desc $arg] } CheckInterp $slave - InterpState $slave + namespace upvar ::safe S$slave state set item [::tcl::OptCurDesc $desc] set name [::tcl::OptName $item] @@ -181,7 +181,7 @@ proc ::safe::interpConfigure {args} { # create did set Args [::tcl::OptKeyParse ::safe::interpIC $args] CheckInterp $slave - InterpState $slave + namespace upvar ::safe S$slave state # Get the current (and not the default) values of whatever has # not been given: @@ -312,7 +312,7 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { Log $slave "Setting accessPath=($access_path) staticsok=$staticsok\ nestedok=$nestedok deletehook=($deletehook)" NOTICE - InterpState $slave + namespace upvar ::safe S$slave state # clear old autopath if it existed # build new one @@ -387,7 +387,7 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} { # Search for a real directory and returns its virtual Id (including the # "$") proc ::safe::interpFindInAccessPath {slave path} { - InterpState $slave + namespace upvar ::safe S$slave state if {![dict exists $state(access_path,remap) $path]} { return -code error "$path not found in access path $access_path" @@ -403,7 +403,7 @@ proc ::safe::interpFindInAccessPath {slave path} { proc ::safe::interpAddToAccessPath {slave path} { # first check if the directory is already in there # (inlined interpFindInAccessPath). - InterpState $slave + namespace upvar ::safe S$slave state if {[dict exists $state(access_path,remap) $path]} { return [dict get $state(access_path,remap) $path] @@ -483,7 +483,7 @@ proc ::safe::InterpInit { # Sync the paths used to search for Tcl modules. This can be done only # now, after tm.tcl was loaded. - InterpState $slave + namespace upvar ::safe S$slave state ::interp eval $slave [list \ ::tcl::tm::add {*}$state(tm_path_slave)] @@ -519,7 +519,7 @@ proc ::safe::AddSubDirs {pathList} { proc ::safe::interpDelete {slave} { Log $slave "About to delete" NOTICE - InterpState $slave + namespace upvar ::safe S$slave state # If the slave has a cleanup hook registered, call it. Check the # existance because we might be called to delete an interp which has @@ -591,7 +591,7 @@ proc ::safe::setLogCmd {args} { # tcl_library to the first token of the virtual path. # proc ::safe::SyncAccessPath {slave} { - InterpState $slave + namespace upvar ::safe S$slave state set slave_access_path $state(access_path,slave) ::interp eval $slave [list set auto_path $slave_access_path] @@ -607,19 +607,6 @@ proc ::safe::SyncAccessPath {slave} { set tcl_library [lindex $slave_access_path 0]] } -# base name for storing all the slave states -# the array variable name for slave foo is thus "Sfoo" -# and for sub slave {foo bar} "Sfoo bar" (spaces are handled -# ok everywhere (or should)) -# We add the S prefix to avoid that a slave interp called "Log" -# would smash our "Log" variable. - -proc ::safe::InterpState {slave} { - uplevel 1 [list variable S$slave] - uplevel 1 [list upvar 0 S$slave state] - return -} - # Returns the virtual token for directory number N. proc ::safe::PathToken {n} { # We need to have a ":" in the token string so [file join] on the @@ -631,7 +618,7 @@ proc ::safe::PathToken {n} { # translate virtual path into real path # proc ::safe::TranslatePath {slave path} { - InterpState $slave + namespace upvar ::safe S$slave state # somehow strip the namespaces 'functionality' out (the danger is that # we would strip valid macintosh "../" queries... : @@ -813,7 +800,7 @@ proc ::safe::AliasLoad {slave file args} { # package name (can be empty if file is not). set package [lindex $args 0] - InterpState $slave + namespace upvar ::safe S$slave state # Determine where to load. load use a relative interp path and {} # means self, so we can directly and safely use passed arg. @@ -877,7 +864,7 @@ proc ::safe::AliasLoad {slave file args} { # the security here relies on "file dirname" answering the proper # result... needs checking ? proc ::safe::FileInAccessPath {slave file} { - InterpState $slave + namespace upvar ::safe S$slave state set access_path $state(access_path) if {[file isdirectory $file]} { @@ -889,14 +876,14 @@ proc ::safe::FileInAccessPath {slave file} { # potential pathname anomalies. set norm_parent [file normalize $parent] - InterpState $slave + namespace upvar ::safe S$slave state if {$norm_parent ni $state(access_path,norm)} { return -code error "\"$file\": not in access_path" } } proc ::safe::DirInAccessPath {slave dir} { - InterpState $slave + namespace upvar ::safe S$slave state set access_path $state(access_path) if {[file isfile $dir]} { @@ -907,7 +894,7 @@ proc ::safe::DirInAccessPath {slave dir} { # potential pathname anomalies. set norm_dir [file normalize $dir] - InterpState $slave + namespace upvar ::safe S$slave state if {$norm_dir ni $state(access_path,norm)} { return -code error "\"$dir\": not in access_path" } @@ -1024,8 +1011,28 @@ proc ::safe::Setup {} { } namespace eval ::safe { - # internal variable + # internal variables + + # Log command, set via 'setLogCmd'. Logging is disabled when empty. variable Log {} + + # The package maintains a state array per slave interp under its + # control. The name of this array is S. This array is + # brought into scope where needed, using 'namespace upvar'. The S + # prefix is used to avoid that a slave interp called "Log" smashes + # the "Log" variable. + # + # The array's elements are: + # + # access_path : List of paths accessible to the slave. + # access_path,norm : Ditto, in normalized form. + # access_path,slave : Ditto, as the path tokens as seen by the slave. + # access_path,map : dict ( token -> path ) + # access_path,remap : dict ( path -> token ) + # tm_path_slave : List of TM root directories, as tokens seen by the slave. + # staticsok : Value of option -statics + # nestedok : Value of option -nested + # cleanupHook : Value of option -deleteHook } ::safe::Setup -- cgit v0.12 From f9939610df42a3d9d20c0fb54082804b6488c8f1 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 7 Nov 2009 09:24:22 +0000 Subject: [Bug 2891026] add addtional contraints for vista+ for non-readable directories --- ChangeLog | 6 ++++++ tests/fCmd.test | 35 ++++++++++++++++++++++++++--------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5dd91df..4691bc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-07 Pat Thoyts + + * tests/fCmd.test: [Bug 2891026] Exclude tests using chmod 555 + directories on vista and win7. The current user has access denied + and so cannot rename the directory without admin privileges. + 2009-11-06 Andreas Kupries * library/safe.tcl (::safe::Setup): Added documentation of the diff --git a/tests/fCmd.test b/tests/fCmd.test index 78be937..53360b3 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.65 2008/09/24 19:31:40 dgp Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.66 2009/11/07 09:24:22 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -20,6 +20,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint testsetplatform [llength [info commands testsetplatform]] testConstraint testchmod [llength [info commands testchmod]] +testConstraint winVista 0 +testConstraint win2000orXP 0 +testConstraint winOlderThan2000 0 # Don't know how to determine this constraint correctly testConstraint notNetworkFilesystem 0 testConstraint 95or98 [expr {[testConstraint 95] || [testConstraint 98]}] @@ -37,6 +40,20 @@ if {[testConstraint unix]} { } } +# Also used in winFCmd... +if {[testConstraint winOnly]} { + set major [string index $tcl_platform(osVersion) 0] + if {[testConstraint nt] && $major > 4} { + if {$major > 5} { + testConstraint winVista 1 + } elseif {$major == 5} { + testConstraint win2000orXP 1 + } + } else { + testConstraint winOlderThan2000 1 + } +} + testConstraint darwin9 [expr {[testConstraint unix] && $tcl_platform(os) eq "Darwin" && int([string range $tcl_platform(osVersion) 0 \ @@ -384,7 +401,7 @@ test fCmd-5.4 {TclFileDeleteCmd: multiple files} -constraints notRoot -setup { set x [list [file exists tf1] [file exists tf2] [file exists td1]] file delete tf1 td1 tf2 lappend x [file exists tf1] [file exists tf2] [file exists tf3] -} -result {1 1 1 0 0 0} +} -cleanup {cleanup} -result {1 1 1 0 0 0} test fCmd-5.5 {TclFileDeleteCmd: stop at first error} -setup { cleanup } -constraints {notRoot unixOrPc} -body { @@ -393,7 +410,7 @@ test fCmd-5.5 {TclFileDeleteCmd: stop at first error} -setup { file mkdir td1 catch {file delete tf1 td1 $root tf2} list [file exists tf1] [file exists tf2] [file exists td1] -} -result {0 1 0} +} -cleanup {cleanup} -result {0 1 0} test fCmd-5.6 {TclFileDeleteCmd: Tcl_TranslateFileName fails} -constraints {notRoot} -body { file delete ~_totally_bogus_user } -returnCodes error -result {user "_totally_bogus_user" doesn't exist} @@ -765,7 +782,7 @@ test fCmd-9.3 {file rename: comprehensive: file to new name} -setup { } -result {{tf3 tf4} 1 0} test fCmd-9.4 {file rename: comprehensive: dir to new name} -setup { cleanup -} -constraints {unixOrPc notRoot testchmod notDarwin9} -body { +} -constraints {unixOrPc notRoot testchmod notDarwin9 win2000orXP} -body { file mkdir td1 td2 testchmod 555 td2 file rename td1 td3 @@ -786,7 +803,7 @@ test fCmd-9.5 {file rename: comprehensive: file to self} -setup { } -result {tf1 tf2 1 0} test fCmd-9.6 {file rename: comprehensive: dir to self} -setup { cleanup -} -constraints {notRoot unixOrPc testchmod} -body { +} -constraints {notRoot unixOrPc testchmod win2000orXP} -body { file mkdir td1 file mkdir td2 testchmod 555 td2 @@ -862,12 +879,12 @@ test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} -setup { file mkdir tds2 file mkdir [file join tdd1 tds1 xxx] file mkdir [file join tdd2 tds2 xxx] - if {![testConstraint unix]} { + if {!([testConstraint unix] || [testConstraint winVista])} { testchmod 555 tds2 } set a1 [list [catch {file rename -force tds1 tdd1} msg] $msg] set a2 [list [catch {file rename -force tds2 tdd2} msg] $msg] - if {[testConstraint unix]} { + if {[testConstraint unix] || [testConstraint winVista]} { set w2 0 } else { set w2 [file writable tds2] @@ -893,12 +910,12 @@ test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} -setup { file mkdir td1 file mkdir td2 file mkdir td3 - if {![testConstraint unix]} { + if {!([testConstraint unix] || [testConstraint winVista])} { testchmod 555 td2 } file rename td1 [file join td3 td3] file rename td2 [file join td3 td4] - if {[testConstraint unix]} { + if {[testConstraint unix] || [testConstraint winVista]} { set w4 0 } else { set w4 [file writable [file join td3 td4]] -- cgit v0.12 From b1fc2667cc70d033e07caedd0986e9fcd7a36731 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 8 Nov 2009 19:56:45 +0000 Subject: Formatting correction --- doc/namespace.n | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/namespace.n b/doc/namespace.n index 6d9fae2..717de11 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.37 2009/11/05 17:49:16 dkf Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.38 2009/11/08 19:56:45 dkf Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -119,7 +119,7 @@ they are automatically created. Returns \fB1\fR if \fInamespace\fR is a valid namespace in the current context, returns \fB0\fR otherwise. .TP -\fBnamespace export \fR?\-\fBclear\fR? ?\fIpattern pattern ...\fR? +\fBnamespace export \fR?\fB\-clear\fR? ?\fIpattern pattern ...\fR? . Specifies which commands are exported from a namespace. The exported commands are those that can be later imported @@ -313,7 +313,7 @@ script and the result evaluated in the context of the namespace. The default handler for all namespaces is \fB::unknown\fR. If no argument is given, it returns the handler for the current namespace. .TP -\fBnamespace which\fR ?\-\fBcommand\fR? ?\-\fBvariable\fR? \fIname\fR +\fBnamespace which\fR ?\fB\-command\fR? ?\fB\-variable\fR? \fIname\fR . Looks up \fIname\fR as either a command or variable and returns its fully-qualified name. -- cgit v0.12 From 4118fefe25c541f4c54f2761c8ad616582a43869 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 8 Nov 2009 20:01:18 +0000 Subject: Moved the descriptions of the index formats to their own section, and added a warning to the 'bytelength' subcommand about future compatibility. --- doc/string.n | 136 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 75 insertions(+), 61 deletions(-) diff --git a/doc/string.n b/doc/string.n index 6e4a8a4..50fdeeb 100644 --- a/doc/string.n +++ b/doc/string.n @@ -5,7 +5,7 @@ .\" See the file "license.terms" for information on usage and redistribution .\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. .\" -.\" RCS: @(#) $Id: string.n,v 1.45 2008/10/17 10:22:25 dkf Exp $ +.\" RCS: @(#) $Id: string.n,v 1.46 2009/11/08 20:01:18 dkf Exp $ .\" .so man.macros .TH string n 8.1 Tcl "Tcl Built-In Commands" @@ -31,6 +31,13 @@ the byte length are rare. In almost all cases, you should use the \fBstring length\fR operation (including determining the length of a Tcl ByteArray object). Refer to the \fBTcl_NumUtfChars\fR manual entry for more details on the UTF\-8 representation. +.RS +.PP +\fICompatibility note:\fR it is likely that this subcommand will be +withdrawn in a future version of Tcl. It is better to use the +\fBencoding convertto\fR command to convert a string to a known +encoding and then apply \fBstring length\fR to that. +.RE .TP \fBstring compare\fR ?\fB\-nocase\fR? ?\fB\-length int\fR? \fIstring1 string2\fR . @@ -57,7 +64,7 @@ Search \fIhaystackString\fR for a sequence of characters that exactly match the characters in \fIneedleString\fR. If found, return the index of the first character in the first such match within \fIhaystackString\fR. If not found, return \-1. If \fIstartIndex\fR is specified (in any of the -forms accepted by the \fBindex\fR method), then the search is +forms described in \fBSTRING INDICES\fR), then the search is constrained to start with the character in \fIhaystackString\fR specified by the index. For example, .RS @@ -79,51 +86,9 @@ will return \fB\-1\fR. . Returns the \fIcharIndex\fR'th character of the \fIstring\fR argument. A \fIcharIndex\fR of 0 corresponds to the first character of the -string. \fIcharIndex\fR may be specified as follows: +string. \fIcharIndex\fR may be specified as described in the +\fBSTRING INDICES\fR section. .RS -.IP \fIinteger\fR 10 -For any index value that passes \fBstring is integer -strict\fR, -the char specified at this integral index -(e.g. \fB2\fR would refer to the -.QW c -in -.QW abcd ). -.IP \fBend\fR 10 -The last char of the string -(e.g. \fBend\fR would refer to the -.QW d -in -.QW abcd ). -.IP \fBend\fR\-\fIN\fR 10 -The last char of the string minus the specified integer offset \fIN\fR -(e.g. \fBend\fR\-1 would refer to the -.QW c -in -.QW abcd ). -.IP \fBend\fR+\fIN\fR 10 -The last char of the string plus the specified integer offset \fIN\fR -(e.g. \fBend\fR+\-1 would refer to the -.QW c -in -.QW abcd ). -.IP \fIM\fR+\fIN\fR 10 -The char specified at the integral index that is the sum of -integer values \fIM\fR and \fIN\fR -(e.g. \fB1+1\fR would refer to the -.QW c -in -.QW abcd ). -.IP \fIM\fR\-\fIN\fR 10 -The char specified at the integral index that is the difference of -integer values \fIM\fR and \fIN\fR -(e.g. \fB2\-1\fR would refer to the -.QW b -in -.QW abcd ). -.PP -In the specifications above, the integer value \fIM\fR contains no -trailing whitespace and the integer value \fIN\fR contains no -leading whitespace. .PP If \fIcharIndex\fR is less than 0 or greater than or equal to the length of the string then this command returns an empty string. @@ -137,7 +102,7 @@ empty string returns 0, otherwise an empty string will return 1 on any class. If \fB\-failindex\fR is specified, then if the function returns 0, the index in the string where the class was no longer valid will be stored in the variable named \fIvarname\fR. The \fIvarname\fR -will not be set if the function returns 1. The following character +will not be set if \fBstring is\fR returns 1. The following character classes are recognized (the class name can be abbreviated): .RS .IP \fBalnum\fR 12 @@ -207,7 +172,7 @@ Search \fIhaystackString\fR for a sequence of characters that exactly match the characters in \fIneedleString\fR. If found, return the index of the first character in the last such match within \fIhaystackString\fR. If there is no match, then return \-1. If \fIlastIndex\fR is specified (in any -of the forms accepted by the \fBindex\fR method), then only the +of the forms described in \fBSTRING INDICES\fR), then only the characters in \fIhaystackString\fR at or before the specified \fIlastIndex\fR will be considered by the search. For example, .RS @@ -340,7 +305,7 @@ case letters have been converted to lower case. If \fIfirst\fR is specified, it refers to the first char index in the string to start modifying. If \fIlast\fR is specified, it refers to the char index in the string to stop at (inclusive). \fIfirst\fR and \fIlast\fR may be -specified as for the \fBindex\fR method. +specified using the forms described in \fBSTRING INDICES\fR. .TP \fBstring totitle \fIstring\fR ?\fIfirst\fR? ?\fIlast\fR? . @@ -350,8 +315,8 @@ upper case if there is no title case variant) and the rest of the string is converted to lower case. If \fIfirst\fR is specified, it refers to the first char index in the string to start modifying. If \fIlast\fR is specified, it refers to the char index in the string to -stop at (inclusive). \fIfirst\fR and \fIlast\fR may be specified as -for the \fBindex\fR method. +stop at (inclusive). \fIfirst\fR and \fIlast\fR may be specified +using the forms described in \fBSTRING INDICES\fR. .TP \fBstring toupper \fIstring\fR ?\fIfirst\fR? ?\fIlast\fR? . @@ -360,7 +325,7 @@ case letters have been converted to upper case. If \fIfirst\fR is specified, it refers to the first char index in the string to start modifying. If \fIlast\fR is specified, it refers to the char index in the string to stop at (inclusive). \fIfirst\fR and \fIlast\fR may be -specified as for the \fBindex\fR method. +specified using the forms described in \fBSTRING INDICES\fR. .TP \fBstring trim \fIstring\fR ?\fIchars\fR? . @@ -387,19 +352,68 @@ tabs, newlines, and carriage returns). . Returns the index of the character just after the last one in the word containing character \fIcharIndex\fR of \fIstring\fR. \fIcharIndex\fR -may be specified as for the \fBindex\fR method. A word is +may be specified using the forms in \fBSTRING INDICES\fR. A word is considered to be any contiguous range of alphanumeric (Unicode letters or decimal digits) or underscore (Unicode connector punctuation) characters, or any single character other than these. .TP \fBstring wordstart \fIstring charIndex\fR . -Returns the index of the first character in the word containing -character \fIcharIndex\fR of \fIstring\fR. \fIcharIndex\fR may be -specified as for the \fBindex\fR method. A word is considered to be any -contiguous range of alphanumeric (Unicode letters or decimal digits) -or underscore (Unicode connector punctuation) characters, or any -single character other than these. +Returns the index of the first character in the word containing character +\fIcharIndex\fR of \fIstring\fR. \fIcharIndex\fR may be specified using the +forms in \fBSTRING INDICES\fR. A word is considered to be any contiguous +range of alphanumeric (Unicode letters or decimal digits) or underscore +(Unicode connector punctuation) characters, or any single character other than +these. +.SH "STRING INDICES" +.PP +When referring to indices into a string (e.g., for \fBstring index\fR +or \fBstring range\fR) the following formats are supported: +.IP \fIinteger\fR 10 +For any index value that passes \fBstring is integer \-strict\fR, +the char specified at this integral index (e.g., \fB2\fR would refer to the +.QW c +in +.QW abcd ). +.IP \fBend\fR 10 +The last char of the string (e.g., \fBend\fR would refer to the +.QW d +in +.QW abcd ). +.IP \fBend\-\fIN\fR 10 +The last char of the string minus the specified integer offset \fIN\fR (e.g., +.QW \fBend\-1\fR +would refer to the +.QW c +in +.QW abcd ). +.IP \fBend+\fIN\fR 10 +The last char of the string plus the specified integer offset \fIN\fR (e.g., +.QW \fBend+\-1\fR +would refer to the +.QW c +in +.QW abcd ). +.IP \fIM\fB+\fIN\fR 10 +The char specified at the integral index that is the sum of +integer values \fIM\fR and \fIN\fR (e.g., +.QW \fB1+1\fR +would refer to the +.QW c +in +.QW abcd ). +.IP \fIM\fB\-\fIN\fR 10 +The char specified at the integral index that is the difference of +integer values \fIM\fR and \fIN\fR (e.g., +.QW \fB2\-1\fR +would refer to the +.QW b +in +.QW abcd ). +.PP +In the specifications above, the integer value \fIM\fR contains no +trailing whitespace and the integer value \fIN\fR contains no +leading whitespace. .SH EXAMPLE .PP Test if the string in the variable \fIstring\fR is a proper non-empty @@ -408,9 +422,9 @@ prefix of the string \fBfoobar\fR. .CS set length [\fBstring length\fR $string] if {$length == 0} { - set isPrefix 0 + set isPrefix 0 } else { - set isPrefix [\fBstring equal\fR -length $length $string "foobar"] + set isPrefix [\fBstring equal\fR \-length $length $string "foobar"] } .CE .SH "SEE ALSO" -- cgit v0.12 From dcf42fe8da5be955694f765a4592c8422984366e Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 8 Nov 2009 20:18:43 +0000 Subject: Moved the descriptions of the index formats to their own section, and added a warning to the 'bytelength' subcommand about future compatibility. --- ChangeLog | 66 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4691bc3..c9828b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,56 +1,60 @@ +2009-11-08 Donal K. Fellows + + * doc/string.n (bytelength): Noted that this command is not a good + thing to use, and suggested a better alternatve. Also factored out the + description of the indices into its own section. + 2009-11-07 Pat Thoyts - * tests/fCmd.test: [Bug 2891026] Exclude tests using chmod 555 - directories on vista and win7. The current user has access denied - and so cannot rename the directory without admin privileges. + * tests/fCmd.test: [Bug 2891026]: Exclude tests using chmod 555 + directories on vista and win7. The current user has access denied and + so cannot rename the directory without admin privileges. 2009-11-06 Andreas Kupries * library/safe.tcl (::safe::Setup): Added documentation of the - contents of the state array. Also killed the 'InterpState' - procedure with its upleveled variable/upvar combination, and - replaced all uses with 'namespace upvar'. + contents of the state array. Also killed the 'InterpState' procedure + with its upleveled variable/upvar combination, and replaced all uses + with 'namespace upvar'. 2009-11-05 Andreas Kupries - * library/safe.tcl: A series of patches which bring the SafeBase - up to date with code guidelines, Tcl's features, also eliminating - a number of inefficiencies along the way. + * library/safe.tcl: A series of patches which bring the SafeBase up to + date with code guidelines, Tcl's features, also eliminating a number + of inefficiencies along the way. (1) Changed all procedure names to be fully qualified. (2) Moved the procedures out of the namespace eval. Kept their - locations. IOW, broke the namespace eval apart into small sections - not covering the procedure definitions. - (3) Reindented the code. Just lots of whitespace - changes. Functionality unchanged. - (4) Moved the multiple namespace eval's around. Command export at - the top, everything else (var decls, argument parsing setup) at - the bottom. - (5) Moved the argument parsing setup into a procedure called when - the code is loaded. Easier management of temporary data. + locations. IOW, broke the namespace eval apart into small sections not + covering the procedure definitions. + (3) Reindented the code. Just lots of whitespace changes. + Functionality unchanged. + (4) Moved the multiple namespace eval's around. Command export at the + top, everything else (var decls, argument parsing setup) at the + bottom. + (5) Moved the argument parsing setup into a procedure called when the + code is loaded. Easier management of temporary data. (6) Replaced several uses of 'Set' with calls to the new procedure 'InterpState' and direct access to the per-slave state array. (7) Replaced the remaining uses of 'Set' and others outside of the path/token handling, and deleted a number of procedures related to state array access which are not used any longer. - (8) Converted the path token system to cache normalized paths and - path <-> token conversions. Removed more procedures not used any - longer. Removed the test cases 4.3 and 4.4 from safe.test. They - were testing the now deleted command "InterpStateName". + (8) Converted the path token system to cache normalized paths and path + <-> token conversions. Removed more procedures not used any longer. + Removed the test cases 4.3 and 4.4 from safe.test. They were testing + the now deleted command "InterpStateName". (9) Changed the log command setup so that logging is compiled out completely when disabled (default). - (10) Misc. cleanup. Inlined IsInterp into CheckInterp, its only - user. Consistent 'return -code error' for error reporting. Updated - to use modern features (lassign, in/ni, dicts). The latter are - used to keep a reverse path -> token map and quicker check of - existence. - (11) Fixed bug 2854929. Recurse into all subdirs under all TM root + (10) Misc. cleanup. Inlined IsInterp into CheckInterp, its only user. + Consistent 'return -code error' for error reporting. Updated to use + modern features (lassign, in/ni, dicts). The latter are used to keep a + reverse path -> token map and quicker check of existence. + (11) Fixed [Bug 2854929]: Recurse into all subdirs under all TM root dirs and put them on the access path. 2009-11-02 Kevin B. Kenny - * library/tzdata/Asia/Novokuznetsk: New tzdata locale for - Kemerovo oblast', which now keeps Novosibirsk time and not - Kranoyarsk time. + * library/tzdata/Asia/Novokuznetsk: New tzdata locale for Kemerovo + oblast', which now keeps Novosibirsk time and not Kranoyarsk time. * library/tzdata/Asia/Damascus: Syrian DST changes. * library/tzdata/Asia/Hong_Kong: Hong Kong historic DST corrections. Olson tzdata2009q. -- cgit v0.12 From 0b59ce753401e295daaa781e76e9208a84e18548 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 9 Nov 2009 13:47:23 +0000 Subject: Some small bits of tidying up. --- generic/tclIO.c | 30 ++++++------ unix/tclUnixChan.c | 136 +++++++++++++++++++++++++-------------------------- unix/tclUnixPipe.c | 141 +++++++++++++++++++++++++++-------------------------- 3 files changed, 153 insertions(+), 154 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 57960f5..439eac2 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.164 2009/10/23 19:09:17 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.165 2009/11/09 13:47:23 dkf Exp $ */ #include "tclInt.h" @@ -621,11 +621,9 @@ Tcl_CreateCloseHandler( ClientData clientData) /* Arbitrary data to pass to the close * callback. */ { - ChannelState *statePtr; + ChannelState *statePtr = ((Channel *) chan)->state; CloseCallback *cbPtr; - statePtr = ((Channel *) chan)->state; - cbPtr = (CloseCallback *) ckalloc(sizeof(CloseCallback)); cbPtr->proc = proc; cbPtr->clientData = clientData; @@ -661,10 +659,9 @@ Tcl_DeleteCloseHandler( ClientData clientData) /* The callback data for the callback to * remove. */ { - ChannelState *statePtr; + ChannelState *statePtr = ((Channel *) chan)->state; CloseCallback *cbPtr, *cbPrevPtr; - statePtr = ((Channel *) chan)->state; for (cbPtr = statePtr->closeCbPtr, cbPrevPtr = NULL; cbPtr != NULL; cbPtr = cbPtr->nextPtr) { if ((cbPtr->proc == proc) && (cbPtr->clientData == clientData)) { @@ -673,9 +670,8 @@ Tcl_DeleteCloseHandler( } ckfree((char *) cbPtr); break; - } else { - cbPrevPtr = cbPtr; } + cbPrevPtr = cbPtr; } } @@ -1348,7 +1344,7 @@ Tcl_CreateChannel( * as well. */ - assert(sizeof(Tcl_ChannelTypeVersion)==sizeof(Tcl_DriverBlockModeProc *)); + assert(sizeof(Tcl_ChannelTypeVersion) == sizeof(Tcl_DriverBlockModeProc *)); /* * JH: We could subsequently memset these to 0 to avoid the numerous @@ -2297,9 +2293,9 @@ CheckForDeadChannel( * * FlushChannel -- * - * This function flushes as much of the queued output as is possible - * now. If calledFromAsyncFlush is nonzero, it is being called in an - * event handler to flush channel output asynchronously. + * This function flushes as much of the queued output as is possible now. + * If calledFromAsyncFlush is nonzero, it is being called in an event + * handler to flush channel output asynchronously. * * Results: * 0 if successful, else the error code that was returned by the channel @@ -2396,7 +2392,8 @@ FlushChannel( if (toWrite == 0) { written = 0; } else { - written = ChanWrite(chanPtr, RemovePoint(bufPtr),toWrite, &errorCode); + written = ChanWrite(chanPtr, RemovePoint(bufPtr), toWrite, + &errorCode); } /* @@ -8360,7 +8357,7 @@ ChannelTimerProc( #endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ Tcl_Preserve(statePtr); - Tcl_NotifyChannel((Tcl_Channel)chanPtr, TCL_READABLE); + Tcl_NotifyChannel((Tcl_Channel) chanPtr, TCL_READABLE); #ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING ResetFlag(statePtr, CHANNEL_TIMER_FEV); @@ -10057,10 +10054,11 @@ Tcl_GetChannelNamesEx( } goto done; } + for (hPtr = Tcl_FirstHashEntry(hTblPtr, &hSearch); hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { - statePtr = ((Channel *) Tcl_GetHashValue(hPtr))->state; + if (statePtr->topChanPtr == (Channel *) tsdPtr->stdinChannel) { name = "stdin"; } else if (statePtr->topChanPtr == (Channel *) tsdPtr->stdoutChannel) { @@ -10778,7 +10776,7 @@ FixLevelCode( res = Tcl_ListObjGetElements(NULL, msg, &lc, &lv); if (res != TCL_OK) { - Tcl_Panic("Tcl_SetChannelError(Interp): Bad syntax of message"); + Tcl_Panic("Tcl_SetChannelError: bad syntax of message"); } explicitResult = (1 == (lc % 2)); diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index d8eaccc..323d9e2 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.101 2009/06/15 16:24:45 rmax Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.102 2009/11/09 13:47:23 dkf Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -233,7 +233,6 @@ static Tcl_ChannelType ttyChannelType = { NULL, /* truncate proc. */ }; #endif /* SUPPORTS_TTY */ - /* *---------------------------------------------------------------------- @@ -256,11 +255,10 @@ static Tcl_ChannelType ttyChannelType = { static int FileBlockModeProc( ClientData instanceData, /* File state. */ - int mode) /* The mode to set. Can be one of - * TCL_MODE_BLOCKING or - * TCL_MODE_NONBLOCKING. */ + int mode) /* The mode to set. Can be TCL_MODE_BLOCKING + * or TCL_MODE_NONBLOCKING. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; if (TclUnixSetBlockingMode(fsPtr->fd, mode) < 0) { return errno; @@ -295,7 +293,7 @@ FileInputProc( * buffer? */ int *errorCodePtr) /* Where to store error code. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; int bytesRead; /* How many bytes were actually read from the * input device? */ @@ -341,7 +339,7 @@ FileOutputProc( int toWrite, /* How many bytes to write? */ int *errorCodePtr) /* Where to store error code. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; int written; *errorCodePtr = 0; @@ -385,7 +383,7 @@ FileCloseProc( ClientData instanceData, /* File state. */ Tcl_Interp *interp) /* For error reporting - unused. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; int errorCode = 0; Tcl_DeleteFileHandler(fsPtr->fd); @@ -431,7 +429,7 @@ FileSeekProc( * one of SEEK_START, SEEK_SET or SEEK_END. */ int *errorCodePtr) /* To store error code. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; Tcl_WideInt oldLoc, newLoc; /* @@ -492,7 +490,7 @@ FileWideSeekProc( * one of SEEK_START, SEEK_CUR or SEEK_END. */ int *errorCodePtr) /* To store error code. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; Tcl_WideInt newLoc; newLoc = TclOSseek(fsPtr->fd, (Tcl_SeekOffset) offset, mode); @@ -525,7 +523,7 @@ FileWatchProc( * TCL_READABLE, TCL_WRITABLE and * TCL_EXCEPTION. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; /* * Make sure we only register for events that are valid on this file. Note @@ -536,8 +534,7 @@ FileWatchProc( mask &= fsPtr->validMask; if (mask) { Tcl_CreateFileHandler(fsPtr->fd, mask, - (Tcl_FileProc *) Tcl_NotifyChannel, - (ClientData) fsPtr->channel); + (Tcl_FileProc *) Tcl_NotifyChannel, fsPtr->channel); } else { Tcl_DeleteFileHandler(fsPtr->fd); } @@ -567,10 +564,10 @@ FileGetHandleProc( int direction, /* TCL_READABLE or TCL_WRITABLE */ ClientData *handlePtr) /* Where to store the handle. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; if (direction & fsPtr->validMask) { - *handlePtr = (ClientData) INT2PTR(fsPtr->fd); + *handlePtr = INT2PTR(fsPtr->fd); return TCL_OK; } return TCL_ERROR; @@ -637,7 +634,7 @@ TtySetOptionProc( const char *optionName, /* Which option to set? */ const char *value) /* New value for option. */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; unsigned int len, vlen; TtyAttrs tty; #ifdef USE_TERMIOS @@ -652,6 +649,7 @@ TtySetOptionProc( /* * Option -mode baud,parity,databits,stopbits */ + if ((len > 2) && (strncmp(optionName, "-mode", len) == 0)) { if (TtyParseMode(interp, value, &tty.baud, &tty.parity, &tty.data, &tty.stop) != TCL_OK) { @@ -683,7 +681,9 @@ TtySetOptionProc( CLEAR_BITS(iostate.c_cflag, CRTSCTS); #endif /* CRTSCTS */ if (strncasecmp(value, "NONE", vlen) == 0) { - /* leave all handshake options disabled */ + /* + * Leave all handshake options disabled. + */ } else if (strncasecmp(value, "XONXOFF", vlen) == 0) { SET_BITS(iostate.c_iflag, IXON | IXOFF | IXANY); } else if (strncasecmp(value, "RTSCTS", vlen) == 0) { @@ -713,22 +713,11 @@ TtySetOptionProc( */ if ((len > 1) && (strncmp(optionName, "-xchar", len) == 0)) { - GETIOSTATE(fsPtr->fd, &iostate); + Tcl_DString ds; + if (Tcl_SplitList(interp, value, &argc, &argv) == TCL_ERROR) { return TCL_ERROR; - } - if (argc == 2) { - Tcl_DString ds; - Tcl_DStringInit(&ds); - - Tcl_UtfToExternalDString(NULL, argv[0], -1, &ds); - iostate.c_cc[VSTART] = *(const cc_t *) Tcl_DStringValue(&ds); - Tcl_DStringSetLength(&ds, 0); - - Tcl_UtfToExternalDString(NULL, argv[1], -1, &ds); - iostate.c_cc[VSTOP] = *(const cc_t *) Tcl_DStringValue(&ds); - Tcl_DStringFree(&ds); - } else { + } else if (argc != 2) { if (interp) { Tcl_AppendResult(interp, "bad value for -xchar: " "should be a list of two elements", NULL); @@ -736,8 +725,19 @@ TtySetOptionProc( ckfree((char *) argv); return TCL_ERROR; } - SETIOSTATE(fsPtr->fd, &iostate); + + GETIOSTATE(fsPtr->fd, &iostate); + + Tcl_UtfToExternalDString(NULL, argv[0], -1, &ds); + iostate.c_cc[VSTART] = *(const cc_t *) Tcl_DStringValue(&ds); + Tcl_DStringSetLength(&ds, 0); + + Tcl_UtfToExternalDString(NULL, argv[1], -1, &ds); + iostate.c_cc[VSTOP] = *(const cc_t *) Tcl_DStringValue(&ds); + Tcl_DStringFree(&ds); ckfree((char *) argv); + + SETIOSTATE(fsPtr->fd, &iostate); return TCL_OK; } @@ -868,7 +868,7 @@ TtyGetOptionProc( const char *optionName, /* Option to get. */ Tcl_DString *dsPtr) /* Where to store value(s). */ { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; unsigned int len; char buf[3*TCL_INTEGER_SPACE + 16]; int valid = 0; /* Flag if valid option parsed. */ @@ -902,17 +902,17 @@ TtyGetOptionProc( if (len==0 || (len>1 && strncmp(optionName, "-xchar", len)==0)) { IOSTATE iostate; Tcl_DString ds; - valid = 1; + valid = 1; GETIOSTATE(fsPtr->fd, &iostate); Tcl_DStringInit(&ds); - Tcl_ExternalToUtfDString(NULL, (const char *) &iostate.c_cc[VSTART], 1, &ds); - Tcl_DStringAppendElement(dsPtr, (const char *) Tcl_DStringValue(&ds)); + Tcl_ExternalToUtfDString(NULL, (char *) &iostate.c_cc[VSTART], 1, &ds); + Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); Tcl_DStringSetLength(&ds, 0); - Tcl_ExternalToUtfDString(NULL, (const char *) &iostate.c_cc[VSTOP], 1, &ds); - Tcl_DStringAppendElement(dsPtr, (const char *) Tcl_DStringValue(&ds)); + Tcl_ExternalToUtfDString(NULL, (char *) &iostate.c_cc[VSTOP], 1, &ds); + Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); Tcl_DStringFree(&ds); } if (len == 0) { @@ -949,6 +949,7 @@ TtyGetOptionProc( * Option is readonly and returned by [fconfigure chan -ttystatus] but not * returned by unnamed [fconfigure chan]. */ + if ((len > 4) && (strncmp(optionName, "-ttystatus", len) == 0)) { int status; @@ -1186,7 +1187,7 @@ TtyGetAttributes( case PARENB : parity = 'e'; break; case PARENB | PARODD : parity = 'o'; break; } -#endif /* !PAREXT */ +#endif /* PAREXT */ data = iostate.c_cflag & CSIZE; data = (data == CS5) ? 5 : (data == CS6) ? 6 : (data == CS7) ? 7 : 8; @@ -1391,11 +1392,13 @@ TtyParseMode( * sure to allow for the case where strchr is a macro. [Bug: 5089] */ + if (strchr( #if defined(PAREXT) || defined(USE_TERMIO) - if (strchr("noems", parity) == NULL) { + "noems", #else - if (strchr("noe", parity) == NULL) { + "noe", #endif /* PAREXT|USE_TERMIO */ + parity) == NULL) { if (interp != NULL) { Tcl_AppendResult(interp, bad, " parity: should be ", #if defined(PAREXT) || defined(USE_TERMIO) @@ -1453,21 +1456,20 @@ TtyInit( * initialized. */ int initialize) { - TtyState *ttyPtr; + TtyState *ttyPtr = (TtyState *) ckalloc((unsigned) sizeof(TtyState)); int stateUpdated = 0; - ttyPtr = (TtyState *) ckalloc((unsigned) sizeof(TtyState)); GETIOSTATE(fd, &ttyPtr->savedState); if (initialize) { IOSTATE iostate = ttyPtr->savedState; #if defined(USE_TERMIOS) || defined(USE_TERMIO) - if (iostate.c_iflag != IGNBRK || - iostate.c_oflag != 0 || - iostate.c_lflag != 0 || - iostate.c_cflag & CREAD || - iostate.c_cc[VMIN] != 1 || - iostate.c_cc[VTIME] != 0) { + if (iostate.c_iflag != IGNBRK + || iostate.c_oflag != 0 + || iostate.c_lflag != 0 + || iostate.c_cflag & CREAD + || iostate.c_cc[VMIN] != 1 + || iostate.c_cc[VTIME] != 0) { stateUpdated = 1; } iostate.c_iflag = IGNBRK; @@ -1479,8 +1481,8 @@ TtyInit( #endif /* USE_TERMIOS|USE_TERMIO */ #ifdef USE_SGTTY - if ((iostate.sg_flags & (EVENP | ODDP)) || - !(iostate.sg_flags & RAW)) { + if ((iostate.sg_flags & (EVENP | ODDP)) + || !(iostate.sg_flags & RAW)) { ttyPtr->stateUpdated = 1; } iostate.sg_flags &= EVENP | ODDP; @@ -1675,9 +1677,8 @@ Tcl_MakeFileChannel( sprintf(channelName, "serial%d", fd); } else #endif /* SUPPORTS_TTY */ - if (getsockname(fd, (struct sockaddr *)&sockaddr, &sockaddrLen) == 0 - && sockaddrLen > 0 - && sockaddr.sa_family == AF_INET) { + if ((getsockname(fd, &sockaddr, &sockaddrLen) == 0) + && (sockaddrLen > 0) && (sockaddr.sa_family == AF_INET)) { return TclpMakeTcpClientChannelMode((ClientData) INT2PTR(fd), mode); } else { channelTypePtr = &fileChannelType; @@ -1849,8 +1850,7 @@ Tcl_GetOpenFile( || (strcmp(chanTypePtr->typeName, "tcp") == 0) || (strcmp(chanTypePtr->typeName, "pipe") == 0)) { if (Tcl_GetChannelHandle(chan, - (forWriting ? TCL_WRITABLE : TCL_READABLE), - (ClientData*) &data) == TCL_OK) { + (forWriting ? TCL_WRITABLE : TCL_READABLE), &data) == TCL_OK) { fd = PTR2INT(data); /* @@ -1865,7 +1865,7 @@ Tcl_GetOpenFile( "\"", NULL); return TCL_ERROR; } - *filePtr = (ClientData) f; + *filePtr = f; return TCL_OK; } } @@ -1917,7 +1917,7 @@ TclUnixWaitForFile( int numFound, result = 0; fd_set readableMask; fd_set writableMask; - fd_set exceptionalMask; + fd_set exceptionMask; #ifndef _DARWIN_C_SOURCE /* @@ -1958,7 +1958,7 @@ TclUnixWaitForFile( FD_ZERO(&readableMask); FD_ZERO(&writableMask); - FD_ZERO(&exceptionalMask); + FD_ZERO(&exceptionMask); /* * Loop in a mini-event loop of our own, waiting for either the file to @@ -1983,14 +1983,14 @@ TclUnixWaitForFile( * Setup the select masks for the fd. */ - if (mask & TCL_READABLE) { + if (mask & TCL_READABLE) { FD_SET(fd, &readableMask); } - if (mask & TCL_WRITABLE) { + if (mask & TCL_WRITABLE) { FD_SET(fd, &writableMask); } if (mask & TCL_EXCEPTION) { - FD_SET(fd, &exceptionalMask); + FD_SET(fd, &exceptionMask); } /* @@ -1998,15 +1998,15 @@ TclUnixWaitForFile( */ numFound = select(fd + 1, &readableMask, &writableMask, - &exceptionalMask, timeoutPtr); + &exceptionMask, timeoutPtr); if (numFound == 1) { - if (FD_ISSET(fd, &readableMask)) { + if (FD_ISSET(fd, &readableMask)) { SET_BITS(result, TCL_READABLE); } - if (FD_ISSET(fd, &writableMask)) { + if (FD_ISSET(fd, &writableMask)) { SET_BITS(result, TCL_WRITABLE); } - if (FD_ISSET(fd, &exceptionalMask)) { + if (FD_ISSET(fd, &exceptionMask)) { SET_BITS(result, TCL_EXCEPTION); } result &= mask; @@ -2059,7 +2059,7 @@ FileTruncateProc( ClientData instanceData, Tcl_WideInt length) { - FileState *fsPtr = (FileState *) instanceData; + FileState *fsPtr = instanceData; int result; #ifdef HAVE_TYPE_OFF64_T diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 0d92556..69250f8 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.48 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.49 2009/11/09 13:47:23 dkf Exp $ */ #include "tclInt.h" @@ -25,8 +25,8 @@ * the same as NULL. */ -#define MakeFile(fd) ((TclFile)INT2PTR(((int)(fd))+1)) -#define GetFd(file) (PTR2INT(file)-1) +#define MakeFile(fd) ((TclFile) INT2PTR(((int) (fd)) + 1)) +#define GetFd(file) (PTR2INT(file) - 1) /* * This structure describes per-instance state of a pipe based channel. @@ -53,8 +53,6 @@ typedef struct PipeState { static int PipeBlockModeProc(ClientData instanceData, int mode); static int PipeClose2Proc(ClientData instanceData, Tcl_Interp *interp, int flags); -/* static int PipeCloseProc(ClientData instanceData, - Tcl_Interp *interp); */ static int PipeGetHandleProc(ClientData instanceData, int direction, ClientData *handlePtr); static int PipeInputProc(ClientData instanceData, char *buf, @@ -113,12 +111,11 @@ TclpMakeFile( { ClientData data; - if (Tcl_GetChannelHandle(channel, direction, - (ClientData *) &data) == TCL_OK) { - return MakeFile(PTR2INT(data)); - } else { - return (TclFile) NULL; + if (Tcl_GetChannelHandle(channel, direction, &data) != TCL_OK) { + return NULL; } + + return MakeFile(PTR2INT(data)); } /* @@ -423,9 +420,8 @@ TclpCreateProcess( * deallocated later */ - dsArray = (Tcl_DString *) - TclStackAlloc(interp, argc * sizeof(Tcl_DString)); - newArgv = (char **) TclStackAlloc(interp, (argc+1) * sizeof(char *)); + dsArray = TclStackAlloc(interp, argc * sizeof(Tcl_DString)); + newArgv = TclStackAlloc(interp, (argc+1) * sizeof(char *)); newArgv[argc] = NULL; for (i = 0; i < argc; i++) { newArgv[i] = Tcl_UtfToExternalDString(NULL, argv[i], -1, &dsArray[i]); @@ -438,6 +434,7 @@ TclpCreateProcess( * might corrupt the parent: so ensure standard channels are initialized in * the parent, otherwise SetupStdFile() might initialize them in the child. */ + if (!inputFile) { Tcl_GetStdChannel(TCL_STDIN); } @@ -448,6 +445,7 @@ TclpCreateProcess( Tcl_GetStdChannel(TCL_STDERR); } #endif + pid = fork(); if (pid == 0) { int joinThisError = errorFile && (errorFile == outputFile); @@ -465,7 +463,7 @@ TclpCreateProcess( ((dup2(1,2) == -1) || (fcntl(2, F_SETFD, 0) != 0)))) { sprintf(errSpace, "%dforked process couldn't set up input/output: ", errno); - (void)write(fd, errSpace, (size_t) strlen(errSpace)); + (void) write(fd, errSpace, (size_t) strlen(errSpace)); _exit(1); } @@ -476,7 +474,7 @@ TclpCreateProcess( RestoreSignals(); execvp(newArgv[0], newArgv); /* INTL: Native. */ sprintf(errSpace, "%dcouldn't execute \"%.150s\": ", errno, argv[0]); - (void)write(fd, errSpace, (size_t) strlen(errSpace)); + (void) write(fd, errSpace, (size_t) strlen(errSpace)); _exit(1); } @@ -764,7 +762,7 @@ TclpCreateCommandChannel( sprintf(channelName, "file%d", channelId); statePtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName, - (ClientData) statePtr, mode); + statePtr, mode); return statePtr->channel; } @@ -776,21 +774,21 @@ TclpCreateCommandChannel( * System dependent interface to create a pipe for the [chan pipe] * command. Stolen from TclX. * - * Parameters: - * o interp - Errors returned in result. - * o rchan, wchan - Returned read and write side. - * o flags - Reserved for future use. * Results: - * TCL_OK or TCL_ERROR. + * TCL_OK or TCL_ERROR. + * + * Side effects: + * Registers two channels. * *---------------------------------------------------------------------- */ + int Tcl_CreatePipe( - Tcl_Interp *interp, - Tcl_Channel *rchan, - Tcl_Channel *wchan, - int flags) + Tcl_Interp *interp, /* Errors returned in result. */ + Tcl_Channel *rchan, /* Returned read side. */ + Tcl_Channel *wchan, /* Returned write side. */ + int flags) /* Reserved for future use. */ { int fileNums[2]; @@ -803,16 +801,13 @@ Tcl_CreatePipe( fcntl(fileNums[0], F_SETFD, FD_CLOEXEC); fcntl(fileNums[1], F_SETFD, FD_CLOEXEC); - *rchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[0]), - TCL_READABLE); + *rchan = Tcl_MakeFileChannel(INT2PTR(fileNums[0]), TCL_READABLE); Tcl_RegisterChannel(interp, *rchan); - *wchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[1]), - TCL_WRITABLE); + *wchan = Tcl_MakeFileChannel(INT2PTR(fileNums[1]), TCL_WRITABLE); Tcl_RegisterChannel(interp, *wchan); return TCL_OK; } - /* *---------------------------------------------------------------------- @@ -891,15 +886,13 @@ PipeBlockModeProc( { PipeState *psPtr = instanceData; - if (psPtr->inFile) { - if (TclUnixSetBlockingMode(GetFd(psPtr->inFile), mode) < 0) { - return errno; - } + if (psPtr->inFile + && TclUnixSetBlockingMode(GetFd(psPtr->inFile), mode) < 0) { + return errno; } - if (psPtr->outFile) { - if (TclUnixSetBlockingMode(GetFd(psPtr->outFile), mode) < 0) { - return errno; - } + if (psPtr->outFile + && TclUnixSetBlockingMode(GetFd(psPtr->outFile), mode) < 0) { + return errno; } psPtr->isNonBlocking = (mode == TCL_MODE_NONBLOCKING); @@ -930,31 +923,35 @@ PipeClose2Proc( Tcl_Interp *interp, /* For error reporting. */ int flags) /* Flags that indicate which side to close. */ { - PipeState *pipePtr= (PipeState *) instanceData; + PipeState *pipePtr = instanceData; Tcl_Channel errChan; int errorCode, result; errorCode = 0; result = 0; - if (((!flags)||(flags & TCL_CLOSE_READ)) && (pipePtr->inFile != NULL)) { + if (((!flags) || (flags & TCL_CLOSE_READ)) && (pipePtr->inFile != NULL)) { if (TclpCloseFile(pipePtr->inFile) < 0) { errorCode = errno; } else { - pipePtr->inFile=NULL; + pipePtr->inFile = NULL; } } - if (((!flags)||(flags & TCL_CLOSE_WRITE)) && (pipePtr->outFile != NULL) && (errorCode == 0)) { + if (((!flags) || (flags & TCL_CLOSE_WRITE)) && (pipePtr->outFile != NULL) + && (errorCode == 0)) { if (TclpCloseFile(pipePtr->outFile) < 0) { errorCode = errno; } else { - pipePtr->outFile=NULL; + pipePtr->outFile = NULL; } } - /* if half-closing, stop here. */ + /* + * If half-closing, stop here. + */ + if (flags) { - return errorCode; + return errorCode; } if (pipePtr->isNonBlocking || TclInExit()) { @@ -978,7 +975,8 @@ PipeClose2Proc( if (pipePtr->errorFile) { errChan = Tcl_MakeFileChannel( - (ClientData) INT2PTR(GetFd(pipePtr->errorFile)), TCL_READABLE); + INT2PTR(GetFd(pipePtr->errorFile)), + TCL_READABLE); } else { errChan = NULL; } @@ -1022,7 +1020,7 @@ PipeInputProc( * buffer? */ int *errorCodePtr) /* Where to store error code. */ { - PipeState *psPtr = (PipeState *) instanceData; + PipeState *psPtr = instanceData; int bytesRead; /* How many bytes were actually read from the * input device? */ @@ -1043,9 +1041,8 @@ PipeInputProc( if (bytesRead < 0) { *errorCodePtr = errno; return -1; - } else { - return bytesRead; } + return bytesRead; } /* @@ -1073,7 +1070,7 @@ PipeOutputProc( int toWrite, /* How many bytes to write? */ int *errorCodePtr) /* Where to store error code. */ { - PipeState *psPtr = (PipeState *) instanceData; + PipeState *psPtr = instanceData; int written; *errorCodePtr = 0; @@ -1090,9 +1087,8 @@ PipeOutputProc( if (written < 0) { *errorCodePtr = errno; return -1; - } else { - return written; } + return written; } /* @@ -1119,15 +1115,14 @@ PipeWatchProc( * TCL_READABLE, TCL_WRITABLE and * TCL_EXCEPTION. */ { - PipeState *psPtr = (PipeState *) instanceData; + PipeState *psPtr = instanceData; int newmask; if (psPtr->inFile) { newmask = mask & (TCL_READABLE | TCL_EXCEPTION); if (newmask) { Tcl_CreateFileHandler(GetFd(psPtr->inFile), mask, - (Tcl_FileProc *) Tcl_NotifyChannel, - (ClientData) psPtr->channel); + (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel); } else { Tcl_DeleteFileHandler(GetFd(psPtr->inFile)); } @@ -1136,8 +1131,7 @@ PipeWatchProc( newmask = mask & (TCL_WRITABLE | TCL_EXCEPTION); if (newmask) { Tcl_CreateFileHandler(GetFd(psPtr->outFile), mask, - (Tcl_FileProc *) Tcl_NotifyChannel, - (ClientData) psPtr->channel); + (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel); } else { Tcl_DeleteFileHandler(GetFd(psPtr->outFile)); } @@ -1168,14 +1162,14 @@ PipeGetHandleProc( int direction, /* TCL_READABLE or TCL_WRITABLE */ ClientData *handlePtr) /* Where to store the handle. */ { - PipeState *psPtr = (PipeState *) instanceData; + PipeState *psPtr = instanceData; if (direction == TCL_READABLE && psPtr->inFile) { - *handlePtr = (ClientData) INT2PTR(GetFd(psPtr->inFile)); + *handlePtr = INT2PTR(GetFd(psPtr->inFile)); return TCL_OK; } if (direction == TCL_WRITABLE && psPtr->outFile) { - *handlePtr = (ClientData) INT2PTR(GetFd(psPtr->outFile)); + *handlePtr = INT2PTR(GetFd(psPtr->outFile)); return TCL_OK; } return TCL_ERROR; @@ -1204,9 +1198,8 @@ Tcl_WaitPid( int options) { int result; - pid_t real_pid; + pid_t real_pid = (pid_t) PTR2INT(pid); - real_pid = (pid_t) PTR2INT(pid); while (1) { result = (int) waitpid(real_pid, statPtr, options); if ((result != -1) || (errno != EINTR)) { @@ -1240,27 +1233,35 @@ Tcl_PidObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* Argument strings. */ { + Tcl_Channel chan; + PipeState *pipePtr; + int i; + Tcl_Obj *resultPtr, *longObjPtr; + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?channelId?"); return TCL_ERROR; } + if (objc == 1) { Tcl_SetObjResult(interp, Tcl_NewLongObj((long) getpid())); } else { - Tcl_Channel chan; - const Tcl_ChannelType *chanTypePtr; - PipeState *pipePtr; - int i; - Tcl_Obj *resultPtr, *longObjPtr; + /* + * Get the channel and make sure that it refers to a pipe. + */ chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL); - if (chan == (Tcl_Channel) NULL) { + if (chan == NULL) { return TCL_ERROR; } - chanTypePtr = Tcl_GetChannelType(chan); - if (chanTypePtr != &pipeChannelType) { + if (Tcl_GetChannelType(chan) != &pipeChannelType) { return TCL_OK; } + + /* + * Extract the process IDs from the pipe structure. + */ + pipePtr = (PipeState *) Tcl_GetChannelInstanceData(chan); resultPtr = Tcl_NewObj(); for (i = 0; i < pipePtr->numPids; i++) { -- cgit v0.12 From 11dab762d5790cc735bd9b5239406d0b076f136f Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 9 Nov 2009 22:36:19 +0000 Subject: * generic/tclBasic.c (TclEvalObjEx): Moved the #280 decrement of refCount for the file path out of the branch after the whole conditional, closing a memory leak. Added clause on structure type to prevent seg.faulting. Forward port from valgrinding the Tcl 8.5 branch. --- ChangeLog | 8 ++++++++ generic/tclBasic.c | 15 +++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9828b8..128df86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-09 Andreas Kupries + + * generic/tclBasic.c (TclEvalObjEx): Moved the #280 decrement of + refCount for the file path out of the branch after the whole + conditional, closing a memory leak. Added clause on structure type + to prevent seg.faulting. Forward port from valgrinding the Tcl 8.5 + branch. + 2009-11-08 Donal K. Fellows * doc/string.n (bytelength): Noted that this command is not a good diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 68fe439..be9ce4b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.405 2009/10/31 20:18:43 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.406 2009/11/09 22:36:19 andreas_kupries Exp $ */ #include "tclInt.h" @@ -6099,14 +6099,13 @@ TclNREvalObjEx( result = TclEvalEx(interp, script, numSrcBytes, flags, ctxPtr->line[word], NULL, script); + } + if (pc && (ctxPtr->type == TCL_LOCATION_SOURCE)) { + /* + * Death of SrcInfo reference. + */ - if (pc) { - /* - * Death of SrcInfo reference. - */ - - Tcl_DecrRefCount(ctxPtr->data.eval.path); - } + Tcl_DecrRefCount(ctxPtr->data.eval.path); } TclStackFree(interp, ctxPtr); -- cgit v0.12 From 6d01aeb1fd2c8828a830d155acb60f6fdea98327 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 9 Nov 2009 22:59:13 +0000 Subject: * tests/info.test: Resolve ambiguous resolution of variable "res". Forward port from 8.5 --- ChangeLog | 3 +++ tests/info.test | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 128df86..50c1725 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ to prevent seg.faulting. Forward port from valgrinding the Tcl 8.5 branch. + * tests/info.test: Resolve ambiguous resolution of variable + "res". Forward port from 8.5 + 2009-11-08 Donal K. Fellows * doc/string.n (bytelength): Noted that this command is not a good diff --git a/tests/info.test b/tests/info.test index 7e89d8e..da54562 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.69 2009/10/29 22:20:12 dkf Exp $ +# RCS: @(#) $Id: info.test,v 1.70 2009/11/09 22:59:13 andreas_kupries Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -1033,7 +1033,7 @@ set body {set flag 0 set a c set res [info frame 0]} ;# line 3! -test info-31.0 {ns eval, script in variable} -body { +test info-31.0 {ns eval, script in variable} -body {set res {} namespace eval foo $body return $foo::res } -result {type eval line 3 cmd {info frame 0} level 0} -cleanup { -- cgit v0.12 From 87c01b989008cb30c049831de30fd6005f8e45bc Mon Sep 17 00:00:00 2001 From: stwo Date: Mon, 9 Nov 2009 23:14:57 +0000 Subject: Removed outdated Msys + Mingw info. --- ChangeLog | 4 ++++ win/README | 15 +++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50c1725..d696061 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-11-09 Stuart Cassoff + + * win/README: [bug 2459744]: Removed outdated Msys + Mingw info. + 2009-11-09 Andreas Kupries * generic/tclBasic.c (TclEvalObjEx): Moved the #280 decrement of diff --git a/win/README b/win/README index 73c5aec..024be8a 100644 --- a/win/README +++ b/win/README @@ -1,6 +1,6 @@ Tcl 8.6 for Windows -RCS: @(#) $Id: README,v 1.40 2008/09/25 14:37:59 dgp Exp $ +RCS: @(#) $Id: README,v 1.41 2009/11/09 23:14:57 stwo Exp $ 1. Introduction --------------- @@ -31,18 +31,9 @@ In order to compile Tcl for Windows, you need the following: Msys + Mingw [http://www.mingw.org/download.shtml] - http://prdownloads.sourceforge.net/tcl/msys_mingw8.zip - This Msys + Mingw download above is the minimal environment needed - to build Tcl/Tk under Windows. It includes a shell environment and - gcc. The release is designed to make it as easy a possible to build - Tcl/Tk. To install, you just download the zip file and extract the - files into a directory. The README.TXT file describes how to launch - the msys shell, you then run the configure script in the tcl/win - directory. - - Please note that building under Cygwin is NOT supported, - do not file a bug report about building under Cygwin. +Please note that building under Cygwin is NOT supported, +do not file a bug report about building under Cygwin. In practice, this release is built with Visual C++ 6.0 and the TEA Makefile. -- cgit v0.12 From ff59f687d9a7ba1a84e8254166258300183af233 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 10 Nov 2009 17:57:39 +0000 Subject: * generic/tclObj.c: Plus memory leak in TclContinuationsEnter(). [Bug 2895323]. Forward port from Tcl 8.5 branch, change by Don Porter. --- ChangeLog | 6 ++++++ generic/tclObj.c | 13 ++++++++++++- tests/info.test | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d696061..b85453b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-10 Andreas Kupries + + * generic/tclObj.c: Plus memory leak in TclContinuationsEnter(). + [Bug 2895323]. Forward port from Tcl 8.5 branch, change by Don + Porter. + 2009-11-09 Stuart Cassoff * win/README: [bug 2459744]: Removed outdated Msys + Mingw info. diff --git a/generic/tclObj.c b/generic/tclObj.c index 8869e9b..5913dd1 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.163 2009/10/18 10:39:41 mistachkin Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.164 2009/11/10 17:57:39 andreas_kupries Exp $ */ #include "tclInt.h" @@ -582,6 +582,17 @@ TclContinuationsEnter(Tcl_Obj* objPtr, ContLineLoc* clLocPtr = (ContLineLoc*) ckalloc (sizeof(ContLineLoc) + num*sizeof(int)); + if (!newEntry) { + /* + * Somehow we're entering ContLineLoc data for the same value (objPtr) + * more than one time. Not sure whether that's expected, or a sign of + * trouble, but at a minimum, we should take care not to leak the old + * entry. + */ + + ckfree((char *) Tcl_GetHashValue(hPtr)); + } + clLocPtr->num = num; memcpy (&clLocPtr->loc, loc, num*sizeof(int)); clLocPtr->loc[num] = CLL_END; /* Sentinel */ diff --git a/tests/info.test b/tests/info.test index da54562..21b7712 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.70 2009/11/09 22:59:13 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.71 2009/11/10 17:57:39 andreas_kupries Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -1033,7 +1033,7 @@ set body {set flag 0 set a c set res [info frame 0]} ;# line 3! -test info-31.0 {ns eval, script in variable} -body {set res {} +test info-31.0 {ns eval, script in variable} -body {namespace eval foo {variable res {}} namespace eval foo $body return $foo::res } -result {type eval line 3 cmd {info frame 0} level 0} -cleanup { -- cgit v0.12 From 1cced1e04ddb24fb248965ccecb3815be9fa44a2 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 10 Nov 2009 20:40:06 +0000 Subject: Cleanup directories that have been set chmod 000. On Windows7 and Vista we really have no access and these were getting left behind. A few tests were changed to reflect the intent of the test where setting a directory chmod 000 should prevent any modification. This restriction was ignored on XP but is honoured on Vista --- ChangeLog | 10 ++++++++++ tests/winFCmd.test | 40 ++++++++++++++++++++++++++++++---------- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index b85453b..e1013de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-11-10 Pat Thoyts + + * tests/winFCmd.test: Cleanup directories that have been set chmod + 000. On Windows7 and Vista we really have no access and these were + getting left behind. + A few tests were changed to reflect the intent of the test where + setting a directory chmod 000 should prevent any + modification. This restriction was ignored on XP but is honoured + on Vista + 2009-11-10 Andreas Kupries * generic/tclObj.c: Plus memory leak in TclContinuationsEnter(). diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 1199d65..7736985 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFCmd.test,v 1.45 2008/10/06 21:27:05 patthoyts Exp $ +# RCS: @(#) $Id: winFCmd.test,v 1.46 2009/11/10 20:40:06 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -356,6 +356,7 @@ test winFCmd-1.33 {TclpRenameFile: After removing dst dir, MoveFile fails} \ catch {testfile mv c:/tf1 d:/td1} msg list $msg [file writable d:/td1] } -cleanup { + catch {testchmod 666 d:/td1} file delete d:/td1 file delete -force c:/tf1 } -result {EXDEV 0} @@ -523,6 +524,7 @@ test winFCmd-2.12 {TclpCopyFile: CopyFile succeeds} -setup { testfile cp tf1 tf2 list [contents tf2] [file writable tf2] } -cleanup { + catch {testchmod 666 tf1} cleanup } -result {tf1 0} test winFCmd-2.13 {TclpCopyFile: CopyFile fails} -setup { @@ -568,6 +570,7 @@ test winFCmd-2.17 {TclpCopyFile: dst is readonly} -setup { testfile cp tf1 tf2 list [file writable tf2] [contents tf2] } -cleanup { + catch {testchmod 666 tf2} cleanup } -result {1 tf1} test winFCmd-2.18 {TclpCopyFile: still can't copy onto dst} -setup { @@ -656,6 +659,7 @@ test winFCmd-3.11 {TclpDeleteFile: still can't remove path} -setup { testfile rm tf1 } -cleanup { close $fd + catch {testchmod 666 tf1} cleanup } -returnCodes error -result EACCES @@ -697,12 +701,15 @@ test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} -setup { test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} -setup { cleanup -} -constraints {win testfile testchmod} -body { +} -constraints {winVista testfile testchmod} -body { file mkdir td1 testchmod 000 td1 testfile rmdir td1 file exists td1 -} -result {0} +} -returnCodes error -cleanup { + catch {testchmod 666 td1} + cleanup +} -result {td1 EACCES} # This next test has a very hokey way of matching... test winFCmd-6.2 {TclpRemoveDirectory: errno: EEXIST} -setup { cleanup @@ -748,12 +755,15 @@ test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} -setup { } -result {1 {tf1 ENOTDIR}} test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} -setup { cleanup -} -constraints {win testfile testchmod} -body { +} -constraints {winVista testfile testchmod} -body { file mkdir td1 testchmod 000 td1 testfile rmdir td1 file exists td1 -} -result {0} +} -returnCodes error -cleanup { + catch {testchmod 666 td1} + cleanup +} -result {td1 EACCES} test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} -setup { cleanup } -constraints {win 95 testfile} -body { @@ -778,12 +788,15 @@ test winFCmd-6.12 {TclpRemoveDirectory: errno == EACCES} -setup { } -result {1 {tf1 ENOTDIR}} test winFCmd-6.13 {TclpRemoveDirectory: write-protected} -setup { cleanup -} -constraints {win testfile testchmod} -body { +} -constraints {winVista testfile testchmod} -body { file mkdir td1 testchmod 000 td1 testfile rmdir td1 file exists td1 -} -result {0} +} -cleanup { + catch {testchmod 666 td1} + cleanup +} -returnCodes error -result {td1 EACCES} # This next test has a very hokey way of matching... test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} -setup { cleanup @@ -896,6 +909,7 @@ test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} -setup { testfile cpdir td1 td2 list [file exists td2] [file writable td2] } -cleanup { + catch {testchmod 666 td1} cleanup } -result {1 1} test winFCmd-7.12 {TraverseWinTree: call TraversalDelete: DOTREE_PRED} -setup { @@ -931,7 +945,8 @@ test winFCmd-7.15 {TraverseWinTree: append \ to target if necessary} -setup { testfile cpdir td1 / } -cleanup { cleanup -} -returnCodes error -result {/ EACCES} + # Windows7 returns EEXIST, XP returns EACCES +} -returnCodes error -match regexp -result {^/ E(ACCES|EXIST)$} test winFCmd-7.16 {TraverseWinTree: recurse on files: no files} -setup { cleanup } -constraints {win testfile} -body { @@ -973,6 +988,7 @@ test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} -setup { testfile cpdir td1 td2 list [file exists td2] [file writable td2] } -cleanup { + catch {testchmod 666 td1} cleanup } -result {1 1} test winFCmd-7.20 {TraverseWinTree: call TraversalDelete: DOTREE_POSTD} -setup { @@ -1003,6 +1019,7 @@ test winFCmd-8.2 {TraversalCopy: DOTREE_PRED} -setup { testfile cpdir td1 td2 list [file writable td1] [file writable td1/td2] } -cleanup { + catch {testchmod 666 td1} cleanup } -result {0 1} test winFCmd-8.3 {TraversalCopy: DOTREE_POSTD} -setup { @@ -1032,12 +1049,15 @@ test winFCmd-9.2 {TraversalDelete: DOTREE_F} -setup { } -returnCodes error -result {td1\tf1 EACCES} test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} -setup { cleanup -} -constraints {win testfile testchmod} -body { +} -constraints {winVista testfile testchmod} -body { file mkdir td1/td2 testchmod 000 td1 testfile rmdir -force td1 file exists td1 -} -result {0} +} -cleanup { + catch {testchmod 666 td1} + cleanup +} -returnCodes error -result {td1 EACCES} test winFCmd-9.4 {TraversalDelete: DOTREE_POSTD} -setup { cleanup } -constraints {win testfile} -body { -- cgit v0.12 From cc9f7a669ed8913de4f2b1dbee1bf961297a4c02 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 10 Nov 2009 20:53:24 +0000 Subject: * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT evaluation. Forward port from Tcl 8.5 branch, change by Don Porter. --- ChangeLog | 6 +++++- generic/tclBasic.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1013de..6b7fd4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,11 @@ 2009-11-10 Andreas Kupries - * generic/tclObj.c: Plus memory leak in TclContinuationsEnter(). + * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT + evaluation. Forward port from Tcl 8.5 branch, change by Don + Porter. + + * generic/tclObj.c: Plug memory leak in TclContinuationsEnter(). [Bug 2895323]. Forward port from Tcl 8.5 branch, change by Don Porter. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index be9ce4b..cca8fba 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.406 2009/11/09 22:36:19 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.407 2009/11/10 20:53:24 andreas_kupries Exp $ */ #include "tclInt.h" @@ -6108,17 +6108,17 @@ TclNREvalObjEx( Tcl_DecrRefCount(ctxPtr->data.eval.path); } TclStackFree(interp, ctxPtr); + } - /* - * Now release the lock on the continuation line information, if - * any, and restore the caller's settings. - */ + /* + * Now release the lock on the continuation line information, if any, + * and restore the caller's settings. + */ - if (iPtr->scriptCLLocPtr) { - Tcl_Release (iPtr->scriptCLLocPtr); - } - iPtr->scriptCLLocPtr = saveCLLocPtr; + if (iPtr->scriptCLLocPtr) { + Tcl_Release (iPtr->scriptCLLocPtr); } + iPtr->scriptCLLocPtr = saveCLLocPtr; TclDecrRefCount(objPtr); return result; } -- cgit v0.12 From 69e155a5691d03e8293409bdc307651f0c92494e Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 10 Nov 2009 23:50:17 +0000 Subject: Fix [Bug 2888099] (close discards ENOSPC error) by saving the errno from the first of two FlushChannel()s. Uneasy to test; might need specific channel drivers. Four-hands with aku. --- ChangeLog | 7 +++++++ generic/tclIO.c | 19 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b7fd4b..163babe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-11 Alexandre Ferrieux + + * generic/tclIO.c: Fix [Bug 2888099] (close discards ENOSPC error) + by saving the errno from the first of two + FlushChannel()s. Uneasy to test; might need + specific channel drivers. Four-hands with aku. + 2009-11-10 Pat Thoyts * tests/winFCmd.test: Cleanup directories that have been set chmod diff --git a/generic/tclIO.c b/generic/tclIO.c index 439eac2..e295c82 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.165 2009/11/09 13:47:23 dkf Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.166 2009/11/10 23:50:17 ferrieux Exp $ */ #include "tclInt.h" @@ -2976,6 +2976,7 @@ Tcl_Close( ChannelState *statePtr; /* State of real IO channel. */ int result; /* Of calling FlushChannel. */ int flushcode; + int stickyError; if (chan == NULL) { return TCL_OK; @@ -3017,10 +3018,14 @@ Tcl_Close( * iso2022, the terminated escape sequence must write to the buffer. */ + stickyError = 0; + if ((statePtr->encoding != NULL) && (statePtr->curOutPtr != NULL) && (CheckChannelErrors(statePtr, TCL_WRITABLE) == 0)) { statePtr->outputEncodingFlags |= TCL_ENCODING_END; - WriteChars(chanPtr, "", 0); + if (WriteChars(chanPtr, "", 0) < 0) { + stickyError = Tcl_GetErrno(); + } /* * TIP #219, Tcl Channel Reflection API. @@ -3099,6 +3104,14 @@ Tcl_Close( result = EINVAL; } + if (stickyError != 0) { + Tcl_SetErrno(stickyError); + if (interp != NULL) { + Tcl_SetObjResult(interp, + Tcl_NewStringObj(Tcl_PosixError(interp), -1)); + } + flushcode = -1; + } if ((flushcode != 0) || (result != 0)) { return TCL_ERROR; } @@ -11195,5 +11208,7 @@ DumpFlags( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ -- cgit v0.12 From 8be022f88dcd5cbe494a84980ba3d14df3e18f48 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 11 Nov 2009 06:49:04 +0000 Subject: Fix [Bug 2891171]: URL checking too strict when using multiple question marks --- ChangeLog | 9 +++++++++ library/http/http.tcl | 34 +++++++++++++++++----------------- library/http/pkgIndex.tcl | 2 +- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 33 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 163babe..b1bc752 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-11 Jan Nijtmans + + * library/http/http.tcl (http::geturl): [Bug 2891171]: URl + checking too strict when using multiple question marks + * tests/http.test + * library/http/pkgIndex.tcl: Bump to http 2.8.2 + * unix/Makefile.in: + * win/Makefile.in: + 2009-11-11 Alexandre Ferrieux * generic/tclIO.c: Fix [Bug 2888099] (close discards ENOSPC error) diff --git a/library/http/http.tcl b/library/http/http.tcl index 18487fb..6ec2a54 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,12 +8,12 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.77 2009/09/10 21:20:01 dkf Exp $ +# RCS: @(#) $Id: http.tcl,v 1.78 2009/11/11 06:49:05 nijtmans Exp $ package require Tcl 8.6 # Keep this in sync with pkgIndex.tcl and with the install directories in # Makefiles -package provide http 2.8.1 +package provide http 2.8.2 namespace eval http { # Allow resourcing to not clobber existing data @@ -100,7 +100,7 @@ namespace eval http { # Arguments: # msg Message to output # -if {[info command http::Log] eq {}} { proc http::Log {args} {} } +if {[info command http::Log] eq {}} {proc http::Log {args} {}} # http::register -- # @@ -201,7 +201,7 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} { if { ($state(status) eq "timeout") || ($state(status) eq "error") || ([info exists state(connection)] && ($state(connection) eq "close")) - } then { + } { CloseSocket $state(sock) $token } if {[info exists state(after)]} { @@ -369,7 +369,7 @@ proc http::geturl {url args} { if { [info exists type($flag)] && ![string is $type($flag) -strict $value] - } then { + } { unset $token return -code error \ "Bad value for $flag ($value), must be $type($flag)" @@ -439,7 +439,7 @@ proc http::geturl {url args} { ( [^/:\#?]+ ) # (?: : (\d+) )? # )? - ( / [^\#?]* (?: \? [^\#?]* )?)? # (including query) + ( / [^\#]*)? # (including query) (?: \# (.*) )? # $ } @@ -728,7 +728,7 @@ proc http::geturl {url args} { # versions TclHttpd in various error cases). Depending on the # platform, the client may or may not be able to get the response from # the server because of the error it will get trying to write the post - # data. Having both fileevents active changes the timing and the + # data. Having both fileevents active changes the timing and the # behavior, but no two platforms (among Solaris, Linux, and NT) behave # the same, and none behave all that well in any case. Servers should # always read their POST data if they expect the client to read their @@ -759,7 +759,7 @@ proc http::geturl {url args} { return -code error [lindex $state(error) 0] } } - } err]} then { + } err]} { # The socket probably was never connected, or the connection dropped # later. @@ -867,7 +867,7 @@ proc http::Connect {token} { if { [eof $state(sock)] || [string length [fconfigure $state(sock) -error]] - } then { + } { Finish $token "connect failed [fconfigure $state(sock) -error]" 1 } else { set state(status) connect @@ -918,7 +918,7 @@ proc http::Write {token} { set done 1 } } - } err]} then { + } err]} { # Do not call Finish here, but instead let the read half of the socket # process whatever server reply there is to get. @@ -997,7 +997,7 @@ proc http::Event {sock token} { && ($state(connection) eq "close")) || [info exists state(transfer)]) && ($state(totalsize) == 0) - } then { + } { Log "body size is 0 and no events likely - complete." Eof $token return @@ -1008,7 +1008,7 @@ proc http::Event {sock token} { if { $state(-binary) || ![string match -nocase text* $state(type)] - } then { + } { # Turn off conversions for non-text data set state(binary) 1 } @@ -1076,7 +1076,7 @@ proc http::Event {sock token} { } elseif { [info exists state(transfer)] && $state(transfer) eq "chunked" - } then { + } { set size 0 set chunk [getTextLine $sock] set n [string length $chunk] @@ -1116,11 +1116,11 @@ proc http::Event {sock token} { if { ($state(totalsize) > 0) && ($state(currentsize) >= $state(totalsize)) - } then { + } { Eof $token } } - } err]} then { + } err]} { return [Finish $token $err] } else { if {[info exists state(-progress)]} { @@ -1397,7 +1397,7 @@ proc http::ProxyRequired {host} { if { ![info exists http(-proxyport)] || ![string length $http(-proxyport)] - } then { + } { set http(-proxyport) 8080 } return [list $http(-proxyhost) $http(-proxyport)] @@ -1481,7 +1481,7 @@ proc http::make-transformation-chunked {chan command} { } if {[catch { uplevel #0 [linsert $command end $chunk] - }]} then { + }]} { http::Log "Error in callback: $::errorInfo" } if {[string length $chunk] == 0} { diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index b953d49..82b2e0b 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.6]} {return} -package ifneeded http 2.8.1 [list tclPkgSetup $dir http 2.8.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.8.2 [list tclPkgSetup $dir http 2.8.2 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] diff --git a/unix/Makefile.in b/unix/Makefile.in index 6f40a1d..a48e411 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.279 2009/10/26 16:56:23 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.280 2009/11/11 06:49:05 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -823,8 +823,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \ done; - @echo "Installing package http 2.8.1 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.1.tm; + @echo "Installing package http 2.8.2 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.2.tm; @echo "Installing library opt0.4 directory"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ diff --git a/win/Makefile.in b/win/Makefile.in index 1fee6c8..b472cd8 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.161 2009/09/26 21:42:05 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.162 2009/11/11 06:49:05 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -701,8 +701,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \ done; - @echo "Installing package http 2.8.1 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.1.tm; + @echo "Installing package http 2.8.2 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.2.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ -- cgit v0.12 From e4b809abf57f2062e0ae4be8a17c3a77b079147c Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 12 Nov 2009 16:31:38 +0000 Subject: * generic/tclClock.c (TclClockInit): Do not create [clock] support commands in safe interps. --- ChangeLog | 5 +++++ generic/tclClock.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b1bc752..a5fea35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-11 Don Porter + + * generic/tclClock.c (TclClockInit): Do not create [clock] support + commands in safe interps. + 2009-11-11 Jan Nijtmans * library/http/http.tcl (http::geturl): [Bug 2891171]: URl diff --git a/generic/tclClock.c b/generic/tclClock.c index 7b445ca..5a5dec4 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.72 2008/10/26 18:34:03 dkf Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.73 2009/11/12 16:31:38 dgp Exp $ */ #include "tclInt.h" @@ -256,6 +256,15 @@ TclClockInit( int i; /* + * Safe interps get [::clock] as alias to a master, so do not need their + * own copies of the support routines. + */ + + if (Tcl_IsSafe(interp)) { + return; + } + + /* * Create the client data, which is a refcounted literal pool. */ -- cgit v0.12 From 0ff9c6a9c918c519b765feaa5c09bf489290d50c Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 12 Nov 2009 17:25:18 +0000 Subject: * generic/tclIO.c (CopyData): [Bug 2895565]. Dropped bogosity * tests/io.test: which used the number of _written_ bytes or character to update the counters for the read bytes/characters. New test io-53.11. This is a forward port from the 8.5 branch. --- ChangeLog | 7 +++++++ generic/tclIO.c | 21 ++++++++++++--------- tests/io.test | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5fea35..7757b62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-12 Andreas Kupries + + * generic/tclIO.c (CopyData): [Bug 2895565]. Dropped bogosity + * tests/io.test: which used the number of _written_ bytes or + character to update the counters for the read bytes/characters. + New test io-53.11. This is a forward port from the 8.5 branch. + 2009-11-11 Don Porter * generic/tclClock.c (TclClockInit): Do not create [clock] support diff --git a/generic/tclIO.c b/generic/tclIO.c index e295c82..e8d231a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.166 2009/11/10 23:50:17 ferrieux Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.167 2009/11/12 17:25:18 andreas_kupries Exp $ */ #include "tclInt.h" @@ -9092,14 +9092,17 @@ CopyData( sizeb = DoWriteChars(outStatePtr->topChanPtr, buffer, sizeb); } - if (inBinary || sameEncoding) { - /* - * Both read and write counted bytes. - */ - - size = sizeb; - } /* else: Read counted characters, write counted bytes, i.e. - * size != sizeb */ + /* + * [Bug 2895565]. At this point 'size' still contains the number of + * bytes or characters which have been read. We keep this to later to + * update the totals and toRead information, see marker (UP) below. We + * must not overwrite it with 'sizeb', which is the number of written + * bytes or characters, and both EOL translation and encoding + * conversion may have changed this number unpredictably in relation + * to 'size' (It can be smaller or larger, in the latter case able to + * drive toRead below -1, causing infinite looping). Completely + * unsuitable for updating totals and toRead. + */ if (sizeb < 0) { writeError: diff --git a/tests/io.test b/tests/io.test index 0ab8909..1ad9f6e 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.93 2008/12/19 17:07:47 dgp Exp $ +# RCS: @(#) $Id: io.test,v 1.94 2009/11/12 17:25:18 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7126,6 +7126,37 @@ test io-53.10 {Bug 1350564, multi-directional fcopy} -setup { removeFile err catch {unset ::forever} } -result {AB BA} +test io-53.11 {Bug 2895565} -setup { + set in [makeFile {} in] + set f [open $in w] + fconfigure $f -encoding utf-8 -translation binary + puts -nonewline $f [string repeat "Ho hum\n" 11] + close $f + set inChan [open $in r] + fconfigure $inChan -translation binary + set out [makeFile {} out] + set outChan [open $out w] + fconfigure $outChan -encoding cp1252 -translation crlf + proc CopyDone {bytes args} { + variable done + if {[llength $args]} { + set done "Error: '[lindex $args 0]' after $bytes bytes copied" + } else { + set done "$bytes bytes copied" + } + } +} -body { + variable done + after 2000 [list set [namespace which -variable done] timeout] + fcopy $inChan $outChan -size 40 -command [namespace which CopyDone] + vwait [namespace which -variable done] + set done +} -cleanup { + close $outChan + close $inChan + removeFile out + removeFile in +} -result {40 bytes copied} test io-54.1 {Recursive channel events} {socket fileevent} { # This test checks to see if file events are delivered during recursive -- cgit v0.12 From d264119bd45f0b0e694574efc0a627ac1a4232cb Mon Sep 17 00:00:00 2001 From: mdejong Date: Mon, 16 Nov 2009 06:29:16 +0000 Subject: * win/tclWinDde.c: Avoid gcc compiler warning by explicitly casting DdeCreateStringHandle argument. --- ChangeLog | 5 +++++ win/tclWinDde.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7757b62..2f54ae6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-15 Mo DeJong + + * win/tclWinDde.c: Avoid gcc compiler warning by + explicitly casting DdeCreateStringHandle argument. + 2009-11-12 Andreas Kupries * generic/tclIO.c (CopyData): [Bug 2895565]. Dropped bogosity diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 4c7fc5b..2e0c7c3 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.35 2009/08/16 10:20:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.36 2009/11/16 06:29:16 mdejong Exp $ */ #include "tclInt.h" @@ -886,7 +886,7 @@ MakeDdeConnection( HCONV ddeConv; ddeService = DdeCreateStringHandle(ddeInstance, TCL_DDE_SERVICE_NAME, 0); - ddeTopic = DdeCreateStringHandle(ddeInstance, name, 0); + ddeTopic = DdeCreateStringHandle(ddeInstance, (LPTSTR) name, 0); ddeConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL); DdeFreeStringHandle(ddeInstance, ddeService); @@ -1319,7 +1319,7 @@ Tcl_DdeObjCmd( if (length == 0) { serviceName = NULL; } else if ((index != DDE_SERVERNAME) && (index != DDE_EVAL)) { - ddeService = DdeCreateStringHandle(ddeInstance, serviceName, + ddeService = DdeCreateStringHandle(ddeInstance, (LPTSTR) serviceName, CP_WINANSI); } @@ -1328,7 +1328,7 @@ Tcl_DdeObjCmd( if (length == 0) { topicName = NULL; } else { - ddeTopic = DdeCreateStringHandle(ddeInstance, topicName, + ddeTopic = DdeCreateStringHandle(ddeInstance, (LPTSTR)topicName, CP_WINANSI); } } @@ -1454,7 +1454,7 @@ Tcl_DdeObjCmd( SetDdeError(interp); result = TCL_ERROR; } else { - ddeItem = DdeCreateStringHandle(ddeInstance, itemString, + ddeItem = DdeCreateStringHandle(ddeInstance, (LPTSTR)itemString, CP_WINANSI); if (ddeItem != NULL) { ddeData = DdeClientTransaction((PBYTE)dataString, (DWORD) length+1, -- cgit v0.12 From 3ffda83a5b3d9b03fa4bad1e5384919a46adf47a Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 16 Nov 2009 17:38:08 +0000 Subject: (forward port) Fix [Bug 2891556] and improve test to detect similar manifestations in the future. Add tcltest support for finalization. --- ChangeLog | 6 ++++++ doc/catch.n | 45 +++++++++++++++++++++++++--------------- doc/info.n | 12 ++++++++++- generic/tclBasic.c | 8 +++++++- generic/tclCmdIL.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclEncoding.c | 28 +++++++++++++++++++------ generic/tclInt.h | 4 +++- generic/tclNamesp.c | 36 ++++++++++++++++++++++++++++++-- generic/tclResult.c | 9 ++++++-- generic/tclTest.c | 47 +++++++++++++++++++++++++++++++++++++++++- tests/cmdMZ.test | 28 ++++++++++++------------- tests/encoding.test | 5 +++-- tests/error.test | 24 +++++++++++++++++++++- tests/execute.test | 6 +++--- tests/info.test | 10 ++++----- tests/init.test | 4 ++-- 16 files changed, 270 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f54ae6..0dcbf3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-16 Alexandre Ferrieux + + * generic/tclEncoding.c: (forward port) Fix [Bug 2891556] and improve + * generic/tclTest.c: test to detect similar manifestations in the + * tests/encoding.test: future. Add tcltest support for finalization. + 2009-11-15 Mo DeJong * win/tclWinDde.c: Avoid gcc compiler warning by diff --git a/doc/catch.n b/doc/catch.n index bf302ba..f06220b 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.20 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.21 2009/11/16 17:38:08 ferrieux Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -54,22 +54,33 @@ Only when the return code is \fBTCL_RETURN\fR will the values of the \fB\-level\fR and \fB\-code\fR entries be something else, as further described in the documentation for the \fBreturn\fR command. .PP -When the return code from evaluation of \fIscript\fR is \fBTCL_ERROR\fR, -three additional entries are defined in the dictionary of return options -stored in \fIoptionsVarName\fR: \fB\-errorinfo\fR, \fB\-errorcode\fR, -and \fB\-errorline\fR. The value of the \fB\-errorinfo\fR entry -is a formatted stack trace containing more information about -the context in which the error happened. The formatted stack -trace is meant to be read by a person. The value of -the \fB\-errorcode\fR entry is additional information about the -error stored as a list. The \fB\-errorcode\fR value is meant to -be further processed by programs, and may not be particularly -readable by people. The value of the \fB\-errorline\fR entry -is an integer indicating which line of \fIscript\fR was being -evaluated when the error occurred. The values of the \fB\-errorinfo\fR -and \fB\-errorcode\fR entries of the most recent error are also -available as values of the global variables \fB::errorInfo\fR -and \fB::errorCode\fR respectively. +When the return code from evaluation of \fIscript\fR is +\fBTCL_ERROR\fR, four additional entries are defined in the dictionary +of return options stored in \fIoptionsVarName\fR: \fB\-errorinfo\fR, +\fB\-errorcode\fR, \fB\-errorline\fR, and \fB\-errorstack\fR. The +value of the \fB\-errorinfo\fR entry is a formatted stack trace +containing more information about the context in which the error +happened. The formatted stack trace is meant to be read by a person. +The value of the \fB\-errorcode\fR entry is additional information +about the error stored as a list. The \fB\-errorcode\fR value is +meant to be further processed by programs, and may not be particularly +readable by people. The value of the \fB\-errorline\fR entry is an +integer indicating which line of \fIscript\fR was being evaluated when +the error occurred. The value of the \fB\-errorstack\fR entry is a +list of lists made of the function names and arguments at each level +from the call stack when the error occurred. It differs from +-errorinfo in that (1) it is a true list of lists, for easy +programmatic access without parsing, (2) it contains the true +(substituted) values passed to the functions, instead of the static +text of the calling sites, and (3) it is coarser-grained, with only +one element per stack frame (like procs; no separate elements for +[foreach] constructs for example). + +The values of the \fB\-errorinfo\fR and \fB\-errorcode\fR entries of +the most recent error are also available as values of the global +variables \fB::errorInfo\fR and \fB::errorCode\fR respectively. The +value of the \fB\-errorstack\fR entry surfaces as \fBinfo +errorstack\fR. .PP Tcl packages may provide commands that set other entries in the dictionary of return options, and the \fBreturn\fR command may be diff --git a/doc/info.n b/doc/info.n index b4c4b60..9fd0fde 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.33 2009/05/15 10:08:02 dkf Exp $ +'\" RCS: @(#) $Id: info.n,v 1.34 2009/11/16 17:38:08 ferrieux Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -94,6 +94,16 @@ does not have a default value then the command returns \fB0\fR. Otherwise it returns \fB1\fR and places the default value of \fIarg\fR into variable \fIvarname\fR. .TP +\fBinfo errorstack \fR?\fIinterp\fR? +. +Returns a list of lists made of the function names and arguments at +each level from the call stack of the last error in the given +\fIinterp\fR, or in the current one if not specified. This +information is also present in the -errorstack entry of the options +dictionary returned by 3-arg \fBcatch\fR; \fBinfo errorstack\fR is a +convenient way of retrieving it for uncaught errors at toplevel in an +interactive tclsh. +.TP \fBinfo exists \fIvarName\fR . Returns \fB1\fR if the variable named \fIvarName\fR exists in the diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cca8fba..c8ae5ae 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.407 2009/11/10 20:53:24 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.408 2009/11/16 17:38:08 ferrieux Exp $ */ #include "tclInt.h" @@ -530,6 +530,9 @@ Tcl_CreateInterp(void) iPtr->errorInfo = NULL; TclNewLiteralStringObj(iPtr->eiVar, "::errorInfo"); Tcl_IncrRefCount(iPtr->eiVar); + iPtr->errorStack = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(iPtr->errorStack); + iPtr->resetErrorStack = 1; iPtr->errorCode = NULL; TclNewLiteralStringObj(iPtr->ecVar, "::errorCode"); Tcl_IncrRefCount(iPtr->ecVar); @@ -1470,6 +1473,7 @@ DeleteInterpProc( Tcl_DecrRefCount(iPtr->errorInfo); iPtr->errorInfo = NULL; } + Tcl_DecrRefCount(iPtr->errorStack); if (iPtr->returnOpts) { Tcl_DecrRefCount(iPtr->returnOpts); } @@ -8820,5 +8824,7 @@ TclInfoCoroutineCmd( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 03f5593..9c89ae4 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.171 2009/08/20 10:56:55 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.172 2009/11/16 17:38:08 ferrieux Exp $ */ #include "tclInt.h" @@ -118,6 +118,9 @@ static int InfoCompleteCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int InfoDefaultCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +/* TIP #348 - New 'info' subcommand 'errorstack' */ +static int InfoErrorStackCmd(ClientData dummy, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); /* TIP #280 - New 'info' subcommand 'frame' */ static int InfoFrameCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -164,6 +167,7 @@ static const EnsembleImplMap defaultInfoMap[] = { {"complete", InfoCompleteCmd, NULL}, {"coroutine", TclInfoCoroutineCmd, NULL}, {"default", InfoDefaultCmd, NULL}, + {"errorstack", InfoErrorStackCmd, NULL}, {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd}, {"frame", InfoFrameCmd, NULL}, {"functions", InfoFunctionsCmd, NULL}, @@ -1017,6 +1021,55 @@ InfoDefaultCmd( /* *---------------------------------------------------------------------- * + * InfoErrorStackCmd -- + * + * Called to implement the "info errorstack" command that returns information + * about the last error's call stack. Handles the following syntax: + * + * info errorstack ?interp? + * + * Results: + * Returns TCL_OK if successful and TCL_ERROR if there is an error. + * + * Side effects: + * Returns a result in the interpreter's result object. If there is an + * error, the result is an error message. + * + *---------------------------------------------------------------------- + */ + +static int +InfoErrorStackCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *target; + Interp *iPtr; + + if ((objc != 1) && (objc != 2)) { + Tcl_WrongNumArgs(interp, 1, objv, "?interp?"); + return TCL_ERROR; + } + + target = interp; + if (objc == 2) { + target = Tcl_GetSlave(interp, Tcl_GetString(objv[1])); + if (target == NULL) { + return TCL_ERROR; + } + } + + iPtr = (Interp *) target; + Tcl_SetObjResult(interp, iPtr->errorStack); + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclInfoExistsCmd -- * * Called to implement the "info exists" command that determines whether @@ -4388,5 +4441,7 @@ SelectObjFromSublist( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 441e099..2188256 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.66 2009/02/10 22:49:55 nijtmans Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.67 2009/11/16 17:38:08 ferrieux Exp $ */ #include "tclInt.h" @@ -844,6 +844,9 @@ FreeEncoding( if (encodingPtr == NULL) { return; } + if (encodingPtr->refCount<=0) { + Tcl_Panic("FreeEncoding: refcount problem !!!"); + } encodingPtr->refCount--; if (encodingPtr->refCount == 0) { if (encodingPtr->freeProc != NULL) { @@ -3385,11 +3388,24 @@ EscapeFreeProc( if (dataPtr == NULL) { return; } - subTablePtr = dataPtr->subTables; - for (i = 0; i < dataPtr->numSubTables; i++) { - FreeEncoding((Tcl_Encoding) subTablePtr->encodingPtr); - subTablePtr++; - } + /* + * The subTables should be freed recursively in normal operation but not + * during TclFinalizeEncodingSubsystem because they are also present as a + * weak reference in the toplevel encodingTable (ie they don't have a +1 + * refcount for this), and unpredictable nuking order could remove them + * from under the following loop's feet [Bug 2891556]. + * + * The encodingsInitialized flag, being reset on entry to TFES, can serve + * as a "not in finalization" test. + */ + if (encodingsInitialized) + { + subTablePtr = dataPtr->subTables; + for (i = 0; i < dataPtr->numSubTables; i++) { + FreeEncoding((Tcl_Encoding) subTablePtr->encodingPtr); + subTablePtr++; + } + } ckfree((char *) dataPtr); } diff --git a/generic/tclInt.h b/generic/tclInt.h index 0f6654b..be536a9 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.445 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.446 2009/11/16 17:38:08 ferrieux Exp $ */ #ifndef _TCLINT @@ -1895,6 +1895,8 @@ typedef struct Interp { Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable. */ Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj). */ Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable. */ + Tcl_Obj *errorStack; /* [info errorstack] value (as a Tcl_Obj). */ + int resetErrorStack; /* controls cleaning up of ::errorStack */ int returnLevel; /* [return -level] parameter. */ /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 94ade8f..2b9b508 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.193 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.194 2009/11/16 17:38:09 ferrieux Exp $ */ #include "tclInt.h" @@ -7574,7 +7574,7 @@ Tcl_LogCommandInfo( { register const char *p; Interp *iPtr = (Interp *) interp; - int overflow, limit = 150; + int overflow, limit = 150, len; Var *varPtr, *arrayPtr; if (iPtr->flags & ERR_ALREADY_LOGGED) { @@ -7633,6 +7633,36 @@ Tcl_LogCommandInfo( TCL_GLOBAL_ONLY); } } + + /* + * TIP #348 + */ + + if (Tcl_IsShared(iPtr->errorStack)) { + Tcl_Obj *newObj; + + newObj = Tcl_DuplicateObj(iPtr->errorStack); + Tcl_DecrRefCount(iPtr->errorStack); + Tcl_IncrRefCount(newObj); + iPtr->errorStack = newObj; + } + Tcl_ListObjLength(interp, iPtr->errorStack, &len); + if (iPtr->resetErrorStack) { + iPtr->resetErrorStack = 0; + /* reset while keeping the list intrep as much as possible */ + Tcl_ListObjReplace(interp, iPtr->errorStack, 0, len, 0, NULL); + len=0; + } + if (iPtr->varFramePtr != iPtr->rootFramePtr) { + Tcl_Obj *listPtr; + int result; + listPtr=Tcl_NewListObj(iPtr->varFramePtr->objc, + iPtr->varFramePtr->objv); + result = Tcl_ListObjReplace(interp, iPtr->errorStack, len, 0, 1, &listPtr); + if (result != TCL_OK) { + Tcl_DecrRefCount(listPtr); + } + } } /* @@ -7640,5 +7670,7 @@ Tcl_LogCommandInfo( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/generic/tclResult.c b/generic/tclResult.c index 921a867..3d6284e 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.54 2008/12/17 16:47:38 nijtmans Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.55 2009/11/16 17:38:09 ferrieux Exp $ */ #include "tclInt.h" @@ -19,7 +19,7 @@ enum returnKeys { KEY_CODE, KEY_ERRORCODE, KEY_ERRORINFO, KEY_ERRORLINE, - KEY_LEVEL, KEY_OPTIONS, KEY_LAST + KEY_LEVEL, KEY_OPTIONS, KEY_ERRORSTACK, KEY_LAST }; /* @@ -922,6 +922,7 @@ Tcl_ResetResult( Tcl_DecrRefCount(iPtr->errorInfo); iPtr->errorInfo = NULL; } + iPtr->resetErrorStack = 1; iPtr->returnLevel = 1; iPtr->returnCode = TCL_OK; if (iPtr->returnOpts) { @@ -1158,6 +1159,7 @@ GetKeys(void) TclNewLiteralStringObj(keys[KEY_ERRORCODE], "-errorcode"); TclNewLiteralStringObj(keys[KEY_ERRORINFO], "-errorinfo"); TclNewLiteralStringObj(keys[KEY_ERRORLINE], "-errorline"); + TclNewLiteralStringObj(keys[KEY_ERRORSTACK],"-errorstack"); TclNewLiteralStringObj(keys[KEY_LEVEL], "-level"); TclNewLiteralStringObj(keys[KEY_OPTIONS], "-options"); @@ -1503,6 +1505,7 @@ Tcl_GetReturnOptions( Tcl_DictObjPut(NULL, options, keys[KEY_ERRORLINE], Tcl_NewIntObj(iPtr->errorLine)); } + Tcl_DictObjPut(NULL, options, keys[KEY_ERRORSTACK], iPtr->errorStack); return options; } @@ -1624,5 +1627,7 @@ Tcl_TransferResult( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/generic/tclTest.c b/generic/tclTest.c index da00e84..cdaa440 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.136 2009/02/10 23:09:08 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.137 2009/11/16 17:38:09 ferrieux Exp $ */ #define TCL_TEST @@ -290,6 +290,9 @@ static int TestexitmainloopCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestpanicCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); +static int TestfinexitObjCmd(ClientData dummy, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); static int TestparserObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -619,6 +622,7 @@ Tcltest_Init( Tcl_CreateObjCommand(interp, "testlocale", TestlocaleCmd, (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testpanic", TestpanicCmd, (ClientData) 0, NULL); + Tcl_CreateCommand(interp, "testfinexit", TestfinexitObjCmd, (ClientData) 0, NULL); Tcl_CreateObjCommand(interp, "testparser", TestparserObjCmd, (ClientData) 0, NULL); Tcl_CreateObjCommand(interp, "testparsevar", TestparsevarObjCmd, @@ -4358,6 +4362,47 @@ TestpanicCmd( return TCL_OK; } + +/* + *---------------------------------------------------------------------- + * + * TestfinexitObjCmd -- + * + * Calls a variant of [exit] including the full finalization path. + * + * Results: + * Error, or doesn't return. + * + * Side effects: + * Exits application. + * + *---------------------------------------------------------------------- + */ + +static int +TestfinexitObjCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + int value; + + if ((objc != 1) && (objc != 2)) { + Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?"); + return TCL_ERROR; + } + + if (objc == 1) { + value = 0; + } else if (Tcl_GetIntFromObj(interp, objv[1], &value) != TCL_OK) { + return TCL_ERROR; + } + Tcl_Finalize(); + TclpExit(value); + /*NOTREACHED*/ + return TCL_ERROR; /* Better not ever reach this! */ +} static int TestfileCmd( diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index ae96301..8ae7a3a 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdMZ.test,v 1.26 2008/09/10 13:50:05 dkf Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.27 2009/11/16 17:38:09 ferrieux Exp $ if {[catch {package require tcltest 2.1}]} { puts stderr "Skipping tests in [info script]. tcltest 2.1 required." @@ -119,18 +119,18 @@ proc dictSort {d} { return $result } -test cmdMZ-return-2.0 {return option handling} { +test cmdMZ-return-2.0 {return option handling} -body { list [catch return -> foo] [dictSort $foo] -} {2 {-code 0 -level 1}} -test cmdMZ-return-2.1 {return option handling} { +} -match glob -result {2 {-code 0 -errorstack * -level 1}} +test cmdMZ-return-2.1 {return option handling} -body { list [catch {return -bar soom} -> foo] [dictSort $foo] -} {2 {-bar soom -code 0 -level 1}} -test cmdMZ-return-2.2 {return option handling} { +} -match glob -result {2 {-bar soom -code 0 -errorstack * -level 1}} +test cmdMZ-return-2.2 {return option handling} -body { list [catch {return -code return} -> foo] [dictSort $foo] -} {2 {-code 0 -level 2}} -test cmdMZ-return-2.3 {return option handling} { +} -match glob -result {2 {-code 0 -errorstack * -level 2}} +test cmdMZ-return-2.3 {return option handling} -body { list [catch {return -code return -level 10} -> foo] [dictSort $foo] -} {2 {-code 0 -level 11}} +} -match glob -result {2 {-code 0 -errorstack * -level 11}} test cmdMZ-return-2.4 {return option handling} -body { return -level 0 -code error } -returnCodes error -result {} @@ -149,14 +149,14 @@ test cmdMZ-return-2.8 {return option handling} -body { test cmdMZ-return-2.9 {return option handling} -body { return -level 0 -code 10 } -returnCodes 10 -result {} -test cmdMZ-return-2.10 {return option handling} { +test cmdMZ-return-2.10 {return option handling} -body { list [catch {return -level 0 -code error} -> foo] [dictSort $foo] -} {1 {-code 1 -errorcode NONE -errorinfo { +} -match glob -result {1 {-code 1 -errorcode NONE -errorinfo { while executing -"return -level 0 -code error"} -errorline 1 -level 0}} -test cmdMZ-return-2.11 {return option handling} { +"return -level 0 -code error"} -errorline 1 -errorstack * -level 0}} +test cmdMZ-return-2.11 {return option handling} -body { list [catch {return -level 0 -code break} -> foo] [dictSort $foo] -} {3 {-code 3 -level 0}} +} -match glob -result {3 {-code 3 -errorstack * -level 0}} test cmdMZ-return-2.12 {return option handling} -body { return -level 0 -code error -options {-code ok} } -returnCodes ok -result {} diff --git a/tests/encoding.test b/tests/encoding.test index 0aa49d3..bc57b2d 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: encoding.test,v 1.28 2008/06/20 16:18:13 dgp Exp $ +# RCS: @(#) $Id: encoding.test,v 1.29 2009/11/16 17:38:09 ferrieux Exp $ package require tcltest 2 @@ -414,9 +414,10 @@ test encoding-24.2 {EscapeFreeProc on open channels} -constraints { } -setup { # Bug #524674 output set file [makeFile { + encoding system cp1252; # Bug #2891556 crash revelator fconfigure stdout -encoding iso2022-jp puts ab\u4e4e\u68d9g - exit + testfinexit } iso2022.tcl] } -body { viewable [exec [interpreter] $file] diff --git a/tests/error.test b/tests/error.test index e18afad..1b0f0fa 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.22 2009/09/28 18:02:20 dgp Exp $ +# RCS: @(#) $Id: error.test,v 1.23 2009/11/16 17:38:09 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -153,6 +153,19 @@ test error-4.5 {errorInfo and errorCode variables} { list [catch {error msg1 msg2 {}} msg] $msg $::errorInfo $::errorCode } {1 msg1 msg2 {}} +test error-4.6 {errorstack via info } -body { + proc f x {g $x$x} + proc g x {error G:$x} + catch {f 12} + info errorstack +} -match glob -result {{g 1212} {f 12} {namespace eval *}} +test error-4.7 {errorstack via options dict } -body { + proc f x {g $x$x} + proc g x {error G:$x} + catch {f 12} m d + dict get $d -errorstack +} -match glob -result {{g 1212} {f 12} {namespace eval *}} + # Errors in error command itself test error-5.1 {errors in error command} { @@ -207,6 +220,15 @@ test error-6.9 {catch must reset error state} { catch foo list $::errorCode } {NONE} +test error-6.10 {catch must reset errorstack} -body { + proc f x {g $x$x} + proc g x {error G:$x} + catch {f 12} + set e1 [info errorstack] + catch {f 13} + set e2 [info errorstack] + list $e1 $e2 +} -match glob -result {{{g 1212} {f 12} {namespace eval *}} {{g 1313} {f 13} {namespace eval *}}} test error-7.1 {Bug 1397843} -body { variable cmds diff --git a/tests/execute.test b/tests/execute.test index b277da8..aa9e943 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.32 2009/06/24 13:51:36 dgp Exp $ +# RCS: @(#) $Id: execute.test,v 1.33 2009/11/16 17:38:09 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -956,11 +956,11 @@ test execute-8.5 {Bug 2038069} -setup { demo } -cleanup { rename demo {} -} -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO +} -match glob -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO while executing "error FOO" invoked from within -"catch [list error FOO] m o"} -errorline 2} +"catch \[list error FOO\] m o"} -errorline 2 -errorstack *} test execute-9.1 {Interp result resetting [Bug 1522803]} { set c 0 diff --git a/tests/info.test b/tests/info.test index 21b7712..aa4a29f 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.71 2009/11/10 17:57:39 andreas_kupries Exp $ +# RCS: @(#) $Id: info.test,v 1.72 2009/11/16 17:38:09 ferrieux Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -676,16 +676,16 @@ test info-21.1 {miscellaneous error conditions} -returnCodes error -body { } -result {wrong # args: should be "info subcommand ?arg ...?"} test info-21.2 {miscellaneous error conditions} -returnCodes error -body { info gorp -} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.3 {miscellaneous error conditions} -returnCodes error -body { info c -} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.4 {miscellaneous error conditions} -returnCodes error -body { info l -} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.5 {miscellaneous error conditions} -returnCodes error -body { info s -} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} ## # ### ### ### ######### ######### ######### diff --git a/tests/init.test b/tests/init.test index 41b8382..b5eba4c 100644 --- a/tests/init.test +++ b/tests/init.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: init.test,v 1.19 2009/07/25 22:00:10 dkf Exp $ +# RCS: @(#) $Id: init.test,v 1.20 2009/11/16 17:38:09 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -181,7 +181,7 @@ test init-5.0 {return options passed through ::unknown} -setup { list $code $foo $bar $code2 $foo2 $bar2 } -cleanup { unset ::auto_index(::xxx) -} -result {2 xxx {-errorcode NONE -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE}} +} -match glob -result {2 xxx {-errorcode NONE -errorstack * -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE -errorstack *}} cleanupTests } ;# End of [interp eval $testInterp] -- cgit v0.12 From bce1984cd71b25499760b589bfe695ffb6213d83 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 16 Nov 2009 18:00:11 +0000 Subject: Revert mistaken commit --- doc/catch.n | 45 ++++++++++++++++-------------------------- doc/info.n | 12 +---------- generic/tclBasic.c | 8 +------- generic/tclCmdIL.c | 57 +---------------------------------------------------- generic/tclInt.h | 4 +--- generic/tclNamesp.c | 36 ++------------------------------- generic/tclResult.c | 9 ++------- tests/cmdMZ.test | 28 +++++++++++++------------- tests/error.test | 24 +--------------------- tests/execute.test | 6 +++--- tests/info.test | 10 +++++----- tests/init.test | 4 ++-- 12 files changed, 50 insertions(+), 193 deletions(-) diff --git a/doc/catch.n b/doc/catch.n index f06220b..1c617b3 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.21 2009/11/16 17:38:08 ferrieux Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.22 2009/11/16 18:00:11 dgp Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -54,33 +54,22 @@ Only when the return code is \fBTCL_RETURN\fR will the values of the \fB\-level\fR and \fB\-code\fR entries be something else, as further described in the documentation for the \fBreturn\fR command. .PP -When the return code from evaluation of \fIscript\fR is -\fBTCL_ERROR\fR, four additional entries are defined in the dictionary -of return options stored in \fIoptionsVarName\fR: \fB\-errorinfo\fR, -\fB\-errorcode\fR, \fB\-errorline\fR, and \fB\-errorstack\fR. The -value of the \fB\-errorinfo\fR entry is a formatted stack trace -containing more information about the context in which the error -happened. The formatted stack trace is meant to be read by a person. -The value of the \fB\-errorcode\fR entry is additional information -about the error stored as a list. The \fB\-errorcode\fR value is -meant to be further processed by programs, and may not be particularly -readable by people. The value of the \fB\-errorline\fR entry is an -integer indicating which line of \fIscript\fR was being evaluated when -the error occurred. The value of the \fB\-errorstack\fR entry is a -list of lists made of the function names and arguments at each level -from the call stack when the error occurred. It differs from --errorinfo in that (1) it is a true list of lists, for easy -programmatic access without parsing, (2) it contains the true -(substituted) values passed to the functions, instead of the static -text of the calling sites, and (3) it is coarser-grained, with only -one element per stack frame (like procs; no separate elements for -[foreach] constructs for example). - -The values of the \fB\-errorinfo\fR and \fB\-errorcode\fR entries of -the most recent error are also available as values of the global -variables \fB::errorInfo\fR and \fB::errorCode\fR respectively. The -value of the \fB\-errorstack\fR entry surfaces as \fBinfo -errorstack\fR. +When the return code from evaluation of \fIscript\fR is \fBTCL_ERROR\fR, +three additional entries are defined in the dictionary of return options +stored in \fIoptionsVarName\fR: \fB\-errorinfo\fR, \fB\-errorcode\fR, +and \fB\-errorline\fR. The value of the \fB\-errorinfo\fR entry +is a formatted stack trace containing more information about +the context in which the error happened. The formatted stack +trace is meant to be read by a person. The value of +the \fB\-errorcode\fR entry is additional information about the +error stored as a list. The \fB\-errorcode\fR value is meant to +be further processed by programs, and may not be particularly +readable by people. The value of the \fB\-errorline\fR entry +is an integer indicating which line of \fIscript\fR was being +evaluated when the error occurred. The values of the \fB\-errorinfo\fR +and \fB\-errorcode\fR entries of the most recent error are also +available as values of the global variables \fB::errorInfo\fR +and \fB::errorCode\fR respectively. .PP Tcl packages may provide commands that set other entries in the dictionary of return options, and the \fBreturn\fR command may be diff --git a/doc/info.n b/doc/info.n index 9fd0fde..7a14ea0 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.34 2009/11/16 17:38:08 ferrieux Exp $ +'\" RCS: @(#) $Id: info.n,v 1.35 2009/11/16 18:00:11 dgp Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -94,16 +94,6 @@ does not have a default value then the command returns \fB0\fR. Otherwise it returns \fB1\fR and places the default value of \fIarg\fR into variable \fIvarname\fR. .TP -\fBinfo errorstack \fR?\fIinterp\fR? -. -Returns a list of lists made of the function names and arguments at -each level from the call stack of the last error in the given -\fIinterp\fR, or in the current one if not specified. This -information is also present in the -errorstack entry of the options -dictionary returned by 3-arg \fBcatch\fR; \fBinfo errorstack\fR is a -convenient way of retrieving it for uncaught errors at toplevel in an -interactive tclsh. -.TP \fBinfo exists \fIvarName\fR . Returns \fB1\fR if the variable named \fIvarName\fR exists in the diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c8ae5ae..cd7bd25 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.408 2009/11/16 17:38:08 ferrieux Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.409 2009/11/16 18:00:11 dgp Exp $ */ #include "tclInt.h" @@ -530,9 +530,6 @@ Tcl_CreateInterp(void) iPtr->errorInfo = NULL; TclNewLiteralStringObj(iPtr->eiVar, "::errorInfo"); Tcl_IncrRefCount(iPtr->eiVar); - iPtr->errorStack = Tcl_NewListObj(0, NULL); - Tcl_IncrRefCount(iPtr->errorStack); - iPtr->resetErrorStack = 1; iPtr->errorCode = NULL; TclNewLiteralStringObj(iPtr->ecVar, "::errorCode"); Tcl_IncrRefCount(iPtr->ecVar); @@ -1473,7 +1470,6 @@ DeleteInterpProc( Tcl_DecrRefCount(iPtr->errorInfo); iPtr->errorInfo = NULL; } - Tcl_DecrRefCount(iPtr->errorStack); if (iPtr->returnOpts) { Tcl_DecrRefCount(iPtr->returnOpts); } @@ -8824,7 +8820,5 @@ TclInfoCoroutineCmd( * mode: c * c-basic-offset: 4 * fill-column: 78 - * tab-width: 8 - * indent-tabs-mode: nil * End: */ diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 9c89ae4..39afc83 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.172 2009/11/16 17:38:08 ferrieux Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.173 2009/11/16 18:00:11 dgp Exp $ */ #include "tclInt.h" @@ -118,9 +118,6 @@ static int InfoCompleteCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int InfoDefaultCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -/* TIP #348 - New 'info' subcommand 'errorstack' */ -static int InfoErrorStackCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); /* TIP #280 - New 'info' subcommand 'frame' */ static int InfoFrameCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -167,7 +164,6 @@ static const EnsembleImplMap defaultInfoMap[] = { {"complete", InfoCompleteCmd, NULL}, {"coroutine", TclInfoCoroutineCmd, NULL}, {"default", InfoDefaultCmd, NULL}, - {"errorstack", InfoErrorStackCmd, NULL}, {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd}, {"frame", InfoFrameCmd, NULL}, {"functions", InfoFunctionsCmd, NULL}, @@ -1021,55 +1017,6 @@ InfoDefaultCmd( /* *---------------------------------------------------------------------- * - * InfoErrorStackCmd -- - * - * Called to implement the "info errorstack" command that returns information - * about the last error's call stack. Handles the following syntax: - * - * info errorstack ?interp? - * - * Results: - * Returns TCL_OK if successful and TCL_ERROR if there is an error. - * - * Side effects: - * Returns a result in the interpreter's result object. If there is an - * error, the result is an error message. - * - *---------------------------------------------------------------------- - */ - -static int -InfoErrorStackCmd( - ClientData dummy, /* Not used. */ - Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ -{ - Tcl_Interp *target; - Interp *iPtr; - - if ((objc != 1) && (objc != 2)) { - Tcl_WrongNumArgs(interp, 1, objv, "?interp?"); - return TCL_ERROR; - } - - target = interp; - if (objc == 2) { - target = Tcl_GetSlave(interp, Tcl_GetString(objv[1])); - if (target == NULL) { - return TCL_ERROR; - } - } - - iPtr = (Interp *) target; - Tcl_SetObjResult(interp, iPtr->errorStack); - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * * TclInfoExistsCmd -- * * Called to implement the "info exists" command that determines whether @@ -4441,7 +4388,5 @@ SelectObjFromSublist( * mode: c * c-basic-offset: 4 * fill-column: 78 - * tab-width: 8 - * indent-tabs-mode: nil * End: */ diff --git a/generic/tclInt.h b/generic/tclInt.h index be536a9..eefe5f6 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.446 2009/11/16 17:38:08 ferrieux Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.447 2009/11/16 18:00:11 dgp Exp $ */ #ifndef _TCLINT @@ -1895,8 +1895,6 @@ typedef struct Interp { Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable. */ Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj). */ Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable. */ - Tcl_Obj *errorStack; /* [info errorstack] value (as a Tcl_Obj). */ - int resetErrorStack; /* controls cleaning up of ::errorStack */ int returnLevel; /* [return -level] parameter. */ /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 2b9b508..5d08bcb 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.194 2009/11/16 17:38:09 ferrieux Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.195 2009/11/16 18:00:11 dgp Exp $ */ #include "tclInt.h" @@ -7574,7 +7574,7 @@ Tcl_LogCommandInfo( { register const char *p; Interp *iPtr = (Interp *) interp; - int overflow, limit = 150, len; + int overflow, limit = 150; Var *varPtr, *arrayPtr; if (iPtr->flags & ERR_ALREADY_LOGGED) { @@ -7633,36 +7633,6 @@ Tcl_LogCommandInfo( TCL_GLOBAL_ONLY); } } - - /* - * TIP #348 - */ - - if (Tcl_IsShared(iPtr->errorStack)) { - Tcl_Obj *newObj; - - newObj = Tcl_DuplicateObj(iPtr->errorStack); - Tcl_DecrRefCount(iPtr->errorStack); - Tcl_IncrRefCount(newObj); - iPtr->errorStack = newObj; - } - Tcl_ListObjLength(interp, iPtr->errorStack, &len); - if (iPtr->resetErrorStack) { - iPtr->resetErrorStack = 0; - /* reset while keeping the list intrep as much as possible */ - Tcl_ListObjReplace(interp, iPtr->errorStack, 0, len, 0, NULL); - len=0; - } - if (iPtr->varFramePtr != iPtr->rootFramePtr) { - Tcl_Obj *listPtr; - int result; - listPtr=Tcl_NewListObj(iPtr->varFramePtr->objc, - iPtr->varFramePtr->objv); - result = Tcl_ListObjReplace(interp, iPtr->errorStack, len, 0, 1, &listPtr); - if (result != TCL_OK) { - Tcl_DecrRefCount(listPtr); - } - } } /* @@ -7670,7 +7640,5 @@ Tcl_LogCommandInfo( * mode: c * c-basic-offset: 4 * fill-column: 78 - * tab-width: 8 - * indent-tabs-mode: nil * End: */ diff --git a/generic/tclResult.c b/generic/tclResult.c index 3d6284e..9f2ec92 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.55 2009/11/16 17:38:09 ferrieux Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.56 2009/11/16 18:00:11 dgp Exp $ */ #include "tclInt.h" @@ -19,7 +19,7 @@ enum returnKeys { KEY_CODE, KEY_ERRORCODE, KEY_ERRORINFO, KEY_ERRORLINE, - KEY_LEVEL, KEY_OPTIONS, KEY_ERRORSTACK, KEY_LAST + KEY_LEVEL, KEY_OPTIONS, KEY_LAST }; /* @@ -922,7 +922,6 @@ Tcl_ResetResult( Tcl_DecrRefCount(iPtr->errorInfo); iPtr->errorInfo = NULL; } - iPtr->resetErrorStack = 1; iPtr->returnLevel = 1; iPtr->returnCode = TCL_OK; if (iPtr->returnOpts) { @@ -1159,7 +1158,6 @@ GetKeys(void) TclNewLiteralStringObj(keys[KEY_ERRORCODE], "-errorcode"); TclNewLiteralStringObj(keys[KEY_ERRORINFO], "-errorinfo"); TclNewLiteralStringObj(keys[KEY_ERRORLINE], "-errorline"); - TclNewLiteralStringObj(keys[KEY_ERRORSTACK],"-errorstack"); TclNewLiteralStringObj(keys[KEY_LEVEL], "-level"); TclNewLiteralStringObj(keys[KEY_OPTIONS], "-options"); @@ -1505,7 +1503,6 @@ Tcl_GetReturnOptions( Tcl_DictObjPut(NULL, options, keys[KEY_ERRORLINE], Tcl_NewIntObj(iPtr->errorLine)); } - Tcl_DictObjPut(NULL, options, keys[KEY_ERRORSTACK], iPtr->errorStack); return options; } @@ -1627,7 +1624,5 @@ Tcl_TransferResult( * mode: c * c-basic-offset: 4 * fill-column: 78 - * tab-width: 8 - * indent-tabs-mode: nil * End: */ diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 8ae7a3a..c0f2738 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdMZ.test,v 1.27 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.28 2009/11/16 18:00:11 dgp Exp $ if {[catch {package require tcltest 2.1}]} { puts stderr "Skipping tests in [info script]. tcltest 2.1 required." @@ -119,18 +119,18 @@ proc dictSort {d} { return $result } -test cmdMZ-return-2.0 {return option handling} -body { +test cmdMZ-return-2.0 {return option handling} { list [catch return -> foo] [dictSort $foo] -} -match glob -result {2 {-code 0 -errorstack * -level 1}} -test cmdMZ-return-2.1 {return option handling} -body { +} {2 {-code 0 -level 1}} +test cmdMZ-return-2.1 {return option handling} { list [catch {return -bar soom} -> foo] [dictSort $foo] -} -match glob -result {2 {-bar soom -code 0 -errorstack * -level 1}} -test cmdMZ-return-2.2 {return option handling} -body { +} {2 {-bar soom -code 0 -level 1}} +test cmdMZ-return-2.2 {return option handling} { list [catch {return -code return} -> foo] [dictSort $foo] -} -match glob -result {2 {-code 0 -errorstack * -level 2}} -test cmdMZ-return-2.3 {return option handling} -body { +} {2 {-code 0 -level 2}} +test cmdMZ-return-2.3 {return option handling} { list [catch {return -code return -level 10} -> foo] [dictSort $foo] -} -match glob -result {2 {-code 0 -errorstack * -level 11}} +} {2 {-code 0 -level 11}} test cmdMZ-return-2.4 {return option handling} -body { return -level 0 -code error } -returnCodes error -result {} @@ -149,14 +149,14 @@ test cmdMZ-return-2.8 {return option handling} -body { test cmdMZ-return-2.9 {return option handling} -body { return -level 0 -code 10 } -returnCodes 10 -result {} -test cmdMZ-return-2.10 {return option handling} -body { +test cmdMZ-return-2.10 {return option handling} { list [catch {return -level 0 -code error} -> foo] [dictSort $foo] -} -match glob -result {1 {-code 1 -errorcode NONE -errorinfo { +} {1 {-code 1 -errorcode NONE -errorinfo { while executing -"return -level 0 -code error"} -errorline 1 -errorstack * -level 0}} -test cmdMZ-return-2.11 {return option handling} -body { +"return -level 0 -code error"} -errorline 1 -level 0}} +test cmdMZ-return-2.11 {return option handling} { list [catch {return -level 0 -code break} -> foo] [dictSort $foo] -} -match glob -result {3 {-code 3 -errorstack * -level 0}} +} {3 {-code 3 -level 0}} test cmdMZ-return-2.12 {return option handling} -body { return -level 0 -code error -options {-code ok} } -returnCodes ok -result {} diff --git a/tests/error.test b/tests/error.test index 1b0f0fa..f522008 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.23 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: error.test,v 1.24 2009/11/16 18:00:11 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -153,19 +153,6 @@ test error-4.5 {errorInfo and errorCode variables} { list [catch {error msg1 msg2 {}} msg] $msg $::errorInfo $::errorCode } {1 msg1 msg2 {}} -test error-4.6 {errorstack via info } -body { - proc f x {g $x$x} - proc g x {error G:$x} - catch {f 12} - info errorstack -} -match glob -result {{g 1212} {f 12} {namespace eval *}} -test error-4.7 {errorstack via options dict } -body { - proc f x {g $x$x} - proc g x {error G:$x} - catch {f 12} m d - dict get $d -errorstack -} -match glob -result {{g 1212} {f 12} {namespace eval *}} - # Errors in error command itself test error-5.1 {errors in error command} { @@ -220,15 +207,6 @@ test error-6.9 {catch must reset error state} { catch foo list $::errorCode } {NONE} -test error-6.10 {catch must reset errorstack} -body { - proc f x {g $x$x} - proc g x {error G:$x} - catch {f 12} - set e1 [info errorstack] - catch {f 13} - set e2 [info errorstack] - list $e1 $e2 -} -match glob -result {{{g 1212} {f 12} {namespace eval *}} {{g 1313} {f 13} {namespace eval *}}} test error-7.1 {Bug 1397843} -body { variable cmds diff --git a/tests/execute.test b/tests/execute.test index aa9e943..87f835e 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.33 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: execute.test,v 1.34 2009/11/16 18:00:11 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -956,11 +956,11 @@ test execute-8.5 {Bug 2038069} -setup { demo } -cleanup { rename demo {} -} -match glob -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO +} -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO while executing "error FOO" invoked from within -"catch \[list error FOO\] m o"} -errorline 2 -errorstack *} +"catch [list error FOO] m o"} -errorline 2} test execute-9.1 {Interp result resetting [Bug 1522803]} { set c 0 diff --git a/tests/info.test b/tests/info.test index aa4a29f..2a1998e 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.72 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: info.test,v 1.73 2009/11/16 18:00:11 dgp Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -676,16 +676,16 @@ test info-21.1 {miscellaneous error conditions} -returnCodes error -body { } -result {wrong # args: should be "info subcommand ?arg ...?"} test info-21.2 {miscellaneous error conditions} -returnCodes error -body { info gorp -} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.3 {miscellaneous error conditions} -returnCodes error -body { info c -} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.4 {miscellaneous error conditions} -returnCodes error -body { info l -} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.5 {miscellaneous error conditions} -returnCodes error -body { info s -} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} ## # ### ### ### ######### ######### ######### diff --git a/tests/init.test b/tests/init.test index b5eba4c..0a49472 100644 --- a/tests/init.test +++ b/tests/init.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: init.test,v 1.20 2009/11/16 17:38:09 ferrieux Exp $ +# RCS: @(#) $Id: init.test,v 1.21 2009/11/16 18:00:11 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -181,7 +181,7 @@ test init-5.0 {return options passed through ::unknown} -setup { list $code $foo $bar $code2 $foo2 $bar2 } -cleanup { unset ::auto_index(::xxx) -} -match glob -result {2 xxx {-errorcode NONE -errorstack * -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE -errorstack *}} +} -result {2 xxx {-errorcode NONE -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE}} cleanupTests } ;# End of [interp eval $testInterp] -- cgit v0.12 From dce1b940f545bb8797289e11aed2715451c71396 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 16 Nov 2009 18:01:49 +0000 Subject: Use proper command creation routine. --- generic/tclTest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index cdaa440..b089065 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.137 2009/11/16 17:38:09 ferrieux Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.138 2009/11/16 18:01:49 dgp Exp $ */ #define TCL_TEST @@ -622,7 +622,7 @@ Tcltest_Init( Tcl_CreateObjCommand(interp, "testlocale", TestlocaleCmd, (ClientData) 0, NULL); Tcl_CreateCommand(interp, "testpanic", TestpanicCmd, (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testfinexit", TestfinexitObjCmd, (ClientData) 0, NULL); + Tcl_CreateObjCommand(interp, "testfinexit", TestfinexitObjCmd, (ClientData) 0, NULL); Tcl_CreateObjCommand(interp, "testparser", TestparserObjCmd, (ClientData) 0, NULL); Tcl_CreateObjCommand(interp, "testparsevar", TestparsevarObjCmd, -- cgit v0.12 From 4f06c71212edaa364a17afb82ec352a1c960a498 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 17 Nov 2009 17:27:40 +0000 Subject: * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy- up from a few days ago (2009-11-9, not in ChangeLog). strchr is apparently a macro on AIX and reacts badly to pre-processor directives in its arguments. --- ChangeLog | 7 +++++++ unix/tclUnixChan.c | 14 +++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dcbf3f..c3fe2f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-17 Andreas Kupries + + * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy- + up from a few days ago (2009-11-9, not in ChangeLog). strchr is + apparently a macro on AIX and reacts badly to pre-processor + directives in its arguments. + 2009-11-16 Alexandre Ferrieux * generic/tclEncoding.c: (forward port) Fix [Bug 2891556] and improve diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 323d9e2..aaca9f4 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.102 2009/11/09 13:47:23 dkf Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.103 2009/11/17 17:27:40 andreas_kupries Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -1390,15 +1390,19 @@ TtyParseMode( /* * Only allow setting mark/space parity on platforms that support it Make * sure to allow for the case where strchr is a macro. [Bug: 5089] + * + * We cannot if/else/endif the strchr arguments, it has to be the whole + * function. On AIX this function is apparently a macro, and macros do + * not allow pre-processor directives in their arguments. */ - if (strchr( + if ( #if defined(PAREXT) || defined(USE_TERMIO) - "noems", + strchr("noems", parity) #else - "noe", + strchr("noe", parity) #endif /* PAREXT|USE_TERMIO */ - parity) == NULL) { + == NULL) { if (interp != NULL) { Tcl_AppendResult(interp, bad, " parity: should be ", #if defined(PAREXT) || defined(USE_TERMIO) -- cgit v0.12 From 993641779032d19e86c6ad4c7451a25acb940d19 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 17 Nov 2009 19:51:22 +0000 Subject: format --- ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3fe2f6..08007b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,14 +7,14 @@ 2009-11-16 Alexandre Ferrieux - * generic/tclEncoding.c: (forward port) Fix [Bug 2891556] and improve - * generic/tclTest.c: test to detect similar manifestations in the + * generic/tclEncoding.c: (forward port) Fix [Bug 2891556] and improve + * generic/tclTest.c: test to detect similar manifestations in the * tests/encoding.test: future. Add tcltest support for finalization. 2009-11-15 Mo DeJong * win/tclWinDde.c: Avoid gcc compiler warning by - explicitly casting DdeCreateStringHandle argument. + explicitly casting DdeCreateStringHandle argument. 2009-11-12 Andreas Kupries -- cgit v0.12 From 76095248c12bff189c0c8c073ca52ed6e384b87c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 21:04:32 +0000 Subject: Fix [Bug 2891171]: URL checking too strict when using multiple question marks (added test case) --- tests/http.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/http.test b/tests/http.test index a62f1c1..d879e45 100644 --- a/tests/http.test +++ b/tests/http.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.test,v 1.54 2009/09/11 15:45:19 dkf Exp $ +# RCS: @(#) $Id: http.test,v 1.55 2009/11/18 21:04:32 nijtmans Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -342,7 +342,7 @@ test http-3.22 {http::geturl parse failures} -body { http::geturl http://somewhere/%path } -returnCodes error -result {Illegal encoding character usage "%pa" in URL path} test http-3.23 {http::geturl parse failures} -body { - http::geturl http://somewhere/path?{query} + http::geturl http://somewhere/path?{query}? } -returnCodes error -result {Illegal characters in URL path} test http-3.24 {http::geturl parse failures} -body { http::geturl http://somewhere/path?%query -- cgit v0.12 From e732dcbc33f07f700918fed16ed2a8d62d5d3500 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 21:23:20 +0000 Subject: Eliminate "then" keyword --- ChangeLog | 8 +++ library/auto.tcl | 16 +++--- library/clock.tcl | 156 ++++++++++++++++++++++++++-------------------------- library/history.tcl | 4 +- library/package.tcl | 38 ++++++------- library/safe.tcl | 30 +++++----- library/tm.tcl | 6 +- 7 files changed, 133 insertions(+), 125 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08007b8..49c74e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-18 Jan Nijtmans + + * library/auto.tcl Eliminate "then" keyword + * library/clock.tcl + * library/history.tcl + * library/safe.tcl + * library/tm.tcl + 2009-11-17 Andreas Kupries * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy- diff --git a/library/auto.tcl b/library/auto.tcl index 42ffa72..9980b26 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution of commands # and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.30 2009/07/26 21:48:45 dkf Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.31 2009/11/18 21:23:21 nijtmans Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -18,7 +18,7 @@ # the information gets recomputed the next time it's needed. Also delete any # commands that are listed in the auto-load index. # -# Arguments: +# Arguments: # None. proc auto_reset {} { @@ -88,7 +88,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { if { $::tcl_platform(platform) eq "unix" && $::tcl_platform(os) eq "Darwin" - } then { + } { # 4. On MacOSX, check the Resources/Scripts subdir too lappend dirs [file join $d $basename$version Resources Scripts] } @@ -180,7 +180,7 @@ if {[interp issafe]} { # by any number of glob patterns to use in that directory to locate all of the # relevant files. # -# Arguments: +# Arguments: # dir - Name of the directory in which to create an index. # args - Any number of additional arguments giving the names of files @@ -334,7 +334,7 @@ namespace eval auto_mkindex_parser { # the "proc" command by adding an entry for the index file. Returns a string # that represents the index file. # -# Arguments: +# Arguments: # file Name of Tcl source file to be indexed. proc auto_mkindex_parser::mkindex {file} { @@ -449,7 +449,7 @@ proc auto_mkindex_parser::commandInit {name arglist body} { if {[string match *::* $name]} { set exportCmd [list _%@namespace export [namespace tail $name]] $parser eval [list _%@namespace eval $ns $exportCmd] - + # The following proc definition does not work if you want to tolerate # space or something else diabolical in the procedure name, (i.e., # space in $alias). The following does not work: @@ -520,7 +520,7 @@ auto_mkindex_parser::command proc {name args} { variable scriptFile # Do some fancy reformatting on the "source" call to handle platform # differences with respect to pathnames. Use format just so that the - # command is a little easier to read (otherwise it'd be full of + # command is a little easier to read (otherwise it'd be full of # backslashed dollar signs, etc. append index [list set auto_index([fullname $name])] \ [format { [list source [file join $dir %s]]} \ @@ -548,7 +548,7 @@ auto_mkindex_parser::hook { # AUTO MKINDEX: tbcload::bcproc name arglist body # Adds an entry to the auto index list for the given pre-compiled - # procedure name. + # procedure name. auto_mkindex_parser::commandInit tbcload::bcproc {name args} { variable index diff --git a/library/clock.tcl b/library/clock.tcl index c75a9e2..6d6cc15 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.57 2009/10/29 01:17:54 kennykb Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.58 2009/11/18 21:23:20 nijtmans Exp $ # #---------------------------------------------------------------------- @@ -44,7 +44,7 @@ namespace eval ::tcl::clock \ # The 'clock' command manipulates time. Refer to the user documentation for # the available subcommands and what they do. # -#---------------------------------------------------------------------- +#---------------------------------------------------------------------- namespace eval ::tcl::clock { @@ -190,7 +190,7 @@ proc ::tcl::clock::Initialize {} { # Germany, Norway, Denmark (Catholic Germany changed earlier) ::msgcat::mcset de_DE GREGORIAN_CHANGE_DATE 2342032 - ::msgcat::mcset nb GREGORIAN_CHANGE_DATE 2342032 + ::msgcat::mcset nb GREGORIAN_CHANGE_DATE 2342032 ::msgcat::mcset nn GREGORIAN_CHANGE_DATE 2342032 ::msgcat::mcset no GREGORIAN_CHANGE_DATE 2342032 ::msgcat::mcset da GREGORIAN_CHANGE_DATE 2342032 @@ -226,7 +226,7 @@ proc ::tcl::clock::Initialize {} { # Greece ::msgcat::mcset el GREGORIAN_CHANGE_DATE 2423480 - + #------------------------------------------------------------------ # # CONSTANTS @@ -669,7 +669,7 @@ proc ::tcl::clock::format { args } { set clockval [lindex $args 0] # Get the data for time changes in the given zone - + if {$timezone eq ""} { set timezone [GetSystemTimeZone] } @@ -679,11 +679,11 @@ proc ::tcl::clock::format { args } { return -options $opts $retval } } - + # Build a procedure to format the result. Cache the built procedure's name # in the 'FormatProc' array to avoid losing its internal representation, # which contains the name resolution. - + set procName formatproc'$format'$locale set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName] if {[info exists FormatProc($procName)]} { @@ -692,7 +692,7 @@ proc ::tcl::clock::format { args } { set FormatProc($procName) \ [ParseClockFormatFormat $procName $format $locale] } - + return [$procName $clockval $timezone] } @@ -717,7 +717,7 @@ proc ::tcl::clock::ParseClockFormatFormat {procName format locale} { } # Map away the locale-dependent composite format groups - + EnterLocale $locale oldLocale # Change locale if a fresh locale has been given on the command line. @@ -751,7 +751,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { set formatString {} set substituents {} set state {} - + set format [LocalizeFormat $locale $format] foreach char [split $format {}] { @@ -778,7 +778,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { { [lindex @DAYS_OF_WEEK_ABBREV@ \ [expr {[dict get $date dayOfWeek] \ % 7}]]}] - } + } A { # Day of week, spelt out. append formatString %s append substituents \ @@ -879,7 +879,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { k { # Hour (0-23), no leading zero append formatString %2d append substituents \ - { [expr { [dict get $date localSeconds] + { [expr { [dict get $date localSeconds] / 3600 % 24 }]} } @@ -900,7 +900,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { M { # Minute of the hour, leading zero append formatString %02d append substituents \ - { [expr { [dict get $date localSeconds] + { [expr { [dict get $date localSeconds] / 60 % 60 }]} } @@ -941,7 +941,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { { [expr {(([dict get $date localSeconds] % 86400) < 43200) ? $am : $pm}]} - + } Q { # Hi, Jeff! append formatString %s @@ -951,11 +951,11 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { append formatString %s append substituents { [dict get $date seconds]} } - S { # Second of the minute, with + S { # Second of the minute, with # leading zero append formatString %02d append substituents \ - { [expr { [dict get $date localSeconds] + { [expr { [dict get $date localSeconds] % 60 }]} } t { # A literal tab character @@ -976,7 +976,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { } incr dow set UweekNumber \ - [expr { ( [dict get $date dayOfYear] + [expr { ( [dict get $date dayOfYear] - $dow + 7 ) / 7 }] } @@ -999,7 +999,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { set WweekNumber \ [expr { ( [dict get $date dayOfYear] - [dict get $date dayOfWeek] - + 7 ) + + 7 ) / 7 }] } append formatString %02d @@ -1068,7 +1068,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { percentO { # Character following %O set state {} switch -exact -- $char { - d - e { # Day of the month in alternative + d - e { # Day of the month in alternative # numerals append formatString %s append substituents \ @@ -1080,7 +1080,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { append formatString %s append substituents \ { [lindex $localeNumerals \ - [expr { [dict get $date localSeconds] + [expr { [dict get $date localSeconds] / 3600 % 24 }]]} } @@ -1106,7 +1106,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { append formatString %s append substituents \ { [lindex $localeNumerals \ - [expr { [dict get $date localSeconds] + [expr { [dict get $date localSeconds] / 60 % 60 }]]} } @@ -1115,7 +1115,7 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { append formatString %s append substituents \ { [lindex $localeNumerals \ - [expr { [dict get $date localSeconds] + [expr { [dict get $date localSeconds] % 60 }]]} } u { # Day of the week (Monday=1,Sunday=7) @@ -1146,9 +1146,9 @@ proc ::tcl::clock::ParseClockFormatFormat2 {format locale procName} { } } } - + # Clean up any improperly terminated groups - + switch -exact -- $state { percent { append formatString %% @@ -1244,7 +1244,7 @@ proc ::tcl::clock::scan { args } { "cannot use -gmt and -timezone in same call" } if { [catch { expr { wide($base) } } result] } { - return -code error "expected integer but got \"$base\"" + return -code error "expected integer but got \"$base\"" } if { ![string is boolean -strict $gmt] } { return -code error "expected boolean value but got \"$gmt\"" @@ -1309,7 +1309,7 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { variable TZData # Get the data for time changes in the given zone - + try { SetupTimeZone $timezone } on error {retval opts} { @@ -1368,7 +1368,7 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { # Greenwich, and the second is a Daylight Saving Time indicator (1 == yes, # 0 == no, -1 == unknown). We make it into a time zone indicator of # +-hhmm. - + if { [llength $parseZone] > 0 } { lassign $parseZone minEast dstFlag set timezone [FormatNumericTimeZone \ @@ -1382,9 +1382,9 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { set date [GetJulianDayFromEraYearMonthDay $date[set date {}] 2361222] if { $parseTime ne {} } { dict set date secondOfDay $parseTime - } elseif { [llength $parseWeekday] != 0 - || [llength $parseOrdinalMonth] != 0 - || ( [llength $parseRel] != 0 + } elseif { [llength $parseWeekday] != 0 + || [llength $parseOrdinalMonth] != 0 + || ( [llength $parseRel] != 0 && ( [lindex $parseRel 0] != 0 || [lindex $parseRel 1] != 0 ) ) } { dict set date secondOfDay 0 @@ -1406,10 +1406,10 @@ proc ::tcl::clock::FreeScan { string base timezone locale } { set seconds [add $seconds \ $relMonth months $relDay days $relSecond seconds \ -timezone $timezone -locale $locale] - } + } # Do relative weekday - + if { [llength $parseWeekday] > 0 } { lassign $parseWeekday dayOrdinal dayOfWeek set date2 [GetDateFields $seconds $TZData($timezone) 2361222] @@ -1737,7 +1737,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { append re \\s*\\d\\d? } V { # Week of ISO8601 year - + append re \\s*(\\d\\d?) dict set fieldSet iso8601Week [incr fieldCount] append postcode "dict set date iso8601Week \[" \ @@ -1909,7 +1909,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { "day of week is greater than 7" } dict set date dayOfWeek $dow - } + } } y { lassign [LocaleNumeralMatcher $locale] regex lookup @@ -1958,7 +1958,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { # Set up the time zone before doing anything with a default base date # that might need a timezone to interpret it. - if { ![dict exists $fieldSet seconds] + if { ![dict exists $fieldSet seconds] && ![dict exists $fieldSet starDate] } { if { [dict exists $fieldSet tzName] } { append procBody { @@ -1982,7 +1982,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { # Convert to local time unless epoch seconds or stardate are # being processed - they're always absolute - if { ![dict exists $fieldSet seconds] + if { ![dict exists $fieldSet seconds] && ![dict exists $fieldSet starDate] } { append procBody { if { [dict get $date julianDay] > 5373484 } { @@ -2014,7 +2014,7 @@ proc ::tcl::clock::ParseClockScanFormat {formatString locale} { return $procName } - + #---------------------------------------------------------------------- # # LocaleNumeralMatcher -- @@ -2052,7 +2052,7 @@ proc ::tcl::clock::LocaleNumeralMatcher {l} { } return [dict get $LocaleNumeralCache $l] } - + #---------------------------------------------------------------------- @@ -2091,7 +2091,7 @@ proc ::tcl::clock::UniquePrefixRegexp { data } { # Walk the key-value pairs foreach { key value } $data { - # Construct all prefixes of the key; + # Construct all prefixes of the key; set prefix {} foreach char [split $key {}] { @@ -2154,7 +2154,7 @@ proc ::tcl::clock::UniquePrefixRegexp { data } { # #---------------------------------------------------------------------- -proc ::tcl::clock::MakeUniquePrefixRegexp { successors +proc ::tcl::clock::MakeUniquePrefixRegexp { successors uniquePrefixMapping prefixString } { # Get the characters that may follow the current prefix string @@ -2172,7 +2172,7 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors if { [dict exists $uniquePrefixMapping $prefixString] || [llength $schars] > 1 - } then { + } { append re "(?:" } @@ -2268,7 +2268,7 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { ![string is integer $newPos] || ![string is integer $currPos] || $newPos > $currPos - } then { + } { break } if { $newPos < $currPos } { @@ -2358,7 +2358,7 @@ proc ::tcl::clock::EnterLocale { locale oldLocaleVar } { mcload $MsgDir dict set McLoaded $locale {} } -} +} #---------------------------------------------------------------------- # @@ -2518,7 +2518,7 @@ proc ::tcl::clock::LocalizeFormat { locale format } { # string. Note that the order of the [string map] operations is # significant because later formats can refer to later ones; for example # %c can refer to %X, which in turn can refer to %T. - + set list { %% %% %D %m/%d/%Y @@ -2535,7 +2535,7 @@ proc ::tcl::clock::LocalizeFormat { locale format } { lappend list %c [string map $list [mc DATE_TIME_FORMAT]] lappend list %Ec [string map $list [mc LOCALE_DATE_TIME_FORMAT]] set format [string map $list $format] - + dict set McLoaded $locale FORMAT $inFormat $format return $format } @@ -2740,7 +2740,7 @@ proc ::tcl::clock::ScanWide { str } { # #---------------------------------------------------------------------- -proc ::tcl::clock::InterpretTwoDigitYear { date baseTime +proc ::tcl::clock::InterpretTwoDigitYear { date baseTime { twoDigitField yearOfCentury } { fourDigitField year } } { set yr [dict get $date $twoDigitField] @@ -2831,7 +2831,7 @@ proc ::tcl::clock::AssignBaseIso8601Year {date baseTime timeZone changeover} { # # AssignBaseMonth -- # -# Places the number of the current year and month into a +# Places the number of the current year and month into a # dictionary. # # Parameters: @@ -3096,7 +3096,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { } elseif { [regexp {^([-+])(\d\d)(?::?(\d\d)(?::?(\d\d))?)?} $timezone \ -> s hh mm ss] - } then { + } { # Make a fixed offset ::scan $hh %d hh @@ -3119,7 +3119,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { } elseif { [string index $timezone 0] eq {:} } { # Convert using a time zone file - if { + if { [catch { LoadTimeZoneFile [string range $timezone 1 end] }] && [catch { @@ -3130,7 +3130,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { -errorcode [list CLOCK badTimeZone $timezone] \ "time zone \"$timezone\" not found" } - + } elseif { ![catch {ParsePosixTimeZone $timezone} tzfields] } { # This looks like a POSIX time zone - try to process it @@ -3295,7 +3295,7 @@ proc ::tcl::clock::GuessWindowsTimeZone {} { : [::format %02d $stdSecond] } dict set WinZoneInfo $data $tzname - } + } return [dict get $WinZoneInfo $data] } @@ -3448,10 +3448,10 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { if {$version eq "2"} { set seek [expr { 44 - + 5 * $nTime - + 6 * $nType + + 5 * $nTime + + 6 * $nType + 4 * $nLeap - + $nIsStd + + $nIsStd + $nIsGMT + $nChar }] @@ -3565,7 +3565,7 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { # The following keys are present in the dictionary: # stdName - Name of the time zone when Daylight Saving Time # is not in effect. -# stdSignum - Sign (+, -, or empty) of the offset from Greenwich +# stdSignum - Sign (+, -, or empty) of the offset from Greenwich # to the given (non-DST) time zone. + and the empty # string denote zones west of Greenwich, - denotes east # of Greenwich; this is contrary to the ISO convention @@ -3610,7 +3610,7 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { # endHours, endMinutes, endSeconds - # Specify the end of DST in the same way that the start* fields # specify the beginning of DST. -# +# # This procedure serves only to break the time specifier into fields. No # attempt is made to canonicalize the fields or supply default values. # @@ -3627,8 +3627,8 @@ proc ::tcl::clock::ParsePosixTimeZone { tz } { ([[:digit:]]{1,2}) (?: # 4 - Standard time zone offset, minutes - : ([[:digit:]]{1,2}) - (?: + : ([[:digit:]]{1,2}) + (?: # 5 - Standard time zone offset, seconds : ([[:digit:]]{1,2} ) )? @@ -3644,8 +3644,8 @@ proc ::tcl::clock::ParsePosixTimeZone { tz } { ([[:digit:]]{1,2}) (?: # 9 - DST time zone offset, minutes - : ([[:digit:]]{1,2}) - (?: + : ([[:digit:]]{1,2}) + (?: # 10 - DST time zone offset, seconds : ([[:digit:]]{1,2}) )? @@ -3658,8 +3658,8 @@ proc ::tcl::clock::ParsePosixTimeZone { tz } { ( J ? ) ( [[:digit:]]+ ) | M # 13 - Month number 14 - Week of month 15 - Day of week - ( [[:digit:]] + ) - [.] ( [[:digit:]] + ) + ( [[:digit:]] + ) + [.] ( [[:digit:]] + ) [.] ( [[:digit:]] + ) ) (?: @@ -3680,8 +3680,8 @@ proc ::tcl::clock::ParsePosixTimeZone { tz } { ( J ? ) ( [[:digit:]]+ ) | M # 21 - Month number 22 - Week of month 23 - Day of week - ( [[:digit:]] + ) - [.] ( [[:digit:]] + ) + ( [[:digit:]] + ) + [.] ( [[:digit:]] + ) [.] ( [[:digit:]] + ) ) (?: @@ -3750,14 +3750,14 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { } else { set stdSignum -1 } - set stdHours [lindex [::scan [dict get $z stdHours] %d] 0] + set stdHours [lindex [::scan [dict get $z stdHours] %d] 0] if { [dict get $z stdMinutes] ne {} } { - set stdMinutes [lindex [::scan [dict get $z stdMinutes] %d] 0] + set stdMinutes [lindex [::scan [dict get $z stdMinutes] %d] 0] } else { set stdMinutes 0 } if { [dict get $z stdSeconds] ne {} } { - set stdSeconds [lindex [::scan [dict get $z stdSeconds] %d] 0] + set stdSeconds [lindex [::scan [dict get $z stdSeconds] %d] 0] } else { set stdSeconds 0 } @@ -3786,14 +3786,14 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { if { [dict get $z dstHours] eq {} } { set dstOffset [expr { 3600 + $stdOffset }] } else { - set dstHours [lindex [::scan [dict get $z dstHours] %d] 0] + set dstHours [lindex [::scan [dict get $z dstHours] %d] 0] if { [dict get $z dstMinutes] ne {} } { - set dstMinutes [lindex [::scan [dict get $z dstMinutes] %d] 0] + set dstMinutes [lindex [::scan [dict get $z dstMinutes] %d] 0] } else { set dstMinutes 0 } if { [dict get $z dstSeconds] ne {} } { - set dstSeconds [lindex [::scan [dict get $z dstSeconds] %d] 0] + set dstSeconds [lindex [::scan [dict get $z dstSeconds] %d] 0] } else { set dstSeconds 0 } @@ -3810,7 +3810,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { if { [dict get $z startDayOfYear] eq {} && [dict get $z startMonth] eq {} - } then { + } { if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { # EU dict set z startWeekOfMonth 5 @@ -3831,7 +3831,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { } if { [dict get $z endDayOfYear] eq {} && [dict get $z endMonth] eq {} - } then { + } { if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { # EU dict set z endMonth 10 @@ -3871,7 +3871,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { } return $data -} +} #---------------------------------------------------------------------- # @@ -3904,7 +3904,7 @@ proc ::tcl::clock::DeterminePosixDSTTime { z bound y } { # Time was specified as a day of the year if { [dict get $z ${bound}J] ne {} - && [IsGregorianLeapYear $y] + && [IsGregorianLeapYear $y] && ( $doy > $FEB_28 ) } { incr doy } @@ -4039,7 +4039,7 @@ proc ::tcl::clock::GetJulianDayFromEraYearDay {date changeover} { - ( $ym1 / 100 ) + ( $ym1 / 400 ) }] - + # If the date is before the Gregorian change, use the Julian calendar. if { $jd < $changeover } { @@ -4121,7 +4121,7 @@ proc ::tcl::clock::GetJulianDayFromEraYearMonthWeekDay {date changeover} { proc ::tcl::clock::IsGregorianLeapYear { date } { switch -exact -- [dict get $date era] { - BCE { + BCE { set year [expr { 1 - [dict get $date year]}] } CE { @@ -4304,7 +4304,7 @@ proc ::tcl::clock::add { clockval args } { "cannot use -gmt and -timezone in same call" } if { [catch { expr { wide($clockval) } } result] } { - return -code error "expected integer but got \"$clockval\"" + return -code error "expected integer but got \"$clockval\"" } if { ![string is boolean -strict $gmt] } { return -code error "expected boolean value but got \"$gmt\"" @@ -4313,7 +4313,7 @@ proc ::tcl::clock::add { clockval args } { } EnterLocale $locale oldLocale - + set changeover [mc GREGORIAN_CHANGE_DATE] if {[catch {SetupTimeZone $timezone} retval opts]} { diff --git a/library/history.tcl b/library/history.tcl index 077d604..4d21143 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -2,7 +2,7 @@ # # Implementation of the history command. # -# RCS: @(#) $Id: history.tcl,v 1.8 2009/07/25 21:51:02 dkf Exp $ +# RCS: @(#) $Id: history.tcl,v 1.9 2009/11/18 21:23:20 nijtmans Exp $ # # Copyright (c) 1997 Sun Microsystems, Inc. # @@ -78,7 +78,7 @@ proc ::tcl::HistAdd {event {exec {}}} { if { [prefix longest {exec {}} $exec] eq "" && [llength [info level 0]] == 3 - } then { + } { return -code error "bad argument \"$exec\": should be \"exec\"" } diff --git a/library/package.tcl b/library/package.tcl index d8729b2..839f506 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl which can be loaded on demand # for package management. # -# RCS: @(#) $Id: package.tcl,v 1.37 2009/07/26 11:40:23 dkf Exp $ +# RCS: @(#) $Id: package.tcl,v 1.38 2009/11/18 21:23:20 nijtmans Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -42,7 +42,7 @@ proc tcl::Pkg::CompareExtension { fileName {ext {}} } { set currExt [file extension $root] if {$currExt eq $ext} { return 1 - } + } # The current extension does not match; if it is not a numeric # value, quit, as we are only looking to ignore version number @@ -304,14 +304,14 @@ proc pkg_mkIndex {args} { if { !$::tcl::direct } { # See what new namespaces appeared, and import commands # from them. Only exported commands go into the index. - + foreach ::tcl::x [::tcl::GetAllNamespaces] { if {! [info exists ::tcl::namespaces($::tcl::x)]} { namespace import -force ${::tcl::x}::* } # Figure out what commands appeared - + foreach ::tcl::x [info commands] { set ::tcl::newCmds($::tcl::x) 1 } @@ -320,19 +320,19 @@ proc pkg_mkIndex {args} { } foreach ::tcl::x [array names ::tcl::newCmds] { # determine which namespace a command comes from - + set ::tcl::abs [namespace origin $::tcl::x] - + # special case so that global names have no # leading ::, this is required by the unknown # command - + set ::tcl::abs \ [lindex [auto_qualify $::tcl::abs ::] 0] - + if {$::tcl::x ne $::tcl::abs} { # Name changed during qualification - + set ::tcl::newCmds($::tcl::abs) 1 unset ::tcl::newCmds($::tcl::x) } @@ -446,7 +446,7 @@ proc tclPkgSetup {dir pkg version files} { set auto_index($cmd) [list load [file join $dir $f] $pkg] } else { set auto_index($cmd) [list source [file join $dir $f]] - } + } } } } @@ -475,7 +475,7 @@ proc tclPkgUnknown {name args} { set old_path [set use_path $auto_path] while {[llength $use_path]} { set dir [lindex $use_path end] - + # Make sure we only scan each directory one time. if {[info exists tclSeenPath($dir)]} { set use_path [lrange $use_path 0 end-1] @@ -507,7 +507,7 @@ proc tclPkgUnknown {name args} { set dir [lindex $use_path end] if {![info exists procdDirs($dir)]} { set file [file join $dir pkgIndex.tcl] - # safe interps usually don't have "file exists", + # safe interps usually don't have "file exists", if {([interp issafe] || [file exists $file])} { try { source $file @@ -546,7 +546,7 @@ proc tclPkgUnknown {name args} { # Don't add directories we've already seen, or ones already on the # $use_path. foreach dir [lrange $auto_path $index end] { - if {![info exists tclSeenPath($dir)] + if {![info exists tclSeenPath($dir)] && ([lsearch -exact $use_path $dir] == -1) } { lappend use_path $dir } @@ -630,7 +630,7 @@ proc tcl::MacOSXPkgUnknown {original name args} { # Don't add directories we've already seen, or ones already on the # $use_path. foreach dir [lrange $auto_path $index end] { - if {![info exists tclSeenPath($dir)] + if {![info exists tclSeenPath($dir)] && ([lsearch -exact $use_path $dir] == -1) } { lappend use_path $dir } @@ -681,7 +681,7 @@ proc ::tcl::Pkg::Create {args} { if { $len < 6 } { error $err(wrongNumArgs) } - + # Initialize parameters set opts(-name) {} set opts(-version) {} @@ -720,14 +720,14 @@ proc ::tcl::Pkg::Create {args} { if { [llength $opts(-version)] == 0 } { error [format $err(valueMissing) "-version"] } - + if { [llength $opts(-source)] == 0 && [llength $opts(-load)] == 0 } { error $err(noLoadOrSource) } # OK, now everything is good. Generate the package ifneeded statment. set cmdline "package ifneeded $opts(-name) $opts(-version) " - + set cmdList {} set lazyFileList {} @@ -740,7 +740,7 @@ proc ::tcl::Pkg::Create {args} { foreach {filename proclist} $filespec { break } - + if { [llength $proclist] == 0 } { set cmd "\[list $key \[file join \$dir [list $filename]\]\]" lappend cmdList $cmd @@ -758,4 +758,4 @@ proc ::tcl::Pkg::Create {args} { return $cmdline } -interp alias {} ::pkg::create {} ::tcl::Pkg::Create +interp alias {} ::pkg::create {} ::tcl::Pkg::Create diff --git a/library/safe.tcl b/library/safe.tcl index 5ea12b1..561659b 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -4,7 +4,7 @@ # It implements a virtual path mecanism to hide the real pathnames from the # slave. It runs in a master interpreter and sets up data structure and # aliases that will be invoked when used from a slave interpreter. -# +# # See the safe.n man page for details. # # Copyright (c) 1996-1997 Sun Microsystems, Inc. @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.31 2009/11/06 18:16:58 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.32 2009/11/18 21:23:21 nijtmans Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -38,7 +38,7 @@ proc ::safe::InterpStatics {} { upvar $v $v } set flag [::tcl::OptProcArgGiven -noStatics] - if {$flag && (!$noStatics == !$statics) + if {$flag && (!$noStatics == !$statics) && ([::tcl::OptProcArgGiven -statics])} { return -code error\ "conflicting values given for -statics and -noStatics" @@ -59,7 +59,7 @@ proc ::safe::InterpNested {} { set flag [::tcl::OptProcArgGiven -nestedLoadOk] # note that the test here is the opposite of the "InterpStatics" one # (it is not -noNested... because of the wanted default value) - if {$flag && (!$nestedLoadOk != !$nested) + if {$flag && (!$nestedLoadOk != !$nested) && ([::tcl::OptProcArgGiven -nested])} { return -code error\ "conflicting values given for -nested and -nestedLoadOk" @@ -194,7 +194,7 @@ proc ::safe::interpConfigure {args} { if { ![::tcl::OptProcArgGiven -statics] && ![::tcl::OptProcArgGiven -noStatics] - } then { + } { set statics $state(staticsok) } else { set statics [InterpStatics] @@ -202,7 +202,7 @@ proc ::safe::interpConfigure {args} { if { [::tcl::OptProcArgGiven -nested] || [::tcl::OptProcArgGiven -nestedLoadOk] - } then { + } { set nested [InterpNested] } else { set nested $state(nestedok) @@ -240,7 +240,7 @@ proc ::safe::interpConfigure {args} { # # Returns the slave name. # -# Optional Arguments : +# Optional Arguments : # + slave name : if empty, generated name will be used # + access_path: path list controlling where load/source can occur, # if empty: the master auto_path will be used. @@ -251,7 +251,7 @@ proc ::safe::interpConfigure {args} { # use the full name and no indent so auto_mkIndex can find us proc ::safe::InterpCreate { - slave + slave access_path staticsok nestedok @@ -426,7 +426,7 @@ proc ::safe::interpAddToAccessPath {slave path} { # interpreter. It is useful when you want to install the safe base aliases # into a preexisting safe interpreter. proc ::safe::InterpInit { - slave + slave access_path staticsok nestedok @@ -469,14 +469,14 @@ proc ::safe::InterpInit { if {[catch {::interp eval $slave { source [file join $tcl_library init.tcl] - }} msg]} then { + }} msg]} { Log $slave "can't source init.tcl ($msg)" return -code error "can't source init.tcl into slave $slave ($msg)" } if {[catch {::interp eval $slave { source [file join $tcl_library tm.tcl] - }} msg]} then { + }} msg]} { Log $slave "can't source tm.tcl ($msg)" return -code error "can't source tm.tcl into slave $slave ($msg)" } @@ -556,7 +556,7 @@ proc ::safe::interpDelete {slave} { return } -# Set (or get) the logging mecanism +# Set (or get) the logging mecanism proc ::safe::setLogCmd {args} { variable Log @@ -751,7 +751,7 @@ proc ::safe::AliasSource {slave args} { return -code error $msg } set file [lindex $args $at] - + # get the real path from the virtual one. try { set file [TranslatePath $slave $file] @@ -759,7 +759,7 @@ proc ::safe::AliasSource {slave args} { Log $slave $msg return -code error "permission denied" } - + # check that the path is in the access path of that slave try { FileInAccessPath $slave $file @@ -780,7 +780,7 @@ proc ::safe::AliasSource {slave args} { if {[catch { # We use catch here because we want to catch non-error/ok too ::interp invokehidden $slave source {*}$encoding $file - } msg]} then { + } msg]} { Log $slave $msg return -code error "script error" } diff --git a/library/tm.tcl b/library/tm.tcl index ca0bbf7..90f8296 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -181,7 +181,7 @@ proc ::tcl::tm::list {} { proc ::tcl::tm::UnknownHandler {original name args} { # Import the list of paths to search for packages in module form. - # Import the pattern used to check package names in detail. + # Import the pattern used to check package names in detail. variable paths variable pkgpattern @@ -263,7 +263,7 @@ proc ::tcl::tm::UnknownHandler {original name args} { if { ($pkgname eq $name) && [package vsatisfies $pkgversion {*}$args] - } then { + } { set satisfied 1 # We do not abort the loop, and keep adding provide @@ -357,7 +357,7 @@ proc ::tcl::tm::roots {paths} { } set px [file join $p site-tcl] if {![interp issafe]} { set px [file normalize $px] } - path add $px + path add $px } return } -- cgit v0.12 From 1cb4f92988da74c1fbee275ed1a3e70f784fc19f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 21:45:36 +0000 Subject: Eliminate unneccessary spaces --- ChangeLog | 10 +++++++++- library/http/http.tcl | 8 ++++---- library/http1.0/http.tcl | 8 ++++---- library/msgcat/msgcat.tcl | 26 +++++++++++++------------- library/opt/optparse.tcl | 20 ++++++++++---------- library/platform/platform.tcl | 2 +- tools/tclZIC.tcl | 12 ++++++------ tools/tcltk-man2html.tcl | 10 +++++----- tools/tsdPerf.c | 10 +++++----- 9 files changed, 57 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49c74e6..a7a3534 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,18 @@ 2009-11-18 Jan Nijtmans - * library/auto.tcl Eliminate "then" keyword + * library/auto.tcl Eliminate "then" keyword * library/clock.tcl * library/history.tcl * library/safe.tcl * library/tm.tcl + * library/http/http.tcl Eliminate unneccessary spaces + * library/http1.0/http.tcl + * library/msgcat/msgcat.tcl + * library/opt/optparse.tcl + * library/platform/platform.tcl + * tools/tcltk-man2html.tcl + * tools/tclZIC.tcl + * tools/tsdPerf.c 2009-11-17 Andreas Kupries diff --git a/library/http/http.tcl b/library/http/http.tcl index 6ec2a54..e02ec3f 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.78 2009/11/11 06:49:05 nijtmans Exp $ +# RCS: @(#) $Id: http.tcl,v 1.79 2009/11/18 21:45:38 nijtmans Exp $ package require Tcl 8.6 # Keep this in sync with pkgIndex.tcl and with the install directories in @@ -1283,18 +1283,18 @@ proc http::Eof {token {force 0}} { Log "error doing $coding '$state(body)'" return [Finish $token $err] } - + if {!$state(binary)} { # If we are getting text, set the incoming channel's encoding # correctly. iso8859-1 is the RFC default, but this could be any IANA # charset. However, we only know how to convert what we have # encodings for. - + set enc [CharsetToEncoding $state(charset)] if {$enc ne "binary"} { set state(body) [encoding convertfrom $enc $state(body)] } - + # Translate text line endings. set state(body) [string map {\r\n \n \r \n} $state(body)] } diff --git a/library/http1.0/http.tcl b/library/http1.0/http.tcl index 2c548bb..99efe6b 100644 --- a/library/http1.0/http.tcl +++ b/library/http1.0/http.tcl @@ -5,7 +5,7 @@ # These procedures use a callback interface to avoid using vwait, # which is not defined in the safe base. # -# RCS: @(#) $Id: http.tcl,v 1.4 2000/02/01 11:48:30 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.5 2009/11/18 21:45:38 nijtmans Exp $ # # See the http.n man page for documentation @@ -341,12 +341,12 @@ proc http_formatQuery {args} { # 2 Convert every other character to an array lookup # 3 Escape constructs that are "special" to the tcl parser # 4 "subst" the result, doing all the array substitutions - + proc httpMapReply {string} { global httpFormMap set alphanumeric a-zA-Z0-9 if {![info exists httpFormMap]} { - + for {set i 1} {$i <= 256} {incr i} { set c [format %c $i] if {![string match \[$alphanumeric\] $c]} { @@ -365,7 +365,7 @@ proc http_formatQuery {args} { return [subst $string] } -# Default proxy filter. +# Default proxy filter. proc httpProxyRequired {host} { global http if {[info exists http(-proxyhost)] && [string length $http(-proxyhost)]} { diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index ccf4054..660d435 100644 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -9,8 +9,8 @@ # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: msgcat.tcl,v 1.26 2006/11/03 00:34:52 hobbs Exp $ +# +# RCS: @(#) $Id: msgcat.tcl,v 1.27 2009/11/18 21:45:36 nijtmans Exp $ package require Tcl 8.5 # When the version number changes, be sure to update the pkgIndex.tcl file, @@ -177,7 +177,7 @@ namespace eval msgcat { # args Args to pass to the format command # # Results: -# Returns the translated string. Propagates errors thrown by the +# Returns the translated string. Propagates errors thrown by the # format command. proc msgcat::mc {src args} { @@ -189,7 +189,7 @@ proc msgcat::mc {src args} { variable Locale set ns [uplevel 1 [list ::namespace current]] - + while {$ns != ""} { foreach loc $Loclist { if {[dict exists $Msgs $loc $ns $src]} { @@ -312,12 +312,12 @@ proc msgcat::mcset {locale src {dest ""}} { } set ns [uplevel 1 [list ::namespace current]] - + set locale [string tolower $locale] - + # create nested dictionaries if they do not exist if {![dict exists $Msgs $locale]} { - dict set Msgs $locale [dict create] + dict set Msgs $locale [dict create] } if {![dict exists $Msgs $locale $ns]} { dict set Msgs $locale $ns [dict create] @@ -345,17 +345,17 @@ proc msgcat::mcmset {locale pairs } { return -code error "bad translation list:\ should be \"[lindex [info level 0] 0] locale {src dest ...}\"" } - + set locale [string tolower $locale] set ns [uplevel 1 [list ::namespace current]] # create nested dictionaries if they do not exist if {![dict exists $Msgs $locale]} { - dict set Msgs $locale [dict create] + dict set Msgs $locale [dict create] } if {![dict exists $Msgs $locale $ns]} { dict set Msgs $locale $ns [dict create] - } + } foreach {src dest} $pairs { dict set Msgs $locale $ns $src $dest } @@ -368,7 +368,7 @@ proc msgcat::mcmset {locale pairs } { # This routine is called by msgcat::mc if a translation cannot # be found for a string. This routine is intended to be replaced # by an application specific routine for error reporting -# purposes. The default behavior is to return the source string. +# purposes. The default behavior is to return the source string. # If additional args are specified, the format command will be used # to work them into the traslated string. # @@ -390,7 +390,7 @@ proc msgcat::mcunknown {locale src args} { # msgcat::mcmax -- # -# Calculates the maximum length of the translated strings of the given +# Calculates the maximum length of the translated strings of the given # list. # # Arguments: @@ -475,7 +475,7 @@ proc msgcat::Init {} { } # # On Windows, try to set locale depending on registry settings, - # or fall back on locale of "C". + # or fall back on locale of "C". # set key {HKEY_CURRENT_USER\Control Panel\International} if {[catch {package require registry}] \ diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 4622bde..67f3cc1 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -8,7 +8,7 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.10 2003/09/10 20:27:30 dgp Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.11 2009/11/18 21:45:37 nijtmans Exp $ package require Tcl 8.2 # When this version number changes, update the pkgIndex.tcl file @@ -35,7 +35,7 @@ namespace eval ::tcl { # Every OptProc give usage information on "procname -help". # Try "tcl::OptParseTest -help" and "tcl::OptParseTest -a" and # then other arguments. - # + # # example of 'valid' call: # ::tcl::OptParseTest save -4 -pr 23 -libsok SybTcl\ # -nostatics false ch1 @@ -86,8 +86,8 @@ namespace eval ::tcl { # # The general structure of a "program" is # notation (pseudo bnf like) -# name :== definition defines "name" as being "definition" -# { x y z } means list of x, y, and z +# name :== definition defines "name" as being "definition" +# { x y z } means list of x, y, and z # x* means x repeated 0 or more time # x+ means "x x*" # x? means optionally x @@ -112,7 +112,7 @@ namespace eval ::tcl { # # And for this application: # -# singleStep :== { instruction varname {hasBeenSet currentValue} type +# singleStep :== { instruction varname {hasBeenSet currentValue} type # typeArgs help } # instruction :== "flags" | "value" # type :== knowType | anyword @@ -345,7 +345,7 @@ proc ::tcl::OptProcArgGiven {argname} { proc OptState {item} { lindex $item 0 } - + # current state proc OptCurState {descriptions} { OptState [OptCurDesc $descriptions]; @@ -537,7 +537,7 @@ proc ::tcl::OptKeyParse {descKey arglist} { if {![Lempty $arglist]} { return -code error [OptTooManyArgs $desc $arglist]; } - + # Analyse the result # Walk through the tree: OptTreeVars $desc "#[expr {[info level]-1}]" ; @@ -783,7 +783,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { 3 { # varname type value # varname value comment - + if {[regexp {^-(.+)$} $arg1 x type]} { # flags/optValue as they are optional, need a "value", # on the contrary, for a variable (non optional), @@ -921,7 +921,7 @@ proc ::tcl::OptError {prefix desc {header 0}} { set desc [concat $h $desc] } OptLengths $desc nl tl dl - # actually output + # actually output return "$prefix[OptTree $desc $nl $tl $dl]" } @@ -954,7 +954,7 @@ proc ::tcl::Lget {list indexLst} { # it would be even slower... needs to be written in C !) # (nb: there is a non trivial recursive problem with indexes 0, # which appear because there is no difference between a list -# of 1 element and 1 element alone : [list "a"] == "a" while +# of 1 element and 1 element alone : [list "a"] == "a" while # it should be {a} and [listp a] should be 0 while [listp {a b}] would be 1 # and [listp "a b"] maybe 0. listp does not exist either...) proc ::tcl::Lvarset {listName indexLst newValue} { diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 1a454cd..1e47f5d 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -254,7 +254,7 @@ proc ::platform::patterns {id} { } } macosx*-* { - # 10.5+ + # 10.5+ if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} { if {$v ne ""} { foreach {major minor} [split $v .] break diff --git a/tools/tclZIC.tcl b/tools/tclZIC.tcl index 8355a8a..d66f5e4 100755 --- a/tools/tclZIC.tcl +++ b/tools/tclZIC.tcl @@ -29,7 +29,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclZIC.tcl,v 1.10 2009/04/09 20:07:18 kennykb Exp $ +# RCS: @(#) $Id: tclZIC.tcl,v 1.11 2009/11/18 21:45:36 nijtmans Exp $ # #---------------------------------------------------------------------- @@ -361,7 +361,7 @@ proc parseON {on} { # third possibility - lastWeekday - field 5 last([[:alpha:]]+) )$ - } $on -> dom1 wday2 dir2 num2 wday3]} then { + } $on -> dom1 wday2 dir2 num2 wday3]} { error "can't parse ON field \"$on\"" } if {$dom1 ne ""} { @@ -509,7 +509,7 @@ proc parseTOD {tod} { (?: ([wsugz]) # field 4 - type indicator )? - } $tod -> hour minute second ind]} then { + } $tod -> hour minute second ind]} { puts stderr "$fileName:$lno:can't parse time field \"$tod\"" incr errorCount } @@ -558,7 +558,7 @@ proc parseOffsetTime {offset} { :([[:digit:]]{2}) # field 4 - second )? )? - } $offset -> signum hour minute second]} then { + } $offset -> signum hour minute second]} { puts stderr "$fileName:$lno:can't parse offset time \"$offset\"" incr errorCount } @@ -940,7 +940,7 @@ proc applyRules {ruleSet year startSecs stdGMTOffset DSTOffset nextGMTOffset if { $earliestSecs > $startSecs && ($until eq "" || $earliestSecs < $untilSecs) - } then { + } { # Test if the initial transition has been done. # If not, do it now. @@ -989,7 +989,7 @@ proc applyRules {ruleSet year startSecs stdGMTOffset DSTOffset nextGMTOffset set date [::tcl::clock::GetJulianDayFromEraYearMonthDay \ [dict create era CE year $year month 1 dayOfMonth 1] 2361222] set startSecs [expr { - [dict get $date julianDay] * wide(86400) - 210866803200 + [dict get $date julianDay] * wide(86400) - 210866803200 - $stdGMTOffset - $DSTOffset }] diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 23b0d30..4b669ad 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -392,7 +392,7 @@ proc process-text {text} { {\1\\fI\2\3} ntext] || [regsub {^([^\\]*)\\fR([^\\]*)\\fR(.*)$} $text \ {\1\\fR\2\3} ntext] - } then { + } { manerror "impotent font change: $text" set text $ntext continue @@ -1164,7 +1164,7 @@ proc output-directive {line} { [next-op-is .nf rest] || [next-op-is .br rest] || [next-op-is .fi rest] - } then { + } { continue } if { @@ -1172,7 +1172,7 @@ proc output-directive {line} { || [next-op-is .SS rest] || [next-op-is .BE rest] || [next-op-is .SO rest] - } then { + } { backup-text 1 break } @@ -1432,7 +1432,7 @@ proc output-directive {line} { } ## ## merge copyright listings -## +## proc merge-copyrights {l1 l2} { set merge {} set re1 {^Copyright +(?:\(c\)|\\\(co|©) +(\w.*?)(?:all rights reserved)?(?:\. )*$} @@ -1912,7 +1912,7 @@ proc make-man-pages {html args} { CrtPhImgFmt DoOneEvent GetBitmap GetColor GetCursor GetDash GetJustify GetPixels GetVisual ParseArgv QueueEvent } - } then { + } { foreach item $toc { puts $outfd $item } diff --git a/tools/tsdPerf.c b/tools/tsdPerf.c index a6a84df..9399b3b 100644 --- a/tools/tsdPerf.c +++ b/tools/tsdPerf.c @@ -3,7 +3,7 @@ static Tcl_ThreadDataKey key; typedef struct { - int value; + int value; } TsdPerf; @@ -20,16 +20,16 @@ tsdPerfSetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const if (TCL_OK != Tcl_GetIntFromObj(interp, objv[1], &i)) { return TCL_ERROR; } - + perf->value = i; - + return TCL_OK; } int tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf)); - + Tcl_SetObjResult(interp, Tcl_NewIntObj(perf->value)); return TCL_OK; @@ -41,7 +41,7 @@ Tsdperf_Init (Tcl_Interp *interp) { if (NULL == Tcl_InitStubs(interp, TCL_VERSION, 0)) { return TCL_ERROR; } - + Tcl_CreateObjCommand(interp, "tsdPerfSet", tsdPerfSetObjCmd, (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); -- cgit v0.12 From 22da2964cc80cf1b750e2c467f9b732dc17f682f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 21:59:49 +0000 Subject: Eliminate various gcc warnings (in -Wextra mode) --- ChangeLog | 24 +++++++++++++++++++++++- generic/tclAsync.c | 4 ++-- generic/tclBasic.c | 24 ++++++++++++------------ generic/tclBinary.c | 23 ++++++++++++----------- generic/tclCmdAH.c | 4 ++-- generic/tclCmdIL.c | 52 +++++++++++++++++++++++++-------------------------- generic/tclCmdMZ.c | 50 ++++++++++++++++++++++++------------------------- generic/tclCompile.c | 6 +++--- generic/tclDate.c | 10 +++++----- generic/tclDictObj.c | 42 ++++++++++++++++++++--------------------- generic/tclExecute.c | 20 ++++++++++---------- generic/tclGetDate.y | 12 ++++++------ generic/tclIOCmd.c | 40 +++++++++++++++++++-------------------- generic/tclIOUtil.c | 3 ++- generic/tclIndexObj.c | 10 +++++----- generic/tclOO.c | 6 +++--- generic/tclZlib.c | 6 ++++-- win/tclWinChan.c | 12 ++++++------ win/tclWinConsole.c | 4 ++-- win/tclWinInit.c | 15 ++++++++------- win/tclWinNotify.c | 4 ++-- 21 files changed, 199 insertions(+), 172 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7a3534..06f6f85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,33 @@ 2009-11-18 Jan Nijtmans + * generic/tclAsync.c Eliminate various gcc warnings (in -Wextra mode) + * generic/tclBasic.c + * generic/tclBinary.c + * generic/tclCmdAH.c + * generic/tclCmdIL.c + * generic/tclCmdMZ.c + * generic/tclCompile.c + * generic/tclDate.c + * generic/tclExecute.c + * generic/tclDictObj.c + * generic/tclIndexObj.c + * generic/tclIOCmd.c + * generic/tclIOUtil.c + * generic/tclOO.c + * generic/tclZlib.c + * generic/tclGetDate.y + * win/tclWinInit.c + * win/tclWinChan.c + * win/tclWinConsole.c + * win/tclWinFile.c + * win/tclWinNotify.c + * win/tclWinReg.c * library/auto.tcl Eliminate "then" keyword * library/clock.tcl * library/history.tcl * library/safe.tcl * library/tm.tcl - * library/http/http.tcl Eliminate unneccessary spaces + * library/http/http.tcl Eliminate unnecessary spaces * library/http1.0/http.tcl * library/msgcat/msgcat.tcl * library/opt/optparse.tcl diff --git a/generic/tclAsync.c b/generic/tclAsync.c index 208b2fa..faf012f 100644 --- a/generic/tclAsync.c +++ b/generic/tclAsync.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAsync.c,v 1.18 2009/01/09 11:21:45 dkf Exp $ + * RCS: @(#) $Id: tclAsync.c,v 1.19 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -262,7 +262,7 @@ Tcl_AsyncInvoke( * Failure to locate the handler in current thread private list * of async handlers will result in panic; exception: the list * is already empty (potential trouble?). - * Consequently, threads should create and delete handlers + * Consequently, threads should create and delete handlers * themselves. I.e. a handler created by one should not be * deleted by some other thread. * diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cd7bd25..b0cc7f6 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.409 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.410 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -4075,7 +4075,7 @@ TclNREvalObjv( cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]); TclNRSpliceDeferred(interp); - + iPtr->numLevels++; result = TclInterpReady(interp); @@ -4564,14 +4564,14 @@ TEOV_NotFound( /* * Release any resources we locked and allocated during the handler call. */ - + for (i = 0; i < handlerObjc; ++i) { Tcl_DecrRefCount(newObjv[i]); } TclStackFree(interp, newObjv); return TCL_ERROR; } - + if (lookupNsPtr) { savedNsPtr = varFramePtr->nsPtr; varFramePtr->nsPtr = lookupNsPtr; @@ -4591,9 +4591,9 @@ TEOV_NotFoundCallback( int objc = PTR2INT(data[0]); Tcl_Obj **objv = data[1]; Namespace *savedNsPtr = data[2]; - + int i; - + if (savedNsPtr) { iPtr->varFramePtr->nsPtr = savedNsPtr; } @@ -4608,7 +4608,7 @@ TEOV_NotFoundCallback( TclStackFree(interp, objv); return result; -} +} static int TEOV_RunEnterTraces( @@ -5928,7 +5928,7 @@ TclNREvalObjEx( listPtr = TclListObjCopy(interp, objPtr); Tcl_IncrRefCount(listPtr); TclDecrRefCount(objPtr); - + if (word != INT_MIN) { /* * TIP #280 Structures for tracking lines. As we know that this is @@ -8192,12 +8192,12 @@ TclNRTailcallObjCmd( Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; Tcl_Namespace *ns1Ptr; - + if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); return TCL_ERROR; } - + if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ Tcl_SetResult(interp, @@ -8215,7 +8215,7 @@ TclNRTailcallObjCmd( Tcl_Panic("Tailcall failed to find the proper namespace"); } Tcl_IncrRefCount(nsObjPtr); - + /* * Add two callbacks: first the one to actually evaluate the tailcalled * command, then the one that signals TEBC to stash the first at its @@ -8340,7 +8340,7 @@ static int NRCoroutineExitCallback(ClientData data[], static int NRCoroutineCallerCallback(ClientData data[], Tcl_Interp *interp, int result); -static const CorContext NULL_CONTEXT = {NULL, NULL, NULL}; +static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; #define SAVE_CONTEXT(context) \ (context).framePtr = iPtr->framePtr; \ diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 8a3aeac..c360c8f 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.55 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.56 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -472,6 +472,7 @@ FreeByteArrayInternalRep( Tcl_Obj *objPtr) /* Object with internal rep to free. */ { ckfree((char *) GET_BYTEARRAY(objPtr)); + objPtr->typePtr = NULL; } /* @@ -595,23 +596,23 @@ TclInitBinaryCmd( Tcl_Interp *interp) { const EnsembleImplMap binaryMap[] = { - { "format", BinaryFormatCmd, NULL }, - { "scan", BinaryScanCmd, NULL }, - { "encode", NULL, NULL }, - { "decode", NULL, NULL }, - { NULL, NULL, NULL } + { "format", BinaryFormatCmd, NULL, NULL ,NULL }, + { "scan", BinaryScanCmd, NULL,NULL ,NULL }, + { "encode", NULL, NULL, NULL, NULL }, + { "decode", NULL, NULL, NULL, NULL }, + { NULL, NULL, NULL, NULL, NULL } }; const EnsembleImplMap encodeMap[] = { { "hex", BinaryEncodeHex, NULL, NULL, (ClientData)HexDigits }, { "uuencode", BinaryEncode64, NULL, NULL, (ClientData)UueDigits }, { "base64", BinaryEncode64, NULL, NULL, (ClientData)B64Digits }, - { NULL, NULL, NULL } + { NULL, NULL, NULL, NULL, NULL } }; const EnsembleImplMap decodeMap[] = { - { "hex", BinaryDecodeHex, NULL }, - { "uuencode", BinaryDecodeUu, NULL }, - { "base64", BinaryDecode64, NULL }, - { NULL, NULL, NULL } + { "hex", BinaryDecodeHex, NULL, NULL, NULL }, + { "uuencode", BinaryDecodeUu, NULL, NULL, NULL }, + { "base64", BinaryDecode64, NULL, NULL, NULL }, + { NULL, NULL, NULL, NULL, NULL } }; Tcl_Command binaryEnsemble; diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 9a0c677..95e6fd8 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.121 2009/08/19 14:32:12 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.122 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -322,7 +322,7 @@ CatchObjCmdCallback( result = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); - } + } /* diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 39afc83..e84703b 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.173 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.174 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -157,30 +157,30 @@ static Tcl_Obj * SelectObjFromSublist(Tcl_Obj *firstPtr, */ static const EnsembleImplMap defaultInfoMap[] = { - {"args", InfoArgsCmd, NULL}, - {"body", InfoBodyCmd, NULL}, - {"cmdcount", InfoCmdCountCmd, NULL}, - {"commands", InfoCommandsCmd, NULL}, - {"complete", InfoCompleteCmd, NULL}, - {"coroutine", TclInfoCoroutineCmd, NULL}, - {"default", InfoDefaultCmd, NULL}, - {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd}, - {"frame", InfoFrameCmd, NULL}, - {"functions", InfoFunctionsCmd, NULL}, - {"globals", TclInfoGlobalsCmd, NULL}, - {"hostname", InfoHostnameCmd, NULL}, - {"level", InfoLevelCmd, NULL}, - {"library", InfoLibraryCmd, NULL}, - {"loaded", InfoLoadedCmd, NULL}, - {"locals", TclInfoLocalsCmd, NULL}, - {"nameofexecutable", InfoNameOfExecutableCmd, NULL}, - {"patchlevel", InfoPatchLevelCmd, NULL}, - {"procs", InfoProcsCmd, NULL}, - {"script", InfoScriptCmd, NULL}, - {"sharedlibextension", InfoSharedlibCmd, NULL}, - {"tclversion", InfoTclVersionCmd, NULL}, - {"vars", TclInfoVarsCmd, NULL}, - {NULL, NULL, NULL} + {"args", InfoArgsCmd, NULL, NULL, NULL}, + {"body", InfoBodyCmd, NULL, NULL, NULL}, + {"cmdcount", InfoCmdCountCmd, NULL, NULL, NULL}, + {"commands", InfoCommandsCmd, NULL, NULL, NULL}, + {"complete", InfoCompleteCmd, NULL, NULL, NULL}, + {"coroutine", TclInfoCoroutineCmd, NULL, NULL, NULL}, + {"default", InfoDefaultCmd, NULL, NULL, NULL}, + {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd, NULL, NULL}, + {"frame", InfoFrameCmd, NULL, NULL, NULL}, + {"functions", InfoFunctionsCmd, NULL, NULL, NULL}, + {"globals", TclInfoGlobalsCmd, NULL, NULL, NULL}, + {"hostname", InfoHostnameCmd, NULL, NULL, NULL}, + {"level", InfoLevelCmd, NULL, NULL, NULL}, + {"library", InfoLibraryCmd, NULL, NULL, NULL}, + {"loaded", InfoLoadedCmd, NULL, NULL, NULL}, + {"locals", TclInfoLocalsCmd, NULL, NULL, NULL}, + {"nameofexecutable", InfoNameOfExecutableCmd, NULL, NULL, NULL}, + {"patchlevel", InfoPatchLevelCmd, NULL, NULL, NULL}, + {"procs", InfoProcsCmd, NULL, NULL, NULL}, + {"script", InfoScriptCmd, NULL, NULL, NULL}, + {"sharedlibextension", InfoSharedlibCmd, NULL, NULL, NULL}, + {"tclversion", InfoTclVersionCmd, NULL, NULL, NULL}, + {"vars", TclInfoVarsCmd, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL} }; /* @@ -430,7 +430,7 @@ Tcl_IncrObjCmd( * documentation for details on what it does. * * Results: - * FIXME + * Handle for the info command, or NULL on failure. * * Side effects: * none diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 9aed082..427bf68 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.195 2009/09/28 18:02:20 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.196 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -3326,29 +3326,29 @@ TclInitStringCmd( Tcl_Interp *interp) /* Current interpreter. */ { static const EnsembleImplMap stringImplMap[] = { - {"bytelength", StringBytesCmd, NULL}, - {"compare", StringCmpCmd, TclCompileStringCmpCmd}, - {"equal", StringEqualCmd, TclCompileStringEqualCmd}, - {"first", StringFirstCmd, NULL}, - {"index", StringIndexCmd, TclCompileStringIndexCmd}, - {"is", StringIsCmd, NULL}, - {"last", StringLastCmd, NULL}, - {"length", StringLenCmd, TclCompileStringLenCmd}, - {"map", StringMapCmd, NULL}, - {"match", StringMatchCmd, TclCompileStringMatchCmd}, - {"range", StringRangeCmd, NULL}, - {"repeat", StringReptCmd, NULL}, - {"replace", StringRplcCmd, NULL}, - {"reverse", StringRevCmd, NULL}, - {"tolower", StringLowerCmd, NULL}, - {"toupper", StringUpperCmd, NULL}, - {"totitle", StringTitleCmd, NULL}, - {"trim", StringTrimCmd, NULL}, - {"trimleft", StringTrimLCmd, NULL}, - {"trimright", StringTrimRCmd, NULL}, - {"wordend", StringEndCmd, NULL}, - {"wordstart", StringStartCmd, NULL}, - {NULL} + {"bytelength", StringBytesCmd, NULL, NULL, NULL}, + {"compare", StringCmpCmd, TclCompileStringCmpCmd, NULL, NULL}, + {"equal", StringEqualCmd, TclCompileStringEqualCmd, NULL, NULL}, + {"first", StringFirstCmd, NULL, NULL, NULL}, + {"index", StringIndexCmd, TclCompileStringIndexCmd, NULL, NULL}, + {"is", StringIsCmd, NULL, NULL, NULL}, + {"last", StringLastCmd, NULL, NULL, NULL}, + {"length", StringLenCmd, TclCompileStringLenCmd, NULL, NULL}, + {"map", StringMapCmd, NULL, NULL, NULL}, + {"match", StringMatchCmd, TclCompileStringMatchCmd, NULL, NULL}, + {"range", StringRangeCmd, NULL, NULL, NULL}, + {"repeat", StringReptCmd, NULL, NULL, NULL}, + {"replace", StringRplcCmd, NULL, NULL, NULL}, + {"reverse", StringRevCmd, NULL, NULL, NULL}, + {"tolower", StringLowerCmd, NULL, NULL, NULL}, + {"toupper", StringUpperCmd, NULL, NULL, NULL}, + {"totitle", StringTitleCmd, NULL, NULL, NULL}, + {"trim", StringTrimCmd, NULL, NULL, NULL}, + {"trimleft", StringTrimLCmd, NULL, NULL, NULL}, + {"trimright", StringTrimRCmd, NULL, NULL, NULL}, + {"wordend", StringEndCmd, NULL, NULL, NULL}, + {"wordstart", StringStartCmd, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL} }; return TclMakeEnsemble(interp, "string", stringImplMap); @@ -3469,7 +3469,7 @@ Tcl_SwitchObjCmd( { return Tcl_NRCallObjProc(interp, TclNRSwitchObjCmd, dummy, objc, objv); } -int +int TclNRSwitchObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ diff --git a/generic/tclCompile.c b/generic/tclCompile.c index ed4e8f0..57e3a9d 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.178 2009/09/24 17:19:18 dgp Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.179 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -406,7 +406,7 @@ InstructionDesc const tclInstructionTable[] = { * ERROR: +1; RETURN: +3; BREAK: +5; CONTINUE: +7; * Other non-OK: +9 */ - {0} + {NULL, 0, 0, 0, {OPERAND_NONE}} }; /* @@ -1475,7 +1475,7 @@ TclCompileScript( /* * TIP #280: We have to count newlines before the command even * in the degenerate case when the command has no words. (See - * test info-30.33). So make that counting here, and not in + * test info-30.33). So make that counting here, and not in * the (numWords > 0) branch below. */ TclAdvanceLines(&cmdLine, p, parsePtr->commandStart); diff --git a/generic/tclDate.c b/generic/tclDate.c index 7f67156..5d4a507 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2325,7 +2325,7 @@ static TABLE MonthDayTable[] = { { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -2343,7 +2343,7 @@ static TABLE UnitsTable[] = { { "min", tSEC_UNIT, 60 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -2375,7 +2375,7 @@ static TABLE OtherTable[] = { { "ago", tAGO, 1 }, { "epoch", tEPOCH, 0 }, { "stardate", tSTARDATE, 0 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -2461,7 +2461,7 @@ static TABLE TimezoneTable[] = { /* ADDED BY Marco Nijdam */ { "dst", tDST, HOUR( 0) }, /* DST on (hour is ignored) */ /* End ADDED */ - { NULL } + { NULL, 0, 0 } }; /* @@ -2494,7 +2494,7 @@ static TABLE MilitaryTable[] = { { "x", tZONE, HOUR( 11) }, { "y", tZONE, HOUR( 12) }, { "z", tZONE, HOUR( 0) }, - { NULL } + { NULL, 0, 0 } }; /* diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 32a5cb0..dab4418 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.79 2009/10/08 14:37:36 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.80 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -87,26 +87,26 @@ static int DictForLoopCallback(ClientData data[], */ static const EnsembleImplMap implementationMap[] = { - {"append", DictAppendCmd, TclCompileDictAppendCmd }, - {"create", DictCreateCmd }, - {"exists", DictExistsCmd }, - {"filter", DictFilterCmd }, - {"for", NULL, TclCompileDictForCmd, DictForNRCmd }, - {"get", DictGetCmd, TclCompileDictGetCmd }, - {"incr", DictIncrCmd, TclCompileDictIncrCmd }, - {"info", DictInfoCmd }, - {"keys", DictKeysCmd }, - {"lappend", DictLappendCmd, TclCompileDictLappendCmd }, - {"merge", DictMergeCmd }, - {"remove", DictRemoveCmd }, - {"replace", DictReplaceCmd }, - {"set", DictSetCmd, TclCompileDictSetCmd }, - {"size", DictSizeCmd }, - {"unset", DictUnsetCmd }, - {"update", DictUpdateCmd, TclCompileDictUpdateCmd }, - {"values", DictValuesCmd }, - {"with", DictWithCmd }, - {NULL} + {"append", DictAppendCmd, TclCompileDictAppendCmd, NULL, NULL }, + {"create", DictCreateCmd, NULL, NULL, NULL }, + {"exists", DictExistsCmd, NULL, NULL, NULL }, + {"filter", DictFilterCmd, NULL, NULL, NULL }, + {"for", NULL, TclCompileDictForCmd, DictForNRCmd, NULL }, + {"get", DictGetCmd, TclCompileDictGetCmd, NULL, NULL }, + {"incr", DictIncrCmd, TclCompileDictIncrCmd, NULL, NULL }, + {"info", DictInfoCmd, NULL, NULL, NULL }, + {"keys", DictKeysCmd, NULL, NULL, NULL }, + {"lappend", DictLappendCmd, TclCompileDictLappendCmd, NULL, NULL }, + {"merge", DictMergeCmd, NULL, NULL, NULL }, + {"remove", DictRemoveCmd, NULL, NULL, NULL }, + {"replace", DictReplaceCmd, NULL, NULL, NULL }, + {"set", DictSetCmd, TclCompileDictSetCmd, NULL, NULL }, + {"size", DictSizeCmd, NULL, NULL, NULL }, + {"unset", DictUnsetCmd, NULL, NULL, NULL }, + {"update", DictUpdateCmd, TclCompileDictUpdateCmd, NULL, NULL }, + {"values", DictValuesCmd, NULL, NULL, NULL }, + {"with", DictWithCmd, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL} }; /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 587dd3e..404696c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.447 2009/09/30 03:11:25 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.448 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -160,7 +160,7 @@ static BuiltinFunc const tclBuiltinFuncTable[] = { {"round", 1}, {"srand", 1}, {"wide", 1}, - {0}, + {NULL, 0}, }; #define LAST_BUILTIN_FUNC 25 @@ -774,7 +774,7 @@ TclCreateExecEnv( Tcl_Interp *interp, /* Interpreter for which the execution * environment is being created. */ int size) /* the initial stack size, in number of words - * [sizeof(Tcl_Obj*)] */ + * [sizeof(Tcl_Obj*)] */ { ExecEnv *eePtr = (ExecEnv *) ckalloc(sizeof(ExecEnv)); ExecStack *esPtr = (ExecStack *) ckalloc(sizeof(ExecStack) @@ -1622,7 +1622,7 @@ TclCompileObj( int redo = 0; if (invoker) { - CmdFrame *ctxPtr = (CmdFrame *) + CmdFrame *ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); *ctxPtr = *invoker; @@ -1653,7 +1653,7 @@ TclCompileObj( * test info-32.0 using literal of info-24.8 * (dict with ... vs set body ...). */ - redo = + redo = ((eclPtr->type == TCL_LOCATION_SOURCE) && (eclPtr->start != ctxPtr->line[word])) || ((eclPtr->type == TCL_LOCATION_BC) && @@ -2132,7 +2132,7 @@ TclExecuteByteCode( } goto abnormalReturn; } - + if (iPtr->execEnvPtr->rewind) { result = TCL_ERROR; goto abnormalReturn; @@ -2555,7 +2555,7 @@ TclExecuteByteCode( */ if (onlyb) { - for (currPtr = &OBJ_AT_DEPTH(opnd-2); + for (currPtr = &OBJ_AT_DEPTH(opnd-2); appendLen >= 0 && currPtr <= &OBJ_AT_TOS; currPtr++) { if ((*currPtr)->bytes != tclEmptyStringRep) { Tcl_GetByteArrayFromObj(*currPtr, &length); @@ -7935,16 +7935,16 @@ TclExecuteByteCode( /* * Winding down: insure that all pending cleanups are done before - * dropping out of this bytecode. + * dropping out of this bytecode. */ if (TOP_CB(interp) != bottomPtr->rootPtr) { result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); - + if (TOP_CB(interp) != bottomPtr->rootPtr) { Tcl_Panic("Abnormal return with busy callback stack"); } } - + /* * Clear all expansions and same-level NR calls. * diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 8014b73..922b931 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.42 2009/07/22 12:00:42 nijtmans Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.43 2009/11/18 21:59:50 nijtmans Exp $ */ %parse-param {DateInfo* info} @@ -537,7 +537,7 @@ static TABLE MonthDayTable[] = { { "thurs", tDAY, 4 }, { "friday", tDAY, 5 }, { "saturday", tDAY, 6 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -555,7 +555,7 @@ static TABLE UnitsTable[] = { { "min", tSEC_UNIT, 60 }, { "second", tSEC_UNIT, 1 }, { "sec", tSEC_UNIT, 1 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -587,7 +587,7 @@ static TABLE OtherTable[] = { { "ago", tAGO, 1 }, { "epoch", tEPOCH, 0 }, { "stardate", tSTARDATE, 0 }, - { NULL } + { NULL, 0, 0 } }; /* @@ -673,7 +673,7 @@ static TABLE TimezoneTable[] = { /* ADDED BY Marco Nijdam */ { "dst", tDST, HOUR( 0) }, /* DST on (hour is ignored) */ /* End ADDED */ - { NULL } + { NULL, 0, 0 } }; /* @@ -706,7 +706,7 @@ static TABLE MilitaryTable[] = { { "x", tZONE, HOUR( 11) }, { "y", tZONE, HOUR( 12) }, { "z", tZONE, HOUR( 0) }, - { NULL } + { NULL, 0, 0 } }; /* diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 13a6853..36ac04b 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.64 2009/04/27 09:41:49 nijtmans Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.65 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -1922,25 +1922,25 @@ TclInitChanCmd( * function at the moment. */ static const EnsembleImplMap initMap[] = { - {"blocked", Tcl_FblockedObjCmd}, - {"close", Tcl_CloseObjCmd}, - {"copy", Tcl_FcopyObjCmd}, - {"create", TclChanCreateObjCmd}, /* TIP #219 */ - {"eof", Tcl_EofObjCmd}, - {"event", Tcl_FileEventObjCmd}, - {"flush", Tcl_FlushObjCmd}, - {"gets", Tcl_GetsObjCmd}, - {"pending", ChanPendingObjCmd}, /* TIP #287 */ - {"pop", TclChanPopObjCmd}, /* TIP #230 */ - {"postevent", TclChanPostEventObjCmd}, /* TIP #219 */ - {"push", TclChanPushObjCmd}, /* TIP #230 */ - {"puts", Tcl_PutsObjCmd}, - {"read", Tcl_ReadObjCmd}, - {"seek", Tcl_SeekObjCmd}, - {"pipe", ChanPipeObjCmd}, /* TIP #304 */ - {"tell", Tcl_TellObjCmd}, - {"truncate", ChanTruncateObjCmd}, /* TIP #208 */ - {NULL} + {"blocked", Tcl_FblockedObjCmd, NULL, NULL, NULL}, + {"close", Tcl_CloseObjCmd, NULL, NULL, NULL}, + {"copy", Tcl_FcopyObjCmd, NULL, NULL, NULL}, + {"create", TclChanCreateObjCmd, NULL, NULL, NULL}, /* TIP #219 */ + {"eof", Tcl_EofObjCmd, NULL, NULL, NULL}, + {"event", Tcl_FileEventObjCmd, NULL, NULL, NULL}, + {"flush", Tcl_FlushObjCmd, NULL, NULL, NULL}, + {"gets", Tcl_GetsObjCmd, NULL, NULL, NULL}, + {"pending", ChanPendingObjCmd, NULL, NULL, NULL}, /* TIP #287 */ + {"pop", TclChanPopObjCmd, NULL, NULL, NULL}, /* TIP #230 */ + {"postevent", TclChanPostEventObjCmd, NULL, NULL, NULL}, /* TIP #219 */ + {"push", TclChanPushObjCmd, NULL, NULL, NULL}, /* TIP #230 */ + {"puts", Tcl_PutsObjCmd, NULL, NULL, NULL}, + {"read", Tcl_ReadObjCmd, NULL, NULL, NULL}, + {"seek", Tcl_SeekObjCmd, NULL, NULL, NULL}, + {"pipe", ChanPipeObjCmd, NULL, NULL, NULL}, /* TIP #304 */ + {"tell", Tcl_TellObjCmd, NULL, NULL, NULL}, + {"truncate", ChanTruncateObjCmd, NULL, NULL, NULL}, /* TIP #208 */ + {NULL, NULL, NULL, NULL, NULL} }; static const char *const extras[] = { "configure", "::fconfigure", diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index f77e737..79769c9 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.164 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.165 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -160,6 +160,7 @@ static FilesystemRecord nativeFilesystemRecord = { NULL, &tclNativeFilesystem, 1, + NULL, NULL }; diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 7125891..67c420f 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.52 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.53 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclInt.h" @@ -524,10 +524,10 @@ TclInitPrefixCmd( Tcl_Interp *interp) /* Current interpreter. */ { static const EnsembleImplMap prefixImplMap[] = { - {"all", PrefixAllObjCmd}, - {"longest", PrefixLongestObjCmd}, - {"match", PrefixMatchObjCmd}, - {NULL} + {"all", PrefixAllObjCmd, NULL, NULL, NULL}, + {"longest", PrefixLongestObjCmd, NULL, NULL, NULL}, + {"match", PrefixMatchObjCmd, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL} }; Tcl_Command prefixCmd; diff --git a/generic/tclOO.c b/generic/tclOO.c index 4233020..a4e8cce 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.24 2009/07/19 11:46:53 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.25 2009/11/18 21:59:51 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -121,12 +121,12 @@ static const DeclaredClassMethod objMethods[] = { DCM("unknown", 0, TclOO_Object_Unknown), DCM("variable", 0, TclOO_Object_LinkVar), DCM("varname", 0, TclOO_Object_VarName), - {NULL} + {NULL, 0, {0, NULL, NULL, NULL, NULL}} }, clsMethods[] = { DCM("create", 1, TclOO_Class_Create), DCM("new", 1, TclOO_Class_New), DCM("createWithNamespace", 0, TclOO_Class_CreateNs), - {NULL} + {NULL, 0, {0, NULL, NULL, NULL, NULL}} }; static char initScript[] = diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 7f5ff7b..2ae12c0 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.31 2009/10/29 08:08:33 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.32 2009/11/18 21:59:51 nijtmans Exp $ */ #include "tclInt.h" @@ -189,7 +189,9 @@ static const Tcl_ChannelType zlibChannelType = { ZlibTransformBlockMode, NULL, /* flushProc */ ZlibTransformHandler, - NULL /* wideSeekProc */ + NULL, /* wideSeekProc */ + NULL, + NULL }; /* diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 6079887..0511ca2 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.53 2008/10/26 18:43:26 dkf Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.54 2009/11/18 21:59:49 nijtmans Exp $ */ #include "tclWinInt.h" @@ -491,7 +491,7 @@ FileSeekProc( oldPosHigh = 0; oldPos = SetFilePointer(infoPtr->handle, 0, &oldPosHigh, FILE_CURRENT); - if (oldPos == INVALID_SET_FILE_POINTER) { + if (oldPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { @@ -503,7 +503,7 @@ FileSeekProc( newPosHigh = (offset < 0 ? -1 : 0); newPos = SetFilePointer(infoPtr->handle, offset, &newPosHigh, moveMethod); - if (newPos == INVALID_SET_FILE_POINTER) { + if (newPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { @@ -566,7 +566,7 @@ FileWideSeekProc( newPosHigh = Tcl_WideAsLong(offset >> 32); newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(offset), &newPosHigh, moveMethod); - if (newPos == INVALID_SET_FILE_POINTER) { + if (newPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { @@ -608,7 +608,7 @@ FileTruncateProc( oldPosHigh = 0; oldPos = SetFilePointer(infoPtr->handle, 0, &oldPosHigh, FILE_CURRENT); - if (oldPos == INVALID_SET_FILE_POINTER) { + if (oldPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { TclWinConvertError(winError); @@ -623,7 +623,7 @@ FileTruncateProc( newPosHigh = Tcl_WideAsLong(length >> 32); newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(length), &newPosHigh, FILE_BEGIN); - if (newPos == INVALID_SET_FILE_POINTER) { + if (newPos == (LONG)INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); if (winError != NO_ERROR) { TclWinConvertError(winError); diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index d88b285..880841a 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinConsole.c,v 1.20 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinConsole.c,v 1.21 2009/11/18 21:59:49 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1187,7 +1187,7 @@ ConsoleReaderThread( DWORD err; err = GetLastError(); - if (err == EOF) { + if (err == (DWORD)EOF) { infoPtr->readFlags = CONSOLE_EOF; } } diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 8043971..7e33234 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.83 2009/08/02 10:41:09 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.84 2009/11/18 21:59:50 nijtmans Exp $ */ #include "tclWinInt.h" @@ -472,8 +472,10 @@ TclpSetVariables( { const char *ptr; char buffer[TCL_INTEGER_SPACE * 2]; - SYSTEM_INFO sysInfo, *sysInfoPtr = &sysInfo; - OemId *oemId; + union { + SYSTEM_INFO info; + OemId oemId; + } sys; OSVERSIONINFOA osInfo; Tcl_DString ds; WCHAR szUserName[UNLEN+1]; @@ -485,8 +487,7 @@ TclpSetVariables( osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA); GetVersionExA(&osInfo); - oemId = (OemId *) sysInfoPtr; - GetSystemInfo(&sysInfo); + GetSystemInfo(&sys.info); /* * Define the tcl_platform array. @@ -500,9 +501,9 @@ TclpSetVariables( } wsprintfA(buffer, "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion); Tcl_SetVar2(interp, "tcl_platform", "osVersion", buffer, TCL_GLOBAL_ONLY); - if (oemId->wProcessorArchitecture < NUMPROCESSORS) { + if (sys.oemId.wProcessorArchitecture < NUMPROCESSORS) { Tcl_SetVar2(interp, "tcl_platform", "machine", - processors[oemId->wProcessorArchitecture], + processors[sys.oemId.wProcessorArchitecture], TCL_GLOBAL_ONLY); } diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 47ad88f..9e0db15 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.25 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.26 2009/11/18 21:59:49 nijtmans Exp $ */ #include "tclInt.h" @@ -507,7 +507,7 @@ Tcl_WaitForEvent( PostQuitMessage((int) msg.wParam); status = -1; - } else if (result == -1) { + } else if (result == (DWORD)-1) { /* * We got an error from the system. I have no idea why this * would happen, so we'll just unwind. -- cgit v0.12 From ea0295332cb0b7c680cc7c47a2e9676a02b04b16 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 22:02:58 +0000 Subject: Eliminate various gcc warnings (in -Wextra mode) --- ChangeLog | 1 - win/tclWinReg.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06f6f85..4a68004 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,7 +19,6 @@ * win/tclWinInit.c * win/tclWinChan.c * win/tclWinConsole.c - * win/tclWinFile.c * win/tclWinNotify.c * win/tclWinReg.c * library/auto.tcl Eliminate "then" keyword diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 849e9a9..e6d5b7a 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.46 2009/08/16 10:20:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.47 2009/11/18 22:02:58 nijtmans Exp $ */ #include "tclInt.h" @@ -742,7 +742,7 @@ GetType( * know about the type, just use the numeric value. */ - if (type > lastType || type < 0) { + if (type > lastType) { Tcl_SetObjResult(interp, Tcl_NewIntObj((int) type)); } else { Tcl_SetObjResult(interp, Tcl_NewStringObj(typeNames[type], -1)); @@ -1602,7 +1602,7 @@ ConvertDWORD( */ localType = (*((char*) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; - return (type != localType) ? SWAPLONG(value) : value; + return (type != localType) ? (DWORD)SWAPLONG(value) : value; } /* -- cgit v0.12 From a9191c772b1a15d5f705b2d4fa807388370ac0f8 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 22:21:06 +0000 Subject: Eliminate unneccessary spaces --- ChangeLog | 1 + generic/tclIORTrans.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a68004..385c1a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ * generic/tclIndexObj.c * generic/tclIOCmd.c * generic/tclIOUtil.c + * generic/tclIORTrans.c * generic/tclOO.c * generic/tclZlib.c * generic/tclGetDate.y diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index cb91829..e22b356 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.9 2009/09/01 17:31:53 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.10 2009/11/18 22:21:06 nijtmans Exp $ */ #include @@ -1517,7 +1517,7 @@ ReflectSetOption( * level is not involved there is no need for thread forwarding. */ - Tcl_DriverSetOptionProc *setOptionProc = + Tcl_DriverSetOptionProc *setOptionProc = Tcl_ChannelSetOptionProc(Tcl_GetChannelType(rtPtr->parent)); if (setOptionProc == NULL) { @@ -1563,7 +1563,7 @@ ReflectGetOption( * specific option has to fail. */ - Tcl_DriverGetOptionProc *getOptionProc = + Tcl_DriverGetOptionProc *getOptionProc = Tcl_ChannelGetOptionProc(Tcl_GetChannelType(rtPtr->parent)); if (getOptionProc != NULL) { @@ -1751,7 +1751,7 @@ NewReflectedTransform( rtPtr->timer = NULL; rtPtr->mode = 0; rtPtr->readIsDrained = 0; - rtPtr->nonblocking = + rtPtr->nonblocking = (((Channel *) parentChan)->state->flags & CHANNEL_NONBLOCKING); /* -- cgit v0.12 From b57c08b7e2ccf91e1096b30f2170d2f603f59e0c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 22:41:41 +0000 Subject: Fix [Bug 2849797]: channel name inconsistencies as suggested by DKF minor *** POTENTIAL INCOMPATIBILITY *** because Tcl_CreateChannel() and its derivatives, now sometimes ignore their "chanName" argument. --- ChangeLog | 8 ++++++++ doc/CrtChannel.3 | 6 ++++-- generic/tclIO.c | 16 +++++++++++----- generic/tclIORChan.c | 4 ++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 385c1a7..14d612b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-11-18 Jan Nijtmans + * doc/CrtChannel.3 Fix [Bug 2849797]: channel name inconsistencies + * generic/tclIORChan.c as suggested by DKF + * generic/tclIO.c minor *** POTENTIAL INCOMPATIBILITY *** because + Tcl_CreateChannel() and its derivatives, now + sometimes ignore their "chanName" argument. + +2009-11-18 Jan Nijtmans + * generic/tclAsync.c Eliminate various gcc warnings (in -Wextra mode) * generic/tclBasic.c * generic/tclBinary.c diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index c5773a1..7b1c6d7 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChannel.3,v 1.43 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: CrtChannel.3,v 1.44 2009/11/18 22:41:41 nijtmans Exp $ .so man.macros .TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -127,7 +127,9 @@ can be called to perform I/O and other functions on the channel. .AP "const char" *channelName in The name of this channel, such as \fBfile3\fR; must not be in use by any other channel. Can be NULL, in which case the channel is -created without a name. +created without a name. If the create channel is assigned to one +of the standard channels (stdin, stdout or stderr), the assigned +channel name will be the name of the standard channel. .AP ClientData instanceData in Arbitrary one-word value to be associated with this channel. This value is passed to procedures in \fItypePtr\fR when they are invoked. diff --git a/generic/tclIO.c b/generic/tclIO.c index e8d231a..7044381 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.167 2009/11/12 17:25:18 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.168 2009/11/18 22:41:41 nijtmans Exp $ */ #include "tclInt.h" @@ -1332,6 +1332,7 @@ Tcl_CreateChannel( ChannelState *statePtr; /* The stack-level independent state info for * the channel. */ const char *name; + char *tmp; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); /* @@ -1364,14 +1365,16 @@ Tcl_CreateChannel( */ if (chanName != NULL) { - char *tmp = ckalloc((unsigned) (strlen(chanName) + 1)); + unsigned len = strlen(chanName) + 1; + /* make sure we allocate at least 7 bytes, so it fits for "stdout" later */ + tmp = ckalloc((len < 7) ? 7 : len); - statePtr->channelName = tmp; strcpy(tmp, chanName); } else { - Tcl_Panic("Tcl_CreateChannel: NULL channel name"); + tmp = ckalloc(7); + tmp[0] = '\0'; } - + statePtr->channelName = tmp; statePtr->flags = mask; /* @@ -1473,14 +1476,17 @@ Tcl_CreateChannel( */ if ((tsdPtr->stdinChannel == NULL) && (tsdPtr->stdinInitialized == 1)) { + strcpy(tmp, "stdin"); Tcl_SetStdChannel((Tcl_Channel) chanPtr, TCL_STDIN); Tcl_RegisterChannel(NULL, (Tcl_Channel) chanPtr); } else if ((tsdPtr->stdoutChannel == NULL) && (tsdPtr->stdoutInitialized == 1)) { + strcpy(tmp, "stdout"); Tcl_SetStdChannel((Tcl_Channel) chanPtr, TCL_STDOUT); Tcl_RegisterChannel(NULL, (Tcl_Channel) chanPtr); } else if ((tsdPtr->stderrChannel == NULL) && (tsdPtr->stderrInitialized == 1)) { + strcpy(tmp, "stderr"); Tcl_SetStdChannel((Tcl_Channel) chanPtr, TCL_STDERR); Tcl_RegisterChannel(NULL, (Tcl_Channel) chanPtr); } diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 15e41d8..f2f8e1d 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.41 2009/10/07 17:07:07 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.42 2009/11/18 22:41:41 nijtmans Exp $ */ #include @@ -735,7 +735,7 @@ TclChanCreateObjCmd( * Return handle as result of command. */ - Tcl_SetObjResult(interp, rcId); + Tcl_SetResult(interp, chanPtr->state->channelName, TCL_VOLATILE); return TCL_OK; error: -- cgit v0.12 From 5eff1a7b7ac12342c892b0c4e3f867dededec5cf Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 23:46:05 +0000 Subject: Fix [Bug 2883850]: pkgIndex.tcl doesn't get created with static Tcl build --- ChangeLog | 19 +++++++++++++ generic/tclInt.h | 18 +++++++++++- generic/tclTest.c | 66 ++++++++++++++++++++++++++++++++++++-------- generic/tclTestObj.c | 7 +++-- generic/tclTestProcBodyObj.c | 17 +++++++----- generic/tclThreadTest.c | 16 +++++++---- unix/Makefile.in | 10 +++---- unix/tclAppInit.c | 15 ++-------- unix/tclUnixTest.c | 6 ++-- unix/tclXtNotify.c | 5 +++- unix/tclXtTest.c | 21 ++++++++++++-- win/Makefile.in | 19 +++++++------ win/configure | 20 ++++++-------- win/tcl.m4 | 20 ++++++-------- win/tclWinDde.c | 7 +++-- win/tclWinReg.c | 5 +++- win/tclWinTest.c | 8 ++++-- 17 files changed, 190 insertions(+), 89 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14d612b..f9ff53d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2009-11-19 Jan Nijtmans + + * generic/tclInt.h Make all internal initialization + * generic/tclTest.c routines MODULE_SCOPE + * generic/tclTestObj.c + * generic/tclTestProcBodyObj.c + * generic/tclThreadTest.c + * unix/Makefile.in Fix [Bug 2883850]: pkgIndex.tcl doesn't + * unix/tclAppInit.c get created with static Tcl build + * unix/tclXtTest.c + * unix/tclXtNotify.c + * unix/tclUnixTest.c + * win/Makefile.in + * win/tcl.m4 + * win/configure (regenerated) + * win/tclWinDde.c Always compile with Stubs. + * win/tclWinReg.c + * win/tclWinTest.c + 2009-11-18 Jan Nijtmans * doc/CrtChannel.3 Fix [Bug 2849797]: channel name inconsistencies diff --git a/generic/tclInt.h b/generic/tclInt.h index eefe5f6..d02df6b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.447 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.448 2009/11/18 23:46:05 nijtmans Exp $ */ #ifndef _TCLINT @@ -4026,6 +4026,22 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, Tcl_WideUInt initVal); /* + *---------------------------------------------------------------------- + * + * External (platform specific) initialization routine, these declarations + * explicitly don't use EXTERN since this code does not get compiled into the + * library: + * + *---------------------------------------------------------------------- + */ + +MODULE_SCOPE int TclplatformtestInit(Tcl_Interp *interp); +MODULE_SCOPE int TclObjTest_Init(Tcl_Interp *interp); +MODULE_SCOPE int TclThread_Init(Tcl_Interp *interp); +MODULE_SCOPE int Procbodytest_Init(Tcl_Interp *interp); +MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); + +/* *---------------------------------------------------------------- * Macro used by the Tcl core to check whether a pattern has any characters * special to [string match]. The ANSI C "prototype" for this macro is: diff --git a/generic/tclTest.c b/generic/tclTest.c index b089065..ca0d507 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,9 +14,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.138 2009/11/16 18:01:49 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.139 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #define TCL_TEST #include "tclInt.h" @@ -40,6 +43,17 @@ */ /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Tcltest_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 +EXTERN int Tcltest_Init(Tcl_Interp *interp); +EXTERN int Tcltest_SafeInit(Tcl_Interp *interp); + +/* * Dynamic string shared by TestdcallCmd and DelCallbackProc; used to collect * the results of the various deletion callbacks. */ @@ -494,15 +508,6 @@ static const Tcl_Filesystem simpleFilesystem = { /* - * External (platform specific) initialization routine, these declarations - * explicitly don't use EXTERN since this code does not get compiled into the - * library: - */ - -extern int TclplatformtestInit(Tcl_Interp *interp); -extern int TclThread_Init(Tcl_Interp *interp); - -/* *---------------------------------------------------------------------- * * Tcltest_Init -- @@ -535,6 +540,9 @@ Tcltest_Init( "-appinitprocclosestderr", "-appinitprocsetrcfile", NULL }; + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + return TCL_ERROR; + } /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvide(interp, "Tcltest", TCL_PATCH_LEVEL) == TCL_ERROR) { @@ -672,7 +680,12 @@ Tcltest_Init( Tcl_CreateObjCommand(interp, "testnrelevels", TestNRELevels, (ClientData) NULL, NULL); - + if (TclObjTest_Init(interp) != TCL_OK) { + return TCL_ERROR; + } + if (Procbodytest_Init(interp) != TCL_OK) { + return TCL_ERROR; + } #ifdef TCL_THREADS if (TclThread_Init(interp) != TCL_OK) { return TCL_ERROR; @@ -718,6 +731,35 @@ Tcltest_Init( return TclplatformtestInit(interp); } + +/* + *---------------------------------------------------------------------- + * + * Tcltest_SafeInit -- + * + * This procedure performs application-specific initialization. Most + * applications, especially those that incorporate additional packages, + * will have their own version of this procedure. + * + * Results: + * Returns a standard Tcl completion code, and leaves an error message in + * the interp's result if an error occurs. + * + * Side effects: + * Depends on the startup script. + * + *---------------------------------------------------------------------- + */ + +int +Tcltest_SafeInit( + Tcl_Interp *interp) /* Interpreter for application. */ +{ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + return TCL_ERROR; + } + return Procbodytest_SafeInit(interp); +} /* *---------------------------------------------------------------------- @@ -4387,7 +4429,7 @@ TestfinexitObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int value; - + if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?"); return TCL_ERROR; diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index dba06f9..43a64cd 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,9 +13,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.34 2009/02/16 04:33:10 dgp Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.35 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" #include "tommath.h" @@ -996,7 +999,7 @@ TeststringobjCmd( TestString *strPtr; static const char *const options[] = { "append", "appendstrings", "get", "get2", "length", "length2", - "set", "set2", "setlength", "maxchars", "getunicode", + "set", "set2", "setlength", "maxchars", "getunicode", "appendself", "appendself2", NULL }; diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index b961e3c..2d5745e 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -10,23 +10,26 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.9 2009/02/10 23:08:56 nijtmans Exp $ + * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.10 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" /* * name and version of this package */ -static char packageName[] = "procbodytest"; -static char packageVersion[] = "1.0"; +static const char packageName[] = "procbodytest"; +static const char packageVersion[] = "1.0"; /* * Name of the commands exported by this package */ -static char procCommand[] = "proc"; +static const char procCommand[] = "proc"; /* * this struct describes an entry in the table of command names and command @@ -34,7 +37,7 @@ static char procCommand[] = "proc"; */ typedef struct CmdTable { - char *cmdName; /* command name */ + const char *cmdName; /* command name */ Tcl_ObjCmdProc *proc; /* command proc */ int exportIt; /* if 1, export the command */ } CmdTable; @@ -47,7 +50,7 @@ static int ProcBodyTestProcObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe); static int RegisterCommand(Tcl_Interp* interp, - char *namespace, const CmdTable *cmdTablePtr); + const char *namespace, const CmdTable *cmdTablePtr); int Procbodytest_Init(Tcl_Interp * interp); int Procbodytest_SafeInit(Tcl_Interp * interp); @@ -135,7 +138,7 @@ static int RegisterCommand( Tcl_Interp* interp, /* the Tcl interpreter for which the operation * is performed */ - char *namespace, /* the namespace in which the command is + const char *namespace, /* the namespace in which the command is * registered */ const CmdTable *cmdTablePtr)/* the command to register */ { diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 3b7c506..d4a5f92 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,13 +12,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.31 2009/02/10 23:09:05 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.32 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" -extern int Tcltest_Init(Tcl_Interp *interp); - #ifdef TCL_THREADS /* * Each thread has an single instance of the following structure. There is one @@ -577,14 +578,19 @@ NewTestThread( tsdPtr->interp = Tcl_CreateInterp(); result = Tcl_Init(tsdPtr->interp); - result = TclThread_Init(tsdPtr->interp); + if (result != TCL_OK) { + ThreadErrorProc(tsdPtr->interp); + } /* * This is part of the test facility. Initialize _ALL_ test commands for * use by the new thread. */ - result = Tcltest_Init(tsdPtr->interp); + result = Tcl_PackageRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1); + if (result != TCL_OK) { + ThreadErrorProc(tsdPtr->interp); + } /* * Update the list of threads. diff --git a/unix/Makefile.in b/unix/Makefile.in index a48e411..5a2e8cf 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.280 2009/11/11 06:49:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.281 2009/11/18 23:46:05 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -623,11 +623,11 @@ SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \ TCLLIBPATH="@abs_builddir@/pkgs" \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}" -tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST} +tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" tcltest-real: - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o tcltest # Note, in the targets below TCL_LIBRARY needs to be set or else "make test" @@ -1528,9 +1528,9 @@ $(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS) # for documentation purposes so people who are interested in the Xt based # notifier can modify them to suit their own installation. -xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \ +xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ @DL_OBJS@ ${BUILD_DLTEST} - ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \ + ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ @DL_OBJS@ @TCL_BUILD_LIB_SPEC@ ${LIBS} \ ${CC_SEARCH_FLAGS} -L/usr/openwin/lib -lXt -o xttest diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 4183c7c..7d8e1c0 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.18 2008/04/27 22:21:33 dkf Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.19 2009/11/18 23:46:05 nijtmans Exp $ */ #include "tcl.h" @@ -20,9 +20,6 @@ #include "tclInt.h" -extern Tcl_PackageInitProc Procbodytest_Init; -extern Tcl_PackageInitProc Procbodytest_SafeInit; -extern Tcl_PackageInitProc TclObjTest_Init; extern Tcl_PackageInitProc Tcltest_Init; #endif /* TCL_TEST */ @@ -126,15 +123,7 @@ Tcl_AppInit( return TCL_ERROR; } Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, - (Tcl_PackageInitProc *) NULL); - if (TclObjTest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - if (Procbodytest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "procbodytest", Procbodytest_Init, - Procbodytest_SafeInit); + (Tcl_PackageInitProc *) Tcltest_SafeInit); #endif /* TCL_TEST */ /* diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index 916a18c..05b1da9 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,9 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.31 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.32 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" /* @@ -74,7 +77,6 @@ static int TestgetdefencdirCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestsetdefencdirCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); -int TclplatformtestInit(Tcl_Interp *interp); static int TestalarmCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestgotsigCmd(ClientData dummy, diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index 46f5657..c8c553d 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -9,9 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtNotify.c,v 1.10 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclXtNotify.c,v 1.11 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include #include "tclInt.h" diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index eb800fb..92f5b36 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -1,4 +1,4 @@ -/* +/* * tclXtTest.c -- * * Contains commands for Xt notifier specific tests on Unix. @@ -8,15 +8,30 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtTest.c,v 1.8 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclXtTest.c,v 1.9 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include #include "tcl.h" static int TesteventloopCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char **argv); extern void InitNotifier(void); + +/* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Tcltest_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 +EXTERN int Tclxttest_Init(Tcl_Interp *interp); + + /* *---------------------------------------------------------------------- @@ -41,7 +56,7 @@ int Tclxttest_Init( Tcl_Interp *interp) /* Interpreter for application. */ { - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } XtToolkitInitialize(); diff --git a/win/Makefile.in b/win/Makefile.in index b472cd8..120d205 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.162 2009/11/11 06:49:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.163 2009/11/18 23:46:05 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -145,7 +145,8 @@ PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX} SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @UNICOWS_DLL_FILE@ $(TCL_STUB_LIB_FILE) \ $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE) -STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) +STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) \ + $(DDE_DLL_FILE) $(REG_DLL_FILE) # TCL_EXE is the name of a tclsh executable that is available *BEFORE* running # make for the first time. Certain build targets (make genstubs) need it to be @@ -420,8 +421,8 @@ $(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -$(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) tclsh.$(RES) - $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(LIBS) \ +$(TCLTEST): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) tclsh.$(RES) + $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) cat32.$(OBJEXT): cat.c @@ -453,17 +454,19 @@ ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${DDE_DLL_FILE} @MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) -${DDE_LIB_FILE}: ${DDE_OBJS} ${TCL_LIB_FILE} +${DDE_LIB_FILE}: ${DDE_OBJS} tclStubLib.$(OBJEXT) @$(RM) ${DDE_LIB_FILE} - @MAKE_LIB@ ${DDE_OBJS} ${TCL_LIB_FILE} + @MAKE_LIB@ ${DDE_OBJS} tclStubLib.$(OBJEXT) + @POST_MAKE_LIB@ ${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${REG_DLL_FILE} @MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) -${REG_LIB_FILE}: ${REG_OBJS} ${TCL_LIB_FILE} +${REG_LIB_FILE}: ${REG_OBJS} tclStubLib.$(OBJEXT) @$(RM) ${REG_LIB_FILE} - @MAKE_LIB@ ${REG_OBJS} ${TCL_LIB_FILE} + @MAKE_LIB@ ${REG_OBJS} tclStubLib.$(OBJEXT) + @POST_MAKE_LIB@ # use pre-built zlib1.dll ${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} diff --git a/win/configure b/win/configure index 2dba16e..c1258fe 100755 --- a/win/configure +++ b/win/configure @@ -3954,7 +3954,6 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} echo "$as_me:$LINENO: result: using static flags" >&5 echo "${ECHO_T}using static flags" >&6 runtime= - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.a" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" @@ -3974,20 +3973,20 @@ echo "$as_me: error: ${CC} does not support the -shared option. fi runtime= - # Link with gcc since ld does not link to default libs like - # -luser32 and -lmsvcrt by default. Make sure CFLAGS is - # included so -mno-cygwin passed the correct libs to the linker. - SHLIB_LD='${CC} -shared ${CFLAGS}' - SHLIB_LD_LIBS='${LIBS}' # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \ - -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" LIBSUFFIX="\${DBGX}.a" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi + # Link with gcc since ld does not link to default libs like + # -luser32 and -lmsvcrt by default. Make sure CFLAGS is + # included so -mno-cygwin passed the correct libs to the linker. + SHLIB_LD='${CC} -shared ${CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \ + -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" @@ -4030,25 +4029,22 @@ echo "$as_me: error: ${CC} does not support the -shared option. echo "$as_me:$LINENO: result: using static flags" >&5 echo "${ECHO_T}using static flags" >&6 runtime=-MT - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" - SHLIB_LD_LIBS="" else # dynamic echo "$as_me:$LINENO: result: using shared flags" >&5 echo "${ECHO_T}using shared flags" >&6 runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" LIBSUFFIX="\${DBGX}.lib" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" - SHLIB_LD_LIBS='${LIBS}' fi + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" diff --git a/win/tcl.m4 b/win/tcl.m4 index 6872a99..002ac44 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -490,7 +490,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # static AC_MSG_RESULT([using static flags]) runtime= - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.a" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" @@ -506,20 +505,20 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi runtime= - # Link with gcc since ld does not link to default libs like - # -luser32 and -lmsvcrt by default. Make sure CFLAGS is - # included so -mno-cygwin passed the correct libs to the linker. - SHLIB_LD='${CC} -shared ${CFLAGS}' - SHLIB_LD_LIBS='${LIBS}' # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \ - -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" LIBSUFFIX="\${DBGX}.a" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi + # Link with gcc since ld does not link to default libs like + # -luser32 and -lmsvcrt by default. Make sure CFLAGS is + # included so -mno-cygwin passed the correct libs to the linker. + SHLIB_LD='${CC} -shared ${CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \ + -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" @@ -561,24 +560,21 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # static AC_MSG_RESULT([using static flags]) runtime=-MT - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" - SHLIB_LD_LIBS="" else # dynamic AC_MSG_RESULT([using shared flags]) runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" LIBSUFFIX="\${DBGX}.lib" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" - SHLIB_LD_LIBS='${LIBS}' fi + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 2e0c7c3..5f82d76 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,9 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.36 2009/11/16 06:29:16 mdejong Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.37 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" #include #include @@ -140,7 +143,7 @@ Dde_Init( { ThreadSpecificData *tsdPtr; - if (!Tcl_InitStubs(interp, "8.0", 0)) { + if (!Tcl_InitStubs(interp, "8.1", 0)) { return TCL_ERROR; } diff --git a/win/tclWinReg.c b/win/tclWinReg.c index e6d5b7a..84fda68 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,9 +11,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.47 2009/11/18 22:02:58 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.48 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" #ifdef _MSC_VER # pragma comment (lib, "advapi32.lib") diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 35e7348..33ceaf6 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -8,9 +8,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTest.c,v 1.25 2009/02/03 23:10:58 nijtmans Exp $ + * RCS: @(#) $Id: tclWinTest.c,v 1.26 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" /* @@ -31,7 +34,6 @@ * Forward declarations of functions defined later in this file: */ -int TclplatformtestInit(Tcl_Interp *interp); static int TesteventloopCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestvolumetypeCmd(ClientData dummy, @@ -754,7 +756,7 @@ TestplatformChmod( done: if (secDesc) { - ckfree(secDesc); + ckfree((char *) secDesc); } if (newAcl) { ckfree((char *) newAcl); -- cgit v0.12 From 329f81f416510bcb86ba467b1fb8c6756156e5a2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 18 Nov 2009 23:56:43 +0000 Subject: Add files to .cvsignore --- unix/.cvsignore | 5 +++++ unix/dltest/.cvsignore | 1 + win/.cvsignore | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 unix/.cvsignore create mode 100644 unix/dltest/.cvsignore diff --git a/unix/.cvsignore b/unix/.cvsignore new file mode 100644 index 0000000..f855ef3 --- /dev/null +++ b/unix/.cvsignore @@ -0,0 +1,5 @@ +pkgs +Makefile +config.status +*.a +tclConfig.sh diff --git a/unix/dltest/.cvsignore b/unix/dltest/.cvsignore new file mode 100644 index 0000000..f3c7a7c --- /dev/null +++ b/unix/dltest/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/win/.cvsignore b/win/.cvsignore index df45023..24341ef 100644 --- a/win/.cvsignore +++ b/win/.cvsignore @@ -1,5 +1,8 @@ Debug Release +autom4te.cache +pkgs +*.a *.opt *.ncb *.plg @@ -13,6 +16,8 @@ Release Makefile tcl.hpj tclConfig.sh +config.status .#* tcl.sln tcl.suo +*.manifest -- cgit v0.12 From 2eb0767336c873190979f8ab18ddd613b21af518 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 19 Nov 2009 11:59:52 +0000 Subject: Undo Jan's needless vandalism. --- ChangeLog | 11 +++++++++-- library/auto.tcl | 4 ++-- library/clock.tcl | 20 +++++++++++--------- library/history.tcl | 4 ++-- library/safe.tcl | 6 +++--- library/tm.tcl | 2 +- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9ff53d..35f9302 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-19 Donal K. Fellows + + * library/auto.tcl (tcl_findLibrary): + * library/clock.tcl (MakeUniquePrefixRegexp, MakeParseCodeFromFields) + (SetupTimeZone, ProcessPosixTimeZone): Restored the use of a literal + * library/history.tcl (HistAdd): 'then' when following a multi- + * library/safe.tcl (interpConfigure): line test expresssion. It's an + * library/tm.tcl (UnknownHandler): aid to readability then. + 2009-11-19 Jan Nijtmans * generic/tclInt.h Make all internal initialization @@ -25,8 +34,6 @@ Tcl_CreateChannel() and its derivatives, now sometimes ignore their "chanName" argument. -2009-11-18 Jan Nijtmans - * generic/tclAsync.c Eliminate various gcc warnings (in -Wextra mode) * generic/tclBasic.c * generic/tclBinary.c diff --git a/library/auto.tcl b/library/auto.tcl index 9980b26..c69b24d 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution of commands # and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.31 2009/11/18 21:23:21 nijtmans Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.32 2009/11/19 11:59:53 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -88,7 +88,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { if { $::tcl_platform(platform) eq "unix" && $::tcl_platform(os) eq "Darwin" - } { + } then { # 4. On MacOSX, check the Resources/Scripts subdir too lappend dirs [file join $d $basename$version Resources Scripts] } diff --git a/library/clock.tcl b/library/clock.tcl index 6d6cc15..9f9bcae 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.58 2009/11/18 21:23:20 nijtmans Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.59 2009/11/19 11:59:54 dkf Exp $ # #---------------------------------------------------------------------- @@ -2172,7 +2172,7 @@ proc ::tcl::clock::MakeUniquePrefixRegexp { successors if { [dict exists $uniquePrefixMapping $prefixString] || [llength $schars] > 1 - } { + } then { append re "(?:" } @@ -2268,7 +2268,7 @@ proc ::tcl::clock::MakeParseCodeFromFields { dateFields parseActions } { ![string is integer $newPos] || ![string is integer $currPos] || $newPos > $currPos - } { + } then { break } if { $newPos < $currPos } { @@ -3096,7 +3096,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { } elseif { [regexp {^([-+])(\d\d)(?::?(\d\d)(?::?(\d\d))?)?} $timezone \ -> s hh mm ss] - } { + } then { # Make a fixed offset ::scan $hh %d hh @@ -3125,7 +3125,7 @@ proc ::tcl::clock::SetupTimeZone { timezone } { }] && [catch { LoadZoneinfoFile [string range $timezone 1 end] }] - } { + } then { return -code error \ -errorcode [list CLOCK badTimeZone $timezone] \ "time zone \"$timezone\" not found" @@ -3809,8 +3809,9 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { # EU end time is the last Sunday in October if { - [dict get $z startDayOfYear] eq {} && [dict get $z startMonth] eq {} - } { + [dict get $z startDayOfYear] eq {} + && [dict get $z startMonth] eq {} + } then { if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { # EU dict set z startWeekOfMonth 5 @@ -3830,8 +3831,9 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } { dict set z startSeconds 0 } if { - [dict get $z endDayOfYear] eq {} && [dict get $z endMonth] eq {} - } { + [dict get $z endDayOfYear] eq {} + && [dict get $z endMonth] eq {} + } then { if {($stdSignum * $stdHours>=0) && ($stdSignum * $stdHours<=12)} { # EU dict set z endMonth 10 diff --git a/library/history.tcl b/library/history.tcl index 4d21143..a1e2679 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -2,7 +2,7 @@ # # Implementation of the history command. # -# RCS: @(#) $Id: history.tcl,v 1.9 2009/11/18 21:23:20 nijtmans Exp $ +# RCS: @(#) $Id: history.tcl,v 1.10 2009/11/19 11:59:54 dkf Exp $ # # Copyright (c) 1997 Sun Microsystems, Inc. # @@ -78,7 +78,7 @@ proc ::tcl::HistAdd {event {exec {}}} { if { [prefix longest {exec {}} $exec] eq "" && [llength [info level 0]] == 3 - } { + } then { return -code error "bad argument \"$exec\": should be \"exec\"" } diff --git a/library/safe.tcl b/library/safe.tcl index 561659b..662a727 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.32 2009/11/18 21:23:21 nijtmans Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.33 2009/11/19 11:59:54 dkf Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -194,7 +194,7 @@ proc ::safe::interpConfigure {args} { if { ![::tcl::OptProcArgGiven -statics] && ![::tcl::OptProcArgGiven -noStatics] - } { + } then { set statics $state(staticsok) } else { set statics [InterpStatics] @@ -202,7 +202,7 @@ proc ::safe::interpConfigure {args} { if { [::tcl::OptProcArgGiven -nested] || [::tcl::OptProcArgGiven -nestedLoadOk] - } { + } then { set nested [InterpNested] } else { set nested $state(nestedok) diff --git a/library/tm.tcl b/library/tm.tcl index 90f8296..907f9cf 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -263,7 +263,7 @@ proc ::tcl::tm::UnknownHandler {original name args} { if { ($pkgname eq $name) && [package vsatisfies $pkgversion {*}$args] - } { + } then { set satisfied 1 # We do not abort the loop, and keep adding provide -- cgit v0.12 From 9d243a7d2ffa0988a6dc1316cecf69e776b75bae Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 19 Nov 2009 16:31:10 +0000 Subject: * unix/tclAppInit.c: Repair broken build of the tcltest executable. * win/tclAppInit.c: [Bug 2883850, 2900542]. --- ChangeLog | 5 +++++ unix/tclAppInit.c | 6 +++--- win/tclAppInit.c | 16 +++------------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35f9302..b14de54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-19 Don Porter + + * unix/tclAppInit.c: Repair broken build of the tcltest executable. + * win/tclAppInit.c: [Bug 2883850, 2900542]. + 2009-11-19 Donal K. Fellows * library/auto.tcl (tcl_findLibrary): diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 7d8e1c0..a39b448 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.19 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.20 2009/11/19 16:31:10 dgp Exp $ */ #include "tcl.h" @@ -21,6 +21,7 @@ #include "tclInt.h" extern Tcl_PackageInitProc Tcltest_Init; +extern Tcl_PackageInitProc Tcltest_SafeInit; #endif /* TCL_TEST */ @@ -122,8 +123,7 @@ Tcl_AppInit( if (Tcltest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, - (Tcl_PackageInitProc *) Tcltest_SafeInit); + Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, Tcltest_SafeInit); #endif /* TCL_TEST */ /* diff --git a/win/tclAppInit.c b/win/tclAppInit.c index b5e5729..99609ab 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.27 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.28 2009/11/19 16:31:11 dgp Exp $ */ #include "tcl.h" @@ -19,10 +19,8 @@ #include #ifdef TCL_TEST -extern Tcl_PackageInitProc Procbodytest_Init; -extern Tcl_PackageInitProc Procbodytest_SafeInit; extern Tcl_PackageInitProc Tcltest_Init; -extern Tcl_PackageInitProc TclObjTest_Init; +extern Tcl_PackageInitProc Tcltest_SafeInit; #endif /* TCL_TEST */ #if defined(__GNUC__) @@ -135,15 +133,7 @@ Tcl_AppInit( if (Tcltest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, NULL); - if (TclObjTest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - if (Procbodytest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "procbodytest", Procbodytest_Init, - Procbodytest_SafeInit); + Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, Tcltest_SafeInit); #endif /* TCL_TEST */ #if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES -- cgit v0.12 From 1aaac758c94c12834f8bf77eadc30e212bc186f4 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 19 Nov 2009 21:17:36 +0000 Subject: Test-case for fixed [Bug 2849797] Fix safe-10.1 and safe-10.4 test cases, making the wrong assumption that Tcltest should be a static package. --- ChangeLog | 12 +++++++++++- generic/tclTest.c | 4 +--- generic/tclTestObj.c | 3 +-- tests/chanio.test | 10 +++++----- tests/safe.test | 15 ++++++++------- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index b14de54..f464aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-19 Jan Nijtmans + + * generic/tclTest.c Remove extraneus prototypes, follow-up + * generic/tclTestObj.c to [Bug 2883850] + * tests/chanio.test Test-case for fixed [Bug 2849797] + * tests/safe.test Fix safe-10.1 and safe-10.4 test cases, + making the wrong assumption that Tcltest + is a static package. + 2009-11-19 Don Porter * unix/tclAppInit.c: Repair broken build of the tcltest executable. @@ -27,10 +36,11 @@ * win/Makefile.in * win/tcl.m4 * win/configure (regenerated) + * win/tclAppInit.c * win/tclWinDde.c Always compile with Stubs. * win/tclWinReg.c * win/tclWinTest.c - + 2009-11-18 Jan Nijtmans * doc/CrtChannel.3 Fix [Bug 2849797]: channel name inconsistencies diff --git a/generic/tclTest.c b/generic/tclTest.c index ca0d507..4e739db 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,13 +14,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.139 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.140 2009/11/19 21:17:36 nijtmans Exp $ */ #ifndef USE_TCL_STUBS # define USE_TCL_STUBS #endif -#define TCL_TEST #include "tclInt.h" /* @@ -153,7 +152,6 @@ static TestChannel *firstDetached; * Forward declarations for procedures defined later in this file: */ -int Tcltest_Init(Tcl_Interp *interp); static int AsyncHandlerProc(ClientData clientData, Tcl_Interp *interp, int code); #ifdef TCL_THREADS diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 43a64cd..ec7b83b 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.35 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.36 2009/11/19 21:17:36 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -39,7 +39,6 @@ static int CheckIfVarUnset(Tcl_Interp *interp, int varIndex); static int GetVariableIndex(Tcl_Interp *interp, const char *string, int *indexPtr); static void SetVarToObj(int varIndex, Tcl_Obj *objPtr); -int TclObjTest_Init(Tcl_Interp *interp); static int TestbignumobjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int TestbooleanobjCmd(ClientData dummy, diff --git a/tests/chanio.test b/tests/chanio.test index df78461..729b436 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.21 2008/12/19 16:01:42 dgp Exp $ +# RCS: @(#) $Id: chanio.test,v 1.22 2009/11/19 21:17:36 nijtmans Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -1571,8 +1571,8 @@ test chan-io-14.3 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec openpipe} { out } {err }} -# This test relies on the fact that the smallest available fd is used first. -test chan-io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec unix} { +# This test relies on the fact that stdout is used before stderr. +test chan-io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec} { set f [open $path(test1) w] chan puts -nonewline $f { chan close stdin chan close stdout @@ -1597,8 +1597,8 @@ test chan-io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec unix} { chan close $f2 set result } {{ chan close stdin -file1 -} {file2 +stdout +} {stderr }} catch {interp delete z} test chan-io-14.5 {Tcl_GetChannel: stdio name translation} -setup { diff --git a/tests/safe.test b/tests/safe.test index 22ef475..786cafb 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.26 2009/11/05 20:15:36 andreas_kupries Exp $ +# RCS: @(#) $Id: safe.test,v 1.27 2009/11/19 21:17:36 nijtmans Exp $ package require Tcl 8.5 @@ -376,34 +376,35 @@ if {[catch {package require Tcltest} msg]} { # we use the Tcltest package , which has no Safe_Init } +teststaticpkg Safepkg1 0 0 test safe-10.1 {testing statics loading} TcltestPackage { set i [safe::interpCreate] list \ - [catch {interp eval $i {load {} Tcltest}} msg] \ + [catch {interp eval $i {load {} Safepkg1}} msg] \ $msg \ [safe::interpDelete $i]; -} {1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}} +} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}} test safe-10.2 {testing statics loading / -nostatics} TcltestPackage { set i [safe::interpCreate -nostatics] list \ - [catch {interp eval $i {load {} Tcltest}} msg] \ + [catch {interp eval $i {load {} Safepkg1}} msg] \ $msg \ [safe::interpDelete $i]; } {1 {permission denied (static package)} {}} test safe-10.3 {testing nested statics loading / no nested by default} TcltestPackage { set i [safe::interpCreate] list \ - [catch {interp eval $i {interp create x; load {} Tcltest x}} msg] \ + [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \ $msg \ [safe::interpDelete $i]; } {1 {permission denied (nested load)} {}} test safe-10.4 {testing nested statics loading / -nestedloadok} TcltestPackage { set i [safe::interpCreate -nestedloadok] list \ - [catch {interp eval $i {interp create x; load {} Tcltest x}} msg] \ + [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \ $msg \ [safe::interpDelete $i]; -} {1 {can't use package in a safe interpreter: no Tcltest_SafeInit procedure} {}} +} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}} test safe-11.1 {testing safe encoding} { set i [safe::interpCreate] -- cgit v0.12 From 22dcce7f92195e6d1e053bc88c37a0718d2ee0c7 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 19 Nov 2009 21:23:51 +0000 Subject: Create tcltest86.dll as dynamic Tcltest package --- ChangeLog | 1 + win/Makefile.in | 38 +++++++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index f464aee..f9d4ae6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2009-11-19 Jan Nijtmans + * win/Makefile.in Create tcltest86.dll as dynamic Tcltest package * generic/tclTest.c Remove extraneus prototypes, follow-up * generic/tclTestObj.c to [Bug 2883850] * tests/chanio.test Test-case for fixed [Bug 2849797] diff --git a/win/Makefile.in b/win/Makefile.in index 120d205..9636641 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.163 2009/11/18 23:46:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.164 2009/11/19 21:23:51 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -141,12 +141,14 @@ DDE_DLL_FILE = tcldde$(DDEVER)${DLLSUFFIX} DDE_LIB_FILE = tcldde$(DDEVER)${LIBSUFFIX} REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX} REG_LIB_FILE = tclreg$(REGVER)${LIBSUFFIX} +TEST_DLL_FILE = tcltest$(VER)${DLLSUFFIX} +TEST_LIB_FILE = tcltest$(VER)${LIBSUFFIX} PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX} SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @UNICOWS_DLL_FILE@ $(TCL_STUB_LIB_FILE) \ - $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE) + $(DDE_DLL_FILE) $(REG_DLL_FILE) $(TEST_DLL_FILE) $(PIPE_DLL_FILE) STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) \ - $(DDE_DLL_FILE) $(REG_DLL_FILE) + $(TEST_LIB_FILE) $(DDE_DLL_FILE) $(REG_DLL_FILE) $(TEST_DLL_FILE) # TCL_EXE is the name of a tclsh executable that is available *BEFORE* running # make for the first time. Certain build targets (make genstubs) need it to be @@ -213,8 +215,7 @@ TCLTEST_OBJS = \ tclTestObj.$(OBJEXT) \ tclTestProcBodyObj.$(OBJEXT) \ tclThreadTest.$(OBJEXT) \ - tclWinTest.$(OBJEXT) \ - testMain.$(OBJEXT) + tclWinTest.$(OBJEXT) GENERIC_OBJS = \ regcomp.$(OBJEXT) \ @@ -421,8 +422,8 @@ $(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -$(TCLTEST): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) tclsh.$(RES) - $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ +$(TCLTEST): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(TCLTEST_OBJS) testMain.$(OBJEXT) $(CAT32) tclsh.$(RES) + $(CC) $(CFLAGS) $(TCLTEST_OBJS) testMain.$(OBJEXT) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) cat32.$(OBJEXT): cat.c @@ -468,6 +469,15 @@ ${REG_LIB_FILE}: ${REG_OBJS} tclStubLib.$(OBJEXT) @MAKE_LIB@ ${REG_OBJS} tclStubLib.$(OBJEXT) @POST_MAKE_LIB@ +${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE} + @$(RM) ${TEST_DLL_FILE} + @MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) + +${TEST_LIB_FILE}: ${TCLTEST_OBJS} tclStubLib.$(OBJEXT) + @$(RM) ${TEST_LIB_FILE} + @MAKE_LIB@ ${TCLTEST_OBJS} tclStubLib.$(OBJEXT) + @POST_MAKE_LIB@ + # use pre-built zlib1.dll ${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} @$(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE} @@ -510,6 +520,12 @@ tclTestObj.${OBJEXT}: tclTestObj.c tclWinTest.${OBJEXT}: tclWinTest.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) +tclWinReg.${OBJEXT}: tclWinReg.c + $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) + +tclWinDde.${OBJEXT}: tclWinDde.c + $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) + tclAppInit.${OBJEXT} : tclAppInit.c $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) @@ -543,14 +559,6 @@ Zzutil.$(OBJEXT): $(ZLIB_DIR)/zutil.c tclZlib.${OBJEXT} : tclZlib.c $(CC) -c ${ZLIB_INC} $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME) -# The following objects should be built using the stub interfaces - -tclWinReg.${OBJEXT} : tclWinReg.c - $(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME) - -tclWinDde.${OBJEXT} : tclWinDde.c - $(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME) - # TIP #59, embedding of configuration information into the binary library. # # Part of Tcl's configuration information are the paths where it was installed -- cgit v0.12 From c9d79e955d95910cce7d1a96e2b1b7e128c51412 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 19 Nov 2009 21:56:34 +0000 Subject: Updated freeIntRepProc routines so that they set the typePtr field to NULL so that the Tcl_Obj is not left in an inconsistent state. [Bug 2857044] --- ChangeLog | 6 ++++++ generic/tclEncoding.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9d4ae6..1db1262 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,12 @@ * tests/safe.test Fix safe-10.1 and safe-10.4 test cases, making the wrong assumption that Tcltest is a static package. + * generic/tclEncoding.c Updated freeIntRepProc routines so + that they set the typePtr field to + NULL so that the Tcl_Obj is not left + in an inconsistent state. + [Bug 2857044] + 2009-11-19 Don Porter diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 2188256..7e5466c 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.67 2009/11/16 17:38:08 ferrieux Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.68 2009/11/19 21:56:34 nijtmans Exp $ */ #include "tclInt.h" @@ -336,6 +336,7 @@ FreeEncodingIntRep( Tcl_Obj *objPtr) { Tcl_FreeEncoding((Tcl_Encoding) objPtr->internalRep.otherValuePtr); + objPtr->typePtr = NULL; } /* @@ -3394,7 +3395,7 @@ EscapeFreeProc( * weak reference in the toplevel encodingTable (ie they don't have a +1 * refcount for this), and unpredictable nuking order could remove them * from under the following loop's feet [Bug 2891556]. - * + * * The encodingsInitialized flag, being reset on entry to TFES, can serve * as a "not in finalization" test. */ -- cgit v0.12 From cf20f0bed2369b03a48196a130f6ccab9912ad61 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 19 Nov 2009 22:06:32 +0000 Subject: [Tcl Patch #2883533] tcl.m4 support for Haiku OS --- ChangeLog | 3 ++- unix/.cvsignore | 1 + unix/configure | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- unix/tcl.m4 | 12 ++++++++- 4 files changed, 92 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1db1262..a0b70ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,8 @@ NULL so that the Tcl_Obj is not left in an inconsistent state. [Bug 2857044] - + * unix/tcl.m4: [Tcl Patch #2883533] tcl.m4 support for Haiku OS + * unix/configure: (regenerated) 2009-11-19 Don Porter diff --git a/unix/.cvsignore b/unix/.cvsignore index f855ef3..4a3b0ef 100644 --- a/unix/.cvsignore +++ b/unix/.cvsignore @@ -3,3 +3,4 @@ Makefile config.status *.a tclConfig.sh +autom4te.cache diff --git a/unix/configure b/unix/configure index 6b4b375..b1b899b 100755 --- a/unix/configure +++ b/unix/configure @@ -6637,7 +6637,7 @@ fi CFLAGS_DEBUG=-g if test "$GCC" = yes; then - CFLAGS_OPTIMIZE="-O2" + CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" else @@ -7016,6 +7016,83 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; + Haiku*) + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-lroot" + echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 +echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6 +if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetwork $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inet_ntoa (); +int +main () +{ +inet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_network_inet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_network_inet_ntoa=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6 +if test $ac_cv_lib_network_inet_ntoa = yes; then + LIBS="$LIBS -lnetwork" +fi + + ;; HP-UX-*.11.*) # Use updated header definitions where possible diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 479ea08..ed46d61 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1102,7 +1102,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g AS_IF([test "$GCC" = yes], [ - CFLAGS_OPTIMIZE="-O2" + CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" ], [ CFLAGS_OPTIMIZE=-O @@ -1256,6 +1256,16 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; + Haiku*) + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-lroot" + AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"]) + ;; HP-UX-*.11.*) # Use updated header definitions where possible AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) -- cgit v0.12 From 574b585c5101310f119cd540bdcae05636888bca Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 20 Nov 2009 00:19:46 +0000 Subject: a bit of cleanup --- ChangeLog | 26 ++++++++++++-------------- generic/tclVar.c | 5 ++++- tests/io.test | 10 +++++----- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0b70ca..a01c196 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,19 +1,17 @@ 2009-11-19 Jan Nijtmans - * win/Makefile.in Create tcltest86.dll as dynamic Tcltest package - * generic/tclTest.c Remove extraneus prototypes, follow-up - * generic/tclTestObj.c to [Bug 2883850] - * tests/chanio.test Test-case for fixed [Bug 2849797] - * tests/safe.test Fix safe-10.1 and safe-10.4 test cases, - making the wrong assumption that Tcltest - is a static package. - * generic/tclEncoding.c Updated freeIntRepProc routines so - that they set the typePtr field to - NULL so that the Tcl_Obj is not left - in an inconsistent state. - [Bug 2857044] - * unix/tcl.m4: [Tcl Patch #2883533] tcl.m4 support for Haiku OS - * unix/configure: (regenerated) + * win/Makefile.in: Create tcltest86.dll as dynamic Tcltest package + * generic/tclTest.c: Remove extraneus prototypes, follow-up + * generic/tclTestObj.c: to [Bug 2883850] + * tests/chanio.test: Test-cases for fixed [Bug 2849797] + * tests/io.test: + * tests/safe.test: Fix safe-10.1 and safe-10.4 test cases, making + the wrong assumption that Tcltest is a static package. + * generic/tclEncoding.c:Updated freeIntRepProc routines so that they + * generic/tclVar.c: set the typePtr field to NULL so that the + Tcl_Obj is not left in an inconsistent state. [Bug 2857044] + * unix/tcl.m4: [Tcl Patch #2883533] tcl.m4 support for Haiku OS + * unix/configure: autoconf-2.59 2009-11-19 Don Porter diff --git a/generic/tclVar.c b/generic/tclVar.c index 3bbe63f..54699ce 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.183 2009/10/17 22:24:38 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.184 2009/11/20 00:19:46 dgp Exp $ */ #include "tclInt.h" @@ -4770,6 +4770,7 @@ FreeLocalVarName( if (namePtr) { Tcl_DecrRefCount(namePtr); } + objPtr->typePtr = NULL; } static void @@ -4811,6 +4812,7 @@ FreeNsVarName( CleanupVar(varPtr, NULL); } } + objPtr->typePtr = NULL; } static void @@ -4850,6 +4852,7 @@ FreeParsedVarName( TclDecrRefCount(arrayPtr); ckfree(elem); } + objPtr->typePtr = NULL; } static void diff --git a/tests/io.test b/tests/io.test index 1ad9f6e..2b08454 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.94 2009/11/12 17:25:18 andreas_kupries Exp $ +# RCS: @(#) $Id: io.test,v 1.95 2009/11/20 00:19:46 dgp Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -1670,8 +1670,8 @@ test io-14.3 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec openpipe} { out } {err }} -# This test relies on the fact that the smallest available fd is used first. -test io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec unix} { +# This test relies on the fact that stdout is used before stderr +test io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec} { set f [open $path(test1) w] puts -nonewline $f { close stdin close stdout @@ -1696,8 +1696,8 @@ test io-14.4 {Tcl_SetStdChannel & Tcl_GetStdChannel} {exec unix} { close $f2 set result } {{ close stdin -file1 -} {file2 +stdout +} {stderr }} catch {interp delete z} test io-14.5 {Tcl_GetChannel: stdio name translation} { -- cgit v0.12 From baac428a2bb63e910b9df34c247f093c81cc6782 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 21 Nov 2009 21:58:30 +0000 Subject: Cast required when setting result using a const string. String is copied by TCL_VOLATILE. --- generic/tclIORChan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index f2f8e1d..e3ba688 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.42 2009/11/18 22:41:41 nijtmans Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.43 2009/11/21 21:58:30 patthoyts Exp $ */ #include @@ -735,7 +735,7 @@ TclChanCreateObjCmd( * Return handle as result of command. */ - Tcl_SetResult(interp, chanPtr->state->channelName, TCL_VOLATILE); + Tcl_SetResult(interp, (char *)chanPtr->state->channelName, TCL_VOLATILE); return TCL_OK; error: -- cgit v0.12 From 77fe68ae6a0017ccb49d5a89297a6eaca0b0d963 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 22 Nov 2009 00:17:39 +0000 Subject: Added some OSX-specific things --- unix/dltest/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unix/dltest/.cvsignore b/unix/dltest/.cvsignore index f3c7a7c..77ae092 100644 --- a/unix/dltest/.cvsignore +++ b/unix/dltest/.cvsignore @@ -1 +1,3 @@ Makefile +*.bundle +*.dylib -- cgit v0.12 From bc47dee270054a449ec428a8d3a8be5152605ae2 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 23 Nov 2009 00:02:51 +0000 Subject: [Bug 2901803]: Fix silly error. --- ChangeLog | 97 ++++++++++++++++++++++++++----------------------- generic/tclThreadTest.c | 30 ++++++++------- 2 files changed, 68 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index a01c196..5f52c3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,22 +1,30 @@ +2009-11-22 Donal K. Fellows + + * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]: Fix small + error in function naming which blocked a threaded test build. + 2009-11-19 Jan Nijtmans - * win/Makefile.in: Create tcltest86.dll as dynamic Tcltest package - * generic/tclTest.c: Remove extraneus prototypes, follow-up - * generic/tclTestObj.c: to [Bug 2883850] + * win/Makefile.in: Create tcltest86.dll as dynamic Tcltest + package. + * generic/tclTest.c: Remove extraneous prototypes, follow-up to + * generic/tclTestObj.c: [Bug 2883850] * tests/chanio.test: Test-cases for fixed [Bug 2849797] * tests/io.test: * tests/safe.test: Fix safe-10.1 and safe-10.4 test cases, making - the wrong assumption that Tcltest is a static package. - * generic/tclEncoding.c:Updated freeIntRepProc routines so that they - * generic/tclVar.c: set the typePtr field to NULL so that the - Tcl_Obj is not left in an inconsistent state. [Bug 2857044] - * unix/tcl.m4: [Tcl Patch #2883533] tcl.m4 support for Haiku OS + the wrong assumption that Tcltest is a static + package. + * generic/tclEncoding.c:[Bug 2857044]: Updated freeIntRepProc routines + * generic/tclVar.c: so that they set the typePtr field to NULL so + that the Tcl_Obj is not left in an + inconsistent state. + * unix/tcl.m4: [Patch 2883533]: tcl.m4 support for Haiku OS * unix/configure: autoconf-2.59 2009-11-19 Don Porter - * unix/tclAppInit.c: Repair broken build of the tcltest executable. - * win/tclAppInit.c: [Bug 2883850, 2900542]. + * unix/tclAppInit.c: [Bug 2883850, 2900542]: Repair broken build of + * win/tclAppInit.c: the tcltest executable. 2009-11-19 Donal K. Fellows @@ -49,13 +57,14 @@ 2009-11-18 Jan Nijtmans - * doc/CrtChannel.3 Fix [Bug 2849797]: channel name inconsistencies - * generic/tclIORChan.c as suggested by DKF - * generic/tclIO.c minor *** POTENTIAL INCOMPATIBILITY *** because - Tcl_CreateChannel() and its derivatives, now - sometimes ignore their "chanName" argument. + * doc/CrtChannel.3: [Bug 2849797]: Fix channel name inconsistences + * generic/tclIORChan.c: as suggested by DKF. + * generic/tclIO.c: Minor *** POTENTIAL INCOMPATIBILITY *** + because Tcl_CreateChannel() and derivatives + now sometimes ignore their "chanName" + argument. - * generic/tclAsync.c Eliminate various gcc warnings (in -Wextra mode) + * generic/tclAsync.c: Eliminate various gcc warnings (with -Wextra) * generic/tclBasic.c * generic/tclBinary.c * generic/tclCmdAH.c @@ -77,12 +86,12 @@ * win/tclWinConsole.c * win/tclWinNotify.c * win/tclWinReg.c - * library/auto.tcl Eliminate "then" keyword + * library/auto.tcl: Eliminate "then" keyword * library/clock.tcl * library/history.tcl * library/safe.tcl * library/tm.tcl - * library/http/http.tcl Eliminate unnecessary spaces + * library/http/http.tcl: Eliminate unnecessary spaces * library/http1.0/http.tcl * library/msgcat/msgcat.tcl * library/opt/optparse.tcl @@ -93,28 +102,28 @@ 2009-11-17 Andreas Kupries - * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy- - up from a few days ago (2009-11-9, not in ChangeLog). strchr is - apparently a macro on AIX and reacts badly to pre-processor + * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy-up + from a few days ago (2009-11-9, not in ChangeLog). It seems that + strchr is apparently a macro on AIX and reacts badly to pre-processor directives in its arguments. 2009-11-16 Alexandre Ferrieux - * generic/tclEncoding.c: (forward port) Fix [Bug 2891556] and improve - * generic/tclTest.c: test to detect similar manifestations in the - * tests/encoding.test: future. Add tcltest support for finalization. + * generic/tclEncoding.c: [Bug 2891556]: Fix and improve test to + * generic/tclTest.c: detect similar manifestations in the future. + * tests/encoding.test: Add tcltest support for finalization. 2009-11-15 Mo DeJong - * win/tclWinDde.c: Avoid gcc compiler warning by - explicitly casting DdeCreateStringHandle argument. + * win/tclWinDde.c: Avoid gcc compiler warning by explicitly casting + DdeCreateStringHandle argument. 2009-11-12 Andreas Kupries - * generic/tclIO.c (CopyData): [Bug 2895565]. Dropped bogosity - * tests/io.test: which used the number of _written_ bytes or - character to update the counters for the read bytes/characters. - New test io-53.11. This is a forward port from the 8.5 branch. + * generic/tclIO.c (CopyData): [Bug 2895565]: Dropped bogosity which + * tests/io.test: used the number of _written_ bytes or character to + update the counters for the read bytes/characters. New test io-53.11. + This is a forward port from the 8.5 branch. 2009-11-11 Don Porter @@ -123,8 +132,8 @@ 2009-11-11 Jan Nijtmans - * library/http/http.tcl (http::geturl): [Bug 2891171]: URl - checking too strict when using multiple question marks + * library/http/http.tcl (http::geturl): [Bug 2891171]: URL checking + too strict when using multiple question marks. * tests/http.test * library/http/pkgIndex.tcl: Bump to http 2.8.2 * unix/Makefile.in: @@ -143,19 +152,17 @@ 000. On Windows7 and Vista we really have no access and these were getting left behind. A few tests were changed to reflect the intent of the test where - setting a directory chmod 000 should prevent any - modification. This restriction was ignored on XP but is honoured - on Vista + setting a directory chmod 000 should prevent any modification. This + restriction was ignored on XP but is honoured on Vista 2009-11-10 Andreas Kupries - * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT - evaluation. Forward port from Tcl 8.5 branch, change by Don - Porter. + * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT evaluation. + Forward port from Tcl 8.5 branch, change by Don Porter. - * generic/tclObj.c: Plug memory leak in TclContinuationsEnter(). - [Bug 2895323]. Forward port from Tcl 8.5 branch, change by Don - Porter. + * generic/tclObj.c: [Bug 2895323]: Plug memory leak in + TclContinuationsEnter(). Forward port from Tcl 8.5 branch, change by + Don Porter. 2009-11-09 Stuart Cassoff @@ -165,12 +172,12 @@ * generic/tclBasic.c (TclEvalObjEx): Moved the #280 decrement of refCount for the file path out of the branch after the whole - conditional, closing a memory leak. Added clause on structure type - to prevent seg.faulting. Forward port from valgrinding the Tcl 8.5 + conditional, closing a memory leak. Added clause on structure type to + prevent seg.faulting. Forward port from valgrinding the Tcl 8.5 branch. - * tests/info.test: Resolve ambiguous resolution of variable - "res". Forward port from 8.5 + * tests/info.test: Resolve ambiguous resolution of variable "res". + Forward port from 8.5 2009-11-08 Donal K. Fellows diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index d4a5f92..b5409f2 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.32 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.33 2009/11/23 00:02:51 dkf Exp $ */ #ifndef USE_TCL_STUBS @@ -48,12 +48,13 @@ static Tcl_ThreadDataKey dataKey; * protected by threadMutex. */ -static struct ThreadSpecificData *threadList; +static ThreadSpecificData *threadList; /* * The following bit-values are legal for the "flags" field of the * ThreadSpecificData structure. */ + #define TP_Dying 0x001 /* This thread is being canceled */ /* @@ -63,7 +64,7 @@ static struct ThreadSpecificData *threadList; */ typedef struct ThreadCtrl { - const char *script; /* The Tcl command this thread should + const char *script; /* The Tcl command this thread should * execute */ int flags; /* Initial value of the "flags" field in the * ThreadSpecificData structure for the new @@ -422,7 +423,8 @@ Tcl_ThreadObjCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewIntObj(Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT))); + Tcl_SetObjResult(interp, Tcl_NewIntObj( + Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT))); return TCL_OK; } case THREAD_ERRORPROC: { @@ -453,14 +455,13 @@ Tcl_ThreadObjCmd( return TCL_ERROR; } while (1) { - /* - * If the script has been unwound, bail out immediately. This - * does not follow the recommended guidelines for how extensions - * should handle the script cancellation functionality because - * this is not a "normal" extension. Most extensions do not have - * a command that simply enters an infinite Tcl event loop. - * Normal extensions should not specify the TCL_CANCEL_UNWIND when + * If the script has been unwound, bail out immediately. This does + * not follow the recommended guidelines for how extensions should + * handle the script cancellation functionality because this is + * not a "normal" extension. Most extensions do not have a command + * that simply enters an infinite Tcl event loop. Normal + * extensions should not specify the TCL_CANCEL_UNWIND when * calling Tcl_Canceled to check if the command has been canceled. */ @@ -573,7 +574,7 @@ NewTestThread( char *threadEvalScript; /* - * Initialize the interpreter. This should be more general. + * Initialize the interpreter. This should be more general. */ tsdPtr->interp = Tcl_CreateInterp(); @@ -587,7 +588,7 @@ NewTestThread( * use by the new thread. */ - result = Tcl_PackageRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1); + result = Tcl_PkgRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1); if (result != TCL_OK) { ThreadErrorProc(tsdPtr->interp); } @@ -662,6 +663,7 @@ ThreadErrorProc( const char *errorInfo, *argv[3]; char *script; char buf[TCL_DOUBLE_SPACE+1]; + sprintf(buf, "%ld", (long) Tcl_GetCurrentThread()); errorInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); @@ -1191,7 +1193,7 @@ ThreadExitProc( const char *msg = "target thread died"; - resultPtr->result = ckalloc(strlen(msg)+1); + resultPtr->result = ckalloc(strlen(msg) + 1); strcpy(resultPtr->result, msg); resultPtr->code = TCL_ERROR; Tcl_ConditionNotify(&resultPtr->done); -- cgit v0.12 From a572d7070900a843d0b8cc6c6bee105f8411c90c Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 23 Nov 2009 19:00:49 +0000 Subject: * generic/tclThreadTest.c (NewTestThread): [Bug 2901803] Further machinations to get NewTestThread actually to launch the thread, not just compile. --- ChangeLog | 6 ++++++ generic/tclThreadTest.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f52c3a..bb5fc21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-23 Kevin B. Kenny + + * generic/tclThreadTest.c (NewTestThread): [Bug 2901803] + Further machinations to get NewTestThread actually to launch + the thread, not just compile. + 2009-11-22 Donal K. Fellows * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]: Fix small diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index b5409f2..e009a86 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.33 2009/11/23 00:02:51 dkf Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.34 2009/11/23 19:00:49 kennykb Exp $ */ #ifndef USE_TCL_STUBS @@ -588,7 +588,7 @@ NewTestThread( * use by the new thread. */ - result = Tcl_PkgRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1); + result = Tcl_Eval(tsdPtr->interp, "load {} Tcltest"); if (result != TCL_OK) { ThreadErrorProc(tsdPtr->interp); } -- cgit v0.12 From 1e53451f28489099ede27c46d8672b7281e44614 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 23 Nov 2009 20:17:36 +0000 Subject: #undef STATIC_BUILD in tclWin(Dde|Reg).c, in order to make sure that Xxxxx_Init is always exported even when Tcl is built static (otherwise we cannot create a DLL). tclThreadTest.c: Make all functions static, except TclThread_Init. fCmd.test Enable fCmd-30.1 when registry is available. tcl.m4 Fix ${SHLIB_LD_LIBS} definition, fix conflicts configure.in between static libraries and import library on windows. configure (regenerated) Makefile.in Simplifications related to tcl.m4 changes. --- ChangeLog | 12 +++++ generic/tclTest.c | 3 +- generic/tclThreadTest.c | 68 ++++++++++++------------- tests/fCmd.test | 23 ++++++--- win/Makefile.in | 132 +++++++++++++++--------------------------------- win/configure | 40 ++++----------- win/configure.in | 21 ++------ win/tcl.m4 | 19 +++---- win/tclWinDde.c | 15 +++--- win/tclWinReg.c | 3 +- 10 files changed, 137 insertions(+), 199 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb5fc21..42545fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-11-23 Jan Nijtmans + + * win/tclWinDde.c #undef STATIC_BUILD, in order to make sure that + * win/tclWinReg.c Xxxxx_Init is always exported even when Tcl is + * generic/tclTest.c built static (otherwise we cannot create a DLL). + * generic/tclThreadTest.c Make all functions static, except TclThread_Init. + * tests/fCmd.test Enable fCmd-30.1 when registry is available. + * win/tcl.m4 Fix ${SHLIB_LD_LIBS} definition, fix conflicts + * win/Makefile.in Simplifications related to tcl.m4 changes. + * win/configure.in between static libraries and import library on windows. + * win/configure (regenerated) + 2009-11-23 Kevin B. Kenny * generic/tclThreadTest.c (NewTestThread): [Bug 2901803] diff --git a/generic/tclTest.c b/generic/tclTest.c index 4e739db..07f1511 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,9 +14,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.140 2009/11/19 21:17:36 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.141 2009/11/23 20:17:36 nijtmans Exp $ */ +#undef STATIC_BUILD #ifndef USE_TCL_STUBS # define USE_TCL_STUBS #endif diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index e009a86..8607b15 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.34 2009/11/23 19:00:49 kennykb Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.35 2009/11/23 20:17:36 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -60,7 +60,7 @@ static ThreadSpecificData *threadList; /* * An instance of the following structure contains all information that is * passed into a new thread when the thread is created using either the - * "thread create" Tcl command or the TclCreateThread() C function. + * "thread create" Tcl command or the ThreadCreate() C function. */ typedef struct ThreadCtrl { @@ -121,25 +121,18 @@ static char *errorProcString; TCL_DECLARE_MUTEX(threadMutex) -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLEXPORT - -EXTERN int TclThread_Init(Tcl_Interp *interp); -EXTERN int Tcl_ThreadObjCmd(ClientData clientData, +static int ThreadObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -EXTERN int TclCreateThread(Tcl_Interp *interp, const char *script, +static int ThreadCreate(Tcl_Interp *interp, const char *script, int joinable); -EXTERN int TclThreadList(Tcl_Interp *interp); -EXTERN int TclThreadSend(Tcl_Interp *interp, Tcl_ThreadId id, +static int ThreadList(Tcl_Interp *interp); +static int ThreadSend(Tcl_Interp *interp, Tcl_ThreadId id, const char *script, int wait); -EXTERN int TclThreadCancel(Tcl_Interp *interp, Tcl_ThreadId id, +static int ThreadCancel(Tcl_Interp *interp, Tcl_ThreadId id, const char *result, int flags); -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - -Tcl_ThreadCreateType NewTestThread(ClientData clientData); +static Tcl_ThreadCreateType NewTestThread(ClientData clientData); static void ListRemove(ThreadSpecificData *tsdPtr); static void ListUpdateInner(ThreadSpecificData *tsdPtr); static int ThreadEventProc(Tcl_Event *evPtr, int mask); @@ -148,6 +141,7 @@ static void ThreadFreeProc(ClientData clientData); static int ThreadDeleteEvent(Tcl_Event *eventPtr, ClientData clientData); static void ThreadExitProc(ClientData clientData); +extern int Tcltest_Init(Tcl_Interp *interp); /* *---------------------------------------------------------------------- @@ -179,7 +173,7 @@ TclThread_Init( } Tcl_MutexUnlock(&threadMutex); - Tcl_CreateObjCommand(interp, "testthread", Tcl_ThreadObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testthread", ThreadObjCmd, NULL, NULL); return TCL_OK; } @@ -187,7 +181,7 @@ TclThread_Init( /* *---------------------------------------------------------------------- * - * Tcl_ThreadObjCmd -- + * ThreadObjCmd -- * * This procedure is invoked to process the "testthread" Tcl command. See * the user documentation for details on what it does. @@ -213,8 +207,8 @@ TclThread_Init( */ /* ARGSUSED */ -int -Tcl_ThreadObjCmd( +static int +ThreadObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -281,7 +275,7 @@ Tcl_ThreadObjCmd( } else { result = NULL; } - return TclThreadCancel(interp, (Tcl_ThreadId) id, result, flags); + return ThreadCancel(interp, (Tcl_ThreadId) id, result, flags); } case THREAD_CREATE: { const char *script; @@ -326,7 +320,7 @@ Tcl_ThreadObjCmd( Tcl_WrongNumArgs(interp, 2, objv, "?-joinable? ?script?"); return TCL_ERROR; } - return TclCreateThread(interp, script, joinable); + return ThreadCreate(interp, script, joinable); } case THREAD_EXIT: if (objc > 2) { @@ -390,7 +384,7 @@ Tcl_ThreadObjCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } - return TclThreadList(interp); + return ThreadList(interp); case THREAD_SEND: { long id; const char *script; @@ -416,7 +410,7 @@ Tcl_ThreadObjCmd( } arg++; script = Tcl_GetString(objv[arg]); - return TclThreadSend(interp, (Tcl_ThreadId) id, script, wait); + return ThreadSend(interp, (Tcl_ThreadId) id, script, wait); } case THREAD_EVENT: { if (objc > 2) { @@ -486,7 +480,7 @@ Tcl_ThreadObjCmd( /* *---------------------------------------------------------------------- * - * TclCreateThread -- + * ThreadCreate -- * * This procedure is invoked to create a thread containing an interp to * run a script. This returns after the thread has started executing. @@ -501,8 +495,8 @@ Tcl_ThreadObjCmd( */ /* ARGSUSED */ -int -TclCreateThread( +static int +ThreadCreate( Tcl_Interp *interp, /* Current interpreter. */ const char *script, /* Script to execute */ int joinable) /* Flag, joinable thread or not */ @@ -588,7 +582,7 @@ NewTestThread( * use by the new thread. */ - result = Tcl_Eval(tsdPtr->interp, "load {} Tcltest"); + result = Tcltest_Init(tsdPtr->interp); if (result != TCL_OK) { ThreadErrorProc(tsdPtr->interp); } @@ -679,7 +673,7 @@ ThreadErrorProc( argv[1] = buf; argv[2] = errorInfo; script = Tcl_Merge(3, argv); - TclThreadSend(interp, errorThreadId, script, 0); + ThreadSend(interp, errorThreadId, script, 0); ckfree(script); } } @@ -758,7 +752,7 @@ ListRemove( /* *------------------------------------------------------------------------ * - * TclThreadList -- + * ThreadList -- * * Return a list of threads running Tcl interpreters. * @@ -770,8 +764,8 @@ ListRemove( * *------------------------------------------------------------------------ */ -int -TclThreadList( +static int +ThreadList( Tcl_Interp *interp) { ThreadSpecificData *tsdPtr; @@ -791,7 +785,7 @@ TclThreadList( /* *------------------------------------------------------------------------ * - * TclThreadSend -- + * ThreadSend -- * * Send a script to another thread. * @@ -804,8 +798,8 @@ TclThreadList( *------------------------------------------------------------------------ */ -int -TclThreadSend( +static int +ThreadSend( Tcl_Interp *interp, /* The current interpreter. */ Tcl_ThreadId id, /* Thread Id of other interpreter. */ const char *script, /* The script to evaluate. */ @@ -946,7 +940,7 @@ TclThreadSend( /* *------------------------------------------------------------------------ * - * TclThreadCancel -- + * ThreadCancel -- * * Cancels a script in another thread. * @@ -959,8 +953,8 @@ TclThreadSend( *------------------------------------------------------------------------ */ -int -TclThreadCancel( +static int +ThreadCancel( Tcl_Interp *interp, /* The current interpreter. */ Tcl_ThreadId id, /* Thread Id of other interpreter. */ const char *result, /* The result or NULL for default. */ diff --git a/tests/fCmd.test b/tests/fCmd.test index 53360b3..839d0fd 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.66 2009/11/07 09:24:22 patthoyts Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.67 2009/11/23 20:17:36 nijtmans Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -27,7 +27,18 @@ testConstraint winOlderThan2000 0 testConstraint notNetworkFilesystem 0 testConstraint 95or98 [expr {[testConstraint 95] || [testConstraint 98]}] testConstraint 2000orNewer [expr {![testConstraint 95or98]}] -testConstraint registryPackage [expr {![catch {package require registry}]}] +testConstraint reg 0 +if {[testConstraint win]} { + catch { + # Is the registry extension already static to this shell? + if [catch {load {} Registry; set ::reglib {}}] { + # try the location given to use on the commandline to tcltest + ::tcltest::loadTestedCommands + load $::reglib Registry + } + testConstraint reg 1 + } +} # Find a group that exists on this Unix system, or else skip tests that # require Unix groups. @@ -1025,7 +1036,7 @@ test fCmd-10.3 {file copy: comprehensive: dir to new name} -setup { } -result [list {td1 td2 td3 td4} [file join td3 tdx] [file join td4 tdy] 1 0] test fCmd-10.3.1 {file copy: comprehensive: dir to new name} -setup { cleanup -} -constraints {notRoot win 2000orNewer testchmod} -body { +} -constraints {notRoot 2000orNewer testchmod} -body { # On Windows with ACLs, copying a directory is defined like this file mkdir [file join td1 tdx] file mkdir [file join td2 tdy] @@ -1124,7 +1135,7 @@ test fCmd-10.8 {file rename: comprehensive: dir to new name and dir} -setup { } -result [subst {{td1 td2 td3} {[file join td3 td3] [file join td3 td4]} 1 0}] test fCmd-10.8.1 {file rename: comprehensive: dir to new name and dir} -setup { cleanup -} -constraints {notRoot win 2000orNewer testchmod} -body { +} -constraints {notRoot 2000orNewer testchmod} -body { # On Windows with ACLs, copying a directory is defined like this file mkdir td1 file mkdir td2 @@ -2538,10 +2549,10 @@ removeDirectory abc.dir test fCmd-30.1 {file writable on 'My Documents'} -setup { # Get the localized version of the folder name by looking in the registry. set mydocsname [registry get {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths} $tcl_platform(user)] -} -constraints {win 2000orNewer registryPackage} -body { +} -constraints {2000orNewer reg} -body { file writable $mydocsname } -result 1 -test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {win 2000orNewer knownBug} -body { +test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {2000orNewer knownBug} -body { # Apparently the OS has this file open with exclusive permissions Windows # doesn't provide any way to determine that fact without actually trying # to open the file (open NTUSER.dat r), which fails. Hence this isn't diff --git a/win/Makefile.in b/win/Makefile.in index 9636641..14208f5 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.164 2009/11/19 21:23:51 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.165 2009/11/23 20:17:36 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -132,23 +132,18 @@ REGDOTVER = @TCL_REG_MAJOR_VERSION@.@TCL_REG_MINOR_VERSION@ TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ TCL_DLL_FILE = @TCL_DLL_FILE@ -TCL_STATIC_LIB_FILE = @TCL_STATIC_LIB_FILE@ -TCL_IMPORT_LIB_FILE = @TCL_IMPORT_LIB_FILE@ TCL_LIB_FILE = @TCL_LIB_FILE@ -ZLIB_DLL_FILE = zlib1.dll -UNICOWS_DLL_FILE = unicows.dll DDE_DLL_FILE = tcldde$(DDEVER)${DLLSUFFIX} -DDE_LIB_FILE = tcldde$(DDEVER)${LIBSUFFIX} +DDE_LIB_FILE = @LIBPREFIX@tcldde$(DDEVER)${LIBSUFFIX} REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX} -REG_LIB_FILE = tclreg$(REGVER)${LIBSUFFIX} +REG_LIB_FILE = @LIBPREFIX@tclreg$(REGVER)${LIBSUFFIX} TEST_DLL_FILE = tcltest$(VER)${DLLSUFFIX} -TEST_LIB_FILE = tcltest$(VER)${LIBSUFFIX} +TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${LIBSUFFIX} PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX} +ZLIB_DLL_FILE = zlib1.dll -SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @UNICOWS_DLL_FILE@ $(TCL_STUB_LIB_FILE) \ - $(DDE_DLL_FILE) $(REG_DLL_FILE) $(TEST_DLL_FILE) $(PIPE_DLL_FILE) -STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) \ - $(TEST_LIB_FILE) $(DDE_DLL_FILE) $(REG_DLL_FILE) $(TEST_DLL_FILE) +SHARED_LIBRARIES = $(TCL_DLL_FILE) $(PIPE_DLL_FILE) @ZLIB_DLL_FILE@ +STATIC_LIBRARIES = $(TCL_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) # TCL_EXE is the name of a tclsh executable that is available *BEFORE* running # make for the first time. Certain build targets (make genstubs) need it to be @@ -195,13 +190,11 @@ SHELL = @SHELL@ RM = rm -f COPY = cp -CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \ +CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} -I"${ZLIB_DIR}" \ -I"${GENERIC_DIR_NATIVE}" -DTCL_TOMMATH -DMP_PREC=4 -I"${TOMMATH_DIR_NATIVE}" \ -I"${WIN_DIR_NATIVE}" ${AC_FLAGS} \ ${COMPILE_DEBUG_FLAGS} -ZLIB_INC = -I"${ZLIB_DIR}" - CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -391,18 +384,17 @@ STUB_OBJS = \ TCLSH_OBJS = tclAppInit.$(OBJEXT) ZLIB_OBJS = \ - Zadler32.$(OBJEXT) \ - Zcompress.$(OBJEXT) \ - Zcrc32.$(OBJEXT) \ - Zdeflate.$(OBJEXT) \ - Zgzio.$(OBJEXT) \ - Zinfback.$(OBJEXT) \ - Zinffast.$(OBJEXT) \ - Zinflate.$(OBJEXT) \ - Zinftrees.$(OBJEXT) \ - Ztrees.$(OBJEXT) \ - Zuncompr.$(OBJEXT) \ - Zzutil.$(OBJEXT) + adler32.$(OBJEXT) \ + compress.$(OBJEXT) \ + crc32.$(OBJEXT) \ + deflate.$(OBJEXT) \ + infback.$(OBJEXT) \ + inffast.$(OBJEXT) \ + inflate.$(OBJEXT) \ + inftrees.$(OBJEXT) \ + trees.$(OBJEXT) \ + uncompr.$(OBJEXT) \ + zutil.$(OBJEXT) TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} @ZLIB_OBJS@ @@ -412,7 +404,7 @@ all: binaries libraries doc packages tcltest: $(TCLTEST) -binaries: @LIBRARIES@ $(TCLSH) +binaries: $(TCL_STUB_LIB_FILE) @LIBRARIES@ $(DDE_DLL_FILE) $(REG_DLL_FILE) $(TCLSH) libraries: @@ -422,8 +414,8 @@ $(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -$(TCLTEST): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(TCLTEST_OBJS) testMain.$(OBJEXT) $(CAT32) tclsh.$(RES) - $(CC) $(CFLAGS) $(TCLTEST_OBJS) testMain.$(OBJEXT) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ +$(TCLTEST): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) ${TEST_LIB_FILE} testMain.$(OBJEXT) $(CAT32) tclsh.$(RES) + $(CC) $(CFLAGS) testMain.$(OBJEXT) ${TEST_LIB_FILE} $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) cat32.$(OBJEXT): cat.c @@ -440,20 +432,24 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS} @MAKE_LIB@ ${STUB_OBJS} @POST_MAKE_LIB@ -${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE): ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @UNICOWS_DLL_FILE@ - @$(RM) ${TCL_DLL_FILE} $(TCL_IMPORT_LIB_FILE) +${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ + @$(RM) ${TCL_DLL_FILE} $(TCL_LIB_FILE) @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) -${TCL_STATIC_LIB_FILE}: ${TCL_OBJS} - @$(RM) ${TCL_STATIC_LIB_FILE} +${TCL_LIB_FILE}: ${TCL_OBJS} + @$(RM) ${TCL_LIB_FILE} @MAKE_LIB@ ${TCL_OBJS} @POST_MAKE_LIB@ # assume GNU make ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} - @$(RM) ${DDE_DLL_FILE} + @-$(RM) ${DDE_DLL_FILE} ${DDE_LIB_FILE}.backup + @-$(COPY) ${DDE_LIB_FILE} ${DDE_LIB_FILE}.backup @MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) + @-$(RM) ${DDE_LIB_FILE} + @-$(COPY) ${DDE_LIB_FILE}.backup ${DDE_LIB_FILE} + @-$(RM) ${DDE_LIB_FILE}.backup ${DDE_LIB_FILE}: ${DDE_OBJS} tclStubLib.$(OBJEXT) @$(RM) ${DDE_LIB_FILE} @@ -461,8 +457,12 @@ ${DDE_LIB_FILE}: ${DDE_OBJS} tclStubLib.$(OBJEXT) @POST_MAKE_LIB@ ${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE} - @$(RM) ${REG_DLL_FILE} + @-$(RM) ${REG_DLL_FILE} ${REG_LIB_FILE}.backup + @-$(COPY) ${REG_LIB_FILE} ${REG_LIB_FILE}.backup @MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) + @-$(RM) ${REG_LIB_FILE} + @-$(COPY) ${REG_LIB_FILE}.backup ${REG_LIB_FILE} + @-$(RM) ${REG_LIB_FILE}.backup ${REG_LIB_FILE}: ${REG_OBJS} tclStubLib.$(OBJEXT) @$(RM) ${REG_LIB_FILE} @@ -470,8 +470,12 @@ ${REG_LIB_FILE}: ${REG_OBJS} tclStubLib.$(OBJEXT) @POST_MAKE_LIB@ ${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE} - @$(RM) ${TEST_DLL_FILE} + @-$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}.backup + @-$(COPY) ${TEST_LIB_FILE} ${TEST_LIB_FILE}.backup @MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) + @-$(RM) ${TEST_LIB_FILE} + @-$(COPY) ${TEST_LIB_FILE}.backup ${TEST_LIB_FILE} + @-$(RM) ${TEST_LIB_FILE}.backup ${TEST_LIB_FILE}: ${TCLTEST_OBJS} tclStubLib.$(OBJEXT) @$(RM) ${TEST_LIB_FILE} @@ -482,10 +486,6 @@ ${TEST_LIB_FILE}: ${TCLTEST_OBJS} tclStubLib.$(OBJEXT) ${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} @$(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE} -# use pre-built unicows.dll -${UNICOWS_DLL_FILE}: $(COMPAT_DIR)/mslu/${UNICOWS_DLL_FILE} - @$(COPY) $(COMPAT_DIR)/mslu/${UNICOWS_DLL_FILE} ${UNICOWS_DLL_FILE} - # PIPE_DLL_FILE is actually an executable, don't build it like a DLL. ${PIPE_DLL_FILE}: ${PIPE_OBJS} @@ -511,54 +511,6 @@ tclWinPipe.${OBJEXT}: tclWinPipe.c testMain.${OBJEXT}: tclAppInit.c $(CC) -c $(CC_SWITCHES) -DTCL_TEST @DEPARG@ $(CC_OBJNAME) -tclTest.${OBJEXT}: tclTest.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - -tclTestObj.${OBJEXT}: tclTestObj.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - -tclWinTest.${OBJEXT}: tclWinTest.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - -tclWinReg.${OBJEXT}: tclWinReg.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - -tclWinDde.${OBJEXT}: tclWinDde.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - -tclAppInit.${OBJEXT} : tclAppInit.c - $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) - -# For building zlib, only used in some build configurations - -Zadler32.$(OBJEXT): $(ZLIB_DIR)/adler32.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zcompress.$(OBJEXT): $(ZLIB_DIR)/compress.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zcrc32.$(OBJEXT): $(ZLIB_DIR)/crc32.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zdeflate.$(OBJEXT): $(ZLIB_DIR)/deflate.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zgzio.$(OBJEXT): $(ZLIB_DIR)/gzio.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zinfback.$(OBJEXT): $(ZLIB_DIR)/infback.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zinffast.$(OBJEXT): $(ZLIB_DIR)/inffast.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zinflate.$(OBJEXT): $(ZLIB_DIR)/inflate.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zinftrees.$(OBJEXT): $(ZLIB_DIR)/inftrees.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Ztrees.$(OBJEXT): $(ZLIB_DIR)/trees.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zuncompr.$(OBJEXT): $(ZLIB_DIR)/uncompr.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) -Zzutil.$(OBJEXT): $(ZLIB_DIR)/zutil.c - $(CC) -c $(CC_SWITCHES) -I$(ZLIB_DIR) @DEPARG@ $(CC_OBJNAME) - -tclZlib.${OBJEXT} : tclZlib.c - $(CC) -c ${ZLIB_INC} $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME) - # TIP #59, embedding of configuration information into the binary library. # # Part of Tcl's configuration information are the paths where it was installed @@ -638,7 +590,7 @@ install-binaries: binaries else true; \ fi; \ done; - @for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(UNICOWS_DLL_FILE) $(TCLSH) $(PIPE_DLL_FILE); \ + @for i in $(TCL_DLL_FILE) $(ZLIB_DLL_FILE) $(TCLSH) $(PIPE_DLL_FILE); \ do \ if [ -f $$i ]; then \ echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \ diff --git a/win/configure b/win/configure index c1258fe..ee83212 100755 --- a/win/configure +++ b/win/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR UNICOWS_DLL_FILE DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3908,7 +3908,7 @@ echo $ECHO_N "checking compiler flags... $ECHO_C" >&6 echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} fi SHLIB_LD="" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='${LIBS}' LIBS="-lws2_32" # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" @@ -3954,8 +3954,6 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} echo "$as_me:$LINENO: result: using static flags" >&5 echo "${ECHO_T}using static flags" >&6 runtime= - LIBSUFFIX="s\${DBGX}.a" - LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else @@ -3975,8 +3973,6 @@ echo "$as_me: error: ${CC} does not support the -shared option. runtime= # Add SHLIB_LD_LIBS to the Make rule, not here. - LIBSUFFIX="\${DBGX}.a" - LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi @@ -3990,6 +3986,8 @@ echo "$as_me: error: ${CC} does not support the -shared option. # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + LIBSUFFIX="\${DBGX}.a" + LIBFLAGSUFFIX="\${DBGX}" SHLIB_SUFFIX=.dll EXTRA_CFLAGS="${extra_cflags}" @@ -4029,8 +4027,6 @@ echo "$as_me: error: ${CC} does not support the -shared option. echo "$as_me:$LINENO: result: using static flags" >&5 echo "${ECHO_T}using static flags" >&6 runtime=-MT - LIBSUFFIX="s\${DBGX}.lib" - LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else @@ -4039,15 +4035,15 @@ echo "${ECHO_T}using static flags" >&6 echo "${ECHO_T}using shared flags" >&6 runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. - LIBSUFFIX="\${DBGX}.lib" - LIBFLAGSUFFIX="\${DBGX}" - EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" + EXESUFFIX="\${DBGX}.exe" fi MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + LIBSUFFIX="\${DBGX}.lib" + LIBFLAGSUFFIX="\${DBGX}" # This is a 2-stage check to make sure we have the 64-bit SDK # We have to know where the SDK is installed. @@ -4281,6 +4277,7 @@ _ACEOF fi SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}" + SHLIB_LD_LIBS='${LIBS}' # link -lib only works when -lib is the first arg STLIB_LD="${LINKBIN} -lib ${lflags}" RC_OUT=-fo @@ -4323,7 +4320,6 @@ _ACEOF fi - # DL_LIBS is empty, but then we match the Unix version @@ -4476,22 +4472,9 @@ eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\"" eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_PATH=\"${libdir}/${TCL_STUB_LIB_FILE}\"" -eval "TCL_STATIC_LIB_FILE=\"${LIBPREFIX}tcl${VER}s${LIBSUFFIX}\"" -eval "TCL_STATIC_LIB_FLAG=\"-ltcl${VER}s${LIBFLAGSUFFIX}\"" - -eval "TCL_IMPORT_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" -eval "TCL_IMPORT_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" - -if test ${SHARED_BUILD} = 0 ; then - eval "TCL_LIB_FILE=\"${TCL_STATIC_LIB_FILE}\"" - eval "TCL_LIB_FLAG=\"${TCL_STATIC_LIB_FLAG}\"" -else - eval "TCL_LIB_FILE=\"${TCL_IMPORT_LIB_FILE}\"" - eval "TCL_LIB_FLAG=\"${TCL_IMPORT_LIB_FLAG}\"" -fi -eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\"" -eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\"" - +eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" +eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` -ltcl${VER}${FLAGSUFFIX}\"" +eval "TCL_LIB_SPEC=\"-L${libdir} -ltcl${VER}${FLAGSUFFIX}\"" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" @@ -5285,7 +5268,6 @@ s,@SET_MAKE@,$SET_MAKE,;t t s,@TCL_THREADS@,$TCL_THREADS,;t t s,@CYGPATH@,$CYGPATH,;t t s,@CELIB_DIR@,$CELIB_DIR,;t t -s,@UNICOWS_DLL_FILE@,$UNICOWS_DLL_FILE,;t t s,@DL_LIBS@,$DL_LIBS,;t t s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t diff --git a/win/configure.in b/win/configure.in index 4f6356e..f8d54ce 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.118 2009/04/30 22:37:46 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.119 2009/11/23 20:17:36 nijtmans Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -404,22 +404,9 @@ eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\"" eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_PATH=\"${libdir}/${TCL_STUB_LIB_FILE}\"" -eval "TCL_STATIC_LIB_FILE=\"${LIBPREFIX}tcl${VER}s${LIBSUFFIX}\"" -eval "TCL_STATIC_LIB_FLAG=\"-ltcl${VER}s${LIBFLAGSUFFIX}\"" - -eval "TCL_IMPORT_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" -eval "TCL_IMPORT_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" - -if test ${SHARED_BUILD} = 0 ; then - eval "TCL_LIB_FILE=\"${TCL_STATIC_LIB_FILE}\"" - eval "TCL_LIB_FLAG=\"${TCL_STATIC_LIB_FLAG}\"" -else - eval "TCL_LIB_FILE=\"${TCL_IMPORT_LIB_FILE}\"" - eval "TCL_LIB_FLAG=\"${TCL_IMPORT_LIB_FLAG}\"" -fi -eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\"" -eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\"" - +eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" +eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` -ltcl${VER}${FLAGSUFFIX}\"" +eval "TCL_LIB_SPEC=\"-L${libdir} -ltcl${VER}${FLAGSUFFIX}\"" # Install time header dir can be set via --includedir eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" diff --git a/win/tcl.m4 b/win/tcl.m4 index 002ac44..dbd89d3 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -373,6 +373,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ # MAKE_DLL # # LIBSUFFIX +# LIBFLAGSUFFIX # LIBPREFIX # LIBRARIES # EXESUFFIX @@ -445,7 +446,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_MSG_WARN([64bit mode not supported with GCC on Windows]) fi SHLIB_LD="" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='${LIBS}' LIBS="-lws2_32" # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" @@ -490,8 +491,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # static AC_MSG_RESULT([using static flags]) runtime= - LIBSUFFIX="s\${DBGX}.a" - LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else @@ -507,8 +506,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ runtime= # Add SHLIB_LD_LIBS to the Make rule, not here. - LIBSUFFIX="\${DBGX}.a" - LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi @@ -522,6 +519,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + LIBSUFFIX="\${DBGX}.a" + LIBFLAGSUFFIX="\${DBGX}" SHLIB_SUFFIX=.dll EXTRA_CFLAGS="${extra_cflags}" @@ -560,8 +559,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # static AC_MSG_RESULT([using static flags]) runtime=-MT - LIBSUFFIX="s\${DBGX}.lib" - LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else @@ -569,15 +566,15 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_MSG_RESULT([using shared flags]) runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. - LIBSUFFIX="\${DBGX}.lib" - LIBFLAGSUFFIX="\${DBGX}" - EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" + EXESUFFIX="\${DBGX}.exe" fi MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" + LIBSUFFIX="\${DBGX}.lib" + LIBFLAGSUFFIX="\${DBGX}" # This is a 2-stage check to make sure we have the 64-bit SDK # We have to know where the SDK is installed. @@ -735,6 +732,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}" + SHLIB_LD_LIBS='${LIBS}' # link -lib only works when -lib is the first arg STLIB_LD="${LINKBIN} -lib ${lflags}" RC_OUT=-fo @@ -773,7 +771,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ if test "$do64bit" != "no" ; then AC_DEFINE(TCL_CFG_DO64BIT) fi - AC_SUBST(UNICOWS_DLL_FILE) # DL_LIBS is empty, but then we match the Unix version AC_SUBST(DL_LIBS) diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 5f82d76..742ff05 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,9 +9,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.37 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.38 2009/11/23 20:17:36 nijtmans Exp $ */ +#undef STATIC_BUILD #ifndef USE_TCL_STUBS # define USE_TCL_STUBS #endif @@ -114,7 +115,7 @@ static int MakeDdeConnection(Tcl_Interp *interp, const char *name, HCONV *ddeConvPtr); static void SetDdeError(Tcl_Interp *interp); -int Tcl_DdeObjCmd(ClientData clientData, +static int DdeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -147,7 +148,7 @@ Dde_Init( return TCL_ERROR; } - Tcl_CreateObjCommand(interp, "dde", Tcl_DdeObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "dde", DdeObjCmd, NULL, NULL); tsdPtr = TCL_TSD_INIT(&dataKey); Tcl_CreateExitHandler(DdeExitProc, NULL); return Tcl_PkgProvide(interp, TCL_DDE_PACKAGE_NAME, TCL_DDE_VERSION); @@ -403,7 +404,7 @@ DdeSetServerName( Tcl_ExposeCommand(interp, "dde", "dde"); } - Tcl_CreateObjCommand(interp, "dde", Tcl_DdeObjCmd, + Tcl_CreateObjCommand(interp, "dde", DdeObjCmd, (ClientData) riPtr, DeleteProc); if (Tcl_IsSafe(interp)) { Tcl_HideCommand(interp, "dde", "dde"); @@ -1125,7 +1126,7 @@ SetDdeError( /* *---------------------------------------------------------------------- * - * Tcl_DdeObjCmd -- + * DdeObjCmd -- * * This function is invoked to process the "dde" Tcl command. See the * user documentation for details on what it does. @@ -1139,8 +1140,8 @@ SetDdeError( *---------------------------------------------------------------------- */ -int -Tcl_DdeObjCmd( +static int +DdeObjCmd( ClientData clientData, /* Used only for deletion */ Tcl_Interp *interp, /* The interp we are sending from */ int objc, /* Number of arguments */ diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 84fda68..4e6ba89 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,9 +11,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.48 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.49 2009/11/23 20:17:36 nijtmans Exp $ */ +#undef STATIC_BUILD #ifndef USE_TCL_STUBS # define USE_TCL_STUBS #endif -- cgit v0.12 From 82d65817f8ee6263a2d59d1f3e02a5c328d1372f Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 23 Nov 2009 20:36:30 +0000 Subject: Test constraint 2000orNewer should only be true on Windows platform --- tests/fCmd.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fCmd.test b/tests/fCmd.test index 839d0fd..9f588e4 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.67 2009/11/23 20:17:36 nijtmans Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.68 2009/11/23 20:36:30 dgp Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -26,7 +26,7 @@ testConstraint winOlderThan2000 0 # Don't know how to determine this constraint correctly testConstraint notNetworkFilesystem 0 testConstraint 95or98 [expr {[testConstraint 95] || [testConstraint 98]}] -testConstraint 2000orNewer [expr {![testConstraint 95or98]}] +testConstraint 2000orNewer [expr {[testConstraint win] && ![testConstraint 95or98]}] testConstraint reg 0 if {[testConstraint win]} { catch { -- cgit v0.12 From c2577af29d148dccad05d2fa42683f952004ff92 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 23 Nov 2009 21:26:32 +0000 Subject: makefile.vc: Add stub library to necessary link lines --- ChangeLog | 1 + win/makefile.vc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42545fd..e86135d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ * win/Makefile.in Simplifications related to tcl.m4 changes. * win/configure.in between static libraries and import library on windows. * win/configure (regenerated) + * win/makefile.vc Add stub library to necessary link lines 2009-11-23 Kevin B. Kenny diff --git a/win/makefile.vc b/win/makefile.vc index 3bcbbd1..a4e21e2 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.202 2009/11/02 00:04:48 mistachkin Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.203 2009/11/23 21:26:32 nijtmans Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -603,11 +603,11 @@ $** $(TCLSTUBLIB): $(TCLSTUBOBJS) $(lib32) -nologo $(LINKERFLAGS) -out:$@ $(TCLSTUBOBJS) -$(TCLSH): $(TCLSHOBJS) $(TCLIMPLIB) +$(TCLSH): $(TCLSHOBJS) $(TCLSTUBLIB) $(TCLIMPLIB) $(link32) $(conlflags) -stack:2300000 -out:$@ $(baselibs) $** $(_VC_MANIFEST_EMBED_EXE) -$(TCLTEST): $(TCLTESTOBJS) $(TCLIMPLIB) +$(TCLTEST): $(TCLTESTOBJS) $(TCLSTUBLIB) $(TCLIMPLIB) $(link32) $(conlflags) -stack:2300000 -out:$@ $(baselibs) $** $(_VC_MANIFEST_EMBED_EXE) -- cgit v0.12 From 23ffc9c37d094e8160dac2bc59700f2f3d2938bd Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 23 Nov 2009 22:14:27 +0000 Subject: * tests/fCmd.test (fCmd-30.1): Changed registry location of the 'My Documents' folder to the one that's correct for Windows 2000, XP, Server 2003, Vista, Server 2008, and Windows 7. (See http://support.microsoft.com/kb/310746) --- ChangeLog | 7 +++++++ tests/fCmd.test | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e86135d..276716c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-23 Kevin Kenny + + * tests/fCmd.test (fCmd-30.1): Changed registry location of the + 'My Documents' folder to the one that's correct for Windows 2000, + XP, Server 2003, Vista, Server 2008, and Windows 7. + (See http://support.microsoft.com/kb/310746) + 2009-11-23 Jan Nijtmans * win/tclWinDde.c #undef STATIC_BUILD, in order to make sure that diff --git a/tests/fCmd.test b/tests/fCmd.test index 9f588e4..c677a45 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.68 2009/11/23 20:36:30 dgp Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.69 2009/11/23 22:14:27 kennykb Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -2548,7 +2548,7 @@ removeDirectory abc.dir test fCmd-30.1 {file writable on 'My Documents'} -setup { # Get the localized version of the folder name by looking in the registry. - set mydocsname [registry get {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths} $tcl_platform(user)] + set mydocsname [registry get {HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders} Personal] } -constraints {2000orNewer reg} -body { file writable $mydocsname } -result 1 -- cgit v0.12 From 77d958cdf70019e4a515d2752fff18018f8ee18b Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 23 Nov 2009 23:06:56 +0000 Subject: library/tclIndex (regenerated) to reflect various changes in safe.tcl and other library files. --- ChangeLog | 5 +++ library/tclIndex | 92 +++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 73 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 276716c..c24421a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-23 Jan Nijtmans + + * library/tclIndex (regenerated) to reflect various changes + in safe.tcl and other files. + 2009-11-23 Kevin Kenny * tests/fCmd.test (fCmd-30.1): Changed registry location of the diff --git a/library/tclIndex b/library/tclIndex index 010616f..9d6c38f 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -18,6 +18,53 @@ set auto_index(::auto_mkindex_parser::slavehook) [list source [file join $dir au set auto_index(::auto_mkindex_parser::command) [list source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::commandInit) [list source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::fullname) [list source [file join $dir auto.tcl]] +set auto_index(::tcl::clock::Initialize) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::format) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ParseClockFormatFormat) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ParseClockFormatFormat2) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::scan) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::FreeScan) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ParseClockScanFormat) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::LocaleNumeralMatcher) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::UniquePrefixRegexp) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::MakeUniquePrefixRegexp) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::MakeParseCodeFromFields) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::EnterLocale) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::LoadWindowsDateTimeFormats) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::LocalizeFormat) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::FormatNumericTimeZone) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::FormatStarDate) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ParseStarDate) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ScanWide) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::InterpretTwoDigitYear) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::AssignBaseYear) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::AssignBaseIso8601Year) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::AssignBaseMonth) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::AssignBaseWeek) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::AssignBaseJulianDay) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::InterpretHMSP) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::InterpretHMS) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::GetSystemTimeZone) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ConvertLegacyTimeZone) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::SetupTimeZone) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::GuessWindowsTimeZone) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::LoadTimeZoneFile) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::LoadZoneinfoFile) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ReadZoneinfoFile) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ParsePosixTimeZone) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ProcessPosixTimeZone) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::DeterminePosixDSTTime) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::GetLocaleEra) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::GetJulianDayFromEraYearDay) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::GetJulianDayFromEraYearMonthWeekDay) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::IsGregorianLeapYear) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::WeekdayOnOrBefore) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::BSearch) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::add) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::AddMonths) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::AddDays) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::mc) [list source [file join $dir clock.tcl]] +set auto_index(::tcl::clock::ClearCaches) [list source [file join $dir clock.tcl]] set auto_index(history) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistAdd) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistKeep) [list source [file join $dir history.tcl]] @@ -27,11 +74,21 @@ set auto_index(::tcl::HistRedo) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistIndex) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistEvent) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistChange) [list source [file join $dir history.tcl]] +set auto_index(::tcl::HistNextID) [list source [file join $dir history.tcl]] +set auto_index(::tcl::mathfunc::min) [list source [file join $dir init.tcl]] +set auto_index(::tcl::mathfunc::max) [list source [file join $dir init.tcl]] +set auto_index(unknown) [list source [file join $dir init.tcl]] +set auto_index(auto_load) [list source [file join $dir init.tcl]] +set auto_index(auto_load_index) [list source [file join $dir init.tcl]] +set auto_index(auto_qualify) [list source [file join $dir init.tcl]] +set auto_index(auto_import) [list source [file join $dir init.tcl]] +set auto_index(::tcl::CopyDirectory) [list source [file join $dir init.tcl]] +set auto_index(::tcl::Pkg::CompareExtension) [list source [file join $dir package.tcl]] set auto_index(pkg_mkIndex) [list source [file join $dir package.tcl]] set auto_index(tclPkgSetup) [list source [file join $dir package.tcl]] set auto_index(tclPkgUnknown) [list source [file join $dir package.tcl]] set auto_index(::tcl::MacOSXPkgUnknown) [list source [file join $dir package.tcl]] -set auto_index(::pkg::create) [list source [file join $dir package.tcl]] +set auto_index(::tcl::Pkg::Create) [list source [file join $dir package.tcl]] set auto_index(parray) [list source [file join $dir parray.tcl]] set auto_index(::safe::InterpStatics) [list source [file join $dir safe.tcl]] set auto_index(::safe::InterpNested) [list source [file join $dir safe.tcl]] @@ -48,40 +105,27 @@ set auto_index(::safe::AddSubDirs) [list source [file join $dir safe.tcl]] set auto_index(::safe::interpDelete) [list source [file join $dir safe.tcl]] set auto_index(::safe::setLogCmd) [list source [file join $dir safe.tcl]] set auto_index(::safe::SyncAccessPath) [list source [file join $dir safe.tcl]] -set auto_index(::safe::InterpStateName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::IsInterp) [list source [file join $dir safe.tcl]] set auto_index(::safe::PathToken) [list source [file join $dir safe.tcl]] -set auto_index(::safe::PathListName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::VirtualPathListName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::PathNumberName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::StaticsOkName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::NestedOkName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Toplevel) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Set) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Lappend) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Unset) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Exists) [list source [file join $dir safe.tcl]] -set auto_index(::safe::GetAccessPath) [list source [file join $dir safe.tcl]] -set auto_index(::safe::StaticsOk) [list source [file join $dir safe.tcl]] -set auto_index(::safe::NestedOk) [list source [file join $dir safe.tcl]] -set auto_index(::safe::DeleteHookName) [list source [file join $dir safe.tcl]] set auto_index(::safe::TranslatePath) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Log) [list source [file join $dir safe.tcl]] set auto_index(::safe::CheckFileName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::AliasGlob) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasSource) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasLoad) [list source [file join $dir safe.tcl]] set auto_index(::safe::FileInAccessPath) [list source [file join $dir safe.tcl]] +set auto_index(::safe::DirInAccessPath) [list source [file join $dir safe.tcl]] set auto_index(::safe::Subset) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasSubset) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasEncoding) [list source [file join $dir safe.tcl]] -set auto_index(tcl_wordBreakAfter) [list source [file join $dir word.tcl]] -set auto_index(tcl_wordBreakBefore) [list source [file join $dir word.tcl]] -set auto_index(tcl_endOfWord) [list source [file join $dir word.tcl]] -set auto_index(tcl_startOfNextWord) [list source [file join $dir word.tcl]] -set auto_index(tcl_startOfPreviousWord) [list source [file join $dir word.tcl]] +set auto_index(::safe::Setup) [list source [file join $dir safe.tcl]] set auto_index(::tcl::tm::add) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::remove) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::list) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::UnknownHandler) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::tm::Defaults) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::roots) [list source [file join $dir tm.tcl]] -set auto_index(::tcl::tm::path) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::UpdateWordBreakREs) [list source [file join $dir word.tcl]] +set auto_index(tcl_wordBreakAfter) [list source [file join $dir word.tcl]] +set auto_index(tcl_wordBreakBefore) [list source [file join $dir word.tcl]] +set auto_index(tcl_endOfWord) [list source [file join $dir word.tcl]] +set auto_index(tcl_startOfNextWord) [list source [file join $dir word.tcl]] +set auto_index(tcl_startOfPreviousWord) [list source [file join $dir word.tcl]] -- cgit v0.12 From c48d854865fb1aa7c418cb6cd4ef39b5d7d0332f Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 24 Nov 2009 00:08:26 +0000 Subject: [Bug 2893771] Teach [file stat] to handle locked files. This stops [file exists] from returning false for files that exist but are locked by resorting to FindFirstFile when GetFileAttributes fails. --- ChangeLog | 5 +++++ tests/fCmd.test | 27 ++++++++++++++++----------- win/tclWinFile.c | 46 ++++++++++++++++++++++++++++++++++------------ 3 files changed, 55 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index c24421a..d5b9889 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-24 Pat Thoyts + + * tests/fCmd.test: [Bug 2893771] Teach [file stat] to handle locked + * win/tclWinFile.c: files so that [file exists] no longer lies. + 2009-11-23 Jan Nijtmans * library/tclIndex (regenerated) to reflect various changes diff --git a/tests/fCmd.test b/tests/fCmd.test index c677a45..1436a28 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fCmd.test,v 1.69 2009/11/23 22:14:27 kennykb Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.70 2009/11/24 00:08:27 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -2552,17 +2552,22 @@ test fCmd-30.1 {file writable on 'My Documents'} -setup { } -constraints {2000orNewer reg} -body { file writable $mydocsname } -result 1 -test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {2000orNewer knownBug} -body { - # Apparently the OS has this file open with exclusive permissions Windows - # doesn't provide any way to determine that fact without actually trying - # to open the file (open NTUSER.dat r), which fails. Hence this isn't - # really a knownBug in Tcl, but an OS limitation. But, perhaps in the - # future that limitation will be lifted. - if {[file exists "~/NTUSER.DAT"]} { - return [file readable "~/NTUSER.DAT"] +test fCmd-30.2 {file readable on 'NTUSER.DAT'} -constraints {2000orNewer} -body { + expr {[info exists env(USERPROFILE)] + && [file exists $env(USERPROFILE)/NTUSER.DAT] + && [file readable $env(USERPROFILE)/NTUSER.DAT]} + +} -result {1} +test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {2000orNewer} -body { + set r {} + if {[info exists env(SystemDrive)]} { + set path $env(SystemDrive)/pagefile.sys + lappend r exists [file exists $path] + lappend r readable [file readable $path] + lappend r stat [catch {file stat $path a} e] $e } - return 0 -} -result {0} + return $r +} -result {exists 1 readable 0 stat 0 {}} # cleanup cleanup diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 46c8489..25e1eac 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.98 2009/03/18 17:08:11 dgp Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.99 2009/11/24 00:08:27 patthoyts Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -247,7 +247,7 @@ WinLink( */ attr = tclWinProcs->getFileAttributesProc(linkSourcePath); - if (attr != 0xffffffff) { + if (attr != INVALID_FILE_ATTRIBUTES) { Tcl_SetErrno(EEXIST); return -1; } @@ -271,7 +271,7 @@ WinLink( */ attr = tclWinProcs->getFileAttributesProc(linkTargetPath); - if (attr == 0xffffffff) { + if (attr == INVALID_FILE_ATTRIBUTES) { /* * The target doesn't exist. */ @@ -368,7 +368,7 @@ WinReadLink( */ attr = tclWinProcs->getFileAttributesProc(linkSourcePath); - if (attr == 0xffffffff) { + if (attr == INVALID_FILE_ATTRIBUTES) { /* * The source doesn't exist. */ @@ -912,7 +912,7 @@ TclpMatchInDirectory( if (tclWinProcs->getFileAttributesExProc == NULL) { attr = tclWinProcs->getFileAttributesProc(native); - if (attr == 0xffffffff) { + if (attr == INVALID_FILE_ATTRIBUTES) { return TCL_OK; } } else { @@ -964,7 +964,8 @@ TclpMatchInDirectory( } attr = tclWinProcs->getFileAttributesProc(native); - if ((attr == 0xffffffff) || ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0)) { + if ((attr == INVALID_FILE_ATTRIBUTES) + || ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0)) { return TCL_OK; } @@ -1547,13 +1548,21 @@ NativeAccess( attr = tclWinProcs->getFileAttributesProc(nativePath); - if (attr == 0xffffffff) { + if (attr == INVALID_FILE_ATTRIBUTES) { /* - * File doesn't exist. + * File might not exist. */ - TclWinConvertError(GetLastError()); - return -1; + WIN32_FIND_DATAT ffd; + HANDLE hFind; + hFind = tclWinProcs->findFirstFileProc(nativePath, &ffd); + if (hFind != INVALID_HANDLE_VALUE) { + attr = ffd.w.dwFileAttributes; + FindClose(hFind); + } else { + TclWinConvertError(GetLastError()); + return -1; + } } if ((mode & W_OK) @@ -2093,8 +2102,21 @@ NativeStat( if (tclWinProcs->getFileAttributesExProc(nativePath, GetFileExInfoStandard, &data) != TRUE) { - Tcl_SetErrno(ENOENT); - return -1; + + /* + * We might have just been denied access + */ + + WIN32_FIND_DATAT ffd; + HANDLE hFind; + hFind = tclWinProcs->findFirstFileProc(nativePath, &ffd); + if (hFind != INVALID_HANDLE_VALUE) { + memcpy(&data, &ffd, sizeof(data)); + FindClose(hFind); + } else { + Tcl_SetErrno(ENOENT); + return -1; + } } attr = data.dwFileAttributes; -- cgit v0.12 From a20a036f3289a187283f242e8cd22fee976f3bfb Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 24 Nov 2009 12:00:08 +0000 Subject: Ensure that destroying an object in a constructor doesn't crash. [Bug 2903011] --- ChangeLog | 50 ++++++++++++++++++++++++++++++-------------------- generic/tclOO.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- tests/oo.test | 19 ++++++++++++++++++- 3 files changed, 92 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5b9889..53c9f3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,38 +1,48 @@ +2009-11-24 Donal K. Fellows + + * generic/tclOO.c (FinalizeAlloc, Tcl_NewObjectInstance): + [Bug 2903011]: Make it an error to destroy an object in a constructor, + and also make sure that an object is not deleted twice in the error + case. + 2009-11-24 Pat Thoyts - * tests/fCmd.test: [Bug 2893771] Teach [file stat] to handle locked + * tests/fCmd.test: [Bug 2893771]: Teach [file stat] to handle locked * win/tclWinFile.c: files so that [file exists] no longer lies. 2009-11-23 Jan Nijtmans - * library/tclIndex (regenerated) to reflect various changes - in safe.tcl and other files. + * library/tclIndex: (regenerated) to reflect various changes in + safe.tcl and other files. 2009-11-23 Kevin Kenny - * tests/fCmd.test (fCmd-30.1): Changed registry location of the - 'My Documents' folder to the one that's correct for Windows 2000, - XP, Server 2003, Vista, Server 2008, and Windows 7. - (See http://support.microsoft.com/kb/310746) + * tests/fCmd.test (fCmd-30.1): Changed registry location of the 'My + Documents' folder to the one that's correct for Windows 2000, XP, + Server 2003, Vista, Server 2008, and Windows 7. (See + http://support.microsoft.com/kb/310746) 2009-11-23 Jan Nijtmans - * win/tclWinDde.c #undef STATIC_BUILD, in order to make sure that - * win/tclWinReg.c Xxxxx_Init is always exported even when Tcl is - * generic/tclTest.c built static (otherwise we cannot create a DLL). - * generic/tclThreadTest.c Make all functions static, except TclThread_Init. - * tests/fCmd.test Enable fCmd-30.1 when registry is available. - * win/tcl.m4 Fix ${SHLIB_LD_LIBS} definition, fix conflicts - * win/Makefile.in Simplifications related to tcl.m4 changes. - * win/configure.in between static libraries and import library on windows. - * win/configure (regenerated) - * win/makefile.vc Add stub library to necessary link lines + * win/tclWinDde.c: #undef STATIC_BUILD, in order to make sure + * win/tclWinReg.c: that Xxxxx_Init is always exported even when + * generic/tclTest.c: Tcl is built static (otherwise we cannot + create a DLL). + * generic/tclThreadTest.c: Make all functions static, except + TclThread_Init. + * tests/fCmd.test: Enable fCmd-30.1 when registry is available. + * win/tcl.m4: Fix ${SHLIB_LD_LIBS} definition, fix conflicts + * win/Makefile.in: Simplifications related to tcl.m4 changes. + * win/configure.in: Between static libraries and import library on + windows. + * win/configure: (regenerated) + * win/makefile.vc: Add stub library to necessary link lines. 2009-11-23 Kevin B. Kenny - * generic/tclThreadTest.c (NewTestThread): [Bug 2901803] - Further machinations to get NewTestThread actually to launch - the thread, not just compile. + * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]: Further + machinations to get NewTestThread actually to launch the thread, not + just compile. 2009-11-22 Donal K. Fellows diff --git a/generic/tclOO.c b/generic/tclOO.c index a4e8cce..242496f 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.25 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.26 2009/11/24 12:00:08 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1334,7 +1334,7 @@ Tcl_NewObjectInstance( TclOOGetCallContext(oPtr, NULL, CONSTRUCTOR, NULL); if (contextPtr != NULL) { - int result; + int result, flags; Tcl_InterpState state; AddRef(oPtr); @@ -1343,11 +1343,32 @@ Tcl_NewObjectInstance( contextPtr->skip = skip; result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, objc, objv); + flags = oPtr->flags; + + /* + * It's an error if the object was whacked in the constructor. + * Force this if it isn't already an error (don't want to lose + * errors by accident...) [Bug 2903011] + */ + + if (result != TCL_ERROR && (flags & OBJECT_DELETED)) { + Tcl_SetResult(interp, "object deleted in constructor", + TCL_STATIC); + result = TCL_ERROR; + } TclOODeleteContext(contextPtr); DelRef(oPtr); if (result != TCL_OK) { Tcl_DiscardInterpState(state); - Tcl_DeleteCommandFromToken(interp, oPtr->command); + + /* + * Take care to not delete a deleted object; that would be + * bad. [Bug 2903011] + */ + + if (!(flags & OBJECT_DELETED)) { + Tcl_DeleteCommandFromToken(interp, oPtr->command); + } return NULL; } Tcl_RestoreInterpState(interp, state); @@ -1458,12 +1479,31 @@ FinalizeAlloc( Object *oPtr = data[1]; Tcl_InterpState state = data[2]; Tcl_Object *objectPtr = data[3]; + int flags = oPtr->flags; + + /* + * It's an error if the object was whacked in the constructor. Force this + * if it isn't already an error (don't want to lose errors by accident...) + * [Bug 2903011] + */ + if (result != TCL_ERROR && (flags & OBJECT_DELETED)) { + Tcl_SetResult(interp, "object deleted in constructor", TCL_STATIC); + result = TCL_ERROR; + } TclOODeleteContext(contextPtr); DelRef(oPtr); if (result != TCL_OK) { Tcl_DiscardInterpState(state); - Tcl_DeleteCommandFromToken(interp, oPtr->command); + + /* + * Take care to not delete a deleted object; that would be bad. [Bug + * 2903011] + */ + + if (!(flags & OBJECT_DELETED)) { + Tcl_DeleteCommandFromToken(interp, oPtr->command); + } return TCL_ERROR; } Tcl_RestoreInterpState(interp, state); diff --git a/tests/oo.test b/tests/oo.test index a976a7d..4c289ab 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.30 2009/10/22 15:39:58 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.31 2009/11/24 12:00:08 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -2332,6 +2332,23 @@ test oo-29.1 {self class with object-defined methods} -setup { } -returnCodes error -cleanup { obj destroy } -result {method not defined by a class} + +test oo-30.1 {Bug 2903011: deleting an object in a constructor} -setup { + oo::class create cls +} -body { + oo::define cls {constructor {} {[self] destroy}} + cls new +} -returnCodes error -cleanup { + cls destroy +} -result {object deleted in constructor} +test oo-30.2 {Bug 2903011: deleting an object in a constructor} -setup { + oo::class create cls +} -body { + oo::define cls {constructor {} {my destroy}} + cls new +} -returnCodes error -cleanup { + cls destroy +} -result {object deleted in constructor} cleanupTests return -- cgit v0.12 From aec743feb2aaff1a43d2f41dc81688c309fba0df Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 24 Nov 2009 19:23:30 +0000 Subject: Restore tcl/library/tclIndex to Revision 1.11 contents, to stop total breakage of auto-loading in slave interps. Feel free to commit a new bug fix when you can commit something that passes the test suite. --- ChangeLog | 5 --- library/tclIndex | 92 +++++++++++++++----------------------------------------- 2 files changed, 24 insertions(+), 73 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53c9f3e..56152a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,11 +10,6 @@ * tests/fCmd.test: [Bug 2893771]: Teach [file stat] to handle locked * win/tclWinFile.c: files so that [file exists] no longer lies. -2009-11-23 Jan Nijtmans - - * library/tclIndex: (regenerated) to reflect various changes in - safe.tcl and other files. - 2009-11-23 Kevin Kenny * tests/fCmd.test (fCmd-30.1): Changed registry location of the 'My diff --git a/library/tclIndex b/library/tclIndex index 9d6c38f..010616f 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -18,53 +18,6 @@ set auto_index(::auto_mkindex_parser::slavehook) [list source [file join $dir au set auto_index(::auto_mkindex_parser::command) [list source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::commandInit) [list source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::fullname) [list source [file join $dir auto.tcl]] -set auto_index(::tcl::clock::Initialize) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::format) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ParseClockFormatFormat) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ParseClockFormatFormat2) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::scan) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::FreeScan) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ParseClockScanFormat) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::LocaleNumeralMatcher) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::UniquePrefixRegexp) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::MakeUniquePrefixRegexp) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::MakeParseCodeFromFields) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::EnterLocale) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::LoadWindowsDateTimeFormats) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::LocalizeFormat) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::FormatNumericTimeZone) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::FormatStarDate) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ParseStarDate) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ScanWide) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::InterpretTwoDigitYear) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::AssignBaseYear) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::AssignBaseIso8601Year) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::AssignBaseMonth) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::AssignBaseWeek) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::AssignBaseJulianDay) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::InterpretHMSP) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::InterpretHMS) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::GetSystemTimeZone) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ConvertLegacyTimeZone) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::SetupTimeZone) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::GuessWindowsTimeZone) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::LoadTimeZoneFile) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::LoadZoneinfoFile) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ReadZoneinfoFile) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ParsePosixTimeZone) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ProcessPosixTimeZone) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::DeterminePosixDSTTime) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::GetLocaleEra) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::GetJulianDayFromEraYearDay) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::GetJulianDayFromEraYearMonthWeekDay) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::IsGregorianLeapYear) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::WeekdayOnOrBefore) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::BSearch) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::add) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::AddMonths) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::AddDays) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::mc) [list source [file join $dir clock.tcl]] -set auto_index(::tcl::clock::ClearCaches) [list source [file join $dir clock.tcl]] set auto_index(history) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistAdd) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistKeep) [list source [file join $dir history.tcl]] @@ -74,21 +27,11 @@ set auto_index(::tcl::HistRedo) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistIndex) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistEvent) [list source [file join $dir history.tcl]] set auto_index(::tcl::HistChange) [list source [file join $dir history.tcl]] -set auto_index(::tcl::HistNextID) [list source [file join $dir history.tcl]] -set auto_index(::tcl::mathfunc::min) [list source [file join $dir init.tcl]] -set auto_index(::tcl::mathfunc::max) [list source [file join $dir init.tcl]] -set auto_index(unknown) [list source [file join $dir init.tcl]] -set auto_index(auto_load) [list source [file join $dir init.tcl]] -set auto_index(auto_load_index) [list source [file join $dir init.tcl]] -set auto_index(auto_qualify) [list source [file join $dir init.tcl]] -set auto_index(auto_import) [list source [file join $dir init.tcl]] -set auto_index(::tcl::CopyDirectory) [list source [file join $dir init.tcl]] -set auto_index(::tcl::Pkg::CompareExtension) [list source [file join $dir package.tcl]] set auto_index(pkg_mkIndex) [list source [file join $dir package.tcl]] set auto_index(tclPkgSetup) [list source [file join $dir package.tcl]] set auto_index(tclPkgUnknown) [list source [file join $dir package.tcl]] set auto_index(::tcl::MacOSXPkgUnknown) [list source [file join $dir package.tcl]] -set auto_index(::tcl::Pkg::Create) [list source [file join $dir package.tcl]] +set auto_index(::pkg::create) [list source [file join $dir package.tcl]] set auto_index(parray) [list source [file join $dir parray.tcl]] set auto_index(::safe::InterpStatics) [list source [file join $dir safe.tcl]] set auto_index(::safe::InterpNested) [list source [file join $dir safe.tcl]] @@ -105,27 +48,40 @@ set auto_index(::safe::AddSubDirs) [list source [file join $dir safe.tcl]] set auto_index(::safe::interpDelete) [list source [file join $dir safe.tcl]] set auto_index(::safe::setLogCmd) [list source [file join $dir safe.tcl]] set auto_index(::safe::SyncAccessPath) [list source [file join $dir safe.tcl]] +set auto_index(::safe::InterpStateName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::IsInterp) [list source [file join $dir safe.tcl]] set auto_index(::safe::PathToken) [list source [file join $dir safe.tcl]] +set auto_index(::safe::PathListName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::VirtualPathListName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::PathNumberName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::StaticsOkName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::NestedOkName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::Toplevel) [list source [file join $dir safe.tcl]] +set auto_index(::safe::Set) [list source [file join $dir safe.tcl]] +set auto_index(::safe::Lappend) [list source [file join $dir safe.tcl]] +set auto_index(::safe::Unset) [list source [file join $dir safe.tcl]] +set auto_index(::safe::Exists) [list source [file join $dir safe.tcl]] +set auto_index(::safe::GetAccessPath) [list source [file join $dir safe.tcl]] +set auto_index(::safe::StaticsOk) [list source [file join $dir safe.tcl]] +set auto_index(::safe::NestedOk) [list source [file join $dir safe.tcl]] +set auto_index(::safe::DeleteHookName) [list source [file join $dir safe.tcl]] set auto_index(::safe::TranslatePath) [list source [file join $dir safe.tcl]] +set auto_index(::safe::Log) [list source [file join $dir safe.tcl]] set auto_index(::safe::CheckFileName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::AliasGlob) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasSource) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasLoad) [list source [file join $dir safe.tcl]] set auto_index(::safe::FileInAccessPath) [list source [file join $dir safe.tcl]] -set auto_index(::safe::DirInAccessPath) [list source [file join $dir safe.tcl]] set auto_index(::safe::Subset) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasSubset) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasEncoding) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Setup) [list source [file join $dir safe.tcl]] -set auto_index(::tcl::tm::add) [list source [file join $dir tm.tcl]] -set auto_index(::tcl::tm::remove) [list source [file join $dir tm.tcl]] -set auto_index(::tcl::tm::list) [list source [file join $dir tm.tcl]] -set auto_index(::tcl::tm::UnknownHandler) [list source [file join $dir tm.tcl]] -set auto_index(::tcl::tm::Defaults) [list source [file join $dir tm.tcl]] -set auto_index(::tcl::tm::roots) [list source [file join $dir tm.tcl]] -set auto_index(::tcl::UpdateWordBreakREs) [list source [file join $dir word.tcl]] set auto_index(tcl_wordBreakAfter) [list source [file join $dir word.tcl]] set auto_index(tcl_wordBreakBefore) [list source [file join $dir word.tcl]] set auto_index(tcl_endOfWord) [list source [file join $dir word.tcl]] set auto_index(tcl_startOfNextWord) [list source [file join $dir word.tcl]] set auto_index(tcl_startOfPreviousWord) [list source [file join $dir word.tcl]] +set auto_index(::tcl::tm::add) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::tm::remove) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::tm::list) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::tm::UnknownHandler) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::tm::roots) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::tm::path) [list source [file join $dir tm.tcl]] -- cgit v0.12 From bfe62b221470f6cabde3d6a6a378627187e9f33b Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 24 Nov 2009 20:15:15 +0000 Subject: * library/tclIndex: Manually redone the part of tclIndex dealing with safe.tcl and tm.tcl. This part passes the testsuite. Note that automatic regeneration of this part is not possible because it wrongly puts 'safe::Setup' on the list, and wrongly leaves out 'safe::Log' which is more dynamically created than the generator expects. Further note that the file "clock.tcl" is explicitly loaded by "init.tcl", the first time the clock command is invoked. The relevant code can be found at line 172ff, roughly, the definition of the procedure 'clock'. This means none of the procedures of this file belong in the tclIndex. Another indicator that automatic regeneration of tclIndex is ill-advised. --- ChangeLog | 16 ++++++++++++++++ library/tclIndex | 20 ++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56152a1..13fa209 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2009-11-24 Andreas Kupries + + * library/tclIndex: Manually redone the part of tclIndex dealing + with safe.tcl and tm.tcl. This part passes the testsuite. Note + that automatic regeneration of this part is not possible because + it wrongly puts 'safe::Setup' on the list, and wrongly leaves out + 'safe::Log' which is more dynamically created than the generator + expects. + + Further note that the file "clock.tcl" is explicitly loaded by + "init.tcl", the first time the clock command is invoked. The + relevant code can be found at line 172ff, roughly, the definition + of the procedure 'clock'. This means none of the procedures of + this file belong in the tclIndex. Another indicator that automatic + regeneration of tclIndex is ill-advised. + 2009-11-24 Donal K. Fellows * generic/tclOO.c (FinalizeAlloc, Tcl_NewObjectInstance): diff --git a/library/tclIndex b/library/tclIndex index 010616f..26603c1 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -1,4 +1,5 @@ # Tcl autoload index file, version 2.0 +# -*- tcl -*- # This file is generated by the "auto_mkindex" command # and sourced to set up indexing information for one or # more commands. Typically each line is a command that @@ -48,29 +49,15 @@ set auto_index(::safe::AddSubDirs) [list source [file join $dir safe.tcl]] set auto_index(::safe::interpDelete) [list source [file join $dir safe.tcl]] set auto_index(::safe::setLogCmd) [list source [file join $dir safe.tcl]] set auto_index(::safe::SyncAccessPath) [list source [file join $dir safe.tcl]] -set auto_index(::safe::InterpStateName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::IsInterp) [list source [file join $dir safe.tcl]] set auto_index(::safe::PathToken) [list source [file join $dir safe.tcl]] -set auto_index(::safe::PathListName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::VirtualPathListName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::PathNumberName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::StaticsOkName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::NestedOkName) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Toplevel) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Set) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Lappend) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Unset) [list source [file join $dir safe.tcl]] -set auto_index(::safe::Exists) [list source [file join $dir safe.tcl]] -set auto_index(::safe::GetAccessPath) [list source [file join $dir safe.tcl]] -set auto_index(::safe::StaticsOk) [list source [file join $dir safe.tcl]] -set auto_index(::safe::NestedOk) [list source [file join $dir safe.tcl]] -set auto_index(::safe::DeleteHookName) [list source [file join $dir safe.tcl]] set auto_index(::safe::TranslatePath) [list source [file join $dir safe.tcl]] set auto_index(::safe::Log) [list source [file join $dir safe.tcl]] set auto_index(::safe::CheckFileName) [list source [file join $dir safe.tcl]] +set auto_index(::safe::AliasGlob) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasSource) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasLoad) [list source [file join $dir safe.tcl]] set auto_index(::safe::FileInAccessPath) [list source [file join $dir safe.tcl]] +set auto_index(::safe::DirInAccessPath) [list source [file join $dir safe.tcl]] set auto_index(::safe::Subset) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasSubset) [list source [file join $dir safe.tcl]] set auto_index(::safe::AliasEncoding) [list source [file join $dir safe.tcl]] @@ -82,6 +69,7 @@ set auto_index(tcl_startOfPreviousWord) [list source [file join $dir word.tcl]] set auto_index(::tcl::tm::add) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::remove) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::list) [list source [file join $dir tm.tcl]] +set auto_index(::tcl::tm::Defaults) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::UnknownHandler) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::roots) [list source [file join $dir tm.tcl]] set auto_index(::tcl::tm::path) [list source [file join $dir tm.tcl]] -- cgit v0.12 From 9a8e3c9cf2c11e1d73b27f3d278b80390a3224e0 Mon Sep 17 00:00:00 2001 From: stwo Date: Wed, 25 Nov 2009 14:25:54 +0000 Subject: [Patch 2892871]: Remove unneeded AC_STRUCT_TIMEZONE and use AC_CHECK_MEMBERS([struct stat.st_blksize]) instead of AC_STRUCT_ST_BLKSIZE. --- ChangeLog | 8 ++ unix/configure | 259 ---------------------------------------------------- unix/configure.in | 4 +- unix/tcl.m4 | 1 - unix/tclConfig.h.in | 15 --- unix/tclUnixFCmd.c | 17 ++-- 6 files changed, 19 insertions(+), 285 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13fa209..56c9bb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-25 Stuart Cassoff + + * unix/configure.in: [Patch 2892871]: Remove unneeded + * unix/tcl.m4: AC_STRUCT_TIMEZONE and use + * unix/tclConfig.h.in: AC_CHECK_MEMBERS([struct stat.st_blksize]) + * unix/tclUnixFCmd.c: instead of AC_STRUCT_ST_BLKSIZE. + * unix/configure: Regenerated with autoconf-2.59. + 2009-11-24 Andreas Kupries * library/tclIndex: Manually redone the part of tclIndex dealing diff --git a/unix/configure b/unix/configure index b1b899b..991879c 100755 --- a/unix/configure +++ b/unix/configure @@ -13203,69 +13203,6 @@ fi # Find out all about time handling differences. #------------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 -if test "${ac_cv_struct_tm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm *tp; tp->tm_sec; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_struct_tm=time.h -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_struct_tm=sys/time.h -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 -if test $ac_cv_struct_tm = sys/time.h; then - -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 -_ACEOF - -fi - for ac_header in sys/time.h @@ -13482,196 +13419,6 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 -if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_cv_struct_tm> - - -int -main () -{ -static struct tm ac_aggr; -if (ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_member_struct_tm_tm_zone=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_cv_struct_tm> - - -int -main () -{ -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_zone) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_member_struct_tm_tm_zone=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_member_struct_tm_tm_zone=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 -if test $ac_cv_member_struct_tm_tm_zone = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ZONE 1 -_ACEOF - - -fi - -if test "$ac_cv_member_struct_tm_tm_zone" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_ZONE 1 -_ACEOF - -else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 -if test "${ac_cv_var_tzname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif - -int -main () -{ -atoi(*tzname); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_var_tzname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_var_tzname=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 - if test $ac_cv_var_tzname = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 -_ACEOF - - fi -fi - @@ -14043,7 +13790,6 @@ _ACEOF # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then @@ -14152,13 +13898,8 @@ cat >>confdefs.h <<_ACEOF _ACEOF -cat >>confdefs.h <<\_ACEOF -#define HAVE_ST_BLKSIZE 1 -_ACEOF - fi - echo "$as_me:$LINENO: checking for fstatfs" >&5 echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then diff --git a/unix/configure.in b/unix/configure.in index 815c9be..bbed928 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.207 2009/04/10 18:01:31 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.208 2009/11/25 14:25:57 stwo Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -282,7 +282,7 @@ SC_TIME_HANDLER # stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- -AC_STRUCT_ST_BLKSIZE +AC_CHECK_MEMBERS([struct stat.st_blksize]) AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])]) #-------------------------------------------------------------------- diff --git a/unix/tcl.m4 b/unix/tcl.m4 index ed46d61..6c23ace 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2485,7 +2485,6 @@ AC_DEFUN([SC_BLOCKING_STYLE], [ AC_DEFUN([SC_TIME_HANDLER], [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME - AC_STRUCT_TIMEZONE AC_CHECK_FUNCS(gmtime_r localtime_r mktime) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 9879254..d1e6e94 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -184,13 +184,6 @@ /* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `tm_zone' is member of `struct tm'. */ -#undef HAVE_STRUCT_TM_TM_ZONE - -/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use - `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ -#undef HAVE_ST_BLKSIZE - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H @@ -224,17 +217,9 @@ /* Should we use the tm_tzadj field of struct tm? */ #undef HAVE_TM_TZADJ -/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use - `HAVE_STRUCT_TM_TM_ZONE' instead. */ -#undef HAVE_TM_ZONE - /* Is off64_t in ? */ #undef HAVE_TYPE_OFF64_T -/* Define to 1 if you don't have `tm_zone' but do have the external array - `tzname'. */ -#undef HAVE_TZNAME - /* Do we have the uintptr_t type? */ #undef HAVE_UINTPTR_T diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index e450589..a1ed50f 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.73 2009/08/02 12:08:17 dkf Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.74 2009/11/25 14:25:57 stwo Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -49,7 +49,7 @@ #include "tclInt.h" #include #include -#ifndef HAVE_ST_BLKSIZE +#ifndef HAVE_STRUCT_STAT_ST_BLKSIZE #ifndef NO_FSTATFS #include #endif @@ -547,7 +547,7 @@ TclUnixCopyFile( * that's likely to be fairly efficient anyway. */ -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE blockSize = statBufPtr->st_blksize; #elif !defined(NO_FSTATFS) { @@ -561,13 +561,14 @@ TclUnixCopyFile( } #else blockSize = DEFAULT_COPY_BLOCK_SIZE; -#endif /* HAVE_ST_BLKSIZE */ +#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ /* - * [SF Tcl Bug 1586470] Even if we HAVE_ST_BLKSIZE, there are filesystems - * which report a bogus value for the blocksize. An example is the Andrew - * Filesystem (afs), reporting a blocksize of 0. When detecting such a - * situation we now simply fall back to a hardwired default size. + * [SF Tcl Bug 1586470] Even if we HAVE_STRUCT_STAT_ST_BLKSIZE, there are + * filesystems which report a bogus value for the blocksize. An example + * is the Andrew Filesystem (afs), reporting a blocksize of 0. When + * detecting such a situation we now simply fall back to a hardwired + * default size. */ if (blockSize <= 0) { -- cgit v0.12 From b15ddd01de0048a7f37b5195ed7c6b44504fd513 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Wed, 25 Nov 2009 21:02:28 +0000 Subject: * win/Makefile.in: Added a 'test-tcl' rule that is identical to 'test' except that it does not go spelunking in 'pkgs/'. (This rule has existed in unix/Makefile.in for some time.) --- ChangeLog | 6 ++++++ win/Makefile.in | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56c9bb0..ec96636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-25 Kevin B. Kenny + + * win/Makefile.in: Added a 'test-tcl' rule that is identical + to 'test' except that it does not go spelunking in 'pkgs/'. (This + rule has existed in unix/Makefile.in for some time.) + 2009-11-25 Stuart Cassoff * unix/configure.in: [Patch 2892871]: Remove unneeded diff --git a/win/Makefile.in b/win/Makefile.in index 14208f5..f518b29 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.165 2009/11/23 20:17:36 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.166 2009/11/25 21:02:29 kennykb Exp $ VERSION = @TCL_VERSION@ @@ -721,7 +721,9 @@ install-private-headers: libraries # tcltest, i.e.: # % make test TESTFLAGS="-verbose bps -file fileName.test" -test: binaries $(TCLTEST) test-packages +test: test-tcl test-packages + +test-tcl: binaries $(TCLTEST) TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \ ./$(TCLTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \ -load "set ::ddelib [file normalize ${DDE_DLL_FILE}]; \ -- cgit v0.12 From fe3dd38f5e9956ff59341aee24ccc04e0818b19d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 26 Nov 2009 07:01:45 +0000 Subject: Fix [Bug 2902965] stub related changes cause tclkit built to break --- ChangeLog | 10 ++++++++++ unix/Makefile.in | 8 ++++---- unix/configure | 4 ++-- unix/tcl.m4 | 4 ++-- unix/tclAppInit.c | 6 +++++- win/Makefile.in | 18 +++++++++--------- win/makefile.vc | 15 +++++++++------ win/tclAppInit.c | 8 ++++++-- 8 files changed, 47 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec96636..423d74e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-11-24 Jan Nijtmans + + * win/Makefile.in Fix [Bug 2902965] stub related changes + * win/makefile.vc cause tclkit built to break + * win/tclAppInit.c + * unix/tcl.m4 + * unix/Makefile.in + * unix/tclAppInit.c + * unix/configure (regenerated) + 2009-11-25 Kevin B. Kenny * win/Makefile.in: Added a 'test-tcl' rule that is identical diff --git a/unix/Makefile.in b/unix/Makefile.in index 5a2e8cf..d42a0e5 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.281 2009/11/18 23:46:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.282 2009/11/26 07:01:47 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -456,7 +456,8 @@ OO_SRCS = \ $(GENERIC_DIR)/tclOOStubInit.c STUB_SRCS = \ - $(GENERIC_DIR)/tclStubLib.c + $(GENERIC_DIR)/tclStubLib.c \ + $(GENERIC_DIR)/tclOOStubLib.o TOMMATH_SRCS = \ $(TOMMATH_DIR)/bncore.c \ @@ -566,7 +567,6 @@ ZLIB_SRCS = \ $(ZLIB_DIR)/compress.c \ $(ZLIB_DIR)/crc32.c \ $(ZLIB_DIR)/deflate.c \ - $(ZLIB_DIR)/gzio.c \ $(ZLIB_DIR)/infback.c \ $(ZLIB_DIR)/inffast.c \ $(ZLIB_DIR)/inflate.c \ @@ -612,7 +612,7 @@ objs: ${OBJS} tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o tclsh # Resetting the LIB_RUNTIME_DIR below is required so that the generated diff --git a/unix/configure b/unix/configure index 991879c..f8dcb5e 100755 --- a/unix/configure +++ b/unix/configure @@ -8971,12 +8971,12 @@ else if test "$RANLIB" = ""; then - MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' + MAKE_LIB='$(STLIB_LD) $@ ${OBJS} ${STUB_LIB_OBJS}' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' else - MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' + MAKE_LIB='${STLIB_LD} $@ ${OBJS} ${STUB_LIB_OBJS} ; ${RANLIB} $@' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6c23ace..d315658 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2066,10 +2066,10 @@ dnl # preprocessing tests use only CPPFLAGS. LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} AS_IF([test "$RANLIB" = ""], [ - MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}' + MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS} ${STUB_LIB_OBJS}' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' ], [ - MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' + MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ${STUB_LIB_OBJS} ; ${RANLIB} [$]@' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' ]) ]) diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index a39b448..715a098 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.20 2009/11/19 16:31:10 dgp Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.21 2009/11/26 07:01:46 nijtmans Exp $ */ #include "tcl.h" @@ -110,6 +110,10 @@ int Tcl_AppInit( Tcl_Interp *interp) /* Interpreter for application. */ { +#undef Tcl_InitStubs + if (!Tcl_InitStubs(interp, TCL_VERSION, 0)) { + return TCL_ERROR; + } if (Tcl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } diff --git a/win/Makefile.in b/win/Makefile.in index f518b29..fc95cfc 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.166 2009/11/25 21:02:29 kennykb Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.167 2009/11/26 07:01:52 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -436,9 +436,9 @@ ${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @$(RM) ${TCL_DLL_FILE} $(TCL_LIB_FILE) @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) -${TCL_LIB_FILE}: ${TCL_OBJS} +${TCL_LIB_FILE}: ${TCL_OBJS} ${STUB_OBJS} @$(RM) ${TCL_LIB_FILE} - @MAKE_LIB@ ${TCL_OBJS} + @MAKE_LIB@ ${TCL_OBJS} ${STUB_OBJS} @POST_MAKE_LIB@ # assume GNU make @@ -451,9 +451,9 @@ ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @-$(COPY) ${DDE_LIB_FILE}.backup ${DDE_LIB_FILE} @-$(RM) ${DDE_LIB_FILE}.backup -${DDE_LIB_FILE}: ${DDE_OBJS} tclStubLib.$(OBJEXT) +${DDE_LIB_FILE}: ${DDE_OBJS} ${STUB_OBJS} @$(RM) ${DDE_LIB_FILE} - @MAKE_LIB@ ${DDE_OBJS} tclStubLib.$(OBJEXT) + @MAKE_LIB@ ${DDE_OBJS} ${STUB_OBJS} @POST_MAKE_LIB@ ${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE} @@ -464,9 +464,9 @@ ${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE} @-$(COPY) ${REG_LIB_FILE}.backup ${REG_LIB_FILE} @-$(RM) ${REG_LIB_FILE}.backup -${REG_LIB_FILE}: ${REG_OBJS} tclStubLib.$(OBJEXT) +${REG_LIB_FILE}: ${REG_OBJS} ${STUB_OBJS} @$(RM) ${REG_LIB_FILE} - @MAKE_LIB@ ${REG_OBJS} tclStubLib.$(OBJEXT) + @MAKE_LIB@ ${REG_OBJS} ${STUB_OBJS} @POST_MAKE_LIB@ ${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE} @@ -477,9 +477,9 @@ ${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE} @-$(COPY) ${TEST_LIB_FILE}.backup ${TEST_LIB_FILE} @-$(RM) ${TEST_LIB_FILE}.backup -${TEST_LIB_FILE}: ${TCLTEST_OBJS} tclStubLib.$(OBJEXT) +${TEST_LIB_FILE}: ${TCLTEST_OBJS} ${STUB_OBJS} @$(RM) ${TEST_LIB_FILE} - @MAKE_LIB@ ${TCLTEST_OBJS} tclStubLib.$(OBJEXT) + @MAKE_LIB@ ${TCLTEST_OBJS} ${STUB_OBJS} @POST_MAKE_LIB@ # use pre-built zlib1.dll diff --git a/win/makefile.vc b/win/makefile.vc index a4e21e2..484bb1e 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.203 2009/11/23 21:26:32 nijtmans Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.204 2009/11/26 07:01:52 nijtmans Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -420,7 +420,10 @@ PLATFORMOBJS = \ $(TMP_DIR)\tclWinSock.obj \ $(TMP_DIR)\tclWinThrd.obj \ $(TMP_DIR)\tclWinTime.obj \ -!if !$(STATIC_BUILD) +!if $(STATIC_BUILD) + $(TMP_DIR)\tclStubLib.obj + $(TMP_DIR)\tclOOStubLib.obj +!else $(TMP_DIR)\tcl.res !endif @@ -620,8 +623,8 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c !if $(TCL_USE_STATIC_PACKAGES) $(TCLDDELIB): !else -$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj - $(lib32) -nologo $(LINKERFLAGS) -out:$@ $(TMP_DIR)\tclWinDde.obj +$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBOBJS) + $(lib32) -nologo $(LINKERFLAGS) -out:$@ $** !endif !else $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) @@ -634,8 +637,8 @@ $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) !if $(TCL_USE_STATIC_PACKAGES) $(TCLREGLIB): !else -$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj - $(lib32) -nologo $(LINKERFLAGS) -out:$@ $(TMP_DIR)\tclWinReg.obj +$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBOBJS) + $(lib32) -nologo $(LINKERFLAGS) -out:$@ $** !endif !else $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 99609ab..9b7a3e9 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.28 2009/11/19 16:31:11 dgp Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.29 2009/11/26 07:01:51 nijtmans Exp $ */ #include "tcl.h" @@ -125,6 +125,10 @@ int Tcl_AppInit( Tcl_Interp *interp) /* Interpreter for application. */ { +#undef Tcl_InitStubs + if (!Tcl_InitStubs(interp, TCL_VERSION, 0)) { + return TCL_ERROR; + } if (Tcl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } @@ -133,7 +137,7 @@ Tcl_AppInit( if (Tcltest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, Tcltest_SafeInit); + Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, NULL); #endif /* TCL_TEST */ #if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES -- cgit v0.12 From e73747196ac5c2e985bb6af35f46d821d21193a3 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 26 Nov 2009 07:02:30 +0000 Subject: Fix [Bug 2902965] stub related changes cause tclkit built to break --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 423d74e..dde921d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2009-11-24 Jan Nijtmans +2009-11-26 Jan Nijtmans * win/Makefile.in Fix [Bug 2902965] stub related changes * win/makefile.vc cause tclkit built to break -- cgit v0.12 From 5e95929933fc01e3143bd87ea781e1c2c6a3f67a Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 26 Nov 2009 09:40:32 +0000 Subject: Add .PHONY rules and documentation to preemptively stop trouble that plagued Tk from hitting Tcl too, and to make the overall makefile easier to understand. Some reorganization too to move related rules closer together. --- ChangeLog | 40 ++++++----- unix/Makefile.in | 197 +++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 149 insertions(+), 88 deletions(-) diff --git a/ChangeLog b/ChangeLog index dde921d..0e5bf08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,18 +1,25 @@ +2009-11-26 Donal K. Fellows + + * unix/Makefile.in: Add .PHONY rules and documentation to preemptively + stop trouble that plagued Tk from hitting Tcl too, and to make the + overall makefile easier to understand. Some reorganization too to move + related rules closer together. + 2009-11-26 Jan Nijtmans - * win/Makefile.in Fix [Bug 2902965] stub related changes - * win/makefile.vc cause tclkit built to break + * win/Makefile.in: [Bug 2902965]: Fix stub related changes that + * win/makefile.vc: caused tclkit build to break. * win/tclAppInit.c * unix/tcl.m4 * unix/Makefile.in * unix/tclAppInit.c - * unix/configure (regenerated) + * unix/configure: (regenerated) 2009-11-25 Kevin B. Kenny - * win/Makefile.in: Added a 'test-tcl' rule that is identical - to 'test' except that it does not go spelunking in 'pkgs/'. (This - rule has existed in unix/Makefile.in for some time.) + * win/Makefile.in: Added a 'test-tcl' rule that is identical to + 'test' except that it does not go spelunking in 'pkgs/'. (This rule + has existed in unix/Makefile.in for some time.) 2009-11-25 Stuart Cassoff @@ -24,19 +31,18 @@ 2009-11-24 Andreas Kupries - * library/tclIndex: Manually redone the part of tclIndex dealing - with safe.tcl and tm.tcl. This part passes the testsuite. Note - that automatic regeneration of this part is not possible because - it wrongly puts 'safe::Setup' on the list, and wrongly leaves out - 'safe::Log' which is more dynamically created than the generator - expects. + * library/tclIndex: Manually redone the part of tclIndex dealing with + safe.tcl and tm.tcl. This part passes the testsuite. Note that + automatic regeneration of this part is not possible because it wrongly + puts 'safe::Setup' on the list, and wrongly leaves out 'safe::Log' + which is more dynamically created than the generator expects. Further note that the file "clock.tcl" is explicitly loaded by - "init.tcl", the first time the clock command is invoked. The - relevant code can be found at line 172ff, roughly, the definition - of the procedure 'clock'. This means none of the procedures of - this file belong in the tclIndex. Another indicator that automatic - regeneration of tclIndex is ill-advised. + "init.tcl", the first time the clock command is invoked. The relevant + code can be found at line 172ff, roughly, the definition of the + procedure 'clock'. This means none of the procedures of this file + belong in the tclIndex. Another indicator that automatic regeneration + of tclIndex is ill-advised. 2009-11-24 Donal K. Fellows diff --git a/unix/Makefile.in b/unix/Makefile.in index d42a0e5..b4a4566 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.282 2009/11/26 07:01:47 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.283 2009/11/26 09:40:32 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -582,6 +582,10 @@ ZLIB_SRCS = \ SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \ $(OO_SRCS) $(STUB_SRCS) @PLAT_SRCS@ @ZLIB_SRCS@ +#-------------------------------------------------------------------------- +# Start of rules +#-------------------------------------------------------------------------- + all: binaries libraries doc packages binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh @@ -610,11 +614,44 @@ tclLibObjs: # This targets actually build the objects needed for the lib in the above case objs: ${OBJS} - tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o tclsh +Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in + $(SHELL) config.status +#tclConfig.h: $(UNIX_DIR)/tclConfig.h.in +# $(SHELL) config.status + +clean: clean-packages + rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ + errors tclsh tcltest lib.exp Tcl @DTRACE_HDR@ + cd dltest ; $(MAKE) clean + +distclean: distclean-packages clean + rm -rf Makefile config.status config.cache config.log tclConfig.sh \ + tclConfig.h *.plist Tcl.framework tcl.pc + cd dltest ; $(MAKE) distclean + +depend: + makedepend -- $(DEPEND_SWITCHES) -- $(SRCS) + +#-------------------------------------------------------------------------- +# The following target outputs the name of the top-level source directory for +# Tcl (it is used by Tk's configure script, for example). The .NO_PARALLEL +# line is needed to avoid problems under Sun's "pmake". Note: this target is +# now obsolete (use the autoconf variable TCL_SRC_DIR from tclConfig.sh +# instead). +#-------------------------------------------------------------------------- + +.NO_PARALLEL: topDirName +topDirName: + @cd $(TOP_DIR); pwd + +#-------------------------------------------------------------------------- +# Rules for testing +#-------------------------------------------------------------------------- + # Resetting the LIB_RUNTIME_DIR below is required so that the generated # tcltest executable gets the build directory burned into its ld search path. # This keeps tcltest from picking up an already installed version of the Tcl @@ -659,6 +696,19 @@ runtest: tcltest ro-test: tcltest echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./tcltest +# The following target generates the shared libraries in dltest/ that are used +# for testing; they are included as part of the "tcltest" target (via the +# BUILD_DLTEST variable) if dynamic loading is supported on this platform. The +# Makefile in the dltest subdirectory creates the dltest.marker file in this +# directory after a successful build. + +dltest.marker: ${STUB_LIB_FILE} + cd dltest ; $(MAKE) + +#-------------------------------------------------------------------------- +# Rules for running a shell before installation +#-------------------------------------------------------------------------- + # This target can be used to run tclsh from the build directory # via `make shell SCRIPT=/tmp/foo.tcl` shell: tclsh @@ -680,55 +730,9 @@ valgrind: tclsh tcltest valgrindshell: tclsh $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT) -# The following target outputs the name of the top-level source directory for -# Tcl (it is used by Tk's configure script, for example). The .NO_PARALLEL -# line is needed to avoid problems under Sun's "pmake". Note: this target is -# now obsolete (use the autoconf variable TCL_SRC_DIR from tclConfig.sh -# instead). - -.NO_PARALLEL: topDirName -topDirName: - @cd $(TOP_DIR); pwd - -# The following target generates the file generic/tclDate.c from the yacc -# grammar found in generic/tclGetDate.y. This is only run by hand as yacc is -# not available in all environments. The name of the .c file is different than -# the name of the .y file so that make doesn't try to automatically regenerate -# the .c file. - -gendate: - bison --output-file=$(GENERIC_DIR)/tclDate.c \ - --no-lines \ - --name-prefix=TclDate \ - $(GENERIC_DIR)/tclGetDate.y - -# yacc -l $(GENERIC_DIR)/tclGetDate.y -# sed -e 's/yy/TclDate/g' -e '/^#include /d' \ -# -e 's?SCCSID?RCS: @(#) ?' \ -# -e '/#ifdef __STDC__/,/#endif/d' -e '/TclDateerrlab:/d' \ -# -e '/TclDatenewstate:/d' -e '/#pragma/d' \ -# -e '/#include /d' -e 's/const /CONST /g' \ -# -e '/#define YYNEW/s/malloc/TclDateAlloc/g' \ -# -e '/#define YYENLARGE/,/realloc/s/realloc/TclDateRealloc/g' \ -# $(GENERIC_DIR)/tclDate.c -# rm y.tab.c - -# The following target generates the file generic/tclTomMath.h. It needs to be -# run (and the results checked) after updating to a new release of libtommath. - -gentommath_h: - $(TCL_EXE) "$(TOOL_DIR)/fix_tommath_h.tcl" \ - "$(TOMMATH_DIR)/tommath.h" \ - > "$(GENERIC_DIR)/tclTomMath.h" - -# The following target generates the shared libraries in dltest/ that are used -# for testing; they are included as part of the "tcltest" target (via the -# BUILD_DLTEST variable) if dynamic loading is supported on this platform. The -# Makefile in the dltest subdirectory creates the dltest.marker file in this -# directory after a successful build. - -dltest.marker: ${STUB_LIB_FILE} - cd dltest ; $(MAKE) +#-------------------------------------------------------------------------- +# Installation rules +#-------------------------------------------------------------------------- INSTALL_TARGETS = install-binaries install-libraries install-doc install-packages @EXTRA_INSTALL@ @@ -915,23 +919,9 @@ install-private-headers: libraries $(INSTALL_DATA) tclConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ fi; -Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in - $(SHELL) config.status -#tclConfig.h: $(UNIX_DIR)/tclConfig.h.in -# $(SHELL) config.status - -clean: clean-packages - rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ - errors tclsh tcltest lib.exp Tcl @DTRACE_HDR@ - cd dltest ; $(MAKE) clean - -distclean: distclean-packages clean - rm -rf Makefile config.status config.cache config.log tclConfig.sh \ - tclConfig.h *.plist Tcl.framework tcl.pc - cd dltest ; $(MAKE) distclean - -depend: - makedepend -- $(DEPEND_SWITCHES) -- $(SRCS) +#-------------------------------------------------------------------------- +# Rules for how to compile C files +#-------------------------------------------------------------------------- # Test binaries. The rules for tclTestInit.o and xtTestInit.o are complicated # because they are compiled from tclAppInit.c. Can't use the "-o" option @@ -1524,9 +1514,11 @@ $(DTRACE_HDR): $(DTRACE_SRC) $(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS) $(DTRACE) -G $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) $(TCL_OBJS) +#-------------------------------------------------------------------------- # The following targets are not completely general. They are provide purely # for documentation purposes so people who are interested in the Xt based # notifier can modify them to suit their own installation. +#-------------------------------------------------------------------------- xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ @DL_OBJS@ ${BUILD_DLTEST} @@ -1542,10 +1534,12 @@ tclXtTest.o: $(UNIX_DIR)/tclXtTest.c $(CC) -c $(APP_CC_SWITCHES) -I/usr/openwin/include \ $(UNIX_DIR)/tclXtTest.c +#-------------------------------------------------------------------------- # Compat binaries, these must be compiled for use in a shared library even # though they may be placed in a static executable or library. Since they are # included in both the tcl library and the stub library, they need to be # relocatable. +#-------------------------------------------------------------------------- fixstrtod.o: $(COMPAT_DIR)/fixstrtod.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/fixstrtod.c @@ -1603,8 +1597,10 @@ Zuncompr.o: $(ZLIB_DIR)/uncompr.c Zzutil.o: $(ZLIB_DIR)/zutil.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/zutil.c +#-------------------------------------------------------------------------- # Stub library binaries, these must be compiled for use in a shared library # even though they will be placed in a static archive +#-------------------------------------------------------------------------- tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubLib.c @@ -1615,9 +1611,9 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c .c.o: $(CC) -c $(CC_SWITCHES) $< -# +#-------------------------------------------------------------------------- # Bundled Package targets -# +#-------------------------------------------------------------------------- # propagate configure args like --enable-64bit to package configure PKG_CFG_ARGS = @PKG_CFG_ARGS@ @@ -1717,6 +1713,41 @@ dist-packages: configure-packages fi; \ done +#-------------------------------------------------------------------------- +# Maintainer-only targets +#-------------------------------------------------------------------------- + +# The following target generates the file generic/tclDate.c from the yacc +# grammar found in generic/tclGetDate.y. This is only run by hand as yacc is +# not available in all environments. The name of the .c file is different than +# the name of the .y file so that make doesn't try to automatically regenerate +# the .c file. + +gendate: + bison --output-file=$(GENERIC_DIR)/tclDate.c \ + --no-lines \ + --name-prefix=TclDate \ + $(GENERIC_DIR)/tclGetDate.y + +# yacc -l $(GENERIC_DIR)/tclGetDate.y +# sed -e 's/yy/TclDate/g' -e '/^#include /d' \ +# -e 's?SCCSID?RCS: @(#) ?' \ +# -e '/#ifdef __STDC__/,/#endif/d' -e '/TclDateerrlab:/d' \ +# -e '/TclDatenewstate:/d' -e '/#pragma/d' \ +# -e '/#include /d' -e 's/const /CONST /g' \ +# -e '/#define YYNEW/s/malloc/TclDateAlloc/g' \ +# -e '/#define YYENLARGE/,/realloc/s/realloc/TclDateRealloc/g' \ +# $(GENERIC_DIR)/tclDate.c +# rm y.tab.c + +# The following target generates the file generic/tclTomMath.h. It needs to be +# run (and the results checked) after updating to a new release of libtommath. + +gentommath_h: + $(TCL_EXE) "$(TOOL_DIR)/fix_tommath_h.tcl" \ + "$(TOMMATH_DIR)/tommath.h" \ + > "$(GENERIC_DIR)/tclTomMath.h" + # # Target to regenerate header files and stub files from the *.decls tables. # @@ -1790,6 +1821,10 @@ checkexports: $(TCL_LIB_FILE) | awk '$$2 ~ /^[TDBCS]$$/ { sub("^_", "", $$3); print $$3 }' \ | sort -n | grep -E -v '^[Tt]cl' || true +#-------------------------------------------------------------------------- +# Distribution building rules +#-------------------------------------------------------------------------- + # # Target to create a Tcl RPM for Linux. Requires that you be on a Linux # system. @@ -1964,12 +1999,17 @@ allpatch: dist mv $(DISTROOT)/tcl${VERSION} $(DISTROOT)/$(DISTNAME) mv $(DISTROOT)/old $(DISTROOT)/tcl${VERSION} -# +#-------------------------------------------------------------------------- # This target creates the HTML folder for Tcl & Tk and places it in # DISTDIR/html. It uses the tcltk-man2html.tcl tool from the Tcl group's tool # workspace. It depends on the Tcl & Tk being in directories called tcl8.* & # tk8.* up two directories from the TOOL_DIR. # +# Note that for platforms where this is important, it is more common to use a +# build of this HTML documentation that has already been placed online. As +# such, this rule is not guaranteed to work well on all systems; it only needs +# to function on those of the Tcl/Tk maintainers. +#-------------------------------------------------------------------------- html: tclsh $(BUILD_HTML) @@ -1987,4 +2027,19 @@ BUILD_HTML = \ ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS) +#-------------------------------------------------------------------------- +# The list of all the targets that do not correspond to real files. This stops +# 'make' from getting confused when someone makes an error in a rule. +#-------------------------------------------------------------------------- + +.PHONY: all binaries libraries doc packages tclLibObjs objs tcltest-real test +.PHONY: test-tcl gdb-test runtest ro-test shell gdb ddd valgrind valgrindshell +.PHONY: topDirName gendate gentommath_h install install-strip install-binaries +.PHONY: install-libraries install-tzdata install-msgs install-doc clean dist +.PHONY: install-private-headers distclean depend xttest configure-packages rpm +.PHONY: packages install-packages test-packages clean-packages dist-packages +.PHONY: distclean-packages genstubs checkstubs checkdoc checkuchar dist html +.PHONY: checkexports alldist allpatch html-tcl html-tk + +#-------------------------------------------------------------------------- # DO NOT DELETE THIS LINE -- make depend depends on it. -- cgit v0.12 From fd825274c39b0480fc6fb360bf0e59d99a9c37f7 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 26 Nov 2009 17:37:26 +0000 Subject: fix warning on LP64 --- generic/tclThreadAlloc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index a47b0d8..bd6491c 100755 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadAlloc.c,v 1.30 2009/09/29 05:03:46 dgp Exp $ + * RCS: @(#) $Id: tclThreadAlloc.c,v 1.31 2009/11/26 17:37:26 das Exp $ */ #include "tclInt.h" @@ -297,6 +297,7 @@ TclpAlloc( register int bucket; size_t size; +#ifndef __LP64__ if (sizeof(int) >= sizeof(size_t)) { /* An unsigned int overflow can also be a size_t overflow */ const size_t zero = 0; @@ -307,6 +308,7 @@ TclpAlloc( return NULL; } } +#endif cachePtr = TclpGetAllocCache(); if (cachePtr == NULL) { @@ -440,6 +442,7 @@ TclpRealloc( return TclpAlloc(reqSize); } +#ifndef __LP64__ if (sizeof(int) >= sizeof(size_t)) { /* An unsigned int overflow can also be a size_t overflow */ const size_t zero = 0; @@ -450,6 +453,7 @@ TclpRealloc( return NULL; } } +#endif cachePtr = TclpGetAllocCache(); if (cachePtr == NULL) { -- cgit v0.12 From dc3b82e5c4fef5b8efbdcef11cfc05216d88cc0c Mon Sep 17 00:00:00 2001 From: das Date: Thu, 26 Nov 2009 17:37:48 +0000 Subject: autoheader-2.59 --- unix/tclConfig.h.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index d1e6e94..bc63530 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -379,9 +379,6 @@ /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME -/* Define to 1 if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - /* Is getcwd Posix-compliant? */ #undef USEGETWD -- cgit v0.12 From 26dda484fe7ad621e71585270c0a3c914c5fb375 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 27 Nov 2009 06:33:39 +0000 Subject: [Bug 2903811]: Remove unneeded restrictions on usefully calling the oo::object->variable method. Leaving it hidden is enough. --- ChangeLog | 5 +++++ generic/tclOOBasic.c | 14 ++++++-------- tests/oo.test | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e5bf08..9517277 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-27 Donal K. Fellows + + * generic/tclOOBasic.c (TclOO_Object_LinkVar): [Bug 2903811]: Remove + unneeded restrictions on who can usefully call this method. + 2009-11-26 Donal K. Fellows * unix/Makefile.in: Add .PHONY rules and documentation to preemptively diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index f6e4542..e064928 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.19 2009/10/22 15:39:58 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.20 2009/11/27 06:33:40 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -474,12 +474,12 @@ TclOO_Object_LinkVar( } /* - * Do nothing if we are not called from the body of a method. In this - * respect, we are like the [global] command. + * A sanity check. Shouldn't ever happen. (This is all that remains of a + * more complex check inherited from [global] after we have applied the + * fix for [Bug 2903811]; note that the fix involved *removing* code.) */ - if (iPtr->varFramePtr == NULL || - !(iPtr->varFramePtr->isProcCallFrame & FRAME_IS_METHOD)) { + if (iPtr->varFramePtr == NULL) { return TCL_OK; } @@ -505,9 +505,7 @@ TclOO_Object_LinkVar( * would only work if the caller was a method of the object itself, * which might not be true if the method was exported. This is a bit * of a hack, but the simplest way to do this (pushing a stack frame - * would be horribly expensive by comparison). We never have to worry - * about the case where we're dealing with the global namespace; we've - * already checked that we are inside a method. + * would be horribly expensive by comparison). */ savedNsPtr = iPtr->varFramePtr->nsPtr; diff --git a/tests/oo.test b/tests/oo.test index 4c289ab..b07b536 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.31 2009/11/24 12:00:08 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.32 2009/11/27 06:33:40 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1815,6 +1815,39 @@ test oo-20.12 {OO: variable method accept zero args (TIP 323)} -setup { } foo demo } -result {} +test oo-20.13 {OO: variable method use in non-methods [Bug 2903811]} -setup { + oo::object create fooObj + oo::objdefine fooObj export variable +} -cleanup { + fooObj destroy +} -body { + apply {{} {fooObj variable x; set x ok; return}} + apply {{} {fooObj variable x; return $x}} +} -result ok +test oo-20.14 {OO: variable method use in non-methods [Bug 2903811]} -setup { + oo::object create fooObj + oo::objdefine fooObj export variable + namespace eval ns1 {} + namespace eval ns2 {} + set x bad +} -cleanup { + fooObj destroy + namespace delete ns1 ns2 + unset x +} -body { + namespace eval ns1 {fooObj variable x; set x ok; subst ""} + set x bad + namespace eval ns2 {fooObj variable x; return $x} +} -result ok +test oo-20.15 {OO: variable method use in non-methods [Bug 2903811]} -setup { + oo::object create fooObj + oo::objdefine fooObj export variable varname +} -cleanup { + fooObj destroy +} -body { + apply {{} {fooObj variable x; set x ok; return}} + return [set [fooObj varname x]] +} -result ok test oo-21.1 {OO: inheritance ordering} -setup { oo::class create A -- cgit v0.12 From a77a0e955053195556778cd3461fd96ded585a89 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 27 Nov 2009 07:27:52 +0000 Subject: Match the version-bump of TclOO. --- ChangeLog | 3 +++ generic/tclOO.h | 5 +++-- tests/oo.test | 4 ++-- unix/tclooConfig.sh | 4 ++-- win/tclooConfig.sh | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9517277..d10fe50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-11-27 Donal K. Fellows + BUMP VERSION OF TCLOO TO 0.6.2. Too many people need accumulated small + versions and bugfixes, so the version-bump removes confusion. + * generic/tclOOBasic.c (TclOO_Object_LinkVar): [Bug 2903811]: Remove unneeded restrictions on who can usefully call this method. diff --git a/generic/tclOO.h b/generic/tclOO.h index 85bc514..a2a6aa1 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.h,v 1.8 2009/09/26 21:42:05 dkf Exp $ + * RCS: @(#) $Id: tclOO.h,v 1.9 2009/11/27 07:27:52 dkf Exp $ */ #ifndef TCLOO_H_INCLUDED @@ -28,11 +28,12 @@ * standalone TclOO version matches. Also make sure that this matches the * version in the files: * + * tests/oo.test * unix/tclooConfig.sh * win/tclooConfig.sh */ -#define TCLOO_VERSION "0.6.1" +#define TCLOO_VERSION "0.6.2" #define TCLOO_PATCHLEVEL TCLOO_VERSION /* diff --git a/tests/oo.test b/tests/oo.test index b07b536..a0fbc55 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,9 +7,9 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.32 2009/11/27 06:33:40 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.33 2009/11/27 07:27:53 dkf Exp $ -package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h +package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* diff --git a/unix/tclooConfig.sh b/unix/tclooConfig.sh index 565fe98..86959ac 100644 --- a/unix/tclooConfig.sh +++ b/unix/tclooConfig.sh @@ -9,7 +9,7 @@ # # The information in this file is specific to a single platform. # -# RCS: @(#) $Id: tclooConfig.sh,v 1.1 2009/09/26 21:42:05 dkf Exp $ +# RCS: @(#) $Id: tclooConfig.sh,v 1.2 2009/11/27 07:27:53 dkf Exp $ # These are mostly empty because no special steps are ever needed from Tcl 8.6 # onwards; all libraries and include files are just part of Tcl. @@ -18,4 +18,4 @@ TCLOO_STUB_LIB_SPEC="" TCLOO_INCLUDE_SPEC="" TCLOO_PRIVATE_INCLUDE_SPEC="" TCLOO_CFLAGS=-DUSE_TCLOO_STUBS -TCLOO_VERSION=0.6.1 +TCLOO_VERSION=0.6.2 diff --git a/win/tclooConfig.sh b/win/tclooConfig.sh index 565fe98..86959ac 100644 --- a/win/tclooConfig.sh +++ b/win/tclooConfig.sh @@ -9,7 +9,7 @@ # # The information in this file is specific to a single platform. # -# RCS: @(#) $Id: tclooConfig.sh,v 1.1 2009/09/26 21:42:05 dkf Exp $ +# RCS: @(#) $Id: tclooConfig.sh,v 1.2 2009/11/27 07:27:53 dkf Exp $ # These are mostly empty because no special steps are ever needed from Tcl 8.6 # onwards; all libraries and include files are just part of Tcl. @@ -18,4 +18,4 @@ TCLOO_STUB_LIB_SPEC="" TCLOO_INCLUDE_SPEC="" TCLOO_PRIVATE_INCLUDE_SPEC="" TCLOO_CFLAGS=-DUSE_TCLOO_STUBS -TCLOO_VERSION=0.6.1 +TCLOO_VERSION=0.6.2 -- cgit v0.12 From 8c5ade5b276e02962ef5855e6bd777685ab8791f Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 27 Nov 2009 14:35:10 +0000 Subject: [Patch 2903921]: Many small spelling fixes from Larry Virden. --- ChangeLog | 7 +++++++ doc/BoolObj.3 | 4 ++-- doc/Class.3 | 4 ++-- doc/CrtChannel.3 | 12 ++++++------ doc/DictObj.3 | 4 ++-- doc/DoubleObj.3 | 4 ++-- doc/Ensemble.3 | 8 ++++---- doc/Environment.3 | 15 +++++++++------ doc/FileSystem.3 | 10 +++++----- doc/Hash.3 | 4 ++-- doc/IntObj.3 | 4 ++-- doc/Limit.3 | 4 ++-- doc/Method.3 | 4 ++-- doc/NRE.3 | 4 ++-- doc/ObjectType.3 | 4 ++-- doc/PkgRequire.3 | 4 ++-- doc/SetChanErr.3 | 10 +++++----- doc/SetResult.3 | 4 ++-- 18 files changed, 60 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index d10fe50..3b13c8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-11-27 Donal K. Fellows + * doc/BoolObj.3, doc/Class.3, doc/CrtChannel.3, doc/DictObj.3: + * doc/DoubleObj.3, doc/Ensemble.3, doc/Environment.3: + * doc/FileSystem.3, doc/Hash.3, doc/IntObj.3, doc/Limit.3: + * doc/Method.3, doc/NRE.3, doc/ObjectType.3, doc/PkgRequire.3: + * doc/SetChanErr.3, doc/SetResult.3: [Patch 2903921]: Many small + spelling fixes from Larry Virden. + BUMP VERSION OF TCLOO TO 0.6.2. Too many people need accumulated small versions and bugfixes, so the version-bump removes confusion. diff --git a/doc/BoolObj.3 b/doc/BoolObj.3 index 58085c0..e8563d3 100644 --- a/doc/BoolObj.3 +++ b/doc/BoolObj.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: BoolObj.3,v 1.11 2007/12/13 15:22:30 dgp Exp $ +'\" RCS: @(#) $Id: BoolObj.3,v 1.12 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_BooleanObj 3 8.5 Tcl "Tcl Library Procedures" @@ -59,7 +59,7 @@ write to a shared Tcl_Obj will panic. A successful write of \fIboolValue\fR into \fI*objPtr\fR implies the freeing of any former value stored in \fI*objPtr\fR. .PP -\fBTcl_GetBooleanFromObj\fR attempts to retrive a boolean value +\fBTcl_GetBooleanFromObj\fR attempts to retrieve a boolean value from the value stored in \fI*objPtr\fR. If \fIobjPtr\fR holds a string value recognized by \fBTcl_GetBoolean\fR, then the recognized boolean value is written at the address given diff --git a/doc/Class.3 b/doc/Class.3 index 5792b17..b9f3460 100644 --- a/doc/Class.3 +++ b/doc/Class.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Class.3,v 1.4 2009/07/19 11:46:53 dkf Exp $ +'\" RCS: @(#) $Id: Class.3,v 1.5 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions" @@ -116,7 +116,7 @@ Instances of classes are created using \fBTcl_NewObjectInstance\fR, which takes creates an object from any class (and which is internally called by both the \fBcreate\fR and \fBnew\fR methods of the \fBoo::class\fR class). It takes parameters that optionally give the name of the object and namespace to -create, and which describe the arguments to pass to to the class's constructor +create, and which describe the arguments to pass to the class's constructor (if any). The result of the function will be either a reference to the newly created object, or NULL if the creation failed (when an error message will be left in the interpreter result). In addition, objects may be copied by using diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index 7b1c6d7..a76efa1 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChannel.3,v 1.44 2009/11/18 22:41:41 nijtmans Exp $ +'\" RCS: @(#) $Id: CrtChannel.3,v 1.45 2009/11/27 14:35:10 dkf Exp $ .so man.macros .TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -299,7 +299,7 @@ Also notifies the driver if the \fBTcl_ChannelType\fR version is \fBTCL_CHANNEL_VERSION_4\fR (or higher), and \fBTcl_DriverThreadActionProc\fR is defined for it. .PP -\fBTcl_ClearChannelHandlers\fR removes all channelhandlers and event +\fBTcl_ClearChannelHandlers\fR removes all channel handlers and event scripts associated with the specified \fIchannel\fR, thus shutting down all event processing for this channel. .SH TCL_CHANNELTYPE @@ -375,10 +375,10 @@ a pointer to the string. The \fIversion\fR field should be set to the version of the structure that you require. \fBTCL_CHANNEL_VERSION_2\fR is the minimum recommended. -\fBTCL_CHANNEL_VERSION_3\fR must be set to specifiy the \fIwideSeekProc\fR member. -\fBTCL_CHANNEL_VERSION_4\fR must be set to specifiy the \fIthreadActionProc\fR member +\fBTCL_CHANNEL_VERSION_3\fR must be set to specify the \fIwideSeekProc\fR member. +\fBTCL_CHANNEL_VERSION_4\fR must be set to specify the \fIthreadActionProc\fR member (includes \fIwideSeekProc\fR). -\fBTCL_CHANNEL_VERSION_5\fR must be set to specifiy the +\fBTCL_CHANNEL_VERSION_5\fR must be set to specify the \fItruncateProc\fR members (includes \fIwideSeekProc\fR and \fIthreadActionProc\fR). If it is not set to any of these, then this @@ -426,7 +426,7 @@ A channel driver \fBnot\fR supplying a \fIblockModeProc\fR has to be very, very careful. It has to tell the generic layer exactly which blocking mode is acceptable to it, and should this also document for the user so that the blocking mode of the channel is not changed to an -inacceptable value. Any confusion here may lead the interpreter into a +unacceptable value. Any confusion here may lead the interpreter into a (spurious and difficult to find) deadlock. .SS "CLOSEPROC AND CLOSE2PROC" .PP diff --git a/doc/DictObj.3 b/doc/DictObj.3 index 45e57b9..b54ee20 100644 --- a/doc/DictObj.3 +++ b/doc/DictObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: DictObj.3,v 1.12 2008/07/15 12:58:19 dkf Exp $ +'\" RCS: @(#) $Id: DictObj.3,v 1.13 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_DictObj 3 8.5 Tcl "Tcl Library Procedures" @@ -105,7 +105,7 @@ modulo any keys being deleted (which removes them from the order) or added (which adds them to the end of the order). If reinterpreted as a list, the values at the even-valued indices in the list will be the keys of the dictionary, and each will be followed (in the odd-valued -index) bu the value associated with that key. +index) by the value associated with that key. .PP The procedures described in this man page are used to create, modify, index, and iterate over dictionary objects from C code. diff --git a/doc/DoubleObj.3 b/doc/DoubleObj.3 index ea62c07..3fd6730 100644 --- a/doc/DoubleObj.3 +++ b/doc/DoubleObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: DoubleObj.3,v 1.4 2006/04/25 17:15:25 dgp Exp $ +'\" RCS: @(#) $Id: DoubleObj.3,v 1.5 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_DoubleObj 3 8.0 Tcl "Tcl Library Procedures" @@ -52,7 +52,7 @@ of a shared Tcl object violates Tcl's copy-on-write policy. Any existing string representation or internal representation in the unshared Tcl object will be freed as a consequence of setting the new value. .PP -\fBTcl_GetDoubleFromObj\fR attempts to retreive a double value from the +\fBTcl_GetDoubleFromObj\fR attempts to retrieve a double value from the Tcl object \fIobjPtr\fR. If the attempt succeeds, then \fBTCL_OK\fR is returned, and the double value is written to the storage pointed to by \fIdoublePtr\fR. If the attempt fails, then \fBTCL_ERROR\fR is returned, diff --git a/doc/Ensemble.3 b/doc/Ensemble.3 index 07e67db..e45c326 100644 --- a/doc/Ensemble.3 +++ b/doc/Ensemble.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Ensemble.3,v 1.7 2008/09/28 22:17:37 dkf Exp $ +'\" RCS: @(#) $Id: Ensemble.3,v 1.8 2009/11/27 14:35:10 dkf Exp $ '\" '\" This documents the C API introduced in TIP#235 '\" @@ -119,7 +119,7 @@ arguments: the interpreter to work within, the name of the ensemble to create, the namespace within the interpreter to bind the ensemble to, and the default set of ensemble flags. The result of the function is the command token for the ensemble, which may be used to further -configure the ensemble using the API descibed below in \fBENSEMBLE +configure the ensemble using the API described below in \fBENSEMBLE PROPERTIES\fR. .PP Given the name of an ensemble command, the token for that command may @@ -165,7 +165,7 @@ even if it is unshared. \fBformal pre-subcommand parameter list\fR (read-write) .VS 8.6 A list of formal parameter names (the names only being used when generating -error messages) that come at invokation of the ensemble between the name of +error messages) that come at invocation of the ensemble between the name of the ensemble and the subcommand argument. NULL (the default) is equivalent to the empty list. May be read and written using \fBTcl_GetEnsembleParameterList\fR and \fBTcl_SetEnsembleParameterList\fR @@ -185,7 +185,7 @@ the bound namespace. May be read and written using \fBTcl_SetEnsembleSubcommandList\fR respectively. The result of both of those functions is a Tcl result code (TCL_OK, or TCL_ERROR if the token does not refer to an ensemble) and the list obtained from -\fBTcl_GetEnsembleSubcommandList\fR should alays be treated as +\fBTcl_GetEnsembleSubcommandList\fR should always be treated as immutable even if it is unshared. .TP \fBunknown subcommand handler command prefix\fR (read-write) diff --git a/doc/Environment.3 b/doc/Environment.3 index 16efd84..5a7c059 100644 --- a/doc/Environment.3 +++ b/doc/Environment.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Environment.3,v 1.6 2005/05/10 18:33:55 kennykb Exp $ +'\" RCS: @(#) $Id: Environment.3,v 1.7 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_PutEnv 3 "7.5" Tcl "Tcl Library Procedures" @@ -19,19 +19,22 @@ int \fBTcl_PutEnv\fR(\fIassignment\fR) .SH ARGUMENTS .AS "const char" *assignment -.AP "const char" *assignnment in -Info about environment variable in the format NAME=value. +.AP "const char" *assignment in +Info about environment variable in the format +.QW \fINAME\fB=\fIvalue\fR . The \fIassignment\fR argument is in the system encoding. .BE - .SH DESCRIPTION .PP \fBTcl_PutEnv\fR sets an environment variable. The information is -passed in a single string of the form NAME=value. This procedure is +passed in a single string of the form +.QW \fINAME\fB=\fIvalue\fR . +This procedure is intended to be a stand-in for the UNIX \fBputenv\fR system call. All Tcl-based applications using \fBputenv\fR should redefine it to \fBTcl_PutEnv\fR so that they will interface properly to the Tcl runtime. - +.SH "SEE ALSO" +tclvars(n) .SH KEYWORDS environment, variable diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index bec5e23..694c718 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.67 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.68 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -200,7 +200,7 @@ As for \fIpathPtr\fR, but used for the destination filename for a copy or rename operation. .AP "const char" *encodingName in The encoding of the data stored in the -file identified by \fIpathPtr\fR and to be evaluted. +file identified by \fIpathPtr\fR and to be evaluated. .AP "const char" *pattern in Only files or directories matching this pattern will be returned. .AP Tcl_GlobTypeData *types in @@ -950,7 +950,7 @@ static Tcl_Filesystem vfsFilesystem = { NULL, /* Core will use stat for lstat */ NULL, - /* No load; use the core fallback mechansism */ + /* No load; use the core fallback mechanism */ NULL, /* We don't need a getcwd or chdir; the core's own * internal value is suitable */ @@ -1362,7 +1362,7 @@ will take that list and first increment its reference count before using it. On completion of that use, Tcl will decrement its reference count. Hence if the list should be disposed of by Tcl when done, it should have a reference count of zero, and if the list should not be disposed of, the -filesystem should ensure it returns an object with a refererence count +filesystem should ensure it returns an object with a reference count of at least one. .SS FILEATTRSGETPROC .PP @@ -1432,7 +1432,7 @@ occurred in the process. If successful, the directory specified by deleted without error. If this flag is not given, then and the directory is non-empty a POSIX .QW EEXIST -error should be signalled. If an +error should be signaled. If an error does occur, the name of the file or directory which caused the error should be placed in \fIerrorPtr\fR. .SS DELETEFILEPROC diff --git a/doc/Hash.3 b/doc/Hash.3 index f2e5228..8075140 100644 --- a/doc/Hash.3 +++ b/doc/Hash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Hash.3,v 1.31 2008/11/17 22:15:34 nijtmans Exp $ +'\" RCS: @(#) $Id: Hash.3,v 1.32 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures" @@ -221,7 +221,7 @@ NULL if the end of the table has been reached. A call to \fBTcl_FirstHashEntry\fR followed by calls to \fBTcl_NextHashEntry\fR will return each of the entries in the table exactly once, in an arbitrary order. -It is unadvisable to modify the structure of the table, e.g. +It is inadvisable to modify the structure of the table, e.g. by creating or deleting entries, while the search is in progress, with the exception of deleting the entry returned by \fBTcl_FirstHashEntry\fR or \fBTcl_NextHashEntry\fR. diff --git a/doc/IntObj.3 b/doc/IntObj.3 index bad5dd0..99e6ab6 100644 --- a/doc/IntObj.3 +++ b/doc/IntObj.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: IntObj.3,v 1.16 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: IntObj.3,v 1.17 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_IntObj 3 8.5 Tcl "Tcl Library Procedures" @@ -91,7 +91,7 @@ used to initialize a multi-precision integer value. These procedures are used to create, modify, and read Tcl objects that hold integral values. .PP -The different routines exist to accomodate different integral types in C +The different routines exist to accommodate different integral types in C with which values might be exchanged. The C integral types for which Tcl provides value exchange routines are \fBint\fR, \fBlong int\fR, \fBTcl_WideInt\fR, and \fBmp_int\fR. The \fBint\fR and \fBlong int\fR types diff --git a/doc/Limit.3 b/doc/Limit.3 index 425e41f..be4373d 100644 --- a/doc/Limit.3 +++ b/doc/Limit.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Limit.3,v 1.8 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: Limit.3,v 1.9 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_LimitCheck 3 8.5 Tcl "Tcl Library Procedures" @@ -169,7 +169,7 @@ typedef void \fBTcl_LimitHandlerProc\fR( .CE .PP The \fIclientData\fR argument to the handler will be whatever is -passed to the \fIclientData\fR argment to \fBTcl_LimitAddHandler\fR, +passed to the \fIclientData\fR argument to \fBTcl_LimitAddHandler\fR, and the \fIinterp\fR is the interpreter that had its limit exceeded. .PP The \fIdeleteProc\fR argument to \fBTcl_LimitAddHandler\fR is a diff --git a/doc/Method.3 b/doc/Method.3 index be7bab5..948e19e 100644 --- a/doc/Method.3 +++ b/doc/Method.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Method.3,v 1.3 2008/09/23 14:27:25 dkf Exp $ +'\" RCS: @(#) $Id: Method.3,v 1.4 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_Method 3 0.1 TclOO "TclOO Library Functions" @@ -131,7 +131,7 @@ require any arguments) should be installed into their class using the \fBTcl_ClassSetDestructor\fR function. Unnamed methods should not be used for any other purpose, and named methods should not be used as either constructors or destructors. Also note that a NULL \fImethodTypePtr\fR is used to provide -internal signalling, and should not be used in client code. +internal signaling, and should not be used in client code. .SS "METHOD CALL CONTEXTS" .PP When a method is called, a method-call context reference is passed in as one diff --git a/doc/NRE.3 b/doc/NRE.3 index 94d2ba2..2763d5f 100644 --- a/doc/NRE.3 +++ b/doc/NRE.3 @@ -1,10 +1,10 @@ .\" -.\" Copyright (c) 2008 by Kevin B. Eknny. +.\" Copyright (c) 2008 by Kevin B. Kenny. .\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: NRE.3,v 1.6 2009/11/01 18:15:40 jenglish Exp $ +'\" RCS: @(#) $Id: NRE.3,v 1.7 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH NRE 3 8.6 Tcl "Tcl Library Procedures" diff --git a/doc/ObjectType.3 b/doc/ObjectType.3 index 9803615..47ed451 100644 --- a/doc/ObjectType.3 +++ b/doc/ObjectType.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ObjectType.3,v 1.21 2008/12/18 21:23:47 dkf Exp $ +'\" RCS: @(#) $Id: ObjectType.3,v 1.22 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures" @@ -100,7 +100,7 @@ Extension writers can define new object types by defining four procedures and initializing a Tcl_ObjType structure to describe the type. Extension writers may also pass a pointer to their Tcl_ObjType -structire to \fBTcl_RegisterObjType\fR if they wish to permit +structure to \fBTcl_RegisterObjType\fR if they wish to permit other extensions to look up their Tcl_ObjType by name with the \fBTcl_GetObjType\fR routine. The \fBTcl_ObjType\fR structure is defined as follows: diff --git a/doc/PkgRequire.3 b/doc/PkgRequire.3 index 38b2ef1..b4e8a19 100644 --- a/doc/PkgRequire.3 +++ b/doc/PkgRequire.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: PkgRequire.3,v 1.12 2008/12/18 21:23:47 dkf Exp $ +'\" RCS: @(#) $Id: PkgRequire.3,v 1.13 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures" @@ -91,7 +91,7 @@ functions. .PP \fBTcl_PkgRequireProc\fR is the form of \fBpackage require\fR handling multiple requirements. The other forms are present for backward -compatibility and translate their invokations to this form. +compatibility and translate their invocations to this form. .SH KEYWORDS package, present, provide, require, version .SH "SEE ALSO" diff --git a/doc/SetChanErr.3 b/doc/SetChanErr.3 index a118155..e4066e8 100644 --- a/doc/SetChanErr.3 +++ b/doc/SetChanErr.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetChanErr.3,v 1.5 2008/12/17 21:05:05 dkf Exp $ +'\" RCS: @(#) $Id: SetChanErr.3,v 1.6 2009/11/27 14:35:10 dkf Exp $ .so man.macros .TH Tcl_SetChannelError 3 8.5 Tcl "Tcl Library Procedures" .BS @@ -68,8 +68,8 @@ NULL. .PP \fBTcl_GetChannelError\fR places either the error message held in the bypass area of the specified channel into \fImsgPtr\fR, or NULL; and resets the -bypass, that is, after an invokation all following invokations will return -NULL, until an intervening invokation of \fBTcl_SetChannelError\fR with a +bypass, that is, after an invocation all following invocations will return +NULL, until an intervening invocation of \fBTcl_SetChannelError\fR with a non-NULL message. The \fImsgPtr\fR must not be NULL. The reference count of the message is not touched. The reference previously held by the channel is now held by the caller of the function and it is its responsibility to release @@ -77,8 +77,8 @@ that reference when it is done with the object. .PP \fBTcl_GetChannelErrorInterp\fR places either the error message held in the bypass area of the specified interpreter into \fImsgPtr\fR, or NULL; and -resets the bypass, that is, after an invokation all following invokations will -return NULL, until an intervening invokation of +resets the bypass, that is, after an invocation all following invocations will +return NULL, until an intervening invocation of \fBTcl_SetChannelErrorInterp\fR with a non-NULL message. The \fImsgPtr\fR must not be NULL. The reference count of the message is not touched. The reference previously held by the interpreter is now held by the caller of the function diff --git a/doc/SetResult.3 b/doc/SetResult.3 index 12ccc90..edd74c6 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.24 2008/12/15 18:33:25 dgp Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.25 2009/11/27 14:35:10 dkf Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" @@ -149,7 +149,7 @@ of the result are produced. storage management issues associated with managing \fIinterp\fR's result, such as allocating a larger result area if necessary. It also manages conversion to and from the \fIresult\fR field of the -\fIinterp\fR so as to handle backward-compatability with old-style +\fIinterp\fR so as to handle backward-compatibility with old-style extensions. Any number of \fIresult\fR arguments may be passed in a single call; the last argument in the list must be a NULL pointer. -- cgit v0.12 From d8b589ccb61ee3efe3554992135b24a44cad07c3 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 27 Nov 2009 21:44:01 +0000 Subject: * win/tclAppInit.c (Tcl_AppInit): Reverted Jan's change that added a call to Tcl_InitStubs. 'tclsh' and 'tcltest' are providers, not consumers of the Stubs table, and should not link with the Stubs library, but only with the main Tcl library. (In any case, the presence of Tcl_InitStubs broke the build.) [Bug 2902965] --- ChangeLog | 8 ++++++++ win/tclAppInit.c | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b13c8f..9399af2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-11-27 Kevin B. Kenny + + * win/tclAppInit.c (Tcl_AppInit): Reverted Jan's change that added + a call to Tcl_InitStubs. 'tclsh' and 'tcltest' are providers, not + consumers of the Stubs table, and should not link with the Stubs + library, but only with the main Tcl library. (In any case, the + presence of Tcl_InitStubs broke the build.) [Bug 2902965] + 2009-11-27 Donal K. Fellows * doc/BoolObj.3, doc/Class.3, doc/CrtChannel.3, doc/DictObj.3: diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 9b7a3e9..1f90610 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.29 2009/11/26 07:01:51 nijtmans Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.30 2009/11/27 21:44:01 kennykb Exp $ */ #include "tcl.h" @@ -125,10 +125,6 @@ int Tcl_AppInit( Tcl_Interp *interp) /* Interpreter for application. */ { -#undef Tcl_InitStubs - if (!Tcl_InitStubs(interp, TCL_VERSION, 0)) { - return TCL_ERROR; - } if (Tcl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } -- cgit v0.12 From db7bb18efce7421bb11eaea01689691a2b53f48b Mon Sep 17 00:00:00 2001 From: das Date: Sun, 29 Nov 2009 08:46:38 +0000 Subject: reverted 2902965 changes that broke static builds on OSX --- unix/Makefile.in | 4 ++-- unix/configure | 4 ++-- unix/tcl.m4 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index b4a4566..c184c78 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.283 2009/11/26 09:40:32 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.284 2009/11/29 08:46:38 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -615,7 +615,7 @@ tclLibObjs: objs: ${OBJS} tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o tclsh Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in diff --git a/unix/configure b/unix/configure index f8dcb5e..991879c 100755 --- a/unix/configure +++ b/unix/configure @@ -8971,12 +8971,12 @@ else if test "$RANLIB" = ""; then - MAKE_LIB='$(STLIB_LD) $@ ${OBJS} ${STUB_LIB_OBJS}' + MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' else - MAKE_LIB='${STLIB_LD} $@ ${OBJS} ${STUB_LIB_OBJS} ; ${RANLIB} $@' + MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index d315658..6c23ace 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2066,10 +2066,10 @@ dnl # preprocessing tests use only CPPFLAGS. LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} AS_IF([test "$RANLIB" = ""], [ - MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS} ${STUB_LIB_OBJS}' + MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' ], [ - MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ${STUB_LIB_OBJS} ; ${RANLIB} [$]@' + MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' ]) ]) -- cgit v0.12 From d8f31f39067db330c33a736531132fa7d375885a Mon Sep 17 00:00:00 2001 From: das Date: Sun, 29 Nov 2009 09:00:24 +0000 Subject: revert 2902965 tclAppInit.c change --- unix/tclAppInit.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 715a098..7c78b58 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.21 2009/11/26 07:01:46 nijtmans Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.22 2009/11/29 09:00:24 das Exp $ */ #include "tcl.h" @@ -110,10 +110,6 @@ int Tcl_AppInit( Tcl_Interp *interp) /* Interpreter for application. */ { -#undef Tcl_InitStubs - if (!Tcl_InitStubs(interp, TCL_VERSION, 0)) { - return TCL_ERROR; - } if (Tcl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } -- cgit v0.12 From 31f267b80c6db8240687b735e7ac5d5f63f2c8d2 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 30 Nov 2009 15:39:30 +0000 Subject: [Bug 2901433]: Improved description of {*} syntax. --- ChangeLog | 15 ++++++++++----- doc/Tcl.n | 15 ++++++++------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9399af2..0f90676 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ +2009-11-30 Donal K. Fellows + + * doc/Tcl.n: [Bug 2901433]: Improved description of expansion to + mention that it is using list syntax. + 2009-11-27 Kevin B. Kenny - * win/tclAppInit.c (Tcl_AppInit): Reverted Jan's change that added - a call to Tcl_InitStubs. 'tclsh' and 'tcltest' are providers, not - consumers of the Stubs table, and should not link with the Stubs - library, but only with the main Tcl library. (In any case, the - presence of Tcl_InitStubs broke the build.) [Bug 2902965] + * win/tclAppInit.c (Tcl_AppInit): [Bug 2902965]: Reverted Jan's change + that added a call to Tcl_InitStubs. The 'tclsh' and 'tcltest' programs + are providers, not consumers of the Stubs table, and should not link + with the Stubs library, but only with the main Tcl library. (In any + case, the presence of Tcl_InitStubs broke the build.) 2009-11-27 Donal K. Fellows diff --git a/doc/Tcl.n b/doc/Tcl.n index d3ed71c..565be1d 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl.n,v 1.21 2009/05/03 18:05:39 dkf Exp $ +'\" RCS: @(#) $Id: Tcl.n,v 1.22 2009/11/30 15:39:31 dkf Exp $ '\" .so man.macros .TH Tcl n "8.5" Tcl "Tcl Built-In Commands" @@ -55,14 +55,15 @@ If a word starts with the string .QW {*} followed by a non-whitespace character, then the leading .QW {*} -is removed -and the rest of the word is parsed and substituted as any other -word. After substitution, the word is parsed again without -substitutions, and its words are added to the command being +is removed and the rest of the word is parsed and substituted as any other +word. After substitution, the word is parsed as a list (without command or +variable substitutions; backslash substitutions are performed as is normal for +a list and individual internal words may be surrounded by either braces or +double-quote characters), and its words are added to the command being substituted. For instance, -.QW "cmd a {*}{b c} d {*}{e f}" +.QW "cmd a {*}{b [c]} d {*}{$e f \"g h\"}" is equivalent to -.QW "cmd a b c d e f" . +.QW "cmd a b {[c]} d {$e} f \"g h\"" . .IP "[6] \fBBraces.\fR" If the first character of a word is an open brace .PQ { -- cgit v0.12 From 79404cf9daff8f54e932c97c00e1229d1720a77c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 30 Nov 2009 23:10:38 +0000 Subject: tcl.h Don't use EXPORT for Tcl_InitStubs win/Makefile.in Better dependancies in case of static build. --- ChangeLog | 5 +++++ generic/tcl.h | 6 +++--- win/Makefile.in | 58 ++++++++++++++++++++++++++++++--------------------------- 3 files changed, 39 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f90676..f6fc1b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-30 Jan Nijtmans + + * generic/tcl.h Don't use EXPORT for Tcl_InitStubs + * win/Makefile.in Better dependancies in case of static build. + 2009-11-30 Donal K. Fellows * doc/Tcl.n: [Bug 2901433]: Improved description of expansion to diff --git a/generic/tcl.h b/generic/tcl.h index 756015d..a13b897 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.292 2009/10/29 18:38:08 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.293 2009/11/30 23:10:38 nijtmans Exp $ */ #ifndef _TCL @@ -2309,9 +2309,9 @@ typedef int (*Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, * main library in case an extension is statically linked into an application. */ -EXTERN const char * Tcl_InitStubs (Tcl_Interp *interp, const char *version, +const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version, int exact); -EXTERN const char * TclTomMathInitializeStubs (Tcl_Interp *interp, +const char * TclTomMathInitializeStubs(Tcl_Interp *interp, const char *version, int epoch, int revision); #ifndef USE_TCL_STUBS diff --git a/win/Makefile.in b/win/Makefile.in index fc95cfc..66d0110 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.167 2009/11/26 07:01:52 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.168 2009/11/30 23:10:38 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -410,11 +410,11 @@ libraries: doc: -$(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) - $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \ +$(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) + $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -$(TCLTEST): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) ${TEST_LIB_FILE} testMain.$(OBJEXT) $(CAT32) tclsh.$(RES) +$(TCLTEST): testMain.$(OBJEXT) ${TEST_LIB_FILE} @LIBRARIES@ $(TCL_STUB_LIB_FILE) $(CAT32) tclsh.$(RES) $(CC) $(CFLAGS) testMain.$(OBJEXT) ${TEST_LIB_FILE} $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) @@ -436,50 +436,54 @@ ${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ @$(RM) ${TCL_DLL_FILE} $(TCL_LIB_FILE) @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS) -${TCL_LIB_FILE}: ${TCL_OBJS} ${STUB_OBJS} +${TCL_LIB_FILE}: ${TCL_OBJS} @$(RM) ${TCL_LIB_FILE} - @MAKE_LIB@ ${TCL_OBJS} ${STUB_OBJS} + @MAKE_LIB@ ${TCL_OBJS} @POST_MAKE_LIB@ # assume GNU make -${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} - @-$(RM) ${DDE_DLL_FILE} ${DDE_LIB_FILE}.backup - @-$(COPY) ${DDE_LIB_FILE} ${DDE_LIB_FILE}.backup +# To enable concurrent parallel make of tcl.dll and tcl.lib, the tcl.dll +# targets have to depend on tcl.lib, this ensures that linking of tcl.dll +# does not execute concurrently with the renaming and recompiling of tcl.lib + +${DDE_DLL_FILE}: ${DDE_OBJS} ${DDE_LIB_FILE} ${TCL_STUB_LIB_FILE} + @-$(RM) ${DDE_DLL_FILE} ${DDE_LIB_FILE}.sav + @-$(COPY) ${DDE_LIB_FILE} ${DDE_LIB_FILE}.sav @MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) @-$(RM) ${DDE_LIB_FILE} - @-$(COPY) ${DDE_LIB_FILE}.backup ${DDE_LIB_FILE} - @-$(RM) ${DDE_LIB_FILE}.backup + @-$(COPY) ${DDE_LIB_FILE}.sav ${DDE_LIB_FILE} + @-$(RM) ${DDE_LIB_FILE}.sav -${DDE_LIB_FILE}: ${DDE_OBJS} ${STUB_OBJS} +${DDE_LIB_FILE}: ${DDE_OBJS} @$(RM) ${DDE_LIB_FILE} - @MAKE_LIB@ ${DDE_OBJS} ${STUB_OBJS} + @MAKE_LIB@ ${DDE_OBJS} @POST_MAKE_LIB@ -${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE} - @-$(RM) ${REG_DLL_FILE} ${REG_LIB_FILE}.backup - @-$(COPY) ${REG_LIB_FILE} ${REG_LIB_FILE}.backup +${REG_DLL_FILE}: ${REG_OBJS} ${REG_LIB_FILE} ${TCL_STUB_LIB_FILE} + @-$(RM) ${REG_DLL_FILE} ${REG_LIB_FILE}.sav + @-$(COPY) ${REG_LIB_FILE} ${REG_LIB_FILE}.sav @MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) @-$(RM) ${REG_LIB_FILE} - @-$(COPY) ${REG_LIB_FILE}.backup ${REG_LIB_FILE} - @-$(RM) ${REG_LIB_FILE}.backup + @-$(COPY) ${REG_LIB_FILE}.sav ${REG_LIB_FILE} + @-$(RM) ${REG_LIB_FILE}.sav -${REG_LIB_FILE}: ${REG_OBJS} ${STUB_OBJS} +${REG_LIB_FILE}: ${REG_OBJS} @$(RM) ${REG_LIB_FILE} - @MAKE_LIB@ ${REG_OBJS} ${STUB_OBJS} + @MAKE_LIB@ ${REG_OBJS} @POST_MAKE_LIB@ -${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE} - @-$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}.backup - @-$(COPY) ${TEST_LIB_FILE} ${TEST_LIB_FILE}.backup +${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TEST_LIB_FILE} ${TCL_STUB_LIB_FILE} + @-$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}.sav + @-$(COPY) ${TEST_LIB_FILE} ${TEST_LIB_FILE}.sav @MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) @-$(RM) ${TEST_LIB_FILE} - @-$(COPY) ${TEST_LIB_FILE}.backup ${TEST_LIB_FILE} - @-$(RM) ${TEST_LIB_FILE}.backup + @-$(COPY) ${TEST_LIB_FILE}.sav ${TEST_LIB_FILE} + @-$(RM) ${TEST_LIB_FILE}.sav -${TEST_LIB_FILE}: ${TCLTEST_OBJS} ${STUB_OBJS} +${TEST_LIB_FILE}: ${TCLTEST_OBJS} @$(RM) ${TEST_LIB_FILE} - @MAKE_LIB@ ${TCLTEST_OBJS} ${STUB_OBJS} + @MAKE_LIB@ ${TCLTEST_OBJS} @POST_MAKE_LIB@ # use pre-built zlib1.dll -- cgit v0.12 From 4cdefd0f0e6e24b0189eba7244134d7981900914 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 2 Dec 2009 20:45:16 +0000 Subject: tools/genStubs.tcl Add support for win32 CALLBACK functions and remove obsolete "emitStubs" and "genStubs" functions. win/Makefile.in Use tcltest86.dll for all tests, and add .PHONY rules to preemptively stop trouble that plagued Tk from hitting Tcl too. --- ChangeLog | 8 +++++ tools/genStubs.tcl | 95 ++++-------------------------------------------------- win/Makefile.in | 30 +++++++++-------- 3 files changed, 31 insertions(+), 102 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6fc1b6..534d4d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-12-02 Jan Nijtmans + + * tools/genStubs.tcl Add support for win32 CALLBACK functions + and remove obsolete "emitStubs" and "genStubs" functions. + * win/Makefile.in Use tcltest86.dll for all tests, and add + .PHONY rules to preemptively stop trouble that plagued Tk + from hitting Tcl too. + 2009-11-30 Jan Nijtmans * generic/tcl.h Don't use EXPORT for Tcl_InitStubs diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 7b89fe9..cfac1f6 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.32 2009/07/26 11:26:14 ferrieux Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.33 2009/12/02 20:45:16 nijtmans Exp $ package require Tcl 8.4 @@ -503,71 +503,6 @@ proc genStubs::makeMacro {name decl index} { return $text } -# genStubs::makeStub -- -# -# Emits a stub function definition. -# -# Arguments: -# name The interface name. -# decl The function declaration. -# index The slot index for this function. -# -# Results: -# Returns the formatted stub function definition. - -proc genStubs::makeStub {name decl index} { - lassign $decl rtype fname args - - set lfname [string tolower [string index $fname 0]] - append lfname [string range $fname 1 end] - - append text "/* Slot $index */\n" $rtype "\n" $fname - - set arg1 [lindex $args 0] - - if {![string compare $arg1 "TCL_VARARGS"]} { - lassign [lindex $args 1] type argName - append text " ($type$argName, ...)\n\{\n" - append text " " $type " var;\n va_list argList;\n" - if {[string compare $rtype "void"]} { - append text " " $rtype " resultValue;\n" - } - append text "\n var = (" $type ") (va_start(argList, " \ - $argName "), " $argName ");\n\n " - if {[string compare $rtype "void"]} { - append text "resultValue = " - } - append text "(" $name "StubsPtr->" $lfname "VA)(var, argList);\n" - append text " va_end(argList);\n" - if {[string compare $rtype "void"]} { - append text "return resultValue;\n" - } - append text "\}\n\n" - return $text - } - - if {![string compare $arg1 "void"]} { - set argList "()" - set argDecls "" - } else { - set argList "" - set sep "(" - foreach arg $args { - append argList $sep [lindex $arg 1] - append argDecls " " [lindex $arg 0] " " \ - [lindex $arg 1] [lindex $arg 2] ";\n" - set sep ", " - } - append argList ")" - } - append text $argList "\n" $argDecls "{\n " - if {[string compare $rtype "void"]} { - append text "return " - } - append text "(" $name "StubsPtr->" $lfname ")" $argList ";\n}\n\n" - return $text -} - # genStubs::makeSlot -- # # Generate the stub table entry for a function. @@ -591,8 +526,11 @@ proc genStubs::makeSlot {name decl index} { append text $rtype " *" $lfname "; /* $index */\n" return $text } - append text $rtype " (*" $lfname ") " - + if {[string range $rtype end-7 end] == "CALLBACK"} { + append text [string trim [string range $rtype 0 end-8]] " (CALLBACK *" $lfname ") " + } else { + append text $rtype " (*" $lfname ") " + } set arg1 [lindex $args 0] switch -exact $arg1 { void { @@ -1008,27 +946,6 @@ proc genStubs::emitHeader {name} { return } -# genStubs::emitStubs -- -# -# This function emits the body of the Stubs.c file for -# the specified interface. -# -# Arguments: -# name The name of the interface being emitted. -# -# Results: -# None. - -proc genStubs::emitStubs {name} { - variable outDir - - append text "\n/*\n * Exported stub functions:\n */\n\n" - forAllStubs $name makeStub 0 text - - rewriteFile [file join $outDir ${name}Stubs.c] $text - return -} - # genStubs::emitInit -- # # Generate the table initializers for an interface. diff --git a/win/Makefile.in b/win/Makefile.in index 66d0110..9df2d0d 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.168 2009/11/30 23:10:38 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.169 2009/12/02 20:45:17 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -414,7 +414,7 @@ $(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -$(TCLTEST): testMain.$(OBJEXT) ${TEST_LIB_FILE} @LIBRARIES@ $(TCL_STUB_LIB_FILE) $(CAT32) tclsh.$(RES) +$(TCLTEST): testMain.$(OBJEXT) ${TEST_DLL_FILE} @LIBRARIES@ $(TCL_STUB_LIB_FILE) $(CAT32) tclsh.$(RES) $(CC) $(CFLAGS) testMain.$(OBJEXT) ${TEST_LIB_FILE} $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) @@ -473,18 +473,9 @@ ${REG_LIB_FILE}: ${REG_OBJS} @MAKE_LIB@ ${REG_OBJS} @POST_MAKE_LIB@ -${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TEST_LIB_FILE} ${TCL_STUB_LIB_FILE} - @-$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}.sav - @-$(COPY) ${TEST_LIB_FILE} ${TEST_LIB_FILE}.sav +${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE} + @$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE} @MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) - @-$(RM) ${TEST_LIB_FILE} - @-$(COPY) ${TEST_LIB_FILE}.sav ${TEST_LIB_FILE} - @-$(RM) ${TEST_LIB_FILE}.sav - -${TEST_LIB_FILE}: ${TCLTEST_OBJS} - @$(RM) ${TEST_LIB_FILE} - @MAKE_LIB@ ${TCLTEST_OBJS} - @POST_MAKE_LIB@ # use pre-built zlib1.dll ${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} @@ -882,3 +873,16 @@ html-tcl: $(TCLSH) html-tk: $(TCLSH) $(MAKE) shell SCRIPT="$(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) --srcdir=$(ROOT_DIR)/.. $(BUILD_HTML_FLAGS) --tk" +# +# The list of all the targets that do not correspond to real files. This stops +# 'make' from getting confused when someone makes an error in a rule. +# + +.PHONY: all tcltest binaries libraries doc gendate gentommath_h install +.PHONY: install-binaries install-libraries install-tzdata install-msgs +.PHONY: install-doc install-private-headers test test-tcl runtest shell +.PHONY: gdb depend cleanhelp clean distclean packages install-packages +.PHONY: test-packages clean-packages distclean-packages genstubs html +.PHONY: html-tcl html-tk + +# DO NOT DELETE THIS LINE -- make depend depends on it. -- cgit v0.12 From 2aa99d284d6f4194676a3e2f5aac6ad2197a7714 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 3 Dec 2009 15:49:22 +0000 Subject: Fix [Bug 2906841] and a few other smaller issues. --- ChangeLog | 22 ++- library/safe.tcl | 54 +++--- tests/safe.test | 563 +++++++++++++++++++++++++++++-------------------------- 3 files changed, 341 insertions(+), 298 deletions(-) diff --git a/ChangeLog b/ChangeLog index 534d4d3..24089ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,23 @@ +2009-12-03 Donal K. Fellows + + * library/safe.tcl (::safe::AliasEncoding): Make the safe encoding + command behave more closely like the unsafe one (for safe ops). + (::safe::AliasGlob): [Bug 2906841]: Clamp down on evil use of [glob] + in safe interpreters. + * tests/safe.test: Rewrite to use tcltest2 better. + 2009-12-02 Jan Nijtmans - * tools/genStubs.tcl Add support for win32 CALLBACK functions - and remove obsolete "emitStubs" and "genStubs" functions. - * win/Makefile.in Use tcltest86.dll for all tests, and add - .PHONY rules to preemptively stop trouble that plagued Tk - from hitting Tcl too. + * tools/genStubs.tcl: Add support for win32 CALLBACK functions and + remove obsolete "emitStubs" and "genStubs" functions. + * win/Makefile.in: Use tcltest86.dll for all tests, and add + .PHONY rules to preemptively stop trouble that plagued Tk from hitting + Tcl too. 2009-11-30 Jan Nijtmans - * generic/tcl.h Don't use EXPORT for Tcl_InitStubs - * win/Makefile.in Better dependancies in case of static build. + * generic/tcl.h: Don't use EXPORT for Tcl_InitStubs + * win/Makefile.in: Better dependancies in case of static build. 2009-11-30 Donal K. Fellows diff --git a/library/safe.tcl b/library/safe.tcl index 662a727..8bc26f9 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.33 2009/11/19 11:59:54 dkf Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.34 2009/12/03 15:49:22 dkf Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -651,7 +651,6 @@ proc ::safe::CheckFileName {slave file} { } # AliasGlob is the target of the "glob" alias in safe interpreters. - proc ::safe::AliasGlob {slave args} { Log $slave "GLOB ! $args" NOTICE set cmd {} @@ -663,30 +662,22 @@ proc ::safe::AliasGlob {slave args} { while {$at < [llength $args]} { switch -glob -- [set opt [lindex $args $at]] { -nocomplain - - -join { + -join { lappend cmd $opt incr at } - -directory { - lappend cmd $opt - incr at - set virtualdir [lindex $args $at] - - # get the real path from the virtual one. + -directory { + set virtualdir [lindex $args [incr at]] + # Get the real path from the virtual one and check that the + # path is in the access path of that slave. try { set dir [TranslatePath $slave $virtualdir] - } on error msg { - Log $slave $msg - return -code error "permission denied" - } - # check that the path is in the access path of that slave - try { DirInAccessPath $slave $dir } on error msg { Log $slave $msg return -code error "permission denied" } - lappend cmd $dir + lappend cmd -directory $dir incr at } pkgIndex.tcl { @@ -701,6 +692,14 @@ proc ::safe::AliasGlob {slave args} { return -code error "Safe base rejecting glob option '$opt'" } default { + if {[regexp {(.*)[\\/]} $opt -> thedir]} { + try { + DirInAccessPath $slave [TranslatePath $slave $thedir] + } on error msg { + Log $slave $msg + return -code error "permission denied" + } + } lappend cmd $opt incr at } @@ -928,18 +927,14 @@ proc ::safe::AliasSubset {slave alias target args} { # AliasEncoding is the target of the "encoding" alias in safe interpreters. -proc ::safe::AliasEncoding {slave args} { - set argc [llength $args] - - set okpat "^(name.*|convert.*)\$" - set subcommand [lindex $args 0] - - if {[regexp $okpat $subcommand]} { - return [::interp invokehidden $slave encoding {*}$args] +proc ::safe::AliasEncoding {slave option args} { + # Careful; do not want empty option to get through to the [string equal] + if {[regexp {^(name.*|convert.*|)$} $option]} { + return [::interp invokehidden $slave encoding $option {*}$args] } - if {[string first $subcommand system] == 0} { - if {$argc == 1} { + if {[string equal -length [string length $option] $option "system"]} { + if {[llength $args] == 0} { # passed all the tests , lets source it: try { return [::interp invokehidden $slave encoding system] @@ -949,16 +944,17 @@ proc ::safe::AliasEncoding {slave args} { } } set msg "wrong # args: should be \"encoding system\"" + set code {TCL WRONGARGS} } else { - set msg "wrong # args: should be \"encoding option ?arg ...?\"" + set msg "bad option \"$option\": must be convertfrom, convertto, names, or system" + set code [list TCL LOOKUP INDEX option $option] } Log $slave $msg - return -code error $msg + return -code error -errorcode $code $msg } proc ::safe::Setup {} { - #### # # Setup the arguments parsing diff --git a/tests/safe.test b/tests/safe.test index 786cafb..c8e170f 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -1,21 +1,21 @@ # safe.test -- # -# This file contains a collection of tests for safe Tcl, packages loading, -# and using safe interpreters. Sourcing this file into tcl runs the tests -# and generates output for errors. No output means no errors were found. +# This file contains a collection of tests for safe Tcl, packages loading, and +# using safe interpreters. Sourcing this file into tcl runs the tests and +# generates output for errors. No output means no errors were found. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# See the file "license.terms" for information on usage and redistribution -# of this file, and for a DISCLAIMER OF ALL WARRANTIES. +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.27 2009/11/19 21:17:36 nijtmans Exp $ +# RCS: @(#) $Id: safe.test,v 1.28 2009/12/03 15:49:22 dkf Exp $ package require Tcl 8.5 if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest + package require tcltest 2 namespace import -force ::tcltest::* } @@ -26,20 +26,19 @@ foreach i [interp slaves] { set saveAutoPath $::auto_path set ::auto_path [info library] -# Force actual loading of the safe package -# because we use un exported (and thus un-autoindexed) APIs -# in this test result arguments: +# Force actual loading of the safe package because we use un exported (and +# thus un-autoindexed) APIs in this test result arguments: catch {safe::interpConfigure} proc equiv {x} {return $x} - -test safe-1.1 {safe::interpConfigure syntax} { - list [catch {safe::interpConfigure} msg] $msg; -} {1 {no value given for parameter "slave" (use -help for full usage) : - slave name () name of the slave}} -test safe-1.2 {safe::interpCreate syntax} { - list [catch {safe::interpCreate -help} msg] $msg; -} {1 {Usage information: + +test safe-1.1 {safe::interpConfigure syntax} -returnCodes error -body { + safe::interpConfigure +} -result {no value given for parameter "slave" (use -help for full usage) : + slave name () name of the slave} +test safe-1.2 {safe::interpCreate syntax} -returnCodes error -body { + safe::interpCreate -help +} -result {Usage information: Var/FlagName Type Value Help ------------ ---- ----- ---- ( -help gives this help ) @@ -49,96 +48,106 @@ test safe-1.2 {safe::interpCreate syntax} { -statics boolean (true) loading of statically linked pkgs -nestedLoadOk boolflag (false) allow nested loading -nested boolean (false) nested loading - -deleteHook script () delete hook}} -test safe-1.3 {safe::interpInit syntax} { - list [catch {safe::interpInit -noStatics} msg] $msg; -} {1 {bad value "-noStatics" for parameter - slave name () name of the slave}} - + -deleteHook script () delete hook} +test safe-1.3 {safe::interpInit syntax} -returnCodes error -body { + safe::interpInit -noStatics +} -result {bad value "-noStatics" for parameter + slave name () name of the slave} test safe-2.1 {creating interpreters, should have no aliases} emptyTest { # Disabled this test. It tests nothing sensible. [Bug 999612] # interp aliases } "" -test safe-2.2 {creating interpreters, should have no aliases} { +test safe-2.2 {creating interpreters, should have no aliases} -setup { catch {safe::interpDelete a} +} -body { interp create a - set l [a aliases] + a aliases +} -cleanup { safe::interpDelete a - set l -} "" -test safe-2.3 {creating safe interpreters, should have no unexpected aliases} { +} -result "" +test safe-2.3 {creating safe interpreters, should have no unexpected aliases} -setup { catch {safe::interpDelete a} +} -body { interp create a -safe - set l [a aliases] + a aliases +} -cleanup { interp delete a - set l -} {clock} +} -result {clock} -test safe-3.1 {calling safe::interpInit is safe} { +test safe-3.1 {calling safe::interpInit is safe} -setup { catch {safe::interpDelete a} - interp create a -safe + interp create a -safe +} -body { safe::interpInit a - catch {interp eval a exec ls} msg + interp eval a exec ls +} -returnCodes error -cleanup { safe::interpDelete a - set msg -} {invalid command name "exec"} -test safe-3.2 {calling safe::interpCreate on trusted interp} { +} -result {invalid command name "exec"} +test safe-3.2 {calling safe::interpCreate on trusted interp} -setup { catch {safe::interpDelete a} +} -body { safe::interpCreate a - set l [lsort [a aliases]] + lsort [a aliases] +} -cleanup { safe::interpDelete a - set l -} {clock encoding exit file glob load source} -test safe-3.3 {calling safe::interpCreate on trusted interp} { +} -result {clock encoding exit file glob load source} +test safe-3.3 {calling safe::interpCreate on trusted interp} -setup { catch {safe::interpDelete a} +} -body { safe::interpCreate a - set x [interp eval a {source [file join $tcl_library init.tcl]}] + interp eval a {source [file join $tcl_library init.tcl]} +} -cleanup { safe::interpDelete a - set x -} "" -test safe-3.4 {calling safe::interpCreate on trusted interp} { +} -result "" +test safe-3.4 {calling safe::interpCreate on trusted interp} -setup { catch {safe::interpDelete a} +} -body { safe::interpCreate a - catch {set x \ - [interp eval a {source [file join $tcl_library init.tcl]}]} msg + interp eval a {source [file join $tcl_library init.tcl]} +} -cleanup { safe::interpDelete a - list $x $msg -} {{} {}} +} -result {} -test safe-4.1 {safe::interpDelete} { +test safe-4.1 {safe::interpDelete} -setup { catch {safe::interpDelete a} +} -body { interp create a safe::interpDelete a -} "" -test safe-4.2 {safe::interpDelete, indirectly} { +} -result "" +test safe-4.2 {safe::interpDelete, indirectly} -setup { catch {safe::interpDelete a} +} -body { interp create a a alias exit safe::interpDelete a a eval exit -} "" -test safe-4.5 {safe::interpDelete} { +} -result "" +test safe-4.5 {safe::interpDelete} -setup { catch {safe::interpDelete a} +} -body { + safe::interpCreate a safe::interpCreate a - catch {safe::interpCreate a} msg - set msg -} {interpreter named "a" already exists, cannot create} -test safe-4.6 {safe::interpDelete, indirectly} { +} -returnCodes error -cleanup { + safe::interpDelete a +} -result {interpreter named "a" already exists, cannot create} +test safe-4.6 {safe::interpDelete, indirectly} -setup { catch {safe::interpDelete a} +} -body { safe::interpCreate a a eval exit -} "" +} -result "" # The following test checks whether the definition of tcl_endOfWord can be # obtained from auto_loading. -test safe-5.1 {test auto-loading in safe interpreters} { +test safe-5.1 {test auto-loading in safe interpreters} -setup { catch {safe::interpDelete a} safe::interpCreate a - set r [catch {interp eval a {tcl_endOfWord "" 0}} msg] +} -body { + interp eval a {tcl_endOfWord "" 0} +} -cleanup { safe::interpDelete a - list $r $msg -} {0 -1} +} -result -1 # test safe interps 'information leak' proc SafeEval {script} { @@ -198,162 +207,176 @@ test safe-7.2 {tests specific path and interpFind/AddToAccessPath} -body { [safe::interpDelete $i] } -match glob -result "{\$p(:0:)} {\$p(:[expr 1+[llength [tcl::tm::list]]]:)} 1 {can't find package http 1} {-accessPath {[list $tcl_library * /dummy/unixlike/test/path]} -statics 0 -nested 1 -deleteHook {}} {}" - # test source control on file name -test safe-8.1 {safe source control on file} { - set i "a"; +test safe-8.1 {safe source control on file} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - list [catch {$i eval {source}} msg] \ - $msg \ - [safe::interpDelete $i] ; -} {1 {wrong # args: should be "source ?-encoding E? fileName"} {}} -test safe-8.2 {safe source control on file} { - set i "a"; +} -body { + safe::interpCreate $i + $i eval {source} +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {wrong # args: should be "source ?-encoding E? fileName"} +test safe-8.2 {safe source control on file} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - list [catch {$i eval {source}} msg] \ - $msg \ - [safe::interpDelete $i] ; -} {1 {wrong # args: should be "source ?-encoding E? fileName"} {}} -test safe-8.3 {safe source control on file} { - set i "a"; +} -body { + safe::interpCreate $i + $i eval {source a b c d e} +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {wrong # args: should be "source ?-encoding E? fileName"} +test safe-8.3 {safe source control on file} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - set log {}; - proc safe-test-log {str} {global log; lappend log $str} - set prevlog [safe::setLogCmd]; - safe::setLogCmd safe-test-log; - list [catch {$i eval {source .}} msg] \ - $msg \ - $log \ - [safe::setLogCmd $prevlog; unset log] \ - [safe::interpDelete $i] ; -} {1 {permission denied} {{ERROR for slave a : ".": is a directory}} {} {}} -test safe-8.4 {safe source control on file} { - set i "a"; + set log {} + proc safe-test-log {str} {lappend ::log $str} + set prevlog [safe::setLogCmd] +} -body { + safe::interpCreate $i + safe::setLogCmd safe-test-log + list [catch {$i eval {source .}} msg] $msg $log +} -cleanup { + safe::setLogCmd $prevlog + unset log + safe::interpDelete $i +} -result {1 {permission denied} {{ERROR for slave a : ".": is a directory}}} +test safe-8.4 {safe source control on file} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - set log {}; + set log {} proc safe-test-log {str} {global log; lappend log $str} - set prevlog [safe::setLogCmd]; + set prevlog [safe::setLogCmd] +} -body { + safe::interpCreate $i; safe::setLogCmd safe-test-log; - list [catch {$i eval {source /abc/def}} msg] \ - $msg \ - $log \ - [safe::setLogCmd $prevlog; unset log] \ - [safe::interpDelete $i] ; -} {1 {permission denied} {{ERROR for slave a : "/abc/def": not in access_path}} {} {}} -test safe-8.5 {safe source control on file} { - # This tested filename == *.tcl or tclIndex, but that restriction - # was removed in 8.4a4 - hobbs - set i "a"; + list [catch {$i eval {source /abc/def}} msg] $msg $log +} -cleanup { + safe::setLogCmd $prevlog + unset log + safe::interpDelete $i +} -result {1 {permission denied} {{ERROR for slave a : "/abc/def": not in access_path}}} +test safe-8.5 {safe source control on file} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - set log {}; + set log {} proc safe-test-log {str} {global log; lappend log $str} - set prevlog [safe::setLogCmd]; - safe::setLogCmd safe-test-log; - list [catch {$i eval {source [file join [info lib] blah]}} msg] \ - $msg \ - $log \ - [safe::setLogCmd $prevlog; unset log] \ - [safe::interpDelete $i] ; -} [list 1 {no such file or directory} [list "ERROR for slave a : [file join [info library] blah]:no such file or directory"] {} {}] -test safe-8.6 {safe source control on file} { - set i "a"; + set prevlog [safe::setLogCmd] +} -body { + # This tested filename == *.tcl or tclIndex, but that restriction was + # removed in 8.4a4 - hobbs + safe::interpCreate $i + safe::setLogCmd safe-test-log + list [catch { + $i eval {source [file join [info lib] blah]} + } msg] $msg $log +} -cleanup { + safe::setLogCmd $prevlog + unset log + safe::interpDelete $i +} -result [list 1 {no such file or directory} [list "ERROR for slave a : [file join [info library] blah]:no such file or directory"]] +test safe-8.6 {safe source control on file} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - set log {}; + set log {} proc safe-test-log {str} {global log; lappend log $str} - set prevlog [safe::setLogCmd]; - safe::setLogCmd safe-test-log; - list [catch {$i eval {source [file join [info lib] blah.tcl]}} msg] \ - $msg \ - $log \ - [safe::setLogCmd $prevlog; unset log] \ - [safe::interpDelete $i] ; -} [list 1 {no such file or directory} [list "ERROR for slave a : [file join [info library] blah.tcl]:no such file or directory"] {} {}] -test safe-8.7 {safe source control on file} { - # This tested length of filename, but that restriction - # was removed in 8.4a4 - hobbs - set i "a"; + set prevlog [safe::setLogCmd] +} -body { + safe::interpCreate $i + safe::setLogCmd safe-test-log + list [catch { + $i eval {source [file join [info lib] blah.tcl]} + } msg] $msg $log +} -cleanup { + safe::setLogCmd $prevlog + unset log + safe::interpDelete $i +} -result [list 1 {no such file or directory} [list "ERROR for slave a : [file join [info library] blah.tcl]:no such file or directory"]] +test safe-8.7 {safe source control on file} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - set log {}; + set log {} proc safe-test-log {str} {global log; lappend log $str} - set prevlog [safe::setLogCmd]; - safe::setLogCmd safe-test-log; - list [catch {$i eval {source [file join [info lib] xxxxxxxxxxx.tcl]}}\ - msg] \ - $msg \ - $log \ - [safe::setLogCmd $prevlog; unset log] \ - [safe::interpDelete $i] ; -} [list 1 {no such file or directory} [list "ERROR for slave a : [file join [info library] xxxxxxxxxxx.tcl]:no such file or directory"] {} {}] -test safe-8.8 {safe source forbids -rsrc} { - set i "a"; + set prevlog [safe::setLogCmd] +} -body { + safe::interpCreate $i + # This tested length of filename, but that restriction was removed in + # 8.4a4 - hobbs + safe::setLogCmd safe-test-log + list [catch { + $i eval {source [file join [info lib] xxxxxxxxxxx.tcl]} + } msg] $msg $log +} -cleanup { + safe::setLogCmd $prevlog + unset log + safe::interpDelete $i +} -result [list 1 {no such file or directory} [list "ERROR for slave a : [file join [info library] xxxxxxxxxxx.tcl]:no such file or directory"]] +test safe-8.8 {safe source forbids -rsrc} -setup { + set i "a" catch {safe::interpDelete $i} - safe::interpCreate $i; - list [catch {$i eval {source -rsrc Init}} msg] \ - $msg \ - [safe::interpDelete $i] ; -} {1 {wrong # args: should be "source ?-encoding E? fileName"} {}} + safe::interpCreate $i +} -body { + $i eval {source -rsrc Init} +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {wrong # args: should be "source ?-encoding E? fileName"} -test safe-9.1 {safe interps' deleteHook} { - set i "a"; +test safe-9.1 {safe interps' deleteHook} -setup { + set i "a" catch {safe::interpDelete $i} set res {} +} -body { proc testDelHook {args} { - global res; + global res # the interp still exists at that point interp eval a {set delete 1} # mark that we've been here (successfully) - set res $args; + set res $args } - safe::interpCreate $i -deleteHook "testDelHook arg1 arg2"; + safe::interpCreate $i -deleteHook "testDelHook arg1 arg2" list [interp eval $i exit] $res -} {{} {arg1 arg2 a}} -test safe-9.2 {safe interps' error in deleteHook} { - set i "a"; +} -result {{} {arg1 arg2 a}} +test safe-9.2 {safe interps' error in deleteHook} -setup { + set i "a" catch {safe::interpDelete $i} set res {} + set log {} + proc safe-test-log {str} {lappend ::log $str} + set prevlog [safe::setLogCmd] +} -body { proc testDelHook {args} { - global res; + global res # the interp still exists at that point interp eval a {set delete 1} # mark that we've been here (successfully) - set res $args; + set res $args # create an exception - error "being catched"; + error "being catched" } - set log {}; - proc safe-test-log {str} {global log; lappend log $str} - safe::interpCreate $i -deleteHook "testDelHook arg1 arg2"; - set prevlog [safe::setLogCmd]; - safe::setLogCmd safe-test-log; - list [safe::interpDelete $i] $res \ - $log \ - [safe::setLogCmd $prevlog; unset log]; -} {{} {arg1 arg2 a} {{NOTICE for slave a : About to delete} {ERROR for slave a : Delete hook error (being catched)} {NOTICE for slave a : Deleted}} {}} -test safe-9.3 {dual specification of statics} { - list [catch {safe::interpCreate -stat true -nostat} msg] $msg -} {1 {conflicting values given for -statics and -noStatics}} + safe::interpCreate $i -deleteHook "testDelHook arg1 arg2" + safe::setLogCmd safe-test-log + list [safe::interpDelete $i] $res $log +} -cleanup { + safe::setLogCmd $prevlog + unset log +} -result {{} {arg1 arg2 a} {{NOTICE for slave a : About to delete} {ERROR for slave a : Delete hook error (being catched)} {NOTICE for slave a : Deleted}}} +test safe-9.3 {dual specification of statics} -returnCodes error -body { + safe::interpCreate -stat true -nostat +} -result {conflicting values given for -statics and -noStatics} test safe-9.4 {dual specification of statics} { # no error shall occur safe::interpDelete [safe::interpCreate -stat false -nostat] } {} -test safe-9.5 {dual specification of nested} { - list [catch {safe::interpCreate -nested 0 -nestedload} msg] $msg -} {1 {conflicting values given for -nested and -nestedLoadOk}} - +test safe-9.5 {dual specification of nested} -returnCodes error -body { + safe::interpCreate -nested 0 -nestedload +} -result {conflicting values given for -nested and -nestedLoadOk} test safe-9.6 {interpConfigure widget like behaviour} -body { - # this test shall work, don't try to "fix it" unless - # you *really* know what you are doing (ie you are me :p) -- dl + # this test shall work, don't try to "fix it" unless you *really* know what + # you are doing (ie you are me :p) -- dl list [set i [safe::interpCreate \ - -noStatics \ - -nestedLoadOk \ - -deleteHook {foo bar}]; + -noStatics \ + -nestedLoadOk \ + -deleteHook {foo bar}]; safe::interpConfigure $i -accessPath /foo/bar ; safe::interpConfigure $i]\ [safe::interpConfigure $i -aCCess]\ @@ -366,105 +389,121 @@ test safe-9.6 {interpConfigure widget like behaviour} -body { safe::interpConfigure $i] } -match glob -result {{-accessPath * -statics 0 -nested 1 -deleteHook {foo bar}} {-accessPath *} {-nested 1} {-statics 0} {-deleteHook {foo bar}} {-accessPath * -statics 1 -nested 1 -deleteHook {foo bar}} {-accessPath * -statics 0 -nested 0 -deleteHook toto}} -# testing that nested and statics do what is advertised -# (we use a static package : Tcltest) - -if {[catch {package require Tcltest} msg]} { - testConstraint TcltestPackage 0 -} else { +# testing that nested and statics do what is advertised (we use a static +# package : Tcltest) +try { + package require Tcltest testConstraint TcltestPackage 1 # we use the Tcltest package , which has no Safe_Init +} on error {} { + testConstraint TcltestPackage 0 } teststaticpkg Safepkg1 0 0 -test safe-10.1 {testing statics loading} TcltestPackage { +test safe-10.1 {testing statics loading} -constraints TcltestPackage -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i {load {} Safepkg1}} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}} -test safe-10.2 {testing statics loading / -nostatics} TcltestPackage { +} -body { + interp eval $i {load {} Safepkg1} +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} +test safe-10.2 {testing statics loading / -nostatics} -constraints TcltestPackage -body { set i [safe::interpCreate -nostatics] - list \ - [catch {interp eval $i {load {} Safepkg1}} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {permission denied (static package)} {}} -test safe-10.3 {testing nested statics loading / no nested by default} TcltestPackage { + interp eval $i {load {} Safepkg1} +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {permission denied (static package)} +test safe-10.3 {testing nested statics loading / no nested by default} -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {permission denied (nested load)} {}} -test safe-10.4 {testing nested statics loading / -nestedloadok} TcltestPackage { +} -constraints TcltestPackage -body { + interp eval $i {interp create x; load {} Safepkg1 x} +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {permission denied (nested load)} +test safe-10.4 {testing nested statics loading / -nestedloadok} -constraints TcltestPackage -body { set i [safe::interpCreate -nestedloadok] - list \ - [catch {interp eval $i {interp create x; load {} Safepkg1 x}} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} {}} + interp eval $i {interp create x; load {} Safepkg1 x} +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {can't use package in a safe interpreter: no Safepkg1_SafeInit procedure} -test safe-11.1 {testing safe encoding} { +test safe-11.1 {testing safe encoding} -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i encoding} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {wrong # args: should be "encoding option ?arg ...?"} {}} -test safe-11.2 {testing safe encoding} { +} -body { + interp eval $i encoding +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {wrong # args: should be "encoding option ?arg ...?"} +test safe-11.1a {testing safe encoding} -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i encoding system cp775} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {wrong # args: should be "encoding system"} {}} -test safe-11.3 {testing safe encoding} { +} -body { + interp eval $i encoding foobar +} -returnCodes error -cleanup { + safe::interpDelete $i +} -match glob -result {bad option "foobar": must be *} +test safe-11.2 {testing safe encoding} -setup { set i [safe::interpCreate] - set result [catch { - string match [encoding system] [interp eval $i encoding system] - } msg] - list $result $msg [safe::interpDelete $i] -} {0 1 {}} -test safe-11.4 {testing safe encoding} { +} -body { + interp eval $i encoding system cp775 +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {wrong # args: should be "encoding system"} +test safe-11.3 {testing safe encoding} -setup { set i [safe::interpCreate] - set result [catch { - string match [encoding names] [interp eval $i encoding names] - } msg] - list $result $msg [safe::interpDelete $i] -} {0 1 {}} -test safe-11.5 {testing safe encoding} { +} -body { + interp eval $i encoding system +} -cleanup { + safe::interpDelete $i +} -result [encoding system] +test safe-11.4 {testing safe encoding} -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i encoding convertfrom cp1258 foobar} msg] \ - $msg \ - [safe::interpDelete $i]; -} {0 foobar {}} -test safe-11.6 {testing safe encoding} { +} -body { + interp eval $i encoding names +} -cleanup { + safe::interpDelete $i +} -result [encoding names] +test safe-11.5 {testing safe encoding} -setup { + set i [safe::interpCreate] +} -body { + interp eval $i encoding convertfrom cp1258 foobar +} -cleanup { + safe::interpDelete $i +} -result foobar +test safe-11.6 {testing safe encoding} -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i encoding convertto cp1258 foobar} msg] \ - $msg \ - [safe::interpDelete $i]; -} {0 foobar {}} -test safe-11.7 {testing safe encoding} { +} -body { + interp eval $i encoding convertto cp1258 foobar +} -cleanup { + safe::interpDelete $i +} -result foobar +test safe-11.7 {testing safe encoding} -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i encoding convertfrom} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {wrong # args: should be "encoding convertfrom ?encoding? data"} {}} -test safe-11.8 {testing safe encoding} { +} -body { + interp eval $i encoding convertfrom +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {wrong # args: should be "encoding convertfrom ?encoding? data"} +test safe-11.8 {testing safe encoding} -setup { set i [safe::interpCreate] - list \ - [catch {interp eval $i encoding convertto} msg] \ - $msg \ - [safe::interpDelete $i]; -} {1 {wrong # args: should be "encoding convertto ?encoding? data"} {}} - +} -body { + interp eval $i encoding convertto +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result {wrong # args: should be "encoding convertto ?encoding? data"} +test safe-12.1 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob ../* +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result "permission denied" + set ::auto_path $saveAutoPath # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 90bd6886192a7f8aba161a9c45eb000b9e59e69c Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 5 Dec 2009 21:30:05 +0000 Subject: * generic/tclBasic.c: Fixed things so that you can tailcall * generic/tclNamesp.c: properly out of a coroutine. * tests/tailcall.test: * generic/tclInterp.c: Fixed tailcalls for same-interp aliases (no test) --- ChangeLog | 9 +++++++++ generic/tclBasic.c | 3 ++- generic/tclInterp.c | 4 ++-- generic/tclNamesp.c | 25 ++++++++++++++++++++++++- tests/tailcall.test | 19 ++++++++++++++++++- 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24089ba..c8acf07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-12-05 Miguel Sofer + + * generic/tclBasic.c: Fixed things so that you can tailcall + * generic/tclNamesp.c: properly out of a coroutine. + * tests/tailcall.test: + + * generic/tclInterp.c: Fixed tailcalls for same-interp aliases (no + test) + 2009-12-03 Donal K. Fellows * library/safe.tcl (::safe::AliasEncoding): Make the safe encoding diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b0cc7f6..ce330b1 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.410 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.411 2009/12/05 21:30:05 msofer Exp $ */ #include "tclInt.h" @@ -8783,6 +8783,7 @@ TclNRCoroutineObjCmd( corPtr->auxNumLevels = iPtr->numLevels; TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); + iPtr->evalFlags |= TCL_EVAL_REDIRECT; return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); } diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 3c841d9..edf31ff 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.106 2009/10/06 16:55:59 dgp Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.107 2009/12/05 21:30:05 msofer Exp $ */ #include "tclInt.h" @@ -1805,7 +1805,7 @@ AliasNRCmd( */ if (isRootEnsemble) { - TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); + TclNRDeferCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); } iPtr->evalFlags |= TCL_EVAL_REDIRECT; return Tcl_NREvalObj(interp, listPtr, flags); diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 5d08bcb..99f3f1a 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.195 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.196 2009/12/05 21:30:05 msofer Exp $ */ #include "tclInt.h" @@ -517,13 +517,27 @@ Tcl_PopCallFrame( */ TEOV_callback *tailcallPtr, *runPtr; + ExecEnv *eePtr = NULL; + + restart: for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { break; } } if (!runPtr) { + /* + * If we are tailcalling out of a coroutine, the splicing spot is + * in the caller's execEnv: go find it! + */ + + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + if (corPtr) { + eePtr = iPtr->execEnvPtr; + iPtr->execEnvPtr = corPtr->callerEEPtr; + goto restart; + } Tcl_Panic("Tailcall cannot find the right splicing spot: should not happen!"); } @@ -531,6 +545,15 @@ Tcl_PopCallFrame( tailcallPtr->nextPtr = runPtr->nextPtr; runPtr->nextPtr = tailcallPtr; + + if (eePtr) { + /* + * Restore the right execEnv if it was swapped for tailcalling out + * of a coroutine. + */ + + iPtr->execEnvPtr = eePtr; + } } } diff --git a/tests/tailcall.test b/tests/tailcall.test index 335492a..5918bfe 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.9 2009/06/25 19:24:16 dgp Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.10 2009/12/05 21:30:06 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -560,6 +560,23 @@ test tailcall-12.3b {[Bug 2695587]} -setup { rename a {} } -result {1 {Tailcall called from within a catch environment}} +test tailcall-13.1 {tailcall and coroutine} -setup { + set lambda {i { + if {$i == 0} { + depthDiff + } + if {[incr i] > 10} { + return [depthDiff] + } + tailcall coroutine foo ::apply $::lambda $i + }} +} -body { + coroutine moo ::apply $::lambda 0 +} -cleanup { + unset lambda +} -result {0 0 0 0 0 0} + + if {[testConstraint testnrelevels]} { namespace forget testnre::* -- cgit v0.12 From 7d1b131bf956648e967fd73526440d0741f11533 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 5 Dec 2009 22:05:30 +0000 Subject: * tests/tailcall.test: remove some old unused crud; improved the stack depth tests. --- tests/tailcall.test | 55 +++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/tests/tailcall.test b/tests/tailcall.test index 5918bfe..ff9b97c 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.10 2009/12/05 21:30:06 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.11 2009/12/05 22:05:30 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -25,7 +25,6 @@ testConstraint testnrelevels [llength [info commands testnrelevels]] if {[testConstraint testnrelevels]} { namespace eval testnre { - namespace path ::tcl::mathop # # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, # cmdFrame level, callFrame level, tosPtr and callback depth @@ -41,23 +40,6 @@ if {[testConstraint testnrelevels]} { set last $depth return $res } - proc setabs {} { - variable abs [- [lindex [testnrelevels] 0]] - } - - variable body0 { - set x [depthDiff] - if {[incr i] > 10} { - namespace upvar [namespace qualifiers \ - [namespace origin depthDiff]] abs abs - incr abs [lindex [testnrelevels] 0] - return [list [lrange $x 0 3] $abs] - } - } - proc makebody txt { - variable body0 - return "$body0; $txt" - } namespace export * } namespace import testnre::* @@ -65,10 +47,17 @@ if {[testConstraint testnrelevels]} { test tailcall-0.1 {tailcall is constant space} -constraints testnrelevels -setup { proc a i { + # + # NOTE: there may be a diff in callback depth with the first call + # ($i==0) due to the fact that the first is from an eval. Successive + # calls should add nothing to any stack depths. + # + if {$i == 1} { + depthDiff + } if {[incr i] > 10} { return [depthDiff] } - depthDiff tailcall a $i } } -body { @@ -79,10 +68,12 @@ test tailcall-0.1 {tailcall is constant space} -constraints testnrelevels -setup test tailcall-0.2 {tailcall is constant space} -constraints testnrelevels -setup { set a { i { + if {$i == 1} { + depthDiff + } if {[incr i] > 10} { return [depthDiff] } - depthDiff upvar 1 a a tailcall apply $a $i }} @@ -94,10 +85,12 @@ test tailcall-0.2 {tailcall is constant space} -constraints testnrelevels -setup test tailcall-0.3 {tailcall is constant space} -constraints testnrelevels -setup { proc a i { + if {$i == 1} { + depthDiff + } if {[incr i] > 10} { return [depthDiff] } - depthDiff tailcall b $i } interp alias {} b {} a @@ -113,10 +106,12 @@ test tailcall-0.4 {tailcall is constant space} -constraints testnrelevels -setup namespace export * } proc ::ns::a i { + if {$i == 1} { + depthDiff + } if {[incr i] > 10} { return [depthDiff] } - depthDiff set b [uplevel 1 [list namespace which b]] tailcall $b $i } @@ -131,10 +126,12 @@ test tailcall-0.4 {tailcall is constant space} -constraints testnrelevels -setup test tailcall-0.5 {tailcall is constant space} -constraints testnrelevels -setup { proc b i { + if {$i == 1} { + depthDiff + } if {[incr i] > 10} { return [depthDiff] } - depthDiff tailcall a b $i } namespace ensemble create -command a -map {b b} @@ -150,10 +147,12 @@ test tailcall-0.6 {tailcall is constant space} -constraints {testnrelevels known # This test fails because ns-unknown is not NR-enabled # proc c i { + if {$i == 1} { + depthDiff + } if {[incr i] > 10} { return [depthDiff] } - depthDiff tailcall a b $i } proc d {ens sub args} { @@ -172,10 +171,12 @@ test tailcall-0.7 {tailcall is constant space} -constraints testnrelevels -setup catch {rename foo {}} oo::class create foo { method b i { + if {$i == 1} { + depthDiff + } if {[incr i] > 10} { return [depthDiff] } - depthDiff tailcall [self] b $i } } @@ -562,7 +563,7 @@ test tailcall-12.3b {[Bug 2695587]} -setup { test tailcall-13.1 {tailcall and coroutine} -setup { set lambda {i { - if {$i == 0} { + if {$i == 1} { depthDiff } if {[incr i] > 10} { -- cgit v0.12 From 3ae6f1e3cac2201928b801e657042f9dfc0cb481 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 6 Dec 2009 12:19:54 +0000 Subject: missing changelog entry --- ChangeLog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c8acf07..3bb7aba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-12-05 Miguel Sofer - + + * tests/tailcall.test: remove some old unused crud; improved the + stack depth tests. + * generic/tclBasic.c: Fixed things so that you can tailcall * generic/tclNamesp.c: properly out of a coroutine. * tests/tailcall.test: -- cgit v0.12 From 54bc7a4be035ab032c4311c97a7e2240fb08b0cd Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 6 Dec 2009 18:12:25 +0000 Subject: * generic/tclBasic.c: Small changes for clarity in tailcall * generic/tclExecute.c: and coroutine code. --- ChangeLog | 3 +++ generic/tclBasic.c | 42 ++++++++++++++++++++++++++++++++---------- generic/tclExecute.c | 17 ++++++++++------- 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3bb7aba..37be2a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-12-05 Miguel Sofer + * generic/tclBasic.c: Small changes for clarity in tailcall + * generic/tclExecute.c: and coroutine code. + * tests/tailcall.test: remove some old unused crud; improved the stack depth tests. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ce330b1..0376a0a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.411 2009/12/05 21:30:05 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.412 2009/12/06 18:12:26 msofer Exp $ */ #include "tclInt.h" @@ -8188,7 +8188,6 @@ TclNRTailcallObjCmd( Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; - TEOV_callback *tailcallPtr; Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; Tcl_Namespace *ns1Ptr; @@ -8236,10 +8235,10 @@ TclNRTailcallObjCmd( } TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); - tailcallPtr = TOP_CB(interp); - TOP_CB(interp) = tailcallPtr->nextPtr; + iPtr->varFramePtr->tailcallPtr = TOP_CB(interp); + TOP_CB(interp) = TOP_CB(interp)->nextPtr; - TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_TAILCALL_TYPE), tailcallPtr, NULL, NULL); + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_TAILCALL_TYPE), NULL, NULL, NULL); return TCL_OK; } @@ -8354,8 +8353,27 @@ static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; iPtr->cmdFramePtr = (context).cmdFramePtr; \ iPtr->lineLABCPtr = (context).lineLABCPtr -#define iPtr ((Interp *) interp) +#define iPtr ((Interp *) interp) + +static int +YieldCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + CoroutineData *corPtr = data[0]; + Tcl_Obj *cmdPtr = data[1]; + + corPtr->stackLevel = NULL; /* mark suspended */ + iPtr->execEnvPtr = corPtr->callerEEPtr; + + if (cmdPtr) { + /* yieldTo: invoke the command, use tailcall tech */ + } + return result; +} + int TclNRYieldObjCmd( ClientData clientData, @@ -8384,6 +8402,7 @@ TclNRYieldObjCmd( iPtr->numLevels = corPtr->auxNumLevels; corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; + TclNRAddCallback(interp, YieldCallback, corPtr, NULL, NULL, NULL); TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8634,7 +8653,8 @@ TclNRCoroutineObjCmd( const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; - + int result; + if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); return TCL_ERROR; @@ -8781,11 +8801,13 @@ TclNRCoroutineObjCmd( iPtr->varFramePtr = iPtr->rootFramePtr; iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; corPtr->auxNumLevels = iPtr->numLevels; - + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); + iPtr->evalFlags |= TCL_EVAL_REDIRECT; - return TclNRRunCallbacks(interp, - TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); + result = TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); + + return TclNRRunCallbacks(interp, result, rootPtr, 0); } /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 404696c..6ad9043 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.448 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.449 2009/12/06 18:12:26 msofer Exp $ */ #include "tclInt.h" @@ -1945,6 +1945,7 @@ TclExecuteByteCode( int nested = 0; if (!codePtr) { + resumeCoroutine: /* * Reawakening a suspended coroutine: the [yield] command * is returning. @@ -1989,6 +1990,9 @@ TclExecuteByteCode( */ codePtr = param; + if (!codePtr) { + goto resumeCoroutine; + } break; case TCL_NR_TAILCALL_TYPE: { /* @@ -2001,14 +2005,16 @@ TclExecuteByteCode( } #endif if (catchTop != initCatchTop) { - TclClearTailcall(interp, param); + TEOV_callback *tailcallPtr = iPtr->varFramePtr->tailcallPtr; + + TclClearTailcall(interp, tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; result = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); pc--; goto checkForCatch; } - iPtr->varFramePtr->tailcallPtr = param; goto abnormalReturn; } case TCL_NR_YIELD_TYPE: { /*[yield] */ @@ -2036,15 +2042,12 @@ TclExecuteByteCode( } /* - * Save our state, restore the caller's execEnv and return + * Save our state and return */ NR_DATA_BURY(); esPtr->tosPtr = tosPtr; - corPtr->stackLevel = NULL; /* mark suspended */ iPtr->execEnvPtr->bottomPtr = bottomPtr; - - iPtr->execEnvPtr = corPtr->callerEEPtr; return TCL_OK; } default: -- cgit v0.12 From 435545b3b3cd8208239d3f989af2badd1c1ea6a0 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 6 Dec 2009 18:29:32 +0000 Subject: clear old junk in tests/coroutine.test: --- ChangeLog | 1 + tests/coroutine.test | 42 +----------------------------------------- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37be2a2..f33db7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclBasic.c: Small changes for clarity in tailcall * generic/tclExecute.c: and coroutine code. + * tests/coroutine.test: * tests/tailcall.test: remove some old unused crud; improved the stack depth tests. diff --git a/tests/coroutine.test b/tests/coroutine.test index 776dda5..381cb63 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.6 2009/09/11 20:13:27 dgp Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.7 2009/12/06 18:29:32 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -18,46 +18,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint testnrelevels [llength [info commands testnrelevels]] -if {[testConstraint testnrelevels]} { - namespace eval testnre { - namespace path ::tcl::mathop - # - # [testnrelevels] returns a 6-list with: C-stack depth, iPtr->numlevels, - # cmdFrame level, callFrame level, tosPtr and callback depth - # - variable last [testnrelevels] - proc depthDiff {} { - variable last - set depth [testnrelevels] - set res {} - foreach t $depth l $last { - lappend res [expr {$t-$l}] - } - set last $depth - return $res - } - proc setabs {} { - variable abs [- [lindex [testnrelevels] 0] - } - - variable body0 { - set x [depthDiff] - if {[incr i] > 10} { - namespace upvar [namespace qualifiers \ - [namespace origin depthDiff]] abs abs - incr abs [lindex [testnrelevels] 0] - return [list [lrange $x 0 3] $abs] - } - } - proc makebody txt { - variable body0 - return "$body0; $txt" - } - namespace export * - } - namespace import testnre::* -} - set lambda [list {{start 0} {stop 10}} { # init set i $start -- cgit v0.12 From 39cc2a0e16b0e756662ae39eb7e7381535dc5b54 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 6 Dec 2009 19:37:50 +0000 Subject: oops - test error due to deletion of now not-created namespace --- tests/coroutine.test | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/coroutine.test b/tests/coroutine.test index 381cb63..d248269 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.7 2009/12/06 18:29:32 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.8 2009/12/06 19:37:50 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -465,11 +465,6 @@ test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ unset lambda -if {[testConstraint testnrelevels]} { - namespace forget testnre::* - namespace delete testnre -} - # cleanup ::tcltest::cleanupTests -- cgit v0.12 From fa22561193e48c63681c637db297f6808b80ce1a Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 6 Dec 2009 20:35:38 +0000 Subject: factoring TclSpliceTailcall out of TclPopStackFrame --- generic/tclBasic.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclExecute.c | 3 ++- generic/tclInt.h | 4 +++- generic/tclNamesp.c | 47 ++-------------------------------------------- 4 files changed, 59 insertions(+), 48 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0376a0a..fa9eb6e 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.412 2009/12/06 18:12:26 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.413 2009/12/06 20:35:38 msofer Exp $ */ #include "tclInt.h" @@ -8180,6 +8180,57 @@ Tcl_NRCmdSwap( * FIXME NRE! */ +void +TclSpliceTailcall ( + Tcl_Interp *interp, + TEOV_callback *tailcallPtr) +{ + /* + * Find the splicing spot: right before the NRCommand of the thing + * being tailcalled. Note that we skip NRCommands marked in data[1] + * (used by command redirectors) + */ + + Interp *iPtr = (Interp *) interp; + TEOV_callback *runPtr; + ExecEnv *eePtr = NULL; + + + + restart: + for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { + if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { + break; + } + } + if (!runPtr) { + /* + * If we are tailcalling out of a coroutine, the splicing spot is + * in the caller's execEnv: go find it! + */ + + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + if (corPtr) { + eePtr = iPtr->execEnvPtr; + iPtr->execEnvPtr = corPtr->callerEEPtr; + goto restart; + } + Tcl_Panic("Tailcall cannot find the right splicing spot: should not happen!"); + } + + tailcallPtr->nextPtr = runPtr->nextPtr; + runPtr->nextPtr = tailcallPtr; + + if (eePtr) { + /* + * Restore the right execEnv if it was swapped for tailcalling out + * of a coroutine. + */ + + iPtr->execEnvPtr = eePtr; + } +} + int TclNRTailcallObjCmd( ClientData clientData, diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 6ad9043..9758676 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.449 2009/12/06 18:12:26 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.450 2009/12/06 20:35:39 msofer Exp $ */ #include "tclInt.h" @@ -1991,6 +1991,7 @@ TclExecuteByteCode( codePtr = param; if (!codePtr) { + /* NOT CALLED, does not (yet?) work */ goto resumeCoroutine; } break; diff --git a/generic/tclInt.h b/generic/tclInt.h index d02df6b..efde2ce 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.448 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.449 2009/12/06 20:35:39 msofer Exp $ */ #ifndef _TCLINT @@ -2663,6 +2663,8 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, struct TEOV_callback *tailcallPtr); +MODULE_SCOPE void TclSpliceTailcall(Tcl_Interp *interp, + struct TEOV_callback *tailcallPtr); /* * This structure holds the data for the various iteration callbacks used to diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 99f3f1a..dbeb70d 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.196 2009/12/05 21:30:05 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.197 2009/12/06 20:35:41 msofer Exp $ */ #include "tclInt.h" @@ -510,50 +510,7 @@ Tcl_PopCallFrame( framePtr->nsPtr = NULL; if (framePtr->tailcallPtr) { - /* - * Find the splicing spot: right before the NRCommand of the thing - * being tailcalled. Note that we skip NRCommands marked in data[1] - * (used by command redirectors) - */ - - TEOV_callback *tailcallPtr, *runPtr; - ExecEnv *eePtr = NULL; - - - restart: - for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { - if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { - break; - } - } - if (!runPtr) { - /* - * If we are tailcalling out of a coroutine, the splicing spot is - * in the caller's execEnv: go find it! - */ - - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - if (corPtr) { - eePtr = iPtr->execEnvPtr; - iPtr->execEnvPtr = corPtr->callerEEPtr; - goto restart; - } - Tcl_Panic("Tailcall cannot find the right splicing spot: should not happen!"); - } - - tailcallPtr = framePtr->tailcallPtr; - - tailcallPtr->nextPtr = runPtr->nextPtr; - runPtr->nextPtr = tailcallPtr; - - if (eePtr) { - /* - * Restore the right execEnv if it was swapped for tailcalling out - * of a coroutine. - */ - - iPtr->execEnvPtr = eePtr; - } + TclSpliceTailcall(interp, framePtr->tailcallPtr); } } -- cgit v0.12 From 0a1a1db5620ec53dd755544a21572bf4391b43ac Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 7 Dec 2009 14:04:27 +0000 Subject: missing declaration --- generic/tclBasic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index fa9eb6e..33e0273 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.413 2009/12/06 20:35:38 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.414 2009/12/07 14:04:27 msofer Exp $ */ #include "tclInt.h" @@ -145,6 +145,7 @@ static Tcl_NRPostProc NRRunObjProc; static Tcl_NRPostProc TailcallCleanup; static Tcl_NRPostProc NRTailcallEval; +static Tcl_NRPostProc YieldCallback; /* * The following structure define the commands in the Tcl core. -- cgit v0.12 From f02342c0abbf0a641833353f729836274db3b80a Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 7 Dec 2009 15:08:46 +0000 Subject: Plug memory leak. [Bug 2910044] --- ChangeLog | 5 ++++ generic/tclCmdMZ.c | 10 +++++++- tests/error.test | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f33db7e..6262026 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-07 Donal K. Fellows + + * generic/tclCmdMZ.c (TryPostBody): [Bug 2910044]: Close off memory + leak in [try] when a variable-free handler clause is present. + 2009-12-05 Miguel Sofer * generic/tclBasic.c: Small changes for clarity in tailcall diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 427bf68..28f4d77 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.196 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.197 2009/12/07 15:08:47 dkf Exp $ */ #include "tclInt.h" @@ -4433,8 +4433,10 @@ TryPostBody( Tcl_ListObjIndex(NULL, info[3], 0, &varName); if (Tcl_ObjSetVar2(interp, varName, NULL, resultObj, TCL_LEAVE_ERR_MSG) == NULL) { + Tcl_DecrRefCount(resultObj); goto handlerFailed; } + Tcl_DecrRefCount(resultObj); if (dummy > 1) { Tcl_ListObjIndex(NULL, info[3], 1, &varName); if (Tcl_ObjSetVar2(interp, varName, NULL, options, @@ -4442,6 +4444,12 @@ TryPostBody( goto handlerFailed; } } + } else { + /* + * Dispose of the result to prevent a memleak. [Bug 2910044] + */ + + Tcl_DecrRefCount(resultObj); } /* diff --git a/tests/error.test b/tests/error.test index f522008..8f0c0f0 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,14 +11,30 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.24 2009/11/16 18:00:11 dgp Exp $ +# RCS: @(#) $Id: error.test,v 1.25 2009/12/07 15:08:47 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* } +testConstraint memory [llength [info commands memory]] namespace eval ::tcl::test::error { +if {[testConstraint memory]} { + proc getbytes {} { + set lines [split [memory info] \n] + return [lindex $lines 3 3] + } + proc leaktest {script {iterations 3}} { + set end [getbytes] + for {set i 0} {$i < $iterations} {incr i} { + uplevel 1 $script + set tmp $end + set end [getbytes] + } + return [expr {$end - $tmp}] + } +} proc foo {} { global errorInfo @@ -801,6 +817,55 @@ test error-20.2 {bad code value in on handler} -body { try { list a b c } on 34985723094872345 {} {} } -returnCodes error -match glob -result {bad code *} +test error-21.1 {memory leaks in try: Bug 2910044} memory { + leaktest { + try {string repeat x 10} on ok {} {} + } +} 0 +test error-21.2 {memory leaks in try: Bug 2910044} memory { + leaktest { + try {error [string repeat x 10]} on error {} {} + } +} 0 +test error-21.3 {memory leaks in try: Bug 2910044} memory { + leaktest { + try {throw FOO [string repeat x 10]} trap FOO {} {} + } +} 0 +test error-21.4 {memory leaks in try: Bug 2910044} memory { + leaktest { + try {string repeat x 10} + } +} 0 +test error-21.5 {memory leaks in try: Bug 2910044} memory { + leaktest { + try {string repeat x 10} on ok {} {} finally {string repeat y 10} + } +} 0 +test error-21.6 {memory leaks in try: Bug 2910044} memory { + leaktest { + try { + error [string repeat x 10] + } on error {} {} finally { + string repeat y 10 + } + } +} 0 +test error-21.7 {memory leaks in try: Bug 2910044} memory { + leaktest { + try { + throw FOO [string repeat x 10] + } trap FOO {} {} finally { + string repeat y 10 + } + } +} 0 +test error-21.8 {memory leaks in try: Bug 2910044} memory { + leaktest { + try {string repeat x 10} finally {string repeat y 10} + } +} 0 + # negative case try tests - bad "trap" handler # what is the effect if we attempt to trap an errorcode that is not a list? # nested try -- cgit v0.12 From 7b7f63470a6ad3bc615a4120d09489ae02c9fa7d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 7 Dec 2009 16:33:01 +0000 Subject: * generic/tclBasic.c: add ::tcl::unsupported::yieldTo * generic/tclInt.h: [Patch 2910056] --- ChangeLog | 5 ++++ generic/tclBasic.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++---- generic/tclInt.h | 3 ++- 3 files changed, 73 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6262026..8153c0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-07 Miguel Sofer + + * generic/tclBasic.c: add ::tcl::unsupported::yieldTo + * generic/tclInt.h: [Patch 2910056] + 2009-12-07 Donal K. Fellows * generic/tclCmdMZ.c (TryPostBody): [Bug 2910044]: Close off memory diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 33e0273..b201af9 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.414 2009/12/07 14:04:27 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.415 2009/12/07 16:33:01 msofer Exp $ */ #include "tclInt.h" @@ -799,6 +799,9 @@ Tcl_CreateInterp(void) Tcl_NRCreateCommand(interp, "tailcall", NULL, TclNRTailcallObjCmd, NULL, NULL); + Tcl_NRCreateCommand(interp, "::tcl::unsupported::yieldTo", NULL, + TclNRYieldToObjCmd, NULL, NULL); + #ifdef USE_DTRACE /* * Register the tcl::dtrace command. @@ -8415,15 +8418,24 @@ YieldCallback( int result) { CoroutineData *corPtr = data[0]; - Tcl_Obj *cmdPtr = data[1]; + Tcl_Obj *listPtr = data[1]; corPtr->stackLevel = NULL; /* mark suspended */ iPtr->execEnvPtr = corPtr->callerEEPtr; - if (cmdPtr) { - /* yieldTo: invoke the command, use tailcall tech */ + if (listPtr) { + /* yieldTo: invoke the command using tailcall tech */ + TEOV_callback *cbPtr; + ClientData nsPtr = data[2]; + + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, + NULL, NULL); + cbPtr = TOP_CB(interp); + TOP_CB(interp) = cbPtr->nextPtr; + + TclSpliceTailcall(interp, cbPtr); } - return result; + return TCL_OK; } int @@ -8459,6 +8471,55 @@ TclNRYieldObjCmd( NULL, NULL, NULL); return TCL_OK; } + +int +TclNRYieldToObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + int numLevels = iPtr->numLevels; + + Tcl_Obj *listPtr, *nsObjPtr; + Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; + Tcl_Namespace *ns1Ptr; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); + return TCL_ERROR; + } + + if (!corPtr) { + Tcl_SetResult(interp, "yieldTo can only be called in a coroutine", + TCL_STATIC); + return TCL_ERROR; + } + + iPtr->numLevels = corPtr->auxNumLevels; + corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; + + /* + * This is essentially code from TclNRTailcallObjCmd + */ + + listPtr = Tcl_NewListObj(objc-1, objv+1); + Tcl_IncrRefCount(listPtr); + + nsObjPtr = Tcl_NewStringObj(nsPtr->fullName, -1); + if ((TCL_OK != TclGetNamespaceFromObj(interp, nsObjPtr, &ns1Ptr)) + || (nsPtr != ns1Ptr)) { + Tcl_Panic("yieldTo failed to find the proper namespace"); + } + Tcl_IncrRefCount(nsObjPtr); + + TclNRAddCallback(interp, YieldCallback, corPtr, listPtr, nsObjPtr, NULL); + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), + NULL, NULL, NULL); + return TCL_OK; +} + static int RewindCoroutine( diff --git a/generic/tclInt.h b/generic/tclInt.h index efde2ce..c1315be 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.449 2009/12/06 20:35:39 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.450 2009/12/07 16:33:01 msofer Exp $ */ #ifndef _TCLINT @@ -2660,6 +2660,7 @@ MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; MODULE_SCOPE Tcl_ObjCmdProc TclNRTailcallObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldToObjCmd; MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, struct TEOV_callback *tailcallPtr); -- cgit v0.12 From 16a57bb45fbcb61e87c998d5dd81fb42452bc6f9 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 7 Dec 2009 17:15:33 +0000 Subject: * generic/tclStrToD.c: Correct conditional compile directives to better detect the toolchain that needs extra work for proper underflow treatment instead of merely detecting the mips platform. [Bug 2902010]. --- ChangeLog | 6 ++++++ generic/tclStrToD.c | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8153c0c..7f3374f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-07 Don Porter + + * generic/tclStrToD.c: Correct conditional compile directives to + better detect the toolchain that needs extra work for proper underflow + treatment instead of merely detecting the mips platform. [Bug 2902010]. + 2009-12-07 Miguel Sofer * generic/tclBasic.c: add ::tcl::unsupported::yieldTo diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index fbe4105..6412e92 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.38 2009/07/16 21:24:40 dgp Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.39 2009/12/07 17:15:33 dgp Exp $ * *---------------------------------------------------------------------- */ @@ -71,9 +71,10 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); /* * MIPS floating-point units need special settings in control registers - * to use gradual underflow as we expect. + * to use gradual underflow as we expect. This fix is for the MIPSpro + * compiler. */ -#if defined(__mips) +#if defined(__sgi) && defined(_COMPILER_VERSION) #include #endif /* @@ -2174,7 +2175,7 @@ TclInitDoubleConversion(void) } bitwhack; #endif -#if defined(__mips) +#if defined(__sgi) && defined(_COMPILER_VERSION) union fpc_csr mipsCR; mipsCR.fc_word = get_fpc_csr(); -- cgit v0.12 From 60fb745f06ad64d3e8042da7ab3a837f52eafce6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 7 Dec 2009 19:03:14 +0000 Subject: * generic/tclBasic.c: arrange for [tailcall] to be created with the other builtins: was being created in a separate call, leftover from pre-tip days. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 10 ++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f3374f..1817cf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-07 Miguel Sofer + + * generic/tclBasic.c: arrange for [tailcall] to be created with + the other builtins: was being created in a separate call, leftover + from pre-tip days. + 2009-12-07 Don Porter * generic/tclStrToD.c: Correct conditional compile directives to diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b201af9..ae6469f 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.415 2009/12/07 16:33:01 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.416 2009/12/07 19:03:15 msofer Exp $ */ #include "tclInt.h" @@ -216,6 +216,7 @@ static const CmdInfo builtInCmds[] = { {"split", Tcl_SplitObjCmd, NULL, NULL, 1}, {"subst", Tcl_SubstObjCmd, TclCompileSubstCmd, TclNRSubstObjCmd, 1}, {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, TclNRSwitchObjCmd, 1}, + {"tailcall", NULL, NULL, TclNRTailcallObjCmd, 1}, {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, {"try", Tcl_TryObjCmd, NULL, TclNRTryObjCmd, 1}, @@ -792,13 +793,6 @@ Tcl_CreateInterp(void) Tcl_CreateObjCommand(interp, "::tcl::unsupported::representation", Tcl_RepresentationCmd, NULL, NULL); - /* - * Create the 'tailcall' command - */ - - Tcl_NRCreateCommand(interp, "tailcall", NULL, TclNRTailcallObjCmd, - NULL, NULL); - Tcl_NRCreateCommand(interp, "::tcl::unsupported::yieldTo", NULL, TclNRYieldToObjCmd, NULL, NULL); -- cgit v0.12 From ddd3069fa1c4fd4dbcfd28c0486d8de3254fdae2 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 7 Dec 2009 20:49:28 +0000 Subject: * generic/tclCmdIL.c: Fix of [Bug #2910094] by aku * tests/coroutine.test: --- ChangeLog | 3 +++ generic/tclCmdIL.c | 4 ++-- tests/coroutine.test | 20 +++++++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1817cf8..4414ab0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-12-07 Miguel Sofer + * generic/tclCmdIL.c: Fix of [Bug #2910094] by aku + * tests/coroutine.test: + * generic/tclBasic.c: arrange for [tailcall] to be created with the other builtins: was being created in a separate call, leftover from pre-tip days. diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index e84703b..9f9fdda 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.174 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.175 2009/12/07 20:49:28 msofer Exp $ */ #include "tclInt.h" @@ -1100,7 +1100,7 @@ InfoFrameCmd( * A coroutine: must fix the level computations */ - topLevel += iPtr->execEnvPtr->corPtr->caller.cmdFramePtr->level + 1 - + topLevel += iPtr->execEnvPtr->corPtr->caller.cmdFramePtr->level - iPtr->execEnvPtr->corPtr->base.cmdFramePtr->level; } diff --git a/tests/coroutine.test b/tests/coroutine.test index d248269..639fc0b 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.8 2009/12/06 19:37:50 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.9 2009/12/07 20:49:29 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -322,6 +322,24 @@ test coroutine-3.5 {info coroutine} -setup { rename a {} rename b {} } -result {} +test coroutine-3.6 {info frame, bug #2910094} -setup { + proc stack {} { + set res [list "LEVEL:[set lev [info frame]]"] + for {set i 1} {$i < $lev} {incr i} { + lappend res [info frame $i] + } + set res + # the precise command depends on line numbers and such, is likely not + # to be stable: just check that the test completes! + return + } + proc a {} stack +} -body { + coroutine aa a +} -cleanup { + rename stack {} + rename a {} +} -result {} test coroutine-4.1 {bug #2093188} -setup { proc foo {} { -- cgit v0.12 From 903848120ff87aaa29fd7b7cc21b37b097edefc1 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Dec 2009 01:34:04 +0000 Subject: * generic/tclExecute.c: Start cleaning the TEBC stables * generic/tclInt.h: --- ChangeLog | 3 + generic/tclExecute.c | 377 ++++++++++++++++++++++----------------------------- generic/tclInt.h | 4 +- 3 files changed, 165 insertions(+), 219 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4414ab0..da51581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-12-07 Miguel Sofer + * generic/tclExecute.c: Start cleaning the TEBC stables + * generic/tclInt.h: + * generic/tclCmdIL.c: Fix of [Bug #2910094] by aku * tests/coroutine.test: diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9758676..05e40aa 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.450 2009/12/06 20:35:39 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.451 2009/12/08 01:34:05 msofer Exp $ */ #include "tclInt.h" @@ -1867,9 +1867,6 @@ TclExecuteByteCode( /* * Bottom of allocated stack holds the NR data */ - - int initLevel = 0; - /* NR_TEBC */ BottomData *bottomPtr = NULL; @@ -1884,7 +1881,6 @@ TclExecuteByteCode( Tcl_Obj **initTosPtr = NULL; /* Stack top at start of execution. */ ptrdiff_t *initCatchTop = NULL; /* Catch stack top at start of execution */ Var *compiledLocals = NULL; - Namespace *namespacePtr = NULL; CmdFrame *bcFramePtr = NULL; /* TIP #280 Structure for tracking lines */ Tcl_Obj **constants = &iPtr->execEnvPtr->constants[0]; @@ -1942,8 +1938,6 @@ TclExecuteByteCode( * execution stack is large enough to execute this ByteCode. */ - int nested = 0; - if (!codePtr) { resumeCoroutine: /* @@ -1956,11 +1950,8 @@ TclExecuteByteCode( NRE_ASSERT(iPtr->execEnvPtr->corPtr->eePtr == iPtr->execEnvPtr); NRE_ASSERT(COR_IS_SUSPENDED(iPtr->execEnvPtr->corPtr)); - initLevel = 0; - nested = 1; - oldBottomPtr = iPtr->execEnvPtr->bottomPtr; - iPtr->execEnvPtr->corPtr->stackLevel = &initLevel; + iPtr->execEnvPtr->corPtr->stackLevel = &bottomPtr; if (iPtr->execEnvPtr->rewind) { result = TCL_ERROR; } @@ -1968,213 +1959,51 @@ TclExecuteByteCode( } nonRecursiveCallStart: - if (nested) { - TEOV_callback *callbackPtr = TOP_CB(interp); - int type = PTR2INT(callbackPtr->data[0]); - ClientData param = callbackPtr->data[1]; - - NRE_ASSERT(result==TCL_OK); - NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); - NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); - - TOP_CB(interp) = callbackPtr->nextPtr; - TCLNR_FREE(interp, callbackPtr); - - NR_DATA_BURY(); - - switch (type) { - case TCL_NR_BC_TYPE: - /* - * A request to run a bytecode: record this level's state - * variables, swap codePtr and start running the new one. - */ - - codePtr = param; - if (!codePtr) { - /* NOT CALLED, does not (yet?) work */ - goto resumeCoroutine; - } - break; - case TCL_NR_TAILCALL_TYPE: { - /* - * A request to perform a tailcall: just drop this bytecode. - */ - -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall request received\n"); - } -#endif - if (catchTop != initCatchTop) { - TEOV_callback *tailcallPtr = iPtr->varFramePtr->tailcallPtr; - - TclClearTailcall(interp, tailcallPtr); - iPtr->varFramePtr->tailcallPtr = NULL; - result = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", - TCL_STATIC); - pc--; - goto checkForCatch; - } - goto abnormalReturn; - } - case TCL_NR_YIELD_TYPE: { /*[yield] */ - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - - if (!corPtr) { - Tcl_SetResult(interp, - "yield can only be called in a coroutine", - TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); - result = TCL_ERROR; - pc--; - goto checkForCatch; - } - NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); - NRE_ASSERT(corPtr->stackLevel != NULL); - NRE_ASSERT(bottomPtr == corPtr->eePtr->bottomPtr); - if (corPtr->stackLevel != &initLevel) { - Tcl_SetResult(interp, "cannot yield: C stack busy", - TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); - result = TCL_ERROR; - pc--; - goto checkForCatch; - } - - /* - * Save our state and return - */ - - NR_DATA_BURY(); - esPtr->tosPtr = tosPtr; - iPtr->execEnvPtr->bottomPtr = bottomPtr; - return TCL_OK; - } - default: - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); - } - } - nested = 1; - codePtr->refCount++; bottomPtr = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) + codePtr->maxStackDepth, 0); curInstName = NULL; auxObjList = NULL; - initLevel = 1; NR_DATA_INIT(); /* record this level's data */ if (iPtr->execEnvPtr->corPtr && !iPtr->execEnvPtr->corPtr->stackLevel) { - iPtr->execEnvPtr->corPtr->stackLevel = &initLevel; + iPtr->execEnvPtr->corPtr->stackLevel = &bottomPtr; } - nonRecursiveCallReturn: iPtr->execEnvPtr->bottomPtr = bottomPtr; bcFramePtr = (CmdFrame *) (bottomPtr + 1); initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); esPtr = iPtr->execEnvPtr->execStackPtr; - namespacePtr = iPtr->varFramePtr->nsPtr; compiledLocals = iPtr->varFramePtr->compiledLocals; - if (initLevel) { - initLevel = 0; - pc = codePtr->codeStart; - catchTop = initCatchTop; - tosPtr = initTosPtr; - - /* - * TIP #280: Initialize the frame. Do not push it yet. - */ - - bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) - ? TCL_LOCATION_PREBC : TCL_LOCATION_BC); - bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1); - bcFramePtr->numLevels = iPtr->numLevels; - bcFramePtr->framePtr = iPtr->framePtr; - bcFramePtr->nextPtr = iPtr->cmdFramePtr; - bcFramePtr->nline = 0; - bcFramePtr->line = NULL; - bcFramePtr->litarg = NULL; - bcFramePtr->data.tebc.codePtr = codePtr; - bcFramePtr->data.tebc.pc = NULL; - bcFramePtr->cmd.str.cmd = NULL; - bcFramePtr->cmd.str.len = 0; - - if (iPtr->execEnvPtr->rewind) { - result = TCL_ERROR; - goto abnormalReturn; - } - - } else { - /* - * Returning from a non-recursive call. State is already completely - * reset, now process the return. - */ - - NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); - iPtr->cmdFramePtr = bcFramePtr->nextPtr; - - TclArgumentBCRelease((Tcl_Interp*) iPtr, bcFramePtr); - - /* - * If the CallFrame is marked as tailcalling, keep tailcalling - */ - - if (iPtr->varFramePtr->tailcallPtr) { - if (catchTop != initCatchTop) { - TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); - iPtr->varFramePtr->tailcallPtr = NULL; - result = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", - TCL_STATIC); - pc--; - goto checkForCatch; - } - goto abnormalReturn; - } - - if (iPtr->execEnvPtr->rewind) { - result = TCL_ERROR; - goto abnormalReturn; - } - - if (result == TCL_OK) { - /* - * Reset the interp's result to avoid possible duplications of - * large objects [Bug 781585]. We do not call Tcl_ResetResult - * to avoid any side effects caused by the resetting of - * errorInfo and errorCode [Bug 804681], which are not needed - * here. We chose instead to manipulate the interp's object - * result directly. - * - * Note that the result object is now in objResultPtr, it - * keeps the refCount it had in its role of - * iPtr->objResultPtr. - */ - -#ifndef TCL_COMPILE_DEBUG - if (*pc == INST_POP) { - pc++; - } else { -#endif - objResultPtr = Tcl_GetObjResult(interp); - *(++tosPtr) = objResultPtr; - - TclNewObj(objResultPtr); - Tcl_IncrRefCount(objResultPtr); - iPtr->objResultPtr = objResultPtr; -#ifndef TCL_COMPILE_DEBUG - } -#endif - } else { - cleanup = 0; /* already cleaned up */ - pc--; /* was pointing to next instruction */ - goto processExceptionReturn; - } + pc = codePtr->codeStart; + catchTop = initCatchTop; + tosPtr = initTosPtr; + + /* + * TIP #280: Initialize the frame. Do not push it yet. + */ + + bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) + ? TCL_LOCATION_PREBC : TCL_LOCATION_BC); + bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1); + bcFramePtr->numLevels = iPtr->numLevels; + bcFramePtr->framePtr = iPtr->framePtr; + bcFramePtr->nextPtr = iPtr->cmdFramePtr; + bcFramePtr->nline = 0; + bcFramePtr->line = NULL; + bcFramePtr->litarg = NULL; + bcFramePtr->data.tebc.codePtr = codePtr; + bcFramePtr->data.tebc.pc = NULL; + bcFramePtr->cmd.str.cmd = NULL; + bcFramePtr->cmd.str.len = 0; + + if (iPtr->execEnvPtr->rewind) { + result = TCL_ERROR; + goto abnormalReturn; } #ifdef TCL_COMPILE_DEBUG @@ -2461,7 +2290,7 @@ TclExecuteByteCode( instStartCmdOK: NEXT_INST_F(9, 0, 0); } else if (((codePtr->compileEpoch == iPtr->compileEpoch) - && (codePtr->nsEpoch == namespacePtr->resolverEpoch)) + && (codePtr->nsEpoch == iPtr->varFramePtr->nsPtr->resolverEpoch)) || (codePtr->flags & TCL_BYTECODE_PRECOMPILED)) { checkInterp = 0; goto instStartCmdOK; @@ -2780,8 +2609,8 @@ TclExecuteByteCode( CACHE_STACK_INFO(); cleanup = 1; pc++; - Tcl_NRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), newCodePtr, - NULL, NULL); + NR_DATA_BURY(); + codePtr = newCodePtr; goto nonRecursiveCallStart; } @@ -2846,8 +2675,8 @@ TclExecuteByteCode( bcFramePtr->data.tebc.pc = (char *) pc; iPtr->cmdFramePtr = bcFramePtr; pc++; - Tcl_NRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), newCodePtr, - NULL, NULL); + NR_DATA_BURY(); + codePtr = newCodePtr; goto nonRecursiveCallStart; } @@ -2936,21 +2765,131 @@ TclExecuteByteCode( if (TOP_CB(interp) != bottomPtr->rootPtr) { NRE_ASSERT(result == TCL_OK); pc += pcAdjustment; - goto nonRecursiveCallStart; + + nonRecursiveCallSetup: { + TEOV_callback *callbackPtr = TOP_CB(interp); + int type = PTR2INT(callbackPtr->data[0]); + ClientData param = callbackPtr->data[1]; + + NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); + NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); + + TOP_CB(interp) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); + + NR_DATA_BURY(); + switch (type) { + case TCL_NR_BC_TYPE: + /* + * A request to run a bytecode: record this + * level's state variables, swap codePtr and start + * running the new one. + */ + + if (param) { + codePtr = param; + goto nonRecursiveCallStart; + } + /* NOT CALLED, does not (yet?) work */ + goto resumeCoroutine; + break; + case TCL_NR_TAILCALL_TYPE: { + /* + * A request to perform a tailcall: just drop this + * bytecode. */ + +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " Tailcall request received\n"); + } +#endif + if (catchTop != initCatchTop) { + TEOV_callback *tailcallPtr = iPtr->varFramePtr->tailcallPtr; + + TclClearTailcall(interp, tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + pc--; + goto checkForCatch; + } + goto abnormalReturn; + } + case TCL_NR_YIELD_TYPE: { /*[yield] */ + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + + if (!corPtr) { + Tcl_SetResult(interp, + "yield can only be called in a coroutine", + TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); + result = TCL_ERROR; + pc--; + goto checkForCatch; + } + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + NRE_ASSERT(corPtr->stackLevel != NULL); + NRE_ASSERT(bottomPtr == corPtr->eePtr->bottomPtr); + if (corPtr->stackLevel != &bottomPtr) { + Tcl_SetResult(interp, "cannot yield: C stack busy", + TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); + result = TCL_ERROR; + pc--; + goto checkForCatch; + } + + /* + * Save our state and return + */ + + NR_DATA_BURY(); + esPtr->tosPtr = tosPtr; + iPtr->execEnvPtr->bottomPtr = bottomPtr; + return TCL_OK; + } + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); + } + } } - TclArgumentBCRelease((Tcl_Interp*) iPtr, bcFramePtr); + pc += pcAdjustment; - iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr; - NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr->nextPtr); + nonRecursiveCallReturn: - iPtr->execEnvPtr->bottomPtr = bottomPtr; + NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclArgumentBCRelease((Tcl_Interp*) iPtr, bcFramePtr); + /* + * If the CallFrame is marked as tailcalling, keep tailcalling + */ + + if (iPtr->varFramePtr->tailcallPtr) { + if (catchTop != initCatchTop) { + TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; + result = TCL_ERROR; + Tcl_SetResult(interp,"Tailcall called from within a catch environment", + TCL_STATIC); + pc--; + goto checkForCatch; + } + goto abnormalReturn; + } + + if (iPtr->execEnvPtr->rewind) { + result = TCL_ERROR; + goto abnormalReturn; + } + if (result == TCL_OK) { Tcl_Obj *objPtr; #ifndef TCL_COMPILE_DEBUG - if (*(pc+pcAdjustment) == INST_POP) { - NEXT_INST_V((pcAdjustment+1), cleanup, 0); + if (*pc == INST_POP) { + NEXT_INST_V(1, cleanup, 0); } #endif /* @@ -2979,8 +2918,9 @@ TclExecuteByteCode( TclNewObj(objPtr); Tcl_IncrRefCount(objPtr); iPtr->objResultPtr = objPtr; - NEXT_INST_V(pcAdjustment, cleanup, -1); + NEXT_INST_V(0, cleanup, -1); } else { + pc--; goto processExceptionReturn; } } @@ -8003,10 +7943,13 @@ TclExecuteByteCode( * caller's arguments and keep processing the caller. */ - while (cleanup--) { - Tcl_Obj *objPtr = POP_OBJECT(); - Tcl_DecrRefCount(objPtr); - } + bcFramePtr = (CmdFrame *) (bottomPtr + 1); + initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; + initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); + esPtr = iPtr->execEnvPtr->execStackPtr; + + compiledLocals = iPtr->varFramePtr->compiledLocals; + goto nonRecursiveCallReturn; } else { TEOV_callback *callbackPtr = TOP_CB(iPtr); @@ -8022,7 +7965,7 @@ TclExecuteByteCode( * tailcall! Start the new bytecode. */ - goto nonRecursiveCallStart; + goto nonRecursiveCallSetup; case TCL_NR_TAILCALL_TYPE: TOP_CB(iPtr) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); diff --git a/generic/tclInt.h b/generic/tclInt.h index c1315be..6eb542e 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.450 2009/12/07 16:33:01 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.451 2009/12/08 01:34:05 msofer Exp $ */ #ifndef _TCLINT @@ -1400,7 +1400,7 @@ typedef struct CoroutineData { CorContext caller; CorContext running; CorContext base; - int *stackLevel; + void *stackLevel; int auxNumLevels; /* While the coroutine is running the * numLevels of the create/resume command is * stored here; for suspended coroutines it -- cgit v0.12 From 1421cacb4e078cf96950f34ed3f3dabe6153ec26 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Dec 2009 04:20:23 +0000 Subject: * generic/tclExecute.c (TEBC): Grouping "slow" variables into structs, to reduce register pressure and help the compiler with variable allocation. --- ChangeLog | 6 + generic/tclExecute.c | 646 ++++++++++++++++++++++++++------------------------- 2 files changed, 333 insertions(+), 319 deletions(-) diff --git a/ChangeLog b/ChangeLog index da51581..ced5349 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-12-07 Miguel Sofer + * generic/tclExecute.c (TEBC): Grouping "slow" variables into + structs, to reduce register pressure and help the compiler with + variable allocation. + +2009-12-07 Miguel Sofer + * generic/tclExecute.c: Start cleaning the TEBC stables * generic/tclInt.h: diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 05e40aa..5835792 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.451 2009/12/08 01:34:05 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.452 2009/12/08 04:20:24 msofer Exp $ */ #include "tclInt.h" @@ -184,31 +184,27 @@ typedef struct BottomData { } BottomData; #define NR_DATA_INIT() \ - bottomPtr->prevBottomPtr = oldBottomPtr; \ - bottomPtr->rootPtr = TOP_CB(iPtr); \ - bottomPtr->codePtr = codePtr; \ + BP->prevBottomPtr = OBP; \ + BP->rootPtr = TOP_CB(iPtr); \ + BP->codePtr = codePtr; \ #define NR_DATA_BURY() \ - bottomPtr->pc = pc; \ - bottomPtr->catchTop = catchTop; \ - bottomPtr->cleanup = cleanup; \ - bottomPtr->auxObjList = auxObjList; \ - oldBottomPtr = bottomPtr + BP->pc = pc; \ + BP->cleanup = cleanup; \ + OBP = BP #define NR_DATA_DIG() \ - pc = bottomPtr->pc; \ - codePtr = bottomPtr->codePtr; \ - catchTop = bottomPtr->catchTop; \ - cleanup = bottomPtr->cleanup; \ - auxObjList = bottomPtr->auxObjList; \ - esPtr = iPtr->execEnvPtr->execStackPtr; \ - tosPtr = esPtr->tosPtr - -#define PUSH_AUX_OBJ(objPtr) \ + pc = BP->pc; \ + codePtr = BP->codePtr; \ + cleanup = BP->cleanup; \ + TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; \ + tosPtr = TAUX.esPtr->tosPtr + +#define PUSH_TAUX_OBJ(objPtr) \ objPtr->internalRep.twoPtrValue.ptr2 = auxObjList; \ auxObjList = objPtr -#define POP_AUX_OBJ() \ +#define POP_TAUX_OBJ() \ { \ Tcl_Obj *tmpPtr = auxObjList; \ auxObjList = (Tcl_Obj *) tmpPtr->internalRep.twoPtrValue.ptr2; \ @@ -307,11 +303,11 @@ VarHashCreateVar( */ #define CACHE_STACK_INFO() \ - checkInterp = 1 + TAUX.checkInterp = 1 #define DECACHE_STACK_INFO() \ - esPtr->tosPtr = tosPtr; \ - iPtr->execEnvPtr->bottomPtr = bottomPtr + TAUX.esPtr->tosPtr = tosPtr; \ + iPtr->execEnvPtr->bottomPtr = BP /* * Macros used to access items on the Tcl evaluation stack. PUSH_OBJECT @@ -385,13 +381,13 @@ VarHashCreateVar( #define TCL_DTRACE_INST_NEXT() \ if (TCL_DTRACE_INST_DONE_ENABLED()) {\ - if (curInstName) {\ - TCL_DTRACE_INST_DONE(curInstName, (int) CURR_DEPTH,\ + if (TAUX.curInstName) {\ + TCL_DTRACE_INST_DONE(TAUX.curInstName, (int) CURR_DEPTH,\ tosPtr);\ }\ - curInstName = tclInstructionTable[*pc].name;\ + TAUX.curInstName = tclInstructionTable[*pc].name;\ if (TCL_DTRACE_INST_START_ENABLED()) {\ - TCL_DTRACE_INST_START(curInstName, (int) CURR_DEPTH,\ + TCL_DTRACE_INST_START(TAUX.curInstName, (int) CURR_DEPTH,\ tosPtr);\ }\ } else if (TCL_DTRACE_INST_START_ENABLED()) {\ @@ -399,8 +395,8 @@ VarHashCreateVar( (int) CURR_DEPTH, tosPtr);\ } #define TCL_DTRACE_INST_LAST() \ - if (TCL_DTRACE_INST_DONE_ENABLED() && curInstName) {\ - TCL_DTRACE_INST_DONE(curInstName, (int) CURR_DEPTH, tosPtr);\ + if (TCL_DTRACE_INST_DONE_ENABLED() && TAUX.curInstName) {\ + TCL_DTRACE_INST_DONE(TAUX.curInstName, (int) CURR_DEPTH, tosPtr);\ } /* @@ -1869,54 +1865,73 @@ TclExecuteByteCode( */ /* NR_TEBC */ - BottomData *bottomPtr = NULL; - BottomData *oldBottomPtr = NULL; - /* * Constants: variables that do not change during the execution, used - * sporadically. + * sporadically: no special need for speed. */ - ExecStack *esPtr = NULL; - Tcl_Obj **initTosPtr = NULL; /* Stack top at start of execution. */ - ptrdiff_t *initCatchTop = NULL; /* Catch stack top at start of execution */ - Var *compiledLocals = NULL; - CmdFrame *bcFramePtr = NULL; /* TIP #280 Structure for tracking lines */ - Tcl_Obj **constants = &iPtr->execEnvPtr->constants[0]; - + struct auxTEBCdata { + ExecStack *esPtr; + Var *compiledLocals; + BottomData *bottomPtr; /* Bottom of stack holds NR data */ + BottomData *oldBottomPtr; + Tcl_Obj **constants; + int instructionCount; /* Counter that is used to work out when to + * call Tcl_AsyncReady() */ + int checkInterp; /* Indicates when a check of interp readyness + * is necessary. Set by CACHE_STACK_INFO() */ + const char *curInstName; + int result; /* Return code returned after execution. + * Result variable - needed only when going to + * checkForcatch or other error handlers; also + * used as local in some opcodes. */ + } TAUX = { + NULL, + NULL, + NULL, + NULL, + &iPtr->execEnvPtr->constants[0], + 0, + 0, + NULL, + TCL_OK + }; + +#define LOCAL(i) (&(TAUX.compiledLocals[(i)])) +#define TCONST(i) (TAUX.constants[(i)]) +#define BP (TAUX.bottomPtr) +#define OBP (TAUX.oldBottomPtr) +#define TRESULT (TAUX.result) + + /* + * These macros are just meant to save some global variables that are not + * used too frequently + */ +#define bcFramePtr ((CmdFrame *) (BP + 1)) +#define initCatchTop (((ptrdiff_t *) (bcFramePtr + 1)) - 1) +#define initTosPtr ((Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth)) +#define auxObjList (BP->auxObjList) +#define catchTop (BP->catchTop) + /* * Globals: variables that store state, must remain valid at all times. */ - ptrdiff_t *catchTop = 0; - register Tcl_Obj **tosPtr = NULL; + Tcl_Obj **tosPtr = NULL; /* Cached pointer to top of evaluation * stack. */ - register const unsigned char *pc = NULL; + const unsigned char *pc = NULL; /* The current program counter. */ - int instructionCount = 0; /* Counter that is used to work out when to - * call Tcl_AsyncReady() */ - Tcl_Obj *auxObjList = NULL; /* Linked list of aux data, used for {*} and - * for same-level NR calls. */ - int checkInterp = 0; /* Indicates when a check of interp readyness - * is necessary. Set by CACHE_STACK_INFO() */ /* * Transfer variables - needed only between opcodes, but not while * executing an instruction. */ - register int cleanup = 0; + int cleanup = 0; Tcl_Obj *objResultPtr; /* - * Result variable - needed only when going to checkForcatch or other - * error handlers; also used as local in some opcodes. - */ - - int result = TCL_OK; /* Return code returned after execution. */ - - /* * Locals - variables that are used within opcodes or bounded sections of * the file (jumps between opcodes within a family). * NOTE: These are now defined locally where needed. @@ -1926,7 +1941,6 @@ TclExecuteByteCode( int traceInstructions = (tclTraceExec == 3); char cmdNameBuf[21]; #endif - const char *curInstName = NULL; /* * The execution uses a unified stack: first a BottomData, immediately @@ -1950,34 +1964,31 @@ TclExecuteByteCode( NRE_ASSERT(iPtr->execEnvPtr->corPtr->eePtr == iPtr->execEnvPtr); NRE_ASSERT(COR_IS_SUSPENDED(iPtr->execEnvPtr->corPtr)); - oldBottomPtr = iPtr->execEnvPtr->bottomPtr; - iPtr->execEnvPtr->corPtr->stackLevel = &bottomPtr; + OBP = iPtr->execEnvPtr->bottomPtr; + iPtr->execEnvPtr->corPtr->stackLevel = &TAUX; if (iPtr->execEnvPtr->rewind) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; } goto returnToCaller; } nonRecursiveCallStart: codePtr->refCount++; - bottomPtr = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, + BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) + codePtr->maxStackDepth, 0); - curInstName = NULL; + TAUX.curInstName = NULL; auxObjList = NULL; NR_DATA_INIT(); /* record this level's data */ if (iPtr->execEnvPtr->corPtr && !iPtr->execEnvPtr->corPtr->stackLevel) { - iPtr->execEnvPtr->corPtr->stackLevel = &bottomPtr; + iPtr->execEnvPtr->corPtr->stackLevel = &TAUX; } - iPtr->execEnvPtr->bottomPtr = bottomPtr; - bcFramePtr = (CmdFrame *) (bottomPtr + 1); - initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; - initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); - esPtr = iPtr->execEnvPtr->execStackPtr; + iPtr->execEnvPtr->bottomPtr = BP; + TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; - compiledLocals = iPtr->varFramePtr->compiledLocals; + TAUX.compiledLocals = iPtr->varFramePtr->compiledLocals;// pc = codePtr->codeStart; catchTop = initCatchTop; @@ -2002,7 +2013,7 @@ TclExecuteByteCode( bcFramePtr->cmd.str.len = 0; if (iPtr->execEnvPtr->rewind) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto abnormalReturn; } @@ -2110,7 +2121,7 @@ TclExecuteByteCode( * ASYNC_CHECK_COUNT_MASK instruction, of the form (2**n-1). */ - if ((instructionCount++ & ASYNC_CHECK_COUNT_MASK) == 0) { + if ((TAUX.instructionCount++ & ASYNC_CHECK_COUNT_MASK) == 0) { /* * Check for asynchronous handlers [Bug 746722]; we do the check every * ASYNC_CHECK_COUNT_MASK instruction, of the form (2**n-<1). @@ -2119,10 +2130,10 @@ TclExecuteByteCode( if (TclAsyncReady(iPtr)) { DECACHE_STACK_INFO(); - localResult = Tcl_AsyncInvoke(interp, result); + localResult = Tcl_AsyncInvoke(interp, TRESULT); CACHE_STACK_INFO(); if (localResult == TCL_ERROR) { - result = localResult; + TRESULT = localResult; goto checkForCatch; } } @@ -2132,7 +2143,7 @@ TclExecuteByteCode( CACHE_STACK_INFO(); if (localResult == TCL_ERROR) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -2141,7 +2152,7 @@ TclExecuteByteCode( localResult = Tcl_LimitCheck(interp); CACHE_STACK_INFO(); if (localResult == TCL_ERROR) { - result = localResult; + TRESULT = localResult; goto checkForCatch; } } @@ -2175,9 +2186,9 @@ TclExecuteByteCode( */ TRACE(("%u %u => ", code, level)); - result = TclProcessReturn(interp, code, level, OBJ_AT_TOS); - if (result == TCL_OK) { - TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")", + TRESULT = TclProcessReturn(interp, code, level, OBJ_AT_TOS); + if (TRESULT == TCL_OK) { + TRACE_APPEND(("continuing to next instruction (TRESULT=\"%.30s\")", O2S(objResultPtr))); NEXT_INST_F(9, 1, 0); } else { @@ -2193,11 +2204,11 @@ TclExecuteByteCode( case INST_RETURN_STK: TRACE(("=> ")); objResultPtr = POP_OBJECT(); - result = Tcl_SetReturnOptions(interp, OBJ_AT_TOS); + TRESULT = Tcl_SetReturnOptions(interp, OBJ_AT_TOS); Tcl_DecrRefCount(OBJ_AT_TOS); OBJ_AT_TOS = objResultPtr; - if (result == TCL_OK) { - TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")", + if (TRESULT == TCL_OK) { + TRACE_APPEND(("continuing to next instruction (TRESULT=\"%.30s\")", O2S(objResultPtr))); NEXT_INST_F(1, 0, 0); } else { @@ -2217,7 +2228,7 @@ TclExecuteByteCode( Tcl_SetObjResult(interp, OBJ_AT_TOS); #ifdef TCL_COMPILE_DEBUG - TRACE_WITH_OBJ(("=> return code=%d, result=", result), + TRACE_WITH_OBJ(("=> return code=%d, result=", TRESULT), iPtr->objResultPtr); if (traceInstructions) { fprintf(stdout, "\n"); @@ -2286,13 +2297,13 @@ TclExecuteByteCode( */ iPtr->cmdCount += TclGetUInt4AtPtr(pc+5); - if (!checkInterp) { + if (!TAUX.checkInterp) { instStartCmdOK: NEXT_INST_F(9, 0, 0); } else if (((codePtr->compileEpoch == iPtr->compileEpoch) && (codePtr->nsEpoch == iPtr->varFramePtr->nsPtr->resolverEpoch)) || (codePtr->flags & TCL_BYTECODE_PRECOMPILED)) { - checkInterp = 0; + TAUX.checkInterp = 0; goto instStartCmdOK; } else { const char *bytes; @@ -2301,11 +2312,11 @@ TclExecuteByteCode( bytes = GetSrcInfoForPc(pc, codePtr, &length); DECACHE_STACK_INFO(); - result = Tcl_EvalEx(interp, bytes, length, 0); + TRESULT = Tcl_EvalEx(interp, bytes, length, 0); CACHE_STACK_INFO(); - if (result != TCL_OK) { + if (TRESULT != TCL_OK) { cleanup = 0; - if (result == TCL_ERROR) { + if (TRESULT == TCL_ERROR) { /* * Tcl_EvalEx already did the task of logging * the error to the stack trace for us, so set @@ -2527,7 +2538,7 @@ TclExecuteByteCode( TclNewObj(objPtr); objPtr->internalRep.twoPtrValue.ptr1 = (void *) CURR_DEPTH; - PUSH_AUX_OBJ(objPtr); + PUSH_TAUX_OBJ(objPtr); NEXT_INST_F(1, 0, 0); } @@ -2546,7 +2557,7 @@ TclExecuteByteCode( if (TclListObjGetElements(interp, valuePtr, &objc, &objv) != TCL_OK){ TRACE_WITH_OBJ(("%.30s => ERROR: ", O2S(valuePtr)), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } (void) POP_OBJECT(); @@ -2561,7 +2572,7 @@ TclExecuteByteCode( length = objc + (codePtr->maxStackDepth - TclGetInt4AtPtr(pc+1)); DECACHE_STACK_INFO(); moved = GrowEvaluationStack(iPtr->execEnvPtr, length, 1) - - (Tcl_Obj **) bottomPtr; + - (Tcl_Obj **) BP; if (moved) { /* @@ -2570,12 +2581,8 @@ TclExecuteByteCode( * stack-allocated parameter, update the stack pointers. */ - bottomPtr = (BottomData *) (((Tcl_Obj **)bottomPtr) + moved); - - bcFramePtr = (CmdFrame *) (bottomPtr + 1); - initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; - initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); - esPtr = iPtr->execEnvPtr->execStackPtr; + BP = (BottomData *) (((Tcl_Obj **)BP) + moved); + TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; catchTop += moved; tosPtr += moved; @@ -2685,7 +2692,7 @@ TclExecuteByteCode( CLANG_ASSERT(auxObjList); objc = CURR_DEPTH - (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1; - POP_AUX_OBJ(); + POP_TAUX_OBJ(); } if (objc) { @@ -2750,20 +2757,20 @@ TclExecuteByteCode( * for async stuff anyway while processing TclEvalObjv */ - instructionCount = 1; + TAUX.instructionCount = 1; TclArgumentBCEnter((Tcl_Interp*) iPtr, objv, objc, codePtr, bcFramePtr, pc - codePtr->codeStart); DECACHE_STACK_INFO(); - result = TclNREvalObjv(interp, objc, objv, + TRESULT = TclNREvalObjv(interp, objc, objv, (*pc == INST_EVAL_STK) ? 0 : TCL_EVAL_NOERR, NULL); - result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); + TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); CACHE_STACK_INFO(); - if (TOP_CB(interp) != bottomPtr->rootPtr) { - NRE_ASSERT(result == TCL_OK); + if (TOP_CB(interp) != BP->rootPtr) { + NRE_ASSERT(TRESULT == TCL_OK); pc += pcAdjustment; nonRecursiveCallSetup: { @@ -2771,7 +2778,7 @@ TclExecuteByteCode( int type = PTR2INT(callbackPtr->data[0]); ClientData param = callbackPtr->data[1]; - NRE_ASSERT(callbackPtr != bottomPtr->rootPtr); + NRE_ASSERT(callbackPtr != BP->rootPtr); NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); TOP_CB(interp) = callbackPtr->nextPtr; @@ -2808,7 +2815,7 @@ TclExecuteByteCode( TclClearTailcall(interp, tailcallPtr); iPtr->varFramePtr->tailcallPtr = NULL; - result = TCL_ERROR; + TRESULT = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); pc--; @@ -2824,18 +2831,18 @@ TclExecuteByteCode( "yield can only be called in a coroutine", TCL_STATIC); Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); - result = TCL_ERROR; + TRESULT = TCL_ERROR; pc--; goto checkForCatch; } NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); NRE_ASSERT(corPtr->stackLevel != NULL); - NRE_ASSERT(bottomPtr == corPtr->eePtr->bottomPtr); - if (corPtr->stackLevel != &bottomPtr) { + NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); + if (corPtr->stackLevel != &TAUX) { Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); - result = TCL_ERROR; + TRESULT = TCL_ERROR; pc--; goto checkForCatch; } @@ -2845,8 +2852,8 @@ TclExecuteByteCode( */ NR_DATA_BURY(); - esPtr->tosPtr = tosPtr; - iPtr->execEnvPtr->bottomPtr = bottomPtr; + TAUX.esPtr->tosPtr = tosPtr; + iPtr->execEnvPtr->bottomPtr = BP; return TCL_OK; } default: @@ -2871,7 +2878,7 @@ TclExecuteByteCode( if (catchTop != initCatchTop) { TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); iPtr->varFramePtr->tailcallPtr = NULL; - result = TCL_ERROR; + TRESULT = TCL_ERROR; Tcl_SetResult(interp,"Tailcall called from within a catch environment", TCL_STATIC); pc--; @@ -2881,11 +2888,11 @@ TclExecuteByteCode( } if (iPtr->execEnvPtr->rewind) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto abnormalReturn; } - if (result == TCL_OK) { + if (TRESULT == TCL_OK) { Tcl_Obj *objPtr; #ifndef TCL_COMPILE_DEBUG if (*pc == INST_POP) { @@ -3036,7 +3043,7 @@ TclExecuteByteCode( case INST_LOAD_SCALAR1: instLoadScalar1: opnd = TclGetUInt1AtPtr(pc+1); - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -3058,7 +3065,7 @@ TclExecuteByteCode( case INST_LOAD_SCALAR4: opnd = TclGetUInt4AtPtr(pc+1); - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -3090,7 +3097,7 @@ TclExecuteByteCode( doLoadArray: part1Ptr = NULL; part2Ptr = OBJ_AT_TOS; - arrayPtr = &(compiledLocals[opnd]); + arrayPtr = LOCAL(opnd); while (TclIsVarLink(arrayPtr)) { arrayPtr = arrayPtr->value.linkPtr; } @@ -3112,7 +3119,7 @@ TclExecuteByteCode( if (varPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } cleanup = 1; @@ -3152,7 +3159,7 @@ TclExecuteByteCode( goto doCallPtrGetVar; } else { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -3171,7 +3178,7 @@ TclExecuteByteCode( NEXT_INST_V(pcAdjustment, cleanup, 1); } else { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -3208,7 +3215,7 @@ TclExecuteByteCode( doStoreArrayDirect: valuePtr = OBJ_AT_TOS; part2Ptr = OBJ_UNDER_TOS; - arrayPtr = &(compiledLocals[opnd]); + arrayPtr = LOCAL(opnd); TRACE(("%u \"%.30s\" <- \"%.30s\" => ", opnd, O2S(part2Ptr), O2S(valuePtr))); while (TclIsVarLink(arrayPtr)) { @@ -3239,7 +3246,7 @@ TclExecuteByteCode( doStoreScalarDirect: valuePtr = OBJ_AT_TOS; - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); TRACE(("%u <- \"%.30s\" => ", opnd, O2S(valuePtr))); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; @@ -3331,7 +3338,7 @@ TclExecuteByteCode( goto doCallPtrSetVar; } else { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -3364,7 +3371,7 @@ TclExecuteByteCode( doStoreArray: valuePtr = OBJ_AT_TOS; part2Ptr = OBJ_UNDER_TOS; - arrayPtr = &(compiledLocals[opnd]); + arrayPtr = LOCAL(opnd); TRACE(("%u \"%.30s\" <- \"%.30s\" => ", opnd, O2S(part2Ptr), O2S(valuePtr))); while (TclIsVarLink(arrayPtr)) { @@ -3380,7 +3387,7 @@ TclExecuteByteCode( goto doCallPtrSetVar; } else { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -3412,7 +3419,7 @@ TclExecuteByteCode( doStoreScalar: valuePtr = OBJ_AT_TOS; - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); TRACE(("%u <- \"%.30s\" => ", opnd, O2S(valuePtr))); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; @@ -3436,7 +3443,7 @@ TclExecuteByteCode( NEXT_INST_V(pcAdjustment, cleanup, 1); } else { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -3517,7 +3524,7 @@ TclExecuteByteCode( Tcl_AddObjErrorInfo(interp, "\n (reading value of variable to increment)", -1); TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; Tcl_DecrRefCount(incrPtr); goto checkForCatch; } @@ -3532,7 +3539,7 @@ TclExecuteByteCode( doIncrArray: part1Ptr = NULL; part2Ptr = OBJ_AT_TOS; - arrayPtr = &(compiledLocals[opnd]); + arrayPtr = LOCAL(opnd); cleanup = 1; while (TclIsVarLink(arrayPtr)) { arrayPtr = arrayPtr->value.linkPtr; @@ -3544,7 +3551,7 @@ TclExecuteByteCode( goto doIncrVar; } else { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; Tcl_DecrRefCount(incrPtr); goto checkForCatch; } @@ -3554,7 +3561,7 @@ TclExecuteByteCode( i = TclGetInt1AtPtr(pc+2); pcAdjustment = 3; cleanup = 0; - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -3655,9 +3662,9 @@ TclExecuteByteCode( objResultPtr = objPtr; } TclNewLongObj(incrPtr, i); - result = TclIncrObj(interp, objResultPtr, incrPtr); + TRESULT = TclIncrObj(interp, objResultPtr, incrPtr); Tcl_DecrRefCount(incrPtr); - if (result == TCL_OK) { + if (TRESULT == TCL_OK) { goto doneIncr; } else { TRACE_APPEND(("ERROR: %.30s\n", @@ -3674,7 +3681,7 @@ TclExecuteByteCode( Tcl_IncrRefCount(incrPtr); doIncrScalar: - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -3694,9 +3701,9 @@ TclExecuteByteCode( } else { objResultPtr = objPtr; } - result = TclIncrObj(interp, objResultPtr, incrPtr); + TRESULT = TclIncrObj(interp, objResultPtr, incrPtr); Tcl_DecrRefCount(incrPtr); - if (result == TCL_OK) { + if (TRESULT == TCL_OK) { goto doneIncr; } else { TRACE_APPEND(("ERROR: %.30s\n", @@ -3712,7 +3719,7 @@ TclExecuteByteCode( if (objResultPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -3742,7 +3749,7 @@ TclExecuteByteCode( case INST_EXIST_SCALAR: { int opnd = TclGetUInt4AtPtr(pc+1); - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -3762,7 +3769,7 @@ TclExecuteByteCode( * Tricky! Arrays always exist. */ - objResultPtr = constants[!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1]; + objResultPtr = TCONST(!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1); TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_F(5, 0, 1); } @@ -3771,7 +3778,7 @@ TclExecuteByteCode( int opnd = TclGetUInt4AtPtr(pc+1); part2Ptr = OBJ_AT_TOS; - arrayPtr = &(compiledLocals[opnd]); + arrayPtr = LOCAL(opnd); while (TclIsVarLink(arrayPtr)) { arrayPtr = arrayPtr->value.linkPtr; } @@ -3797,7 +3804,7 @@ TclExecuteByteCode( } } doneExistArray: - objResultPtr = constants[!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1]; + objResultPtr = TCONST(!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1); TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_F(5, 1, 1); } @@ -3830,7 +3837,7 @@ TclExecuteByteCode( varPtr = NULL; } } - objResultPtr = constants[!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1]; + objResultPtr = TCONST(!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1); TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_V(1, cleanup, 1); } @@ -3849,8 +3856,8 @@ TclExecuteByteCode( { CallFrame *framePtr, *savedFramePtr; - result = TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr); - if (result != -1) { + TRESULT = TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr); + if (TRESULT != -1) { /* * Locate the other variable. */ @@ -3862,11 +3869,11 @@ TclExecuteByteCode( /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); iPtr->varFramePtr = savedFramePtr; if (otherPtr) { - result = TCL_OK; + TRESULT = TCL_OK; goto doLinkVars; } } - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -3881,10 +3888,10 @@ TclExecuteByteCode( */ TclSetVarNamespaceVar(otherPtr); - result = TCL_OK; + TRESULT = TCL_OK; goto doLinkVars; } - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; case INST_NSUPVAR: @@ -3893,8 +3900,8 @@ TclExecuteByteCode( { Tcl_Namespace *nsPtr, *savedNsPtr; - result = TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr); - if (result == TCL_OK) { + TRESULT = TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr); + if (TRESULT == TCL_OK) { /* * Locate the other variable. */ @@ -3909,7 +3916,7 @@ TclExecuteByteCode( goto doLinkVars; } } - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -3922,7 +3929,7 @@ TclExecuteByteCode( */ opnd = TclGetInt4AtPtr(pc+1);; - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); if ((varPtr != otherPtr) && !TclIsVarTraced(varPtr) && (TclIsVarUndefined(varPtr) || TclIsVarLink(varPtr))) { if (!TclIsVarUndefined(varPtr)) { @@ -3948,8 +3955,8 @@ TclExecuteByteCode( VarHashRefCount(otherPtr)++; } } else { - result = TclPtrObjMakeUpvar(interp, otherPtr, NULL, 0, opnd); - if (result != TCL_OK) { + TRESULT = TclPtrObjMakeUpvar(interp, otherPtr, NULL, 0, opnd); + if (TRESULT != TCL_OK) { goto checkForCatch; } } @@ -4009,8 +4016,8 @@ TclExecuteByteCode( /* TODO - check claim that taking address of b harms performance */ /* TODO - consider optimization search for constants */ - result = TclGetBooleanFromObj(interp, valuePtr, &b); - if (result != TCL_OK) { + TRESULT = TclGetBooleanFromObj(interp, valuePtr, &b); + if (TRESULT != TCL_OK) { TRACE_WITH_OBJ(("%d => ERROR: ", jmpOffset[ ((*pc == INST_JUMP_FALSE1) || (*pc == INST_JUMP_FALSE4)) ? 0 : 1]), Tcl_GetObjResult(interp)); @@ -4081,16 +4088,16 @@ TclExecuteByteCode( Tcl_Obj *value2Ptr = OBJ_AT_TOS; Tcl_Obj *valuePtr = OBJ_UNDER_TOS; - result = TclGetBooleanFromObj(NULL, valuePtr, &i1); - if (result != TCL_OK) { + TRESULT = TclGetBooleanFromObj(NULL, valuePtr, &i1); + if (TRESULT != TCL_OK) { TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); goto checkForCatch; } - result = TclGetBooleanFromObj(NULL, value2Ptr, &i2); - if (result != TCL_OK) { + TRESULT = TclGetBooleanFromObj(NULL, value2Ptr, &i2); + if (TRESULT != TCL_OK) { TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(value2Ptr), (value2Ptr->typePtr? value2Ptr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, value2Ptr); @@ -4102,7 +4109,7 @@ TclExecuteByteCode( } else { iResult = (i1 && i2); } - objResultPtr = constants[iResult]; + objResultPtr = TCONST(iResult); TRACE(("%.20s %.20s => %d\n", O2S(valuePtr),O2S(value2Ptr),iResult)); NEXT_INST_F(1, 2, 1); } @@ -4132,8 +4139,8 @@ TclExecuteByteCode( valuePtr = OBJ_AT_TOS; - result = TclListObjLength(interp, valuePtr, &length); - if (result == TCL_OK) { + TRESULT = TclListObjLength(interp, valuePtr, &length); + if (TRESULT == TCL_OK) { TclNewIntObj(objResultPtr, length); TRACE(("%.20s => %d\n", O2S(valuePtr), length)); NEXT_INST_F(1, 1, 1); @@ -4164,8 +4171,8 @@ TclExecuteByteCode( * Extract the desired list element. */ - result = TclListObjGetElements(interp, valuePtr, &listc, &listv); - if ((result == TCL_OK) && (value2Ptr->typePtr != &tclListType) + TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); + if ((TRESULT == TCL_OK) && (value2Ptr->typePtr != &tclListType) && (TclGetIntForIndexM(NULL , value2Ptr, listc-1, &idx) == TCL_OK)) { TclDecrRefCount(value2Ptr); @@ -4186,7 +4193,7 @@ TclExecuteByteCode( } else { TRACE_WITH_OBJ(("%.30s %.30s => ERROR: ", O2S(valuePtr), O2S(value2Ptr)), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -4207,9 +4214,9 @@ TclExecuteByteCode( * in the process. */ - result = TclListObjGetElements(interp, valuePtr, &listc, &listv); + TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); - if (result == TCL_OK) { + if (TRESULT == TCL_OK) { /* * Select the list item based on the index. Negative operand means * end-based indexing. @@ -4270,7 +4277,7 @@ TclExecuteByteCode( NEXT_INST_V(5, opnd, -1); } else { TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -4322,7 +4329,7 @@ TclExecuteByteCode( NEXT_INST_V(5, (numIdx+1), -1); } else { TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -4371,7 +4378,7 @@ TclExecuteByteCode( } else { TRACE_WITH_OBJ(("\"%.30s\" => ERROR: ", O2S(value2Ptr)), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -4394,14 +4401,14 @@ TclExecuteByteCode( * Get the contents of the list, making sure that it really is a list * in the process. */ - result = TclListObjGetElements(interp, valuePtr, &listc, &listv); + TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); /* * Skip a lot of work if we're about to throw the result away (common * with uses of [lassign]). */ - if (result == TCL_OK) { + if (TRESULT == TCL_OK) { #ifndef TCL_COMPILE_DEBUG if (*(pc+9) == INST_POP) { NEXT_INST_F(10, 1, 0); @@ -4472,8 +4479,8 @@ TclExecuteByteCode( /* TODO: Consider more efficient tests than strcmp() */ s1 = TclGetStringFromObj(valuePtr, &s1len); - result = TclListObjLength(interp, value2Ptr, &llen); - if (result != TCL_OK) { + TRESULT = TclListObjLength(interp, value2Ptr, &llen); + if (TRESULT != TCL_OK) { TRACE_WITH_OBJ(("\"%.30s\" \"%.30s\" => ERROR: ", O2S(valuePtr), O2S(value2Ptr)), Tcl_GetObjResult(interp)); goto checkForCatch; @@ -4524,7 +4531,7 @@ TclExecuteByteCode( NEXT_INST_F((found ? TclGetInt4AtPtr(pc+1) : 5), 2, 0); } #endif - objResultPtr = constants[found]; + objResultPtr = TCONST(found); NEXT_INST_F(0, 2, 1); } @@ -4595,7 +4602,7 @@ TclExecuteByteCode( NEXT_INST_F((iResult? TclGetInt4AtPtr(pc+1) : 5), 2, 0); } #endif - objResultPtr = constants[iResult]; + objResultPtr = TCONST(iResult); NEXT_INST_F(0, 2, 1); } @@ -4700,7 +4707,7 @@ TclExecuteByteCode( TclNewIntObj(objResultPtr, -1); TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), -1)); } else { - objResultPtr = constants[(iResult>0)]; + objResultPtr = TCONST(iResult>0); TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), (iResult > 0))); } @@ -4735,8 +4742,8 @@ TclExecuteByteCode( * Get char length to calulate what 'end' means. */ length = Tcl_GetCharLength(valuePtr); - result = TclGetIntForIndexM(interp, value2Ptr, length - 1, &index); - if (result != TCL_OK) { + TRESULT = TclGetIntForIndexM(interp, value2Ptr, length - 1, &index); + if (TRESULT != TCL_OK) { goto checkForCatch; } @@ -4812,7 +4819,7 @@ TclExecuteByteCode( */ TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match)); - objResultPtr = constants[match]; + objResultPtr = TCONST(match); NEXT_INST_F(2, 2, 1); } @@ -4840,12 +4847,12 @@ TclExecuteByteCode( objResultPtr = Tcl_GetObjResult(interp); TRACE_WITH_OBJ(("%.20s %.20s => ERROR: ", O2S(valuePtr), O2S(value2Ptr)), objResultPtr); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } else { TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match)); - objResultPtr = constants[match]; + objResultPtr = TCONST(match); NEXT_INST_F(2, 2, 1); } } @@ -5163,7 +5170,7 @@ TclExecuteByteCode( NEXT_INST_F((iResult? TclGetInt4AtPtr(pc+1) : 5), 2, 0); } #endif - objResultPtr = constants[iResult]; + objResultPtr = TCONST(iResult); NEXT_INST_F(0, 2, 1); } @@ -5176,10 +5183,10 @@ TclExecuteByteCode( int invalid, shift, type1, type2; long l1 = 0; - result = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((result != TCL_OK) || (type1 == TCL_NUMBER_DOUBLE) + TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); + if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_DOUBLE) || (type1 == TCL_NUMBER_NAN)) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); @@ -5187,10 +5194,10 @@ TclExecuteByteCode( goto checkForCatch; } - result = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - if ((result != TCL_OK) || (type2 == TCL_NUMBER_DOUBLE) + TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); + if ((TRESULT != TCL_OK) || (type2 == TCL_NUMBER_DOUBLE) || (type2 == TCL_NUMBER_NAN)) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (value2Ptr->typePtr? value2Ptr->typePtr->name : "null"))); @@ -5215,7 +5222,7 @@ TclExecuteByteCode( * Div. by |1| always yields remainder of 0. */ - objResultPtr = constants[0]; + objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } @@ -5227,7 +5234,7 @@ TclExecuteByteCode( * 0 % (non-zero) always yields remainder of 0. */ - objResultPtr = constants[0]; + objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } @@ -5429,7 +5436,7 @@ TclExecuteByteCode( } if (invalid) { Tcl_SetResult(interp, "negative shift argument", TCL_STATIC); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -5439,7 +5446,7 @@ TclExecuteByteCode( if ((type1==TCL_NUMBER_LONG) && (*((const long *)ptr1) == (long)0)) { TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - objResultPtr = constants[0]; + objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } @@ -5463,7 +5470,7 @@ TclExecuteByteCode( */ Tcl_SetResult(interp, "integer value too large to represent", TCL_STATIC); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } shift = (int)(*((const long *)ptr2)); @@ -5540,7 +5547,7 @@ TclExecuteByteCode( zero = 0; } if (zero) { - objResultPtr = constants[0]; + objResultPtr = TCONST(0); } else { TclNewIntObj(objResultPtr, -1); } @@ -5557,7 +5564,7 @@ TclExecuteByteCode( l1 = *((const long *)ptr1); if ((size_t)shift >= CHAR_BIT*sizeof(long)) { if (l1 >= (long)0) { - objResultPtr = constants[0]; + objResultPtr = TCONST(0); } else { TclNewIntObj(objResultPtr, -1); } @@ -5578,7 +5585,7 @@ TclExecuteByteCode( if ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideInt)) { if (w >= (Tcl_WideInt)0) { - objResultPtr = constants[0]; + objResultPtr = TCONST(0); } else { TclNewIntObj(objResultPtr, -1); } @@ -5632,21 +5639,21 @@ TclExecuteByteCode( Tcl_Obj *value2Ptr = OBJ_AT_TOS; Tcl_Obj *valuePtr = OBJ_UNDER_TOS; - result = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((result != TCL_OK) + TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); + if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_NAN) || (type1 == TCL_NUMBER_DOUBLE)) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); goto checkForCatch; } - result = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - if ((result != TCL_OK) || (type2 == TCL_NUMBER_NAN) + TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); + if ((TRESULT != TCL_OK) || (type2 == TCL_NUMBER_NAN) || (type2 == TCL_NUMBER_DOUBLE)) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (value2Ptr->typePtr? value2Ptr->typePtr->name : "null"))); @@ -5878,13 +5885,13 @@ TclExecuteByteCode( Tcl_Obj *value2Ptr = OBJ_AT_TOS; Tcl_Obj *valuePtr = OBJ_UNDER_TOS; - result = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((result != TCL_OK) + TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); + if ((TRESULT != TCL_OK) #ifndef ACCEPT_NAN || (type1 == TCL_NUMBER_NAN) #endif ) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(value2Ptr), O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name: "null"))); @@ -5902,13 +5909,13 @@ TclExecuteByteCode( } #endif - result = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - if ((result != TCL_OK) + TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); + if ((TRESULT != TCL_OK) #ifndef ACCEPT_NAN || (type2 == TCL_NUMBER_NAN) #endif ) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(value2Ptr), O2S(valuePtr), (value2Ptr->typePtr? value2Ptr->typePtr->name: "null"))); @@ -5984,7 +5991,7 @@ TclExecuteByteCode( TRACE(("%.20s %.20s => IEEE FLOATING PT ERROR\n", O2S(valuePtr), O2S(value2Ptr))); TclExprFloatError(interp, dResult); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } #endif @@ -6054,7 +6061,7 @@ TclExecuteByteCode( * Anything to the zero power is 1. */ - objResultPtr = constants[1]; + objResultPtr = TCONST(1); NEXT_INST_F(1, 2, 1); } else if (l2 == 1) { /* @@ -6109,7 +6116,7 @@ TclExecuteByteCode( if (oddExponent) { TclNewIntObj(objResultPtr, -1); } else { - objResultPtr = constants[1]; + objResultPtr = TCONST(1); } NEXT_INST_F(1, 2, 1); case 1: @@ -6117,7 +6124,7 @@ TclExecuteByteCode( * 1 to any power is 1. */ - objResultPtr = constants[1]; + objResultPtr = TCONST(1); NEXT_INST_F(1, 2, 1); } } @@ -6127,7 +6134,7 @@ TclExecuteByteCode( * power yield the answer zero (see TIP 123). */ - objResultPtr = constants[0]; + objResultPtr = TCONST(0); NEXT_INST_F(1, 2, 1); } @@ -6138,20 +6145,20 @@ TclExecuteByteCode( * Zero to a positive power is zero. */ - objResultPtr = constants[0]; + objResultPtr = TCONST(0); NEXT_INST_F(1, 2, 1); case 1: /* * 1 to any power is 1. */ - objResultPtr = constants[1]; + objResultPtr = TCONST(1); NEXT_INST_F(1, 2, 1); case -1: if (oddExponent) { TclNewIntObj(objResultPtr, -1); } else { - objResultPtr = constants[1]; + objResultPtr = TCONST(1); } NEXT_INST_F(1, 2, 1); } @@ -6167,7 +6174,7 @@ TclExecuteByteCode( */ if (type2 != TCL_NUMBER_LONG) { Tcl_SetResult(interp, "exponent too large", TCL_STATIC); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -6606,7 +6613,7 @@ TclExecuteByteCode( mp_clear(&big1); mp_clear(&big2); mp_clear(&bigResult); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } mp_expt_d(&big1, big2.dp[0], &bigResult); @@ -6631,15 +6638,15 @@ TclExecuteByteCode( /* TODO - check claim that taking address of b harms performance */ /* TODO - consider optimization search for constants */ - result = TclGetBooleanFromObj(NULL, valuePtr, &b); - if (result != TCL_OK) { + TRESULT = TclGetBooleanFromObj(NULL, valuePtr, &b); + if (TRESULT != TCL_OK) { TRACE(("\"%.20s\" => ILLEGAL TYPE %s\n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); goto checkForCatch; } /* TODO: Consider peephole opt. */ - objResultPtr = constants[!b]; + objResultPtr = TCONST(!b); NEXT_INST_F(1, 1, 1); } @@ -6649,14 +6656,14 @@ TclExecuteByteCode( int type; Tcl_Obj *valuePtr = OBJ_AT_TOS; - result = GetNumberFromObj(NULL, valuePtr, &ptr, &type); - if ((result != TCL_OK) + TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr, &type); + if ((TRESULT != TCL_OK) || (type == TCL_NUMBER_NAN) || (type == TCL_NUMBER_DOUBLE)) { /* * ... ~$NonInteger => raise an error. */ - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); @@ -6701,13 +6708,13 @@ TclExecuteByteCode( int type; Tcl_Obj *valuePtr = OBJ_AT_TOS; - result = GetNumberFromObj(NULL, valuePtr, &ptr, &type); - if ((result != TCL_OK) + TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr, &type); + if ((TRESULT != TCL_OK) #ifndef ACCEPT_NAN || (type == TCL_NUMBER_NAN) #endif ) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); @@ -6806,7 +6813,7 @@ TclExecuteByteCode( * ... +$NonNumeric => raise an error. */ - result = TCL_ERROR; + TRESULT = TCL_ERROR; TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name:"null"))); IllegalExprOperandType(interp, pc, valuePtr); @@ -6819,7 +6826,7 @@ TclExecuteByteCode( } #ifndef ACCEPT_NAN if (type == TCL_NUMBER_NAN) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; if (*pc == INST_UPLUS) { /* * ... +$NonNumeric => raise an error. @@ -6880,7 +6887,7 @@ TclExecuteByteCode( Tcl_ResetResult(interp); CACHE_STACK_INFO(); */ - result = TCL_BREAK; + TRESULT = TCL_BREAK; cleanup = 0; goto processExceptionReturn; @@ -6890,7 +6897,7 @@ TclExecuteByteCode( Tcl_ResetResult(interp); CACHE_STACK_INFO(); */ - result = TCL_CONTINUE; + TRESULT = TCL_CONTINUE; cleanup = 0; goto processExceptionReturn; @@ -6908,7 +6915,7 @@ TclExecuteByteCode( opnd = TclGetUInt4AtPtr(pc+1); infoPtr = (ForeachInfo *) codePtr->auxDataArrayPtr[opnd].clientData; iterTmpIndex = infoPtr->loopCtTemp; - iterVarPtr = &(compiledLocals[iterTmpIndex]); + iterVarPtr = LOCAL(iterTmpIndex); oldValuePtr = iterVarPtr->value.objPtr; if (oldValuePtr == NULL) { @@ -6955,7 +6962,7 @@ TclExecuteByteCode( * Increment the temp holding the loop iteration number. */ - iterVarPtr = &(compiledLocals[infoPtr->loopCtTemp]); + iterVarPtr = LOCAL(infoPtr->loopCtTemp); valuePtr = iterVarPtr->value.objPtr; iterNum = (valuePtr->internalRep.longValue + 1); TclSetLongObj(valuePtr, iterNum); @@ -6971,10 +6978,10 @@ TclExecuteByteCode( varListPtr = infoPtr->varLists[i]; numVars = varListPtr->numVars; - listVarPtr = &(compiledLocals[listTmpIndex]); + listVarPtr = LOCAL(listTmpIndex); listPtr = listVarPtr->value.objPtr; - result = TclListObjLength(interp, listPtr, &listLen); - if (result == TCL_OK) { + TRESULT = TclListObjLength(interp, listPtr, &listLen); + if (TRESULT == TCL_OK) { if (listLen > (iterNum * numVars)) { continueLoop = 1; } @@ -7001,7 +7008,7 @@ TclExecuteByteCode( varListPtr = infoPtr->varLists[i]; numVars = varListPtr->numVars; - listVarPtr = &(compiledLocals[listTmpIndex]); + listVarPtr = LOCAL(listTmpIndex); listPtr = TclListObjCopy(NULL, listVarPtr->value.objPtr); TclListObjGetElements(interp, listPtr, &listLen, &elements); @@ -7014,7 +7021,7 @@ TclExecuteByteCode( } varIndex = varListPtr->varIndexes[j]; - varPtr = &(compiledLocals[varIndex]); + varPtr = LOCAL(varIndex); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -7036,7 +7043,7 @@ TclExecuteByteCode( TRACE_WITH_OBJ(( "%u => ERROR init. index temp %d: ", opnd,varIndex), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; TclDecrRefCount(listPtr); goto checkForCatch; } @@ -7080,7 +7087,7 @@ TclExecuteByteCode( case INST_END_CATCH: catchTop--; Tcl_ResetResult(interp); - result = TCL_OK; + TRESULT = TCL_OK; TRACE(("=> catchTop=%d\n", (int) (catchTop - initCatchTop - 1))); NEXT_INST_F(1, 0, 0); @@ -7102,12 +7109,12 @@ TclExecuteByteCode( NEXT_INST_F(1, 0, -1); case INST_PUSH_RETURN_CODE: - TclNewIntObj(objResultPtr, result); - TRACE(("=> %u\n", result)); + TclNewIntObj(objResultPtr, TRESULT); + TRACE(("=> %u\n", TRESULT)); NEXT_INST_F(1, 0, 1); case INST_PUSH_RETURN_OPTIONS: - objResultPtr = Tcl_GetReturnOptions(interp, result); + objResultPtr = Tcl_GetReturnOptions(interp, TRESULT); TRACE_WITH_OBJ(("=> "), objResultPtr); NEXT_INST_F(1, 0, 1); @@ -7144,16 +7151,16 @@ TclExecuteByteCode( "%u => ERROR tracing dictionary path into \"%s\": ", opnd, O2S(OBJ_AT_DEPTH(opnd))), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } - result = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &objResultPtr); - if ((result == TCL_OK) && objResultPtr) { + TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &objResultPtr); + if ((TRESULT == TCL_OK) && objResultPtr) { TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_V(5, opnd+1, 1); } - if (result != TCL_OK) { + if (TRESULT != TCL_OK) { TRACE_WITH_OBJ(( "%u => ERROR reading leaf dictionary key \"%s\": ", opnd, O2S(dictPtr)), Tcl_GetObjResult(interp)); @@ -7162,7 +7169,7 @@ TclExecuteByteCode( Tcl_AppendResult(interp, "key \"", TclGetString(OBJ_AT_TOS), "\" not known in dictionary", NULL); TRACE_WITH_OBJ(("%u => ERROR ", opnd), Tcl_GetObjResult(interp)); - result = TCL_ERROR; + TRESULT = TCL_ERROR; } goto checkForCatch; @@ -7172,7 +7179,7 @@ TclExecuteByteCode( opnd = TclGetUInt4AtPtr(pc+1); opnd2 = TclGetUInt4AtPtr(pc+5); - varPtr = &(compiledLocals[opnd2]); + varPtr = LOCAL(opnd2); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -7197,14 +7204,14 @@ TclExecuteByteCode( switch (*pc) { case INST_DICT_SET: cleanup = opnd + 1; - result = Tcl_DictObjPutKeyList(interp, dictPtr, opnd, + TRESULT = Tcl_DictObjPutKeyList(interp, dictPtr, opnd, &OBJ_AT_DEPTH(opnd), OBJ_AT_TOS); break; case INST_DICT_INCR_IMM: cleanup = 1; opnd = TclGetInt4AtPtr(pc+1); - result = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &valPtr); - if (result != TCL_OK) { + TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &valPtr); + if (TRESULT != TCL_OK) { break; } if (valPtr == NULL) { @@ -7217,8 +7224,8 @@ TclExecuteByteCode( valPtr = Tcl_DuplicateObj(valPtr); Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS, valPtr); } - result = TclIncrObj(interp, valPtr, incrPtr); - if (result == TCL_OK) { + TRESULT = TclIncrObj(interp, valPtr, incrPtr); + if (TRESULT == TCL_OK) { Tcl_InvalidateStringRep(dictPtr); } TclDecrRefCount(incrPtr); @@ -7226,7 +7233,7 @@ TclExecuteByteCode( break; case INST_DICT_UNSET: cleanup = opnd; - result = Tcl_DictObjRemoveKeyList(interp, dictPtr, opnd, + TRESULT = Tcl_DictObjRemoveKeyList(interp, dictPtr, opnd, &OBJ_AT_DEPTH(opnd-1)); break; default: @@ -7234,7 +7241,7 @@ TclExecuteByteCode( Tcl_Panic("Should not happen!"); } - if (result != TCL_OK) { + if (TRESULT != TCL_OK) { if (allocateDict) { TclDecrRefCount(dictPtr); } @@ -7264,7 +7271,7 @@ TclExecuteByteCode( if (objResultPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -7280,7 +7287,7 @@ TclExecuteByteCode( case INST_DICT_LAPPEND: opnd = TclGetUInt4AtPtr(pc+1); - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -7302,8 +7309,8 @@ TclExecuteByteCode( } } - result = Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, &valPtr); - if (result != TCL_OK) { + TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, &valPtr); + if (TRESULT != TCL_OK) { if (allocateDict) { TclDecrRefCount(dictPtr); } @@ -7336,8 +7343,8 @@ TclExecuteByteCode( valPtr = Tcl_NewListObj(1, &OBJ_AT_TOS); } else if (Tcl_IsShared(valPtr)) { valPtr = Tcl_DuplicateObj(valPtr); - result = Tcl_ListObjAppendElement(interp, valPtr, OBJ_AT_TOS); - if (result != TCL_OK) { + TRESULT = Tcl_ListObjAppendElement(interp, valPtr, OBJ_AT_TOS); + if (TRESULT != TCL_OK) { TclDecrRefCount(valPtr); if (allocateDict) { TclDecrRefCount(dictPtr); @@ -7345,8 +7352,8 @@ TclExecuteByteCode( goto checkForCatch; } } else { - result = Tcl_ListObjAppendElement(interp, valPtr, OBJ_AT_TOS); - if (result != TCL_OK) { + TRESULT = Tcl_ListObjAppendElement(interp, valPtr, OBJ_AT_TOS); + if (TRESULT != TCL_OK) { if (allocateDict) { TclDecrRefCount(dictPtr); } @@ -7381,7 +7388,7 @@ TclExecuteByteCode( if (objResultPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -7405,9 +7412,9 @@ TclExecuteByteCode( TRACE(("%u => ", opnd)); dictPtr = POP_OBJECT(); searchPtr = (Tcl_DictSearch *) ckalloc(sizeof(Tcl_DictSearch)); - result = Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr, + TRESULT = Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr, &valuePtr, &done); - if (result != TCL_OK) { + if (TRESULT != TCL_OK) { ckfree((char *) searchPtr); goto checkForCatch; } @@ -7415,7 +7422,7 @@ TclExecuteByteCode( statePtr->typePtr = &dictIteratorType; statePtr->internalRep.twoPtrValue.ptr1 = (void *) searchPtr; statePtr->internalRep.twoPtrValue.ptr2 = (void *) dictPtr; - varPtr = (compiledLocals + opnd); + varPtr = LOCAL(opnd);// if (varPtr->value.objPtr) { if (varPtr->value.objPtr->typePtr != &dictIteratorType) { TclDecrRefCount(varPtr->value.objPtr); @@ -7430,7 +7437,7 @@ TclExecuteByteCode( case INST_DICT_NEXT: opnd = TclGetUInt4AtPtr(pc+1); TRACE(("%u => ", opnd)); - statePtr = compiledLocals[opnd].value.objPtr; + statePtr = (*LOCAL(opnd)).value.objPtr; if (statePtr == NULL || statePtr->typePtr != &dictIteratorType) { Tcl_Panic("mis-issued dictNext!"); } @@ -7447,14 +7454,14 @@ TclExecuteByteCode( } TRACE_APPEND(("\"%.30s\" \"%.30s\" %d", O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), done)); - objResultPtr = constants[done]; + objResultPtr = TCONST(done); /* TODO: consider opt like INST_FOREACH_STEP4 */ NEXT_INST_F(5, 0, 1); case INST_DICT_DONE: opnd = TclGetUInt4AtPtr(pc+1); TRACE(("%u => ", opnd)); - statePtr = compiledLocals[opnd].value.objPtr; + statePtr = (*LOCAL(opnd)).value.objPtr; if (statePtr == NULL) { Tcl_Panic("mis-issued dictDone!"); } @@ -7480,7 +7487,7 @@ TclExecuteByteCode( TclDecrRefCount(statePtr); TclNewObj(emptyPtr); - compiledLocals[opnd].value.objPtr = emptyPtr; + (*LOCAL(opnd)).value.objPtr = emptyPtr; Tcl_IncrRefCount(emptyPtr); } NEXT_INST_F(5, 0, 0); @@ -7495,7 +7502,7 @@ TclExecuteByteCode( case INST_DICT_UPDATE_START: opnd = TclGetUInt4AtPtr(pc+1); opnd2 = TclGetUInt4AtPtr(pc+5); - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); duiPtr = codePtr->auxDataArrayPtr[opnd2].clientData; while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; @@ -7526,7 +7533,7 @@ TclExecuteByteCode( &valPtr) != TCL_OK) { goto dictUpdateStartFailed; } - varPtr = &(compiledLocals[duiPtr->varIndices[i]]); + varPtr = LOCAL(duiPtr->varIndices[i]); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } @@ -7540,7 +7547,7 @@ TclExecuteByteCode( duiPtr->varIndices[i]) == NULL) { CACHE_STACK_INFO(); dictUpdateStartFailed: - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } CACHE_STACK_INFO(); @@ -7550,7 +7557,7 @@ TclExecuteByteCode( case INST_DICT_UPDATE_END: opnd = TclGetUInt4AtPtr(pc+1); opnd2 = TclGetUInt4AtPtr(pc+5); - varPtr = &(compiledLocals[opnd]); + varPtr = LOCAL(opnd); duiPtr = codePtr->auxDataArrayPtr[opnd2].clientData; while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; @@ -7569,7 +7576,7 @@ TclExecuteByteCode( if (Tcl_DictObjSize(interp, dictPtr, &length) != TCL_OK || TclListObjGetElements(interp, OBJ_AT_TOS, &length, &keyPtrPtr) != TCL_OK) { - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } allocdict = Tcl_IsShared(dictPtr); @@ -7580,7 +7587,7 @@ TclExecuteByteCode( Tcl_Obj *valPtr; Var *var2Ptr; - var2Ptr = &(compiledLocals[duiPtr->varIndices[i]]); + var2Ptr = LOCAL(duiPtr->varIndices[i]); while (TclIsVarLink(var2Ptr)) { var2Ptr = var2Ptr->value.linkPtr; } @@ -7614,7 +7621,7 @@ TclExecuteByteCode( if (allocdict) { TclDecrRefCount(dictPtr); } - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; } } @@ -7634,7 +7641,7 @@ TclExecuteByteCode( Tcl_SetResult(interp, "divide by zero", TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", NULL); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; /* @@ -7646,7 +7653,7 @@ TclExecuteByteCode( Tcl_SetResult(interp, "exponentiation of zero by negative power", TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", "exponentiation of zero by negative power", NULL); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto checkForCatch; /* @@ -7695,52 +7702,52 @@ TclExecuteByteCode( TRACE(("=> ")); } #endif - if ((result == TCL_CONTINUE) || (result == TCL_BREAK)) { + if ((TRESULT == TCL_CONTINUE) || (TRESULT == TCL_BREAK)) { rangePtr = GetExceptRangeForPc(pc, /*catchOnly*/ 0, codePtr); if (rangePtr == NULL) { TRACE_APPEND(("no encl. loop or catch, returning %s\n", - StringForResultCode(result))); + StringForResultCode(TRESULT))); goto abnormalReturn; } if (rangePtr->type == CATCH_EXCEPTION_RANGE) { - TRACE_APPEND(("%s ...\n", StringForResultCode(result))); + TRACE_APPEND(("%s ...\n", StringForResultCode(TRESULT))); goto processCatch; } while (cleanup--) { valuePtr = POP_OBJECT(); TclDecrRefCount(valuePtr); } - if (result == TCL_BREAK) { - result = TCL_OK; + if (TRESULT == TCL_BREAK) { + TRESULT = TCL_OK; pc = (codePtr->codeStart + rangePtr->breakOffset); TRACE_APPEND(("%s, range at %d, new pc %d\n", - StringForResultCode(result), + StringForResultCode(TRESULT), rangePtr->codeOffset, rangePtr->breakOffset)); NEXT_INST_F(0, 0, 0); } else { if (rangePtr->continueOffset == -1) { TRACE_APPEND(( "%s, loop w/o continue, checking for catch\n", - StringForResultCode(result))); + StringForResultCode(TRESULT))); goto checkForCatch; } - result = TCL_OK; + TRESULT = TCL_OK; pc = (codePtr->codeStart + rangePtr->continueOffset); TRACE_APPEND(("%s, range at %d, new pc %d\n", - StringForResultCode(result), + StringForResultCode(TRESULT), rangePtr->codeOffset, rangePtr->continueOffset)); NEXT_INST_F(0, 0, 0); } #if TCL_COMPILE_DEBUG } else if (traceInstructions) { - if ((result != TCL_ERROR) && (result != TCL_RETURN)) { + if ((TRESULT != TCL_ERROR) && (TRESULT != TCL_RETURN)) { Tcl_Obj *objPtr = Tcl_GetObjResult(interp); TRACE_APPEND(("OTHER RETURN CODE %d, result= \"%s\"\n ", - result, O2S(objPtr))); + TRESULT, O2S(objPtr))); } else { Tcl_Obj *objPtr = Tcl_GetObjResult(interp); TRACE_APPEND(("%s, result= \"%s\"\n", - StringForResultCode(result), O2S(objPtr))); + StringForResultCode(TRESULT), O2S(objPtr))); } #endif } @@ -7757,7 +7764,7 @@ TclExecuteByteCode( if (iPtr->execEnvPtr->rewind) { goto abnormalReturn; } - if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { + if ((TRESULT == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { bytes = GetSrcInfoForPc(pc, codePtr, &length); if (bytes != NULL) { DECACHE_STACK_INFO(); @@ -7778,7 +7785,7 @@ TclExecuteByteCode( (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1)) { break; } - POP_AUX_OBJ(); + POP_TAUX_OBJ(); } /* @@ -7793,7 +7800,7 @@ TclExecuteByteCode( #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " ... cancel with unwind, returning %s\n", - StringForResultCode(result)); + StringForResultCode(TRESULT)); } #endif goto abnormalReturn; @@ -7809,7 +7816,7 @@ TclExecuteByteCode( #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " ... limit exceeded, returning %s\n", - StringForResultCode(result)); + StringForResultCode(TRESULT)); } #endif goto abnormalReturn; @@ -7818,7 +7825,7 @@ TclExecuteByteCode( #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " ... no enclosing catch, returning %s\n", - StringForResultCode(result)); + StringForResultCode(TRESULT)); } #endif goto abnormalReturn; @@ -7834,7 +7841,7 @@ TclExecuteByteCode( #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " ... no enclosing catch, returning %s\n", - StringForResultCode(result)); + StringForResultCode(TRESULT)); } #endif goto abnormalReturn; @@ -7881,10 +7888,10 @@ TclExecuteByteCode( * Winding down: insure that all pending cleanups are done before * dropping out of this bytecode. */ - if (TOP_CB(interp) != bottomPtr->rootPtr) { - result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); + if (TOP_CB(interp) != BP->rootPtr) { + TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); - if (TOP_CB(interp) != bottomPtr->rootPtr) { + if (TOP_CB(interp) != BP->rootPtr) { Tcl_Panic("Abnormal return with busy callback stack"); } } @@ -7897,7 +7904,7 @@ TclExecuteByteCode( */ while (auxObjList) { - POP_AUX_OBJ(); + POP_TAUX_OBJ(); } while (tosPtr > initTosPtr) { Tcl_Obj *objPtr = POP_OBJECT(); @@ -7916,39 +7923,35 @@ TclExecuteByteCode( CLANG_ASSERT(bcFramePtr); } - oldBottomPtr = bottomPtr->prevBottomPtr; + OBP = BP->prevBottomPtr; iPtr->cmdFramePtr = bcFramePtr->nextPtr; - TclStackFree(interp, bottomPtr); /* free my stack */ + TclStackFree(interp, BP); /* free my stack */ if (--codePtr->refCount <= 0) { TclCleanupByteCode(codePtr); } returnToCaller: - if (oldBottomPtr) { + if (OBP) { /* * Restore the state to what it was previous to this bytecode, deal * with tailcalls. */ - bottomPtr = oldBottomPtr; /* back to old bc */ + BP = OBP; /* back to old bc */ rerunCallbacks: - result = TclNRRunCallbacks(interp, result, bottomPtr->rootPtr, 1); + TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); NR_DATA_DIG(); - if (TOP_CB(interp) == bottomPtr->rootPtr) { + if (TOP_CB(interp) == BP->rootPtr) { /* * The bytecode is returning, all callbacks were run. Remove the * caller's arguments and keep processing the caller. */ - bcFramePtr = (CmdFrame *) (bottomPtr + 1); - initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1; - initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth); - esPtr = iPtr->execEnvPtr->execStackPtr; - - compiledLocals = iPtr->varFramePtr->compiledLocals; + TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; + TAUX.compiledLocals = iPtr->varFramePtr->compiledLocals; goto nonRecursiveCallReturn; } else { @@ -7956,7 +7959,7 @@ TclExecuteByteCode( int type = PTR2INT(callbackPtr->data[0]); NRE_ASSERT(TOP_CB(interp)->procPtr == NRCallTEBC); - NRE_ASSERT(result == TCL_OK); + NRE_ASSERT(TRESULT == TCL_OK); switch (type) { case TCL_NR_BC_TYPE: @@ -7973,7 +7976,7 @@ TclExecuteByteCode( Tcl_SetResult(interp, "atProcExit/tailcall cannot be invoked recursively", TCL_STATIC); - result = TCL_ERROR; + TRESULT = TCL_ERROR; goto rerunCallbacks; default: Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); @@ -7982,9 +7985,14 @@ TclExecuteByteCode( } iPtr->execEnvPtr->bottomPtr = NULL; - return result; + return TRESULT; } #undef iPtr +#undef bcFramePtr +#undef initCatchTop +#undef initTosPtr +#undef auxObjList +#undef catchTop #ifdef TCL_COMPILE_DEBUG /* -- cgit v0.12 From 4fcf95fb18b11889ef2fbd9ed8a4ae6a04756425 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 8 Dec 2009 13:58:04 +0000 Subject: Reduce size of TEBC activation record a bit. --- ChangeLog | 33 ++- generic/tclExecute.c | 755 ++++++++++++++++++++++++++------------------------- 2 files changed, 409 insertions(+), 379 deletions(-) diff --git a/ChangeLog b/ChangeLog index ced5349..53f0fd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,31 +1,38 @@ +2009-12-08 Donal K. Fellows + + * generic/tclExecute.c (TclExecuteByteCode): Make the dict opcodes + more sparing in their use of C variables, to reduce size of TEBC + activiation record a little bit. + 2009-12-07 Miguel Sofer - * generic/tclExecute.c (TEBC): Grouping "slow" variables into - structs, to reduce register pressure and help the compiler with - variable allocation. + * generic/tclExecute.c (TEBC): Grouping "slow" variables into structs, + to reduce register pressure and help the compiler with variable + allocation. 2009-12-07 Miguel Sofer * generic/tclExecute.c: Start cleaning the TEBC stables * generic/tclInt.h: - * generic/tclCmdIL.c: Fix of [Bug #2910094] by aku + * generic/tclCmdIL.c: [Bug 2910094]: Fix by aku * tests/coroutine.test: - * generic/tclBasic.c: arrange for [tailcall] to be created with - the other builtins: was being created in a separate call, leftover - from pre-tip days. + * generic/tclBasic.c: Arrange for [tailcall] to be created with the + other builtins: was being created in a separate call, leftover from + pre-tip days. 2009-12-07 Don Porter - * generic/tclStrToD.c: Correct conditional compile directives to - better detect the toolchain that needs extra work for proper underflow - treatment instead of merely detecting the mips platform. [Bug 2902010]. + * generic/tclStrToD.c: [Bug 2902010]: Correct conditional compile + directives to better detect the toolchain that needs extra work for + proper underflow treatment instead of merely detecting the MIPS + platform. 2009-12-07 Miguel Sofer - * generic/tclBasic.c: add ::tcl::unsupported::yieldTo - * generic/tclInt.h: [Patch 2910056] + * generic/tclBasic.c: [Patch 2910056]: Add ::tcl::unsupported::yieldTo + * generic/tclInt.h: 2009-12-07 Donal K. Fellows @@ -38,7 +45,7 @@ * generic/tclExecute.c: and coroutine code. * tests/coroutine.test: - * tests/tailcall.test: remove some old unused crud; improved the + * tests/tailcall.test: Remove some old unused crud; improved the stack depth tests. * generic/tclBasic.c: Fixed things so that you can tailcall diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 5835792..e552dad 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.452 2009/12/08 04:20:24 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.453 2009/12/08 13:58:04 dkf Exp $ */ #include "tclInt.h" @@ -165,7 +165,7 @@ static BuiltinFunc const tclBuiltinFuncTable[] = { #define LAST_BUILTIN_FUNC 25 #endif - + /* * NR_TEBC * Helpers for NR - non-recursive calls to TEBC @@ -174,43 +174,52 @@ static BuiltinFunc const tclBuiltinFuncTable[] = { typedef struct BottomData { struct BottomData *prevBottomPtr; - TEOV_callback *rootPtr; /* State when this bytecode execution began: */ - ByteCode *codePtr; /* constant until it returns */ - /* ------------------------------------------*/ - const unsigned char *pc; /* These fields are used on return TO this */ - ptrdiff_t *catchTop; /* this level: they record the state when a */ - int cleanup; /* new codePtr was received for NR execution */ - Tcl_Obj *auxObjList; + TEOV_callback *rootPtr; /* State when this bytecode execution + * began: */ + ByteCode *codePtr; /* constant until it returns */ + /* -----------------------------------------*/ + const unsigned char *pc; /* These fields are used on return TO this */ + ptrdiff_t *catchTop; /* this level: they record the state when a */ + int cleanup; /* new codePtr was received for NR */ + Tcl_Obj *auxObjList; /* execution. */ } BottomData; -#define NR_DATA_INIT() \ - BP->prevBottomPtr = OBP; \ - BP->rootPtr = TOP_CB(iPtr); \ - BP->codePtr = codePtr; \ - -#define NR_DATA_BURY() \ - BP->pc = pc; \ - BP->cleanup = cleanup; \ - OBP = BP - -#define NR_DATA_DIG() \ - pc = BP->pc; \ - codePtr = BP->codePtr; \ - cleanup = BP->cleanup; \ - TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; \ - tosPtr = TAUX.esPtr->tosPtr - -#define PUSH_TAUX_OBJ(objPtr) \ - objPtr->internalRep.twoPtrValue.ptr2 = auxObjList; \ - auxObjList = objPtr - -#define POP_TAUX_OBJ() \ - { \ +#define NR_DATA_INIT() \ + do { \ + BP->prevBottomPtr = OBP; \ + BP->rootPtr = TOP_CB(iPtr); \ + BP->codePtr = codePtr; \ + } while (0) + +#define NR_DATA_BURY() \ + do { \ + BP->pc = pc; \ + BP->cleanup = cleanup; \ + OBP = BP; \ + } while (0) + +#define NR_DATA_DIG() \ + do { \ + pc = BP->pc; \ + codePtr = BP->codePtr; \ + cleanup = BP->cleanup; \ + TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; \ + tosPtr = TAUX.esPtr->tosPtr; \ + } while (0) + +#define PUSH_TAUX_OBJ(objPtr) \ + do { \ + objPtr->internalRep.twoPtrValue.ptr2 = auxObjList; \ + auxObjList = objPtr; \ + } while (0) + +#define POP_TAUX_OBJ() \ + do { \ Tcl_Obj *tmpPtr = auxObjList; \ auxObjList = (Tcl_Obj *) tmpPtr->internalRep.twoPtrValue.ptr2; \ Tcl_DecrRefCount(tmpPtr); \ - } - + } while (0) + /* * These variable-access macros have to coincide with those in tclVar.c */ @@ -235,7 +244,7 @@ VarHashCreateVar( #define VarHashFindVar(tablePtr, key) \ VarHashCreateVar((tablePtr), (key), NULL) - + /* * The new macro for ending an instruction; note that a reasonable C-optimiser * will resolve all branches at compile time. (result) is always a constant; @@ -254,45 +263,49 @@ VarHashCreateVar( */ #define NEXT_INST_F(pcAdjustment, nCleanup, resultHandling) \ - TCL_CT_ASSERT((nCleanup >= 0) && (nCleanup <= 2)); \ - if (nCleanup == 0) { \ - if (resultHandling != 0) { \ - if ((resultHandling) > 0) { \ - PUSH_OBJECT(objResultPtr); \ - } else { \ - *(++tosPtr) = objResultPtr; \ - } \ - } \ - pc += (pcAdjustment); \ - goto cleanup0; \ - } else if (resultHandling != 0) { \ - if ((resultHandling) > 0) { \ - Tcl_IncrRefCount(objResultPtr); \ - } \ - pc += (pcAdjustment); \ - switch (nCleanup) { \ - case 1: goto cleanup1_pushObjResultPtr; \ - case 2: goto cleanup2_pushObjResultPtr; \ - }\ - } else {\ - pc += (pcAdjustment);\ - switch (nCleanup) {\ - case 1: goto cleanup1;\ - case 2: goto cleanup2;\ - }\ - } + do { \ + TCL_CT_ASSERT((nCleanup >= 0) && (nCleanup <= 2)); \ + if (nCleanup == 0) { \ + if (resultHandling != 0) { \ + if ((resultHandling) > 0) { \ + PUSH_OBJECT(objResultPtr); \ + } else { \ + *(++tosPtr) = objResultPtr; \ + } \ + } \ + pc += (pcAdjustment); \ + goto cleanup0; \ + } else if (resultHandling != 0) { \ + if ((resultHandling) > 0) { \ + Tcl_IncrRefCount(objResultPtr); \ + } \ + pc += (pcAdjustment); \ + switch (nCleanup) { \ + case 1: goto cleanup1_pushObjResultPtr; \ + case 2: goto cleanup2_pushObjResultPtr; \ + } \ + } else { \ + pc += (pcAdjustment); \ + switch (nCleanup) { \ + case 1: goto cleanup1; \ + case 2: goto cleanup2; \ + } \ + } \ + } while (0) #define NEXT_INST_V(pcAdjustment, nCleanup, resultHandling) \ - pc += (pcAdjustment);\ - cleanup = (nCleanup);\ - if (resultHandling) {\ - if ((resultHandling) > 0) {\ - Tcl_IncrRefCount(objResultPtr);\ - }\ - goto cleanupV_pushObjResultPtr;\ - } else {\ - goto cleanupV;\ - } + do { \ + pc += (pcAdjustment); \ + cleanup = (nCleanup); \ + if (resultHandling) { \ + if ((resultHandling) > 0) { \ + Tcl_IncrRefCount(objResultPtr); \ + } \ + goto cleanupV_pushObjResultPtr; \ + } else { \ + goto cleanupV; \ + } \ + } while (0) /* * Macros used to cache often-referenced Tcl evaluation stack information @@ -306,8 +319,10 @@ VarHashCreateVar( TAUX.checkInterp = 1 #define DECACHE_STACK_INFO() \ - TAUX.esPtr->tosPtr = tosPtr; \ - iPtr->execEnvPtr->bottomPtr = BP + do { \ + TAUX.esPtr->tosPtr = tosPtr; \ + iPtr->execEnvPtr->bottomPtr = BP; \ + } while (0) /* * Macros used to access items on the Tcl evaluation stack. PUSH_OBJECT @@ -345,26 +360,29 @@ VarHashCreateVar( #ifdef TCL_COMPILE_DEBUG # define TRACE(a) \ - if (traceInstructions) { \ - fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ - (int) CURR_DEPTH, \ - (unsigned)(pc - codePtr->codeStart), \ - GetOpcodeName(pc)); \ - printf a; \ + while (traceInstructions) { \ + fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ + (int) CURR_DEPTH, \ + (unsigned) (pc - codePtr->codeStart), \ + GetOpcodeName(pc)); \ + printf a; \ + break; \ } # define TRACE_APPEND(a) \ - if (traceInstructions) { \ - printf a; \ + while (traceInstructions) { \ + printf a; \ + break; \ } # define TRACE_WITH_OBJ(a, objPtr) \ - if (traceInstructions) { \ - fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ - (int) CURR_DEPTH, \ - (unsigned)(pc - codePtr->codeStart), \ - GetOpcodeName(pc)); \ - printf a; \ - TclPrintObject(stdout, objPtr, 30); \ - fprintf(stdout, "\n"); \ + while (traceInstructions) { \ + fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ + (int) CURR_DEPTH, \ + (unsigned) (pc - codePtr->codeStart), \ + GetOpcodeName(pc)); \ + printf a; \ + TclPrintObject(stdout, objPtr, 30); \ + fprintf(stdout, "\n"); \ + break; \ } # define O2S(objPtr) \ (objPtr ? TclGetString(objPtr) : "") @@ -380,25 +398,29 @@ VarHashCreateVar( */ #define TCL_DTRACE_INST_NEXT() \ - if (TCL_DTRACE_INST_DONE_ENABLED()) {\ - if (TAUX.curInstName) {\ - TCL_DTRACE_INST_DONE(TAUX.curInstName, (int) CURR_DEPTH,\ - tosPtr);\ - }\ - TAUX.curInstName = tclInstructionTable[*pc].name;\ - if (TCL_DTRACE_INST_START_ENABLED()) {\ - TCL_DTRACE_INST_START(TAUX.curInstName, (int) CURR_DEPTH,\ - tosPtr);\ - }\ - } else if (TCL_DTRACE_INST_START_ENABLED()) {\ - TCL_DTRACE_INST_START(tclInstructionTable[*pc].name,\ - (int) CURR_DEPTH, tosPtr);\ - } + do { \ + if (TCL_DTRACE_INST_DONE_ENABLED()) { \ + if (TAUX.curInstName) { \ + TCL_DTRACE_INST_DONE(TAUX.curInstName, (int) CURR_DEPTH, \ + tosPtr); \ + } \ + TAUX.curInstName = tclInstructionTable[*pc].name; \ + if (TCL_DTRACE_INST_START_ENABLED()) { \ + TCL_DTRACE_INST_START(TAUX.curInstName, (int) CURR_DEPTH, \ + tosPtr); \ + } \ + } else if (TCL_DTRACE_INST_START_ENABLED()) { \ + TCL_DTRACE_INST_START(tclInstructionTable[*pc].name, \ + (int) CURR_DEPTH, tosPtr); \ + } \ + } while (0) #define TCL_DTRACE_INST_LAST() \ - if (TCL_DTRACE_INST_DONE_ENABLED() && TAUX.curInstName) {\ - TCL_DTRACE_INST_DONE(TAUX.curInstName, (int) CURR_DEPTH, tosPtr);\ - } - + do { \ + if (TCL_DTRACE_INST_DONE_ENABLED() && TAUX.curInstName) { \ + TCL_DTRACE_INST_DONE(TAUX.curInstName, (int) CURR_DEPTH, tosPtr);\ + } \ + } while (0) + /* * Macro used in this file to save a function call for common uses of * TclGetNumberFromObj(). The ANSI C "prototype" is: @@ -408,8 +430,7 @@ VarHashCreateVar( */ #ifdef NO_WIDE_TYPE - -#define GetNumberFromObj(interp, objPtr, ptrPtr, tPtr) \ +#define GetNumberFromObj(interp, objPtr, ptrPtr, tPtr) \ (((objPtr)->typePtr == &tclIntType) \ ? (*(tPtr) = TCL_NUMBER_LONG, \ *(ptrPtr) = (ClientData) \ @@ -424,10 +445,8 @@ VarHashCreateVar( (((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \ ? TCL_ERROR : \ TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr))) - -#else - -#define GetNumberFromObj(interp, objPtr, ptrPtr, tPtr) \ +#else /* !NO_WIDE_TYPE */ +#define GetNumberFromObj(interp, objPtr, ptrPtr, tPtr) \ (((objPtr)->typePtr == &tclIntType) \ ? (*(tPtr) = TCL_NUMBER_LONG, \ *(ptrPtr) = (ClientData) \ @@ -446,8 +465,7 @@ VarHashCreateVar( (((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \ ? TCL_ERROR : \ TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr))) - -#endif +#endif /* NO_WIDE_TYPE */ /* * Macro used in this file to save a function call for common uses of @@ -457,7 +475,7 @@ VarHashCreateVar( * int *boolPtr); */ -#define TclGetBooleanFromObj(interp, objPtr, boolPtr) \ +#define TclGetBooleanFromObj(interp, objPtr, boolPtr) \ ((((objPtr)->typePtr == &tclIntType) \ || ((objPtr)->typePtr == &tclBooleanType)) \ ? (*(boolPtr) = ((objPtr)->internalRep.longValue!=0), TCL_OK) \ @@ -472,12 +490,12 @@ VarHashCreateVar( */ #ifdef NO_WIDE_TYPE -#define TclGetWideIntFromObj(interp, objPtr, wideIntPtr) \ +#define TclGetWideIntFromObj(interp, objPtr, wideIntPtr) \ (((objPtr)->typePtr == &tclIntType) \ ? (*(wideIntPtr) = (Tcl_WideInt) \ ((objPtr)->internalRep.longValue), TCL_OK) : \ Tcl_GetWideIntFromObj((interp), (objPtr), (wideIntPtr))) -#else +#else /* !NO_WIDE_TYPE */ #define TclGetWideIntFromObj(interp, objPtr, wideIntPtr) \ (((objPtr)->typePtr == &tclWideIntType) \ ? (*(wideIntPtr) = (objPtr)->internalRep.wideValue, TCL_OK) : \ @@ -485,7 +503,7 @@ VarHashCreateVar( ? (*(wideIntPtr) = (Tcl_WideInt) \ ((objPtr)->internalRep.longValue), TCL_OK) : \ Tcl_GetWideIntFromObj((interp), (objPtr), (wideIntPtr))) -#endif +#endif /* NO_WIDE_TYPE */ /* * Macro used to make the check for type overflow more mnemonic. This works by @@ -509,16 +527,16 @@ static const Tcl_ObjType dictIteratorType = { "dictIterator", NULL, NULL, NULL, NULL }; - + /* - * Auxiliary tables used to compute powers of small integers + * Auxiliary tables used to compute powers of small integers. */ #if (LONG_MAX == 0x7fffffff) /* * Maximum base that, when raised to powers 2, 3, ... 8, fits in a 32-bit - * signed integer + * signed integer. */ static const long MaxBase32[] = {46340, 1290, 215, 73, 35, 21, 14}; @@ -533,7 +551,8 @@ static const size_t MaxBase32Size = sizeof(MaxBase32)/sizeof(long); static const unsigned short Exp32Index[] = { 0, 11, 18, 23, 26, 29, 31, 32, 33 }; -static const size_t Exp32IndexSize = sizeof(Exp32Index)/sizeof(unsigned short); +static const size_t Exp32IndexSize = + sizeof(Exp32Index) / sizeof(unsigned short); static const long Exp32Value[] = { 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 262144, 1048576, 4194304, @@ -543,7 +562,6 @@ static const long Exp32Value[] = { 1000000000 }; static const size_t Exp32ValueSize = sizeof(Exp32Value)/sizeof(long); - #endif /* LONG_MAX == 0x7fffffff -- 32 bit machine */ #if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) @@ -563,14 +581,15 @@ static const Tcl_WideInt MaxBase64[] = { static const size_t MaxBase64Size = sizeof(MaxBase64)/sizeof(Tcl_WideInt); /* - *Table giving 3, 4, ..., 13 raised to powers greater than 16 when the + * Table giving 3, 4, ..., 13 raised to powers greater than 16 when the * results fit in a 64-bit signed integer. */ static const unsigned short Exp64Index[] = { 0, 23, 38, 49, 57, 63, 67, 70, 72, 74, 75, 76 }; -static const size_t Exp64IndexSize = sizeof(Exp64Index)/sizeof(unsigned short); +static const size_t Exp64IndexSize = + sizeof(Exp64Index) / sizeof(unsigned short); static const Tcl_WideInt Exp64Value[] = { (Tcl_WideInt)243*243*243*3*3, (Tcl_WideInt)243*243*243*3*3*3, @@ -649,10 +668,9 @@ static const Tcl_WideInt Exp64Value[] = { (Tcl_WideInt)248832*248832*248832*12*12, (Tcl_WideInt)371293*371293*371293*13*13 }; -static const size_t Exp64ValueSize = sizeof(Exp64Value)/sizeof(Tcl_WideInt); - -#endif - +static const size_t Exp64ValueSize = sizeof(Exp64Value) / sizeof(Tcl_WideInt); +#endif /* (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) */ + /* * Declarations for local procedures to this file: */ @@ -675,10 +693,10 @@ static void DeleteExecStack(ExecStack *esPtr); static void DupExprCodeInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static void FreeExprCodeInternalRep(Tcl_Obj *objPtr); -static ExceptionRange * GetExceptRangeForPc(const unsigned char *pc, int catchOnly, - ByteCode *codePtr); -static const char * GetSrcInfoForPc(const unsigned char *pc, ByteCode *codePtr, - int *lengthPtr); +static ExceptionRange * GetExceptRangeForPc(const unsigned char *pc, + int catchOnly, ByteCode *codePtr); +static const char * GetSrcInfoForPc(const unsigned char *pc, + ByteCode *codePtr, int *lengthPtr); static Tcl_Obj ** GrowEvaluationStack(ExecEnv *eePtr, int growth, int move); static void IllegalExprOperandType(Tcl_Interp *interp, @@ -688,7 +706,6 @@ static inline int OFFSET(void *ptr); /* Useful elsewhere, make available in tclInt.h or stubs? */ static Tcl_Obj ** StackAllocWords(Tcl_Interp *interp, int numWords); static Tcl_Obj ** StackReallocWords(Tcl_Interp *interp, int numWords); - static Tcl_NRPostProc CopyCallback; static Tcl_NRPostProc ExprObjCallback; @@ -769,7 +786,7 @@ ExecEnv * TclCreateExecEnv( Tcl_Interp *interp, /* Interpreter for which the execution * environment is being created. */ - int size) /* the initial stack size, in number of words + int size) /* The initial stack size, in number of words * [sizeof(Tcl_Obj*)] */ { ExecEnv *eePtr = (ExecEnv *) ckalloc(sizeof(ExecEnv)); @@ -926,10 +943,9 @@ OFFSET( * Given a marker, compute where the following aligned memory starts. */ -#define MEMSTART(markerPtr) \ +#define MEMSTART(markerPtr) \ ((markerPtr) + OFFSET(markerPtr)) - /* *---------------------------------------------------------------------- * @@ -1444,17 +1460,17 @@ CompileExprObj( * DupExprCodeInternalRep -- * * Part of the Tcl object type implementation for Tcl expression - * bytecode. We do not copy the bytecode intrep. Instead, we - * return without setting copyPtr->typePtr, so the copy is a plain - * string copy of the expression value, and if it is to be used - * as a compiled expression, it will just need a recompile. - * - * This makes sense, because with Tcl's copy-on-write practices, - * the usual (only?) time Tcl_DuplicateObj() will be called is - * when the copy is about to be modified, which would invalidate - * any copied bytecode anyway. The only reason it might make sense - * to copy the bytecode is if we had some modifying routines that - * operated directly on the intrep, like we do for lists and dicts. + * bytecode. We do not copy the bytecode intrep. Instead, we return + * without setting copyPtr->typePtr, so the copy is a plain string copy + * of the expression value, and if it is to be used as a compiled + * expression, it will just need a recompile. + * + * This makes sense, because with Tcl's copy-on-write practices, the + * usual (only?) time Tcl_DuplicateObj() will be called is when the copy + * is about to be modified, which would invalidate any copied bytecode + * anyway. The only reason it might make sense to copy the bytecode is if + * we had some modifying routines that operated directly on the intrep, + * like we do for lists and dicts. * * Results: * None. @@ -1479,14 +1495,15 @@ DupExprCodeInternalRep( * FreeExprCodeInternalRep -- * * Part of the Tcl object type implementation for Tcl expression - * bytecode. Frees the storage allocated to hold the internal rep, - * unless ref counts indicate bytecode execution is still in progress. + * bytecode. Frees the storage allocated to hold the internal rep, unless + * ref counts indicate bytecode execution is still in progress. * * Results: * None. * * Side effects: - * May free allocated memory. Leaves objPtr untyped. + * May free allocated memory. Leaves objPtr untyped. + * *---------------------------------------------------------------------- */ @@ -1611,28 +1628,30 @@ TclCompileObj( */ { - Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, - (char *) codePtr); + Tcl_HashEntry *hePtr = + Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr); + if (hePtr) { ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); int redo = 0; if (invoker) { - CmdFrame *ctxPtr = (CmdFrame *) - TclStackAlloc(interp, sizeof(CmdFrame)); + CmdFrame *ctxPtr = TclStackAlloc(interp,sizeof(CmdFrame)); *ctxPtr = *invoker; if (invoker->type == TCL_LOCATION_BC) { /* * Note: Type BC => ctx.data.eval.path is not used. - * ctx.data.tebc.codePtr is used instead. + * ctx.data.tebc.codePtr used instead */ TclGetSrcInfoForPc(ctxPtr); if (ctxPtr->type == TCL_LOCATION_SOURCE) { /* - * The reference made by 'TclGetSrcInfoForPc' is dead. + * The reference made by 'TclGetSrcInfoForPc' is + * dead. */ + Tcl_DecrRefCount(ctxPtr->data.eval.path); ctxPtr->data.eval.path = NULL; } @@ -1649,12 +1668,11 @@ TclCompileObj( * test info-32.0 using literal of info-24.8 * (dict with ... vs set body ...). */ - redo = - ((eclPtr->type == TCL_LOCATION_SOURCE) && - (eclPtr->start != ctxPtr->line[word])) || - ((eclPtr->type == TCL_LOCATION_BC) && - (ctxPtr->type == TCL_LOCATION_SOURCE)) - ; + + redo = ((eclPtr->type == TCL_LOCATION_SOURCE) + && (eclPtr->start != ctxPtr->line[word])) + || ((eclPtr->type == TCL_LOCATION_BC) + && (ctxPtr->type == TCL_LOCATION_SOURCE)); } TclStackFree(interp, ctxPtr); @@ -1675,7 +1693,7 @@ TclCompileObj( return codePtr; } - recompileObj: + recompileObj: iPtr->errorLine = 1; /* @@ -1689,7 +1707,7 @@ TclCompileObj( iPtr->invokeWord = word; tclByteCodeType.setFromAnyProc(interp, objPtr); iPtr->invokeCmdFramePtr = NULL; - codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr; + codePtr = objPtr->internalRep.otherValuePtr; if (iPtr->varFramePtr->localCachePtr) { codePtr->localCachePtr = iPtr->varFramePtr->localCachePtr; codePtr->localCachePtr->refCount++; @@ -1873,7 +1891,7 @@ TclExecuteByteCode( struct auxTEBCdata { ExecStack *esPtr; Var *compiledLocals; - BottomData *bottomPtr; /* Bottom of stack holds NR data */ + BottomData *bottomPtr; /* Bottom of stack holds NR data */ BottomData *oldBottomPtr; Tcl_Obj **constants; int instructionCount; /* Counter that is used to work out when to @@ -1881,10 +1899,10 @@ TclExecuteByteCode( int checkInterp; /* Indicates when a check of interp readyness * is necessary. Set by CACHE_STACK_INFO() */ const char *curInstName; - int result; /* Return code returned after execution. + int result; /* Return code returned after execution. * Result variable - needed only when going to * checkForcatch or other error handlers; also - * used as local in some opcodes. */ + * used as local in some opcodes. */ } TAUX = { NULL, NULL, @@ -1897,28 +1915,28 @@ TclExecuteByteCode( TCL_OK }; -#define LOCAL(i) (&(TAUX.compiledLocals[(i)])) -#define TCONST(i) (TAUX.constants[(i)]) -#define BP (TAUX.bottomPtr) -#define OBP (TAUX.oldBottomPtr) -#define TRESULT (TAUX.result) - +#define LOCAL(i) (&(TAUX.compiledLocals[(i)])) +#define TCONST(i) (TAUX.constants[(i)]) +#define BP (TAUX.bottomPtr) +#define OBP (TAUX.oldBottomPtr) +#define TRESULT (TAUX.result) + /* * These macros are just meant to save some global variables that are not * used too frequently */ -#define bcFramePtr ((CmdFrame *) (BP + 1)) -#define initCatchTop (((ptrdiff_t *) (bcFramePtr + 1)) - 1) -#define initTosPtr ((Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth)) -#define auxObjList (BP->auxObjList) -#define catchTop (BP->catchTop) - + +#define bcFramePtr ((CmdFrame *) (BP + 1)) +#define initCatchTop (((ptrdiff_t *) (bcFramePtr + 1)) - 1) +#define initTosPtr ((Tcl_Obj **) (initCatchTop+codePtr->maxExceptDepth)) +#define auxObjList (BP->auxObjList) +#define catchTop (BP->catchTop) + /* * Globals: variables that store state, must remain valid at all times. */ - Tcl_Obj **tosPtr = NULL; - /* Cached pointer to top of evaluation + Tcl_Obj **tosPtr = NULL; /* Cached pointer to top of evaluation * stack. */ const unsigned char *pc = NULL; /* The current program counter. */ @@ -1953,10 +1971,10 @@ TclExecuteByteCode( */ if (!codePtr) { - resumeCoroutine: + resumeCoroutine: /* - * Reawakening a suspended coroutine: the [yield] command - * is returning. + * Reawakening a suspended coroutine: the [yield] command is + * returning. */ NRE_ASSERT(iPtr->execEnvPtr->corPtr->eePtr == iPtr->execEnvPtr); @@ -1972,7 +1990,7 @@ TclExecuteByteCode( goto returnToCaller; } - nonRecursiveCallStart: + nonRecursiveCallStart: codePtr->refCount++; BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) @@ -1993,11 +2011,11 @@ TclExecuteByteCode( pc = codePtr->codeStart; catchTop = initCatchTop; tosPtr = initTosPtr; - + /* * TIP #280: Initialize the frame. Do not push it yet. */ - + bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) ? TCL_LOCATION_PREBC : TCL_LOCATION_BC); bcFramePtr->level = (iPtr->cmdFramePtr ? iPtr->cmdFramePtr->level+1 : 1); @@ -2011,7 +2029,7 @@ TclExecuteByteCode( bcFramePtr->data.tebc.pc = NULL; bcFramePtr->cmd.str.cmd = NULL; bcFramePtr->cmd.str.len = 0; - + if (iPtr->execEnvPtr->rewind) { TRESULT = TCL_ERROR; goto abnormalReturn; @@ -2318,12 +2336,12 @@ TclExecuteByteCode( cleanup = 0; if (TRESULT == TCL_ERROR) { /* - * Tcl_EvalEx already did the task of logging - * the error to the stack trace for us, so set - * a flag to prevent the TEBC exception handling - * machinery from trying to do it again. - * Tcl Bug 2037338. See test execute-8.4. + * Tcl_EvalEx already did the task of logging the error to + * the stack trace for us, so set a flag to prevent the + * TEBC exception handling machinery from trying to do it + * again. See test execute-8.4. [Bug 2037338] */ + iPtr->flags |= ERR_ALREADY_LOGGED; } goto processExceptionReturn; @@ -2363,6 +2381,7 @@ TclExecuteByteCode( b = tosPtr; while (acodeStart); + TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc, + codePtr, bcFramePtr, pc - codePtr->codeStart); DECACHE_STACK_INFO(); @@ -2783,81 +2802,86 @@ TclExecuteByteCode( TOP_CB(interp) = callbackPtr->nextPtr; TCLNR_FREE(interp, callbackPtr); - + NR_DATA_BURY(); switch (type) { - case TCL_NR_BC_TYPE: - /* - * A request to run a bytecode: record this - * level's state variables, swap codePtr and start - * running the new one. - */ + case TCL_NR_BC_TYPE: + /* + * A request to run a bytecode: record this level's + * state variables, swap codePtr and start running the + * new one. + */ - if (param) { - codePtr = param; - goto nonRecursiveCallStart; - } - /* NOT CALLED, does not (yet?) work */ - goto resumeCoroutine; - break; - case TCL_NR_TAILCALL_TYPE: { - /* - * A request to perform a tailcall: just drop this - * bytecode. */ + if (param) { + codePtr = param; + goto nonRecursiveCallStart; + } + /* NOT CALLED, does not (yet?) work */ + goto resumeCoroutine; + case TCL_NR_TAILCALL_TYPE: + /* + * A request to perform a tailcall: just drop this + * bytecode. + */ #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall request received\n"); - } -#endif - if (catchTop != initCatchTop) { - TEOV_callback *tailcallPtr = iPtr->varFramePtr->tailcallPtr; - - TclClearTailcall(interp, tailcallPtr); - iPtr->varFramePtr->tailcallPtr = NULL; - TRESULT = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", - TCL_STATIC); - pc--; - goto checkForCatch; - } - goto abnormalReturn; + if (traceInstructions) { + fprintf(stdout, " Tailcall request received\n"); } - case TCL_NR_YIELD_TYPE: { /*[yield] */ - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - - if (!corPtr) { - Tcl_SetResult(interp, - "yield can only be called in a coroutine", - TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); - TRESULT = TCL_ERROR; - pc--; - goto checkForCatch; - } - NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); - NRE_ASSERT(corPtr->stackLevel != NULL); - NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); - if (corPtr->stackLevel != &TAUX) { - Tcl_SetResult(interp, "cannot yield: C stack busy", - TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); - TRESULT = TCL_ERROR; - pc--; - goto checkForCatch; - } - - /* - * Save our state and return - */ - - NR_DATA_BURY(); - TAUX.esPtr->tosPtr = tosPtr; - iPtr->execEnvPtr->bottomPtr = BP; - return TCL_OK; +#endif /* TCL_COMPILE_DEBUG */ + if (catchTop != initCatchTop) { + TEOV_callback *tailcallPtr = + iPtr->varFramePtr->tailcallPtr; + + TclClearTailcall(interp, tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; + TRESULT = TCL_ERROR; + Tcl_SetResult(interp, + "Tailcall called from within a catch environment", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", + "ILLEGAL", NULL); + pc--; + goto checkForCatch; } - default: - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); + goto abnormalReturn; + case TCL_NR_YIELD_TYPE: { /* [yield] */ + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + + if (!corPtr) { + Tcl_SetResult(interp, + "yield can only be called in a coroutine", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", + "ILLEGAL_YIELD", NULL); + TRESULT = TCL_ERROR; + pc--; + goto checkForCatch; + } + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + NRE_ASSERT(corPtr->stackLevel != NULL); + NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); + if (corPtr->stackLevel != &TAUX) { + Tcl_SetResult(interp, + "cannot yield: C stack busy", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", + "CANT_YIELD", NULL); + TRESULT = TCL_ERROR; + pc--; + goto checkForCatch; + } + + /* + * Save our state and return + */ + + NR_DATA_BURY(); + TAUX.esPtr->tosPtr = tosPtr; + iPtr->execEnvPtr->bottomPtr = BP; + return TCL_OK; + } + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } } @@ -2868,12 +2892,12 @@ TclExecuteByteCode( NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); iPtr->cmdFramePtr = bcFramePtr->nextPtr; - TclArgumentBCRelease((Tcl_Interp*) iPtr, bcFramePtr); + TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); /* * If the CallFrame is marked as tailcalling, keep tailcalling */ - + if (iPtr->varFramePtr->tailcallPtr) { if (catchTop != initCatchTop) { TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); @@ -2886,12 +2910,12 @@ TclExecuteByteCode( } goto abnormalReturn; } - + if (iPtr->execEnvPtr->rewind) { TRESULT = TCL_ERROR; goto abnormalReturn; } - + if (TRESULT == TCL_OK) { Tcl_Obj *objPtr; #ifndef TCL_COMPILE_DEBUG @@ -3994,7 +4018,7 @@ TclExecuteByteCode( * going to take. */ case INST_JUMP_FALSE4: jmpOffset[0] = TclGetInt4AtPtr(pc+1); /* FALSE offset */ - jmpOffset[1] = 5; /* TRUE offset*/ + jmpOffset[1] = 5; /* TRUE offset */ goto doCondJump; case INST_JUMP_TRUE4: @@ -5469,7 +5493,8 @@ TclExecuteByteCode( * place to draw the line. */ - Tcl_SetResult(interp, "integer value too large to represent", TCL_STATIC); + Tcl_SetResult(interp, "integer value too large to represent", + TCL_STATIC); TRESULT = TCL_ERROR; goto checkForCatch; } @@ -6163,15 +6188,16 @@ TclExecuteByteCode( NEXT_INST_F(1, 2, 1); } } + /* - * We refuse to accept exponent arguments that exceed - * one mp_digit which means the max exponent value is - * 2**28-1 = 0x0fffffff = 268435455, which fits into - * a signed 32 bit int which is within the range of the - * long int type. This means any numeric Tcl_Obj value - * not using TCL_NUMBER_LONG type must hold a value larger + * We refuse to accept exponent arguments that exceed one mp_digit + * which means the max exponent value is 2**28-1 = 0x0fffffff = + * 268435455, which fits into a signed 32 bit int which is within + * the range of the long int type. This means any numeric Tcl_Obj + * value not using TCL_NUMBER_LONG type must hold a value larger * than we accept. */ + if (type2 != TCL_NUMBER_LONG) { Tcl_SetResult(interp, "exponent too large", TCL_STATIC); TRESULT = TCL_ERROR; @@ -6324,7 +6350,7 @@ TclExecuteByteCode( w1 = l1; #ifndef NO_WIDE_TYPE } else if (type1 == TCL_NUMBER_WIDE) { - w1 = *((const Tcl_WideInt*) ptr1); + w1 = *((const Tcl_WideInt *) ptr1); #endif } else { goto overflow; @@ -6409,7 +6435,6 @@ TclExecuteByteCode( wResult *= wResult; /* b**8 */ wResult *= wResult; /* b**16 */ break; - } TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); objResultPtr = Tcl_NewWideIntObj(wResult); @@ -6421,6 +6446,7 @@ TclExecuteByteCode( * Handle cases of powers > 16 that still fit in a 64-bit word by * doing table lookup. */ + if (w1 - 3 >= 0 && w1 - 2 < (long)Exp64IndexSize && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { unsigned short base = Exp64Index[w1 - 3] @@ -7133,10 +7159,9 @@ TclExecuteByteCode( NEXT_INST_F(2*code -1, 1, 0); } -/* TODO: normalize "valPtr" to "valuePtr" */ { int opnd, opnd2, allocateDict; - Tcl_Obj *dictPtr, *valPtr; + Tcl_Obj *dictPtr, *valuePtr, *val2Ptr; Var *varPtr; case INST_DICT_GET: @@ -7210,25 +7235,24 @@ TclExecuteByteCode( case INST_DICT_INCR_IMM: cleanup = 1; opnd = TclGetInt4AtPtr(pc+1); - TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &valPtr); + TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &valuePtr); if (TRESULT != TCL_OK) { break; } - if (valPtr == NULL) { + if (valuePtr == NULL) { Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS,Tcl_NewIntObj(opnd)); } else { - Tcl_Obj *incrPtr = Tcl_NewIntObj(opnd); - - Tcl_IncrRefCount(incrPtr); - if (Tcl_IsShared(valPtr)) { - valPtr = Tcl_DuplicateObj(valPtr); - Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS, valPtr); + val2Ptr = Tcl_NewIntObj(opnd); + Tcl_IncrRefCount(val2Ptr); + if (Tcl_IsShared(valuePtr)) { + valuePtr = Tcl_DuplicateObj(valuePtr); + Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS, valuePtr); } - TRESULT = TclIncrObj(interp, valPtr, incrPtr); + TRESULT = TclIncrObj(interp, valuePtr, val2Ptr); if (TRESULT == TCL_OK) { Tcl_InvalidateStringRep(dictPtr); } - TclDecrRefCount(incrPtr); + TclDecrRefCount(val2Ptr); } break; case INST_DICT_UNSET: @@ -7252,11 +7276,10 @@ TclExecuteByteCode( if (TclIsVarDirectWritable(varPtr)) { if (allocateDict) { - Tcl_Obj *oldValuePtr = varPtr->value.objPtr; - + val2Ptr = varPtr->value.objPtr; Tcl_IncrRefCount(dictPtr); - if (oldValuePtr != NULL) { - TclDecrRefCount(oldValuePtr); + if (val2Ptr != NULL) { + TclDecrRefCount(val2Ptr); } varPtr->value.objPtr = dictPtr; } @@ -7309,7 +7332,7 @@ TclExecuteByteCode( } } - TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, &valPtr); + TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, &valuePtr); if (TRESULT != TCL_OK) { if (allocateDict) { TclDecrRefCount(dictPtr); @@ -7318,20 +7341,20 @@ TclExecuteByteCode( } /* - * Note that a non-existent key results in a NULL valPtr, which is a + * Note that a non-existent key results in a NULL valuePtr, which is a * case handled separately below. What we *can* say at this point is * that the write-back will always succeed. */ switch (*pc) { case INST_DICT_APPEND: - if (valPtr == NULL) { - valPtr = OBJ_AT_TOS; + if (valuePtr == NULL) { + valuePtr = OBJ_AT_TOS; } else { - if (Tcl_IsShared(valPtr)) { - valPtr = Tcl_DuplicateObj(valPtr); + if (Tcl_IsShared(valuePtr)) { + valuePtr = Tcl_DuplicateObj(valuePtr); } - Tcl_AppendObjToObj(valPtr, OBJ_AT_TOS); + Tcl_AppendObjToObj(valuePtr, OBJ_AT_TOS); } break; case INST_DICT_LAPPEND: @@ -7339,20 +7362,22 @@ TclExecuteByteCode( * More complex because list-append can fail. */ - if (valPtr == NULL) { - valPtr = Tcl_NewListObj(1, &OBJ_AT_TOS); - } else if (Tcl_IsShared(valPtr)) { - valPtr = Tcl_DuplicateObj(valPtr); - TRESULT = Tcl_ListObjAppendElement(interp, valPtr, OBJ_AT_TOS); + if (valuePtr == NULL) { + valuePtr = Tcl_NewListObj(1, &OBJ_AT_TOS); + } else if (Tcl_IsShared(valuePtr)) { + valuePtr = Tcl_DuplicateObj(valuePtr); + TRESULT = Tcl_ListObjAppendElement(interp, valuePtr, + OBJ_AT_TOS); if (TRESULT != TCL_OK) { - TclDecrRefCount(valPtr); + TclDecrRefCount(valuePtr); if (allocateDict) { TclDecrRefCount(dictPtr); } goto checkForCatch; } } else { - TRESULT = Tcl_ListObjAppendElement(interp, valPtr, OBJ_AT_TOS); + TRESULT = Tcl_ListObjAppendElement(interp, valuePtr, + OBJ_AT_TOS); if (TRESULT != TCL_OK) { if (allocateDict) { TclDecrRefCount(dictPtr); @@ -7365,15 +7390,14 @@ TclExecuteByteCode( Tcl_Panic("Should not happen!"); } - Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valPtr); + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); if (TclIsVarDirectWritable(varPtr)) { if (allocateDict) { - Tcl_Obj *oldValuePtr = varPtr->value.objPtr; - + val2Ptr = varPtr->value.objPtr; Tcl_IncrRefCount(dictPtr); - if (oldValuePtr != NULL) { - TclDecrRefCount(oldValuePtr); + if (val2Ptr != NULL) { + TclDecrRefCount(val2Ptr); } varPtr->value.objPtr = dictPtr; } @@ -7420,8 +7444,8 @@ TclExecuteByteCode( } TclNewObj(statePtr); statePtr->typePtr = &dictIteratorType; - statePtr->internalRep.twoPtrValue.ptr1 = (void *) searchPtr; - statePtr->internalRep.twoPtrValue.ptr2 = (void *) dictPtr; + statePtr->internalRep.twoPtrValue.ptr1 = searchPtr; + statePtr->internalRep.twoPtrValue.ptr2 = dictPtr; varPtr = LOCAL(opnd);// if (varPtr->value.objPtr) { if (varPtr->value.objPtr->typePtr != &dictIteratorType) { @@ -7441,7 +7465,7 @@ TclExecuteByteCode( if (statePtr == NULL || statePtr->typePtr != &dictIteratorType) { Tcl_Panic("mis-issued dictNext!"); } - searchPtr = (Tcl_DictSearch *) statePtr->internalRep.twoPtrValue.ptr1; + searchPtr = statePtr->internalRep.twoPtrValue.ptr1; Tcl_DictObjNext(searchPtr, &keyPtr, &valuePtr, &done); pushDictIteratorResult: if (done) { @@ -7472,12 +7496,11 @@ TclExecuteByteCode( * dictionary that we were holding. */ - searchPtr = (Tcl_DictSearch *) - statePtr->internalRep.twoPtrValue.ptr1; + searchPtr = statePtr->internalRep.twoPtrValue.ptr1; Tcl_DictObjDone(searchPtr); ckfree((char *) searchPtr); - dictPtr = (Tcl_Obj *) statePtr->internalRep.twoPtrValue.ptr2; + dictPtr = statePtr->internalRep.twoPtrValue.ptr2; TclDecrRefCount(dictPtr); /* @@ -7495,7 +7518,7 @@ TclExecuteByteCode( { int opnd, opnd2, i, length, allocdict; - Tcl_Obj **keyPtrPtr, *dictPtr; + Tcl_Obj **keyPtrPtr, *dictPtr, *valuePtr; DictUpdateInfo *duiPtr; Var *varPtr; @@ -7527,10 +7550,8 @@ TclExecuteByteCode( Tcl_Panic("dictUpdateStart argument length mismatch"); } for (i=0 ; ivarIndices[i]); @@ -7538,21 +7559,22 @@ TclExecuteByteCode( varPtr = varPtr->value.linkPtr; } DECACHE_STACK_INFO(); - if (valPtr == NULL) { + if (valuePtr == NULL) { TclObjUnsetVar2(interp, localName(iPtr->varFramePtr, duiPtr->varIndices[i]), NULL, 0); } else if (TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, - valPtr, TCL_LEAVE_ERR_MSG, + valuePtr, TCL_LEAVE_ERR_MSG, duiPtr->varIndices[i]) == NULL) { CACHE_STACK_INFO(); - dictUpdateStartFailed: - TRESULT = TCL_ERROR; - goto checkForCatch; + goto dictUpdateStartFailed; } CACHE_STACK_INFO(); } NEXT_INST_F(9, 0, 0); + dictUpdateStartFailed: + TRESULT = TCL_ERROR; + goto checkForCatch; case INST_DICT_UPDATE_END: opnd = TclGetUInt4AtPtr(pc+1); @@ -7584,28 +7606,26 @@ TclExecuteByteCode( dictPtr = Tcl_DuplicateObj(dictPtr); } for (i=0 ; ivarIndices[i]); - var2Ptr = LOCAL(duiPtr->varIndices[i]); while (TclIsVarLink(var2Ptr)) { var2Ptr = var2Ptr->value.linkPtr; } if (TclIsVarDirectReadable(var2Ptr)) { - valPtr = var2Ptr->value.objPtr; + valuePtr = var2Ptr->value.objPtr; } else { DECACHE_STACK_INFO(); - valPtr = TclPtrGetVar(interp, var2Ptr, NULL, NULL, NULL, 0, + valuePtr = TclPtrGetVar(interp, var2Ptr, NULL, NULL, NULL, 0, duiPtr->varIndices[i]); CACHE_STACK_INFO(); } - if (valPtr == NULL) { + if (valuePtr == NULL) { Tcl_DictObjRemove(interp, dictPtr, keyPtrPtr[i]); - } else if (dictPtr == valPtr) { + } else if (dictPtr == valuePtr) { Tcl_DictObjPut(interp, dictPtr, keyPtrPtr[i], - Tcl_DuplicateObj(valPtr)); + Tcl_DuplicateObj(valuePtr)); } else { - Tcl_DictObjPut(interp, dictPtr, keyPtrPtr[i], valPtr); + Tcl_DictObjPut(interp, dictPtr, keyPtrPtr[i], valuePtr); } } if (TclIsVarDirectWritable(varPtr)) { @@ -7637,7 +7657,7 @@ TclExecuteByteCode( * "goto divideByZero". */ - divideByZero: + divideByZero: Tcl_SetResult(interp, "divide by zero", TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", NULL); @@ -7649,8 +7669,9 @@ TclExecuteByteCode( * only reaches this point by "goto exponOfZero". */ - exponOfZero: - Tcl_SetResult(interp, "exponentiation of zero by negative power", TCL_STATIC); + exponOfZero: + Tcl_SetResult(interp, "exponentiation of zero by negative power", + TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", "exponentiation of zero by negative power", NULL); TRESULT = TCL_ERROR; @@ -7742,10 +7763,12 @@ TclExecuteByteCode( } else if (traceInstructions) { if ((TRESULT != TCL_ERROR) && (TRESULT != TCL_RETURN)) { Tcl_Obj *objPtr = Tcl_GetObjResult(interp); + TRACE_APPEND(("OTHER RETURN CODE %d, result= \"%s\"\n ", TRESULT, O2S(objPtr))); } else { Tcl_Obj *objPtr = Tcl_GetObjResult(interp); + TRACE_APPEND(("%s, result= \"%s\"\n", StringForResultCode(TRESULT), O2S(objPtr))); } @@ -7780,9 +7803,8 @@ TclExecuteByteCode( */ while (auxObjList) { - if ((catchTop != initCatchTop) && - (*catchTop > - (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1)) { + if ((catchTop != initCatchTop) && (*catchTop > + (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1)) { break; } POP_TAUX_OBJ(); @@ -7790,12 +7812,13 @@ TclExecuteByteCode( /* * We must not catch if the script in progress has been canceled with - * the TCL_CANCEL_UNWIND flag. Instead, it blows outwards until we + * the TCL_CANCEL_UNWIND flag. Instead, it blows outwards until we * either hit another interpreter (presumably where the script in - * progress has not been canceled) or we get to the top-level. We - * do NOT modify the interpreter result here because we know it will + * progress has not been canceled) or we get to the top-level. We do + * NOT modify the interpreter result here because we know it will * already be set prior to vectoring down to this point in the code. */ + if (Tcl_Canceled(interp, 0) == TCL_ERROR) { #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { @@ -7938,7 +7961,7 @@ TclExecuteByteCode( * with tailcalls. */ - BP = OBP; /* back to old bc */ + BP = OBP; /* back to old bc */ rerunCallbacks: TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); @@ -7950,7 +7973,7 @@ TclExecuteByteCode( * caller's arguments and keep processing the caller. */ - TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; + TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; TAUX.compiledLocals = iPtr->varFramePtr->compiledLocals; goto nonRecursiveCallReturn; @@ -7962,24 +7985,24 @@ TclExecuteByteCode( NRE_ASSERT(TRESULT == TCL_OK); switch (type) { - case TCL_NR_BC_TYPE: - /* - * One of the callbacks requested a new execution: a - * tailcall! Start the new bytecode. - */ + case TCL_NR_BC_TYPE: + /* + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. + */ - goto nonRecursiveCallSetup; - case TCL_NR_TAILCALL_TYPE: - TOP_CB(iPtr) = callbackPtr->nextPtr; - TCLNR_FREE(interp, callbackPtr); + goto nonRecursiveCallSetup; + case TCL_NR_TAILCALL_TYPE: + TOP_CB(iPtr) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); - Tcl_SetResult(interp, - "atProcExit/tailcall cannot be invoked recursively", - TCL_STATIC); - TRESULT = TCL_ERROR; - goto rerunCallbacks; - default: - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); + Tcl_SetResult(interp, + "atProcExit/tailcall cannot be invoked recursively", + TCL_STATIC); + TRESULT = TCL_ERROR; + goto rerunCallbacks; + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } } -- cgit v0.12 From 812ad65c885e1e9c369e1704cb19e7f3dea8e162 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 8 Dec 2009 14:18:34 +0000 Subject: Small corrections (enforcing ANSI style declarations, etc.) --- generic/tclBasic.c | 278 ++++++++++++++++++++++++++++------------------------- 1 file changed, 145 insertions(+), 133 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ae6469f..11da4cc 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.416 2009/12/07 19:03:15 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.417 2009/12/08 14:18:34 dkf Exp $ */ #include "tclInt.h" @@ -31,11 +31,9 @@ #include #endif - #define INTERP_STACK_INITIAL_SIZE 2000 #define CORO_STACK_INITIAL_SIZE 200 - /* * Determine whether we're using IEEE floating point */ @@ -2183,7 +2181,7 @@ Tcl_CreateObjCommand( * stuck in an infinite loop). */ - ckfree(Tcl_GetHashValue(hPtr)); + ckfree(Tcl_GetHashValue(hPtr)); } } else { /* @@ -3173,6 +3171,7 @@ CancelEvalProc( * Create the result object now so that Tcl_Canceled can avoid * locking the cancelLock mutex. */ + if (cancelInfo->result != NULL) { Tcl_SetStringObj(iPtr->asyncCancelMsg, cancelInfo->result, cancelInfo->length); @@ -3494,7 +3493,7 @@ OldMathFuncProc( static void OldMathFuncDeleteProc( - ClientData clientData) + ClientData clientData) { OldMathFuncData *dataPtr = clientData; @@ -4338,15 +4337,17 @@ NRCallTEBC( Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); return TCL_ERROR; case TCL_NR_YIELD_TYPE: if (iPtr->execEnvPtr->corPtr) { Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "CANT_YIELD", NULL); } else { Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_ILLEGAL_YIELD", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", + NULL); } return TCL_ERROR; default: @@ -4866,23 +4867,23 @@ TclEvalEx( * evaluation of the script. Only * TCL_EVAL_GLOBAL is currently supported. */ int line, /* The line the script starts on. */ - int* clNextOuter, /* Information about an outer context for */ - CONST char* outerScript) /* continuation line data. This is set only in - * EvalTokensStandard(), to properly handle - * [...]-nested commands. The 'outerScript' - * refers to the most-outer script containing the - * embedded command, which is refered to by - * 'script'. The 'clNextOuter' refers to the - * current entry in the table of continuation - * lines in this "master script", and the - * character offsets are relative to the - * 'outerScript' as well. - * - * If outerScript == script, then this call is - * for the outer-most script/command. See - * Tcl_EvalEx() and TclEvalObjEx() for places - * generating arguments for which this is true. - */ + int *clNextOuter, /* Information about an outer context for */ + const char *outerScript) /* continuation line data. This is set only in + * EvalTokensStandard(), to properly handle + * [...]-nested commands. The 'outerScript' + * refers to the most-outer script containing + * the embedded command, which is refered to + * by 'script'. The 'clNextOuter' refers to + * the current entry in the table of + * continuation lines in this "master script", + * and the character offsets are relative to + * the 'outerScript' as well. + * + * If outerScript == script, then this call is + * for the outer-most script/command. See + * Tcl_EvalEx() and TclEvalObjEx() for places + * generating arguments for which this is + * true. */ { Interp *iPtr = (Interp *) interp; const char *p, *next; @@ -4916,7 +4917,7 @@ TclEvalEx( * parsing the script. */ - int* clNext = NULL; + int *clNext = NULL; if (iPtr->scriptCLLocPtr) { if (clNextOuter) { @@ -5041,7 +5042,7 @@ TclEvalEx( int wordLine = line; const char *wordStart = parsePtr->commandStart; - int* wordCLNext = clNext; + int *wordCLNext = clNext; /* * Generate an array of objects for the words of the command. @@ -5086,7 +5087,7 @@ TclEvalEx( code = TclSubstTokens(interp, tokenPtr+1, tokenPtr->numComponents, NULL, wordLine, - wordCLNext, outerScript); + wordCLNext, outerScript); iPtr->evalFlags = 0; @@ -5369,10 +5370,10 @@ TclAdvanceLines( */ void -TclAdvanceContinuations (line,clNextPtrPtr,loc) - int* line; - int** clNextPtrPtr; - int loc; +TclAdvanceContinuations( + int *line, + int **clNextPtrPtr, + int loc) { /* * Track the invisible continuation lines embedded in a script, if @@ -5384,14 +5385,16 @@ TclAdvanceContinuations (line,clNextPtrPtr,loc) * loc >= **clNextPtrPtr <=> We stepped beyond the current cont. line. */ - while (*clNextPtrPtr && (**clNextPtrPtr >= 0) && (loc >= **clNextPtrPtr)) { + while (*clNextPtrPtr && (**clNextPtrPtr >= 0) + && (loc >= **clNextPtrPtr)) { /* * We just stepped over an invisible continuation line. Adjust the * line counter and step to the table entry holding the location of * the next continuation line to track. */ - (*line) ++; - (*clNextPtrPtr) ++; + + (*line)++; + (*clNextPtrPtr)++; } } @@ -5543,73 +5546,77 @@ TclArgumentRelease( void TclArgumentBCEnter( - Tcl_Interp* interp, - Tcl_Obj* objv[], - int objc, - void* codePtr, - CmdFrame* cfPtr, - int pc) + Tcl_Interp *interp, + Tcl_Obj *objv[], + int objc, + void *codePtr, + CmdFrame *cfPtr, + int pc) { - Interp* iPtr = (Interp*) interp; - Tcl_HashEntry* hePtr = Tcl_FindHashEntry (iPtr->lineBCPtr, (char *) codePtr); + Interp *iPtr = (Interp *) interp; + Tcl_HashEntry *hePtr = + Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr); + ExtCmdLoc *eclPtr; + if (!hePtr) { + return; + } + eclPtr = Tcl_GetHashValue(hePtr); + hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, INT2PTR(pc)); if (hePtr) { - ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); - hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, INT2PTR(pc)); + int word; + int cmd = PTR2INT(Tcl_GetHashValue(hePtr)); + ECL *ePtr = &eclPtr->loc[cmd]; + CFWordBC *lastPtr = NULL; - if (hePtr) { - int word; - int cmd = PTR2INT(Tcl_GetHashValue(hePtr)); - ECL* ePtr = &eclPtr->loc[cmd]; - CFWordBC* lastPtr = 0; + /* + * A few truths ... + * (1) ePtr->nline == objc + * (2) (ePtr->line[word] < 0) => !literal, for all words + * (3) (word == 0) => !literal + * + * Item (2) is why we can use objv to get the literals, and do not + * have to save them at compile time. + */ - /* - * A few truths ... - * (1) ePtr->nline == objc - * (2) (ePtr->line[word] < 0) => !literal, for all words - * (3) (word == 0) => !literal - * - * Item (2) is why we can use objv to get the literals, and do not - * have to save them at compile time. - */ + for (word = 1; word < objc; word++) { + if (ePtr->line[word] >= 0) { + int isnew; + Tcl_HashEntry *hPtr = + Tcl_CreateHashEntry(iPtr->lineLABCPtr, + (char *) objv[word], &isnew); + CFWordBC *cfwPtr = (CFWordBC *) ckalloc(sizeof(CFWordBC)); + + cfwPtr->framePtr = cfPtr; + cfwPtr->obj = objv[word]; + cfwPtr->pc = pc; + cfwPtr->word = word; + cfwPtr->nextPtr = lastPtr; + lastPtr = cfwPtr; + + if (isnew) { + /* + * The word is not on the stack yet, remember the current + * location and initialize references. + */ - for (word = 1; word < objc; word++) { - if (ePtr->line[word] >= 0) { - int isnew; - Tcl_HashEntry* hPtr = - Tcl_CreateHashEntry (iPtr->lineLABCPtr, - (char*) objv[word], &isnew); - CFWordBC* cfwPtr = (CFWordBC*) ckalloc (sizeof (CFWordBC)); - - cfwPtr->framePtr = cfPtr; - cfwPtr->obj = objv[word]; - cfwPtr->pc = pc; - cfwPtr->word = word; - cfwPtr->nextPtr = lastPtr; - lastPtr = cfwPtr; - - if (isnew) { - /* - * The word is not on the stack yet, remember the - * current location and initialize references. - */ - cfwPtr->prevPtr = NULL; - } else { - /* - * The object is already on the stack, however it may - * have a different location now (literal sharing may - * map multiple location to a single Tcl_Obj*. Save - * the old information in the new structure. - */ - cfwPtr->prevPtr = (CFWordBC*) Tcl_GetHashValue(hPtr); - } + cfwPtr->prevPtr = NULL; + } else { + /* + * The object is already on the stack, however it may have + * a different location now (literal sharing may map + * multiple location to a single Tcl_Obj*. Save the old + * information in the new structure. + */ - Tcl_SetHashValue (hPtr, cfwPtr); + cfwPtr->prevPtr = Tcl_GetHashValue(hPtr); } - } /* for */ - cfPtr->litarg = lastPtr; - } /* if */ + Tcl_SetHashValue(hPtr, cfwPtr); + } + } /* for */ + + cfPtr->litarg = lastPtr; } /* if */ } @@ -5635,17 +5642,17 @@ TclArgumentBCEnter( void TclArgumentBCRelease( - Tcl_Interp *interp, - CmdFrame* cfPtr) + Tcl_Interp *interp, + CmdFrame *cfPtr) { - Interp* iPtr = (Interp*) interp; - CFWordBC* cfwPtr = (CFWordBC*) cfPtr->litarg; + Interp *iPtr = (Interp *) interp; + CFWordBC *cfwPtr = (CFWordBC *) cfPtr->litarg; while (cfwPtr) { - CFWordBC* nextPtr = cfwPtr->nextPtr; - Tcl_HashEntry* hPtr = - Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) cfwPtr->obj); - CFWordBC* xPtr = (CFWordBC*) Tcl_GetHashValue (hPtr); + CFWordBC *nextPtr = cfwPtr->nextPtr; + Tcl_HashEntry *hPtr = + Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) cfwPtr->obj); + CFWordBC *xPtr = Tcl_GetHashValue(hPtr); if (xPtr != cfwPtr) { Tcl_Panic ("TclArgumentBC Enter/Release Mismatch"); @@ -5658,7 +5665,6 @@ TclArgumentBCRelease( } ckfree((char *) cfwPtr); - cfwPtr = nextPtr; } @@ -6031,8 +6037,8 @@ TclNREvalObjEx( * executing nested commands in the eval/direct path. */ - ContLineLoc* saveCLLocPtr = iPtr->scriptCLLocPtr; - ContLineLoc* clLocPtr = TclContinuationsGet (objPtr); + ContLineLoc *saveCLLocPtr = iPtr->scriptCLLocPtr; + ContLineLoc *clLocPtr = TclContinuationsGet (objPtr); if (clLocPtr) { iPtr->scriptCLLocPtr = clLocPtr; @@ -7370,6 +7376,7 @@ ExprAbsFunc( if (type == TCL_NUMBER_LONG) { long l = *((const long *) ptr); + if (l <= (long)0) { if (l == LONG_MIN) { TclBNInitBignumFromLong(&big, l); @@ -7384,6 +7391,7 @@ ExprAbsFunc( if (type == TCL_NUMBER_DOUBLE) { double d = *((const double *) ptr); + if (d <= 0.0) { Tcl_SetObjResult(interp, Tcl_NewDoubleObj(-d)); } else { @@ -7395,6 +7403,7 @@ ExprAbsFunc( #ifndef NO_WIDE_TYPE if (type == TCL_NUMBER_WIDE) { Tcl_WideInt w = *((const Tcl_WideInt *) ptr); + if (w < (Tcl_WideInt)0) { if (w == LLONG_MIN) { TclBNInitBignumFromWideInt(&big, w); @@ -7427,6 +7436,7 @@ ExprAbsFunc( return TCL_OK; #else double d; + Tcl_GetDoubleFromObj(interp, objv[1], &d); return TCL_ERROR; #endif @@ -7464,6 +7474,7 @@ ExprDoubleFunc( Tcl_Obj *const *objv) /* Actual parameter vector. */ { double dResult; + if (objc != 2) { MathFuncWrongNumArgs(interp, 2, objc, objv); return TCL_ERROR; @@ -7579,6 +7590,7 @@ ExprWideFunc( { Tcl_WideInt wResult; Tcl_Obj *objPtr; + if (ExprEntierFunc(NULL, interp, objc, objv) != TCL_OK) { return TCL_ERROR; } @@ -8188,14 +8200,12 @@ TclSpliceTailcall ( * being tailcalled. Note that we skip NRCommands marked in data[1] * (used by command redirectors) */ - + Interp *iPtr = (Interp *) interp; TEOV_callback *runPtr; ExecEnv *eePtr = NULL; - - - - restart: + + restart: for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { break; @@ -8206,25 +8216,26 @@ TclSpliceTailcall ( * If we are tailcalling out of a coroutine, the splicing spot is * in the caller's execEnv: go find it! */ - + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + if (corPtr) { - eePtr = iPtr->execEnvPtr; + eePtr = iPtr->execEnvPtr; iPtr->execEnvPtr = corPtr->callerEEPtr; goto restart; } Tcl_Panic("Tailcall cannot find the right splicing spot: should not happen!"); } - + tailcallPtr->nextPtr = runPtr->nextPtr; runPtr->nextPtr = tailcallPtr; - + if (eePtr) { /* * Restore the right execEnv if it was swapped for tailcalling out * of a coroutine. */ - + iPtr->execEnvPtr = eePtr; } } @@ -8287,7 +8298,8 @@ TclNRTailcallObjCmd( iPtr->varFramePtr->tailcallPtr = TOP_CB(interp); TOP_CB(interp) = TOP_CB(interp)->nextPtr; - TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_TAILCALL_TYPE), NULL, NULL, NULL); + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_TAILCALL_TYPE), + NULL, NULL, NULL); return TCL_OK; } @@ -8304,7 +8316,7 @@ NRTailcallEval( int objc; Tcl_Obj **objv; - TclNRDeferCallback(interp, TailcallCleanup, listPtr, nsObjPtr, NULL, NULL); + TclNRDeferCallback(interp, TailcallCleanup, listPtr, nsObjPtr, NULL,NULL); if (result == TCL_OK) { result = TclGetNamespaceFromObj(interp, nsObjPtr, &nsPtr); if (result == TCL_OK) { @@ -8401,7 +8413,6 @@ static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; iPtr->varFramePtr = (context).varFramePtr; \ iPtr->cmdFramePtr = (context).cmdFramePtr; \ iPtr->lineLABCPtr = (context).lineLABCPtr - #define iPtr ((Interp *) interp) @@ -8421,7 +8432,7 @@ YieldCallback( /* yieldTo: invoke the command using tailcall tech */ TEOV_callback *cbPtr; ClientData nsPtr = data[2]; - + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, NULL, NULL); cbPtr = TOP_CB(interp); @@ -8431,7 +8442,7 @@ YieldCallback( } return TCL_OK; } - + int TclNRYieldObjCmd( ClientData clientData, @@ -8507,7 +8518,7 @@ TclNRYieldToObjCmd( Tcl_Panic("yieldTo failed to find the proper namespace"); } Tcl_IncrRefCount(nsObjPtr); - + TclNRAddCallback(interp, YieldCallback, corPtr, listPtr, nsObjPtr, NULL); TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); @@ -8716,14 +8727,14 @@ NRInterpCoroutine( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "coroutine \"", Tcl_GetString(objv[0]), "\" is already running", NULL); - Tcl_SetErrorCode(interp, "COROUTINE_BUSY", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "BUSY", NULL); return TCL_ERROR; } /* - * Swap the interp's environment to make it suitable to run this coroutine. - * TEBC needs no info to resume executing after a suspension: the codePtr - * will be read from the execEnv's saved bottomPtr. + * Swap the interp's environment to make it suitable to run this + * coroutine. TEBC needs no info to resume executing after a suspension: + * the codePtr will be read from the execEnv's saved bottomPtr. */ if (objc == 2) { @@ -8761,7 +8772,7 @@ TclNRCoroutineObjCmd( Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; int result; - + if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); return TCL_ERROR; @@ -8868,19 +8879,20 @@ TclNRCoroutineObjCmd( { Tcl_HashSearch hSearch; - Tcl_HashEntry* hePtr; + Tcl_HashEntry *hePtr; - corPtr->base.lineLABCPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); + corPtr->base.lineLABCPtr = (Tcl_HashTable *) + ckalloc(sizeof(Tcl_HashTable)); Tcl_InitHashTable(corPtr->base.lineLABCPtr, TCL_ONE_WORD_KEYS); for (hePtr = Tcl_FirstHashEntry(iPtr->lineLABCPtr,&hSearch); - hePtr; - hePtr = Tcl_NextHashEntry(&hSearch)) { + hePtr; hePtr = Tcl_NextHashEntry(&hSearch)) { int isNew; - Tcl_HashEntry* newPtr = - Tcl_CreateHashEntry(corPtr->base.lineLABCPtr, - (char *) Tcl_GetHashKey (iPtr->lineLABCPtr, hePtr), + Tcl_HashEntry *newPtr = + Tcl_CreateHashEntry(corPtr->base.lineLABCPtr, + (char *) Tcl_GetHashKey(iPtr->lineLABCPtr, hePtr), &isNew); + Tcl_SetHashValue(newPtr, Tcl_GetHashValue(hePtr)); } @@ -8908,11 +8920,11 @@ TclNRCoroutineObjCmd( iPtr->varFramePtr = iPtr->rootFramePtr; iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; corPtr->auxNumLevels = iPtr->numLevels; - + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; - result = TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); + result = TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); return TclNRRunCallbacks(interp, result, rootPtr, 0); } -- cgit v0.12 From 5291a66f405cc624cacbafb313ad1a5c0e34e3a5 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Dec 2009 19:00:24 +0000 Subject: * generic/tclExecute.c (TEBC): silence warning about pcAdjustment --- ChangeLog | 4 ++++ generic/tclExecute.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 53f0fd1..d6d53ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-12-08 Miguel Sofer + + * generic/tclExecute.c (TEBC): silence warning about pcAdjustment + 2009-12-08 Donal K. Fellows * generic/tclExecute.c (TclExecuteByteCode): Make the dict opcodes diff --git a/generic/tclExecute.c b/generic/tclExecute.c index e552dad..d8cd7f6 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.453 2009/12/08 13:58:04 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.454 2009/12/08 19:00:25 msofer Exp $ */ #include "tclInt.h" @@ -2797,6 +2797,8 @@ TclExecuteByteCode( int type = PTR2INT(callbackPtr->data[0]); ClientData param = callbackPtr->data[1]; + pcAdjustment = 0; /* silence warning */ + NRE_ASSERT(callbackPtr != BP->rootPtr); NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); -- cgit v0.12 From b475ec90cf97e4e17e2fda2954e1983c882ab339 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Dec 2009 20:56:28 +0000 Subject: * generic/tclBasic.c: Partial nre-enabling of coroutines. * generic/tclExecute.c: The initial call still requires its * generic/tclInt.h: own instance of tebc, but on resume coros can execute in the caller's tebc. --- ChangeLog | 5 +++ generic/tclBasic.c | 87 +++++++++++++++++++++++++++++----------------------- generic/tclExecute.c | 73 +++++++++++++++++++++++++++---------------- generic/tclInt.h | 5 ++- 4 files changed, 104 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6d53ee..06d9a4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-12-08 Miguel Sofer + * generic/tclBasic.c: Partial nre-enabling of coroutines. + * generic/tclExecute.c: The initial call still requires its + * generic/tclInt.h: own instance of tebc, but on resume coros + can execute in the caller's tebc. + * generic/tclExecute.c (TEBC): silence warning about pcAdjustment 2009-12-08 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 11da4cc..3d777d3 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.417 2009/12/08 14:18:34 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.418 2009/12/08 20:56:29 msofer Exp $ */ #include "tclInt.h" @@ -143,7 +143,8 @@ static Tcl_NRPostProc NRRunObjProc; static Tcl_NRPostProc TailcallCleanup; static Tcl_NRPostProc NRTailcallEval; -static Tcl_NRPostProc YieldCallback; +static Tcl_NRPostProc RewindCoroutineCallback; +static Tcl_NRPostProc YieldToCallback; /* * The following structure define the commands in the Tcl core. @@ -8417,29 +8418,24 @@ static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; #define iPtr ((Interp *) interp) static int -YieldCallback( +YieldToCallback( ClientData data[], Tcl_Interp *interp, int result) { - CoroutineData *corPtr = data[0]; + /* CoroutineData *corPtr = data[0];*/ Tcl_Obj *listPtr = data[1]; + ClientData nsPtr = data[2]; - corPtr->stackLevel = NULL; /* mark suspended */ - iPtr->execEnvPtr = corPtr->callerEEPtr; - - if (listPtr) { - /* yieldTo: invoke the command using tailcall tech */ - TEOV_callback *cbPtr; - ClientData nsPtr = data[2]; - - TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, - NULL, NULL); - cbPtr = TOP_CB(interp); - TOP_CB(interp) = cbPtr->nextPtr; - - TclSpliceTailcall(interp, cbPtr); - } + /* yieldTo: invoke the command using tailcall tech */ + TEOV_callback *cbPtr; + + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, + NULL, NULL); + cbPtr = TOP_CB(interp); + TOP_CB(interp) = cbPtr->nextPtr; + + TclSpliceTailcall(interp, cbPtr); return TCL_OK; } @@ -8471,7 +8467,6 @@ TclNRYieldObjCmd( iPtr->numLevels = corPtr->auxNumLevels; corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; - TclNRAddCallback(interp, YieldCallback, corPtr, NULL, NULL, NULL); TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8518,8 +8513,15 @@ TclNRYieldToObjCmd( Tcl_Panic("yieldTo failed to find the proper namespace"); } Tcl_IncrRefCount(nsObjPtr); + + /* + * Add the callback in the caller's env, then instruct TEBC to yield + */ - TclNRAddCallback(interp, YieldCallback, corPtr, listPtr, nsObjPtr, NULL); + iPtr->execEnvPtr = corPtr->callerEEPtr; + TclNRAddCallback(interp, YieldToCallback, corPtr, listPtr, nsObjPtr, NULL); + iPtr->execEnvPtr = corPtr->eePtr; + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8527,11 +8529,19 @@ TclNRYieldToObjCmd( static int +RewindCoroutineCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + return Tcl_RestoreInterpState(interp, data[0]); +} + +static int RewindCoroutine( CoroutineData *corPtr, int result) { - Tcl_Obj *objPtr; Tcl_Interp *interp = corPtr->eePtr->interp; Tcl_InterpState state = Tcl_SaveInterpState(interp, result); @@ -8540,17 +8550,10 @@ RewindCoroutine( NRE_ASSERT(corPtr->eePtr->bottomPtr != NULL); NRE_ASSERT(corPtr->eePtr != iPtr->execEnvPtr); - TclNewObj(objPtr); - Tcl_IncrRefCount(objPtr); - corPtr->eePtr->rewind = 1; - result = NRInterpCoroutine(corPtr, interp, 1, &objPtr); - - NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); - - Tcl_DecrRefCount(objPtr); - result = Tcl_RestoreInterpState(interp, state); - return result; + TclNRAddCallback(interp, RewindCoroutineCallback, state, + NULL, NULL, NULL); + return NRInterpCoroutine(corPtr, interp, 0, NULL); } static void @@ -8718,7 +8721,11 @@ NRInterpCoroutine( CoroutineData *corPtr = clientData; int nestNumLevels = corPtr->auxNumLevels; - if ((objc != 1) && (objc != 2)) { + /* + * objc==0 indicates a call to rewind the coroutine + */ + + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; } @@ -8750,9 +8757,13 @@ NRInterpCoroutine( TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); + corPtr->callerBP = NULL;; corPtr->callerEEPtr = iPtr->execEnvPtr; iPtr->execEnvPtr = corPtr->eePtr; - return TclExecuteByteCode(interp, NULL); + + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), NULL, + NULL, NULL); + return TCL_OK; } int @@ -8771,7 +8782,6 @@ TclNRCoroutineObjCmd( const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; - int result; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); @@ -8810,7 +8820,8 @@ TclNRCoroutineObjCmd( corPtr->callerEEPtr = iPtr->execEnvPtr; corPtr->eePtr->corPtr = corPtr; corPtr->stackLevel = NULL; - + corPtr->callerBP = NULL; + /* * On first run just set a 0 level-offset, the natural numbering is * correct. The offset will be fixed for later runs. @@ -8924,9 +8935,9 @@ TclNRCoroutineObjCmd( TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; - result = TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); + TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); - return TclNRRunCallbacks(interp, result, rootPtr, 0); + return TclNRRunCallbacks(interp, TCL_OK, rootPtr, 0); } /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d8cd7f6..039ad24 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.454 2009/12/08 19:00:25 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.455 2009/12/08 20:56:29 msofer Exp $ */ #include "tclInt.h" @@ -205,6 +205,7 @@ typedef struct BottomData { cleanup = BP->cleanup; \ TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; \ tosPtr = TAUX.esPtr->tosPtr; \ + TAUX.compiledLocals = iPtr->varFramePtr->compiledLocals;\ } while (0) #define PUSH_TAUX_OBJ(objPtr) \ @@ -2006,7 +2007,7 @@ TclExecuteByteCode( iPtr->execEnvPtr->bottomPtr = BP; TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; - TAUX.compiledLocals = iPtr->varFramePtr->compiledLocals;// + TAUX.compiledLocals = iPtr->varFramePtr->compiledLocals; pc = codePtr->codeStart; catchTop = initCatchTop; @@ -2817,15 +2818,17 @@ TclExecuteByteCode( if (param) { codePtr = param; goto nonRecursiveCallStart; + } else { + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + + corPtr->callerBP = BP; + goto resumeCoroutine; } - /* NOT CALLED, does not (yet?) work */ - goto resumeCoroutine; - case TCL_NR_TAILCALL_TYPE: - /* - * A request to perform a tailcall: just drop this - * bytecode. - */ - + break; + case TCL_NR_TAILCALL_TYPE: + /* + * A request to perform a tailcall: just drop this + * bytecode. */ #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " Tailcall request received\n"); @@ -2860,34 +2863,35 @@ TclExecuteByteCode( pc--; goto checkForCatch; } + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); NRE_ASSERT(corPtr->stackLevel != NULL); NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); if (corPtr->stackLevel != &TAUX) { - Tcl_SetResult(interp, - "cannot yield: C stack busy", TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", - "CANT_YIELD", NULL); + Tcl_SetResult(interp, "cannot yield: C stack busy", + TCL_STATIC); + Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); TRESULT = TCL_ERROR; pc--; goto checkForCatch; } - + /* * Save our state and return */ - - NR_DATA_BURY(); - TAUX.esPtr->tosPtr = tosPtr; - iPtr->execEnvPtr->bottomPtr = BP; - return TCL_OK; + + corPtr->stackLevel = NULL; /* mark suspended */ + + iPtr->execEnvPtr = corPtr->callerEEPtr; + OBP = corPtr->callerBP; + goto returnToCaller; } default: Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } } - + pc += pcAdjustment; nonRecursiveCallReturn: @@ -7448,7 +7452,7 @@ TclExecuteByteCode( statePtr->typePtr = &dictIteratorType; statePtr->internalRep.twoPtrValue.ptr1 = searchPtr; statePtr->internalRep.twoPtrValue.ptr2 = dictPtr; - varPtr = LOCAL(opnd);// + varPtr = LOCAL(opnd); if (varPtr->value.objPtr) { if (varPtr->value.objPtr->typePtr != &dictIteratorType) { TclDecrRefCount(varPtr->value.objPtr); @@ -7971,13 +7975,10 @@ TclExecuteByteCode( NR_DATA_DIG(); if (TOP_CB(interp) == BP->rootPtr) { /* - * The bytecode is returning, all callbacks were run. Remove the - * caller's arguments and keep processing the caller. + * The bytecode is returning, all callbacks were run: keep + * processing the caller. */ - TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; - TAUX.compiledLocals = iPtr->varFramePtr->compiledLocals; - goto nonRecursiveCallReturn; } else { TEOV_callback *callbackPtr = TOP_CB(iPtr); @@ -8009,6 +8010,24 @@ TclExecuteByteCode( } } + /* + * Deal with coros running in the caller's TEBC + */ + + if (iPtr->execEnvPtr->corPtr) { + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + /* + * The coro is returning internally iff + * - this is its base TEBC + * - this is it's callers TEBC, signalled by callerBP!=NULL + */ + + OBP = corPtr->callerBP; + if (OBP && (corPtr->stackLevel == &TAUX)) { + goto returnToCaller; + } + } + iPtr->execEnvPtr->bottomPtr = NULL; return TRESULT; } diff --git a/generic/tclInt.h b/generic/tclInt.h index 6eb542e..91f301f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.451 2009/12/08 01:34:05 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.452 2009/12/08 20:56:29 msofer Exp $ */ #ifndef _TCLINT @@ -1405,6 +1405,9 @@ typedef struct CoroutineData { * numLevels of the create/resume command is * stored here; for suspended coroutines it * holds the nesting numLevels at yield. */ + struct BottomData *callerBP;/* The caller's bottomPointer, if the coro is + * running in the caller's TEBC instance. NULL + * otherwise. */ } CoroutineData; typedef struct ExecEnv { -- cgit v0.12 From 8c26b3a75b9dd2609485169cd288ca77926bd8d6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Dec 2009 21:44:56 +0000 Subject: baby steps towards nre-enabling coroutine first run --- generic/tclBasic.c | 36 ++++++++---------------------------- generic/tclExecute.c | 18 ++++++++++++++---- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3d777d3..072dfe3 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.418 2009/12/08 20:56:29 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.419 2009/12/08 21:44:56 msofer Exp $ */ #include "tclInt.h" @@ -8394,8 +8394,6 @@ static int RewindCoroutine(CoroutineData *corPtr, int result); static void DeleteCoroutine(ClientData clientData); static void PlugCoroutineChains(CoroutineData *corPtr); -static int NRCoroutineFirstCallback(ClientData data[], - Tcl_Interp *interp, int result); static int NRCoroutineExitCallback(ClientData data[], Tcl_Interp *interp, int result); static int NRCoroutineCallerCallback(ClientData data[], @@ -8590,26 +8588,6 @@ PlugCoroutineChains( } static int -NRCoroutineFirstCallback( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - CoroutineData *corPtr = data[0]; - register CmdFrame *tmpPtr = iPtr->cmdFramePtr; - - if (corPtr->eePtr) { - while (tmpPtr->nextPtr != corPtr->caller.cmdFramePtr) { - tmpPtr = tmpPtr->nextPtr; - } - - corPtr->base.cmdFramePtr = tmpPtr; - } - - return result; -} - -static int NRCoroutineCallerCallback( ClientData data[], Tcl_Interp *interp, @@ -8674,9 +8652,7 @@ NRCoroutineExitCallback( NRE_ASSERT(TOP_CB(interp) == NULL); NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); NRE_ASSERT(!COR_IS_SUSPENDED(corPtr)); - NRE_ASSERT((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineCallerCallback) - || ((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineFirstCallback) && - (corPtr->callerEEPtr->callbackPtr->nextPtr->procPtr == NRCoroutineCallerCallback))); + NRE_ASSERT((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineCallerCallback)); NRE_ASSERT(iPtr->framePtr->compiledLocals == NULL); TclPopStackFrame(interp); @@ -8859,8 +8835,6 @@ TclNRCoroutineObjCmd( TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); - TclNRAddCallback(interp, NRCoroutineFirstCallback, corPtr, NULL, NULL, - NULL); SAVE_CONTEXT(corPtr->caller); iPtr->execEnvPtr = corPtr->eePtr; @@ -8880,6 +8854,12 @@ TclNRCoroutineObjCmd( corPtr->running = NULL_CONTEXT; /* + * Signal TEBC that it has to initialize the base cmdFramePtr. + */ + + corPtr->base.cmdFramePtr = NULL; + + /* * #280. * Provide the new coroutine with its own copy of the lineLABCPtr * hashtable for literal command arguments in bytecode. Note that that diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 039ad24..f54bb54 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.455 2009/12/08 20:56:29 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.456 2009/12/08 21:44:56 msofer Exp $ */ #include "tclInt.h" @@ -2031,9 +2031,19 @@ TclExecuteByteCode( bcFramePtr->cmd.str.cmd = NULL; bcFramePtr->cmd.str.len = 0; - if (iPtr->execEnvPtr->rewind) { - TRESULT = TCL_ERROR; - goto abnormalReturn; + if (iPtr->execEnvPtr->corPtr) { + if (!iPtr->execEnvPtr->corPtr->base.cmdFramePtr) { + /* + * First coroutine run, the base cmdFramePtr has not yet been + * initialized. Do it now. + */ + + iPtr->execEnvPtr->corPtr->base.cmdFramePtr = bcFramePtr; + } + if (iPtr->execEnvPtr->rewind) { + TRESULT = TCL_ERROR; + goto abnormalReturn; + } } #ifdef TCL_COMPILE_DEBUG -- cgit v0.12 From 241690109568a5350f8d8c672078b281fc19413b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Dec 2009 22:58:11 +0000 Subject: minor cleanup --- generic/tclBasic.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 072dfe3..5f30f0d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.419 2009/12/08 21:44:56 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.420 2009/12/08 22:58:11 msofer Exp $ */ #include "tclInt.h" @@ -8665,7 +8665,6 @@ NRCoroutineExitCallback( TclDeleteExecEnv(corPtr->eePtr); corPtr->eePtr = NULL; - SAVE_CONTEXT(corPtr->running); RESTORE_CONTEXT(corPtr->caller); NRE_ASSERT(iPtr->framePtr == corPtr->caller.framePtr); @@ -8798,10 +8797,6 @@ TclNRCoroutineObjCmd( corPtr->stackLevel = NULL; corPtr->callerBP = NULL; - /* - * On first run just set a 0 level-offset, the natural numbering is - * correct. The offset will be fixed for later runs. - */ Tcl_DStringInit(&ds); if (nsPtr != iPtr->globalNsPtr) { @@ -8850,14 +8845,16 @@ TclNRCoroutineObjCmd( framePtr->objc = objc-2; framePtr->objv = &objv[2]; - SAVE_CONTEXT(corPtr->base); - corPtr->running = NULL_CONTEXT; - /* - * Signal TEBC that it has to initialize the base cmdFramePtr. + * Save the base context. The base cmdFramePtr is unknown at this time: it + * will be allocated in the Tcl stack. So signal TEBC that it has to + * initialize the base cmdFramePtr by setting it to NULL. */ + SAVE_CONTEXT(corPtr->base); corPtr->base.cmdFramePtr = NULL; + corPtr->running = NULL_CONTEXT; + /* * #280. -- cgit v0.12 From efa921be53b01dc7f914a3fd6386749d503378d7 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 8 Dec 2009 23:04:54 +0000 Subject: added comment confessing my puzzlement --- generic/tclBasic.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 5f30f0d..a0e7b71 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.420 2009/12/08 22:58:11 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.421 2009/12/08 23:04:54 msofer Exp $ */ #include "tclInt.h" @@ -8914,6 +8914,13 @@ TclNRCoroutineObjCmd( iPtr->evalFlags |= TCL_EVAL_REDIRECT; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); + /* + * This should just be returning TCL_OK, to let the coro run in the + * caller's TEBC instance if available. BUT this causes an error in + * TclStackFree, couldn't yet find why. It is a bit of a mistery. + * msofer, 2009-12-08 + */ + return TclNRRunCallbacks(interp, TCL_OK, rootPtr, 0); } -- cgit v0.12 From ee4f2de93706ea371c0a91dca22943cee112b8bb Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 9 Dec 2009 12:16:46 +0000 Subject: * generic/tclExecute.c (TclStackFree): Improved panic msg --- ChangeLog | 4 ++++ generic/tclExecute.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06d9a4e..6051345 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-12-08 Miguel Sofer + * generic/tclExecute.c (TclStackFree): Improved panic msg + +2009-12-08 Miguel Sofer + * generic/tclBasic.c: Partial nre-enabling of coroutines. * generic/tclExecute.c: The initial call still requires its * generic/tclInt.h: own instance of tebc, but on resume coros diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f54bb54..831b7c3 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.456 2009/12/08 21:44:56 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.457 2009/12/09 12:16:46 msofer Exp $ */ #include "tclInt.h" @@ -1168,7 +1168,8 @@ TclStackFree( marker = *markerPtr; if ((freePtr != NULL) && (MEMSTART(markerPtr) != (Tcl_Obj **)freePtr)) { - Tcl_Panic("TclStackFree: incorrect freePtr. Call out of sequence?"); + Tcl_Panic("TclStackFree: incorrect freePtr (%p != %p). Call out of sequence?", + freePtr, MEMSTART(markerPtr)); } esPtr->tosPtr = markerPtr - 1; -- cgit v0.12 From 284f9241b726a8693f5915c2e37abac122cc1a8a Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 9 Dec 2009 16:41:18 +0000 Subject: Add missing Tcl_SetErrorCode calls. --- ChangeLog | 5 +++++ generic/tclBasic.c | 59 ++++++++++++++++++++++++++++++++---------------------- 2 files changed, 40 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6051345..4946c89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-09 Donal K. Fellows + + * generic/tclBasic.c: Added some of the missing setting of errorcode + values. + 2009-12-08 Miguel Sofer * generic/tclExecute.c (TclStackFree): Improved panic msg diff --git a/generic/tclBasic.c b/generic/tclBasic.c index a0e7b71..9839935 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.421 2009/12/08 23:04:54 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.422 2009/12/09 16:41:19 dkf Exp $ */ #include "tclInt.h" @@ -1545,7 +1545,7 @@ DeleteInterpProc( ckfree((char *) eclPtr->loc); } - Tcl_DeleteHashTable (&eclPtr->litInfo); + Tcl_DeleteHashTable(&eclPtr->litInfo); ckfree((char *) eclPtr); Tcl_DeleteHashEntry(hPtr); @@ -3559,6 +3559,7 @@ Tcl_GetMathFuncInfo( Tcl_AppendToObj(message, name, -1); Tcl_AppendToObj(message, "\"", 1); Tcl_SetObjResult(interp, message); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "MATHFUNC", name, NULL); *numArgsPtr = -1; *argTypesPtr = NULL; *procPtr = NULL; @@ -5029,8 +5030,8 @@ TclEvalEx( */ TclAdvanceLines(&line, p, parsePtr->commandStart); - TclAdvanceContinuations (&line, &clNext, - parsePtr->commandStart - outerScript); + TclAdvanceContinuations(&line, &clNext, + parsePtr->commandStart - outerScript); gotParse = 1; if (parsePtr->numWords > 0) { @@ -5075,8 +5076,8 @@ TclEvalEx( */ TclAdvanceLines(&wordLine, wordStart, tokenPtr->start); - TclAdvanceContinuations (&wordLine, &wordCLNext, - tokenPtr->start - outerScript); + TclAdvanceContinuations(&wordLine, &wordCLNext, + tokenPtr->start - outerScript); wordStart = tokenPtr->start; lines[objectsUsed] = TclWordKnownAtCompileTime(tokenPtr, NULL) @@ -5122,8 +5123,8 @@ TclEvalEx( } if (wordCLNext) { - TclContinuationsEnterDerived (objv[objectsUsed], - wordStart - outerScript, wordCLNext); + TclContinuationsEnterDerived(objv[objectsUsed], + wordStart - outerScript, wordCLNext); } } /* for loop */ iPtr->cmdFramePtr = eeFramePtr; @@ -5656,7 +5657,7 @@ TclArgumentBCRelease( CFWordBC *xPtr = Tcl_GetHashValue(hPtr); if (xPtr != cfwPtr) { - Tcl_Panic ("TclArgumentBC Enter/Release Mismatch"); + Tcl_Panic("TclArgumentBC Enter/Release Mismatch"); } if (cfwPtr->prevPtr) { @@ -5997,7 +5998,7 @@ TclNREvalObjEx( codePtr = TclCompileObj(interp, objPtr, invoker, word); TclNRAddCallback(interp, TEOEx_ByteCodeCallback, savedVarFramePtr, - objPtr, INT2PTR(allowExceptions), NULL); + objPtr, INT2PTR(allowExceptions), NULL); TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_BC_TYPE), codePtr, NULL, NULL); return TCL_OK; @@ -6039,11 +6040,11 @@ TclNREvalObjEx( */ ContLineLoc *saveCLLocPtr = iPtr->scriptCLLocPtr; - ContLineLoc *clLocPtr = TclContinuationsGet (objPtr); + ContLineLoc *clLocPtr = TclContinuationsGet(objPtr); if (clLocPtr) { iPtr->scriptCLLocPtr = clLocPtr; - Tcl_Preserve (iPtr->scriptCLLocPtr); + Tcl_Preserve(iPtr->scriptCLLocPtr); } else { iPtr->scriptCLLocPtr = NULL; } @@ -6121,7 +6122,7 @@ TclNREvalObjEx( */ if (iPtr->scriptCLLocPtr) { - Tcl_Release (iPtr->scriptCLLocPtr); + Tcl_Release(iPtr->scriptCLLocPtr); } iPtr->scriptCLLocPtr = saveCLLocPtr; TclDecrRefCount(objPtr); @@ -6224,6 +6225,8 @@ ProcessUnexpectedResult( * result code was returned. */ int returnCode) /* The unexpected result code. */ { + char buf[TCL_INTEGER_SPACE]; + Tcl_ResetResult(interp); if (returnCode == TCL_BREAK) { Tcl_AppendResult(interp, @@ -6235,6 +6238,8 @@ ProcessUnexpectedResult( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "command returned bad code: %d", returnCode)); } + sprintf(buf, "%d", returnCode); + Tcl_SetErrorCode(interp, "TCL", "UNEXPECTED_RESULT_CODE", buf, NULL); } /* @@ -6653,7 +6658,7 @@ Tcl_ExprString( * An empty string. Just set the interpreter's result to 0. */ - Tcl_SetResult(interp, "0", TCL_VOLATILE); + Tcl_SetObjResult(interp, Tcl_NewIntObj(0)); } else { Tcl_Obj *resultPtr, *exprObj = Tcl_NewStringObj(expr, -1); @@ -6664,13 +6669,13 @@ Tcl_ExprString( Tcl_SetObjResult(interp, resultPtr); Tcl_DecrRefCount(resultPtr); } + } - /* - * Force the string rep of the interp result. - */ + /* + * Force the string rep of the interp result. + */ - (void) Tcl_GetStringResult(interp); - } + (void) Tcl_GetStringResult(interp); return code; } @@ -7206,6 +7211,8 @@ ExprIsqrtFunc( negarg: Tcl_SetResult(interp, "square root of negative argument", TCL_STATIC); + Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", + "domain error: argument not in valid range", NULL); return TCL_ERROR; } @@ -7876,6 +7883,7 @@ MathFuncWrongNumArgs( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "too %s arguments for math function \"%s\"", (found < expected ? "few" : "many"), name)); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); } #ifdef USE_DTRACE @@ -8155,7 +8163,7 @@ Tcl_NREvalObjv( { return TclNREvalObjv(interp, objc, objv, flags, NULL); } - + int Tcl_NRCmdSwap( Tcl_Interp *interp, @@ -8192,7 +8200,7 @@ Tcl_NRCmdSwap( */ void -TclSpliceTailcall ( +TclSpliceTailcall( Tcl_Interp *interp, TEOV_callback *tailcallPtr) { @@ -8214,8 +8222,8 @@ TclSpliceTailcall ( } if (!runPtr) { /* - * If we are tailcalling out of a coroutine, the splicing spot is - * in the caller's execEnv: go find it! + * If we are tailcalling out of a coroutine, the splicing spot is in + * the caller's execEnv: go find it! */ CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; @@ -8263,6 +8271,7 @@ TclNRTailcallObjCmd( Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); return TCL_ERROR; } @@ -8292,7 +8301,7 @@ TclNRTailcallObjCmd( */ if (iPtr->cmdFramePtr->type == TCL_LOCATION_BC) { - TclArgumentBCRelease (interp, iPtr->cmdFramePtr); + TclArgumentBCRelease(interp, iPtr->cmdFramePtr); } TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); @@ -8455,6 +8464,7 @@ TclNRYieldObjCmd( if (!corPtr) { Tcl_SetResult(interp, "yield can only be called in a coroutine", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", NULL); return TCL_ERROR; } @@ -8492,6 +8502,7 @@ TclNRYieldToObjCmd( if (!corPtr) { Tcl_SetResult(interp, "yieldTo can only be called in a coroutine", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", NULL); return TCL_ERROR; } -- cgit v0.12 From e699453c93c0d61c1571e533dd550088858bd10f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 9 Dec 2009 17:55:00 +0000 Subject: * generic/tclBasic.c: Insure correct lifetime of varFrame's (objc,objv)for coroutines. * generic/tclExecute.c: Code regrouping --- ChangeLog | 7 +++++++ generic/tclBasic.c | 22 +++++++++++++++------- generic/tclExecute.c | 27 +++++++++++++++------------ 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4946c89..46b7254 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-09 Miguel Sofer + + * generic/tclBasic.c: Insure correct lifetime of varFrame's + (objc,objv)for coroutines. + + * generic/tclExecute.c: Code regrouping + 2009-12-09 Donal K. Fellows * generic/tclBasic.c: Added some of the missing setting of errorcode diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9839935..d427a3a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.422 2009/12/09 16:41:19 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.423 2009/12/09 17:55:01 msofer Exp $ */ #include "tclInt.h" @@ -8651,8 +8651,9 @@ NRCoroutineExitCallback( int result) { CoroutineData *corPtr = data[0]; + Tcl_Obj *arglistPtr = data[1]; Command *cmdPtr = corPtr->cmdPtr; - + /* * This runs at the bottom of the Coroutine's execEnv: it will be executed * when the coroutine returns or is wound down, but not when it yields. It @@ -8667,7 +8668,8 @@ NRCoroutineExitCallback( NRE_ASSERT(iPtr->framePtr->compiledLocals == NULL); TclPopStackFrame(interp); - + Tcl_DecrRefCount(arglistPtr); + cmdPtr->deleteProc = NULL; Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); TclCleanupCommandMacro(cmdPtr); @@ -8768,7 +8770,8 @@ TclNRCoroutineObjCmd( const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; - + Tcl_Obj *arglistPtr; + if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); return TCL_ERROR; @@ -8853,8 +8856,12 @@ TclNRCoroutineObjCmd( ckfree((char *) corPtr); return TCL_ERROR; } - framePtr->objc = objc-2; - framePtr->objv = &objv[2]; + arglistPtr = Tcl_NewListObj(objc-2, &objv[2]); + Tcl_IncrRefCount(arglistPtr); + Tcl_ListObjGetElements(interp, arglistPtr, &framePtr->objc, + &framePtr->objv); + //framePtr->objc = objc-2; + //framePtr->objv = &objv[2]; /* * Save the base context. The base cmdFramePtr is unknown at this time: it @@ -8920,7 +8927,8 @@ TclNRCoroutineObjCmd( iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; corPtr->auxNumLevels = iPtr->numLevels; - TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, arglistPtr, + NULL,NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 831b7c3..3fac4ea 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.457 2009/12/09 12:16:46 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.458 2009/12/09 17:55:01 msofer Exp $ */ #include "tclInt.h" @@ -2001,10 +2001,6 @@ TclExecuteByteCode( auxObjList = NULL; NR_DATA_INIT(); /* record this level's data */ - if (iPtr->execEnvPtr->corPtr && !iPtr->execEnvPtr->corPtr->stackLevel) { - iPtr->execEnvPtr->corPtr->stackLevel = &TAUX; - } - iPtr->execEnvPtr->bottomPtr = BP; TAUX.esPtr = iPtr->execEnvPtr->execStackPtr; @@ -2033,14 +2029,22 @@ TclExecuteByteCode( bcFramePtr->cmd.str.len = 0; if (iPtr->execEnvPtr->corPtr) { - if (!iPtr->execEnvPtr->corPtr->base.cmdFramePtr) { + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + if (!corPtr->base.cmdFramePtr) { /* - * First coroutine run, the base cmdFramePtr has not yet been - * initialized. Do it now. + * First coroutine run, incomplete init: + * - base.cmdFramePtr not set + * - need to break the BP chain */ - iPtr->execEnvPtr->corPtr->base.cmdFramePtr = bcFramePtr; + corPtr->base.cmdFramePtr = bcFramePtr; + BP->prevBottomPtr = NULL; } + + if (!corPtr->stackLevel) { + corPtr->stackLevel = &TAUX; + } + if (iPtr->execEnvPtr->rewind) { TRESULT = TCL_ERROR; goto abnormalReturn; @@ -2888,11 +2892,10 @@ TclExecuteByteCode( } /* - * Save our state and return + * Mark suspended, save our state and return */ - corPtr->stackLevel = NULL; /* mark suspended */ - + corPtr->stackLevel = NULL; iPtr->execEnvPtr = corPtr->callerEEPtr; OBP = corPtr->callerBP; goto returnToCaller; -- cgit v0.12 From ae9c04930f6142e841888670b2ec1909593e36b5 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 9 Dec 2009 17:57:03 +0000 Subject: remove accidentally committed C++ style comments --- generic/tclBasic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d427a3a..75e896a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.423 2009/12/09 17:55:01 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.424 2009/12/09 17:57:03 msofer Exp $ */ #include "tclInt.h" @@ -8860,8 +8860,6 @@ TclNRCoroutineObjCmd( Tcl_IncrRefCount(arglistPtr); Tcl_ListObjGetElements(interp, arglistPtr, &framePtr->objc, &framePtr->objv); - //framePtr->objc = objc-2; - //framePtr->objv = &objv[2]; /* * Save the base context. The base cmdFramePtr is unknown at this time: it -- cgit v0.12 From 04598fc6cbdc102630fee4976e6afc6c2edd08bc Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 9 Dec 2009 18:40:47 +0000 Subject: Revert the 1.19 -> 1.20 commit now that bug 2487771 appears fixed. --- tests/oo.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/oo.test b/tests/oo.test index a0fbc55..e42c2ca 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.33 2009/11/27 07:27:53 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.34 2009/12/09 18:40:47 dgp Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -2014,7 +2014,7 @@ test oo-22.1 {OO and info frame} -setup { list [i level] [i frames] [dict get [c frame] object] } -cleanup { c destroy -} -result {1 {{* cmd {info frame 0} method frames class ::c level 0} {* cmd {info frame 0} method frames object ::i level 0}} ::c} +} -result {1 {{type source line * file * cmd {info frame 0} method frames class ::c level 0} {type source line * file * cmd {info frame 0} method frames object ::i level 0}} ::c} # Prove that the issue in [Bug 1865054] isn't an issue any more test oo-23.1 {Self-like derivation; complex case!} -setup { -- cgit v0.12 From b17b07981f00b8dfdb3894baeb9a5f6e67cf2010 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 9 Dec 2009 23:03:04 +0000 Subject: * generic/tclIO.c: [Bug 2901998]: Applied Alexandre Ferrieux's patch fixing the inconsistent buffered I/O. Tcl's I/O now flushes buffered output before reading, discards buffered input before writing, etc. --- ChangeLog | 7 +++++++ generic/tclIO.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46b7254..8149ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-09 Andreas Kupries + + * generic/tclIO.c: [Bug 2901998]: Applied Alexandre Ferrieux's + patch fixing the inconsistent buffered I/O. Tcl's I/O now flushes + buffered output before reading, discards buffered input before + writing, etc. + 2009-12-09 Miguel Sofer * generic/tclBasic.c: Insure correct lifetime of varFrame's diff --git a/generic/tclIO.c b/generic/tclIO.c index 7044381..4e3bd4b 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.168 2009/11/18 22:41:41 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.169 2009/12/09 23:03:04 andreas_kupries Exp $ */ #include "tclInt.h" @@ -120,6 +120,7 @@ static int WriteChars(Channel *chanPtr, const char *src, static Tcl_Obj * FixLevelCode(Tcl_Obj *msg); static void SpliceChannel(Tcl_Channel chan); static void CutChannel(Tcl_Channel chan); +static int WillRead(Channel *chanPtr); /* * Simplifying helper macros. All may use their argument(s) multiple times. @@ -276,6 +277,10 @@ ChanRead( int dstSize, int *errnoPtr) { + if (WillRead(chanPtr) < 0) { + return -1; + } + return chanPtr->typePtr->inputProc(chanPtr->instanceData, dst, dstSize, errnoPtr); } @@ -3831,6 +3836,33 @@ Tcl_WriteObj( } } +static void WillWrite(Channel *chanPtr) +{ + int inputBuffered; + + if ((chanPtr->typePtr->seekProc != NULL) + && ((inputBuffered = Tcl_InputBuffered((Tcl_Channel) chanPtr)) > 0)) { + int ignore; + DiscardInputQueued(chanPtr->state, 0); + ChanSeek(chanPtr, - inputBuffered, SEEK_CUR, &ignore); + } +} + +static int WillRead(Channel *chanPtr) +{ + if ((chanPtr->typePtr->seekProc != NULL) + && (Tcl_OutputBuffered((Tcl_Channel) chanPtr) > 0)) { + if ((chanPtr->state->curOutPtr != NULL) + && IsBufferReady(chanPtr->state->curOutPtr)) { + SetFlag(chanPtr->state, BUFFER_READY); + } + if (FlushChannel(NULL, chanPtr, 0) != 0) { + return -1; + } + } + return 0; +} + /* *---------------------------------------------------------------------- * @@ -3864,6 +3896,10 @@ WriteBytes( char *dst; int dstMax, sawLF, savedLF, total, dstLen, toWrite, translate; + if (srcLen) { + WillWrite(chanPtr); + } + total = 0; sawLF = 0; savedLF = 0; @@ -3965,6 +4001,10 @@ WriteChars( Tcl_Encoding encoding; char safe[BUFFER_PADDING]; + if (srcLen) { + WillWrite(chanPtr); + } + total = 0; sawLF = 0; savedLF = 0; @@ -6920,8 +6960,8 @@ Tcl_Tell( outputBuffered = Tcl_OutputBuffered(chan); if ((inputBuffered != 0) && (outputBuffered != 0)) { - Tcl_SetErrno(EFAULT); - return Tcl_LongAsWide(-1); + //Tcl_SetErrno(EFAULT); + //return Tcl_LongAsWide(-1); } /* @@ -6935,6 +6975,7 @@ Tcl_Tell( Tcl_SetErrno(result); return Tcl_LongAsWide(-1); } + if (inputBuffered != 0) { return curPos - inputBuffered; } @@ -7035,8 +7076,10 @@ Tcl_TruncateChannel( * pre-read input data. */ - if (Tcl_Seek(chan, (Tcl_WideInt) 0, SEEK_CUR) == Tcl_LongAsWide(-1)) { - return TCL_ERROR; + WillWrite(chanPtr); + + if (WillRead(chanPtr) < 0) { + return TCL_ERROR; } /* -- cgit v0.12 From 15f182d337ae87fc0027e61456f7a79bce13251a Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 9 Dec 2009 23:26:53 +0000 Subject: Killed c99/c++ comments left in by the IO patch. --- generic/tclIO.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 4e3bd4b..3f7724b 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.169 2009/12/09 23:03:04 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.170 2009/12/09 23:26:53 andreas_kupries Exp $ */ #include "tclInt.h" @@ -6959,11 +6959,6 @@ Tcl_Tell( inputBuffered = Tcl_InputBuffered(chan); outputBuffered = Tcl_OutputBuffered(chan); - if ((inputBuffered != 0) && (outputBuffered != 0)) { - //Tcl_SetErrno(EFAULT); - //return Tcl_LongAsWide(-1); - } - /* * Get the current position in the device and compute the position where * the next character will be read or written. Note that we prefer the -- cgit v0.12 From b3dcb75ee899428c0b1fae1ae3ddc2770030792b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 10 Dec 2009 09:21:37 +0000 Subject: Minor whitespace cleanup... nothing to see here --- compat/opendir.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compat/opendir.c b/compat/opendir.c index 6c8f263..1822261 100644 --- a/compat/opendir.c +++ b/compat/opendir.c @@ -5,14 +5,14 @@ * Unix systems that don't have such procedures. The origin of this code * is unclear, but it seems to have come originally from Larry Wall. * - * RCS: @(#) $Id: opendir.c,v 1.4 2007/04/16 13:36:34 dkf Exp $ + * RCS: @(#) $Id: opendir.c,v 1.5 2009/12/10 09:21:37 dkf Exp $ */ #include "tclInt.h" #undef DIRSIZ #define DIRSIZ(dp) \ - ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) + ((sizeof(struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) /* * open a directory. @@ -47,14 +47,14 @@ opendir( #ifndef pyr #define ODIRSIZ 14 -struct olddirect { +struct olddirect { ino_t od_ino; char od_name[ODIRSIZ]; }; #else /* a Pyramid in the ATT universe */ #define ODIRSIZ 248 -struct olddirect { +struct olddirect { long od_ino; short od_fill1, od_fill2; char od_name[ODIRSIZ]; -- cgit v0.12 From 5d16655f0b3f57cc706cdc882ed7d0d5edd9c14b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 10 Dec 2009 16:54:00 +0000 Subject: * generic/tclBasic.c: Reducing the # of moving parts for * generic/tclExecute.c: coroutines --- ChangeLog | 5 +++++ generic/tclBasic.c | 24 +----------------------- generic/tclExecute.c | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8149ad6..3719dbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-10 Miguel Sofer + + * generic/tclBasic.c: Reducing the # of moving parts for + * generic/tclExecute.c: coroutines + 2009-12-09 Andreas Kupries * generic/tclIO.c: [Bug 2901998]: Applied Alexandre Ferrieux's diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 75e896a..550aaf9 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.424 2009/12/09 17:57:03 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.425 2009/12/10 16:54:01 msofer Exp $ */ #include "tclInt.h" @@ -8401,7 +8401,6 @@ static int NRInterpCoroutine(ClientData clientData, Tcl_Obj *const objv[]); static int RewindCoroutine(CoroutineData *corPtr, int result); static void DeleteCoroutine(ClientData clientData); -static void PlugCoroutineChains(CoroutineData *corPtr); static int NRCoroutineExitCallback(ClientData data[], Tcl_Interp *interp, int result); @@ -8578,26 +8577,6 @@ DeleteCoroutine( } } -static void -PlugCoroutineChains( - CoroutineData *corPtr) -{ - /* - * Called to plug the coroutine's running environment into the caller's, - * so that the frame chains are uninterrupted. Note that the levels and - * numlevels may be wrong - we should fix them for the whole chain and not - * just the base! This probably breaks Tip 280 and should be fixed, or at - * least rethought as some of 280's functionality makes doubtful sense in - * presence of coroutines (maybe the cmdFrame should be attached to the - * execEnv and not the interp?) - */ - - corPtr->base.framePtr->callerPtr = corPtr->caller.framePtr; - corPtr->base.framePtr->callerVarPtr = corPtr->caller.varFramePtr; - - corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; -} - static int NRCoroutineCallerCallback( ClientData data[], @@ -8738,7 +8717,6 @@ NRInterpCoroutine( SAVE_CONTEXT(corPtr->caller); RESTORE_CONTEXT(corPtr->running); - PlugCoroutineChains(corPtr); corPtr->auxNumLevels = iPtr->numLevels; iPtr->numLevels += nestNumLevels; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3fac4ea..9597075 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.458 2009/12/09 17:55:01 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.459 2009/12/10 16:54:01 msofer Exp $ */ #include "tclInt.h" @@ -1972,20 +1972,21 @@ TclExecuteByteCode( * execution stack is large enough to execute this ByteCode. */ - if (!codePtr) { resumeCoroutine: + if (!codePtr) { + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; /* * Reawakening a suspended coroutine: the [yield] command is * returning. */ - NRE_ASSERT(iPtr->execEnvPtr->corPtr->eePtr == iPtr->execEnvPtr); - NRE_ASSERT(iPtr->execEnvPtr->corPtr != NULL); - NRE_ASSERT(iPtr->execEnvPtr->corPtr->eePtr == iPtr->execEnvPtr); - NRE_ASSERT(COR_IS_SUSPENDED(iPtr->execEnvPtr->corPtr)); + NRE_ASSERT(corPtr != NULL); + NRE_ASSERT(corPtr->eePtr == iPtr->execEnvPtr); + NRE_ASSERT(COR_IS_SUSPENDED(corPtr)); OBP = iPtr->execEnvPtr->bottomPtr; - iPtr->execEnvPtr->corPtr->stackLevel = &TAUX; + corPtr->stackLevel = &TAUX; + corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; if (iPtr->execEnvPtr->rewind) { TRESULT = TCL_ERROR; } @@ -2835,7 +2836,8 @@ TclExecuteByteCode( goto nonRecursiveCallStart; } else { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - + + codePtr = NULL; corPtr->callerBP = BP; goto resumeCoroutine; } -- cgit v0.12 From 5e126fd43fcba3e54f62f4e92afb95fcf492e683 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 10 Dec 2009 17:48:39 +0000 Subject: * generic/tclBasic.c: Reducing the # of moving parts for * generic/tclExecute.c: coroutines by delegating more to tebc; eliminate the special coroutine CallFrame. --- ChangeLog | 3 ++- generic/tclBasic.c | 27 +++------------------------ generic/tclExecute.c | 3 ++- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3719dbb..894fbd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2009-12-10 Miguel Sofer * generic/tclBasic.c: Reducing the # of moving parts for - * generic/tclExecute.c: coroutines + * generic/tclExecute.c: coroutines by delegating more to tebc; + eliminate the special coroutine CallFrame. 2009-12-09 Andreas Kupries diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 550aaf9..aa1e26b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.425 2009/12/10 16:54:01 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.426 2009/12/10 17:48:39 msofer Exp $ */ #include "tclInt.h" @@ -8630,7 +8630,6 @@ NRCoroutineExitCallback( int result) { CoroutineData *corPtr = data[0]; - Tcl_Obj *arglistPtr = data[1]; Command *cmdPtr = corPtr->cmdPtr; /* @@ -8645,10 +8644,6 @@ NRCoroutineExitCallback( NRE_ASSERT(!COR_IS_SUSPENDED(corPtr)); NRE_ASSERT((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineCallerCallback)); - NRE_ASSERT(iPtr->framePtr->compiledLocals == NULL); - TclPopStackFrame(interp); - Tcl_DecrRefCount(arglistPtr); - cmdPtr->deleteProc = NULL; Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); TclCleanupCommandMacro(cmdPtr); @@ -8742,13 +8737,11 @@ TclNRCoroutineObjCmd( Command *cmdPtr; CoroutineData *corPtr; Tcl_Obj *cmdObjPtr; - CallFrame *framePtr, **framePtrPtr; TEOV_callback *rootPtr = TOP_CB(interp); const char *fullName; const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; - Tcl_Obj *arglistPtr; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); @@ -8826,19 +8819,6 @@ TclNRCoroutineObjCmd( iPtr->execEnvPtr = corPtr->eePtr; - framePtrPtr = &framePtr; - if (TCL_OK != TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr, - NULL, 0)) { - corPtr->eePtr->corPtr = NULL; - TclDeleteExecEnv(corPtr->eePtr); - ckfree((char *) corPtr); - return TCL_ERROR; - } - arglistPtr = Tcl_NewListObj(objc-2, &objv[2]); - Tcl_IncrRefCount(arglistPtr); - Tcl_ListObjGetElements(interp, arglistPtr, &framePtr->objc, - &framePtr->objv); - /* * Save the base context. The base cmdFramePtr is unknown at this time: it * will be allocated in the Tcl stack. So signal TEBC that it has to @@ -8899,12 +8879,11 @@ TclNRCoroutineObjCmd( * the cleaner "proc is a named lambda" to do this properly. */ - iPtr->varFramePtr = iPtr->rootFramePtr; iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; corPtr->auxNumLevels = iPtr->numLevels; - TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, arglistPtr, - NULL,NULL); + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, + NULL, NULL, NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9597075..28fab46 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.459 2009/12/10 16:54:01 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.460 2009/12/10 17:48:39 msofer Exp $ */ #include "tclInt.h" @@ -2040,6 +2040,7 @@ TclExecuteByteCode( corPtr->base.cmdFramePtr = bcFramePtr; BP->prevBottomPtr = NULL; + iPtr->varFramePtr->callerPtr = iPtr->rootFramePtr; } if (!corPtr->stackLevel) { -- cgit v0.12 From 0f8faf662b1416020d07306938d282ee1f6eee1b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 10 Dec 2009 18:23:28 +0000 Subject: reorganization and better comments in TclNRCoroutineObjCmd() --- generic/tclBasic.c | 95 ++++++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 49 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index aa1e26b..079d034 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.426 2009/12/10 17:48:39 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.427 2009/12/10 18:23:28 msofer Exp $ */ #include "tclInt.h" @@ -8775,13 +8775,20 @@ TclNRCoroutineObjCmd( return TCL_ERROR; } - corPtr = (CoroutineData *) ckalloc(sizeof(CoroutineData)); - corPtr->eePtr = TclCreateExecEnv(interp, CORO_STACK_INITIAL_SIZE); - corPtr->callerEEPtr = iPtr->execEnvPtr; - corPtr->eePtr->corPtr = corPtr; - corPtr->stackLevel = NULL; - corPtr->callerBP = NULL; + /* + * We ARE creating the coroutine command: allocate the corresponding + * struct, add the callback in caller's env and record the caller's + * frames. + */ + corPtr = (CoroutineData *) ckalloc(sizeof(CoroutineData)); + TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, + NULL); + SAVE_CONTEXT(corPtr->caller); + + /* + * Create the coroutine command. + */ Tcl_DStringInit(&ds); if (nsPtr != iPtr->globalNsPtr) { @@ -8798,39 +8805,6 @@ TclNRCoroutineObjCmd( cmdPtr->refCount++; /* - * Be sure not to pass a canonical list for the command so that we insure - * the body is bytecompiled: we need a TEBC instance to handle [yield] - */ - - cmdObjPtr = Tcl_NewListObj(objc-2, &objv[2]); - TclGetString(cmdObjPtr); - TclFreeIntRep(cmdObjPtr); - cmdObjPtr->typePtr = NULL; - - /* - * Set up the callback in caller execEnv and switch to the new execEnv. - * Switch now so that the CallFrame is allocated on the new execEnv's - * stack. Then push a CallFrame and CmdFrame. - */ - - TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, - NULL); - SAVE_CONTEXT(corPtr->caller); - - iPtr->execEnvPtr = corPtr->eePtr; - - /* - * Save the base context. The base cmdFramePtr is unknown at this time: it - * will be allocated in the Tcl stack. So signal TEBC that it has to - * initialize the base cmdFramePtr by setting it to NULL. - */ - - SAVE_CONTEXT(corPtr->base); - corPtr->base.cmdFramePtr = NULL; - corPtr->running = NULL_CONTEXT; - - - /* * #280. * Provide the new coroutine with its own copy of the lineLABCPtr * hashtable for literal command arguments in bytecode. Note that that @@ -8871,20 +8845,43 @@ TclNRCoroutineObjCmd( } /* - * Eval things in 'uplevel #0', except for the very first command lookup - * which should be looked up in caller's context. - * - * A better approach would use the lambda infrastructure, but it is a bit - * clumsy for now: we have the "lambda is a nameless proc" hack, we'd need - * the cleaner "proc is a named lambda" to do this properly. + * Save the base context. The base cmdFramePtr is unknown at this time: it + * will be allocated in the Tcl stack. So signal TEBC that it has to + * initialize the base cmdFramePtr by setting it to NULL. */ - - iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; + + SAVE_CONTEXT(corPtr->base); + corPtr->base.cmdFramePtr = NULL; + corPtr->running = NULL_CONTEXT; + corPtr->stackLevel = NULL; corPtr->auxNumLevels = iPtr->numLevels; + corPtr->callerBP = NULL; + + /* + * Create the command that will run at the bottom of the coroutine. + * Be sure not to pass a canonical list for the command so that we insure + * the body is bytecompiled: we need a TEBC instance to handle [yield] + */ + + cmdObjPtr = Tcl_NewListObj(objc-2, &objv[2]); + TclGetString(cmdObjPtr); + TclFreeIntRep(cmdObjPtr); + cmdObjPtr->typePtr = NULL; + + + /* + * Create the coro's execEnv and switch to it so that any CallFrames or + * callbacks refer to the new execEnv's stack. Add the exit callback, then + * the callback to eval the coro body. + */ + + corPtr->eePtr = TclCreateExecEnv(interp, CORO_STACK_INITIAL_SIZE); + corPtr->callerEEPtr = iPtr->execEnvPtr; + corPtr->eePtr->corPtr = corPtr; + iPtr->execEnvPtr = corPtr->eePtr; TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL, NULL, NULL); - iPtr->evalFlags |= TCL_EVAL_REDIRECT; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); -- cgit v0.12 From a70b4959890f4ab6855ae91437fd9b7cfe3c668e Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 10 Dec 2009 19:13:26 +0000 Subject: * generic/tclObj.c (TclContinuationsEnter): [Bug 2895323]: Updated comments to describe when the function can be entered for the same Tcl_Obj* multiple times. This is a continuation of the 2009-11-10 entry where a memory leak was plugged, but where not sure if that was just a band-aid to paper over some other error. It isn't, this is a legal situation. --- ChangeLog | 9 +++++++++ generic/tclObj.c | 24 +++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 894fbd4..2c1bd26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-12-10 Andreas Kupries + + * generic/tclObj.c (TclContinuationsEnter): [Bug 2895323]: Updated + comments to describe when the function can be entered for the same + Tcl_Obj* multiple times. This is a continuation of the 2009-11-10 + entry where a memory leak was plugged, but where not sure if that + was just a band-aid to paper over some other error. It isn't, this + is a legal situation. + 2009-12-10 Miguel Sofer * generic/tclBasic.c: Reducing the # of moving parts for diff --git a/generic/tclObj.c b/generic/tclObj.c index 5913dd1..667fd90 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.164 2009/11/10 17:57:39 andreas_kupries Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.165 2009/12/10 19:13:26 andreas_kupries Exp $ */ #include "tclInt.h" @@ -584,10 +584,24 @@ TclContinuationsEnter(Tcl_Obj* objPtr, if (!newEntry) { /* - * Somehow we're entering ContLineLoc data for the same value (objPtr) - * more than one time. Not sure whether that's expected, or a sign of - * trouble, but at a minimum, we should take care not to leak the old - * entry. + * We're entering ContLineLoc data for the same value more than one + * time. Taking care not to leak the old entry. + * + * This can happen when literals in a proc body are shared. See for + * example test info-30.19 where the action (code) for all branches of + * the switch command is identical, mapping them all to the same + * literal. An interesting result of this is that the number and + * locations (offset) of invisible continuation lines in the literal + * are the same for all occurences. + * + * Note that while reusing the existing entry is possible it requires + * the same actions as for a new entry because we have to copy the + * incoming num/loc data even so. Because we are called from + * TclContinuationsEnterDerived for this case, which modified the + * stored locations (Rebased to the proper relative offset). Just + * returning the stored entry would rebase them a second time, or + * more, hosing the data. It is easier to simply replace, as we are + * doing. */ ckfree((char *) Tcl_GetHashValue(hPtr)); -- cgit v0.12 From 6e708a1db41169e8de8604f2e5afdbde80e26937 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 10 Dec 2009 22:01:47 +0000 Subject: * generic/tclExecute.c: fix panic in http11.test caused by buggy earlier commits in coroutine management. --- ChangeLog | 5 +++++ generic/tclExecute.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c1bd26..9d9420e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-10 Miguel Sofer + + * generic/tclExecute.c: fix panic in http11.test caused by buggy + earlier commits in coroutine management. + 2009-12-10 Andreas Kupries * generic/tclObj.c (TclContinuationsEnter): [Bug 2895323]: Updated diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 28fab46..e2ef7e4 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.460 2009/12/10 17:48:39 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.461 2009/12/10 22:01:48 msofer Exp $ */ #include "tclInt.h" @@ -2040,7 +2040,7 @@ TclExecuteByteCode( corPtr->base.cmdFramePtr = bcFramePtr; BP->prevBottomPtr = NULL; - iPtr->varFramePtr->callerPtr = iPtr->rootFramePtr; + iPtr->varFramePtr = iPtr->rootFramePtr; } if (!corPtr->stackLevel) { -- cgit v0.12 From 6702229811b97786ff7f9e400992cdcdd4d7b56e Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 10 Dec 2009 22:38:52 +0000 Subject: * generic/tclBasic.c: small cleanup --- ChangeLog | 2 ++ generic/tclBasic.c | 47 +++++++++++++++++++++++------------------------ 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d9420e..46d009c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-12-10 Miguel Sofer + * generic/tclBasic.c: small cleanup + * generic/tclExecute.c: fix panic in http11.test caused by buggy earlier commits in coroutine management. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 079d034..d4f905d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.427 2009/12/10 18:23:28 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.428 2009/12/10 22:38:52 msofer Exp $ */ #include "tclInt.h" @@ -8423,28 +8423,6 @@ static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; #define iPtr ((Interp *) interp) -static int -YieldToCallback( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - /* CoroutineData *corPtr = data[0];*/ - Tcl_Obj *listPtr = data[1]; - ClientData nsPtr = data[2]; - - /* yieldTo: invoke the command using tailcall tech */ - TEOV_callback *cbPtr; - - TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, - NULL, NULL); - cbPtr = TOP_CB(interp); - TOP_CB(interp) = cbPtr->nextPtr; - - TclSpliceTailcall(interp, cbPtr); - return TCL_OK; -} - int TclNRYieldObjCmd( ClientData clientData, @@ -8535,6 +8513,27 @@ TclNRYieldToObjCmd( return TCL_OK; } +static int +YieldToCallback( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + /* CoroutineData *corPtr = data[0];*/ + Tcl_Obj *listPtr = data[1]; + ClientData nsPtr = data[2]; + + /* yieldTo: invoke the command using tailcall tech */ + TEOV_callback *cbPtr; + + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, + NULL, NULL); + cbPtr = TOP_CB(interp); + TOP_CB(interp) = cbPtr->nextPtr; + + TclSpliceTailcall(interp, cbPtr); + return TCL_OK; +} static int RewindCoroutineCallback( @@ -8655,8 +8654,8 @@ NRCoroutineExitCallback( RESTORE_CONTEXT(corPtr->caller); NRE_ASSERT(iPtr->framePtr == corPtr->caller.framePtr); + NRE_ASSERT(iPtr->varFramePtr = corPtr->caller.varFramePtr); NRE_ASSERT(iPtr->cmdFramePtr == corPtr->caller.cmdFramePtr); - iPtr->varFramePtr = corPtr->caller.varFramePtr; iPtr->execEnvPtr = corPtr->callerEEPtr; -- cgit v0.12 From e225192e11ee22d35470bef993063ace4970231b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 10 Dec 2009 23:52:30 +0000 Subject: * generic/tclBasic.c: Full nre-enabling of coroutines * generic/tclExecute.c: [Bug 2806407] --- ChangeLog | 3 +++ generic/tclBasic.c | 13 ++----------- generic/tclExecute.c | 10 +++++----- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46d009c..8ff54aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-12-10 Miguel Sofer + * generic/tclBasic.c: Full nre-enabling of coroutines + * generic/tclExecute.c: [Bug 2806407] + * generic/tclBasic.c: small cleanup * generic/tclExecute.c: fix panic in http11.test caused by buggy diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d4f905d..d8a449b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.428 2009/12/10 22:38:52 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.429 2009/12/10 23:52:30 msofer Exp $ */ #include "tclInt.h" @@ -8736,7 +8736,6 @@ TclNRCoroutineObjCmd( Command *cmdPtr; CoroutineData *corPtr; Tcl_Obj *cmdObjPtr; - TEOV_callback *rootPtr = TOP_CB(interp); const char *fullName; const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; @@ -8849,7 +8848,6 @@ TclNRCoroutineObjCmd( * initialize the base cmdFramePtr by setting it to NULL. */ - SAVE_CONTEXT(corPtr->base); corPtr->base.cmdFramePtr = NULL; corPtr->running = NULL_CONTEXT; corPtr->stackLevel = NULL; @@ -8884,14 +8882,7 @@ TclNRCoroutineObjCmd( iPtr->evalFlags |= TCL_EVAL_REDIRECT; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); - /* - * This should just be returning TCL_OK, to let the coro run in the - * caller's TEBC instance if available. BUT this causes an error in - * TclStackFree, couldn't yet find why. It is a bit of a mistery. - * msofer, 2009-12-08 - */ - - return TclNRRunCallbacks(interp, TCL_OK, rootPtr, 0); + return TCL_OK; } /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index e2ef7e4..f4a204e 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.461 2009/12/10 22:01:48 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.462 2009/12/10 23:52:30 msofer Exp $ */ #include "tclInt.h" @@ -2039,8 +2039,9 @@ TclExecuteByteCode( */ corPtr->base.cmdFramePtr = bcFramePtr; - BP->prevBottomPtr = NULL; iPtr->varFramePtr = iPtr->rootFramePtr; + corPtr->callerBP = BP->prevBottomPtr; + BP->prevBottomPtr = NULL; } if (!corPtr->stackLevel) { @@ -2832,13 +2833,12 @@ TclExecuteByteCode( * new one. */ - if (param) { - codePtr = param; + codePtr = param; + if (codePtr) { goto nonRecursiveCallStart; } else { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - codePtr = NULL; corPtr->callerBP = BP; goto resumeCoroutine; } -- cgit v0.12 From 11915ee6b5791aab49447d524ef382336aeec38d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 11 Dec 2009 04:47:13 +0000 Subject: simplify the coroutine BP-chain monkey-patching; tclBasic does not need to know about bottomPtr, tebc does not need to behave differently on exit for coros --- generic/tclBasic.c | 4 +--- generic/tclExecute.c | 43 ++++++++++++++----------------------------- generic/tclInt.h | 9 +++++---- 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index d8a449b..79d76be 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.429 2009/12/10 23:52:30 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.430 2009/12/11 04:47:13 msofer Exp $ */ #include "tclInt.h" @@ -8717,7 +8717,6 @@ NRInterpCoroutine( TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); - corPtr->callerBP = NULL;; corPtr->callerEEPtr = iPtr->execEnvPtr; iPtr->execEnvPtr = corPtr->eePtr; @@ -8852,7 +8851,6 @@ TclNRCoroutineObjCmd( corPtr->running = NULL_CONTEXT; corPtr->stackLevel = NULL; corPtr->auxNumLevels = iPtr->numLevels; - corPtr->callerBP = NULL; /* * Create the command that will run at the bottom of the coroutine. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f4a204e..fdc2dc4 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.462 2009/12/10 23:52:30 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.463 2009/12/11 04:47:13 msofer Exp $ */ #include "tclInt.h" @@ -1972,21 +1972,27 @@ TclExecuteByteCode( * execution stack is large enough to execute this ByteCode. */ - resumeCoroutine: if (!codePtr) { - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + CoroutineData *corPtr; + + resumeCoroutine: /* * Reawakening a suspended coroutine: the [yield] command is * returning. */ + corPtr = iPtr->execEnvPtr->corPtr; + NRE_ASSERT(corPtr != NULL); NRE_ASSERT(corPtr->eePtr == iPtr->execEnvPtr); NRE_ASSERT(COR_IS_SUSPENDED(corPtr)); + *corPtr->callerBPPtr = OBP; OBP = iPtr->execEnvPtr->bottomPtr; + corPtr->stackLevel = &TAUX; corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; + if (iPtr->execEnvPtr->rewind) { TRESULT = TCL_ERROR; } @@ -2040,8 +2046,7 @@ TclExecuteByteCode( corPtr->base.cmdFramePtr = bcFramePtr; iPtr->varFramePtr = iPtr->rootFramePtr; - corPtr->callerBP = BP->prevBottomPtr; - BP->prevBottomPtr = NULL; + corPtr->callerBPPtr = &BP->prevBottomPtr; } if (!corPtr->stackLevel) { @@ -2833,13 +2838,11 @@ TclExecuteByteCode( * new one. */ - codePtr = param; - if (codePtr) { + if (param) { + codePtr = param; goto nonRecursiveCallStart; } else { - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - - corPtr->callerBP = BP; + OBP = BP; goto resumeCoroutine; } break; @@ -2900,7 +2903,7 @@ TclExecuteByteCode( corPtr->stackLevel = NULL; iPtr->execEnvPtr = corPtr->callerEEPtr; - OBP = corPtr->callerBP; + OBP = *corPtr->callerBPPtr; goto returnToCaller; } default: @@ -8027,24 +8030,6 @@ TclExecuteByteCode( } } - /* - * Deal with coros running in the caller's TEBC - */ - - if (iPtr->execEnvPtr->corPtr) { - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - /* - * The coro is returning internally iff - * - this is its base TEBC - * - this is it's callers TEBC, signalled by callerBP!=NULL - */ - - OBP = corPtr->callerBP; - if (OBP && (corPtr->stackLevel == &TAUX)) { - goto returnToCaller; - } - } - iPtr->execEnvPtr->bottomPtr = NULL; return TRESULT; } diff --git a/generic/tclInt.h b/generic/tclInt.h index 91f301f..bf13446 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.452 2009/12/08 20:56:29 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.453 2009/12/11 04:47:13 msofer Exp $ */ #ifndef _TCLINT @@ -1405,9 +1405,10 @@ typedef struct CoroutineData { * numLevels of the create/resume command is * stored here; for suspended coroutines it * holds the nesting numLevels at yield. */ - struct BottomData *callerBP;/* The caller's bottomPointer, if the coro is - * running in the caller's TEBC instance. NULL - * otherwise. */ + struct BottomData **callerBPPtr; + /* Where to stash the caller's bottomPointer, + * if the coro is running in the caller's TEBC + * instance. Put a NULL in there otherwise. */ } CoroutineData; typedef struct ExecEnv { -- cgit v0.12 From 7e4c6f37909b4679e7ca70148d619d8059650581 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 11 Dec 2009 05:32:59 +0000 Subject: code comments --- ChangeLog | 1 + generic/tclExecute.c | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ff54aa..8acc9a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +2009-12-11 Miguel Sofer 2009-12-10 Miguel Sofer * generic/tclBasic.c: Full nre-enabling of coroutines diff --git a/generic/tclExecute.c b/generic/tclExecute.c index fdc2dc4..c88aa73 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.463 2009/12/11 04:47:13 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.464 2009/12/11 05:33:00 msofer Exp $ */ #include "tclInt.h" @@ -1978,7 +1978,11 @@ TclExecuteByteCode( resumeCoroutine: /* * Reawakening a suspended coroutine: the [yield] command is - * returning. + * returning: + * - monkey-patch the cmdFrame chain + * - set the running level of the coroutine + * - monkey-patch the BP chain + * - restart the code at [yield]'s return */ corPtr = iPtr->execEnvPtr->corPtr; @@ -1987,15 +1991,14 @@ TclExecuteByteCode( NRE_ASSERT(corPtr->eePtr == iPtr->execEnvPtr); NRE_ASSERT(COR_IS_SUSPENDED(corPtr)); - *corPtr->callerBPPtr = OBP; - OBP = iPtr->execEnvPtr->bottomPtr; - - corPtr->stackLevel = &TAUX; - corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; - if (iPtr->execEnvPtr->rewind) { TRESULT = TCL_ERROR; } + + corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; + corPtr->stackLevel = &TAUX; + *corPtr->callerBPPtr = OBP; + OBP = iPtr->execEnvPtr->bottomPtr; goto returnToCaller; } @@ -2041,16 +2044,15 @@ TclExecuteByteCode( /* * First coroutine run, incomplete init: * - base.cmdFramePtr not set - * - need to break the BP chain + * - need to monkey-patch the BP chain + * - set the running level for the coroutine + * - insure that the coro runs in #0 */ corPtr->base.cmdFramePtr = bcFramePtr; - iPtr->varFramePtr = iPtr->rootFramePtr; corPtr->callerBPPtr = &BP->prevBottomPtr; - } - - if (!corPtr->stackLevel) { corPtr->stackLevel = &TAUX; + iPtr->varFramePtr = iPtr->rootFramePtr; } if (iPtr->execEnvPtr->rewind) { -- cgit v0.12 From 61ace5272a2905633f2c69fc76b503e6739e6ad2 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 11 Dec 2009 05:38:11 +0000 Subject: code comments --- generic/tclExecute.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index c88aa73..a7952d9 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.464 2009/12/11 05:33:00 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.465 2009/12/11 05:38:11 msofer Exp $ */ #include "tclInt.h" @@ -1962,16 +1962,6 @@ TclExecuteByteCode( char cmdNameBuf[21]; #endif - /* - * The execution uses a unified stack: first a BottomData, immediately - * above it a CmdFrame, then the catch stack, then the execution stack. - * - * Make sure the catch stack is large enough to hold the maximum number of - * catch commands that could ever be executing at the same time (this will - * be no more than the exception range array's depth). Make sure the - * execution stack is large enough to execute this ByteCode. - */ - if (!codePtr) { CoroutineData *corPtr; @@ -2002,6 +1992,16 @@ TclExecuteByteCode( goto returnToCaller; } + /* + * The execution uses a unified stack: first a BottomData, immediately + * above it a CmdFrame, then the catch stack, then the execution stack. + * + * Make sure the catch stack is large enough to hold the maximum number of + * catch commands that could ever be executing at the same time (this will + * be no more than the exception range array's depth). Make sure the + * execution stack is large enough to execute this ByteCode. + */ + nonRecursiveCallStart: codePtr->refCount++; BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, @@ -2021,7 +2021,8 @@ TclExecuteByteCode( tosPtr = initTosPtr; /* - * TIP #280: Initialize the frame. Do not push it yet. + * TIP #280: Initialize the frame. Do not push it yet: it will be pushed + * every time that we call out from this BP, popped when we return to it. */ bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) -- cgit v0.12 From 0ee39daeb4a09e4e5d7b72aed5577ac126244244 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 11 Dec 2009 05:49:41 +0000 Subject: code comments --- generic/tclExecute.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a7952d9..ec102b8 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.465 2009/12/11 05:38:11 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.466 2009/12/11 05:49:41 msofer Exp $ */ #include "tclInt.h" @@ -2835,12 +2835,6 @@ TclExecuteByteCode( NR_DATA_BURY(); switch (type) { case TCL_NR_BC_TYPE: - /* - * A request to run a bytecode: record this level's - * state variables, swap codePtr and start running the - * new one. - */ - if (param) { codePtr = param; goto nonRecursiveCallStart; @@ -2849,10 +2843,10 @@ TclExecuteByteCode( goto resumeCoroutine; } break; - case TCL_NR_TAILCALL_TYPE: - /* - * A request to perform a tailcall: just drop this - * bytecode. */ + case TCL_NR_TAILCALL_TYPE: + /* + * A request to perform a tailcall: just drop this + * bytecode. */ #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { fprintf(stdout, " Tailcall request received\n"); @@ -2860,8 +2854,8 @@ TclExecuteByteCode( #endif /* TCL_COMPILE_DEBUG */ if (catchTop != initCatchTop) { TEOV_callback *tailcallPtr = - iPtr->varFramePtr->tailcallPtr; - + iPtr->varFramePtr->tailcallPtr; + TclClearTailcall(interp, tailcallPtr); iPtr->varFramePtr->tailcallPtr = NULL; TRESULT = TCL_ERROR; @@ -7975,6 +7969,12 @@ TclExecuteByteCode( CLANG_ASSERT(bcFramePtr); } + /* + * Store the previous bottomPtr for returning to it, then free all resources + * used by this bytecode and process callbacks until you return to the + * previous bytecode (if any). + */ + OBP = BP->prevBottomPtr; iPtr->cmdFramePtr = bcFramePtr->nextPtr; TclStackFree(interp, BP); /* free my stack */ @@ -7985,13 +7985,7 @@ TclExecuteByteCode( returnToCaller: if (OBP) { - /* - * Restore the state to what it was previous to this bytecode, deal - * with tailcalls. - */ - - BP = OBP; /* back to old bc */ - + BP = OBP; /* back to old bc */ rerunCallbacks: TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); -- cgit v0.12 From 7e3597c8ffaf3639ba4bd4dc1d8185f0387c3453 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 11 Dec 2009 14:01:29 +0000 Subject: fix comment --- generic/tclBasic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 79d76be..9469792 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.430 2009/12/11 04:47:13 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.431 2009/12/11 14:01:29 msofer Exp $ */ #include "tclInt.h" @@ -4215,9 +4215,8 @@ TclNRRunCallbacks( struct TEOV_callback *rootPtr, /* All callbacks down to rootPtr not inclusive * are to be run. */ - int tebcCall) /* Normal callers set this to 0; TEBC sets it - * to 1 when executing a bytecode, to 2 when - * cleaning up after a bytecode returns. */ + int tebcCall) /* Normal callers set this to 0; only TEBC + * sets it to 1. */ { Interp *iPtr = (Interp *) interp; TEOV_callback *callbackPtr; -- cgit v0.12 From 5f4b06d848afc2095f6309a653fe773db565f425 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 11 Dec 2009 14:01:53 +0000 Subject: Change to braces in example to avoid bug in HTML creator script --- doc/Tcl.n | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Tcl.n b/doc/Tcl.n index 565be1d..70e903a 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl.n,v 1.22 2009/11/30 15:39:31 dkf Exp $ +'\" RCS: @(#) $Id: Tcl.n,v 1.23 2009/12/11 14:01:53 dkf Exp $ '\" .so man.macros .TH Tcl n "8.5" Tcl "Tcl Built-In Commands" @@ -61,9 +61,9 @@ variable substitutions; backslash substitutions are performed as is normal for a list and individual internal words may be surrounded by either braces or double-quote characters), and its words are added to the command being substituted. For instance, -.QW "cmd a {*}{b [c]} d {*}{$e f \"g h\"}" +.QW "cmd a {*}{b [c]} d {*}{$e f {g h}}" is equivalent to -.QW "cmd a b {[c]} d {$e} f \"g h\"" . +.QW "cmd a b {[c]} d {$e} f {g h}" . .IP "[6] \fBBraces.\fR" If the first character of a word is an open brace .PQ { -- cgit v0.12 From aa95261cdb411081d54b92f009404f83954deec1 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 11 Dec 2009 14:08:44 +0000 Subject: [FRQ 2897296]: Cross-links to sections within a manpage when in HTML. --- ChangeLog | 89 +++++++++++++++++++++++++----------------------- tools/tcltk-man2html.tcl | 12 +++++-- 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8acc9a8..efb8032 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,16 @@ +2009-12-11 Donal K. Fellows + + * tools/tcltk-man2html.tcl (long-toc, cross-reference): [FRQ 2897296]: + Added cross links to sections within manual pages. + 2009-12-11 Miguel Sofer -2009-12-10 Miguel Sofer - * generic/tclBasic.c: Full nre-enabling of coroutines - * generic/tclExecute.c: [Bug 2806407] - - * generic/tclBasic.c: small cleanup + * generic/tclBasic.c: [Bug 2806407]: Full nre-enabling of coroutines + * generic/tclExecute.c: + + * generic/tclBasic.c: Small cleanup - * generic/tclExecute.c: fix panic in http11.test caused by buggy + * generic/tclExecute.c: Fix panic in http11.test caused by buggy earlier commits in coroutine management. 2009-12-10 Andreas Kupries @@ -14,28 +18,27 @@ * generic/tclObj.c (TclContinuationsEnter): [Bug 2895323]: Updated comments to describe when the function can be entered for the same Tcl_Obj* multiple times. This is a continuation of the 2009-11-10 - entry where a memory leak was plugged, but where not sure if that - was just a band-aid to paper over some other error. It isn't, this - is a legal situation. + entry where a memory leak was plugged, but where not sure if that was + just a band-aid to paper over some other error. It isn't, this is a + legal situation. 2009-12-10 Miguel Sofer - * generic/tclBasic.c: Reducing the # of moving parts for - * generic/tclExecute.c: coroutines by delegating more to tebc; - eliminate the special coroutine CallFrame. + * generic/tclBasic.c: Reducing the # of moving parts for coroutines + * generic/tclExecute.c: by delegating more to tebc; eliminate the + special coroutine CallFrame. 2009-12-09 Andreas Kupries - * generic/tclIO.c: [Bug 2901998]: Applied Alexandre Ferrieux's - patch fixing the inconsistent buffered I/O. Tcl's I/O now flushes - buffered output before reading, discards buffered input before - writing, etc. + * generic/tclIO.c: [Bug 2901998]: Applied Alexandre Ferrieux's patch + fixing the inconsistent buffered I/O. Tcl's I/O now flushes buffered + output before reading, discards buffered input before writing, etc. 2009-12-09 Miguel Sofer - * generic/tclBasic.c: Insure correct lifetime of varFrame's - (objc,objv)for coroutines. - + * generic/tclBasic.c: Ensure right lifetime of varFrame's (objc,objv) + for coroutines. + * generic/tclExecute.c: Code regrouping 2009-12-09 Donal K. Fellows @@ -45,16 +48,16 @@ 2009-12-08 Miguel Sofer - * generic/tclExecute.c (TclStackFree): Improved panic msg + * generic/tclExecute.c (TclStackFree): Improved panic msg. 2009-12-08 Miguel Sofer - * generic/tclBasic.c: Partial nre-enabling of coroutines. - * generic/tclExecute.c: The initial call still requires its - * generic/tclInt.h: own instance of tebc, but on resume coros - can execute in the caller's tebc. + * generic/tclBasic.c: Partial nre-enabling of coroutines. The + * generic/tclExecute.c: initial call still requires its own + * generic/tclInt.h: instance of tebc, but on resume coros can + execute in the caller's tebc. - * generic/tclExecute.c (TEBC): silence warning about pcAdjustment + * generic/tclExecute.c (TEBC): Silence warning about pcAdjustment. 2009-12-08 Donal K. Fellows @@ -72,7 +75,7 @@ * generic/tclExecute.c: Start cleaning the TEBC stables * generic/tclInt.h: - + * generic/tclCmdIL.c: [Bug 2910094]: Fix by aku * tests/coroutine.test: @@ -102,17 +105,17 @@ * generic/tclBasic.c: Small changes for clarity in tailcall * generic/tclExecute.c: and coroutine code. * tests/coroutine.test: - + * tests/tailcall.test: Remove some old unused crud; improved the - stack depth tests. - - * generic/tclBasic.c: Fixed things so that you can tailcall + stack depth tests. + + * generic/tclBasic.c: Fixed things so that you can tailcall * generic/tclNamesp.c: properly out of a coroutine. * tests/tailcall.test: * generic/tclInterp.c: Fixed tailcalls for same-interp aliases (no test) - + 2009-12-03 Donal K. Fellows * library/safe.tcl (::safe::AliasEncoding): Make the safe encoding @@ -146,13 +149,13 @@ are providers, not consumers of the Stubs table, and should not link with the Stubs library, but only with the main Tcl library. (In any case, the presence of Tcl_InitStubs broke the build.) - + 2009-11-27 Donal K. Fellows * doc/BoolObj.3, doc/Class.3, doc/CrtChannel.3, doc/DictObj.3: * doc/DoubleObj.3, doc/Ensemble.3, doc/Environment.3: * doc/FileSystem.3, doc/Hash.3, doc/IntObj.3, doc/Limit.3: - * doc/Method.3, doc/NRE.3, doc/ObjectType.3, doc/PkgRequire.3: + * doc/Method.3, doc/NRE.3, doc/ObjectType.3, doc/PkgRequire.3: * doc/SetChanErr.3, doc/SetResult.3: [Patch 2903921]: Many small spelling fixes from Larry Virden. @@ -184,7 +187,7 @@ * win/Makefile.in: Added a 'test-tcl' rule that is identical to 'test' except that it does not go spelunking in 'pkgs/'. (This rule has existed in unix/Makefile.in for some time.) - + 2009-11-25 Stuart Cassoff * unix/configure.in: [Patch 2892871]: Remove unneeded @@ -226,7 +229,7 @@ Documents' folder to the one that's correct for Windows 2000, XP, Server 2003, Vista, Server 2008, and Windows 7. (See http://support.microsoft.com/kb/310746) - + 2009-11-23 Jan Nijtmans * win/tclWinDde.c: #undef STATIC_BUILD, in order to make sure @@ -248,7 +251,7 @@ * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]: Further machinations to get NewTestThread actually to launch the thread, not just compile. - + 2009-11-22 Donal K. Fellows * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]: Fix small @@ -490,7 +493,7 @@ * library/tzdata/Asia/Damascus: Syrian DST changes. * library/tzdata/Asia/Hong_Kong: Hong Kong historic DST corrections. Olson tzdata2009q. - + 2009-11-02 Donal K. Fellows * doc/object.n (DESCRIPTION): Substantive revision to make it clearer @@ -568,7 +571,7 @@ * tests/clock.test (clock-67.1): [Bug 2819334]: Corrected a problem where '%%' followed by a letter in a format group could expand recursively: %%R would turn into %%H:%M:%S - + 2009-10-28 Don Porter * generic/tclLiteral.c: [Bug 2888044]: Fixed 2 bugs. @@ -594,7 +597,7 @@ normalized path caused crashes. 2009-10-27 Kevin B. Kenny - + * library/clock.tcl (ParseClockScanFormat): [Bug 2886852]: Corrected a problem where [clock scan] didn't load the timezone soon enough when processing a time format that lacked a complete date. @@ -603,7 +606,7 @@ * library/tzdata/America/Argentina/Buenos_Aires: * library/tzdata/America/Argentina/Cordoba: * library/tzdata/America/Argentina/San_Luis: - * library/tzdata/America/Argentina/Tucuman: + * library/tzdata/America/Argentina/Tucuman: New DST rules for Argentina. (Olson's tzdata2009p.) 2009-10-26 Don Porter @@ -613,7 +616,7 @@ 2009-10-24 Kevin B. Kenny - * library/clock.tcl (ProcessPosixTimeZone): + * library/clock.tcl (ProcessPosixTimeZone): Corrected a regression in the fix to [Bug 2207436] that caused [clock] to apply EU daylight saving time rules in the US. Thanks to Karl Lehenbauer for reporting this regression. @@ -622,7 +625,7 @@ * library/tzdata/Asia/Dhaka: * library/tzdata/Asia/Karachi: New DST rules for Bangladesh and Pakistan. (Olson's tzdata2009o.) - + 2009-10-23 Andreas Kupries * generic/tclIO.c (FlushChannel): Skip OutputProc for low-level @@ -677,7 +680,7 @@ 2009-10-17 Donal K. Fellows * generic/tclVar.c (UnsetVarStruct, TclDeleteNamespaceVars) - (TclDeleteCompiledLocalVars, DeleteArray): + (TclDeleteCompiledLocalVars, DeleteArray): * generic/tclTrace.c (Tcl_UntraceVar2): [Bug 2629338]: Stop traces that are deleted part way through (a feature used by tdom) from causing freed memory to be accessed. diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 4b669ad..d758edb 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -113,7 +113,7 @@ proc parse_command_line {} { if {$build_tk} { # Find Tk. set tkdir [lindex [lsort [glob -nocomplain -tails -type d \ - -directory $tcltkdir tk$useversion]] end] + -directory $tcltkdir tk$useversion]] end] if {$tkdir eq ""} { puts stderr "tcltk-man-html: couldn't find Tk below $tcltkdir" exit 1 @@ -232,7 +232,7 @@ proc htmlhead {title header args} { } proc gencss {} { set hBd "1px dotted #11577b" - return " + return [subst { body, div, p, th, td, li, dd, ul, ol, dl, dt, blockquote { font-family: Verdana, sans-serif; } @@ -308,7 +308,7 @@ h4 { font-size: 11px; } border-top: 1px solid #6A6A6A; margin-top: 2em; } -" +}] } ## @@ -510,6 +510,7 @@ proc man-puts {text} { proc long-toc {text} { global manual set here M[incr manual(section-toc-n)] + set manual($manual(name)-id-$text) $here set there L[incr manual(long-toc-n)] lappend manual(section-toc) \ "
$text" @@ -837,6 +838,11 @@ proc cross-reference {ref} { set lref $ref } elseif {$ref eq "Tcl"} { set lref $ref + } elseif {[regexp {^[A-Z0-9 ?!]+$} $ref]} { + if {[info exists manual($manual(name)-id-$ref)]} { + return "$ref" + } + set lref [string tolower $ref] } else { set lref [string tolower $ref] } -- cgit v0.12 From 03861193914234b7689c01abc8e74ca8ec20d873 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 11 Dec 2009 22:52:08 +0000 Subject: Fix gcc warning, using gcc-4.3.4 on cygwin warning: array subscript has type 'char' win/makefile.vc Revert to version 1.203 [Bug #2912773] --- ChangeLog | 8 ++++++++ generic/tclBinary.c | 4 ++-- generic/tclCompExpr.c | 4 ++-- generic/tclPkg.c | 4 ++-- libtommath/bn_mp_read_radix.c | 6 +++--- win/makefile.vc | 11 ++++------- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index efb8032..9b37277 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-12-11 Jan Nijtmans + + * generic/tclBinary.c: Fix gcc warning, using gcc-4.3.4 on cygwin + * generic/tclCompExpr.c warning: array subscript has type 'char' + * generic/tclPkg.c + * libtommath/bn_mp_read_radix.c + * win/makefile.vc Revert to version 1.203 [Bug #2912773] + 2009-12-11 Donal K. Fellows * tools/tcltk-man2html.tcl (long-toc, cross-reference): [FRQ 2897296]: diff --git a/generic/tclBinary.c b/generic/tclBinary.c index c360c8f..4c2d47e 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.56 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.57 2009/12/11 22:52:09 nijtmans Exp $ */ #include "tclInt.h" @@ -2497,7 +2497,7 @@ BinaryDecodeUu( if (data < dataend) { d[i] = c = *data++; if (c < 33 || c > 96) { - if (strict || !isspace(c)) { + if (strict || !isspace(c & 255)) { goto badUu; } i--; diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 47c8671..2677c51 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.100 2009/09/07 07:28:38 das Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.101 2009/12/11 22:52:09 nijtmans Exp $ */ #include "tclInt.h" @@ -752,7 +752,7 @@ ParseExpr( const char *end = lastStart + 2; Tcl_Obj *copy; - while (isdigit(*end)) { + while (isdigit(*end & 255)) { end++; } copy = Tcl_NewStringObj(lastStart, diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 7bac7eb..3753445 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.39 2009/02/10 22:49:49 nijtmans Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.40 2009/12/11 22:52:09 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -1865,7 +1865,7 @@ Tcl_PkgInitStubsCheck( int count = 0; while (*p) { - count += !isdigit(*p++); + count += !isdigit(*p++ & 255); } if (count == 1) { if (0 != strncmp(version, actualVersion, strlen(version))) { diff --git a/libtommath/bn_mp_read_radix.c b/libtommath/bn_mp_read_radix.c index 75859f8..37d902d 100644 --- a/libtommath/bn_mp_read_radix.c +++ b/libtommath/bn_mp_read_radix.c @@ -48,7 +48,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix) * this allows numbers like 1AB and 1ab to represent the same value * [e.g. in hex] */ - ch = (char) ((radix < 36) ? toupper (*str) : *str); + ch = (char) ((radix < 36) ? toupper (*str & 255) : *str); for (y = 0; y < 64; y++) { if (ch == mp_s_rmap[y]) { break; @@ -89,6 +89,6 @@ int mp_read_radix (mp_int * a, const char *str, int radix) /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_read_radix.c,v $ */ /* Tom's revision is 1.4. */ -/* $Revision: 1.5 $ */ -/* $Date: 2006/12/01 00:31:32 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2009/12/11 22:52:09 $ */ diff --git a/win/makefile.vc b/win/makefile.vc index 484bb1e..08ac169 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.204 2009/11/26 07:01:52 nijtmans Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.205 2009/12/11 22:52:09 nijtmans Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -420,10 +420,7 @@ PLATFORMOBJS = \ $(TMP_DIR)\tclWinSock.obj \ $(TMP_DIR)\tclWinThrd.obj \ $(TMP_DIR)\tclWinTime.obj \ -!if $(STATIC_BUILD) - $(TMP_DIR)\tclStubLib.obj - $(TMP_DIR)\tclOOStubLib.obj -!else +!if !$(STATIC_BUILD) $(TMP_DIR)\tcl.res !endif @@ -623,7 +620,7 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c !if $(TCL_USE_STATIC_PACKAGES) $(TCLDDELIB): !else -$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBOBJS) +$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(lib32) -nologo $(LINKERFLAGS) -out:$@ $** !endif !else @@ -637,7 +634,7 @@ $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) !if $(TCL_USE_STATIC_PACKAGES) $(TCLREGLIB): !else -$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBOBJS) +$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(lib32) -nologo $(LINKERFLAGS) -out:$@ $** !endif !else -- cgit v0.12 From ace579190b2305205d8a0000aaa0b2759b28e594 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 11 Dec 2009 23:10:47 +0000 Subject: Fix gcc warning, using gcc-4.3.4 on cygwin warning: array subscript has type 'char' win/makefile.vc Revert to version 1.203 [Bug #2912773] --- generic/tclBinary.c | 4 ++-- generic/tclCompExpr.c | 4 ++-- generic/tclPkg.c | 4 ++-- libtommath/bn_mp_read_radix.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 4c2d47e..75b3ca2 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.57 2009/12/11 22:52:09 nijtmans Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.58 2009/12/11 23:10:47 nijtmans Exp $ */ #include "tclInt.h" @@ -2497,7 +2497,7 @@ BinaryDecodeUu( if (data < dataend) { d[i] = c = *data++; if (c < 33 || c > 96) { - if (strict || !isspace(c & 255)) { + if (strict || !isspace(UCHAR(c))) { goto badUu; } i--; diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 2677c51..306bf78 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.101 2009/12/11 22:52:09 nijtmans Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.102 2009/12/11 23:10:47 nijtmans Exp $ */ #include "tclInt.h" @@ -752,7 +752,7 @@ ParseExpr( const char *end = lastStart + 2; Tcl_Obj *copy; - while (isdigit(*end & 255)) { + while (isdigit(UCHAR(*end))) { end++; } copy = Tcl_NewStringObj(lastStart, diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 3753445..d26c630 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.40 2009/12/11 22:52:09 nijtmans Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.41 2009/12/11 23:10:47 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -1865,7 +1865,7 @@ Tcl_PkgInitStubsCheck( int count = 0; while (*p) { - count += !isdigit(*p++ & 255); + count += !isdigit(UCHAR(*p++)); } if (count == 1) { if (0 != strncmp(version, actualVersion, strlen(version))) { diff --git a/libtommath/bn_mp_read_radix.c b/libtommath/bn_mp_read_radix.c index 37d902d..9387bc1 100644 --- a/libtommath/bn_mp_read_radix.c +++ b/libtommath/bn_mp_read_radix.c @@ -48,7 +48,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix) * this allows numbers like 1AB and 1ab to represent the same value * [e.g. in hex] */ - ch = (char) ((radix < 36) ? toupper (*str & 255) : *str); + ch = (char) ((radix < 36) ? toupper ((unsigned char) *str) : *str); for (y = 0; y < 64; y++) { if (ch == mp_s_rmap[y]) { break; @@ -89,6 +89,6 @@ int mp_read_radix (mp_int * a, const char *str, int radix) /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_read_radix.c,v $ */ /* Tom's revision is 1.4. */ -/* $Revision: 1.6 $ */ -/* $Date: 2009/12/11 22:52:09 $ */ +/* $Revision: 1.7 $ */ +/* $Date: 2009/12/11 23:10:47 $ */ -- cgit v0.12 From e2e924c95a17b7e1ec1a1ea20713ff558fe3f4c8 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 11 Dec 2009 23:17:52 +0000 Subject: Add tcl.pc and tclsh.exe to .cvsignore --- unix/.cvsignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unix/.cvsignore b/unix/.cvsignore index 4a3b0ef..97b5f50 100644 --- a/unix/.cvsignore +++ b/unix/.cvsignore @@ -4,3 +4,5 @@ config.status *.a tclConfig.sh autom4te.cache +tcl.pc +tclsh.exe -- cgit v0.12 From d56846dd9104d99b6b8ce56fb27ab1a03bd5a627 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 11 Dec 2009 23:42:41 +0000 Subject: Fix gcc warning: signed and unsigned type in conditional expression --- ChangeLog | 2 ++ unix/tclUnixCompat.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b37277..01747ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ * generic/tclPkg.c * libtommath/bn_mp_read_radix.c * win/makefile.vc Revert to version 1.203 [Bug #2912773] + * unix/tclUnixCompat.c Fix gcc warning: signed and unsigned type + in conditional expression 2009-12-11 Donal K. Fellows diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 727eaaf..28017dc 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -6,7 +6,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixCompat.c,v 1.17 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixCompat.c,v 1.18 2009/12/11 23:42:41 nijtmans Exp $ * */ @@ -736,7 +736,7 @@ CopyArray( p = buf + len; for (j = 0; j < i; j++) { - int sz = (elsize<0 ? strlen(src[j])+1 : elsize); + int sz = (elsize<0 ? (int) strlen(src[j]) + 1 : elsize); len += sz; if (len > buflen) { -- cgit v0.12 From fabb640c47623974e09d5cce7939adc9dedd59ef Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 12 Dec 2009 19:57:26 +0000 Subject: Plug testing memleak. [Bug 2895367] --- ChangeLog | 20 ++++--- generic/tclTest.c | 175 ++++++++++++++++++++++++++++++------------------------ 2 files changed, 111 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01747ca..9b13adb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,18 @@ +2009-12-12 Donal K. Fellows + + * generic/tclTest.c (TestconcatobjCmd): [Bug 2895367]: Stop memory + leak when testing. We don't need extra noise of this sort when + tracking down real problems! + 2009-12-11 Jan Nijtmans - * generic/tclBinary.c: Fix gcc warning, using gcc-4.3.4 on cygwin - * generic/tclCompExpr.c warning: array subscript has type 'char' - * generic/tclPkg.c - * libtommath/bn_mp_read_radix.c - * win/makefile.vc Revert to version 1.203 [Bug #2912773] - * unix/tclUnixCompat.c Fix gcc warning: signed and unsigned type - in conditional expression + * generic/tclBinary.c: Fix gcc warning, using gcc-4.3.4 on cygwin + * generic/tclCompExpr.c:warning: array subscript has type 'char' + * generic/tclPkg.c: + * libtommath/bn_mp_read_radix.c: + * win/makefile.vc: [Bug 2912773]: Revert to version 1.203 + * unix/tclUnixCompat.c: Fix gcc warning: signed and unsigned type + in conditional expression. 2009-12-11 Donal K. Fellows diff --git a/generic/tclTest.c b/generic/tclTest.c index 07f1511..812a610 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.141 2009/11/23 20:17:36 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.142 2009/12/12 19:57:26 dkf Exp $ */ #undef STATIC_BUILD @@ -6723,21 +6723,23 @@ TestconcatobjCmd( concatPtr = Tcl_ConcatObj(2, objv); if (concatPtr->refCount != 0) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (a) concatObj does not have refCount 0", NULL); + Tcl_AppendResult(interp, + "\n\t* (a) concatObj does not have refCount 0", NULL); } if (concatPtr == tmpPtr) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (a) concatObj is not a new obj ", NULL); + Tcl_AppendResult(interp, "\n\t* (a) concatObj is not a new obj ", + NULL); switch (tmpPtr->refCount) { - case 0: - Tcl_AppendResult(interp, "(no new refCount)", NULL); - break; - case 1: - Tcl_AppendResult(interp, "(refCount added)", NULL); - break; - default: - Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); - Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + case 0: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 1: + Tcl_AppendResult(interp, "(refCount added)", NULL); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); } tmpPtr = Tcl_DuplicateObj(list1Ptr); objv[0] = tmpPtr; @@ -6748,54 +6750,57 @@ TestconcatobjCmd( concatPtr = Tcl_ConcatObj(2, objv); if (concatPtr->refCount != 0) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (b) concatObj does not have refCount 0", NULL); + Tcl_AppendResult(interp, + "\n\t* (b) concatObj does not have refCount 0", NULL); } if (concatPtr == tmpPtr) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (b) concatObj is not a new obj ", NULL); + Tcl_AppendResult(interp, "\n\t* (b) concatObj is not a new obj ", + NULL); switch (tmpPtr->refCount) { - case 0: - Tcl_AppendResult(interp, "(refCount removed?)", NULL); - Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); - break; - case 1: - Tcl_AppendResult(interp, "(no new refCount)", NULL); - break; - case 2: - Tcl_AppendResult(interp, "(refCount added)", NULL); - Tcl_DecrRefCount(tmpPtr); - break; - default: - Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); - Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + case 0: + Tcl_AppendResult(interp, "(refCount removed?)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + break; + case 1: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 2: + Tcl_AppendResult(interp, "(refCount added)", NULL); + Tcl_DecrRefCount(tmpPtr); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); } tmpPtr = Tcl_DuplicateObj(list1Ptr); objv[0] = tmpPtr; } Tcl_DecrRefCount(concatPtr); - objv[0] = emptyPtr; objv[1] = tmpPtr; objv[2] = emptyPtr; concatPtr = Tcl_ConcatObj(3, objv); if (concatPtr->refCount != 0) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (c) concatObj does not have refCount 0", NULL); + Tcl_AppendResult(interp, + "\n\t* (c) concatObj does not have refCount 0", NULL); } if (concatPtr == tmpPtr) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (c) concatObj is not a new obj ", NULL); + Tcl_AppendResult(interp, "\n\t* (c) concatObj is not a new obj ", + NULL); switch (tmpPtr->refCount) { - case 0: - Tcl_AppendResult(interp, "(no new refCount)", NULL); - break; - case 1: - Tcl_AppendResult(interp, "(refCount added)", NULL); - break; - default: - Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); - Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + case 0: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 1: + Tcl_AppendResult(interp, "(refCount added)", NULL); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); } tmpPtr = Tcl_DuplicateObj(list1Ptr); objv[1] = tmpPtr; @@ -6806,26 +6811,28 @@ TestconcatobjCmd( concatPtr = Tcl_ConcatObj(3, objv); if (concatPtr->refCount != 0) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (d) concatObj does not have refCount 0", NULL); + Tcl_AppendResult(interp, + "\n\t* (d) concatObj does not have refCount 0", NULL); } if (concatPtr == tmpPtr) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (d) concatObj is not a new obj ", NULL); + Tcl_AppendResult(interp, "\n\t* (d) concatObj is not a new obj ", + NULL); switch (tmpPtr->refCount) { - case 0: - Tcl_AppendResult(interp, "(refCount removed?)", NULL); - Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); - break; - case 1: - Tcl_AppendResult(interp, "(no new refCount)", NULL); - break; - case 2: - Tcl_AppendResult(interp, "(refCount added)", NULL); - Tcl_DecrRefCount(tmpPtr); - break; - default: - Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); - Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + case 0: + Tcl_AppendResult(interp, "(refCount removed?)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); + break; + case 1: + Tcl_AppendResult(interp, "(no new refCount)", NULL); + break; + case 2: + Tcl_AppendResult(interp, "(refCount added)", NULL); + Tcl_DecrRefCount(tmpPtr); + break; + default: + Tcl_AppendResult(interp, "(more than one refCount added!)", NULL); + Tcl_Panic("extremely unsafe behaviour by Tcl_ConcatObj()"); } tmpPtr = Tcl_DuplicateObj(list1Ptr); objv[1] = tmpPtr; @@ -6842,21 +6849,23 @@ TestconcatobjCmd( concatPtr = Tcl_ConcatObj(2, objv); if (concatPtr->refCount != 0) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (e) concatObj does not have refCount 0", NULL); + Tcl_AppendResult(interp, + "\n\t* (e) concatObj does not have refCount 0", NULL); } if (concatPtr == tmpPtr) { int len; result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (e) concatObj is not a new obj ", NULL); + Tcl_AppendResult(interp, "\n\t* (e) concatObj is not a new obj ", + NULL); (void) Tcl_ListObjLength(NULL, concatPtr, &len); switch (tmpPtr->refCount) { - case 3: - Tcl_AppendResult(interp, "(failed to concat)", NULL); - break; - default: - Tcl_AppendResult(interp, "(corrupted input!)", NULL); + case 3: + Tcl_AppendResult(interp, "(failed to concat)", NULL); + break; + default: + Tcl_AppendResult(interp, "(corrupted input!)", NULL); } if (Tcl_IsShared(tmpPtr)) { Tcl_DecrRefCount(tmpPtr); @@ -6872,21 +6881,23 @@ TestconcatobjCmd( concatPtr = Tcl_ConcatObj(2, objv); if (concatPtr->refCount != 0) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (f) concatObj does not have refCount 0", NULL); + Tcl_AppendResult(interp, + "\n\t* (f) concatObj does not have refCount 0", NULL); } if (concatPtr == tmpPtr) { int len; result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (f) concatObj is not a new obj ", NULL); + Tcl_AppendResult(interp, "\n\t* (f) concatObj is not a new obj ", + NULL); (void) Tcl_ListObjLength(NULL, concatPtr, &len); switch (tmpPtr->refCount) { - case 3: - Tcl_AppendResult(interp, "(failed to concat)", NULL); - break; - default: - Tcl_AppendResult(interp, "(corrupted input!)", NULL); + case 3: + Tcl_AppendResult(interp, "(failed to concat)", NULL); + break; + default: + Tcl_AppendResult(interp, "(corrupted input!)", NULL); } if (Tcl_IsShared(tmpPtr)) { Tcl_DecrRefCount(tmpPtr); @@ -6903,21 +6914,23 @@ TestconcatobjCmd( concatPtr = Tcl_ConcatObj(2, objv); if (concatPtr->refCount != 0) { result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (g) concatObj does not have refCount 0", NULL); + Tcl_AppendResult(interp, + "\n\t* (g) concatObj does not have refCount 0", NULL); } if (concatPtr == tmpPtr) { int len; result = TCL_ERROR; - Tcl_AppendResult(interp, "\n\t* (g) concatObj is not a new obj ", NULL); + Tcl_AppendResult(interp, "\n\t* (g) concatObj is not a new obj ", + NULL); (void) Tcl_ListObjLength(NULL, concatPtr, &len); switch (tmpPtr->refCount) { - case 3: - Tcl_AppendResult(interp, "(failed to concat)", NULL); - break; - default: - Tcl_AppendResult(interp, "(corrupted input!)", NULL); + case 3: + Tcl_AppendResult(interp, "(failed to concat)", NULL); + break; + default: + Tcl_AppendResult(interp, "(corrupted input!)", NULL); } Tcl_DecrRefCount(tmpPtr); if (Tcl_IsShared(tmpPtr)) { @@ -6928,10 +6941,18 @@ TestconcatobjCmd( } Tcl_DecrRefCount(concatPtr); + /* + * Clean everything up. Note that we don't actually know how many + * references there are to tmpPtr here; in the no-error case, it should be + * five... [Bug 2895367] + */ Tcl_DecrRefCount(list1Ptr); Tcl_DecrRefCount(list2Ptr); Tcl_DecrRefCount(emptyPtr); + while (tmpPtr->refCount > 1) { + Tcl_DecrRefCount(tmpPtr); + } Tcl_DecrRefCount(tmpPtr); if (result == TCL_OK) { -- cgit v0.12 From eb5b16a4cf09bf5b1a7d496074935db1ed60eed2 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Dec 2009 16:41:37 +0000 Subject: * generic/tclBasic.c: Moving TclBCArgumentRelease call * generic/tclExecute.c: from TclNRTailcallObjCmd to TEBC, so that the pairing of the Enter and Release calls is clearer. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 12 +----------- generic/tclExecute.c | 5 ++++- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b13adb..852df6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-13 Miguel Sofer + + * generic/tclBasic.c: Moving TclBCArgumentRelease call + * generic/tclExecute.c: from TclNRTailcallObjCmd to TEBC, so that + the pairing of the Enter and Release calls is clearer. + 2009-12-12 Donal K. Fellows * generic/tclTest.c (TestconcatobjCmd): [Bug 2895367]: Stop memory diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9469792..43bd2d5 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.431 2009/12/11 14:01:29 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.432 2009/12/13 16:41:37 msofer Exp $ */ #include "tclInt.h" @@ -8293,16 +8293,6 @@ TclNRTailcallObjCmd( * TclNRAddCallBack macro to build the callback) */ - /* - * In a bytecode execution context the engine has called - * TclArgumentBCEnter() which, due to the tailcall, is not paired with a - * regular TclArgumentBCRelease. Get rid of it on our own. - */ - - if (iPtr->cmdFramePtr->type == TCL_LOCATION_BC) { - TclArgumentBCRelease(interp, iPtr->cmdFramePtr); - } - TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); iPtr->varFramePtr->tailcallPtr = TOP_CB(interp); TOP_CB(interp) = TOP_CB(interp)->nextPtr; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ec102b8..a8a979d 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.466 2009/12/11 05:49:41 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.467 2009/12/13 16:41:37 msofer Exp $ */ #include "tclInt.h" @@ -2852,6 +2852,9 @@ TclExecuteByteCode( fprintf(stdout, " Tailcall request received\n"); } #endif /* TCL_COMPILE_DEBUG */ + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); + if (catchTop != initCatchTop) { TEOV_callback *tailcallPtr = iPtr->varFramePtr->tailcallPtr; -- cgit v0.12 From 64cd452abe0622edb368d64ef22b368689b6cc86 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Dec 2009 17:11:47 +0000 Subject: * generic/tclBasic.c: Release TclPopCallFrame() from its * generic/tclExecute.c: tailcall-management duties * generic/tclNamesp.c: --- ChangeLog | 4 ++++ generic/tclBasic.c | 20 +++++++++++++------- generic/tclExecute.c | 9 ++++----- generic/tclNamesp.c | 7 +------ 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 852df6e..7e02bc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-12-13 Miguel Sofer + * generic/tclBasic.c: Release TclPopCallFrame() from its + * generic/tclExecute.c: tailcall-management duties + * generic/tclNamesp.c: + * generic/tclBasic.c: Moving TclBCArgumentRelease call * generic/tclExecute.c: from TclNRTailcallObjCmd to TEBC, so that the pairing of the Enter and Release calls is clearer. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 43bd2d5..5440bca 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.432 2009/12/13 16:41:37 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.433 2009/12/13 17:11:47 msofer Exp $ */ #include "tclInt.h" @@ -8206,17 +8206,20 @@ TclSpliceTailcall( /* * Find the splicing spot: right before the NRCommand of the thing * being tailcalled. Note that we skip NRCommands marked in data[1] - * (used by command redirectors) + * (used by command redirectors), and we skip the first command that we + * find: it corresponds to [tailcall] itself. */ Interp *iPtr = (Interp *) interp; TEOV_callback *runPtr; ExecEnv *eePtr = NULL; - + int second = 0; + restart: for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { - break; + if (second) break; + second = 1; } } if (!runPtr) { @@ -8259,6 +8262,7 @@ TclNRTailcallObjCmd( Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; Tcl_Namespace *ns1Ptr; + TEOV_callback *tailcallPtr; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg ...?"); @@ -8294,11 +8298,13 @@ TclNRTailcallObjCmd( */ TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); - iPtr->varFramePtr->tailcallPtr = TOP_CB(interp); - TOP_CB(interp) = TOP_CB(interp)->nextPtr; + //iPtr->varFramePtr->tailcallPtr = TOP_CB(interp); + //TclSpliceTailcall(interp, TOP_CB(interp)); + tailcallPtr = TOP_CB(interp); + TOP_CB(interp) = tailcallPtr->nextPtr; TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_TAILCALL_TYPE), - NULL, NULL, NULL); + tailcallPtr, NULL, NULL); return TCL_OK; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a8a979d..e553356 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.467 2009/12/13 16:41:37 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.468 2009/12/13 17:11:47 msofer Exp $ */ #include "tclInt.h" @@ -2856,10 +2856,7 @@ TclExecuteByteCode( TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); if (catchTop != initCatchTop) { - TEOV_callback *tailcallPtr = - iPtr->varFramePtr->tailcallPtr; - - TclClearTailcall(interp, tailcallPtr); + TclClearTailcall(interp, param); iPtr->varFramePtr->tailcallPtr = NULL; TRESULT = TCL_ERROR; Tcl_SetResult(interp, @@ -2870,6 +2867,8 @@ TclExecuteByteCode( pc--; goto checkForCatch; } + iPtr->varFramePtr->tailcallPtr = param; + TclSpliceTailcall(interp, param); goto abnormalReturn; case TCL_NR_YIELD_TYPE: { /* [yield] */ CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index dbeb70d..507007d 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.197 2009/12/06 20:35:41 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.198 2009/12/13 17:11:47 msofer Exp $ */ #include "tclInt.h" @@ -456,7 +456,6 @@ Tcl_PushCallFrame( * Modifies the call stack of the interpreter. Resets various fields of * the popped call frame. If a namespace has been deleted and has no more * activations on the call stack, the namespace is destroyed. - * Schedules a tailcall if one is present. * *---------------------------------------------------------------------- */ @@ -508,10 +507,6 @@ Tcl_PopCallFrame( Tcl_DeleteNamespace((Tcl_Namespace *) nsPtr); } framePtr->nsPtr = NULL; - - if (framePtr->tailcallPtr) { - TclSpliceTailcall(interp, framePtr->tailcallPtr); - } } /* -- cgit v0.12 From f1c4f10de67bfd4fa6dadc2c4bb9f05396d1d282 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Dec 2009 17:27:46 +0000 Subject: remove accidentally committed c++ style temp comments --- generic/tclBasic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 5440bca..2316f06 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.433 2009/12/13 17:11:47 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.434 2009/12/13 17:27:46 msofer Exp $ */ #include "tclInt.h" @@ -8298,8 +8298,6 @@ TclNRTailcallObjCmd( */ TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); - //iPtr->varFramePtr->tailcallPtr = TOP_CB(interp); - //TclSpliceTailcall(interp, TOP_CB(interp)); tailcallPtr = TOP_CB(interp); TOP_CB(interp) = tailcallPtr->nextPtr; -- cgit v0.12 From 34c92528795ba365f8d95e1a47f64d0c726ba3e2 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 13 Dec 2009 17:54:05 +0000 Subject: fix comment --- generic/tclBasic.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 2316f06..1d649a1 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.434 2009/12/13 17:27:46 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.435 2009/12/13 17:54:05 msofer Exp $ */ #include "tclInt.h" @@ -8289,12 +8289,10 @@ TclNRTailcallObjCmd( Tcl_IncrRefCount(nsObjPtr); /* - * Add two callbacks: first the one to actually evaluate the tailcalled - * command, then the one that signals TEBC to stash the first at its - * proper place. - * - * Being lazy: add the callback, then remove it (to exploit the - * TclNRAddCallBack macro to build the callback) + * Create the callback to actually evaluate the tailcalled + * command, then pass it to tebc so that it is stashed at the proper + * place. Being lazy: exploit the TclNRAddCallBack macro to build the + * callback. */ TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); -- cgit v0.12 From 56dedeb231281fb437f1caa29d16938b44a41f69 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 14 Dec 2009 10:03:12 +0000 Subject: Document that [file tempfile] always works on the native filesystem by design. [Bug 2388866] --- ChangeLog | 15 ++++++++++----- doc/file.n | 8 +++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e02bc6..3a34d12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,17 @@ +2009-12-14 Donal K. Fellows + + * doc/file.n (file tempfile): [Bug 2388866]: Note that this only ever + creates files on the native filesystem. This is a design feature. + 2009-12-13 Miguel Sofer - * generic/tclBasic.c: Release TclPopCallFrame() from its - * generic/tclExecute.c: tailcall-management duties + * generic/tclBasic.c: Release TclPopCallFrame() from its + * generic/tclExecute.c: tailcall-management duties * generic/tclNamesp.c: - * generic/tclBasic.c: Moving TclBCArgumentRelease call - * generic/tclExecute.c: from TclNRTailcallObjCmd to TEBC, so that - the pairing of the Enter and Release calls is clearer. + * generic/tclBasic.c: Moving TclBCArgumentRelease call from + * generic/tclExecute.c: TclNRTailcallObjCmd to TEBC, so that the + pairing of the Enter and Release calls is clearer. 2009-12-12 Donal K. Fellows diff --git a/doc/file.n b/doc/file.n index eb51450..da54c0d 100644 --- a/doc/file.n +++ b/doc/file.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: file.n,v 1.56 2008/11/29 18:17:19 dkf Exp $ +'\" RCS: @(#) $Id: file.n,v 1.57 2009/12/14 10:03:13 dkf Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -446,6 +446,12 @@ for the temporary file to be deleted once it is no longer required. If the to use when creating it (such as the directory, base-name or extension) though some platforms may ignore some or all of these parts and use a built-in default instead. +.RS +.PP +Note that temporary files are \fIonly\fR ever created on the native +filesystem. As such, they can be relied upon to be used with operating-system +native APIs and external programs that require a filename. +.RE .VE 8.6 .TP \fBfile type \fIname\fR -- cgit v0.12 From e68e8b910b85a97d8b4804c4b193bd92372855a8 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 16 Dec 2009 09:26:05 +0000 Subject: [Bug 2913616]: Make msgcat package work in safe interpreters. --- ChangeLog | 5 +++++ library/msgcat/msgcat.tcl | 23 +++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a34d12..dbea089 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-16 Donal K. Fellows + + * library/msgcat/msgcat.tcl (Init): [Bug 2913616]: Do not use platform + tests that are not needed and which don't work in safe interpreters. + 2009-12-14 Donal K. Fellows * doc/file.n (file tempfile): [Bug 2388866]: Note that this only ever diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index 660d435..f3e79d8 100644 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: msgcat.tcl,v 1.27 2009/11/18 21:45:36 nijtmans Exp $ +# RCS: @(#) $Id: msgcat.tcl,v 1.28 2009/12/16 09:26:24 dkf Exp $ package require Tcl 8.5 # When the version number changes, be sure to update the pkgIndex.tcl file, @@ -442,13 +442,15 @@ proc msgcat::ConvertLocale {value} { # Initialize the default locale proc msgcat::Init {} { + global env tcl_platform + # # set default locale, try to get from environment # foreach varName {LC_ALL LC_MESSAGES LANG} { - if {[info exists ::env($varName)] && ("" ne $::env($varName))} { + if {[info exists env($varName)] && ("" ne $env($varName))} { if {![catch { - mclocale [ConvertLocale $::env($varName)] + mclocale [ConvertLocale $env($varName)] }]} { return } @@ -457,8 +459,7 @@ proc msgcat::Init {} { # # On Darwin, fallback to current CFLocale identifier if available. # - if {$::tcl_platform(os) eq "Darwin" && $::tcl_platform(platform) eq "unix" - && [info exists ::tcl::mac::locale] && $::tcl::mac::locale ne ""} { + if {[info exists ::tcl::mac::locale] && $::tcl::mac::locale ne ""} { if {![catch { mclocale [ConvertLocale $::tcl::mac::locale] }]} { @@ -469,7 +470,7 @@ proc msgcat::Init {} { # The rest of this routine is special processing for Windows; # all other platforms, get out now. # - if { $::tcl_platform(platform) ne "windows" } { + if {$tcl_platform(platform) ne "windows"} { mclocale C return } @@ -477,9 +478,11 @@ proc msgcat::Init {} { # On Windows, try to set locale depending on registry settings, # or fall back on locale of "C". # - set key {HKEY_CURRENT_USER\Control Panel\International} - if {[catch {package require registry}] \ - || [catch {registry get $key "locale"} locale]} { + if {[catch { + package require registry + set key {HKEY_CURRENT_USER\Control Panel\International} + set locale [registry get $key "locale"] + }]} { mclocale C return } @@ -496,7 +499,7 @@ proc msgcat::Init {} { set locale [string tolower $locale] while {[string length $locale]} { if {![catch { - mclocale [ConvertLocale [dict get $WinRegToISO639 $locale]] + mclocale [ConvertLocale [dict get $WinRegToISO639 $locale]] }]} { return } -- cgit v0.12 From 597e47fac6b0cca10dd41c76269396b07f483ca4 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 16 Dec 2009 13:53:56 +0000 Subject: Force this file to be interpreted as a Tcl script by Emacs --- tools/tcltk-man2html.tcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index d758edb..3855d50 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -1969,3 +1969,7 @@ if {1} { puts $error\n$errorInfo } } + +# Local-Variables: +# mode: tcl +# End: -- cgit v0.12 From cf4896697457a54ad804eebeb31b63e27e41cb6c Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 16 Dec 2009 14:01:11 +0000 Subject: [Bug 1911342]: Rewrite formatting to avoid bogus link from tm.n to list.n in the HTML documentation. --- ChangeLog | 3 +++ doc/tm.n | 26 +++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbea089..1a6bc8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-12-16 Donal K. Fellows + * doc/tm.n: [Bug 1911342]: Formatting rewrite to avoid bogus crosslink + to the list manpage when generating HTML. + * library/msgcat/msgcat.tcl (Init): [Bug 2913616]: Do not use platform tests that are not needed and which don't work in safe interpreters. diff --git a/doc/tm.n b/doc/tm.n index 59980f0..1b6a5f7 100644 --- a/doc/tm.n +++ b/doc/tm.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tm.n,v 1.18 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: tm.n,v 1.19 2009/12/16 14:01:11 dkf Exp $ '\" .so man.macros .TH tm n 8.5 Tcl "Tcl Built-In Commands" @@ -14,17 +14,19 @@ tm \- Facilities for locating and loading of Tcl Modules .SH SYNOPSIS .nf -\fB::tcl::tm::path\fR \fBadd\fR \fIpath\fR... -\fB::tcl::tm::path\fR \fBremove\fR \fIpath\fR... -\fB::tcl::tm::path\fR \fBlist\fR -\fB::tcl::tm::roots\fR \fIpath\fR... +\fB::tcl::tm::path add \fR?\fIpath\fR...? +\fB::tcl::tm::path remove \fR?\fIpath\fR...? +\fB::tcl::tm::path list\fR +\fB::tcl::tm::roots \fR?\fIpath\fR...? .fi .BE .SH DESCRIPTION +.PP This document describes the facilities for locating and loading Tcl -Modules. The following commands are supported: +Modules (see \fBMODULE DEFINITION\fR for the definition of a Tcl Module). +The following commands are supported: .TP -\fB::tcl::tm::path\fR \fBadd \fR?\fIpath\fR...? +\fB::tcl::tm::path add \fR?\fIpath\fR...? . The paths are added at the head to the list of module paths, in order of appearance. This means that the last argument ends up as the new @@ -46,17 +48,17 @@ reverse order of addition. In other words, the paths added last are looked at first. .RE .TP -\fB::tcl::tm::path\fR \fBremove \fR?\fIpath\fR...? +\fB::tcl::tm::path remove \fR?\fIpath\fR...? . Removes the paths from the list of module paths. The command silently ignores all paths which are not on the list. .TP -\fB::tcl::tm::path\fR \fBlist\fR +\fB::tcl::tm::path list\fR . Returns a list containing all registered module paths, in the order that they are searched for modules. .TP -\fB::tcl::tm::roots\fR \fIpath\fR... +\fB::tcl::tm::roots \fR?\fIpath\fR...? . Similar to \fBpath add\fR, and layered on top of it. This command takes a list of paths, extends each with @@ -76,6 +78,7 @@ The command has been exposed to allow a build system to define additional root paths beyond those described by this document. .RE .SH "MODULE DEFINITION" +.PP A Tcl Module is a Tcl Package contained in a single file, and no other files required by it. This file has to be \fBsource\fRable. In other words, a Tcl Module is always imported via: @@ -207,6 +210,7 @@ package \fBFoo\fR is deployed in the form of a Tcl Module, packages like \fBfoo\fR, \fBfOo\fR, etc. are not allowed anymore. .SH "DEFAULT PATHS" +.PP The default list of paths on the module path is computed by a \fBtclsh\fR as follows, where \fIX\fR is the major version of the Tcl interpreter and \fIy\fR is less than or equal to the minor version of @@ -283,7 +287,7 @@ These paths are seen and therefore shared by all Tcl shells in the \fB$::env(PATH)\fR of the user. .PP Note that \fIX\fR and \fIy\fR follow the general rules set out -above. In other words, Tcl 8.4, for example, will look at these 5 +above. In other words, Tcl 8.4, for example, will look at these 10 environment variables: .PP .CS -- cgit v0.12 From c09d5284e91311929d7e92c73492076e8a05cd36 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 16 Dec 2009 23:25:59 +0000 Subject: =?UTF-8?q?Fix=20gcc=20warning:=20ignoring=20return=20value=20of?= =?UTF-8?q?=20=E2=80=98write=E2=80=99,=20declared=20with=20attribute=20war?= =?UTF-8?q?n=5Funused=5Fresult=20CONSTify=20functions=20TclpGetUserHome=20?= =?UTF-8?q?and=20TclSetPreInitScript=20(TIP=20#27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 11 +++++++++++ generic/tclInt.decls | 6 +++--- generic/tclIntDecls.h | 10 +++++----- generic/tclInterp.c | 10 +++++----- generic/tclTest.c | 14 +++++++++++--- unix/.cvsignore | 7 +++++++ unix/tclUnixFile.c | 4 ++-- unix/tclUnixNotfy.c | 14 ++++++++++---- unix/tclUnixPipe.c | 13 ++++++++++--- win/tclWinFile.c | 6 +++--- 10 files changed, 67 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a6bc8b..2940341 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-12-11 Jan Nijtmans + + * generic/tclTest.c: Fix gcc warning: ignoring return value of ‘write’, + * unix/tclUnixNotify.c declared with attribute warn_unused_result + * unix/tclUnixPipe.c + * generic/tclInt.decls CONSTify functions TclpGetUserHome and + * generic/tclIntDecls.h TclSetPreInitScript (TIP #27) + * generic/tclInterp.c + * win/tclWinFile.c + * unix/tclUnixFile.c + 2009-12-16 Donal K. Fellows * doc/tm.n: [Bug 1911342]: Formatting rewrite to avoid bogus crosslink diff --git a/generic/tclInt.decls b/generic/tclInt.decls index dc4a7ff..2d0e460 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.140 2009/07/15 13:17:18 dkf Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.141 2009/12/16 23:26:01 nijtmans Exp $ library tcl @@ -186,7 +186,7 @@ declare 41 generic { Tcl_Command TclGetOriginalCommand(Tcl_Command command) } declare 42 generic { - char *TclpGetUserHome(const char *name, Tcl_DString *bufferPtr) + CONST86 char *TclpGetUserHome(const char *name, Tcl_DString *bufferPtr) } # Removed in Tcl 8.5a2 #declare 43 generic { @@ -412,7 +412,7 @@ declare 98 generic { # Tcl_Obj *objPtr, int flags) #} declare 101 generic { - char *TclSetPreInitScript(char *string) + CONST86 char *TclSetPreInitScript(const char *string) } declare 102 generic { void TclSetupEnv(Tcl_Interp *interp) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 5672e25..a01b938 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.134 2009/07/15 13:17:18 dkf Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.135 2009/12/16 23:26:00 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -208,7 +208,7 @@ EXTERN Tcl_Command TclGetOriginalCommand (Tcl_Command command); #ifndef TclpGetUserHome_TCL_DECLARED #define TclpGetUserHome_TCL_DECLARED /* 42 */ -EXTERN char * TclpGetUserHome (const char * name, +EXTERN CONST86 char * TclpGetUserHome (const char * name, Tcl_DString * bufferPtr); #endif /* Slot 43 is reserved */ @@ -408,7 +408,7 @@ EXTERN int TclServiceIdle (void); #ifndef TclSetPreInitScript_TCL_DECLARED #define TclSetPreInitScript_TCL_DECLARED /* 101 */ -EXTERN char * TclSetPreInitScript (char * string); +EXTERN CONST86 char * TclSetPreInitScript (const char * string); #endif #ifndef TclSetupEnv_TCL_DECLARED #define TclSetupEnv_TCL_DECLARED @@ -1100,7 +1100,7 @@ typedef struct TclIntStubs { TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ int (*tclGetOpenMode) (Tcl_Interp * interp, const char * str, int * seekFlagPtr); /* 40 */ Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ - char * (*tclpGetUserHome) (const char * name, Tcl_DString * bufferPtr); /* 42 */ + CONST86 char * (*tclpGetUserHome) (const char * name, Tcl_DString * bufferPtr); /* 42 */ void *reserved43; int (*tclGuessPackageName) (const char * fileName, Tcl_DString * bufPtr); /* 44 */ int (*tclHideUnsafeCommands) (Tcl_Interp * interp); /* 45 */ @@ -1159,7 +1159,7 @@ typedef struct TclIntStubs { int (*tclServiceIdle) (void); /* 98 */ void *reserved99; void *reserved100; - char * (*tclSetPreInitScript) (char * string); /* 101 */ + CONST86 char * (*tclSetPreInitScript) (const char * string); /* 101 */ void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ int (*tclSockGetPort) (Tcl_Interp * interp, const char * str, const char * proto, int * portPtr); /* 103 */ int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index edf31ff..89b635d 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.107 2009/12/05 21:30:05 msofer Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.108 2009/12/16 23:26:01 nijtmans Exp $ */ #include "tclInt.h" @@ -21,7 +21,7 @@ * above. This variable can be modified by the function below. */ -static char *tclPreInitScript = NULL; +static const char *tclPreInitScript = NULL; /* Forward declaration */ struct Target; @@ -265,11 +265,11 @@ static void TimeLimitCallback(ClientData clientData); *---------------------------------------------------------------------- */ -char * +const char * TclSetPreInitScript( - char *string) /* Pointer to a script. */ + const char *string) /* Pointer to a script. */ { - char *prevString = tclPreInitScript; + const char *prevString = tclPreInitScript; tclPreInitScript = string; return(prevString); } diff --git a/generic/tclTest.c b/generic/tclTest.c index 812a610..192e7e2 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.142 2009/12/12 19:57:26 dkf Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.143 2009/12/16 23:26:01 nijtmans Exp $ */ #undef STATIC_BUILD @@ -2222,9 +2222,13 @@ ExitProcOdd( ClientData clientData) /* Integer value to print. */ { char buf[16 + TCL_INTEGER_SPACE]; + size_t len; sprintf(buf, "odd %d\n", PTR2INT(clientData)); - (void)write(1, buf, strlen(buf)); + len = strlen(buf); + if (len != (size_t) write(1, buf, len)) { + Tcl_Panic("ExitProcOdd: unable to write to stdout"); + } } static void @@ -2232,9 +2236,13 @@ ExitProcEven( ClientData clientData) /* Integer value to print. */ { char buf[16 + TCL_INTEGER_SPACE]; + size_t len; sprintf(buf, "even %d\n", PTR2INT(clientData)); - (void)write(1, buf, strlen(buf)); + len = strlen(buf); + if (len != (size_t) write(1, buf, len)) { + Tcl_Panic("ExitProcEven: unable to write to stdout"); + } } /* diff --git a/unix/.cvsignore b/unix/.cvsignore index 97b5f50..516d2b3 100644 --- a/unix/.cvsignore +++ b/unix/.cvsignore @@ -6,3 +6,10 @@ tclConfig.sh autom4te.cache tcl.pc tclsh.exe +cat +dltest.marker +longfile +tclsh +tcltest +test1 +test2 diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index c8ac03a..a656f4c 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFile.c,v 1.55 2009/08/02 12:08:17 dkf Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.56 2009/12/16 23:26:00 nijtmans Exp $ */ #include "tclInt.h" @@ -568,7 +568,7 @@ NativeMatchType( *---------------------------------------------------------------------- */ -char * +const char * TclpGetUserHome( const char *name, /* User name for desired home directory. */ Tcl_DString *bufferPtr) /* Uninitialized or free DString filled with diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index edcd884..3be0bb9 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.39 2009/04/10 18:02:37 das Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.40 2009/12/16 23:26:00 nijtmans Exp $ */ #include "tclInt.h" @@ -291,7 +291,9 @@ Tcl_FinalizeNotifier( * processes had terminated. [Bug: 4139] [Bug: 1222872] */ - write(triggerPipe, "q", 1); + if (write(triggerPipe, "q", 1) != 1) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to write q to triggerPipe"); + } close(triggerPipe); while(triggerPipe >= 0) { Tcl_ConditionWait(¬ifierCV, ¬ifierMutex, NULL); @@ -782,7 +784,9 @@ Tcl_WaitForEvent( waitingListPtr = tsdPtr; tsdPtr->onList = 1; - write(triggerPipe, "", 1); + if (write(triggerPipe, "", 1) != 1) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to write to triggerPipe"); + } } FD_ZERO(&(tsdPtr->readyMasks.readable)); @@ -812,7 +816,9 @@ Tcl_WaitForEvent( } tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; tsdPtr->onList = 0; - write(triggerPipe, "", 1); + if (write(triggerPipe, "", 1) != 1) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to write to triggerPipe"); + } } #else diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 69250f8..208b6d9 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.49 2009/11/09 13:47:23 dkf Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.50 2009/12/16 23:26:00 nijtmans Exp $ */ #include "tclInt.h" @@ -448,6 +448,7 @@ TclpCreateProcess( pid = fork(); if (pid == 0) { + size_t len; int joinThisError = errorFile && (errorFile == outputFile); fd = GetFd(errPipeOut); @@ -463,7 +464,10 @@ TclpCreateProcess( ((dup2(1,2) == -1) || (fcntl(2, F_SETFD, 0) != 0)))) { sprintf(errSpace, "%dforked process couldn't set up input/output: ", errno); - (void) write(fd, errSpace, (size_t) strlen(errSpace)); + len = strlen(errSpace); + if (len != (size_t) write(fd, errSpace, len)) { + Tcl_Panic("TclpCreateProcess: unable to write to errPipeOut"); + } _exit(1); } @@ -474,7 +478,10 @@ TclpCreateProcess( RestoreSignals(); execvp(newArgv[0], newArgv); /* INTL: Native. */ sprintf(errSpace, "%dcouldn't execute \"%.150s\": ", errno, argv[0]); - (void) write(fd, errSpace, (size_t) strlen(errSpace)); + len = strlen(errSpace); + if (len != (size_t) write(fd, errSpace, len)) { + Tcl_Panic("TclpCreateProcess: unable to write to errPipeOut"); + } _exit(1); } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 25e1eac..23fea2b 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.99 2009/11/24 00:08:27 patthoyts Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.100 2009/12/16 23:26:02 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -1416,13 +1416,13 @@ NativeMatchType( *---------------------------------------------------------------------- */ -char * +const char * TclpGetUserHome( const char *name, /* User name for desired home directory. */ Tcl_DString *bufferPtr) /* Uninitialized or free DString filled with * name of user's home directory. */ { - char *result; + const char *result; HINSTANCE netapiInst; result = NULL; -- cgit v0.12 From 1ccff541fe927c0214548f5717ad58bede0d22eb Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 16 Dec 2009 23:44:15 +0000 Subject: Upgrade to Safe Base's handling of [glob] to be more permissive with the feature set supported, but stricter with path management. It also now has an error pattern more like the standard [glob] command. --- ChangeLog | 22 +++++++----- library/safe.tcl | 101 +++++++++++++++++++++++++++++++++++++++++-------------- tests/safe.test | 37 +++++++++++++++++++- 3 files changed, 126 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2940341..c62b2ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,19 @@ +2009-12-16 Donal K. Fellows + + * library/safe.tcl (::safe::AliasGlob): Upgrade to correctly support a + larger fraction of [glob] functionality, while being stricter about + directory management. + 2009-12-11 Jan Nijtmans - * generic/tclTest.c: Fix gcc warning: ignoring return value of ‘write’, - * unix/tclUnixNotify.c declared with attribute warn_unused_result - * unix/tclUnixPipe.c - * generic/tclInt.decls CONSTify functions TclpGetUserHome and - * generic/tclIntDecls.h TclSetPreInitScript (TIP #27) - * generic/tclInterp.c - * win/tclWinFile.c - * unix/tclUnixFile.c + * generic/tclTest.c: Fix gcc warning: ignoring return value of + * unix/tclUnixNotify.c: ‘write’, declared with attribute + * unix/tclUnixPipe.c: warn_unused_result. + * generic/tclInt.decls: CONSTify functions TclpGetUserHome and + * generic/tclIntDecls.h:TclSetPreInitScript (TIP #27) + * generic/tclInterp.c: + * win/tclWinFile.c: + * unix/tclUnixFile.c: 2009-12-16 Donal K. Fellows diff --git a/library/safe.tcl b/library/safe.tcl index 8bc26f9..6d896ea 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.34 2009/12/03 15:49:22 dkf Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.35 2009/12/16 23:44:15 dkf Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -651,34 +651,48 @@ proc ::safe::CheckFileName {slave file} { } # AliasGlob is the target of the "glob" alias in safe interpreters. + proc ::safe::AliasGlob {slave args} { Log $slave "GLOB ! $args" NOTICE set cmd {} set at 0 + array set got { + -directory 0 + -nocomplain 0 + -join 0 + -tails 0 + -- 0 + } + + if {$::tcl_platform(platform) eq "windows"} { + set dirPartRE {^(.*)[\\/]} + } else { + set dirPartRE {^(.*)/} + } set dir {} set virtualdir {} while {$at < [llength $args]} { switch -glob -- [set opt [lindex $args $at]] { - -nocomplain - - -join { + -nocomplain - -- - -join - -tails { lappend cmd $opt + set got($opt) 1 + incr at + } + -types - -type { + lappend cmd -types [lindex $args [incr at]] incr at } -directory { - set virtualdir [lindex $args [incr at]] - # Get the real path from the virtual one and check that the - # path is in the access path of that slave. - try { - set dir [TranslatePath $slave $virtualdir] - DirInAccessPath $slave $dir - } on error msg { - Log $slave $msg - return -code error "permission denied" + if {$got($opt)} { + return -code error \ + {"-directory" cannot be used with "-path"} } - lappend cmd -directory $dir + set got($opt) 1 + set virtualdir [lindex $args [incr at]] incr at + lappend cmd -directory $dir } pkgIndex.tcl { # Oops, this is globbing a subdirectory in regular package @@ -692,26 +706,60 @@ proc ::safe::AliasGlob {slave args} { return -code error "Safe base rejecting glob option '$opt'" } default { - if {[regexp {(.*)[\\/]} $opt -> thedir]} { - try { - DirInAccessPath $slave [TranslatePath $slave $thedir] - } on error msg { - Log $slave $msg - return -code error "permission denied" - } + break + } + } + if {$got(--) || $got(-join)} break + } + + # Get the real path from the virtual one and check that the path is in the + # access path of that slave. Done after basic argument processing so that + # we know if -nocomplain is set. + if {$got(-directory)} { + try { + set dir [TranslatePath $slave $virtualdir] + DirInAccessPath $slave $dir + } on error msg { + Log $slave $msg + if {$got(-nocomplain)} { + return + } + return -code error "permission denied" + } + } + + # Apply the -join semantics ourselves + if {$got(-join)} { + set args [lreplace $args $at end [join [lrange $args $at end] "/"]] + } + + # Process remaining pattern arguments + set firstPattern [llength $cmd] + while {$at < [llength $args]} { + set opt [lindex $args $at] + incr at + if {[regexp $dirPartRE $opt -> thedir]} { + try { + set thedir [file join $virtualdir $thedir] + DirInAccessPath $slave [TranslatePath $slave $thedir] + } on error msg { + Log $slave $msg + if {$got(-nocomplain)} { + continue } - lappend cmd $opt - incr at + return -code error "permission denied" } } + lappend cmd $opt } Log $slave "GLOB = $cmd" NOTICE + if {$got(-nocomplain) && [llength $cmd] eq $firstPattern} { + return + } try { ::interp invokehidden $slave glob {*}$cmd - } on ok msg { - # Nothing to be done, just capture the 'msg' for later. } on error msg { Log $slave $msg return -code error "script error" @@ -721,8 +769,11 @@ proc ::safe::AliasGlob {slave args} { # Translate path back to what the slave should see. set res {} + set l [string length $dir] foreach p $msg { - regsub -- ^$dir $p $virtualdir p + if {[string equal -length $l $dir $p]} { + set p [string replace $p 0 [expr {$l-1}] $virtualdir] + } lappend res $p } diff --git a/tests/safe.test b/tests/safe.test index c8e170f..3e451d4 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.28 2009/12/03 15:49:22 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.29 2009/12/16 23:44:15 dkf Exp $ package require Tcl 8.5 @@ -498,6 +498,41 @@ test safe-12.1 {glob is restricted [Bug 2906841]} -setup { } -returnCodes error -cleanup { safe::interpDelete $i } -result "permission denied" +test safe-12.2 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -directory .. * +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result "permission denied" +test safe-12.3 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -join .. * +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result "permission denied" +test safe-12.4 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -nocomplain ../* +} -cleanup { + safe::interpDelete $i +} -result {} +test safe-12.5 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -directory .. -nocomplain * +} -cleanup { + safe::interpDelete $i +} -result {} +test safe-12.6 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -nocomplain -join .. * +} -cleanup { + safe::interpDelete $i +} -result {} set ::auto_path $saveAutoPath # cleanup -- cgit v0.12 From 4765b94617414fb3994c4f1401cca36d0fae46eb Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 17 Dec 2009 00:06:21 +0000 Subject: =?UTF-8?q?Fix=20gcc=20warning:=20ignoring=20return=20value=20of?= =?UTF-8?q?=20=E2=80=98write=E2=80=99,=20declared=20with=20attribute=20war?= =?UTF-8?q?n=5Funused=5Fresult?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unix/tclUnixNotfy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 3be0bb9..e8860df 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixNotfy.c,v 1.40 2009/12/16 23:26:00 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.41 2009/12/17 00:06:21 nijtmans Exp $ */ #include "tclInt.h" @@ -785,7 +785,7 @@ Tcl_WaitForEvent( tsdPtr->onList = 1; if (write(triggerPipe, "", 1) != 1) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to write to triggerPipe"); + Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe"); } } @@ -817,7 +817,7 @@ Tcl_WaitForEvent( tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; tsdPtr->onList = 0; if (write(triggerPipe, "", 1) != 1) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to write to triggerPipe"); + Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe"); } } -- cgit v0.12 From 98be197b8251a58439b9b30bb3e35c3e428d5295 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 17 Dec 2009 16:28:21 +0000 Subject: bump to msgcat 1.4.3 to account for commits --- library/msgcat/msgcat.tcl | 4 ++-- library/msgcat/pkgIndex.tcl | 2 +- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index f3e79d8..56b7c12 100644 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -10,12 +10,12 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: msgcat.tcl,v 1.28 2009/12/16 09:26:24 dkf Exp $ +# RCS: @(#) $Id: msgcat.tcl,v 1.29 2009/12/17 16:28:21 dgp Exp $ package require Tcl 8.5 # When the version number changes, be sure to update the pkgIndex.tcl file, # and the installation directory in the Makefiles. -package provide msgcat 1.4.2 +package provide msgcat 1.4.3 namespace eval msgcat { namespace export mc mcload mclocale mcmax mcmset mcpreferences mcset \ diff --git a/library/msgcat/pkgIndex.tcl b/library/msgcat/pkgIndex.tcl index 5b6037c..63ed8ed 100644 --- a/library/msgcat/pkgIndex.tcl +++ b/library/msgcat/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded msgcat 1.4.2 [list source [file join $dir msgcat.tcl]] +package ifneeded msgcat 1.4.3 [list source [file join $dir msgcat.tcl]] diff --git a/unix/Makefile.in b/unix/Makefile.in index c184c78..f65a2d3 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.284 2009/11/29 08:46:38 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.285 2009/12/17 16:28:21 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -834,8 +834,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \ done; - @echo "Installing package msgcat 1.4.2 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.4.2.tm; + @echo "Installing package msgcat 1.4.3 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.4.3.tm; @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.2.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 9df2d0d..48b2e86 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.169 2009/12/02 20:45:17 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.170 2009/12/17 16:28:21 dgp Exp $ VERSION = @TCL_VERSION@ @@ -666,8 +666,8 @@ install-libraries: libraries install-tzdata install-msgs do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \ done; - @echo "Installing package msgcat 1.4.2 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.2.tm; + @echo "Installing package msgcat 1.4.3 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.3.tm; @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.2.tm; @echo "Installing package platform 1.0.5 as a Tcl Module"; -- cgit v0.12 From e3f5e21f00d98dacf701c346899ada0ef3327513 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 19 Dec 2009 14:21:59 +0000 Subject: * generic/tclBasic.c: Fix for bad cmd resolution by coroutines * tests/coroutine.test: [Bug #2917627]. Thanks to schelte for finding it. --- ChangeLog | 6 ++++++ generic/tclBasic.c | 3 ++- tests/coroutine.test | 12 +++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c62b2ac..6da4eb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-19 Miguel Sofer + + * generic/tclBasic.c: Fix for bad cmd resolution by coroutines + * tests/coroutine.test: [Bug #2917627]. Thanks to schelte for + finding it. + 2009-12-16 Donal K. Fellows * library/safe.tcl (::safe::AliasGlob): Upgrade to correctly support a diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1d649a1..aecdfa0 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.435 2009/12/13 17:54:05 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.436 2009/12/19 14:22:00 msofer Exp $ */ #include "tclInt.h" @@ -8869,6 +8869,7 @@ TclNRCoroutineObjCmd( TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL, NULL, NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; + iPtr->lookupNsPtr = iPtr->varFramePtr->nsPtr; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); return TCL_OK; diff --git a/tests/coroutine.test b/tests/coroutine.test index 639fc0b..b4019d4 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.9 2009/12/07 20:49:29 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.10 2009/12/19 14:22:00 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -402,6 +402,16 @@ test coroutine-4.3 {bug #2093947} -setup { unset ::res } -result {{v {} write} {v {} write} {v {} unset} {v {} write} {v {} unset}} +test coroutine-4.4 {bug #2917627: cmd resolution} -setup { + proc a {} {return global} + namespace eval b {proc a {} {return local}} +} -body { + namespace eval b {coroutine foo a} +} -cleanup { + rename a {} + namespace delete b +} -result local + test coroutine-5.1 {right numLevels on coro return} -constraints {testnrelevels} \ -setup { proc nestedYield {{val {}}} { -- cgit v0.12 From f7e02c57c848c495a77975b927a0f4076bf4822c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 21 Dec 2009 23:25:39 +0000 Subject: Various CYGWIN-related fixes. In the win32 configure script, CYGWIN is still not enabled yet, but at least it is a step in the right direction. --- ChangeLog | 26 ++++++++++++++-- generic/rege_dfa.c | 22 ++++++------- generic/tcl.h | 8 ++++- generic/tclEnv.c | 19 ++++++----- generic/tclFileName.c | 19 ++++++++--- generic/tclOOInt.h | 3 +- generic/tclPathObj.c | 18 +++++++++-- generic/tclPlatDecls.h | 8 ++--- generic/tclPort.h | 12 ++++++- generic/tclThreadStorage.c | 4 +-- tests/env.test | 16 +++++----- unix/Makefile.in | 78 +++++++++++++++++++++++----------------------- unix/configure | 17 +++++++++- unix/dltest/.cvsignore | 1 + unix/tcl.m4 | 14 +++++++++ win/tclWinDde.c | 11 +++---- win/tclWinFile.c | 18 +++++------ win/tclWinPipe.c | 6 ++-- win/tclWinPort.h | 5 ++- win/tclWinSock.c | 6 ++-- 20 files changed, 204 insertions(+), 107 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6da4eb7..7817c07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2009-12-21 Jan Nijtmans + + * generic/tclThreadStorage.c: Fix gcc warning, using gcc-4.3.4 on cygwin + warning: missing initializer + * generic/tclOOInt.h: prevent conflict with DUPLICATE + definition in WINAPI's nb30.h + * generic/rege_dfa.c: Fix macro conflict on CYGWIN: don't use "small". + * generic/tcl.h Include before on CYGWIN + * generic/tclPathObj.c + * generic/tclPort.h + * tests/env.test: Don't unset WINDIR and TERM, it has a special meaning + on CYGWIN (both in UNIX and WIN32 mode!) + * generic/tclPlatDecls.h: Include through tclPlatDecls.h + * win/tclWinPort.h stricmp -> strcasecmp + * win/tclWinDde.c _wcsicmp -> wcscasecmp + * win/tclWinFile.c + * win/tclWinPipe.c + * win/tclWinSock.c + * unix/tcl.m4 Add dynamic loading support to CYGWIN + * unix/configure (regenerated) + * unix/Makefile.in + 2009-12-19 Miguel Sofer * generic/tclBasic.c: Fix for bad cmd resolution by coroutines @@ -13,7 +35,7 @@ 2009-12-11 Jan Nijtmans * generic/tclTest.c: Fix gcc warning: ignoring return value of - * unix/tclUnixNotify.c: ‘write’, declared with attribute + * unix/tclUnixNotify.c: "write", declared with attribute * unix/tclUnixPipe.c: warn_unused_result. * generic/tclInt.decls: CONSTify functions TclpGetUserHome and * generic/tclIntDecls.h:TclSetPreInitScript (TIP #27) @@ -39,7 +61,7 @@ * generic/tclBasic.c: Release TclPopCallFrame() from its * generic/tclExecute.c: tailcall-management duties * generic/tclNamesp.c: - + * generic/tclBasic.c: Moving TclBCArgumentRelease call from * generic/tclExecute.c: TclNRTailcallObjCmd to TEBC, so that the pairing of the Enter and Release calls is clearer. diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c index fbeae20..e233680 100644 --- a/generic/rege_dfa.c +++ b/generic/rege_dfa.c @@ -318,32 +318,32 @@ newdfa( struct vars *v, struct cnfa *cnfa, struct colormap *cm, - struct smalldfa *small) /* preallocated space, may be NULL */ + struct smalldfa *sml) /* preallocated space, may be NULL */ { struct dfa *d; size_t nss = cnfa->nstates * 2; int wordsper = (cnfa->nstates + UBITS - 1) / UBITS; - struct smalldfa *smallwas = small; + struct smalldfa *smallwas = sml; assert(cnfa != NULL && cnfa->nstates != 0); if (nss <= FEWSTATES && cnfa->ncolors <= FEWCOLORS) { assert(wordsper == 1); - if (small == NULL) { - small = (struct smalldfa *) MALLOC(sizeof(struct smalldfa)); - if (small == NULL) { + if (sml == NULL) { + sml = (struct smalldfa *) MALLOC(sizeof(struct smalldfa)); + if (sml == NULL) { ERR(REG_ESPACE); return NULL; } } - d = &small->dfa; - d->ssets = small->ssets; - d->statesarea = small->statesarea; + d = &sml->dfa; + d->ssets = sml->ssets; + d->statesarea = sml->statesarea; d->work = &d->statesarea[nss]; - d->outsarea = small->outsarea; - d->incarea = small->incarea; + d->outsarea = sml->outsarea; + d->incarea = sml->incarea; d->cptsmalloced = 0; - d->mallocarea = (smallwas == NULL) ? (char *)small : NULL; + d->mallocarea = (smallwas == NULL) ? (char *)sml : NULL; } else { d = (struct dfa *)MALLOC(sizeof(struct dfa)); if (d == NULL) { diff --git a/generic/tcl.h b/generic/tcl.h index a13b897..fb4cbdc 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.293 2009/11/30 23:10:38 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.294 2009/12/21 23:25:39 nijtmans Exp $ */ #ifndef _TCL @@ -129,6 +129,12 @@ extern "C" { #define TCL_DECLARE_MUTEX(name) #endif +#if defined(__CYGWIN__) && defined(__WIN32__) +/* Cygwin/win32 needs winsock2.h to be included BEFORE stdio.h, + * otherwise there will be symbol conflicts with sys/types.h! */ +# include +#endif + /* * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and * SEEK_END, all #define'd by stdio.h . diff --git a/generic/tclEnv.c b/generic/tclEnv.c index ac47ee9..40650de 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.39 2009/01/04 22:55:12 ferrieux Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.40 2009/12/21 23:25:40 nijtmans Exp $ */ #include "tclInt.h" @@ -45,8 +45,13 @@ static char * EnvTraceProc(ClientData clientData, Tcl_Interp *interp, static void ReplaceString(const char *oldStr, char *newStr); MODULE_SCOPE void TclSetEnv(const char *name, const char *value); MODULE_SCOPE void TclUnsetEnv(const char *name); -#if defined(__CYGWIN__) && defined(__WIN32__) -static void TclCygwinPutenv(const char *string); + +#if defined(__CYGWIN__) +/* On Cygwin, the environment is imported from the Cygwin DLL. */ + DLLIMPORT extern int cygwin_posix_to_win32_path_list_buf_size(char *value); + DLLIMPORT extern void cygwin_posix_to_win32_path_list(char *buf, char *value); +# define putenv TclCygwinPutenv +static void TclCygwinPutenv(char *string); #endif /* @@ -394,7 +399,7 @@ TclUnsetEnv( * that no = should be included, and Windows requires it. */ -#ifdef WIN32 +#if defined(__WIN32__) || defined(__CYGWIN__) string = ckalloc((unsigned) length+2); memcpy(string, name, (size_t) length); string[length] = '='; @@ -688,7 +693,7 @@ TclFinalizeEnvironment(void) } } -#if defined(__CYGWIN__) && defined(__WIN32__) +#if defined(__CYGWIN__) #include @@ -701,7 +706,7 @@ TclFinalizeEnvironment(void) static void TclCygwinPutenv( - const char *str) + char *str) { char *name, *value; @@ -780,7 +785,7 @@ TclCygwinPutenv( SetEnvironmentVariable(name, buf); } } -#endif /* __CYGWIN__ && __WIN32__ */ +#endif /* __CYGWIN__ */ /* * Local Variables: diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 1070c42..664ba94 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.98 2009/08/21 19:06:06 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.99 2009/12/21 23:25:40 nijtmans Exp $ */ #include "tclInt.h" @@ -1331,8 +1331,8 @@ Tcl_GlobObjCmd( if (dir == PATH_GENERAL) { int pathlength; - char *last; - char *first = Tcl_GetStringFromObj(pathOrDir,&pathlength); + const char *last; + const char *first = Tcl_GetStringFromObj(pathOrDir,&pathlength); /* * Find the last path separator in the path @@ -1433,7 +1433,7 @@ Tcl_GlobObjCmd( while (--length >= 0) { int len; - char *str; + const char *str; Tcl_ListObjIndex(interp, typePtr, length, &look); str = Tcl_GetStringFromObj(look, &len); @@ -2445,7 +2445,6 @@ DoGlob( #if defined(__CYGWIN__) && defined(__WIN32__) { - extern int cygwin_conv_to_win32_path(const char *, char *); char winbuf[MAX_PATH+1]; cygwin_conv_to_win32_path(Tcl_DStringValue(&append), winbuf); @@ -2463,6 +2462,16 @@ DoGlob( Tcl_DStringAppend(&append, ".", 1); } } +#if defined(__CYGWIN__) && !defined(__WIN32__) + DLLIMPORT extern int cygwin_conv_to_posix_path(const char *, char *); + { + char winbuf[MAXPATHLEN+1]; + + cygwin_conv_to_posix_path(Tcl_DStringValue(&append), winbuf); + Tcl_DStringFree(&append); + Tcl_DStringAppend(&append, winbuf, -1); + } +#endif /* __CYGWIN__ && __WIN32__ */ break; } diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 17db3f1..86bc9d3 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.12 2009/07/12 14:51:30 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.13 2009/12/21 23:25:39 nijtmans Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -589,6 +589,7 @@ MODULE_SCOPE int TclOOUpcatchCmd(ClientData ignored, * but all arguments are used multiple times and so must have no side effects. */ +#undef DUPLICATE /* prevent possible conflict with definition in WINAPI nb30.h */ #define DUPLICATE(target,source,type) \ do { \ register unsigned len = sizeof(type) * ((target).num=(source).num);\ diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 6d36fe4..610c05e 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.84 2009/10/27 20:31:08 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.85 2009/12/21 23:25:39 nijtmans Exp $ */ #include "tclInt.h" @@ -2369,7 +2369,10 @@ SetFsPathFromAny( FsPath *fsPathPtr; Tcl_Obj *transPtr; char *name; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey); +#if defined(__CYGWIN__) && defined(__WIN32__) + int copied = 0; +#endif + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tclFsDataKey); if (pathPtr->typePtr == &tclFsPathType) { return TCL_OK; @@ -2514,7 +2517,6 @@ SetFsPathFromAny( #if defined(__CYGWIN__) && defined(__WIN32__) { - extern int cygwin_conv_to_win32_path(const char *, char *); char winbuf[MAX_PATH+1]; /* @@ -2527,6 +2529,11 @@ SetFsPathFromAny( if (len > 0) { cygwin_conv_to_win32_path(name, winbuf); TclWinNoBackslash(winbuf); + if (Tcl_IsShared(transPtr)) { + copied = 1; + transPtr = Tcl_DuplicateObj(transPtr); + Tcl_IncrRefCount(transPtr); + } Tcl_SetStringObj(transPtr, winbuf, -1); } } @@ -2557,6 +2564,11 @@ SetFsPathFromAny( SETPATHOBJ(pathPtr, fsPathPtr); PATHFLAGS(pathPtr) = 0; pathPtr->typePtr = &tclFsPathType; +#if defined(__CYGWIN__) && defined(__WIN32__) + if (copied) { + Tcl_DecrRefCount(transPtr); + } +#endif return TCL_OK; } diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index a868584..44358c2 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.33 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.34 2009/12/21 23:25:40 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -26,9 +26,7 @@ /* * Pull in the typedef of TCHAR for windows. */ -#if defined(__CYGWIN__) - typedef char TCHAR; -#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) +#if defined(__WIN32__) && !defined(_TCHAR_DEFINED) # include # ifndef _TCHAR_DEFINED /* Borland seems to forget to set this. */ @@ -39,6 +37,8 @@ /* MSVC++ misses this. */ typedef _TCHAR TCHAR; # endif +#elif defined(__CYGWIN__) + typedef char TCHAR; #endif /* !BEGIN!: Do not edit below this line. */ diff --git a/generic/tclPort.h b/generic/tclPort.h index d145468..0b4eda9 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPort.h,v 1.16 2008/11/04 23:57:41 hobbs Exp $ + * RCS: @(#) $Id: tclPort.h,v 1.17 2009/12/21 23:25:39 nijtmans Exp $ */ #ifndef _TCLPORT @@ -27,6 +27,16 @@ # include "tclUnixPort.h" #endif +#if defined(__CYGWIN__) +# define USE_PUTENV 1 +# define USE_PUTENV_FOR_UNSET 1 +/* On Cygwin, the environment is imported from the Cygwin DLL. */ + DLLIMPORT extern char **__cygwin_environ; + DLLIMPORT extern int cygwin_conv_to_win32_path(const char *, char *); +# define environ __cygwin_environ +# define timezone _timezone +#endif + #if !defined(LLONG_MIN) # ifdef TCL_WIDE_INT_IS_LONG # define LLONG_MIN LONG_MIN diff --git a/generic/tclThreadStorage.c b/generic/tclThreadStorage.c index 1a0a89d..ea2eeb1 100644 --- a/generic/tclThreadStorage.c +++ b/generic/tclThreadStorage.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadStorage.c,v 1.20 2009/03/16 00:43:09 mistachkin Exp $ + * RCS: @(#) $Id: tclThreadStorage.c,v 1.21 2009/12/21 23:25:40 nijtmans Exp $ */ #include "tclInt.h" @@ -43,7 +43,7 @@ static struct TSDMaster { * increasing value. */ Tcl_Mutex mutex; /* Protection for the rest of this structure, * which holds per-process data. */ -} tsdMaster = { NULL, 0 }; +} tsdMaster = { NULL, 0, NULL }; /* * The type of the data held per thread in a system TSD. diff --git a/tests/env.test b/tests/env.test index 7d7e5fa..f5669d7 100644 --- a/tests/env.test +++ b/tests/env.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: env.test,v 1.31 2009/05/07 10:34:42 dkf Exp $ +# RCS: @(#) $Id: env.test,v 1.32 2009/12/21 23:25:40 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -78,19 +78,19 @@ set printenvScript [makeFile { proc manglechar c { return [format {\u%04x} [scan $c %c]] } - + set names [lsort [array names env]] if {$tcl_platform(platform) eq "windows"} { lrem names HOME lrem names COMSPEC lrem names ComSpec lrem names "" - } + } foreach name { TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH PURE_PROG_NAME DISPLAY SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING - __CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG + __CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM } { lrem names $name } @@ -120,7 +120,7 @@ foreach name [array names env] { TCL_LIBRARY PATH LD_LIBRARY_PATH LIBPATH DISPLAY SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING - SECURITYSESSIONID LANG + SECURITYSESSIONID LANG WINDIR TERM }} { unset env($name) } @@ -241,7 +241,7 @@ test env-5.1 {corner cases - remove one elem at a time} -setup { array set env $x } -result {0} test env-5.2 {corner cases - unset the env array} -setup { - interp create i + interp create i } -body { # Unsetting a variable in an interp detaches the C-level traces from the # Tcl "env" variable. @@ -254,7 +254,7 @@ test env-5.2 {corner cases - unset the env array} -setup { interp delete i } -result {0} test env-5.3 {corner cases: unset the env in master should unset child} -setup { - interp create i + interp create i } -body { # Variables deleted in a master interp should be deleted in child interp # too. @@ -266,7 +266,7 @@ test env-5.3 {corner cases: unset the env in master should unset child} -setup { interp delete i } -result {a 1} test env-5.4 {corner cases - unset the env array} -setup { - interp create i + interp create i } -body { # The info exists command should be in synch with the env array. # Know Bug: 1737 diff --git a/unix/Makefile.in b/unix/Makefile.in index f65a2d3..146da43 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.285 2009/12/17 16:28:21 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.286 2009/12/21 23:25:40 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -164,7 +164,8 @@ INSTALL_DATA = ${INSTALL} -m 644 # make for the first time. Certain build targets (make genstubs) need it to be # available on the PATH. This executable should *NOT* be required just to do a # normal build although it can be required to run make dist. -TCL_EXE = tclsh +EXE_SUFFIX = @EXE_SUFFIX@ +TCL_EXE = tclsh${EXE_SUFFIX} # The symbols below provide support for dynamic loading and shared libraries. # See configure.in for a description of what the symbols mean. The values of @@ -178,7 +179,6 @@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ TCL_SHLIB_LD_EXTRAS = @TCL_SHLIB_LD_EXTRAS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ -#SHLIB_SUFFIX = DLTEST_TARGETS = dltest.marker @@ -588,7 +588,7 @@ SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \ all: binaries libraries doc packages -binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh +binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) ${TCL_EXE} libraries: @@ -614,9 +614,9 @@ tclLibObjs: # This targets actually build the objects needed for the lib in the above case objs: ${OBJS} -tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} +${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ - ${CC_SEARCH_FLAGS} -o tclsh + ${CC_SEARCH_FLAGS} -o ${TCL_EXE} Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in $(SHELL) config.status @@ -625,7 +625,7 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in clean: clean-packages rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ - errors tclsh tcltest lib.exp Tcl @DTRACE_HDR@ + errors ${TCL_EXE} tcltest${EXE_SUFFIX} lib.exp Tcl @DTRACE_HDR@ cd dltest ; $(MAKE) clean distclean: distclean-packages clean @@ -660,12 +660,12 @@ SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \ TCLLIBPATH="@abs_builddir@/pkgs" \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}" -tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} +tcltest${EXE_SUFFIX}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" tcltest-real: ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ - ${CC_SEARCH_FLAGS} -o tcltest + ${CC_SEARCH_FLAGS} -o tcltest${EXE_SUFFIX} # Note, in the targets below TCL_LIBRARY needs to be set or else "make test" # won't work in the case where the compilation directory isn't the same as the @@ -677,24 +677,24 @@ tcltest-real: test: test-tcl test-packages -test-tcl: tcltest - $(SHELL_ENV) ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) +test-tcl: tcltest${EXE_SUFFIX} + $(SHELL_ENV) ./tcltest${EXE_SUFFIX} $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -gdb-test: tcltest +gdb-test: tcltest${EXE_SUFFIX} @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run @echo "set args $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -singleproc 1" >> gdb.run - $(GDB) ./tcltest --command=gdb.run + $(GDB) ./tcltest${EXE_SUFFIX} --command=gdb.run rm gdb.run # Useful target to launch a built tcltest with the proper path,... -runtest: tcltest - $(SHELL_ENV) ./tcltest +runtest: tcltest${EXE_SUFFIX} + $(SHELL_ENV) ./tcltest${EXE_SUFFIX} # Useful target for running the test suite with an unwritable current # directory... -ro-test: tcltest - echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./tcltest +ro-test: tcltest${EXE_SUFFIX} + echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./tcltest${EXE_SUFFIX} # The following target generates the shared libraries in dltest/ that are used # for testing; they are included as part of the "tcltest" target (via the @@ -711,24 +711,24 @@ dltest.marker: ${STUB_LIB_FILE} # This target can be used to run tclsh from the build directory # via `make shell SCRIPT=/tmp/foo.tcl` -shell: tclsh - $(SHELL_ENV) ./tclsh $(SCRIPT) +shell: ${TCL_EXE} + $(SHELL_ENV) ./${TCL_EXE} $(SCRIPT) # This target can be used to run tclsh inside either gdb or insight -gdb: tclsh - $(SHELL_ENV) $(GDB) ./tclsh +gdb: ${TCL_EXE} + $(SHELL_ENV) $(GDB) ./${TCL_EXE} # This target can be used to run tclsh inside ddd -ddd: tclsh - $(SHELL_ENV) $(DDD) ./tclsh +ddd: ${TCL_EXE} + $(SHELL_ENV) $(DDD) ./${TCL_EXE} VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v -valgrind: tclsh tcltest - $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) +valgrind: ${TCL_EXE} tcltest${EXE_SUFFIX} + $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tcltest${EXE_SUFFIX} $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) -valgrindshell: tclsh - $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT) +valgrindshell: ${TCL_EXE} + $(SHELL_ENV) valgrind $(VALGRINDARGS) ./${TCL_EXE} $(SCRIPT) #-------------------------------------------------------------------------- # Installation rules @@ -770,7 +770,7 @@ install-binaries: binaries "$(LIB_INSTALL_DIR)"/$(TCL_EXP_FILE); \ fi @echo "Installing tclsh as $(BIN_INSTALL_DIR)/tclsh$(VERSION)" - @$(INSTALL_PROGRAM) tclsh "$(BIN_INSTALL_DIR)"/tclsh$(VERSION) + @$(INSTALL_PROGRAM) ${TCL_EXE} "$(BIN_INSTALL_DIR)"/tclsh$(VERSION)${EXE_SUFFIX} @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" @$(INSTALL_DATA) tclConfig.sh "$(CONFIG_INSTALL_DIR)"/tclConfig.sh @echo "Installing tclooConfig.sh to $(CONFIG_INSTALL_DIR)/" @@ -854,18 +854,18 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \ fi -install-tzdata: tclsh +install-tzdata: ${TCL_EXE} @echo "Installing time zone data" @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tclsh $(TOOL_DIR)/installData.tcl \ + ./${TCL_EXE} $(TOOL_DIR)/installData.tcl \ $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata -install-msgs: tclsh +install-msgs: ${TCL_EXE} @echo "Installing message catalogs" @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tclsh $(TOOL_DIR)/installData.tcl \ + ./${TCL_EXE} $(TOOL_DIR)/installData.tcl \ $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs install-doc: doc @@ -932,7 +932,7 @@ install-private-headers: libraries # tclAppInit.o does not execute concurrently with the renaming and recompiling # of that same object file in the targets below. -tclTestInit.o: $(UNIX_DIR)/tclAppInit.c tclsh +tclTestInit.o: $(UNIX_DIR)/tclAppInit.c ${TCL_EXE} @if test -f tclAppInit.o ; then \ rm -f tclAppInit.sav; \ mv tclAppInit.o tclAppInit.sav; \ @@ -946,7 +946,7 @@ tclTestInit.o: $(UNIX_DIR)/tclAppInit.c tclsh mv tclAppInit.sav tclAppInit.o; \ fi; -xtTestInit.o: $(UNIX_DIR)/tclAppInit.c tclsh +xtTestInit.o: $(UNIX_DIR)/tclAppInit.c ${TCL_EXE} @if test -f tclAppInit.o ; then \ rm -f tclAppInit.sav; \ mv tclAppInit.o tclAppInit.sav; \ @@ -1674,7 +1674,7 @@ test-packages: tcltest packages "@LD_LIBRARY_PATH_VAR@=../..:$${@LD_LIBRARY_PATH_VAR@}" \ "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" \ "TCLLIBPATH=../../pkgs" test \ - "TCLSH_PROG=../../tcltest"; ) \ + "TCLSH_PROG=../../tcltest${EXE_SUFFIX}"; ) \ fi; \ fi; \ done @@ -2011,20 +2011,20 @@ allpatch: dist # to function on those of the Tcl/Tk maintainers. #-------------------------------------------------------------------------- -html: tclsh +html: ${TCL_EXE} $(BUILD_HTML) @EXTRA_BUILD_HTML@ -html-tcl: tclsh +html-tcl: ${TCL_EXE} $(BUILD_HTML) --tcl @EXTRA_BUILD_HTML@ -html-tk: tclsh +html-tk: ${TCL_EXE} $(BUILD_HTML) --tk @EXTRA_BUILD_HTML@ BUILD_HTML = \ @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ + ./${TCL_EXE} $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS) #-------------------------------------------------------------------------- diff --git a/unix/configure b/unix/configure index 991879c..65fcfee 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX EXE_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' # Initialize some variables set by options. @@ -6624,6 +6624,7 @@ fi # Step 3: set configuration options based on system name and version. do64bit_ok=no + EXE_SUFFIX="" LDFLAGS_ORIG="$LDFLAGS" # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] @@ -7006,6 +7007,17 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; + CYGWIN_*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dll" + EXE_SUFFIX=".exe" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' @@ -8939,6 +8951,7 @@ fi case $system in AIX-*) ;; BSD/OS*) ;; + CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; @@ -9037,6 +9050,7 @@ fi + cat >>confdefs.h <<_ACEOF #define TCL_SHLIB_EXT "${SHLIB_SUFFIX}" _ACEOF @@ -19512,6 +19526,7 @@ s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@EXE_SUFFIX@,$EXE_SUFFIX,;t t s,@MAKE_LIB@,$MAKE_LIB,;t t s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t s,@INSTALL_LIB@,$INSTALL_LIB,;t t diff --git a/unix/dltest/.cvsignore b/unix/dltest/.cvsignore index 77ae092..5325f6e 100644 --- a/unix/dltest/.cvsignore +++ b/unix/dltest/.cvsignore @@ -1,3 +1,4 @@ Makefile *.bundle *.dylib +*.dll diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6c23ace..0920e9b 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1090,6 +1090,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # Step 3: set configuration options based on system name and version. do64bit_ok=no + EXE_SUFFIX="" LDFLAGS_ORIG="$LDFLAGS" # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] @@ -1246,6 +1247,17 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; + CYGWIN_*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dll" + EXE_SUFFIX=".exe" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' @@ -2046,6 +2058,7 @@ dnl # preprocessing tests use only CPPFLAGS. case $system in AIX-*) ;; BSD/OS*) ;; + CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; @@ -2117,6 +2130,7 @@ dnl # preprocessing tests use only CPPFLAGS. AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) + AC_SUBST(EXE_SUFFIX) AC_DEFINE_UNQUOTED(TCL_SHLIB_EXT,"${SHLIB_SUFFIX}", [What is the default extension for shared libraries?]) diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 742ff05..4f94e76 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.38 2009/11/23 20:17:36 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.39 2009/12/21 23:25:41 nijtmans Exp $ */ #undef STATIC_BUILD @@ -19,7 +19,6 @@ #include "tclInt.h" #include #include -#include /* * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the Dde_Init @@ -634,7 +633,7 @@ DdeServerProc( for (riPtr = tsdPtr->interpListPtr; riPtr != NULL; riPtr = riPtr->nextPtr) { - if (stricmp(utilString, riPtr->name) == 0) { + if (strcasecmp(utilString, riPtr->name) == 0) { Tcl_DStringFree(&dString); return (HDDEDATA) TRUE; } @@ -658,7 +657,7 @@ DdeServerProc( CP_WINANSI); for (riPtr = tsdPtr->interpListPtr; riPtr != NULL; riPtr = riPtr->nextPtr) { - if (stricmp(riPtr->name, utilString) == 0) { + if (strcasecmp(riPtr->name, utilString) == 0) { convPtr = (Conversation *) ckalloc(sizeof(Conversation)); convPtr->nextPtr = tsdPtr->currentConversations; convPtr->returnPackagePtr = NULL; @@ -723,7 +722,7 @@ DdeServerProc( utilString = Tcl_DStringValue(&dString); DdeQueryString(ddeInstance, ddeItem, utilString, (DWORD) len + 1, CP_WINANSI); - if (stricmp(utilString, TCL_DDE_EXECUTE_RESULT) == 0) { + if (strcasecmp(utilString, TCL_DDE_EXECUTE_RESULT) == 0) { returnString = Tcl_GetStringFromObj(convPtr->returnPackagePtr, &len); ddeReturn = DdeCreateDataHandle(ddeInstance, (LPBYTE)returnString, @@ -1504,7 +1503,7 @@ DdeObjCmd( for (riPtr = tsdPtr->interpListPtr; riPtr != NULL; riPtr = riPtr->nextPtr) { - if (stricmp(serviceName, riPtr->name) == 0) { + if (strcasecmp(serviceName, riPtr->name) == 0) { break; } } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 23fea2b..c9d6e28 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.100 2009/12/16 23:26:02 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.101 2009/12/21 23:25:40 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -1264,8 +1264,8 @@ WinIsReserved( } } - } else if (!stricmp(path, "prn") || !stricmp(path, "nul") - || !stricmp(path, "aux")) { + } else if (!strcasecmp(path, "prn") || !strcasecmp(path, "nul") + || !strcasecmp(path, "aux")) { /* * Have match for 'prn', 'nul' or 'aux'. */ @@ -1787,9 +1787,9 @@ NativeIsExec( * Use wide-char case-insensitive comparison */ - if ((_wcsicmp(path+len-3, L"exe") == 0) - || (_wcsicmp(path+len-3, L"com") == 0) - || (_wcsicmp(path+len-3, L"bat") == 0)) { + if ((wcscasecmp(path+len-3, L"exe") == 0) + || (wcscasecmp(path+len-3, L"com") == 0) + || (wcscasecmp(path+len-3, L"bat") == 0)) { return 1; } } else { @@ -1808,9 +1808,9 @@ NativeIsExec( * executable, whereas access did not. */ - if ((stricmp(p, "exe") == 0) - || (stricmp(p, "com") == 0) - || (stricmp(p, "bat") == 0)) { + if ((strcasecmp(p, "exe") == 0) + || (strcasecmp(p, "com") == 0) + || (strcasecmp(p, "bat") == 0)) { /* * File that ends with .exe, .com, or .bat is executable. */ diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index b1dd26f..1306e1c 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.70 2009/02/03 23:10:58 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.71 2009/12/21 23:25:41 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1423,7 +1423,7 @@ ApplicationType( Tcl_DStringFree(&ds); ext = strrchr(fullName, '.'); - if ((ext != NULL) && (stricmp(ext, ".bat") == 0)) { + if ((ext != NULL) && (strcasecmp(ext, ".bat") == 0)) { applType = APPL_DOS; break; } @@ -1447,7 +1447,7 @@ ApplicationType( */ CloseHandle(hFile); - if ((ext != NULL) && (stricmp(ext, ".com") == 0)) { + if ((ext != NULL) && (strcasecmp(ext, ".com") == 0)) { applType = APPL_DOS; break; } diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 93eca70..01e5432 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.51 2009/07/22 19:54:49 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.52 2009/12/21 23:25:41 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -48,8 +48,11 @@ * These string functions are not defined with the same names on Windows. */ +#ifndef __CYGWIN__ +#define wcscasecmp _wcsicmp #define strcasecmp stricmp #define strncasecmp strnicmp +#endif /* * Need to block out these includes for building extensions with MetroWerks diff --git a/win/tclWinSock.c b/win/tclWinSock.c index b03bf48..c843260 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.66 2009/01/27 00:02:08 ferrieux Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.67 2009/12/21 23:25:41 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1821,7 +1821,7 @@ TcpSetOptionProc( sock = infoPtr->socket; #ifdef TCL_FEATURE_KEEPALIVE_NAGLE - if (!stricmp(optionName, "-keepalive")) { + if (!strcasecmp(optionName, "-keepalive")) { BOOL val = FALSE; int boolVar, rtn; @@ -1842,7 +1842,7 @@ TcpSetOptionProc( return TCL_ERROR; } return TCL_OK; - } else if (!stricmp(optionName, "-nagle")) { + } else if (!strcasecmp(optionName, "-nagle")) { BOOL val = FALSE; int boolVar, rtn; -- cgit v0.12 From b67c18e73290a59c388687dd6df4015f135ba2c4 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 22 Dec 2009 19:49:29 +0000 Subject: [Bug 2918962]: Stop crash when -index and -stride are used together in [lsort]. --- ChangeLog | 51 +++++++++++++++++++++++++++++---------------------- generic/tclCmdIL.c | 26 +++++++++++++++----------- tests/cmdIL.test | 8 +++++++- 3 files changed, 51 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7817c07..c047d4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,30 +1,37 @@ +2009-12-22 Donal K. Fellows + + * generic/tclCmdIL.c (Tcl_LsortObjCmd): [Bug 2918962]: Stop crash when + -index and -stride are used together. + 2009-12-21 Jan Nijtmans - * generic/tclThreadStorage.c: Fix gcc warning, using gcc-4.3.4 on cygwin - warning: missing initializer - * generic/tclOOInt.h: prevent conflict with DUPLICATE - definition in WINAPI's nb30.h - * generic/rege_dfa.c: Fix macro conflict on CYGWIN: don't use "small". - * generic/tcl.h Include before on CYGWIN - * generic/tclPathObj.c - * generic/tclPort.h - * tests/env.test: Don't unset WINDIR and TERM, it has a special meaning - on CYGWIN (both in UNIX and WIN32 mode!) - * generic/tclPlatDecls.h: Include through tclPlatDecls.h - * win/tclWinPort.h stricmp -> strcasecmp - * win/tclWinDde.c _wcsicmp -> wcscasecmp - * win/tclWinFile.c - * win/tclWinPipe.c - * win/tclWinSock.c - * unix/tcl.m4 Add dynamic loading support to CYGWIN - * unix/configure (regenerated) - * unix/Makefile.in + * generic/tclThreadStorage.c: Fix gcc warning, using gcc-4.3.4 on + cygwin: missing initializer + * generic/tclOOInt.h: Prevent conflict with DUPLICATE + definition in WINAPI's nb30.h + * generic/rege_dfa.c: Fix macro conflict on CYGWIN: don't use + "small". + * generic/tcl.h Include before on + CYGWIN + * generic/tclPathObj.c + * generic/tclPort.h + * tests/env.test: Don't unset WINDIR and TERM, it has a + special meaning on CYGWIN (both in UNIX + and WIN32 mode!) + * generic/tclPlatDecls.h: Include through tclPlatDecls.h + * win/tclWinPort.h stricmp -> strcasecmp + * win/tclWinDde.c _wcsicmp -> wcscasecmp + * win/tclWinFile.c + * win/tclWinPipe.c + * win/tclWinSock.c + * unix/tcl.m4: Add dynamic loading support to CYGWIN + * unix/configure (regenerated) + * unix/Makefile.in 2009-12-19 Miguel Sofer - * generic/tclBasic.c: Fix for bad cmd resolution by coroutines - * tests/coroutine.test: [Bug #2917627]. Thanks to schelte for - finding it. + * generic/tclBasic.c: [Bug 2917627]: Fix for bad cmd resolution by + * tests/coroutine.test: coroutines. Thanks to schelte for finding it. 2009-12-16 Donal K. Fellows diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 9f9fdda..313c368 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.175 2009/12/07 20:49:28 msofer Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.176 2009/12/22 19:49:29 dkf Exp $ */ #include "tclInt.h" @@ -3526,7 +3526,7 @@ Tcl_LsortObjCmd( Tcl_Obj *const objv[]) /* Argument values. */ { int i, j, index, indices, length, nocase = 0, sortMode, indexc; - int group, groupSize, groupOffset, idx; + int group, groupSize, groupOffset, idx, allocatedIndexVector = 0; Tcl_Obj *resultPtr, *cmdPtr, **listObjPtrs, *listObj, *indexPtr; SortElement *elementArray, *elementPtr; SortInfo sortInfo; /* Information about this sort that needs to @@ -3640,6 +3640,9 @@ Tcl_LsortObjCmd( default: sortInfo.indexv = TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); + allocatedIndexVector = 1; /* Cannot use indexc field, as + * it might be decreased by 1 + * later. */ } /* @@ -3782,16 +3785,16 @@ Tcl_LsortObjCmd( sortInfo.indexc = 0; sortInfo.indexv = NULL; } else { - int *new_indexv; - sortInfo.indexc--; - new_indexv = - TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); + + /* + * Do not shrink the actual memory block used; that doesn't + * work with TclStackAlloc-allocated memory. [Bug 2918962] + */ + for (i = 0; i < sortInfo.indexc; i++) { - new_indexv[i] = sortInfo.indexv[i+1]; + sortInfo.indexv[i] = sortInfo.indexv[i+1]; } - TclStackFree(interp, sortInfo.indexv); - sortInfo.indexv = new_indexv; } } } @@ -3857,7 +3860,8 @@ Tcl_LsortObjCmd( } else if (sortInfo.sortMode == SORTMODE_REAL) { double a; - if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) { + if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr, + &a) != TCL_OK) { sortInfo.resultCode = TCL_ERROR; goto done1; } @@ -3957,7 +3961,7 @@ Tcl_LsortObjCmd( sortInfo.compareCmdPtr = NULL; } done2: - if (sortInfo.indexc > 1) { + if (allocatedIndexVector) { TclStackFree(interp, sortInfo.indexv); } return sortInfo.resultCode; diff --git a/tests/cmdIL.test b/tests/cmdIL.test index 17b0d9e..ca81ea5 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdIL.test,v 1.42 2008/09/29 13:33:17 dkf Exp $ +# RCS: @(#) $Id: cmdIL.test,v 1.43 2009/12/22 19:49:29 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -140,6 +140,12 @@ test cmdIL-1.34 {lsort -stride errors} -returnCodes error -body { test cmdIL-1.35 {lsort -stride errors} -returnCodes error -body { lsort -stride 2 -index 3 {a b c d} } -result {when used with "-stride", the leading "-index" value must be within the group} +test cmdIL-1.36 {lsort -stride and -index: Bug 2918962} { + lsort -stride 2 -index {0 1} { + {{c o d e} 54321} {{b l a h} 94729} + {{b i g} 12345} {{d e m o} 34512} + } +} {{{b i g} 12345} {{d e m o} 34512} {{c o d e} 54321} {{b l a h} 94729}} # Can't think of any good tests for the MergeSort and MergeLists procedures, # except a bunch of random lists to sort. -- cgit v0.12 From 3a53365f6bd955a33150ac9ca7097adc46f2acdc Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 23 Dec 2009 07:10:05 +0000 Subject: Cygwin: Install libtcl8.6.dll in bin directory --- ChangeLog | 6 ++++ unix/Makefile.in | 10 +++---- unix/configure | 17 ++++++++++-- unix/tcl.m4 | 83 ++++++++++++++++++++++++++++++-------------------------- 4 files changed, 71 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index c047d4f..6e1ef94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-23 Jan Nijtmans + + * unix/tcl.m4 Install libtcl8.6.dll in bin directory + * unix/Makefile.in + * unix/configure (regenerated) + 2009-12-22 Donal K. Fellows * generic/tclCmdIL.c (Tcl_LsortObjCmd): [Bug 2918962]: Stop crash when diff --git a/unix/Makefile.in b/unix/Makefile.in index 146da43..7406937 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.286 2009/12/21 23:25:40 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.287 2009/12/23 07:10:05 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -418,7 +418,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclNamesp.c \ $(GENERIC_DIR)/tclNotify.c \ $(GENERIC_DIR)/tclObj.c \ - $(GENERIC_DIR)/tclParse.c \ + $(GENERIC_DIR)/tclParse.c \ $(GENERIC_DIR)/tclPathObj.c \ $(GENERIC_DIR)/tclPipe.c \ $(GENERIC_DIR)/tclPkg.c \ @@ -761,15 +761,15 @@ install-binaries: binaries @if test ! -x $(UNIX_DIR)/install-sh; then \ chmod +x $(UNIX_DIR)/install-sh; \ fi - @echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/" + @echo "Installing $(LIB_FILE) to @DLL_INSTALL_DIR@/" @@INSTALL_LIB@ - @chmod 555 "$(LIB_INSTALL_DIR)"/$(LIB_FILE) + @chmod 555 "@DLL_INSTALL_DIR@"/$(LIB_FILE) @if test "$(TCL_BUILD_EXP_FILE)" != ""; then \ echo "Installing $(TCL_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \ $(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \ "$(LIB_INSTALL_DIR)"/$(TCL_EXP_FILE); \ fi - @echo "Installing tclsh as $(BIN_INSTALL_DIR)/tclsh$(VERSION)" + @echo "Installing ${TCL_EXE} as $(BIN_INSTALL_DIR)/tclsh$(VERSION)${EXE_SUFFIX}" @$(INSTALL_PROGRAM) ${TCL_EXE} "$(BIN_INSTALL_DIR)"/tclsh$(VERSION)${EXE_SUFFIX} @echo "Installing tclConfig.sh to $(CONFIG_INSTALL_DIR)/" @$(INSTALL_DATA) tclConfig.sh "$(CONFIG_INSTALL_DIR)"/tclConfig.sh diff --git a/unix/configure b/unix/configure index 65fcfee..2912a33 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX EXE_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX EXE_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' # Initialize some variables set by options. @@ -8971,12 +8971,23 @@ fi UNSHARED_LIB_SUFFIX='${VERSION}.a' fi + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + if test "${SHLIB_SUFFIX}" = ".dll"; then + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + +else + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + +fi + else @@ -9064,6 +9075,7 @@ _ACEOF + echo "$as_me:$LINENO: checking for build with symbols" >&5 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 # Check whether --enable-symbols or --disable-symbols was given. @@ -19530,6 +19542,7 @@ s,@EXE_SUFFIX@,$EXE_SUFFIX,;t t s,@MAKE_LIB@,$MAKE_LIB,;t t s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 0920e9b..8bb395e 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -265,7 +265,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ # Load the tclConfig.sh file # # Arguments: -# +# # Requires the following vars to be set: # TCL_BIN_DIR # @@ -351,7 +351,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ # Load the tkConfig.sh file # # Arguments: -# +# # Requires the following vars to be set: # TK_BIN_DIR # @@ -506,7 +506,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -551,7 +551,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -599,7 +599,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -705,13 +705,13 @@ AC_DEFUN([SC_ENABLE_THREADS], [ # # Arguments: # none -# +# # Requires the following vars to be set in the Makefile: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE -# +# # Results: # # Adds the following arguments to configure: @@ -779,7 +779,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -809,14 +809,14 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [ if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) fi - else + else AC_MSG_RESULT([$langinfo_ok]) fi ]) #-------------------------------------------------------------------- # SC_CONFIG_MANPAGES -# +# # Decide whether to use symlinks for linking the manpages, # whether to compress the manpages after installation, and # whether to add a package name suffix to the installed @@ -990,7 +990,7 @@ AC_DEFUN([SC_CONFIG_SYSTEM], [ # TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS # TK_SHLIB_LD_EXTRAS for the build of Tcl and Tk, but not recorded in the # tclConfig.sh, since they are only used for the build -# of Tcl and Tk. +# of Tcl and Tk. # Examples: MacOS X records the library version and # compatibility version in the shared library. But # of course the Tcl version of this is only used for Tcl. @@ -1419,7 +1419,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE="-O2" - # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings + # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" @@ -1684,8 +1684,8 @@ dnl AC_CHECK_TOOL(AR, ar) eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done]) LIBS="$LIBS -framework CoreFoundation" - AC_TRY_LINK([#include ], - [CFBundleRef b = CFBundleGetMainBundle();], + AC_TRY_LINK([#include ], + [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no) AS_IF([test "$fat_32_64" = yes], [ @@ -1695,7 +1695,7 @@ dnl AC_CHECK_TOOL(AR, ar) LIBS=$hold_libs]) AS_IF([test $tcl_cv_lib_corefoundation = yes], [ LIBS="$LIBS -framework CoreFoundation" - AC_DEFINE(HAVE_COREFOUNDATION, 1, + AC_DEFINE(HAVE_COREFOUNDATION, 1, [Do we have access to Darwin CoreFoundation.framework?]) ], [tcl_corefoundation=no]) AS_IF([test "$fat_32_64" = yes -a $tcl_corefoundation = yes],[ @@ -1704,8 +1704,8 @@ dnl AC_CHECK_TOOL(AR, ar) for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done - AC_TRY_LINK([#include ], - [CFBundleRef b = CFBundleGetMainBundle();], + AC_TRY_LINK([#include ], + [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no) for v in CFLAGS CPPFLAGS LDFLAGS; do @@ -1733,7 +1733,7 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h [Should OS/390 do the right thing with sockets?]) - ;; + ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" @@ -2070,11 +2070,17 @@ dnl # preprocessing tests use only CPPFLAGS. SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}']) AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ UNSHARED_LIB_SUFFIX='${VERSION}.a']) + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [ LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + ], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + ]) ], [ LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} @@ -2137,6 +2143,7 @@ dnl # preprocessing tests use only CPPFLAGS. AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(INSTALL_LIB) + AC_SUBST(DLL_INSTALL_DIR) AC_SUBST(INSTALL_STUB_LIB) AC_SUBST(RANLIB) ]) @@ -2152,7 +2159,7 @@ dnl # preprocessing tests use only CPPFLAGS. # # Arguments: # none -# +# # Results: # # Defines only one of the following vars: @@ -2271,7 +2278,7 @@ int main() { # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2357,7 +2364,7 @@ closedir(d); # # Arguments: # none -# +# # Results: # # Sets the the following vars: @@ -2435,13 +2442,13 @@ AC_DEFUN([SC_PATH_X], [ # SC_BLOCKING_STYLE # # The statements below check for systems where POSIX-style -# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. +# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2485,7 +2492,7 @@ AC_DEFUN([SC_BLOCKING_STYLE], [ # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2556,7 +2563,7 @@ AC_DEFUN([SC_TIME_HANDLER], [ # # Arguments: # none -# +# # Results: # # Might defines some of the following vars: @@ -2606,7 +2613,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ # # Arguments: # None. -# +# # Results: # # Might append to the following vars: @@ -2679,7 +2686,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2725,7 +2732,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2747,8 +2754,8 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... - AC_TRY_COMPILE(,[switch (0) { - case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; + AC_TRY_COMPILE(,[switch (0) { + case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) @@ -2867,7 +2874,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2934,7 +2941,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3010,7 +3017,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [ # # Arguments: # None -# +# # Results: # Might define the following vars: # HAVE_GETADDRINFO @@ -3042,7 +3049,7 @@ AC_DEFUN([SC_TCL_GETADDRINFO], [AC_CHECK_FUNC(getaddrinfo, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3102,7 +3109,7 @@ AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3162,7 +3169,7 @@ AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3222,7 +3229,7 @@ AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: -- cgit v0.12 From d267c20fe43b1a00bb1e392f86443133855c2afe Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 23 Dec 2009 11:17:33 +0000 Subject: [Bug 2913625]: Stop information about paths from leaking through [info script] and [info nameofexecutable]. --- ChangeLog | 12 ++++++++--- library/safe.tcl | 63 +++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 55 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e1ef94..106f6e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,14 @@ +2009-12-23 Donal K. Fellows + + * library/safe.tcl (AliasSource, AliasExeName): [Bug 2913625]: Stop + information about paths from leaking through [info script] and [info + nameofexecutable]. + 2009-12-23 Jan Nijtmans - * unix/tcl.m4 Install libtcl8.6.dll in bin directory - * unix/Makefile.in - * unix/configure (regenerated) + * unix/tcl.m4: Install libtcl8.6.dll in bin directory + * unix/Makefile.in: + * unix/configure: (regenerated) 2009-12-22 Donal K. Fellows diff --git a/library/safe.tcl b/library/safe.tcl index 6d896ea..eaae00d 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.35 2009/12/16 23:44:15 dkf Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.36 2009/12/23 11:17:33 dkf Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -462,6 +462,14 @@ proc ::safe::InterpInit { AliasSubset $slave file \ file dir.* join root.* ext.* tail path.* split + # Subcommands of info + foreach {subcommand alias} { + nameofexecutable AliasExeName + } { + ::interp alias $slave ::tcl::info::$subcommand \ + {} [namespace current]::$alias $slave + } + # The allowed slave variables already have been set by Tcl_MakeSafe(3) # Source init.tcl and tm.tcl into the slave, to get auto_load and @@ -789,8 +797,12 @@ proc ::safe::AliasSource {slave args} { # filename", but "source -encoding E filename" as well. if {[lindex $args 0] eq "-encoding"} { incr argc -2 - set encoding [lrange $args 0 1] + set encoding [lindex $args 1] set at 2 + if {$encoding eq "identity"} { + Log $slave "attempt to use the identity encoding" + return -code error "permission denied" + } } else { set at 0 set encoding {} @@ -801,39 +813,51 @@ proc ::safe::AliasSource {slave args} { return -code error $msg } set file [lindex $args $at] - + # get the real path from the virtual one. - try { - set file [TranslatePath $slave $file] - } on error msg { + if {[catch { + set realfile [TranslatePath $slave $file] + } msg]} { Log $slave $msg return -code error "permission denied" } - + # check that the path is in the access path of that slave - try { - FileInAccessPath $slave $file - } on error msg { + if {[catch { + FileInAccessPath $slave $realfile + } msg]} { Log $slave $msg return -code error "permission denied" } # do the checks on the filename : - try { - CheckFileName $slave $file - } on error msg { - Log $slave "$file:$msg" + if {[catch { + CheckFileName $slave $realfile + } msg]} { + Log $slave "$realfile:$msg" return -code error $msg } - # passed all the tests , lets source it: + # Passed all the tests, lets source it. Note that we do this all manually + # because we want to control [info script] in the slave so information + # doesn't leak so much. [Bug 2913625] + set old [::interp eval $slave {info script}] if {[catch { - # We use catch here because we want to catch non-error/ok too - ::interp invokehidden $slave source {*}$encoding $file + set f [open $realfile] + fconfigure $f -eofchar \032 + if {$encoding ne ""} { + fconfigure $f -encoding $encoding + } + set contents [read $f] + close $f + ::interp eval $slave [list info script $file] + ::interp eval $slave $contents } msg]} { + catch {interp eval $slave [list info script $old]} Log $slave $msg return -code error "script error" } + catch {interp eval $slave [list info script $old]} return $msg } @@ -1004,6 +1028,11 @@ proc ::safe::AliasEncoding {slave option args} { return -code error -errorcode $code $msg } +# Various minor hiding of platform features. [Bug 2913625] + +proc ::safe::AliasExeName {slave} { + return "" +} proc ::safe::Setup {} { #### -- cgit v0.12 From 53b2383376d8df00a050e489eb8474408de69c12 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 23 Dec 2009 20:12:39 +0000 Subject: Fix up a few stray spaces. --- generic/tcl.h | 63 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index fb4cbdc..75975bf 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -1,4 +1,3 @@ - /* * tcl.h -- * @@ -14,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.294 2009/12/21 23:25:39 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.295 2009/12/23 20:12:39 dkf Exp $ */ #ifndef _TCL @@ -480,8 +479,8 @@ typedef struct Tcl_Interp { * Tcl_Eval must free it before executing next * command. */ #else - char* unused3; - void (*unused4) (char*); + char *unused3; + void (*unused4) (char *); #endif #ifdef USE_INTERP_ERRORLINE int errorLine; /* When TCL_ERROR is returned, this gives the @@ -632,13 +631,13 @@ typedef struct stat *Tcl_OldStat_; * interpreter's result is meaningless. */ -#define TCL_OK 0 -#define TCL_ERROR 1 -#define TCL_RETURN 2 -#define TCL_BREAK 3 -#define TCL_CONTINUE 4 +#define TCL_OK 0 +#define TCL_ERROR 1 +#define TCL_RETURN 2 +#define TCL_BREAK 3 +#define TCL_CONTINUE 4 -#define TCL_RESULT_SIZE 200 +#define TCL_RESULT_SIZE 200 /* * Flags to control what substitutions are performed by Tcl_SubstObj(): @@ -813,9 +812,9 @@ typedef struct Tcl_Obj { * to compute or has side effects. */ -void Tcl_IncrRefCount (Tcl_Obj *objPtr); -void Tcl_DecrRefCount (Tcl_Obj *objPtr); -int Tcl_IsShared (Tcl_Obj *objPtr); +void Tcl_IncrRefCount(Tcl_Obj *objPtr); +void Tcl_DecrRefCount(Tcl_Obj *objPtr); +int Tcl_IsShared(Tcl_Obj *objPtr); /* * The following structure contains the state needed by Tcl_SaveResult. No-one @@ -960,8 +959,8 @@ typedef struct Tcl_DString { * buffer space required by Tcl_PrintDouble. */ -#define TCL_MAX_PREC 17 -#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10) +#define TCL_MAX_PREC 17 +#define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10) /* * Definition for a number of bytes of buffer space sufficient to hold the @@ -1025,9 +1024,9 @@ typedef struct Tcl_DString { * page for details): */ -#define TCL_VOLATILE ((Tcl_FreeProc *) 1) -#define TCL_STATIC ((Tcl_FreeProc *) 0) -#define TCL_DYNAMIC ((Tcl_FreeProc *) 3) +#define TCL_VOLATILE ((Tcl_FreeProc *) 1) +#define TCL_STATIC ((Tcl_FreeProc *) 0) +#define TCL_DYNAMIC ((Tcl_FreeProc *) 3) /* * Flag values passed to variable-related functions. @@ -1377,9 +1376,9 @@ typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData); * indicate what sorts of events are of interest: */ -#define TCL_READABLE (1<<1) -#define TCL_WRITABLE (1<<2) -#define TCL_EXCEPTION (1<<3) +#define TCL_READABLE (1<<1) +#define TCL_WRITABLE (1<<2) +#define TCL_EXCEPTION (1<<3) /* * Flag values to pass to Tcl_OpenCommandChannel to indicate the disposition @@ -1397,15 +1396,15 @@ typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData); * should be closed. */ -#define TCL_CLOSE_READ (1<<1) -#define TCL_CLOSE_WRITE (1<<2) +#define TCL_CLOSE_READ (1<<1) +#define TCL_CLOSE_WRITE (1<<2) /* * Value to use as the closeProc for a channel that supports the close2Proc * interface. */ -#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *)1) +#define TCL_CLOSE2PROC ((Tcl_DriverCloseProc *) 1) /* * Channel version tag. This was introduced in 8.3.2/8.4. @@ -2306,7 +2305,7 @@ typedef int (*Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, * value since the stubs tables don't match. */ -#define TCL_STUB_MAGIC ((int)0xFCA3BACF) +#define TCL_STUB_MAGIC ((int) 0xFCA3BACF) /* * The following function is required to be defined in all stubs aware @@ -2341,12 +2340,12 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171] */ -EXTERN void Tcl_Main (int argc, char **argv, - Tcl_AppInitProc *appInitProc); -EXTERN const char * Tcl_PkgInitStubsCheck (Tcl_Interp *interp, - const char *version, int exact); +EXTERN void Tcl_Main(int argc, char **argv, + Tcl_AppInitProc *appInitProc); +EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, + const char *version, int exact); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) -EXTERN void Tcl_GetMemoryInfo (Tcl_DString *dsPtr); +EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); #endif @@ -2355,7 +2354,7 @@ EXTERN void Tcl_GetMemoryInfo (Tcl_DString *dsPtr); */ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, - int result); + int result); /* * Include the public function declarations that are accessible via the stubs @@ -2546,7 +2545,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS -EXTERN int Tcl_AppInit (Tcl_Interp *interp); +EXTERN int Tcl_AppInit(Tcl_Interp *interp); #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT -- cgit v0.12 From 350075b8e7a272ae98795eafe0ec94b44a473e63 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 24 Dec 2009 06:55:25 +0000 Subject: Move declarations to the top of the file, add boilerplate comments to some functions --- generic/tclBasic.c | 393 +++++++++++++++++++++++++++-------------------------- 1 file changed, 203 insertions(+), 190 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index aecdfa0..43f484b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.436 2009/12/19 14:22:00 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.437 2009/12/24 06:55:25 dkf Exp $ */ #include "tclInt.h" @@ -57,69 +57,96 @@ typedef struct OldMathFuncData { } OldMathFuncData; /* - * Static functions in this file: + * This is the script cancellation struct and hash table. The hash table is + * used to keep track of the information necessary to process script + * cancellation requests, including the original interp, asynchronous handler + * tokens (created by Tcl_AsyncCreate), and the clientData and flags arguments + * passed to Tcl_CancelEval on a per-interp basis. The cancelLock mutex is + * used for protecting calls to Tcl_CancelEval as well as protecting access to + * the hash table below. */ -static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr, - const char *oldName, const char *newName, int flags); -static int CancelEvalProc(ClientData clientData, - Tcl_Interp *interp, int code); -static int CheckDoubleResult(Tcl_Interp *interp, double dResult); -static void DeleteInterpProc(Tcl_Interp *interp); -static void DeleteOpCmdClientData(ClientData clientData); -static Tcl_Obj *GetCommandSource(Interp *iPtr, int objc, - Tcl_Obj *const objv[], int lookup); -static void ProcessUnexpectedResult(Tcl_Interp *interp, int returnCode); -static int OldMathFuncProc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static void OldMathFuncDeleteProc(ClientData clientData); -static int ExprAbsFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprBinaryFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprBoolFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprCeilFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprDoubleFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprEntierFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprFloorFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprIntFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprIsqrtFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprRandFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprRoundFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprSqrtFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprSrandFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprUnaryFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static int ExprWideFunc(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const *objv); -static void MathFuncWrongNumArgs(Tcl_Interp *interp, int expected, - int actual, Tcl_Obj *const *objv); -#ifdef USE_DTRACE -static int DTraceObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int DTraceCmdReturn(ClientData data[], Tcl_Interp *interp, - int result); -#else -#define DTraceCmdReturn NULL -#endif +typedef struct { + Tcl_Interp *interp; /* Interp this struct belongs to. */ + Tcl_AsyncHandler async; /* Async handler token for script + * cancellation. */ + char *result; /* The script cancellation result or NULL for + * a default result. */ + int length; /* Length of the above error message. */ + ClientData clientData; /* Ignored */ + int flags; /* Additional flags */ +} CancelInfo; +static Tcl_HashTable cancelTable; +static int cancelTableInitialized = 0; /* 0 means not yet initialized. */ +TCL_DECLARE_MUTEX(cancelLock) + +/* + * Declarations for managing contexts for non-recursive coroutines. Contexts + * are used to save the evaluation state between NR calls to each coro. + */ -MODULE_SCOPE const TclStubs * const tclConstStubsPtr; +static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; +#define SAVE_CONTEXT(context) \ + (context).framePtr = iPtr->framePtr; \ + (context).varFramePtr = iPtr->varFramePtr; \ + (context).cmdFramePtr = iPtr->cmdFramePtr; \ + (context).lineLABCPtr = iPtr->lineLABCPtr + +#define RESTORE_CONTEXT(context) \ + iPtr->framePtr = (context).framePtr; \ + iPtr->varFramePtr = (context).varFramePtr; \ + iPtr->cmdFramePtr = (context).cmdFramePtr; \ + iPtr->lineLABCPtr = (context).lineLABCPtr + /* - * Tcl_EvalObjv helpers + * Static functions in this file: */ +static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr, + const char *oldName, const char *newName, + int flags); +static int CancelEvalProc(ClientData clientData, + Tcl_Interp *interp, int code); +static int CheckDoubleResult(Tcl_Interp *interp, double dResult); +static void DeleteCoroutine(ClientData clientData); +static void DeleteInterpProc(Tcl_Interp *interp); +static void DeleteOpCmdClientData(ClientData clientData); +#ifdef USE_DTRACE +static Tcl_ObjCmdProc DTraceObjCmd; +static Tcl_NRPostProc DTraceCmdReturn; +#else +# define DTraceCmdReturn NULL +#endif /* USE_DTRACE */ +static Tcl_ObjCmdProc ExprAbsFunc; +static Tcl_ObjCmdProc ExprBinaryFunc; +static Tcl_ObjCmdProc ExprBoolFunc; +static Tcl_ObjCmdProc ExprCeilFunc; +static Tcl_ObjCmdProc ExprDoubleFunc; +static Tcl_ObjCmdProc ExprEntierFunc; +static Tcl_ObjCmdProc ExprFloorFunc; +static Tcl_ObjCmdProc ExprIntFunc; +static Tcl_ObjCmdProc ExprIsqrtFunc; +static Tcl_ObjCmdProc ExprRandFunc; +static Tcl_ObjCmdProc ExprRoundFunc; +static Tcl_ObjCmdProc ExprSqrtFunc; +static Tcl_ObjCmdProc ExprSrandFunc; +static Tcl_ObjCmdProc ExprUnaryFunc; +static Tcl_ObjCmdProc ExprWideFunc; +static Tcl_Obj * GetCommandSource(Interp *iPtr, int objc, + Tcl_Obj *const objv[], int lookup); +static void MathFuncWrongNumArgs(Tcl_Interp *interp, int expected, + int actual, Tcl_Obj *const *objv); +static Tcl_ObjCmdProc NRInterpCoroutine; +static Tcl_NRPostProc NRCoroutineCallerCallback; +static Tcl_NRPostProc NRCoroutineExitCallback; +static Tcl_NRPostProc NRRunObjProc; +static Tcl_NRPostProc NRTailcallEval; +static Tcl_ObjCmdProc OldMathFuncProc; +static void OldMathFuncDeleteProc(ClientData clientData); +static void ProcessUnexpectedResult(Tcl_Interp *interp, + int returnCode); +static int RewindCoroutine(CoroutineData *corPtr, int result); static void TEOV_SwitchVarFrame(Tcl_Interp *interp); static void TEOV_PushExceptionHandlers(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); @@ -130,22 +157,19 @@ static int TEOV_NotFound(Tcl_Interp *interp, int objc, static int TEOV_RunEnterTraces(Tcl_Interp *interp, Command **cmdPtrPtr, int objc, Tcl_Obj *const objv[], Namespace *lookupNsPtr); -static Tcl_NRPostProc TEOV_RestoreVarFrame; -static Tcl_NRPostProc TEOV_RunLeaveTraces; -static Tcl_NRPostProc TEOV_Exception; +static Tcl_NRPostProc RewindCoroutineCallback; +static Tcl_NRPostProc TailcallCleanup; +static Tcl_NRPostProc TEOEx_ByteCodeCallback; +static Tcl_NRPostProc TEOEx_ListCallback; static Tcl_NRPostProc TEOV_Error; +static Tcl_NRPostProc TEOV_Exception; static Tcl_NRPostProc TEOV_NotFoundCallback; +static Tcl_NRPostProc TEOV_RestoreVarFrame; +static Tcl_NRPostProc TEOV_RunLeaveTraces; +static Tcl_NRPostProc YieldToCallback; -static Tcl_NRPostProc TEOEx_ListCallback; -static Tcl_NRPostProc TEOEx_ByteCodeCallback; - -static Tcl_NRPostProc NRRunObjProc; - -static Tcl_NRPostProc TailcallCleanup; -static Tcl_NRPostProc NRTailcallEval; -static Tcl_NRPostProc RewindCoroutineCallback; -static Tcl_NRPostProc YieldToCallback; - +MODULE_SCOPE const TclStubs *const tclConstStubsPtr; + /* * The following structure define the commands in the Tcl core. */ @@ -215,7 +239,7 @@ static const CmdInfo builtInCmds[] = { {"split", Tcl_SplitObjCmd, NULL, NULL, 1}, {"subst", Tcl_SubstObjCmd, TclCompileSubstCmd, TclNRSubstObjCmd, 1}, {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, TclNRSwitchObjCmd, 1}, - {"tailcall", NULL, NULL, TclNRTailcallObjCmd, 1}, + {"tailcall", NULL, NULL, TclNRTailcallObjCmd, 1}, {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, {"try", Tcl_TryObjCmd, NULL, TclNRTryObjCmd, 1}, @@ -372,30 +396,6 @@ static const OpCmdInfo mathOpCmds[] = { }; /* - * This is the script cancellation struct and hash table. The hash table is - * used to keep track of the information necessary to process script - * cancellation requests, including the original interp, asynchronous handler - * tokens (created by Tcl_AsyncCreate), and the clientData and flags arguments - * passed to Tcl_CancelEval on a per-interp basis. The cancelLock mutex is - * used for protecting calls to Tcl_CancelEval as well as protecting access to - * the hash table below. - */ - -typedef struct { - Tcl_Interp *interp; /* Interp this struct belongs to. */ - Tcl_AsyncHandler async; /* Async handler token for script - * cancellation. */ - char *result; /* The script cancellation result or NULL for - * a default result. */ - int length; /* Length of the above error message. */ - ClientData clientData; /* Ignored */ - int flags; /* Additional flags */ -} CancelInfo; -static Tcl_HashTable cancelTable; -static int cancelTableInitialized = 0; /* 0 means not yet initialized. */ -TCL_DECLARE_MUTEX(cancelLock) - -/* *---------------------------------------------------------------------- * * TclFinalizeEvaluation -- @@ -555,7 +555,7 @@ Tcl_CreateInterp(void) } iPtr->cmdCount = 0; - TclInitLiteralTable(&(iPtr->literalTable)); + TclInitLiteralTable(&iPtr->literalTable); iPtr->compileEpoch = 0; iPtr->compiledProcPtr = NULL; iPtr->resolverPtr = NULL; @@ -648,7 +648,7 @@ Tcl_CreateInterp(void) */ #ifdef TCL_COMPILE_STATS - statsPtr = &(iPtr->stats); + statsPtr = &iPtr->stats; statsPtr->numExecutions = 0; statsPtr->numCompilations = 0; statsPtr->numByteCodesFreed = 0; @@ -720,7 +720,7 @@ Tcl_CreateInterp(void) * Tcl_CmdProc, set the Tcl_CmdProc to TclInvokeObjectCommand. */ - for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) { + for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) { if ((cmdInfoPtr->objProc == NULL) && (cmdInfoPtr->compileProc == NULL) && (cmdInfoPtr->nreProc == NULL)) { @@ -1386,7 +1386,7 @@ DeleteInterpProc( * table, as it will be freed later in this function without further use. */ - TclCleanupLiteralTable(interp, &(iPtr->literalTable)); + TclCleanupLiteralTable(interp, &iPtr->literalTable); TclHandleFree(iPtr->handle); TclTeardownNamespace(iPtr->globalNsPtr); @@ -1399,7 +1399,7 @@ DeleteInterpProc( /* * Non-pernicious deletion. The deletion callbacks will not be allowed * to create any new hidden or non-hidden commands. - * Tcl_DeleteCommandFromToken() will remove the entry from the + * Tcl_DeleteCommandFromToken will remove the entry from the * hiddenCmdTablePtr. */ @@ -1497,7 +1497,7 @@ DeleteInterpProc( * interpreter. */ - TclDeleteLiteralTable(interp, &(iPtr->literalTable)); + TclDeleteLiteralTable(interp, &iPtr->literalTable); /* * TIP #280 - Release the arrays for ByteCode/Proc extension, and @@ -1831,13 +1831,13 @@ Tcl_ExposeCommand( /* * Check that we have a true global namespace command (enforced by - * Tcl_HideCommand() but let's double check. (If it was not, we would not + * Tcl_HideCommand but let's double check. (If it was not, we would not * really know how to handle it). */ if (cmdPtr->nsPtr != iPtr->globalNsPtr) { /* - * This case is theoritically impossible, we might rather Tcl_Panic() + * This case is theoritically impossible, we might rather Tcl_Panic * than 'nicely' erroring out ? */ @@ -2450,7 +2450,7 @@ TclRenameCommand( /* * Warning: any changes done in the code here are likely to be needed in - * Tcl_HideCommand() code too (until the common parts are extracted out). + * Tcl_HideCommand code too (until the common parts are extracted out). * - dl */ @@ -2972,7 +2972,7 @@ Tcl_DeleteCommandFromToken( * If you are getting a crash during the call to deleteProc and * cmdPtr->deleteProc is a pointer to the function free(), the most * likely cause is that your extension allocated memory for the - * clientData argument to Tcl_CreateObjCommand() with the ckalloc() + * clientData argument to Tcl_CreateObjCommand with the ckalloc() * macro and you are now trying to deallocate this memory with free() * instead of ckfree(). You should pass a pointer to your own method * that calls ckfree(). @@ -3007,10 +3007,10 @@ Tcl_DeleteCommandFromToken( } /* - * A number of tests for particular kinds of commands are done by - * checking whether the objProc field holds a known value. Set the - * field to NULL so that such tests won't have false positives when - * applied to deleted commands. + * A number of tests for particular kinds of commands are done by checking + * whether the objProc field holds a known value. Set the field to NULL so + * that such tests won't have false positives when applied to deleted + * commands. */ cmdPtr->objProc = NULL; @@ -3028,6 +3028,23 @@ Tcl_DeleteCommandFromToken( return 0; } +/* + *---------------------------------------------------------------------- + * + * CallCommandTraces -- + * + * Abstraction of the code to call traces on a command. + * + * Results: + * Currently always NULL. + * + * Side effects: + * Anything; this may recursively evaluate scripts and code exists to do + * just that. + * + *---------------------------------------------------------------------- + */ + static char * CallCommandTraces( Interp *iPtr, /* Interpreter containing command. */ @@ -3129,6 +3146,26 @@ CallCommandTraces( Tcl_Release(iPtr); return result; } + +/* + *---------------------------------------------------------------------- + * + * CancelEvalProc -- + * + * Marks this interpreter as being canceled. This causes current + * executions to be unwound as the interpreter enters a state where it + * refuses to execute more commands or handle [catch] or [try], yet the + * interpreter is still able to execute further commands after the + * cancelation is cleared (unlike if it is deleted). + * + * Results: + * The value given for the code argument. + * + * Side effects: + * Transfers a message from the cancelation message to the interpreter. + * + *---------------------------------------------------------------------- + */ static int CancelEvalProc( @@ -3380,7 +3417,7 @@ OldMathFuncProc( args = (Tcl_Value *) ckalloc(dataPtr->numArgs * sizeof(Tcl_Value)); for (j = 1, k = 0; j < objc; ++j, ++k) { - /* TODO: Convert to TclGetNumberFromObj() ? */ + /* TODO: Convert to TclGetNumberFromObj? */ valuePtr = objv[j]; result = Tcl_GetDoubleFromObj(NULL, valuePtr, &d); #ifdef ACCEPT_NAN @@ -3412,12 +3449,12 @@ OldMathFuncProc( args[k].type = dataPtr->argTypes[k]; switch (args[k].type) { case TCL_EITHER: - if (Tcl_GetLongFromObj(NULL, valuePtr, &(args[k].intValue)) + if (Tcl_GetLongFromObj(NULL, valuePtr, &args[k].intValue) == TCL_OK) { args[k].type = TCL_INT; break; } - if (Tcl_GetWideIntFromObj(interp, valuePtr, &(args[k].wideValue)) + if (Tcl_GetWideIntFromObj(interp, valuePtr, &args[k].wideValue) == TCL_OK) { args[k].type = TCL_WIDE_INT; break; @@ -3429,21 +3466,21 @@ OldMathFuncProc( args[k].doubleValue = d; break; case TCL_INT: - if (ExprIntFunc(NULL, interp, 2, &(objv[j-1])) != TCL_OK) { + if (ExprIntFunc(NULL, interp, 2, &objv[j-1]) != TCL_OK) { ckfree((char *) args); return TCL_ERROR; } valuePtr = Tcl_GetObjResult(interp); - Tcl_GetLongFromObj(NULL, valuePtr, &(args[k].intValue)); + Tcl_GetLongFromObj(NULL, valuePtr, &args[k].intValue); Tcl_ResetResult(interp); break; case TCL_WIDE_INT: - if (ExprWideFunc(NULL, interp, 2, &(objv[j-1])) != TCL_OK) { + if (ExprWideFunc(NULL, interp, 2, &objv[j-1]) != TCL_OK) { ckfree((char *) args); return TCL_ERROR; } valuePtr = Tcl_GetObjResult(interp); - Tcl_GetWideIntFromObj(NULL, valuePtr, &(args[k].wideValue)); + Tcl_GetWideIntFromObj(NULL, valuePtr, &args[k].wideValue); Tcl_ResetResult(interp); break; } @@ -4576,7 +4613,8 @@ TEOV_NotFound( savedNsPtr = varFramePtr->nsPtr; varFramePtr->nsPtr = lookupNsPtr; } - TclNRDeferCallback(interp, TEOV_NotFoundCallback, INT2PTR(handlerObjc), newObjv, savedNsPtr, NULL); + TclNRDeferCallback(interp, TEOV_NotFoundCallback, INT2PTR(handlerObjc), + newObjv, savedNsPtr, NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; return TclNREvalObjv(interp, newObjc, newObjv, TCL_EVAL_NOERR, NULL); } @@ -4769,7 +4807,7 @@ Tcl_EvalTokensStandard( * Must be at least 1. */ { return TclSubstTokens(interp, tokenPtr, count, /* numLeftPtr */ NULL, 1, - NULL, NULL); + NULL, NULL); } /* @@ -4910,15 +4948,13 @@ TclEvalEx( int *linesStack = TclStackAlloc(interp, minObjs * sizeof(int)); /* TIP #280 Structures for tracking of command * locations. */ - /* - * Pointer for the tracking of invisible continuation lines. Initialized - * only if the caller gave us a table of locations to track, via - * scriptCLLocPtr. It always refers to the table entry holding the - * location of the next invisible continuation line to look for, while - * parsing the script. - */ - - int *clNext = NULL; + int *clNext = NULL; /* Pointer for the tracking of invisible + * continuation lines. Initialized only if the + * caller gave us a table of locations to + * track, via scriptCLLocPtr. It always refers + * to the table entry holding the location of + * the next invisible continuation line to + * look for, while parsing the script. */ if (iPtr->scriptCLLocPtr) { if (clNextOuter) { @@ -5044,14 +5080,13 @@ TclEvalEx( int wordLine = line; const char *wordStart = parsePtr->commandStart; int *wordCLNext = clNext; + unsigned int objectsNeeded = 0; + unsigned int numWords = parsePtr->numWords; /* * Generate an array of objects for the words of the command. */ - unsigned int objectsNeeded = 0; - unsigned int numWords = parsePtr->numWords; - if (numWords > minObjs) { expand = (int *) ckalloc(numWords * sizeof(int)); objvSpace = (Tcl_Obj **) @@ -5377,9 +5412,9 @@ TclAdvanceContinuations( int loc) { /* - * Track the invisible continuation lines embedded in a script, if - * any. Here they are just spaces (already). They were removed by - * EvalTokensStandard() via Tcl_UtfBackslash(). + * Track the invisible continuation lines embedded in a script, if any. + * Here they are just spaces (already). They were removed by + * EvalTokensStandard via Tcl_UtfBackslash. * * *clNextPtrPtr <=> We have continuation lines to track. * **clNextPtrPtr >= 0 <=> We are not beyond the last possible location. @@ -5507,8 +5542,8 @@ TclArgumentRelease( for (i = 1; i < objc; i++) { CFWord *cfwPtr; - Tcl_HashEntry *hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, - (char *) objv[i]); + Tcl_HashEntry *hPtr = + Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) objv[i]); if (!hPtr) { continue; @@ -5589,10 +5624,10 @@ TclArgumentBCEnter( CFWordBC *cfwPtr = (CFWordBC *) ckalloc(sizeof(CFWordBC)); cfwPtr->framePtr = cfPtr; - cfwPtr->obj = objv[word]; - cfwPtr->pc = pc; - cfwPtr->word = word; - cfwPtr->nextPtr = lastPtr; + cfwPtr->obj = objv[word]; + cfwPtr->pc = pc; + cfwPtr->word = word; + cfwPtr->nextPtr = lastPtr; lastPtr = cfwPtr; if (isnew) { @@ -5896,9 +5931,9 @@ TclNREvalObjEx( * finally direct evaluation. Precisely one of these blocks will be run. */ - if ((objPtr->typePtr == &tclListType) && /* is a list... */ - ((objPtr->bytes == NULL || /* ...without a string rep */ - listRepPtr->canonicalFlag))) { /* ...or that is canonical */ + if ((objPtr->typePtr == &tclListType) && /* is a list */ + ((objPtr->bytes == NULL || /* no string rep */ + listRepPtr->canonicalFlag))) { /* or is canonical */ Tcl_Obj *listPtr = objPtr; CmdFrame *eoFramePtr = NULL; int objc; @@ -6030,7 +6065,7 @@ TclNREvalObjEx( * evaluator is using it, leading to the release of the associated * ContLineLoc structure as well. To ensure that the latter doesn't * happen we set a lock on it. We release this lock later in this - * function, after the evaluator is done. The relevant "lineCLPtr" + * function, after the evaluator is done. The relevant "lineCLPtr" * hashtable is managed in the file "tclObj.c". * * Another important action is to save (and later restore) the @@ -6912,7 +6947,8 @@ Tcl_VarEval( int Tcl_GlobalEval( - Tcl_Interp *interp, /* Interpreter in which to evaluate command. */ + Tcl_Interp *interp, /* Interpreter in which to evaluate + * command. */ const char *command) /* Command to evaluate. */ { register Interp *iPtr = (Interp *) interp; @@ -7826,7 +7862,7 @@ ExprSrandFunc( /* * Reset the seed. Make sure 1 <= randSeed <= 2^31 - 2. See comments in - * ExprRandFunc() for more details. + * ExprRandFunc for more details. */ iPtr->flags |= RAND_SEED_INITIALIZED; @@ -7974,7 +8010,7 @@ TclDTraceInfo( for (i = 0; i < 2; i++) { Tcl_DictObjGet(NULL, info, *k++, &val); if (val) { - TclGetIntFromObj(NULL, val, &(argsi[i])); + TclGetIntFromObj(NULL, val, &argsi[i]); } else { argsi[i] = 0; } @@ -8214,7 +8250,7 @@ TclSpliceTailcall( TEOV_callback *runPtr; ExecEnv *eePtr = NULL; int second = 0; - + restart: for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { @@ -8269,8 +8305,8 @@ TclNRTailcallObjCmd( return TCL_ERROR; } - if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body ... */ - (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ + if (!iPtr->varFramePtr->isProcCallFrame || /* is not a body */ + (iPtr->framePtr != iPtr->varFramePtr)) { /* or is upleveled */ Tcl_SetResult(interp, "tailcall can only be called from a proc or lambda", TCL_STATIC); @@ -8292,7 +8328,7 @@ TclNRTailcallObjCmd( * Create the callback to actually evaluate the tailcalled * command, then pass it to tebc so that it is stashed at the proper * place. Being lazy: exploit the TclNRAddCallBack macro to build the - * callback. + * callback. */ TclNRAddCallback(interp, NRTailcallEval, listPtr, nsObjPtr, NULL, NULL); @@ -8387,31 +8423,6 @@ Tcl_NRAddCallback( *---------------------------------------------------------------------- */ -static int NRInterpCoroutine(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int RewindCoroutine(CoroutineData *corPtr, int result); -static void DeleteCoroutine(ClientData clientData); - -static int NRCoroutineExitCallback(ClientData data[], - Tcl_Interp *interp, int result); -static int NRCoroutineCallerCallback(ClientData data[], - Tcl_Interp *interp, int result); - -static const CorContext NULL_CONTEXT = {NULL, NULL, NULL, NULL}; - -#define SAVE_CONTEXT(context) \ - (context).framePtr = iPtr->framePtr; \ - (context).varFramePtr = iPtr->varFramePtr; \ - (context).cmdFramePtr = iPtr->cmdFramePtr; \ - (context).lineLABCPtr = iPtr->lineLABCPtr - -#define RESTORE_CONTEXT(context) \ - iPtr->framePtr = (context).framePtr; \ - iPtr->varFramePtr = (context).varFramePtr; \ - iPtr->cmdFramePtr = (context).cmdFramePtr; \ - iPtr->lineLABCPtr = (context).lineLABCPtr - #define iPtr ((Interp *) interp) int @@ -8490,15 +8501,16 @@ TclNRYieldToObjCmd( Tcl_Panic("yieldTo failed to find the proper namespace"); } Tcl_IncrRefCount(nsObjPtr); - + /* * Add the callback in the caller's env, then instruct TEBC to yield */ iPtr->execEnvPtr = corPtr->callerEEPtr; - TclNRAddCallback(interp, YieldToCallback, corPtr, listPtr, nsObjPtr, NULL); + TclNRAddCallback(interp, YieldToCallback, corPtr, listPtr, nsObjPtr, + NULL); iPtr->execEnvPtr = corPtr->eePtr; - + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8516,12 +8528,11 @@ YieldToCallback( /* yieldTo: invoke the command using tailcall tech */ TEOV_callback *cbPtr; - - TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, - NULL, NULL); + + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, NULL, NULL); cbPtr = TOP_CB(interp); TOP_CB(interp) = cbPtr->nextPtr; - + TclSpliceTailcall(interp, cbPtr); return TCL_OK; } @@ -8621,7 +8632,7 @@ NRCoroutineExitCallback( { CoroutineData *corPtr = data[0]; Command *cmdPtr = corPtr->cmdPtr; - + /* * This runs at the bottom of the Coroutine's execEnv: it will be executed * when the coroutine returns or is wound down, but not when it yields. It @@ -8676,7 +8687,7 @@ NRInterpCoroutine( /* * objc==0 indicates a call to rewind the coroutine */ - + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; @@ -8730,7 +8741,7 @@ TclNRCoroutineObjCmd( const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; - + if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); return TCL_ERROR; @@ -8766,9 +8777,9 @@ TclNRCoroutineObjCmd( /* * We ARE creating the coroutine command: allocate the corresponding * struct, add the callback in caller's env and record the caller's - * frames. + * frames. */ - + corPtr = (CoroutineData *) ckalloc(sizeof(CoroutineData)); TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL, NULL); @@ -8837,12 +8848,12 @@ TclNRCoroutineObjCmd( * will be allocated in the Tcl stack. So signal TEBC that it has to * initialize the base cmdFramePtr by setting it to NULL. */ - + corPtr->base.cmdFramePtr = NULL; corPtr->running = NULL_CONTEXT; corPtr->stackLevel = NULL; corPtr->auxNumLevels = iPtr->numLevels; - + /* * Create the command that will run at the bottom of the coroutine. * Be sure not to pass a canonical list for the command so that we insure @@ -8859,7 +8870,7 @@ TclNRCoroutineObjCmd( * Create the coro's execEnv and switch to it so that any CallFrames or * callbacks refer to the new execEnv's stack. Add the exit callback, then * the callback to eval the coro body. - */ + */ corPtr->eePtr = TclCreateExecEnv(interp, CORO_STACK_INITIAL_SIZE); corPtr->callerEEPtr = iPtr->execEnvPtr; @@ -8902,6 +8913,8 @@ TclInfoCoroutineCmd( } return TCL_OK; } + +#undef iPtr /* * Local Variables: -- cgit v0.12 From 81ff36dd38f8ddf99fc389e8c18cb495880f9289 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 24 Dec 2009 06:58:14 +0000 Subject: Tweak exclusions --- unix/.cvsignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unix/.cvsignore b/unix/.cvsignore index 516d2b3..4c52a50 100644 --- a/unix/.cvsignore +++ b/unix/.cvsignore @@ -2,10 +2,12 @@ pkgs Makefile config.status *.a +*.plist +*.dylib +*.exe tclConfig.sh autom4te.cache tcl.pc -tclsh.exe cat dltest.marker longfile -- cgit v0.12 From eb97742ebfc4d2677574f3985737a4c667310261 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 25 Dec 2009 22:45:05 +0000 Subject: CONST -> const --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 6 +++--- generic/tclParse.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 106f6e7..a02c8ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-25 Jan Nijtmans + + * generic/tclCmdMZ.c: CONST -> const + * generic/tclParse.c + 2009-12-23 Donal K. Fellows * library/safe.tcl (AliasSource, AliasExeName): [Bug 2913625]: Stop diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 28f4d77..7e42ec3 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.197 2009/12/07 15:08:47 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.198 2009/12/25 22:45:05 nijtmans Exp $ */ #include "tclInt.h" @@ -4721,8 +4721,8 @@ TclListLines( Tcl_Obj* const* elems) /* The list elems as Tcl_Obj*, in need of * derived continuation data */ { - CONST char* listStr = Tcl_GetString (listObj); - CONST char* listHead = listStr; + const char* listStr = Tcl_GetString (listObj); + const char* listHead = listStr; int i, length = strlen(listStr); const char *element = NULL, *next = NULL; ContLineLoc* clLocPtr = TclContinuationsGet(listObj); diff --git a/generic/tclParse.c b/generic/tclParse.c index b06b106..65d09c2 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -2099,7 +2099,7 @@ TclSubstTokens( * left to be substituted will be written */ int line, /* The line the script starts on. */ int* clNextOuter, /* Information about an outer context for */ - CONST char* outerScript) /* continuation line data. This is set by + const char* outerScript) /* continuation line data. This is set by * EvalEx() to properly handle [...]-nested * commands. The 'outerScript' refers to the * most-outer script containing the embedded -- cgit v0.12 From 4230837501b73be694a6e285dc87471b4cabdb65 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 27 Dec 2009 22:06:10 +0000 Subject: [Bug 2921538]: Updated example to not be quite so ancient. --- ChangeLog | 5 +++++ doc/namespace.n | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a02c8ce..7ea6211 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-27 Donal K. Fellows + + * doc/namespace.n (SCOPED SCRIPTS): [Bug 2921538]: Updated example to + not be quite so ancient. + 2009-12-25 Jan Nijtmans * generic/tclCmdMZ.c: CONST -> const diff --git a/doc/namespace.n b/doc/namespace.n index 717de11..f89ec91 100644 --- a/doc/namespace.n +++ b/doc/namespace.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: namespace.n,v 1.38 2009/11/08 19:56:45 dkf Exp $ +'\" RCS: @(#) $Id: namespace.n,v 1.39 2009/12/27 22:06:12 dkf Exp $ '\" .so man.macros .TH namespace n 8.5 Tcl "Tcl Built-In Commands" @@ -693,11 +693,12 @@ may be imported by other namespaces. If a \fBnamespace import\fR command specifies a command that is not exported, the command is not imported. .SH "SCOPED SCRIPTS" +.PP The \fBnamespace code\fR command is the means by which a script may be packaged for evaluation in a namespace other than the one in which it was created. It is used most often to create event handlers, Tk bindings, and traces for evaluation in the global context. For instance, the following -code indicates how to direct a variable trace callback into the current +code indicates how to direct a variable \fBtrace\fR callback into the current namespace: .PP .CS @@ -708,7 +709,7 @@ namespace: puts "the value of $n1 has changed to $var" return } - trace variable b w [\fBnamespace code\fR theTraceCallback] + trace add variable b write [\fBnamespace code\fR theTraceCallback] } set a::b c .CE -- cgit v0.12 From 476bb99185f813f3c90f0ef2156cebf0f759c27e Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 28 Dec 2009 09:53:36 +0000 Subject: Minor formatting issues --- generic/tclTimer.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 4f40490..d65ca54 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.40 2009/09/07 07:28:38 das Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.41 2009/12/28 09:53:36 dkf Exp $ */ #include "tclInt.h" @@ -897,8 +897,7 @@ Tcl_AfterObjCmd( tempCommand = Tcl_GetStringFromObj(afterPtr->commandPtr, &tempLength); if ((length == tempLength) - && (memcmp((void*) command, (void*) tempCommand, - (unsigned) length) == 0)) { + && !memcmp(command, tempCommand, (unsigned) length)) { break; } } @@ -1022,14 +1021,14 @@ AfterDelay( return TCL_ERROR; } if (iPtr->limit.timeEvent != NULL - && TCL_TIME_BEFORE(iPtr->limit.time, now)) { + && TCL_TIME_BEFORE(iPtr->limit.time, now)) { iPtr->limit.granularityTicker = 0; if (Tcl_LimitCheck(interp) != TCL_OK) { return TCL_ERROR; } } if (iPtr->limit.timeEvent == NULL - || TCL_TIME_BEFORE(endTime, iPtr->limit.time)) { + || TCL_TIME_BEFORE(endTime, iPtr->limit.time)) { diff = TCL_TIME_DIFF_MS(endTime, now); #ifndef TCL_WIDE_INT_IS_LONG if (diff > LONG_MAX) { @@ -1040,7 +1039,7 @@ AfterDelay( diff = TCL_TIME_MAXIMUM_SLICE; } if (diff > 0) { - Tcl_Sleep((long)diff); + Tcl_Sleep((long) diff); } } else { diff = TCL_TIME_DIFF_MS(iPtr->limit.time, now); @@ -1053,7 +1052,7 @@ AfterDelay( diff = TCL_TIME_MAXIMUM_SLICE; } if (diff > 0) { - Tcl_Sleep((long)diff); + Tcl_Sleep((long) diff); } if (Tcl_AsyncReady()) { if (Tcl_AsyncInvoke(interp, TCL_OK) != TCL_OK) { -- cgit v0.12 From 174ac07d57f2a496bf57aca9b076f42b5c1c4e25 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 28 Dec 2009 09:58:14 +0000 Subject: [Bug 2891362]: Make time limits work better with the event loop. --- ChangeLog | 6 ++++ generic/tclInterp.c | 17 +++++++-- tests/interp.test | 102 +++++++++++----------------------------------------- 3 files changed, 41 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ea6211..4fc9dcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-28 Donal K. Fellows + + * generic/tclInterp.c (TimeLimitCallback): [Bug 2891362]: Ensure that + * tests/interp.test (interp-34.13): the granularity ticker is + reset when we check limits because of the time limit event firing. + 2009-12-27 Donal K. Fellows * doc/namespace.n (SCOPED SCRIPTS): [Bug 2921538]: Updated example to diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 89b635d..b724abf 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.108 2009/12/16 23:26:01 nijtmans Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.109 2009/12/28 09:58:14 dkf Exp $ */ #include "tclInt.h" @@ -928,7 +928,8 @@ Tcl_InterpObjCmd( int limitType; if (objc < 4) { - Tcl_WrongNumArgs(interp, 2, objv, "path limitType ?-option value ...?"); + Tcl_WrongNumArgs(interp, 2, objv, + "path limitType ?-option value ...?"); return TCL_ERROR; } slaveInterp = GetInterp(interp, objv[2]); @@ -3745,10 +3746,20 @@ TimeLimitCallback( ClientData clientData) { Tcl_Interp *interp = clientData; + Interp *iPtr = clientData; int code; Tcl_Preserve(interp); - ((Interp *) interp)->limit.timeEvent = NULL; + iPtr->limit.timeEvent = NULL; + + /* + * Must reset the granularity ticker here to force an immediate full + * check. This is OK because we're swallowing the cost in the overall cost + * of the event loop. [Bug 2891362] + */ + + iPtr->limit.granularityTicker = 0; + code = Tcl_LimitCheck(interp); if (code != TCL_OK) { Tcl_AddErrorInfo(interp, "\n (while waiting for event)"); diff --git a/tests/interp.test b/tests/interp.test index e41eb45..60eebea 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.65 2009/05/06 15:50:37 dgp Exp $ +# RCS: @(#) $Id: interp.test,v 1.66 2009/12/28 09:58:14 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -24,7 +24,7 @@ set hidden_cmds {cd encoding exec exit fconfigure file glob load open pwd socket foreach i [interp slaves] { interp delete $i } - + # Part 0: Check out options for interp command test interp-1.1 {options for interp command} { list [catch {interp} msg] $msg @@ -1603,7 +1603,6 @@ test interp-20.50 {Bug 2486550} -setup { interp delete slave } -returnCodes error -match glob -result * - test interp-21.1 {interp hidden} { interp hidden {} } "" @@ -2037,7 +2036,6 @@ test interp-25.1 {testing aliasing of string commands} { interp delete a } "" - # # Interps result transmission # @@ -2046,7 +2044,6 @@ test interp-26.1 {result code transmission : interp eval direct} { # Test that all the possibles error codes from Tcl get passed up # from the slave interp's context to the master, even though the # slave nominally thinks the command is running at the root level. - catch {interp delete a} interp create a set res {} @@ -2057,8 +2054,6 @@ test interp-26.1 {result code transmission : interp eval direct} { interp delete a set res } {-1 0 1 2 3 4 5} - - test interp-26.2 {result code transmission : interp eval indirect} { # retcode == 2 == return is special catch {interp delete a} @@ -2072,12 +2067,10 @@ test interp-26.2 {result code transmission : interp eval indirect} { interp delete a set res } {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5} - test interp-26.3 {result code transmission : aliases} { # Test that all the possibles error codes from Tcl get passed up # from the slave interp's context to the master, even though the # slave nominally thinks the command is running at the root level. - catch {interp delete a} interp create a set res {} @@ -2091,7 +2084,6 @@ test interp-26.3 {result code transmission : aliases} { interp delete a set res } {-1 0 1 2 3 4 5} - test interp-26.4 {result code transmission: invoke hidden direct--bug 1637} \ {knownBug} { # The known bug is that code 2 is returned, not the -code argument @@ -2105,7 +2097,6 @@ test interp-26.4 {result code transmission: invoke hidden direct--bug 1637} \ interp delete a set res } {-1 0 1 2 3 4 5} - test interp-26.5 {result code transmission: invoke hidden indirect--bug 1637} \ {knownBug} { # The known bug is that the break and continue should raise errors @@ -2121,7 +2112,6 @@ test interp-26.5 {result code transmission: invoke hidden indirect--bug 1637} \ interp delete a set res } {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5} - test interp-26.6 {result code transmission: all combined--bug 1637} \ {knownBug} { # Test that all the possibles error codes from Tcl get passed @@ -2145,12 +2135,9 @@ test interp-26.6 {result code transmission: all combined--bug 1637} \ interp delete $interp; set res } {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5} - # Some tests might need to be added to check for difference between # toplevel and non toplevel evals. - # End of return code transmission section - test interp-26.7 {errorInfo transmission: regular interps} { set interp [interp create]; proc MyError {secret} { @@ -2169,7 +2156,6 @@ test interp-26.7 {errorInfo transmission: regular interps} { (procedure "MyTestAlias" line 2) invoked from within "test"} - test interp-26.8 {errorInfo transmission: safe interps--bug 1637} {knownBug} { # this test fails because the errorInfo is fully transmitted # whether the interp is safe or not. The errorInfo should never @@ -2203,7 +2189,6 @@ test interp-27.1 {interp aliases & namespaces} { interp delete $i set aliasTrace; } {{:: {foo::bar test}}} - test interp-27.2 {interp aliases & namespaces} { set i [interp create]; set aliasTrace {}; @@ -2216,7 +2201,6 @@ test interp-27.2 {interp aliases & namespaces} { interp delete $i set aliasTrace; } {{:: {foo::bar test}}} - test interp-27.3 {interp aliases & namespaces} { set i [interp create]; set aliasTrace {}; @@ -2230,7 +2214,6 @@ test interp-27.3 {interp aliases & namespaces} { interp delete $i set aliasTrace; } {{:: {foo::bar test}}} - test interp-27.4 {interp aliases & namespaces} { set i [interp create]; namespace eval foo2 { @@ -2350,7 +2333,6 @@ test interp-27.4 {interp aliases & namespaces} { # list [catch {interp invokehidden {} foo} msg] $msg; #} {1 {invalid hidden command name "foo"}} - test interp-28.1 {getting fooled by slave's namespace ?} -setup { set i [interp create -safe]; proc master {interp args} {interp hide $interp list} @@ -2369,7 +2351,6 @@ test interp-28.1 {getting fooled by slave's namespace ?} -setup { rename master {} interp delete $i; } -result {} - test interp-28.2 {master's nsName cache should not cross} -setup { set i [interp create] } -body { @@ -2399,96 +2380,81 @@ test interp-28.2 {master's nsName cache should not cross} -setup { test interp-29.1.1 {interp recursionlimit argument checking} { list [catch {interp recursionlimit} msg] $msg } {1 {wrong # args: should be "interp recursionlimit path ?newlimit?"}} - test interp-29.1.2 {interp recursionlimit argument checking} { list [catch {interp recursionlimit foo bar} msg] $msg } {1 {could not find interpreter "foo"}} - test interp-29.1.3 {interp recursionlimit argument checking} { list [catch {interp recursionlimit foo bar baz} msg] $msg } {1 {wrong # args: should be "interp recursionlimit path ?newlimit?"}} - test interp-29.1.4 {interp recursionlimit argument checking} { interp create moo set result [catch {interp recursionlimit moo bar} msg] interp delete moo list $result $msg } {1 {expected integer but got "bar"}} - test interp-29.1.5 {interp recursionlimit argument checking} { interp create moo set result [catch {interp recursionlimit moo 0} msg] interp delete moo list $result $msg } {1 {recursion limit must be > 0}} - test interp-29.1.6 {interp recursionlimit argument checking} { interp create moo set result [catch {interp recursionlimit moo -1} msg] interp delete moo list $result $msg } {1 {recursion limit must be > 0}} - test interp-29.1.7 {interp recursionlimit argument checking} { interp create moo set result [catch {interp recursionlimit moo [expr {wide(1)<<32}]} msg] interp delete moo list $result [string range $msg 0 35] } {1 {integer value too large to represent}} - test interp-29.1.8 {slave recursionlimit argument checking} { interp create moo set result [catch {moo recursionlimit foo bar} msg] interp delete moo list $result $msg } {1 {wrong # args: should be "moo recursionlimit ?newlimit?"}} - test interp-29.1.9 {slave recursionlimit argument checking} { interp create moo set result [catch {moo recursionlimit foo} msg] interp delete moo list $result $msg } {1 {expected integer but got "foo"}} - test interp-29.1.10 {slave recursionlimit argument checking} { interp create moo set result [catch {moo recursionlimit 0} msg] interp delete moo list $result $msg } {1 {recursion limit must be > 0}} - test interp-29.1.11 {slave recursionlimit argument checking} { interp create moo set result [catch {moo recursionlimit -1} msg] interp delete moo list $result $msg } {1 {recursion limit must be > 0}} - test interp-29.1.12 {slave recursionlimit argument checking} { interp create moo set result [catch {moo recursionlimit [expr {wide(1)<<32}]} msg] interp delete moo list $result [string range $msg 0 35] } {1 {integer value too large to represent}} - test interp-29.2.1 {query recursion limit} { interp recursionlimit {} } 1000 - test interp-29.2.2 {query recursion limit} { set i [interp create] set n [interp recursionlimit $i] interp delete $i set n } 1000 - test interp-29.2.3 {query recursion limit} { set i [interp create] set n [$i recursionlimit] interp delete $i set n } 1000 - test interp-29.2.4 {query recursion limit} { set i [interp create] set r [$i eval { @@ -2499,7 +2465,6 @@ test interp-29.2.4 {query recursion limit} { interp delete $i set r } {42 42} - test interp-29.2.5 {query recursion limit} { set i [interp create] set n1 [interp recursionlimit $i 42] @@ -2507,7 +2472,6 @@ test interp-29.2.5 {query recursion limit} { interp delete $i list $n1 $n2 } {42 42} - test interp-29.2.6 {query recursion limit} { set i [interp create] set n1 [interp recursionlimit $i 42] @@ -2515,7 +2479,6 @@ test interp-29.2.6 {query recursion limit} { interp delete $i list $n1 $n2 } {42 42} - test interp-29.2.7 {query recursion limit} { set i [interp create] set n1 [$i recursionlimit 42] @@ -2523,7 +2486,6 @@ test interp-29.2.7 {query recursion limit} { interp delete $i list $n1 $n2 } {42 42} - test interp-29.2.8 {query recursion limit} { set i [interp create] set n1 [$i recursionlimit 42] @@ -2531,7 +2493,6 @@ test interp-29.2.8 {query recursion limit} { interp delete $i list $n1 $n2 } {42 42} - test interp-29.3.1 {recursion limit} { set i [interp create] set r [interp eval $i { @@ -2543,7 +2504,6 @@ test interp-29.3.1 {recursion limit} { interp delete $i set r } {1 {too many nested evaluations (infinite loop?)} 49} - test interp-29.3.2 {recursion limit} { set i [interp create] interp recursionlimit $i 50 @@ -2555,7 +2515,6 @@ test interp-29.3.2 {recursion limit} { interp delete $i set r } {1 {too many nested evaluations (infinite loop?)} 49} - test interp-29.3.3 {recursion limit} { set i [interp create] $i recursionlimit 50 @@ -2567,7 +2526,6 @@ test interp-29.3.3 {recursion limit} { interp delete $i set r } {1 {too many nested evaluations (infinite loop?)} 49} - test interp-29.3.4 {recursion limit error reporting} { interp create slave set r1 [slave eval { @@ -2588,7 +2546,6 @@ test interp-29.3.4 {recursion limit error reporting} { interp delete slave list $r1 $r2 } {1 {falling back due to new recursion limit}} - test interp-29.3.5 {recursion limit error reporting} { interp create slave set r1 [slave eval { @@ -2609,7 +2566,6 @@ test interp-29.3.5 {recursion limit error reporting} { interp delete slave list $r1 $r2 } {1 {falling back due to new recursion limit}} - test interp-29.3.6 {recursion limit error reporting} { interp create slave set r1 [slave eval { @@ -2630,12 +2586,10 @@ test interp-29.3.6 {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - # # Note that TEBC does not verify the interp's nesting level itself; the nesting # level will only be verified when it invokes a non-bcc'd command. # - test interp-29.3.7a {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 5} @@ -2657,7 +2611,6 @@ test interp-29.3.7a {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.7b {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 5} @@ -2679,7 +2632,6 @@ test interp-29.3.7b {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.7c {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 5} @@ -2702,7 +2654,6 @@ test interp-29.3.7c {recursion limit error reporting} { interp delete slave list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} - test interp-29.3.8a {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 4} @@ -2724,7 +2675,6 @@ test interp-29.3.8a {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.8b {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 4} @@ -2746,7 +2696,6 @@ test interp-29.3.8b {recursion limit error reporting} { interp delete slave list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} - test interp-29.3.9a {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 6} @@ -2768,7 +2717,6 @@ test interp-29.3.9a {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.9b {recursion limit error reporting} { interp create slave after 0 {interp recursionlimit slave 6} @@ -2790,7 +2738,6 @@ test interp-29.3.9b {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.10a {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 4} @@ -2812,7 +2759,6 @@ test interp-29.3.10a {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.10b {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 4} @@ -2834,7 +2780,6 @@ test interp-29.3.10b {recursion limit error reporting} { interp delete slave list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} - test interp-29.3.11a {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 5} @@ -2856,7 +2801,6 @@ test interp-29.3.11a {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.11b {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 5} @@ -2879,7 +2823,6 @@ test interp-29.3.11b {recursion limit error reporting} { interp delete slave list $r1 $r2 } {1 {too many nested evaluations (infinite loop?)}} - test interp-29.3.12a {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 6} @@ -2901,7 +2844,6 @@ test interp-29.3.12a {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.3.12b {recursion limit error reporting} { interp create slave after 0 {slave recursionlimit 6} @@ -2924,7 +2866,6 @@ test interp-29.3.12b {recursion limit error reporting} { interp delete slave list $r1 $r2 } {0 ok} - test interp-29.4.1 {recursion limit inheritance} { set i [interp create] set ii [interp eval $i { @@ -2940,7 +2881,6 @@ test interp-29.4.1 {recursion limit inheritance} { interp delete $i set r } 50 - test interp-29.4.2 {recursion limit inheritance} { set i [interp create] $i recursionlimit 50 @@ -2954,7 +2894,6 @@ test interp-29.4.2 {recursion limit inheritance} { interp delete $i set r } 50 - test interp-29.5.1 {does slave recursion limit affect master?} { set before [interp recursionlimit {}] set i [interp create] @@ -2964,7 +2903,6 @@ test interp-29.5.1 {does slave recursion limit affect master?} { interp delete $i list [expr {$before == $after}] $slavelimit } {1 20000} - test interp-29.5.2 {does slave recursion limit affect master?} { set before [interp recursionlimit {}] set i [interp create] @@ -2974,7 +2912,6 @@ test interp-29.5.2 {does slave recursion limit affect master?} { interp delete $i list [expr {$before == $after}] $slavelimit } {1 20000} - test interp-29.5.3 {does slave recursion limit affect master?} { set before [interp recursionlimit {}] set i [interp create] @@ -2984,7 +2921,6 @@ test interp-29.5.3 {does slave recursion limit affect master?} { interp delete $i list [expr {$before == $after}] $slavelimit } {1 20000} - test interp-29.5.4 {does slave recursion limit affect master?} { set before [interp recursionlimit {}] set i [interp create] @@ -2994,21 +2930,18 @@ test interp-29.5.4 {does slave recursion limit affect master?} { interp delete $i list [expr {$before == $after}] $slavelimit } {1 20000} - test interp-29.6.1 {safe interpreter recursion limit} { interp create slave -safe set n [interp recursionlimit slave] interp delete slave set n } 1000 - test interp-29.6.2 {safe interpreter recursion limit} { interp create slave -safe set n [slave recursionlimit] interp delete slave set n } 1000 - test interp-29.6.3 {safe interpreter recursion limit} { interp create slave -safe set n1 [interp recursionlimit slave 42] @@ -3016,7 +2949,6 @@ test interp-29.6.3 {safe interpreter recursion limit} { interp delete slave list $n1 $n2 } {42 42} - test interp-29.6.4 {safe interpreter recursion limit} { interp create slave -safe set n1 [slave recursionlimit 42] @@ -3024,7 +2956,6 @@ test interp-29.6.4 {safe interpreter recursion limit} { interp delete slave list $n1 $n2 } {42 42} - test interp-29.6.5 {safe interpreter recursion limit} { interp create slave -safe set n1 [interp recursionlimit slave 42] @@ -3032,7 +2963,6 @@ test interp-29.6.5 {safe interpreter recursion limit} { interp delete slave list $n1 $n2 } {42 42} - test interp-29.6.6 {safe interpreter recursion limit} { interp create slave -safe set n1 [slave recursionlimit 42] @@ -3040,7 +2970,6 @@ test interp-29.6.6 {safe interpreter recursion limit} { interp delete slave list $n1 $n2 } {42 42} - test interp-29.6.7 {safe interpreter recursion limit} { interp create slave -safe set n1 [slave recursionlimit 42] @@ -3048,14 +2977,12 @@ test interp-29.6.7 {safe interpreter recursion limit} { interp delete slave list $n1 $n2 } {42 42} - test interp-29.6.8 {safe interpreter recursion limit} { interp create slave -safe set n [catch {slave eval {interp recursionlimit {} 42}} msg] interp delete slave list $n $msg } {1 {permission denied: safe interpreters cannot change recursion limit}} - test interp-29.6.9 {safe interpreter recursion limit} { interp create slave -safe set result [ @@ -3070,7 +2997,6 @@ test interp-29.6.9 {safe interpreter recursion limit} { interp delete slave set result } {1 {permission denied: safe interpreters cannot change recursion limit}} - test interp-29.6.10 {safe interpreter recursion limit} { interp create slave -safe set result [ @@ -3123,7 +3049,6 @@ test interp-31.1 {alias invocation scope} { upvar 1 $varName localVar set localVar $value } - interp alias {} myNewSet {} mySet proc testMyNewSet {value} { myNewSet a $value @@ -3137,8 +3062,9 @@ test interp-31.1 {alias invocation scope} { set result } ok -test interp-32.1 {parent's working directory should be inherited by a child interp} { +test interp-32.1 {parent's working directory should be inherited by a child interp} -setup { cd [temporaryDirectory] +} -body { set parent [pwd] set i [interp create] set child [$i eval pwd] @@ -3151,10 +3077,11 @@ test interp-32.1 {parent's working directory should be inherited by a child inte cd .. file delete cwd_test interp delete $i - cd [workingDirectory] expr {[string equal $parent $child] ? 1 : "\{$parent\} != \{$child\}"} -} 1 +} -cleanup { + cd [workingDirectory] +} -result 1 test interp-33.1 {refCounting for target words of alias [Bug 730244]} { # This test will panic if Bug 730244 is not fixed. @@ -3448,6 +3375,14 @@ test interp-34.12 {time limit extension in callbacks} -setup { } -result {cb1 cb1 0 {} ok} -cleanup { rename cb1 {} } +test interp-34.13 {time limit granularity and vwait: Bug 2891362} -setup { + set i [interp create -safe] +} -body { + $i limit time -seconds [clock add [clock seconds] 1 second] + $i eval vwait forever +} -cleanup { + interp delete $i +} -returnCodes error -result {limit exceeded} test interp-35.1 {interp limit syntax} -body { interp limit @@ -3641,10 +3576,15 @@ test interp-36.7 {SlaveBgerror sets error handler of slave [1999035]} -setup { unset result interp delete slave } -result foo - + # cleanup foreach i [interp slaves] { interp delete $i } ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# fill-column: 78 +# End: -- cgit v0.12 From 2ad98fe4da1a849f1ff73bf5da2d613161df4a37 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 28 Dec 2009 10:01:11 +0000 Subject: Slight improvement of test so it shouldn't block forever if it fails --- tests/interp.test | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/interp.test b/tests/interp.test index 60eebea..0499802 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.66 2009/12/28 09:58:14 dkf Exp $ +# RCS: @(#) $Id: interp.test,v 1.67 2009/12/28 10:01:11 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -3379,7 +3379,11 @@ test interp-34.13 {time limit granularity and vwait: Bug 2891362} -setup { set i [interp create -safe] } -body { $i limit time -seconds [clock add [clock seconds] 1 second] - $i eval vwait forever + $i eval { + after 2000 set x timeout + vwait x + return $x + } } -cleanup { interp delete $i } -returnCodes error -result {limit exceeded} -- cgit v0.12 From f9c66cfc9c6e599c938a2873b832c7a9c5b7efaf Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 28 Dec 2009 12:50:43 +0000 Subject: Correct failing test --- tests/safe.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/safe.test b/tests/safe.test index 3e451d4..c58c7b7 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.29 2009/12/16 23:44:15 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.30 2009/12/28 12:50:43 dkf Exp $ package require Tcl 8.5 @@ -91,7 +91,7 @@ test safe-3.2 {calling safe::interpCreate on trusted interp} -setup { lsort [a aliases] } -cleanup { safe::interpDelete a -} -result {clock encoding exit file glob load source} +} -result {::tcl::info::nameofexecutable clock encoding exit file glob load source} test safe-3.3 {calling safe::interpCreate on trusted interp} -setup { catch {safe::interpDelete a} } -body { -- cgit v0.12 From 000afb3098ed8c8148056fb2638e664b7e2cb3f2 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 28 Dec 2009 12:55:48 +0000 Subject: [Bug 942170]: Detect the st_blocks field of 'struct stat' correctly. --- ChangeLog | 5 +++++ generic/tclCmdAH.c | 9 ++++++--- generic/tclFileName.c | 13 +++++++------ generic/tclIOUtil.c | 32 ++++++++++++-------------------- tests/cmdAH.test | 4 +++- unix/configure.in | 8 ++++---- 6 files changed, 37 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fc9dcb..e07be42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-12-28 Donal K. Fellows + * unix/configure.in: [Bug 942170]: Detect the st_blocks field of + * generic/tclCmdAH.c (StoreStatData): 'struct stat' correctly. + * generic/tclFileName.c (Tcl_GetBlocksFromStat): + * generic/tclIOUtil.c (Tcl_Stat): + * generic/tclInterp.c (TimeLimitCallback): [Bug 2891362]: Ensure that * tests/interp.test (interp-34.13): the granularity ticker is reset when we check limits because of the time limit event firing. diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 95e6fd8..4edfdec 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.122 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.123 2009/12/28 12:55:48 dkf Exp $ */ #include "tclInt.h" @@ -1614,7 +1614,7 @@ StoreStatData( /* * Watch out porters; the inode is meant to be an *unsigned* value, so the - * cast might fail when there isn't a real arithmentic 'long long' type... + * cast might fail when there isn't a real arithmetic 'long long' type... */ STORE_ARY("dev", Tcl_NewLongObj((long)statPtr->st_dev)); @@ -1623,9 +1623,12 @@ StoreStatData( STORE_ARY("uid", Tcl_NewLongObj((long)statPtr->st_uid)); STORE_ARY("gid", Tcl_NewLongObj((long)statPtr->st_gid)); STORE_ARY("size", Tcl_NewWideIntObj((Tcl_WideInt)statPtr->st_size)); -#ifdef HAVE_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS STORE_ARY("blocks", Tcl_NewWideIntObj((Tcl_WideInt)statPtr->st_blocks)); #endif +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + STORE_ARY("blksize", Tcl_NewLongObj((long)statPtr->st_blksize)); +#endif STORE_ARY("atime", Tcl_NewLongObj((long)statPtr->st_atime)); STORE_ARY("mtime", Tcl_NewLongObj((long)statPtr->st_mtime)); STORE_ARY("ctime", Tcl_NewLongObj((long)statPtr->st_ctime)); diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 664ba94..8a25eb4 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.99 2009/12/21 23:25:40 nijtmans Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.100 2009/12/28 12:55:48 dkf Exp $ */ #include "tclInt.h" @@ -46,7 +46,7 @@ static int DoGlob(Tcl_Interp *interp, Tcl_Obj *resultPtr, * specific files. */ -#if (!defined(HAVE_ST_BLOCKS) && !defined(GUESSED_BLOCK_SIZE)) +#if (!defined(HAVE_STRUCT_STAT_ST_BLKSIZE) && !defined(GUESSED_BLOCK_SIZE)) #define GUESSED_BLOCK_SIZE 1024 #endif @@ -2672,11 +2672,12 @@ Tcl_WideUInt Tcl_GetBlocksFromStat( const Tcl_StatBuf *statPtr) { -#ifdef HAVE_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS return (Tcl_WideUInt) statPtr->st_blocks; #else - return ((Tcl_WideUInt) statPtr->st_size - + (GUESSED_BLOCK_SIZE-1)) / GUESSED_BLOCK_SIZE; + register unsigned blksize = Tcl_GetBlockSizeFromStat(statPtr); + + return ((Tcl_WideUInt) statPtr->st_size + blksize - 1) / blksize; #endif } @@ -2684,7 +2685,7 @@ unsigned Tcl_GetBlockSizeFromStat( const Tcl_StatBuf *statPtr) { -#ifdef HAVE_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE return (unsigned) statPtr->st_blksize; #else /* diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 79769c9..a077bab 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.165 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.166 2009/12/28 12:55:48 dkf Exp $ */ #include "tclInt.h" @@ -224,18 +224,14 @@ Tcl_Stat( int ret; Tcl_StatBuf buf; Tcl_Obj *pathPtr = Tcl_NewStringObj(path,-1); -#ifndef TCL_WIDE_INT_IS_LONG - Tcl_WideInt tmp1, tmp2; -#ifdef HAVE_ST_BLOCKS - Tcl_WideInt tmp3; -#endif -#endif Tcl_IncrRefCount(pathPtr); ret = Tcl_FSStat(pathPtr, &buf); Tcl_DecrRefCount(pathPtr); if (ret != -1) { #ifndef TCL_WIDE_INT_IS_LONG + Tcl_WideInt tmp1, tmp2, tmp3 = 0; + # define OUT_OF_RANGE(x) \ (((Tcl_WideInt)(x)) < Tcl_LongAsWide(LONG_MIN) || \ ((Tcl_WideInt)(x)) > Tcl_LongAsWide(LONG_MAX)) @@ -254,23 +250,17 @@ Tcl_Stat( tmp1 = (Tcl_WideInt) buf.st_ino; tmp2 = (Tcl_WideInt) buf.st_size; -#ifdef HAVE_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS tmp3 = (Tcl_WideInt) buf.st_blocks; #endif - if (OUT_OF_URANGE(tmp1) || OUT_OF_RANGE(tmp2) -#ifdef HAVE_ST_BLOCKS - || OUT_OF_RANGE(tmp3) -#endif - ) { -#ifdef EFBIG + if (OUT_OF_URANGE(tmp1) || OUT_OF_RANGE(tmp2) || OUT_OF_RANGE(tmp3)) { +#if defined(EFBIG) errno = EFBIG; -#else -# ifdef EOVERFLOW +#elif defined(EOVERFLOW) errno = EOVERFLOW; -# else -# error "What status should be returned for file size out of range?" -# endif +#else +#error "What status should be returned for file size out of range?" #endif return -1; } @@ -298,8 +288,10 @@ Tcl_Stat( oldStyleBuf->st_atime = buf.st_atime; oldStyleBuf->st_mtime = buf.st_mtime; oldStyleBuf->st_ctime = buf.st_ctime; -#ifdef HAVE_ST_BLOCKS +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE oldStyleBuf->st_blksize = buf.st_blksize; +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS oldStyleBuf->st_blocks = (blkcnt_t) buf.st_blocks; #endif } diff --git a/tests/cmdAH.test b/tests/cmdAH.test index c179eb6..182d43b 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.66 2009/01/08 16:41:34 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.67 2009/12/28 12:55:48 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1295,8 +1295,10 @@ test cmdAH-28.2 {Tcl_FileObjCmd: stat} -returnCodes error -body { } -result {wrong # args: should be "file stat name varName"} test cmdAH-28.3 {Tcl_FileObjCmd: stat} -setup { catch {unset stat} + set stat(blocks) [set stat(blksize) {}] } -body { file stat $gorpfile stat + unset stat(blocks) stat(blksize); # Ignore these fields; not always set lsort [array names stat] } -result {atime ctime dev gid ino mode mtime nlink size type uid} test cmdAH-28.4 {Tcl_FileObjCmd: stat} -setup { diff --git a/unix/configure.in b/unix/configure.in index bbed928..17e35ed 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.208 2009/11/25 14:25:57 stwo Exp $ +# RCS: @(#) $Id: configure.in,v 1.209 2009/12/28 12:55:48 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -278,11 +278,11 @@ fi SC_TIME_HANDLER #-------------------------------------------------------------------- -# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field in struct -# stat. But we might be able to use fstatfs instead. +# Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But +# we might be able to use fstatfs instead. #-------------------------------------------------------------------- -AC_CHECK_MEMBERS([struct stat.st_blksize]) +AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize]) AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])]) #-------------------------------------------------------------------- -- cgit v0.12 From ded8a3b16193d5da03f68f3de98b05521db93b8a Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 28 Dec 2009 12:58:03 +0000 Subject: regen with autconf 2.61 --- unix/configure | 12583 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 6292 insertions(+), 6291 deletions(-) diff --git a/unix/configure b/unix/configure index 2912a33..fee4353 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,185 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX EXE_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +ZLIB_DIR +ZLIB_OBJS +ZLIB_SRCS +ZLIB_INCLUDE +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +LDAIX_SRC +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +EXE_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +DLL_INSTALL_DIR +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +PKG_CFG_ARGS +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +PACKAGE_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +784,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +847,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +912,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +942,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1016,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1078,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1122,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1142,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1181,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1279,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1296,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1362,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1469,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1483,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1505,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1515,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1537,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1548,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1562,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1600,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1633,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1681,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1707,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1720,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1749,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1766,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1790,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1371,24 +1840,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1397,36 +1865,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1449,8 +1918,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1463,32 +1932,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1501,36 +1972,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1543,74 +2029,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1624,7 +2070,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1635,6 +2081,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1652,22 +2099,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1680,36 +2128,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1722,29 +2172,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1757,21 +2223,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1796,47 +2276,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1848,19 +2358,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1879,22 +2391,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1905,9 +2422,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1921,14 +2437,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1948,14 +2464,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1973,12 +2495,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2001,50 +2523,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2060,38 +2581,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2107,12 +2708,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2146,12 +2747,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2166,266 +2772,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2458,8 +2914,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2493,24 +2949,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2519,9 +2973,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2531,24 +2986,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2559,6 +3012,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2576,8 +3030,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2600,24 +3054,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2626,9 +3078,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2638,24 +3091,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2666,6 +3117,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2688,23 +3140,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2728,35 +3327,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2812,6 +3407,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2831,18 +3427,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2855,12 +3460,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2883,9 +3490,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2899,38 +3506,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2942,8 +3546,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2983,39 +3587,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3026,17 +3627,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3047,41 +3648,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3090,24 +3687,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3115,9 +3710,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3141,25 +3737,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3174,17 +3763,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3195,41 +3784,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3238,24 +3823,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3263,9 +3846,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3289,25 +3873,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3322,17 +3899,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3343,41 +3920,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3386,24 +3959,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3411,9 +3982,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3437,25 +4009,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3474,17 +4039,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3495,41 +4060,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3538,24 +4099,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3563,9 +4122,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3589,25 +4149,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3676,17 +4229,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3697,41 +4250,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3740,24 +4289,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3765,9 +4312,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3791,25 +4339,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3866,17 +4407,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3887,41 +4428,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3930,24 +4467,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3955,9 +4490,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3981,25 +4517,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4014,17 +4543,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4035,41 +4564,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4078,24 +4603,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4103,9 +4626,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4129,25 +4653,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4167,18 +4684,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4189,41 +4707,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4232,24 +4746,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4257,9 +4769,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4283,25 +4796,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4321,8 +4828,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4344,39 +4851,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4387,13 +4890,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4425,8 +4928,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4439,56 +4942,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4501,8 +5001,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4515,56 +5015,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4577,8 +5074,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4591,56 +5088,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4651,8 +5145,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4665,56 +5159,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4722,8 +5213,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4736,56 +5227,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4810,9 +5298,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4838,68 +5326,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4912,8 +5392,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4921,15 +5401,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -4941,11 +5421,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4974,8 +5454,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5002,76 +5482,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5088,46 +5559,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5138,8 +5606,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5156,62 +5624,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5222,41 +5687,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5265,24 +5726,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5290,9 +5749,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5316,25 +5776,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5367,8 +5820,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5395,68 +5848,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5464,8 +5908,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5492,73 +5936,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5571,56 +6006,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5633,8 +6065,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5661,68 +6093,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5730,8 +6153,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5758,73 +6181,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5837,56 +6251,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5899,15 +6310,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5917,12 +6328,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5938,17 +6349,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5959,41 +6370,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6002,24 +6409,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6027,9 +6432,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6053,31 +6459,24 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then - echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6089,50 +6488,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +typedef gz_header ac__type_new_; int main () { -if ((gz_header *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (gz_header)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_gz_header=no + ac_cv_type_gz_header=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } if test $ac_cv_type_gz_header = yes; then : else @@ -6147,13 +6543,12 @@ fi if test $zlib_ok = yes; then - echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6161,115 +6556,73 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -deflateSetHeader (); +return deflateSetHeader (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_deflateSetHeader=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_deflateSetHeader" = no; then - for ac_lib in z; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflateSetHeader (); -int -main () -{ -deflateSetHeader (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + : +else + ac_cv_search_deflateSetHeader=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 -if test "$ac_cv_search_deflateSetHeader" != no; then - test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else @@ -6307,8 +6660,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6321,32 +6674,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6359,27 +6714,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6388,31 +6757,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6422,8 +6791,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6447,40 +6816,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6494,24 +6860,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6538,16 +6904,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6560,56 +6926,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6653,8 +7016,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6667,25 +7030,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6717,8 +7082,8 @@ fi CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6797,12 +7162,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6822,8 +7185,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6836,56 +7199,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6917,8 +7277,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6931,56 +7291,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7036,8 +7393,8 @@ fi SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" - echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 -echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 +echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; } if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7050,56 +7407,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_network_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_network_inet_ntoa=no + ac_cv_lib_network_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; } if test $ac_cv_lib_network_inet_ntoa = yes; then LIBS="$LIBS -lnetwork" fi @@ -7129,8 +7483,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7143,56 +7497,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7266,8 +7617,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7280,56 +7631,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7357,12 +7705,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7379,12 +7725,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7421,12 +7765,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7485,8 +7827,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7509,40 +7851,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7631,8 +7970,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7658,8 +7997,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7691,8 +8030,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7718,8 +8057,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7783,8 +8122,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7807,40 +8146,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7849,8 +8185,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7873,40 +8209,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7932,8 +8265,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7956,40 +8289,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8008,8 +8338,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8032,40 +8362,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8092,21 +8419,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8140,35 +8467,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8179,8 +8503,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8196,8 +8520,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8221,42 +8545,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8592,25 +8913,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8621,41 +8942,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8664,24 +8981,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8689,9 +9004,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8715,25 +9031,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8742,8 +9051,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8818,8 +9127,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8842,40 +9151,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8910,13 +9216,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9076,22 +9382,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9101,8 +9407,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -9137,11 +9443,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -9162,8 +9468,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9185,33 +9491,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9228,37 +9529,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9290,33 +9588,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9333,37 +9626,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9395,33 +9685,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9438,37 +9723,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9481,17 +9763,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9514,35 +9796,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9564,34 +9842,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9600,20 +9875,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9635,38 +9910,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9675,8 +9946,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9698,38 +9969,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9743,9 +10010,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9771,68 +10038,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9841,8 +10100,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9864,35 +10123,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9903,11 +10158,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9917,8 +10172,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9935,7 +10190,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9944,27 +10200,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9987,40 +10238,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10030,11 +10277,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10045,27 +10292,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10081,8 +10323,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10090,27 +10334,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10123,13 +10381,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -10158,9 +10419,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10186,68 +10447,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10272,9 +10525,9 @@ done for ac_func in mkstemp opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10300,88 +10553,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10408,68 +10651,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10480,8 +10714,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10508,68 +10742,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10580,8 +10805,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10608,68 +10833,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10680,8 +10896,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10708,68 +10924,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10787,8 +10994,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10815,68 +11022,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10888,8 +11086,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10916,72 +11114,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11009,38 +11198,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11058,8 +11243,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11086,72 +11271,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11182,38 +11358,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11222,8 +11394,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11254,38 +11426,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11305,8 +11473,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11333,72 +11501,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11429,38 +11588,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11469,8 +11624,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11501,38 +11656,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11552,8 +11703,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11580,72 +11731,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11676,38 +11818,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11716,8 +11854,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11748,38 +11886,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11799,8 +11933,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11827,72 +11961,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11923,38 +12048,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11963,8 +12084,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11995,38 +12116,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12079,8 +12196,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12107,72 +12224,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12203,38 +12311,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12243,8 +12347,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12275,38 +12379,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12315,8 +12415,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12345,38 +12445,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12397,8 +12493,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12425,72 +12521,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12524,38 +12611,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12564,8 +12647,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12599,38 +12682,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12664,18 +12743,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12686,41 +12766,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12729,24 +12805,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12754,9 +12828,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12780,25 +12855,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12810,8 +12879,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12839,13 +12908,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12858,8 +12936,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12883,13 +12963,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12902,8 +12991,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12929,13 +13020,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12948,8 +13048,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12977,13 +13079,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12996,8 +13107,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13024,13 +13137,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13043,8 +13165,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13072,13 +13196,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13091,12 +13224,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13126,8 +13261,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13148,42 +13283,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13206,8 +13337,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13234,18 +13365,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13256,41 +13388,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13299,24 +13427,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13324,9 +13450,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13350,25 +13477,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13380,8 +13501,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13405,38 +13526,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13452,9 +13569,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13480,68 +13597,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13551,8 +13660,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13573,38 +13682,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13613,8 +13718,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13635,38 +13740,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13679,8 +13780,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13703,38 +13804,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13745,8 +13842,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13769,38 +13866,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13812,13 +13905,13 @@ _ACEOF #-------------------------------------------------------------------- -# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field in struct -# stat. But we might be able to use fstatfs instead. +# Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But +# we might be able to use fstatfs instead. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 -if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then +{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13832,40 +13925,136 @@ int main () { static struct stat ac_aggr; -if (ac_aggr.st_blksize) +if (ac_aggr.st_blocks) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blocks=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blocks) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blocks=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_blocks=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } +if test $ac_cv_member_struct_stat_st_blocks = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +fi +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_blksize) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13883,40 +14072,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -13926,8 +14112,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13954,68 +14140,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -14032,8 +14209,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14052,9 +14229,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14070,9 +14247,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14080,13 +14257,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14099,17 +14285,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14120,8 +14306,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14148,68 +14334,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14233,8 +14410,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14261,68 +14438,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14330,8 +14498,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14350,13 +14518,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14369,11 +14546,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14381,12 +14560,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14400,8 +14577,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14428,68 +14605,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14497,8 +14665,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14518,13 +14686,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14537,11 +14714,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14549,12 +14728,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14567,8 +14744,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14595,68 +14772,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14664,8 +14832,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14685,13 +14853,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14704,11 +14881,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14716,12 +14895,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14736,8 +14913,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14764,68 +14941,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14833,8 +15001,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14870,13 +15038,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14889,18 +15066,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14918,8 +15095,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14930,50 +15107,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -14984,8 +15158,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14996,50 +15170,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -15050,8 +15221,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15062,62 +15233,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15139,8 +15307,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15155,8 +15323,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15182,38 +15350,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15222,8 +15386,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15234,50 +15398,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15287,8 +15448,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15313,40 +15474,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15357,8 +15514,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15369,50 +15526,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15422,8 +15576,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15449,40 +15603,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15501,8 +15651,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15529,68 +15679,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15610,8 +15751,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15637,39 +15778,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15684,8 +15822,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15712,68 +15850,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15781,8 +15910,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15795,56 +15924,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15853,8 +15979,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15867,56 +15993,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -15925,12 +16048,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15947,8 +16068,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15975,68 +16096,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16045,8 +16157,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16073,68 +16185,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16148,8 +16251,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16172,8 +16275,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16189,8 +16292,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16212,38 +16315,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16251,8 +16350,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16276,38 +16375,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16320,8 +16415,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16356,13 +16451,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16375,11 +16479,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16393,28 +16499,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16425,41 +16531,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16468,24 +16570,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16493,9 +16593,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16519,25 +16620,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16548,8 +16642,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16571,39 +16665,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16612,8 +16702,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16626,9 +16716,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16654,68 +16744,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16729,8 +16811,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16753,39 +16835,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16803,9 +16882,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16831,68 +16910,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16905,18 +16976,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16927,41 +16999,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16970,24 +17038,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16995,9 +17061,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17021,25 +17088,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17055,9 +17116,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17083,68 +17144,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17158,18 +17211,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17180,41 +17234,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17223,24 +17273,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17248,9 +17296,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17274,25 +17323,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17308,9 +17351,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17336,68 +17379,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17410,9 +17445,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17438,68 +17473,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17533,18 +17560,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17555,41 +17583,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17598,24 +17622,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17623,9 +17645,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17649,25 +17672,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17680,8 +17697,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17712,40 +17729,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17753,8 +17767,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 -echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 +echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6; } if test "${tcl_cv_cc_darwin_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17786,39 +17800,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_darwin_c_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_darwin_c_source=no + tcl_cv_cc_darwin_c_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 -echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 +echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6; } if test $tcl_cv_cc_darwin_c_source = yes; then cat >>confdefs.h <<\_ACEOF @@ -17839,8 +17849,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17869,39 +17879,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17921,18 +17928,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17943,41 +17951,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17986,24 +17990,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18011,9 +18013,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18037,25 +18040,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18071,18 +18068,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18093,41 +18091,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18136,24 +18130,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18161,9 +18153,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18187,25 +18180,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18218,8 +18205,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18246,12 +18233,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18264,8 +18251,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18273,27 +18260,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18301,8 +18288,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18310,24 +18297,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18351,8 +18338,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18365,8 +18352,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18374,26 +18361,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18404,41 +18391,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18447,24 +18430,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18472,9 +18453,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18498,25 +18480,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18530,8 +18505,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18547,31 +18522,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18595,8 +18571,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18625,15 +18601,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18647,16 +18623,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18668,7 +18644,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18681,7 +18657,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -18859,7 +18835,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18879,39 +18855,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -18920,52 +18915,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -18994,17 +18973,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19014,8 +19021,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -19029,18 +19071,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19048,159 +19091,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19209,7 +19213,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19218,31 +19243,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19250,30 +19258,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19281,7 +19278,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19295,18 +19292,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19317,60 +19316,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19386,41 +19367,53 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19431,531 +19424,539 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@ZLIB_DIR@,$ZLIB_DIR,;t t -s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t -s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t -s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@LDAIX_SRC@,$LDAIX_SRC,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@EXE_SUFFIX@,$EXE_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +ZLIB_DIR!$ZLIB_DIR$ac_delim +ZLIB_OBJS!$ZLIB_OBJS$ac_delim +ZLIB_SRCS!$ZLIB_SRCS$ac_delim +ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +LDAIX_SRC!$LDAIX_SRC$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +EXE_SUFFIX!$EXE_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +DLL_INSTALL_DIR!$DLL_INSTALL_DIR$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +PACKAGE_DIR!$PACKAGE_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 4f253f35d890f5474c5652070916df0cee97a89b Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 28 Dec 2009 14:15:20 +0000 Subject: [FRQ 1083288]: Added targets to allow easier tracing of shell/test invokations --- ChangeLog | 3 +++ unix/Makefile.in | 45 +++++++++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index e07be42..02203eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-12-28 Donal K. Fellows + * unix/Makefile.in (trace-shell, trace-test): [FRQ 1083288]: Added + targets to allow easier tracing of shell and test invokations. + * unix/configure.in: [Bug 942170]: Detect the st_blocks field of * generic/tclCmdAH.c (StoreStatData): 'struct stat' correctly. * generic/tclFileName.c (Tcl_GetBlocksFromStat): diff --git a/unix/Makefile.in b/unix/Makefile.in index 7406937..81fb07b 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.287 2009/12/23 07:10:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.288 2009/12/28 14:15:20 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -166,6 +166,7 @@ INSTALL_DATA = ${INSTALL} -m 644 # normal build although it can be required to run make dist. EXE_SUFFIX = @EXE_SUFFIX@ TCL_EXE = tclsh${EXE_SUFFIX} +TCLTEST_EXE = tcltest${EXE_SUFFIX} # The symbols below provide support for dynamic loading and shared libraries. # See configure.in for a description of what the symbols mean. The values of @@ -260,6 +261,10 @@ INSTALL_TZDATA = @INSTALL_TZDATA@ GDB = gdb DDD = ddd +TRACE = strace +TRACE_OPTS = +VALGRIND = valgrind +VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v #-------------------------------------------------------------------------- # The information below should be usable as is. The configure script won't @@ -625,7 +630,7 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in clean: clean-packages rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ - errors ${TCL_EXE} tcltest${EXE_SUFFIX} lib.exp Tcl @DTRACE_HDR@ + errors ${TCL_EXE} ${TCLTEST_EXE} lib.exp Tcl @DTRACE_HDR@ cd dltest ; $(MAKE) clean distclean: distclean-packages clean @@ -660,12 +665,12 @@ SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \ TCLLIBPATH="@abs_builddir@/pkgs" \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}" -tcltest${EXE_SUFFIX}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} +${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" tcltest-real: ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ - ${CC_SEARCH_FLAGS} -o tcltest${EXE_SUFFIX} + ${CC_SEARCH_FLAGS} -o ${TCLTEST_EXE} # Note, in the targets below TCL_LIBRARY needs to be set or else "make test" # won't work in the case where the compilation directory isn't the same as the @@ -677,24 +682,24 @@ tcltest-real: test: test-tcl test-packages -test-tcl: tcltest${EXE_SUFFIX} - $(SHELL_ENV) ./tcltest${EXE_SUFFIX} $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) +test-tcl: ${TCLTEST_EXE} + $(SHELL_ENV) ./${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -gdb-test: tcltest${EXE_SUFFIX} +gdb-test: ${TCLTEST_EXE} @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run @echo "set args $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -singleproc 1" >> gdb.run - $(GDB) ./tcltest${EXE_SUFFIX} --command=gdb.run + $(GDB) ./${TCLTEST_EXE} --command=gdb.run rm gdb.run # Useful target to launch a built tcltest with the proper path,... -runtest: tcltest${EXE_SUFFIX} - $(SHELL_ENV) ./tcltest${EXE_SUFFIX} +runtest: ${TCLTEST_EXE} + $(SHELL_ENV) ./${TCLTEST_EXE} # Useful target for running the test suite with an unwritable current # directory... -ro-test: tcltest${EXE_SUFFIX} - echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./tcltest${EXE_SUFFIX} +ro-test: ${TCLTEST_EXE} + echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./${TCLTEST_EXE} # The following target generates the shared libraries in dltest/ that are used # for testing; they are included as part of the "tcltest" target (via the @@ -722,13 +727,17 @@ gdb: ${TCL_EXE} ddd: ${TCL_EXE} $(SHELL_ENV) $(DDD) ./${TCL_EXE} -VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v - -valgrind: ${TCL_EXE} tcltest${EXE_SUFFIX} - $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tcltest${EXE_SUFFIX} $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) +valgrind: ${TCL_EXE} ${TCLTEST_EXE} + $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) valgrindshell: ${TCL_EXE} - $(SHELL_ENV) valgrind $(VALGRINDARGS) ./${TCL_EXE} $(SCRIPT) + $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCL_EXE} $(SCRIPT) + +trace-shell: ${TCL_EXE} + $(SHELL_ENV) ${TRACE} $(TRACE_OPTS) ./${TCL_EXE} $(SCRIPT) + +trace-test: ${TCLTEST_EXE} + $(SHELL_ENV) ${TRACE} $(TRACE_OPTS) ./${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) #-------------------------------------------------------------------------- # Installation rules @@ -1674,7 +1683,7 @@ test-packages: tcltest packages "@LD_LIBRARY_PATH_VAR@=../..:$${@LD_LIBRARY_PATH_VAR@}" \ "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" \ "TCLLIBPATH=../../pkgs" test \ - "TCLSH_PROG=../../tcltest${EXE_SUFFIX}"; ) \ + "TCLSH_PROG=../../${TCLTEST_EXE}"; ) \ fi; \ fi; \ done -- cgit v0.12 From 59172cf14f46e7f765d6bcce585b735629d1873f Mon Sep 17 00:00:00 2001 From: patthoyts Date: Tue, 29 Dec 2009 01:43:23 +0000 Subject: Handle completely invalid input to the decode methods [Bug 2922555] --- ChangeLog | 5 +++++ generic/tclBinary.c | 5 ++++- tests/binary.test | 21 +++++++++++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02203eb..cf19417 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-29 Pat Thoyts + + * generic/tclBinary.c: Handle completely invalid input to the decode + * tests/binary.test: methods [Bug 2922555]. + 2009-12-28 Donal K. Fellows * unix/Makefile.in (trace-shell, trace-test): [FRQ 1083288]: Added diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 75b3ca2..042cbed 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.58 2009/12/11 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.59 2009/12/29 01:43:23 patthoyts Exp $ */ #include "tclInt.h" @@ -2309,6 +2309,7 @@ BinaryDecodeHex( *cursor++ = UCHAR(value); value = 0; } + if (cut > size) cut = size; Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; @@ -2515,6 +2516,7 @@ BinaryDecodeUu( *cursor++ = (((d[2] - 0x20) & 0x3f) << 6) | (((d[3] - 0x20) & 0x3f)); } + if (cut > size) cut = size; Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; @@ -2620,6 +2622,7 @@ BinaryDecode64( *cursor++ = UCHAR((value >> 8) & 0xff); *cursor++ = UCHAR(value & 0xff); } + if (cut > size) cut = size; Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; diff --git a/tests/binary.test b/tests/binary.test index c01cdde..c6b6941 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: binary.test,v 1.39 2009/02/22 17:45:21 ferrieux Exp $ +# RCS: @(#) $Id: binary.test,v 1.40 2009/12/29 01:43:23 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -2473,6 +2473,9 @@ test binary-71.9 {binary decode hex} -body { set r [binary decode hex "6"] list [string length $r] $r } -result {0 {}} +test binary-71.10 {binary decode hex} -body { + string length [binary decode hex " "] +} -result 0 test binary-72.1 {binary encode base64} -body { binary encode base64 @@ -2621,6 +2624,9 @@ test binary-73.23 {binary decode base64} -body { set r [binary decode base64 YWJj] list [string length $r] $r } -result {3 abc} +test binary-73.24 {binary decode base64} -body { + string length [binary decode base64 " "] +} -result 0 test binary-74.1 {binary encode uuencode} -body { binary encode uuencode @@ -2668,19 +2674,19 @@ test binary-75.3 {binary decode uuencode} -body { test binary-75.4 {binary decode uuencode} -body { binary decode uuencode [string repeat "86)C" 20] } -result [string repeat abc 20] -test binary-75.5 {binary encode uuencode} -body { +test binary-75.5 {binary decode uuencode} -body { binary decode uuencode "``\$\"`P0``0(#" } -result "\0\1\2\3\4\0\1\2\3" -test binary-75.6 {binary encode uuencode} -body { +test binary-75.6 {binary decode uuencode} -body { string length [binary decode uuencode {`}] } -result 0 -test binary-75.7 {binary encode uuencode} -body { +test binary-75.7 {binary decode uuencode} -body { string length [binary decode uuencode {``}] } -result 1 -test binary-75.8 {binary encode uuencode} -body { +test binary-75.8 {binary decode uuencode} -body { string length [binary decode uuencode {```}] } -result 2 -test binary-75.9 {binary encode uuencode} -body { +test binary-75.9 {binary decode uuencode} -body { string length [binary decode uuencode {````}] } -result 3 test binary-75.10 {binary decode uuencode} -body { @@ -2726,6 +2732,9 @@ test binary-75.25 {binary decode uuencode} -body { set s "04)\#z" binary decode uuencode $s } -returnCodes error -match glob -result {invalid uuencode character "z" at position 4} +test binary-75.26 {binary decode uuencode} -body { + string length [binary decode uuencode " "] +} -result 0 # cleanup ::tcltest::cleanupTests -- cgit v0.12 From f529e237b5116ef60425a6cd231f88167ff6bf05 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 29 Dec 2009 14:55:42 +0000 Subject: [Bug 2895741]: Make min() and max() supported in safe interpreters. --- ChangeLog | 5 + generic/tclInterp.c | 19 +- tests/interp.test | 518 +++++++++++++++++++++++++++------------------------- tests/safe.test | 6 +- 4 files changed, 293 insertions(+), 255 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf19417..0e4307e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-29 Donal K. Fellows + + * generic/tclInterp.c (Tcl_MakeSafe): [Bug 2895741]: Make sure that + the min() and max() functions are supported in safe interpreters. + 2009-12-29 Pat Thoyts * generic/tclBinary.c: Handle completely invalid input to the decode diff --git a/generic/tclInterp.c b/generic/tclInterp.c index b724abf..a9adec1 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.109 2009/12/28 09:58:14 dkf Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.110 2009/12/29 14:55:42 dkf Exp $ */ #include "tclInt.h" @@ -2960,9 +2960,26 @@ Tcl_MakeSafe( { Tcl_Channel chan; /* Channel to remove from safe interpreter. */ Interp *iPtr = (Interp *) interp; + Tcl_Interp *master = ((InterpInfo*) iPtr->interpInfo)->slave.masterInterp; TclHideUnsafeCommands(interp); + if (master != NULL) { + /* + * Alias these function implementations in the slave to those in the + * master; the overall implementations are safe, but they're normally + * defined by init.tcl which is not sourced by safe interpreters. + * Assume these functions all work. [Bug 2895741] + */ + + (void) Tcl_Eval(interp, + "namespace eval ::tcl {namespace eval mathfunc {}}"); + (void) Tcl_CreateAlias(interp, "::tcl::mathfunc::min", master, + "::tcl::mathfunc::min", 0, NULL); + (void) Tcl_CreateAlias(interp, "::tcl::mathfunc::max", master, + "::tcl::mathfunc::max", 0, NULL); + } + iPtr->flags |= SAFE_INTERP; /* diff --git a/tests/interp.test b/tests/interp.test index 0499802..45254ad 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.test,v 1.67 2009/12/28 10:01:11 dkf Exp $ +# RCS: @(#) $Id: interp.test,v 1.68 2009/12/29 14:55:42 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -26,40 +26,39 @@ foreach i [interp slaves] { } # Part 0: Check out options for interp command -test interp-1.1 {options for interp command} { - list [catch {interp} msg] $msg -} {1 {wrong # args: should be "interp cmd ?arg ...?"}} -test interp-1.2 {options for interp command} { - list [catch {interp frobox} msg] $msg -} {1 {bad option "frobox": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} +test interp-1.1 {options for interp command} -returnCodes error -body { + interp +} -result {wrong # args: should be "interp cmd ?arg ...?"} +test interp-1.2 {options for interp command} -returnCodes error -body { + interp frobox +} -result {bad option "frobox": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer} test interp-1.3 {options for interp command} { interp delete } "" -test interp-1.4 {options for interp command} { - list [catch {interp delete foo bar} msg] $msg -} {1 {could not find interpreter "foo"}} -test interp-1.5 {options for interp command} { - list [catch {interp exists foo bar} msg] $msg -} {1 {wrong # args: should be "interp exists ?path?"}} +test interp-1.4 {options for interp command} -returnCodes error -body { + interp delete foo bar +} -result {could not find interpreter "foo"} +test interp-1.5 {options for interp command} -returnCodes error -body { + interp exists foo bar +} -result {wrong # args: should be "interp exists ?path?"} # # test interp-0.6 was removed # -test interp-1.6 {options for interp command} { - list [catch {interp slaves foo bar zop} msg] $msg -} {1 {wrong # args: should be "interp slaves ?path?"}} -test interp-1.7 {options for interp command} { - list [catch {interp hello} msg] $msg -} {1 {bad option "hello": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.8 {options for interp command} { - list [catch {interp -froboz} msg] $msg -} {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.9 {options for interp command} { - list [catch {interp -froboz -safe} msg] $msg -} {1 {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer}} -test interp-1.10 {options for interp command} { - list [catch {interp target} msg] $msg -} {1 {wrong # args: should be "interp target path alias"}} - +test interp-1.6 {options for interp command} -returnCodes error -body { + interp slaves foo bar zop +} -result {wrong # args: should be "interp slaves ?path?"} +test interp-1.7 {options for interp command} -returnCodes error -body { + interp hello +} -result {bad option "hello": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer} +test interp-1.8 {options for interp command} -returnCodes error -body { + interp -froboz +} -result {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer} +test interp-1.9 {options for interp command} -returnCodes error -body { + interp -froboz -safe +} -result {bad option "-froboz": must be alias, aliases, bgerror, cancel, create, delete, eval, exists, expose, hide, hidden, issafe, invokehidden, limit, marktrusted, recursionlimit, slaves, share, target, or transfer} +test interp-1.10 {options for interp command} -returnCodes error -body { + interp target +} -result {wrong # args: should be "interp target path alias"} # Part 1: Basic interpreter creation tests: test interp-2.1 {basic interpreter creation} { @@ -111,11 +110,11 @@ test interp-2.12 {anonymous interps vs existing procs} { set x [interp create -safe] regexp "interp(\[0-9]+)" $x dummy anothernum expr $anothernum - $thenum -} 1 +} 1 test interp-2.13 {correct default when no $path arg is given} -body { interp create -- } -match regexp -result {interp[0-9]+} - + foreach i [interp slaves] { interp delete $i } @@ -131,21 +130,21 @@ test interp-3.2 {testing interp exists and interp slaves} { test interp-3.3 {testing interp exists and interp slaves} { interp exists nonexistent } 0 -test interp-3.4 {testing interp exists and interp slaves} { - list [catch {interp slaves a b c} msg] $msg -} {1 {wrong # args: should be "interp slaves ?path?"}} -test interp-3.5 {testing interp exists and interp slaves} { - list [catch {interp exists a b c} msg] $msg -} {1 {wrong # args: should be "interp exists ?path?"}} +test interp-3.4 {testing interp exists and interp slaves} -body { + interp slaves a b c +} -returnCodes error -result {wrong # args: should be "interp slaves ?path?"} +test interp-3.5 {testing interp exists and interp slaves} -body { + interp exists a b c +} -returnCodes error -result {wrong # args: should be "interp exists ?path?"} test interp-3.6 {testing interp exists and interp slaves} { interp exists } 1 test interp-3.7 {testing interp exists and interp slaves} { interp slaves } a -test interp-3.8 {testing interp exists and interp slaves} { - list [catch {interp slaves a b c} msg] $msg -} {1 {wrong # args: should be "interp slaves ?path?"}} +test interp-3.8 {testing interp exists and interp slaves} -body { + interp slaves a b c +} -returnCodes error -result {wrong # args: should be "interp slaves ?path?"} test interp-3.9 {testing interp exists and interp slaves} { interp create {a a2} -safe expr {[lsearch [interp slaves a] a2] >= 0} @@ -162,12 +161,12 @@ test interp-4.1 {testing interp delete} { catch {interp create a} interp delete a } "" -test interp-4.2 {testing interp delete} { - list [catch {interp delete nonexistent} msg] $msg -} {1 {could not find interpreter "nonexistent"}} -test interp-4.3 {testing interp delete} { - list [catch {interp delete x y z} msg] $msg -} {1 {could not find interpreter "x"}} +test interp-4.2 {testing interp delete} -returnCodes error -body { + interp delete nonexistent +} -result {could not find interpreter "nonexistent"} +test interp-4.3 {testing interp delete} -returnCodes error -body { + interp delete x y z +} -result {could not find interpreter "x"} test interp-4.4 {testing interp delete} { interp delete } "" @@ -183,14 +182,14 @@ test interp-4.6 {testing interp delete} { interp create c3 interp delete c1 c2 c3 } "" -test interp-4.7 {testing interp delete} { +test interp-4.7 {testing interp delete} -returnCodes error -body { interp create c1 interp create c2 - list [catch {interp delete c1 c2 c3} msg] $msg -} {1 {could not find interpreter "c3"}} -test interp-4.8 {testing interp delete} { - list [catch {interp delete {}} msg] $msg -} {1 {cannot delete the current interpreter}} + interp delete c1 c2 c3 +} -result {could not find interpreter "c3"} +test interp-4.8 {testing interp delete} -returnCodes error -body { + interp delete {} +} -result {cannot delete the current interpreter} foreach i [interp slaves] { interp delete $i @@ -215,9 +214,9 @@ interp create a test interp-6.1 {testing eval} { a eval expr 3 + 5 } 8 -test interp-6.2 {testing eval} { - list [catch {a eval foo} msg] $msg -} {1 {invalid command name "foo"}} +test interp-6.2 {testing eval} -returnCodes error -body { + a eval foo +} -result {invalid command name "foo"} test interp-6.3 {testing eval} { a eval {proc foo {} {expr 3 + 5}} a eval foo @@ -225,15 +224,14 @@ test interp-6.3 {testing eval} { test interp-6.4 {testing eval} { interp eval a foo } 8 - test interp-6.5 {testing eval} { interp create {a x2} interp eval {a x2} {proc frob {} {expr 4 * 9}} interp eval {a x2} frob } 36 -test interp-6.6 {testing eval} { - list [catch {interp eval {a x2} foo} msg] $msg -} {1 {invalid command name "foo"}} +test interp-6.6 {testing eval} -returnCodes error -body { + interp eval {a x2} foo +} -result {invalid command name "foo"} # UTILITY PROCEDURE RUNNING IN MASTER INTERPRETER: proc in_master {args} { @@ -257,9 +255,9 @@ test interp-7.4 {testing basic alias creation} { test interp-7.5 {testing basic alias creation} { lsort [a aliases] } {bar foo} -test interp-7.6 {testing basic aliases arg checking} { - list [catch {a aliases too many args} msg] $msg -} {1 {wrong # args: should be "a aliases"}} +test interp-7.6 {testing basic aliases arg checking} -returnCodes error -body { + a aliases too many args +} -result {wrong # args: should be "a aliases"} # Part 7: testing basic alias invocation test interp-8.1 {testing basic alias invocation} { @@ -272,10 +270,10 @@ test interp-8.2 {testing basic alias invocation} { a alias bar in_master a1 a2 a3 a eval bar s1 s2 s3 } {seen in master: {a1 a2 a3 s1 s2 s3}} -test interp-8.3 {testing basic alias invocation} { +test interp-8.3 {testing basic alias invocation} -returnCodes error -body { catch {interp create a} - list [catch {a alias} msg] $msg -} {1 {wrong # args: should be "a alias aliasName ?targetName? ?arg ...?"}} + a alias +} -result {wrong # args: should be "a alias aliasName ?targetName? ?arg ...?"} # Part 8: Testing aliases for non-existent or hidden targets test interp-9.1 {testing aliases for non-existent targets} { @@ -1798,11 +1796,11 @@ test interp-23.2 {testing hiding vs aliases} {unixOrPc} { lappend l [lsort [interp aliases a]] lappend l [lsort [interp hidden a]] a alias bar {} - lappend l [interp aliases a] + lappend l [lsort [interp aliases a]] lappend l [lsort [interp hidden a]] interp delete a set l -} {{cd encoding exec exit fconfigure file glob load open pwd socket source unload} {bar clock} {cd encoding exec exit fconfigure file glob load open pwd socket source unload} {bar clock} {bar cd encoding exec exit fconfigure file glob load open pwd socket source unload} clock {cd encoding exec exit fconfigure file glob load open pwd socket source unload}} +} {{cd encoding exec exit fconfigure file glob load open pwd socket source unload} {::tcl::mathfunc::max ::tcl::mathfunc::min bar clock} {cd encoding exec exit fconfigure file glob load open pwd socket source unload} {::tcl::mathfunc::max ::tcl::mathfunc::min bar clock} {bar cd encoding exec exit fconfigure file glob load open pwd socket source unload} {::tcl::mathfunc::max ::tcl::mathfunc::min clock} {cd encoding exec exit fconfigure file glob load open pwd socket source unload}} test interp-24.1 {result resetting on error} { catch {interp delete a} @@ -2068,9 +2066,9 @@ test interp-26.2 {result code transmission : interp eval indirect} { set res } {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5} test interp-26.3 {result code transmission : aliases} { - # Test that all the possibles error codes from Tcl get passed up - # from the slave interp's context to the master, even though the - # slave nominally thinks the command is running at the root level. + # Test that all the possibles error codes from Tcl get passed up from the + # slave interp's context to the master, even though the slave nominally + # thinks the command is running at the root level. catch {interp delete a} interp create a set res {} @@ -2097,34 +2095,35 @@ test interp-26.4 {result code transmission: invoke hidden direct--bug 1637} \ interp delete a set res } {-1 0 1 2 3 4 5} -test interp-26.5 {result code transmission: invoke hidden indirect--bug 1637} \ - {knownBug} { - # The known bug is that the break and continue should raise errors - # that they are used outside a loop. +test interp-26.5 {result code transmission: invoke hidden indirect--bug 1637} -setup { catch {interp delete a} interp create a +} -body { + # The known bug is that the break and continue should raise errors that + # they are used outside a loop. set res {} interp eval a {proc retcode {code} {return -code $code ret$code}} interp hide a retcode for {set code -1} {$code<=5} {incr code} { lappend res [catch {interp invokehidden a retcode $code} msg] $msg } + return $res +} -cleanup { interp delete a - set res -} {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5} -test interp-26.6 {result code transmission: all combined--bug 1637} \ - {knownBug} { - # Test that all the possibles error codes from Tcl get passed - # In both directions. This doesn't work. - set interp [interp create]; +} -result {-1 ret-1 0 ret0 1 ret1 2 ret2 3 ret3 4 ret4 5 ret5} +test interp-26.6 {result code transmission: all combined--bug 1637} -setup { + set interp [interp create] +} -constraints knownBug -body { + # Test that all the possibles error codes from Tcl get passed in both + # directions. This doesn't work. proc MyTestAlias {interp args} { - global aliasTrace; - lappend aliasTrace $args; + global aliasTrace + lappend aliasTrace $args interp invokehidden $interp {*}$args } foreach c {return} { - interp hide $interp $c; - interp alias $interp $c {} MyTestAlias $interp $c; + interp hide $interp $c + interp alias $interp $c {} MyTestAlias $interp $c } interp eval $interp {proc ret {code} {return -code $code ret$code}} set res {} @@ -2132,224 +2131,229 @@ test interp-26.6 {result code transmission: all combined--bug 1637} \ for {set code -1} {$code<=5} {incr code} { lappend res [catch {interp eval $interp ret $code} msg] $msg } - interp delete $interp; - set res -} {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5} -# Some tests might need to be added to check for difference between -# toplevel and non toplevel evals. + return $res +} -cleanup { + interp delete $interp +} -result {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5} +# Some tests might need to be added to check for difference between toplevel +# and non-toplevel evals. # End of return code transmission section -test interp-26.7 {errorInfo transmission: regular interps} { - set interp [interp create]; +test interp-26.7 {errorInfo transmission: regular interps} -setup { + set interp [interp create] +} -body { proc MyError {secret} { return -code error "msg" } proc MyTestAlias {interp args} { MyError "some secret" } - interp alias $interp test {} MyTestAlias $interp; - set res [interp eval $interp {catch test;set ::errorInfo}] - interp delete $interp; - set res -} {msg + interp alias $interp test {} MyTestAlias $interp + interp eval $interp {catch test;set ::errorInfo} +} -cleanup { + interp delete $interp +} -result {msg while executing "MyError "some secret"" (procedure "MyTestAlias" line 2) invoked from within "test"} -test interp-26.8 {errorInfo transmission: safe interps--bug 1637} {knownBug} { - # this test fails because the errorInfo is fully transmitted - # whether the interp is safe or not. The errorInfo should never - # report data from the master interpreter because it could - # contain sensitive information. - set interp [interp create -safe]; +test interp-26.8 {errorInfo transmission: safe interps--bug 1637} -setup { + set interp [interp create -safe] +} -constraints knownBug -body { + # this test fails because the errorInfo is fully transmitted whether the + # interp is safe or not. The errorInfo should never report data from the + # master interpreter because it could contain sensitive information. proc MyError {secret} { return -code error "msg" } proc MyTestAlias {interp args} { MyError "some secret" } - interp alias $interp test {} MyTestAlias $interp; - set res [interp eval $interp {catch test;set ::errorInfo}] - interp delete $interp; - set res -} {msg + interp alias $interp test {} MyTestAlias $interp + interp eval $interp {catch test;set ::errorInfo} +} -cleanup { + interp delete $interp +} -result {msg while executing "test"} # Interps & Namespaces -test interp-27.1 {interp aliases & namespaces} { - set i [interp create]; - set aliasTrace {}; +test interp-27.1 {interp aliases & namespaces} -setup { + set i [interp create] +} -body { + set aliasTrace {} proc tstAlias {args} { - global aliasTrace; - lappend aliasTrace [list [namespace current] $args]; + global aliasTrace + lappend aliasTrace [list [namespace current] $args] } - $i alias foo::bar tstAlias foo::bar; + $i alias foo::bar tstAlias foo::bar $i eval foo::bar test + return $aliasTrace +} -cleanup { interp delete $i - set aliasTrace; -} {{:: {foo::bar test}}} -test interp-27.2 {interp aliases & namespaces} { - set i [interp create]; - set aliasTrace {}; +} -result {{:: {foo::bar test}}} +test interp-27.2 {interp aliases & namespaces} -setup { + set i [interp create] +} -body { + set aliasTrace {} proc tstAlias {args} { - global aliasTrace; - lappend aliasTrace [list [namespace current] $args]; + global aliasTrace + lappend aliasTrace [list [namespace current] $args] } - $i alias foo::bar tstAlias foo::bar; + $i alias foo::bar tstAlias foo::bar $i eval namespace eval foo {bar test} + return $aliasTrace +} -cleanup { interp delete $i - set aliasTrace; -} {{:: {foo::bar test}}} -test interp-27.3 {interp aliases & namespaces} { - set i [interp create]; - set aliasTrace {}; +} -result {{:: {foo::bar test}}} +test interp-27.3 {interp aliases & namespaces} -setup { + set i [interp create] +} -body { + set aliasTrace {} proc tstAlias {args} { - global aliasTrace; - lappend aliasTrace [list [namespace current] $args]; + global aliasTrace + lappend aliasTrace [list [namespace current] $args] } interp eval $i {namespace eval foo {proc bar {} {error "bar called"}}} - interp alias $i foo::bar {} tstAlias foo::bar; + interp alias $i foo::bar {} tstAlias foo::bar interp eval $i {namespace eval foo {bar test}} + return $aliasTrace +} -cleanup { interp delete $i - set aliasTrace; -} {{:: {foo::bar test}}} -test interp-27.4 {interp aliases & namespaces} { - set i [interp create]; +} -result {{:: {foo::bar test}}} +test interp-27.4 {interp aliases & namespaces} -setup { + set i [interp create] +} -body { namespace eval foo2 { - variable aliasTrace {}; + variable aliasTrace {} proc bar {args} { - variable aliasTrace; - lappend aliasTrace [list [namespace current] $args]; + variable aliasTrace + lappend aliasTrace [list [namespace current] $args] } } - $i alias foo::bar foo2::bar foo::bar; + $i alias foo::bar foo2::bar foo::bar $i eval namespace eval foo {bar test} - set r $foo2::aliasTrace; - namespace delete foo2; - set r -} {{::foo2 {foo::bar test}}} - -# the following tests are commented out while we don't support -# hiding in namespaces - -# test interp-27.5 {interp hidden & namespaces} { -# set i [interp create]; -# interp eval $i { -# namespace eval foo { -# proc bar {args} { -# return "bar called ([namespace current]) ($args)" -# } -# } -# } -# set res [list [interp eval $i {namespace eval foo {bar test1}}]] -# interp hide $i foo::bar; -# lappend res [list [catch {interp eval $i {namespace eval foo {bar test2}}} msg] $msg] -# interp delete $i; -# set res; -#} {{bar called (::foo) (test1)} {1 {invalid command name "bar"}}} - -# test interp-27.6 {interp hidden & aliases & namespaces} { -# set i [interp create]; -# set v root-master; -# namespace eval foo { -# variable v foo-master; -# proc bar {interp args} { -# variable v; -# list "master bar called ($v) ([namespace current]) ($args)"\ -# [interp invokehidden $interp foo::bar $args]; -# } -# } -# interp eval $i { -# namespace eval foo { -# namespace export * -# variable v foo-slave; -# proc bar {args} { -# variable v; -# return "slave bar called ($v) ([namespace current]) ($args)" -# } -# } -# } -# set res [list [interp eval $i {namespace eval foo {bar test1}}]] -# $i hide foo::bar; -# $i alias foo::bar foo::bar $i; -# set res [concat $res [interp eval $i { -# set v root-slave; -# namespace eval test { -# variable v foo-test; -# namespace import ::foo::*; -# bar test2 -# } -# }]] -# namespace delete foo; -# interp delete $i; -# set res -# } {{slave bar called (foo-slave) (::foo) (test1)} {master bar called (foo-master) (::foo) (test2)} {slave bar called (foo-slave) (::foo) (test2)}} - - -# test interp-27.7 {interp hidden & aliases & imports & namespaces} { -# set i [interp create]; -# set v root-master; -# namespace eval mfoo { -# variable v foo-master; -# proc bar {interp args} { -# variable v; -# list "master bar called ($v) ([namespace current]) ($args)"\ -# [interp invokehidden $interp test::bar $args]; -# } -# } -# interp eval $i { -# namespace eval foo { -# namespace export * -# variable v foo-slave; -# proc bar {args} { -# variable v; -# return "slave bar called ($v) ([info level 0]) ([uplevel namespace current]) ([namespace current]) ($args)" -# } -# } -# set v root-slave; -# namespace eval test { -# variable v foo-test; -# namespace import ::foo::*; -# } -# } -# set res [list [interp eval $i {namespace eval test {bar test1}}]] -# $i hide test::bar; -# $i alias test::bar mfoo::bar $i; -# set res [concat $res [interp eval $i {test::bar test2}]]; -# namespace delete mfoo; -# interp delete $i; -# set res -# } {{slave bar called (foo-slave) (bar test1) (::tcltest) (::foo) (test1)} {master bar called (foo-master) (::mfoo) (test2)} {slave bar called (foo-slave) (test::bar test2) (::) (::foo) (test2)}} - -#test interp-27.8 {hiding, namespaces and integrity} { -# namespace eval foo { -# variable v 3; -# proc bar {} {variable v; set v} -# # next command would currently generate an unknown command "bar" error. -# interp hide {} bar; -# } -# namespace delete foo; -# list [catch {interp invokehidden {} foo} msg] $msg; -#} {1 {invalid hidden command name "foo"}} + return $foo2::aliasTrace +} -cleanup { + namespace delete foo2 + interp delete $i +} -result {{::foo2 {foo::bar test}}} +test interp-27.5 {interp hidden & namespaces} -setup { + set i [interp create] +} -constraints knownBug -body { + interp eval $i { + namespace eval foo { + proc bar {args} { + return "bar called ([namespace current]) ($args)" + } + } + } + set res [list [interp eval $i {namespace eval foo {bar test1}}]] + interp hide $i foo::bar + lappend res [list [catch {interp eval $i {namespace eval foo {bar test2}}} msg] $msg] +} -cleanup { + interp delete $i +} -result {{bar called (::foo) (test1)} {1 {invalid command name "bar"}}} +test interp-27.6 {interp hidden & aliases & namespaces} -setup { + set i [interp create] +} -constraints knownBug -body { + set v root-master + namespace eval foo { + variable v foo-master + proc bar {interp args} { + variable v + list "master bar called ($v) ([namespace current]) ($args)"\ + [interp invokehidden $interp foo::bar $args] + } + } + interp eval $i { + namespace eval foo { + namespace export * + variable v foo-slave + proc bar {args} { + variable v + return "slave bar called ($v) ([namespace current]) ($args)" + } + } + } + set res [list [interp eval $i {namespace eval foo {bar test1}}]] + $i hide foo::bar + $i alias foo::bar foo::bar $i + set res [concat $res [interp eval $i { + set v root-slave + namespace eval test { + variable v foo-test + namespace import ::foo::* + bar test2 + } + }]] +} -cleanup { + namespace delete foo + interp delete $i +} -result {{slave bar called (foo-slave) (::foo) (test1)} {master bar called (foo-master) (::foo) (test2)} {slave bar called (foo-slave) (::foo) (test2)}} +test interp-27.7 {interp hidden & aliases & imports & namespaces} -setup { + set i [interp create] +} -constraints knownBug -body { + set v root-master + namespace eval mfoo { + variable v foo-master + proc bar {interp args} { + variable v + list "master bar called ($v) ([namespace current]) ($args)"\ + [interp invokehidden $interp test::bar $args] + } + } + interp eval $i { + namespace eval foo { + namespace export * + variable v foo-slave + proc bar {args} { + variable v + return "slave bar called ($v) ([info level 0]) ([uplevel namespace current]) ([namespace current]) ($args)" + } + } + set v root-slave + namespace eval test { + variable v foo-test + namespace import ::foo::* + } + } + set res [list [interp eval $i {namespace eval test {bar test1}}]] + $i hide test::bar + $i alias test::bar mfoo::bar $i + set res [concat $res [interp eval $i {test::bar test2}]] +} -cleanup { + namespace delete mfoo + interp delete $i +} -result {{slave bar called (foo-slave) (bar test1) (::tcltest) (::foo) (test1)} {master bar called (foo-master) (::mfoo) (test2)} {slave bar called (foo-slave) (test::bar test2) (::) (::foo) (test2)}} +test interp-27.8 {hiding, namespaces and integrity} knownBug { + namespace eval foo { + variable v 3 + proc bar {} {variable v; set v} + # next command would currently generate an unknown command "bar" error. + interp hide {} bar + } + namespace delete foo + list [catch {interp invokehidden {} foo::bar} msg] $msg +} {1 {invalid hidden command name "foo"}} test interp-28.1 {getting fooled by slave's namespace ?} -setup { - set i [interp create -safe]; + set i [interp create -safe] proc master {interp args} {interp hide $interp list} } -body { - $i alias master master $i; + $i alias master master $i set r [interp eval $i { namespace eval foo { proc list {args} { - return "dummy foo::list"; + return "dummy foo::list" } - master; + master } info commands list }] } -cleanup { rename master {} - interp delete $i; + interp delete $i } -result {} test interp-28.2 {master's nsName cache should not cross} -setup { set i [interp create] @@ -3557,7 +3561,6 @@ test interp-36.6 {SlaveBgerror returns handler} -setup { } -cleanup { interp delete slave } -result {foo bar soom} - test interp-36.7 {SlaveBgerror sets error handler of slave [1999035]} -setup { interp create slave slave alias handler handler @@ -3580,6 +3583,19 @@ test interp-36.7 {SlaveBgerror sets error handler of slave [1999035]} -setup { unset result interp delete slave } -result foo + +test interp-37.1 {safe interps and min() and max(): Bug 2895741} -setup { + catch {interp delete a} + interp create a + set result {} +} -body { + interp create {a b} -safe + lappend result [interp eval a {expr min(5,2,3)*max(7,13,11)}] + lappend result [interp eval {a b} {expr min(5,2,3)*max(7,13,11)}] +} -cleanup { + unset result + interp delete a +} -result {26 26} # cleanup foreach i [interp slaves] { diff --git a/tests/safe.test b/tests/safe.test index c58c7b7..223559a 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.30 2009/12/28 12:50:43 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.31 2009/12/29 14:55:42 dkf Exp $ package require Tcl 8.5 @@ -70,10 +70,10 @@ test safe-2.3 {creating safe interpreters, should have no unexpected aliases} -s catch {safe::interpDelete a} } -body { interp create a -safe - a aliases + lsort [a aliases] } -cleanup { interp delete a -} -result {clock} +} -result {::tcl::mathfunc::max ::tcl::mathfunc::min clock} test safe-3.1 {calling safe::interpInit is safe} -setup { catch {safe::interpDelete a} -- cgit v0.12 From 9f8ac71040a91b045d4d51b21a7539e889e53638 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 29 Dec 2009 16:54:44 +0000 Subject: Simplify the logic in Tcl_GetCommandFromObj --- ChangeLog | 4 + generic/tclObj.c | 393 +++++++++++++++++++++++++++++-------------------------- 2 files changed, 212 insertions(+), 185 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e4307e..2b51700 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-12-29 Donal K. Fellows + * generic/tclObj.c (Tcl_GetCommandFromObj): Rewrite the logic so + that it does not require making assignments part way through an + 'if' condition, which was deeply unclear. + * generic/tclInterp.c (Tcl_MakeSafe): [Bug 2895741]: Make sure that the min() and max() functions are supported in safe interpreters. diff --git a/generic/tclObj.c b/generic/tclObj.c index 667fd90..28d7a8a 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.165 2009/12/10 19:13:26 andreas_kupries Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.166 2009/12/29 16:54:44 dkf Exp $ */ #include "tclInt.h" @@ -80,33 +80,29 @@ typedef struct ObjData { */ typedef struct ThreadSpecificData { - Tcl_HashTable* lineCLPtr; /* This table remembers for each Tcl_Obj - * generated by a call to the function - * EvalTokensStandard() from a literal text - * where bs+nl sequences occured in it, if - * any. I.e. this table keeps track of - * invisible/stripped continuation lines. Its - * keys are Tcl_Obj pointers, the values are - * ContLineLoc pointers. See the file - * tclCompile.h for the definition of this - * structure, and for references to all related - * places in the core. - */ + Tcl_HashTable *lineCLPtr; /* This table remembers for each Tcl_Obj + * generated by a call to the function + * EvalTokensStandard() from a literal text + * where bs+nl sequences occured in it, if + * any. I.e. this table keeps track of + * invisible and stripped continuation lines. + * Its keys are Tcl_Obj pointers, the values + * are ContLineLoc pointers. See the file + * tclCompile.h for the definition of this + * structure, and for references to all + * related places in the core. */ #if defined(TCL_MEM_DEBUG) && defined(TCL_THREADS) - /* - * Thread local table that is used to check that a Tcl_Obj was not - * allocated by some other thread. - */ - - Tcl_HashTable *objThreadMap; + Tcl_HashTable *objThreadMap;/* Thread local table that is used to check + * that a Tcl_Obj was not allocated by some + * other thread. */ #endif /* TCL_MEM_DEBUG && TCL_THREADS */ } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; -static void ContLineLocFree (char* clientData); -static void TclThreadFinalizeContLines (ClientData clientData); -static ThreadSpecificData* TclGetContLineTable (void); +static void ContLineLocFree(char *clientData); +static void TclThreadFinalizeContLines(ClientData clientData); +static ThreadSpecificData *TclGetContLineTable(void); /* * Nested Tcl_Obj deletion management support @@ -155,11 +151,11 @@ typedef struct PendingObjData { #define ObjOnStack(contextPtr) ((contextPtr)->deletionStack != NULL) #define PushObjToDelete(contextPtr,objPtr) \ /* The string rep is already invalidated so we can use the bytes value \ - * for our pointer chain: push onto the head of the stack. */ \ - (objPtr)->bytes = (char *) ((contextPtr)->deletionStack); \ + * for our pointer chain: push onto the head of the stack. */ \ + (objPtr)->bytes = (char *) ((contextPtr)->deletionStack); \ (contextPtr)->deletionStack = (objPtr) #define PopObjToDelete(contextPtr,objPtrVar) \ - (objPtrVar) = (contextPtr)->deletionStack; \ + (objPtrVar) = (contextPtr)->deletionStack; \ (contextPtr)->deletionStack = (Tcl_Obj *) (objPtrVar)->bytes /* @@ -172,7 +168,7 @@ static PendingObjData pendingObjData; #else static Tcl_ThreadDataKey pendingObjDataKey; #define ObjInitDeletionContext(contextPtr) \ - PendingObjData *const contextPtr = (PendingObjData *) \ + PendingObjData *const contextPtr = \ Tcl_GetThreadData(&pendingObjDataKey, sizeof(PendingObjData)) #endif @@ -181,27 +177,27 @@ static Tcl_ThreadDataKey pendingObjDataKey; */ #define PACK_BIGNUM(bignum, objPtr) \ - if ((bignum).used > 0x7fff) { \ - mp_int *temp = (void *) ckalloc((unsigned) sizeof(mp_int)); \ - *temp = bignum; \ - (objPtr)->internalRep.ptrAndLongRep.ptr = temp; \ + if ((bignum).used > 0x7fff) { \ + mp_int *temp = (void *) ckalloc((unsigned) sizeof(mp_int)); \ + *temp = bignum; \ + (objPtr)->internalRep.ptrAndLongRep.ptr = temp; \ (objPtr)->internalRep.ptrAndLongRep.value = (unsigned long)(-1); \ - } else { \ - if ((bignum).alloc > 0x7fff) { \ - mp_shrink(&(bignum)); \ - } \ + } else { \ + if ((bignum).alloc > 0x7fff) { \ + mp_shrink(&(bignum)); \ + } \ (objPtr)->internalRep.ptrAndLongRep.ptr = (void *) (bignum).dp; \ (objPtr)->internalRep.ptrAndLongRep.value = ( ((bignum).sign << 30) \ - | ((bignum).alloc << 15) | ((bignum).used)); \ + | ((bignum).alloc << 15) | ((bignum).used)); \ } #define UNPACK_BIGNUM(objPtr, bignum) \ if ((objPtr)->internalRep.ptrAndLongRep.value == (unsigned long)(-1)) { \ (bignum) = *((mp_int *) ((objPtr)->internalRep.ptrAndLongRep.ptr)); \ - } else { \ - (bignum).dp = (objPtr)->internalRep.ptrAndLongRep.ptr; \ + } else { \ + (bignum).dp = (objPtr)->internalRep.ptrAndLongRep.ptr; \ (bignum).sign = (objPtr)->internalRep.ptrAndLongRep.value >> 30; \ - (bignum).alloc = \ + (bignum).alloc = \ ((objPtr)->internalRep.ptrAndLongRep.value >> 15) & 0x7fff; \ (bignum).used = (objPtr)->internalRep.ptrAndLongRep.value & 0x7fff; \ } @@ -249,48 +245,48 @@ static int SetCmdNameFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); */ static const Tcl_ObjType oldBooleanType = { - "boolean", /* name */ - NULL, /* freeIntRepProc */ - NULL, /* dupIntRepProc */ - NULL, /* updateStringProc */ - SetBooleanFromAny /* setFromAnyProc */ + "boolean", /* name */ + NULL, /* freeIntRepProc */ + NULL, /* dupIntRepProc */ + NULL, /* updateStringProc */ + SetBooleanFromAny /* setFromAnyProc */ }; const Tcl_ObjType tclBooleanType = { - "booleanString", /* name */ - NULL, /* freeIntRepProc */ - NULL, /* dupIntRepProc */ - NULL, /* updateStringProc */ - SetBooleanFromAny /* setFromAnyProc */ + "booleanString", /* name */ + NULL, /* freeIntRepProc */ + NULL, /* dupIntRepProc */ + NULL, /* updateStringProc */ + SetBooleanFromAny /* setFromAnyProc */ }; const Tcl_ObjType tclDoubleType = { - "double", /* name */ - NULL, /* freeIntRepProc */ - NULL, /* dupIntRepProc */ - UpdateStringOfDouble, /* updateStringProc */ - SetDoubleFromAny /* setFromAnyProc */ + "double", /* name */ + NULL, /* freeIntRepProc */ + NULL, /* dupIntRepProc */ + UpdateStringOfDouble, /* updateStringProc */ + SetDoubleFromAny /* setFromAnyProc */ }; const Tcl_ObjType tclIntType = { - "int", /* name */ - NULL, /* freeIntRepProc */ - NULL, /* dupIntRepProc */ - UpdateStringOfInt, /* updateStringProc */ - SetIntFromAny /* setFromAnyProc */ + "int", /* name */ + NULL, /* freeIntRepProc */ + NULL, /* dupIntRepProc */ + UpdateStringOfInt, /* updateStringProc */ + SetIntFromAny /* setFromAnyProc */ }; #ifndef NO_WIDE_TYPE const Tcl_ObjType tclWideIntType = { - "wideInt", /* name */ - NULL, /* freeIntRepProc */ - NULL, /* dupIntRepProc */ - UpdateStringOfWideInt, /* updateStringProc */ - SetWideIntFromAny /* setFromAnyProc */ + "wideInt", /* name */ + NULL, /* freeIntRepProc */ + NULL, /* dupIntRepProc */ + UpdateStringOfWideInt, /* updateStringProc */ + SetWideIntFromAny /* setFromAnyProc */ }; #endif const Tcl_ObjType tclBignumType = { - "bignum", /* name */ - FreeBignum, /* freeIntRepProc */ - DupBignum, /* dupIntRepProc */ - UpdateStringOfBignum, /* updateStringProc */ - NULL /* setFromAnyProc */ + "bignum", /* name */ + FreeBignum, /* freeIntRepProc */ + DupBignum, /* dupIntRepProc */ + UpdateStringOfBignum, /* updateStringProc */ + NULL /* setFromAnyProc */ }; /* @@ -330,11 +326,11 @@ const Tcl_HashKeyType tclObjHashKeyType = { */ Tcl_ObjType tclCmdNameType = { - "cmdName", /* name */ - FreeCmdNameInternalRep, /* freeIntRepProc */ - DupCmdNameInternalRep, /* dupIntRepProc */ - NULL, /* updateStringProc */ - SetCmdNameFromAny /* setFromAnyProc */ + "cmdName", /* name */ + FreeCmdNameInternalRep, /* freeIntRepProc */ + DupCmdNameInternalRep, /* dupIntRepProc */ + NULL, /* updateStringProc */ + SetCmdNameFromAny /* setFromAnyProc */ }; /* @@ -424,6 +420,7 @@ TclInitObjSubsystem(void) tclObjsFreed = 0; { int i; + for (i=0 ; ilineCLPtr) { - tsdPtr->lineCLPtr = (Tcl_HashTable*) ckalloc (sizeof (Tcl_HashTable)); + tsdPtr->lineCLPtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); Tcl_InitHashTable(tsdPtr->lineCLPtr, TCL_ONE_WORD_KEYS); - Tcl_CreateThreadExitHandler (TclThreadFinalizeContLines,NULL); + Tcl_CreateThreadExitHandler(TclThreadFinalizeContLines,NULL); } return tsdPtr; } @@ -569,18 +567,18 @@ TclGetContLineTable() *---------------------------------------------------------------------- */ -ContLineLoc* -TclContinuationsEnter(Tcl_Obj* objPtr, - int num, - int* loc) +ContLineLoc * +TclContinuationsEnter( + Tcl_Obj *objPtr, + int num, + int *loc) { int newEntry; ThreadSpecificData *tsdPtr = TclGetContLineTable(); - Tcl_HashEntry* hPtr = - Tcl_CreateHashEntry (tsdPtr->lineCLPtr, (char*) objPtr, &newEntry); - - ContLineLoc* clLocPtr = - (ContLineLoc*) ckalloc (sizeof(ContLineLoc) + num*sizeof(int)); + Tcl_HashEntry *hPtr = + Tcl_CreateHashEntry(tsdPtr->lineCLPtr, (char *) objPtr, &newEntry); + ContLineLoc *clLocPtr = (ContLineLoc *) + ckalloc(sizeof(ContLineLoc) + num*sizeof(int)); if (!newEntry) { /* @@ -608,9 +606,9 @@ TclContinuationsEnter(Tcl_Obj* objPtr, } clLocPtr->num = num; - memcpy (&clLocPtr->loc, loc, num*sizeof(int)); - clLocPtr->loc[num] = CLL_END; /* Sentinel */ - Tcl_SetHashValue (hPtr, clLocPtr); + memcpy(&clLocPtr->loc, loc, num*sizeof(int)); + clLocPtr->loc[num] = CLL_END; /* Sentinel */ + Tcl_SetHashValue(hPtr, clLocPtr); return clLocPtr; } @@ -635,7 +633,10 @@ TclContinuationsEnter(Tcl_Obj* objPtr, */ void -TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext) +TclContinuationsEnterDerived( + Tcl_Obj *objPtr, + int start, + int *clNext) { /* * We have to handle invisible continuations lines here as well, despite @@ -661,16 +662,15 @@ TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext) */ int length, end, num; - int* wordCLLast = clNext; + int *wordCLLast = clNext; Tcl_GetStringFromObj(objPtr, &length); /* Is there a better way which doesn't shimmer ? */ - end = start + length; /* first char after the word */ + end = start + length; /* First char after the word */ /* - * Then compute the table slice covering the range of - * the word. + * Then compute the table slice covering the range of the word. */ while (*wordCLLast >= 0 && *wordCLLast < end) { @@ -678,15 +678,13 @@ TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext) } /* - * And generate the table from the slice, if it was - * not empty. + * And generate the table from the slice, if it was not empty. */ num = wordCLLast - clNext; if (num) { int i; - ContLineLoc* clLocPtr = - TclContinuationsEnter(objPtr, num, clNext); + ContLineLoc *clLocPtr = TclContinuationsEnter(objPtr, num, clNext); /* * Re-base the locations. @@ -714,9 +712,9 @@ TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext) * TclContinuationsCopy -- * * This procedure is a helper which copies the continuation line - * information associated with a Tcl_Obj* to another Tcl_Obj*. - * It is assumed that both contain the same string/script. Use - * this when a script is duplicated because it was shared. + * information associated with a Tcl_Obj* to another Tcl_Obj*. It is + * assumed that both contain the same string/script. Use this when a + * script is duplicated because it was shared. * * Results: * None. @@ -729,13 +727,16 @@ TclContinuationsEnterDerived(Tcl_Obj* objPtr, int start, int* clNext) */ void -TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr) +TclContinuationsCopy( + Tcl_Obj *objPtr, + Tcl_Obj *originObjPtr) { ThreadSpecificData *tsdPtr = TclGetContLineTable(); - Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char*) originObjPtr); + Tcl_HashEntry *hPtr = + Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) originObjPtr); if (hPtr) { - ContLineLoc* clLocPtr = (ContLineLoc*) Tcl_GetHashValue (hPtr); + ContLineLoc *clLocPtr = Tcl_GetHashValue(hPtr); TclContinuationsEnter(objPtr, clLocPtr->num, clLocPtr->loc); } @@ -750,8 +751,8 @@ TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr) * information associated with a Tcl_Obj*, if it has any. * * Results: - * A reference to the continuation line location table, or NULL - * if the Tcl_Obj* has no such information associated with it. + * A reference to the continuation line location table, or NULL if the + * Tcl_Obj* has no such information associated with it. * * Side effects: * None. @@ -760,17 +761,18 @@ TclContinuationsCopy(Tcl_Obj* objPtr, Tcl_Obj* originObjPtr) *---------------------------------------------------------------------- */ -ContLineLoc* -TclContinuationsGet(Tcl_Obj* objPtr) +ContLineLoc * +TclContinuationsGet( + Tcl_Obj *objPtr) { ThreadSpecificData *tsdPtr = TclGetContLineTable(); - Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char*) objPtr); + Tcl_HashEntry *hPtr = + Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) objPtr); - if (hPtr) { - return (ContLineLoc*) Tcl_GetHashValue (hPtr); - } else { - return NULL; + if (!hPtr) { + return NULL; } + return Tcl_GetHashValue(hPtr); } /* @@ -792,7 +794,8 @@ TclContinuationsGet(Tcl_Obj* objPtr) */ static void -TclThreadFinalizeContLines (ClientData clientData) +TclThreadFinalizeContLines( + ClientData clientData) { /* * Release the hashtable tracking invisible continuation lines. @@ -803,18 +806,18 @@ TclThreadFinalizeContLines (ClientData clientData) Tcl_HashSearch hSearch; for (hPtr = Tcl_FirstHashEntry(tsdPtr->lineCLPtr, &hSearch); - hPtr != NULL; - hPtr = Tcl_NextHashEntry(&hSearch)) { + hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { /* * We are not using Tcl_EventuallyFree (as in TclFreeObj()) because * here we can be sure that the compiler will not hold references to * the data in the hashtable, and using TEF might bork the * finalization sequence. */ - ContLineLocFree (Tcl_GetHashValue (hPtr)); - Tcl_DeleteHashEntry (hPtr); + + ContLineLocFree(Tcl_GetHashValue(hPtr)); + Tcl_DeleteHashEntry(hPtr); } - Tcl_DeleteHashTable (tsdPtr->lineCLPtr); + Tcl_DeleteHashTable(tsdPtr->lineCLPtr); ckfree((char *) tsdPtr->lineCLPtr); tsdPtr->lineCLPtr = NULL; } @@ -837,9 +840,10 @@ TclThreadFinalizeContLines (ClientData clientData) */ static void -ContLineLocFree (char* clientData) +ContLineLocFree( + char *clientData) { - ckfree (clientData); + ckfree(clientData); } /* @@ -1331,9 +1335,11 @@ TclFreeObj( Tcl_Panic("Reference count for %lx was negative", objPtr); } - /* Invalidate the string rep first so we can use the bytes value - * for our pointer chain, and signal an obj deletion (as opposed - * to shimmering) with 'length == -1' */ + /* + * Invalidate the string rep first so we can use the bytes value for our + * pointer chain, and signal an obj deletion (as opposed to shimmering) + * with 'length == -1'. + */ TclInvalidateStringRep(objPtr); objPtr->length = -1; @@ -1356,7 +1362,7 @@ TclFreeObj( while (ObjOnStack(context)) { Tcl_Obj *objToFree; - PopObjToDelete(context,objToFree); + PopObjToDelete(context, objToFree); TCL_DTRACE_OBJ_FREE(objToFree); TclFreeIntRep(objToFree); @@ -1370,22 +1376,23 @@ TclFreeObj( /* * We cannot use TclGetContinuationTable() here, because that may - * re-initialize the thread-data for calls coming after the - * finalization. We have to access it using the low-level call and then - * check for validity. This function can be called after - * TclFinalizeThreadData() has already killed the thread-global data - * structures. Performing TCL_TSD_INIT will leave us with an - * un-initialized memory block upon which we crash (if we where to access - * the uninitialized hashtable). + * re-initialize the thread-data for calls coming after the finalization. + * We have to access it using the low-level call and then check for + * validity. This function can be called after TclFinalizeThreadData() has + * already killed the thread-global data structures. Performing + * TCL_TSD_INIT will leave us with an un-initialized memory block upon + * which we crash (if we where to access the uninitialized hashtable). */ { - ThreadSpecificData* tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + Tcl_HashEntry *hPtr; + if (tsdPtr->lineCLPtr) { - Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char *) objPtr); + hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) objPtr); if (hPtr) { - Tcl_EventuallyFree (Tcl_GetHashValue (hPtr), ContLineLocFree); - Tcl_DeleteHashEntry (hPtr); + Tcl_EventuallyFree(Tcl_GetHashValue(hPtr), ContLineLocFree); + Tcl_DeleteHashEntry(hPtr); } } } @@ -1396,9 +1403,11 @@ void TclFreeObj( register Tcl_Obj *objPtr) /* The object to be freed. */ { - /* Invalidate the string rep first so we can use the bytes value - * for our pointer chain, and signal an obj deletion (as opposed - * to shimmering) with 'length == -1' */ + /* + * Invalidate the string rep first so we can use the bytes value for our + * pointer chain, and signal an obj deletion (as opposed to shimmering) + * with 'length == -1'. + */ TclInvalidateStringRep(objPtr); objPtr->length = -1; @@ -1442,7 +1451,8 @@ TclFreeObj( ObjDeletionLock(context); while (ObjOnStack(context)) { Tcl_Obj *objToFree; - PopObjToDelete(context,objToFree); + + PopObjToDelete(context, objToFree); TCL_DTRACE_OBJ_FREE(objToFree); if ((objToFree->typePtr != NULL) && (objToFree->typePtr->freeIntRepProc != NULL)) { @@ -1457,22 +1467,23 @@ TclFreeObj( /* * We cannot use TclGetContinuationTable() here, because that may - * re-initialize the thread-data for calls coming after the - * finalization. We have to access it using the low-level call and then - * check for validity. This function can be called after - * TclFinalizeThreadData() has already killed the thread-global data - * structures. Performing TCL_TSD_INIT will leave us with an - * un-initialized memory block upon which we crash (if we where to access - * the uninitialized hashtable). + * re-initialize the thread-data for calls coming after the finalization. + * We have to access it using the low-level call and then check for + * validity. This function can be called after TclFinalizeThreadData() has + * already killed the thread-global data structures. Performing + * TCL_TSD_INIT will leave us with an un-initialized memory block upon + * which we crash (if we where to access the uninitialized hashtable). */ { - ThreadSpecificData* tsdPtr = TCL_TSD_INIT(&dataKey); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + Tcl_HashEntry *hPtr; + if (tsdPtr->lineCLPtr) { - Tcl_HashEntry* hPtr = Tcl_FindHashEntry (tsdPtr->lineCLPtr, (char *) objPtr); + hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) objPtr); if (hPtr) { - Tcl_EventuallyFree (Tcl_GetHashValue (hPtr), ContLineLocFree); - Tcl_DeleteHashEntry (hPtr); + Tcl_EventuallyFree(Tcl_GetHashValue(hPtr), ContLineLocFree); + Tcl_DeleteHashEntry(hPtr); } } } @@ -1620,6 +1631,7 @@ Tcl_GetString( * must be written in such a way that (objPtr->bytes) never becomes * NULL. This panic was added in Tcl 8.1. */ + Tcl_Panic("UpdateStringProc should not be invoked for type %s", objPtr->typePtr->name); } @@ -1983,7 +1995,10 @@ ParseBoolean( const char *str = TclGetStringFromObj(objPtr, &length); if ((length == 0) || (length > 5)) { - /* longest valid boolean string rep. is "false" */ + /* + * Longest valid boolean string rep. is "false". + */ + return TCL_ERROR; } @@ -2009,6 +2024,7 @@ ParseBoolean( for (i=0; i < length; i++) { char c = str[i]; + switch (c) { case 'A': case 'E': case 'F': case 'L': case 'N': case 'O': case 'R': case 'S': case 'T': case 'U': case 'Y': @@ -2504,6 +2520,7 @@ SetIntFromAny( Tcl_Obj *objPtr) /* Pointer to the object to convert */ { long l; + return TclGetLongFromObj(interp, objPtr, &l); } @@ -2737,6 +2754,7 @@ Tcl_GetLongFromObj( */ Tcl_WideInt w = objPtr->internalRep.wideValue; + if (w >= -(Tcl_WideInt)(ULONG_MAX) && w <= (Tcl_WideInt)(ULONG_MAX)) { *longPtr = Tcl_WideAsLong(w); @@ -2772,7 +2790,8 @@ Tcl_GetLongFromObj( / DIGIT_BIT) { unsigned long value = 0, numBytes = sizeof(long); long scratch; - unsigned char *bytes = (unsigned char *)&scratch; + unsigned char *bytes = (unsigned char *) &scratch; + if (mp_to_unsigned_bin_n(&big, bytes, &numBytes) == MP_OKAY) { while (numBytes-- > 0) { value = (value << CHAR_BIT) | *bytes++; @@ -3357,6 +3376,7 @@ GetBignumFromObj( if (objPtr->typePtr == &tclBignumType) { if (copy || Tcl_IsShared(objPtr)) { mp_int temp; + UNPACK_BIGNUM(objPtr, temp); mp_init_copy(bignumValue, &temp); } else { @@ -3579,7 +3599,8 @@ TclSetBignumIntRep( *---------------------------------------------------------------------- */ -int TclGetNumberFromObj( +int +TclGetNumberFromObj( Tcl_Interp *interp, Tcl_Obj *objPtr, ClientData *clientDataPtr, @@ -3926,7 +3947,7 @@ TclCompareObjKeys( void *keyPtr, /* New key to compare. */ Tcl_HashEntry *hPtr) /* Existing key to compare. */ { - Tcl_Obj *objPtr1 = (Tcl_Obj *) keyPtr; + Tcl_Obj *objPtr1 = keyPtr; Tcl_Obj *objPtr2 = (Tcl_Obj *) hPtr->key.oneWordValue; register const char *p1, *p2; register int l1, l2; @@ -4074,9 +4095,6 @@ Tcl_GetCommandFromObj( * global namespace. */ { register ResolvedCmdName *resPtr; - register Command *cmdPtr; - Namespace *refNsPtr; - int result; /* * Get the internal representation, converting to a command type if @@ -4098,30 +4116,35 @@ Tcl_GetCommandFromObj( */ resPtr = objPtr->internalRep.twoPtrValue.ptr1; - if ((objPtr->typePtr != &tclCmdNameType) - || (resPtr == NULL) - || (cmdPtr = resPtr->cmdPtr, cmdPtr->cmdEpoch != resPtr->cmdEpoch) - || (interp != cmdPtr->nsPtr->interp) - || (cmdPtr->flags & CMD_IS_DELETED) - || (cmdPtr->nsPtr->flags & NS_DYING) - || ((resPtr->refNsPtr != NULL) && - (((refNsPtr = (Namespace *) TclGetCurrentNamespace(interp)) - != resPtr->refNsPtr) - || (resPtr->refNsId != refNsPtr->nsId) - || (resPtr->refNsCmdEpoch != refNsPtr->cmdRefEpoch))) - ) { - - result = tclCmdNameType.setFromAnyProc(interp, objPtr); - - resPtr = objPtr->internalRep.twoPtrValue.ptr1; - if ((result == TCL_OK) && resPtr) { - cmdPtr = resPtr->cmdPtr; - } else { - cmdPtr = NULL; - } + if ((objPtr->typePtr == &tclCmdNameType) && (resPtr != NULL)) { + register Command *cmdPtr = resPtr->cmdPtr; + + if ((cmdPtr->cmdEpoch == resPtr->cmdEpoch) + && (interp == cmdPtr->nsPtr->interp) + && !(cmdPtr->flags & CMD_IS_DELETED) + && !(cmdPtr->nsPtr->flags & NS_DYING)) { + register Namespace *refNsPtr = (Namespace *) + TclGetCurrentNamespace(interp); + + if ((resPtr->refNsPtr == NULL) + || ((refNsPtr == resPtr->refNsPtr) + && (resPtr->refNsId == refNsPtr->nsId) + && (resPtr->refNsCmdEpoch == refNsPtr->cmdRefEpoch))) { + return (Tcl_Command) cmdPtr; + } + } } - return (Tcl_Command) cmdPtr; + /* + * OK, must create a new internal representation (or fail) as any cache we + * had is invalid one way or another. + */ + + if (tclCmdNameType.setFromAnyProc(interp, objPtr) != TCL_OK) { + return NULL; + } + resPtr = objPtr->internalRep.twoPtrValue.ptr1; + return (Tcl_Command) (resPtr ? resPtr->cmdPtr : NULL); } /* @@ -4389,7 +4412,7 @@ SetCmdNameFromAny( * Implementation of the "tcl::unsupported::representation" command. * * Results: - * Reports the current representation (Tcl_Obj type) of its argument. + * Reports the current representation (Tcl_Obj type) of its argument. * * Side effects: * None. @@ -4414,11 +4437,11 @@ Tcl_RepresentationCmd( Tcl_WrongNumArgs(interp, 1, objv, "value"); return TCL_ERROR; } - + /* - * value is a bignum with a refcount of 14, object pointer at - * 0x12345678, internal representation 0x45671234:0x98765432, - * string representation "1872361827361287" + * Value is a bignum with a refcount of 14, object pointer at 0x12345678, + * internal representation 0x45671234:0x98765432, string representation + * "1872361827361287" */ sprintf(refcountBuffer, "%d", objv[1]->refCount); -- cgit v0.12 From 443f16f9ffd4df41748337a63571c02f7081ff14 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 29 Dec 2009 16:58:41 +0000 Subject: Minor optimization for Tcl_RecordAndEvalObj --- ChangeLog | 8 +++-- generic/tclHistory.c | 86 ++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 79 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b51700..280603b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-12-29 Donal K. Fellows + * generic/tclHistory.c (Tcl_RecordAndEvalObj): Reduce the amount + of allocation and deallocation of memory by caching objects in the + interpreter assocData table. + * generic/tclObj.c (Tcl_GetCommandFromObj): Rewrite the logic so that it does not require making assignments part way through an 'if' condition, which was deeply unclear. @@ -9,8 +13,8 @@ 2009-12-29 Pat Thoyts - * generic/tclBinary.c: Handle completely invalid input to the decode - * tests/binary.test: methods [Bug 2922555]. + * generic/tclBinary.c: [Bug 2922555]: Handle completely invalid input + * tests/binary.test: to the decode methods. 2009-12-28 Donal K. Fellows diff --git a/generic/tclHistory.c b/generic/tclHistory.c index 48739ad..0d6af52 100644 --- a/generic/tclHistory.c +++ b/generic/tclHistory.c @@ -12,10 +12,28 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHistory.c,v 1.13 2008/10/26 18:34:04 dkf Exp $ + * RCS: @(#) $Id: tclHistory.c,v 1.14 2009/12/29 16:58:41 dkf Exp $ */ #include "tclInt.h" + +/* + * Type of the assocData structure used to hold the reference to the [history + * add] subcommand, used in Tcl_RecordAndEvalObj. + */ + +typedef struct { + Tcl_Obj *historyObj; /* == "::history" */ + Tcl_Obj *addObj; /* == "add" */ +} HistoryObjs; + +#define HISTORY_OBJS_KEY "::tcl::HistoryObjs" + +/* + * Static functions in this file. + */ + +static Tcl_InterpDeleteProc DeleteHistoryObjs; /* *---------------------------------------------------------------------- @@ -113,36 +131,49 @@ Tcl_RecordAndEvalObj( * current procedure. */ { int result, call = 1; - Tcl_Obj *list[3]; - register Tcl_Obj *objPtr; Tcl_CmdInfo info; + HistoryObjs *histObjsPtr = + Tcl_GetAssocData(interp, HISTORY_OBJS_KEY, NULL); /* - * Do not call [history] if it has been replaced by an empty proc + * Create the references to the [::history add] command if necessary. */ - result = Tcl_GetCommandInfo(interp, "history", &info); + if (histObjsPtr == NULL) { + histObjsPtr = (HistoryObjs *) ckalloc(sizeof(HistoryObjs)); + TclNewLiteralStringObj(histObjsPtr->historyObj, "::history"); + TclNewLiteralStringObj(histObjsPtr->addObj, "add"); + Tcl_IncrRefCount(histObjsPtr->historyObj); + Tcl_IncrRefCount(histObjsPtr->addObj); + Tcl_SetAssocData(interp, HISTORY_OBJS_KEY, DeleteHistoryObjs, + histObjsPtr); + } + + /* + * Do not call [history] if it has been replaced by an empty proc + */ + result = Tcl_GetCommandInfo(interp, "::history", &info); if (result && (info.deleteProc == TclProcDeleteProc)) { Proc *procPtr = (Proc *) info.objClientData; call = (procPtr->cmdPtr->compileProc != TclCompileNoOp); } if (call) { + Tcl_Obj *list[3]; /* * Do recording by eval'ing a tcl history command: history add $cmd. */ - TclNewLiteralStringObj(list[0], "history"); - TclNewLiteralStringObj(list[1], "add"); + list[0] = histObjsPtr->historyObj; + list[1] = histObjsPtr->addObj; list[2] = cmdPtr; - - objPtr = Tcl_NewListObj(3, list); - Tcl_IncrRefCount(objPtr); - (void) Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL); - Tcl_DecrRefCount(objPtr); - + + Tcl_IncrRefCount(cmdPtr); + (void) Tcl_EvalObjv(interp, 3, list, TCL_EVAL_GLOBAL); + Tcl_DecrRefCount(cmdPtr); + /* * One possible failure mode above: exceeding a resource limit. */ @@ -164,6 +195,35 @@ Tcl_RecordAndEvalObj( } /* + *---------------------------------------------------------------------- + * + * DeleteHistoryObjs -- + * + * Called to delete the references to the constant words used when adding + * to the history. + * + * Results: + * None. + * + * Side effects: + * The constant words may be deleted. + * + *---------------------------------------------------------------------- + */ + +static void +DeleteHistoryObjs( + ClientData clientData, + Tcl_Interp *interp) +{ + register HistoryObjs *histObjsPtr = clientData; + + TclDecrRefCount(histObjsPtr->historyObj); + TclDecrRefCount(histObjsPtr->addObj); + ckfree((char *) histObjsPtr); +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 -- cgit v0.12 From 7c7c6aa17bf0f27a8d5890a53d75e74830212d02 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 30 Dec 2009 13:47:52 +0000 Subject: * library/init.tcl (unknown): fix infinite recursion of ::unknown when [set] is undefined [Bug 2824981]. --- ChangeLog | 5 +++++ library/init.tcl | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 280603b..4308e41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-30 Miguel Sofer + + * library/init.tcl (unknown): fix infinite recursion of ::unknown + when [set] is undefined [Bug 2824981]. + 2009-12-29 Donal K. Fellows * generic/tclHistory.c (Tcl_RecordAndEvalObj): Reduce the amount diff --git a/library/init.tcl b/library/init.tcl index 6ca4873..a62f3a0 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.121 2009/03/09 09:12:39 dkf Exp $ +# RCS: @(#) $Id: init.tcl,v 1.122 2009/12/30 13:47:53 msofer Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -237,8 +237,13 @@ proc unknown args { variable ::tcl::UnknownPending global auto_noexec auto_noload env tcl_interactive - catch {set savedErrorInfo $::errorInfo} - catch {set savedErrorCode $::errorCode} + + if {[info exists ::errorInfo]} { + set savedErrorInfo $::errorInfo + } + if {[info exists ::errorCode]} { + set savedErrorCode $::errorCode + } set name [lindex $args 0] if {![info exists auto_noload]} { -- cgit v0.12 From 26e2008515075fa191d71fa2c8d21bd8032aaf75 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 30 Dec 2009 22:26:43 +0000 Subject: [Bug 2923613]: Make the safer [source] handle a [return] at the end of the file correctly. --- ChangeLog | 20 +++++++++++++------- library/safe.tcl | 14 ++++++++------ tests/safe.test | 13 ++++++++++++- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4308e41..d401823 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,23 @@ +2009-12-30 Donal K. Fellows + + * library/safe.tcl (AliasSource): [Bug 2923613]: Make the safer + * tests/safe.test (safe-8.9): [source] handle a [return] at the + end of the file correctly. + 2009-12-30 Miguel Sofer - * library/init.tcl (unknown): fix infinite recursion of ::unknown - when [set] is undefined [Bug 2824981]. + * library/init.tcl (unknown): [Bug 2824981]: Fix infinite recursion of + ::unknown when [set] is undefined. 2009-12-29 Donal K. Fellows - * generic/tclHistory.c (Tcl_RecordAndEvalObj): Reduce the amount - of allocation and deallocation of memory by caching objects in the + * generic/tclHistory.c (Tcl_RecordAndEvalObj): Reduce the amount of + allocation and deallocation of memory by caching objects in the interpreter assocData table. - * generic/tclObj.c (Tcl_GetCommandFromObj): Rewrite the logic so - that it does not require making assignments part way through an - 'if' condition, which was deeply unclear. + * generic/tclObj.c (Tcl_GetCommandFromObj): Rewrite the logic so that + it does not require making assignments part way through an 'if' + condition, which was deeply unclear. * generic/tclInterp.c (Tcl_MakeSafe): [Bug 2895741]: Make sure that the min() and max() functions are supported in safe interpreters. diff --git a/library/safe.tcl b/library/safe.tcl index eaae00d..7c81f92 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.36 2009/12/23 11:17:33 dkf Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.37 2009/12/30 22:26:43 dkf Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -842,7 +842,7 @@ proc ::safe::AliasSource {slave args} { # because we want to control [info script] in the slave so information # doesn't leak so much. [Bug 2913625] set old [::interp eval $slave {info script}] - if {[catch { + set code [catch { set f [open $realfile] fconfigure $f -eofchar \032 if {$encoding ne ""} { @@ -852,13 +852,15 @@ proc ::safe::AliasSource {slave args} { close $f ::interp eval $slave [list info script $file] ::interp eval $slave $contents - } msg]} { - catch {interp eval $slave [list info script $old]} + } msg opt] + catch {interp eval $slave [list info script $old]} + # Note that all non-errors are fine result codes from [source], so we must + # take a little care to do it properly. [Bug 2923613] + if {$code == 1} { Log $slave $msg return -code error "script error" } - catch {interp eval $slave [list info script $old]} - return $msg + return -code $code -options $opt $msg } # AliasLoad is the target of the "load" alias in safe interpreters. diff --git a/tests/safe.test b/tests/safe.test index 223559a..db8952b 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.31 2009/12/29 14:55:42 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.32 2009/12/30 22:26:43 dkf Exp $ package require Tcl 8.5 @@ -320,6 +320,17 @@ test safe-8.8 {safe source forbids -rsrc} -setup { } -returnCodes error -cleanup { safe::interpDelete $i } -result {wrong # args: should be "source ?-encoding E? fileName"} +test safe-8.9 {safe source and return} -setup { + set returnScript [makeFile {return "ok"} return.tcl] + catch {safe::interpDelete $i} +} -body { + safe::interpCreate $i + set token [safe::interpAddToAccessPath $i [file dirname $returnScript]] + $i eval [list source $token/[file tail $returnScript]] +} -cleanup { + catch {safe::interpDelete $i} + removeFile $returnScript +} -result ok test safe-9.1 {safe interps' deleteHook} -setup { set i "a" -- cgit v0.12 From d20cf874f1303bf21f722abb01c7d1f08a9dc251 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 31 Dec 2009 19:22:26 +0000 Subject: Minor stylistic improvements. --- generic/tclRegexp.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index b912345..c91a746 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.c,v 1.32 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclRegexp.c,v 1.33 2009/12/31 19:22:26 dkf Exp $ */ #include "tclInt.h" @@ -175,7 +175,7 @@ Tcl_RegExpExec( * that "^" won't match. */ { int flags, result, numChars; - TclRegexp *regexp = (TclRegexp *)re; + TclRegexp *regexp = (TclRegexp *) re; Tcl_DString ds; const Tcl_UniChar *ustr; @@ -393,9 +393,8 @@ Tcl_RegExpMatch( const char *text, /* Text to search for pattern matches. */ const char *pattern) /* Regular expression to match against text. */ { - Tcl_RegExp re; + Tcl_RegExp re = Tcl_RegExpCompile(interp, pattern); - re = Tcl_RegExpCompile(interp, pattern); if (re == NULL) { return -1; } @@ -438,7 +437,8 @@ Tcl_RegExpExecObj( Tcl_UniChar *udata; int length; int reflags = regexpPtr->flags; -#define TCL_REG_GLOBOK_FLAGS (TCL_REG_ADVANCED | TCL_REG_NOSUB | TCL_REG_NOCASE) +#define TCL_REG_GLOBOK_FLAGS \ + (TCL_REG_ADVANCED | TCL_REG_NOSUB | TCL_REG_NOCASE) /* * Take advantage of the equivalent glob pattern, if one exists. @@ -580,7 +580,7 @@ Tcl_GetRegExpFromObj( * TclRegexp* when the type is tclRegexpType. */ - regexpPtr = (TclRegexp *) objPtr->internalRep.otherValuePtr; + regexpPtr = objPtr->internalRep.otherValuePtr; if ((objPtr->typePtr != &tclRegexpType) || (regexpPtr->flags != flags)) { pattern = TclGetStringFromObj(objPtr, &length); @@ -603,7 +603,7 @@ Tcl_GetRegExpFromObj( */ TclFreeIntRep(objPtr); - objPtr->internalRep.otherValuePtr = (void *) regexpPtr; + objPtr->internalRep.otherValuePtr = regexpPtr; objPtr->typePtr = &tclRegexpType; } return (Tcl_RegExp) regexpPtr; @@ -751,7 +751,7 @@ static void FreeRegexpInternalRep( Tcl_Obj *objPtr) /* Regexp object with internal rep to free. */ { - TclRegexp *regexpRepPtr = (TclRegexp *) objPtr->internalRep.otherValuePtr; + TclRegexp *regexpRepPtr = objPtr->internalRep.otherValuePtr; /* * If this is the last reference to the regexp, free it. @@ -785,7 +785,7 @@ DupRegexpInternalRep( Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { - TclRegexp *regexpPtr = (TclRegexp *) srcPtr->internalRep.otherValuePtr; + TclRegexp *regexpPtr = srcPtr->internalRep.otherValuePtr; regexpPtr->refCount++; copyPtr->internalRep.otherValuePtr = srcPtr->internalRep.otherValuePtr; @@ -962,8 +962,8 @@ CompileRegexp( * the entire pattern. */ - regexpPtr->matches = (regmatch_t *) ckalloc( - sizeof(regmatch_t) * (regexpPtr->re.re_nsub + 1)); + regexpPtr->matches = (regmatch_t *) + ckalloc(sizeof(regmatch_t) * (regexpPtr->re.re_nsub + 1)); /* * Initialize the refcount to one initially, since it is in the cache. @@ -978,6 +978,7 @@ CompileRegexp( if (tsdPtr->patterns[NUM_REGEXPS-1] != NULL) { TclRegexp *oldRegexpPtr = tsdPtr->regexps[NUM_REGEXPS-1]; + if (--(oldRegexpPtr->refCount) <= 0) { FreeRegexp(oldRegexpPtr); } @@ -988,7 +989,7 @@ CompileRegexp( tsdPtr->patLengths[i+1] = tsdPtr->patLengths[i]; tsdPtr->regexps[i+1] = tsdPtr->regexps[i]; } - tsdPtr->patterns[0] = (char *) ckalloc((unsigned) (length+1)); + tsdPtr->patterns[0] = ckalloc((unsigned) length+1); strcpy(tsdPtr->patterns[0], string); tsdPtr->patLengths[0] = length; tsdPtr->regexps[0] = regexpPtr; @@ -1058,10 +1059,12 @@ FinalizeRegexp( ckfree(tsdPtr->patterns[i]); tsdPtr->patterns[i] = NULL; } + /* * We may find ourselves reinitialized if another finalization routine * invokes regexps. */ + tsdPtr->initialized = 0; } -- cgit v0.12 From 10428413079058e0f75d48d4f976493454730d0b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 3 Jan 2010 20:29:11 +0000 Subject: * generic/tclBasic.c: Fix lerak of coroutines on namespace * generic/tclCompile.h: deletion, [Bug 2724403]. Added a test * generic/tclNamesp.c: for this leak, and also a test for * tests/coroutine.test: leaks on namespace deletion. * tests/namespace.test: --- ChangeLog | 11 +++++++++++ generic/tclBasic.c | 5 ++--- generic/tclCompile.h | 3 ++- generic/tclNamesp.c | 26 +++++++++++++++++++++++++- tests/coroutine.test | 27 ++++++++++++++++++++++++++- tests/namespace.test | 25 ++++++++++++++++++++++++- 6 files changed, 90 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d401823..ef0bcdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-01-03 Miguel Sofer + + * generic/tclBasic.c: Fix lerak of coroutines on namespace + * generic/tclCompile.h: deletion, [Bug 2724403]. Added a test + * generic/tclNamesp.c: for this leak, and also a test for + * tests/coroutine.test: leaks on namespace deletion. + * tests/namespace.test: + + * library/init.tcl (unknown): [Bug 2824981]: Fix infinite recursion of + ::unknown when [set] is undefined. + 2009-12-30 Donal K. Fellows * library/safe.tcl (AliasSource): [Bug 2923613]: Make the safer diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 43f484b..254760d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.437 2009/12/24 06:55:25 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.438 2010/01/03 20:29:11 msofer Exp $ */ #include "tclInt.h" @@ -137,7 +137,6 @@ static Tcl_Obj * GetCommandSource(Interp *iPtr, int objc, Tcl_Obj *const objv[], int lookup); static void MathFuncWrongNumArgs(Tcl_Interp *interp, int expected, int actual, Tcl_Obj *const *objv); -static Tcl_ObjCmdProc NRInterpCoroutine; static Tcl_NRPostProc NRCoroutineCallerCallback; static Tcl_NRPostProc NRCoroutineExitCallback; static Tcl_NRPostProc NRRunObjProc; @@ -8674,7 +8673,7 @@ NRCoroutineExitCallback( return result; } -static int +int NRInterpCoroutine( ClientData clientData, Tcl_Interp *interp, /* Current interpreter. */ diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 25dec86..a41e094 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.119 2009/09/04 17:33:11 dgp Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.120 2010/01/03 20:29:11 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -858,6 +858,7 @@ typedef struct { MODULE_SCOPE Tcl_NRPostProc NRCallTEBC; MODULE_SCOPE Tcl_NRPostProc NRCommand; +MODULE_SCOPE Tcl_ObjCmdProc NRInterpCoroutine; #define TCL_NR_BC_TYPE 0 #define TCL_NR_ATEXIT_TYPE 1 diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 507007d..f8ee460 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.198 2009/12/13 17:11:47 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.199 2010/01/03 20:29:11 msofer Exp $ */ #include "tclInt.h" @@ -956,7 +956,31 @@ Tcl_DeleteNamespace( Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace((Tcl_Interp *) iPtr); Tcl_HashEntry *entryPtr; + Tcl_HashSearch search; + Command *cmdPtr; + + /* + * Delete all coroutine commands now: break the circular ref cycle between + * the namespace and the coroutine command [Bug 2724403]. This code is + * essentially duplicated in TclTeardownNamespace() for all other + * commands. Don't optimize to Tcl_NextHashEntry() because of traces. + * + * NOTE: we could avoid traversing the ns's command list by keeping a + * separate list of coros. + */ + for (entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); + entryPtr != NULL;) { + cmdPtr = (Command *) Tcl_GetHashValue(entryPtr); + if (cmdPtr->nreProc == NRInterpCoroutine) { + Tcl_DeleteCommandFromToken((Tcl_Interp *) iPtr, (Tcl_Command)cmdPtr); + entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); + } else { + entryPtr = entryPtr->nextPtr; + } + } + + /* * If the namespace has associated ensemble commands, delete them first. * This leaves the actual contents of the namespace alone (unless they are diff --git a/tests/coroutine.test b/tests/coroutine.test index b4019d4..caa1d0a 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.10 2009/12/19 14:22:00 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.11 2010/01/03 20:29:12 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -17,6 +17,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } testConstraint testnrelevels [llength [info commands testnrelevels]] +testConstraint memory [llength [info commands memory]] set lambda [list {{start 0} {stop 10}} { # init @@ -378,6 +379,7 @@ test coroutine-4.2 {bug #2093188} -setup { rename bar {} unset ::res } -result {{} 3 {{v {} read} {v {} unset}}} + test coroutine-4.3 {bug #2093947} -setup { proc foo {} { set v 1 @@ -412,6 +414,29 @@ test coroutine-4.4 {bug #2917627: cmd resolution} -setup { namespace delete b } -result local +test coroutine-4.5 {bug #2724403} -constraints {memory} \ +-setup { + proc getbytes {} { + set lines [split [memory info] "\n"] + lindex $lines 3 3 + } +} -body { + set end [getbytes] + for {set i 0} {$i < 5} {incr i} { + set ns ::y$i + namespace eval $ns {} + proc ${ns}::start {} {yield; puts hello} + coroutine ${ns}::run ${ns}::start + namespace delete $ns + set start $end + set end [getbytes] + } + set leakedBytes [expr {$end - $start}] +} -cleanup { + rename getbytes {} + unset i ns start end +} -result 0 + test coroutine-5.1 {right numLevels on coro return} -constraints {testnrelevels} \ -setup { proc nestedYield {{val {}}} { diff --git a/tests/namespace.test b/tests/namespace.test index 5feaf91..889f945 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,13 +11,15 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.76 2009/01/09 15:00:27 dkf Exp $ +# RCS: @(#) $Id: namespace.test,v 1.77 2010/01/03 20:29:12 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* } +testConstraint memory [llength [info commands memory]] + # # REMARK: the tests for 'namespace upvar' are not done here. They are to be # found in the file 'upvar.test'. @@ -2853,6 +2855,27 @@ test namespace-53.10 {ensembles: nested rewrite} -setup { 1 {wrong # args: should be "ns v x z2 a2"}\ 0 {2 v v2}} +test namespace-54.1 {leak on namespace deletion} -constraints {memory} \ +-setup { + proc getbytes {} { + set lines [split [memory info] "\n"] + lindex $lines 3 3 + } +} -body { + set end [getbytes] + for {set i 0} {$i < 5} {incr i} { + set ns ::y$i + namespace eval $ns {} + namespace delete $ns + set start $end + set end [getbytes] + } + set leakedBytes [expr {$end - $start}] +} -cleanup { + rename getbytes {} + unset i ns start end +} -result 0 + # cleanup catch {rename cmd1 {}} catch {unset l} -- cgit v0.12 From ce5d124270a583363c29a727a81feadfc90a7ba0 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 3 Jan 2010 20:52:12 +0000 Subject: fix Changelog typo and c/p error --- ChangeLog | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef0bcdf..de681eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,11 @@ 2010-01-03 Miguel Sofer - * generic/tclBasic.c: Fix lerak of coroutines on namespace + * generic/tclBasic.c: Fix leak of coroutines on namespace * generic/tclCompile.h: deletion, [Bug 2724403]. Added a test * generic/tclNamesp.c: for this leak, and also a test for * tests/coroutine.test: leaks on namespace deletion. * tests/namespace.test: - * library/init.tcl (unknown): [Bug 2824981]: Fix infinite recursion of - ::unknown when [set] is undefined. - 2009-12-30 Donal K. Fellows * library/safe.tcl (AliasSource): [Bug 2923613]: Make the safer -- cgit v0.12 From ec03772bad27bd87af2bb98f697ede5b5c6b5d07 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 3 Jan 2010 21:06:09 +0000 Subject: [Bug 1636685]: Use the configuration for modern FreeBSD suggested by the FreeBSD porter. --- ChangeLog | 13 +++++++++---- unix/tcl.m4 | 25 ++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index de681eb..b346e52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,14 @@ +2010-01-03 Donal K. Fellows + + * unix/tcl.m4 (SC_CONFIG_CFLAGS): [Bug 1636685]: Use the configuration + for modern FreeBSD suggested by the FreeBSD porter. + 2010-01-03 Miguel Sofer - * generic/tclBasic.c: Fix leak of coroutines on namespace - * generic/tclCompile.h: deletion, [Bug 2724403]. Added a test - * generic/tclNamesp.c: for this leak, and also a test for - * tests/coroutine.test: leaks on namespace deletion. + * generic/tclBasic.c: [Bug 2724403]: Fix leak of coroutines on + * generic/tclCompile.h: namespace deletion. Added a test for this + * generic/tclNamesp.c: leak, and also a test for leaks on namespace + * tests/coroutine.test: deletion. * tests/namespace.test: 2009-12-30 Donal K. Fellows diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 8bb395e..4f62e7b 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1552,7 +1552,7 @@ dnl AC_CHECK_TOOL(AR, ar) UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; - NetBSD-*|FreeBSD-*) + NetBSD-*|FreeBSD-[[3-4]].*) # FreeBSD 3.* and greater have ELF. # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" @@ -1580,6 +1580,29 @@ dnl AC_CHECK_TOOL(AR, ar) ;; esac ;; + FreeBSD-*) + # This configuration from FreeBSD Ports. + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared" + TCL_SHLIB_LD_EXTRAS="-soname \$@" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' + AS_IF([test "${TCL_THREADS}" = "1"], [ + # The -pthread needs to go in the LDFLAGS, not LIBS + LIBS=`echo $LIBS | sed s/-pthread//` + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_LIBS"]) + # Version numbers are dot-stripped by system policy. + TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' + TCL_LIB_VERSIONS_OK=nodots + ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" -- cgit v0.12 From 71c15d876f2f5a31a2f6d761e31192dd365db45e Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 3 Jan 2010 21:20:20 +0000 Subject: Missed a bit --- unix/tcl.m4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 4f62e7b..98b2f8e 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1590,8 +1590,9 @@ dnl AC_CHECK_TOOL(AR, ar) DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' + AS_IF([test $doRpath = yes], [ + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) AS_IF([test "${TCL_THREADS}" = "1"], [ # The -pthread needs to go in the LDFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` -- cgit v0.12 From ef33a3a3c653d35af2d4669cb9c587d7aee9e2ae Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 3 Jan 2010 21:21:30 +0000 Subject: regen --- unix/configure | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/unix/configure b/unix/configure index fee4353..9d8a5dd 100755 --- a/unix/configure +++ b/unix/configure @@ -8072,7 +8072,7 @@ fi UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; - NetBSD-*|FreeBSD-*) + NetBSD-*|FreeBSD-[3-4].*) # FreeBSD 3.* and greater have ELF. # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" @@ -8106,6 +8106,36 @@ fi ;; esac ;; + FreeBSD-*) + # This configuration from FreeBSD Ports. + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared" + TCL_SHLIB_LD_EXTRAS="-soname \" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + if test "${TCL_THREADS}" = "1"; then + + # The -pthread needs to go in the LDFLAGS, not LIBS + LIBS=`echo $LIBS | sed s/-pthread//` + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LDFLAGS="$LDFLAGS $PTHREAD_LIBS" +fi + + # Version numbers are dot-stripped by system policy. + TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' + TCL_LIB_VERSIONS_OK=nodots + ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" -- cgit v0.12 From b8354cf1ab90a451c4060d65738f17ab7d282c19 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 3 Jan 2010 21:35:15 +0000 Subject: Fix quoting problem --- unix/tcl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 98b2f8e..b7cb2ac 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1584,7 +1584,7 @@ dnl AC_CHECK_TOOL(AR, ar) # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" - TCL_SHLIB_LD_EXTRAS="-soname \$@" + TCL_SHLIB_LD_EXTRAS="-soname \$[@]" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" -- cgit v0.12 From 5e5cf63c514ffd9ca54093a7dd98c00443e7d67c Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 3 Jan 2010 21:35:50 +0000 Subject: regen --- unix/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/configure b/unix/configure index 9d8a5dd..19dc3b2 100755 --- a/unix/configure +++ b/unix/configure @@ -8110,7 +8110,7 @@ fi # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" - TCL_SHLIB_LD_EXTRAS="-soname \" + TCL_SHLIB_LD_EXTRAS="-soname \$@" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" -- cgit v0.12 From 0e23807506cde25fbd9689f83c09a35db89fa79f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 5 Jan 2010 18:58:36 +0000 Subject: * generic/tclPathObj.c (TclPathPart): Correct inconsistency between * tests/fileName.test (filename-14.31): the string rep and the intrep of a path value created by [file rootname]. Thanks to Vitaly Magerya for reporting. [Bug 2918610] --- ChangeLog | 7 +++++++ generic/tclPathObj.c | 36 ++++++++++-------------------------- tests/fileName.test | 17 ++++++++++++++++- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index b346e52..9927869 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-01-05 Don Porter + + * generic/tclPathObj.c (TclPathPart): Correct inconsistency between + * tests/fileName.test (filename-14.31): the string rep and the intrep + of a path value created by [file rootname]. Thanks to Vitaly Magerya + for reporting. [Bug 2918610] + 2010-01-03 Donal K. Fellows * unix/tcl.m4 (SC_CONFIG_CFLAGS): [Bug 1636685]: Use the configuration diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 610c05e..d6f2618 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.85 2009/12/21 23:25:39 nijtmans Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.86 2010/01/05 18:58:36 dgp Exp $ */ #include "tclInt.h" @@ -661,34 +661,18 @@ TclPathPart( return pathPtr; } else { /* - * Duplicate the object we were given and then trim off - * the extension of the tail component of the path. + * Need to return the whole path with the extension + * suffix removed. Do that by joining our "head" to + * our "tail" with the extension suffix removed from + * the tail. */ - FsPath *fsDupPtr; - Tcl_Obj *root = Tcl_DuplicateObj(pathPtr); + Tcl_Obj *resultPtr = + TclNewFSPathObj(fsPathPtr->cwdPtr, fileName, + (int)(length - strlen(extension))); - Tcl_IncrRefCount(root); - fsDupPtr = PATHOBJ(root); - if (Tcl_IsShared(fsDupPtr->normPathPtr)) { - TclDecrRefCount(fsDupPtr->normPathPtr); - fsDupPtr->normPathPtr = Tcl_NewStringObj(fileName, - (int)(length - strlen(extension))); - Tcl_IncrRefCount(fsDupPtr->normPathPtr); - } else { - Tcl_SetObjLength(fsDupPtr->normPathPtr, - (int)(length - strlen(extension))); - } - - /* - * Must also trim the string representation if we have it. - */ - - if (root->bytes != NULL && root->length > 0) { - root->length -= strlen(extension); - root->bytes[root->length] = 0; - } - return root; + Tcl_IncrRefCount(resultPtr); + return resultPtr; } } default: diff --git a/tests/fileName.test b/tests/fileName.test index c02cea3..d46391a 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.65 2009/10/28 16:46:33 kennykb Exp $ +# RCS: @(#) $Id: fileName.test,v 1.66 2010/01/05 18:58:36 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1290,6 +1290,21 @@ test filename-14.30 {Bug 2710920} {unixOrPc} { file rootname [lindex [lsort [glob globTest/*/]] 0] } globTest/a1/ +test filename-14.31 {Bug 2918610} -setup { + set d [makeDirectory foo] + makeFile {} bar.soom $d +} -body { + foreach fn [glob $d/bar.soom] { + set root [file rootname $fn] + close [open $root {WRONLY CREAT}] + } + llength [glob -directory $d *] +} -cleanup { + file delete -force $d/bar + removeFile bar.soom $d + removeDirectory foo +} -result 2 + unset globname # The following tests are only valid for Unix systems. On some systems, like -- cgit v0.12 From 497bc9460c22455176d9935f1af6b643260c2dbd Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 9 Jan 2010 18:42:43 +0000 Subject: Added the contributed packages to the code to build HTML docs. --- ChangeLog | 15 +++++++++++---- tools/tcltk-man2html.tcl | 26 +++++++++++++++++++++----- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9927869..54a592d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,16 @@ +2010-01-09 Donal K. Fellows + + * tools/tcltk-man2html.tcl: Added basic support for building the docs + for contributed packages into the HTML versions. Prompted by question + on Tcler's Chat by Tom Krehbiel. Note that there remain problems in + the documentation generated due to errors in the contributed docs. + 2010-01-05 Don Porter - * generic/tclPathObj.c (TclPathPart): Correct inconsistency between - * tests/fileName.test (filename-14.31): the string rep and the intrep - of a path value created by [file rootname]. Thanks to Vitaly Magerya - for reporting. [Bug 2918610] + * generic/tclPathObj.c (TclPathPart): [Bug 2918610]: Correct + * tests/fileName.test (filename-14.31): inconsistency between the + string rep and the intrep of a path value created by [file rootname]. + Thanks to Vitaly Magerya for reporting. 2010-01-03 Donal K. Fellows diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 3855d50..747c020 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -1956,15 +1956,31 @@ set tclcmddesc {The commands which the tclsh interpreter implements.} set tkcmddesc {The additional commands which the wish interpreter implements.} set tcllibdesc {The C functions which a Tcl extended C program may use.} set tklibdesc {The additional C functions which a Tk extended C program may use.} +set tclpkgcmdsdesc {The additional commands in packages contributed to the Tcl distribution.} +set tclpkglibdesc {The additional C functions in packages contributed to the Tcl distribution.} if {1} { if {[catch { make-man-pages $webdir \ - "$tcltkdir/{$appdir}/doc/*.1 \"$tcltkdesc Applications\" UserCmd {$usercmddesc}" \ - [expr {$build_tcl ? "$tcltkdir/$tcldir/doc/*.n {Tcl Commands} TclCmd {$tclcmddesc}" : ""}] \ - [expr {$build_tk ? "$tcltkdir/$tkdir/doc/*.n {Tk Commands} TkCmd {$tkcmddesc}" : ""}] \ - [expr {$build_tcl ? "$tcltkdir/$tcldir/doc/*.3 {Tcl Library} TclLib {$tcllibdesc}" : ""}] \ - [expr {$build_tk ? "$tcltkdir/$tkdir/doc/*.3 {Tk Library} TkLib {$tklibdesc}" : ""}] + [list $tcltkdir/{$appdir}/doc/*.1 "$tcltkdesc Applications" UserCmd $usercmddesc] \ + [expr {$build_tcl ? + [list $tcltkdir/$tcldir/doc/*.n {Tcl Commands} TclCmd $tclcmddesc] + : ""}] \ + [expr {$build_tk ? + [list $tcltkdir/$tkdir/doc/*.n {Tk Commands} TkCmd $tkcmddesc] + : ""}] \ + [expr {$build_tcl ? + [list $tcltkdir/$tcldir/pkgs/*/doc/*.n {Contrib. Package Commands} PkgCmd $tclpkgcmdsdesc] + : ""}] \ + [expr {$build_tcl ? + [list $tcltkdir/$tcldir/doc/*.3 {Tcl Library} TclLib $tcllibdesc] + : ""}] \ + [expr {$build_tk ? + [list $tcltkdir/$tkdir/doc/*.3 {Tk Library} TkLib $tklibdesc] + : ""}] \ + [expr {$build_tcl ? + [list $tcltkdir/$tcldir/pkgs/*/doc/*.3 {Contrib. Package Library} PkgLib $tclpkglibdesc] + : ""}] } error]} { puts $error\n$errorInfo } -- cgit v0.12 From 4fa186f2a0a170f444dba8467015f295231cbfd3 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 9 Jan 2010 19:32:16 +0000 Subject: Small tweaks to improve reporting and quell some unimportant messages --- tools/tcltk-man2html.tcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 747c020..4bc691c 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -1546,7 +1546,7 @@ proc make-man-pages {html args} { # initialize the long table of contents for this section set manual(long-toc-n) 1 # get the manual pages for this section - set manual(pages) [lsort -dictionary [glob $manual(wing-glob)]] + set manual(pages) [lsort -dictionary [glob -nocomplain $manual(wing-glob)]] set n [lsearch -glob $manual(pages) */ttk_widget.n] if {$n >= 0} { set manual(pages) "[lindex $manual(pages) $n] [lreplace $manual(pages) $n $n]" @@ -1559,7 +1559,7 @@ proc make-man-pages {html args} { set LQ \u201c set RQ \u201d foreach manual_page $manual(pages) { - set manual(page) $manual_page + set manual(page) [file normalize $manual_page] # whistle puts stderr "scanning page $manual(page)" set manual(tail) [file tail $manual(page)] @@ -1601,7 +1601,7 @@ proc make-man-pages {html args} { continue } switch -exact -- $code { - .ad - .na - .so - .ne - .AS - .VE - .VS - . { + .if - .nr - .ad - .na - .so - .ne - .AS - .VE - .VS - . { # ignore continue } -- cgit v0.12 From 630e0a34e65e147a58266f129ff336945b9fbc5e Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 10 Jan 2010 00:56:41 +0000 Subject: Add more troff macros to ignore --- tools/tcltk-man2html.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 4bc691c..c0c2ce5 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -1601,7 +1601,8 @@ proc make-man-pages {html args} { continue } switch -exact -- $code { - .if - .nr - .ad - .na - .so - .ne - .AS - .VE - .VS - . { + .if - .nr - .ti - .in - + .ad - .na - .so - .ne - .AS - .VE - .VS - . { # ignore continue } -- cgit v0.12 From e5f9a89a4439e3c40622d9c0e575fc2e7158334d Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 10 Jan 2010 12:32:51 +0000 Subject: Added documentation for argument. --- doc/NRE.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/NRE.3 b/doc/NRE.3 index 2763d5f..465a8e7 100644 --- a/doc/NRE.3 +++ b/doc/NRE.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: NRE.3,v 1.7 2009/11/27 14:35:10 dkf Exp $ +'\" RCS: @(#) $Id: NRE.3,v 1.8 2010/01/10 12:32:51 dkf Exp $ '\" .so man.macros .TH NRE 3 8.6 Tcl "Tcl Library Procedures" @@ -69,6 +69,8 @@ ORed combination of flag bits that specify additional options. .\" TODO: This is a lie. But kbk didn't grasp TCL_EVAL_INVOKE and .\" TCL_EVAL_NOERR well enough to document them. .AP Tcl_Command cmd in +Token for a command that is to be used instead of the currently +executing command. .AP Tcl_Obj *resultPtr out Pointer to an unshared Tcl_Obj where the result of expression evaluation is written. -- cgit v0.12 From 84a0ece24e8b25066d445fd2001ab751f9f8112d Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 10 Jan 2010 13:19:30 +0000 Subject: Split man2html converter up for ease of maintenance. --- ChangeLog | 6 + tools/tcltk-man2html-utils.tcl | 1285 ++++++++++++++++++++++++++++++++ tools/tcltk-man2html.tcl | 1589 +++++----------------------------------- 3 files changed, 1492 insertions(+), 1388 deletions(-) create mode 100644 tools/tcltk-man2html-utils.tcl diff --git a/ChangeLog b/ChangeLog index 54a592d..ecaa73a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-10 Donal K. Fellows + + * tools/tcltk-man2html.tcl: Split the man->html converter into + * tools/tcltk-man2html-utils.tcl: two pieces for easier maintenance. + Also made it much less verbose in its printed messages by default. + 2010-01-09 Donal K. Fellows * tools/tcltk-man2html.tcl: Added basic support for building the docs diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl new file mode 100644 index 0000000..bf5d37b --- /dev/null +++ b/tools/tcltk-man2html-utils.tcl @@ -0,0 +1,1285 @@ +## +## Utility functions for Man->HTML converter. Note that these +## functions are specifically intended to work with the format as used +## by Tcl and Tk; they do not cope with arbitrary nroff markup. +## + +set ::manual(report-level) 1 + +proc manerror {msg} { + global manual + set name {} + set subj {} + set procname [lindex [info level -1] 0] + if {[info exists manual(name)]} { + set name $manual(name) + } + if {[info exists manual(section)] && [string length $manual(section)]} { + puts stderr "$name: $manual(section): $procname: $msg" + } else { + puts stderr "$name: $procname: $msg" + } +} + +proc manreport {level msg} { + global manual + if {$level < $manual(report-level)} { + uplevel 1 [list manerror $msg] + } +} + +proc fatal {msg} { + global manual + uplevel 1 [list manerror $msg] + exit 1 +} + +## +## templating +## +proc indexfile {} { + if {[info exists ::TARGET] && $::TARGET eq "devsite"} { + return "index.tml" + } else { + return "contents.htm" + } +} +proc copyright {copyright {level {}}} { + # We don't actually generate a separate copyright page anymore + #set page "${level}copyright.htm" + #return "Copyright © [htmlize-text [lrange $copyright 2 end]]" + # obfuscate any email addresses that may appear in name + set who [string map {@ (at)} [lrange $copyright 2 end]] + return "Copyright © [htmlize-text $who]" +} +proc copyout {copyrights {level {}}} { + set out "
" + foreach c $copyrights { + append out "[copyright $c $level]\n" + } + append out "
" + return $out +} +proc CSS {{level ""}} { + return "\n" +} +proc DOCTYPE {} { + return "" +} +proc htmlhead {title header args} { + set level "" + if {[lindex $args end] eq "../[indexfile]"} { + # XXX hack - assume same level for CSS file + set level "../" + } + set out "[DOCTYPE]\n\n$title\n[CSS $level]\n" + foreach {uptitle url} $args { + set header "$uptitle > $header" + } + append out "

$header

" + global manual + if {[info exists manual(subheader)]} { + set subs {} + foreach {name subdir} $manual(subheader) { + if {$name eq $title} { + lappend subs $name + } else { + lappend subs "$name" + } + } + append out "\n

[join $subs { | }]

" + } + return $out +} + +## +## parsing +## +proc unquote arg { + return [string map [list \" {}] $arg] +} + +proc parse-directive {line codename restname} { + upvar 1 $codename code $restname rest + return [regexp {^(\.[.a-zA-Z0-9]*) *(.*)} $line all code rest] +} + +proc htmlize-text {text {charmap {}}} { + # contains some extras for use in nroff->html processing + # build on the list passed in, if any + lappend charmap \ + {&} {&} \ + {\\} "\" \ + {\e} "\" \ + {\ } { } \ + {\|} { } \ + {\0} { } \ + \" {"} \ + {<} {<} \ + {>} {>} \ + \u201c "“" \ + \u201d "”" + + return [string map $charmap $text] +} + +proc process-text {text} { + global manual + # preprocess text; note that this is an incomplete map, and will probably + # need to have things added to it as the manuals expand to use them. + set charmap [list \ + {\&} "\t" \ + {\%} {} \ + "\\\n" "\n" \ + {\(+-} "±" \ + {\(co} "©" \ + {\(em} "—" \ + {\(fm} "′" \ + {\(mu} "×" \ + {\(mi} "−" \ + {\(->} "" \ + {\fP} {\fR} \ + {\.} . \ + {\(bu} "•" \ + ] + lappend charmap {\o'o^'} {ô} ; # o-circumflex in re_syntax.n + lappend charmap {\-\|\-} -- ; # two hyphens + lappend charmap {\-} - ; # a hyphen + + set text [htmlize-text $text $charmap] + # General quoted entity + regsub -all {\\N'(\d+)'} $text "\\&#\\1;" text + while {[string first "\\" $text] >= 0} { + # C R + if {[regsub {^([^\\]*)\\fC([^\\]*)\\fR(.*)$} $text \ + {\1\2\3} text]} continue + # B R + if {[regsub {^([^\\]*)\\fB([^\\]*)\\fR(.*)$} $text \ + {\1\2\3} text]} continue + # B I + if {[regsub {^([^\\]*)\\fB([^\\]*)\\fI(.*)$} $text \ + {\1\2\\fI\3} text]} continue + # I R + if {[regsub {^([^\\]*)\\fI([^\\]*)\\fR(.*)$} $text \ + {\1\2\3} text]} continue + # I B + if {[regsub {^([^\\]*)\\fI([^\\]*)\\fB(.*)$} $text \ + {\1\2\\fB\3} text]} continue + # B B, I I, R R + if { + [regsub {^([^\\]*)\\fB([^\\]*)\\fB(.*)$} $text \ + {\1\\fB\2\3} ntext] + || [regsub {^([^\\]*)\\fI([^\\]*)\\fI(.*)$} $text \ + {\1\\fI\2\3} ntext] + || [regsub {^([^\\]*)\\fR([^\\]*)\\fR(.*)$} $text \ + {\1\\fR\2\3} ntext] + } { + manerror "impotent font change: $text" + set text $ntext + continue + } + # unrecognized + manerror "uncaught backslash: $text" + set text [string map [list "\\" "\"] $text] + } + return $text +} +## +## pass 2 text input and matching +## +proc open-text {} { + global manual + set manual(text-length) [llength $manual(text)] + set manual(text-pointer) 0 +} +proc more-text {} { + global manual + return [expr {$manual(text-pointer) < $manual(text-length)}] +} +proc next-text {} { + global manual + if {[more-text]} { + set text [lindex $manual(text) $manual(text-pointer)] + incr manual(text-pointer) + return $text + } + manerror "read past end of text" + error "fatal" +} +proc is-a-directive {line} { + return [string match .* $line] +} +proc split-directive {line opname restname} { + upvar 1 $opname op $restname rest + set op [string range $line 0 2] + set rest [string trim [string range $line 3 end]] +} +proc next-op-is {op restname} { + global manual + upvar 1 $restname rest + if {[more-text]} { + set text [lindex $manual(text) $manual(text-pointer)] + if {[string equal -length 3 $text $op]} { + set rest [string range $text 4 end] + incr manual(text-pointer) + return 1 + } + } + return 0 +} +proc backup-text {n} { + global manual + if {$manual(text-pointer)-$n >= 0} { + incr manual(text-pointer) -$n + } +} +proc match-text args { + global manual + set nargs [llength $args] + if {$manual(text-pointer) + $nargs > $manual(text-length)} { + return 0 + } + set nback 0 + foreach arg $args { + if {![more-text]} { + backup-text $nback + return 0 + } + set arg [string trim $arg] + set targ [string trim [lindex $manual(text) $manual(text-pointer)]] + if {$arg eq $targ} { + incr nback + incr manual(text-pointer) + continue + } + if {[regexp {^@(\w+)$} $arg all name]} { + upvar 1 $name var + set var $targ + incr nback + incr manual(text-pointer) + continue + } + if {[regexp -nocase {^(\.[A-Z][A-Z])@(\w+)$} $arg all op name]\ + && [string equal $op [lindex $targ 0]]} { + upvar 1 $name var + set var [lrange $targ 1 end] + incr nback + incr manual(text-pointer) + continue + } + backup-text $nback + return 0 + } + return 1 +} +proc expand-next-text {n} { + global manual + return [join [lrange $manual(text) $manual(text-pointer) \ + [expr {$manual(text-pointer)+$n-1}]] \n\n] +} +## +## pass 2 output +## +proc man-puts {text} { + global manual + lappend manual(output-$manual(wing-file)-$manual(name)) $text +} + +## +## build hypertext links to tables of contents +## +proc long-toc {text} { + global manual + set here M[incr manual(section-toc-n)] + set manual($manual(name)-id-$text) $here + set there L[incr manual(long-toc-n)] + lappend manual(section-toc) \ + "
$text" + return "$text" +} +proc option-toc {name class switch} { + global manual + if {[string match "*OPTIONS" $manual(section)]} { + if {$manual(name) ne "ttk_widget" && ($manual(name) ne "ttk_entry" || + ![string match validate* $name])} { + # link the defined option into the long table of contents + set link [long-toc "$switch, $name, $class"] + regsub -- "$switch, $name, $class" $link "$switch" link + return $link + } + } elseif {"$manual(name):$manual(section)" ne "options:DESCRIPTION"} { + error "option-toc in $manual(name) section $manual(section)" + } + + # link the defined standard option to the long table of contents and make + # a target for the standard option references from other man pages. + + set first [lindex $switch 0] + set here M$first + set there L[incr manual(long-toc-n)] + set manual(standard-option-$manual(name)-$first) \ + "$switch, $name, $class" + lappend manual(section-toc) \ + "
$switch, $name, $class" + return "$switch" +} +proc std-option-toc {name page} { + global manual + if {[info exists manual(standard-option-$page-$name)]} { + lappend manual(section-toc)
$manual(standard-option-$page-$name) + return $manual(standard-option-$page-$name) + } + manerror "missing reference to \"$name\" in $page.n" + set here M[incr manual(section-toc-n)] + set there L[incr manual(long-toc-n)] + set other M$name + lappend manual(section-toc) "
$name" + return "$name" +} +## +## process the widget option section +## in widget and options man pages +## +proc output-widget-options {rest} { + global manual + man-puts
+ lappend manual(section-toc)
+ backup-text 1 + set para {} + while {[next-op-is .OP rest]} { + switch -exact -- [llength $rest] { + 3 { + lassign $rest switch name class + } + 5 { + set switch [lrange $rest 0 2] + set name [lindex $rest 3] + set class [lindex $rest 4] + } + default { + fatal "bad .OP $rest" + } + } + if {![regexp {^(<.>)([-\w ]+)()$} $switch \ + all oswitch switch cswitch]} { + if {![regexp {^(<.>)([-\w ]+) or ([-\w ]+)()$} $switch \ + all oswitch switch1 switch2 cswitch]} { + error "not Switch: $switch" + } + set switch "$switch1$cswitch or $oswitch$switch2" + } + if {![regexp {^(<.>)([\w]*)()$} $name all oname name cname]} { + error "not Name: $name" + } + if {![regexp {^(<.>)([\w]*)()$} $class all oclass class cclass]} { + error "not Class: $class" + } + man-puts "$para
Command-Line Name: $oswitch[option-toc $name $class $switch]$cswitch" + man-puts "
Database Name: $oname$name$cname" + man-puts "
Database Class: $oclass$class$cclass" + man-puts
[next-text] + set para

+ + if {[next-op-is .RS rest]} { + while {[more-text]} { + set line [next-text] + if {[is-a-directive $line]} { + split-directive $line code rest + switch -exact -- $code { + .RE { + break + } + .SH - .SS { + manerror "unbalanced .RS at section end" + backup-text 1 + break + } + default { + output-directive $line + } + } + } else { + man-puts $line + } + } + } + } + man-puts

+ lappend manual(section-toc)
+} + +## +## process .RS lists +## +proc output-RS-list {} { + global manual + if {[next-op-is .IP rest]} { + output-IP-list .RS .IP $rest + if {[match-text .RE .sp .RS @rest .IP @rest2]} { + man-puts

$rest + output-IP-list .RS .IP $rest2 + } + if {[match-text .RE .sp .RS @rest .RE]} { + man-puts

$rest + return + } + if {[next-op-is .RE rest]} { + return + } + } + man-puts

+ while {[more-text]} { + set line [next-text] + if {[is-a-directive $line]} { + split-directive $line code rest + switch -exact -- $code { + .RE { + break + } + .SH - .SS { + manerror "unbalanced .RS at section end" + backup-text 1 + break + } + default { + output-directive $line + } + } + } else { + man-puts $line + } + } + man-puts
+} + +## +## process .IP lists which may be plain indents, +## numeric lists, or definition lists +## +proc output-IP-list {context code rest} { + global manual + if {![string length $rest]} { + # blank label, plain indent, no contents entry + man-puts
+ while {[more-text]} { + set line [next-text] + if {[is-a-directive $line]} { + split-directive $line code rest + if {$code eq ".IP" && $rest eq {}} { + man-puts "

" + continue + } + if {$code in {.br .DS .RS}} { + output-directive $line + } else { + backup-text 1 + break + } + } else { + man-puts $line + } + } + man-puts

+ } else { + # labelled list, make contents + if {$context ne ".SH" && $context ne ".SS"} { + man-puts

+ } + set dl "

" + man-puts $dl + lappend manual(section-toc) $dl + backup-text 1 + set accept_RE 0 + set para {} + while {[more-text]} { + set line [next-text] + if {[is-a-directive $line]} { + split-directive $line code rest + switch -exact -- $code { + .IP { + if {$accept_RE} { + output-IP-list .IP $code $rest + continue + } + if {$manual(section) eq "ARGUMENTS" || \ + [regexp {^\[\d+\]$} $rest]} { + man-puts "$para
$rest
" + } elseif {"•" eq $rest} { + man-puts "$para
$rest " + } else { + man-puts "$para
[long-toc $rest]
" + } + if {"$manual(name):$manual(section)" eq \ + "selection:DESCRIPTION"} { + if {[match-text .RE @rest .RS .RS]} { + man-puts
[long-toc $rest]
+ } + } + } + .sp - .br - .DS - .CS { + output-directive $line + } + .RS { + if {[match-text .RS]} { + output-directive $line + incr accept_RE 1 + } elseif {[match-text .CS]} { + output-directive .CS + incr accept_RE 1 + } elseif {[match-text .PP]} { + output-directive .PP + incr accept_RE 1 + } elseif {[match-text .DS]} { + output-directive .DS + incr accept_RE 1 + } else { + output-directive $line + } + } + .PP { + if {[match-text @rest1 .br @rest2 .RS]} { + # yet another nroff kludge as above + man-puts "$para
[long-toc $rest1]" + man-puts "
[long-toc $rest2]
" + incr accept_RE 1 + } elseif {[match-text @rest .RE]} { + # gad, this is getting ridiculous + if {!$accept_RE} { + man-puts "

$rest

" + backup-text 1 + set para {} + break + } else { + man-puts "

$rest" + incr accept_RE -1 + } + } elseif {$accept_RE} { + output-directive $line + } else { + backup-text 1 + break + } + } + .RE { + if {!$accept_RE} { + backup-text 1 + break + } + incr accept_RE -1 + } + default { + backup-text 1 + break + } + } + } else { + man-puts $line + } + set para

+ } + man-puts "$para

" + lappend manual(section-toc) + if {$accept_RE} { + manerror "missing .RE in output-IP-list" + } + } +} +## +## handle the NAME section lines +## there's only one line in the NAME section, +## consisting of a comma separated list of names, +## followed by a hyphen and a short description. +## +proc output-name {line} { + global manual + # split name line into pieces + regexp {^([^-]+) - (.*)$} $line all head tail + # output line to manual page untouched + man-puts $line + # output line to long table of contents + lappend manual(section-toc)
$line
+ # separate out the names for future reference + foreach name [split $head ,] { + set name [string trim $name] + if {[llength $name] > 1} { + manerror "name has a space: {$name}\nfrom: $line" + } + lappend manual(wing-toc) $name + lappend manual(name-$name) $manual(wing-file)/$manual(name) + } +} +## +## build a cross-reference link if appropriate +## +proc cross-reference {ref} { + global manual + if {[string match "Tcl_*" $ref]} { + set lref $ref + } elseif {[string match "Tk_*" $ref]} { + set lref $ref + } elseif {$ref eq "Tcl"} { + set lref $ref + } elseif {[regexp {^[A-Z0-9 ?!]+$} $ref]} { + if {[info exists manual($manual(name)-id-$ref)]} { + return "$ref" + } + set lref [string tolower $ref] + } else { + set lref [string tolower $ref] + } + ## + ## nothing to reference + ## + if {![info exists manual(name-$lref)]} { + foreach name { + array file history info interp string trace after clipboard grab + image option pack place selection tk tkwait update winfo wm + } { + if {[regexp "^$name \[a-z0-9]*\$" $lref] && \ + [info exists manual(name-$name)] && \ + $manual(tail) ne "$name.n"} { + return "$ref" + } + } + if {$lref in {stdin stdout stderr end}} { + # no good place to send these + # tcl tokens? + # also end + } + return $ref + } + ## + ## would be a self reference + ## + foreach name $manual(name-$lref) { + if {"$manual(wing-file)/$manual(name)" in $name} { + return $ref + } + } + ## + ## multiple choices for reference + ## + if {[llength $manual(name-$lref)] > 1} { + set tcl_i [lsearch -glob $manual(name-$lref) *TclCmd*] + set tcl_ref [lindex $manual(name-$lref) $tcl_i] + set tk_i [lsearch -glob $manual(name-$lref) *TkCmd*] + set tk_ref [lindex $manual(name-$lref) $tk_i] + if {$tcl_i >= 0 && $manual(wing-file) eq "TclCmd" + || $manual(wing-file) eq "TclLib"} { + return "$ref" + } + if {$tk_i >= 0 && $manual(wing-file) eq "TkCmd" + || $manual(wing-file) eq "TkLib"} { + return "$ref" + } + if {$lref eq "exit" && $manual(tail) eq "tclsh.1" && $tcl_i >= 0} { + return "$ref" + } + puts stderr "multiple cross reference to $ref in $manual(name-$lref) from $manual(wing-file)/$manual(tail)" + return $ref + } + ## + ## exceptions, sigh, to the rule + ## + switch -exact -- $manual(tail) { + canvas.n { + if {$lref eq "focus"} { + upvar 1 tail tail + set clue [string first command $tail] + if {$clue < 0 || $clue > 5} { + return $ref + } + } + if {$lref in {bitmap image text}} { + return $ref + } + } + checkbutton.n - radiobutton.n { + if {$lref in {image}} { + return $ref + } + } + menu.n { + if {$lref in {checkbutton radiobutton}} { + return $ref + } + } + options.n { + if {$lref in {bitmap image set}} { + return $ref + } + } + regexp.n { + if {$lref in {string}} { + return $ref + } + } + source.n { + if {$lref in {text}} { + return $ref + } + } + history.n { + if {$lref in {exec}} { + return $ref + } + } + return.n { + if {$lref in {error continue break}} { + return $ref + } + } + scrollbar.n { + if {$lref in {set}} { + return $ref + } + } + } + ## + ## return the cross reference + ## + return "$ref" +} +## +## reference generation errors +## +proc reference-error {msg text} { + global manual + puts stderr "$manual(tail): $msg: {$text}" + return $text +} +## +## insert as many cross references into this text string as are appropriate +## +proc insert-cross-references {text} { + global manual + ## + ## we identify cross references by: + ## ``quotation'' + ## emboldening + ## Tcl_ prefix + ## Tk_ prefix + ## [a-zA-Z0-9]+ manual entry + ## and we avoid messing with already anchored text + ## + ## + ## find where each item lives + ## + array set offset [list \ + anchor [string first {} $text] \ + quote [string first {``} $text] \ + end-quote [string first {''} $text] \ + bold [string first {} $text] \ + end-bold [string first {} $text] \ + tcl [string first {Tcl_} $text] \ + tk [string first {Tk_} $text] \ + Tcl1 [string first {Tcl manual entry} $text] \ + Tcl2 [string first {Tcl overview manual entry} $text] \ + ] + ## + ## accumulate a list + ## + foreach name [array names offset] { + if {$offset($name) >= 0} { + set invert($offset($name)) $name + lappend offsets $offset($name) + } + } + ## + ## if nothing, then we're done. + ## + if {![info exists offsets]} { + return $text + } + ## + ## sort the offsets + ## + set offsets [lsort -integer $offsets] + ## + ## see which we want to use + ## + switch -exact -- $invert([lindex $offsets 0]) { + anchor { + if {$offset(end-anchor) < 0} { + return [reference-error {Missing end anchor} $text] + } + set head [string range $text 0 $offset(end-anchor)] + set tail [string range $text [expr {$offset(end-anchor)+1}] end] + return $head[insert-cross-references $tail] + } + quote { + if {$offset(end-quote) < 0} { + return [reference-error "Missing end quote" $text] + } + if {$invert([lindex $offsets 1]) eq "tk"} { + set offsets [lreplace $offsets 1 1] + } + if {$invert([lindex $offsets 1]) eq "tcl"} { + set offsets [lreplace $offsets 1 1] + } + switch -exact -- $invert([lindex $offsets 1]) { + end-quote { + set head [string range $text 0 [expr {$offset(quote)-1}]] + set body [string range $text [expr {$offset(quote)+2}] \ + [expr {$offset(end-quote)-1}]] + set tail [string range $text \ + [expr {$offset(end-quote)+2}] end] + return "$head``[cross-reference $body]''[insert-cross-references $tail]" + } + bold - + anchor { + set head [string range $text \ + 0 [expr {$offset(end-quote)+1}]] + set tail [string range $text \ + [expr {$offset(end-quote)+2}] end] + return "$head[insert-cross-references $tail]" + } + } + return [reference-error "Uncaught quote case" $text] + } + bold { + if {$offset(end-bold) < 0} { + return $text + } + if {$invert([lindex $offsets 1]) eq "tk"} { + set offsets [lreplace $offsets 1 1] + } + if {$invert([lindex $offsets 1]) eq "tcl"} { + set offsets [lreplace $offsets 1 1] + } + switch -exact -- $invert([lindex $offsets 1]) { + end-bold { + set head [string range $text 0 [expr {$offset(bold)-1}]] + set body [string range $text [expr {$offset(bold)+3}] \ + [expr {$offset(end-bold)-1}]] + set tail [string range $text \ + [expr {$offset(end-bold)+4}] end] + return "$head[cross-reference $body][insert-cross-references $tail]" + } + anchor { + set head [string range $text \ + 0 [expr {$offset(end-bold)+3}]] + set tail [string range $text \ + [expr {$offset(end-bold)+4}] end] + return "$head[insert-cross-references $tail]" + } + } + return [reference-error "Uncaught bold case" $text] + } + tk { + set head [string range $text 0 [expr {$offset(tk)-1}]] + set tail [string range $text $offset(tk) end] + if {![regexp {^(Tk_\w+)(.*)$} $tail all body tail]} { + return [reference-error "Tk regexp failed" $text] + } + return $head[cross-reference $body][insert-cross-references $tail] + } + tcl { + set head [string range $text 0 [expr {$offset(tcl)-1}]] + set tail [string range $text $offset(tcl) end] + if {![regexp {^(Tcl_\w+)(.*)$} $tail all body tail]} { + return [reference-error {Tcl regexp failed} $text] + } + return $head[cross-reference $body][insert-cross-references $tail] + } + Tcl1 - + Tcl2 { + set off [lindex $offsets 0] + set head [string range $text 0 [expr {$off-1}]] + set body Tcl + set tail [string range $text [expr {$off+3}] end] + return $head[cross-reference $body][insert-cross-references $tail] + } + end-anchor - + end-bold - + end-quote { + return [reference-error "Out of place $invert([lindex $offsets 0])" $text] + } + } +} +## +## process formatting directives +## +proc output-directive {line} { + global manual + # process format directive + split-directive $line code rest + switch -exact -- $code { + .BS - .BE { + # man-puts
+ } + .SH - .SS { + # drain any open lists + # announce the subject + set manual(section) $rest + # start our own stack of stuff + set manual($manual(name)-$manual(section)) {} + lappend manual(has-$manual(section)) $manual(name) + if {$code ne ".SS"} { + man-puts "

[long-toc $manual(section)]

" + } else { + man-puts "

[long-toc $manual(section)]

" + } + # some sections can simply free wheel their way through the text + # some sections can be processed in their own loops + switch -exact -- $manual(section) { + NAME { + if {$manual(tail) in {CrtImgType.3 CrtItemType.3 CrtPhImgFmt.3}} { + # these manual pages have two NAME sections + if {[info exists manual($manual(tail)-NAME)]} { + return + } + set manual($manual(tail)-NAME) 1 + } + set names {} + while {1} { + set line [next-text] + if {[is-a-directive $line]} { + backup-text 1 + output-name [join $names { }] + return + } else { + lappend names [string trim $line] + } + } + } + SYNOPSIS { + lappend manual(section-toc)
+ while {1} { + if { + [next-op-is .nf rest] + || [next-op-is .br rest] + || [next-op-is .fi rest] + } { + continue + } + if { + [next-op-is .SH rest] + || [next-op-is .SS rest] + || [next-op-is .BE rest] + || [next-op-is .SO rest] + } { + backup-text 1 + break + } + if {[next-op-is .sp rest]} { + #man-puts

+ continue + } + set more [next-text] + if {[is-a-directive $more]} { + manerror "in SYNOPSIS found $more" + backup-text 1 + break + } + foreach more [split $more \n] { + regexp {^(\s*)(.*)} $more -> spaces more + set spaces [string map {" " " "} $spaces] + if {[string length $spaces]} { + set spaces $spaces + } + man-puts $spaces$more
+ if {$manual(wing-file) in {TclLib TkLib}} { + lappend manual(section-toc)

$more + } + } + } + lappend manual(section-toc)
+ return + } + {SEE ALSO} { + while {[more-text]} { + if {[next-op-is .SH rest] || [next-op-is .SS rest]} { + backup-text 1 + return + } + set more [next-text] + if {[is-a-directive $more]} { + manerror "$more" + backup-text 1 + return + } + set nmore {} + foreach cr [split $more ,] { + set cr [string trim $cr] + if {![regexp {^.*$} $cr]} { + set cr $cr + } + if {[regexp {^(.*)\([13n]\)$} $cr all name]} { + set cr $name + } + lappend nmore $cr + } + man-puts [join $nmore {, }] + } + return + } + KEYWORDS { + while {[more-text]} { + if {[next-op-is .SH rest] || [next-op-is .SS rest]} { + backup-text 1 + return + } + set more [next-text] + if {[is-a-directive $more]} { + manerror "$more" + backup-text 1 + return + } + set keys {} + foreach key [split $more ,] { + set key [string trim $key] + lappend manual(keyword-$key) [list $manual(name) $manual(wing-file)/$manual(name).htm] + set initial [string toupper [string index $key 0]] + lappend keys "
$key" + } + man-puts [join $keys {, }] + } + return + } + } + if {[next-op-is .IP rest]} { + output-IP-list $code .IP $rest + return + } + if {[next-op-is .PP rest]} { + return + } + return + } + .SO { + # When there's a sequence of multiple .SO chunks, process into one + set optslist {} + while 1 { + if {[match-text @stuff .SE]} { + foreach opt [split $stuff \n\t] { + lappend optslist [list $opt $rest] + } + } else { + manerror "unexpected .SO format:\n[expand-next-text 2]" + } + if {![next-op-is .SO rest]} { + break + } + } + output-directive {.SH STANDARD OPTIONS} + man-puts
+ lappend manual(section-toc)
+ foreach optionpair [lsort -dictionary -index 0 $optslist] { + lassign $optionpair option targetPage + man-puts "
[std-option-toc $option $targetPage]" + } + man-puts
+ lappend manual(section-toc)
+ } + .OP { + output-widget-options $rest + return + } + .IP { + output-IP-list .IP .IP $rest + return + } + .PP { + man-puts

+ } + .RS { + output-RS-list + return + } + .RE { + manerror "unexpected .RE" + return + } + .br { + man-puts
+ return + } + .DE { + manerror "unexpected .DE" + return + } + .DS { + if {[next-op-is .ta rest]} { + # skip the leading .ta directive if it is there + } + if {[match-text @stuff .DE]} { + set td "

$td \t $td] \n$stuff] + man-puts "

" + set bodyText [string map [list \n

$bodyText
" + #man-puts
$stuff
+ } elseif {[match-text .fi @ul1 @ul2 .nf @stuff .DE]} { + man-puts "
[lindex $ul1 1][lindex $ul2 1]\n$stuff
" + } else { + manerror "unexpected .DS format:\n[expand-next-text 2]" + } + return + } + .CS { + if {[next-op-is .ta rest]} { + # ??? + } + if {[match-text @stuff .CE]} { + man-puts
$stuff
+ } else { + manerror "unexpected .CS format:\n[expand-next-text 2]" + } + return + } + .CE { + manerror "unexpected .CE" + return + } + .sp { + man-puts

+ } + .ta { + # these are tab stop settings for short tables + switch -exact -- $manual(name):$manual(section) { + {bind:MODIFIERS} - + {bind:EVENT TYPES} - + {bind:BINDING SCRIPTS AND SUBSTITUTIONS} - + {expr:OPERANDS} - + {expr:MATH FUNCTIONS} - + {history:DESCRIPTION} - + {history:HISTORY REVISION} - + {switch:DESCRIPTION} - + {upvar:DESCRIPTION} { + return; # fix.me + } + default { + manerror "ignoring $line" + } + } + } + .nf { + if {[match-text @more .fi]} { + foreach more [split $more \n] { + man-puts $more
+ } + } elseif {[match-text .RS @more .RE .fi]} { + man-puts

+ foreach more [split $more \n] { + man-puts $more
+ } + man-puts
+ } elseif {[match-text .RS @more .RS @more2 .RE .RE .fi]} { + man-puts
+ foreach more [split $more \n] { + man-puts $more
+ } + man-puts
+ foreach more2 [split $more2 \n] { + man-puts $more2
+ } + man-puts
+ } elseif {[match-text .RS @more .RS @more2 .RE @more3 .RE .fi]} { + man-puts
+ foreach more [split $more \n] { + man-puts $more
+ } + man-puts
+ foreach more2 [split $more2 \n] { + man-puts $more2
+ } + man-puts
+ foreach more3 [split $more3 \n] { + man-puts $more3
+ } + man-puts
+ } elseif {[match-text .sp .RS @more .RS @more2 .sp .RE .RE .fi]} { + man-puts

+ foreach more [split $more \n] { + man-puts $more
+ } + man-puts
+ foreach more2 [split $more2 \n] { + man-puts $more2
+ } + man-puts

+ } elseif {[match-text .RS .sp @more .sp .RE .fi]} { + man-puts

+ foreach more [split $more \n] { + man-puts $more
+ } + man-puts

+ } else { + manerror "ignoring $line" + } + } + .fi { + manerror "ignoring $line" + } + .na - + .ad - + .UL - + .ne { + manerror "ignoring $line" + } + default { + manerror "unrecognized format directive: $line" + } + } +} +## +## merge copyright listings +## +proc merge-copyrights {l1 l2} { + set merge {} + set re1 {^Copyright +(?:\(c\)|\\\(co|©) +(\w.*?)(?:all rights reserved)?(?:\. )*$} + set re2 {^(\d+) +(?:by +)?(\w.*)$} ;# date who + set re3 {^(\d+)-(\d+) +(?:by +)?(\w.*)$} ;# from to who + set re4 {^(\d+), *(\d+) +(?:by +)?(\w.*)$} ;# date1 date2 who + foreach copyright [concat $l1 $l2] { + if {[regexp -nocase -- $re1 $copyright -> info]} { + set info [string trimright $info ". "] ; # remove extra period + if {[regexp -- $re2 $info -> date who]} { + lappend dates($who) $date + continue + } elseif {[regexp -- $re3 $info -> from to who]} { + for {set date $from} {$date <= $to} {incr date} { + lappend dates($who) $date + } + continue + } elseif {[regexp -- $re3 $info -> date1 date2 who]} { + lappend dates($who) $date1 $date2 + continue + } + } + puts "oops: $copyright" + } + foreach who [array names dates] { + set list [lsort -dictionary $dates($who)] + if {[llength $list] == 1 || [lindex $list 0] eq [lrange $list end end]} { + lappend merge "Copyright © [lindex $list 0] $who" + } else { + lappend merge "Copyright © [lindex $list 0]-[lrange $list end end] $who" + } + } + return [lsort -dictionary $merge] +} + +proc makedirhier {dir} { + if {![file isdirectory $dir] && \ + [catch {file mkdir $dir} error]} { + return -code error "cannot create directory $dir: $error" + } +} + +proc addbuffer {args} { + global manual + if {$manual(partial-text) ne ""} { + append manual(partial-text) \n + } + append manual(partial-text) [join $args ""] +} +proc flushbuffer {} { + global manual + if {$manual(partial-text) ne ""} { + lappend manual(text) [process-text $manual(partial-text)] + set manual(partial-text) "" + } +} + +return diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index c0c2ce5..ba4fad6 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -26,7 +26,7 @@ proc parse_command_line {} { # These variables determine where the man pages come from and where # the converted pages go to. - global tcltkdir tkdir tcldir webdir build_tcl build_tk + global tcltkdir tkdir tcldir webdir build_tcl build_tk verbose # Set defaults based on original code. set tcltkdir ../.. @@ -35,6 +35,7 @@ proc parse_command_line {} { set webdir ../html set build_tcl 0 set build_tk 0 + set verbose 0 # Default search version is a glob pattern set useversion {{,[8-9].[0-9]{,[.ab][0-9]{,[0-9]}}}} @@ -61,6 +62,7 @@ proc parse_command_line {} { puts " --tcl build tcl help" puts " --tk build tk help" puts " --useversion version of tcl/tk to search for" + puts " --verbose whether to print longer messages" exit 0 } @@ -87,6 +89,10 @@ proc parse_command_line {} { set build_tk 1 } + --verbose=* { + set verbose [string range $option \ + [string length --verbose=] end] + } default { puts stderr "tcltk-man-html: unrecognized option -- `$option'" exit 1 @@ -121,6 +127,8 @@ proc parse_command_line {} { puts "using Tk source directory $tkdir" } + puts "verbose messages are [expr {$verbose ? {on} : {off}}]" + # the title for the man pages overall global overall_title set overall_title "" @@ -141,1358 +149,91 @@ proc capitalize {string} { } ## +## Source the utility functions that provide most of the +## implementation of the transformation from nroff to html. ## -## -set manual(report-level) 1 - -proc manerror {msg} { - global manual - set name {} - set subj {} - set procname [lindex [info level -1] 0] - if {[info exists manual(name)]} { - set name $manual(name) - } - if {[info exists manual(section)] && [string length $manual(section)]} { - puts stderr "$name: $manual(section): $procname: $msg" - } else { - puts stderr "$name: $procname: $msg" - } -} - -proc manreport {level msg} { - global manual - if {$level < $manual(report-level)} { - uplevel 1 [list manerror $msg] - } -} - -proc fatal {msg} { - global manual - uplevel 1 [list manerror $msg] - exit 1 -} +source [file join [file dirname [info script]] tcltk-man2html-utils.tcl] ## -## templating +## Returns the style sheet. ## -proc indexfile {} { - if {[info exists ::TARGET] && $::TARGET eq "devsite"} { - return "index.tml" - } else { - return "contents.htm" - } -} -proc copyright {copyright {level {}}} { - # We don't actually generate a separate copyright page anymore - #set page "${level}copyright.htm" - #return "Copyright © [htmlize-text [lrange $copyright 2 end]]" - # obfuscate any email addresses that may appear in name - set who [string map {@ (at)} [lrange $copyright 2 end]] - return "Copyright © [htmlize-text $who]" -} -proc copyout {copyrights {level {}}} { - set out "

" - foreach c $copyrights { - append out "[copyright $c $level]\n" - } - append out "
" - return $out -} -proc CSS {{level ""}} { - return "\n" -} -proc DOCTYPE {} { - return "" +proc css-style args { + upvar 1 style style + set body [uplevel 1 [list subst [lindex $args end]]] + set tokens [join [lrange $args 0 end-1] ", "] + append style $tokens " \{" $body "\}\n" } -proc htmlhead {title header args} { - set level "" - if {[lindex $args end] eq "../[indexfile]"} { - # XXX hack - assume same level for CSS file - set level "../" - } - set out "[DOCTYPE]\n\n$title\n[CSS $level]\n" - foreach {uptitle url} $args { - set header "$uptitle > $header" - } - append out "

$header

" - global manual - if {[info exists manual(subheader)]} { - set subs {} - foreach {name subdir} $manual(subheader) { - if {$name eq $title} { - lappend subs $name - } else { - lappend subs "$name" - } - } - append out "\n

[join $subs { | }]

" - } - return $out -} -proc gencss {} { +proc css-stylesheet {} { set hBd "1px dotted #11577b" - return [subst { -body, div, p, th, td, li, dd, ul, ol, dl, dt, blockquote { - font-family: Verdana, sans-serif; -} - -pre, code { font-family: 'Courier New', Courier, monospace; } - -pre { - background-color: #f6fcec; - border-top: 1px solid #6A6A6A; - border-bottom: 1px solid #6A6A6A; - padding: 1em; - overflow: auto; -} - -body { - background-color: #FFFFFF; - font-size: 12px; - line-height: 1.25; - letter-spacing: .2px; - padding-left: .5em; -} - -h1, h2, h3, h4 { - font-family: Georgia, serif; - padding-left: 1em; - margin-top: 1em; -} - -h1 { - font-size: 18px; - color: #11577b; - border-bottom: $hBd; - margin-top: 0px; -} - -h2 { - font-size: 14px; - color: #11577b; - background-color: #c5dce8; - padding-left: 1em; - border: 1px solid #6A6A6A; -} - -h3, h4 { - color: #1674A4; - background-color: #e8f2f6; - border-bottom: $hBd; - border-top: $hBd; -} - -h3 { font-size: 12px; } -h4 { font-size: 11px; } - -.keylist dt, .arguments dt { - width: 20em; - float: left; - padding: 2px; - border-top: 1px solid #999; -} - -.keylist dt { font-weight: bold; } - -.keylist dd, .arguments dd { - margin-left: 20em; - padding: 2px; - border-top: 1px solid #999; -} - -.copy { - background-color: #f6fcfc; - white-space: pre; - font-size: 80%; - border-top: 1px solid #6A6A6A; - margin-top: 2em; -} -}] -} - -## -## parsing -## -proc unquote arg { - return [string map [list \" {}] $arg] -} -proc parse-directive {line codename restname} { - upvar 1 $codename code $restname rest - return [regexp {^(\.[.a-zA-Z0-9]*) *(.*)} $line all code rest] -} - -proc htmlize-text {text {charmap {}}} { - # contains some extras for use in nroff->html processing - # build on the list passed in, if any - lappend charmap \ - {&} {&} \ - {\\} "\" \ - {\e} "\" \ - {\ } { } \ - {\|} { } \ - {\0} { } \ - \" {"} \ - {<} {<} \ - {>} {>} \ - \u201c "“" \ - \u201d "”" - - return [string map $charmap $text] -} - -proc process-text {text} { - global manual - # preprocess text; note that this is an incomplete map, and will probably - # need to have things added to it as the manuals expand to use them. - set charmap [list \ - {\&} "\t" \ - {\%} {} \ - "\\\n" "\n" \ - {\(+-} "±" \ - {\(co} "©" \ - {\(em} "—" \ - {\(fm} "′" \ - {\(mu} "×" \ - {\(mi} "−" \ - {\(->} "" \ - {\fP} {\fR} \ - {\.} . \ - {\(bu} "•" \ - ] - lappend charmap {\o'o^'} {ô} ; # o-circumflex in re_syntax.n - lappend charmap {\-\|\-} -- ; # two hyphens - lappend charmap {\-} - ; # a hyphen - - set text [htmlize-text $text $charmap] - # General quoted entity - regsub -all {\\N'(\d+)'} $text "\\&#\\1;" text - while {[string first "\\" $text] >= 0} { - # C R - if {[regsub {^([^\\]*)\\fC([^\\]*)\\fR(.*)$} $text \ - {\1\2\3} text]} continue - # B R - if {[regsub {^([^\\]*)\\fB([^\\]*)\\fR(.*)$} $text \ - {\1\2\3} text]} continue - # B I - if {[regsub {^([^\\]*)\\fB([^\\]*)\\fI(.*)$} $text \ - {\1\2\\fI\3} text]} continue - # I R - if {[regsub {^([^\\]*)\\fI([^\\]*)\\fR(.*)$} $text \ - {\1\2\3} text]} continue - # I B - if {[regsub {^([^\\]*)\\fI([^\\]*)\\fB(.*)$} $text \ - {\1\2\\fB\3} text]} continue - # B B, I I, R R - if { - [regsub {^([^\\]*)\\fB([^\\]*)\\fB(.*)$} $text \ - {\1\\fB\2\3} ntext] - || [regsub {^([^\\]*)\\fI([^\\]*)\\fI(.*)$} $text \ - {\1\\fI\2\3} ntext] - || [regsub {^([^\\]*)\\fR([^\\]*)\\fR(.*)$} $text \ - {\1\\fR\2\3} ntext] - } { - manerror "impotent font change: $text" - set text $ntext - continue - } - # unrecognized - manerror "uncaught backslash: $text" - set text [string map [list "\\" "\"] $text] - } - return $text -} -## -## pass 2 text input and matching -## -proc open-text {} { - global manual - set manual(text-length) [llength $manual(text)] - set manual(text-pointer) 0 -} -proc more-text {} { - global manual - return [expr {$manual(text-pointer) < $manual(text-length)}] -} -proc next-text {} { - global manual - if {[more-text]} { - set text [lindex $manual(text) $manual(text-pointer)] - incr manual(text-pointer) - return $text - } - manerror "read past end of text" - error "fatal" -} -proc is-a-directive {line} { - return [string match .* $line] -} -proc split-directive {line opname restname} { - upvar 1 $opname op $restname rest - set op [string range $line 0 2] - set rest [string trim [string range $line 3 end]] -} -proc next-op-is {op restname} { - global manual - upvar 1 $restname rest - if {[more-text]} { - set text [lindex $manual(text) $manual(text-pointer)] - if {[string equal -length 3 $text $op]} { - set rest [string range $text 4 end] - incr manual(text-pointer) - return 1 - } - } - return 0 -} -proc backup-text {n} { - global manual - if {$manual(text-pointer)-$n >= 0} { - incr manual(text-pointer) -$n - } -} -proc match-text args { - global manual - set nargs [llength $args] - if {$manual(text-pointer) + $nargs > $manual(text-length)} { - return 0 - } - set nback 0 - foreach arg $args { - if {![more-text]} { - backup-text $nback - return 0 - } - set arg [string trim $arg] - set targ [string trim [lindex $manual(text) $manual(text-pointer)]] - if {$arg eq $targ} { - incr nback - incr manual(text-pointer) - continue - } - if {[regexp {^@(\w+)$} $arg all name]} { - upvar 1 $name var - set var $targ - incr nback - incr manual(text-pointer) - continue - } - if {[regexp -nocase {^(\.[A-Z][A-Z])@(\w+)$} $arg all op name]\ - && [string equal $op [lindex $targ 0]]} { - upvar 1 $name var - set var [lrange $targ 1 end] - incr nback - incr manual(text-pointer) - continue - } - backup-text $nback - return 0 - } - return 1 -} -proc expand-next-text {n} { - global manual - return [join [lrange $manual(text) $manual(text-pointer) \ - [expr {$manual(text-pointer)+$n-1}]] \n\n] -} -## -## pass 2 output -## -proc man-puts {text} { - global manual - lappend manual(output-$manual(wing-file)-$manual(name)) $text -} - -## -## build hypertext links to tables of contents -## -proc long-toc {text} { - global manual - set here M[incr manual(section-toc-n)] - set manual($manual(name)-id-$text) $here - set there L[incr manual(long-toc-n)] - lappend manual(section-toc) \ - "
$text" - return "$text" -} -proc option-toc {name class switch} { - global manual - if {[string match "*OPTIONS" $manual(section)]} { - if {$manual(name) ne "ttk_widget" && ($manual(name) ne "ttk_entry" || - ![string match validate* $name])} { - # link the defined option into the long table of contents - set link [long-toc "$switch, $name, $class"] - regsub -- "$switch, $name, $class" $link "$switch" link - return $link - } - } elseif {"$manual(name):$manual(section)" ne "options:DESCRIPTION"} { - error "option-toc in $manual(name) section $manual(section)" - } - - # link the defined standard option to the long table of contents and make - # a target for the standard option references from other man pages. - - set first [lindex $switch 0] - set here M$first - set there L[incr manual(long-toc-n)] - set manual(standard-option-$manual(name)-$first) \ - "$switch, $name, $class" - lappend manual(section-toc) \ - "
$switch, $name, $class" - return "$switch" -} -proc std-option-toc {name page} { - global manual - if {[info exists manual(standard-option-$page-$name)]} { - lappend manual(section-toc)
$manual(standard-option-$page-$name) - return $manual(standard-option-$page-$name) - } - manerror "missing reference to \"$name\" in $page.n" - set here M[incr manual(section-toc-n)] - set there L[incr manual(long-toc-n)] - set other M$name - lappend manual(section-toc) "
$name" - return "$name" -} -## -## process the widget option section -## in widget and options man pages -## -proc output-widget-options {rest} { - global manual - man-puts
- lappend manual(section-toc)
- backup-text 1 - set para {} - while {[next-op-is .OP rest]} { - switch -exact -- [llength $rest] { - 3 { - lassign $rest switch name class - } - 5 { - set switch [lrange $rest 0 2] - set name [lindex $rest 3] - set class [lindex $rest 4] - } - default { - fatal "bad .OP $rest" - } - } - if {![regexp {^(<.>)([-\w ]+)()$} $switch \ - all oswitch switch cswitch]} { - if {![regexp {^(<.>)([-\w ]+) or ([-\w ]+)()$} $switch \ - all oswitch switch1 switch2 cswitch]} { - error "not Switch: $switch" - } - set switch "$switch1$cswitch or $oswitch$switch2" - } - if {![regexp {^(<.>)([\w]*)()$} $name all oname name cname]} { - error "not Name: $name" - } - if {![regexp {^(<.>)([\w]*)()$} $class all oclass class cclass]} { - error "not Class: $class" - } - man-puts "$para
Command-Line Name: $oswitch[option-toc $name $class $switch]$cswitch" - man-puts "
Database Name: $oname$name$cname" - man-puts "
Database Class: $oclass$class$cclass" - man-puts
[next-text] - set para

- - if {[next-op-is .RS rest]} { - while {[more-text]} { - set line [next-text] - if {[is-a-directive $line]} { - split-directive $line code rest - switch -exact -- $code { - .RE { - break - } - .SH - .SS { - manerror "unbalanced .RS at section end" - backup-text 1 - break - } - default { - output-directive $line - } - } - } else { - man-puts $line - } - } - } - } - man-puts

- lappend manual(section-toc)
-} - -## -## process .RS lists -## -proc output-RS-list {} { - global manual - if {[next-op-is .IP rest]} { - output-IP-list .RS .IP $rest - if {[match-text .RE .sp .RS @rest .IP @rest2]} { - man-puts

$rest - output-IP-list .RS .IP $rest2 - } - if {[match-text .RE .sp .RS @rest .RE]} { - man-puts

$rest - return - } - if {[next-op-is .RE rest]} { - return - } - } - man-puts

- while {[more-text]} { - set line [next-text] - if {[is-a-directive $line]} { - split-directive $line code rest - switch -exact -- $code { - .RE { - break - } - .SH - .SS { - manerror "unbalanced .RS at section end" - backup-text 1 - break - } - default { - output-directive $line - } - } - } else { - man-puts $line - } - } - man-puts
-} - -## -## process .IP lists which may be plain indents, -## numeric lists, or definition lists -## -proc output-IP-list {context code rest} { - global manual - if {![string length $rest]} { - # blank label, plain indent, no contents entry - man-puts
- while {[more-text]} { - set line [next-text] - if {[is-a-directive $line]} { - split-directive $line code rest - if {$code eq ".IP" && $rest eq {}} { - man-puts "

" - continue - } - if {$code in {.br .DS .RS}} { - output-directive $line - } else { - backup-text 1 - break - } - } else { - man-puts $line - } - } - man-puts

- } else { - # labelled list, make contents - if {$context ne ".SH" && $context ne ".SS"} { - man-puts

- } - set dl "

" - man-puts $dl - lappend manual(section-toc) $dl - backup-text 1 - set accept_RE 0 - set para {} - while {[more-text]} { - set line [next-text] - if {[is-a-directive $line]} { - split-directive $line code rest - switch -exact -- $code { - .IP { - if {$accept_RE} { - output-IP-list .IP $code $rest - continue - } - if {$manual(section) eq "ARGUMENTS" || \ - [regexp {^\[\d+\]$} $rest]} { - man-puts "$para
$rest
" - } elseif {"•" eq $rest} { - man-puts "$para
$rest " - } else { - man-puts "$para
[long-toc $rest]
" - } - if {"$manual(name):$manual(section)" eq \ - "selection:DESCRIPTION"} { - if {[match-text .RE @rest .RS .RS]} { - man-puts
[long-toc $rest]
- } - } - } - .sp - .br - .DS - .CS { - output-directive $line - } - .RS { - if {[match-text .RS]} { - output-directive $line - incr accept_RE 1 - } elseif {[match-text .CS]} { - output-directive .CS - incr accept_RE 1 - } elseif {[match-text .PP]} { - output-directive .PP - incr accept_RE 1 - } elseif {[match-text .DS]} { - output-directive .DS - incr accept_RE 1 - } else { - output-directive $line - } - } - .PP { - if {[match-text @rest1 .br @rest2 .RS]} { - # yet another nroff kludge as above - man-puts "$para
[long-toc $rest1]" - man-puts "
[long-toc $rest2]
" - incr accept_RE 1 - } elseif {[match-text @rest .RE]} { - # gad, this is getting ridiculous - if {!$accept_RE} { - man-puts "

$rest

" - backup-text 1 - set para {} - break - } else { - man-puts "

$rest" - incr accept_RE -1 - } - } elseif {$accept_RE} { - output-directive $line - } else { - backup-text 1 - break - } - } - .RE { - if {!$accept_RE} { - backup-text 1 - break - } - incr accept_RE -1 - } - default { - backup-text 1 - break - } - } - } else { - man-puts $line - } - set para

- } - man-puts "$para

" - lappend manual(section-toc) - if {$accept_RE} { - manerror "missing .RE in output-IP-list" - } - } -} -## -## handle the NAME section lines -## there's only one line in the NAME section, -## consisting of a comma separated list of names, -## followed by a hyphen and a short description. -## -proc output-name {line} { - global manual - # split name line into pieces - regexp {^([^-]+) - (.*)$} $line all head tail - # output line to manual page untouched - man-puts $line - # output line to long table of contents - lappend manual(section-toc)
$line
- # separate out the names for future reference - foreach name [split $head ,] { - set name [string trim $name] - if {[llength $name] > 1} { - manerror "name has a space: {$name}\nfrom: $line" - } - lappend manual(wing-toc) $name - lappend manual(name-$name) $manual(wing-file)/$manual(name) - } -} -## -## build a cross-reference link if appropriate -## -proc cross-reference {ref} { - global manual - if {[string match "Tcl_*" $ref]} { - set lref $ref - } elseif {[string match "Tk_*" $ref]} { - set lref $ref - } elseif {$ref eq "Tcl"} { - set lref $ref - } elseif {[regexp {^[A-Z0-9 ?!]+$} $ref]} { - if {[info exists manual($manual(name)-id-$ref)]} { - return "$ref" - } - set lref [string tolower $ref] - } else { - set lref [string tolower $ref] - } - ## - ## nothing to reference - ## - if {![info exists manual(name-$lref)]} { - foreach name { - array file history info interp string trace after clipboard grab - image option pack place selection tk tkwait update winfo wm - } { - if {[regexp "^$name \[a-z0-9]*\$" $lref] && \ - [info exists manual(name-$name)] && \ - $manual(tail) ne "$name.n"} { - return "$ref" - } - } - if {$lref in {stdin stdout stderr end}} { - # no good place to send these - # tcl tokens? - # also end - } - return $ref - } - ## - ## would be a self reference - ## - foreach name $manual(name-$lref) { - if {"$manual(wing-file)/$manual(name)" in $name} { - return $ref - } - } - ## - ## multiple choices for reference - ## - if {[llength $manual(name-$lref)] > 1} { - set tcl_i [lsearch -glob $manual(name-$lref) *TclCmd*] - set tcl_ref [lindex $manual(name-$lref) $tcl_i] - set tk_i [lsearch -glob $manual(name-$lref) *TkCmd*] - set tk_ref [lindex $manual(name-$lref) $tk_i] - if {$tcl_i >= 0 && $manual(wing-file) eq "TclCmd" - || $manual(wing-file) eq "TclLib"} { - return "$ref" - } - if {$tk_i >= 0 && $manual(wing-file) eq "TkCmd" - || $manual(wing-file) eq "TkLib"} { - return "$ref" - } - if {$lref eq "exit" && $manual(tail) eq "tclsh.1" && $tcl_i >= 0} { - return "$ref" - } - puts stderr "multiple cross reference to $ref in $manual(name-$lref) from $manual(wing-file)/$manual(tail)" - return $ref - } - ## - ## exceptions, sigh, to the rule - ## - switch -exact -- $manual(tail) { - canvas.n { - if {$lref eq "focus"} { - upvar 1 tail tail - set clue [string first command $tail] - if {$clue < 0 || $clue > 5} { - return $ref - } - } - if {$lref in {bitmap image text}} { - return $ref - } - } - checkbutton.n - radiobutton.n { - if {$lref in {image}} { - return $ref - } - } - menu.n { - if {$lref in {checkbutton radiobutton}} { - return $ref - } - } - options.n { - if {$lref in {bitmap image set}} { - return $ref - } - } - regexp.n { - if {$lref in {string}} { - return $ref - } - } - source.n { - if {$lref in {text}} { - return $ref - } - } - history.n { - if {$lref in {exec}} { - return $ref - } - } - return.n { - if {$lref in {error continue break}} { - return $ref - } - } - scrollbar.n { - if {$lref in {set}} { - return $ref - } - } - } - ## - ## return the cross reference - ## - return "$ref" -} -## -## reference generation errors -## -proc reference-error {msg text} { - global manual - puts stderr "$manual(tail): $msg: {$text}" - return $text -} -## -## insert as many cross references into this text string as are appropriate -## -proc insert-cross-references {text} { - global manual - ## - ## we identify cross references by: - ## ``quotation'' - ## emboldening - ## Tcl_ prefix - ## Tk_ prefix - ## [a-zA-Z0-9]+ manual entry - ## and we avoid messing with already anchored text - ## - ## - ## find where each item lives - ## - array set offset [list \ - anchor [string first {} $text] \ - quote [string first {``} $text] \ - end-quote [string first {''} $text] \ - bold [string first {} $text] \ - end-bold [string first {} $text] \ - tcl [string first {Tcl_} $text] \ - tk [string first {Tk_} $text] \ - Tcl1 [string first {Tcl manual entry} $text] \ - Tcl2 [string first {Tcl overview manual entry} $text] \ - ] - ## - ## accumulate a list - ## - foreach name [array names offset] { - if {$offset($name) >= 0} { - set invert($offset($name)) $name - lappend offsets $offset($name) - } - } - ## - ## if nothing, then we're done. - ## - if {![info exists offsets]} { - return $text - } - ## - ## sort the offsets - ## - set offsets [lsort -integer $offsets] - ## - ## see which we want to use - ## - switch -exact -- $invert([lindex $offsets 0]) { - anchor { - if {$offset(end-anchor) < 0} { - return [reference-error {Missing end anchor} $text] - } - set head [string range $text 0 $offset(end-anchor)] - set tail [string range $text [expr {$offset(end-anchor)+1}] end] - return $head[insert-cross-references $tail] - } - quote { - if {$offset(end-quote) < 0} { - return [reference-error "Missing end quote" $text] - } - if {$invert([lindex $offsets 1]) eq "tk"} { - set offsets [lreplace $offsets 1 1] - } - if {$invert([lindex $offsets 1]) eq "tcl"} { - set offsets [lreplace $offsets 1 1] - } - switch -exact -- $invert([lindex $offsets 1]) { - end-quote { - set head [string range $text 0 [expr {$offset(quote)-1}]] - set body [string range $text [expr {$offset(quote)+2}] \ - [expr {$offset(end-quote)-1}]] - set tail [string range $text \ - [expr {$offset(end-quote)+2}] end] - return "$head``[cross-reference $body]''[insert-cross-references $tail]" - } - bold - - anchor { - set head [string range $text \ - 0 [expr {$offset(end-quote)+1}]] - set tail [string range $text \ - [expr {$offset(end-quote)+2}] end] - return "$head[insert-cross-references $tail]" - } - } - return [reference-error "Uncaught quote case" $text] - } - bold { - if {$offset(end-bold) < 0} { - return $text - } - if {$invert([lindex $offsets 1]) eq "tk"} { - set offsets [lreplace $offsets 1 1] - } - if {$invert([lindex $offsets 1]) eq "tcl"} { - set offsets [lreplace $offsets 1 1] - } - switch -exact -- $invert([lindex $offsets 1]) { - end-bold { - set head [string range $text 0 [expr {$offset(bold)-1}]] - set body [string range $text [expr {$offset(bold)+3}] \ - [expr {$offset(end-bold)-1}]] - set tail [string range $text \ - [expr {$offset(end-bold)+4}] end] - return "$head[cross-reference $body][insert-cross-references $tail]" - } - anchor { - set head [string range $text \ - 0 [expr {$offset(end-bold)+3}]] - set tail [string range $text \ - [expr {$offset(end-bold)+4}] end] - return "$head[insert-cross-references $tail]" - } - } - return [reference-error "Uncaught bold case" $text] - } - tk { - set head [string range $text 0 [expr {$offset(tk)-1}]] - set tail [string range $text $offset(tk) end] - if {![regexp {^(Tk_\w+)(.*)$} $tail all body tail]} { - return [reference-error "Tk regexp failed" $text] - } - return $head[cross-reference $body][insert-cross-references $tail] - } - tcl { - set head [string range $text 0 [expr {$offset(tcl)-1}]] - set tail [string range $text $offset(tcl) end] - if {![regexp {^(Tcl_\w+)(.*)$} $tail all body tail]} { - return [reference-error {Tcl regexp failed} $text] - } - return $head[cross-reference $body][insert-cross-references $tail] - } - Tcl1 - - Tcl2 { - set off [lindex $offsets 0] - set head [string range $text 0 [expr {$off-1}]] - set body Tcl - set tail [string range $text [expr {$off+3}] end] - return $head[cross-reference $body][insert-cross-references $tail] - } - end-anchor - - end-bold - - end-quote { - return [reference-error "Out of place $invert([lindex $offsets 0])" $text] - } - } -} -## -## process formatting directives -## -proc output-directive {line} { - global manual - # process format directive - split-directive $line code rest - switch -exact -- $code { - .BS - .BE { - # man-puts
- } - .SH - .SS { - # drain any open lists - # announce the subject - set manual(section) $rest - # start our own stack of stuff - set manual($manual(name)-$manual(section)) {} - lappend manual(has-$manual(section)) $manual(name) - if {$code ne ".SS"} { - man-puts "

[long-toc $manual(section)]

" - } else { - man-puts "

[long-toc $manual(section)]

" - } - # some sections can simply free wheel their way through the text - # some sections can be processed in their own loops - switch -exact -- $manual(section) { - NAME { - if {$manual(tail) in {CrtImgType.3 CrtItemType.3 CrtPhImgFmt.3}} { - # these manual pages have two NAME sections - if {[info exists manual($manual(tail)-NAME)]} { - return - } - set manual($manual(tail)-NAME) 1 - } - set names {} - while {1} { - set line [next-text] - if {[is-a-directive $line]} { - backup-text 1 - output-name [join $names { }] - return - } else { - lappend names [string trim $line] - } - } - } - SYNOPSIS { - lappend manual(section-toc)
- while {1} { - if { - [next-op-is .nf rest] - || [next-op-is .br rest] - || [next-op-is .fi rest] - } { - continue - } - if { - [next-op-is .SH rest] - || [next-op-is .SS rest] - || [next-op-is .BE rest] - || [next-op-is .SO rest] - } { - backup-text 1 - break - } - if {[next-op-is .sp rest]} { - #man-puts

- continue - } - set more [next-text] - if {[is-a-directive $more]} { - manerror "in SYNOPSIS found $more" - backup-text 1 - break - } - foreach more [split $more \n] { - man-puts $more
- if {$manual(wing-file) in {TclLib TkLib}} { - lappend manual(section-toc)

$more - } - } - } - lappend manual(section-toc)
- return - } - {SEE ALSO} { - while {[more-text]} { - if {[next-op-is .SH rest] || [next-op-is .SS rest]} { - backup-text 1 - return - } - set more [next-text] - if {[is-a-directive $more]} { - manerror "$more" - backup-text 1 - return - } - set nmore {} - foreach cr [split $more ,] { - set cr [string trim $cr] - if {![regexp {^.*$} $cr]} { - set cr $cr - } - if {[regexp {^(.*)\([13n]\)$} $cr all name]} { - set cr $name - } - lappend nmore $cr - } - man-puts [join $nmore {, }] - } - return - } - KEYWORDS { - while {[more-text]} { - if {[next-op-is .SH rest] || [next-op-is .SS rest]} { - backup-text 1 - return - } - set more [next-text] - if {[is-a-directive $more]} { - manerror "$more" - backup-text 1 - return - } - set keys {} - foreach key [split $more ,] { - set key [string trim $key] - lappend manual(keyword-$key) [list $manual(name) $manual(wing-file)/$manual(name).htm] - set initial [string toupper [string index $key 0]] - lappend keys "
$key" - } - man-puts [join $keys {, }] - } - return - } - } - if {[next-op-is .IP rest]} { - output-IP-list $code .IP $rest - return - } - if {[next-op-is .PP rest]} { - return - } - return - } - .SO { - # When there's a sequence of multiple .SO chunks, process into one - set optslist {} - while 1 { - if {[match-text @stuff .SE]} { - foreach opt [split $stuff \n\t] { - lappend optslist [list $opt $rest] - } - } else { - manerror "unexpected .SO format:\n[expand-next-text 2]" - } - if {![next-op-is .SO rest]} { - break - } - } - output-directive {.SH STANDARD OPTIONS} - man-puts
- lappend manual(section-toc)
- foreach optionpair [lsort -dictionary -index 0 $optslist] { - lassign $optionpair option targetPage - man-puts "
[std-option-toc $option $targetPage]" - } - man-puts
- lappend manual(section-toc)
- } - .OP { - output-widget-options $rest - return - } - .IP { - output-IP-list .IP .IP $rest - return - } - .PP { - man-puts

- } - .RS { - output-RS-list - return - } - .RE { - manerror "unexpected .RE" - return - } - .br { - man-puts
- return - } - .DE { - manerror "unexpected .DE" - return - } - .DS { - if {[next-op-is .ta rest]} { - # skip the leading .ta directive if it is there - } - if {[match-text @stuff .DE]} { - set td "

" - set bodyText [string map [list \n $td \t $td] \n$stuff] - man-puts "

$bodyText
" - #man-puts
$stuff
- } elseif {[match-text .fi @ul1 @ul2 .nf @stuff .DE]} { - man-puts "
[lindex $ul1 1][lindex $ul2 1]\n$stuff
" - } else { - manerror "unexpected .DS format:\n[expand-next-text 2]" - } - return - } - .CS { - if {[next-op-is .ta rest]} { - # ??? - } - if {[match-text @stuff .CE]} { - man-puts
$stuff
- } else { - manerror "unexpected .CS format:\n[expand-next-text 2]" - } - return - } - .CE { - manerror "unexpected .CE" - return - } - .sp { - man-puts

- } - .ta { - # these are tab stop settings for short tables - switch -exact -- $manual(name):$manual(section) { - {bind:MODIFIERS} - - {bind:EVENT TYPES} - - {bind:BINDING SCRIPTS AND SUBSTITUTIONS} - - {expr:OPERANDS} - - {expr:MATH FUNCTIONS} - - {history:DESCRIPTION} - - {history:HISTORY REVISION} - - {switch:DESCRIPTION} - - {upvar:DESCRIPTION} { - return; # fix.me - } - default { - manerror "ignoring $line" - } - } - } - .nf { - if {[match-text @more .fi]} { - foreach more [split $more \n] { - man-puts $more
- } - } elseif {[match-text .RS @more .RE .fi]} { - man-puts

- foreach more [split $more \n] { - man-puts $more
- } - man-puts
- } elseif {[match-text .RS @more .RS @more2 .RE .RE .fi]} { - man-puts
- foreach more [split $more \n] { - man-puts $more
- } - man-puts
- foreach more2 [split $more2 \n] { - man-puts $more2
- } - man-puts
- } elseif {[match-text .RS @more .RS @more2 .RE @more3 .RE .fi]} { - man-puts
- foreach more [split $more \n] { - man-puts $more
- } - man-puts
- foreach more2 [split $more2 \n] { - man-puts $more2
- } - man-puts
- foreach more3 [split $more3 \n] { - man-puts $more3
- } - man-puts
- } elseif {[match-text .sp .RS @more .RS @more2 .sp .RE .RE .fi]} { - man-puts

- foreach more [split $more \n] { - man-puts $more
- } - man-puts
- foreach more2 [split $more2 \n] { - man-puts $more2
- } - man-puts

- } elseif {[match-text .RS .sp @more .sp .RE .fi]} { - man-puts

- foreach more [split $more \n] { - man-puts $more
- } - man-puts

- } else { - manerror "ignoring $line" - } - } - .fi { - manerror "ignoring $line" - } - .na - - .ad - - .UL - - .ne { - manerror "ignoring $line" - } - default { - manerror "unrecognized format directive: $line" - } - } -} -## -## merge copyright listings -## -proc merge-copyrights {l1 l2} { - set merge {} - set re1 {^Copyright +(?:\(c\)|\\\(co|©) +(\w.*?)(?:all rights reserved)?(?:\. )*$} - set re2 {^(\d+) +(?:by +)?(\w.*)$} ;# date who - set re3 {^(\d+)-(\d+) +(?:by +)?(\w.*)$} ;# from to who - set re4 {^(\d+), *(\d+) +(?:by +)?(\w.*)$} ;# date1 date2 who - foreach copyright [concat $l1 $l2] { - if {[regexp -nocase -- $re1 $copyright -> info]} { - set info [string trimright $info ". "] ; # remove extra period - if {[regexp -- $re2 $info -> date who]} { - lappend dates($who) $date - continue - } elseif {[regexp -- $re3 $info -> from to who]} { - for {set date $from} {$date <= $to} {incr date} { - lappend dates($who) $date - } - continue - } elseif {[regexp -- $re3 $info -> date1 date2 who]} { - lappend dates($who) $date1 $date2 - continue - } - } - puts "oops: $copyright" - } - foreach who [array names dates] { - set list [lsort -dictionary $dates($who)] - if {[llength $list] == 1 || [lindex $list 0] eq [lrange $list end end]} { - lappend merge "Copyright © [lindex $list 0] $who" - } else { - lappend merge "Copyright © [lindex $list 0]-[lrange $list end end] $who" - } - } - return [lsort -dictionary $merge] -} - -proc makedirhier {dir} { - if {![file isdirectory $dir] && \ - [catch {file mkdir $dir} error]} { - return -code error "cannot create directory $dir: $error" - } -} - -proc addbuffer {args} { - global manual - if {$manual(partial-text) ne ""} { - append manual(partial-text) \n - } - append manual(partial-text) [join $args ""] -} -proc flushbuffer {} { - global manual - if {$manual(partial-text) ne ""} { - lappend manual(text) [process-text $manual(partial-text)] - set manual(partial-text) "" + css-style body div p th td li dd ul ol dl dt blockquote { + font-family: Verdana, sans-serif; + } + css-style pre code { + font-family: 'Courier New', Courier, monospace; + } + css-style pre { + background-color: #f6fcec; + border-top: 1px solid #6A6A6A; + border-bottom: 1px solid #6A6A6A; + padding: 1em; + overflow: auto; + } + css-style body { + background-color: #FFFFFF; + font-size: 12px; + line-height: 1.25; + letter-spacing: .2px; + padding-left: .5em; + } + css-style h1 h2 h3 h4 { + font-family: Georgia, serif; + padding-left: 1em; + margin-top: 1em; + } + css-style h1 { + font-size: 18px; + color: #11577b; + border-bottom: $hBd; + margin-top: 0px; + } + css-style h2 { + font-size: 14px; + color: #11577b; + background-color: #c5dce8; + padding-left: 1em; + border: 1px solid #6A6A6A; + } + css-style h3 h4 { + color: #1674A4; + background-color: #e8f2f6; + border-bottom: $hBd; + border-top: $hBd; + } + css-style h3 { + font-size: 12px; + } + css-style h4 { + font-size: 11px; + } + css-style ".keylist dt" ".arguments dt" { + width: 20em; + float: left; + padding: 2px; + border-top: 1px solid #999; + } + css-style ".keylist dt" { font-weight: bold; } + css-style ".keylist dd" ".arguments dd" { + margin-left: 20em; + padding: 2px; + border-top: 1px solid #999; + } + css-style .copy { + background-color: #f6fcfc; + white-space: pre; + font-size: 80%; + border-top: 1px solid #6A6A6A; + margin-top: 2em; } } @@ -1502,10 +243,10 @@ proc flushbuffer {} { ## specified by html. ## proc make-man-pages {html args} { - global manual overall_title tcltkdesc + global manual overall_title tcltkdesc verbose makedirhier $html set cssfd [open $html/$::CSSFILE w] - puts $cssfd [gencss] + puts $cssfd [css-stylesheet] close $cssfd set manual(short-toc-n) 1 set manual(short-toc-fp) [open $html/[indexfile] w] @@ -1561,12 +302,19 @@ proc make-man-pages {html args} { foreach manual_page $manual(pages) { set manual(page) [file normalize $manual_page] # whistle - puts stderr "scanning page $manual(page)" + if {$verbose} { + puts stderr "scanning page $manual(page)" + } else { + puts -nonewline stderr . + } set manual(tail) [file tail $manual(page)] set manual(name) [file root $manual(tail)] set manual(section) {} if {$manual(name) in {case pack-old menubar}} { # obsolete + if {!$verbose} { + puts stderr "" + } manerror "discarding $manual(name)" continue } @@ -1646,6 +394,9 @@ proc make-man-pages {html args} { .BS - .BE - .br - .fi - .sp - .nf { flushbuffer if {"$rest" ne {}} { + if {!$verbose} { + puts stderr "" + } manerror "unexpected argument: $line" } lappend manual(text) $code @@ -1662,6 +413,9 @@ proc make-man-pages {html args} { .TP { flushbuffer while {[is-a-directive [set next [gets $manual(infp)]]]} { + if {!$verbose} { + puts stderr "" + } manerror "ignoring $next after .TP" } if {"$next" ne {'}} { @@ -1729,9 +483,15 @@ proc make-man-pages {html args} { } } .. { + if {!$verbose} { + puts stderr "" + } error "found .. outside of .de" } default { + if {!$verbose} { + puts stderr "" + } flushbuffer manerror "unrecognized format directive: $line" } @@ -1741,15 +501,27 @@ proc make-man-pages {html args} { close $manual(infp) # fixups if {$manual(.RS) != 0} { + if {!$verbose} { + puts stderr "" + } puts "unbalanced .RS .RE" } if {$manual(.DS) != 0} { + if {!$verbose} { + puts stderr "" + } puts "unbalanced .DS .DE" } if {$manual(.CS) != 0} { + if {!$verbose} { + puts stderr "" + } puts "unbalanced .CS .CE" } if {$manual(.SO) != 0} { + if {!$verbose} { + puts stderr "" + } puts "unbalanced .SO .SE" } # output conversion @@ -1762,6 +534,9 @@ proc make-man-pages {html args} { set manual($manual(name)-title) "[lindex $rest 0] manual page - [lrange $rest 4 end]" } else { set haserror 1 + if {!$verbose} { + puts stderr "" + } manerror "no .HS or .TH record found" } if {!$haserror} { @@ -1781,6 +556,9 @@ proc make-man-pages {html args} { # set manual(toc-$manual(wing-file)-$manual(name)) [concat

$manual(section-toc)
] } + if {!$verbose} { + puts stderr "" + } # # make the wing table of contents for the section @@ -1791,7 +569,7 @@ proc make-man-pages {html args} { set width [string length $name] } } - set perline [expr {120 / $width}] + set perline [expr {118 / $width}] set nrows [expr {([llength $manual(wing-toc)]+$perline)/$perline}] set n 0 catch {unset rows} @@ -1892,43 +670,63 @@ proc make-man-pages {html args} { ## output man pages ## unset manual(section) + if {!$verbose} { + puts stderr "Rescanning [llength $manual(all-pages)] pages" + } foreach path $manual(all-pages) { set manual(wing-file) [file dirname $path] set manual(tail) [file tail $path] set manual(name) [file root $manual(tail)] - set text $manual(output-$manual(wing-file)-$manual(name)) - set ntext 0 - foreach item $text { - incr ntext [llength [split $item \n]] - incr ntext - } - set toc $manual(toc-$manual(wing-file)-$manual(name)) - set ntoc 0 - foreach item $toc { - incr ntoc [llength [split $item \n]] - incr ntoc - } - puts stderr "rescanning page $manual(name) $ntoc/$ntext" - set outfd [open $html/$manual(wing-file)/$manual(name).htm w] - puts $outfd [htmlhead "$manual($manual(name)-title)" \ - $manual(name) $manual(wing-file) "[indexfile]" \ - $overall_title "../[indexfile]"] - if { - (($ntext > 60) && ($ntoc > 32)) || $manual(tail) in { - Hash LinkVar SetVar TraceVar ConfigWidg CrtImgType CrtItemType - CrtPhImgFmt DoOneEvent GetBitmap GetColor GetCursor GetDash - GetJustify GetPixels GetVisual ParseArgv QueueEvent - } - } { + try { + set text $manual(output-$manual(wing-file)-$manual(name)) + set ntext 0 + foreach item $text { + incr ntext [llength [split $item \n]] + incr ntext + } + set toc $manual(toc-$manual(wing-file)-$manual(name)) + set ntoc 0 foreach item $toc { - puts $outfd $item + incr ntoc [llength [split $item \n]] + incr ntoc } + if {$verbose} { + puts stderr "rescanning page $manual(name) $ntoc/$ntext" + } else { + puts -nonewline stderr . + } + set outfd [open $html/$manual(wing-file)/$manual(name).htm w] + puts $outfd [htmlhead "$manual($manual(name)-title)" \ + $manual(name) $manual(wing-file) "[indexfile]" \ + $overall_title "../[indexfile]"] + if { + (($ntext > 60) && ($ntoc > 32)) || $manual(tail) in { + Hash LinkVar SetVar TraceVar ConfigWidg CrtImgType + CrtItemType CrtPhImgFmt DoOneEvent GetBitmap GetColor + GetCursor GetDash GetJustify GetPixels GetVisual + ParseArgv QueueEvent + } + } { + foreach item $toc { + puts $outfd $item + } + } + foreach item $text { + puts $outfd [insert-cross-references $item] + } + puts $outfd "" + } on error msg { + if {$verbose} { + puts stderr $msg + } else { + puts stderr "\nError when processing $manual(name): $msg" + } + } finally { + catch {close $outfd} } - foreach item $text { - puts $outfd [insert-cross-references $item] - } - puts $outfd "" - close $outfd + } + if {!$verbose} { + puts stderr "\nDone" } return {} } @@ -1957,8 +755,25 @@ set tclcmddesc {The commands which the tclsh interpreter implements.} set tkcmddesc {The additional commands which the wish interpreter implements.} set tcllibdesc {The C functions which a Tcl extended C program may use.} set tklibdesc {The additional C functions which a Tk extended C program may use.} -set tclpkgcmdsdesc {The additional commands in packages contributed to the Tcl distribution.} -set tclpkglibdesc {The additional C functions in packages contributed to the Tcl distribution.} + +proc plus-pkg {dir name type} { + global build_tcl tcltkdir tcldir + if {!$build_tcl} return + set globpat $tcltkdir/$tcldir/pkgs/$dir/doc/*.$type + if {![llength [glob -nocomplain $globpat]]} return + if {$type eq "n"} { + set title "$name Package Commands" + set dir [string totitle $dir]Cmd + set desc "The additional commands provided by the $name package." + } elseif {$type eq "3"} { + set title "$name Package Library" + set dir [string totitle $dir]Lib + set desc "The additional C functions provided by the $name package." + } else { + error "unknown type \"$type\": must be 3 or n" + } + return [list $globpat $title $dir $desc] +} if {1} { if {[catch { @@ -1970,18 +785,16 @@ if {1} { [expr {$build_tk ? [list $tcltkdir/$tkdir/doc/*.n {Tk Commands} TkCmd $tkcmddesc] : ""}] \ - [expr {$build_tcl ? - [list $tcltkdir/$tcldir/pkgs/*/doc/*.n {Contrib. Package Commands} PkgCmd $tclpkgcmdsdesc] - : ""}] \ + [plus-pkg itcl {[incr Tcl]} n] \ + [plus-pkg tdbc TDBC n] \ [expr {$build_tcl ? [list $tcltkdir/$tcldir/doc/*.3 {Tcl Library} TclLib $tcllibdesc] : ""}] \ [expr {$build_tk ? [list $tcltkdir/$tkdir/doc/*.3 {Tk Library} TkLib $tklibdesc] : ""}] \ - [expr {$build_tcl ? - [list $tcltkdir/$tcldir/pkgs/*/doc/*.3 {Contrib. Package Library} PkgLib $tclpkglibdesc] - : ""}] + [plus-pkg itcl {[incr Tcl]} 3] \ + [plus-pkg tdbc TDBC 3] } error]} { puts $error\n$errorInfo } -- cgit v0.12 From 95dcf1035f2e4d354ba79e58be255f3fb483c085 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 10 Jan 2010 16:51:25 +0000 Subject: Record that [Bug 2898722] is lurking. --- ChangeLog | 4 ++++ tests/namespace.test | 63 ++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 55 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecaa73a..2a59d96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-01-10 Donal K. Fellows + * tests/namespace.test (namespace-51.17): [Bug 2898722]: Demonstrate + that there are still bugs in the handling of resolution epochs. This + bug is not yet fixed. + * tools/tcltk-man2html.tcl: Split the man->html converter into * tools/tcltk-man2html-utils.tcl: two pieces for easier maintenance. Also made it much less verbose in its printed messages by default. diff --git a/tests/namespace.test b/tests/namespace.test index 889f945..c1aef53 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: namespace.test,v 1.77 2010/01/03 20:29:12 msofer Exp $ +# RCS: @(#) $Id: namespace.test,v 1.78 2010/01/10 16:51:25 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -2398,7 +2398,6 @@ test namespace-51.12 {name resolution path control} -body { catch {namespace delete ::test_ns_3} catch {namespace delete ::test_ns_4} } - test namespace-51.13 {name resolution path control} -body { set ::result {} namespace eval ::test_ns_1 { @@ -2406,7 +2405,7 @@ test namespace-51.13 {name resolution path control} -body { } namespace eval ::test_ns_2 { proc foo {} {lappend ::result 2} - trace add command foo delete {namespace eval ::test_ns_3 foo;#} + trace add command foo delete "namespace eval ::test_ns_3 foo;#" } namespace eval ::test_ns_3 { proc foo {} { @@ -2429,17 +2428,17 @@ test namespace-51.13 {name resolution path control} -body { catch {namespace delete ::test_ns_3} catch {namespace delete ::test_ns_4} } -test namespace-51.14 {name resolution path control} -body { +test namespace-51.14 {name resolution path control} -setup { foreach cmd [info commands foo*] { rename $cmd {} } + namespace eval ::test_ns_1 {} + namespace eval ::test_ns_2 {} + namespace eval ::test_ns_3 {} +} -body { proc foo0 {} {} - namespace eval ::test_ns_1 { - proc foo1 {} {} - } - namespace eval ::test_ns_2 { - proc foo2 {} {} - } + proc ::test_ns_1::foo1 {} {} + proc ::test_ns_2::foo2 {} {} namespace eval ::test_ns_3 { variable result {} lappend result [info commands foo*] @@ -2452,11 +2451,11 @@ test namespace-51.14 {name resolution path control} -body { namespace delete ::test_ns_1 lappend result [info commands foo*] } -} -result {foo0 {foo1 foo2 foo0} {foo2 foo1 foo0} {foo1 foo2 foo0} {foo2 foo0}} -cleanup { +} -cleanup { catch {namespace delete ::test_ns_1} catch {namespace delete ::test_ns_2} catch {namespace delete ::test_ns_3} -} +} -result {foo0 {foo1 foo2 foo0} {foo2 foo1 foo0} {foo1 foo2 foo0} {foo2 foo0}} test namespace-51.15 {namespace resolution path control} -body { namespace eval ::test_ns_2 { proc foo {} {return 2} @@ -2479,6 +2478,46 @@ test namespace-51.16 {Bug 1566526} { slave eval namespace eval demo namespace path :: interp delete slave } {} +test namespace-51.17 {resolution epoch handling: Bug 2898722} -setup { + set result {} + catch {namespace delete ::a} +} -constraints knownBug -body { + namespace eval ::a { + proc c {} {lappend ::result A} + c + namespace eval b { + variable d c + lappend ::result [catch { $d }] + } + lappend ::result . + namespace eval b { + namespace path [namespace parent] + $d;[format %c 99] + } + lappend ::result . + namespace eval b { + proc c {} {lappend ::result B} + $d;[format %c 99] + } + lappend ::result . + } + namespace eval ::a::b { + $d;[format %c 99] + lappend ::result . + proc ::c {} {lappend ::result G} + $d;[format %c 99] + lappend ::result . + rename ::a::c {} + $d;[format %c 99] + lappend ::result . + rename ::a::b::c {} + $d;[format %c 99] + } +} -cleanup { + namespace delete ::a + catch {rename ::c {}} + unset result +} -result {A 1 . A A . B B . B B . B B . B B . G G} # TIP 181 - namespace unknown tests test namespace-52.1 {unknown: default handler ::unknown} { -- cgit v0.12 From 997d61c0f6049d4bc0dd57aefc84e5f7f12c4ac2 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 10 Jan 2010 20:36:49 +0000 Subject: Small cleanups to improve HTML generation. --- doc/Ensemble.3 | 35 ++++++++++++++++++++--------------- doc/Hash.3 | 6 +++--- doc/interp.n | 9 +++++---- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/doc/Ensemble.3 b/doc/Ensemble.3 index e45c326..34a7a85 100644 --- a/doc/Ensemble.3 +++ b/doc/Ensemble.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Ensemble.3,v 1.8 2009/11/27 14:35:10 dkf Exp $ +'\" RCS: @(#) $Id: Ensemble.3,v 1.9 2010/01/10 20:36:49 dkf Exp $ '\" '\" This documents the C API introduced in TIP#235 '\" @@ -74,20 +74,20 @@ The namespace to which the ensemble command is to be bound, or NULL for the current namespace. .AP int ensFlags in An ORed set of flag bits describing the basic configuration of the -ensemble. Currently only one bit has meaning, TCL_ENSEMBLE_PREFIX, +ensemble. Currently only one bit has meaning, \fBTCL_ENSEMBLE_PREFIX\fR, which is present when the ensemble command should also match unambiguous prefixes of subcommands. .AP Tcl_Obj *cmdNameObj in A value holding the name of the ensemble command to look up. .AP int flags in An ORed set of flag bits controlling the behavior of -\fBTcl_FindEnsemble\fR. Currently only TCL_LEAVE_ERR_MSG is supported. +\fBTcl_FindEnsemble\fR. Currently only \fBTCL_LEAVE_ERR_MSG\fR is supported. .AP Tcl_Command token in A normal command token that refers to an ensemble command, or which you wish to use for testing as an ensemble command in \fBTcl_IsEnsemble\fR. .AP int *ensFlagsPtr out Pointer to a variable into which to write the current ensemble flag -bits; currently only the bit TCL_ENSEMBLE_PREFIX is defined. +bits; currently only the bit \fBTCL_ENSEMBLE_PREFIX\fR is defined. .AP Tcl_Obj *dictObj in A dictionary value to use for the subcommand to implementation command prefix mapping dictionary in the ensemble. May be NULL if the mapping @@ -119,13 +119,13 @@ arguments: the interpreter to work within, the name of the ensemble to create, the namespace within the interpreter to bind the ensemble to, and the default set of ensemble flags. The result of the function is the command token for the ensemble, which may be used to further -configure the ensemble using the API described below in \fBENSEMBLE -PROPERTIES\fR. +configure the ensemble using the API described below in +\fBENSEMBLE PROPERTIES\fR. .PP Given the name of an ensemble command, the token for that command may be retrieved using \fBTcl_FindEnsemble\fR. If the given command name (in \fIcmdNameObj\fR) does not refer to an ensemble command, the -result of the function is NULL and (if the TCL_LEAVE_ERR_MSG bit is +result of the function is NULL and (if the \fBTCL_LEAVE_ERR_MSG\fR bit is set in \fIflags\fR) an error message is left in the interpreter result. .PP @@ -139,13 +139,13 @@ property. The properties are: \fBflags\fR (read-write) . The set of flags for the ensemble, expressed as a -bit-field. Currently, the only public flag is TCL_ENSEMBLE_PREFIX +bit-field. Currently, the only public flag is \fBTCL_ENSEMBLE_PREFIX\fR which is set when unambiguous prefixes of subcommands are permitted to be resolved to implementations as well as exact matches. The flags may be read and written using \fBTcl_GetEnsembleFlags\fR and \fBTcl_SetEnsembleFlags\fR respectively. The result of both of those -functions is a Tcl result code (TCL_OK, or TCL_ERROR if the token does -not refer to an ensemble). +functions is a Tcl result code (\fBTCL_OK\fR, or \fBTCL_ERROR\fR if +the token does not refer to an ensemble). .TP \fBmapping dictionary\fR (read-write) . @@ -157,7 +157,7 @@ the same unqualified name in the ensemble's bound namespace. Defaults to NULL. May be read and written using \fBTcl_GetEnsembleMappingDict\fR and \fBTcl_SetEnsembleMappingDict\fR respectively. The result of both of those functions is a Tcl result -code (TCL_OK, or TCL_ERROR if the token does not refer to an +code (\fBTCL_OK\fR, or \fBTCL_ERROR\fR if the token does not refer to an ensemble) and the dictionary obtained from \fBTcl_GetEnsembleMappingDict\fR should always be treated as immutable even if it is unshared. @@ -170,7 +170,8 @@ the ensemble and the subcommand argument. NULL (the default) is equivalent to the empty list. May be read and written using \fBTcl_GetEnsembleParameterList\fR and \fBTcl_SetEnsembleParameterList\fR respectively. The result of both of those functions is a Tcl result code -(TCL_OK, or TCL_ERROR if the token does not refer to an ensemble) and the +(\fBTCL_OK\fR, or \fBTCL_ERROR\fR if the token does not refer to an +ensemble) and the dictionary obtained from \fBTcl_GetEnsembleParameterList\fR should always be treated as immutable even if it is unshared. .VE 8.6 @@ -183,7 +184,8 @@ above) or (if that is also NULL) from the set of commands exported by the bound namespace. May be read and written using \fBTcl_GetEnsembleSubcommandList\fR and \fBTcl_SetEnsembleSubcommandList\fR respectively. The result of both -of those functions is a Tcl result code (TCL_OK, or TCL_ERROR if the +of those functions is a Tcl result code (\fBTCL_OK\fR, or +\fBTCL_ERROR\fR if the token does not refer to an ensemble) and the list obtained from \fBTcl_GetEnsembleSubcommandList\fR should always be treated as immutable even if it is unshared. @@ -197,7 +199,8 @@ details. If NULL, the default behavior \- generate a suitable error message \- will be used when an unknown subcommand is encountered. May be read and written using \fBTcl_GetEnsembleUnknownHandler\fR and \fBTcl_SetEnsembleUnknownHandler\fR respectively. The result of both -functions is a Tcl result code (TCL_OK, or TCL_ERROR if the token does +functions is a Tcl result code (\fBTCL_OK\fR, or \fBTCL_ERROR\fR if +the token does not refer to an ensemble) and the list obtained from \fBTcl_GetEnsembleUnknownHandler\fR should always be treated as immutable even if it is unshared. @@ -209,6 +212,8 @@ deleted, so too will the ensemble, and this namespace is also the namespace whose list of exported commands is used if both the mapping dictionary and the subcommand list properties are NULL. May be read using \fBTcl_GetEnsembleNamespace\fR which returns a Tcl result code -(TCL_OK, or TCL_ERROR if the token does not refer to an ensemble). +(\fBTCL_OK\fR, or \fBTCL_ERROR\fR if the token does not refer to an ensemble). .SH "SEE ALSO" namespace(n), Tcl_DeleteCommandFromToken(3) +.SH KEYWORDS +command, ensemble diff --git a/doc/Hash.3 b/doc/Hash.3 index 8075140..94ed238 100644 --- a/doc/Hash.3 +++ b/doc/Hash.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Hash.3,v 1.32 2009/11/27 14:35:10 dkf Exp $ +'\" RCS: @(#) $Id: Hash.3,v 1.33 2010/01/10 20:36:49 dkf Exp $ '\" .so man.macros .TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures" @@ -83,8 +83,8 @@ very quickly locate the entry, and hence its value. There may be at most one entry in a hash table with a particular key, but many entries may have the same value. Keys can take one of four forms: strings, one-word values, integer arrays, or custom keys defined by a -Tcl_HashKeyType structure (See section \fBTHE TCL_HASHKEYTYPE -STRUCTURE\fR below). All of the keys in a given table have the same +Tcl_HashKeyType structure (See section \fBTHE TCL_HASHKEYTYPE STRUCTURE\fR +below). All of the keys in a given table have the same form, which is specified when the table is initialized. .PP The value of a hash table entry can be anything that fits in the same diff --git a/doc/interp.n b/doc/interp.n index 8e06fd3..082e559 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: interp.n,v 1.42 2008/12/09 20:16:29 dgp Exp $ +'\" RCS: @(#) $Id: interp.n,v 1.43 2010/01/10 20:36:49 dkf Exp $ '\" .so man.macros .TH interp n 8.6 Tcl "Tcl Built-In Commands" @@ -748,9 +748,10 @@ This option (common for all limit types) specifies (if non-empty) a Tcl script to be executed in the global namespace of the interpreter reading and writing the option when the particular limit in the limited interpreter is exceeded. The callback may modify the limit on the interpreter if it wishes the limited -interpreter to continue executing. If the callback generates an exception, it is -reported through the background exception mechanism (see \fBBACKGROUND EXCEPTION -HANDLING\fR). Note that the callbacks defined by one interpreter are +interpreter to continue executing. If the callback generates an exception, it +is reported through the background exception mechanism (see +\fBBACKGROUND EXCEPTION HANDLING\fR). +Note that the callbacks defined by one interpreter are completely isolated from the callbacks defined by another, and that the order in which those callbacks are called is undefined. .TP -- cgit v0.12 From a81c8243240443b1ffe54faec5e49d7e5dba4ee6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 10 Jan 2010 22:58:39 +0000 Subject: * win/tclWinDde.c: VC++ 6.0 doesn't have * win/tclWinReg.c PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. * win/tclWinTime.c * win/tclWinConsole.c Put channel type definitions * win/tclWinChan.c in static const memory * win/tclWinPipe.c * win/tclWinSerial.c * win/tclWinSock.c * generic/tclIOGT.c * generic/tclIORChan.c * generic/tclIORTrans.c * unix/tclUnixChan.c * unix/tclUnixPipe.c * unix/tclUnixSock.c * unix/configure (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation. --- ChangeLog | 21 + generic/tclIOGT.c | 6 +- generic/tclIORChan.c | 6 +- generic/tclIORTrans.c | 6 +- tests/info.test | 4 +- unix/configure | 12568 ++++++++++++++++++++++++------------------------ unix/tclUnixChan.c | 10 +- unix/tclUnixPipe.c | 6 +- unix/tclUnixSock.c | 6 +- win/tclWinChan.c | 6 +- win/tclWinConsole.c | 6 +- win/tclWinDde.c | 55 +- win/tclWinPipe.c | 8 +- win/tclWinReg.c | 23 +- win/tclWinSerial.c | 6 +- win/tclWinSock.c | 6 +- win/tclWinThrd.c | 12 +- win/tclWinTime.c | 10 +- 18 files changed, 6448 insertions(+), 6317 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a59d96..ddceecb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2010-01-10 Jan Nijtmans + + * win/tclWinDde.c: VC++ 6.0 doesn't have + * win/tclWinReg.c PDWORD_PTR + * win/tclWinThrd.c: Fix various minor gcc warnings. + * win/tclWinTime.c + * win/tclWinConsole.c Put channel type definitions + * win/tclWinChan.c in static const memory + * win/tclWinPipe.c + * win/tclWinSerial.c + * win/tclWinSock.c + * generic/tclIOGT.c + * generic/tclIORChan.c + * generic/tclIORTrans.c + * unix/tclUnixChan.c + * unix/tclUnixPipe.c + * unix/tclUnixSock.c + * unix/configure (regenerated with autoconf 2.59) + * tests/info.test: Make test independant from + tcltest implementation. + 2010-01-10 Donal K. Fellows * tests/namespace.test (namespace-51.17): [Bug 2898722]: Demonstrate diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index a4ba61a..1935a3d 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * CVS: $Id: tclIOGT.c,v 1.21 2008/08/10 23:06:17 nijtmans Exp $ + * CVS: $Id: tclIOGT.c,v 1.22 2010/01/10 22:58:40 nijtmans Exp $ */ #include "tclInt.h" @@ -118,7 +118,7 @@ static inline void ResultAdd(ResultBuffer *r, unsigned char *buf, * transformations. */ -static Tcl_ChannelType transformChannelType = { +static const Tcl_ChannelType transformChannelType = { "transform", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ TransformCloseProc, /* Close proc. */ @@ -135,7 +135,7 @@ static Tcl_ChannelType transformChannelType = { TransformNotifyProc, /* Handling of events bubbling up. */ TransformWideSeekProc, /* Wide seek proc. */ NULL, /* Thread action. */ - NULL, /* Truncate. */ + NULL /* Truncate. */ }; /* diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index e3ba688..68072fa 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.43 2009/11/21 21:58:30 patthoyts Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.44 2010/01/10 22:58:40 nijtmans Exp $ */ #include @@ -57,7 +57,7 @@ static int ReflectSetOption(ClientData clientData, * a version 3 structure. */ -static Tcl_ChannelType tclRChannelType = { +static const Tcl_ChannelType tclRChannelType = { "tclrchannel", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ ReflectClose, /* Close channel, clean instance data */ @@ -74,7 +74,7 @@ static Tcl_ChannelType tclRChannelType = { NULL, /* Handle events. NULL'able */ ReflectSeekWide, /* Move access point (64 bit). NULL'able */ NULL, /* thread action */ - NULL, /* truncate */ + NULL /* truncate */ }; /* diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index e22b356..4dfe78f 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.10 2009/11/18 22:21:06 nijtmans Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.11 2010/01/10 22:58:40 nijtmans Exp $ */ #include @@ -63,7 +63,7 @@ static int ReflectNotify(ClientData clientData, int mask); * The C layer channel type/driver definition used by the reflection. */ -static Tcl_ChannelType tclRTransformType = { +static const Tcl_ChannelType tclRTransformType = { "tclrtransform", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel. */ ReflectClose, /* Close channel, clean instance data. */ @@ -81,7 +81,7 @@ static Tcl_ChannelType tclRTransformType = { ReflectNotify, /* Handle events. */ ReflectSeekWide, /* Move access point (64 bit). */ NULL, /* thread action */ - NULL, /* truncate */ + NULL /* truncate */ }; /* diff --git a/tests/info.test b/tests/info.test index 2a1998e..8b7729c 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.73 2009/11/16 18:00:11 dgp Exp $ +# RCS: @(#) $Id: info.test,v 1.74 2010/01/10 22:58:41 nijtmans Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -1415,7 +1415,7 @@ test info-38.7 {location information for arg substitution} -constraints testeval } -result {* {type source line 728 file info.test cmd {info frame \$level} proc ::etrace level 0} * {type eval line 1 cmd etrace proc ::tcltest::RunTest} * {type source line 1414 file info.test cmd {testevalex {return -level 0 \[etrace]}} proc ::tcltest::RunTest} -* {type source line 2298 file tcltest.tcl cmd {uplevel 1 $script} proc ::tcltest::RunTest}} +* {type source line * file tcltest* cmd {uplevel 1 $script} proc ::tcltest::RunTest}} # ------------------------------------------------------------------------- # literal sharing diff --git a/unix/configure b/unix/configure index 19dc3b2..2ed6bae 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,185 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -ZLIB_DIR -ZLIB_OBJS -ZLIB_SRCS -ZLIB_INCLUDE -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -LDAIX_SRC -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -EXE_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -DLL_INSTALL_DIR -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -PKG_CFG_ARGS -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -PACKAGE_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX EXE_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -784,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -847,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -912,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -942,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1016,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1078,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1122,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1142,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1181,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1279,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1296,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1362,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1469,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1483,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1505,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1515,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1537,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1548,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1562,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1600,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1633,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1681,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1707,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1720,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1749,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1766,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1790,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1840,23 +1371,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } - - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1865,37 +1397,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1918,8 +1449,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1932,34 +1463,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1972,51 +1501,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2029,34 +1543,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2070,7 +1624,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2081,7 +1635,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2099,23 +1652,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2128,38 +1680,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2172,45 +1722,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2223,35 +1757,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2276,77 +1796,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2358,21 +1848,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2391,27 +1879,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2422,8 +1905,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2437,14 +1921,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2464,20 +1948,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2495,12 +1973,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2523,49 +2001,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2581,118 +2060,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2708,12 +2107,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2747,17 +2146,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2772,116 +2166,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +continue fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2914,8 +2458,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2949,22 +2493,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2973,10 +2519,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2986,22 +2531,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3012,7 +2559,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3030,8 +2576,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3054,22 +2600,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3078,10 +2626,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3091,22 +2638,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3117,7 +2666,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3140,170 +2688,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3327,31 +2728,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3407,7 +2812,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3427,27 +2831,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3460,14 +2855,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3490,9 +2883,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3506,35 +2899,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3546,8 +2942,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3587,36 +2983,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3627,17 +3026,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3648,37 +3047,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3687,22 +3090,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3710,10 +3115,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3737,18 +3141,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3763,17 +3174,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3784,37 +3195,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3823,22 +3238,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3846,10 +3263,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3873,18 +3289,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3899,17 +3322,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3920,37 +3343,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3959,22 +3386,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3982,10 +3411,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4009,18 +3437,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4039,17 +3474,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4060,37 +3495,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4099,22 +3538,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4122,10 +3563,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4149,18 +3589,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4229,17 +3676,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4250,37 +3697,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4289,22 +3740,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4312,10 +3765,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4339,18 +3791,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4407,17 +3866,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4428,37 +3887,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4467,22 +3930,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4490,10 +3955,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4517,18 +3981,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4543,17 +4014,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4564,37 +4035,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4603,22 +4078,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4626,10 +4103,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4653,18 +4129,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4684,19 +4167,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4707,37 +4189,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4746,22 +4232,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4769,10 +4257,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4796,19 +4283,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4828,8 +4321,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4851,35 +4344,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4890,13 +4387,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4928,8 +4425,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4942,53 +4439,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5001,8 +4501,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5015,53 +4515,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5074,8 +4577,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5088,53 +4591,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5145,8 +4651,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5159,53 +4665,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5213,8 +4722,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5227,53 +4736,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5298,9 +4810,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5326,60 +4838,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5392,8 +4912,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5401,15 +4921,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5421,11 +4941,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5454,8 +4974,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5482,67 +5002,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5559,43 +5088,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5606,8 +5138,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5624,59 +5156,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5687,37 +5222,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5726,22 +5265,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5749,10 +5290,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5776,18 +5316,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -5820,8 +5367,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5848,59 +5395,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5908,8 +5464,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5936,64 +5492,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6006,53 +5571,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6065,8 +5633,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6093,59 +5661,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6153,8 +5730,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6181,64 +5758,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6251,53 +5837,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6310,15 +5899,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6328,12 +5917,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6349,17 +5938,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6370,37 +5959,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6409,22 +6002,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6432,10 +6027,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6459,24 +6053,31 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6488,47 +6089,50 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -typedef gz_header ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((gz_header *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (gz_header)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_gz_header=no +ac_cv_type_gz_header=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6 if test $ac_cv_type_gz_header = yes; then : else @@ -6543,12 +6147,13 @@ fi if test $zlib_ok = yes; then - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS +ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6556,73 +6161,115 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -return deflateSetHeader (); +deflateSetHeader (); ; return 0; } _ACEOF -for ac_lib in '' z; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_deflateSetHeader=$ac_res + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_deflateSetHeader" = no; then + for ac_lib in z; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then - break -fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="-l$ac_lib" +break else - ac_cv_search_deflateSetHeader=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 +if test "$ac_cv_search_deflateSetHeader" != no; then + test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" else @@ -6660,8 +6307,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6674,34 +6321,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6714,41 +6359,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6757,31 +6388,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6791,8 +6422,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6816,37 +6447,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6860,24 +6494,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6904,16 +6538,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6926,53 +6560,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -7016,8 +6653,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7030,27 +6667,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7082,8 +6717,8 @@ fi CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7162,10 +6797,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7185,8 +6822,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7199,53 +6836,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7277,8 +6917,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7291,53 +6931,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7393,8 +7036,8 @@ fi SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" - { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 -echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 +echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6 if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7407,53 +7050,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_network_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_network_inet_ntoa=no +ac_cv_lib_network_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6 if test $ac_cv_lib_network_inet_ntoa = yes; then LIBS="$LIBS -lnetwork" fi @@ -7483,8 +7129,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7497,53 +7143,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7617,8 +7266,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7631,53 +7280,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7705,10 +7357,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7725,10 +7379,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7765,10 +7421,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7827,8 +7485,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7851,37 +7509,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7970,8 +7631,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7997,8 +7658,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -8030,8 +7691,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8057,8 +7718,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -8152,8 +7813,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8176,37 +7837,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8215,8 +7879,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8239,37 +7903,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8295,8 +7962,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8319,37 +7986,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8368,8 +8038,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8392,37 +8062,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8449,21 +8122,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8497,32 +8170,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8533,8 +8209,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8550,8 +8226,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8575,39 +8251,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8943,25 +8622,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8972,37 +8651,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9011,22 +8694,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -9034,10 +8719,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -9061,18 +8745,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -9081,8 +8772,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -9157,8 +8848,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9181,37 +8872,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9246,13 +8940,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9412,22 +9106,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9437,8 +9131,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9473,11 +9167,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9498,8 +9192,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9521,28 +9215,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9559,34 +9258,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9618,28 +9320,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9656,34 +9363,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9715,28 +9425,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9753,34 +9468,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9793,17 +9511,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9826,31 +9544,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9872,31 +9594,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9905,20 +9630,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9940,34 +9665,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9976,8 +9705,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9999,34 +9728,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -10040,9 +9773,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10068,60 +9801,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10130,8 +9871,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10153,31 +9894,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10188,11 +9933,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -10202,8 +9947,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10220,8 +9965,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -10230,22 +9974,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10268,36 +10017,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10307,11 +10060,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10322,22 +10075,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10353,10 +10111,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10364,41 +10120,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10411,16 +10153,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10449,9 +10188,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10477,60 +10216,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10555,9 +10302,9 @@ done for ac_func in mkstemp opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10583,78 +10330,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10681,59 +10438,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10744,8 +10510,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10772,59 +10538,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10835,8 +10610,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10863,59 +10638,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10926,8 +10710,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10954,59 +10738,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -11024,8 +10817,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11052,59 +10845,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -11116,8 +10918,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11144,63 +10946,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11228,34 +11039,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11273,8 +11088,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11301,63 +11116,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11388,34 +11212,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11424,8 +11252,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11456,34 +11284,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11503,8 +11335,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11531,63 +11363,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11618,34 +11459,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11654,8 +11499,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11686,34 +11531,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11733,8 +11582,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11761,63 +11610,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11848,34 +11706,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11884,8 +11746,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11916,34 +11778,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11963,8 +11829,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11991,63 +11857,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12078,34 +11953,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -12114,8 +11993,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12146,34 +12025,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12226,8 +12109,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12254,63 +12137,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12341,34 +12233,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12377,8 +12273,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12409,34 +12305,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12445,8 +12345,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12475,34 +12375,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12523,8 +12427,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12551,63 +12455,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12641,34 +12554,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12677,8 +12594,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12712,34 +12629,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12773,19 +12694,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12796,37 +12716,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12835,22 +12759,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12858,10 +12784,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12885,19 +12810,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12909,8 +12840,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12938,22 +12869,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12966,10 +12888,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12993,22 +12913,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13021,10 +12932,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -13050,22 +12959,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13078,10 +12978,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -13109,22 +13007,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13137,10 +13026,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13167,22 +13054,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13195,10 +13073,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13226,22 +13102,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13254,14 +13121,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13291,8 +13156,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13313,38 +13178,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13367,8 +13236,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13395,19 +13264,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13418,37 +13286,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13457,22 +13329,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13480,10 +13354,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13507,19 +13380,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13531,8 +13410,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13556,34 +13435,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13599,9 +13482,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13627,60 +13510,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13690,8 +13581,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13712,34 +13603,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13748,8 +13643,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13770,34 +13665,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13810,8 +13709,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13834,34 +13733,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13872,8 +13775,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13896,34 +13799,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_timezone_time=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_timezone_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13939,8 +13846,8 @@ _ACEOF # we might be able to use fstatfs instead. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13962,28 +13869,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14001,37 +13913,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blocks=no +ac_cv_member_struct_stat_st_blocks=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 if test $ac_cv_member_struct_stat_st_blocks = yes; then cat >>confdefs.h <<_ACEOF @@ -14040,8 +13955,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14063,28 +13978,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14102,37 +14022,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14142,8 +14065,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14170,59 +14093,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14239,8 +14171,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14259,9 +14191,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14277,9 +14209,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14287,22 +14219,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14315,17 +14238,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14336,8 +14259,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14364,59 +14287,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14440,8 +14372,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14468,59 +14400,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14528,8 +14469,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14548,22 +14489,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14576,13 +14508,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14590,10 +14520,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14607,8 +14539,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14635,59 +14567,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14695,8 +14636,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14716,22 +14657,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14744,13 +14676,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14758,10 +14688,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14774,8 +14706,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14802,59 +14734,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14862,8 +14803,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14883,22 +14824,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14911,13 +14843,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14925,10 +14855,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -14943,8 +14875,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14971,59 +14903,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15031,8 +14972,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15068,22 +15009,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15096,18 +15028,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15125,8 +15057,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15137,47 +15069,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15188,8 +15123,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15200,47 +15135,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15251,8 +15189,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15263,59 +15201,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15337,8 +15278,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15353,8 +15294,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15380,34 +15321,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15416,8 +15361,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15428,47 +15373,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15478,8 +15426,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15504,36 +15452,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15544,8 +15496,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15556,47 +15508,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15606,8 +15561,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15633,36 +15588,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15681,8 +15640,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15709,59 +15668,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15781,8 +15749,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15808,36 +15776,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15852,8 +15823,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15880,59 +15851,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15940,8 +15920,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15954,53 +15934,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16009,8 +15992,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16023,53 +16006,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_inet_strncasecmp=yes + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16078,10 +16064,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -16098,8 +16086,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16126,59 +16114,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16187,8 +16184,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16215,59 +16212,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16281,8 +16287,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16305,8 +16311,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16322,8 +16328,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16345,34 +16351,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16380,8 +16390,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16405,34 +16415,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16445,8 +16459,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16481,22 +16495,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16509,13 +16514,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16529,28 +16532,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16561,37 +16564,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16600,22 +16607,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16623,10 +16632,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16650,18 +16658,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16672,8 +16687,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16695,35 +16710,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16732,8 +16751,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16746,9 +16765,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16774,60 +16793,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16841,8 +16868,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16865,36 +16892,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16912,9 +16942,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16940,60 +16970,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17006,19 +17044,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17029,37 +17066,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17068,22 +17109,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17091,10 +17134,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17118,19 +17160,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17146,9 +17194,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17174,60 +17222,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17241,19 +17297,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17264,37 +17319,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17303,22 +17362,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17326,10 +17387,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17353,19 +17413,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17381,9 +17447,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17409,60 +17475,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17475,9 +17549,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17503,60 +17577,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17590,19 +17672,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17613,37 +17694,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17652,22 +17737,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17675,10 +17762,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17702,19 +17788,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17727,8 +17819,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17759,37 +17851,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17797,8 +17892,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - { echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 -echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 +echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6 if test "${tcl_cv_cc_darwin_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17830,35 +17925,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_darwin_c_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_darwin_c_source=no +tcl_cv_cc_darwin_c_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 -echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 +echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6 if test $tcl_cv_cc_darwin_c_source = yes; then cat >>confdefs.h <<\_ACEOF @@ -17879,8 +17978,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17909,36 +18008,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -17958,19 +18060,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17981,37 +18082,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18020,22 +18125,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18043,10 +18150,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18070,19 +18176,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18098,19 +18210,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18121,37 +18232,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18160,22 +18275,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18183,10 +18300,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18210,19 +18326,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18235,8 +18357,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18263,12 +18385,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18281,8 +18403,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18290,27 +18412,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18318,8 +18440,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18327,24 +18449,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18368,8 +18490,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18382,8 +18504,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18391,26 +18513,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18421,37 +18543,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18460,22 +18586,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18483,10 +18611,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18510,18 +18637,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18535,8 +18669,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18552,32 +18686,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18601,8 +18734,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18631,15 +18764,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18653,16 +18786,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18674,7 +18807,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18687,7 +18820,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -18865,7 +18998,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18885,58 +19018,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -18945,36 +19059,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -19003,45 +19133,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19051,43 +19153,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -19101,19 +19168,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19121,120 +19187,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19243,28 +19348,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19273,14 +19357,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19288,19 +19389,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19308,7 +19420,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19322,20 +19434,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19346,42 +19456,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19397,53 +19525,41 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19454,486 +19570,378 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -ZLIB_DIR!$ZLIB_DIR$ac_delim -ZLIB_OBJS!$ZLIB_OBJS$ac_delim -ZLIB_SRCS!$ZLIB_SRCS$ac_delim -ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -LDAIX_SRC!$LDAIX_SRC$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -EXE_SUFFIX!$EXE_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -DLL_INSTALL_DIR!$DLL_INSTALL_DIR$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -PACKAGE_DIR!$PACKAGE_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@ZLIB_DIR@,$ZLIB_DIR,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t +s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t +s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@LDAIX_SRC@,$LDAIX_SRC,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@EXE_SUFFIX@,$EXE_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -19941,52 +19949,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index aaca9f4..209c51a 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.103 2009/11/17 17:27:40 andreas_kupries Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.104 2010/01/10 22:58:41 nijtmans Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -187,7 +187,7 @@ static int TtySetOptionProc(ClientData instanceData, * This structure describes the channel type structure for file based IO: */ -static Tcl_ChannelType fileChannelType = { +static const Tcl_ChannelType fileChannelType = { "file", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ FileCloseProc, /* Close proc. */ @@ -204,7 +204,7 @@ static Tcl_ChannelType fileChannelType = { NULL, /* handler proc. */ FileWideSeekProc, /* wide seek proc. */ NULL, - FileTruncateProc, /* truncate proc. */ + FileTruncateProc /* truncate proc. */ }; #ifdef SUPPORTS_TTY @@ -213,7 +213,7 @@ static Tcl_ChannelType fileChannelType = { * Note that this type is a subclass of the "file" type. */ -static Tcl_ChannelType ttyChannelType = { +static const Tcl_ChannelType ttyChannelType = { "tty", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ FileCloseProc, /* Close proc. */ @@ -230,7 +230,7 @@ static Tcl_ChannelType ttyChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc. */ NULL, /* thread action proc. */ - NULL, /* truncate proc. */ + NULL /* truncate proc. */ }; #endif /* SUPPORTS_TTY */ diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 208b6d9..21a0153 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.50 2009/12/16 23:26:00 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.51 2010/01/10 22:58:41 nijtmans Exp $ */ #include "tclInt.h" @@ -68,7 +68,7 @@ static int SetupStdFile(TclFile file, int type); * I/O: */ -static Tcl_ChannelType pipeChannelType = { +static const Tcl_ChannelType pipeChannelType = { "pipe", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ TCL_CLOSE2PROC, /* Close proc. */ @@ -85,7 +85,7 @@ static Tcl_ChannelType pipeChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc */ NULL, /* thread action proc */ - NULL, /* truncation */ + NULL /* truncation */ }; /* diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 4ed2392..1c852ce 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixSock.c,v 1.22 2009/06/15 16:24:45 rmax Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.23 2010/01/10 22:58:40 nijtmans Exp $ */ #include "tclInt.h" @@ -100,7 +100,7 @@ static int WaitForConnect(TcpState *statePtr, int *errorCodePtr); * based IO: */ -static Tcl_ChannelType tcpChannelType = { +static const Tcl_ChannelType tcpChannelType = { "tcp", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ TcpCloseProc, /* Close proc. */ @@ -117,7 +117,7 @@ static Tcl_ChannelType tcpChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc. */ NULL, /* thread action proc. */ - NULL, /* truncate proc. */ + NULL /* truncate proc. */ }; diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 0511ca2..c2bddb9 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.54 2009/11/18 21:59:49 nijtmans Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.55 2010/01/10 22:58:39 nijtmans Exp $ */ #include "tclWinInt.h" @@ -102,7 +102,7 @@ static DWORD FileGetType(HANDLE handle); * This structure describes the channel type structure for file based IO. */ -static Tcl_ChannelType fileChannelType = { +static const Tcl_ChannelType fileChannelType = { "file", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ FileCloseProc, /* Close proc. */ @@ -119,7 +119,7 @@ static Tcl_ChannelType fileChannelType = { NULL, /* handler proc. */ FileWideSeekProc, /* Wide seek proc. */ FileThreadActionProc, /* Thread action proc. */ - FileTruncateProc, /* Truncate proc. */ + FileTruncateProc /* Truncate proc. */ }; #ifdef HAVE_NO_SEH diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 880841a..16ea391 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinConsole.c,v 1.21 2009/11/18 21:59:49 nijtmans Exp $ + * RCS: @(#) $Id: tclWinConsole.c,v 1.22 2010/01/10 22:58:39 nijtmans Exp $ */ #include "tclWinInt.h" @@ -163,7 +163,7 @@ static void ConsoleThreadActionProc(ClientData instanceData, * based IO. */ -static Tcl_ChannelType consoleChannelType = { +static const Tcl_ChannelType consoleChannelType = { "console", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ ConsoleCloseProc, /* Close proc. */ @@ -180,7 +180,7 @@ static Tcl_ChannelType consoleChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc */ ConsoleThreadActionProc, /* thread action proc */ - NULL, /* truncation */ + NULL /* truncation */ }; /* diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 4f94e76..40c44b7 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.39 2009/12/21 23:25:41 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.40 2010/01/10 22:58:40 nijtmans Exp $ */ #undef STATIC_BUILD @@ -714,7 +714,7 @@ DdeServerProc( } if (convPtr != NULL) { - const char *returnString; + BYTE *returnString; len = DdeQueryString(ddeInstance, ddeItem, NULL, 0, CP_WINANSI); Tcl_DStringInit(&dString); @@ -723,9 +723,9 @@ DdeServerProc( DdeQueryString(ddeInstance, ddeItem, utilString, (DWORD) len + 1, CP_WINANSI); if (strcasecmp(utilString, TCL_DDE_EXECUTE_RESULT) == 0) { - returnString = + returnString = (BYTE *) Tcl_GetStringFromObj(convPtr->returnPackagePtr, &len); - ddeReturn = DdeCreateDataHandle(ddeInstance, (LPBYTE)returnString, + ddeReturn = DdeCreateDataHandle(ddeInstance, returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT, 0); } else { if (Tcl_IsSafe(convPtr->riPtr->interp)) { @@ -735,10 +735,10 @@ DdeServerProc( convPtr->riPtr->interp, utilString, NULL, TCL_GLOBAL_ONLY); if (variableObjPtr != NULL) { - returnString = Tcl_GetStringFromObj(variableObjPtr, - &len); + returnString = (BYTE *) Tcl_GetStringFromObj( + variableObjPtr, &len); ddeReturn = DdeCreateDataHandle(ddeInstance, - (PBYTE)returnString, (DWORD) len+1, 0, ddeItem, + returnString, (DWORD) len+1, 0, ddeItem, CF_TEXT, 0); } else { ddeReturn = NULL; @@ -889,7 +889,7 @@ MakeDdeConnection( HCONV ddeConv; ddeService = DdeCreateStringHandle(ddeInstance, TCL_DDE_SERVICE_NAME, 0); - ddeTopic = DdeCreateStringHandle(ddeInstance, (LPTSTR) name, 0); + ddeTopic = DdeCreateStringHandle(ddeInstance, name, 0); ddeConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL); DdeFreeStringHandle(ddeInstance, ddeService); @@ -1041,12 +1041,12 @@ DdeEnumWindowsCallback( HWND hwndTarget, LPARAM lParam) { - LRESULT dwResult = 0; + DWORD dwResult = 0; struct DdeEnumServices *es = (struct DdeEnumServices *) lParam; SendMessageTimeout(hwndTarget, WM_DDE_INITIATE, (WPARAM)es->hwnd, MAKELONG(es->service, es->topic), SMTO_ABORTIFHUNG, 1000, - (PDWORD_PTR) &dwResult); + &dwResult); return TRUE; } @@ -1173,7 +1173,8 @@ DdeObjCmd( HSZ ddeService = NULL, ddeTopic = NULL, ddeItem = NULL, ddeCookie = NULL; HDDEDATA ddeData = NULL, ddeItemData = NULL, ddeReturn; HCONV hConv = NULL; - const char *serviceName = NULL, *topicName = NULL, *string; + const char *serviceName = NULL, *topicName = NULL; + char *string; DWORD ddeResult; Tcl_Obj *objPtr, *handlerPtr = NULL; @@ -1322,7 +1323,7 @@ DdeObjCmd( if (length == 0) { serviceName = NULL; } else if ((index != DDE_SERVERNAME) && (index != DDE_EVAL)) { - ddeService = DdeCreateStringHandle(ddeInstance, (LPTSTR) serviceName, + ddeService = DdeCreateStringHandle(ddeInstance, serviceName, CP_WINANSI); } @@ -1331,7 +1332,7 @@ DdeObjCmd( if (length == 0) { topicName = NULL; } else { - ddeTopic = DdeCreateStringHandle(ddeInstance, (LPTSTR)topicName, + ddeTopic = DdeCreateStringHandle(ddeInstance, topicName, CP_WINANSI); } } @@ -1348,8 +1349,8 @@ DdeObjCmd( case DDE_EXECUTE: { int dataLength; - const char *dataString = Tcl_GetStringFromObj(objv[firstArg + 2], - &dataLength); + BYTE *dataString = (BYTE *) Tcl_GetStringFromObj( + objv[firstArg + 2], &dataLength); if (dataLength == 0) { Tcl_SetObjResult(interp, @@ -1367,7 +1368,7 @@ DdeObjCmd( break; } - ddeData = DdeCreateDataHandle(ddeInstance, (PBYTE)dataString, + ddeData = DdeCreateDataHandle(ddeInstance, dataString, (DWORD) dataLength+1, 0, 0, CF_TEXT, 0); if (ddeData != NULL) { if (async) { @@ -1407,7 +1408,7 @@ DdeObjCmd( result = TCL_ERROR; } else { Tcl_Obj *returnObjPtr; - ddeItem = DdeCreateStringHandle(ddeInstance, (char *)itemString, + ddeItem = DdeCreateStringHandle(ddeInstance, itemString, CP_WINANSI); if (ddeItem != NULL) { ddeData = DdeClientTransaction(NULL, 0, hConv, ddeItem, @@ -1417,13 +1418,13 @@ DdeObjCmd( result = TCL_ERROR; } else { DWORD tmp; - char *dataString = (char *) DdeAccessData(ddeData, &tmp); + const BYTE *dataString = DdeAccessData(ddeData, &tmp); if (binary) { - returnObjPtr = Tcl_NewByteArrayObj((unsigned char *)dataString, + returnObjPtr = Tcl_NewByteArrayObj(dataString, (int) tmp); } else { - returnObjPtr = Tcl_NewStringObj(dataString, -1); + returnObjPtr = Tcl_NewStringObj((char *)dataString, -1); } DdeUnaccessData(ddeData); DdeFreeDataHandle(ddeData); @@ -1439,7 +1440,7 @@ DdeObjCmd( } case DDE_POKE: { const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); - const char *dataString; + BYTE *dataString; if (length == 0) { Tcl_SetObjResult(interp, @@ -1447,7 +1448,7 @@ DdeObjCmd( result = TCL_ERROR; goto cleanup; } - dataString = Tcl_GetStringFromObj(objv[firstArg + 3], &length); + dataString = (BYTE *) Tcl_GetStringFromObj(objv[firstArg + 3], &length); hConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL); DdeFreeStringHandle(ddeInstance, ddeService); @@ -1457,10 +1458,10 @@ DdeObjCmd( SetDdeError(interp); result = TCL_ERROR; } else { - ddeItem = DdeCreateStringHandle(ddeInstance, (LPTSTR)itemString, + ddeItem = DdeCreateStringHandle(ddeInstance, itemString, CP_WINANSI); if (ddeItem != NULL) { - ddeData = DdeClientTransaction((PBYTE)dataString, (DWORD) length+1, + ddeData = DdeClientTransaction(dataString, (DWORD) length+1, hConv, ddeItem, CF_TEXT, XTYP_POKE, 5000, NULL); if (ddeData == NULL) { SetDdeError(interp); @@ -1602,8 +1603,8 @@ DdeObjCmd( objPtr = Tcl_ConcatObj(objc, objv); string = Tcl_GetStringFromObj(objPtr, &length); - ddeItemData = DdeCreateDataHandle(ddeInstance, (PBYTE)string, - (DWORD) length+1, 0, 0, CF_TEXT, 0); + ddeItemData = DdeCreateDataHandle(ddeInstance, + (BYTE *) string, (DWORD) length+1, 0, 0, CF_TEXT, 0); if (async) { ddeData = DdeClientTransaction((LPBYTE) ddeItemData, @@ -1645,7 +1646,7 @@ DdeObjCmd( length = DdeGetData(ddeData, NULL, 0, 0); Tcl_SetObjLength(resultPtr, length); string = Tcl_GetString(resultPtr); - DdeGetData(ddeData, (PBYTE)string, (DWORD) length, 0); + DdeGetData(ddeData, (BYTE *) string, (DWORD) length, 0); Tcl_SetObjLength(resultPtr, (int) strlen(string)); if (Tcl_ListObjIndex(NULL, resultPtr, 0, &objPtr) != TCL_OK) { diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 1306e1c..2b00ccf 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.71 2009/12/21 23:25:41 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.72 2010/01/10 22:58:40 nijtmans Exp $ */ #include "tclWinInt.h" @@ -208,7 +208,7 @@ static void PipeThreadActionProc(ClientData instanceData, * I/O. */ -static Tcl_ChannelType pipeChannelType = { +static const Tcl_ChannelType pipeChannelType = { "pipe", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ TCL_CLOSE2PROC, /* Close proc. */ @@ -225,7 +225,7 @@ static Tcl_ChannelType pipeChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc */ PipeThreadActionProc, /* thread action proc */ - NULL, /* truncate */ + NULL /* truncate */ }; /* @@ -2740,7 +2740,7 @@ Tcl_PidObjCmd( return TCL_ERROR; } if (objc == 1) { - wsprintfA(buf, "%lu", (unsigned long) getpid()); + wsprintfA(buf, "%lu", (unsigned long) _getpid()); Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); } else { chan = Tcl_GetChannel(interp, Tcl_GetStringFromObj(objv[1], NULL), diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 4e6ba89..195afd2 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.49 2009/11/23 20:17:36 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.50 2010/01/10 22:58:40 nijtmans Exp $ */ #undef STATIC_BUILD @@ -709,8 +709,7 @@ GetType( DWORD result; DWORD type; Tcl_DString ds; - const char *valueName; - const char *nativeValue; + const char *valueName, *nativeValue; int length; /* @@ -778,8 +777,7 @@ GetValue( Tcl_Obj *valueNameObj) /* Name of value to get. */ { HKEY key; - const char *valueName; - const char *nativeValue; + const char *valueName, *nativeValue; DWORD result, length, type; Tcl_DString data, buf; int nameLen; @@ -880,7 +878,7 @@ GetValue( */ Tcl_SetObjResult(interp, Tcl_NewByteArrayObj( - (const unsigned char *)Tcl_DStringValue(&data), (int) length)); + (BYTE *) Tcl_DStringValue(&data), (int) length)); } Tcl_DStringFree(&data); return result; @@ -1394,15 +1392,15 @@ SetValue( (DWORD) type, (BYTE *) data, (DWORD) length); Tcl_DStringFree(&buf); } else { - char *data; + BYTE *data; /* * Store binary data in the registry. */ - data = (char *) Tcl_GetByteArrayFromObj(dataObj, &length); + data = (BYTE *) Tcl_GetByteArrayFromObj(dataObj, &length); result = regWinProcs->regSetValueExProc(key, valueName, 0, - (DWORD) type, (BYTE *) data, (DWORD) length); + (DWORD) type, data, (DWORD) length); } Tcl_DStringFree(&nameBuf); @@ -1440,7 +1438,8 @@ BroadcastValue( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - LRESULT result, sendResult; + LRESULT result; + DWORD sendResult; UINT timeout = 3000; int len; const char *str; @@ -1473,7 +1472,7 @@ BroadcastValue( */ result = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, - (WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, (PDWORD_PTR) &sendResult); + (WPARAM) 0, (LPARAM) str, SMTO_ABORTIFHUNG, timeout, &sendResult); objPtr = Tcl_NewObj(); Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewLongObj((long) result)); @@ -1606,7 +1605,7 @@ ConvertDWORD( */ localType = (*((char*) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; - return (type != localType) ? (DWORD)SWAPLONG(value) : value; + return (type != localType) ? (DWORD) SWAPLONG(value) : value; } /* diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 94d2863..ecefc2e 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.39 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.40 2010/01/10 22:58:40 nijtmans Exp $ */ #include "tclWinInt.h" @@ -203,7 +203,7 @@ static int SerialBlockingWrite(SerialInfo *infoPtr, LPVOID buf, * based IO. */ -static Tcl_ChannelType serialChannelType = { +static const Tcl_ChannelType serialChannelType = { "serial", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ SerialCloseProc, /* Close proc. */ @@ -220,7 +220,7 @@ static Tcl_ChannelType serialChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc */ SerialThreadActionProc, /* thread action proc */ - NULL, /* truncate */ + NULL /* truncate */ }; /* diff --git a/win/tclWinSock.c b/win/tclWinSock.c index c843260..457ca80 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.67 2009/12/21 23:25:41 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.68 2010/01/10 22:58:40 nijtmans Exp $ */ #include "tclWinInt.h" @@ -181,7 +181,7 @@ static Tcl_DriverGetHandleProc TcpGetHandleProc; * based IO. */ -static Tcl_ChannelType tcpChannelType = { +static const Tcl_ChannelType tcpChannelType = { "tcp", /* Type name. */ TCL_CHANNEL_VERSION_5, /* v5 channel */ TcpCloseProc, /* Close proc. */ @@ -198,7 +198,7 @@ static Tcl_ChannelType tcpChannelType = { NULL, /* handler proc. */ NULL, /* wide seek proc */ TcpThreadActionProc, /* thread action proc */ - NULL, /* truncate */ + NULL /* truncate */ }; /* diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index e4850b0..2d483ae 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.50 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.51 2010/01/10 22:58:40 nijtmans Exp $ */ #include "tclWinInt.h" @@ -44,8 +44,10 @@ static CRITICAL_SECTION initLock; #ifdef TCL_THREADS -static CRITICAL_SECTION allocLock; -static Tcl_Mutex allocLockPtr = (Tcl_Mutex) &allocLock; +static struct Tcl_Mutex_ { + CRITICAL_SECTION crit; +} allocLock; +static Tcl_Mutex allocLockPtr = &allocLock; static int allocOnce = 0; #endif /* TCL_THREADS */ @@ -413,7 +415,7 @@ Tcl_GetAllocMutex(void) { #ifdef TCL_THREADS if (!allocOnce) { - InitializeCriticalSection(&allocLock); + InitializeCriticalSection(&allocLock.crit); allocOnce = 1; } return &allocLockPtr; @@ -455,7 +457,7 @@ TclFinalizeLock(void) #ifdef TCL_THREADS if (allocOnce) { - DeleteCriticalSection(&allocLock); + DeleteCriticalSection(&allocLock.crit); allocOnce = 0; } #endif diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 6fa0017..9b30247 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.35 2008/10/26 18:43:27 dkf Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.36 2010/01/10 22:58:39 nijtmans Exp $ */ #include "tclInt.h" @@ -29,11 +29,11 @@ * month, where index 1 is January. */ -static int normalDays[] = { +static const int normalDays[] = { -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 }; -static int leapDays[] = { +static const int leapDays[] = { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; @@ -89,7 +89,7 @@ typedef struct TimeInfo { } TimeInfo; static TimeInfo timeInfo = { - { NULL }, + { NULL, 0, 0, NULL, NULL, 0 }, 0, 0, (HANDLE) NULL, @@ -736,7 +736,7 @@ ComputeGMT( struct tm *tmPtr; long tmp, rem; int isLeap; - int *days; + const int *days; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); tmPtr = &tsdPtr->tm; -- cgit v0.12 From a86702c482163c4cb558d285274539e1504eeb1d Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 12 Jan 2010 10:55:30 +0000 Subject: Fix parameter name confusion for server sockets. --- doc/socket.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/socket.n b/doc/socket.n index 45e2986..aee5d5a 100644 --- a/doc/socket.n +++ b/doc/socket.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: socket.n,v 1.16 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: socket.n,v 1.17 2010/01/12 10:55:30 ferrieux Exp $ .so man.macros .TH socket n 8.0 Tcl "Tcl Built-In Commands" .BS @@ -104,7 +104,7 @@ with three additional arguments: the name of the new channel, the address, in network address notation, of the client's host, and the client's port number. .PP -The following additional option may also be specified before \fIhost\fR: +The following additional option may also be specified before \fIport\fR: .TP \fB\-myaddr\fI addr\fR . -- cgit v0.12 From 56d7490c09f06016e69f254acddad4390e66e924 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 12 Jan 2010 14:38:34 +0000 Subject: Simplification/refactoring of nroff->HTML. --- ChangeLog | 6 ++ tools/tcltk-man2html.tcl | 223 +++++++++++++++++++++++++++++------------------ 2 files changed, 146 insertions(+), 83 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddceecb..7fde17a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-12 Donal K. Fellows + + * tools/tcltk-man2html.tcl: Make the generation of the list of things + to process the docs from simpler and more flexible. Also factored out + the lists of special cases. + 2010-01-10 Jan Nijtmans * win/tclWinDde.c: VC++ 6.0 doesn't have diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index ba4fad6..a1b8191 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -2,7 +2,7 @@ # The next line is executed by /bin/sh, but not tcl \ exec tclsh "$0" ${1+"$@"} -package require Tcl 8.5 +package require Tcl 8.6 # Convert Ousterhout format man pages into highly crosslinked hypertext. # @@ -244,6 +244,8 @@ proc css-stylesheet {} { ## proc make-man-pages {html args} { global manual overall_title tcltkdesc verbose + global excluded_pages forced_index_pages process_first_patterns + makedirhier $html set cssfd [open $html/$::CSSFILE w] puts $cssfd [css-stylesheet] @@ -253,6 +255,10 @@ proc make-man-pages {html args} { puts $manual(short-toc-fp) [htmlhead $overall_title $overall_title] puts $manual(short-toc-fp) "
" set manual(merge-copyrights) {} + + set LQ \u201c + set RQ \u201d + foreach arg $args { # preprocess to set up subheader for the rest of the files if {![llength $arg]} { @@ -288,17 +294,17 @@ proc make-man-pages {html args} { set manual(long-toc-n) 1 # get the manual pages for this section set manual(pages) [lsort -dictionary [glob -nocomplain $manual(wing-glob)]] - set n [lsearch -glob $manual(pages) */ttk_widget.n] - if {$n >= 0} { - set manual(pages) "[lindex $manual(pages) $n] [lreplace $manual(pages) $n $n]" - } - set n [lsearch -glob $manual(pages) */options.n] - if {$n >= 0} { - set manual(pages) "[lindex $manual(pages) $n] [lreplace $manual(pages) $n $n]" + # Some pages have to go first so that their links override others + foreach pat $process_first_patterns { + set n [lsearch -glob $manual(pages) $pat] + if {$n >= 0} { + set f [lindex $manual(pages) $n] + puts stderr "shuffling [file tail $f] to front" + set manual(pages) [linsert [lreplace $manual(pages) $n $n] 0 \ + $f] + } } # set manual(pages) [lrange $manual(pages) 0 5] - set LQ \u201c - set RQ \u201d foreach manual_page $manual(pages) { set manual(page) [file normalize $manual_page] # whistle @@ -310,7 +316,7 @@ proc make-man-pages {html args} { set manual(tail) [file tail $manual(page)] set manual(name) [file root $manual(tail)] set manual(section) {} - if {$manual(name) in {case pack-old menubar}} { + if {$manual(name) in $excluded_pages} { # obsolete if {!$verbose} { puts stderr "" @@ -489,9 +495,9 @@ proc make-man-pages {html args} { error "found .. outside of .de" } default { - if {!$verbose} { - puts stderr "" - } + if {!$verbose} { + puts stderr "" + } flushbuffer manerror "unrecognized format directive: $line" } @@ -549,12 +555,14 @@ proc make-man-pages {html args} { } } man-puts [copyout $manual(copyrights) "../"] - set manual(wing-copyrights) [merge-copyrights $manual(wing-copyrights) $manual(copyrights)] + set manual(wing-copyrights) [merge-copyrights \ + $manual(wing-copyrights) $manual(copyrights)] } # # make the long table of contents for this page # - set manual(toc-$manual(wing-file)-$manual(name)) [concat
$manual(section-toc)
] + set manual(toc-$manual(wing-file)-$manual(name)) \ + [concat
$manual(section-toc)
] } if {!$verbose} { puts stderr "" @@ -596,7 +604,8 @@ proc make-man-pages {html args} { puts $manual(wing-toc-fp) [copyout $manual(wing-copyrights) "../"] puts $manual(wing-toc-fp) "" close $manual(wing-toc-fp) - set manual(merge-copyrights) [merge-copyrights $manual(merge-copyrights) $manual(wing-copyrights)] + set manual(merge-copyrights) [merge-copyrights \ + $manual(merge-copyrights) $manual(wing-copyrights)] } ## @@ -699,14 +708,13 @@ proc make-man-pages {html args} { puts $outfd [htmlhead "$manual($manual(name)-title)" \ $manual(name) $manual(wing-file) "[indexfile]" \ $overall_title "../[indexfile]"] - if { - (($ntext > 60) && ($ntoc > 32)) || $manual(tail) in { - Hash LinkVar SetVar TraceVar ConfigWidg CrtImgType - CrtItemType CrtPhImgFmt DoOneEvent GetBitmap GetColor - GetCursor GetDash GetJustify GetPixels GetVisual - ParseArgv QueueEvent + if {($ntext > 60) && ($ntoc > 32)} { + foreach item $toc { + puts $outfd $item } - } { + } elseif {$manual(name) in $forced_index_pages} { + if {!$verbose} {puts stderr ""} + manerror "forcing index generation" foreach item $toc { puts $outfd $item } @@ -731,73 +739,122 @@ proc make-man-pages {html args} { return {} } -parse_command_line - -set tcltkdesc ""; set cmdesc ""; set appdir "" -if {$build_tcl} { - append tcltkdesc "Tcl" - append cmdesc "Tcl" - append appdir "$tcldir" -} -if {$build_tcl && $build_tk} { - append tcltkdesc "/" - append cmdesc " and " - append appdir "," -} -if {$build_tk} { - append tcltkdesc "Tk" - append cmdesc "Tk" - append appdir "$tkdir" +## +## Helper for assembling the descriptions of base packages (i.e., Tcl and Tk). +## +proc plus-base {var glob name dir desc} { + global tcltkdir + if {$var} { + return [list $tcltkdir/$glob $name $dir $desc] + } } -set usercmddesc "The interpreters which implement $cmdesc." -set tclcmddesc {The commands which the tclsh interpreter implements.} -set tkcmddesc {The additional commands which the wish interpreter implements.} -set tcllibdesc {The C functions which a Tcl extended C program may use.} -set tklibdesc {The additional C functions which a Tk extended C program may use.} - -proc plus-pkg {dir name type} { +## +## Helper for assembling the descriptions of contributed packages. +## +proc plus-pkgs {type args} { global build_tcl tcltkdir tcldir - if {!$build_tcl} return - set globpat $tcltkdir/$tcldir/pkgs/$dir/doc/*.$type - if {![llength [glob -nocomplain $globpat]]} return - if {$type eq "n"} { - set title "$name Package Commands" - set dir [string totitle $dir]Cmd - set desc "The additional commands provided by the $name package." - } elseif {$type eq "3"} { - set title "$name Package Library" - set dir [string totitle $dir]Lib - set desc "The additional C functions provided by the $name package." - } else { + if {$type ni {n 3}} { error "unknown type \"$type\": must be 3 or n" } - return [list $globpat $title $dir $desc] + if {!$build_tcl} return + set result {} + foreach {dir name} $args { + set globpat $tcltkdir/$tcldir/pkgs/$dir/doc/*.$type + if {![llength [glob -nocomplain $globpat]]} continue + switch $type { + n { + set title "$name Package Commands" + set dir [string totitle $dir]Cmd + set desc \ + "The additional commands provided by the $name package." + } + 3 { + set title "$name Package Library" + set dir [string totitle $dir]Lib + set desc \ + "The additional C functions provided by the $name package." + } + } + lappend result [list $globpat $title $dir $desc] + } + return $result } -if {1} { - if {[catch { - make-man-pages $webdir \ - [list $tcltkdir/{$appdir}/doc/*.1 "$tcltkdesc Applications" UserCmd $usercmddesc] \ - [expr {$build_tcl ? - [list $tcltkdir/$tcldir/doc/*.n {Tcl Commands} TclCmd $tclcmddesc] - : ""}] \ - [expr {$build_tk ? - [list $tcltkdir/$tkdir/doc/*.n {Tk Commands} TkCmd $tkcmddesc] - : ""}] \ - [plus-pkg itcl {[incr Tcl]} n] \ - [plus-pkg tdbc TDBC n] \ - [expr {$build_tcl ? - [list $tcltkdir/$tcldir/doc/*.3 {Tcl Library} TclLib $tcllibdesc] - : ""}] \ - [expr {$build_tk ? - [list $tcltkdir/$tkdir/doc/*.3 {Tk Library} TkLib $tklibdesc] - : ""}] \ - [plus-pkg itcl {[incr Tcl]} 3] \ - [plus-pkg tdbc TDBC 3] - } error]} { - puts $error\n$errorInfo +## +## Set up some special cases. It would be nice if we didn't have them, +## but we do... +## +set excluded_pages {case menubar pack-old} +set forced_index_pages {GetDash} +set process_first_patterns {*/ttk_widget.n */options.n} + +try { + # Parse what the user told us to do + parse_command_line + + # Some strings depend on what options are specified + set tcltkdesc ""; set cmdesc ""; set appdir "" + if {$build_tcl} { + append tcltkdesc "Tcl" + append cmdesc "Tcl" + append appdir "$tcldir" + } + if {$build_tcl && $build_tk} { + append tcltkdesc "/" + append cmdesc " and " + append appdir "," + } + if {$build_tk} { + append tcltkdesc "Tk" + append cmdesc "Tk" + append appdir "$tkdir" + } + + # Get the list of packages to try, and what their human-readable + # names are. + try { + set packageDirNameMap {} + if {$build_tcl} { + set f [open $tcltkdir/$tcldir/pkgs/package.list.txt] + try { + foreach line [split [read $f] \n] { + if {[string trim $line] eq ""} continue + if {[string match #* $line]} continue + lappend packageDirNameMap {*}$line + } + } finally { + close $f + } + } + } trap {POSIX ENOENT} {} { + set packageDirNameMap { + itcl {[incr Tcl]} + tdbc {TDBC} + } } + + # + # Invoke the scraper/converter engine. + # + make-man-pages $webdir \ + [list $tcltkdir/{$appdir}/doc/*.1 "$tcltkdesc Applications" UserCmd \ + "The interpreters which implement $cmdesc."] \ + [plus-base $build_tcl $tcldir/doc/*.n {Tcl Commands} TclCmd \ + "The commands which the tclsh interpreter implements."] \ + [plus-base $build_tk $tkdir/doc/*.n {Tk Commands} TkCmd \ + "The additional commands which the wish interpreter implements."] \ + {*}[plus-pkgs n {*}$packageDirNameMap] \ + [plus-base $build_tcl $tcldir/doc/*.3 {Tcl Library} TclLib \ + "The C functions which a Tcl extended C program may use."] \ + [plus-base $build_tk $tkdir/doc/*.3 {Tk Library} TkLib \ + "The additional C functions which a Tk extended C program may use."] \ + {*}[plus-pkgs 3 {*}$packageDirNameMap] +} on error {msg opts} { + # On failure make sure we show what went wrong. We're not supposed + # to get here though; it represents a bug in the script. + puts $msg\n[dict get $opts -errorinfo] + exit 1 } # Local-Variables: -- cgit v0.12 From 4823387a0b6e54dc2e2c9718e2b729224fb7260a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 13 Jan 2010 06:46:56 +0000 Subject: Fix TCL_LL_MODIFIER for Cygwin and various other minor CYGWIN compilation problems --- ChangeLog | 17 +++++++++++++++++ generic/tcl.h | 4 ++-- generic/tclEnv.c | 12 +++++++++--- generic/tclInt.h | 5 ++--- generic/tclPlatDecls.h | 8 ++++---- unix/tclUnixChan.c | 6 +++--- win/cat.c | 8 ++++++-- win/tclWinConsole.c | 4 +--- win/tclWinFile.c | 6 +++--- win/tclWinPipe.c | 6 ++---- win/tclWinPort.h | 30 +++++++++++++++++------------- win/tclWinSerial.c | 18 ++++++++---------- win/tclWinThrd.c | 4 +--- 13 files changed, 75 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fde17a..da37f80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2010-01-13 Jan Nijtmans + + * generic/tcl.h Fix TCL_LL_MODIFIER for Cygwin + * generic/tclEnv.c: Fix CYGWIN compilation problems, + * generic/tclInt.h and remove some unnecessary + * generic/tclPort.h double includes. + * generic/tclPlatDecls.h + * win/cat.c + * win/tclWinConsole.c + * win/tclWinFCmd.c + * win/tclWinFile.c + * win/tclWinPipe.c + * win/tclWinSerial.c + * win/tclWinThrd.c + * win/tclWinPort.h: Put win32 includes first + * unix/tclUnixChan.c Forgot one CONST change + 2010-01-12 Donal K. Fellows * tools/tcltk-man2html.tcl: Make the generation of the list of things diff --git a/generic/tcl.h b/generic/tcl.h index 75975bf..fb8a27b 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.295 2009/12/23 20:12:39 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.296 2010/01/13 06:46:56 nijtmans Exp $ */ #ifndef _TCL @@ -377,7 +377,7 @@ typedef long LONG; # if defined(__WIN32__) && !defined(__CYGWIN__) # define TCL_LL_MODIFIER "I64" # else -# define TCL_LL_MODIFIER "L" +# define TCL_LL_MODIFIER "ll" # endif typedef struct stat Tcl_StatBuf; # elif defined(__WIN32__) diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 40650de..f89ca41 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.40 2009/12/21 23:25:40 nijtmans Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.41 2010/01/13 06:46:56 nijtmans Exp $ */ #include "tclInt.h" @@ -695,8 +695,6 @@ TclFinalizeEnvironment(void) #if defined(__CYGWIN__) -#include - /* * When using cygwin, when an environment variable changes, we need to synch * with both the cygwin environment (in case the application C code calls @@ -757,11 +755,15 @@ TclCygwinPutenv( */ if (strcmp(name, "Path") == 0) { +#ifdef __WIN32__ SetEnvironmentVariable("PATH", NULL); +#endif unsetenv("PATH"); } +#ifdef __WIN32__ SetEnvironmentVariable(name, value); +#endif } else { char *buf; @@ -769,7 +771,9 @@ TclCygwinPutenv( * Eliminate any Path variable, to prevent any confusion. */ +#ifdef __WIN32__ SetEnvironmentVariable("Path", NULL); +#endif unsetenv("Path"); if (value == NULL) { @@ -782,7 +786,9 @@ TclCygwinPutenv( cygwin_posix_to_win32_path_list(value, buf); } +#ifdef __WIN32__ SetEnvironmentVariable(name, buf); +#endif } } #endif /* __CYGWIN__ */ diff --git a/generic/tclInt.h b/generic/tclInt.h index bf13446..36aa1ea 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.453 2009/12/11 04:47:13 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.454 2010/01/13 06:46:56 nijtmans Exp $ */ #ifndef _TCLINT @@ -40,6 +40,7 @@ #ifdef HAVE_TCL_CONFIG_H #include "tclConfig.h" #endif +#include "tclPort.h" #ifndef _TCL #include "tcl.h" #endif @@ -2927,7 +2928,6 @@ MODULE_SCOPE Tcl_Obj * TclPathPart(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_PathPart portion); MODULE_SCOPE char * TclpReadlink(const char *fileName, Tcl_DString *linkPtr); -MODULE_SCOPE void TclpReleaseFile(TclFile file); MODULE_SCOPE void TclpSetInterfaces(void); MODULE_SCOPE void TclpSetVariables(Tcl_Interp *interp); MODULE_SCOPE void TclpUnloadFile(Tcl_LoadHandle loadHandle); @@ -4437,7 +4437,6 @@ typedef struct TEOV_callback { #define NRE_ASSERT(expr) #endif -#include "tclPort.h" #include "tclIntDecls.h" #include "tclIntPlatDecls.h" #include "tclTomMathDecls.h" diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 44358c2..bcd8fc3 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.34 2009/12/21 23:25:40 nijtmans Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.35 2010/01/13 06:46:56 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -26,7 +26,9 @@ /* * Pull in the typedef of TCHAR for windows. */ -#if defined(__WIN32__) && !defined(_TCHAR_DEFINED) +#if defined(__CYGWIN__) + typedef char TCHAR; +#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) # include # ifndef _TCHAR_DEFINED /* Borland seems to forget to set this. */ @@ -37,8 +39,6 @@ /* MSVC++ misses this. */ typedef _TCHAR TCHAR; # endif -#elif defined(__CYGWIN__) - typedef char TCHAR; #endif /* !BEGIN!: Do not edit below this line. */ diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 209c51a..9b6cc95 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixChan.c,v 1.104 2010/01/10 22:58:41 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.105 2010/01/13 06:46:57 nijtmans Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -1538,7 +1538,7 @@ TclpOpenFileChannel( FileState *fsPtr; const char *native, *translation; char channelName[16 + TCL_INTEGER_SPACE]; - Tcl_ChannelType *channelTypePtr; + const Tcl_ChannelType *channelTypePtr; switch (mode & (O_RDONLY | O_WRONLY | O_RDWR)) { case O_RDONLY: @@ -1664,7 +1664,7 @@ Tcl_MakeFileChannel( FileState *fsPtr; char channelName[16 + TCL_INTEGER_SPACE]; int fd = PTR2INT(handle); - Tcl_ChannelType *channelTypePtr; + const Tcl_ChannelType *channelTypePtr; struct sockaddr sockaddr; socklen_t sockaddrLen = sizeof(sockaddr); diff --git a/win/cat.c b/win/cat.c index d1a7338..c91e0d2 100644 --- a/win/cat.c +++ b/win/cat.c @@ -8,11 +8,15 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: cat.c,v 1.4 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: cat.c,v 1.5 2010/01/13 06:46:56 nijtmans Exp $ */ #include -#include +#ifdef __CYGWIN__ +# include +#else +# include +#endif #include int diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 16ea391..a47165c 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -9,13 +9,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinConsole.c,v 1.22 2010/01/10 22:58:39 nijtmans Exp $ + * RCS: @(#) $Id: tclWinConsole.c,v 1.23 2010/01/13 06:46:56 nijtmans Exp $ */ #include "tclWinInt.h" -#include -#include #include /* diff --git a/win/tclWinFile.c b/win/tclWinFile.c index c9d6e28..f18ca7e 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.101 2009/12/21 23:25:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.102 2010/01/13 06:46:56 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -226,7 +226,7 @@ WinLink( { WCHAR tempFileName[MAX_PATH]; TCHAR *tempFilePart; - int attr; + DWORD attr; /* * Get the full path referenced by the target. @@ -347,7 +347,7 @@ WinReadLink( { WCHAR tempFileName[MAX_PATH]; TCHAR *tempFilePart; - int attr; + DWORD attr; /* * Get the full path referenced by the target. diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 2b00ccf..8357637 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,13 +9,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.72 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.73 2010/01/13 06:46:56 nijtmans Exp $ */ #include "tclWinInt.h" -#include -#include #include /* @@ -2740,7 +2738,7 @@ Tcl_PidObjCmd( return TCL_ERROR; } if (objc == 1) { - wsprintfA(buf, "%lu", (unsigned long) _getpid()); + wsprintfA(buf, "%lu", (unsigned long) getpid()); Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); } else { chan = Tcl_GetChannel(interp, Tcl_GetStringFromObj(objv[1], NULL), diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 01e5432..c7e343f 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,12 +10,22 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.52 2009/12/21 23:25:41 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.53 2010/01/13 06:46:56 nijtmans Exp $ */ #ifndef _TCLWINPORT #define _TCLWINPORT +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + +/* + * Ask for the winsock function typedefs, also. + */ +#define INCL_WINSOCK_API_TYPEDEFS 1 +#include + #ifdef CHECK_UNICODE_CALLS # define _UNICODE # define UNICODE @@ -32,13 +42,17 @@ *--------------------------------------------------------------------------- */ +#ifdef __CYGWIN__ +# include +# include +#else +# include +#endif #include #include - #include #include #include -#include #include #include #include @@ -71,16 +85,6 @@ #include -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN - -/* - * Ask for the winsock function typedefs, also. - */ -#define INCL_WINSOCK_API_TYPEDEFS 1 -#include - /* * Define EINPROGRESS in terms of WSAEINPROGRESS. */ diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index ecefc2e..c3144e3 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,13 +11,11 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.40 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.41 2010/01/13 06:46:56 nijtmans Exp $ */ #include "tclWinInt.h" -#include -#include #include /* @@ -1744,16 +1742,16 @@ SerialSetOptionProc( dcb.XonLim = (WORD) (infoPtr->sysBufRead*1/2); dcb.XoffLim = (WORD) (infoPtr->sysBufRead*1/4); - if (strnicmp(value, "NONE", vlen) == 0) { + if (strncasecmp(value, "NONE", vlen) == 0) { /* * Leave all handshake options disabled. */ - } else if (strnicmp(value, "XONXOFF", vlen) == 0) { + } else if (strncasecmp(value, "XONXOFF", vlen) == 0) { dcb.fOutX = dcb.fInX = TRUE; - } else if (strnicmp(value, "RTSCTS", vlen) == 0) { + } else if (strncasecmp(value, "RTSCTS", vlen) == 0) { dcb.fOutxCtsFlow = TRUE; dcb.fRtsControl = RTS_CONTROL_HANDSHAKE; - } else if (strnicmp(value, "DTRDSR", vlen) == 0) { + } else if (strncasecmp(value, "DTRDSR", vlen) == 0) { dcb.fOutxDsrFlow = TRUE; dcb.fDtrControl = DTR_CONTROL_HANDSHAKE; } else { @@ -1863,7 +1861,7 @@ SerialSetOptionProc( result = TCL_ERROR; break; } - if (strnicmp(argv[i], "DTR", strlen(argv[i])) == 0) { + if (strncasecmp(argv[i], "DTR", strlen(argv[i])) == 0) { if (!EscapeCommFunction(infoPtr->handle, (DWORD) (flag ? SETDTR : CLRDTR))) { if (interp != NULL) { @@ -1872,7 +1870,7 @@ SerialSetOptionProc( result = TCL_ERROR; break; } - } else if (strnicmp(argv[i], "RTS", strlen(argv[i])) == 0) { + } else if (strncasecmp(argv[i], "RTS", strlen(argv[i])) == 0) { if (!EscapeCommFunction(infoPtr->handle, (DWORD) (flag ? SETRTS : CLRRTS))) { if (interp != NULL) { @@ -1881,7 +1879,7 @@ SerialSetOptionProc( result = TCL_ERROR; break; } - } else if (strnicmp(argv[i], "BREAK", strlen(argv[i])) == 0) { + } else if (strncasecmp(argv[i], "BREAK", strlen(argv[i])) == 0) { if (!EscapeCommFunction(infoPtr->handle, (DWORD) (flag ? SETBREAK : CLRBREAK))) { if (interp != NULL) { diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 2d483ae..67e7350 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -10,13 +10,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.51 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.52 2010/01/13 06:46:56 nijtmans Exp $ */ #include "tclWinInt.h" -#include -#include #include /* -- cgit v0.12 From 5c34a55eb603244a562250dcd9a840f44ed7933a Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:10:10 +0000 Subject: Don't break a command reference over a line --- doc/coroutine.n | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/coroutine.n b/doc/coroutine.n index 4985e52..4a7d799 100644 --- a/doc/coroutine.n +++ b/doc/coroutine.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: coroutine.n,v 1.4 2009/11/01 00:27:29 dkf Exp $ +'\" RCS: @(#) $Id: coroutine.n,v 1.5 2010/01/13 09:10:10 dkf Exp $ '\" .so man.macros .TH coroutine n 8.6 Tcl "Tcl Built-In Commands" @@ -38,8 +38,9 @@ returns conventionally, the result of the \fBcoroutine\fR command will be the result of the evaluation of the context. .PP The coroutine can also be deleted by destroying the command \fIname\fR, and -the name of the current coroutine can be retrieved by using \fBinfo -coroutine\fR. If there are deletion traces on variables in the coroutine's +the name of the current coroutine can be retrieved by using +\fBinfo coroutine\fR. +If there are deletion traces on variables in the coroutine's implementation, they will fire at the point when the coroutine is explicitly deleted (or, naturally, if the command returns conventionally). .PP -- cgit v0.12 From 289de8e738b81bc1b70c12e6f1b0750baf335ae7 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:13:35 +0000 Subject: Improve NAME for better HTML generation --- doc/prefix.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/prefix.n b/doc/prefix.n index 927318a..0ce3052 100644 --- a/doc/prefix.n +++ b/doc/prefix.n @@ -4,14 +4,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: prefix.n,v 1.4 2008/10/19 16:22:20 dkf Exp $ +'\" RCS: @(#) $Id: prefix.n,v 1.5 2010/01/13 09:13:35 dkf Exp $ '\" .so man.macros .TH prefix n 8.6 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -prefix \- facilities for prefix matching +tcl::prefix \- facilities for prefix matching .SH SYNOPSIS .nf \fB::tcl::prefix all\fR \fItable\fR \fIstring\fR -- cgit v0.12 From be427b8a40eb802bae112dc42a01060deffdebca Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:32:48 +0000 Subject: More factoring out of special cases in the nroff->HTML code. --- ChangeLog | 59 +++++++++-------- tools/tcltk-man2html-utils.tcl | 142 +++++++++++------------------------------ tools/tcltk-man2html.tcl | 33 +++++++++- 3 files changed, 100 insertions(+), 134 deletions(-) diff --git a/ChangeLog b/ChangeLog index da37f80..3eb1c99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,19 +1,26 @@ +2010-01-13 Donal K. Fellows + + * tools/tcltk-man2html.tcl: More factoring out of special cases + * tools/tcltk-man2html-utils.tcl: so that they are described outside + the engine file. Now there is only one real set of special cases in + there, to handle the .SO/.OP/.SE directives. + 2010-01-13 Jan Nijtmans - * generic/tcl.h Fix TCL_LL_MODIFIER for Cygwin + * generic/tcl.h: Fix TCL_LL_MODIFIER for Cygwin * generic/tclEnv.c: Fix CYGWIN compilation problems, - * generic/tclInt.h and remove some unnecessary - * generic/tclPort.h double includes. - * generic/tclPlatDecls.h - * win/cat.c - * win/tclWinConsole.c - * win/tclWinFCmd.c - * win/tclWinFile.c - * win/tclWinPipe.c - * win/tclWinSerial.c - * win/tclWinThrd.c + * generic/tclInt.h: and remove some unnecessary + * generic/tclPort.h: double includes. + * generic/tclPlatDecls.h: + * win/cat.c: + * win/tclWinConsole.c: + * win/tclWinFCmd.c: + * win/tclWinFile.c: + * win/tclWinPipe.c: + * win/tclWinSerial.c: + * win/tclWinThrd.c: * win/tclWinPort.h: Put win32 includes first - * unix/tclUnixChan.c Forgot one CONST change + * unix/tclUnixChan.c: Forgot one CONST change 2010-01-12 Donal K. Fellows @@ -24,21 +31,21 @@ 2010-01-10 Jan Nijtmans * win/tclWinDde.c: VC++ 6.0 doesn't have - * win/tclWinReg.c PDWORD_PTR + * win/tclWinReg.c: PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. - * win/tclWinTime.c - * win/tclWinConsole.c Put channel type definitions - * win/tclWinChan.c in static const memory - * win/tclWinPipe.c - * win/tclWinSerial.c - * win/tclWinSock.c - * generic/tclIOGT.c - * generic/tclIORChan.c - * generic/tclIORTrans.c - * unix/tclUnixChan.c - * unix/tclUnixPipe.c - * unix/tclUnixSock.c - * unix/configure (regenerated with autoconf 2.59) + * win/tclWinTime.c: + * win/tclWinConsole.c: Put channel type definitions + * win/tclWinChan.c: in static const memory + * win/tclWinPipe.c: + * win/tclWinSerial.c: + * win/tclWinSock.c: + * generic/tclIOGT.c: + * generic/tclIORChan.c: + * generic/tclIORTrans.c: + * unix/tclUnixChan.c: + * unix/tclUnixPipe.c: + * unix/tclUnixSock.c: + * unix/configure: (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation. diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index bf5d37b..e6a4227 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -299,6 +299,7 @@ proc long-toc {text} { } proc option-toc {name class switch} { global manual + # Special case handling, oh we hate it but must do it if {[string match "*OPTIONS" $manual(section)]} { if {$manual(name) ne "ttk_widget" && ($manual(name) ne "ttk_entry" || ![string match validate* $name])} { @@ -509,12 +510,6 @@ proc output-IP-list {context code rest} { } else { man-puts "$para
[long-toc $rest]
" } - if {"$manual(name):$manual(section)" eq \ - "selection:DESCRIPTION"} { - if {[match-text .RE @rest .RS .RS]} { - man-puts
[long-toc $rest]
- } - } } .sp - .br - .DS - .CS { output-directive $line @@ -613,28 +608,23 @@ proc output-name {line} { ## proc cross-reference {ref} { global manual - if {[string match "Tcl_*" $ref]} { - set lref $ref - } elseif {[string match "Tk_*" $ref]} { + global ensemble_commands exclude_refs_map exclude_when_followed_by_map + set lref [string tolower $ref] + if {[string match "Tcl_*" $ref] || [string match "Tk_*" $ref]} { set lref $ref } elseif {$ref eq "Tcl"} { set lref $ref - } elseif {[regexp {^[A-Z0-9 ?!]+$} $ref]} { - if {[info exists manual($manual(name)-id-$ref)]} { - return "$ref" - } - set lref [string tolower $ref] - } else { - set lref [string tolower $ref] + } elseif { + [regexp {^[A-Z0-9 ?!]+$} $ref] + && [info exists manual($manual(name)-id-$ref)] + } { + return "$ref" } ## ## nothing to reference ## if {![info exists manual(name-$lref)]} { - foreach name { - array file history info interp string trace after clipboard grab - image option pack place selection tk tkwait update winfo wm - } { + foreach name $ensemble_commands { if {[regexp "^$name \[a-z0-9]*\$" $lref] && \ [info exists manual(name-$name)] && \ $manual(tail) ne "$name.n"} { @@ -681,60 +671,22 @@ proc cross-reference {ref} { ## ## exceptions, sigh, to the rule ## - switch -exact -- $manual(tail) { - canvas.n { - if {$lref eq "focus"} { - upvar 1 tail tail - set clue [string first command $tail] - if {$clue < 0 || $clue > 5} { - return $ref - } - } - if {$lref in {bitmap image text}} { - return $ref - } - } - checkbutton.n - radiobutton.n { - if {$lref in {image}} { - return $ref - } - } - menu.n { - if {$lref in {checkbutton radiobutton}} { - return $ref - } - } - options.n { - if {$lref in {bitmap image set}} { - return $ref - } - } - regexp.n { - if {$lref in {string}} { - return $ref - } - } - source.n { - if {$lref in {text}} { - return $ref - } - } - history.n { - if {$lref in {exec}} { - return $ref - } - } - return.n { - if {$lref in {error continue break}} { - return $ref - } - } - scrollbar.n { - if {$lref in {set}} { + if {[info exists exclude_when_followed_by_map($manual(tail))]} { + upvar 1 tail tail + set following_word [regexp -inline {\S+} $tail] + foreach {this that} $exclude_when_followed_by_map($manual(tail)) { + # only a ref if $this is not followed by $that + if {$lref eq $this && [string match $that* $following_word]} { return $ref } } } + if { + [info exists exclude_refs_map($manual(tail))] + && $lref in $exclude_refs_map($manual(tail)) + } { + return $ref + } ## ## return the cross reference ## @@ -923,15 +875,8 @@ proc output-directive {line} { } # some sections can simply free wheel their way through the text # some sections can be processed in their own loops - switch -exact -- $manual(section) { - NAME { - if {$manual(tail) in {CrtImgType.3 CrtItemType.3 CrtPhImgFmt.3}} { - # these manual pages have two NAME sections - if {[info exists manual($manual(tail)-NAME)]} { - return - } - set manual($manual(tail)-NAME) 1 - } + switch -exact -- [string index $code end]:$manual(section) { + H:NAME { set names {} while {1} { set line [next-text] @@ -939,12 +884,11 @@ proc output-directive {line} { backup-text 1 output-name [join $names { }] return - } else { - lappend names [string trim $line] } + lappend names [string trim $line] } } - SYNOPSIS { + H:SYNOPSIS { lappend manual(section-toc)
while {1} { if { @@ -988,7 +932,7 @@ proc output-directive {line} { lappend manual(section-toc)
return } - {SEE ALSO} { + {H:SEE ALSO} { while {[more-text]} { if {[next-op-is .SH rest] || [next-op-is .SS rest]} { backup-text 1 @@ -1015,7 +959,7 @@ proc output-directive {line} { } return } - KEYWORDS { + H:KEYWORDS { while {[more-text]} { if {[next-op-is .SH rest] || [next-op-is .SS rest]} { backup-text 1 @@ -1030,7 +974,8 @@ proc output-directive {line} { set keys {} foreach key [split $more ,] { set key [string trim $key] - lappend manual(keyword-$key) [list $manual(name) $manual(wing-file)/$manual(name).htm] + lappend manual(keyword-$key) [list $manual(name) \ + $manual(wing-file)/$manual(name).htm] set initial [string toupper [string index $key 0]] lappend keys "$key" } @@ -1135,23 +1080,7 @@ proc output-directive {line} { man-puts

} .ta { - # these are tab stop settings for short tables - switch -exact -- $manual(name):$manual(section) { - {bind:MODIFIERS} - - {bind:EVENT TYPES} - - {bind:BINDING SCRIPTS AND SUBSTITUTIONS} - - {expr:OPERANDS} - - {expr:MATH FUNCTIONS} - - {history:DESCRIPTION} - - {history:HISTORY REVISION} - - {switch:DESCRIPTION} - - {upvar:DESCRIPTION} { - return; # fix.me - } - default { - manerror "ignoring $line" - } - } + manerror "ignoring $line" } .nf { if {[match-text @more .fi]} { @@ -1261,9 +1190,12 @@ proc merge-copyrights {l1 l2} { } proc makedirhier {dir} { - if {![file isdirectory $dir] && \ - [catch {file mkdir $dir} error]} { - return -code error "cannot create directory $dir: $error" + try { + if {![file isdirectory $dir]} { + file mkdir $dir + } + } on error msg { + return -code error "cannot create directory $dir: $msg" } } diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index a1b8191..2611393 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -299,9 +299,9 @@ proc make-man-pages {html args} { set n [lsearch -glob $manual(pages) $pat] if {$n >= 0} { set f [lindex $manual(pages) $n] - puts stderr "shuffling [file tail $f] to front" - set manual(pages) [linsert [lreplace $manual(pages) $n $n] 0 \ - $f] + puts stderr "shuffling [file tail $f] to front of processing queue" + set manual(pages) \ + [linsert [lreplace $manual(pages) $n $n] 0 $f] } } # set manual(pages) [lrange $manual(pages) 0 5] @@ -788,6 +788,33 @@ proc plus-pkgs {type args} { set excluded_pages {case menubar pack-old} set forced_index_pages {GetDash} set process_first_patterns {*/ttk_widget.n */options.n} +set ensemble_commands { + after array binary chan clock dde dict encoding file history info interp + memory namespace package registry self string trace update zlib + clipboard console grab grid image option pack place selection tk tkwait + winfo wm +} +array set exclude_refs_map { + history.n {exec} + regexp.n {string} + return.n {break continue error} + source.n {text} + canvas.n {bitmap text} + checkbutton.n {image} + menu.n {checkbutton radiobutton} + options.n {bitmap image set} + radiobutton.n {image} + scrollbar.n {set} +} +array set exclude_when_followed_by_map { + canvas.n { + bind widget + focus widget + image are + lower widget + raise widget + } +} try { # Parse what the user told us to do -- cgit v0.12 From 6efa34019112d03215fd4509f26e10f6bfa908fd Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:41:44 +0000 Subject: Tweak to generate better links --- doc/upvar.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/upvar.n b/doc/upvar.n index 8242a43..29af621 100644 --- a/doc/upvar.n +++ b/doc/upvar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: upvar.n,v 1.17 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: upvar.n,v 1.18 2010/01/13 09:41:44 dkf Exp $ '\" .so man.macros .TH upvar n "" Tcl "Tcl Built-In Commands" @@ -64,7 +64,7 @@ that the Tcl naming context can change. It adds a call frame to the stack to represent the namespace context. This means each \fBnamespace eval\fR command counts as another call level for \fBuplevel\fR and \fBupvar\fR commands. -For example, \fBinfo level 1\fR will return a list +For example, \fBinfo level\fR \fB1\fR will return a list describing a command that is either the outermost procedure call or the outermost \fBnamespace eval\fR command. Also, \fBuplevel #0\fR evaluates a script -- cgit v0.12 From d8ff80b20626a10935acd61284aef1af09f313cc Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:42:02 +0000 Subject: Formatting --- doc/upvar.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/upvar.n b/doc/upvar.n index 29af621..d6baa45 100644 --- a/doc/upvar.n +++ b/doc/upvar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: upvar.n,v 1.18 2010/01/13 09:41:44 dkf Exp $ +'\" RCS: @(#) $Id: upvar.n,v 1.19 2010/01/13 09:42:02 dkf Exp $ '\" .so man.macros .TH upvar n "" Tcl "Tcl Built-In Commands" @@ -56,7 +56,7 @@ proc \fIadd2\fR name { If \fIadd2\fR is invoked with an argument giving the name of a variable, it adds two to the value of that variable. Although \fIadd2\fR could have been implemented using \fBuplevel\fR -instead of \fBupvar\fR, \fBupvar\fR makes it simpler for \fBadd2\fR +instead of \fBupvar\fR, \fBupvar\fR makes it simpler for \fIadd2\fR to access the variable in the caller's procedure frame. .PP \fBnamespace eval\fR is another way (besides procedure calls) -- cgit v0.12 From 64c888aa098657d606d2377b70a5d355e0c3f37a Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:47:37 +0000 Subject: No need for return(n) to get special treatment --- tools/tcltk-man2html.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 2611393..a550a07 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -797,7 +797,6 @@ set ensemble_commands { array set exclude_refs_map { history.n {exec} regexp.n {string} - return.n {break continue error} source.n {text} canvas.n {bitmap text} checkbutton.n {image} -- cgit v0.12 From e6667b545727cc9ef6510a8d0341787d742ce6e5 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:48:16 +0000 Subject: Some small formatting tweaks --- doc/return.n | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/return.n b/doc/return.n index d771c28..fc2d1f8 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.22 2009/05/15 09:14:45 dkf Exp $ +'\" RCS: @(#) $Id: return.n,v 1.23 2010/01/13 09:48:16 dkf Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -47,31 +47,31 @@ However, the \fB\-code\fR option may be used to generate an exceptional return from the procedure. \fICode\fR may have any of the following values: .TP 13 -\fBok (or 0)\fR +\fBok\fR (or \fB0\fR) . Normal return: same as if the option is omitted. The return code of the procedure is 0 (\fBTCL_OK\fR). .TP 13 -\fBerror (1)\fR +\fBerror\fR (or \fB1\fR) . Error return: the return code of the procedure is 1 (\fBTCL_ERROR\fR). The procedure command behaves in its calling context as if it -were the command \fBerror \fIresult\fR. See below for additional +were the command \fBerror\fR \fIresult\fR. See below for additional options. .TP 13 -\fBreturn (2)\fR +\fBreturn\fR (or \fB2\fR) . The return code of the procedure is 2 (\fBTCL_RETURN\fR). The procedure command behaves in its calling context as if it were the command \fBreturn\fR (with no arguments). .TP 13 -\fBbreak (3)\fR +\fBbreak\fR (or \fB3\fR) . The return code of the procedure is 3 (\fBTCL_BREAK\fR). The procedure command behaves in its calling context as if it were the command \fBbreak\fR. .TP 13 -\fBcontinue (4)\fR +\fBcontinue\fR (or \fB4\fR) . The return code of the procedure is 4 (\fBTCL_CONTINUE\fR). The procedure command behaves in its calling context as if it -- cgit v0.12 From a399efb99d61fd87606a8b8cf4b86f371c577269 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:50:56 +0000 Subject: No need for regexp(n) to get special treatment --- tools/tcltk-man2html.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index a550a07..6aeb391 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -796,7 +796,6 @@ set ensemble_commands { } array set exclude_refs_map { history.n {exec} - regexp.n {string} source.n {text} canvas.n {bitmap text} checkbutton.n {image} -- cgit v0.12 From a66f8d027cfa93a76a8c917c91f30f678d1c671b Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 09:58:42 +0000 Subject: Another useless special case removed --- tools/tcltk-man2html.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 6aeb391..bed64c9 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -796,7 +796,6 @@ set ensemble_commands { } array set exclude_refs_map { history.n {exec} - source.n {text} canvas.n {bitmap text} checkbutton.n {image} menu.n {checkbutton radiobutton} -- cgit v0.12 From cf087b8bcbf673840c1339d32015a6c63ab38f81 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 12:08:30 +0000 Subject: Improve choice of keywords --- doc/Exit.3 | 4 ++-- doc/FileSystem.3 | 4 ++-- doc/LinkVar.3 | 4 ++-- doc/Tcl.n | 4 +++- doc/apply.n | 2 +- doc/catch.n | 4 ++-- doc/concat.n | 4 ++-- doc/encoding.n | 4 ++-- doc/error.n | 4 ++-- doc/exit.n | 4 ++-- doc/file.n | 5 +++-- doc/for.n | 4 ++-- doc/foreach.n | 4 ++-- doc/list.n | 4 ++-- doc/load.n | 6 +++--- doc/regsub.n | 4 ++-- doc/return.n | 4 ++-- doc/socket.n | 4 ++-- doc/subst.n | 4 ++-- doc/tclsh.1 | 4 ++-- doc/tclvars.n | 5 +++-- doc/unknown.n | 4 ++-- doc/update.n | 4 ++-- doc/uplevel.n | 4 ++-- doc/upvar.n | 4 ++-- doc/vwait.n | 4 ++-- 26 files changed, 55 insertions(+), 51 deletions(-) diff --git a/doc/Exit.3 b/doc/Exit.3 index f95a9d1..66ce3be 100644 --- a/doc/Exit.3 +++ b/doc/Exit.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Exit.3,v 1.9 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: Exit.3,v 1.10 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH Tcl_Exit 3 8.5 Tcl "Tcl Library Procedures" @@ -139,4 +139,4 @@ cast to a ClientData value. .SH "SEE ALSO" exit(n) .SH KEYWORDS -callback, cleanup, dynamic loading, end application, exit, unloading, thread +abort, callback, cleanup, dynamic loading, end application, exit, unloading, thread diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index 694c718..3a19dd0 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.68 2009/11/27 14:35:10 dkf Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.69 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -1623,4 +1623,4 @@ directory to the value specified in \fIpathPtr\fR. The function returns .SH "SEE ALSO" cd(n), file(n), filename(n), load(n), open(n), pwd(n), source(n), unload(n) .SH KEYWORDS -stat, access, filesystem, vfs, virtual +stat, access, filesystem, vfs, virtual filesystem diff --git a/doc/LinkVar.3 b/doc/LinkVar.3 index 5ff0565..3801026 100644 --- a/doc/LinkVar.3 +++ b/doc/LinkVar.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: LinkVar.3,v 1.18 2009/09/03 08:07:07 dkf Exp $ +'\" RCS: @(#) $Id: LinkVar.3,v 1.19 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures" @@ -206,4 +206,4 @@ to indicate to the thread hosting the interpreter that it is ready to run .SH "SEE ALSO" Tcl_TraceVar(3) .SH KEYWORDS -boolean, integer, link, read-only, real, string, traces, variable +boolean, integer, link, read-only, real, string, trace, variable diff --git a/doc/Tcl.n b/doc/Tcl.n index 70e903a..fd31dfc 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Tcl.n,v 1.23 2009/12/11 14:01:53 dkf Exp $ +'\" RCS: @(#) $Id: Tcl.n,v 1.24 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH Tcl n "8.5" Tcl "Tcl Built-In Commands" @@ -246,6 +246,8 @@ except for argument expansion as specified in rule [5]. For example, during variable substitution the entire value of the variable becomes part of a single word, even if the variable's value contains spaces. +.SH KEYWORDS +backslash, command, comment, script, substitution, variable '\" Local Variables: '\" mode: nroff '\" fill-column: 78 diff --git a/doc/apply.n b/doc/apply.n index 8fd568c..e76c1e5 100644 --- a/doc/apply.n +++ b/doc/apply.n @@ -96,4 +96,4 @@ set vbl abc .SH "SEE ALSO" proc(n), uplevel(n) .SH KEYWORDS -argument, procedure, anonymous function +anonymous function, argument, lambda, procedure, diff --git a/doc/catch.n b/doc/catch.n index 1c617b3..a21fabd 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.22 2009/11/16 18:00:11 dgp Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.23 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -92,4 +92,4 @@ documentation for the \fBreturn\fR command. .SH "SEE ALSO" break(n), continue(n), dict(n), error(n), return(n), tclvars(n) .SH KEYWORDS -catch, error +catch, error, exception diff --git a/doc/concat.n b/doc/concat.n index 23ecb2d..7cda15c 100644 --- a/doc/concat.n +++ b/doc/concat.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: concat.n,v 1.13 2009/04/27 12:31:38 dkf Exp $ +'\" RCS: @(#) $Id: concat.n,v 1.14 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH concat n 8.3 Tcl "Tcl Built-In Commands" @@ -54,7 +54,7 @@ values, as can be seen here: .SH "SEE ALSO" append(n), eval(n), join(n) .SH KEYWORDS -concatenate, join, lists +concatenate, join, list '\" Local Variables: '\" mode: nroff '\" End: diff --git a/doc/encoding.n b/doc/encoding.n index c4c9637..4e31bff 100644 --- a/doc/encoding.n +++ b/doc/encoding.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: encoding.n,v 1.17 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: encoding.n,v 1.18 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH encoding n "8.1" Tcl "Tcl Built-In Commands" @@ -94,4 +94,4 @@ which is the Hiragana letter HA. .SH "SEE ALSO" Tcl_GetEncoding(3) .SH KEYWORDS -encoding +encoding, unicode diff --git a/doc/error.n b/doc/error.n index 2ac0a65..d3cf694 100644 --- a/doc/error.n +++ b/doc/error.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: error.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: error.n,v 1.14 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH error n "" Tcl "Tcl Built-In Commands" @@ -74,4 +74,4 @@ if {1+2 != 3} { .SH "SEE ALSO" catch(n), return(n) .SH KEYWORDS -error +error, exception diff --git a/doc/exit.n b/doc/exit.n index 6fdc8eb..46728cf 100644 --- a/doc/exit.n +++ b/doc/exit.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: exit.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: exit.n,v 1.11 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH exit n "" Tcl "Tcl Built-In Commands" @@ -50,4 +50,4 @@ if {[catch {main} msg options]} { .SH "SEE ALSO" exec(n) .SH KEYWORDS -exit, process +abort, exit, process diff --git a/doc/file.n b/doc/file.n index da54c0d..70f3257 100644 --- a/doc/file.n +++ b/doc/file.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: file.n,v 1.57 2009/12/14 10:03:13 dkf Exp $ +'\" RCS: @(#) $Id: file.n,v 1.58 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -537,7 +537,8 @@ exec {*}[auto_execok start] {} [\fBfile nativename\fR ~/example.txt] filename(n), open(n), close(n), eof(n), gets(n), tell(n), seek(n), fblocked(n), flush(n) .SH KEYWORDS -attributes, copy files, delete files, directory, file, move files, name, rename files, stat +attributes, copy files, delete files, directory, file, move files, name, +rename files, stat, user '\" Local Variables: '\" mode: nroff '\" fill-column: 78 diff --git a/doc/for.n b/doc/for.n index 1931538..91a85de 100644 --- a/doc/for.n +++ b/doc/for.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: for.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: for.n,v 1.11 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH for n "" Tcl "Tcl Built-In Commands" @@ -83,4 +83,4 @@ for {set x 1} {$x<=1024} {set x [expr {$x * 2}]} { .SH "SEE ALSO" break, continue, foreach, while .SH KEYWORDS -for, iteration, looping +for, iteration, loop diff --git a/doc/foreach.n b/doc/foreach.n index 47488c7..37bb455 100644 --- a/doc/foreach.n +++ b/doc/foreach.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: foreach.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: foreach.n,v 1.12 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH foreach n "" Tcl "Tcl Built-In Commands" @@ -103,4 +103,4 @@ set x {} for(n), while(n), break(n), continue(n) .SH KEYWORDS -foreach, iteration, list, looping +foreach, iteration, list, loop diff --git a/doc/list.n b/doc/list.n index 6ec1b7c..cf6fe99 100644 --- a/doc/list.n +++ b/doc/list.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: list.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: list.n,v 1.14 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH list n "" Tcl "Tcl Built-In Commands" @@ -52,7 +52,7 @@ lappend(n), lindex(n), linsert(n), llength(n), lrange(n), lrepeat(n), lreplace(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS -element, list +element, list, quoting '\"Local Variables: '\"mode: nroff '\"End: diff --git a/doc/load.n b/doc/load.n index 08adefb..8675dcd 100644 --- a/doc/load.n +++ b/doc/load.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: load.n,v 1.24 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: load.n,v 1.25 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH load n 7.5 Tcl "Tcl Built-In Commands" @@ -172,9 +172,9 @@ switch $tcl_platform(platform) { foo .CE .SH "SEE ALSO" -info sharedlibextension, Tcl_StaticPackage(3), safe(n) +info sharedlibextension, package(n), Tcl_StaticPackage(3), safe(n) .SH KEYWORDS -binary code, loading, safe interpreter, shared library +binary code, dynamic library, load, safe interpreter, shared library '\"Local Variables: '\"mode: nroff '\"End: diff --git a/doc/regsub.n b/doc/regsub.n index 471063e..963b5f6 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.27 2009/02/24 21:04:58 dkf Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.28 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -185,7 +185,7 @@ set quoted [subst [\fBregsub\fR -all $RE $string $substitution]] .SH "SEE ALSO" regexp(n), re_syntax(n), subst(n), string(n) .SH KEYWORDS -match, pattern, quoting, regular expression, substitute +match, pattern, quoting, regular expression, substitution '\" Local Variables: '\" mode: nroff '\" End: diff --git a/doc/return.n b/doc/return.n index fc2d1f8..be1af76 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.23 2010/01/13 09:48:16 dkf Exp $ +'\" RCS: @(#) $Id: return.n,v 1.24 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -303,7 +303,7 @@ proc myReturn {args} { .SH "SEE ALSO" break(n), catch(n), continue(n), dict(n), error(n), proc(n), source(n), tclvars(n) .SH KEYWORDS -break, catch, continue, error, procedure, return +break, catch, continue, error, exception, procedure, result, return .\" Local Variables: .\" mode: nroff .\" End: diff --git a/doc/socket.n b/doc/socket.n index aee5d5a..507fd6f 100644 --- a/doc/socket.n +++ b/doc/socket.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: socket.n,v 1.17 2010/01/12 10:55:30 ferrieux Exp $ +'\" RCS: @(#) $Id: socket.n,v 1.18 2010/01/13 12:08:30 dkf Exp $ .so man.macros .TH socket n 8.0 Tcl "Tcl Built-In Commands" .BS @@ -186,4 +186,4 @@ puts "The time on $server is $line" .SH "SEE ALSO" fconfigure(n), flush(n), open(n), read(n) .SH KEYWORDS -bind, channel, connection, domain name, host, network address, socket, tcp +asynchronous I/O, bind, channel, connection, domain name, host, network address, socket, tcp diff --git a/doc/subst.n b/doc/subst.n index 3685c0f..e4a4f2d 100644 --- a/doc/subst.n +++ b/doc/subst.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: subst.n,v 1.17 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: subst.n,v 1.18 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH subst n 7.4 Tcl "Tcl Built-In Commands" @@ -160,7 +160,7 @@ not .SH "SEE ALSO" Tcl(n), eval(n), break(n), continue(n) .SH KEYWORDS -backslash substitution, command substitution, variable substitution +backslash substitution, command substitution, quoting, substitution, variable substitution .\" Local Variables: .\" mode: nroff .\" End: diff --git a/doc/tclsh.1 b/doc/tclsh.1 index 8e2163a..f9f3780 100644 --- a/doc/tclsh.1 +++ b/doc/tclsh.1 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclsh.1,v 1.17 2009/03/25 23:22:42 nijtmans Exp $ +'\" RCS: @(#) $Id: tclsh.1,v 1.18 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH tclsh 1 "" Tcl "Tcl Applications" @@ -146,4 +146,4 @@ See \fBTcl_StandardChannels\fR for more explanations. .SH "SEE ALSO" encoding(n), fconfigure(n), tclvars(n) .SH KEYWORDS -argument, interpreter, prompt, script file, shell +application, argument, interpreter, prompt, script file, shell diff --git a/doc/tclvars.n b/doc/tclvars.n index 60a16d7..f9f4dd1 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.40 2009/02/24 21:04:58 dkf Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.41 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" @@ -495,7 +495,8 @@ the main Tk window. .SH "SEE ALSO" eval(n), library(n), tclsh(1), wish(1) .SH KEYWORDS -arithmetic, bytecode, compiler, error, environment, POSIX, precision, subprocess, variables +arithmetic, bytecode, compiler, error, environment, POSIX, precision, +subprocess, user, variables '\" Local Variables: '\" mode: nroff '\" End: diff --git a/doc/unknown.n b/doc/unknown.n index 890e3c0..1b13c81 100644 --- a/doc/unknown.n +++ b/doc/unknown.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: unknown.n,v 1.9 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: unknown.n,v 1.10 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH unknown n "" Tcl "Tcl Built-In Commands" @@ -90,4 +90,4 @@ proc \fBunknown\fR args { .SH "SEE ALSO" info(n), proc(n), interp(n), library(n), namespace(n) .SH KEYWORDS -error, non-existent command +error, non-existent command, unknown diff --git a/doc/update.n b/doc/update.n index 91f329c..64adf34 100644 --- a/doc/update.n +++ b/doc/update.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: update.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: update.n,v 1.12 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH update n 7.5 Tcl "Tcl Built-In Commands" @@ -64,4 +64,4 @@ while {!$done} { .SH "SEE ALSO" after(n), interp(n) .SH KEYWORDS -event, flush, handler, idle, update +asynchronous I/O, event, flush, handler, idle, update diff --git a/doc/uplevel.n b/doc/uplevel.n index f4a26e7..016848b 100644 --- a/doc/uplevel.n +++ b/doc/uplevel.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: uplevel.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: uplevel.n,v 1.12 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH uplevel n "" Tcl "Tcl Built-In Commands" @@ -99,7 +99,7 @@ proc do {body while condition} { .SH "SEE ALSO" apply(n), namespace(n), upvar(n) .SH KEYWORDS -context, level, namespace, stack frame, variables +context, level, namespace, stack frame, variable .\" Local Variables: .\" mode: nroff .\" End: diff --git a/doc/upvar.n b/doc/upvar.n index d6baa45..08f053c 100644 --- a/doc/upvar.n +++ b/doc/upvar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: upvar.n,v 1.19 2010/01/13 09:42:02 dkf Exp $ +'\" RCS: @(#) $Id: upvar.n,v 1.20 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH upvar n "" Tcl "Tcl Built-In Commands" @@ -119,7 +119,7 @@ proc decr {varName {decrement 1}} { .SH "SEE ALSO" global(n), namespace(n), uplevel(n), variable(n) .SH KEYWORDS -context, frame, global, level, namespace, procedure, variable +context, frame, global, level, namespace, procedure, upvar, variable .\" Local Variables: .\" mode: nroff .\" End: diff --git a/doc/vwait.n b/doc/vwait.n index ed0bac2..9cd95cb 100644 --- a/doc/vwait.n +++ b/doc/vwait.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: vwait.n,v 1.12 2009/07/11 17:11:44 dkf Exp $ +'\" RCS: @(#) $Id: vwait.n,v 1.13 2010/01/13 12:08:30 dkf Exp $ '\" .so man.macros .TH vwait n 8.0 Tcl "Tcl Built-In Commands" @@ -239,7 +239,7 @@ coroutine task-3 eval { .SH "SEE ALSO" global(n), update(n) .SH KEYWORDS -event, variable, wait +asynchronous I/O, event, variable, wait '\" Local Variables: '\" mode: nroff '\" fill-column: 78 -- cgit v0.12 From e46193b8a6d74bc51512b2e7b4f029fcfa2da594 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 15:40:10 +0000 Subject: Adjust the link suppression --- tools/tcltk-man2html.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index bed64c9..7f31fc8 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -628,7 +628,7 @@ proc make-man-pages {html args} { lappend keyheader $a } } - set keyheader "

[join $keyheader " |\n"]

" + set keyheader

[join $keyheader " |\n"]

puts $keyfp $keyheader foreach a $letters { set keys [array names manual "keyword-\[[string totitle $a$a]\]*"] @@ -680,7 +680,7 @@ proc make-man-pages {html args} { ## unset manual(section) if {!$verbose} { - puts stderr "Rescanning [llength $manual(all-pages)] pages" + puts stderr "Rescanning [llength $manual(all-pages)] pages to build cross links" } foreach path $manual(all-pages) { set manual(wing-file) [file dirname $path] @@ -802,6 +802,7 @@ array set exclude_refs_map { options.n {bitmap image set} radiobutton.n {image} scrollbar.n {set} + tkvars.n {tk} } array set exclude_when_followed_by_map { canvas.n { -- cgit v0.12 From 45fb9309c54f3ba69e806ef3bd4a83e9267f6ae6 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 16:55:43 +0000 Subject: Add to exclusions, remove list-syntax problem --- tools/tcltk-man2html-utils.tcl | 2 +- tools/tcltk-man2html.tcl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index e6a4227..5386ffc 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -673,7 +673,7 @@ proc cross-reference {ref} { ## if {[info exists exclude_when_followed_by_map($manual(tail))]} { upvar 1 tail tail - set following_word [regexp -inline {\S+} $tail] + set following_word [lindex [regexp -inline {\S+} $tail] 0] foreach {this that} $exclude_when_followed_by_map($manual(tail)) { # only a ref if $this is not followed by $that if {$lref eq $this && [string match $that* $following_word]} { diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 7f31fc8..3ef0d3e 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -798,10 +798,12 @@ array set exclude_refs_map { history.n {exec} canvas.n {bitmap text} checkbutton.n {image} + clipboard.n {string} menu.n {checkbutton radiobutton} options.n {bitmap image set} radiobutton.n {image} scrollbar.n {set} + selection.n {string} tkvars.n {tk} } array set exclude_when_followed_by_map { @@ -812,6 +814,10 @@ array set exclude_when_followed_by_map { lower widget raise widget } + selection.n { + clipboard selection + clipboard ; + } } try { -- cgit v0.12 From cb4fb6d90a6d89a85e94d2907016d54a8280ae26 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 13 Jan 2010 17:09:53 +0000 Subject: Add copyrights/version trackers. --- tools/tcltk-man2html-utils.tcl | 4 ++++ tools/tcltk-man2html.tcl | 3 +++ 2 files changed, 7 insertions(+) diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index 5386ffc..9ed16d3 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -3,6 +3,10 @@ ## functions are specifically intended to work with the format as used ## by Tcl and Tk; they do not cope with arbitrary nroff markup. ## +## Copyright (c) 1995-1997 Roger E. Critchlow Jr +## Copyright (c) 2004-2010 Donal K. Fellows +## +## CVS: $Id: tcltk-man2html-utils.tcl,v 1.4 2010/01/13 17:09:53 dkf Exp $ set ::manual(report-level) 1 diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 3ef0d3e..9fc1228 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -16,6 +16,9 @@ package require Tcl 8.6 # try to use this, you'll be very much on your own. # # Copyright (c) 1995-1997 Roger E. Critchlow Jr +# Copyright (c) 2004-2010 Donal K. Fellows +# +# CVS: $Id: tcltk-man2html.tcl,v 1.40 2010/01/13 17:09:53 dkf Exp $ set Version "0.40" -- cgit v0.12 From 36a7dc586ff228596fec6afc4130c203b2b3c6d0 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 14 Jan 2010 11:45:09 +0000 Subject: Add link remapping capability. --- tools/tcltk-man2html-utils.tcl | 16 ++++++++++------ tools/tcltk-man2html.tcl | 8 +++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index 9ed16d3..0291a4f 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -6,7 +6,7 @@ ## Copyright (c) 1995-1997 Roger E. Critchlow Jr ## Copyright (c) 2004-2010 Donal K. Fellows ## -## CVS: $Id: tcltk-man2html-utils.tcl,v 1.4 2010/01/13 17:09:53 dkf Exp $ +## CVS: $Id: tcltk-man2html-utils.tcl,v 1.5 2010/01/14 11:45:09 dkf Exp $ set ::manual(report-level) 1 @@ -611,7 +611,7 @@ proc output-name {line} { ## build a cross-reference link if appropriate ## proc cross-reference {ref} { - global manual + global manual remap_link_target global ensemble_commands exclude_refs_map exclude_when_followed_by_map set lref [string tolower $ref] if {[string match "Tcl_*" $ref] || [string match "Tk_*" $ref]} { @@ -625,6 +625,12 @@ proc cross-reference {ref} { return "$ref" } ## + ## apply a link remapping if available + ## + if {[info exists remap_link_target($lref)]} { + set lref $remap_link_target($lref) + } + ## ## nothing to reference ## if {![info exists manual(name-$lref)]} { @@ -635,10 +641,8 @@ proc cross-reference {ref} { return "$ref" } } - if {$lref in {stdin stdout stderr end}} { - # no good place to send these - # tcl tokens? - # also end + if {$lref in {end}} { + # no good place to send this tcl token? } return $ref } diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 9fc1228..87a0e89 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,7 +18,7 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.40 2010/01/13 17:09:53 dkf Exp $ +# CVS: $Id: tcltk-man2html.tcl,v 1.41 2010/01/14 11:45:11 dkf Exp $ set Version "0.40" @@ -797,6 +797,11 @@ set ensemble_commands { clipboard console grab grid image option pack place selection tk tkwait winfo wm } +array set remap_link_target { + stdin Tcl_GetStdChannel + stdout Tcl_GetStdChannel + stderr Tcl_GetStdChannel +} array set exclude_refs_map { history.n {exec} canvas.n {bitmap text} @@ -807,6 +812,7 @@ array set exclude_refs_map { radiobutton.n {image} scrollbar.n {set} selection.n {string} + tcltest.n {error} tkvars.n {tk} } array set exclude_when_followed_by_map { -- cgit v0.12 From 2df270e734333e1df19a486658ea8c8c1ba30e95 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 14 Jan 2010 11:47:07 +0000 Subject: Improve linking between pages, put Tk variables in Tk docs. --- doc/AddErrInfo.3 | 6 +++--- doc/CrtChannel.3 | 8 ++++---- doc/CrtInterp.3 | 6 +++--- doc/FileSystem.3 | 6 +++--- doc/OpenFileChnl.3 | 14 +++++++------- doc/OpenTcp.3 | 8 ++++---- doc/chan.n | 5 +++-- doc/library.n | 26 ++++++++++++++++---------- doc/tcltest.n | 47 ++++++++++++++++++++++++----------------------- doc/tclvars.n | 39 ++++++++++++++++----------------------- 10 files changed, 83 insertions(+), 82 deletions(-) diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index 9462b37..783a1e0 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.25 2008/12/18 21:23:47 dkf Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.26 2010/01/14 11:47:07 dkf Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.5 Tcl "Tcl Library Procedures" @@ -179,7 +179,7 @@ error that occurred (e.g. POSIX means an error occurred in a POSIX system call) and additional elements hold additional pieces of information that depend on the class. -See the tclvars manual entry for details on the various +See the \fBtclvars\fR manual entry for details on the various formats for the \fB\-errorcode\fR option used by Tcl's built-in commands. .PP @@ -303,6 +303,6 @@ so they continue to hold a record of information about the most recent error seen in an interpreter. .SH "SEE ALSO" Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_Interp(3), Tcl_ResetResult(3), -Tcl_SetErrno(3) +Tcl_SetErrno(3), tclvars(n) .SH KEYWORDS error, object, object result, stack, trace, variable diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index a76efa1..d306d64 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtChannel.3,v 1.45 2009/11/27 14:35:10 dkf Exp $ +'\" RCS: @(#) $Id: CrtChannel.3,v 1.46 2010/01/14 11:47:07 dkf Exp $ .so man.macros .TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures" .BS @@ -127,9 +127,9 @@ can be called to perform I/O and other functions on the channel. .AP "const char" *channelName in The name of this channel, such as \fBfile3\fR; must not be in use by any other channel. Can be NULL, in which case the channel is -created without a name. If the create channel is assigned to one -of the standard channels (stdin, stdout or stderr), the assigned -channel name will be the name of the standard channel. +created without a name. If the created channel is assigned to one +of the standard channels (\fBstdin\fR, \fBstdout\fR or \fBstderr\fR), +the assigned channel name will be the name of the standard channel. .AP ClientData instanceData in Arbitrary one-word value to be associated with this channel. This value is passed to procedures in \fItypePtr\fR when they are invoked. diff --git a/doc/CrtInterp.3 b/doc/CrtInterp.3 index 158b3b8..6f4176b 100644 --- a/doc/CrtInterp.3 +++ b/doc/CrtInterp.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtInterp.3,v 1.10 2008/12/15 18:33:25 dgp Exp $ +'\" RCS: @(#) $Id: CrtInterp.3,v 1.11 2010/01/14 11:47:07 dkf Exp $ '\" .so man.macros .TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures" @@ -43,7 +43,7 @@ may only be passed to Tcl routines called from the same thread as the original \fBTcl_CreateInterp\fR call. It is not safe for multiple threads to pass the same token to Tcl's routines. The new interpreter is initialized with the built-in Tcl commands -and with the variables documented in tclvars(n). To bind in +and with the variables documented in the \fBtclvars\fR manual page. To bind in additional commands, call \fBTcl_CreateCommand\fR. .PP \fBTcl_DeleteInterp\fR marks an interpreter as deleted; the interpreter @@ -146,6 +146,6 @@ should be used to determine when an interpreter is a candidate for deletion due to inactivity. .VE 8.6 .SH "SEE ALSO" -Tcl_Preserve(3), Tcl_Release(3) +Tcl_Preserve(3), Tcl_Release(3), tclvars(n) .SH KEYWORDS command, create, delete, interpreter diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index 3a19dd0..caab40f 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.69 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.70 2010/01/14 11:47:07 dkf Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -565,7 +565,7 @@ leaves an error message in \fIinterp\fR's result after any error. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR, described below. -If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .PP @@ -1204,7 +1204,7 @@ result after any error. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR. If one of -the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SS MATCHINDIRECTORYPROC diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3 index e9d1137..e5083a2 100644 --- a/doc/OpenFileChnl.3 +++ b/doc/OpenFileChnl.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.37 2008/06/29 22:28:24 dkf Exp $ +'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.38 2010/01/14 11:47:08 dkf Exp $ .so man.macros .TH Tcl_OpenFileChannel 3 8.3 Tcl "Tcl Library Procedures" .BS @@ -245,7 +245,7 @@ be used in preference to \fBTcl_OpenFileChannel\fR wherever possible. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR, described below. -If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SH TCL_OPENCOMMANDCHANNEL @@ -282,7 +282,7 @@ the interpreter's result if \fIinterp\fR is not NULL. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR, described below. -If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SH TCL_MAKEFILECHANNEL @@ -291,7 +291,7 @@ replacement for the standard channel. platform-specific, file handle. The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR, described below. -If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SH TCL_GETCHANNEL @@ -355,7 +355,7 @@ close the channel if no further references to it exist. accessible in \fIinterp\fR. After this call, Tcl programs will no longer be able to use the channel's name to refer to the channel in that interpreter. Beyond that, this command has no further effect. It cannot be used on -the standard channels (stdout, stderr, stdin), and will return +the standard channels (\fBstdout\fR, \fBstderr\fR, \fBstdin\fR), and will return \fBTCL_ERROR\fR if passed one of those channels. .PP Code not associated with a Tcl interpreter can call @@ -366,8 +366,8 @@ it will not be closed. .SH TCL_ISSTANDARDCHANNEL .PP \fBTcl_IsStandardChannel\fR tests whether a channel is one of the -three standard channels, stdin, stdout or stderr. If so, it returns -1, otherwise 0. +three standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR. +If so, it returns 1, otherwise 0. .PP No attempt is made to check whether the given channel or the standard channels are initialized or otherwise valid. diff --git a/doc/OpenTcp.3 b/doc/OpenTcp.3 index 7224ec3..0dff4c4 100644 --- a/doc/OpenTcp.3 +++ b/doc/OpenTcp.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenTcp.3,v 1.13 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: OpenTcp.3,v 1.14 2010/01/14 11:47:08 dkf Exp $ .so man.macros .TH Tcl_OpenTcpClient 3 8.0 Tcl "Tcl Library Procedures" .BS @@ -93,7 +93,7 @@ is left in the interpreter's result. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR. -If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SS TCL_MAKETCPCLIENTCHANNEL @@ -103,7 +103,7 @@ existing, platform specific, handle for a client TCP socket. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR. -If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SS TCL_OPENTCPSERVER @@ -156,7 +156,7 @@ a remote client is pending. .PP The newly created channel is not registered in the supplied interpreter; to register it, use \fBTcl_RegisterChannel\fR. -If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was +If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it as a replacement for the standard channel. .SH "PLATFORM ISSUES" diff --git a/doc/chan.n b/doc/chan.n index d353fab..a413049 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.24 2009/04/15 12:31:24 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.25 2010/01/14 11:47:08 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -544,7 +544,8 @@ Returns -1 if the channel was not opened for the mode in question. Creates a standalone pipe whose read- and write-side channels are returned as a 2-element list, the first element being the read side and the second the write side. Can be useful e.g. to redirect -separately stderr and stdout from a subprocess. To do this, spawn with "2>@" or +separately \fBstderr\fR and \fBstdout\fR from a subprocess. To do +this, spawn with "2>@" or ">@" redirection operators onto the write side of a pipe, and then immediately close it in the parent. This is necessary to get an EOF on the read side once the child has exited or otherwise closed its output. diff --git a/doc/library.n b/doc/library.n index 7fcd574..29b3045 100644 --- a/doc/library.n +++ b/doc/library.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: library.n,v 1.26 2009/07/24 09:27:17 dkf Exp $ +'\" RCS: @(#) $Id: library.n,v 1.27 2010/01/14 11:47:08 dkf Exp $ .so man.macros .TH library n "8.0" Tcl "Tcl Built-In Commands" .BS @@ -39,7 +39,7 @@ its own library of support procedures as well; the location of this library is normally given by the value of the \fB$\fIapp\fB_library\fR global variable, where \fIapp\fR is the name of the application. For example, the location of the Tk library is kept in the variable -\fB$tk_library\fR. +\fBtk_library\fR. .PP To access the procedures in the Tcl library, an application should source the file \fBinit.tcl\fR in the library, for example with @@ -85,8 +85,8 @@ matching rules of \fBnamespace import\fR. This command attempts to load the definition for a Tcl command named \fIcmd\fR. To do this, it searches an \fIauto-load path\fR, which is a list of one or more directories. The auto-load path is given by the -global variable \fB$auto_path\fR if it exists. If there is no -\fB$auto_path\fR variable, then the TCLLIBPATH environment variable is +global variable \fBauto_path\fR if it exists. If there is no +\fBauto_path\fR variable, then the TCLLIBPATH environment variable is used, if it exists. Otherwise the auto-load path consists of just the Tcl library directory. Within each directory in the auto-load path there must be a file \fBtclIndex\fR that describes one or more @@ -200,7 +200,7 @@ relative to the executable file in a parallel build tree. \fBparray \fIarrayName\fR Prints on standard output the names and values of all the elements in the array \fIarrayName\fR. -\fBArrayName\fR must be an array accessible to the caller of \fBparray\fR. +\fIArrayName\fR must be an array accessible to the caller of \fBparray\fR. It may be either local or global. .TP \fBtcl_endOfWord \fIstr start\fR @@ -242,7 +242,9 @@ boundary. .SH "VARIABLES" .PP The following global variables are defined or used by the procedures in -the Tcl library: +the Tcl library. They fall into two broad classes, handling unknown +commands and packages, and determining what are words. +.SS "AUTOLOADING AND PACKAGE MANAGEMENT VARIABLES" .TP \fBauto_execs\fR Used by \fBauto_execok\fR to record information about whether @@ -264,10 +266,10 @@ any commands. If set, then it must contain a valid Tcl list giving directories to search during auto-load operations. This variable is initialized during startup to contain, in order: -the directories listed in the TCLLIBPATH environment variable, -the directory named by the $tcl_library variable, -the parent directory of $tcl_library, -the directories listed in the $tcl_pkgPath variable. +the directories listed in the \fBTCLLIBPATH\fR environment variable, +the directory named by the \fBtcl_library\fR variable, +the parent directory of \fBtcl_library\fR, +the directories listed in the \fBtcl_pkgPath\fR variable. .TP \fBenv(TCL_LIBRARY)\fR If set, then it specifies the location of the directory containing @@ -283,6 +285,10 @@ Tcl format, using .QW / as the path separator, regardless of platform. This variable is only used when initializing the \fBauto_path\fR variable. +.SS "WORD BOUNDARY DETERMINATION VARIABLES" +These variables are only used in the \fBtcl_endOfWord\fR, +\fBtcl_startOfNextWord\fR, \fBtcl_startOfPreviousWord\fR, +\fBtcl_wordBreakAfter\fR, and \fBtcl_wordBreakBefore\fR commands. .TP \fBtcl_nonwordchars\fR This variable contains a regular expression that is used by routines diff --git a/doc/tcltest.n b/doc/tcltest.n index d6b00e5..ceb05a3 100644 --- a/doc/tcltest.n +++ b/doc/tcltest.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tcltest.n,v 1.58 2009/11/01 12:10:17 dkf Exp $ +'\" RCS: @(#) $Id: tcltest.n,v 1.59 2010/01/14 11:47:09 dkf Exp $ '\" .so man.macros .TH "tcltest" n 2.3 tcltest "Tcl Bundled Packages" @@ -19,10 +19,10 @@ tcltest \- Test harness support code and utilities .SH SYNOPSIS .nf \fBpackage require tcltest\fR ?\fB2.3\fR? -.sp + \fBtcltest::test \fIname description\fR ?\fI\-option value ...\fR? \fBtcltest::test \fIname description\fR ?\fIconstraints\fR? \fIbody result\fR -.sp + \fBtcltest::loadTestedCommands\fR \fBtcltest::makeDirectory \fIname\fR ?\fIdirectory\fR? \fBtcltest::removeDirectory \fIname\fR ?\fIdirectory\fR? @@ -31,7 +31,7 @@ tcltest \- Test harness support code and utilities \fBtcltest::viewFile \fIname\fR ?\fIdirectory\fR? \fBtcltest::cleanupTests \fR?\fIrunningMultipleTests\fR? \fBtcltest::runAllTests\fR -.sp + \fBtcltest::configure\fR \fBtcltest::configure \fI\-option\fR \fBtcltest::configure \fI\-option value\fR ?\fI-option value ...\fR? @@ -40,7 +40,7 @@ tcltest \- Test harness support code and utilities \fBtcltest::outputChannel \fR?\fIchannelID\fR? \fBtcltest::errorChannel \fR?\fIchannelID\fR? \fBtcltest::interpreter \fR?\fIinterp\fR? -.sp + \fBtcltest::debug \fR?\fIlevel\fR? \fBtcltest::errorFile \fR?\fIfilename\fR? \fBtcltest::limitConstraints \fR?\fIboolean\fR? @@ -58,7 +58,7 @@ tcltest \- Test harness support code and utilities \fBtcltest::temporaryDirectory \fR?\fIdirectory\fR? \fBtcltest::testsDirectory \fR?\fIdirectory\fR? \fBtcltest::verbose \fR?\fIlevel\fR? -.sp + \fBtcltest::test \fIname description optionList\fR \fBtcltest::bytestring \fIstring\fR \fBtcltest::normalizeMsg \fImsg\fR @@ -199,7 +199,7 @@ in the directory \fBconfigure \-tmpdir\fR created since the last \fBcleanupTests\fR, but not created by \fBmakeFile\fR or \fBmakeDirectory\fR are printed to \fBoutputChannel\fR. This command also restores the original -shell environment, as described by the \fB::env\fR +shell environment, as described by the global \fBenv\fR array. Returns an empty string. .RE .TP @@ -235,7 +235,7 @@ arguments are not processed. .RS .PP If the environment variable \fB::env(TCLTEST_OPTIONS)\fR exists when -the \fBtcltest\fR package is loaded (by \fBpackage require tcltest\fR) +the \fBtcltest\fR package is loaded (by \fBpackage require\fR \fBtcltest\fR) then its value is taken as a list of arguments to pass to \fBconfigure\fR. This allows the default values of the configuration options to be set by the environment. @@ -270,17 +270,17 @@ currently running program as returned by \fBinfo nameofexecutable\fR. .TP \fBoutputChannel\fR ?\fIchannelID\fR? . -Sets or returns the output channel ID. This defaults to stdout. +Sets or returns the output channel ID. This defaults to \fBstdout\fR. Any test that prints test related output should send that output to \fBoutputChannel\fR rather than letting -that output default to stdout. +that output default to \fBstdout\fR. .TP \fBerrorChannel\fR ?\fIchannelID\fR? . -Sets or returns the error channel ID. This defaults to stderr. +Sets or returns the error channel ID. This defaults to \fBstderr\fR. Any test that prints error messages should send that output to \fBerrorChannel\fR rather than printing -directly to stderr. +directly to \fBstderr\fR. .SS "SHORTCUT CONFIGURATION COMMANDS" .TP \fBdebug\fR ?\fIlevel\fR? @@ -432,7 +432,8 @@ value supplied in \fIstring\fR. This allows the tester to create denormalized or improperly formed strings to pass to C procedures that are supposed to accept strings with embedded NULL types and confirm that a string result has a certain pattern of bytes. This is -exactly equivalent to the Tcl command \fBencoding convertfrom identity\fR. +exactly equivalent to the Tcl command \fBencoding convertfrom\fR +\fBidentity\fR. .SH TESTS .PP The \fBtest\fR command is the heart of the \fBtcltest\fR package. @@ -594,7 +595,7 @@ In default operation, a successful test produces no output. The output messages produced by \fBtest\fR are controlled by the \fBconfigure \-verbose\fR option as described in \fBCONFIGURABLE OPTIONS\fR below. Any output produced by the test scripts themselves should be -produced using \fB::puts\fR to \fBoutputChannel\fR or +produced using \fBputs\fR to \fBoutputChannel\fR or \fBerrorChannel\fR, so that users of the test suite may easily capture output with the \fBconfigure \-outfile\fR and \fBconfigure \-errfile\fR options, and so that the \fB\-output\fR @@ -855,8 +856,8 @@ value is false. \fB\-debug \fIlevel\fR . Sets the debug level to \fIlevel\fR, an integer value indicating how -much debugging information should be printed to stdout. Note that -debug messages always go to stdout, independent of the value of +much debugging information should be printed to \fBstdout\fR. Note that +debug messages always go to \fBstdout\fR, independent of the value of \fBconfigure \-outfile\fR. Default value is 0. Levels are defined as: .RS .IP 0 4 @@ -870,8 +871,8 @@ print warnings about possible lack of cleanup or balance in test files. Also print warnings about any re-use of test names. .IP 2 Display the flag array parsed by the command line processor, the -contents of the ::env array, and all user-defined variables that exist -in the current namespace as they are used. +contents of the global \fBenv\fR array, and all user-defined variables +that exist in the current namespace as they are used. .IP 3 Display information regarding what individual procs in the test harness are doing. @@ -1187,7 +1188,7 @@ to continue to support existing test suites written to the older interface specifications, many of those deprecated commands and variables still work as before. For example, in many circumstances, \fBconfigure\fR will be automatically called shortly after -\fBpackage require tcltest 2.1\fR succeeds with arguments +\fBpackage require\fR \fBtcltest 2.1\fR succeeds with arguments from the variable \fB::argv\fR. This is to support test suites that depend on the old behavior that \fBtcltest\fR was automatically configured from command line arguments. New test files should not @@ -1244,13 +1245,13 @@ and refer to tests that were run at the same test level as test level-1.1. .PP Implementation of output and error comparison in the test command -depends on usage of \fB::puts\fR in your application code. Output is -intercepted by redefining the \fB::puts\fR command while the defined test +depends on usage of \fBputs\fR in your application code. Output is +intercepted by redefining the global \fBputs\fR command while the defined test script is being run. Errors thrown by C procedures or printed -directly from C applications will not be caught by the test command. +directly from C applications will not be caught by the \fBtest\fR command. Therefore, usage of the \fB\-output\fR and \fB\-errorOutput\fR options to \fBtest\fR is useful only for pure Tcl applications -that use \fB::puts\fR to produce output. +that use \fBputs\fR to produce output. .SH KEYWORDS test, test harness, test suite .\" Local Variables: diff --git a/doc/tclvars.n b/doc/tclvars.n index f9f4dd1..792d5c8 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,14 +5,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.41 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.42 2010/01/14 11:47:09 dkf Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -tclvars \- Variables used by Tcl +argc, argv, argv0, auto_path, env, errorCode, errorInfo, tcl_interactive, tcl_library, tcl_nonwordchars, tcl_patchLevel, tcl_pkgPath, tcl_platform, tcl_precision, tcl_rcFileName, tcl_traceCompile, tcl_traceEval, tcl_wordchars, tcl_version \- Variables used by Tcl .BE .SH DESCRIPTION .PP @@ -26,10 +26,10 @@ If set, then it must contain a valid Tcl list giving directories to search during auto-load operations (including for package index files when using the default \fBpackage unknown\fR handler). This variable is initialized during startup to contain, in order: -the directories listed in the TCLLIBPATH environment variable, -the directory named by the $tcl_library variable, -the parent directory of $tcl_library, -the directories listed in the $tcl_pkgPath variable. +the directories listed in the \fBTCLLIBPATH\fR environment variable, +the directory named by the \fBtcl_library\fR global variable, +the parent directory of \fBtcl_library\fR, +the directories listed in the \fBtcl_pkgPath\fR variable. Additional locations to look for files and package indices should normally be added to this variable using \fBlappend\fR. .RS @@ -248,8 +248,9 @@ either one or two entries; if it contains two entries, the first is normally a directory for platform-dependent packages (e.g., shared library binaries) and the second is normally a directory for platform-independent packages (e.g., script files). Typically a package is installed as a -subdirectory of one of the entries in \fB$tcl_pkgPath\fR. The directories -in \fB$tcl_pkgPath\fR are included by default in the \fBauto_path\fR +subdirectory of one of the entries in the \fBtcl_pkgPath\fR +variable. The directories in the \fBtcl_pkgPath\fR variable are +included by default in the \fBauto_path\fR variable, so they and their immediate subdirectories are automatically searched for packages during \fBpackage require\fR commands. Note: \fBtcl_pkgPath\fR is not intended to be modified by the application. Its @@ -390,10 +391,10 @@ for Windows. The value of this variable can be set to control how much tracing information is displayed during bytecode compilation. -By default, tcl_traceCompile is zero and no information is displayed. -Setting tcl_traceCompile to 1 generates a one-line summary in stdout +By default, \fBtcl_traceCompile\fR is zero and no information is displayed. +Setting \fBtcl_traceCompile\fR to 1 generates a one-line summary in \fBstdout\fR whenever a procedure or top-level command is compiled. -Setting it to 2 generates a detailed listing in stdout of the +Setting it to 2 generates a detailed listing in \fBstdout\fR of the bytecode instructions emitted during every compilation. This variable is useful in tracking down suspected problems with the Tcl compiler. @@ -408,15 +409,15 @@ This variable and functionality only exist if The value of this variable can be set to control how much tracing information is displayed during bytecode execution. -By default, tcl_traceExec is zero and no information is displayed. -Setting tcl_traceExec to 1 generates a one-line trace in stdout +By default, \fBtcl_traceExec\fR is zero and no information is displayed. +Setting \fBtcl_traceExec\fR to 1 generates a one-line trace in \fBstdout\fR on each call to a Tcl procedure. Setting it to 2 generates a line of output whenever any Tcl command is invoked that contains the name of the command and its arguments. Setting it to 3 produces a detailed trace showing the result of executing each bytecode instruction. -Note that when tcl_traceExec is 2 or 3, +Note that when \fBtcl_traceExec\fR is 2 or 3, commands such as \fBset\fR and \fBincr\fR that have been entirely replaced by a sequence of bytecode instructions are not shown. @@ -484,16 +485,8 @@ was invoked. Contains 1 if \fBtclsh\fR or \fBwish\fR is running interactively (no script was specified and standard input is a terminal-like device), 0 otherwise. -.PP -The \fBwish\fR executable additionally specifies the following global -variable: -.TP 6 -\fBgeometry\fR -. -If set, contains the user-supplied geometry specification to use for -the main Tk window. .SH "SEE ALSO" -eval(n), library(n), tclsh(1), wish(1) +eval(n), library(n), tclsh(1), tkvars(n), wish(1) .SH KEYWORDS arithmetic, bytecode, compiler, error, environment, POSIX, precision, subprocess, user, variables -- cgit v0.12 From f815fe0bdff6ee9916d281a185d3da66cc1f1f06 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 14 Jan 2010 13:59:05 +0000 Subject: More tinkering with the conversion special cases. --- tools/tcltk-man2html-utils.tcl | 8 +++--- tools/tcltk-man2html.tcl | 57 ++++++++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 20 deletions(-) diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index 0291a4f..ce962d8 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -6,7 +6,7 @@ ## Copyright (c) 1995-1997 Roger E. Critchlow Jr ## Copyright (c) 2004-2010 Donal K. Fellows ## -## CVS: $Id: tcltk-man2html-utils.tcl,v 1.5 2010/01/14 11:45:09 dkf Exp $ +## CVS: $Id: tcltk-man2html-utils.tcl,v 1.6 2010/01/14 13:59:05 dkf Exp $ set ::manual(report-level) 1 @@ -594,9 +594,9 @@ proc output-name {line} { # split name line into pieces regexp {^([^-]+) - (.*)$} $line all head tail # output line to manual page untouched - man-puts $line + man-puts "$head — $tail" # output line to long table of contents - lappend manual(section-toc)
$line
+ lappend manual(section-toc) "
$head — $tail
" # separate out the names for future reference foreach name [split $head ,] { set name [string trim $name] @@ -1058,7 +1058,7 @@ proc output-directive {line} { # skip the leading .ta directive if it is there } if {[match-text @stuff .DE]} { - set td "

" + set td "

" set bodyText [string map [list \n $td \t $td] \n$stuff] man-puts "

$bodyText
" #man-puts
$stuff
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 87a0e89..116ae92 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,12 +18,17 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.41 2010/01/14 11:45:11 dkf Exp $ - -set Version "0.40" +# CVS: $Id: tcltk-man2html.tcl,v 1.42 2010/01/14 13:59:06 dkf Exp $ +regexp {\d+\.\d+} {$Revision: 1.42 $} ::Version set ::CSSFILE "docs.css" +## +## Source the utility functions that provide most of the +## implementation of the transformation from nroff to html. +## +source [file join [file dirname [info script]] tcltk-man2html-utils.tcl] + proc parse_command_line {} { global argv Version @@ -150,13 +155,7 @@ proc parse_command_line {} { proc capitalize {string} { return [string toupper $string 0] } - -## -## Source the utility functions that provide most of the -## implementation of the transformation from nroff to html. -## -source [file join [file dirname [info script]] tcltk-man2html-utils.tcl] - + ## ## Returns the style sheet. ## @@ -238,8 +237,13 @@ proc css-stylesheet {} { border-top: 1px solid #6A6A6A; margin-top: 2em; } + css-style .tablecell { + font-size: 12px; + padding-left: .5em; + padding-right: .5em; + } } - + ## ## foreach of the man directories specified by args ## convert manpages into hypertext in the directory @@ -741,7 +745,7 @@ proc make-man-pages {html args} { } return {} } - + ## ## Helper for assembling the descriptions of base packages (i.e., Tcl and Tk). ## @@ -783,7 +787,7 @@ proc plus-pkgs {type args} { } return $result } - + ## ## Set up some special cases. It would be nice if we didn't have them, ## but we do... @@ -794,13 +798,16 @@ set process_first_patterns {*/ttk_widget.n */options.n} set ensemble_commands { after array binary chan clock dde dict encoding file history info interp memory namespace package registry self string trace update zlib - clipboard console grab grid image option pack place selection tk tkwait - winfo wm + clipboard console font grab grid image option pack place selection tk + tkwait ttk::style winfo wm } array set remap_link_target { stdin Tcl_GetStdChannel stdout Tcl_GetStdChannel stderr Tcl_GetStdChannel + safe {Safe Base} + style ttk::style + {style map} ttk::style } array set exclude_refs_map { history.n {exec} @@ -814,6 +821,21 @@ array set exclude_refs_map { selection.n {string} tcltest.n {error} tkvars.n {tk} + ttk_checkbutton.n {variable} + ttk_combobox.n {selection} + ttk_entry.n {focus variable} + ttk_intro.n {focus} + ttk_label.n {font text} + ttk_labelframe.n {text} + ttk_menubutton.n {flush} + ttk_notebook.n {image text} + ttk_progressbar.n {variable} + ttk_radiobutton.n {variable} + ttk_scale.n {variable} + ttk_scrollbar.n {set} + ttk_spinbox.n {format} + ttk_treeview.n {text open} + ttk_widget.n {image text variable} } array set exclude_when_followed_by_map { canvas.n { @@ -827,8 +849,11 @@ array set exclude_when_followed_by_map { clipboard selection clipboard ; } + ttk_image.n { + image imageSpec + } } - + try { # Parse what the user told us to do parse_command_line -- cgit v0.12 From bf19d94b4cfd7deeecc437231e80f6f070ab03ab Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 14 Jan 2010 14:52:17 +0000 Subject: Improve keyword lists. --- doc/for.n | 6 +++--- doc/while.n | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/for.n b/doc/for.n index 91a85de..f580d85 100644 --- a/doc/for.n +++ b/doc/for.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: for.n,v 1.11 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: for.n,v 1.12 2010/01/14 14:52:17 dkf Exp $ '\" .so man.macros .TH for n "" Tcl "Tcl Built-In Commands" @@ -81,6 +81,6 @@ for {set x 1} {$x<=1024} {set x [expr {$x * 2}]} { } .CE .SH "SEE ALSO" -break, continue, foreach, while +break(n), continue(n), foreach(n), while(n) .SH KEYWORDS -for, iteration, loop +boolean, for, iteration, loop diff --git a/doc/while.n b/doc/while.n index cc4921c..03ae3cf 100644 --- a/doc/while.n +++ b/doc/while.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: while.n,v 1.6 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: while.n,v 1.7 2010/01/14 14:52:17 dkf Exp $ '\" .so man.macros .TH while n "" Tcl "Tcl Built-In Commands" @@ -64,4 +64,4 @@ set lineCount 0 .SH "SEE ALSO" break(n), continue(n), for(n), foreach(n) .SH KEYWORDS -boolean value, loop, test, while +boolean, loop, test, while -- cgit v0.12 From 36d1fa98f135e6f5c1f1a501ab351bcb6510fda1 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 14 Jan 2010 18:13:12 +0000 Subject: Stop breaking of highlightable over a line for ease of scraping --- doc/refchan.n | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/refchan.n b/doc/refchan.n index 6032340..b3ad232 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.17 2009/08/06 22:28:11 andreas_kupries Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.18 2010/01/14 18:13:12 dkf Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -230,8 +230,8 @@ time; that is behavior implemented in the Tcl channel core. The return value of the subcommand is ignored. .PP If the subcommand throws an error the command which performed the -(re)configuration or query (usually \fBfconfigure\fR or \fBchan -configure\fR) will appear to have thrown this error. Any exception +(re)configuration or query (usually \fBfconfigure\fR or +\fBchan configure\fR) will appear to have thrown this error. Any exception beyond \fBerror\fR (e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. .RE -- cgit v0.12 From 6f11427e94be8a04842c5ecca5186d302aa4922d Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 14 Jan 2010 18:23:53 +0000 Subject: Another link suppression --- tools/tcltk-man2html.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 116ae92..e6f0740 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,9 +18,9 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.42 2010/01/14 13:59:06 dkf Exp $ +# CVS: $Id: tcltk-man2html.tcl,v 1.43 2010/01/14 18:23:53 dkf Exp $ -regexp {\d+\.\d+} {$Revision: 1.42 $} ::Version +regexp {\d+\.\d+} {$Revision: 1.43 $} ::Version set ::CSSFILE "docs.css" ## @@ -811,6 +811,7 @@ array set remap_link_target { } array set exclude_refs_map { history.n {exec} + next.n {unknown} canvas.n {bitmap text} checkbutton.n {image} clipboard.n {string} -- cgit v0.12 From ec01978b680c906c36b4e1802ae95b8874780034 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 14 Jan 2010 18:43:38 +0000 Subject: Yet another exclusion --- tools/tcltk-man2html.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index e6f0740..1827ae4 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,9 +18,9 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.43 2010/01/14 18:23:53 dkf Exp $ +# CVS: $Id: tcltk-man2html.tcl,v 1.44 2010/01/14 18:43:38 dkf Exp $ -regexp {\d+\.\d+} {$Revision: 1.43 $} ::Version +regexp {\d+\.\d+} {$Revision: 1.44 $} ::Version set ::CSSFILE "docs.css" ## @@ -810,6 +810,7 @@ array set remap_link_target { {style map} ttk::style } array set exclude_refs_map { + clock.n {next} history.n {exec} next.n {unknown} canvas.n {bitmap text} -- cgit v0.12 From 8f2192e73834a1ba84a6ea73b4970f9ad2dc102b Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 18 Jan 2010 09:31:01 +0000 Subject: [Bug 2932421]: Make [format] less likely to smash intreps. --- ChangeLog | 7 ++++ generic/tclStringObj.c | 88 +++++++++++++++++++++++++++----------------------- tests/format.test | 17 ++++++---- 3 files changed, 65 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3eb1c99..6f1e8db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-01-18 Donal K. Fellows + + * generic/tclStringObj.c (Tcl_AppendFormatToObj): [Bug 2932421]: Stop + the [format] command from causing argument objects to change their + internal representation when not needed. Thanks to Alexandre Ferrieux + for this fix. + 2010-01-13 Donal K. Fellows * tools/tcltk-man2html.tcl: More factoring out of special cases diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 8787fd9..0780089 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.130 2009/09/30 03:11:26 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.131 2010/01/18 09:31:01 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1710,6 +1710,7 @@ Tcl_AppendFormatToObj( newXpg = 0; if (isdigit(UCHAR(ch))) { int position = strtoul(format, &end, 10); + if (*end == '$') { newXpg = 1; objIndex = position - 1; @@ -1849,8 +1850,8 @@ Tcl_AppendFormatToObj( useBig = 1; format += step; step = Tcl_UtfToUniChar(format, &ch); - } else { #ifndef TCL_WIDE_INT_IS_LONG + } else { useWide = 1; #endif } @@ -1864,6 +1865,7 @@ Tcl_AppendFormatToObj( */ segment = objv[objIndex]; + numChars = -1; if (ch == 'i') { ch = 'd'; } @@ -1871,15 +1873,17 @@ Tcl_AppendFormatToObj( case '\0': msg = "format string ended in middle of field specifier"; goto errorMsg; - case 's': { - numChars = Tcl_GetCharLength(segment); - if (gotPrecision && (precision < numChars)) { - segment = Tcl_GetRange(segment, 0, precision - 1); - Tcl_IncrRefCount(segment); - allocSegment = 1; + case 's': + if (gotPrecision) { + numChars = Tcl_GetCharLength(segment); + if (precision < numChars) { + segment = Tcl_GetRange(segment, 0, precision - 1); + numChars = precision; + Tcl_IncrRefCount(segment); + allocSegment = 1; + } } break; - } case 'c': { char buf[TCL_UTF_MAX]; int code, length; @@ -1904,7 +1908,7 @@ Tcl_AppendFormatToObj( case 'x': case 'X': case 'b': { - short int s = 0; /* Silence compiler warning; only defined and + short s = 0; /* Silence compiler warning; only defined and * used when useShort is true. */ long l; Tcl_WideInt w; @@ -1929,7 +1933,7 @@ Tcl_AppendFormatToObj( Tcl_GetWideIntFromObj(NULL, objPtr, &w); Tcl_DecrRefCount(objPtr); } - isNegative = (w < (Tcl_WideInt)0); + isNegative = (w < (Tcl_WideInt) 0); } else if (TclGetLongFromObj(NULL, segment, &l) != TCL_OK) { if (Tcl_GetWideIntFromObj(NULL, segment, &w) != TCL_OK) { Tcl_Obj *objPtr; @@ -1946,16 +1950,16 @@ Tcl_AppendFormatToObj( l = Tcl_WideAsLong(w); } if (useShort) { - s = (short int) l; - isNegative = (s < (short int)0); + s = (short) l; + isNegative = (s < (short) 0); } else { - isNegative = (l < (long)0); + isNegative = (l < (long) 0); } } else if (useShort) { - s = (short int) l; - isNegative = (s < (short int)0); + s = (short) l; + isNegative = (s < (short) 0); } else { - isNegative = (l < (long)0); + isNegative = (l < (long) 0); } segment = Tcl_NewObj(); @@ -2024,7 +2028,7 @@ Tcl_AppendFormatToObj( if (gotPrecision) { if (length < precision) { - segmentLimit -= (precision - length); + segmentLimit -= precision - length; } while (length < precision) { Tcl_AppendToObj(segment, "0", 1); @@ -2035,7 +2039,7 @@ Tcl_AppendFormatToObj( if (gotZero) { length += Tcl_GetCharLength(segment); if (length < width) { - segmentLimit -= (width - length); + segmentLimit -= width - length; } while (length < width) { Tcl_AppendToObj(segment, "0", 1); @@ -2056,8 +2060,8 @@ Tcl_AppendFormatToObj( case 'x': case 'X': case 'b': { - Tcl_WideUInt bits = (Tcl_WideUInt)0; - Tcl_WideInt numDigits = (Tcl_WideInt)0; + Tcl_WideUInt bits = (Tcl_WideUInt) 0; + Tcl_WideInt numDigits = (Tcl_WideInt) 0; int length, numBits = 4, base = 16; int index = 0, shift = 0; Tcl_Obj *pure; @@ -2068,12 +2072,12 @@ Tcl_AppendFormatToObj( } else if (ch == 'o') { base = 8; numBits = 3; - } else if (ch=='b') { + } else if (ch == 'b') { base = 2; numBits = 1; } if (useShort) { - unsigned short int us = (unsigned short int) s; + unsigned short us = (unsigned short) s; bits = (Tcl_WideUInt) us; while (us) { @@ -2093,7 +2097,7 @@ Tcl_AppendFormatToObj( mp_digit mask = (~(mp_digit)0) << (DIGIT_BIT-leftover); numDigits = 1 + - (((Tcl_WideInt)big.used * DIGIT_BIT) / numBits); + (((Tcl_WideInt) big.used * DIGIT_BIT) / numBits); while ((mask & big.dp[big.used-1]) == 0) { numDigits--; mask >>= numBits; @@ -2103,7 +2107,7 @@ Tcl_AppendFormatToObj( goto errorMsg; } } else if (!useBig) { - unsigned long int ul = (unsigned long int) l; + unsigned long ul = (unsigned long) l; bits = (Tcl_WideUInt) ul; while (ul) { @@ -2120,16 +2124,16 @@ Tcl_AppendFormatToObj( numDigits = 1; } pure = Tcl_NewObj(); - Tcl_SetObjLength(pure, (int)numDigits); + Tcl_SetObjLength(pure, (int) numDigits); bytes = TclGetString(pure); - toAppend = length = (int)numDigits; + toAppend = length = (int) numDigits; while (numDigits--) { int digitOffset; if (useBig && big.used) { if ((size_t) shift < CHAR_BIT*sizeof(Tcl_WideUInt) - DIGIT_BIT) { - bits |= (((Tcl_WideUInt)big.dp[index++]) < INT_MAX - length) { - msg=overflow; + msg = overflow; goto errorMsg; } length += precision; @@ -2261,10 +2265,12 @@ Tcl_AppendFormatToObj( } } - numChars = Tcl_GetCharLength(segment); - if (!gotMinus) { + if (width>0 && numChars<0) { + numChars = Tcl_GetCharLength(segment); + } + if (!gotMinus && width>0) { if (numChars < width) { - limit -= (width - numChars); + limit -= width - numChars; } while (numChars < width) { Tcl_AppendToObj(appendObj, (gotZero ? "0" : " "), 1); @@ -2282,12 +2288,14 @@ Tcl_AppendFormatToObj( if (allocSegment) { Tcl_DecrRefCount(segment); } - if (numChars < width) { - limit -= (width - numChars); - } - while (numChars < width) { - Tcl_AppendToObj(appendObj, (gotZero ? "0" : " "), 1); - numChars++; + if (width > 0) { + if (numChars < width) { + limit -= width-numChars; + } + while (numChars < width) { + Tcl_AppendToObj(appendObj, (gotZero ? "0" : " "), 1); + numChars++; + } } objIndex += gotSequential; diff --git a/tests/format.test b/tests/format.test index 8aa7d0b..54d9ffb 100644 --- a/tests/format.test +++ b/tests/format.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: format.test,v 1.29 2009/07/31 16:55:58 dgp Exp $ +# RCS: @(#) $Id: format.test,v 1.30 2010/01/18 09:31:02 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -23,7 +23,7 @@ testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}] testConstraint wideIs64bit \ [expr {(wide(0x80000000) > 0) && (wide(0x8000000000000000) < 0)}] testConstraint wideBiggerThanInt [expr {wide(0x80000000) != int(0x80000000)}] - + test format-1.1 {integer formatting} { format "%*d %d %d %d" 6 34 16923 -12 -1 } { 34 16923 -12 -1} @@ -536,14 +536,11 @@ test format-18.1 {do not demote existing numeric values} { # Ensure $a and $b are separate objects set b 0xaaaa append b aaaa - set result [expr {$a == $b}] format %08lx $b lappend result [expr {$a == $b}] - set b 0xaaaa append b aaaa - lappend result [expr {$a == $b}] format %08x $b lappend result [expr {$a == $b}] @@ -561,15 +558,21 @@ test format-19.1 { set x 0x8fedc654 list [expr { ~ $x }] [format %08x [expr { ~$x }]] } -match regexp -result {-2414724693 f*701239ab} - test format-19.2 {Bug 1867855} { format %llx 0 } 0 - test format-19.3 {Bug 2830354} { string length [format %340f 0] } 340 +# Note that this test may fail in future versions +test format-20.1 {Bug 2932421: plain %s caused intrep change of args} -body { + set x [dict create a b c d] + format %s $x + # After this, obj in $x should be a dict with a non-NULL bytes field + tcl::unsupported::representation $x +} -match glob -result {value is a dict with *, string representation "*".} + # cleanup catch {unset a} catch {unset b} -- cgit v0.12 From 91c61162398c0ed35ad2306485e824c16fff667a Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 18 Jan 2010 09:49:13 +0000 Subject: Ensure that objects are released in all cases (hard to test this particular one without a very large system, but the leak path existed) --- generic/tclStringObj.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 0780089..5f0d547 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.131 2010/01/18 09:31:01 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.132 2010/01/18 09:49:13 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2280,6 +2280,9 @@ Tcl_AppendFormatToObj( Tcl_GetStringFromObj(segment, &segmentNumBytes); if (segmentNumBytes > limit) { + if (allocSegment) { + Tcl_DecrRefCount(segment); + } msg = overflow; goto errorMsg; } -- cgit v0.12 From dd8e1bd7964abd576b6ae32c876f793ae4bbaf9b Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 18 Jan 2010 22:19:11 +0000 Subject: * generic/tclIO.c (CreateScriptRecord): [Bug 2918110]: Initialize the EventScriptRecord (esPtr) fully before handing it to Tcl_CreateChannelHandler for registration. Otherwise a reflected channel calling 'chan postevent' (== Tcl_NotifyChannel) in its 'watchProc' will cause the function 'TclChannelEventScriptInvoker' to be run on an uninitialized structure. --- ChangeLog | 9 +++++++++ generic/tclIO.c | 29 +++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f1e8db..ba8850b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-01-18 Andreas Kupries + + * generic/tclIO.c (CreateScriptRecord): [Bug 2918110]: Initialize + the EventScriptRecord (esPtr) fully before handing it to + Tcl_CreateChannelHandler for registration. Otherwise a reflected + channel calling 'chan postevent' (== Tcl_NotifyChannel) in its + 'watchProc' will cause the function 'TclChannelEventScriptInvoker' + to be run on an uninitialized structure. + 2010-01-18 Donal K. Fellows * generic/tclStringObj.c (Tcl_AppendFormatToObj): [Bug 2932421]: Stop diff --git a/generic/tclIO.c b/generic/tclIO.c index 3f7724b..115bf9a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.170 2009/12/09 23:26:53 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.171 2010/01/18 22:19:11 andreas_kupries Exp $ */ #include "tclInt.h" @@ -8677,6 +8677,7 @@ CreateScriptRecord( ChannelState *statePtr = chanPtr->state; /* State info for channel */ EventScriptRecord *esPtr; + int makeCH; for (esPtr=statePtr->scriptRecordPtr; esPtr!=NULL; esPtr=esPtr->nextPtr) { if ((esPtr->interp == interp) && (esPtr->mask == mask)) { @@ -8685,18 +8686,34 @@ CreateScriptRecord( break; } } - if (esPtr == NULL) { + + makeCH = (esPtr == NULL); + + if (makeCH) { esPtr = (EventScriptRecord *) ckalloc(sizeof(EventScriptRecord)); - Tcl_CreateChannelHandler((Tcl_Channel) chanPtr, mask, - TclChannelEventScriptInvoker, esPtr); - esPtr->nextPtr = statePtr->scriptRecordPtr; - statePtr->scriptRecordPtr = esPtr; } + + /* + * Initialize the structure before calling Tcl_CreateChannelHandler, + * because a reflected channel caling 'chan postevent' aka + * 'Tcl_NotifyChannel' in its 'watch'Proc will invoke + * 'TclChannelEventScriptInvoker' immediately, and we do not wish it to + * see uninitialized memory and crash. See [Bug 2918110]. + */ + esPtr->chanPtr = chanPtr; esPtr->interp = interp; esPtr->mask = mask; Tcl_IncrRefCount(scriptPtr); esPtr->scriptPtr = scriptPtr; + + if (makeCH) { + esPtr->nextPtr = statePtr->scriptRecordPtr; + statePtr->scriptRecordPtr = esPtr; + + Tcl_CreateChannelHandler((Tcl_Channel) chanPtr, mask, + TclChannelEventScriptInvoker, esPtr); + } } /* -- cgit v0.12 From eb8c21682b72bee7dd91e034b8f1a1bb773c63bc Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 19 Jan 2010 09:48:57 +0000 Subject: [Bug 2929546]: Improve the dict documentation. --- ChangeLog | 5 +++++ doc/dict.n | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba8850b..b846268 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-19 Donal K. Fellows + + * doc/dict.n: [Bug 2929546]: Clarify just what [dict with] and [dict + update] are doing with variables. + 2010-01-18 Andreas Kupries * generic/tclIO.c (CreateScriptRecord): [Bug 2918110]: Initialize diff --git a/doc/dict.n b/doc/dict.n index 2dc4db3..ffb1500 100644 --- a/doc/dict.n +++ b/doc/dict.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dict.n,v 1.21 2009/01/07 13:50:03 dkf Exp $ +'\" RCS: @(#) $Id: dict.n,v 1.22 2010/01/19 09:48:58 dkf Exp $ '\" .so man.macros .TH dict n 8.5 Tcl "Tcl Built-In Commands" @@ -107,7 +107,7 @@ dict get $dict foo bar spong dict get [dict get [dict get $dict foo] bar] spong .CE .PP -If no keys are provided, dict would return a list containing pairs of +If no keys are provided, \fBdict get\fR will return a list containing pairs of elements in a manner similar to \fBarray get\fR. That is, the first element of each pair would be the key and the second element would be the value for that key. @@ -208,9 +208,18 @@ to the dictionary within \fIdictionaryVariable\fR (unless are silently discarded), even if the result of \fIbody\fR is an error or some other kind of exceptional exit. The result of \fBdict update\fR is (unless some kind of error occurs) the result of the -evaluation of \fIbody\fR. Note that the mapping of values to variables +evaluation of \fIbody\fR. +.RS +.PP +Each \fIvarName\fR is mapped in the scope enclosing the \fBdict update\fR; +it is recommended that this command only be used in a local scope +(\fBproc\fRedure, lambda term for \fBapply\fR, or method). Because of +this, the variables set by \fBdict update\fR will continue to +exist after the command finishes (unless explicitly \fBunset\fR). +Note that the mapping of values to variables does not use traces; changes to the \fIdictionaryVariable\fR's contents only happen when \fIbody\fR terminates. +.RE .TP \fBdict values \fIdictionaryValue \fR?\fIglobPattern\fR? . @@ -233,10 +242,20 @@ dictionary be discarded, and this also happens if the contents of \fIdictionaryVariable\fR are adjusted so that the chain of dictionaries no longer exists. The result of \fBdict with\fR is (unless some kind of error occurs) the result of the evaluation of -\fIbody\fR. Note that the mapping of values to variables does not use +\fIbody\fR. +.RS +.PP +The variables are mapped in the scope enclosing the \fBdict with\fR; +it is recommended that this command only be used in a local scope +(\fBproc\fRedure, lambda term for \fBapply\fR, or method). Because of +this, the variables set by \fBdict with\fR will continue to +exist after the command finishes (unless explicitly \fBunset\fR). +Note that the mapping of values to variables does not use traces; changes to the \fIdictionaryVariable\fR's contents only happen when \fIbody\fR terminates. +.RE .SH "DICTIONARY VALUES" +.PP Dictionaries are values that contain an efficient, order-preserving mapping from arbitrary keys to arbitrary values. Each key in the dictionary maps to a single value. @@ -254,6 +273,12 @@ the others are ignored, meaning that, and .QW "apple carrot apple banana" are equivalent dictionaries (with different string representations). +.PP +Operations that derive a new dictionary from an old one (e.g., updates +like \fBdict set\fR and \fBdict unset\fR) preserve the order of keys +in the dictionary. The exceptions to this are for any new keys they +add, which are appended to the sequence, and any keys that are +removed, which are excised from the order. .SH EXAMPLES .PP Basic dictionary usage: @@ -336,6 +361,35 @@ foreach c [split {abcdefghijklmnopqrstuvwxyz} ""] { set upperCaseMap [\fBdict get\fR $capital $env(LANG)] set upperCase [string map $upperCaseMap $string] .CE +.PP +Showing the detail of \fBdict with\fR: +.PP +.CS +proc sumDictionary {varName} { + upvar 1 $varName vbl + foreach key [\fBdict keys\fR $vbl] { + # Manufacture an entry in the subdictionary + \fBdict set\fR vbl $key total 0 + # Add the values and remove the old + \fBdict with\fR vbl $key { + set total [expr {$x + $y + $z}] + unset x y z + } + } + puts "last total was $total, for key $key" +} + +set myDict { + a {x 1 y 2 z 3} + b {x 6 y 5 z 4} +} + +sumDictionary myDict +# prints: \fIlast total was 15, for key b\fR + +puts "dictionary is now \\"$myDict\\"" +# prints: \fIdictionary is now "a {total 6} b {total 15}"\fR +.CE .SH "SEE ALSO" append(n), array(n), foreach(n), incr(n), list(n), lappend(n), set(n) .SH KEYWORDS -- cgit v0.12 From 43513688929a6ab31c9f6a0a233848d1f4765364 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Jan 2010 09:41:14 +0000 Subject: Document that [tailcall] doesn't work inside [catch] --- doc/tailcall.n | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/tailcall.n b/doc/tailcall.n index 2f8a305..93af2b5 100644 --- a/doc/tailcall.n +++ b/doc/tailcall.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tailcall.n,v 1.1 2009/03/19 16:14:52 dkf Exp $ +'\" RCS: @(#) $Id: tailcall.n,v 1.2 2010/01/20 09:41:14 dkf Exp $ '\" .so man.macros .TH tailcall n 8.6 Tcl "Tcl Built-In Commands" @@ -25,10 +25,12 @@ in the current namespace context, not in the caller's. Apart from that difference in resolution, it is equivalent to: .PP .CS -uplevel 1 [list \fIcommand\fR ?\fIarg ...\fR?] +return [uplevel 1 [list \fIcommand\fR ?\fIarg ...\fR?]] .CE .PP -This command may not be invoked from within an \fBuplevel\fR into a procedure. +This command may not be invoked from within an \fBuplevel\fR into a procedure +or inside a \fBcatch\fR inside a procedure or lambda. +'\" TODO: sort out the mess with the [try] command! .SH EXAMPLE .PP Compute the factorial of a number. -- cgit v0.12 From ee1c40272a0ee43da070323282205173df4a8816 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Jan 2010 13:40:23 +0000 Subject: Split up and extended the examples for more clarity --- doc/exec.n | 95 +++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 73 insertions(+), 22 deletions(-) diff --git a/doc/exec.n b/doc/exec.n index c44ee29..1326e35 100644 --- a/doc/exec.n +++ b/doc/exec.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: exec.n,v 1.25 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: exec.n,v 1.26 2010/01/20 13:40:23 dkf Exp $ '\" .so man.macros .TH exec n 8.5 Tcl "Tcl Built-In Commands" @@ -282,17 +282,17 @@ for the longer name. If a directory name was not specified as part of the application name, the following directories are automatically searched in order when attempting to locate the application: .RS -.IP \(bu +.IP \(bu 3 The directory from which the Tcl executable was loaded. -.IP \(bu +.IP \(bu 3 The current directory. -.IP \(bu +.IP \(bu 3 The Windows NT 32-bit system directory. -.IP \(bu +.IP \(bu 3 The Windows NT 16-bit system directory. -.IP \(bu +.IP \(bu 3 The Windows NT home directory. -.IP \(bu +.IP \(bu 3 The directories listed in the path. .PP In order to execute shell built-in commands like \fBdir\fR and \fBcopy\fR, @@ -310,15 +310,15 @@ for the longer name. If a directory name was not specified as part of the application name, the following directories are automatically searched in order when attempting to locate the application: .RS -.IP \(bu +.IP \(bu 3 The directory from which the Tcl executable was loaded. -.IP \(bu +.IP \(bu 3 The current directory. -.IP \(bu +.IP \(bu 3 The Windows 9x system directory. -.IP \(bu +.IP \(bu 3 The Windows 9x home directory. -.IP \(bu +.IP \(bu 3 The directories listed in the path. .RE .RS @@ -362,18 +362,18 @@ output may fail, hang Tcl, or even hang the system if their own private console window is not available to them. .RE .TP -\fBUnix\fR\0\0\0\0\0\0\0 +\fBUnix\fR (including Mac OS X) . The \fBexec\fR command is fully functional and works as described. .SH "UNIX EXAMPLES" .PP Here are some examples of the use of the \fBexec\fR command on Unix. -.PP To execute a simple program and get its result: .PP .CS \fBexec\fR uname -a .CE +.SS "WORKING WITH NON-ZERO RESULTS" .PP To execute a program that can return a non-zero result, you should wrap the call to \fBexec\fR in \fBcatch\fR and check the contents @@ -382,14 +382,31 @@ of the \fB\-errorcode\fR return option if you have an error: .CS set status 0 if {[catch {\fBexec\fR grep foo bar.txt} results options]} { - set details [dict get $options -errorcode] - if {[lindex $details 0] eq "CHILDSTATUS"} { - set status [lindex $details 2] - } else { - # Some kind of unexpected failure - } + set details [dict get $options -errorcode] + if {[lindex $details 0] eq "CHILDSTATUS"} { + set status [lindex $details 2] + } else { + # Some other error; regenerate it to let caller handle + return -options $options -level 0 $results + } +} +.CE +.VS 8.6 +.PP +This is more easily written using the \fBtry\fR command, as that makes +it simpler to trap specific types of errors. This is +done using code like this: +.PP +.CS +try { + set results [\fBexec\fR grep foo bar.txt] + set status 0 +} trap CHILDSTATUS {results options} { + set status [lindex [dict get $options -errorcode] 2] } .CE +.VE 8.6 +.SS "WORKING WITH QUOTED ARGUMENTS" .PP When translating a command from a Unix shell invocation, care should be taken over the fact that single quote characters have no special @@ -404,6 +421,7 @@ would be translated into something like: .CS \fBexec\fR awk {{sum += $1} END {print sum}} numbers.list .CE +.SS "WORKING WITH GLOBBING" .PP If you are converting invocations involving shell globbing, you should remember that Tcl does not handle globbing or expand things into @@ -413,10 +431,25 @@ this: .CS \fBexec\fR ls -l {*}[glob *.tcl] .CE +.SS "WORKING WITH USER-SUPPLIED SHELL SCRIPT FRAGMENTS" +.PP +One useful technique can be to expose to users of a script the ability +to specify a fragment of shell script to execute that will have some +data passed in on standard input that was produced by the Tcl program. +This is a common technique for using the \fIlpr\fR program for +printing. By far the simplest way of doing this is to pass the user's +script to the user's shell for processing, as this avoids a lot of +complexity with parsing other languages. +.PP +.CS +set lprScript [\fIget from user...\fR] +set postscriptData [\fIgenerate somehow...\fR] + +\fBexec\fR $env(SHELL) -c $lprScript << $postscriptData +.CE .SH "WINDOWS EXAMPLES" .PP Here are some examples of the use of the \fBexec\fR command on Windows. -.PP To start an instance of \fInotepad\fR editing a file without waiting for the user to finish editing the file: .PP @@ -429,6 +462,7 @@ To print a text file using \fInotepad\fR: .CS \fBexec\fR notepad /p myfile.txt .CE +.SS "WORKING WITH CONSOLE PROGRAMS" .PP If a program calls other programs, such as is common with compilers, then you may need to resort to batch files to hide the console windows @@ -443,6 +477,7 @@ With the file \fIcmp.bat\fR looking something like: .CS @gcc %1 %2 %3 %4 %5 %6 %7 %8 %9 .CE +.SS "WORKING WITH COMMAND BUILT-INS" .PP Sometimes you need to be careful, as different programs may have the same name and be in the path. It can then happen that typing a command @@ -461,7 +496,23 @@ the \fBglob\fR command.) To do that, use this: .CS \fBexec\fR {*}[auto_execok dir] *.tcl .CE +.SS "WORKING WITH NATIVE FILENAMES" +.PP +Many programs on Windows require filename arguments to be passed in with +backslashes as pathname separators. This is done with the help of the +\fBfile nativename\fR command. For example, to make a directory (on NTFS) +encrypted so that only the current user can access it requires use of +the \fICIPHER\fR command, like this: +.PP +.CS +set secureDir "~/Desktop/Secure Directory" +file mkdir $secureDir +\fBexec\fR CIPHER /e /s:[file nativename $secureDir] +.CE .SH "SEE ALSO" -error(n), open(n) +error(n), file(n), open(n) .SH KEYWORDS execute, pipeline, redirection, subprocess +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From 1549d82a2029add6f62dde489d26a70b466f4fd0 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 20 Jan 2010 13:42:17 +0000 Subject: Use a consistent indentation of 4 for code examples. --- doc/after.n | 10 ++-- doc/append.n | 4 +- doc/apply.n | 41 ++++++++------- doc/array.n | 16 +++--- doc/break.n | 16 +++--- doc/chan.n | 30 +++++------ doc/continue.n | 13 +++-- doc/dict.n | 44 ++++++++--------- doc/eval.n | 15 +++--- doc/fconfigure.n | 32 ++++++------ doc/file.n | 36 +++++++------- doc/for.n | 17 ++++--- doc/format.n | 9 ++-- doc/http.n | 52 +++++++++---------- doc/if.n | 23 +++++---- doc/interp.n | 14 +++--- doc/load.n | 16 +++--- doc/lsort.n | 44 ++++++++--------- doc/msgcat.n | 21 +++++--- doc/package.n | 11 +++-- doc/proc.n | 15 +++--- doc/return.n | 78 ++++++++++++++--------------- doc/scan.n | 27 +++++----- doc/socket.n | 11 +++-- doc/source.n | 4 +- doc/split.n | 17 ++++--- doc/switch.n | 46 ++++++++--------- doc/upvar.n | 12 ++--- doc/vwait.n | 148 ++++++++++++++++++++++++++++--------------------------- 29 files changed, 434 insertions(+), 388 deletions(-) diff --git a/doc/after.n b/doc/after.n index e6d2dd0..8ccada1 100644 --- a/doc/after.n +++ b/doc/after.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: after.n,v 1.12 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: after.n,v 1.13 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH after n 7.5 Tcl "Tcl Built-In Commands" @@ -114,7 +114,7 @@ seconds: .PP .CS proc sleep {N} { - \fBafter\fR [expr {int($N * 1000)}] + \fBafter\fR [expr {int($N * 1000)}] } .CE .PP @@ -138,9 +138,9 @@ responsive during a slow task. .PP .CS proc doOneStep {} { - if {[::my_calc::one_step]} { - \fBafter idle\fR [list \fBafter\fR 0 doOneStep] - } + if {[::my_calc::one_step]} { + \fBafter idle\fR [list \fBafter\fR 0 doOneStep] + } } doOneStep .CE diff --git a/doc/append.n b/doc/append.n index c044c08..6217b80 100644 --- a/doc/append.n +++ b/doc/append.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: append.n,v 1.11 2008/10/15 10:43:37 dkf Exp $ +'\" RCS: @(#) $Id: append.n,v 1.12 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH append n "" Tcl "Tcl Built-In Commands" @@ -37,7 +37,7 @@ Building a string of comma-separated numbers piecemeal using a loop. .CS set var 0 for {set i 1} {$i<=10} {incr i} { - \fBappend\fR var "," $i + \fBappend\fR var "," $i } puts $var # Prints 0,1,2,3,4,5,6,7,8,9,10 diff --git a/doc/apply.n b/doc/apply.n index e76c1e5..9d373e1 100644 --- a/doc/apply.n +++ b/doc/apply.n @@ -48,18 +48,18 @@ The semantics of \fBapply\fR can also be described by: .PP .CS proc apply {fun args} { - set len [llength $fun] - if {($len < 2) || ($len > 3)} { - error "can't interpret \e"$fun\e" as anonymous function" - } - lassign $fun argList body ns - set name ::$ns::[getGloballyUniqueName] - set body0 { - rename [lindex [info level 0] 0] {} - } - proc $name $argList ${body0}$body - set code [catch {uplevel 1 $name $args} res opt] - return -options $opt $res + set len [llength $fun] + if {($len < 2) || ($len > 3)} { + error "can't interpret \e"$fun\e" as anonymous function" + } + lassign $fun argList body ns + set name ::$ns::[getGloballyUniqueName] + set body0 { + rename [lindex [info level 0] 0] {} + } + proc $name $argList ${body0}$body + set code [catch {uplevel 1 $name $args} res opt] + return -options $opt $res } .CE .SH EXAMPLES @@ -69,11 +69,11 @@ to each element of a list. .PP .CS proc map {lambda list} { - set result {} - foreach item $list { - lappend result [\fBapply\fR $lambda $item] - } - return $result + set result {} + foreach item $list { + lappend result [\fBapply\fR $lambda $item] + } + return $result } map {x {return [string length $x]:$x}} {a bb ccc dddd} \fI\(-> 1:a 2:bb 3:ccc 4:dddd\fR @@ -87,8 +87,8 @@ The \fBapply\fR command is also useful for defining callbacks for use in the .CS set vbl "123abc" trace add variable vbl write {\fBapply\fR {{v1 v2 op} { - upvar 1 $v1 v - puts "updated variable to \e"$v\e"" + upvar 1 $v1 v + puts "updated variable to \e"$v\e"" }}} set vbl 123 set vbl abc @@ -97,3 +97,6 @@ set vbl abc proc(n), uplevel(n) .SH KEYWORDS anonymous function, argument, lambda, procedure, +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/array.n b/doc/array.n index f045102..49bc0e6 100644 --- a/doc/array.n +++ b/doc/array.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: array.n,v 1.21 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: array.n,v 1.22 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH array n 8.3 Tcl "Tcl Built-In Commands" @@ -138,14 +138,14 @@ The command always returns an empty string. .SH EXAMPLES .CS \fBarray set\fR colorcount { - red 1 - green 5 - blue 4 - white 9 + red 1 + green 5 + blue 4 + white 9 } foreach {color count} [\fBarray get\fR colorcount] { - puts "Color: $color Count: $count" + puts "Color: $color Count: $count" } \fB\(->\fR Color: blue Count: 4 Color: white Count: 9 @@ -153,7 +153,7 @@ foreach {color count} [\fBarray get\fR colorcount] { Color: red Count: 1 foreach color [\fBarray names\fR colorcount] { - puts "Color: $color Count: $colorcount($color)" + puts "Color: $color Count: $colorcount($color)" } \fB\(->\fR Color: blue Count: 4 Color: white Count: 9 @@ -161,7 +161,7 @@ foreach color [\fBarray names\fR colorcount] { Color: red Count: 1 foreach color [lsort [\fBarray names\fR colorcount]] { - puts "Color: $color Count: $colorcount($color)" + puts "Color: $color Count: $colorcount($color)" } \fB\(->\fR Color: blue Count: 4 Color: green Count: 5 diff --git a/doc/break.n b/doc/break.n index 77a0d97..4d758a4 100644 --- a/doc/break.n +++ b/doc/break.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: break.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: break.n,v 1.12 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH break n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ break \- Abort looping command .SH SYNOPSIS \fBbreak\fR .BE - .SH DESCRIPTION .PP This command is typically invoked inside the body of a looping command @@ -35,15 +34,16 @@ Print a line for each of the integers from 0 to 5: .PP .CS for {set x 0} {$x<10} {incr x} { - if {$x > 5} { - \fBbreak\fR - } - puts "x is $x" + if {$x > 5} { + \fBbreak\fR + } + puts "x is $x" } .CE - .SH "SEE ALSO" catch(n), continue(n), for(n), foreach(n), return(n), while(n) - .SH KEYWORDS abort, break, loop +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/chan.n b/doc/chan.n index a413049..067a408 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.25 2010/01/14 11:47:08 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.26 2010/01/20 13:42:17 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -769,24 +769,24 @@ set offset 0 \fI# Search for string "FOOBAR" in the file\fR while {[\fBchan gets\fR $f line] >= 0} { - set idx [string first FOOBAR $line] - if {$idx > -1} { - \fI# Found it; rewrite line\fR + set idx [string first FOOBAR $line] + if {$idx > -1} { + \fI# Found it; rewrite line\fR - \fBchan seek\fR $f [expr {$offset + $idx}] - \fBchan puts\fR -nonewline $f BARFOO + \fBchan seek\fR $f [expr {$offset + $idx}] + \fBchan puts\fR -nonewline $f BARFOO - \fI# Skip to end of following line, and truncate\fR - \fBchan gets\fR $f - \fBchan gets\fR $f - \fBchan truncate\fR $f + \fI# Skip to end of following line, and truncate\fR + \fBchan gets\fR $f + \fBchan gets\fR $f + \fBchan truncate\fR $f - \fI# Stop searching the file now\fR - break - } + \fI# Stop searching the file now\fR + break + } - \fI# Save offset of start of next line for later\fR - set offset [\fBchan tell\fR $f] + \fI# Save offset of start of next line for later\fR + set offset [\fBchan tell\fR $f] } \fBchan close\fR $f .CE diff --git a/doc/continue.n b/doc/continue.n index e98763c..beb29b7 100644 --- a/doc/continue.n +++ b/doc/continue.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: continue.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: continue.n,v 1.12 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH continue n "" Tcl "Tcl Built-In Commands" @@ -34,13 +34,16 @@ Print a line for each of the integers from 0 to 10 \fIexcept\fR 5: .PP .CS for {set x 0} {$x<10} {incr x} { - if {$x == 5} { - \fBcontinue\fR - } - puts "x is $x" + if {$x == 5} { + \fBcontinue\fR + } + puts "x is $x" } .CE .SH "SEE ALSO" break(n), for(n), foreach(n), return(n), while(n) .SH KEYWORDS continue, iteration, loop +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/dict.n b/doc/dict.n index ffb1500..023e811 100644 --- a/doc/dict.n +++ b/doc/dict.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: dict.n,v 1.22 2010/01/19 09:48:58 dkf Exp $ +'\" RCS: @(#) $Id: dict.n,v 1.23 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH dict n 8.5 Tcl "Tcl Built-In Commands" @@ -328,16 +328,16 @@ Constructing and using nested dictionaries: set i 0 puts "There are [\fBdict size\fR $employeeInfo] employees" \fBdict for\fR {id info} $employeeInfo { - puts "Employee #[incr i]: $id" - \fBdict with\fR info { - puts " Name: $forenames $surname" - puts " Address: $street, $city" - puts " Telephone: $phone" - } + puts "Employee #[incr i]: $id" + \fBdict with\fR info { + puts " Name: $forenames $surname" + puts " Address: $street, $city" + puts " Telephone: $phone" + } } # Another way to iterate and pick out names... foreach id [\fBdict keys\fR $employeeInfo] { - puts "Hello, [\fBdict get\fR $employeeInfo $id forenames]!" + puts "Hello, [\fBdict get\fR $employeeInfo $id forenames]!" } .CE .PP @@ -347,7 +347,7 @@ A localizable version of \fBstring toupper\fR: # Set up the basic C locale set capital [\fBdict create\fR C [\fBdict create\fR]] foreach c [split {abcdefghijklmnopqrstuvwxyz} ""] { - \fBdict set\fR capital C $c [string toupper $c] + \fBdict set\fR capital C $c [string toupper $c] } # English locales can luckily share the "C" locale @@ -366,22 +366,22 @@ Showing the detail of \fBdict with\fR: .PP .CS proc sumDictionary {varName} { - upvar 1 $varName vbl - foreach key [\fBdict keys\fR $vbl] { - # Manufacture an entry in the subdictionary - \fBdict set\fR vbl $key total 0 - # Add the values and remove the old - \fBdict with\fR vbl $key { - set total [expr {$x + $y + $z}] - unset x y z - } - } - puts "last total was $total, for key $key" + upvar 1 $varName vbl + foreach key [\fBdict keys\fR $vbl] { + # Manufacture an entry in the subdictionary + \fBdict set\fR vbl $key total 0 + # Add the values and remove the old + \fBdict with\fR vbl $key { + set total [expr {$x + $y + $z}] + unset x y z + } + } + puts "last total was $total, for key $key" } set myDict { - a {x 1 y 2 z 3} - b {x 6 y 5 z 4} + a {x 1 y 2 z 3} + b {x 6 y 5 z 4} } sumDictionary myDict diff --git a/doc/eval.n b/doc/eval.n index 47a8aee..1f305f8 100644 --- a/doc/eval.n +++ b/doc/eval.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: eval.n,v 1.13 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: eval.n,v 1.14 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH eval n "" Tcl "Tcl Built-In Commands" @@ -62,11 +62,11 @@ start of the list in the variable: .PP .CS proc lprepend {varName args} { - upvar 1 $varName var - # Ensure that the variable exists and contains a list - lappend var - # Now we insert all the arguments in one go - set var [\fBeval\fR [list linsert $var 0] $args] + upvar 1 $varName var + # Ensure that the variable exists and contains a list + lappend var + # Now we insert all the arguments in one go + set var [\fBeval\fR [list linsert $var 0] $args] } .CE .PP @@ -80,3 +80,6 @@ set var [linsert $var 0 {*}$args] catch(n), concat(n), error(n), interp(n), list(n), namespace(n), subst(n), tclvars(n), uplevel(n) .SH KEYWORDS concatenate, evaluate, script +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/fconfigure.n b/doc/fconfigure.n index 610c898..d2b8ee1 100644 --- a/doc/fconfigure.n +++ b/doc/fconfigure.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fconfigure.n,v 1.22 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: fconfigure.n,v 1.23 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH fconfigure n 8.3 Tcl "Tcl Built-In Commands" @@ -232,17 +232,17 @@ set s [socket some.where.com 12345] \fBfconfigure\fR $s -blocking 0 fileevent $s readable "readMe $s" proc readMe chan { - if {[gets $chan line] < 0} { - if {[eof $chan]} { - close $chan - return - } - # Could not read a complete line this time; Tcl's - # internal buffering will hold the partial line for us - # until some more data is available over the socket. - } else { - puts stdout $line - } + if {[gets $chan line] < 0} { + if {[eof $chan]} { + close $chan + return + } + # Could not read a complete line this time; Tcl's + # internal buffering will hold the partial line for us + # until some more data is available over the socket. + } else { + puts stdout $line + } } .CE .PP @@ -255,16 +255,16 @@ set f [open teapot.ppm] # Get the header if {[gets $f] ne "P6"} { - error "not a raw\-bits PPM" + error "not a raw\-bits PPM" } # Read lines until we have got non-comment lines # that supply us with three decimal values. set words {} while {[llength $words] < 3} { - gets $f line - if {[string match "#*" $line]} continue - lappend words {*}[join [scan $line %d%d%d]] + gets $f line + if {[string match "#*" $line]} continue + lappend words {*}[join [scan $line %d%d%d]] } # Those words supply the size of the image and its diff --git a/doc/file.n b/doc/file.n index 70f3257..e969c44 100644 --- a/doc/file.n +++ b/doc/file.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: file.n,v 1.58 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: file.n,v 1.59 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -491,22 +491,22 @@ directory: .PP .CS proc findMatchingCFiles {dir} { - set files {} - switch $::tcl_platform(platform) { - windows { - set ext .obj - } - unix { - set ext .o - } - } - foreach file [glob \-nocomplain \-directory $dir *.c] { - set objectFile [\fBfile tail\fR [\fBfile rootname\fR $file]]$ext - if {[\fBfile exists\fR $objectFile]} { - lappend files $file - } - } - return $files + set files {} + switch $::tcl_platform(platform) { + windows { + set ext .obj + } + unix { + set ext .o + } + } + foreach file [glob \-nocomplain \-directory $dir *.c] { + set objectFile [\fBfile tail\fR [\fBfile rootname\fR $file]]$ext + if {[\fBfile exists\fR $objectFile]} { + lappend files $file + } + } + return $files } .CE .PP @@ -518,7 +518,7 @@ set oldName foobar.txt set newName foo/bar.txt # Make sure that where we're going to move to exists... if {![\fBfile isdirectory\fR [\fBfile dirname\fR $newName]]} { - \fBfile mkdir\fR [\fBfile dirname\fR $newName] + \fBfile mkdir\fR [\fBfile dirname\fR $newName] } \fBfile rename\fR $oldName $newName \fBfile link\fR \-symbolic $oldName $newName diff --git a/doc/for.n b/doc/for.n index f580d85..a7ad4a5 100644 --- a/doc/for.n +++ b/doc/for.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: for.n,v 1.12 2010/01/14 14:52:17 dkf Exp $ +'\" RCS: @(#) $Id: for.n,v 1.13 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH for n "" Tcl "Tcl Built-In Commands" @@ -54,8 +54,8 @@ See below for an example: Print a line for each of the integers from 0 to 10: .PP .CS -for {set x 0} {$x<10} {incr x} { - puts "x is $x" +\fBfor\fR {set x 0} {$x<10} {incr x} { + puts "x is $x" } .CE .PP @@ -68,19 +68,22 @@ the expression will be substituted before the \fBfor\fR command is executed. .PP .CS -for {set x 0} $x<10 {incr x} { - puts "x is $x" +\fBfor\fR {set x 0} $x<10 {incr x} { + puts "x is $x" } .CE .PP Print out the powers of two from 1 to 1024: .PP .CS -for {set x 1} {$x<=1024} {set x [expr {$x * 2}]} { - puts "x is $x" +\fBfor\fR {set x 1} {$x<=1024} {set x [expr {$x * 2}]} { + puts "x is $x" } .CE .SH "SEE ALSO" break(n), continue(n), foreach(n), while(n) .SH KEYWORDS boolean, for, iteration, loop +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/format.n b/doc/format.n index 24f35df..242ebfd 100644 --- a/doc/format.n +++ b/doc/format.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: format.n,v 1.23 2009/02/24 21:04:58 dkf Exp $ +'\" RCS: @(#) $Id: format.n,v 1.24 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH format n 8.1 Tcl "Tcl Built-In Commands" @@ -270,8 +270,8 @@ puts $sep # Print the contents of the table set p 1 for {set i 0} {$i<=20} {incr i} { - puts [\fBformat\fR "| %*d | %*ld |" $w1 $i $w2 $p] - set p [expr {wide($p) * 3}] + puts [\fBformat\fR "| %*d | %*ld |" $w1 $i $w2 $p] + set p [expr {wide($p) * 3}] } # Finish off by printing the separator again @@ -281,3 +281,6 @@ puts $sep scan(n), sprintf(3), string(n) .SH KEYWORDS conversion specifier, format, sprintf, string, substitution +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/http.n b/doc/http.n index 0c533b8..2ad9eae 100644 --- a/doc/http.n +++ b/doc/http.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: http.n,v 1.38 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: http.n,v 1.39 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH "http" n 2.7 http "Tcl Bundled Packages" @@ -606,36 +606,36 @@ progress meter, and prints the meta-data associated with the URL. .PP .CS proc httpcopy { url file {chunk 4096} } { - set out [open $file w] - set token [\fB::http::geturl\fR $url -channel $out \e - -progress httpCopyProgress -blocksize $chunk] - close $out + set out [open $file w] + set token [\fB::http::geturl\fR $url -channel $out \e + -progress httpCopyProgress -blocksize $chunk] + close $out - # This ends the line started by httpCopyProgress - puts stderr "" + # This ends the line started by httpCopyProgress + puts stderr "" - upvar #0 $token state - set max 0 - foreach {name value} $state(meta) { - if {[string length $name] > $max} { - set max [string length $name] - } - if {[regexp -nocase ^location$ $name]} { - # Handle URL redirects - puts stderr "Location:$value" - return [httpcopy [string trim $value] $file $chunk] - } - } - incr max - foreach {name value} $state(meta) { - puts [format "%-*s %s" $max $name: $value] - } + upvar #0 $token state + set max 0 + foreach {name value} $state(meta) { + if {[string length $name] > $max} { + set max [string length $name] + } + if {[regexp -nocase ^location$ $name]} { + # Handle URL redirects + puts stderr "Location:$value" + return [httpcopy [string trim $value] $file $chunk] + } + } + incr max + foreach {name value} $state(meta) { + puts [format "%-*s %s" $max $name: $value] + } - return $token + return $token } proc httpCopyProgress {args} { - puts -nonewline stderr . - flush stderr + puts -nonewline stderr . + flush stderr } .CE .SH "SEE ALSO" diff --git a/doc/if.n b/doc/if.n index d80c684..dea7610 100644 --- a/doc/if.n +++ b/doc/if.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: if.n,v 1.10 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: if.n,v 1.11 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH if n "" Tcl "Tcl Built-In Commands" @@ -51,9 +51,9 @@ With an \fBelse\fR-clause: .PP .CS \fBif\fR {$vbl == 1} { - puts "vbl is one" + puts "vbl is one" } \fBelse\fR { - puts "vbl is not one" + puts "vbl is not one" } .CE .PP @@ -61,11 +61,11 @@ With an \fBelseif\fR-clause too: .PP .CS \fBif\fR {$vbl == 1} { - puts "vbl is one" + puts "vbl is one" } \fBelseif\fR {$vbl == 2} { - puts "vbl is two" + puts "vbl is two" } \fBelse\fR { - puts "vbl is not one or two" + puts "vbl is not one or two" } .CE .PP @@ -74,14 +74,17 @@ good idea to use the optional \fBthen\fR keyword for clarity: .PP .CS \fBif\fR { - $vbl == 1 - || $vbl == 2 - || $vbl == 3 + $vbl == 1 + || $vbl == 2 + || $vbl == 3 } \fBthen\fR { - puts "vbl is one, two or three" + puts "vbl is one, two or three" } .CE .SH "SEE ALSO" expr(n), for(n), foreach(n) .SH KEYWORDS boolean, conditional, else, false, if, true +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/interp.n b/doc/interp.n index 082e559..2d2330b 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: interp.n,v 1.43 2010/01/10 20:36:49 dkf Exp $ +'\" RCS: @(#) $Id: interp.n,v 1.44 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH interp n 8.6 Tcl "Tcl Built-In Commands" @@ -832,8 +832,8 @@ set i [\fBinterp create\fR -safe] \fBinterp hide\fR $i lappend \fBinterp alias\fR $i lappend {} loggedLappend $i proc loggedLappend {i args} { - puts "logged invocation of lappend $args" - \fBinterp invokehidden\fR $i lappend {*}$args + puts "logged invocation of lappend $args" + \fBinterp invokehidden\fR $i lappend {*}$args } \fBinterp eval\fR $i $someUntrustedScript .CE @@ -845,10 +845,10 @@ terminates. set i [\fBinterp create\fR] \fBinterp limit\fR $i command -value 1000 \fBinterp eval\fR $i { - set x 0 - while {1} { - puts "Counting up... [incr x]" - } + set x 0 + while {1} { + puts "Counting up... [incr x]" + } } .CE .SH "SEE ALSO" diff --git a/doc/load.n b/doc/load.n index 8675dcd..faba6b5 100644 --- a/doc/load.n +++ b/doc/load.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: load.n,v 1.25 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: load.n,v 1.26 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH load n 7.5 Tcl "Tcl Built-In Commands" @@ -121,10 +121,12 @@ When loading a DLL in the current directory, Windows will ignore .QW ./ as a path specifier and use a search heuristic to find the DLL instead. To avoid this, load the DLL with: +.RS .PP .CS \fBload\fR [file join [pwd] mylib.DLL] .CE +.RE .SH BUGS .PP If the same file is \fBload\fRed by different \fIfileName\fRs, it will @@ -160,12 +162,12 @@ it can then be loaded into Tcl with the following: .CS # Load the extension switch $tcl_platform(platform) { - windows { - \fBload\fR [file join [pwd] foo.dll] - } - unix { - \fBload\fR [file join [pwd] libfoo[info sharedlibextension]] - } + windows { + \fBload\fR [file join [pwd] foo.dll] + } + unix { + \fBload\fR [file join [pwd] libfoo[info sharedlibextension]] + } } # Now execute the command defined by the extension diff --git a/doc/lsort.n b/doc/lsort.n index 568f283..7b9d6a6 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -7,7 +7,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lsort.n,v 1.33 2009/02/24 21:04:58 dkf Exp $ +'\" RCS: @(#) $Id: lsort.n,v 1.34 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH lsort n 8.5 Tcl "Tcl Built-In Commands" @@ -101,7 +101,7 @@ returns \fB{Second 18} {First 24} {Third 30}\fR, '\" .CS lsort -index end-1 \e - {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}} + {{a 1 e i} {b 2 3 f g} {c 4 5 6 d h}} .CE .PP returns \fB{c 4 5 6 d h} {a 1 e i} {b 2 3 f g}\fR, @@ -109,9 +109,9 @@ and .PP .CS lsort -index {0 1} { - {{b i g} 12345} - {{d e m o} 34512} - {{c o d e} 54321} + {{b i g} 12345} + {{d e m o} 34512} + {{c o d e} 54321} } .CE .PP @@ -181,44 +181,44 @@ option. Sorting a list using ASCII sorting: .PP .CS -% \fBlsort\fR {a10 B2 b1 a1 a2} +\fI%\fR \fBlsort\fR {a10 B2 b1 a1 a2} B2 a1 a10 a2 b1 .CE .PP Sorting a list using Dictionary sorting: .PP .CS -% \fBlsort\fR -dictionary {a10 B2 b1 a1 a2} +\fI%\fR \fBlsort\fR -dictionary {a10 B2 b1 a1 a2} a1 a2 a10 b1 B2 .CE .PP Sorting lists of integers: .PP .CS -% \fBlsort\fR -integer {5 3 1 2 11 4} +\fI%\fR \fBlsort\fR -integer {5 3 1 2 11 4} 1 2 3 4 5 11 -% \fBlsort\fR -integer {1 2 0x5 7 0 4 -1} +\fI%\fR \fBlsort\fR -integer {1 2 0x5 7 0 4 -1} -1 0 1 2 4 0x5 7 .CE .PP Sorting lists of floating-point numbers: .PP .CS -% \fBlsort\fR -real {5 3 1 2 11 4} +\fI%\fR \fBlsort\fR -real {5 3 1 2 11 4} 1 2 3 4 5 11 -% \fBlsort\fR -real {.5 0.07e1 0.4 6e-1} +\fI%\fR \fBlsort\fR -real {.5 0.07e1 0.4 6e-1} 0.4 .5 6e-1 0.07e1 .CE .PP Sorting using indices: .PP .CS -% # Note the space character before the c -% \fBlsort\fR {{a 5} { c 3} {b 4} {e 1} {d 2}} +\fI%\fR # Note the space character before the c +\fI%\fR \fBlsort\fR {{a 5} { c 3} {b 4} {e 1} {d 2}} { c 3} {a 5} {b 4} {d 2} {e 1} -% \fBlsort\fR -index 0 {{a 5} { c 3} {b 4} {e 1} {d 2}} +\fI%\fR \fBlsort\fR -index 0 {{a 5} { c 3} {b 4} {e 1} {d 2}} {a 5} {b 4} { c 3} {d 2} {e 1} -% \fBlsort\fR -index 1 {{a 5} { c 3} {b 4} {e 1} {d 2}} +\fI%\fR \fBlsort\fR -index 1 {{a 5} { c 3} {b 4} {e 1} {d 2}} {e 1} {d 2} { c 3} {b 4} {a 5} .CE .PP @@ -226,17 +226,17 @@ Sorting using indices: Sorting a dictionary: .PP .CS -% set d [dict create c d a b h i f g c e] +\fI%\fR set d [dict create c d a b h i f g c e] c e a b h i f g -% \fBlsort\fR -stride 2 $d +\fI%\fR \fBlsort\fR -stride 2 $d a b c e f g h i .CE .PP Sorting using striding and multiple indices: .PP .CS -% # Note the first index value is relative to the group -% \fBlsort\fR \-stride 3 \-index {0 1} \e +\fI%\fR # Note the first index value is relative to the group +\fI%\fR \fBlsort\fR \-stride 3 \-index {0 1} \e {{Bob Smith} 25 Audi {Jane Doe} 40 Ford} {{Jane Doe} 40 Ford {Bob Smith} 25 Audi} .CE @@ -245,14 +245,14 @@ Sorting using striding and multiple indices: Stripping duplicate values using sorting: .PP .CS -% \fBlsort\fR -unique {a b c a b c a b c} +\fI%\fR \fBlsort\fR -unique {a b c a b c a b c} a b c .CE .PP More complex sorting using a comparison function: .PP .CS -% proc compare {a b} { +\fI%\fR proc compare {a b} { set a0 [lindex $a 0] set b0 [lindex $b 0] if {$a0 < $b0} { @@ -262,7 +262,7 @@ More complex sorting using a comparison function: } return [string compare [lindex $a 1] [lindex $b 1]] } -% \fBlsort\fR -command compare \e +\fI%\fR \fBlsort\fR -command compare \e {{3 apple} {0x2 carrot} {1 dingo} {2 banana}} {1 dingo} {2 banana} {0x2 carrot} {3 apple} .CE diff --git a/doc/msgcat.n b/doc/msgcat.n index a212b2f..17cffcb 100644 --- a/doc/msgcat.n +++ b/doc/msgcat.n @@ -212,7 +212,7 @@ For example, executing the code .CS \fB::msgcat::mcset\fR en hello "hello from ::" namespace eval foo { - \fB::msgcat::mcset\fR en hello "hello from ::foo" + \fB::msgcat::mcset\fR en hello "hello from ::foo" } puts [\fB::msgcat::mc\fR hello] namespace eval foo {puts [\fB::msgcat::mc\fR hello]} @@ -241,11 +241,11 @@ locale) the code \fB::msgcat::mcset\fR en m2 ":: message2" \fB::msgcat::mcset\fR en m3 ":: message3" namespace eval ::foo { - \fB::msgcat::mcset\fR en m2 "::foo message2" - \fB::msgcat::mcset\fR en m3 "::foo message3" + \fB::msgcat::mcset\fR en m2 "::foo message2" + \fB::msgcat::mcset\fR en m3 "::foo message3" } namespace eval ::foo::bar { - \fB::msgcat::mcset\fR en m3 "::foo::bar message3" + \fB::msgcat::mcset\fR en m3 "::foo::bar message3" } namespace import \fB::msgcat::mc\fR puts "[\fBmc\fR m1]; [\fBmc\fR m2]; [\fBmc\fR m3]" @@ -293,7 +293,7 @@ the package. For example, a short \fBes.msg\fR might contain: .PP .CS namespace eval ::mypackage { - \fB::msgcat::mcset\fR es "Free Beer!" "Cerveza Gracias!" + \fB::msgcat::mcset\fR es "Free Beer!" "Cerveza Gracias!" } .CE .SH "RECOMMENDED MESSAGE SETUP FOR PACKAGES" @@ -335,7 +335,16 @@ format "In location %2\e$s we produced %1\e$d units" $num $city .CE .PP Similarly, positional parameters can be used with \fBscan\fR to -extract values from internationalized strings. +extract values from internationalized strings. Note that it is not +necessary to pass the output of \fB::msgcat::mc\fR to \fBformat\fR +directly; by passing the values to substitute in as arguments, the +formatting substitution is done directly. +.PP +.CS +\fBmsgcat::mc\fR {Produced %1$d at %2$s} $num $city +# ... where that key is mapped to one of the +# human-oriented versions by \fBmsgcat::mcset\fR +.CE .SH CREDITS .PP The message catalog code was developed by Mark Harrison. diff --git a/doc/package.n b/doc/package.n index 913d3af..9e2cf75 100644 --- a/doc/package.n +++ b/doc/package.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: package.n,v 1.23 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: package.n,v 1.24 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH package n 7.5 Tcl "Tcl Built-In Commands" @@ -357,13 +357,16 @@ the functionality is not critical) do this: .PP .CS if {[catch {\fBpackage require\fR Snack}]} { - # Error thrown - package not found. - # Set up a dummy interface to work around the absence + # Error thrown - package not found. + # Set up a dummy interface to work around the absence } else { - # We have the package, configure the app to use it + # We have the package, configure the app to use it } .CE .SH "SEE ALSO" msgcat(n), packagens(n), pkgMkIndex(n) .SH KEYWORDS package, version +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/proc.n b/doc/proc.n index bed20a0..75cab29 100644 --- a/doc/proc.n +++ b/doc/proc.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: proc.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: proc.n,v 1.12 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH proc n "" Tcl "Tcl Built-In Commands" @@ -81,9 +81,9 @@ them out, one by one. .PP .CS \fBproc\fR printArguments args { - foreach arg $args { - puts $arg - } + foreach arg $args { + puts $arg + } } .CE .PP @@ -93,11 +93,14 @@ defaults to \fB2\fR: .PP .CS \fBproc\fR mult {varName {multiplier 2}} { - upvar 1 $varName var - set var [expr {$var * $multiplier}] + upvar 1 $varName var + set var [expr {$var * $multiplier}] } .CE .SH "SEE ALSO" info(n), unknown(n) .SH KEYWORDS argument, procedure +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/return.n b/doc/return.n index be1af76..4f77135 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.24 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: return.n,v 1.25 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -214,9 +214,9 @@ procedure, interrupting the procedure body. .PP .CS proc printOneLine {} { - puts "line 1" ;# This line will be printed. - \fBreturn\fR - puts "line 2" ;# This line will not be printed. + puts "line 1" ;# This line will be printed. + \fBreturn\fR + puts "line 2" ;# This line will not be printed. } .CE .PP @@ -233,25 +233,25 @@ to report invalid arguments. .PP .CS proc factorial {n} { - if {![string is integer $n] || ($n < 0)} { - \fBreturn\fR -code error \e - "expected non-negative integer,\e - but got \e"$n\e"" - } - if {$n < 2} { - \fBreturn\fR 1 - } - set m [expr {$n - 1}] - set code [catch {factorial $m} factor] - if {$code != 0} { - \fBreturn\fR -code $code $factor - } - set product [expr {$n * $factor}] - if {$product < 0} { - \fBreturn\fR -code error \e - "overflow computing factorial of $n" - } - \fBreturn\fR $product + if {![string is integer $n] || ($n < 0)} { + \fBreturn\fR -code error \e + "expected non-negative integer,\e + but got \e"$n\e"" + } + if {$n < 2} { + \fBreturn\fR 1 + } + set m [expr {$n - 1}] + set code [catch {factorial $m} factor] + if {$code != 0} { + \fBreturn\fR -code $code $factor + } + set product [expr {$n * $factor}] + if {$product < 0} { + \fBreturn\fR -code error \e + "overflow computing factorial of $n" + } + \fBreturn\fR $product } .CE .PP @@ -259,7 +259,7 @@ Next, a procedure replacement for \fBbreak\fR. .PP .CS proc myBreak {} { - \fBreturn\fR -code break + \fBreturn\fR -code break } .CE .PP @@ -275,13 +275,13 @@ re-raise a caught error: .PP .CS proc doSomething {} { - set resource [allocate] - catch { - # Long script of operations - # that might raise an error - } result options - deallocate $resource - \fBreturn\fR -options $options $result + set resource [allocate] + catch { + # Long script of operations + # that might raise an error + } result options + deallocate $resource + \fBreturn\fR -options $options $result } .CE .PP @@ -290,14 +290,14 @@ to create a procedure replacement for \fBreturn\fR itself: .PP .CS proc myReturn {args} { - set result "" - if {[llength $args] % 2} { - set result [lindex $args end] - set args [lrange $args 0 end-1] - } - set options [dict merge {-level 1} $args] - dict incr options -level - \fBreturn\fR -options $options $result + set result "" + if {[llength $args] % 2} { + set result [lindex $args end] + set args [lrange $args 0 end-1] + } + set options [dict merge {-level 1} $args] + dict incr options -level + \fBreturn\fR -options $options $result } .CE .SH "SEE ALSO" diff --git a/doc/scan.n b/doc/scan.n index 48b5df1..7f2eb65 100644 --- a/doc/scan.n +++ b/doc/scan.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scan.n,v 1.28 2009/02/24 21:04:58 dkf Exp $ +'\" RCS: @(#) $Id: scan.n,v 1.29 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH scan n 8.4 Tcl "Tcl Built-In Commands" @@ -235,11 +235,11 @@ care, we would use the \fB%i\fR conversion instead): .CS set string "08:08" ;# *Not* octal! if {[\fBscan\fR $string "%d:%d" hours minutes] != 2} { - error "not a valid time string" + error "not a valid time string" } # We have to understand numeric ranges ourselves... if {$minutes < 0 || $minutes > 59} { - error "invalid number of minutes" + error "invalid number of minutes" } .CE .PP @@ -251,8 +251,8 @@ leading whitespace correct): set string " a string {with braced words} + leading space " set words {} while {[\fBscan\fR $string %s%n word length] == 2} { - lappend words $word - set string [string range $string $length end] + lappend words $word + set string [string range $string $length end] } .CE .PP @@ -265,10 +265,10 @@ set string "(5.2,-4e-2)" # the scan pattern are significant, and that ")" is # the Unicode character \eu0029 if { - [\fBscan\fR $string " (%f ,%f %c" x y last] != 3 - || $last != 0x0029 + [\fBscan\fR $string " (%f ,%f %c" x y last] != 3 + || $last != 0x0029 } then { - error "invalid coordinate string" + error "invalid coordinate string" } puts "X=$x, Y=$y" .CE @@ -277,16 +277,19 @@ An interactive session demonstrating the truncation of integer values determined by size modifiers: .PP .CS -% set tcl_platform(wordSize) +\fI%\fR set tcl_platform(wordSize) 4 -% scan 20000000000000000000 %d +\fI%\fR scan 20000000000000000000 %d 2147483647 -% scan 20000000000000000000 %ld +\fI%\fR scan 20000000000000000000 %ld 9223372036854775807 -% scan 20000000000000000000 %lld +\fI%\fR scan 20000000000000000000 %lld 20000000000000000000 .CE .SH "SEE ALSO" format(n), sscanf(3) .SH KEYWORDS conversion specifier, parse, scan +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/socket.n b/doc/socket.n index 507fd6f..6fe5517 100644 --- a/doc/socket.n +++ b/doc/socket.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: socket.n,v 1.18 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: socket.n,v 1.19 2010/01/20 13:42:17 dkf Exp $ .so man.macros .TH socket n 8.0 Tcl "Tcl Built-In Commands" .BS @@ -165,9 +165,9 @@ Here is a very simple time server: .PP .CS proc Server {channel clientaddr clientport} { - puts "Connection from $clientaddr registered" - puts $channel [clock format [clock seconds]] - close $channel + puts "Connection from $clientaddr registered" + puts $channel [clock format [clock seconds]] + close $channel } \fBsocket\fR -server Server 9900 @@ -187,3 +187,6 @@ puts "The time on $server is $line" fconfigure(n), flush(n), open(n), read(n) .SH KEYWORDS asynchronous I/O, bind, channel, connection, domain name, host, network address, socket, tcp +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/source.n b/doc/source.n index 49ecbf7..d035f72 100644 --- a/doc/source.n +++ b/doc/source.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: source.n,v 1.20 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: source.n,v 1.21 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH source n "" Tcl "Tcl Built-In Commands" @@ -62,7 +62,7 @@ Alternatively: .PP .CS foreach scriptFile {foo.tcl bar.tcl} { - \fBsource\fR $scriptFile + \fBsource\fR $scriptFile } .CE .SH "SEE ALSO" diff --git a/doc/split.n b/doc/split.n index ef5470b..d68aaf3 100644 --- a/doc/split.n +++ b/doc/split.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: split.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: split.n,v 1.12 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH split n "" Tcl "Tcl Built-In Commands" @@ -77,16 +77,19 @@ set records [\fBsplit\fR $content "\en"] ## Iterate over the records foreach rec $records { - ## Split into fields on colons - set fields [\fBsplit\fR $rec ":"] + ## Split into fields on colons + set fields [\fBsplit\fR $rec ":"] - ## Assign fields to variables and print some out... - lassign $fields \e - userName password uid grp longName homeDir shell - puts "$longName uses [file tail $shell] for a login shell" + ## Assign fields to variables and print some out... + lassign $fields \e + userName password uid grp longName homeDir shell + puts "$longName uses [file tail $shell] for a login shell" } .CE .SH "SEE ALSO" join(n), list(n), string(n) .SH KEYWORDS list, split, string +'\" Local Variables: +'\" mode: nroff +'\" End: diff --git a/doc/switch.n b/doc/switch.n index 2f638de..ea83c0a 100644 --- a/doc/switch.n +++ b/doc/switch.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: switch.n,v 1.20 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: switch.n,v 1.21 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH switch n 8.5 Tcl "Tcl Built-In Commands" @@ -139,10 +139,10 @@ writing regular expressions with alternations, as can be seen here .PP .CS \fBswitch\fR \-glob aaab { - a*b \- - b {expr {1}} - a* {expr {2}} - default {expr {3}} + a*b \- + b {expr {1}} + a* {expr {2}} + default {expr {3}} } .CE .PP @@ -151,17 +151,17 @@ last) is taken. This example has a result of \fI3\fR: .PP .CS \fBswitch\fR xyz { - a \- - b { - # Correct Comment Placement - expr {1} - } - c { - expr {2} - } - default { - expr {3} - } + a \- + b { + # Correct Comment Placement + expr {1} + } + c { + expr {2} + } + default { + expr {3} + } } .CE .PP @@ -170,13 +170,13 @@ exactly matched is easily obtained using the \fB\-matchvar\fR option: .PP .CS \fBswitch\fR \-regexp \-matchvar foo \-\- $bar { - a(b*)c { - puts "Found [string length [lindex $foo 1]] 'b's" - } - d(e*)f(g*)h { - puts "Found [string length [lindex $foo 1]] 'e's and\e - [string length [lindex $foo 2]] 'g's" - } + a(b*)c { + puts "Found [string length [lindex $foo 1]] 'b's" + } + d(e*)f(g*)h { + puts "Found [string length [lindex $foo 1]] 'e's and\e + [string length [lindex $foo 2]] 'g's" + } } .CE .SH "SEE ALSO" diff --git a/doc/upvar.n b/doc/upvar.n index 08f053c..02a475d 100644 --- a/doc/upvar.n +++ b/doc/upvar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: upvar.n,v 1.20 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: upvar.n,v 1.21 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH upvar n "" Tcl "Tcl Built-In Commands" @@ -48,8 +48,8 @@ For example, consider the following procedure: .PP .CS proc \fIadd2\fR name { - \fBupvar\fR $name x - set x [expr {$x + 2}] + \fBupvar\fR $name x + set x [expr {$x + 2}] } .CE .PP @@ -90,11 +90,11 @@ rather than .PP .CS proc \fItraceproc\fR { name index op } { - puts $name + puts $name } proc \fIsetByUpvar\fR { name value } { - \fBupvar\fR $name localVar - set localVar $value + \fBupvar\fR $name localVar + set localVar $value } set originalVar 1 trace variable originalVar w \fItraceproc\fR diff --git a/doc/vwait.n b/doc/vwait.n index 9cd95cb..d3c62ae 100644 --- a/doc/vwait.n +++ b/doc/vwait.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: vwait.n,v 1.13 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: vwait.n,v 1.14 2010/01/20 13:42:17 dkf Exp $ '\" .so man.macros .TH vwait n 8.0 Tcl "Tcl Built-In Commands" @@ -63,9 +63,9 @@ close the socket and continue running the script: after 5000 set state timeout set server [socket -server accept 12345] proc accept {args} { - global state connectionInfo - set state accepted - set connectionInfo $args + global state connectionInfo + set state accepted + set connectionInfo $args } # Wait for something to happen @@ -77,13 +77,13 @@ after cancel set state timeout # Do something based on how the vwait finished... switch $state { - timeout { - puts "no connection on port 12345" - } - accepted { - puts "connection: $connectionInfo" - puts [lindex $connectionInfo 0] "Hello there!" - } + timeout { + puts "no connection on port 12345" + } + accepted { + puts "connection: $connectionInfo" + puts [lindex $connectionInfo 0] "Hello there!" + } } .CE .PP @@ -92,16 +92,16 @@ variable to be set. Includes an interlock to prevent nested waits. .PP .CS namespace eval example { - variable v done - proc wait {delay} { - variable v - if {$v ne "waiting"} { - set v waiting - after $delay [namespace code {set v done}] - \fBvwait\fR [namespace which -variable v] - } - return $v - } + variable v done + proc wait {delay} { + variable v + if {$v ne "waiting"} { + set v waiting + after $delay [namespace code {set v done}] + \fBvwait\fR [namespace which -variable v] + } + return $v + } } .CE .PP @@ -111,20 +111,20 @@ is set, or at an idle moment after that. .PP .CS coroutine task apply {{} { - # simulate [after 1000] - after 1000 [info coroutine] - yield + # simulate [after 1000] + after 1000 [info coroutine] + yield - # schedule the setting of a global variable, as normal - after 2000 {set var 1} + # schedule the setting of a global variable, as normal + after 2000 {set var 1} - # simulate [\fBvwait\fR var] - proc updatedVar {task args} { - after idle $task - trace remove variable ::var write "updatedVar $task" - } - trace add variable ::var write "updatedVar [info coroutine]" - yield + # simulate [\fBvwait\fR var] + proc updatedVar {task args} { + after idle $task + trace remove variable ::var write "updatedVar $task" + } + trace add variable ::var write "updatedVar [info coroutine]" + yield }} .CE .SS "NESTED VWAITS BY EXAMPLE" @@ -138,13 +138,13 @@ outer \fBvwait\fR was waiting for (the setting of \fIa\fR) has occurred. .PP .CS after 500 { - puts "waiting for b" - \fBvwait\fR b - puts "b was set" + puts "waiting for b" + \fBvwait\fR b + puts "b was set" } after 1000 { - puts "setting a" - set a 10 + puts "setting a" + set a 10 } puts "waiting for a" \fBvwait\fR a @@ -173,25 +173,26 @@ implicit. The first of these options would be written as: .PP .CS after 500 { - puts "waiting for b" - trace add variable b write {apply {args { - global a b - trace remove variable ::b write [lrange [info level 0] 0 1] - puts "b was set" - set ::done ok - }}} + puts "waiting for b" + trace add variable b write {apply {args { + global a b + trace remove variable ::b write \e + [lrange [info level 0] 0 1] + puts "b was set" + set ::done ok + }}} } after 1000 { - puts "setting a" - set a 10 + puts "setting a" + set a 10 } puts "waiting for a" trace add variable a write {apply {args { - global a b - trace remove variable a write [lrange [info level 0] 0 1] - puts "a was set" - puts "setting b" - set b 42 + global a b + trace remove variable a write [lrange [info level 0] 0 1] + puts "a was set" + puts "setting b" + set b 42 }}} \fBvwait\fR done .CE @@ -202,37 +203,38 @@ like this: .CS # A coroutine-based wait-for-variable command proc waitvar globalVar { - trace add variable ::$globalVar write \e - [list apply {{v c args} { - trace remove variable $v write [lrange [info level 0] 0 3] - after 0 $c - }} ::$globalVar [info coroutine]] - yield + trace add variable ::$globalVar write \e + [list apply {{v c args} { + trace remove variable $v write \e + [lrange [info level 0] 0 3] + after 0 $c + }} ::$globalVar [info coroutine]] + yield } # A coroutine-based wait-for-some-time command proc waittime ms { - after $ms [info coroutine] - yield + after $ms [info coroutine] + yield } coroutine task-1 eval { - puts "waiting for a" - waitvar a - puts "a was set" - puts "setting b" - set b 42 + puts "waiting for a" + waitvar a + puts "a was set" + puts "setting b" + set b 42 } coroutine task-2 eval { - waittime 500 - puts "waiting for b" - waitvar b - puts "b was set" - set done ok + waittime 500 + puts "waiting for b" + waitvar b + puts "b was set" + set done ok } coroutine task-3 eval { - waittime 1000 - puts "setting a" - set a 10 + waittime 1000 + puts "setting a" + set a 10 } \fBvwait\fR done .CE -- cgit v0.12 From 81ddbd4ea03baa8e607252b67b96e72038fd5c57 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 21 Jan 2010 17:23:49 +0000 Subject: * generic/tclCompile.h: NRE-enable direct eval on BC spoilage * generic/tclExecute.c: [Bug 2910748] * tests/nre.test: --- ChangeLog | 6 ++++++ generic/tclCompile.h | 4 +++- generic/tclExecute.c | 46 ++++++++++++++++++++++------------------------ tests/nre.test | 24 +++++++++++++++++++++++- 4 files changed, 54 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index b846268..d6e1915 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-21 Miguel Sofer + + * generic/tclCompile.h: NRE-enable direct eval on BC spoilage + * generic/tclExecute.c: [Bug 2910748] + * tests/nre.test: + 2010-01-19 Donal K. Fellows * doc/dict.n: [Bug 2929546]: Clarify just what [dict with] and [dict diff --git a/generic/tclCompile.h b/generic/tclCompile.h index a41e094..3c514d0 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.120 2010/01/03 20:29:11 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.121 2010/01/21 17:23:49 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -343,6 +343,8 @@ typedef struct CompileEnv { #define TCL_BYTECODE_RESOLVE_VARS 0x0002 +#define TCL_BYTECODE_RECOMPILE 0x0004 + typedef struct ByteCode { TclHandle interpHandle; /* Handle for interpreter containing the * compiled code. Commands and their compile diff --git a/generic/tclExecute.c b/generic/tclExecute.c index e553356..ffb8242 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.468 2009/12/13 17:11:47 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.469 2010/01/21 17:23:49 msofer Exp $ */ #include "tclInt.h" @@ -2353,32 +2353,25 @@ TclExecuteByteCode( } else { const char *bytes; int length = 0, opnd; - Tcl_Obj *newObjResultPtr; - - bytes = GetSrcInfoForPc(pc, codePtr, &length); - DECACHE_STACK_INFO(); - TRESULT = Tcl_EvalEx(interp, bytes, length, 0); - CACHE_STACK_INFO(); - if (TRESULT != TCL_OK) { - cleanup = 0; - if (TRESULT == TCL_ERROR) { - /* - * Tcl_EvalEx already did the task of logging the error to - * the stack trace for us, so set a flag to prevent the - * TEBC exception handling machinery from trying to do it - * again. See test execute-8.4. [Bug 2037338] - */ + + /* + * We used to switch to direct eval; for NRE-awareness we now + * compile and eval the command so that this evaluation does not + * add a new TEBC instance [Bug 2910748] + */ + - iPtr->flags |= ERR_ALREADY_LOGGED; - } - goto processExceptionReturn; + if (TclInterpReady(interp) == TCL_ERROR) { + TRESULT = TCL_ERROR; + goto checkForCatch; } + + codePtr->flags |= TCL_BYTECODE_RECOMPILE; + bytes = GetSrcInfoForPc(pc, codePtr, &length); opnd = TclGetUInt4AtPtr(pc+1); - objResultPtr = Tcl_GetObjResult(interp); - TclNewObj(newObjResultPtr); - Tcl_IncrRefCount(newObjResultPtr); - iPtr->objResultPtr = newObjResultPtr; - NEXT_INST_F(opnd, 0, -1); + pc += (opnd-1); + PUSH_OBJECT(Tcl_NewStringObj(bytes, length)); + goto instEvalStk; } case INST_NOP: @@ -2675,6 +2668,7 @@ TclExecuteByteCode( int objc, pcAdjustment; Tcl_Obj **objv; + instEvalStk: case INST_EVAL_STK: { /* * Moved here to support transforming the eval of objects to a @@ -2915,6 +2909,10 @@ TclExecuteByteCode( nonRecursiveCallReturn: + if (codePtr->flags & TCL_BYTECODE_RECOMPILE) { + iPtr->flags |= ERR_ALREADY_LOGGED; + codePtr->flags &= ~TCL_BYTECODE_RECOMPILE; + } NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); iPtr->cmdFramePtr = bcFramePtr->nextPtr; TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); diff --git a/tests/nre.test b/tests/nre.test index 2c91e7a..dcc2180 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: nre.test,v 1.11 2009/06/25 19:24:16 dgp Exp $ +# RCS: @(#) $Id: nre.test,v 1.12 2010/01/21 17:23:49 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -280,6 +280,28 @@ test nre-7.7 {[eval] is not recursive} -setup { testnrelevels } -result {{0 2 2 1} 0} +test nre-7.8 {bug #2910748: switch out of stale BC is not nre-aware} -setup { + proc foo args {} + foo + coroutine bar apply {{} { + yield + proc foo args {return ok} + while 1 { + yield [incr i] + foo + } + }} +} -body { + # if switching to plain eval is not nre aware, this will cause a "cannot + # yield" error + + list [bar] [bar] [bar] +} -cleanup { + rename bar {} + rename foo {} +} -result {1 2 3} + + test nre-8.1 {nre and {*}} -body { # force an expansion that grows the evaluation stack, check that nre # adapts the bottomPtr. This crashes on failure. -- cgit v0.12 From cc52b4d3c7d8a2d088216976f32ca253b404c75d Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 22 Jan 2010 10:22:50 +0000 Subject: Improve error code generation from some of the tailcall-related bits of TEBC. --- ChangeLog | 5 +++++ generic/tclExecute.c | 61 ++++++++++++++++++++++++++------------------------ tests/tailcall.test | 63 ++++++++++++++++++++++++++++++++++------------------ 3 files changed, 79 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6e1915..e6f0021 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-22 Donal K. Fellows + + * generic/tclExecute.c (TclExecuteByteCode): Improve error code + generation from some of the tailcall-related bits of TEBC. + 2010-01-21 Miguel Sofer * generic/tclCompile.h: NRE-enable direct eval on BC spoilage diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ffb8242..812e68b 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.469 2010/01/21 17:23:49 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.470 2010/01/22 10:22:51 dkf Exp $ */ #include "tclInt.h" @@ -1988,7 +1988,7 @@ TclExecuteByteCode( corPtr->base.cmdFramePtr->nextPtr = corPtr->caller.cmdFramePtr; corPtr->stackLevel = &TAUX; *corPtr->callerBPPtr = OBP; - OBP = iPtr->execEnvPtr->bottomPtr; + OBP = iPtr->execEnvPtr->bottomPtr; goto returnToCaller; } @@ -2022,7 +2022,7 @@ TclExecuteByteCode( /* * TIP #280: Initialize the frame. Do not push it yet: it will be pushed - * every time that we call out from this BP, popped when we return to it. + * every time that we call out from this BP, popped when we return to it. */ bcFramePtr->type = ((codePtr->flags & TCL_BYTECODE_PRECOMPILED) @@ -2049,7 +2049,7 @@ TclExecuteByteCode( * - set the running level for the coroutine * - insure that the coro runs in #0 */ - + corPtr->base.cmdFramePtr = bcFramePtr; corPtr->callerBPPtr = &BP->prevBottomPtr; corPtr->stackLevel = &TAUX; @@ -2141,7 +2141,7 @@ TclExecuteByteCode( break; } } - cleanup0: + cleanup0: #ifdef TCL_COMPILE_DEBUG /* @@ -2353,19 +2353,18 @@ TclExecuteByteCode( } else { const char *bytes; int length = 0, opnd; - + /* * We used to switch to direct eval; for NRE-awareness we now * compile and eval the command so that this evaluation does not - * add a new TEBC instance [Bug 2910748] + * add a new TEBC instance. [Bug 2910748] */ - if (TclInterpReady(interp) == TCL_ERROR) { TRESULT = TCL_ERROR; goto checkForCatch; } - + codePtr->flags |= TCL_BYTECODE_RECOMPILE; bytes = GetSrcInfoForPc(pc, codePtr, &length); opnd = TclGetUInt4AtPtr(pc+1); @@ -2819,7 +2818,7 @@ TclExecuteByteCode( ClientData param = callbackPtr->data[1]; pcAdjustment = 0; /* silence warning */ - + NRE_ASSERT(callbackPtr != BP->rootPtr); NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); @@ -2837,7 +2836,7 @@ TclExecuteByteCode( goto resumeCoroutine; } break; - case TCL_NR_TAILCALL_TYPE: + case TCL_NR_TAILCALL_TYPE: /* * A request to perform a tailcall: just drop this * bytecode. */ @@ -2854,7 +2853,7 @@ TclExecuteByteCode( iPtr->varFramePtr->tailcallPtr = NULL; TRESULT = TCL_ERROR; Tcl_SetResult(interp, - "Tailcall called from within a catch environment", + "tailcall called from within a catch environment", TCL_STATIC); Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); @@ -2884,17 +2883,18 @@ TclExecuteByteCode( if (corPtr->stackLevel != &TAUX) { Tcl_SetResult(interp, "cannot yield: C stack busy", TCL_STATIC); - Tcl_SetErrorCode(interp, "COROUTINE_CANT_YIELD", NULL); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", + "CANT_YIELD", NULL); TRESULT = TCL_ERROR; pc--; goto checkForCatch; } - + /* * Mark suspended, save our state and return */ - - corPtr->stackLevel = NULL; + + corPtr->stackLevel = NULL; iPtr->execEnvPtr = corPtr->callerEEPtr; OBP = *corPtr->callerBPPtr; goto returnToCaller; @@ -2904,7 +2904,7 @@ TclExecuteByteCode( } } } - + pc += pcAdjustment; nonRecursiveCallReturn: @@ -2926,8 +2926,11 @@ TclExecuteByteCode( TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); iPtr->varFramePtr->tailcallPtr = NULL; TRESULT = TCL_ERROR; - Tcl_SetResult(interp,"Tailcall called from within a catch environment", + Tcl_SetResult(interp, + "tailcall called from within a catch environment", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", + NULL); pc--; goto checkForCatch; } @@ -6216,7 +6219,7 @@ TclExecuteByteCode( * We refuse to accept exponent arguments that exceed one mp_digit * which means the max exponent value is 2**28-1 = 0x0fffffff = * 268435455, which fits into a signed 32 bit int which is within - * the range of the long int type. This means any numeric Tcl_Obj + * the range of the long int type. This means any numeric Tcl_Obj * value not using TCL_NUMBER_LONG type must hold a value larger * than we accept. */ @@ -7806,7 +7809,7 @@ TclExecuteByteCode( * and return the "exception" code. */ - checkForCatch: + checkForCatch: if (iPtr->execEnvPtr->rewind) { goto abnormalReturn; } @@ -7970,11 +7973,11 @@ TclExecuteByteCode( } /* - * Store the previous bottomPtr for returning to it, then free all resources - * used by this bytecode and process callbacks until you return to the - * previous bytecode (if any). + * Store the previous bottomPtr for returning to it, then free all + * resources used by this bytecode and process callbacks until you return + * to the previous bytecode (if any). */ - + OBP = BP->prevBottomPtr; iPtr->cmdFramePtr = bcFramePtr->nextPtr; TclStackFree(interp, BP); /* free my stack */ @@ -7983,7 +7986,7 @@ TclExecuteByteCode( TclCleanupByteCode(codePtr); } - returnToCaller: + returnToCaller: if (OBP) { BP = OBP; /* back to old bc */ rerunCallbacks: @@ -7993,11 +7996,11 @@ TclExecuteByteCode( if (TOP_CB(interp) == BP->rootPtr) { /* * The bytecode is returning, all callbacks were run: keep - * processing the caller. + * processing the caller. */ goto nonRecursiveCallReturn; - } else { + } else { TEOV_callback *callbackPtr = TOP_CB(iPtr); int type = PTR2INT(callbackPtr->data[0]); @@ -8017,8 +8020,8 @@ TclExecuteByteCode( TCLNR_FREE(interp, callbackPtr); Tcl_SetResult(interp, - "atProcExit/tailcall cannot be invoked recursively", - TCL_STATIC); + "tailcall cannot be invoked recursively", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "REENTRY", NULL); TRESULT = TCL_ERROR; goto rerunCallbacks; default: diff --git a/tests/tailcall.test b/tests/tailcall.test index ff9b97c..b8a3210 100644 --- a/tests/tailcall.test +++ b/tests/tailcall.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tailcall.test,v 1.11 2009/12/05 22:05:30 msofer Exp $ +# RCS: @(#) $Id: tailcall.test,v 1.12 2010/01/22 10:22:51 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -45,6 +45,10 @@ if {[testConstraint testnrelevels]} { namespace import testnre::* } +proc errorcode options { + dict get [dict merge {-errorcode NONE} $options] -errorcode +} + test tailcall-0.1 {tailcall is constant space} -constraints testnrelevels -setup { proc a i { # @@ -541,25 +545,17 @@ test tailcall-12.2 {[Bug 2649975]} -setup { 1: exiting from foo's alpha } -test tailcall-12.3a {[Bug 2695587]} -setup { - proc a {} { - list [catch [list tailcall foo] msg] $msg - } -} -body { - a -} -cleanup { - rename a {} -} -result {1 {Tailcall called from within a catch environment}} +test tailcall-12.3a {[Bug 2695587]} { + apply {{} { + list [catch [list tailcall foo] msg opt] $msg [errorcode $opt] + }} +} {1 {tailcall called from within a catch environment} {TCL TAILCALL ILLEGAL}} -test tailcall-12.3b {[Bug 2695587]} -setup { - proc a {} { - list [catch {tailcall foo} msg] $msg - } -} -body { - a -} -cleanup { - rename a {} -} -result {1 {Tailcall called from within a catch environment}} +test tailcall-12.3b {[Bug 2695587]} { + apply {{} { + list [catch {tailcall foo} msg opt] $msg [errorcode $opt] + }} +} {1 {tailcall called from within a catch environment} {TCL TAILCALL ILLEGAL}} test tailcall-13.1 {tailcall and coroutine} -setup { set lambda {i { @@ -576,9 +572,30 @@ test tailcall-13.1 {tailcall and coroutine} -setup { } -cleanup { unset lambda } -result {0 0 0 0 0 0} - - +test tailcall-14.1 {directly tailcalling the tailcall command is an error} { + list [catch { + apply {{} { + apply {{} { + tailcall tailcall subst a + subst b + }} + subst c + }} + } msg opt] $msg [errorcode $opt] +} {1 {tailcall cannot be invoked recursively} {TCL TAILCALL REENTRY}} +test tailcall-14.2 {indirectly tailcalling the tailcall command is ok} { + list [catch { + apply {{} { + apply {{} { + tailcall eval tailcall subst ok + subst b + }} + subst c + }} + } msg opt] $msg [errorcode $opt] +} {0 ok NONE} + if {[testConstraint testnrelevels]} { namespace forget testnre::* namespace delete testnre @@ -586,3 +603,7 @@ if {[testConstraint testnrelevels]} { # cleanup ::tcltest::cleanupTests + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 054ab462a502b5dd37f904ad14e46190554dd8ba Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 22 Jan 2010 13:02:50 +0000 Subject: Revert [2009-12-21] change in tcl.h, in stead resolve the CYGWIN inclusion problems by re-arranging the inclusions at other places. Make cygwin configuration error into a warning: CYGWIN compilation works although there still are test failures. --- ChangeLog | 13 +++++ generic/tcl.h | 16 +++--- generic/tclInt.decls | 12 ++--- generic/tclIntPlatDecls.h | 14 ++--- generic/tclPort.h | 14 ++--- win/configure | 135 +++++++++++++++++++++++----------------------- win/configure.in | 20 +------ win/tcl.m4 | 16 ++++++ win/tclWinError.c | 6 +-- win/tclWinPipe.c | 6 +-- win/tclWinPort.h | 4 +- 11 files changed, 131 insertions(+), 125 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6f0021..79e9ff4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2010-01-22 Jan Nijtmans + + * generic/tclInt.decls Don't use DWORD and HANDLE here + * generic/tclIntPlatDecls.h + * generic/tcl.h Revert [2009-12-21] change, in stead + * generic/tclPort.h resolve the CYGWIN inclusion problems by + * win/tclWinPort.h re-arranging the inclusions at other places. + * win/tclWinError.c + * win/tclWinPipe.c + * win/tcl.m4 Make cygwin configuration error into + * win/configure.in a warning: CYGWIN compilation works + * win/configure although there still are test failures. + 2010-01-22 Donal K. Fellows * generic/tclExecute.c (TclExecuteByteCode): Improve error code diff --git a/generic/tcl.h b/generic/tcl.h index fb8a27b..bcf0251 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.296 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.297 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCL @@ -128,12 +128,6 @@ extern "C" { #define TCL_DECLARE_MUTEX(name) #endif -#if defined(__CYGWIN__) && defined(__WIN32__) -/* Cygwin/win32 needs winsock2.h to be included BEFORE stdio.h, - * otherwise there will be symbol conflicts with sys/types.h! */ -# include -#endif - /* * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and * SEEK_END, all #define'd by stdio.h . @@ -144,7 +138,13 @@ extern "C" { * prior Tcl releases. */ -#include +#if 1 +# ifndef NULL +# define NULL ((void *) 0) +# endif +#else +# include +#endif /* * Support for functions with a variable number of arguments. diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 2d0e460..478c719 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.141 2009/12/16 23:26:01 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.142 2010/01/22 13:02:50 nijtmans Exp $ library tcl @@ -876,7 +876,7 @@ declare 216 generic { } declare 217 generic { int TclPushStackFrame(Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr, - Tcl_Namespace *namespacePtr, int isProcCallFrame ) + Tcl_Namespace *namespacePtr, int isProcCallFrame) } declare 218 generic { void TclPopStackFrame(Tcl_Interp *interp) @@ -1002,10 +1002,10 @@ interface tclIntPlat # Windows specific functions declare 0 win { - void TclWinConvertError(DWORD errCode) + void TclWinConvertError(unsigned long errCode) } declare 1 win { - void TclWinConvertWSAError(DWORD errCode) + void TclWinConvertWSAError(unsigned long errCode) } declare 2 win { struct servent *TclWinGetServByName(const char *nm, @@ -1074,7 +1074,7 @@ declare 19 win { TclFile TclpOpenFile(const char *fname, int mode) } declare 20 win { - void TclWinAddProcess(HANDLE hProcess, DWORD id) + void TclWinAddProcess(void *hProcess, unsigned long id) } # removed permanently for 8.4 @@ -1112,7 +1112,7 @@ declare 28 win { void TclWinResetInterfaces(void) } declare 29 win { - int TclWinCPUID( unsigned int index, unsigned int *regs ) + int TclWinCPUID(unsigned int index, unsigned int *regs) } ################################ diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index b3a55ac..620a73d 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.39 2009/04/10 18:02:36 das Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.40 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCLINTPLATDECLS @@ -124,12 +124,12 @@ EXTERN int TclUnixCopyFile (const char * src, const char * dst, #ifndef TclWinConvertError_TCL_DECLARED #define TclWinConvertError_TCL_DECLARED /* 0 */ -EXTERN void TclWinConvertError (DWORD errCode); +EXTERN void TclWinConvertError (unsigned long errCode); #endif #ifndef TclWinConvertWSAError_TCL_DECLARED #define TclWinConvertWSAError_TCL_DECLARED /* 1 */ -EXTERN void TclWinConvertWSAError (DWORD errCode); +EXTERN void TclWinConvertWSAError (unsigned long errCode); #endif #ifndef TclWinGetServByName_TCL_DECLARED #define TclWinGetServByName_TCL_DECLARED @@ -218,7 +218,7 @@ EXTERN TclFile TclpOpenFile (const char * fname, int mode); #ifndef TclWinAddProcess_TCL_DECLARED #define TclWinAddProcess_TCL_DECLARED /* 20 */ -EXTERN void TclWinAddProcess (HANDLE hProcess, DWORD id); +EXTERN void TclWinAddProcess (void * hProcess, unsigned long id); #endif /* Slot 21 is reserved */ #ifndef TclpCreateTempFile_TCL_DECLARED @@ -398,8 +398,8 @@ typedef struct TclIntPlatStubs { int (*tclUnixCopyFile) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ - void (*tclWinConvertError) (DWORD errCode); /* 0 */ - void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ + void (*tclWinConvertError) (unsigned long errCode); /* 0 */ + void (*tclWinConvertWSAError) (unsigned long errCode); /* 1 */ struct servent * (*tclWinGetServByName) (const char * nm, const char * proto); /* 2 */ int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ @@ -418,7 +418,7 @@ typedef struct TclIntPlatStubs { void *reserved17; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ TclFile (*tclpOpenFile) (const char * fname, int mode); /* 19 */ - void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */ + void (*tclWinAddProcess) (void * hProcess, unsigned long id); /* 20 */ void *reserved21; TclFile (*tclpCreateTempFile) (const char * contents); /* 22 */ char * (*tclpGetTZName) (int isdst); /* 23 */ diff --git a/generic/tclPort.h b/generic/tclPort.h index 0b4eda9..e9d6046 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPort.h,v 1.17 2009/12/21 23:25:39 nijtmans Exp $ + * RCS: @(#) $Id: tclPort.h,v 1.18 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCLPORT @@ -19,11 +19,11 @@ #ifdef HAVE_TCL_CONFIG_H #include "tclConfig.h" #endif -#include "tcl.h" - -#if defined(__WIN32__) +#if defined(_WIN32) # include "tclWinPort.h" -#else +#endif +#include "tcl.h" +#if !defined(_WIN32) # include "tclUnixPort.h" #endif @@ -33,8 +33,8 @@ /* On Cygwin, the environment is imported from the Cygwin DLL. */ DLLIMPORT extern char **__cygwin_environ; DLLIMPORT extern int cygwin_conv_to_win32_path(const char *, char *); -# define environ __cygwin_environ -# define timezone _timezone +# define environ __cygwin_environ +# define timezone _timezone #endif #if !defined(LLONG_MIN) diff --git a/win/configure b/win/configure index ee83212..12fadb8 100755 --- a/win/configure +++ b/win/configure @@ -2938,75 +2938,6 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 -echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 -if test "${ac_cv_cygwin+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef __CYGWIN__ -#error cygwin -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_cygwin=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_cygwin=yes -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 -echo "${ECHO_T}$ac_cv_cygwin" >&6 -if test "$ac_cv_cygwin" = "yes" ; then - { { echo "$as_me:$LINENO: error: Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw." >&5 -echo "$as_me: error: Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw." >&2;} - { (exit 1); exit 1; }; } -fi - - echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6 if test "${tcl_cv_seh+set}" = set; then @@ -3892,6 +3823,72 @@ echo "${ECHO_T}yes" >&6 cyg_conftest= fi + echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 +echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 +if test "${ac_cv_cygwin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef __CYGWIN__ + #error cygwin + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cygwin=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_cygwin=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 +echo "${ECHO_T}$ac_cv_cygwin" >&6 + if test "$ac_cv_cygwin" = "yes" ; then + { echo "$as_me:$LINENO: WARNING: Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw." >&5 +echo "$as_me: WARNING: Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw." >&2;} + fi if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then DEPARG='"$<"' else diff --git a/win/configure.in b/win/configure.in index f8d54ce..7995106 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.119 2009/11/23 20:17:36 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.120 2010/01/22 13:02:50 nijtmans Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -101,24 +101,6 @@ dnl under autoconf 2.5X. dnl dnl AC_CYGWIN -AC_CACHE_CHECK(for Cygwin version of gcc, - ac_cv_cygwin, -AC_TRY_COMPILE([ -#ifdef __CYGWIN__ -#error cygwin -#endif -], -[], - ac_cv_cygwin=no, - ac_cv_cygwin=yes) -) -if test "$ac_cv_cygwin" = "yes" ; then - AC_MSG_ERROR([Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw.]) -fi - - AC_CACHE_CHECK(for SEH support in compiler, tcl_cv_seh, AC_TRY_RUN([ diff --git a/win/tcl.m4 b/win/tcl.m4 index dbd89d3..39e4fe1 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -432,6 +432,22 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ cyg_conftest= fi + AC_CACHE_CHECK(for Cygwin version of gcc, + ac_cv_cygwin, + AC_TRY_COMPILE([ + #ifdef __CYGWIN__ + #error cygwin + #endif + ], + [], + ac_cv_cygwin=no, + ac_cv_cygwin=yes) + ) + if test "$ac_cv_cygwin" = "yes" ; then + AC_MSG_WARN([Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw.]) + fi if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then DEPARG='"$<"' else diff --git a/win/tclWinError.c b/win/tclWinError.c index 05661a2..c71f535 100644 --- a/win/tclWinError.c +++ b/win/tclWinError.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinError.c,v 1.7 2005/11/04 00:06:50 dkf Exp $ + * RCS: @(#) $Id: tclWinError.c,v 1.8 2010/01/22 13:02:50 nijtmans Exp $ */ #include "tclInt.h" @@ -354,7 +354,7 @@ static int wsaErrorTable[] = { void TclWinConvertError( - DWORD errCode) /* Win32 error code. */ + unsigned long errCode) /* Win32 error code. */ { if (errCode >= tableLen) { Tcl_SetErrno(EINVAL); @@ -381,7 +381,7 @@ TclWinConvertError( void TclWinConvertWSAError( - DWORD errCode) /* Win32 error code. */ + unsigned long errCode) /* Win32 error code. */ { if ((errCode >= WSAEWOULDBLOCK) && (errCode <= WSAEREMOTE)) { Tcl_SetErrno(wsaErrorTable[errCode - WSAEWOULDBLOCK]); diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 8357637..fda862e 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.73 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.74 2010/01/22 13:02:50 nijtmans Exp $ */ #include "tclWinInt.h" @@ -2686,8 +2686,8 @@ Tcl_WaitPid( void TclWinAddProcess( - HANDLE hProcess, /* Handle to process */ - DWORD id) /* Global process identifier */ + void *hProcess, /* Handle to process */ + unsigned long id) /* Global process identifier */ { ProcInfo *procPtr = (ProcInfo *) ckalloc(sizeof(ProcInfo)); diff --git a/win/tclWinPort.h b/win/tclWinPort.h index c7e343f..df76d46 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.53 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.54 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -402,8 +402,6 @@ #ifdef __CYGWIN__ /* On Cygwin, the environment is imported from the Cygwin DLL. */ - DLLIMPORT extern char **__cygwin_environ; -# define environ __cygwin_environ # define putenv TclCygwinPutenv # define timezone _timezone #endif /* __CYGWIN__ */ -- cgit v0.12 From 8af9602bdce0f0cca4eddf33487c19679f894d6c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 22 Jan 2010 13:05:17 +0000 Subject: Revert [2009-12-21] change in tcl.h, in stead resolve the CYGWIN inclusion problems by re-arranging the inclusions at other places. Make cygwin configuration error into a warning: CYGWIN compilation works although there still are test failures. --- generic/tcl.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index bcf0251..201a3a1 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.297 2010/01/22 13:02:50 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.298 2010/01/22 13:05:17 nijtmans Exp $ */ #ifndef _TCL @@ -138,13 +138,7 @@ extern "C" { * prior Tcl releases. */ -#if 1 -# ifndef NULL -# define NULL ((void *) 0) -# endif -#else -# include -#endif +#include /* * Support for functions with a variable number of arguments. -- cgit v0.12 From 6b06529a1e43e93c1b2d150ef84a2c521b97255d Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 22 Jan 2010 23:38:21 +0000 Subject: [Bug 1970629]: Define a bit better what the current namespace of a procedure is --- ChangeLog | 22 ++++++++++++++-------- doc/proc.n | 8 +++++++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79e9ff4..b35dc5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,21 @@ +2010-01-22 Donal K. Fellows + + * doc/proc.n: [Bug 1970629]: Define a bit better what the current + namespace of a procedure is. + 2010-01-22 Jan Nijtmans - * generic/tclInt.decls Don't use DWORD and HANDLE here - * generic/tclIntPlatDecls.h - * generic/tcl.h Revert [2009-12-21] change, in stead - * generic/tclPort.h resolve the CYGWIN inclusion problems by - * win/tclWinPort.h re-arranging the inclusions at other places. + * generic/tclInt.decls: Don't use DWORD and HANDLE here. + * generic/tclIntPlatDecls.h: + * generic/tcl.h: Revert [2009-12-21] change, instead + * generic/tclPort.h: resolve the CYGWIN inclusion problems by + * win/tclWinPort.h: re-arranging the inclusions at other + places. * win/tclWinError.c * win/tclWinPipe.c - * win/tcl.m4 Make cygwin configuration error into - * win/configure.in a warning: CYGWIN compilation works - * win/configure although there still are test failures. + * win/tcl.m4 Make cygwin configuration error into + * win/configure.in a warning: CYGWIN compilation works + * win/configure although there still are test failures. 2010-01-22 Donal K. Fellows diff --git a/doc/proc.n b/doc/proc.n index 75cab29..a6432e7 100644 --- a/doc/proc.n +++ b/doc/proc.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: proc.n,v 1.12 2010/01/20 13:42:17 dkf Exp $ +'\" RCS: @(#) $Id: proc.n,v 1.13 2010/01/22 23:38:21 dkf Exp $ '\" .so man.macros .TH proc n "" Tcl "Tcl Built-In Commands" @@ -66,6 +66,12 @@ deleted when the procedure returns. One local variable is automatically created for each of the procedure's arguments. Other variables can only be accessed by invoking one of the \fBglobal\fR, \fBvariable\fR, \fBupvar\fR or \fBnamespace upvar\fR commands. +The current namespace when \fIbody\fR is executed will be the +namespace that the procedure's name exists in, which will be the +namespace that itwas created in unless it has been changed with +\fBrename\fR. +'\" We may change this! It makes [variable] unstable when renamed and is +'\" frankly pretty crazy, but doing it right is harder than it looks. .PP The \fBproc\fR command returns an empty string. When a procedure is invoked, the procedure's return value is the value specified in a -- cgit v0.12 From 3ec5feb3637f136b6c659eb42c52100c41f2e8ca Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 25 Jan 2010 20:26:18 +0000 Subject: Remove double includes (which causes a warning in CYGWIN compiles) Add confdefs.h to unix/.cvsignore --- ChangeLog | 6 ++++++ generic/tclOOStubInit.c | 3 +-- generic/tclOOStubLib.c | 4 +--- unix/.cvsignore | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b35dc5d..86c49d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-25 Jan Nijtmans + + * generic/tclOOStubInit.c Remove double includes (which causes a + * generic/tclOOStubLib.c warning in CYGWIN compiles) + * unix/.cvsignore add confdefs.h + 2010-01-22 Donal K. Fellows * doc/proc.n: [Bug 1970629]: Define a bit better what the current diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index 4ec3992..3039aa2 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubInit.c,v 1.7 2009/07/19 11:46:53 dkf Exp $ + * $Id: tclOOStubInit.c,v 1.8 2010/01/25 20:26:18 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. * It is compiled and linked in with the tclOO package proper. @@ -8,7 +8,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "tclOO.h" #include "tclOOInt.h" /* !BEGIN!: Do not edit below this line. */ diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c index 0414ae4..5a8c743 100644 --- a/generic/tclOOStubLib.c +++ b/generic/tclOOStubLib.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubLib.c,v 1.4 2008/06/12 06:29:18 das Exp $ + * $Id: tclOOStubLib.c,v 1.5 2010/01/25 20:26:18 nijtmans Exp $ * ORIGINAL SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ @@ -14,10 +14,8 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "tcl.h" #define USE_TCLOO_STUBS 1 -#include "tclOO.h" #include "tclOOInt.h" MODULE_SCOPE const TclOOStubs *tclOOStubsPtr; diff --git a/unix/.cvsignore b/unix/.cvsignore index 4c52a50..9f2e617 100644 --- a/unix/.cvsignore +++ b/unix/.cvsignore @@ -15,3 +15,4 @@ tclsh tcltest test1 test2 +confdefs.h -- cgit v0.12 From cd034550642034bd5b4eabf2e0ea1cd5cf06719c Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 28 Jan 2010 10:25:03 +0000 Subject: Improvements to destructor handling. Stop crashes from odd destruction routes. --- ChangeLog | 307 +++++++++++++++++++++++++++------------------------ generic/tclOO.c | 87 ++++++++++++--- generic/tclOOBasic.c | 18 ++- generic/tclOOInt.h | 4 +- tests/oo.test | 112 ++++++++++++++++++- 5 files changed, 362 insertions(+), 166 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86c49d2..a0eab4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,21 @@ +2010-01-28 Donal K. Fellows + + * generic/tclOOBasic.c (TclOO_Object_Destroy): Move the execution of + destructors to a point where they can produce an error. This will not + work for all destructors, but it does mean that more failing calls of + them will be caught. + * generic/tclOO.c (AllocObject, MyDeletedTrace, ObjectRenamedTrace): + (ObjectNamespaceDeleted): Stop various ways of getting at commands + with dangling pointers to the object. Also increases the reliability + of calling of destructors (though most destructors won't benefit; when + an object is deleted namespace-first, its destructors are not run in a + nice state as the namespace is partially gone). + 2010-01-25 Jan Nijtmans - * generic/tclOOStubInit.c Remove double includes (which causes a - * generic/tclOOStubLib.c warning in CYGWIN compiles) - * unix/.cvsignore add confdefs.h + * generic/tclOOStubInit.c: Remove double includes (which causes a + * generic/tclOOStubLib.c: warning in CYGWIN compiles) + * unix/.cvsignore: add confdefs.h 2010-01-22 Donal K. Fellows @@ -19,9 +32,9 @@ places. * win/tclWinError.c * win/tclWinPipe.c - * win/tcl.m4 Make cygwin configuration error into - * win/configure.in a warning: CYGWIN compilation works - * win/configure although there still are test failures. + * win/tcl.m4: Make cygwin configuration error into + * win/configure.in: a warning: CYGWIN compilation works + * win/configure: although there still are test failures. 2010-01-22 Donal K. Fellows @@ -221,7 +234,7 @@ definition in WINAPI's nb30.h * generic/rege_dfa.c: Fix macro conflict on CYGWIN: don't use "small". - * generic/tcl.h Include before on + * generic/tcl.h: Include before on CYGWIN * generic/tclPathObj.c * generic/tclPort.h @@ -229,8 +242,8 @@ special meaning on CYGWIN (both in UNIX and WIN32 mode!) * generic/tclPlatDecls.h: Include through tclPlatDecls.h - * win/tclWinPort.h stricmp -> strcasecmp - * win/tclWinDde.c _wcsicmp -> wcscasecmp + * win/tclWinPort.h: stricmp -> strcasecmp + * win/tclWinDde.c: _wcsicmp -> wcscasecmp * win/tclWinFile.c * win/tclWinPipe.c * win/tclWinSock.c @@ -719,7 +732,7 @@ TclContinuationsEnter(). Forward port from Tcl 8.5 branch, change by Don Porter. -2009-11-09 Stuart Cassoff +2009-11-09 Stuart Cassoff * win/README: [bug 2459744]: Removed outdated Msys + Mingw info. @@ -1749,7 +1762,7 @@ * generic/tclBasic.c (TclObjInvoke): [Bug 2486550]: Make sure that a null objProc is not used, use Tcl_NRCallObjProc instead. -2009-05-01 Jan Nijtmans +2009-05-01 Jan Nijtmans * win/configure.in Fix 64-bit detection for zlib on Win64 * win/configure (regenerated) @@ -1766,13 +1779,13 @@ different when rendered through groff or as HTML, but it was still wrong both ways.) -2009-04-27 Jan Nijtmans +2009-04-27 Jan Nijtmans * generic/tclIndexObj.c: Reset internal INTERP_ALTERNATE_WRONG_ARGS * generic/tclIOCmd.c flag inside the Tcl_WrongNumArgs function, so the caller no longer has to do the reset. -2009-04-24 Stuart Cassoff +2009-04-24 Stuart Cassoff * unix/Makefile.in: [Patch 2769530]: Don't chmod/exec installManPage. @@ -1855,7 +1868,7 @@ * tests/http.test: [Bug 26245326]: Added specific check for problem * tests/httpd: (return incomplete HTTP response header). -2009-04-08 Kevin B. Kenny +2009-04-08 Kevin B. Kenny * tools/tclZIC.tcl: Always emit files with Unix line termination. * library/tzdata: Olson's tzdata2009e @@ -2404,7 +2417,7 @@ Added protections against callers asking for negative lengths. It is likely when this happens that an integer overflow is to blame. -2009-02-01 David Gravereaux +2009-02-01 David Gravereaux * win/makefile.vc: Allow nmake flags such as -a (rebuild all) to pass down to the pkgs targets, too. @@ -2518,7 +2531,7 @@ [Patch 907924]. * unix/configure: Autoconf 2.59 -2009-01-19 David Gravereaux +2009-01-19 David Gravereaux * win/build.vc.bat: Improved tools detection and error message * win/makefile.vc: Reorganized the $(TCLOBJ) file list into seperate @@ -2608,7 +2621,7 @@ instead to focus on what methods add to it; that's really what the test is about anyway. -2009-01-06 Don Porter +2009-01-06 Don Porter * tests/stringObj.test: Revise tests that demand a NULL Tcl_ObjType in certain values to construct those values with [testdstring] so @@ -2639,7 +2652,7 @@ * generic/tclCmdAH.c: Tidy up spacing and code style. -2009-01-03 Kevin B. Kenny : +2009-01-03 Kevin B. Kenny * library/clock.tcl (tcl::clock::add): Fixed error message formatting in the case where [clock add] is presented with a bad switch. @@ -2655,7 +2668,7 @@ the mkstemp() function, which is apparently needed on some platforms. [Bug 741967] -2008-12-31 Don Porter +2008-12-31 Don Porter * unix/Makefile.in: Set TCLLIBPATH in SHELL_ENV so that targets like `make shell` have access to builds of bundled packages. @@ -2755,7 +2768,7 @@ msys on Windows. (Apparently the gcc used doesn't like a / at the end of a -I argument...) -2008-12-20 Don Porter +2008-12-20 Don Porter * changes: Updates for 8.6b1 release. @@ -2773,7 +2786,7 @@ * unix/configure: autoconf-2.59 -2008-12-19 Don Porter +2008-12-19 Don Porter * doc/NRE.3: Formatting errors found by `make html` * doc/Tcl_Main.3: @@ -2831,7 +2844,7 @@ done. Removed the explicits calls to [flush], now that [close] handles this correctly. -2008-12-18 Don Porter +2008-12-18 Don Porter * tests/chanio.test: Replaced [chan event] handlers that returned TCL_RETURN return code, with more conventional ones that return TCL_OK @@ -2860,7 +2873,7 @@ * generic/tclDecls.h: (regenerated) * generic/tclIntDecls.h: -2008-12-18 Alexandre Ferrieux +2008-12-18 Alexandre Ferrieux TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channels @@ -2888,7 +2901,7 @@ * tests/namespace-old.test (namespace-old-9.5): dependent on the global namespace's particular imports. [Bug 2433936] -2008-12-17 Don Porter +2008-12-17 Don Porter * unix/Makefile.in: Modify the distclean-packages target so that empty build directories are deleted. @@ -2921,7 +2934,7 @@ in TIP. This implementation is in Tcl and is a stop-gap until higher-performance ones can be written. -2008-12-16 Don Porter +2008-12-16 Don Porter * generic/tcl.h: Add TIP 338 routines to stub table. * generic/tcl.decls: [Bug 2431338] @@ -2934,13 +2947,13 @@ * generic/tclExecute.c (TEBC:INST_DICT_GET): Make sure that the result is empty when generating an error message. [Bug 2431847] -2008-12-15 Alexandre Ferrieux +2008-12-15 Alexandre Ferrieux * generic/tclBinary.c: Redefine non-strict decoding to ignore only * doc/binary.n: whitespace. [Bug 2380293] * tests/binary.test: -2008-12-15 Don Porter +2008-12-15 Don Porter * doc/AddErrInfo.3: Documented Tcl_(Set|Get)ErrorLine (TIP 336). * doc/CrtCommand.3: Various other documentation updates to @@ -2997,7 +3010,7 @@ version of zlib is not capable enough, and automagic to detect when that is the case. [Bug 2421265] -2008-12-12 Alexandre Ferrieux +2008-12-12 Alexandre Ferrieux * unix/tclUnixNotfy.c: Fix missing CLOEXEC on internal pipes [2417695] * unix/tclUnixPipe.c: Fix missing CLOEXEC on [chan pipe] fds. @@ -3009,7 +3022,7 @@ (Tcl_ZlibInflate): Ensure that gzip header extraction is done correctly. -2008-12-12 Kevin Kenny +2008-12-12 Kevin Kenny TIP #322 IMPLEMENTATION @@ -3070,7 +3083,7 @@ * library/tzdata/*: Update from Olson's tzdata2008i. -2008-12-10 Alexandre Ferrieux +2008-12-10 Alexandre Ferrieux TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan] @@ -3099,7 +3112,7 @@ * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: -2008-12-09 Don Porter +2008-12-09 Don Porter TIP #337 IMPLEMENTATION @@ -3146,7 +3159,7 @@ * generic/tcl.decls: TclTransferResult. Added * doc/SetResult.3: to public stubs table. -2008-12-04 Don Porter +2008-12-04 Don Porter * generic/tclPathObj.c (Tcl_FSGetNormalizedPath): Added another flag value TCLPATH_NEEDNORM to mark those intreps which need more @@ -3157,13 +3170,13 @@ * win/tclWinPipe.c (TclpOpenTemporaryFile): Avoid an infinite loop due to GetTempFileName/CreateFile interaction. [Bug 2380318] -2008-12-03 Don Porter +2008-12-03 Don Porter * generic/tclFileName.c (DoGlob): One of the Tcl_FSMatchInDirectory calls did not have its return code checked. This caused error messages returned by some Tcl_Filesystem drivers to be swallowed. -2008-12-02 Don Porter +2008-12-02 Don Porter TIP #336 IMPLEMENTATION @@ -3191,7 +3204,7 @@ Ferrieux's first patch for [Bug 2270477] with a gentler version, also supplied by him. -2008-12-01 Don Porter +2008-12-01 Don Porter * generic/tclParse.c: Coding standards fixups. @@ -3224,7 +3237,7 @@ more comments and explanation of what is going on. Reduce the amount of locking required. -2008-11-27 Alexandre Ferrieux +2008-11-27 Alexandre Ferrieux * generic/tcl.h: Alternate fix for [Bug 2251175]: missing * generic/tclCompile.c: backslash substitution on expanded literals. @@ -3284,7 +3297,7 @@ * generic/tclDictObj.c: Convert Tcl_SetResult call to Tcl_SetObjResult. -2008-11-17 Alexandre Ferrieux +2008-11-17 Alexandre Ferrieux * tests/for.test: Check for uncompiled-for-continue [Bug 2186888] fixed earlier. @@ -3311,7 +3324,7 @@ * generic/tclLoad.c: Fixed [Bug 2269431]: Load of shared objects leaves temporary files on windows. -2008-11-12 Pat Thoyts +2008-11-12 Pat Thoyts * tests/registry.test: Use HKCU to avoid requiring admin access for registry testing on Vista/Server2008 @@ -3338,7 +3351,7 @@ * win/Makefile.in: package to version 1.1.4. Added cross-references to the relevant parts of the code to avoid future desynchronization. -2008-11-07 Pat Thoyts +2008-11-07 Pat Thoyts * generic/tclInt.h: Applied [Patch 2215022] from Duoas to clean up * generic/tclBinary.c: the binary ensemble initiailization code. @@ -3352,7 +3365,7 @@ * generic/tclIO.c: Eliminate an 'array index out of bounds' warning on HP-UX. -2008-11-04 Jeff Hobbs +2008-11-04 Jeff Hobbs * generic/tclPort.h: Remove the ../win/ header dir as the build system already has it, and it confuses builds when used with private headers @@ -3387,7 +3400,7 @@ * generic/tclEnv.c: Eliminate some -Wwrite-strings warnings * generic/tclLink.c: -2008-10-27 Don Porter +2008-10-27 Don Porter * generic/tclEncoding.c: Use "iso8859-1" and not "identity" as the default and original [encoding system] value. Since "iso8859-1" is @@ -3399,7 +3412,7 @@ other code expecting a particular value for Tcl's default system encoding *** -2008-10-24 Pat Thoyts +2008-10-24 Pat Thoyts * library/http/http.tcl: Fixed a failure to read SHOUTcast streams with the new 2.7 package. Introduced a new intial state as the first @@ -3430,7 +3443,7 @@ * generic/tclIntDecls.h: (regenerated) * tools/genStubs.tcl: CONST -> const and white-spacing -2008-10-19 Don Porter +2008-10-19 Don Porter * generic/tclProc.c: Reset -level and -code values to defaults after they are used. [Bug 2152286] @@ -3456,7 +3469,7 @@ * generic/tclIORTrans.c (DeleteReflectedTransformMap): Removed debug output in C++ comment. -2008-10-17 Don Porter +2008-10-17 Don Porter * generic/tclCompile.h: Declare the internal tclInstructionTable to * generic/tclExecute.c: simply be "const", not CONST86. @@ -3507,7 +3520,7 @@ * win/tclWinInit.c * win/tclWinTest.c -2008-10-16 Don Porter +2008-10-16 Don Porter * library/init.tcl: Revised [unknown] so that it carefully preserves the state of the ::errorInfo and ::errorCode variables at @@ -3548,7 +3561,7 @@ * doc/binary.n: Formatting fix. -2008-10-14 Don Porter +2008-10-14 Don Porter * README: Bump version number to 8.6a4 * generic/tcl.h: @@ -3572,7 +3585,7 @@ direct people to the correct manual pages for specific channel types, suitable for the hard-of-reading. Following discussion on tcl-core. -2008-10-13 Pat Thoyts +2008-10-13 Pat Thoyts * win/tclWinThrd.c (TclpThreadCreate): We need to initialize the thread id variable to 0 as on 64 bit windows this is a pointer sized @@ -3595,7 +3608,7 @@ Tcl, but were met during development of L. Thanks go to Robert Netzer for diagnosis and fix. -2008-10-10 Don Porter +2008-10-10 Don Porter *** 8.6a3 TAGGED FOR RELEASE *** @@ -3620,7 +3633,7 @@ when a coroutine is running but the resume command has been deleted. [Bug 2153080] -2008-10-08 Don Porter +2008-10-08 Don Porter * generic/tclTrace.c: Corrected handling of errors returned by variable traces so that the errorInfo value contains the original @@ -3650,7 +3663,7 @@ * doc/chan.n, doc/transchan.n: Documented the channel transformation API of TIP #230. -2008-10-06 Pat Thoyts +2008-10-06 Pat Thoyts * tests/winFCmd.test: Fixed some erroneous tests on Vista+. * generic/tclFCmd.c: Fix constness for msvc of last commit @@ -3794,7 +3807,7 @@ tcltest less specific to accept both .tcl and .tm variants of the file during matching. [Bug 2129828] -2008-10-02 Don Porter +2008-10-02 Don Porter TIP #330 IMPLEMENTATION @@ -3819,7 +3832,7 @@ * win/makefile.vc: Fix the HtmlHelp and WinHelp targets to not be mutually exclusive. -2008-09-29 Don Porter +2008-09-29 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -3882,7 +3895,7 @@ case where the combination of number of elements and repeat count causes the resulting list to be too large. [Bug 2130992] -2008-09-26 Don Porter +2008-09-26 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -3910,7 +3923,7 @@ * generic/tclOO.h (TCLOO_VERSION): Bump the version. -2008-09-25 Don Porter +2008-09-25 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -3937,7 +3950,7 @@ * tests/oo.test (oo-25.2): Revise call chain cache management so that it takes into account class-wide caching correctly. [Bug 2120903] -2008-09-24 Don Porter +2008-09-24 Don Porter TIP #323 IMPLEMENTATION (partial) @@ -3983,7 +3996,7 @@ get the body of a procedure-like method. Reduces the amount of "poking inside the abstraction" that is done by the introspection code. -2008-09-22 Alexandre Ferrieux +2008-09-22 Alexandre Ferrieux * doc/chan.n: Clean up paragraph order. @@ -3993,7 +4006,7 @@ * generic/tclInt.h (TCL_CT_ASSERT): New compile-time assertions, adapted from www.pixelbeat.org/programming/gcc/static_assert.html -2008-09-17 Don Porter +2008-09-17 Don Porter * generic/tclInt.h: Correct the TclGetLongFromObj, TclGetIntFromObj, and TclGetIntForIndexM macros so that they retrieve the longValue @@ -4071,7 +4084,7 @@ * generic/tclExecute.c (CACHE_STACK_INFO): * tests/unsupported.test: Restore execEnv's bottomPtr. [Bug 2093188] -2008-09-02 Don Porter +2008-09-02 Don Porter * generic/tcl.h: Stripped "callers" of the _ANSI_ARGS_ macro * compat/dirent2.h: to support a TCL_NO_DEPRECATED build. @@ -4111,7 +4124,7 @@ * win/makefile.bc: * win/makefile.vc: -2008-08-28 Don Porter +2008-08-28 Don Porter * README: Bump version number to 8.6a3 * generic/tcl.h: @@ -4172,7 +4185,7 @@ * generic/tclExecute.c: Set special errocodes: COROUTINE_BUSY, COROUTINE_CANT_YIELD, COROUTINE_ILLEGAL_YIELD. -2008-08-22 Don Porter +2008-08-22 Don Porter *** 8.6a2 TAGGED FOR RELEASE *** @@ -4194,13 +4207,13 @@ * generic/tclInt.h: * tests/unsupported.test: -2008-08-21 Jeff Hobbs +2008-08-21 Jeff Hobbs * tests/regexp.test, tests/regexpComp.test: Correct re2glob ***= * generic/tclUtil.c (TclReToGlob): translation from exact to anywhere-in-string match. [Bug 2065115] -2008-08-21 Don Porter +2008-08-21 Don Porter * generic/tcl.h: Reduced the use of CONST86 and eliminated * generic/tcl.decls: the use of CONST86_RETURN to support source @@ -4224,7 +4237,7 @@ * generic/tclProc.c (Tcl_DisassembleObjCmd): Added ability to disassemble TclOO methods. The code to do this is very ugly. -2008-08-21 Pat Thoyts +2008-08-21 Pat Thoyts * generic/tclOOMethod.c: Added casts to make MSVC happy * generic/tclBasic.c: @@ -4269,7 +4282,7 @@ * generic/tclExecute.c: Better cmdFrame management -2008-08-14 Don Porter +2008-08-14 Don Porter * tests/fileName.test: Revise new tests for portability to case insensitive filesystems. @@ -4315,18 +4328,18 @@ * tests/nre.test: Added test for large {*}-expansion effects -2008-08-13 Don Porter +2008-08-13 Don Porter * generic/tclFileName.c: Fix for errors handling -types {} * tests/fileName.test: option to [glob]. [Bug 1750300] Thanks to Matthias Kraft and George Peter Staplin. -2008-08-12 Jeff Hobbs +2008-08-12 Jeff Hobbs * generic/tclOOInfo.c (InfoObjectDefnCmd, InfoObjectMixinsCmd): Fix # args displayed. [Bug 2048676] -2008-08-08 Don Porter S +2008-08-08 Don Porter * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check for bytecode validity. [Bug 2037727] @@ -4349,7 +4362,7 @@ * changes: Updates for 8.6a2 release. -2008-08-11 Pat Thoyts +2008-08-11 Pat Thoyts * library/http/http.tcl: Remove 8.5 requirement. * library/http/pkgIndex.tcl: @@ -4371,7 +4384,7 @@ test case demonstrating the leak before the fix. Fixed a few spelling errors in test descriptions as well. -2008-08-11 Don Porter +2008-08-11 Don Porter * library/http/http.tcl: Bump http version to 2.7.1 to account * library/http/pkgIndex.tcl: for [Bug 2046486] bug fix. This @@ -4380,7 +4393,7 @@ * win/makefile.bc: use the unsigned formats in the * win/makefile.vc: [binary scan] command. -2008-08-11 Pat Thoyts +2008-08-11 Pat Thoyts * library/http/http.tcl: CRC field from zlib data should be treated as unsigned for 64bit support. [Bug 2046846] @@ -4407,11 +4420,11 @@ * tests/lrange.test (lrange-1.17): Add test cleanup; whitespace. -2008-08-08 Don Porter +2008-08-08 Don Porter * changes: Updates for 8.6a2 release. -2008-08-08 Kevin Kenny +2008-08-08 Kevin Kenny * library/tzdata/CET: * library/tzdata/MET: @@ -4433,7 +4446,7 @@ * generic/tclExecute.c: Tcl_EvalEx. [Bug 2017946] * generic/tclInt.h: -2008-08-06 Don Porter S +2008-08-06 Don Porter * generic/tclOO.c: Revised TclOO's check for an interp being deleted during handling of object command deletion. The old code was @@ -4459,7 +4472,7 @@ else load the tiny script in that patch by themselves (rewrite ::unknown). Note that it is a script-only patch. -2008-08-05 Joe English +2008-08-05 Joe English * unix/tclUnixChan.c: Streamline async connect logic [Patch 1994512] @@ -4480,7 +4493,7 @@ * generic/tclProc.c: * tests/unsupported.test: -2008-08-04 Don Porter +2008-08-04 Don Porter * generic/tclExecute.c: Stopped faulty double-logging of errors to * tests/execute.test: stack trace when a compile epoch bump triggers @@ -4503,7 +4516,7 @@ * tests/nre.test (new): separating core functionality from the * tests/unsupported.test (new): experimental commands. -2008-08-01 Jeff Hobbs +2008-08-01 Jeff Hobbs * doc/Exit.3: Do not call Tcl_Finalize implicitly * generic/tclEvent.c: on DLL_PROCESS_DETACH as it may lead @@ -4511,7 +4524,7 @@ explicitly calling Tcl_Finalize before unloading regardless. Clarify the docs to note the explicit need in embedded use. -2008-08-01 Don Porter +2008-08-01 Don Porter * generic/tclBasic.c: Revised timing of the CmdFrame stack * tests/info.test: management in TclEvalEx so that the CmdFrame @@ -4676,7 +4689,7 @@ This change complies with TIP #27 ***POTENTIAL INCOMPATIBILITY*** -2008-07-23 Alexandre Ferrieux +2008-07-23 Alexandre Ferrieux * tests/lrange.test: Added relative speed test to check for lrange in-place optimization committed 2008-06-30. @@ -4724,7 +4737,7 @@ * generic/tclExecute.c: GetCommandSource use it. This solves [Bug * generic/tclInt.h: 2017146]. Thx dgp for the analysis. -2008-07-21 Andreas Kupries +2008-07-21 Andreas Kupries * generic/tclBasic.c: Extended the existing TIP #280 system (info * generic/tclCmdAH.c: frame), added the ability to track the absolute @@ -4744,7 +4757,7 @@ * win/tclWinTest.c * tests/*.test -2008-07-21 Alexandre Ferrieux +2008-07-21 Alexandre Ferrieux TIP #304 IMPLEMENTATION @@ -4756,7 +4769,7 @@ * tests/ioCmd.test: Modernized checks * tests/ioTrans.test: -2008-07-21 Pat Thoyts +2008-07-21 Pat Thoyts * generic/tclFCmd.c: Inodes on windows are unreliable. [Bug 2015723] * tests/winFCmd.test: test rename with inode collision @@ -4870,7 +4883,7 @@ (DictUpdateCmd, FinalizeDictUpdate): Similarly for the non-compiled version of [dict update]. -2008-07-16 George Peter Staplin +2008-07-16 George Peter Staplin * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that thread key creation is successful. @@ -4984,7 +4997,7 @@ * unix/tclUnixTest.c: * win/tclWin32Dll.c: -2008-07-08 Don Porter +2008-07-08 Don Porter * generic/tclGet.c: Corrected out of date comments and removed * generic/tclInt.decls: internal routine TclGetLong() that's no @@ -5020,7 +5033,7 @@ reported in [Bug 1987821]. Thanks to Miguel for the report and Don Porter for tracking the cause down. -2008-07-03 Don Porter +2008-07-03 Don Porter * library/package.tcl: Removed [file readable] testing from [tclPkgUnknown] and friends. We find out soon enough whether a file is @@ -5042,12 +5055,12 @@ * doc/ObjectType.3: Clean up typedef formatting. -2008-06-30 Don Porter +2008-06-30 Don Porter * doc/ObjectType.3: Updated documentation of the Tcl_ObjType struct to match expectations of Tcl 8.5. [Bug 1917650] -2008-06-30 Alexandre Ferrieux +2008-06-30 Alexandre Ferrieux * generic/tclCmdIL.c: Lrange cleanup and in-place optimization. [Patch 1890831] @@ -5061,7 +5074,7 @@ change bars and cleaning up the formatting of typedefs. Added a few missing bits of documentation in the process. -2008-06-29 Don Porter +2008-06-29 Don Porter * generic/tclPathObj.c: Plug memory leak in [Bug 1999176] fix. Thanks to Rolf Ade for detecting. @@ -5074,7 +5087,7 @@ * doc/object.n (EXAMPLES): Fix incorrect usage of oo::define to be done with oo::objdefine instead. [Bug 2004480] -2008-06-28 Don Porter +2008-06-28 Don Porter * generic/tclPathObj.c: Plug memory leak in [Bug 1972879] fix. Thanks to Rolf Ade for detecting and Dan Steffen for the fix. [Bug 2004654] @@ -5086,7 +5099,7 @@ conditional on interpreter safeness as well. Thanks to Daniel Steffen for reminding me of that code. -2008-06-25 Don Porter +2008-06-25 Don Porter *** 8.6a1 TAGGED FOR RELEASE *** @@ -5101,22 +5114,22 @@ * library/init.tcl: enabling requiring Tcl Modules in safe * tests/safe.test: interpreters. [Bug 1999119] -2008-06-25 Pat Thoyts +2008-06-25 Pat Thoyts * win/rules.vc: Fix versions of dde and registry dlls * win/makefile.vc: Fix problem building with staticpkg option -2008-06-24 Don Porter +2008-06-24 Don Porter * generic/tclPathObj.c: Fixed some internals management in the "path" Tcl_ObjType for the empty string value. Problem led to a crash in the command [glob -dir {} a]. [Bug 1999176] -2008-06-24 Pat Thoyts +2008-06-24 Pat Thoyts * doc/fileevent.n: Fix examples and comment on eof use. [Bug 1995063] -2008-06-23 Don Porter +2008-06-23 Don Porter * generic/tclPathObj.c: Fixed bug in Tcl_GetTranslatedPath() when operating on the "Special path" variant of the "path" Tcl_ObjType @@ -5124,7 +5137,7 @@ relative paths to absolute, contrary to what the function of producing the "translated path" is supposed to do. [Bug 1972879] -2008-06-20 Don Porter +2008-06-20 Don Porter * changes: Updates for 8.6a1 release. @@ -5152,7 +5165,7 @@ * tests/oo.test (oo-14.8): that class mixins are processed in the documented order. [Bug 1998221] -2008-06-19 Don Porter +2008-06-19 Don Porter * changes: Updates for 8.6a1 release. @@ -5179,7 +5192,7 @@ new (underscored) form of environment variable names, but make it the encouraged form as well. [Bug 1914604] -2008-06-17 Kevin Kenny +2008-06-17 Kevin Kenny * generic/tclClock.c (ConvertLocalToUTC): * tests/clock.test (clock-63.1): Fixed a bug where the internal @@ -5202,7 +5215,7 @@ iortrans.tf-11.*, cleanup of temp file, making this a followup to the entry on 2008-06-10 by myself. -2008-06-13 David Gravereaux +2008-06-13 David Gravereaux * win/rules.vc: SYMBOLS macro is now being set to zero when $(OPTS) is not available. @@ -5298,7 +5311,7 @@ * macosx/Tcl.xcode/project.pbxproj: Sync Tcl.xcodeproj changes. * macosx/README: Document new build configs. -2008-06-10 Joe English +2008-06-10 Joe English * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension when converting incomplete UTF-8 sequences. See [Bug 1908443] for @@ -5361,7 +5374,7 @@ over both modules and see which of the common parts we can factor out and share. -2008-06-04 Pat Thoyts +2008-06-04 Pat Thoyts * generic/tclBinary.c: TIP #317 implementation * tests/binary.test: @@ -5452,7 +5465,7 @@ TclOO to sit directly inside Tcl. Note that this is incomplete (e.g. no build support yet for Windows). -2008-05-26 Jeff Hobbs +2008-05-26 Jeff Hobbs * tests/io.test (io-53.9): Need to close chan before removing file. @@ -5474,13 +5487,13 @@ the supported range are now clipped to nearest boundary instead of ignored. -2008-05-22 Don Porter +2008-05-22 Don Porter * generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to handle the argument value length = -1. Thanks to Chris Darroch for discovering the bug and providing the fix. [Bug 1968245] -2008-05-21 Don Porter +2008-05-21 Don Porter * generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace * tests/parse.test (parse-15.60): routine has no mechanism to @@ -5499,7 +5512,7 @@ * generic/tclCompile.c: Fix crash with tcl_traceExec. Found and fixed by Alexander Pasadyn. [Bug 1964803] -2008-05-15 Pat Thoyts +2008-05-15 Pat Thoyts * win/makefile.vc: We should use the thread allocator for threaded * win/rules.vc: builds. Added 'tclalloc' option to disable. @@ -5539,7 +5552,7 @@ one error that caused a crash every time a compiled 'dict append' with more than one argument was used. Found by Colin McCormack. -2008-05-02 Pat Thoyts +2008-05-02 Pat Thoyts * generic/tclBasic.c: Converted the [binary] command into an * generic/tclBinary.c: ensemble. @@ -5556,7 +5569,7 @@ files allow building things that link against Tcl with really ancient compilers still; the requirement is just when building Tcl itself.) -2008-04-26 Zoran Vasiljevic +2008-04-26 Zoran Vasiljevic * generic/tclAsync.c: Tcl_AsyncDelete(): panic if attempt to locate handler token fails. Happens when some other thread attempts to delete @@ -5577,7 +5590,7 @@ * generic/tclIORChan.c: Fixed the bugs exposed by the new testcases, redone most of the cleanup and exit handling. -2008-04-21 Don Porter +2008-04-21 Don Porter * generic/tclIOUtil.c: Removed all code delimited by * generic/tclTest.c: USE_OBSOLETE_FS_HOOKS, completing @@ -5587,7 +5600,7 @@ Tcl 8.5, and now completely gone for Tcl 8.6). Also removed all tests relevant only to the removed interfaces. -2008-04-19 George Peter Staplin +2008-04-19 George Peter Staplin * doc/Ensemble.3: Fix a typo: s/defiend/defined/ Thanks to hat0 for spotting this. @@ -5621,7 +5634,7 @@ * unix/Makefile.in: Adjust tclDTrace.h dependencies for removal of tclStubLib.o from TCL_OBJS. [Bug 1942795] -2008-04-14 Kevin B. Kenny +2008-04-14 Kevin B. Kenny * unix/tclUnixTime.c (NativeGetTime): Removed obsolete use of 'struct timezone' in the call to 'gettimeofday'. [Bug 1942197] @@ -5786,7 +5799,7 @@ * unix/tcl.m4: setup on solaris x86, native cc), provided by Michael Schlenker. -2008-04-01 Don Porter +2008-04-01 Don Porter * generic/tclStubLib.c: Removed needless #ifdef complexity. @@ -5823,7 +5836,7 @@ * generic/tclPlatDecls.h: * generic/tclTomMathDecls.h: -2008-03-30 Kevin Kenny +2008-03-30 Kevin Kenny * generic/tclInt.h (TclIsNaN): * unix/configure.in: Added code to the configurator to check for a @@ -5840,7 +5853,7 @@ deal with (slightly buggy) math libraries in which pow() returns an incorrectly rounded result. [Bug 1808174] -2008-03-26 Don Porter +2008-03-26 Don Porter *** 8.5.2 TAGGED FOR RELEASE *** @@ -5863,7 +5876,7 @@ buggy tests fixed, including one where the result of the previous test was being checked! -2008-03-27 Kevin B. Kenny +2008-03-27 Kevin B. Kenny * library/tzdata/America/Marigot: * library/tztata/America/St_Barthelemy: @@ -5897,11 +5910,11 @@ * unix/configure: autoconf-2.59 -2008-03-26 Don Porter +2008-03-26 Don Porter * changes: Updated for 8.5.2 release. -2008-03-24 Pat Thoyts +2008-03-24 Pat Thoyts * generic/tclBinary.c: [Bug 1923966] - crash in binary format * tests/binary.test: Added tests for the above crash condition. @@ -5944,7 +5957,7 @@ ***INCOMPATIBILITY*** for all Tcl Modules already written in non-utf-8 compatible encodings. -2008-03-18 Don Porter +2008-03-18 Don Porter * generic/tclExecute.c: Patch from Miguel Sofer to correct the alignment of memory allocated by GrowEvaluationStack(). [Bug 1914503] @@ -5966,7 +5979,7 @@ * doc/lreplace.n: Clarified documentation of what happens with negative indices. [Bug 1905809] Added example, tidied up formatting. -2008-03-14 Don Porter +2008-03-14 Don Porter * generic/tclBasic.c (OldMathFuncProc): Same workaround protection from bad TclStackAlloc() alignment. Thanks George Peter Staplin. @@ -5986,7 +5999,7 @@ * unix/tcl.m4: for lib paths in tclConfig.sh. [Bug 1913622] * unix/configure: autoconf-2.59 -2008-03-13 Don Porter +2008-03-13 Don Porter * changes: Updated for 8.5.2 release. @@ -6000,11 +6013,11 @@ * macosx/Tcl.xcodeproj/default.pbxuser: CODE_SIGN_IDENTITY and * macosx/Tcl-Common.xcconfig: 'xcodebuild install'. -2008-03-12 Andreas Kupries +2008-03-12 Andreas Kupries * doc/info.n: Replaced {expand} with {*}. -2008-03-12 Jeff Hobbs +2008-03-12 Jeff Hobbs * unix/Makefile.in (install-libraries): Bump http to 2.7 * win/Makefile.in (install-libraries): Added -myaddr option to allow @@ -6017,7 +6030,7 @@ Added -strict option to control URL validation on per-call basis. [Bug 1560506] -2008-03-11 Jeff Hobbs +2008-03-11 Jeff Hobbs * library/http/http.tcl (http::geturl): Add -method option to support * tests/http.test (http-3.1): http PUT and DELETE requests. @@ -6073,7 +6086,7 @@ when unset traces recreated the var, as reported by Julian Noble. [Bug 1911919] -2008-03-10 Don Porter +2008-03-10 Don Porter * changes: Updated for 8.5.2 release. @@ -6101,7 +6114,7 @@ finalization ordering and attendant issues. For now we choose the lesser evil. -2008-03-07 Don Porter +2008-03-07 Don Porter * generic/tclExecute.c (Tcl_ExprObj): Revised expression bytecode compiling so that bytecodes invalid due to changing context or due to @@ -6123,7 +6136,7 @@ * doc/namespace.n: Minor tidying up. [Bug 1909019] -2008-03-04 Don Porter +2008-03-04 Don Porter * tests/execute.test (6.3,4): Added tests for [Bug 1899164]. @@ -6138,7 +6151,7 @@ * tests/interp.test (interp-28.2): Spoil the intrep of an nsNameType obj when the reference crosses interpreter boundaries. -2008-02-29 Don Porter +2008-02-29 Don Porter * generic/tclResult.c (Tcl_SetReturnOptions): Revised the refcount management of Tcl_SetReturnOptions to become that of a conventional @@ -6158,19 +6171,19 @@ one caller within Tcl itself which passes a non-0-count value to Tcl_AppendObjToErrorInfo(). -2008-02-28 Joe English +2008-02-28 Joe English * unix/tclPort.h, unix/tclCompat.h, unix/tclUnixChan.h: Reduce scope of and #includes. [Patch 1903339] -2008-02-28 Joe English +2008-02-28 Joe English * unix/tclUnixChan.c, unix/tclUnixNotfy.c, unix/tclUnixPipe.c: Consolidate all code conditionalized on -DUSE_FIONBIO into one place. * unix/tclUnixPort.h, unix/tclUnixCompat.c: New routine TclUnixSetBlockingMode(). [Patch 1903339] -2008-02-28 Don Porter +2008-02-28 Don Porter * generic/tclBasic.c (TclEvalObjvInternal): Plug memory leak when an enter trace deletes or changes the command, prompting a reparsing. @@ -6187,7 +6200,7 @@ to optimize compiled [return -level 0 $x] [RFE 1794073] introduced a memory leak of the return options dictionary. Fixing that. -2008-02-27 Pat Thoyts +2008-02-27 Pat Thoyts * library/http/http.tcl: [Bug 705956] - fix inverted logic when cleaning up socket error in geturl. @@ -6205,49 +6218,49 @@ * tests/clock.test (clock-61.*, clock-62.1): Regression tests for [Bug 1862555] and [Bug 1902423]. -2008-02-26 Joe English +2008-02-26 Joe English * generic/tclIOUtil.c, unix/tclUnixPort.h, unix/tclUnixChan.c: Remove dead/unused portability-related #defines and unused conditional code. See [Patch 1901828] for discussion. -2008-02-26 Joe English +2008-02-26 Joe English * generic/tclIORChan.c (enum MethodName), * generic/tclCompExpr.c (enum Marks): More stray trailing ","s -2008-02-26 Joe English +2008-02-26 Joe English * unix/configure.in(socklen_t test): Define socklen_t as "int" if missing, not "unsigned". Use AC_TRY_COMPILE instead of AC_EGREP_HEADER. * unix/configure: regenerated. -2008-02-26 Joe English +2008-02-26 Joe English * generic/tclCompile.h: Remove stray trailing "," from enum InstOperandType definition (C99ism). -2008-02-26 Jeff Hobbs +2008-02-26 Jeff Hobbs * generic/tclUtil.c (TclReToGlob): Fix the handling of the last star * tests/regexpComp.test: possibly being escaped in determining right anchor. [Bug 1902436] -2008-02-26 Pat Thoyts +2008-02-26 Pat Thoyts * library/http/pkgIndex.tcl: Set version 2.5.5 * library/http/http.tcl: It is better to do the [eof] check after trying to read from the socket. No clashes found in testing. Added http::meta command to access the http headers. [Bug 1868845] -2008-02-22 Pat Thoyts +2008-02-22 Pat Thoyts * library/http/pkgIndex.tcl: Set version 2.5.4 * library/http/http.tcl: Always check that the state array exists in the http::status command. [Bug 1818565] -2008-02-13 Don Porter +2008-02-13 Don Porter * generic/tcl.h: Bump version number to 8.5.2b1 to distinguish * library/init.tcl: CVS development snapshots from the 8.5.1 and @@ -6279,7 +6292,7 @@ [lassign] in place of [foreach], avoiding [namespace which] for command resolution). -2008-02-04 Don Porter +2008-02-04 Don Porter *** 8.5.1 TAGGED FOR RELEASE *** @@ -6323,11 +6336,11 @@ Ttk to have its "standard options" on a manual page that is not called "options". [Tk Bug 1876493] -2008-01-25 Don Porter +2008-01-25 Don Porter * changes: Updated for 8.5.1 release. -2008-01-23 Don Porter +2008-01-23 Don Porter * generic/tclInt.h: New macro TclGrowParseTokenArray() to * generic/tclCompCmds.c: simplify code that might need to grow @@ -6349,7 +6362,7 @@ * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: -2008-01-22 Don Porter +2008-01-22 Don Porter * generic/tclTimer.c (AfterProc): Replace Tcl_EvalEx() with Tcl_EvalObjEx() to evaluate [after] callbacks. Part of trend to favor @@ -6361,14 +6374,14 @@ * tests/cmdIL.test (cmdIL-7.7): Fix crash on reversing an empty list. [Bug 1876793] -2008-01-20 Jeff Hobbs +2008-01-20 Jeff Hobbs * unix/README: Minor typo fixes [Bug 1853072] * generic/tclIO.c (TclGetsObjBinary): Operate on topmost channel. [Bug 1869405] (Ficicchia) -2008-01-17 Don Porter +2008-01-17 Don Porter * generic/tclCompExpr.c: Revision to preserve parsed intreps of numeric and boolean literals when compiling expressions with (optimize @@ -6395,7 +6408,7 @@ * generic/tclCompExpr.c: struct TclOpCmdClientData to accommodate C++ * generic/tclCompile.h: compilers. [Bug 1855644] -2008-01-13 Jeff Hobbs +2008-01-13 Jeff Hobbs * win/tclWinSerial.c (SerialCloseProc, TclWinOpenSerialChannel): Use critical section for read & write side. [Bug 1353846] (newman) @@ -6408,17 +6421,17 @@ * unix/tclUnixThrd.c (TclpThreadGetStackSize): Fix for crash in freebsd. [Bug 1860425] -2008-01-10 Don Porter +2008-01-10 Don Porter * generic/tclStringObj.c (Tcl_AppendFormatToObj): Correct failure to * tests/format.test: account for big.used == 0 corner case in the %ll(idox) format directives. [Bug 1867855] -2008-01-09 George Peter Staplin +2008-01-09 George Peter Staplin * doc/vwait.n: Add a missing be to fix a typo. -2008-01-04 Jeff Hobbs +2008-01-04 Jeff Hobbs * tools/tcltk-man2html.tcl (make-man-pages): Make man page title use more specific info on lhs to improve tabbed browser view titles. @@ -6429,7 +6442,7 @@ reordered documentation to discourage people from using the hex formatter that is hardly ever useful. -2008-01-02 Don Porter +2008-01-02 Don Porter * generic/tcl.h: Bump version number to 8.5.1b1 to distinguish * library/init.tcl: CVS development snapshots from the 8.5.0 and diff --git a/generic/tclOO.c b/generic/tclOO.c index 242496f..a428aba 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.26 2009/11/24 12:00:08 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.27 2010/01/28 10:25:04 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -84,6 +84,9 @@ static int FinalizeObjectCall(ClientData data[], static void InitFoundation(Tcl_Interp *interp); static void KillFoundation(ClientData clientData, Tcl_Interp *interp); +static void MyDeletedTrace(ClientData clientData, + Tcl_Interp *interp, const char *oldName, + const char *newName, int flags); static void ObjectNamespaceDeleted(ClientData clientData); static void ObjectRenamedTrace(ClientData clientData, Tcl_Interp *interp, const char *oldName, @@ -558,6 +561,7 @@ AllocObject( { register Command *cmdPtr = (Command *) ckalloc(sizeof(Command)); + register CommandTrace *tracePtr; memset(cmdPtr, 0, sizeof(Command)); cmdPtr->nsPtr = (Namespace *) oPtr->namespacePtr; @@ -570,6 +574,14 @@ AllocObject( cmdPtr->clientData = cmdPtr; cmdPtr->nreProc = PrivateNRObjectCmd; Tcl_SetHashValue(cmdPtr->hPtr, cmdPtr); + oPtr->myCommand = (Tcl_Command) cmdPtr; + cmdPtr->tracePtr = trace = (CommandTrace *) + ckalloc(sizeof(CommandTrace)); + tracePtr->traceProc = MyDeletedTrace; + tracePtr->clientData = oPtr; + tracePtr->flags = TCL_TRACE_DELETE; + tracePtr->nextPtr = NULL; + tracePtr->refCount = 1; } Tcl_TraceCommand(interp, TclGetString(TclOOObjectName(interp, oPtr)), @@ -581,6 +593,33 @@ AllocObject( /* * ---------------------------------------------------------------------- * + * MyDeletedTrace -- + * + * This callback is triggered when the object's [my] command is deleted + * by any mechanism. It just marks the object as not having a [my] + * command, and so prevents cleanup of that when the object itself is + * deleted. + * + * ---------------------------------------------------------------------- + */ + +static void +MyDeletedTrace( + ClientData clientData, /* Reference to the object whose [my] has been + * squelched. */ + Tcl_Interp *interp, /* ignored */ + const char *oldName, /* ignored */ + const char *newName, /* ignored */ + int flags) /* ignored */ +{ + register Object *oPtr = clientData; + + oPtr->myCommand = NULL; +} + +/* + * ---------------------------------------------------------------------- + * * ObjectRenamedTrace -- * * This callback is triggered when the object is deleted by any @@ -620,26 +659,35 @@ ObjectRenamedTrace( * Oh dear, the object really is being deleted. Handle this by running the * destructors and deleting the object's namespace, which in turn causes * the real object structures to be deleted. + * + * Note that it is possible for the namespace to be deleted before the + * command. Because of that case, we must take care here to mark the + * command as being deleted so that if we return here we don't run into + * reentrancy problems. */ AddRef(oPtr); + oPtr->command = NULL; oPtr->flags |= OBJECT_DELETED; - contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); - if (contextPtr != NULL) { - int result; - Tcl_InterpState state; + if (!(oPtr->flags & DESTRUCTOR_CALLED)) { + contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); + oPtr->flags |= DESTRUCTOR_CALLED; + if (contextPtr != NULL) { + int result; + Tcl_InterpState state; - contextPtr->callPtr->flags |= DESTRUCTOR; - contextPtr->skip = 0; - state = Tcl_SaveInterpState(interp, TCL_OK); - result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, 0, - NULL); - if (result != TCL_OK) { - Tcl_BackgroundError(interp); + contextPtr->callPtr->flags |= DESTRUCTOR; + contextPtr->skip = 0; + state = Tcl_SaveInterpState(interp, TCL_OK); + result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, + contextPtr, 0, NULL); + if (result != TCL_OK) { + Tcl_BackgroundError(interp); + } + Tcl_RestoreInterpState(interp, state); + TclOODeleteContext(contextPtr); } - Tcl_RestoreInterpState(interp, state); - TclOODeleteContext(contextPtr); } /* @@ -819,8 +867,18 @@ ObjectNamespaceDeleted( /* * Instruct everyone to no longer use any allocated fields of the object. + * Also delete the commands that refer to the object at this point (if + * they still exist) because otherwise their references to the object + * point into freed memory, allowing crashes. */ + oPtr->flags |= OBJECT_DELETED; + if (oPtr->command) { + Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->command); + } + if (oPtr->myCommand) { + Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->myCommand); + } if (preserved) { AddRef(oPtr); if (clsPtr != NULL) { @@ -828,7 +886,6 @@ ObjectNamespaceDeleted( ReleaseClassContents(NULL, oPtr); } } - oPtr->flags |= OBJECT_DELETED; /* * Splice the object out of its context. After this, we must *not* call diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index e064928..eedbf5a 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.20 2009/11/27 06:33:40 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.21 2010/01/28 10:25:05 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -259,14 +259,28 @@ TclOO_Object_Destroy( int objc, /* Number of arguments. */ Tcl_Obj *const *objv) /* The actual arguments. */ { + Object *oPtr = (Object *) Tcl_ObjectContextObject(context); + int result = TCL_OK; + if (objc != Tcl_ObjectContextSkippedArgs(context)) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, NULL); return TCL_ERROR; } + if (!(oPtr->flags & DESTRUCTOR_CALLED)) { + CallContext *contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); + + oPtr->flags |= DESTRUCTOR_CALLED; + if (contextPtr != NULL) { + contextPtr->callPtr->flags |= DESTRUCTOR; + contextPtr->skip = 0; + result = TclOOInvokeContext(interp, contextPtr, 0, NULL); + TclOODeleteContext(contextPtr); + } + } Tcl_DeleteCommandFromToken(interp, Tcl_GetObjectCommand(Tcl_ObjectContextObject(context))); - return TCL_OK; + return result; } /* diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 86bc9d3..aea18e2 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.13 2009/12/21 23:25:39 nijtmans Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.14 2010/01/28 10:25:05 dkf Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -199,6 +199,8 @@ typedef struct Object { #define OBJECT_DELETED 1 /* Flag to say that an object has been * destroyed. */ +#define DESTRUCTOR_CALLED 2 /* Flag to say that the destructor has been + * called. */ #define ROOT_OBJECT 0x1000 /* Flag to say that this object is the root of * the class hierarchy and should be treated * specially during teardown. */ diff --git a/tests/oo.test b/tests/oo.test index e42c2ca..6fdc344 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.34 2009/12/09 18:40:47 dgp Exp $ +# RCS: @(#) $Id: oo.test,v 1.35 2010/01/28 10:25:05 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -221,6 +221,18 @@ test oo-1.18 {OO: create object in NS with same name as global cmd} -setup { rename test-oo-1.18 {} A destroy } -result ::C +test oo-1.19 {basic test of OO functionality: teardown order} -body { + oo::object create o + namespace delete [info object namespace o] + o destroy + # Crashes on error +} -returnCodes error -result {invalid command name "o"} +test oo-1.20 {basic test of OO functionality: my teardown post rename} -body { + oo::object create obj + rename [info object namespace obj]::my ::AGlobalName + obj destroy + info commands ::AGlobalName +} -result {} test oo-2.1 {basic test of OO functionality: constructor} -setup { # This is a bit complex because it needs to run in a sub-interp as @@ -330,6 +342,104 @@ test oo-3.2 {basic test of OO functionality: destructor} -setup { } -cleanup { interp delete subinterp } -result {1 ::foo died 2 {}} +test oo-3.3 {basic test of OO functionality: destructor} -setup { + oo::class create foo + set result {} +} -cleanup { + foo destroy +} -body { + oo::define foo { + constructor {} {lappend ::result made} + destructor {lappend ::result died} + } + namespace delete [info object namespace [foo new]] + return $result +} -result {made died} +test oo-3.4 {basic test of OO functionality: my exists in destructor} -setup { + oo::class create cls + set result {} +} -cleanup { + cls destroy +} -body { + oo::define cls { + variable state + constructor {} { + proc localcmdexists {} {} + set state ok + } + forward Report lappend ::result + destructor { + objmy Report [catch {set state} msg] $msg + objmy Report [namespace which -var state] + objmy Report [info commands localcmdexists] + } + } + cls create obj + rename [info object namespace obj]::my ::objmy + obj destroy + lappend result [info commands ::objmy] +} -match glob -result {0 ok *::state localcmdexists {}} +# Compare with previous test; the differences are because here the destructor +# is run with the namespace partially squelched. +test oo-3.5 {basic test of OO functionality: my exists in destructor} -setup { + oo::class create cls + set result {} +} -cleanup { + cls destroy +} -body { + # Order of destruction of commands relative to namespace is complex, but + # we want to make sure that the order from the perspective of TclOO is + # solid. + oo::define cls { + variable state + constructor {} { + proc localcmdexists {} {} + set state ok + } + forward Report lappend ::result + destructor { + objmy Report [catch {set state} msg] $msg + objmy Report [namespace which -var state] + objmy Report [info commands localcmdexists] + } + } + cls create obj + rename [info object namespace obj]::my ::objmy + namespace delete [info object namespace obj] + lappend result [info commands ::objmy] +} -match glob -result {1 {can't read "state": no such variable} *::state {} {}} +test oo-3.6 {basic test of OO functionality: errors in destructor} -setup { + oo::class create cls +} -cleanup { + cls destroy +} -body { + oo::define cls destructor {error foo} + list [catch {[cls create obj] destroy} msg] $msg [info commands obj] +} -result {1 foo {}} +test oo-3.7 {basic test of OO functionality: errors in destructor} -setup { + oo::class create cls + set result {} + proc bgerror msg {lappend ::result $msg} +} -cleanup { + cls destroy + rename bgerror {} +} -body { + oo::define cls destructor {error foo} + list [rename [cls create obj] {}] \ + [update idletasks] $result [info commands obj] +} -result {{} {} foo {}} +test oo-3.8 {basic test of OO functionality: errors in destructor} -setup { + oo::class create cls + set result {} + proc bgerror msg {lappend ::result $msg} +} -cleanup { + cls destroy + rename bgerror {} +} -body { + oo::define cls destructor {error foo} + list [namespace delete [info object namespace [cls create obj]]] \ + [update idletasks] $result [info commands obj] +} -result {{} {} foo {}} test oo-4.1 {basic test of OO functionality: export} { set o [oo::object new] -- cgit v0.12 From 2a36240c713f132ba78917496b237d879d5e2d58 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 28 Jan 2010 13:57:47 +0000 Subject: Make things compile... D'oh! --- generic/tclOO.c | 4 ++-- generic/tclOOBasic.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/generic/tclOO.c b/generic/tclOO.c index a428aba..ea008be 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.27 2010/01/28 10:25:04 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.28 2010/01/28 13:57:47 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -575,7 +575,7 @@ AllocObject( cmdPtr->nreProc = PrivateNRObjectCmd; Tcl_SetHashValue(cmdPtr->hPtr, cmdPtr); oPtr->myCommand = (Tcl_Command) cmdPtr; - cmdPtr->tracePtr = trace = (CommandTrace *) + cmdPtr->tracePtr = tracePtr = (CommandTrace *) ckalloc(sizeof(CommandTrace)); tracePtr->traceProc = MyDeletedTrace; tracePtr->clientData = oPtr; diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index eedbf5a..193ca93 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.21 2010/01/28 10:25:05 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.22 2010/01/28 13:57:48 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -268,13 +268,15 @@ TclOO_Object_Destroy( return TCL_ERROR; } if (!(oPtr->flags & DESTRUCTOR_CALLED)) { - CallContext *contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR); + CallContext *contextPtr = + TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); oPtr->flags |= DESTRUCTOR_CALLED; if (contextPtr != NULL) { contextPtr->callPtr->flags |= DESTRUCTOR; contextPtr->skip = 0; - result = TclOOInvokeContext(interp, contextPtr, 0, NULL); + result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, + contextPtr, 0, NULL); TclOODeleteContext(contextPtr); } } -- cgit v0.12 From 20dedb76e13ace251494944dae1a8e60d2f6d70a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 29 Jan 2010 16:17:20 +0000 Subject: - genStubs.tcl: No longer generate a space after "*" and immediately after a function name, so the format of function definitions in tcl*Decls.h matches all other tcl*.h header files. - Change Tcl_ArgvFuncProc, Tcl_ArgvGenFuncProc and GetFrameInfoValueProc to be function definitions, not pointers, for consistency with all other Tcl function definitions. --- ChangeLog | 22 + doc/ParseArgs.3 | 6 +- generic/regguts.h | 7 +- generic/tcl.decls | 4 +- generic/tcl.h | 8 +- generic/tclDecls.h | 2085 ++++++++++++++++++++++----------------------- generic/tclIndexObj.c | 10 +- generic/tclInt.decls | 8 +- generic/tclInt.h | 12 +- generic/tclIntDecls.h | 552 ++++++------ generic/tclIntPlatDecls.h | 167 ++-- generic/tclOODecls.h | 94 +- generic/tclOOInt.h | 4 +- generic/tclOOIntDecls.h | 104 ++- generic/tclPlatDecls.h | 24 +- generic/tclResolve.c | 8 +- generic/tclTomMath.decls | 120 +-- generic/tclTomMathDecls.h | 249 +++--- tools/genStubs.tcl | 18 +- 19 files changed, 1727 insertions(+), 1775 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0eab4e..dea995b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2010-01-29 Jan Nijtmans + + * tools/genStubs.tcl: No longer generate a space after "*" and + immediately after a function name, so the + format of function definitions in tcl*Decls.h + match all other tcl*.h header files. + * doc/ParseArgs.3: Change Tcl_ArgvFuncProc, Tcl_ArgvGenFuncProc + * generic/tcl.h and GetFrameInfoValueProc to be function + * generic/tclInt.h definitions, not pointers, for consistency + * generic/tclOOInt.h with all other Tcl function definitions. + * generic/tclIndexObj.c + * generic/regguts.h: CONST -> const + * generic/tcl.decls Formatting + * generic/tclTomMath.decls Formatting + * generic/tclDecls.h (regenerated) + * generic/tclIntDecls.h + * generic/tclIntPlatDecls.h + * generic/tclOODecls.h + * generic/tclOOIntDecls.h + * generic/tclPlatDecls.h + * generic/tclTomMathDecls.h + 2010-01-28 Donal K. Fellows * generic/tclOOBasic.c (TclOO_Object_Destroy): Move the execution of diff --git a/doc/ParseArgs.3 b/doc/ParseArgs.3 index 524e2f2..1711b8c 100644 --- a/doc/ParseArgs.3 +++ b/doc/ParseArgs.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ParseArgs.3,v 1.1 2008/10/02 23:32:13 dkf Exp $ +'\" RCS: @(#) $Id: ParseArgs.3,v 1.2 2010/01/29 16:17:21 nijtmans Exp $ '\" .so man.macros .TH Tcl_ParseArgsObjv 3 8.6 Tcl "Tcl Library Procedures" @@ -128,7 +128,7 @@ have the following signature: .RS .PP .CS -typedef int (*\fBTcl_ArgvFuncProc\fR)( +typedef int (\fBTcl_ArgvFuncProc\fR)( ClientData \fIclientData\fR, Tcl_Obj *\fIobjPtr\fR, void *\fIdstPtr\fR); @@ -150,7 +150,7 @@ function will have the following signature: .RS .PP .CS -typedef int (*\fBTcl_ArgvGenFuncProc\fR)( +typedef int (\fBTcl_ArgvGenFuncProc\fR)( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, int \fIobjc\fR, diff --git a/generic/regguts.h b/generic/regguts.h index 67e3d03..f72542c 100644 --- a/generic/regguts.h +++ b/generic/regguts.h @@ -75,11 +75,6 @@ #define NOPARMS void /* for empty parm lists */ #endif -/* const */ -#ifndef CONST -#define CONST const /* for old compilers, might be empty */ -#endif - /* function-pointer declarator */ #ifndef FUNCPTR #if __STDC__ >= 1 @@ -400,7 +395,7 @@ struct guts { struct cnfa search; /* for fast preliminary search */ int ntree; struct colormap cmap; - int FUNCPTR(compare, (CONST chr *, CONST chr *, size_t)); + int FUNCPTR(compare, (const chr *, const chr *, size_t)); struct subre *lacons; /* lookahead-constraint vector */ int nlacons; /* size of lacons */ }; diff --git a/generic/tcl.decls b/generic/tcl.decls index b0644ae..e9843a8 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.171 2009/09/24 17:19:17 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.172 2010/01/29 16:17:20 nijtmans Exp $ library tcl @@ -2124,7 +2124,7 @@ declare 581 generic { # TIP#304 (chan pipe) aferrieux declare 582 generic { - int Tcl_CreatePipe (Tcl_Interp *interp, Tcl_Channel *rchan, + int Tcl_CreatePipe(Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags) } diff --git a/generic/tcl.h b/generic/tcl.h index 201a3a1..21e97cc 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.298 2010/01/22 13:05:17 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.299 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef _TCL @@ -2231,9 +2231,9 @@ typedef struct { * argument types: */ -typedef int (*Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr, +typedef int (Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr, void *dstPtr); -typedef int (*Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, +typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, void *dstPtr); /* @@ -2342,7 +2342,6 @@ EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); #endif - /* * Single public declaration for NRE. */ @@ -2529,7 +2528,6 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, # define panicVA Tcl_PanicVA #endif - /* * Convenience declaration of Tcl_AppInit for backwards compatibility. This * function is not *implemented* by the tcl library, so the storage class is diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 23061a6..e5fabd1 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.172 2009/09/24 17:19:18 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.173 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -40,2314 +40,2285 @@ #ifndef Tcl_PkgProvideEx_TCL_DECLARED #define Tcl_PkgProvideEx_TCL_DECLARED /* 0 */ -EXTERN int Tcl_PkgProvideEx (Tcl_Interp * interp, - const char * name, const char * version, +EXTERN int Tcl_PkgProvideEx(Tcl_Interp *interp, + const char *name, const char *version, ClientData clientData); #endif #ifndef Tcl_PkgRequireEx_TCL_DECLARED #define Tcl_PkgRequireEx_TCL_DECLARED /* 1 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequireEx (Tcl_Interp * interp, - const char * name, const char * version, - int exact, ClientData * clientDataPtr); +EXTERN CONST84_RETURN char * Tcl_PkgRequireEx(Tcl_Interp *interp, + const char *name, const char *version, + int exact, ClientData *clientDataPtr); #endif #ifndef Tcl_Panic_TCL_DECLARED #define Tcl_Panic_TCL_DECLARED /* 2 */ -EXTERN void Tcl_Panic (const char * format, ...); +EXTERN void Tcl_Panic(const char *format, ...); #endif #ifndef Tcl_Alloc_TCL_DECLARED #define Tcl_Alloc_TCL_DECLARED /* 3 */ -EXTERN char * Tcl_Alloc (unsigned int size); +EXTERN char * Tcl_Alloc(unsigned int size); #endif #ifndef Tcl_Free_TCL_DECLARED #define Tcl_Free_TCL_DECLARED /* 4 */ -EXTERN void Tcl_Free (char * ptr); +EXTERN void Tcl_Free(char *ptr); #endif #ifndef Tcl_Realloc_TCL_DECLARED #define Tcl_Realloc_TCL_DECLARED /* 5 */ -EXTERN char * Tcl_Realloc (char * ptr, unsigned int size); +EXTERN char * Tcl_Realloc(char *ptr, unsigned int size); #endif #ifndef Tcl_DbCkalloc_TCL_DECLARED #define Tcl_DbCkalloc_TCL_DECLARED /* 6 */ -EXTERN char * Tcl_DbCkalloc (unsigned int size, const char * file, +EXTERN char * Tcl_DbCkalloc(unsigned int size, const char *file, int line); #endif #ifndef Tcl_DbCkfree_TCL_DECLARED #define Tcl_DbCkfree_TCL_DECLARED /* 7 */ -EXTERN void Tcl_DbCkfree (char * ptr, const char * file, - int line); +EXTERN void Tcl_DbCkfree(char *ptr, const char *file, int line); #endif #ifndef Tcl_DbCkrealloc_TCL_DECLARED #define Tcl_DbCkrealloc_TCL_DECLARED /* 8 */ -EXTERN char * Tcl_DbCkrealloc (char * ptr, unsigned int size, - const char * file, int line); +EXTERN char * Tcl_DbCkrealloc(char *ptr, unsigned int size, + const char *file, int line); #endif #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef Tcl_CreateFileHandler_TCL_DECLARED #define Tcl_CreateFileHandler_TCL_DECLARED /* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); +EXTERN void Tcl_CreateFileHandler(int fd, int mask, + Tcl_FileProc *proc, ClientData clientData); #endif #endif /* UNIX */ #ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_CreateFileHandler_TCL_DECLARED #define Tcl_CreateFileHandler_TCL_DECLARED /* 9 */ -EXTERN void Tcl_CreateFileHandler (int fd, int mask, - Tcl_FileProc * proc, ClientData clientData); +EXTERN void Tcl_CreateFileHandler(int fd, int mask, + Tcl_FileProc *proc, ClientData clientData); #endif #endif /* MACOSX */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef Tcl_DeleteFileHandler_TCL_DECLARED #define Tcl_DeleteFileHandler_TCL_DECLARED /* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); +EXTERN void Tcl_DeleteFileHandler(int fd); #endif #endif /* UNIX */ #ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_DeleteFileHandler_TCL_DECLARED #define Tcl_DeleteFileHandler_TCL_DECLARED /* 10 */ -EXTERN void Tcl_DeleteFileHandler (int fd); +EXTERN void Tcl_DeleteFileHandler(int fd); #endif #endif /* MACOSX */ #ifndef Tcl_SetTimer_TCL_DECLARED #define Tcl_SetTimer_TCL_DECLARED /* 11 */ -EXTERN void Tcl_SetTimer (const Tcl_Time * timePtr); +EXTERN void Tcl_SetTimer(const Tcl_Time *timePtr); #endif #ifndef Tcl_Sleep_TCL_DECLARED #define Tcl_Sleep_TCL_DECLARED /* 12 */ -EXTERN void Tcl_Sleep (int ms); +EXTERN void Tcl_Sleep(int ms); #endif #ifndef Tcl_WaitForEvent_TCL_DECLARED #define Tcl_WaitForEvent_TCL_DECLARED /* 13 */ -EXTERN int Tcl_WaitForEvent (const Tcl_Time * timePtr); +EXTERN int Tcl_WaitForEvent(const Tcl_Time *timePtr); #endif #ifndef Tcl_AppendAllObjTypes_TCL_DECLARED #define Tcl_AppendAllObjTypes_TCL_DECLARED /* 14 */ -EXTERN int Tcl_AppendAllObjTypes (Tcl_Interp * interp, - Tcl_Obj * objPtr); +EXTERN int Tcl_AppendAllObjTypes(Tcl_Interp *interp, + Tcl_Obj *objPtr); #endif #ifndef Tcl_AppendStringsToObj_TCL_DECLARED #define Tcl_AppendStringsToObj_TCL_DECLARED /* 15 */ -EXTERN void Tcl_AppendStringsToObj (Tcl_Obj * objPtr, ...); +EXTERN void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...); #endif #ifndef Tcl_AppendToObj_TCL_DECLARED #define Tcl_AppendToObj_TCL_DECLARED /* 16 */ -EXTERN void Tcl_AppendToObj (Tcl_Obj * objPtr, - const char * bytes, int length); +EXTERN void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes, + int length); #endif #ifndef Tcl_ConcatObj_TCL_DECLARED #define Tcl_ConcatObj_TCL_DECLARED /* 17 */ -EXTERN Tcl_Obj * Tcl_ConcatObj (int objc, Tcl_Obj *const objv[]); +EXTERN Tcl_Obj * Tcl_ConcatObj(int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_ConvertToType_TCL_DECLARED #define Tcl_ConvertToType_TCL_DECLARED /* 18 */ -EXTERN int Tcl_ConvertToType (Tcl_Interp * interp, - Tcl_Obj * objPtr, - const Tcl_ObjType * typePtr); +EXTERN int Tcl_ConvertToType(Tcl_Interp *interp, + Tcl_Obj *objPtr, const Tcl_ObjType *typePtr); #endif #ifndef Tcl_DbDecrRefCount_TCL_DECLARED #define Tcl_DbDecrRefCount_TCL_DECLARED /* 19 */ -EXTERN void Tcl_DbDecrRefCount (Tcl_Obj * objPtr, - const char * file, int line); +EXTERN void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, const char *file, + int line); #endif #ifndef Tcl_DbIncrRefCount_TCL_DECLARED #define Tcl_DbIncrRefCount_TCL_DECLARED /* 20 */ -EXTERN void Tcl_DbIncrRefCount (Tcl_Obj * objPtr, - const char * file, int line); +EXTERN void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, const char *file, + int line); #endif #ifndef Tcl_DbIsShared_TCL_DECLARED #define Tcl_DbIsShared_TCL_DECLARED /* 21 */ -EXTERN int Tcl_DbIsShared (Tcl_Obj * objPtr, const char * file, +EXTERN int Tcl_DbIsShared(Tcl_Obj *objPtr, const char *file, int line); #endif #ifndef Tcl_DbNewBooleanObj_TCL_DECLARED #define Tcl_DbNewBooleanObj_TCL_DECLARED /* 22 */ -EXTERN Tcl_Obj * Tcl_DbNewBooleanObj (int boolValue, - const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, const char *file, + int line); #endif #ifndef Tcl_DbNewByteArrayObj_TCL_DECLARED #define Tcl_DbNewByteArrayObj_TCL_DECLARED /* 23 */ -EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj (const unsigned char * bytes, - int length, const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj(const unsigned char *bytes, + int length, const char *file, int line); #endif #ifndef Tcl_DbNewDoubleObj_TCL_DECLARED #define Tcl_DbNewDoubleObj_TCL_DECLARED /* 24 */ -EXTERN Tcl_Obj * Tcl_DbNewDoubleObj (double doubleValue, - const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue, + const char *file, int line); #endif #ifndef Tcl_DbNewListObj_TCL_DECLARED #define Tcl_DbNewListObj_TCL_DECLARED /* 25 */ -EXTERN Tcl_Obj * Tcl_DbNewListObj (int objc, Tcl_Obj *const * objv, - const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv, + const char *file, int line); #endif #ifndef Tcl_DbNewLongObj_TCL_DECLARED #define Tcl_DbNewLongObj_TCL_DECLARED /* 26 */ -EXTERN Tcl_Obj * Tcl_DbNewLongObj (long longValue, const char * file, +EXTERN Tcl_Obj * Tcl_DbNewLongObj(long longValue, const char *file, int line); #endif #ifndef Tcl_DbNewObj_TCL_DECLARED #define Tcl_DbNewObj_TCL_DECLARED /* 27 */ -EXTERN Tcl_Obj * Tcl_DbNewObj (const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewObj(const char *file, int line); #endif #ifndef Tcl_DbNewStringObj_TCL_DECLARED #define Tcl_DbNewStringObj_TCL_DECLARED /* 28 */ -EXTERN Tcl_Obj * Tcl_DbNewStringObj (const char * bytes, int length, - const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewStringObj(const char *bytes, int length, + const char *file, int line); #endif #ifndef Tcl_DuplicateObj_TCL_DECLARED #define Tcl_DuplicateObj_TCL_DECLARED /* 29 */ -EXTERN Tcl_Obj * Tcl_DuplicateObj (Tcl_Obj * objPtr); +EXTERN Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr); #endif #ifndef TclFreeObj_TCL_DECLARED #define TclFreeObj_TCL_DECLARED /* 30 */ -EXTERN void TclFreeObj (Tcl_Obj * objPtr); +EXTERN void TclFreeObj(Tcl_Obj *objPtr); #endif #ifndef Tcl_GetBoolean_TCL_DECLARED #define Tcl_GetBoolean_TCL_DECLARED /* 31 */ -EXTERN int Tcl_GetBoolean (Tcl_Interp * interp, - const char * src, int * boolPtr); +EXTERN int Tcl_GetBoolean(Tcl_Interp *interp, const char *src, + int *boolPtr); #endif #ifndef Tcl_GetBooleanFromObj_TCL_DECLARED #define Tcl_GetBooleanFromObj_TCL_DECLARED /* 32 */ -EXTERN int Tcl_GetBooleanFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * boolPtr); +EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, int *boolPtr); #endif #ifndef Tcl_GetByteArrayFromObj_TCL_DECLARED #define Tcl_GetByteArrayFromObj_TCL_DECLARED /* 33 */ -EXTERN unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj * objPtr, - int * lengthPtr); +EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, + int *lengthPtr); #endif #ifndef Tcl_GetDouble_TCL_DECLARED #define Tcl_GetDouble_TCL_DECLARED /* 34 */ -EXTERN int Tcl_GetDouble (Tcl_Interp * interp, const char * src, - double * doublePtr); +EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src, + double *doublePtr); #endif #ifndef Tcl_GetDoubleFromObj_TCL_DECLARED #define Tcl_GetDoubleFromObj_TCL_DECLARED /* 35 */ -EXTERN int Tcl_GetDoubleFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * doublePtr); +EXTERN int Tcl_GetDoubleFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, double *doublePtr); #endif #ifndef Tcl_GetIndexFromObj_TCL_DECLARED #define Tcl_GetIndexFromObj_TCL_DECLARED /* 36 */ -EXTERN int Tcl_GetIndexFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, - CONST84 char *const * tablePtr, - const char * msg, int flags, int * indexPtr); +EXTERN int Tcl_GetIndexFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, + CONST84 char *const *tablePtr, + const char *msg, int flags, int *indexPtr); #endif #ifndef Tcl_GetInt_TCL_DECLARED #define Tcl_GetInt_TCL_DECLARED /* 37 */ -EXTERN int Tcl_GetInt (Tcl_Interp * interp, const char * src, - int * intPtr); +EXTERN int Tcl_GetInt(Tcl_Interp *interp, const char *src, + int *intPtr); #endif #ifndef Tcl_GetIntFromObj_TCL_DECLARED #define Tcl_GetIntFromObj_TCL_DECLARED /* 38 */ -EXTERN int Tcl_GetIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * intPtr); +EXTERN int Tcl_GetIntFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, int *intPtr); #endif #ifndef Tcl_GetLongFromObj_TCL_DECLARED #define Tcl_GetLongFromObj_TCL_DECLARED /* 39 */ -EXTERN int Tcl_GetLongFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * longPtr); +EXTERN int Tcl_GetLongFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, long *longPtr); #endif #ifndef Tcl_GetObjType_TCL_DECLARED #define Tcl_GetObjType_TCL_DECLARED /* 40 */ -EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType (const char * typeName); +EXTERN CONST86 Tcl_ObjType * Tcl_GetObjType(const char *typeName); #endif #ifndef Tcl_GetStringFromObj_TCL_DECLARED #define Tcl_GetStringFromObj_TCL_DECLARED /* 41 */ -EXTERN char * Tcl_GetStringFromObj (Tcl_Obj * objPtr, - int * lengthPtr); +EXTERN char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr); #endif #ifndef Tcl_InvalidateStringRep_TCL_DECLARED #define Tcl_InvalidateStringRep_TCL_DECLARED /* 42 */ -EXTERN void Tcl_InvalidateStringRep (Tcl_Obj * objPtr); +EXTERN void Tcl_InvalidateStringRep(Tcl_Obj *objPtr); #endif #ifndef Tcl_ListObjAppendList_TCL_DECLARED #define Tcl_ListObjAppendList_TCL_DECLARED /* 43 */ -EXTERN int Tcl_ListObjAppendList (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); +EXTERN int Tcl_ListObjAppendList(Tcl_Interp *interp, + Tcl_Obj *listPtr, Tcl_Obj *elemListPtr); #endif #ifndef Tcl_ListObjAppendElement_TCL_DECLARED #define Tcl_ListObjAppendElement_TCL_DECLARED /* 44 */ -EXTERN int Tcl_ListObjAppendElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, Tcl_Obj * objPtr); +EXTERN int Tcl_ListObjAppendElement(Tcl_Interp *interp, + Tcl_Obj *listPtr, Tcl_Obj *objPtr); #endif #ifndef Tcl_ListObjGetElements_TCL_DECLARED #define Tcl_ListObjGetElements_TCL_DECLARED /* 45 */ -EXTERN int Tcl_ListObjGetElements (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * objcPtr, - Tcl_Obj *** objvPtr); +EXTERN int Tcl_ListObjGetElements(Tcl_Interp *interp, + Tcl_Obj *listPtr, int *objcPtr, + Tcl_Obj ***objvPtr); #endif #ifndef Tcl_ListObjIndex_TCL_DECLARED #define Tcl_ListObjIndex_TCL_DECLARED /* 46 */ -EXTERN int Tcl_ListObjIndex (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj ** objPtrPtr); +EXTERN int Tcl_ListObjIndex(Tcl_Interp *interp, + Tcl_Obj *listPtr, int index, + Tcl_Obj **objPtrPtr); #endif #ifndef Tcl_ListObjLength_TCL_DECLARED #define Tcl_ListObjLength_TCL_DECLARED /* 47 */ -EXTERN int Tcl_ListObjLength (Tcl_Interp * interp, - Tcl_Obj * listPtr, int * lengthPtr); +EXTERN int Tcl_ListObjLength(Tcl_Interp *interp, + Tcl_Obj *listPtr, int *lengthPtr); #endif #ifndef Tcl_ListObjReplace_TCL_DECLARED #define Tcl_ListObjReplace_TCL_DECLARED /* 48 */ -EXTERN int Tcl_ListObjReplace (Tcl_Interp * interp, - Tcl_Obj * listPtr, int first, int count, +EXTERN int Tcl_ListObjReplace(Tcl_Interp *interp, + Tcl_Obj *listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_NewBooleanObj_TCL_DECLARED #define Tcl_NewBooleanObj_TCL_DECLARED /* 49 */ -EXTERN Tcl_Obj * Tcl_NewBooleanObj (int boolValue); +EXTERN Tcl_Obj * Tcl_NewBooleanObj(int boolValue); #endif #ifndef Tcl_NewByteArrayObj_TCL_DECLARED #define Tcl_NewByteArrayObj_TCL_DECLARED /* 50 */ -EXTERN Tcl_Obj * Tcl_NewByteArrayObj (const unsigned char * bytes, +EXTERN Tcl_Obj * Tcl_NewByteArrayObj(const unsigned char *bytes, int length); #endif #ifndef Tcl_NewDoubleObj_TCL_DECLARED #define Tcl_NewDoubleObj_TCL_DECLARED /* 51 */ -EXTERN Tcl_Obj * Tcl_NewDoubleObj (double doubleValue); +EXTERN Tcl_Obj * Tcl_NewDoubleObj(double doubleValue); #endif #ifndef Tcl_NewIntObj_TCL_DECLARED #define Tcl_NewIntObj_TCL_DECLARED /* 52 */ -EXTERN Tcl_Obj * Tcl_NewIntObj (int intValue); +EXTERN Tcl_Obj * Tcl_NewIntObj(int intValue); #endif #ifndef Tcl_NewListObj_TCL_DECLARED #define Tcl_NewListObj_TCL_DECLARED /* 53 */ -EXTERN Tcl_Obj * Tcl_NewListObj (int objc, Tcl_Obj *const objv[]); +EXTERN Tcl_Obj * Tcl_NewListObj(int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_NewLongObj_TCL_DECLARED #define Tcl_NewLongObj_TCL_DECLARED /* 54 */ -EXTERN Tcl_Obj * Tcl_NewLongObj (long longValue); +EXTERN Tcl_Obj * Tcl_NewLongObj(long longValue); #endif #ifndef Tcl_NewObj_TCL_DECLARED #define Tcl_NewObj_TCL_DECLARED /* 55 */ -EXTERN Tcl_Obj * Tcl_NewObj (void); +EXTERN Tcl_Obj * Tcl_NewObj(void); #endif #ifndef Tcl_NewStringObj_TCL_DECLARED #define Tcl_NewStringObj_TCL_DECLARED /* 56 */ -EXTERN Tcl_Obj * Tcl_NewStringObj (const char * bytes, int length); +EXTERN Tcl_Obj * Tcl_NewStringObj(const char *bytes, int length); #endif #ifndef Tcl_SetBooleanObj_TCL_DECLARED #define Tcl_SetBooleanObj_TCL_DECLARED /* 57 */ -EXTERN void Tcl_SetBooleanObj (Tcl_Obj * objPtr, int boolValue); +EXTERN void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue); #endif #ifndef Tcl_SetByteArrayLength_TCL_DECLARED #define Tcl_SetByteArrayLength_TCL_DECLARED /* 58 */ -EXTERN unsigned char * Tcl_SetByteArrayLength (Tcl_Obj * objPtr, int length); +EXTERN unsigned char * Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int length); #endif #ifndef Tcl_SetByteArrayObj_TCL_DECLARED #define Tcl_SetByteArrayObj_TCL_DECLARED /* 59 */ -EXTERN void Tcl_SetByteArrayObj (Tcl_Obj * objPtr, - const unsigned char * bytes, int length); +EXTERN void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, + const unsigned char *bytes, int length); #endif #ifndef Tcl_SetDoubleObj_TCL_DECLARED #define Tcl_SetDoubleObj_TCL_DECLARED /* 60 */ -EXTERN void Tcl_SetDoubleObj (Tcl_Obj * objPtr, - double doubleValue); +EXTERN void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue); #endif #ifndef Tcl_SetIntObj_TCL_DECLARED #define Tcl_SetIntObj_TCL_DECLARED /* 61 */ -EXTERN void Tcl_SetIntObj (Tcl_Obj * objPtr, int intValue); +EXTERN void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue); #endif #ifndef Tcl_SetListObj_TCL_DECLARED #define Tcl_SetListObj_TCL_DECLARED /* 62 */ -EXTERN void Tcl_SetListObj (Tcl_Obj * objPtr, int objc, +EXTERN void Tcl_SetListObj(Tcl_Obj *objPtr, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_SetLongObj_TCL_DECLARED #define Tcl_SetLongObj_TCL_DECLARED /* 63 */ -EXTERN void Tcl_SetLongObj (Tcl_Obj * objPtr, long longValue); +EXTERN void Tcl_SetLongObj(Tcl_Obj *objPtr, long longValue); #endif #ifndef Tcl_SetObjLength_TCL_DECLARED #define Tcl_SetObjLength_TCL_DECLARED /* 64 */ -EXTERN void Tcl_SetObjLength (Tcl_Obj * objPtr, int length); +EXTERN void Tcl_SetObjLength(Tcl_Obj *objPtr, int length); #endif #ifndef Tcl_SetStringObj_TCL_DECLARED #define Tcl_SetStringObj_TCL_DECLARED /* 65 */ -EXTERN void Tcl_SetStringObj (Tcl_Obj * objPtr, - const char * bytes, int length); +EXTERN void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes, + int length); #endif #ifndef Tcl_AddErrorInfo_TCL_DECLARED #define Tcl_AddErrorInfo_TCL_DECLARED /* 66 */ -EXTERN void Tcl_AddErrorInfo (Tcl_Interp * interp, - const char * message); +EXTERN void Tcl_AddErrorInfo(Tcl_Interp *interp, + const char *message); #endif #ifndef Tcl_AddObjErrorInfo_TCL_DECLARED #define Tcl_AddObjErrorInfo_TCL_DECLARED /* 67 */ -EXTERN void Tcl_AddObjErrorInfo (Tcl_Interp * interp, - const char * message, int length); +EXTERN void Tcl_AddObjErrorInfo(Tcl_Interp *interp, + const char *message, int length); #endif #ifndef Tcl_AllowExceptions_TCL_DECLARED #define Tcl_AllowExceptions_TCL_DECLARED /* 68 */ -EXTERN void Tcl_AllowExceptions (Tcl_Interp * interp); +EXTERN void Tcl_AllowExceptions(Tcl_Interp *interp); #endif #ifndef Tcl_AppendElement_TCL_DECLARED #define Tcl_AppendElement_TCL_DECLARED /* 69 */ -EXTERN void Tcl_AppendElement (Tcl_Interp * interp, - const char * element); +EXTERN void Tcl_AppendElement(Tcl_Interp *interp, + const char *element); #endif #ifndef Tcl_AppendResult_TCL_DECLARED #define Tcl_AppendResult_TCL_DECLARED /* 70 */ -EXTERN void Tcl_AppendResult (Tcl_Interp * interp, ...); +EXTERN void Tcl_AppendResult(Tcl_Interp *interp, ...); #endif #ifndef Tcl_AsyncCreate_TCL_DECLARED #define Tcl_AsyncCreate_TCL_DECLARED /* 71 */ -EXTERN Tcl_AsyncHandler Tcl_AsyncCreate (Tcl_AsyncProc * proc, +EXTERN Tcl_AsyncHandler Tcl_AsyncCreate(Tcl_AsyncProc *proc, ClientData clientData); #endif #ifndef Tcl_AsyncDelete_TCL_DECLARED #define Tcl_AsyncDelete_TCL_DECLARED /* 72 */ -EXTERN void Tcl_AsyncDelete (Tcl_AsyncHandler async); +EXTERN void Tcl_AsyncDelete(Tcl_AsyncHandler async); #endif #ifndef Tcl_AsyncInvoke_TCL_DECLARED #define Tcl_AsyncInvoke_TCL_DECLARED /* 73 */ -EXTERN int Tcl_AsyncInvoke (Tcl_Interp * interp, int code); +EXTERN int Tcl_AsyncInvoke(Tcl_Interp *interp, int code); #endif #ifndef Tcl_AsyncMark_TCL_DECLARED #define Tcl_AsyncMark_TCL_DECLARED /* 74 */ -EXTERN void Tcl_AsyncMark (Tcl_AsyncHandler async); +EXTERN void Tcl_AsyncMark(Tcl_AsyncHandler async); #endif #ifndef Tcl_AsyncReady_TCL_DECLARED #define Tcl_AsyncReady_TCL_DECLARED /* 75 */ -EXTERN int Tcl_AsyncReady (void); +EXTERN int Tcl_AsyncReady(void); #endif #ifndef Tcl_BackgroundError_TCL_DECLARED #define Tcl_BackgroundError_TCL_DECLARED /* 76 */ -EXTERN void Tcl_BackgroundError (Tcl_Interp * interp); +EXTERN void Tcl_BackgroundError(Tcl_Interp *interp); #endif #ifndef Tcl_Backslash_TCL_DECLARED #define Tcl_Backslash_TCL_DECLARED /* 77 */ -EXTERN char Tcl_Backslash (const char * src, int * readPtr); +EXTERN char Tcl_Backslash(const char *src, int *readPtr); #endif #ifndef Tcl_BadChannelOption_TCL_DECLARED #define Tcl_BadChannelOption_TCL_DECLARED /* 78 */ -EXTERN int Tcl_BadChannelOption (Tcl_Interp * interp, - const char * optionName, - const char * optionList); +EXTERN int Tcl_BadChannelOption(Tcl_Interp *interp, + const char *optionName, + const char *optionList); #endif #ifndef Tcl_CallWhenDeleted_TCL_DECLARED #define Tcl_CallWhenDeleted_TCL_DECLARED /* 79 */ -EXTERN void Tcl_CallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, +EXTERN void Tcl_CallWhenDeleted(Tcl_Interp *interp, + Tcl_InterpDeleteProc *proc, ClientData clientData); #endif #ifndef Tcl_CancelIdleCall_TCL_DECLARED #define Tcl_CancelIdleCall_TCL_DECLARED /* 80 */ -EXTERN void Tcl_CancelIdleCall (Tcl_IdleProc * idleProc, +EXTERN void Tcl_CancelIdleCall(Tcl_IdleProc *idleProc, ClientData clientData); #endif #ifndef Tcl_Close_TCL_DECLARED #define Tcl_Close_TCL_DECLARED /* 81 */ -EXTERN int Tcl_Close (Tcl_Interp * interp, Tcl_Channel chan); +EXTERN int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan); #endif #ifndef Tcl_CommandComplete_TCL_DECLARED #define Tcl_CommandComplete_TCL_DECLARED /* 82 */ -EXTERN int Tcl_CommandComplete (const char * cmd); +EXTERN int Tcl_CommandComplete(const char *cmd); #endif #ifndef Tcl_Concat_TCL_DECLARED #define Tcl_Concat_TCL_DECLARED /* 83 */ -EXTERN char * Tcl_Concat (int argc, CONST84 char *const * argv); +EXTERN char * Tcl_Concat(int argc, CONST84 char *const *argv); #endif #ifndef Tcl_ConvertElement_TCL_DECLARED #define Tcl_ConvertElement_TCL_DECLARED /* 84 */ -EXTERN int Tcl_ConvertElement (const char * src, char * dst, +EXTERN int Tcl_ConvertElement(const char *src, char *dst, int flags); #endif #ifndef Tcl_ConvertCountedElement_TCL_DECLARED #define Tcl_ConvertCountedElement_TCL_DECLARED /* 85 */ -EXTERN int Tcl_ConvertCountedElement (const char * src, - int length, char * dst, int flags); +EXTERN int Tcl_ConvertCountedElement(const char *src, + int length, char *dst, int flags); #endif #ifndef Tcl_CreateAlias_TCL_DECLARED #define Tcl_CreateAlias_TCL_DECLARED /* 86 */ -EXTERN int Tcl_CreateAlias (Tcl_Interp * slave, - const char * slaveCmd, Tcl_Interp * target, - const char * targetCmd, int argc, - CONST84 char *const * argv); +EXTERN int Tcl_CreateAlias(Tcl_Interp *slave, + const char *slaveCmd, Tcl_Interp *target, + const char *targetCmd, int argc, + CONST84 char *const *argv); #endif #ifndef Tcl_CreateAliasObj_TCL_DECLARED #define Tcl_CreateAliasObj_TCL_DECLARED /* 87 */ -EXTERN int Tcl_CreateAliasObj (Tcl_Interp * slave, - const char * slaveCmd, Tcl_Interp * target, - const char * targetCmd, int objc, +EXTERN int Tcl_CreateAliasObj(Tcl_Interp *slave, + const char *slaveCmd, Tcl_Interp *target, + const char *targetCmd, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_CreateChannel_TCL_DECLARED #define Tcl_CreateChannel_TCL_DECLARED /* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel (const Tcl_ChannelType * typePtr, - const char * chanName, +EXTERN Tcl_Channel Tcl_CreateChannel(const Tcl_ChannelType *typePtr, + const char *chanName, ClientData instanceData, int mask); #endif #ifndef Tcl_CreateChannelHandler_TCL_DECLARED #define Tcl_CreateChannelHandler_TCL_DECLARED /* 89 */ -EXTERN void Tcl_CreateChannelHandler (Tcl_Channel chan, int mask, - Tcl_ChannelProc * proc, - ClientData clientData); +EXTERN void Tcl_CreateChannelHandler(Tcl_Channel chan, int mask, + Tcl_ChannelProc *proc, ClientData clientData); #endif #ifndef Tcl_CreateCloseHandler_TCL_DECLARED #define Tcl_CreateCloseHandler_TCL_DECLARED /* 90 */ -EXTERN void Tcl_CreateCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); +EXTERN void Tcl_CreateCloseHandler(Tcl_Channel chan, + Tcl_CloseProc *proc, ClientData clientData); #endif #ifndef Tcl_CreateCommand_TCL_DECLARED #define Tcl_CreateCommand_TCL_DECLARED /* 91 */ -EXTERN Tcl_Command Tcl_CreateCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_CmdProc * proc, +EXTERN Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp, + const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); + Tcl_CmdDeleteProc *deleteProc); #endif #ifndef Tcl_CreateEventSource_TCL_DECLARED #define Tcl_CreateEventSource_TCL_DECLARED /* 92 */ -EXTERN void Tcl_CreateEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, +EXTERN void Tcl_CreateEventSource(Tcl_EventSetupProc *setupProc, + Tcl_EventCheckProc *checkProc, ClientData clientData); #endif #ifndef Tcl_CreateExitHandler_TCL_DECLARED #define Tcl_CreateExitHandler_TCL_DECLARED /* 93 */ -EXTERN void Tcl_CreateExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_CreateExitHandler(Tcl_ExitProc *proc, ClientData clientData); #endif #ifndef Tcl_CreateInterp_TCL_DECLARED #define Tcl_CreateInterp_TCL_DECLARED /* 94 */ -EXTERN Tcl_Interp * Tcl_CreateInterp (void); +EXTERN Tcl_Interp * Tcl_CreateInterp(void); #endif #ifndef Tcl_CreateMathFunc_TCL_DECLARED #define Tcl_CreateMathFunc_TCL_DECLARED /* 95 */ -EXTERN void Tcl_CreateMathFunc (Tcl_Interp * interp, - const char * name, int numArgs, - Tcl_ValueType * argTypes, - Tcl_MathProc * proc, ClientData clientData); +EXTERN void Tcl_CreateMathFunc(Tcl_Interp *interp, + const char *name, int numArgs, + Tcl_ValueType *argTypes, Tcl_MathProc *proc, + ClientData clientData); #endif #ifndef Tcl_CreateObjCommand_TCL_DECLARED #define Tcl_CreateObjCommand_TCL_DECLARED /* 96 */ -EXTERN Tcl_Command Tcl_CreateObjCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_ObjCmdProc * proc, +EXTERN Tcl_Command Tcl_CreateObjCommand(Tcl_Interp *interp, + const char *cmdName, Tcl_ObjCmdProc *proc, ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); + Tcl_CmdDeleteProc *deleteProc); #endif #ifndef Tcl_CreateSlave_TCL_DECLARED #define Tcl_CreateSlave_TCL_DECLARED /* 97 */ -EXTERN Tcl_Interp * Tcl_CreateSlave (Tcl_Interp * interp, - const char * slaveName, int isSafe); +EXTERN Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp, + const char *slaveName, int isSafe); #endif #ifndef Tcl_CreateTimerHandler_TCL_DECLARED #define Tcl_CreateTimerHandler_TCL_DECLARED /* 98 */ -EXTERN Tcl_TimerToken Tcl_CreateTimerHandler (int milliseconds, - Tcl_TimerProc * proc, ClientData clientData); +EXTERN Tcl_TimerToken Tcl_CreateTimerHandler(int milliseconds, + Tcl_TimerProc *proc, ClientData clientData); #endif #ifndef Tcl_CreateTrace_TCL_DECLARED #define Tcl_CreateTrace_TCL_DECLARED /* 99 */ -EXTERN Tcl_Trace Tcl_CreateTrace (Tcl_Interp * interp, int level, - Tcl_CmdTraceProc * proc, +EXTERN Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, int level, + Tcl_CmdTraceProc *proc, ClientData clientData); #endif #ifndef Tcl_DeleteAssocData_TCL_DECLARED #define Tcl_DeleteAssocData_TCL_DECLARED /* 100 */ -EXTERN void Tcl_DeleteAssocData (Tcl_Interp * interp, - const char * name); +EXTERN void Tcl_DeleteAssocData(Tcl_Interp *interp, + const char *name); #endif #ifndef Tcl_DeleteChannelHandler_TCL_DECLARED #define Tcl_DeleteChannelHandler_TCL_DECLARED /* 101 */ -EXTERN void Tcl_DeleteChannelHandler (Tcl_Channel chan, - Tcl_ChannelProc * proc, - ClientData clientData); +EXTERN void Tcl_DeleteChannelHandler(Tcl_Channel chan, + Tcl_ChannelProc *proc, ClientData clientData); #endif #ifndef Tcl_DeleteCloseHandler_TCL_DECLARED #define Tcl_DeleteCloseHandler_TCL_DECLARED /* 102 */ -EXTERN void Tcl_DeleteCloseHandler (Tcl_Channel chan, - Tcl_CloseProc * proc, ClientData clientData); +EXTERN void Tcl_DeleteCloseHandler(Tcl_Channel chan, + Tcl_CloseProc *proc, ClientData clientData); #endif #ifndef Tcl_DeleteCommand_TCL_DECLARED #define Tcl_DeleteCommand_TCL_DECLARED /* 103 */ -EXTERN int Tcl_DeleteCommand (Tcl_Interp * interp, - const char * cmdName); +EXTERN int Tcl_DeleteCommand(Tcl_Interp *interp, + const char *cmdName); #endif #ifndef Tcl_DeleteCommandFromToken_TCL_DECLARED #define Tcl_DeleteCommandFromToken_TCL_DECLARED /* 104 */ -EXTERN int Tcl_DeleteCommandFromToken (Tcl_Interp * interp, +EXTERN int Tcl_DeleteCommandFromToken(Tcl_Interp *interp, Tcl_Command command); #endif #ifndef Tcl_DeleteEvents_TCL_DECLARED #define Tcl_DeleteEvents_TCL_DECLARED /* 105 */ -EXTERN void Tcl_DeleteEvents (Tcl_EventDeleteProc * proc, +EXTERN void Tcl_DeleteEvents(Tcl_EventDeleteProc *proc, ClientData clientData); #endif #ifndef Tcl_DeleteEventSource_TCL_DECLARED #define Tcl_DeleteEventSource_TCL_DECLARED /* 106 */ -EXTERN void Tcl_DeleteEventSource ( - Tcl_EventSetupProc * setupProc, - Tcl_EventCheckProc * checkProc, +EXTERN void Tcl_DeleteEventSource(Tcl_EventSetupProc *setupProc, + Tcl_EventCheckProc *checkProc, ClientData clientData); #endif #ifndef Tcl_DeleteExitHandler_TCL_DECLARED #define Tcl_DeleteExitHandler_TCL_DECLARED /* 107 */ -EXTERN void Tcl_DeleteExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_DeleteExitHandler(Tcl_ExitProc *proc, ClientData clientData); #endif #ifndef Tcl_DeleteHashEntry_TCL_DECLARED #define Tcl_DeleteHashEntry_TCL_DECLARED /* 108 */ -EXTERN void Tcl_DeleteHashEntry (Tcl_HashEntry * entryPtr); +EXTERN void Tcl_DeleteHashEntry(Tcl_HashEntry *entryPtr); #endif #ifndef Tcl_DeleteHashTable_TCL_DECLARED #define Tcl_DeleteHashTable_TCL_DECLARED /* 109 */ -EXTERN void Tcl_DeleteHashTable (Tcl_HashTable * tablePtr); +EXTERN void Tcl_DeleteHashTable(Tcl_HashTable *tablePtr); #endif #ifndef Tcl_DeleteInterp_TCL_DECLARED #define Tcl_DeleteInterp_TCL_DECLARED /* 110 */ -EXTERN void Tcl_DeleteInterp (Tcl_Interp * interp); +EXTERN void Tcl_DeleteInterp(Tcl_Interp *interp); #endif #ifndef Tcl_DetachPids_TCL_DECLARED #define Tcl_DetachPids_TCL_DECLARED /* 111 */ -EXTERN void Tcl_DetachPids (int numPids, Tcl_Pid * pidPtr); +EXTERN void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr); #endif #ifndef Tcl_DeleteTimerHandler_TCL_DECLARED #define Tcl_DeleteTimerHandler_TCL_DECLARED /* 112 */ -EXTERN void Tcl_DeleteTimerHandler (Tcl_TimerToken token); +EXTERN void Tcl_DeleteTimerHandler(Tcl_TimerToken token); #endif #ifndef Tcl_DeleteTrace_TCL_DECLARED #define Tcl_DeleteTrace_TCL_DECLARED /* 113 */ -EXTERN void Tcl_DeleteTrace (Tcl_Interp * interp, - Tcl_Trace trace); +EXTERN void Tcl_DeleteTrace(Tcl_Interp *interp, Tcl_Trace trace); #endif #ifndef Tcl_DontCallWhenDeleted_TCL_DECLARED #define Tcl_DontCallWhenDeleted_TCL_DECLARED /* 114 */ -EXTERN void Tcl_DontCallWhenDeleted (Tcl_Interp * interp, - Tcl_InterpDeleteProc * proc, +EXTERN void Tcl_DontCallWhenDeleted(Tcl_Interp *interp, + Tcl_InterpDeleteProc *proc, ClientData clientData); #endif #ifndef Tcl_DoOneEvent_TCL_DECLARED #define Tcl_DoOneEvent_TCL_DECLARED /* 115 */ -EXTERN int Tcl_DoOneEvent (int flags); +EXTERN int Tcl_DoOneEvent(int flags); #endif #ifndef Tcl_DoWhenIdle_TCL_DECLARED #define Tcl_DoWhenIdle_TCL_DECLARED /* 116 */ -EXTERN void Tcl_DoWhenIdle (Tcl_IdleProc * proc, +EXTERN void Tcl_DoWhenIdle(Tcl_IdleProc *proc, ClientData clientData); #endif #ifndef Tcl_DStringAppend_TCL_DECLARED #define Tcl_DStringAppend_TCL_DECLARED /* 117 */ -EXTERN char * Tcl_DStringAppend (Tcl_DString * dsPtr, - const char * bytes, int length); +EXTERN char * Tcl_DStringAppend(Tcl_DString *dsPtr, + const char *bytes, int length); #endif #ifndef Tcl_DStringAppendElement_TCL_DECLARED #define Tcl_DStringAppendElement_TCL_DECLARED /* 118 */ -EXTERN char * Tcl_DStringAppendElement (Tcl_DString * dsPtr, - const char * element); +EXTERN char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, + const char *element); #endif #ifndef Tcl_DStringEndSublist_TCL_DECLARED #define Tcl_DStringEndSublist_TCL_DECLARED /* 119 */ -EXTERN void Tcl_DStringEndSublist (Tcl_DString * dsPtr); +EXTERN void Tcl_DStringEndSublist(Tcl_DString *dsPtr); #endif #ifndef Tcl_DStringFree_TCL_DECLARED #define Tcl_DStringFree_TCL_DECLARED /* 120 */ -EXTERN void Tcl_DStringFree (Tcl_DString * dsPtr); +EXTERN void Tcl_DStringFree(Tcl_DString *dsPtr); #endif #ifndef Tcl_DStringGetResult_TCL_DECLARED #define Tcl_DStringGetResult_TCL_DECLARED /* 121 */ -EXTERN void Tcl_DStringGetResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); +EXTERN void Tcl_DStringGetResult(Tcl_Interp *interp, + Tcl_DString *dsPtr); #endif #ifndef Tcl_DStringInit_TCL_DECLARED #define Tcl_DStringInit_TCL_DECLARED /* 122 */ -EXTERN void Tcl_DStringInit (Tcl_DString * dsPtr); +EXTERN void Tcl_DStringInit(Tcl_DString *dsPtr); #endif #ifndef Tcl_DStringResult_TCL_DECLARED #define Tcl_DStringResult_TCL_DECLARED /* 123 */ -EXTERN void Tcl_DStringResult (Tcl_Interp * interp, - Tcl_DString * dsPtr); +EXTERN void Tcl_DStringResult(Tcl_Interp *interp, + Tcl_DString *dsPtr); #endif #ifndef Tcl_DStringSetLength_TCL_DECLARED #define Tcl_DStringSetLength_TCL_DECLARED /* 124 */ -EXTERN void Tcl_DStringSetLength (Tcl_DString * dsPtr, - int length); +EXTERN void Tcl_DStringSetLength(Tcl_DString *dsPtr, int length); #endif #ifndef Tcl_DStringStartSublist_TCL_DECLARED #define Tcl_DStringStartSublist_TCL_DECLARED /* 125 */ -EXTERN void Tcl_DStringStartSublist (Tcl_DString * dsPtr); +EXTERN void Tcl_DStringStartSublist(Tcl_DString *dsPtr); #endif #ifndef Tcl_Eof_TCL_DECLARED #define Tcl_Eof_TCL_DECLARED /* 126 */ -EXTERN int Tcl_Eof (Tcl_Channel chan); +EXTERN int Tcl_Eof(Tcl_Channel chan); #endif #ifndef Tcl_ErrnoId_TCL_DECLARED #define Tcl_ErrnoId_TCL_DECLARED /* 127 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoId (void); +EXTERN CONST84_RETURN char * Tcl_ErrnoId(void); #endif #ifndef Tcl_ErrnoMsg_TCL_DECLARED #define Tcl_ErrnoMsg_TCL_DECLARED /* 128 */ -EXTERN CONST84_RETURN char * Tcl_ErrnoMsg (int err); +EXTERN CONST84_RETURN char * Tcl_ErrnoMsg(int err); #endif #ifndef Tcl_Eval_TCL_DECLARED #define Tcl_Eval_TCL_DECLARED /* 129 */ -EXTERN int Tcl_Eval (Tcl_Interp * interp, const char * script); +EXTERN int Tcl_Eval(Tcl_Interp *interp, const char *script); #endif #ifndef Tcl_EvalFile_TCL_DECLARED #define Tcl_EvalFile_TCL_DECLARED /* 130 */ -EXTERN int Tcl_EvalFile (Tcl_Interp * interp, - const char * fileName); +EXTERN int Tcl_EvalFile(Tcl_Interp *interp, + const char *fileName); #endif #ifndef Tcl_EvalObj_TCL_DECLARED #define Tcl_EvalObj_TCL_DECLARED /* 131 */ -EXTERN int Tcl_EvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr); +EXTERN int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr); #endif #ifndef Tcl_EventuallyFree_TCL_DECLARED #define Tcl_EventuallyFree_TCL_DECLARED /* 132 */ -EXTERN void Tcl_EventuallyFree (ClientData clientData, - Tcl_FreeProc * freeProc); +EXTERN void Tcl_EventuallyFree(ClientData clientData, + Tcl_FreeProc *freeProc); #endif #ifndef Tcl_Exit_TCL_DECLARED #define Tcl_Exit_TCL_DECLARED /* 133 */ -EXTERN void Tcl_Exit (int status); +EXTERN void Tcl_Exit(int status); #endif #ifndef Tcl_ExposeCommand_TCL_DECLARED #define Tcl_ExposeCommand_TCL_DECLARED /* 134 */ -EXTERN int Tcl_ExposeCommand (Tcl_Interp * interp, - const char * hiddenCmdToken, - const char * cmdName); +EXTERN int Tcl_ExposeCommand(Tcl_Interp *interp, + const char *hiddenCmdToken, + const char *cmdName); #endif #ifndef Tcl_ExprBoolean_TCL_DECLARED #define Tcl_ExprBoolean_TCL_DECLARED /* 135 */ -EXTERN int Tcl_ExprBoolean (Tcl_Interp * interp, - const char * expr, int * ptr); +EXTERN int Tcl_ExprBoolean(Tcl_Interp *interp, const char *expr, + int *ptr); #endif #ifndef Tcl_ExprBooleanObj_TCL_DECLARED #define Tcl_ExprBooleanObj_TCL_DECLARED /* 136 */ -EXTERN int Tcl_ExprBooleanObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * ptr); +EXTERN int Tcl_ExprBooleanObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, int *ptr); #endif #ifndef Tcl_ExprDouble_TCL_DECLARED #define Tcl_ExprDouble_TCL_DECLARED /* 137 */ -EXTERN int Tcl_ExprDouble (Tcl_Interp * interp, - const char * expr, double * ptr); +EXTERN int Tcl_ExprDouble(Tcl_Interp *interp, const char *expr, + double *ptr); #endif #ifndef Tcl_ExprDoubleObj_TCL_DECLARED #define Tcl_ExprDoubleObj_TCL_DECLARED /* 138 */ -EXTERN int Tcl_ExprDoubleObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, double * ptr); +EXTERN int Tcl_ExprDoubleObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, double *ptr); #endif #ifndef Tcl_ExprLong_TCL_DECLARED #define Tcl_ExprLong_TCL_DECLARED /* 139 */ -EXTERN int Tcl_ExprLong (Tcl_Interp * interp, const char * expr, - long * ptr); +EXTERN int Tcl_ExprLong(Tcl_Interp *interp, const char *expr, + long *ptr); #endif #ifndef Tcl_ExprLongObj_TCL_DECLARED #define Tcl_ExprLongObj_TCL_DECLARED /* 140 */ -EXTERN int Tcl_ExprLongObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, long * ptr); +EXTERN int Tcl_ExprLongObj(Tcl_Interp *interp, Tcl_Obj *objPtr, + long *ptr); #endif #ifndef Tcl_ExprObj_TCL_DECLARED #define Tcl_ExprObj_TCL_DECLARED /* 141 */ -EXTERN int Tcl_ExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - Tcl_Obj ** resultPtrPtr); +EXTERN int Tcl_ExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr, + Tcl_Obj **resultPtrPtr); #endif #ifndef Tcl_ExprString_TCL_DECLARED #define Tcl_ExprString_TCL_DECLARED /* 142 */ -EXTERN int Tcl_ExprString (Tcl_Interp * interp, - const char * expr); +EXTERN int Tcl_ExprString(Tcl_Interp *interp, const char *expr); #endif #ifndef Tcl_Finalize_TCL_DECLARED #define Tcl_Finalize_TCL_DECLARED /* 143 */ -EXTERN void Tcl_Finalize (void); +EXTERN void Tcl_Finalize(void); #endif #ifndef Tcl_FindExecutable_TCL_DECLARED #define Tcl_FindExecutable_TCL_DECLARED /* 144 */ -EXTERN void Tcl_FindExecutable (const char * argv0); +EXTERN void Tcl_FindExecutable(const char *argv0); #endif #ifndef Tcl_FirstHashEntry_TCL_DECLARED #define Tcl_FirstHashEntry_TCL_DECLARED /* 145 */ -EXTERN Tcl_HashEntry * Tcl_FirstHashEntry (Tcl_HashTable * tablePtr, - Tcl_HashSearch * searchPtr); +EXTERN Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr, + Tcl_HashSearch *searchPtr); #endif #ifndef Tcl_Flush_TCL_DECLARED #define Tcl_Flush_TCL_DECLARED /* 146 */ -EXTERN int Tcl_Flush (Tcl_Channel chan); +EXTERN int Tcl_Flush(Tcl_Channel chan); #endif #ifndef Tcl_FreeResult_TCL_DECLARED #define Tcl_FreeResult_TCL_DECLARED /* 147 */ -EXTERN void Tcl_FreeResult (Tcl_Interp * interp); +EXTERN void Tcl_FreeResult(Tcl_Interp *interp); #endif #ifndef Tcl_GetAlias_TCL_DECLARED #define Tcl_GetAlias_TCL_DECLARED /* 148 */ -EXTERN int Tcl_GetAlias (Tcl_Interp * interp, - const char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * argcPtr, - CONST84 char *** argvPtr); +EXTERN int Tcl_GetAlias(Tcl_Interp *interp, + const char *slaveCmd, + Tcl_Interp **targetInterpPtr, + CONST84 char **targetCmdPtr, int *argcPtr, + CONST84 char ***argvPtr); #endif #ifndef Tcl_GetAliasObj_TCL_DECLARED #define Tcl_GetAliasObj_TCL_DECLARED /* 149 */ -EXTERN int Tcl_GetAliasObj (Tcl_Interp * interp, - const char * slaveCmd, - Tcl_Interp ** targetInterpPtr, - CONST84 char ** targetCmdPtr, int * objcPtr, - Tcl_Obj *** objv); +EXTERN int Tcl_GetAliasObj(Tcl_Interp *interp, + const char *slaveCmd, + Tcl_Interp **targetInterpPtr, + CONST84 char **targetCmdPtr, int *objcPtr, + Tcl_Obj ***objv); #endif #ifndef Tcl_GetAssocData_TCL_DECLARED #define Tcl_GetAssocData_TCL_DECLARED /* 150 */ -EXTERN ClientData Tcl_GetAssocData (Tcl_Interp * interp, - const char * name, - Tcl_InterpDeleteProc ** procPtr); +EXTERN ClientData Tcl_GetAssocData(Tcl_Interp *interp, + const char *name, + Tcl_InterpDeleteProc **procPtr); #endif #ifndef Tcl_GetChannel_TCL_DECLARED #define Tcl_GetChannel_TCL_DECLARED /* 151 */ -EXTERN Tcl_Channel Tcl_GetChannel (Tcl_Interp * interp, - const char * chanName, int * modePtr); +EXTERN Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp, + const char *chanName, int *modePtr); #endif #ifndef Tcl_GetChannelBufferSize_TCL_DECLARED #define Tcl_GetChannelBufferSize_TCL_DECLARED /* 152 */ -EXTERN int Tcl_GetChannelBufferSize (Tcl_Channel chan); +EXTERN int Tcl_GetChannelBufferSize(Tcl_Channel chan); #endif #ifndef Tcl_GetChannelHandle_TCL_DECLARED #define Tcl_GetChannelHandle_TCL_DECLARED /* 153 */ -EXTERN int Tcl_GetChannelHandle (Tcl_Channel chan, - int direction, ClientData * handlePtr); +EXTERN int Tcl_GetChannelHandle(Tcl_Channel chan, int direction, + ClientData *handlePtr); #endif #ifndef Tcl_GetChannelInstanceData_TCL_DECLARED #define Tcl_GetChannelInstanceData_TCL_DECLARED /* 154 */ -EXTERN ClientData Tcl_GetChannelInstanceData (Tcl_Channel chan); +EXTERN ClientData Tcl_GetChannelInstanceData(Tcl_Channel chan); #endif #ifndef Tcl_GetChannelMode_TCL_DECLARED #define Tcl_GetChannelMode_TCL_DECLARED /* 155 */ -EXTERN int Tcl_GetChannelMode (Tcl_Channel chan); +EXTERN int Tcl_GetChannelMode(Tcl_Channel chan); #endif #ifndef Tcl_GetChannelName_TCL_DECLARED #define Tcl_GetChannelName_TCL_DECLARED /* 156 */ -EXTERN CONST84_RETURN char * Tcl_GetChannelName (Tcl_Channel chan); +EXTERN CONST84_RETURN char * Tcl_GetChannelName(Tcl_Channel chan); #endif #ifndef Tcl_GetChannelOption_TCL_DECLARED #define Tcl_GetChannelOption_TCL_DECLARED /* 157 */ -EXTERN int Tcl_GetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, const char * optionName, - Tcl_DString * dsPtr); +EXTERN int Tcl_GetChannelOption(Tcl_Interp *interp, + Tcl_Channel chan, const char *optionName, + Tcl_DString *dsPtr); #endif #ifndef Tcl_GetChannelType_TCL_DECLARED #define Tcl_GetChannelType_TCL_DECLARED /* 158 */ -EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType (Tcl_Channel chan); +EXTERN CONST86 Tcl_ChannelType * Tcl_GetChannelType(Tcl_Channel chan); #endif #ifndef Tcl_GetCommandInfo_TCL_DECLARED #define Tcl_GetCommandInfo_TCL_DECLARED /* 159 */ -EXTERN int Tcl_GetCommandInfo (Tcl_Interp * interp, - const char * cmdName, Tcl_CmdInfo * infoPtr); +EXTERN int Tcl_GetCommandInfo(Tcl_Interp *interp, + const char *cmdName, Tcl_CmdInfo *infoPtr); #endif #ifndef Tcl_GetCommandName_TCL_DECLARED #define Tcl_GetCommandName_TCL_DECLARED /* 160 */ -EXTERN CONST84_RETURN char * Tcl_GetCommandName (Tcl_Interp * interp, +EXTERN CONST84_RETURN char * Tcl_GetCommandName(Tcl_Interp *interp, Tcl_Command command); #endif #ifndef Tcl_GetErrno_TCL_DECLARED #define Tcl_GetErrno_TCL_DECLARED /* 161 */ -EXTERN int Tcl_GetErrno (void); +EXTERN int Tcl_GetErrno(void); #endif #ifndef Tcl_GetHostName_TCL_DECLARED #define Tcl_GetHostName_TCL_DECLARED /* 162 */ -EXTERN CONST84_RETURN char * Tcl_GetHostName (void); +EXTERN CONST84_RETURN char * Tcl_GetHostName(void); #endif #ifndef Tcl_GetInterpPath_TCL_DECLARED #define Tcl_GetInterpPath_TCL_DECLARED /* 163 */ -EXTERN int Tcl_GetInterpPath (Tcl_Interp * askInterp, - Tcl_Interp * slaveInterp); +EXTERN int Tcl_GetInterpPath(Tcl_Interp *askInterp, + Tcl_Interp *slaveInterp); #endif #ifndef Tcl_GetMaster_TCL_DECLARED #define Tcl_GetMaster_TCL_DECLARED /* 164 */ -EXTERN Tcl_Interp * Tcl_GetMaster (Tcl_Interp * interp); +EXTERN Tcl_Interp * Tcl_GetMaster(Tcl_Interp *interp); #endif #ifndef Tcl_GetNameOfExecutable_TCL_DECLARED #define Tcl_GetNameOfExecutable_TCL_DECLARED /* 165 */ -EXTERN const char * Tcl_GetNameOfExecutable (void); +EXTERN const char * Tcl_GetNameOfExecutable(void); #endif #ifndef Tcl_GetObjResult_TCL_DECLARED #define Tcl_GetObjResult_TCL_DECLARED /* 166 */ -EXTERN Tcl_Obj * Tcl_GetObjResult (Tcl_Interp * interp); +EXTERN Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp); #endif #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ #ifndef Tcl_GetOpenFile_TCL_DECLARED #define Tcl_GetOpenFile_TCL_DECLARED /* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - const char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); +EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp, + const char *chanID, int forWriting, + int checkUsage, ClientData *filePtr); #endif #endif /* UNIX */ #ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_GetOpenFile_TCL_DECLARED #define Tcl_GetOpenFile_TCL_DECLARED /* 167 */ -EXTERN int Tcl_GetOpenFile (Tcl_Interp * interp, - const char * chanID, int forWriting, - int checkUsage, ClientData * filePtr); +EXTERN int Tcl_GetOpenFile(Tcl_Interp *interp, + const char *chanID, int forWriting, + int checkUsage, ClientData *filePtr); #endif #endif /* MACOSX */ #ifndef Tcl_GetPathType_TCL_DECLARED #define Tcl_GetPathType_TCL_DECLARED /* 168 */ -EXTERN Tcl_PathType Tcl_GetPathType (const char * path); +EXTERN Tcl_PathType Tcl_GetPathType(const char *path); #endif #ifndef Tcl_Gets_TCL_DECLARED #define Tcl_Gets_TCL_DECLARED /* 169 */ -EXTERN int Tcl_Gets (Tcl_Channel chan, Tcl_DString * dsPtr); +EXTERN int Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr); #endif #ifndef Tcl_GetsObj_TCL_DECLARED #define Tcl_GetsObj_TCL_DECLARED /* 170 */ -EXTERN int Tcl_GetsObj (Tcl_Channel chan, Tcl_Obj * objPtr); +EXTERN int Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr); #endif #ifndef Tcl_GetServiceMode_TCL_DECLARED #define Tcl_GetServiceMode_TCL_DECLARED /* 171 */ -EXTERN int Tcl_GetServiceMode (void); +EXTERN int Tcl_GetServiceMode(void); #endif #ifndef Tcl_GetSlave_TCL_DECLARED #define Tcl_GetSlave_TCL_DECLARED /* 172 */ -EXTERN Tcl_Interp * Tcl_GetSlave (Tcl_Interp * interp, - const char * slaveName); +EXTERN Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp, + const char *slaveName); #endif #ifndef Tcl_GetStdChannel_TCL_DECLARED #define Tcl_GetStdChannel_TCL_DECLARED /* 173 */ -EXTERN Tcl_Channel Tcl_GetStdChannel (int type); +EXTERN Tcl_Channel Tcl_GetStdChannel(int type); #endif #ifndef Tcl_GetStringResult_TCL_DECLARED #define Tcl_GetStringResult_TCL_DECLARED /* 174 */ -EXTERN CONST84_RETURN char * Tcl_GetStringResult (Tcl_Interp * interp); +EXTERN CONST84_RETURN char * Tcl_GetStringResult(Tcl_Interp *interp); #endif #ifndef Tcl_GetVar_TCL_DECLARED #define Tcl_GetVar_TCL_DECLARED /* 175 */ -EXTERN CONST84_RETURN char * Tcl_GetVar (Tcl_Interp * interp, - const char * varName, int flags); +EXTERN CONST84_RETURN char * Tcl_GetVar(Tcl_Interp *interp, + const char *varName, int flags); #endif #ifndef Tcl_GetVar2_TCL_DECLARED #define Tcl_GetVar2_TCL_DECLARED /* 176 */ -EXTERN CONST84_RETURN char * Tcl_GetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, +EXTERN CONST84_RETURN char * Tcl_GetVar2(Tcl_Interp *interp, + const char *part1, const char *part2, int flags); #endif #ifndef Tcl_GlobalEval_TCL_DECLARED #define Tcl_GlobalEval_TCL_DECLARED /* 177 */ -EXTERN int Tcl_GlobalEval (Tcl_Interp * interp, - const char * command); +EXTERN int Tcl_GlobalEval(Tcl_Interp *interp, + const char *command); #endif #ifndef Tcl_GlobalEvalObj_TCL_DECLARED #define Tcl_GlobalEvalObj_TCL_DECLARED /* 178 */ -EXTERN int Tcl_GlobalEvalObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); +EXTERN int Tcl_GlobalEvalObj(Tcl_Interp *interp, + Tcl_Obj *objPtr); #endif #ifndef Tcl_HideCommand_TCL_DECLARED #define Tcl_HideCommand_TCL_DECLARED /* 179 */ -EXTERN int Tcl_HideCommand (Tcl_Interp * interp, - const char * cmdName, - const char * hiddenCmdToken); +EXTERN int Tcl_HideCommand(Tcl_Interp *interp, + const char *cmdName, + const char *hiddenCmdToken); #endif #ifndef Tcl_Init_TCL_DECLARED #define Tcl_Init_TCL_DECLARED /* 180 */ -EXTERN int Tcl_Init (Tcl_Interp * interp); +EXTERN int Tcl_Init(Tcl_Interp *interp); #endif #ifndef Tcl_InitHashTable_TCL_DECLARED #define Tcl_InitHashTable_TCL_DECLARED /* 181 */ -EXTERN void Tcl_InitHashTable (Tcl_HashTable * tablePtr, +EXTERN void Tcl_InitHashTable(Tcl_HashTable *tablePtr, int keyType); #endif #ifndef Tcl_InputBlocked_TCL_DECLARED #define Tcl_InputBlocked_TCL_DECLARED /* 182 */ -EXTERN int Tcl_InputBlocked (Tcl_Channel chan); +EXTERN int Tcl_InputBlocked(Tcl_Channel chan); #endif #ifndef Tcl_InputBuffered_TCL_DECLARED #define Tcl_InputBuffered_TCL_DECLARED /* 183 */ -EXTERN int Tcl_InputBuffered (Tcl_Channel chan); +EXTERN int Tcl_InputBuffered(Tcl_Channel chan); #endif #ifndef Tcl_InterpDeleted_TCL_DECLARED #define Tcl_InterpDeleted_TCL_DECLARED /* 184 */ -EXTERN int Tcl_InterpDeleted (Tcl_Interp * interp); +EXTERN int Tcl_InterpDeleted(Tcl_Interp *interp); #endif #ifndef Tcl_IsSafe_TCL_DECLARED #define Tcl_IsSafe_TCL_DECLARED /* 185 */ -EXTERN int Tcl_IsSafe (Tcl_Interp * interp); +EXTERN int Tcl_IsSafe(Tcl_Interp *interp); #endif #ifndef Tcl_JoinPath_TCL_DECLARED #define Tcl_JoinPath_TCL_DECLARED /* 186 */ -EXTERN char * Tcl_JoinPath (int argc, CONST84 char *const * argv, - Tcl_DString * resultPtr); +EXTERN char * Tcl_JoinPath(int argc, CONST84 char *const *argv, + Tcl_DString *resultPtr); #endif #ifndef Tcl_LinkVar_TCL_DECLARED #define Tcl_LinkVar_TCL_DECLARED /* 187 */ -EXTERN int Tcl_LinkVar (Tcl_Interp * interp, - const char * varName, char * addr, int type); +EXTERN int Tcl_LinkVar(Tcl_Interp *interp, const char *varName, + char *addr, int type); #endif /* Slot 188 is reserved */ #ifndef Tcl_MakeFileChannel_TCL_DECLARED #define Tcl_MakeFileChannel_TCL_DECLARED /* 189 */ -EXTERN Tcl_Channel Tcl_MakeFileChannel (ClientData handle, int mode); +EXTERN Tcl_Channel Tcl_MakeFileChannel(ClientData handle, int mode); #endif #ifndef Tcl_MakeSafe_TCL_DECLARED #define Tcl_MakeSafe_TCL_DECLARED /* 190 */ -EXTERN int Tcl_MakeSafe (Tcl_Interp * interp); +EXTERN int Tcl_MakeSafe(Tcl_Interp *interp); #endif #ifndef Tcl_MakeTcpClientChannel_TCL_DECLARED #define Tcl_MakeTcpClientChannel_TCL_DECLARED /* 191 */ -EXTERN Tcl_Channel Tcl_MakeTcpClientChannel (ClientData tcpSocket); +EXTERN Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket); #endif #ifndef Tcl_Merge_TCL_DECLARED #define Tcl_Merge_TCL_DECLARED /* 192 */ -EXTERN char * Tcl_Merge (int argc, CONST84 char *const * argv); +EXTERN char * Tcl_Merge(int argc, CONST84 char *const *argv); #endif #ifndef Tcl_NextHashEntry_TCL_DECLARED #define Tcl_NextHashEntry_TCL_DECLARED /* 193 */ -EXTERN Tcl_HashEntry * Tcl_NextHashEntry (Tcl_HashSearch * searchPtr); +EXTERN Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr); #endif #ifndef Tcl_NotifyChannel_TCL_DECLARED #define Tcl_NotifyChannel_TCL_DECLARED /* 194 */ -EXTERN void Tcl_NotifyChannel (Tcl_Channel channel, int mask); +EXTERN void Tcl_NotifyChannel(Tcl_Channel channel, int mask); #endif #ifndef Tcl_ObjGetVar2_TCL_DECLARED #define Tcl_ObjGetVar2_TCL_DECLARED /* 195 */ -EXTERN Tcl_Obj * Tcl_ObjGetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - int flags); +EXTERN Tcl_Obj * Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, + Tcl_Obj *part2Ptr, int flags); #endif #ifndef Tcl_ObjSetVar2_TCL_DECLARED #define Tcl_ObjSetVar2_TCL_DECLARED /* 196 */ -EXTERN Tcl_Obj * Tcl_ObjSetVar2 (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, - Tcl_Obj * newValuePtr, int flags); +EXTERN Tcl_Obj * Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, + Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, + int flags); #endif #ifndef Tcl_OpenCommandChannel_TCL_DECLARED #define Tcl_OpenCommandChannel_TCL_DECLARED /* 197 */ -EXTERN Tcl_Channel Tcl_OpenCommandChannel (Tcl_Interp * interp, - int argc, CONST84 char ** argv, int flags); +EXTERN Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc, + CONST84 char **argv, int flags); #endif #ifndef Tcl_OpenFileChannel_TCL_DECLARED #define Tcl_OpenFileChannel_TCL_DECLARED /* 198 */ -EXTERN Tcl_Channel Tcl_OpenFileChannel (Tcl_Interp * interp, - const char * fileName, - const char * modeString, int permissions); +EXTERN Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp, + const char *fileName, const char *modeString, + int permissions); #endif #ifndef Tcl_OpenTcpClient_TCL_DECLARED #define Tcl_OpenTcpClient_TCL_DECLARED /* 199 */ -EXTERN Tcl_Channel Tcl_OpenTcpClient (Tcl_Interp * interp, int port, - const char * address, const char * myaddr, +EXTERN Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port, + const char *address, const char *myaddr, int myport, int async); #endif #ifndef Tcl_OpenTcpServer_TCL_DECLARED #define Tcl_OpenTcpServer_TCL_DECLARED /* 200 */ -EXTERN Tcl_Channel Tcl_OpenTcpServer (Tcl_Interp * interp, int port, - const char * host, - Tcl_TcpAcceptProc * acceptProc, +EXTERN Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port, + const char *host, + Tcl_TcpAcceptProc *acceptProc, ClientData callbackData); #endif #ifndef Tcl_Preserve_TCL_DECLARED #define Tcl_Preserve_TCL_DECLARED /* 201 */ -EXTERN void Tcl_Preserve (ClientData data); +EXTERN void Tcl_Preserve(ClientData data); #endif #ifndef Tcl_PrintDouble_TCL_DECLARED #define Tcl_PrintDouble_TCL_DECLARED /* 202 */ -EXTERN void Tcl_PrintDouble (Tcl_Interp * interp, double value, - char * dst); +EXTERN void Tcl_PrintDouble(Tcl_Interp *interp, double value, + char *dst); #endif #ifndef Tcl_PutEnv_TCL_DECLARED #define Tcl_PutEnv_TCL_DECLARED /* 203 */ -EXTERN int Tcl_PutEnv (const char * assignment); +EXTERN int Tcl_PutEnv(const char *assignment); #endif #ifndef Tcl_PosixError_TCL_DECLARED #define Tcl_PosixError_TCL_DECLARED /* 204 */ -EXTERN CONST84_RETURN char * Tcl_PosixError (Tcl_Interp * interp); +EXTERN CONST84_RETURN char * Tcl_PosixError(Tcl_Interp *interp); #endif #ifndef Tcl_QueueEvent_TCL_DECLARED #define Tcl_QueueEvent_TCL_DECLARED /* 205 */ -EXTERN void Tcl_QueueEvent (Tcl_Event * evPtr, +EXTERN void Tcl_QueueEvent(Tcl_Event *evPtr, Tcl_QueuePosition position); #endif #ifndef Tcl_Read_TCL_DECLARED #define Tcl_Read_TCL_DECLARED /* 206 */ -EXTERN int Tcl_Read (Tcl_Channel chan, char * bufPtr, - int toRead); +EXTERN int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead); #endif #ifndef Tcl_ReapDetachedProcs_TCL_DECLARED #define Tcl_ReapDetachedProcs_TCL_DECLARED /* 207 */ -EXTERN void Tcl_ReapDetachedProcs (void); +EXTERN void Tcl_ReapDetachedProcs(void); #endif #ifndef Tcl_RecordAndEval_TCL_DECLARED #define Tcl_RecordAndEval_TCL_DECLARED /* 208 */ -EXTERN int Tcl_RecordAndEval (Tcl_Interp * interp, - const char * cmd, int flags); +EXTERN int Tcl_RecordAndEval(Tcl_Interp *interp, + const char *cmd, int flags); #endif #ifndef Tcl_RecordAndEvalObj_TCL_DECLARED #define Tcl_RecordAndEvalObj_TCL_DECLARED /* 209 */ -EXTERN int Tcl_RecordAndEvalObj (Tcl_Interp * interp, - Tcl_Obj * cmdPtr, int flags); +EXTERN int Tcl_RecordAndEvalObj(Tcl_Interp *interp, + Tcl_Obj *cmdPtr, int flags); #endif #ifndef Tcl_RegisterChannel_TCL_DECLARED #define Tcl_RegisterChannel_TCL_DECLARED /* 210 */ -EXTERN void Tcl_RegisterChannel (Tcl_Interp * interp, +EXTERN void Tcl_RegisterChannel(Tcl_Interp *interp, Tcl_Channel chan); #endif #ifndef Tcl_RegisterObjType_TCL_DECLARED #define Tcl_RegisterObjType_TCL_DECLARED /* 211 */ -EXTERN void Tcl_RegisterObjType (const Tcl_ObjType * typePtr); +EXTERN void Tcl_RegisterObjType(const Tcl_ObjType *typePtr); #endif #ifndef Tcl_RegExpCompile_TCL_DECLARED #define Tcl_RegExpCompile_TCL_DECLARED /* 212 */ -EXTERN Tcl_RegExp Tcl_RegExpCompile (Tcl_Interp * interp, - const char * pattern); +EXTERN Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, + const char *pattern); #endif #ifndef Tcl_RegExpExec_TCL_DECLARED #define Tcl_RegExpExec_TCL_DECLARED /* 213 */ -EXTERN int Tcl_RegExpExec (Tcl_Interp * interp, - Tcl_RegExp regexp, const char * text, - const char * start); +EXTERN int Tcl_RegExpExec(Tcl_Interp *interp, Tcl_RegExp regexp, + const char *text, const char *start); #endif #ifndef Tcl_RegExpMatch_TCL_DECLARED #define Tcl_RegExpMatch_TCL_DECLARED /* 214 */ -EXTERN int Tcl_RegExpMatch (Tcl_Interp * interp, - const char * text, const char * pattern); +EXTERN int Tcl_RegExpMatch(Tcl_Interp *interp, const char *text, + const char *pattern); #endif #ifndef Tcl_RegExpRange_TCL_DECLARED #define Tcl_RegExpRange_TCL_DECLARED /* 215 */ -EXTERN void Tcl_RegExpRange (Tcl_RegExp regexp, int index, - CONST84 char ** startPtr, - CONST84 char ** endPtr); +EXTERN void Tcl_RegExpRange(Tcl_RegExp regexp, int index, + CONST84 char **startPtr, + CONST84 char **endPtr); #endif #ifndef Tcl_Release_TCL_DECLARED #define Tcl_Release_TCL_DECLARED /* 216 */ -EXTERN void Tcl_Release (ClientData clientData); +EXTERN void Tcl_Release(ClientData clientData); #endif #ifndef Tcl_ResetResult_TCL_DECLARED #define Tcl_ResetResult_TCL_DECLARED /* 217 */ -EXTERN void Tcl_ResetResult (Tcl_Interp * interp); +EXTERN void Tcl_ResetResult(Tcl_Interp *interp); #endif #ifndef Tcl_ScanElement_TCL_DECLARED #define Tcl_ScanElement_TCL_DECLARED /* 218 */ -EXTERN int Tcl_ScanElement (const char * str, int * flagPtr); +EXTERN int Tcl_ScanElement(const char *str, int *flagPtr); #endif #ifndef Tcl_ScanCountedElement_TCL_DECLARED #define Tcl_ScanCountedElement_TCL_DECLARED /* 219 */ -EXTERN int Tcl_ScanCountedElement (const char * str, int length, - int * flagPtr); +EXTERN int Tcl_ScanCountedElement(const char *str, int length, + int *flagPtr); #endif #ifndef Tcl_SeekOld_TCL_DECLARED #define Tcl_SeekOld_TCL_DECLARED /* 220 */ -EXTERN int Tcl_SeekOld (Tcl_Channel chan, int offset, int mode); +EXTERN int Tcl_SeekOld(Tcl_Channel chan, int offset, int mode); #endif #ifndef Tcl_ServiceAll_TCL_DECLARED #define Tcl_ServiceAll_TCL_DECLARED /* 221 */ -EXTERN int Tcl_ServiceAll (void); +EXTERN int Tcl_ServiceAll(void); #endif #ifndef Tcl_ServiceEvent_TCL_DECLARED #define Tcl_ServiceEvent_TCL_DECLARED /* 222 */ -EXTERN int Tcl_ServiceEvent (int flags); +EXTERN int Tcl_ServiceEvent(int flags); #endif #ifndef Tcl_SetAssocData_TCL_DECLARED #define Tcl_SetAssocData_TCL_DECLARED /* 223 */ -EXTERN void Tcl_SetAssocData (Tcl_Interp * interp, - const char * name, - Tcl_InterpDeleteProc * proc, +EXTERN void Tcl_SetAssocData(Tcl_Interp *interp, + const char *name, Tcl_InterpDeleteProc *proc, ClientData clientData); #endif #ifndef Tcl_SetChannelBufferSize_TCL_DECLARED #define Tcl_SetChannelBufferSize_TCL_DECLARED /* 224 */ -EXTERN void Tcl_SetChannelBufferSize (Tcl_Channel chan, int sz); +EXTERN void Tcl_SetChannelBufferSize(Tcl_Channel chan, int sz); #endif #ifndef Tcl_SetChannelOption_TCL_DECLARED #define Tcl_SetChannelOption_TCL_DECLARED /* 225 */ -EXTERN int Tcl_SetChannelOption (Tcl_Interp * interp, - Tcl_Channel chan, const char * optionName, - const char * newValue); +EXTERN int Tcl_SetChannelOption(Tcl_Interp *interp, + Tcl_Channel chan, const char *optionName, + const char *newValue); #endif #ifndef Tcl_SetCommandInfo_TCL_DECLARED #define Tcl_SetCommandInfo_TCL_DECLARED /* 226 */ -EXTERN int Tcl_SetCommandInfo (Tcl_Interp * interp, - const char * cmdName, - const Tcl_CmdInfo * infoPtr); +EXTERN int Tcl_SetCommandInfo(Tcl_Interp *interp, + const char *cmdName, + const Tcl_CmdInfo *infoPtr); #endif #ifndef Tcl_SetErrno_TCL_DECLARED #define Tcl_SetErrno_TCL_DECLARED /* 227 */ -EXTERN void Tcl_SetErrno (int err); +EXTERN void Tcl_SetErrno(int err); #endif #ifndef Tcl_SetErrorCode_TCL_DECLARED #define Tcl_SetErrorCode_TCL_DECLARED /* 228 */ -EXTERN void Tcl_SetErrorCode (Tcl_Interp * interp, ...); +EXTERN void Tcl_SetErrorCode(Tcl_Interp *interp, ...); #endif #ifndef Tcl_SetMaxBlockTime_TCL_DECLARED #define Tcl_SetMaxBlockTime_TCL_DECLARED /* 229 */ -EXTERN void Tcl_SetMaxBlockTime (const Tcl_Time * timePtr); +EXTERN void Tcl_SetMaxBlockTime(const Tcl_Time *timePtr); #endif #ifndef Tcl_SetPanicProc_TCL_DECLARED #define Tcl_SetPanicProc_TCL_DECLARED /* 230 */ -EXTERN void Tcl_SetPanicProc (Tcl_PanicProc * panicProc); +EXTERN void Tcl_SetPanicProc(Tcl_PanicProc *panicProc); #endif #ifndef Tcl_SetRecursionLimit_TCL_DECLARED #define Tcl_SetRecursionLimit_TCL_DECLARED /* 231 */ -EXTERN int Tcl_SetRecursionLimit (Tcl_Interp * interp, - int depth); +EXTERN int Tcl_SetRecursionLimit(Tcl_Interp *interp, int depth); #endif #ifndef Tcl_SetResult_TCL_DECLARED #define Tcl_SetResult_TCL_DECLARED /* 232 */ -EXTERN void Tcl_SetResult (Tcl_Interp * interp, char * result, - Tcl_FreeProc * freeProc); +EXTERN void Tcl_SetResult(Tcl_Interp *interp, char *result, + Tcl_FreeProc *freeProc); #endif #ifndef Tcl_SetServiceMode_TCL_DECLARED #define Tcl_SetServiceMode_TCL_DECLARED /* 233 */ -EXTERN int Tcl_SetServiceMode (int mode); +EXTERN int Tcl_SetServiceMode(int mode); #endif #ifndef Tcl_SetObjErrorCode_TCL_DECLARED #define Tcl_SetObjErrorCode_TCL_DECLARED /* 234 */ -EXTERN void Tcl_SetObjErrorCode (Tcl_Interp * interp, - Tcl_Obj * errorObjPtr); +EXTERN void Tcl_SetObjErrorCode(Tcl_Interp *interp, + Tcl_Obj *errorObjPtr); #endif #ifndef Tcl_SetObjResult_TCL_DECLARED #define Tcl_SetObjResult_TCL_DECLARED /* 235 */ -EXTERN void Tcl_SetObjResult (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr); +EXTERN void Tcl_SetObjResult(Tcl_Interp *interp, + Tcl_Obj *resultObjPtr); #endif #ifndef Tcl_SetStdChannel_TCL_DECLARED #define Tcl_SetStdChannel_TCL_DECLARED /* 236 */ -EXTERN void Tcl_SetStdChannel (Tcl_Channel channel, int type); +EXTERN void Tcl_SetStdChannel(Tcl_Channel channel, int type); #endif #ifndef Tcl_SetVar_TCL_DECLARED #define Tcl_SetVar_TCL_DECLARED /* 237 */ -EXTERN CONST84_RETURN char * Tcl_SetVar (Tcl_Interp * interp, - const char * varName, const char * newValue, +EXTERN CONST84_RETURN char * Tcl_SetVar(Tcl_Interp *interp, + const char *varName, const char *newValue, int flags); #endif #ifndef Tcl_SetVar2_TCL_DECLARED #define Tcl_SetVar2_TCL_DECLARED /* 238 */ -EXTERN CONST84_RETURN char * Tcl_SetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - const char * newValue, int flags); +EXTERN CONST84_RETURN char * Tcl_SetVar2(Tcl_Interp *interp, + const char *part1, const char *part2, + const char *newValue, int flags); #endif #ifndef Tcl_SignalId_TCL_DECLARED #define Tcl_SignalId_TCL_DECLARED /* 239 */ -EXTERN CONST84_RETURN char * Tcl_SignalId (int sig); +EXTERN CONST84_RETURN char * Tcl_SignalId(int sig); #endif #ifndef Tcl_SignalMsg_TCL_DECLARED #define Tcl_SignalMsg_TCL_DECLARED /* 240 */ -EXTERN CONST84_RETURN char * Tcl_SignalMsg (int sig); +EXTERN CONST84_RETURN char * Tcl_SignalMsg(int sig); #endif #ifndef Tcl_SourceRCFile_TCL_DECLARED #define Tcl_SourceRCFile_TCL_DECLARED /* 241 */ -EXTERN void Tcl_SourceRCFile (Tcl_Interp * interp); +EXTERN void Tcl_SourceRCFile(Tcl_Interp *interp); #endif #ifndef Tcl_SplitList_TCL_DECLARED #define Tcl_SplitList_TCL_DECLARED /* 242 */ -EXTERN int Tcl_SplitList (Tcl_Interp * interp, - const char * listStr, int * argcPtr, - CONST84 char *** argvPtr); +EXTERN int Tcl_SplitList(Tcl_Interp *interp, + const char *listStr, int *argcPtr, + CONST84 char ***argvPtr); #endif #ifndef Tcl_SplitPath_TCL_DECLARED #define Tcl_SplitPath_TCL_DECLARED /* 243 */ -EXTERN void Tcl_SplitPath (const char * path, int * argcPtr, - CONST84 char *** argvPtr); +EXTERN void Tcl_SplitPath(const char *path, int *argcPtr, + CONST84 char ***argvPtr); #endif #ifndef Tcl_StaticPackage_TCL_DECLARED #define Tcl_StaticPackage_TCL_DECLARED /* 244 */ -EXTERN void Tcl_StaticPackage (Tcl_Interp * interp, - const char * pkgName, - Tcl_PackageInitProc * initProc, - Tcl_PackageInitProc * safeInitProc); +EXTERN void Tcl_StaticPackage(Tcl_Interp *interp, + const char *pkgName, + Tcl_PackageInitProc *initProc, + Tcl_PackageInitProc *safeInitProc); #endif #ifndef Tcl_StringMatch_TCL_DECLARED #define Tcl_StringMatch_TCL_DECLARED /* 245 */ -EXTERN int Tcl_StringMatch (const char * str, - const char * pattern); +EXTERN int Tcl_StringMatch(const char *str, const char *pattern); #endif #ifndef Tcl_TellOld_TCL_DECLARED #define Tcl_TellOld_TCL_DECLARED /* 246 */ -EXTERN int Tcl_TellOld (Tcl_Channel chan); +EXTERN int Tcl_TellOld(Tcl_Channel chan); #endif #ifndef Tcl_TraceVar_TCL_DECLARED #define Tcl_TraceVar_TCL_DECLARED /* 247 */ -EXTERN int Tcl_TraceVar (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * proc, +EXTERN int Tcl_TraceVar(Tcl_Interp *interp, const char *varName, + int flags, Tcl_VarTraceProc *proc, ClientData clientData); #endif #ifndef Tcl_TraceVar2_TCL_DECLARED #define Tcl_TraceVar2_TCL_DECLARED /* 248 */ -EXTERN int Tcl_TraceVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * proc, +EXTERN int Tcl_TraceVar2(Tcl_Interp *interp, const char *part1, + const char *part2, int flags, + Tcl_VarTraceProc *proc, ClientData clientData); #endif #ifndef Tcl_TranslateFileName_TCL_DECLARED #define Tcl_TranslateFileName_TCL_DECLARED /* 249 */ -EXTERN char * Tcl_TranslateFileName (Tcl_Interp * interp, - const char * name, Tcl_DString * bufferPtr); +EXTERN char * Tcl_TranslateFileName(Tcl_Interp *interp, + const char *name, Tcl_DString *bufferPtr); #endif #ifndef Tcl_Ungets_TCL_DECLARED #define Tcl_Ungets_TCL_DECLARED /* 250 */ -EXTERN int Tcl_Ungets (Tcl_Channel chan, const char * str, +EXTERN int Tcl_Ungets(Tcl_Channel chan, const char *str, int len, int atHead); #endif #ifndef Tcl_UnlinkVar_TCL_DECLARED #define Tcl_UnlinkVar_TCL_DECLARED /* 251 */ -EXTERN void Tcl_UnlinkVar (Tcl_Interp * interp, - const char * varName); +EXTERN void Tcl_UnlinkVar(Tcl_Interp *interp, + const char *varName); #endif #ifndef Tcl_UnregisterChannel_TCL_DECLARED #define Tcl_UnregisterChannel_TCL_DECLARED /* 252 */ -EXTERN int Tcl_UnregisterChannel (Tcl_Interp * interp, +EXTERN int Tcl_UnregisterChannel(Tcl_Interp *interp, Tcl_Channel chan); #endif #ifndef Tcl_UnsetVar_TCL_DECLARED #define Tcl_UnsetVar_TCL_DECLARED /* 253 */ -EXTERN int Tcl_UnsetVar (Tcl_Interp * interp, - const char * varName, int flags); +EXTERN int Tcl_UnsetVar(Tcl_Interp *interp, const char *varName, + int flags); #endif #ifndef Tcl_UnsetVar2_TCL_DECLARED #define Tcl_UnsetVar2_TCL_DECLARED /* 254 */ -EXTERN int Tcl_UnsetVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); +EXTERN int Tcl_UnsetVar2(Tcl_Interp *interp, const char *part1, + const char *part2, int flags); #endif #ifndef Tcl_UntraceVar_TCL_DECLARED #define Tcl_UntraceVar_TCL_DECLARED /* 255 */ -EXTERN void Tcl_UntraceVar (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * proc, +EXTERN void Tcl_UntraceVar(Tcl_Interp *interp, + const char *varName, int flags, + Tcl_VarTraceProc *proc, ClientData clientData); #endif #ifndef Tcl_UntraceVar2_TCL_DECLARED #define Tcl_UntraceVar2_TCL_DECLARED /* 256 */ -EXTERN void Tcl_UntraceVar2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * proc, +EXTERN void Tcl_UntraceVar2(Tcl_Interp *interp, + const char *part1, const char *part2, + int flags, Tcl_VarTraceProc *proc, ClientData clientData); #endif #ifndef Tcl_UpdateLinkedVar_TCL_DECLARED #define Tcl_UpdateLinkedVar_TCL_DECLARED /* 257 */ -EXTERN void Tcl_UpdateLinkedVar (Tcl_Interp * interp, - const char * varName); +EXTERN void Tcl_UpdateLinkedVar(Tcl_Interp *interp, + const char *varName); #endif #ifndef Tcl_UpVar_TCL_DECLARED #define Tcl_UpVar_TCL_DECLARED /* 258 */ -EXTERN int Tcl_UpVar (Tcl_Interp * interp, - const char * frameName, const char * varName, - const char * localName, int flags); +EXTERN int Tcl_UpVar(Tcl_Interp *interp, const char *frameName, + const char *varName, const char *localName, + int flags); #endif #ifndef Tcl_UpVar2_TCL_DECLARED #define Tcl_UpVar2_TCL_DECLARED /* 259 */ -EXTERN int Tcl_UpVar2 (Tcl_Interp * interp, - const char * frameName, const char * part1, - const char * part2, const char * localName, - int flags); +EXTERN int Tcl_UpVar2(Tcl_Interp *interp, const char *frameName, + const char *part1, const char *part2, + const char *localName, int flags); #endif #ifndef Tcl_VarEval_TCL_DECLARED #define Tcl_VarEval_TCL_DECLARED /* 260 */ -EXTERN int Tcl_VarEval (Tcl_Interp * interp, ...); +EXTERN int Tcl_VarEval(Tcl_Interp *interp, ...); #endif #ifndef Tcl_VarTraceInfo_TCL_DECLARED #define Tcl_VarTraceInfo_TCL_DECLARED /* 261 */ -EXTERN ClientData Tcl_VarTraceInfo (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_VarTraceProc * procPtr, +EXTERN ClientData Tcl_VarTraceInfo(Tcl_Interp *interp, + const char *varName, int flags, + Tcl_VarTraceProc *procPtr, ClientData prevClientData); #endif #ifndef Tcl_VarTraceInfo2_TCL_DECLARED #define Tcl_VarTraceInfo2_TCL_DECLARED /* 262 */ -EXTERN ClientData Tcl_VarTraceInfo2 (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, Tcl_VarTraceProc * procPtr, +EXTERN ClientData Tcl_VarTraceInfo2(Tcl_Interp *interp, + const char *part1, const char *part2, + int flags, Tcl_VarTraceProc *procPtr, ClientData prevClientData); #endif #ifndef Tcl_Write_TCL_DECLARED #define Tcl_Write_TCL_DECLARED /* 263 */ -EXTERN int Tcl_Write (Tcl_Channel chan, const char * s, - int slen); +EXTERN int Tcl_Write(Tcl_Channel chan, const char *s, int slen); #endif #ifndef Tcl_WrongNumArgs_TCL_DECLARED #define Tcl_WrongNumArgs_TCL_DECLARED /* 264 */ -EXTERN void Tcl_WrongNumArgs (Tcl_Interp * interp, int objc, - Tcl_Obj *const objv[], const char * message); +EXTERN void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[], const char *message); #endif #ifndef Tcl_DumpActiveMemory_TCL_DECLARED #define Tcl_DumpActiveMemory_TCL_DECLARED /* 265 */ -EXTERN int Tcl_DumpActiveMemory (const char * fileName); +EXTERN int Tcl_DumpActiveMemory(const char *fileName); #endif #ifndef Tcl_ValidateAllMemory_TCL_DECLARED #define Tcl_ValidateAllMemory_TCL_DECLARED /* 266 */ -EXTERN void Tcl_ValidateAllMemory (const char * file, int line); +EXTERN void Tcl_ValidateAllMemory(const char *file, int line); #endif #ifndef Tcl_AppendResultVA_TCL_DECLARED #define Tcl_AppendResultVA_TCL_DECLARED /* 267 */ -EXTERN void Tcl_AppendResultVA (Tcl_Interp * interp, +EXTERN void Tcl_AppendResultVA(Tcl_Interp *interp, va_list argList); #endif #ifndef Tcl_AppendStringsToObjVA_TCL_DECLARED #define Tcl_AppendStringsToObjVA_TCL_DECLARED /* 268 */ -EXTERN void Tcl_AppendStringsToObjVA (Tcl_Obj * objPtr, +EXTERN void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList); #endif #ifndef Tcl_HashStats_TCL_DECLARED #define Tcl_HashStats_TCL_DECLARED /* 269 */ -EXTERN char * Tcl_HashStats (Tcl_HashTable * tablePtr); +EXTERN char * Tcl_HashStats(Tcl_HashTable *tablePtr); #endif #ifndef Tcl_ParseVar_TCL_DECLARED #define Tcl_ParseVar_TCL_DECLARED /* 270 */ -EXTERN CONST84_RETURN char * Tcl_ParseVar (Tcl_Interp * interp, - const char * start, CONST84 char ** termPtr); +EXTERN CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, + const char *start, CONST84 char **termPtr); #endif #ifndef Tcl_PkgPresent_TCL_DECLARED #define Tcl_PkgPresent_TCL_DECLARED /* 271 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresent (Tcl_Interp * interp, - const char * name, const char * version, +EXTERN CONST84_RETURN char * Tcl_PkgPresent(Tcl_Interp *interp, + const char *name, const char *version, int exact); #endif #ifndef Tcl_PkgPresentEx_TCL_DECLARED #define Tcl_PkgPresentEx_TCL_DECLARED /* 272 */ -EXTERN CONST84_RETURN char * Tcl_PkgPresentEx (Tcl_Interp * interp, - const char * name, const char * version, - int exact, ClientData * clientDataPtr); +EXTERN CONST84_RETURN char * Tcl_PkgPresentEx(Tcl_Interp *interp, + const char *name, const char *version, + int exact, ClientData *clientDataPtr); #endif #ifndef Tcl_PkgProvide_TCL_DECLARED #define Tcl_PkgProvide_TCL_DECLARED /* 273 */ -EXTERN int Tcl_PkgProvide (Tcl_Interp * interp, - const char * name, const char * version); +EXTERN int Tcl_PkgProvide(Tcl_Interp *interp, const char *name, + const char *version); #endif #ifndef Tcl_PkgRequire_TCL_DECLARED #define Tcl_PkgRequire_TCL_DECLARED /* 274 */ -EXTERN CONST84_RETURN char * Tcl_PkgRequire (Tcl_Interp * interp, - const char * name, const char * version, +EXTERN CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp, + const char *name, const char *version, int exact); #endif #ifndef Tcl_SetErrorCodeVA_TCL_DECLARED #define Tcl_SetErrorCodeVA_TCL_DECLARED /* 275 */ -EXTERN void Tcl_SetErrorCodeVA (Tcl_Interp * interp, +EXTERN void Tcl_SetErrorCodeVA(Tcl_Interp *interp, va_list argList); #endif #ifndef Tcl_VarEvalVA_TCL_DECLARED #define Tcl_VarEvalVA_TCL_DECLARED /* 276 */ -EXTERN int Tcl_VarEvalVA (Tcl_Interp * interp, va_list argList); +EXTERN int Tcl_VarEvalVA(Tcl_Interp *interp, va_list argList); #endif #ifndef Tcl_WaitPid_TCL_DECLARED #define Tcl_WaitPid_TCL_DECLARED /* 277 */ -EXTERN Tcl_Pid Tcl_WaitPid (Tcl_Pid pid, int * statPtr, int options); +EXTERN Tcl_Pid Tcl_WaitPid(Tcl_Pid pid, int *statPtr, int options); #endif #ifndef Tcl_PanicVA_TCL_DECLARED #define Tcl_PanicVA_TCL_DECLARED /* 278 */ -EXTERN void Tcl_PanicVA (const char * format, va_list argList); +EXTERN void Tcl_PanicVA(const char *format, va_list argList); #endif #ifndef Tcl_GetVersion_TCL_DECLARED #define Tcl_GetVersion_TCL_DECLARED /* 279 */ -EXTERN void Tcl_GetVersion (int * major, int * minor, - int * patchLevel, int * type); +EXTERN void Tcl_GetVersion(int *major, int *minor, + int *patchLevel, int *type); #endif #ifndef Tcl_InitMemory_TCL_DECLARED #define Tcl_InitMemory_TCL_DECLARED /* 280 */ -EXTERN void Tcl_InitMemory (Tcl_Interp * interp); +EXTERN void Tcl_InitMemory(Tcl_Interp *interp); #endif #ifndef Tcl_StackChannel_TCL_DECLARED #define Tcl_StackChannel_TCL_DECLARED /* 281 */ -EXTERN Tcl_Channel Tcl_StackChannel (Tcl_Interp * interp, - const Tcl_ChannelType * typePtr, +EXTERN Tcl_Channel Tcl_StackChannel(Tcl_Interp *interp, + const Tcl_ChannelType *typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); #endif #ifndef Tcl_UnstackChannel_TCL_DECLARED #define Tcl_UnstackChannel_TCL_DECLARED /* 282 */ -EXTERN int Tcl_UnstackChannel (Tcl_Interp * interp, +EXTERN int Tcl_UnstackChannel(Tcl_Interp *interp, Tcl_Channel chan); #endif #ifndef Tcl_GetStackedChannel_TCL_DECLARED #define Tcl_GetStackedChannel_TCL_DECLARED /* 283 */ -EXTERN Tcl_Channel Tcl_GetStackedChannel (Tcl_Channel chan); +EXTERN Tcl_Channel Tcl_GetStackedChannel(Tcl_Channel chan); #endif #ifndef Tcl_SetMainLoop_TCL_DECLARED #define Tcl_SetMainLoop_TCL_DECLARED /* 284 */ -EXTERN void Tcl_SetMainLoop (Tcl_MainLoopProc * proc); +EXTERN void Tcl_SetMainLoop(Tcl_MainLoopProc *proc); #endif /* Slot 285 is reserved */ #ifndef Tcl_AppendObjToObj_TCL_DECLARED #define Tcl_AppendObjToObj_TCL_DECLARED /* 286 */ -EXTERN void Tcl_AppendObjToObj (Tcl_Obj * objPtr, - Tcl_Obj * appendObjPtr); +EXTERN void Tcl_AppendObjToObj(Tcl_Obj *objPtr, + Tcl_Obj *appendObjPtr); #endif #ifndef Tcl_CreateEncoding_TCL_DECLARED #define Tcl_CreateEncoding_TCL_DECLARED /* 287 */ -EXTERN Tcl_Encoding Tcl_CreateEncoding (const Tcl_EncodingType * typePtr); +EXTERN Tcl_Encoding Tcl_CreateEncoding(const Tcl_EncodingType *typePtr); #endif #ifndef Tcl_CreateThreadExitHandler_TCL_DECLARED #define Tcl_CreateThreadExitHandler_TCL_DECLARED /* 288 */ -EXTERN void Tcl_CreateThreadExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_CreateThreadExitHandler(Tcl_ExitProc *proc, ClientData clientData); #endif #ifndef Tcl_DeleteThreadExitHandler_TCL_DECLARED #define Tcl_DeleteThreadExitHandler_TCL_DECLARED /* 289 */ -EXTERN void Tcl_DeleteThreadExitHandler (Tcl_ExitProc * proc, +EXTERN void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc, ClientData clientData); #endif #ifndef Tcl_DiscardResult_TCL_DECLARED #define Tcl_DiscardResult_TCL_DECLARED /* 290 */ -EXTERN void Tcl_DiscardResult (Tcl_SavedResult * statePtr); +EXTERN void Tcl_DiscardResult(Tcl_SavedResult *statePtr); #endif #ifndef Tcl_EvalEx_TCL_DECLARED #define Tcl_EvalEx_TCL_DECLARED /* 291 */ -EXTERN int Tcl_EvalEx (Tcl_Interp * interp, const char * script, +EXTERN int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes, int flags); #endif #ifndef Tcl_EvalObjv_TCL_DECLARED #define Tcl_EvalObjv_TCL_DECLARED /* 292 */ -EXTERN int Tcl_EvalObjv (Tcl_Interp * interp, int objc, +EXTERN int Tcl_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); #endif #ifndef Tcl_EvalObjEx_TCL_DECLARED #define Tcl_EvalObjEx_TCL_DECLARED /* 293 */ -EXTERN int Tcl_EvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN int Tcl_EvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); #endif #ifndef Tcl_ExitThread_TCL_DECLARED #define Tcl_ExitThread_TCL_DECLARED /* 294 */ -EXTERN void Tcl_ExitThread (int status); +EXTERN void Tcl_ExitThread(int status); #endif #ifndef Tcl_ExternalToUtf_TCL_DECLARED #define Tcl_ExternalToUtf_TCL_DECLARED /* 295 */ -EXTERN int Tcl_ExternalToUtf (Tcl_Interp * interp, - Tcl_Encoding encoding, const char * src, +EXTERN int Tcl_ExternalToUtf(Tcl_Interp *interp, + Tcl_Encoding encoding, const char *src, int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); + Tcl_EncodingState *statePtr, char *dst, + int dstLen, int *srcReadPtr, + int *dstWrotePtr, int *dstCharsPtr); #endif #ifndef Tcl_ExternalToUtfDString_TCL_DECLARED #define Tcl_ExternalToUtfDString_TCL_DECLARED /* 296 */ -EXTERN char * Tcl_ExternalToUtfDString (Tcl_Encoding encoding, - const char * src, int srcLen, - Tcl_DString * dsPtr); +EXTERN char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding, + const char *src, int srcLen, + Tcl_DString *dsPtr); #endif #ifndef Tcl_FinalizeThread_TCL_DECLARED #define Tcl_FinalizeThread_TCL_DECLARED /* 297 */ -EXTERN void Tcl_FinalizeThread (void); +EXTERN void Tcl_FinalizeThread(void); #endif #ifndef Tcl_FinalizeNotifier_TCL_DECLARED #define Tcl_FinalizeNotifier_TCL_DECLARED /* 298 */ -EXTERN void Tcl_FinalizeNotifier (ClientData clientData); +EXTERN void Tcl_FinalizeNotifier(ClientData clientData); #endif #ifndef Tcl_FreeEncoding_TCL_DECLARED #define Tcl_FreeEncoding_TCL_DECLARED /* 299 */ -EXTERN void Tcl_FreeEncoding (Tcl_Encoding encoding); +EXTERN void Tcl_FreeEncoding(Tcl_Encoding encoding); #endif #ifndef Tcl_GetCurrentThread_TCL_DECLARED #define Tcl_GetCurrentThread_TCL_DECLARED /* 300 */ -EXTERN Tcl_ThreadId Tcl_GetCurrentThread (void); +EXTERN Tcl_ThreadId Tcl_GetCurrentThread(void); #endif #ifndef Tcl_GetEncoding_TCL_DECLARED #define Tcl_GetEncoding_TCL_DECLARED /* 301 */ -EXTERN Tcl_Encoding Tcl_GetEncoding (Tcl_Interp * interp, - const char * name); +EXTERN Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, const char *name); #endif #ifndef Tcl_GetEncodingName_TCL_DECLARED #define Tcl_GetEncodingName_TCL_DECLARED /* 302 */ -EXTERN CONST84_RETURN char * Tcl_GetEncodingName (Tcl_Encoding encoding); +EXTERN CONST84_RETURN char * Tcl_GetEncodingName(Tcl_Encoding encoding); #endif #ifndef Tcl_GetEncodingNames_TCL_DECLARED #define Tcl_GetEncodingNames_TCL_DECLARED /* 303 */ -EXTERN void Tcl_GetEncodingNames (Tcl_Interp * interp); +EXTERN void Tcl_GetEncodingNames(Tcl_Interp *interp); #endif #ifndef Tcl_GetIndexFromObjStruct_TCL_DECLARED #define Tcl_GetIndexFromObjStruct_TCL_DECLARED /* 304 */ -EXTERN int Tcl_GetIndexFromObjStruct (Tcl_Interp * interp, - Tcl_Obj * objPtr, const void * tablePtr, - int offset, const char * msg, int flags, - int * indexPtr); +EXTERN int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, + Tcl_Obj *objPtr, const void *tablePtr, + int offset, const char *msg, int flags, + int *indexPtr); #endif #ifndef Tcl_GetThreadData_TCL_DECLARED #define Tcl_GetThreadData_TCL_DECLARED /* 305 */ -EXTERN void * Tcl_GetThreadData (Tcl_ThreadDataKey * keyPtr, +EXTERN void * Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size); #endif #ifndef Tcl_GetVar2Ex_TCL_DECLARED #define Tcl_GetVar2Ex_TCL_DECLARED /* 306 */ -EXTERN Tcl_Obj * Tcl_GetVar2Ex (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags); +EXTERN Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1, + const char *part2, int flags); #endif #ifndef Tcl_InitNotifier_TCL_DECLARED #define Tcl_InitNotifier_TCL_DECLARED /* 307 */ -EXTERN ClientData Tcl_InitNotifier (void); +EXTERN ClientData Tcl_InitNotifier(void); #endif #ifndef Tcl_MutexLock_TCL_DECLARED #define Tcl_MutexLock_TCL_DECLARED /* 308 */ -EXTERN void Tcl_MutexLock (Tcl_Mutex * mutexPtr); +EXTERN void Tcl_MutexLock(Tcl_Mutex *mutexPtr); #endif #ifndef Tcl_MutexUnlock_TCL_DECLARED #define Tcl_MutexUnlock_TCL_DECLARED /* 309 */ -EXTERN void Tcl_MutexUnlock (Tcl_Mutex * mutexPtr); +EXTERN void Tcl_MutexUnlock(Tcl_Mutex *mutexPtr); #endif #ifndef Tcl_ConditionNotify_TCL_DECLARED #define Tcl_ConditionNotify_TCL_DECLARED /* 310 */ -EXTERN void Tcl_ConditionNotify (Tcl_Condition * condPtr); +EXTERN void Tcl_ConditionNotify(Tcl_Condition *condPtr); #endif #ifndef Tcl_ConditionWait_TCL_DECLARED #define Tcl_ConditionWait_TCL_DECLARED /* 311 */ -EXTERN void Tcl_ConditionWait (Tcl_Condition * condPtr, - Tcl_Mutex * mutexPtr, - const Tcl_Time * timePtr); +EXTERN void Tcl_ConditionWait(Tcl_Condition *condPtr, + Tcl_Mutex *mutexPtr, const Tcl_Time *timePtr); #endif #ifndef Tcl_NumUtfChars_TCL_DECLARED #define Tcl_NumUtfChars_TCL_DECLARED /* 312 */ -EXTERN int Tcl_NumUtfChars (const char * src, int length); +EXTERN int Tcl_NumUtfChars(const char *src, int length); #endif #ifndef Tcl_ReadChars_TCL_DECLARED #define Tcl_ReadChars_TCL_DECLARED /* 313 */ -EXTERN int Tcl_ReadChars (Tcl_Channel channel, Tcl_Obj * objPtr, +EXTERN int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr, int charsToRead, int appendFlag); #endif #ifndef Tcl_RestoreResult_TCL_DECLARED #define Tcl_RestoreResult_TCL_DECLARED /* 314 */ -EXTERN void Tcl_RestoreResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); +EXTERN void Tcl_RestoreResult(Tcl_Interp *interp, + Tcl_SavedResult *statePtr); #endif #ifndef Tcl_SaveResult_TCL_DECLARED #define Tcl_SaveResult_TCL_DECLARED /* 315 */ -EXTERN void Tcl_SaveResult (Tcl_Interp * interp, - Tcl_SavedResult * statePtr); +EXTERN void Tcl_SaveResult(Tcl_Interp *interp, + Tcl_SavedResult *statePtr); #endif #ifndef Tcl_SetSystemEncoding_TCL_DECLARED #define Tcl_SetSystemEncoding_TCL_DECLARED /* 316 */ -EXTERN int Tcl_SetSystemEncoding (Tcl_Interp * interp, - const char * name); +EXTERN int Tcl_SetSystemEncoding(Tcl_Interp *interp, + const char *name); #endif #ifndef Tcl_SetVar2Ex_TCL_DECLARED #define Tcl_SetVar2Ex_TCL_DECLARED /* 317 */ -EXTERN Tcl_Obj * Tcl_SetVar2Ex (Tcl_Interp * interp, - const char * part1, const char * part2, - Tcl_Obj * newValuePtr, int flags); +EXTERN Tcl_Obj * Tcl_SetVar2Ex(Tcl_Interp *interp, const char *part1, + const char *part2, Tcl_Obj *newValuePtr, + int flags); #endif #ifndef Tcl_ThreadAlert_TCL_DECLARED #define Tcl_ThreadAlert_TCL_DECLARED /* 318 */ -EXTERN void Tcl_ThreadAlert (Tcl_ThreadId threadId); +EXTERN void Tcl_ThreadAlert(Tcl_ThreadId threadId); #endif #ifndef Tcl_ThreadQueueEvent_TCL_DECLARED #define Tcl_ThreadQueueEvent_TCL_DECLARED /* 319 */ -EXTERN void Tcl_ThreadQueueEvent (Tcl_ThreadId threadId, - Tcl_Event * evPtr, - Tcl_QueuePosition position); +EXTERN void Tcl_ThreadQueueEvent(Tcl_ThreadId threadId, + Tcl_Event *evPtr, Tcl_QueuePosition position); #endif #ifndef Tcl_UniCharAtIndex_TCL_DECLARED #define Tcl_UniCharAtIndex_TCL_DECLARED /* 320 */ -EXTERN Tcl_UniChar Tcl_UniCharAtIndex (const char * src, int index); +EXTERN Tcl_UniChar Tcl_UniCharAtIndex(const char *src, int index); #endif #ifndef Tcl_UniCharToLower_TCL_DECLARED #define Tcl_UniCharToLower_TCL_DECLARED /* 321 */ -EXTERN Tcl_UniChar Tcl_UniCharToLower (int ch); +EXTERN Tcl_UniChar Tcl_UniCharToLower(int ch); #endif #ifndef Tcl_UniCharToTitle_TCL_DECLARED #define Tcl_UniCharToTitle_TCL_DECLARED /* 322 */ -EXTERN Tcl_UniChar Tcl_UniCharToTitle (int ch); +EXTERN Tcl_UniChar Tcl_UniCharToTitle(int ch); #endif #ifndef Tcl_UniCharToUpper_TCL_DECLARED #define Tcl_UniCharToUpper_TCL_DECLARED /* 323 */ -EXTERN Tcl_UniChar Tcl_UniCharToUpper (int ch); +EXTERN Tcl_UniChar Tcl_UniCharToUpper(int ch); #endif #ifndef Tcl_UniCharToUtf_TCL_DECLARED #define Tcl_UniCharToUtf_TCL_DECLARED /* 324 */ -EXTERN int Tcl_UniCharToUtf (int ch, char * buf); +EXTERN int Tcl_UniCharToUtf(int ch, char *buf); #endif #ifndef Tcl_UtfAtIndex_TCL_DECLARED #define Tcl_UtfAtIndex_TCL_DECLARED /* 325 */ -EXTERN CONST84_RETURN char * Tcl_UtfAtIndex (const char * src, int index); +EXTERN CONST84_RETURN char * Tcl_UtfAtIndex(const char *src, int index); #endif #ifndef Tcl_UtfCharComplete_TCL_DECLARED #define Tcl_UtfCharComplete_TCL_DECLARED /* 326 */ -EXTERN int Tcl_UtfCharComplete (const char * src, int length); +EXTERN int Tcl_UtfCharComplete(const char *src, int length); #endif #ifndef Tcl_UtfBackslash_TCL_DECLARED #define Tcl_UtfBackslash_TCL_DECLARED /* 327 */ -EXTERN int Tcl_UtfBackslash (const char * src, int * readPtr, - char * dst); +EXTERN int Tcl_UtfBackslash(const char *src, int *readPtr, + char *dst); #endif #ifndef Tcl_UtfFindFirst_TCL_DECLARED #define Tcl_UtfFindFirst_TCL_DECLARED /* 328 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindFirst (const char * src, int ch); +EXTERN CONST84_RETURN char * Tcl_UtfFindFirst(const char *src, int ch); #endif #ifndef Tcl_UtfFindLast_TCL_DECLARED #define Tcl_UtfFindLast_TCL_DECLARED /* 329 */ -EXTERN CONST84_RETURN char * Tcl_UtfFindLast (const char * src, int ch); +EXTERN CONST84_RETURN char * Tcl_UtfFindLast(const char *src, int ch); #endif #ifndef Tcl_UtfNext_TCL_DECLARED #define Tcl_UtfNext_TCL_DECLARED /* 330 */ -EXTERN CONST84_RETURN char * Tcl_UtfNext (const char * src); +EXTERN CONST84_RETURN char * Tcl_UtfNext(const char *src); #endif #ifndef Tcl_UtfPrev_TCL_DECLARED #define Tcl_UtfPrev_TCL_DECLARED /* 331 */ -EXTERN CONST84_RETURN char * Tcl_UtfPrev (const char * src, - const char * start); +EXTERN CONST84_RETURN char * Tcl_UtfPrev(const char *src, const char *start); #endif #ifndef Tcl_UtfToExternal_TCL_DECLARED #define Tcl_UtfToExternal_TCL_DECLARED /* 332 */ -EXTERN int Tcl_UtfToExternal (Tcl_Interp * interp, - Tcl_Encoding encoding, const char * src, +EXTERN int Tcl_UtfToExternal(Tcl_Interp *interp, + Tcl_Encoding encoding, const char *src, int srcLen, int flags, - Tcl_EncodingState * statePtr, char * dst, - int dstLen, int * srcReadPtr, - int * dstWrotePtr, int * dstCharsPtr); + Tcl_EncodingState *statePtr, char *dst, + int dstLen, int *srcReadPtr, + int *dstWrotePtr, int *dstCharsPtr); #endif #ifndef Tcl_UtfToExternalDString_TCL_DECLARED #define Tcl_UtfToExternalDString_TCL_DECLARED /* 333 */ -EXTERN char * Tcl_UtfToExternalDString (Tcl_Encoding encoding, - const char * src, int srcLen, - Tcl_DString * dsPtr); +EXTERN char * Tcl_UtfToExternalDString(Tcl_Encoding encoding, + const char *src, int srcLen, + Tcl_DString *dsPtr); #endif #ifndef Tcl_UtfToLower_TCL_DECLARED #define Tcl_UtfToLower_TCL_DECLARED /* 334 */ -EXTERN int Tcl_UtfToLower (char * src); +EXTERN int Tcl_UtfToLower(char *src); #endif #ifndef Tcl_UtfToTitle_TCL_DECLARED #define Tcl_UtfToTitle_TCL_DECLARED /* 335 */ -EXTERN int Tcl_UtfToTitle (char * src); +EXTERN int Tcl_UtfToTitle(char *src); #endif #ifndef Tcl_UtfToUniChar_TCL_DECLARED #define Tcl_UtfToUniChar_TCL_DECLARED /* 336 */ -EXTERN int Tcl_UtfToUniChar (const char * src, - Tcl_UniChar * chPtr); +EXTERN int Tcl_UtfToUniChar(const char *src, Tcl_UniChar *chPtr); #endif #ifndef Tcl_UtfToUpper_TCL_DECLARED #define Tcl_UtfToUpper_TCL_DECLARED /* 337 */ -EXTERN int Tcl_UtfToUpper (char * src); +EXTERN int Tcl_UtfToUpper(char *src); #endif #ifndef Tcl_WriteChars_TCL_DECLARED #define Tcl_WriteChars_TCL_DECLARED /* 338 */ -EXTERN int Tcl_WriteChars (Tcl_Channel chan, const char * src, +EXTERN int Tcl_WriteChars(Tcl_Channel chan, const char *src, int srcLen); #endif #ifndef Tcl_WriteObj_TCL_DECLARED #define Tcl_WriteObj_TCL_DECLARED /* 339 */ -EXTERN int Tcl_WriteObj (Tcl_Channel chan, Tcl_Obj * objPtr); +EXTERN int Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr); #endif #ifndef Tcl_GetString_TCL_DECLARED #define Tcl_GetString_TCL_DECLARED /* 340 */ -EXTERN char * Tcl_GetString (Tcl_Obj * objPtr); +EXTERN char * Tcl_GetString(Tcl_Obj *objPtr); #endif #ifndef Tcl_GetDefaultEncodingDir_TCL_DECLARED #define Tcl_GetDefaultEncodingDir_TCL_DECLARED /* 341 */ -EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir (void); +EXTERN CONST84_RETURN char * Tcl_GetDefaultEncodingDir(void); #endif #ifndef Tcl_SetDefaultEncodingDir_TCL_DECLARED #define Tcl_SetDefaultEncodingDir_TCL_DECLARED /* 342 */ -EXTERN void Tcl_SetDefaultEncodingDir (const char * path); +EXTERN void Tcl_SetDefaultEncodingDir(const char *path); #endif #ifndef Tcl_AlertNotifier_TCL_DECLARED #define Tcl_AlertNotifier_TCL_DECLARED /* 343 */ -EXTERN void Tcl_AlertNotifier (ClientData clientData); +EXTERN void Tcl_AlertNotifier(ClientData clientData); #endif #ifndef Tcl_ServiceModeHook_TCL_DECLARED #define Tcl_ServiceModeHook_TCL_DECLARED /* 344 */ -EXTERN void Tcl_ServiceModeHook (int mode); +EXTERN void Tcl_ServiceModeHook(int mode); #endif #ifndef Tcl_UniCharIsAlnum_TCL_DECLARED #define Tcl_UniCharIsAlnum_TCL_DECLARED /* 345 */ -EXTERN int Tcl_UniCharIsAlnum (int ch); +EXTERN int Tcl_UniCharIsAlnum(int ch); #endif #ifndef Tcl_UniCharIsAlpha_TCL_DECLARED #define Tcl_UniCharIsAlpha_TCL_DECLARED /* 346 */ -EXTERN int Tcl_UniCharIsAlpha (int ch); +EXTERN int Tcl_UniCharIsAlpha(int ch); #endif #ifndef Tcl_UniCharIsDigit_TCL_DECLARED #define Tcl_UniCharIsDigit_TCL_DECLARED /* 347 */ -EXTERN int Tcl_UniCharIsDigit (int ch); +EXTERN int Tcl_UniCharIsDigit(int ch); #endif #ifndef Tcl_UniCharIsLower_TCL_DECLARED #define Tcl_UniCharIsLower_TCL_DECLARED /* 348 */ -EXTERN int Tcl_UniCharIsLower (int ch); +EXTERN int Tcl_UniCharIsLower(int ch); #endif #ifndef Tcl_UniCharIsSpace_TCL_DECLARED #define Tcl_UniCharIsSpace_TCL_DECLARED /* 349 */ -EXTERN int Tcl_UniCharIsSpace (int ch); +EXTERN int Tcl_UniCharIsSpace(int ch); #endif #ifndef Tcl_UniCharIsUpper_TCL_DECLARED #define Tcl_UniCharIsUpper_TCL_DECLARED /* 350 */ -EXTERN int Tcl_UniCharIsUpper (int ch); +EXTERN int Tcl_UniCharIsUpper(int ch); #endif #ifndef Tcl_UniCharIsWordChar_TCL_DECLARED #define Tcl_UniCharIsWordChar_TCL_DECLARED /* 351 */ -EXTERN int Tcl_UniCharIsWordChar (int ch); +EXTERN int Tcl_UniCharIsWordChar(int ch); #endif #ifndef Tcl_UniCharLen_TCL_DECLARED #define Tcl_UniCharLen_TCL_DECLARED /* 352 */ -EXTERN int Tcl_UniCharLen (const Tcl_UniChar * uniStr); +EXTERN int Tcl_UniCharLen(const Tcl_UniChar *uniStr); #endif #ifndef Tcl_UniCharNcmp_TCL_DECLARED #define Tcl_UniCharNcmp_TCL_DECLARED /* 353 */ -EXTERN int Tcl_UniCharNcmp (const Tcl_UniChar * ucs, - const Tcl_UniChar * uct, +EXTERN int Tcl_UniCharNcmp(const Tcl_UniChar *ucs, + const Tcl_UniChar *uct, unsigned long numChars); #endif #ifndef Tcl_UniCharToUtfDString_TCL_DECLARED #define Tcl_UniCharToUtfDString_TCL_DECLARED /* 354 */ -EXTERN char * Tcl_UniCharToUtfDString (const Tcl_UniChar * uniStr, - int uniLength, Tcl_DString * dsPtr); +EXTERN char * Tcl_UniCharToUtfDString(const Tcl_UniChar *uniStr, + int uniLength, Tcl_DString *dsPtr); #endif #ifndef Tcl_UtfToUniCharDString_TCL_DECLARED #define Tcl_UtfToUniCharDString_TCL_DECLARED /* 355 */ -EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString (const char * src, - int length, Tcl_DString * dsPtr); +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString(const char *src, int length, + Tcl_DString *dsPtr); #endif #ifndef Tcl_GetRegExpFromObj_TCL_DECLARED #define Tcl_GetRegExpFromObj_TCL_DECLARED /* 356 */ -EXTERN Tcl_RegExp Tcl_GetRegExpFromObj (Tcl_Interp * interp, - Tcl_Obj * patObj, int flags); +EXTERN Tcl_RegExp Tcl_GetRegExpFromObj(Tcl_Interp *interp, + Tcl_Obj *patObj, int flags); #endif #ifndef Tcl_EvalTokens_TCL_DECLARED #define Tcl_EvalTokens_TCL_DECLARED /* 357 */ -EXTERN Tcl_Obj * Tcl_EvalTokens (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); +EXTERN Tcl_Obj * Tcl_EvalTokens(Tcl_Interp *interp, + Tcl_Token *tokenPtr, int count); #endif #ifndef Tcl_FreeParse_TCL_DECLARED #define Tcl_FreeParse_TCL_DECLARED /* 358 */ -EXTERN void Tcl_FreeParse (Tcl_Parse * parsePtr); +EXTERN void Tcl_FreeParse(Tcl_Parse *parsePtr); #endif #ifndef Tcl_LogCommandInfo_TCL_DECLARED #define Tcl_LogCommandInfo_TCL_DECLARED /* 359 */ -EXTERN void Tcl_LogCommandInfo (Tcl_Interp * interp, - const char * script, const char * command, +EXTERN void Tcl_LogCommandInfo(Tcl_Interp *interp, + const char *script, const char *command, int length); #endif #ifndef Tcl_ParseBraces_TCL_DECLARED #define Tcl_ParseBraces_TCL_DECLARED /* 360 */ -EXTERN int Tcl_ParseBraces (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); +EXTERN int Tcl_ParseBraces(Tcl_Interp *interp, + const char *start, int numBytes, + Tcl_Parse *parsePtr, int append, + CONST84 char **termPtr); #endif #ifndef Tcl_ParseCommand_TCL_DECLARED #define Tcl_ParseCommand_TCL_DECLARED /* 361 */ -EXTERN int Tcl_ParseCommand (Tcl_Interp * interp, - const char * start, int numBytes, int nested, - Tcl_Parse * parsePtr); +EXTERN int Tcl_ParseCommand(Tcl_Interp *interp, + const char *start, int numBytes, int nested, + Tcl_Parse *parsePtr); #endif #ifndef Tcl_ParseExpr_TCL_DECLARED #define Tcl_ParseExpr_TCL_DECLARED /* 362 */ -EXTERN int Tcl_ParseExpr (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr); +EXTERN int Tcl_ParseExpr(Tcl_Interp *interp, const char *start, + int numBytes, Tcl_Parse *parsePtr); #endif #ifndef Tcl_ParseQuotedString_TCL_DECLARED #define Tcl_ParseQuotedString_TCL_DECLARED /* 363 */ -EXTERN int Tcl_ParseQuotedString (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append, - CONST84 char ** termPtr); +EXTERN int Tcl_ParseQuotedString(Tcl_Interp *interp, + const char *start, int numBytes, + Tcl_Parse *parsePtr, int append, + CONST84 char **termPtr); #endif #ifndef Tcl_ParseVarName_TCL_DECLARED #define Tcl_ParseVarName_TCL_DECLARED /* 364 */ -EXTERN int Tcl_ParseVarName (Tcl_Interp * interp, - const char * start, int numBytes, - Tcl_Parse * parsePtr, int append); +EXTERN int Tcl_ParseVarName(Tcl_Interp *interp, + const char *start, int numBytes, + Tcl_Parse *parsePtr, int append); #endif #ifndef Tcl_GetCwd_TCL_DECLARED #define Tcl_GetCwd_TCL_DECLARED /* 365 */ -EXTERN char * Tcl_GetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); +EXTERN char * Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr); #endif #ifndef Tcl_Chdir_TCL_DECLARED #define Tcl_Chdir_TCL_DECLARED /* 366 */ -EXTERN int Tcl_Chdir (const char * dirName); +EXTERN int Tcl_Chdir(const char *dirName); #endif #ifndef Tcl_Access_TCL_DECLARED #define Tcl_Access_TCL_DECLARED /* 367 */ -EXTERN int Tcl_Access (const char * path, int mode); +EXTERN int Tcl_Access(const char *path, int mode); #endif #ifndef Tcl_Stat_TCL_DECLARED #define Tcl_Stat_TCL_DECLARED /* 368 */ -EXTERN int Tcl_Stat (const char * path, struct stat * bufPtr); +EXTERN int Tcl_Stat(const char *path, struct stat *bufPtr); #endif #ifndef Tcl_UtfNcmp_TCL_DECLARED #define Tcl_UtfNcmp_TCL_DECLARED /* 369 */ -EXTERN int Tcl_UtfNcmp (const char * s1, const char * s2, +EXTERN int Tcl_UtfNcmp(const char *s1, const char *s2, unsigned long n); #endif #ifndef Tcl_UtfNcasecmp_TCL_DECLARED #define Tcl_UtfNcasecmp_TCL_DECLARED /* 370 */ -EXTERN int Tcl_UtfNcasecmp (const char * s1, const char * s2, +EXTERN int Tcl_UtfNcasecmp(const char *s1, const char *s2, unsigned long n); #endif #ifndef Tcl_StringCaseMatch_TCL_DECLARED #define Tcl_StringCaseMatch_TCL_DECLARED /* 371 */ -EXTERN int Tcl_StringCaseMatch (const char * str, - const char * pattern, int nocase); +EXTERN int Tcl_StringCaseMatch(const char *str, + const char *pattern, int nocase); #endif #ifndef Tcl_UniCharIsControl_TCL_DECLARED #define Tcl_UniCharIsControl_TCL_DECLARED /* 372 */ -EXTERN int Tcl_UniCharIsControl (int ch); +EXTERN int Tcl_UniCharIsControl(int ch); #endif #ifndef Tcl_UniCharIsGraph_TCL_DECLARED #define Tcl_UniCharIsGraph_TCL_DECLARED /* 373 */ -EXTERN int Tcl_UniCharIsGraph (int ch); +EXTERN int Tcl_UniCharIsGraph(int ch); #endif #ifndef Tcl_UniCharIsPrint_TCL_DECLARED #define Tcl_UniCharIsPrint_TCL_DECLARED /* 374 */ -EXTERN int Tcl_UniCharIsPrint (int ch); +EXTERN int Tcl_UniCharIsPrint(int ch); #endif #ifndef Tcl_UniCharIsPunct_TCL_DECLARED #define Tcl_UniCharIsPunct_TCL_DECLARED /* 375 */ -EXTERN int Tcl_UniCharIsPunct (int ch); +EXTERN int Tcl_UniCharIsPunct(int ch); #endif #ifndef Tcl_RegExpExecObj_TCL_DECLARED #define Tcl_RegExpExecObj_TCL_DECLARED /* 376 */ -EXTERN int Tcl_RegExpExecObj (Tcl_Interp * interp, - Tcl_RegExp regexp, Tcl_Obj * textObj, +EXTERN int Tcl_RegExpExecObj(Tcl_Interp *interp, + Tcl_RegExp regexp, Tcl_Obj *textObj, int offset, int nmatches, int flags); #endif #ifndef Tcl_RegExpGetInfo_TCL_DECLARED #define Tcl_RegExpGetInfo_TCL_DECLARED /* 377 */ -EXTERN void Tcl_RegExpGetInfo (Tcl_RegExp regexp, - Tcl_RegExpInfo * infoPtr); +EXTERN void Tcl_RegExpGetInfo(Tcl_RegExp regexp, + Tcl_RegExpInfo *infoPtr); #endif #ifndef Tcl_NewUnicodeObj_TCL_DECLARED #define Tcl_NewUnicodeObj_TCL_DECLARED /* 378 */ -EXTERN Tcl_Obj * Tcl_NewUnicodeObj (const Tcl_UniChar * unicode, +EXTERN Tcl_Obj * Tcl_NewUnicodeObj(const Tcl_UniChar *unicode, int numChars); #endif #ifndef Tcl_SetUnicodeObj_TCL_DECLARED #define Tcl_SetUnicodeObj_TCL_DECLARED /* 379 */ -EXTERN void Tcl_SetUnicodeObj (Tcl_Obj * objPtr, - const Tcl_UniChar * unicode, int numChars); +EXTERN void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, + const Tcl_UniChar *unicode, int numChars); #endif #ifndef Tcl_GetCharLength_TCL_DECLARED #define Tcl_GetCharLength_TCL_DECLARED /* 380 */ -EXTERN int Tcl_GetCharLength (Tcl_Obj * objPtr); +EXTERN int Tcl_GetCharLength(Tcl_Obj *objPtr); #endif #ifndef Tcl_GetUniChar_TCL_DECLARED #define Tcl_GetUniChar_TCL_DECLARED /* 381 */ -EXTERN Tcl_UniChar Tcl_GetUniChar (Tcl_Obj * objPtr, int index); +EXTERN Tcl_UniChar Tcl_GetUniChar(Tcl_Obj *objPtr, int index); #endif #ifndef Tcl_GetUnicode_TCL_DECLARED #define Tcl_GetUnicode_TCL_DECLARED /* 382 */ -EXTERN Tcl_UniChar * Tcl_GetUnicode (Tcl_Obj * objPtr); +EXTERN Tcl_UniChar * Tcl_GetUnicode(Tcl_Obj *objPtr); #endif #ifndef Tcl_GetRange_TCL_DECLARED #define Tcl_GetRange_TCL_DECLARED /* 383 */ -EXTERN Tcl_Obj * Tcl_GetRange (Tcl_Obj * objPtr, int first, int last); +EXTERN Tcl_Obj * Tcl_GetRange(Tcl_Obj *objPtr, int first, int last); #endif #ifndef Tcl_AppendUnicodeToObj_TCL_DECLARED #define Tcl_AppendUnicodeToObj_TCL_DECLARED /* 384 */ -EXTERN void Tcl_AppendUnicodeToObj (Tcl_Obj * objPtr, - const Tcl_UniChar * unicode, int length); +EXTERN void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr, + const Tcl_UniChar *unicode, int length); #endif #ifndef Tcl_RegExpMatchObj_TCL_DECLARED #define Tcl_RegExpMatchObj_TCL_DECLARED /* 385 */ -EXTERN int Tcl_RegExpMatchObj (Tcl_Interp * interp, - Tcl_Obj * textObj, Tcl_Obj * patternObj); +EXTERN int Tcl_RegExpMatchObj(Tcl_Interp *interp, + Tcl_Obj *textObj, Tcl_Obj *patternObj); #endif #ifndef Tcl_SetNotifier_TCL_DECLARED #define Tcl_SetNotifier_TCL_DECLARED /* 386 */ -EXTERN void Tcl_SetNotifier (Tcl_NotifierProcs * notifierProcPtr); +EXTERN void Tcl_SetNotifier(Tcl_NotifierProcs *notifierProcPtr); #endif #ifndef Tcl_GetAllocMutex_TCL_DECLARED #define Tcl_GetAllocMutex_TCL_DECLARED /* 387 */ -EXTERN Tcl_Mutex * Tcl_GetAllocMutex (void); +EXTERN Tcl_Mutex * Tcl_GetAllocMutex(void); #endif #ifndef Tcl_GetChannelNames_TCL_DECLARED #define Tcl_GetChannelNames_TCL_DECLARED /* 388 */ -EXTERN int Tcl_GetChannelNames (Tcl_Interp * interp); +EXTERN int Tcl_GetChannelNames(Tcl_Interp *interp); #endif #ifndef Tcl_GetChannelNamesEx_TCL_DECLARED #define Tcl_GetChannelNamesEx_TCL_DECLARED /* 389 */ -EXTERN int Tcl_GetChannelNamesEx (Tcl_Interp * interp, - const char * pattern); +EXTERN int Tcl_GetChannelNamesEx(Tcl_Interp *interp, + const char *pattern); #endif #ifndef Tcl_ProcObjCmd_TCL_DECLARED #define Tcl_ProcObjCmd_TCL_DECLARED /* 390 */ -EXTERN int Tcl_ProcObjCmd (ClientData clientData, - Tcl_Interp * interp, int objc, +EXTERN int Tcl_ProcObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_ConditionFinalize_TCL_DECLARED #define Tcl_ConditionFinalize_TCL_DECLARED /* 391 */ -EXTERN void Tcl_ConditionFinalize (Tcl_Condition * condPtr); +EXTERN void Tcl_ConditionFinalize(Tcl_Condition *condPtr); #endif #ifndef Tcl_MutexFinalize_TCL_DECLARED #define Tcl_MutexFinalize_TCL_DECLARED /* 392 */ -EXTERN void Tcl_MutexFinalize (Tcl_Mutex * mutex); +EXTERN void Tcl_MutexFinalize(Tcl_Mutex *mutex); #endif #ifndef Tcl_CreateThread_TCL_DECLARED #define Tcl_CreateThread_TCL_DECLARED /* 393 */ -EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, +EXTERN int Tcl_CreateThread(Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); @@ -2355,1387 +2326,1363 @@ EXTERN int Tcl_CreateThread (Tcl_ThreadId * idPtr, #ifndef Tcl_ReadRaw_TCL_DECLARED #define Tcl_ReadRaw_TCL_DECLARED /* 394 */ -EXTERN int Tcl_ReadRaw (Tcl_Channel chan, char * dst, +EXTERN int Tcl_ReadRaw(Tcl_Channel chan, char *dst, int bytesToRead); #endif #ifndef Tcl_WriteRaw_TCL_DECLARED #define Tcl_WriteRaw_TCL_DECLARED /* 395 */ -EXTERN int Tcl_WriteRaw (Tcl_Channel chan, const char * src, +EXTERN int Tcl_WriteRaw(Tcl_Channel chan, const char *src, int srcLen); #endif #ifndef Tcl_GetTopChannel_TCL_DECLARED #define Tcl_GetTopChannel_TCL_DECLARED /* 396 */ -EXTERN Tcl_Channel Tcl_GetTopChannel (Tcl_Channel chan); +EXTERN Tcl_Channel Tcl_GetTopChannel(Tcl_Channel chan); #endif #ifndef Tcl_ChannelBuffered_TCL_DECLARED #define Tcl_ChannelBuffered_TCL_DECLARED /* 397 */ -EXTERN int Tcl_ChannelBuffered (Tcl_Channel chan); +EXTERN int Tcl_ChannelBuffered(Tcl_Channel chan); #endif #ifndef Tcl_ChannelName_TCL_DECLARED #define Tcl_ChannelName_TCL_DECLARED /* 398 */ -EXTERN CONST84_RETURN char * Tcl_ChannelName ( - const Tcl_ChannelType * chanTypePtr); +EXTERN CONST84_RETURN char * Tcl_ChannelName( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelVersion_TCL_DECLARED #define Tcl_ChannelVersion_TCL_DECLARED /* 399 */ -EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_ChannelTypeVersion Tcl_ChannelVersion( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelBlockModeProc_TCL_DECLARED #define Tcl_ChannelBlockModeProc_TCL_DECLARED /* 400 */ -EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverBlockModeProc * Tcl_ChannelBlockModeProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelCloseProc_TCL_DECLARED #define Tcl_ChannelCloseProc_TCL_DECLARED /* 401 */ -EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverCloseProc * Tcl_ChannelCloseProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelClose2Proc_TCL_DECLARED #define Tcl_ChannelClose2Proc_TCL_DECLARED /* 402 */ -EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverClose2Proc * Tcl_ChannelClose2Proc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelInputProc_TCL_DECLARED #define Tcl_ChannelInputProc_TCL_DECLARED /* 403 */ -EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverInputProc * Tcl_ChannelInputProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelOutputProc_TCL_DECLARED #define Tcl_ChannelOutputProc_TCL_DECLARED /* 404 */ -EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverOutputProc * Tcl_ChannelOutputProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelSeekProc_TCL_DECLARED #define Tcl_ChannelSeekProc_TCL_DECLARED /* 405 */ -EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverSeekProc * Tcl_ChannelSeekProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelSetOptionProc_TCL_DECLARED #define Tcl_ChannelSetOptionProc_TCL_DECLARED /* 406 */ -EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverSetOptionProc * Tcl_ChannelSetOptionProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelGetOptionProc_TCL_DECLARED #define Tcl_ChannelGetOptionProc_TCL_DECLARED /* 407 */ -EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverGetOptionProc * Tcl_ChannelGetOptionProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelWatchProc_TCL_DECLARED #define Tcl_ChannelWatchProc_TCL_DECLARED /* 408 */ -EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverWatchProc * Tcl_ChannelWatchProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelGetHandleProc_TCL_DECLARED #define Tcl_ChannelGetHandleProc_TCL_DECLARED /* 409 */ -EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverGetHandleProc * Tcl_ChannelGetHandleProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelFlushProc_TCL_DECLARED #define Tcl_ChannelFlushProc_TCL_DECLARED /* 410 */ -EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverFlushProc * Tcl_ChannelFlushProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_ChannelHandlerProc_TCL_DECLARED #define Tcl_ChannelHandlerProc_TCL_DECLARED /* 411 */ -EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverHandlerProc * Tcl_ChannelHandlerProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_JoinThread_TCL_DECLARED #define Tcl_JoinThread_TCL_DECLARED /* 412 */ -EXTERN int Tcl_JoinThread (Tcl_ThreadId threadId, int * result); +EXTERN int Tcl_JoinThread(Tcl_ThreadId threadId, int *result); #endif #ifndef Tcl_IsChannelShared_TCL_DECLARED #define Tcl_IsChannelShared_TCL_DECLARED /* 413 */ -EXTERN int Tcl_IsChannelShared (Tcl_Channel channel); +EXTERN int Tcl_IsChannelShared(Tcl_Channel channel); #endif #ifndef Tcl_IsChannelRegistered_TCL_DECLARED #define Tcl_IsChannelRegistered_TCL_DECLARED /* 414 */ -EXTERN int Tcl_IsChannelRegistered (Tcl_Interp * interp, +EXTERN int Tcl_IsChannelRegistered(Tcl_Interp *interp, Tcl_Channel channel); #endif #ifndef Tcl_CutChannel_TCL_DECLARED #define Tcl_CutChannel_TCL_DECLARED /* 415 */ -EXTERN void Tcl_CutChannel (Tcl_Channel channel); +EXTERN void Tcl_CutChannel(Tcl_Channel channel); #endif #ifndef Tcl_SpliceChannel_TCL_DECLARED #define Tcl_SpliceChannel_TCL_DECLARED /* 416 */ -EXTERN void Tcl_SpliceChannel (Tcl_Channel channel); +EXTERN void Tcl_SpliceChannel(Tcl_Channel channel); #endif #ifndef Tcl_ClearChannelHandlers_TCL_DECLARED #define Tcl_ClearChannelHandlers_TCL_DECLARED /* 417 */ -EXTERN void Tcl_ClearChannelHandlers (Tcl_Channel channel); +EXTERN void Tcl_ClearChannelHandlers(Tcl_Channel channel); #endif #ifndef Tcl_IsChannelExisting_TCL_DECLARED #define Tcl_IsChannelExisting_TCL_DECLARED /* 418 */ -EXTERN int Tcl_IsChannelExisting (const char * channelName); +EXTERN int Tcl_IsChannelExisting(const char *channelName); #endif #ifndef Tcl_UniCharNcasecmp_TCL_DECLARED #define Tcl_UniCharNcasecmp_TCL_DECLARED /* 419 */ -EXTERN int Tcl_UniCharNcasecmp (const Tcl_UniChar * ucs, - const Tcl_UniChar * uct, +EXTERN int Tcl_UniCharNcasecmp(const Tcl_UniChar *ucs, + const Tcl_UniChar *uct, unsigned long numChars); #endif #ifndef Tcl_UniCharCaseMatch_TCL_DECLARED #define Tcl_UniCharCaseMatch_TCL_DECLARED /* 420 */ -EXTERN int Tcl_UniCharCaseMatch (const Tcl_UniChar * uniStr, - const Tcl_UniChar * uniPattern, int nocase); +EXTERN int Tcl_UniCharCaseMatch(const Tcl_UniChar *uniStr, + const Tcl_UniChar *uniPattern, int nocase); #endif #ifndef Tcl_FindHashEntry_TCL_DECLARED #define Tcl_FindHashEntry_TCL_DECLARED /* 421 */ -EXTERN Tcl_HashEntry * Tcl_FindHashEntry (Tcl_HashTable * tablePtr, - const char * key); +EXTERN Tcl_HashEntry * Tcl_FindHashEntry(Tcl_HashTable *tablePtr, + const char *key); #endif #ifndef Tcl_CreateHashEntry_TCL_DECLARED #define Tcl_CreateHashEntry_TCL_DECLARED /* 422 */ -EXTERN Tcl_HashEntry * Tcl_CreateHashEntry (Tcl_HashTable * tablePtr, - const char * key, int * newPtr); +EXTERN Tcl_HashEntry * Tcl_CreateHashEntry(Tcl_HashTable *tablePtr, + const char *key, int *newPtr); #endif #ifndef Tcl_InitCustomHashTable_TCL_DECLARED #define Tcl_InitCustomHashTable_TCL_DECLARED /* 423 */ -EXTERN void Tcl_InitCustomHashTable (Tcl_HashTable * tablePtr, - int keyType, const Tcl_HashKeyType * typePtr); +EXTERN void Tcl_InitCustomHashTable(Tcl_HashTable *tablePtr, + int keyType, const Tcl_HashKeyType *typePtr); #endif #ifndef Tcl_InitObjHashTable_TCL_DECLARED #define Tcl_InitObjHashTable_TCL_DECLARED /* 424 */ -EXTERN void Tcl_InitObjHashTable (Tcl_HashTable * tablePtr); +EXTERN void Tcl_InitObjHashTable(Tcl_HashTable *tablePtr); #endif #ifndef Tcl_CommandTraceInfo_TCL_DECLARED #define Tcl_CommandTraceInfo_TCL_DECLARED /* 425 */ -EXTERN ClientData Tcl_CommandTraceInfo (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * procPtr, +EXTERN ClientData Tcl_CommandTraceInfo(Tcl_Interp *interp, + const char *varName, int flags, + Tcl_CommandTraceProc *procPtr, ClientData prevClientData); #endif #ifndef Tcl_TraceCommand_TCL_DECLARED #define Tcl_TraceCommand_TCL_DECLARED /* 426 */ -EXTERN int Tcl_TraceCommand (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * proc, +EXTERN int Tcl_TraceCommand(Tcl_Interp *interp, + const char *varName, int flags, + Tcl_CommandTraceProc *proc, ClientData clientData); #endif #ifndef Tcl_UntraceCommand_TCL_DECLARED #define Tcl_UntraceCommand_TCL_DECLARED /* 427 */ -EXTERN void Tcl_UntraceCommand (Tcl_Interp * interp, - const char * varName, int flags, - Tcl_CommandTraceProc * proc, +EXTERN void Tcl_UntraceCommand(Tcl_Interp *interp, + const char *varName, int flags, + Tcl_CommandTraceProc *proc, ClientData clientData); #endif #ifndef Tcl_AttemptAlloc_TCL_DECLARED #define Tcl_AttemptAlloc_TCL_DECLARED /* 428 */ -EXTERN char * Tcl_AttemptAlloc (unsigned int size); +EXTERN char * Tcl_AttemptAlloc(unsigned int size); #endif #ifndef Tcl_AttemptDbCkalloc_TCL_DECLARED #define Tcl_AttemptDbCkalloc_TCL_DECLARED /* 429 */ -EXTERN char * Tcl_AttemptDbCkalloc (unsigned int size, - const char * file, int line); +EXTERN char * Tcl_AttemptDbCkalloc(unsigned int size, + const char *file, int line); #endif #ifndef Tcl_AttemptRealloc_TCL_DECLARED #define Tcl_AttemptRealloc_TCL_DECLARED /* 430 */ -EXTERN char * Tcl_AttemptRealloc (char * ptr, unsigned int size); +EXTERN char * Tcl_AttemptRealloc(char *ptr, unsigned int size); #endif #ifndef Tcl_AttemptDbCkrealloc_TCL_DECLARED #define Tcl_AttemptDbCkrealloc_TCL_DECLARED /* 431 */ -EXTERN char * Tcl_AttemptDbCkrealloc (char * ptr, - unsigned int size, const char * file, - int line); +EXTERN char * Tcl_AttemptDbCkrealloc(char *ptr, unsigned int size, + const char *file, int line); #endif #ifndef Tcl_AttemptSetObjLength_TCL_DECLARED #define Tcl_AttemptSetObjLength_TCL_DECLARED /* 432 */ -EXTERN int Tcl_AttemptSetObjLength (Tcl_Obj * objPtr, - int length); +EXTERN int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length); #endif #ifndef Tcl_GetChannelThread_TCL_DECLARED #define Tcl_GetChannelThread_TCL_DECLARED /* 433 */ -EXTERN Tcl_ThreadId Tcl_GetChannelThread (Tcl_Channel channel); +EXTERN Tcl_ThreadId Tcl_GetChannelThread(Tcl_Channel channel); #endif #ifndef Tcl_GetUnicodeFromObj_TCL_DECLARED #define Tcl_GetUnicodeFromObj_TCL_DECLARED /* 434 */ -EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj (Tcl_Obj * objPtr, - int * lengthPtr); +EXTERN Tcl_UniChar * Tcl_GetUnicodeFromObj(Tcl_Obj *objPtr, + int *lengthPtr); #endif #ifndef Tcl_GetMathFuncInfo_TCL_DECLARED #define Tcl_GetMathFuncInfo_TCL_DECLARED /* 435 */ -EXTERN int Tcl_GetMathFuncInfo (Tcl_Interp * interp, - const char * name, int * numArgsPtr, - Tcl_ValueType ** argTypesPtr, - Tcl_MathProc ** procPtr, - ClientData * clientDataPtr); +EXTERN int Tcl_GetMathFuncInfo(Tcl_Interp *interp, + const char *name, int *numArgsPtr, + Tcl_ValueType **argTypesPtr, + Tcl_MathProc **procPtr, + ClientData *clientDataPtr); #endif #ifndef Tcl_ListMathFuncs_TCL_DECLARED #define Tcl_ListMathFuncs_TCL_DECLARED /* 436 */ -EXTERN Tcl_Obj * Tcl_ListMathFuncs (Tcl_Interp * interp, - const char * pattern); +EXTERN Tcl_Obj * Tcl_ListMathFuncs(Tcl_Interp *interp, + const char *pattern); #endif #ifndef Tcl_SubstObj_TCL_DECLARED #define Tcl_SubstObj_TCL_DECLARED /* 437 */ -EXTERN Tcl_Obj * Tcl_SubstObj (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN Tcl_Obj * Tcl_SubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); #endif #ifndef Tcl_DetachChannel_TCL_DECLARED #define Tcl_DetachChannel_TCL_DECLARED /* 438 */ -EXTERN int Tcl_DetachChannel (Tcl_Interp * interp, +EXTERN int Tcl_DetachChannel(Tcl_Interp *interp, Tcl_Channel channel); #endif #ifndef Tcl_IsStandardChannel_TCL_DECLARED #define Tcl_IsStandardChannel_TCL_DECLARED /* 439 */ -EXTERN int Tcl_IsStandardChannel (Tcl_Channel channel); +EXTERN int Tcl_IsStandardChannel(Tcl_Channel channel); #endif #ifndef Tcl_FSCopyFile_TCL_DECLARED #define Tcl_FSCopyFile_TCL_DECLARED /* 440 */ -EXTERN int Tcl_FSCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); +EXTERN int Tcl_FSCopyFile(Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr); #endif #ifndef Tcl_FSCopyDirectory_TCL_DECLARED #define Tcl_FSCopyDirectory_TCL_DECLARED /* 441 */ -EXTERN int Tcl_FSCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +EXTERN int Tcl_FSCopyDirectory(Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); #endif #ifndef Tcl_FSCreateDirectory_TCL_DECLARED #define Tcl_FSCreateDirectory_TCL_DECLARED /* 442 */ -EXTERN int Tcl_FSCreateDirectory (Tcl_Obj * pathPtr); +EXTERN int Tcl_FSCreateDirectory(Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSDeleteFile_TCL_DECLARED #define Tcl_FSDeleteFile_TCL_DECLARED /* 443 */ -EXTERN int Tcl_FSDeleteFile (Tcl_Obj * pathPtr); +EXTERN int Tcl_FSDeleteFile(Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSLoadFile_TCL_DECLARED #define Tcl_FSLoadFile_TCL_DECLARED /* 444 */ -EXTERN int Tcl_FSLoadFile (Tcl_Interp * interp, - Tcl_Obj * pathPtr, const char * sym1, - const char * sym2, - Tcl_PackageInitProc ** proc1Ptr, - Tcl_PackageInitProc ** proc2Ptr, - Tcl_LoadHandle * handlePtr, - Tcl_FSUnloadFileProc ** unloadProcPtr); +EXTERN int Tcl_FSLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, + const char *sym1, const char *sym2, + Tcl_PackageInitProc **proc1Ptr, + Tcl_PackageInitProc **proc2Ptr, + Tcl_LoadHandle *handlePtr, + Tcl_FSUnloadFileProc **unloadProcPtr); #endif #ifndef Tcl_FSMatchInDirectory_TCL_DECLARED #define Tcl_FSMatchInDirectory_TCL_DECLARED /* 445 */ -EXTERN int Tcl_FSMatchInDirectory (Tcl_Interp * interp, - Tcl_Obj * result, Tcl_Obj * pathPtr, - const char * pattern, - Tcl_GlobTypeData * types); +EXTERN int Tcl_FSMatchInDirectory(Tcl_Interp *interp, + Tcl_Obj *result, Tcl_Obj *pathPtr, + const char *pattern, Tcl_GlobTypeData *types); #endif #ifndef Tcl_FSLink_TCL_DECLARED #define Tcl_FSLink_TCL_DECLARED /* 446 */ -EXTERN Tcl_Obj * Tcl_FSLink (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, +EXTERN Tcl_Obj * Tcl_FSLink(Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkAction); #endif #ifndef Tcl_FSRemoveDirectory_TCL_DECLARED #define Tcl_FSRemoveDirectory_TCL_DECLARED /* 447 */ -EXTERN int Tcl_FSRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); +EXTERN int Tcl_FSRemoveDirectory(Tcl_Obj *pathPtr, + int recursive, Tcl_Obj **errorPtr); #endif #ifndef Tcl_FSRenameFile_TCL_DECLARED #define Tcl_FSRenameFile_TCL_DECLARED /* 448 */ -EXTERN int Tcl_FSRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); +EXTERN int Tcl_FSRenameFile(Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr); #endif #ifndef Tcl_FSLstat_TCL_DECLARED #define Tcl_FSLstat_TCL_DECLARED /* 449 */ -EXTERN int Tcl_FSLstat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +EXTERN int Tcl_FSLstat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf); #endif #ifndef Tcl_FSUtime_TCL_DECLARED #define Tcl_FSUtime_TCL_DECLARED /* 450 */ -EXTERN int Tcl_FSUtime (Tcl_Obj * pathPtr, - struct utimbuf * tval); +EXTERN int Tcl_FSUtime(Tcl_Obj *pathPtr, struct utimbuf *tval); #endif #ifndef Tcl_FSFileAttrsGet_TCL_DECLARED #define Tcl_FSFileAttrsGet_TCL_DECLARED /* 451 */ -EXTERN int Tcl_FSFileAttrsGet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); +EXTERN int Tcl_FSFileAttrsGet(Tcl_Interp *interp, int index, + Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); #endif #ifndef Tcl_FSFileAttrsSet_TCL_DECLARED #define Tcl_FSFileAttrsSet_TCL_DECLARED /* 452 */ -EXTERN int Tcl_FSFileAttrsSet (Tcl_Interp * interp, int index, - Tcl_Obj * pathPtr, Tcl_Obj * objPtr); +EXTERN int Tcl_FSFileAttrsSet(Tcl_Interp *interp, int index, + Tcl_Obj *pathPtr, Tcl_Obj *objPtr); #endif #ifndef Tcl_FSFileAttrStrings_TCL_DECLARED #define Tcl_FSFileAttrStrings_TCL_DECLARED /* 453 */ -EXTERN const char *CONST86 * Tcl_FSFileAttrStrings (Tcl_Obj * pathPtr, - Tcl_Obj ** objPtrRef); +EXTERN const char *CONST86 * Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, + Tcl_Obj **objPtrRef); #endif #ifndef Tcl_FSStat_TCL_DECLARED #define Tcl_FSStat_TCL_DECLARED /* 454 */ -EXTERN int Tcl_FSStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +EXTERN int Tcl_FSStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf); #endif #ifndef Tcl_FSAccess_TCL_DECLARED #define Tcl_FSAccess_TCL_DECLARED /* 455 */ -EXTERN int Tcl_FSAccess (Tcl_Obj * pathPtr, int mode); +EXTERN int Tcl_FSAccess(Tcl_Obj *pathPtr, int mode); #endif #ifndef Tcl_FSOpenFileChannel_TCL_DECLARED #define Tcl_FSOpenFileChannel_TCL_DECLARED /* 456 */ -EXTERN Tcl_Channel Tcl_FSOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, const char * modeString, +EXTERN Tcl_Channel Tcl_FSOpenFileChannel(Tcl_Interp *interp, + Tcl_Obj *pathPtr, const char *modeString, int permissions); #endif #ifndef Tcl_FSGetCwd_TCL_DECLARED #define Tcl_FSGetCwd_TCL_DECLARED /* 457 */ -EXTERN Tcl_Obj * Tcl_FSGetCwd (Tcl_Interp * interp); +EXTERN Tcl_Obj * Tcl_FSGetCwd(Tcl_Interp *interp); #endif #ifndef Tcl_FSChdir_TCL_DECLARED #define Tcl_FSChdir_TCL_DECLARED /* 458 */ -EXTERN int Tcl_FSChdir (Tcl_Obj * pathPtr); +EXTERN int Tcl_FSChdir(Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSConvertToPathType_TCL_DECLARED #define Tcl_FSConvertToPathType_TCL_DECLARED /* 459 */ -EXTERN int Tcl_FSConvertToPathType (Tcl_Interp * interp, - Tcl_Obj * pathPtr); +EXTERN int Tcl_FSConvertToPathType(Tcl_Interp *interp, + Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSJoinPath_TCL_DECLARED #define Tcl_FSJoinPath_TCL_DECLARED /* 460 */ -EXTERN Tcl_Obj * Tcl_FSJoinPath (Tcl_Obj * listObj, int elements); +EXTERN Tcl_Obj * Tcl_FSJoinPath(Tcl_Obj *listObj, int elements); #endif #ifndef Tcl_FSSplitPath_TCL_DECLARED #define Tcl_FSSplitPath_TCL_DECLARED /* 461 */ -EXTERN Tcl_Obj * Tcl_FSSplitPath (Tcl_Obj * pathPtr, int * lenPtr); +EXTERN Tcl_Obj * Tcl_FSSplitPath(Tcl_Obj *pathPtr, int *lenPtr); #endif #ifndef Tcl_FSEqualPaths_TCL_DECLARED #define Tcl_FSEqualPaths_TCL_DECLARED /* 462 */ -EXTERN int Tcl_FSEqualPaths (Tcl_Obj * firstPtr, - Tcl_Obj * secondPtr); +EXTERN int Tcl_FSEqualPaths(Tcl_Obj *firstPtr, + Tcl_Obj *secondPtr); #endif #ifndef Tcl_FSGetNormalizedPath_TCL_DECLARED #define Tcl_FSGetNormalizedPath_TCL_DECLARED /* 463 */ -EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); +EXTERN Tcl_Obj * Tcl_FSGetNormalizedPath(Tcl_Interp *interp, + Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSJoinToPath_TCL_DECLARED #define Tcl_FSJoinToPath_TCL_DECLARED /* 464 */ -EXTERN Tcl_Obj * Tcl_FSJoinToPath (Tcl_Obj * pathPtr, int objc, +EXTERN Tcl_Obj * Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_FSGetInternalRep_TCL_DECLARED #define Tcl_FSGetInternalRep_TCL_DECLARED /* 465 */ -EXTERN ClientData Tcl_FSGetInternalRep (Tcl_Obj * pathPtr, - const Tcl_Filesystem * fsPtr); +EXTERN ClientData Tcl_FSGetInternalRep(Tcl_Obj *pathPtr, + const Tcl_Filesystem *fsPtr); #endif #ifndef Tcl_FSGetTranslatedPath_TCL_DECLARED #define Tcl_FSGetTranslatedPath_TCL_DECLARED /* 466 */ -EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); +EXTERN Tcl_Obj * Tcl_FSGetTranslatedPath(Tcl_Interp *interp, + Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSEvalFile_TCL_DECLARED #define Tcl_FSEvalFile_TCL_DECLARED /* 467 */ -EXTERN int Tcl_FSEvalFile (Tcl_Interp * interp, - Tcl_Obj * fileName); +EXTERN int Tcl_FSEvalFile(Tcl_Interp *interp, Tcl_Obj *fileName); #endif #ifndef Tcl_FSNewNativePath_TCL_DECLARED #define Tcl_FSNewNativePath_TCL_DECLARED /* 468 */ -EXTERN Tcl_Obj * Tcl_FSNewNativePath ( - const Tcl_Filesystem * fromFilesystem, +EXTERN Tcl_Obj * Tcl_FSNewNativePath( + const Tcl_Filesystem *fromFilesystem, ClientData clientData); #endif #ifndef Tcl_FSGetNativePath_TCL_DECLARED #define Tcl_FSGetNativePath_TCL_DECLARED /* 469 */ -EXTERN const char * Tcl_FSGetNativePath (Tcl_Obj * pathPtr); +EXTERN const char * Tcl_FSGetNativePath(Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSFileSystemInfo_TCL_DECLARED #define Tcl_FSFileSystemInfo_TCL_DECLARED /* 470 */ -EXTERN Tcl_Obj * Tcl_FSFileSystemInfo (Tcl_Obj * pathPtr); +EXTERN Tcl_Obj * Tcl_FSFileSystemInfo(Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSPathSeparator_TCL_DECLARED #define Tcl_FSPathSeparator_TCL_DECLARED /* 471 */ -EXTERN Tcl_Obj * Tcl_FSPathSeparator (Tcl_Obj * pathPtr); +EXTERN Tcl_Obj * Tcl_FSPathSeparator(Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSListVolumes_TCL_DECLARED #define Tcl_FSListVolumes_TCL_DECLARED /* 472 */ -EXTERN Tcl_Obj * Tcl_FSListVolumes (void); +EXTERN Tcl_Obj * Tcl_FSListVolumes(void); #endif #ifndef Tcl_FSRegister_TCL_DECLARED #define Tcl_FSRegister_TCL_DECLARED /* 473 */ -EXTERN int Tcl_FSRegister (ClientData clientData, - const Tcl_Filesystem * fsPtr); +EXTERN int Tcl_FSRegister(ClientData clientData, + const Tcl_Filesystem *fsPtr); #endif #ifndef Tcl_FSUnregister_TCL_DECLARED #define Tcl_FSUnregister_TCL_DECLARED /* 474 */ -EXTERN int Tcl_FSUnregister (const Tcl_Filesystem * fsPtr); +EXTERN int Tcl_FSUnregister(const Tcl_Filesystem *fsPtr); #endif #ifndef Tcl_FSData_TCL_DECLARED #define Tcl_FSData_TCL_DECLARED /* 475 */ -EXTERN ClientData Tcl_FSData (const Tcl_Filesystem * fsPtr); +EXTERN ClientData Tcl_FSData(const Tcl_Filesystem *fsPtr); #endif #ifndef Tcl_FSGetTranslatedStringPath_TCL_DECLARED #define Tcl_FSGetTranslatedStringPath_TCL_DECLARED /* 476 */ -EXTERN const char * Tcl_FSGetTranslatedStringPath (Tcl_Interp * interp, - Tcl_Obj * pathPtr); +EXTERN const char * Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, + Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSGetFileSystemForPath_TCL_DECLARED #define Tcl_FSGetFileSystemForPath_TCL_DECLARED /* 477 */ -EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath ( - Tcl_Obj * pathPtr); +EXTERN CONST86 Tcl_Filesystem * Tcl_FSGetFileSystemForPath(Tcl_Obj *pathPtr); #endif #ifndef Tcl_FSGetPathType_TCL_DECLARED #define Tcl_FSGetPathType_TCL_DECLARED /* 478 */ -EXTERN Tcl_PathType Tcl_FSGetPathType (Tcl_Obj * pathPtr); +EXTERN Tcl_PathType Tcl_FSGetPathType(Tcl_Obj *pathPtr); #endif #ifndef Tcl_OutputBuffered_TCL_DECLARED #define Tcl_OutputBuffered_TCL_DECLARED /* 479 */ -EXTERN int Tcl_OutputBuffered (Tcl_Channel chan); +EXTERN int Tcl_OutputBuffered(Tcl_Channel chan); #endif #ifndef Tcl_FSMountsChanged_TCL_DECLARED #define Tcl_FSMountsChanged_TCL_DECLARED /* 480 */ -EXTERN void Tcl_FSMountsChanged (const Tcl_Filesystem * fsPtr); +EXTERN void Tcl_FSMountsChanged(const Tcl_Filesystem *fsPtr); #endif #ifndef Tcl_EvalTokensStandard_TCL_DECLARED #define Tcl_EvalTokensStandard_TCL_DECLARED /* 481 */ -EXTERN int Tcl_EvalTokensStandard (Tcl_Interp * interp, - Tcl_Token * tokenPtr, int count); +EXTERN int Tcl_EvalTokensStandard(Tcl_Interp *interp, + Tcl_Token *tokenPtr, int count); #endif #ifndef Tcl_GetTime_TCL_DECLARED #define Tcl_GetTime_TCL_DECLARED /* 482 */ -EXTERN void Tcl_GetTime (Tcl_Time * timeBuf); +EXTERN void Tcl_GetTime(Tcl_Time *timeBuf); #endif #ifndef Tcl_CreateObjTrace_TCL_DECLARED #define Tcl_CreateObjTrace_TCL_DECLARED /* 483 */ -EXTERN Tcl_Trace Tcl_CreateObjTrace (Tcl_Interp * interp, int level, - int flags, Tcl_CmdObjTraceProc * objProc, +EXTERN Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, int level, + int flags, Tcl_CmdObjTraceProc *objProc, ClientData clientData, - Tcl_CmdObjTraceDeleteProc * delProc); + Tcl_CmdObjTraceDeleteProc *delProc); #endif #ifndef Tcl_GetCommandInfoFromToken_TCL_DECLARED #define Tcl_GetCommandInfoFromToken_TCL_DECLARED /* 484 */ -EXTERN int Tcl_GetCommandInfoFromToken (Tcl_Command token, - Tcl_CmdInfo * infoPtr); +EXTERN int Tcl_GetCommandInfoFromToken(Tcl_Command token, + Tcl_CmdInfo *infoPtr); #endif #ifndef Tcl_SetCommandInfoFromToken_TCL_DECLARED #define Tcl_SetCommandInfoFromToken_TCL_DECLARED /* 485 */ -EXTERN int Tcl_SetCommandInfoFromToken (Tcl_Command token, - const Tcl_CmdInfo * infoPtr); +EXTERN int Tcl_SetCommandInfoFromToken(Tcl_Command token, + const Tcl_CmdInfo *infoPtr); #endif #ifndef Tcl_DbNewWideIntObj_TCL_DECLARED #define Tcl_DbNewWideIntObj_TCL_DECLARED /* 486 */ -EXTERN Tcl_Obj * Tcl_DbNewWideIntObj (Tcl_WideInt wideValue, - const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewWideIntObj(Tcl_WideInt wideValue, + const char *file, int line); #endif #ifndef Tcl_GetWideIntFromObj_TCL_DECLARED #define Tcl_GetWideIntFromObj_TCL_DECLARED /* 487 */ -EXTERN int Tcl_GetWideIntFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_WideInt * widePtr); +EXTERN int Tcl_GetWideIntFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Tcl_WideInt *widePtr); #endif #ifndef Tcl_NewWideIntObj_TCL_DECLARED #define Tcl_NewWideIntObj_TCL_DECLARED /* 488 */ -EXTERN Tcl_Obj * Tcl_NewWideIntObj (Tcl_WideInt wideValue); +EXTERN Tcl_Obj * Tcl_NewWideIntObj(Tcl_WideInt wideValue); #endif #ifndef Tcl_SetWideIntObj_TCL_DECLARED #define Tcl_SetWideIntObj_TCL_DECLARED /* 489 */ -EXTERN void Tcl_SetWideIntObj (Tcl_Obj * objPtr, +EXTERN void Tcl_SetWideIntObj(Tcl_Obj *objPtr, Tcl_WideInt wideValue); #endif #ifndef Tcl_AllocStatBuf_TCL_DECLARED #define Tcl_AllocStatBuf_TCL_DECLARED /* 490 */ -EXTERN Tcl_StatBuf * Tcl_AllocStatBuf (void); +EXTERN Tcl_StatBuf * Tcl_AllocStatBuf(void); #endif #ifndef Tcl_Seek_TCL_DECLARED #define Tcl_Seek_TCL_DECLARED /* 491 */ -EXTERN Tcl_WideInt Tcl_Seek (Tcl_Channel chan, Tcl_WideInt offset, +EXTERN Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset, int mode); #endif #ifndef Tcl_Tell_TCL_DECLARED #define Tcl_Tell_TCL_DECLARED /* 492 */ -EXTERN Tcl_WideInt Tcl_Tell (Tcl_Channel chan); +EXTERN Tcl_WideInt Tcl_Tell(Tcl_Channel chan); #endif #ifndef Tcl_ChannelWideSeekProc_TCL_DECLARED #define Tcl_ChannelWideSeekProc_TCL_DECLARED /* 493 */ -EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverWideSeekProc * Tcl_ChannelWideSeekProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_DictObjPut_TCL_DECLARED #define Tcl_DictObjPut_TCL_DECLARED /* 494 */ -EXTERN int Tcl_DictObjPut (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj * valuePtr); +EXTERN int Tcl_DictObjPut(Tcl_Interp *interp, Tcl_Obj *dictPtr, + Tcl_Obj *keyPtr, Tcl_Obj *valuePtr); #endif #ifndef Tcl_DictObjGet_TCL_DECLARED #define Tcl_DictObjGet_TCL_DECLARED /* 495 */ -EXTERN int Tcl_DictObjGet (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, - Tcl_Obj ** valuePtrPtr); +EXTERN int Tcl_DictObjGet(Tcl_Interp *interp, Tcl_Obj *dictPtr, + Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr); #endif #ifndef Tcl_DictObjRemove_TCL_DECLARED #define Tcl_DictObjRemove_TCL_DECLARED /* 496 */ -EXTERN int Tcl_DictObjRemove (Tcl_Interp * interp, - Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); +EXTERN int Tcl_DictObjRemove(Tcl_Interp *interp, + Tcl_Obj *dictPtr, Tcl_Obj *keyPtr); #endif #ifndef Tcl_DictObjSize_TCL_DECLARED #define Tcl_DictObjSize_TCL_DECLARED /* 497 */ -EXTERN int Tcl_DictObjSize (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int * sizePtr); +EXTERN int Tcl_DictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr, + int *sizePtr); #endif #ifndef Tcl_DictObjFirst_TCL_DECLARED #define Tcl_DictObjFirst_TCL_DECLARED /* 498 */ -EXTERN int Tcl_DictObjFirst (Tcl_Interp * interp, - Tcl_Obj * dictPtr, - Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); +EXTERN int Tcl_DictObjFirst(Tcl_Interp *interp, + Tcl_Obj *dictPtr, Tcl_DictSearch *searchPtr, + Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr, + int *donePtr); #endif #ifndef Tcl_DictObjNext_TCL_DECLARED #define Tcl_DictObjNext_TCL_DECLARED /* 499 */ -EXTERN void Tcl_DictObjNext (Tcl_DictSearch * searchPtr, - Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, - int * donePtr); +EXTERN void Tcl_DictObjNext(Tcl_DictSearch *searchPtr, + Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr, + int *donePtr); #endif #ifndef Tcl_DictObjDone_TCL_DECLARED #define Tcl_DictObjDone_TCL_DECLARED /* 500 */ -EXTERN void Tcl_DictObjDone (Tcl_DictSearch * searchPtr); +EXTERN void Tcl_DictObjDone(Tcl_DictSearch *searchPtr); #endif #ifndef Tcl_DictObjPutKeyList_TCL_DECLARED #define Tcl_DictObjPutKeyList_TCL_DECLARED /* 501 */ -EXTERN int Tcl_DictObjPutKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); +EXTERN int Tcl_DictObjPutKeyList(Tcl_Interp *interp, + Tcl_Obj *dictPtr, int keyc, + Tcl_Obj *const *keyv, Tcl_Obj *valuePtr); #endif #ifndef Tcl_DictObjRemoveKeyList_TCL_DECLARED #define Tcl_DictObjRemoveKeyList_TCL_DECLARED /* 502 */ -EXTERN int Tcl_DictObjRemoveKeyList (Tcl_Interp * interp, - Tcl_Obj * dictPtr, int keyc, - Tcl_Obj *const * keyv); +EXTERN int Tcl_DictObjRemoveKeyList(Tcl_Interp *interp, + Tcl_Obj *dictPtr, int keyc, + Tcl_Obj *const *keyv); #endif #ifndef Tcl_NewDictObj_TCL_DECLARED #define Tcl_NewDictObj_TCL_DECLARED /* 503 */ -EXTERN Tcl_Obj * Tcl_NewDictObj (void); +EXTERN Tcl_Obj * Tcl_NewDictObj(void); #endif #ifndef Tcl_DbNewDictObj_TCL_DECLARED #define Tcl_DbNewDictObj_TCL_DECLARED /* 504 */ -EXTERN Tcl_Obj * Tcl_DbNewDictObj (const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewDictObj(const char *file, int line); #endif #ifndef Tcl_RegisterConfig_TCL_DECLARED #define Tcl_RegisterConfig_TCL_DECLARED /* 505 */ -EXTERN void Tcl_RegisterConfig (Tcl_Interp * interp, - const char * pkgName, - const Tcl_Config * configuration, - const char * valEncoding); +EXTERN void Tcl_RegisterConfig(Tcl_Interp *interp, + const char *pkgName, + const Tcl_Config *configuration, + const char *valEncoding); #endif #ifndef Tcl_CreateNamespace_TCL_DECLARED #define Tcl_CreateNamespace_TCL_DECLARED /* 506 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - const char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); +EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp, + const char *name, ClientData clientData, + Tcl_NamespaceDeleteProc *deleteProc); #endif #ifndef Tcl_DeleteNamespace_TCL_DECLARED #define Tcl_DeleteNamespace_TCL_DECLARED /* 507 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +EXTERN void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr); #endif #ifndef Tcl_AppendExportList_TCL_DECLARED #define Tcl_AppendExportList_TCL_DECLARED /* 508 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +EXTERN int Tcl_AppendExportList(Tcl_Interp *interp, + Tcl_Namespace *nsPtr, Tcl_Obj *objPtr); #endif #ifndef Tcl_Export_TCL_DECLARED #define Tcl_Export_TCL_DECLARED /* 509 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int resetListFirst); +EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, + const char *pattern, int resetListFirst); #endif #ifndef Tcl_Import_TCL_DECLARED #define Tcl_Import_TCL_DECLARED /* 510 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int allowOverwrite); +EXTERN int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr, + const char *pattern, int allowOverwrite); #endif #ifndef Tcl_ForgetImport_TCL_DECLARED #define Tcl_ForgetImport_TCL_DECLARED /* 511 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern); +EXTERN int Tcl_ForgetImport(Tcl_Interp *interp, + Tcl_Namespace *nsPtr, const char *pattern); #endif #ifndef Tcl_GetCurrentNamespace_TCL_DECLARED #define Tcl_GetCurrentNamespace_TCL_DECLARED /* 512 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp); #endif #ifndef Tcl_GetGlobalNamespace_TCL_DECLARED #define Tcl_GetGlobalNamespace_TCL_DECLARED /* 513 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp); #endif #ifndef Tcl_FindNamespace_TCL_DECLARED #define Tcl_FindNamespace_TCL_DECLARED /* 514 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); +EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, + const char *name, + Tcl_Namespace *contextNsPtr, int flags); #endif #ifndef Tcl_FindCommand_TCL_DECLARED #define Tcl_FindCommand_TCL_DECLARED /* 515 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); +EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name, + Tcl_Namespace *contextNsPtr, int flags); #endif #ifndef Tcl_GetCommandFromObj_TCL_DECLARED #define Tcl_GetCommandFromObj_TCL_DECLARED /* 516 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); +EXTERN Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr); #endif #ifndef Tcl_GetCommandFullName_TCL_DECLARED #define Tcl_GetCommandFullName_TCL_DECLARED /* 517 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); +EXTERN void Tcl_GetCommandFullName(Tcl_Interp *interp, + Tcl_Command command, Tcl_Obj *objPtr); #endif #ifndef Tcl_FSEvalFileEx_TCL_DECLARED #define Tcl_FSEvalFileEx_TCL_DECLARED /* 518 */ -EXTERN int Tcl_FSEvalFileEx (Tcl_Interp * interp, - Tcl_Obj * fileName, - const char * encodingName); +EXTERN int Tcl_FSEvalFileEx(Tcl_Interp *interp, + Tcl_Obj *fileName, const char *encodingName); #endif #ifndef Tcl_SetExitProc_TCL_DECLARED #define Tcl_SetExitProc_TCL_DECLARED /* 519 */ -EXTERN Tcl_ExitProc * Tcl_SetExitProc (Tcl_ExitProc * proc); +EXTERN Tcl_ExitProc * Tcl_SetExitProc(Tcl_ExitProc *proc); #endif #ifndef Tcl_LimitAddHandler_TCL_DECLARED #define Tcl_LimitAddHandler_TCL_DECLARED /* 520 */ -EXTERN void Tcl_LimitAddHandler (Tcl_Interp * interp, int type, - Tcl_LimitHandlerProc * handlerProc, +EXTERN void Tcl_LimitAddHandler(Tcl_Interp *interp, int type, + Tcl_LimitHandlerProc *handlerProc, ClientData clientData, - Tcl_LimitHandlerDeleteProc * deleteProc); + Tcl_LimitHandlerDeleteProc *deleteProc); #endif #ifndef Tcl_LimitRemoveHandler_TCL_DECLARED #define Tcl_LimitRemoveHandler_TCL_DECLARED /* 521 */ -EXTERN void Tcl_LimitRemoveHandler (Tcl_Interp * interp, - int type, Tcl_LimitHandlerProc * handlerProc, +EXTERN void Tcl_LimitRemoveHandler(Tcl_Interp *interp, int type, + Tcl_LimitHandlerProc *handlerProc, ClientData clientData); #endif #ifndef Tcl_LimitReady_TCL_DECLARED #define Tcl_LimitReady_TCL_DECLARED /* 522 */ -EXTERN int Tcl_LimitReady (Tcl_Interp * interp); +EXTERN int Tcl_LimitReady(Tcl_Interp *interp); #endif #ifndef Tcl_LimitCheck_TCL_DECLARED #define Tcl_LimitCheck_TCL_DECLARED /* 523 */ -EXTERN int Tcl_LimitCheck (Tcl_Interp * interp); +EXTERN int Tcl_LimitCheck(Tcl_Interp *interp); #endif #ifndef Tcl_LimitExceeded_TCL_DECLARED #define Tcl_LimitExceeded_TCL_DECLARED /* 524 */ -EXTERN int Tcl_LimitExceeded (Tcl_Interp * interp); +EXTERN int Tcl_LimitExceeded(Tcl_Interp *interp); #endif #ifndef Tcl_LimitSetCommands_TCL_DECLARED #define Tcl_LimitSetCommands_TCL_DECLARED /* 525 */ -EXTERN void Tcl_LimitSetCommands (Tcl_Interp * interp, +EXTERN void Tcl_LimitSetCommands(Tcl_Interp *interp, int commandLimit); #endif #ifndef Tcl_LimitSetTime_TCL_DECLARED #define Tcl_LimitSetTime_TCL_DECLARED /* 526 */ -EXTERN void Tcl_LimitSetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); +EXTERN void Tcl_LimitSetTime(Tcl_Interp *interp, + Tcl_Time *timeLimitPtr); #endif #ifndef Tcl_LimitSetGranularity_TCL_DECLARED #define Tcl_LimitSetGranularity_TCL_DECLARED /* 527 */ -EXTERN void Tcl_LimitSetGranularity (Tcl_Interp * interp, - int type, int granularity); +EXTERN void Tcl_LimitSetGranularity(Tcl_Interp *interp, int type, + int granularity); #endif #ifndef Tcl_LimitTypeEnabled_TCL_DECLARED #define Tcl_LimitTypeEnabled_TCL_DECLARED /* 528 */ -EXTERN int Tcl_LimitTypeEnabled (Tcl_Interp * interp, int type); +EXTERN int Tcl_LimitTypeEnabled(Tcl_Interp *interp, int type); #endif #ifndef Tcl_LimitTypeExceeded_TCL_DECLARED #define Tcl_LimitTypeExceeded_TCL_DECLARED /* 529 */ -EXTERN int Tcl_LimitTypeExceeded (Tcl_Interp * interp, int type); +EXTERN int Tcl_LimitTypeExceeded(Tcl_Interp *interp, int type); #endif #ifndef Tcl_LimitTypeSet_TCL_DECLARED #define Tcl_LimitTypeSet_TCL_DECLARED /* 530 */ -EXTERN void Tcl_LimitTypeSet (Tcl_Interp * interp, int type); +EXTERN void Tcl_LimitTypeSet(Tcl_Interp *interp, int type); #endif #ifndef Tcl_LimitTypeReset_TCL_DECLARED #define Tcl_LimitTypeReset_TCL_DECLARED /* 531 */ -EXTERN void Tcl_LimitTypeReset (Tcl_Interp * interp, int type); +EXTERN void Tcl_LimitTypeReset(Tcl_Interp *interp, int type); #endif #ifndef Tcl_LimitGetCommands_TCL_DECLARED #define Tcl_LimitGetCommands_TCL_DECLARED /* 532 */ -EXTERN int Tcl_LimitGetCommands (Tcl_Interp * interp); +EXTERN int Tcl_LimitGetCommands(Tcl_Interp *interp); #endif #ifndef Tcl_LimitGetTime_TCL_DECLARED #define Tcl_LimitGetTime_TCL_DECLARED /* 533 */ -EXTERN void Tcl_LimitGetTime (Tcl_Interp * interp, - Tcl_Time * timeLimitPtr); +EXTERN void Tcl_LimitGetTime(Tcl_Interp *interp, + Tcl_Time *timeLimitPtr); #endif #ifndef Tcl_LimitGetGranularity_TCL_DECLARED #define Tcl_LimitGetGranularity_TCL_DECLARED /* 534 */ -EXTERN int Tcl_LimitGetGranularity (Tcl_Interp * interp, - int type); +EXTERN int Tcl_LimitGetGranularity(Tcl_Interp *interp, int type); #endif #ifndef Tcl_SaveInterpState_TCL_DECLARED #define Tcl_SaveInterpState_TCL_DECLARED /* 535 */ -EXTERN Tcl_InterpState Tcl_SaveInterpState (Tcl_Interp * interp, int status); +EXTERN Tcl_InterpState Tcl_SaveInterpState(Tcl_Interp *interp, int status); #endif #ifndef Tcl_RestoreInterpState_TCL_DECLARED #define Tcl_RestoreInterpState_TCL_DECLARED /* 536 */ -EXTERN int Tcl_RestoreInterpState (Tcl_Interp * interp, +EXTERN int Tcl_RestoreInterpState(Tcl_Interp *interp, Tcl_InterpState state); #endif #ifndef Tcl_DiscardInterpState_TCL_DECLARED #define Tcl_DiscardInterpState_TCL_DECLARED /* 537 */ -EXTERN void Tcl_DiscardInterpState (Tcl_InterpState state); +EXTERN void Tcl_DiscardInterpState(Tcl_InterpState state); #endif #ifndef Tcl_SetReturnOptions_TCL_DECLARED #define Tcl_SetReturnOptions_TCL_DECLARED /* 538 */ -EXTERN int Tcl_SetReturnOptions (Tcl_Interp * interp, - Tcl_Obj * options); +EXTERN int Tcl_SetReturnOptions(Tcl_Interp *interp, + Tcl_Obj *options); #endif #ifndef Tcl_GetReturnOptions_TCL_DECLARED #define Tcl_GetReturnOptions_TCL_DECLARED /* 539 */ -EXTERN Tcl_Obj * Tcl_GetReturnOptions (Tcl_Interp * interp, - int result); +EXTERN Tcl_Obj * Tcl_GetReturnOptions(Tcl_Interp *interp, int result); #endif #ifndef Tcl_IsEnsemble_TCL_DECLARED #define Tcl_IsEnsemble_TCL_DECLARED /* 540 */ -EXTERN int Tcl_IsEnsemble (Tcl_Command token); +EXTERN int Tcl_IsEnsemble(Tcl_Command token); #endif #ifndef Tcl_CreateEnsemble_TCL_DECLARED #define Tcl_CreateEnsemble_TCL_DECLARED /* 541 */ -EXTERN Tcl_Command Tcl_CreateEnsemble (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * namespacePtr, int flags); +EXTERN Tcl_Command Tcl_CreateEnsemble(Tcl_Interp *interp, + const char *name, + Tcl_Namespace *namespacePtr, int flags); #endif #ifndef Tcl_FindEnsemble_TCL_DECLARED #define Tcl_FindEnsemble_TCL_DECLARED /* 542 */ -EXTERN Tcl_Command Tcl_FindEnsemble (Tcl_Interp * interp, - Tcl_Obj * cmdNameObj, int flags); +EXTERN Tcl_Command Tcl_FindEnsemble(Tcl_Interp *interp, + Tcl_Obj *cmdNameObj, int flags); #endif #ifndef Tcl_SetEnsembleSubcommandList_TCL_DECLARED #define Tcl_SetEnsembleSubcommandList_TCL_DECLARED /* 543 */ -EXTERN int Tcl_SetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * subcmdList); +EXTERN int Tcl_SetEnsembleSubcommandList(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj *subcmdList); #endif #ifndef Tcl_SetEnsembleMappingDict_TCL_DECLARED #define Tcl_SetEnsembleMappingDict_TCL_DECLARED /* 544 */ -EXTERN int Tcl_SetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * mapDict); +EXTERN int Tcl_SetEnsembleMappingDict(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj *mapDict); #endif #ifndef Tcl_SetEnsembleUnknownHandler_TCL_DECLARED #define Tcl_SetEnsembleUnknownHandler_TCL_DECLARED /* 545 */ -EXTERN int Tcl_SetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * unknownList); +EXTERN int Tcl_SetEnsembleUnknownHandler(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj *unknownList); #endif #ifndef Tcl_SetEnsembleFlags_TCL_DECLARED #define Tcl_SetEnsembleFlags_TCL_DECLARED /* 546 */ -EXTERN int Tcl_SetEnsembleFlags (Tcl_Interp * interp, +EXTERN int Tcl_SetEnsembleFlags(Tcl_Interp *interp, Tcl_Command token, int flags); #endif #ifndef Tcl_GetEnsembleSubcommandList_TCL_DECLARED #define Tcl_GetEnsembleSubcommandList_TCL_DECLARED /* 547 */ -EXTERN int Tcl_GetEnsembleSubcommandList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** subcmdListPtr); +EXTERN int Tcl_GetEnsembleSubcommandList(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj **subcmdListPtr); #endif #ifndef Tcl_GetEnsembleMappingDict_TCL_DECLARED #define Tcl_GetEnsembleMappingDict_TCL_DECLARED /* 548 */ -EXTERN int Tcl_GetEnsembleMappingDict (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** mapDictPtr); +EXTERN int Tcl_GetEnsembleMappingDict(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj **mapDictPtr); #endif #ifndef Tcl_GetEnsembleUnknownHandler_TCL_DECLARED #define Tcl_GetEnsembleUnknownHandler_TCL_DECLARED /* 549 */ -EXTERN int Tcl_GetEnsembleUnknownHandler (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** unknownListPtr); +EXTERN int Tcl_GetEnsembleUnknownHandler(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj **unknownListPtr); #endif #ifndef Tcl_GetEnsembleFlags_TCL_DECLARED #define Tcl_GetEnsembleFlags_TCL_DECLARED /* 550 */ -EXTERN int Tcl_GetEnsembleFlags (Tcl_Interp * interp, - Tcl_Command token, int * flagsPtr); +EXTERN int Tcl_GetEnsembleFlags(Tcl_Interp *interp, + Tcl_Command token, int *flagsPtr); #endif #ifndef Tcl_GetEnsembleNamespace_TCL_DECLARED #define Tcl_GetEnsembleNamespace_TCL_DECLARED /* 551 */ -EXTERN int Tcl_GetEnsembleNamespace (Tcl_Interp * interp, +EXTERN int Tcl_GetEnsembleNamespace(Tcl_Interp *interp, Tcl_Command token, - Tcl_Namespace ** namespacePtrPtr); + Tcl_Namespace **namespacePtrPtr); #endif #ifndef Tcl_SetTimeProc_TCL_DECLARED #define Tcl_SetTimeProc_TCL_DECLARED /* 552 */ -EXTERN void Tcl_SetTimeProc (Tcl_GetTimeProc * getProc, - Tcl_ScaleTimeProc * scaleProc, +EXTERN void Tcl_SetTimeProc(Tcl_GetTimeProc *getProc, + Tcl_ScaleTimeProc *scaleProc, ClientData clientData); #endif #ifndef Tcl_QueryTimeProc_TCL_DECLARED #define Tcl_QueryTimeProc_TCL_DECLARED /* 553 */ -EXTERN void Tcl_QueryTimeProc (Tcl_GetTimeProc ** getProc, - Tcl_ScaleTimeProc ** scaleProc, - ClientData * clientData); +EXTERN void Tcl_QueryTimeProc(Tcl_GetTimeProc **getProc, + Tcl_ScaleTimeProc **scaleProc, + ClientData *clientData); #endif #ifndef Tcl_ChannelThreadActionProc_TCL_DECLARED #define Tcl_ChannelThreadActionProc_TCL_DECLARED /* 554 */ -EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverThreadActionProc * Tcl_ChannelThreadActionProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_NewBignumObj_TCL_DECLARED #define Tcl_NewBignumObj_TCL_DECLARED /* 555 */ -EXTERN Tcl_Obj * Tcl_NewBignumObj (mp_int * value); +EXTERN Tcl_Obj * Tcl_NewBignumObj(mp_int *value); #endif #ifndef Tcl_DbNewBignumObj_TCL_DECLARED #define Tcl_DbNewBignumObj_TCL_DECLARED /* 556 */ -EXTERN Tcl_Obj * Tcl_DbNewBignumObj (mp_int * value, - const char * file, int line); +EXTERN Tcl_Obj * Tcl_DbNewBignumObj(mp_int *value, const char *file, + int line); #endif #ifndef Tcl_SetBignumObj_TCL_DECLARED #define Tcl_SetBignumObj_TCL_DECLARED /* 557 */ -EXTERN void Tcl_SetBignumObj (Tcl_Obj * obj, mp_int * value); +EXTERN void Tcl_SetBignumObj(Tcl_Obj *obj, mp_int *value); #endif #ifndef Tcl_GetBignumFromObj_TCL_DECLARED #define Tcl_GetBignumFromObj_TCL_DECLARED /* 558 */ -EXTERN int Tcl_GetBignumFromObj (Tcl_Interp * interp, - Tcl_Obj * obj, mp_int * value); +EXTERN int Tcl_GetBignumFromObj(Tcl_Interp *interp, + Tcl_Obj *obj, mp_int *value); #endif #ifndef Tcl_TakeBignumFromObj_TCL_DECLARED #define Tcl_TakeBignumFromObj_TCL_DECLARED /* 559 */ -EXTERN int Tcl_TakeBignumFromObj (Tcl_Interp * interp, - Tcl_Obj * obj, mp_int * value); +EXTERN int Tcl_TakeBignumFromObj(Tcl_Interp *interp, + Tcl_Obj *obj, mp_int *value); #endif #ifndef Tcl_TruncateChannel_TCL_DECLARED #define Tcl_TruncateChannel_TCL_DECLARED /* 560 */ -EXTERN int Tcl_TruncateChannel (Tcl_Channel chan, +EXTERN int Tcl_TruncateChannel(Tcl_Channel chan, Tcl_WideInt length); #endif #ifndef Tcl_ChannelTruncateProc_TCL_DECLARED #define Tcl_ChannelTruncateProc_TCL_DECLARED /* 561 */ -EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc ( - const Tcl_ChannelType * chanTypePtr); +EXTERN Tcl_DriverTruncateProc * Tcl_ChannelTruncateProc( + const Tcl_ChannelType *chanTypePtr); #endif #ifndef Tcl_SetChannelErrorInterp_TCL_DECLARED #define Tcl_SetChannelErrorInterp_TCL_DECLARED /* 562 */ -EXTERN void Tcl_SetChannelErrorInterp (Tcl_Interp * interp, - Tcl_Obj * msg); +EXTERN void Tcl_SetChannelErrorInterp(Tcl_Interp *interp, + Tcl_Obj *msg); #endif #ifndef Tcl_GetChannelErrorInterp_TCL_DECLARED #define Tcl_GetChannelErrorInterp_TCL_DECLARED /* 563 */ -EXTERN void Tcl_GetChannelErrorInterp (Tcl_Interp * interp, - Tcl_Obj ** msg); +EXTERN void Tcl_GetChannelErrorInterp(Tcl_Interp *interp, + Tcl_Obj **msg); #endif #ifndef Tcl_SetChannelError_TCL_DECLARED #define Tcl_SetChannelError_TCL_DECLARED /* 564 */ -EXTERN void Tcl_SetChannelError (Tcl_Channel chan, Tcl_Obj * msg); +EXTERN void Tcl_SetChannelError(Tcl_Channel chan, Tcl_Obj *msg); #endif #ifndef Tcl_GetChannelError_TCL_DECLARED #define Tcl_GetChannelError_TCL_DECLARED /* 565 */ -EXTERN void Tcl_GetChannelError (Tcl_Channel chan, - Tcl_Obj ** msg); +EXTERN void Tcl_GetChannelError(Tcl_Channel chan, Tcl_Obj **msg); #endif #ifndef Tcl_InitBignumFromDouble_TCL_DECLARED #define Tcl_InitBignumFromDouble_TCL_DECLARED /* 566 */ -EXTERN int Tcl_InitBignumFromDouble (Tcl_Interp * interp, - double initval, mp_int * toInit); +EXTERN int Tcl_InitBignumFromDouble(Tcl_Interp *interp, + double initval, mp_int *toInit); #endif #ifndef Tcl_GetNamespaceUnknownHandler_TCL_DECLARED #define Tcl_GetNamespaceUnknownHandler_TCL_DECLARED /* 567 */ -EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr); +EXTERN Tcl_Obj * Tcl_GetNamespaceUnknownHandler(Tcl_Interp *interp, + Tcl_Namespace *nsPtr); #endif #ifndef Tcl_SetNamespaceUnknownHandler_TCL_DECLARED #define Tcl_SetNamespaceUnknownHandler_TCL_DECLARED /* 568 */ -EXTERN int Tcl_SetNamespaceUnknownHandler (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); +EXTERN int Tcl_SetNamespaceUnknownHandler(Tcl_Interp *interp, + Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr); #endif #ifndef Tcl_GetEncodingFromObj_TCL_DECLARED #define Tcl_GetEncodingFromObj_TCL_DECLARED /* 569 */ -EXTERN int Tcl_GetEncodingFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); +EXTERN int Tcl_GetEncodingFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr); #endif #ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED #define Tcl_GetEncodingSearchPath_TCL_DECLARED /* 570 */ -EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath (void); +EXTERN Tcl_Obj * Tcl_GetEncodingSearchPath(void); #endif #ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED #define Tcl_SetEncodingSearchPath_TCL_DECLARED /* 571 */ -EXTERN int Tcl_SetEncodingSearchPath (Tcl_Obj * searchPath); +EXTERN int Tcl_SetEncodingSearchPath(Tcl_Obj *searchPath); #endif #ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED #define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED /* 572 */ -EXTERN const char * Tcl_GetEncodingNameFromEnvironment ( - Tcl_DString * bufPtr); +EXTERN const char * Tcl_GetEncodingNameFromEnvironment( + Tcl_DString *bufPtr); #endif #ifndef Tcl_PkgRequireProc_TCL_DECLARED #define Tcl_PkgRequireProc_TCL_DECLARED /* 573 */ -EXTERN int Tcl_PkgRequireProc (Tcl_Interp * interp, - const char * name, int objc, +EXTERN int Tcl_PkgRequireProc(Tcl_Interp *interp, + const char *name, int objc, Tcl_Obj *const objv[], - ClientData * clientDataPtr); + ClientData *clientDataPtr); #endif #ifndef Tcl_AppendObjToErrorInfo_TCL_DECLARED #define Tcl_AppendObjToErrorInfo_TCL_DECLARED /* 574 */ -EXTERN void Tcl_AppendObjToErrorInfo (Tcl_Interp * interp, - Tcl_Obj * objPtr); +EXTERN void Tcl_AppendObjToErrorInfo(Tcl_Interp *interp, + Tcl_Obj *objPtr); #endif #ifndef Tcl_AppendLimitedToObj_TCL_DECLARED #define Tcl_AppendLimitedToObj_TCL_DECLARED /* 575 */ -EXTERN void Tcl_AppendLimitedToObj (Tcl_Obj * objPtr, - const char * bytes, int length, int limit, - const char * ellipsis); +EXTERN void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr, + const char *bytes, int length, int limit, + const char *ellipsis); #endif #ifndef Tcl_Format_TCL_DECLARED #define Tcl_Format_TCL_DECLARED /* 576 */ -EXTERN Tcl_Obj * Tcl_Format (Tcl_Interp * interp, const char * format, +EXTERN Tcl_Obj * Tcl_Format(Tcl_Interp *interp, const char *format, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_AppendFormatToObj_TCL_DECLARED #define Tcl_AppendFormatToObj_TCL_DECLARED /* 577 */ -EXTERN int Tcl_AppendFormatToObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, const char * format, +EXTERN int Tcl_AppendFormatToObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, const char *format, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_ObjPrintf_TCL_DECLARED #define Tcl_ObjPrintf_TCL_DECLARED /* 578 */ -EXTERN Tcl_Obj * Tcl_ObjPrintf (const char * format, ...); +EXTERN Tcl_Obj * Tcl_ObjPrintf(const char *format, ...); #endif #ifndef Tcl_AppendPrintfToObj_TCL_DECLARED #define Tcl_AppendPrintfToObj_TCL_DECLARED /* 579 */ -EXTERN void Tcl_AppendPrintfToObj (Tcl_Obj * objPtr, - const char * format, ...); +EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, + const char *format, ...); #endif #ifndef Tcl_CancelEval_TCL_DECLARED #define Tcl_CancelEval_TCL_DECLARED /* 580 */ -EXTERN int Tcl_CancelEval (Tcl_Interp * interp, - Tcl_Obj * resultObjPtr, - ClientData clientData, int flags); +EXTERN int Tcl_CancelEval(Tcl_Interp *interp, + Tcl_Obj *resultObjPtr, ClientData clientData, + int flags); #endif #ifndef Tcl_Canceled_TCL_DECLARED #define Tcl_Canceled_TCL_DECLARED /* 581 */ -EXTERN int Tcl_Canceled (Tcl_Interp * interp, int flags); +EXTERN int Tcl_Canceled(Tcl_Interp *interp, int flags); #endif #ifndef Tcl_CreatePipe_TCL_DECLARED #define Tcl_CreatePipe_TCL_DECLARED /* 582 */ -EXTERN int Tcl_CreatePipe (Tcl_Interp * interp, - Tcl_Channel * rchan, Tcl_Channel * wchan, +EXTERN int Tcl_CreatePipe(Tcl_Interp *interp, + Tcl_Channel *rchan, Tcl_Channel *wchan, int flags); #endif #ifndef Tcl_NRCreateCommand_TCL_DECLARED #define Tcl_NRCreateCommand_TCL_DECLARED /* 583 */ -EXTERN Tcl_Command Tcl_NRCreateCommand (Tcl_Interp * interp, - const char * cmdName, Tcl_ObjCmdProc * proc, - Tcl_ObjCmdProc * nreProc, +EXTERN Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, + const char *cmdName, Tcl_ObjCmdProc *proc, + Tcl_ObjCmdProc *nreProc, ClientData clientData, - Tcl_CmdDeleteProc * deleteProc); + Tcl_CmdDeleteProc *deleteProc); #endif #ifndef Tcl_NREvalObj_TCL_DECLARED #define Tcl_NREvalObj_TCL_DECLARED /* 584 */ -EXTERN int Tcl_NREvalObj (Tcl_Interp * interp, Tcl_Obj * objPtr, +EXTERN int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); #endif #ifndef Tcl_NREvalObjv_TCL_DECLARED #define Tcl_NREvalObjv_TCL_DECLARED /* 585 */ -EXTERN int Tcl_NREvalObjv (Tcl_Interp * interp, int objc, +EXTERN int Tcl_NREvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); #endif #ifndef Tcl_NRCmdSwap_TCL_DECLARED #define Tcl_NRCmdSwap_TCL_DECLARED /* 586 */ -EXTERN int Tcl_NRCmdSwap (Tcl_Interp * interp, Tcl_Command cmd, +EXTERN int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); #endif #ifndef Tcl_NRAddCallback_TCL_DECLARED #define Tcl_NRAddCallback_TCL_DECLARED /* 587 */ -EXTERN void Tcl_NRAddCallback (Tcl_Interp * interp, - Tcl_NRPostProc * postProcPtr, +EXTERN void Tcl_NRAddCallback(Tcl_Interp *interp, + Tcl_NRPostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); #endif #ifndef Tcl_NRCallObjProc_TCL_DECLARED #define Tcl_NRCallObjProc_TCL_DECLARED /* 588 */ -EXTERN int Tcl_NRCallObjProc (Tcl_Interp * interp, - Tcl_ObjCmdProc * objProc, +EXTERN int Tcl_NRCallObjProc(Tcl_Interp *interp, + Tcl_ObjCmdProc *objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); #endif #ifndef Tcl_GetFSDeviceFromStat_TCL_DECLARED #define Tcl_GetFSDeviceFromStat_TCL_DECLARED /* 589 */ -EXTERN unsigned Tcl_GetFSDeviceFromStat (const Tcl_StatBuf * statPtr); +EXTERN unsigned Tcl_GetFSDeviceFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetFSInodeFromStat_TCL_DECLARED #define Tcl_GetFSInodeFromStat_TCL_DECLARED /* 590 */ -EXTERN unsigned Tcl_GetFSInodeFromStat (const Tcl_StatBuf * statPtr); +EXTERN unsigned Tcl_GetFSInodeFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetModeFromStat_TCL_DECLARED #define Tcl_GetModeFromStat_TCL_DECLARED /* 591 */ -EXTERN unsigned Tcl_GetModeFromStat (const Tcl_StatBuf * statPtr); +EXTERN unsigned Tcl_GetModeFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetLinkCountFromStat_TCL_DECLARED #define Tcl_GetLinkCountFromStat_TCL_DECLARED /* 592 */ -EXTERN int Tcl_GetLinkCountFromStat ( - const Tcl_StatBuf * statPtr); +EXTERN int Tcl_GetLinkCountFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetUserIdFromStat_TCL_DECLARED #define Tcl_GetUserIdFromStat_TCL_DECLARED /* 593 */ -EXTERN int Tcl_GetUserIdFromStat (const Tcl_StatBuf * statPtr); +EXTERN int Tcl_GetUserIdFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetGroupIdFromStat_TCL_DECLARED #define Tcl_GetGroupIdFromStat_TCL_DECLARED /* 594 */ -EXTERN int Tcl_GetGroupIdFromStat (const Tcl_StatBuf * statPtr); +EXTERN int Tcl_GetGroupIdFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetDeviceTypeFromStat_TCL_DECLARED #define Tcl_GetDeviceTypeFromStat_TCL_DECLARED /* 595 */ -EXTERN int Tcl_GetDeviceTypeFromStat ( - const Tcl_StatBuf * statPtr); +EXTERN int Tcl_GetDeviceTypeFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetAccessTimeFromStat_TCL_DECLARED #define Tcl_GetAccessTimeFromStat_TCL_DECLARED /* 596 */ -EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat ( - const Tcl_StatBuf * statPtr); +EXTERN Tcl_WideInt Tcl_GetAccessTimeFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetModificationTimeFromStat_TCL_DECLARED #define Tcl_GetModificationTimeFromStat_TCL_DECLARED /* 597 */ -EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat ( - const Tcl_StatBuf * statPtr); +EXTERN Tcl_WideInt Tcl_GetModificationTimeFromStat( + const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetChangeTimeFromStat_TCL_DECLARED #define Tcl_GetChangeTimeFromStat_TCL_DECLARED /* 598 */ -EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat ( - const Tcl_StatBuf * statPtr); +EXTERN Tcl_WideInt Tcl_GetChangeTimeFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetSizeFromStat_TCL_DECLARED #define Tcl_GetSizeFromStat_TCL_DECLARED /* 599 */ -EXTERN Tcl_WideUInt Tcl_GetSizeFromStat (const Tcl_StatBuf * statPtr); +EXTERN Tcl_WideUInt Tcl_GetSizeFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetBlocksFromStat_TCL_DECLARED #define Tcl_GetBlocksFromStat_TCL_DECLARED /* 600 */ -EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat (const Tcl_StatBuf * statPtr); +EXTERN Tcl_WideUInt Tcl_GetBlocksFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_GetBlockSizeFromStat_TCL_DECLARED #define Tcl_GetBlockSizeFromStat_TCL_DECLARED /* 601 */ -EXTERN unsigned Tcl_GetBlockSizeFromStat ( - const Tcl_StatBuf * statPtr); +EXTERN unsigned Tcl_GetBlockSizeFromStat(const Tcl_StatBuf *statPtr); #endif #ifndef Tcl_SetEnsembleParameterList_TCL_DECLARED #define Tcl_SetEnsembleParameterList_TCL_DECLARED /* 602 */ -EXTERN int Tcl_SetEnsembleParameterList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj * paramList); +EXTERN int Tcl_SetEnsembleParameterList(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj *paramList); #endif #ifndef Tcl_GetEnsembleParameterList_TCL_DECLARED #define Tcl_GetEnsembleParameterList_TCL_DECLARED /* 603 */ -EXTERN int Tcl_GetEnsembleParameterList (Tcl_Interp * interp, - Tcl_Command token, Tcl_Obj ** paramListPtr); +EXTERN int Tcl_GetEnsembleParameterList(Tcl_Interp *interp, + Tcl_Command token, Tcl_Obj **paramListPtr); #endif #ifndef Tcl_ParseArgsObjv_TCL_DECLARED #define Tcl_ParseArgsObjv_TCL_DECLARED /* 604 */ -EXTERN int Tcl_ParseArgsObjv (Tcl_Interp * interp, - const Tcl_ArgvInfo * argTable, int * objcPtr, - Tcl_Obj *const * objv, Tcl_Obj *** remObjv); +EXTERN int Tcl_ParseArgsObjv(Tcl_Interp *interp, + const Tcl_ArgvInfo *argTable, int *objcPtr, + Tcl_Obj *const *objv, Tcl_Obj ***remObjv); #endif #ifndef Tcl_GetErrorLine_TCL_DECLARED #define Tcl_GetErrorLine_TCL_DECLARED /* 605 */ -EXTERN int Tcl_GetErrorLine (Tcl_Interp * interp); +EXTERN int Tcl_GetErrorLine(Tcl_Interp *interp); #endif #ifndef Tcl_SetErrorLine_TCL_DECLARED #define Tcl_SetErrorLine_TCL_DECLARED /* 606 */ -EXTERN void Tcl_SetErrorLine (Tcl_Interp * interp, int lineNum); +EXTERN void Tcl_SetErrorLine(Tcl_Interp *interp, int lineNum); #endif #ifndef Tcl_TransferResult_TCL_DECLARED #define Tcl_TransferResult_TCL_DECLARED /* 607 */ -EXTERN void Tcl_TransferResult (Tcl_Interp * sourceInterp, - int result, Tcl_Interp * targetInterp); +EXTERN void Tcl_TransferResult(Tcl_Interp *sourceInterp, + int result, Tcl_Interp *targetInterp); #endif #ifndef Tcl_InterpActive_TCL_DECLARED #define Tcl_InterpActive_TCL_DECLARED /* 608 */ -EXTERN int Tcl_InterpActive (Tcl_Interp * interp); +EXTERN int Tcl_InterpActive(Tcl_Interp *interp); #endif #ifndef Tcl_BackgroundException_TCL_DECLARED #define Tcl_BackgroundException_TCL_DECLARED /* 609 */ -EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, - int code); +EXTERN void Tcl_BackgroundException(Tcl_Interp *interp, int code); #endif #ifndef Tcl_ZlibDeflate_TCL_DECLARED #define Tcl_ZlibDeflate_TCL_DECLARED /* 610 */ -EXTERN int Tcl_ZlibDeflate (Tcl_Interp * interp, int format, - Tcl_Obj * data, int level, - Tcl_Obj * gzipHeaderDictObj); +EXTERN int Tcl_ZlibDeflate(Tcl_Interp *interp, int format, + Tcl_Obj *data, int level, + Tcl_Obj *gzipHeaderDictObj); #endif #ifndef Tcl_ZlibInflate_TCL_DECLARED #define Tcl_ZlibInflate_TCL_DECLARED /* 611 */ -EXTERN int Tcl_ZlibInflate (Tcl_Interp * interp, int format, - Tcl_Obj * data, int buffersize, - Tcl_Obj * gzipHeaderDictObj); +EXTERN int Tcl_ZlibInflate(Tcl_Interp *interp, int format, + Tcl_Obj *data, int buffersize, + Tcl_Obj *gzipHeaderDictObj); #endif #ifndef Tcl_ZlibCRC32_TCL_DECLARED #define Tcl_ZlibCRC32_TCL_DECLARED /* 612 */ -EXTERN unsigned int Tcl_ZlibCRC32 (unsigned int crc, - const unsigned char * buf, int len); +EXTERN unsigned int Tcl_ZlibCRC32(unsigned int crc, + const unsigned char *buf, int len); #endif #ifndef Tcl_ZlibAdler32_TCL_DECLARED #define Tcl_ZlibAdler32_TCL_DECLARED /* 613 */ -EXTERN unsigned int Tcl_ZlibAdler32 (unsigned int adler, - const unsigned char * buf, int len); +EXTERN unsigned int Tcl_ZlibAdler32(unsigned int adler, + const unsigned char *buf, int len); #endif #ifndef Tcl_ZlibStreamInit_TCL_DECLARED #define Tcl_ZlibStreamInit_TCL_DECLARED /* 614 */ -EXTERN int Tcl_ZlibStreamInit (Tcl_Interp * interp, int mode, - int format, int level, Tcl_Obj * dictObj, - Tcl_ZlibStream * zshandle); +EXTERN int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode, + int format, int level, Tcl_Obj *dictObj, + Tcl_ZlibStream *zshandle); #endif #ifndef Tcl_ZlibStreamGetCommandName_TCL_DECLARED #define Tcl_ZlibStreamGetCommandName_TCL_DECLARED /* 615 */ -EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName ( - Tcl_ZlibStream zshandle); +EXTERN Tcl_Obj * Tcl_ZlibStreamGetCommandName(Tcl_ZlibStream zshandle); #endif #ifndef Tcl_ZlibStreamEof_TCL_DECLARED #define Tcl_ZlibStreamEof_TCL_DECLARED /* 616 */ -EXTERN int Tcl_ZlibStreamEof (Tcl_ZlibStream zshandle); +EXTERN int Tcl_ZlibStreamEof(Tcl_ZlibStream zshandle); #endif #ifndef Tcl_ZlibStreamChecksum_TCL_DECLARED #define Tcl_ZlibStreamChecksum_TCL_DECLARED /* 617 */ -EXTERN int Tcl_ZlibStreamChecksum (Tcl_ZlibStream zshandle); +EXTERN int Tcl_ZlibStreamChecksum(Tcl_ZlibStream zshandle); #endif #ifndef Tcl_ZlibStreamPut_TCL_DECLARED #define Tcl_ZlibStreamPut_TCL_DECLARED /* 618 */ -EXTERN int Tcl_ZlibStreamPut (Tcl_ZlibStream zshandle, - Tcl_Obj * data, int flush); +EXTERN int Tcl_ZlibStreamPut(Tcl_ZlibStream zshandle, + Tcl_Obj *data, int flush); #endif #ifndef Tcl_ZlibStreamGet_TCL_DECLARED #define Tcl_ZlibStreamGet_TCL_DECLARED /* 619 */ -EXTERN int Tcl_ZlibStreamGet (Tcl_ZlibStream zshandle, - Tcl_Obj * data, int count); +EXTERN int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle, + Tcl_Obj *data, int count); #endif #ifndef Tcl_ZlibStreamClose_TCL_DECLARED #define Tcl_ZlibStreamClose_TCL_DECLARED /* 620 */ -EXTERN int Tcl_ZlibStreamClose (Tcl_ZlibStream zshandle); +EXTERN int Tcl_ZlibStreamClose(Tcl_ZlibStream zshandle); #endif #ifndef Tcl_ZlibStreamReset_TCL_DECLARED #define Tcl_ZlibStreamReset_TCL_DECLARED /* 621 */ -EXTERN int Tcl_ZlibStreamReset (Tcl_ZlibStream zshandle); +EXTERN int Tcl_ZlibStreamReset(Tcl_ZlibStream zshandle); #endif #ifndef Tcl_SetStartupScript_TCL_DECLARED #define Tcl_SetStartupScript_TCL_DECLARED /* 622 */ -EXTERN void Tcl_SetStartupScript (Tcl_Obj * path, - const char * encoding); +EXTERN void Tcl_SetStartupScript(Tcl_Obj *path, + const char *encoding); #endif #ifndef Tcl_GetStartupScript_TCL_DECLARED #define Tcl_GetStartupScript_TCL_DECLARED /* 623 */ -EXTERN Tcl_Obj * Tcl_GetStartupScript (const char ** encodingPtr); +EXTERN Tcl_Obj * Tcl_GetStartupScript(const char **encodingPtr); #endif #ifndef Tcl_CloseEx_TCL_DECLARED #define Tcl_CloseEx_TCL_DECLARED /* 624 */ -EXTERN int Tcl_CloseEx (Tcl_Interp * interp, Tcl_Channel chan, +EXTERN int Tcl_CloseEx(Tcl_Interp *interp, Tcl_Channel chan, int flags); #endif #ifndef Tcl_NRExprObj_TCL_DECLARED #define Tcl_NRExprObj_TCL_DECLARED /* 625 */ -EXTERN int Tcl_NRExprObj (Tcl_Interp * interp, Tcl_Obj * objPtr, - Tcl_Obj * resultPtr); +EXTERN int Tcl_NRExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr, + Tcl_Obj *resultPtr); #endif #ifndef Tcl_NRSubstObj_TCL_DECLARED #define Tcl_NRSubstObj_TCL_DECLARED /* 626 */ -EXTERN int Tcl_NRSubstObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int flags); +EXTERN int Tcl_NRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, + int flags); #endif typedef struct TclStubHooks { diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 67c420f..e419222 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.53 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.54 2010/01/29 16:17:20 nijtmans Exp $ */ #include "tclInt.h" @@ -1235,7 +1235,7 @@ Tcl_ParseArgsObjv( objc--; break; case TCL_ARGV_FUNC: { - Tcl_ArgvFuncProc handlerProc; + Tcl_ArgvFuncProc *handlerProc; Tcl_Obj *argObj; if (objc == 0) { @@ -1243,7 +1243,7 @@ Tcl_ParseArgsObjv( } else { argObj = objv[srcIndex]; } - handlerProc = (Tcl_ArgvFuncProc) infoPtr->srcPtr; + handlerProc = (Tcl_ArgvFuncProc *) infoPtr->srcPtr; if (handlerProc(infoPtr->clientData, argObj, infoPtr->dstPtr)) { srcIndex++; objc--; @@ -1251,9 +1251,9 @@ Tcl_ParseArgsObjv( break; } case TCL_ARGV_GENFUNC: { - Tcl_ArgvGenFuncProc handlerProc; + Tcl_ArgvGenFuncProc *handlerProc; - handlerProc = (Tcl_ArgvGenFuncProc) infoPtr->srcPtr; + handlerProc = (Tcl_ArgvGenFuncProc *) infoPtr->srcPtr; objc = handlerProc(infoPtr->clientData, interp, objc, &objv[srcIndex], infoPtr->dstPtr); if (objc < 0) { diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 478c719..0a62638 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.142 2010/01/22 13:02:50 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.143 2010/01/29 16:17:20 nijtmans Exp $ library tcl @@ -230,7 +230,7 @@ declare 51 generic { #} declare 53 generic { int TclInvokeObjectCommand(ClientData clientData, Tcl_Interp *interp, - int argc, const char **argv) + int argc, CONST84 char **argv) } declare 54 generic { int TclInvokeStringCommand(ClientData clientData, Tcl_Interp *interp, @@ -549,7 +549,7 @@ declare 133 generic { # int TclpChdir(const char *dirName) #} declare 138 generic { - const char *TclGetEnv(const char *name, Tcl_DString *valuePtr) + CONST84_RETURN char *TclGetEnv(const char *name, Tcl_DString *valuePtr) } #declare 139 generic { # int TclpLoadFile(Tcl_Interp *interp, char *fileName, char *sym1, @@ -561,7 +561,7 @@ declare 138 generic { #} # This is used by TclX, but should otherwise be considered private declare 141 generic { - const char *TclpGetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr) + CONST84_RETURN char *TclpGetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr) } declare 142 generic { int TclSetByteCodeFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr, diff --git a/generic/tclInt.h b/generic/tclInt.h index 36aa1ea..c1da3d4 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.454 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.455 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef _TCLINT @@ -165,13 +165,13 @@ typedef struct Tcl_ResolvedVarInfo { } Tcl_ResolvedVarInfo; typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp, - const char *name, int length, Tcl_Namespace *context, + CONST84 char *name, int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr); -typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, const char *name, +typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, CONST84 char *name, Tcl_Namespace *context, int flags, Tcl_Var *rPtr); -typedef int (Tcl_ResolveCmdProc)(Tcl_Interp *interp, const char *name, +typedef int (Tcl_ResolveCmdProc)(Tcl_Interp *interp, CONST84 char *name, Tcl_Namespace *context, int flags, Tcl_Command *rPtr); typedef struct Tcl_ResolverInfo { @@ -1261,10 +1261,10 @@ typedef struct ContLineLoc { * by [info frame]. Contains a sub-structure for each extra field. */ -typedef Tcl_Obj *(*GetFrameInfoValueProc)(ClientData clientData); +typedef Tcl_Obj *(GetFrameInfoValueProc)(ClientData clientData); typedef struct { const char *name; /* Name of this field. */ - GetFrameInfoValueProc proc; /* Function to generate a Tcl_Obj* from the + GetFrameInfoValueProc *proc; /* Function to generate a Tcl_Obj* from the * clientData, or just use the clientData * directly (after casting) if NULL. */ ClientData clientData; /* Context for above function, or Tcl_Obj* if diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index a01b938..0ec861b 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.135 2009/12/16 23:26:00 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.136 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -51,72 +51,71 @@ #ifndef TclAllocateFreeObjects_TCL_DECLARED #define TclAllocateFreeObjects_TCL_DECLARED /* 3 */ -EXTERN void TclAllocateFreeObjects (void); +EXTERN void TclAllocateFreeObjects(void); #endif /* Slot 4 is reserved */ #ifndef TclCleanupChildren_TCL_DECLARED #define TclCleanupChildren_TCL_DECLARED /* 5 */ -EXTERN int TclCleanupChildren (Tcl_Interp * interp, int numPids, - Tcl_Pid * pidPtr, Tcl_Channel errorChan); +EXTERN int TclCleanupChildren(Tcl_Interp *interp, int numPids, + Tcl_Pid *pidPtr, Tcl_Channel errorChan); #endif #ifndef TclCleanupCommand_TCL_DECLARED #define TclCleanupCommand_TCL_DECLARED /* 6 */ -EXTERN void TclCleanupCommand (Command * cmdPtr); +EXTERN void TclCleanupCommand(Command *cmdPtr); #endif #ifndef TclCopyAndCollapse_TCL_DECLARED #define TclCopyAndCollapse_TCL_DECLARED /* 7 */ -EXTERN int TclCopyAndCollapse (int count, const char * src, - char * dst); +EXTERN int TclCopyAndCollapse(int count, const char *src, + char *dst); #endif #ifndef TclCopyChannel_TCL_DECLARED #define TclCopyChannel_TCL_DECLARED /* 8 */ -EXTERN int TclCopyChannel (Tcl_Interp * interp, +EXTERN int TclCopyChannel(Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, - int toRead, Tcl_Obj * cmdPtr); + int toRead, Tcl_Obj *cmdPtr); #endif #ifndef TclCreatePipeline_TCL_DECLARED #define TclCreatePipeline_TCL_DECLARED /* 9 */ -EXTERN int TclCreatePipeline (Tcl_Interp * interp, int argc, - const char ** argv, Tcl_Pid ** pidArrayPtr, - TclFile * inPipePtr, TclFile * outPipePtr, - TclFile * errFilePtr); +EXTERN int TclCreatePipeline(Tcl_Interp *interp, int argc, + const char **argv, Tcl_Pid **pidArrayPtr, + TclFile *inPipePtr, TclFile *outPipePtr, + TclFile *errFilePtr); #endif #ifndef TclCreateProc_TCL_DECLARED #define TclCreateProc_TCL_DECLARED /* 10 */ -EXTERN int TclCreateProc (Tcl_Interp * interp, - Namespace * nsPtr, const char * procName, - Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, - Proc ** procPtrPtr); +EXTERN int TclCreateProc(Tcl_Interp *interp, Namespace *nsPtr, + const char *procName, Tcl_Obj *argsPtr, + Tcl_Obj *bodyPtr, Proc **procPtrPtr); #endif #ifndef TclDeleteCompiledLocalVars_TCL_DECLARED #define TclDeleteCompiledLocalVars_TCL_DECLARED /* 11 */ -EXTERN void TclDeleteCompiledLocalVars (Interp * iPtr, - CallFrame * framePtr); +EXTERN void TclDeleteCompiledLocalVars(Interp *iPtr, + CallFrame *framePtr); #endif #ifndef TclDeleteVars_TCL_DECLARED #define TclDeleteVars_TCL_DECLARED /* 12 */ -EXTERN void TclDeleteVars (Interp * iPtr, - TclVarHashTable * tablePtr); +EXTERN void TclDeleteVars(Interp *iPtr, + TclVarHashTable *tablePtr); #endif /* Slot 13 is reserved */ #ifndef TclDumpMemoryInfo_TCL_DECLARED #define TclDumpMemoryInfo_TCL_DECLARED /* 14 */ -EXTERN void TclDumpMemoryInfo (FILE * outFile); +EXTERN void TclDumpMemoryInfo(FILE *outFile); #endif /* Slot 15 is reserved */ #ifndef TclExprFloatError_TCL_DECLARED #define TclExprFloatError_TCL_DECLARED /* 16 */ -EXTERN void TclExprFloatError (Tcl_Interp * interp, double value); +EXTERN void TclExprFloatError(Tcl_Interp *interp, double value); #endif /* Slot 17 is reserved */ /* Slot 18 is reserved */ @@ -126,107 +125,106 @@ EXTERN void TclExprFloatError (Tcl_Interp * interp, double value); #ifndef TclFindElement_TCL_DECLARED #define TclFindElement_TCL_DECLARED /* 22 */ -EXTERN int TclFindElement (Tcl_Interp * interp, - const char * listStr, int listLength, - const char ** elementPtr, - const char ** nextPtr, int * sizePtr, - int * bracePtr); +EXTERN int TclFindElement(Tcl_Interp *interp, + const char *listStr, int listLength, + const char **elementPtr, + const char **nextPtr, int *sizePtr, + int *bracePtr); #endif #ifndef TclFindProc_TCL_DECLARED #define TclFindProc_TCL_DECLARED /* 23 */ -EXTERN Proc * TclFindProc (Interp * iPtr, const char * procName); +EXTERN Proc * TclFindProc(Interp *iPtr, const char *procName); #endif /* Slot 24 is reserved */ #ifndef TclFreePackageInfo_TCL_DECLARED #define TclFreePackageInfo_TCL_DECLARED /* 25 */ -EXTERN void TclFreePackageInfo (Interp * iPtr); +EXTERN void TclFreePackageInfo(Interp *iPtr); #endif /* Slot 26 is reserved */ /* Slot 27 is reserved */ #ifndef TclpGetDefaultStdChannel_TCL_DECLARED #define TclpGetDefaultStdChannel_TCL_DECLARED /* 28 */ -EXTERN Tcl_Channel TclpGetDefaultStdChannel (int type); +EXTERN Tcl_Channel TclpGetDefaultStdChannel(int type); #endif /* Slot 29 is reserved */ /* Slot 30 is reserved */ #ifndef TclGetExtension_TCL_DECLARED #define TclGetExtension_TCL_DECLARED /* 31 */ -EXTERN const char * TclGetExtension (const char * name); +EXTERN const char * TclGetExtension(const char *name); #endif #ifndef TclGetFrame_TCL_DECLARED #define TclGetFrame_TCL_DECLARED /* 32 */ -EXTERN int TclGetFrame (Tcl_Interp * interp, const char * str, - CallFrame ** framePtrPtr); +EXTERN int TclGetFrame(Tcl_Interp *interp, const char *str, + CallFrame **framePtrPtr); #endif /* Slot 33 is reserved */ #ifndef TclGetIntForIndex_TCL_DECLARED #define TclGetIntForIndex_TCL_DECLARED /* 34 */ -EXTERN int TclGetIntForIndex (Tcl_Interp * interp, - Tcl_Obj * objPtr, int endValue, - int * indexPtr); +EXTERN int TclGetIntForIndex(Tcl_Interp *interp, + Tcl_Obj *objPtr, int endValue, int *indexPtr); #endif /* Slot 35 is reserved */ /* Slot 36 is reserved */ #ifndef TclGetLoadedPackages_TCL_DECLARED #define TclGetLoadedPackages_TCL_DECLARED /* 37 */ -EXTERN int TclGetLoadedPackages (Tcl_Interp * interp, - const char * targetName); +EXTERN int TclGetLoadedPackages(Tcl_Interp *interp, + const char *targetName); #endif #ifndef TclGetNamespaceForQualName_TCL_DECLARED #define TclGetNamespaceForQualName_TCL_DECLARED /* 38 */ -EXTERN int TclGetNamespaceForQualName (Tcl_Interp * interp, - const char * qualName, Namespace * cxtNsPtr, - int flags, Namespace ** nsPtrPtr, - Namespace ** altNsPtrPtr, - Namespace ** actualCxtPtrPtr, - const char ** simpleNamePtr); +EXTERN int TclGetNamespaceForQualName(Tcl_Interp *interp, + const char *qualName, Namespace *cxtNsPtr, + int flags, Namespace **nsPtrPtr, + Namespace **altNsPtrPtr, + Namespace **actualCxtPtrPtr, + const char **simpleNamePtr); #endif #ifndef TclGetObjInterpProc_TCL_DECLARED #define TclGetObjInterpProc_TCL_DECLARED /* 39 */ -EXTERN TclObjCmdProcType TclGetObjInterpProc (void); +EXTERN TclObjCmdProcType TclGetObjInterpProc(void); #endif #ifndef TclGetOpenMode_TCL_DECLARED #define TclGetOpenMode_TCL_DECLARED /* 40 */ -EXTERN int TclGetOpenMode (Tcl_Interp * interp, - const char * str, int * seekFlagPtr); +EXTERN int TclGetOpenMode(Tcl_Interp *interp, const char *str, + int *seekFlagPtr); #endif #ifndef TclGetOriginalCommand_TCL_DECLARED #define TclGetOriginalCommand_TCL_DECLARED /* 41 */ -EXTERN Tcl_Command TclGetOriginalCommand (Tcl_Command command); +EXTERN Tcl_Command TclGetOriginalCommand(Tcl_Command command); #endif #ifndef TclpGetUserHome_TCL_DECLARED #define TclpGetUserHome_TCL_DECLARED /* 42 */ -EXTERN CONST86 char * TclpGetUserHome (const char * name, - Tcl_DString * bufferPtr); +EXTERN CONST86 char * TclpGetUserHome(const char *name, + Tcl_DString *bufferPtr); #endif /* Slot 43 is reserved */ #ifndef TclGuessPackageName_TCL_DECLARED #define TclGuessPackageName_TCL_DECLARED /* 44 */ -EXTERN int TclGuessPackageName (const char * fileName, - Tcl_DString * bufPtr); +EXTERN int TclGuessPackageName(const char *fileName, + Tcl_DString *bufPtr); #endif #ifndef TclHideUnsafeCommands_TCL_DECLARED #define TclHideUnsafeCommands_TCL_DECLARED /* 45 */ -EXTERN int TclHideUnsafeCommands (Tcl_Interp * interp); +EXTERN int TclHideUnsafeCommands(Tcl_Interp *interp); #endif #ifndef TclInExit_TCL_DECLARED #define TclInExit_TCL_DECLARED /* 46 */ -EXTERN int TclInExit (void); +EXTERN int TclInExit(void); #endif /* Slot 47 is reserved */ /* Slot 48 is reserved */ @@ -234,71 +232,71 @@ EXTERN int TclInExit (void); #ifndef TclInitCompiledLocals_TCL_DECLARED #define TclInitCompiledLocals_TCL_DECLARED /* 50 */ -EXTERN void TclInitCompiledLocals (Tcl_Interp * interp, - CallFrame * framePtr, Namespace * nsPtr); +EXTERN void TclInitCompiledLocals(Tcl_Interp *interp, + CallFrame *framePtr, Namespace *nsPtr); #endif #ifndef TclInterpInit_TCL_DECLARED #define TclInterpInit_TCL_DECLARED /* 51 */ -EXTERN int TclInterpInit (Tcl_Interp * interp); +EXTERN int TclInterpInit(Tcl_Interp *interp); #endif /* Slot 52 is reserved */ #ifndef TclInvokeObjectCommand_TCL_DECLARED #define TclInvokeObjectCommand_TCL_DECLARED /* 53 */ -EXTERN int TclInvokeObjectCommand (ClientData clientData, - Tcl_Interp * interp, int argc, - const char ** argv); +EXTERN int TclInvokeObjectCommand(ClientData clientData, + Tcl_Interp *interp, int argc, + CONST84 char **argv); #endif #ifndef TclInvokeStringCommand_TCL_DECLARED #define TclInvokeStringCommand_TCL_DECLARED /* 54 */ -EXTERN int TclInvokeStringCommand (ClientData clientData, - Tcl_Interp * interp, int objc, +EXTERN int TclInvokeStringCommand(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); #endif #ifndef TclIsProc_TCL_DECLARED #define TclIsProc_TCL_DECLARED /* 55 */ -EXTERN Proc * TclIsProc (Command * cmdPtr); +EXTERN Proc * TclIsProc(Command *cmdPtr); #endif /* Slot 56 is reserved */ /* Slot 57 is reserved */ #ifndef TclLookupVar_TCL_DECLARED #define TclLookupVar_TCL_DECLARED /* 58 */ -EXTERN Var * TclLookupVar (Tcl_Interp * interp, - const char * part1, const char * part2, - int flags, const char * msg, int createPart1, - int createPart2, Var ** arrayPtrPtr); +EXTERN Var * TclLookupVar(Tcl_Interp *interp, const char *part1, + const char *part2, int flags, + const char *msg, int createPart1, + int createPart2, Var **arrayPtrPtr); #endif /* Slot 59 is reserved */ #ifndef TclNeedSpace_TCL_DECLARED #define TclNeedSpace_TCL_DECLARED /* 60 */ -EXTERN int TclNeedSpace (const char * start, const char * end); +EXTERN int TclNeedSpace(const char *start, const char *end); #endif #ifndef TclNewProcBodyObj_TCL_DECLARED #define TclNewProcBodyObj_TCL_DECLARED /* 61 */ -EXTERN Tcl_Obj * TclNewProcBodyObj (Proc * procPtr); +EXTERN Tcl_Obj * TclNewProcBodyObj(Proc *procPtr); #endif #ifndef TclObjCommandComplete_TCL_DECLARED #define TclObjCommandComplete_TCL_DECLARED /* 62 */ -EXTERN int TclObjCommandComplete (Tcl_Obj * cmdPtr); +EXTERN int TclObjCommandComplete(Tcl_Obj *cmdPtr); #endif #ifndef TclObjInterpProc_TCL_DECLARED #define TclObjInterpProc_TCL_DECLARED /* 63 */ -EXTERN int TclObjInterpProc (ClientData clientData, - Tcl_Interp * interp, int objc, +EXTERN int TclObjInterpProc(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); #endif #ifndef TclObjInvoke_TCL_DECLARED #define TclObjInvoke_TCL_DECLARED /* 64 */ -EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, +EXTERN int TclObjInvoke(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); #endif /* Slot 65 is reserved */ @@ -308,7 +306,7 @@ EXTERN int TclObjInvoke (Tcl_Interp * interp, int objc, #ifndef TclpAlloc_TCL_DECLARED #define TclpAlloc_TCL_DECLARED /* 69 */ -EXTERN char * TclpAlloc (unsigned int size); +EXTERN char * TclpAlloc(unsigned int size); #endif /* Slot 70 is reserved */ /* Slot 71 is reserved */ @@ -317,34 +315,34 @@ EXTERN char * TclpAlloc (unsigned int size); #ifndef TclpFree_TCL_DECLARED #define TclpFree_TCL_DECLARED /* 74 */ -EXTERN void TclpFree (char * ptr); +EXTERN void TclpFree(char *ptr); #endif #ifndef TclpGetClicks_TCL_DECLARED #define TclpGetClicks_TCL_DECLARED /* 75 */ -EXTERN unsigned long TclpGetClicks (void); +EXTERN unsigned long TclpGetClicks(void); #endif #ifndef TclpGetSeconds_TCL_DECLARED #define TclpGetSeconds_TCL_DECLARED /* 76 */ -EXTERN unsigned long TclpGetSeconds (void); +EXTERN unsigned long TclpGetSeconds(void); #endif #ifndef TclpGetTime_TCL_DECLARED #define TclpGetTime_TCL_DECLARED /* 77 */ -EXTERN void TclpGetTime (Tcl_Time * time); +EXTERN void TclpGetTime(Tcl_Time *time); #endif #ifndef TclpGetTimeZone_TCL_DECLARED #define TclpGetTimeZone_TCL_DECLARED /* 78 */ -EXTERN int TclpGetTimeZone (unsigned long time); +EXTERN int TclpGetTimeZone(unsigned long time); #endif /* Slot 79 is reserved */ /* Slot 80 is reserved */ #ifndef TclpRealloc_TCL_DECLARED #define TclpRealloc_TCL_DECLARED /* 81 */ -EXTERN char * TclpRealloc (char * ptr, unsigned int size); +EXTERN char * TclpRealloc(char *ptr, unsigned int size); #endif /* Slot 82 is reserved */ /* Slot 83 is reserved */ @@ -355,77 +353,76 @@ EXTERN char * TclpRealloc (char * ptr, unsigned int size); #ifndef TclPrecTraceProc_TCL_DECLARED #define TclPrecTraceProc_TCL_DECLARED /* 88 */ -EXTERN char * TclPrecTraceProc (ClientData clientData, - Tcl_Interp * interp, const char * name1, - const char * name2, int flags); +EXTERN char * TclPrecTraceProc(ClientData clientData, + Tcl_Interp *interp, const char *name1, + const char *name2, int flags); #endif #ifndef TclPreventAliasLoop_TCL_DECLARED #define TclPreventAliasLoop_TCL_DECLARED /* 89 */ -EXTERN int TclPreventAliasLoop (Tcl_Interp * interp, - Tcl_Interp * cmdInterp, Tcl_Command cmd); +EXTERN int TclPreventAliasLoop(Tcl_Interp *interp, + Tcl_Interp *cmdInterp, Tcl_Command cmd); #endif /* Slot 90 is reserved */ #ifndef TclProcCleanupProc_TCL_DECLARED #define TclProcCleanupProc_TCL_DECLARED /* 91 */ -EXTERN void TclProcCleanupProc (Proc * procPtr); +EXTERN void TclProcCleanupProc(Proc *procPtr); #endif #ifndef TclProcCompileProc_TCL_DECLARED #define TclProcCompileProc_TCL_DECLARED /* 92 */ -EXTERN int TclProcCompileProc (Tcl_Interp * interp, - Proc * procPtr, Tcl_Obj * bodyPtr, - Namespace * nsPtr, const char * description, - const char * procName); +EXTERN int TclProcCompileProc(Tcl_Interp *interp, Proc *procPtr, + Tcl_Obj *bodyPtr, Namespace *nsPtr, + const char *description, + const char *procName); #endif #ifndef TclProcDeleteProc_TCL_DECLARED #define TclProcDeleteProc_TCL_DECLARED /* 93 */ -EXTERN void TclProcDeleteProc (ClientData clientData); +EXTERN void TclProcDeleteProc(ClientData clientData); #endif /* Slot 94 is reserved */ /* Slot 95 is reserved */ #ifndef TclRenameCommand_TCL_DECLARED #define TclRenameCommand_TCL_DECLARED /* 96 */ -EXTERN int TclRenameCommand (Tcl_Interp * interp, - const char * oldName, const char * newName); +EXTERN int TclRenameCommand(Tcl_Interp *interp, + const char *oldName, const char *newName); #endif #ifndef TclResetShadowedCmdRefs_TCL_DECLARED #define TclResetShadowedCmdRefs_TCL_DECLARED /* 97 */ -EXTERN void TclResetShadowedCmdRefs (Tcl_Interp * interp, - Command * newCmdPtr); +EXTERN void TclResetShadowedCmdRefs(Tcl_Interp *interp, + Command *newCmdPtr); #endif #ifndef TclServiceIdle_TCL_DECLARED #define TclServiceIdle_TCL_DECLARED /* 98 */ -EXTERN int TclServiceIdle (void); +EXTERN int TclServiceIdle(void); #endif /* Slot 99 is reserved */ /* Slot 100 is reserved */ #ifndef TclSetPreInitScript_TCL_DECLARED #define TclSetPreInitScript_TCL_DECLARED /* 101 */ -EXTERN CONST86 char * TclSetPreInitScript (const char * string); +EXTERN CONST86 char * TclSetPreInitScript(const char *string); #endif #ifndef TclSetupEnv_TCL_DECLARED #define TclSetupEnv_TCL_DECLARED /* 102 */ -EXTERN void TclSetupEnv (Tcl_Interp * interp); +EXTERN void TclSetupEnv(Tcl_Interp *interp); #endif #ifndef TclSockGetPort_TCL_DECLARED #define TclSockGetPort_TCL_DECLARED /* 103 */ -EXTERN int TclSockGetPort (Tcl_Interp * interp, - const char * str, const char * proto, - int * portPtr); +EXTERN int TclSockGetPort(Tcl_Interp *interp, const char *str, + const char *proto, int *portPtr); #endif #ifndef TclSockMinimumBuffers_TCL_DECLARED #define TclSockMinimumBuffers_TCL_DECLARED /* 104 */ -EXTERN int TclSockMinimumBuffers (int sock, int size); +EXTERN int TclSockMinimumBuffers(int sock, int size); #endif /* Slot 105 is reserved */ /* Slot 106 is reserved */ @@ -433,160 +430,156 @@ EXTERN int TclSockMinimumBuffers (int sock, int size); #ifndef TclTeardownNamespace_TCL_DECLARED #define TclTeardownNamespace_TCL_DECLARED /* 108 */ -EXTERN void TclTeardownNamespace (Namespace * nsPtr); +EXTERN void TclTeardownNamespace(Namespace *nsPtr); #endif #ifndef TclUpdateReturnInfo_TCL_DECLARED #define TclUpdateReturnInfo_TCL_DECLARED /* 109 */ -EXTERN int TclUpdateReturnInfo (Interp * iPtr); +EXTERN int TclUpdateReturnInfo(Interp *iPtr); #endif /* Slot 110 is reserved */ #ifndef Tcl_AddInterpResolvers_TCL_DECLARED #define Tcl_AddInterpResolvers_TCL_DECLARED /* 111 */ -EXTERN void Tcl_AddInterpResolvers (Tcl_Interp * interp, - const char * name, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, - Tcl_ResolveCompiledVarProc * compiledVarProc); +EXTERN void Tcl_AddInterpResolvers(Tcl_Interp *interp, + const char *name, + Tcl_ResolveCmdProc *cmdProc, + Tcl_ResolveVarProc *varProc, + Tcl_ResolveCompiledVarProc *compiledVarProc); #endif #ifndef Tcl_AppendExportList_TCL_DECLARED #define Tcl_AppendExportList_TCL_DECLARED /* 112 */ -EXTERN int Tcl_AppendExportList (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); +EXTERN int Tcl_AppendExportList(Tcl_Interp *interp, + Tcl_Namespace *nsPtr, Tcl_Obj *objPtr); #endif #ifndef Tcl_CreateNamespace_TCL_DECLARED #define Tcl_CreateNamespace_TCL_DECLARED /* 113 */ -EXTERN Tcl_Namespace * Tcl_CreateNamespace (Tcl_Interp * interp, - const char * name, ClientData clientData, - Tcl_NamespaceDeleteProc * deleteProc); +EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp, + const char *name, ClientData clientData, + Tcl_NamespaceDeleteProc *deleteProc); #endif #ifndef Tcl_DeleteNamespace_TCL_DECLARED #define Tcl_DeleteNamespace_TCL_DECLARED /* 114 */ -EXTERN void Tcl_DeleteNamespace (Tcl_Namespace * nsPtr); +EXTERN void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr); #endif #ifndef Tcl_Export_TCL_DECLARED #define Tcl_Export_TCL_DECLARED /* 115 */ -EXTERN int Tcl_Export (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int resetListFirst); +EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, + const char *pattern, int resetListFirst); #endif #ifndef Tcl_FindCommand_TCL_DECLARED #define Tcl_FindCommand_TCL_DECLARED /* 116 */ -EXTERN Tcl_Command Tcl_FindCommand (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); +EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name, + Tcl_Namespace *contextNsPtr, int flags); #endif #ifndef Tcl_FindNamespace_TCL_DECLARED #define Tcl_FindNamespace_TCL_DECLARED /* 117 */ -EXTERN Tcl_Namespace * Tcl_FindNamespace (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); +EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, + const char *name, + Tcl_Namespace *contextNsPtr, int flags); #endif #ifndef Tcl_GetInterpResolvers_TCL_DECLARED #define Tcl_GetInterpResolvers_TCL_DECLARED /* 118 */ -EXTERN int Tcl_GetInterpResolvers (Tcl_Interp * interp, - const char * name, - Tcl_ResolverInfo * resInfo); +EXTERN int Tcl_GetInterpResolvers(Tcl_Interp *interp, + const char *name, Tcl_ResolverInfo *resInfo); #endif #ifndef Tcl_GetNamespaceResolvers_TCL_DECLARED #define Tcl_GetNamespaceResolvers_TCL_DECLARED /* 119 */ -EXTERN int Tcl_GetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, - Tcl_ResolverInfo * resInfo); +EXTERN int Tcl_GetNamespaceResolvers( + Tcl_Namespace *namespacePtr, + Tcl_ResolverInfo *resInfo); #endif #ifndef Tcl_FindNamespaceVar_TCL_DECLARED #define Tcl_FindNamespaceVar_TCL_DECLARED /* 120 */ -EXTERN Tcl_Var Tcl_FindNamespaceVar (Tcl_Interp * interp, - const char * name, - Tcl_Namespace * contextNsPtr, int flags); +EXTERN Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp, + const char *name, + Tcl_Namespace *contextNsPtr, int flags); #endif #ifndef Tcl_ForgetImport_TCL_DECLARED #define Tcl_ForgetImport_TCL_DECLARED /* 121 */ -EXTERN int Tcl_ForgetImport (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern); +EXTERN int Tcl_ForgetImport(Tcl_Interp *interp, + Tcl_Namespace *nsPtr, const char *pattern); #endif #ifndef Tcl_GetCommandFromObj_TCL_DECLARED #define Tcl_GetCommandFromObj_TCL_DECLARED /* 122 */ -EXTERN Tcl_Command Tcl_GetCommandFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); +EXTERN Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr); #endif #ifndef Tcl_GetCommandFullName_TCL_DECLARED #define Tcl_GetCommandFullName_TCL_DECLARED /* 123 */ -EXTERN void Tcl_GetCommandFullName (Tcl_Interp * interp, - Tcl_Command command, Tcl_Obj * objPtr); +EXTERN void Tcl_GetCommandFullName(Tcl_Interp *interp, + Tcl_Command command, Tcl_Obj *objPtr); #endif #ifndef Tcl_GetCurrentNamespace_TCL_DECLARED #define Tcl_GetCurrentNamespace_TCL_DECLARED /* 124 */ -EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace (Tcl_Interp * interp); +EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp); #endif #ifndef Tcl_GetGlobalNamespace_TCL_DECLARED #define Tcl_GetGlobalNamespace_TCL_DECLARED /* 125 */ -EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace (Tcl_Interp * interp); +EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp); #endif #ifndef Tcl_GetVariableFullName_TCL_DECLARED #define Tcl_GetVariableFullName_TCL_DECLARED /* 126 */ -EXTERN void Tcl_GetVariableFullName (Tcl_Interp * interp, - Tcl_Var variable, Tcl_Obj * objPtr); +EXTERN void Tcl_GetVariableFullName(Tcl_Interp *interp, + Tcl_Var variable, Tcl_Obj *objPtr); #endif #ifndef Tcl_Import_TCL_DECLARED #define Tcl_Import_TCL_DECLARED /* 127 */ -EXTERN int Tcl_Import (Tcl_Interp * interp, - Tcl_Namespace * nsPtr, const char * pattern, - int allowOverwrite); +EXTERN int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr, + const char *pattern, int allowOverwrite); #endif #ifndef Tcl_PopCallFrame_TCL_DECLARED #define Tcl_PopCallFrame_TCL_DECLARED /* 128 */ -EXTERN void Tcl_PopCallFrame (Tcl_Interp * interp); +EXTERN void Tcl_PopCallFrame(Tcl_Interp *interp); #endif #ifndef Tcl_PushCallFrame_TCL_DECLARED #define Tcl_PushCallFrame_TCL_DECLARED /* 129 */ -EXTERN int Tcl_PushCallFrame (Tcl_Interp * interp, - Tcl_CallFrame * framePtr, - Tcl_Namespace * nsPtr, int isProcCallFrame); +EXTERN int Tcl_PushCallFrame(Tcl_Interp *interp, + Tcl_CallFrame *framePtr, + Tcl_Namespace *nsPtr, int isProcCallFrame); #endif #ifndef Tcl_RemoveInterpResolvers_TCL_DECLARED #define Tcl_RemoveInterpResolvers_TCL_DECLARED /* 130 */ -EXTERN int Tcl_RemoveInterpResolvers (Tcl_Interp * interp, - const char * name); +EXTERN int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, + const char *name); #endif #ifndef Tcl_SetNamespaceResolvers_TCL_DECLARED #define Tcl_SetNamespaceResolvers_TCL_DECLARED /* 131 */ -EXTERN void Tcl_SetNamespaceResolvers ( - Tcl_Namespace * namespacePtr, - Tcl_ResolveCmdProc * cmdProc, - Tcl_ResolveVarProc * varProc, - Tcl_ResolveCompiledVarProc * compiledVarProc); +EXTERN void Tcl_SetNamespaceResolvers( + Tcl_Namespace *namespacePtr, + Tcl_ResolveCmdProc *cmdProc, + Tcl_ResolveVarProc *varProc, + Tcl_ResolveCompiledVarProc *compiledVarProc); #endif #ifndef TclpHasSockets_TCL_DECLARED #define TclpHasSockets_TCL_DECLARED /* 132 */ -EXTERN int TclpHasSockets (Tcl_Interp * interp); +EXTERN int TclpHasSockets(Tcl_Interp *interp); #endif #ifndef TclpGetDate_TCL_DECLARED #define TclpGetDate_TCL_DECLARED /* 133 */ -EXTERN struct tm * TclpGetDate (const time_t * time, int useGMT); +EXTERN struct tm * TclpGetDate(const time_t *time, int useGMT); #endif /* Slot 134 is reserved */ /* Slot 135 is reserved */ @@ -595,94 +588,95 @@ EXTERN struct tm * TclpGetDate (const time_t * time, int useGMT); #ifndef TclGetEnv_TCL_DECLARED #define TclGetEnv_TCL_DECLARED /* 138 */ -EXTERN const char * TclGetEnv (const char * name, Tcl_DString * valuePtr); +EXTERN CONST84_RETURN char * TclGetEnv(const char *name, + Tcl_DString *valuePtr); #endif /* Slot 139 is reserved */ /* Slot 140 is reserved */ #ifndef TclpGetCwd_TCL_DECLARED #define TclpGetCwd_TCL_DECLARED /* 141 */ -EXTERN const char * TclpGetCwd (Tcl_Interp * interp, - Tcl_DString * cwdPtr); +EXTERN CONST84_RETURN char * TclpGetCwd(Tcl_Interp *interp, + Tcl_DString *cwdPtr); #endif #ifndef TclSetByteCodeFromAny_TCL_DECLARED #define TclSetByteCodeFromAny_TCL_DECLARED /* 142 */ -EXTERN int TclSetByteCodeFromAny (Tcl_Interp * interp, - Tcl_Obj * objPtr, CompileHookProc * hookProc, +EXTERN int TclSetByteCodeFromAny(Tcl_Interp *interp, + Tcl_Obj *objPtr, CompileHookProc *hookProc, ClientData clientData); #endif #ifndef TclAddLiteralObj_TCL_DECLARED #define TclAddLiteralObj_TCL_DECLARED /* 143 */ -EXTERN int TclAddLiteralObj (struct CompileEnv * envPtr, - Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); +EXTERN int TclAddLiteralObj(struct CompileEnv *envPtr, + Tcl_Obj *objPtr, LiteralEntry **litPtrPtr); #endif #ifndef TclHideLiteral_TCL_DECLARED #define TclHideLiteral_TCL_DECLARED /* 144 */ -EXTERN void TclHideLiteral (Tcl_Interp * interp, - struct CompileEnv * envPtr, int index); +EXTERN void TclHideLiteral(Tcl_Interp *interp, + struct CompileEnv *envPtr, int index); #endif #ifndef TclGetAuxDataType_TCL_DECLARED #define TclGetAuxDataType_TCL_DECLARED /* 145 */ -EXTERN const struct AuxDataType * TclGetAuxDataType (const char * typeName); +EXTERN const struct AuxDataType * TclGetAuxDataType(const char *typeName); #endif #ifndef TclHandleCreate_TCL_DECLARED #define TclHandleCreate_TCL_DECLARED /* 146 */ -EXTERN TclHandle TclHandleCreate (void * ptr); +EXTERN TclHandle TclHandleCreate(void *ptr); #endif #ifndef TclHandleFree_TCL_DECLARED #define TclHandleFree_TCL_DECLARED /* 147 */ -EXTERN void TclHandleFree (TclHandle handle); +EXTERN void TclHandleFree(TclHandle handle); #endif #ifndef TclHandlePreserve_TCL_DECLARED #define TclHandlePreserve_TCL_DECLARED /* 148 */ -EXTERN TclHandle TclHandlePreserve (TclHandle handle); +EXTERN TclHandle TclHandlePreserve(TclHandle handle); #endif #ifndef TclHandleRelease_TCL_DECLARED #define TclHandleRelease_TCL_DECLARED /* 149 */ -EXTERN void TclHandleRelease (TclHandle handle); +EXTERN void TclHandleRelease(TclHandle handle); #endif #ifndef TclRegAbout_TCL_DECLARED #define TclRegAbout_TCL_DECLARED /* 150 */ -EXTERN int TclRegAbout (Tcl_Interp * interp, Tcl_RegExp re); +EXTERN int TclRegAbout(Tcl_Interp *interp, Tcl_RegExp re); #endif #ifndef TclRegExpRangeUniChar_TCL_DECLARED #define TclRegExpRangeUniChar_TCL_DECLARED /* 151 */ -EXTERN void TclRegExpRangeUniChar (Tcl_RegExp re, int index, - int * startPtr, int * endPtr); +EXTERN void TclRegExpRangeUniChar(Tcl_RegExp re, int index, + int *startPtr, int *endPtr); #endif #ifndef TclSetLibraryPath_TCL_DECLARED #define TclSetLibraryPath_TCL_DECLARED /* 152 */ -EXTERN void TclSetLibraryPath (Tcl_Obj * pathPtr); +EXTERN void TclSetLibraryPath(Tcl_Obj *pathPtr); #endif #ifndef TclGetLibraryPath_TCL_DECLARED #define TclGetLibraryPath_TCL_DECLARED /* 153 */ -EXTERN Tcl_Obj * TclGetLibraryPath (void); +EXTERN Tcl_Obj * TclGetLibraryPath(void); #endif /* Slot 154 is reserved */ /* Slot 155 is reserved */ #ifndef TclRegError_TCL_DECLARED #define TclRegError_TCL_DECLARED /* 156 */ -EXTERN void TclRegError (Tcl_Interp * interp, const char * msg, +EXTERN void TclRegError(Tcl_Interp *interp, const char *msg, int status); #endif #ifndef TclVarTraceExists_TCL_DECLARED #define TclVarTraceExists_TCL_DECLARED /* 157 */ -EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, - const char * varName); +EXTERN Var * TclVarTraceExists(Tcl_Interp *interp, + const char *varName); #endif /* Slot 158 is reserved */ /* Slot 159 is reserved */ @@ -690,93 +684,93 @@ EXTERN Var * TclVarTraceExists (Tcl_Interp * interp, #ifndef TclChannelTransform_TCL_DECLARED #define TclChannelTransform_TCL_DECLARED /* 161 */ -EXTERN int TclChannelTransform (Tcl_Interp * interp, - Tcl_Channel chan, Tcl_Obj * cmdObjPtr); +EXTERN int TclChannelTransform(Tcl_Interp *interp, + Tcl_Channel chan, Tcl_Obj *cmdObjPtr); #endif #ifndef TclChannelEventScriptInvoker_TCL_DECLARED #define TclChannelEventScriptInvoker_TCL_DECLARED /* 162 */ -EXTERN void TclChannelEventScriptInvoker (ClientData clientData, +EXTERN void TclChannelEventScriptInvoker(ClientData clientData, int flags); #endif #ifndef TclGetInstructionTable_TCL_DECLARED #define TclGetInstructionTable_TCL_DECLARED /* 163 */ -EXTERN const void * TclGetInstructionTable (void); +EXTERN const void * TclGetInstructionTable(void); #endif #ifndef TclExpandCodeArray_TCL_DECLARED #define TclExpandCodeArray_TCL_DECLARED /* 164 */ -EXTERN void TclExpandCodeArray (void * envPtr); +EXTERN void TclExpandCodeArray(void *envPtr); #endif #ifndef TclpSetInitialEncodings_TCL_DECLARED #define TclpSetInitialEncodings_TCL_DECLARED /* 165 */ -EXTERN void TclpSetInitialEncodings (void); +EXTERN void TclpSetInitialEncodings(void); #endif #ifndef TclListObjSetElement_TCL_DECLARED #define TclListObjSetElement_TCL_DECLARED /* 166 */ -EXTERN int TclListObjSetElement (Tcl_Interp * interp, - Tcl_Obj * listPtr, int index, - Tcl_Obj * valuePtr); +EXTERN int TclListObjSetElement(Tcl_Interp *interp, + Tcl_Obj *listPtr, int index, + Tcl_Obj *valuePtr); #endif /* Slot 167 is reserved */ /* Slot 168 is reserved */ #ifndef TclpUtfNcmp2_TCL_DECLARED #define TclpUtfNcmp2_TCL_DECLARED /* 169 */ -EXTERN int TclpUtfNcmp2 (const char * s1, const char * s2, +EXTERN int TclpUtfNcmp2(const char *s1, const char *s2, unsigned long n); #endif #ifndef TclCheckInterpTraces_TCL_DECLARED #define TclCheckInterpTraces_TCL_DECLARED /* 170 */ -EXTERN int TclCheckInterpTraces (Tcl_Interp * interp, - const char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, +EXTERN int TclCheckInterpTraces(Tcl_Interp *interp, + const char *command, int numChars, + Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); #endif #ifndef TclCheckExecutionTraces_TCL_DECLARED #define TclCheckExecutionTraces_TCL_DECLARED /* 171 */ -EXTERN int TclCheckExecutionTraces (Tcl_Interp * interp, - const char * command, int numChars, - Command * cmdPtr, int result, int traceFlags, +EXTERN int TclCheckExecutionTraces(Tcl_Interp *interp, + const char *command, int numChars, + Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); #endif #ifndef TclInThreadExit_TCL_DECLARED #define TclInThreadExit_TCL_DECLARED /* 172 */ -EXTERN int TclInThreadExit (void); +EXTERN int TclInThreadExit(void); #endif #ifndef TclUniCharMatch_TCL_DECLARED #define TclUniCharMatch_TCL_DECLARED /* 173 */ -EXTERN int TclUniCharMatch (const Tcl_UniChar * string, - int strLen, const Tcl_UniChar * pattern, +EXTERN int TclUniCharMatch(const Tcl_UniChar *string, + int strLen, const Tcl_UniChar *pattern, int ptnLen, int flags); #endif /* Slot 174 is reserved */ #ifndef TclCallVarTraces_TCL_DECLARED #define TclCallVarTraces_TCL_DECLARED /* 175 */ -EXTERN int TclCallVarTraces (Interp * iPtr, Var * arrayPtr, - Var * varPtr, const char * part1, - const char * part2, int flags, +EXTERN int TclCallVarTraces(Interp *iPtr, Var *arrayPtr, + Var *varPtr, const char *part1, + const char *part2, int flags, int leaveErrMsg); #endif #ifndef TclCleanupVar_TCL_DECLARED #define TclCleanupVar_TCL_DECLARED /* 176 */ -EXTERN void TclCleanupVar (Var * varPtr, Var * arrayPtr); +EXTERN void TclCleanupVar(Var *varPtr, Var *arrayPtr); #endif #ifndef TclVarErrMsg_TCL_DECLARED #define TclVarErrMsg_TCL_DECLARED /* 177 */ -EXTERN void TclVarErrMsg (Tcl_Interp * interp, - const char * part1, const char * part2, - const char * operation, const char * reason); +EXTERN void TclVarErrMsg(Tcl_Interp *interp, const char *part1, + const char *part2, const char *operation, + const char *reason); #endif /* Slot 178 is reserved */ /* Slot 179 is reserved */ @@ -785,12 +779,12 @@ EXTERN void TclVarErrMsg (Tcl_Interp * interp, #ifndef TclpLocaltime_TCL_DECLARED #define TclpLocaltime_TCL_DECLARED /* 182 */ -EXTERN struct tm * TclpLocaltime (const time_t * clock); +EXTERN struct tm * TclpLocaltime(const time_t *clock); #endif #ifndef TclpGmtime_TCL_DECLARED #define TclpGmtime_TCL_DECLARED /* 183 */ -EXTERN struct tm * TclpGmtime (const time_t * clock); +EXTERN struct tm * TclpGmtime(const time_t *clock); #endif /* Slot 184 is reserved */ /* Slot 185 is reserved */ @@ -809,59 +803,59 @@ EXTERN struct tm * TclpGmtime (const time_t * clock); #ifndef TclObjGetFrame_TCL_DECLARED #define TclObjGetFrame_TCL_DECLARED /* 198 */ -EXTERN int TclObjGetFrame (Tcl_Interp * interp, - Tcl_Obj * objPtr, CallFrame ** framePtrPtr); +EXTERN int TclObjGetFrame(Tcl_Interp *interp, Tcl_Obj *objPtr, + CallFrame **framePtrPtr); #endif /* Slot 199 is reserved */ #ifndef TclpObjRemoveDirectory_TCL_DECLARED #define TclpObjRemoveDirectory_TCL_DECLARED /* 200 */ -EXTERN int TclpObjRemoveDirectory (Tcl_Obj * pathPtr, - int recursive, Tcl_Obj ** errorPtr); +EXTERN int TclpObjRemoveDirectory(Tcl_Obj *pathPtr, + int recursive, Tcl_Obj **errorPtr); #endif #ifndef TclpObjCopyDirectory_TCL_DECLARED #define TclpObjCopyDirectory_TCL_DECLARED /* 201 */ -EXTERN int TclpObjCopyDirectory (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); +EXTERN int TclpObjCopyDirectory(Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); #endif #ifndef TclpObjCreateDirectory_TCL_DECLARED #define TclpObjCreateDirectory_TCL_DECLARED /* 202 */ -EXTERN int TclpObjCreateDirectory (Tcl_Obj * pathPtr); +EXTERN int TclpObjCreateDirectory(Tcl_Obj *pathPtr); #endif #ifndef TclpObjDeleteFile_TCL_DECLARED #define TclpObjDeleteFile_TCL_DECLARED /* 203 */ -EXTERN int TclpObjDeleteFile (Tcl_Obj * pathPtr); +EXTERN int TclpObjDeleteFile(Tcl_Obj *pathPtr); #endif #ifndef TclpObjCopyFile_TCL_DECLARED #define TclpObjCopyFile_TCL_DECLARED /* 204 */ -EXTERN int TclpObjCopyFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); +EXTERN int TclpObjCopyFile(Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr); #endif #ifndef TclpObjRenameFile_TCL_DECLARED #define TclpObjRenameFile_TCL_DECLARED /* 205 */ -EXTERN int TclpObjRenameFile (Tcl_Obj * srcPathPtr, - Tcl_Obj * destPathPtr); +EXTERN int TclpObjRenameFile(Tcl_Obj *srcPathPtr, + Tcl_Obj *destPathPtr); #endif #ifndef TclpObjStat_TCL_DECLARED #define TclpObjStat_TCL_DECLARED /* 206 */ -EXTERN int TclpObjStat (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); +EXTERN int TclpObjStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf); #endif #ifndef TclpObjAccess_TCL_DECLARED #define TclpObjAccess_TCL_DECLARED /* 207 */ -EXTERN int TclpObjAccess (Tcl_Obj * pathPtr, int mode); +EXTERN int TclpObjAccess(Tcl_Obj *pathPtr, int mode); #endif #ifndef TclpOpenFileChannel_TCL_DECLARED #define TclpOpenFileChannel_TCL_DECLARED /* 208 */ -EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, - Tcl_Obj * pathPtr, int mode, int permissions); +EXTERN Tcl_Channel TclpOpenFileChannel(Tcl_Interp *interp, + Tcl_Obj *pathPtr, int mode, int permissions); #endif /* Slot 209 is reserved */ /* Slot 210 is reserved */ @@ -869,41 +863,41 @@ EXTERN Tcl_Channel TclpOpenFileChannel (Tcl_Interp * interp, #ifndef TclpFindExecutable_TCL_DECLARED #define TclpFindExecutable_TCL_DECLARED /* 212 */ -EXTERN void TclpFindExecutable (const char * argv0); +EXTERN void TclpFindExecutable(const char *argv0); #endif #ifndef TclGetObjNameOfExecutable_TCL_DECLARED #define TclGetObjNameOfExecutable_TCL_DECLARED /* 213 */ -EXTERN Tcl_Obj * TclGetObjNameOfExecutable (void); +EXTERN Tcl_Obj * TclGetObjNameOfExecutable(void); #endif #ifndef TclSetObjNameOfExecutable_TCL_DECLARED #define TclSetObjNameOfExecutable_TCL_DECLARED /* 214 */ -EXTERN void TclSetObjNameOfExecutable (Tcl_Obj * name, +EXTERN void TclSetObjNameOfExecutable(Tcl_Obj *name, Tcl_Encoding encoding); #endif #ifndef TclStackAlloc_TCL_DECLARED #define TclStackAlloc_TCL_DECLARED /* 215 */ -EXTERN void * TclStackAlloc (Tcl_Interp * interp, int numBytes); +EXTERN void * TclStackAlloc(Tcl_Interp *interp, int numBytes); #endif #ifndef TclStackFree_TCL_DECLARED #define TclStackFree_TCL_DECLARED /* 216 */ -EXTERN void TclStackFree (Tcl_Interp * interp, void * freePtr); +EXTERN void TclStackFree(Tcl_Interp *interp, void *freePtr); #endif #ifndef TclPushStackFrame_TCL_DECLARED #define TclPushStackFrame_TCL_DECLARED /* 217 */ -EXTERN int TclPushStackFrame (Tcl_Interp * interp, - Tcl_CallFrame ** framePtrPtr, - Tcl_Namespace * namespacePtr, +EXTERN int TclPushStackFrame(Tcl_Interp *interp, + Tcl_CallFrame **framePtrPtr, + Tcl_Namespace *namespacePtr, int isProcCallFrame); #endif #ifndef TclPopStackFrame_TCL_DECLARED #define TclPopStackFrame_TCL_DECLARED /* 218 */ -EXTERN void TclPopStackFrame (Tcl_Interp * interp); +EXTERN void TclPopStackFrame(Tcl_Interp *interp); #endif /* Slot 219 is reserved */ /* Slot 220 is reserved */ @@ -913,144 +907,140 @@ EXTERN void TclPopStackFrame (Tcl_Interp * interp); #ifndef TclGetPlatform_TCL_DECLARED #define TclGetPlatform_TCL_DECLARED /* 224 */ -EXTERN TclPlatformType * TclGetPlatform (void); +EXTERN TclPlatformType * TclGetPlatform(void); #endif #ifndef TclTraceDictPath_TCL_DECLARED #define TclTraceDictPath_TCL_DECLARED /* 225 */ -EXTERN Tcl_Obj * TclTraceDictPath (Tcl_Interp * interp, - Tcl_Obj * rootPtr, int keyc, +EXTERN Tcl_Obj * TclTraceDictPath(Tcl_Interp *interp, + Tcl_Obj *rootPtr, int keyc, Tcl_Obj *const keyv[], int flags); #endif #ifndef TclObjBeingDeleted_TCL_DECLARED #define TclObjBeingDeleted_TCL_DECLARED /* 226 */ -EXTERN int TclObjBeingDeleted (Tcl_Obj * objPtr); +EXTERN int TclObjBeingDeleted(Tcl_Obj *objPtr); #endif #ifndef TclSetNsPath_TCL_DECLARED #define TclSetNsPath_TCL_DECLARED /* 227 */ -EXTERN void TclSetNsPath (Namespace * nsPtr, int pathLength, - Tcl_Namespace * pathAry[]); +EXTERN void TclSetNsPath(Namespace *nsPtr, int pathLength, + Tcl_Namespace *pathAry[]); #endif /* Slot 228 is reserved */ #ifndef TclPtrMakeUpvar_TCL_DECLARED #define TclPtrMakeUpvar_TCL_DECLARED /* 229 */ -EXTERN int TclPtrMakeUpvar (Tcl_Interp * interp, - Var * otherP1Ptr, const char * myName, - int myFlags, int index); +EXTERN int TclPtrMakeUpvar(Tcl_Interp *interp, Var *otherP1Ptr, + const char *myName, int myFlags, int index); #endif #ifndef TclObjLookupVar_TCL_DECLARED #define TclObjLookupVar_TCL_DECLARED /* 230 */ -EXTERN Var * TclObjLookupVar (Tcl_Interp * interp, - Tcl_Obj * part1Ptr, const char * part2, - int flags, const char * msg, +EXTERN Var * TclObjLookupVar(Tcl_Interp *interp, + Tcl_Obj *part1Ptr, const char *part2, + int flags, const char *msg, const int createPart1, const int createPart2, - Var ** arrayPtrPtr); + Var **arrayPtrPtr); #endif #ifndef TclGetNamespaceFromObj_TCL_DECLARED #define TclGetNamespaceFromObj_TCL_DECLARED /* 231 */ -EXTERN int TclGetNamespaceFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); +EXTERN int TclGetNamespaceFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr); #endif #ifndef TclEvalObjEx_TCL_DECLARED #define TclEvalObjEx_TCL_DECLARED /* 232 */ -EXTERN int TclEvalObjEx (Tcl_Interp * interp, Tcl_Obj * objPtr, - int flags, const CmdFrame * invoker, - int word); +EXTERN int TclEvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, + int flags, const CmdFrame *invoker, int word); #endif #ifndef TclGetSrcInfoForPc_TCL_DECLARED #define TclGetSrcInfoForPc_TCL_DECLARED /* 233 */ -EXTERN void TclGetSrcInfoForPc (CmdFrame * contextPtr); +EXTERN void TclGetSrcInfoForPc(CmdFrame *contextPtr); #endif #ifndef TclVarHashCreateVar_TCL_DECLARED #define TclVarHashCreateVar_TCL_DECLARED /* 234 */ -EXTERN Var * TclVarHashCreateVar (TclVarHashTable * tablePtr, - const char * key, int * newPtr); +EXTERN Var * TclVarHashCreateVar(TclVarHashTable *tablePtr, + const char *key, int *newPtr); #endif #ifndef TclInitVarHashTable_TCL_DECLARED #define TclInitVarHashTable_TCL_DECLARED /* 235 */ -EXTERN void TclInitVarHashTable (TclVarHashTable * tablePtr, - Namespace * nsPtr); +EXTERN void TclInitVarHashTable(TclVarHashTable *tablePtr, + Namespace *nsPtr); #endif #ifndef Tcl_BackgroundException_TCL_DECLARED #define Tcl_BackgroundException_TCL_DECLARED /* 236 */ -EXTERN void Tcl_BackgroundException (Tcl_Interp * interp, - int code); +EXTERN void Tcl_BackgroundException(Tcl_Interp *interp, int code); #endif #ifndef TclResetCancellation_TCL_DECLARED #define TclResetCancellation_TCL_DECLARED /* 237 */ -EXTERN int TclResetCancellation (Tcl_Interp * interp, int force); +EXTERN int TclResetCancellation(Tcl_Interp *interp, int force); #endif #ifndef TclNRInterpProc_TCL_DECLARED #define TclNRInterpProc_TCL_DECLARED /* 238 */ -EXTERN int TclNRInterpProc (ClientData clientData, - Tcl_Interp * interp, int objc, +EXTERN int TclNRInterpProc(ClientData clientData, + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); #endif #ifndef TclNRInterpProcCore_TCL_DECLARED #define TclNRInterpProcCore_TCL_DECLARED /* 239 */ -EXTERN int TclNRInterpProcCore (Tcl_Interp * interp, - Tcl_Obj * procNameObj, int skip, +EXTERN int TclNRInterpProcCore(Tcl_Interp *interp, + Tcl_Obj *procNameObj, int skip, ProcErrorProc errorProc); #endif #ifndef TclNRRunCallbacks_TCL_DECLARED #define TclNRRunCallbacks_TCL_DECLARED /* 240 */ -EXTERN int TclNRRunCallbacks (Tcl_Interp * interp, int result, - struct TEOV_callback * rootPtr, int tebcCall); +EXTERN int TclNRRunCallbacks(Tcl_Interp *interp, int result, + struct TEOV_callback *rootPtr, int tebcCall); #endif #ifndef TclNREvalObjEx_TCL_DECLARED #define TclNREvalObjEx_TCL_DECLARED /* 241 */ -EXTERN int TclNREvalObjEx (Tcl_Interp * interp, - Tcl_Obj * objPtr, int flags, - const CmdFrame * invoker, int word); +EXTERN int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, + int flags, const CmdFrame *invoker, int word); #endif #ifndef TclNREvalObjv_TCL_DECLARED #define TclNREvalObjv_TCL_DECLARED /* 242 */ -EXTERN int TclNREvalObjv (Tcl_Interp * interp, int objc, +EXTERN int TclNREvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags, - Command * cmdPtr); + Command *cmdPtr); #endif #ifndef TclDbDumpActiveObjects_TCL_DECLARED #define TclDbDumpActiveObjects_TCL_DECLARED /* 243 */ -EXTERN void TclDbDumpActiveObjects (FILE * outFile); +EXTERN void TclDbDumpActiveObjects(FILE *outFile); #endif #ifndef TclGetNamespaceChildTable_TCL_DECLARED #define TclGetNamespaceChildTable_TCL_DECLARED /* 244 */ -EXTERN Tcl_HashTable * TclGetNamespaceChildTable (Tcl_Namespace * nsPtr); +EXTERN Tcl_HashTable * TclGetNamespaceChildTable(Tcl_Namespace *nsPtr); #endif #ifndef TclGetNamespaceCommandTable_TCL_DECLARED #define TclGetNamespaceCommandTable_TCL_DECLARED /* 245 */ -EXTERN Tcl_HashTable * TclGetNamespaceCommandTable (Tcl_Namespace * nsPtr); +EXTERN Tcl_HashTable * TclGetNamespaceCommandTable(Tcl_Namespace *nsPtr); #endif #ifndef TclInitRewriteEnsemble_TCL_DECLARED #define TclInitRewriteEnsemble_TCL_DECLARED /* 246 */ -EXTERN int TclInitRewriteEnsemble (Tcl_Interp * interp, +EXTERN int TclInitRewriteEnsemble(Tcl_Interp *interp, int numRemoved, int numInserted, - Tcl_Obj *const * objv); + Tcl_Obj *const *objv); #endif #ifndef TclResetRewriteEnsemble_TCL_DECLARED #define TclResetRewriteEnsemble_TCL_DECLARED /* 247 */ -EXTERN void TclResetRewriteEnsemble (Tcl_Interp * interp, +EXTERN void TclResetRewriteEnsemble(Tcl_Interp *interp, int isRootEnsemble); #endif @@ -1111,7 +1101,7 @@ typedef struct TclIntStubs { void (*tclInitCompiledLocals) (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); /* 50 */ int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ void *reserved52; - int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, const char ** argv); /* 53 */ + int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 54 */ Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ void *reserved56; @@ -1196,10 +1186,10 @@ typedef struct TclIntStubs { void *reserved135; void *reserved136; void *reserved137; - const char * (*tclGetEnv) (const char * name, Tcl_DString * valuePtr); /* 138 */ + CONST84_RETURN char * (*tclGetEnv) (const char * name, Tcl_DString * valuePtr); /* 138 */ void *reserved139; void *reserved140; - const char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ + CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 620a73d..3521088 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.40 2010/01/22 13:02:50 nijtmans Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.41 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef _TCLINTPLATDECLS @@ -42,81 +42,80 @@ #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan); #endif #ifndef TclpCloseFile_TCL_DECLARED #define TclpCloseFile_TCL_DECLARED /* 1 */ -EXTERN int TclpCloseFile (TclFile file); +EXTERN int TclpCloseFile(TclFile file); #endif #ifndef TclpCreateCommandChannel_TCL_DECLARED #define TclpCreateCommandChannel_TCL_DECLARED /* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, +EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile, TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); + int numPids, Tcl_Pid *pidPtr); #endif #ifndef TclpCreatePipe_TCL_DECLARED #define TclpCreatePipe_TCL_DECLARED /* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); +EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe); #endif #ifndef TclpCreateProcess_TCL_DECLARED #define TclpCreateProcess_TCL_DECLARED /* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - const char ** argv, TclFile inputFile, +EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc, + const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); + Tcl_Pid *pidPtr); #endif /* Slot 5 is reserved */ #ifndef TclpMakeFile_TCL_DECLARED #define TclpMakeFile_TCL_DECLARED /* 6 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction); #endif #ifndef TclpOpenFile_TCL_DECLARED #define TclpOpenFile_TCL_DECLARED /* 7 */ -EXTERN TclFile TclpOpenFile (const char * fname, int mode); +EXTERN TclFile TclpOpenFile(const char *fname, int mode); #endif #ifndef TclUnixWaitForFile_TCL_DECLARED #define TclUnixWaitForFile_TCL_DECLARED /* 8 */ -EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); +EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout); #endif #ifndef TclpCreateTempFile_TCL_DECLARED #define TclpCreateTempFile_TCL_DECLARED /* 9 */ -EXTERN TclFile TclpCreateTempFile (const char * contents); +EXTERN TclFile TclpCreateTempFile(const char *contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); +EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir); #endif #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED /* 11 */ -EXTERN struct tm * TclpLocaltime_unix (const time_t * clock); +EXTERN struct tm * TclpLocaltime_unix(const time_t *clock); #endif #ifndef TclpGmtime_unix_TCL_DECLARED #define TclpGmtime_unix_TCL_DECLARED /* 12 */ -EXTERN struct tm * TclpGmtime_unix (const time_t * clock); +EXTERN struct tm * TclpGmtime_unix(const time_t *clock); #endif #ifndef TclpInetNtoa_TCL_DECLARED #define TclpInetNtoa_TCL_DECLARED /* 13 */ -EXTERN char * TclpInetNtoa (struct in_addr addr); +EXTERN char * TclpInetNtoa(struct in_addr addr); #endif #ifndef TclUnixCopyFile_TCL_DECLARED #define TclUnixCopyFile_TCL_DECLARED /* 14 */ -EXTERN int TclUnixCopyFile (const char * src, const char * dst, - const Tcl_StatBuf * statBufPtr, +EXTERN int TclUnixCopyFile(const char *src, const char *dst, + const Tcl_StatBuf *statBufPtr, int dontCopyAtts); #endif #endif /* UNIX */ @@ -124,255 +123,253 @@ EXTERN int TclUnixCopyFile (const char * src, const char * dst, #ifndef TclWinConvertError_TCL_DECLARED #define TclWinConvertError_TCL_DECLARED /* 0 */ -EXTERN void TclWinConvertError (unsigned long errCode); +EXTERN void TclWinConvertError(unsigned long errCode); #endif #ifndef TclWinConvertWSAError_TCL_DECLARED #define TclWinConvertWSAError_TCL_DECLARED /* 1 */ -EXTERN void TclWinConvertWSAError (unsigned long errCode); +EXTERN void TclWinConvertWSAError(unsigned long errCode); #endif #ifndef TclWinGetServByName_TCL_DECLARED #define TclWinGetServByName_TCL_DECLARED /* 2 */ -EXTERN struct servent * TclWinGetServByName (const char * nm, - const char * proto); +EXTERN struct servent * TclWinGetServByName(const char *nm, + const char *proto); #endif #ifndef TclWinGetSockOpt_TCL_DECLARED #define TclWinGetSockOpt_TCL_DECLARED /* 3 */ -EXTERN int TclWinGetSockOpt (int s, int level, int optname, - char FAR * optval, int FAR * optlen); +EXTERN int TclWinGetSockOpt(int s, int level, int optname, + char FAR *optval, int FAR *optlen); #endif #ifndef TclWinGetTclInstance_TCL_DECLARED #define TclWinGetTclInstance_TCL_DECLARED /* 4 */ -EXTERN HINSTANCE TclWinGetTclInstance (void); +EXTERN HINSTANCE TclWinGetTclInstance(void); #endif /* Slot 5 is reserved */ #ifndef TclWinNToHS_TCL_DECLARED #define TclWinNToHS_TCL_DECLARED /* 6 */ -EXTERN u_short TclWinNToHS (u_short ns); +EXTERN u_short TclWinNToHS(u_short ns); #endif #ifndef TclWinSetSockOpt_TCL_DECLARED #define TclWinSetSockOpt_TCL_DECLARED /* 7 */ -EXTERN int TclWinSetSockOpt (int s, int level, int optname, - const char FAR * optval, int optlen); +EXTERN int TclWinSetSockOpt(int s, int level, int optname, + const char FAR *optval, int optlen); #endif #ifndef TclpGetPid_TCL_DECLARED #define TclpGetPid_TCL_DECLARED /* 8 */ -EXTERN unsigned long TclpGetPid (Tcl_Pid pid); +EXTERN unsigned long TclpGetPid(Tcl_Pid pid); #endif #ifndef TclWinGetPlatformId_TCL_DECLARED #define TclWinGetPlatformId_TCL_DECLARED /* 9 */ -EXTERN int TclWinGetPlatformId (void); +EXTERN int TclWinGetPlatformId(void); #endif /* Slot 10 is reserved */ #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 11 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan); #endif #ifndef TclpCloseFile_TCL_DECLARED #define TclpCloseFile_TCL_DECLARED /* 12 */ -EXTERN int TclpCloseFile (TclFile file); +EXTERN int TclpCloseFile(TclFile file); #endif #ifndef TclpCreateCommandChannel_TCL_DECLARED #define TclpCreateCommandChannel_TCL_DECLARED /* 13 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, +EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile, TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); + int numPids, Tcl_Pid *pidPtr); #endif #ifndef TclpCreatePipe_TCL_DECLARED #define TclpCreatePipe_TCL_DECLARED /* 14 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); +EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe); #endif #ifndef TclpCreateProcess_TCL_DECLARED #define TclpCreateProcess_TCL_DECLARED /* 15 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - const char ** argv, TclFile inputFile, +EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc, + const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); + Tcl_Pid *pidPtr); #endif /* Slot 16 is reserved */ /* Slot 17 is reserved */ #ifndef TclpMakeFile_TCL_DECLARED #define TclpMakeFile_TCL_DECLARED /* 18 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction); #endif #ifndef TclpOpenFile_TCL_DECLARED #define TclpOpenFile_TCL_DECLARED /* 19 */ -EXTERN TclFile TclpOpenFile (const char * fname, int mode); +EXTERN TclFile TclpOpenFile(const char *fname, int mode); #endif #ifndef TclWinAddProcess_TCL_DECLARED #define TclWinAddProcess_TCL_DECLARED /* 20 */ -EXTERN void TclWinAddProcess (void * hProcess, unsigned long id); +EXTERN void TclWinAddProcess(void *hProcess, unsigned long id); #endif /* Slot 21 is reserved */ #ifndef TclpCreateTempFile_TCL_DECLARED #define TclpCreateTempFile_TCL_DECLARED /* 22 */ -EXTERN TclFile TclpCreateTempFile (const char * contents); +EXTERN TclFile TclpCreateTempFile(const char *contents); #endif #ifndef TclpGetTZName_TCL_DECLARED #define TclpGetTZName_TCL_DECLARED /* 23 */ -EXTERN char * TclpGetTZName (int isdst); +EXTERN char * TclpGetTZName(int isdst); #endif #ifndef TclWinNoBackslash_TCL_DECLARED #define TclWinNoBackslash_TCL_DECLARED /* 24 */ -EXTERN char * TclWinNoBackslash (char * path); +EXTERN char * TclWinNoBackslash(char *path); #endif /* Slot 25 is reserved */ #ifndef TclWinSetInterfaces_TCL_DECLARED #define TclWinSetInterfaces_TCL_DECLARED /* 26 */ -EXTERN void TclWinSetInterfaces (int wide); +EXTERN void TclWinSetInterfaces(int wide); #endif #ifndef TclWinFlushDirtyChannels_TCL_DECLARED #define TclWinFlushDirtyChannels_TCL_DECLARED /* 27 */ -EXTERN void TclWinFlushDirtyChannels (void); +EXTERN void TclWinFlushDirtyChannels(void); #endif #ifndef TclWinResetInterfaces_TCL_DECLARED #define TclWinResetInterfaces_TCL_DECLARED /* 28 */ -EXTERN void TclWinResetInterfaces (void); +EXTERN void TclWinResetInterfaces(void); #endif #ifndef TclWinCPUID_TCL_DECLARED #define TclWinCPUID_TCL_DECLARED /* 29 */ -EXTERN int TclWinCPUID (unsigned int index, unsigned int * regs); +EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs); #endif #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 0 */ -EXTERN void TclGetAndDetachPids (Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan); #endif #ifndef TclpCloseFile_TCL_DECLARED #define TclpCloseFile_TCL_DECLARED /* 1 */ -EXTERN int TclpCloseFile (TclFile file); +EXTERN int TclpCloseFile(TclFile file); #endif #ifndef TclpCreateCommandChannel_TCL_DECLARED #define TclpCreateCommandChannel_TCL_DECLARED /* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel (TclFile readFile, +EXTERN Tcl_Channel TclpCreateCommandChannel(TclFile readFile, TclFile writeFile, TclFile errorFile, - int numPids, Tcl_Pid * pidPtr); + int numPids, Tcl_Pid *pidPtr); #endif #ifndef TclpCreatePipe_TCL_DECLARED #define TclpCreatePipe_TCL_DECLARED /* 3 */ -EXTERN int TclpCreatePipe (TclFile * readPipe, - TclFile * writePipe); +EXTERN int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe); #endif #ifndef TclpCreateProcess_TCL_DECLARED #define TclpCreateProcess_TCL_DECLARED /* 4 */ -EXTERN int TclpCreateProcess (Tcl_Interp * interp, int argc, - const char ** argv, TclFile inputFile, +EXTERN int TclpCreateProcess(Tcl_Interp *interp, int argc, + const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, - Tcl_Pid * pidPtr); + Tcl_Pid *pidPtr); #endif /* Slot 5 is reserved */ #ifndef TclpMakeFile_TCL_DECLARED #define TclpMakeFile_TCL_DECLARED /* 6 */ -EXTERN TclFile TclpMakeFile (Tcl_Channel channel, int direction); +EXTERN TclFile TclpMakeFile(Tcl_Channel channel, int direction); #endif #ifndef TclpOpenFile_TCL_DECLARED #define TclpOpenFile_TCL_DECLARED /* 7 */ -EXTERN TclFile TclpOpenFile (const char * fname, int mode); +EXTERN TclFile TclpOpenFile(const char *fname, int mode); #endif #ifndef TclUnixWaitForFile_TCL_DECLARED #define TclUnixWaitForFile_TCL_DECLARED /* 8 */ -EXTERN int TclUnixWaitForFile (int fd, int mask, int timeout); +EXTERN int TclUnixWaitForFile(int fd, int mask, int timeout); #endif #ifndef TclpCreateTempFile_TCL_DECLARED #define TclpCreateTempFile_TCL_DECLARED /* 9 */ -EXTERN TclFile TclpCreateTempFile (const char * contents); +EXTERN TclFile TclpCreateTempFile(const char *contents); #endif #ifndef TclpReaddir_TCL_DECLARED #define TclpReaddir_TCL_DECLARED /* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir (DIR * dir); +EXTERN Tcl_DirEntry * TclpReaddir(DIR *dir); #endif #ifndef TclpLocaltime_unix_TCL_DECLARED #define TclpLocaltime_unix_TCL_DECLARED /* 11 */ -EXTERN struct tm * TclpLocaltime_unix (const time_t * clock); +EXTERN struct tm * TclpLocaltime_unix(const time_t *clock); #endif #ifndef TclpGmtime_unix_TCL_DECLARED #define TclpGmtime_unix_TCL_DECLARED /* 12 */ -EXTERN struct tm * TclpGmtime_unix (const time_t * clock); +EXTERN struct tm * TclpGmtime_unix(const time_t *clock); #endif #ifndef TclpInetNtoa_TCL_DECLARED #define TclpInetNtoa_TCL_DECLARED /* 13 */ -EXTERN char * TclpInetNtoa (struct in_addr addr); +EXTERN char * TclpInetNtoa(struct in_addr addr); #endif #ifndef TclUnixCopyFile_TCL_DECLARED #define TclUnixCopyFile_TCL_DECLARED /* 14 */ -EXTERN int TclUnixCopyFile (const char * src, const char * dst, - const Tcl_StatBuf * statBufPtr, +EXTERN int TclUnixCopyFile(const char *src, const char *dst, + const Tcl_StatBuf *statBufPtr, int dontCopyAtts); #endif #ifndef TclMacOSXGetFileAttribute_TCL_DECLARED #define TclMacOSXGetFileAttribute_TCL_DECLARED /* 15 */ -EXTERN int TclMacOSXGetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, - Tcl_Obj ** attributePtrPtr); +EXTERN int TclMacOSXGetFileAttribute(Tcl_Interp *interp, + int objIndex, Tcl_Obj *fileName, + Tcl_Obj **attributePtrPtr); #endif #ifndef TclMacOSXSetFileAttribute_TCL_DECLARED #define TclMacOSXSetFileAttribute_TCL_DECLARED /* 16 */ -EXTERN int TclMacOSXSetFileAttribute (Tcl_Interp * interp, - int objIndex, Tcl_Obj * fileName, - Tcl_Obj * attributePtr); +EXTERN int TclMacOSXSetFileAttribute(Tcl_Interp *interp, + int objIndex, Tcl_Obj *fileName, + Tcl_Obj *attributePtr); #endif #ifndef TclMacOSXCopyFileAttributes_TCL_DECLARED #define TclMacOSXCopyFileAttributes_TCL_DECLARED /* 17 */ -EXTERN int TclMacOSXCopyFileAttributes (const char * src, - const char * dst, - const Tcl_StatBuf * statBufPtr); +EXTERN int TclMacOSXCopyFileAttributes(const char *src, + const char *dst, + const Tcl_StatBuf *statBufPtr); #endif #ifndef TclMacOSXMatchType_TCL_DECLARED #define TclMacOSXMatchType_TCL_DECLARED /* 18 */ -EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, - const char * pathName, const char * fileName, - Tcl_StatBuf * statBufPtr, - Tcl_GlobTypeData * types); +EXTERN int TclMacOSXMatchType(Tcl_Interp *interp, + const char *pathName, const char *fileName, + Tcl_StatBuf *statBufPtr, + Tcl_GlobTypeData *types); #endif #ifndef TclMacOSXNotifierAddRunLoopMode_TCL_DECLARED #define TclMacOSXNotifierAddRunLoopMode_TCL_DECLARED /* 19 */ -EXTERN void TclMacOSXNotifierAddRunLoopMode ( - const void * runLoopMode); +EXTERN void TclMacOSXNotifierAddRunLoopMode( + const void *runLoopMode); #endif #endif /* MACOSX */ diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index c42c02f..46e4889 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.12 2009/07/19 11:46:53 dkf Exp $ + * $Id: tclOODecls.h,v 1.13 2010/01/29 16:17:20 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -41,176 +41,176 @@ extern const char *TclOOInitializeStubs(Tcl_Interp *, const char *version); #ifndef Tcl_CopyObjectInstance_TCL_DECLARED #define Tcl_CopyObjectInstance_TCL_DECLARED /* 0 */ -EXTERN Tcl_Object Tcl_CopyObjectInstance (Tcl_Interp * interp, +EXTERN Tcl_Object Tcl_CopyObjectInstance(Tcl_Interp *interp, Tcl_Object sourceObject, - const char * targetName, - const char * targetNamespaceName); + const char *targetName, + const char *targetNamespaceName); #endif #ifndef Tcl_GetClassAsObject_TCL_DECLARED #define Tcl_GetClassAsObject_TCL_DECLARED /* 1 */ -EXTERN Tcl_Object Tcl_GetClassAsObject (Tcl_Class clazz); +EXTERN Tcl_Object Tcl_GetClassAsObject(Tcl_Class clazz); #endif #ifndef Tcl_GetObjectAsClass_TCL_DECLARED #define Tcl_GetObjectAsClass_TCL_DECLARED /* 2 */ -EXTERN Tcl_Class Tcl_GetObjectAsClass (Tcl_Object object); +EXTERN Tcl_Class Tcl_GetObjectAsClass(Tcl_Object object); #endif #ifndef Tcl_GetObjectCommand_TCL_DECLARED #define Tcl_GetObjectCommand_TCL_DECLARED /* 3 */ -EXTERN Tcl_Command Tcl_GetObjectCommand (Tcl_Object object); +EXTERN Tcl_Command Tcl_GetObjectCommand(Tcl_Object object); #endif #ifndef Tcl_GetObjectFromObj_TCL_DECLARED #define Tcl_GetObjectFromObj_TCL_DECLARED /* 4 */ -EXTERN Tcl_Object Tcl_GetObjectFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); +EXTERN Tcl_Object Tcl_GetObjectFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr); #endif #ifndef Tcl_GetObjectNamespace_TCL_DECLARED #define Tcl_GetObjectNamespace_TCL_DECLARED /* 5 */ -EXTERN Tcl_Namespace * Tcl_GetObjectNamespace (Tcl_Object object); +EXTERN Tcl_Namespace * Tcl_GetObjectNamespace(Tcl_Object object); #endif #ifndef Tcl_MethodDeclarerClass_TCL_DECLARED #define Tcl_MethodDeclarerClass_TCL_DECLARED /* 6 */ -EXTERN Tcl_Class Tcl_MethodDeclarerClass (Tcl_Method method); +EXTERN Tcl_Class Tcl_MethodDeclarerClass(Tcl_Method method); #endif #ifndef Tcl_MethodDeclarerObject_TCL_DECLARED #define Tcl_MethodDeclarerObject_TCL_DECLARED /* 7 */ -EXTERN Tcl_Object Tcl_MethodDeclarerObject (Tcl_Method method); +EXTERN Tcl_Object Tcl_MethodDeclarerObject(Tcl_Method method); #endif #ifndef Tcl_MethodIsPublic_TCL_DECLARED #define Tcl_MethodIsPublic_TCL_DECLARED /* 8 */ -EXTERN int Tcl_MethodIsPublic (Tcl_Method method); +EXTERN int Tcl_MethodIsPublic(Tcl_Method method); #endif #ifndef Tcl_MethodIsType_TCL_DECLARED #define Tcl_MethodIsType_TCL_DECLARED /* 9 */ -EXTERN int Tcl_MethodIsType (Tcl_Method method, - const Tcl_MethodType * typePtr, - ClientData * clientDataPtr); +EXTERN int Tcl_MethodIsType(Tcl_Method method, + const Tcl_MethodType *typePtr, + ClientData *clientDataPtr); #endif #ifndef Tcl_MethodName_TCL_DECLARED #define Tcl_MethodName_TCL_DECLARED /* 10 */ -EXTERN Tcl_Obj * Tcl_MethodName (Tcl_Method method); +EXTERN Tcl_Obj * Tcl_MethodName(Tcl_Method method); #endif #ifndef Tcl_NewInstanceMethod_TCL_DECLARED #define Tcl_NewInstanceMethod_TCL_DECLARED /* 11 */ -EXTERN Tcl_Method Tcl_NewInstanceMethod (Tcl_Interp * interp, - Tcl_Object object, Tcl_Obj * nameObj, - int isPublic, const Tcl_MethodType * typePtr, +EXTERN Tcl_Method Tcl_NewInstanceMethod(Tcl_Interp *interp, + Tcl_Object object, Tcl_Obj *nameObj, + int isPublic, const Tcl_MethodType *typePtr, ClientData clientData); #endif #ifndef Tcl_NewMethod_TCL_DECLARED #define Tcl_NewMethod_TCL_DECLARED /* 12 */ -EXTERN Tcl_Method Tcl_NewMethod (Tcl_Interp * interp, Tcl_Class cls, - Tcl_Obj * nameObj, int isPublic, - const Tcl_MethodType * typePtr, +EXTERN Tcl_Method Tcl_NewMethod(Tcl_Interp *interp, Tcl_Class cls, + Tcl_Obj *nameObj, int isPublic, + const Tcl_MethodType *typePtr, ClientData clientData); #endif #ifndef Tcl_NewObjectInstance_TCL_DECLARED #define Tcl_NewObjectInstance_TCL_DECLARED /* 13 */ -EXTERN Tcl_Object Tcl_NewObjectInstance (Tcl_Interp * interp, - Tcl_Class cls, const char * nameStr, - const char * nsNameStr, int objc, - Tcl_Obj *const * objv, int skip); +EXTERN Tcl_Object Tcl_NewObjectInstance(Tcl_Interp *interp, + Tcl_Class cls, const char *nameStr, + const char *nsNameStr, int objc, + Tcl_Obj *const *objv, int skip); #endif #ifndef Tcl_ObjectDeleted_TCL_DECLARED #define Tcl_ObjectDeleted_TCL_DECLARED /* 14 */ -EXTERN int Tcl_ObjectDeleted (Tcl_Object object); +EXTERN int Tcl_ObjectDeleted(Tcl_Object object); #endif #ifndef Tcl_ObjectContextIsFiltering_TCL_DECLARED #define Tcl_ObjectContextIsFiltering_TCL_DECLARED /* 15 */ -EXTERN int Tcl_ObjectContextIsFiltering ( +EXTERN int Tcl_ObjectContextIsFiltering( Tcl_ObjectContext context); #endif #ifndef Tcl_ObjectContextMethod_TCL_DECLARED #define Tcl_ObjectContextMethod_TCL_DECLARED /* 16 */ -EXTERN Tcl_Method Tcl_ObjectContextMethod (Tcl_ObjectContext context); +EXTERN Tcl_Method Tcl_ObjectContextMethod(Tcl_ObjectContext context); #endif #ifndef Tcl_ObjectContextObject_TCL_DECLARED #define Tcl_ObjectContextObject_TCL_DECLARED /* 17 */ -EXTERN Tcl_Object Tcl_ObjectContextObject (Tcl_ObjectContext context); +EXTERN Tcl_Object Tcl_ObjectContextObject(Tcl_ObjectContext context); #endif #ifndef Tcl_ObjectContextSkippedArgs_TCL_DECLARED #define Tcl_ObjectContextSkippedArgs_TCL_DECLARED /* 18 */ -EXTERN int Tcl_ObjectContextSkippedArgs ( +EXTERN int Tcl_ObjectContextSkippedArgs( Tcl_ObjectContext context); #endif #ifndef Tcl_ClassGetMetadata_TCL_DECLARED #define Tcl_ClassGetMetadata_TCL_DECLARED /* 19 */ -EXTERN ClientData Tcl_ClassGetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr); +EXTERN ClientData Tcl_ClassGetMetadata(Tcl_Class clazz, + const Tcl_ObjectMetadataType *typePtr); #endif #ifndef Tcl_ClassSetMetadata_TCL_DECLARED #define Tcl_ClassSetMetadata_TCL_DECLARED /* 20 */ -EXTERN void Tcl_ClassSetMetadata (Tcl_Class clazz, - const Tcl_ObjectMetadataType * typePtr, +EXTERN void Tcl_ClassSetMetadata(Tcl_Class clazz, + const Tcl_ObjectMetadataType *typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectGetMetadata_TCL_DECLARED #define Tcl_ObjectGetMetadata_TCL_DECLARED /* 21 */ -EXTERN ClientData Tcl_ObjectGetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr); +EXTERN ClientData Tcl_ObjectGetMetadata(Tcl_Object object, + const Tcl_ObjectMetadataType *typePtr); #endif #ifndef Tcl_ObjectSetMetadata_TCL_DECLARED #define Tcl_ObjectSetMetadata_TCL_DECLARED /* 22 */ -EXTERN void Tcl_ObjectSetMetadata (Tcl_Object object, - const Tcl_ObjectMetadataType * typePtr, +EXTERN void Tcl_ObjectSetMetadata(Tcl_Object object, + const Tcl_ObjectMetadataType *typePtr, ClientData metadata); #endif #ifndef Tcl_ObjectContextInvokeNext_TCL_DECLARED #define Tcl_ObjectContextInvokeNext_TCL_DECLARED /* 23 */ -EXTERN int Tcl_ObjectContextInvokeNext (Tcl_Interp * interp, +EXTERN int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp, Tcl_ObjectContext context, int objc, - Tcl_Obj *const * objv, int skip); + Tcl_Obj *const *objv, int skip); #endif #ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED #define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED /* 24 */ -EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper ( +EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper( Tcl_Object object); #endif #ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED #define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED /* 25 */ -EXTERN void Tcl_ObjectSetMethodNameMapper (Tcl_Object object, +EXTERN void Tcl_ObjectSetMethodNameMapper(Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); #endif #ifndef Tcl_ClassSetConstructor_TCL_DECLARED #define Tcl_ClassSetConstructor_TCL_DECLARED /* 26 */ -EXTERN void Tcl_ClassSetConstructor (Tcl_Interp * interp, +EXTERN void Tcl_ClassSetConstructor(Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); #endif #ifndef Tcl_ClassSetDestructor_TCL_DECLARED #define Tcl_ClassSetDestructor_TCL_DECLARED /* 27 */ -EXTERN void Tcl_ClassSetDestructor (Tcl_Interp * interp, +EXTERN void Tcl_ClassSetDestructor(Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); #endif #ifndef Tcl_GetObjectName_TCL_DECLARED #define Tcl_GetObjectName_TCL_DECLARED /* 28 */ -EXTERN Tcl_Obj * Tcl_GetObjectName (Tcl_Interp * interp, +EXTERN Tcl_Obj * Tcl_GetObjectName(Tcl_Interp *interp, Tcl_Object object); #endif diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index aea18e2..dc52638 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.14 2010/01/28 10:25:05 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.15 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -96,7 +96,7 @@ typedef struct ProcedureMethod { TclOO_PostCallProc postCallProc; /* Callback to allow for additional cleanup * after the method executes. */ - GetFrameInfoValueProc gfivProc; + GetFrameInfoValueProc *gfivProc; /* Callback to allow for fine tuning of how * the method reports itself. */ } ProcedureMethod; diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index 807c333..13bd387 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.10 2008/10/22 20:23:59 nijtmans Exp $ + * $Id: tclOOIntDecls.h,v 1.11 2010/01/29 16:17:20 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -33,128 +33,126 @@ #ifndef TclOOGetDefineCmdContext_TCL_DECLARED #define TclOOGetDefineCmdContext_TCL_DECLARED /* 0 */ -EXTERN Tcl_Object TclOOGetDefineCmdContext (Tcl_Interp * interp); +EXTERN Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp); #endif #ifndef TclOOMakeProcInstanceMethod_TCL_DECLARED #define TclOOMakeProcInstanceMethod_TCL_DECLARED /* 1 */ -EXTERN Tcl_Method TclOOMakeProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, - ClientData clientData, Proc ** procPtrPtr); +EXTERN Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp, + Object *oPtr, int flags, Tcl_Obj *nameObj, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + const Tcl_MethodType *typePtr, + ClientData clientData, Proc **procPtrPtr); #endif #ifndef TclOOMakeProcMethod_TCL_DECLARED #define TclOOMakeProcMethod_TCL_DECLARED /* 2 */ -EXTERN Tcl_Method TclOOMakeProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - const char * namePtr, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, - const Tcl_MethodType * typePtr, - ClientData clientData, Proc ** procPtrPtr); +EXTERN Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp, + Class *clsPtr, int flags, Tcl_Obj *nameObj, + const char *namePtr, Tcl_Obj *argsObj, + Tcl_Obj *bodyObj, + const Tcl_MethodType *typePtr, + ClientData clientData, Proc **procPtrPtr); #endif #ifndef TclOONewProcInstanceMethod_TCL_DECLARED #define TclOONewProcInstanceMethod_TCL_DECLARED /* 3 */ -EXTERN Method * TclOONewProcInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - ProcedureMethod ** pmPtrPtr); +EXTERN Method * TclOONewProcInstanceMethod(Tcl_Interp *interp, + Object *oPtr, int flags, Tcl_Obj *nameObj, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + ProcedureMethod **pmPtrPtr); #endif #ifndef TclOONewProcMethod_TCL_DECLARED #define TclOONewProcMethod_TCL_DECLARED /* 4 */ -EXTERN Method * TclOONewProcMethod (Tcl_Interp * interp, - Class * clsPtr, int flags, Tcl_Obj * nameObj, - Tcl_Obj * argsObj, Tcl_Obj * bodyObj, - ProcedureMethod ** pmPtrPtr); +EXTERN Method * TclOONewProcMethod(Tcl_Interp *interp, Class *clsPtr, + int flags, Tcl_Obj *nameObj, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + ProcedureMethod **pmPtrPtr); #endif #ifndef TclOOObjectCmdCore_TCL_DECLARED #define TclOOObjectCmdCore_TCL_DECLARED /* 5 */ -EXTERN int TclOOObjectCmdCore (Object * oPtr, - Tcl_Interp * interp, int objc, - Tcl_Obj *const * objv, int publicOnly, - Class * startCls); +EXTERN int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp, + int objc, Tcl_Obj *const *objv, + int publicOnly, Class *startCls); #endif #ifndef TclOOIsReachable_TCL_DECLARED #define TclOOIsReachable_TCL_DECLARED /* 6 */ -EXTERN int TclOOIsReachable (Class * targetPtr, - Class * startPtr); +EXTERN int TclOOIsReachable(Class *targetPtr, Class *startPtr); #endif #ifndef TclOONewForwardMethod_TCL_DECLARED #define TclOONewForwardMethod_TCL_DECLARED /* 7 */ -EXTERN Method * TclOONewForwardMethod (Tcl_Interp * interp, - Class * clsPtr, int isPublic, - Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +EXTERN Method * TclOONewForwardMethod(Tcl_Interp *interp, + Class *clsPtr, int isPublic, + Tcl_Obj *nameObj, Tcl_Obj *prefixObj); #endif #ifndef TclOONewForwardInstanceMethod_TCL_DECLARED #define TclOONewForwardInstanceMethod_TCL_DECLARED /* 8 */ -EXTERN Method * TclOONewForwardInstanceMethod (Tcl_Interp * interp, - Object * oPtr, int isPublic, - Tcl_Obj * nameObj, Tcl_Obj * prefixObj); +EXTERN Method * TclOONewForwardInstanceMethod(Tcl_Interp *interp, + Object *oPtr, int isPublic, Tcl_Obj *nameObj, + Tcl_Obj *prefixObj); #endif #ifndef TclOONewProcInstanceMethodEx_TCL_DECLARED #define TclOONewProcInstanceMethodEx_TCL_DECLARED /* 9 */ -EXTERN Tcl_Method TclOONewProcInstanceMethodEx (Tcl_Interp * interp, +EXTERN Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, - void ** internalTokenPtr); + Tcl_Obj *nameObj, Tcl_Obj *argsObj, + Tcl_Obj *bodyObj, int flags, + void **internalTokenPtr); #endif #ifndef TclOONewProcMethodEx_TCL_DECLARED #define TclOONewProcMethodEx_TCL_DECLARED /* 10 */ -EXTERN Tcl_Method TclOONewProcMethodEx (Tcl_Interp * interp, +EXTERN Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, - Tcl_Obj * nameObj, Tcl_Obj * argsObj, - Tcl_Obj * bodyObj, int flags, - void ** internalTokenPtr); + Tcl_Obj *nameObj, Tcl_Obj *argsObj, + Tcl_Obj *bodyObj, int flags, + void **internalTokenPtr); #endif #ifndef TclOOInvokeObject_TCL_DECLARED #define TclOOInvokeObject_TCL_DECLARED /* 11 */ -EXTERN int TclOOInvokeObject (Tcl_Interp * interp, +EXTERN int TclOOInvokeObject(Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, - Tcl_Obj *const * objv); + Tcl_Obj *const *objv); #endif #ifndef TclOOObjectSetFilters_TCL_DECLARED #define TclOOObjectSetFilters_TCL_DECLARED /* 12 */ -EXTERN void TclOOObjectSetFilters (Object * oPtr, int numFilters, - Tcl_Obj *const * filters); +EXTERN void TclOOObjectSetFilters(Object *oPtr, int numFilters, + Tcl_Obj *const *filters); #endif #ifndef TclOOClassSetFilters_TCL_DECLARED #define TclOOClassSetFilters_TCL_DECLARED /* 13 */ -EXTERN void TclOOClassSetFilters (Tcl_Interp * interp, - Class * classPtr, int numFilters, - Tcl_Obj *const * filters); +EXTERN void TclOOClassSetFilters(Tcl_Interp *interp, + Class *classPtr, int numFilters, + Tcl_Obj *const *filters); #endif #ifndef TclOOObjectSetMixins_TCL_DECLARED #define TclOOObjectSetMixins_TCL_DECLARED /* 14 */ -EXTERN void TclOOObjectSetMixins (Object * oPtr, int numMixins, - Class *const * mixins); +EXTERN void TclOOObjectSetMixins(Object *oPtr, int numMixins, + Class *const *mixins); #endif #ifndef TclOOClassSetMixins_TCL_DECLARED #define TclOOClassSetMixins_TCL_DECLARED /* 15 */ -EXTERN void TclOOClassSetMixins (Tcl_Interp * interp, - Class * classPtr, int numMixins, - Class *const * mixins); +EXTERN void TclOOClassSetMixins(Tcl_Interp *interp, + Class *classPtr, int numMixins, + Class *const *mixins); #endif typedef struct TclOOIntStubs { diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index bcd8fc3..1dddbaf 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.35 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.36 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -51,32 +51,32 @@ #ifndef Tcl_WinUtfToTChar_TCL_DECLARED #define Tcl_WinUtfToTChar_TCL_DECLARED /* 0 */ -EXTERN TCHAR * Tcl_WinUtfToTChar (const char * str, int len, - Tcl_DString * dsPtr); +EXTERN TCHAR * Tcl_WinUtfToTChar(const char *str, int len, + Tcl_DString *dsPtr); #endif #ifndef Tcl_WinTCharToUtf_TCL_DECLARED #define Tcl_WinTCharToUtf_TCL_DECLARED /* 1 */ -EXTERN char * Tcl_WinTCharToUtf (const TCHAR * str, int len, - Tcl_DString * dsPtr); +EXTERN char * Tcl_WinTCharToUtf(const TCHAR *str, int len, + Tcl_DString *dsPtr); #endif #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED /* 0 */ -EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, - const char * bundleName, int hasResourceFile, - int maxPathLen, char * libraryPath); +EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp, + const char *bundleName, int hasResourceFile, + int maxPathLen, char *libraryPath); #endif #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED /* 1 */ -EXTERN int Tcl_MacOSXOpenVersionedBundleResources ( - Tcl_Interp * interp, const char * bundleName, - const char * bundleVersion, +EXTERN int Tcl_MacOSXOpenVersionedBundleResources( + Tcl_Interp *interp, const char *bundleName, + const char *bundleVersion, int hasResourceFile, int maxPathLen, - char * libraryPath); + char *libraryPath); #endif #endif /* MACOSX */ diff --git a/generic/tclResolve.c b/generic/tclResolve.c index 8455793..7a86427 100644 --- a/generic/tclResolve.c +++ b/generic/tclResolve.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResolve.c,v 1.11 2009/07/15 13:17:19 dkf Exp $ + * RCS: @(#) $Id: tclResolve.c,v 1.12 2010/01/29 16:17:20 nijtmans Exp $ */ #include "tclInt.h" @@ -294,7 +294,7 @@ BumpCmdRefEpochs( * * Command resolution is handled by a function of the following type: * - * typedef int (*Tcl_ResolveCmdProc)(Tcl_Interp *interp, + * typedef int (Tcl_ResolveCmdProc)(Tcl_Interp *interp, * const char *name, Tcl_Namespace *context, * int flags, Tcl_Command *rPtr); * @@ -309,7 +309,7 @@ BumpCmdRefEpochs( * Variable resolution is handled by two functions. The first is called * whenever a variable needs to be resolved at compile time: * - * typedef int (*Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp, + * typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp, * const char *name, Tcl_Namespace *context, * Tcl_ResolvedVarInfo *rPtr); * @@ -325,7 +325,7 @@ BumpCmdRefEpochs( * the variable may be requested via Tcl_FindNamespaceVar.) This function * has the following type: * - * typedef int (*Tcl_ResolveVarProc)(Tcl_Interp *interp, + * typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, * const char *name, Tcl_Namespace *context, * int flags, Tcl_Var *rPtr); * diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls index ec91aad..a170de8 100644 --- a/generic/tclTomMath.decls +++ b/generic/tclTomMath.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclTomMath.decls,v 1.5 2008/10/22 20:23:59 nijtmans Exp $ +# RCS: @(#) $Id: tclTomMath.decls,v 1.6 2010/01/29 16:17:20 nijtmans Exp $ library tcl @@ -32,184 +32,184 @@ declare 1 generic { } declare 2 generic { - int TclBN_mp_add(mp_int* a, mp_int* b, mp_int* c) + int TclBN_mp_add(mp_int *a, mp_int *b, mp_int *c) } declare 3 generic { - int TclBN_mp_add_d(mp_int* a, mp_digit b, mp_int* c) + int TclBN_mp_add_d(mp_int *a, mp_digit b, mp_int *c) } declare 4 generic { - int TclBN_mp_and(mp_int* a, mp_int* b, mp_int* c) + int TclBN_mp_and(mp_int *a, mp_int *b, mp_int *c) } declare 5 generic { - void TclBN_mp_clamp(mp_int* a) + void TclBN_mp_clamp(mp_int *a) } declare 6 generic { - void TclBN_mp_clear(mp_int* a) + void TclBN_mp_clear(mp_int *a) } declare 7 generic { - void TclBN_mp_clear_multi(mp_int* a, ...) + void TclBN_mp_clear_multi(mp_int *a, ...) } declare 8 generic { - int TclBN_mp_cmp(mp_int* a, mp_int* b) + int TclBN_mp_cmp(mp_int *a, mp_int *b) } declare 9 generic { - int TclBN_mp_cmp_d(mp_int* a, mp_digit b) + int TclBN_mp_cmp_d(mp_int *a, mp_digit b) } declare 10 generic { - int TclBN_mp_cmp_mag(mp_int* a, mp_int* b) + int TclBN_mp_cmp_mag(mp_int *a, mp_int *b) } declare 11 generic { - int TclBN_mp_copy(mp_int* a, mp_int* b) + int TclBN_mp_copy(mp_int *a, mp_int *b) } declare 12 generic { - int TclBN_mp_count_bits(mp_int* a) + int TclBN_mp_count_bits(mp_int *a) } declare 13 generic { - int TclBN_mp_div(mp_int* a, mp_int* b, mp_int* q, mp_int* r) + int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q, mp_int *r) } declare 14 generic { - int TclBN_mp_div_d(mp_int* a, mp_digit b, mp_int* q, mp_digit* r) + int TclBN_mp_div_d(mp_int *a, mp_digit b, mp_int *q, mp_digit *r) } declare 15 generic { - int TclBN_mp_div_2(mp_int* a, mp_int* q) + int TclBN_mp_div_2(mp_int *a, mp_int *q) } declare 16 generic { - int TclBN_mp_div_2d(mp_int* a, int b, mp_int* q, mp_int* r) + int TclBN_mp_div_2d(mp_int *a, int b, mp_int *q, mp_int *r) } declare 17 generic { - int TclBN_mp_div_3(mp_int* a, mp_int* q, mp_digit* r) + int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit *r) } declare 18 generic { - void TclBN_mp_exch(mp_int* a, mp_int* b) + void TclBN_mp_exch(mp_int *a, mp_int *b) } declare 19 generic { - int TclBN_mp_expt_d(mp_int* a, mp_digit b, mp_int* c) + int TclBN_mp_expt_d(mp_int *a, mp_digit b, mp_int *c) } declare 20 generic { - int TclBN_mp_grow(mp_int* a, int size) + int TclBN_mp_grow(mp_int *a, int size) } declare 21 generic { - int TclBN_mp_init(mp_int* a) + int TclBN_mp_init(mp_int *a) } declare 22 generic { - int TclBN_mp_init_copy(mp_int * a, mp_int* b) + int TclBN_mp_init_copy(mp_int *a, mp_int *b) } declare 23 generic { - int TclBN_mp_init_multi(mp_int* a, ...) + int TclBN_mp_init_multi(mp_int *a, ...) } declare 24 generic { - int TclBN_mp_init_set(mp_int* a, mp_digit b) + int TclBN_mp_init_set(mp_int *a, mp_digit b) } declare 25 generic { - int TclBN_mp_init_size(mp_int* a, int size) + int TclBN_mp_init_size(mp_int *a, int size) } declare 26 generic { - int TclBN_mp_lshd(mp_int* a, int shift) + int TclBN_mp_lshd(mp_int *a, int shift) } declare 27 generic { - int TclBN_mp_mod(mp_int* a, mp_int* b, mp_int* r) + int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r) } declare 28 generic { - int TclBN_mp_mod_2d(mp_int* a, int b, mp_int* r) + int TclBN_mp_mod_2d(mp_int *a, int b, mp_int *r) } declare 29 generic { - int TclBN_mp_mul(mp_int* a, mp_int* b, mp_int* p) + int TclBN_mp_mul(mp_int *a, mp_int *b, mp_int *p) } declare 30 generic { - int TclBN_mp_mul_d(mp_int* a, mp_digit b, mp_int* p) + int TclBN_mp_mul_d(mp_int *a, mp_digit b, mp_int *p) } declare 31 generic { - int TclBN_mp_mul_2(mp_int* a, mp_int* p) + int TclBN_mp_mul_2(mp_int *a, mp_int *p) } declare 32 generic { - int TclBN_mp_mul_2d(mp_int* a, int d, mp_int* p) + int TclBN_mp_mul_2d(mp_int *a, int d, mp_int *p) } declare 33 generic { - int TclBN_mp_neg(mp_int* a, mp_int* b) + int TclBN_mp_neg(mp_int *a, mp_int *b) } declare 34 generic { - int TclBN_mp_or(mp_int* a, mp_int* b, mp_int* c) + int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c) } declare 35 generic { - int TclBN_mp_radix_size(mp_int* a, int radix, int* size) + int TclBN_mp_radix_size(mp_int *a, int radix, int *size) } declare 36 generic { - int TclBN_mp_read_radix(mp_int* a, const char* str, int radix) + int TclBN_mp_read_radix(mp_int *a, const char *str, int radix) } declare 37 generic { - void TclBN_mp_rshd(mp_int * a, int shift) + void TclBN_mp_rshd(mp_int *a, int shift) } declare 38 generic { - int TclBN_mp_shrink(mp_int* a) + int TclBN_mp_shrink(mp_int *a) } declare 39 generic { - void TclBN_mp_set(mp_int* a, mp_digit b) + void TclBN_mp_set(mp_int *a, mp_digit b) } declare 40 generic { - int TclBN_mp_sqr(mp_int* a, mp_int* b) + int TclBN_mp_sqr(mp_int *a, mp_int *b) } declare 41 generic { - int TclBN_mp_sqrt(mp_int* a, mp_int* b) + int TclBN_mp_sqrt(mp_int *a, mp_int *b) } declare 42 generic { - int TclBN_mp_sub(mp_int* a, mp_int* b, mp_int* c) + int TclBN_mp_sub(mp_int *a, mp_int *b, mp_int *c) } declare 43 generic { - int TclBN_mp_sub_d(mp_int* a, mp_digit b, mp_int* c) + int TclBN_mp_sub_d(mp_int *a, mp_digit b, mp_int *c) } declare 44 generic { - int TclBN_mp_to_unsigned_bin(mp_int* a, unsigned char* b) + int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char *b) } declare 45 generic { - int TclBN_mp_to_unsigned_bin_n(mp_int* a, unsigned char* b, - unsigned long* outlen) + int TclBN_mp_to_unsigned_bin_n(mp_int *a, unsigned char *b, + unsigned long *outlen) } declare 46 generic { - int TclBN_mp_toradix_n(mp_int* a, char* str, int radix, int maxlen) + int TclBN_mp_toradix_n(mp_int *a, char *str, int radix, int maxlen) } declare 47 generic { - int TclBN_mp_unsigned_bin_size(mp_int* a) + int TclBN_mp_unsigned_bin_size(mp_int *a) } declare 48 generic { - int TclBN_mp_xor(mp_int* a, mp_int* b, mp_int* c) + int TclBN_mp_xor(mp_int *a, mp_int *b, mp_int *c) } declare 49 generic { - void TclBN_mp_zero(mp_int* a) + void TclBN_mp_zero(mp_int *a) } # internal routines to libtommath - should not be called but must be # exported to accommodate the "tommath" extension declare 50 generic { - void TclBN_reverse(unsigned char* s, int len) + void TclBN_reverse(unsigned char *s, int len) } declare 51 generic { int TclBN_fast_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs) } declare 52 generic { - int TclBN_fast_s_mp_sqr(mp_int* a, mp_int* b) + int TclBN_fast_s_mp_sqr(mp_int *a, mp_int *b) } declare 53 generic { - int TclBN_mp_karatsuba_mul(mp_int* a, mp_int* b, mp_int* c) + int TclBN_mp_karatsuba_mul(mp_int *a, mp_int *b, mp_int *c) } declare 54 generic { - int TclBN_mp_karatsuba_sqr(mp_int* a, mp_int* b) + int TclBN_mp_karatsuba_sqr(mp_int *a, mp_int *b) } declare 55 generic { - int TclBN_mp_toom_mul(mp_int* a, mp_int* b, mp_int* c) + int TclBN_mp_toom_mul(mp_int *a, mp_int *b, mp_int *c) } declare 56 generic { - int TclBN_mp_toom_sqr(mp_int* a, mp_int* b) + int TclBN_mp_toom_sqr(mp_int *a, mp_int *b) } declare 57 generic { - int TclBN_s_mp_add(mp_int* a, mp_int* b, mp_int* c) + int TclBN_s_mp_add(mp_int *a, mp_int *b, mp_int *c) } declare 58 generic { - int TclBN_s_mp_mul_digs(mp_int* a, mp_int* b, mp_int* c, int digs) + int TclBN_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs) } declare 59 generic { - int TclBN_s_mp_sqr(mp_int* a, mp_int* b) + int TclBN_s_mp_sqr(mp_int *a, mp_int *b) } declare 60 generic { - int TclBN_s_mp_sub(mp_int* a, mp_int* b, mp_int* c) + int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c) } diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 68521ca..76f6b20 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.9 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.10 2010/01/29 16:17:20 nijtmans Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -140,317 +140,316 @@ #ifndef TclBN_epoch_TCL_DECLARED #define TclBN_epoch_TCL_DECLARED /* 0 */ -EXTERN int TclBN_epoch (void); +EXTERN int TclBN_epoch(void); #endif #ifndef TclBN_revision_TCL_DECLARED #define TclBN_revision_TCL_DECLARED /* 1 */ -EXTERN int TclBN_revision (void); +EXTERN int TclBN_revision(void); #endif #ifndef TclBN_mp_add_TCL_DECLARED #define TclBN_mp_add_TCL_DECLARED /* 2 */ -EXTERN int TclBN_mp_add (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_mp_add(mp_int *a, mp_int *b, mp_int *c); #endif #ifndef TclBN_mp_add_d_TCL_DECLARED #define TclBN_mp_add_d_TCL_DECLARED /* 3 */ -EXTERN int TclBN_mp_add_d (mp_int* a, mp_digit b, mp_int* c); +EXTERN int TclBN_mp_add_d(mp_int *a, mp_digit b, mp_int *c); #endif #ifndef TclBN_mp_and_TCL_DECLARED #define TclBN_mp_and_TCL_DECLARED /* 4 */ -EXTERN int TclBN_mp_and (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_mp_and(mp_int *a, mp_int *b, mp_int *c); #endif #ifndef TclBN_mp_clamp_TCL_DECLARED #define TclBN_mp_clamp_TCL_DECLARED /* 5 */ -EXTERN void TclBN_mp_clamp (mp_int* a); +EXTERN void TclBN_mp_clamp(mp_int *a); #endif #ifndef TclBN_mp_clear_TCL_DECLARED #define TclBN_mp_clear_TCL_DECLARED /* 6 */ -EXTERN void TclBN_mp_clear (mp_int* a); +EXTERN void TclBN_mp_clear(mp_int *a); #endif #ifndef TclBN_mp_clear_multi_TCL_DECLARED #define TclBN_mp_clear_multi_TCL_DECLARED /* 7 */ -EXTERN void TclBN_mp_clear_multi (mp_int* a, ...); +EXTERN void TclBN_mp_clear_multi(mp_int *a, ...); #endif #ifndef TclBN_mp_cmp_TCL_DECLARED #define TclBN_mp_cmp_TCL_DECLARED /* 8 */ -EXTERN int TclBN_mp_cmp (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_cmp(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_cmp_d_TCL_DECLARED #define TclBN_mp_cmp_d_TCL_DECLARED /* 9 */ -EXTERN int TclBN_mp_cmp_d (mp_int* a, mp_digit b); +EXTERN int TclBN_mp_cmp_d(mp_int *a, mp_digit b); #endif #ifndef TclBN_mp_cmp_mag_TCL_DECLARED #define TclBN_mp_cmp_mag_TCL_DECLARED /* 10 */ -EXTERN int TclBN_mp_cmp_mag (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_cmp_mag(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_copy_TCL_DECLARED #define TclBN_mp_copy_TCL_DECLARED /* 11 */ -EXTERN int TclBN_mp_copy (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_copy(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_count_bits_TCL_DECLARED #define TclBN_mp_count_bits_TCL_DECLARED /* 12 */ -EXTERN int TclBN_mp_count_bits (mp_int* a); +EXTERN int TclBN_mp_count_bits(mp_int *a); #endif #ifndef TclBN_mp_div_TCL_DECLARED #define TclBN_mp_div_TCL_DECLARED /* 13 */ -EXTERN int TclBN_mp_div (mp_int* a, mp_int* b, mp_int* q, - mp_int* r); +EXTERN int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q, + mp_int *r); #endif #ifndef TclBN_mp_div_d_TCL_DECLARED #define TclBN_mp_div_d_TCL_DECLARED /* 14 */ -EXTERN int TclBN_mp_div_d (mp_int* a, mp_digit b, mp_int* q, - mp_digit* r); +EXTERN int TclBN_mp_div_d(mp_int *a, mp_digit b, mp_int *q, + mp_digit*r); #endif #ifndef TclBN_mp_div_2_TCL_DECLARED #define TclBN_mp_div_2_TCL_DECLARED /* 15 */ -EXTERN int TclBN_mp_div_2 (mp_int* a, mp_int* q); +EXTERN int TclBN_mp_div_2(mp_int *a, mp_int *q); #endif #ifndef TclBN_mp_div_2d_TCL_DECLARED #define TclBN_mp_div_2d_TCL_DECLARED /* 16 */ -EXTERN int TclBN_mp_div_2d (mp_int* a, int b, mp_int* q, - mp_int* r); +EXTERN int TclBN_mp_div_2d(mp_int *a, int b, mp_int *q, + mp_int *r); #endif #ifndef TclBN_mp_div_3_TCL_DECLARED #define TclBN_mp_div_3_TCL_DECLARED /* 17 */ -EXTERN int TclBN_mp_div_3 (mp_int* a, mp_int* q, mp_digit* r); +EXTERN int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit*r); #endif #ifndef TclBN_mp_exch_TCL_DECLARED #define TclBN_mp_exch_TCL_DECLARED /* 18 */ -EXTERN void TclBN_mp_exch (mp_int* a, mp_int* b); +EXTERN void TclBN_mp_exch(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_expt_d_TCL_DECLARED #define TclBN_mp_expt_d_TCL_DECLARED /* 19 */ -EXTERN int TclBN_mp_expt_d (mp_int* a, mp_digit b, mp_int* c); +EXTERN int TclBN_mp_expt_d(mp_int *a, mp_digit b, mp_int *c); #endif #ifndef TclBN_mp_grow_TCL_DECLARED #define TclBN_mp_grow_TCL_DECLARED /* 20 */ -EXTERN int TclBN_mp_grow (mp_int* a, int size); +EXTERN int TclBN_mp_grow(mp_int *a, int size); #endif #ifndef TclBN_mp_init_TCL_DECLARED #define TclBN_mp_init_TCL_DECLARED /* 21 */ -EXTERN int TclBN_mp_init (mp_int* a); +EXTERN int TclBN_mp_init(mp_int *a); #endif #ifndef TclBN_mp_init_copy_TCL_DECLARED #define TclBN_mp_init_copy_TCL_DECLARED /* 22 */ -EXTERN int TclBN_mp_init_copy (mp_int * a, mp_int* b); +EXTERN int TclBN_mp_init_copy(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_init_multi_TCL_DECLARED #define TclBN_mp_init_multi_TCL_DECLARED /* 23 */ -EXTERN int TclBN_mp_init_multi (mp_int* a, ...); +EXTERN int TclBN_mp_init_multi(mp_int *a, ...); #endif #ifndef TclBN_mp_init_set_TCL_DECLARED #define TclBN_mp_init_set_TCL_DECLARED /* 24 */ -EXTERN int TclBN_mp_init_set (mp_int* a, mp_digit b); +EXTERN int TclBN_mp_init_set(mp_int *a, mp_digit b); #endif #ifndef TclBN_mp_init_size_TCL_DECLARED #define TclBN_mp_init_size_TCL_DECLARED /* 25 */ -EXTERN int TclBN_mp_init_size (mp_int* a, int size); +EXTERN int TclBN_mp_init_size(mp_int *a, int size); #endif #ifndef TclBN_mp_lshd_TCL_DECLARED #define TclBN_mp_lshd_TCL_DECLARED /* 26 */ -EXTERN int TclBN_mp_lshd (mp_int* a, int shift); +EXTERN int TclBN_mp_lshd(mp_int *a, int shift); #endif #ifndef TclBN_mp_mod_TCL_DECLARED #define TclBN_mp_mod_TCL_DECLARED /* 27 */ -EXTERN int TclBN_mp_mod (mp_int* a, mp_int* b, mp_int* r); +EXTERN int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r); #endif #ifndef TclBN_mp_mod_2d_TCL_DECLARED #define TclBN_mp_mod_2d_TCL_DECLARED /* 28 */ -EXTERN int TclBN_mp_mod_2d (mp_int* a, int b, mp_int* r); +EXTERN int TclBN_mp_mod_2d(mp_int *a, int b, mp_int *r); #endif #ifndef TclBN_mp_mul_TCL_DECLARED #define TclBN_mp_mul_TCL_DECLARED /* 29 */ -EXTERN int TclBN_mp_mul (mp_int* a, mp_int* b, mp_int* p); +EXTERN int TclBN_mp_mul(mp_int *a, mp_int *b, mp_int *p); #endif #ifndef TclBN_mp_mul_d_TCL_DECLARED #define TclBN_mp_mul_d_TCL_DECLARED /* 30 */ -EXTERN int TclBN_mp_mul_d (mp_int* a, mp_digit b, mp_int* p); +EXTERN int TclBN_mp_mul_d(mp_int *a, mp_digit b, mp_int *p); #endif #ifndef TclBN_mp_mul_2_TCL_DECLARED #define TclBN_mp_mul_2_TCL_DECLARED /* 31 */ -EXTERN int TclBN_mp_mul_2 (mp_int* a, mp_int* p); +EXTERN int TclBN_mp_mul_2(mp_int *a, mp_int *p); #endif #ifndef TclBN_mp_mul_2d_TCL_DECLARED #define TclBN_mp_mul_2d_TCL_DECLARED /* 32 */ -EXTERN int TclBN_mp_mul_2d (mp_int* a, int d, mp_int* p); +EXTERN int TclBN_mp_mul_2d(mp_int *a, int d, mp_int *p); #endif #ifndef TclBN_mp_neg_TCL_DECLARED #define TclBN_mp_neg_TCL_DECLARED /* 33 */ -EXTERN int TclBN_mp_neg (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_neg(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_or_TCL_DECLARED #define TclBN_mp_or_TCL_DECLARED /* 34 */ -EXTERN int TclBN_mp_or (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c); #endif #ifndef TclBN_mp_radix_size_TCL_DECLARED #define TclBN_mp_radix_size_TCL_DECLARED /* 35 */ -EXTERN int TclBN_mp_radix_size (mp_int* a, int radix, int* size); +EXTERN int TclBN_mp_radix_size(mp_int *a, int radix, int*size); #endif #ifndef TclBN_mp_read_radix_TCL_DECLARED #define TclBN_mp_read_radix_TCL_DECLARED /* 36 */ -EXTERN int TclBN_mp_read_radix (mp_int* a, const char* str, +EXTERN int TclBN_mp_read_radix(mp_int *a, const char*str, int radix); #endif #ifndef TclBN_mp_rshd_TCL_DECLARED #define TclBN_mp_rshd_TCL_DECLARED /* 37 */ -EXTERN void TclBN_mp_rshd (mp_int * a, int shift); +EXTERN void TclBN_mp_rshd(mp_int *a, int shift); #endif #ifndef TclBN_mp_shrink_TCL_DECLARED #define TclBN_mp_shrink_TCL_DECLARED /* 38 */ -EXTERN int TclBN_mp_shrink (mp_int* a); +EXTERN int TclBN_mp_shrink(mp_int *a); #endif #ifndef TclBN_mp_set_TCL_DECLARED #define TclBN_mp_set_TCL_DECLARED /* 39 */ -EXTERN void TclBN_mp_set (mp_int* a, mp_digit b); +EXTERN void TclBN_mp_set(mp_int *a, mp_digit b); #endif #ifndef TclBN_mp_sqr_TCL_DECLARED #define TclBN_mp_sqr_TCL_DECLARED /* 40 */ -EXTERN int TclBN_mp_sqr (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_sqr(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_sqrt_TCL_DECLARED #define TclBN_mp_sqrt_TCL_DECLARED /* 41 */ -EXTERN int TclBN_mp_sqrt (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_sqrt(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_sub_TCL_DECLARED #define TclBN_mp_sub_TCL_DECLARED /* 42 */ -EXTERN int TclBN_mp_sub (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_mp_sub(mp_int *a, mp_int *b, mp_int *c); #endif #ifndef TclBN_mp_sub_d_TCL_DECLARED #define TclBN_mp_sub_d_TCL_DECLARED /* 43 */ -EXTERN int TclBN_mp_sub_d (mp_int* a, mp_digit b, mp_int* c); +EXTERN int TclBN_mp_sub_d(mp_int *a, mp_digit b, mp_int *c); #endif #ifndef TclBN_mp_to_unsigned_bin_TCL_DECLARED #define TclBN_mp_to_unsigned_bin_TCL_DECLARED /* 44 */ -EXTERN int TclBN_mp_to_unsigned_bin (mp_int* a, - unsigned char* b); +EXTERN int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char*b); #endif #ifndef TclBN_mp_to_unsigned_bin_n_TCL_DECLARED #define TclBN_mp_to_unsigned_bin_n_TCL_DECLARED /* 45 */ -EXTERN int TclBN_mp_to_unsigned_bin_n (mp_int* a, - unsigned char* b, unsigned long* outlen); +EXTERN int TclBN_mp_to_unsigned_bin_n(mp_int *a, + unsigned char*b, unsigned long*outlen); #endif #ifndef TclBN_mp_toradix_n_TCL_DECLARED #define TclBN_mp_toradix_n_TCL_DECLARED /* 46 */ -EXTERN int TclBN_mp_toradix_n (mp_int* a, char* str, int radix, +EXTERN int TclBN_mp_toradix_n(mp_int *a, char*str, int radix, int maxlen); #endif #ifndef TclBN_mp_unsigned_bin_size_TCL_DECLARED #define TclBN_mp_unsigned_bin_size_TCL_DECLARED /* 47 */ -EXTERN int TclBN_mp_unsigned_bin_size (mp_int* a); +EXTERN int TclBN_mp_unsigned_bin_size(mp_int *a); #endif #ifndef TclBN_mp_xor_TCL_DECLARED #define TclBN_mp_xor_TCL_DECLARED /* 48 */ -EXTERN int TclBN_mp_xor (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_mp_xor(mp_int *a, mp_int *b, mp_int *c); #endif #ifndef TclBN_mp_zero_TCL_DECLARED #define TclBN_mp_zero_TCL_DECLARED /* 49 */ -EXTERN void TclBN_mp_zero (mp_int* a); +EXTERN void TclBN_mp_zero(mp_int *a); #endif #ifndef TclBN_reverse_TCL_DECLARED #define TclBN_reverse_TCL_DECLARED /* 50 */ -EXTERN void TclBN_reverse (unsigned char* s, int len); +EXTERN void TclBN_reverse(unsigned char*s, int len); #endif #ifndef TclBN_fast_s_mp_mul_digs_TCL_DECLARED #define TclBN_fast_s_mp_mul_digs_TCL_DECLARED /* 51 */ -EXTERN int TclBN_fast_s_mp_mul_digs (mp_int * a, mp_int * b, - mp_int * c, int digs); +EXTERN int TclBN_fast_s_mp_mul_digs(mp_int *a, mp_int *b, + mp_int *c, int digs); #endif #ifndef TclBN_fast_s_mp_sqr_TCL_DECLARED #define TclBN_fast_s_mp_sqr_TCL_DECLARED /* 52 */ -EXTERN int TclBN_fast_s_mp_sqr (mp_int* a, mp_int* b); +EXTERN int TclBN_fast_s_mp_sqr(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_karatsuba_mul_TCL_DECLARED #define TclBN_mp_karatsuba_mul_TCL_DECLARED /* 53 */ -EXTERN int TclBN_mp_karatsuba_mul (mp_int* a, mp_int* b, - mp_int* c); +EXTERN int TclBN_mp_karatsuba_mul(mp_int *a, mp_int *b, + mp_int *c); #endif #ifndef TclBN_mp_karatsuba_sqr_TCL_DECLARED #define TclBN_mp_karatsuba_sqr_TCL_DECLARED /* 54 */ -EXTERN int TclBN_mp_karatsuba_sqr (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_karatsuba_sqr(mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_toom_mul_TCL_DECLARED #define TclBN_mp_toom_mul_TCL_DECLARED /* 55 */ -EXTERN int TclBN_mp_toom_mul (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_mp_toom_mul(mp_int *a, mp_int *b, mp_int *c); #endif #ifndef TclBN_mp_toom_sqr_TCL_DECLARED #define TclBN_mp_toom_sqr_TCL_DECLARED /* 56 */ -EXTERN int TclBN_mp_toom_sqr (mp_int* a, mp_int* b); +EXTERN int TclBN_mp_toom_sqr(mp_int *a, mp_int *b); #endif #ifndef TclBN_s_mp_add_TCL_DECLARED #define TclBN_s_mp_add_TCL_DECLARED /* 57 */ -EXTERN int TclBN_s_mp_add (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_s_mp_add(mp_int *a, mp_int *b, mp_int *c); #endif #ifndef TclBN_s_mp_mul_digs_TCL_DECLARED #define TclBN_s_mp_mul_digs_TCL_DECLARED /* 58 */ -EXTERN int TclBN_s_mp_mul_digs (mp_int* a, mp_int* b, mp_int* c, +EXTERN int TclBN_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs); #endif #ifndef TclBN_s_mp_sqr_TCL_DECLARED #define TclBN_s_mp_sqr_TCL_DECLARED /* 59 */ -EXTERN int TclBN_s_mp_sqr (mp_int* a, mp_int* b); +EXTERN int TclBN_s_mp_sqr(mp_int *a, mp_int *b); #endif #ifndef TclBN_s_mp_sub_TCL_DECLARED #define TclBN_s_mp_sub_TCL_DECLARED /* 60 */ -EXTERN int TclBN_s_mp_sub (mp_int* a, mp_int* b, mp_int* c); +EXTERN int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c); #endif typedef struct TclTomMathStubs { @@ -459,65 +458,65 @@ typedef struct TclTomMathStubs { int (*tclBN_epoch) (void); /* 0 */ int (*tclBN_revision) (void); /* 1 */ - int (*tclBN_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 2 */ - int (*tclBN_mp_add_d) (mp_int* a, mp_digit b, mp_int* c); /* 3 */ - int (*tclBN_mp_and) (mp_int* a, mp_int* b, mp_int* c); /* 4 */ - void (*tclBN_mp_clamp) (mp_int* a); /* 5 */ - void (*tclBN_mp_clear) (mp_int* a); /* 6 */ - void (*tclBN_mp_clear_multi) (mp_int* a, ...); /* 7 */ - int (*tclBN_mp_cmp) (mp_int* a, mp_int* b); /* 8 */ - int (*tclBN_mp_cmp_d) (mp_int* a, mp_digit b); /* 9 */ - int (*tclBN_mp_cmp_mag) (mp_int* a, mp_int* b); /* 10 */ - int (*tclBN_mp_copy) (mp_int* a, mp_int* b); /* 11 */ - int (*tclBN_mp_count_bits) (mp_int* a); /* 12 */ - int (*tclBN_mp_div) (mp_int* a, mp_int* b, mp_int* q, mp_int* r); /* 13 */ - int (*tclBN_mp_div_d) (mp_int* a, mp_digit b, mp_int* q, mp_digit* r); /* 14 */ - int (*tclBN_mp_div_2) (mp_int* a, mp_int* q); /* 15 */ - int (*tclBN_mp_div_2d) (mp_int* a, int b, mp_int* q, mp_int* r); /* 16 */ - int (*tclBN_mp_div_3) (mp_int* a, mp_int* q, mp_digit* r); /* 17 */ - void (*tclBN_mp_exch) (mp_int* a, mp_int* b); /* 18 */ - int (*tclBN_mp_expt_d) (mp_int* a, mp_digit b, mp_int* c); /* 19 */ - int (*tclBN_mp_grow) (mp_int* a, int size); /* 20 */ - int (*tclBN_mp_init) (mp_int* a); /* 21 */ - int (*tclBN_mp_init_copy) (mp_int * a, mp_int* b); /* 22 */ - int (*tclBN_mp_init_multi) (mp_int* a, ...); /* 23 */ - int (*tclBN_mp_init_set) (mp_int* a, mp_digit b); /* 24 */ - int (*tclBN_mp_init_size) (mp_int* a, int size); /* 25 */ - int (*tclBN_mp_lshd) (mp_int* a, int shift); /* 26 */ - int (*tclBN_mp_mod) (mp_int* a, mp_int* b, mp_int* r); /* 27 */ - int (*tclBN_mp_mod_2d) (mp_int* a, int b, mp_int* r); /* 28 */ - int (*tclBN_mp_mul) (mp_int* a, mp_int* b, mp_int* p); /* 29 */ - int (*tclBN_mp_mul_d) (mp_int* a, mp_digit b, mp_int* p); /* 30 */ - int (*tclBN_mp_mul_2) (mp_int* a, mp_int* p); /* 31 */ - int (*tclBN_mp_mul_2d) (mp_int* a, int d, mp_int* p); /* 32 */ - int (*tclBN_mp_neg) (mp_int* a, mp_int* b); /* 33 */ - int (*tclBN_mp_or) (mp_int* a, mp_int* b, mp_int* c); /* 34 */ - int (*tclBN_mp_radix_size) (mp_int* a, int radix, int* size); /* 35 */ - int (*tclBN_mp_read_radix) (mp_int* a, const char* str, int radix); /* 36 */ + int (*tclBN_mp_add) (mp_int * a, mp_int * b, mp_int * c); /* 2 */ + int (*tclBN_mp_add_d) (mp_int * a, mp_digit b, mp_int * c); /* 3 */ + int (*tclBN_mp_and) (mp_int * a, mp_int * b, mp_int * c); /* 4 */ + void (*tclBN_mp_clamp) (mp_int * a); /* 5 */ + void (*tclBN_mp_clear) (mp_int * a); /* 6 */ + void (*tclBN_mp_clear_multi) (mp_int * a, ...); /* 7 */ + int (*tclBN_mp_cmp) (mp_int * a, mp_int * b); /* 8 */ + int (*tclBN_mp_cmp_d) (mp_int * a, mp_digit b); /* 9 */ + int (*tclBN_mp_cmp_mag) (mp_int * a, mp_int * b); /* 10 */ + int (*tclBN_mp_copy) (mp_int * a, mp_int * b); /* 11 */ + int (*tclBN_mp_count_bits) (mp_int * a); /* 12 */ + int (*tclBN_mp_div) (mp_int * a, mp_int * b, mp_int * q, mp_int * r); /* 13 */ + int (*tclBN_mp_div_d) (mp_int * a, mp_digit b, mp_int * q, mp_digit* r); /* 14 */ + int (*tclBN_mp_div_2) (mp_int * a, mp_int * q); /* 15 */ + int (*tclBN_mp_div_2d) (mp_int * a, int b, mp_int * q, mp_int * r); /* 16 */ + int (*tclBN_mp_div_3) (mp_int * a, mp_int * q, mp_digit* r); /* 17 */ + void (*tclBN_mp_exch) (mp_int * a, mp_int * b); /* 18 */ + int (*tclBN_mp_expt_d) (mp_int * a, mp_digit b, mp_int * c); /* 19 */ + int (*tclBN_mp_grow) (mp_int * a, int size); /* 20 */ + int (*tclBN_mp_init) (mp_int * a); /* 21 */ + int (*tclBN_mp_init_copy) (mp_int * a, mp_int * b); /* 22 */ + int (*tclBN_mp_init_multi) (mp_int * a, ...); /* 23 */ + int (*tclBN_mp_init_set) (mp_int * a, mp_digit b); /* 24 */ + int (*tclBN_mp_init_size) (mp_int * a, int size); /* 25 */ + int (*tclBN_mp_lshd) (mp_int * a, int shift); /* 26 */ + int (*tclBN_mp_mod) (mp_int * a, mp_int * b, mp_int * r); /* 27 */ + int (*tclBN_mp_mod_2d) (mp_int * a, int b, mp_int * r); /* 28 */ + int (*tclBN_mp_mul) (mp_int * a, mp_int * b, mp_int * p); /* 29 */ + int (*tclBN_mp_mul_d) (mp_int * a, mp_digit b, mp_int * p); /* 30 */ + int (*tclBN_mp_mul_2) (mp_int * a, mp_int * p); /* 31 */ + int (*tclBN_mp_mul_2d) (mp_int * a, int d, mp_int * p); /* 32 */ + int (*tclBN_mp_neg) (mp_int * a, mp_int * b); /* 33 */ + int (*tclBN_mp_or) (mp_int * a, mp_int * b, mp_int * c); /* 34 */ + int (*tclBN_mp_radix_size) (mp_int * a, int radix, int* size); /* 35 */ + int (*tclBN_mp_read_radix) (mp_int * a, const char* str, int radix); /* 36 */ void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ - int (*tclBN_mp_shrink) (mp_int* a); /* 38 */ - void (*tclBN_mp_set) (mp_int* a, mp_digit b); /* 39 */ - int (*tclBN_mp_sqr) (mp_int* a, mp_int* b); /* 40 */ - int (*tclBN_mp_sqrt) (mp_int* a, mp_int* b); /* 41 */ - int (*tclBN_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 42 */ - int (*tclBN_mp_sub_d) (mp_int* a, mp_digit b, mp_int* c); /* 43 */ - int (*tclBN_mp_to_unsigned_bin) (mp_int* a, unsigned char* b); /* 44 */ - int (*tclBN_mp_to_unsigned_bin_n) (mp_int* a, unsigned char* b, unsigned long* outlen); /* 45 */ - int (*tclBN_mp_toradix_n) (mp_int* a, char* str, int radix, int maxlen); /* 46 */ - int (*tclBN_mp_unsigned_bin_size) (mp_int* a); /* 47 */ - int (*tclBN_mp_xor) (mp_int* a, mp_int* b, mp_int* c); /* 48 */ - void (*tclBN_mp_zero) (mp_int* a); /* 49 */ + int (*tclBN_mp_shrink) (mp_int * a); /* 38 */ + void (*tclBN_mp_set) (mp_int * a, mp_digit b); /* 39 */ + int (*tclBN_mp_sqr) (mp_int * a, mp_int * b); /* 40 */ + int (*tclBN_mp_sqrt) (mp_int * a, mp_int * b); /* 41 */ + int (*tclBN_mp_sub) (mp_int * a, mp_int * b, mp_int * c); /* 42 */ + int (*tclBN_mp_sub_d) (mp_int * a, mp_digit b, mp_int * c); /* 43 */ + int (*tclBN_mp_to_unsigned_bin) (mp_int * a, unsigned char* b); /* 44 */ + int (*tclBN_mp_to_unsigned_bin_n) (mp_int * a, unsigned char* b, unsigned long* outlen); /* 45 */ + int (*tclBN_mp_toradix_n) (mp_int * a, char* str, int radix, int maxlen); /* 46 */ + int (*tclBN_mp_unsigned_bin_size) (mp_int * a); /* 47 */ + int (*tclBN_mp_xor) (mp_int * a, mp_int * b, mp_int * c); /* 48 */ + void (*tclBN_mp_zero) (mp_int * a); /* 49 */ void (*tclBN_reverse) (unsigned char* s, int len); /* 50 */ int (*tclBN_fast_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 51 */ - int (*tclBN_fast_s_mp_sqr) (mp_int* a, mp_int* b); /* 52 */ - int (*tclBN_mp_karatsuba_mul) (mp_int* a, mp_int* b, mp_int* c); /* 53 */ - int (*tclBN_mp_karatsuba_sqr) (mp_int* a, mp_int* b); /* 54 */ - int (*tclBN_mp_toom_mul) (mp_int* a, mp_int* b, mp_int* c); /* 55 */ - int (*tclBN_mp_toom_sqr) (mp_int* a, mp_int* b); /* 56 */ - int (*tclBN_s_mp_add) (mp_int* a, mp_int* b, mp_int* c); /* 57 */ - int (*tclBN_s_mp_mul_digs) (mp_int* a, mp_int* b, mp_int* c, int digs); /* 58 */ - int (*tclBN_s_mp_sqr) (mp_int* a, mp_int* b); /* 59 */ - int (*tclBN_s_mp_sub) (mp_int* a, mp_int* b, mp_int* c); /* 60 */ + int (*tclBN_fast_s_mp_sqr) (mp_int * a, mp_int * b); /* 52 */ + int (*tclBN_mp_karatsuba_mul) (mp_int * a, mp_int * b, mp_int * c); /* 53 */ + int (*tclBN_mp_karatsuba_sqr) (mp_int * a, mp_int * b); /* 54 */ + int (*tclBN_mp_toom_mul) (mp_int * a, mp_int * b, mp_int * c); /* 55 */ + int (*tclBN_mp_toom_sqr) (mp_int * a, mp_int * b); /* 56 */ + int (*tclBN_s_mp_add) (mp_int * a, mp_int * b, mp_int * c); /* 57 */ + int (*tclBN_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 58 */ + int (*tclBN_s_mp_sqr) (mp_int * a, mp_int * b); /* 59 */ + int (*tclBN_s_mp_sub) (mp_int * a, mp_int * b, mp_int * c); /* 60 */ } TclTomMathStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index cfac1f6..3e33a74 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.33 2009/12/02 20:45:16 nijtmans Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.34 2010/01/29 16:17:21 nijtmans Exp $ package require Tcl 8.4 @@ -425,7 +425,7 @@ proc genStubs::makeDecl {name decl index} { append text ";\n" return $text } - append line "$fname " + append line $fname set arg1 [lindex $args 0] switch -exact $arg1 { @@ -437,8 +437,11 @@ proc genStubs::makeDecl {name decl index} { foreach arg [lrange $args 1 end] { append line $sep set next {} - append next [lindex $arg 0] " " [lindex $arg 1] \ - [lindex $arg 2] + append next [lindex $arg 0] + if {[string index $next end] ne "*"} { + append next " " + } + append next [lindex $arg 1] [lindex $arg 2] if {[string length $line] + [string length $next] \ + $pad > 76} { append text [string trimright $line] \n @@ -455,8 +458,11 @@ proc genStubs::makeDecl {name decl index} { foreach arg $args { append line $sep set next {} - append next [lindex $arg 0] " " [lindex $arg 1] \ - [lindex $arg 2] + append next [lindex $arg 0] + if {[string index $next end] ne "*"} { + append next " " + } + append next [lindex $arg 1] [lindex $arg 2] if {[string length $line] + [string length $next] \ + $pad > 76} { append text [string trimright $line] \n -- cgit v0.12 From 8f9f9d5b20e83bc7ee369eb5a7ba6d66076bf0e6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 29 Jan 2010 19:30:55 +0000 Subject: Reverted Tcl_ThreadDataKey type change, see Bug #2942081 Changed some Tcl_CallFrame fields from "char *" to "void *". This saves unnecessary space on Cray's (and it's simply more correct). --- ChangeLog | 6 ++++++ generic/tcl.h | 23 +++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index dea995b..c4656c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-01-29 Jan Nijtmans + * generic/tcl.h Reverted Tcl_ThreadDataKey type change, + see Bug #2942081 + Changed some Tcl_CallFrame fields from "char *" + to "void *". This saves unnecessary space on + Cray's (and it's simply more correct). + * tools/genStubs.tcl: No longer generate a space after "*" and immediately after a function name, so the format of function definitions in tcl*Decls.h diff --git a/generic/tcl.h b/generic/tcl.h index 21e97cc..48fe4cd 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.299 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.300 2010/01/29 19:30:55 nijtmans Exp $ */ #ifndef _TCL @@ -499,14 +499,13 @@ typedef struct Tcl_LoadHandle_ *Tcl_LoadHandle; typedef struct Tcl_Mutex_ *Tcl_Mutex; typedef struct Tcl_Pid_ *Tcl_Pid; typedef struct Tcl_RegExp_ *Tcl_RegExp; +typedef struct Tcl_ThreadDataKey_ *Tcl_ThreadDataKey; typedef struct Tcl_ThreadId_ *Tcl_ThreadId; typedef struct Tcl_TimerToken_ *Tcl_TimerToken; typedef struct Tcl_Trace_ *Tcl_Trace; typedef struct Tcl_Var_ *Tcl_Var; typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream; -typedef void *Tcl_ThreadDataKey; - /* * Definition of the interface to functions implementing threads. A function * following this definition is given to each call of 'Tcl_CreateThread' and @@ -876,17 +875,17 @@ typedef struct Tcl_CallFrame { Tcl_Namespace *nsPtr; int dummy1; int dummy2; - char *dummy3; - char *dummy4; - char *dummy5; + void *dummy3; + void *dummy4; + void *dummy5; int dummy6; - char *dummy7; - char *dummy8; + void *dummy7; + void *dummy8; int dummy9; - char *dummy10; - char *dummy11; - char *dummy12; - char *dummy13; + void *dummy10; + void *dummy11; + void *dummy12; + void *dummy13; } Tcl_CallFrame; /* -- cgit v0.12 From 1543f6fbfc86e643435f8db696b104c0327f92e7 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 30 Jan 2010 16:33:25 +0000 Subject: Make the [unset] command be bytecode compiled. --- ChangeLog | 60 ++-- generic/tclBasic.c | 4 +- generic/tclCompCmds.c | 128 +++++++- generic/tclCompile.c | 19 +- generic/tclCompile.h | 10 +- generic/tclExecute.c | 820 +++++++++++++++++++++++++++++--------------------- generic/tclInt.h | 12 +- generic/tclVar.c | 72 ++++- 8 files changed, 724 insertions(+), 401 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4656c5..0f7713d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,30 +1,40 @@ +2010-01-30 Donal K. Fellows + + * generic/tclCompile.c (tclInstructionTable): Bytecode instructions + * generic/tclCompCmds.c (TclCompileUnsetCmd): to allow the [unset] + * generic/tclExecute.c (TclExecuteByteCode): command to be compiled + with the compiler being a complete compilation for all compile-time + decidable uses. + + * generic/tclVar.c (TclPtrUnsetVar): Var reference version of the code + to unset a variable. Required for INST_UNSET bytecodes. + 2010-01-29 Jan Nijtmans - * generic/tcl.h Reverted Tcl_ThreadDataKey type change, - see Bug #2942081 - Changed some Tcl_CallFrame fields from "char *" - to "void *". This saves unnecessary space on - Cray's (and it's simply more correct). - - * tools/genStubs.tcl: No longer generate a space after "*" and - immediately after a function name, so the - format of function definitions in tcl*Decls.h - match all other tcl*.h header files. - * doc/ParseArgs.3: Change Tcl_ArgvFuncProc, Tcl_ArgvGenFuncProc - * generic/tcl.h and GetFrameInfoValueProc to be function - * generic/tclInt.h definitions, not pointers, for consistency - * generic/tclOOInt.h with all other Tcl function definitions. - * generic/tclIndexObj.c - * generic/regguts.h: CONST -> const - * generic/tcl.decls Formatting - * generic/tclTomMath.decls Formatting - * generic/tclDecls.h (regenerated) - * generic/tclIntDecls.h - * generic/tclIntPlatDecls.h - * generic/tclOODecls.h - * generic/tclOOIntDecls.h - * generic/tclPlatDecls.h - * generic/tclTomMathDecls.h + * generic/tcl.h: [Bug 2942081]: Reverted Tcl_ThreadDataKey type change + Changed some Tcl_CallFrame fields from "char *" + to "void *". This saves unnecessary space on + Cray's (and it's simply more correct). + + * tools/genStubs.tcl: No longer generate a space after "*" and + immediately after a function name, so the + format of function definitions in tcl*Decls.h + match all other tcl*.h header files. + * doc/ParseArgs.3: Change Tcl_ArgvFuncProc, Tcl_ArgvGenFuncProc + * generic/tcl.h: and GetFrameInfoValueProc to be function + * generic/tclInt.h: definitions, not pointers, for consistency + * generic/tclOOInt.h: with all other Tcl function definitions. + * generic/tclIndexObj.c: + * generic/regguts.h: CONST -> const + * generic/tcl.decls: Formatting + * generic/tclTomMath.decls: Formatting + * generic/tclDecls.h: (regenerated) + * generic/tclIntDecls.h: + * generic/tclIntPlatDecls.h: + * generic/tclOODecls.h: + * generic/tclOOIntDecls.h: + * generic/tclPlatDecls.h: + * generic/tclTomMathDecls.h: 2010-01-28 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 254760d..2612aef 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.438 2010/01/03 20:29:11 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.439 2010/01/30 16:33:25 dkf Exp $ */ #include "tclInt.h" @@ -242,7 +242,7 @@ static const CmdInfo builtInCmds[] = { {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, {"try", Tcl_TryObjCmd, NULL, TclNRTryObjCmd, 1}, - {"unset", Tcl_UnsetObjCmd, NULL, NULL, 1}, + {"unset", Tcl_UnsetObjCmd, TclCompileUnsetCmd, NULL, 1}, {"uplevel", Tcl_UplevelObjCmd, NULL, TclNRUplevelObjCmd, 1}, {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1}, diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 6ec2265..5455e5d 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.157 2009/09/11 20:13:27 dgp Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.158 2010/01/30 16:33:25 dkf Exp $ */ #include "tclInt.h" @@ -27,14 +27,14 @@ */ #define CompileWord(envPtr, tokenPtr, interp, word) \ - if ((tokenPtr)->type == TCL_TOKEN_SIMPLE_WORD) { \ + if ((tokenPtr)->type == TCL_TOKEN_SIMPLE_WORD) { \ TclEmitPush(TclRegisterNewLiteral((envPtr), (tokenPtr)[1].start, \ - (tokenPtr)[1].size), (envPtr)); \ - } else { \ - envPtr->line = mapPtr->loc[eclIndex].line[word]; \ - envPtr->clNext = mapPtr->loc[eclIndex].next[word]; \ + (tokenPtr)[1].size), (envPtr)); \ + } else { \ + envPtr->line = mapPtr->loc[eclIndex].line[word]; \ + envPtr->clNext = mapPtr->loc[eclIndex].next[word]; \ TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ - (envPtr)); \ + (envPtr)); \ } /* @@ -124,13 +124,13 @@ #define DeclareExceptionRange(envPtr, type) \ (TclCreateExceptRange((type), (envPtr))) #define ExceptionRangeStarts(envPtr, index) \ - (((envPtr)->exceptDepth++), \ - ((envPtr)->maxExceptDepth = \ - TclMax((envPtr)->exceptDepth, (envPtr)->maxExceptDepth)), \ + (((envPtr)->exceptDepth++), \ + ((envPtr)->maxExceptDepth = \ + TclMax((envPtr)->exceptDepth, (envPtr)->maxExceptDepth)), \ ((envPtr)->exceptArrayPtr[(index)].codeOffset = CurrentOffset(envPtr))) #define ExceptionRangeEnds(envPtr, index) \ - (((envPtr)->exceptDepth--), \ - ((envPtr)->exceptArrayPtr[(index)].numCodeBytes = \ + (((envPtr)->exceptDepth--), \ + ((envPtr)->exceptArrayPtr[(index)].numCodeBytes = \ CurrentOffset(envPtr) - (envPtr)->exceptArrayPtr[(index)].codeOffset)) #define ExceptionRangeTarget(envPtr, index, targetType) \ ((envPtr)->exceptArrayPtr[(index)].targetType = CurrentOffset(envPtr)) @@ -184,9 +184,9 @@ static void CompileReturnInternal(CompileEnv *envPtr, Tcl_Obj *returnOpts); #define PushVarNameWord(i,v,e,f,l,s,sc,word) \ - PushVarName (i,v,e,f,l,s,sc, \ - mapPtr->loc [eclIndex].line [(word)], \ - mapPtr->loc [eclIndex].next [(word)]) + PushVarName(i,v,e,f,l,s,sc, \ + mapPtr->loc[eclIndex].line[(word)], \ + mapPtr->loc[eclIndex].next[(word)]) /* * Flags bits used by PushVarName. @@ -5019,6 +5019,104 @@ PrintJumptableInfo( /* *---------------------------------------------------------------------- * + * TclCompileUnsetCmd -- + * + * Procedure called to compile the "unset" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "unset" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileUnsetCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *varTokenPtr; + int isScalar, simpleVarName, localIndex, numWords, flags, i; + Tcl_Obj *leadingWord; + DefineLineInformation; /* TIP #280 */ + + numWords = parsePtr->numWords-1; + flags = 1; + varTokenPtr = TokenAfter(parsePtr->tokenPtr); + leadingWord = Tcl_NewObj(); + if (TclWordKnownAtCompileTime(varTokenPtr, leadingWord)) { + int len; + const char *bytes = Tcl_GetStringFromObj(leadingWord, &len); + + if (len == 11 && !strncmp("-nocomplain", bytes, 11)) { + flags = 0; + varTokenPtr = TokenAfter(varTokenPtr); + numWords--; + } else if (len == 2 && !strncmp("--", bytes, 2)) { + varTokenPtr = TokenAfter(varTokenPtr); + numWords--; + } + } else { + /* + * Cannot guarantee that the first word is not '-nocomplain' at + * evaluation with reasonable effort, so spill to interpreted version. + */ + + return TCL_ERROR; + } + TclDecrRefCount(leadingWord); + + for (i=0 ; iflags & VAR_TRACED_READ) #define WriteTraced(varPtr) ((varPtr)->flags & VAR_TRACED_WRITE) +#define UnsetTraced(varPtr) ((varPtr)->flags & VAR_TRACED_UNSET) /* * Bottom of allocated stack holds the NR data @@ -2041,6 +2042,7 @@ TclExecuteByteCode( if (iPtr->execEnvPtr->corPtr) { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + if (!corPtr->base.cmdFramePtr) { /* * First coroutine run, incomplete init: @@ -2167,10 +2169,6 @@ TclExecuteByteCode( */ if ((TAUX.instructionCount++ & ASYNC_CHECK_COUNT_MASK) == 0) { - /* - * Check for asynchronous handlers [Bug 746722]; we do the check every - * ASYNC_CHECK_COUNT_MASK instruction, of the form (2**n-<1). - */ int localResult; if (TclAsyncReady(iPtr)) { @@ -2383,19 +2381,17 @@ TclExecuteByteCode( NEXT_INST_F(1, 0, 1); case INST_OVER: { - int opnd; + int opnd = TclGetUInt4AtPtr(pc+1); - opnd = TclGetUInt4AtPtr(pc+1); objResultPtr = OBJ_AT_DEPTH(opnd); TRACE_WITH_OBJ(("=> "), objResultPtr); NEXT_INST_F(5, 0, 1); } case INST_REVERSE: { - int opnd; Tcl_Obj **a, **b; + int opnd = TclGetUInt4AtPtr(pc+1); - opnd = TclGetUInt4AtPtr(pc+1); a = tosPtr-(opnd-1); b = tosPtr; while (anumLevels++; - Tcl_NRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL); + Tcl_NRAddCallback(interp, NRCommand, NULL,NULL,NULL,NULL); goto doInvocationFromEval; } } @@ -2737,15 +2733,15 @@ TclExecuteByteCode( if (objc) { pcAdjustment = 1; goto doInvocation; - } else { - /* - * Nothing was expanded, return {}. - */ - - TclNewObj(objResultPtr); - NEXT_INST_F(1, 0, 1); } + /* + * Nothing was expanded, return {}. + */ + + TclNewObj(objResultPtr); + NEXT_INST_F(1, 0, 1); + case INST_INVOKE_STK4: objc = TclGetUInt4AtPtr(pc+1); pcAdjustment = 5; @@ -2756,230 +2752,226 @@ TclExecuteByteCode( pcAdjustment = 2; doInvocation: - { - objv = &OBJ_AT_DEPTH(objc-1); - cleanup = objc; + objv = &OBJ_AT_DEPTH(objc-1); + cleanup = objc; doInvocationFromEval: #ifdef TCL_COMPILE_DEBUG - if (tclTraceExec >= 2) { - int i; + if (tclTraceExec >= 2) { + int i; - if (traceInstructions) { - strncpy(cmdNameBuf, TclGetString(objv[0]), 20); - TRACE(("%u => call ", objc)); - } else { - fprintf(stdout, "%d: (%u) invoking ", iPtr->numLevels, - (unsigned)(pc - codePtr->codeStart)); - } - for (i = 0; i < objc; i++) { - TclPrintObject(stdout, objv[i], 15); - fprintf(stdout, " "); - } - fprintf(stdout, "\n"); - fflush(stdout); + if (traceInstructions) { + strncpy(cmdNameBuf, TclGetString(objv[0]), 20); + TRACE(("%u => call ", objc)); + } else { + fprintf(stdout, "%d: (%u) invoking ", iPtr->numLevels, + (unsigned)(pc - codePtr->codeStart)); } + for (i = 0; i < objc; i++) { + TclPrintObject(stdout, objv[i], 15); + fprintf(stdout, " "); + } + fprintf(stdout, "\n"); + fflush(stdout); + } #endif /*TCL_COMPILE_DEBUG*/ - /* - * Finally, let TclEvalObjv handle the command. - * - * TIP #280: Record the last piece of info needed by - * 'TclGetSrcInfoForPc', and push the frame. - */ + /* + * Finally, let TclEvalObjv handle the command. + * + * TIP #280: Record the last piece of info needed by + * 'TclGetSrcInfoForPc', and push the frame. + */ - bcFramePtr->data.tebc.pc = (char *) pc; - iPtr->cmdFramePtr = bcFramePtr; + bcFramePtr->data.tebc.pc = (char *) pc; + iPtr->cmdFramePtr = bcFramePtr; - /* - * Reset the instructionCount variable, since we're about to check - * for async stuff anyway while processing TclEvalObjv - */ + /* + * Reset the instructionCount variable, since we're about to check for + * async stuff anyway while processing TclEvalObjv + */ - TAUX.instructionCount = 1; + TAUX.instructionCount = 1; - TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc, - codePtr, bcFramePtr, pc - codePtr->codeStart); + TclArgumentBCEnter((Tcl_Interp *) iPtr, objv, objc, + codePtr, bcFramePtr, pc - codePtr->codeStart); - DECACHE_STACK_INFO(); + DECACHE_STACK_INFO(); - TRESULT = TclNREvalObjv(interp, objc, objv, - (*pc == INST_EVAL_STK) ? 0 : TCL_EVAL_NOERR, NULL); - TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); - CACHE_STACK_INFO(); + TRESULT = TclNREvalObjv(interp, objc, objv, + (*pc == INST_EVAL_STK) ? 0 : TCL_EVAL_NOERR, NULL); + TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); + CACHE_STACK_INFO(); - if (TOP_CB(interp) != BP->rootPtr) { - NRE_ASSERT(TRESULT == TCL_OK); - pc += pcAdjustment; + if (TOP_CB(interp) != BP->rootPtr) { + NRE_ASSERT(TRESULT == TCL_OK); + pc += pcAdjustment; - nonRecursiveCallSetup: { - TEOV_callback *callbackPtr = TOP_CB(interp); - int type = PTR2INT(callbackPtr->data[0]); - ClientData param = callbackPtr->data[1]; + nonRecursiveCallSetup: + { + TEOV_callback *callbackPtr = TOP_CB(interp); + int type = PTR2INT(callbackPtr->data[0]); + ClientData param = callbackPtr->data[1]; - pcAdjustment = 0; /* silence warning */ + pcAdjustment = 0; /* silence warning */ - NRE_ASSERT(callbackPtr != BP->rootPtr); - NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); + NRE_ASSERT(callbackPtr != BP->rootPtr); + NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); - TOP_CB(interp) = callbackPtr->nextPtr; - TCLNR_FREE(interp, callbackPtr); + TOP_CB(interp) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); - NR_DATA_BURY(); - switch (type) { - case TCL_NR_BC_TYPE: - if (param) { - codePtr = param; - goto nonRecursiveCallStart; - } else { - OBP = BP; - goto resumeCoroutine; - } - break; - case TCL_NR_TAILCALL_TYPE: - /* - * A request to perform a tailcall: just drop this - * bytecode. */ + NR_DATA_BURY(); + switch (type) { + case TCL_NR_BC_TYPE: + if (param) { + codePtr = param; + goto nonRecursiveCallStart; + } else { + OBP = BP; + goto resumeCoroutine; + } + break; + case TCL_NR_TAILCALL_TYPE: + /* + * A request to perform a tailcall: just drop this + * bytecode. + */ #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall request received\n"); - } + if (traceInstructions) { + fprintf(stdout, " Tailcall request received\n"); + } #endif /* TCL_COMPILE_DEBUG */ - iPtr->cmdFramePtr = bcFramePtr->nextPtr; - TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); - - if (catchTop != initCatchTop) { - TclClearTailcall(interp, param); - iPtr->varFramePtr->tailcallPtr = NULL; - TRESULT = TCL_ERROR; - Tcl_SetResult(interp, - "tailcall called from within a catch environment", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "TAILCALL", - "ILLEGAL", NULL); - pc--; - goto checkForCatch; - } - iPtr->varFramePtr->tailcallPtr = param; - TclSpliceTailcall(interp, param); - goto abnormalReturn; - case TCL_NR_YIELD_TYPE: { /* [yield] */ - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - - if (!corPtr) { - Tcl_SetResult(interp, - "yield can only be called in a coroutine", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", - "ILLEGAL_YIELD", NULL); - TRESULT = TCL_ERROR; - pc--; - goto checkForCatch; - } - - NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); - NRE_ASSERT(corPtr->stackLevel != NULL); - NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); - if (corPtr->stackLevel != &TAUX) { - Tcl_SetResult(interp, "cannot yield: C stack busy", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", - "CANT_YIELD", NULL); - TRESULT = TCL_ERROR; - pc--; - goto checkForCatch; - } - - /* - * Mark suspended, save our state and return - */ - - corPtr->stackLevel = NULL; - iPtr->execEnvPtr = corPtr->callerEEPtr; - OBP = *corPtr->callerBPPtr; - goto returnToCaller; + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); + + if (catchTop != initCatchTop) { + TclClearTailcall(interp, param); + iPtr->varFramePtr->tailcallPtr = NULL; + TRESULT = TCL_ERROR; + Tcl_SetResult(interp, + "tailcall called from within a catch environment", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", + NULL); + pc--; + goto checkForCatch; } - default: - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); + iPtr->varFramePtr->tailcallPtr = param; + TclSpliceTailcall(interp, param); + goto abnormalReturn; + case TCL_NR_YIELD_TYPE: { /* [yield] */ + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + + if (!corPtr) { + Tcl_SetResult(interp, + "yield can only be called in a coroutine", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", + "ILLEGAL_YIELD", NULL); + TRESULT = TCL_ERROR; + pc--; + goto checkForCatch; } - } - } - pc += pcAdjustment; + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + NRE_ASSERT(corPtr->stackLevel != NULL); + NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); + if (corPtr->stackLevel != &TAUX) { + Tcl_SetResult(interp, "cannot yield: C stack busy", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", + "CANT_YIELD", NULL); + TRESULT = TCL_ERROR; + pc--; + goto checkForCatch; + } - nonRecursiveCallReturn: + /* + * Mark suspended, save our state and return + */ - if (codePtr->flags & TCL_BYTECODE_RECOMPILE) { - iPtr->flags |= ERR_ALREADY_LOGGED; - codePtr->flags &= ~TCL_BYTECODE_RECOMPILE; + corPtr->stackLevel = NULL; + iPtr->execEnvPtr = corPtr->callerEEPtr; + OBP = *corPtr->callerBPPtr; + goto returnToCaller; + } + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); + } } - NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); - iPtr->cmdFramePtr = bcFramePtr->nextPtr; - TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); + } - /* - * If the CallFrame is marked as tailcalling, keep tailcalling - */ + pc += pcAdjustment; - if (iPtr->varFramePtr->tailcallPtr) { - if (catchTop != initCatchTop) { - TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); - iPtr->varFramePtr->tailcallPtr = NULL; - TRESULT = TCL_ERROR; - Tcl_SetResult(interp, - "tailcall called from within a catch environment", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", - NULL); - pc--; - goto checkForCatch; - } - goto abnormalReturn; - } + nonRecursiveCallReturn: + if (codePtr->flags & TCL_BYTECODE_RECOMPILE) { + iPtr->flags |= ERR_ALREADY_LOGGED; + codePtr->flags &= ~TCL_BYTECODE_RECOMPILE; + } + NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr); + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); + + /* + * If the CallFrame is marked as tailcalling, keep tailcalling + */ - if (iPtr->execEnvPtr->rewind) { + if (iPtr->varFramePtr->tailcallPtr) { + if (catchTop != initCatchTop) { + TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; TRESULT = TCL_ERROR; - goto abnormalReturn; + Tcl_SetResult(interp, + "tailcall called from within a catch environment", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); + pc--; + goto checkForCatch; } + goto abnormalReturn; + } - if (TRESULT == TCL_OK) { - Tcl_Obj *objPtr; + if (iPtr->execEnvPtr->rewind) { + TRESULT = TCL_ERROR; + goto abnormalReturn; + } + + if (TRESULT == TCL_OK) { + Tcl_Obj *objPtr; #ifndef TCL_COMPILE_DEBUG - if (*pc == INST_POP) { - NEXT_INST_V(1, cleanup, 0); - } + if (*pc == INST_POP) { + NEXT_INST_V(1, cleanup, 0); + } #endif - /* - * Push the call's object result and continue execution with - * the next instruction. - */ + /* + * Push the call's object result and continue execution with the + * next instruction. + */ - TRACE_WITH_OBJ(("%u => ... after \"%.20s\": TCL_OK, result=", - objc, cmdNameBuf), Tcl_GetObjResult(interp)); + TRACE_WITH_OBJ(("%u => ... after \"%.20s\": TCL_OK, result=", + objc, cmdNameBuf), Tcl_GetObjResult(interp)); - objResultPtr = Tcl_GetObjResult(interp); + objResultPtr = Tcl_GetObjResult(interp); - /* - * Reset the interp's result to avoid possible duplications of - * large objects [Bug 781585]. We do not call Tcl_ResetResult - * to avoid any side effects caused by the resetting of - * errorInfo and errorCode [Bug 804681], which are not needed - * here. We chose instead to manipulate the interp's object - * result directly. - * - * Note that the result object is now in objResultPtr, it - * keeps the refCount it had in its role of - * iPtr->objResultPtr. - */ + /* + * Reset the interp's result to avoid possible duplications of + * large objects [Bug 781585]. We do not call Tcl_ResetResult to + * avoid any side effects caused by the resetting of errorInfo and + * errorCode [Bug 804681], which are not needed here. We chose + * instead to manipulate the interp's object result directly. + * + * Note that the result object is now in objResultPtr, it keeps + * the refCount it had in its role of iPtr->objResultPtr. + */ - TclNewObj(objPtr); - Tcl_IncrRefCount(objPtr); - iPtr->objResultPtr = objPtr; - NEXT_INST_V(0, cleanup, -1); - } else { - pc--; - goto processExceptionReturn; - } + TclNewObj(objPtr); + Tcl_IncrRefCount(objPtr); + iPtr->objResultPtr = objPtr; + NEXT_INST_V(0, cleanup, -1); + } else { + pc--; + goto processExceptionReturn; } #if TCL_SUPPORT_84_BYTECODE @@ -2992,7 +2984,7 @@ TclExecuteByteCode( */ int opnd, numArgs; - Tcl_Obj *objPtr; + Tcl_Obj *objPtr, *tmpPtr1, *tmpPtr2; opnd = TclGetUInt1AtPtr(pc+1); if ((opnd < 0) || (opnd > LAST_BUILTIN_FUNC)) { @@ -3011,12 +3003,11 @@ TclExecuteByteCode( if (numArgs == 0) { PUSH_OBJECT(objPtr); } else if (numArgs == 1) { - Tcl_Obj *tmpPtr1 = POP_OBJECT(); + tmpPtr1 = POP_OBJECT(); PUSH_OBJECT(objPtr); PUSH_OBJECT(tmpPtr1); Tcl_DecrRefCount(tmpPtr1); } else { - Tcl_Obj *tmpPtr1, *tmpPtr2; tmpPtr2 = POP_OBJECT(); tmpPtr1 = POP_OBJECT(); PUSH_OBJECT(objPtr); @@ -3077,7 +3068,7 @@ TclExecuteByteCode( } /* - * --------------------------------------------------------- + * ----------------------------------------------------------------- * Start of INST_LOAD instructions. * * WARNING: more 'goto' here than your doctor recommended! The different @@ -3086,9 +3077,8 @@ TclExecuteByteCode( */ { int opnd, pcAdjustment; - Tcl_Obj *part1Ptr, *part2Ptr; + Tcl_Obj *objPtr, *part1Ptr, *part2Ptr; Var *varPtr, *arrayPtr; - Tcl_Obj *objPtr; case INST_LOAD_SCALAR1: instLoadScalar1: @@ -3235,11 +3225,7 @@ TclExecuteByteCode( /* * End of INST_LOAD instructions. - * --------------------------------------------------------- - */ - - /* - * --------------------------------------------------------- + * ----------------------------------------------------------------- * Start of INST_STORE and related instructions. * * WARNING: more 'goto' here than your doctor recommended! The different @@ -3249,9 +3235,8 @@ TclExecuteByteCode( { int opnd, pcAdjustment, storeFlags; - Tcl_Obj *part1Ptr, *part2Ptr; + Tcl_Obj *part1Ptr, *part2Ptr, *objPtr, *valuePtr; Var *varPtr, *arrayPtr; - Tcl_Obj *objPtr, *valuePtr; case INST_STORE_ARRAY4: opnd = TclGetUInt4AtPtr(pc+1); @@ -3500,11 +3485,7 @@ TclExecuteByteCode( /* * End of INST_STORE and related instructions. - * --------------------------------------------------------- - */ - - /* - * --------------------------------------------------------- + * ----------------------------------------------------------------- * Start of INST_INCR instructions. * * WARNING: more 'goto' here than your doctor recommended! The different @@ -3515,13 +3496,12 @@ TclExecuteByteCode( /*TODO: Consider more untangling here; merge with LOAD and STORE ? */ { - Tcl_Obj *objPtr, *incrPtr; + Tcl_Obj *objPtr, *incrPtr, *part1Ptr, *part2Ptr; int opnd, pcAdjustment; #ifndef NO_WIDE_TYPE Tcl_WideInt w; #endif long i; - Tcl_Obj *part1Ptr, *part2Ptr; Var *varPtr, *arrayPtr; case INST_INCR_SCALAR1: @@ -3646,34 +3626,32 @@ TclExecuteByteCode( goto doneIncr; } #ifndef NO_WIDE_TYPE - { - w = (Tcl_WideInt)augend; + w = (Tcl_WideInt)augend; - TRACE(("%u %ld => ", opnd, i)); - if (Tcl_IsShared(objPtr)) { - objPtr->refCount--; /* We know it's shared. */ - objResultPtr = Tcl_NewWideIntObj(w+i); - Tcl_IncrRefCount(objResultPtr); - varPtr->value.objPtr = objResultPtr; - } else { - objResultPtr = objPtr; + TRACE(("%u %ld => ", opnd, i)); + if (Tcl_IsShared(objPtr)) { + objPtr->refCount--; /* We know it's shared. */ + objResultPtr = Tcl_NewWideIntObj(w+i); + Tcl_IncrRefCount(objResultPtr); + varPtr->value.objPtr = objResultPtr; + } else { + objResultPtr = objPtr; - /* - * We know the sum value is outside the long - * range; use macro form that doesn't range test - * again. - */ + /* + * We know the sum value is outside the long range; + * use macro form that doesn't range test again. + */ - TclSetWideIntObj(objPtr, w+i); - } - goto doneIncr; + TclSetWideIntObj(objPtr, w+i); } + goto doneIncr; #endif } /* end if (type == TCL_NUMBER_LONG) */ #ifndef NO_WIDE_TYPE if (type == TCL_NUMBER_WIDE) { Tcl_WideInt sum; - w = *((const Tcl_WideInt *)ptr); + + w = *((const Tcl_WideInt *) ptr); sum = w + i; /* @@ -3785,20 +3763,17 @@ TclExecuteByteCode( /* * End of INST_INCR instructions. - * --------------------------------------------------------- - */ - - /* - * --------------------------------------------------------- + * ----------------------------------------------------------------- * Start of INST_EXIST instructions. */ + { Tcl_Obj *part1Ptr, *part2Ptr; Var *varPtr, *arrayPtr; + int opnd; - case INST_EXIST_SCALAR: { - int opnd = TclGetUInt4AtPtr(pc+1); - + case INST_EXIST_SCALAR: + opnd = TclGetUInt4AtPtr(pc+1); varPtr = LOCAL(opnd); while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; @@ -3822,11 +3797,9 @@ TclExecuteByteCode( objResultPtr = TCONST(!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1); TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_F(5, 0, 1); - } - - case INST_EXIST_ARRAY: { - int opnd = TclGetUInt4AtPtr(pc+1); + case INST_EXIST_ARRAY: + opnd = TclGetUInt4AtPtr(pc+1); part2Ptr = OBJ_AT_TOS; arrayPtr = LOCAL(opnd); while (TclIsVarLink(arrayPtr)) { @@ -3857,7 +3830,6 @@ TclExecuteByteCode( objResultPtr = TCONST(!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1); TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_F(5, 1, 1); - } case INST_EXIST_ARRAY_STK: cleanup = 2; @@ -3894,82 +3866,201 @@ TclExecuteByteCode( /* * End of INST_EXIST instructions. - * --------------------------------------------------------- + * ----------------------------------------------------------------- + * Start of INST_UNSET instructions. */ - case INST_UPVAR: { - int opnd; - Var *varPtr, *otherPtr; + { + Tcl_Obj *part1Ptr, *part2Ptr; + Var *varPtr, *arrayPtr; + int opnd, flags, localResult; - TRACE_WITH_OBJ(("upvar "), OBJ_UNDER_TOS); + case INST_UNSET_SCALAR: + flags = TclGetUInt1AtPtr(pc+1) ? TCL_LEAVE_ERR_MSG : 0; + opnd = TclGetUInt4AtPtr(pc+2); + varPtr = LOCAL(opnd); + while (TclIsVarLink(varPtr)) { + varPtr = varPtr->value.linkPtr; + } + TRACE(("%s %u\n", (flags?"normal":"noerr"), opnd)); + if (TclIsVarDirectUnsettable(varPtr) && !TclIsVarInHash(varPtr)) { + /* + * No errors, no traces, no searches: just make the variable cease + * to exist. + */ - { - CallFrame *framePtr, *savedFramePtr; + if (!TclIsVarUndefined(varPtr)) { + Tcl_DecrRefCount(varPtr->value.objPtr); + } else if (flags & TCL_LEAVE_ERR_MSG) { + goto slowUnsetScalar; + } + varPtr->value.objPtr = NULL; + NEXT_INST_F(6, 0, 0); + } + slowUnsetScalar: + DECACHE_STACK_INFO(); + localResult = TclPtrUnsetVar(interp, varPtr, NULL, NULL, NULL, flags, + opnd); + CACHE_STACK_INFO(); + if (localResult != TCL_OK && flags) { + goto errorInUnset; + } + NEXT_INST_F(6, 0, 0); - TRESULT = TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr); - if (TRESULT != -1) { + case INST_UNSET_ARRAY: + flags = TclGetUInt1AtPtr(pc+1) ? TCL_LEAVE_ERR_MSG : 0; + opnd = TclGetUInt4AtPtr(pc+2); + part2Ptr = OBJ_AT_TOS; + arrayPtr = LOCAL(opnd); + while (TclIsVarLink(arrayPtr)) { + arrayPtr = arrayPtr->value.linkPtr; + } + TRACE(("%s %u \"%.30s\"\n", (flags?"normal":"noerr"), opnd, O2S(part2Ptr))); + if (TclIsVarArray(arrayPtr) && !UnsetTraced(arrayPtr)) { + varPtr = VarHashFindVar(arrayPtr->value.tablePtr, part2Ptr); + if (varPtr && TclIsVarDirectUnsettable(varPtr)) { /* - * Locate the other variable. + * No nasty traces and element exists, so we can proceed to + * unset it. Might still not exist though... */ - savedFramePtr = iPtr->varFramePtr; - iPtr->varFramePtr = framePtr; - otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, - (TCL_LEAVE_ERR_MSG), "access", - /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); - iPtr->varFramePtr = savedFramePtr; - if (otherPtr) { - TRESULT = TCL_OK; - goto doLinkVars; + if (!TclIsVarUndefined(varPtr)) { + Tcl_DecrRefCount(varPtr->value.objPtr); + } else if (flags & TCL_LEAVE_ERR_MSG) { + goto slowUnsetArray; } + varPtr->value.objPtr = NULL; + NEXT_INST_F(6, 1, 0); } - TRESULT = TCL_ERROR; - goto checkForCatch; } + slowUnsetArray: + DECACHE_STACK_INFO(); + varPtr = TclLookupArrayElement(interp, NULL, part2Ptr, flags, "unset", + 0, 0, arrayPtr, opnd); + if (!varPtr && (flags & TCL_LEAVE_ERR_MSG)) { + CACHE_STACK_INFO(); + goto errorInUnset; + } + if (varPtr) { + localResult = TclPtrUnsetVar(interp, varPtr, arrayPtr, NULL, + part2Ptr, flags, opnd); + } else { + localResult = TCL_OK; + } + CACHE_STACK_INFO(); + if (localResult != TCL_OK && (flags & TCL_LEAVE_ERR_MSG)) { + goto errorInUnset; + } + NEXT_INST_F(6, 1, 0); - case INST_VARIABLE: - TRACE(("variable ")); - otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, - (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", - /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); - if (otherPtr) { + case INST_UNSET_ARRAY_STK: + flags = TclGetUInt1AtPtr(pc+1) ? TCL_LEAVE_ERR_MSG : 0; + cleanup = 2; + part2Ptr = OBJ_AT_TOS; /* element name */ + part1Ptr = OBJ_UNDER_TOS; /* array name */ + TRACE(("%s \"%.30s(%.30s)\"\n", (flags?"normal":"noerr"), + O2S(part1Ptr), O2S(part2Ptr))); + goto doUnsetStk; + + case INST_UNSET_STK: + flags = TclGetUInt1AtPtr(pc+1) ? TCL_LEAVE_ERR_MSG : 0; + cleanup = 1; + part2Ptr = NULL; + part1Ptr = OBJ_AT_TOS; /* variable name */ + TRACE(("%s \"%.30s\"\n", (flags?"normal":"noerr"), O2S(part1Ptr))); + + doUnsetStk: + DECACHE_STACK_INFO(); + localResult = TclObjUnsetVar2(interp, part1Ptr, part2Ptr, flags); + CACHE_STACK_INFO(); + if (localResult != TCL_OK && (flags & TCL_LEAVE_ERR_MSG)) { + goto errorInUnset; + } + NEXT_INST_V(2, cleanup, 0); + + errorInUnset: + TRESULT = TCL_ERROR; + TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); + goto checkForCatch; + } + + /* + * End of INST_UNSET instructions. + * ----------------------------------------------------------------- + * Start of variable linking instructions. + */ + + { + int opnd; + Var *varPtr, *otherPtr; + + case INST_UPVAR: { + CallFrame *framePtr, *savedFramePtr; + + TRACE_WITH_OBJ(("upvar "), OBJ_UNDER_TOS); + + TRESULT = TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr); + if (TRESULT == -1) { /* - * Do the [variable] magic. + * Locate the other variable. */ - TclSetVarNamespaceVar(otherPtr); - TRESULT = TCL_OK; - goto doLinkVars; + savedFramePtr = iPtr->varFramePtr; + iPtr->varFramePtr = framePtr; + otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, + TCL_LEAVE_ERR_MSG, "access", /*createPart1*/ 1, + /*createPart2*/ 1, &varPtr); + iPtr->varFramePtr = savedFramePtr; + if (otherPtr) { + TRESULT = TCL_OK; + goto doLinkVars; + } } TRESULT = TCL_ERROR; goto checkForCatch; + } - case INST_NSUPVAR: - TRACE_WITH_OBJ(("nsupvar "), OBJ_UNDER_TOS); + case INST_NSUPVAR: { + Tcl_Namespace *nsPtr, *savedNsPtr; - { - Tcl_Namespace *nsPtr, *savedNsPtr; - - TRESULT = TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr); - if (TRESULT == TCL_OK) { - /* - * Locate the other variable. - */ + TRACE_WITH_OBJ(("nsupvar "), OBJ_UNDER_TOS); + TRESULT = TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr); + if (TRESULT == TCL_OK) { + /* + * Locate the other variable. + */ - savedNsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; - iPtr->varFramePtr->nsPtr = (Namespace *) nsPtr; - otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, - (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", - /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); - iPtr->varFramePtr->nsPtr = (Namespace *) savedNsPtr; - if (otherPtr) { - goto doLinkVars; - } + savedNsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; + iPtr->varFramePtr->nsPtr = (Namespace *) nsPtr; + otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, + (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", + /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); + iPtr->varFramePtr->nsPtr = (Namespace *) savedNsPtr; + if (otherPtr) { + goto doLinkVars; } + } + TRESULT = TCL_ERROR; + goto checkForCatch; + } + + case INST_VARIABLE: + TRACE(("variable ")); + otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, + (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", + /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); + if (!otherPtr) { TRESULT = TCL_ERROR; goto checkForCatch; } + /* + * Do the [variable] magic. + */ + + TclSetVarNamespaceVar(otherPtr); + TRESULT = TCL_OK; + doLinkVars: /* @@ -4020,6 +4111,11 @@ TclExecuteByteCode( NEXT_INST_F(5, 1, 0); } + /* + * End of variable linking instructions. + * ----------------------------------------------------------------- + */ + case INST_JUMP1: { int opnd = TclGetInt1AtPtr(pc+1); @@ -4165,7 +4261,7 @@ TclExecuteByteCode( } /* - * --------------------------------------------------------- + * ----------------------------------------------------------------- * Start of INST_LIST and related instructions. */ @@ -4587,7 +4683,8 @@ TclExecuteByteCode( /* * End of INST_LIST and related instructions. - * --------------------------------------------------------- + * ----------------------------------------------------------------- + * Start of string-related instructions. */ case INST_STR_EQ: @@ -4791,6 +4888,7 @@ TclExecuteByteCode( /* * Get char length to calulate what 'end' means. */ + length = Tcl_GetCharLength(valuePtr); TRESULT = TclGetIntForIndexM(interp, value2Ptr, length - 1, &index); if (TRESULT != TCL_OK) { @@ -4865,12 +4963,29 @@ TclExecuteByteCode( /* * Reuse value2Ptr object already on stack if possible. Adjustment is * 2 due to the nocase byte - * TODO: consider peephole opt. */ TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match)); + + /* + * Peep-hole optimisation: if you're about to jump, do jump from here. + */ + + pc += 2; +#ifndef TCL_COMPILE_DEBUG + switch (*pc) { + case INST_JUMP_FALSE1: + NEXT_INST_F((match? 2 : TclGetInt1AtPtr(pc+1)), 2, 0); + case INST_JUMP_TRUE1: + NEXT_INST_F((match? TclGetInt1AtPtr(pc+1) : 2), 2, 0); + case INST_JUMP_FALSE4: + NEXT_INST_F((match? 5 : TclGetInt4AtPtr(pc+1)), 2, 0); + case INST_JUMP_TRUE4: + NEXT_INST_F((match? TclGetInt4AtPtr(pc+1) : 5), 2, 0); + } +#endif objResultPtr = TCONST(match); - NEXT_INST_F(2, 2, 1); + NEXT_INST_F(0, 2, 1); } case INST_REGEXP: { @@ -4899,14 +5014,37 @@ TclExecuteByteCode( O2S(valuePtr), O2S(value2Ptr)), objResultPtr); TRESULT = TCL_ERROR; goto checkForCatch; - } else { - TRACE(("%.20s %.20s => %d\n", - O2S(valuePtr), O2S(value2Ptr), match)); - objResultPtr = TCONST(match); - NEXT_INST_F(2, 2, 1); } + + TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match)); + + /* + * Peep-hole optimisation: if you're about to jump, do jump from here. + */ + + pc += 2; +#ifndef TCL_COMPILE_DEBUG + switch (*pc) { + case INST_JUMP_FALSE1: + NEXT_INST_F((match? 2 : TclGetInt1AtPtr(pc+1)), 2, 0); + case INST_JUMP_TRUE1: + NEXT_INST_F((match? TclGetInt1AtPtr(pc+1) : 2), 2, 0); + case INST_JUMP_FALSE4: + NEXT_INST_F((match? 5 : TclGetInt4AtPtr(pc+1)), 2, 0); + case INST_JUMP_TRUE4: + NEXT_INST_F((match? TclGetInt4AtPtr(pc+1) : 5), 2, 0); + } +#endif + objResultPtr = TCONST(match); + NEXT_INST_F(0, 2, 1); } + /* + * End of string-related instructions. + * ----------------------------------------------------------------- + * Start of numeric operator instructions. + */ + case INST_EQ: case INST_NEQ: case INST_LT: @@ -6933,6 +7071,11 @@ TclExecuteByteCode( NEXT_INST_F(1, 0, 0); } + /* + * End of numeric operator instructions. + * ----------------------------------------------------------------- + */ + case INST_BREAK: /* DECACHE_STACK_INFO(); @@ -7185,10 +7328,18 @@ TclExecuteByteCode( NEXT_INST_F(2*code -1, 1, 0); } + /* + * ----------------------------------------------------------------- + * Start of dictionary-related instructions. + */ + { - int opnd, opnd2, allocateDict; - Tcl_Obj *dictPtr, *valuePtr, *val2Ptr; + int opnd, opnd2, allocateDict, done, i, length, allocdict; + Tcl_Obj *dictPtr, *valuePtr, *val2Ptr, *statePtr, *keyPtr; + Tcl_Obj *emptyPtr, **keyPtrPtr; Var *varPtr; + Tcl_DictSearch *searchPtr; + DictUpdateInfo *duiPtr; case INST_DICT_GET: opnd = TclGetUInt4AtPtr(pc+1); @@ -7390,26 +7541,24 @@ TclExecuteByteCode( if (valuePtr == NULL) { valuePtr = Tcl_NewListObj(1, &OBJ_AT_TOS); - } else if (Tcl_IsShared(valuePtr)) { + break; + } + if (Tcl_IsShared(valuePtr)) { valuePtr = Tcl_DuplicateObj(valuePtr); TRESULT = Tcl_ListObjAppendElement(interp, valuePtr, OBJ_AT_TOS); if (TRESULT != TCL_OK) { TclDecrRefCount(valuePtr); - if (allocateDict) { - TclDecrRefCount(dictPtr); - } - goto checkForCatch; } } else { TRESULT = Tcl_ListObjAppendElement(interp, valuePtr, OBJ_AT_TOS); - if (TRESULT != TCL_OK) { - if (allocateDict) { - TclDecrRefCount(dictPtr); - } - goto checkForCatch; + } + if (TRESULT != TCL_OK) { + if (allocateDict) { + TclDecrRefCount(dictPtr); } + goto checkForCatch; } break; default: @@ -7449,13 +7598,6 @@ TclExecuteByteCode( #endif TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_F(5, 2, 1); - } - - { - int opnd, done; - Tcl_Obj *statePtr, *dictPtr, *keyPtr, *valuePtr, *emptyPtr; - Var *varPtr; - Tcl_DictSearch *searchPtr; case INST_DICT_FIRST: opnd = TclGetUInt4AtPtr(pc+1); @@ -7540,13 +7682,6 @@ TclExecuteByteCode( Tcl_IncrRefCount(emptyPtr); } NEXT_INST_F(5, 0, 0); - } - - { - int opnd, opnd2, i, length, allocdict; - Tcl_Obj **keyPtrPtr, *dictPtr, *valuePtr; - DictUpdateInfo *duiPtr; - Var *varPtr; case INST_DICT_UPDATE_START: opnd = TclGetUInt4AtPtr(pc+1); @@ -7674,6 +7809,11 @@ TclExecuteByteCode( NEXT_INST_F(9, 1, 0); } + /* + * End of dictionary-related instructions. + * ----------------------------------------------------------------- + */ + default: Tcl_Panic("TclExecuteByteCode: unrecognized opCode %u", *pc); } /* end of switch on opCode */ diff --git a/generic/tclInt.h b/generic/tclInt.h index c1da3d4..97a5e44 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.455 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.456 2010/01/30 16:33:25 dkf Exp $ */ #ifndef _TCLINT @@ -808,6 +808,9 @@ typedef struct VarInHash { #define TclIsVarDirectWritable(varPtr) \ !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH)) +#define TclIsVarDirectUnsettable(varPtr) \ + !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_UNSET|VAR_DEAD_HASH)) + #define TclIsVarDirectModifyable(varPtr) \ ( !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE)) \ && (varPtr)->value.objPtr) @@ -3392,6 +3395,9 @@ MODULE_SCOPE int TclCompileSubstCmd(Tcl_Interp *interp, MODULE_SCOPE int TclCompileSwitchCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); +MODULE_SCOPE int TclCompileUnsetCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, Command *cmdPtr, + struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileUpvarCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); @@ -3569,6 +3575,10 @@ MODULE_SCOPE Tcl_Obj * TclPtrIncrObjVar(Tcl_Interp *interp, const int flags, int index); MODULE_SCOPE int TclPtrObjMakeUpvar(Tcl_Interp *interp, Var *otherPtr, Tcl_Obj *myNamePtr, int myFlags, int index); +MODULE_SCOPE int TclPtrUnsetVar(Tcl_Interp *interp, Var *varPtr, + Var *arrayPtr, Tcl_Obj *part1Ptr, + Tcl_Obj *part2Ptr, const int flags, + int index); MODULE_SCOPE void TclInvalidateNsPath(Namespace *nsPtr); /* diff --git a/generic/tclVar.c b/generic/tclVar.c index 54699ce..c2aea55 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.184 2009/11/20 00:19:46 dgp Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.185 2010/01/30 16:33:25 dkf Exp $ */ #include "tclInt.h" @@ -158,7 +158,7 @@ static ArraySearch * ParseSearchId(Tcl_Interp *interp, const Var *varPtr, Tcl_Obj *varNamePtr, Tcl_Obj *handleObj); static void UnsetVarStruct(Var *varPtr, Var *arrayPtr, Interp *iPtr, Tcl_Obj *part1Ptr, - Tcl_Obj *part2Ptr, int flags); + Tcl_Obj *part2Ptr, int flags, int index); static int SetArraySearchObj(Tcl_Interp *interp, Tcl_Obj *objPtr); @@ -2204,10 +2204,7 @@ TclObjUnsetVar2( * TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY, * TCL_LEAVE_ERR_MSG. */ { - Var *varPtr; - Interp *iPtr = (Interp *) interp; - Var *arrayPtr; - int result; + Var *varPtr, *arrayPtr; varPtr = TclObjLookupVarEx(interp, part1Ptr, part2Ptr, flags, "unset", /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); @@ -2215,7 +2212,52 @@ TclObjUnsetVar2( return TCL_ERROR; } - result = (TclIsVarUndefined(varPtr)? TCL_ERROR : TCL_OK); + return TclPtrUnsetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr, flags, + -1); +} + +/* + *---------------------------------------------------------------------- + * + * TclPtrUnsetVar -- + * + * Delete a variable, given the pointers to the variable's (and possibly + * containing array's) VAR structure. + * + * Results: + * Returns TCL_OK if the variable was successfully deleted, TCL_ERROR if + * the variable can't be unset. In the event of an error, if the + * TCL_LEAVE_ERR_MSG flag is set then an error message is left in the + * interp's result. + * + * Side effects: + * If varPtr and arrayPtr indicate a local or global variable in interp, + * it is deleted. If varPtr is an array reference and part2Ptr is NULL, + * then the whole array is deleted. + * + *---------------------------------------------------------------------- + */ + +int +TclPtrUnsetVar( + Tcl_Interp *interp, /* Command interpreter in which varName is to + * be looked up. */ + register Var *varPtr, /* The variable to be unset. */ + Var *arrayPtr, /* NULL for scalar variables, pointer to the + * containing array otherwise. */ + Tcl_Obj *part1Ptr, /* Name of an array (if part2 is non-NULL) or + * the name of a variable. */ + Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element + * in the array part1. */ + const int flags, /* OR-ed combination of any of + * TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY, + * TCL_LEAVE_ERR_MSG. */ + int index) /* Index into the local variable table of the + * variable, or -1. Only used when part1Ptr is + * NULL. */ +{ + Interp *iPtr = (Interp *) interp; + int result = (TclIsVarUndefined(varPtr)? TCL_ERROR : TCL_OK); /* * Keep the variable alive until we're done with it. We used to @@ -2228,7 +2270,7 @@ TclObjUnsetVar2( VarHashRefCount(varPtr)++; } - UnsetVarStruct(varPtr, arrayPtr, iPtr, part1Ptr, part2Ptr, flags); + UnsetVarStruct(varPtr, arrayPtr, iPtr, part1Ptr, part2Ptr, flags, index); /* * It's an error to unset an undefined variable. @@ -2237,7 +2279,7 @@ TclObjUnsetVar2( if (result != TCL_OK) { if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "unset", - ((arrayPtr == NULL) ? noSuchVar : noSuchElement), -1); + ((arrayPtr == NULL) ? noSuchVar : noSuchElement), index); Tcl_SetErrorCode(interp, "TCL", "UNSET", "VARNAME", NULL); } } @@ -2294,7 +2336,8 @@ UnsetVarStruct( Interp *iPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, - int flags) + int flags, + int index) { Var dummyVar; int traced = TclIsVarTraced(varPtr) @@ -2364,7 +2407,7 @@ UnsetVarStruct( TclObjCallVarTraces(iPtr, arrayPtr, &dummyVar, part1Ptr, part2Ptr, (flags & (TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY)) | TCL_TRACE_UNSETS, - /* leaveErrMsg */ 0, -1); + /* leaveErrMsg */ 0, index); /* * The traces that we just called may have triggered a change in @@ -4418,7 +4461,7 @@ TclDeleteNamespaceVars( * hash. */ Tcl_GetVariableFullName(interp, (Tcl_Var) varPtr, objPtr); UnsetVarStruct(varPtr, NULL, iPtr, /* part1 */ objPtr, - NULL, flags); + NULL, flags, -1); Tcl_DecrRefCount(objPtr); /* free no longer needed obj */ @@ -4506,7 +4549,8 @@ TclDeleteVars( */ VarHashInvalidateEntry(varPtr); - UnsetVarStruct(varPtr, NULL, iPtr, VarHashGetKey(varPtr), NULL, flags); + UnsetVarStruct(varPtr, NULL, iPtr, VarHashGetKey(varPtr), NULL, flags, + -1); } VarHashDeleteTable(tablePtr); } @@ -4548,7 +4592,7 @@ TclDeleteCompiledLocalVars( namePtrPtr = &localName(framePtr, 0); for (i=0 ; inumCompiledLocals = 0; } -- cgit v0.12 From 1f0fd3c38cb2cb924917220e5e18095197a49d68 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 31 Jan 2010 22:25:11 +0000 Subject: Unbreak the build --- generic/tclExecute.c | 66 ++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index cbf59c9..843c3fd 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.471 2010/01/30 16:33:25 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.472 2010/01/31 22:25:11 dkf Exp $ */ #include "tclInt.h" @@ -4001,45 +4001,50 @@ TclExecuteByteCode( TRESULT = TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr); if (TRESULT == -1) { - /* - * Locate the other variable. - */ + TRESULT = TCL_ERROR; + goto checkForCatch; + } - savedFramePtr = iPtr->varFramePtr; - iPtr->varFramePtr = framePtr; - otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, - TCL_LEAVE_ERR_MSG, "access", /*createPart1*/ 1, - /*createPart2*/ 1, &varPtr); - iPtr->varFramePtr = savedFramePtr; - if (otherPtr) { - TRESULT = TCL_OK; - goto doLinkVars; - } + /* + * Locate the other variable. + */ + + savedFramePtr = iPtr->varFramePtr; + iPtr->varFramePtr = framePtr; + otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, TCL_LEAVE_ERR_MSG, + "access", /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); + iPtr->varFramePtr = savedFramePtr; + if (otherPtr) { + goto doLinkVars; } TRESULT = TCL_ERROR; goto checkForCatch; } case INST_NSUPVAR: { - Tcl_Namespace *nsPtr, *savedNsPtr; + Tcl_Namespace *nsPtr; + Namespace *savedNsPtr; TRACE_WITH_OBJ(("nsupvar "), OBJ_UNDER_TOS); TRESULT = TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr); - if (TRESULT == TCL_OK) { - /* - * Locate the other variable. - */ + if (TRESULT != TCL_OK) { + goto checkForCatch; + } - savedNsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; - iPtr->varFramePtr->nsPtr = (Namespace *) nsPtr; - otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, - (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", - /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); - iPtr->varFramePtr->nsPtr = (Namespace *) savedNsPtr; - if (otherPtr) { - goto doLinkVars; - } + /* + * Locate the other variable. + */ + + savedNsPtr = iPtr->varFramePtr->nsPtr; + iPtr->varFramePtr->nsPtr = (Namespace *) nsPtr; + otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, + (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", + /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); + iPtr->varFramePtr->nsPtr = savedNsPtr; + if (otherPtr) { + goto doLinkVars; } + TRESULT = TCL_ERROR; goto checkForCatch; } @@ -4059,7 +4064,6 @@ TclExecuteByteCode( */ TclSetVarNamespaceVar(otherPtr); - TRESULT = TCL_OK; doLinkVars: @@ -4073,6 +4077,7 @@ TclExecuteByteCode( varPtr = LOCAL(opnd); if ((varPtr != otherPtr) && !TclIsVarTraced(varPtr) && (TclIsVarUndefined(varPtr) || TclIsVarLink(varPtr))) { + TRESULT = TCL_OK; if (!TclIsVarUndefined(varPtr)) { /* * Then it is a defined link. @@ -4081,7 +4086,7 @@ TclExecuteByteCode( Var *linkPtr = varPtr->value.linkPtr; if (linkPtr == otherPtr) { - goto doLinkVarsDone; + NEXT_INST_F(5, 1, 0); } if (TclIsVarInHash(linkPtr)) { VarHashRefCount(linkPtr)--; @@ -4107,7 +4112,6 @@ TclExecuteByteCode( * variables - and [variable] did not push it at all. */ - doLinkVarsDone: NEXT_INST_F(5, 1, 0); } -- cgit v0.12 From e9307add3ad324ccd88106208eede2efec27fa83 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 31 Jan 2010 22:33:06 +0000 Subject: One more function that needs the LVT index passing into it now. --- generic/tclVar.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/generic/tclVar.c b/generic/tclVar.c index c2aea55..dccbfbb 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.185 2010/01/30 16:33:25 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.186 2010/01/31 22:33:06 dkf Exp $ */ #include "tclInt.h" @@ -146,7 +146,7 @@ static void AppendLocals(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *patternPtr, int includeLinks); static void DeleteSearches(Interp *iPtr, Var *arrayVarPtr); static void DeleteArray(Interp *iPtr, Tcl_Obj *arrayNamePtr, - Var *varPtr, int flags); + Var *varPtr, int flags, int index); static Tcl_Var ObjFindNamespaceVar(Tcl_Interp *interp, Tcl_Obj *namePtr, Tcl_Namespace *contextNsPtr, int flags); @@ -2463,7 +2463,8 @@ UnsetVarStruct( */ DeleteArray(iPtr, part1Ptr, (Var *) &dummyVar, (flags - & (TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY)) | TCL_TRACE_UNSETS); + & (TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY)) | TCL_TRACE_UNSETS, + index); } else if (TclIsVarLink(&dummyVar)) { /* * For global/upvar variables referenced in procedures, decrement the @@ -4625,9 +4626,10 @@ DeleteArray( * or NULL if it is to be computed on * demand. */ Var *varPtr, /* Pointer to variable structure. */ - int flags) /* Flags to pass to TclCallVarTraces: + int flags, /* Flags to pass to TclCallVarTraces: * TCL_TRACE_UNSETS and sometimes * TCL_NAMESPACE_ONLY or TCL_GLOBAL_ONLY. */ + int index) { Tcl_HashSearch search; Tcl_HashEntry *tPtr; @@ -4663,7 +4665,7 @@ DeleteArray( elPtr->flags &= ~VAR_TRACE_ACTIVE; TclObjCallVarTraces(iPtr, NULL, elPtr, arrayNamePtr, - elNamePtr, flags,/* leaveErrMsg */ 0, -1); + elNamePtr, flags,/* leaveErrMsg */ 0, index); } tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) elPtr); tracePtr = Tcl_GetHashValue(tPtr); -- cgit v0.12 From c6ba244014f32c930a14f48a9dfdcd463b986167 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Feb 2010 00:27:53 +0000 Subject: [Bug 2942697]: Rework the RE engine so that certain pathological patterns are matched much more rapidly. Many thanks to Tom Lane for dianosing this issue and providing an initial patch. --- ChangeLog | 7 +++ generic/regexec.c | 124 +++++++++++++++++++++++++++++------------------------- 2 files changed, 74 insertions(+), 57 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f7713d..527339e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-02-01 Donal K. Fellows + + * generic/regexec.c (ccondissect, crevdissect): [Bug 2942697]: Rework + these functions so that certain pathological patterns are matched much + more rapidly. Many thanks to Tom Lane for dianosing this issue and + providing an initial patch. + 2010-01-30 Donal K. Fellows * generic/tclCompile.c (tclInstructionTable): Bytecode instructions diff --git a/generic/regexec.c b/generic/regexec.c index ed6ceec..b369d2b 100644 --- a/generic/regexec.c +++ b/generic/regexec.c @@ -135,7 +135,8 @@ static void subset(struct vars *, struct subre *, chr *, chr *); static int dissect(struct vars *, struct subre *, chr *, chr *); static int condissect(struct vars *, struct subre *, chr *, chr *); static int altdissect(struct vars *, struct subre *, chr *, chr *); -static int cdissect(struct vars *, struct subre *, chr *, chr *); +static inline int cdissect(struct vars *, struct subre *, chr *, chr *); +static int ccaptdissect(struct vars *, struct subre *, chr *, chr *); static int ccondissect(struct vars *, struct subre *, chr *, chr *); static int crevdissect(struct vars *, struct subre *, chr *, chr *); static int cbrdissect(struct vars *, struct subre *, chr *, chr *); @@ -617,6 +618,9 @@ dissect( chr *begin, /* beginning of relevant substring */ chr *end) /* end of same */ { +#ifndef COMPILER_DOES_TAILCALL_OPTIMIZATION + restart: +#endif assert(t != NULL); MDEBUG(("dissect %ld-%ld\n", LOFF(begin), LOFF(end))); @@ -624,27 +628,26 @@ dissect( case '=': /* terminal node */ assert(t->left == NULL && t->right == NULL); return REG_OKAY; /* no action, parent did the work */ - break; case '|': /* alternation */ assert(t->left != NULL); return altdissect(v, t, begin, end); - break; case 'b': /* back ref -- shouldn't be calling us! */ return REG_ASSERT; - break; case '.': /* concatenation */ assert(t->left != NULL && t->right != NULL); return condissect(v, t, begin, end); - break; case '(': /* capturing */ assert(t->left != NULL && t->right == NULL); assert(t->subno > 0); subset(v, t, begin, end); +#ifndef COMPILER_DOES_TAILCALL_OPTIMIZATION + t = t->left; + goto restart; +#else return dissect(v, t->left, begin, end); - break; +#endif default: return REG_ASSERT; - break; } } @@ -786,15 +789,13 @@ altdissect( * so that 0 uniquely means "clean slate". ^ static int cdissect(struct vars *, struct subre *, chr *, chr *); */ -static int /* regexec return code */ +static inline int /* regexec return code */ cdissect( struct vars *v, struct subre *t, chr *begin, /* beginning of relevant substring */ chr *end) /* end of same */ { - int er; - assert(t != NULL); MDEBUG(("cdissect %ld-%ld %c\n", LOFF(begin), LOFF(end), t->op)); @@ -802,33 +803,38 @@ cdissect( case '=': /* terminal node */ assert(t->left == NULL && t->right == NULL); return REG_OKAY; /* no action, parent did the work */ - break; case '|': /* alternation */ assert(t->left != NULL); return caltdissect(v, t, begin, end); - break; case 'b': /* back ref -- shouldn't be calling us! */ assert(t->left == NULL && t->right == NULL); return cbrdissect(v, t, begin, end); - break; case '.': /* concatenation */ assert(t->left != NULL && t->right != NULL); return ccondissect(v, t, begin, end); - break; case '(': /* capturing */ assert(t->left != NULL && t->right == NULL); assert(t->subno > 0); - er = cdissect(v, t->left, begin, end); - if (er == REG_OKAY) { - subset(v, t, begin, end); - } - return er; - break; + return ccaptdissect(v, t, begin, end); default: return REG_ASSERT; - break; } } + +static int /* regexec return code */ +ccaptdissect( + struct vars *v, + struct subre *t, + chr *begin, /* beginning of relevant substring */ + chr *end) /* end of same */ +{ + int er = cdissect(v, t->left, begin, end); + + if (er == REG_OKAY) { + subset(v, t, begin, end); + } + return er; +} /* - ccondissect - concatenation subexpression matches (with complications) @@ -894,15 +900,26 @@ ccondissect( * Try this midpoint on for size. */ - er = cdissect(v, t->left, begin, mid); - if ((er == REG_OKAY) && (longest(v, d2, mid, end, NULL) == end) - && (er = cdissect(v, t->right, mid, end)) == REG_OKAY) { - break; /* NOTE BREAK OUT */ - } - if ((er != REG_OKAY) && (er != REG_NOMATCH)) { - freedfa(d); - freedfa(d2); - return er; + if (longest(v, d2, mid, end, NULL) == end) { + er = cdissect(v, t->left, begin, mid); + if (er == REG_OKAY) { + er = cdissect(v, t->right, mid, end); + if (er == REG_OKAY) { + /* + * Satisfaction. + */ + + MDEBUG(("successful\n")); + freedfa(d); + freedfa(d2); + return REG_OKAY; + } + } + if ((er != REG_OKAY) && (er != REG_NOMATCH)) { + freedfa(d); + freedfa(d2); + return er; + } } /* @@ -935,15 +952,6 @@ ccondissect( zapmem(v, t->left); zapmem(v, t->right); } - - /* - * Satisfaction. - */ - - MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); - return REG_OKAY; } /* @@ -1011,15 +1019,26 @@ crevdissect( * Try this midpoint on for size. */ - er = cdissect(v, t->left, begin, mid); - if ((er == REG_OKAY) && (longest(v, d2, mid, end, NULL) == end) - && (er = cdissect(v, t->right, mid, end)) == REG_OKAY) { - break; /* NOTE BREAK OUT */ - } - if (er != REG_OKAY && er != REG_NOMATCH) { - freedfa(d); - freedfa(d2); - return er; + if (longest(v, d2, mid, end, NULL) == end) { + er = cdissect(v, t->left, begin, mid); + if (er == REG_OKAY) { + er = cdissect(v, t->right, mid, end); + if (er == REG_OKAY) { + /* + * Satisfaction. + */ + + MDEBUG(("successful\n")); + freedfa(d); + freedfa(d2); + return REG_OKAY; + } + } + if (er != REG_OKAY && er != REG_NOMATCH) { + freedfa(d); + freedfa(d2); + return er; + } } /* @@ -1052,15 +1071,6 @@ crevdissect( zapmem(v, t->left); zapmem(v, t->right); } - - /* - * Satisfaction. - */ - - MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); - return REG_OKAY; } /* -- cgit v0.12 From 214d974164837996607e1c9b4d04957d2f15343e Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Feb 2010 10:32:53 +0000 Subject: Use attemptckalloc instead of ckalloc; RE engine knows how to deal with failure --- generic/regcustom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/regcustom.h b/generic/regcustom.h index ac33087..2f30ffd 100644 --- a/generic/regcustom.h +++ b/generic/regcustom.h @@ -37,9 +37,9 @@ */ #define FUNCPTR(name, args) (*name)args -#define MALLOC(n) ckalloc(n) +#define MALLOC(n) VS(attemptckalloc(n)) #define FREE(p) ckfree(VS(p)) -#define REALLOC(p,n) ckrealloc(VS(p),n) +#define REALLOC(p,n) VS(attemptckrealloc(VS(p),n)) /* * Do not insert extras between the "begin" and "end" lines - this chunk is -- cgit v0.12 From a4eb99f2549d55277cc2803158db4bcbdc074a95 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Feb 2010 11:45:25 +0000 Subject: Reduce obscurity of function names. Do a little recursion unrolling. --- generic/rege_dfa.c | 212 +++++++++++------------- generic/regexec.c | 478 ++++++++++++++++++++++++++--------------------------- 2 files changed, 338 insertions(+), 352 deletions(-) diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c index e233680..920ea6c 100644 --- a/generic/rege_dfa.c +++ b/generic/rege_dfa.c @@ -36,17 +36,16 @@ */ static chr * /* endpoint, or NULL */ longest( - struct vars *v, /* used only for debug and exec flags */ - struct dfa *d, - chr *start, /* where the match should start */ - chr *stop, /* match must end at or before here */ - int *hitstopp) /* record whether hit v->stop, if non-NULL */ + struct vars *const v, /* used only for debug and exec flags */ + struct dfa *const d, + chr *const start, /* where the match should start */ + chr *const stop, /* match must end at or before here */ + int *const hitstopp) /* record whether hit v->stop, if non-NULL */ { chr *cp; chr *realstop = (stop == v->stop) ? stop : stop + 1; color co; - struct sset *css; - struct sset *ss; + struct sset *css, *ss; chr *post; int i; struct colormap *cm = d->cm; @@ -164,20 +163,19 @@ longest( */ static chr * /* endpoint, or NULL */ shortest( - struct vars *v, - struct dfa *d, - chr *start, /* where the match should start */ - chr *min, /* match must end at or after here */ - chr *max, /* match must end at or before here */ - chr **coldp, /* store coldstart pointer here, if nonNULL */ - int *hitstopp) /* record whether hit v->stop, if non-NULL */ + struct vars *const v, + struct dfa *const d, + chr *const start, /* where the match should start */ + chr *const min, /* match must end at or after here */ + chr *const max, /* match must end at or before here */ + chr **const coldp, /* store coldstart pointer here, if nonNULL */ + int *const hitstopp) /* record whether hit v->stop, if non-NULL */ { chr *cp; chr *realmin = (min == v->stop) ? min : min + 1; chr *realmax = (max == v->stop) ? max : max + 1; color co; - struct sset *css; - struct sset *ss; + struct sset *css, *ss; struct colormap *cm = d->cm; /* @@ -256,7 +254,7 @@ shortest( } if (coldp != NULL) { /* report last no-progress state set, if any */ - *coldp = lastcold(v, d); + *coldp = lastCold(v, d); } if ((ss->flags&POSTSTATE) && cp > min) { @@ -284,19 +282,18 @@ shortest( } /* - - lastcold - determine last point at which no progress had been made - ^ static chr *lastcold(struct vars *, struct dfa *); + - lastCold - determine last point at which no progress had been made + ^ static chr *lastCold(struct vars *, struct dfa *); */ static chr * /* endpoint, or NULL */ -lastcold( - struct vars *v, - struct dfa *d) +lastCold( + struct vars *const v, + struct dfa *const d) { struct sset *ss; - chr *nopr; + chr *nopr = d->lastnopr; int i; - nopr = d->lastnopr; if (nopr == NULL) { nopr = v->start; } @@ -309,15 +306,15 @@ lastcold( } /* - - newdfa - set up a fresh DFA - ^ static struct dfa *newdfa(struct vars *, struct cnfa *, + - newDFA - set up a fresh DFA + ^ static struct dfa *newDFA(struct vars *, struct cnfa *, ^ struct colormap *, struct smalldfa *); */ static struct dfa * -newdfa( - struct vars *v, - struct cnfa *cnfa, - struct colormap *cm, +newDFA( + struct vars *const v, + struct cnfa *const cnfa, + struct colormap *const cm, struct smalldfa *sml) /* preallocated space, may be NULL */ { struct dfa *d; @@ -345,12 +342,12 @@ newdfa( d->cptsmalloced = 0; d->mallocarea = (smallwas == NULL) ? (char *)sml : NULL; } else { - d = (struct dfa *)MALLOC(sizeof(struct dfa)); + d = (struct dfa *) MALLOC(sizeof(struct dfa)); if (d == NULL) { ERR(REG_ESPACE); return NULL; } - d->ssets = (struct sset *)MALLOC(nss * sizeof(struct sset)); + d->ssets = (struct sset *) MALLOC(nss * sizeof(struct sset)); d->statesarea = (unsigned *) MALLOC((nss+WORK) * wordsper * sizeof(unsigned)); d->work = &d->statesarea[nss * wordsper]; @@ -362,7 +359,7 @@ newdfa( d->mallocarea = (char *)d; if (d->ssets == NULL || d->statesarea == NULL || d->outsarea == NULL || d->incarea == NULL) { - freedfa(d); + freeDFA(d); ERR(REG_ESPACE); return NULL; } @@ -387,12 +384,12 @@ newdfa( } /* - - freedfa - free a DFA - ^ static void freedfa(struct dfa *); + - freeDFA - free a DFA + ^ static void freeDFA(struct dfa *); */ static void -freedfa( - struct dfa *d) +freeDFA( + struct dfa *const d) { if (d->cptsmalloced) { if (d->ssets != NULL) { @@ -421,8 +418,8 @@ freedfa( */ static unsigned hash( - unsigned *uv, - int n) + unsigned *const uv, + const int n) { int i; unsigned h; @@ -440,9 +437,9 @@ hash( */ static struct sset * initialize( - struct vars *v, /* used only for debug flags */ - struct dfa *d, - chr *start) + struct vars *const v, /* used only for debug flags */ + struct dfa *const d, + chr *const start) { struct sset *ss; int i; @@ -454,7 +451,7 @@ initialize( if (d->nssused > 0 && (d->ssets[0].flags&STARTER)) { ss = &d->ssets[0]; } else { /* no, must (re)build it */ - ss = getvacant(v, d, start, start); + ss = getVacantSS(v, d, start, start); for (i = 0; i < d->wordsper; i++) { ss->states[i] = 0; } @@ -484,23 +481,18 @@ initialize( */ static struct sset * /* NULL if goes to empty set */ miss( - struct vars *v, /* used only for debug flags */ - struct dfa *d, - struct sset *css, - pcolor co, - chr *cp, /* next chr */ - chr *start) /* where the attempt got started */ + struct vars *const v, /* used only for debug flags */ + struct dfa *const d, + struct sset *const css, + const pcolor co, + chr *const cp, /* next chr */ + chr *const start) /* where the attempt got started */ { struct cnfa *cnfa = d->cnfa; - int i; unsigned h; struct carc *ca; struct sset *p; - int ispost; - int noprogress; - int gotstate; - int dolacons; - int sawlacons; + int i, isPost, noProgress, gotState, doLAConstraints, sawLAConstraints; /* * For convenience, we can be called even if it might not be a miss. @@ -519,57 +511,57 @@ miss( for (i = 0; i < d->wordsper; i++) { d->work[i] = 0; } - ispost = 0; - noprogress = 1; - gotstate = 0; + isPost = 0; + noProgress = 1; + gotState = 0; for (i = 0; i < d->nstates; i++) { if (ISBSET(css->states, i)) { for (ca = cnfa->states[i]+1; ca->co != COLORLESS; ca++) { if (ca->co == co) { BSET(d->work, ca->to); - gotstate = 1; + gotState = 1; if (ca->to == cnfa->post) { - ispost = 1; + isPost = 1; } if (!cnfa->states[ca->to]->co) { - noprogress = 0; + noProgress = 0; } FDEBUG(("%d -> %d\n", i, ca->to)); } } } } - dolacons = (gotstate) ? (cnfa->flags&HASLACONS) : 0; - sawlacons = 0; - while (dolacons) { /* transitive closure */ - dolacons = 0; + doLAConstraints = (gotState ? (cnfa->flags&HASLACONS) : 0); + sawLAConstraints = 0; + while (doLAConstraints) { /* transitive closure */ + doLAConstraints = 0; for (i = 0; i < d->nstates; i++) { if (ISBSET(d->work, i)) { for (ca = cnfa->states[i]+1; ca->co != COLORLESS; ca++) { if (ca->co <= cnfa->ncolors) { - continue; /* NOTE CONTINUE */ + continue; /* NOTE CONTINUE */ } - sawlacons = 1; + sawLAConstraints = 1; if (ISBSET(d->work, ca->to)) { - continue; /* NOTE CONTINUE */ + continue; /* NOTE CONTINUE */ } - if (!lacon(v, cnfa, cp, ca->co)) { - continue; /* NOTE CONTINUE */ + if (!checkLAConstraint(v, cnfa, cp, ca->co)) { + continue; /* NOTE CONTINUE */ } BSET(d->work, ca->to); - dolacons = 1; + doLAConstraints = 1; if (ca->to == cnfa->post) { - ispost = 1; + isPost = 1; } if (!cnfa->states[ca->to]->co) { - noprogress = 0; + noProgress = 0; } FDEBUG(("%d :> %d\n", i, ca->to)); } } } } - if (!gotstate) { + if (!gotState) { return NULL; } h = HASH(d->work, d->wordsper); @@ -585,14 +577,14 @@ miss( } } if (i == 0) { /* nope, need a new cache entry */ - p = getvacant(v, d, cp, start); + p = getVacantSS(v, d, cp, start); assert(p != css); for (i = 0; i < d->wordsper; i++) { p->states[i] = d->work[i]; } p->hash = h; - p->flags = (ispost) ? POSTSTATE : 0; - if (noprogress) { + p->flags = (isPost ? POSTSTATE : 0); + if (noProgress) { p->flags |= NOPROGRESS; } @@ -601,26 +593,26 @@ miss( */ } - if (!sawlacons) { /* lookahead conds. always cache miss */ + if (!sawLAConstraints) { /* lookahead conds. always cache miss */ FDEBUG(("c%d[%d]->c%d\n", css - d->ssets, co, p - d->ssets)); css->outs[co] = p; css->inchain[co] = p->ins; p->ins.ss = css; - p->ins.co = (color)co; + p->ins.co = (color) co; } return p; } /* - - lacon - lookahead-constraint checker for miss() - ^ static int lacon(struct vars *, struct cnfa *, chr *, pcolor); + - checkLAConstraint - lookahead-constraint checker for miss() + ^ static int checkLAConstraint(struct vars *, struct cnfa *, chr *, pcolor); */ static int /* predicate: constraint satisfied? */ -lacon( - struct vars *v, - struct cnfa *pcnfa, /* parent cnfa */ - chr *cp, - pcolor co) /* "color" of the lookahead constraint */ +checkLAConstraint( + struct vars *const v, + struct cnfa *const pcnfa, /* parent cnfa */ + chr *const cp, + const pcolor co) /* "color" of the lookahead constraint */ { int n; struct subre *sub; @@ -632,38 +624,36 @@ lacon( assert(n < v->g->nlacons && v->g->lacons != NULL); FDEBUG(("=== testing lacon %d\n", n)); sub = &v->g->lacons[n]; - d = newdfa(v, &sub->cnfa, &v->g->cmap, &sd); + d = newDFA(v, &sub->cnfa, &v->g->cmap, &sd); if (d == NULL) { ERR(REG_ESPACE); return 0; } - end = longest(v, d, cp, v->stop, (int *)NULL); - freedfa(d); + end = longest(v, d, cp, v->stop, NULL); + freeDFA(d); FDEBUG(("=== lacon %d match %d\n", n, (end != NULL))); return (sub->subno) ? (end != NULL) : (end == NULL); } /* - - getvacant - get a vacant state set + - getVacantSS - get a vacant state set * This routine clears out the inarcs and outarcs, but does not otherwise * clear the innards of the state set -- that's up to the caller. - ^ static struct sset *getvacant(struct vars *, struct dfa *, chr *, chr *); + ^ static struct sset *getVacantSS(struct vars *, struct dfa *, chr *, chr *); */ static struct sset * -getvacant( - struct vars *v, /* used only for debug flags */ - struct dfa *d, - chr *cp, - chr *start) +getVacantSS( + struct vars *const v, /* used only for debug flags */ + struct dfa *const d, + chr *const cp, + chr *const start) { int i; - struct sset *ss; - struct sset *p; - struct arcp ap; - struct arcp lastap = {NULL, 0}; /* silence gcc 4 warning */ + struct sset *ss, *p; + struct arcp ap, lastap = {NULL, 0}; /* silence gcc 4 warning */ color co; - ss = pickss(v, d, cp, start); + ss = pickNextSS(v, d, cp, start); assert(!(ss->flags&LOCKED)); /* @@ -695,8 +685,7 @@ getvacant( p->ins = ss->inchain[i]; } else { assert(p->ins.ss != NULL); - for (ap = p->ins; ap.ss != NULL && - !(ap.ss == ss && ap.co == i); + for (ap = p->ins; ap.ss != NULL && !(ap.ss == ss && ap.co == i); ap = ap.ss->inchain[ap.co]) { lastap = ap; } @@ -729,19 +718,18 @@ getvacant( } /* - - pickss - pick the next stateset to be used - ^ static struct sset *pickss(struct vars *, struct dfa *, chr *, chr *); + - pickNextSS - pick the next stateset to be used + ^ static struct sset *pickNextSS(struct vars *, struct dfa *, chr *, chr *); */ static struct sset * -pickss( - struct vars *v, /* used only for debug flags */ - struct dfa *d, - chr *cp, - chr *start) +pickNextSS( + struct vars *const v, /* used only for debug flags */ + struct dfa *const d, + chr *const cp, + chr *const start) { int i; - struct sset *ss; - struct sset *end; + struct sset *ss, *end; chr *ancient; /* diff --git a/generic/regexec.c b/generic/regexec.c index b369d2b..9b6a693 100644 --- a/generic/regexec.c +++ b/generic/regexec.c @@ -126,33 +126,33 @@ struct vars { /* automatically gathered by fwd; do not hand-edit */ /* === regexec.c === */ int exec(regex_t *, const chr *, size_t, rm_detail_t *, size_t, regmatch_t [], int); -static int find(struct vars *, struct cnfa *, struct colormap *); -static int cfind(struct vars *, struct cnfa *, struct colormap *); -static int cfindloop(struct vars *, struct cnfa *, struct colormap *, struct dfa *, struct dfa *, chr **); -static void zapsubs(regmatch_t *, size_t); -static void zapmem(struct vars *, struct subre *); -static void subset(struct vars *, struct subre *, chr *, chr *); -static int dissect(struct vars *, struct subre *, chr *, chr *); -static int condissect(struct vars *, struct subre *, chr *, chr *); -static int altdissect(struct vars *, struct subre *, chr *, chr *); -static inline int cdissect(struct vars *, struct subre *, chr *, chr *); -static int ccaptdissect(struct vars *, struct subre *, chr *, chr *); -static int ccondissect(struct vars *, struct subre *, chr *, chr *); -static int crevdissect(struct vars *, struct subre *, chr *, chr *); -static int cbrdissect(struct vars *, struct subre *, chr *, chr *); -static int caltdissect(struct vars *, struct subre *, chr *, chr *); +static int simpleFind(struct vars *const, struct cnfa *const, struct colormap *const); +static int complicatedFind(struct vars *const, struct cnfa *const, struct colormap *const); +static int complicatedFindLoop(struct vars *const, struct cnfa *const, struct colormap *const, struct dfa *const, struct dfa *const, chr **const); +static void zapSubexpressions(regmatch_t *const, const size_t); +static void zapSubtree(struct vars *const, struct subre *const); +static void subset(struct vars *const, struct subre *const, chr *const, chr *const); +static int dissect(struct vars *const, struct subre *, chr *const, chr *const); +static int concatenationDissect(struct vars *const, struct subre *const, chr *const, chr *const); +static int alternationDissect(struct vars *const, struct subre *, chr *const, chr *const); +static inline int complicatedDissect(struct vars *const, struct subre *const, chr *const, chr *const); +static int complicatedCapturingDissect(struct vars *const, struct subre *const, chr *const, chr *const); +static int complicatedConcatenationDissect(struct vars *const, struct subre *const, chr *const, chr *const); +static int complicatedReversedDissect(struct vars *const, struct subre *const, chr *const, chr *const); +static int complicatedBackrefDissect(struct vars *const, struct subre *const, chr *const, chr *const); +static int complicatedAlternationDissect(struct vars *const, struct subre *, chr *const, chr *const); /* === rege_dfa.c === */ -static chr *longest(struct vars *, struct dfa *, chr *, chr *, int *); -static chr *shortest(struct vars *, struct dfa *, chr *, chr *, chr *, chr **, int *); -static chr *lastcold(struct vars *, struct dfa *); -static struct dfa *newdfa(struct vars *, struct cnfa *, struct colormap *, struct smalldfa *); -static void freedfa(struct dfa *); -static unsigned hash(unsigned *, int); -static struct sset *initialize(struct vars *, struct dfa *, chr *); -static struct sset *miss(struct vars *, struct dfa *, struct sset *, pcolor, chr *, chr *); -static int lacon(struct vars *, struct cnfa *, chr *, pcolor); -static struct sset *getvacant(struct vars *, struct dfa *, chr *, chr *); -static struct sset *pickss(struct vars *, struct dfa *, chr *, chr *); +static chr *longest(struct vars *const, struct dfa *const, chr *const, chr *const, int *const); +static chr *shortest(struct vars *const, struct dfa *const, chr *const, chr *const, chr *const, chr **const, int *const); +static chr *lastCold(struct vars *const, struct dfa *const); +static struct dfa *newDFA(struct vars *const, struct cnfa *const, struct colormap *const, struct smalldfa *); +static void freeDFA(struct dfa *const); +static unsigned hash(unsigned *const, const int); +static struct sset *initialize(struct vars *const, struct dfa *const, chr *const); +static struct sset *miss(struct vars *const, struct dfa *const, struct sset *const, const pcolor, chr *const, chr *const); +static int checkLAConstraint(struct vars *const, struct cnfa *const, chr *const, const pcolor); +static struct sset *getVacantSS(struct vars *const, struct dfa *const, chr *const, chr *const); +static struct sset *pickNextSS(struct vars *const, struct dfa *const, chr *const, chr *const); /* automatically gathered by fwd; do not hand-edit */ /* =====^!^===== end forwards =====^!^===== */ @@ -172,9 +172,8 @@ exec( int flags) { AllocVars(v); - int st; + int st, backref; size_t n; - int backref; #define LOCALMAT 20 regmatch_t mat[LOCALMAT]; #define LOCALMEM 40 @@ -265,9 +264,9 @@ exec( assert(v->g->tree != NULL); if (backref) { - st = cfind(v, &v->g->tree->cnfa, &v->g->cmap); + st = complicatedFind(v, &v->g->tree->cnfa, &v->g->cmap); } else { - st = find(v, &v->g->tree->cnfa, &v->g->cmap); + st = simpleFind(v, &v->g->tree->cnfa, &v->g->cmap); } /* @@ -275,7 +274,7 @@ exec( */ if (st == REG_OKAY && v->pmatch != pmatch && nmatch > 0) { - zapsubs(pmatch, nmatch); + zapSubexpressions(pmatch, nmatch); n = (nmatch < v->nmatch) ? nmatch : v->nmatch; memcpy(VS(pmatch), VS(v->pmatch), n*sizeof(regmatch_t)); } @@ -295,23 +294,20 @@ exec( } /* - - find - find a match for the main NFA (no-complications case) - ^ static int find(struct vars *, struct cnfa *, struct colormap *); + - simpleFind - find a match for the main NFA (no-complications case) + ^ static int simpleFind(struct vars *, struct cnfa *, struct colormap *); */ static int -find( - struct vars *v, - struct cnfa *cnfa, - struct colormap *cm) +simpleFind( + struct vars *const v, + struct cnfa *const cnfa, + struct colormap *const cm) { - struct dfa *s; - struct dfa *d; - chr *begin; - chr *end = NULL; + struct dfa *s, *d; + chr *begin, *end = NULL; chr *cold; - chr *open; /* Open and close of range of possible + chr *open, *close; /* Open and close of range of possible * starts */ - chr *close; int hitend; int shorter = (v->g->tree->flags&SHORTER) ? 1 : 0; @@ -319,13 +315,13 @@ find( * First, a shot with the search RE. */ - s = newdfa(v, &v->g->search, cm, &v->dfa1); + s = newDFA(v, &v->g->search, cm, &v->dfa1); assert(!(ISERR() && s != NULL)); NOERR(); MDEBUG(("\nsearch at %ld\n", LOFF(v->start))); cold = NULL; close = shortest(v, s, v->start, v->start, v->stop, &cold, NULL); - freedfa(s); + freeDFA(s); NOERR(); if (v->g->cflags®_EXPECT) { assert(v->details != NULL); @@ -351,7 +347,7 @@ find( open = cold; cold = NULL; MDEBUG(("between %ld and %ld\n", LOFF(open), LOFF(close))); - d = newdfa(v, cnfa, cm, &v->dfa1); + d = newDFA(v, cnfa, cm, &v->dfa1); assert(!(ISERR() && d != NULL)); NOERR(); for (begin = open; begin <= close; begin++) { @@ -370,7 +366,7 @@ find( } } assert(end != NULL); /* search RE succeeded so loop should */ - freedfa(d); + freeDFA(d); /* * And pin down details. @@ -395,38 +391,37 @@ find( * Submatches. */ - zapsubs(v->pmatch, v->nmatch); + zapSubexpressions(v->pmatch, v->nmatch); return dissect(v, v->g->tree, begin, end); } /* - - cfind - find a match for the main NFA (with complications) - ^ static int cfind(struct vars *, struct cnfa *, struct colormap *); + - complicatedFind - find a match for the main NFA (with complications) + ^ static int complicatedFind(struct vars *, struct cnfa *, struct colormap *); */ static int -cfind( - struct vars *v, - struct cnfa *cnfa, - struct colormap *cm) +complicatedFind( + struct vars *const v, + struct cnfa *const cnfa, + struct colormap *const cm) { - struct dfa *s; - struct dfa *d; + struct dfa *s, *d; chr *cold = NULL; /* silence gcc 4 warning */ int ret; - s = newdfa(v, &v->g->search, cm, &v->dfa1); + s = newDFA(v, &v->g->search, cm, &v->dfa1); NOERR(); - d = newdfa(v, cnfa, cm, &v->dfa2); + d = newDFA(v, cnfa, cm, &v->dfa2); if (ISERR()) { assert(d == NULL); - freedfa(s); + freeDFA(s); return v->err; } - ret = cfindloop(v, cnfa, cm, d, s, &cold); + ret = complicatedFindLoop(v, cnfa, cm, d, s, &cold); - freedfa(d); - freedfa(s); + freeDFA(d); + freeDFA(s); NOERR(); if (v->g->cflags®_EXPECT) { assert(v->details != NULL); @@ -441,30 +436,26 @@ cfind( } /* - - cfindloop - the heart of cfind - ^ static int cfindloop(struct vars *, struct cnfa *, struct colormap *, + - complicatedFindLoop - the heart of complicatedFind + ^ static int complicatedFindLoop(struct vars *, struct cnfa *, struct colormap *, ^ struct dfa *, struct dfa *, chr **); */ static int -cfindloop( - struct vars *v, - struct cnfa *cnfa, - struct colormap *cm, - struct dfa *d, - struct dfa *s, - chr **coldp) /* where to put coldstart pointer */ +complicatedFindLoop( + struct vars *const v, + struct cnfa *const cnfa, + struct colormap *const cm, + struct dfa *const d, + struct dfa *const s, + chr **const coldp) /* where to put coldstart pointer */ { - chr *begin; - chr *end; + chr *begin, *end; chr *cold; - chr *open; /* Open and close of range of possible + chr *open, *close; /* Open and close of range of possible * starts */ - chr *close; - chr *estart; - chr *estop; - int er; + chr *estart, *estop; + int er, hitend; int shorter = v->g->tree->flags&SHORTER; - int hitend; assert(d != NULL && s != NULL); cold = NULL; @@ -480,7 +471,7 @@ cfindloop( cold = NULL; MDEBUG(("cbetween %ld and %ld\n", LOFF(open), LOFF(close))); for (begin = open; begin <= close; begin++) { - MDEBUG(("\ncfind trying at %ld\n", LOFF(begin))); + MDEBUG(("\ncomplicatedFind trying at %ld\n", LOFF(begin))); estart = begin; estop = v->stop; for (;;) { @@ -497,9 +488,9 @@ cfindloop( } MDEBUG(("tentative end %ld\n", LOFF(end))); - zapsubs(v->pmatch, v->nmatch); - zapmem(v, v->g->tree); - er = cdissect(v, v->g->tree, begin, end); + zapSubexpressions(v->pmatch, v->nmatch); + zapSubtree(v, v->g->tree); + er = complicatedDissect(v, v->g->tree, begin, end); if (er == REG_OKAY) { if (v->nmatch > 0) { v->pmatch[0].rm_so = OFF(begin); @@ -539,13 +530,13 @@ cfindloop( } /* - - zapsubs - initialize the subexpression matches to "no match" - ^ static void zapsubs(regmatch_t *, size_t); + - zapSubexpressions - initialize the subexpression matches to "no match" + ^ static void zapSubexpressions(regmatch_t *, size_t); */ static void -zapsubs( - regmatch_t *p, - size_t n) +zapSubexpressions( + regmatch_t *const p, + const size_t n) { size_t i; @@ -556,13 +547,13 @@ zapsubs( } /* - - zapmem - initialize the retry memory of a subtree to zeros - ^ static void zapmem(struct vars *, struct subre *); + - zapSubtree - initialize the retry memory of a subtree to zeros + ^ static void zapSubtree(struct vars *, struct subre *); */ static void -zapmem( - struct vars *v, - struct subre *t) +zapSubtree( + struct vars *const v, + struct subre *const t) { if (t == NULL) { return; @@ -573,14 +564,14 @@ zapmem( if (t->op == '(') { assert(t->subno > 0); v->pmatch[t->subno].rm_so = -1; - v->pmatch[t->subno].rm_eo = -1; + v->pmatch[t->subno].rm_eo = -1; } if (t->left != NULL) { - zapmem(v, t->left); + zapSubtree(v, t->left); } if (t->right != NULL) { - zapmem(v, t->right); + zapSubtree(v, t->right); } } @@ -590,10 +581,10 @@ zapmem( */ static void subset( - struct vars *v, - struct subre *sub, - chr *begin, - chr *end) + struct vars *const v, + struct subre *const sub, + chr *const begin, + chr *const end) { int n = sub->subno; @@ -613,10 +604,10 @@ subset( */ static int /* regexec return code */ dissect( - struct vars *v, + struct vars *const v, struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { #ifndef COMPILER_DOES_TAILCALL_OPTIMIZATION restart: @@ -630,12 +621,12 @@ dissect( return REG_OKAY; /* no action, parent did the work */ case '|': /* alternation */ assert(t->left != NULL); - return altdissect(v, t, begin, end); + return alternationDissect(v, t, begin, end); case 'b': /* back ref -- shouldn't be calling us! */ return REG_ASSERT; case '.': /* concatenation */ assert(t->left != NULL && t->right != NULL); - return condissect(v, t, begin, end); + return concatenationDissect(v, t, begin, end); case '(': /* capturing */ assert(t->left != NULL && t->right == NULL); assert(t->subno > 0); @@ -652,18 +643,18 @@ dissect( } /* - - condissect - determine concatenation subexpression matches (uncomplicated) - ^ static int condissect(struct vars *, struct subre *, chr *, chr *); + - concatenationDissect - determine concatenation subexpression matches + - (uncomplicated) + ^ static int concatenationDissect(struct vars *, struct subre *, chr *, chr *); */ static int /* regexec return code */ -condissect( - struct vars *v, - struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ +concatenationDissect( + struct vars *const v, + struct subre *const t, + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { - struct dfa *d; - struct dfa *d2; + struct dfa *d, *d2; chr *mid; int i; int shorter = (t->left->flags&SHORTER) ? 1 : 0; @@ -673,12 +664,12 @@ condissect( assert(t->left != NULL && t->left->cnfa.nstates > 0); assert(t->right != NULL && t->right->cnfa.nstates > 0); - d = newdfa(v, &t->left->cnfa, &v->g->cmap, &v->dfa1); + d = newDFA(v, &t->left->cnfa, &v->g->cmap, &v->dfa1); NOERR(); - d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, &v->dfa2); + d2 = newDFA(v, &t->right->cnfa, &v->g->cmap, &v->dfa2); if (ISERR()) { assert(d2 == NULL); - freedfa(d); + freeDFA(d); return v->err; } @@ -692,8 +683,8 @@ condissect( mid = longest(v, d, begin, end, NULL); } if (mid == NULL) { - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_ASSERT; } MDEBUG(("tentative midpoint %ld\n", LOFF(mid))); @@ -713,8 +704,8 @@ condissect( */ MDEBUG(("no midpoint!\n")); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_ASSERT; } if (shorter) { @@ -728,8 +719,8 @@ condissect( */ MDEBUG(("failed midpoint!\n")); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_ASSERT; } MDEBUG(("new midpoint %ld\n", LOFF(mid))); @@ -740,8 +731,8 @@ condissect( */ MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); i = dissect(v, t->left, begin, mid); if (i != REG_OKAY) { return i; @@ -750,54 +741,55 @@ condissect( } /* - - altdissect - determine alternative subexpression matches (uncomplicated) - ^ static int altdissect(struct vars *, struct subre *, chr *, chr *); + - alternationDissect - determine alternative subexpression matches (uncomplicated) + ^ static int alternationDissect(struct vars *, struct subre *, chr *, chr *); */ static int /* regexec return code */ -altdissect( - struct vars *v, +alternationDissect( + struct vars *const v, struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { - struct dfa *d; int i; assert(t != NULL); assert(t->op == '|'); for (i = 0; t != NULL; t = t->right, i++) { + struct dfa *d; + MDEBUG(("trying %dth\n", i)); assert(t->left != NULL && t->left->cnfa.nstates > 0); - d = newdfa(v, &t->left->cnfa, &v->g->cmap, &v->dfa1); + d = newDFA(v, &t->left->cnfa, &v->g->cmap, &v->dfa1); if (ISERR()) { return v->err; } if (longest(v, d, begin, end, NULL) == end) { MDEBUG(("success\n")); - freedfa(d); + freeDFA(d); return dissect(v, t->left, begin, end); } - freedfa(d); + freeDFA(d); } return REG_ASSERT; /* none of them matched?!? */ } /* - - cdissect - determine subexpression matches (with complications) + - complicatedDissect - determine subexpression matches (with complications) * The retry memory stores the offset of the trial midpoint from begin, plus 1 * so that 0 uniquely means "clean slate". - ^ static int cdissect(struct vars *, struct subre *, chr *, chr *); + ^ static int complicatedDissect(struct vars *, struct subre *, chr *, chr *); */ static inline int /* regexec return code */ -cdissect( - struct vars *v, - struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ +complicatedDissect( + struct vars *const v, + struct subre *const t, + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { assert(t != NULL); - MDEBUG(("cdissect %ld-%ld %c\n", LOFF(begin), LOFF(end), t->op)); + MDEBUG(("complicatedDissect %ld-%ld %c\n", LOFF(begin), LOFF(end), t->op)); switch (t->op) { case '=': /* terminal node */ @@ -805,30 +797,30 @@ cdissect( return REG_OKAY; /* no action, parent did the work */ case '|': /* alternation */ assert(t->left != NULL); - return caltdissect(v, t, begin, end); + return complicatedAlternationDissect(v, t, begin, end); case 'b': /* back ref -- shouldn't be calling us! */ assert(t->left == NULL && t->right == NULL); - return cbrdissect(v, t, begin, end); + return complicatedBackrefDissect(v, t, begin, end); case '.': /* concatenation */ assert(t->left != NULL && t->right != NULL); - return ccondissect(v, t, begin, end); + return complicatedConcatenationDissect(v, t, begin, end); case '(': /* capturing */ assert(t->left != NULL && t->right == NULL); assert(t->subno > 0); - return ccaptdissect(v, t, begin, end); + return complicatedCapturingDissect(v, t, begin, end); default: return REG_ASSERT; } } static int /* regexec return code */ -ccaptdissect( - struct vars *v, - struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ +complicatedCapturingDissect( + struct vars *const v, + struct subre *const t, + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { - int er = cdissect(v, t->left, begin, end); + int er = complicatedDissect(v, t->left, begin, end); if (er == REG_OKAY) { subset(v, t, begin, end); @@ -837,41 +829,39 @@ ccaptdissect( } /* - - ccondissect - concatenation subexpression matches (with complications) + - complicatedConcatenationDissect - concatenation subexpression matches (with complications) * The retry memory stores the offset of the trial midpoint from begin, plus 1 * so that 0 uniquely means "clean slate". - ^ static int ccondissect(struct vars *, struct subre *, chr *, chr *); + ^ static int complicatedConcatenationDissect(struct vars *, struct subre *, chr *, chr *); */ static int /* regexec return code */ -ccondissect( - struct vars *v, - struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ +complicatedConcatenationDissect( + struct vars *const v, + struct subre *const t, + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { - struct dfa *d; - struct dfa *d2; + struct dfa *d, *d2; chr *mid; - int er; assert(t->op == '.'); assert(t->left != NULL && t->left->cnfa.nstates > 0); assert(t->right != NULL && t->right->cnfa.nstates > 0); if (t->left->flags&SHORTER) { /* reverse scan */ - return crevdissect(v, t, begin, end); + return complicatedReversedDissect(v, t, begin, end); } - d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); + d = newDFA(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); if (ISERR()) { return v->err; } - d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, DOMALLOC); + d2 = newDFA(v, &t->right->cnfa, &v->g->cmap, DOMALLOC); if (ISERR()) { - freedfa(d); + freeDFA(d); return v->err; } - MDEBUG(("cconcat %d\n", t->retry)); + MDEBUG(("cConcat %d\n", t->retry)); /* * Pick a tentative midpoint. @@ -880,8 +870,8 @@ ccondissect( if (v->mem[t->retry] == 0) { mid = longest(v, d, begin, end, NULL); if (mid == NULL) { - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_NOMATCH; } MDEBUG(("tentative midpoint %ld\n", LOFF(mid))); @@ -901,23 +891,24 @@ ccondissect( */ if (longest(v, d2, mid, end, NULL) == end) { - er = cdissect(v, t->left, begin, mid); + int er = complicatedDissect(v, t->left, begin, mid); + if (er == REG_OKAY) { - er = cdissect(v, t->right, mid, end); + er = complicatedDissect(v, t->right, mid, end); if (er == REG_OKAY) { /* * Satisfaction. */ MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_OKAY; } } if ((er != REG_OKAY) && (er != REG_NOMATCH)) { - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return er; } } @@ -932,8 +923,8 @@ ccondissect( */ MDEBUG(("%d no midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_NOMATCH; } mid = longest(v, d, begin, mid-1, NULL); @@ -943,34 +934,33 @@ ccondissect( */ MDEBUG(("%d failed midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_NOMATCH; } MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid))); v->mem[t->retry] = (mid - begin) + 1; - zapmem(v, t->left); - zapmem(v, t->right); + zapSubtree(v, t->left); + zapSubtree(v, t->right); } } /* - - crevdissect - determine backref shortest-first subexpression matches + - complicatedReversedDissect - determine backref shortest-first subexpression + - matches * The retry memory stores the offset of the trial midpoint from begin, plus 1 * so that 0 uniquely means "clean slate". - ^ static int crevdissect(struct vars *, struct subre *, chr *, chr *); + ^ static int complicatedReversedDissect(struct vars *, struct subre *, chr *, chr *); */ static int /* regexec return code */ -crevdissect( - struct vars *v, - struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ +complicatedReversedDissect( + struct vars *const v, + struct subre *const t, + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { - struct dfa *d; - struct dfa *d2; + struct dfa *d, *d2; chr *mid; - int er; assert(t->op == '.'); assert(t->left != NULL && t->left->cnfa.nstates > 0); @@ -981,16 +971,16 @@ crevdissect( * Concatenation -- need to split the substring between parts. */ - d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); + d = newDFA(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); if (ISERR()) { return v->err; } - d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, DOMALLOC); + d2 = newDFA(v, &t->right->cnfa, &v->g->cmap, DOMALLOC); if (ISERR()) { - freedfa(d); + freeDFA(d); return v->err; } - MDEBUG(("crev %d\n", t->retry)); + MDEBUG(("cRev %d\n", t->retry)); /* * Pick a tentative midpoint. @@ -999,8 +989,8 @@ crevdissect( if (v->mem[t->retry] == 0) { mid = shortest(v, d, begin, begin, end, NULL, NULL); if (mid == NULL) { - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_NOMATCH; } MDEBUG(("tentative midpoint %ld\n", LOFF(mid))); @@ -1020,23 +1010,24 @@ crevdissect( */ if (longest(v, d2, mid, end, NULL) == end) { - er = cdissect(v, t->left, begin, mid); + int er = complicatedDissect(v, t->left, begin, mid); + if (er == REG_OKAY) { - er = cdissect(v, t->right, mid, end); + er = complicatedDissect(v, t->right, mid, end); if (er == REG_OKAY) { /* * Satisfaction. */ MDEBUG(("successful\n")); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_OKAY; } } if (er != REG_OKAY && er != REG_NOMATCH) { - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return er; } } @@ -1051,8 +1042,8 @@ crevdissect( */ MDEBUG(("%d no midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_NOMATCH; } mid = shortest(v, d, begin, mid+1, end, NULL, NULL); @@ -1062,36 +1053,31 @@ crevdissect( */ MDEBUG(("%d failed midpoint\n", t->retry)); - freedfa(d); - freedfa(d2); + freeDFA(d); + freeDFA(d2); return REG_NOMATCH; } MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid))); v->mem[t->retry] = (mid - begin) + 1; - zapmem(v, t->left); - zapmem(v, t->right); + zapSubtree(v, t->left); + zapSubtree(v, t->right); } } /* - - cbrdissect - determine backref subexpression matches - ^ static int cbrdissect(struct vars *, struct subre *, chr *, chr *); + - complicatedBackrefDissect - determine backref subexpression matches + ^ static int complicatedBackrefDissect(struct vars *, struct subre *, chr *, chr *); */ static int /* regexec return code */ -cbrdissect( - struct vars *v, - struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ +complicatedBackrefDissect( + struct vars *const v, + struct subre *const t, + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { - int i; - int n = t->subno; + int i, n = t->subno, min = t->min, max = t->max; + chr *paren, *p, *stop; size_t len; - chr *paren; - chr *p; - chr *stop; - int min = t->min; - int max = t->max; assert(t != NULL); assert(t->op == 'b'); @@ -1163,55 +1149,67 @@ cbrdissect( } /* - - caltdissect - determine alternative subexpression matches (w. complications) - ^ static int caltdissect(struct vars *, struct subre *, chr *, chr *); + - complicatedAlternationDissect - determine alternative subexpression matches (w. + - complications) + ^ static int complicatedAlternationDissect(struct vars *, struct subre *, chr *, chr *); */ static int /* regexec return code */ -caltdissect( - struct vars *v, +complicatedAlternationDissect( + struct vars *const v, struct subre *t, - chr *begin, /* beginning of relevant substring */ - chr *end) /* end of same */ + chr *const begin, /* beginning of relevant substring */ + chr *const end) /* end of same */ { - struct dfa *d; int er; #define UNTRIED 0 /* not yet tried at all */ #define TRYING 1 /* top matched, trying submatches */ #define TRIED 2 /* top didn't match or submatches exhausted */ +#ifndef COMPILER_DOES_TAILCALL_OPTIMIZATION + if (0) { + doRight: + t = t->right; + } +#endif if (t == NULL) { return REG_NOMATCH; } assert(t->op == '|'); if (v->mem[t->retry] == TRIED) { - return caltdissect(v, t->right, begin, end); + goto doRight; } - MDEBUG(("calt n%d\n", t->retry)); + MDEBUG(("cAlt n%d\n", t->retry)); assert(t->left != NULL); if (v->mem[t->retry] == UNTRIED) { - d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); + struct dfa *d = newDFA(v, &t->left->cnfa, &v->g->cmap, DOMALLOC); + if (ISERR()) { return v->err; } if (longest(v, d, begin, end, NULL) != end) { - freedfa(d); + freeDFA(d); v->mem[t->retry] = TRIED; - return caltdissect(v, t->right, begin, end); + goto doRight; } - freedfa(d); - MDEBUG(("calt matched\n")); + freeDFA(d); + MDEBUG(("cAlt matched\n")); v->mem[t->retry] = TRYING; } - er = cdissect(v, t->left, begin, end); + er = complicatedDissect(v, t->left, begin, end); if (er != REG_NOMATCH) { return er; } v->mem[t->retry] = TRIED; - return caltdissect(v, t->right, begin, end); +#ifndef COMPILER_DOES_TAILCALL_OPTIMIZATION + goto doRight; +#else + doRight: + return complicatedAlternationDissect(v, t->right, begin, end); +#endif } #include "rege_dfa.c" -- cgit v0.12 From a2138bd6664eaf8ec5a4dcf1b66a78ee9c9fa8f3 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 2 Feb 2010 00:11:30 +0000 Subject: Fix [Bug 2939073]: dangling ref when an unset trace triggered by [array unset] hits the next element to be deleted. --- ChangeLog | 5 ++++ generic/tclVar.c | 79 ++++++++++++++++++++++++++++++++++++++++++-------------- tests/var.test | 34 ++++++++++++++++++++---- 3 files changed, 93 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 527339e..eea0ae9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-02-01 Donal K. Fellows + * generic/tclVar.c (Tcl_ArrayObjCmd): [Bug 2939073]: Stop the [array + unset] command from having dangling pointer problems when an unset + trace deletes the element that is going to be processed next. Many + thanks to Alexandre Ferrieux for the bulk of this fix. + * generic/regexec.c (ccondissect, crevdissect): [Bug 2942697]: Rework these functions so that certain pathological patterns are matched much more rapidly. Many thanks to Tom Lane for dianosing this issue and diff --git a/generic/tclVar.c b/generic/tclVar.c index dccbfbb..5e7ec1e 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.186 2010/01/31 22:33:06 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.187 2010/02/02 00:11:31 dkf Exp $ */ #include "tclInt.h" @@ -3211,11 +3211,7 @@ Tcl_ArrayObjCmd( return TCL_ERROR; } return TclArraySet(interp, objv[2], objv[3]); - case ARRAY_UNSET: { - Tcl_HashSearch search; - Var *varPtr2; - const char *pattern = NULL; - + case ARRAY_UNSET: if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "arrayName ?pattern?"); return TCL_ERROR; @@ -3228,11 +3224,16 @@ Tcl_ArrayObjCmd( * When no pattern is given, just unset the whole array. */ - if (TclObjUnsetVar2(interp, varNamePtr, NULL, 0) != TCL_OK) { - return TCL_ERROR; - } + return TclObjUnsetVar2(interp, varNamePtr, NULL, 0); } else { - pattern = TclGetString(objv[3]); + Tcl_HashSearch search; + Var *varPtr2, *protectedVarPtr; + const char *pattern = TclGetString(objv[3]); + + /* + * With a trivial pattern, we can just unset. + */ + if (TclMatchIsTrivial(pattern)) { varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[3]); if (varPtr2 != NULL && !TclIsVarUndefined(varPtr2)) { @@ -3240,23 +3241,61 @@ Tcl_ArrayObjCmd( } return TCL_OK; } + + /* + * Non-trivial case (well, deeply tricky really). We peek inside + * the hash iterator in order to allow us to guarantee that the + * following element in the array will not be scrubbed until we + * have dealt with it. This stops the overall iterator from ending + * up pointing into deallocated memory. [Bug 2939073] + */ + + protectedVarPtr = NULL; for (varPtr2=VarHashFirstVar(varPtr->value.tablePtr, &search); varPtr2!=NULL ; varPtr2=VarHashNextVar(&search)) { - Tcl_Obj *namePtr; + /* + * Drop the extra ref immediately. We don't need to free it at + * this point though; we'll be unsetting it if necessary soon. + */ - if (TclIsVarUndefined(varPtr2)) { - continue; + if (varPtr2 == protectedVarPtr) { + VarHashRefCount(varPtr2)--; + } + + /* + * Guard the next item in the search chain by incrementing its + * refcount. This guarantees that the hash table iterator + * won't be dangling on the next time through the loop. + */ + + if (search.nextEntryPtr != NULL) { + protectedVarPtr = VarHashGetValue(search.nextEntryPtr); + VarHashRefCount(protectedVarPtr)++; + } else { + protectedVarPtr = NULL; } - namePtr = VarHashGetKey(varPtr2); - if (Tcl_StringMatch(TclGetString(namePtr), pattern) && - TclObjUnsetVar2(interp, varNamePtr, namePtr, - 0) != TCL_OK) { - return TCL_ERROR; + + if (!TclIsVarUndefined(varPtr2)) { + Tcl_Obj *namePtr = VarHashGetKey(varPtr2); + + if (Tcl_StringMatch(TclGetString(namePtr), pattern) + && TclObjUnsetVar2(interp, varNamePtr, namePtr, + 0) != TCL_OK) { + /* + * If we incremented a refcount, we must decrement it + * here as we will not be coming back properly due to + * the error. + */ + + if (protectedVarPtr) { + VarHashRefCount(protectedVarPtr)--; + } + return TCL_ERROR; + } } } + break; } - break; - } case ARRAY_SIZE: { Tcl_HashSearch search; diff --git a/tests/var.test b/tests/var.test index 698cd20..59b71be 100644 --- a/tests/var.test +++ b/tests/var.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: var.test,v 1.34 2008/09/25 19:51:29 dgp Exp $ +# RCS: @(#) $Id: var.test,v 1.35 2010/02/02 00:11:31 dkf Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -34,7 +34,7 @@ catch {unset y} catch {unset i} catch {unset a} catch {unset arr} - + test var-1.1 {TclLookupVar, Array handling} { catch {unset a} set x "incr" ;# force no compilation and runtime call to Tcl_IncrCmd @@ -725,9 +725,9 @@ test var-15.1 {segfault in [unset], [Bug 735335]} { test var-16.1 {CallVarTraces: save/restore interp error state} { - trace add variable ::errorCode write { ;#} + trace add variable ::errorCode write " ;#" catch {error foo bar baz} - trace remove variable ::errorCode write { ;#} + trace remove variable ::errorCode write " ;#" set ::errorInfo } bar @@ -736,13 +736,33 @@ test var-17.1 {TclArraySet [Bug 1669489]} -setup { } -body { namespace eval :: { set elements {1 2 3 4} - trace add variable a write {string length $elements ;#} + trace add variable a write "string length \$elements ;#" array set a $elements } } -cleanup { unset -nocomplain ::a ::elements } -result {} +test var-18.1 {array unset and unset traces: Bug 2939073} -setup { + set already 0 + unset x +} -body { + array set x {e 1 i 1} + trace add variable x unset {apply {args { + global already x + if {!$already} { + set already 1 + unset x(i) + } + }}} + # The next command would crash reliably with memory debugging prior to the + # bug fix. + array unset x * + array size x +} -cleanup { + unset x already +} -result 0 + catch {namespace delete ns} catch {unset arr} catch {unset v} @@ -761,3 +781,7 @@ catch {unset aaaaa} # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From a702b6e0b90ad920f1bd8821d028e281991f64ab Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 2 Feb 2010 00:29:32 +0000 Subject: Switch to using the new faster var-ref internal API inside [array unset] when it makes sense. --- generic/tclVar.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/generic/tclVar.c b/generic/tclVar.c index 5e7ec1e..6b2f623 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.187 2010/02/02 00:11:31 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.188 2010/02/02 00:29:32 dkf Exp $ */ #include "tclInt.h" @@ -3237,7 +3237,8 @@ Tcl_ArrayObjCmd( if (TclMatchIsTrivial(pattern)) { varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[3]); if (varPtr2 != NULL && !TclIsVarUndefined(varPtr2)) { - return TclObjUnsetVar2(interp, varNamePtr, objv[3], 0); + return TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, + objv[3], 0, -1); } return TCL_OK; } @@ -3279,8 +3280,8 @@ Tcl_ArrayObjCmd( Tcl_Obj *namePtr = VarHashGetKey(varPtr2); if (Tcl_StringMatch(TclGetString(namePtr), pattern) - && TclObjUnsetVar2(interp, varNamePtr, namePtr, - 0) != TCL_OK) { + && TclPtrUnsetVar(interp, varPtr2, varPtr, + varNamePtr, namePtr, 0, -1) != TCL_OK) { /* * If we incremented a refcount, we must decrement it * here as we will not be coming back properly due to -- cgit v0.12 From dfbab38ae547e10b74c8c13190efc5015aa52b43 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 2 Feb 2010 09:13:45 +0000 Subject: [Bug 2944404] Be careful in case an object deletes itself in its destructor. --- ChangeLog | 6 ++++++ generic/tclOOBasic.c | 9 ++++++--- tests/oo.test | 18 +++++++++++++++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index eea0ae9..2c95529 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-02 Donal K. Fellows + + * generic/tclOOBasic.c (TclOO_Object_Destroy): [Bug 2944404]: Do not + crash when a destructor deletes the object that is executing that + destructor. + 2010-02-01 Donal K. Fellows * generic/tclVar.c (Tcl_ArrayObjCmd): [Bug 2939073]: Stop the [array diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 193ca93..2c42fe9 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.22 2010/01/28 13:57:48 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.23 2010/02/02 09:13:45 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -267,6 +267,7 @@ TclOO_Object_Destroy( NULL); return TCL_ERROR; } + AddRef(oPtr); if (!(oPtr->flags & DESTRUCTOR_CALLED)) { CallContext *contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); @@ -280,8 +281,10 @@ TclOO_Object_Destroy( TclOODeleteContext(contextPtr); } } - Tcl_DeleteCommandFromToken(interp, - Tcl_GetObjectCommand(Tcl_ObjectContextObject(context))); + if (oPtr->command) { + Tcl_DeleteCommandFromToken(interp, oPtr->command); + } + DelRef(oPtr); return result; } diff --git a/tests/oo.test b/tests/oo.test index 6fdc344..d831b3d 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.35 2010/01/28 10:25:05 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.36 2010/02/02 09:13:45 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -440,6 +440,22 @@ test oo-3.8 {basic test of OO functionality: errors in destructor} -setup { list [namespace delete [info object namespace [cls create obj]]] \ [update idletasks] $result [info commands obj] } -result {{} {} foo {}} +test oo-3.9 {Bug 2944404: deleting the object in the destructor} -setup { + oo::class create cls + set result {} +} -body { + oo::define cls { + destructor { + lappend ::result in destructor + [self] destroy + } + } + # This used to crash + [cls new] destroy + return $result +} -cleanup { + cls destroy +} -result {in destructor} test oo-4.1 {basic test of OO functionality: export} { set o [oo::object new] -- cgit v0.12 From 10c9ce76f08286c1d9c1a229c633bf12576c25c5 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 2 Feb 2010 09:51:47 +0000 Subject: Chisel away at reducing the cost of recent changes. --- ChangeLog | 8 ++++ generic/tclOO.c | 114 +++++++++++++++++++++++++++----------------------------- 2 files changed, 63 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c95529..5ae23b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-02-02 Donal K. Fellows + * generic/tclOO.c (AllocObject, MyDeleted): A slightly faster way to + handle the deletion of [my] is with a standard delete callback. This + is because it doesn't require an additional memory allocation during + object creation. Also reduced the amount of string manipulation + performed during object creation to further streamline memory + handling; this is not backported to the 8.5 package as it breaks a + number of abstractions. + * generic/tclOOBasic.c (TclOO_Object_Destroy): [Bug 2944404]: Do not crash when a destructor deletes the object that is executing that destructor. diff --git a/generic/tclOO.c b/generic/tclOO.c index ea008be..c7bab53 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.28 2010/01/28 13:57:47 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.29 2010/02/02 09:51:47 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -84,9 +84,7 @@ static int FinalizeObjectCall(ClientData data[], static void InitFoundation(Tcl_Interp *interp); static void KillFoundation(ClientData clientData, Tcl_Interp *interp); -static void MyDeletedTrace(ClientData clientData, - Tcl_Interp *interp, const char *oldName, - const char *newName, int flags); +static void MyDeleted(ClientData clientData); static void ObjectNamespaceDeleted(ClientData clientData); static void ObjectRenamedTrace(ClientData clientData, Tcl_Interp *interp, const char *oldName, @@ -450,9 +448,10 @@ AllocObject( * will be the same as if this was NULL. */ { Foundation *fPtr = GetFoundation(interp); - Tcl_DString buffer; Object *oPtr; - int creationEpoch; + Command *cmdPtr; + CommandTrace *tracePtr; + int creationEpoch, ignored; oPtr = (Object *) ckalloc(sizeof(Object)); memset(oPtr, 0, sizeof(Object)); @@ -534,58 +533,59 @@ AllocObject( * command is deleted). */ - if (nameStr) { - if (nameStr[0] != ':' || nameStr[1] != ':') { - Tcl_DStringInit(&buffer); - Tcl_DStringAppend(&buffer, - Tcl_GetCurrentNamespace(interp)->fullName, -1); - Tcl_DStringAppend(&buffer, "::", 2); - Tcl_DStringAppend(&buffer, nameStr, -1); - oPtr->command = Tcl_CreateObjCommand(interp, - Tcl_DStringValue(&buffer), PublicObjectCmd, oPtr, NULL); - Tcl_DStringFree(&buffer); - } else { - oPtr->command = Tcl_CreateObjCommand(interp, nameStr, - PublicObjectCmd, oPtr, NULL); - } - } else { + if (!nameStr) { oPtr->command = Tcl_CreateObjCommand(interp, oPtr->namespacePtr->fullName, PublicObjectCmd, oPtr, NULL); + } else if (nameStr[0] == ':' && nameStr[1] == ':') { + oPtr->command = Tcl_CreateObjCommand(interp, nameStr, + PublicObjectCmd, oPtr, NULL); + } else { + Tcl_DString buffer; + + Tcl_DStringInit(&buffer); + Tcl_DStringAppend(&buffer, + Tcl_GetCurrentNamespace(interp)->fullName, -1); + Tcl_DStringAppend(&buffer, "::", 2); + Tcl_DStringAppend(&buffer, nameStr, -1); + oPtr->command = Tcl_CreateObjCommand(interp, + Tcl_DStringValue(&buffer), PublicObjectCmd, oPtr, NULL); + Tcl_DStringFree(&buffer); } - ((Command *) oPtr->command)->nreProc = PublicNRObjectCmd; + + /* + * Add the NRE command and trace directly. While this breaks a number of + * abstractions, it is faster and we're inside Tcl here so we're allowed. + */ + + cmdPtr = (Command *) oPtr->command; + cmdPtr->nreProc = PublicNRObjectCmd; + cmdPtr->tracePtr = tracePtr = (CommandTrace *) + ckalloc(sizeof(CommandTrace)); + tracePtr->traceProc = ObjectRenamedTrace; + tracePtr->clientData = oPtr; + tracePtr->flags = TCL_TRACE_RENAME|TCL_TRACE_DELETE; + tracePtr->nextPtr = NULL; + tracePtr->refCount = 1; /* * Access the namespace command table directly when creating "my" to avoid - * a bottleneck in string manipulation. - */ - - { - register Command *cmdPtr = (Command *) ckalloc(sizeof(Command)); - register CommandTrace *tracePtr; - - memset(cmdPtr, 0, sizeof(Command)); - cmdPtr->nsPtr = (Namespace *) oPtr->namespacePtr; - cmdPtr->hPtr = Tcl_CreateHashEntry(&cmdPtr->nsPtr->cmdTable, "my", - &creationEpoch /*ignored*/ ); - cmdPtr->refCount = 1; - cmdPtr->objProc = PrivateObjectCmd; - cmdPtr->objClientData = oPtr; - cmdPtr->proc = TclInvokeObjectCommand; - cmdPtr->clientData = cmdPtr; - cmdPtr->nreProc = PrivateNRObjectCmd; - Tcl_SetHashValue(cmdPtr->hPtr, cmdPtr); - oPtr->myCommand = (Tcl_Command) cmdPtr; - cmdPtr->tracePtr = tracePtr = (CommandTrace *) - ckalloc(sizeof(CommandTrace)); - tracePtr->traceProc = MyDeletedTrace; - tracePtr->clientData = oPtr; - tracePtr->flags = TCL_TRACE_DELETE; - tracePtr->nextPtr = NULL; - tracePtr->refCount = 1; - } - - Tcl_TraceCommand(interp, TclGetString(TclOOObjectName(interp, oPtr)), - TCL_TRACE_RENAME|TCL_TRACE_DELETE, ObjectRenamedTrace, oPtr); + * a bottleneck in string manipulation. Another abstraction-buster. + */ + + cmdPtr = (Command *) ckalloc(sizeof(Command)); + memset(cmdPtr, 0, sizeof(Command)); + cmdPtr->nsPtr = (Namespace *) oPtr->namespacePtr; + cmdPtr->hPtr = Tcl_CreateHashEntry(&cmdPtr->nsPtr->cmdTable, "my", + &ignored); + cmdPtr->refCount = 1; + cmdPtr->objProc = PrivateObjectCmd; + cmdPtr->deleteProc = MyDeleted; + cmdPtr->objClientData = cmdPtr->deleteData = oPtr; + cmdPtr->proc = TclInvokeObjectCommand; + cmdPtr->clientData = cmdPtr; + cmdPtr->nreProc = PrivateNRObjectCmd; + Tcl_SetHashValue(cmdPtr->hPtr, cmdPtr); + oPtr->myCommand = (Tcl_Command) cmdPtr; return oPtr; } @@ -593,7 +593,7 @@ AllocObject( /* * ---------------------------------------------------------------------- * - * MyDeletedTrace -- + * MyDeleted -- * * This callback is triggered when the object's [my] command is deleted * by any mechanism. It just marks the object as not having a [my] @@ -604,13 +604,9 @@ AllocObject( */ static void -MyDeletedTrace( - ClientData clientData, /* Reference to the object whose [my] has been +MyDeleted( + ClientData clientData) /* Reference to the object whose [my] has been * squelched. */ - Tcl_Interp *interp, /* ignored */ - const char *oldName, /* ignored */ - const char *newName, /* ignored */ - int flags) /* ignored */ { register Object *oPtr = clientData; -- cgit v0.12 From ce9bf924511484c14218bd13b2abf5cfc9967c25 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 2 Feb 2010 16:12:00 +0000 Subject: Turned the [array] command into a true ensemble. Test changes indicate some alteration to error messages, otherwise no change. --- ChangeLog | 2 + generic/tclBasic.c | 10 +- generic/tclInt.h | 6 +- generic/tclVar.c | 1810 +++++++++++++++++++++++++++++++++++----------------- tests/set-old.test | 12 +- 5 files changed, 1233 insertions(+), 607 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ae23b1..1dd62b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-02-02 Donal K. Fellows + * generic/tclVar.c: Turned the [array] command into a true ensemble. + * generic/tclOO.c (AllocObject, MyDeleted): A slightly faster way to handle the deletion of [my] is with a standard delete callback. This is because it doesn't require an additional memory allocation during diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 2612aef..08414c8 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.439 2010/01/30 16:33:25 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.440 2010/02/02 16:12:00 dkf Exp $ */ #include "tclInt.h" @@ -194,7 +194,6 @@ static const CmdInfo builtInCmds[] = { {"append", Tcl_AppendObjCmd, TclCompileAppendCmd, NULL, 1}, {"apply", Tcl_ApplyObjCmd, NULL, TclNRApplyObjCmd, 1}, - {"array", Tcl_ArrayObjCmd, NULL, NULL, 1}, {"break", Tcl_BreakObjCmd, TclCompileBreakCmd, NULL, 1}, #ifndef EXCLUDE_OBSOLETE_COMMANDS {"case", Tcl_CaseObjCmd, NULL, NULL, 1}, @@ -750,11 +749,12 @@ Tcl_CreateInterp(void) } /* - * Create the "binary", "chan", "dict", "info" and "string" ensembles. - * Note that all these commands (and their subcommands that are not - * present in the global namespace) are wholly safe. + * Create the "array", "binary", "chan", "dict", "info" and "string" + * ensembles. Note that all these commands (and their subcommands that are + * not present in the global namespace) are wholly safe. */ + TclInitArrayCmd(interp); TclInitBinaryCmd(interp); TclInitChanCmd(interp); TclInitDictCmd(interp); diff --git a/generic/tclInt.h b/generic/tclInt.h index 97a5e44..64f6544 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.456 2010/01/30 16:33:25 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.457 2010/02/02 16:12:00 dkf Exp $ */ #ifndef _TCLINT @@ -3015,9 +3015,7 @@ MODULE_SCOPE int Tcl_AppendObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_ApplyObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -MODULE_SCOPE int Tcl_ArrayObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +MODULE_SCOPE Tcl_Command TclInitArrayCmd(Tcl_Interp *interp); MODULE_SCOPE Tcl_Command TclInitBinaryCmd(Tcl_Interp *interp); MODULE_SCOPE int Tcl_BreakObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, diff --git a/generic/tclVar.c b/generic/tclVar.c index 6b2f623..d97eb27 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.188 2010/02/02 00:29:32 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.189 2010/02/02 16:12:00 dkf Exp $ */ #include "tclInt.h" @@ -2765,57 +2765,862 @@ Tcl_LappendObjCmd( /* *---------------------------------------------------------------------- * - * Tcl_ArrayObjCmd -- + * TclArraySet -- * - * This object-based function is invoked to process the "array" Tcl - * command. See the user documentation for details on what it does. + * Set the elements of an array. If there are no elements to set, create + * an empty array. This routine is used by the Tcl_ArrayObjCmd and by the + * TclSetupEnv routine. * * Results: * A standard Tcl result object. * * Side effects: - * See the user documentation. + * A variable will be created if one does not already exist. * *---------------------------------------------------------------------- */ - /* ARGSUSED */ int -Tcl_ArrayObjCmd( - ClientData dummy, /* Not used. */ +TclArraySet( Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + Tcl_Obj *arrayNameObj, /* The array name. */ + Tcl_Obj *arrayElemObj) /* The array elements list or dict. If this is + * NULL, create an empty array. */ { + Var *varPtr, *arrayPtr; + int result, i; + + varPtr = TclObjLookupVarEx(interp, arrayNameObj, NULL, + /*flags*/ TCL_LEAVE_ERR_MSG, /*msg*/ "set", /*createPart1*/ 1, + /*createPart2*/ 1, &arrayPtr); + if (varPtr == NULL) { + return TCL_ERROR; + } + if (arrayPtr) { + CleanupVar(varPtr, arrayPtr); + TclObjVarErrMsg(interp, arrayNameObj, NULL, "set", needArray, -1); + return TCL_ERROR; + } + + if (arrayElemObj == NULL) { + goto ensureArray; + } + /* - * The list of constants below should match the arrayOptions string array - * below. + * Install the contents of the dictionary or list into the array. */ - enum { - ARRAY_ANYMORE, ARRAY_DONESEARCH, ARRAY_EXISTS, ARRAY_GET, - ARRAY_NAMES, ARRAY_NEXTELEMENT, ARRAY_SET, ARRAY_SIZE, - ARRAY_STARTSEARCH, ARRAY_STATISTICS, ARRAY_UNSET - }; - static const char *const arrayOptions[] = { - "anymore", "donesearch", "exists", "get", "names", "nextelement", - "set", "size", "startsearch", "statistics", "unset", NULL - }; + if (arrayElemObj->typePtr == &tclDictType) { + Tcl_Obj *keyPtr, *valuePtr; + Tcl_DictSearch search; + int done; + + if (Tcl_DictObjSize(interp, arrayElemObj, &done) != TCL_OK) { + return TCL_ERROR; + } + if (done == 0) { + /* + * Empty, so we'll just force the array to be properly existing + * instead. + */ + + goto ensureArray; + } + + /* + * Don't need to look at result of Tcl_DictObjFirst as we've just + * successfully used a dictionary operation on the same object. + */ + + for (Tcl_DictObjFirst(interp, arrayElemObj, &search, + &keyPtr, &valuePtr, &done) ; !done ; + Tcl_DictObjNext(&search, &keyPtr, &valuePtr, &done)) { + /* + * At this point, it would be nice if the key was directly usable + * by the array. This isn't the case though. + */ + + Var *elemVarPtr = TclLookupArrayElement(interp, arrayNameObj, + keyPtr, TCL_LEAVE_ERR_MSG, "set", 1, 1, varPtr, -1); + + if ((elemVarPtr == NULL) || + (TclPtrSetVar(interp, elemVarPtr, varPtr, arrayNameObj, + keyPtr, valuePtr, TCL_LEAVE_ERR_MSG, -1) == NULL)) { + Tcl_DictObjDone(&search); + return TCL_ERROR; + } + } + return TCL_OK; + } else { + /* + * Not a dictionary, so assume (and convert to, for backward- + * -compatability reasons) a list. + */ + + int elemLen; + Tcl_Obj **elemPtrs, *copyListObj; + + result = TclListObjGetElements(interp, arrayElemObj, + &elemLen, &elemPtrs); + if (result != TCL_OK) { + return result; + } + if (elemLen & 1) { + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "list must have an even number of elements", -1)); + return TCL_ERROR; + } + if (elemLen == 0) { + goto ensureArray; + } + + /* + * We needn't worry about traces invalidating arrayPtr: should that be + * the case, TclPtrSetVar will return NULL so that we break out of the + * loop and return an error. + */ + + copyListObj = TclListObjCopy(NULL, arrayElemObj); + for (i=0 ; ivalue.tablePtr = (TclVarHashTable *) + ckalloc(sizeof(TclVarHashTable)); + TclInitVarHashTable(varPtr->value.tablePtr, TclGetVarNsPtr(varPtr)); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ArrayStartSearchCmd -- + * + * This object-based function is invoked to process the "array + * startsearch" Tcl command. See the user documentation for details on + * what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + /* ARGSUSED */ +static int +ArrayStartSearchCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; Tcl_HashEntry *hPtr; Tcl_Obj *varNamePtr; - int notArray; - int index, result; + int isNew; + ArraySearch *searchPtr; + const char *varName; - if (objc < 3) { - Tcl_WrongNumArgs(interp, 1, objv, "option arrayName ?arg ...?"); + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); + return TCL_ERROR; + } + + /* + * Locate the array variable + */ + + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); + varName = TclGetString(varNamePtr); + + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { + return TCL_ERROR; + } + } + + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. + */ + + if ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)) { + Tcl_AppendResult(interp, "\"", varName, "\" isn't an array", NULL); + return TCL_ERROR; + } + + /* + * Make a new array search with a free name. + */ + + searchPtr = (ArraySearch *) ckalloc(sizeof(ArraySearch)); + hPtr = Tcl_CreateHashEntry(&iPtr->varSearches, (char *) varPtr, &isNew); + if (isNew) { + searchPtr->id = 1; + Tcl_AppendResult(interp, "s-1-", varName, NULL); + varPtr->flags |= VAR_SEARCH_ACTIVE; + searchPtr->nextPtr = NULL; + } else { + char string[TCL_INTEGER_SPACE]; + + searchPtr->id = ((ArraySearch *) Tcl_GetHashValue(hPtr))->id + 1; + TclFormatInt(string, searchPtr->id); + Tcl_AppendResult(interp, "s-", string, "-", varName, NULL); + searchPtr->nextPtr = Tcl_GetHashValue(hPtr); + } + searchPtr->varPtr = varPtr; + searchPtr->nextEntry = VarHashFirstEntry(varPtr->value.tablePtr, + &searchPtr->search); + Tcl_SetHashValue(hPtr, searchPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ArrayAnyMoreCmd -- + * + * This object-based function is invoked to process the "array anymore" + * Tcl command. See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +ArrayAnyMoreCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr; + Tcl_Obj *varNamePtr; + int gotValue; + ArraySearch *searchPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[1], arrayOptions, "option", - 0, &index) != TCL_OK) { + /* + * Locate the array variable + */ + + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); + + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { + return TCL_ERROR; + } + } + + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. + */ + + if ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)) { + Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + "\" isn't an array", NULL); + return TCL_ERROR; + } + + /* + * Get the search. + */ + + searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[2]); + if (searchPtr == NULL) { + return TCL_ERROR; + } + + /* + * Scan forward to find if there are any further elements in the array + * that are defined. + */ + + while (1) { + if (searchPtr->nextEntry != NULL) { + varPtr = VarHashGetValue(searchPtr->nextEntry); + if (!TclIsVarUndefined(varPtr)) { + gotValue = 1; + break; + } + } + searchPtr->nextEntry = Tcl_NextHashEntry(&searchPtr->search); + if (searchPtr->nextEntry == NULL) { + gotValue = 0; + break; + } + } + Tcl_SetObjResult(interp, iPtr->execEnvPtr->constants[gotValue]); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ArrayNextElementCmd -- + * + * This object-based function is invoked to process the "array + * nextelement" Tcl command. See the user documentation for details on + * what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +ArrayNextElementCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr; + Tcl_Obj *varNamePtr; + ArraySearch *searchPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); + return TCL_ERROR; + } + + /* + * Locate the array variable + */ + + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); + + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { + return TCL_ERROR; + } + } + + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. + */ + + if ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)) { + Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + "\" isn't an array", NULL); + return TCL_ERROR; + } + + /* + * Get the search. + */ + + searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[2]); + if (searchPtr == NULL) { + return TCL_ERROR; + } + + /* + * Get the next element from the search, or the empty string on + * exhaustion. Note that the [array anymore] command may well have already + * pulled a value from the hash enumeration, so we have to check the cache + * there first. + */ + + while (1) { + Tcl_HashEntry *hPtr = searchPtr->nextEntry; + + if (hPtr == NULL) { + hPtr = Tcl_NextHashEntry(&searchPtr->search); + if (hPtr == NULL) { + return TCL_OK; + } + } else { + searchPtr->nextEntry = NULL; + } + varPtr = VarHashGetValue(hPtr); + if (!TclIsVarUndefined(varPtr)) { + Tcl_SetObjResult(interp, VarHashGetKey(varPtr)); + return TCL_OK; + } + } +} + +/* + *---------------------------------------------------------------------- + * + * ArrayDoneSearchCmd -- + * + * This object-based function is invoked to process the "array + * donesearch" Tcl command. See the user documentation for details on + * what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +ArrayDoneSearchCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr; + Tcl_HashEntry *hPtr; + Tcl_Obj *varNamePtr; + ArraySearch *searchPtr, *prevPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); + return TCL_ERROR; + } + + /* + * Locate the array variable + */ + + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); + + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { + return TCL_ERROR; + } + } + + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. + */ + + if ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)) { + Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + "\" isn't an array", NULL); + return TCL_ERROR; + } + + /* + * Get the search. + */ + + searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[2]); + if (searchPtr == NULL) { + return TCL_ERROR; + } + + /* + * Unhook the search from the list of searches associated with the + * variable. + */ + + hPtr = Tcl_FindHashEntry(&iPtr->varSearches, (char *) varPtr); + if (searchPtr == Tcl_GetHashValue(hPtr)) { + if (searchPtr->nextPtr) { + Tcl_SetHashValue(hPtr, searchPtr->nextPtr); + } else { + varPtr->flags &= ~VAR_SEARCH_ACTIVE; + Tcl_DeleteHashEntry(hPtr); + } + } else { + for (prevPtr=Tcl_GetHashValue(hPtr) ;; prevPtr=prevPtr->nextPtr) { + if (prevPtr->nextPtr == searchPtr) { + prevPtr->nextPtr = searchPtr->nextPtr; + break; + } + } + } + ckfree((char *) searchPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ArrayExistsCmd -- + * + * This object-based function is invoked to process the "array exists" + * Tcl command. See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +ArrayExistsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr; + int notArray; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); + return TCL_ERROR; + } + + /* + * Locate the array variable + */ + + varPtr = TclObjLookupVarEx(interp, objv[1], NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); + + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, objv[1], NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { + return TCL_ERROR; + } + } + + /* + * Check whether we've actually got an array variable. + */ + + notArray = ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)); + Tcl_SetObjResult(interp, iPtr->execEnvPtr->constants[!notArray]); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ArrayGetCmd -- + * + * This object-based function is invoked to process the "array get" Tcl + * command. See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +static int +ArrayGetCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr, *varPtr2; + Tcl_Obj *varNamePtr, *namePtr, *valuePtr, *nameLstPtr, *tmpResPtr; + Tcl_Obj **namePtrPtr; + Tcl_HashSearch search; + const char *pattern; + int i, count, result; + + if ((objc != 2) && (objc != 3)) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName ?pattern?"); + return TCL_ERROR; + } + + /* + * Locate the array variable + */ + + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); + + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { + return TCL_ERROR; + } + } + + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. If not an array, it's an empty result. + */ + + if ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)) { + return TCL_OK; + } + + pattern = (objc == 3 ? TclGetString(objv[2]) : NULL); + + /* + * Store the array names in a new object. + */ + + TclNewObj(nameLstPtr); + Tcl_IncrRefCount(nameLstPtr); + if ((pattern != NULL) && TclMatchIsTrivial(pattern)) { + varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[3]); + if (varPtr2 == NULL) { + goto searchDone; + } + if (TclIsVarUndefined(varPtr2)) { + goto searchDone; + } + result = Tcl_ListObjAppendElement(interp, nameLstPtr, + VarHashGetKey(varPtr2)); + if (result != TCL_OK) { + TclDecrRefCount(nameLstPtr); + return result; + } + goto searchDone; + } + + for (varPtr2 = VarHashFirstVar(varPtr->value.tablePtr, &search); + varPtr2; varPtr2 = VarHashNextVar(&search)) { + if (TclIsVarUndefined(varPtr2)) { + continue; + } + namePtr = VarHashGetKey(varPtr2); + if (pattern && !Tcl_StringMatch(TclGetString(namePtr), pattern)) { + continue; /* Element name doesn't match pattern. */ + } + + result = Tcl_ListObjAppendElement(interp, nameLstPtr, namePtr); + if (result != TCL_OK) { + TclDecrRefCount(nameLstPtr); + return result; + } + } + + /* + * Make sure the Var structure of the array is not removed by a trace + * while we're working. + */ + + searchDone: + if (TclIsVarInHash(varPtr)) { + VarHashRefCount(varPtr)++; + } + + /* + * Get the array values corresponding to each element name. + */ + + TclNewObj(tmpResPtr); + result = Tcl_ListObjGetElements(interp, nameLstPtr, &count, &namePtrPtr); + if (result != TCL_OK) { + goto errorInArrayGet; + } + + for (i=0 ; i 4)) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName ?mode? ?pattern?"); return TCL_ERROR; } @@ -2823,7 +3628,7 @@ Tcl_ArrayObjCmd( * Locate the array variable */ - varNamePtr = objv[2]; + varNamePtr = objv[1]; varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); @@ -2844,683 +3649,504 @@ Tcl_ArrayObjCmd( /* * Verify that it is indeed an array variable. This test comes after the * traces - the variable may actually become an array as an effect of said - * traces. + * traces. If not an array, the result is empty. */ - notArray = 0; if ((varPtr == NULL) || !TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr)) { - notArray = 1; + return TCL_OK; } - switch (index) { - case ARRAY_ANYMORE: { - ArraySearch *searchPtr; - - if (objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName searchId"); - return TCL_ERROR; - } - if (notArray) { - goto error; - } - searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[3]); - if (searchPtr == NULL) { - return TCL_ERROR; - } - while (1) { - Var *varPtr2; - - if (searchPtr->nextEntry != NULL) { - varPtr2 = VarHashGetValue(searchPtr->nextEntry); - if (!TclIsVarUndefined(varPtr2)) { - break; - } - } - searchPtr->nextEntry = Tcl_NextHashEntry(&searchPtr->search); - if (searchPtr->nextEntry == NULL) { - Tcl_SetObjResult(interp, iPtr->execEnvPtr->constants[0]); - return TCL_OK; - } - } - Tcl_SetObjResult(interp, iPtr->execEnvPtr->constants[1]); - break; - } - case ARRAY_DONESEARCH: { - ArraySearch *searchPtr, *prevPtr; + /* + * Finish parsing the arguments. + */ - if (objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName searchId"); - return TCL_ERROR; - } - if (notArray) { - goto error; - } - searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[3]); - if (searchPtr == NULL) { + if (objc == 3) { + patternPtr = objv[2]; + pattern = TclGetString(patternPtr); + } else if (objc == 4) { + patternPtr = objv[3]; + pattern = TclGetString(patternPtr); + if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, + &mode) != TCL_OK) { return TCL_ERROR; } - hPtr = Tcl_FindHashEntry(&iPtr->varSearches,(char *) varPtr); - if (searchPtr == Tcl_GetHashValue(hPtr)) { - if (searchPtr->nextPtr) { - Tcl_SetHashValue(hPtr, searchPtr->nextPtr); - } else { - varPtr->flags &= ~VAR_SEARCH_ACTIVE; - Tcl_DeleteHashEntry(hPtr); - } - } else { - for (prevPtr=Tcl_GetHashValue(hPtr) ;; prevPtr=prevPtr->nextPtr) { - if (prevPtr->nextPtr == searchPtr) { - prevPtr->nextPtr = searchPtr->nextPtr; - break; - } - } - } - ckfree((char *) searchPtr); - break; + } else { + patternPtr = NULL; + pattern = NULL; } - case ARRAY_NEXTELEMENT: { - ArraySearch *searchPtr; - Tcl_HashEntry *hPtr; - Var *varPtr2; - if (objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName searchId"); - return TCL_ERROR; - } - if (notArray) { - goto error; - } - searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[3]); - if (searchPtr == NULL) { - return TCL_ERROR; - } - while (1) { - hPtr = searchPtr->nextEntry; - if (hPtr == NULL) { - hPtr = Tcl_NextHashEntry(&searchPtr->search); - if (hPtr == NULL) { - return TCL_OK; - } - } else { - searchPtr->nextEntry = NULL; - } - varPtr2 = VarHashGetValue(hPtr); - if (!TclIsVarUndefined(varPtr2)) { - break; - } - } - Tcl_SetObjResult(interp, VarHashGetKey(varPtr2)); - break; - } - case ARRAY_STARTSEARCH: { - ArraySearch *searchPtr; - int isNew; - const char *varName = TclGetString(varNamePtr); + /* + * Check for the trivial cases where we can use a direct lookup. + */ - if (objc != 3) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName"); - return TCL_ERROR; - } - if (notArray) { - goto error; - } - searchPtr = (ArraySearch *) ckalloc(sizeof(ArraySearch)); - hPtr = Tcl_CreateHashEntry(&iPtr->varSearches, - (char *) varPtr, &isNew); - if (isNew) { - searchPtr->id = 1; - Tcl_AppendResult(interp, "s-1-", varName, NULL); - varPtr->flags |= VAR_SEARCH_ACTIVE; - searchPtr->nextPtr = NULL; - } else { - char string[TCL_INTEGER_SPACE]; + TclNewObj(resultPtr); + if ((mode==OPT_GLOB && pattern && TclMatchIsTrivial(pattern)) + || (mode==OPT_EXACT)) { + varPtr2 = VarHashFindVar(varPtr->value.tablePtr, patternPtr); + if ((varPtr2 != NULL) && !TclIsVarUndefined(varPtr2)) { + /* + * This can't fail; lappending to an empty object always works. + */ - searchPtr->id = ((ArraySearch *) Tcl_GetHashValue(hPtr))->id + 1; - TclFormatInt(string, searchPtr->id); - Tcl_AppendResult(interp, "s-", string, "-", varName, NULL); - searchPtr->nextPtr = Tcl_GetHashValue(hPtr); + Tcl_ListObjAppendElement(NULL, resultPtr, VarHashGetKey(varPtr2)); } - searchPtr->varPtr = varPtr; - searchPtr->nextEntry = VarHashFirstEntry(varPtr->value.tablePtr, - &searchPtr->search); - Tcl_SetHashValue(hPtr, searchPtr); - break; + Tcl_SetObjResult(interp, resultPtr); + return TCL_OK; } - case ARRAY_EXISTS: - if (objc != 3) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName"); - return TCL_ERROR; - } - Tcl_SetObjResult(interp, iPtr->execEnvPtr->constants[!notArray]); - break; - case ARRAY_GET: { - Tcl_HashSearch search; - Var *varPtr2; - const char *pattern = NULL; - const char *name; - Tcl_Obj *namePtr, *valuePtr, *nameLstPtr, *tmpResPtr, **namePtrPtr; - int i, count; - - if ((objc != 3) && (objc != 4)) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName ?pattern?"); - return TCL_ERROR; - } - if (notArray) { - return TCL_OK; - } - if (objc == 4) { - pattern = TclGetString(objv[3]); - } - - /* - * Store the array names in a new object. - */ + /* + * Must scan the array to select the elements. + */ - TclNewObj(nameLstPtr); - Tcl_IncrRefCount(nameLstPtr); - if ((pattern != NULL) && TclMatchIsTrivial(pattern)) { - varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[3]); - if (varPtr2 == NULL) { - goto searchDone; - } - if (TclIsVarUndefined(varPtr2)) { - goto searchDone; - } - result = Tcl_ListObjAppendElement(interp, nameLstPtr, - VarHashGetKey(varPtr2)); - if (result != TCL_OK) { - TclDecrRefCount(nameLstPtr); - return result; + for (varPtr2=VarHashFirstVar(varPtr->value.tablePtr, &search); + varPtr2!=NULL ; varPtr2=VarHashNextVar(&search)) { + if (TclIsVarUndefined(varPtr2)) { + continue; + } + namePtr = VarHashGetKey(varPtr2); + if (patternPtr) { + const char *name = TclGetString(namePtr); + int matched; + + switch ((enum options) mode) { + case OPT_EXACT: + Tcl_Panic("exact matching shouldn't get here"); + case OPT_GLOB: + matched = Tcl_StringMatch(name, pattern); + break; + case OPT_REGEXP: + matched = Tcl_RegExpMatch(interp, name, pattern); + if (matched < 0) { + TclDecrRefCount(resultPtr); + return TCL_ERROR; + } + break; } - goto searchDone; - } - for (varPtr2 = VarHashFirstVar(varPtr->value.tablePtr, &search); - varPtr2; varPtr2 = VarHashNextVar(&search)) { - if (TclIsVarUndefined(varPtr2)) { + if (matched == 0) { continue; } - namePtr = VarHashGetKey(varPtr2); - name = TclGetString(namePtr); - if ((objc == 4) && !Tcl_StringMatch(name, pattern)) { - continue; /* Element name doesn't match pattern. */ - } - - result = Tcl_ListObjAppendElement(interp, nameLstPtr, namePtr); - if (result != TCL_OK) { - TclDecrRefCount(nameLstPtr); - return result; - } } - searchDone: - /* - * Make sure the Var structure of the array is not removed by a trace - * while we're working. - */ - - if (TclIsVarInHash(varPtr)) { - VarHashRefCount(varPtr)++; - } + Tcl_ListObjAppendElement(NULL, resultPtr, namePtr); + } + Tcl_SetObjResult(interp, resultPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ArraySetCmd -- + * + * This object-based function is invoked to process the "array set" Tcl + * command. See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ - /* - * Get the array values corresponding to each element name. - */ + /* ARGSUSED */ +static int +ArraySetCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr; - TclNewObj(tmpResPtr); - result = Tcl_ListObjGetElements(interp, nameLstPtr, &count, - &namePtrPtr); - if (result != TCL_OK) { - goto errorInArrayGet; - } + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName list"); + return TCL_ERROR; + } - for (i=0 ; i 5)) { - Tcl_WrongNumArgs(interp, 2,objv, "arrayName ?mode? ?pattern?"); + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, objv[1], NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; } - if (notArray) { - return TCL_OK; - } - if (objc == 4) { - patternPtr = objv[3]; - pattern = TclGetString(patternPtr); - } else if (objc == 5) { - patternPtr = objv[4]; - pattern = TclGetString(patternPtr); - if (Tcl_GetIndexFromObj(interp, objv[3], options, "option", 0, - &mode) != TCL_OK) { - return TCL_ERROR; - } - } else { - patternPtr = NULL; - pattern = NULL; - } - TclNewObj(resultPtr); - if (((enum options) mode)==OPT_GLOB && pattern!=NULL && - TclMatchIsTrivial(pattern)) { - varPtr2 = VarHashFindVar(varPtr->value.tablePtr, patternPtr); - if ((varPtr2 != NULL) && !TclIsVarUndefined(varPtr2)) { - result = Tcl_ListObjAppendElement(interp, resultPtr, - VarHashGetKey(varPtr2)); - if (result != TCL_OK) { - TclDecrRefCount(resultPtr); - return result; - } - } - Tcl_SetObjResult(interp, resultPtr); - return TCL_OK; - } - for (varPtr2=VarHashFirstVar(varPtr->value.tablePtr, &search); - varPtr2!=NULL ; varPtr2=VarHashNextVar(&search)) { - if (TclIsVarUndefined(varPtr2)) { - continue; - } - namePtr = VarHashGetKey(varPtr2); - name = TclGetString(namePtr); - if (objc > 3) { - switch ((enum options) mode) { - case OPT_EXACT: - matched = (strcmp(name, pattern) == 0); - break; - case OPT_GLOB: - matched = Tcl_StringMatch(name, pattern); - break; - case OPT_REGEXP: - matched = Tcl_RegExpMatch(interp, name, pattern); - if (matched < 0) { - TclDecrRefCount(resultPtr); - return TCL_ERROR; - } - break; - } - if (matched == 0) { - continue; - } - } - - result = Tcl_ListObjAppendElement(interp, resultPtr, namePtr); - if (result != TCL_OK) { - TclDecrRefCount(namePtr); /* Free unneeded name obj. */ - return result; - } - } - Tcl_SetObjResult(interp, resultPtr); - break; } - case ARRAY_SET: - if (objc != 4) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName list"); - return TCL_ERROR; - } - return TclArraySet(interp, objv[2], objv[3]); - case ARRAY_UNSET: - if ((objc != 3) && (objc != 4)) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName ?pattern?"); - return TCL_ERROR; - } - if (notArray) { - return TCL_OK; - } - if (objc == 3) { - /* - * When no pattern is given, just unset the whole array. - */ - - return TclObjUnsetVar2(interp, varNamePtr, NULL, 0); - } else { - Tcl_HashSearch search; - Var *varPtr2, *protectedVarPtr; - const char *pattern = TclGetString(objv[3]); - - /* - * With a trivial pattern, we can just unset. - */ - - if (TclMatchIsTrivial(pattern)) { - varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[3]); - if (varPtr2 != NULL && !TclIsVarUndefined(varPtr2)) { - return TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, - objv[3], 0, -1); - } - return TCL_OK; - } - - /* - * Non-trivial case (well, deeply tricky really). We peek inside - * the hash iterator in order to allow us to guarantee that the - * following element in the array will not be scrubbed until we - * have dealt with it. This stops the overall iterator from ending - * up pointing into deallocated memory. [Bug 2939073] - */ - - protectedVarPtr = NULL; - for (varPtr2=VarHashFirstVar(varPtr->value.tablePtr, &search); - varPtr2!=NULL ; varPtr2=VarHashNextVar(&search)) { - /* - * Drop the extra ref immediately. We don't need to free it at - * this point though; we'll be unsetting it if necessary soon. - */ - - if (varPtr2 == protectedVarPtr) { - VarHashRefCount(varPtr2)--; - } - /* - * Guard the next item in the search chain by incrementing its - * refcount. This guarantees that the hash table iterator - * won't be dangling on the next time through the loop. - */ + return TclArraySet(interp, objv[1], objv[2]); +} + +/* + *---------------------------------------------------------------------- + * + * ArraySizeCmd -- + * + * This object-based function is invoked to process the "array size" Tcl + * command. See the user documentation for details on what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ - if (search.nextEntryPtr != NULL) { - protectedVarPtr = VarHashGetValue(search.nextEntryPtr); - VarHashRefCount(protectedVarPtr)++; - } else { - protectedVarPtr = NULL; - } + /* ARGSUSED */ +static int +ArraySizeCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr; + Tcl_Obj *varNamePtr; + Tcl_HashSearch search; + Var *varPtr2; + int size = 0; - if (!TclIsVarUndefined(varPtr2)) { - Tcl_Obj *namePtr = VarHashGetKey(varPtr2); + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); + return TCL_ERROR; + } - if (Tcl_StringMatch(TclGetString(namePtr), pattern) - && TclPtrUnsetVar(interp, varPtr2, varPtr, - varNamePtr, namePtr, 0, -1) != TCL_OK) { - /* - * If we incremented a refcount, we must decrement it - * here as we will not be coming back properly due to - * the error. - */ + /* + * Locate the array variable + */ - if (protectedVarPtr) { - VarHashRefCount(protectedVarPtr)--; - } - return TCL_ERROR; - } - } - } - break; - } + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); - case ARRAY_SIZE: { - Tcl_HashSearch search; - Var *varPtr2; - int size; + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ - if (objc != 3) { - Tcl_WrongNumArgs(interp, 2, objv, "arrayName"); + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; } - size = 0; + } + + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. We can only iterate over the array if it exists... + */ + if (varPtr && TclIsVarArray(varPtr) && !TclIsVarUndefined(varPtr)) { /* * Must iterate in order to get chance to check for present but * "undefined" entries. */ - if (!notArray) { - for (varPtr2=VarHashFirstVar(varPtr->value.tablePtr, &search); - varPtr2!=NULL ; varPtr2=VarHashNextVar(&search)) { - if (TclIsVarUndefined(varPtr2)) { - continue; - } + for (varPtr2=VarHashFirstVar(varPtr->value.tablePtr, &search); + varPtr2!=NULL ; varPtr2=VarHashNextVar(&search)) { + if (!TclIsVarUndefined(varPtr2)) { size++; } } - Tcl_SetObjResult(interp, Tcl_NewIntObj(size)); - break; } - case ARRAY_STATISTICS: { - char *stats; + Tcl_SetObjResult(interp, Tcl_NewIntObj(size)); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * ArrayStatsCmd -- + * + * This object-based function is invoked to process the "array + * statistics" Tcl command. See the user documentation for details on + * what it does. + * + * Results: + * A standard Tcl result object. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ - if (notArray) { - goto error; - } + /* ARGSUSED */ +static int +ArrayStatsCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Interp *iPtr = (Interp *) interp; + Var *varPtr, *arrayPtr; + Tcl_Obj *varNamePtr; + char *stats; - stats = Tcl_HashStats((Tcl_HashTable *) varPtr->value.tablePtr); - if (stats != NULL) { - Tcl_SetObjResult(interp, Tcl_NewStringObj(stats, -1)); - ckfree((char *)stats); - } else { - Tcl_SetResult(interp,"error reading array statistics",TCL_STATIC); + if (objc != 2) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); + return TCL_ERROR; + } + + /* + * Locate the array variable + */ + + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); + + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; } - break; } + + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. + */ + + if ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)) { + Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + "\" isn't an array", NULL); + return TCL_ERROR; + } + + stats = Tcl_HashStats((Tcl_HashTable *) varPtr->value.tablePtr); + if (stats == NULL) { + Tcl_SetResult(interp, "error reading array statistics", TCL_STATIC); + return TCL_ERROR; } + Tcl_SetObjResult(interp, Tcl_NewStringObj(stats, -1)); + ckfree(stats); return TCL_OK; - - error: - Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), - "\" isn't an array", NULL); - return TCL_ERROR; } /* *---------------------------------------------------------------------- * - * TclArraySet -- + * ArrayUnsetCmd -- * - * Set the elements of an array. If there are no elements to set, create - * an empty array. This routine is used by the Tcl_ArrayObjCmd and by the - * TclSetupEnv routine. + * This object-based function is invoked to process the "array unset" Tcl + * command. See the user documentation for details on what it does. * * Results: * A standard Tcl result object. * * Side effects: - * A variable will be created if one does not already exist. + * See the user documentation. * *---------------------------------------------------------------------- */ -int -TclArraySet( - Tcl_Interp *interp, /* Current interpreter. */ - Tcl_Obj *arrayNameObj, /* The array name. */ - Tcl_Obj *arrayElemObj) /* The array elements list or dict. If this is - * NULL, create an empty array. */ + /* ARGSUSED */ +static int +ArrayUnsetCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) { + Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; - int result, i; + Tcl_Obj *varNamePtr; + Tcl_HashSearch search; + Var *varPtr2, *protectedVarPtr; + const char *pattern; - varPtr = TclObjLookupVarEx(interp, arrayNameObj, NULL, - /*flags*/ TCL_LEAVE_ERR_MSG, /*msg*/ "set", /*createPart1*/ 1, - /*createPart2*/ 1, &arrayPtr); - if (varPtr == NULL) { - return TCL_ERROR; - } - if (arrayPtr) { - CleanupVar(varPtr, arrayPtr); - TclObjVarErrMsg(interp, arrayNameObj, NULL, "set", needArray, -1); + if ((objc != 2) && (objc != 3)) { + Tcl_WrongNumArgs(interp, 1, objv, "arrayName ?pattern?"); return TCL_ERROR; } - if (arrayElemObj == NULL) { - goto ensureArray; - } - /* - * Install the contents of the dictionary or list into the array. + * Locate the array variable */ - if (arrayElemObj->typePtr == &tclDictType) { - Tcl_Obj *keyPtr, *valuePtr; - Tcl_DictSearch search; - int done; + varNamePtr = objv[1]; + varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); - if (Tcl_DictObjSize(interp, arrayElemObj, &done) != TCL_OK) { + /* + * Special array trace used to keep the env array in sync for array names, + * array get, etc. + */ + + if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) + && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| + TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; } - if (done == 0) { - /* - * Empty, so we'll just force the array to be properly existing - * instead. - */ + } - goto ensureArray; - } + /* + * Verify that it is indeed an array variable. This test comes after the + * traces - the variable may actually become an array as an effect of said + * traces. + */ + if ((varPtr == NULL) || !TclIsVarArray(varPtr) + || TclIsVarUndefined(varPtr)) { + return TCL_OK; + } + + if (objc == 2) { /* - * Don't need to look at result of Tcl_DictObjFirst as we've just - * successfully used a dictionary operation on the same object. + * When no pattern is given, just unset the whole array. */ - for (Tcl_DictObjFirst(interp, arrayElemObj, &search, - &keyPtr, &valuePtr, &done) ; !done ; - Tcl_DictObjNext(&search, &keyPtr, &valuePtr, &done)) { - /* - * At this point, it would be nice if the key was directly usable - * by the array. This isn't the case though. - */ + return TclObjUnsetVar2(interp, varNamePtr, NULL, 0); + } - Var *elemVarPtr = TclLookupArrayElement(interp, arrayNameObj, - keyPtr, TCL_LEAVE_ERR_MSG, "set", 1, 1, varPtr, -1); + /* + * With a trivial pattern, we can just unset. + */ - if ((elemVarPtr == NULL) || - (TclPtrSetVar(interp, elemVarPtr, varPtr, arrayNameObj, - keyPtr, valuePtr, TCL_LEAVE_ERR_MSG, -1) == NULL)) { - Tcl_DictObjDone(&search); - return TCL_ERROR; - } + pattern = TclGetString(objv[2]); + if (TclMatchIsTrivial(pattern)) { + varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[2]); + if (!varPtr2 || TclIsVarUndefined(varPtr2)) { + return TCL_OK; } - return TCL_OK; - } else { + return TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, objv[2], 0, + -1); + } + + /* + * Non-trivial case (well, deeply tricky really). We peek inside the hash + * iterator in order to allow us to guarantee that the following element + * in the array will not be scrubbed until we have dealt with it. This + * stops the overall iterator from ending up pointing into deallocated + * memory. [Bug 2939073] + */ + + protectedVarPtr = NULL; + for (varPtr2=VarHashFirstVar(varPtr->value.tablePtr, &search); + varPtr2!=NULL ; varPtr2=VarHashNextVar(&search)) { /* - * Not a dictionary, so assume (and convert to, for backward- - * -compatability reasons) a list. + * Drop the extra ref immediately. We don't need to free it at this + * point though; we'll be unsetting it if necessary soon. */ - int elemLen; - Tcl_Obj **elemPtrs, *copyListObj; - - result = TclListObjGetElements(interp, arrayElemObj, - &elemLen, &elemPtrs); - if (result != TCL_OK) { - return result; - } - if (elemLen & 1) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "list must have an even number of elements", -1)); - return TCL_ERROR; - } - if (elemLen == 0) { - goto ensureArray; + if (varPtr2 == protectedVarPtr) { + if (VarHashRefCount(varPtr2)-- == 1) { + CleanupVar(varPtr2, varPtr); + } } /* - * We needn't worry about traces invalidating arrayPtr: should that be - * the case, TclPtrSetVar will return NULL so that we break out of the - * loop and return an error. + * Guard the next item in the search chain by incrementing its + * refcount. This guarantees that the hash table iterator won't be + * dangling on the next time through the loop. */ - copyListObj = TclListObjCopy(NULL, arrayElemObj); - for (i=0 ; ivalue.tablePtr = (TclVarHashTable *) - ckalloc(sizeof(TclVarHashTable)); - TclInitVarHashTable(varPtr->value.tablePtr, TclGetVarNsPtr(varPtr)); return TCL_OK; } /* *---------------------------------------------------------------------- * + * TclInitArrayCmd -- + * + * This creates the ensemble for the "array" command. + * + * Results: + * The handle for the created ensemble. + * + * Side effects: + * Creates a command in the global namespace. + * + *---------------------------------------------------------------------- + */ + + /* ARGSUSED */ +Tcl_Command +TclInitArrayCmd( + Tcl_Interp *interp) /* Current interpreter. */ +{ + static const EnsembleImplMap arrayImplMap[] = { + {"anymore", ArrayAnyMoreCmd, NULL, NULL, NULL}, + {"donesearch", ArrayDoneSearchCmd, NULL, NULL, NULL}, + {"exists", ArrayExistsCmd, NULL, NULL, NULL}, + {"get", ArrayGetCmd, NULL, NULL, NULL}, + {"names", ArrayNamesCmd, NULL, NULL, NULL}, + {"nextelement", ArrayNextElementCmd, NULL, NULL, NULL}, + {"set", ArraySetCmd, NULL, NULL, NULL}, + {"size", ArraySizeCmd, NULL, NULL, NULL}, + {"startsearch", ArrayStartSearchCmd, NULL, NULL, NULL}, + {"statistics", ArrayStatsCmd, NULL, NULL, NULL}, + {"unset", ArrayUnsetCmd, NULL, NULL, NULL}, + {NULL, NULL, NULL, NULL, NULL} + }; + + return TclMakeEnsemble(interp, "array", arrayImplMap); +} + +/* + *---------------------------------------------------------------------- + * * ObjMakeUpvar -- * * This function does all of the work of the "global" and "upvar" diff --git a/tests/set-old.test b/tests/set-old.test index 150d6f7..54befbd 100644 --- a/tests/set-old.test +++ b/tests/set-old.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: set-old.test,v 1.21 2009/06/24 15:17:40 dgp Exp $ +# RCS: @(#) $Id: set-old.test,v 1.22 2010/02/02 16:12:01 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -312,10 +312,10 @@ test set-old-7.18 {unset command, -nocomplain (no abbreviation)} { test set-old-8.1 {array command} { list [catch {array} msg] $msg -} {1 {wrong # args: should be "array option arrayName ?arg ...?"}} +} {1 {wrong # args: should be "array subcommand ?arg ...?"}} test set-old-8.2 {array command} { list [catch {array a} msg] $msg -} {1 {wrong # args: should be "array option arrayName ?arg ...?"}} +} {1 {wrong # args: should be "array anymore arrayName searchId"}} test set-old-8.3 {array command} { catch {unset a} list [catch {array anymore a b} msg] $msg @@ -337,7 +337,7 @@ test set-old-8.6 {array command} { catch {unset a} set a(22) 3 list [catch {array gorp a} msg] $msg -} {1 {bad option "gorp": must be anymore, donesearch, exists, get, names, nextelement, set, size, startsearch, statistics, or unset}} +} {1 {unknown or ambiguous subcommand "gorp": must be anymore, donesearch, exists, get, names, nextelement, set, size, startsearch, statistics, or unset}} test set-old-8.7 {array command, anymore option} { catch {unset a} list [catch {array anymore a x} msg] $msg @@ -387,7 +387,7 @@ test set-old-8.14 {array command, exists option, array doesn't exist yet but has } {0 0} test set-old-8.15 {array command, get option} { list [catch {array get} msg] $msg -} {1 {wrong # args: should be "array option arrayName ?arg ...?"}} +} {1 {wrong # args: should be "array get arrayName ?pattern?"}} test set-old-8.16 {array command, get option} { list [catch {array get a b c} msg] $msg } {1 {wrong # args: should be "array get arrayName ?pattern?"}} @@ -788,7 +788,7 @@ test set-old-9.12 {array enumeration with traced undefined elements} { test set-old-10.1 {array enumeration errors} { list [catch {array start} msg] $msg -} {1 {wrong # args: should be "array option arrayName ?arg ...?"}} +} {1 {wrong # args: should be "array startsearch arrayName"}} test set-old-10.2 {array enumeration errors} { list [catch {array start a b} msg] $msg } {1 {wrong # args: should be "array startsearch arrayName"}} -- cgit v0.12 From 90a77527c88021ee7eb8724aea18498a6bc3ef58 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 3 Feb 2010 13:26:03 +0000 Subject: More corrections to the [array unset] command. --- ChangeLog | 4 ++++ generic/tclVar.c | 56 ++++++++++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1dd62b0..e15d52e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-02-03 Donal K. Fellows + + * generic/tclVar.c (ArrayUnsetCmd): More corrections. + 2010-02-02 Donal K. Fellows * generic/tclVar.c: Turned the [array] command into a true ensemble. diff --git a/generic/tclVar.c b/generic/tclVar.c index d97eb27..287b03b 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.189 2010/02/02 16:12:00 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.190 2010/02/03 13:26:04 dkf Exp $ */ #include "tclInt.h" @@ -3981,11 +3981,11 @@ ArrayUnsetCmd( Tcl_Obj *const objv[]) { Interp *iPtr = (Interp *) interp; - Var *varPtr, *arrayPtr; - Tcl_Obj *varNamePtr; + Var *varPtr, *arrayPtr, *varPtr2, *protectedVarPtr; + Tcl_Obj *varNamePtr, *namePtr; Tcl_HashSearch search; - Var *varPtr2, *protectedVarPtr; const char *pattern; + const int unsetFlags = 0; /* Should this be TCL_LEAVE_ERR_MSG? */ if ((objc != 2) && (objc != 3)) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName ?pattern?"); @@ -4043,8 +4043,8 @@ ArrayUnsetCmd( if (!varPtr2 || TclIsVarUndefined(varPtr2)) { return TCL_OK; } - return TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, objv[2], 0, - -1); + return TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, objv[2], + unsetFlags, -1); } /* @@ -4064,14 +4064,12 @@ ArrayUnsetCmd( */ if (varPtr2 == protectedVarPtr) { - if (VarHashRefCount(varPtr2)-- == 1) { - CleanupVar(varPtr2, varPtr); - } + VarHashRefCount(varPtr2)--; } /* - * Guard the next item in the search chain by incrementing its - * refcount. This guarantees that the hash table iterator won't be + * Guard the next (peeked) item in the search chain by incrementing + * its refcount. This guarantees that the hash table iterator won't be * dangling on the next time through the loop. */ @@ -4082,24 +4080,30 @@ ArrayUnsetCmd( protectedVarPtr = NULL; } - if (!TclIsVarUndefined(varPtr2)) { - Tcl_Obj *namePtr = VarHashGetKey(varPtr2); + /* + * If the variable is undefined, clean it out as it has been hit by + * something else (i.e., an unset trace). + */ - if (Tcl_StringMatch(TclGetString(namePtr), pattern) - && TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, - namePtr, 0, -1) != TCL_OK) { - /* - * If we incremented a refcount, we must decrement it here as - * we will not be coming back properly due to the error. - */ + if (TclIsVarUndefined(varPtr2)) { + CleanupVar(varPtr2, varPtr); + continue; + } - if (protectedVarPtr) { - if (VarHashRefCount(protectedVarPtr)-- == 1) { - CleanupVar(protectedVarPtr, varPtr); - } - } - return TCL_ERROR; + namePtr = VarHashGetKey(varPtr2); + if (Tcl_StringMatch(TclGetString(namePtr), pattern) + && TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, + namePtr, unsetFlags, -1) != TCL_OK) { + /* + * If we incremented a refcount, we must decrement it here as we + * will not be coming back properly due to the error. + */ + + if (protectedVarPtr) { + VarHashRefCount(protectedVarPtr)--; + CleanupVar(protectedVarPtr, varPtr); } + return TCL_ERROR; } } return TCL_OK; -- cgit v0.12 From 81589b0f3b1476474b101a8677920c15742058e8 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Feb 2010 10:53:33 +0000 Subject: Minor updates: more errorcodes, less C stack levels for old APIs --- ChangeLog | 5 + generic/tclVar.c | 289 ++++++++++++++++++++++++++++++++++++------------------- 2 files changed, 196 insertions(+), 98 deletions(-) diff --git a/ChangeLog b/ChangeLog index e15d52e..9047968 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-04 Donal K. Fellows + + * generic/tclVar.c: Added more use of error-codes and reduced the + stack overhead of older interfaces. + 2010-02-03 Donal K. Fellows * generic/tclVar.c (ArrayUnsetCmd): More corrections. diff --git a/generic/tclVar.c b/generic/tclVar.c index 287b03b..f39383d 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.190 2010/02/03 13:26:04 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.191 2010/02/04 10:53:34 dkf Exp $ */ #include "tclInt.h" @@ -28,7 +28,7 @@ static Tcl_HashEntry * AllocVarEntry(Tcl_HashTable *tablePtr, void *keyPtr); static void FreeVarEntry(Tcl_HashEntry *hPtr); static int CompareVarKeys(void *keyPtr, Tcl_HashEntry *hPtr); -static unsigned int HashVarKey(Tcl_HashTable *tablePtr, void *keyPtr); +static unsigned HashVarKey(Tcl_HashTable *tablePtr, void *keyPtr); static const Tcl_HashKeyType tclVarHashKeyType = { TCL_HASH_KEY_TYPE_VERSION, /* version */ @@ -770,7 +770,7 @@ TclObjLookupVarEx( if (flags & TCL_LEAVE_ERR_MSG) { part1 = TclGetString(part1Ptr); TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, - "Cached variable reference is NULL.", -1); + "cached variable reference is NULL.", -1); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } return NULL; @@ -1012,10 +1012,10 @@ TclLookupSimpleVar( register Tcl_Obj *objPtr = *objPtrPtr; if (objPtr) { - const char *localName = TclGetString(objPtr); + const char *localNameStr = TclGetString(objPtr); - if ((varName[0] == localName[0]) - && (strcmp(varName, localName) == 0)) { + if ((varName[0] == localNameStr[0]) + && (strcmp(varName, localNameStr) == 0)) { *indexPtr = i; return (Var *) &varFramePtr->compiledLocals[i]; } @@ -1115,6 +1115,7 @@ TclLookupArrayElement( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, noSuchVar, index); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } return NULL; } @@ -1206,7 +1207,17 @@ Tcl_GetVar( * TCL_NAMESPACE_ONLY or TCL_LEAVE_ERR_MSG * bits. */ { - return Tcl_GetVar2(interp, varName, NULL, flags); + Tcl_Obj *varNamePtr, *resultPtr; + + varNamePtr = Tcl_NewStringObj(varName, -1); + Tcl_IncrRefCount(varNamePtr); + resultPtr = Tcl_ObjGetVar2(interp, varNamePtr, NULL, flags); + TclDecrRefCount(varNamePtr); + + if (resultPtr == NULL) { + return NULL; + } + return TclGetString(resultPtr); } /* @@ -1244,13 +1255,27 @@ Tcl_GetVar2( * TCL_NAMESPACE_ONLY and TCL_LEAVE_ERR_MSG * * bits. */ { - Tcl_Obj *objPtr; + Tcl_Obj *resultPtr, *part1Ptr, *part2Ptr; + + part1Ptr = Tcl_NewStringObj(part1, -1); + Tcl_IncrRefCount(part1Ptr); + if (part2) { + part2Ptr = Tcl_NewStringObj(part2, -1); + Tcl_IncrRefCount(part2Ptr); + } else { + part2Ptr = NULL; + } - objPtr = Tcl_GetVar2Ex(interp, part1, part2, flags); - if (objPtr == NULL) { + resultPtr = Tcl_ObjGetVar2(interp, part1Ptr, part2Ptr, flags); + + Tcl_DecrRefCount(part1Ptr); + if (part2Ptr) { + Tcl_DecrRefCount(part2Ptr); + } + if (resultPtr == NULL) { return NULL; } - return TclGetString(objPtr); + return TclGetString(resultPtr); } /* @@ -1533,7 +1558,21 @@ Tcl_SetVar( * TCL_APPEND_VALUE, TCL_LIST_ELEMENT, * TCL_LEAVE_ERR_MSG. */ { - return Tcl_SetVar2(interp, varName, NULL, newValue, flags); + Tcl_Obj *valuePtr, *varNamePtr, *varValuePtr; + + varNamePtr = Tcl_NewStringObj(varName, -1); + Tcl_IncrRefCount(varNamePtr); + valuePtr = Tcl_NewStringObj(newValue, -1); + Tcl_IncrRefCount(valuePtr); + + varValuePtr = Tcl_ObjSetVar2(interp, varNamePtr, NULL, valuePtr, flags); + + Tcl_DecrRefCount(varNamePtr); + Tcl_DecrRefCount(valuePtr); + if (varValuePtr == NULL) { + return NULL; + } + return TclGetString(varValuePtr); } /* @@ -1577,19 +1616,27 @@ Tcl_SetVar2( * TCL_APPEND_VALUE, TCL_LIST_ELEMENT, or * TCL_LEAVE_ERR_MSG. */ { - register Tcl_Obj *valuePtr; + Tcl_Obj *valuePtr, *part1Ptr, *part2Ptr; Tcl_Obj *varValuePtr; - /* - * Create an object holding the variable's new value and use Tcl_SetVar2Ex - * to actually set the variable. - */ - + part1Ptr = Tcl_NewStringObj(part1, -1); + Tcl_IncrRefCount(part1Ptr); + if (part2 != NULL) { + part2Ptr = Tcl_NewStringObj(part2, -1); + Tcl_IncrRefCount(part2Ptr); + } else { + part2Ptr = NULL; + } valuePtr = Tcl_NewStringObj(newValue, -1); Tcl_IncrRefCount(valuePtr); - varValuePtr = Tcl_SetVar2Ex(interp, part1, part2, valuePtr, flags); - Tcl_DecrRefCount(valuePtr); + varValuePtr = Tcl_ObjSetVar2(interp, part1Ptr, part2Ptr, valuePtr, flags); + + Tcl_DecrRefCount(part1Ptr); + if (part2Ptr != NULL) { + Tcl_DecrRefCount(part2Ptr); + } + Tcl_DecrRefCount(valuePtr); if (varValuePtr == NULL) { return NULL; } @@ -1792,9 +1839,11 @@ TclPtrSetVar( if (TclIsVarArrayElement(varPtr)) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "set", danglingElement, index); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ELEMENT", NULL); } else { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "set", danglingVar, index); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); } } goto earlyError; @@ -1807,6 +1856,7 @@ TclPtrSetVar( if (TclIsVarArray(varPtr)) { if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, "set", isArray,index); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", NULL); } goto earlyError; } @@ -2115,7 +2165,21 @@ Tcl_UnsetVar( * TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY or * TCL_LEAVE_ERR_MSG. */ { - return Tcl_UnsetVar2(interp, varName, NULL, flags); + int result; + Tcl_Obj *varNamePtr; + + varNamePtr = Tcl_NewStringObj(varName, -1); + Tcl_IncrRefCount(varNamePtr); + + /* + * Filter to pass through only the flags this interface supports. + */ + + flags &= (TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG); + result = TclObjUnsetVar2(interp, varNamePtr, NULL, flags); + + Tcl_DecrRefCount(varNamePtr); + return result; } /* @@ -2799,6 +2863,7 @@ TclArraySet( if (arrayPtr) { CleanupVar(varPtr, arrayPtr); TclObjVarErrMsg(interp, arrayNameObj, NULL, "set", needArray, -1); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); return TCL_ERROR; } @@ -2868,6 +2933,7 @@ TclArraySet( if (elemLen & 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "list must have an even number of elements", -1)); + Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "FORMAT", NULL); return TCL_ERROR; } if (elemLen == 0) { @@ -2917,6 +2983,7 @@ TclArraySet( TclObjVarErrMsg(interp, arrayNameObj, NULL, "array set", needArray, -1); + Tcl_SetErrorCode(interp, "TCL", "WRITE", "ARRAY", NULL); return TCL_ERROR; } } @@ -2998,6 +3065,7 @@ ArrayStartSearchCmd( if ((varPtr == NULL) || !TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", varName, "\" isn't an array", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; } @@ -3095,6 +3163,7 @@ ArrayAnyMoreCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), "\" isn't an array", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; } @@ -3198,6 +3267,7 @@ ArrayNextElementCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), "\" isn't an array", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; } @@ -3305,6 +3375,7 @@ ArrayDoneSearchCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), "\" isn't an array", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; } @@ -3942,6 +4013,7 @@ ArrayStatsCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), "\" isn't an array", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; } @@ -4232,6 +4304,7 @@ ObjMakeUpvar( TclGetString(myNamePtr), "\": upvar won't create " "namespace variable that refers to procedure variable", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", NULL); return TCL_ERROR; } } @@ -4331,6 +4404,8 @@ TclPtrObjMakeUpvar( Tcl_AppendResult((Tcl_Interp *) iPtr, "bad variable name \"", myName, "\": upvar won't create a scalar variable " "that looks like an array element", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", + NULL); return TCL_ERROR; } } @@ -4356,14 +4431,18 @@ TclPtrObjMakeUpvar( if (varPtr == otherPtr) { Tcl_SetResult((Tcl_Interp *) iPtr, "can't upvar from variable to itself", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "SELF", NULL); return TCL_ERROR; } if (TclIsVarTraced(varPtr)) { Tcl_AppendResult((Tcl_Interp *) iPtr, "variable \"", myName, "\" has traces: can't use for upvar", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "TRACED", NULL); return TCL_ERROR; } else if (!TclIsVarUndefined(varPtr)) { + Var *linkPtr; + /* * The variable already existed. Make sure this variable "varPtr" * isn't the same as "otherPtr" (avoid circular links). Also, if it's @@ -4371,23 +4450,23 @@ TclPtrObjMakeUpvar( * disconnect it from the thing it currently refers to. */ - if (TclIsVarLink(varPtr)) { - Var *linkPtr = varPtr->value.linkPtr; - - if (linkPtr == otherPtr) { - return TCL_OK; - } - if (TclIsVarInHash(linkPtr)) { - VarHashRefCount(linkPtr)--; - if (TclIsVarUndefined(linkPtr)) { - CleanupVar(linkPtr, NULL); - } - } - } else { + if (!TclIsVarLink(varPtr)) { Tcl_AppendResult((Tcl_Interp *) iPtr, "variable \"", myName, "\" already exists", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "EXISTS", NULL); return TCL_ERROR; } + + linkPtr = varPtr->value.linkPtr; + if (linkPtr == otherPtr) { + return TCL_OK; + } + if (TclIsVarInHash(linkPtr)) { + VarHashRefCount(linkPtr)--; + if (TclIsVarUndefined(linkPtr)) { + CleanupVar(linkPtr, NULL); + } + } } TclSetVarLink(varPtr); varPtr->value.linkPtr = otherPtr; @@ -4411,8 +4490,9 @@ TclPtrObjMakeUpvar( * * Side effects: * The variable in frameName whose name is given by varName becomes - * accessible under the name localName, so that references to localName - * are redirected to the other variable like a symbolic link. + * accessible under the name localNameStr, so that references to + * localNameStr are redirected to the other variable like a symbolic + * link. * *---------------------------------------------------------------------- */ @@ -4426,11 +4506,28 @@ Tcl_UpVar( const char *varName, /* Name of a variable in interp to link to. * May be either a scalar name or an element * in an array. */ - const char *localName, /* Name of link variable. */ + const char *localNameStr, /* Name of link variable. */ int flags) /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY: - * indicates scope of localName. */ + * indicates scope of localNameStr. */ { - return Tcl_UpVar2(interp, frameName, varName, NULL, localName, flags); + int result; + CallFrame *framePtr; + Tcl_Obj *varNamePtr, *localNamePtr; + + if (TclGetFrame(interp, frameName, &framePtr) == -1) { + return TCL_ERROR; + } + + varNamePtr = Tcl_NewStringObj(varName, -1); + Tcl_IncrRefCount(varNamePtr); + localNamePtr = Tcl_NewStringObj(localNameStr, -1); + Tcl_IncrRefCount(localNamePtr); + + result = ObjMakeUpvar(interp, framePtr, varNamePtr, NULL, 0, + localNamePtr, flags, -1); + Tcl_DecrRefCount(varNamePtr); + Tcl_DecrRefCount(localNamePtr); + return result; } /* @@ -4447,8 +4544,9 @@ Tcl_UpVar( * * Side effects: * The variable in frameName whose name is given by part1 and part2 - * becomes accessible under the name localName, so that references to - * localName are redirected to the other variable like a symbolic link. + * becomes accessible under the name localNameStr, so that references to + * localNameStr are redirected to the other variable like a symbolic + * link. * *---------------------------------------------------------------------- */ @@ -4462,9 +4560,9 @@ Tcl_UpVar2( const char *part1, const char *part2, /* Two parts of source variable name to link * to. */ - const char *localName, /* Name of link variable. */ + const char *localNameStr, /* Name of link variable. */ int flags) /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY: - * indicates scope of localName. */ + * indicates scope of localNameStr. */ { int result; CallFrame *framePtr; @@ -4476,7 +4574,7 @@ Tcl_UpVar2( part1Ptr = Tcl_NewStringObj(part1, -1); Tcl_IncrRefCount(part1Ptr); - localNamePtr = Tcl_NewStringObj(localName, -1); + localNamePtr = Tcl_NewStringObj(localNameStr, -1); Tcl_IncrRefCount(localNamePtr); result = ObjMakeUpvar(interp, framePtr, part1Ptr, part2, 0, @@ -4518,33 +4616,33 @@ Tcl_GetVariableFullName( Tcl_Obj *namePtr; Namespace *nsPtr; + if (!varPtr || TclIsVarArrayElement(varPtr)) { + return; + } + /* * Add the full name of the containing namespace (if any), followed by the * "::" separator, then the variable name. */ - if (varPtr) { - if (!TclIsVarArrayElement(varPtr)) { - nsPtr = TclGetVarNsPtr(varPtr); - if (nsPtr) { - Tcl_AppendToObj(objPtr, nsPtr->fullName, -1); - if (nsPtr != iPtr->globalNsPtr) { - Tcl_AppendToObj(objPtr, "::", 2); - } - } - if (TclIsVarInHash(varPtr)) { - if (!TclIsVarDeadHash(varPtr)) { - namePtr = VarHashGetKey(varPtr); - Tcl_AppendObjToObj(objPtr, namePtr); - } - } else if (iPtr->varFramePtr->procPtr) { - int index = varPtr - iPtr->varFramePtr->compiledLocals; + nsPtr = TclGetVarNsPtr(varPtr); + if (nsPtr) { + Tcl_AppendToObj(objPtr, nsPtr->fullName, -1); + if (nsPtr != iPtr->globalNsPtr) { + Tcl_AppendToObj(objPtr, "::", 2); + } + } + if (TclIsVarInHash(varPtr)) { + if (!TclIsVarDeadHash(varPtr)) { + namePtr = VarHashGetKey(varPtr); + Tcl_AppendObjToObj(objPtr, namePtr); + } + } else if (iPtr->varFramePtr->procPtr) { + int index = varPtr - iPtr->varFramePtr->compiledLocals; - if (index < iPtr->varFramePtr->numCompiledLocals) { - namePtr = localName(iPtr->varFramePtr, index); - Tcl_AppendObjToObj(objPtr, namePtr); - } - } + if (index < iPtr->varFramePtr->numCompiledLocals) { + namePtr = localName(iPtr->varFramePtr, index); + Tcl_AppendObjToObj(objPtr, namePtr); } } } @@ -4704,6 +4802,7 @@ Tcl_VariableObjCmd( TclObjVarErrMsg(interp, varNamePtr, NULL, "define", isArrayElement, -1); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", NULL); return TCL_ERROR; } @@ -4906,7 +5005,7 @@ SetArraySearchObj( Tcl_Obj *objPtr) { const char *string; - char *end; + char *end; /* Can't be const due to strtoul defn. */ int id; size_t offset; @@ -4943,7 +5042,9 @@ SetArraySearchObj( return TCL_OK; syntax: - Tcl_AppendResult(interp, "illegal search identifier \"",string,"\"",NULL); + Tcl_AppendResult(interp, "illegal search identifier \"", string, "\"", + NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", NULL); return TCL_ERROR; } @@ -4997,17 +5098,9 @@ ParseSearchId( * Extract the information out of the Tcl_Obj. */ -#if 1 id = PTR2INT(handleObj->internalRep.twoPtrValue.ptr1); string = TclGetString(handleObj); offset = PTR2INT(handleObj->internalRep.twoPtrValue.ptr2); -#else - id = (int)(((char *) handleObj->internalRep.twoPtrValue.ptr1) - - ((char *) NULL)); - string = TclGetString(handleObj); - offset = (((char *) handleObj->internalRep.twoPtrValue.ptr2) - - ((char *) NULL)); -#endif /* * This test cannot be placed inside the Tcl_Obj machinery, since it is @@ -5017,6 +5110,8 @@ ParseSearchId( if (strcmp(string+offset, varName) != 0) { Tcl_AppendResult(interp, "search identifier \"", string, "\" isn't for variable \"", varName, "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", string, + NULL); goto badLookup; } @@ -5126,15 +5221,14 @@ TclDeleteNamespaceVars( for (varPtr = VarHashFirstVar(tablePtr, &search); varPtr != NULL; varPtr = VarHashFirstVar(tablePtr, &search)) { Tcl_Obj *objPtr = Tcl_NewObj(); - Tcl_IncrRefCount(objPtr); + Tcl_IncrRefCount(objPtr); VarHashRefCount(varPtr)++; /* Make sure we get to remove from * hash. */ Tcl_GetVariableFullName(interp, (Tcl_Var) varPtr, objPtr); - UnsetVarStruct(varPtr, NULL, iPtr, /* part1 */ objPtr, - NULL, flags, -1); - Tcl_DecrRefCount(objPtr); /* free no longer needed obj */ - + UnsetVarStruct(varPtr, NULL, iPtr, /* part1 */ objPtr, NULL, flags, + -1); + Tcl_DecrRefCount(objPtr); /* Free no longer needed obj */ /* * Remove the variable from the table and force it undefined in case @@ -5430,6 +5524,9 @@ TclObjVarErrMsg( * NULL. */ { if (!part1Ptr) { + if (index == -1) { + Tcl_Panic("invalid part1Ptr and invalid index together"); + } part1Ptr = localName(((Interp *)interp)->varFramePtr, index); } Tcl_SetObjResult(interp, Tcl_ObjPrintf("can't %s \"%s%s%s%s\": %s", @@ -5579,7 +5676,7 @@ DupParsedVarName( register Tcl_Obj *arrayPtr = srcPtr->internalRep.twoPtrValue.ptr1; register char *elem = srcPtr->internalRep.twoPtrValue.ptr2; char *elemCopy; - unsigned int elemLen; + unsigned elemLen; if (arrayPtr != NULL) { Tcl_IncrRefCount(arrayPtr); @@ -5617,14 +5714,14 @@ UpdateParsedVarName( len2 = strlen(part2); totalLen = len1 + len2 + 2; - p = ckalloc((unsigned int) totalLen + 1); + p = ckalloc((unsigned) totalLen + 1); objPtr->bytes = p; objPtr->length = totalLen; - memcpy(p, part1, (unsigned int) len1); + memcpy(p, part1, (unsigned) len1); p += len1; *p++ = '('; - memcpy(p, part2, (unsigned int) len2); + memcpy(p, part2, (unsigned) len2); p += len2; *p++ = ')'; *p = '\0'; @@ -5751,7 +5848,7 @@ ObjFindNamespaceVar( if (result == TCL_OK) { return var; } else if (result != TCL_CONTINUE) { - return (Tcl_Var) NULL; + return NULL; } } @@ -5824,16 +5921,15 @@ TclInfoVarsCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; - const char *varName, *pattern; - const char *simplePattern; + const char *varName, *pattern, *simplePattern; Tcl_HashSearch search; Var *varPtr; Namespace *nsPtr; Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp); Namespace *currNsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp); - Tcl_Obj *listPtr, *elemObjPtr; + Tcl_Obj *listPtr, *elemObjPtr, *varNamePtr; int specificNsInPattern = 0;/* Init. to avoid compiler warning. */ - Tcl_Obj *simplePatternPtr = NULL, *varNamePtr; + Tcl_Obj *simplePatternPtr = NULL; /* * Get the pattern and find the "effective namespace" in which to list @@ -5857,9 +5953,8 @@ TclInfoVarsCmd( Namespace *dummy1NsPtr, *dummy2NsPtr; pattern = TclGetString(objv[1]); - TclGetNamespaceForQualName(interp, pattern, (Namespace *) NULL, - /*flags*/ 0, &nsPtr, &dummy1NsPtr, &dummy2NsPtr, - &simplePattern); + TclGetNamespaceForQualName(interp, pattern, NULL, /*flags*/ 0, + &nsPtr, &dummy1NsPtr, &dummy2NsPtr, &simplePattern); if (nsPtr != NULL) { /* We successfully found the pattern's ns. */ specificNsInPattern = (strcmp(simplePattern, pattern) != 0); @@ -6111,8 +6206,7 @@ TclInfoLocalsCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; - Tcl_Obj *patternPtr; - Tcl_Obj *listPtr; + Tcl_Obj *patternPtr, *listPtr; if (objc == 1) { patternPtr = NULL; @@ -6166,12 +6260,11 @@ AppendLocals( Interp *iPtr = (Interp *) interp; Var *varPtr; int i, localVarCt; - Tcl_Obj **varNamePtr; + Tcl_Obj **varNamePtr, *objNamePtr; const char *varName; TclVarHashTable *localVarTablePtr; Tcl_HashSearch search; const char *pattern = patternPtr? TclGetString(patternPtr) : NULL; - Tcl_Obj *objNamePtr; localVarCt = iPtr->varFramePtr->numCompiledLocals; varPtr = iPtr->varFramePtr->compiledLocals; @@ -6335,7 +6428,7 @@ CompareVarKeys( return 0; } -static unsigned int +static unsigned HashVarKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ @@ -6343,7 +6436,7 @@ HashVarKey( Tcl_Obj *objPtr = keyPtr; const char *string = TclGetString(objPtr); int length = objPtr->length; - unsigned int result = 0; + register unsigned result = 0; int i; /* -- cgit v0.12 From ecc5f96727b39eebbad74ffe0e0dfaabc059d686 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Feb 2010 13:46:31 +0000 Subject: Make [array get] work again with a trivial pattern. --- ChangeLog | 2 ++ generic/tclVar.c | 8 ++++---- tests/set-old.test | 11 ++++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9047968..510df51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * generic/tclVar.c: Added more use of error-codes and reduced the stack overhead of older interfaces. + (ArrayGetCmd): Stop silly crash when using a trivial pattern due to + error in conversion to ensemble. 2010-02-03 Donal K. Fellows diff --git a/generic/tclVar.c b/generic/tclVar.c index f39383d..63aebca 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.191 2010/02/04 10:53:34 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.192 2010/02/04 13:46:32 dkf Exp $ */ #include "tclInt.h" @@ -3558,7 +3558,7 @@ ArrayGetCmd( TclNewObj(nameLstPtr); Tcl_IncrRefCount(nameLstPtr); if ((pattern != NULL) && TclMatchIsTrivial(pattern)) { - varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[3]); + varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[2]); if (varPtr2 == NULL) { goto searchDone; } @@ -3736,12 +3736,12 @@ ArrayNamesCmd( patternPtr = objv[2]; pattern = TclGetString(patternPtr); } else if (objc == 4) { - patternPtr = objv[3]; - pattern = TclGetString(patternPtr); if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, &mode) != TCL_OK) { return TCL_ERROR; } + patternPtr = objv[3]; + pattern = TclGetString(patternPtr); } else { patternPtr = NULL; pattern = NULL; diff --git a/tests/set-old.test b/tests/set-old.test index 54befbd..a519a44 100644 --- a/tests/set-old.test +++ b/tests/set-old.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: set-old.test,v 1.22 2010/02/02 16:12:01 dkf Exp $ +# RCS: @(#) $Id: set-old.test,v 1.23 2010/02/04 13:46:33 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -671,9 +671,14 @@ test set-old-8.55 {array command, array names -glob} { list [catch {array names a -glob} msg] $msg } {0 -glob} test set-old-8.56 {array command, array statistics on a non-array} { - catch {unset a} - list [catch {array statistics a} msg] $msg + catch {unset a} + list [catch {array statistics a} msg] $msg } [list 1 "\"a\" isn't an array"] +test set-old-8.57 {array command, array get with trivial pattern} { + catch {unset a} + set a(x) 1 + array get a x +} {x 1} test set-old-9.1 {ids for array enumeration} { catch {unset a} -- cgit v0.12 From 4686d8aa4eb30c10ae831cd749bd19685334cc3e Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Feb 2010 13:49:55 +0000 Subject: minor maintenance --- tests/set-old.test | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/set-old.test b/tests/set-old.test index a519a44..de16d60 100644 --- a/tests/set-old.test +++ b/tests/set-old.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: set-old.test,v 1.23 2010/02/04 13:46:33 dkf Exp $ +# RCS: @(#) $Id: set-old.test,v 1.24 2010/02/04 13:49:55 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -21,7 +21,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } proc ignore args {} - + # Simple variable operations. catch {unset a} @@ -677,6 +677,7 @@ test set-old-8.56 {array command, array statistics on a non-array} { test set-old-8.57 {array command, array get with trivial pattern} { catch {unset a} set a(x) 1 + set a(y) 2 array get a x } {x 1} @@ -911,7 +912,7 @@ test set-old-12.2 {cleanup on procedure return} { } foo } 23456 - + # Must delete variables when done, since these arrays get used as # scalars by other tests. catch {unset a} @@ -923,3 +924,7 @@ catch {rename foo {}} # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From 280e93549c0502a223353a6814bb3548fcd9a71b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Feb 2010 14:56:49 +0000 Subject: Use the object RE interface for faster matching in [array names -regexp]. --- ChangeLog | 1 + generic/tclVar.c | 257 +++++++++++++++++++++++++++++-------------------------- 2 files changed, 137 insertions(+), 121 deletions(-) diff --git a/ChangeLog b/ChangeLog index 510df51..6a43f55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ stack overhead of older interfaces. (ArrayGetCmd): Stop silly crash when using a trivial pattern due to error in conversion to ensemble. + (ArrayNamesCmd): Use the object RE interface for faster matching. 2010-02-03 Donal K. Fellows diff --git a/generic/tclVar.c b/generic/tclVar.c index 63aebca..06a2c9c 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.192 2010/02/04 13:46:32 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.193 2010/02/04 14:56:50 dkf Exp $ */ #include "tclInt.h" @@ -3023,7 +3023,7 @@ ArrayStartSearchCmd( Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; Tcl_HashEntry *hPtr; - Tcl_Obj *varNamePtr; + Tcl_Obj *varNameObj; int isNew; ArraySearch *searchPtr; const char *varName; @@ -3032,15 +3032,15 @@ ArrayStartSearchCmd( Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); return TCL_ERROR; } + varNameObj = objv[1]; /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); - varName = TclGetString(varNamePtr); + varName = TclGetString(varNameObj); /* * Special array trace used to keep the env array in sync for array names, @@ -3049,7 +3049,7 @@ ArrayStartSearchCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3122,7 +3122,7 @@ ArrayAnyMoreCmd( { Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; - Tcl_Obj *varNamePtr; + Tcl_Obj *varNameObj, *searchObj; int gotValue; ArraySearch *searchPtr; @@ -3130,13 +3130,14 @@ ArrayAnyMoreCmd( Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); return TCL_ERROR; } + varNameObj = objv[1]; + searchObj = objv[2]; /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3146,7 +3147,7 @@ ArrayAnyMoreCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3161,7 +3162,7 @@ ArrayAnyMoreCmd( if ((varPtr == NULL) || !TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr)) { - Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; @@ -3171,7 +3172,7 @@ ArrayAnyMoreCmd( * Get the search. */ - searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[2]); + searchPtr = ParseSearchId(interp, varPtr, varNameObj, searchObj); if (searchPtr == NULL) { return TCL_ERROR; } @@ -3227,20 +3228,21 @@ ArrayNextElementCmd( { Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; - Tcl_Obj *varNamePtr; + Tcl_Obj *varNameObj, *searchObj; ArraySearch *searchPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); return TCL_ERROR; } + varNameObj = objv[1]; + searchObj = objv[2]; /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3250,7 +3252,7 @@ ArrayNextElementCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3265,7 +3267,7 @@ ArrayNextElementCmd( if ((varPtr == NULL) || !TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr)) { - Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; @@ -3275,7 +3277,7 @@ ArrayNextElementCmd( * Get the search. */ - searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[2]); + searchPtr = ParseSearchId(interp, varPtr, varNameObj, searchObj); if (searchPtr == NULL) { return TCL_ERROR; } @@ -3335,20 +3337,21 @@ ArrayDoneSearchCmd( Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; Tcl_HashEntry *hPtr; - Tcl_Obj *varNamePtr; + Tcl_Obj *varNameObj, *searchObj; ArraySearch *searchPtr, *prevPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId"); return TCL_ERROR; } + varNameObj = objv[1]; + searchObj = objv[2]; /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3358,7 +3361,7 @@ ArrayDoneSearchCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3373,7 +3376,7 @@ ArrayDoneSearchCmd( if ((varPtr == NULL) || !TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr)) { - Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; @@ -3383,7 +3386,7 @@ ArrayDoneSearchCmd( * Get the search. */ - searchPtr = ParseSearchId(interp, varPtr, varNamePtr, objv[2]); + searchPtr = ParseSearchId(interp, varPtr, varNameObj, searchObj); if (searchPtr == NULL) { return TCL_ERROR; } @@ -3440,18 +3443,20 @@ ArrayExistsCmd( { Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; + Tcl_Obj *arrayNameObj; int notArray; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); return TCL_ERROR; } + arrayNameObj = objv[1]; /* - * Locate the array variable + * Locate the array variable. */ - varPtr = TclObjLookupVarEx(interp, objv[1], NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, arrayNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3461,7 +3466,7 @@ ArrayExistsCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, objv[1], NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, arrayNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3505,23 +3510,31 @@ ArrayGetCmd( { Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr, *varPtr2; - Tcl_Obj *varNamePtr, *namePtr, *valuePtr, *nameLstPtr, *tmpResPtr; - Tcl_Obj **namePtrPtr; + Tcl_Obj *varNameObj, *nameObj, *valueObj, *nameLstObj, *tmpResObj; + Tcl_Obj **nameObjPtr, *patternObj; Tcl_HashSearch search; const char *pattern; int i, count, result; - if ((objc != 2) && (objc != 3)) { + switch (objc) { + case 2: + varNameObj = objv[1]; + patternObj = NULL; + break; + case 3: + varNameObj = objv[1]; + patternObj = objv[2]; + break; + default: Tcl_WrongNumArgs(interp, 1, objv, "arrayName ?pattern?"); return TCL_ERROR; } /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3531,7 +3544,7 @@ ArrayGetCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3549,26 +3562,26 @@ ArrayGetCmd( return TCL_OK; } - pattern = (objc == 3 ? TclGetString(objv[2]) : NULL); + pattern = (patternObj ? TclGetString(patternObj) : NULL); /* * Store the array names in a new object. */ - TclNewObj(nameLstPtr); - Tcl_IncrRefCount(nameLstPtr); - if ((pattern != NULL) && TclMatchIsTrivial(pattern)) { - varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[2]); + TclNewObj(nameLstObj); + Tcl_IncrRefCount(nameLstObj); + if ((patternObj != NULL) && TclMatchIsTrivial(pattern)) { + varPtr2 = VarHashFindVar(varPtr->value.tablePtr, patternObj); if (varPtr2 == NULL) { goto searchDone; } if (TclIsVarUndefined(varPtr2)) { goto searchDone; } - result = Tcl_ListObjAppendElement(interp, nameLstPtr, + result = Tcl_ListObjAppendElement(interp, nameLstObj, VarHashGetKey(varPtr2)); if (result != TCL_OK) { - TclDecrRefCount(nameLstPtr); + TclDecrRefCount(nameLstObj); return result; } goto searchDone; @@ -3579,14 +3592,14 @@ ArrayGetCmd( if (TclIsVarUndefined(varPtr2)) { continue; } - namePtr = VarHashGetKey(varPtr2); - if (pattern && !Tcl_StringMatch(TclGetString(namePtr), pattern)) { + nameObj = VarHashGetKey(varPtr2); + if (patternObj && !Tcl_StringMatch(TclGetString(nameObj), pattern)) { continue; /* Element name doesn't match pattern. */ } - result = Tcl_ListObjAppendElement(interp, nameLstPtr, namePtr); + result = Tcl_ListObjAppendElement(interp, nameLstObj, nameObj); if (result != TCL_OK) { - TclDecrRefCount(nameLstPtr); + TclDecrRefCount(nameLstObj); return result; } } @@ -3605,17 +3618,17 @@ ArrayGetCmd( * Get the array values corresponding to each element name. */ - TclNewObj(tmpResPtr); - result = Tcl_ListObjGetElements(interp, nameLstPtr, &count, &namePtrPtr); + TclNewObj(tmpResObj); + result = Tcl_ListObjGetElements(interp, nameLstObj, &count, &nameObjPtr); if (result != TCL_OK) { goto errorInArrayGet; } for (i=0 ; i 2 ? objv[objc-1] : NULL); /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3710,7 +3724,7 @@ ArrayNamesCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3718,6 +3732,15 @@ ArrayNamesCmd( } /* + * Finish parsing the arguments. + */ + + if ((objc == 4) && Tcl_GetIndexFromObj(interp, objv[2], options, "option", + 0, &mode) != TCL_OK) { + return TCL_ERROR; + } + + /* * Verify that it is indeed an array variable. This test comes after the * traces - the variable may actually become an array as an effect of said * traces. If not an array, the result is empty. @@ -3729,40 +3752,24 @@ ArrayNamesCmd( } /* - * Finish parsing the arguments. - */ - - if (objc == 3) { - patternPtr = objv[2]; - pattern = TclGetString(patternPtr); - } else if (objc == 4) { - if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, - &mode) != TCL_OK) { - return TCL_ERROR; - } - patternPtr = objv[3]; - pattern = TclGetString(patternPtr); - } else { - patternPtr = NULL; - pattern = NULL; - } - - /* * Check for the trivial cases where we can use a direct lookup. */ - TclNewObj(resultPtr); - if ((mode==OPT_GLOB && pattern && TclMatchIsTrivial(pattern)) + TclNewObj(resultObj); + if (patternObj) { + pattern = TclGetString(patternObj); + } + if ((mode==OPT_GLOB && patternObj && TclMatchIsTrivial(pattern)) || (mode==OPT_EXACT)) { - varPtr2 = VarHashFindVar(varPtr->value.tablePtr, patternPtr); + varPtr2 = VarHashFindVar(varPtr->value.tablePtr, patternObj); if ((varPtr2 != NULL) && !TclIsVarUndefined(varPtr2)) { /* * This can't fail; lappending to an empty object always works. */ - Tcl_ListObjAppendElement(NULL, resultPtr, VarHashGetKey(varPtr2)); + Tcl_ListObjAppendElement(NULL, resultObj, VarHashGetKey(varPtr2)); } - Tcl_SetObjResult(interp, resultPtr); + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -3775,9 +3782,9 @@ ArrayNamesCmd( if (TclIsVarUndefined(varPtr2)) { continue; } - namePtr = VarHashGetKey(varPtr2); - if (patternPtr) { - const char *name = TclGetString(namePtr); + nameObj = VarHashGetKey(varPtr2); + if (patternObj) { + const char *name = TclGetString(nameObj); int matched; switch ((enum options) mode) { @@ -3787,9 +3794,9 @@ ArrayNamesCmd( matched = Tcl_StringMatch(name, pattern); break; case OPT_REGEXP: - matched = Tcl_RegExpMatch(interp, name, pattern); + matched = Tcl_RegExpMatchObj(interp, nameObj, patternObj); if (matched < 0) { - TclDecrRefCount(resultPtr); + TclDecrRefCount(resultObj); return TCL_ERROR; } break; @@ -3799,9 +3806,9 @@ ArrayNamesCmd( } } - Tcl_ListObjAppendElement(NULL, resultPtr, namePtr); + Tcl_ListObjAppendElement(NULL, resultObj, nameObj); } - Tcl_SetObjResult(interp, resultPtr); + Tcl_SetObjResult(interp, resultObj); return TCL_OK; } @@ -3839,7 +3846,7 @@ ArraySetCmd( } /* - * Locate the array variable + * Locate the array variable. */ varPtr = TclObjLookupVarEx(interp, objv[1], NULL, /*flags*/ 0, @@ -3889,7 +3896,7 @@ ArraySizeCmd( { Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; - Tcl_Obj *varNamePtr; + Tcl_Obj *varNameObj; Tcl_HashSearch search; Var *varPtr2; int size = 0; @@ -3898,13 +3905,13 @@ ArraySizeCmd( Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); return TCL_ERROR; } + varNameObj = objv[1]; /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3914,7 +3921,7 @@ ArraySizeCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -3973,20 +3980,20 @@ ArrayStatsCmd( { Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr; - Tcl_Obj *varNamePtr; + Tcl_Obj *varNameObj; char *stats; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "arrayName"); return TCL_ERROR; } + varNameObj = objv[1]; /* - * Locate the array variable + * Locate the array variable. */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -3996,7 +4003,7 @@ ArrayStatsCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -4011,7 +4018,7 @@ ArrayStatsCmd( if ((varPtr == NULL) || !TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr)) { - Tcl_AppendResult(interp, "\"", TclGetString(varNamePtr), + Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); return TCL_ERROR; @@ -4054,12 +4061,21 @@ ArrayUnsetCmd( { Interp *iPtr = (Interp *) interp; Var *varPtr, *arrayPtr, *varPtr2, *protectedVarPtr; - Tcl_Obj *varNamePtr, *namePtr; + Tcl_Obj *varNameObj, *patternObj, *nameObj; Tcl_HashSearch search; const char *pattern; const int unsetFlags = 0; /* Should this be TCL_LEAVE_ERR_MSG? */ - if ((objc != 2) && (objc != 3)) { + switch (objc) { + case 2: + varNameObj = objv[1]; + patternObj = NULL; + break; + case 3: + varNameObj = objv[1]; + patternObj = objv[2]; + break; + default: Tcl_WrongNumArgs(interp, 1, objv, "arrayName ?pattern?"); return TCL_ERROR; } @@ -4068,8 +4084,7 @@ ArrayUnsetCmd( * Locate the array variable */ - varNamePtr = objv[1]; - varPtr = TclObjLookupVarEx(interp, varNamePtr, NULL, /*flags*/ 0, + varPtr = TclObjLookupVarEx(interp, varNameObj, NULL, /*flags*/ 0, /*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* @@ -4079,7 +4094,7 @@ ArrayUnsetCmd( if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY) && (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) { - if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNamePtr, NULL, + if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, varNameObj, NULL, (TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY| TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) { return TCL_ERROR; @@ -4097,25 +4112,25 @@ ArrayUnsetCmd( return TCL_OK; } - if (objc == 2) { + if (!patternObj) { /* * When no pattern is given, just unset the whole array. */ - return TclObjUnsetVar2(interp, varNamePtr, NULL, 0); + return TclObjUnsetVar2(interp, varNameObj, NULL, 0); } /* * With a trivial pattern, we can just unset. */ - pattern = TclGetString(objv[2]); + pattern = TclGetString(patternObj); if (TclMatchIsTrivial(pattern)) { - varPtr2 = VarHashFindVar(varPtr->value.tablePtr, objv[2]); + varPtr2 = VarHashFindVar(varPtr->value.tablePtr, patternObj); if (!varPtr2 || TclIsVarUndefined(varPtr2)) { return TCL_OK; } - return TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, objv[2], + return TclPtrUnsetVar(interp, varPtr2, varPtr, varNameObj, patternObj, unsetFlags, -1); } @@ -4162,10 +4177,10 @@ ArrayUnsetCmd( continue; } - namePtr = VarHashGetKey(varPtr2); - if (Tcl_StringMatch(TclGetString(namePtr), pattern) - && TclPtrUnsetVar(interp, varPtr2, varPtr, varNamePtr, - namePtr, unsetFlags, -1) != TCL_OK) { + nameObj = VarHashGetKey(varPtr2); + if (Tcl_StringMatch(TclGetString(nameObj), pattern) + && TclPtrUnsetVar(interp, varPtr2, varPtr, varNameObj, + nameObj, unsetFlags, -1) != TCL_OK) { /* * If we incremented a refcount, we must decrement it here as we * will not be coming back properly due to the error. -- cgit v0.12 From 3e2c1215a7115e506d67819f0831da51f8aa201a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 5 Feb 2010 10:03:23 +0000 Subject: Follow-up to [2010-01-29] commit: prevent space within stub table function parameters if the parameter type is a pointer. Minor formatting, and VOID -> void. Change signature of TclNRInterpProcCore, and TclOONewProc(Instance|)MethodEx, indicating that errorProc is a function pointer tclVar.c: fixed two gcc warnings --- ChangeLog | 18 + generic/tcl.h | 32 +- generic/tclDecls.h | 1052 ++++++++++++++++++++++----------------------- generic/tclInt.decls | 22 +- generic/tclInt.h | 4 +- generic/tclIntDecls.h | 268 ++++++------ generic/tclIntPlatDecls.h | 76 ++-- generic/tclOO.decls | 6 +- generic/tclOODecls.h | 30 +- generic/tclOOIntDecls.h | 50 +-- generic/tclOOMethod.c | 6 +- generic/tclPlatDecls.h | 10 +- generic/tclProc.c | 4 +- generic/tclTomMathDecls.h | 136 +++--- generic/tclVar.c | 6 +- tools/genStubs.tcl | 16 +- win/tclWinInt.h | 4 +- 17 files changed, 882 insertions(+), 858 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a43f55..db8fb1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2010-02-05 Jan Nijtmans + + * tools/genStubs.tcl: Follow-up to [2010-01-29] commit: + prevent space within stub table function parameters + if the parameter type is a pointer. + * win/tclWinInt.h Minor Formatting + * generic/tcl.h VOID -> void and other formatting + * generic/tclInt.h Minor formatting + * generic/tclInt.decls Change signature of TclNRInterpProcCore, + * generic/tclOO.decls and TclOONewProc(Instance|)MethodEx, + * generic/tclProc.c indicating that errorProc is a function, + * generic/tclOOMethod.c pointer, and other formatting + * generic/tcl*Decls.h (regenerated) + * generic/tclVar.c: gcc warning(line 3703): ‘pattern’ may be used + uninitialized in this function + gcc warning(line 3788): ‘matched’ may be used + uninitialized in this function + 2010-02-04 Donal K. Fellows * generic/tclVar.c: Added more use of error-codes and reduced the diff --git a/generic/tcl.h b/generic/tcl.h index 48fe4cd..c69dd3e 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.300 2010/01/29 19:30:55 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.301 2010/02/05 10:03:23 nijtmans Exp $ */ #ifndef _TCL @@ -681,7 +681,7 @@ typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp, ClientData cmdClientData, int argc, CONST84 char *argv[]); typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp, int level, const char *command, Tcl_Command commandInfo, int objc, - struct Tcl_Obj * const* objv); + struct Tcl_Obj *const *objv); typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData); typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr, struct Tcl_Obj *dupPtr); @@ -705,7 +705,7 @@ typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr); typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData); typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp, - int objc, struct Tcl_Obj * const* objv); + int objc, struct Tcl_Obj *const *objv); typedef int (Tcl_PackageInitProc) (Tcl_Interp *interp); typedef int (Tcl_PackageUnloadProc) (Tcl_Interp *interp, int flags); typedef void (Tcl_PanicProc) (const char *format, ...); @@ -714,7 +714,7 @@ typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan, typedef void (Tcl_TimerProc) (ClientData clientData); typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr); typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr); -typedef char *(Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp, +typedef char * (Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp, CONST84 char *part1, CONST84 char *part2, int flags); typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp, const char *oldName, const char *newName, int flags); @@ -723,7 +723,7 @@ typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc, typedef void (Tcl_DeleteFileHandlerProc) (int fd); typedef void (Tcl_AlertNotifierProc) (ClientData clientData); typedef void (Tcl_ServiceModeHookProc) (int mode); -typedef ClientData (Tcl_InitNotifierProc) (VOID); +typedef ClientData (Tcl_InitNotifierProc) (void); typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData); typedef void (Tcl_MainLoopProc) (void); @@ -779,15 +779,15 @@ typedef struct Tcl_Obj { union { /* The internal representation: */ long longValue; /* - an long integer value. */ double doubleValue; /* - a double-precision floating value. */ - VOID *otherValuePtr; /* - another, type-specific value. */ + void *otherValuePtr; /* - another, type-specific value. */ Tcl_WideInt wideValue; /* - a long long value. */ struct { /* - internal rep as two pointers. */ - VOID *ptr1; - VOID *ptr2; + void *ptr1; + void *ptr2; } twoPtrValue; struct { /* - internal rep as a wide int, tightly * packed fields. */ - VOID *ptr; /* Pointer to digits. */ + void *ptr; /* Pointer to digits. */ unsigned long value;/* Alloc, used, and signum packed into a * single word. */ } ptrAndLongRep; @@ -1102,10 +1102,10 @@ typedef struct Tcl_HashKeyType Tcl_HashKeyType; typedef struct Tcl_HashTable Tcl_HashTable; typedef struct Tcl_HashEntry Tcl_HashEntry; -typedef unsigned int (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, VOID *keyPtr); -typedef int (Tcl_CompareHashKeysProc) (VOID *keyPtr, Tcl_HashEntry *hPtr); -typedef Tcl_HashEntry *(Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr, - VOID *keyPtr); +typedef unsigned int (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr); +typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr); +typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr, + void *keyPtr); typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr); /* @@ -1130,7 +1130,7 @@ struct Tcl_HashEntry { * or NULL for end of chain. */ Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */ #if TCL_HASH_KEY_STORE_HASH - VOID *hash; /* Hash value, stored as pointer to ensure + void *hash; /* Hash value, stored as pointer to ensure * that the offsets of the fields in this * structure are not changed. */ #else @@ -1605,7 +1605,7 @@ typedef int (Tcl_FSAccessProc) (Tcl_Obj *pathPtr, int mode); typedef Tcl_Channel (Tcl_FSOpenFileChannelProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode, int permissions); typedef int (Tcl_FSMatchInDirectoryProc) (Tcl_Interp *interp, Tcl_Obj *result, - Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData * types); + Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types); typedef Tcl_Obj * (Tcl_FSGetCwdProc) (Tcl_Interp *interp); typedef int (Tcl_FSChdirProc) (Tcl_Obj *pathPtr); typedef int (Tcl_FSLstatProc) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); @@ -1632,7 +1632,7 @@ typedef int (Tcl_FSFileAttrsSetProc) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr); typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkType); -typedef int (Tcl_FSLoadFileProc) (Tcl_Interp * interp, Tcl_Obj *pathPtr, +typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr); typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr, ClientData *clientDataPtr); diff --git a/generic/tclDecls.h b/generic/tclDecls.h index e5fabd1..2508da9 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.173 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.174 2010/02/05 10:03:23 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -3695,23 +3695,23 @@ typedef struct TclStubs { int magic; const struct TclStubHooks *hooks; - int (*tcl_PkgProvideEx) (Tcl_Interp * interp, const char * name, const char * version, ClientData clientData); /* 0 */ - CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 1 */ - void (*tcl_Panic) (const char * format, ...); /* 2 */ + int (*tcl_PkgProvideEx) (Tcl_Interp *interp, const char *name, const char *version, ClientData clientData); /* 0 */ + CONST84_RETURN char * (*tcl_PkgRequireEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, ClientData *clientDataPtr); /* 1 */ + void (*tcl_Panic) (const char *format, ...); /* 2 */ char * (*tcl_Alloc) (unsigned int size); /* 3 */ - void (*tcl_Free) (char * ptr); /* 4 */ - char * (*tcl_Realloc) (char * ptr, unsigned int size); /* 5 */ - char * (*tcl_DbCkalloc) (unsigned int size, const char * file, int line); /* 6 */ - void (*tcl_DbCkfree) (char * ptr, const char * file, int line); /* 7 */ - char * (*tcl_DbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 8 */ + void (*tcl_Free) (char *ptr); /* 4 */ + char * (*tcl_Realloc) (char *ptr, unsigned int size); /* 5 */ + char * (*tcl_DbCkalloc) (unsigned int size, const char *file, int line); /* 6 */ + void (*tcl_DbCkfree) (char *ptr, const char *file, int line); /* 7 */ + char * (*tcl_DbCkrealloc) (char *ptr, unsigned int size, const char *file, int line); /* 8 */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc *proc, ClientData clientData); /* 9 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ void *reserved9; #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ - void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc * proc, ClientData clientData); /* 9 */ + void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc *proc, ClientData clientData); /* 9 */ #endif /* MACOSX */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ void (*tcl_DeleteFileHandler) (int fd); /* 10 */ @@ -3722,346 +3722,346 @@ typedef struct TclStubs { #ifdef MAC_OSX_TCL /* MACOSX */ void (*tcl_DeleteFileHandler) (int fd); /* 10 */ #endif /* MACOSX */ - void (*tcl_SetTimer) (const Tcl_Time * timePtr); /* 11 */ + void (*tcl_SetTimer) (const Tcl_Time *timePtr); /* 11 */ void (*tcl_Sleep) (int ms); /* 12 */ - int (*tcl_WaitForEvent) (const Tcl_Time * timePtr); /* 13 */ - int (*tcl_AppendAllObjTypes) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 14 */ - void (*tcl_AppendStringsToObj) (Tcl_Obj * objPtr, ...); /* 15 */ - void (*tcl_AppendToObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 16 */ + int (*tcl_WaitForEvent) (const Tcl_Time *timePtr); /* 13 */ + int (*tcl_AppendAllObjTypes) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 14 */ + void (*tcl_AppendStringsToObj) (Tcl_Obj *objPtr, ...); /* 15 */ + void (*tcl_AppendToObj) (Tcl_Obj *objPtr, const char *bytes, int length); /* 16 */ Tcl_Obj * (*tcl_ConcatObj) (int objc, Tcl_Obj *const objv[]); /* 17 */ - int (*tcl_ConvertToType) (Tcl_Interp * interp, Tcl_Obj * objPtr, const Tcl_ObjType * typePtr); /* 18 */ - void (*tcl_DbDecrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 19 */ - void (*tcl_DbIncrRefCount) (Tcl_Obj * objPtr, const char * file, int line); /* 20 */ - int (*tcl_DbIsShared) (Tcl_Obj * objPtr, const char * file, int line); /* 21 */ - Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, const char * file, int line); /* 22 */ - Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char * bytes, int length, const char * file, int line); /* 23 */ - Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char * file, int line); /* 24 */ - Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const * objv, const char * file, int line); /* 25 */ - Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char * file, int line); /* 26 */ - Tcl_Obj * (*tcl_DbNewObj) (const char * file, int line); /* 27 */ - Tcl_Obj * (*tcl_DbNewStringObj) (const char * bytes, int length, const char * file, int line); /* 28 */ - Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj * objPtr); /* 29 */ - void (*tclFreeObj) (Tcl_Obj * objPtr); /* 30 */ - int (*tcl_GetBoolean) (Tcl_Interp * interp, const char * src, int * boolPtr); /* 31 */ - int (*tcl_GetBooleanFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr); /* 32 */ - unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 33 */ - int (*tcl_GetDouble) (Tcl_Interp * interp, const char * src, double * doublePtr); /* 34 */ - int (*tcl_GetDoubleFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr); /* 35 */ - int (*tcl_GetIndexFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char *const * tablePtr, const char * msg, int flags, int * indexPtr); /* 36 */ - int (*tcl_GetInt) (Tcl_Interp * interp, const char * src, int * intPtr); /* 37 */ - int (*tcl_GetIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr); /* 38 */ - int (*tcl_GetLongFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr); /* 39 */ - CONST86 Tcl_ObjType * (*tcl_GetObjType) (const char * typeName); /* 40 */ - char * (*tcl_GetStringFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 41 */ - void (*tcl_InvalidateStringRep) (Tcl_Obj * objPtr); /* 42 */ - int (*tcl_ListObjAppendList) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr); /* 43 */ - int (*tcl_ListObjAppendElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * objPtr); /* 44 */ - int (*tcl_ListObjGetElements) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * objcPtr, Tcl_Obj *** objvPtr); /* 45 */ - int (*tcl_ListObjIndex) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj ** objPtrPtr); /* 46 */ - int (*tcl_ListObjLength) (Tcl_Interp * interp, Tcl_Obj * listPtr, int * lengthPtr); /* 47 */ - int (*tcl_ListObjReplace) (Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ + int (*tcl_ConvertToType) (Tcl_Interp *interp, Tcl_Obj *objPtr, const Tcl_ObjType *typePtr); /* 18 */ + void (*tcl_DbDecrRefCount) (Tcl_Obj *objPtr, const char *file, int line); /* 19 */ + void (*tcl_DbIncrRefCount) (Tcl_Obj *objPtr, const char *file, int line); /* 20 */ + int (*tcl_DbIsShared) (Tcl_Obj *objPtr, const char *file, int line); /* 21 */ + Tcl_Obj * (*tcl_DbNewBooleanObj) (int boolValue, const char *file, int line); /* 22 */ + Tcl_Obj * (*tcl_DbNewByteArrayObj) (const unsigned char *bytes, int length, const char *file, int line); /* 23 */ + Tcl_Obj * (*tcl_DbNewDoubleObj) (double doubleValue, const char *file, int line); /* 24 */ + Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const *objv, const char *file, int line); /* 25 */ + Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char *file, int line); /* 26 */ + Tcl_Obj * (*tcl_DbNewObj) (const char *file, int line); /* 27 */ + Tcl_Obj * (*tcl_DbNewStringObj) (const char *bytes, int length, const char *file, int line); /* 28 */ + Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj *objPtr); /* 29 */ + void (*tclFreeObj) (Tcl_Obj *objPtr); /* 30 */ + int (*tcl_GetBoolean) (Tcl_Interp *interp, const char *src, int *boolPtr); /* 31 */ + int (*tcl_GetBooleanFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *boolPtr); /* 32 */ + unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 33 */ + int (*tcl_GetDouble) (Tcl_Interp *interp, const char *src, double *doublePtr); /* 34 */ + int (*tcl_GetDoubleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr); /* 35 */ + int (*tcl_GetIndexFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, CONST84 char *const *tablePtr, const char *msg, int flags, int *indexPtr); /* 36 */ + int (*tcl_GetInt) (Tcl_Interp *interp, const char *src, int *intPtr); /* 37 */ + int (*tcl_GetIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 38 */ + int (*tcl_GetLongFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr); /* 39 */ + CONST86 Tcl_ObjType * (*tcl_GetObjType) (const char *typeName); /* 40 */ + char * (*tcl_GetStringFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 41 */ + void (*tcl_InvalidateStringRep) (Tcl_Obj *objPtr); /* 42 */ + int (*tcl_ListObjAppendList) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *elemListPtr); /* 43 */ + int (*tcl_ListObjAppendElement) (Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr); /* 44 */ + int (*tcl_ListObjGetElements) (Tcl_Interp *interp, Tcl_Obj *listPtr, int *objcPtr, Tcl_Obj ***objvPtr); /* 45 */ + int (*tcl_ListObjIndex) (Tcl_Interp *interp, Tcl_Obj *listPtr, int index, Tcl_Obj **objPtrPtr); /* 46 */ + int (*tcl_ListObjLength) (Tcl_Interp *interp, Tcl_Obj *listPtr, int *lengthPtr); /* 47 */ + int (*tcl_ListObjReplace) (Tcl_Interp *interp, Tcl_Obj *listPtr, int first, int count, int objc, Tcl_Obj *const objv[]); /* 48 */ Tcl_Obj * (*tcl_NewBooleanObj) (int boolValue); /* 49 */ - Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char * bytes, int length); /* 50 */ + Tcl_Obj * (*tcl_NewByteArrayObj) (const unsigned char *bytes, int length); /* 50 */ Tcl_Obj * (*tcl_NewDoubleObj) (double doubleValue); /* 51 */ Tcl_Obj * (*tcl_NewIntObj) (int intValue); /* 52 */ Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */ Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */ Tcl_Obj * (*tcl_NewObj) (void); /* 55 */ - Tcl_Obj * (*tcl_NewStringObj) (const char * bytes, int length); /* 56 */ - void (*tcl_SetBooleanObj) (Tcl_Obj * objPtr, int boolValue); /* 57 */ - unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj * objPtr, int length); /* 58 */ - void (*tcl_SetByteArrayObj) (Tcl_Obj * objPtr, const unsigned char * bytes, int length); /* 59 */ - void (*tcl_SetDoubleObj) (Tcl_Obj * objPtr, double doubleValue); /* 60 */ - void (*tcl_SetIntObj) (Tcl_Obj * objPtr, int intValue); /* 61 */ - void (*tcl_SetListObj) (Tcl_Obj * objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ - void (*tcl_SetLongObj) (Tcl_Obj * objPtr, long longValue); /* 63 */ - void (*tcl_SetObjLength) (Tcl_Obj * objPtr, int length); /* 64 */ - void (*tcl_SetStringObj) (Tcl_Obj * objPtr, const char * bytes, int length); /* 65 */ - void (*tcl_AddErrorInfo) (Tcl_Interp * interp, const char * message); /* 66 */ - void (*tcl_AddObjErrorInfo) (Tcl_Interp * interp, const char * message, int length); /* 67 */ - void (*tcl_AllowExceptions) (Tcl_Interp * interp); /* 68 */ - void (*tcl_AppendElement) (Tcl_Interp * interp, const char * element); /* 69 */ - void (*tcl_AppendResult) (Tcl_Interp * interp, ...); /* 70 */ - Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc * proc, ClientData clientData); /* 71 */ + Tcl_Obj * (*tcl_NewStringObj) (const char *bytes, int length); /* 56 */ + void (*tcl_SetBooleanObj) (Tcl_Obj *objPtr, int boolValue); /* 57 */ + unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj *objPtr, int length); /* 58 */ + void (*tcl_SetByteArrayObj) (Tcl_Obj *objPtr, const unsigned char *bytes, int length); /* 59 */ + void (*tcl_SetDoubleObj) (Tcl_Obj *objPtr, double doubleValue); /* 60 */ + void (*tcl_SetIntObj) (Tcl_Obj *objPtr, int intValue); /* 61 */ + void (*tcl_SetListObj) (Tcl_Obj *objPtr, int objc, Tcl_Obj *const objv[]); /* 62 */ + void (*tcl_SetLongObj) (Tcl_Obj *objPtr, long longValue); /* 63 */ + void (*tcl_SetObjLength) (Tcl_Obj *objPtr, int length); /* 64 */ + void (*tcl_SetStringObj) (Tcl_Obj *objPtr, const char *bytes, int length); /* 65 */ + void (*tcl_AddErrorInfo) (Tcl_Interp *interp, const char *message); /* 66 */ + void (*tcl_AddObjErrorInfo) (Tcl_Interp *interp, const char *message, int length); /* 67 */ + void (*tcl_AllowExceptions) (Tcl_Interp *interp); /* 68 */ + void (*tcl_AppendElement) (Tcl_Interp *interp, const char *element); /* 69 */ + void (*tcl_AppendResult) (Tcl_Interp *interp, ...); /* 70 */ + Tcl_AsyncHandler (*tcl_AsyncCreate) (Tcl_AsyncProc *proc, ClientData clientData); /* 71 */ void (*tcl_AsyncDelete) (Tcl_AsyncHandler async); /* 72 */ - int (*tcl_AsyncInvoke) (Tcl_Interp * interp, int code); /* 73 */ + int (*tcl_AsyncInvoke) (Tcl_Interp *interp, int code); /* 73 */ void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */ int (*tcl_AsyncReady) (void); /* 75 */ - void (*tcl_BackgroundError) (Tcl_Interp * interp); /* 76 */ - char (*tcl_Backslash) (const char * src, int * readPtr); /* 77 */ - int (*tcl_BadChannelOption) (Tcl_Interp * interp, const char * optionName, const char * optionList); /* 78 */ - void (*tcl_CallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 79 */ - void (*tcl_CancelIdleCall) (Tcl_IdleProc * idleProc, ClientData clientData); /* 80 */ - int (*tcl_Close) (Tcl_Interp * interp, Tcl_Channel chan); /* 81 */ - int (*tcl_CommandComplete) (const char * cmd); /* 82 */ - char * (*tcl_Concat) (int argc, CONST84 char *const * argv); /* 83 */ - int (*tcl_ConvertElement) (const char * src, char * dst, int flags); /* 84 */ - int (*tcl_ConvertCountedElement) (const char * src, int length, char * dst, int flags); /* 85 */ - int (*tcl_CreateAlias) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int argc, CONST84 char *const * argv); /* 86 */ - int (*tcl_CreateAliasObj) (Tcl_Interp * slave, const char * slaveCmd, Tcl_Interp * target, const char * targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ - Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType * typePtr, const char * chanName, ClientData instanceData, int mask); /* 88 */ - void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData); /* 89 */ - void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 90 */ - Tcl_Command (*tcl_CreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 91 */ - void (*tcl_CreateEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 92 */ - void (*tcl_CreateExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 93 */ + void (*tcl_BackgroundError) (Tcl_Interp *interp); /* 76 */ + char (*tcl_Backslash) (const char *src, int *readPtr); /* 77 */ + int (*tcl_BadChannelOption) (Tcl_Interp *interp, const char *optionName, const char *optionList); /* 78 */ + void (*tcl_CallWhenDeleted) (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, ClientData clientData); /* 79 */ + void (*tcl_CancelIdleCall) (Tcl_IdleProc *idleProc, ClientData clientData); /* 80 */ + int (*tcl_Close) (Tcl_Interp *interp, Tcl_Channel chan); /* 81 */ + int (*tcl_CommandComplete) (const char *cmd); /* 82 */ + char * (*tcl_Concat) (int argc, CONST84 char *const *argv); /* 83 */ + int (*tcl_ConvertElement) (const char *src, char *dst, int flags); /* 84 */ + int (*tcl_ConvertCountedElement) (const char *src, int length, char *dst, int flags); /* 85 */ + int (*tcl_CreateAlias) (Tcl_Interp *slave, const char *slaveCmd, Tcl_Interp *target, const char *targetCmd, int argc, CONST84 char *const *argv); /* 86 */ + int (*tcl_CreateAliasObj) (Tcl_Interp *slave, const char *slaveCmd, Tcl_Interp *target, const char *targetCmd, int objc, Tcl_Obj *const objv[]); /* 87 */ + Tcl_Channel (*tcl_CreateChannel) (const Tcl_ChannelType *typePtr, const char *chanName, ClientData instanceData, int mask); /* 88 */ + void (*tcl_CreateChannelHandler) (Tcl_Channel chan, int mask, Tcl_ChannelProc *proc, ClientData clientData); /* 89 */ + void (*tcl_CreateCloseHandler) (Tcl_Channel chan, Tcl_CloseProc *proc, ClientData clientData); /* 90 */ + Tcl_Command (*tcl_CreateCommand) (Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); /* 91 */ + void (*tcl_CreateEventSource) (Tcl_EventSetupProc *setupProc, Tcl_EventCheckProc *checkProc, ClientData clientData); /* 92 */ + void (*tcl_CreateExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 93 */ Tcl_Interp * (*tcl_CreateInterp) (void); /* 94 */ - void (*tcl_CreateMathFunc) (Tcl_Interp * interp, const char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData); /* 95 */ - Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 96 */ - Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp * interp, const char * slaveName, int isSafe); /* 97 */ - Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc * proc, ClientData clientData); /* 98 */ - Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData); /* 99 */ - void (*tcl_DeleteAssocData) (Tcl_Interp * interp, const char * name); /* 100 */ - void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc * proc, ClientData clientData); /* 101 */ - void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData); /* 102 */ - int (*tcl_DeleteCommand) (Tcl_Interp * interp, const char * cmdName); /* 103 */ - int (*tcl_DeleteCommandFromToken) (Tcl_Interp * interp, Tcl_Command command); /* 104 */ - void (*tcl_DeleteEvents) (Tcl_EventDeleteProc * proc, ClientData clientData); /* 105 */ - void (*tcl_DeleteEventSource) (Tcl_EventSetupProc * setupProc, Tcl_EventCheckProc * checkProc, ClientData clientData); /* 106 */ - void (*tcl_DeleteExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 107 */ - void (*tcl_DeleteHashEntry) (Tcl_HashEntry * entryPtr); /* 108 */ - void (*tcl_DeleteHashTable) (Tcl_HashTable * tablePtr); /* 109 */ - void (*tcl_DeleteInterp) (Tcl_Interp * interp); /* 110 */ - void (*tcl_DetachPids) (int numPids, Tcl_Pid * pidPtr); /* 111 */ + void (*tcl_CreateMathFunc) (Tcl_Interp *interp, const char *name, int numArgs, Tcl_ValueType *argTypes, Tcl_MathProc *proc, ClientData clientData); /* 95 */ + Tcl_Command (*tcl_CreateObjCommand) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); /* 96 */ + Tcl_Interp * (*tcl_CreateSlave) (Tcl_Interp *interp, const char *slaveName, int isSafe); /* 97 */ + Tcl_TimerToken (*tcl_CreateTimerHandler) (int milliseconds, Tcl_TimerProc *proc, ClientData clientData); /* 98 */ + Tcl_Trace (*tcl_CreateTrace) (Tcl_Interp *interp, int level, Tcl_CmdTraceProc *proc, ClientData clientData); /* 99 */ + void (*tcl_DeleteAssocData) (Tcl_Interp *interp, const char *name); /* 100 */ + void (*tcl_DeleteChannelHandler) (Tcl_Channel chan, Tcl_ChannelProc *proc, ClientData clientData); /* 101 */ + void (*tcl_DeleteCloseHandler) (Tcl_Channel chan, Tcl_CloseProc *proc, ClientData clientData); /* 102 */ + int (*tcl_DeleteCommand) (Tcl_Interp *interp, const char *cmdName); /* 103 */ + int (*tcl_DeleteCommandFromToken) (Tcl_Interp *interp, Tcl_Command command); /* 104 */ + void (*tcl_DeleteEvents) (Tcl_EventDeleteProc *proc, ClientData clientData); /* 105 */ + void (*tcl_DeleteEventSource) (Tcl_EventSetupProc *setupProc, Tcl_EventCheckProc *checkProc, ClientData clientData); /* 106 */ + void (*tcl_DeleteExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 107 */ + void (*tcl_DeleteHashEntry) (Tcl_HashEntry *entryPtr); /* 108 */ + void (*tcl_DeleteHashTable) (Tcl_HashTable *tablePtr); /* 109 */ + void (*tcl_DeleteInterp) (Tcl_Interp *interp); /* 110 */ + void (*tcl_DetachPids) (int numPids, Tcl_Pid *pidPtr); /* 111 */ void (*tcl_DeleteTimerHandler) (Tcl_TimerToken token); /* 112 */ - void (*tcl_DeleteTrace) (Tcl_Interp * interp, Tcl_Trace trace); /* 113 */ - void (*tcl_DontCallWhenDeleted) (Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 114 */ + void (*tcl_DeleteTrace) (Tcl_Interp *interp, Tcl_Trace trace); /* 113 */ + void (*tcl_DontCallWhenDeleted) (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, ClientData clientData); /* 114 */ int (*tcl_DoOneEvent) (int flags); /* 115 */ - void (*tcl_DoWhenIdle) (Tcl_IdleProc * proc, ClientData clientData); /* 116 */ - char * (*tcl_DStringAppend) (Tcl_DString * dsPtr, const char * bytes, int length); /* 117 */ - char * (*tcl_DStringAppendElement) (Tcl_DString * dsPtr, const char * element); /* 118 */ - void (*tcl_DStringEndSublist) (Tcl_DString * dsPtr); /* 119 */ - void (*tcl_DStringFree) (Tcl_DString * dsPtr); /* 120 */ - void (*tcl_DStringGetResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 121 */ - void (*tcl_DStringInit) (Tcl_DString * dsPtr); /* 122 */ - void (*tcl_DStringResult) (Tcl_Interp * interp, Tcl_DString * dsPtr); /* 123 */ - void (*tcl_DStringSetLength) (Tcl_DString * dsPtr, int length); /* 124 */ - void (*tcl_DStringStartSublist) (Tcl_DString * dsPtr); /* 125 */ + void (*tcl_DoWhenIdle) (Tcl_IdleProc *proc, ClientData clientData); /* 116 */ + char * (*tcl_DStringAppend) (Tcl_DString *dsPtr, const char *bytes, int length); /* 117 */ + char * (*tcl_DStringAppendElement) (Tcl_DString *dsPtr, const char *element); /* 118 */ + void (*tcl_DStringEndSublist) (Tcl_DString *dsPtr); /* 119 */ + void (*tcl_DStringFree) (Tcl_DString *dsPtr); /* 120 */ + void (*tcl_DStringGetResult) (Tcl_Interp *interp, Tcl_DString *dsPtr); /* 121 */ + void (*tcl_DStringInit) (Tcl_DString *dsPtr); /* 122 */ + void (*tcl_DStringResult) (Tcl_Interp *interp, Tcl_DString *dsPtr); /* 123 */ + void (*tcl_DStringSetLength) (Tcl_DString *dsPtr, int length); /* 124 */ + void (*tcl_DStringStartSublist) (Tcl_DString *dsPtr); /* 125 */ int (*tcl_Eof) (Tcl_Channel chan); /* 126 */ CONST84_RETURN char * (*tcl_ErrnoId) (void); /* 127 */ CONST84_RETURN char * (*tcl_ErrnoMsg) (int err); /* 128 */ - int (*tcl_Eval) (Tcl_Interp * interp, const char * script); /* 129 */ - int (*tcl_EvalFile) (Tcl_Interp * interp, const char * fileName); /* 130 */ - int (*tcl_EvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 131 */ - void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc * freeProc); /* 132 */ + int (*tcl_Eval) (Tcl_Interp *interp, const char *script); /* 129 */ + int (*tcl_EvalFile) (Tcl_Interp *interp, const char *fileName); /* 130 */ + int (*tcl_EvalObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 131 */ + void (*tcl_EventuallyFree) (ClientData clientData, Tcl_FreeProc *freeProc); /* 132 */ void (*tcl_Exit) (int status); /* 133 */ - int (*tcl_ExposeCommand) (Tcl_Interp * interp, const char * hiddenCmdToken, const char * cmdName); /* 134 */ - int (*tcl_ExprBoolean) (Tcl_Interp * interp, const char * expr, int * ptr); /* 135 */ - int (*tcl_ExprBooleanObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr); /* 136 */ - int (*tcl_ExprDouble) (Tcl_Interp * interp, const char * expr, double * ptr); /* 137 */ - int (*tcl_ExprDoubleObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr); /* 138 */ - int (*tcl_ExprLong) (Tcl_Interp * interp, const char * expr, long * ptr); /* 139 */ - int (*tcl_ExprLongObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr); /* 140 */ - int (*tcl_ExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr); /* 141 */ - int (*tcl_ExprString) (Tcl_Interp * interp, const char * expr); /* 142 */ + int (*tcl_ExposeCommand) (Tcl_Interp *interp, const char *hiddenCmdToken, const char *cmdName); /* 134 */ + int (*tcl_ExprBoolean) (Tcl_Interp *interp, const char *expr, int *ptr); /* 135 */ + int (*tcl_ExprBooleanObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *ptr); /* 136 */ + int (*tcl_ExprDouble) (Tcl_Interp *interp, const char *expr, double *ptr); /* 137 */ + int (*tcl_ExprDoubleObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *ptr); /* 138 */ + int (*tcl_ExprLong) (Tcl_Interp *interp, const char *expr, long *ptr); /* 139 */ + int (*tcl_ExprLongObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, long *ptr); /* 140 */ + int (*tcl_ExprObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr); /* 141 */ + int (*tcl_ExprString) (Tcl_Interp *interp, const char *expr); /* 142 */ void (*tcl_Finalize) (void); /* 143 */ - void (*tcl_FindExecutable) (const char * argv0); /* 144 */ - Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr); /* 145 */ + void (*tcl_FindExecutable) (const char *argv0); /* 144 */ + Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable *tablePtr, Tcl_HashSearch *searchPtr); /* 145 */ int (*tcl_Flush) (Tcl_Channel chan); /* 146 */ - void (*tcl_FreeResult) (Tcl_Interp * interp); /* 147 */ - int (*tcl_GetAlias) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * argcPtr, CONST84 char *** argvPtr); /* 148 */ - int (*tcl_GetAliasObj) (Tcl_Interp * interp, const char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST84 char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv); /* 149 */ - ClientData (*tcl_GetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc ** procPtr); /* 150 */ - Tcl_Channel (*tcl_GetChannel) (Tcl_Interp * interp, const char * chanName, int * modePtr); /* 151 */ + void (*tcl_FreeResult) (Tcl_Interp *interp); /* 147 */ + int (*tcl_GetAlias) (Tcl_Interp *interp, const char *slaveCmd, Tcl_Interp **targetInterpPtr, CONST84 char **targetCmdPtr, int *argcPtr, CONST84 char ***argvPtr); /* 148 */ + int (*tcl_GetAliasObj) (Tcl_Interp *interp, const char *slaveCmd, Tcl_Interp **targetInterpPtr, CONST84 char **targetCmdPtr, int *objcPtr, Tcl_Obj ***objv); /* 149 */ + ClientData (*tcl_GetAssocData) (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc **procPtr); /* 150 */ + Tcl_Channel (*tcl_GetChannel) (Tcl_Interp *interp, const char *chanName, int *modePtr); /* 151 */ int (*tcl_GetChannelBufferSize) (Tcl_Channel chan); /* 152 */ - int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData * handlePtr); /* 153 */ + int (*tcl_GetChannelHandle) (Tcl_Channel chan, int direction, ClientData *handlePtr); /* 153 */ ClientData (*tcl_GetChannelInstanceData) (Tcl_Channel chan); /* 154 */ int (*tcl_GetChannelMode) (Tcl_Channel chan); /* 155 */ CONST84_RETURN char * (*tcl_GetChannelName) (Tcl_Channel chan); /* 156 */ - int (*tcl_GetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, Tcl_DString * dsPtr); /* 157 */ + int (*tcl_GetChannelOption) (Tcl_Interp *interp, Tcl_Channel chan, const char *optionName, Tcl_DString *dsPtr); /* 157 */ CONST86 Tcl_ChannelType * (*tcl_GetChannelType) (Tcl_Channel chan); /* 158 */ - int (*tcl_GetCommandInfo) (Tcl_Interp * interp, const char * cmdName, Tcl_CmdInfo * infoPtr); /* 159 */ - CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp * interp, Tcl_Command command); /* 160 */ + int (*tcl_GetCommandInfo) (Tcl_Interp *interp, const char *cmdName, Tcl_CmdInfo *infoPtr); /* 159 */ + CONST84_RETURN char * (*tcl_GetCommandName) (Tcl_Interp *interp, Tcl_Command command); /* 160 */ int (*tcl_GetErrno) (void); /* 161 */ CONST84_RETURN char * (*tcl_GetHostName) (void); /* 162 */ - int (*tcl_GetInterpPath) (Tcl_Interp * askInterp, Tcl_Interp * slaveInterp); /* 163 */ - Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp * interp); /* 164 */ + int (*tcl_GetInterpPath) (Tcl_Interp *askInterp, Tcl_Interp *slaveInterp); /* 163 */ + Tcl_Interp * (*tcl_GetMaster) (Tcl_Interp *interp); /* 164 */ const char * (*tcl_GetNameOfExecutable) (void); /* 165 */ - Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp * interp); /* 166 */ + Tcl_Obj * (*tcl_GetObjResult) (Tcl_Interp *interp); /* 166 */ #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ + int (*tcl_GetOpenFile) (Tcl_Interp *interp, const char *chanID, int forWriting, int checkUsage, ClientData *filePtr); /* 167 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ void *reserved167; #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_GetOpenFile) (Tcl_Interp * interp, const char * chanID, int forWriting, int checkUsage, ClientData * filePtr); /* 167 */ + int (*tcl_GetOpenFile) (Tcl_Interp *interp, const char *chanID, int forWriting, int checkUsage, ClientData *filePtr); /* 167 */ #endif /* MACOSX */ - Tcl_PathType (*tcl_GetPathType) (const char * path); /* 168 */ - int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString * dsPtr); /* 169 */ - int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 170 */ + Tcl_PathType (*tcl_GetPathType) (const char *path); /* 168 */ + int (*tcl_Gets) (Tcl_Channel chan, Tcl_DString *dsPtr); /* 169 */ + int (*tcl_GetsObj) (Tcl_Channel chan, Tcl_Obj *objPtr); /* 170 */ int (*tcl_GetServiceMode) (void); /* 171 */ - Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp * interp, const char * slaveName); /* 172 */ + Tcl_Interp * (*tcl_GetSlave) (Tcl_Interp *interp, const char *slaveName); /* 172 */ Tcl_Channel (*tcl_GetStdChannel) (int type); /* 173 */ - CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp * interp); /* 174 */ - CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 175 */ - CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 176 */ - int (*tcl_GlobalEval) (Tcl_Interp * interp, const char * command); /* 177 */ - int (*tcl_GlobalEvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 178 */ - int (*tcl_HideCommand) (Tcl_Interp * interp, const char * cmdName, const char * hiddenCmdToken); /* 179 */ - int (*tcl_Init) (Tcl_Interp * interp); /* 180 */ - void (*tcl_InitHashTable) (Tcl_HashTable * tablePtr, int keyType); /* 181 */ + CONST84_RETURN char * (*tcl_GetStringResult) (Tcl_Interp *interp); /* 174 */ + CONST84_RETURN char * (*tcl_GetVar) (Tcl_Interp *interp, const char *varName, int flags); /* 175 */ + CONST84_RETURN char * (*tcl_GetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags); /* 176 */ + int (*tcl_GlobalEval) (Tcl_Interp *interp, const char *command); /* 177 */ + int (*tcl_GlobalEvalObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 178 */ + int (*tcl_HideCommand) (Tcl_Interp *interp, const char *cmdName, const char *hiddenCmdToken); /* 179 */ + int (*tcl_Init) (Tcl_Interp *interp); /* 180 */ + void (*tcl_InitHashTable) (Tcl_HashTable *tablePtr, int keyType); /* 181 */ int (*tcl_InputBlocked) (Tcl_Channel chan); /* 182 */ int (*tcl_InputBuffered) (Tcl_Channel chan); /* 183 */ - int (*tcl_InterpDeleted) (Tcl_Interp * interp); /* 184 */ - int (*tcl_IsSafe) (Tcl_Interp * interp); /* 185 */ - char * (*tcl_JoinPath) (int argc, CONST84 char *const * argv, Tcl_DString * resultPtr); /* 186 */ - int (*tcl_LinkVar) (Tcl_Interp * interp, const char * varName, char * addr, int type); /* 187 */ + int (*tcl_InterpDeleted) (Tcl_Interp *interp); /* 184 */ + int (*tcl_IsSafe) (Tcl_Interp *interp); /* 185 */ + char * (*tcl_JoinPath) (int argc, CONST84 char *const *argv, Tcl_DString *resultPtr); /* 186 */ + int (*tcl_LinkVar) (Tcl_Interp *interp, const char *varName, char *addr, int type); /* 187 */ void *reserved188; Tcl_Channel (*tcl_MakeFileChannel) (ClientData handle, int mode); /* 189 */ - int (*tcl_MakeSafe) (Tcl_Interp * interp); /* 190 */ + int (*tcl_MakeSafe) (Tcl_Interp *interp); /* 190 */ Tcl_Channel (*tcl_MakeTcpClientChannel) (ClientData tcpSocket); /* 191 */ - char * (*tcl_Merge) (int argc, CONST84 char *const * argv); /* 192 */ - Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch * searchPtr); /* 193 */ + char * (*tcl_Merge) (int argc, CONST84 char *const *argv); /* 192 */ + Tcl_HashEntry * (*tcl_NextHashEntry) (Tcl_HashSearch *searchPtr); /* 193 */ void (*tcl_NotifyChannel) (Tcl_Channel channel, int mask); /* 194 */ - Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags); /* 195 */ - Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags); /* 196 */ - Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags); /* 197 */ - Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp * interp, const char * fileName, const char * modeString, int permissions); /* 198 */ - Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp * interp, int port, const char * address, const char * myaddr, int myport, int async); /* 199 */ - Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp * interp, int port, const char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData); /* 200 */ + Tcl_Obj * (*tcl_ObjGetVar2) (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags); /* 195 */ + Tcl_Obj * (*tcl_ObjSetVar2) (Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags); /* 196 */ + Tcl_Channel (*tcl_OpenCommandChannel) (Tcl_Interp *interp, int argc, CONST84 char **argv, int flags); /* 197 */ + Tcl_Channel (*tcl_OpenFileChannel) (Tcl_Interp *interp, const char *fileName, const char *modeString, int permissions); /* 198 */ + Tcl_Channel (*tcl_OpenTcpClient) (Tcl_Interp *interp, int port, const char *address, const char *myaddr, int myport, int async); /* 199 */ + Tcl_Channel (*tcl_OpenTcpServer) (Tcl_Interp *interp, int port, const char *host, Tcl_TcpAcceptProc *acceptProc, ClientData callbackData); /* 200 */ void (*tcl_Preserve) (ClientData data); /* 201 */ - void (*tcl_PrintDouble) (Tcl_Interp * interp, double value, char * dst); /* 202 */ - int (*tcl_PutEnv) (const char * assignment); /* 203 */ - CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp * interp); /* 204 */ - void (*tcl_QueueEvent) (Tcl_Event * evPtr, Tcl_QueuePosition position); /* 205 */ - int (*tcl_Read) (Tcl_Channel chan, char * bufPtr, int toRead); /* 206 */ + void (*tcl_PrintDouble) (Tcl_Interp *interp, double value, char *dst); /* 202 */ + int (*tcl_PutEnv) (const char *assignment); /* 203 */ + CONST84_RETURN char * (*tcl_PosixError) (Tcl_Interp *interp); /* 204 */ + void (*tcl_QueueEvent) (Tcl_Event *evPtr, Tcl_QueuePosition position); /* 205 */ + int (*tcl_Read) (Tcl_Channel chan, char *bufPtr, int toRead); /* 206 */ void (*tcl_ReapDetachedProcs) (void); /* 207 */ - int (*tcl_RecordAndEval) (Tcl_Interp * interp, const char * cmd, int flags); /* 208 */ - int (*tcl_RecordAndEvalObj) (Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags); /* 209 */ - void (*tcl_RegisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 210 */ - void (*tcl_RegisterObjType) (const Tcl_ObjType * typePtr); /* 211 */ - Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp * interp, const char * pattern); /* 212 */ - int (*tcl_RegExpExec) (Tcl_Interp * interp, Tcl_RegExp regexp, const char * text, const char * start); /* 213 */ - int (*tcl_RegExpMatch) (Tcl_Interp * interp, const char * text, const char * pattern); /* 214 */ - void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr); /* 215 */ + int (*tcl_RecordAndEval) (Tcl_Interp *interp, const char *cmd, int flags); /* 208 */ + int (*tcl_RecordAndEvalObj) (Tcl_Interp *interp, Tcl_Obj *cmdPtr, int flags); /* 209 */ + void (*tcl_RegisterChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 210 */ + void (*tcl_RegisterObjType) (const Tcl_ObjType *typePtr); /* 211 */ + Tcl_RegExp (*tcl_RegExpCompile) (Tcl_Interp *interp, const char *pattern); /* 212 */ + int (*tcl_RegExpExec) (Tcl_Interp *interp, Tcl_RegExp regexp, const char *text, const char *start); /* 213 */ + int (*tcl_RegExpMatch) (Tcl_Interp *interp, const char *text, const char *pattern); /* 214 */ + void (*tcl_RegExpRange) (Tcl_RegExp regexp, int index, CONST84 char **startPtr, CONST84 char **endPtr); /* 215 */ void (*tcl_Release) (ClientData clientData); /* 216 */ - void (*tcl_ResetResult) (Tcl_Interp * interp); /* 217 */ - int (*tcl_ScanElement) (const char * str, int * flagPtr); /* 218 */ - int (*tcl_ScanCountedElement) (const char * str, int length, int * flagPtr); /* 219 */ + void (*tcl_ResetResult) (Tcl_Interp *interp); /* 217 */ + int (*tcl_ScanElement) (const char *str, int *flagPtr); /* 218 */ + int (*tcl_ScanCountedElement) (const char *str, int length, int *flagPtr); /* 219 */ int (*tcl_SeekOld) (Tcl_Channel chan, int offset, int mode); /* 220 */ int (*tcl_ServiceAll) (void); /* 221 */ int (*tcl_ServiceEvent) (int flags); /* 222 */ - void (*tcl_SetAssocData) (Tcl_Interp * interp, const char * name, Tcl_InterpDeleteProc * proc, ClientData clientData); /* 223 */ + void (*tcl_SetAssocData) (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc *proc, ClientData clientData); /* 223 */ void (*tcl_SetChannelBufferSize) (Tcl_Channel chan, int sz); /* 224 */ - int (*tcl_SetChannelOption) (Tcl_Interp * interp, Tcl_Channel chan, const char * optionName, const char * newValue); /* 225 */ - int (*tcl_SetCommandInfo) (Tcl_Interp * interp, const char * cmdName, const Tcl_CmdInfo * infoPtr); /* 226 */ + int (*tcl_SetChannelOption) (Tcl_Interp *interp, Tcl_Channel chan, const char *optionName, const char *newValue); /* 225 */ + int (*tcl_SetCommandInfo) (Tcl_Interp *interp, const char *cmdName, const Tcl_CmdInfo *infoPtr); /* 226 */ void (*tcl_SetErrno) (int err); /* 227 */ - void (*tcl_SetErrorCode) (Tcl_Interp * interp, ...); /* 228 */ - void (*tcl_SetMaxBlockTime) (const Tcl_Time * timePtr); /* 229 */ - void (*tcl_SetPanicProc) (Tcl_PanicProc * panicProc); /* 230 */ - int (*tcl_SetRecursionLimit) (Tcl_Interp * interp, int depth); /* 231 */ - void (*tcl_SetResult) (Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc); /* 232 */ + void (*tcl_SetErrorCode) (Tcl_Interp *interp, ...); /* 228 */ + void (*tcl_SetMaxBlockTime) (const Tcl_Time *timePtr); /* 229 */ + void (*tcl_SetPanicProc) (Tcl_PanicProc *panicProc); /* 230 */ + int (*tcl_SetRecursionLimit) (Tcl_Interp *interp, int depth); /* 231 */ + void (*tcl_SetResult) (Tcl_Interp *interp, char *result, Tcl_FreeProc *freeProc); /* 232 */ int (*tcl_SetServiceMode) (int mode); /* 233 */ - void (*tcl_SetObjErrorCode) (Tcl_Interp * interp, Tcl_Obj * errorObjPtr); /* 234 */ - void (*tcl_SetObjResult) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr); /* 235 */ + void (*tcl_SetObjErrorCode) (Tcl_Interp *interp, Tcl_Obj *errorObjPtr); /* 234 */ + void (*tcl_SetObjResult) (Tcl_Interp *interp, Tcl_Obj *resultObjPtr); /* 235 */ void (*tcl_SetStdChannel) (Tcl_Channel channel, int type); /* 236 */ - CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp * interp, const char * varName, const char * newValue, int flags); /* 237 */ - CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, const char * newValue, int flags); /* 238 */ + CONST84_RETURN char * (*tcl_SetVar) (Tcl_Interp *interp, const char *varName, const char *newValue, int flags); /* 237 */ + CONST84_RETURN char * (*tcl_SetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags); /* 238 */ CONST84_RETURN char * (*tcl_SignalId) (int sig); /* 239 */ CONST84_RETURN char * (*tcl_SignalMsg) (int sig); /* 240 */ - void (*tcl_SourceRCFile) (Tcl_Interp * interp); /* 241 */ - int (*tcl_SplitList) (Tcl_Interp * interp, const char * listStr, int * argcPtr, CONST84 char *** argvPtr); /* 242 */ - void (*tcl_SplitPath) (const char * path, int * argcPtr, CONST84 char *** argvPtr); /* 243 */ - void (*tcl_StaticPackage) (Tcl_Interp * interp, const char * pkgName, Tcl_PackageInitProc * initProc, Tcl_PackageInitProc * safeInitProc); /* 244 */ - int (*tcl_StringMatch) (const char * str, const char * pattern); /* 245 */ + void (*tcl_SourceRCFile) (Tcl_Interp *interp); /* 241 */ + int (*tcl_SplitList) (Tcl_Interp *interp, const char *listStr, int *argcPtr, CONST84 char ***argvPtr); /* 242 */ + void (*tcl_SplitPath) (const char *path, int *argcPtr, CONST84 char ***argvPtr); /* 243 */ + void (*tcl_StaticPackage) (Tcl_Interp *interp, const char *pkgName, Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc); /* 244 */ + int (*tcl_StringMatch) (const char *str, const char *pattern); /* 245 */ int (*tcl_TellOld) (Tcl_Channel chan); /* 246 */ - int (*tcl_TraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 247 */ - int (*tcl_TraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 248 */ - char * (*tcl_TranslateFileName) (Tcl_Interp * interp, const char * name, Tcl_DString * bufferPtr); /* 249 */ - int (*tcl_Ungets) (Tcl_Channel chan, const char * str, int len, int atHead); /* 250 */ - void (*tcl_UnlinkVar) (Tcl_Interp * interp, const char * varName); /* 251 */ - int (*tcl_UnregisterChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 252 */ - int (*tcl_UnsetVar) (Tcl_Interp * interp, const char * varName, int flags); /* 253 */ - int (*tcl_UnsetVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 254 */ - void (*tcl_UntraceVar) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 255 */ - void (*tcl_UntraceVar2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData); /* 256 */ - void (*tcl_UpdateLinkedVar) (Tcl_Interp * interp, const char * varName); /* 257 */ - int (*tcl_UpVar) (Tcl_Interp * interp, const char * frameName, const char * varName, const char * localName, int flags); /* 258 */ - int (*tcl_UpVar2) (Tcl_Interp * interp, const char * frameName, const char * part1, const char * part2, const char * localName, int flags); /* 259 */ - int (*tcl_VarEval) (Tcl_Interp * interp, ...); /* 260 */ - ClientData (*tcl_VarTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 261 */ - ClientData (*tcl_VarTraceInfo2) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData); /* 262 */ - int (*tcl_Write) (Tcl_Channel chan, const char * s, int slen); /* 263 */ - void (*tcl_WrongNumArgs) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], const char * message); /* 264 */ - int (*tcl_DumpActiveMemory) (const char * fileName); /* 265 */ - void (*tcl_ValidateAllMemory) (const char * file, int line); /* 266 */ - void (*tcl_AppendResultVA) (Tcl_Interp * interp, va_list argList); /* 267 */ - void (*tcl_AppendStringsToObjVA) (Tcl_Obj * objPtr, va_list argList); /* 268 */ - char * (*tcl_HashStats) (Tcl_HashTable * tablePtr); /* 269 */ - CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp * interp, const char * start, CONST84 char ** termPtr); /* 270 */ - CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 271 */ - CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp * interp, const char * name, const char * version, int exact, ClientData * clientDataPtr); /* 272 */ - int (*tcl_PkgProvide) (Tcl_Interp * interp, const char * name, const char * version); /* 273 */ - CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp * interp, const char * name, const char * version, int exact); /* 274 */ - void (*tcl_SetErrorCodeVA) (Tcl_Interp * interp, va_list argList); /* 275 */ - int (*tcl_VarEvalVA) (Tcl_Interp * interp, va_list argList); /* 276 */ - Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int * statPtr, int options); /* 277 */ - void (*tcl_PanicVA) (const char * format, va_list argList); /* 278 */ - void (*tcl_GetVersion) (int * major, int * minor, int * patchLevel, int * type); /* 279 */ - void (*tcl_InitMemory) (Tcl_Interp * interp); /* 280 */ - Tcl_Channel (*tcl_StackChannel) (Tcl_Interp * interp, const Tcl_ChannelType * typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ - int (*tcl_UnstackChannel) (Tcl_Interp * interp, Tcl_Channel chan); /* 282 */ + int (*tcl_TraceVar) (Tcl_Interp *interp, const char *varName, int flags, Tcl_VarTraceProc *proc, ClientData clientData); /* 247 */ + int (*tcl_TraceVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, ClientData clientData); /* 248 */ + char * (*tcl_TranslateFileName) (Tcl_Interp *interp, const char *name, Tcl_DString *bufferPtr); /* 249 */ + int (*tcl_Ungets) (Tcl_Channel chan, const char *str, int len, int atHead); /* 250 */ + void (*tcl_UnlinkVar) (Tcl_Interp *interp, const char *varName); /* 251 */ + int (*tcl_UnregisterChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 252 */ + int (*tcl_UnsetVar) (Tcl_Interp *interp, const char *varName, int flags); /* 253 */ + int (*tcl_UnsetVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags); /* 254 */ + void (*tcl_UntraceVar) (Tcl_Interp *interp, const char *varName, int flags, Tcl_VarTraceProc *proc, ClientData clientData); /* 255 */ + void (*tcl_UntraceVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, ClientData clientData); /* 256 */ + void (*tcl_UpdateLinkedVar) (Tcl_Interp *interp, const char *varName); /* 257 */ + int (*tcl_UpVar) (Tcl_Interp *interp, const char *frameName, const char *varName, const char *localName, int flags); /* 258 */ + int (*tcl_UpVar2) (Tcl_Interp *interp, const char *frameName, const char *part1, const char *part2, const char *localName, int flags); /* 259 */ + int (*tcl_VarEval) (Tcl_Interp *interp, ...); /* 260 */ + ClientData (*tcl_VarTraceInfo) (Tcl_Interp *interp, const char *varName, int flags, Tcl_VarTraceProc *procPtr, ClientData prevClientData); /* 261 */ + ClientData (*tcl_VarTraceInfo2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *procPtr, ClientData prevClientData); /* 262 */ + int (*tcl_Write) (Tcl_Channel chan, const char *s, int slen); /* 263 */ + void (*tcl_WrongNumArgs) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], const char *message); /* 264 */ + int (*tcl_DumpActiveMemory) (const char *fileName); /* 265 */ + void (*tcl_ValidateAllMemory) (const char *file, int line); /* 266 */ + void (*tcl_AppendResultVA) (Tcl_Interp *interp, va_list argList); /* 267 */ + void (*tcl_AppendStringsToObjVA) (Tcl_Obj *objPtr, va_list argList); /* 268 */ + char * (*tcl_HashStats) (Tcl_HashTable *tablePtr); /* 269 */ + CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp *interp, const char *start, CONST84 char **termPtr); /* 270 */ + CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp *interp, const char *name, const char *version, int exact); /* 271 */ + CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, ClientData *clientDataPtr); /* 272 */ + int (*tcl_PkgProvide) (Tcl_Interp *interp, const char *name, const char *version); /* 273 */ + CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp *interp, const char *name, const char *version, int exact); /* 274 */ + void (*tcl_SetErrorCodeVA) (Tcl_Interp *interp, va_list argList); /* 275 */ + int (*tcl_VarEvalVA) (Tcl_Interp *interp, va_list argList); /* 276 */ + Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int *statPtr, int options); /* 277 */ + void (*tcl_PanicVA) (const char *format, va_list argList); /* 278 */ + void (*tcl_GetVersion) (int *major, int *minor, int *patchLevel, int *type); /* 279 */ + void (*tcl_InitMemory) (Tcl_Interp *interp); /* 280 */ + Tcl_Channel (*tcl_StackChannel) (Tcl_Interp *interp, const Tcl_ChannelType *typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */ + int (*tcl_UnstackChannel) (Tcl_Interp *interp, Tcl_Channel chan); /* 282 */ Tcl_Channel (*tcl_GetStackedChannel) (Tcl_Channel chan); /* 283 */ - void (*tcl_SetMainLoop) (Tcl_MainLoopProc * proc); /* 284 */ + void (*tcl_SetMainLoop) (Tcl_MainLoopProc *proc); /* 284 */ void *reserved285; - void (*tcl_AppendObjToObj) (Tcl_Obj * objPtr, Tcl_Obj * appendObjPtr); /* 286 */ - Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType * typePtr); /* 287 */ - void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 288 */ - void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc * proc, ClientData clientData); /* 289 */ - void (*tcl_DiscardResult) (Tcl_SavedResult * statePtr); /* 290 */ - int (*tcl_EvalEx) (Tcl_Interp * interp, const char * script, int numBytes, int flags); /* 291 */ - int (*tcl_EvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ - int (*tcl_EvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 293 */ + void (*tcl_AppendObjToObj) (Tcl_Obj *objPtr, Tcl_Obj *appendObjPtr); /* 286 */ + Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType *typePtr); /* 287 */ + void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 288 */ + void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 289 */ + void (*tcl_DiscardResult) (Tcl_SavedResult *statePtr); /* 290 */ + int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ + int (*tcl_EvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 293 */ void (*tcl_ExitThread) (int status); /* 294 */ - int (*tcl_ExternalToUtf) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 295 */ - char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 296 */ + int (*tcl_ExternalToUtf) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); /* 295 */ + char * (*tcl_ExternalToUtfDString) (Tcl_Encoding encoding, const char *src, int srcLen, Tcl_DString *dsPtr); /* 296 */ void (*tcl_FinalizeThread) (void); /* 297 */ void (*tcl_FinalizeNotifier) (ClientData clientData); /* 298 */ void (*tcl_FreeEncoding) (Tcl_Encoding encoding); /* 299 */ Tcl_ThreadId (*tcl_GetCurrentThread) (void); /* 300 */ - Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp * interp, const char * name); /* 301 */ + Tcl_Encoding (*tcl_GetEncoding) (Tcl_Interp *interp, const char *name); /* 301 */ CONST84_RETURN char * (*tcl_GetEncodingName) (Tcl_Encoding encoding); /* 302 */ - void (*tcl_GetEncodingNames) (Tcl_Interp * interp); /* 303 */ - int (*tcl_GetIndexFromObjStruct) (Tcl_Interp * interp, Tcl_Obj * objPtr, const void * tablePtr, int offset, const char * msg, int flags, int * indexPtr); /* 304 */ - void * (*tcl_GetThreadData) (Tcl_ThreadDataKey * keyPtr, int size); /* 305 */ - Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, int flags); /* 306 */ + void (*tcl_GetEncodingNames) (Tcl_Interp *interp); /* 303 */ + int (*tcl_GetIndexFromObjStruct) (Tcl_Interp *interp, Tcl_Obj *objPtr, const void *tablePtr, int offset, const char *msg, int flags, int *indexPtr); /* 304 */ + void * (*tcl_GetThreadData) (Tcl_ThreadDataKey *keyPtr, int size); /* 305 */ + Tcl_Obj * (*tcl_GetVar2Ex) (Tcl_Interp *interp, const char *part1, const char *part2, int flags); /* 306 */ ClientData (*tcl_InitNotifier) (void); /* 307 */ - void (*tcl_MutexLock) (Tcl_Mutex * mutexPtr); /* 308 */ - void (*tcl_MutexUnlock) (Tcl_Mutex * mutexPtr); /* 309 */ - void (*tcl_ConditionNotify) (Tcl_Condition * condPtr); /* 310 */ - void (*tcl_ConditionWait) (Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, const Tcl_Time * timePtr); /* 311 */ - int (*tcl_NumUtfChars) (const char * src, int length); /* 312 */ - int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag); /* 313 */ - void (*tcl_RestoreResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 314 */ - void (*tcl_SaveResult) (Tcl_Interp * interp, Tcl_SavedResult * statePtr); /* 315 */ - int (*tcl_SetSystemEncoding) (Tcl_Interp * interp, const char * name); /* 316 */ - Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp * interp, const char * part1, const char * part2, Tcl_Obj * newValuePtr, int flags); /* 317 */ + void (*tcl_MutexLock) (Tcl_Mutex *mutexPtr); /* 308 */ + void (*tcl_MutexUnlock) (Tcl_Mutex *mutexPtr); /* 309 */ + void (*tcl_ConditionNotify) (Tcl_Condition *condPtr); /* 310 */ + void (*tcl_ConditionWait) (Tcl_Condition *condPtr, Tcl_Mutex *mutexPtr, const Tcl_Time *timePtr); /* 311 */ + int (*tcl_NumUtfChars) (const char *src, int length); /* 312 */ + int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj *objPtr, int charsToRead, int appendFlag); /* 313 */ + void (*tcl_RestoreResult) (Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 314 */ + void (*tcl_SaveResult) (Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 315 */ + int (*tcl_SetSystemEncoding) (Tcl_Interp *interp, const char *name); /* 316 */ + Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp *interp, const char *part1, const char *part2, Tcl_Obj *newValuePtr, int flags); /* 317 */ void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ - void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event * evPtr, Tcl_QueuePosition position); /* 319 */ - Tcl_UniChar (*tcl_UniCharAtIndex) (const char * src, int index); /* 320 */ + void (*tcl_ThreadQueueEvent) (Tcl_ThreadId threadId, Tcl_Event *evPtr, Tcl_QueuePosition position); /* 319 */ + Tcl_UniChar (*tcl_UniCharAtIndex) (const char *src, int index); /* 320 */ Tcl_UniChar (*tcl_UniCharToLower) (int ch); /* 321 */ Tcl_UniChar (*tcl_UniCharToTitle) (int ch); /* 322 */ Tcl_UniChar (*tcl_UniCharToUpper) (int ch); /* 323 */ - int (*tcl_UniCharToUtf) (int ch, char * buf); /* 324 */ - CONST84_RETURN char * (*tcl_UtfAtIndex) (const char * src, int index); /* 325 */ - int (*tcl_UtfCharComplete) (const char * src, int length); /* 326 */ - int (*tcl_UtfBackslash) (const char * src, int * readPtr, char * dst); /* 327 */ - CONST84_RETURN char * (*tcl_UtfFindFirst) (const char * src, int ch); /* 328 */ - CONST84_RETURN char * (*tcl_UtfFindLast) (const char * src, int ch); /* 329 */ - CONST84_RETURN char * (*tcl_UtfNext) (const char * src); /* 330 */ - CONST84_RETURN char * (*tcl_UtfPrev) (const char * src, const char * start); /* 331 */ - int (*tcl_UtfToExternal) (Tcl_Interp * interp, Tcl_Encoding encoding, const char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr); /* 332 */ - char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char * src, int srcLen, Tcl_DString * dsPtr); /* 333 */ - int (*tcl_UtfToLower) (char * src); /* 334 */ - int (*tcl_UtfToTitle) (char * src); /* 335 */ - int (*tcl_UtfToUniChar) (const char * src, Tcl_UniChar * chPtr); /* 336 */ - int (*tcl_UtfToUpper) (char * src); /* 337 */ - int (*tcl_WriteChars) (Tcl_Channel chan, const char * src, int srcLen); /* 338 */ - int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj * objPtr); /* 339 */ - char * (*tcl_GetString) (Tcl_Obj * objPtr); /* 340 */ + int (*tcl_UniCharToUtf) (int ch, char *buf); /* 324 */ + CONST84_RETURN char * (*tcl_UtfAtIndex) (const char *src, int index); /* 325 */ + int (*tcl_UtfCharComplete) (const char *src, int length); /* 326 */ + int (*tcl_UtfBackslash) (const char *src, int *readPtr, char *dst); /* 327 */ + CONST84_RETURN char * (*tcl_UtfFindFirst) (const char *src, int ch); /* 328 */ + CONST84_RETURN char * (*tcl_UtfFindLast) (const char *src, int ch); /* 329 */ + CONST84_RETURN char * (*tcl_UtfNext) (const char *src); /* 330 */ + CONST84_RETURN char * (*tcl_UtfPrev) (const char *src, const char *start); /* 331 */ + int (*tcl_UtfToExternal) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); /* 332 */ + char * (*tcl_UtfToExternalDString) (Tcl_Encoding encoding, const char *src, int srcLen, Tcl_DString *dsPtr); /* 333 */ + int (*tcl_UtfToLower) (char *src); /* 334 */ + int (*tcl_UtfToTitle) (char *src); /* 335 */ + int (*tcl_UtfToUniChar) (const char *src, Tcl_UniChar *chPtr); /* 336 */ + int (*tcl_UtfToUpper) (char *src); /* 337 */ + int (*tcl_WriteChars) (Tcl_Channel chan, const char *src, int srcLen); /* 338 */ + int (*tcl_WriteObj) (Tcl_Channel chan, Tcl_Obj *objPtr); /* 339 */ + char * (*tcl_GetString) (Tcl_Obj *objPtr); /* 340 */ CONST84_RETURN char * (*tcl_GetDefaultEncodingDir) (void); /* 341 */ - void (*tcl_SetDefaultEncodingDir) (const char * path); /* 342 */ + void (*tcl_SetDefaultEncodingDir) (const char *path); /* 342 */ void (*tcl_AlertNotifier) (ClientData clientData); /* 343 */ void (*tcl_ServiceModeHook) (int mode); /* 344 */ int (*tcl_UniCharIsAlnum) (int ch); /* 345 */ @@ -4071,281 +4071,281 @@ typedef struct TclStubs { int (*tcl_UniCharIsSpace) (int ch); /* 349 */ int (*tcl_UniCharIsUpper) (int ch); /* 350 */ int (*tcl_UniCharIsWordChar) (int ch); /* 351 */ - int (*tcl_UniCharLen) (const Tcl_UniChar * uniStr); /* 352 */ - int (*tcl_UniCharNcmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 353 */ - char * (*tcl_UniCharToUtfDString) (const Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr); /* 354 */ - Tcl_UniChar * (*tcl_UtfToUniCharDString) (const char * src, int length, Tcl_DString * dsPtr); /* 355 */ - Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp * interp, Tcl_Obj * patObj, int flags); /* 356 */ - Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 357 */ - void (*tcl_FreeParse) (Tcl_Parse * parsePtr); /* 358 */ - void (*tcl_LogCommandInfo) (Tcl_Interp * interp, const char * script, const char * command, int length); /* 359 */ - int (*tcl_ParseBraces) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 360 */ - int (*tcl_ParseCommand) (Tcl_Interp * interp, const char * start, int numBytes, int nested, Tcl_Parse * parsePtr); /* 361 */ - int (*tcl_ParseExpr) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr); /* 362 */ - int (*tcl_ParseQuotedString) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr); /* 363 */ - int (*tcl_ParseVarName) (Tcl_Interp * interp, const char * start, int numBytes, Tcl_Parse * parsePtr, int append); /* 364 */ - char * (*tcl_GetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 365 */ - int (*tcl_Chdir) (const char * dirName); /* 366 */ - int (*tcl_Access) (const char * path, int mode); /* 367 */ - int (*tcl_Stat) (const char * path, struct stat * bufPtr); /* 368 */ - int (*tcl_UtfNcmp) (const char * s1, const char * s2, unsigned long n); /* 369 */ - int (*tcl_UtfNcasecmp) (const char * s1, const char * s2, unsigned long n); /* 370 */ - int (*tcl_StringCaseMatch) (const char * str, const char * pattern, int nocase); /* 371 */ + int (*tcl_UniCharLen) (const Tcl_UniChar *uniStr); /* 352 */ + int (*tcl_UniCharNcmp) (const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned long numChars); /* 353 */ + char * (*tcl_UniCharToUtfDString) (const Tcl_UniChar *uniStr, int uniLength, Tcl_DString *dsPtr); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) (const char *src, int length, Tcl_DString *dsPtr); /* 355 */ + Tcl_RegExp (*tcl_GetRegExpFromObj) (Tcl_Interp *interp, Tcl_Obj *patObj, int flags); /* 356 */ + Tcl_Obj * (*tcl_EvalTokens) (Tcl_Interp *interp, Tcl_Token *tokenPtr, int count); /* 357 */ + void (*tcl_FreeParse) (Tcl_Parse *parsePtr); /* 358 */ + void (*tcl_LogCommandInfo) (Tcl_Interp *interp, const char *script, const char *command, int length); /* 359 */ + int (*tcl_ParseBraces) (Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr, int append, CONST84 char **termPtr); /* 360 */ + int (*tcl_ParseCommand) (Tcl_Interp *interp, const char *start, int numBytes, int nested, Tcl_Parse *parsePtr); /* 361 */ + int (*tcl_ParseExpr) (Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr); /* 362 */ + int (*tcl_ParseQuotedString) (Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr, int append, CONST84 char **termPtr); /* 363 */ + int (*tcl_ParseVarName) (Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr, int append); /* 364 */ + char * (*tcl_GetCwd) (Tcl_Interp *interp, Tcl_DString *cwdPtr); /* 365 */ + int (*tcl_Chdir) (const char *dirName); /* 366 */ + int (*tcl_Access) (const char *path, int mode); /* 367 */ + int (*tcl_Stat) (const char *path, struct stat *bufPtr); /* 368 */ + int (*tcl_UtfNcmp) (const char *s1, const char *s2, unsigned long n); /* 369 */ + int (*tcl_UtfNcasecmp) (const char *s1, const char *s2, unsigned long n); /* 370 */ + int (*tcl_StringCaseMatch) (const char *str, const char *pattern, int nocase); /* 371 */ int (*tcl_UniCharIsControl) (int ch); /* 372 */ int (*tcl_UniCharIsGraph) (int ch); /* 373 */ int (*tcl_UniCharIsPrint) (int ch); /* 374 */ int (*tcl_UniCharIsPunct) (int ch); /* 375 */ - int (*tcl_RegExpExecObj) (Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags); /* 376 */ - void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr); /* 377 */ - Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar * unicode, int numChars); /* 378 */ - void (*tcl_SetUnicodeObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int numChars); /* 379 */ - int (*tcl_GetCharLength) (Tcl_Obj * objPtr); /* 380 */ - Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj * objPtr, int index); /* 381 */ - Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj * objPtr); /* 382 */ - Tcl_Obj * (*tcl_GetRange) (Tcl_Obj * objPtr, int first, int last); /* 383 */ - void (*tcl_AppendUnicodeToObj) (Tcl_Obj * objPtr, const Tcl_UniChar * unicode, int length); /* 384 */ - int (*tcl_RegExpMatchObj) (Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj); /* 385 */ - void (*tcl_SetNotifier) (Tcl_NotifierProcs * notifierProcPtr); /* 386 */ + int (*tcl_RegExpExecObj) (Tcl_Interp *interp, Tcl_RegExp regexp, Tcl_Obj *textObj, int offset, int nmatches, int flags); /* 376 */ + void (*tcl_RegExpGetInfo) (Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr); /* 377 */ + Tcl_Obj * (*tcl_NewUnicodeObj) (const Tcl_UniChar *unicode, int numChars); /* 378 */ + void (*tcl_SetUnicodeObj) (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars); /* 379 */ + int (*tcl_GetCharLength) (Tcl_Obj *objPtr); /* 380 */ + Tcl_UniChar (*tcl_GetUniChar) (Tcl_Obj *objPtr, int index); /* 381 */ + Tcl_UniChar * (*tcl_GetUnicode) (Tcl_Obj *objPtr); /* 382 */ + Tcl_Obj * (*tcl_GetRange) (Tcl_Obj *objPtr, int first, int last); /* 383 */ + void (*tcl_AppendUnicodeToObj) (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int length); /* 384 */ + int (*tcl_RegExpMatchObj) (Tcl_Interp *interp, Tcl_Obj *textObj, Tcl_Obj *patternObj); /* 385 */ + void (*tcl_SetNotifier) (Tcl_NotifierProcs *notifierProcPtr); /* 386 */ Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ - int (*tcl_GetChannelNames) (Tcl_Interp * interp); /* 388 */ - int (*tcl_GetChannelNamesEx) (Tcl_Interp * interp, const char * pattern); /* 389 */ - int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 390 */ - void (*tcl_ConditionFinalize) (Tcl_Condition * condPtr); /* 391 */ - void (*tcl_MutexFinalize) (Tcl_Mutex * mutex); /* 392 */ - int (*tcl_CreateThread) (Tcl_ThreadId * idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ - int (*tcl_ReadRaw) (Tcl_Channel chan, char * dst, int bytesToRead); /* 394 */ - int (*tcl_WriteRaw) (Tcl_Channel chan, const char * src, int srcLen); /* 395 */ + int (*tcl_GetChannelNames) (Tcl_Interp *interp); /* 388 */ + int (*tcl_GetChannelNamesEx) (Tcl_Interp *interp, const char *pattern); /* 389 */ + int (*tcl_ProcObjCmd) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 390 */ + void (*tcl_ConditionFinalize) (Tcl_Condition *condPtr); /* 391 */ + void (*tcl_MutexFinalize) (Tcl_Mutex *mutex); /* 392 */ + int (*tcl_CreateThread) (Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc proc, ClientData clientData, int stackSize, int flags); /* 393 */ + int (*tcl_ReadRaw) (Tcl_Channel chan, char *dst, int bytesToRead); /* 394 */ + int (*tcl_WriteRaw) (Tcl_Channel chan, const char *src, int srcLen); /* 395 */ Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */ int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */ - CONST84_RETURN char * (*tcl_ChannelName) (const Tcl_ChannelType * chanTypePtr); /* 398 */ - Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType * chanTypePtr); /* 399 */ - Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType * chanTypePtr); /* 400 */ - Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (const Tcl_ChannelType * chanTypePtr); /* 401 */ - Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType * chanTypePtr); /* 402 */ - Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType * chanTypePtr); /* 403 */ - Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType * chanTypePtr); /* 404 */ - Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 405 */ - Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 406 */ - Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType * chanTypePtr); /* 407 */ - Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType * chanTypePtr); /* 408 */ - Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType * chanTypePtr); /* 409 */ - Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType * chanTypePtr); /* 410 */ - Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType * chanTypePtr); /* 411 */ - int (*tcl_JoinThread) (Tcl_ThreadId threadId, int * result); /* 412 */ + CONST84_RETURN char * (*tcl_ChannelName) (const Tcl_ChannelType *chanTypePtr); /* 398 */ + Tcl_ChannelTypeVersion (*tcl_ChannelVersion) (const Tcl_ChannelType *chanTypePtr); /* 399 */ + Tcl_DriverBlockModeProc * (*tcl_ChannelBlockModeProc) (const Tcl_ChannelType *chanTypePtr); /* 400 */ + Tcl_DriverCloseProc * (*tcl_ChannelCloseProc) (const Tcl_ChannelType *chanTypePtr); /* 401 */ + Tcl_DriverClose2Proc * (*tcl_ChannelClose2Proc) (const Tcl_ChannelType *chanTypePtr); /* 402 */ + Tcl_DriverInputProc * (*tcl_ChannelInputProc) (const Tcl_ChannelType *chanTypePtr); /* 403 */ + Tcl_DriverOutputProc * (*tcl_ChannelOutputProc) (const Tcl_ChannelType *chanTypePtr); /* 404 */ + Tcl_DriverSeekProc * (*tcl_ChannelSeekProc) (const Tcl_ChannelType *chanTypePtr); /* 405 */ + Tcl_DriverSetOptionProc * (*tcl_ChannelSetOptionProc) (const Tcl_ChannelType *chanTypePtr); /* 406 */ + Tcl_DriverGetOptionProc * (*tcl_ChannelGetOptionProc) (const Tcl_ChannelType *chanTypePtr); /* 407 */ + Tcl_DriverWatchProc * (*tcl_ChannelWatchProc) (const Tcl_ChannelType *chanTypePtr); /* 408 */ + Tcl_DriverGetHandleProc * (*tcl_ChannelGetHandleProc) (const Tcl_ChannelType *chanTypePtr); /* 409 */ + Tcl_DriverFlushProc * (*tcl_ChannelFlushProc) (const Tcl_ChannelType *chanTypePtr); /* 410 */ + Tcl_DriverHandlerProc * (*tcl_ChannelHandlerProc) (const Tcl_ChannelType *chanTypePtr); /* 411 */ + int (*tcl_JoinThread) (Tcl_ThreadId threadId, int *result); /* 412 */ int (*tcl_IsChannelShared) (Tcl_Channel channel); /* 413 */ - int (*tcl_IsChannelRegistered) (Tcl_Interp * interp, Tcl_Channel channel); /* 414 */ + int (*tcl_IsChannelRegistered) (Tcl_Interp *interp, Tcl_Channel channel); /* 414 */ void (*tcl_CutChannel) (Tcl_Channel channel); /* 415 */ void (*tcl_SpliceChannel) (Tcl_Channel channel); /* 416 */ void (*tcl_ClearChannelHandlers) (Tcl_Channel channel); /* 417 */ - int (*tcl_IsChannelExisting) (const char * channelName); /* 418 */ - int (*tcl_UniCharNcasecmp) (const Tcl_UniChar * ucs, const Tcl_UniChar * uct, unsigned long numChars); /* 419 */ - int (*tcl_UniCharCaseMatch) (const Tcl_UniChar * uniStr, const Tcl_UniChar * uniPattern, int nocase); /* 420 */ - Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable * tablePtr, const char * key); /* 421 */ - Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable * tablePtr, const char * key, int * newPtr); /* 422 */ - void (*tcl_InitCustomHashTable) (Tcl_HashTable * tablePtr, int keyType, const Tcl_HashKeyType * typePtr); /* 423 */ - void (*tcl_InitObjHashTable) (Tcl_HashTable * tablePtr); /* 424 */ - ClientData (*tcl_CommandTraceInfo) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * procPtr, ClientData prevClientData); /* 425 */ - int (*tcl_TraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 426 */ - void (*tcl_UntraceCommand) (Tcl_Interp * interp, const char * varName, int flags, Tcl_CommandTraceProc * proc, ClientData clientData); /* 427 */ + int (*tcl_IsChannelExisting) (const char *channelName); /* 418 */ + int (*tcl_UniCharNcasecmp) (const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned long numChars); /* 419 */ + int (*tcl_UniCharCaseMatch) (const Tcl_UniChar *uniStr, const Tcl_UniChar *uniPattern, int nocase); /* 420 */ + Tcl_HashEntry * (*tcl_FindHashEntry) (Tcl_HashTable *tablePtr, const char *key); /* 421 */ + Tcl_HashEntry * (*tcl_CreateHashEntry) (Tcl_HashTable *tablePtr, const char *key, int *newPtr); /* 422 */ + void (*tcl_InitCustomHashTable) (Tcl_HashTable *tablePtr, int keyType, const Tcl_HashKeyType *typePtr); /* 423 */ + void (*tcl_InitObjHashTable) (Tcl_HashTable *tablePtr); /* 424 */ + ClientData (*tcl_CommandTraceInfo) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *procPtr, ClientData prevClientData); /* 425 */ + int (*tcl_TraceCommand) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, ClientData clientData); /* 426 */ + void (*tcl_UntraceCommand) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, ClientData clientData); /* 427 */ char * (*tcl_AttemptAlloc) (unsigned int size); /* 428 */ - char * (*tcl_AttemptDbCkalloc) (unsigned int size, const char * file, int line); /* 429 */ - char * (*tcl_AttemptRealloc) (char * ptr, unsigned int size); /* 430 */ - char * (*tcl_AttemptDbCkrealloc) (char * ptr, unsigned int size, const char * file, int line); /* 431 */ - int (*tcl_AttemptSetObjLength) (Tcl_Obj * objPtr, int length); /* 432 */ + char * (*tcl_AttemptDbCkalloc) (unsigned int size, const char *file, int line); /* 429 */ + char * (*tcl_AttemptRealloc) (char *ptr, unsigned int size); /* 430 */ + char * (*tcl_AttemptDbCkrealloc) (char *ptr, unsigned int size, const char *file, int line); /* 431 */ + int (*tcl_AttemptSetObjLength) (Tcl_Obj *objPtr, int length); /* 432 */ Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */ - Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj * objPtr, int * lengthPtr); /* 434 */ - int (*tcl_GetMathFuncInfo) (Tcl_Interp * interp, const char * name, int * numArgsPtr, Tcl_ValueType ** argTypesPtr, Tcl_MathProc ** procPtr, ClientData * clientDataPtr); /* 435 */ - Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp * interp, const char * pattern); /* 436 */ - Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 437 */ - int (*tcl_DetachChannel) (Tcl_Interp * interp, Tcl_Channel channel); /* 438 */ + Tcl_UniChar * (*tcl_GetUnicodeFromObj) (Tcl_Obj *objPtr, int *lengthPtr); /* 434 */ + int (*tcl_GetMathFuncInfo) (Tcl_Interp *interp, const char *name, int *numArgsPtr, Tcl_ValueType **argTypesPtr, Tcl_MathProc **procPtr, ClientData *clientDataPtr); /* 435 */ + Tcl_Obj * (*tcl_ListMathFuncs) (Tcl_Interp *interp, const char *pattern); /* 436 */ + Tcl_Obj * (*tcl_SubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 437 */ + int (*tcl_DetachChannel) (Tcl_Interp *interp, Tcl_Channel channel); /* 438 */ int (*tcl_IsStandardChannel) (Tcl_Channel channel); /* 439 */ - int (*tcl_FSCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 440 */ - int (*tcl_FSCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 441 */ - int (*tcl_FSCreateDirectory) (Tcl_Obj * pathPtr); /* 442 */ - int (*tcl_FSDeleteFile) (Tcl_Obj * pathPtr); /* 443 */ - int (*tcl_FSLoadFile) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * sym1, const char * sym2, Tcl_PackageInitProc ** proc1Ptr, Tcl_PackageInitProc ** proc2Ptr, Tcl_LoadHandle * handlePtr, Tcl_FSUnloadFileProc ** unloadProcPtr); /* 444 */ - int (*tcl_FSMatchInDirectory) (Tcl_Interp * interp, Tcl_Obj * result, Tcl_Obj * pathPtr, const char * pattern, Tcl_GlobTypeData * types); /* 445 */ - Tcl_Obj * (*tcl_FSLink) (Tcl_Obj * pathPtr, Tcl_Obj * toPtr, int linkAction); /* 446 */ - int (*tcl_FSRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 447 */ - int (*tcl_FSRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 448 */ - int (*tcl_FSLstat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 449 */ - int (*tcl_FSUtime) (Tcl_Obj * pathPtr, struct utimbuf * tval); /* 450 */ - int (*tcl_FSFileAttrsGet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 451 */ - int (*tcl_FSFileAttrsSet) (Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr); /* 452 */ - const char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef); /* 453 */ - int (*tcl_FSStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 454 */ - int (*tcl_FSAccess) (Tcl_Obj * pathPtr, int mode); /* 455 */ - Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, const char * modeString, int permissions); /* 456 */ - Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp * interp); /* 457 */ - int (*tcl_FSChdir) (Tcl_Obj * pathPtr); /* 458 */ - int (*tcl_FSConvertToPathType) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 459 */ - Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj * listObj, int elements); /* 460 */ - Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj * pathPtr, int * lenPtr); /* 461 */ - int (*tcl_FSEqualPaths) (Tcl_Obj * firstPtr, Tcl_Obj * secondPtr); /* 462 */ - Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 463 */ - Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj * pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ - ClientData (*tcl_FSGetInternalRep) (Tcl_Obj * pathPtr, const Tcl_Filesystem * fsPtr); /* 465 */ - Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 466 */ - int (*tcl_FSEvalFile) (Tcl_Interp * interp, Tcl_Obj * fileName); /* 467 */ - Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem * fromFilesystem, ClientData clientData); /* 468 */ - const char * (*tcl_FSGetNativePath) (Tcl_Obj * pathPtr); /* 469 */ - Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj * pathPtr); /* 470 */ - Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj * pathPtr); /* 471 */ + int (*tcl_FSCopyFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 440 */ + int (*tcl_FSCopyDirectory) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); /* 441 */ + int (*tcl_FSCreateDirectory) (Tcl_Obj *pathPtr); /* 442 */ + int (*tcl_FSDeleteFile) (Tcl_Obj *pathPtr); /* 443 */ + int (*tcl_FSLoadFile) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *sym1, const char *sym2, Tcl_PackageInitProc **proc1Ptr, Tcl_PackageInitProc **proc2Ptr, Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr); /* 444 */ + int (*tcl_FSMatchInDirectory) (Tcl_Interp *interp, Tcl_Obj *result, Tcl_Obj *pathPtr, const char *pattern, Tcl_GlobTypeData *types); /* 445 */ + Tcl_Obj * (*tcl_FSLink) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr, int linkAction); /* 446 */ + int (*tcl_FSRemoveDirectory) (Tcl_Obj *pathPtr, int recursive, Tcl_Obj **errorPtr); /* 447 */ + int (*tcl_FSRenameFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 448 */ + int (*tcl_FSLstat) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); /* 449 */ + int (*tcl_FSUtime) (Tcl_Obj *pathPtr, struct utimbuf *tval); /* 450 */ + int (*tcl_FSFileAttrsGet) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); /* 451 */ + int (*tcl_FSFileAttrsSet) (Tcl_Interp *interp, int index, Tcl_Obj *pathPtr, Tcl_Obj *objPtr); /* 452 */ + const char *CONST86 * (*tcl_FSFileAttrStrings) (Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef); /* 453 */ + int (*tcl_FSStat) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); /* 454 */ + int (*tcl_FSAccess) (Tcl_Obj *pathPtr, int mode); /* 455 */ + Tcl_Channel (*tcl_FSOpenFileChannel) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *modeString, int permissions); /* 456 */ + Tcl_Obj * (*tcl_FSGetCwd) (Tcl_Interp *interp); /* 457 */ + int (*tcl_FSChdir) (Tcl_Obj *pathPtr); /* 458 */ + int (*tcl_FSConvertToPathType) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 459 */ + Tcl_Obj * (*tcl_FSJoinPath) (Tcl_Obj *listObj, int elements); /* 460 */ + Tcl_Obj * (*tcl_FSSplitPath) (Tcl_Obj *pathPtr, int *lenPtr); /* 461 */ + int (*tcl_FSEqualPaths) (Tcl_Obj *firstPtr, Tcl_Obj *secondPtr); /* 462 */ + Tcl_Obj * (*tcl_FSGetNormalizedPath) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 463 */ + Tcl_Obj * (*tcl_FSJoinToPath) (Tcl_Obj *pathPtr, int objc, Tcl_Obj *const objv[]); /* 464 */ + ClientData (*tcl_FSGetInternalRep) (Tcl_Obj *pathPtr, const Tcl_Filesystem *fsPtr); /* 465 */ + Tcl_Obj * (*tcl_FSGetTranslatedPath) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 466 */ + int (*tcl_FSEvalFile) (Tcl_Interp *interp, Tcl_Obj *fileName); /* 467 */ + Tcl_Obj * (*tcl_FSNewNativePath) (const Tcl_Filesystem *fromFilesystem, ClientData clientData); /* 468 */ + const char * (*tcl_FSGetNativePath) (Tcl_Obj *pathPtr); /* 469 */ + Tcl_Obj * (*tcl_FSFileSystemInfo) (Tcl_Obj *pathPtr); /* 470 */ + Tcl_Obj * (*tcl_FSPathSeparator) (Tcl_Obj *pathPtr); /* 471 */ Tcl_Obj * (*tcl_FSListVolumes) (void); /* 472 */ - int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem * fsPtr); /* 473 */ - int (*tcl_FSUnregister) (const Tcl_Filesystem * fsPtr); /* 474 */ - ClientData (*tcl_FSData) (const Tcl_Filesystem * fsPtr); /* 475 */ - const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp * interp, Tcl_Obj * pathPtr); /* 476 */ - CONST86 Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj * pathPtr); /* 477 */ - Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj * pathPtr); /* 478 */ + int (*tcl_FSRegister) (ClientData clientData, const Tcl_Filesystem *fsPtr); /* 473 */ + int (*tcl_FSUnregister) (const Tcl_Filesystem *fsPtr); /* 474 */ + ClientData (*tcl_FSData) (const Tcl_Filesystem *fsPtr); /* 475 */ + const char * (*tcl_FSGetTranslatedStringPath) (Tcl_Interp *interp, Tcl_Obj *pathPtr); /* 476 */ + CONST86 Tcl_Filesystem * (*tcl_FSGetFileSystemForPath) (Tcl_Obj *pathPtr); /* 477 */ + Tcl_PathType (*tcl_FSGetPathType) (Tcl_Obj *pathPtr); /* 478 */ int (*tcl_OutputBuffered) (Tcl_Channel chan); /* 479 */ - void (*tcl_FSMountsChanged) (const Tcl_Filesystem * fsPtr); /* 480 */ - int (*tcl_EvalTokensStandard) (Tcl_Interp * interp, Tcl_Token * tokenPtr, int count); /* 481 */ - void (*tcl_GetTime) (Tcl_Time * timeBuf); /* 482 */ - Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp * interp, int level, int flags, Tcl_CmdObjTraceProc * objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc * delProc); /* 483 */ - int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo * infoPtr); /* 484 */ - int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo * infoPtr); /* 485 */ - Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char * file, int line); /* 486 */ - int (*tcl_GetWideIntFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_WideInt * widePtr); /* 487 */ + void (*tcl_FSMountsChanged) (const Tcl_Filesystem *fsPtr); /* 480 */ + int (*tcl_EvalTokensStandard) (Tcl_Interp *interp, Tcl_Token *tokenPtr, int count); /* 481 */ + void (*tcl_GetTime) (Tcl_Time *timeBuf); /* 482 */ + Tcl_Trace (*tcl_CreateObjTrace) (Tcl_Interp *interp, int level, int flags, Tcl_CmdObjTraceProc *objProc, ClientData clientData, Tcl_CmdObjTraceDeleteProc *delProc); /* 483 */ + int (*tcl_GetCommandInfoFromToken) (Tcl_Command token, Tcl_CmdInfo *infoPtr); /* 484 */ + int (*tcl_SetCommandInfoFromToken) (Tcl_Command token, const Tcl_CmdInfo *infoPtr); /* 485 */ + Tcl_Obj * (*tcl_DbNewWideIntObj) (Tcl_WideInt wideValue, const char *file, int line); /* 486 */ + int (*tcl_GetWideIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideInt *widePtr); /* 487 */ Tcl_Obj * (*tcl_NewWideIntObj) (Tcl_WideInt wideValue); /* 488 */ - void (*tcl_SetWideIntObj) (Tcl_Obj * objPtr, Tcl_WideInt wideValue); /* 489 */ + void (*tcl_SetWideIntObj) (Tcl_Obj *objPtr, Tcl_WideInt wideValue); /* 489 */ Tcl_StatBuf * (*tcl_AllocStatBuf) (void); /* 490 */ Tcl_WideInt (*tcl_Seek) (Tcl_Channel chan, Tcl_WideInt offset, int mode); /* 491 */ Tcl_WideInt (*tcl_Tell) (Tcl_Channel chan); /* 492 */ - Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType * chanTypePtr); /* 493 */ - int (*tcl_DictObjPut) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj * valuePtr); /* 494 */ - int (*tcl_DictObjGet) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr, Tcl_Obj ** valuePtrPtr); /* 495 */ - int (*tcl_DictObjRemove) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_Obj * keyPtr); /* 496 */ - int (*tcl_DictObjSize) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int * sizePtr); /* 497 */ - int (*tcl_DictObjFirst) (Tcl_Interp * interp, Tcl_Obj * dictPtr, Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 498 */ - void (*tcl_DictObjNext) (Tcl_DictSearch * searchPtr, Tcl_Obj ** keyPtrPtr, Tcl_Obj ** valuePtrPtr, int * donePtr); /* 499 */ - void (*tcl_DictObjDone) (Tcl_DictSearch * searchPtr); /* 500 */ - int (*tcl_DictObjPutKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv, Tcl_Obj * valuePtr); /* 501 */ - int (*tcl_DictObjRemoveKeyList) (Tcl_Interp * interp, Tcl_Obj * dictPtr, int keyc, Tcl_Obj *const * keyv); /* 502 */ + Tcl_DriverWideSeekProc * (*tcl_ChannelWideSeekProc) (const Tcl_ChannelType *chanTypePtr); /* 493 */ + int (*tcl_DictObjPut) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj *valuePtr); /* 494 */ + int (*tcl_DictObjGet) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr, Tcl_Obj **valuePtrPtr); /* 495 */ + int (*tcl_DictObjRemove) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_Obj *keyPtr); /* 496 */ + int (*tcl_DictObjSize) (Tcl_Interp *interp, Tcl_Obj *dictPtr, int *sizePtr); /* 497 */ + int (*tcl_DictObjFirst) (Tcl_Interp *interp, Tcl_Obj *dictPtr, Tcl_DictSearch *searchPtr, Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr, int *donePtr); /* 498 */ + void (*tcl_DictObjNext) (Tcl_DictSearch *searchPtr, Tcl_Obj **keyPtrPtr, Tcl_Obj **valuePtrPtr, int *donePtr); /* 499 */ + void (*tcl_DictObjDone) (Tcl_DictSearch *searchPtr); /* 500 */ + int (*tcl_DictObjPutKeyList) (Tcl_Interp *interp, Tcl_Obj *dictPtr, int keyc, Tcl_Obj *const *keyv, Tcl_Obj *valuePtr); /* 501 */ + int (*tcl_DictObjRemoveKeyList) (Tcl_Interp *interp, Tcl_Obj *dictPtr, int keyc, Tcl_Obj *const *keyv); /* 502 */ Tcl_Obj * (*tcl_NewDictObj) (void); /* 503 */ - Tcl_Obj * (*tcl_DbNewDictObj) (const char * file, int line); /* 504 */ - void (*tcl_RegisterConfig) (Tcl_Interp * interp, const char * pkgName, const Tcl_Config * configuration, const char * valEncoding); /* 505 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 506 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 507 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 508 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 509 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 510 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 511 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 512 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 513 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 514 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 515 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 516 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 517 */ - int (*tcl_FSEvalFileEx) (Tcl_Interp * interp, Tcl_Obj * fileName, const char * encodingName); /* 518 */ - Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc * proc); /* 519 */ - void (*tcl_LimitAddHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc * deleteProc); /* 520 */ - void (*tcl_LimitRemoveHandler) (Tcl_Interp * interp, int type, Tcl_LimitHandlerProc * handlerProc, ClientData clientData); /* 521 */ - int (*tcl_LimitReady) (Tcl_Interp * interp); /* 522 */ - int (*tcl_LimitCheck) (Tcl_Interp * interp); /* 523 */ - int (*tcl_LimitExceeded) (Tcl_Interp * interp); /* 524 */ - void (*tcl_LimitSetCommands) (Tcl_Interp * interp, int commandLimit); /* 525 */ - void (*tcl_LimitSetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 526 */ - void (*tcl_LimitSetGranularity) (Tcl_Interp * interp, int type, int granularity); /* 527 */ - int (*tcl_LimitTypeEnabled) (Tcl_Interp * interp, int type); /* 528 */ - int (*tcl_LimitTypeExceeded) (Tcl_Interp * interp, int type); /* 529 */ - void (*tcl_LimitTypeSet) (Tcl_Interp * interp, int type); /* 530 */ - void (*tcl_LimitTypeReset) (Tcl_Interp * interp, int type); /* 531 */ - int (*tcl_LimitGetCommands) (Tcl_Interp * interp); /* 532 */ - void (*tcl_LimitGetTime) (Tcl_Interp * interp, Tcl_Time * timeLimitPtr); /* 533 */ - int (*tcl_LimitGetGranularity) (Tcl_Interp * interp, int type); /* 534 */ - Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp * interp, int status); /* 535 */ - int (*tcl_RestoreInterpState) (Tcl_Interp * interp, Tcl_InterpState state); /* 536 */ + Tcl_Obj * (*tcl_DbNewDictObj) (const char *file, int line); /* 504 */ + void (*tcl_RegisterConfig) (Tcl_Interp *interp, const char *pkgName, const Tcl_Config *configuration, const char *valEncoding); /* 505 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp *interp, const char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc); /* 506 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace *nsPtr); /* 507 */ + int (*tcl_AppendExportList) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *objPtr); /* 508 */ + int (*tcl_Export) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int resetListFirst); /* 509 */ + int (*tcl_Import) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int allowOverwrite); /* 510 */ + int (*tcl_ForgetImport) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern); /* 511 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp *interp); /* 512 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp *interp); /* 513 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 514 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 515 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 516 */ + void (*tcl_GetCommandFullName) (Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr); /* 517 */ + int (*tcl_FSEvalFileEx) (Tcl_Interp *interp, Tcl_Obj *fileName, const char *encodingName); /* 518 */ + Tcl_ExitProc * (*tcl_SetExitProc) (Tcl_ExitProc *proc); /* 519 */ + void (*tcl_LimitAddHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, ClientData clientData, Tcl_LimitHandlerDeleteProc *deleteProc); /* 520 */ + void (*tcl_LimitRemoveHandler) (Tcl_Interp *interp, int type, Tcl_LimitHandlerProc *handlerProc, ClientData clientData); /* 521 */ + int (*tcl_LimitReady) (Tcl_Interp *interp); /* 522 */ + int (*tcl_LimitCheck) (Tcl_Interp *interp); /* 523 */ + int (*tcl_LimitExceeded) (Tcl_Interp *interp); /* 524 */ + void (*tcl_LimitSetCommands) (Tcl_Interp *interp, int commandLimit); /* 525 */ + void (*tcl_LimitSetTime) (Tcl_Interp *interp, Tcl_Time *timeLimitPtr); /* 526 */ + void (*tcl_LimitSetGranularity) (Tcl_Interp *interp, int type, int granularity); /* 527 */ + int (*tcl_LimitTypeEnabled) (Tcl_Interp *interp, int type); /* 528 */ + int (*tcl_LimitTypeExceeded) (Tcl_Interp *interp, int type); /* 529 */ + void (*tcl_LimitTypeSet) (Tcl_Interp *interp, int type); /* 530 */ + void (*tcl_LimitTypeReset) (Tcl_Interp *interp, int type); /* 531 */ + int (*tcl_LimitGetCommands) (Tcl_Interp *interp); /* 532 */ + void (*tcl_LimitGetTime) (Tcl_Interp *interp, Tcl_Time *timeLimitPtr); /* 533 */ + int (*tcl_LimitGetGranularity) (Tcl_Interp *interp, int type); /* 534 */ + Tcl_InterpState (*tcl_SaveInterpState) (Tcl_Interp *interp, int status); /* 535 */ + int (*tcl_RestoreInterpState) (Tcl_Interp *interp, Tcl_InterpState state); /* 536 */ void (*tcl_DiscardInterpState) (Tcl_InterpState state); /* 537 */ - int (*tcl_SetReturnOptions) (Tcl_Interp * interp, Tcl_Obj * options); /* 538 */ - Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp * interp, int result); /* 539 */ + int (*tcl_SetReturnOptions) (Tcl_Interp *interp, Tcl_Obj *options); /* 538 */ + Tcl_Obj * (*tcl_GetReturnOptions) (Tcl_Interp *interp, int result); /* 539 */ int (*tcl_IsEnsemble) (Tcl_Command token); /* 540 */ - Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp * interp, const char * name, Tcl_Namespace * namespacePtr, int flags); /* 541 */ - Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp * interp, Tcl_Obj * cmdNameObj, int flags); /* 542 */ - int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * subcmdList); /* 543 */ - int (*tcl_SetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * mapDict); /* 544 */ - int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * unknownList); /* 545 */ - int (*tcl_SetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int flags); /* 546 */ - int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** subcmdListPtr); /* 547 */ - int (*tcl_GetEnsembleMappingDict) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** mapDictPtr); /* 548 */ - int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** unknownListPtr); /* 549 */ - int (*tcl_GetEnsembleFlags) (Tcl_Interp * interp, Tcl_Command token, int * flagsPtr); /* 550 */ - int (*tcl_GetEnsembleNamespace) (Tcl_Interp * interp, Tcl_Command token, Tcl_Namespace ** namespacePtrPtr); /* 551 */ - void (*tcl_SetTimeProc) (Tcl_GetTimeProc * getProc, Tcl_ScaleTimeProc * scaleProc, ClientData clientData); /* 552 */ - void (*tcl_QueryTimeProc) (Tcl_GetTimeProc ** getProc, Tcl_ScaleTimeProc ** scaleProc, ClientData * clientData); /* 553 */ - Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType * chanTypePtr); /* 554 */ - Tcl_Obj * (*tcl_NewBignumObj) (mp_int * value); /* 555 */ - Tcl_Obj * (*tcl_DbNewBignumObj) (mp_int * value, const char * file, int line); /* 556 */ - void (*tcl_SetBignumObj) (Tcl_Obj * obj, mp_int * value); /* 557 */ - int (*tcl_GetBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 558 */ - int (*tcl_TakeBignumFromObj) (Tcl_Interp * interp, Tcl_Obj * obj, mp_int * value); /* 559 */ + Tcl_Command (*tcl_CreateEnsemble) (Tcl_Interp *interp, const char *name, Tcl_Namespace *namespacePtr, int flags); /* 541 */ + Tcl_Command (*tcl_FindEnsemble) (Tcl_Interp *interp, Tcl_Obj *cmdNameObj, int flags); /* 542 */ + int (*tcl_SetEnsembleSubcommandList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *subcmdList); /* 543 */ + int (*tcl_SetEnsembleMappingDict) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *mapDict); /* 544 */ + int (*tcl_SetEnsembleUnknownHandler) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *unknownList); /* 545 */ + int (*tcl_SetEnsembleFlags) (Tcl_Interp *interp, Tcl_Command token, int flags); /* 546 */ + int (*tcl_GetEnsembleSubcommandList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **subcmdListPtr); /* 547 */ + int (*tcl_GetEnsembleMappingDict) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **mapDictPtr); /* 548 */ + int (*tcl_GetEnsembleUnknownHandler) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **unknownListPtr); /* 549 */ + int (*tcl_GetEnsembleFlags) (Tcl_Interp *interp, Tcl_Command token, int *flagsPtr); /* 550 */ + int (*tcl_GetEnsembleNamespace) (Tcl_Interp *interp, Tcl_Command token, Tcl_Namespace **namespacePtrPtr); /* 551 */ + void (*tcl_SetTimeProc) (Tcl_GetTimeProc *getProc, Tcl_ScaleTimeProc *scaleProc, ClientData clientData); /* 552 */ + void (*tcl_QueryTimeProc) (Tcl_GetTimeProc **getProc, Tcl_ScaleTimeProc **scaleProc, ClientData *clientData); /* 553 */ + Tcl_DriverThreadActionProc * (*tcl_ChannelThreadActionProc) (const Tcl_ChannelType *chanTypePtr); /* 554 */ + Tcl_Obj * (*tcl_NewBignumObj) (mp_int *value); /* 555 */ + Tcl_Obj * (*tcl_DbNewBignumObj) (mp_int *value, const char *file, int line); /* 556 */ + void (*tcl_SetBignumObj) (Tcl_Obj *obj, mp_int *value); /* 557 */ + int (*tcl_GetBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, mp_int *value); /* 558 */ + int (*tcl_TakeBignumFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, mp_int *value); /* 559 */ int (*tcl_TruncateChannel) (Tcl_Channel chan, Tcl_WideInt length); /* 560 */ - Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType * chanTypePtr); /* 561 */ - void (*tcl_SetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj * msg); /* 562 */ - void (*tcl_GetChannelErrorInterp) (Tcl_Interp * interp, Tcl_Obj ** msg); /* 563 */ - void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj * msg); /* 564 */ - void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj ** msg); /* 565 */ - int (*tcl_InitBignumFromDouble) (Tcl_Interp * interp, double initval, mp_int * toInit); /* 566 */ - Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr); /* 567 */ - int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr); /* 568 */ - int (*tcl_GetEncodingFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Encoding * encodingPtr); /* 569 */ + Tcl_DriverTruncateProc * (*tcl_ChannelTruncateProc) (const Tcl_ChannelType *chanTypePtr); /* 561 */ + void (*tcl_SetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj *msg); /* 562 */ + void (*tcl_GetChannelErrorInterp) (Tcl_Interp *interp, Tcl_Obj **msg); /* 563 */ + void (*tcl_SetChannelError) (Tcl_Channel chan, Tcl_Obj *msg); /* 564 */ + void (*tcl_GetChannelError) (Tcl_Channel chan, Tcl_Obj **msg); /* 565 */ + int (*tcl_InitBignumFromDouble) (Tcl_Interp *interp, double initval, mp_int *toInit); /* 566 */ + Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) (Tcl_Interp *interp, Tcl_Namespace *nsPtr); /* 567 */ + int (*tcl_SetNamespaceUnknownHandler) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *handlerPtr); /* 568 */ + int (*tcl_GetEncodingFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr); /* 569 */ Tcl_Obj * (*tcl_GetEncodingSearchPath) (void); /* 570 */ - int (*tcl_SetEncodingSearchPath) (Tcl_Obj * searchPath); /* 571 */ - const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString * bufPtr); /* 572 */ - int (*tcl_PkgRequireProc) (Tcl_Interp * interp, const char * name, int objc, Tcl_Obj *const objv[], ClientData * clientDataPtr); /* 573 */ - void (*tcl_AppendObjToErrorInfo) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 574 */ - void (*tcl_AppendLimitedToObj) (Tcl_Obj * objPtr, const char * bytes, int length, int limit, const char * ellipsis); /* 575 */ - Tcl_Obj * (*tcl_Format) (Tcl_Interp * interp, const char * format, int objc, Tcl_Obj *const objv[]); /* 576 */ - int (*tcl_AppendFormatToObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, const char * format, int objc, Tcl_Obj *const objv[]); /* 577 */ - Tcl_Obj * (*tcl_ObjPrintf) (const char * format, ...); /* 578 */ - void (*tcl_AppendPrintfToObj) (Tcl_Obj * objPtr, const char * format, ...); /* 579 */ - int (*tcl_CancelEval) (Tcl_Interp * interp, Tcl_Obj * resultObjPtr, ClientData clientData, int flags); /* 580 */ - int (*tcl_Canceled) (Tcl_Interp * interp, int flags); /* 581 */ - int (*tcl_CreatePipe) (Tcl_Interp * interp, Tcl_Channel * rchan, Tcl_Channel * wchan, int flags); /* 582 */ - Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp * interp, const char * cmdName, Tcl_ObjCmdProc * proc, Tcl_ObjCmdProc * nreProc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc); /* 583 */ - int (*tcl_NREvalObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 584 */ - int (*tcl_NREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 585 */ - int (*tcl_NRCmdSwap) (Tcl_Interp * interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); /* 586 */ - void (*tcl_NRAddCallback) (Tcl_Interp * interp, Tcl_NRPostProc * postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ - int (*tcl_NRCallObjProc) (Tcl_Interp * interp, Tcl_ObjCmdProc * objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 588 */ - unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf * statPtr); /* 589 */ - unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf * statPtr); /* 590 */ - unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf * statPtr); /* 591 */ - int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf * statPtr); /* 592 */ - int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf * statPtr); /* 593 */ - int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf * statPtr); /* 594 */ - int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf * statPtr); /* 595 */ - Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf * statPtr); /* 596 */ - Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf * statPtr); /* 597 */ - Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf * statPtr); /* 598 */ - Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf * statPtr); /* 599 */ - Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf * statPtr); /* 600 */ - unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf * statPtr); /* 601 */ - int (*tcl_SetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj * paramList); /* 602 */ - int (*tcl_GetEnsembleParameterList) (Tcl_Interp * interp, Tcl_Command token, Tcl_Obj ** paramListPtr); /* 603 */ - int (*tcl_ParseArgsObjv) (Tcl_Interp * interp, const Tcl_ArgvInfo * argTable, int * objcPtr, Tcl_Obj *const * objv, Tcl_Obj *** remObjv); /* 604 */ - int (*tcl_GetErrorLine) (Tcl_Interp * interp); /* 605 */ - void (*tcl_SetErrorLine) (Tcl_Interp * interp, int lineNum); /* 606 */ - void (*tcl_TransferResult) (Tcl_Interp * sourceInterp, int result, Tcl_Interp * targetInterp); /* 607 */ - int (*tcl_InterpActive) (Tcl_Interp * interp); /* 608 */ - void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 609 */ - int (*tcl_ZlibDeflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int level, Tcl_Obj * gzipHeaderDictObj); /* 610 */ - int (*tcl_ZlibInflate) (Tcl_Interp * interp, int format, Tcl_Obj * data, int buffersize, Tcl_Obj * gzipHeaderDictObj); /* 611 */ - unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const unsigned char * buf, int len); /* 612 */ - unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const unsigned char * buf, int len); /* 613 */ - int (*tcl_ZlibStreamInit) (Tcl_Interp * interp, int mode, int format, int level, Tcl_Obj * dictObj, Tcl_ZlibStream * zshandle); /* 614 */ + int (*tcl_SetEncodingSearchPath) (Tcl_Obj *searchPath); /* 571 */ + const char * (*tcl_GetEncodingNameFromEnvironment) (Tcl_DString *bufPtr); /* 572 */ + int (*tcl_PkgRequireProc) (Tcl_Interp *interp, const char *name, int objc, Tcl_Obj *const objv[], ClientData *clientDataPtr); /* 573 */ + void (*tcl_AppendObjToErrorInfo) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 574 */ + void (*tcl_AppendLimitedToObj) (Tcl_Obj *objPtr, const char *bytes, int length, int limit, const char *ellipsis); /* 575 */ + Tcl_Obj * (*tcl_Format) (Tcl_Interp *interp, const char *format, int objc, Tcl_Obj *const objv[]); /* 576 */ + int (*tcl_AppendFormatToObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, const char *format, int objc, Tcl_Obj *const objv[]); /* 577 */ + Tcl_Obj * (*tcl_ObjPrintf) (const char *format, ...); /* 578 */ + void (*tcl_AppendPrintfToObj) (Tcl_Obj *objPtr, const char *format, ...); /* 579 */ + int (*tcl_CancelEval) (Tcl_Interp *interp, Tcl_Obj *resultObjPtr, ClientData clientData, int flags); /* 580 */ + int (*tcl_Canceled) (Tcl_Interp *interp, int flags); /* 581 */ + int (*tcl_CreatePipe) (Tcl_Interp *interp, Tcl_Channel *rchan, Tcl_Channel *wchan, int flags); /* 582 */ + Tcl_Command (*tcl_NRCreateCommand) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, Tcl_ObjCmdProc *nreProc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); /* 583 */ + int (*tcl_NREvalObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 584 */ + int (*tcl_NREvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 585 */ + int (*tcl_NRCmdSwap) (Tcl_Interp *interp, Tcl_Command cmd, int objc, Tcl_Obj *const objv[], int flags); /* 586 */ + void (*tcl_NRAddCallback) (Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); /* 587 */ + int (*tcl_NRCallObjProc) (Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); /* 588 */ + unsigned (*tcl_GetFSDeviceFromStat) (const Tcl_StatBuf *statPtr); /* 589 */ + unsigned (*tcl_GetFSInodeFromStat) (const Tcl_StatBuf *statPtr); /* 590 */ + unsigned (*tcl_GetModeFromStat) (const Tcl_StatBuf *statPtr); /* 591 */ + int (*tcl_GetLinkCountFromStat) (const Tcl_StatBuf *statPtr); /* 592 */ + int (*tcl_GetUserIdFromStat) (const Tcl_StatBuf *statPtr); /* 593 */ + int (*tcl_GetGroupIdFromStat) (const Tcl_StatBuf *statPtr); /* 594 */ + int (*tcl_GetDeviceTypeFromStat) (const Tcl_StatBuf *statPtr); /* 595 */ + Tcl_WideInt (*tcl_GetAccessTimeFromStat) (const Tcl_StatBuf *statPtr); /* 596 */ + Tcl_WideInt (*tcl_GetModificationTimeFromStat) (const Tcl_StatBuf *statPtr); /* 597 */ + Tcl_WideInt (*tcl_GetChangeTimeFromStat) (const Tcl_StatBuf *statPtr); /* 598 */ + Tcl_WideUInt (*tcl_GetSizeFromStat) (const Tcl_StatBuf *statPtr); /* 599 */ + Tcl_WideUInt (*tcl_GetBlocksFromStat) (const Tcl_StatBuf *statPtr); /* 600 */ + unsigned (*tcl_GetBlockSizeFromStat) (const Tcl_StatBuf *statPtr); /* 601 */ + int (*tcl_SetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj *paramList); /* 602 */ + int (*tcl_GetEnsembleParameterList) (Tcl_Interp *interp, Tcl_Command token, Tcl_Obj **paramListPtr); /* 603 */ + int (*tcl_ParseArgsObjv) (Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv); /* 604 */ + int (*tcl_GetErrorLine) (Tcl_Interp *interp); /* 605 */ + void (*tcl_SetErrorLine) (Tcl_Interp *interp, int lineNum); /* 606 */ + void (*tcl_TransferResult) (Tcl_Interp *sourceInterp, int result, Tcl_Interp *targetInterp); /* 607 */ + int (*tcl_InterpActive) (Tcl_Interp *interp); /* 608 */ + void (*tcl_BackgroundException) (Tcl_Interp *interp, int code); /* 609 */ + int (*tcl_ZlibDeflate) (Tcl_Interp *interp, int format, Tcl_Obj *data, int level, Tcl_Obj *gzipHeaderDictObj); /* 610 */ + int (*tcl_ZlibInflate) (Tcl_Interp *interp, int format, Tcl_Obj *data, int buffersize, Tcl_Obj *gzipHeaderDictObj); /* 611 */ + unsigned int (*tcl_ZlibCRC32) (unsigned int crc, const unsigned char *buf, int len); /* 612 */ + unsigned int (*tcl_ZlibAdler32) (unsigned int adler, const unsigned char *buf, int len); /* 613 */ + int (*tcl_ZlibStreamInit) (Tcl_Interp *interp, int mode, int format, int level, Tcl_Obj *dictObj, Tcl_ZlibStream *zshandle); /* 614 */ Tcl_Obj * (*tcl_ZlibStreamGetCommandName) (Tcl_ZlibStream zshandle); /* 615 */ int (*tcl_ZlibStreamEof) (Tcl_ZlibStream zshandle); /* 616 */ int (*tcl_ZlibStreamChecksum) (Tcl_ZlibStream zshandle); /* 617 */ - int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int flush); /* 618 */ - int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj * data, int count); /* 619 */ + int (*tcl_ZlibStreamPut) (Tcl_ZlibStream zshandle, Tcl_Obj *data, int flush); /* 618 */ + int (*tcl_ZlibStreamGet) (Tcl_ZlibStream zshandle, Tcl_Obj *data, int count); /* 619 */ int (*tcl_ZlibStreamClose) (Tcl_ZlibStream zshandle); /* 620 */ int (*tcl_ZlibStreamReset) (Tcl_ZlibStream zshandle); /* 621 */ - void (*tcl_SetStartupScript) (Tcl_Obj * path, const char * encoding); /* 622 */ - Tcl_Obj * (*tcl_GetStartupScript) (const char ** encodingPtr); /* 623 */ - int (*tcl_CloseEx) (Tcl_Interp * interp, Tcl_Channel chan, int flags); /* 624 */ - int (*tcl_NRExprObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj * resultPtr); /* 625 */ - int (*tcl_NRSubstObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags); /* 626 */ + void (*tcl_SetStartupScript) (Tcl_Obj *path, const char *encoding); /* 622 */ + Tcl_Obj * (*tcl_GetStartupScript) (const char **encodingPtr); /* 623 */ + int (*tcl_CloseEx) (Tcl_Interp *interp, Tcl_Channel chan, int flags); /* 624 */ + int (*tcl_NRExprObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *resultPtr); /* 625 */ + int (*tcl_NRSubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 626 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 0a62638..0f2e275 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.143 2010/01/29 16:17:20 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.144 2010/02/05 10:03:23 nijtmans Exp $ library tcl @@ -731,7 +731,7 @@ declare 177 generic { } # TIP 338 made these public - now declared in tcl.h #declare 178 generic { -# void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char* encodingName) +# void Tcl_SetStartupScript(Tcl_Obj *pathPtr, const char *encodingName) #} #declare 179 generic { # Tcl_Obj *Tcl_GetStartupScript(const char **encodingNamePtr) @@ -807,7 +807,7 @@ declare 183 generic { # #declare 197 generic { # int TclCompEvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, -# const CmdFrame* invoker, int word) +# const CmdFrame *invoker, int word) #} declare 198 generic { int TclObjGetFrame(Tcl_Interp *interp, Tcl_Obj *objPtr, @@ -851,25 +851,25 @@ declare 208 generic { } # Made public by TIP 258 #declare 209 generic { -# Tcl_Obj * TclGetEncodingSearchPath(void) +# Tcl_Obj *TclGetEncodingSearchPath(void) #} #declare 210 generic { # int TclSetEncodingSearchPath(Tcl_Obj *searchPath) #} #declare 211 generic { -# const char * TclpGetEncodingNameFromEnvironment(Tcl_DString *bufPtr) +# const char *TclpGetEncodingNameFromEnvironment(Tcl_DString *bufPtr) #} declare 212 generic { void TclpFindExecutable(const char *argv0) } declare 213 generic { - Tcl_Obj * TclGetObjNameOfExecutable(void) + Tcl_Obj *TclGetObjNameOfExecutable(void) } declare 214 generic { void TclSetObjNameOfExecutable(Tcl_Obj *name, Tcl_Encoding encoding) } declare 215 generic { - void * TclStackAlloc(Tcl_Interp *interp, int numBytes) + void *TclStackAlloc(Tcl_Interp *interp, int numBytes) } declare 216 generic { void TclStackFree(Tcl_Interp *interp, void *freePtr) @@ -903,7 +903,7 @@ declare 227 generic { # core and NRE-enabled # declare 228 generic { # int TclObjInterpProcCore(register Tcl_Interp *interp, Tcl_Obj *procNameObj, -# int skip, ProcErrorProc errorProc) +# int skip, ProcErrorProc *errorProc) # } declare 229 generic { int TclPtrMakeUpvar(Tcl_Interp *interp, Var *otherP1Ptr, @@ -956,11 +956,11 @@ declare 238 generic { } declare 239 generic { int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj, - int skip, ProcErrorProc errorProc) + int skip, ProcErrorProc *errorProc) } declare 240 generic { - int TclNRRunCallbacks(Tcl_Interp * interp, int result, - struct TEOV_callback * rootPtr, int tebcCall) + int TclNRRunCallbacks(Tcl_Interp *interp, int result, + struct TEOV_callback *rootPtr, int tebcCall) } declare 241 generic { int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, diff --git a/generic/tclInt.h b/generic/tclInt.h index 64f6544..d08ed12 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.457 2010/02/02 16:12:00 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.458 2010/02/05 10:03:23 nijtmans Exp $ */ #ifndef _TCLINT @@ -1264,7 +1264,7 @@ typedef struct ContLineLoc { * by [info frame]. Contains a sub-structure for each extra field. */ -typedef Tcl_Obj *(GetFrameInfoValueProc)(ClientData clientData); +typedef Tcl_Obj * (GetFrameInfoValueProc)(ClientData clientData); typedef struct { const char *name; /* Name of this field. */ GetFrameInfoValueProc *proc; /* Function to generate a Tcl_Obj* from the diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 0ec861b..f7ef521 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.136 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.137 2010/02/05 10:03:23 nijtmans Exp $ */ #ifndef _TCLINTDECLS @@ -994,7 +994,7 @@ EXTERN int TclNRInterpProc(ClientData clientData, /* 239 */ EXTERN int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj, int skip, - ProcErrorProc errorProc); + ProcErrorProc *errorProc); #endif #ifndef TclNRRunCallbacks_TCL_DECLARED #define TclNRRunCallbacks_TCL_DECLARED @@ -1053,66 +1053,66 @@ typedef struct TclIntStubs { void *reserved2; void (*tclAllocateFreeObjects) (void); /* 3 */ void *reserved4; - int (*tclCleanupChildren) (Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan); /* 5 */ - void (*tclCleanupCommand) (Command * cmdPtr); /* 6 */ - int (*tclCopyAndCollapse) (int count, const char * src, char * dst); /* 7 */ - int (*tclCopyChannel) (Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr); /* 8 */ - int (*tclCreatePipeline) (Tcl_Interp * interp, int argc, const char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr); /* 9 */ - int (*tclCreateProc) (Tcl_Interp * interp, Namespace * nsPtr, const char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr); /* 10 */ - void (*tclDeleteCompiledLocalVars) (Interp * iPtr, CallFrame * framePtr); /* 11 */ - void (*tclDeleteVars) (Interp * iPtr, TclVarHashTable * tablePtr); /* 12 */ + int (*tclCleanupChildren) (Tcl_Interp *interp, int numPids, Tcl_Pid *pidPtr, Tcl_Channel errorChan); /* 5 */ + void (*tclCleanupCommand) (Command *cmdPtr); /* 6 */ + int (*tclCopyAndCollapse) (int count, const char *src, char *dst); /* 7 */ + int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr); /* 8 */ + int (*tclCreatePipeline) (Tcl_Interp *interp, int argc, const char **argv, Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr, TclFile *errFilePtr); /* 9 */ + int (*tclCreateProc) (Tcl_Interp *interp, Namespace *nsPtr, const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Proc **procPtrPtr); /* 10 */ + void (*tclDeleteCompiledLocalVars) (Interp *iPtr, CallFrame *framePtr); /* 11 */ + void (*tclDeleteVars) (Interp *iPtr, TclVarHashTable *tablePtr); /* 12 */ void *reserved13; - void (*tclDumpMemoryInfo) (FILE * outFile); /* 14 */ + void (*tclDumpMemoryInfo) (FILE *outFile); /* 14 */ void *reserved15; - void (*tclExprFloatError) (Tcl_Interp * interp, double value); /* 16 */ + void (*tclExprFloatError) (Tcl_Interp *interp, double value); /* 16 */ void *reserved17; void *reserved18; void *reserved19; void *reserved20; void *reserved21; - int (*tclFindElement) (Tcl_Interp * interp, const char * listStr, int listLength, const char ** elementPtr, const char ** nextPtr, int * sizePtr, int * bracePtr); /* 22 */ - Proc * (*tclFindProc) (Interp * iPtr, const char * procName); /* 23 */ + int (*tclFindElement) (Tcl_Interp *interp, const char *listStr, int listLength, const char **elementPtr, const char **nextPtr, int *sizePtr, int *bracePtr); /* 22 */ + Proc * (*tclFindProc) (Interp *iPtr, const char *procName); /* 23 */ void *reserved24; - void (*tclFreePackageInfo) (Interp * iPtr); /* 25 */ + void (*tclFreePackageInfo) (Interp *iPtr); /* 25 */ void *reserved26; void *reserved27; Tcl_Channel (*tclpGetDefaultStdChannel) (int type); /* 28 */ void *reserved29; void *reserved30; - const char * (*tclGetExtension) (const char * name); /* 31 */ - int (*tclGetFrame) (Tcl_Interp * interp, const char * str, CallFrame ** framePtrPtr); /* 32 */ + const char * (*tclGetExtension) (const char *name); /* 31 */ + int (*tclGetFrame) (Tcl_Interp *interp, const char *str, CallFrame **framePtrPtr); /* 32 */ void *reserved33; - int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */ + int (*tclGetIntForIndex) (Tcl_Interp *interp, Tcl_Obj *objPtr, int endValue, int *indexPtr); /* 34 */ void *reserved35; void *reserved36; - int (*tclGetLoadedPackages) (Tcl_Interp * interp, const char * targetName); /* 37 */ - int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, const char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, const char ** simpleNamePtr); /* 38 */ + int (*tclGetLoadedPackages) (Tcl_Interp *interp, const char *targetName); /* 37 */ + int (*tclGetNamespaceForQualName) (Tcl_Interp *interp, const char *qualName, Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr, Namespace **altNsPtrPtr, Namespace **actualCxtPtrPtr, const char **simpleNamePtr); /* 38 */ TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */ - int (*tclGetOpenMode) (Tcl_Interp * interp, const char * str, int * seekFlagPtr); /* 40 */ + int (*tclGetOpenMode) (Tcl_Interp *interp, const char *str, int *seekFlagPtr); /* 40 */ Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */ - CONST86 char * (*tclpGetUserHome) (const char * name, Tcl_DString * bufferPtr); /* 42 */ + CONST86 char * (*tclpGetUserHome) (const char *name, Tcl_DString *bufferPtr); /* 42 */ void *reserved43; - int (*tclGuessPackageName) (const char * fileName, Tcl_DString * bufPtr); /* 44 */ - int (*tclHideUnsafeCommands) (Tcl_Interp * interp); /* 45 */ + int (*tclGuessPackageName) (const char *fileName, Tcl_DString *bufPtr); /* 44 */ + int (*tclHideUnsafeCommands) (Tcl_Interp *interp); /* 45 */ int (*tclInExit) (void); /* 46 */ void *reserved47; void *reserved48; void *reserved49; - void (*tclInitCompiledLocals) (Tcl_Interp * interp, CallFrame * framePtr, Namespace * nsPtr); /* 50 */ - int (*tclInterpInit) (Tcl_Interp * interp); /* 51 */ + void (*tclInitCompiledLocals) (Tcl_Interp *interp, CallFrame *framePtr, Namespace *nsPtr); /* 50 */ + int (*tclInterpInit) (Tcl_Interp *interp); /* 51 */ void *reserved52; - int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp * interp, int argc, CONST84 char ** argv); /* 53 */ - int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 54 */ - Proc * (*tclIsProc) (Command * cmdPtr); /* 55 */ + int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char **argv); /* 53 */ + int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 54 */ + Proc * (*tclIsProc) (Command *cmdPtr); /* 55 */ void *reserved56; void *reserved57; - Var * (*tclLookupVar) (Tcl_Interp * interp, const char * part1, const char * part2, int flags, const char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr); /* 58 */ + Var * (*tclLookupVar) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, const char *msg, int createPart1, int createPart2, Var **arrayPtrPtr); /* 58 */ void *reserved59; - int (*tclNeedSpace) (const char * start, const char * end); /* 60 */ - Tcl_Obj * (*tclNewProcBodyObj) (Proc * procPtr); /* 61 */ - int (*tclObjCommandComplete) (Tcl_Obj * cmdPtr); /* 62 */ - int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 63 */ - int (*tclObjInvoke) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags); /* 64 */ + int (*tclNeedSpace) (const char *start, const char *end); /* 60 */ + Tcl_Obj * (*tclNewProcBodyObj) (Proc *procPtr); /* 61 */ + int (*tclObjCommandComplete) (Tcl_Obj *cmdPtr); /* 62 */ + int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 63 */ + int (*tclObjInvoke) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 64 */ void *reserved65; void *reserved66; void *reserved67; @@ -1122,116 +1122,116 @@ typedef struct TclIntStubs { void *reserved71; void *reserved72; void *reserved73; - void (*tclpFree) (char * ptr); /* 74 */ + void (*tclpFree) (char *ptr); /* 74 */ unsigned long (*tclpGetClicks) (void); /* 75 */ unsigned long (*tclpGetSeconds) (void); /* 76 */ - void (*tclpGetTime) (Tcl_Time * time); /* 77 */ + void (*tclpGetTime) (Tcl_Time *time); /* 77 */ int (*tclpGetTimeZone) (unsigned long time); /* 78 */ void *reserved79; void *reserved80; - char * (*tclpRealloc) (char * ptr, unsigned int size); /* 81 */ + char * (*tclpRealloc) (char *ptr, unsigned int size); /* 81 */ void *reserved82; void *reserved83; void *reserved84; void *reserved85; void *reserved86; void *reserved87; - char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp * interp, const char * name1, const char * name2, int flags); /* 88 */ - int (*tclPreventAliasLoop) (Tcl_Interp * interp, Tcl_Interp * cmdInterp, Tcl_Command cmd); /* 89 */ + char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); /* 88 */ + int (*tclPreventAliasLoop) (Tcl_Interp *interp, Tcl_Interp *cmdInterp, Tcl_Command cmd); /* 89 */ void *reserved90; - void (*tclProcCleanupProc) (Proc * procPtr); /* 91 */ - int (*tclProcCompileProc) (Tcl_Interp * interp, Proc * procPtr, Tcl_Obj * bodyPtr, Namespace * nsPtr, const char * description, const char * procName); /* 92 */ + void (*tclProcCleanupProc) (Proc *procPtr); /* 91 */ + int (*tclProcCompileProc) (Tcl_Interp *interp, Proc *procPtr, Tcl_Obj *bodyPtr, Namespace *nsPtr, const char *description, const char *procName); /* 92 */ void (*tclProcDeleteProc) (ClientData clientData); /* 93 */ void *reserved94; void *reserved95; - int (*tclRenameCommand) (Tcl_Interp * interp, const char * oldName, const char * newName); /* 96 */ - void (*tclResetShadowedCmdRefs) (Tcl_Interp * interp, Command * newCmdPtr); /* 97 */ + int (*tclRenameCommand) (Tcl_Interp *interp, const char *oldName, const char *newName); /* 96 */ + void (*tclResetShadowedCmdRefs) (Tcl_Interp *interp, Command *newCmdPtr); /* 97 */ int (*tclServiceIdle) (void); /* 98 */ void *reserved99; void *reserved100; - CONST86 char * (*tclSetPreInitScript) (const char * string); /* 101 */ - void (*tclSetupEnv) (Tcl_Interp * interp); /* 102 */ - int (*tclSockGetPort) (Tcl_Interp * interp, const char * str, const char * proto, int * portPtr); /* 103 */ + CONST86 char * (*tclSetPreInitScript) (const char *string); /* 101 */ + void (*tclSetupEnv) (Tcl_Interp *interp); /* 102 */ + int (*tclSockGetPort) (Tcl_Interp *interp, const char *str, const char *proto, int *portPtr); /* 103 */ int (*tclSockMinimumBuffers) (int sock, int size); /* 104 */ void *reserved105; void *reserved106; void *reserved107; - void (*tclTeardownNamespace) (Namespace * nsPtr); /* 108 */ - int (*tclUpdateReturnInfo) (Interp * iPtr); /* 109 */ + void (*tclTeardownNamespace) (Namespace *nsPtr); /* 108 */ + int (*tclUpdateReturnInfo) (Interp *iPtr); /* 109 */ void *reserved110; - void (*tcl_AddInterpResolvers) (Tcl_Interp * interp, const char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 111 */ - int (*tcl_AppendExportList) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr); /* 112 */ - Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp * interp, const char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc); /* 113 */ - void (*tcl_DeleteNamespace) (Tcl_Namespace * nsPtr); /* 114 */ - int (*tcl_Export) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int resetListFirst); /* 115 */ - Tcl_Command (*tcl_FindCommand) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 116 */ - Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 117 */ - int (*tcl_GetInterpResolvers) (Tcl_Interp * interp, const char * name, Tcl_ResolverInfo * resInfo); /* 118 */ - int (*tcl_GetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo); /* 119 */ - Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp * interp, const char * name, Tcl_Namespace * contextNsPtr, int flags); /* 120 */ - int (*tcl_ForgetImport) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern); /* 121 */ - Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 122 */ - void (*tcl_GetCommandFullName) (Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr); /* 123 */ - Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp * interp); /* 124 */ - Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp * interp); /* 125 */ - void (*tcl_GetVariableFullName) (Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr); /* 126 */ - int (*tcl_Import) (Tcl_Interp * interp, Tcl_Namespace * nsPtr, const char * pattern, int allowOverwrite); /* 127 */ - void (*tcl_PopCallFrame) (Tcl_Interp * interp); /* 128 */ - int (*tcl_PushCallFrame) (Tcl_Interp * interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame); /* 129 */ - int (*tcl_RemoveInterpResolvers) (Tcl_Interp * interp, const char * name); /* 130 */ - void (*tcl_SetNamespaceResolvers) (Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc); /* 131 */ - int (*tclpHasSockets) (Tcl_Interp * interp); /* 132 */ - struct tm * (*tclpGetDate) (const time_t * time, int useGMT); /* 133 */ + void (*tcl_AddInterpResolvers) (Tcl_Interp *interp, const char *name, Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, Tcl_ResolveCompiledVarProc *compiledVarProc); /* 111 */ + int (*tcl_AppendExportList) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *objPtr); /* 112 */ + Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp *interp, const char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc); /* 113 */ + void (*tcl_DeleteNamespace) (Tcl_Namespace *nsPtr); /* 114 */ + int (*tcl_Export) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int resetListFirst); /* 115 */ + Tcl_Command (*tcl_FindCommand) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 116 */ + Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 117 */ + int (*tcl_GetInterpResolvers) (Tcl_Interp *interp, const char *name, Tcl_ResolverInfo *resInfo); /* 118 */ + int (*tcl_GetNamespaceResolvers) (Tcl_Namespace *namespacePtr, Tcl_ResolverInfo *resInfo); /* 119 */ + Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 120 */ + int (*tcl_ForgetImport) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern); /* 121 */ + Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 122 */ + void (*tcl_GetCommandFullName) (Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr); /* 123 */ + Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp *interp); /* 124 */ + Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp *interp); /* 125 */ + void (*tcl_GetVariableFullName) (Tcl_Interp *interp, Tcl_Var variable, Tcl_Obj *objPtr); /* 126 */ + int (*tcl_Import) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int allowOverwrite); /* 127 */ + void (*tcl_PopCallFrame) (Tcl_Interp *interp); /* 128 */ + int (*tcl_PushCallFrame) (Tcl_Interp *interp, Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame); /* 129 */ + int (*tcl_RemoveInterpResolvers) (Tcl_Interp *interp, const char *name); /* 130 */ + void (*tcl_SetNamespaceResolvers) (Tcl_Namespace *namespacePtr, Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, Tcl_ResolveCompiledVarProc *compiledVarProc); /* 131 */ + int (*tclpHasSockets) (Tcl_Interp *interp); /* 132 */ + struct tm * (*tclpGetDate) (const time_t *time, int useGMT); /* 133 */ void *reserved134; void *reserved135; void *reserved136; void *reserved137; - CONST84_RETURN char * (*tclGetEnv) (const char * name, Tcl_DString * valuePtr); /* 138 */ + CONST84_RETURN char * (*tclGetEnv) (const char *name, Tcl_DString *valuePtr); /* 138 */ void *reserved139; void *reserved140; - CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp * interp, Tcl_DString * cwdPtr); /* 141 */ - int (*tclSetByteCodeFromAny) (Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData); /* 142 */ - int (*tclAddLiteralObj) (struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr); /* 143 */ - void (*tclHideLiteral) (Tcl_Interp * interp, struct CompileEnv * envPtr, int index); /* 144 */ - const struct AuxDataType * (*tclGetAuxDataType) (const char * typeName); /* 145 */ - TclHandle (*tclHandleCreate) (void * ptr); /* 146 */ + CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp *interp, Tcl_DString *cwdPtr); /* 141 */ + int (*tclSetByteCodeFromAny) (Tcl_Interp *interp, Tcl_Obj *objPtr, CompileHookProc *hookProc, ClientData clientData); /* 142 */ + int (*tclAddLiteralObj) (struct CompileEnv *envPtr, Tcl_Obj *objPtr, LiteralEntry **litPtrPtr); /* 143 */ + void (*tclHideLiteral) (Tcl_Interp *interp, struct CompileEnv *envPtr, int index); /* 144 */ + const struct AuxDataType * (*tclGetAuxDataType) (const char *typeName); /* 145 */ + TclHandle (*tclHandleCreate) (void *ptr); /* 146 */ void (*tclHandleFree) (TclHandle handle); /* 147 */ TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */ void (*tclHandleRelease) (TclHandle handle); /* 149 */ - int (*tclRegAbout) (Tcl_Interp * interp, Tcl_RegExp re); /* 150 */ - void (*tclRegExpRangeUniChar) (Tcl_RegExp re, int index, int * startPtr, int * endPtr); /* 151 */ - void (*tclSetLibraryPath) (Tcl_Obj * pathPtr); /* 152 */ + int (*tclRegAbout) (Tcl_Interp *interp, Tcl_RegExp re); /* 150 */ + void (*tclRegExpRangeUniChar) (Tcl_RegExp re, int index, int *startPtr, int *endPtr); /* 151 */ + void (*tclSetLibraryPath) (Tcl_Obj *pathPtr); /* 152 */ Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */ void *reserved154; void *reserved155; - void (*tclRegError) (Tcl_Interp * interp, const char * msg, int status); /* 156 */ - Var * (*tclVarTraceExists) (Tcl_Interp * interp, const char * varName); /* 157 */ + void (*tclRegError) (Tcl_Interp *interp, const char *msg, int status); /* 156 */ + Var * (*tclVarTraceExists) (Tcl_Interp *interp, const char *varName); /* 157 */ void *reserved158; void *reserved159; void *reserved160; - int (*tclChannelTransform) (Tcl_Interp * interp, Tcl_Channel chan, Tcl_Obj * cmdObjPtr); /* 161 */ + int (*tclChannelTransform) (Tcl_Interp *interp, Tcl_Channel chan, Tcl_Obj *cmdObjPtr); /* 161 */ void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */ const void * (*tclGetInstructionTable) (void); /* 163 */ - void (*tclExpandCodeArray) (void * envPtr); /* 164 */ + void (*tclExpandCodeArray) (void *envPtr); /* 164 */ void (*tclpSetInitialEncodings) (void); /* 165 */ - int (*tclListObjSetElement) (Tcl_Interp * interp, Tcl_Obj * listPtr, int index, Tcl_Obj * valuePtr); /* 166 */ + int (*tclListObjSetElement) (Tcl_Interp *interp, Tcl_Obj *listPtr, int index, Tcl_Obj *valuePtr); /* 166 */ void *reserved167; void *reserved168; - int (*tclpUtfNcmp2) (const char * s1, const char * s2, unsigned long n); /* 169 */ - int (*tclCheckInterpTraces) (Tcl_Interp * interp, const char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 170 */ - int (*tclCheckExecutionTraces) (Tcl_Interp * interp, const char * command, int numChars, Command * cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 171 */ + int (*tclpUtfNcmp2) (const char *s1, const char *s2, unsigned long n); /* 169 */ + int (*tclCheckInterpTraces) (Tcl_Interp *interp, const char *command, int numChars, Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 170 */ + int (*tclCheckExecutionTraces) (Tcl_Interp *interp, const char *command, int numChars, Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 171 */ int (*tclInThreadExit) (void); /* 172 */ - int (*tclUniCharMatch) (const Tcl_UniChar * string, int strLen, const Tcl_UniChar * pattern, int ptnLen, int flags); /* 173 */ + int (*tclUniCharMatch) (const Tcl_UniChar *string, int strLen, const Tcl_UniChar *pattern, int ptnLen, int flags); /* 173 */ void *reserved174; - int (*tclCallVarTraces) (Interp * iPtr, Var * arrayPtr, Var * varPtr, const char * part1, const char * part2, int flags, int leaveErrMsg); /* 175 */ - void (*tclCleanupVar) (Var * varPtr, Var * arrayPtr); /* 176 */ - void (*tclVarErrMsg) (Tcl_Interp * interp, const char * part1, const char * part2, const char * operation, const char * reason); /* 177 */ + int (*tclCallVarTraces) (Interp *iPtr, Var *arrayPtr, Var *varPtr, const char *part1, const char *part2, int flags, int leaveErrMsg); /* 175 */ + void (*tclCleanupVar) (Var *varPtr, Var *arrayPtr); /* 176 */ + void (*tclVarErrMsg) (Tcl_Interp *interp, const char *part1, const char *part2, const char *operation, const char *reason); /* 177 */ void *reserved178; void *reserved179; void *reserved180; void *reserved181; - struct tm * (*tclpLocaltime) (const time_t * clock); /* 182 */ - struct tm * (*tclpGmtime) (const time_t * clock); /* 183 */ + struct tm * (*tclpLocaltime) (const time_t *clock); /* 182 */ + struct tm * (*tclpGmtime) (const time_t *clock); /* 183 */ void *reserved184; void *reserved185; void *reserved186; @@ -1246,56 +1246,56 @@ typedef struct TclIntStubs { void *reserved195; void *reserved196; void *reserved197; - int (*tclObjGetFrame) (Tcl_Interp * interp, Tcl_Obj * objPtr, CallFrame ** framePtrPtr); /* 198 */ + int (*tclObjGetFrame) (Tcl_Interp *interp, Tcl_Obj *objPtr, CallFrame **framePtrPtr); /* 198 */ void *reserved199; - int (*tclpObjRemoveDirectory) (Tcl_Obj * pathPtr, int recursive, Tcl_Obj ** errorPtr); /* 200 */ - int (*tclpObjCopyDirectory) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr, Tcl_Obj ** errorPtr); /* 201 */ - int (*tclpObjCreateDirectory) (Tcl_Obj * pathPtr); /* 202 */ - int (*tclpObjDeleteFile) (Tcl_Obj * pathPtr); /* 203 */ - int (*tclpObjCopyFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 204 */ - int (*tclpObjRenameFile) (Tcl_Obj * srcPathPtr, Tcl_Obj * destPathPtr); /* 205 */ - int (*tclpObjStat) (Tcl_Obj * pathPtr, Tcl_StatBuf * buf); /* 206 */ - int (*tclpObjAccess) (Tcl_Obj * pathPtr, int mode); /* 207 */ - Tcl_Channel (*tclpOpenFileChannel) (Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions); /* 208 */ + int (*tclpObjRemoveDirectory) (Tcl_Obj *pathPtr, int recursive, Tcl_Obj **errorPtr); /* 200 */ + int (*tclpObjCopyDirectory) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); /* 201 */ + int (*tclpObjCreateDirectory) (Tcl_Obj *pathPtr); /* 202 */ + int (*tclpObjDeleteFile) (Tcl_Obj *pathPtr); /* 203 */ + int (*tclpObjCopyFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 204 */ + int (*tclpObjRenameFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 205 */ + int (*tclpObjStat) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); /* 206 */ + int (*tclpObjAccess) (Tcl_Obj *pathPtr, int mode); /* 207 */ + Tcl_Channel (*tclpOpenFileChannel) (Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode, int permissions); /* 208 */ void *reserved209; void *reserved210; void *reserved211; - void (*tclpFindExecutable) (const char * argv0); /* 212 */ + void (*tclpFindExecutable) (const char *argv0); /* 212 */ Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */ - void (*tclSetObjNameOfExecutable) (Tcl_Obj * name, Tcl_Encoding encoding); /* 214 */ - void * (*tclStackAlloc) (Tcl_Interp * interp, int numBytes); /* 215 */ - void (*tclStackFree) (Tcl_Interp * interp, void * freePtr); /* 216 */ - int (*tclPushStackFrame) (Tcl_Interp * interp, Tcl_CallFrame ** framePtrPtr, Tcl_Namespace * namespacePtr, int isProcCallFrame); /* 217 */ - void (*tclPopStackFrame) (Tcl_Interp * interp); /* 218 */ + void (*tclSetObjNameOfExecutable) (Tcl_Obj *name, Tcl_Encoding encoding); /* 214 */ + void * (*tclStackAlloc) (Tcl_Interp *interp, int numBytes); /* 215 */ + void (*tclStackFree) (Tcl_Interp *interp, void *freePtr); /* 216 */ + int (*tclPushStackFrame) (Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr, Tcl_Namespace *namespacePtr, int isProcCallFrame); /* 217 */ + void (*tclPopStackFrame) (Tcl_Interp *interp); /* 218 */ void *reserved219; void *reserved220; void *reserved221; void *reserved222; void *reserved223; TclPlatformType * (*tclGetPlatform) (void); /* 224 */ - Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp * interp, Tcl_Obj * rootPtr, int keyc, Tcl_Obj *const keyv[], int flags); /* 225 */ - int (*tclObjBeingDeleted) (Tcl_Obj * objPtr); /* 226 */ - void (*tclSetNsPath) (Namespace * nsPtr, int pathLength, Tcl_Namespace * pathAry[]); /* 227 */ + Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp *interp, Tcl_Obj *rootPtr, int keyc, Tcl_Obj *const keyv[], int flags); /* 225 */ + int (*tclObjBeingDeleted) (Tcl_Obj *objPtr); /* 226 */ + void (*tclSetNsPath) (Namespace *nsPtr, int pathLength, Tcl_Namespace *pathAry[]); /* 227 */ void *reserved228; - int (*tclPtrMakeUpvar) (Tcl_Interp * interp, Var * otherP1Ptr, const char * myName, int myFlags, int index); /* 229 */ - Var * (*tclObjLookupVar) (Tcl_Interp * interp, Tcl_Obj * part1Ptr, const char * part2, int flags, const char * msg, const int createPart1, const int createPart2, Var ** arrayPtrPtr); /* 230 */ - int (*tclGetNamespaceFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Namespace ** nsPtrPtr); /* 231 */ - int (*tclEvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 232 */ - void (*tclGetSrcInfoForPc) (CmdFrame * contextPtr); /* 233 */ - Var * (*tclVarHashCreateVar) (TclVarHashTable * tablePtr, const char * key, int * newPtr); /* 234 */ - void (*tclInitVarHashTable) (TclVarHashTable * tablePtr, Namespace * nsPtr); /* 235 */ - void (*tcl_BackgroundException) (Tcl_Interp * interp, int code); /* 236 */ - int (*tclResetCancellation) (Tcl_Interp * interp, int force); /* 237 */ - int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *const objv[]); /* 238 */ - int (*tclNRInterpProcCore) (Tcl_Interp * interp, Tcl_Obj * procNameObj, int skip, ProcErrorProc errorProc); /* 239 */ - int (*tclNRRunCallbacks) (Tcl_Interp * interp, int result, struct TEOV_callback * rootPtr, int tebcCall); /* 240 */ - int (*tclNREvalObjEx) (Tcl_Interp * interp, Tcl_Obj * objPtr, int flags, const CmdFrame * invoker, int word); /* 241 */ - int (*tclNREvalObjv) (Tcl_Interp * interp, int objc, Tcl_Obj *const objv[], int flags, Command * cmdPtr); /* 242 */ - void (*tclDbDumpActiveObjects) (FILE * outFile); /* 243 */ - Tcl_HashTable * (*tclGetNamespaceChildTable) (Tcl_Namespace * nsPtr); /* 244 */ - Tcl_HashTable * (*tclGetNamespaceCommandTable) (Tcl_Namespace * nsPtr); /* 245 */ - int (*tclInitRewriteEnsemble) (Tcl_Interp * interp, int numRemoved, int numInserted, Tcl_Obj *const * objv); /* 246 */ - void (*tclResetRewriteEnsemble) (Tcl_Interp * interp, int isRootEnsemble); /* 247 */ + int (*tclPtrMakeUpvar) (Tcl_Interp *interp, Var *otherP1Ptr, const char *myName, int myFlags, int index); /* 229 */ + Var * (*tclObjLookupVar) (Tcl_Interp *interp, Tcl_Obj *part1Ptr, const char *part2, int flags, const char *msg, const int createPart1, const int createPart2, Var **arrayPtrPtr); /* 230 */ + int (*tclGetNamespaceFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr); /* 231 */ + int (*tclEvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, const CmdFrame *invoker, int word); /* 232 */ + void (*tclGetSrcInfoForPc) (CmdFrame *contextPtr); /* 233 */ + Var * (*tclVarHashCreateVar) (TclVarHashTable *tablePtr, const char *key, int *newPtr); /* 234 */ + void (*tclInitVarHashTable) (TclVarHashTable *tablePtr, Namespace *nsPtr); /* 235 */ + void (*tcl_BackgroundException) (Tcl_Interp *interp, int code); /* 236 */ + int (*tclResetCancellation) (Tcl_Interp *interp, int force); /* 237 */ + int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 238 */ + int (*tclNRInterpProcCore) (Tcl_Interp *interp, Tcl_Obj *procNameObj, int skip, ProcErrorProc *errorProc); /* 239 */ + int (*tclNRRunCallbacks) (Tcl_Interp *interp, int result, struct TEOV_callback *rootPtr, int tebcCall); /* 240 */ + int (*tclNREvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, const CmdFrame *invoker, int word); /* 241 */ + int (*tclNREvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags, Command *cmdPtr); /* 242 */ + void (*tclDbDumpActiveObjects) (FILE *outFile); /* 243 */ + Tcl_HashTable * (*tclGetNamespaceChildTable) (Tcl_Namespace *nsPtr); /* 244 */ + Tcl_HashTable * (*tclGetNamespaceCommandTable) (Tcl_Namespace *nsPtr); /* 245 */ + int (*tclInitRewriteEnsemble) (Tcl_Interp *interp, int numRemoved, int numInserted, Tcl_Obj *const *objv); /* 246 */ + void (*tclResetRewriteEnsemble) (Tcl_Interp *interp, int isRootEnsemble); /* 247 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 3521088..b046453 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.41 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.42 2010/02/05 10:03:23 nijtmans Exp $ */ #ifndef _TCLINTPLATDECLS @@ -378,75 +378,75 @@ typedef struct TclIntPlatStubs { const struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ + void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */ int (*tclpCloseFile) (TclFile file); /* 1 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, const char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */ + int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */ + int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */ void *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (const char * fname, int mode); /* 7 */ + TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (const char * contents); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (const time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (const time_t * clock); /* 12 */ + TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */ + Tcl_DirEntry * (*tclpReaddir) (DIR *dir); /* 10 */ + struct tm * (*tclpLocaltime_unix) (const time_t *clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (const time_t *clock); /* 12 */ char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ + int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ void (*tclWinConvertError) (unsigned long errCode); /* 0 */ void (*tclWinConvertWSAError) (unsigned long errCode); /* 1 */ - struct servent * (*tclWinGetServByName) (const char * nm, const char * proto); /* 2 */ - int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ + struct servent * (*tclWinGetServByName) (const char *nm, const char *proto); /* 2 */ + int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR *optval, int FAR *optlen); /* 3 */ HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ void *reserved5; u_short (*tclWinNToHS) (u_short ns); /* 6 */ - int (*tclWinSetSockOpt) (int s, int level, int optname, const char FAR * optval, int optlen); /* 7 */ + int (*tclWinSetSockOpt) (int s, int level, int optname, const char FAR *optval, int optlen); /* 7 */ unsigned long (*tclpGetPid) (Tcl_Pid pid); /* 8 */ int (*tclWinGetPlatformId) (void); /* 9 */ void *reserved10; - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 11 */ + void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 11 */ int (*tclpCloseFile) (TclFile file); /* 12 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 13 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 14 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, const char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 15 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 13 */ + int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 14 */ + int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 15 */ void *reserved16; void *reserved17; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ - TclFile (*tclpOpenFile) (const char * fname, int mode); /* 19 */ - void (*tclWinAddProcess) (void * hProcess, unsigned long id); /* 20 */ + TclFile (*tclpOpenFile) (const char *fname, int mode); /* 19 */ + void (*tclWinAddProcess) (void *hProcess, unsigned long id); /* 20 */ void *reserved21; - TclFile (*tclpCreateTempFile) (const char * contents); /* 22 */ + TclFile (*tclpCreateTempFile) (const char *contents); /* 22 */ char * (*tclpGetTZName) (int isdst); /* 23 */ - char * (*tclWinNoBackslash) (char * path); /* 24 */ + char * (*tclWinNoBackslash) (char *path); /* 24 */ void *reserved25; void (*tclWinSetInterfaces) (int wide); /* 26 */ void (*tclWinFlushDirtyChannels) (void); /* 27 */ void (*tclWinResetInterfaces) (void); /* 28 */ - int (*tclWinCPUID) (unsigned int index, unsigned int * regs); /* 29 */ + int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */ #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ - void (*tclGetAndDetachPids) (Tcl_Interp * interp, Tcl_Channel chan); /* 0 */ + void (*tclGetAndDetachPids) (Tcl_Interp *interp, Tcl_Channel chan); /* 0 */ int (*tclpCloseFile) (TclFile file); /* 1 */ - Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr); /* 2 */ - int (*tclpCreatePipe) (TclFile * readPipe, TclFile * writePipe); /* 3 */ - int (*tclpCreateProcess) (Tcl_Interp * interp, int argc, const char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr); /* 4 */ + Tcl_Channel (*tclpCreateCommandChannel) (TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr); /* 2 */ + int (*tclpCreatePipe) (TclFile *readPipe, TclFile *writePipe); /* 3 */ + int (*tclpCreateProcess) (Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr); /* 4 */ void *reserved5; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 6 */ - TclFile (*tclpOpenFile) (const char * fname, int mode); /* 7 */ + TclFile (*tclpOpenFile) (const char *fname, int mode); /* 7 */ int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 8 */ - TclFile (*tclpCreateTempFile) (const char * contents); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) (DIR * dir); /* 10 */ - struct tm * (*tclpLocaltime_unix) (const time_t * clock); /* 11 */ - struct tm * (*tclpGmtime_unix) (const time_t * clock); /* 12 */ + TclFile (*tclpCreateTempFile) (const char *contents); /* 9 */ + Tcl_DirEntry * (*tclpReaddir) (DIR *dir); /* 10 */ + struct tm * (*tclpLocaltime_unix) (const time_t *clock); /* 11 */ + struct tm * (*tclpGmtime_unix) (const time_t *clock); /* 12 */ char * (*tclpInetNtoa) (struct in_addr addr); /* 13 */ - int (*tclUnixCopyFile) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ - int (*tclMacOSXGetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr); /* 15 */ - int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ - int (*tclMacOSXCopyFileAttributes) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr); /* 17 */ - int (*tclMacOSXMatchType) (Tcl_Interp * interp, const char * pathName, const char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ - void (*tclMacOSXNotifierAddRunLoopMode) (const void * runLoopMode); /* 19 */ + int (*tclUnixCopyFile) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr, int dontCopyAtts); /* 14 */ + int (*tclMacOSXGetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr); /* 15 */ + int (*tclMacOSXSetFileAttribute) (Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj *attributePtr); /* 16 */ + int (*tclMacOSXCopyFileAttributes) (const char *src, const char *dst, const Tcl_StatBuf *statBufPtr); /* 17 */ + int (*tclMacOSXMatchType) (Tcl_Interp *interp, const char *pathName, const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types); /* 18 */ + void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */ #endif /* MACOSX */ } TclIntPlatStubs; diff --git a/generic/tclOO.decls b/generic/tclOO.decls index f06dd6b..0be831a 100644 --- a/generic/tclOO.decls +++ b/generic/tclOO.decls @@ -1,4 +1,4 @@ -# $Id: tclOO.decls,v 1.5 2009/07/19 11:46:53 dkf Exp $ +# $Id: tclOO.decls,v 1.6 2010/02/05 10:03:23 nijtmans Exp $ library tclOO @@ -165,14 +165,14 @@ declare 8 generic { declare 9 generic { Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, + TclOO_PostCallProc postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr) } declare 10 generic { Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, Tcl_Obj *nameObj, + ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr) } diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index 46e4889..edbb677 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.13 2010/01/29 16:17:20 nijtmans Exp $ + * $Id: tclOODecls.h,v 1.14 2010/02/05 10:03:23 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -222,35 +222,35 @@ typedef struct TclOOStubs { int magic; const struct TclOOStubHooks *hooks; - Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp * interp, Tcl_Object sourceObject, const char * targetName, const char * targetNamespaceName); /* 0 */ + Tcl_Object (*tcl_CopyObjectInstance) (Tcl_Interp *interp, Tcl_Object sourceObject, const char *targetName, const char *targetNamespaceName); /* 0 */ Tcl_Object (*tcl_GetClassAsObject) (Tcl_Class clazz); /* 1 */ Tcl_Class (*tcl_GetObjectAsClass) (Tcl_Object object); /* 2 */ Tcl_Command (*tcl_GetObjectCommand) (Tcl_Object object); /* 3 */ - Tcl_Object (*tcl_GetObjectFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 4 */ + Tcl_Object (*tcl_GetObjectFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 4 */ Tcl_Namespace * (*tcl_GetObjectNamespace) (Tcl_Object object); /* 5 */ Tcl_Class (*tcl_MethodDeclarerClass) (Tcl_Method method); /* 6 */ Tcl_Object (*tcl_MethodDeclarerObject) (Tcl_Method method); /* 7 */ int (*tcl_MethodIsPublic) (Tcl_Method method); /* 8 */ - int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType * typePtr, ClientData * clientDataPtr); /* 9 */ + int (*tcl_MethodIsType) (Tcl_Method method, const Tcl_MethodType *typePtr, ClientData *clientDataPtr); /* 9 */ Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */ - Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp * interp, Tcl_Object object, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 11 */ - Tcl_Method (*tcl_NewMethod) (Tcl_Interp * interp, Tcl_Class cls, Tcl_Obj * nameObj, int isPublic, const Tcl_MethodType * typePtr, ClientData clientData); /* 12 */ - Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp * interp, Tcl_Class cls, const char * nameStr, const char * nsNameStr, int objc, Tcl_Obj *const * objv, int skip); /* 13 */ + Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp *interp, Tcl_Object object, Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, ClientData clientData); /* 11 */ + Tcl_Method (*tcl_NewMethod) (Tcl_Interp *interp, Tcl_Class cls, Tcl_Obj *nameObj, int isPublic, const Tcl_MethodType *typePtr, ClientData clientData); /* 12 */ + Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp *interp, Tcl_Class cls, const char *nameStr, const char *nsNameStr, int objc, Tcl_Obj *const *objv, int skip); /* 13 */ int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */ int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */ Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */ Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */ int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */ - ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr); /* 19 */ - void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 20 */ - ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr); /* 21 */ - void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType * typePtr, ClientData metadata); /* 22 */ - int (*tcl_ObjectContextInvokeNext) (Tcl_Interp * interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const * objv, int skip); /* 23 */ + ClientData (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType *typePtr); /* 19 */ + void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType *typePtr, ClientData metadata); /* 20 */ + ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType *typePtr); /* 21 */ + void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType *typePtr, ClientData metadata); /* 22 */ + int (*tcl_ObjectContextInvokeNext) (Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, int skip); /* 23 */ Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ - void (*tcl_ClassSetConstructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ - void (*tcl_ClassSetDestructor) (Tcl_Interp * interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ - Tcl_Obj * (*tcl_GetObjectName) (Tcl_Interp * interp, Tcl_Object object); /* 28 */ + void (*tcl_ClassSetConstructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ + void (*tcl_ClassSetDestructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ + Tcl_Obj * (*tcl_GetObjectName) (Tcl_Interp *interp, Tcl_Object object); /* 28 */ } TclOOStubs; #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index 13bd387..c307287 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.11 2010/01/29 16:17:20 nijtmans Exp $ + * $Id: tclOOIntDecls.h,v 1.12 2010/02/05 10:03:23 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -103,10 +103,10 @@ EXTERN Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj *nameObj, Tcl_Obj *argsObj, - Tcl_Obj *bodyObj, int flags, - void **internalTokenPtr); + ProcErrorProc *errProc, + ClientData clientData, Tcl_Obj *nameObj, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + int flags, void **internalTokenPtr); #endif #ifndef TclOONewProcMethodEx_TCL_DECLARED #define TclOONewProcMethodEx_TCL_DECLARED @@ -115,10 +115,10 @@ EXTERN Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, ClientData clientData, - Tcl_Obj *nameObj, Tcl_Obj *argsObj, - Tcl_Obj *bodyObj, int flags, - void **internalTokenPtr); + ProcErrorProc *errProc, + ClientData clientData, Tcl_Obj *nameObj, + Tcl_Obj *argsObj, Tcl_Obj *bodyObj, + int flags, void **internalTokenPtr); #endif #ifndef TclOOInvokeObject_TCL_DECLARED #define TclOOInvokeObject_TCL_DECLARED @@ -159,22 +159,22 @@ typedef struct TclOOIntStubs { int magic; const struct TclOOIntStubHooks *hooks; - Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp * interp); /* 0 */ - Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 1 */ - Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, const char * namePtr, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, const Tcl_MethodType * typePtr, ClientData clientData, Proc ** procPtrPtr); /* 2 */ - Method * (*tclOONewProcInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 3 */ - Method * (*tclOONewProcMethod) (Tcl_Interp * interp, Class * clsPtr, int flags, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, ProcedureMethod ** pmPtrPtr); /* 4 */ - int (*tclOOObjectCmdCore) (Object * oPtr, Tcl_Interp * interp, int objc, Tcl_Obj *const * objv, int publicOnly, Class * startCls); /* 5 */ - int (*tclOOIsReachable) (Class * targetPtr, Class * startPtr); /* 6 */ - Method * (*tclOONewForwardMethod) (Tcl_Interp * interp, Class * clsPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 7 */ - Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp * interp, Object * oPtr, int isPublic, Tcl_Obj * nameObj, Tcl_Obj * prefixObj); /* 8 */ - Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp * interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 9 */ - Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp * interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc errProc, ClientData clientData, Tcl_Obj * nameObj, Tcl_Obj * argsObj, Tcl_Obj * bodyObj, int flags, void ** internalTokenPtr); /* 10 */ - int (*tclOOInvokeObject) (Tcl_Interp * interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const * objv); /* 11 */ - void (*tclOOObjectSetFilters) (Object * oPtr, int numFilters, Tcl_Obj *const * filters); /* 12 */ - void (*tclOOClassSetFilters) (Tcl_Interp * interp, Class * classPtr, int numFilters, Tcl_Obj *const * filters); /* 13 */ - void (*tclOOObjectSetMixins) (Object * oPtr, int numMixins, Class *const * mixins); /* 14 */ - void (*tclOOClassSetMixins) (Tcl_Interp * interp, Class * classPtr, int numMixins, Class *const * mixins); /* 15 */ + Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp *interp); /* 0 */ + Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr); /* 1 */ + Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, const char *namePtr, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, ClientData clientData, Proc **procPtrPtr); /* 2 */ + Method * (*tclOONewProcInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr); /* 3 */ + Method * (*tclOONewProcMethod) (Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr); /* 4 */ + int (*tclOOObjectCmdCore) (Object *oPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, int publicOnly, Class *startCls); /* 5 */ + int (*tclOOIsReachable) (Class *targetPtr, Class *startPtr); /* 6 */ + Method * (*tclOONewForwardMethod) (Tcl_Interp *interp, Class *clsPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 7 */ + Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 8 */ + Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 9 */ + Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 10 */ + int (*tclOOInvokeObject) (Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const *objv); /* 11 */ + void (*tclOOObjectSetFilters) (Object *oPtr, int numFilters, Tcl_Obj *const *filters); /* 12 */ + void (*tclOOClassSetFilters) (Tcl_Interp *interp, Class *classPtr, int numFilters, Tcl_Obj *const *filters); /* 13 */ + void (*tclOOObjectSetMixins) (Object *oPtr, int numMixins, Class *const *mixins); /* 14 */ + void (*tclOOClassSetMixins) (Tcl_Interp *interp, Class *classPtr, int numMixins, Class *const *mixins); /* 15 */ } TclOOIntStubs; #if defined(USE_TCLOO_STUBS) && !defined(USE_TCLOO_STUB_PROCS) diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 3422660..fa47256 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.22 2009/04/11 11:18:51 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.23 2010/02/05 10:03:23 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -1657,7 +1657,7 @@ TclOONewProcInstanceMethodEx( Tcl_Object oPtr, /* The object to modify. */ TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, + ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, /* The name of the method, which must not be * NULL. */ @@ -1694,7 +1694,7 @@ TclOONewProcMethodEx( Tcl_Class clsPtr, /* The class to modify. */ TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, - ProcErrorProc errProc, + ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, /* The name of the method, which may be NULL; * if so, up to caller to manage storage diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 1dddbaf..34d05fd 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.36 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.37 2010/02/05 10:03:23 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -85,12 +85,12 @@ typedef struct TclPlatStubs { const struct TclPlatStubHooks *hooks; #ifdef __WIN32__ /* WIN */ - TCHAR * (*tcl_WinUtfToTChar) (const char * str, int len, Tcl_DString * dsPtr); /* 0 */ - char * (*tcl_WinTCharToUtf) (const TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */ + TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr); /* 0 */ + char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */ #endif /* WIN */ #ifdef MAC_OSX_TCL /* MACOSX */ - int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, const char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */ - int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, const char * bundleName, const char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */ + int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */ + int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */ #endif /* MACOSX */ } TclPlatStubs; diff --git a/generic/tclProc.c b/generic/tclProc.c index 806bf11..bac2c4e 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.176 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.177 2010/02/05 10:03:23 nijtmans Exp $ */ #include "tclInt.h" @@ -1732,7 +1732,7 @@ TclNRInterpProcCore( Tcl_Obj *procNameObj, /* Procedure name for error reporting. */ int skip, /* Number of initial arguments to be skipped, * i.e., words in the "command name". */ - ProcErrorProc errorProc) /* How to convert results from the script into + ProcErrorProc *errorProc) /* How to convert results from the script into * results of the overall procedure. */ { Interp *iPtr = (Interp *) interp; diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index 76f6b20..ee57f96 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.10 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.11 2010/02/05 10:03:23 nijtmans Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -212,7 +212,7 @@ EXTERN int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q, #define TclBN_mp_div_d_TCL_DECLARED /* 14 */ EXTERN int TclBN_mp_div_d(mp_int *a, mp_digit b, mp_int *q, - mp_digit*r); + mp_digit *r); #endif #ifndef TclBN_mp_div_2_TCL_DECLARED #define TclBN_mp_div_2_TCL_DECLARED @@ -228,7 +228,7 @@ EXTERN int TclBN_mp_div_2d(mp_int *a, int b, mp_int *q, #ifndef TclBN_mp_div_3_TCL_DECLARED #define TclBN_mp_div_3_TCL_DECLARED /* 17 */ -EXTERN int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit*r); +EXTERN int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit *r); #endif #ifndef TclBN_mp_exch_TCL_DECLARED #define TclBN_mp_exch_TCL_DECLARED @@ -318,12 +318,12 @@ EXTERN int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c); #ifndef TclBN_mp_radix_size_TCL_DECLARED #define TclBN_mp_radix_size_TCL_DECLARED /* 35 */ -EXTERN int TclBN_mp_radix_size(mp_int *a, int radix, int*size); +EXTERN int TclBN_mp_radix_size(mp_int *a, int radix, int *size); #endif #ifndef TclBN_mp_read_radix_TCL_DECLARED #define TclBN_mp_read_radix_TCL_DECLARED /* 36 */ -EXTERN int TclBN_mp_read_radix(mp_int *a, const char*str, +EXTERN int TclBN_mp_read_radix(mp_int *a, const char *str, int radix); #endif #ifndef TclBN_mp_rshd_TCL_DECLARED @@ -364,18 +364,18 @@ EXTERN int TclBN_mp_sub_d(mp_int *a, mp_digit b, mp_int *c); #ifndef TclBN_mp_to_unsigned_bin_TCL_DECLARED #define TclBN_mp_to_unsigned_bin_TCL_DECLARED /* 44 */ -EXTERN int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char*b); +EXTERN int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char *b); #endif #ifndef TclBN_mp_to_unsigned_bin_n_TCL_DECLARED #define TclBN_mp_to_unsigned_bin_n_TCL_DECLARED /* 45 */ EXTERN int TclBN_mp_to_unsigned_bin_n(mp_int *a, - unsigned char*b, unsigned long*outlen); + unsigned char *b, unsigned long *outlen); #endif #ifndef TclBN_mp_toradix_n_TCL_DECLARED #define TclBN_mp_toradix_n_TCL_DECLARED /* 46 */ -EXTERN int TclBN_mp_toradix_n(mp_int *a, char*str, int radix, +EXTERN int TclBN_mp_toradix_n(mp_int *a, char *str, int radix, int maxlen); #endif #ifndef TclBN_mp_unsigned_bin_size_TCL_DECLARED @@ -396,7 +396,7 @@ EXTERN void TclBN_mp_zero(mp_int *a); #ifndef TclBN_reverse_TCL_DECLARED #define TclBN_reverse_TCL_DECLARED /* 50 */ -EXTERN void TclBN_reverse(unsigned char*s, int len); +EXTERN void TclBN_reverse(unsigned char *s, int len); #endif #ifndef TclBN_fast_s_mp_mul_digs_TCL_DECLARED #define TclBN_fast_s_mp_mul_digs_TCL_DECLARED @@ -458,65 +458,65 @@ typedef struct TclTomMathStubs { int (*tclBN_epoch) (void); /* 0 */ int (*tclBN_revision) (void); /* 1 */ - int (*tclBN_mp_add) (mp_int * a, mp_int * b, mp_int * c); /* 2 */ - int (*tclBN_mp_add_d) (mp_int * a, mp_digit b, mp_int * c); /* 3 */ - int (*tclBN_mp_and) (mp_int * a, mp_int * b, mp_int * c); /* 4 */ - void (*tclBN_mp_clamp) (mp_int * a); /* 5 */ - void (*tclBN_mp_clear) (mp_int * a); /* 6 */ - void (*tclBN_mp_clear_multi) (mp_int * a, ...); /* 7 */ - int (*tclBN_mp_cmp) (mp_int * a, mp_int * b); /* 8 */ - int (*tclBN_mp_cmp_d) (mp_int * a, mp_digit b); /* 9 */ - int (*tclBN_mp_cmp_mag) (mp_int * a, mp_int * b); /* 10 */ - int (*tclBN_mp_copy) (mp_int * a, mp_int * b); /* 11 */ - int (*tclBN_mp_count_bits) (mp_int * a); /* 12 */ - int (*tclBN_mp_div) (mp_int * a, mp_int * b, mp_int * q, mp_int * r); /* 13 */ - int (*tclBN_mp_div_d) (mp_int * a, mp_digit b, mp_int * q, mp_digit* r); /* 14 */ - int (*tclBN_mp_div_2) (mp_int * a, mp_int * q); /* 15 */ - int (*tclBN_mp_div_2d) (mp_int * a, int b, mp_int * q, mp_int * r); /* 16 */ - int (*tclBN_mp_div_3) (mp_int * a, mp_int * q, mp_digit* r); /* 17 */ - void (*tclBN_mp_exch) (mp_int * a, mp_int * b); /* 18 */ - int (*tclBN_mp_expt_d) (mp_int * a, mp_digit b, mp_int * c); /* 19 */ - int (*tclBN_mp_grow) (mp_int * a, int size); /* 20 */ - int (*tclBN_mp_init) (mp_int * a); /* 21 */ - int (*tclBN_mp_init_copy) (mp_int * a, mp_int * b); /* 22 */ - int (*tclBN_mp_init_multi) (mp_int * a, ...); /* 23 */ - int (*tclBN_mp_init_set) (mp_int * a, mp_digit b); /* 24 */ - int (*tclBN_mp_init_size) (mp_int * a, int size); /* 25 */ - int (*tclBN_mp_lshd) (mp_int * a, int shift); /* 26 */ - int (*tclBN_mp_mod) (mp_int * a, mp_int * b, mp_int * r); /* 27 */ - int (*tclBN_mp_mod_2d) (mp_int * a, int b, mp_int * r); /* 28 */ - int (*tclBN_mp_mul) (mp_int * a, mp_int * b, mp_int * p); /* 29 */ - int (*tclBN_mp_mul_d) (mp_int * a, mp_digit b, mp_int * p); /* 30 */ - int (*tclBN_mp_mul_2) (mp_int * a, mp_int * p); /* 31 */ - int (*tclBN_mp_mul_2d) (mp_int * a, int d, mp_int * p); /* 32 */ - int (*tclBN_mp_neg) (mp_int * a, mp_int * b); /* 33 */ - int (*tclBN_mp_or) (mp_int * a, mp_int * b, mp_int * c); /* 34 */ - int (*tclBN_mp_radix_size) (mp_int * a, int radix, int* size); /* 35 */ - int (*tclBN_mp_read_radix) (mp_int * a, const char* str, int radix); /* 36 */ - void (*tclBN_mp_rshd) (mp_int * a, int shift); /* 37 */ - int (*tclBN_mp_shrink) (mp_int * a); /* 38 */ - void (*tclBN_mp_set) (mp_int * a, mp_digit b); /* 39 */ - int (*tclBN_mp_sqr) (mp_int * a, mp_int * b); /* 40 */ - int (*tclBN_mp_sqrt) (mp_int * a, mp_int * b); /* 41 */ - int (*tclBN_mp_sub) (mp_int * a, mp_int * b, mp_int * c); /* 42 */ - int (*tclBN_mp_sub_d) (mp_int * a, mp_digit b, mp_int * c); /* 43 */ - int (*tclBN_mp_to_unsigned_bin) (mp_int * a, unsigned char* b); /* 44 */ - int (*tclBN_mp_to_unsigned_bin_n) (mp_int * a, unsigned char* b, unsigned long* outlen); /* 45 */ - int (*tclBN_mp_toradix_n) (mp_int * a, char* str, int radix, int maxlen); /* 46 */ - int (*tclBN_mp_unsigned_bin_size) (mp_int * a); /* 47 */ - int (*tclBN_mp_xor) (mp_int * a, mp_int * b, mp_int * c); /* 48 */ - void (*tclBN_mp_zero) (mp_int * a); /* 49 */ - void (*tclBN_reverse) (unsigned char* s, int len); /* 50 */ - int (*tclBN_fast_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 51 */ - int (*tclBN_fast_s_mp_sqr) (mp_int * a, mp_int * b); /* 52 */ - int (*tclBN_mp_karatsuba_mul) (mp_int * a, mp_int * b, mp_int * c); /* 53 */ - int (*tclBN_mp_karatsuba_sqr) (mp_int * a, mp_int * b); /* 54 */ - int (*tclBN_mp_toom_mul) (mp_int * a, mp_int * b, mp_int * c); /* 55 */ - int (*tclBN_mp_toom_sqr) (mp_int * a, mp_int * b); /* 56 */ - int (*tclBN_s_mp_add) (mp_int * a, mp_int * b, mp_int * c); /* 57 */ - int (*tclBN_s_mp_mul_digs) (mp_int * a, mp_int * b, mp_int * c, int digs); /* 58 */ - int (*tclBN_s_mp_sqr) (mp_int * a, mp_int * b); /* 59 */ - int (*tclBN_s_mp_sub) (mp_int * a, mp_int * b, mp_int * c); /* 60 */ + int (*tclBN_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 2 */ + int (*tclBN_mp_add_d) (mp_int *a, mp_digit b, mp_int *c); /* 3 */ + int (*tclBN_mp_and) (mp_int *a, mp_int *b, mp_int *c); /* 4 */ + void (*tclBN_mp_clamp) (mp_int *a); /* 5 */ + void (*tclBN_mp_clear) (mp_int *a); /* 6 */ + void (*tclBN_mp_clear_multi) (mp_int *a, ...); /* 7 */ + int (*tclBN_mp_cmp) (mp_int *a, mp_int *b); /* 8 */ + int (*tclBN_mp_cmp_d) (mp_int *a, mp_digit b); /* 9 */ + int (*tclBN_mp_cmp_mag) (mp_int *a, mp_int *b); /* 10 */ + int (*tclBN_mp_copy) (mp_int *a, mp_int *b); /* 11 */ + int (*tclBN_mp_count_bits) (mp_int *a); /* 12 */ + int (*tclBN_mp_div) (mp_int *a, mp_int *b, mp_int *q, mp_int *r); /* 13 */ + int (*tclBN_mp_div_d) (mp_int *a, mp_digit b, mp_int *q, mp_digit *r); /* 14 */ + int (*tclBN_mp_div_2) (mp_int *a, mp_int *q); /* 15 */ + int (*tclBN_mp_div_2d) (mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */ + int (*tclBN_mp_div_3) (mp_int *a, mp_int *q, mp_digit *r); /* 17 */ + void (*tclBN_mp_exch) (mp_int *a, mp_int *b); /* 18 */ + int (*tclBN_mp_expt_d) (mp_int *a, mp_digit b, mp_int *c); /* 19 */ + int (*tclBN_mp_grow) (mp_int *a, int size); /* 20 */ + int (*tclBN_mp_init) (mp_int *a); /* 21 */ + int (*tclBN_mp_init_copy) (mp_int *a, mp_int *b); /* 22 */ + int (*tclBN_mp_init_multi) (mp_int *a, ...); /* 23 */ + int (*tclBN_mp_init_set) (mp_int *a, mp_digit b); /* 24 */ + int (*tclBN_mp_init_size) (mp_int *a, int size); /* 25 */ + int (*tclBN_mp_lshd) (mp_int *a, int shift); /* 26 */ + int (*tclBN_mp_mod) (mp_int *a, mp_int *b, mp_int *r); /* 27 */ + int (*tclBN_mp_mod_2d) (mp_int *a, int b, mp_int *r); /* 28 */ + int (*tclBN_mp_mul) (mp_int *a, mp_int *b, mp_int *p); /* 29 */ + int (*tclBN_mp_mul_d) (mp_int *a, mp_digit b, mp_int *p); /* 30 */ + int (*tclBN_mp_mul_2) (mp_int *a, mp_int *p); /* 31 */ + int (*tclBN_mp_mul_2d) (mp_int *a, int d, mp_int *p); /* 32 */ + int (*tclBN_mp_neg) (mp_int *a, mp_int *b); /* 33 */ + int (*tclBN_mp_or) (mp_int *a, mp_int *b, mp_int *c); /* 34 */ + int (*tclBN_mp_radix_size) (mp_int *a, int radix, int *size); /* 35 */ + int (*tclBN_mp_read_radix) (mp_int *a, const char *str, int radix); /* 36 */ + void (*tclBN_mp_rshd) (mp_int *a, int shift); /* 37 */ + int (*tclBN_mp_shrink) (mp_int *a); /* 38 */ + void (*tclBN_mp_set) (mp_int *a, mp_digit b); /* 39 */ + int (*tclBN_mp_sqr) (mp_int *a, mp_int *b); /* 40 */ + int (*tclBN_mp_sqrt) (mp_int *a, mp_int *b); /* 41 */ + int (*tclBN_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 42 */ + int (*tclBN_mp_sub_d) (mp_int *a, mp_digit b, mp_int *c); /* 43 */ + int (*tclBN_mp_to_unsigned_bin) (mp_int *a, unsigned char *b); /* 44 */ + int (*tclBN_mp_to_unsigned_bin_n) (mp_int *a, unsigned char *b, unsigned long *outlen); /* 45 */ + int (*tclBN_mp_toradix_n) (mp_int *a, char *str, int radix, int maxlen); /* 46 */ + int (*tclBN_mp_unsigned_bin_size) (mp_int *a); /* 47 */ + int (*tclBN_mp_xor) (mp_int *a, mp_int *b, mp_int *c); /* 48 */ + void (*tclBN_mp_zero) (mp_int *a); /* 49 */ + void (*tclBN_reverse) (unsigned char *s, int len); /* 50 */ + int (*tclBN_fast_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 51 */ + int (*tclBN_fast_s_mp_sqr) (mp_int *a, mp_int *b); /* 52 */ + int (*tclBN_mp_karatsuba_mul) (mp_int *a, mp_int *b, mp_int *c); /* 53 */ + int (*tclBN_mp_karatsuba_sqr) (mp_int *a, mp_int *b); /* 54 */ + int (*tclBN_mp_toom_mul) (mp_int *a, mp_int *b, mp_int *c); /* 55 */ + int (*tclBN_mp_toom_sqr) (mp_int *a, mp_int *b); /* 56 */ + int (*tclBN_s_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 57 */ + int (*tclBN_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 58 */ + int (*tclBN_s_mp_sqr) (mp_int *a, mp_int *b); /* 59 */ + int (*tclBN_s_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 60 */ } TclTomMathStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclVar.c b/generic/tclVar.c index 06a2c9c..1848fff 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.193 2010/02/04 14:56:50 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.194 2010/02/05 10:03:23 nijtmans Exp $ */ #include "tclInt.h" @@ -3700,7 +3700,7 @@ ArrayNamesCmd( Var *varPtr, *arrayPtr, *varPtr2; Tcl_Obj *varNameObj, *nameObj, *resultObj, *patternObj; Tcl_HashSearch search; - const char *pattern; + const char *pattern = NULL; int mode = OPT_GLOB; if ((objc < 2) || (objc > 4)) { @@ -3785,7 +3785,7 @@ ArrayNamesCmd( nameObj = VarHashGetKey(varPtr2); if (patternObj) { const char *name = TclGetString(nameObj); - int matched; + int matched = 0; switch ((enum options) mode) { case OPT_EXACT: diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 3e33a74..b76285f 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.34 2010/01/29 16:17:21 nijtmans Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.35 2010/02/05 10:03:24 nijtmans Exp $ package require Tcl 8.4 @@ -545,8 +545,11 @@ proc genStubs::makeSlot {name decl index} { TCL_VARARGS { set sep "(" foreach arg [lrange $args 1 end] { - append text $sep [lindex $arg 0] " " [lindex $arg 1] \ - [lindex $arg 2] + append text $sep [lindex $arg 0] + if {[string index $text end] ne "*"} { + append text " " + } + append text [lindex $arg 1] [lindex $arg 2] set sep ", " } append text ", ...)" @@ -554,8 +557,11 @@ proc genStubs::makeSlot {name decl index} { default { set sep "(" foreach arg $args { - append text $sep [lindex $arg 0] " " [lindex $arg 1] \ - [lindex $arg 2] + append text $sep [lindex $arg 0] + if {[string index $text end] ne "*"} { + append text " " + } + append text [lindex $arg 1] [lindex $arg 2] set sep ", " } append text ")" diff --git a/win/tclWinInt.h b/win/tclWinInt.h index c0222f9..7257afe 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInt.h,v 1.32 2009/08/02 10:41:09 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInt.h,v 1.33 2010/02/05 10:03:24 nijtmans Exp $ */ #ifndef _TCLWININT @@ -52,7 +52,7 @@ typedef struct TclWinProcs { int useWide; BOOL (WINAPI *buildCommDCBProc)(const TCHAR *, LPDCB); - TCHAR *(WINAPI *charLowerProc)(TCHAR *); + TCHAR * (WINAPI *charLowerProc)(TCHAR *); BOOL (WINAPI *copyFileProc)(const TCHAR *, const TCHAR *, BOOL); BOOL (WINAPI *createDirectoryProc)(const TCHAR *, LPSECURITY_ATTRIBUTES); HANDLE (WINAPI *createFileProc)(const TCHAR *, DWORD, DWORD, -- cgit v0.12 From 8080777070d8ea01dc413b1c57242d83b7393f49 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Feb 2010 11:47:22 +0000 Subject: Use 'const' more often for pointers to read-only structures. --- ChangeLog | 33 +++-- generic/tclEncoding.c | 380 +++++++++++++++++++++++++++----------------------- 2 files changed, 222 insertions(+), 191 deletions(-) diff --git a/ChangeLog b/ChangeLog index db8fb1f..61a7efa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,20 +1,25 @@ +2010-02-05 Donal K. Fellows + + * generic/tclEncoding.c: Add 'const' to many function-internal vars + that are never pointing to things that are written to. + 2010-02-05 Jan Nijtmans * tools/genStubs.tcl: Follow-up to [2010-01-29] commit: - prevent space within stub table function parameters - if the parameter type is a pointer. - * win/tclWinInt.h Minor Formatting - * generic/tcl.h VOID -> void and other formatting - * generic/tclInt.h Minor formatting - * generic/tclInt.decls Change signature of TclNRInterpProcCore, - * generic/tclOO.decls and TclOONewProc(Instance|)MethodEx, - * generic/tclProc.c indicating that errorProc is a function, - * generic/tclOOMethod.c pointer, and other formatting - * generic/tcl*Decls.h (regenerated) - * generic/tclVar.c: gcc warning(line 3703): ‘pattern’ may be used - uninitialized in this function - gcc warning(line 3788): ‘matched’ may be used - uninitialized in this function + prevent space within stub table function parameters if the + parameter type is a pointer. + * win/tclWinInt.h: Minor Formatting + * generic/tcl.h: VOID -> void and other formatting + * generic/tclInt.h: Minor formatting + * generic/tclInt.decls: Change signature of TclNRInterpProcCore, + * generic/tclOO.decls: and TclOONewProc(Instance|)MethodEx, + * generic/tclProc.c: indicating that errorProc is a function, + * generic/tclOOMethod.c:pointer, and other formatting + * generic/tcl*Decls.h: (regenerated) + * generic/tclVar.c: gcc warning(line 3703): ‘pattern’ may be used + uninitialized in this function + gcc warning(line 3788): ‘matched’ may be used + uninitialized in this function 2010-02-04 Donal K. Fellows diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 7e5466c..a34f193 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.68 2009/11/19 21:56:34 nijtmans Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.69 2010/02/05 11:47:22 dkf Exp $ */ #include "tclInt.h" @@ -307,6 +307,7 @@ Tcl_GetEncodingFromObj( Tcl_Encoding *encodingPtr) { const char *name = Tcl_GetString(objPtr); + if (objPtr->typePtr != &encodingType) { Tcl_Encoding encoding = Tcl_GetEncoding(interp, name); @@ -314,7 +315,7 @@ Tcl_GetEncodingFromObj( return TCL_ERROR; } TclFreeIntRep(objPtr); - objPtr->internalRep.otherValuePtr = (void *) encoding; + objPtr->internalRep.otherValuePtr = encoding; objPtr->typePtr = &encodingType; } *encodingPtr = Tcl_GetEncoding(NULL, name); @@ -335,7 +336,7 @@ static void FreeEncodingIntRep( Tcl_Obj *objPtr) { - Tcl_FreeEncoding((Tcl_Encoding) objPtr->internalRep.otherValuePtr); + Tcl_FreeEncoding(objPtr->internalRep.otherValuePtr); objPtr->typePtr = NULL; } @@ -354,8 +355,7 @@ DupEncodingIntRep( Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) { - dupPtr->internalRep.otherValuePtr = (void *) - Tcl_GetEncoding(NULL, srcPtr->bytes); + dupPtr->internalRep.otherValuePtr = Tcl_GetEncoding(NULL, srcPtr->bytes); } /* @@ -508,12 +508,12 @@ FillEncodingFileMap(void) Tcl_ListObjGetElements(NULL, matchFileList, &numFiles, &filev); for (j=0; jfallback = '?'; - - size = 256*(sizeof(unsigned short *) + sizeof(unsigned short)); - dataPtr->toUnicode = (unsigned short **) ckalloc(size); - memset(dataPtr->toUnicode, 0, size); - dataPtr->fromUnicode = (unsigned short **) ckalloc(size); - memset(dataPtr->fromUnicode, 0, size); - - dataPtr->toUnicode[0] = (unsigned short *) (dataPtr->toUnicode + 256); - dataPtr->fromUnicode[0] = (unsigned short *) - (dataPtr->fromUnicode + 256); - for (i=1 ; i<256 ; i++) { - dataPtr->toUnicode[i] = emptyPage; - dataPtr->fromUnicode[i] = emptyPage; - } + dataPtr = (TableEncodingData *) ckalloc(sizeof(TableEncodingData)); + memset(dataPtr, 0, sizeof(TableEncodingData)); + dataPtr->fallback = '?'; - for (i=0 ; i<256 ; i++) { - dataPtr->toUnicode[0][i] = i; - dataPtr->fromUnicode[0][i] = i; - } + size = 256*(sizeof(unsigned short *) + sizeof(unsigned short)); + dataPtr->toUnicode = (unsigned short **) ckalloc(size); + memset(dataPtr->toUnicode, 0, size); + dataPtr->fromUnicode = (unsigned short **) ckalloc(size); + memset(dataPtr->fromUnicode, 0, size); + + dataPtr->toUnicode[0] = (unsigned short *) (dataPtr->toUnicode + 256); + dataPtr->fromUnicode[0] = (unsigned short *) (dataPtr->fromUnicode + 256); + for (i=1 ; i<256 ; i++) { + dataPtr->toUnicode[i] = emptyPage; + dataPtr->fromUnicode[i] = emptyPage; + } - type.encodingName = "iso8859-1"; - type.toUtfProc = Iso88591ToUtfProc; - type.fromUtfProc = Iso88591FromUtfProc; - type.freeProc = TableFreeProc; - type.nullSize = 1; - type.clientData = dataPtr; - defaultEncoding = Tcl_CreateEncoding(&type); - systemEncoding = Tcl_GetEncoding(NULL, type.encodingName); + for (i=0 ; i<256 ; i++) { + dataPtr->toUnicode[0][i] = i; + dataPtr->fromUnicode[0][i] = i; } + type.encodingName = "iso8859-1"; + type.toUtfProc = Iso88591ToUtfProc; + type.fromUtfProc = Iso88591FromUtfProc; + type.freeProc = TableFreeProc; + type.nullSize = 1; + type.clientData = dataPtr; + defaultEncoding = Tcl_CreateEncoding(&type); + systemEncoding = Tcl_GetEncoding(NULL, type.encodingName); + encodingsInitialized = 1; } @@ -667,7 +663,7 @@ TclFinalizeEncodingSubsystem(void) * cleaned up. */ - FreeEncoding((Tcl_Encoding) Tcl_GetHashValue(hPtr)); + FreeEncoding(Tcl_GetHashValue(hPtr)); hPtr = Tcl_FirstHashEntry(&encodingTable, &search); } @@ -839,9 +835,8 @@ static void FreeEncoding( Tcl_Encoding encoding) { - Encoding *encodingPtr; + Encoding *encodingPtr = (Encoding *) encoding; - encodingPtr = (Encoding *) encoding; if (encodingPtr == NULL) { return; } @@ -927,7 +922,8 @@ Tcl_GetEncodingNames( Tcl_MutexLock(&encodingMutex); for (hPtr = Tcl_FirstHashEntry(&encodingTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { - Encoding *encodingPtr = (Encoding *) Tcl_GetHashValue(hPtr); + Encoding *encodingPtr = Tcl_GetHashValue(hPtr); + Tcl_CreateHashEntry(&table, (char *) Tcl_NewStringObj(encodingPtr->name, -1), &dummy); } @@ -1056,7 +1052,7 @@ Tcl_CreateEncoding( * reference goes away. */ - encodingPtr = (Encoding *) Tcl_GetHashValue(hPtr); + encodingPtr = Tcl_GetHashValue(hPtr); encodingPtr->hPtr = NULL; } @@ -1116,7 +1112,7 @@ Tcl_ExternalToUtfDString( { char *dst; Tcl_EncodingState state; - Encoding *encodingPtr; + const Encoding *encodingPtr; int flags, dstLen, result, soFar, srcRead, dstWrote, dstChars; Tcl_DStringInit(dstPtr); @@ -1206,7 +1202,7 @@ Tcl_ExternalToUtf( * correspond to the bytes stored in the * output buffer. */ { - Encoding *encodingPtr; + const Encoding *encodingPtr; int result, srcRead, dstWrote, dstChars; Tcl_EncodingState state; @@ -1282,7 +1278,7 @@ Tcl_UtfToExternalDString( { char *dst; Tcl_EncodingState state; - Encoding *encodingPtr; + const Encoding *encodingPtr; int flags, dstLen, result, soFar, srcRead, dstWrote, dstChars; Tcl_DStringInit(dstPtr); @@ -1374,7 +1370,7 @@ Tcl_UtfToExternal( * correspond to the bytes stored in the * output buffer. */ { - Encoding *encodingPtr; + const Encoding *encodingPtr; int result, srcRead, dstWrote, dstChars; Tcl_EncodingState state; @@ -1495,6 +1491,7 @@ OpenEncodingFileChannel( } if (!verified) { const char *dirString = Tcl_GetString(directory); + for (i=0; itoUnicode[hi] == NULL) { dataPtr->toUnicode[hi] = emptyPage; - } else { - for (lo = 0; lo < 256; lo++) { - int ch; - - ch = dataPtr->toUnicode[hi][lo]; - if (ch != 0) { - unsigned short *page; - - page = dataPtr->fromUnicode[ch >> 8]; - if (page == NULL) { - page = pageMemPtr; - pageMemPtr += 256; - dataPtr->fromUnicode[ch >> 8] = page; - } - page[ch & 0xff] = (unsigned short) ((hi << 8) + lo); + continue; + } + for (lo = 0; lo < 256; lo++) { + int ch = dataPtr->toUnicode[hi][lo]; + + if (ch != 0) { + page = dataPtr->fromUnicode[ch >> 8]; + if (page == NULL) { + page = pageMemPtr; + pageMemPtr += 256; + dataPtr->fromUnicode[ch >> 8] = page; } + page[ch & 0xff] = (unsigned short) ((hi << 8) + lo); } } } @@ -1822,8 +1817,6 @@ LoadTableEncoding( } } if (symbol) { - unsigned short *page; - /* * Make a special symbol encoding that not only maps the symbol * characters from their Unicode code points down into page 0, but @@ -1831,7 +1824,7 @@ LoadTableEncoding( * is so that a symbol font can be used to display a simple string * like "abcd" and have alpha, beta, chi, delta show up, rather than * have "unknown" chars show up because strictly speaking the symbol - * font doesn't have glyphs for those low ascii chars. + * font doesn't have glyphs for those low ASCII chars. */ page = dataPtr->fromUnicode[0]; @@ -1856,57 +1849,77 @@ LoadTableEncoding( */ Tcl_DStringInit(&lineString); - do { - int len; + + /* + * Skip leading empty lines. + */ + + while ((len = Tcl_Gets(chan, &lineString)) == 0) { + /* empty body */ + } + if (len < 0) { + goto doneParse; + } + + /* + * Require that it starts with an 'R'. + */ + + line = Tcl_DStringValue(&lineString); + if (line[0] != 'R') { + goto doneParse; + } + + /* + * Read lines from the encoding until EOF. + */ + + for (Tcl_DStringSetLength(&lineString, 0); + (len = Tcl_Gets(chan, &lineString)) >= 0; + Tcl_DStringSetLength(&lineString, 0)) { + const unsigned char *p; + int to, from; /* - * Skip leading empty lines. + * Skip short lines. */ - while ((len = Tcl_Gets(chan, &lineString)) == 0) { - /* empty body */ + if (len < 5) { + continue; } - if (len < 0) { - break; - } - line = Tcl_DStringValue(&lineString); - if (line[0] != 'R') { - break; - } - for (Tcl_DStringSetLength(&lineString, 0); - (len = Tcl_Gets(chan, &lineString)) >= 0; - Tcl_DStringSetLength(&lineString, 0)) { - unsigned char *p; - int to, from; + /* + * Parse the line as a sequence of hex digits. + */ - if (len < 5) { - continue; - } - p = (unsigned char *) Tcl_DStringValue(&lineString); - to = (staticHex[p[0]] << 12) + (staticHex[p[1]] << 8) + p = (const unsigned char *) Tcl_DStringValue(&lineString); + to = (staticHex[p[0]] << 12) + (staticHex[p[1]] << 8) + + (staticHex[p[2]] << 4) + staticHex[p[3]]; + if (to == 0) { + continue; + } + for (p += 5, len -= 5; len >= 0 && *p; p += 5, len -= 5) { + from = (staticHex[p[0]] << 12) + (staticHex[p[1]] << 8) + (staticHex[p[2]] << 4) + staticHex[p[3]]; - if (to == 0) { - continue; - } - for (p += 5, len -= 5; len >= 0 && *p; p += 5, len -= 5) { - from = (staticHex[p[0]] << 12) + (staticHex[p[1]] << 8) - + (staticHex[p[2]] << 4) + staticHex[p[3]]; - if (from == 0) { - continue; - } - dataPtr->fromUnicode[from >> 8][from & 0xff] = to; + if (from == 0) { + continue; } + dataPtr->fromUnicode[from >> 8][from & 0xff] = to; } - } while (0); + } + doneParse: Tcl_DStringFree(&lineString); + /* + * Package everything into an encoding structure. + */ + encType.encodingName = name; encType.toUtfProc = TableToUtfProc; encType.fromUtfProc = TableFromUtfProc; encType.freeProc = TableFreeProc; encType.nullSize = (type == ENCODING_DOUBLEBYTE) ? 2 : 1; - encType.clientData = (ClientData) dataPtr; + encType.clientData = dataPtr; return Tcl_CreateEncoding(&encType); } @@ -1961,6 +1974,7 @@ LoadEscapeEncoding( } line = Tcl_DStringValue(&lineString); if (Tcl_SplitList(NULL, line, &argc, &argv) != TCL_OK) { + Tcl_DStringFree(&lineString); continue; } if (argc >= 2) { @@ -1988,8 +2002,8 @@ LoadEscapeEncoding( */ e = (Encoding *) Tcl_GetEncoding(NULL, est.name); - if (e && e->toUtfProc != TableToUtfProc && - e->toUtfProc != Iso88591ToUtfProc) { + if ((e != NULL) && (e->toUtfProc != TableToUtfProc) + && (e->toUtfProc != Iso88591ToUtfProc)) { Tcl_FreeEncoding((Tcl_Encoding) e); e = NULL; } @@ -2025,12 +2039,16 @@ LoadEscapeEncoding( dataPtr->prefixBytes[UCHAR(dataPtr->final[0])] = 1; } + /* + * Package everything into an encoding structure. + */ + type.encodingName = name; type.toUtfProc = EscapeToUtfProc; type.fromUtfProc = EscapeFromUtfProc; type.freeProc = EscapeFreeProc; type.nullSize = 1; - type.clientData = (ClientData) dataPtr; + type.clientData = dataPtr; return Tcl_CreateEncoding(&type); } @@ -2162,6 +2180,7 @@ UtfIntToUtfExtProc( * *------------------------------------------------------------------------- */ + static int UtfExtToUtfIntProc( ClientData clientData, /* Not used. */ @@ -2242,7 +2261,7 @@ UtfToUtfProc( * versa. */ { const char *srcStart, *srcEnd, *srcClose; - char *dstStart, *dstEnd; + const char *dstStart, *dstEnd; int result, numChars; Tcl_UniChar ch; @@ -2353,7 +2372,7 @@ UnicodeToUtfProc( * output buffer. */ { const char *srcStart, *srcEnd; - char *dstEnd, *dstStart; + const char *dstEnd, *dstStart; int result, numChars; Tcl_UniChar ch; @@ -2375,10 +2394,12 @@ UnicodeToUtfProc( result = TCL_CONVERT_NOSPACE; break; } + /* - * Special case for 1-byte utf chars for speed. Make sure we - * work with Tcl_UniChar-size data. + * Special case for 1-byte utf chars for speed. Make sure we work with + * Tcl_UniChar-size data. */ + ch = *(Tcl_UniChar *)src; if (ch && ch < 0x80) { *dst++ = (ch & 0xFF); @@ -2468,11 +2489,13 @@ UtfToUnicodeProc( break; } src += TclUtfToUniChar(src, &ch); + /* - * Need to handle this in a way that won't cause misalignment - * by casting dst to a Tcl_UniChar. [Bug 1122671] + * Need to handle this in a way that won't cause misalignment by + * casting dst to a Tcl_UniChar. [Bug 1122671] * XXX: This hard-codes the assumed size of Tcl_UniChar as 2. */ + #ifdef WORDS_BIGENDIAN *dst++ = (ch >> 8); *dst++ = (ch & 0xFF); @@ -2533,12 +2556,12 @@ TableToUtfProc( * output buffer. */ { const char *srcStart, *srcEnd; - char *dstEnd, *dstStart, *prefixBytes; + const char *dstEnd, *dstStart, *prefixBytes; int result, byte, numChars; Tcl_UniChar ch; - unsigned short **toUnicode; - unsigned short *pageZero; - TableEncodingData *dataPtr; + const unsigned short *const *toUnicode; + const unsigned short *pageZero; + TableEncodingData *dataPtr = clientData; srcStart = src; srcEnd = src + srcLen; @@ -2546,8 +2569,7 @@ TableToUtfProc( dstStart = dst; dstEnd = dst + dstLen - TCL_UTF_MAX; - dataPtr = (TableEncodingData *) clientData; - toUnicode = dataPtr->toUnicode; + toUnicode = (const unsigned short *const *) dataPtr->toUnicode; prefixBytes = dataPtr->prefixBytes; pageZero = toUnicode[0]; @@ -2579,9 +2601,11 @@ TableToUtfProc( } ch = (Tcl_UniChar) byte; } + /* * Special case for 1-byte utf chars for speed. */ + if (ch && ch < 0x80) { *dst++ = (char) ch; } else { @@ -2642,17 +2666,16 @@ TableFromUtfProc( * output buffer. */ { const char *srcStart, *srcEnd, *srcClose; - char *dstStart, *dstEnd, *prefixBytes; + const char *dstStart, *dstEnd, *prefixBytes; Tcl_UniChar ch; int result, len, word, numChars; - TableEncodingData *dataPtr; - unsigned short **fromUnicode; + TableEncodingData *dataPtr = clientData; + const unsigned short *const *fromUnicode; result = TCL_OK; - dataPtr = (TableEncodingData *) clientData; prefixBytes = dataPtr->prefixBytes; - fromUnicode = dataPtr->fromUnicode; + fromUnicode = (const unsigned short *const *) dataPtr->fromUnicode; srcStart = src; srcEnd = src + srcLen; @@ -2764,7 +2787,7 @@ Iso88591ToUtfProc( * output buffer. */ { const char *srcStart, *srcEnd; - char *dstEnd, *dstStart; + const char *dstEnd, *dstStart; int result, numChars; srcStart = src; @@ -2782,9 +2805,11 @@ Iso88591ToUtfProc( break; } ch = (Tcl_UniChar) *((unsigned char *) src); + /* * Special case for 1-byte utf chars for speed. */ + if (ch && ch < 0x80) { *dst++ = (char) ch; } else { @@ -2843,7 +2868,7 @@ Iso88591FromUtfProc( * output buffer. */ { const char *srcStart, *srcEnd, *srcClose; - char *dstStart, *dstEnd; + const char *dstStart, *dstEnd; int result, numChars; result = TCL_OK; @@ -2926,13 +2951,12 @@ TableFreeProc( ClientData clientData) /* TableEncodingData that specifies * encoding. */ { - TableEncodingData *dataPtr; + TableEncodingData *dataPtr = clientData; /* * Make sure we aren't freeing twice on shutdown. [Bug 219314] */ - dataPtr = (TableEncodingData *) clientData; ckfree((char *) dataPtr->toUnicode); ckfree((char *) dataPtr->fromUnicode); ckfree((char *) dataPtr); @@ -2984,12 +3008,11 @@ EscapeToUtfProc( * output buffer. */ { EscapeEncodingData *dataPtr = clientData; - char *prefixBytes, *tablePrefixBytes; - unsigned short **tableToUnicode; - Encoding *encodingPtr; + const char *prefixBytes, *tablePrefixBytes, *srcStart, *srcEnd; + const unsigned short *const *tableToUnicode; + const Encoding *encodingPtr; int state, result, numChars; - const char *srcStart, *srcEnd; - char *dstStart, *dstEnd; + const char *dstStart, *dstEnd; result = TCL_OK; tablePrefixBytes = NULL; /* lint. */ @@ -3019,7 +3042,7 @@ EscapeToUtfProc( if (prefixBytes[byte]) { unsigned left, len, longest; int checked, i; - EscapeSubTable *subTablePtr; + const EscapeSubTable *subTablePtr; /* * Saw the beginning of an escape sequence. @@ -3119,7 +3142,8 @@ EscapeToUtfProc( encodingPtr = GetTableEncoding(dataPtr, state); tableDataPtr = encodingPtr->clientData; tablePrefixBytes = tableDataPtr->prefixBytes; - tableToUnicode = tableDataPtr->toUnicode; + tableToUnicode = (const unsigned short *const*) + tableDataPtr->toUnicode; } if (tablePrefixBytes[byte]) { @@ -3195,13 +3219,13 @@ EscapeFromUtfProc( * output buffer. */ { EscapeEncodingData *dataPtr = clientData; - Encoding *encodingPtr; + const Encoding *encodingPtr; const char *srcStart, *srcEnd, *srcClose; - char *dstStart, *dstEnd; + const char *dstStart, *dstEnd; int state, result, numChars; - TableEncodingData *tableDataPtr; - char *tablePrefixBytes; - unsigned short **tableFromUnicode; + const TableEncodingData *tableDataPtr; + const char *tablePrefixBytes; + const unsigned short *const *tableFromUnicode; result = TCL_OK; @@ -3236,7 +3260,8 @@ EscapeFromUtfProc( encodingPtr = GetTableEncoding(dataPtr, state); tableDataPtr = encodingPtr->clientData; tablePrefixBytes = tableDataPtr->prefixBytes; - tableFromUnicode = tableDataPtr->fromUnicode; + tableFromUnicode = (const unsigned short *const *) + tableDataPtr->fromUnicode; for (numChars = 0; src < srcEnd; numChars++) { unsigned len; @@ -3257,7 +3282,7 @@ EscapeFromUtfProc( if ((word == 0) && (ch != 0)) { int oldState; - EscapeSubTable *subTablePtr; + const EscapeSubTable *subTablePtr; oldState = state; for (state = 0; state < dataPtr->numSubTables; state++) { @@ -3280,8 +3305,9 @@ EscapeFromUtfProc( word = tableDataPtr->fallback; } - tablePrefixBytes = tableDataPtr->prefixBytes; - tableFromUnicode = tableDataPtr->fromUnicode; + tablePrefixBytes = (const char *) tableDataPtr->prefixBytes; + tableFromUnicode = (const unsigned short *const *) + tableDataPtr->fromUnicode; /* * The state variable has the value of oldState when word is 0. @@ -3389,24 +3415,25 @@ EscapeFreeProc( if (dataPtr == NULL) { return; } + /* - * The subTables should be freed recursively in normal operation but not - * during TclFinalizeEncodingSubsystem because they are also present as a - * weak reference in the toplevel encodingTable (ie they don't have a +1 - * refcount for this), and unpredictable nuking order could remove them - * from under the following loop's feet [Bug 2891556]. + * The subTables should be freed recursively in normal operation but not + * during TclFinalizeEncodingSubsystem because they are also present as a + * weak reference in the toplevel encodingTable (i.e., they don't have a + * +1 refcount for this), and unpredictable nuking order could remove them + * from under the following loop's feet. [Bug 2891556] * - * The encodingsInitialized flag, being reset on entry to TFES, can serve - * as a "not in finalization" test. + * The encodingsInitialized flag, being reset on entry to TFES, can serve + * as a "not in finalization" test. */ - if (encodingsInitialized) - { - subTablePtr = dataPtr->subTables; - for (i = 0; i < dataPtr->numSubTables; i++) { - FreeEncoding((Tcl_Encoding) subTablePtr->encodingPtr); - subTablePtr++; - } + + if (encodingsInitialized) { + subTablePtr = dataPtr->subTables; + for (i = 0; i < dataPtr->numSubTables; i++) { + FreeEncoding((Tcl_Encoding) subTablePtr->encodingPtr); + subTablePtr++; } + } ckfree((char *) dataPtr); } @@ -3513,41 +3540,41 @@ InitializeEncodingSearchPath( { const char *bytes; int i, numDirs, numBytes; - Tcl_Obj *libPath, *encodingObj, *searchPath; + Tcl_Obj *libPathObj, *encodingObj, *searchPathObj; TclNewLiteralStringObj(encodingObj, "encoding"); - TclNewObj(searchPath); + TclNewObj(searchPathObj); Tcl_IncrRefCount(encodingObj); - Tcl_IncrRefCount(searchPath); - libPath = TclGetLibraryPath(); - Tcl_IncrRefCount(libPath); - Tcl_ListObjLength(NULL, libPath, &numDirs); + Tcl_IncrRefCount(searchPathObj); + libPathObj = TclGetLibraryPath(); + Tcl_IncrRefCount(libPathObj); + Tcl_ListObjLength(NULL, libPathObj, &numDirs); for (i = 0; i < numDirs; i++) { - Tcl_Obj *directory, *path; + Tcl_Obj *directoryObj, *pathObj; Tcl_StatBuf stat; - Tcl_ListObjIndex(NULL, libPath, i, &directory); - path = Tcl_FSJoinToPath(directory, 1, &encodingObj); - Tcl_IncrRefCount(path); - if ((0 == Tcl_FSStat(path, &stat)) && S_ISDIR(stat.st_mode)) { - Tcl_ListObjAppendElement(NULL, searchPath, path); + Tcl_ListObjIndex(NULL, libPathObj, i, &directoryObj); + pathObj = Tcl_FSJoinToPath(directoryObj, 1, &encodingObj); + Tcl_IncrRefCount(pathObj); + if ((0 == Tcl_FSStat(pathObj, &stat)) && S_ISDIR(stat.st_mode)) { + Tcl_ListObjAppendElement(NULL, searchPathObj, pathObj); } - Tcl_DecrRefCount(path); + Tcl_DecrRefCount(pathObj); } - Tcl_DecrRefCount(libPath); + Tcl_DecrRefCount(libPathObj); Tcl_DecrRefCount(encodingObj); *encodingPtr = libraryPath.encoding; if (*encodingPtr) { ((Encoding *)(*encodingPtr))->refCount++; } - bytes = Tcl_GetStringFromObj(searchPath, &numBytes); + bytes = Tcl_GetStringFromObj(searchPathObj, &numBytes); *lengthPtr = numBytes; *valuePtr = ckalloc((unsigned) numBytes + 1); memcpy(*valuePtr, bytes, (size_t) numBytes + 1); - Tcl_DecrRefCount(searchPath); + Tcl_DecrRefCount(searchPathObj); } /* @@ -3557,4 +3584,3 @@ InitializeEncodingSearchPath( * fill-column: 78 * End: */ - -- cgit v0.12 From efd8d84c13dfd2bde1cc1fbb9ede4094ac9afe99 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Feb 2010 13:41:32 +0000 Subject: NRE-enabled destructors! Also more generation of errorcodes. --- ChangeLog | 5 ++++ generic/tclOOBasic.c | 66 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61a7efa..40b8a15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-02-05 Donal K. Fellows + * generic/tclOOBasic.c (TclOO_Object_Destroy): Rewrote to be NRE-aware + when calling destructors. Note that there is no guarantee that + destructors will always be called in an NRE context; that's a feature + of the 'destroy' method only. + * generic/tclEncoding.c: Add 'const' to many function-internal vars that are never pointing to things that are written to. diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 2c42fe9..b26061e 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.23 2010/02/02 09:13:45 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.24 2010/02/05 13:41:33 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -19,6 +19,8 @@ #include "tclOOInt.h" static inline Tcl_Object *AddConstructionFinalizer(Tcl_Interp *interp); +static int AfterNRDestructor(ClientData data[], + Tcl_Interp *interp, int result); static int FinalizeConstruction(ClientData data[], Tcl_Interp *interp, int result); static int FinalizeEval(ClientData data[], @@ -116,6 +118,7 @@ TclOO_Class_Create( objv[Tcl_ObjectContextSkippedArgs(context)], &len); if (len == 0) { Tcl_AppendResult(interp, "object name must not be empty", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL); return TCL_ERROR; } @@ -178,12 +181,14 @@ TclOO_Class_CreateNs( objv[Tcl_ObjectContextSkippedArgs(context)], &len); if (len == 0) { Tcl_AppendResult(interp, "object name must not be empty", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL); return TCL_ERROR; } nsName = Tcl_GetStringFromObj( objv[Tcl_ObjectContextSkippedArgs(context)+1], &len); if (len == 0) { Tcl_AppendResult(interp, "namespace name must not be empty", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL); return TCL_ERROR; } @@ -260,30 +265,44 @@ TclOO_Object_Destroy( Tcl_Obj *const *objv) /* The actual arguments. */ { Object *oPtr = (Object *) Tcl_ObjectContextObject(context); - int result = TCL_OK; + CallContext *contextPtr; if (objc != Tcl_ObjectContextSkippedArgs(context)) { Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv, NULL); return TCL_ERROR; } - AddRef(oPtr); if (!(oPtr->flags & DESTRUCTOR_CALLED)) { - CallContext *contextPtr = - TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); - oPtr->flags |= DESTRUCTOR_CALLED; + contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); if (contextPtr != NULL) { contextPtr->callPtr->flags |= DESTRUCTOR; contextPtr->skip = 0; - result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, - contextPtr, 0, NULL); - TclOODeleteContext(contextPtr); + AddRef(oPtr); + TclNRAddCallback(interp, AfterNRDestructor, oPtr, contextPtr, + NULL, NULL); + return TclOOInvokeContext(contextPtr, interp, 0, NULL); } } if (oPtr->command) { Tcl_DeleteCommandFromToken(interp, oPtr->command); } + return TCL_OK; +} + +static int +AfterNRDestructor( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + Object *oPtr = data[0]; + CallContext *contextPtr = data[1]; + + TclOODeleteContext(contextPtr); + if (oPtr->command) { + Tcl_DeleteCommandFromToken(interp, oPtr->command); + } DelRef(oPtr); return result; } @@ -371,18 +390,17 @@ FinalizeEval( { if (result == TCL_ERROR) { Object *oPtr = data[0]; + const char *namePtr; if (oPtr) { - Tcl_Obj *objnameObj = TclOOObjectName(interp, oPtr); - - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (in \"%s eval\" script line %d)", - TclGetString(objnameObj), Tcl_GetErrorLine(interp))); + namePtr = TclGetString(TclOOObjectName(interp, oPtr)); } else { - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n (in \"my eval\" script line %d)", - Tcl_GetErrorLine(interp))); + namePtr = "my"; } + + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (in \"%s eval\" script line %d)", + namePtr, Tcl_GetErrorLine(interp))); } /* @@ -443,6 +461,8 @@ TclOO_Object_Unknown( } else { Tcl_AppendResult(interp, "\" has no methods", NULL); } + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[skip]), NULL); return TCL_ERROR; } @@ -459,6 +479,8 @@ TclOO_Object_Unknown( } Tcl_AppendResult(interp, methodNames[i], NULL); ckfree((char *) methodNames); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[skip]), NULL); return TCL_ERROR; } @@ -514,6 +536,7 @@ TclOO_Object_LinkVar( if (strstr(varName, "::") != NULL) { Tcl_AppendResult(interp, "variable name \"", varName, "\" illegal: must not contain namespace separator", NULL); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "INVERTED", NULL); return TCL_ERROR; } @@ -542,6 +565,7 @@ TclOO_Object_LinkVar( TclVarErrMsg(interp, varName, NULL, "define", "name refers to an element in an array"); + Tcl_SetErrorCode(interp, "TCL", "UPVAR", "LOCAL_ELEMENT", NULL); return TCL_ERROR; } @@ -621,6 +645,8 @@ TclOO_Object_VarName( } if (varPtr == NULL) { + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARIABLE", + TclGetString(objv[objc-1]), NULL); return TCL_ERROR; } @@ -684,6 +710,7 @@ TclOONextObjCmd( if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) { Tcl_AppendResult(interp, TclGetString(objv[0]), " may only be called from inside a method", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); return TCL_ERROR; } context = framePtr->clientData; @@ -751,6 +778,7 @@ TclOOSelfObjCmd( if (framePtr == NULL || !(framePtr->isProcCallFrame & FRAME_IS_METHOD)) { Tcl_AppendResult(interp, TclGetString(objv[0]), " may only be called from inside a method", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); return TCL_ERROR; } @@ -784,6 +812,7 @@ TclOOSelfObjCmd( if (clsPtr == NULL) { Tcl_AppendResult(interp, "method not defined by a class", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); return TCL_ERROR; } @@ -803,6 +832,7 @@ TclOOSelfObjCmd( case SELF_FILTER: if (!CurrentlyInvoked(contextPtr).isFilter) { Tcl_AppendResult(interp, "not inside a filtering context", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); return TCL_ERROR; } else { register struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr); @@ -828,6 +858,7 @@ TclOOSelfObjCmd( if ((framePtr->callerVarPtr == NULL) || !(framePtr->callerVarPtr->isProcCallFrame & FRAME_IS_METHOD)){ Tcl_AppendResult(interp, "caller is not an object", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "CONTEXT_REQUIRED", NULL); return TCL_ERROR; } else { CallContext *callerPtr = framePtr->callerVarPtr->clientData; @@ -894,6 +925,7 @@ TclOOSelfObjCmd( case SELF_TARGET: if (!CurrentlyInvoked(contextPtr).isFilter) { Tcl_AppendResult(interp, "not inside a filtering context", NULL); + Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL); return TCL_ERROR; } else { Method *mPtr; -- cgit v0.12 From 66b1b7dda9580db59b81a9fe27b553015e5a65bd Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Feb 2010 14:33:07 +0000 Subject: More consistency in errorcode generation. --- ChangeLog | 2 ++ generic/tclVar.c | 39 +++++++++++++++++++++++++-------------- tests/cmdAH.test | 4 ++-- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40b8a15..0ad5239 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-02-05 Donal K. Fellows + * generic/tclVar.c: More consistency in errorcode generation. + * generic/tclOOBasic.c (TclOO_Object_Destroy): Rewrote to be NRE-aware when calling destructors. Note that there is no guarantee that destructors will always be called in an NRE context; that's a feature diff --git a/generic/tclVar.c b/generic/tclVar.c index 1848fff..79409b4 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.194 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.195 2010/02/05 14:33:09 dkf Exp $ */ #include "tclInt.h" @@ -713,7 +713,8 @@ TclObjLookupVarEx( if (varPtr == NULL) { if ((errMsg != NULL) && (flags & TCL_LEAVE_ERR_MSG)) { TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, errMsg, -1); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + TclGetString(part1Ptr), NULL); } if (newPart2) { Tcl_DecrRefCount(part2Ptr); @@ -771,7 +772,8 @@ TclObjLookupVarEx( part1 = TclGetString(part1Ptr); TclObjVarErrMsg(interp, part1Ptr, part2Ptr, msg, "cached variable reference is NULL.", -1); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + TclGetString(part1Ptr), NULL); } return NULL; } @@ -1115,7 +1117,8 @@ TclLookupArrayElement( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, noSuchVar, index); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + arrayNamePtr?TclGetString(arrayNamePtr):NULL, NULL); } return NULL; } @@ -1129,7 +1132,8 @@ TclLookupArrayElement( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, danglingVar, index); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + arrayNamePtr?TclGetString(arrayNamePtr):NULL, NULL); } return NULL; } @@ -1148,7 +1152,8 @@ TclLookupArrayElement( if (flags & TCL_LEAVE_ERR_MSG) { TclObjVarErrMsg(interp, arrayNamePtr, elNamePtr, msg, needArray, index); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + arrayNamePtr?TclGetString(arrayNamePtr):NULL, NULL); } return NULL; } @@ -2863,7 +2868,8 @@ TclArraySet( if (arrayPtr) { CleanupVar(varPtr, arrayPtr); TclObjVarErrMsg(interp, arrayNameObj, NULL, "set", needArray, -1); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + TclGetString(arrayNameObj), NULL); return TCL_ERROR; } @@ -3065,7 +3071,7 @@ ArrayStartSearchCmd( if ((varPtr == NULL) || !TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", varName, "\" isn't an array", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", varName, NULL); return TCL_ERROR; } @@ -3164,7 +3170,8 @@ ArrayAnyMoreCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", + TclGetString(varNameObj), NULL); return TCL_ERROR; } @@ -3269,7 +3276,8 @@ ArrayNextElementCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", + TclGetString(varNameObj), NULL); return TCL_ERROR; } @@ -3378,7 +3386,8 @@ ArrayDoneSearchCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", + TclGetString(varNameObj), NULL); return TCL_ERROR; } @@ -4020,7 +4029,8 @@ ArrayStatsCmd( || TclIsVarUndefined(varPtr)) { Tcl_AppendResult(interp, "\"", TclGetString(varNameObj), "\" isn't an array", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", + TclGetString(varNameObj), NULL); return TCL_ERROR; } @@ -4438,7 +4448,8 @@ TclPtrObjMakeUpvar( myFlags|AVOID_RESOLVERS, /* create */ 1, &errMsg, &index); if (varPtr == NULL) { TclObjVarErrMsg(interp, myNamePtr, NULL, "create", errMsg, -1); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "VARNAME", + TclGetString(myNamePtr), NULL); return TCL_ERROR; } } @@ -5059,7 +5070,7 @@ SetArraySearchObj( syntax: Tcl_AppendResult(interp, "illegal search identifier \"", string, "\"", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAYSEARCH", string, NULL); return TCL_ERROR; } diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 182d43b..f7ba584 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdAH.test,v 1.67 2009/12/28 12:55:48 dkf Exp $ +# RCS: @(#) $Id: cmdAH.test,v 1.68 2010/02/05 14:33:09 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -1051,7 +1051,7 @@ test cmdAH-23.6 {Tcl_FileObjCmd: lstat errors} -setup { } -body { set x 44 list [catch {file lstat $gorpfile x} msg] $msg $errorCode -} -result {1 {can't set "x(dev)": variable isn't array} {TCL LOOKUP VARNAME}} +} -result {1 {can't set "x(dev)": variable isn't array} {TCL LOOKUP VARNAME x}} catch {unset stat} # mkdir set dirA [file join [temporaryDirectory] a] -- cgit v0.12 From 9f80e538be5be980c7e52789ff2162b08db46823 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 5 Feb 2010 20:53:12 +0000 Subject: Follow-up to earlier commit today: Eliminate the need for an extra Stubs Pointer for adressing a static stub table: Just change the exported table from static to MODULE_SCOPE. --- ChangeLog | 14 ++++++++++++++ generic/tclBasic.c | 8 ++++---- generic/tclOO.c | 6 +++--- generic/tclOOStubInit.c | 14 ++++++-------- generic/tclStubInit.c | 31 +++++++++++-------------------- generic/tclTest.c | 6 +++--- generic/tclTomMathInterface.c | 6 +++--- tools/genStubs.tcl | 21 ++++++++++++++++++--- 8 files changed, 62 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ad5239..78963fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-02-05 Jan Nijtmans + + * tools/genStubs.tcl: Follow-up to earlier commit today: + Eliminate the need for an extra Stubs Pointer + for adressing a static stub table: Just change + the exported table from static to MODULE_SCOPE. + * generic/tclBasic.c + * generic/tclOO.c + * generic/tclTomMathInterface.c + * generic/tcl*Decls.h (regenerated) + * generic/tclStubInit.c (regenerated) + * generic/tclOOStubInit.c (regenerated) + * generic/tclTest.c (minor formatting) + 2010-02-05 Donal K. Fellows * generic/tclVar.c: More consistency in errorcode generation. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 08414c8..c2a8363 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.440 2010/02/02 16:12:00 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.441 2010/02/05 20:53:12 nijtmans Exp $ */ #include "tclInt.h" @@ -167,7 +167,7 @@ static Tcl_NRPostProc TEOV_RestoreVarFrame; static Tcl_NRPostProc TEOV_RunLeaveTraces; static Tcl_NRPostProc YieldToCallback; -MODULE_SCOPE const TclStubs *const tclConstStubsPtr; +MODULE_SCOPE const TclStubs tclConstStubs; /* * The following structure define the commands in the Tcl core. @@ -677,7 +677,7 @@ Tcl_CreateInterp(void) * Initialise the stub table pointer. */ - iPtr->stubTable = tclConstStubsPtr; + iPtr->stubTable = &tclConstStubs; /* * Initialize the ensemble error message rewriting support. @@ -906,7 +906,7 @@ Tcl_CreateInterp(void) */ Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, - (ClientData) tclConstStubsPtr); + (ClientData) &tclConstStubs); if (TclTommath_Init(interp) != TCL_OK) { Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); diff --git a/generic/tclOO.c b/generic/tclOO.c index c7bab53..f52ff35 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.29 2010/02/02 09:51:47 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.30 2010/02/05 20:53:12 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -136,7 +136,7 @@ static char initScript[] = /* "tcl_findLibrary tcloo $oo::version $oo::version" */ /* " tcloo.tcl OO_LIBRARY oo::library;"; */ -MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; +MODULE_SCOPE const TclOOStubs tclOOConstStubs; /* * Convenience macro for getting the foundation from an interpreter. @@ -182,7 +182,7 @@ TclOOInit( } return Tcl_PkgProvideEx(interp, "TclOO", TCLOO_VERSION, - (ClientData) tclOOConstStubPtr); + (ClientData) &tclOOConstStubs); } /* diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index 3039aa2..0ed32b2 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubInit.c,v 1.8 2010/01/25 20:26:18 nijtmans Exp $ + * $Id: tclOOStubInit.c,v 1.9 2010/02/05 20:53:12 nijtmans Exp $ * * This file is (mostly) automatically generated from tclOO.decls. * It is compiled and linked in with the tclOO package proper. @@ -10,9 +10,11 @@ #endif #include "tclOOInt.h" +MODULE_SCOPE const TclOOStubs tclOOConstStubs; + /* !BEGIN!: Do not edit below this line. */ -static const TclOOIntStubs tclOOIntStubs = { +static const TclOOIntStubs tclOOIntConstStubs = { TCL_STUB_MAGIC, NULL, TclOOGetDefineCmdContext, /* 0 */ @@ -34,10 +36,10 @@ static const TclOOIntStubs tclOOIntStubs = { }; static const TclOOStubHooks tclOOStubHooks = { - &tclOOIntStubs + &tclOOIntConstStubs }; -static const TclOOStubs tclOOStubs = { +const TclOOStubs tclOOConstStubs = { TCL_STUB_MAGIC, &tclOOStubHooks, Tcl_CopyObjectInstance, /* 0 */ @@ -72,7 +74,3 @@ static const TclOOStubs tclOOStubs = { }; /* !END!: Do not edit above this line. */ - -MODULE_SCOPE const TclOOStubs * const tclOOConstStubPtr; -const TclOOStubs * const tclOOConstStubPtr = &tclOOStubs; - diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 40b5e89..7314c94 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.185 2009/09/24 17:19:18 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.186 2010/02/05 20:53:12 nijtmans Exp $ */ #include "tclInt.h" @@ -41,9 +41,11 @@ * below should be made in the generic/tcl.decls script. */ +MODULE_SCOPE const TclStubs tclConstStubs; + /* !BEGIN!: Do not edit below this line. */ -static const TclIntStubs tclIntStubs = { +static const TclIntStubs tclIntConstStubs = { TCL_STUB_MAGIC, NULL, NULL, /* 0 */ @@ -296,7 +298,7 @@ static const TclIntStubs tclIntStubs = { TclResetRewriteEnsemble, /* 247 */ }; -static const TclIntPlatStubs tclIntPlatStubs = { +static const TclIntPlatStubs tclIntPlatConstStubs = { TCL_STUB_MAGIC, NULL, #if !defined(__WIN32__) && !defined(MAC_OSX_TCL) /* UNIX */ @@ -372,7 +374,7 @@ static const TclIntPlatStubs tclIntPlatStubs = { #endif /* MACOSX */ }; -static const TclPlatStubs tclPlatStubs = { +static const TclPlatStubs tclPlatConstStubs = { TCL_STUB_MAGIC, NULL, #ifdef __WIN32__ /* WIN */ @@ -385,7 +387,7 @@ static const TclPlatStubs tclPlatStubs = { #endif /* MACOSX */ }; -static const TclTomMathStubs tclTomMathStubs = { +const TclTomMathStubs tclTomMathConstStubs = { TCL_STUB_MAGIC, NULL, TclBN_epoch, /* 0 */ @@ -452,12 +454,12 @@ static const TclTomMathStubs tclTomMathStubs = { }; static const TclStubHooks tclStubHooks = { - &tclPlatStubs, - &tclIntStubs, - &tclIntPlatStubs + &tclPlatConstStubs, + &tclIntConstStubs, + &tclIntPlatConstStubs }; -static const TclStubs tclStubs = { +const TclStubs tclConstStubs = { TCL_STUB_MAGIC, &tclStubHooks, Tcl_PkgProvideEx, /* 0 */ @@ -1114,14 +1116,3 @@ static const TclStubs tclStubs = { }; /* !END!: Do not edit above this line. */ - -/* - * Module-scope pointers to the main static stubs tables, used for package - * initialization via Tcl_PkgProvideEx(). - */ - -MODULE_SCOPE const TclStubs * const tclConstStubsPtr; -MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; - -const TclStubs * const tclConstStubsPtr = &tclStubs; -const TclTomMathStubs * const tclTomMathConstStubsPtr = &tclTomMathStubs; diff --git a/generic/tclTest.c b/generic/tclTest.c index 192e7e2..793dccc 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.143 2009/12/16 23:26:01 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.144 2010/02/05 20:53:12 nijtmans Exp $ */ #undef STATIC_BUILD @@ -2227,7 +2227,7 @@ ExitProcOdd( sprintf(buf, "odd %d\n", PTR2INT(clientData)); len = strlen(buf); if (len != (size_t) write(1, buf, len)) { - Tcl_Panic("ExitProcOdd: unable to write to stdout"); + Tcl_Panic("ExitProcOdd: unable to write to stdout"); } } @@ -2241,7 +2241,7 @@ ExitProcEven( sprintf(buf, "even %d\n", PTR2INT(clientData)); len = strlen(buf); if (len != (size_t) write(1, buf, len)) { - Tcl_Panic("ExitProcEven: unable to write to stdout"); + Tcl_Panic("ExitProcEven: unable to write to stdout"); } } diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index ddd5908..2c03346 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -11,14 +11,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathInterface.c,v 1.11 2008/04/16 14:49:29 das Exp $ + * RCS: @(#) $Id: tclTomMathInterface.c,v 1.12 2010/02/05 20:53:12 nijtmans Exp $ */ #include "tclInt.h" #include "tommath.h" #include -MODULE_SCOPE const TclTomMathStubs * const tclTomMathConstStubsPtr; +MODULE_SCOPE const TclTomMathStubs tclTomMathConstStubs; /* *---------------------------------------------------------------------- @@ -45,7 +45,7 @@ TclTommath_Init( /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvideEx(interp, "tcl::tommath", TCL_PATCH_LEVEL, - (ClientData) tclTomMathConstStubsPtr) != TCL_OK) { + (ClientData) &tclTomMathConstStubs) != TCL_OK) { return TCL_ERROR; } return TCL_OK; diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index b76285f..0e4ba79 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.35 2010/02/05 10:03:24 nijtmans Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.36 2010/02/05 20:53:12 nijtmans Exp $ package require Tcl 8.4 @@ -972,7 +972,9 @@ proc genStubs::emitHeader {name} { proc genStubs::emitInit {name textVar} { variable stubs variable hooks + variable interfaces upvar $textVar text + set root 1 set capName [string toupper [string index $name 0]] append capName [string range $name 1 end] @@ -981,12 +983,25 @@ proc genStubs::emitInit {name textVar} { append text "\nstatic const ${capName}StubHooks ${name}StubHooks = \{\n" set sep " " foreach sub $hooks($name) { - append text $sep "&${sub}Stubs" + append text $sep "&${sub}ConstStubs" set sep ",\n " } append text "\n\};\n" } - append text "\nstatic const ${capName}Stubs ${name}Stubs = \{\n" + foreach intf [array names interfaces] { + if {[info exists hooks($intf)]} { + if {$name in $hooks($intf)} { + set root 0 + break; + } + } + } + + if {$root} { + append text "\nconst ${capName}Stubs ${name}ConstStubs = \{\n" + } else { + append text "\nstatic const ${capName}Stubs ${name}ConstStubs = \{\n" + } append text " TCL_STUB_MAGIC,\n" if {[info exists hooks($name)]} { append text " &${name}StubHooks,\n" -- cgit v0.12 From a7d5e487cdc90cf70ddff97143b7357800b9388d Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Feb 2010 22:39:44 +0000 Subject: Added basic compilation of [error] (the most common case only). --- ChangeLog | 11 ++++++++--- generic/tclBasic.c | 4 ++-- generic/tclCompCmds.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- generic/tclInt.h | 5 ++++- 4 files changed, 60 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78963fe..045d394 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,14 @@ +2010-02-05 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileErrorCmd): Added compilation of the + [error] command. No new bytecodes. + 2010-02-05 Jan Nijtmans * tools/genStubs.tcl: Follow-up to earlier commit today: - Eliminate the need for an extra Stubs Pointer - for adressing a static stub table: Just change - the exported table from static to MODULE_SCOPE. + Eliminate the need for an extra Stubs Pointer for adressing + a static stub table: Just change the exported table from + static to MODULE_SCOPE. * generic/tclBasic.c * generic/tclOO.c * generic/tclTomMathInterface.c diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c2a8363..7eb8359 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.441 2010/02/05 20:53:12 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.442 2010/02/05 22:39:44 dkf Exp $ */ #include "tclInt.h" @@ -202,7 +202,7 @@ static const CmdInfo builtInCmds[] = { {"concat", Tcl_ConcatObjCmd, NULL, NULL, 1}, {"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, NULL, 1}, {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1}, - {"error", Tcl_ErrorObjCmd, NULL, NULL, 1}, + {"error", Tcl_ErrorObjCmd, TclCompileErrorCmd, NULL, 1}, {"eval", Tcl_EvalObjCmd, NULL, NULL, 1}, {"expr", Tcl_ExprObjCmd, TclCompileExprCmd, TclNRExprObjCmd, 1}, {"for", Tcl_ForObjCmd, TclCompileForCmd, TclNRForObjCmd, 1}, diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 5455e5d..2b59d5c 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.158 2010/01/30 16:33:25 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.159 2010/02/05 22:39:44 dkf Exp $ */ #include "tclInt.h" @@ -1374,6 +1374,51 @@ PrintDictUpdateInfo( /* *---------------------------------------------------------------------- * + * TclCompileErrorCmd -- + * + * Procedure called to compile the "error" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "error" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileErrorCmd( + Tcl_Interp *interp, /* Used for context. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + /* + * General syntax: [error message ?errorInfo? ?errorCode?] + * However, we only deal with the case where there is just a message. + */ + Tcl_Token *messageTokenPtr; + DefineLineInformation; /* TIP #280 */ + + if (parsePtr->numWords != 2) { + return TCL_ERROR; + } + messageTokenPtr = TokenAfter(parsePtr->tokenPtr); + + PushLiteral(envPtr, "-code error -level 0", 20); + CompileWord(envPtr, messageTokenPtr, interp, 1); + TclEmitOpcode(INST_RETURN_STK, envPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclCompileExprCmd -- * * Procedure called to compile the "expr" command. diff --git a/generic/tclInt.h b/generic/tclInt.h index d08ed12..0e98299 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.458 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.459 2010/02/05 22:39:44 dkf Exp $ */ #ifndef _TCLINT @@ -3318,6 +3318,9 @@ MODULE_SCOPE int TclCompileDictUpdateCmd(Tcl_Interp *interp, MODULE_SCOPE int TclCompileEnsemble(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); +MODULE_SCOPE int TclCompileErrorCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, Command *cmdPtr, + struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileExprCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -- cgit v0.12 From 307233f5f049dea251e0d858e301565c0ed88117 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 7 Feb 2010 08:03:11 +0000 Subject: Fix tests with known dependencies on hash iteration order. --- tests/chanio.test | 9 +++++---- tests/io.test | 4 ++-- tests/load.test | 12 ++++++++---- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 729b436..c1dba49 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: chanio.test,v 1.22 2009/11/19 21:17:36 nijtmans Exp $ +# RCS: @(#) $Id: chanio.test,v 1.23 2010/02/07 08:03:11 dkf Exp $ if {[catch {package require tcltest 2}]} { chan puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -2115,8 +2115,9 @@ test chan-io-28.4 {Tcl_Chan Close} {testchannel} { $consoleFileNames] string compare $l $x } 0 -test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel openpipe} { +test chan-io-28.5 {Tcl_Chan Close vs standard handles} -setup { file delete $path(script) +} -constraints {stdio unix testchannel openpipe} -body { set f [open $path(script) w] chan puts $f { chan close stdin @@ -2126,8 +2127,8 @@ test chan-io-28.5 {Tcl_Chan Close vs standard handles} {stdio unix testchannel o set f [open "|[list [interpreter] $path(script)]" r] set l [chan gets $f] chan close $f - set l -} {file1 file2} + lsort $l +} -result {file1 file2} test chan-io-28.6 {Tcl_CloseEx (half-close) pipe} -setup { set cat [makeFile { fconfigure stdout -buffering line diff --git a/tests/io.test b/tests/io.test index 2b08454..c69bff9 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.95 2009/11/20 00:19:46 dgp Exp $ +# RCS: @(#) $Id: io.test,v 1.96 2010/02/07 08:03:11 dkf Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -2222,7 +2222,7 @@ test io-28.5 {Tcl_Close vs standard handles} {stdio unix testchannel openpipe} { set f [open "|[list [interpreter] $path(script)]" r] set l [gets $f] close $f - set l + lsort $l } {file1 file2} test io-29.1 {Tcl_WriteChars, channel not writable} { diff --git a/tests/load.test b/tests/load.test index dd3d011..8ecdaf5 100644 --- a/tests/load.test +++ b/tests/load.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: load.test,v 1.19 2007/12/13 15:26:06 dgp Exp $ +# RCS: @(#) $Id: load.test,v 1.20 2010/02/07 08:03:11 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -43,7 +43,7 @@ testConstraint teststaticpkg [llength [info commands teststaticpkg]] testConstraint testsimplefilesystem \ [llength [info commands testsimplefilesystem]] - + test load-1.1 {basic errors} {} { list [catch {load} msg] $msg } "1 {wrong \# args: should be \"load fileName ?packageName? ?interp?\"}" @@ -66,7 +66,7 @@ test load-1.6 {basic errors} {} { test load-2.1 {basic loading, with guess for package name} \ [list $dll $loaded] { load [file join $testDir pkga$ext] - list [pkga_eq abc def] [info commands pkga_*] + list [pkga_eq abc def] [lsort [info commands pkga_*]] } {0 {pkga_eq pkga_quote}} interp create -safe child test load-2.2 {loading into a safe interpreter, with package name conversion} \ @@ -206,8 +206,12 @@ test load-10.1 {load from vfs} \ -body {list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg} \ -result {0 {}} \ -cleanup {testsimplefilesystem 0; cd $dir; unset dir} - + # cleanup unset ext ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From baafc87e3c7fe20ed29437a7e7b44f9f06f4e974 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 7 Feb 2010 09:10:32 +0000 Subject: Upgrade Tcl's hash function to use the FNV-32 algorithm. This is marginally faster and gives a bit better distribution of keys (especially in large hash tables) but does change hash iteration order. --- ChangeLog | 17 +++++++++++++++++ generic/tclHash.c | 33 +++++++++++++-------------------- generic/tclObj.c | 35 +++++++++++++++-------------------- generic/tclVar.c | 38 ++------------------------------------ 4 files changed, 47 insertions(+), 76 deletions(-) diff --git a/ChangeLog b/ChangeLog index 045d394..ce3e2dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2010-02-06 Donal K. Fellows + + * generic/tclHash.c (HashStringKey): Replace Tcl's crusty old hash + * generic/tclObj.c (TclHashObjKey): function with the algorithm + due to Fowler, Noll and Vo. This is slightly faster (assuming the + presence of hardware multiply) and has somewhat better distribution + properties of the resulting hash values. Note that we only ever used + the 32-bit version of the FNV algorithm; Tcl's core hash engine + assumes that hash values are simple unsigned ints. + + ***POTENTIAL INCOMPATIBILITY*** + Code that depends on hash iteration order (especially tests) may well + be disrupted by this. Where a definite order is required, the fix is + usually to just sort the results after extracting them from the hash. + Where this is insufficient, the code that has ceased working was + always wrong and was only working by chance. + 2010-02-05 Donal K. Fellows * generic/tclCompCmds.c (TclCompileErrorCmd): Added compilation of the diff --git a/generic/tclHash.c b/generic/tclHash.c index 9ed941e..f3c4b3a 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.39 2009/07/16 21:24:39 dgp Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.40 2010/02/07 09:10:33 dkf Exp $ */ #include "tclInt.h" @@ -866,36 +866,29 @@ CompareStringKeys( *---------------------------------------------------------------------- */ -static unsigned int +static unsigned HashStringKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { register const char *string = (const char *) keyPtr; - register unsigned int result; + register unsigned result = 0; register int c; /* - * I tried a zillion different hash functions and asked many other people - * for advice. Many people had their own favorite functions, all - * different, but no-one had much idea why they were good ones. I chose - * the one below (multiply by 9 and add new character) because of the - * following reasons: + * This is the (32-bit) Fowler/Noll/Vo hash algorithm. This has the + * property of being a reasonably good non-cryptographic hash function for + * short string words, i.e., virtually all command and namespace names. It + * is also faster than Tcl's original algorithm on Intel x86, where there + * is a fast built-in multiply assembly instruction. * - * 1. Multiplying by 10 is perfect for keys that are decimal strings, and - * multiplying by 9 is just about as good. - * 2. Times-9 is (shift-left-3) plus (old). This means that each - * character's bits hang around in the low-order bits of the hash value - * for ever, plus they spread fairly rapidly up to the high-order bits - * to fill out the hash value. This seems works well both for decimal - * and non-decimal strings, but isn't strong against maliciously-chosen - * keys. + * Derived from Public Domain implementation by Landon Curt Noll at: + * http://www.isthe.com/chongo/src/fnv/hash_32.c */ - result = 0; - - for (c=*string++ ; c ; c=*string++) { - result += (result<<3) + c; +#define FNV_32_PRIME ((unsigned) 0x01000193) + while ((c=*string++)) { + result = (result * FNV_32_PRIME) ^ c; } return result; } diff --git a/generic/tclObj.c b/generic/tclObj.c index 28d7a8a..6287b24 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.166 2009/12/29 16:54:44 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.167 2010/02/07 09:10:33 dkf Exp $ */ #include "tclInt.h" @@ -4037,30 +4037,25 @@ TclHashObjKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - Tcl_Obj *objPtr = (Tcl_Obj *) keyPtr; - const char *string = TclGetString(objPtr); - int length = objPtr->length; - unsigned int result = 0; - int i; + Tcl_Obj *objPtr = keyPtr; + register unsigned result = 0; + const unsigned char *string = (unsigned char *) TclGetString(objPtr); + const unsigned char *last = string + objPtr->length; /* - * I tried a zillion different hash functions and asked many other people - * for advice. Many people had their own favorite functions, all - * different, but no-one had much idea why they were good ones. I chose - * the one below (multiply by 9 and add new character) because of the - * following reasons: + * This is the (32-bit) Fowler/Noll/Vo hash algorithm. This has the + * property of being a reasonably good non-cryptographic hash function for + * short string words, i.e., virtually all names used in practice. It is + * also faster than Tcl's original algorithm on Intel x86, where there is + * a fast built-in multiply assembly instruction. * - * 1. Multiplying by 10 is perfect for keys that are decimal strings, and - * multiplying by 9 is just about as good. - * 2. Times-9 is (shift-left-3) plus (old). This means that each - * character's bits hang around in the low-order bits of the hash value - * for ever, plus they spread fairly rapidly up to the high-order bits - * to fill out the hash value. This seems works well both for decimal - * and *non-decimal strings. + * Derived from Public Domain implementation by Landon Curt Noll at: + * http://www.isthe.com/chongo/src/fnv/hash_32.c */ - for (i=0 ; ilength; - register unsigned result = 0; - int i; - - /* - * I tried a zillion different hash functions and asked many other people - * for advice. Many people had their own favorite functions, all - * different, but no-one had much idea why they were good ones. I chose - * the one below (multiply by 9 and add new character) because of the - * following reasons: - * - * 1. Multiplying by 10 is perfect for keys that are decimal strings, and - * multiplying by 9 is just about as good. - * 2. Times-9 is (shift-left-3) plus (old). This means that each - * character's bits hang around in the low-order bits of the hash value - * for ever, plus they spread fairly rapidly up to the high-order bits - * to fill out the hash value. This seems works well both for decimal - * and non-decimal strings. - */ - - for (i=0 ; i Date: Mon, 8 Feb 2010 13:21:41 +0000 Subject: [Bug 2947783]: Ensure that result is an unshared object before appending to it. --- ChangeLog | 7 +++++++ generic/tclZlib.c | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ce3e2dc..e82b91a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-02-08 Donal K. Fellows + + * generic/tclZlib.c (Tcl_ZlibDeflate, Tcl_ZlibInflate): [Bug 2947783]: + Make sure that the result is an unshared object before appending to it + so that nothing crashes if it is shared (use in Tcl code was not + affected by this, but use from C was an issue). + 2010-02-06 Donal K. Fellows * generic/tclHash.c (HashStringKey): Replace Tcl's crusty old hash diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 2ae12c0..f43f704 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.32 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.33 2010/02/08 13:21:42 dkf Exp $ */ #include "tclInt.h" @@ -1316,6 +1316,15 @@ Tcl_ZlibDeflate( obj = Tcl_GetObjResult(interp); /* + * Make sure that the result is an unshared object. [Bug 2947783] + */ + + if (Tcl_IsShared(obj)) { + obj = Tcl_DuplicateObj(obj); + Tcl_SetObjResult(interp, obj); + } + + /* * Compressed format is specified by the wbits parameter. See zlib.h for * details. */ @@ -1469,6 +1478,15 @@ Tcl_ZlibInflate( obj = Tcl_GetObjResult(interp); /* + * Make sure that the result is an unshared object. [Bug 2947783] + */ + + if (Tcl_IsShared(obj)) { + obj = Tcl_DuplicateObj(obj); + Tcl_SetObjResult(interp, obj); + } + + /* * Compressed format is specified by the wbits parameter. See zlib.h for * details. */ -- cgit v0.12 From de52610ec95e0587e5dd343c2fe170a1ddebb000 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 9 Feb 2010 14:05:42 +0000 Subject: remove dependency on 8.5+ idiom "in" in expressions --- ChangeLog | 5 +++++ tools/genStubs.tcl | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e82b91a..0664c23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-09 Alexandre Ferrieux + + * tools/genStubs.tcl: remove dependency on 8.5+ idiom "in" in + expressions. + 2010-02-08 Donal K. Fellows * generic/tclZlib.c (Tcl_ZlibDeflate, Tcl_ZlibInflate): [Bug 2947783]: diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 0e4ba79..ffbb9c3 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.36 2010/02/05 20:53:12 nijtmans Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.37 2010/02/09 14:05:43 ferrieux Exp $ package require Tcl 8.4 @@ -990,7 +990,7 @@ proc genStubs::emitInit {name textVar} { } foreach intf [array names interfaces] { if {[info exists hooks($intf)]} { - if {$name in $hooks($intf)} { + if {0>[lsearch -exact $hooks($intf) $name]} { set root 0 break; } -- cgit v0.12 From c9ff0f04abcd6fbf70000f4d8e28579ffe341303 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 9 Feb 2010 14:08:53 +0000 Subject: Get the inequality right --- tools/genStubs.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index ffbb9c3..613d62f 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.37 2010/02/09 14:05:43 ferrieux Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.38 2010/02/09 14:08:53 ferrieux Exp $ package require Tcl 8.4 @@ -990,7 +990,7 @@ proc genStubs::emitInit {name textVar} { } foreach intf [array names interfaces] { if {[info exists hooks($intf)]} { - if {0>[lsearch -exact $hooks($intf) $name]} { + if {0<=[lsearch -exact $hooks($intf) $name]} { set root 0 break; } -- cgit v0.12 From 10c072cd77b0339c60b1861fe19ee8bd81eb14a0 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 9 Feb 2010 20:51:53 +0000 Subject: Compilation of [try] now enabled! --- ChangeLog | 12 +- generic/tclBasic.c | 4 +- generic/tclCompCmds.c | 641 +++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclInt.h | 5 +- 4 files changed, 657 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0664c23..695fb0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,16 @@ +2010-02-09 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileTryCmd, IssueTryInstructions) + (IssueTryFinallyInstructions): Added compiler for the [try] command. + It is split into three pieces that handle the parsing of the tokens, + the issuing of instructions for finally-free [try], and the issuing of + instructions for [try] with finally; there are enough differences + between the all cases that it was easier to split the code rather than + have a single function do the whole thing. + 2010-02-09 Alexandre Ferrieux - * tools/genStubs.tcl: remove dependency on 8.5+ idiom "in" in + * tools/genStubs.tcl: Remove dependency on 8.5+ idiom "in" in expressions. 2010-02-08 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7eb8359..97b4a5c 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.442 2010/02/05 22:39:44 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.443 2010/02/09 20:51:54 dkf Exp $ */ #include "tclInt.h" @@ -240,7 +240,7 @@ static const CmdInfo builtInCmds[] = { {"tailcall", NULL, NULL, TclNRTailcallObjCmd, 1}, {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, - {"try", Tcl_TryObjCmd, NULL, TclNRTryObjCmd, 1}, + {"try", Tcl_TryObjCmd, TclCompileTryCmd, TclNRTryObjCmd, 1}, {"unset", Tcl_UnsetObjCmd, TclCompileUnsetCmd, NULL, 1}, {"uplevel", Tcl_UplevelObjCmd, NULL, TclNRUplevelObjCmd, 1}, {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 2b59d5c..6183039 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.159 2010/02/05 22:39:44 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.160 2010/02/09 20:51:54 dkf Exp $ */ #include "tclInt.h" @@ -182,6 +182,17 @@ static int CompileUnaryOpCmd(Tcl_Interp *interp, static void CompileReturnInternal(CompileEnv *envPtr, unsigned char op, int code, int level, Tcl_Obj *returnOpts); +static int IssueTryFinallyInstructions(Tcl_Interp *interp, + CompileEnv *envPtr, Tcl_Token *bodyToken, + int numHandlers, int *matchCodes, + Tcl_Obj **matchClauses, int *resultVarIndices, + int *optionVarIndices, Tcl_Token **handlerTokens, + Tcl_Token *finallyToken); +static int IssueTryInstructions(Tcl_Interp *interp, + CompileEnv *envPtr, Tcl_Token *bodyToken, + int numHandlers, int *matchCodes, + Tcl_Obj **matchClauses, int *resultVarIndices, + int *optionVarIndices, Tcl_Token **handlerTokens); #define PushVarNameWord(i,v,e,f,l,s,sc,word) \ PushVarName(i,v,e,f,l,s,sc, \ @@ -5064,6 +5075,634 @@ PrintJumptableInfo( /* *---------------------------------------------------------------------- * + * TclCompileTryCmd -- + * + * Procedure called to compile the "try" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "try" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileTryCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + int numWords = parsePtr->numWords, numHandlers, result = TCL_ERROR; + Tcl_Token *bodyToken, *finallyToken, *tokenPtr; + Tcl_Token **handlerTokens = NULL; + Tcl_Obj **matchClauses = NULL; + int *matchCodes=NULL, *resultVarIndices=NULL, *optionVarIndices=NULL; + int i; + + if (numWords < 2) { + return TCL_ERROR; + } + + bodyToken = TokenAfter(parsePtr->tokenPtr); + + if (numWords == 2) { + /* + * No handlers or finally; do nothing beyond evaluating the body. + */ + + DefineLineInformation; /* TIP #280 */ + SetLineInformation(1); + CompileBody(envPtr, bodyToken, interp); + return TCL_OK; + } + + numWords -= 2; + tokenPtr = TokenAfter(bodyToken); + + /* + * Extract information about what handlers there are. + */ + + numHandlers = numWords >> 2; + numWords -= numHandlers * 4; + if (numHandlers > 0) { + handlerTokens = TclStackAlloc(interp, sizeof(Tcl_Token*)*numHandlers); + matchClauses = TclStackAlloc(interp, sizeof(Tcl_Obj *) * numHandlers); + memset(matchClauses, 0, sizeof(Tcl_Obj *) * numHandlers); + matchCodes = TclStackAlloc(interp, sizeof(int) * numHandlers); + resultVarIndices = TclStackAlloc(interp, sizeof(int) * numHandlers); + optionVarIndices = TclStackAlloc(interp, sizeof(int) * numHandlers); + + for (i=0 ; itype != TCL_TOKEN_SIMPLE_WORD) { + goto failedToCompile; + } + if (tokenPtr[1].size == 4 + && !strncmp(tokenPtr[1].start, "trap", 4)) { + /* + * Parse the list of errorCode words to match against. + */ + + matchCodes[i] = TCL_ERROR; + tokenPtr = TokenAfter(tokenPtr); + TclNewObj(tmpObj); + Tcl_IncrRefCount(tmpObj); + if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj) + || Tcl_ListObjLength(NULL, tmpObj, &objc) != TCL_OK + || (objc == 0)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + Tcl_ListObjReplace(NULL, tmpObj, 0, 0, 0, NULL); + matchClauses[i] = tmpObj; + } else if (tokenPtr[1].size == 2 + && !strncmp(tokenPtr[1].start, "on", 2)) { + int code; + static const char *codes[] = { + "ok", "error", "return", "break", "continue", NULL + }; + + /* + * Parse the result code to look for. + */ + + tokenPtr = TokenAfter(tokenPtr); + TclNewObj(tmpObj); + Tcl_IncrRefCount(tmpObj); + if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + if (Tcl_GetIntFromObj(NULL, tmpObj, &code) != TCL_OK + && Tcl_GetIndexFromObj(NULL, tmpObj, codes, "", + TCL_EXACT, &code) != TCL_OK) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + matchCodes[i] = code; + TclDecrRefCount(tmpObj); + } else { + goto failedToCompile; + } + + /* + * Parse the variable binding. + */ + + tokenPtr = TokenAfter(tokenPtr); + TclNewObj(tmpObj); + Tcl_IncrRefCount(tmpObj); + if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + if (Tcl_ListObjGetElements(NULL, tmpObj, &objc, &objv) != TCL_OK + || (objc > 2)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + if (objc > 0) { + int len; + const char *varname = Tcl_GetStringFromObj(objv[0], &len); + + if (!TclIsLocalScalar(varname, len)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + resultVarIndices[i] = + TclFindCompiledLocal(varname, len, 1, envPtr); + } else { + resultVarIndices[i] = -1; + } + if (objc == 2) { + int len; + const char *varname = Tcl_GetStringFromObj(objv[1], &len); + + if (!TclIsLocalScalar(varname, len)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + optionVarIndices[i] = + TclFindCompiledLocal(varname, len, 1, envPtr); + } else { + optionVarIndices[i] = -1; + } + TclDecrRefCount(tmpObj); + + /* + * Extract the body for this handler. + */ + + tokenPtr = TokenAfter(tokenPtr); + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { + goto failedToCompile; + } + if (tokenPtr[1].size == 1 && tokenPtr[1].start[0] == '-') { + handlerTokens[i] = NULL; + } else { + handlerTokens[i] = tokenPtr; + } + + tokenPtr = TokenAfter(tokenPtr); + } + + if (handlerTokens[numHandlers-1] == NULL) { + goto failedToCompile; + } + } + + /* + * Parse the finally clause + */ + + if (numWords == 0) { + finallyToken = NULL; + } else if (numWords == 2) { + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD || tokenPtr[1].size != 7 + || strncmp(tokenPtr[1].start, "finally", 7)) { + goto failedToCompile; + } + finallyToken = TokenAfter(tokenPtr); + } else { + goto failedToCompile; + } + + /* + * Issue the bytecode. + */ + + if (finallyToken) { + result = IssueTryFinallyInstructions(interp, envPtr, bodyToken, + numHandlers, matchCodes, matchClauses, resultVarIndices, + optionVarIndices, handlerTokens, finallyToken); + } else { + result = IssueTryInstructions(interp, envPtr, bodyToken, numHandlers, + matchCodes, matchClauses, resultVarIndices, optionVarIndices, + handlerTokens); + } + + /* + * Delete any temporary state and finish off. + */ + + failedToCompile: + if (numHandlers > 0) { + for (i=0 ; icodeStart+(var)+1) + +static int +IssueTryInstructions( + Tcl_Interp *interp, + CompileEnv *envPtr, + Tcl_Token *bodyToken, + int numHandlers, + int *matchCodes, + Tcl_Obj **matchClauses, + int *resultVars, + int *optionVars, + Tcl_Token **handlerTokens) +{ + DefineLineInformation; /* TIP #280 */ + int range, resultVar, optionsVar; + int i, j, len, forwardsNeedFixing = 0; + int *addrsToFix, *forwardsToFix, notCodeJumpSource, notECJumpSource; + char buf[TCL_INTEGER_SPACE]; + + resultVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); + optionsVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); + if (resultVar < 0 || optionsVar < 0) { + return TCL_ERROR; + } + + /* + * Compile the body, trapping any error in it so that we can trap on it + * and/or run a finally clause. Note that there must be at least one + * on/trap clause; when none is present, this whole function is not called + * (and it's never called when there's a finally clause). + */ + + range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); + OP4( BEGIN_CATCH4, range); + ExceptionRangeStarts(envPtr, range); + BODY( bodyToken, 1); + ExceptionRangeEnds(envPtr, range); + OP1( JUMP1, 3); + ExceptionRangeTarget(envPtr, range, catchOffset); + OP( PUSH_RESULT); + OP4( STORE_SCALAR4, resultVar); + OP( POP); + OP( PUSH_RETURN_OPTIONS); + OP4( STORE_SCALAR4, optionsVar); + OP( POP); + OP( PUSH_RETURN_CODE); + OP( END_CATCH); + + /* + * Now we handle all the registered 'on' and 'trap' handlers in order. + * For us to be here, there must be at least one handler. + * + * Slight overallocation, but reduces size of this function. + */ + + addrsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); + forwardsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); + + for (i=0 ; i= 0) { + OP4( LOAD_SCALAR4, resultVar); + OP4( STORE_SCALAR4, resultVars[i]); + OP( POP); + if (optionVars[i] >= 0) { + OP4( LOAD_SCALAR4, optionsVar); + OP4( STORE_SCALAR4, optionVars[i]); + OP( POP); + } + } + if (!handlerTokens[i]) { + forwardsNeedFixing = 1; + JUMP(forwardsToFix[i], JUMP4); + } else { + forwardsToFix[i] = -1; + if (forwardsNeedFixing) { + forwardsNeedFixing = 0; + for (j=0 ; jcurrStackDepth; + int range, resultVar, optionsVar, i, j, len, forwardsNeedFixing = 0; + int *addrsToFix, *forwardsToFix, notCodeJumpSource, notECJumpSource; + char buf[TCL_INTEGER_SPACE]; + + resultVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); + optionsVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); + if (resultVar < 0 || optionsVar < 0) { + return TCL_ERROR; + } + + /* + * Compile the body, trapping any error in it so that we can trap on it + * (if any trap matches) and run a finally clause. + */ + + range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); + OP4( BEGIN_CATCH4, range); + ExceptionRangeStarts(envPtr, range); + BODY( bodyToken, 1); + ExceptionRangeEnds(envPtr, range); + OP1( JUMP1, 3); + ExceptionRangeTarget(envPtr, range, catchOffset); + OP( PUSH_RESULT); + OP4( STORE_SCALAR4, resultVar); + OP( POP); + OP( PUSH_RETURN_OPTIONS); + OP4( STORE_SCALAR4, optionsVar); + OP( POP); + OP( PUSH_RETURN_CODE); + OP( END_CATCH); + envPtr->currStackDepth = savedStackDepth + 1; + + /* + * Now we handle all the registered 'on' and 'trap' handlers in order. + */ + + if (numHandlers) { + /* + * Slight overallocation, but reduces size of this function. + */ + + addrsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); + forwardsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); + + for (i=0 ; i= 0 || handlerTokens[i]) { + range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); + OP4( BEGIN_CATCH4, range); + ExceptionRangeStarts(envPtr, range); + } + if (resultVars[i] >= 0) { + OP4( LOAD_SCALAR4, resultVar); + OP4( STORE_SCALAR4, resultVars[i]); + OP( POP); + if (optionVars[i] >= 0) { + OP4( LOAD_SCALAR4, optionsVar); + OP4( STORE_SCALAR4, optionVars[i]); + OP( POP); + } + } + if (!handlerTokens[i]) { + /* + * No handler. Will not be the last handler (that condition is + * checked by the caller). Chain to the next one. + */ + + ExceptionRangeEnds(envPtr, range); + forwardsNeedFixing = 1; + JUMP(forwardsToFix[i], JUMP4); + if (resultVars[i] >= 0) { + goto finishTrapCatchHandling; + } + } else { + /* + * Got a handler. Make sure that any pending patch-up actions + * from previous unprocessed handlers are dealt with now that + * we know where they are to jump to. + */ + + if (forwardsNeedFixing) { + forwardsNeedFixing = 0; + OP1( JUMP1, 7); + for (j=0 ; jcurrStackDepth = savedStackDepth; + + /* + * Process the finally clause (at last!) Note that we do not wrap this in + * error handlers because we would just rethrow immediately anyway. Then + * (on normal success) we reissue the exception. Note also that + * INST_RETURN_STK can proceed to the next instruction; that'll be the + * next command (or some inter-command manipulation). + */ + + BODY( finallyToken, 3 + 4*numHandlers); + OP( POP); + OP4( LOAD_SCALAR4, optionsVar); + OP4( LOAD_SCALAR4, resultVar); + OP( RETURN_STK); + + return TCL_OK; +} + +#undef OP +#undef OP1 +#undef OP4 +#undef OP44 +#undef BODY +#undef PUSH +#undef JUMP +#undef FIXJUMP + +/* + *---------------------------------------------------------------------- + * * TclCompileUnsetCmd -- * * Procedure called to compile the "unset" command. diff --git a/generic/tclInt.h b/generic/tclInt.h index 0e98299..bccb5a8 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.459 2010/02/05 22:39:44 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.460 2010/02/09 20:51:54 dkf Exp $ */ #ifndef _TCLINT @@ -3396,6 +3396,9 @@ MODULE_SCOPE int TclCompileSubstCmd(Tcl_Interp *interp, MODULE_SCOPE int TclCompileSwitchCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); +MODULE_SCOPE int TclCompileTryCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, Command *cmdPtr, + struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileUnsetCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -- cgit v0.12 From dcb6a3ca97368dcad4e7901623480303f7ad9457 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 9 Feb 2010 22:20:27 +0000 Subject: Small cleanups of formatting issues --- generic/tclCompCmds.c | 160 +++++++++++++++++++++++++++----------------------- 1 file changed, 88 insertions(+), 72 deletions(-) diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 6183039..d2693dc 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.160 2010/02/09 20:51:54 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.161 2010/02/09 22:20:27 dkf Exp $ */ #include "tclInt.h" @@ -166,7 +166,7 @@ static int PushVarName(Tcl_Interp *interp, Tcl_Token *varTokenPtr, CompileEnv *envPtr, int flags, int *localIndexPtr, int *simpleVarNamePtr, int *isScalarPtr, - int line, int* clNext); + int line, int *clNext); static int CompileAssociativeBinaryOpCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, const char *identity, int instruction, CompileEnv *envPtr); @@ -289,7 +289,7 @@ TclCompileAppendCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); PushVarNameWord(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); + &localIndex, &simpleVarName, &isScalar, 1); /* * We are doing an assignment, otherwise TclCompileSetCmd was called, so @@ -483,7 +483,7 @@ TclCompileCatchCmd( * range so that errors in the substitution are not catched [Bug 219184] */ - SetLineInformation (1); + SetLineInformation(1); if (cmdTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { ExceptionRangeStarts(envPtr, range); CompileBody(envPtr, cmdTokenPtr, interp); @@ -965,7 +965,7 @@ TclCompileDictForCmd( * Compile the loop body itself. It should be stack-neutral. */ - SetLineInformation (4); + SetLineInformation(4); CompileBody(envPtr, bodyTokenPtr, interp); TclEmitOpcode( INST_POP, envPtr); @@ -1547,7 +1547,7 @@ TclCompileForCmd( * Inline compile the initial command. */ - SetLineInformation (1); + SetLineInformation(1); CompileBody(envPtr, startTokenPtr, interp); TclEmitOpcode(INST_POP, envPtr); @@ -1570,7 +1570,7 @@ TclCompileForCmd( */ bodyCodeOffset = ExceptionRangeStarts(envPtr, bodyRange); - SetLineInformation (4); + SetLineInformation(4); CompileBody(envPtr, bodyTokenPtr, interp); ExceptionRangeEnds(envPtr, bodyRange); envPtr->currStackDepth = savedStackDepth + 1; @@ -1582,7 +1582,7 @@ TclCompileForCmd( envPtr->currStackDepth = savedStackDepth; nextCodeOffset = ExceptionRangeStarts(envPtr, nextRange); - SetLineInformation (3); + SetLineInformation(3); CompileBody(envPtr, nextTokenPtr, interp); ExceptionRangeEnds(envPtr, nextRange); envPtr->currStackDepth = savedStackDepth + 1; @@ -1603,7 +1603,7 @@ TclCompileForCmd( testCodeOffset += 3; } - SetLineInformation (2); + SetLineInformation(2); envPtr->currStackDepth = savedStackDepth; TclCompileExprWords(interp, testTokenPtr, 1, envPtr); envPtr->currStackDepth = savedStackDepth + 1; @@ -1724,7 +1724,7 @@ TclCompileForeachCmd( */ numLists = (numWords - 2)/2; - varcList = (int *) TclStackAlloc(interp, numLists * sizeof(int)); + varcList = TclStackAlloc(interp, numLists * sizeof(int)); memset(varcList, 0, numLists * sizeof(int)); varvList = (const char ***) TclStackAlloc(interp, numLists * sizeof(const char **)); @@ -1853,7 +1853,7 @@ TclCompileForeachCmd( i < numWords-1; i++, tokenPtr = TokenAfter(tokenPtr)) { if ((i%2 == 0) && (i > 0)) { - SetLineInformation (i); + SetLineInformation(i); CompileTokens(envPtr, tokenPtr, interp); tempVar = (firstValueTemp + loopIndex); if (tempVar <= 255) { @@ -1885,7 +1885,7 @@ TclCompileForeachCmd( * Inline compile the loop body. */ - SetLineInformation (bodyIndex); + SetLineInformation(bodyIndex); ExceptionRangeStarts(envPtr, range); CompileBody(envPtr, bodyTokenPtr, interp); ExceptionRangeEnds(envPtr, range); @@ -2224,7 +2224,7 @@ TclCompileIfCmd( compileScripts = 0; } } else { - SetLineInformation (wordIdx); + SetLineInformation(wordIdx); Tcl_ResetResult(interp); TclCompileExprWords(interp, testTokenPtr, 1, envPtr); if (jumpFalseFixupArray.next >= jumpFalseFixupArray.end) { @@ -2266,7 +2266,7 @@ TclCompileIfCmd( */ if (compileScripts) { - SetLineInformation (wordIdx); + SetLineInformation(wordIdx); envPtr->currStackDepth = savedStackDepth; CompileBody(envPtr, tokenPtr, interp); } @@ -2354,7 +2354,7 @@ TclCompileIfCmd( * Compile the else command body. */ - SetLineInformation (wordIdx); + SetLineInformation(wordIdx); CompileBody(envPtr, tokenPtr, interp); } @@ -2457,7 +2457,7 @@ TclCompileIncrCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); PushVarNameWord(interp, varTokenPtr, envPtr, TCL_NO_LARGE_INDEX, - &localIndex, &simpleVarName, &isScalar, 1); + &localIndex, &simpleVarName, &isScalar, 1); /* * If an increment is given, push it, but see first if it's a small @@ -2473,6 +2473,7 @@ TclCompileIncrCmd( int numBytes = incrTokenPtr[1].size; int code; Tcl_Obj *intObj = Tcl_NewStringObj(word, numBytes); + Tcl_IncrRefCount(intObj); code = TclGetIntFromObj(NULL, intObj, &immValue); TclDecrRefCount(intObj); @@ -2483,7 +2484,7 @@ TclCompileIncrCmd( PushLiteral(envPtr, word, numBytes); } } else { - SetLineInformation (2); + SetLineInformation(2); CompileTokens(envPtr, incrTokenPtr, interp); } } else { /* No incr amount given so use 1. */ @@ -2599,7 +2600,7 @@ TclCompileLappendCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); PushVarNameWord(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); + &localIndex, &simpleVarName, &isScalar, 1); /* * If we are doing an assignment, push the new value. In the no values @@ -2608,6 +2609,7 @@ TclCompileLappendCmd( if (numWords > 2) { Tcl_Token *valueTokenPtr = TokenAfter(varTokenPtr); + CompileWord(envPtr, valueTokenPtr, interp, 2); } @@ -2705,7 +2707,7 @@ TclCompileLassignCmd( */ PushVarNameWord(interp, tokenPtr, envPtr, 0, &localIndex, - &simpleVarName, &isScalar, idx+2); + &simpleVarName, &isScalar, idx+2); /* * Emit instructions to get the idx'th item out of the list value on @@ -3042,7 +3044,7 @@ TclCompileLsetCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); PushVarNameWord(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); + &localIndex, &simpleVarName, &isScalar, 1); /* * Push the "index" args and the new element value. @@ -3242,6 +3244,7 @@ TclCompileRegexpCmd( str = varTokenPtr[1].start; len = varTokenPtr[1].size; + /* * If it has a '-', it could be an incorrectly formed regexp command. */ @@ -3295,7 +3298,9 @@ TclCompileRegexpCmd( * that handles all the flags we want to pass. * Don't use TCL_REG_NOSUB as we may have backrefs. */ + int cflags = TCL_REG_ADVANCED | (nocase ? TCL_REG_NOCASE : 0); + TclEmitInstInt1(INST_REGEXP, cflags, envPtr); } @@ -3434,6 +3439,7 @@ TclCompileReturnCmd( while (index >= 0) { ExceptionRange range = envPtr->exceptArrayPtr[index]; + if ((range.type == CATCH_EXCEPTION_RANGE) && (range.catchOffset == -1)) { enclosingCatch = 1; @@ -3543,7 +3549,7 @@ TclCompileSetCmd( varTokenPtr = TokenAfter(parsePtr->tokenPtr); PushVarNameWord(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); + &localIndex, &simpleVarName, &isScalar, 1); /* * If we are doing an assignment, push the new value. @@ -3562,7 +3568,8 @@ TclCompileSetCmd( if (isScalar) { if (localIndex < 0) { TclEmitOpcode((isAssignment? - INST_STORE_SCALAR_STK : INST_LOAD_SCALAR_STK), envPtr); + INST_STORE_SCALAR_STK : INST_LOAD_SCALAR_STK), + envPtr); } else if (localIndex <= 255) { TclEmitInstInt1((isAssignment? INST_STORE_SCALAR1 : INST_LOAD_SCALAR1), @@ -3824,7 +3831,7 @@ TclCompileStringMatchCmd( } PushLiteral(envPtr, str, length); } else { - SetLineInformation (i+1+nocase); + SetLineInformation(i+1+nocase); CompileTokens(envPtr, tokenPtr, interp); } tokenPtr = TokenAfter(tokenPtr); @@ -3890,7 +3897,7 @@ TclCompileStringLenCmd( len = sprintf(buf, "%d", len); PushLiteral(envPtr, buf, len); } else { - SetLineInformation (1); + SetLineInformation(1); CompileTokens(envPtr, tokenPtr, interp); TclEmitOpcode(INST_STR_LEN, envPtr); } @@ -3938,7 +3945,7 @@ TclCompileSubstCmd( return TCL_ERROR; } - objv = (Tcl_Obj **) TclStackAlloc(interp, /*numArgs*/ numOpts * sizeof(Tcl_Obj *)); + objv = TclStackAlloc(interp, /*numArgs*/ numOpts * sizeof(Tcl_Obj *)); for (objc = 0; objc < /*numArgs*/ numOpts; objc++) { objv[objc] = Tcl_NewObj(); @@ -3977,8 +3984,8 @@ TclCompileSubstCmd( } SetLineInformation(numArgs); - TclSubstCompile(interp, wordTokenPtr[1].start, wordTokenPtr[1].size, flags, - mapPtr->loc[eclIndex].line[numArgs], envPtr); + TclSubstCompile(interp, wordTokenPtr[1].start, wordTokenPtr[1].size, + flags, mapPtr->loc[eclIndex].line[numArgs], envPtr); /* TclDecrRefCount(toSubst);*/ return TCL_OK; @@ -4229,7 +4236,7 @@ TclCompileSwitchCmd( Tcl_Token **bodyToken; /* Array of pointers to pattern list items. */ int *bodyLines; /* Array of line numbers for body list * items. */ - int** bodyNext; + int **bodyNext; int foundDefault; /* Flag to indicate whether a "default" clause * is present. */ @@ -4248,7 +4255,7 @@ TclCompileSwitchCmd( int isListedArms = 0; int i, valueIndex; DefineLineInformation; /* TIP #280 */ - int* clNext = envPtr->clNext; + int *clNext = envPtr->clNext; /* * Only handle the following versions: @@ -4482,8 +4489,8 @@ TclCompileSwitchCmd( */ TclAdvanceLines(&bline, p, bodyTokenArray[i].start); - TclAdvanceContinuations (&bline, &clNext, - bodyTokenArray[i].start - envPtr->source); + TclAdvanceContinuations(&bline, &clNext, + bodyTokenArray[i].start - envPtr->source); bodyLines[i] = bline; bodyNext[i] = clNext; p = bodyTokenArray[i].start; @@ -4583,7 +4590,7 @@ TclCompileSwitchCmd( * First, we push the value we're matching against on the stack. */ - SetLineInformation (valueIndex); + SetLineInformation(valueIndex); CompileTokens(envPtr, valueTokenPtr, interp); /* @@ -5903,7 +5910,8 @@ TclCompileWhileCmd( */ if (loopMayEnd) { - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &jumpEvalCondFixup); + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, + &jumpEvalCondFixup); testCodeOffset = 0; /* Avoid compiler warning. */ } else { /* @@ -5919,7 +5927,7 @@ TclCompileWhileCmd( * Compile the loop body. */ - SetLineInformation (2); + SetLineInformation(2); bodyCodeOffset = ExceptionRangeStarts(envPtr, range); CompileBody(envPtr, bodyTokenPtr, interp); ExceptionRangeEnds(envPtr, range); @@ -5939,7 +5947,7 @@ TclCompileWhileCmd( testCodeOffset += 3; } envPtr->currStackDepth = savedStackDepth; - SetLineInformation (1); + SetLineInformation(1); TclCompileExprWords(interp, testTokenPtr, 1, envPtr); envPtr->currStackDepth = savedStackDepth + 1; @@ -6005,7 +6013,8 @@ PushVarName( int *simpleVarNamePtr, /* Must not be NULL. */ int *isScalarPtr, /* Must not be NULL. */ int line, /* Line the token starts on. */ - int* clNext) /* Reference to offset of next hidden cont. line */ + int *clNext) /* Reference to offset of next hidden cont. + * line. */ { register const char *p; const char *name, *elName; @@ -6080,7 +6089,6 @@ PushVarName( && (varTokenPtr[1].type == TCL_TOKEN_TEXT) && (varTokenPtr[n].type == TCL_TOKEN_TEXT) && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) { - /* * Check for parentheses inside first token. */ @@ -6113,7 +6121,7 @@ PushVarName( nameChars = p - varTokenPtr[1].start; elName = p + 1; remainingChars = (varTokenPtr[2].start - p) - 1; - elNameChars = (varTokenPtr[n].start - p) + varTokenPtr[n].size - 2; + elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 2; if (remainingChars) { /* @@ -6121,8 +6129,7 @@ PushVarName( * token. */ - elemTokenPtr = (Tcl_Token *) TclStackAlloc(interp, - n * sizeof(Tcl_Token)); + elemTokenPtr = TclStackAlloc(interp, n * sizeof(Tcl_Token)); allocedTokens = 1; elemTokenPtr->type = TCL_TOKEN_TEXT; elemTokenPtr->start = elName; @@ -6153,6 +6160,7 @@ PushVarName( */ int hasNsQualifiers = 0; + for (i = 0, p = name; i < nameChars; i++, p++) { if ((*p == ':') && ((i+1) < nameChars) && (*(p+1) == ':')) { hasNsQualifiers = 1; @@ -6189,7 +6197,8 @@ PushVarName( if (elNameChars) { envPtr->line = line; envPtr->clNext = clNext; - TclCompileTokens(interp, elemTokenPtr, elemTokenCount, envPtr); + TclCompileTokens(interp, elemTokenPtr, elemTokenCount, + envPtr); } else { PushLiteral(envPtr, "", 0); } @@ -6297,9 +6306,10 @@ CompileAssociativeBinaryOpCmd( } if (words > 3) { /* - * Reverse order of arguments to get precise agreement with - * [expr] in calcuations, including roundoff errors. + * Reverse order of arguments to get precise agreement with [expr] in + * calcuations, including roundoff errors. */ + TclEmitInstInt4(INST_REVERSE, words-1, envPtr); } while (--words > 1) { @@ -6546,9 +6556,10 @@ TclCompilePowOpCmd( CompileEnv *envPtr) { /* - * This one has its own implementation because the ** operator is - * the only one with right associativity. + * This one has its own implementation because the ** operator is the only + * one with right associativity. */ + Tcl_Token *tokenPtr = parsePtr->tokenPtr; DefineLineInformation; /* TIP #280 */ int words; @@ -6739,10 +6750,12 @@ TclCompileMinusOpCmd( TclEmitOpcode(INST_SUB, envPtr); return TCL_OK; } + /* - * Reverse order of arguments to get precise agreement with - * [expr] in calcuations, including roundoff errors. + * Reverse order of arguments to get precise agreement with [expr] in + * calcuations, including roundoff errors. */ + TclEmitInstInt4(INST_REVERSE, words-1, envPtr); while (--words > 1) { TclEmitInstInt4(INST_REVERSE, 2, envPtr); @@ -6778,10 +6791,12 @@ TclCompileDivOpCmd( TclEmitOpcode(INST_DIV, envPtr); return TCL_OK; } + /* - * Reverse order of arguments to get precise agreement with - * [expr] in calcuations, including roundoff errors. + * Reverse order of arguments to get precise agreement with [expr] in + * calcuations, including roundoff errors. */ + TclEmitInstInt4(INST_REVERSE, words-1, envPtr); while (--words > 1) { TclEmitInstInt4(INST_REVERSE, 2, envPtr); @@ -6823,11 +6838,11 @@ IndexTailVarIfKnown( /* * Determine if the tail is (a) known at compile time, and (b) not an - * array element. Should any of these fail, return an error so that - * the non-compiled command will be called at runtime. - * In order for the tail to be known at compile time, the last token - * in the word has to be constant and contain "::" if it is not the - * only one. + * array element. Should any of these fail, return an error so that the + * non-compiled command will be called at runtime. + * + * In order for the tail to be known at compile time, the last token in + * the word has to be constant and contain "::" if it is not the only one. */ if (!EnvHasLVT(envPtr)) { @@ -6863,7 +6878,7 @@ IndexTailVarIfKnown( * Get the tail: immediately after the last '::' */ - for(p = tailName + len -1; p > tailName; p--) { + for (p = tailName + len -1; p > tailName; p--) { if ((*p == ':') && (*(p-1) == ':')) { p++; break; @@ -6871,8 +6886,9 @@ IndexTailVarIfKnown( } if (!full && (p == tailName)) { /* - * No :: in the last component + * No :: in the last component. */ + Tcl_DecrRefCount(tailPtr); return -1; } @@ -6880,8 +6896,7 @@ IndexTailVarIfKnown( tailName = p; } - localIndex = TclFindCompiledLocal(tailName, len, - 1, envPtr); + localIndex = TclFindCompiledLocal(tailName, len, 1, envPtr); Tcl_DecrRefCount(tailPtr); return localIndex; } @@ -6934,7 +6949,7 @@ TclCompileUpvarCmd( */ tokenPtr = TokenAfter(parsePtr->tokenPtr); - if(TclWordKnownAtCompileTime(tokenPtr, objPtr)) { + if (TclWordKnownAtCompileTime(tokenPtr, objPtr)) { CallFrame *framePtr; const Tcl_ObjType *newTypePtr, *typePtr = objPtr->typePtr; @@ -6948,14 +6963,14 @@ TclCompileUpvarCmd( Tcl_DecrRefCount(objPtr); if (newTypePtr != typePtr) { - if(numWords%2) { + if (numWords%2) { return TCL_ERROR; } CompileWord(envPtr, tokenPtr, interp, 1); otherTokenPtr = TokenAfter(tokenPtr); i = 4; } else { - if(!(numWords%2)) { + if (!(numWords%2)) { return TCL_ERROR; } PushLiteral(envPtr, "1", 1); @@ -6973,14 +6988,14 @@ TclCompileUpvarCmd( * be called at runtime. */ - for(; i<=numWords; i+=2, otherTokenPtr = TokenAfter(localTokenPtr)) { + for (; i<=numWords; i+=2, otherTokenPtr = TokenAfter(localTokenPtr)) { localTokenPtr = TokenAfter(otherTokenPtr); CompileWord(envPtr, otherTokenPtr, interp, 1); PushVarNameWord(interp, localTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); + &localIndex, &simpleVarName, &isScalar, 1); - if((localIndex < 0) || !isScalar) { + if ((localIndex < 0) || !isScalar) { return TCL_ERROR; } TclEmitInstInt4(INST_UPVAR, localIndex, envPtr); @@ -7064,15 +7079,15 @@ TclCompileNamespaceCmd( */ localTokenPtr = tokenPtr; - for(i=4; i<=numWords; i+=2) { + for (i=4; i<=numWords; i+=2) { otherTokenPtr = TokenAfter(localTokenPtr); localTokenPtr = TokenAfter(otherTokenPtr); CompileWord(envPtr, otherTokenPtr, interp, 1); PushVarNameWord(interp, localTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); + &localIndex, &simpleVarName, &isScalar, 1); - if((localIndex < 0) || !isScalar) { + if ((localIndex < 0) || !isScalar) { return TCL_ERROR; } TclEmitInstInt4(INST_NSUPVAR, localIndex, envPtr); @@ -7142,10 +7157,10 @@ TclCompileGlobalCmd( */ varTokenPtr = TokenAfter(parsePtr->tokenPtr); - for(i=2; i<=numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) { + for (i=2; i<=numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) { localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); - if(localIndex < 0) { + if (localIndex < 0) { return TCL_ERROR; } @@ -7211,13 +7226,13 @@ TclCompileVariableCmd( */ valueTokenPtr = parsePtr->tokenPtr; - for(i=2; i<=numWords; i+=2) { + for (i=2; i<=numWords; i+=2) { varTokenPtr = TokenAfter(valueTokenPtr); valueTokenPtr = TokenAfter(varTokenPtr); localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); - if(localIndex < 0) { + if (localIndex < 0) { return TCL_ERROR; } @@ -7518,6 +7533,7 @@ TclCompileEnsemble( for (i=len; inumComponents + 1; TclGrowParseTokenArray(&synthetic, toCopy); @@ -7585,7 +7601,7 @@ TclCompileInfoExistsCmd( tokenPtr = TokenAfter(parsePtr->tokenPtr); PushVarNameWord(interp, tokenPtr, envPtr, 0, &localIndex, - &simpleVarName, &isScalar, 1); + &simpleVarName, &isScalar, 1); /* * Emit instruction to check the variable for existence. -- cgit v0.12 From 1009d232b4c47ae29d281c1454c7896a1b40e5a4 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 9 Feb 2010 22:27:46 +0000 Subject: Corrected case of trap pattern --- library/clock.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/clock.tcl b/library/clock.tcl index 9f9bcae..2cf4ada 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.tcl,v 1.59 2009/11/19 11:59:54 dkf Exp $ +# RCS: @(#) $Id: clock.tcl,v 1.60 2010/02/09 22:27:46 dkf Exp $ # #---------------------------------------------------------------------- @@ -724,7 +724,7 @@ proc ::tcl::clock::ParseClockFormatFormat {procName format locale} { try { return [ParseClockFormatFormat2 $format $locale $procName] - } trap clock {result opts} { + } trap CLOCK {result opts} { dict unset opts -errorinfo return -options $opts $result } finally { -- cgit v0.12 From e53c72ec7777ca400d4295c0be106a5c4260ee84 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 9 Feb 2010 22:39:11 +0000 Subject: Minor corrections as recommended by Joe English. --- generic/tclHash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclHash.c b/generic/tclHash.c index f3c4b3a..9824afd 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.40 2010/02/07 09:10:33 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.41 2010/02/09 22:39:11 dkf Exp $ */ #include "tclInt.h" @@ -871,9 +871,9 @@ HashStringKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - register const char *string = (const char *) keyPtr; - register unsigned result = 0; - register int c; + const unsigned char *string = keyPtr; + unsigned result = 0; + unsigned c; /* * This is the (32-bit) Fowler/Noll/Vo hash algorithm. This has the -- cgit v0.12 From 4b0dfd608991970784e6307be9a228fdc90a3a7c Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Feb 2010 16:12:11 +0000 Subject: Improvements to zlib documentation (and formatting of it). --- doc/TclZlib.3 | 69 ++++++++++++++++++++++++++++++++++++++++++++---- doc/zlib.n | 6 ++--- tools/tcltk-man2html.tcl | 6 +++-- 3 files changed, 71 insertions(+), 10 deletions(-) diff --git a/doc/TclZlib.3 b/doc/TclZlib.3 index 42d82b5..43ec0a8 100644 --- a/doc/TclZlib.3 +++ b/doc/TclZlib.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TclZlib.3,v 1.4 2008/12/27 00:04:17 dkf Exp $ +'\" RCS: @(#) $Id: TclZlib.3,v 1.5 2010/02/10 16:12:11 dkf Exp $ '\" .so man.macros .TH TclZlib 3 8.6 Tcl "Tcl Library Procedures" @@ -77,7 +77,9 @@ A dictionary that contains, or which will be updated to contain, a description of the gzip header associated with the compressed data. Only useful when the \fIformat\fR is \fBTCL_ZLIB_FORMAT_GZIP\fR or \fBTCL_ZLIB_FORMAT_AUTO\fR. If a NULL is passed, a default header will be used on compression and the header -will be ignored (apart from integrity checks) on decompression. +will be ignored (apart from integrity checks) on decompression. See the +section \fBGZIP OPTIONS DICTIONARY\fR for details about the contents of this +dictionary. .AP "unsigned int" initValue in The initial value for the checksum algorithm. .AP "unsigned char" *bytes in @@ -129,14 +131,17 @@ checksum = \fBTcl_ZlibCRC32\fR(\fBTcl_ZlibCRC32\fR(0,NULL,0), data, length); linked to a Tcl command, according to its arguments, and provides an abstract token for the stream and returns a normal Tcl result code; \fBTcl_ZlibStreamGetCommandName\fR returns the name of that command given the -stream token, or NULL if the stream has no command. +stream token, or NULL if the stream has no command. Streams are not designed +to be thread-safe; each stream should only ever be used from the thread that +created it. .PP Once a stream has been constructed, \fBTcl_ZlibStreamPut\fR is used to add data to the stream and \fBTcl_ZlibStreamGet\fR is used to retrieve data from the stream after processing. Both return normal Tcl result codes. With \fBTcl_ZlibStreamPut\fR, the data buffer object passed to it should not be modified afterwards. With \fBTcl_ZlibStreamGet\fR, the data buffer object -passed to it will have the data bytes appended to it. +passed to it will have the data bytes appended to it. Internally to the +stream, data is kept compressed so as to minimize the cost of buffer space. .PP \fBTcl_ZlibStreamChecksum\fR returns the checksum computed over the uncompressed data according to the format, and \fBTcl_ZlibStreamEof\fR returns @@ -144,7 +149,61 @@ whether the end of the uncompressed data has been reached. .PP Finally, \fBTcl_ZlibStreamClose\fR will clean up the stream and delete the associated command: using \fBTcl_DeleteCommand\fR on the stream's command is -equivalent. +equivalent (when such a command exists). +.SH "GZIP OPTIONS DICTIONARY" +.PP +The \fIdictObj\fR parameter to \fBTcl_ZlibDeflate\fR, \fBTcl_ZlibInflate\fR +and \fBTcl_ZlibStreamInit\fR is used to pass a dictionary of options about +that is used to describe the gzip header in the compressed data. When creating +compressed data, the dictionary is read and when unpacking compressed data the +dictionary is written (in which case the \fIdictObj\fR parameter must refer to +an unshared dictionary object). +.PP +The following fields in the dictionary object are understood. All other fields +are ignored. No field is required when creating a gzip-format stream. +.TP +\fBcomment\fR +. +This holds the comment field of the header, if present. If absent, no comment +was supplied (on decompression) or will be created (on compression). +.TP +\fBcrc\fR +. +A boolean value describing whether a CRC of the header is computed. Note that +the \fBgzip\fR program does \fInot\fR use or allow a CRC on the header. +.TP +\fBfilename\fR +. +The name of the file that held the uncompressed data. This should not contain +any directory separators, and should be sanitized before use on decompression +with \fBfile tail\fR. +.TP +\fBos\fR +. +The operating system type code field from the header (if not the +.QW unknown +value). See RFC 1952 for the meaning of these codes. On compression, if this +is absent then the field will be set to the +.QW unknown +value. +.TP +\fBsize\fR +. +The size of the uncompressed data. This is ignored on compression; the size +of the data compressed depends on how much data is supplied to the +compression engine. +.TP +\fBtime\fR +. +The time field from the header if non-zero, expected to be the time that the +file named by the \fBfilename\fR field was modified. Suitable for use with +\fBclock format\fR. On creation, the right value to use is that from +\fBclock seconds\fR or \fBfile mtime\fR. +.TP +\fBtype\fR +. +The type of the uncompressed data (either \fBbinary\fR or \fBtext\fR) if +known. .SH "PORTABILITY NOTES" These functions will fail gracefully if Tcl is not linked with the zlib library. diff --git a/doc/zlib.n b/doc/zlib.n index 48182bc..6c2af2f 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.7 2009/01/24 00:03:18 dkf Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.8 2010/02/10 16:12:11 dkf Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -75,8 +75,8 @@ The size of the uncompressed data. \fBtime\fR . The time field from the header if non-zero, expected to be time that the file -named by the \fBfilename\fR field was modified. Suitable for use with \fBclock -format\fR. +named by the \fBfilename\fR field was modified. Suitable for use with +\fBclock format\fR. .TP \fBtype\fR . diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 1827ae4..7af1512 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,9 +18,9 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.44 2010/01/14 18:43:38 dkf Exp $ +# CVS: $Id: tcltk-man2html.tcl,v 1.45 2010/02/10 16:12:11 dkf Exp $ -regexp {\d+\.\d+} {$Revision: 1.44 $} ::Version +regexp {\d+\.\d+} {$Revision: 1.45 $} ::Version set ::CSSFILE "docs.css" ## @@ -813,6 +813,7 @@ array set exclude_refs_map { clock.n {next} history.n {exec} next.n {unknown} + zlib.n {binary filename text} canvas.n {bitmap text} checkbutton.n {image} clipboard.n {string} @@ -838,6 +839,7 @@ array set exclude_refs_map { ttk_spinbox.n {format} ttk_treeview.n {text open} ttk_widget.n {image text variable} + TclZlib.3 {binary filename text} } array set exclude_when_followed_by_map { canvas.n { -- cgit v0.12 From 25174c675ed97c5219e2e92570ee0760a7081d0f Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Feb 2010 16:29:49 +0000 Subject: Forgot the magic bias values. FNV is wildly magical... --- generic/tclHash.c | 4 ++-- generic/tclObj.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclHash.c b/generic/tclHash.c index 9824afd..47d8fba 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.41 2010/02/09 22:39:11 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.42 2010/02/10 16:29:49 dkf Exp $ */ #include "tclInt.h" @@ -872,7 +872,7 @@ HashStringKey( void *keyPtr) /* Key from which to compute hash value. */ { const unsigned char *string = keyPtr; - unsigned result = 0; + unsigned result = 0x811c9dc5; unsigned c; /* diff --git a/generic/tclObj.c b/generic/tclObj.c index 6287b24..b45d1c8 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.167 2010/02/07 09:10:33 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.168 2010/02/10 16:29:49 dkf Exp $ */ #include "tclInt.h" @@ -4038,7 +4038,7 @@ TclHashObjKey( void *keyPtr) /* Key from which to compute hash value. */ { Tcl_Obj *objPtr = keyPtr; - register unsigned result = 0; + register unsigned result = 0x811c9dc5; const unsigned char *string = (unsigned char *) TclGetString(objPtr); const unsigned char *last = string + objPtr->length; -- cgit v0.12 From 828f72e7957c659ea67bfae6c63ecbcb221e1bb7 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Feb 2010 23:17:06 +0000 Subject: More zlib documentation improvements. --- doc/TclZlib.3 | 58 +++++++++++++++++++++++++++++++++++++----------- doc/zlib.n | 21 ++++++++++++------ tools/tcltk-man2html.tcl | 8 +++---- 3 files changed, 63 insertions(+), 24 deletions(-) diff --git a/doc/TclZlib.3 b/doc/TclZlib.3 index 43ec0a8..6d5ec7f 100644 --- a/doc/TclZlib.3 +++ b/doc/TclZlib.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: TclZlib.3,v 1.5 2010/02/10 16:12:11 dkf Exp $ +'\" RCS: @(#) $Id: TclZlib.3,v 1.6 2010/02/10 23:17:06 dkf Exp $ '\" .so man.macros .TH TclZlib 3 8.6 Tcl "Tcl Library Procedures" @@ -16,10 +16,10 @@ Tcl_ZlibAdler32, Tcl_ZlibCRC32, Tcl_ZlibDeflate, Tcl_ZlibInflate, Tcl_ZlibStream .nf #include .sp -Tcl_Obj * +int \fBTcl_ZlibDeflate\fR(\fIinterp, format, dataObj, level, dictObj\fR) .sp -Tcl_Obj * +int \fBTcl_ZlibInflate\fR(\fIinterp, format, dataObj, dictObj\fR) .sp unsigned int @@ -41,6 +41,9 @@ int \fBTcl_ZlibStreamClose\fR(\fIzshandle\fR) .sp int +\fBTcl_ZlibStreamReset\fR(\fIzshandle\fR) +.sp +int \fBTcl_ZlibStreamChecksum\fR(\fIzshandle\fR) .sp int @@ -112,19 +115,33 @@ bytes from the stream's buffers. These functions form the interface from the Tcl library to the Zlib library by Jean-loup Gailly and Mark Adler. .PP -\fBTcl_ZlibDeflate\fR and \fBTcl_ZlibInflate\fR compress and decompress data -respectively. Upon success, they leave the resulting compressed or -decompressed data in a byte-array object that is the Tcl interpreter's -result. Note that the \fIdictObj\fR parameter is only used when the -\fIformat\fR parameter is \fBTCL_ZLIB_FORMAT_GZIP\fR or -\fBTCL_ZLIB_FORMAT_AUTO\fR. +\fBTcl_ZlibDeflate\fR and \fBTcl_ZlibInflate\fR respectively compress and +decompress the data contained in the \fIdataObj\fR argument, according to the +\fIformat\fR and, for compression, \fIlevel\fR arguments. The dictionary in +the \fIdictObj\fR parameter is used to convey additional header information +about the compressed data when the compression format supports it; currently, +the dictionary is only used when the \fIformat\fR parameter is +\fBTCL_ZLIB_FORMAT_GZIP\fR or \fBTCL_ZLIB_FORMAT_AUTO\fR. For details of the +contents of the dictionary, see the \fBGZIP OPTIONS DICTIONARY\fR section +below. Upon success, both functions leave the resulting compressed or +decompressed data in a byte-array object that is the Tcl interpreter's result; +the returned value is a standard Tcl result code. .PP \fBTcl_ZlibAdler32\fR and \fBTcl_ZlibCRC32\fR compute checksums on arrays of -bytes. Typical usage is: +bytes, returning the computed checksum. Checksums are computed incrementally, +allowing data to be processed one block at a time, but this requires the +caller to maintain the current checksum and pass it in as the \fIinitValue\fR +parameter; the initial value to use for this can be obtained by using NULL for +the \fIbytes\fR parameter instead of a pointer to the array of bytes to +compute the checksum over. Thus, typical usage in the single data block case +is like this: .PP .CS checksum = \fBTcl_ZlibCRC32\fR(\fBTcl_ZlibCRC32\fR(0,NULL,0), data, length); .CE +.PP +Note that the Adler-32 algorithm is not a real checksum, but instead is a +related type of hash that works best on longer data. .SS "ZLIB STREAMS" .PP \fBTcl_ZlibStreamInit\fR creates a compressing or decompressing stream that is @@ -133,11 +150,20 @@ token for the stream and returns a normal Tcl result code; \fBTcl_ZlibStreamGetCommandName\fR returns the name of that command given the stream token, or NULL if the stream has no command. Streams are not designed to be thread-safe; each stream should only ever be used from the thread that -created it. +created it. When working with gzip streams, a dictionary (fields as given in +the \fBGZIP OPTIONS DICTIONARY\fR section below) can be given via the +\fIdictObj\fR parameter that on compression allows control over the generated +headers, and on decompression allows discovery of the existing headers. Note +that the dictionary will be written to on decompression once sufficient data +has been read to have a complete header. This means that the dictionary must +be an unshared object in that case; a blank object created with +\fBTcl_NewObj\fR is suggested. .PP Once a stream has been constructed, \fBTcl_ZlibStreamPut\fR is used to add data to the stream and \fBTcl_ZlibStreamGet\fR is used to retrieve data from -the stream after processing. Both return normal Tcl result codes. With +the stream after processing. Both return normal Tcl result codes and leave an +error message in the result of the interpreter that the stream is registered +with in the error case (if such a registration has been performed). With \fBTcl_ZlibStreamPut\fR, the data buffer object passed to it should not be modified afterwards. With \fBTcl_ZlibStreamGet\fR, the data buffer object passed to it will have the data bytes appended to it. Internally to the @@ -145,8 +171,14 @@ stream, data is kept compressed so as to minimize the cost of buffer space. .PP \fBTcl_ZlibStreamChecksum\fR returns the checksum computed over the uncompressed data according to the format, and \fBTcl_ZlibStreamEof\fR returns -whether the end of the uncompressed data has been reached. +a boolean value indicating whether the end of the uncompressed data has been +reached. .PP +If you wish to clear a stream and reuse it for a new compression or +decompression action, \fBTcl_ZlibStreamReset\fR will do this and return a +normal Tcl result code to indicate whether it was successful; if the stream is +registered with an interpreter, an error message will be left in the +interpreter result when this function returns TCL_ERROR. Finally, \fBTcl_ZlibStreamClose\fR will clean up the stream and delete the associated command: using \fBTcl_DeleteCommand\fR on the stream's command is equivalent (when such a command exists). diff --git a/doc/zlib.n b/doc/zlib.n index 6c2af2f..f633cea 100644 --- a/doc/zlib.n +++ b/doc/zlib.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: zlib.n,v 1.8 2010/02/10 16:12:11 dkf Exp $ +'\" RCS: @(#) $Id: zlib.n,v 1.9 2010/02/10 23:17:06 dkf Exp $ '\" .so man.macros .TH zlib n 8.6 Tcl "Tcl Built-In Commands" @@ -126,9 +126,9 @@ The type of the data being compressed, being \fBbinary\fR or \fBtext\fR. Returns the uncompressed version of the raw compressed binary data in \fIstring\fR. If present, \fIbufferSize\fR is a hint as to what size of buffer is to be used to receive the data. -.SS "STREAMING AND CHANNEL SUBCOMMANDS" +.SS "CHANNEL SUBCOMMAND" .TP -\fBzlib push\fI mode channel\fR ?\fIoptions ...\fR +\fBzlib push\fI mode channel\fR ?\fIoptions ...\fR? . Pushes a compressing or decompressing transformation onto the channel \fIchannel\fR. @@ -167,7 +167,10 @@ gzip-format data on \fIchannel\fR, which must be writable. The transformation will be a decompressing transformation that reads raw compressed data from \fIchannel\fR, which must be readable. .PP -The following options may be set when creating a transformation: +The following options may be set when creating a transformation via +the +.QW "\fIoptions ...\fR" +to the \fBzlib push\fR command: .TP \fB\-header\fI dictionary\fR . @@ -184,15 +187,18 @@ How hard to compress the data. Must be an integer from 0 (uncompressed) to 9 '\"The maximum number of bytes ahead to read. '\"\fITODO: not yet implemented!\fR .PP -Both compressing and decompressing channel transformations add extra options -that may be accessed through \fBchan configure\fR. These are: +Both compressing and decompressing channel transformations add extra +configuration options that may be accessed through \fBchan configure\fR. Each +option is either a read-only or a write-only option. The options are: .TP \fB\-flush\fI type\fR . This write-only operation flushes the current state of the compressor to the underlying channel. It is only valid for compressing transformations. The \fItype\fR must be either \fBsync\fR or \fBfull\fR for a normal flush or an -expensive flush respectively. Note that flushing degrades compression. +expensive flush respectively. Flushing degrades the compression ratio, but +makes it easier for a decompressor to recover more of the file in the case of +data corruption. .TP \fB\-checksum\fR . @@ -207,6 +213,7 @@ This read-only option, only valid for decompressing transforms that are processing gzip-format data, returns the dictionary describing the header read off the data stream. .RE +.SS "STREAMING SUBCOMMAND" .TP \fBzlib stream\fI mode\fR ?\fIlevel\fR? . diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 7af1512..fd8a258 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,9 +18,9 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.45 2010/02/10 16:12:11 dkf Exp $ +# CVS: $Id: tcltk-man2html.tcl,v 1.46 2010/02/10 23:17:07 dkf Exp $ -regexp {\d+\.\d+} {$Revision: 1.45 $} ::Version +regexp {\d+\.\d+} {$Revision: 1.46 $} ::Version set ::CSSFILE "docs.css" ## @@ -813,7 +813,7 @@ array set exclude_refs_map { clock.n {next} history.n {exec} next.n {unknown} - zlib.n {binary filename text} + zlib.n {binary close filename text} canvas.n {bitmap text} checkbutton.n {image} clipboard.n {string} @@ -839,7 +839,7 @@ array set exclude_refs_map { ttk_spinbox.n {format} ttk_treeview.n {text open} ttk_widget.n {image text variable} - TclZlib.3 {binary filename text} + TclZlib.3 {binary flush filename text} } array set exclude_when_followed_by_map { canvas.n { -- cgit v0.12 From 97ddceae2735bb515100b9880a07e2fc9defab4d Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Feb 2010 23:24:25 +0000 Subject: Remove assumption of ordered results from [info procs] --- tests/info.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/info.test b/tests/info.test index 8b7729c..28fee2c 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.74 2010/01/10 22:58:41 nijtmans Exp $ +# RCS: @(#) $Id: info.test,v 1.75 2010/02/10 23:24:25 dkf Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -491,7 +491,7 @@ test info-15.4 {info procs option} -setup { namespace eval test_ns_info2 { namespace import ::test_ns_info1::* proc r {} {} - list [info procs] [info procs p*] + list [lsort [info procs]] [info procs p*] } } -result {{p q r} p} test info-15.5 {info procs option with a proc in a namespace} -setup { -- cgit v0.12 From 503ce016796ba300d912e764fda1619ed266de71 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 10 Feb 2010 23:28:39 +0000 Subject: Two more hash-iteration-order assumptions bite the dust --- tests/upvar.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/upvar.test b/tests/upvar.test index 86a5a20..dbf6dd5 100644 --- a/tests/upvar.test +++ b/tests/upvar.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: upvar.test,v 1.19 2009/03/24 09:30:07 dkf Exp $ +# RCS: @(#) $Id: upvar.test,v 1.20 2010/02/10 23:28:39 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -148,7 +148,7 @@ test upvar-3.5 {unsetting array elements with upvar} { array names a } proc p2 {} {upvar a(0) x; unset x} - p1 + lsort [p1] } {1 2} test upvar-3.6 {unsetting then resetting array elements with upvar} { proc p1 {} { @@ -156,7 +156,7 @@ test upvar-3.6 {unsetting then resetting array elements with upvar} { set a(1) first set a(2) second p2 - list [array names a] [catch {set a(0)} msg] $msg + list [lsort [array names a]] [catch {set a(0)} msg] $msg } proc p2 {} {upvar a(0) x; unset x; set x 12345} p1 -- cgit v0.12 From ee2ddea6e375270013c0bbe70e83853301efc279 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Feb 2010 09:00:53 +0000 Subject: [Bug 2949397]: Prevent destructors from running on the two core class objects when the whole interpreter is being destroyed. --- ChangeLog | 6 ++++++ generic/tclOO.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 695fb0d..ae76f05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-11 Donal K. Fellows + + * generic/tclOO.c (ObjectRenamedTrace): [Bug 2949397]: Prevent + destructors from running on the two core class objects when the whole + interpreter is being destroyed. + 2010-02-09 Donal K. Fellows * generic/tclCompCmds.c (TclCompileTryCmd, IssueTryInstructions) diff --git a/generic/tclOO.c b/generic/tclOO.c index f52ff35..507f8b5 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.30 2010/02/05 20:53:12 nijtmans Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.31 2010/02/11 09:00:55 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -660,13 +660,20 @@ ObjectRenamedTrace( * command. Because of that case, we must take care here to mark the * command as being deleted so that if we return here we don't run into * reentrancy problems. + * + * We also do not run destructors on the core class objects when the + * interpreter is being deleted; their incestuous nature causes problems + * in that case when the destructor is partially deleted before the uses + * of it have gone. [Bug 2949397] */ AddRef(oPtr); oPtr->command = NULL; oPtr->flags |= OBJECT_DELETED; - if (!(oPtr->flags & DESTRUCTOR_CALLED)) { + if (!(oPtr->flags & DESTRUCTOR_CALLED) && (!Tcl_InterpDeleted(interp) + || (oPtr != oPtr->fPtr->objectCls->thisPtr + && oPtr != oPtr->fPtr->classCls->thisPtr))) { contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); oPtr->flags |= DESTRUCTOR_CALLED; if (contextPtr != NULL) { -- cgit v0.12 From a80d0318d2c6fdaaad538515154acc68edfe3bbc Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Feb 2010 11:14:22 +0000 Subject: Tcl Bug 2826551 regexp bugs related to -all -line and -start and newlines --- ChangeLog | 12 +++ generic/tclCmdMZ.c | 49 +++++---- tests/regexp.test | 304 ++++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 320 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae76f05..f0ac54b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-02-09 Mo DeJong + + [Bug 2826551, Patch 2948425]: Assorted regexp bugs related to -all, + -line and -start options and newlines. + * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): If -offset is given, treat it + as the start of the line if the previous character was a newline. Fix + nasty edge case where a zero length match would not advance the index. + * tests/regexp.test: Add regression tests back ported from Jacl. + Checks for a number of issues related to -line and newline handling. A + few of tests were broken before the patch and continue to be broken, + marked as knownBug. + 2010-02-11 Donal K. Fellows * generic/tclOO.c (ObjectRenamedTrace): [Bug 2949397]: Prevent diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 7e42ec3..5cf9761 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.198 2009/12/25 22:45:05 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.199 2010/02/11 11:14:22 dkf Exp $ */ #include "tclInt.h" @@ -108,7 +108,7 @@ Tcl_RegexpObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int i, indices, match, about, offset, all, doinline, numMatchesSaved; - int cflags, eflags, stringLength; + int cflags, eflags, stringLength, matchLength; Tcl_RegExp regExpr; Tcl_Obj *objPtr, *startIndex = NULL, *resultPtr = NULL; Tcl_RegExpInfo info; @@ -126,7 +126,6 @@ Tcl_RegexpObjCmd( indices = 0; about = 0; cflags = TCL_REG_ADVANCED; - eflags = 0; offset = 0; all = 0; doinline = 0; @@ -250,15 +249,6 @@ Tcl_RegexpObjCmd( return TCL_ERROR; } - if (offset > 0) { - /* - * Add flag if using offset (string is part of a larger string), so - * that "^" won't match. - */ - - eflags |= TCL_REG_NOTBOL; - } - objc -= 2; objv += 2; @@ -286,12 +276,23 @@ Tcl_RegexpObjCmd( */ while (1) { - match = Tcl_RegExpExecObj(interp, regExpr, objPtr, - offset /* offset */, numMatchesSaved, eflags - | ((offset > 0 && - (Tcl_GetUniChar(objPtr,offset-1) != (Tcl_UniChar)'\n')) - ? TCL_REG_NOTBOL : 0)); + /* + * Pass either 0 or TCL_REG_NOTBOL in the eflags. Passing + * TCL_REG_NOTBOL indicates that the character at offset should not be + * considered the start of the line. If for example the pattern {^} is + * passed and -start is positive, then the pattern will not match the + * start of the string unless the previous character is a newline. + */ + if ((offset == 0) || ((offset > 0) && + (Tcl_GetUniChar(objPtr, offset-1) == (Tcl_UniChar) '\n'))) { + eflags = 0; + } else { + eflags = TCL_REG_NOTBOL; + } + + match = Tcl_RegExpExecObj(interp, regExpr, objPtr, offset, + numMatchesSaved, eflags); if (match < 0) { return TCL_ERROR; } @@ -385,6 +386,7 @@ Tcl_RegexpObjCmd( } } else { Tcl_Obj *valuePtr; + valuePtr = Tcl_ObjSetVar2(interp, objv[i], NULL, newPtr, 0); if (valuePtr == NULL) { Tcl_AppendResult(interp, "couldn't set variable \"", @@ -408,12 +410,19 @@ Tcl_RegexpObjCmd( * offset never changes). */ - if (info.matches[0].end == 0) { + matchLength = (info.matches[0].end - info.matches[0].start); + + offset += info.matches[0].end; + + /* + * A match of length zero could happen for {^} {$} or {.*} and in + * these cases we always want to bump the index up one. + */ + + if (matchLength == 0) { offset++; } - offset += info.matches[0].end; all++; - eflags |= TCL_REG_NOTBOL; if (offset >= stringLength) { break; } diff --git a/tests/regexp.test b/tests/regexp.test index 2fe87b9..c77e147 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.34 2009/09/21 21:30:41 mdejong Exp $ +# RCS: @(#) $Id: regexp.test,v 1.35 2010/02/11 11:14:22 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -19,6 +19,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } catch {unset foo} + +testConstraint exec [llength [info commands exec]] + test regexp-1.1 {basic regexp operation} { regexp ab*c abbbc } 1 @@ -43,7 +46,6 @@ test regexp-1.7 {regexp utf compliance} { regexp "\u4e4eb q" "a\u4e4eb qw\u5e4e\x4e wq" bar list [string compare $foo $bar] [regexp 4 $bar] } {0 0} - test regexp-1.8 {regexp ***= metasyntax} { regexp -- "***=o" "aeiou" } 1 @@ -311,12 +313,39 @@ test regexp-7.17 {regsub utf compliance} { test regexp-7.18 {basic regsub replacement} { list [regsub a+ aaa {&} foo] $foo } {1 aaa} -test regexp-7.19 {basic regsub backslash replacement} { +test regexp-7.19 {basic regsub replacement} { + list [regsub a+ aaa {\&} foo] $foo +} {1 &} +test regexp-7.20 {basic regsub replacement} { + list [regsub a+ aaa {\\&} foo] $foo +} {1 {\aaa}} +test regexp-7.21 {basic regsub replacement} { + list [regsub a+ aaa {\\\&} foo] $foo +} {1 {\&}} +test regexp-7.22 {basic regsub replacement} { list [regsub a+ aaa {\0} foo] $foo } {1 aaa} -test regexp-7.20 {basic regsub backslash replacement} { +test regexp-7.23 {basic regsub replacement} { + list [regsub a+ aaa {\\0} foo] $foo +} {1 {\0}} +test regexp-7.24 {basic regsub replacement} { list [regsub a+ aaa {\\\0} foo] $foo } {1 {\aaa}} +test regexp-7.25 {basic regsub replacement} { + list [regsub a+ aaa {\\\\0} foo] $foo +} {1 {\\0}} +test regexp-7.26 {dollar zero is not a backslash replacement} { + list [regsub a+ aaa {$0} foo] $foo +} {1 {$0}} +test regexp-7.27 {dollar zero is not a backslash replacement} { + list [regsub a+ aaa {\0$0} foo] $foo +} {1 {aaa$0}} +test regexp-7.28 {dollar zero is not a backslash replacement} { + list [regsub a+ aaa {\$0} foo] $foo +} {1 {\$0}} +test regexp-7.29 {dollar zero is not a backslash replacement} { + list [regsub a+ aaa {\\} foo] $foo +} {1 \\} test regexp-8.1 {case conversion in regsub} { list [regsub -nocase a(a+) xaAAaAAay & foo] $foo @@ -437,10 +466,8 @@ test regexp-12.1 {Tcl_RegExpExec: large number of subexpressions} {macCrash} { } {1 abcdefghijklmnopqrstuvwxyz a b c d e f g h i j k l m n o p q r s t u v w x y z} test regexp-13.1 {regsub of a very large string} { - # This test is designed to stress the memory subsystem in order - # to catch Bug #933. It only fails if the Tcl memory allocator - # is in use. - + # This test is designed to stress the memory subsystem in order to catch + # Bug #933. It only fails if the Tcl memory allocator is in use. set line {BEGIN_TABLE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; END_TABLE} set filedata [string repeat $line 200] for {set i 1} {$i<10} {incr i} { @@ -469,10 +496,8 @@ test regexp-14.2 {CompileRegexp: regexp cache, different flags} { append x *a regexp -nocase $x bbba } 1 - -testConstraint exec [llength [info commands exec]] test regexp-14.3 {CompileRegexp: regexp cache, empty regexp and empty cache} -constraints { - exec + exec } -setup { set junk [makeFile {puts [regexp {} foo]} junk.tcl] } -body { @@ -642,64 +667,293 @@ test regexp-20.2 {regsub shared object shimmering with -about} { test regexp-21.1 {regsub works with empty string} { regsub -- ^ {} foo } {foo} - test regexp-21.2 {regsub works with empty string} { regsub -- \$ {} foo } {foo} - test regexp-21.3 {regsub works with empty string offset} { regsub -start 0 -- ^ {} foo } {foo} - test regexp-21.4 {regsub works with empty string offset} { regsub -start 0 -- \$ {} foo } {foo} - test regexp-21.5 {regsub works with empty string offset} { regsub -start 3 -- \$ {123} foo } {123foo} - test regexp-21.6 {regexp works with empty string} { regexp -- ^ {} } {1} - test regexp-21.7 {regexp works with empty string} { regexp -start 0 -- ^ {} } {1} - test regexp-21.8 {regexp works with empty string offset} { regexp -start 3 -- ^ {123} } {0} - test regexp-21.9 {regexp works with empty string offset} { regexp -start 3 -- \$ {123} } {1} - test regexp-21.10 {multiple matches handle newlines} { regsub -all -lineanchor -- {^#[^\n]*\n} "#one\n#two\n#three\n" foo\n } "foo\nfoo\nfoo\n" - test regexp-21.11 {multiple matches handle newlines} { regsub -all -line -- ^ "a\nb\nc" \# } "\#a\n\#b\n\#c" - test regexp-21.12 {multiple matches handle newlines} { regsub -all -line -- ^ "\n\n" \# } "\#\n\#\n\#" - test regexp-21.13 {multiple matches handle newlines} { regexp -all -inline -indices -line -- ^ "a\nb\nc" } {{0 -1} {2 1} {4 3}} - test regexp-22.1 {Bug 1810038} { regexp ($|^X)* {} } 1 - test regexp-22.2 {regexp compile and backrefs, Bug 1857126} { regexp -- {([bc])\1} bb } 1 +test regexp-23.1 {regexp -all and -line} { + set string "" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1}} {{0 -1}} {{0 -1}}} +test regexp-23.2 {regexp -all and -line} { + set string "\n" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1}} {{0 -1}} {{0 -1}}} +test regexp-23.3 {regexp -all and -line} { + set string "\n\n" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1} {1 0}} {{0 -1} {1 0}} {{0 -1} {1 0}}} +test regexp-23.4 {regexp -all and -line} { + set string "a" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^.*$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1}} {{0 0}} {{1 0}}} +test regexp-23.5 {regexp -all and -line} {knownBug} { + set string "a\n" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^.*$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1} {2 1}} {{0 0} {2 1}} {{1 0} {2 1}}} +test regexp-23.6 {regexp -all and -line} { + set string "\na" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^.*$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1} {1 0}} {{0 -1} {1 1}} {{0 -1} {2 1}}} +test regexp-23.7 {regexp -all and -line} {knownBug} { + set string "ab\n" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^.*$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1} {3 2}} {{0 1} {3 2}} {{2 1} {3 2}}} +test regexp-23.8 {regexp -all and -line} { + set string "a\nb" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^.*$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1} {2 1}} {{0 0} {2 2}} {{1 0} {3 2}}} +test regexp-23.9 {regexp -all and -line} {knownBug} { + set string "a\nb\n" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^.*$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1} {2 1} {4 3}} {{0 0} {2 2} {4 3}} {{1 0} {3 2} {4 3}}} +test regexp-23.10 {regexp -all and -line} { + set string "a\nb\nc" + list \ + [regexp -all -inline -indices -line -- {^} $string] \ + [regexp -all -inline -indices -line -- {^.*$} $string] \ + [regexp -all -inline -indices -line -- {$} $string] +} {{{0 -1} {2 1} {4 3}} {{0 0} {2 2} {4 4}} {{1 0} {3 2} {5 4}}} +test regexp-23.11 {regexp -all and -line} { + regexp -all -inline -indices -line -- {b} "abb\nb" +} {{1 1} {2 2} {4 4}} + +test regexp-24.1 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} {1 <> 1 <> 1 <>} +test regexp-24.2 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "\n" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 2 "<>\n<>" 2 "<>\n<>" 2 "<>\n<>"] +test regexp-24.3 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "\n\n" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 3 "<>\n<>\n<>" 3 "<>\n<>\n<>" 3 "<>\n<>\n<>"] +test regexp-24.4 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "a" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^.*$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 1 "<>a" 1 "" 1 "a<>"] +test regexp-24.5 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "a\n" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^.*$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 2 "<>a\n<>" 2 "\n<>" 2 "a<>\n<>"] +test regexp-24.6 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "\na" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^.*$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 2 "<>\n<>a" 2 "<>\n" 2 "<>\na<>"] +test regexp-24.7 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "ab\n" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^.*$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 2 "<>ab\n<>" 2 "\n<>" 2 "ab<>\n<>"] +test regexp-24.8 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "a\nb" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^.*$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 2 "<>a\n<>b" 2 "\n" 2 "a<>\nb<>"] +test regexp-24.9 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "a\nb\n" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^.*$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 3 "<>a\n<>b\n<>" 3 "\n\n<>" 3 "a<>\nb<>\n<>"] +test regexp-24.10 {regsub -all and -line} { + foreach {v1 v2 v3} {{} {} {}} {} + set string "a\nb\nc" + list \ + [regsub -line -all {^} $string {<&>} v1] $v1 \ + [regsub -line -all {^.*$} $string {<&>} v2] $v2 \ + [regsub -line -all {$} $string {<&>} v3] $v3 +} [list 3 "<>a\n<>b\n<>c" 3 "\n\n" 3 "a<>\nb<>\nc<>"] +test regexp-24.11 {regsub -all and -line} { + regsub -line -all {b} "abb\nb" {<&>} +} "a\n" + +test regexp-25.1 {regexp without -line option} { + set foo "" + list [regexp {a.*b} "dabc\naxyb\n" foo] $foo +} [list 1 abc\naxyb] +test regexp-25.2 {regexp without -line option} { + set foo "" + list [regexp {^a.*b$} "dabc\naxyb\n" foo] $foo +} {0 {}} +test regexp-25.3 {regexp with -line option} { + set foo "" + list [regexp -line {^a.*b$} "dabc\naxyb\n" foo] $foo +} {1 axyb} +test regexp-25.4 {regexp with -line option} { + set foo "" + list [regexp -line {^a.*b$} "dabc\naxyb\nxb" foo] $foo +} {1 axyb} +test regexp-25.5 {regexp without -line option} { + set foo "" + list [regexp {^a.*b$} "dabc\naxyb\nxb" foo] $foo +} {0 {}} +test regexp-25.6 {regexp without -line option} { + set foo "" + list [regexp {a.*b$} "dabc\naxyb\nxb" foo] $foo +} "1 {abc\naxyb\nxb}" +test regexp-25.7 {regexp with -lineanchor option} { + set foo "" + list [regexp -lineanchor {^a.*b$} "dabc\naxyb\nxb" foo] $foo +} "1 {axyb\nxb}" +test regexp-25.8 {regexp with -lineanchor and -linestop option} { + set foo "" + list [regexp -lineanchor -linestop {^a.*b$} "dabc\naxyb\nxb" foo] $foo +} {1 axyb} +test regexp-25.9 {regexp with -linestop option} { + set foo "" + list [regexp -linestop {a.*b} "ab\naxyb\nxb" foo] $foo +} {1 ab} + +test regexp-26.1 {matches start of line 1 time} { + regexp -all -inline -- {^a+} "aab\naaa" +} {aa} +test regexp-26.2 {matches start of line(s) 2 times} { + regexp -all -inline -line -- {^a+} "aab\naaa" +} {aa aaa} +test regexp-26.3 {effect of -line -all and -start} { + list \ + [regexp -all -inline -line -start 0 -- {^a+} "aab\naaa"] \ + [regexp -all -inline -line -start 1 -- {^a+} "aab\naaa"] \ + [regexp -all -inline -line -start 3 -- {^a+} "aab\naaa"] \ + [regexp -all -inline -line -start 4 -- {^a+} "aab\naaa"] \ +} {{aa aaa} aaa aaa aaa} +# No regexp-26.4 +test regexp-26.5 {match length 0, match length 1} { + regexp -all -inline -line -- {^b*} "a\nb" +} {{} b} +test regexp-26.6 {non reporting capture group} { + regexp -all -inline -line -- {^(?:a+|b)} "aab\naaa" +} {aa aaa} +test regexp-26.7 {Tcl bug 2826551: -line sensitive regexp and -start} { + set match1 {} + set match2 {} + list \ + [regexp -start 0 -indices -line {^a} "\nab" match1] $match1 \ + [regexp -start 1 -indices -line {^a} "\nab" match2] $match2 +} {1 {1 1} 1 {1 1}} +test regexp-26.8 {Tcl bug 2826551: diff regexp with -line option} { + set data "@1\n2\n+3\n@4\n-5\n+6\n7\n@8\n9\n" + regexp -all -inline -line {^@.*\n(?:[^@].*\n?)*} $data +} [list "@1\n2\n+3\n" "@4\n-5\n+6\n7\n" "@8\n9\n"] +test regexp-26.9 {Tcl bug 2826551: diff regexp with embedded -line option} { + set data "@1\n2\n+3\n@4\n-5\n+6\n7\n@8\n9\n" + regexp -all -inline {(?n)^@.*\n(?:[^@].*\n?)*} $data +} [list "@1\n2\n+3\n" "@4\n-5\n+6\n7\n" "@8\n9\n"] +test regexp-26.10 {regexp with -line option} { + regexp -all -inline -line -- {a*} "a\n" +} {a {}} +test regexp-26.11 {regexp without -line option} { + regexp -all -inline -- {a*} "a\n" +} {a {}} +test regexp-26.12 {regexp with -line option} { + regexp -all -inline -line -- {a*} "b\n" +} {{} {}} +test regexp-26.13 {regexp without -line option} { + regexp -all -inline -- {a*} "b\n" +} {{} {}} + # cleanup ::tcltest::cleanupTests return -- cgit v0.12 From faf1d78f0e68dafb8c624ca8f5ddcfafbbe7e775 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Feb 2010 15:20:37 +0000 Subject: [Bug 2949740]: Do not try to put a NULL pipeline channel into binary mode. --- ChangeLog | 5 +++++ generic/tclIOCmd.c | 4 ++-- tests/ioCmd.test | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0ac54b..a191aa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-11 Donal K. Fellows + + * generic/tclIOCmd.c (Tcl_OpenObjCmd): [Bug 2949740]: Make sure that + we do not try to put a NULL pipeline channel into binary mode. + 2010-02-09 Mo DeJong [Bug 2826551, Patch 2948425]: Assorted regexp bugs related to -all, diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 36ac04b..f2078f0 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.65 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.66 2010/02/11 15:20:37 dkf Exp $ */ #include "tclInt.h" @@ -1171,7 +1171,7 @@ Tcl_OpenObjCmd( break; } chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags); - if (binary) { + if (binary && chan) { Tcl_SetChannelOption(interp, chan, "-translation", "binary"); } } diff --git a/tests/ioCmd.test b/tests/ioCmd.test index ce9c98e..cafe3d9 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.50 2009/08/06 22:28:12 andreas_kupries Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.51 2010/02/11 15:20:37 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -395,6 +395,9 @@ test iocmd-11.2 {I/O to command pipelines} {unixOrPc unixExecs} { test iocmd-11.3 {I/O to command pipelines} {unixOrPc unixExecs} { list [catch {open "| echo > \"$path(test5)\"" r+} msg] $msg $::errorCode } {1 {can't read output from command: standard output was redirected} NONE} +test iocmd-11.4 {I/O to command pipelines} unixOrPc { + list [catch {open "| no_such_command_exists" rb} msg] $msg $::errorCode +} {1 {couldn't execute "no_such_command_exists": no such file or directory} {POSIX ENOENT {no such file or directory}}} test iocmd-12.1 {POSIX open access modes: RDONLY} { file delete $path(test1) -- cgit v0.12 From 9f5bce3cf43a2bddf371367d361c3fd289131e4a Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 11 Feb 2010 15:21:12 +0000 Subject: Correct date --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a191aa1..78710d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ * generic/tclIOCmd.c (Tcl_OpenObjCmd): [Bug 2949740]: Make sure that we do not try to put a NULL pipeline channel into binary mode. -2010-02-09 Mo DeJong +2010-02-11 Mo DeJong [Bug 2826551, Patch 2948425]: Assorted regexp bugs related to -all, -line and -start options and newlines. -- cgit v0.12 From bbe0b1645349bb22662c4a8858a4fce1e5e07132 Mon Sep 17 00:00:00 2001 From: mdejong Date: Fri, 12 Feb 2010 03:21:32 +0000 Subject: add tests for explicit backslash zero as argument to list command --- ChangeLog | 5 +++++ tests/list.test | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 78710d9..a0e4f09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-11 Mo DeJong + + * tests/list.test: Add tests for explicit \0 in + a string argument to the list command. + 2010-02-11 Donal K. Fellows * generic/tclIOCmd.c (Tcl_OpenObjCmd): [Bug 2949740]: Make sure that diff --git a/tests/list.test b/tests/list.test index 01dc060..0dd2d73 100644 --- a/tests/list.test +++ b/tests/list.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: list.test,v 1.7 2003/07/24 16:05:24 dgp Exp $ +# RCS: @(#) $Id: list.test,v 1.8 2010/02/12 03:21:32 mdejong Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -46,6 +46,26 @@ test list-1.23 {basic tests} {list \{} "\\{" test list-1.24 {basic tests} {list} {} test list-1.25 {basic tests} {list # #} {{#} #} test list-1.26 {basic tests} {list #\{ #\{} {\#\{ #\{} +test list-1.27 {basic null treatment} { + set l [list "" "\0" "\0\0"] + set e "{} \0 \0\0" + string equal $l $e +} 1 +test list-1.28 {basic null treatment} { + set result "\0a\0b" + list $result [string length $result] +} "\0a\0b 4" +test list-1.29 {basic null treatment} { + set result "\0a\0b" + set srep "$result 4" + set lrep [list $result [string length $result]] + string equal $srep $lrep +} 1 +test list-1.30 {basic null treatment} { + set l [list "\0abc" "xyz"] + set e "\0abc xyz" + string equal $l $e +} 1 # For the next round of tests create a list and then pick it apart # with "index" to make sure that we get back exactly what went in. -- cgit v0.12 From 672e584d1564e03d6e373dee3c158a73e3679f2a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 13 Feb 2010 13:31:19 +0000 Subject: use -pipe for gcc on win32 (mingw/cygwin) --- ChangeLog | 5 +++++ win/configure | 12 ++---------- win/tcl.m4 | 12 ++---------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0e4f09..6a28ab3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-12 Jan Nijtmans + + * win/tcl.m4 use -pipe for gcc on win32 + * win/configure (mingw/cygwin) (regenerated) + 2010-02-11 Mo DeJong * tests/list.test: Add tests for explicit \0 in diff --git a/win/configure b/win/configure index 12fadb8..11807a1 100755 --- a/win/configure +++ b/win/configure @@ -3920,13 +3920,8 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} MAKE_EXE="\${CC} -o \$@" LIBPREFIX="lib" - #if test "$ac_cv_cygwin" = "yes"; then - # extra_cflags="-mno-cygwin" - # extra_ldflags="-mno-cygwin" - #else - # extra_cflags="" - # extra_ldflags="" - #fi + extra_cflags="-pipe" + extra_ldflags="-pipe" if test "$ac_cv_cygwin" = "yes"; then touch ac$$.c @@ -3941,9 +3936,6 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} esac fi rm -f ac$$.o ac$$.c - else - extra_cflags='' - extra_ldflags='' fi if test "${SHARED_BUILD}" = "0" ; then diff --git a/win/tcl.m4 b/win/tcl.m4 index 39e4fe1..bdcced8 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -477,13 +477,8 @@ file for information about building with Mingw.]) MAKE_EXE="\${CC} -o \[$]@" LIBPREFIX="lib" - #if test "$ac_cv_cygwin" = "yes"; then - # extra_cflags="-mno-cygwin" - # extra_ldflags="-mno-cygwin" - #else - # extra_cflags="" - # extra_ldflags="" - #fi + extra_cflags="-pipe" + extra_ldflags="-pipe" if test "$ac_cv_cygwin" = "yes"; then touch ac$$.c @@ -498,9 +493,6 @@ file for information about building with Mingw.]) esac fi rm -f ac$$.o ac$$.c - else - extra_cflags='' - extra_ldflags='' fi if test "${SHARED_BUILD}" = "0" ; then -- cgit v0.12 From e41e7e0ccb2301f8565b998e12838088ecd4cef0 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 13 Feb 2010 13:33:06 +0000 Subject: Add .lib, .exp and .res to .cvsignore --- ChangeLog | 1 + win/.cvsignore | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6a28ab3..e48cc1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * win/tcl.m4 use -pipe for gcc on win32 * win/configure (mingw/cygwin) (regenerated) + * win/.cvsignore Add .lib, .exp and .res here 2010-02-11 Mo DeJong diff --git a/win/.cvsignore b/win/.cvsignore index 24341ef..3f15505 100644 --- a/win/.cvsignore +++ b/win/.cvsignore @@ -21,3 +21,6 @@ config.status tcl.sln tcl.suo *.manifest +*.res +*.exp +*.lib -- cgit v0.12 From 865200e0f391f7d31fcb7686023bbebf52b06067 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 13 Feb 2010 18:11:05 +0000 Subject: Hive off the ensemble code into its own file. Split the [switch] compiler for sanity's sake. --- ChangeLog | 20 +- generic/tclCompCmds.c | 1047 ++++++----------- generic/tclCompile.h | 90 +- generic/tclEnsemble.c | 2965 +++++++++++++++++++++++++++++++++++++++++++++++++ generic/tclInt.h | 91 +- generic/tclNamesp.c | 2899 ++--------------------------------------------- unix/Makefile.in | 9 +- win/Makefile.in | 3 +- win/makefile.bc | 1 + win/makefile.vc | 3 +- 10 files changed, 3623 insertions(+), 3505 deletions(-) create mode 100644 generic/tclEnsemble.c diff --git a/ChangeLog b/ChangeLog index e48cc1d..6585b03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,23 @@ +2010-02-13 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileSwitchCmd): Divided the [switch] + compiler into three pieces (after the model of [try]): a parser, an + instruction-issuer for chained tests, and an instruction-issuer for + jump tables. + + * generic/tclEnsemble.c: Split the ensemble engine out into its own + file rather than keeping it mashed together with the namespace code. + 2010-02-12 Jan Nijtmans - * win/tcl.m4 use -pipe for gcc on win32 - * win/configure (mingw/cygwin) (regenerated) - * win/.cvsignore Add .lib, .exp and .res here + * win/tcl.m4: Use -pipe for gcc on win32 + * win/configure: (mingw/cygwin) (regenerated) + * win/.cvsignore: Add .lib, .exp and .res here 2010-02-11 Mo DeJong - * tests/list.test: Add tests for explicit \0 in - a string argument to the list command. + * tests/list.test: Add tests for explicit \0 in a string argument to + the list command. 2010-02-11 Donal K. Fellows diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index d2693dc..b9cf5f6 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,138 +12,13 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.161 2010/02/09 22:20:27 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.162 2010/02/13 18:11:05 dkf Exp $ */ #include "tclInt.h" #include "tclCompile.h" /* - * Macro that encapsulates an efficiency trick that avoids a function call for - * the simplest of compiles. The ANSI C "prototype" for this macro is: - * - * static void CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr, - * Tcl_Interp *interp, int word); - */ - -#define CompileWord(envPtr, tokenPtr, interp, word) \ - if ((tokenPtr)->type == TCL_TOKEN_SIMPLE_WORD) { \ - TclEmitPush(TclRegisterNewLiteral((envPtr), (tokenPtr)[1].start, \ - (tokenPtr)[1].size), (envPtr)); \ - } else { \ - envPtr->line = mapPtr->loc[eclIndex].line[word]; \ - envPtr->clNext = mapPtr->loc[eclIndex].next[word]; \ - TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ - (envPtr)); \ - } - -/* - * TIP #280: Remember the per-word line information of the current command. An - * index is used instead of a pointer as recursive compilation may reallocate, - * i.e. move, the array. This is also the reason to save the nuloc now, it may - * change during the course of the function. - * - * Macro to encapsulate the variable definition and setup. - */ - -#define DefineLineInformation \ - ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \ - int eclIndex = mapPtr->nuloc - 1 - -#define SetLineInformation(word) \ - envPtr->line = mapPtr->loc [eclIndex].line [(word)]; \ - envPtr->clNext = mapPtr->loc [eclIndex].next [(word)] - -/* - * Convenience macro for use when compiling bodies of commands. The ANSI C - * "prototype" for this macro is: - * - * static void CompileBody(CompileEnv *envPtr, Tcl_Token *tokenPtr, - * Tcl_Interp *interp); - */ - -#define CompileBody(envPtr, tokenPtr, interp) \ - TclCompileCmdWord((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ - (envPtr)) - -/* - * Convenience macro for use when compiling tokens to be pushed. The ANSI C - * "prototype" for this macro is: - * - * static void CompileTokens(CompileEnv *envPtr, Tcl_Token *tokenPtr, - * Tcl_Interp *interp); - */ - -#define CompileTokens(envPtr, tokenPtr, interp) \ - TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ - (envPtr)); -/* - * Convenience macro for use when pushing literals. The ANSI C "prototype" for - * this macro is: - * - * static void PushLiteral(CompileEnv *envPtr, - * const char *string, int length); - */ - -#define PushLiteral(envPtr, string, length) \ - TclEmitPush(TclRegisterNewLiteral((envPtr), (string), (length)), (envPtr)) - -/* - * Macro to advance to the next token; it is more mnemonic than the address - * arithmetic that it replaces. The ANSI C "prototype" for this macro is: - * - * static Tcl_Token * TokenAfter(Tcl_Token *tokenPtr); - */ - -#define TokenAfter(tokenPtr) \ - ((tokenPtr) + ((tokenPtr)->numComponents + 1)) - -/* - * Macro to get the offset to the next instruction to be issued. The ANSI C - * "prototype" for this macro is: - * - * static int CurrentOffset(CompileEnv *envPtr); - */ - -#define CurrentOffset(envPtr) \ - ((envPtr)->codeNext - (envPtr)->codeStart) - -/* - * Note: the exceptDepth is a bit of a misnomer: TEBC only needs the - * maximal depth of nested CATCH ranges in order to alloc runtime - * memory. These macros should compute precisely that? OTOH, the nesting depth - * of LOOP ranges is an interesting datum for debugging purposes, and that is - * what we compute now. - * - * static int DeclareExceptionRange(CompileEnv *envPtr, int type); - * static int ExceptionRangeStarts(CompileEnv *envPtr, int index); - * static void ExceptionRangeEnds(CompileEnv *envPtr, int index); - * static void ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL); - */ - -#define DeclareExceptionRange(envPtr, type) \ - (TclCreateExceptRange((type), (envPtr))) -#define ExceptionRangeStarts(envPtr, index) \ - (((envPtr)->exceptDepth++), \ - ((envPtr)->maxExceptDepth = \ - TclMax((envPtr)->exceptDepth, (envPtr)->maxExceptDepth)), \ - ((envPtr)->exceptArrayPtr[(index)].codeOffset = CurrentOffset(envPtr))) -#define ExceptionRangeEnds(envPtr, index) \ - (((envPtr)->exceptDepth--), \ - ((envPtr)->exceptArrayPtr[(index)].numCodeBytes = \ - CurrentOffset(envPtr) - (envPtr)->exceptArrayPtr[(index)].codeOffset)) -#define ExceptionRangeTarget(envPtr, index, targetType) \ - ((envPtr)->exceptArrayPtr[(index)].targetType = CurrentOffset(envPtr)) - -/* - * Check if there is an LVT for compiled locals - */ - -#define EnvHasLVT(envPtr) \ - (envPtr->procPtr || envPtr->iPtr->varFramePtr->localCachePtr) - - -/* * Prototypes for procedures defined later in this file: */ @@ -182,6 +57,18 @@ static int CompileUnaryOpCmd(Tcl_Interp *interp, static void CompileReturnInternal(CompileEnv *envPtr, unsigned char op, int code, int level, Tcl_Obj *returnOpts); +static void IssueSwitchChainedTests(Tcl_Interp *interp, + CompileEnv *envPtr, ExtCmdLoc *mapPtr, + int eclIndex, int mode, int noCase, + int valueIndex, Tcl_Token *valueTokenPtr, + int numWords, Tcl_Token **bodyToken, + int *bodyLines, int **bodyNext); +static void IssueSwitchJumpTable(Tcl_Interp *interp, + CompileEnv *envPtr, ExtCmdLoc *mapPtr, + int eclIndex, int valueIndex, + Tcl_Token *valueTokenPtr, int numWords, + Tcl_Token **bodyToken, int *bodyLines, + int **bodyContLines); static int IssueTryFinallyInstructions(Tcl_Interp *interp, CompileEnv *envPtr, Tcl_Token *bodyToken, int numHandlers, int *matchCodes, @@ -194,6 +81,42 @@ static int IssueTryInstructions(Tcl_Interp *interp, Tcl_Obj **matchClauses, int *resultVarIndices, int *optionVarIndices, Tcl_Token **handlerTokens); +/* + * Macro that encapsulates an efficiency trick that avoids a function call for + * the simplest of compiles. The ANSI C "prototype" for this macro is: + * + * static void CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr, + * Tcl_Interp *interp, int word); + */ + +#define CompileWord(envPtr, tokenPtr, interp, word) \ + if ((tokenPtr)->type == TCL_TOKEN_SIMPLE_WORD) { \ + TclEmitPush(TclRegisterNewLiteral((envPtr), (tokenPtr)[1].start, \ + (tokenPtr)[1].size), (envPtr)); \ + } else { \ + envPtr->line = mapPtr->loc[eclIndex].line[word]; \ + envPtr->clNext = mapPtr->loc[eclIndex].next[word]; \ + TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ + (envPtr)); \ + } + +/* + * TIP #280: Remember the per-word line information of the current command. An + * index is used instead of a pointer as recursive compilation may reallocate, + * i.e. move, the array. This is also the reason to save the nuloc now, it may + * change during the course of the function. + * + * Macro to encapsulate the variable definition and setup. + */ + +#define DefineLineInformation \ + ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \ + int eclIndex = mapPtr->nuloc - 1 + +#define SetLineInformation(word) \ + envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \ + envPtr->clNext = mapPtr->loc[eclIndex].next[(word)] + #define PushVarNameWord(i,v,e,f,l,s,sc,word) \ PushVarName(i,v,e,f,l,s,sc, \ mapPtr->loc[eclIndex].line[(word)], \ @@ -4227,33 +4150,19 @@ TclCompileSwitchCmd( { Tcl_Token *tokenPtr; /* Pointer to tokens in command. */ int numWords; /* Number of words in command. */ - Tcl_Token *valueTokenPtr; /* Token for the value to switch on. */ enum {Switch_Exact, Switch_Glob, Switch_Regexp} mode; /* What kind of switch are we doing? */ - Tcl_Token *bodyTokenArray; /* Array of real pattern list items. */ Tcl_Token **bodyToken; /* Array of pointers to pattern list items. */ int *bodyLines; /* Array of line numbers for body list * items. */ - int **bodyNext; - int foundDefault; /* Flag to indicate whether a "default" clause - * is present. */ - - JumpFixup *fixupArray; /* Array of forward-jump fixup records. */ - int *fixupTargetArray; /* Array of places for fixups to point at. */ - int fixupCount; /* Number of places to fix up. */ - int contFixIndex; /* Where the first of the jumps due to a group - * of continuation bodies starts, or -1 if - * there aren't any. */ - int contFixCount; /* Number of continuation bodies pointing to - * the current (or next) real body. */ - - int savedStackDepth = envPtr->currStackDepth; + int **bodyContLines; /* Array of continuation line info. */ int noCase; /* Has the -nocase flag been given? */ int foundMode = 0; /* Have we seen a mode flag yet? */ int isListedArms = 0; int i, valueIndex; + int result = TCL_ERROR; DefineLineInformation; /* TIP #280 */ int *clNext = envPtr->clNext; @@ -4434,7 +4343,7 @@ TclCompileSwitchCmd( bodyTokenArray = (Tcl_Token *) ckalloc(sizeof(Tcl_Token) * numWords); bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); bodyLines = (int *) ckalloc(sizeof(int) * numWords); - bodyNext = (int **) ckalloc(sizeof(int*) * numWords); + bodyContLines = (int **) ckalloc(sizeof(int*) * numWords); /* * Locate the start of the arms within the overall word. @@ -4475,11 +4384,7 @@ TclCompileSwitchCmd( (tokenStartPtr < tokenPtr[1].start+tokenPtr[1].size && !isspace(UCHAR(*tokenStartPtr)))) { ckfree((char *) argv); - ckfree((char *) bodyToken); - ckfree((char *) bodyTokenArray); - ckfree((char *) bodyLines); - ckfree((char *) bodyNext); - return TCL_ERROR; + goto freeTemporaries; } /* @@ -4492,7 +4397,7 @@ TclCompileSwitchCmd( TclAdvanceContinuations(&bline, &clNext, bodyTokenArray[i].start - envPtr->source); bodyLines[i] = bline; - bodyNext[i] = clNext; + bodyContLines[i] = clNext; p = bodyTokenArray[i].start; while (isspace(UCHAR(*tokenStartPtr))) { @@ -4517,11 +4422,7 @@ TclCompileSwitchCmd( */ if (tokenStartPtr != tokenPtr[1].start+tokenPtr[1].size) { - ckfree((char *) bodyToken); - ckfree((char *) bodyTokenArray); - ckfree((char *) bodyLines); - ckfree((char *) bodyNext); - return TCL_ERROR; + goto freeTemporaries; } } else if (numWords % 2 || numWords == 0) { @@ -4541,7 +4442,7 @@ TclCompileSwitchCmd( bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); bodyLines = (int *) ckalloc(sizeof(int) * numWords); - bodyNext = (int **) ckalloc(sizeof(int*) * numWords); + bodyContLines = (int **) ckalloc(sizeof(int*) * numWords); bodyTokenArray = NULL; for (i=0 ; itype != TCL_TOKEN_SIMPLE_WORD || tokenPtr->numComponents != 1) { - ckfree((char *) bodyToken); - ckfree((char *) bodyLines); - ckfree((char *) bodyNext); - return TCL_ERROR; + goto freeTemporaries; } bodyToken[i] = tokenPtr+1; @@ -4564,7 +4462,7 @@ TclCompileSwitchCmd( */ bodyLines[i] = mapPtr->loc[eclIndex].line[valueIndex+1+i]; - bodyNext[i] = mapPtr->loc[eclIndex].next[valueIndex+1+i]; + bodyContLines[i] = mapPtr->loc[eclIndex].next[valueIndex+1+i]; tokenPtr = TokenAfter(tokenPtr); } } @@ -4576,200 +4474,98 @@ TclCompileSwitchCmd( if (bodyToken[numWords-1]->size == 1 && bodyToken[numWords-1]->start[0] == '-') { - ckfree((char *) bodyToken); - ckfree((char *) bodyLines); - ckfree((char *) bodyNext); - if (bodyTokenArray != NULL) { - ckfree((char *) bodyTokenArray); - } - return TCL_ERROR; + goto freeTemporaries; } /* * Now we commit to generating code; the parsing stage per se is done. - * First, we push the value we're matching against on the stack. - */ - - SetLineInformation(valueIndex); - CompileTokens(envPtr, valueTokenPtr, interp); - - /* * Check if we can generate a jump table, since if so that's faster than * doing an explicit compare with each body. Note that we're definitely * over-conservative with determining whether we can do the jump table, * but it handles the most common case well enough. */ - if (isListedArms && mode == Switch_Exact && !noCase) { - JumptableInfo *jtPtr; - int infoIndex, isNew, *finalFixups, numRealBodies = 0, jumpLocation; - int mustGenerate, jumpToDefault; - Tcl_DString buffer; - Tcl_HashEntry *hPtr; - - /* - * Compile the switch by using a jump table, which is basically a - * hashtable that maps from literal values to match against to the - * offset (relative to the INST_JUMP_TABLE instruction) to jump to. - * The jump table itself is independent of any invokation of the - * bytecode, and as such is stored in an auxData block. - * - * Start by allocating the jump table itself, plus some workspace. - */ - - jtPtr = (JumptableInfo *) ckalloc(sizeof(JumptableInfo)); - Tcl_InitHashTable(&jtPtr->hashTable, TCL_STRING_KEYS); - infoIndex = TclCreateAuxData(jtPtr, &tclJumptableInfoType, envPtr); - finalFixups = (int *) ckalloc(sizeof(int) * (numWords/2)); - foundDefault = 0; - mustGenerate = 1; - - /* - * Next, issue the instruction to do the jump, together with what we - * want to do if things do not work out (jump to either the default - * clause or the "default" default, which just sets the result to - * empty). Note that we will come back and rewrite the jump's offset - * parameter when we know what it should be, and that all jumps we - * issue are of the wide kind because that makes the code much easier - * to debug! - */ - - jumpLocation = CurrentOffset(envPtr); - TclEmitInstInt4(INST_JUMP_TABLE, infoIndex, envPtr); - jumpToDefault = CurrentOffset(envPtr); - TclEmitInstInt4(INST_JUMP4, 0, envPtr); - - for (i=0 ; isize != 7 || - memcmp(bodyToken[numWords-2]->start, "default", 7)) { - /* - * This is not a default clause, so insert the current - * location as a target in the jump table (assuming it isn't - * already there, which would indicate that this clause is - * probably masked by an earlier one). Note that we use a - * Tcl_DString here simply because the hash API does not let - * us specify the string length. - */ - - Tcl_DStringInit(&buffer); - Tcl_DStringAppend(&buffer, bodyToken[i]->start, - bodyToken[i]->size); - hPtr = Tcl_CreateHashEntry(&jtPtr->hashTable, - Tcl_DStringValue(&buffer), &isNew); - if (isNew) { - /* - * First time we've encountered this match clause, so it - * must point to here. - */ - - Tcl_SetHashValue(hPtr, (ClientData) - (CurrentOffset(envPtr) - jumpLocation)); - } - Tcl_DStringFree(&buffer); - } else { - /* - * This is a default clause, so patch up the fallthrough from - * the INST_JUMP_TABLE instruction to here. - */ - - foundDefault = 1; - isNew = 1; - TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, - envPtr->codeStart+jumpToDefault+1); - } - - /* - * Now, for each arm we must deal with the body of the clause. - * - * If this is a continuation body (never true of a final clause, - * whether default or not) we're done because the next jump target - * will also point here, so we advance to the next clause. - */ - - if (bodyToken[i+1]->size == 1 && bodyToken[i+1]->start[0] == '-') { - mustGenerate = 1; - continue; - } - - /* - * Also skip this arm if its only match clause is masked. (We - * could probably be more aggressive about this, but that would be - * much more difficult to get right.) - */ - - if (!isNew && !mustGenerate) { - continue; - } - mustGenerate = 0; - - /* - * Compile the body of the arm. - */ - - envPtr->line = bodyLines[i+1]; /* TIP #280 */ - envPtr->clNext = bodyNext[i+1]; /* TIP #280 */ - TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); - - /* - * Compile a jump in to the end of the command if this body is - * anything other than a user-supplied default arm (to either skip - * over the remaining bodies or the code that generates an empty - * result). - */ - - if (i+2 < numWords || !foundDefault) { - finalFixups[numRealBodies++] = CurrentOffset(envPtr); - - /* - * Easier by far to issue this jump as a fixed-width jump. - * Otherwise we'd need to do a lot more (and more awkward) - * rewriting when we fixed this all up. - */ - - TclEmitInstInt4(INST_JUMP4, 0, envPtr); - } - } - - /* - * We're at the end. If we've not already done so through the - * processing of a user-supplied default clause, add in a "default" - * default clause now. - */ + if ((isListedArms) && (mode == Switch_Exact) && (!noCase)) { + IssueSwitchJumpTable(interp, envPtr, mapPtr, eclIndex, valueIndex, + valueTokenPtr, numWords, bodyToken, bodyLines, bodyContLines); + } else { + IssueSwitchChainedTests(interp, envPtr, mapPtr, eclIndex, mode,noCase, + valueIndex, valueTokenPtr, numWords, bodyToken, bodyLines, + bodyContLines); + } + result = TCL_OK; - if (!foundDefault) { - TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, - envPtr->codeStart+jumpToDefault+1); - PushLiteral(envPtr, "", 0); - } + /* + * Clean up all our temporary space and return. + */ - /* - * No more instructions to be issued; everything that needs to jump to - * the end of the command is fixed up at this point. - */ + freeTemporaries: + ckfree((char *) bodyToken); + ckfree((char *) bodyLines); + ckfree((char *) bodyContLines); + if (bodyTokenArray != NULL) { + ckfree((char *) bodyTokenArray); + } + return result; +} + +/* + *---------------------------------------------------------------------- + * + * IssueSwitchChainedTests -- + * + * Generate instructions for a [switch] command that is to be compiled + * into a sequence of tests. This is the generic handle-everything mode + * that inherently has performance that is (on average) linear in the + * number of tests. It is the only mode that can handle -glob and -regexp + * matches, or anything that is case-insensitive. It does not handle the + * wild-and-wooly end of regexp matching (i.e., capture of match results) + * so that's when we spill to the interpreted version. + * + *---------------------------------------------------------------------- + */ - for (i=0 ; icodeStart+finalFixups[i]+1); - } +static void +IssueSwitchChainedTests( + Tcl_Interp *interp, /* Context for compiling script bodies. */ + CompileEnv *envPtr, /* Holds resulting instructions. */ + ExtCmdLoc *mapPtr, /* For mapping tokens to their source code + * location. */ + int eclIndex, + int mode, /* Exact, Glob or Regexp */ + int noCase, /* Case-insensitivity flag. */ + int valueIndex, /* The value to match against. */ + Tcl_Token *valueTokenPtr, + int numBodyTokens, /* Number of tokens describing things the + * switch can match against and bodies to + * execute when the match succeeds. */ + Tcl_Token **bodyToken, /* Array of pointers to pattern list items. */ + int *bodyLines, /* Array of line numbers for body list + * items. */ + int **bodyContLines) /* Array of continuation line info. */ +{ + enum {Switch_Exact, Switch_Glob, Switch_Regexp}; + int savedStackDepth = envPtr->currStackDepth; + int foundDefault; /* Flag to indicate whether a "default" clause + * is present. */ + JumpFixup *fixupArray; /* Array of forward-jump fixup records. */ + int *fixupTargetArray; /* Array of places for fixups to point at. */ + int fixupCount; /* Number of places to fix up. */ + int contFixIndex; /* Where the first of the jumps due to a group + * of continuation bodies starts, or -1 if + * there aren't any. */ + int contFixCount; /* Number of continuation bodies pointing to + * the current (or next) real body. */ + int nextArmFixupIndex; + int simple, exact; /* For extracting the type of regexp. */ + int i; - /* - * Clean up all our temporary space and return. - */ + /* + * First, we push the value we're matching against on the stack. + */ - ckfree((char *) finalFixups); - ckfree((char *) bodyToken); - ckfree((char *) bodyLines); - ckfree((char *) bodyNext); - if (bodyTokenArray != NULL) { - ckfree((char *) bodyTokenArray); - } - return TCL_OK; - } + SetLineInformation(valueIndex); + CompileTokens(envPtr, valueTokenPtr, interp); /* * Generate a test for each arm. @@ -4777,34 +4573,33 @@ TclCompileSwitchCmd( contFixIndex = -1; contFixCount = 0; - fixupArray = (JumpFixup *) ckalloc(sizeof(JumpFixup) * numWords); - fixupTargetArray = (int *) ckalloc(sizeof(int) * numWords); - memset(fixupTargetArray, 0, numWords * sizeof(int)); + fixupArray = TclStackAlloc(interp, sizeof(JumpFixup) * numBodyTokens); + fixupTargetArray = TclStackAlloc(interp, sizeof(int) * numBodyTokens); + memset(fixupTargetArray, 0, numBodyTokens * sizeof(int)); fixupCount = 0; foundDefault = 0; - for (i=0 ; icurrStackDepth = savedStackDepth + 1; - if (i!=numWords-2 || bodyToken[numWords-2]->size != 7 || - memcmp(bodyToken[numWords-2]->start, "default", 7)) { + if (i!=numBodyTokens-2 || bodyToken[numBodyTokens-2]->size != 7 || + memcmp(bodyToken[numBodyTokens-2]->start, "default", 7)) { /* * Generate the test for the arm. */ switch (mode) { case Switch_Exact: - TclEmitOpcode(INST_DUP, envPtr); - TclCompileTokens(interp, bodyToken[i], 1, envPtr); - TclEmitOpcode(INST_STR_EQ, envPtr); + TclEmitOpcode(INST_DUP, envPtr); + TclCompileTokens(interp, bodyToken[i], 1, envPtr); + TclEmitOpcode(INST_STR_EQ, envPtr); break; case Switch_Glob: - TclCompileTokens(interp, bodyToken[i], 1, envPtr); - TclEmitInstInt4(INST_OVER, 1, envPtr); - TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); + TclCompileTokens(interp, bodyToken[i], 1, envPtr); + TclEmitInstInt4(INST_OVER, 1, envPtr); + TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); break; - case Switch_Regexp: { - int simple = 0, exact = 0; + case Switch_Regexp: + simple = exact = 0; /* * Keep in sync with TclCompileRegexpCmd. @@ -4840,14 +4635,8 @@ TclCompileSwitchCmd( TclCompileTokens(interp, bodyToken[i], 1, envPtr); } - TclEmitInstInt4(INST_OVER, 1, envPtr); - if (simple) { - if (exact && !noCase) { - TclEmitOpcode(INST_STR_EQ, envPtr); - } else { - TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); - } - } else { + TclEmitInstInt4(INST_OVER, 1, envPtr); + if (!simple) { /* * Pass correct RE compile flags. We use only Int1 * (8-bit), but that handles all the flags we want to @@ -4858,10 +4647,13 @@ TclCompileSwitchCmd( int cflags = TCL_REG_ADVANCED | (noCase ? TCL_REG_NOCASE : 0); - TclEmitInstInt1(INST_REGEXP, cflags, envPtr); + TclEmitInstInt1(INST_REGEXP, cflags, envPtr); + } else if (exact && !noCase) { + TclEmitOpcode(INST_STR_EQ, envPtr); + } else { + TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); } break; - } default: Tcl_Panic("unknown switch mode: %d", mode); } @@ -4878,13 +4670,14 @@ TclCompileSwitchCmd( contFixCount = 0; } TclEmitForwardJump(envPtr, TCL_TRUE_JUMP, - fixupArray+contFixIndex+contFixCount); + &fixupArray[contFixIndex+contFixCount]); fixupCount++; contFixCount++; continue; } - TclEmitForwardJump(envPtr, TCL_FALSE_JUMP, fixupArray+fixupCount); + TclEmitForwardJump(envPtr, TCL_FALSE_JUMP, + &fixupArray[fixupCount]); nextArmFixupIndex = fixupCount; fixupCount++; } else { @@ -4923,32 +4716,21 @@ TclCompileSwitchCmd( * pattern. */ - TclEmitOpcode(INST_POP, envPtr); + TclEmitOpcode(INST_POP, envPtr); envPtr->currStackDepth = savedStackDepth + 1; envPtr->line = bodyLines[i+1]; /* TIP #280 */ - envPtr->clNext = bodyNext[i+1]; /* TIP #280 */ + envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */ TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); if (!foundDefault) { TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, - fixupArray+fixupCount); + &fixupArray[fixupCount]); fixupCount++; fixupTargetArray[nextArmFixupIndex] = CurrentOffset(envPtr); } } /* - * Clean up all our temporary space and return. - */ - - ckfree((char *) bodyToken); - ckfree((char *) bodyLines); - ckfree((char *) bodyNext); - if (bodyTokenArray != NULL) { - ckfree((char *) bodyTokenArray); - } - - /* * Discard the value we are matching against unless we've had a default * clause (in which case it will already be gone due to the code at the * start of processing an arm, guaranteed) and make the result of the @@ -4956,7 +4738,7 @@ TclCompileSwitchCmd( */ if (!foundDefault) { - TclEmitOpcode(INST_POP, envPtr); + TclEmitOpcode(INST_POP, envPtr); PushLiteral(envPtr, "", 0); } @@ -4991,11 +4773,208 @@ TclCompileSwitchCmd( } } } - ckfree((char *) fixupArray); - ckfree((char *) fixupTargetArray); + TclStackFree(interp, fixupTargetArray); + TclStackFree(interp, fixupArray); envPtr->currStackDepth = savedStackDepth + 1; - return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * IssueSwitchJumpTable -- + * + * Generate instructions for a [switch] command that is to be compiled + * into a jump table. This only handles the case where case-sensitive, + * exact matching is used, but this is actually the most common case in + * real code. + * + *---------------------------------------------------------------------- + */ + +static void +IssueSwitchJumpTable( + Tcl_Interp *interp, /* Context for compiling script bodies. */ + CompileEnv *envPtr, /* Holds resulting instructions. */ + ExtCmdLoc *mapPtr, /* For mapping tokens to their source code + * location. */ + int eclIndex, + int valueIndex, /* The value to match against. */ + Tcl_Token *valueTokenPtr, + int numBodyTokens, /* Number of tokens describing things the + * switch can match against and bodies to + * execute when the match succeeds. */ + Tcl_Token **bodyToken, /* Array of pointers to pattern list items. */ + int *bodyLines, /* Array of line numbers for body list + * items. */ + int **bodyContLines) /* Array of continuation line info. */ +{ + JumptableInfo *jtPtr; + int infoIndex, isNew, *finalFixups, numRealBodies = 0, jumpLocation; + int mustGenerate, foundDefault, jumpToDefault, i; + Tcl_DString buffer; + Tcl_HashEntry *hPtr; + + /* + * First, we push the value we're matching against on the stack. + */ + + SetLineInformation(valueIndex); + CompileTokens(envPtr, valueTokenPtr, interp); + + /* + * Compile the switch by using a jump table, which is basically a + * hashtable that maps from literal values to match against to the offset + * (relative to the INST_JUMP_TABLE instruction) to jump to. The jump + * table itself is independent of any invokation of the bytecode, and as + * such is stored in an auxData block. + * + * Start by allocating the jump table itself, plus some workspace. + */ + + jtPtr = (JumptableInfo *) ckalloc(sizeof(JumptableInfo)); + Tcl_InitHashTable(&jtPtr->hashTable, TCL_STRING_KEYS); + infoIndex = TclCreateAuxData(jtPtr, &tclJumptableInfoType, envPtr); + finalFixups = TclStackAlloc(interp, sizeof(int) * (numBodyTokens/2)); + foundDefault = 0; + mustGenerate = 1; + + /* + * Next, issue the instruction to do the jump, together with what we want + * to do if things do not work out (jump to either the default clause or + * the "default" default, which just sets the result to empty). Note that + * we will come back and rewrite the jump's offset parameter when we know + * what it should be, and that all jumps we issue are of the wide kind + * because that makes the code much easier to debug! + */ + + jumpLocation = CurrentOffset(envPtr); + TclEmitInstInt4(INST_JUMP_TABLE, infoIndex, envPtr); + jumpToDefault = CurrentOffset(envPtr); + TclEmitInstInt4(INST_JUMP4, 0, envPtr); + + for (i=0 ; isize != 7 || + memcmp(bodyToken[numBodyTokens-2]->start, "default", 7)) { + /* + * This is not a default clause, so insert the current location as + * a target in the jump table (assuming it isn't already there, + * which would indicate that this clause is probably masked by an + * earlier one). Note that we use a Tcl_DString here simply + * because the hash API does not let us specify the string length. + */ + + Tcl_DStringInit(&buffer); + Tcl_DStringAppend(&buffer, bodyToken[i]->start, + bodyToken[i]->size); + hPtr = Tcl_CreateHashEntry(&jtPtr->hashTable, + Tcl_DStringValue(&buffer), &isNew); + if (isNew) { + /* + * First time we've encountered this match clause, so it must + * point to here. + */ + + Tcl_SetHashValue(hPtr, (ClientData) + (CurrentOffset(envPtr) - jumpLocation)); + } + Tcl_DStringFree(&buffer); + } else { + /* + * This is a default clause, so patch up the fallthrough from the + * INST_JUMP_TABLE instruction to here. + */ + + foundDefault = 1; + isNew = 1; + TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, + envPtr->codeStart+jumpToDefault+1); + } + + /* + * Now, for each arm we must deal with the body of the clause. + * + * If this is a continuation body (never true of a final clause, + * whether default or not) we're done because the next jump target + * will also point here, so we advance to the next clause. + */ + + if (bodyToken[i+1]->size == 1 && bodyToken[i+1]->start[0] == '-') { + mustGenerate = 1; + continue; + } + + /* + * Also skip this arm if its only match clause is masked. (We could + * probably be more aggressive about this, but that would be much more + * difficult to get right.) + */ + + if (!isNew && !mustGenerate) { + continue; + } + mustGenerate = 0; + + /* + * Compile the body of the arm. + */ + + envPtr->line = bodyLines[i+1]; /* TIP #280 */ + envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */ + TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); + + /* + * Compile a jump in to the end of the command if this body is + * anything other than a user-supplied default arm (to either skip + * over the remaining bodies or the code that generates an empty + * result). + */ + + if (i+2 < numBodyTokens || !foundDefault) { + finalFixups[numRealBodies++] = CurrentOffset(envPtr); + + /* + * Easier by far to issue this jump as a fixed-width jump, since + * otherwise we'd need to do a lot more (and more awkward) + * rewriting when we fixed this all up. + */ + + TclEmitInstInt4(INST_JUMP4, 0, envPtr); + } + } + + /* + * We're at the end. If we've not already done so through the processing + * of a user-supplied default clause, add in a "default" default clause + * now. + */ + + if (!foundDefault) { + TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, + envPtr->codeStart+jumpToDefault+1); + PushLiteral(envPtr, "", 0); + } + + /* + * No more instructions to be issued; everything that needs to jump to the + * end of the command is fixed up at this point. + */ + + for (i=0 ; icodeStart+finalFixups[i]+1); + } + + /* + * Clean up all our temporary space and return. + */ + + TclStackFree(interp, finalFixups); } /* @@ -7261,304 +7240,6 @@ TclCompileVariableCmd( /* *---------------------------------------------------------------------- * - * TclCompileEnsemble -- - * - * Procedure called to compile an ensemble command. Note that most - * ensembles are not compiled, since modifying a compiled ensemble causes - * a invalidation of all existing bytecode (expensive!) which is not - * normally warranted. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the subcommands of the - * ensemble at runtime if a compile-time mapping is possible. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileEnsemble( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Token *tokenPtr; - Tcl_Obj *mapObj, *subcmdObj, *targetCmdObj, *listObj, **elems; - Tcl_Command ensemble = (Tcl_Command) cmdPtr; - Tcl_Parse synthetic; - int len, numBytes, result, flags = 0, i; - const char *word; - - if (parsePtr->numWords < 2) { - return TCL_ERROR; - } - - tokenPtr = TokenAfter(parsePtr->tokenPtr); - if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { - /* - * Too hard. - */ - - return TCL_ERROR; - } - - word = tokenPtr[1].start; - numBytes = tokenPtr[1].size; - - /* - * There's a sporting chance we'll be able to compile this. But now we - * must check properly. To do that, check that we're compiling an ensemble - * that has a compilable command as its appropriate subcommand. - */ - - if (Tcl_GetEnsembleMappingDict(NULL, ensemble, &mapObj) != TCL_OK - || mapObj == NULL) { - /* - * Either not an ensemble or a mapping isn't installed. Crud. Too hard - * to proceed. - */ - - return TCL_ERROR; - } - - /* - * Also refuse to compile anything that uses a formal parameter list for - * now, on the grounds that it is too complex. - */ - - if (Tcl_GetEnsembleParameterList(NULL, ensemble, &listObj) != TCL_OK - || listObj != NULL) { - /* - * Figuring out how to compile this has become too much. Bail out. - */ - - return TCL_ERROR; - } - - /* - * Next, get the flags. We need them on several code paths. - */ - - (void) Tcl_GetEnsembleFlags(NULL, ensemble, &flags); - - /* - * Check to see if there's also a subcommand list; must check to see if - * the subcommand we are calling is in that list if it exists, since that - * list filters the entries in the map. - */ - - (void) Tcl_GetEnsembleSubcommandList(NULL, ensemble, &listObj); - if (listObj != NULL) { - int sclen; - const char *str; - Tcl_Obj *matchObj = NULL; - - if (Tcl_ListObjGetElements(NULL, listObj, &len, &elems) != TCL_OK) { - return TCL_ERROR; - } - for (i=0 ; i 1 && Tcl_IsSafe(interp)) { - return TCL_ERROR; - } - targetCmdObj = elems[0]; - - Tcl_IncrRefCount(targetCmdObj); - cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, targetCmdObj); - TclDecrRefCount(targetCmdObj); - if (cmdPtr == NULL || cmdPtr->compileProc == NULL) { - /* - * Maps to an undefined command or a command without a compiler. - * Cannot compile. - */ - - return TCL_ERROR; - } - - /* - * Now we've done the mapping process, can now actually try to compile. - * We do this by handing off to the subcommand's actual compiler. But to - * do that, we have to perform some trickery to rewrite the arguments. - */ - - TclParseInit(interp, NULL, 0, &synthetic); - synthetic.numWords = parsePtr->numWords - 2 + len; - TclGrowParseTokenArray(&synthetic, 2*len); - synthetic.numTokens = 2*len; - - /* - * Now we have the space to work in, install something rewritten. Note - * that we are here praying for all our might that none of these words are - * a script; the error detection code will crash if that happens and there - * is nothing we can do to avoid it! - */ - - for (i=0 ; inumComponents + 1; - TclGrowParseTokenArray(&synthetic, toCopy); - memcpy(synthetic.tokenPtr + synthetic.numTokens, tokenPtr, - sizeof(Tcl_Token) * toCopy); - synthetic.numTokens += toCopy; - } - - /* - * Hand off compilation to the subcommand compiler. At last! - */ - - result = cmdPtr->compileProc(interp, &synthetic, cmdPtr, envPtr); - - /* - * Clean up if necessary. - */ - - Tcl_FreeParse(&synthetic); - return result; -} - -/* - *---------------------------------------------------------------------- - * * TclCompileInfoExistsCmd -- * * Procedure called to compile the "info exists" subcommand. diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 18dad76..b9b93cb 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.122 2010/01/30 16:33:25 dkf Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.123 2010/02/13 18:11:06 dkf Exp $ */ #ifndef _TCLCOMPILATION @@ -1252,6 +1252,94 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TclMax(i, j) ((((int) i) > ((int) j))? (i) : (j)) /* + * Convenience macro for use when compiling bodies of commands. The ANSI C + * "prototype" for this macro is: + * + * static void CompileBody(CompileEnv *envPtr, Tcl_Token *tokenPtr, + * Tcl_Interp *interp); + */ + +#define CompileBody(envPtr, tokenPtr, interp) \ + TclCompileCmdWord((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ + (envPtr)) + +/* + * Convenience macro for use when compiling tokens to be pushed. The ANSI C + * "prototype" for this macro is: + * + * static void CompileTokens(CompileEnv *envPtr, Tcl_Token *tokenPtr, + * Tcl_Interp *interp); + */ + +#define CompileTokens(envPtr, tokenPtr, interp) \ + TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ + (envPtr)); +/* + * Convenience macro for use when pushing literals. The ANSI C "prototype" for + * this macro is: + * + * static void PushLiteral(CompileEnv *envPtr, + * const char *string, int length); + */ + +#define PushLiteral(envPtr, string, length) \ + TclEmitPush(TclRegisterNewLiteral((envPtr), (string), (length)), (envPtr)) + +/* + * Macro to advance to the next token; it is more mnemonic than the address + * arithmetic that it replaces. The ANSI C "prototype" for this macro is: + * + * static Tcl_Token * TokenAfter(Tcl_Token *tokenPtr); + */ + +#define TokenAfter(tokenPtr) \ + ((tokenPtr) + ((tokenPtr)->numComponents + 1)) + +/* + * Macro to get the offset to the next instruction to be issued. The ANSI C + * "prototype" for this macro is: + * + * static int CurrentOffset(CompileEnv *envPtr); + */ + +#define CurrentOffset(envPtr) \ + ((envPtr)->codeNext - (envPtr)->codeStart) + +/* + * Note: the exceptDepth is a bit of a misnomer: TEBC only needs the + * maximal depth of nested CATCH ranges in order to alloc runtime + * memory. These macros should compute precisely that? OTOH, the nesting depth + * of LOOP ranges is an interesting datum for debugging purposes, and that is + * what we compute now. + * + * static int DeclareExceptionRange(CompileEnv *envPtr, int type); + * static int ExceptionRangeStarts(CompileEnv *envPtr, int index); + * static void ExceptionRangeEnds(CompileEnv *envPtr, int index); + * static void ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL); + */ + +#define DeclareExceptionRange(envPtr, type) \ + (TclCreateExceptRange((type), (envPtr))) +#define ExceptionRangeStarts(envPtr, index) \ + (((envPtr)->exceptDepth++), \ + ((envPtr)->maxExceptDepth = \ + TclMax((envPtr)->exceptDepth, (envPtr)->maxExceptDepth)), \ + ((envPtr)->exceptArrayPtr[(index)].codeOffset = CurrentOffset(envPtr))) +#define ExceptionRangeEnds(envPtr, index) \ + (((envPtr)->exceptDepth--), \ + ((envPtr)->exceptArrayPtr[(index)].numCodeBytes = \ + CurrentOffset(envPtr) - (envPtr)->exceptArrayPtr[(index)].codeOffset)) +#define ExceptionRangeTarget(envPtr, index, targetType) \ + ((envPtr)->exceptArrayPtr[(index)].targetType = CurrentOffset(envPtr)) + +/* + * Check if there is an LVT for compiled locals + */ + +#define EnvHasLVT(envPtr) \ + (envPtr->procPtr || envPtr->iPtr->varFramePtr->localCachePtr) + +/* * DTrace probe macros (NOPs if DTrace support is not enabled). */ diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c new file mode 100644 index 0000000..4dd86b7 --- /dev/null +++ b/generic/tclEnsemble.c @@ -0,0 +1,2965 @@ +/* + * tclEnsemble.c -- + * + * Contains support for ensembles, which provide simple mechanism + * for creating composite commands on top of namespaces. + * + * Copyright (c) 2005-2010 Donal K. Fellows. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclEnsemble.c,v 1.1 2010/02/13 18:11:06 dkf Exp $ + */ + +#include "tclInt.h" +#include "tclCompile.h" + +/* + * Declarations for functions local to this file: + */ + +static inline int EnsembleUnknownCallback(Tcl_Interp *interp, + EnsembleConfig *ensemblePtr, int objc, + Tcl_Obj *const objv[], Tcl_Obj **prefixObjPtr); +static int NsEnsembleImplementationCmd(ClientData clientData, + Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); +static int NsEnsembleImplementationCmdNR(ClientData clientData, + Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); +static void BuildEnsembleConfig(EnsembleConfig *ensemblePtr); +static int NsEnsembleStringOrder(const void *strPtr1, + const void *strPtr2); +static void DeleteEnsembleConfig(ClientData clientData); +static void MakeCachedEnsembleCommand(Tcl_Obj *objPtr, + EnsembleConfig *ensemblePtr, + const char *subcmdName, Tcl_Obj *prefixObjPtr); +static void FreeEnsembleCmdRep(Tcl_Obj *objPtr); +static void DupEnsembleCmdRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); +static void StringOfEnsembleCmdRep(Tcl_Obj *objPtr); + +/* + * This structure defines a Tcl object type that contains a reference to an + * ensemble subcommand (e.g. the "length" in [string length ab]). It is used + * to cache the mapping between the subcommand itself and the real command + * that implements it. + */ + +const Tcl_ObjType tclEnsembleCmdType = { + "ensembleCommand", /* the type's name */ + FreeEnsembleCmdRep, /* freeIntRepProc */ + DupEnsembleCmdRep, /* dupIntRepProc */ + StringOfEnsembleCmdRep, /* updateStringProc */ + NULL /* setFromAnyProc */ +}; + +/* + *---------------------------------------------------------------------- + * + * TclNamespaceEnsembleCmd -- + * + * Invoked to implement the "namespace ensemble" command that creates and + * manipulates ensembles built on top of namespaces. Handles the + * following syntax: + * + * namespace ensemble name ?dictionary? + * + * Results: + * Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong. + * + * Side effects: + * Creates the ensemble for the namespace if one did not previously + * exist. Alternatively, alters the way that the ensemble's subcommand => + * implementation prefix is configured. + * + *---------------------------------------------------------------------- + */ + +int +TclNamespaceEnsembleCmd( + ClientData dummy, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Namespace *nsPtr; + Tcl_Command token; + static const char *const subcommands[] = { + "configure", "create", "exists", NULL + }; + enum EnsSubcmds { + ENS_CONFIG, ENS_CREATE, ENS_EXISTS + }; + static const char *const createOptions[] = { + "-command", "-map", "-parameters", "-prefixes", "-subcommands", + "-unknown", NULL + }; + enum EnsCreateOpts { + CRT_CMD, CRT_MAP, CRT_PARAM, CRT_PREFIX, CRT_SUBCMDS, CRT_UNKNOWN + }; + static const char *const configOptions[] = { + "-map", "-namespace", "-parameters", "-prefixes", "-subcommands", + "-unknown", NULL + }; + enum EnsConfigOpts { + CONF_MAP, CONF_NAMESPACE, CONF_PARAM, CONF_PREFIX, CONF_SUBCMDS, + CONF_UNKNOWN + }; + int index; + + nsPtr = (Namespace *) TclGetCurrentNamespace(interp); + if (nsPtr == NULL || nsPtr->flags & NS_DYING) { + if (!Tcl_InterpDeleted(interp)) { + Tcl_AppendResult(interp, + "tried to manipulate ensemble of deleted namespace", NULL); + } + return TCL_ERROR; + } + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 2, objv, "subcommand ?arg ...?"); + return TCL_ERROR; + } + if (Tcl_GetIndexFromObj(interp, objv[2], subcommands, "subcommand", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + + switch ((enum EnsSubcmds) index) { + case ENS_CREATE: { + const char *name; + Tcl_DictSearch search; + Tcl_Obj *listObj; + int done, len, allocatedMapFlag = 0; + /* + * Defaults + */ + Tcl_Obj *subcmdObj = NULL; + Tcl_Obj *mapObj = NULL; + int permitPrefix = 1; + Tcl_Obj *unknownObj = NULL; + Tcl_Obj *paramObj = NULL; + + /* + * Check that we've got option-value pairs... [Bug 1558654] + */ + + if ((objc & 1) == 0) { + Tcl_WrongNumArgs(interp, 3, objv, "?option value ...?"); + return TCL_ERROR; + } + objv += 3; + objc -= 3; + + /* + * Work out what name to use for the command to create. If supplied, + * it is either fully specified or relative to the current namespace. + * If not supplied, it is exactly the name of the current namespace. + */ + + name = nsPtr->fullName; + + /* + * Parse the option list, applying type checks as we go. Note that we + * are not incrementing any reference counts in the objects at this + * stage, so the presence of an option multiple times won't cause any + * memory leaks. + */ + + for (; objc>1 ; objc-=2,objv+=2) { + if (Tcl_GetIndexFromObj(interp, objv[0], createOptions, "option", + 0, &index) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + switch ((enum EnsCreateOpts) index) { + case CRT_CMD: + name = TclGetString(objv[1]); + continue; + case CRT_SUBCMDS: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + subcmdObj = (len > 0 ? objv[1] : NULL); + continue; + case CRT_PARAM: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + paramObj = (len > 0 ? objv[1] : NULL); + continue; + case CRT_MAP: { + Tcl_Obj *patchedDict = NULL, *subcmdObj; + + /* + * Verify that the map is sensible. + */ + + if (Tcl_DictObjFirst(interp, objv[1], &search, + &subcmdObj, &listObj, &done) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + if (done) { + mapObj = NULL; + continue; + } + do { + Tcl_Obj **listv; + const char *cmd; + + if (TclListObjGetElements(interp, listObj, &len, + &listv) != TCL_OK) { + Tcl_DictObjDone(&search); + if (patchedDict) { + Tcl_DecrRefCount(patchedDict); + } + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + if (len < 1) { + Tcl_SetResult(interp, + "ensemble subcommand implementations " + "must be non-empty lists", TCL_STATIC); + Tcl_DictObjDone(&search); + if (patchedDict) { + Tcl_DecrRefCount(patchedDict); + } + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + cmd = TclGetString(listv[0]); + if (!(cmd[0] == ':' && cmd[1] == ':')) { + Tcl_Obj *newList = Tcl_NewListObj(len, listv); + Tcl_Obj *newCmd = Tcl_NewStringObj(nsPtr->fullName,-1); + + if (nsPtr->parentPtr) { + Tcl_AppendStringsToObj(newCmd, "::", NULL); + } + Tcl_AppendObjToObj(newCmd, listv[0]); + Tcl_ListObjReplace(NULL, newList, 0, 1, 1, &newCmd); + if (patchedDict == NULL) { + patchedDict = Tcl_DuplicateObj(objv[1]); + } + Tcl_DictObjPut(NULL, patchedDict, subcmdObj, newList); + } + Tcl_DictObjNext(&search, &subcmdObj, &listObj, &done); + } while (!done); + + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + mapObj = (patchedDict ? patchedDict : objv[1]); + if (patchedDict) { + allocatedMapFlag = 1; + } + continue; + } + case CRT_PREFIX: + if (Tcl_GetBooleanFromObj(interp, objv[1], + &permitPrefix) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + continue; + case CRT_UNKNOWN: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + unknownObj = (len > 0 ? objv[1] : NULL); + continue; + } + } + + /* + * Create the ensemble. Note that this might delete another ensemble + * linked to the same namespace, so we must be careful. However, we + * should be OK because we only link the namespace into the list once + * we've created it (and after any deletions have occurred.) + */ + + token = Tcl_CreateEnsemble(interp, name, NULL, + (permitPrefix ? TCL_ENSEMBLE_PREFIX : 0)); + Tcl_SetEnsembleSubcommandList(interp, token, subcmdObj); + Tcl_SetEnsembleMappingDict(interp, token, mapObj); + Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); + Tcl_SetEnsembleParameterList(interp, token, paramObj); + + /* + * Tricky! Must ensure that the result is not shared (command delete + * traces could have corrupted the pristine object that we started + * with). [Snit test rename-1.5] + */ + + Tcl_ResetResult(interp); + Tcl_GetCommandFullName(interp, token, Tcl_GetObjResult(interp)); + return TCL_OK; + } + + case ENS_EXISTS: + if (objc != 4) { + Tcl_WrongNumArgs(interp, 3, objv, "cmdname"); + return TCL_ERROR; + } + Tcl_SetObjResult(interp, Tcl_NewBooleanObj( + Tcl_FindEnsemble(interp, objv[3], 0) != NULL)); + return TCL_OK; + + case ENS_CONFIG: + if (objc < 4 || (objc != 5 && objc & 1)) { + Tcl_WrongNumArgs(interp, 3, objv, + "cmdname ?-option value ...? ?arg ...?"); + return TCL_ERROR; + } + token = Tcl_FindEnsemble(interp, objv[3], TCL_LEAVE_ERR_MSG); + if (token == NULL) { + return TCL_ERROR; + } + + if (objc == 5) { + Tcl_Obj *resultObj = NULL; /* silence gcc 4 warning */ + + if (Tcl_GetIndexFromObj(interp, objv[4], configOptions, "option", + 0, &index) != TCL_OK) { + return TCL_ERROR; + } + switch ((enum EnsConfigOpts) index) { + case CONF_SUBCMDS: + Tcl_GetEnsembleSubcommandList(NULL, token, &resultObj); + if (resultObj != NULL) { + Tcl_SetObjResult(interp, resultObj); + } + break; + case CONF_PARAM: + Tcl_GetEnsembleParameterList(NULL, token, &resultObj); + if (resultObj != NULL) { + Tcl_SetObjResult(interp, resultObj); + } + break; + case CONF_MAP: + Tcl_GetEnsembleMappingDict(NULL, token, &resultObj); + if (resultObj != NULL) { + Tcl_SetObjResult(interp, resultObj); + } + break; + case CONF_NAMESPACE: { + Tcl_Namespace *namespacePtr = NULL; /* silence gcc 4 warning */ + + Tcl_GetEnsembleNamespace(NULL, token, &namespacePtr); + Tcl_SetResult(interp, ((Namespace *) namespacePtr)->fullName, + TCL_VOLATILE); + break; + } + case CONF_PREFIX: { + int flags = 0; /* silence gcc 4 warning */ + + Tcl_GetEnsembleFlags(NULL, token, &flags); + Tcl_SetObjResult(interp, + Tcl_NewBooleanObj(flags & TCL_ENSEMBLE_PREFIX)); + break; + } + case CONF_UNKNOWN: + Tcl_GetEnsembleUnknownHandler(NULL, token, &resultObj); + if (resultObj != NULL) { + Tcl_SetObjResult(interp, resultObj); + } + break; + } + return TCL_OK; + + } else if (objc == 4) { + /* + * Produce list of all information. + */ + + Tcl_Obj *resultObj, *tmpObj = NULL; /* silence gcc 4 warning */ + Tcl_Namespace *namespacePtr = NULL; /* silence gcc 4 warning */ + int flags = 0; /* silence gcc 4 warning */ + + TclNewObj(resultObj); + + /* -map option */ + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(configOptions[CONF_MAP], -1)); + Tcl_GetEnsembleMappingDict(NULL, token, &tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, + (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); + + /* -namespace option */ + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(configOptions[CONF_NAMESPACE], -1)); + Tcl_GetEnsembleNamespace(NULL, token, &namespacePtr); + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(((Namespace *) namespacePtr)->fullName, + -1)); + + /* -parameters option */ + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(configOptions[CONF_PARAM], -1)); + Tcl_GetEnsembleParameterList(NULL, token, &tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, + (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); + + /* -prefix option */ + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(configOptions[CONF_PREFIX], -1)); + Tcl_GetEnsembleFlags(NULL, token, &flags); + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewBooleanObj(flags & TCL_ENSEMBLE_PREFIX)); + + /* -subcommands option */ + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(configOptions[CONF_SUBCMDS], -1)); + Tcl_GetEnsembleSubcommandList(NULL, token, &tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, + (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); + + /* -unknown option */ + Tcl_ListObjAppendElement(NULL, resultObj, + Tcl_NewStringObj(configOptions[CONF_UNKNOWN], -1)); + Tcl_GetEnsembleUnknownHandler(NULL, token, &tmpObj); + Tcl_ListObjAppendElement(NULL, resultObj, + (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); + + Tcl_SetObjResult(interp, resultObj); + return TCL_OK; + } else { + Tcl_DictSearch search; + Tcl_Obj *listObj; + int done, len, allocatedMapFlag = 0; + Tcl_Obj *subcmdObj = NULL, *mapObj = NULL, *paramObj = NULL, + *unknownObj = NULL; /* Defaults, silence gcc 4 warnings */ + int permitPrefix, flags = 0; /* silence gcc 4 warning */ + + Tcl_GetEnsembleSubcommandList(NULL, token, &subcmdObj); + Tcl_GetEnsembleMappingDict(NULL, token, &mapObj); + Tcl_GetEnsembleParameterList(NULL, token, ¶mObj); + Tcl_GetEnsembleUnknownHandler(NULL, token, &unknownObj); + Tcl_GetEnsembleFlags(NULL, token, &flags); + permitPrefix = (flags & TCL_ENSEMBLE_PREFIX) != 0; + + objv += 4; + objc -= 4; + + /* + * Parse the option list, applying type checks as we go. Note that + * we are not incrementing any reference counts in the objects at + * this stage, so the presence of an option multiple times won't + * cause any memory leaks. + */ + + for (; objc>0 ; objc-=2,objv+=2) { + if (Tcl_GetIndexFromObj(interp, objv[0], configOptions, + "option", 0, &index) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + switch ((enum EnsConfigOpts) index) { + case CONF_SUBCMDS: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + subcmdObj = (len > 0 ? objv[1] : NULL); + continue; + case CONF_PARAM: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + paramObj = (len > 0 ? objv[1] : NULL); + continue; + case CONF_MAP: { + Tcl_Obj *patchedDict = NULL, *subcmdObj; + + /* + * Verify that the map is sensible. + */ + + if (Tcl_DictObjFirst(interp, objv[1], &search, + &subcmdObj, &listObj, &done) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + if (done) { + mapObj = NULL; + continue; + } + do { + Tcl_Obj **listv; + const char *cmd; + + if (TclListObjGetElements(interp, listObj, &len, + &listv) != TCL_OK) { + Tcl_DictObjDone(&search); + if (patchedDict) { + Tcl_DecrRefCount(patchedDict); + } + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + if (len < 1) { + Tcl_SetResult(interp, + "ensemble subcommand implementations " + "must be non-empty lists", TCL_STATIC); + Tcl_DictObjDone(&search); + if (patchedDict) { + Tcl_DecrRefCount(patchedDict); + } + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + cmd = TclGetString(listv[0]); + if (!(cmd[0] == ':' && cmd[1] == ':')) { + Tcl_Obj *newList = Tcl_NewListObj(len, listv); + Tcl_Obj *newCmd = + Tcl_NewStringObj(nsPtr->fullName, -1); + + if (nsPtr->parentPtr) { + Tcl_AppendStringsToObj(newCmd, "::", NULL); + } + Tcl_AppendObjToObj(newCmd, listv[0]); + Tcl_ListObjReplace(NULL, newList, 0,1, 1,&newCmd); + if (patchedDict == NULL) { + patchedDict = Tcl_DuplicateObj(objv[1]); + } + Tcl_DictObjPut(NULL, patchedDict, subcmdObj, + newList); + } + Tcl_DictObjNext(&search, &subcmdObj, &listObj, &done); + } while (!done); + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + mapObj = (patchedDict ? patchedDict : objv[1]); + if (patchedDict) { + allocatedMapFlag = 1; + } + continue; + } + case CONF_NAMESPACE: + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + Tcl_AppendResult(interp, "option -namespace is read-only", + NULL); + return TCL_ERROR; + case CONF_PREFIX: + if (Tcl_GetBooleanFromObj(interp, objv[1], + &permitPrefix) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + continue; + case CONF_UNKNOWN: + if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { + if (allocatedMapFlag) { + Tcl_DecrRefCount(mapObj); + } + return TCL_ERROR; + } + unknownObj = (len > 0 ? objv[1] : NULL); + continue; + } + } + + /* + * Update the namespace now that we've finished the parsing stage. + */ + + flags = (permitPrefix ? flags|TCL_ENSEMBLE_PREFIX + : flags&~TCL_ENSEMBLE_PREFIX); + Tcl_SetEnsembleSubcommandList(interp, token, subcmdObj); + Tcl_SetEnsembleMappingDict(interp, token, mapObj); + Tcl_SetEnsembleParameterList(interp, token, paramObj); + Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); + Tcl_SetEnsembleFlags(interp, token, flags); + return TCL_OK; + } + + default: + Tcl_Panic("unexpected ensemble command"); + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_CreateEnsemble -- + * + * Create a simple ensemble attached to the given namespace. + * + * Results: + * The token for the command created. + * + * Side effects: + * The ensemble is created and marked for compilation. + * + *---------------------------------------------------------------------- + */ + +Tcl_Command +Tcl_CreateEnsemble( + Tcl_Interp *interp, + const char *name, + Tcl_Namespace *namespacePtr, + int flags) +{ + Namespace *nsPtr = (Namespace *) namespacePtr; + EnsembleConfig *ensemblePtr = (EnsembleConfig *) + ckalloc(sizeof(EnsembleConfig)); + Tcl_Obj *nameObj = NULL; + + if (nsPtr == NULL) { + nsPtr = (Namespace *) TclGetCurrentNamespace(interp); + } + + /* + * Make the name of the ensemble into a fully qualified name. This might + * allocate a temporary object. + */ + + if (!(name[0] == ':' && name[1] == ':')) { + nameObj = Tcl_NewStringObj(nsPtr->fullName, -1); + if (nsPtr->parentPtr == NULL) { + Tcl_AppendStringsToObj(nameObj, name, NULL); + } else { + Tcl_AppendStringsToObj(nameObj, "::", name, NULL); + } + Tcl_IncrRefCount(nameObj); + name = TclGetString(nameObj); + } + + ensemblePtr->nsPtr = nsPtr; + ensemblePtr->epoch = 0; + Tcl_InitHashTable(&ensemblePtr->subcommandTable, TCL_STRING_KEYS); + ensemblePtr->subcommandArrayPtr = NULL; + ensemblePtr->subcmdList = NULL; + ensemblePtr->subcommandDict = NULL; + ensemblePtr->flags = flags; + ensemblePtr->numParameters = 0; + ensemblePtr->parameterList = NULL; + ensemblePtr->unknownHandler = NULL; + ensemblePtr->token = Tcl_NRCreateCommand(interp, name, + NsEnsembleImplementationCmd, NsEnsembleImplementationCmdNR, + ensemblePtr, DeleteEnsembleConfig); + ensemblePtr->next = (EnsembleConfig *) nsPtr->ensembles; + nsPtr->ensembles = (Tcl_Ensemble *) ensemblePtr; + + /* + * Trigger an eventual recomputation of the ensemble command set. Note + * that this is slightly tricky, as it means that we are not actually + * counting the number of namespace export actions, but it is the simplest + * way to go! + */ + + nsPtr->exportLookupEpoch++; + + if (flags & ENSEMBLE_COMPILE) { + ((Command *) ensemblePtr->token)->compileProc = TclCompileEnsemble; + } + + if (nameObj != NULL) { + TclDecrRefCount(nameObj); + } + return ensemblePtr->token; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_SetEnsembleSubcommandList -- + * + * Set the subcommand list for a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an ensemble + * or the subcommand list - if non-NULL - is not a list). + * + * Side effects: + * The ensemble is updated and marked for recompilation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_SetEnsembleSubcommandList( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj *subcmdList) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + Tcl_Obj *oldList; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + return TCL_ERROR; + } + if (subcmdList != NULL) { + int length; + + if (TclListObjLength(interp, subcmdList, &length) != TCL_OK) { + return TCL_ERROR; + } + if (length < 1) { + subcmdList = NULL; + } + } + + ensemblePtr = cmdPtr->objClientData; + oldList = ensemblePtr->subcmdList; + ensemblePtr->subcmdList = subcmdList; + if (subcmdList != NULL) { + Tcl_IncrRefCount(subcmdList); + } + if (oldList != NULL) { + TclDecrRefCount(oldList); + } + + /* + * Trigger an eventual recomputation of the ensemble command set. Note + * that this is slightly tricky, as it means that we are not actually + * counting the number of namespace export actions, but it is the simplest + * way to go! + */ + + ensemblePtr->nsPtr->exportLookupEpoch++; + + /* + * Special hack to make compiling of [info exists] work when the + * dictionary is modified. + */ + + if (cmdPtr->compileProc != NULL) { + ((Interp *) interp)->compileEpoch++; + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_SetEnsembleParameterList -- + * + * Set the parameter list for a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an ensemble + * or the parameter list - if non-NULL - is not a list). + * + * Side effects: + * The ensemble is updated and marked for recompilation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_SetEnsembleParameterList( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj *paramList) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + Tcl_Obj *oldList; + int length; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + return TCL_ERROR; + } + if (paramList == NULL) { + length = 0; + } else { + if (TclListObjLength(interp, paramList, &length) != TCL_OK) { + return TCL_ERROR; + } + if (length < 1) { + paramList = NULL; + } + } + + ensemblePtr = cmdPtr->objClientData; + oldList = ensemblePtr->parameterList; + ensemblePtr->parameterList = paramList; + if (paramList != NULL) { + Tcl_IncrRefCount(paramList); + } + if (oldList != NULL) { + TclDecrRefCount(oldList); + } + ensemblePtr->numParameters = length; + + /* + * Trigger an eventual recomputation of the ensemble command set. Note + * that this is slightly tricky, as it means that we are not actually + * counting the number of namespace export actions, but it is the simplest + * way to go! + */ + + ensemblePtr->nsPtr->exportLookupEpoch++; + + /* + * Special hack to make compiling of [info exists] work when the + * dictionary is modified. + */ + + if (cmdPtr->compileProc != NULL) { + ((Interp *) interp)->compileEpoch++; + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_SetEnsembleMappingDict -- + * + * Set the mapping dictionary for a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an ensemble + * or the mapping - if non-NULL - is not a dict). + * + * Side effects: + * The ensemble is updated and marked for recompilation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_SetEnsembleMappingDict( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj *mapDict) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + Tcl_Obj *oldDict; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + return TCL_ERROR; + } + if (mapDict != NULL) { + int size, done; + Tcl_DictSearch search; + Tcl_Obj *valuePtr; + + if (Tcl_DictObjSize(interp, mapDict, &size) != TCL_OK) { + return TCL_ERROR; + } + + for (Tcl_DictObjFirst(NULL, mapDict, &search, NULL, &valuePtr, &done); + !done; Tcl_DictObjNext(&search, NULL, &valuePtr, &done)) { + Tcl_Obj *cmdPtr; + const char *bytes; + + if (Tcl_ListObjIndex(interp, valuePtr, 0, &cmdPtr) != TCL_OK) { + Tcl_DictObjDone(&search); + return TCL_ERROR; + } + bytes = TclGetString(cmdPtr); + if (bytes[0] != ':' || bytes[1] != ':') { + Tcl_AppendResult(interp, + "ensemble target is not a fully-qualified command", + NULL); + Tcl_DictObjDone(&search); + return TCL_ERROR; + } + } + + if (size < 1) { + mapDict = NULL; + } + } + + ensemblePtr = cmdPtr->objClientData; + oldDict = ensemblePtr->subcommandDict; + ensemblePtr->subcommandDict = mapDict; + if (mapDict != NULL) { + Tcl_IncrRefCount(mapDict); + } + if (oldDict != NULL) { + TclDecrRefCount(oldDict); + } + + /* + * Trigger an eventual recomputation of the ensemble command set. Note + * that this is slightly tricky, as it means that we are not actually + * counting the number of namespace export actions, but it is the simplest + * way to go! + */ + + ensemblePtr->nsPtr->exportLookupEpoch++; + + /* + * Special hack to make compiling of [info exists] work when the + * dictionary is modified. + */ + + if (cmdPtr->compileProc != NULL) { + ((Interp *) interp)->compileEpoch++; + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_SetEnsembleUnknownHandler -- + * + * Set the unknown handler for a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an ensemble + * or the unknown handler - if non-NULL - is not a list). + * + * Side effects: + * The ensemble is updated and marked for recompilation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_SetEnsembleUnknownHandler( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj *unknownList) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + Tcl_Obj *oldList; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + return TCL_ERROR; + } + if (unknownList != NULL) { + int length; + + if (TclListObjLength(interp, unknownList, &length) != TCL_OK) { + return TCL_ERROR; + } + if (length < 1) { + unknownList = NULL; + } + } + + ensemblePtr = cmdPtr->objClientData; + oldList = ensemblePtr->unknownHandler; + ensemblePtr->unknownHandler = unknownList; + if (unknownList != NULL) { + Tcl_IncrRefCount(unknownList); + } + if (oldList != NULL) { + TclDecrRefCount(oldList); + } + + /* + * Trigger an eventual recomputation of the ensemble command set. Note + * that this is slightly tricky, as it means that we are not actually + * counting the number of namespace export actions, but it is the simplest + * way to go! + */ + + ensemblePtr->nsPtr->exportLookupEpoch++; + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_SetEnsembleFlags -- + * + * Set the flags for a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). + * + * Side effects: + * The ensemble is updated and marked for recompilation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_SetEnsembleFlags( + Tcl_Interp *interp, + Tcl_Command token, + int flags) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + int wasCompiled; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + wasCompiled = ensemblePtr->flags & ENSEMBLE_COMPILE; + + /* + * This API refuses to set the ENSEMBLE_DEAD flag... + */ + + ensemblePtr->flags &= ENSEMBLE_DEAD; + ensemblePtr->flags |= flags & ~ENSEMBLE_DEAD; + + /* + * Trigger an eventual recomputation of the ensemble command set. Note + * that this is slightly tricky, as it means that we are not actually + * counting the number of namespace export actions, but it is the simplest + * way to go! + */ + + ensemblePtr->nsPtr->exportLookupEpoch++; + + /* + * If the ENSEMBLE_COMPILE flag status was changed, install or remove the + * compiler function and bump the interpreter's compilation epoch so that + * bytecode gets regenerated. + */ + + if (flags & ENSEMBLE_COMPILE) { + if (!wasCompiled) { + ((Command*) ensemblePtr->token)->compileProc = TclCompileEnsemble; + ((Interp *) interp)->compileEpoch++; + } + } else { + if (wasCompiled) { + ((Command *) ensemblePtr->token)->compileProc = NULL; + ((Interp *) interp)->compileEpoch++; + } + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_GetEnsembleSubcommandList -- + * + * Get the list of subcommands associated with a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). The list of subcommands is returned by updating the + * variable pointed to by the last parameter (NULL if this is to be + * derived from the mapping dictionary or the associated namespace's + * exported commands). + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetEnsembleSubcommandList( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj **subcmdListPtr) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (interp != NULL) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + } + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + *subcmdListPtr = ensemblePtr->subcmdList; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_GetEnsembleParameterList -- + * + * Get the list of parameters associated with a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). The list of parameters is returned by updating the + * variable pointed to by the last parameter (NULL if there are + * no parameters). + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetEnsembleParameterList( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj **paramListPtr) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (interp != NULL) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + } + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + *paramListPtr = ensemblePtr->parameterList; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_GetEnsembleMappingDict -- + * + * Get the command mapping dictionary associated with a particular + * ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). The mapping dict is returned by updating the variable + * pointed to by the last parameter (NULL if none is installed). + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetEnsembleMappingDict( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj **mapDictPtr) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (interp != NULL) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + } + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + *mapDictPtr = ensemblePtr->subcommandDict; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_GetEnsembleUnknownHandler -- + * + * Get the unknown handler associated with a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). The unknown handler is returned by updating the variable + * pointed to by the last parameter (NULL if no handler is installed). + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetEnsembleUnknownHandler( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Obj **unknownListPtr) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (interp != NULL) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + } + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + *unknownListPtr = ensemblePtr->unknownHandler; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_GetEnsembleFlags -- + * + * Get the flags for a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). The flags are returned by updating the variable pointed to + * by the last parameter. + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetEnsembleFlags( + Tcl_Interp *interp, + Tcl_Command token, + int *flagsPtr) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (interp != NULL) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + } + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + *flagsPtr = ensemblePtr->flags; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_GetEnsembleNamespace -- + * + * Get the namespace associated with a particular ensemble. + * + * Results: + * Tcl result code (error if command token does not indicate an + * ensemble). Namespace is returned by updating the variable pointed to + * by the last parameter. + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_GetEnsembleNamespace( + Tcl_Interp *interp, + Tcl_Command token, + Tcl_Namespace **namespacePtrPtr) +{ + Command *cmdPtr = (Command *) token; + EnsembleConfig *ensemblePtr; + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + if (interp != NULL) { + Tcl_AppendResult(interp, "command is not an ensemble", NULL); + } + return TCL_ERROR; + } + + ensemblePtr = cmdPtr->objClientData; + *namespacePtrPtr = (Tcl_Namespace *) ensemblePtr->nsPtr; + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_FindEnsemble -- + * + * Given a command name, get the ensemble token for it, allowing for + * [namespace import]s. [Bug 1017022] + * + * Results: + * The token for the ensemble command with the given name, or NULL if the + * command either does not exist or is not an ensemble (when an error + * message will be written into the interp if thats non-NULL). + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +Tcl_Command +Tcl_FindEnsemble( + Tcl_Interp *interp, /* Where to do the lookup, and where to write + * the errors if TCL_LEAVE_ERR_MSG is set in + * the flags. */ + Tcl_Obj *cmdNameObj, /* Name of command to look up. */ + int flags) /* Either 0 or TCL_LEAVE_ERR_MSG; other flags + * are probably not useful. */ +{ + Command *cmdPtr; + + cmdPtr = (Command *) + Tcl_FindCommand(interp, TclGetString(cmdNameObj), NULL, flags); + if (cmdPtr == NULL) { + return NULL; + } + + if (cmdPtr->objProc != NsEnsembleImplementationCmd) { + /* + * Reuse existing infrastructure for following import link chains + * rather than duplicating it. + */ + + cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr); + + if (cmdPtr == NULL || cmdPtr->objProc != NsEnsembleImplementationCmd){ + if (flags & TCL_LEAVE_ERR_MSG) { + Tcl_AppendResult(interp, "\"", TclGetString(cmdNameObj), + "\" is not an ensemble command", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENSEMBLE", + TclGetString(cmdNameObj), NULL); + } + return NULL; + } + } + + return (Tcl_Command) cmdPtr; +} + +/* + *---------------------------------------------------------------------- + * + * Tcl_IsEnsemble -- + * + * Simple test for ensemble-hood that takes into account imported + * ensemble commands as well. + * + * Results: + * Boolean value + * + * Side effects: + * None + * + *---------------------------------------------------------------------- + */ + +int +Tcl_IsEnsemble( + Tcl_Command token) +{ + Command *cmdPtr = (Command *) token; + + if (cmdPtr->objProc == NsEnsembleImplementationCmd) { + return 1; + } + cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr); + if (cmdPtr == NULL || cmdPtr->objProc != NsEnsembleImplementationCmd) { + return 0; + } + return 1; +} + +/* + *---------------------------------------------------------------------- + * + * TclMakeEnsemble -- + * + * Create an ensemble from a table of implementation commands. The + * ensemble will be subject to (limited) compilation if any of the + * implementation commands are compilable. + * + * The 'name' parameter may be a single command name or a list if + * creating an ensemble subcommand (see the binary implementation). + * + * Currently, the TCL_ENSEMBLE_PREFIX ensemble flag is only used on + * top-level ensemble commands. + * + * Results: + * Handle for the new ensemble, or NULL on failure. + * + * Side effects: + * May advance the bytecode compilation epoch. + * + *---------------------------------------------------------------------- + */ + +Tcl_Command +TclMakeEnsemble( + Tcl_Interp *interp, + const char *name, /* The ensemble name (as explained above) */ + const EnsembleImplMap map[]) /* The subcommands to create */ +{ + Tcl_Command ensemble; + Tcl_Namespace *ns; + Tcl_DString buf; + const char **nameParts = NULL; + const char *cmdName = NULL; + int i, nameCount = 0, ensembleFlags = 0; + + /* + * Construct the path for the ensemble namespace and create it. + */ + + Tcl_DStringInit(&buf); + if (name[0] == ':' && name[1] == ':') { + /* + * An absolute name, so use it directly. + */ + + cmdName = name; + Tcl_DStringAppend(&buf, name, -1); + ensembleFlags = TCL_ENSEMBLE_PREFIX; + } else { + /* + * Not an absolute name, so do munging of it. Note that this treats a + * multi-word list differently to a single word. + */ + + Tcl_DStringAppend(&buf, "::tcl", -1); + + if (Tcl_SplitList(NULL, name, &nameCount, &nameParts) != TCL_OK) { + Tcl_Panic("invalid ensemble name '%s'", name); + } + + for (i = 0; i < nameCount; ++i) { + Tcl_DStringAppend(&buf, "::", 2); + Tcl_DStringAppend(&buf, nameParts[i], -1); + } + } + + ns = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), NULL, + TCL_CREATE_NS_IF_UNKNOWN); + if (!ns) { + Tcl_Panic("unable to find or create %s namespace!", + Tcl_DStringValue(&buf)); + } + + /* + * Create the named ensemble in the correct namespace + */ + + if (cmdName == NULL) { + if (nameCount == 1) { + ensembleFlags = TCL_ENSEMBLE_PREFIX; + cmdName = Tcl_DStringValue(&buf) + 5; + } else { + ns = ns->parentPtr; + cmdName = nameParts[nameCount - 1]; + } + } + ensemble = Tcl_CreateEnsemble(interp, cmdName, ns, ensembleFlags); + + /* + * Create the ensemble mapping dictionary and the ensemble command procs. + */ + + if (ensemble != NULL) { + Tcl_Obj *mapDict, *fromObj, *toObj; + Command *cmdPtr; + + Tcl_DStringAppend(&buf, "::", 2); + TclNewObj(mapDict); + for (i=0 ; map[i].name != NULL ; i++) { + fromObj = Tcl_NewStringObj(map[i].name, -1); + TclNewStringObj(toObj, Tcl_DStringValue(&buf), + Tcl_DStringLength(&buf)); + Tcl_AppendToObj(toObj, map[i].name, -1); + Tcl_DictObjPut(NULL, mapDict, fromObj, toObj); + if (map[i].proc || map[i].nreProc) { + cmdPtr = (Command *) + Tcl_NRCreateCommand(interp, TclGetString(toObj), + map[i].proc, map[i].nreProc, map[i].clientData, NULL); + cmdPtr->compileProc = map[i].compileProc; + if (map[i].compileProc != NULL) { + ensembleFlags |= ENSEMBLE_COMPILE; + } + } + } + Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict); + if (ensembleFlags & ENSEMBLE_COMPILE) { + Tcl_SetEnsembleFlags(interp, ensemble, ensembleFlags); + } + } + + Tcl_DStringFree(&buf); + if (nameParts != NULL) { + Tcl_Free((char *) nameParts); + } + return ensemble; +} + +/* + *---------------------------------------------------------------------- + * + * NsEnsembleImplementationCmd -- + * + * Implements an ensemble of commands (being those exported by a + * namespace other than the global namespace) as a command with the same + * (short) name as the namespace in the parent namespace. + * + * Results: + * A standard Tcl result code. Will be TCL_ERROR if the command is not an + * unambiguous prefix of any command exported by the ensemble's + * namespace. + * + * Side effects: + * Depends on the command within the namespace that gets executed. If the + * ensemble itself returns TCL_ERROR, a descriptive error message will be + * placed in the interpreter's result. + * + *---------------------------------------------------------------------- + */ + +static int +NsEnsembleImplementationCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + return Tcl_NRCallObjProc(interp, NsEnsembleImplementationCmdNR, + clientData, objc, objv); +} + +static int +NsEnsembleImplementationCmdNR( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + EnsembleConfig *ensemblePtr = clientData; + /* The ensemble itself. */ + Tcl_Obj *prefixObj; /* An object containing the prefix words of + * the command that implements the + * subcommand. */ + Tcl_HashEntry *hPtr; /* Used for efficient lookup of fully + * specified but not yet cached command + * names. */ + int reparseCount = 0; /* Number of reparses. */ + + /* + * Must recheck objc, since numParameters might have changed. Cf. test + * namespace-53.9. + */ + + restartEnsembleParse: + if (objc < 2 + ensemblePtr->numParameters) { + /* + * We don't have a subcommand argument. Make error message. + */ + + Tcl_DString buf; /* Message being built */ + Tcl_Obj **elemPtrs; /* Parameter names */ + int len; /* Number of parameters to append */ + + Tcl_DStringInit(&buf); + if (ensemblePtr->parameterList == NULL) { + len = 0; + } else if (TclListObjGetElements(NULL, ensemblePtr->parameterList, + &len, &elemPtrs) != TCL_OK) { + Tcl_Panic("List of ensemble parameters is not a list"); + } + for (; len>0; len--,elemPtrs++) { + Tcl_DStringAppend(&buf, Tcl_GetString(*elemPtrs), -1); + Tcl_DStringAppend(&buf, " ", -1); + } + Tcl_DStringAppend(&buf, "subcommand ?arg ...?", -1); + Tcl_WrongNumArgs(interp, 1, objv, Tcl_DStringValue(&buf)); + Tcl_DStringFree(&buf); + + return TCL_ERROR; + } + + if (ensemblePtr->nsPtr->flags & NS_DYING) { + /* + * Don't know how we got here, but make things give up quickly. + */ + + if (!Tcl_InterpDeleted(interp)) { + Tcl_AppendResult(interp, + "ensemble activated for deleted namespace", NULL); + } + return TCL_ERROR; + } + + /* + * Determine if the table of subcommands is right. If so, we can just look + * up in there and go straight to dispatch. + */ + + if (ensemblePtr->epoch == ensemblePtr->nsPtr->exportLookupEpoch) { + /* + * Table of subcommands is still valid; therefore there might be a + * valid cache of discovered information which we can reuse. Do the + * check here, and if we're still valid, we can jump straight to the + * part where we do the invocation of the subcommand. + */ + + if (objv[1+ensemblePtr->numParameters]->typePtr==&tclEnsembleCmdType){ + EnsembleCmdRep *ensembleCmd = objv[1+ensemblePtr->numParameters] + ->internalRep.otherValuePtr; + + if (ensembleCmd->nsPtr == ensemblePtr->nsPtr && + ensembleCmd->epoch == ensemblePtr->epoch && + ensembleCmd->token == ensemblePtr->token) { + prefixObj = ensembleCmd->realPrefixObj; + Tcl_IncrRefCount(prefixObj); + goto runResultingSubcommand; + } + } + } else { + BuildEnsembleConfig(ensemblePtr); + ensemblePtr->epoch = ensemblePtr->nsPtr->exportLookupEpoch; + } + + /* + * Look in the hashtable for the subcommand name; this is the fastest way + * of all if there is no cache in operation. + */ + + hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, + TclGetString(objv[1 + ensemblePtr->numParameters])); + if (hPtr != NULL) { + char *fullName = Tcl_GetHashKey(&ensemblePtr->subcommandTable, hPtr); + + prefixObj = Tcl_GetHashValue(hPtr); + + /* + * Cache for later in the subcommand object. + */ + + MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], + ensemblePtr, fullName, prefixObj); + } else if (!(ensemblePtr->flags & TCL_ENSEMBLE_PREFIX)) { + /* + * Could not map, no prefixing, go to unknown/error handling. + */ + + goto unknownOrAmbiguousSubcommand; + } else { + /* + * If we've not already confirmed the command with the hash as part of + * building our export table, we need to scan the sorted array for + * matches. + */ + + const char *subcmdName; /* Name of the subcommand, or unique prefix of + * it (will be an error for a non-unique + * prefix). */ + char *fullName = NULL; /* Full name of the subcommand. */ + int stringLength, i; + int tableLength = ensemblePtr->subcommandTable.numEntries; + + subcmdName = TclGetString(objv[1 + ensemblePtr->numParameters]); + stringLength = objv[1 + ensemblePtr->numParameters]->length; + for (i=0 ; isubcommandArrayPtr[i], + (unsigned) stringLength); + + if (cmp == 0) { + if (fullName != NULL) { + /* + * Since there's never the exact-match case to worry about + * (hash search filters this), getting here indicates that + * our subcommand is an ambiguous prefix of (at least) two + * exported subcommands, which is an error case. + */ + + goto unknownOrAmbiguousSubcommand; + } + fullName = ensemblePtr->subcommandArrayPtr[i]; + } else if (cmp < 0) { + /* + * Because we are searching a sorted table, we can now stop + * searching because we have gone past anything that could + * possibly match. + */ + + break; + } + } + if (fullName == NULL) { + /* + * The subcommand is not a prefix of anything, so bail out! + */ + + goto unknownOrAmbiguousSubcommand; + } + hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, fullName); + if (hPtr == NULL) { + Tcl_Panic("full name %s not found in supposedly synchronized hash", + fullName); + } + prefixObj = Tcl_GetHashValue(hPtr); + + /* + * Cache for later in the subcommand object. + */ + + MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], + ensemblePtr, fullName, prefixObj); + } + + Tcl_IncrRefCount(prefixObj); + runResultingSubcommand: + + /* + * Do the real work of execution of the subcommand by building an array of + * objects (note that this is potentially not the same length as the + * number of arguments to this ensemble command), populating it and then + * feeding it back through the main command-lookup engine. In theory, we + * could look up the command in the namespace ourselves, as we already + * have the namespace in which it is guaranteed to exist, + * + * ((Q: That's not true if the -map option is used, is it?)) + * + * but we don't do that (the cacheing of the command object used should + * help with that.) + */ + + { + Tcl_Obj **prefixObjv; /* The list of objects to substitute in as the + * target command prefix. */ + Tcl_Obj *copyPtr; /* The actual list of words to dispatch to. + * Will be freed by the dispatch engine. */ + int prefixObjc, copyObjc; + Interp *iPtr = (Interp *) interp; + + /* + * Get the prefix that we're rewriting to. To do this we need to + * ensure that the internal representation of the list does not change + * so that we can safely keep the internal representations of the + * elements in the list. + * + * TODO: Use conventional list operations to make this code sane! + */ + + TclListObjGetElements(NULL, prefixObj, &prefixObjc, &prefixObjv); + + copyObjc = objc - 2 + prefixObjc; + copyPtr = Tcl_NewListObj(copyObjc, NULL); + if (copyObjc > 0) { + register Tcl_Obj **copyObjv; + /* Space used to construct the list of + * arguments to pass to the command that + * implements the ensemble subcommand. */ + register List *listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; + register int i; + + listRepPtr->elemCount = copyObjc; + copyObjv = &listRepPtr->elements; + memcpy(copyObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); + memcpy(copyObjv+prefixObjc, objv+1, + sizeof(Tcl_Obj *) * ensemblePtr->numParameters); + memcpy(copyObjv+prefixObjc+ensemblePtr->numParameters, + objv+ensemblePtr->numParameters+2, + sizeof(Tcl_Obj *) * (objc-ensemblePtr->numParameters-2)); + + for (i=0; i < copyObjc; i++) { + Tcl_IncrRefCount(copyObjv[i]); + } + } + TclDecrRefCount(prefixObj); + + /* + * Record what arguments the script sent in so that things like + * Tcl_WrongNumArgs can give the correct error message. Parameters + * count both as inserted and removed arguments. + */ + +#if 0 + if (TclInitRewriteEnsemble(interp, 2 + ensemblePtr->numParameters, prefixObjc + ensemblePtr->numParameters, objv)) { + TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); + } +#else + if (iPtr->ensembleRewrite.sourceObjs == NULL) { + iPtr->ensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = + 2 + ensemblePtr->numParameters; + iPtr->ensembleRewrite.numInsertedObjs = + prefixObjc + ensemblePtr->numParameters; + TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, + NULL); + } else { + register int ni = 2 + ensemblePtr->numParameters + - iPtr->ensembleRewrite.numInsertedObjs; + /* Position in objv of new front of insertion + * relative to old one. */ + if (ni > 0) { + iPtr->ensembleRewrite.numRemovedObjs += ni; + iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-1; + } else { + iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-2; + } + } +#endif + + /* + * Hand off to the target command. + */ + + iPtr->evalFlags |= TCL_EVAL_REDIRECT; + return Tcl_NREvalObj(interp, copyPtr, TCL_EVAL_INVOKE); + } + + unknownOrAmbiguousSubcommand: + /* + * Have not been able to match the subcommand asked for with a real + * subcommand that we export. See whether a handler has been registered + * for dealing with this situation. Will only call (at most) once for any + * particular ensemble invocation. + */ + + if (ensemblePtr->unknownHandler != NULL && reparseCount++ < 1) { + switch (EnsembleUnknownCallback(interp, ensemblePtr, objc, objv, + &prefixObj)) { + case TCL_OK: + goto runResultingSubcommand; + case TCL_ERROR: + return TCL_ERROR; + case TCL_CONTINUE: + goto restartEnsembleParse; + } + } + + /* + * We cannot determine what subcommand to hand off to, so generate a + * (standard) failure message. Note the one odd case compared with + * standard ensemble-like command, which is where a namespace has no + * exported commands at all... + */ + + Tcl_ResetResult(interp); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENSEMBLE", + TclGetString(objv[1+ensemblePtr->numParameters]), NULL); + if (ensemblePtr->subcommandTable.numEntries == 0) { + Tcl_AppendResult(interp, "unknown subcommand \"", + TclGetString(objv[1+ensemblePtr->numParameters]), + "\": namespace ", ensemblePtr->nsPtr->fullName, + " does not export any commands", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", + TclGetString(objv[1+ensemblePtr->numParameters]), NULL); + return TCL_ERROR; + } + Tcl_AppendResult(interp, "unknown ", + (ensemblePtr->flags & TCL_ENSEMBLE_PREFIX ? "or ambiguous " : ""), + "subcommand \"", TclGetString(objv[1+ensemblePtr->numParameters]), + "\": must be ", NULL); + if (ensemblePtr->subcommandTable.numEntries == 1) { + Tcl_AppendResult(interp, ensemblePtr->subcommandArrayPtr[0], NULL); + } else { + int i; + + for (i=0 ; isubcommandTable.numEntries-1 ; i++) { + Tcl_AppendResult(interp, + ensemblePtr->subcommandArrayPtr[i], ", ", NULL); + } + Tcl_AppendResult(interp, "or ", + ensemblePtr->subcommandArrayPtr[i], NULL); + } + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", + TclGetString(objv[1+ensemblePtr->numParameters]), NULL); + return TCL_ERROR; +} + +int +TclClearRootEnsemble( + ClientData data[], + Tcl_Interp *interp, + int result) +{ + TclResetRewriteEnsemble(interp, 1); + return result; +} + +/* + *---------------------------------------------------------------------- + * + * TclInitRewriteEnsemble -- + * + * Applies a rewrite of arguments so that an ensemble subcommand will + * report error messages correctly for the overall command. + * + * Results: + * Whether this is the first rewrite applied, a value which must be + * passed to TclResetRewriteEnsemble when undoing this command's + * behaviour. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +TclInitRewriteEnsemble( + Tcl_Interp *interp, + int numRemoved, + int numInserted, + Tcl_Obj *const *objv) +{ + Interp *iPtr = (Interp *) interp; + + int isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); + + if (isRootEnsemble) { + iPtr->ensembleRewrite.sourceObjs = objv; + iPtr->ensembleRewrite.numRemovedObjs = numRemoved; + iPtr->ensembleRewrite.numInsertedObjs = numInserted; + } else { + int numIns = iPtr->ensembleRewrite.numInsertedObjs; + + if (numIns < numRemoved) { + iPtr->ensembleRewrite.numRemovedObjs += numRemoved - numIns; + iPtr->ensembleRewrite.numInsertedObjs += numInserted - 1; + } else { + iPtr->ensembleRewrite.numInsertedObjs += numInserted - numRemoved; + } + } + return isRootEnsemble; +} + +/* + *---------------------------------------------------------------------- + * + * TclResetRewriteEnsemble -- + * + * Removes any rewrites applied to support proper reporting of error + * messages used in ensembles. Should be paired with + * TclInitRewriteEnsemble. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void +TclResetRewriteEnsemble( + Tcl_Interp *interp, + int isRootEnsemble) +{ + Interp *iPtr = (Interp *) interp; + + if (isRootEnsemble) { + iPtr->ensembleRewrite.sourceObjs = NULL; + iPtr->ensembleRewrite.numRemovedObjs = 0; + iPtr->ensembleRewrite.numInsertedObjs = 0; + } +} + +/* + * ---------------------------------------------------------------------- + * + * EnsmebleUnknownCallback -- + * + * Helper for the ensemble engine that handles the procesing of unknown + * callbacks. See the user documentation of the ensemble unknown handler + * for details; this function is only ever called when such a function is + * defined, and is only ever called once per ensemble dispatch (i.e. if a + * reparse still fails, this isn't called again). + * + * Results: + * TCL_OK - *prefixObjPtr contains the command words to dispatch + * to. + * TCL_CONTINUE - Need to reparse (*prefixObjPtr is invalid). + * TCL_ERROR - Something went wrong! Error message in interpreter. + * + * Side effects: + * Calls the Tcl interpreter, so arbitrary. + * + * ---------------------------------------------------------------------- + */ + +static inline int +EnsembleUnknownCallback( + Tcl_Interp *interp, + EnsembleConfig *ensemblePtr, + int objc, + Tcl_Obj *const objv[], + Tcl_Obj **prefixObjPtr) +{ + int paramc, i, result, prefixObjc; + Tcl_Obj **paramv, *unknownCmd, *ensObj; + char buf[TCL_INTEGER_SPACE]; + + /* + * Create the unknown command callback to determine what to do. + */ + + unknownCmd = Tcl_DuplicateObj(ensemblePtr->unknownHandler); + TclNewObj(ensObj); + Tcl_GetCommandFullName(interp, ensemblePtr->token, ensObj); + Tcl_ListObjAppendElement(NULL, unknownCmd, ensObj); + for (i=1 ; ievalFlags |= TCL_EVAL_REDIRECT; + result = Tcl_EvalObjv(interp, paramc, paramv, 0); + if ((result == TCL_OK) && (ensemblePtr->flags & ENSEMBLE_DEAD)) { + Tcl_SetResult(interp, + "unknown subcommand handler deleted its ensemble", + TCL_STATIC); + result = TCL_ERROR; + } + Tcl_Release(ensemblePtr); + + /* + * If we succeeded, we should either have a list of words that form the + * command to be executed, or an empty list. In the empty-list case, the + * ensemble is believed to be updated so we should ask the ensemble engine + * to reparse the original command. + */ + + if (result == TCL_OK) { + *prefixObjPtr = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(*prefixObjPtr); + TclDecrRefCount(unknownCmd); + Tcl_ResetResult(interp); + + /* + * Namespace is still there. Check if the result is a valid list. If + * it is, and it is non-empty, that list is what we are using as our + * replacement. + */ + + if (TclListObjLength(interp, *prefixObjPtr, &prefixObjc) != TCL_OK) { + TclDecrRefCount(*prefixObjPtr); + Tcl_AddErrorInfo(interp, "\n while parsing result of " + "ensemble unknown subcommand handler"); + return TCL_ERROR; + } + if (prefixObjc > 0) { + return TCL_OK; + } + + /* + * Namespace alive & empty result => reparse. + */ + + TclDecrRefCount(*prefixObjPtr); + return TCL_CONTINUE; + } + + /* + * Oh no! An exceptional result. Convert to an error. + */ + + if (!Tcl_InterpDeleted(interp)) { + if (result != TCL_ERROR) { + Tcl_ResetResult(interp); + Tcl_SetResult(interp, + "unknown subcommand handler returned bad code: ", + TCL_STATIC); + switch (result) { + case TCL_RETURN: + Tcl_AppendResult(interp, "return", NULL); + break; + case TCL_BREAK: + Tcl_AppendResult(interp, "break", NULL); + break; + case TCL_CONTINUE: + Tcl_AppendResult(interp, "continue", NULL); + break; + default: + sprintf(buf, "%d", result); + Tcl_AppendResult(interp, buf, NULL); + } + Tcl_AddErrorInfo(interp, "\n result of " + "ensemble unknown subcommand handler: "); + Tcl_AddErrorInfo(interp, TclGetString(unknownCmd)); + } else { + Tcl_AddErrorInfo(interp, + "\n (ensemble unknown subcommand handler)"); + } + } + TclDecrRefCount(unknownCmd); + return TCL_ERROR; +} + +/* + *---------------------------------------------------------------------- + * + * MakeCachedEnsembleCommand -- + * + * Cache what we've computed so far; it's not nice to repeatedly copy + * strings about. Note that to do this, we start by deleting any old + * representation that there was (though if it was an out of date + * ensemble rep, we can skip some of the deallocation process.) + * + * Results: + * None + * + * Side effects: + * Alters the internal representation of the first object parameter. + * + *---------------------------------------------------------------------- + */ + +static void +MakeCachedEnsembleCommand( + Tcl_Obj *objPtr, + EnsembleConfig *ensemblePtr, + const char *subcommandName, + Tcl_Obj *prefixObjPtr) +{ + register EnsembleCmdRep *ensembleCmd; + int length; + + if (objPtr->typePtr == &tclEnsembleCmdType) { + ensembleCmd = objPtr->internalRep.otherValuePtr; + Tcl_DecrRefCount(ensembleCmd->realPrefixObj); + TclNsDecrRefCount(ensembleCmd->nsPtr); + ckfree(ensembleCmd->fullSubcmdName); + } else { + /* + * Kill the old internal rep, and replace it with a brand new one of + * our own. + */ + + TclFreeIntRep(objPtr); + ensembleCmd = (EnsembleCmdRep *) ckalloc(sizeof(EnsembleCmdRep)); + objPtr->internalRep.otherValuePtr = ensembleCmd; + objPtr->typePtr = &tclEnsembleCmdType; + } + + /* + * Populate the internal rep. + */ + + ensembleCmd->nsPtr = ensemblePtr->nsPtr; + ensembleCmd->epoch = ensemblePtr->epoch; + ensembleCmd->token = ensemblePtr->token; + ensemblePtr->nsPtr->refCount++; + ensembleCmd->realPrefixObj = prefixObjPtr; + length = strlen(subcommandName)+1; + ensembleCmd->fullSubcmdName = ckalloc((unsigned) length); + memcpy(ensembleCmd->fullSubcmdName, subcommandName, (unsigned) length); + Tcl_IncrRefCount(ensembleCmd->realPrefixObj); +} + +/* + *---------------------------------------------------------------------- + * + * DeleteEnsembleConfig -- + * + * Destroys the data structure used to represent an ensemble. This is + * called when the ensemble's command is deleted (which happens + * automatically if the ensemble's namespace is deleted.) Maintainers + * should note that ensembles should be deleted by deleting their + * commands. + * + * Results: + * None. + * + * Side effects: + * Memory is (eventually) deallocated. + * + *---------------------------------------------------------------------- + */ + +static void +DeleteEnsembleConfig( + ClientData clientData) +{ + EnsembleConfig *ensemblePtr = clientData; + Namespace *nsPtr = ensemblePtr->nsPtr; + Tcl_HashSearch search; + Tcl_HashEntry *hEnt; + + /* + * Unlink from the ensemble chain if it has not been marked as having been + * done already. + */ + + if (ensemblePtr->next != ensemblePtr) { + EnsembleConfig *ensPtr = (EnsembleConfig *) nsPtr->ensembles; + + if (ensPtr == ensemblePtr) { + nsPtr->ensembles = (Tcl_Ensemble *) ensemblePtr->next; + } else { + while (ensPtr != NULL) { + if (ensPtr->next == ensemblePtr) { + ensPtr->next = ensemblePtr->next; + break; + } + ensPtr = ensPtr->next; + } + } + } + + /* + * Mark the namespace as dead so code that uses Tcl_Preserve() can tell + * whether disaster happened anyway. + */ + + ensemblePtr->flags |= ENSEMBLE_DEAD; + + /* + * Kill the pointer-containing fields. + */ + + if (ensemblePtr->subcommandTable.numEntries != 0) { + ckfree((char *) ensemblePtr->subcommandArrayPtr); + } + hEnt = Tcl_FirstHashEntry(&ensemblePtr->subcommandTable, &search); + while (hEnt != NULL) { + Tcl_Obj *prefixObj = Tcl_GetHashValue(hEnt); + + Tcl_DecrRefCount(prefixObj); + hEnt = Tcl_NextHashEntry(&search); + } + Tcl_DeleteHashTable(&ensemblePtr->subcommandTable); + if (ensemblePtr->subcmdList != NULL) { + Tcl_DecrRefCount(ensemblePtr->subcmdList); + } + if (ensemblePtr->parameterList != NULL) { + Tcl_DecrRefCount(ensemblePtr->parameterList); + } + if (ensemblePtr->subcommandDict != NULL) { + Tcl_DecrRefCount(ensemblePtr->subcommandDict); + } + if (ensemblePtr->unknownHandler != NULL) { + Tcl_DecrRefCount(ensemblePtr->unknownHandler); + } + + /* + * Arrange for the structure to be reclaimed. Note that this is complex + * because we have to make sure that we can react sensibly when an + * ensemble is deleted during the process of initialising the ensemble + * (especially the unknown callback.) + */ + + Tcl_EventuallyFree(ensemblePtr, TCL_DYNAMIC); +} + +/* + *---------------------------------------------------------------------- + * + * BuildEnsembleConfig -- + * + * Create the internal data structures that describe how an ensemble + * looks, being a hash mapping from the full command name to the Tcl list + * that describes the implementation prefix words, and a sorted array of + * all the full command names to allow for reasonably efficient + * unambiguous prefix handling. + * + * Results: + * None. + * + * Side effects: + * Reallocates and rebuilds the hash table and array stored at the + * ensemblePtr argument. For large ensembles or large namespaces, this is + * a potentially expensive operation. + * + *---------------------------------------------------------------------- + */ + +static void +BuildEnsembleConfig( + EnsembleConfig *ensemblePtr) +{ + Tcl_HashSearch search; /* Used for scanning the set of commands in + * the namespace that backs up this + * ensemble. */ + int i, j, isNew; + Tcl_HashTable *hash = &ensemblePtr->subcommandTable; + Tcl_HashEntry *hPtr; + + if (hash->numEntries != 0) { + /* + * Remove pre-existing table. + */ + + Tcl_HashSearch search; + + ckfree((char *) ensemblePtr->subcommandArrayPtr); + hPtr = Tcl_FirstHashEntry(hash, &search); + while (hPtr != NULL) { + Tcl_Obj *prefixObj = Tcl_GetHashValue(hPtr); + + Tcl_DecrRefCount(prefixObj); + hPtr = Tcl_NextHashEntry(&search); + } + Tcl_DeleteHashTable(hash); + Tcl_InitHashTable(hash, TCL_STRING_KEYS); + } + + /* + * See if we've got an export list. If so, we will only export exactly + * those commands, which may be either implemented by the prefix in the + * subcommandDict or mapped directly onto the namespace's commands. + */ + + if (ensemblePtr->subcmdList != NULL) { + Tcl_Obj **subcmdv, *target, *cmdObj, *cmdPrefixObj; + int subcmdc; + + TclListObjGetElements(NULL, ensemblePtr->subcmdList, &subcmdc, + &subcmdv); + for (i=0 ; isubcommandDict != NULL) { + Tcl_DictObjGet(NULL, ensemblePtr->subcommandDict, subcmdv[i], + &target); + if (target != NULL) { + Tcl_SetHashValue(hPtr, target); + Tcl_IncrRefCount(target); + continue; + } + } + + /* + * Not there, so map onto the namespace. Note in this case that we + * do not guarantee that the command is actually there; that is + * the programmer's responsibility (or [::unknown] of course). + */ + + cmdObj = Tcl_NewStringObj(ensemblePtr->nsPtr->fullName, -1); + if (ensemblePtr->nsPtr->parentPtr != NULL) { + Tcl_AppendStringsToObj(cmdObj, "::", name, NULL); + } else { + Tcl_AppendStringsToObj(cmdObj, name, NULL); + } + cmdPrefixObj = Tcl_NewListObj(1, &cmdObj); + Tcl_SetHashValue(hPtr, cmdPrefixObj); + Tcl_IncrRefCount(cmdPrefixObj); + } + } else if (ensemblePtr->subcommandDict != NULL) { + /* + * No subcmd list, but we do have a mapping dictionary so we should + * use the keys of that. Convert the dictionary's contents into the + * form required for the ensemble's internal hashtable. + */ + + Tcl_DictSearch dictSearch; + Tcl_Obj *keyObj, *valueObj; + int done; + + Tcl_DictObjFirst(NULL, ensemblePtr->subcommandDict, &dictSearch, + &keyObj, &valueObj, &done); + while (!done) { + const char *name = TclGetString(keyObj); + + hPtr = Tcl_CreateHashEntry(hash, name, &isNew); + Tcl_SetHashValue(hPtr, valueObj); + Tcl_IncrRefCount(valueObj); + Tcl_DictObjNext(&dictSearch, &keyObj, &valueObj, &done); + } + } else { + /* + * Discover what commands are actually exported by the namespace. + * What we have is an array of patterns and a hash table whose keys + * are the command names exported by the namespace (the contents do + * not matter here.) We must find out what commands are actually + * exported by filtering each command in the namespace against each of + * the patterns in the export list. Note that we use an intermediate + * hash table to make memory management easier, and because that makes + * exact matching far easier too. + * + * Suggestion for future enhancement: compute the unique prefixes and + * place them in the hash too, which should make for even faster + * matching. + */ + + hPtr = Tcl_FirstHashEntry(&ensemblePtr->nsPtr->cmdTable, &search); + for (; hPtr!= NULL ; hPtr=Tcl_NextHashEntry(&search)) { + char *nsCmdName = /* Name of command in namespace. */ + Tcl_GetHashKey(&ensemblePtr->nsPtr->cmdTable, hPtr); + + for (i=0 ; insPtr->numExportPatterns ; i++) { + if (Tcl_StringMatch(nsCmdName, + ensemblePtr->nsPtr->exportArrayPtr[i])) { + hPtr = Tcl_CreateHashEntry(hash, nsCmdName, &isNew); + + /* + * Remember, hash entries have a full reference to the + * substituted part of the command (as a list) as their + * content! + */ + + if (isNew) { + Tcl_Obj *cmdObj, *cmdPrefixObj; + + TclNewObj(cmdObj); + Tcl_AppendStringsToObj(cmdObj, + ensemblePtr->nsPtr->fullName, + (ensemblePtr->nsPtr->parentPtr ? "::" : ""), + nsCmdName, NULL); + cmdPrefixObj = Tcl_NewListObj(1, &cmdObj); + Tcl_SetHashValue(hPtr, cmdPrefixObj); + Tcl_IncrRefCount(cmdPrefixObj); + } + break; + } + } + } + } + + if (hash->numEntries == 0) { + ensemblePtr->subcommandArrayPtr = NULL; + return; + } + + /* + * Create a sorted array of all subcommands in the ensemble; hash tables + * are all very well for a quick look for an exact match, but they can't + * determine things like whether a string is a prefix of another (not + * without lots of preparation anyway) and they're no good for when we're + * generating the error message either. + * + * We do this by filling an array with the names (we use the hash keys + * directly to save a copy, since any time we change the array we change + * the hash too, and vice versa) and running quicksort over the array. + */ + + ensemblePtr->subcommandArrayPtr = (char **) + ckalloc(sizeof(char *) * hash->numEntries); + + /* + * Fill array from both ends as this makes us less likely to end up with + * performance problems in qsort(), which is good. Note that doing this + * makes this code much more opaque, but the naive alternatve: + * + * for (hPtr=Tcl_FirstHashEntry(hash,&search),i=0 ; + * hPtr!=NULL ; hPtr=Tcl_NextHashEntry(&search),i++) { + * ensemblePtr->subcommandArrayPtr[i] = Tcl_GetHashKey(hash, &hPtr); + * } + * + * can produce long runs of precisely ordered table entries when the + * commands in the namespace are declared in a sorted fashion (an ordering + * some people like) and the hashing functions (or the command names + * themselves) are fairly unfortunate. By filling from both ends, it + * requires active malice (and probably a debugger) to get qsort() to have + * awful runtime behaviour. + */ + + i = 0; + j = hash->numEntries; + hPtr = Tcl_FirstHashEntry(hash, &search); + while (hPtr != NULL) { + ensemblePtr->subcommandArrayPtr[i++] = Tcl_GetHashKey(hash, hPtr); + hPtr = Tcl_NextHashEntry(&search); + if (hPtr == NULL) { + break; + } + ensemblePtr->subcommandArrayPtr[--j] = Tcl_GetHashKey(hash, hPtr); + hPtr = Tcl_NextHashEntry(&search); + } + if (hash->numEntries > 1) { + qsort(ensemblePtr->subcommandArrayPtr, (unsigned) hash->numEntries, + sizeof(char *), NsEnsembleStringOrder); + } +} + +/* + *---------------------------------------------------------------------- + * + * NsEnsembleStringOrder -- + * + * Helper function to compare two pointers to two strings for use with + * qsort(). + * + * Results: + * -1 if the first string is smaller, 1 if the second string is smaller, + * and 0 if they are equal. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +static int +NsEnsembleStringOrder( + const void *strPtr1, + const void *strPtr2) +{ + return strcmp(*(const char **)strPtr1, *(const char **)strPtr2); +} + +/* + *---------------------------------------------------------------------- + * + * FreeEnsembleCmdRep -- + * + * Destroys the internal representation of a Tcl_Obj that has been + * holding information about a command in an ensemble. + * + * Results: + * None. + * + * Side effects: + * Memory is deallocated. If this held the last reference to a + * namespace's main structure, that main structure will also be + * destroyed. + * + *---------------------------------------------------------------------- + */ + +static void +FreeEnsembleCmdRep( + Tcl_Obj *objPtr) +{ + EnsembleCmdRep *ensembleCmd = objPtr->internalRep.otherValuePtr; + + Tcl_DecrRefCount(ensembleCmd->realPrefixObj); + ckfree(ensembleCmd->fullSubcmdName); + TclNsDecrRefCount(ensembleCmd->nsPtr); + ckfree((char *) ensembleCmd); + objPtr->typePtr = NULL; +} + +/* + *---------------------------------------------------------------------- + * + * DupEnsembleCmdRep -- + * + * Makes one Tcl_Obj into a copy of another that is a subcommand of an + * ensemble. + * + * Results: + * None. + * + * Side effects: + * Memory is allocated, and the namespace that the ensemble is built on + * top of gains another reference. + * + *---------------------------------------------------------------------- + */ + +static void +DupEnsembleCmdRep( + Tcl_Obj *objPtr, + Tcl_Obj *copyPtr) +{ + EnsembleCmdRep *ensembleCmd = objPtr->internalRep.otherValuePtr; + EnsembleCmdRep *ensembleCopy = (EnsembleCmdRep *) + ckalloc(sizeof(EnsembleCmdRep)); + int length = strlen(ensembleCmd->fullSubcmdName); + + copyPtr->typePtr = &tclEnsembleCmdType; + copyPtr->internalRep.otherValuePtr = ensembleCopy; + ensembleCopy->nsPtr = ensembleCmd->nsPtr; + ensembleCopy->epoch = ensembleCmd->epoch; + ensembleCopy->token = ensembleCmd->token; + ensembleCopy->nsPtr->refCount++; + ensembleCopy->realPrefixObj = ensembleCmd->realPrefixObj; + Tcl_IncrRefCount(ensembleCopy->realPrefixObj); + ensembleCopy->fullSubcmdName = ckalloc((unsigned) length+1); + memcpy(ensembleCopy->fullSubcmdName, ensembleCmd->fullSubcmdName, + (unsigned) length+1); +} + +/* + *---------------------------------------------------------------------- + * + * StringOfEnsembleCmdRep -- + * + * Creates a string representation of a Tcl_Obj that holds a subcommand + * of an ensemble. + * + * Results: + * None. + * + * Side effects: + * The object gains a string (UTF-8) representation. + * + *---------------------------------------------------------------------- + */ + +static void +StringOfEnsembleCmdRep( + Tcl_Obj *objPtr) +{ + EnsembleCmdRep *ensembleCmd = objPtr->internalRep.otherValuePtr; + int length = strlen(ensembleCmd->fullSubcmdName); + + objPtr->length = length; + objPtr->bytes = ckalloc((unsigned) length+1); + memcpy(objPtr->bytes, ensembleCmd->fullSubcmdName, (unsigned) length+1); +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileEnsemble -- + * + * Procedure called to compile an ensemble command. Note that most + * ensembles are not compiled, since modifying a compiled ensemble causes + * a invalidation of all existing bytecode (expensive!) which is not + * normally warranted. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the subcommands of the + * ensemble at runtime if a compile-time mapping is possible. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileEnsemble( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *tokenPtr; + Tcl_Obj *mapObj, *subcmdObj, *targetCmdObj, *listObj, **elems; + Tcl_Command ensemble = (Tcl_Command) cmdPtr; + Tcl_Parse synthetic; + int len, numBytes, result, flags = 0, i; + const char *word; + + if (parsePtr->numWords < 2) { + return TCL_ERROR; + } + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { + /* + * Too hard. + */ + + return TCL_ERROR; + } + + word = tokenPtr[1].start; + numBytes = tokenPtr[1].size; + + /* + * There's a sporting chance we'll be able to compile this. But now we + * must check properly. To do that, check that we're compiling an ensemble + * that has a compilable command as its appropriate subcommand. + */ + + if (Tcl_GetEnsembleMappingDict(NULL, ensemble, &mapObj) != TCL_OK + || mapObj == NULL) { + /* + * Either not an ensemble or a mapping isn't installed. Crud. Too hard + * to proceed. + */ + + return TCL_ERROR; + } + + /* + * Also refuse to compile anything that uses a formal parameter list for + * now, on the grounds that it is too complex. + */ + + if (Tcl_GetEnsembleParameterList(NULL, ensemble, &listObj) != TCL_OK + || listObj != NULL) { + /* + * Figuring out how to compile this has become too much. Bail out. + */ + + return TCL_ERROR; + } + + /* + * Next, get the flags. We need them on several code paths. + */ + + (void) Tcl_GetEnsembleFlags(NULL, ensemble, &flags); + + /* + * Check to see if there's also a subcommand list; must check to see if + * the subcommand we are calling is in that list if it exists, since that + * list filters the entries in the map. + */ + + (void) Tcl_GetEnsembleSubcommandList(NULL, ensemble, &listObj); + if (listObj != NULL) { + int sclen; + const char *str; + Tcl_Obj *matchObj = NULL; + + if (Tcl_ListObjGetElements(NULL, listObj, &len, &elems) != TCL_OK) { + return TCL_ERROR; + } + for (i=0 ; i 1 && Tcl_IsSafe(interp)) { + return TCL_ERROR; + } + targetCmdObj = elems[0]; + + Tcl_IncrRefCount(targetCmdObj); + cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, targetCmdObj); + TclDecrRefCount(targetCmdObj); + if (cmdPtr == NULL || cmdPtr->compileProc == NULL) { + /* + * Maps to an undefined command or a command without a compiler. + * Cannot compile. + */ + + return TCL_ERROR; + } + + /* + * Now we've done the mapping process, can now actually try to compile. + * We do this by handing off to the subcommand's actual compiler. But to + * do that, we have to perform some trickery to rewrite the arguments. + */ + + TclParseInit(interp, NULL, 0, &synthetic); + synthetic.numWords = parsePtr->numWords - 2 + len; + TclGrowParseTokenArray(&synthetic, 2*len); + synthetic.numTokens = 2*len; + + /* + * Now we have the space to work in, install something rewritten. Note + * that we are here praying for all our might that none of these words are + * a script; the error detection code will crash if that happens and there + * is nothing we can do to avoid it! + */ + + for (i=0 ; inumComponents + 1; + TclGrowParseTokenArray(&synthetic, toCopy); + memcpy(synthetic.tokenPtr + synthetic.numTokens, tokenPtr, + sizeof(Tcl_Token) * toCopy); + synthetic.numTokens += toCopy; + } + + /* + * Hand off compilation to the subcommand compiler. At last! + */ + + result = cmdPtr->compileProc(interp, &synthetic, cmdPtr, envPtr); + + /* + * Clean up if necessary. + */ + + Tcl_FreeParse(&synthetic); + return result; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclInt.h b/generic/tclInt.h index bccb5a8..f66fa33 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.460 2010/02/09 20:51:54 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.461 2010/02/13 18:11:06 dkf Exp $ */ #ifndef _TCLINT @@ -423,10 +423,91 @@ typedef struct { } EnsembleCmdRep; /* - * Flag to enable bytecode compilation of an ensemble. + * The client data for an ensemble command. This consists of the table of + * commands that are actually exported by the namespace, and an epoch counter + * that, combined with the exportLookupEpoch field of the namespace structure, + * defines whether the table contains valid data or will need to be recomputed + * next time the ensemble command is called. + */ + +typedef struct EnsembleConfig { + Namespace *nsPtr; /* The namspace backing this ensemble up. */ + Tcl_Command token; /* The token for the command that provides + * ensemble support for the namespace, or NULL + * if the command has been deleted (or never + * existed; the global namespace never has an + * ensemble command.) */ + int epoch; /* The epoch at which this ensemble's table of + * exported commands is valid. */ + char **subcommandArrayPtr; /* Array of ensemble subcommand names. At all + * consistent points, this will have the same + * number of entries as there are entries in + * the subcommandTable hash. */ + Tcl_HashTable subcommandTable; + /* Hash table of ensemble subcommand names, + * which are its keys so this also provides + * the storage management for those subcommand + * names. The contents of the entry values are + * object version the prefix lists to use when + * substituting for the command/subcommand to + * build the ensemble implementation command. + * Has to be stored here as well as in + * subcommandDict because that field is NULL + * when we are deriving the ensemble from the + * namespace exports list. FUTURE WORK: use + * object hash table here. */ + struct EnsembleConfig *next;/* The next ensemble in the linked list of + * ensembles associated with a namespace. If + * this field points to this ensemble, the + * structure has already been unlinked from + * all lists, and cannot be found by scanning + * the list from the namespace's ensemble + * field. */ + int flags; /* ORed combo of TCL_ENSEMBLE_PREFIX, + * ENSEMBLE_DEAD and ENSEMBLE_COMPILE. */ + + /* OBJECT FIELDS FOR ENSEMBLE CONFIGURATION */ + + Tcl_Obj *subcommandDict; /* Dictionary providing mapping from + * subcommands to their implementing command + * prefixes, or NULL if we are to build the + * map automatically from the namespace + * exports. */ + Tcl_Obj *subcmdList; /* List of commands that this ensemble + * actually provides, and whose implementation + * will be built using the subcommandDict (if + * present and defined) and by simple mapping + * to the namespace otherwise. If NULL, + * indicates that we are using the (dynamic) + * list of currently exported commands. */ + Tcl_Obj *unknownHandler; /* Script prefix used to handle the case when + * no match is found (according to the rule + * defined by flag bit TCL_ENSEMBLE_PREFIX) or + * NULL to use the default error-generating + * behaviour. The script execution gets all + * the arguments to the ensemble command + * (including objv[0]) and will have the + * results passed directly back to the caller + * (including the error code) unless the code + * is TCL_CONTINUE in which case the + * subcommand will be reparsed by the ensemble + * core, presumably because the ensemble + * itself has been updated. */ + Tcl_Obj *parameterList; /* List of ensemble parameter names. */ + int numParameters; /* Cached number of parameters. This is either + * 0 (if the parameterList field is NULL) or + * the length of the list in the parameterList + * field. */ +} EnsembleConfig; + +/* + * Various bits for the EnsembleConfig.flags field. */ -#define ENSEMBLE_COMPILE 0x4 +#define ENSEMBLE_DEAD 0x1 /* Flag value to say that the ensemble is dead + * and on its way out. */ +#define ENSEMBLE_COMPILE 0x4 /* Flag to enable bytecode compilation of an + * ensemble. */ /* *---------------------------------------------------------------- @@ -2859,6 +2940,7 @@ MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr, int *codePtr, int *levelPtr); MODULE_SCOPE int TclNokia770Doubles(); +MODULE_SCOPE void TclNsDecrRefCount(Namespace *nsPtr); MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const char *operation, const char *reason, int index); @@ -3178,6 +3260,9 @@ MODULE_SCOPE int Tcl_LsortObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_NamespaceObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int TclNamespaceEnsembleCmd(ClientData dummy, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); MODULE_SCOPE int Tcl_OpenObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index f8ee460..fbbab98 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.199 2010/01/03 20:29:11 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.200 2010/02/13 18:11:06 dkf Exp $ */ #include "tclInt.h" @@ -70,87 +70,6 @@ typedef struct ResolvedNsName { } ResolvedNsName; /* - * The client data for an ensemble command. This consists of the table of - * commands that are actually exported by the namespace, and an epoch counter - * that, combined with the exportLookupEpoch field of the namespace structure, - * defines whether the table contains valid data or will need to be recomputed - * next time the ensemble command is called. - */ - -typedef struct EnsembleConfig { - Namespace *nsPtr; /* The namspace backing this ensemble up. */ - Tcl_Command token; /* The token for the command that provides - * ensemble support for the namespace, or NULL - * if the command has been deleted (or never - * existed; the global namespace never has an - * ensemble command.) */ - int epoch; /* The epoch at which this ensemble's table of - * exported commands is valid. */ - char **subcommandArrayPtr; /* Array of ensemble subcommand names. At all - * consistent points, this will have the same - * number of entries as there are entries in - * the subcommandTable hash. */ - Tcl_HashTable subcommandTable; - /* Hash table of ensemble subcommand names, - * which are its keys so this also provides - * the storage management for those subcommand - * names. The contents of the entry values are - * object version the prefix lists to use when - * substituting for the command/subcommand to - * build the ensemble implementation command. - * Has to be stored here as well as in - * subcommandDict because that field is NULL - * when we are deriving the ensemble from the - * namespace exports list. FUTURE WORK: use - * object hash table here. */ - struct EnsembleConfig *next;/* The next ensemble in the linked list of - * ensembles associated with a namespace. If - * this field points to this ensemble, the - * structure has already been unlinked from - * all lists, and cannot be found by scanning - * the list from the namespace's ensemble - * field. */ - int flags; /* ORed combo of TCL_ENSEMBLE_PREFIX, ENS_DEAD - * and ENSEMBLE_COMPILE. */ - - /* OBJECT FIELDS FOR ENSEMBLE CONFIGURATION */ - - Tcl_Obj *subcommandDict; /* Dictionary providing mapping from - * subcommands to their implementing command - * prefixes, or NULL if we are to build the - * map automatically from the namespace - * exports. */ - Tcl_Obj *subcmdList; /* List of commands that this ensemble - * actually provides, and whose implementation - * will be built using the subcommandDict (if - * present and defined) and by simple mapping - * to the namespace otherwise. If NULL, - * indicates that we are using the (dynamic) - * list of currently exported commands. */ - Tcl_Obj *unknownHandler; /* Script prefix used to handle the case when - * no match is found (according to the rule - * defined by flag bit TCL_ENSEMBLE_PREFIX) or - * NULL to use the default error-generating - * behaviour. The script execution gets all - * the arguments to the ensemble command - * (including objv[0]) and will have the - * results passed directly back to the caller - * (including the error code) unless the code - * is TCL_CONTINUE in which case the - * subcommand will be reparsed by the ensemble - * core, presumably because the ensemble - * itself has been updated. */ - Tcl_Obj *parameterList; /* List of ensemble parameter names. */ - int numParameters; /* Cached number of parameters. This is either - * 0 (if the parameterList field is NULL) or - * the length of the list in the parameterList - * field. */ -} EnsembleConfig; - -#define ENS_DEAD 0x1 /* Flag value to say that the ensemble is dead - * and on its way out. */ - -/* * Declarations for functions local to this file: */ @@ -160,9 +79,6 @@ static int DoImport(Tcl_Interp *interp, const char *cmdName, const char *pattern, Namespace *importNsPtr, int allowOverwrite); static void DupNsNameInternalRep(Tcl_Obj *objPtr,Tcl_Obj *copyPtr); -static inline int EnsembleUnknownCallback(Tcl_Interp *interp, - EnsembleConfig *ensemblePtr, int objc, - Tcl_Obj *const objv[], Tcl_Obj **prefixObjPtr); static char * ErrorCodeRead(ClientData clientData,Tcl_Interp *interp, const char *name1, const char *name2, int flags); static char * ErrorInfoRead(ClientData clientData,Tcl_Interp *interp, @@ -188,8 +104,6 @@ static int NamespaceCurrentCmd(ClientData dummy, Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); static int NamespaceDeleteCmd(ClientData dummy,Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static int NamespaceEnsembleCmd(ClientData dummy, - Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); static int NamespaceEvalCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int NamespaceExistsCmd(ClientData dummy,Tcl_Interp *interp, @@ -221,20 +135,6 @@ static int NamespaceUnknownCmd(ClientData dummy, static int NamespaceWhichCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int SetNsNameFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); -static int NsEnsembleImplementationCmd(ClientData clientData, - Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); -static int NsEnsembleImplementationCmdNR(ClientData clientData, - Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]); -static void BuildEnsembleConfig(EnsembleConfig *ensemblePtr); -static int NsEnsembleStringOrder(const void *strPtr1, - const void *strPtr2); -static void DeleteEnsembleConfig(ClientData clientData); -static void MakeCachedEnsembleCommand(Tcl_Obj *objPtr, - EnsembleConfig *ensemblePtr, - const char *subcmdName, Tcl_Obj *prefixObjPtr); -static void FreeEnsembleCmdRep(Tcl_Obj *objPtr); -static void DupEnsembleCmdRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); -static void StringOfEnsembleCmdRep(Tcl_Obj *objPtr); static void UnlinkNsPath(Namespace *nsPtr); static Tcl_NRPostProc NsEval_Callback; @@ -253,21 +153,6 @@ static const Tcl_ObjType nsNameType = { NULL, /* updateStringProc */ SetNsNameFromAny /* setFromAnyProc */ }; - -/* - * This structure defines a Tcl object type that contains a reference to an - * ensemble subcommand (e.g. the "length" in [string length ab]). It is used - * to cache the mapping between the subcommand itself and the real command - * that implements it. - */ - -const Tcl_ObjType tclEnsembleCmdType = { - "ensembleCommand", /* the type's name */ - FreeEnsembleCmdRep, /* freeIntRepProc */ - DupEnsembleCmdRep, /* dupIntRepProc */ - StringOfEnsembleCmdRep, /* updateStringProc */ - NULL /* setFromAnyProc */ -}; /* *---------------------------------------------------------------------- @@ -430,7 +315,7 @@ Tcl_PushCallFrame( framePtr->clientData = NULL; framePtr->localCachePtr = NULL; framePtr->tailcallPtr = NULL; - + /* * Push the new call frame onto the interpreter's stack of procedure call * frames making it the current frame. @@ -556,7 +441,7 @@ void TclPopStackFrame( Tcl_Interp *interp) /* Interpreter with call frame to pop. */ { - CallFrame *freePtr = ((Interp *)interp)->framePtr; + CallFrame *freePtr = ((Interp *) interp)->framePtr; Tcl_PopCallFrame(interp); TclStackFree(interp, freePtr); @@ -619,7 +504,7 @@ ErrorCodeRead( const char *name2, int flags) { - Interp *iPtr = (Interp *)interp; + Interp *iPtr = (Interp *) interp; if (Tcl_InterpDeleted(interp) || !(iPtr->flags & ERR_LEGACY_COPY)) { return NULL; @@ -852,7 +737,7 @@ Tcl_CreateNamespace( if (parentPtr != NULL) { entryPtr = Tcl_CreateHashEntry( - TclGetNamespaceChildTable((Tcl_Namespace *)parentPtr), + TclGetNamespaceChildTable((Tcl_Namespace *) parentPtr), simpleName, &newEntry); Tcl_SetHashValue(entryPtr, nsPtr); } else { @@ -973,14 +858,14 @@ Tcl_DeleteNamespace( entryPtr != NULL;) { cmdPtr = (Command *) Tcl_GetHashValue(entryPtr); if (cmdPtr->nreProc == NRInterpCoroutine) { - Tcl_DeleteCommandFromToken((Tcl_Interp *) iPtr, (Tcl_Command)cmdPtr); - entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); + Tcl_DeleteCommandFromToken((Tcl_Interp *) iPtr, + (Tcl_Command) cmdPtr); + entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); } else { entryPtr = entryPtr->nextPtr; } - } - - + } + /* * If the namespace has associated ensemble commands, delete them first. * This leaves the actual contents of the namespace alone (unless they are @@ -1183,6 +1068,7 @@ TclTeardownNamespace( } if (nsPtr->commandPathSourceList != NULL) { NamespacePathEntry *nsPathPtr = nsPtr->commandPathSourceList; + do { if (nsPathPtr->nsPtr != NULL && nsPathPtr->creatorNsPtr != NULL) { nsPathPtr->creatorNsPtr->cmdRefEpoch++; @@ -1290,6 +1176,33 @@ NamespaceFree( /* *---------------------------------------------------------------------- * + * TclNsDecrRefCount -- + * + * Drops a reference to a namespace and frees it if the namespace has + * been deleted and the last reference has just been dropped. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void +TclNsDecrRefCount( + Namespace *nsPtr) +{ + nsPtr->refCount--; + if ((nsPtr->refCount == 0) && (nsPtr->flags & NS_DEAD)) { + NamespaceFree(nsPtr); + } +} + +/* + *---------------------------------------------------------------------- + * * Tcl_Export -- * * Makes all the commands matching a pattern available to later be @@ -1616,6 +1529,7 @@ Tcl_Import( for (hPtr = Tcl_FirstHashEntry(&importNsPtr->cmdTable, &search); (hPtr != NULL); hPtr = Tcl_NextHashEntry(&search)) { char *cmdName = Tcl_GetHashKey(&importNsPtr->cmdTable, hPtr); + if (Tcl_StringMatch(cmdName, simplePattern) && DoImport(interp, nsPtr, hPtr, cmdName, pattern, importNsPtr, allowOverwrite) == TCL_ERROR) { @@ -1834,13 +1748,13 @@ Tcl_ForgetImport( */ if (TclMatchIsTrivial(simplePattern)) { - Command *cmdPtr; - hPtr = Tcl_FindHashEntry(&nsPtr->cmdTable, simplePattern); - if ((hPtr != NULL) - && (cmdPtr = Tcl_GetHashValue(hPtr)) - && (cmdPtr->deleteProc == DeleteImportedCmd)) { - Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); + if (hPtr != NULL) { + Command *cmdPtr = Tcl_GetHashValue(hPtr); + + if (cmdPtr && (cmdPtr->deleteProc == DeleteImportedCmd)) { + Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); + } } return TCL_OK; } @@ -1970,7 +1884,7 @@ InvokeImportedNRCmd( ImportedCmdData *dataPtr = clientData; Command *realCmdPtr = dataPtr->realCmdPtr; - ((Interp *)interp)->evalFlags |= TCL_EVAL_REDIRECT; + ((Interp *) interp)->evalFlags |= TCL_EVAL_REDIRECT; return Tcl_NRCmdSwap(interp, (Tcl_Command) realCmdPtr, objc, objv, 0); } @@ -2424,7 +2338,9 @@ Tcl_FindNamespace( if (nsPtr != NULL) { return (Tcl_Namespace *) nsPtr; - } else if (flags & TCL_LEAVE_ERR_MSG) { + } + + if (flags & TCL_LEAVE_ERR_MSG) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "unknown namespace \"", name, "\"", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "NAMESPACE", name, NULL); @@ -2739,7 +2655,7 @@ TclResetShadowedCmdRefs( * for a fresh compilation of every bytecode. */ - if (((Command *)Tcl_GetHashValue(hPtr))->compileProc != NULL) { + if (((Command *)Tcl_GetHashValue(hPtr))->compileProc != NULL){ nsPtr->resolverEpoch++; } } @@ -2753,6 +2669,7 @@ TclResetShadowedCmdRefs( trailFront++; if (trailFront == trailSize) { int newSize = 2 * trailSize; + trailPtr = (Namespace **) TclStackRealloc(interp, trailPtr, newSize * sizeof(Namespace *)); trailSize = newSize; @@ -2917,7 +2834,7 @@ TclNRNamespaceObjCmd( NSInscopeIdx, NSOriginIdx, NSParentIdx, NSPathIdx, NSQualifiersIdx, NSTailIdx, NSUnknownIdx, NSUpvarIdx, NSWhichIdx }; - int index, result; + int index; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); @@ -2928,72 +2845,54 @@ TclNRNamespaceObjCmd( * Return an index reflecting the particular subcommand. */ - result = Tcl_GetIndexFromObj((Tcl_Interp *) interp, objv[1], subCmds, - "option", /*flags*/ 0, (int *) &index); - if (result != TCL_OK) { - return result; + if (Tcl_GetIndexFromObj(interp, objv[1], subCmds, "option", /*flags*/ 0, + (int *) &index) != TCL_OK) { + return TCL_ERROR; } switch (index) { case NSChildrenIdx: - result = NamespaceChildrenCmd(clientData, interp, objc, objv); - break; + return NamespaceChildrenCmd(clientData, interp, objc, objv); case NSCodeIdx: - result = NamespaceCodeCmd(clientData, interp, objc, objv); - break; + return NamespaceCodeCmd(clientData, interp, objc, objv); case NSCurrentIdx: - result = NamespaceCurrentCmd(clientData, interp, objc, objv); - break; + return NamespaceCurrentCmd(clientData, interp, objc, objv); case NSDeleteIdx: - result = NamespaceDeleteCmd(clientData, interp, objc, objv); - break; + return NamespaceDeleteCmd(clientData, interp, objc, objv); case NSEnsembleIdx: - result = NamespaceEnsembleCmd(clientData, interp, objc, objv); - break; + return TclNamespaceEnsembleCmd(clientData, interp, objc, objv); case NSEvalIdx: - result = NamespaceEvalCmd(clientData, interp, objc, objv); - break; + return NamespaceEvalCmd(clientData, interp, objc, objv); case NSExistsIdx: - result = NamespaceExistsCmd(clientData, interp, objc, objv); - break; + return NamespaceExistsCmd(clientData, interp, objc, objv); case NSExportIdx: - result = NamespaceExportCmd(clientData, interp, objc, objv); - break; + return NamespaceExportCmd(clientData, interp, objc, objv); case NSForgetIdx: - result = NamespaceForgetCmd(clientData, interp, objc, objv); - break; + return NamespaceForgetCmd(clientData, interp, objc, objv); case NSImportIdx: - result = NamespaceImportCmd(clientData, interp, objc, objv); - break; + return NamespaceImportCmd(clientData, interp, objc, objv); case NSInscopeIdx: - result = NamespaceInscopeCmd(clientData, interp, objc, objv); - break; + return NamespaceInscopeCmd(clientData, interp, objc, objv); case NSOriginIdx: - result = NamespaceOriginCmd(clientData, interp, objc, objv); - break; + return NamespaceOriginCmd(clientData, interp, objc, objv); case NSParentIdx: - result = NamespaceParentCmd(clientData, interp, objc, objv); - break; + return NamespaceParentCmd(clientData, interp, objc, objv); case NSPathIdx: - result = NamespacePathCmd(clientData, interp, objc, objv); - break; + return NamespacePathCmd(clientData, interp, objc, objv); case NSQualifiersIdx: - result = NamespaceQualifiersCmd(clientData, interp, objc, objv); - break; + return NamespaceQualifiersCmd(clientData, interp, objc, objv); case NSTailIdx: - result = NamespaceTailCmd(clientData, interp, objc, objv); - break; + return NamespaceTailCmd(clientData, interp, objc, objv); case NSUpvarIdx: - result = NamespaceUpvarCmd(clientData, interp, objc, objv); - break; + return NamespaceUpvarCmd(clientData, interp, objc, objv); case NSUnknownIdx: - result = NamespaceUnknownCmd(clientData, interp, objc, objv); - break; + return NamespaceUnknownCmd(clientData, interp, objc, objv); case NSWhichIdx: - result = NamespaceWhichCmd(clientData, interp, objc, objv); - break; + return NamespaceWhichCmd(clientData, interp, objc, objv); + default: + Tcl_Panic("unhandled namespace subcommand"); } - return result; + return TCL_ERROR; } /* @@ -3320,7 +3219,7 @@ NamespaceDeleteCmd( name = TclGetString(objv[i]); namespacePtr = Tcl_FindNamespace(interp, name, NULL, /*flags*/ 0); if ((namespacePtr == NULL) - || (((Namespace *)namespacePtr)->flags & NS_KILLED)) { + || (((Namespace *) namespacePtr)->flags & NS_KILLED)) { Tcl_AppendResult(interp, "unknown namespace \"", TclGetString(objv[i]), "\" in namespace delete command", NULL); @@ -3379,7 +3278,7 @@ NamespaceEvalCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; - CmdFrame* invoker; + CmdFrame *invoker; int word; Tcl_Namespace *namespacePtr; CallFrame *framePtr, **framePtrPtr; @@ -3607,6 +3506,7 @@ NamespaceExportCmd( */ Tcl_Obj *listPtr = Tcl_NewListObj(0, NULL); + result = Tcl_AppendExportList(interp, (Tcl_Namespace *) currNsPtr, listPtr); if (result != TCL_OK) { @@ -4202,6 +4102,7 @@ UnlinkNsPath( int i; for (i=0 ; icommandPathLength ; i++) { NamespacePathEntry *nsPathPtr = &nsPtr->commandPathArray[i]; + if (nsPathPtr->prevPtr != NULL) { nsPathPtr->prevPtr->nextPtr = nsPathPtr->nextPtr; } @@ -4242,6 +4143,7 @@ TclInvalidateNsPath( Namespace *nsPtr) { NamespacePathEntry *nsPathPtr = nsPtr->commandPathSourceList; + while (nsPathPtr != NULL) { if (nsPathPtr->nsPtr != NULL) { nsPathPtr->creatorNsPtr->cmdRefEpoch++; @@ -4405,10 +4307,10 @@ Tcl_GetNamespaceUnknownHandler( * exists. */ Tcl_Namespace *nsPtr) /* The namespace. */ { - Namespace *currNsPtr = (Namespace *)nsPtr; + Namespace *currNsPtr = (Namespace *) nsPtr; if (currNsPtr->unknownHandlerPtr == NULL && - currNsPtr == ((Interp *)interp)->globalNsPtr) { + currNsPtr == ((Interp *) interp)->globalNsPtr) { /* * Default handler for global namespace is "::unknown". For all other * namespaces, it is NULL (which falls back on the global unknown @@ -4449,7 +4351,7 @@ Tcl_SetNamespaceUnknownHandler( Tcl_Obj *handlerPtr) /* The new handler, or NULL to reset. */ { int lstlen = 0; - Namespace *currNsPtr = (Namespace *)nsPtr; + Namespace *currNsPtr = (Namespace *) nsPtr; /* * Ensure that we check for errors *first* before we change anything. @@ -4601,8 +4503,7 @@ NamespaceUpvarCmd( const char *myName; if (objc < 3 || !(objc & 1)) { - Tcl_WrongNumArgs(interp, 2, objv, - "ns ?otherVar myVar ...?"); + Tcl_WrongNumArgs(interp, 2, objv, "ns ?otherVar myVar ...?"); return TCL_ERROR; } @@ -4615,7 +4516,7 @@ NamespaceUpvarCmd( for (; objc>0 ; objc-=2, objv+=2) { /* - * Locate the other variable + * Locate the other variable. */ savedNsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; @@ -4744,9 +4645,7 @@ FreeNsNameInternalRep( register Tcl_Obj *objPtr) /* nsName object with internal representation * to free. */ { - register ResolvedNsName *resNamePtr = (ResolvedNsName *) - objPtr->internalRep.twoPtrValue.ptr1; - Namespace *nsPtr; + ResolvedNsName *resNamePtr = objPtr->internalRep.twoPtrValue.ptr1; /* * Decrement the reference count of the namespace. If there are no more @@ -4755,18 +4654,13 @@ FreeNsNameInternalRep( resNamePtr->refCount--; if (resNamePtr->refCount == 0) { - /* * Decrement the reference count for the cached namespace. If the * namespace is dead, and there are no more references to it, free * it. */ - nsPtr = resNamePtr->nsPtr; - nsPtr->refCount--; - if ((nsPtr->refCount == 0) && (nsPtr->flags & NS_DEAD)) { - NamespaceFree(nsPtr); - } + TclNsDecrRefCount(resNamePtr->nsPtr); ckfree((char *) resNamePtr); } objPtr->typePtr = NULL; @@ -4796,8 +4690,7 @@ DupNsNameInternalRep( Tcl_Obj *srcPtr, /* Object with internal rep to copy. */ register Tcl_Obj *copyPtr) /* Object with internal rep to set. */ { - register ResolvedNsName *resNamePtr = (ResolvedNsName *) - srcPtr->internalRep.twoPtrValue.ptr1; + ResolvedNsName *resNamePtr = srcPtr->internalRep.twoPtrValue.ptr1; copyPtr->internalRep.twoPtrValue.ptr1 = resNamePtr; resNamePtr->refCount++; @@ -4933,2618 +4826,6 @@ TclGetNamespaceChildTable( /* *---------------------------------------------------------------------- * - * NamespaceEnsembleCmd -- - * - * Invoked to implement the "namespace ensemble" command that creates and - * manipulates ensembles built on top of namespaces. Handles the - * following syntax: - * - * namespace ensemble name ?dictionary? - * - * Results: - * Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong. - * - * Side effects: - * Creates the ensemble for the namespace if one did not previously - * exist. Alternatively, alters the way that the ensemble's subcommand => - * implementation prefix is configured. - * - *---------------------------------------------------------------------- - */ - -static int -NamespaceEnsembleCmd( - ClientData dummy, - Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) -{ - Namespace *nsPtr; - Tcl_Command token; - static const char *const subcommands[] = { - "configure", "create", "exists", NULL - }; - enum EnsSubcmds { - ENS_CONFIG, ENS_CREATE, ENS_EXISTS - }; - static const char *const createOptions[] = { - "-command", "-map", "-parameters", "-prefixes", "-subcommands", - "-unknown", NULL - }; - enum EnsCreateOpts { - CRT_CMD, CRT_MAP, CRT_PARAM, CRT_PREFIX, CRT_SUBCMDS, CRT_UNKNOWN - }; - static const char *const configOptions[] = { - "-map", "-namespace", "-parameters", "-prefixes", "-subcommands", - "-unknown", NULL - }; - enum EnsConfigOpts { - CONF_MAP, CONF_NAMESPACE, CONF_PARAM, CONF_PREFIX, CONF_SUBCMDS, - CONF_UNKNOWN - }; - int index; - - nsPtr = (Namespace *) TclGetCurrentNamespace(interp); - if (nsPtr == NULL || nsPtr->flags & NS_DYING) { - if (!Tcl_InterpDeleted(interp)) { - Tcl_AppendResult(interp, - "tried to manipulate ensemble of deleted namespace", NULL); - } - return TCL_ERROR; - } - - if (objc < 3) { - Tcl_WrongNumArgs(interp, 2, objv, "subcommand ?arg ...?"); - return TCL_ERROR; - } - if (Tcl_GetIndexFromObj(interp, objv[2], subcommands, "subcommand", 0, - &index) != TCL_OK) { - return TCL_ERROR; - } - - switch ((enum EnsSubcmds) index) { - case ENS_CREATE: { - const char *name; - Tcl_DictSearch search; - Tcl_Obj *listObj; - int done, len, allocatedMapFlag = 0; - /* - * Defaults - */ - Tcl_Obj *subcmdObj = NULL; - Tcl_Obj *mapObj = NULL; - int permitPrefix = 1; - Tcl_Obj *unknownObj = NULL; - Tcl_Obj *paramObj = NULL; - - /* - * Check that we've got option-value pairs... [Bug 1558654] - */ - - if ((objc & 1) == 0) { - Tcl_WrongNumArgs(interp, 3, objv, "?option value ...?"); - return TCL_ERROR; - } - objv += 3; - objc -= 3; - - /* - * Work out what name to use for the command to create. If supplied, - * it is either fully specified or relative to the current namespace. - * If not supplied, it is exactly the name of the current namespace. - */ - - name = nsPtr->fullName; - - /* - * Parse the option list, applying type checks as we go. Note that we - * are not incrementing any reference counts in the objects at this - * stage, so the presence of an option multiple times won't cause any - * memory leaks. - */ - - for (; objc>1 ; objc-=2,objv+=2) { - if (Tcl_GetIndexFromObj(interp, objv[0], createOptions, "option", - 0, &index) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - switch ((enum EnsCreateOpts) index) { - case CRT_CMD: - name = TclGetString(objv[1]); - continue; - case CRT_SUBCMDS: - if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - subcmdObj = (len > 0 ? objv[1] : NULL); - continue; - case CRT_PARAM: - if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - paramObj = (len > 0 ? objv[1] : NULL); - continue; - case CRT_MAP: { - Tcl_Obj *patchedDict = NULL, *subcmdObj; - - /* - * Verify that the map is sensible. - */ - - if (Tcl_DictObjFirst(interp, objv[1], &search, - &subcmdObj, &listObj, &done) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - if (done) { - mapObj = NULL; - continue; - } - do { - Tcl_Obj **listv; - const char *cmd; - - if (TclListObjGetElements(interp, listObj, &len, - &listv) != TCL_OK) { - Tcl_DictObjDone(&search); - if (patchedDict) { - Tcl_DecrRefCount(patchedDict); - } - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - if (len < 1) { - Tcl_SetResult(interp, - "ensemble subcommand implementations " - "must be non-empty lists", TCL_STATIC); - Tcl_DictObjDone(&search); - if (patchedDict) { - Tcl_DecrRefCount(patchedDict); - } - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - cmd = TclGetString(listv[0]); - if (!(cmd[0] == ':' && cmd[1] == ':')) { - Tcl_Obj *newList = Tcl_NewListObj(len, listv); - Tcl_Obj *newCmd = Tcl_NewStringObj(nsPtr->fullName,-1); - - if (nsPtr->parentPtr) { - Tcl_AppendStringsToObj(newCmd, "::", NULL); - } - Tcl_AppendObjToObj(newCmd, listv[0]); - Tcl_ListObjReplace(NULL, newList, 0, 1, 1, &newCmd); - if (patchedDict == NULL) { - patchedDict = Tcl_DuplicateObj(objv[1]); - } - Tcl_DictObjPut(NULL, patchedDict, subcmdObj, newList); - } - Tcl_DictObjNext(&search, &subcmdObj, &listObj, &done); - } while (!done); - - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - mapObj = (patchedDict ? patchedDict : objv[1]); - if (patchedDict) { - allocatedMapFlag = 1; - } - continue; - } - case CRT_PREFIX: - if (Tcl_GetBooleanFromObj(interp, objv[1], - &permitPrefix) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - continue; - case CRT_UNKNOWN: - if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - unknownObj = (len > 0 ? objv[1] : NULL); - continue; - } - } - - /* - * Create the ensemble. Note that this might delete another ensemble - * linked to the same namespace, so we must be careful. However, we - * should be OK because we only link the namespace into the list once - * we've created it (and after any deletions have occurred.) - */ - - token = Tcl_CreateEnsemble(interp, name, NULL, - (permitPrefix ? TCL_ENSEMBLE_PREFIX : 0)); - Tcl_SetEnsembleSubcommandList(interp, token, subcmdObj); - Tcl_SetEnsembleMappingDict(interp, token, mapObj); - Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); - Tcl_SetEnsembleParameterList(interp, token, paramObj); - - /* - * Tricky! Must ensure that the result is not shared (command delete - * traces could have corrupted the pristine object that we started - * with). [Snit test rename-1.5] - */ - - Tcl_ResetResult(interp); - Tcl_GetCommandFullName(interp, token, Tcl_GetObjResult(interp)); - return TCL_OK; - } - - case ENS_EXISTS: - if (objc != 4) { - Tcl_WrongNumArgs(interp, 3, objv, "cmdname"); - return TCL_ERROR; - } - Tcl_SetObjResult(interp, Tcl_NewBooleanObj( - Tcl_FindEnsemble(interp, objv[3], 0) != NULL)); - return TCL_OK; - - case ENS_CONFIG: - if (objc < 4 || (objc != 5 && objc & 1)) { - Tcl_WrongNumArgs(interp, 3, objv, - "cmdname ?-option value ...? ?arg ...?"); - return TCL_ERROR; - } - token = Tcl_FindEnsemble(interp, objv[3], TCL_LEAVE_ERR_MSG); - if (token == NULL) { - return TCL_ERROR; - } - - if (objc == 5) { - Tcl_Obj *resultObj = NULL; /* silence gcc 4 warning */ - - if (Tcl_GetIndexFromObj(interp, objv[4], configOptions, "option", - 0, &index) != TCL_OK) { - return TCL_ERROR; - } - switch ((enum EnsConfigOpts) index) { - case CONF_SUBCMDS: - Tcl_GetEnsembleSubcommandList(NULL, token, &resultObj); - if (resultObj != NULL) { - Tcl_SetObjResult(interp, resultObj); - } - break; - case CONF_PARAM: - Tcl_GetEnsembleParameterList(NULL, token, &resultObj); - if (resultObj != NULL) { - Tcl_SetObjResult(interp, resultObj); - } - break; - case CONF_MAP: - Tcl_GetEnsembleMappingDict(NULL, token, &resultObj); - if (resultObj != NULL) { - Tcl_SetObjResult(interp, resultObj); - } - break; - case CONF_NAMESPACE: { - Tcl_Namespace *namespacePtr = NULL; /* silence gcc 4 warning */ - - Tcl_GetEnsembleNamespace(NULL, token, &namespacePtr); - Tcl_SetResult(interp, ((Namespace *)namespacePtr)->fullName, - TCL_VOLATILE); - break; - } - case CONF_PREFIX: { - int flags = 0; /* silence gcc 4 warning */ - - Tcl_GetEnsembleFlags(NULL, token, &flags); - Tcl_SetObjResult(interp, - Tcl_NewBooleanObj(flags & TCL_ENSEMBLE_PREFIX)); - break; - } - case CONF_UNKNOWN: - Tcl_GetEnsembleUnknownHandler(NULL, token, &resultObj); - if (resultObj != NULL) { - Tcl_SetObjResult(interp, resultObj); - } - break; - } - return TCL_OK; - - } else if (objc == 4) { - /* - * Produce list of all information. - */ - - Tcl_Obj *resultObj, *tmpObj = NULL; /* silence gcc 4 warning */ - Tcl_Namespace *namespacePtr = NULL; /* silence gcc 4 warning */ - int flags = 0; /* silence gcc 4 warning */ - - TclNewObj(resultObj); - - /* -map option */ - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_MAP], -1)); - Tcl_GetEnsembleMappingDict(NULL, token, &tmpObj); - Tcl_ListObjAppendElement(NULL, resultObj, - (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); - - /* -namespace option */ - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_NAMESPACE], -1)); - Tcl_GetEnsembleNamespace(NULL, token, &namespacePtr); - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(((Namespace *)namespacePtr)->fullName, - -1)); - - /* -parameters option */ - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_PARAM], -1)); - Tcl_GetEnsembleParameterList(NULL, token, &tmpObj); - Tcl_ListObjAppendElement(NULL, resultObj, - (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); - - /* -prefix option */ - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_PREFIX], -1)); - Tcl_GetEnsembleFlags(NULL, token, &flags); - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewBooleanObj(flags & TCL_ENSEMBLE_PREFIX)); - - /* -subcommands option */ - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_SUBCMDS], -1)); - Tcl_GetEnsembleSubcommandList(NULL, token, &tmpObj); - Tcl_ListObjAppendElement(NULL, resultObj, - (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); - - /* -unknown option */ - Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_UNKNOWN], -1)); - Tcl_GetEnsembleUnknownHandler(NULL, token, &tmpObj); - Tcl_ListObjAppendElement(NULL, resultObj, - (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); - - Tcl_SetObjResult(interp, resultObj); - return TCL_OK; - } else { - Tcl_DictSearch search; - Tcl_Obj *listObj; - int done, len, allocatedMapFlag = 0; - Tcl_Obj *subcmdObj = NULL, *mapObj = NULL, *paramObj = NULL, - *unknownObj = NULL; /* Defaults, silence gcc 4 warnings */ - int permitPrefix, flags = 0; /* silence gcc 4 warning */ - - Tcl_GetEnsembleSubcommandList(NULL, token, &subcmdObj); - Tcl_GetEnsembleMappingDict(NULL, token, &mapObj); - Tcl_GetEnsembleParameterList(NULL, token, ¶mObj); - Tcl_GetEnsembleUnknownHandler(NULL, token, &unknownObj); - Tcl_GetEnsembleFlags(NULL, token, &flags); - permitPrefix = (flags & TCL_ENSEMBLE_PREFIX) != 0; - - objv += 4; - objc -= 4; - - /* - * Parse the option list, applying type checks as we go. Note that - * we are not incrementing any reference counts in the objects at - * this stage, so the presence of an option multiple times won't - * cause any memory leaks. - */ - - for (; objc>0 ; objc-=2,objv+=2) { - if (Tcl_GetIndexFromObj(interp, objv[0], configOptions, - "option", 0, &index) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - switch ((enum EnsConfigOpts) index) { - case CONF_SUBCMDS: - if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - subcmdObj = (len > 0 ? objv[1] : NULL); - continue; - case CONF_PARAM: - if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - paramObj = (len > 0 ? objv[1] : NULL); - continue; - case CONF_MAP: { - Tcl_Obj *patchedDict = NULL, *subcmdObj; - - /* - * Verify that the map is sensible. - */ - - if (Tcl_DictObjFirst(interp, objv[1], &search, - &subcmdObj, &listObj, &done) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - if (done) { - mapObj = NULL; - continue; - } - do { - Tcl_Obj **listv; - const char *cmd; - - if (TclListObjGetElements(interp, listObj, &len, - &listv) != TCL_OK) { - Tcl_DictObjDone(&search); - if (patchedDict) { - Tcl_DecrRefCount(patchedDict); - } - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - if (len < 1) { - Tcl_SetResult(interp, - "ensemble subcommand implementations " - "must be non-empty lists", TCL_STATIC); - Tcl_DictObjDone(&search); - if (patchedDict) { - Tcl_DecrRefCount(patchedDict); - } - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - cmd = TclGetString(listv[0]); - if (!(cmd[0] == ':' && cmd[1] == ':')) { - Tcl_Obj *newList = Tcl_NewListObj(len, listv); - Tcl_Obj *newCmd = - Tcl_NewStringObj(nsPtr->fullName, -1); - if (nsPtr->parentPtr) { - Tcl_AppendStringsToObj(newCmd, "::", NULL); - } - Tcl_AppendObjToObj(newCmd, listv[0]); - Tcl_ListObjReplace(NULL, newList, 0,1, 1,&newCmd); - if (patchedDict == NULL) { - patchedDict = Tcl_DuplicateObj(objv[1]); - } - Tcl_DictObjPut(NULL, patchedDict, subcmdObj, - newList); - } - Tcl_DictObjNext(&search, &subcmdObj, &listObj, &done); - } while (!done); - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - mapObj = (patchedDict ? patchedDict : objv[1]); - if (patchedDict) { - allocatedMapFlag = 1; - } - continue; - } - case CONF_NAMESPACE: - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - Tcl_AppendResult(interp, "option -namespace is read-only", - NULL); - return TCL_ERROR; - case CONF_PREFIX: - if (Tcl_GetBooleanFromObj(interp, objv[1], - &permitPrefix) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - continue; - case CONF_UNKNOWN: - if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; - } - unknownObj = (len > 0 ? objv[1] : NULL); - continue; - } - } - - /* - * Update the namespace now that we've finished the parsing stage. - */ - - flags = (permitPrefix ? flags|TCL_ENSEMBLE_PREFIX - : flags&~TCL_ENSEMBLE_PREFIX); - Tcl_SetEnsembleSubcommandList(interp, token, subcmdObj); - Tcl_SetEnsembleMappingDict(interp, token, mapObj); - Tcl_SetEnsembleParameterList(interp, token, paramObj); - Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); - Tcl_SetEnsembleFlags(interp, token, flags); - return TCL_OK; - } - - default: - Tcl_Panic("unexpected ensemble command"); - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_CreateEnsemble -- - * - * Create a simple ensemble attached to the given namespace. - * - * Results: - * The token for the command created. - * - * Side effects: - * The ensemble is created and marked for compilation. - * - *---------------------------------------------------------------------- - */ - -Tcl_Command -Tcl_CreateEnsemble( - Tcl_Interp *interp, - const char *name, - Tcl_Namespace *namespacePtr, - int flags) -{ - Namespace *nsPtr = (Namespace *) namespacePtr; - EnsembleConfig *ensemblePtr = (EnsembleConfig *) - ckalloc(sizeof(EnsembleConfig)); - Tcl_Obj *nameObj = NULL; - - if (nsPtr == NULL) { - nsPtr = (Namespace *) TclGetCurrentNamespace(interp); - } - - /* - * Make the name of the ensemble into a fully qualified name. This might - * allocate a temporary object. - */ - - if (!(name[0] == ':' && name[1] == ':')) { - nameObj = Tcl_NewStringObj(nsPtr->fullName, -1); - if (nsPtr->parentPtr == NULL) { - Tcl_AppendStringsToObj(nameObj, name, NULL); - } else { - Tcl_AppendStringsToObj(nameObj, "::", name, NULL); - } - Tcl_IncrRefCount(nameObj); - name = TclGetString(nameObj); - } - - ensemblePtr->nsPtr = nsPtr; - ensemblePtr->epoch = 0; - Tcl_InitHashTable(&ensemblePtr->subcommandTable, TCL_STRING_KEYS); - ensemblePtr->subcommandArrayPtr = NULL; - ensemblePtr->subcmdList = NULL; - ensemblePtr->subcommandDict = NULL; - ensemblePtr->flags = flags; - ensemblePtr->numParameters = 0; - ensemblePtr->parameterList = NULL; - ensemblePtr->unknownHandler = NULL; - ensemblePtr->token = Tcl_NRCreateCommand(interp, name, - NsEnsembleImplementationCmd, NsEnsembleImplementationCmdNR, - ensemblePtr, DeleteEnsembleConfig); - ensemblePtr->next = (EnsembleConfig *) nsPtr->ensembles; - nsPtr->ensembles = (Tcl_Ensemble *) ensemblePtr; - - /* - * Trigger an eventual recomputation of the ensemble command set. Note - * that this is slightly tricky, as it means that we are not actually - * counting the number of namespace export actions, but it is the simplest - * way to go! - */ - - nsPtr->exportLookupEpoch++; - - if (flags & ENSEMBLE_COMPILE) { - ((Command *) ensemblePtr->token)->compileProc = TclCompileEnsemble; - } - - if (nameObj != NULL) { - TclDecrRefCount(nameObj); - } - return ensemblePtr->token; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_SetEnsembleSubcommandList -- - * - * Set the subcommand list for a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an ensemble - * or the subcommand list - if non-NULL - is not a list). - * - * Side effects: - * The ensemble is updated and marked for recompilation. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_SetEnsembleSubcommandList( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj *subcmdList) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - Tcl_Obj *oldList; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - return TCL_ERROR; - } - if (subcmdList != NULL) { - int length; - - if (TclListObjLength(interp, subcmdList, &length) != TCL_OK) { - return TCL_ERROR; - } - if (length < 1) { - subcmdList = NULL; - } - } - - ensemblePtr = cmdPtr->objClientData; - oldList = ensemblePtr->subcmdList; - ensemblePtr->subcmdList = subcmdList; - if (subcmdList != NULL) { - Tcl_IncrRefCount(subcmdList); - } - if (oldList != NULL) { - TclDecrRefCount(oldList); - } - - /* - * Trigger an eventual recomputation of the ensemble command set. Note - * that this is slightly tricky, as it means that we are not actually - * counting the number of namespace export actions, but it is the simplest - * way to go! - */ - - ensemblePtr->nsPtr->exportLookupEpoch++; - - /* - * Special hack to make compiling of [info exists] work when the - * dictionary is modified. - */ - - if (cmdPtr->compileProc != NULL) { - ((Interp *)interp)->compileEpoch++; - } - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_SetEnsembleParameterList -- - * - * Set the parameter list for a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an ensemble - * or the parameter list - if non-NULL - is not a list). - * - * Side effects: - * The ensemble is updated and marked for recompilation. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_SetEnsembleParameterList( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj *paramList) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - Tcl_Obj *oldList; - int length; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - return TCL_ERROR; - } - if (paramList == NULL) { - length = 0; - } else { - if (TclListObjLength(interp, paramList, &length) != TCL_OK) { - return TCL_ERROR; - } - if (length < 1) { - paramList = NULL; - } - } - - ensemblePtr = cmdPtr->objClientData; - oldList = ensemblePtr->parameterList; - ensemblePtr->parameterList = paramList; - if (paramList != NULL) { - Tcl_IncrRefCount(paramList); - } - if (oldList != NULL) { - TclDecrRefCount(oldList); - } - ensemblePtr->numParameters = length; - - /* - * Trigger an eventual recomputation of the ensemble command set. Note - * that this is slightly tricky, as it means that we are not actually - * counting the number of namespace export actions, but it is the simplest - * way to go! - */ - - ensemblePtr->nsPtr->exportLookupEpoch++; - - /* - * Special hack to make compiling of [info exists] work when the - * dictionary is modified. - */ - - if (cmdPtr->compileProc != NULL) { - ((Interp *)interp)->compileEpoch++; - } - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_SetEnsembleMappingDict -- - * - * Set the mapping dictionary for a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an ensemble - * or the mapping - if non-NULL - is not a dict). - * - * Side effects: - * The ensemble is updated and marked for recompilation. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_SetEnsembleMappingDict( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj *mapDict) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - Tcl_Obj *oldDict; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - return TCL_ERROR; - } - if (mapDict != NULL) { - int size, done; - Tcl_DictSearch search; - Tcl_Obj *valuePtr; - - if (Tcl_DictObjSize(interp, mapDict, &size) != TCL_OK) { - return TCL_ERROR; - } - - for (Tcl_DictObjFirst(NULL, mapDict, &search, NULL, &valuePtr, &done); - !done; Tcl_DictObjNext(&search, NULL, &valuePtr, &done)) { - Tcl_Obj *cmdPtr; - const char *bytes; - - if (Tcl_ListObjIndex(interp, valuePtr, 0, &cmdPtr) != TCL_OK) { - Tcl_DictObjDone(&search); - return TCL_ERROR; - } - bytes = TclGetString(cmdPtr); - if (bytes[0] != ':' || bytes[1] != ':') { - Tcl_AppendResult(interp, - "ensemble target is not a fully-qualified command", - NULL); - Tcl_DictObjDone(&search); - return TCL_ERROR; - } - } - - if (size < 1) { - mapDict = NULL; - } - } - - ensemblePtr = cmdPtr->objClientData; - oldDict = ensemblePtr->subcommandDict; - ensemblePtr->subcommandDict = mapDict; - if (mapDict != NULL) { - Tcl_IncrRefCount(mapDict); - } - if (oldDict != NULL) { - TclDecrRefCount(oldDict); - } - - /* - * Trigger an eventual recomputation of the ensemble command set. Note - * that this is slightly tricky, as it means that we are not actually - * counting the number of namespace export actions, but it is the simplest - * way to go! - */ - - ensemblePtr->nsPtr->exportLookupEpoch++; - - /* - * Special hack to make compiling of [info exists] work when the - * dictionary is modified. - */ - - if (cmdPtr->compileProc != NULL) { - ((Interp *)interp)->compileEpoch++; - } - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_SetEnsembleUnknownHandler -- - * - * Set the unknown handler for a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an ensemble - * or the unknown handler - if non-NULL - is not a list). - * - * Side effects: - * The ensemble is updated and marked for recompilation. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_SetEnsembleUnknownHandler( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj *unknownList) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - Tcl_Obj *oldList; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - return TCL_ERROR; - } - if (unknownList != NULL) { - int length; - - if (TclListObjLength(interp, unknownList, &length) != TCL_OK) { - return TCL_ERROR; - } - if (length < 1) { - unknownList = NULL; - } - } - - ensemblePtr = cmdPtr->objClientData; - oldList = ensemblePtr->unknownHandler; - ensemblePtr->unknownHandler = unknownList; - if (unknownList != NULL) { - Tcl_IncrRefCount(unknownList); - } - if (oldList != NULL) { - TclDecrRefCount(oldList); - } - - /* - * Trigger an eventual recomputation of the ensemble command set. Note - * that this is slightly tricky, as it means that we are not actually - * counting the number of namespace export actions, but it is the simplest - * way to go! - */ - - ensemblePtr->nsPtr->exportLookupEpoch++; - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_SetEnsembleFlags -- - * - * Set the flags for a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an - * ensemble). - * - * Side effects: - * The ensemble is updated and marked for recompilation. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_SetEnsembleFlags( - Tcl_Interp *interp, - Tcl_Command token, - int flags) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - int wasCompiled; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - return TCL_ERROR; - } - - ensemblePtr = cmdPtr->objClientData; - wasCompiled = ensemblePtr->flags & ENSEMBLE_COMPILE; - - /* - * This API refuses to set the ENS_DEAD flag... - */ - - ensemblePtr->flags &= ENS_DEAD; - ensemblePtr->flags |= flags & ~ENS_DEAD; - - /* - * Trigger an eventual recomputation of the ensemble command set. Note - * that this is slightly tricky, as it means that we are not actually - * counting the number of namespace export actions, but it is the simplest - * way to go! - */ - - ensemblePtr->nsPtr->exportLookupEpoch++; - - /* - * If the ENSEMBLE_COMPILE flag status was changed, install or remove the - * compiler function and bump the interpreter's compilation epoch so that - * bytecode gets regenerated. - */ - - if (flags & ENSEMBLE_COMPILE) { - if (!wasCompiled) { - ((Command*) ensemblePtr->token)->compileProc = TclCompileEnsemble; - ((Interp *) interp)->compileEpoch++; - } - } else { - if (wasCompiled) { - ((Command*) ensemblePtr->token)->compileProc = NULL; - ((Interp *) interp)->compileEpoch++; - } - } - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_GetEnsembleSubcommandList -- - * - * Get the list of subcommands associated with a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an - * ensemble). The list of subcommands is returned by updating the - * variable pointed to by the last parameter (NULL if this is to be - * derived from the mapping dictionary or the associated namespace's - * exported commands). - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -int -Tcl_GetEnsembleSubcommandList( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj **subcmdListPtr) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } - return TCL_ERROR; - } - - ensemblePtr = cmdPtr->objClientData; - *subcmdListPtr = ensemblePtr->subcmdList; - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_GetEnsembleParameterList -- - * - * Get the list of parameters associated with a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an - * ensemble). The list of parameters is returned by updating the - * variable pointed to by the last parameter (NULL if there are - * no parameters). - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -int -Tcl_GetEnsembleParameterList( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj **paramListPtr) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } - return TCL_ERROR; - } - - ensemblePtr = cmdPtr->objClientData; - *paramListPtr = ensemblePtr->parameterList; - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_GetEnsembleMappingDict -- - * - * Get the command mapping dictionary associated with a particular - * ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an - * ensemble). The mapping dict is returned by updating the variable - * pointed to by the last parameter (NULL if none is installed). - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -int -Tcl_GetEnsembleMappingDict( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj **mapDictPtr) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } - return TCL_ERROR; - } - - ensemblePtr = cmdPtr->objClientData; - *mapDictPtr = ensemblePtr->subcommandDict; - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_GetEnsembleUnknownHandler -- - * - * Get the unknown handler associated with a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an - * ensemble). The unknown handler is returned by updating the variable - * pointed to by the last parameter (NULL if no handler is installed). - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -int -Tcl_GetEnsembleUnknownHandler( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Obj **unknownListPtr) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } - return TCL_ERROR; - } - - ensemblePtr = cmdPtr->objClientData; - *unknownListPtr = ensemblePtr->unknownHandler; - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_GetEnsembleFlags -- - * - * Get the flags for a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an - * ensemble). The flags are returned by updating the variable pointed to - * by the last parameter. - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -int -Tcl_GetEnsembleFlags( - Tcl_Interp *interp, - Tcl_Command token, - int *flagsPtr) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } - return TCL_ERROR; - } - - ensemblePtr = cmdPtr->objClientData; - *flagsPtr = ensemblePtr->flags; - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_GetEnsembleNamespace -- - * - * Get the namespace associated with a particular ensemble. - * - * Results: - * Tcl result code (error if command token does not indicate an - * ensemble). Namespace is returned by updating the variable pointed to - * by the last parameter. - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -int -Tcl_GetEnsembleNamespace( - Tcl_Interp *interp, - Tcl_Command token, - Tcl_Namespace **namespacePtrPtr) -{ - Command *cmdPtr = (Command *) token; - EnsembleConfig *ensemblePtr; - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } - return TCL_ERROR; - } - - ensemblePtr = cmdPtr->objClientData; - *namespacePtrPtr = (Tcl_Namespace *) ensemblePtr->nsPtr; - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_FindEnsemble -- - * - * Given a command name, get the ensemble token for it, allowing for - * [namespace import]s. [Bug 1017022] - * - * Results: - * The token for the ensemble command with the given name, or NULL if the - * command either does not exist or is not an ensemble (when an error - * message will be written into the interp if thats non-NULL). - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -Tcl_Command -Tcl_FindEnsemble( - Tcl_Interp *interp, /* Where to do the lookup, and where to write - * the errors if TCL_LEAVE_ERR_MSG is set in - * the flags. */ - Tcl_Obj *cmdNameObj, /* Name of command to look up. */ - int flags) /* Either 0 or TCL_LEAVE_ERR_MSG; other flags - * are probably not useful. */ -{ - Command *cmdPtr; - - cmdPtr = (Command *) - Tcl_FindCommand(interp, TclGetString(cmdNameObj), NULL, flags); - if (cmdPtr == NULL) { - return NULL; - } - - if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - /* - * Reuse existing infrastructure for following import link chains - * rather than duplicating it. - */ - - cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr); - - if (cmdPtr == NULL || cmdPtr->objProc != NsEnsembleImplementationCmd){ - if (flags & TCL_LEAVE_ERR_MSG) { - Tcl_AppendResult(interp, "\"", TclGetString(cmdNameObj), - "\" is not an ensemble command", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENSEMBLE", - TclGetString(cmdNameObj), NULL); - } - return NULL; - } - } - - return (Tcl_Command) cmdPtr; -} - -/* - *---------------------------------------------------------------------- - * - * Tcl_IsEnsemble -- - * - * Simple test for ensemble-hood that takes into account imported - * ensemble commands as well. - * - * Results: - * Boolean value - * - * Side effects: - * None - * - *---------------------------------------------------------------------- - */ - -int -Tcl_IsEnsemble( - Tcl_Command token) -{ - Command *cmdPtr = (Command *) token; - if (cmdPtr->objProc == NsEnsembleImplementationCmd) { - return 1; - } - cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr); - if (cmdPtr == NULL || cmdPtr->objProc != NsEnsembleImplementationCmd) { - return 0; - } - return 1; -} - -/* - *---------------------------------------------------------------------- - * - * TclMakeEnsemble -- - * - * Create an ensemble from a table of implementation commands. The - * ensemble will be subject to (limited) compilation if any of the - * implementation commands are compilable. - * - * The 'name' parameter may be a single command name or a list if - * creating an ensemble subcommand (see the binary implementation). - * - * Currently, the TCL_ENSEMBLE_PREFIX ensemble flag is only used on - * top-level ensemble commands. - * - * Results: - * Handle for the new ensemble, or NULL on failure. - * - * Side effects: - * May advance the bytecode compilation epoch. - * - *---------------------------------------------------------------------- - */ - -Tcl_Command -TclMakeEnsemble( - Tcl_Interp *interp, - const char *name, /* The ensemble name (as explained above) */ - const EnsembleImplMap map[]) /* The subcommands to create */ -{ - Tcl_Command ensemble; - Tcl_Namespace *ns; - Tcl_DString buf; - const char **nameParts = NULL; - const char *cmdName = NULL; - int i, nameCount = 0, ensembleFlags = 0; - - /* - * Construct the path for the ensemble namespace and create it. - */ - - Tcl_DStringInit(&buf); - if (name[0] == ':' && name[1] == ':') { - /* - * An absolute name, so use it directly. - */ - - cmdName = name; - Tcl_DStringAppend(&buf, name, -1); - ensembleFlags = TCL_ENSEMBLE_PREFIX; - } else { - /* - * Not an absolute name, so do munging of it. Note that this treats a - * multi-word list differently to a single word. - */ - - Tcl_DStringAppend(&buf, "::tcl", -1); - - if (Tcl_SplitList(NULL, name, &nameCount, &nameParts) != TCL_OK) { - Tcl_Panic("invalid ensemble name '%s'", name); - } - - for (i = 0; i < nameCount; ++i) { - Tcl_DStringAppend(&buf, "::", 2); - Tcl_DStringAppend(&buf, nameParts[i], -1); - } - } - - ns = Tcl_FindNamespace(interp, Tcl_DStringValue(&buf), NULL, - TCL_CREATE_NS_IF_UNKNOWN); - if (!ns) { - Tcl_Panic("unable to find or create %s namespace!", - Tcl_DStringValue(&buf)); - } - - /* - * Create the named ensemble in the correct namespace - */ - - if (cmdName == NULL) { - if (nameCount == 1) { - ensembleFlags = TCL_ENSEMBLE_PREFIX; - cmdName = Tcl_DStringValue(&buf) + 5; - } else { - ns = ns->parentPtr; - cmdName = nameParts[nameCount - 1]; - } - } - ensemble = Tcl_CreateEnsemble(interp, cmdName, ns, ensembleFlags); - - /* - * Create the ensemble mapping dictionary and the ensemble command procs. - */ - - if (ensemble != NULL) { - Tcl_Obj *mapDict; - - Tcl_DStringAppend(&buf, "::", 2); - TclNewObj(mapDict); - for (i=0 ; map[i].name != NULL ; i++) { - Tcl_Obj *fromObj, *toObj; - Command *cmdPtr; - - fromObj = Tcl_NewStringObj(map[i].name, -1); - TclNewStringObj(toObj, Tcl_DStringValue(&buf), - Tcl_DStringLength(&buf)); - Tcl_AppendToObj(toObj, map[i].name, -1); - Tcl_DictObjPut(NULL, mapDict, fromObj, toObj); - if (map[i].proc || map[i].nreProc) { - cmdPtr = (Command *) - Tcl_NRCreateCommand(interp, TclGetString(toObj), - map[i].proc, map[i].nreProc, map[i].clientData, NULL); - cmdPtr->compileProc = map[i].compileProc; - if (map[i].compileProc != NULL) { - ensembleFlags |= ENSEMBLE_COMPILE; - } - } - } - Tcl_SetEnsembleMappingDict(interp, ensemble, mapDict); - if (ensembleFlags & ENSEMBLE_COMPILE) { - Tcl_SetEnsembleFlags(interp, ensemble, ensembleFlags); - } - } - - Tcl_DStringFree(&buf); - if (nameParts != NULL) { - Tcl_Free((char *) nameParts); - } - return ensemble; -} - -/* - *---------------------------------------------------------------------- - * - * NsEnsembleImplementationCmd -- - * - * Implements an ensemble of commands (being those exported by a - * namespace other than the global namespace) as a command with the same - * (short) name as the namespace in the parent namespace. - * - * Results: - * A standard Tcl result code. Will be TCL_ERROR if the command is not an - * unambiguous prefix of any command exported by the ensemble's - * namespace. - * - * Side effects: - * Depends on the command within the namespace that gets executed. If the - * ensemble itself returns TCL_ERROR, a descriptive error message will be - * placed in the interpreter's result. - * - *---------------------------------------------------------------------- - */ - -static int -NsEnsembleImplementationCmd( - ClientData clientData, - Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) -{ - return Tcl_NRCallObjProc(interp, NsEnsembleImplementationCmdNR, - clientData, objc, objv); -} - -static int -NsEnsembleImplementationCmdNR( - ClientData clientData, - Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) -{ - EnsembleConfig *ensemblePtr = clientData; - /* The ensemble itself. */ - Tcl_Obj *prefixObj; /* An object containing the prefix words of - * the command that implements the - * subcommand. */ - Tcl_HashEntry *hPtr; /* Used for efficient lookup of fully - * specified but not yet cached command - * names. */ - int reparseCount = 0; /* Number of reparses. */ - - /* - * Must recheck objc, since numParameters might have changed. Cf. test - * namespace-53.9. - */ - - restartEnsembleParse: - if (objc < 2 + ensemblePtr->numParameters) { - /* - * We don't have a subcommand argument. Make error message. - */ - - Tcl_DString buf; /* Message being built */ - Tcl_Obj **elemPtrs; /* Parameter names */ - int len; /* Number of parameters to append */ - - Tcl_DStringInit(&buf); - if (ensemblePtr->parameterList == NULL) { - len = 0; - } else if (TclListObjGetElements(NULL, ensemblePtr->parameterList, - &len, &elemPtrs) != TCL_OK) { - Tcl_Panic("List of ensemble parameters is not a list"); - } - for (; len>0; len--,elemPtrs++) { - Tcl_DStringAppend(&buf, Tcl_GetString(*elemPtrs), -1); - Tcl_DStringAppend(&buf, " ", -1); - } - Tcl_DStringAppend(&buf, "subcommand ?arg ...?", -1); - Tcl_WrongNumArgs(interp, 1, objv, Tcl_DStringValue(&buf)); - Tcl_DStringFree(&buf); - - return TCL_ERROR; - } - - if (ensemblePtr->nsPtr->flags & NS_DYING) { - /* - * Don't know how we got here, but make things give up quickly. - */ - - if (!Tcl_InterpDeleted(interp)) { - Tcl_AppendResult(interp, - "ensemble activated for deleted namespace", NULL); - } - return TCL_ERROR; - } - - /* - * Determine if the table of subcommands is right. If so, we can just look - * up in there and go straight to dispatch. - */ - - if (ensemblePtr->epoch == ensemblePtr->nsPtr->exportLookupEpoch) { - /* - * Table of subcommands is still valid; therefore there might be a - * valid cache of discovered information which we can reuse. Do the - * check here, and if we're still valid, we can jump straight to the - * part where we do the invocation of the subcommand. - */ - - if (objv[1+ensemblePtr->numParameters]->typePtr==&tclEnsembleCmdType){ - EnsembleCmdRep *ensembleCmd = objv[1+ensemblePtr->numParameters] - ->internalRep.otherValuePtr; - - if (ensembleCmd->nsPtr == ensemblePtr->nsPtr && - ensembleCmd->epoch == ensemblePtr->epoch && - ensembleCmd->token == ensemblePtr->token) { - prefixObj = ensembleCmd->realPrefixObj; - Tcl_IncrRefCount(prefixObj); - goto runResultingSubcommand; - } - } - } else { - BuildEnsembleConfig(ensemblePtr); - ensemblePtr->epoch = ensemblePtr->nsPtr->exportLookupEpoch; - } - - /* - * Look in the hashtable for the subcommand name; this is the fastest way - * of all if there is no cache in operation. - */ - - hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, - TclGetString(objv[1 + ensemblePtr->numParameters])); - if (hPtr != NULL) { - char *fullName = Tcl_GetHashKey(&ensemblePtr->subcommandTable, hPtr); - - prefixObj = Tcl_GetHashValue(hPtr); - - /* - * Cache for later in the subcommand object. - */ - - MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], - ensemblePtr, fullName, prefixObj); - } else if (!(ensemblePtr->flags & TCL_ENSEMBLE_PREFIX)) { - /* - * Could not map, no prefixing, go to unknown/error handling. - */ - - goto unknownOrAmbiguousSubcommand; - } else { - /* - * If we've not already confirmed the command with the hash as part of - * building our export table, we need to scan the sorted array for - * matches. - */ - - const char *subcmdName; /* Name of the subcommand, or unique prefix of - * it (will be an error for a non-unique - * prefix). */ - char *fullName = NULL; /* Full name of the subcommand. */ - int stringLength, i; - int tableLength = ensemblePtr->subcommandTable.numEntries; - - subcmdName = TclGetString(objv[1 + ensemblePtr->numParameters]); - stringLength = objv[1 + ensemblePtr->numParameters]->length; - for (i=0 ; isubcommandArrayPtr[i], - (unsigned) stringLength); - - if (cmp == 0) { - if (fullName != NULL) { - /* - * Since there's never the exact-match case to worry about - * (hash search filters this), getting here indicates that - * our subcommand is an ambiguous prefix of (at least) two - * exported subcommands, which is an error case. - */ - - goto unknownOrAmbiguousSubcommand; - } - fullName = ensemblePtr->subcommandArrayPtr[i]; - } else if (cmp < 0) { - /* - * Because we are searching a sorted table, we can now stop - * searching because we have gone past anything that could - * possibly match. - */ - - break; - } - } - if (fullName == NULL) { - /* - * The subcommand is not a prefix of anything, so bail out! - */ - - goto unknownOrAmbiguousSubcommand; - } - hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, fullName); - if (hPtr == NULL) { - Tcl_Panic("full name %s not found in supposedly synchronized hash", - fullName); - } - prefixObj = Tcl_GetHashValue(hPtr); - - /* - * Cache for later in the subcommand object. - */ - - MakeCachedEnsembleCommand(objv[1 + ensemblePtr->numParameters], - ensemblePtr, fullName, prefixObj); - } - - Tcl_IncrRefCount(prefixObj); - runResultingSubcommand: - - /* - * Do the real work of execution of the subcommand by building an array of - * objects (note that this is potentially not the same length as the - * number of arguments to this ensemble command), populating it and then - * feeding it back through the main command-lookup engine. In theory, we - * could look up the command in the namespace ourselves, as we already - * have the namespace in which it is guaranteed to exist, - * - * ((Q: That's not true if the -map option is used, is it?)) - * - * but we don't do that (the cacheing of the command object used should - * help with that.) - */ - - { - Tcl_Obj **prefixObjv; /* The list of objects to substitute in as the - * target command prefix. */ - Tcl_Obj *copyPtr; /* The actual list of words to dispatch to. - * Will be freed by the dispatch engine. */ - int prefixObjc, copyObjc; - Interp *iPtr = (Interp *) interp; - - /* - * Get the prefix that we're rewriting to. To do this we need to - * ensure that the internal representation of the list does not change - * so that we can safely keep the internal representations of the - * elements in the list. - * - * TODO: Use conventional list operations to make this code sane! - */ - - TclListObjGetElements(NULL, prefixObj, &prefixObjc, &prefixObjv); - - copyObjc = objc - 2 + prefixObjc; - copyPtr = Tcl_NewListObj(copyObjc, NULL); - if (copyObjc > 0) { - register Tcl_Obj **copyObjv; - /* Space used to construct the list of - * arguments to pass to the command that - * implements the ensemble subcommand. */ - register List *listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; - register int i; - - listRepPtr->elemCount = copyObjc; - copyObjv = &listRepPtr->elements; - memcpy(copyObjv, prefixObjv, sizeof(Tcl_Obj *) * prefixObjc); - memcpy(copyObjv+prefixObjc, objv+1, - sizeof(Tcl_Obj *) * ensemblePtr->numParameters); - memcpy(copyObjv+prefixObjc+ensemblePtr->numParameters, - objv+ensemblePtr->numParameters+2, - sizeof(Tcl_Obj *) * (objc-ensemblePtr->numParameters-2)); - - for (i=0; i < copyObjc; i++) { - Tcl_IncrRefCount(copyObjv[i]); - } - } - TclDecrRefCount(prefixObj); - - /* - * Record what arguments the script sent in so that things like - * Tcl_WrongNumArgs can give the correct error message. Parameters - * count both as inserted and removed arguments. - */ - -#if 0 - if (TclInitRewriteEnsemble(interp, 2 + ensemblePtr->numParameters, prefixObjc + ensemblePtr->numParameters, objv)) { - TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, NULL); - } -#else - if (iPtr->ensembleRewrite.sourceObjs == NULL) { - iPtr->ensembleRewrite.sourceObjs = objv; - iPtr->ensembleRewrite.numRemovedObjs = - 2 + ensemblePtr->numParameters; - iPtr->ensembleRewrite.numInsertedObjs = - prefixObjc + ensemblePtr->numParameters; - TclNRAddCallback(interp, TclClearRootEnsemble, NULL, NULL, NULL, - NULL); - } else { - register int ni = 2 + ensemblePtr->numParameters - - iPtr->ensembleRewrite.numInsertedObjs; - /* Position in objv of new front of insertion - * relative to old one. */ - if (ni > 0) { - iPtr->ensembleRewrite.numRemovedObjs += ni; - iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-1; - } else { - iPtr->ensembleRewrite.numInsertedObjs += prefixObjc-2; - } - } -#endif - - /* - * Hand off to the target command. - */ - - iPtr->evalFlags |= TCL_EVAL_REDIRECT; - return Tcl_NREvalObj(interp, copyPtr, TCL_EVAL_INVOKE); - } - - unknownOrAmbiguousSubcommand: - /* - * Have not been able to match the subcommand asked for with a real - * subcommand that we export. See whether a handler has been registered - * for dealing with this situation. Will only call (at most) once for any - * particular ensemble invocation. - */ - - if (ensemblePtr->unknownHandler != NULL && reparseCount++ < 1) { - switch (EnsembleUnknownCallback(interp, ensemblePtr, objc, objv, - &prefixObj)) { - case TCL_OK: - goto runResultingSubcommand; - case TCL_ERROR: - return TCL_ERROR; - case TCL_CONTINUE: - goto restartEnsembleParse; - } - } - - /* - * We cannot determine what subcommand to hand off to, so generate a - * (standard) failure message. Note the one odd case compared with - * standard ensemble-like command, which is where a namespace has no - * exported commands at all... - */ - - Tcl_ResetResult(interp); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENSEMBLE", - TclGetString(objv[1+ensemblePtr->numParameters]), NULL); - if (ensemblePtr->subcommandTable.numEntries == 0) { - Tcl_AppendResult(interp, "unknown subcommand \"", - TclGetString(objv[1+ensemblePtr->numParameters]), - "\": namespace ", ensemblePtr->nsPtr->fullName, - " does not export any commands", NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", - TclGetString(objv[1+ensemblePtr->numParameters]), NULL); - return TCL_ERROR; - } - Tcl_AppendResult(interp, "unknown ", - (ensemblePtr->flags & TCL_ENSEMBLE_PREFIX ? "or ambiguous " : ""), - "subcommand \"", TclGetString(objv[1+ensemblePtr->numParameters]), - "\": must be ", NULL); - if (ensemblePtr->subcommandTable.numEntries == 1) { - Tcl_AppendResult(interp, ensemblePtr->subcommandArrayPtr[0], NULL); - } else { - int i; - - for (i=0 ; isubcommandTable.numEntries-1 ; i++) { - Tcl_AppendResult(interp, - ensemblePtr->subcommandArrayPtr[i], ", ", NULL); - } - Tcl_AppendResult(interp, "or ", - ensemblePtr->subcommandArrayPtr[i], NULL); - } - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "SUBCOMMAND", - TclGetString(objv[1+ensemblePtr->numParameters]), NULL); - return TCL_ERROR; -} - -int -TclClearRootEnsemble( - ClientData data[], - Tcl_Interp *interp, - int result) -{ - TclResetRewriteEnsemble(interp, 1); - return result; -} - -/* - *---------------------------------------------------------------------- - * - * TclInitRewriteEnsemble -- - * - * Applies a rewrite of arguments so that an ensemble subcommand will - * report error messages correctly for the overall command. - * - * Results: - * Whether this is the first rewrite applied, a value which must be - * passed to TclResetRewriteEnsemble when undoing this command's - * behaviour. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -int -TclInitRewriteEnsemble( - Tcl_Interp *interp, - int numRemoved, - int numInserted, - Tcl_Obj *const *objv) -{ - Interp *iPtr = (Interp *) interp; - - int isRootEnsemble = (iPtr->ensembleRewrite.sourceObjs == NULL); - - if (isRootEnsemble) { - iPtr->ensembleRewrite.sourceObjs = objv; - iPtr->ensembleRewrite.numRemovedObjs = numRemoved; - iPtr->ensembleRewrite.numInsertedObjs = numInserted; - } else { - int numIns = iPtr->ensembleRewrite.numInsertedObjs; - - if (numIns < numRemoved) { - iPtr->ensembleRewrite.numRemovedObjs += numRemoved - numIns; - iPtr->ensembleRewrite.numInsertedObjs += numInserted - 1; - } else { - iPtr->ensembleRewrite.numInsertedObjs += numInserted - numRemoved; - } - } - return isRootEnsemble; -} - -/* - *---------------------------------------------------------------------- - * - * TclResetRewriteEnsemble -- - * - * Removes any rewrites applied to support proper reporting of error - * messages used in ensembles. Should be paired with - * TclInitRewriteEnsemble. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TclResetRewriteEnsemble( - Tcl_Interp *interp, - int isRootEnsemble) -{ - Interp *iPtr = (Interp *) interp; - - if (isRootEnsemble) { - iPtr->ensembleRewrite.sourceObjs = NULL; - iPtr->ensembleRewrite.numRemovedObjs = 0; - iPtr->ensembleRewrite.numInsertedObjs = 0; - } -} - -/* - * ---------------------------------------------------------------------- - * - * EnsmebleUnknownCallback -- - * - * Helper for the ensemble engine that handles the procesing of unknown - * callbacks. See the user documentation of the ensemble unknown handler - * for details; this function is only ever called when such a function is - * defined, and is only ever called once per ensemble dispatch (i.e. if a - * reparse still fails, this isn't called again). - * - * Results: - * TCL_OK - *prefixObjPtr contains the command words to dispatch - * to. - * TCL_CONTINUE - Need to reparse (*prefixObjPtr is invalid). - * TCL_ERROR - Something went wrong! Error message in interpreter. - * - * Side effects: - * Calls the Tcl interpreter, so arbitrary. - * - * ---------------------------------------------------------------------- - */ - -static inline int -EnsembleUnknownCallback( - Tcl_Interp *interp, - EnsembleConfig *ensemblePtr, - int objc, - Tcl_Obj *const objv[], - Tcl_Obj **prefixObjPtr) -{ - int paramc, i, result, prefixObjc; - Tcl_Obj **paramv, *unknownCmd, *ensObj; - char buf[TCL_INTEGER_SPACE]; - - /* - * Create the unknown command callback to determine what to do. - */ - - unknownCmd = Tcl_DuplicateObj(ensemblePtr->unknownHandler); - TclNewObj(ensObj); - Tcl_GetCommandFullName(interp, ensemblePtr->token, ensObj); - Tcl_ListObjAppendElement(NULL, unknownCmd, ensObj); - for (i=1 ; ievalFlags |= TCL_EVAL_REDIRECT; - result = Tcl_EvalObjv(interp, paramc, paramv, 0); - if ((result == TCL_OK) && (ensemblePtr->flags & ENS_DEAD)) { - Tcl_SetResult(interp, - "unknown subcommand handler deleted its ensemble", - TCL_STATIC); - result = TCL_ERROR; - } - Tcl_Release(ensemblePtr); - - /* - * If we succeeded, we should either have a list of words that form the - * command to be executed, or an empty list. In the empty-list case, the - * ensemble is believed to be updated so we should ask the ensemble engine - * to reparse the original command. - */ - - if (result == TCL_OK) { - *prefixObjPtr = Tcl_GetObjResult(interp); - Tcl_IncrRefCount(*prefixObjPtr); - TclDecrRefCount(unknownCmd); - Tcl_ResetResult(interp); - - /* - * Namespace is still there. Check if the result is a valid list. If - * it is, and it is non-empty, that list is what we are using as our - * replacement. - */ - - if (TclListObjLength(interp, *prefixObjPtr, &prefixObjc) != TCL_OK) { - TclDecrRefCount(*prefixObjPtr); - Tcl_AddErrorInfo(interp, "\n while parsing result of " - "ensemble unknown subcommand handler"); - return TCL_ERROR; - } - if (prefixObjc > 0) { - return TCL_OK; - } - - /* - * Namespace alive & empty result => reparse. - */ - - TclDecrRefCount(*prefixObjPtr); - return TCL_CONTINUE; - } - - /* - * Oh no! An exceptional result. Convert to an error. - */ - - if (!Tcl_InterpDeleted(interp)) { - if (result != TCL_ERROR) { - Tcl_ResetResult(interp); - Tcl_SetResult(interp, - "unknown subcommand handler returned bad code: ", - TCL_STATIC); - switch (result) { - case TCL_RETURN: - Tcl_AppendResult(interp, "return", NULL); - break; - case TCL_BREAK: - Tcl_AppendResult(interp, "break", NULL); - break; - case TCL_CONTINUE: - Tcl_AppendResult(interp, "continue", NULL); - break; - default: - sprintf(buf, "%d", result); - Tcl_AppendResult(interp, buf, NULL); - } - Tcl_AddErrorInfo(interp, "\n result of " - "ensemble unknown subcommand handler: "); - Tcl_AddErrorInfo(interp, TclGetString(unknownCmd)); - } else { - Tcl_AddErrorInfo(interp, - "\n (ensemble unknown subcommand handler)"); - } - } - TclDecrRefCount(unknownCmd); - return TCL_ERROR; -} - -/* - *---------------------------------------------------------------------- - * - * MakeCachedEnsembleCommand -- - * - * Cache what we've computed so far; it's not nice to repeatedly copy - * strings about. Note that to do this, we start by deleting any old - * representation that there was (though if it was an out of date - * ensemble rep, we can skip some of the deallocation process.) - * - * Results: - * None - * - * Side effects: - * Alters the internal representation of the first object parameter. - * - *---------------------------------------------------------------------- - */ - -static void -MakeCachedEnsembleCommand( - Tcl_Obj *objPtr, - EnsembleConfig *ensemblePtr, - const char *subcommandName, - Tcl_Obj *prefixObjPtr) -{ - register EnsembleCmdRep *ensembleCmd; - int length; - - if (objPtr->typePtr == &tclEnsembleCmdType) { - ensembleCmd = objPtr->internalRep.otherValuePtr; - Tcl_DecrRefCount(ensembleCmd->realPrefixObj); - ensembleCmd->nsPtr->refCount--; - if ((ensembleCmd->nsPtr->refCount == 0) - && (ensembleCmd->nsPtr->flags & NS_DEAD)) { - NamespaceFree(ensembleCmd->nsPtr); - } - ckfree(ensembleCmd->fullSubcmdName); - } else { - /* - * Kill the old internal rep, and replace it with a brand new one of - * our own. - */ - - TclFreeIntRep(objPtr); - ensembleCmd = (EnsembleCmdRep *) ckalloc(sizeof(EnsembleCmdRep)); - objPtr->internalRep.otherValuePtr = ensembleCmd; - objPtr->typePtr = &tclEnsembleCmdType; - } - - /* - * Populate the internal rep. - */ - - ensembleCmd->nsPtr = ensemblePtr->nsPtr; - ensembleCmd->epoch = ensemblePtr->epoch; - ensembleCmd->token = ensemblePtr->token; - ensemblePtr->nsPtr->refCount++; - ensembleCmd->realPrefixObj = prefixObjPtr; - length = strlen(subcommandName)+1; - ensembleCmd->fullSubcmdName = ckalloc((unsigned) length); - memcpy(ensembleCmd->fullSubcmdName, subcommandName, (unsigned) length); - Tcl_IncrRefCount(ensembleCmd->realPrefixObj); -} - -/* - *---------------------------------------------------------------------- - * - * DeleteEnsembleConfig -- - * - * Destroys the data structure used to represent an ensemble. This is - * called when the ensemble's command is deleted (which happens - * automatically if the ensemble's namespace is deleted.) Maintainers - * should note that ensembles should be deleted by deleting their - * commands. - * - * Results: - * None. - * - * Side effects: - * Memory is (eventually) deallocated. - * - *---------------------------------------------------------------------- - */ - -static void -DeleteEnsembleConfig( - ClientData clientData) -{ - EnsembleConfig *ensemblePtr = clientData; - Namespace *nsPtr = ensemblePtr->nsPtr; - Tcl_HashSearch search; - Tcl_HashEntry *hEnt; - - /* - * Unlink from the ensemble chain if it has not been marked as having been - * done already. - */ - - if (ensemblePtr->next != ensemblePtr) { - EnsembleConfig *ensPtr = (EnsembleConfig *) nsPtr->ensembles; - if (ensPtr == ensemblePtr) { - nsPtr->ensembles = (Tcl_Ensemble *) ensemblePtr->next; - } else { - while (ensPtr != NULL) { - if (ensPtr->next == ensemblePtr) { - ensPtr->next = ensemblePtr->next; - break; - } - ensPtr = ensPtr->next; - } - } - } - - /* - * Mark the namespace as dead so code that uses Tcl_Preserve() can tell - * whether disaster happened anyway. - */ - - ensemblePtr->flags |= ENS_DEAD; - - /* - * Kill the pointer-containing fields. - */ - - if (ensemblePtr->subcommandTable.numEntries != 0) { - ckfree((char *) ensemblePtr->subcommandArrayPtr); - } - hEnt = Tcl_FirstHashEntry(&ensemblePtr->subcommandTable, &search); - while (hEnt != NULL) { - Tcl_Obj *prefixObj = Tcl_GetHashValue(hEnt); - - Tcl_DecrRefCount(prefixObj); - hEnt = Tcl_NextHashEntry(&search); - } - Tcl_DeleteHashTable(&ensemblePtr->subcommandTable); - if (ensemblePtr->subcmdList != NULL) { - Tcl_DecrRefCount(ensemblePtr->subcmdList); - } - if (ensemblePtr->parameterList != NULL) { - Tcl_DecrRefCount(ensemblePtr->parameterList); - } - if (ensemblePtr->subcommandDict != NULL) { - Tcl_DecrRefCount(ensemblePtr->subcommandDict); - } - if (ensemblePtr->unknownHandler != NULL) { - Tcl_DecrRefCount(ensemblePtr->unknownHandler); - } - - /* - * Arrange for the structure to be reclaimed. Note that this is complex - * because we have to make sure that we can react sensibly when an - * ensemble is deleted during the process of initialising the ensemble - * (especially the unknown callback.) - */ - - Tcl_EventuallyFree(ensemblePtr, TCL_DYNAMIC); -} - -/* - *---------------------------------------------------------------------- - * - * BuildEnsembleConfig -- - * - * Create the internal data structures that describe how an ensemble - * looks, being a hash mapping from the full command name to the Tcl list - * that describes the implementation prefix words, and a sorted array of - * all the full command names to allow for reasonably efficient - * unambiguous prefix handling. - * - * Results: - * None. - * - * Side effects: - * Reallocates and rebuilds the hash table and array stored at the - * ensemblePtr argument. For large ensembles or large namespaces, this is - * a potentially expensive operation. - * - *---------------------------------------------------------------------- - */ - -static void -BuildEnsembleConfig( - EnsembleConfig *ensemblePtr) -{ - Tcl_HashSearch search; /* Used for scanning the set of commands in - * the namespace that backs up this - * ensemble. */ - int i, j, isNew; - Tcl_HashTable *hash = &ensemblePtr->subcommandTable; - Tcl_HashEntry *hPtr; - - if (hash->numEntries != 0) { - /* - * Remove pre-existing table. - */ - - Tcl_HashSearch search; - - ckfree((char *) ensemblePtr->subcommandArrayPtr); - hPtr = Tcl_FirstHashEntry(hash, &search); - while (hPtr != NULL) { - Tcl_Obj *prefixObj = Tcl_GetHashValue(hPtr); - Tcl_DecrRefCount(prefixObj); - hPtr = Tcl_NextHashEntry(&search); - } - Tcl_DeleteHashTable(hash); - Tcl_InitHashTable(hash, TCL_STRING_KEYS); - } - - /* - * See if we've got an export list. If so, we will only export exactly - * those commands, which may be either implemented by the prefix in the - * subcommandDict or mapped directly onto the namespace's commands. - */ - - if (ensemblePtr->subcmdList != NULL) { - Tcl_Obj **subcmdv, *target, *cmdObj, *cmdPrefixObj; - int subcmdc; - - TclListObjGetElements(NULL, ensemblePtr->subcmdList, &subcmdc, - &subcmdv); - for (i=0 ; isubcommandDict != NULL) { - Tcl_DictObjGet(NULL, ensemblePtr->subcommandDict, subcmdv[i], - &target); - if (target != NULL) { - Tcl_SetHashValue(hPtr, target); - Tcl_IncrRefCount(target); - continue; - } - } - - /* - * Not there, so map onto the namespace. Note in this case that we - * do not guarantee that the command is actually there; that is - * the programmer's responsibility (or [::unknown] of course). - */ - - cmdObj = Tcl_NewStringObj(ensemblePtr->nsPtr->fullName, -1); - if (ensemblePtr->nsPtr->parentPtr != NULL) { - Tcl_AppendStringsToObj(cmdObj, "::", name, NULL); - } else { - Tcl_AppendStringsToObj(cmdObj, name, NULL); - } - cmdPrefixObj = Tcl_NewListObj(1, &cmdObj); - Tcl_SetHashValue(hPtr, cmdPrefixObj); - Tcl_IncrRefCount(cmdPrefixObj); - } - } else if (ensemblePtr->subcommandDict != NULL) { - /* - * No subcmd list, but we do have a mapping dictionary so we should - * use the keys of that. Convert the dictionary's contents into the - * form required for the ensemble's internal hashtable. - */ - - Tcl_DictSearch dictSearch; - Tcl_Obj *keyObj, *valueObj; - int done; - - Tcl_DictObjFirst(NULL, ensemblePtr->subcommandDict, &dictSearch, - &keyObj, &valueObj, &done); - while (!done) { - const char *name = TclGetString(keyObj); - - hPtr = Tcl_CreateHashEntry(hash, name, &isNew); - Tcl_SetHashValue(hPtr, valueObj); - Tcl_IncrRefCount(valueObj); - Tcl_DictObjNext(&dictSearch, &keyObj, &valueObj, &done); - } - } else { - /* - * Discover what commands are actually exported by the namespace. - * What we have is an array of patterns and a hash table whose keys - * are the command names exported by the namespace (the contents do - * not matter here.) We must find out what commands are actually - * exported by filtering each command in the namespace against each of - * the patterns in the export list. Note that we use an intermediate - * hash table to make memory management easier, and because that makes - * exact matching far easier too. - * - * Suggestion for future enhancement: compute the unique prefixes and - * place them in the hash too, which should make for even faster - * matching. - */ - - hPtr = Tcl_FirstHashEntry(&ensemblePtr->nsPtr->cmdTable, &search); - for (; hPtr!= NULL ; hPtr=Tcl_NextHashEntry(&search)) { - char *nsCmdName = /* Name of command in namespace. */ - Tcl_GetHashKey(&ensemblePtr->nsPtr->cmdTable, hPtr); - - for (i=0 ; insPtr->numExportPatterns ; i++) { - if (Tcl_StringMatch(nsCmdName, - ensemblePtr->nsPtr->exportArrayPtr[i])) { - hPtr = Tcl_CreateHashEntry(hash, nsCmdName, &isNew); - - /* - * Remember, hash entries have a full reference to the - * substituted part of the command (as a list) as their - * content! - */ - - if (isNew) { - Tcl_Obj *cmdObj, *cmdPrefixObj; - - TclNewObj(cmdObj); - Tcl_AppendStringsToObj(cmdObj, - ensemblePtr->nsPtr->fullName, - (ensemblePtr->nsPtr->parentPtr ? "::" : ""), - nsCmdName, NULL); - cmdPrefixObj = Tcl_NewListObj(1, &cmdObj); - Tcl_SetHashValue(hPtr, cmdPrefixObj); - Tcl_IncrRefCount(cmdPrefixObj); - } - break; - } - } - } - } - - if (hash->numEntries == 0) { - ensemblePtr->subcommandArrayPtr = NULL; - return; - } - - /* - * Create a sorted array of all subcommands in the ensemble; hash tables - * are all very well for a quick look for an exact match, but they can't - * determine things like whether a string is a prefix of another (not - * without lots of preparation anyway) and they're no good for when we're - * generating the error message either. - * - * We do this by filling an array with the names (we use the hash keys - * directly to save a copy, since any time we change the array we change - * the hash too, and vice versa) and running quicksort over the array. - */ - - ensemblePtr->subcommandArrayPtr = (char **) - ckalloc(sizeof(char *) * hash->numEntries); - - /* - * Fill array from both ends as this makes us less likely to end up with - * performance problems in qsort(), which is good. Note that doing this - * makes this code much more opaque, but the naive alternatve: - * - * for (hPtr=Tcl_FirstHashEntry(hash,&search),i=0 ; - * hPtr!=NULL ; hPtr=Tcl_NextHashEntry(&search),i++) { - * ensemblePtr->subcommandArrayPtr[i] = Tcl_GetHashKey(hash, &hPtr); - * } - * - * can produce long runs of precisely ordered table entries when the - * commands in the namespace are declared in a sorted fashion (an ordering - * some people like) and the hashing functions (or the command names - * themselves) are fairly unfortunate. By filling from both ends, it - * requires active malice (and probably a debugger) to get qsort() to have - * awful runtime behaviour. - */ - - i = 0; - j = hash->numEntries; - hPtr = Tcl_FirstHashEntry(hash, &search); - while (hPtr != NULL) { - ensemblePtr->subcommandArrayPtr[i++] = Tcl_GetHashKey(hash, hPtr); - hPtr = Tcl_NextHashEntry(&search); - if (hPtr == NULL) { - break; - } - ensemblePtr->subcommandArrayPtr[--j] = Tcl_GetHashKey(hash, hPtr); - hPtr = Tcl_NextHashEntry(&search); - } - if (hash->numEntries > 1) { - qsort(ensemblePtr->subcommandArrayPtr, (unsigned)hash->numEntries, - sizeof(char *), NsEnsembleStringOrder); - } -} - -/* - *---------------------------------------------------------------------- - * - * NsEnsembleStringOrder -- - * - * Helper function to compare two pointers to two strings for use with - * qsort(). - * - * Results: - * -1 if the first string is smaller, 1 if the second string is smaller, - * and 0 if they are equal. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -NsEnsembleStringOrder( - const void *strPtr1, - const void *strPtr2) -{ - return strcmp(*(const char **)strPtr1, *(const char **)strPtr2); -} - -/* - *---------------------------------------------------------------------- - * - * FreeEnsembleCmdRep -- - * - * Destroys the internal representation of a Tcl_Obj that has been - * holding information about a command in an ensemble. - * - * Results: - * None. - * - * Side effects: - * Memory is deallocated. If this held the last reference to a - * namespace's main structure, that main structure will also be - * destroyed. - * - *---------------------------------------------------------------------- - */ - -static void -FreeEnsembleCmdRep( - Tcl_Obj *objPtr) -{ - EnsembleCmdRep *ensembleCmd = objPtr->internalRep.otherValuePtr; - - Tcl_DecrRefCount(ensembleCmd->realPrefixObj); - ckfree(ensembleCmd->fullSubcmdName); - ensembleCmd->nsPtr->refCount--; - if ((ensembleCmd->nsPtr->refCount == 0) - && (ensembleCmd->nsPtr->flags & NS_DEAD)) { - NamespaceFree(ensembleCmd->nsPtr); - } - ckfree((char *) ensembleCmd); - objPtr->typePtr = NULL; -} - -/* - *---------------------------------------------------------------------- - * - * DupEnsembleCmdRep -- - * - * Makes one Tcl_Obj into a copy of another that is a subcommand of an - * ensemble. - * - * Results: - * None. - * - * Side effects: - * Memory is allocated, and the namespace that the ensemble is built on - * top of gains another reference. - * - *---------------------------------------------------------------------- - */ - -static void -DupEnsembleCmdRep( - Tcl_Obj *objPtr, - Tcl_Obj *copyPtr) -{ - EnsembleCmdRep *ensembleCmd = objPtr->internalRep.otherValuePtr; - EnsembleCmdRep *ensembleCopy = (EnsembleCmdRep *) - ckalloc(sizeof(EnsembleCmdRep)); - int length = strlen(ensembleCmd->fullSubcmdName); - - copyPtr->typePtr = &tclEnsembleCmdType; - copyPtr->internalRep.otherValuePtr = ensembleCopy; - ensembleCopy->nsPtr = ensembleCmd->nsPtr; - ensembleCopy->epoch = ensembleCmd->epoch; - ensembleCopy->token = ensembleCmd->token; - ensembleCopy->nsPtr->refCount++; - ensembleCopy->realPrefixObj = ensembleCmd->realPrefixObj; - Tcl_IncrRefCount(ensembleCopy->realPrefixObj); - ensembleCopy->fullSubcmdName = ckalloc((unsigned) length+1); - memcpy(ensembleCopy->fullSubcmdName, ensembleCmd->fullSubcmdName, - (unsigned) length+1); -} - -/* - *---------------------------------------------------------------------- - * - * StringOfEnsembleCmdRep -- - * - * Creates a string representation of a Tcl_Obj that holds a subcommand - * of an ensemble. - * - * Results: - * None. - * - * Side effects: - * The object gains a string (UTF-8) representation. - * - *---------------------------------------------------------------------- - */ - -static void -StringOfEnsembleCmdRep( - Tcl_Obj *objPtr) -{ - EnsembleCmdRep *ensembleCmd = objPtr->internalRep.otherValuePtr; - int length = strlen(ensembleCmd->fullSubcmdName); - - objPtr->length = length; - objPtr->bytes = ckalloc((unsigned) length+1); - memcpy(objPtr->bytes, ensembleCmd->fullSubcmdName, (unsigned) length+1); -} - -/* - *---------------------------------------------------------------------- - * * Tcl_LogCommandInfo -- * * This function is invoked after an error occurs in an interpreter. It diff --git a/unix/Makefile.in b/unix/Makefile.in index 81fb07b..e1c7314 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.288 2009/12/28 14:15:20 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.289 2010/02/13 18:11:06 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -296,6 +296,7 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o \ tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompExpr.o \ tclCompile.o tclConfig.o tclDate.o tclDictObj.o tclEncoding.o \ + tclEnsemble.o \ tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o \ tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o \ tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o \ @@ -398,6 +399,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclDate.c \ $(GENERIC_DIR)/tclDictObj.c \ $(GENERIC_DIR)/tclEncoding.c \ + $(GENERIC_DIR)/tclEnsemble.c \ $(GENERIC_DIR)/tclEnv.c \ $(GENERIC_DIR)/tclEvent.c \ $(GENERIC_DIR)/tclExecute.c \ @@ -1048,6 +1050,9 @@ tclDictObj.o: $(GENERIC_DIR)/tclDictObj.c $(MATHHDRS) tclEncoding.o: $(GENERIC_DIR)/tclEncoding.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclEncoding.c +tclEnsemble.o: $(GENERIC_DIR)/tclEnsemble.c $(COMPILEHDR) + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclEnsemble.c + tclEnv.o: $(GENERIC_DIR)/tclEnv.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclEnv.c @@ -1141,7 +1146,7 @@ tclLoadShl.o: $(UNIX_DIR)/tclLoadShl.c tclMain.o: $(GENERIC_DIR)/tclMain.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclMain.c -tclNamesp.o: $(GENERIC_DIR)/tclNamesp.c +tclNamesp.o: $(GENERIC_DIR)/tclNamesp.c $(COMPILEHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclNamesp.c tclNotify.o: $(GENERIC_DIR)/tclNotify.c diff --git a/win/Makefile.in b/win/Makefile.in index 48b2e86..d7e1041 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.170 2009/12/17 16:28:21 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.171 2010/02/13 18:11:06 dkf Exp $ VERSION = @TCL_VERSION@ @@ -231,6 +231,7 @@ GENERIC_OBJS = \ tclDate.$(OBJEXT) \ tclDictObj.$(OBJEXT) \ tclEncoding.$(OBJEXT) \ + tclEnsemble.$(OBJEXT) \ tclEnv.$(OBJEXT) \ tclEvent.$(OBJEXT) \ tclExecute.$(OBJEXT) \ diff --git a/win/makefile.bc b/win/makefile.bc index 7666309..c66acfd 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -208,6 +208,7 @@ TCLOBJS = \ $(TMPDIR)\tclDate.obj \ $(TMPDIR)\tclDictObj.obj \ $(TMPDIR)\tclEncoding.obj \ + $(TMPDIR)\tclEnsemble.obj \ $(TMPDIR)\tclEnv.obj \ $(TMPDIR)\tclEvent.obj \ $(TMPDIR)\tclExecute.obj \ diff --git a/win/makefile.vc b/win/makefile.vc index 08ac169..99718f2 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.205 2009/12/11 22:52:09 nijtmans Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.206 2010/02/13 18:11:06 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -268,6 +268,7 @@ COREOBJS = \ $(TMP_DIR)\tclDate.obj \ $(TMP_DIR)\tclDictObj.obj \ $(TMP_DIR)\tclEncoding.obj \ + $(TMP_DIR)\tclEnsemble.obj \ $(TMP_DIR)\tclEnv.obj \ $(TMP_DIR)\tclEvent.obj \ $(TMP_DIR)\tclExecute.obj \ -- cgit v0.12 From 96e0c0bf4a5022bfb1ecf335ce8f3b35f73c75dd Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 14 Feb 2010 13:23:03 +0000 Subject: Corrected a comment. --- generic/tclNamesp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index fbbab98..140c17e 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -5,8 +5,7 @@ * commands and global variables. The global :: namespace is the * traditional Tcl "global" scope. Other namespaces are created as * children of the global namespace. These other namespaces contain - * special-purpose commands and variables for packages. Also includes the - * TIP#112 ensemble machinery. + * special-purpose commands and variables for packages. * * Copyright (c) 1993-1997 Lucent Technologies. * Copyright (c) 1997 Sun Microsystems, Inc. @@ -23,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.200 2010/02/13 18:11:06 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.201 2010/02/14 13:23:03 dkf Exp $ */ #include "tclInt.h" -- cgit v0.12 From 2a083e870cd9bd162468f535c9a9b724516353ea Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 14 Feb 2010 13:37:33 +0000 Subject: Reduce code nesting in [namespace ensemble] implementation. --- generic/tclEnsemble.c | 255 +++++++++++++++++++++++--------------------------- 1 file changed, 116 insertions(+), 139 deletions(-) diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 4dd86b7..49d0ed9 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -1,15 +1,15 @@ /* * tclEnsemble.c -- * - * Contains support for ensembles, which provide simple mechanism - * for creating composite commands on top of namespaces. + * Contains support for ensembles (see TIP#112), which provide simple + * mechanism for creating composite commands on top of namespaces. * * Copyright (c) 2005-2010 Donal K. Fellows. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnsemble.c,v 1.1 2010/02/13 18:11:06 dkf Exp $ + * RCS: @(#) $Id: tclEnsemble.c,v 1.2 2010/02/14 13:37:33 dkf Exp $ */ #include "tclInt.h" @@ -38,6 +38,34 @@ static void DupEnsembleCmdRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); static void StringOfEnsembleCmdRep(Tcl_Obj *objPtr); /* + * The lists of subcommands and options for the [namespace ensemble] command. + */ + +static const char *const ensembleSubcommands[] = { + "configure", "create", "exists", NULL +}; +enum EnsSubcmds { + ENS_CONFIG, ENS_CREATE, ENS_EXISTS +}; + +static const char *const ensembleCreateOptions[] = { + "-command", "-map", "-parameters", "-prefixes", "-subcommands", + "-unknown", NULL +}; +enum EnsCreateOpts { + CRT_CMD, CRT_MAP, CRT_PARAM, CRT_PREFIX, CRT_SUBCMDS, CRT_UNKNOWN +}; + +static const char *const ensembleConfigOptions[] = { + "-map", "-namespace", "-parameters", "-prefixes", "-subcommands", + "-unknown", NULL +}; +enum EnsConfigOpts { + CONF_MAP, CONF_NAMESPACE, CONF_PARAM, CONF_PREFIX, CONF_SUBCMDS, + CONF_UNKNOWN +}; + +/* * This structure defines a Tcl object type that contains a reference to an * ensemble subcommand (e.g. the "length" in [string length ab]). It is used * to cache the mapping between the subcommand itself and the real command @@ -81,36 +109,18 @@ TclNamespaceEnsembleCmd( int objc, Tcl_Obj *const objv[]) { - Namespace *nsPtr; + Tcl_Namespace *namespacePtr; + Namespace *nsPtr = (Namespace *) TclGetCurrentNamespace(interp); Tcl_Command token; - static const char *const subcommands[] = { - "configure", "create", "exists", NULL - }; - enum EnsSubcmds { - ENS_CONFIG, ENS_CREATE, ENS_EXISTS - }; - static const char *const createOptions[] = { - "-command", "-map", "-parameters", "-prefixes", "-subcommands", - "-unknown", NULL - }; - enum EnsCreateOpts { - CRT_CMD, CRT_MAP, CRT_PARAM, CRT_PREFIX, CRT_SUBCMDS, CRT_UNKNOWN - }; - static const char *const configOptions[] = { - "-map", "-namespace", "-parameters", "-prefixes", "-subcommands", - "-unknown", NULL - }; - enum EnsConfigOpts { - CONF_MAP, CONF_NAMESPACE, CONF_PARAM, CONF_PREFIX, CONF_SUBCMDS, - CONF_UNKNOWN - }; - int index; - - nsPtr = (Namespace *) TclGetCurrentNamespace(interp); + Tcl_DictSearch search; + Tcl_Obj *listObj; + int index, done; + if (nsPtr == NULL || nsPtr->flags & NS_DYING) { if (!Tcl_InterpDeleted(interp)) { Tcl_AppendResult(interp, - "tried to manipulate ensemble of deleted namespace", NULL); + "tried to manipulate ensemble of deleted namespace", + NULL); } return TCL_ERROR; } @@ -119,17 +129,15 @@ TclNamespaceEnsembleCmd( Tcl_WrongNumArgs(interp, 2, objv, "subcommand ?arg ...?"); return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[2], subcommands, "subcommand", 0, - &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[2], ensembleSubcommands, + "subcommand", 0, &index) != TCL_OK) { return TCL_ERROR; } switch ((enum EnsSubcmds) index) { case ENS_CREATE: { const char *name; - Tcl_DictSearch search; - Tcl_Obj *listObj; - int done, len, allocatedMapFlag = 0; + int len, allocatedMapFlag = 0; /* * Defaults */ @@ -166,8 +174,8 @@ TclNamespaceEnsembleCmd( */ for (; objc>1 ; objc-=2,objv+=2) { - if (Tcl_GetIndexFromObj(interp, objv[0], createOptions, "option", - 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[0], ensembleCreateOptions, + "option", 0, &index) != TCL_OK) { if (allocatedMapFlag) { Tcl_DecrRefCount(mapObj); } @@ -337,8 +345,8 @@ TclNamespaceEnsembleCmd( if (objc == 5) { Tcl_Obj *resultObj = NULL; /* silence gcc 4 warning */ - if (Tcl_GetIndexFromObj(interp, objv[4], configOptions, "option", - 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[4], ensembleConfigOptions, + "option", 0, &index) != TCL_OK) { return TCL_ERROR; } switch ((enum EnsConfigOpts) index) { @@ -360,14 +368,12 @@ TclNamespaceEnsembleCmd( Tcl_SetObjResult(interp, resultObj); } break; - case CONF_NAMESPACE: { - Tcl_Namespace *namespacePtr = NULL; /* silence gcc 4 warning */ - + case CONF_NAMESPACE: + namespacePtr = NULL; /* silence gcc 4 warning */ Tcl_GetEnsembleNamespace(NULL, token, &namespacePtr); Tcl_SetResult(interp, ((Namespace *) namespacePtr)->fullName, TCL_VOLATILE); break; - } case CONF_PREFIX: { int flags = 0; /* silence gcc 4 warning */ @@ -383,68 +389,64 @@ TclNamespaceEnsembleCmd( } break; } - return TCL_OK; - } else if (objc == 4) { /* * Produce list of all information. */ Tcl_Obj *resultObj, *tmpObj = NULL; /* silence gcc 4 warning */ - Tcl_Namespace *namespacePtr = NULL; /* silence gcc 4 warning */ int flags = 0; /* silence gcc 4 warning */ TclNewObj(resultObj); /* -map option */ Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_MAP], -1)); + Tcl_NewStringObj(ensembleConfigOptions[CONF_MAP], -1)); Tcl_GetEnsembleMappingDict(NULL, token, &tmpObj); Tcl_ListObjAppendElement(NULL, resultObj, (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); /* -namespace option */ Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_NAMESPACE], -1)); + Tcl_NewStringObj(ensembleConfigOptions[CONF_NAMESPACE], + -1)); + namespacePtr = NULL; /* silence gcc 4 warning */ Tcl_GetEnsembleNamespace(NULL, token, &namespacePtr); Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj(((Namespace *) namespacePtr)->fullName, - -1)); + -1)); /* -parameters option */ Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_PARAM], -1)); + Tcl_NewStringObj(ensembleConfigOptions[CONF_PARAM], -1)); Tcl_GetEnsembleParameterList(NULL, token, &tmpObj); Tcl_ListObjAppendElement(NULL, resultObj, (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); /* -prefix option */ Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_PREFIX], -1)); + Tcl_NewStringObj(ensembleConfigOptions[CONF_PREFIX], -1)); Tcl_GetEnsembleFlags(NULL, token, &flags); Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewBooleanObj(flags & TCL_ENSEMBLE_PREFIX)); /* -subcommands option */ Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_SUBCMDS], -1)); + Tcl_NewStringObj(ensembleConfigOptions[CONF_SUBCMDS],-1)); Tcl_GetEnsembleSubcommandList(NULL, token, &tmpObj); Tcl_ListObjAppendElement(NULL, resultObj, (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); /* -unknown option */ Tcl_ListObjAppendElement(NULL, resultObj, - Tcl_NewStringObj(configOptions[CONF_UNKNOWN], -1)); + Tcl_NewStringObj(ensembleConfigOptions[CONF_UNKNOWN],-1)); Tcl_GetEnsembleUnknownHandler(NULL, token, &tmpObj); Tcl_ListObjAppendElement(NULL, resultObj, (tmpObj != NULL) ? tmpObj : Tcl_NewObj()); Tcl_SetObjResult(interp, resultObj); - return TCL_OK; } else { - Tcl_DictSearch search; - Tcl_Obj *listObj; - int done, len, allocatedMapFlag = 0; + int len, allocatedMapFlag = 0; Tcl_Obj *subcmdObj = NULL, *mapObj = NULL, *paramObj = NULL, *unknownObj = NULL; /* Defaults, silence gcc 4 warnings */ int permitPrefix, flags = 0; /* silence gcc 4 warning */ @@ -467,8 +469,9 @@ TclNamespaceEnsembleCmd( */ for (; objc>0 ; objc-=2,objv+=2) { - if (Tcl_GetIndexFromObj(interp, objv[0], configOptions, + if (Tcl_GetIndexFromObj(interp, objv[0],ensembleConfigOptions, "option", 0, &index) != TCL_OK) { + freeMapAndError: if (allocatedMapFlag) { Tcl_DecrRefCount(mapObj); } @@ -477,24 +480,19 @@ TclNamespaceEnsembleCmd( switch ((enum EnsConfigOpts) index) { case CONF_SUBCMDS: if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; + goto freeMapAndError; } subcmdObj = (len > 0 ? objv[1] : NULL); continue; case CONF_PARAM: if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; + goto freeMapAndError; } paramObj = (len > 0 ? objv[1] : NULL); continue; case CONF_MAP: { - Tcl_Obj *patchedDict = NULL, *subcmdObj; + Tcl_Obj *patchedDict = NULL, *subcmdObj, **listv; + const char *cmd; /* * Verify that the map is sensible. @@ -502,29 +500,20 @@ TclNamespaceEnsembleCmd( if (Tcl_DictObjFirst(interp, objv[1], &search, &subcmdObj, &listObj, &done) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; + goto freeMapAndError; } if (done) { mapObj = NULL; continue; } do { - Tcl_Obj **listv; - const char *cmd; - if (TclListObjGetElements(interp, listObj, &len, &listv) != TCL_OK) { Tcl_DictObjDone(&search); if (patchedDict) { Tcl_DecrRefCount(patchedDict); } - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; + goto freeMapAndError; } if (len < 1) { Tcl_SetResult(interp, @@ -534,14 +523,11 @@ TclNamespaceEnsembleCmd( if (patchedDict) { Tcl_DecrRefCount(patchedDict); } - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; + goto freeMapAndError; } cmd = TclGetString(listv[0]); if (!(cmd[0] == ':' && cmd[1] == ':')) { - Tcl_Obj *newList = Tcl_NewListObj(len, listv); + Tcl_Obj *newList = Tcl_DuplicateObj(listObj); Tcl_Obj *newCmd = Tcl_NewStringObj(nsPtr->fullName, -1); @@ -568,27 +554,18 @@ TclNamespaceEnsembleCmd( continue; } case CONF_NAMESPACE: - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } Tcl_AppendResult(interp, "option -namespace is read-only", NULL); - return TCL_ERROR; + goto freeMapAndError; case CONF_PREFIX: if (Tcl_GetBooleanFromObj(interp, objv[1], &permitPrefix) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; + goto freeMapAndError; } continue; case CONF_UNKNOWN: if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { - if (allocatedMapFlag) { - Tcl_DecrRefCount(mapObj); - } - return TCL_ERROR; + goto freeMapAndError; } unknownObj = (len > 0 ? objv[1] : NULL); continue; @@ -606,8 +583,8 @@ TclNamespaceEnsembleCmd( Tcl_SetEnsembleParameterList(interp, token, paramObj); Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); Tcl_SetEnsembleFlags(interp, token, flags); - return TCL_OK; } + return TCL_OK; default: Tcl_Panic("unexpected ensemble command"); @@ -2692,7 +2669,8 @@ TclCompileEnsemble( Tcl_Obj *mapObj, *subcmdObj, *targetCmdObj, *listObj, **elems; Tcl_Command ensemble = (Tcl_Command) cmdPtr; Tcl_Parse synthetic; - int len, numBytes, result, flags = 0, i; + int len, result, flags = 0, i; + unsigned numBytes; const char *word; if (parsePtr->numWords < 2) { @@ -2742,7 +2720,8 @@ TclCompileEnsemble( } /* - * Next, get the flags. We need them on several code paths. + * Next, get the flags. We need them on several code paths so that we can + * know whether we're to do prefix matching. */ (void) Tcl_GetEnsembleFlags(NULL, ensemble, &flags); @@ -2764,7 +2743,7 @@ TclCompileEnsemble( } for (i=0 ; i Date: Mon, 15 Feb 2010 11:53:43 +0000 Subject: Fix [Bug 2950259] so that deleting an object by killing its namespace will reliably call the object's destructor. --- ChangeLog | 12 +++++++++++ generic/tclInt.h | 8 ++++++- generic/tclNamesp.c | 23 +++++++++++++++++++- generic/tclOO.c | 42 +++++++++++++++++++++++++++++++++++-- tests/oo.test | 60 ++++++++++++++++++++++++++++++++++++++++++++++------- 5 files changed, 133 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6585b03..bb536c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-02-15 Donal K. Fellows + + * generic/tclOO.c (AllocObject, SquelchedNsFirst, ObjectRenamedTrace): + * generic/tclNamesp.c (Tcl_DeleteNamespace): [Bug 2950259]: Revised + the namespace deletion code to provide an additional internal callback + that gets triggered early enough in namespace deletion to allow TclOO + destructors to run sanely. Adjusted TclOO to take advantage of this, + so making tearing down an object by killing its namespace appear to + work seamlessly, which is needed for Itcl. (Note that this is not a + feature that will ever be backported to 8.5, and it remains not a + recommended way of deleting an object.) + 2010-02-13 Donal K. Fellows * generic/tclCompCmds.c (TclCompileSwitchCmd): Divided the [switch] diff --git a/generic/tclInt.h b/generic/tclInt.h index f66fa33..55782ee 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.461 2010/02/13 18:11:06 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.462 2010/02/15 11:53:44 dkf Exp $ */ #ifndef _TCLINT @@ -339,6 +339,12 @@ typedef struct Namespace { NamespacePathEntry *commandPathSourceList; /* Linked list of path entries that point to * this namespace. */ + Tcl_NamespaceDeleteProc *earlyDeleteProc; + /* Just like the deleteProc field (and called + * with the same clientData) but called at the + * start of the deletion process, so there is + * a chance for code to do stuff inside the + * namespace before deletion completes. */ } Namespace; /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 140c17e..2e8b814 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.201 2010/02/14 13:23:03 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.202 2010/02/15 11:53:44 dkf Exp $ */ #include "tclInt.h" @@ -733,6 +733,7 @@ Tcl_CreateNamespace( nsPtr->commandPathLength = 0; nsPtr->commandPathArray = NULL; nsPtr->commandPathSourceList = NULL; + nsPtr->earlyDeleteProc = NULL; if (parentPtr != NULL) { entryPtr = Tcl_CreateHashEntry( @@ -844,6 +845,26 @@ Tcl_DeleteNamespace( Command *cmdPtr; /* + * Give anyone interested - notably TclOO - a chance to use this namespace + * normally despite the fact that the namespace is going to go. Allows the + * calling of destructors. Will only be called once (unless re-established + * by the called function). [Bug 2950259] + * + * Note that setting this field requires access to the internal definition + * of namespaces, so it should only be accessed by code that knows about + * being careful with reentrancy. + */ + + if (nsPtr->earlyDeleteProc != NULL) { + Tcl_NamespaceDeleteProc *earlyDeleteProc = nsPtr->earlyDeleteProc; + + nsPtr->earlyDeleteProc = NULL; + nsPtr->activationCount++; + earlyDeleteProc(nsPtr->clientData); + nsPtr->activationCount--; + } + + /* * Delete all coroutine commands now: break the circular ref cycle between * the namespace and the coroutine command [Bug 2724403]. This code is * essentially duplicated in TclTeardownNamespace() for all other diff --git a/generic/tclOO.c b/generic/tclOO.c index 507f8b5..c51a69c 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.31 2010/02/11 09:00:55 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.32 2010/02/15 11:53:45 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -90,6 +90,7 @@ static void ObjectRenamedTrace(ClientData clientData, Tcl_Interp *interp, const char *oldName, const char *newName, int flags); static void ReleaseClassContents(Tcl_Interp *interp,Object *oPtr); +static void SquelchedNsFirst(ClientData clientData); static int PublicObjectCmd(ClientData clientData, Tcl_Interp *interp, int objc, @@ -518,6 +519,14 @@ AllocObject( ((Namespace *) oPtr->namespacePtr)->flags |= NS_SUPPRESS_COMPILATION; /* + * Set up a callback to get notification of the deletion of a namespace + * when enough of the namespace still remains to execute commands and + * access variables in it. [Bug 2950259] + */ + + ((Namespace *) oPtr->namespacePtr)->earlyDeleteProc = SquelchedNsFirst; + + /* * Fill in the rest of the non-zero/NULL parts of the structure. */ @@ -616,6 +625,30 @@ MyDeleted( /* * ---------------------------------------------------------------------- * + * SquelchedNsFirst -- + * + * This callback is triggered when the object's namespace is deleted by + * any mechanism. It deletes the object's public command if it has not + * already been deleted, so ensuring that destructors get run at an + * appropriate time. [Bug 2950259] + * + * ---------------------------------------------------------------------- + */ + +static void +SquelchedNsFirst( + ClientData clientData) +{ + Object *oPtr = clientData; + + if (oPtr->command) { + Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->command); + } +} + +/* + * ---------------------------------------------------------------------- + * * ObjectRenamedTrace -- * * This callback is triggered when the object is deleted by any @@ -697,6 +730,9 @@ ObjectRenamedTrace( * OK, the destructor's been run. Time to splat the class data (if any) * and nuke the namespace (which triggers the final crushing of the object * structure itself). + * + * The namespace is only deleted if it hasn't already been deleted. [Bug + * 2950259] */ clsPtr = oPtr->classPtr; @@ -704,7 +740,9 @@ ObjectRenamedTrace( AddRef(clsPtr); ReleaseClassContents(interp, oPtr); } - Tcl_DeleteNamespace(oPtr->namespacePtr); + if (((Namespace *) oPtr->namespacePtr)->earlyDeleteProc != NULL) { + Tcl_DeleteNamespace(oPtr->namespacePtr); + } if (clsPtr) { DelRef(clsPtr); } diff --git a/tests/oo.test b/tests/oo.test index d831b3d..fbb8971 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.36 2010/02/02 09:13:45 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.37 2010/02/15 11:53:45 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -379,17 +379,36 @@ test oo-3.4 {basic test of OO functionality: my exists in destructor} -setup { obj destroy lappend result [info commands ::objmy] } -match glob -result {0 ok *::state localcmdexists {}} -# Compare with previous test; the differences are because here the destructor -# is run with the namespace partially squelched. -test oo-3.5 {basic test of OO functionality: my exists in destructor} -setup { +test oo-3.4a {basic test of OO functionality: my exists in destructor} -setup { + oo::class create cls + set result {} +} -cleanup { + cls destroy +} -body { + oo::define cls { + variable state + constructor {} { + proc localcmdexists {} {} + set state ok + } + forward Report lappend ::result + destructor { + objmy Report [catch {set state} msg] $msg + objmy Report [namespace which -var state] + objmy Report [info commands localcmdexists] + } + } + cls create obj + rename [info object namespace obj]::my ::objmy + rename obj {} + lappend result [info commands ::objmy] +} -match glob -result {0 ok *::state localcmdexists {}} +test oo-3.5 {basic test of OO functionality: destructor: evil case for Itcl} -setup { oo::class create cls set result {} } -cleanup { cls destroy } -body { - # Order of destruction of commands relative to namespace is complex, but - # we want to make sure that the order from the perspective of TclOO is - # solid. oo::define cls { variable state constructor {} { @@ -407,7 +426,32 @@ test oo-3.5 {basic test of OO functionality: my exists in destructor} -setup { rename [info object namespace obj]::my ::objmy namespace delete [info object namespace obj] lappend result [info commands ::objmy] -} -match glob -result {1 {can't read "state": no such variable} *::state {} {}} +} -match glob -result {0 ok *::state localcmdexists {}} +test oo-3.5a {basic test of OO functionality: destructor: evil case for Itcl} -setup { + oo::class create cls + set result {} +} -cleanup { + cls destroy +} -body { + oo::define cls { + variable state result + constructor {} { + proc localcmdexists {} {} + set state ok + my eval {upvar 0 ::result result} + } + method nuke {} { + namespace delete [namespace current] + return $result + } + destructor { + lappend result [self] $state [info commands localcmdexists] + } + } + cls create obj + namespace delete [info object namespace obj] + [cls create obj2] nuke +} -match glob -result {::obj ok localcmdexists ::obj2 ok localcmdexists} test oo-3.6 {basic test of OO functionality: errors in destructor} -setup { oo::class create cls } -cleanup { -- cgit v0.12 From d51db74e5f9c0be32cbd0cfeeff0797a74cfd4ba Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 15 Feb 2010 22:56:19 +0000 Subject: reverted earlier rename from tcl*Stubs to tcl*ConstStubs, it's not necessary at all. tclEnsemble.c: Fix signed-unsigned mismatch make tclWinProcs "const" Add first part of mslu support, See [Feature Request #2819611] --- ChangeLog | 21 ++++++ compat/unicows/license.txt | 19 +++++ compat/unicows/readme.txt | 163 ++++++++++++++++++++++++++++++++++++++++++ compat/unicows/unicows.lib | Bin 0 -> 492330 bytes generic/tclBasic.c | 8 +-- generic/tclEnsemble.c | 4 +- generic/tclOO.c | 6 +- generic/tclOOStubInit.c | 10 +-- generic/tclStubInit.c | 20 +++--- generic/tclTomMathInterface.c | 6 +- tools/genStubs.tcl | 8 +-- win/.cvsignore | 2 + win/tclWin32Dll.c | 122 ++++++++++++++++++++++--------- win/tclWinFCmd.c | 12 ++-- win/tclWinFile.c | 12 ++-- win/tclWinInt.h | 84 +++++++--------------- win/tclWinLoad.c | 4 +- win/tclWinPipe.c | 12 ++-- win/tclWinSerial.c | 4 +- 19 files changed, 372 insertions(+), 145 deletions(-) create mode 100644 compat/unicows/license.txt create mode 100644 compat/unicows/readme.txt create mode 100644 compat/unicows/unicows.lib diff --git a/ChangeLog b/ChangeLog index bb536c7..2061a09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2010-02-15 Jan Nijtmans + + * tools/genStubs.tcl reverted earlier rename from tcl*Stubs to + * generic/tclBasic.c tcl*ConstStubs, it's not necessary at all. + * generic/tclOO.c + * generic/tclTomMathInterface.c + * generic/tclStubInit.c (regenerated) + * generic/tclOOStubInit.c (regenerated) + * generic/tclEnsemble.c Fix signed-unsigned mismatch + * win/tclWinInt.h make tclWinProcs "const" + * win/tclWin32Dll.c + * win/tclWinFCmd.c + * win/tclWinFile.c + * win/tclWinLoad.c + * win/tclWinPipe.c + * win/tclWinSerial.c + * win/.cvsignore + * compat/unicows/readme.txt Add first part of mslu support + * compat/unicows/license.txt See [Feature Request #2819611] + * compat/unicows/unicows.lib + 2010-02-15 Donal K. Fellows * generic/tclOO.c (AllocObject, SquelchedNsFirst, ObjectRenamedTrace): diff --git a/compat/unicows/license.txt b/compat/unicows/license.txt new file mode 100644 index 0000000..46f4d0b --- /dev/null +++ b/compat/unicows/license.txt @@ -0,0 +1,19 @@ +Copyright (c) 2001-2008 Vaclav Slavik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + \ No newline at end of file diff --git a/compat/unicows/readme.txt b/compat/unicows/readme.txt new file mode 100644 index 0000000..00967fc --- /dev/null +++ b/compat/unicows/readme.txt @@ -0,0 +1,163 @@ + + + ============================================= + libunicows + ------------------------------------- + Import library for + Microsoft Layer for Unicode (unicows.dll) + + http://libunicows.sourceforge.net + ============================================= + + + About +======= + +Traditionally, win32 Unicode API was only available on Windows NT or 2000. If +you wanted to take advantage of Unicode in your application and support Windows +95/98 at the same time, your only option was to deploy two executables, one for +NT and one for 9X. + +Fortunately, this changed in 2001 when MS (finally!) released MSLU runtime that +allows Unicode applications to run under Windows 9X. + +See these pages for details: + + http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx + http://msdn.microsoft.com/msdnmag/nettop.asp?page=/msdnmag/issues/01/10/MSLU/MSLU.asp&ad=ads.ddj.com/msdnmag/premium.htm + +Less fortunately, this solution requires that you use a special statically +linked import library that decides at runtime whether to load symbols from +system libraries like kernel32.dll or user32.dll (in case of Windows NT) or +from unicows.dll (which provides Unicode emulation layer under 9X). This import +library is only available for Microsoft Visual C++ and is only part of the new +Platform SDK, which is rather huge package. + +This library contains independent implementation of the import library. It can +be used with any C compiler (although it was only tested with Mingw32 and MSVC +so far). + + + + Installing libunicows +======================= + + Mingw32 +--------- + +Simply copy libunicows.a to the lib subdirectory of your Mingw32 installation +(e.g. c:\mingw32\lib). + + + Microsoft Visual C++ +---------------------- + +Copy unicows.lib to C:\Program Files\Visual Studio\VC98\Lib (assuming you +installed MSVC into C:\Program Files\Visual Studio and that you have version +6.0, the path may vary otherwise). + +Note: This was tested only with MSVC++ 6.0, but should work with other versions + as well. + + + Borland C++ +------------- + +Copy unicows.lib to %BORLAND%\lib where %BORLAND% is where you installed BC++ +(this directory should contain import32.lib). + + + Watcom C/C++ +------------- + +Copy unicows.lib to %WATCOM%\lib386\nt where %WATCOM% is where you installed +the compiler. + + + Usage +======= + +1) Add the unicows import library BEFORE other win32 libraries on your command +line. For example, if your command line for Mingw32 was + + c++ foo.o bar.o -o foo -lkernel32 -luser32 -lgdi32 -lcomdlg32 + +change it to + + c++ foo.o bar.o -o foo -lunicows -lkernel32 -luser32 -lgdi32 -lcomdlg32 + +No other change is neccessary, you don't have to include any special headers in +your source files. + + +2) Download Unicows runtime from + + http://www.microsoft.com/downloads/release.asp?releaseid=30039 + +or + + http://download.microsoft.com/download/platformsdk/Redist/1.0/W9XMe/EN-US/unicows.exe + +Extract unicows.dll from the package and distribute it with your application. +Do *not* install it to Windows system directory, always copy the DLL to your +application's directory! (Nobody wants any more of DLL hell...). + +If your application uses Common Controls DLL (very likely) or Rich Edit control, +make sure the installer installs new enough versions that fully support Unicode +(Common Controls DLL version 5.80 and RichEdit 4.0). + + + Compiling from sources +======================== + +1) Download the source package (libunicows-$version-src.tar.gz) + +2) [optional step] Run generate.py to create assembler stubs. You will need + Python (http://www.python.org) to run it. You don't have to do this unless + you modified symbols.txt or src\template.asm, because generated stubs are + already included in source package (in src\gen_asm). + +3) Change to 'src' subdirectory and compile the library. You will need + NASM (http://nasm.sourceforge.net). + + Mingw32: run make -f makefile.mingw32 + MSVC: run nmake -f makefile.vc6 + + If your compiler is not supported, you will have to create a makefile/project + file for it. You can gen inspiration from existing makefiles. If you do so, + please send the makefile (and if possible, compiled unicows.lib) to me, + so that I can include it in the next release of libunicows. Thanks! + + + Compiling and using unicows_wrapper.dll +========================================= + +If precompiled version of libunicows is not available for your compiler, you +can use unicows_wrapper.dll (at the cost of marginally slower calls and +the need to install unicows_wrapper.dll on NT/2k/XP boxes, too). Create +an import library for it in the same way you would do for any other DLL +and same the created import library as unicows.lib (or whatever name convention +your compiler uses, the point is to not name it unicows_wrapper.lib). For +example, this is how to do it with Borland C++ tools: + + implib unicows.lib unicows_wrapper.dll + +That is. Use the library as with other compilers, i.e. put unicows.lib as the +first one on your command line, so that the symbols are found in unicows.lib +and not in e.g. kernel32.lib. + +Unlike with the "native" import libraries, using unicows_wrapper.dll will make +your application depend on unicows_wrapper.dll even when installed on +Windows NT/2000/XP. Therefore, your installer must install following files +in addition to your application's binary and data: + +9x/ME: unicows.dll, unicows_wrapper.dll +NT/2k/XP: unicows_wrapper.dll + + + + Contacting the author +======================= + +I can be reached at this email address: vslavik@fastmail.fm + \ No newline at end of file diff --git a/compat/unicows/unicows.lib b/compat/unicows/unicows.lib new file mode 100644 index 0000000..e130334 Binary files /dev/null and b/compat/unicows/unicows.lib differ diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 97b4a5c..0a191bb 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.443 2010/02/09 20:51:54 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.444 2010/02/15 22:56:19 nijtmans Exp $ */ #include "tclInt.h" @@ -167,7 +167,7 @@ static Tcl_NRPostProc TEOV_RestoreVarFrame; static Tcl_NRPostProc TEOV_RunLeaveTraces; static Tcl_NRPostProc YieldToCallback; -MODULE_SCOPE const TclStubs tclConstStubs; +MODULE_SCOPE const TclStubs tclStubs; /* * The following structure define the commands in the Tcl core. @@ -677,7 +677,7 @@ Tcl_CreateInterp(void) * Initialise the stub table pointer. */ - iPtr->stubTable = &tclConstStubs; + iPtr->stubTable = &tclStubs; /* * Initialize the ensemble error message rewriting support. @@ -906,7 +906,7 @@ Tcl_CreateInterp(void) */ Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, - (ClientData) &tclConstStubs); + (ClientData) &tclStubs); if (TclTommath_Init(interp) != TCL_OK) { Tcl_Panic(Tcl_GetString(Tcl_GetObjResult(interp))); diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 49d0ed9..3108793 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnsemble.c,v 1.2 2010/02/14 13:37:33 dkf Exp $ + * RCS: @(#) $Id: tclEnsemble.c,v 1.3 2010/02/15 22:56:20 nijtmans Exp $ */ #include "tclInt.h" @@ -2743,7 +2743,7 @@ TclCompileEnsemble( } for (i=0 ; i -MODULE_SCOPE const TclTomMathStubs tclTomMathConstStubs; +MODULE_SCOPE const TclTomMathStubs tclTomMathStubs; /* *---------------------------------------------------------------------- @@ -45,7 +45,7 @@ TclTommath_Init( /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvideEx(interp, "tcl::tommath", TCL_PATCH_LEVEL, - (ClientData) &tclTomMathConstStubs) != TCL_OK) { + (ClientData) &tclTomMathStubs) != TCL_OK) { return TCL_ERROR; } return TCL_OK; diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 613d62f..7a77314 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: genStubs.tcl,v 1.38 2010/02/09 14:08:53 ferrieux Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.39 2010/02/15 22:56:20 nijtmans Exp $ package require Tcl 8.4 @@ -983,7 +983,7 @@ proc genStubs::emitInit {name textVar} { append text "\nstatic const ${capName}StubHooks ${name}StubHooks = \{\n" set sep " " foreach sub $hooks($name) { - append text $sep "&${sub}ConstStubs" + append text $sep "&${sub}Stubs" set sep ",\n " } append text "\n\};\n" @@ -998,9 +998,9 @@ proc genStubs::emitInit {name textVar} { } if {$root} { - append text "\nconst ${capName}Stubs ${name}ConstStubs = \{\n" + append text "\nconst ${capName}Stubs ${name}Stubs = \{\n" } else { - append text "\nstatic const ${capName}Stubs ${name}ConstStubs = \{\n" + append text "\nstatic const ${capName}Stubs ${name}Stubs = \{\n" } append text " TCL_STUB_MAGIC,\n" if {[info exists hooks($name)]} { diff --git a/win/.cvsignore b/win/.cvsignore index 3f15505..7a35fbb 100644 --- a/win/.cvsignore +++ b/win/.cvsignore @@ -24,3 +24,5 @@ tcl.suo *.res *.exp *.lib +*.pdb +*.ilk diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 1295c26..76fc642 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.60 2009/08/02 10:41:09 nijtmans Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.61 2010/02/15 22:56:19 nijtmans Exp $ */ #include "tclWinInt.h" @@ -63,6 +63,53 @@ typedef struct EXCEPTION_REGISTRATION { #define cpuid __asm __emit 0fh __asm __emit 0a2h #endif +static Tcl_Encoding winTCharEncoding = NULL; + +static const TCHAR *utf2win( + const char *string, /* Source string in UTF-8. */ + int len, /* Source string length in bytes, or < 0 for + * strlen(). */ + Tcl_DString *dsPtr) /* Uninitialized or free DString in which the + * converted string is stored. */ +{ + return (const TCHAR *) Tcl_UtfToExternalDString(NULL, string, len, dsPtr); +} + +static const TCHAR *utf2wchar( + const char *string, /* Source string in UTF-8. */ + int len, /* Source string length in bytes, or < 0 for + * strlen(). */ + Tcl_DString *dsPtr) /* Uninitialized or free DString in which the + * converted string is stored. */ +{ + return (const TCHAR *) Tcl_UtfToExternalDString(winTCharEncoding, + string, len, dsPtr); +} + +static const char *win2utf( + const TCHAR *string, /* Source string in Unicode when running NT, + * ANSI when running 95. */ + int len, /* Source string length in bytes, or < 0 for + * platform-specific string length. */ + Tcl_DString *dsPtr) /* Uninitialized or free DString in which the + * converted string is stored. */ +{ + return Tcl_ExternalToUtfDString(NULL, + (const char *) string, len, dsPtr); +} + +static const char *wchar2utf( + const TCHAR *string, /* Source string in Unicode when running NT, + * ANSI when running 95. */ + int len, /* Source string length in bytes, or < 0 for + * platform-specific string length. */ + Tcl_DString *dsPtr) /* Uninitialized or free DString in which the + * converted string is stored. */ +{ + return Tcl_ExternalToUtfDString(winTCharEncoding, + (const char *) string, len, dsPtr); +} + /* * The following function tables are used to dispatch to either the * wide-character or multi-byte versions of the operating system calls, @@ -71,7 +118,6 @@ typedef struct EXCEPTION_REGISTRATION { static TclWinProcs asciiProcs = { 0, - (BOOL (WINAPI *)(const TCHAR *, LPDCB)) BuildCommDCBA, (TCHAR *(WINAPI *)(TCHAR *)) CharLowerA, (BOOL (WINAPI *)(const TCHAR *, const TCHAR *, BOOL)) CopyFileA, @@ -115,7 +161,6 @@ static TclWinProcs asciiProcs = { NULL, NULL, - /* deleted (int (__cdecl*)(const TCHAR *, struct _utimbuf *)) _utime, */ NULL, NULL, /* getLongPathNameProc */ @@ -125,12 +170,13 @@ static TclWinProcs asciiProcs = { /* ReadConsole and WriteConsole */ (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsoleA, (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleA, - (BOOL (WINAPI *)(LPTSTR, LPDWORD)) GetUserNameA + (BOOL (WINAPI *)(LPTSTR, LPDWORD)) GetUserNameA, + utf2win, + win2utf }; static TclWinProcs unicodeProcs = { 1, - (BOOL (WINAPI *)(const TCHAR *, LPDCB)) BuildCommDCBW, (TCHAR *(WINAPI *)(TCHAR *)) CharLowerW, (BOOL (WINAPI *)(const TCHAR *, const TCHAR *, BOOL)) CopyFileW, @@ -174,7 +220,6 @@ static TclWinProcs unicodeProcs = { NULL, NULL, - /* deleted (int (__cdecl*)(const TCHAR *, struct _utimbuf *)) _wutime, */ NULL, NULL, /* getLongPathNameProc */ @@ -184,11 +229,12 @@ static TclWinProcs unicodeProcs = { /* ReadConsole and WriteConsole */ (BOOL (WINAPI *)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID)) ReadConsoleW, (BOOL (WINAPI *)(HANDLE, const void*, DWORD, LPDWORD, LPVOID)) WriteConsoleW, - (BOOL (WINAPI *)(LPTSTR, LPDWORD)) GetUserNameW + (BOOL (WINAPI *)(LPTSTR, LPDWORD)) GetUserNameW, + utf2wchar, + wchar2utf }; -TclWinProcs *tclWinProcs = &asciiProcs; -static Tcl_Encoding tclWinTCharEncoding; +const TclWinProcs *tclWinProcs = &asciiProcs; /* * The following declaration is for the VC++ DLL entry point. @@ -446,54 +492,53 @@ TclWinSetInterfaces( TclWinResetInterfaces(); if (wide) { - tclWinProcs = &unicodeProcs; - tclWinTCharEncoding = Tcl_GetEncoding(NULL, "unicode"); - if (tclWinProcs->getFileAttributesExProc == NULL) { + winTCharEncoding = Tcl_GetEncoding(NULL, "unicode"); + if (unicodeProcs.getFileAttributesExProc == NULL) { HINSTANCE hInstance = LoadLibraryA("kernel32"); if (hInstance != NULL) { - tclWinProcs->getFileAttributesExProc = + unicodeProcs.getFileAttributesExProc = (BOOL (WINAPI *)(const TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID)) GetProcAddress(hInstance, "GetFileAttributesExW"); - tclWinProcs->createHardLinkProc = + unicodeProcs.createHardLinkProc = (BOOL (WINAPI *)(const TCHAR *, const TCHAR*, LPSECURITY_ATTRIBUTES)) GetProcAddress(hInstance, "CreateHardLinkW"); - tclWinProcs->findFirstFileExProc = + unicodeProcs.findFirstFileExProc = (HANDLE (WINAPI *)(const TCHAR*, UINT, LPVOID, UINT, LPVOID, DWORD)) GetProcAddress(hInstance, "FindFirstFileExW"); - tclWinProcs->getVolumeNameForVMPProc = + unicodeProcs.getVolumeNameForVMPProc = (BOOL (WINAPI *)(const TCHAR*, TCHAR*, DWORD)) GetProcAddress(hInstance, "GetVolumeNameForVolumeMountPointW"); - tclWinProcs->getLongPathNameProc = + unicodeProcs.getLongPathNameProc = (DWORD (WINAPI *)(const TCHAR*, TCHAR*, DWORD)) GetProcAddress(hInstance, "GetLongPathNameW"); FreeLibrary(hInstance); } hInstance = LoadLibraryA("advapi32"); if (hInstance != NULL) { - tclWinProcs->getFileSecurityProc = (BOOL (WINAPI *)( + unicodeProcs.getFileSecurityProc = (BOOL (WINAPI *)( LPCTSTR lpFileName, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded)) GetProcAddress(hInstance, "GetFileSecurityW"); - tclWinProcs->impersonateSelfProc = (BOOL (WINAPI *) ( + unicodeProcs.impersonateSelfProc = (BOOL (WINAPI *) ( SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)) GetProcAddress(hInstance, "ImpersonateSelf"); - tclWinProcs->openThreadTokenProc = (BOOL (WINAPI *) ( + unicodeProcs.openThreadTokenProc = (BOOL (WINAPI *) ( HANDLE ThreadHandle, DWORD DesiredAccess, BOOL OpenAsSelf, PHANDLE TokenHandle)) GetProcAddress(hInstance, "OpenThreadToken"); - tclWinProcs->revertToSelfProc = (BOOL (WINAPI *) (void)) + unicodeProcs.revertToSelfProc = (BOOL (WINAPI *) (void)) GetProcAddress(hInstance, "RevertToSelf"); - tclWinProcs->mapGenericMaskProc = (void (WINAPI *) ( + unicodeProcs.mapGenericMaskProc = (void (WINAPI *) ( PDWORD AccessMask, PGENERIC_MAPPING GenericMapping)) GetProcAddress(hInstance, "MapGenericMask"); - tclWinProcs->accessCheckProc = (BOOL (WINAPI *)( + unicodeProcs.accessCheckProc = (BOOL (WINAPI *)( PSECURITY_DESCRIPTOR pSecurityDescriptor, HANDLE ClientToken, DWORD DesiredAccess, PGENERIC_MAPPING GenericMapping, @@ -504,20 +549,21 @@ TclWinSetInterfaces( FreeLibrary(hInstance); } } + tclWinProcs = &unicodeProcs; } else { - if (tclWinProcs->getFileAttributesExProc == NULL) { + if (asciiProcs.getFileAttributesExProc == NULL) { HINSTANCE hInstance = LoadLibraryA("kernel32"); if (hInstance != NULL) { - tclWinProcs->getFileAttributesExProc = + asciiProcs.getFileAttributesExProc = (BOOL (WINAPI *)(const TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID)) GetProcAddress(hInstance, "GetFileAttributesExA"); - tclWinProcs->createHardLinkProc = + asciiProcs.createHardLinkProc = (BOOL (WINAPI *)(const TCHAR *, const TCHAR*, LPSECURITY_ATTRIBUTES)) GetProcAddress(hInstance, "CreateHardLinkA"); - tclWinProcs->findFirstFileExProc = NULL; - tclWinProcs->getLongPathNameProc = NULL; + asciiProcs.findFirstFileExProc = NULL; + asciiProcs.getLongPathNameProc = NULL; /* * The 'findFirstFileExProc' function exists on some of * 95/98/ME, but it seems not to work as anticipated. @@ -529,7 +575,7 @@ TclWinSetInterfaces( * LPVOID, UINT, LPVOID, DWORD)) GetProcAddress(hInstance, * "FindFirstFileExA"); */ - tclWinProcs->getVolumeNameForVMPProc = + asciiProcs.getVolumeNameForVMPProc = (BOOL (WINAPI *)(const TCHAR*, TCHAR*, DWORD)) GetProcAddress(hInstance, "GetVolumeNameForVolumeMountPointA"); @@ -603,9 +649,9 @@ TclWinEncodingsCleanup(void) void TclWinResetInterfaces(void) { - if (tclWinTCharEncoding != NULL) { - Tcl_FreeEncoding(tclWinTCharEncoding); - tclWinTCharEncoding = NULL; + if (winTCharEncoding != NULL) { + Tcl_FreeEncoding(winTCharEncoding); + winTCharEncoding = NULL; } tclWinProcs = &asciiProcs; } @@ -826,7 +872,11 @@ Tcl_WinUtfToTChar( Tcl_DString *dsPtr) /* Uninitialized or free DString in which the * converted string is stored. */ { - return (TCHAR *) Tcl_UtfToExternalDString(tclWinTCharEncoding, + Tcl_Encoding encoding = NULL; + if (platformId != VER_PLATFORM_WIN32_WINDOWS) { + encoding = winTCharEncoding; + } + return (TCHAR *) Tcl_UtfToExternalDString(encoding, string, len, dsPtr); } @@ -839,7 +889,11 @@ Tcl_WinTCharToUtf( Tcl_DString *dsPtr) /* Uninitialized or free DString in which the * converted string is stored. */ { - return Tcl_ExternalToUtfDString(tclWinTCharEncoding, + Tcl_Encoding encoding = NULL; + if (platformId != VER_PLATFORM_WIN32_WINDOWS) { + encoding = winTCharEncoding; + } + return Tcl_ExternalToUtfDString(encoding, (const char *) string, len, dsPtr); } diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 6f5cd8d..67ba3eb 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.58 2009/08/02 10:41:09 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.59 2010/02/15 22:56:19 nijtmans Exp $ */ #include "tclWinInt.h" @@ -930,8 +930,8 @@ TclpObjCopyDirectory( return TCL_ERROR; } - Tcl_WinUtfToTChar(Tcl_GetString(normSrcPtr), -1, &srcString); - Tcl_WinUtfToTChar(Tcl_GetString(normDestPtr), -1, &dstString); + tclWinProcs->utf2tchar(Tcl_GetString(normSrcPtr), -1, &srcString); + tclWinProcs->utf2tchar(Tcl_GetString(normDestPtr), -1, &dstString); ret = TraverseWinTree(TraversalCopy, &srcString, &dstString, &ds); @@ -1003,7 +1003,7 @@ TclpObjRemoveDirectory( if (normPtr == NULL) { return TCL_ERROR; } - Tcl_WinUtfToTChar(Tcl_GetString(normPtr), -1, &native); + tclWinProcs->utf2tchar(Tcl_GetString(normPtr), -1, &native); ret = DoRemoveDirectory(&native, recursive, &ds); Tcl_DStringFree(&native); } else { @@ -1720,7 +1720,7 @@ ConvertFileNameFormat( Tcl_Obj *tempPath; Tcl_DString ds; Tcl_DString dsTemp; - TCHAR *nativeName; + const TCHAR *nativeName; const char *tempString; int tempLen; WIN32_FIND_DATAT data; @@ -1737,7 +1737,7 @@ ConvertFileNameFormat( Tcl_DStringInit(&ds); tempString = Tcl_GetStringFromObj(tempPath,&tempLen); - nativeName = Tcl_WinUtfToTChar(tempString, tempLen, &ds); + nativeName = tclWinProcs->utf2tchar(tempString, tempLen, &ds); Tcl_DecrRefCount(tempPath); handle = tclWinProcs->findFirstFileProc(nativeName, &data); if (handle == INVALID_HANDLE_VALUE) { diff --git a/win/tclWinFile.c b/win/tclWinFile.c index f18ca7e..57a9aef 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.102 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.103 2010/02/15 22:56:19 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -1003,7 +1003,7 @@ TclpMatchInDirectory( dirName = Tcl_DStringAppend(&dsOrig, "*.*", 3); } - native = Tcl_WinUtfToTChar(dirName, -1, &ds); + native = tclWinProcs->utf2tchar(dirName, -1, &ds); if (tclWinProcs->findFirstFileExProc == NULL || (types == NULL) || (types->type != TCL_GLOB_TYPE_DIR)) { handle = tclWinProcs->findFirstFileProc(native, &data); @@ -2225,7 +2225,7 @@ NativeDev( } else { p++; } - nativeVol = Tcl_WinUtfToTChar(fullPath, p - fullPath, &volString); + nativeVol = tclWinProcs->utf2tchar(fullPath, p - fullPath, &volString); dw = (DWORD) -1; tclWinProcs->getVolumeInformationProc(nativeVol, NULL, 0, &dw, NULL, NULL, NULL, 0); @@ -2750,7 +2750,7 @@ TclpObjNormalizePath( */ WIN32_FILE_ATTRIBUTE_DATA data; - const char *nativePath = Tcl_WinUtfToTChar(path, + const char *nativePath = tclWinProcs->utf2tchar(path, currentPathEndPosition - path, &ds); if (tclWinProcs->getFileAttributesExProc(nativePath, @@ -2945,7 +2945,7 @@ TclpObjNormalizePath( if (1) { WCHAR wpath[MAX_PATH]; const char *nativePath = - Tcl_WinUtfToTChar(path, lastValidPathEnd - path, &ds); + tclWinProcs->utf2tchar(path, lastValidPathEnd - path, &ds); DWORD wpathlen = tclWinProcs->getLongPathNameProc(nativePath, (TCHAR *) wpath, MAX_PATH); @@ -3248,7 +3248,7 @@ TclNativeCreateNativeRep( } } } - Tcl_WinUtfToTChar(str, len, &ds); + tclWinProcs->utf2tchar(str, len, &ds); if (tclWinProcs->useWide) { len = Tcl_DStringLength(&ds) + sizeof(WCHAR); } else { diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 7257afe..13d25ef 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInt.h,v 1.33 2010/02/05 10:03:24 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInt.h,v 1.34 2010/02/15 22:56:19 nijtmans Exp $ */ #ifndef _TCLWININT @@ -17,14 +17,6 @@ #include "tclInt.h" /* - * The following specifies how much stack space TclpCheckStackSpace() - * ensures is available. TclpCheckStackSpace() is called by Tcl_EvalObj() - * to help avoid overflowing the stack in the case of infinite recursion. - */ - -#define TCL_WIN_STACK_THRESHOLD 0x8000 - -/* * Some versions of Borland C have a define for the OSVERSIONINFO for * Win32s and for NT, but not for Windows 95. * Define VER_PLATFORM_WIN32_CE for those without newer headers. @@ -50,7 +42,6 @@ typedef union { typedef struct TclWinProcs { int useWide; - BOOL (WINAPI *buildCommDCBProc)(const TCHAR *, LPDCB); TCHAR * (WINAPI *charLowerProc)(TCHAR *); BOOL (WINAPI *copyFileProc)(const TCHAR *, const TCHAR *, BOOL); @@ -66,8 +57,8 @@ typedef struct TclWinProcs { BOOL (WINAPI *getComputerNameProc)(WCHAR *, LPDWORD); DWORD (WINAPI *getCurrentDirectoryProc)(DWORD, WCHAR *); DWORD (WINAPI *getFileAttributesProc)(const TCHAR *); - DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD nBufferLength, - WCHAR *, TCHAR **); + DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD, WCHAR *, + TCHAR **); DWORD (WINAPI *getModuleFileNameProc)(HMODULE, WCHAR *, int); DWORD (WINAPI *getShortPathNameProc)(const TCHAR *, WCHAR *, DWORD); UINT (WINAPI *getTempFileNameProc)(const TCHAR *, const TCHAR *, UINT, @@ -92,62 +83,39 @@ typedef struct TclWinProcs { */ BOOL (WINAPI *getFileAttributesExProc)(const TCHAR *, GET_FILEEX_INFO_LEVELS, LPVOID); - BOOL (WINAPI *createHardLinkProc)(const TCHAR*, const TCHAR*, - LPSECURITY_ATTRIBUTES); + BOOL (WINAPI *createHardLinkProc)(const TCHAR *, const TCHAR *, + LPSECURITY_ATTRIBUTES); - /* deleted INT (__cdecl *utimeProc)(const TCHAR*, struct _utimbuf *); */ /* These two are also NULL at start; see comment above */ - HANDLE (WINAPI *findFirstFileExProc)(const TCHAR*, UINT, - LPVOID, UINT, - LPVOID, DWORD); - BOOL (WINAPI *getVolumeNameForVMPProc)(const TCHAR*, TCHAR*, DWORD); - DWORD (WINAPI *getLongPathNameProc)(const TCHAR*, TCHAR*, DWORD); + HANDLE (WINAPI *findFirstFileExProc)(const TCHAR *, UINT, + LPVOID, UINT, LPVOID, DWORD); + BOOL (WINAPI *getVolumeNameForVMPProc)(const TCHAR *, TCHAR *, DWORD); + DWORD (WINAPI *getLongPathNameProc)(const TCHAR *, TCHAR *, DWORD); /* * These six are for the security sdk to get correct file * permissions on NT, 2000, XP, etc. On 95,98,ME they are * always null. */ - BOOL (WINAPI *getFileSecurityProc)(LPCTSTR lpFileName, - SECURITY_INFORMATION RequestedInformation, - PSECURITY_DESCRIPTOR pSecurityDescriptor, - DWORD nLength, - LPDWORD lpnLengthNeeded); - BOOL (WINAPI *impersonateSelfProc) (SECURITY_IMPERSONATION_LEVEL - ImpersonationLevel); - BOOL (WINAPI *openThreadTokenProc) (HANDLE ThreadHandle, - DWORD DesiredAccess, BOOL OpenAsSelf, - PHANDLE TokenHandle); + BOOL (WINAPI *getFileSecurityProc)(LPCTSTR, SECURITY_INFORMATION, + PSECURITY_DESCRIPTOR, DWORD, LPDWORD); + BOOL (WINAPI *impersonateSelfProc) (SECURITY_IMPERSONATION_LEVEL); + BOOL (WINAPI *openThreadTokenProc) (HANDLE, DWORD, BOOL, PHANDLE); BOOL (WINAPI *revertToSelfProc) (void); - void (WINAPI *mapGenericMaskProc) (PDWORD AccessMask, - PGENERIC_MAPPING GenericMapping); - BOOL (WINAPI *accessCheckProc)(PSECURITY_DESCRIPTOR pSecurityDescriptor, - HANDLE ClientToken, DWORD DesiredAccess, - PGENERIC_MAPPING GenericMapping, - PPRIVILEGE_SET PrivilegeSet, - LPDWORD PrivilegeSetLength, - LPDWORD GrantedAccess, - LPBOOL AccessStatus); + void (WINAPI *mapGenericMaskProc) (PDWORD, PGENERIC_MAPPING); + BOOL (WINAPI *accessCheckProc)(PSECURITY_DESCRIPTOR, HANDLE, DWORD, + PGENERIC_MAPPING, PPRIVILEGE_SET, LPDWORD, LPDWORD, LPBOOL); /* * Unicode console support. WriteConsole and ReadConsole */ - BOOL (WINAPI *readConsoleProc)( - HANDLE hConsoleInput, - LPVOID lpBuffer, - DWORD nNumberOfCharsToRead, - LPDWORD lpNumberOfCharsRead, - LPVOID lpReserved - ); - BOOL (WINAPI *writeConsoleProc)( - HANDLE hConsoleOutput, - const void* lpBuffer, - DWORD nNumberOfCharsToWrite, - LPDWORD lpNumberOfCharsWritten, - LPVOID lpReserved - ); - BOOL (WINAPI *getUserName)(LPTSTR lpBuffer, LPDWORD lpnSize); + BOOL (WINAPI *readConsoleProc)(HANDLE, LPVOID, DWORD, LPDWORD, LPVOID); + BOOL (WINAPI *writeConsoleProc)(HANDLE, const void *, DWORD, LPDWORD, + LPVOID); + BOOL (WINAPI *getUserName)(LPTSTR, LPDWORD); + const TCHAR *(*utf2tchar)(const char *, int, Tcl_DString *); + const char *(*tchar2utf)(const TCHAR *, int, Tcl_DString *); } TclWinProcs; -MODULE_SCOPE TclWinProcs *tclWinProcs; +MODULE_SCOPE const TclWinProcs *tclWinProcs; /* * Declarations of functions that are not accessible by way of the @@ -167,9 +135,9 @@ MODULE_SCOPE Tcl_Channel TclWinOpenSerialChannel(HANDLE handle, char *channelName, int permissions); MODULE_SCOPE HANDLE TclWinSerialReopen(HANDLE handle, const TCHAR *name, DWORD access); -MODULE_SCOPE int TclWinSymLinkCopyDirectory(const TCHAR* LinkOriginal, - const TCHAR* LinkCopy); -MODULE_SCOPE int TclWinSymLinkDelete(const TCHAR* LinkOriginal, +MODULE_SCOPE int TclWinSymLinkCopyDirectory(const TCHAR *LinkOriginal, + const TCHAR *LinkCopy); +MODULE_SCOPE int TclWinSymLinkDelete(const TCHAR *LinkOriginal, int linkOnly); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) MODULE_SCOPE void TclWinFreeAllocCache(void); diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index af19ff1..26f50a4 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.23 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.24 2010/02/15 22:56:19 nijtmans Exp $ */ #include "tclWinInt.h" @@ -68,7 +68,7 @@ TclpDlopen( Tcl_DString ds; const char *fileName = Tcl_GetString(pathPtr); - nativeName = Tcl_WinUtfToTChar(fileName, -1, &ds); + nativeName = tclWinProcs->utf2tchar(fileName, -1, &ds); handle = tclWinProcs->loadLibraryProc(nativeName); Tcl_DStringFree(&ds); } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index fda862e..b7dddaa 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.74 2010/01/22 13:02:50 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.75 2010/02/15 22:56:19 nijtmans Exp $ */ #include "tclWinInt.h" @@ -597,7 +597,7 @@ TclpOpenFile( break; } - nativePath = Tcl_WinUtfToTChar(path, -1, &ds); + nativePath = tclWinProcs->utf2tchar(path, -1, &ds); /* * If the file is not being created, use the existing file attributes. @@ -1399,7 +1399,7 @@ ApplicationType( for (i = 0; i < (int) (sizeof(extensions) / sizeof(extensions[0])); i++) { Tcl_DStringSetLength(&nameBuf, nameLen); Tcl_DStringAppend(&nameBuf, extensions[i], -1); - nativeName = Tcl_WinUtfToTChar(Tcl_DStringValue(&nameBuf), + nativeName = tclWinProcs->utf2tchar(Tcl_DStringValue(&nameBuf), Tcl_DStringLength(&nameBuf), &ds); found = tclWinProcs->searchPathProc(NULL, nativeName, NULL, MAX_PATH, nativeFullPath, &rest); @@ -1624,7 +1624,7 @@ BuildCommandLine( } } Tcl_DStringFree(linePtr); - Tcl_WinUtfToTChar(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds), linePtr); + tclWinProcs->utf2tchar(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds), linePtr); Tcl_DStringFree(&ds); } @@ -3196,7 +3196,7 @@ TclpOpenTemporaryFile( if (basenameObj) { const char *string = Tcl_GetStringFromObj(basenameObj, &length); - Tcl_WinUtfToTChar(string, length, &buf); + tclWinProcs->utf2tchar(string, length, &buf); memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); namePtr += Tcl_DStringLength(&buf); Tcl_DStringFree(&buf); @@ -3217,7 +3217,7 @@ TclpOpenTemporaryFile( sprintf(number, "%d.TMP", counter); counter = (unsigned short) (counter + 1); - Tcl_WinUtfToTChar(number, strlen(number), &buf); + tclWinProcs->utf2tchar(number, strlen(number), &buf); memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); if (tclWinProcs->useWide) { *(WCHAR *)(namePtr + Tcl_DStringLength(&buf) + 1) = '\0'; diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index c3144e3..f05207f 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.41 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.42 2010/02/15 22:56:19 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1682,7 +1682,7 @@ SerialSetOptionProc( } return TCL_ERROR; } - native = Tcl_WinUtfToTChar(value, -1, &ds); + native = tclWinProcs->utf2tchar(value, -1, &ds); result = tclWinProcs->buildCommDCBProc(native, &dcb); Tcl_DStringFree(&ds); -- cgit v0.12 From 66cdccbc5f5f8daf4985fedc138a7f147a0053e2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 15 Feb 2010 23:10:47 +0000 Subject: Eliminate all internal Tcl_WinUtfToTChar and Tcl_WinTCharToUtf calls, needed for mslu support. --- ChangeLog | 5 +++-- win/tclWinFCmd.c | 16 ++++++++-------- win/tclWinFile.c | 20 ++++++++++---------- win/tclWinInit.c | 4 ++-- win/tclWinPipe.c | 6 +++--- win/tclWinSock.c | 4 ++-- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2061a09..8e47e77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,8 +9,9 @@ * generic/tclEnsemble.c Fix signed-unsigned mismatch * win/tclWinInt.h make tclWinProcs "const" * win/tclWin32Dll.c - * win/tclWinFCmd.c - * win/tclWinFile.c + * win/tclWinFCmd.c Eliminate all internal Tcl_WinUtfToTChar + * win/tclWinFile.c and Tcl_WinTCharToUtf calls, needed + * win/tclWinInit.c for mslu support. * win/tclWinLoad.c * win/tclWinPipe.c * win/tclWinSerial.c diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 67ba3eb..a60ea61 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.59 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.60 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -346,8 +346,8 @@ DoRenameFile( tclWinProcs->charLowerProc((TCHAR *) nativeSrcPath); tclWinProcs->charLowerProc((TCHAR *) nativeDstPath); - src = Tcl_WinTCharToUtf((TCHAR *) nativeSrcPath, -1, &srcString); - dst = Tcl_WinTCharToUtf((TCHAR *) nativeDstPath, -1, &dstString); + src = tclWinProcs->tchar2utf((TCHAR *) nativeSrcPath, -1, &srcString); + dst = tclWinProcs->tchar2utf((TCHAR *) nativeDstPath, -1, &dstString); /* * Check whether the destination path is actually inside the @@ -1171,7 +1171,7 @@ DoRemoveJustDirectory( end: if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativePath, -1, errorPtr); + tclWinProcs->tchar2utf(nativePath, -1, errorPtr); } return TCL_ERROR; @@ -1409,7 +1409,7 @@ TraverseWinTree( if (nativeErrfile != NULL) { TclWinConvertError(GetLastError()); if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativeErrfile, -1, errorPtr); + tclWinProcs->tchar2utf(nativeErrfile, -1, errorPtr); } result = TCL_ERROR; } @@ -1474,7 +1474,7 @@ TraversalCopy( */ if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativeDst, -1, errorPtr); + tclWinProcs->tchar2utf(nativeDst, -1, errorPtr); } return TCL_ERROR; } @@ -1529,7 +1529,7 @@ TraversalDelete( } if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativeSrc, -1, errorPtr); + tclWinProcs->tchar2utf(nativeSrc, -1, errorPtr); } return TCL_ERROR; } @@ -1799,7 +1799,7 @@ ConvertFileNameFormat( */ Tcl_DStringInit(&dsTemp); - Tcl_WinTCharToUtf(nativeName, -1, &dsTemp); + tclWinProcs->tchar2utf(nativeName, -1, &dsTemp); /* * Deal with issues of tildes being absolute. diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 57a9aef..9522c52 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.103 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.104 2010/02/15 23:10:47 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -667,7 +667,7 @@ WinReadLinkDirectory( } } - Tcl_WinTCharToUtf((const char *) + tclWinProcs->tchar2utf((const char *) reparseBuffer->MountPointReparseBuffer.PathBuffer, (int) reparseBuffer->MountPointReparseBuffer .SubstituteNameLength, &ds); @@ -1083,7 +1083,7 @@ TclpMatchInDirectory( attr = data.a.dwFileAttributes; } - utfname = Tcl_WinTCharToUtf(native, -1, &ds); + utfname = tclWinProcs->tchar2utf(native, -1, &ds); if (!matchSpecialDots) { /* @@ -1858,7 +1858,7 @@ TclpObjChdir( * Cygwin chdir only groks POSIX path. */ - path = Tcl_WinTCharToUtf(nativePath, -1, &ds); + path = tclWinProcs->tchar2utf(nativePath, -1, &ds); cygwin_conv_to_posix_path(path, posixPath); result = (chdir(posixPath) == 0 ? 1 : 0); Tcl_DStringFree(&ds); @@ -1970,7 +1970,7 @@ TclpGetCwd( && (native[2] == '\\') && (native[3] == '\\')) { native += 2; } - Tcl_WinTCharToUtf((TCHAR *) native, -1, bufferPtr); + tclWinProcs->tchar2utf((TCHAR *) native, -1, bufferPtr); } else { char *native; @@ -1979,7 +1979,7 @@ TclpGetCwd( && (native[2] == '\\') && (native[3] == '\\')) { native += 2; } - Tcl_WinTCharToUtf((TCHAR *) native, -1, bufferPtr); + tclWinProcs->tchar2utf((TCHAR *) native, -1, bufferPtr); } /* @@ -2204,7 +2204,7 @@ NativeDev( tclWinProcs->getFullPathNameProc(nativePath, MAX_PATH, nativeFullPath, &nativePart); - fullPath = Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds); + fullPath = tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds); if ((fullPath[0] == '\\') && (fullPath[1] == '\\')) { const char *p; @@ -2523,7 +2523,7 @@ TclpFilesystemPathType( Tcl_DString ds; Tcl_Obj *objPtr; - Tcl_WinTCharToUtf((const char *) volType, -1, &ds); + tclWinProcs->tchar2utf((const char *) volType, -1, &ds); objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); @@ -2976,7 +2976,7 @@ TclpObjNormalizePath( Tcl_DString dsTemp; - Tcl_WinTCharToUtf(Tcl_DStringValue(&dsNorm), + tclWinProcs->tchar2utf(Tcl_DStringValue(&dsNorm), Tcl_DStringLength(&dsNorm), &dsTemp); nextCheckpoint = Tcl_DStringLength(&dsTemp); if (*lastValidPathEnd != 0) { @@ -3154,7 +3154,7 @@ TclpNativeToNormalized( int len; char *copy, *p; - Tcl_WinTCharToUtf((const char *) clientData, -1, &ds); + tclWinProcs->tchar2utf((const char *) clientData, -1, &ds); copy = Tcl_DStringValue(&ds); len = Tcl_DStringLength(&ds); diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 7e33234..9115eaa 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.84 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.85 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -555,7 +555,7 @@ TclpSetVariables( if (tclWinProcs->getUserName((LPTSTR)szUserName, &cchUserNameLen) != 0) { int cbUserNameLen = cchUserNameLen - 1; if (tclWinProcs->useWide) cbUserNameLen *= sizeof(WCHAR); - Tcl_WinTCharToUtf((LPTSTR)szUserName, cbUserNameLen, &ds); + tclWinProcs->tchar2utf((LPTSTR)szUserName, cbUserNameLen, &ds); } } Tcl_SetVar2(interp, "tcl_platform", "user", Tcl_DStringValue(&ds), diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index b7dddaa..5d97915 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.75 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.76 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1417,7 +1417,7 @@ ApplicationType( if ((attr == 0xffffffff) || (attr & FILE_ATTRIBUTE_DIRECTORY)) { continue; } - strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds)); + strcpy(fullName, tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); ext = strrchr(fullName, '.'); @@ -1508,7 +1508,7 @@ ApplicationType( tclWinProcs->getShortPathNameProc((TCHAR *) nativeFullPath, nativeFullPath, MAX_PATH); - strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds)); + strcpy(fullName, tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); } return applType; diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 457ca80..933523a 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.68 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.69 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -2432,7 +2432,7 @@ InitializeHostName( * Convert string from native to UTF then change to lowercase. */ - Tcl_UtfToLower(Tcl_WinTCharToUtf((TCHAR *) wbuf, -1, &ds)); + Tcl_UtfToLower((char *) tclWinProcs->tchar2utf((TCHAR *) wbuf, -1, &ds)); } else { Tcl_DStringInit(&ds); -- cgit v0.12 From 85d00a55b79e0beebaf4875584cf7391abd05392 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Feb 2010 14:09:06 +0000 Subject: Update literal table to use FNV hash function. --- ChangeLog | 43 +++++++++-------- generic/tclLiteral.c | 132 +++++++++++++++++++++++++++------------------------ 2 files changed, 93 insertions(+), 82 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e47e77..9b1b4d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,24 +1,29 @@ +2010-02-16 Donal K. Fellows + + * generic/tclLiteral.c (HashString): Missed updating to FNV in one + place; the literal table (a copy of the hash table code...) + 2010-02-15 Jan Nijtmans - * tools/genStubs.tcl reverted earlier rename from tcl*Stubs to - * generic/tclBasic.c tcl*ConstStubs, it's not necessary at all. - * generic/tclOO.c - * generic/tclTomMathInterface.c - * generic/tclStubInit.c (regenerated) - * generic/tclOOStubInit.c (regenerated) - * generic/tclEnsemble.c Fix signed-unsigned mismatch - * win/tclWinInt.h make tclWinProcs "const" - * win/tclWin32Dll.c - * win/tclWinFCmd.c Eliminate all internal Tcl_WinUtfToTChar - * win/tclWinFile.c and Tcl_WinTCharToUtf calls, needed - * win/tclWinInit.c for mslu support. - * win/tclWinLoad.c - * win/tclWinPipe.c - * win/tclWinSerial.c - * win/.cvsignore - * compat/unicows/readme.txt Add first part of mslu support - * compat/unicows/license.txt See [Feature Request #2819611] - * compat/unicows/unicows.lib + * tools/genStubs.tcl: Reverted earlier rename from tcl*Stubs to + * generic/tclBasic.c: tcl*ConstStubs, it's not necessary at all. + * generic/tclOO.c: + * generic/tclTomMathInterface.c: + * generic/tclStubInit.c: (regenerated) + * generic/tclOOStubInit.c: (regenerated) + * generic/tclEnsemble.c:Fix signed-unsigned mismatch + * win/tclWinInt.h: make tclWinProcs "const" + * win/tclWin32Dll.c: + * win/tclWinFCmd.c: Eliminate all internal Tcl_WinUtfToTChar + * win/tclWinFile.c: and Tcl_WinTCharToUtf calls, needed + * win/tclWinInit.c: for mslu support. + * win/tclWinLoad.c: + * win/tclWinPipe.c: + * win/tclWinSerial.c: + * win/.cvsignore: + * compat/unicows/readme.txt: [FRQ 2819611]: Add first part of MSLU + * compat/unicows/license.txt: support. + * compat/unicows/unicows.lib: 2010-02-15 Donal K. Fellows diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 10a18f8..cda9caf 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.37 2009/10/28 21:03:19 dgp Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.38 2010/02/16 14:09:07 dkf Exp $ */ #include "tclInt.h" @@ -33,7 +33,7 @@ static int AddLocalLiteralEntry(CompileEnv *envPtr, Tcl_Obj *objPtr, int localHash); static void ExpandLocalLiteralArray(CompileEnv *envPtr); -static unsigned int HashString(const char *bytes, int length); +static unsigned HashString(const char *bytes, int length); static void RebuildLiteralTable(LiteralTable *tablePtr); /* @@ -61,7 +61,7 @@ TclInitLiteralTable( * supplied by the caller. */ { #if (TCL_SMALL_HASH_TABLE != 4) - Tcl_Panic("TclInitLiteralTable: TCL_SMALL_HASH_TABLE is %d, not 4", + Tcl_Panic("%s: TCL_SMALL_HASH_TABLE is %d, not 4", "TclInitLiteralTable", TCL_SMALL_HASH_TABLE); #endif @@ -99,12 +99,12 @@ TclCleanupLiteralTable( * cleaned. */ { int i; - LiteralEntry* entryPtr; /* Pointer to the current entry in the hash + LiteralEntry *entryPtr; /* Pointer to the current entry in the hash * table of literals. */ - LiteralEntry* nextPtr; /* Pointer to the next entry in the bucket. */ - Tcl_Obj* objPtr; /* Pointer to a literal object whose internal + LiteralEntry *nextPtr; /* Pointer to the next entry in the bucket. */ + Tcl_Obj *objPtr; /* Pointer to a literal object whose internal * rep is being freed. */ - const Tcl_ObjType* typePtr; /* Pointer to the object's type. */ + const Tcl_ObjType *typePtr; /* Pointer to the object's type. */ int didOne; /* Flag for whether we've removed a literal in * the current bucket. */ @@ -131,7 +131,8 @@ TclCleanupLiteralTable( typePtr = objPtr->typePtr; if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) { if (objPtr->bytes == NULL) { - Tcl_Panic("literal without a string rep"); + Tcl_Panic("%s: literal without a string rep", + "TclCleanupLiteralTable"); } objPtr->typePtr = NULL; typePtr->freeIntRepProc(objPtr); @@ -243,9 +244,10 @@ TclDeleteLiteralTable( Tcl_Obj * TclCreateLiteral( Interp *iPtr, - char *bytes, - int length, - unsigned int hash, /* The string's hash. If -1, it will be + char *bytes, /* The start of the string. Note that this is + * not a NUL-terminated string. */ + int length, /* Number of bytes in the string. */ + unsigned hash, /* The string's hash. If -1, it will be * computed here. */ int *newPtr, Namespace *nsPtr, @@ -312,8 +314,8 @@ TclCreateLiteral( #ifdef TCL_COMPILE_DEBUG if (TclLookupLiteralEntry((Tcl_Interp *) iPtr, objPtr) != NULL) { - Tcl_Panic("TclRegisterLiteral: literal \"%.*s\" found globally but shouldn't be", - (length>60? 60 : length), bytes); + Tcl_Panic("%s: literal \"%.*s\" found globally but shouldn't be", + "TclRegisterLiteral" (length>60? 60 : length), bytes); } #endif @@ -350,8 +352,8 @@ TclCreateLiteral( } } if (!found) { - Tcl_Panic("TclRegisterLiteral: literal \"%.*s\" wasn't global", - (length>60? 60 : length), bytes); + Tcl_Panic("%s: literal \"%.*s\" wasn't global", + "TclRegisterLiteral", (length>60? 60 : length), bytes); } } #endif /*TCL_COMPILE_DEBUG*/ @@ -414,10 +416,10 @@ TclRegisterLiteral( * namespaces. */ { Interp *iPtr = envPtr->iPtr; - LiteralTable *localTablePtr = &(envPtr->localLitTable); + LiteralTable *localTablePtr = &envPtr->localLitTable; LiteralEntry *globalPtr, *localPtr; Tcl_Obj *objPtr; - unsigned int hash; + unsigned hash; int localHash, objIndex, new; Namespace *nsPtr; @@ -467,14 +469,15 @@ TclRegisterLiteral( * Is it in the interpreter's global literal table? If not, create it. */ - objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &new, nsPtr, - flags, &globalPtr); + objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &new, nsPtr, flags, + &globalPtr); objIndex = AddLocalLiteralEntry(envPtr, objPtr, localHash); #ifdef TCL_COMPILE_DEBUG if (globalPtr->refCount < 1) { - Tcl_Panic("TclRegisterLiteral: global literal \"%.*s\" had bad refCount %d", - (length>60? 60 : length), bytes, globalPtr->refCount); + Tcl_Panic("%s: global literal \"%.*s\" had bad refCount %d", + "TclRegisterLiteral", (length>60? 60 : length), bytes, + globalPtr->refCount); } TclVerifyLocalLiteralTable(envPtr); #endif /*TCL_COMPILE_DEBUG*/ @@ -507,7 +510,7 @@ TclLookupLiteralEntry( * TclRegisterLiteral. */ { Interp *iPtr = (Interp *) interp; - LiteralTable *globalTablePtr = &(iPtr->literalTable); + LiteralTable *globalTablePtr = &iPtr->literalTable; register LiteralEntry *entryPtr; const char *bytes; int length, globalHash; @@ -553,12 +556,12 @@ TclHideLiteral( * array. */ { LiteralEntry **nextPtrPtr, *entryPtr, *lPtr; - LiteralTable *localTablePtr = &(envPtr->localLitTable); + LiteralTable *localTablePtr = &envPtr->localLitTable; int localHash, length; const char *bytes; Tcl_Obj *newObjPtr; - lPtr = &(envPtr->literalArrayPtr[index]); + lPtr = &envPtr->literalArrayPtr[index]; /* * To avoid unwanted sharing we need to copy the object and remove it from @@ -626,7 +629,7 @@ TclAddLiteralObj( objIndex = envPtr->literalArrayNext; envPtr->literalArrayNext++; - lPtr = &(envPtr->literalArrayPtr[objIndex]); + lPtr = &envPtr->literalArrayPtr[objIndex]; lPtr->objPtr = objPtr; Tcl_IncrRefCount(objPtr); lPtr->refCount = -1; /* i.e., unused */ @@ -664,7 +667,7 @@ AddLocalLiteralEntry( Tcl_Obj *objPtr, /* The literal to add to the CompileEnv. */ int localHash) /* Hash value for the literal's string. */ { - register LiteralTable *localTablePtr = &(envPtr->localLitTable); + register LiteralTable *localTablePtr = &envPtr->localLitTable; LiteralEntry *localPtr; int objIndex; @@ -705,8 +708,8 @@ AddLocalLiteralEntry( if (!found) { bytes = Tcl_GetStringFromObj(objPtr, &length); - Tcl_Panic("AddLocalLiteralEntry: literal \"%.*s\" wasn't found locally", - (length>60? 60 : length), bytes); + Tcl_Panic("%s: literal \"%.*s\" wasn't found locally", + "AddLocalLiteralEntry", (length>60? 60 : length), bytes); } } #endif /*TCL_COMPILE_DEBUG*/ @@ -744,7 +747,7 @@ ExpandLocalLiteralArray( * 0 and (envPtr->literalArrayNext - 1) [inclusive]. */ - LiteralTable *localTablePtr = &(envPtr->localLitTable); + LiteralTable *localTablePtr = &envPtr->localLitTable; int currElems = envPtr->literalArrayNext; size_t currBytes = (currElems * sizeof(LiteralEntry)); LiteralEntry *currArrayPtr = envPtr->literalArrayPtr; @@ -752,13 +755,14 @@ ExpandLocalLiteralArray( int i; if (envPtr->mallocedLiteralArray) { - newArrayPtr = (LiteralEntry *) ckrealloc( - (char *)currArrayPtr, 2 * currBytes); + newArrayPtr = (LiteralEntry *) + ckrealloc((char *)currArrayPtr, 2 * currBytes); } else { /* * envPtr->literalArrayPtr isn't a ckalloc'd pointer, so we must - * code a ckrealloc equivalent for ourselves + * code a ckrealloc equivalent for ourselves. */ + newArrayPtr = (LiteralEntry *) ckalloc(2 * currBytes); memcpy(newArrayPtr, currArrayPtr, currBytes); envPtr->mallocedLiteralArray = 1; @@ -817,7 +821,7 @@ TclReleaseLiteral( * TclRegisterLiteral. */ { Interp *iPtr = (Interp *) interp; - LiteralTable *globalTablePtr = &(iPtr->literalTable); + LiteralTable *globalTablePtr = &iPtr->literalTable; register LiteralEntry *entryPtr, *prevPtr; const char *bytes; int length, index; @@ -885,33 +889,28 @@ TclReleaseLiteral( *---------------------------------------------------------------------- */ -static unsigned int +static unsigned HashString( register const char *bytes, /* String for which to compute hash value. */ int length) /* Number of bytes in the string. */ { - register unsigned int result; - register int i; + unsigned result = 0x811c9dc5; + const char *last = bytes + length; /* - * I tried a zillion different hash functions and asked many other people - * for advice. Many people had their own favorite functions, all - * different, but no-one had much idea why they were good ones. I chose - * the one below (multiply by 9 and add new character) because of the - * following reasons: + * This is the (32-bit) Fowler/Noll/Vo hash algorithm. This has the + * property of being a reasonably good non-cryptographic hash function for + * short string words, i.e., virtually all names used in practice. It is + * also faster than Tcl's original algorithm on Intel x86, where there is + * a fast built-in multiply assembly instruction. * - * 1. Multiplying by 10 is perfect for keys that are decimal strings, and - * multiplying by 9 is just about as good. - * 2. Times-9 is (shift-left-3) plus (old). This means that each - * character's bits hang around in the low-order bits of the hash value - * for ever, plus they spread fairly rapidly up to the high-order bits - * to fill out the hash value. This seems works well both for decimal - * and non-decimal strings. + * Derived from Public Domain implementation by Landon Curt Noll at: + * http://www.isthe.com/chongo/src/fnv/hash_32.c */ - result = 0; - for (i=0 ; imask); *oldChainPtr = entryPtr->nextPtr; - bucketPtr = &(tablePtr->buckets[index]); + bucketPtr = &tablePtr->buckets[index]; entryPtr->nextPtr = *bucketPtr; *bucketPtr = entryPtr; } @@ -1086,7 +1085,7 @@ TclVerifyLocalLiteralTable( CompileEnv *envPtr) /* Points to CompileEnv whose literal table is * to be validated. */ { - register LiteralTable *localTablePtr = &(envPtr->localLitTable); + register LiteralTable *localTablePtr = &envPtr->localLitTable; register LiteralEntry *localPtr; char *bytes; register int i; @@ -1099,23 +1098,27 @@ TclVerifyLocalLiteralTable( count++; if (localPtr->refCount != -1) { bytes = Tcl_GetStringFromObj(localPtr->objPtr, &length); - Tcl_Panic("TclVerifyLocalLiteralTable: local literal \"%.*s\" had bad refCount %d", + Tcl_Panic("%s: local literal \"%.*s\" had bad refCount %d", + "TclVerifyLocalLiteralTable", (length>60? 60 : length), bytes, localPtr->refCount); } if (TclLookupLiteralEntry((Tcl_Interp *) envPtr->iPtr, localPtr->objPtr) == NULL) { bytes = Tcl_GetStringFromObj(localPtr->objPtr, &length); - Tcl_Panic("TclVerifyLocalLiteralTable: local literal \"%.*s\" is not global", + Tcl_Panic("%s: local literal \"%.*s\" is not global", + "TclVerifyLocalLiteralTable", (length>60? 60 : length), bytes); } if (localPtr->objPtr->bytes == NULL) { - Tcl_Panic("TclVerifyLocalLiteralTable: literal has NULL string rep"); + Tcl_Panic("%s: literal has NULL string rep", + "TclVerifyLocalLiteralTable"); } } } if (count != localTablePtr->numEntries) { - Tcl_Panic("TclVerifyLocalLiteralTable: local literal table had %d entries, should be %d", - count, localTablePtr->numEntries); + Tcl_Panic("%s: local literal table had %d entries, should be %d", + "TclVerifyLocalLiteralTable", count, + localTablePtr->numEntries); } } @@ -1140,7 +1143,7 @@ TclVerifyGlobalLiteralTable( Interp *iPtr) /* Points to interpreter whose global literal * table is to be validated. */ { - register LiteralTable *globalTablePtr = &(iPtr->literalTable); + register LiteralTable *globalTablePtr = &iPtr->literalTable; register LiteralEntry *globalPtr; char *bytes; register int i; @@ -1153,17 +1156,20 @@ TclVerifyGlobalLiteralTable( count++; if (globalPtr->refCount < 1) { bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length); - Tcl_Panic("TclVerifyGlobalLiteralTable: global literal \"%.*s\" had bad refCount %d", + Tcl_Panic("%s: global literal \"%.*s\" had bad refCount %d", + "TclVerifyGlobalLiteralTable", (length>60? 60 : length), bytes, globalPtr->refCount); } if (globalPtr->objPtr->bytes == NULL) { - Tcl_Panic("TclVerifyGlobalLiteralTable: literal has NULL string rep"); + Tcl_Panic("%s: literal has NULL string rep", + "TclVerifyGlobalLiteralTable"); } } } if (count != globalTablePtr->numEntries) { - Tcl_Panic("TclVerifyGlobalLiteralTable: global literal table had %d entries, should be %d", - count, globalTablePtr->numEntries); + Tcl_Panic("%s: global literal table had %d entries, should be %d", + "TclVerifyGlobalLiteralTable", count, + globalTablePtr->numEntries); } } #endif /*TCL_COMPILE_DEBUG*/ -- cgit v0.12 From c0764272261c0f8e727f1c2a5e1d1acff40454f3 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Feb 2010 16:01:32 +0000 Subject: Do not assume that all unix systems have the POSIX blkcnt_t type, since OpenBSD apparently does not. --- ChangeLog | 4 ++++ generic/tclIOUtil.c | 6 +++++- unix/configure.in | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b1b4d7..568fba3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-02-16 Donal K. Fellows + * unix/configure.in, generic/tclIOUtil.c (Tcl_Stat): Updated so that + we do not assume that all unix systems have the POSIX blkcnt_t type, + since OpenBSD apparently does not. + * generic/tclLiteral.c (HashString): Missed updating to FNV in one place; the literal table (a copy of the hash table code...) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index a077bab..905b8ca 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.166 2009/12/28 12:55:48 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.167 2010/02/16 16:01:33 dkf Exp $ */ #include "tclInt.h" @@ -292,7 +292,11 @@ Tcl_Stat( oldStyleBuf->st_blksize = buf.st_blksize; #endif #ifdef HAVE_STRUCT_STAT_ST_BLOCKS +#ifdef HAVE_BLKCNT_T oldStyleBuf->st_blocks = (blkcnt_t) buf.st_blocks; +#else + oldStyleBuf->st_blocks = (unsigned long) buf.st_blocks; +#endif #endif } return ret; diff --git a/unix/configure.in b/unix/configure.in index 17e35ed..d2b62a2 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.209 2009/12/28 12:55:48 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.210 2010/02/16 16:01:33 dkf Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -279,10 +279,12 @@ SC_TIME_HANDLER #-------------------------------------------------------------------- # Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But -# we might be able to use fstatfs instead. +# we might be able to use fstatfs instead. Some systems (OpenBSD?) also +# lack blkcnt_t. #-------------------------------------------------------------------- AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize]) +AC_CHECK_TYPES([blkcnt_t]) AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])]) #-------------------------------------------------------------------- -- cgit v0.12 From 10bec0ba7094db117387293426005505faa8ac1b Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Feb 2010 16:02:02 +0000 Subject: regen --- unix/configure | 12619 +++++++++++++++++++++++++++---------------------------- 1 file changed, 6287 insertions(+), 6332 deletions(-) diff --git a/unix/configure b/unix/configure index 2ed6bae..8622d91 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,185 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX EXE_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +ZLIB_DIR +ZLIB_OBJS +ZLIB_SRCS +ZLIB_INCLUDE +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +LDAIX_SRC +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +EXE_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +DLL_INSTALL_DIR +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +PKG_CFG_ARGS +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +PACKAGE_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +784,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +847,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +912,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +942,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1016,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1078,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1122,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1142,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1181,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1279,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1296,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -876,128 +1362,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1469,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1483,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1505,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1515,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1537,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1548,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1562,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1600,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1633,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1681,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1707,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1720,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1749,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1766,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1790,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1371,24 +1840,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1397,36 +1865,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1449,8 +1918,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1463,32 +1932,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1501,36 +1972,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1543,74 +2029,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1624,7 +2070,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1635,6 +2081,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1652,22 +2099,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1680,36 +2128,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1722,29 +2172,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1757,21 +2223,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1796,47 +2276,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1848,19 +2358,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1879,22 +2391,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1905,9 +2422,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1921,14 +2437,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1948,14 +2464,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1973,12 +2495,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2001,50 +2523,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2060,38 +2581,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2107,12 +2708,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2146,12 +2747,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2166,266 +2772,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2458,8 +2914,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2493,24 +2949,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2519,9 +2973,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2531,24 +2986,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2559,6 +3012,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2576,8 +3030,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2600,24 +3054,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2626,9 +3078,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2638,24 +3091,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2666,6 +3117,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2688,23 +3140,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2728,35 +3327,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2812,6 +3407,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2831,18 +3427,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2855,12 +3460,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2883,9 +3490,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2899,38 +3506,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2942,8 +3546,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2983,39 +3587,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3026,17 +3627,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3047,41 +3648,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3090,24 +3687,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3115,9 +3710,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3141,25 +3737,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3174,17 +3763,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3195,41 +3784,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3238,24 +3823,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3263,9 +3846,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3289,25 +3873,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3322,17 +3899,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3343,41 +3920,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3386,24 +3959,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3411,9 +3982,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3437,25 +4009,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3474,17 +4039,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3495,41 +4060,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3538,24 +4099,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3563,9 +4122,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3589,25 +4149,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3676,17 +4229,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3697,41 +4250,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3740,24 +4289,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3765,9 +4312,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3791,25 +4339,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3866,17 +4407,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3887,41 +4428,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3930,24 +4467,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3955,9 +4490,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3981,25 +4517,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4014,17 +4543,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4035,41 +4564,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4078,24 +4603,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4103,9 +4626,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4129,25 +4653,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4167,18 +4684,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4189,41 +4707,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4232,24 +4746,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4257,9 +4769,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4283,25 +4796,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4321,8 +4828,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4344,39 +4851,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4387,13 +4890,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4425,8 +4928,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4439,56 +4942,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4501,8 +5001,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4515,56 +5015,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4577,8 +5074,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4591,56 +5088,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4651,8 +5145,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4665,56 +5159,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4722,8 +5213,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4736,56 +5227,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4810,9 +5298,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4838,68 +5326,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4912,8 +5392,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4921,15 +5401,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6; } fi @@ -4941,11 +5421,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4974,8 +5454,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5002,76 +5482,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5088,46 +5559,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5138,8 +5606,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5156,62 +5624,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5222,41 +5687,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5265,24 +5726,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5290,9 +5749,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5316,25 +5776,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5367,8 +5820,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5395,68 +5848,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5464,8 +5908,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5492,73 +5936,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5571,56 +6006,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5633,8 +6065,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5661,68 +6093,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5730,8 +6153,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5758,73 +6181,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5837,56 +6251,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5899,15 +6310,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5917,12 +6328,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5938,17 +6349,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5959,41 +6370,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6002,24 +6409,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6027,9 +6432,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6053,31 +6459,24 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then - echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6089,50 +6488,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +typedef gz_header ac__type_new_; int main () { -if ((gz_header *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (gz_header)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_gz_header=no + ac_cv_type_gz_header=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } if test $ac_cv_type_gz_header = yes; then : else @@ -6147,13 +6543,12 @@ fi if test $zlib_ok = yes; then - echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6161,115 +6556,73 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -deflateSetHeader (); +return deflateSetHeader (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_deflateSetHeader=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_deflateSetHeader" = no; then - for ac_lib in z; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflateSetHeader (); -int -main () -{ -deflateSetHeader (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + : +else + ac_cv_search_deflateSetHeader=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 -if test "$ac_cv_search_deflateSetHeader" != no; then - test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else @@ -6307,8 +6660,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6321,32 +6674,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6359,27 +6714,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6388,31 +6757,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6422,8 +6791,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6447,40 +6816,37 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6494,24 +6860,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6538,16 +6904,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6560,56 +6926,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6653,8 +7016,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6667,25 +7030,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6717,8 +7082,8 @@ fi CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6797,12 +7162,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6822,8 +7185,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6836,56 +7199,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6917,8 +7277,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6931,56 +7291,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7036,8 +7393,8 @@ fi SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" - echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 -echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 +echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; } if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7050,56 +7407,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_network_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_network_inet_ntoa=no + ac_cv_lib_network_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; } if test $ac_cv_lib_network_inet_ntoa = yes; then LIBS="$LIBS -lnetwork" fi @@ -7129,8 +7483,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7143,56 +7497,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7266,8 +7617,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7280,56 +7631,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7357,12 +7705,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7379,12 +7725,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7421,12 +7765,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7485,8 +7827,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7509,40 +7851,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7631,8 +7970,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7658,8 +7997,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7691,8 +8030,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7718,8 +8057,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7813,8 +8152,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7837,40 +8176,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7879,8 +8215,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7903,40 +8239,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -7962,8 +8295,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7986,40 +8319,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8038,8 +8368,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8062,40 +8392,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8122,21 +8449,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8170,35 +8497,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8209,8 +8533,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8226,8 +8550,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8251,42 +8575,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8622,25 +8943,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8651,41 +8972,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8694,24 +9011,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8719,9 +9034,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8745,25 +9061,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8772,8 +9081,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8848,8 +9157,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8872,40 +9181,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -8940,13 +9246,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9106,22 +9412,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9131,8 +9437,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -9167,11 +9473,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -9192,8 +9498,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9215,33 +9521,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9258,37 +9559,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9320,33 +9618,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9363,37 +9656,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9425,33 +9715,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9468,37 +9753,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9511,17 +9793,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9544,35 +9826,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9594,34 +9872,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9630,20 +9905,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9665,38 +9940,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9705,8 +9976,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9728,38 +9999,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9773,9 +10040,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9801,68 +10068,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9871,8 +10130,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9894,35 +10153,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -9933,11 +10188,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -9947,8 +10202,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9965,7 +10220,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -9974,27 +10230,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10017,40 +10268,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10060,11 +10307,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10075,27 +10322,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10111,8 +10353,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10120,27 +10364,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10153,13 +10411,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -10188,9 +10449,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10216,68 +10477,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10302,9 +10555,9 @@ done for ac_func in mkstemp opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10330,88 +10583,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10438,68 +10681,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10510,8 +10744,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10538,68 +10772,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10610,8 +10835,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10638,68 +10863,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10710,8 +10926,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10738,68 +10954,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10817,8 +11024,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10845,68 +11052,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10918,8 +11116,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10946,72 +11144,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11039,38 +11228,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11088,8 +11273,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11116,72 +11301,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11212,38 +11388,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11252,8 +11424,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11284,38 +11456,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11335,8 +11503,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11363,72 +11531,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11459,38 +11618,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11499,8 +11654,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11531,38 +11686,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11582,8 +11733,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11610,72 +11761,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11706,38 +11848,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11746,8 +11884,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11778,38 +11916,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11829,8 +11963,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11857,72 +11991,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11953,38 +12078,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -11993,8 +12114,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12025,38 +12146,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12109,8 +12226,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12137,72 +12254,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12233,38 +12341,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12273,8 +12377,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12305,38 +12409,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12345,8 +12445,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12375,38 +12475,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12427,8 +12523,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12455,72 +12551,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12554,38 +12641,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12594,8 +12677,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12629,38 +12712,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12694,18 +12773,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12716,41 +12796,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12759,24 +12835,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12784,9 +12858,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12810,25 +12885,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12840,8 +12909,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12869,13 +12938,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12888,8 +12966,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12913,13 +12993,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12932,8 +13021,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -12959,13 +13050,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12978,8 +13078,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -13007,13 +13109,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13026,8 +13137,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13054,13 +13167,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13073,8 +13195,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13102,13 +13226,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13121,12 +13254,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13156,8 +13291,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13178,42 +13313,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13236,8 +13367,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13264,18 +13395,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13286,41 +13418,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13329,24 +13457,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13354,9 +13480,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13380,25 +13507,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13410,8 +13531,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13435,38 +13556,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13482,9 +13599,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13510,68 +13627,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13581,8 +13690,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13603,38 +13712,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13643,8 +13748,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13665,38 +13770,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13709,8 +13810,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13733,38 +13834,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13775,8 +13872,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13799,38 +13896,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13843,11 +13936,12 @@ _ACEOF #-------------------------------------------------------------------- # Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But -# we might be able to use fstatfs instead. +# we might be able to use fstatfs instead. Some systems (OpenBSD?) also +# lack blkcnt_t. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13869,33 +13963,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13913,40 +14002,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blocks=no + ac_cv_member_struct_stat_st_blocks=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } if test $ac_cv_member_struct_stat_st_blocks = yes; then cat >>confdefs.h <<_ACEOF @@ -13955,8 +14041,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13978,33 +14064,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14022,40 +14103,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14065,8 +14143,70 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for blkcnt_t" >&5 +echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6; } +if test "${ac_cv_type_blkcnt_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef blkcnt_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_blkcnt_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_blkcnt_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 +echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6; } +if test $ac_cv_type_blkcnt_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_BLKCNT_T 1 +_ACEOF + + +fi + +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14093,68 +14233,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -14171,8 +14302,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14191,9 +14322,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14209,9 +14340,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14219,13 +14350,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14238,17 +14378,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14259,8 +14399,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14287,68 +14427,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14372,8 +14503,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14400,68 +14531,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14469,8 +14591,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14489,13 +14611,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14508,11 +14639,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14520,12 +14653,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14539,8 +14670,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14567,68 +14698,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14636,8 +14758,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14657,13 +14779,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14676,11 +14807,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14688,12 +14821,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14706,8 +14837,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14734,68 +14865,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14803,8 +14925,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14824,13 +14946,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14843,11 +14974,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14855,12 +14988,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14875,8 +15006,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14903,68 +15034,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -14972,8 +15094,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15009,13 +15131,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15028,18 +15159,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15057,8 +15188,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15069,50 +15200,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -15123,8 +15251,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15135,50 +15263,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -15189,8 +15314,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15201,62 +15326,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15278,8 +15400,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15294,8 +15416,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15321,38 +15443,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15361,8 +15479,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15373,50 +15491,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15426,8 +15541,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15452,40 +15567,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15496,8 +15607,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15508,50 +15619,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15561,8 +15669,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15588,40 +15696,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15640,8 +15744,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15668,68 +15772,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15749,8 +15844,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15776,39 +15871,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15823,8 +15915,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15851,68 +15943,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -15920,8 +16003,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15934,56 +16017,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -15992,8 +16072,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16006,56 +16086,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16064,12 +16141,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -16086,8 +16161,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16114,68 +16189,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16184,8 +16250,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16212,68 +16278,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16287,8 +16344,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16311,8 +16368,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16328,8 +16385,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16351,38 +16408,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16390,8 +16443,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16415,38 +16468,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16459,8 +16508,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16495,13 +16544,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16514,11 +16572,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16532,28 +16592,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16564,41 +16624,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16607,24 +16663,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16632,9 +16686,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16658,25 +16713,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16687,8 +16735,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16710,39 +16758,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16751,8 +16795,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16765,9 +16809,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16793,68 +16837,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16868,8 +16904,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16892,39 +16928,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16942,9 +16975,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16970,68 +17003,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17044,18 +17069,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17066,41 +17092,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17109,24 +17131,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17134,9 +17154,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17160,25 +17181,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17194,9 +17209,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17222,68 +17237,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17297,18 +17304,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17319,41 +17327,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17362,24 +17366,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17387,9 +17389,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17413,25 +17416,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17447,9 +17444,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17475,68 +17472,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17549,9 +17538,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17577,68 +17566,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17672,18 +17653,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17694,41 +17676,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17737,24 +17715,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17762,9 +17738,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17788,25 +17765,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17819,8 +17790,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17851,40 +17822,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17892,8 +17860,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 -echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 +echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6; } if test "${tcl_cv_cc_darwin_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17925,39 +17893,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_darwin_c_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_darwin_c_source=no + tcl_cv_cc_darwin_c_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 -echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 +echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6; } if test $tcl_cv_cc_darwin_c_source = yes; then cat >>confdefs.h <<\_ACEOF @@ -17978,8 +17942,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18008,39 +17972,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -18060,18 +18021,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18082,41 +18044,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18125,24 +18083,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18150,9 +18106,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18176,25 +18133,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18210,18 +18161,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18232,41 +18184,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18275,24 +18223,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18300,9 +18246,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18326,25 +18273,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18357,8 +18298,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18385,12 +18326,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18403,8 +18344,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18412,27 +18353,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18440,8 +18381,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18449,24 +18390,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18490,8 +18431,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18504,8 +18445,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18513,26 +18454,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18543,41 +18484,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18586,24 +18523,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18611,9 +18546,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18637,25 +18573,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18669,8 +18598,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18686,31 +18615,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18734,8 +18664,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18764,15 +18694,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18786,16 +18716,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18807,7 +18737,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18820,7 +18750,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -18998,7 +18928,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -19018,39 +18948,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -19059,52 +19008,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -19133,17 +19066,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19153,8 +19114,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -19168,18 +19164,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19187,159 +19184,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19348,7 +19306,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19357,31 +19336,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19389,30 +19351,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19420,7 +19371,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19434,18 +19385,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19456,60 +19409,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19525,41 +19460,53 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19570,531 +19517,539 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@ZLIB_DIR@,$ZLIB_DIR,;t t -s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t -s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t -s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@LDAIX_SRC@,$LDAIX_SRC,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@EXE_SUFFIX@,$EXE_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +ZLIB_DIR!$ZLIB_DIR$ac_delim +ZLIB_OBJS!$ZLIB_OBJS$ac_delim +ZLIB_SRCS!$ZLIB_SRCS$ac_delim +ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +LDAIX_SRC!$LDAIX_SRC$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +EXE_SUFFIX!$EXE_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +DLL_INSTALL_DIR!$DLL_INSTALL_DIR$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +PACKAGE_DIR!$PACKAGE_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 3d8722817cac3927861f8c8179a25294d67422d8 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 16 Feb 2010 16:30:52 +0000 Subject: Small fixes, namely: Move some related pieces (e.g., for encoding handling) closer together Update comments to add more visual separation between bits and pieces Put parentheses round negative constants --- generic/tcl.h | 283 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 158 insertions(+), 125 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index c69dd3e..5420c7b 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.301 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.302 2010/02/16 16:30:52 dkf Exp $ */ #ifndef _TCL @@ -64,8 +64,9 @@ extern "C" { #define TCL_VERSION "8.6" #define TCL_PATCH_LEVEL "8.6b1.1" - + /* + *---------------------------------------------------------------------------- * The following definitions set up the proper options for Windows compilers. * We use this method because there is no autoconf equivalent. */ @@ -141,6 +142,7 @@ extern "C" { #include /* + *---------------------------------------------------------------------------- * Support for functions with a variable number of arguments. * * The following TCL_VARARGS* macros are to support old extensions @@ -158,6 +160,7 @@ extern "C" { #endif /* + *---------------------------------------------------------------------------- * Macros used to declare a function to be exported by a DLL. Used by Windows, * maps to no-op declarations on non-Windows systems. The default build on * windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be @@ -288,6 +291,7 @@ extern "C" { #endif /* + *---------------------------------------------------------------------------- * The following code is copied from winnt.h. If we don't replicate it here, * then can't be included after tcl.h, since tcl.h also defines * VOID. This block is skipped under Cygwin and Mingw. @@ -439,8 +443,9 @@ typedef struct stat Tcl_StatBuf; # define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val))) # define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val))) #endif /* TCL_WIDE_INT_IS_LONG */ - + /* + *---------------------------------------------------------------------------- * Data structures defined opaquely in this module. The definitions below just * provide dummy types. A few fields are made visible in Tcl_Interp * structures, namely those used for returning a string result from commands. @@ -460,7 +465,8 @@ typedef struct stat Tcl_StatBuf; */ typedef struct Tcl_Interp { - /* TIP #330: Strongly discourage extensions from using the string result. */ + /* TIP #330: Strongly discourage extensions from using the string + * result. */ #ifdef USE_INTERP_RESULT char *result; /* If the last command returned a string * result, this points to it. */ @@ -507,6 +513,7 @@ typedef struct Tcl_Var_ *Tcl_Var; typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream; /* + *---------------------------------------------------------------------------- * Definition of the interface to functions implementing threads. A function * following this definition is given to each call of 'Tcl_CreateThread' and * will be called as the main fuction of the new thread created by that call. @@ -605,6 +612,7 @@ typedef Tcl_StatBuf *Tcl_Stat_; typedef struct stat *Tcl_OldStat_; /* + *---------------------------------------------------------------------------- * When a TCL command returns, the interpreter contains a result from the * command. Programmers are strongly encouraged to use one of the functions * Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's @@ -633,6 +641,7 @@ typedef struct stat *Tcl_OldStat_; #define TCL_RESULT_SIZE 200 /* + *---------------------------------------------------------------------------- * Flags to control what substitutions are performed by Tcl_SubstObj(): */ @@ -665,6 +674,7 @@ typedef struct Tcl_Value { struct Tcl_Obj; /* + *---------------------------------------------------------------------------- * Function types defined by Tcl: */ @@ -726,15 +736,16 @@ typedef void (Tcl_ServiceModeHookProc) (int mode); typedef ClientData (Tcl_InitNotifierProc) (void); typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData); typedef void (Tcl_MainLoopProc) (void); - + /* + *---------------------------------------------------------------------------- * The following structure represents a type of object, which is a particular * internal representation for an object plus a set of functions that provide * standard operations on objects of that type. */ typedef struct Tcl_ObjType { - const char *name; /* Name of the type, e.g. "int". */ + const char *name; /* Name of the type, e.g. "int". */ Tcl_FreeInternalRepProc *freeIntRepProc; /* Called to free any storage for the type's * internal rep. NULL if the internal rep does @@ -808,8 +819,9 @@ typedef struct Tcl_Obj { void Tcl_IncrRefCount(Tcl_Obj *objPtr); void Tcl_DecrRefCount(Tcl_Obj *objPtr); int Tcl_IsShared(Tcl_Obj *objPtr); - + /* + *---------------------------------------------------------------------------- * The following structure contains the state needed by Tcl_SaveResult. No-one * outside of Tcl should access any of these fields. This structure is * typically allocated on the stack. @@ -826,6 +838,7 @@ typedef struct Tcl_SavedResult { } Tcl_SavedResult; /* + *---------------------------------------------------------------------------- * The following definitions support Tcl's namespace facility. Note: the first * five fields must match exactly the fields in a Namespace structure (see * tclInt.h). @@ -850,6 +863,7 @@ typedef struct Tcl_Namespace { } Tcl_Namespace; /* + *---------------------------------------------------------------------------- * The following structure represents a call frame, or activation record. A * call frame defines a naming context for a procedure call: its local scope * (for local variables) and its namespace scope (used for non-local @@ -889,6 +903,7 @@ typedef struct Tcl_CallFrame { } Tcl_CallFrame; /* + *---------------------------------------------------------------------------- * Information about commands that is returned by Tcl_GetCommandInfo and * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command * function while proc is a traditional Tcl argc/argv string-based function. @@ -924,6 +939,7 @@ typedef struct Tcl_CmdInfo { } Tcl_CmdInfo; /* + *---------------------------------------------------------------------------- * The structure defined below is used to hold dynamic strings. The only * fields that clients should use are string and length, accessible via the * macros Tcl_DStringValue and Tcl_DStringLength. @@ -986,6 +1002,7 @@ typedef struct Tcl_DString { #define TCL_EXACT 1 /* + *---------------------------------------------------------------------------- * Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv. * WARNING: these bit choices must not conflict with the bit choices for * evalFlag bits in tclInt.h! @@ -1005,10 +1022,11 @@ typedef struct Tcl_DString { * TCL_EVAL_NOERR: Do no exception reporting at all, just return * as the caller will report. */ -#define TCL_NO_EVAL 0x10000 -#define TCL_EVAL_GLOBAL 0x20000 -#define TCL_EVAL_DIRECT 0x40000 -#define TCL_EVAL_INVOKE 0x80000 + +#define TCL_NO_EVAL 0x010000 +#define TCL_EVAL_GLOBAL 0x020000 +#define TCL_EVAL_DIRECT 0x040000 +#define TCL_EVAL_INVOKE 0x080000 #define TCL_CANCEL_UNWIND 0x100000 #define TCL_EVAL_NOERR 0x200000 @@ -1058,8 +1076,8 @@ typedef struct Tcl_DString { * Flag values passed to command-related functions. */ -#define TCL_TRACE_RENAME 0x2000 -#define TCL_TRACE_DELETE 0x4000 +#define TCL_TRACE_RENAME 0x2000 +#define TCL_TRACE_DELETE 0x4000 #define TCL_ALLOW_INLINE_COMPILATION 0x20000 @@ -1093,8 +1111,9 @@ typedef struct Tcl_DString { #define TCL_LINK_FLOAT 13 #define TCL_LINK_WIDE_UINT 14 #define TCL_LINK_READ_ONLY 0x80 - + /* + *---------------------------------------------------------------------------- * Forward declarations of Tcl_HashTable and related types. */ @@ -1102,7 +1121,7 @@ typedef struct Tcl_HashKeyType Tcl_HashKeyType; typedef struct Tcl_HashTable Tcl_HashTable; typedef struct Tcl_HashEntry Tcl_HashEntry; -typedef unsigned int (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr); +typedef unsigned (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr); typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr); typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr, void *keyPtr); @@ -1244,7 +1263,8 @@ struct Tcl_HashTable { Tcl_HashEntry *(*findProc) (Tcl_HashTable *tablePtr, const char *key); Tcl_HashEntry *(*createProc) (Tcl_HashTable *tablePtr, const char *key, int *newPtr); - const Tcl_HashKeyType *typePtr; /* Type of the keys used in the + const Tcl_HashKeyType *typePtr; + /* Type of the keys used in the * Tcl_HashTable. */ }; @@ -1282,10 +1302,10 @@ typedef struct Tcl_HashSearch { * accessed from the entry and not the behaviour. */ -#define TCL_STRING_KEYS 0 -#define TCL_ONE_WORD_KEYS 1 -#define TCL_CUSTOM_TYPE_KEYS -2 -#define TCL_CUSTOM_PTR_KEYS -1 +#define TCL_STRING_KEYS (0) +#define TCL_ONE_WORD_KEYS (1) +#define TCL_CUSTOM_TYPE_KEYS (-2) +#define TCL_CUSTOM_PTR_KEYS (-1) /* * Structure definition for information used to keep track of searches through @@ -1300,8 +1320,9 @@ typedef struct { * or -1 if search has terminated. */ Tcl_Dict dictionaryPtr; /* Reference to dictionary being searched. */ } Tcl_DictSearch; - + /* + *---------------------------------------------------------------------------- * Flag values to pass to Tcl_DoOneEvent to disable searches for some kinds of * events: */ @@ -1365,6 +1386,7 @@ typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, ClientData clientData); typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData); /* + *---------------------------------------------------------------------------- * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler to * indicate what sorts of events are of interest: */ @@ -1468,7 +1490,7 @@ typedef int (Tcl_DriverTruncateProc) (ClientData instanceData, */ typedef struct Tcl_ChannelType { - const char *typeName; /* The name of the channel type in Tcl + const char *typeName; /* The name of the channel type in Tcl * commands. This storage is owned by channel * type. */ Tcl_ChannelTypeVersion version; @@ -1527,7 +1549,6 @@ typedef struct Tcl_ChannelType { /* Function to call to notify the driver of * thread specific activity for a channel. May * be NULL. */ - /* * Only valid in TCL_CHANNEL_VERSION_5 channels or later. * TIP #208, File Truncation. @@ -1549,6 +1570,7 @@ typedef struct Tcl_ChannelType { * mode. */ /* + *---------------------------------------------------------------------------- * Enum for different types of file paths. */ @@ -1646,14 +1668,14 @@ typedef ClientData (Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr); typedef struct Tcl_FSVersion_ *Tcl_FSVersion; /* - *---------------------------------------------------------------- + *---------------------------------------------------------------------------- * Data structures related to hooking into the filesystem - *---------------------------------------------------------------- */ /* * Filesystem version tag. This was introduced in 8.4. */ + #define TCL_FILESYSTEM_VERSION_1 ((Tcl_FSVersion) 0x1) /* @@ -1832,6 +1854,7 @@ typedef struct Tcl_Filesystem { #define TCL_CREATE_HARD_LINK 0x02 /* + *---------------------------------------------------------------------------- * The following structure represents the Notifier functions that you can * override with the Tcl_SetNotifier call. */ @@ -1846,73 +1869,11 @@ typedef struct Tcl_NotifierProcs { Tcl_AlertNotifierProc *alertNotifierProc; Tcl_ServiceModeHookProc *serviceModeHookProc; } Tcl_NotifierProcs; - -/* - * The following structure represents a user-defined encoding. It collects - * together all the functions that are used by the specific encoding. - */ - -typedef struct Tcl_EncodingType { - const char *encodingName; /* The name of the encoding, e.g. "euc-jp". - * This name is the unique key for this - * encoding type. */ - Tcl_EncodingConvertProc *toUtfProc; - /* Function to convert from external encoding - * into UTF-8. */ - Tcl_EncodingConvertProc *fromUtfProc; - /* Function to convert from UTF-8 into - * external encoding. */ - Tcl_EncodingFreeProc *freeProc; - /* If non-NULL, function to call when this - * encoding is deleted. */ - ClientData clientData; /* Arbitrary value associated with encoding - * type. Passed to conversion functions. */ - int nullSize; /* Number of zero bytes that signify - * end-of-string in this encoding. This number - * is used to determine the source string - * length when the srcLen argument is - * negative. Must be 1 or 2. */ -} Tcl_EncodingType; - -/* - * The following definitions are used as values for the conversion control - * flags argument when converting text from one character set to another: - * - * TCL_ENCODING_START - Signifies that the source buffer is the first - * block in a (potentially multi-block) input - * stream. Tells the conversion function to reset - * to an initial state and perform any - * initialization that needs to occur before the - * first byte is converted. If the source buffer - * contains the entire input stream to be - * converted, this flag should be set. - * TCL_ENCODING_END - Signifies that the source buffer is the last - * block in a (potentially multi-block) input - * stream. Tells the conversion routine to - * perform any finalization that needs to occur - * after the last byte is converted and then to - * reset to an initial state. If the source - * buffer contains the entire input stream to be - * converted, this flag should be set. - * TCL_ENCODING_STOPONERROR - If set, then the converter will return - * immediately upon encountering an invalid byte - * sequence or a source character that has no - * mapping in the target encoding. If clear, then - * the converter will skip the problem, - * substituting one or more "close" characters in - * the destination buffer and then continue to - * convert the source. - */ - -#define TCL_ENCODING_START 0x01 -#define TCL_ENCODING_END 0x02 -#define TCL_ENCODING_STOPONERROR 0x04 - + /* + *---------------------------------------------------------------------------- * The following data structures and declarations are for the new Tcl parser. - */ - -/* + * * For each word of a command, and for each piece of a word such as a variable * reference, one of the following structures is created to describe the * token. @@ -2088,6 +2049,68 @@ typedef struct Tcl_Parse { * for very large commands that don't fit * here. */ } Tcl_Parse; + +/* + *---------------------------------------------------------------------------- + * The following structure represents a user-defined encoding. It collects + * together all the functions that are used by the specific encoding. + */ + +typedef struct Tcl_EncodingType { + const char *encodingName; /* The name of the encoding, e.g. "euc-jp". + * This name is the unique key for this + * encoding type. */ + Tcl_EncodingConvertProc *toUtfProc; + /* Function to convert from external encoding + * into UTF-8. */ + Tcl_EncodingConvertProc *fromUtfProc; + /* Function to convert from UTF-8 into + * external encoding. */ + Tcl_EncodingFreeProc *freeProc; + /* If non-NULL, function to call when this + * encoding is deleted. */ + ClientData clientData; /* Arbitrary value associated with encoding + * type. Passed to conversion functions. */ + int nullSize; /* Number of zero bytes that signify + * end-of-string in this encoding. This number + * is used to determine the source string + * length when the srcLen argument is + * negative. Must be 1 or 2. */ +} Tcl_EncodingType; + +/* + * The following definitions are used as values for the conversion control + * flags argument when converting text from one character set to another: + * + * TCL_ENCODING_START - Signifies that the source buffer is the first + * block in a (potentially multi-block) input + * stream. Tells the conversion function to reset + * to an initial state and perform any + * initialization that needs to occur before the + * first byte is converted. If the source buffer + * contains the entire input stream to be + * converted, this flag should be set. + * TCL_ENCODING_END - Signifies that the source buffer is the last + * block in a (potentially multi-block) input + * stream. Tells the conversion routine to + * perform any finalization that needs to occur + * after the last byte is converted and then to + * reset to an initial state. If the source + * buffer contains the entire input stream to be + * converted, this flag should be set. + * TCL_ENCODING_STOPONERROR - If set, then the converter will return + * immediately upon encountering an invalid byte + * sequence or a source character that has no + * mapping in the target encoding. If clear, then + * the converter will skip the problem, + * substituting one or more "close" characters in + * the destination buffer and then continue to + * convert the source. + */ + +#define TCL_ENCODING_START 0x01 +#define TCL_ENCODING_END 0x02 +#define TCL_ENCODING_STOPONERROR 0x04 /* * The following definitions are the error codes returned by the conversion @@ -2117,10 +2140,10 @@ typedef struct Tcl_Parse { * TCL_ENCODING_STOPONERROR was specified. */ -#define TCL_CONVERT_MULTIBYTE -1 -#define TCL_CONVERT_SYNTAX -2 -#define TCL_CONVERT_UNKNOWN -3 -#define TCL_CONVERT_NOSPACE -4 +#define TCL_CONVERT_MULTIBYTE (-1) +#define TCL_CONVERT_SYNTAX (-2) +#define TCL_CONVERT_UNKNOWN (-3) +#define TCL_CONVERT_NOSPACE (-4) /* * The maximum number of bytes that are necessary to represent a single @@ -2155,8 +2178,9 @@ typedef unsigned int Tcl_UniChar; #else typedef unsigned short Tcl_UniChar; #endif - + /* + *---------------------------------------------------------------------------- * TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to * provide the system with the embedded configuration data. */ @@ -2169,6 +2193,7 @@ typedef struct Tcl_Config { } Tcl_Config; /* + *---------------------------------------------------------------------------- * Flags for TIP#143 limits, detailing which limits are active in an * interpreter. Used for Tcl_{Add,Remove}LimitHandler type argument. */ @@ -2184,6 +2209,11 @@ typedef struct Tcl_Config { typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp); typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData); +/* + *---------------------------------------------------------------------------- + * Override definitions for libtommath. + */ + typedef struct mp_int mp_int; #define MP_INT_DECLARED typedef unsigned int mp_digit; @@ -2194,7 +2224,6 @@ typedef unsigned int mp_digit; * Definitions needed for Tcl_ParseArgvObj routines. * Based on tkArgv.c. * Modifications from the original are copyright (c) Sam Bromley 2006 - *---------------------------------------------------------------------------- */ typedef struct { @@ -2251,7 +2280,6 @@ typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, /* *---------------------------------------------------------------------------- * Definitions needed for Tcl_Zlib routines. [TIP #234] - *---------------------------------------------------------------------------- * * Constants for the format flags describing what sort of data format is * desired/expected for the Tcl_ZlibDeflate, Tcl_ZlibInflate and @@ -2291,6 +2319,15 @@ typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, #define TCL_ZLIB_FINALIZE 4 /* + *---------------------------------------------------------------------------- + * Single public declaration for NRE. + */ + +typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, + int result); + +/* + *---------------------------------------------------------------------------- * The following constant is used to test for older versions of Tcl in the * stubs tables. * @@ -2307,26 +2344,23 @@ typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp, * main library in case an extension is statically linked into an application. */ -const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version, - int exact); -const char * TclTomMathInitializeStubs(Tcl_Interp *interp, - const char *version, int epoch, int revision); - -#ifndef USE_TCL_STUBS +const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version, + int exact); +const char * TclTomMathInitializeStubs(Tcl_Interp *interp, + const char *version, int epoch, int revision); /* * When not using stubs, make it a macro. */ +#ifndef USE_TCL_STUBS #define Tcl_InitStubs(interp, version, exact) \ Tcl_PkgInitStubsCheck(interp, version, exact) - #endif - /* - * TODO - tommath stubs export goes here! - */ - +/* + * TODO - tommath stubs export goes here! + */ /* * Public functions that are not accessible via the stubs table. @@ -2340,15 +2374,9 @@ EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); #endif - -/* - * Single public declaration for NRE. - */ - -typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, - int result); - + /* + *---------------------------------------------------------------------------- * Include the public function declarations that are accessible via the stubs * table. */ @@ -2363,6 +2391,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, #include "tclPlatDecls.h" /* + *---------------------------------------------------------------------------- * The following declarations either map ckalloc and ckfree to malloc and * free, or they map them to functions with all sorts of debugging hooks * defined in tclCkalloc.c. @@ -2458,6 +2487,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, #endif /* TCL_MEM_DEBUG */ /* + *---------------------------------------------------------------------------- * Macros for clients to use to access fields of hash entries: */ @@ -2482,6 +2512,7 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, (*((tablePtr)->createProc))(tablePtr, key, newPtr) /* + *---------------------------------------------------------------------------- * Macros that eliminate the overhead of the thread synchronization functions * when compiling without thread support. */ @@ -2501,11 +2532,12 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, #define Tcl_ConditionFinalize(condPtr) #endif /* TCL_THREADS */ -#ifndef TCL_NO_DEPRECATED - /* - * Deprecated Tcl functions: - */ +/* + *---------------------------------------------------------------------------- + * Deprecated Tcl functions: + */ +#ifndef TCL_NO_DEPRECATED # undef Tcl_EvalObj # define Tcl_EvalObj(interp,objPtr) \ Tcl_EvalObjEx((interp),(objPtr),0) @@ -2513,10 +2545,10 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, # define Tcl_GlobalEvalObj(interp,objPtr) \ Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL) - /* - * These function have been renamed. The old names are deprecated, but we - * define these macros for backwards compatibilty. - */ +/* + * These function have been renamed. The old names are deprecated, but we + * define these macros for backwards compatibilty. + */ # define Tcl_Ckalloc Tcl_Alloc # define Tcl_Ckfree Tcl_Free @@ -2525,9 +2557,10 @@ typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp, # define Tcl_TildeSubst Tcl_TranslateFileName # define panic Tcl_Panic # define panicVA Tcl_PanicVA -#endif +#endif /* !TCL_NO_DEPRECATED */ /* + *---------------------------------------------------------------------------- * Convenience declaration of Tcl_AppInit for backwards compatibility. This * function is not *implemented* by the tcl library, so the storage class is * neither DLLEXPORT nor DLLIMPORT. -- cgit v0.12 From 318332ced5693c3e2995656c7149f52297e4578c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 16 Feb 2010 21:34:30 +0000 Subject: Change order of various struct members, restoring potential binary incompatibility with Tcl 8.5 --- ChangeLog | 5 +++ generic/tclInt.h | 118 ++++++++++++++++++++++++++----------------------------- 2 files changed, 60 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index 568fba3..5d0fad9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-16 Jan Nijtmans + + * generic/tclInt.h: Change order of various struct members, + restoring potential binary incompatibility with Tcl 8.5 + 2010-02-16 Donal K. Fellows * unix/configure.in, generic/tclIOUtil.c (Tcl_Stat): Updated so that diff --git a/generic/tclInt.h b/generic/tclInt.h index 55782ee..9c9a073 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.462 2010/02/15 11:53:44 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.463 2010/02/16 21:34:30 nijtmans Exp $ */ #ifndef _TCLINT @@ -37,13 +37,7 @@ * declaration in tcl.h is needed by stdlib.h in some configurations. */ -#ifdef HAVE_TCL_CONFIG_H -#include "tclConfig.h" -#endif #include "tclPort.h" -#ifndef _TCL -#include "tcl.h" -#endif #include @@ -1206,18 +1200,11 @@ typedef struct CmdFrame { int type; /* Values see below. */ int level; /* Number of frames in stack, prevent O(n) * scan of list. */ - int numLevels; /* Value of interp's numLevels when the frame - * was pushed. */ int *line; /* Lines the words of the command start on. */ int nline; CallFrame *framePtr; /* Procedure activation record, may be * NULL. */ struct CmdFrame *nextPtr; /* Link to calling frame. */ - const struct CFWordBC *litarg; - /* Link to set of literal arguments which have - * ben pushed on the lineLABCPtr stack by - * TclArgumentBCEnter(). These will be removed - * by TclArgumentBCRelease. */ /* * Data needed for Eval vs TEBC * @@ -1265,6 +1252,13 @@ typedef struct CmdFrame { } str; Tcl_Obj *listPtr; /* Tcl_EvalObjEx, cmd list. */ } cmd; + int numLevels; /* Value of interp's numLevels when the frame + * was pushed. */ + const struct CFWordBC *litarg; + /* Link to set of literal arguments which have + * ben pushed on the lineLABCPtr stack by + * TclArgumentBCEnter(). These will be removed + * by TclArgumentBCRelease. */ } CmdFrame; typedef struct CFWord { @@ -1275,7 +1269,6 @@ typedef struct CFWord { } CFWord; typedef struct CFWordBC { - Tcl_Obj *obj; /* Back reference to hashtable key */ CmdFrame *framePtr; /* CmdFrame to access. */ int pc; /* Instruction pointer of a command in * ExtCmdLoc.loc[.] */ @@ -1284,6 +1277,7 @@ typedef struct CFWordBC { struct CFWordBC *prevPtr; /* Previous entry in stack for same Tcl_Obj. */ struct CFWordBC *nextPtr; /* Next entry for same command call. See * CmdFrame litarg field for the list start. */ + Tcl_Obj *obj; /* Back reference to hashtable key */ } CFWordBC; /* @@ -2058,19 +2052,6 @@ typedef struct Interp { * code returned by a channel operation. */ /* - * TIP #285, Script cancellation support. - */ - - Tcl_AsyncHandler asyncCancel; - /* Async handler token for Tcl_CancelEval. */ - Tcl_Obj *asyncCancelMsg; /* Error message set by async cancel handler - * for the propagation of arbitrary Tcl - * errors. This information, if present - * (asyncCancelMsg not NULL), takes precedence - * over the default error messages returned by - * a script cancellation operation. */ - - /* * Source code origin information (TIP #280). */ @@ -2152,17 +2133,24 @@ typedef struct Interp { * tclObj.c and tclThreadAlloc.c */ int *asyncReadyPtr; /* Pointer to the asyncReady indicator for * this interp's thread; see tclAsync.c */ - /* * The pointer to the object system root ekeko. c.f. TIP #257. */ - void *objectFoundation; /* Pointer to the Foundation structure of the * object system, which contains things like * references to key namespaces. See * tclOOInt.h and tclOO.c for real definition * and setup. */ +#ifdef TCL_COMPILE_STATS + /* + * Statistical information about the bytecode compiler and interpreter's + * operation. + */ + + ByteCodeStats stats; /* Holds compilation and execution statistics + * for this interpreter. */ +#endif /* TCL_COMPILE_STATS */ struct TEOV_callback *deferredCallbacks; /* Callbacks that are set previous to a call * to some Eval function but that actually @@ -2170,15 +2158,19 @@ typedef struct Interp { * called - i.e., they should be run *before* * any tailcall is invoked. */ -#ifdef TCL_COMPILE_STATS /* - * Statistical information about the bytecode compiler and interpreter's - * operation. + * TIP #285, Script cancellation support. */ - ByteCodeStats stats; /* Holds compilation and execution statistics - * for this interpreter. */ -#endif /* TCL_COMPILE_STATS */ + Tcl_AsyncHandler asyncCancel; + /* Async handler token for Tcl_CancelEval. */ + Tcl_Obj *asyncCancelMsg; /* Error message set by async cancel handler + * for the propagation of arbitrary Tcl + * errors. This information, if present + * (asyncCancelMsg not NULL), takes precedence + * over the default error messages returned by + * a script cancellation operation. */ + } Interp; /* @@ -2810,7 +2802,7 @@ MODULE_SCOPE int TclByteArrayMatch(const unsigned char *string, int strLen, const unsigned char *pattern, int ptnLen, int flags); MODULE_SCOPE double TclCeil(mp_int *a); -MODULE_SCOPE int TclCheckBadOctal(Tcl_Interp *interp,const char *value); +MODULE_SCOPE int TclCheckBadOctal(Tcl_Interp *interp, const char *value); MODULE_SCOPE int TclChanCaughtErrorBypass(Tcl_Interp *interp, Tcl_Channel chan); MODULE_SCOPE int TclClearRootEnsemble(ClientData data[], @@ -3763,19 +3755,19 @@ typedef const char *TclDTraceStr; */ # define TclDecrRefCount(objPtr) \ - if (--(objPtr)->refCount > 0) ; else { \ - if (!(objPtr)->typePtr || !(objPtr)->typePtr->freeIntRepProc) { \ - TCL_DTRACE_OBJ_FREE(objPtr); \ - if ((objPtr)->bytes \ - && ((objPtr)->bytes != tclEmptyStringRep)) { \ - ckfree((char *) (objPtr)->bytes); \ - } \ - (objPtr)->length = -1; \ - TclFreeObjStorage(objPtr); \ - TclIncrObjsFreed(); \ - } else { \ - TclFreeObj(objPtr); \ - } \ + if (--(objPtr)->refCount > 0) ; else { \ + if (!(objPtr)->typePtr || !(objPtr)->typePtr->freeIntRepProc) { \ + TCL_DTRACE_OBJ_FREE(objPtr); \ + if ((objPtr)->bytes \ + && ((objPtr)->bytes != tclEmptyStringRep)) { \ + ckfree((char *) (objPtr)->bytes); \ + } \ + (objPtr)->length = -1; \ + TclFreeObjStorage(objPtr); \ + TclIncrObjsFreed(); \ + } else { \ + TclFreeObj(objPtr); \ + } \ } #if defined(PURIFY) @@ -3910,14 +3902,14 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, */ #define TclInitStringRep(objPtr, bytePtr, len) \ - if ((len) == 0) { \ - (objPtr)->bytes = tclEmptyStringRep; \ - (objPtr)->length = 0; \ - } else { \ - (objPtr)->bytes = (char *) ckalloc((unsigned) ((len) + 1)); \ - memcpy((objPtr)->bytes, (bytePtr), (unsigned) (len)); \ - (objPtr)->bytes[len] = '\0'; \ - (objPtr)->length = (len); \ + if ((len) == 0) { \ + (objPtr)->bytes = tclEmptyStringRep; \ + (objPtr)->length = 0; \ + } else { \ + (objPtr)->bytes = (char *) ckalloc((unsigned) ((len) + 1)); \ + memcpy((objPtr)->bytes, (bytePtr), (unsigned) (len)); \ + (objPtr)->bytes[len] = '\0'; \ + (objPtr)->length = (len); \ } /* @@ -3967,11 +3959,11 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, */ #define TclInvalidateStringRep(objPtr) \ - if (objPtr->bytes != NULL) { \ - if (objPtr->bytes != tclEmptyStringRep) { \ - ckfree((char *) objPtr->bytes); \ - } \ - objPtr->bytes = NULL; \ + if (objPtr->bytes != NULL) { \ + if (objPtr->bytes != tclEmptyStringRep) { \ + ckfree((char *) objPtr->bytes); \ + } \ + objPtr->bytes = NULL; \ } /* -- cgit v0.12 From 7db448ffbc8f56ff7e50d542ff112e61fa2f6d94 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 17 Feb 2010 15:40:54 +0000 Subject: missing comma --- generic/tclLiteral.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index cda9caf..05e1dba 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.38 2010/02/16 14:09:07 dkf Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.39 2010/02/17 15:40:54 dgp Exp $ */ #include "tclInt.h" @@ -315,7 +315,7 @@ TclCreateLiteral( #ifdef TCL_COMPILE_DEBUG if (TclLookupLiteralEntry((Tcl_Interp *) iPtr, objPtr) != NULL) { Tcl_Panic("%s: literal \"%.*s\" found globally but shouldn't be", - "TclRegisterLiteral" (length>60? 60 : length), bytes); + "TclRegisterLiteral", (length>60? 60 : length), bytes); } #endif -- cgit v0.12 From 0198d4b07964264dc869e7b3ec88e8b7fd25d18f Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 17 Feb 2010 15:59:24 +0000 Subject: Fix error in stack depth calculation for [dict update], correct misleading comment in description of opcode. --- ChangeLog | 10 ++++++++-- generic/tclCompCmds.c | 5 ++++- generic/tclCompile.c | 8 ++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d0fad9..9a983fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ +2010-02-17 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileDictUpdateCmd): Stack depth must be + correctly described when compiling a body to prevent crashes in some + debugging modes. + 2010-02-16 Jan Nijtmans - * generic/tclInt.h: Change order of various struct members, - restoring potential binary incompatibility with Tcl 8.5 + * generic/tclInt.h: Change order of various struct members, restoring + potential binary incompatibility with Tcl 8.5 2010-02-16 Donal K. Fellows diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index b9cf5f6..27b41a8 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.162 2010/02/13 18:11:05 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.163 2010/02/17 15:59:24 dkf Exp $ */ #include "tclInt.h" @@ -978,6 +978,7 @@ TclCompileDictUpdateCmd( const char *name; int i, nameChars, dictIndex, numVars, range, infoIndex; Tcl_Token **keyTokenPtrs, *dictVarTokenPtr, *bodyTokenPtr, *tokenPtr; + int savedStackDepth = envPtr->currStackDepth; DictUpdateInfo *duiPtr; JumpFixup jumpFixup; @@ -1095,7 +1096,9 @@ TclCompileDictUpdateCmd( TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr); ExceptionRangeStarts(envPtr, range); + envPtr->currStackDepth++; CompileBody(envPtr, bodyTokenPtr, interp); + envPtr->currStackDepth = savedStackDepth; ExceptionRangeEnds(envPtr, range); /* diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 726aefb..acc667c 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.180 2010/01/30 16:33:25 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.181 2010/02/17 15:59:24 dkf Exp $ */ #include "tclInt.h" @@ -355,9 +355,9 @@ InstructionDesc const tclInstructionTable[] = { /* Create the variables (described in the aux data referred to by the * second immediate argument) to mirror the state of the dictionary in * the variable referred to by the first immediate argument. The list - * of keys (popped from the stack) must be the same length as the list - * of variables. - * Stack: ... keyList => ... */ + * of keys (top of the stack, not poppsed) must be the same length as + * the list of variables. + * Stack: ... keyList => ... keyList */ {"dictUpdateEnd", 9, -1, 2, {OPERAND_LVT4, OPERAND_AUX4}}, /* Reflect the state of local variables (described in the aux data * referred to by the second immediate argument) back to the state of -- cgit v0.12 From 75bf2508e3fdda7b0fb86b63d1cb8e14954cd880 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 17 Feb 2010 21:58:08 +0000 Subject: Return to using the classic hash function. Now with *extensive* notes in the comments about why this function is preferred. --- ChangeLog | 8 ++++++++ generic/tclHash.c | 46 ++++++++++++++++++++++++++++++++-------------- generic/tclLiteral.c | 42 +++++++++++++++++++++++++++++------------- generic/tclObj.c | 48 ++++++++++++++++++++++++++++++++++-------------- 4 files changed, 103 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a983fb..ea6906a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-02-17 Donal K. Fellows + * generic/tclHash.c (HashStringKey): Restore these hash functions + * generic/tclLiteral.c (HashString): to use the classic algorithm. + * generic/tclObj.c (TclHashObjKey): Community felt normal case + speed to be more important than resistance to malicious cases. For + now, hashes that need to deal with the malicious case can use a custom + hash table and install their own hash function, though that is not + functionality exposed to the script level. + * generic/tclCompCmds.c (TclCompileDictUpdateCmd): Stack depth must be correctly described when compiling a body to prevent crashes in some debugging modes. diff --git a/generic/tclHash.c b/generic/tclHash.c index 47d8fba..99c4b67 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.42 2010/02/10 16:29:49 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.43 2010/02/17 21:58:11 dkf Exp $ */ #include "tclInt.h" @@ -871,24 +871,42 @@ HashStringKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - const unsigned char *string = keyPtr; - unsigned result = 0x811c9dc5; - unsigned c; + register const char *string = (const char *) keyPtr; + register unsigned int result = 0; + register char c; /* - * This is the (32-bit) Fowler/Noll/Vo hash algorithm. This has the - * property of being a reasonably good non-cryptographic hash function for - * short string words, i.e., virtually all command and namespace names. It - * is also faster than Tcl's original algorithm on Intel x86, where there - * is a fast built-in multiply assembly instruction. + * I tried a zillion different hash functions and asked many other people + * for advice. Many people had their own favorite functions, all + * different, but no-one had much idea why they were good ones. I chose + * the one below (multiply by 9 and add new character) because of the + * following reasons: * - * Derived from Public Domain implementation by Landon Curt Noll at: - * http://www.isthe.com/chongo/src/fnv/hash_32.c + * 1. Multiplying by 10 is perfect for keys that are decimal strings, and + * multiplying by 9 is just about as good. + * 2. Times-9 is (shift-left-3) plus (old). This means that each + * character's bits hang around in the low-order bits of the hash value + * for ever, plus they spread fairly rapidly up to the high-order bits + * to fill out the hash value. This seems works well both for decimal + * and non-decimal strings, but isn't strong against maliciously-chosen + * keys. + * + * Note that this function is very weak against malicious strings; it's + * very easy to generate multiple keys that have the same hashcode. On the + * other hand, that hardly ever actually occurs and this function *is* + * very cheap, even by comparison with industry-standard hashes like FNV. + * If real strength of hash is required though, use a custom hash based on + * Bob Jenkins's lookup3(), but be aware that it's significantly slower. + * Since Tcl command and namespace names are usually reasonably-named (the + * main use for string hashes in modern Tcl) speed is far more important + * than strength. + * + * See also HashString in tclLiteral.c. + * See also TclObjHashKey in tclObj.c. */ -#define FNV_32_PRIME ((unsigned) 0x01000193) - while ((c=*string++)) { - result = (result * FNV_32_PRIME) ^ c; + for (; (c=*string++) != 0 ;) { + result += (result<<3) + UCHAR(c); } return result; } diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 05e1dba..67d24a5 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.39 2010/02/17 15:40:54 dgp Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.40 2010/02/17 21:58:11 dkf Exp $ */ #include "tclInt.h" @@ -894,23 +894,39 @@ HashString( register const char *bytes, /* String for which to compute hash value. */ int length) /* Number of bytes in the string. */ { - unsigned result = 0x811c9dc5; - const char *last = bytes + length; + register unsigned int result = 0; + register int i; /* - * This is the (32-bit) Fowler/Noll/Vo hash algorithm. This has the - * property of being a reasonably good non-cryptographic hash function for - * short string words, i.e., virtually all names used in practice. It is - * also faster than Tcl's original algorithm on Intel x86, where there is - * a fast built-in multiply assembly instruction. + * I tried a zillion different hash functions and asked many other people + * for advice. Many people had their own favorite functions, all + * different, but no-one had much idea why they were good ones. I chose + * the one below (multiply by 9 and add new character) because of the + * following reasons: + * + * 1. Multiplying by 10 is perfect for keys that are decimal strings, and + * multiplying by 9 is just about as good. + * 2. Times-9 is (shift-left-3) plus (old). This means that each + * character's bits hang around in the low-order bits of the hash value + * for ever, plus they spread fairly rapidly up to the high-order bits + * to fill out the hash value. This seems works well both for decimal + * and non-decimal strings. + * + * Note that this function is very weak against malicious strings; it's + * very easy to generate multiple keys that have the same hashcode. On the + * other hand, that hardly ever actually occurs and this function *is* + * very cheap, even by comparison with industry-standard hashes like FNV. + * If real strength of hash is required though, use a custom hash based on + * Bob Jenkins's lookup3(), but be aware that it's significantly slower. + * Tcl scripts tend to not have a big issue in this area, and literals + * mostly aren't looked up by name anyway. * - * Derived from Public Domain implementation by Landon Curt Noll at: - * http://www.isthe.com/chongo/src/fnv/hash_32.c + * See also HashStringKey in tclHash.c. + * See also TclObjHashKey in tclObj.c. */ -#define FNV_32_PRIME ((unsigned) 0x01000193) - while (bytes < last) { - result = (result * FNV_32_PRIME) ^ UCHAR(*bytes++); + for (i=0; ilength; + const char *string = TclGetString(objPtr); + unsigned int result = 0; + const char *end = string + objPtr->length; /* - * This is the (32-bit) Fowler/Noll/Vo hash algorithm. This has the - * property of being a reasonably good non-cryptographic hash function for - * short string words, i.e., virtually all names used in practice. It is - * also faster than Tcl's original algorithm on Intel x86, where there is - * a fast built-in multiply assembly instruction. + * I tried a zillion different hash functions and asked many other people + * for advice. Many people had their own favorite functions, all + * different, but no-one had much idea why they were good ones. I chose + * the one below (multiply by 9 and add new character) because of the + * following reasons: * - * Derived from Public Domain implementation by Landon Curt Noll at: - * http://www.isthe.com/chongo/src/fnv/hash_32.c + * 1. Multiplying by 10 is perfect for keys that are decimal strings, and + * multiplying by 9 is just about as good. + * 2. Times-9 is (shift-left-3) plus (old). This means that each + * character's bits hang around in the low-order bits of the hash value + * for ever, plus they spread fairly rapidly up to the high-order bits + * to fill out the hash value. This seems works well both for decimal + * and non-decimal strings. + * + * Note that this function is very weak against malicious strings; it's + * very easy to generate multiple keys that have the same hashcode. On the + * other hand, that hardly ever actually occurs and this function *is* + * very cheap, even by comparison with industry-standard hashes like FNV. + * If real strength of hash is required though, use a custom hash based on + * Bob Jenkins's lookup3(), but be aware that it's significantly slower. + * Tcl does not use that level of strength because it typically does not + * need it (and some of the aspects of that strength are genuinely + * unnecessary given the rest of Tcl's hash machinery, and the fact that + * we do not either transfer hashes to another machine, use them as a true + * substitute for equality, or attempt to minimize work in rebuilding the + * hash table). + * + * See also HashStringKey in tclHash.c. + * See also HashString in tclLiteral.c. */ -#define FNV_32_PRIME ((unsigned) 0x01000193) - while (string < last) { - result = (result * FNV_32_PRIME) ^ (*string++); + while (string < end) { + result += (result << 3) + UCHAR(*string++); } return result; } -- cgit v0.12 From e6e4973e6ac3dd76e4de51082f4ecf53f5ac7eb4 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 19 Feb 2010 09:54:05 +0000 Subject: [Bug 2954638]: Correct behaviour of manual page installer. Also added armouring to check that assumptions about the initial state are actually valid (e.g., look for existing input file). --- ChangeLog | 6 +++ unix/installManPage | 103 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 82 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea6906a..b0573b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-19 Donal K. Fellows + + * unix/installManPage: [Bug 2954638]: Correct behaviour of manual page + installer. Also added armouring to check that assumptions about the + initial state are actually valid (e.g., look for existing input file). + 2010-02-17 Donal K. Fellows * generic/tclHash.c (HashStringKey): Restore these hash functions diff --git a/unix/installManPage b/unix/installManPage index 993d097..e636db7 100755 --- a/unix/installManPage +++ b/unix/installManPage @@ -1,12 +1,29 @@ #!/bin/sh -ZIP=: +######################################################################## +### Parse Options +### + +Gzip=: +SymOrLoc="" +Gz="" +Suffix="" + while true; do case $1 in - -s | --symlinks ) S="-s ";; - -z | --compress ) ZIP=$2; shift ;; - -e | --extension ) Z=$2; shift ;; - -s | --suffix ) SUFFIX=$2; shift ;; + -s | --symlinks ) SymOrLoc="-s " ;; + -z | --compress ) Gzip=$2; shift ;; + -e | --extension ) Gz=$2; shift ;; + -x | --suffix ) Suffix=$2; shift ;; + -*) cat < $DIR/$FIRST - chmod 444 $DIR/$FIRST - $ZIP $DIR/$FIRST +First="" +for Target in $Names; do + Target=$Target.$Section$Suffix + rm -f $Dir/$Target $Dir/$Target.* + if test -z "$First" ; then + First=$Target + sed -e "/man\.macros/r $SrcDir/man.macros" -e "/man\.macros/d" \ + $ManPage > $Dir/$First + chmod 444 $Dir/$First + $Gzip $Dir/$First else - rm -f $DIR/$f $DIR/$f.* - ln $S$FIRST$Z $DIR/$f$Z + ln $SymOrLoc$First$Gz $Dir/$Target$Gz fi done + +######################################################################## +exit 0 -- cgit v0.12 From ba7d6fdad5a4d07c0c5cdbe8f4dde1a5c896498d Mon Sep 17 00:00:00 2001 From: stwo Date: Fri, 19 Feb 2010 13:36:52 +0000 Subject: Correct compiler/linker flags for threaded builds on OpenBSD. --- ChangeLog | 6 ++++++ unix/configure | 10 +++++++++- unix/tcl.m4 | 9 +++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0573b3..b0c90e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-19 Stuart Cassoff + + * tcl.m4: Correct compiler/linker flags + for threaded builds on OpenBSD. + * configure: (regenerated). + 2010-02-19 Donal K. Fellows * unix/installManPage: [Bug 2954638]: Correct behaviour of manual page diff --git a/unix/configure b/unix/configure index 8622d91..40115bf 100755 --- a/unix/configure +++ b/unix/configure @@ -8067,6 +8067,14 @@ else LDFLAGS="" fi + if test "${TCL_THREADS}" = "1"; then + + # OpenBSD builds and links with -pthread, never -lpthread. + LIBS=`echo $LIBS | sed s/-lpthread//` + CFLAGS="$CFLAGS -pthread" + SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" + +fi # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' @@ -9289,7 +9297,7 @@ fi BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*) ;; + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index b7cb2ac..a4a18eb 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1547,7 +1547,12 @@ dnl AC_CHECK_TOOL(AR, ar) AS_IF([test $tcl_cv_ld_elf = yes], [ LDFLAGS=-Wl,-export-dynamic ], [LDFLAGS=""]) - + AS_IF([test "${TCL_THREADS}" = "1"], [ + # OpenBSD builds and links with -pthread, never -lpthread. + LIBS=`echo $LIBS | sed s/-lpthread//` + CFLAGS="$CFLAGS -pthread" + SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" + ]) # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots @@ -2084,7 +2089,7 @@ dnl # preprocessing tests use only CPPFLAGS. BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*) ;; + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; -- cgit v0.12 From b002c48616b88d022a6a2f60e976a02cd46eb356 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 19 Feb 2010 14:22:00 +0000 Subject: Small changes to align code style with Tcl Engineering Manual --- generic/tclCompile.c | 324 +++++++++++++++++++++++++++------------------------ 1 file changed, 169 insertions(+), 155 deletions(-) diff --git a/generic/tclCompile.c b/generic/tclCompile.c index acc667c..7a6d1e7 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.181 2010/02/17 15:59:24 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.182 2010/02/19 14:22:00 dkf Exp $ */ #include "tclInt.h" @@ -456,8 +456,8 @@ static void PrintSourceToObj(Tcl_Obj *appendObj, */ static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset, Tcl_Token *tokenPtr, const char *cmd, int len, - int numWords, int line, int* clNext, int **lines, - CompileEnv* envPtr); + int numWords, int line, int *clNext, int **lines, + CompileEnv *envPtr); /* * The structure below defines the bytecode Tcl object type by means of @@ -526,7 +526,7 @@ TclSetByteCodeFromAny( register int i; int length, result = TCL_OK; const char *stringPtr; - ContLineLoc* clLocPtr; + ContLineLoc *clLocPtr; #ifdef TCL_COMPILE_DEBUG if (!traceInitialized) { @@ -548,6 +548,7 @@ TclSetByteCodeFromAny( TclInitCompileEnv(interp, &compEnv, stringPtr, length, iPtr->invokeCmdFramePtr, iPtr->invokeWord); + /* * Now we check if we have data about invisible continuation lines for the * script, and make it available to the compile environment, if so. @@ -555,16 +556,16 @@ TclSetByteCodeFromAny( * It is not clear if the script Tcl_Obj* can be free'd while the compiler * is using it, leading to the release of the associated ContLineLoc * structure as well. To ensure that the latter doesn't happen we set a - * lock on it. We release this lock in the function TclFreeCompileEnv (), + * lock on it. We release this lock in the function TclFreeCompileEnv(), * found in this file. The "lineCLPtr" hashtable is managed in the file * "tclObj.c". */ - clLocPtr = TclContinuationsGet (objPtr); + clLocPtr = TclContinuationsGet(objPtr); if (clLocPtr) { - compEnv.clLoc = clLocPtr; + compEnv.clLoc = clLocPtr; compEnv.clNext = &compEnv.clLoc->loc[0]; - Tcl_Preserve (compEnv.clLoc); + Tcl_Preserve(compEnv.clLoc); } TclCompileScript(interp, stringPtr, length, &compEnv); @@ -759,7 +760,7 @@ TclCleanupByteCode( Tcl_Time destroyTime; int lifetimeSec, lifetimeMicroSec, log2; - statsPtr = &((Interp *) interp)->stats; + statsPtr = &iPtr->stats; statsPtr->numByteCodesFreed++; statsPtr->currentSrcBytes -= (double) codePtr->numSrcBytes; @@ -857,6 +858,7 @@ TclCleanupByteCode( if (iPtr) { Tcl_HashEntry *hePtr = Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr); + if (hePtr) { ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); int i; @@ -872,7 +874,7 @@ TclCleanupByteCode( ckfree((char *) eclPtr->loc); } - Tcl_DeleteHashTable (&eclPtr->litInfo); + Tcl_DeleteHashTable(&eclPtr->litInfo); ckfree((char *) eclPtr); Tcl_DeleteHashEntry(hePtr); @@ -907,9 +909,9 @@ TclCleanupByteCode( Tcl_Obj * Tcl_SubstObj( - Tcl_Interp *interp, /* Interpreter in which substitution occurs */ - Tcl_Obj *objPtr, /* The value to be substituted. */ - int flags) /* What substitutions to do. */ + Tcl_Interp *interp, /* Interpreter in which substitution occurs */ + Tcl_Obj *objPtr, /* The value to be substituted. */ + int flags) /* What substitutions to do. */ { TEOV_callback *rootPtr = TOP_CB(interp); @@ -958,8 +960,8 @@ Tcl_NRSubstObj( * * CompileSubstObj -- * - * Compile a Tcl value into ByteCode implementing its substitution, - * as governed by flags. + * Compile a Tcl value into ByteCode implementing its substitution, as + * governed by flags. * * Results: * A (ByteCode *) is returned pointing to the resulting ByteCode. @@ -967,10 +969,10 @@ Tcl_NRSubstObj( * TclCleanupByteCode() when the last reference disappears. * * Side effects: - * The Tcl_ObjType of objPtr is changed to the "substcode" type, - * and the ByteCode and governing flags value are kept in the internal - * rep for faster operations the next time CompileSubstObj is called - * on the same value. + * The Tcl_ObjType of objPtr is changed to the "substcode" type, and the + * ByteCode and governing flags value are kept in the internal rep for + * faster operations the next time CompileSubstObj is called on the same + * value. * *---------------------------------------------------------------------- */ @@ -1012,7 +1014,8 @@ CompileSubstObj( TclInitByteCodeObj(objPtr, &compEnv); objPtr->typePtr = &substCodeType; TclFreeCompileEnv(&compEnv); - codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr; + + codePtr = objPtr->internalRep.otherValuePtr; objPtr->internalRep.ptrAndLongRep.ptr = codePtr; objPtr->internalRep.ptrAndLongRep.value = flags; if (iPtr->varFramePtr->localCachePtr) { @@ -1029,17 +1032,17 @@ CompileSubstObj( * * FreeSubstCodeInternalRep -- * - * Part of the substcode Tcl object type implementation. Frees the storage - * associated with a substcode object's internal representation unless its - * code is actively being executed. + * Part of the substcode Tcl object type implementation. Frees the + * storage associated with a substcode object's internal representation + * unless its code is actively being executed. * * Results: * None. * * Side effects: - * The substcode object's internal rep is marked invalid and its code gets - * freed unless the code is actively being executed. In that case the - * cleanup is delayed until the last execution of the code completes. + * The substcode object's internal rep is marked invalid and its code + * gets freed unless the code is actively being executed. In that case + * the cleanup is delayed until the last execution of the code completes. * *---------------------------------------------------------------------- */ @@ -1099,11 +1102,11 @@ TclInitCompileEnv( envPtr->maxExceptDepth = 0; envPtr->maxStackDepth = 0; envPtr->currStackDepth = 0; - TclInitLiteralTable(&(envPtr->localLitTable)); + TclInitLiteralTable(&envPtr->localLitTable); envPtr->codeStart = envPtr->staticCodeSpace; envPtr->codeNext = envPtr->codeStart; - envPtr->codeEnd = (envPtr->codeStart + COMPILEENV_INIT_CODE_BYTES); + envPtr->codeEnd = envPtr->codeStart + COMPILEENV_INIT_CODE_BYTES; envPtr->mallocedCodeArray = 0; envPtr->literalArrayPtr = envPtr->staticLiteralSpace; @@ -1156,13 +1159,14 @@ TclInitCompileEnv( * caches the result. */ - Tcl_Obj *norm = Tcl_FSGetNormalizedPath(interp, iPtr->scriptFile); + Tcl_Obj *norm = + Tcl_FSGetNormalizedPath(interp, iPtr->scriptFile); if (norm == NULL) { /* - * Error message in the interp result. No place to put - * it. And no place to serve the error itself to either. - * Fake a path, empty string. + * Error message in the interp result. No place to put it. + * And no place to serve the error itself to either. Fake + * a path, empty string. */ TclNewLiteralStringObj(envPtr->extCmdMapPtr->path, ""); @@ -1186,12 +1190,10 @@ TclInitCompileEnv( * ...) which may make change the type as well. */ - CmdFrame *ctxPtr; + CmdFrame *ctxPtr = TclStackAlloc(interp, sizeof(CmdFrame)); int pc = 0; - ctxPtr = (CmdFrame *) TclStackAlloc(interp, sizeof(CmdFrame)); *ctxPtr = *invoker; - if (invoker->type == TCL_LOCATION_BC) { /* * Note: Type BC => ctx.data.eval.path is not used. @@ -1215,6 +1217,7 @@ TclInitCompileEnv( /* * The reference made by 'TclGetSrcInfoForPc' is dead. */ + Tcl_DecrRefCount(ctxPtr->data.eval.path); } } else { @@ -1246,12 +1249,12 @@ TclInitCompileEnv( envPtr->extCmdMapPtr->start = envPtr->line; /* - * Initialize the data about invisible continuation lines as empty, - * i.e. not used. The caller (TclSetByteCodeFromAny) will set this up, if - * such data is available. + * Initialize the data about invisible continuation lines as empty, i.e. + * not used. The caller (TclSetByteCodeFromAny) will set this up, if such + * data is available. */ - envPtr->clLoc = NULL; + envPtr->clLoc = NULL; envPtr->clNext = NULL; envPtr->auxDataArrayPtr = envPtr->staticAuxDataArraySpace; @@ -1286,7 +1289,7 @@ void TclFreeCompileEnv( register CompileEnv *envPtr)/* Points to the CompileEnv structure. */ { - if (envPtr->localLitTable.buckets != envPtr->localLitTable.staticBuckets) { + if (envPtr->localLitTable.buckets != envPtr->localLitTable.staticBuckets){ ckfree((char *) envPtr->localLitTable.buckets); envPtr->localLitTable.buckets = envPtr->localLitTable.staticBuckets; } @@ -1316,7 +1319,7 @@ TclFreeCompileEnv( */ if (envPtr->clLoc) { - Tcl_Release (envPtr->clLoc); + Tcl_Release(envPtr->clLoc); } } @@ -1379,6 +1382,7 @@ TclWordKnownAtCompileTime( if (tempPtr != NULL) { char utfBuf[TCL_UTF_MAX]; int length = Tcl_UtfBackslash(tokenPtr->start, NULL, utfBuf); + Tcl_AppendToObj(tempPtr, utfBuf, length); } break; @@ -1439,15 +1443,12 @@ TclCompileScript( Namespace *cmdNsPtr; Command *cmdPtr; Tcl_Token *tokenPtr; - int bytesLeft, isFirstCmd, wordIdx, currCmdIndex; - int commandLength, objIndex; + int bytesLeft, isFirstCmd, wordIdx, currCmdIndex, commandLength, objIndex; Tcl_DString ds; /* TIP #280 */ ExtCmdLoc *eclPtr = envPtr->extCmdMapPtr; - int *wlines, wlineat, cmdLine; - int* clNext; - Tcl_Parse *parsePtr = (Tcl_Parse *) - TclStackAlloc(interp, sizeof(Tcl_Parse)); + int *wlines, wlineat, cmdLine, *clNext; + Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); Tcl_DStringInit(&ds); @@ -1488,11 +1489,13 @@ TclCompileScript( } /* - * TIP #280: We have to count newlines before the command even - * in the degenerate case when the command has no words. (See - * test info-30.33). So make that counting here, and not in - * the (numWords > 0) branch below. + * TIP #280: We have to count newlines before the command even in the + * degenerate case when the command has no words. (See test + * info-30.33). + * So make that counting here, and not in the (numWords > 0) branch + * below. */ + TclAdvanceLines(&cmdLine, p, parsePtr->commandStart); TclAdvanceContinuations(&cmdLine, &clNext, parsePtr->commandStart - envPtr->source); @@ -1519,7 +1522,7 @@ TclCompileScript( */ commandLength = parsePtr->commandSize; - if (parsePtr->term == parsePtr->commandStart + commandLength - 1) { + if (parsePtr->term == parsePtr->commandStart + commandLength-1) { /* * The command terminator character (such as ; or ]) is the * last character in the parsed command. Reduce the length by @@ -1550,7 +1553,7 @@ TclCompileScript( for (wordIdx = 0, tokenPtr = parsePtr->tokenPtr; wordIdx < parsePtr->numWords; - wordIdx++, tokenPtr += (tokenPtr->numComponents + 1)) { + wordIdx++, tokenPtr += tokenPtr->numComponents + 1) { if (tokenPtr->type == TCL_TOKEN_EXPAND_WORD) { expand = 1; break; @@ -1558,9 +1561,9 @@ TclCompileScript( } envPtr->numCommands++; - currCmdIndex = (envPtr->numCommands - 1); + currCmdIndex = envPtr->numCommands - 1; lastTopLevelCmdIndex = currCmdIndex; - startCodeOffset = (envPtr->codeNext - envPtr->codeStart); + startCodeOffset = envPtr->codeNext - envPtr->codeStart; EnterCmdStartData(envPtr, currCmdIndex, parsePtr->commandStart - envPtr->source, startCodeOffset); @@ -1594,10 +1597,10 @@ TclCompileScript( for (wordIdx = 0, tokenPtr = parsePtr->tokenPtr; wordIdx < parsePtr->numWords; wordIdx++, - tokenPtr += (tokenPtr->numComponents + 1)) { + tokenPtr += tokenPtr->numComponents + 1) { envPtr->line = eclPtr->loc[wlineat].line[wordIdx]; - envPtr->clNext = eclPtr->loc [wlineat].next [wordIdx]; + envPtr->clNext = eclPtr->loc[wlineat].next[wordIdx]; if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { /* * The word is not a simple string of characters. @@ -1699,31 +1702,31 @@ TclCompileScript( TclStoreInt4AtPtr(fixLen, fixPtr); } goto finishCommand; - } else { - if (envPtr->atCmdStart && savedCodeNext != 0) { - /* - * Decrease the number of commands being - * started at the current point. Note that - * this depends on the exact layout of the - * INST_START_CMD's operands, so be careful! - */ - - unsigned char *fixPtr = envPtr->codeNext - 4; - - TclStoreInt4AtPtr(TclGetUInt4AtPtr(fixPtr)-1, - fixPtr); - } + } + if (envPtr->atCmdStart && savedCodeNext != 0) { /* - * Restore numCommands and codeNext to their - * correct values, removing any commands compiled - * before the failure to produce bytecode got - * reported. [Bugs 705406 and 735055] + * Decrease the number of commands being started + * at the current point. Note that this depends on + * the exact layout of the INST_START_CMD's + * operands, so be careful! */ - envPtr->numCommands = savedNumCmds; - envPtr->codeNext = envPtr->codeStart+savedCodeNext; + unsigned char *fixPtr = envPtr->codeNext - 4; + + TclStoreInt4AtPtr(TclGetUInt4AtPtr(fixPtr)-1, + fixPtr); } + + /* + * Restore numCommands and codeNext to their correct + * values, removing any commands compiled before the + * failure to produce bytecode got reported. [Bugs + * 705406 and 735055] + */ + + envPtr->numCommands = savedNumCmds; + envPtr->codeNext = envPtr->codeStart + savedCodeNext; } /* @@ -1762,9 +1765,10 @@ TclCompileScript( tokenPtr[1].start, tokenPtr[1].size); if (envPtr->clNext) { - TclContinuationsEnterDerived (envPtr->literalArrayPtr[objIndex].objPtr, - tokenPtr[1].start - envPtr->source, - eclPtr->loc [wlineat].next [wordIdx]); + TclContinuationsEnterDerived( + envPtr->literalArrayPtr[objIndex].objPtr, + tokenPtr[1].start - envPtr->source, + eclPtr->loc[wlineat].next[wordIdx]); } } TclEmitPush(objIndex, envPtr); @@ -1800,8 +1804,10 @@ TclCompileScript( */ int isnew; - Tcl_HashEntry* hePtr = Tcl_CreateHashEntry(&eclPtr->litInfo, - (char*) (envPtr->codeNext - envPtr->codeStart), &isnew); + Tcl_HashEntry *hePtr = Tcl_CreateHashEntry(&eclPtr->litInfo, + INT2PTR(envPtr->codeNext - envPtr->codeStart), + &isnew); + Tcl_SetHashValue(hePtr, INT2PTR(wlineat)); if (wordIdx <= 255) { @@ -1845,7 +1851,7 @@ TclCompileScript( */ TclAdvanceLines(&cmdLine, parsePtr->commandStart, p); - TclAdvanceContinuations (&cmdLine, &clNext, p - envPtr->source); + TclAdvanceContinuations(&cmdLine, &clNext, p - envPtr->source); Tcl_FreeParse(parsePtr); } while (bytesLeft > 0); @@ -1872,7 +1878,7 @@ TclCompileScript( TclEmitPush(TclAddLiteralObj(envPtr, Tcl_NewObj(), NULL), envPtr); } - envPtr->numSrcBytes = (p - script); + envPtr->numSrcBytes = p - script; TclStackFree(interp, parsePtr); Tcl_DStringFree(&ds); } @@ -1909,12 +1915,11 @@ TclCompileVarSubst( int i, localVar, localVarName = 1; /* - * Determine how the variable name should be handled: if it - * contains any namespace qualifiers it is not a local variable - * (localVarName=-1); if it looks like an array element and the - * token has a single component, it should not be created here - * [Bug 569438] (localVarName=0); otherwise, the local variable - * can safely be created (localVarName=1). + * Determine how the variable name should be handled: if it contains any + * namespace qualifiers it is not a local variable (localVarName=-1); if + * it looks like an array element and the token has a single component, it + * should not be created here [Bug 569438] (localVarName=0); otherwise, + * the local variable can safely be created (localVarName=1). */ for (i = 0, p = name; i < nameBytes; i++, p++) { @@ -1946,7 +1951,7 @@ TclCompileVarSubst( * Emit instructions to load the variable. */ - TclAdvanceLines(&(envPtr->line), tokenPtr[1].start, + TclAdvanceLines(&envPtr->line, tokenPtr[1].start, tokenPtr[1].start + tokenPtr[1].size); if (tokenPtr->numComponents == 1) { @@ -1991,32 +1996,31 @@ TclCompileTokens( * For the handling of continuation lines in literals we first check if * this is actually a literal. For if not we can forego the additional * processing. Otherwise we pre-allocate a small table to store the - * locations of all continuation lines we find in this literal, if - * any. The table is extended if needed. + * locations of all continuation lines we find in this literal, if any. + * The table is extended if needed. * * Note: Different to the equivalent code in function 'TclSubstTokens()' - * (see file "tclParse.c") we do not seem to need the 'adjust' - * variable. We also do not seem to need code which merges continuation - * line information of multiple words which concat'd at runtime. Either - * that or I have not managed to find a test case for these two - * possibilities yet. It might be a difference between compile- versus - * runtime processing. + * (see file "tclParse.c") we do not seem to need the 'adjust' variable. + * We also do not seem to need code which merges continuation line + * information of multiple words which concat'd at runtime. Either that or + * I have not managed to find a test case for these two possibilities yet. + * It might be a difference between compile- versus run-time processing. */ - numCL = 0; - maxNumCL = 0; + numCL = 0; + maxNumCL = 0; isLiteral = 1; for (i=0 ; i < count; i++) { - if ((tokenPtr[i].type != TCL_TOKEN_TEXT) && - (tokenPtr[i].type != TCL_TOKEN_BS)) { + if ((tokenPtr[i].type != TCL_TOKEN_TEXT) + && (tokenPtr[i].type != TCL_TOKEN_BS)) { isLiteral = 0; break; } } if (isLiteral) { - maxNumCL = NUM_STATIC_POS; - clPosition = (int*) ckalloc (maxNumCL*sizeof(int)); + maxNumCL = NUM_STATIC_POS; + clPosition = (int *) ckalloc(maxNumCL * sizeof(int)); } Tcl_DStringInit(&textBuffer); @@ -2025,7 +2029,7 @@ TclCompileTokens( switch (tokenPtr->type) { case TCL_TOKEN_TEXT: Tcl_DStringAppend(&textBuffer, tokenPtr->start, tokenPtr->size); - TclAdvanceLines(&(envPtr->line), tokenPtr->start, + TclAdvanceLines(&envPtr->line, tokenPtr->start, tokenPtr->start + tokenPtr->size); break; @@ -2051,12 +2055,12 @@ TclCompileTokens( if ((length == 1) && (buffer[0] == ' ') && (tokenPtr->start[1] == '\n')) { if (isLiteral) { - int clPos = Tcl_DStringLength (&textBuffer); + int clPos = Tcl_DStringLength(&textBuffer); if (numCL >= maxNumCL) { maxNumCL *= 2; - clPosition = (int*) ckrealloc ((char*)clPosition, - maxNumCL*sizeof(int)); + clPosition = (int *) ckrealloc((char *) clPosition, + maxNumCL * sizeof(int)); } clPosition[numCL] = clPos; numCL ++; @@ -2079,8 +2083,9 @@ TclCompileTokens( Tcl_DStringFree(&textBuffer); if (numCL) { - TclContinuationsEnter(envPtr->literalArrayPtr[literal].objPtr, - numCL, clPosition); + TclContinuationsEnter( + envPtr->literalArrayPtr[literal].objPtr, numCL, + clPosition); } numCL = 0; } @@ -2132,7 +2137,7 @@ TclCompileTokens( if (numCL) { TclContinuationsEnter(envPtr->literalArrayPtr[literal].objPtr, - numCL, clPosition); + numCL, clPosition); } numCL = 0; } @@ -2159,12 +2164,12 @@ TclCompileTokens( Tcl_DStringFree(&textBuffer); /* - * Release the temp table we used to collect the locations of - * continuation lines, if any. + * Release the temp table we used to collect the locations of continuation + * lines, if any. */ if (maxNumCL) { - ckfree ((char*) clPosition); + ckfree((char *) clPosition); } } @@ -2258,7 +2263,7 @@ TclCompileExprWords( */ if ((numWords == 1) && (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD)) { - TclCompileExpr(interp, tokenPtr[1].start, tokenPtr[1].size, envPtr, 1); + TclCompileExpr(interp, tokenPtr[1].start,tokenPtr[1].size, envPtr, 1); return; } @@ -2273,7 +2278,7 @@ TclCompileExprWords( if (i < (numWords - 1)) { TclEmitPush(TclRegisterNewLiteral(envPtr, " ", 1), envPtr); } - wordPtr += (wordPtr->numComponents + 1); + wordPtr += wordPtr->numComponents + 1; } concatItems = 2*numWords - 1; while (concatItems > 255) { @@ -2472,7 +2477,7 @@ TclInitByteCodeObj( #ifdef TCL_COMPILE_STATS codePtr->structureSize = structureSize - (sizeof(size_t) + sizeof(Tcl_Time)); - Tcl_GetTime(&(codePtr->createTime)); + Tcl_GetTime(&codePtr->createTime); RecordByteCodeStats(codePtr); #endif /* TCL_COMPILE_STATS */ @@ -2665,9 +2670,10 @@ TclExpandCodeArray( ckrealloc((char *) envPtr->codeStart, newBytes); } else { /* - * envPtr->codeStart isn't a ckalloc'd pointer, so we must - * code a ckrealloc equivalent for ourselves. + * envPtr->codeStart isn't a ckalloc'd pointer, so we must code a + * ckrealloc equivalent for ourselves. */ + unsigned char *newPtr = (unsigned char *) ckalloc((unsigned) newBytes); @@ -2733,10 +2739,13 @@ EnterCmdStartData( ckrealloc((char *) envPtr->cmdMapPtr, newBytes); } else { /* - * envPtr->cmdMapPtr isn't a ckalloc'd pointer, so we must - * code a ckrealloc equivalent for ourselves. + * envPtr->cmdMapPtr isn't a ckalloc'd pointer, so we must code a + * ckrealloc equivalent for ourselves. */ - CmdLocation *newPtr = (CmdLocation *) ckalloc((unsigned) newBytes); + + CmdLocation *newPtr = (CmdLocation *) + ckalloc((unsigned) newBytes); + memcpy(newPtr, envPtr->cmdMapPtr, currBytes); envPtr->cmdMapPtr = newPtr; envPtr->mallocedCmdMap = 1; @@ -2750,7 +2759,7 @@ EnterCmdStartData( } } - cmdLocPtr = &(envPtr->cmdMapPtr[cmdIndex]); + cmdLocPtr = &envPtr->cmdMapPtr[cmdIndex]; cmdLocPtr->codeOffset = codeOffset; cmdLocPtr->srcOffset = srcOffset; cmdLocPtr->numSrcBytes = -1; @@ -2799,7 +2808,7 @@ EnterCmdExtentData( cmdIndex); } - cmdLocPtr = &(envPtr->cmdMapPtr[cmdIndex]); + cmdLocPtr = &envPtr->cmdMapPtr[cmdIndex]; cmdLocPtr->numSrcBytes = numSrcBytes; cmdLocPtr->numCodeBytes = numCodeBytes; } @@ -2835,14 +2844,13 @@ EnterCmdWordData( int len, int numWords, int line, - int* clNext, + int *clNext, int **wlines, - CompileEnv* envPtr) + CompileEnv *envPtr) { ECL *ePtr; const char *last; - int wordIdx, wordLine, *wwlines; - int* wordNext; + int wordIdx, wordLine, *wwlines, *wordNext; if (eclPtr->nuloc >= eclPtr->nloc) { /* @@ -2862,7 +2870,7 @@ EnterCmdWordData( ePtr = &eclPtr->loc[eclPtr->nuloc]; ePtr->srcOffset = srcOffset; ePtr->line = (int *) ckalloc(numWords * sizeof(int)); - ePtr->next = (int**) ckalloc (numWords * sizeof (int*)); + ePtr->next = (int **) ckalloc(numWords * sizeof(int *)); ePtr->nline = numWords; wwlines = (int *) ckalloc(numWords * sizeof(int)); @@ -2872,8 +2880,8 @@ EnterCmdWordData( for (wordIdx=0 ; wordIdxnumComponents + 1) { TclAdvanceLines(&wordLine, last, tokenPtr->start); - TclAdvanceContinuations (&wordLine, &wordNext, - tokenPtr->start - envPtr->source); + TclAdvanceContinuations(&wordLine, &wordNext, + tokenPtr->start - envPtr->source); wwlines[wordIdx] = (TclWordKnownAtCompileTime(tokenPtr, NULL) ? wordLine : -1); ePtr->line[wordIdx] = wordLine; @@ -2934,8 +2942,10 @@ TclCreateExceptRange( * envPtr->exceptArrayPtr isn't a ckalloc'd pointer, so we must * code a ckrealloc equivalent for ourselves. */ + ExceptionRange *newPtr = (ExceptionRange *) ckalloc((unsigned) newBytes); + memcpy(newPtr, envPtr->exceptArrayPtr, currBytes); envPtr->exceptArrayPtr = newPtr; envPtr->mallocedExceptArray = 1; @@ -2944,7 +2954,7 @@ TclCreateExceptRange( } envPtr->exceptArrayNext++; - rangePtr = &(envPtr->exceptArrayPtr[index]); + rangePtr = &envPtr->exceptArrayPtr[index]; rangePtr->type = type; rangePtr->nestingLevel = envPtr->exceptDepth; rangePtr->codeOffset = -1; @@ -2989,7 +2999,7 @@ TclCreateAuxData( { int index; /* Index for the new AuxData structure. */ register AuxData *auxDataPtr; - /* Points to the new AuxData structure */ + /* Points to the new AuxData structure */ index = envPtr->auxDataArrayNext; if (index >= envPtr->auxDataArrayEnd) { @@ -3011,7 +3021,9 @@ TclCreateAuxData( * envPtr->auxDataArrayPtr isn't a ckalloc'd pointer, so we must * code a ckrealloc equivalent for ourselves. */ + AuxData *newPtr = (AuxData *) ckalloc((unsigned) newBytes); + memcpy(newPtr, envPtr->auxDataArrayPtr, currBytes); envPtr->auxDataArrayPtr = newPtr; envPtr->mallocedAuxDataArray = 1; @@ -3020,7 +3032,7 @@ TclCreateAuxData( } envPtr->auxDataArrayNext++; - auxDataPtr = &(envPtr->auxDataArrayPtr[index]); + auxDataPtr = &envPtr->auxDataArrayPtr[index]; auxDataPtr->clientData = clientData; auxDataPtr->type = typePtr; return index; @@ -3051,7 +3063,7 @@ TclInitJumpFixupArray( { fixupArrayPtr->fixup = fixupArrayPtr->staticFixupSpace; fixupArrayPtr->next = 0; - fixupArrayPtr->end = (JUMPFIXUP_INIT_ENTRIES - 1); + fixupArrayPtr->end = JUMPFIXUP_INIT_ENTRIES - 1; fixupArrayPtr->mallocedArray = 0; } @@ -3096,10 +3108,12 @@ TclExpandJumpFixupArray( ckrealloc((char *) fixupArrayPtr->fixup, newBytes); } else { /* - * fixupArrayPtr->fixup isn't a ckalloc'd pointer, so we must - * code a ckrealloc equivalent for ourselves. + * fixupArrayPtr->fixup isn't a ckalloc'd pointer, so we must code a + * ckrealloc equivalent for ourselves. */ + JumpFixup *newPtr = (JumpFixup *) ckalloc((unsigned) newBytes); + memcpy(newPtr, fixupArrayPtr->fixup, currBytes); fixupArrayPtr->fixup = newPtr; fixupArrayPtr->mallocedArray = 1; @@ -3175,7 +3189,7 @@ TclEmitForwardJump( */ jumpFixupPtr->jumpType = jumpType; - jumpFixupPtr->codeOffset = (envPtr->codeNext - envPtr->codeStart); + jumpFixupPtr->codeOffset = envPtr->codeNext - envPtr->codeStart; jumpFixupPtr->cmdIndex = envPtr->numCommands; jumpFixupPtr->exceptIndex = envPtr->exceptArrayNext; @@ -3233,7 +3247,7 @@ TclFixupForwardJump( unsigned numBytes; if (jumpDist <= distThreshold) { - jumpPc = (envPtr->codeStart + jumpFixupPtr->codeOffset); + jumpPc = envPtr->codeStart + jumpFixupPtr->codeOffset; switch (jumpFixupPtr->jumpType) { case TCL_UNCONDITIONAL_JUMP: TclUpdateInstInt1AtPc(INST_JUMP1, jumpDist, jumpPc); @@ -3258,7 +3272,7 @@ TclFixupForwardJump( if ((envPtr->codeNext + 3) > envPtr->codeEnd) { TclExpandCodeArray(envPtr); } - jumpPc = (envPtr->codeStart + jumpFixupPtr->codeOffset); + jumpPc = envPtr->codeStart + jumpFixupPtr->codeOffset; numBytes = envPtr->codeNext-jumpPc-2; p = jumpPc+2; memmove(p+3, p, numBytes); @@ -3283,19 +3297,19 @@ TclFixupForwardJump( */ firstCmd = jumpFixupPtr->cmdIndex; - lastCmd = (envPtr->numCommands - 1); + lastCmd = envPtr->numCommands - 1; if (firstCmd < lastCmd) { for (k = firstCmd; k <= lastCmd; k++) { - (envPtr->cmdMapPtr[k]).codeOffset += 3; + envPtr->cmdMapPtr[k].codeOffset += 3; } } firstRange = jumpFixupPtr->exceptIndex; - lastRange = (envPtr->exceptArrayNext - 1); + lastRange = envPtr->exceptArrayNext - 1; for (k = firstRange; k <= lastRange; k++) { - ExceptionRange *rangePtr = &(envPtr->exceptArrayPtr[k]); - rangePtr->codeOffset += 3; + ExceptionRange *rangePtr = &envPtr->exceptArrayPtr[k]; + rangePtr->codeOffset += 3; switch (rangePtr->type) { case LOOP_EXCEPTION_RANGE: rangePtr->breakOffset += 3; @@ -3423,7 +3437,7 @@ TclGetAuxDataType( hPtr = Tcl_FindHashEntry(&auxDataTypeTable, typeName); if (hPtr != NULL) { - typePtr = (const AuxDataType *) Tcl_GetHashValue(hPtr); + typePtr = Tcl_GetHashValue(hPtr); } Tcl_MutexUnlock(&tableMutex); @@ -3532,7 +3546,7 @@ GetCmdLocEncodingSize( codeDeltaNext = codeLengthNext = srcDeltaNext = srcLengthNext = 0; prevCodeOffset = prevSrcOffset = 0; for (i = 0; i < numCmds; i++) { - codeDelta = (mapPtr[i].codeOffset - prevCodeOffset); + codeDelta = mapPtr[i].codeOffset - prevCodeOffset; if (codeDelta < 0) { Tcl_Panic("GetCmdLocEncodingSize: bad code offset"); } else if (codeDelta <= 127) { @@ -3551,7 +3565,7 @@ GetCmdLocEncodingSize( codeLengthNext += 5; /* 1 byte for 0xFF, 4 for length */ } - srcDelta = (mapPtr[i].srcOffset - prevSrcOffset); + srcDelta = mapPtr[i].srcOffset - prevSrcOffset; if ((-127 <= srcDelta) && (srcDelta <= 127) && (srcDelta != -1)) { srcDeltaNext++; } else { @@ -3617,7 +3631,7 @@ EncodeCmdLocMap( codePtr->codeDeltaStart = p; prevOffset = 0; for (i = 0; i < numCmds; i++) { - codeDelta = (mapPtr[i].codeOffset - prevOffset); + codeDelta = mapPtr[i].codeOffset - prevOffset; if (codeDelta < 0) { Tcl_Panic("EncodeCmdLocMap: bad code offset"); } else if (codeDelta <= 127) { @@ -3659,7 +3673,7 @@ EncodeCmdLocMap( codePtr->srcDeltaStart = p; prevOffset = 0; for (i = 0; i < numCmds; i++) { - srcDelta = (mapPtr[i].srcOffset - prevOffset); + srcDelta = mapPtr[i].srcOffset - prevOffset; if ((-127 <= srcDelta) && (srcDelta <= 127) && (srcDelta != -1)) { TclStoreInt1AtPtr(srcDelta, p); p++; @@ -3744,7 +3758,7 @@ TclPrintByteCodeObj( int TclPrintInstruction( ByteCode *codePtr, /* Bytecode containing the instruction. */ - const unsigned char *pc) /* Points to first byte of instruction. */ + const unsigned char *pc) /* Points to first byte of instruction. */ { Tcl_Obj *bufferObj; int numBytes; @@ -3851,7 +3865,7 @@ TclDisassembleByteCodeObj( } codeStart = codePtr->codeStart; - codeLimit = (codeStart + codePtr->numCodeBytes); + codeLimit = codeStart + codePtr->numCodeBytes; numCmds = codePtr->numCommands; /* @@ -3936,7 +3950,7 @@ TclDisassembleByteCodeObj( Tcl_AppendPrintfToObj(bufferObj, " Exception ranges %d, depth %d:\n", codePtr->numExceptRanges, codePtr->maxExceptDepth); for (i = 0; i < codePtr->numExceptRanges; i++) { - ExceptionRange *rangePtr = &(codePtr->exceptArrayPtr[i]); + ExceptionRange *rangePtr = &codePtr->exceptArrayPtr[i]; Tcl_AppendPrintfToObj(bufferObj, " %d: level %d, %s, pc %d-%d, ", @@ -4318,7 +4332,7 @@ RecordByteCodeStats( * to add to accumulated statistics. */ { Interp *iPtr = (Interp *) *codePtr->interpHandle; - register ByteCodeStats *statsPtr = &(iPtr->stats); + register ByteCodeStats *statsPtr = &iPtr->stats; statsPtr->numCompilations++; statsPtr->totalSrcBytes += (double) codePtr->numSrcBytes; -- cgit v0.12 From 9f18dbce0e4a7064e46cf22f9950b5cb220f21a4 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 20 Feb 2010 15:38:41 +0000 Subject: Make [string length] compiler handle more trivial cases. --- ChangeLog | 9 ++- generic/tclCompCmds.c | 213 +++++++++++++++++++++++++------------------------- 2 files changed, 112 insertions(+), 110 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0c90e6..5d01665 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2010-02-20 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileStringLenCmd): Make [string length] + of a constant string be handled better (i.e., handle backslashes too). + 2010-02-19 Stuart Cassoff - * tcl.m4: Correct compiler/linker flags - for threaded builds on OpenBSD. + * tcl.m4: Correct compiler/linker flags for threaded builds on + OpenBSD. * configure: (regenerated). 2010-02-19 Donal K. Fellows diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 27b41a8..ba78ec3 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.163 2010/02/17 15:59:24 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.164 2010/02/20 15:38:41 dkf Exp $ */ #include "tclInt.h" @@ -161,8 +161,8 @@ const AuxDataType tclDictUpdateInfoType = { * Procedure called to compile the "append" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "append" command at @@ -262,8 +262,8 @@ TclCompileAppendCmd( * Procedure called to compile the "break" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "break" command at @@ -301,8 +301,8 @@ TclCompileBreakCmd( * Procedure called to compile the "catch" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "catch" command at @@ -403,7 +403,7 @@ TclCompileCatchCmd( * catching, a catch instruction that resets the stack to what it was * before substituting the body, and then an instruction to eval the body. * Care has to be taken to register the correct startOffset for the catch - * range so that errors in the substitution are not catched [Bug 219184] + * range so that errors in the substitution are not caught. [Bug 219184] */ SetLineInformation(1); @@ -507,8 +507,8 @@ TclCompileCatchCmd( * Procedure called to compile the "continue" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "continue" command at @@ -550,8 +550,8 @@ TclCompileContinueCmd( * Functions called to compile "dict" sucommands. * * Results: - * All return TCL_OK for a successful compile, and TCL_ERROR to defer - * evaluation to runtime. + * All return TCL_OK for a successful compile, and TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "dict" subcommand at @@ -1029,7 +1029,7 @@ TclCompileDictUpdateCmd( duiPtr = (DictUpdateInfo *) ckalloc(sizeof(DictUpdateInfo) + sizeof(int) * (numVars - 1)); duiPtr->length = numVars; - keyTokenPtrs = (Tcl_Token **) TclStackAlloc(interp, + keyTokenPtrs = TclStackAlloc(interp, sizeof(Tcl_Token *) * numVars); tokenPtr = TokenAfter(dictVarTokenPtr); @@ -1046,16 +1046,12 @@ TclCompileDictUpdateCmd( tokenPtr = TokenAfter(tokenPtr); if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { - ckfree((char *) duiPtr); - TclStackFree(interp, keyTokenPtrs); - return TCL_ERROR; + goto failedUpdateInfoAssembly; } name = tokenPtr[1].start; nameChars = tokenPtr[1].size; if (!TclIsLocalScalar(name, nameChars)) { - ckfree((char *) duiPtr); - TclStackFree(interp, keyTokenPtrs); - return TCL_ERROR; + goto failedUpdateInfoAssembly; } /* @@ -1065,13 +1061,12 @@ TclCompileDictUpdateCmd( duiPtr->varIndices[i] = TclFindCompiledLocal(name, nameChars, 1, envPtr); if (duiPtr->varIndices[i] < 0) { - ckfree((char *) duiPtr); - TclStackFree(interp, keyTokenPtrs); - return TCL_ERROR; + goto failedUpdateInfoAssembly; } tokenPtr = TokenAfter(tokenPtr); } if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { + failedUpdateInfoAssembly: ckfree((char *) duiPtr); TclStackFree(interp, keyTokenPtrs); return TCL_ERROR; @@ -1316,8 +1311,8 @@ PrintDictUpdateInfo( * Procedure called to compile the "error" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "error" command at @@ -1361,8 +1356,8 @@ TclCompileErrorCmd( * Procedure called to compile the "expr" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "expr" command at @@ -1406,8 +1401,8 @@ TclCompileExprCmd( * Procedure called to compile the "for" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "for" command at @@ -1572,8 +1567,8 @@ TclCompileForCmd( * Procedure called to compile the "foreach" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "foreach" command at @@ -2036,8 +2031,8 @@ PrintForeachInfo( * Procedure called to compile the "if" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "if" command at @@ -2056,7 +2051,7 @@ TclCompileIfCmd( CompileEnv *envPtr) /* Holds resulting instructions. */ { JumpFixupArray jumpFalseFixupArray; - /* Used to fix the ifFalse jump after each + /* Used to fix the ifFalse jump after each * test when its target PC is determined. */ JumpFixupArray jumpEndFixupArray; /* Used to fix the jump after each "then" body @@ -2353,8 +2348,8 @@ TclCompileIfCmd( * Procedure called to compile the "incr" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "incr" command at @@ -2472,8 +2467,8 @@ TclCompileIncrCmd( * Procedure called to compile the "lappend" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "lappend" command at @@ -2581,8 +2576,8 @@ TclCompileLappendCmd( * Procedure called to compile the "lassign" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "lassign" command at @@ -2696,8 +2691,8 @@ TclCompileLassignCmd( * Procedure called to compile the "lindex" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "lindex" command at @@ -2779,7 +2774,7 @@ TclCompileLindexCmd( if (numWords == 3) { TclEmitOpcode(INST_LIST_INDEX, envPtr); } else { - TclEmitInstInt4(INST_LIST_INDEX_MULTI, numWords-1, envPtr); + TclEmitInstInt4(INST_LIST_INDEX_MULTI, numWords-1, envPtr); } return TCL_OK; @@ -2793,8 +2788,8 @@ TclCompileLindexCmd( * Procedure called to compile the "list" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "list" command at @@ -2857,8 +2852,8 @@ TclCompileListCmd( * Procedure called to compile the "llength" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "llength" command at @@ -2897,8 +2892,8 @@ TclCompileLlengthCmd( * Procedure called to compile the "lset" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "lset" command at @@ -3076,8 +3071,8 @@ TclCompileLsetCmd( * Procedure called to compile the "regexp" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "regexp" command at @@ -3241,8 +3236,8 @@ TclCompileRegexpCmd( * Procedure called to compile the "return" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "return" command at @@ -3297,8 +3292,7 @@ TclCompileReturnCmd( * Allocate some working space. */ - objv = (Tcl_Obj **) TclStackAlloc(interp, - numOptionWords * sizeof(Tcl_Obj *)); + objv = TclStackAlloc(interp, numOptionWords * sizeof(Tcl_Obj *)); /* * Scan through the return options. If any are unknown at compile time, @@ -3436,8 +3430,8 @@ TclCompileSyntaxError( * Procedure called to compile the "set" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "set" command at @@ -3535,8 +3529,8 @@ TclCompileSetCmd( * "string compare" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "string compare" @@ -3586,8 +3580,8 @@ TclCompileStringCmpCmd( * "string equal" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "string equal" command @@ -3637,8 +3631,8 @@ TclCompileStringEqualCmd( * "string index" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "string index" command @@ -3684,8 +3678,8 @@ TclCompileStringIndexCmd( * "string match" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "string match" command @@ -3784,8 +3778,8 @@ TclCompileStringMatchCmd( * "string length" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "string length" @@ -3805,20 +3799,23 @@ TclCompileStringLenCmd( { DefineLineInformation; /* TIP #280 */ Tcl_Token *tokenPtr; + Tcl_Obj *objPtr; if (parsePtr->numWords != 2) { return TCL_ERROR; } tokenPtr = TokenAfter(parsePtr->tokenPtr); - if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { + TclNewObj(objPtr); + if (TclWordKnownAtCompileTime(tokenPtr, objPtr)) { /* - * Here someone is asking for the length of a static string. Just push - * the actual character (not byte) length. + * Here someone is asking for the length of a static string (or + * something with backslashes). Just push the actual character (not + * byte) length. */ char buf[TCL_INTEGER_SPACE]; - int len = Tcl_NumUtfChars(tokenPtr[1].start, tokenPtr[1].size); + int len = Tcl_GetCharLength(objPtr); len = sprintf(buf, "%d", len); PushLiteral(envPtr, buf, len); @@ -3827,6 +3824,7 @@ TclCompileStringLenCmd( CompileTokens(envPtr, tokenPtr, interp); TclEmitOpcode(INST_STR_LEN, envPtr); } + TclDecrRefCount(objPtr); return TCL_OK; } @@ -3838,10 +3836,10 @@ TclCompileStringLenCmd( * Procedure called to compile the "subst" command. * * Results: - * Returns TCL_OK for successful compile, or TCL_ERROR to defer - * evaluation to runtime (either when it is too complex to get the - * semantics right, or when we know for sure that it is an error but need - * the error to happen at the right time). + * Returns TCL_OK for successful compile, or TCL_ERROR to defer + * evaluation to runtime (either when it is too complex to get the + * semantics right, or when we know for sure that it is an error but need + * the error to happen at the right time). * * Side effects: * Instructions are added to envPtr to execute the "subst" command at @@ -3891,7 +3889,7 @@ TclCompileSubstCmd( */ /* TODO: Figure out expansion to cover WordKnownAtCompileTime - * The difficulty is that WKACT makes a copy, and if TclSubstParse + * The difficulty is that WKACT makes a copy, and if TclSubstParse * below parses the copy of the original source string, some deep * parts of the compile machinery get upset. They want all pointers * stored in Tcl_Tokens to point back to the same original string. @@ -4127,10 +4125,10 @@ TclSubstCompile( * Procedure called to compile the "switch" command. * * Results: - * Returns TCL_OK for successful compile, or TCL_ERROR to defer - * evaluation to runtime (either when it is too complex to get the - * semantics right, or when we know for sure that it is an error but need - * the error to happen at the right time). + * Returns TCL_OK for successful compile, or TCL_ERROR to defer + * evaluation to runtime (either when it is too complex to get the + * semantics right, or when we know for sure that it is an error but need + * the error to happen at the right time). * * Side effects: * Instructions are added to envPtr to execute the "switch" command at @@ -5069,8 +5067,8 @@ PrintJumptableInfo( * Procedure called to compile the "try" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "try" command at @@ -5697,8 +5695,8 @@ IssueTryFinallyInstructions( * Procedure called to compile the "unset" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "unset" command at @@ -5795,8 +5793,8 @@ TclCompileUnsetCmd( * Procedure called to compile the "while" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "while" command at @@ -5975,8 +5973,8 @@ TclCompileWhileCmd( * necessary (append, lappend, set). * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "set" command at @@ -6057,8 +6055,7 @@ PushVarName( * assemble the corresponding token. */ - elemTokenPtr = (Tcl_Token *) TclStackAlloc(interp, - sizeof(Tcl_Token)); + elemTokenPtr = TclStackAlloc(interp, sizeof(Tcl_Token)); allocedTokens = 1; elemTokenPtr->type = TCL_TOKEN_TEXT; elemTokenPtr->start = elName; @@ -6215,8 +6212,8 @@ PushVarName( * Utility routine to compile the unary operator commands. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the compiled command at @@ -6256,8 +6253,8 @@ CompileUnaryOpCmd( * after substitutions are completed. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the compiled command at @@ -6309,8 +6306,8 @@ CompileAssociativeBinaryOpCmd( * accept exactly two arguments. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the compiled command at @@ -6437,8 +6434,8 @@ CompileComparisonOpCmd( * division, which are special. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the compiled command at @@ -6797,7 +6794,7 @@ TclCompileDivOpCmd( * is known at compile time, defines a corresponding local variable. * * Results: - * Returns the variable's index in the table of compiled locals if the + * Returns the variable's index in the table of compiled locals if the * tail is known at compile time, or -1 otherwise. * * Side effects: @@ -6891,8 +6888,8 @@ IndexTailVarIfKnown( * Procedure called to compile the "upvar" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "upvar" command at @@ -7001,8 +6998,8 @@ TclCompileUpvarCmd( * the subcommand "namespace upvar" is compiled to bytecodes. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "namespace upvar" @@ -7092,8 +7089,8 @@ TclCompileNamespaceCmd( * Procedure called to compile the "global" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "global" command at @@ -7167,8 +7164,8 @@ TclCompileGlobalCmd( * Procedure called to compile the "variable" command. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "variable" command at @@ -7248,8 +7245,8 @@ TclCompileVariableCmd( * Procedure called to compile the "info exists" subcommand. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the "info exists" -- cgit v0.12 From 5330abf13c39fb141897f214a8e8beaddb51a7f5 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 21 Feb 2010 08:56:19 +0000 Subject: Fix [Bug 2954959] expr abs(0.0) is -0.0 and added test cases for it. --- ChangeLog | 9 +++++++-- generic/tclBasic.c | 10 +++++++--- tests/expr.test | 8 +++++++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d01665..5e2df70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-21 Jan Nijtmans + + * generic/tclBasic.c: Fix [Bug 2954959] expr abs(0.0) is -0.0 + * tests/expr.test + 2010-02-20 Donal K. Fellows * generic/tclCompCmds.c (TclCompileStringLenCmd): Make [string length] @@ -31,8 +36,8 @@ 2010-02-16 Jan Nijtmans - * generic/tclInt.h: Change order of various struct members, restoring - potential binary incompatibility with Tcl 8.5 + * generic/tclInt.h: Change order of various struct members, + fixing potential binary incompatibility with Tcl 8.5 2010-02-16 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0a191bb..527ed81 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.444 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.445 2010/02/21 08:56:19 nijtmans Exp $ */ #include "tclInt.h" @@ -7433,9 +7433,13 @@ ExprAbsFunc( if (type == TCL_NUMBER_DOUBLE) { double d = *((const double *) ptr); + static const double poszero = 0.0; - if (d <= 0.0) { - Tcl_SetObjResult(interp, Tcl_NewDoubleObj(-d)); + /* We need to distinguish here between positive 0.0 and + * negative -0.0, see Bug ID #2954959. + */ + if ((d <= -0.0) && memcmp(&d, &poszero, sizeof(double))) { + Tcl_SetObjResult(interp, Tcl_NewDoubleObj(-d)); } else { Tcl_SetObjResult(interp, objv[1]); } diff --git a/tests/expr.test b/tests/expr.test index f1612b6..cbba243 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.76 2009/08/12 16:06:44 dgp Exp $ +# RCS: @(#) $Id: expr.test,v 1.77 2010/02/21 08:56:19 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -6685,6 +6685,12 @@ test expr-38.6 {abs and -0 [Bug 1893815]} { test expr-38.7 {abs and -0 [Bug 1893815]} { ::tcl::mathfunc::abs -1e-324 } 0.0 +test expr-38.8 {abs and 0.0 [Bug 2954959]} { + ::tcl::mathfunc::abs 0.0 +} 0.0 +test expr-38.9 {abs and 0.0 [Bug 2954959]} { + expr {abs(0.0)} +} 0.0 testConstraint testexprlongobj [llength [info commands testexprlongobj]] testConstraint testexprdoubleobj [llength [info commands testexprdoubleobj]] -- cgit v0.12 From 3fb3008b2698db7d2a9f46adeac8c91565ba890b Mon Sep 17 00:00:00 2001 From: mdejong Date: Sun, 21 Feb 2010 18:55:40 +0000 Subject: * tests/regexp.test: Add test cases back ported from Jacl regexp work. --- ChangeLog | 5 +++ tests/regexp.test | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5e2df70..53ec490 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-21 Mo DeJong + + * tests/regexp.test: Add test cases back ported from + Jacl regexp work. + 2010-02-21 Jan Nijtmans * generic/tclBasic.c: Fix [Bug 2954959] expr abs(0.0) is -0.0 diff --git a/tests/regexp.test b/tests/regexp.test index c77e147..e2282eb 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.35 2010/02/11 11:14:22 dkf Exp $ +# RCS: @(#) $Id: regexp.test,v 1.36 2010/02/21 18:55:41 mdejong Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -121,6 +121,28 @@ test regexp-2.10 {getting substrings back from regexp} { set f2 {} list [regexp f\352te(b*)c eff\352tebbbbc foo f2] $foo $f2 } [list 1 f\352tebbbbc bbbb] +test regexp-2.11 {non-capturing subgroup} { + set foo {} + set f2 {} + list [regexp {str(?:a+)} straa foo f2] $foo $f2 +} [list 1 straa {}] +test regexp-2.12 {non-capturing subgroup with -inline} { + regexp -inline {str(?:a+)} straa +} {straa} +test regexp-2.13 {non-capturing and capturing subgroups} { + set foo {} + set f2 {} + set f3 {} + list [regexp {str(?:a+)(c+)} straacc foo f2 f3] $foo $f2 $f3 +} [list 1 straacc cc {}] +test regexp-2.14 {non-capturing and capturing subgroups} { + regexp -inline {str(?:a+)(c+)} straacc +} {straacc cc} +test regexp-2.15 {getting substrings back from regexp} { + set foo NA + set f2 NA + list [regexp {str(?:a+)} straa foo f2] $foo $f2 +} [list 1 straa {}] test regexp-3.1 {-indices option to regexp} { set foo {} @@ -543,6 +565,10 @@ test regexp-15.10 {regexp -start, end relative index} { catch {unset x} list [regexp -start end-1 {\d} 1abc2de3 x] [info exists x] $x } {1 1 3} +test regexp-15.11 {regexp -start, over end of string} { + set x NA + list [regexp -start 2 {.*} ab x] $x +} {1 {}} test regexp-16.1 {regsub -start} { catch {unset x} @@ -573,6 +599,62 @@ test regexp-16.7 {regexp -start, end relative index} { test regexp-16.8 {regexp -start, end relative index} { list [regsub -start end-1 a aaa b x] $x } {1 aab} +test regexp-16.9 {regsub -start and -all} { + set foo {} + list [regsub -start 0 -all x+ axxxbxx |&| foo] $foo +} {2 a|xxx|b|xx|} +test regexp-16.10 {regsub -start and -all} { + set foo {} + list [regsub -start 1 -all x+ axxxbxx |&| foo] $foo +} {2 a|xxx|b|xx|} +test regexp-16.11 {regsub -start and -all} { + set foo {} + list [regsub -start 4 -all x+ axxxbxx |&| foo] $foo +} {1 axxxb|xx|} +test regexp-16.12 {regsub -start} { + set foo {} + list [regsub -start 4 x+ axxxbxx |&| foo] $foo +} {1 axxxb|xx|} +test regexp-16.13 {regsub -start and -all} { + set foo {} + list [regsub -start 1 -all a+ "" & foo] $foo +} {0 {}} +test regexp-16.14 {regsub -start} { + set foo {} + list [regsub -start 1 a+ "" & foo] $foo +} {0 {}} +test regexp-16.15 {regsub -start and -all} { + set foo {} + list [regsub -start 2 -all a+ "xy" & foo] $foo +} {0 xy} +test regexp-16.16 {regsub -start} { + set foo {} + list [regsub -start 2 a+ "xy" & foo] $foo +} {0 xy} +test regexp-16.17 {regsub -start and -all} { + set foo {} + list [regsub -start 1 -all y+ "xy" & foo] $foo +} {1 xy} +test regexp-16.18 {regsub -start} { + set foo {} + list [regsub -start 1 y+ "xy" & foo] $foo +} {1 xy} +test regexp-16.19 {regsub -start} { + set foo {} + list [regsub -start -1 a+ "" & foo] $foo +} {0 {}} +test regexp-16.20 {regsub -start, loss of ^$ behavior} { + set foo NA + list [regsub -start 1 {^$} {} & foo] $foo +} {0 {}} +test regexp-16.21 {regsub -start, loss of ^$ behavior} { + set foo NA + list [regsub -start 1 {^.*$} abc & foo] $foo +} {0 abc} +test regexp-16.22 {regsub -start, loss of ^$ behavior} { + set foo NA + list [regsub -all -start 1 {^.*$} abc & foo] $foo +} {0 abc} test regexp-17.1 {regexp -inline} { regexp -inline b ababa @@ -652,6 +734,12 @@ test regexp-19.1 {regsub null replacement} { list $result [string length $result] } "\0a\0hel\0a\0lo\0a\0 14" +test regexp-19.2 {regsub null replacement} { + regsub -all {@} {@hel@lo@} "\0a\0" result + set expected "\0a\0hel\0a\0lo\0a\0" + string equal $result $expected +} 1 + test regexp-20.1 {regsub shared object shimmering} { # Bug #461322 set a abcdefghijklmnopqurstuvwxyz @@ -703,6 +791,27 @@ test regexp-21.12 {multiple matches handle newlines} { test regexp-21.13 {multiple matches handle newlines} { regexp -all -inline -indices -line -- ^ "a\nb\nc" } {{0 -1} {2 1} {4 3}} +test regexp-21.14 {regsub works with empty string} { + regsub -- ^ {} & +} {} +test regexp-21.15 {regsub works with empty string} { + regsub -- ^ {} foo& +} {foo} +test regexp-21.16 {regsub works with empty string} { + regsub -all -- ^ {} foo& +} {foo} +test regexp-21.17 {regsub works with empty string} { + regsub -- ^ {} {foo\0} +} {foo} +test regexp-21.18 {regsub works with empty string} { + regsub -- ^.* {} {foo$0} +} {foo$0} +test regexp-21.19 {regsub works with empty string} { + regsub -- ^ {input} {} +} {input} +test regexp-21.20 {regsub works with empty string} { + regsub -- x {} {foo} +} {} test regexp-22.1 {Bug 1810038} { regexp ($|^X)* {} @@ -957,3 +1066,4 @@ test regexp-26.13 {regexp without -line option} { # cleanup ::tcltest::cleanupTests return + -- cgit v0.12 From c0efda860028550fa1392602cb9d479a67c7cf55 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 21 Feb 2010 20:09:37 +0000 Subject: Follow-up to Fix [Bug 2954959] expr abs(0.0) is -0.0 Some more tests, showing that the LONG implementation was not quite correct too, and a fix for that. Some more internal "const" additions --- ChangeLog | 5 +++++ generic/regc_lex.c | 6 +++--- generic/regerror.c | 2 +- generic/tclBasic.c | 53 +++++++++++++++++++++++++++++++++------------------- generic/tclDate.c | 12 ++++++------ generic/tclGetDate.y | 14 +++++++------- generic/tclStubLib.c | 4 ++-- tests/expr.test | 14 +++++++++++++- 8 files changed, 71 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53ec490..f3fcdc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ 2010-02-21 Jan Nijtmans + * generic/tclDate.c Some more const tables. + * generic/tclGetDate.y + * generic/regc_lex.c + * generic/regerror.c + * generic/tclStubLib.c * generic/tclBasic.c: Fix [Bug 2954959] expr abs(0.0) is -0.0 * tests/expr.test diff --git a/generic/regc_lex.c b/generic/regc_lex.c index 4be02c6..f3a46da 100644 --- a/generic/regc_lex.c +++ b/generic/regc_lex.c @@ -742,10 +742,10 @@ lexescape( struct vars *v) { chr c; - static chr alert[] = { + static const chr alert[] = { CHR('a'), CHR('l'), CHR('e'), CHR('r'), CHR('t') }; - static chr esc[] = { + static const chr esc[] = { CHR('E'), CHR('S'), CHR('C') }; const chr *save; @@ -1135,7 +1135,7 @@ newline(void) static const chr * ch(void) { - static chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') }; + static const chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') }; return chstr; } diff --git a/generic/regerror.c b/generic/regerror.c index 49b6f3e..a1a0163 100644 --- a/generic/regerror.c +++ b/generic/regerror.c @@ -35,7 +35,7 @@ * Unknown-error explanation. */ -static char unk[] = "*** unknown regex error code 0x%x ***"; +static const char unk[] = "*** unknown regex error code 0x%x ***"; /* * Struct to map among codes, code names, and explanations. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 527ed81..4001407 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.445 2010/02/21 08:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.446 2010/02/21 20:09:38 nijtmans Exp $ */ #include "tclInt.h" @@ -7419,15 +7419,25 @@ ExprAbsFunc( if (type == TCL_NUMBER_LONG) { long l = *((const long *) ptr); - if (l <= (long)0) { - if (l == LONG_MIN) { - TclBNInitBignumFromLong(&big, l); - goto tooLarge; + if (l > (long)0) { + goto unChanged; + } else if (l == (long)0) { + const char *string = objv[1]->bytes; + if (!string) { + /* There is no string representation, so internal one is correct */ + goto unChanged; } - Tcl_SetObjResult(interp, Tcl_NewLongObj(-l)); - } else { - Tcl_SetObjResult(interp, objv[1]); + while (isspace(UCHAR(*string))) { + ++string; + } + if (*string != '-') { + goto unChanged; + } + } else if (l == LONG_MIN) { + TclBNInitBignumFromLong(&big, l); + goto tooLarge; } + Tcl_SetObjResult(interp, Tcl_NewLongObj(-l)); return TCL_OK; } @@ -7438,11 +7448,16 @@ ExprAbsFunc( /* We need to distinguish here between positive 0.0 and * negative -0.0, see Bug ID #2954959. */ - if ((d <= -0.0) && memcmp(&d, &poszero, sizeof(double))) { - Tcl_SetObjResult(interp, Tcl_NewDoubleObj(-d)); + if (d == -0.0) { + if (!memcmp(&d, &poszero, sizeof(double))) { + goto unChanged; + } } else { - Tcl_SetObjResult(interp, objv[1]); + if (d > -0.0) { + goto unChanged; + } } + Tcl_SetObjResult(interp, Tcl_NewDoubleObj(-d)); return TCL_OK; } @@ -7450,15 +7465,14 @@ ExprAbsFunc( if (type == TCL_NUMBER_WIDE) { Tcl_WideInt w = *((const Tcl_WideInt *) ptr); - if (w < (Tcl_WideInt)0) { - if (w == LLONG_MIN) { - TclBNInitBignumFromWideInt(&big, w); - goto tooLarge; - } - Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-w)); - } else { - Tcl_SetObjResult(interp, objv[1]); + if (w >= (Tcl_WideInt)0) { + goto unChanged; + } + if (w == LLONG_MIN) { + TclBNInitBignumFromWideInt(&big, w); + goto tooLarge; } + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-w)); return TCL_OK; } #endif @@ -7471,6 +7485,7 @@ ExprAbsFunc( mp_neg(&big, &big); Tcl_SetObjResult(interp, Tcl_NewBignumObj(&big)); } else { + unChanged: Tcl_SetObjResult(interp, objv[1]); } return TCL_OK; diff --git a/generic/tclDate.c b/generic/tclDate.c index 5d4a507..f873e3f 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2300,7 +2300,7 @@ MODULE_SCOPE int yynerrs; * Month and day table. */ -static TABLE MonthDayTable[] = { +static const TABLE MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, @@ -2332,7 +2332,7 @@ static TABLE MonthDayTable[] = { * Time units table. */ -static TABLE UnitsTable[] = { +static const TABLE UnitsTable[] = { { "year", tMONTH_UNIT, 12 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, @@ -2350,7 +2350,7 @@ static TABLE UnitsTable[] = { * Assorted relative-time words. */ -static TABLE OtherTable[] = { +static const TABLE OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, @@ -2383,7 +2383,7 @@ static TABLE OtherTable[] = { * point constants to work around an SGI compiler bug). */ -static TABLE TimezoneTable[] = { +static const TABLE TimezoneTable[] = { { "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR( 0) }, @@ -2468,7 +2468,7 @@ static TABLE TimezoneTable[] = { * Military timezone table. */ -static TABLE MilitaryTable[] = { +static const TABLE MilitaryTable[] = { { "a", tZONE, -HOUR( 1) }, { "b", tZONE, -HOUR( 2) }, { "c", tZONE, -HOUR( 3) }, @@ -2561,7 +2561,7 @@ LookupWord( { register char *p; register char *q; - register TABLE *tp; + register const TABLE *tp; int i, abbrev; /* diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 922b931..c2498b2 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.43 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.44 2010/02/21 20:09:37 nijtmans Exp $ */ %parse-param {DateInfo* info} @@ -512,7 +512,7 @@ MODULE_SCOPE int yynerrs; * Month and day table. */ -static TABLE MonthDayTable[] = { +static const TABLE MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, @@ -544,7 +544,7 @@ static TABLE MonthDayTable[] = { * Time units table. */ -static TABLE UnitsTable[] = { +static const TABLE UnitsTable[] = { { "year", tMONTH_UNIT, 12 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, @@ -562,7 +562,7 @@ static TABLE UnitsTable[] = { * Assorted relative-time words. */ -static TABLE OtherTable[] = { +static const TABLE OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, @@ -595,7 +595,7 @@ static TABLE OtherTable[] = { * point constants to work around an SGI compiler bug). */ -static TABLE TimezoneTable[] = { +static const TABLE TimezoneTable[] = { { "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR( 0) }, @@ -680,7 +680,7 @@ static TABLE TimezoneTable[] = { * Military timezone table. */ -static TABLE MilitaryTable[] = { +static const TABLE MilitaryTable[] = { { "a", tZONE, -HOUR( 1) }, { "b", tZONE, -HOUR( 2) }, { "c", tZONE, -HOUR( 3) }, @@ -773,7 +773,7 @@ LookupWord( { register char *p; register char *q; - register TABLE *tp; + register const TABLE *tp; int i, abbrev; /* diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 24eef57..b2f39fa 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.29 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.30 2010/02/21 20:09:38 nijtmans Exp $ */ /* @@ -175,7 +175,7 @@ TclTomMathInitializeStubs( ClientData pkgClientData = NULL; const char *actualVersion = Tcl_PkgRequireEx(interp, packageName, version, exact, &pkgClientData); - TclTomMathStubs *stubsPtr = pkgClientData; + const TclTomMathStubs *stubsPtr = pkgClientData; if (actualVersion == NULL) { return NULL; diff --git a/tests/expr.test b/tests/expr.test index cbba243..05fc956 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.77 2010/02/21 08:56:19 nijtmans Exp $ +# RCS: @(#) $Id: expr.test,v 1.78 2010/02/21 20:09:38 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -6691,6 +6691,18 @@ test expr-38.8 {abs and 0.0 [Bug 2954959]} { test expr-38.9 {abs and 0.0 [Bug 2954959]} { expr {abs(0.0)} } 0.0 +test expr-38.10 {abs and -0x0 [Bug 2954959]} { + expr {abs(-0x0)} +} 0 +test expr-38.11 {abs and 0x0 [Bug 2954959]} { + ::tcl::mathfunc::abs { 0x0} +} { 0x0} +test expr-38.12 {abs and -0x0 [Bug 2954959]} { + ::tcl::mathfunc::abs { -0x0} +} 0 +test expr-38.13 {abs and 0.0 [Bug 2954959]} { + ::tcl::mathfunc::abs 1e-324 +} 1e-324 testConstraint testexprlongobj [llength [info commands testexprlongobj]] testConstraint testexprdoubleobj [llength [info commands testexprdoubleobj]] -- cgit v0.12 From e61e7142baea090d78543a1da269f832e363b1b2 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 22 Feb 2010 10:27:12 +0000 Subject: Convert literal tabs in strings into \t sequences. --- generic/tclExecute.c | 118 +++++++++++++++++++++++++-------------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 843c3fd..b09fce3 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.472 2010/01/31 22:25:11 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.473 2010/02/22 10:27:12 dkf Exp $ */ #include "tclInt.h" @@ -124,7 +124,7 @@ long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS] = { 0, 0, 0, 0, 0 }; typedef struct { const char *name; /* Name of function. */ - int numArgs; /* Number of arguments for function. */ + int numArgs; /* Number of arguments for function. */ } BuiltinFunc; /* @@ -1050,7 +1050,7 @@ GrowEvaluationStack( while (needed > newElems) { newElems *= 2; } - newBytes = sizeof (ExecStack) + (newElems-1) * sizeof(Tcl_Obj *); + newBytes = sizeof(ExecStack) + (newElems-1) * sizeof(Tcl_Obj *); oldPtr = esPtr; esPtr = (ExecStack *) ckalloc(newBytes); @@ -1184,13 +1184,13 @@ TclStackFree( esPtr->tosPtr = &esPtr->stackWords[-1]; if (esPtr->prevPtr) { - eePtr->execStackPtr = esPtr->prevPtr; + eePtr->execStackPtr = esPtr->prevPtr; } if (esPtr->nextPtr) { - if (!esPtr->prevPtr) { - eePtr->execStackPtr = esPtr->nextPtr; - } - DeleteExecStack(esPtr); + if (!esPtr->prevPtr) { + eePtr->execStackPtr = esPtr->nextPtr; + } + DeleteExecStack(esPtr); } } @@ -1371,7 +1371,7 @@ ExprObjCallback( * Results: * A (ByteCode *) is returned pointing to the resulting ByteCode. * The caller must manage its refCount and arrange for a call to - * TclCleanupByteCode() when the last reference disappears. + * TclCleanupByteCode() when the last reference disappears. * * Side effects: * The Tcl_ObjType of objPtr is changed to the "bytecode" type, @@ -1391,7 +1391,7 @@ CompileExprObj( CompileEnv compEnv; /* Compilation environment structure allocated * in frame. */ register ByteCode *codePtr = NULL; - /* Tcl Internal type of bytecode. Initialized + /* Tcl Internal type of bytecode. Initialized * to avoid compiler warning. */ /* @@ -1497,8 +1497,8 @@ DupExprCodeInternalRep( * FreeExprCodeInternalRep -- * * Part of the Tcl object type implementation for Tcl expression - * bytecode. Frees the storage allocated to hold the internal rep, unless - * ref counts indicate bytecode execution is still in progress. + * bytecode. Frees the storage allocated to hold the internal rep, unless + * ref counts indicate bytecode execution is still in progress. * * Results: * None. @@ -5136,7 +5136,7 @@ TclExecuteByteCode( * need to convert the double to a suitably sized integer. * * Need this to get comparsions like - * expr 20000000000000003 < 20000000000000004.0 + * expr 20000000000000003 < 20000000000000004.0 * right. Converting the first argument to double will yield * two double values that are equivalent within double * precision. Converting the double to an integer gets done @@ -8832,29 +8832,29 @@ EvalStatsCmd( "Compilation and execution statistics for interpreter 0x%p\n", iPtr); - fprintf(stdout, "\nNumber ByteCodes executed %ld\n", + fprintf(stdout, "\nNumber ByteCodes executed\t%ld\n", statsPtr->numExecutions); - fprintf(stdout, "Number ByteCodes compiled %ld\n", + fprintf(stdout, "Number ByteCodes compiled\t%ld\n", statsPtr->numCompilations); - fprintf(stdout, " Mean executions/compile %.1f\n", + fprintf(stdout, " Mean executions/compile\t%.1f\n", statsPtr->numExecutions / (float)statsPtr->numCompilations); - fprintf(stdout, "\nInstructions executed %.0f\n", + fprintf(stdout, "\nInstructions executed\t\t%.0f\n", numInstructions); - fprintf(stdout, " Mean inst/compile %.0f\n", + fprintf(stdout, " Mean inst/compile\t\t%.0f\n", numInstructions / statsPtr->numCompilations); - fprintf(stdout, " Mean inst/execution %.0f\n", + fprintf(stdout, " Mean inst/execution\t\t%.0f\n", numInstructions / statsPtr->numExecutions); - fprintf(stdout, "\nTotal ByteCodes %ld\n", + fprintf(stdout, "\nTotal ByteCodes\t\t\t%ld\n", statsPtr->numCompilations); - fprintf(stdout, " Source bytes %.6g\n", + fprintf(stdout, " Source bytes\t\t\t%.6g\n", statsPtr->totalSrcBytes); - fprintf(stdout, " Code bytes %.6g\n", + fprintf(stdout, " Code bytes\t\t\t%.6g\n", totalCodeBytes); - fprintf(stdout, " ByteCode bytes %.6g\n", + fprintf(stdout, " ByteCode bytes\t\t%.6g\n", statsPtr->totalByteCodeBytes); - fprintf(stdout, " Literal bytes %.6g\n", + fprintf(stdout, " Literal bytes\t\t%.6g\n", totalLiteralBytes); fprintf(stdout, " table %lu + bkts %lu + entries %lu + objects %lu + strings %.6g\n", (unsigned long) sizeof(LiteralTable), @@ -8862,20 +8862,20 @@ EvalStatsCmd( (unsigned long) (statsPtr->numLiteralsCreated * sizeof(LiteralEntry)), (unsigned long) (statsPtr->numLiteralsCreated * sizeof(Tcl_Obj)), statsPtr->totalLitStringBytes); - fprintf(stdout, " Mean code/compile %.1f\n", + fprintf(stdout, " Mean code/compile\t\t%.1f\n", totalCodeBytes / statsPtr->numCompilations); - fprintf(stdout, " Mean code/source %.1f\n", + fprintf(stdout, " Mean code/source\t\t%.1f\n", totalCodeBytes / statsPtr->totalSrcBytes); - fprintf(stdout, "\nCurrent (active) ByteCodes %ld\n", + fprintf(stdout, "\nCurrent (active) ByteCodes\t%ld\n", numCurrentByteCodes); - fprintf(stdout, " Source bytes %.6g\n", + fprintf(stdout, " Source bytes\t\t\t%.6g\n", statsPtr->currentSrcBytes); - fprintf(stdout, " Code bytes %.6g\n", + fprintf(stdout, " Code bytes\t\t\t%.6g\n", currentCodeBytes); - fprintf(stdout, " ByteCode bytes %.6g\n", + fprintf(stdout, " ByteCode bytes\t\t%.6g\n", statsPtr->currentByteCodeBytes); - fprintf(stdout, " Literal bytes %.6g\n", + fprintf(stdout, " Literal bytes\t\t%.6g\n", currentLiteralBytes); fprintf(stdout, " table %lu + bkts %lu + entries %lu + objects %lu + strings %.6g\n", (unsigned long) sizeof(LiteralTable), @@ -8883,9 +8883,9 @@ EvalStatsCmd( (unsigned long) (iPtr->literalTable.numEntries * sizeof(LiteralEntry)), (unsigned long) (iPtr->literalTable.numEntries * sizeof(Tcl_Obj)), statsPtr->currentLitStringBytes); - fprintf(stdout, " Mean code/source %.1f\n", + fprintf(stdout, " Mean code/source\t\t%.1f\n", currentCodeBytes / statsPtr->currentSrcBytes); - fprintf(stdout, " Code + source bytes %.6g (%0.1f mean code/src)\n", + fprintf(stdout, " Code + source bytes\t\t%.6g (%0.1f mean code/src)\n", (currentCodeBytes + statsPtr->currentSrcBytes), (currentCodeBytes / statsPtr->currentSrcBytes) + 1.0); @@ -8898,17 +8898,17 @@ EvalStatsCmd( numSharedMultX = 0; fprintf(stdout, "\nTcl_IsShared object check (all objects):\n"); - fprintf(stdout, " Object had refcount <=1 (not shared) %ld\n", + fprintf(stdout, " Object had refcount <=1 (not shared)\t%ld\n", tclObjsShared[1]); for (i = 2; i < TCL_MAX_SHARED_OBJ_STATS; i++) { - fprintf(stdout, " refcount ==%d %ld\n", + fprintf(stdout, " refcount ==%d\t\t%ld\n", i, tclObjsShared[i]); numSharedMultX += tclObjsShared[i]; } - fprintf(stdout, " refcount >=%d %ld\n", + fprintf(stdout, " refcount >=%d\t\t%ld\n", i, tclObjsShared[0]); numSharedMultX += tclObjsShared[0]; - fprintf(stdout, " Total shared objects %d\n", + fprintf(stdout, " Total shared objects\t\t\t%d\n", numSharedMultX); /* @@ -8945,31 +8945,31 @@ EvalStatsCmd( sharingBytesSaved = (objBytesIfUnshared + strBytesIfUnshared) - currentLiteralBytes; - fprintf(stdout, "\nTotal objects (all interps) %ld\n", + fprintf(stdout, "\nTotal objects (all interps)\t%ld\n", tclObjsAlloced); - fprintf(stdout, "Current objects %ld\n", + fprintf(stdout, "Current objects\t\t\t%ld\n", (tclObjsAlloced - tclObjsFreed)); - fprintf(stdout, "Total literal objects %ld\n", + fprintf(stdout, "Total literal objects\t\t%ld\n", statsPtr->numLiteralsCreated); - fprintf(stdout, "\nCurrent literal objects %d (%0.1f%% of current objects)\n", + fprintf(stdout, "\nCurrent literal objects\t\t%d (%0.1f%% of current objects)\n", globalTablePtr->numEntries, Percent(globalTablePtr->numEntries, tclObjsAlloced-tclObjsFreed)); - fprintf(stdout, " ByteCode literals %ld (%0.1f%% of current literals)\n", + fprintf(stdout, " ByteCode literals\t\t%ld (%0.1f%% of current literals)\n", numByteCodeLits, Percent(numByteCodeLits, globalTablePtr->numEntries)); - fprintf(stdout, " Literals reused > 1x %d\n", + fprintf(stdout, " Literals reused > 1x\t\t%d\n", numSharedMultX); - fprintf(stdout, " Mean reference count %.2f\n", + fprintf(stdout, " Mean reference count\t\t%.2f\n", ((double) refCountSum) / globalTablePtr->numEntries); - fprintf(stdout, " Mean len, str reused >1x %.2f\n", + fprintf(stdout, " Mean len, str reused >1x \t%.2f\n", (numSharedMultX ? strBytesSharedMultX/numSharedMultX : 0.0)); - fprintf(stdout, " Mean len, str used 1x %.2f\n", + fprintf(stdout, " Mean len, str used 1x\t\t%.2f\n", (numSharedOnce ? strBytesSharedOnce/numSharedOnce : 0.0)); - fprintf(stdout, " Total sharing savings %.6g (%0.1f%% of bytes if no sharing)\n", + fprintf(stdout, " Total sharing savings\t\t%.6g (%0.1f%% of bytes if no sharing)\n", sharingBytesSaved, Percent(sharingBytesSaved, objBytesIfUnshared+strBytesIfUnshared)); - fprintf(stdout, " Bytes with sharing %.6g\n", + fprintf(stdout, " Bytes with sharing\t\t%.6g\n", currentLiteralBytes); fprintf(stdout, " table %lu + bkts %lu + entries %lu + objects %lu + strings %.6g\n", (unsigned long) sizeof(LiteralTable), @@ -8977,13 +8977,13 @@ EvalStatsCmd( (unsigned long) (iPtr->literalTable.numEntries * sizeof(LiteralEntry)), (unsigned long) (iPtr->literalTable.numEntries * sizeof(Tcl_Obj)), statsPtr->currentLitStringBytes); - fprintf(stdout, " Bytes if no sharing %.6g = objects %.6g + strings %.6g\n", + fprintf(stdout, " Bytes if no sharing\t\t%.6g = objects %.6g + strings %.6g\n", (objBytesIfUnshared + strBytesIfUnshared), objBytesIfUnshared, strBytesIfUnshared); - fprintf(stdout, " String sharing savings %.6g = unshared %.6g - shared %.6g\n", + fprintf(stdout, " String sharing savings \t%.6g = unshared %.6g - shared %.6g\n", (strBytesIfUnshared - statsPtr->currentLitStringBytes), strBytesIfUnshared, statsPtr->currentLitStringBytes); - fprintf(stdout, " Literal mgmt overhead %ld (%0.1f%% of bytes with sharing)\n", + fprintf(stdout, " Literal mgmt overhead\t\t%ld (%0.1f%% of bytes with sharing)\n", literalMgmtBytes, Percent(literalMgmtBytes, currentLiteralBytes)); fprintf(stdout, " table %lu + buckets %lu + entries %lu\n", @@ -9031,7 +9031,7 @@ EvalStatsCmd( */ fprintf(stdout, "\nLiteral string sizes:\n"); - fprintf(stdout, " Up to length Percentage\n"); + fprintf(stdout, "\t Up to length\t\tPercentage\n"); maxSizeDecade = 0; for (i = 31; i >= 0; i--) { if (statsPtr->literalCount[i] > 0) { @@ -9043,7 +9043,7 @@ EvalStatsCmd( for (i = 0; i <= maxSizeDecade; i++) { decadeHigh = (1 << (i+1)) - 1; sum += statsPtr->literalCount[i]; - fprintf(stdout, " %10d %8.0f%%\n", + fprintf(stdout, "\t%10d\t\t%8.0f%%\n", decadeHigh, Percent(sum, statsPtr->numLiteralsCreated)); } @@ -9057,7 +9057,7 @@ EvalStatsCmd( */ fprintf(stdout, "\nSource sizes:\n"); - fprintf(stdout, " Up to size Percentage\n"); + fprintf(stdout, "\t Up to size\t\tPercentage\n"); minSizeDecade = maxSizeDecade = 0; for (i = 0; i < 31; i++) { if (statsPtr->srcCount[i] > 0) { @@ -9075,12 +9075,12 @@ EvalStatsCmd( for (i = minSizeDecade; i <= maxSizeDecade; i++) { decadeHigh = (1 << (i+1)) - 1; sum += statsPtr->srcCount[i]; - fprintf(stdout, " %10d %8.0f%%\n", + fprintf(stdout, "\t%10d\t\t%8.0f%%\n", decadeHigh, Percent(sum, statsPtr->numCompilations)); } fprintf(stdout, "\nByteCode sizes:\n"); - fprintf(stdout, " Up to size Percentage\n"); + fprintf(stdout, "\t Up to size\t\tPercentage\n"); minSizeDecade = maxSizeDecade = 0; for (i = 0; i < 31; i++) { if (statsPtr->byteCodeCount[i] > 0) { @@ -9098,12 +9098,12 @@ EvalStatsCmd( for (i = minSizeDecade; i <= maxSizeDecade; i++) { decadeHigh = (1 << (i+1)) - 1; sum += statsPtr->byteCodeCount[i]; - fprintf(stdout, " %10d %8.0f%%\n", + fprintf(stdout, "\t%10d\t\t%8.0f%%\n", decadeHigh, Percent(sum, statsPtr->numCompilations)); } fprintf(stdout, "\nByteCode longevity (excludes Current ByteCodes):\n"); - fprintf(stdout, " Up to ms Percentage\n"); + fprintf(stdout, "\t Up to ms\t\tPercentage\n"); minSizeDecade = maxSizeDecade = 0; for (i = 0; i < 31; i++) { if (statsPtr->lifetimeCount[i] > 0) { @@ -9121,7 +9121,7 @@ EvalStatsCmd( for (i = minSizeDecade; i <= maxSizeDecade; i++) { decadeHigh = (1 << (i+1)) - 1; sum += statsPtr->lifetimeCount[i]; - fprintf(stdout, " %12.3f %8.0f%%\n", + fprintf(stdout, "\t%12.3f\t\t%8.0f%%\n", decadeHigh/1000.0, Percent(sum, statsPtr->numByteCodesFreed)); } -- cgit v0.12 From b3ceb866eec8e0f9dbde55f024efb248732602ca Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 22 Feb 2010 13:07:55 +0000 Subject: Added missing quoting --- unix/installManPage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/installManPage b/unix/installManPage index e636db7..6bdccf0 100755 --- a/unix/installManPage +++ b/unix/installManPage @@ -75,7 +75,7 @@ Names=`sed -n ' p;q }' $ManPage` -if test -z $Names ; then +if test -z "$Names" ; then echo "warning: no target names found in $ManPage" fi -- cgit v0.12 From 718a26fe2a6c218477b2486bcc3d014df7b559fa Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 22 Feb 2010 23:31:41 +0000 Subject: Remove unnecessary EXTERN's, which already are in the global stub table. Use @EXEEXT@ in stead of @EXT_SUFFIX@ Use -DBUILD_tcl in Makefile for CYGWIN Use EXTERN to control CYGWIN exported symbols Remove some unnecessary type casts. --- ChangeLog | 14 + generic/tclCmdMZ.c | 4 +- generic/tclCompCmds.c | 5 +- generic/tclTest.c | 4 +- generic/tclUtil.c | 4 +- unix/Makefile.in | 6 +- unix/configure | 12623 ++++++++++++++++++++++++------------------------ unix/configure.in | 8 +- unix/dltest/pkga.c | 19 +- unix/dltest/pkgb.c | 24 +- unix/dltest/pkgc.c | 24 +- unix/dltest/pkgd.c | 24 +- unix/dltest/pkge.c | 12 +- unix/dltest/pkgua.c | 28 +- unix/tcl.m4 | 3 - unix/tclUnixPort.h | 9 +- 16 files changed, 6488 insertions(+), 6323 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3fcdc8..393a65a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-02-17 Jan Nijtmans + + * unix/tclUnixPort.h Remove unnecessary EXTERN's, which already + are in the global stub table. + * unix/configure.in Use @EXEEXT@ in stead of @EXT_SUFFIX@ + * unix/tcl.m4 + * unix/Makefile.in Use -DBUILD_tcl for CYGWIN + * unix/configure (regenerated) + * unix/dltest/pkg*.c Use EXTERN to control CYGWIN exported symbols + * generic/tclCmdMZ.c Remove some unnecessary type casts. + * generic/tclCompCmds.c + * generic/tclTest.c + * generic/tclUtil.c + 2010-02-21 Mo DeJong * tests/regexp.test: Add test cases back ported from diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 5cf9761..64923aa 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.199 2010/02/11 11:14:22 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.200 2010/02/22 23:31:41 nijtmans Exp $ */ #include "tclInt.h" @@ -1075,7 +1075,7 @@ Tcl_SplitObjCmd( * Don't need to fiddle with refcount... */ - Tcl_SetHashValue(hPtr, (ClientData) objPtr); + Tcl_SetHashValue(hPtr, objPtr); } else { objPtr = (Tcl_Obj *) Tcl_GetHashValue(hPtr); } diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index ba78ec3..6010182 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.164 2010/02/20 15:38:41 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.165 2010/02/22 23:31:41 nijtmans Exp $ */ #include "tclInt.h" @@ -4881,8 +4881,7 @@ IssueSwitchJumpTable( * point to here. */ - Tcl_SetHashValue(hPtr, (ClientData) - (CurrentOffset(envPtr) - jumpLocation)); + Tcl_SetHashValue(hPtr, CurrentOffset(envPtr) - jumpLocation); } Tcl_DStringFree(&buffer); } else { diff --git a/generic/tclTest.c b/generic/tclTest.c index 793dccc..3232834 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.144 2010/02/05 20:53:12 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.145 2010/02/22 23:31:41 nijtmans Exp $ */ #undef STATIC_BUILD @@ -6563,7 +6563,7 @@ TestHashSystemHashCmd( Tcl_DeleteHashTable(&hash); return TCL_ERROR; } - Tcl_SetHashValue(hPtr, (ClientData) INT2PTR(i+42)); + Tcl_SetHashValue(hPtr, INT2PTR(i+42)); } if (hash.numEntries != limit) { diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 862470f..d289851 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.111 2009/07/12 18:04:33 dkf Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.112 2010/02/22 23:31:41 nijtmans Exp $ */ #include "tclInt.h" @@ -3012,7 +3012,7 @@ TclSetProcessGlobalValue( ClearHash(cacheMap); hPtr = Tcl_CreateHashEntry(cacheMap, (char *) INT2PTR(pgvPtr->epoch), &dummy); - Tcl_SetHashValue(hPtr, (ClientData) newValue); + Tcl_SetHashValue(hPtr, newValue); Tcl_MutexUnlock(&pgvPtr->mutex); } diff --git a/unix/Makefile.in b/unix/Makefile.in index e1c7314..0c356a6 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.289 2010/02/13 18:11:06 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.290 2010/02/22 23:31:41 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -164,7 +164,7 @@ INSTALL_DATA = ${INSTALL} -m 644 # make for the first time. Certain build targets (make genstubs) need it to be # available on the PATH. This executable should *NOT* be required just to do a # normal build although it can be required to run make dist. -EXE_SUFFIX = @EXE_SUFFIX@ +EXE_SUFFIX = @EXEEXT@ TCL_EXE = tclsh${EXE_SUFFIX} TCLTEST_EXE = tcltest${EXE_SUFFIX} @@ -175,7 +175,7 @@ TCLTEST_EXE = tcltest${EXE_SUFFIX} STLIB_LD = @STLIB_LD@ SHLIB_LD = @SHLIB_LD@ -SHLIB_CFLAGS = @SHLIB_CFLAGS@ +SHLIB_CFLAGS = @SHLIB_CFLAGS@ -DBUILD_tcl SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ TCL_SHLIB_LD_EXTRAS = @TCL_SHLIB_LD_EXTRAS@ diff --git a/unix/configure b/unix/configure index 40115bf..3931b92 100755 --- a/unix/configure +++ b/unix/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -579,185 +274,42 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -ZLIB_DIR -ZLIB_OBJS -ZLIB_SRCS -ZLIB_INCLUDE -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -LDAIX_SRC -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -EXE_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -DLL_INSTALL_DIR -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -PKG_CFG_ARGS -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -PACKAGE_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS -DLTEST_LD -DLTEST_SUFFIX' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -784,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -847,45 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -912,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -942,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1016,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1078,20 +585,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1122,7 +633,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1142,19 +654,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1181,76 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1279,6 +797,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1296,22 +817,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1362,95 +876,128 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.59 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1469,7 +1016,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1483,7 +1030,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1505,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1515,7 +1062,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1537,7 +1084,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1548,8 +1097,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1562,34 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1600,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1633,24 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1681,17 +1212,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1707,8 +1235,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1720,11 +1248,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1749,7 +1278,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1766,6 +1296,12 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -1790,11 +1326,6 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1840,23 +1371,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } - # Check whether --enable-man-symlinks was given. + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } - - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-compression was given. + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval=$enable_man_compression; case $enableval in + enableval="$enable_man_compression" + case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1865,37 +1397,36 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } - # Check whether --enable-man-suffix was given. + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval=$enable_man_suffix; case $enableval in + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -1918,8 +1449,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1932,34 +1463,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1972,51 +1501,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2029,34 +1543,74 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2070,7 +1624,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2081,7 +1635,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2099,23 +1652,22 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2128,38 +1680,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2172,45 +1722,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2223,35 +1757,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2276,77 +1796,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2358,21 +1848,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2391,27 +1879,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2422,8 +1905,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2437,14 +1921,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2464,20 +1948,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2495,12 +1973,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2523,49 +2001,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2581,118 +2060,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2708,12 +2107,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2747,17 +2146,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2772,116 +2166,266 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +continue fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in @@ -2914,8 +2458,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2949,22 +2493,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -2973,10 +2519,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2986,22 +2531,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3012,7 +2559,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3030,8 +2576,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3054,22 +2600,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3078,10 +2626,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3091,22 +2638,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3117,7 +2666,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3140,170 +2688,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3327,31 +2728,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3407,7 +2812,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3427,27 +2831,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3460,14 +2855,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3490,9 +2883,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3506,35 +2899,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3546,8 +2942,8 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3587,36 +2983,39 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_dirent_h=no +tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then @@ -3627,17 +3026,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3648,37 +3047,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3687,22 +3090,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3710,10 +3115,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3737,18 +3141,25 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi if test $ac_cv_header_float_h = yes; then @@ -3763,17 +3174,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3784,37 +3195,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3823,22 +3238,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3846,10 +3263,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3873,18 +3289,25 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 fi if test $ac_cv_header_values_h = yes; then @@ -3899,17 +3322,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3920,37 +3343,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3959,22 +3386,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3982,10 +3411,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4009,18 +3437,25 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then @@ -4039,17 +3474,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4060,37 +3495,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4099,22 +3538,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4122,10 +3563,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4149,18 +3589,25 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - - ;; + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 fi if test $ac_cv_header_stdlib_h = yes; then @@ -4229,17 +3676,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4250,37 +3697,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4289,22 +3740,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4312,10 +3765,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4339,18 +3791,25 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 fi if test $ac_cv_header_string_h = yes; then @@ -4407,17 +3866,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4428,37 +3887,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4467,22 +3930,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4490,10 +3955,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4517,18 +3981,25 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4543,17 +4014,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4564,37 +4035,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4603,22 +4078,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4626,10 +4103,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4653,18 +4129,25 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4684,19 +4167,18 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4707,37 +4189,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4746,22 +4232,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4769,10 +4257,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4796,19 +4283,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4822,14 +4315,20 @@ done +#-------------------------------------------------------------------- +# Determines the correct executable file extension (.exe) +#-------------------------------------------------------------------- + + + #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. # It makes compiling go faster. (This is only a performance feature.) #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4851,35 +4350,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_pipe=no +tcl_cv_cc_pipe=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4890,13 +4393,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads was given. + # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4928,8 +4431,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4942,53 +4445,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread_pthread_mutex_init=no +ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5001,8 +4507,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5015,53 +4521,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +__pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthread___pthread_mutex_init=no +ac_cv_lib_pthread___pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -5074,8 +4583,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5088,53 +4597,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pthreads_pthread_mutex_init=no +ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5145,8 +4657,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5159,53 +4671,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_pthread_mutex_init=no +ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5213,8 +4728,8 @@ else fi if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5227,53 +4742,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -return pthread_mutex_init (); +pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_r_pthread_mutex_init=no +ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -5298,9 +4816,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5326,60 +4844,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5392,8 +4918,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -5401,15 +4927,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi else - { echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6; } + echo "$as_me:$LINENO: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi @@ -5421,11 +4947,11 @@ echo "${ECHO_T}no (default)" >&6; } -# Check whether --with-encoding was given. +# Check whether --with-encoding or --without-encoding was given. if test "${with_encoding+set}" = set; then - withval=$with_encoding; with_tcencoding=${withval} -fi - + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then @@ -5454,8 +4980,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5482,67 +5008,76 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin +#if defined (__stub_sin) || defined (__stub___sin) choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} #endif int main () { -return sin (); +return f != sin; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sin=no +ac_cv_func_sin=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5559,43 +5094,46 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ieee_main=no +ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5606,8 +5144,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5624,59 +5162,62 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -return main (); +main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_main=no +ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5687,37 +5228,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5726,22 +5271,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5749,10 +5296,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5776,18 +5322,25 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then @@ -5820,8 +5373,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5848,59 +5401,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect +#if defined (__stub_connect) || defined (__stub___connect) choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif int main () { -return connect (); +return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_connect=no +ac_cv_func_connect=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5908,8 +5470,8 @@ else fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5936,64 +5498,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} #endif int main () { -return setsockopt (); +return f != setsockopt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_setsockopt=no +ac_cv_func_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 if test $ac_cv_func_setsockopt = yes; then : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6006,53 +5577,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -return setsockopt (); +setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_setsockopt=no +ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -6065,8 +5639,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6093,59 +5667,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept +#if defined (__stub_accept) || defined (__stub___accept) choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} #endif int main () { -return accept (); +return f != accept; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_accept=no +ac_cv_func_accept=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -6153,8 +5736,8 @@ else fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6181,64 +5764,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname (); +return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname=no +ac_cv_func_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6251,53 +5843,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -return gethostbyname (); +gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_nsl_gethostbyname=yes -else + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_gethostbyname=no +ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -6310,15 +5905,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } - # Check whether --enable-shared was given. + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then - enableval=$enable_shared; tcl_ok=$enableval + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -6328,12 +5923,12 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -6349,17 +5944,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6370,37 +5965,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6409,22 +6008,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6432,10 +6033,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6459,24 +6059,31 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi if test $ac_cv_header_zlib_h = yes; then - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6488,47 +6095,50 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -typedef gz_header ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((gz_header *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (gz_header)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_gz_header=no +ac_cv_type_gz_header=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6 if test $ac_cv_type_gz_header = yes; then : else @@ -6543,12 +6153,13 @@ fi if test $zlib_ok = yes; then - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS +ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6556,73 +6167,115 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -return deflateSetHeader (); +deflateSetHeader (); ; return 0; } _ACEOF -for ac_lib in '' z; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_deflateSetHeader=$ac_res + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_deflateSetHeader" = no; then + for ac_lib in z; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then - break -fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="-l$ac_lib" +break else - ac_cv_search_deflateSetHeader=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done fi -rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 +if test "$ac_cv_search_deflateSetHeader" != no; then + test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" else @@ -6660,8 +6313,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6674,34 +6327,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6714,41 +6365,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi + RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6757,31 +6394,31 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit was given. + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval=$enable_64bit; do64bit=$enableval + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } - # Check whether --enable-64bit-vis was given. + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval=$enable_64bit_vis; do64bitVIS=$enableval + enableval="$enable_64bit_vis" + do64bitVIS=$enableval else do64bitVIS=no -fi - - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6791,8 +6428,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6816,37 +6453,40 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_visibility_hidden=no +tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6860,24 +6500,24 @@ fi # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } - # Check whether --enable-rpath was given. + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; doRpath=$enableval + enableval="$enable_rpath" + doRpath=$enableval else doRpath=yes -fi - - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6904,16 +6544,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6926,53 +6566,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -return dlopen (); +dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no +ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6987,7 +6630,6 @@ fi # Step 3: set configuration options based on system name and version. do64bit_ok=no - EXE_SUFFIX="" LDFLAGS_ORIG="$LDFLAGS" # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] @@ -7016,8 +6658,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7030,27 +6672,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -7082,8 +6722,8 @@ fi CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 fi @@ -7162,10 +6802,12 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case " $LIBOBJS " in + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" @@ -7185,8 +6827,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7199,53 +6841,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -return gettimeofday (); +gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_gettimeofday=no +ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -7277,8 +6922,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7291,53 +6936,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bind_inet_ntoa=no +ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7369,7 +7017,6 @@ fi SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dll" - EXE_SUFFIX=".exe" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" @@ -7393,8 +7040,8 @@ fi SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" - { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 -echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 +echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6 if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7407,53 +7054,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -return inet_ntoa (); +inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_network_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_network_inet_ntoa=no +ac_cv_lib_network_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6 if test $ac_cv_lib_network_inet_ntoa = yes; then LIBS="$LIBS -lnetwork" fi @@ -7483,8 +7133,8 @@ else fi - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7497,53 +7147,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7617,8 +7270,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7631,53 +7284,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -return shl_load (); +shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dld_shl_load=no +ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7705,10 +7361,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7725,10 +7383,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7765,10 +7425,12 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case " $LIBOBJS " in + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; esac if test $doRpath = yes; then @@ -7827,8 +7489,8 @@ fi if test $do64bit = yes; then - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7851,37 +7513,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_m64=no +tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7970,8 +7635,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7997,8 +7662,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -8030,8 +7695,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8057,8 +7722,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -8160,8 +7825,8 @@ fi case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8184,37 +7849,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_ppc64=no +tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -8223,8 +7891,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } fi ;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8247,37 +7915,40 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_arch_x86_64=no +tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8303,8 +7974,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8327,37 +7998,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_single_module=no +tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8376,8 +8050,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8400,37 +8074,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_search_paths_first=no +tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8457,21 +8134,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } - # Check whether --enable-corefoundation was given. + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi - - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 if test $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8505,32 +8182,35 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation=no +tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8541,8 +8221,8 @@ fi LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8558,8 +8238,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8583,39 +8263,42 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_lib_corefoundation_64=no +tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8951,25 +8634,25 @@ fi else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 if test "$arch" = "amd64 i386"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8980,37 +8663,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9019,22 +8706,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -9042,10 +8731,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -9069,18 +8757,25 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 fi @@ -9089,8 +8784,8 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 use_sunmath=no fi @@ -9165,8 +8860,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9189,37 +8884,40 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_ld_Bexport=no +tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9254,13 +8952,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. + # Check whether --enable-load or --disable-load was given. if test "${enable_load+set}" = set; then - enableval=$enable_load; tcl_ok=$enableval + enableval="$enable_load" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9405,7 +9103,6 @@ fi - cat >>confdefs.h <<_ACEOF #define TCL_SHLIB_EXT "${SHLIB_SUFFIX}" _ACEOF @@ -9420,22 +9117,22 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } - # Check whether --enable-symbols was given. + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval=$enable_symbols; tcl_ok=$enableval + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9445,8 +9142,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi @@ -9481,11 +9178,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -9506,8 +9203,8 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9529,28 +9226,33 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9567,34 +9269,37 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__isoc99_source=yes -else - echo "$as_me: failed program was:" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__isoc99_source=yes +else + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__isoc99_source=no +tcl_cv_flag__isoc99_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9626,28 +9331,33 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9664,34 +9374,37 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile64_source=no +tcl_cv_flag__largefile64_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9723,28 +9436,33 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9761,34 +9479,37 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_flag__largefile_source64=no +tcl_cv_flag__largefile_source64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9801,17 +9522,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 fi - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9834,31 +9555,35 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_type_64bit="long long" +tcl_type_64bit="long long" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9880,31 +9605,34 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9913,20 +9641,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9948,34 +9676,38 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_dirent64=no +tcl_cv_struct_dirent64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9984,8 +9716,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10007,34 +9739,38 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_struct_stat64=no +tcl_cv_struct_stat64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -10048,9 +9784,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10076,60 +9812,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10138,8 +9882,8 @@ _ACEOF fi done - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10161,31 +9905,35 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_off64_t=no +tcl_cv_type_off64_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10196,11 +9944,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi @@ -10210,8 +9958,8 @@ echo "${ECHO_T}no" >&6; } # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10228,8 +9976,7 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif @@ -10238,22 +9985,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10276,36 +10028,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_bigendian=no +ac_cv_c_bigendian=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # It does not; compile a test program. +# It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10315,11 +10071,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10330,22 +10086,27 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10361,10 +10122,8 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10372,41 +10131,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ union { - long int l; - char c[sizeof (long int)]; + long l; + char c[sizeof (long)]; } u; u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; + exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10419,16 +10164,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) @@ -10457,9 +10199,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10485,60 +10227,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10563,9 +10313,9 @@ done for ac_func in mkstemp opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10591,78 +10341,88 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case " $LIBOBJS " in + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10689,59 +10449,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror +#if defined (__stub_strerror) || defined (__stub___strerror) choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} #endif int main () { -return strerror (); +return f != strerror; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strerror=no +ac_cv_func_strerror=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 if test $ac_cv_func_strerror = yes; then : else @@ -10752,8 +10521,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10780,59 +10549,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd +#if defined (__stub_getwd) || defined (__stub___getwd) choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} #endif int main () { -return getwd (); +return f != getwd; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getwd=no +ac_cv_func_getwd=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 if test $ac_cv_func_getwd = yes; then : else @@ -10843,8 +10621,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10871,59 +10649,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 +#if defined (__stub_wait3) || defined (__stub___wait3) choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif int main () { -return wait3 (); +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_wait3=no +ac_cv_func_wait3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 if test $ac_cv_func_wait3 = yes; then : else @@ -10934,8 +10721,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10962,59 +10749,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname +#if defined (__stub_uname) || defined (__stub___uname) choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} #endif int main () { -return uname (); +return f != uname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_uname=no +ac_cv_func_uname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 if test $ac_cv_func_uname = yes; then : else @@ -11032,8 +10828,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11060,59 +10856,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath +#if defined (__stub_realpath) || defined (__stub___realpath) choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} #endif int main () { -return realpath (); +return f != realpath; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_realpath=no +ac_cv_func_realpath=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 if test $ac_cv_func_realpath = yes; then : else @@ -11124,8 +10929,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11152,63 +10957,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} #endif int main () { -return getaddrinfo (); +return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getaddrinfo=no +ac_cv_func_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11236,34 +11050,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_getaddrinfo=no +tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11281,8 +11099,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11309,63 +11127,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwuid_r (); +return f != getpwuid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwuid_r=no +ac_cv_func_getpwuid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 if test $ac_cv_func_getpwuid_r = yes; then - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11396,34 +11223,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_5=no +tcl_cv_api_getpwuid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11432,8 +11263,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11464,34 +11295,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwuid_r_4=no +tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11511,8 +11346,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11539,63 +11374,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getpwnam_r (); +return f != getpwnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getpwnam_r=no +ac_cv_func_getpwnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 if test $ac_cv_func_getpwnam_r = yes; then - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11626,34 +11470,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_5=no +tcl_cv_api_getpwnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11662,8 +11510,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11694,34 +11542,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getpwnam_r_4=no +tcl_cv_api_getpwnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11741,8 +11593,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11769,63 +11621,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrgid_r (); +return f != getgrgid_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrgid_r=no +ac_cv_func_getgrgid_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 if test $ac_cv_func_getgrgid_r = yes; then - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11856,34 +11717,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_5=no +tcl_cv_api_getgrgid_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11892,8 +11757,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11924,34 +11789,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrgid_r_4=no +tcl_cv_api_getgrgid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11971,8 +11840,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11999,63 +11868,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return getgrnam_r (); +return f != getgrnam_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgrnam_r=no +ac_cv_func_getgrnam_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 if test $ac_cv_func_getgrnam_r = yes; then - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12086,34 +11964,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_5=no +tcl_cv_api_getgrnam_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -12122,8 +12004,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12154,34 +12036,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_getgrnam_r_4=no +tcl_cv_api_getgrnam_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12234,8 +12120,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12262,63 +12148,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyname_r (); +return f != gethostbyname_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyname_r=no +ac_cv_func_gethostbyname_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 if test $ac_cv_func_gethostbyname_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12349,34 +12244,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_6=no +tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12385,8 +12284,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12417,34 +12316,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_5=no +tcl_cv_api_gethostbyname_r_5=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12453,8 +12356,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12483,34 +12386,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyname_r_3=no +tcl_cv_api_gethostbyname_r_3=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12531,8 +12438,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12559,63 +12466,72 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} #endif int main () { -return gethostbyaddr_r (); +return f != gethostbyaddr_r; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gethostbyaddr_r=no +ac_cv_func_gethostbyaddr_r=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12649,34 +12565,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_7=no +tcl_cv_api_gethostbyaddr_r_7=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12685,8 +12605,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12720,34 +12640,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_gethostbyaddr_r_8=no +tcl_cv_api_gethostbyaddr_r_8=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12781,19 +12705,18 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12804,37 +12727,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12843,22 +12770,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12866,10 +12795,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12893,19 +12821,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12917,8 +12851,8 @@ fi done - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12946,22 +12880,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12974,10 +12899,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -13001,22 +12924,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13029,10 +12943,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -13058,22 +12970,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13086,10 +12989,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -13117,22 +13018,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13145,10 +13037,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13175,22 +13065,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13203,10 +13084,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13234,22 +13113,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13262,14 +13132,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13299,8 +13167,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13321,38 +13189,42 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_fd_set=no +tcl_cv_type_fd_set=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13375,8 +13247,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13403,19 +13275,18 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13426,37 +13297,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13465,22 +13340,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13488,10 +13365,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13515,19 +13391,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13539,8 +13421,8 @@ fi done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13564,34 +13446,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_time=no +ac_cv_header_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13607,9 +13493,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13635,60 +13521,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13698,8 +13592,8 @@ fi done - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13720,34 +13614,38 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_tzadj=no +tcl_cv_member_tm_tzadj=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13756,8 +13654,8 @@ _ACEOF fi - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13778,34 +13676,38 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_member_tm_gmtoff=yes -else + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_member_tm_gmtoff=yes +else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_member_tm_gmtoff=no +tcl_cv_member_tm_gmtoff=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13818,8 +13720,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13842,34 +13744,38 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_long=no +tcl_cv_timezone_long=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13880,8 +13786,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13904,34 +13810,38 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_timezone_time=no +tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13948,8 +13858,8 @@ _ACEOF # lack blkcnt_t. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13971,28 +13881,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14010,37 +13925,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blocks=no +ac_cv_member_struct_stat_st_blocks=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 if test $ac_cv_member_struct_stat_st_blocks = yes; then cat >>confdefs.h <<_ACEOF @@ -14049,8 +13967,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14072,28 +13990,33 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14111,37 +14034,40 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_blksize=no +ac_cv_member_struct_stat_st_blksize=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14151,8 +14077,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for blkcnt_t" >&5 -echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for blkcnt_t" >&5 +echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6 if test "${ac_cv_type_blkcnt_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14163,47 +14089,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef blkcnt_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((blkcnt_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (blkcnt_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_blkcnt_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_blkcnt_t=no +ac_cv_type_blkcnt_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 -echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 +echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6 if test $ac_cv_type_blkcnt_t = yes; then cat >>confdefs.h <<_ACEOF @@ -14213,8 +14142,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14241,59 +14170,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} #endif int main () { -return fstatfs (); +return f != fstatfs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fstatfs=no +ac_cv_func_fstatfs=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 if test $ac_cv_func_fstatfs = yes; then : else @@ -14310,8 +14248,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14330,9 +14268,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; + char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14348,9 +14286,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - return 1; + exit (1); } - return 0; + exit (0); } ; @@ -14358,22 +14296,13 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14386,17 +14315,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac @@ -14407,8 +14336,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14435,59 +14364,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove +#if defined (__stub_memmove) || defined (__stub___memmove) choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} #endif int main () { -return memmove (); +return f != memmove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_memmove=no +ac_cv_func_memmove=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else @@ -14511,8 +14449,8 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14539,59 +14477,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr +#if defined (__stub_strstr) || defined (__stub___strstr) choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} #endif int main () { -return strstr (); +return f != strstr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strstr=no +ac_cv_func_strstr=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14599,8 +14546,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14619,22 +14566,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14647,13 +14585,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14661,10 +14597,12 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; esac USE_COMPAT=1 @@ -14678,8 +14616,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14706,59 +14644,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul +#if defined (__stub_strtoul) || defined (__stub___strtoul) choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtoul (); +return f != strtoul; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtoul=no +ac_cv_func_strtoul=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14766,8 +14713,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14787,22 +14734,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14815,13 +14753,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14829,10 +14765,12 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; esac USE_COMPAT=1 @@ -14845,8 +14783,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14873,59 +14811,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14933,8 +14880,8 @@ else fi if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14954,22 +14901,13 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14982,13 +14920,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14996,10 +14932,12 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15014,8 +14952,8 @@ esac #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15042,59 +14980,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod +#if defined (__stub_strtod) || defined (__stub___strtod) choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} #endif int main () { -return strtod (); +return f != strtod; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strtod=no +ac_cv_func_strtod=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15102,8 +15049,8 @@ else fi if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15139,22 +15086,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15167,18 +15105,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; esac USE_COMPAT=1 @@ -15196,8 +15134,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15208,47 +15146,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((mode_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no +ac_cv_type_mode_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 if test $ac_cv_type_mode_t = yes; then : else @@ -15259,8 +15200,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15271,47 +15212,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((pid_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +ac_cv_type_pid_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else @@ -15322,8 +15266,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15334,59 +15278,62 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((size_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +ac_cv_type_size_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +#define size_t unsigned _ACEOF fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15408,8 +15355,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15424,8 +15371,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15451,34 +15398,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_type_socklen_t=no +tcl_cv_type_socklen_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15487,8 +15438,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15499,47 +15450,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef intptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((intptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (intptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_intptr_t=no +ac_cv_type_intptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 if test $ac_cv_type_intptr_t = yes; then @@ -15549,8 +15503,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15575,36 +15529,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15615,8 +15573,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15627,47 +15585,50 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) +if ((uintptr_t *) 0) return 0; -if (sizeof (ac__type_new_)) +if (sizeof (uintptr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_uintptr_t=no +ac_cv_type_uintptr_t=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 if test $ac_cv_type_uintptr_t = yes; then @@ -15677,8 +15638,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15704,36 +15665,40 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_ok=no +tcl_ok=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15752,8 +15717,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15780,59 +15745,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir +#if defined (__stub_opendir) || defined (__stub___opendir) choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} #endif int main () { -return opendir (); +return f != opendir; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_opendir=no +ac_cv_func_opendir=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 if test $ac_cv_func_opendir = yes; then : else @@ -15852,8 +15826,8 @@ fi # the trick. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15879,36 +15853,39 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_union_wait=no +tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15923,8 +15900,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15951,59 +15928,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} #endif int main () { -return strncasecmp (); +return f != strncasecmp; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_strncasecmp=no +ac_cv_func_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -16011,8 +15997,8 @@ else fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16025,53 +16011,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_socket_strncasecmp=no +ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16080,8 +16069,8 @@ fi fi if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16094,53 +16083,56 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -return strncasecmp (); +strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_inet_strncasecmp=no +ac_cv_lib_inet_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16149,10 +16141,12 @@ fi fi if test "$tcl_ok" = 0; then - case " $LIBOBJS " in + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac USE_COMPAT=1 @@ -16169,8 +16163,8 @@ fi # declare it. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16197,59 +16191,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return BSDgettimeofday (); +return f != BSDgettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_BSDgettimeofday=no +ac_cv_func_BSDgettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16258,8 +16261,8 @@ _ACEOF else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16286,59 +16289,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} #endif int main () { -return gettimeofday (); +return f != gettimeofday; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_gettimeofday=no +ac_cv_func_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 if test $ac_cv_func_gettimeofday = yes; then : else @@ -16352,8 +16364,8 @@ fi fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16376,8 +16388,8 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16393,8 +16405,8 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16416,34 +16428,38 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_char_unsigned=yes +ac_cv_c_char_unsigned=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16451,8 +16467,8 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16476,34 +16492,38 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no +tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16516,8 +16536,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16552,22 +16572,13 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16580,13 +16591,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16600,28 +16609,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo was given. + # Check whether --enable-langinfo or --disable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval + enableval="$enable_langinfo" + langinfo_ok=$enableval else langinfo_ok=yes -fi - +fi; HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16632,37 +16641,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16671,22 +16684,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16694,10 +16709,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16721,18 +16735,25 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 fi if test $ac_cv_header_langinfo_h = yes; then @@ -16743,8 +16764,8 @@ fi fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16766,35 +16787,39 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_langinfo_h=no +tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16803,8 +16828,8 @@ _ACEOF fi else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi @@ -16817,9 +16842,9 @@ echo "${ECHO_T}$langinfo_ok" >&6; } for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16845,60 +16870,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16912,8 +16945,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16936,36 +16969,39 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_isnan=no +tcl_cv_isnan=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -16983,9 +17019,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17011,60 +17047,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17077,19 +17121,18 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17100,37 +17143,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17139,22 +17186,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17162,10 +17211,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17189,19 +17237,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17217,9 +17271,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17245,60 +17299,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17312,19 +17374,18 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17335,37 +17396,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17374,22 +17439,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17397,10 +17464,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17424,19 +17490,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17452,9 +17524,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17480,60 +17552,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17546,9 +17626,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17574,60 +17654,68 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif int main () { -return $ac_func (); +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +eval "$as_ac_var=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17661,19 +17749,18 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17684,37 +17771,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17723,22 +17814,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17746,10 +17839,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17773,19 +17865,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17798,8 +17896,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17830,37 +17928,40 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_weak_import=no +tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -17868,8 +17969,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - { echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 -echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 +echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6 if test "${tcl_cv_cc_darwin_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17901,35 +18002,39 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_darwin_c_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_cc_darwin_c_source=no +tcl_cv_cc_darwin_c_source=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 -echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 +echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6 if test $tcl_cv_cc_darwin_c_source = yes; then cat >>confdefs.h <<\_ACEOF @@ -17950,8 +18055,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17980,36 +18085,39 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_api_fts=no +tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -18029,19 +18137,18 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18052,37 +18159,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18091,22 +18202,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18114,10 +18227,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18141,19 +18253,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18169,19 +18287,18 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18192,37 +18309,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18231,22 +18352,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18254,10 +18377,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18281,19 +18403,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18306,8 +18434,8 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18334,12 +18462,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18352,8 +18480,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) @@ -18361,27 +18489,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } -# Check whether --enable-dll-unloading was given. +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval=$enable_dll_unloading; tcl_ok=$enableval + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18389,8 +18517,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18398,24 +18526,24 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. +# Check whether --with-tzdata or --without-tzdata was given. if test "${with_tzdata+set}" = set; then - withval=$with_tzdata; tcl_ok=$withval + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here @@ -18439,8 +18567,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi @@ -18453,8 +18581,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -18462,26 +18590,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. +# Check whether --enable-dtrace or --disable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18492,37 +18620,41 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +ac_header_compiler=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18531,22 +18663,24 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18554,10 +18688,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi - rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18581,18 +18714,25 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18606,8 +18746,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18623,32 +18763,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18672,8 +18811,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18702,15 +18841,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } - # Check whether --enable-framework was given. + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then - enableval=$enable_framework; enable_framework=$enableval + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18724,16 +18863,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -18745,7 +18884,7 @@ echo "${ECHO_T}static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18758,7 +18897,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -18936,7 +19075,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -18956,58 +19095,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -19016,36 +19136,52 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed @@ -19074,45 +19210,17 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19122,43 +19230,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -19172,19 +19245,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19192,120 +19264,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19314,28 +19425,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19344,14 +19434,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19359,19 +19466,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19379,7 +19497,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19393,20 +19511,18 @@ Configuration commands: $config_commands Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' +srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19417,42 +19533,60 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -19468,53 +19602,41 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19525,486 +19647,377 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -ZLIB_DIR!$ZLIB_DIR$ac_delim -ZLIB_OBJS!$ZLIB_OBJS$ac_delim -ZLIB_SRCS!$ZLIB_SRCS$ac_delim -ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -LDAIX_SRC!$LDAIX_SRC$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -EXE_SUFFIX!$EXE_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -DLL_INSTALL_DIR!$DLL_INSTALL_DIR$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -PACKAGE_DIR!$PACKAGE_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@ZLIB_DIR@,$ZLIB_DIR,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t +s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t +s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@LDAIX_SRC@,$LDAIX_SRC,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -20012,52 +20025,152 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/unix/configure.in b/unix/configure.in index d2b62a2..26f9bc0 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.210 2010/02/16 16:01:33 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.211 2010/02/22 23:31:41 nijtmans Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -88,6 +88,12 @@ AC_C_INLINE SC_MISSING_POSIX_HEADERS +#-------------------------------------------------------------------- +# Determines the correct executable file extension (.exe) +#-------------------------------------------------------------------- + +AC_EXEEXT + #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. # It makes compiling go faster. (This is only a performance feature.) diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index b76ca02..c58e11a 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -9,12 +9,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkga.c,v 1.13 2008/04/27 22:41:47 dkf Exp $ + * RCS: @(#) $Id: pkga.c,v 1.14 2010/02/22 23:31:42 nijtmans Exp $ */ #include "tcl.h" /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Pkga_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 + +/* * Prototypes for procedures defined later in this file: */ @@ -117,7 +125,7 @@ Pkga_QuoteObjCmd( *---------------------------------------------------------------------- */ -int +EXTERN int Pkga_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -131,9 +139,8 @@ Pkga_Init( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkga_eq", Pkga_EqObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateObjCommand(interp, "pkga_quote", Pkga_QuoteObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkga_eq", Pkga_EqObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "pkga_quote", Pkga_QuoteObjCmd, NULL, + NULL); return TCL_OK; } diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 49162ec..9ad1425 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -10,12 +10,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgb.c,v 1.10 2008/04/27 22:41:47 dkf Exp $ + * RCS: @(#) $Id: pkgb.c,v 1.11 2010/02/22 23:31:42 nijtmans Exp $ */ #include "tcl.h" /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Pkgb_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 + +/* * Prototypes for procedures defined later in this file: */ @@ -107,7 +115,7 @@ Pkgb_UnsafeObjCmd( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgb_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -121,10 +129,9 @@ Pkgb_Init( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, NULL, + NULL); return TCL_OK; } @@ -145,7 +152,7 @@ Pkgb_Init( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgb_SafeInit( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -159,7 +166,6 @@ Pkgb_SafeInit( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, (ClientData) 0, - (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL); return TCL_OK; } diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index a11e524..3e50863 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -10,12 +10,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgc.c,v 1.10 2008/04/27 22:41:47 dkf Exp $ + * RCS: @(#) $Id: pkgc.c,v 1.11 2010/02/22 23:31:42 nijtmans Exp $ */ #include "tcl.h" /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Pkgc_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 + +/* * Prototypes for procedures defined later in this file: */ @@ -107,7 +115,7 @@ Pkgc_UnsafeObjCmd( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgc_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -121,10 +129,9 @@ Pkgc_Init( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateObjCommand(interp, "pkgc_unsafe", Pkgc_UnsafeObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "pkgc_unsafe", Pkgc_UnsafeObjCmd, NULL, + NULL); return TCL_OK; } @@ -145,7 +152,7 @@ Pkgc_Init( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgc_SafeInit( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -159,7 +166,6 @@ Pkgc_SafeInit( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, (ClientData) 0, - (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL); return TCL_OK; } diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index 46f159a..211902c 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -10,12 +10,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgd.c,v 1.9 2008/04/27 22:41:47 dkf Exp $ + * RCS: @(#) $Id: pkgd.c,v 1.10 2010/02/22 23:31:42 nijtmans Exp $ */ #include "tcl.h" /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Pkgd_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 + +/* * Prototypes for procedures defined later in this file: */ @@ -107,7 +115,7 @@ Pkgd_UnsafeObjCmd( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgd_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -121,10 +129,9 @@ Pkgd_Init( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateObjCommand(interp, "pkgd_unsafe", Pkgd_UnsafeObjCmd, - (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "pkgd_unsafe", Pkgd_UnsafeObjCmd, NULL, + NULL); return TCL_OK; } @@ -145,7 +152,7 @@ Pkgd_Init( *---------------------------------------------------------------------- */ -int +EXTERN int Pkgd_SafeInit( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ @@ -159,7 +166,6 @@ Pkgd_SafeInit( if (code != TCL_OK) { return code; } - Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, (ClientData) 0, - (Tcl_CmdDeleteProc *) NULL); + Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL); return TCL_OK; } diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c index 827ee4e..145bbf5 100644 --- a/unix/dltest/pkge.c +++ b/unix/dltest/pkge.c @@ -10,11 +10,19 @@ * 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.11 2009/08/16 10:20:20 nijtmans Exp $ + * RCS: @(#) $Id: pkge.c,v 1.12 2010/02/22 23:31:42 nijtmans Exp $ */ #include "tcl.h" +/* + * 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 + /* *---------------------------------------------------------------------- @@ -33,7 +41,7 @@ *---------------------------------------------------------------------- */ -int +EXTERN int Pkge_Init( Tcl_Interp *interp) /* Interpreter in which the package is to be * made available. */ diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index 592641a..74a550d 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -10,12 +10,20 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgua.c,v 1.8 2008/04/27 22:41:47 dkf Exp $ + * RCS: @(#) $Id: pkgua.c,v 1.9 2010/02/22 23:31:41 nijtmans Exp $ */ #include "tcl.h" /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Pkgua_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 + +/* * Prototypes for procedures defined later in this file: */ @@ -51,7 +59,7 @@ PkguaInitTokensHashTable(void) interpTokenMapInitialised = 1; } -void +static void PkguaFreeTokensHashTable(void) { Tcl_HashSearch search; @@ -79,7 +87,7 @@ PkguaInterpToTokens( for (newEntry=0 ; newEntry Date: Mon, 22 Feb 2010 23:54:24 +0000 Subject: * generic/tclZlib.c (ZlibTransformInput): [Bug 2742041]: Added a hack to work around the general problem, early EOF recoginition based on the base-chgannel, instead of the data we have ready for reading in the transform. Long-term we need a proper general fix (likely tracking EOF on each level of the channel stack), with attendant complexity. Further: Z_BUF_ERROR can be ignored, and must be when feeding the zlib code with single characters. --- ChangeLog | 10 ++++++++++ generic/tclZlib.c | 25 ++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 393a65a..7ba4ca5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-02-22 Andreas Kupries + + * generic/tclZlib.c (ZlibTransformInput): [Bug 2742041]: Added a + hack to work around the general problem, early EOF recoginition + based on the base-chgannel, instead of the data we have ready for + reading in the transform. Long-term we need a proper general fix + (likely tracking EOF on each level of the channel stack), with + attendant complexity. Further: Z_BUF_ERROR can be ignored, and + must be when feeding the zlib code with single characters. + 2010-02-17 Jan Nijtmans * unix/tclUnixPort.h Remove unnecessary EXTERN's, which already diff --git a/generic/tclZlib.c b/generic/tclZlib.c index f43f704..14212ef 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.33 2010/02/08 13:21:42 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.34 2010/02/22 23:54:24 andreas_kupries Exp $ */ #include "tclInt.h" @@ -2412,7 +2412,15 @@ ZlibTransformInput( if ((e == Z_STREAM_END) || (e==Z_OK && cd->inStream.avail_out==0)) { return toRead - cd->inStream.avail_out; } - if (e != Z_OK) { + + /* + * Z_BUF_ERROR can be ignored as per http://www.zlib.net/zlib_how.html + * + * Just indicates that the zlib couldn't consume input/produce output, + * and is fixed by supplying more input. + */ + + if ((e != Z_OK) && (e != Z_BUF_ERROR)) { Tcl_Obj *errObj = Tcl_NewListObj(0, NULL); Tcl_ListObjAppendElement(NULL, errObj, @@ -2436,7 +2444,18 @@ ZlibTransformInput( */ doReadFirst: - read = Tcl_ReadRaw(cd->parent, cd->inBuffer, cd->inAllocated); + /* + * Hack for Bug 2762041. Disable pre-reading of lots of input, read + * only one character. This way the Z_END_OF_STREAM can be read + * without triggering an EOF in the base channel. The higher input + * loops in DoReadChars() would react to that by stopping, despite the + * transform still having data which could be read. + * + * This is only a hack because other transforms may not be able to + * work around the general problem in this way. + */ + + read = Tcl_ReadRaw(cd->parent, cd->inBuffer, 1); if (read < 0) { *errorCodePtr = Tcl_GetErrno(); return -1; -- cgit v0.12 From f0afa5654f3c707da9288f45668dcfbd62b2b7ef Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Mon, 22 Feb 2010 23:55:35 +0000 Subject: Fix typos in ChangeLog. --- ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ba4ca5..8ed2432 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2010-02-22 Andreas Kupries - * generic/tclZlib.c (ZlibTransformInput): [Bug 2742041]: Added a - hack to work around the general problem, early EOF recoginition - based on the base-chgannel, instead of the data we have ready for + * generic/tclZlib.c (ZlibTransformInput): [Bug 2762041]: Added a + hack to work around the general problem, early EOF recognition + based on the base-channel, instead of the data we have ready for reading in the transform. Long-term we need a proper general fix (likely tracking EOF on each level of the channel stack), with attendant complexity. Further: Z_BUF_ERROR can be ignored, and -- cgit v0.12 From f6089bae5411b0d3044d7fac8d14f285dce493ef Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 23 Feb 2010 00:03:34 +0000 Subject: correct date --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8ed2432..5ff895c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,7 +8,7 @@ attendant complexity. Further: Z_BUF_ERROR can be ignored, and must be when feeding the zlib code with single characters. -2010-02-17 Jan Nijtmans +2010-02-22 Jan Nijtmans * unix/tclUnixPort.h Remove unnecessary EXTERN's, which already are in the global stub table. -- cgit v0.12 From eaefb7d9cf0d3569d504889654cc1ca47d6e6d92 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Feb 2010 10:11:46 +0000 Subject: [Bug 2957688]: clarified [socket -server] docs --- ChangeLog | 56 ++++++++++++++++++++++++++++++-------------------------- doc/socket.n | 20 +++++++++++++------- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ff895c..32ed37c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,41 +1,45 @@ +2010-02-24 Donal K. Fellows + + * doc/socket.n: [Bug 2957688]: Clarified that [socket -server] works + with a command prefix. Extended example to show this in action. + 2010-02-22 Andreas Kupries - * generic/tclZlib.c (ZlibTransformInput): [Bug 2762041]: Added a - hack to work around the general problem, early EOF recognition - based on the base-channel, instead of the data we have ready for - reading in the transform. Long-term we need a proper general fix - (likely tracking EOF on each level of the channel stack), with - attendant complexity. Further: Z_BUF_ERROR can be ignored, and - must be when feeding the zlib code with single characters. + * generic/tclZlib.c (ZlibTransformInput): [Bug 2762041]: Added a hack + to work around the general problem, early EOF recognition based on the + base-channel, instead of the data we have ready for reading in the + transform. Long-term we need a proper general fix (likely tracking EOF + on each level of the channel stack), with attendant complexity. + Furthermore, Z_BUF_ERROR can be ignored, and must be when feeding the + zlib code with single characters. 2010-02-22 Jan Nijtmans - * unix/tclUnixPort.h Remove unnecessary EXTERN's, which already - are in the global stub table. - * unix/configure.in Use @EXEEXT@ in stead of @EXT_SUFFIX@ - * unix/tcl.m4 - * unix/Makefile.in Use -DBUILD_tcl for CYGWIN - * unix/configure (regenerated) - * unix/dltest/pkg*.c Use EXTERN to control CYGWIN exported symbols - * generic/tclCmdMZ.c Remove some unnecessary type casts. - * generic/tclCompCmds.c - * generic/tclTest.c - * generic/tclUtil.c + * unix/tclUnixPort.h: Remove unnecessary EXTERN's, which already are + in the global stub table. + * unix/configure.in: Use @EXEEXT@ in stead of @EXT_SUFFIX@ + * unix/tcl.m4: + * unix/Makefile.in: Use -DBUILD_tcl for CYGWIN + * unix/configure: (regenerated) + * unix/dltest/pkg*.c: Use EXTERN to control CYGWIN exported symbols + * generic/tclCmdMZ.c: Remove some unnecessary type casts. + * generic/tclCompCmds.c: + * generic/tclTest.c: + * generic/tclUtil.c: 2010-02-21 Mo DeJong - * tests/regexp.test: Add test cases back ported from - Jacl regexp work. + * tests/regexp.test: Add test cases back ported from Jacl regexp work. 2010-02-21 Jan Nijtmans - * generic/tclDate.c Some more const tables. - * generic/tclGetDate.y - * generic/regc_lex.c - * generic/regerror.c - * generic/tclStubLib.c + * generic/tclDate.c: Some more const tables. + * generic/tclGetDate.y: + * generic/regc_lex.c: + * generic/regerror.c: + * generic/tclStubLib.c: * generic/tclBasic.c: Fix [Bug 2954959] expr abs(0.0) is -0.0 - * tests/expr.test + * tests/expr.test: 2010-02-20 Donal K. Fellows diff --git a/doc/socket.n b/doc/socket.n index 6fe5517..7596abb 100644 --- a/doc/socket.n +++ b/doc/socket.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: socket.n,v 1.19 2010/01/20 13:42:17 dkf Exp $ +'\" RCS: @(#) $Id: socket.n,v 1.20 2010/02/24 10:11:46 dkf Exp $ .so man.macros .TH socket n 8.0 Tcl "Tcl Built-In Commands" .BS @@ -100,6 +100,7 @@ using \fBfconfigure\fR to read the \fB\-sockname\fR option). Tcl will automatically accept connections to the given port. For each connection Tcl will create a new channel that may be used to communicate with the client. Tcl then invokes \fIcommand\fR +(properly a command prefix list, see the \fBEXAMPLES\fR below) with three additional arguments: the name of the new channel, the address, in network address notation, of the client's host, and the client's port number. @@ -164,24 +165,29 @@ list is identical to the address, its first element. Here is a very simple time server: .PP .CS -proc Server {channel clientaddr clientport} { +proc Server {startTime channel clientaddr clientport} { puts "Connection from $clientaddr registered" - puts $channel [clock format [clock seconds]] + set now [clock seconds] + puts $channel [clock format $now] + puts $channel "[expr {$now - $startTime}] since start" close $channel } -\fBsocket\fR -server Server 9900 +\fBsocket -server\fR [list Server [clock seconds]] 9900 vwait forever .CE .PP -And here is the corresponding client to talk to the server: +And here is the corresponding client to talk to the server and extract +some information: .PP .CS set server localhost set sockChan [\fBsocket\fR $server 9900] -gets $sockChan line +gets $sockChan line1 +gets $sockChan line2 close $sockChan -puts "The time on $server is $line" +puts "The time on $server is $line1" +puts "That is [lindex $line2 0]s since the server started" .CE .SH "SEE ALSO" fconfigure(n), flush(n), open(n), read(n) -- cgit v0.12 From 9f6e608ac5b1a6b4bb9382774a7ae4e263533dde Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Feb 2010 10:32:17 +0000 Subject: Pure whitespace changes, changing to follow Engineering Manual style. --- generic/tclAlloc.c | 10 ++++----- generic/tclCompile.c | 36 +++++++++++++++--------------- generic/tclEncoding.c | 30 ++++++++++++------------- generic/tclEnsemble.c | 6 ++--- generic/tclFCmd.c | 22 +++++++++---------- generic/tclIOCmd.c | 4 ++-- generic/tclIOUtil.c | 6 ++--- generic/tclIndexObj.c | 18 +++++++-------- generic/tclLiteral.c | 4 ++-- generic/tclMain.c | 22 +++++++++---------- generic/tclPathObj.c | 4 ++-- generic/tclPkgConfig.c | 4 ++-- generic/tclProc.c | 58 ++++++++++++++++++++++++------------------------- generic/tclRegexp.c | 6 ++--- generic/tclStrToD.c | 16 +++++++------- generic/tclStringObj.c | 8 +++---- generic/tclTest.c | 6 ++--- generic/tclThreadJoin.c | 4 ++-- generic/tclTimer.c | 6 ++--- generic/tclVar.c | 4 ++-- 20 files changed, 137 insertions(+), 137 deletions(-) diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index 04627a6..d1b8409 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAlloc.c,v 1.28 2009/09/29 05:03:46 dgp Exp $ + * RCS: @(#) $Id: tclAlloc.c,v 1.29 2010/02/24 10:32:17 dkf Exp $ */ /* @@ -80,7 +80,7 @@ union overhead { #define RMAGIC 0x5555 /* magic # on range info */ #ifdef RCHECK -#define RSLOP sizeof (unsigned short) +#define RSLOP sizeof(unsigned short) #else #define RSLOP 0 #endif @@ -157,7 +157,7 @@ static unsigned int numMallocs[NBUCKETS+1]; * Prototypes for functions used only in this file. */ -static void MoreCore(int bucket); +static void MoreCore(int bucket); /* *------------------------------------------------------------------------- @@ -466,7 +466,7 @@ TclpFree( } Tcl_MutexLock(allocMutexPtr); - overPtr = (union overhead *)((caddr_t)oldPtr - sizeof (union overhead)); + overPtr = (union overhead *)((caddr_t)oldPtr - sizeof(union overhead)); ASSERT(overPtr->overMagic0 == MAGIC); /* make sure it was in use */ ASSERT(overPtr->overMagic1 == MAGIC); @@ -535,7 +535,7 @@ TclpRealloc( Tcl_MutexLock(allocMutexPtr); - overPtr = (union overhead *)((caddr_t)oldPtr - sizeof (union overhead)); + overPtr = (union overhead *)((caddr_t)oldPtr - sizeof(union overhead)); ASSERT(overPtr->overMagic0 == MAGIC); /* make sure it was in use */ ASSERT(overPtr->overMagic1 == MAGIC); diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 7a6d1e7..9552b64 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.182 2010/02/19 14:22:00 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.183 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -365,7 +365,7 @@ InstructionDesc const tclInstructionTable[] = { * argument. The list of keys (popped from the stack) must be the same * length as the list of variables. * Stack: ... keyList => ... */ - {"jumpTable", 5, -1, 1, {OPERAND_AUX4}}, + {"jumpTable", 5, -1, 1, {OPERAND_AUX4}}, /* Jump according to the jump-table (in AuxData as indicated by the * operand) and the argument popped from the list. Always executes the * next instruction if no match against the table's entries was found. @@ -373,15 +373,15 @@ InstructionDesc const tclInstructionTable[] = { * Note that the jump table contains offsets relative to the PC when * it points to this instruction; the code is relocatable. */ {"upvar", 5, 0, 1, {OPERAND_LVT4}}, - /* finds level and otherName in stack, links to local variable at - * index op1. Leaves the level on stack. */ + /* finds level and otherName in stack, links to local variable at + * index op1. Leaves the level on stack. */ {"nsupvar", 5, 0, 1, {OPERAND_LVT4}}, - /* finds namespace and otherName in stack, links to local variable at - * index op1. Leaves the namespace on stack. */ + /* finds namespace and otherName in stack, links to local variable at + * index op1. Leaves the namespace on stack. */ {"variable", 5, 0, 1, {OPERAND_LVT4}}, - /* finds namespace and otherName in stack, links to local variable at - * index op1. Leaves the namespace on stack. */ - {"syntax", 9, -1, 2, {OPERAND_INT4, OPERAND_UINT4}}, + /* finds namespace and otherName in stack, links to local variable at + * index op1. Leaves the namespace on stack. */ + {"syntax", 9, -1, 2, {OPERAND_INT4, OPERAND_UINT4}}, /* Compiled bytecodes to signal syntax error. */ {"reverse", 5, 0, 1, {OPERAND_UINT4}}, /* Reverse the order of the arg elements at the top of stack */ @@ -1433,9 +1433,9 @@ TclCompileScript( { Interp *iPtr = (Interp *) interp; int lastTopLevelCmdIndex = -1; - /* Index of most recent toplevel command in - * the command location table. Initialized to - * avoid compiler warning. */ + /* Index of most recent toplevel command in + * the command location table. Initialized to + * avoid compiler warning. */ int startCodeOffset = -1; /* Offset of first byte of current command's * code. Init. to avoid compiler warning. */ unsigned char *entryCodeNext = envPtr->codeNext; @@ -3425,7 +3425,7 @@ TclRegisterAuxDataType( const AuxDataType * TclGetAuxDataType( - const char *typeName) /* Name of AuxData type to look up. */ + const char *typeName) /* Name of AuxData type to look up. */ { register Tcl_HashEntry *hPtr; const AuxDataType *typePtr = NULL; @@ -3552,7 +3552,7 @@ GetCmdLocEncodingSize( } else if (codeDelta <= 127) { codeDeltaNext++; } else { - codeDeltaNext += 5; /* 1 byte for 0xFF, 4 for positive delta */ + codeDeltaNext += 5; /* 1 byte for 0xFF, 4 for positive delta */ } prevCodeOffset = mapPtr[i].codeOffset; @@ -3562,14 +3562,14 @@ GetCmdLocEncodingSize( } else if (codeLen <= 127) { codeLengthNext++; } else { - codeLengthNext += 5; /* 1 byte for 0xFF, 4 for length */ + codeLengthNext += 5;/* 1 byte for 0xFF, 4 for length */ } srcDelta = mapPtr[i].srcOffset - prevSrcOffset; if ((-127 <= srcDelta) && (srcDelta <= 127) && (srcDelta != -1)) { srcDeltaNext++; } else { - srcDeltaNext += 5; /* 1 byte for 0xFF, 4 for delta */ + srcDeltaNext += 5; /* 1 byte for 0xFF, 4 for delta */ } prevSrcOffset = mapPtr[i].srcOffset; @@ -3579,7 +3579,7 @@ GetCmdLocEncodingSize( } else if (srcLen <= 127) { srcLengthNext++; } else { - srcLengthNext += 5; /* 1 byte for 0xFF, 4 for length */ + srcLengthNext += 5; /* 1 byte for 0xFF, 4 for length */ } } @@ -4039,7 +4039,7 @@ TclDisassembleByteCodeObj( } Tcl_AppendPrintfToObj(bufferObj, "%s%4d: pc %d-%d, src %d-%d", - ((i % 2)? " " : "\n "), + ((i % 2)? " " : "\n "), (i+1), codeOffset, (codeOffset + codeLen - 1), srcOffset, (srcOffset + srcLen - 1)); } diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index a34f193..07e62aa 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.69 2010/02/05 11:47:22 dkf Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.70 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -295,7 +295,7 @@ static const Tcl_ObjType encodingType = { * Standard Tcl return code. * * Side effects: - * Caches the Tcl_Encoding value as the internal rep of (*objPtr). + * Caches the Tcl_Encoding value as the internal rep of (*objPtr). * *---------------------------------------------------------------------- */ @@ -454,8 +454,8 @@ TclSetLibraryPath( * * FillEncodingFileMap -- * - * Called to bring the encoding file map in sync with the current value - * of the encoding search path. + * Called to bring the encoding file map in sync with the current value + * of the encoding search path. * * Scan the directories on the encoding search path, find the *.enc * files, and store the found pathnames in a map associated with the @@ -676,15 +676,15 @@ TclFinalizeEncodingSubsystem(void) * * Tcl_GetDefaultEncodingDir -- * - * Legacy public interface to retrieve first directory in the encoding - * searchPath. + * Legacy public interface to retrieve first directory in the encoding + * searchPath. * * Results: * The directory pathname, as a string, or NULL for an empty encoding * search path. * * Side effects: - * None. + * None. * *------------------------------------------------------------------------- */ @@ -709,14 +709,14 @@ Tcl_GetDefaultEncodingDir(void) * * Tcl_SetDefaultEncodingDir -- * - * Legacy public interface to set the first directory in the encoding - * search path. + * Legacy public interface to set the first directory in the encoding + * search path. * * Results: - * None. + * None. * * Side effects: - * Modifies the encoding search path. + * Modifies the encoding search path. * *------------------------------------------------------------------------- */ @@ -1446,9 +1446,9 @@ Tcl_FindExecutable( * Open the file believed to hold data for the encoding, "name". * * Results: - * Returns the readable Tcl_Channel from opening the file, or NULL if the - * file could not be successfully opened. If NULL was returned, an error - * message is left in interp's result object, unless interp was NULL. + * Returns the readable Tcl_Channel from opening the file, or NULL if the + * file could not be successfully opened. If NULL was returned, an error + * message is left in interp's result object, unless interp was NULL. * * Side effects: * Channel may be opened. Information about the filesystem may be cached @@ -3288,7 +3288,7 @@ EscapeFromUtfProc( for (state = 0; state < dataPtr->numSubTables; state++) { encodingPtr = GetTableEncoding(dataPtr, state); tableDataPtr = encodingPtr->clientData; - word = tableDataPtr->fromUnicode[(ch >> 8)][ch & 0xff]; + word = tableDataPtr->fromUnicode[(ch >> 8)][ch & 0xff]; if (word != 0) { break; } diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 3108793..bc92251 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnsemble.c,v 1.3 2010/02/15 22:56:20 nijtmans Exp $ + * RCS: @(#) $Id: tclEnsemble.c,v 1.4 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -2646,8 +2646,8 @@ StringOfEnsembleCmdRep( * normally warranted. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: * Instructions are added to envPtr to execute the subcommands of the diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 6e84177..8ff6e39 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFCmd.c,v 1.50 2009/09/07 07:28:38 das Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.51 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -959,7 +959,7 @@ TclFileAttrsCmd( filePtr = objv[2]; if (Tcl_FSConvertToPathType(interp, filePtr) != TCL_OK) { - return TCL_ERROR; + return TCL_ERROR; } objc -= 3; @@ -1048,7 +1048,7 @@ TclFileAttrsCmd( goto end; } - Tcl_SetObjResult(interp, listPtr); + Tcl_SetObjResult(interp, listPtr); } else if (objc == 1) { /* * Get one attribute. @@ -1087,21 +1087,21 @@ TclFileAttrsCmd( goto end; } - for (i = 0; i < objc ; i += 2) { - if (Tcl_GetIndexFromObj(interp, objv[i], attributeStrings, + for (i = 0; i < objc ; i += 2) { + if (Tcl_GetIndexFromObj(interp, objv[i], attributeStrings, "option", 0, &index) != TCL_OK) { goto end; - } + } if (i + 1 == objc) { Tcl_AppendResult(interp, "value for \"", TclGetString(objv[i]), "\" missing", NULL); goto end; } - if (Tcl_FSFileAttrsSet(interp, index, filePtr, - objv[i + 1]) != TCL_OK) { + if (Tcl_FSFileAttrsSet(interp, index, filePtr, + objv[i + 1]) != TCL_OK) { goto end; - } - } + } + } } result = TCL_OK; @@ -1111,7 +1111,7 @@ TclFileAttrsCmd( * Free up the array we allocated. */ - TclStackFree(interp, (void *)attributeStringsAllocated); + TclStackFree(interp, (void *) attributeStringsAllocated); /* * We don't need this object that was passed to us any more. diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index f2078f0..ae6fe62 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.66 2010/02/11 15:20:37 dkf Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.67 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -956,7 +956,7 @@ Tcl_ExecObjCmd( * Free the argv array. */ - TclStackFree(interp, (void *)argv); + TclStackFree(interp, (void *) argv); if (chan == NULL) { return TCL_ERROR; diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 905b8ca..a22e664 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.167 2010/02/16 16:01:33 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.168 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -50,7 +50,7 @@ static void FsRecacheFilesystemList(void); * they are not (and should not be) used anywhere else. */ -MODULE_SCOPE const char *const tclpFileAttrStrings[]; +MODULE_SCOPE const char *const tclpFileAttrStrings[]; MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; /* @@ -652,7 +652,7 @@ FsUpdateCwd( */ cwdPathPtr = Tcl_NewStringObj(str, len); - Tcl_IncrRefCount(cwdPathPtr); + Tcl_IncrRefCount(cwdPathPtr); cwdClientData = TclNativeDupInternalRep(clientData); } diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index e419222..f631d73 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.54 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.55 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -21,7 +21,7 @@ * Prototypes for functions defined later in this file: */ -static int GetIndexFromObjList(Tcl_Interp *interp, +static int GetIndexFromObjList(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *tableObjPtr, const char *msg, int flags, int *indexPtr); static int SetIndexFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); @@ -105,7 +105,7 @@ typedef struct { int Tcl_GetIndexFromObj( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ const char *const*tablePtr, /* Array of strings to compare against the * value of objPtr; last entry must be NULL @@ -168,7 +168,7 @@ Tcl_GetIndexFromObj( int GetIndexFromObjList( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ Tcl_Obj *tableObjPtr, /* List of strings to compare against the * value of objPtr. */ @@ -254,7 +254,7 @@ GetIndexFromObjList( int Tcl_GetIndexFromObjStruct( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr, /* Object containing the string to lookup. */ const void *tablePtr, /* The first string in the table. The second * string will be at this address plus the @@ -340,12 +340,12 @@ Tcl_GetIndexFromObjStruct( */ if (objPtr->typePtr == &indexType) { - indexRep = objPtr->internalRep.otherValuePtr; + indexRep = objPtr->internalRep.otherValuePtr; } else { TclFreeIntRep(objPtr); - indexRep = (IndexRep *) ckalloc(sizeof(IndexRep)); - objPtr->internalRep.otherValuePtr = indexRep; - objPtr->typePtr = &indexType; + indexRep = (IndexRep *) ckalloc(sizeof(IndexRep)); + objPtr->internalRep.otherValuePtr = indexRep; + objPtr->typePtr = &indexType; } indexRep->tablePtr = (void *) tablePtr; indexRep->offset = offset; diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index 67d24a5..bcf2bd8 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.40 2010/02/17 21:58:11 dkf Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.41 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -926,7 +926,7 @@ HashString( */ for (i=0; i 3) && (0 == strcmp("-encoding", argv[1])) @@ -477,7 +477,7 @@ Tcl_Main( Tcl_WriteObj(errChannel, Tcl_GetObjResult(interp)); Tcl_WriteChars(errChannel, "\n", 1); } - } else if (tty) { + } else if (tty) { resultPtr = Tcl_GetObjResult(interp); Tcl_IncrRefCount(resultPtr); Tcl_GetStringFromObj(resultPtr, &length); diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index d6f2618..df1af1c 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.86 2010/01/05 18:58:36 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.87 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -2597,7 +2597,7 @@ FreeFsPathInternalRep( } } - ckfree((char*) fsPathPtr); + ckfree((char *) fsPathPtr); pathPtr->typePtr = NULL; } diff --git a/generic/tclPkgConfig.c b/generic/tclPkgConfig.c index 72a9b6b..abc66ad 100644 --- a/generic/tclPkgConfig.c +++ b/generic/tclPkgConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkgConfig.c,v 1.5 2008/10/04 11:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclPkgConfig.c,v 1.6 2010/02/24 10:32:17 dkf Exp $ */ /* Note, the definitions in this module are influenced by the following C @@ -122,7 +122,7 @@ static Tcl_Config const cfg[] = { void TclInitEmbeddedConfigurationInformation( - Tcl_Interp* interp) /* Interpreter the configuration command is + Tcl_Interp *interp) /* Interpreter the configuration command is * registered in. */ { Tcl_RegisterConfig(interp, "tcl", cfg, TCL_CFGVAL_ENCODING); diff --git a/generic/tclProc.c b/generic/tclProc.c index bac2c4e..e705108 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.177 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.178 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -440,7 +440,7 @@ TclCreateProc( */ if (Tcl_IsShared(bodyPtr)) { - Tcl_Obj* sharedBodyPtr = bodyPtr; + Tcl_Obj *sharedBodyPtr = bodyPtr; bytes = TclGetStringFromObj(bodyPtr, &length); bodyPtr = Tcl_NewStringObj(bytes, length); @@ -451,7 +451,7 @@ TclCreateProc( * not lost and applies to the new body as well. */ - TclContinuationsCopy (bodyPtr, sharedBodyPtr); + TclContinuationsCopy(bodyPtr, sharedBodyPtr); } /* @@ -1578,7 +1578,7 @@ InitArgsAndLocals( static int PushProcCallFrame( - ClientData clientData, /* Record describing procedure to be + ClientData clientData, /* Record describing procedure to be * interpreted. */ register Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ @@ -1615,7 +1615,7 @@ PushProcCallFrame( */ codePtr = procPtr->bodyPtr->internalRep.otherValuePtr; - if (((Interp *) *codePtr->interpHandle != iPtr) + if (((Interp *) *codePtr->interpHandle != iPtr) || (codePtr->compileEpoch != iPtr->compileEpoch) || (codePtr->nsPtr != nsPtr) || (codePtr->nsEpoch != nsPtr->resolverEpoch)) { @@ -1673,7 +1673,7 @@ PushProcCallFrame( int TclObjInterpProc( - ClientData clientData, /* Record describing procedure to be + ClientData clientData, /* Record describing procedure to be * interpreted. */ register Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ @@ -1690,7 +1690,7 @@ TclObjInterpProc( int TclNRInterpProc( - ClientData clientData, /* Record describing procedure to be + ClientData clientData, /* Record describing procedure to be * interpreted. */ register Tcl_Interp *interp,/* Interpreter in which procedure was * invoked. */ @@ -1941,8 +1941,8 @@ TclProcCompileProc( Tcl_Interp *interp, /* Interpreter containing procedure. */ Proc *procPtr, /* Data associated with procedure. */ Tcl_Obj *bodyPtr, /* Body of proc. (Usually procPtr->bodyPtr, - * but could be any code fragment compiled in - * the context of this procedure.) */ + * but could be any code fragment compiled in + * the context of this procedure.) */ Namespace *nsPtr, /* Namespace containing procedure. */ const char *description, /* string describing this body of code. */ const char *procName) /* Name of this procedure. */ @@ -1966,7 +1966,7 @@ TclProcCompileProc( */ if (bodyPtr->typePtr == &tclByteCodeType) { - if (((Interp *) *codePtr->interpHandle == iPtr) + if (((Interp *) *codePtr->interpHandle == iPtr) && (codePtr->compileEpoch == iPtr->compileEpoch) && (codePtr->nsPtr == nsPtr) && (codePtr->nsEpoch == nsPtr->resolverEpoch)) { @@ -1984,18 +1984,18 @@ TclProcCompileProc( } else { bodyPtr->typePtr->freeIntRepProc(bodyPtr); bodyPtr->typePtr = NULL; - } + } } if (bodyPtr->typePtr != &tclByteCodeType) { Tcl_HashEntry *hePtr; #ifdef TCL_COMPILE_DEBUG - if (tclTraceCompile >= 1) { - /* - * Display a line summarizing the top level command we are about - * to compile. - */ + if (tclTraceCompile >= 1) { + /* + * Display a line summarizing the top level command we are about + * to compile. + */ Tcl_Obj *message; @@ -2003,22 +2003,22 @@ TclProcCompileProc( Tcl_IncrRefCount(message); Tcl_AppendStringsToObj(message, description, " \"", NULL); Tcl_AppendLimitedToObj(message, procName, -1, 50, NULL); - fprintf(stdout, "%s\"\n", TclGetString(message)); + fprintf(stdout, "%s\"\n", TclGetString(message)); Tcl_DecrRefCount(message); - } + } #endif - /* - * Plug the current procPtr into the interpreter and coerce the code - * body to byte codes. The interpreter needs to know which proc it's - * compiling so that it can access its list of compiled locals. - * - * TRICKY NOTE: Be careful to push a call frame with the proper - * namespace context, so that the byte codes are compiled in the - * appropriate class context. - */ + /* + * Plug the current procPtr into the interpreter and coerce the code + * body to byte codes. The interpreter needs to know which proc it's + * compiling so that it can access its list of compiled locals. + * + * TRICKY NOTE: Be careful to push a call frame with the proper + * namespace context, so that the byte codes are compiled in the + * appropriate class context. + */ - iPtr->compiledProcPtr = procPtr; + iPtr->compiledProcPtr = procPtr; if (procPtr->numCompiledLocals > procPtr->numArgs) { CompiledLocal *clPtr = procPtr->firstLocalPtr; @@ -2044,7 +2044,7 @@ TclProcCompileProc( procPtr->numCompiledLocals = procPtr->numArgs; } - TclPushStackFrame(interp, &framePtr, (Tcl_Namespace *) nsPtr, + TclPushStackFrame(interp, &framePtr, (Tcl_Namespace *) nsPtr, /* isProcCallFrame */ 0); /* diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index c91a746..6848960 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.c,v 1.33 2009/12/31 19:22:26 dkf Exp $ + * RCS: @(#) $Id: tclRegexp.c,v 1.34 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -55,8 +55,8 @@ * * *** NOTE: this code has been altered slightly for use in Tcl: *** * *** 1. Names have been changed, e.g. from re_comp to *** - * *** TclRegComp, to avoid clashes with other *** - * *** regexp implementations used by applications. *** + * *** TclRegComp, to avoid clashes with other *** + * *** regexp implementations used by applications. *** */ /* diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 6412e92..20016db 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.39 2009/12/07 17:15:33 dgp Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.40 2010/02/24 10:32:17 dkf Exp $ * *---------------------------------------------------------------------- */ @@ -185,14 +185,14 @@ static double SafeLdExp(double fraction, int exponent); * - TCL_PARSE_SCAN_PREFIXES: ignore the prefixes 0b and 0o that are * not part of the [scan] command's vocabulary. Use only in * combination with TCL_PARSE_INTEGER_ONLY. - * - TCL_PARSE_OCTAL_ONLY: parse only in the octal format, whether + * - TCL_PARSE_OCTAL_ONLY: parse only in the octal format, whether * or not a prefix is present that would lead to octal parsing. * Use only in combination with TCL_PARSE_INTEGER_ONLY. - * - TCL_PARSE_HEXADECIMAL_ONLY: parse only in the hexadecimal format, + * - TCL_PARSE_HEXADECIMAL_ONLY: parse only in the hexadecimal format, * whether or not a prefix is present that would lead to * hexadecimal parsing. Use only in combination with * TCL_PARSE_INTEGER_ONLY. - * - TCL_PARSE_DECIMAL_ONLY: parse only in the decimal format, no + * - TCL_PARSE_DECIMAL_ONLY: parse only in the decimal format, no * matter whether a 0 prefix would normally force a different * base. * - TCL_PARSE_NO_WHITESPACE: reject any leading/trailing whitespace @@ -1540,7 +1540,7 @@ MakeHighPrecisionDouble( static double MakeNaN( int signum, /* Sign bit (1=negative, 0=nonnegative */ - Tcl_WideUInt tags) /* Tag bits to put in the NaN */ + Tcl_WideUInt tags) /* Tag bits to put in the NaN */ { union { Tcl_WideUInt iv; @@ -2601,7 +2601,7 @@ BignumToBiasedFrExp( static double Pow10TimesFrExp( - int exponent, /* Power of 10 to multiply by */ + int exponent, /* Power of 10 to multiply by */ double fraction, /* Significand of multiplicand */ int *machexp) /* On input, exponent of multiplicand. On * output, exponent of result. */ @@ -2734,7 +2734,7 @@ TclFormatNaN( * * Nokia770Twiddle -- * - * Transpose the two words of a number for Nokia 770 floating + * Transpose the two words of a number for Nokia 770 floating * point handling. * *---------------------------------------------------------------------- @@ -2752,7 +2752,7 @@ Nokia770Twiddle( * * TclNokia770Doubles -- * - * Transpose the two words of a number for Nokia 770 floating + * Transpose the two words of a number for Nokia 770 floating * point handling. * *---------------------------------------------------------------------- diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 5f0d547..005f3d9 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.132 2010/01/18 09:49:13 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.133 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2333,7 +2333,7 @@ Tcl_AppendFormatToObj( * A refcount zero Tcl_Obj. * * Side effects: - * None. + * None. * *--------------------------------------------------------------------------- */ @@ -2508,7 +2508,7 @@ AppendPrintfToObjVA( * A standard Tcl result. * * Side effects: - * None. + * None. * *--------------------------------------------------------------------------- */ @@ -2535,7 +2535,7 @@ Tcl_AppendPrintfToObj( * A refcount zero Tcl_Obj. * * Side effects: - * None. + * None. * *--------------------------------------------------------------------------- */ diff --git a/generic/tclTest.c b/generic/tclTest.c index 3232834..1eca77d 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.145 2010/02/22 23:31:41 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.146 2010/02/24 10:32:17 dkf Exp $ */ #undef STATIC_BUILD @@ -3131,7 +3131,7 @@ TestlocaleCmd( const char *locale; static const char *const optionStrings[] = { - "ctype", "numeric", "time", "collate", "monetary", + "ctype", "numeric", "time", "collate", "monetary", "all", NULL }; static int lcTypes[] = { @@ -5089,7 +5089,7 @@ TestmainthreadCmd( * A main loop set by TestsetmainloopCmd below. * * Results: - * None. + * None. * * Side effects: * Event handlers could do anything. diff --git a/generic/tclThreadJoin.c b/generic/tclThreadJoin.c index 6a9304d..6410959 100644 --- a/generic/tclThreadJoin.c +++ b/generic/tclThreadJoin.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadJoin.c,v 1.7 2005/11/07 15:15:06 dkf Exp $ + * RCS: @(#) $Id: tclThreadJoin.c,v 1.8 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -54,7 +54,7 @@ typedef struct JoinableThread { TCL_DECLARE_MUTEX(joinMutex) -static JoinableThread* firstThreadPtr; +static JoinableThread *firstThreadPtr; /* *---------------------------------------------------------------------- diff --git a/generic/tclTimer.c b/generic/tclTimer.c index d65ca54..aaa3493 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.41 2009/12/28 09:53:36 dkf Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.42 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -847,7 +847,7 @@ Tcl_AfterObjCmd( if (objc == 3) { afterPtr->commandPtr = objv[2]; } else { - afterPtr->commandPtr = Tcl_ConcatObj(objc-2, objv+2); + afterPtr->commandPtr = Tcl_ConcatObj(objc-2, objv+2); } Tcl_IncrRefCount(afterPtr->commandPtr); @@ -964,7 +964,7 @@ Tcl_AfterObjCmd( resultListPtr = Tcl_NewObj(); Tcl_ListObjAppendElement(interp, resultListPtr, afterPtr->commandPtr); Tcl_ListObjAppendElement(interp, resultListPtr, Tcl_NewStringObj( - (afterPtr->token == NULL) ? "idle" : "timer", -1)); + (afterPtr->token == NULL) ? "idle" : "timer", -1)); Tcl_SetObjResult(interp, resultListPtr); break; } diff --git a/generic/tclVar.c b/generic/tclVar.c index 3f6130e..6ad657f 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.196 2010/02/07 09:10:33 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.197 2010/02/24 10:32:17 dkf Exp $ */ #include "tclInt.h" @@ -1931,7 +1931,7 @@ TclPtrSetVar( if (Tcl_IsShared(oldValuePtr)) { /* Append to copy. */ varPtr->value.objPtr = Tcl_DuplicateObj(oldValuePtr); - TclContinuationsCopy (varPtr->value.objPtr, oldValuePtr); + TclContinuationsCopy(varPtr->value.objPtr, oldValuePtr); TclDecrRefCount(oldValuePtr); oldValuePtr = varPtr->value.objPtr; -- cgit v0.12 From 8282fe60d8a51812bfb3ced0032e52c0cc5f81b5 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Feb 2010 10:45:04 +0000 Subject: More tidying up (whitespace, spelling, useless parentheses, useless casts) --- generic/tclBasic.c | 18 ++--- generic/tclClock.c | 8 +- generic/tclCmdIL.c | 13 ++-- generic/tclCmdMZ.c | 33 ++++---- generic/tclCompExpr.c | 50 ++++++------ generic/tclEvent.c | 172 +++++++++++++++++++++++------------------- generic/tclFileName.c | 5 +- generic/tclHash.c | 10 +-- generic/tclIO.c | 82 +++++++++++--------- generic/tclIORChan.c | 59 ++++++++------- generic/tclIORTrans.c | 39 +++++----- generic/tclInterp.c | 37 +++++---- generic/tclNamesp.c | 16 ++-- generic/tclNotify.c | 11 ++- generic/tclOOMethod.c | 4 +- generic/tclObj.c | 29 ++++--- generic/tclParse.c | 159 +++++++++++++++++++------------------- generic/tclPipe.c | 19 ++--- generic/tclResult.c | 40 ++++++---- generic/tclScan.c | 10 +-- generic/tclTomMathInterface.c | 8 +- generic/tclTrace.c | 7 +- generic/tclUtil.c | 44 +++++------ generic/tclZlib.c | 19 +++-- 24 files changed, 465 insertions(+), 427 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 4001407..fde9b1b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.446 2010/02/21 20:09:38 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.447 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -2280,7 +2280,7 @@ TclInvokeStringCommand( result = cmdPtr->proc(cmdPtr->clientData, interp, objc, argv); - TclStackFree(interp, (char **)argv); + TclStackFree(interp, (void *) argv); return result; } @@ -7445,17 +7445,17 @@ ExprAbsFunc( double d = *((const double *) ptr); static const double poszero = 0.0; - /* We need to distinguish here between positive 0.0 and - * negative -0.0, see Bug ID #2954959. + /* + * We need to distinguish here between positive 0.0 and negative -0.0. + * [Bug 2954959] */ + if (d == -0.0) { - if (!memcmp(&d, &poszero, sizeof(double))) { - goto unChanged; - } - } else { - if (d > -0.0) { + if (!memcmp(&d, &poszero, sizeof(double))) { goto unChanged; } + } else if (d > -0.0) { + goto unChanged; } Tcl_SetObjResult(interp, Tcl_NewDoubleObj(-d)); return TCL_OK; diff --git a/generic/tclClock.c b/generic/tclClock.c index 5a5dec4..6c87db0 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.73 2009/11/12 16:31:38 dgp Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.74 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -221,7 +221,7 @@ static const struct ClockCommand clockCommands[] = { { "GetJulianDayFromEraYearMonthDay", ClockGetjuliandayfromerayearmonthdayObjCmd }, { "GetJulianDayFromEraYearWeekDay", - ClockGetjuliandayfromerayearweekdayObjCmd }, + ClockGetjuliandayfromerayearweekdayObjCmd }, { "ParseFormatArgs", ClockParseformatargsObjCmd }, { NULL, NULL } }; @@ -251,7 +251,7 @@ TclClockInit( const struct ClockCommand *clockCmdPtr; char cmdName[50]; /* Buffer large enough to hold the string *::tcl::clock::GetJulianDayFromEraYearMonthDay - * plus a terminating NULL. */ + * plus a terminating NUL. */ ClockClientData *data; int i; @@ -261,7 +261,7 @@ TclClockInit( */ if (Tcl_IsSafe(interp)) { - return; + return; } /* diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 313c368..fff4e14 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.176 2009/12/22 19:49:29 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.177 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -144,7 +144,7 @@ static int InfoSharedlibCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int InfoTclVersionCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -static SortElement * MergeLists(SortElement *leftPtr, SortElement *rightPtr, +static SortElement * MergeLists(SortElement *leftPtr, SortElement *rightPtr, SortInfo *infoPtr); static int SortCompare(SortElement *firstPtr, SortElement *second, SortInfo *infoPtr); @@ -2629,7 +2629,7 @@ Tcl_LreplaceObjCmd( } if (first < 0) { - first = 0; + first = 0; } /* @@ -2645,7 +2645,7 @@ Tcl_LreplaceObjCmd( return TCL_ERROR; } if (last >= listLen) { - last = listLen - 1; + last = listLen - 1; } if (first <= last) { numToDelete = last - first + 1; @@ -3680,9 +3680,8 @@ Tcl_LsortObjCmd( break; case LSORT_STRIDE: if (i == objc-2) { - Tcl_AppendResult(interp, - "\"-stride\" option must be followed by stride length", - NULL); + Tcl_AppendResult(interp, "\"-stride\" option must be ", + "followed by stride length", NULL); sortInfo.resultCode = TCL_ERROR; goto done2; } diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 64923aa..5ec25b3 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.200 2010/02/22 23:31:41 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.201 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -23,7 +23,7 @@ static inline Tcl_Obj * During(Tcl_Interp *interp, int resultCode, Tcl_Obj *oldOptions, Tcl_Obj *errorInfo); -static int SwitchPostProc(ClientData data[], Tcl_Interp* interp, +static int SwitchPostProc(ClientData data[], Tcl_Interp *interp, int result); static int TryPostBody(ClientData data[], Tcl_Interp *interp, int result); @@ -3923,9 +3923,9 @@ SwitchPostProc( /* Unpack the preserved data */ int splitObjs = PTR2INT(data[0]); - CmdFrame* ctxPtr = (CmdFrame*) data[1]; + CmdFrame *ctxPtr = data[1]; int pc = PTR2INT(data[2]); - const char* pattern = (const char*) data[3]; + const char *pattern = data[3]; int patternLength = strlen(pattern); /* @@ -4679,7 +4679,7 @@ TclNRWhileObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - ForIterData* iterPtr; + ForIterData *iterPtr; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "test command"); @@ -4720,33 +4720,30 @@ TclNRWhileObjCmd( void TclListLines( - Tcl_Obj* listObj, /* Pointer to obj holding a string with list - * structure. Assumed to be valid. Assumed to - * contain n elements. - */ + Tcl_Obj *listObj, /* Pointer to obj holding a string with list + * structure. Assumed to be valid. Assumed to + * contain n elements. */ int line, /* Line the list as a whole starts on. */ int n, /* #elements in lines */ int *lines, /* Array of line numbers, to fill. */ - Tcl_Obj* const* elems) /* The list elems as Tcl_Obj*, in need of + Tcl_Obj *const *elems) /* The list elems as Tcl_Obj*, in need of * derived continuation data */ { - const char* listStr = Tcl_GetString (listObj); - const char* listHead = listStr; + const char *listStr = Tcl_GetString(listObj); + const char *listHead = listStr; int i, length = strlen(listStr); const char *element = NULL, *next = NULL; - ContLineLoc* clLocPtr = TclContinuationsGet(listObj); - int* clNext = (clLocPtr ? &clLocPtr->loc[0] : NULL); + ContLineLoc *clLocPtr = TclContinuationsGet(listObj); + int *clNext= (clLocPtr ? &clLocPtr->loc[0] : NULL); for (i = 0; i < n; i++) { TclFindElement(NULL, listStr, length, &element, &next, NULL, NULL); TclAdvanceLines(&line, listStr, element); /* Leading whitespace */ - TclAdvanceContinuations (&line, &clNext, element - listHead); + TclAdvanceContinuations(&line, &clNext, element - listHead); if (elems && clNext) { - TclContinuationsEnterDerived (elems[i], - element - listHead, - clNext); + TclContinuationsEnterDerived(elems[i], element-listHead, clNext); } lines[i] = line; length -= (next - listStr); diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 306bf78..0b06d15 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.102 2009/12/11 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.103 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -455,7 +455,7 @@ static unsigned char Lexeme[] = { INVALID /* SUB */, INVALID /* ESC */, INVALID /* FS */, INVALID /* GS */, INVALID /* RS */, INVALID /* US */, - INVALID /* SPACE */, 0 /* ! or != */, + INVALID /* SPACE */, 0 /* ! or != */, QUOTED /* " */, INVALID /* # */, VARIABLE /* $ */, MOD /* % */, 0 /* & or && */, INVALID /* ' */, @@ -902,7 +902,7 @@ ParseExpr( break; case SCRIPT: { - Tcl_Parse *nestedPtr = (Tcl_Parse *) + Tcl_Parse *nestedPtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); tokenPtr = parsePtr->tokenPtr + parsePtr->numTokens; @@ -1784,12 +1784,11 @@ Tcl_ParseExpr( * information in the structure is ignored. */ { int code; - OpNode *opTree = NULL; /* Will point to the tree of operators */ - Tcl_Obj *litList = Tcl_NewObj(); /* List to hold the literals */ - Tcl_Obj *funcList = Tcl_NewObj(); /* List to hold the functon names*/ - Tcl_Parse *exprParsePtr = (Tcl_Parse *) - TclStackAlloc(interp, sizeof(Tcl_Parse)); - /* Holds the Tcl_Tokens of substitutions */ + OpNode *opTree = NULL; /* Will point to the tree of operators. */ + Tcl_Obj *litList = Tcl_NewObj(); /* List to hold the literals. */ + Tcl_Obj *funcList = Tcl_NewObj(); /* List to hold the functon names. */ + Tcl_Parse *exprParsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); + /* Holds the Tcl_Tokens of substitutions. */ if (numBytes < 0) { numBytes = (start ? strlen(start) : 0); @@ -2039,8 +2038,7 @@ TclCompileExpr( OpNode *opTree = NULL; /* Will point to the tree of operators */ Tcl_Obj *litList = Tcl_NewObj(); /* List to hold the literals */ Tcl_Obj *funcList = Tcl_NewObj(); /* List to hold the functon names*/ - Tcl_Parse *parsePtr = (Tcl_Parse *) - TclStackAlloc(interp, sizeof(Tcl_Parse)); + Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); /* Holds the Tcl_Tokens of substitutions */ int code = ParseExpr(interp, script, numBytes, &opTree, litList, @@ -2110,7 +2108,7 @@ ExecConstantExprTree( * bytecode, so there's no need to tend to TIP 280 issues. */ - envPtr = (CompileEnv *) TclStackAlloc(interp, sizeof(CompileEnv)); + envPtr = TclStackAlloc(interp, sizeof(CompileEnv)); TclInitCompileEnv(interp, envPtr, NULL, 0, NULL, 0); CompileExprTree(interp, nodes, index, litObjvPtr, NULL, NULL, envPtr, 0 /* optimize */); @@ -2174,10 +2172,10 @@ CompileExprTree( switch (nodePtr->lexeme) { case QUESTION: - newJump = (JumpList *) TclStackAlloc(interp, sizeof(JumpList)); + newJump = TclStackAlloc(interp, sizeof(JumpList)); newJump->next = jumpPtr; jumpPtr = newJump; - newJump = (JumpList *) TclStackAlloc(interp, sizeof(JumpList)); + newJump = TclStackAlloc(interp, sizeof(JumpList)); newJump->next = jumpPtr; jumpPtr = newJump; jumpPtr->depth = envPtr->currStackDepth; @@ -2185,13 +2183,13 @@ CompileExprTree( break; case AND: case OR: - newJump = (JumpList *) TclStackAlloc(interp, sizeof(JumpList)); + newJump = TclStackAlloc(interp, sizeof(JumpList)); newJump->next = jumpPtr; jumpPtr = newJump; - newJump = (JumpList *) TclStackAlloc(interp, sizeof(JumpList)); + newJump = TclStackAlloc(interp, sizeof(JumpList)); newJump->next = jumpPtr; jumpPtr = newJump; - newJump = (JumpList *) TclStackAlloc(interp, sizeof(JumpList)); + newJump = TclStackAlloc(interp, sizeof(JumpList)); newJump->next = jumpPtr; jumpPtr = newJump; jumpPtr->depth = envPtr->currStackDepth; @@ -2436,7 +2434,7 @@ CompileExprTree( * A standard Tcl return code and result left in interp. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -2489,7 +2487,7 @@ TclSingleOpCmd( * A standard Tcl return code and result left in interp. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -2507,10 +2505,9 @@ TclSortingOpCmd( Tcl_SetObjResult(interp, Tcl_NewBooleanObj(1)); } else { TclOpCmdClientData *occdPtr = clientData; - Tcl_Obj **litObjv = (Tcl_Obj **) TclStackAlloc(interp, - 2*(objc-2)*sizeof(Tcl_Obj *)); - OpNode *nodes = (OpNode *) TclStackAlloc(interp, - 2*(objc-2)*sizeof(OpNode)); + Tcl_Obj **litObjv = TclStackAlloc(interp, + 2 * (objc-2) * sizeof(Tcl_Obj *)); + OpNode *nodes = TclStackAlloc(interp, 2 * (objc-2) * sizeof(OpNode)); unsigned char lexeme; int i, lastAnd = 1; Tcl_Obj *const *litObjPtrPtr = litObjv; @@ -2570,7 +2567,7 @@ TclSortingOpCmd( * A standard Tcl return code and result left in interp. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -2637,8 +2634,7 @@ TclVariadicOpCmd( return code; } else { Tcl_Obj *const *litObjv = objv + 1; - OpNode *nodes = (OpNode *) TclStackAlloc(interp, - (objc-1)*sizeof(OpNode)); + OpNode *nodes = TclStackAlloc(interp, (objc-1) * sizeof(OpNode)); int i, lastOp = OT_LITERAL; nodes[0].lexeme = START; @@ -2690,7 +2686,7 @@ TclVariadicOpCmd( * A standard Tcl return code and result left in interp. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 4f67608..e8f8072 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.91 2009/07/22 08:41:59 ferrieux Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.92 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -51,8 +51,8 @@ typedef struct ErrAssocData { } ErrAssocData; /* - * For each exit handler created with a call to Tcl_Create(Late)ExitHandler there is - * a structure of the following type: + * For each exit handler created with a call to Tcl_Create(Late)ExitHandler + * there is a structure of the following type: */ typedef struct ExitHandler { @@ -76,9 +76,9 @@ static ExitHandler *firstLateExitPtr = NULL; TCL_DECLARE_MUTEX(exitMutex) /* - * This variable is set to 1 when Tcl_Exit is called. The variable is - * checked by TclInExit() to allow different behavior for - * exit-time processing, e.g. in closing of files and pipes. + * This variable is set to 1 when Tcl_Exit is called. The variable is checked + * by TclInExit() to allow different behavior for exit-time processing, e.g., + * in closing of files and pipes. */ static int inExit = 0; @@ -86,9 +86,9 @@ static int inExit = 0; static int subsystemsInitialized = 0; /* - * This variable contains the application wide exit handler. It will be - * called by Tcl_Exit instead of the C-runtime exit if this variable is set - * to a non-NULL value. + * This variable contains the application wide exit handler. It will be called + * by Tcl_Exit instead of the C-runtime exit if this variable is set to a + * non-NULL value. */ static Tcl_ExitProc *appExitPtr = NULL; @@ -117,9 +117,10 @@ static Tcl_ThreadCreateType NewThreadProc(ClientData clientData); static void BgErrorDeleteProc(ClientData clientData, Tcl_Interp *interp); static void HandleBgErrors(ClientData clientData); -static char * VwaitVarProc(ClientData clientData, Tcl_Interp *interp, - const char *name1, const char *name2, int flags); -static void InvokeExitHandlers(void); +static char * VwaitVarProc(ClientData clientData, + Tcl_Interp *interp, const char *name1, + const char *name2, int flags); +static void InvokeExitHandlers(void); /* @@ -147,6 +148,7 @@ Tcl_BackgroundError( { Tcl_BackgroundException(interp, TCL_ERROR); } + void Tcl_BackgroundException( Tcl_Interp *interp, /* Interpreter in which an exception has @@ -168,10 +170,10 @@ Tcl_BackgroundException( errPtr->nextPtr = NULL; (void) TclGetBgErrorHandler(interp); - assocPtr = (ErrAssocData *) Tcl_GetAssocData(interp, "tclBgError", NULL); + assocPtr = Tcl_GetAssocData(interp, "tclBgError", NULL); if (assocPtr->firstBgPtr == NULL) { assocPtr->firstBgPtr = errPtr; - Tcl_DoWhenIdle(HandleBgErrors, (ClientData) assocPtr); + Tcl_DoWhenIdle(HandleBgErrors, assocPtr); } else { assocPtr->lastBgPtr->nextPtr = errPtr; } @@ -200,7 +202,7 @@ static void HandleBgErrors( ClientData clientData) /* Pointer to ErrAssocData structure. */ { - ErrAssocData *assocPtr = (ErrAssocData *) clientData; + ErrAssocData *assocPtr = clientData; Tcl_Interp *interp = assocPtr->interp; BgError *errPtr; @@ -211,15 +213,15 @@ HandleBgErrors( * that could lead us here. */ - Tcl_Preserve((ClientData) assocPtr); - Tcl_Preserve((ClientData) interp); + Tcl_Preserve(assocPtr); + Tcl_Preserve(interp); while (assocPtr->firstBgPtr != NULL) { int code, prefixObjc; Tcl_Obj **prefixObjv, **tempObjv; /* - * Note we copy the handler command prefix each pass through, so - * we do support one handler setting another handler. + * Note we copy the handler command prefix each pass through, so we do + * support one handler setting another handler. */ Tcl_Obj *copyObj = TclListObjCopy(NULL, assocPtr->cmdPrefix); @@ -227,7 +229,7 @@ HandleBgErrors( errPtr = assocPtr->firstBgPtr; Tcl_ListObjGetElements(NULL, copyObj, &prefixObjc, &prefixObjv); - tempObjv = (Tcl_Obj **) ckalloc((prefixObjc+2)*sizeof(Tcl_Obj *)); + tempObjv = (Tcl_Obj **) ckalloc((prefixObjc+2) * sizeof(Tcl_Obj *)); memcpy(tempObjv, prefixObjv, prefixObjc*sizeof(Tcl_Obj *)); tempObjv[prefixObjc] = errPtr->errorMsg; tempObjv[prefixObjc+1] = errPtr->returnOpts; @@ -283,8 +285,8 @@ HandleBgErrors( } } assocPtr->lastBgPtr = NULL; - Tcl_Release((ClientData) interp); - Tcl_Release((ClientData) assocPtr); + Tcl_Release(interp); + Tcl_Release(assocPtr); } /* @@ -352,19 +354,26 @@ TclDefaultBgErrorHandlerObjCmd( } if (level != 0) { - /* We're handling a TCL_RETURN exception */ + /* + * We're handling a TCL_RETURN exception. + */ + code = TCL_RETURN; } if (code == TCL_OK) { /* - * Somehow we got to exception handling with no exception. - * (Pass TCL_OK to Tcl_BackgroundException()?) - * Just return without doing anything. + * Somehow we got to exception handling with no exception. (Pass + * TCL_OK to Tcl_BackgroundException()?) Just return without doing + * anything. */ + return TCL_OK; } - /* Construct the bgerror command */ + /* + * Construct the bgerror command. + */ + TclNewLiteralStringObj(tempObjv[0], "bgerror"); Tcl_IncrRefCount(tempObjv[0]); @@ -422,7 +431,10 @@ TclDefaultBgErrorHandlerObjCmd( saved = Tcl_SaveInterpState(interp, code); - /* Invoke the bgerror command. */ + /* + * Invoke the bgerror command. + */ + Tcl_AllowExceptions(interp); code = Tcl_EvalObjv(interp, 2, tempObjv, TCL_EVAL_GLOBAL); if (code == TCL_ERROR) { @@ -441,6 +453,7 @@ TclDefaultBgErrorHandlerObjCmd( TclObjInvoke(interp, 2, tempObjv, TCL_INVOKE_HIDDEN); } else { Tcl_Channel errChannel = Tcl_GetStdChannel(TCL_STDERR); + if (errChannel != (Tcl_Channel) NULL) { Tcl_Obj *resultPtr = Tcl_GetObjResult(interp); @@ -501,8 +514,7 @@ TclSetBgErrorHandler( Tcl_Interp *interp, Tcl_Obj *cmdPrefix) { - ErrAssocData *assocPtr = (ErrAssocData *) - Tcl_GetAssocData(interp, "tclBgError", NULL); + ErrAssocData *assocPtr = Tcl_GetAssocData(interp, "tclBgError", NULL); if (cmdPrefix == NULL) { Tcl_Panic("TclSetBgErrorHandler: NULL cmdPrefix argument"); @@ -517,8 +529,7 @@ TclSetBgErrorHandler( assocPtr->cmdPrefix = NULL; assocPtr->firstBgPtr = NULL; assocPtr->lastBgPtr = NULL; - Tcl_SetAssocData(interp, "tclBgError", BgErrorDeleteProc, - (ClientData) assocPtr); + Tcl_SetAssocData(interp, "tclBgError", BgErrorDeleteProc, assocPtr); } if (assocPtr->cmdPrefix) { Tcl_DecrRefCount(assocPtr->cmdPrefix); @@ -548,16 +559,14 @@ Tcl_Obj * TclGetBgErrorHandler( Tcl_Interp *interp) { - ErrAssocData *assocPtr = (ErrAssocData *) - Tcl_GetAssocData(interp, "tclBgError", NULL); + ErrAssocData *assocPtr = Tcl_GetAssocData(interp, "tclBgError", NULL); if (assocPtr == NULL) { Tcl_Obj *bgerrorObj; TclNewLiteralStringObj(bgerrorObj, "::tcl::Bgerror"); TclSetBgErrorHandler(interp, bgerrorObj); - assocPtr = (ErrAssocData *) - Tcl_GetAssocData(interp, "tclBgError", NULL); + assocPtr = Tcl_GetAssocData(interp, "tclBgError", NULL); } return assocPtr->cmdPrefix; } @@ -586,7 +595,7 @@ BgErrorDeleteProc( ClientData clientData, /* Pointer to ErrAssocData structure. */ Tcl_Interp *interp) /* Interpreter being deleted. */ { - ErrAssocData *assocPtr = (ErrAssocData *) clientData; + ErrAssocData *assocPtr = clientData; BgError *errPtr; while (assocPtr->firstBgPtr != NULL) { @@ -596,9 +605,9 @@ BgErrorDeleteProc( Tcl_DecrRefCount(errPtr->returnOpts); ckfree((char *) errPtr); } - Tcl_CancelIdleCall(HandleBgErrors, (ClientData) assocPtr); + Tcl_CancelIdleCall(HandleBgErrors, assocPtr); Tcl_DecrRefCount(assocPtr->cmdPrefix); - Tcl_EventuallyFree((ClientData) assocPtr, TCL_DYNAMIC); + Tcl_EventuallyFree(assocPtr, TCL_DYNAMIC); } /* @@ -624,9 +633,8 @@ Tcl_CreateExitHandler( Tcl_ExitProc *proc, /* Function to invoke. */ ClientData clientData) /* Arbitrary value to pass to proc. */ { - ExitHandler *exitPtr; + ExitHandler *exitPtr = (ExitHandler *) ckalloc(sizeof(ExitHandler)); - exitPtr = (ExitHandler *) ckalloc(sizeof(ExitHandler)); exitPtr->proc = proc; exitPtr->clientData = clientData; Tcl_MutexLock(&exitMutex); @@ -640,7 +648,8 @@ Tcl_CreateExitHandler( * * TclCreateLateExitHandler -- * - * Arrange for a given function to be invoked after all pre-thread cleanups + * Arrange for a given function to be invoked after all pre-thread + * cleanups. * * Results: * None. @@ -657,9 +666,8 @@ TclCreateLateExitHandler( Tcl_ExitProc *proc, /* Function to invoke. */ ClientData clientData) /* Arbitrary value to pass to proc. */ { - ExitHandler *exitPtr; + ExitHandler *exitPtr = (ExitHandler *) ckalloc(sizeof(ExitHandler)); - exitPtr = (ExitHandler *) ckalloc(sizeof(ExitHandler)); exitPtr->proc = proc; exitPtr->clientData = clientData; Tcl_MutexLock(&exitMutex); @@ -723,8 +731,8 @@ Tcl_DeleteExitHandler( * None. * * Side effects: - * If there is a late exit handler corresponding to proc and clientData then - * it is canceled; if no such handler exists then nothing happens. + * If there is a late exit handler corresponding to proc and clientData + * then it is canceled; if no such handler exists then nothing happens. * *---------------------------------------------------------------------- */ @@ -942,7 +950,7 @@ Tcl_Exit( * returns, so critical is this dependcy. */ - currentAppExitPtr((ClientData) INT2PTR(status)); + currentAppExitPtr(INT2PTR(status)); Tcl_Panic("AppExitProc returned unexpectedly"); } else { /* @@ -1036,12 +1044,12 @@ TclInitSubsystems(void) TclpInitPlatform(); /* Creates signal handler(s) */ TclInitDoubleConversion(); /* Initializes constants for * converting to/from double. */ - TclInitObjSubsystem(); /* Register obj types, create + TclInitObjSubsystem(); /* Register obj types, create * mutexes. */ TclInitIOSubsystem(); /* Inits a tsd key (noop). */ TclInitEncodingSubsystem(); /* Process wide encoding init. */ TclpSetInterfaces(); - TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */ + TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */ } TclpInitUnlock(); } @@ -1070,9 +1078,11 @@ void Tcl_Finalize(void) { ExitHandler *exitPtr; + /* * Invoke exit handlers first. */ + InvokeExitHandlers(); TclpInitLock(); @@ -1102,7 +1112,8 @@ Tcl_Finalize(void) */ Tcl_MutexLock(&exitMutex); - for (exitPtr = firstLateExitPtr; exitPtr != NULL; exitPtr = firstLateExitPtr) { + for (exitPtr = firstLateExitPtr; exitPtr != NULL; + exitPtr = firstLateExitPtr) { /* * Be careful to remove the handler from the list before invoking its * callback. This protects us against double-freeing if the callback @@ -1179,10 +1190,10 @@ Tcl_Finalize(void) /* * There have been several bugs in the past that cause exit handlers to be * established during Tcl_Finalize processing. Such exit handlers leave - * malloc'ed memory, and Tcl_FinalizeThreadAlloc or - * Tcl_FinalizeMemorySubsystem will result in a corrupted heap. The result - * can be a mysterious crash on process exit. Check here that nobody's - * done this. + * malloc'ed memory, and Tcl_FinalizeMemorySubsystem or + * Tcl_FinalizeThreadAlloc will result in a corrupted heap. The result can + * be a mysterious crash on process exit. Check here that nobody's done + * this. */ if (firstExitPtr != NULL) { @@ -1263,7 +1274,7 @@ Tcl_FinalizeThread(void) * initialized already. */ - tsdPtr = (ThreadSpecificData *)TclThreadDataKeyGet(&dataKey); + tsdPtr = TclThreadDataKeyGet(&dataKey); if (tsdPtr != NULL) { tsdPtr->inExit = 1; @@ -1339,13 +1350,12 @@ TclInExit(void) int TclInThreadExit(void) { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - TclThreadDataKeyGet(&dataKey); + ThreadSpecificData *tsdPtr = TclThreadDataKeyGet(&dataKey); + if (tsdPtr == NULL) { return 0; - } else { - return tsdPtr->inExit; } + return tsdPtr->inExit; } /* @@ -1383,7 +1393,7 @@ Tcl_VwaitObjCmd( nameString = Tcl_GetString(objv[1]); if (Tcl_TraceVar(interp, nameString, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - VwaitVarProc, (ClientData) &done) != TCL_OK) { + VwaitVarProc, &done) != TCL_OK) { return TCL_ERROR; }; done = 0; @@ -1401,27 +1411,30 @@ Tcl_VwaitObjCmd( } Tcl_UntraceVar(interp, nameString, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - VwaitVarProc, (ClientData) &done); + VwaitVarProc, &done); if (!foundEvent) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "can't wait for variable \"", nameString, "\": would wait forever", NULL); + Tcl_SetErrorCode(interp, "TCL", "EVENT", "NO_SOURCES", NULL); return TCL_ERROR; } if (!done) { /* - * The interpreter's result was already set to the right error - * message prior to exiting the loop above. + * The interpreter's result was already set to the right error message + * prior to exiting the loop above. */ + return TCL_ERROR; - } else { - /* - * Clear out the interpreter's result, since it may have been - * set by event handlers. - */ - Tcl_ResetResult(interp); } + + /* + * Clear out the interpreter's result, since it may have been set by event + * handlers. + */ + + Tcl_ResetResult(interp); return TCL_OK; } @@ -1434,7 +1447,7 @@ VwaitVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - int *donePtr = (int *) clientData; + int *donePtr = clientData; *donePtr = 1; return NULL; @@ -1511,11 +1524,11 @@ Tcl_UpdateObjCmd( #ifdef TCL_THREADS /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * NewThreadProc -- * - * Bootstrap function of a new Tcl thread. + * Bootstrap function of a new Tcl thread. * * Results: * None. @@ -1523,7 +1536,7 @@ Tcl_UpdateObjCmd( * Side Effects: * Initializes Tcl notifier for the current thread. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ static Tcl_ThreadCreateType @@ -1573,14 +1586,17 @@ Tcl_CreateThread( * thread. */ { #ifdef TCL_THREADS - ThreadClientData *cdPtr; + ThreadClientData *cdPtr = (ThreadClientData *) + ckalloc(sizeof(ThreadClientData)); + int result; - cdPtr = (ThreadClientData *) ckalloc(sizeof(ThreadClientData)); cdPtr->proc = proc; cdPtr->clientData = clientData; - - return TclpThreadCreate(idPtr, NewThreadProc, (ClientData) cdPtr, - stackSize, flags); + result = TclpThreadCreate(idPtr, NewThreadProc, cdPtr, stackSize, flags); + if (result != TCL_OK) { + ckfree((char *) cdPtr); + } + return result; #else return TCL_ERROR; #endif /* TCL_THREADS */ diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 8a25eb4..8e67238 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.100 2009/12/28 12:55:48 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.101 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -1424,8 +1424,7 @@ Tcl_GlobObjCmd( if (length <= 0) { goto skipTypes; } - globTypes = (Tcl_GlobTypeData *) - TclStackAlloc(interp, sizeof(Tcl_GlobTypeData)); + globTypes = TclStackAlloc(interp, sizeof(Tcl_GlobTypeData)); globTypes->type = 0; globTypes->perm = 0; globTypes->macType = NULL; diff --git a/generic/tclHash.c b/generic/tclHash.c index 99c4b67..a7d6b40 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.43 2010/02/17 21:58:11 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.44 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -353,7 +353,7 @@ Tcl_CreateHashEntry( hPtr->nextPtr = tablePtr->buckets[index]; tablePtr->buckets[index] = hPtr; #else - hPtr->bucketPtr = &(tablePtr->buckets[index]); + hPtr->bucketPtr = &tablePtr->buckets[index]; hPtr->nextPtr = *hPtr->bucketPtr; *hPtr->bucketPtr = hPtr; #endif @@ -416,12 +416,12 @@ Tcl_DeleteHashEntry( #if TCL_HASH_KEY_STORE_HASH if (typePtr->hashKeyProc == NULL || typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { - index = RANDOM_INDEX (tablePtr, entryPtr->hash); + index = RANDOM_INDEX(tablePtr, entryPtr->hash); } else { index = PTR2UINT(entryPtr->hash) & tablePtr->mask; } - bucketPtr = &(tablePtr->buckets[index]); + bucketPtr = &tablePtr->buckets[index]; #else bucketPtr = entryPtr->bucketPtr; #endif @@ -1063,7 +1063,7 @@ RebuildTable( index = RANDOM_INDEX(tablePtr, key); } - hPtr->bucketPtr = &(tablePtr->buckets[index]); + hPtr->bucketPtr = &tablePtr->buckets[index]; hPtr->nextPtr = *hPtr->bucketPtr; *hPtr->bucketPtr = hPtr; #endif diff --git a/generic/tclIO.c b/generic/tclIO.c index 115bf9a..7ed714c 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.171 2010/01/18 22:19:11 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.172 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -64,7 +64,7 @@ static int CloseChannel(Tcl_Interp *interp, Channel *chanPtr, int errorCode); static int CloseChannelPart(Tcl_Interp *interp, Channel *chanPtr, int errorCode, int flags); -static int CloseWrite(Tcl_Interp *interp, Channel* chanPtr); +static int CloseWrite(Tcl_Interp *interp, Channel *chanPtr); static void CommonGetsCleanup(Channel *chanPtr); static int CopyAndTranslateBuffer(ChannelState *statePtr, char *result, int space); @@ -120,7 +120,7 @@ static int WriteChars(Channel *chanPtr, const char *src, static Tcl_Obj * FixLevelCode(Tcl_Obj *msg); static void SpliceChannel(Tcl_Channel chan); static void CutChannel(Tcl_Channel chan); -static int WillRead(Channel *chanPtr); +static int WillRead(Channel *chanPtr); /* * Simplifying helper macros. All may use their argument(s) multiple times. @@ -1370,10 +1370,14 @@ Tcl_CreateChannel( */ if (chanName != NULL) { - unsigned len = strlen(chanName) + 1; - /* make sure we allocate at least 7 bytes, so it fits for "stdout" later */ - tmp = ckalloc((len < 7) ? 7 : len); + unsigned len = strlen(chanName) + 1; + + /* + * Make sure we allocate at least 7 bytes, so it fits for "stdout" + * later. + */ + tmp = ckalloc((len < 7) ? 7 : len); strcpy(tmp, chanName); } else { tmp = ckalloc(7); @@ -2093,11 +2097,12 @@ Tcl_GetChannelHandle( chanPtr = ((Channel *) chan)->state->bottomChanPtr; if (!chanPtr->typePtr->getHandleProc) { - Tcl_Obj* err; + Tcl_Obj *err; + TclNewLiteralStringObj(err, "channel \""); Tcl_AppendToObj(err, Tcl_GetChannelName(chan), -1); Tcl_AppendToObj(err, "\" does not support OS handles", -1); - Tcl_SetChannelError (chan,err); + Tcl_SetChannelError(chan, err); return TCL_ERROR; } result = chanPtr->typePtr->getHandleProc(chanPtr->instanceData, direction, @@ -3284,12 +3289,15 @@ Tcl_CloseEx( static int CloseWrite( Tcl_Interp *interp, /* Interpreter for errors. */ - Channel* chanPtr) /* The channel whose write side is being closed. May still be used by some interpreter */ + Channel *chanPtr) /* The channel whose write side is being + * closed. May still be used by some + * interpreter */ { - /* Notes: clear-channel-handlers - write side only ? or keep around, just not caled */ + /* Notes: clear-channel-handlers - write side only ? or keep around, just + * not called */ /* No close cllbacks are run - channel is still open (read side) */ - ChannelState *statePtr = chanPtr->state; /* State of real IO channel. */ + ChannelState *statePtr = chanPtr->state; /* State of real IO channel */ int flushcode; int result = 0; @@ -3357,7 +3365,7 @@ CloseWrite( static int CloseChannelPart( Tcl_Interp *interp, /* Interpreter for errors. */ - Channel* chanPtr, /* The channel being closed. May still be used + Channel *chanPtr, /* The channel being closed. May still be used * by some interpreter. */ int errorCode, /* Status of operation so far. */ int flags) /* Flags telling us which side to close. */ @@ -3836,24 +3844,29 @@ Tcl_WriteObj( } } -static void WillWrite(Channel *chanPtr) +static void +WillWrite( + Channel *chanPtr) { int inputBuffered; - if ((chanPtr->typePtr->seekProc != NULL) - && ((inputBuffered = Tcl_InputBuffered((Tcl_Channel) chanPtr)) > 0)) { + if ((chanPtr->typePtr->seekProc != NULL) && + ((inputBuffered = Tcl_InputBuffered((Tcl_Channel) chanPtr)) > 0)){ int ignore; + DiscardInputQueued(chanPtr->state, 0); - ChanSeek(chanPtr, - inputBuffered, SEEK_CUR, &ignore); + ChanSeek(chanPtr, -inputBuffered, SEEK_CUR, &ignore); } } -static int WillRead(Channel *chanPtr) +static int +WillRead( + Channel *chanPtr) { if ((chanPtr->typePtr->seekProc != NULL) - && (Tcl_OutputBuffered((Tcl_Channel) chanPtr) > 0)) { + && (Tcl_OutputBuffered((Tcl_Channel) chanPtr) > 0)) { if ((chanPtr->state->curOutPtr != NULL) - && IsBufferReady(chanPtr->state->curOutPtr)) { + && IsBufferReady(chanPtr->state->curOutPtr)) { SetFlag(chanPtr->state, BUFFER_READY); } if (FlushChannel(NULL, chanPtr, 0) != 0) { @@ -9875,7 +9888,7 @@ CopyEventProc( ClientData clientData, int mask) { - (void) CopyData((CopyState *) clientData, mask); + (void) CopyData(clientData, mask); } /* @@ -10401,13 +10414,13 @@ Tcl_ChannelBlockModeProc( { if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_2)) { return chanTypePtr->blockModeProc; - } else { - /* - * The v1 structure had the blockModeProc in a different place. - */ - - return (Tcl_DriverBlockModeProc *) chanTypePtr->version; } + + /* + * The v1 structure had the blockModeProc in a different place. + */ + + return (Tcl_DriverBlockModeProc *) chanTypePtr->version; } /* @@ -10649,9 +10662,8 @@ Tcl_ChannelFlushProc( { if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_2)) { return chanTypePtr->flushProc; - } else { - return NULL; } + return NULL; } /* @@ -10677,9 +10689,8 @@ Tcl_ChannelHandlerProc( { if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_2)) { return chanTypePtr->handlerProc; - } else { - return NULL; } + return NULL; } /* @@ -10705,9 +10716,8 @@ Tcl_ChannelWideSeekProc( { if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_3)) { return chanTypePtr->wideSeekProc; - } else { - return NULL; } + return NULL; } /* @@ -10734,9 +10744,8 @@ Tcl_ChannelThreadActionProc( { if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_4)) { return chanTypePtr->threadActionProc; - } else { - return NULL; } + return NULL; } /* @@ -11050,9 +11059,8 @@ Tcl_ChannelTruncateProc( { if (HaveVersion(chanTypePtr, TCL_CHANNEL_VERSION_5)) { return chanTypePtr->truncateProc; - } else { - return NULL; } + return NULL; } /* @@ -11189,7 +11197,7 @@ UpdateStringOfChannel( if (name) { size_t len = strlen(name); - objPtr->bytes = (char *) ckalloc(len + 1); + objPtr->bytes = ckalloc(len + 1); objPtr->length = len; memcpy(objPtr->bytes, name, len); } else { diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 68072fa..3139268 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.44 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.45 2010/02/24 10:45:04 dkf Exp $ */ #include @@ -448,7 +448,7 @@ static int InvokeTclMethod(ReflectedChannel *rcPtr, static ReflectedChannelMap * GetReflectedChannelMap(Tcl_Interp *interp); static void DeleteReflectedChannelMap(ClientData clientData, Tcl_Interp *interp); -static int ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj* resObj); +static int ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj *resObj); /* * Global constant strings (messages). ================== @@ -857,7 +857,7 @@ TclChanPostEventObjCmd( Tcl_Panic("TclChanPostEventObjCmd: channel is not a reflected channel"); } - rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); + rcPtr = Tcl_GetChannelInstanceData(chan); if (rcPtr->interp != interp) { Tcl_Panic("TclChanPostEventObjCmd: postevent accepted for call from outside interpreter"); @@ -958,7 +958,7 @@ UnmarshallErrorResult( } (void) Tcl_SetReturnOptions(interp, Tcl_NewListObj(numOptions, lv)); - ((Interp *)interp)->flags &= ~ERR_ALREADY_LOGGED; + ((Interp *) interp)->flags &= ~ERR_ALREADY_LOGGED; } int @@ -1043,7 +1043,7 @@ ReflectClose( ClientData clientData, Tcl_Interp *interp) { - ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; + ReflectedChannel *rcPtr = clientData; int result; /* Result code for 'close' */ Tcl_Obj *resObj; /* Result data for 'close' */ ReflectedChannelMap *rcmPtr;/* Map of reflected channels with handlers in @@ -1147,7 +1147,7 @@ ReflectClose( if (rcPtr->interp) { rcmPtr = GetReflectedChannelMap(rcPtr->interp); hPtr = Tcl_FindHashEntry(&rcmPtr->map, - Tcl_GetChannelName(rcPtr->chan)); + Tcl_GetChannelName(rcPtr->chan)); if (hPtr) { Tcl_DeleteHashEntry(hPtr); } @@ -1191,7 +1191,7 @@ ReflectInput( int toRead, int *errorCodePtr) { - ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; + ReflectedChannel *rcPtr = clientData; Tcl_Obj *toReadObj; int bytec; /* Number of returned bytes */ unsigned char *bytev; /* Array of returned bytes */ @@ -1244,7 +1244,7 @@ ReflectInput( toReadObj = Tcl_NewIntObj(toRead); if (InvokeTclMethod(rcPtr, "read", toReadObj, NULL, &resObj)!=TCL_OK) { - int code = ErrnoReturn (rcPtr, resObj); + int code = ErrnoReturn(rcPtr, resObj); if (code < 0) { Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ @@ -1300,7 +1300,7 @@ ReflectOutput( int toWrite, int *errorCodePtr) { - ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; + ReflectedChannel *rcPtr = clientData; Tcl_Obj *bufObj; Tcl_Obj *resObj; /* Result data for 'write' */ int written; @@ -1411,7 +1411,7 @@ ReflectSeekWide( int seekMode, int *errorCodePtr) { - ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; + ReflectedChannel *rcPtr = clientData; Tcl_Obj *offObj, *baseObj; Tcl_Obj *resObj; /* Result for 'seek' */ Tcl_WideInt newLoc; @@ -1512,7 +1512,7 @@ ReflectWatch( ClientData clientData, int mask) { - ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; + ReflectedChannel *rcPtr = clientData; Tcl_Obj *maskObj; /* ASSERT rcPtr->methods & FLAG(METH_WATCH) */ @@ -1582,7 +1582,7 @@ ReflectBlock( ClientData clientData, int nonblocking) { - ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; + ReflectedChannel *rcPtr = clientData; Tcl_Obj *blockObj; int errorNum; /* EINVAL or EOK (success). */ Tcl_Obj *resObj; /* Result data for 'blocking' */ @@ -1644,7 +1644,7 @@ ReflectSetOption( const char *optionName, /* Name of requested option */ const char *newValue) /* The new value */ { - ReflectedChannel *rcPtr = (ReflectedChannel *) clientData; + ReflectedChannel *rcPtr = clientData; Tcl_Obj *optionObj, *valueObj; int result; /* Result code for 'configure' */ Tcl_Obj *resObj; /* Result data for 'configure' */ @@ -2302,7 +2302,9 @@ InvokeTclMethod( */ static int -ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj* resObj) +ErrnoReturn( + ReflectedChannel *rcPtr, + Tcl_Obj *resObj) { int code; Tcl_InterpState sr; /* State of handler interp */ @@ -2316,8 +2318,9 @@ ErrnoReturn(ReflectedChannel *rcPtr, Tcl_Obj* resObj) resObj = Tcl_GetObjResult(rcPtr->interp); - if (((Tcl_GetIntFromObj(rcPtr->interp, resObj, &code) != TCL_OK) || (code >= 0))) { - if (strcmp ("EAGAIN",Tcl_GetString(resObj)) == 0) { + if (((Tcl_GetIntFromObj(rcPtr->interp, resObj, &code) != TCL_OK) + || (code >= 0))) { + if (strcmp("EAGAIN", Tcl_GetString(resObj)) == 0) { code = - EAGAIN; } else { code = 0; @@ -2385,12 +2388,12 @@ DeleteReflectedChannelMap( ClientData clientData, /* The per-interpreter data structure. */ Tcl_Interp *interp) /* The interpreter being deleted. */ { - ReflectedChannelMap *rcmPtr; /* The map */ + ReflectedChannelMap *rcmPtr = clientData; + /* The map */ Tcl_HashSearch hSearch; /* Search variable. */ Tcl_HashEntry *hPtr; /* Search variable. */ ReflectedChannel *rcPtr; Tcl_Channel chan; - #ifdef TCL_THREADS ForwardingResult *resultPtr; ForwardingEvent *evPtr; @@ -2409,12 +2412,11 @@ DeleteReflectedChannelMap( * this interp. */ - rcmPtr = clientData; for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); hPtr != NULL; hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { chan = Tcl_GetHashValue(hPtr); - rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); + rcPtr = Tcl_GetChannelInstanceData(chan); rcPtr->interp = NULL; Tcl_DeleteHashEntry(hPtr); @@ -2475,7 +2477,7 @@ DeleteReflectedChannelMap( hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) { chan = Tcl_GetHashValue(hPtr); - rcPtr = (ReflectedChannel *) Tcl_GetChannelInstanceData(chan); + rcPtr = Tcl_GetChannelInstanceData(chan); if (rcPtr->interp != interp) { /* @@ -2608,9 +2610,8 @@ DeleteThreadReflectedChannelMap( for (hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch); hPtr != NULL; hPtr = Tcl_FirstHashEntry(&rcmPtr->map, &hSearch)) { - Tcl_Channel chan = (Tcl_Channel) Tcl_GetHashValue(hPtr); - ReflectedChannel *rcPtr = (ReflectedChannel *) - Tcl_GetChannelInstanceData(chan); + Tcl_Channel chan = Tcl_GetHashValue(hPtr); + ReflectedChannel *rcPtr = Tcl_GetChannelInstanceData(chan); rcPtr->interp = NULL; Tcl_DeleteHashEntry(hPtr); @@ -2683,13 +2684,13 @@ ForwardOpToOwnerThread( * (see above) for. */ - Tcl_CreateThreadExitHandler(SrcExitProc, (ClientData) evPtr); + Tcl_CreateThreadExitHandler(SrcExitProc, evPtr); /* * Queue the event and poke the other thread's notifier. */ - Tcl_ThreadQueueEvent(dst, (Tcl_Event *)evPtr, TCL_QUEUE_TAIL); + Tcl_ThreadQueueEvent(dst, (Tcl_Event *) evPtr, TCL_QUEUE_TAIL); Tcl_ThreadAlert(dst); /* @@ -2730,7 +2731,7 @@ ForwardOpToOwnerThread( * Note: The event structure has already been deleted. */ - Tcl_DeleteThreadExitHandler(SrcExitProc, (ClientData) evPtr); + Tcl_DeleteThreadExitHandler(SrcExitProc, evPtr); result = resultPtr->result; ckfree((char *) resultPtr); @@ -2820,7 +2821,7 @@ ForwardProc( Tcl_Obj *toReadObj = Tcl_NewIntObj(paramPtr->input.toRead); if (InvokeTclMethod(rcPtr, "read", toReadObj, NULL, &resObj)!=TCL_OK){ - int code = ErrnoReturn (rcPtr, resObj); + int code = ErrnoReturn(rcPtr, resObj); if (code < 0) { paramPtr->base.code = code; @@ -3035,7 +3036,7 @@ static void SrcExitProc( ClientData clientData) { - ForwardingEvent *evPtr = (ForwardingEvent *) clientData; + ForwardingEvent *evPtr = clientData; ForwardingResult *resultPtr; ForwardParam *paramPtr; diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 4dfe78f..a6e7ed5 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.11 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.12 2010/02/24 10:45:04 dkf Exp $ */ #include @@ -74,7 +74,7 @@ static const Tcl_ChannelType tclRTransformType = { ReflectGetOption, /* Get options. */ ReflectWatch, /* Initialize notifier. */ ReflectHandle, /* Get OS handle from the channel. */ - NULL, /* No close2 support. NULL'able */ + NULL, /* No close2 support. NULL'able. */ ReflectBlock, /* Set blocking/nonblocking. */ NULL, /* Flush channel. Not used by core. * NULL'able. */ @@ -90,9 +90,9 @@ static const Tcl_ChannelType tclRTransformType = { */ typedef struct _ResultBuffer_ { - unsigned char *buf; /* Reference to the buffer area. */ - int allocated; /* Allocated size of the buffer area. */ - int used; /* Number of bytes in the buffer, + unsigned char *buf; /* Reference to the buffer area. */ + int allocated; /* Allocated size of the buffer area. */ + int used; /* Number of bytes in the buffer, * <= allocated. */ } ResultBuffer; @@ -444,15 +444,14 @@ static const char *msg_dstlost = #define FLUSH_DELAY (5) -static void TimerKill(ReflectedTransform* rtPtr); -static void TimerSetup(ReflectedTransform* rtPtr); -static void TimerRun(ClientData clientData); - /* * Helper functions encapsulating some of the thread forwarding to make the * control flow in callers easier. */ +static void TimerKill(ReflectedTransform *rtPtr); +static void TimerSetup(ReflectedTransform *rtPtr); +static void TimerRun(ClientData clientData); static int TransformRead(ReflectedTransform *rtPtr, int *errorCodePtr, unsigned char *buf, int toRead); @@ -467,9 +466,12 @@ static void TransformClear(ReflectedTransform *rtPtr); static int TransformLimit(ReflectedTransform *rtPtr, int *errorCodePtr, int *maxPtr); -/* op'codes for TransformFlush */ -#define FLUSH_WRITE 1 -#define FLUSH_DISCARD 0 +/* + * Operation codes for TransformFlush(). + */ + +#define FLUSH_WRITE 1 +#define FLUSH_DISCARD 0 /* * Main methods to plug into the 'chan' ensemble'. ================== @@ -576,7 +578,7 @@ TclChanPushObjCmd( * Now create the transformation (channel). */ - rtId = NextHandle(); + rtId = NextHandle(); rtPtr = NewReflectedTransform(interp, cmdObj, mode, rtId, parentChan); /* @@ -585,7 +587,7 @@ TclChanPushObjCmd( */ modeObj = DecodeEventMask(mode); - result = InvokeTclMethod(rtPtr, "initialize", modeObj, NULL, &resObj); + result = InvokeTclMethod(rtPtr, "initialize", modeObj, NULL, &resObj); Tcl_DecrRefCount(modeObj); if (result != TCL_OK) { UnmarshallErrorResult(interp, resObj); @@ -1329,8 +1331,9 @@ ReflectSeekWide( * request down and the result back up unchanged. */ - if (((seekMode != SEEK_CUR) || (offset != 0)) && - (HAS(rtPtr->methods,METH_CLEAR) || HAS(rtPtr->methods,METH_FLUSH))){ + if (((seekMode != SEEK_CUR) || (offset != 0)) + && (HAS(rtPtr->methods, METH_CLEAR) + || HAS(rtPtr->methods, METH_FLUSH))) { /* * Neither a tell request, nor clear/flush both not supported. We have * to go through the Tcl level to clear and/or flush the @@ -2654,7 +2657,7 @@ ForwardProc( } case ForwardedLimit: { - Tcl_Obj* resObj; + Tcl_Obj *resObj; if (InvokeTclMethod(rtPtr, "limit?", NULL, NULL, &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); @@ -3196,7 +3199,7 @@ TransformFlush( int *errorCodePtr, int op) { - Tcl_Obj* resObj; + Tcl_Obj *resObj; int bytec; /* Number of returned bytes */ unsigned char *bytev; /* Array of returned bytes */ int res; diff --git a/generic/tclInterp.c b/generic/tclInterp.c index a9adec1..7c5e5b5 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.110 2009/12/29 14:55:42 dkf Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.111 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -664,23 +664,24 @@ Tcl_InterpObjCmd( } switch ((enum option) index) { - case OPT_UNWIND: - /* - * The evaluation stack in the target interp is to be - * unwound. - */ - flags |= TCL_CANCEL_UNWIND; - break; - case OPT_LAST: - i++; - goto endOfForLoop; + case OPT_UNWIND: + /* + * The evaluation stack in the target interp is to be unwound. + */ + + flags |= TCL_CANCEL_UNWIND; + break; + case OPT_LAST: + i++; + goto endOfForLoop; } } endOfForLoop: if ((i + 2) < objc) { - Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? ?--? ?path? ?result?"); + Tcl_WrongNumArgs(interp, 2, objv, + "?-unwind? ?--? ?path? ?result?"); return TCL_ERROR; } @@ -699,7 +700,12 @@ Tcl_InterpObjCmd( if (slaveInterp != NULL) { if (i < objc) { resultObjPtr = objv[i]; - Tcl_IncrRefCount(resultObjPtr); /* Tcl_CancelEval removes this ref. */ + + /* + * Tcl_CancelEval removes this reference. + */ + + Tcl_IncrRefCount(resultObjPtr); i++; } else { resultObjPtr = NULL; @@ -1143,8 +1149,7 @@ Tcl_CreateAlias( int i; int result; - objv = (Tcl_Obj **) - TclStackAlloc(slaveInterp, (unsigned) sizeof(Tcl_Obj *) * argc); + objv = TclStackAlloc(slaveInterp, (unsigned) sizeof(Tcl_Obj *) * argc); for (i = 0; i < argc; i++) { objv[i] = Tcl_NewStringObj(argv[i], -1); Tcl_IncrRefCount(objv[i]); @@ -1839,7 +1844,7 @@ AliasObjCmd( if (cmdc <= ALIAS_CMDV_PREALLOC) { cmdv = cmdArr; } else { - cmdv = (Tcl_Obj **) TclStackAlloc(interp, cmdc*(int)sizeof(Tcl_Obj*)); + cmdv = TclStackAlloc(interp, cmdc * sizeof(Tcl_Obj *)); } prefv = &aliasPtr->objPtr; diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 2e8b814..dee324c 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.202 2010/02/15 11:53:44 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.203 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -431,7 +431,7 @@ TclPushStackFrame( * treated as references to namespace * variables. */ { - *framePtrPtr = (Tcl_CallFrame *) TclStackAlloc(interp, sizeof(CallFrame)); + *framePtrPtr = TclStackAlloc(interp, sizeof(CallFrame)); return Tcl_PushCallFrame(interp, *framePtrPtr, namespacePtr, isProcCallFrame); } @@ -2600,8 +2600,8 @@ TclResetShadowedCmdRefs( int found, i; int trailFront = -1; int trailSize = 5; /* Formerly NUM_TRAIL_ELEMS. */ - Namespace **trailPtr = (Namespace **) - TclStackAlloc(interp, trailSize * sizeof(Namespace *)); + Namespace **trailPtr = TclStackAlloc(interp, + trailSize * sizeof(Namespace *)); /* * Start at the namespace containing the new command, and work up through @@ -2690,8 +2690,8 @@ TclResetShadowedCmdRefs( if (trailFront == trailSize) { int newSize = 2 * trailSize; - trailPtr = (Namespace **) TclStackRealloc(interp, - trailPtr, newSize * sizeof(Namespace *)); + trailPtr = TclStackRealloc(interp, trailPtr, + newSize * sizeof(Namespace *)); trailSize = newSize; } trailPtr[trailFront] = nsPtr; @@ -4014,8 +4014,8 @@ NamespacePathCmd( goto badNamespace; } if (nsObjc != 0) { - namespaceList = (Tcl_Namespace **) - TclStackAlloc(interp, sizeof(Tcl_Namespace *) * nsObjc); + namespaceList = TclStackAlloc(interp, + sizeof(Tcl_Namespace *) * nsObjc); for (i=0 ; iqueueMutex)); diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index fa47256..bc6bd86 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.23 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.24 2010/02/24 10:45:04 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -686,7 +686,7 @@ InvokeProcedureMethod( * Allocate the special frame data. */ - fdPtr = (PMFrameData *) TclStackAlloc(interp, sizeof(PMFrameData)); + fdPtr = TclStackAlloc(interp, sizeof(PMFrameData)); /* * Create a call frame for this method. diff --git a/generic/tclObj.c b/generic/tclObj.c index 721de46..05bba4d 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.169 2010/02/17 21:58:11 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.170 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -576,7 +576,7 @@ TclContinuationsEnter( int newEntry; ThreadSpecificData *tsdPtr = TclGetContLineTable(); Tcl_HashEntry *hPtr = - Tcl_CreateHashEntry(tsdPtr->lineCLPtr, (char *) objPtr, &newEntry); + Tcl_CreateHashEntry(tsdPtr->lineCLPtr, (char*) objPtr, &newEntry); ContLineLoc *clLocPtr = (ContLineLoc *) ckalloc(sizeof(ContLineLoc) + num*sizeof(int)); @@ -602,7 +602,7 @@ TclContinuationsEnter( * doing. */ - ckfree((char *) Tcl_GetHashValue(hPtr)); + ckfree(Tcl_GetHashValue(hPtr)); } clLocPtr->num = num; @@ -638,6 +638,9 @@ TclContinuationsEnterDerived( int start, int *clNext) { + int length, end, num; + int *wordCLLast = clNext; + /* * We have to handle invisible continuations lines here as well, despite * the code we have in TclSubstTokens (TST) for that. Why ? Nesting. If @@ -658,15 +661,11 @@ TclContinuationsEnterDerived( */ /* - * First compute the range of the word within the script. + * First compute the range of the word within the script. (Is there a + * better way which doesn't shimmer?) */ - int length, end, num; - int *wordCLLast = clNext; - Tcl_GetStringFromObj(objPtr, &length); - /* Is there a better way which doesn't shimmer ? */ - end = start + length; /* First char after the word */ /* @@ -690,7 +689,7 @@ TclContinuationsEnterDerived( * Re-base the locations. */ - for (i=0;iloc[i] -= start; /* @@ -1867,7 +1866,7 @@ Tcl_SetBooleanObj( int Tcl_GetBooleanFromObj( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr, /* The object from which to get boolean. */ register int *boolPtr) /* Place to store resulting boolean. */ { @@ -2259,7 +2258,7 @@ Tcl_SetDoubleObj( int Tcl_GetDoubleFromObj( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr, /* The object from which to get a double. */ register double *dblPtr) /* Place to store resulting double. */ { @@ -2472,7 +2471,7 @@ Tcl_SetIntObj( int Tcl_GetIntFromObj( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr, /* The object from which to get a int. */ register int *intPtr) /* Place to store resulting int. */ { @@ -2734,7 +2733,7 @@ Tcl_SetLongObj( int Tcl_GetLongFromObj( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr, /* The object from which to get a long. */ register long *longPtr) /* Place to store resulting long. */ { @@ -3051,7 +3050,7 @@ Tcl_SetWideIntObj( int Tcl_GetWideIntFromObj( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ + Tcl_Interp *interp, /* Used for error reporting if not NULL. */ register Tcl_Obj *objPtr, /* Object from which to get a wide int. */ register Tcl_WideInt *wideIntPtr) /* Place to store resulting long. */ diff --git a/generic/tclParse.c b/generic/tclParse.c index 65d09c2..dd9e4ff 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -183,13 +183,13 @@ static int ParseWhiteSpace(const char *src, int numBytes, * * TclParseInit -- * - * Initialize the fields of a Tcl_Parse struct. + * Initialize the fields of a Tcl_Parse struct. * * Results: - * None. + * None. * * Side effects: - * The Tcl_Parse struct pointed to by parsePtr gets initialized. + * The Tcl_Parse struct pointed to by parsePtr gets initialized. * *---------------------------------------------------------------------- */ @@ -252,7 +252,7 @@ Tcl_ParseCommand( * command terminator. If zero, then close * bracket has no special meaning. */ register Tcl_Parse *parsePtr) - /* Structure to fill in with information about + /* Structure to fill in with information about * the parsed command; any previous * information in the structure is ignored. */ { @@ -508,6 +508,7 @@ Tcl_ParseCommand( int growthNeeded = wordIndex + 2*elemCount - parsePtr->numTokens; + parsePtr->numWords += elemCount - 1; if (growthNeeded > 0) { TclGrowParseTokenArray(parsePtr, growthNeeded); @@ -770,14 +771,14 @@ TclParseHex( * sequence as defined by Tcl's parsing rules. * * Results: - * Records at readPtr the number of bytes making up the backslash - * sequence. Records at dst the UTF-8 encoded equivalent of that - * backslash sequence. Returns the number of bytes written to dst, at - * most TCL_UTF_MAX. Either readPtr or dst may be NULL, if the results - * are not needed, but the return value is the same either way. + * Records at readPtr the number of bytes making up the backslash + * sequence. Records at dst the UTF-8 encoded equivalent of that + * backslash sequence. Returns the number of bytes written to dst, at + * most TCL_UTF_MAX. Either readPtr or dst may be NULL, if the results + * are not needed, but the return value is the same either way. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -946,11 +947,11 @@ TclParseBackslash( * defined by Tcl's parsing rules. * * Results: - * Records in parsePtr information about the parse. Returns the number of - * bytes consumed. + * Records in parsePtr information about the parse. Returns the number of + * bytes consumed. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -1134,8 +1135,7 @@ ParseTokens( src++; numBytes--; - nestedPtr = (Tcl_Parse *) - TclStackAlloc(parsePtr->interp, sizeof(Tcl_Parse)); + nestedPtr = TclStackAlloc(parsePtr->interp, sizeof(Tcl_Parse)); while (1) { if (Tcl_ParseCommand(parsePtr->interp, src, numBytes, 1, nestedPtr) != TCL_OK) { @@ -1532,8 +1532,7 @@ Tcl_ParseVar( { register Tcl_Obj *objPtr; int code; - Tcl_Parse *parsePtr = (Tcl_Parse *) - TclStackAlloc(interp, sizeof(Tcl_Parse)); + Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); if (Tcl_ParseVarName(interp, start, -1, parsePtr, 0) != TCL_OK) { TclStackFree(interp, parsePtr); @@ -1616,7 +1615,7 @@ Tcl_ParseBraces( * the string consists of all bytes up to the * first null character. */ register Tcl_Parse *parsePtr, - /* Structure to fill in with information about + /* Structure to fill in with information about * the string. */ int append, /* Non-zero means append tokens to existing * information in parsePtr; zero means ignore @@ -1817,7 +1816,7 @@ Tcl_ParseQuotedString( * the string consists of all bytes up to the * first null character. */ register Tcl_Parse *parsePtr, - /* Structure to fill in with information about + /* Structure to fill in with information about * the string. */ int append, /* Non-zero means append tokens to existing * information in parsePtr; zero means ignore @@ -1867,24 +1866,25 @@ Tcl_ParseQuotedString( * * TclSubstParse -- * - * Token parser used by the [subst] command. Parses the string made - * up of 'numBytes' bytes starting at 'bytes'. Parsing is controlled - * by the flags argument to provide support for the -nobackslashes, - * -nocommands, and -novariables options, as represented by the flag - * values TCL_SUBST_BACKSLASHES, TCL_SUBST_COMMANDS, TCL_SUBST_VARIABLES. + * Token parser used by the [subst] command. Parses the string made up of + * 'numBytes' bytes starting at 'bytes'. Parsing is controlled by the + * flags argument to provide support for the -nobackslashes, -nocommands, + * and -novariables options, as represented by the flag values + * TCL_SUBST_BACKSLASHES, TCL_SUBST_COMMANDS, TCL_SUBST_VARIABLES. * * Results: * None. * * Side effects: + * The Tcl_Parse struct '*parsePtr' is filled with parse results. - * The caller is expected to eventually call Tcl_FreeParse() to - * properly cleanup the value written there. - * If a parse error occurs, the Tcl_InterpState value '*statePtr' - * is filled with the state created by that error. When *statePtr - * is written to, the caller is expected to make the required calls - * to either Tcl_RestoreInterpState() or Tcl_DiscardInterpState() - * to dispose of the value written there. + * The caller is expected to eventually call Tcl_FreeParse() to properly + * cleanup the value written there. + * If a parse error occurs, the Tcl_InterpState value '*statePtr' is + * filled with the state created by that error. When *statePtr is written + * to, the caller is expected to make the required calls to either + * Tcl_RestoreInterpState() or Tcl_DiscardInterpState() to dispose of the + * value written there. * *---------------------------------------------------------------------- */ @@ -2013,7 +2013,7 @@ TclSubstParse( Tcl_Token *tokenPtr; const char *lastTerm = parsePtr->term; - Tcl_Parse *nestedPtr = (Tcl_Parse *) + Tcl_Parse *nestedPtr = TclStackAlloc(interp, sizeof(Tcl_Parse)); while (TCL_OK == @@ -2074,13 +2074,13 @@ TclSubstParse( * non-TCL_OK completion code arises. * * Results: - * The return value is a standard Tcl completion code. The result in - * interp is the substituted value, or an error message if TCL_ERROR is - * returned. If tokensLeftPtr is not NULL, then it points to an int where - * the number of tokens remaining to be processed is written. + * The return value is a standard Tcl completion code. The result in + * interp is the substituted value, or an error message if TCL_ERROR is + * returned. If tokensLeftPtr is not NULL, then it points to an int where + * the number of tokens remaining to be processed is written. * * Side effects: - * Can be anything, depending on the types of substitution done. + * Can be anything, depending on the types of substitution done. * *---------------------------------------------------------------------- */ @@ -2098,29 +2098,30 @@ TclSubstTokens( * integer representing the number of tokens * left to be substituted will be written */ int line, /* The line the script starts on. */ - int* clNextOuter, /* Information about an outer context for */ - const char* outerScript) /* continuation line data. This is set by - * EvalEx() to properly handle [...]-nested - * commands. The 'outerScript' refers to the - * most-outer script containing the embedded - * command, which is refered to by 'script'. The - * 'clNextOuter' refers to the current entry in - * the table of continuation lines in this - * "master script", and the character offsets are - * relative to the 'outerScript' as well. - * - * If outerScript == script, then this call is for - * words in the outer-most script/command. See - * Tcl_EvalEx() and TclEvalObjEx() for the places - * generating arguments for which this is true. - */ + int *clNextOuter, /* Information about an outer context for */ + const char *outerScript) /* continuation line data. This is set by + * EvalEx() to properly handle [...]-nested + * commands. The 'outerScript' refers to the + * most-outer script containing the embedded + * command, which is refered to by 'script'. + * The 'clNextOuter' refers to the current + * entry in the table of continuation lines in + * this "master script", and the character + * offsets are relative to the 'outerScript' + * as well. + * + * If outerScript == script, then this call is + * for words in the outer-most script or + * command. See Tcl_EvalEx and TclEvalObjEx + * for the places generating arguments for + * which this is true. */ { Tcl_Obj *result; int code = TCL_OK; #define NUM_STATIC_POS 20 int isLiteral, maxNumCL, numCL, i, adjust; int *clPosition = NULL; - Interp* iPtr = (Interp*) interp; + Interp *iPtr = (Interp *) interp; int inFile = iPtr->evalFlags & TCL_EVAL_FILE; /* @@ -2137,24 +2138,24 @@ TclSubstTokens( * For the handling of continuation lines in literals we first check if * this is actually a literal. For if not we can forego the additional * processing. Otherwise we pre-allocate a small table to store the - * locations of all continuation lines we find in this literal, if - * any. The table is extended if needed. + * locations of all continuation lines we find in this literal, if any. + * The table is extended if needed. */ - numCL = 0; - maxNumCL = 0; + numCL = 0; + maxNumCL = 0; isLiteral = 1; for (i=0 ; i < count; i++) { - if ((tokenPtr[i].type != TCL_TOKEN_TEXT) && - (tokenPtr[i].type != TCL_TOKEN_BS)) { + if ((tokenPtr[i].type != TCL_TOKEN_TEXT) + && (tokenPtr[i].type != TCL_TOKEN_BS)) { isLiteral = 0; break; } } if (isLiteral) { - maxNumCL = NUM_STATIC_POS; - clPosition = (int*) ckalloc (maxNumCL*sizeof(int)); + maxNumCL = NUM_STATIC_POS; + clPosition = (int *) ckalloc(maxNumCL * sizeof(int)); } adjust = 0; @@ -2191,10 +2192,11 @@ TclSubstTokens( * correction. */ - if ((appendByteLength == 1) && (utfCharBytes[0] == ' ') && - (tokenPtr->start[1] == '\n')) { + if ((appendByteLength == 1) && (utfCharBytes[0] == ' ') + && (tokenPtr->start[1] == '\n')) { if (isLiteral) { int clPos; + if (result == 0) { clPos = 0; } else { @@ -2203,28 +2205,29 @@ TclSubstTokens( if (numCL >= maxNumCL) { maxNumCL *= 2; - clPosition = (int*) ckrealloc ((char*)clPosition, - maxNumCL*sizeof(int)); + clPosition = (int *) ckrealloc((char *) clPosition, + maxNumCL * sizeof(int)); } clPosition[numCL] = clPos; - numCL ++; + numCL++; } - adjust ++; + adjust++; } break; case TCL_TOKEN_COMMAND: { /* TIP #280: Transfer line information to nested command */ - iPtr->numLevels++; - code = TclInterpReady(interp); - if (code == TCL_OK) { + iPtr->numLevels++; + code = TclInterpReady(interp); + if (code == TCL_OK) { /* * Test cases: info-30.{6,8,9} */ int theline; - TclAdvanceContinuations (&line, &clNextOuter, - tokenPtr->start - outerScript); + + TclAdvanceContinuations(&line, &clNextOuter, + tokenPtr->start - outerScript); theline = line + adjust; code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, 0, theline, clNextOuter, outerScript); @@ -2236,7 +2239,8 @@ TclSubstTokens( * Restore flag reset by nested eval for future bracketed * commands and their cmdframe setup */ - if (inFile) { + + if (inFile) { iPtr->evalFlags |= TCL_EVAL_FILE; } } @@ -2340,6 +2344,7 @@ TclSubstTokens( if (code != TCL_ERROR) { /* Keep error message in result! */ if (result != NULL) { Tcl_SetObjResult(interp, result); + /* * If the code found continuation lines (which implies that this * word is a literal), then we store the accumulated table of @@ -2358,7 +2363,7 @@ TclSubstTokens( */ if (maxNumCL) { - ckfree ((char*) clPosition); + ckfree((char *) clPosition); } } else { Tcl_ResetResult(interp); @@ -2502,8 +2507,8 @@ TclIsLocalScalar( const char *lastChar = src + (len - 1); for (p=src ; p<=lastChar ; p++) { - if ((CHAR_TYPE(*p) != TYPE_NORMAL) && - (CHAR_TYPE(*p) != TYPE_COMMAND_END)) { + if ((CHAR_TYPE(*p) != TYPE_NORMAL) + && (CHAR_TYPE(*p) != TYPE_COMMAND_END)) { /* * TCL_COMMAND_END is returned for the last character of the * string. By this point we know it isn't an array or namespace diff --git a/generic/tclPipe.c b/generic/tclPipe.c index e8e4f74..37dd5b1 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPipe.c,v 1.22 2009/07/23 22:49:15 andreas_kupries Exp $ + * RCS: @(#) $Id: tclPipe.c,v 1.23 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -102,14 +102,15 @@ FileForRedirect( } file = TclpMakeFile(chan, writing ? TCL_WRITABLE : TCL_READABLE); if (file == NULL) { - Tcl_Obj* msg; + Tcl_Obj *msg; + Tcl_GetChannelError(chan, &msg); if (msg) { - Tcl_SetObjResult (interp, msg); + Tcl_SetObjResult(interp, msg); } else { - Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(chan), - "\" wasn't opened for ", - ((writing) ? "writing" : "reading"), NULL); + Tcl_AppendResult(interp, "channel \"", + Tcl_GetChannelName(chan), "\" wasn't opened for ", + ((writing) ? "writing" : "reading"), NULL); } return NULL; } @@ -475,19 +476,19 @@ TclCreatePipeline( * first process in pipeline (specified via < * or <@). */ int inputClose = 0; /* If non-zero, then inputFile should be - * closed when cleaning up. */ + * closed when cleaning up. */ int inputRelease = 0; TclFile outputFile = NULL; /* Writable file for output from last command * in pipeline (could be file or pipe). NULL * means use stdout. */ int outputClose = 0; /* If non-zero, then outputFile should be - * closed when cleaning up. */ + * closed when cleaning up. */ int outputRelease = 0; TclFile errorFile = NULL; /* Writable file for error output from all * commands in pipeline. NULL means use * stderr. */ int errorClose = 0; /* If non-zero, then errorFile should be - * closed when cleaning up. */ + * closed when cleaning up. */ int errorRelease = 0; const char *p; const char *nextArg; diff --git a/generic/tclResult.c b/generic/tclResult.c index 9f2ec92..273416d 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.56 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.57 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -74,8 +74,8 @@ Tcl_SaveInterpState( Tcl_Interp *interp, /* Interpreter's state to be saved */ int status) /* status code for current operation */ { - Interp *iPtr = (Interp *)interp; - InterpState *statePtr = (InterpState *)ckalloc(sizeof(InterpState)); + Interp *iPtr = (Interp *) interp; + InterpState *statePtr = (InterpState *) ckalloc(sizeof(InterpState)); statePtr->status = status; statePtr->flags = iPtr->flags & ERR_ALREADY_LOGGED; @@ -121,8 +121,8 @@ Tcl_RestoreInterpState( Tcl_Interp *interp, /* Interpreter's state to be restored. */ Tcl_InterpState state) /* Saved interpreter state. */ { - Interp *iPtr = (Interp *)interp; - InterpState *statePtr = (InterpState *)state; + Interp *iPtr = (Interp *) interp; + InterpState *statePtr = (InterpState *) state; int status = statePtr->status; iPtr->flags &= ~ERR_ALREADY_LOGGED; @@ -177,7 +177,7 @@ void Tcl_DiscardInterpState( Tcl_InterpState state) /* saved interpreter state */ { - InterpState *statePtr = (InterpState *)state; + InterpState *statePtr = (InterpState *) state; if (statePtr->errorInfo) { Tcl_DecrRefCount(statePtr->errorInfo); @@ -410,8 +410,9 @@ Tcl_SetResult( iPtr->freeProc = 0; } else if (freeProc == TCL_VOLATILE) { int length = strlen(result); + if (length > TCL_RESULT_SIZE) { - iPtr->result = (char *) ckalloc((unsigned) length+1); + iPtr->result = ckalloc((unsigned) length+1); iPtr->freeProc = TCL_DYNAMIC; } else { iPtr->result = iPtr->resultSpace; @@ -470,7 +471,8 @@ Tcl_GetStringResult( * result, then reset the object result. */ - Interp* iPtr = (Interp*) interp; + Interp *iPtr = (Interp *) interp; + if (*(iPtr->result) == 0) { Tcl_SetResult(interp, TclGetString(Tcl_GetObjResult(interp)), TCL_VOLATILE); @@ -813,7 +815,7 @@ SetupAppendBuffer( } else { totalSpace *= 2; } - new = (char *) ckalloc((unsigned) totalSpace); + new = ckalloc((unsigned) totalSpace); strcpy(new, iPtr->result); if (iPtr->appendResult != NULL) { ckfree(iPtr->appendResult); @@ -1005,6 +1007,7 @@ Tcl_SetErrorCodeVA( while (1) { char *elem = va_arg(argList, char *); + if (elem == NULL) { break; } @@ -1134,8 +1137,8 @@ Tcl_SetErrorLine( * A Tcl_Obj * array. * * Side effects: - * First time called in a thread, creates the keys (allocating memory) - * and arranges for their cleanup at thread exit. + * First time called in a thread, creates the keys (allocating memory) + * and arranges for their cleanup at thread exit. * *---------------------------------------------------------------------- */ @@ -1169,7 +1172,7 @@ GetKeys(void) * ... and arrange for their clenaup. */ - Tcl_CreateThreadExitHandler(ReleaseKeys, (ClientData) keys); + Tcl_CreateThreadExitHandler(ReleaseKeys, keys); } return keys; } @@ -1186,7 +1189,7 @@ GetKeys(void) * None. * * Side effects: - * Frees memory. + * Frees memory. * *---------------------------------------------------------------------- */ @@ -1195,7 +1198,7 @@ static void ReleaseKeys( ClientData clientData) { - Tcl_Obj **keys = (Tcl_Obj **)clientData; + Tcl_Obj **keys = clientData; int i; for (i = KEY_CODE; i < KEY_LAST; i++) { @@ -1219,7 +1222,7 @@ ReleaseKeys( * Returns the return code the [return] command should return. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -1299,7 +1302,7 @@ TclProcessReturn( * the pointers provided. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -1347,6 +1350,8 @@ TclMergeReturnOptions( Tcl_AppendResult(interp, "bad ", compare, " value: expected dictionary but got \"", TclGetString(objv[1]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_OPTIONS", + NULL); goto error; } @@ -1389,6 +1394,7 @@ TclMergeReturnOptions( TclGetString(valuePtr), "\": must be ok, error, return, break, " "continue, or an integer", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); goto error; } } @@ -1412,6 +1418,7 @@ TclMergeReturnOptions( Tcl_AppendResult(interp, "bad -level value: " "expected non-negative integer but got \"", TclGetString(valuePtr), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_LEVEL", NULL); goto error; } Tcl_DictObjRemove(NULL, returnOpts, keys[KEY_LEVEL]); @@ -1540,6 +1547,7 @@ Tcl_SetReturnOptions( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "expected dict but got \"", TclGetString(options), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_OPTIONS", NULL); code = TCL_ERROR; } else if (TCL_ERROR == TclMergeReturnOptions(interp, objc, objv, &mergedOpts, &code, &level)) { diff --git a/generic/tclScan.c b/generic/tclScan.c index f5ec509..a9be080 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.33 2009/09/07 07:28:38 das Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.34 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -45,7 +45,7 @@ typedef struct CharSet { * Declarations for functions used only in this file. */ -static const char * BuildCharSet(CharSet *cset, const char *format); +static const char * BuildCharSet(CharSet *cset, const char *format); static int CharInSet(CharSet *cset, int ch); static void ReleaseCharSet(CharSet *cset); static int ValidateFormat(Tcl_Interp *interp, const char *format, @@ -262,7 +262,7 @@ ValidateFormat( char *end; Tcl_UniChar ch; int objIndex, xpgSize, nspace = numVars; - int *nassign = (int *) TclStackAlloc(interp, nspace * sizeof(int)); + int *nassign = TclStackAlloc(interp, nspace * sizeof(int)); char buf[TCL_UTF_MAX+1]; /* @@ -472,7 +472,7 @@ ValidateFormat( } else { nspace += 16; /* formerly STATIC_LIST_SIZE */ } - nassign = (int *) TclStackRealloc(interp, nassign, + nassign = TclStackRealloc(interp, nassign, nspace * sizeof(int)); for (i = value; i < nspace; i++) { nassign[i] = 0; @@ -554,7 +554,7 @@ ValidateFormat( /* ARGSUSED */ int Tcl_ScanObjCmd( - ClientData dummy, /* Not used. */ + ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index b7eef85..8de65db 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathInterface.c,v 1.13 2010/02/15 22:56:20 nijtmans Exp $ + * RCS: @(#) $Id: tclTomMathInterface.c,v 1.14 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -40,8 +40,8 @@ MODULE_SCOPE const TclTomMathStubs tclTomMathStubs; int TclTommath_Init( - Tcl_Interp* interp /* Tcl interpreter */ -) { + Tcl_Interp *interp) /* Tcl interpreter */ +{ /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvideEx(interp, "tcl::tommath", TCL_PATCH_LEVEL, @@ -191,7 +191,7 @@ TclBNInitBignumFromLong( { int status; unsigned long v; - mp_digit* p; + mp_digit *p; /* * Allocate enough memory to hold the largest possible long diff --git a/generic/tclTrace.c b/generic/tclTrace.c index ca1f736..6f1379f 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.57 2009/10/21 13:36:23 dkf Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.58 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -843,6 +843,7 @@ TraceVariableObjCmd( int commandLength, index; const char *name, *command; size_t length; + ClientData clientData; enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE }; static const char *const opStrings[] = { "array", "read", "unset", "write", NULL @@ -903,6 +904,7 @@ TraceVariableObjCmd( CombinedTraceVarInfo *ctvarPtr = (CombinedTraceVarInfo *) ckalloc((unsigned) (sizeof(CombinedTraceVarInfo) + length + 1 - sizeof(ctvarPtr->traceCmdInfo.command))); + ctvarPtr->traceCmdInfo.flags = flags; if (objv[0] == NULL) { ctvarPtr->traceCmdInfo.flags |= TCL_TRACE_OLD_STYLE; @@ -926,8 +928,6 @@ TraceVariableObjCmd( * first one that matches. */ - ClientData clientData; - name = Tcl_GetString(objv[3]); FOREACH_VAR_TRACE(interp, name, clientData) { TraceVarInfo *tvarPtr = clientData; @@ -946,7 +946,6 @@ TraceVariableObjCmd( break; } case TRACE_INFO: { - ClientData clientData; Tcl_Obj *resultListPtr; if (objc != 4) { diff --git a/generic/tclUtil.c b/generic/tclUtil.c index d289851..6b054d8 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.112 2010/02/22 23:31:41 nijtmans Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.113 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" @@ -44,11 +44,11 @@ static ProcessGlobalValue executableName = { * BRACES_UNMATCHED - 1 means that braces aren't properly matched in * the argument. * TCL_DONT_QUOTE_HASH - 1 means the caller insists that a leading hash - * character ('#') should *not* be quoted. This - * is appropriate when the caller can guarantee - * the element is not the first element of a - * list, so [eval] cannot mis-parse the element - * as a comment. + * character ('#') should *not* be quoted. This + * is appropriate when the caller can guarantee + * the element is not the first element of a + * list, so [eval] cannot mis-parse the element + * as a comment. */ #define USE_BRACES 2 @@ -69,9 +69,9 @@ static void ClearHash(Tcl_HashTable *tablePtr); static void FreeProcessGlobalValue(ClientData clientData); static void FreeThreadHash(ClientData clientData); static Tcl_HashTable * GetThreadHash(Tcl_ThreadDataKey *keyPtr); -static int SetEndOffsetFromAny(Tcl_Interp* interp, - Tcl_Obj* objPtr); -static void UpdateStringOfEndOffset(Tcl_Obj* objPtr); +static int SetEndOffsetFromAny(Tcl_Interp *interp, + Tcl_Obj *objPtr); +static void UpdateStringOfEndOffset(Tcl_Obj *objPtr); /* * The following is the Tcl object type definition for an object that @@ -676,7 +676,7 @@ Tcl_ScanCountedElement( * "{abc": the leading brace will have to be backslashed. For each * element, one of three things must be done: * - * (a) Use the element as-is (it doesn't contain any special + * (a) Use the element as-is (it doesn't contain any special * characters). This is the most desirable option. * * (b) Enclose the element in braces, but leave the contents alone. @@ -2069,7 +2069,7 @@ Tcl_DStringResult( Tcl_DString *dsPtr) /* Dynamic string that is to become the * result of interp. */ { - Interp* iPtr = (Interp*) interp; + Interp *iPtr = (Interp *) interp; Tcl_ResetResult(interp); if (dsPtr->string != dsPtr->staticSpace) { @@ -2390,7 +2390,7 @@ TclPrecTraceProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - Tcl_Obj* value; + Tcl_Obj *value; int prec; int *precisionPtr = Tcl_GetThreadData(&precisionKey, (int) sizeof(int)); @@ -2427,13 +2427,13 @@ TclPrecTraceProc( */ if (Tcl_IsSafe(interp)) { - return (char *)"can't modify precision from a safe interpreter"; + return (char *) "can't modify precision from a safe interpreter"; } value = Tcl_GetVar2Ex(interp, name1, name2, flags & TCL_GLOBAL_ONLY); if (value == NULL - || Tcl_GetIntFromObj((Tcl_Interp*) NULL, value, &prec) != TCL_OK + || Tcl_GetIntFromObj(NULL, value, &prec) != TCL_OK || prec < 0 || prec > TCL_MAX_PREC) { - return (char *)"improper value for precision"; + return (char *) "improper value for precision"; } *precisionPtr = prec; return NULL; @@ -2667,7 +2667,7 @@ TclGetIntForIndex( static void UpdateStringOfEndOffset( - register Tcl_Obj* objPtr) + register Tcl_Obj *objPtr) { char buffer[TCL_INTEGER_SPACE + sizeof("end") + 1]; register int len; @@ -2707,7 +2707,7 @@ SetEndOffsetFromAny( Tcl_Obj *objPtr) /* Pointer to the object to parse */ { int offset; /* Offset in the "end-offset" expression */ - register const char* bytes; /* String rep of the object */ + register const char *bytes; /* String rep of the object */ int length; /* Length of the object's string rep */ /* @@ -3123,7 +3123,7 @@ TclGetProcessGlobalValue( * (normally as computed by TclpFindExecutable). * * Results: - * None. + * None. * * Side effects: * Stores the executable name. @@ -3154,7 +3154,7 @@ TclSetObjNameOfExecutable( * pathname of the application is unknown. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -3173,15 +3173,15 @@ TclGetObjNameOfExecutable(void) * This function retrieves the absolute pathname of the application in * which the Tcl library is running, and returns it in string form. * - * The returned string belongs to Tcl and should be copied if the caller - * plans to keep it, to guard against it becoming invalid. + * The returned string belongs to Tcl and should be copied if the caller + * plans to keep it, to guard against it becoming invalid. * * Results: * A pointer to the internal string or NULL if the internal full path * name has not been computed or unknown. * * Side effects: - * None. + * None. * *---------------------------------------------------------------------- */ diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 14212ef..21d9a82 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,19 +13,21 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.34 2010/02/22 23:54:24 andreas_kupries Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.35 2010/02/24 10:45:04 dkf Exp $ */ #include "tclInt.h" #ifdef HAVE_ZLIB #ifdef _WIN32 # ifndef STATIC_BUILD -/* HACK needed for zlib1.dll version 1.2.3 on Win32. See comment below. - * As soon as zlib 1.2.4 is reasonable mainstream, remove this hack! */ -# include "../compat/zlib/zutil.h" -# include "../compat/zlib/inftrees.h" -# include "../compat/zlib/deflate.h" -# include "../compat/zlib/inflate.h" +/* + * HACK needed for zlib1.dll version 1.2.3 on Win32. See comment below. As + * soon as zlib 1.2.4 is reasonable mainstream, remove this hack! + */ +# include "../compat/zlib/zutil.h" +# include "../compat/zlib/inftrees.h" +# include "../compat/zlib/deflate.h" +# include "../compat/zlib/inflate.h" # endif /* !STATIC_BUILD */ #endif /* _WIN32 */ #include @@ -2664,7 +2666,8 @@ ZlibTransformWatch( watchProc = Tcl_ChannelWatchProc(Tcl_GetChannelType(cd->parent)); watchProc(Tcl_GetChannelInstanceData(cd->parent), mask); - if (!(mask & TCL_READABLE) || (cd->inStream.avail_in==(uInt)cd->inAllocated)) { + if (!(mask & TCL_READABLE) + || (cd->inStream.avail_in == (uInt) cd->inAllocated)) { ZlibTransformTimerKill(cd); } else { ZlibTransformTimerSetup(cd); -- cgit v0.12 From 3201edaaf6efa495d6e2c747817da9ba884a8be5 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Feb 2010 10:49:04 +0000 Subject: Reduce ifdef-fery and size of activation record. More variables shared across instructions than before. --- ChangeLog | 4 + generic/tclExecute.c | 1052 +++++++++++++++++++++----------------------------- 2 files changed, 453 insertions(+), 603 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32ed37c..c937d2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-02-24 Donal K. Fellows + * generic/tclExecute.c (TclExecuteByteCode): Reduce ifdef-fery and + size of activation record. More variables shared across instructions + than before. + * doc/socket.n: [Bug 2957688]: Clarified that [socket -server] works with a command prefix. Extended example to show this in action. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index b09fce3..d4bcae0 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.473 2010/02/22 10:27:12 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.474 2010/02/24 10:49:04 dkf Exp $ */ #include "tclInt.h" @@ -520,6 +520,17 @@ VarHashCreateVar( #define Overflowing(a,b,sum) ((((a)^(sum)) < 0) && (((a)^(b)) >= 0)) /* + * Macro for checking whether the type is NaN, used when we're thinking about + * throwing an error for supplying a non-number number. + */ + +#ifndef ACCEPT_NAN +#define IsErroringNaNType(type) ((type) == TCL_NUMBER_NAN) +#else +#define IsErroringNaNType(type) 0 +#endif + +/* * Custom object type only used in this file; values of its type should never * be seen by user scripts. */ @@ -1955,9 +1966,12 @@ TclExecuteByteCode( /* * Locals - variables that are used within opcodes or bounded sections of * the file (jumps between opcodes within a family). - * NOTE: These are now defined locally where needed. + * NOTE: These are now mostly defined locally where needed. */ + Tcl_Obj *objPtr, *valuePtr, *value2Ptr, *part1Ptr, *part2Ptr; + int opnd, length; + Var *varPtr, *arrayPtr; #ifdef TCL_COMPILE_DEBUG int traceInstructions = (tclTraceExec == 3); char cmdNameBuf[21]; @@ -2092,56 +2106,52 @@ TclExecuteByteCode( * cleanup. */ - { - Tcl_Obj *valuePtr; - - cleanupV_pushObjResultPtr: - switch (cleanup) { - case 0: - *(++tosPtr) = (objResultPtr); - goto cleanup0; - default: - cleanup -= 2; - while (cleanup--) { - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); - } - case 2: - cleanup2_pushObjResultPtr: - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); - case 1: - cleanup1_pushObjResultPtr: - valuePtr = OBJ_AT_TOS; - TclDecrRefCount(valuePtr); - } - OBJ_AT_TOS = objResultPtr; + cleanupV_pushObjResultPtr: + switch (cleanup) { + case 0: + *(++tosPtr) = (objResultPtr); goto cleanup0; + default: + cleanup -= 2; + while (cleanup--) { + objPtr = POP_OBJECT(); + TclDecrRefCount(objPtr); + } + case 2: + cleanup2_pushObjResultPtr: + objPtr = POP_OBJECT(); + TclDecrRefCount(objPtr); + case 1: + cleanup1_pushObjResultPtr: + objPtr = OBJ_AT_TOS; + TclDecrRefCount(objPtr); + } + OBJ_AT_TOS = objResultPtr; + goto cleanup0; - cleanupV: - switch (cleanup) { - default: - cleanup -= 2; - while (cleanup--) { - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); - } - case 2: - cleanup2: - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); - case 1: - cleanup1: - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); - case 0: - /* - * We really want to do nothing now, but this is needed for some - * compilers (SunPro CC). - */ - - break; + cleanupV: + switch (cleanup) { + default: + cleanup -= 2; + while (cleanup--) { + objPtr = POP_OBJECT(); + TclDecrRefCount(objPtr); } + case 2: + cleanup2: + objPtr = POP_OBJECT(); + TclDecrRefCount(objPtr); + case 1: + cleanup1: + objPtr = POP_OBJECT(); + TclDecrRefCount(objPtr); + case 0: + /* + * We really want to do nothing now, but this is needed for some + * compilers (SunPro CC). + */ + + break; } cleanup0: @@ -2305,12 +2315,10 @@ TclExecuteByteCode( TRACE_WITH_OBJ(("%u => ", TclGetUInt4AtPtr(pc+1)), objResultPtr); NEXT_INST_F(5, 0, 1); - case INST_POP: { - Tcl_Obj *valuePtr; - + case INST_POP: TRACE_WITH_OBJ(("=> discarding "), OBJ_AT_TOS); - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); + objPtr = POP_OBJECT(); + TclDecrRefCount(objPtr); /* * Runtime peephole optimisation: an INST_POP is scheduled at the end @@ -2326,7 +2334,6 @@ TclExecuteByteCode( } #endif NEXT_INST_F(0, 0, 0); - } case INST_START_CMD: #if !TCL_COMPILE_DEBUG @@ -2350,7 +2357,8 @@ TclExecuteByteCode( goto instStartCmdOK; } else { const char *bytes; - int length = 0, opnd; + + length = 0; /* * We used to switch to direct eval; for NRE-awareness we now @@ -2380,18 +2388,16 @@ TclExecuteByteCode( TRACE_WITH_OBJ(("=> "), objResultPtr); NEXT_INST_F(1, 0, 1); - case INST_OVER: { - int opnd = TclGetUInt4AtPtr(pc+1); - + case INST_OVER: + opnd = TclGetUInt4AtPtr(pc+1); objResultPtr = OBJ_AT_DEPTH(opnd); TRACE_WITH_OBJ(("=> "), objResultPtr); NEXT_INST_F(5, 0, 1); - } case INST_REVERSE: { Tcl_Obj **a, **b; - int opnd = TclGetUInt4AtPtr(pc+1); + opnd = TclGetUInt4AtPtr(pc+1); a = tosPtr-(opnd-1); b = tosPtr; while (atypePtr = NULL; - objResultPtr->bytes = ckrealloc(bytes, (length + appendLen+1)); + objResultPtr->bytes = ckrealloc(bytes, length+appendLen+1); objResultPtr->length = length + appendLen; p = TclGetString(objResultPtr) + length; currPtr = &OBJ_AT_DEPTH(opnd - 2); @@ -2554,7 +2560,7 @@ TclExecuteByteCode( NEXT_INST_V(2, opnd, 1); } - case INST_EXPAND_START: { + case INST_EXPAND_START: /* * Push an element to the auxObjList. This records the current * stack depth - i.e., the point in the stack where the expanded @@ -2568,17 +2574,14 @@ TclExecuteByteCode( * error, also in INST_EXPAND_STKTOP). */ - Tcl_Obj *objPtr; - TclNewObj(objPtr); objPtr->internalRep.twoPtrValue.ptr1 = (void *) CURR_DEPTH; PUSH_TAUX_OBJ(objPtr); NEXT_INST_F(1, 0, 0); - } case INST_EXPAND_STKTOP: { - int objc, length, i; - Tcl_Obj **objv, *valuePtr; + int objc, i; + Tcl_Obj **objv; ptrdiff_t moved; /* @@ -2587,9 +2590,9 @@ TclExecuteByteCode( * will be removed at checkForCatch. */ - valuePtr = OBJ_AT_TOS; - if (TclListObjGetElements(interp, valuePtr, &objc, &objv) != TCL_OK){ - TRACE_WITH_OBJ(("%.30s => ERROR: ", O2S(valuePtr)), + objPtr = OBJ_AT_TOS; + if (TclListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK){ + TRACE_WITH_OBJ(("%.30s => ERROR: ", O2S(objPtr)), Tcl_GetObjResult(interp)); TRESULT = TCL_ERROR; goto checkForCatch; @@ -2631,7 +2634,7 @@ TclExecuteByteCode( PUSH_OBJECT(objv[i]); } - Tcl_DecrRefCount(valuePtr); + Tcl_DecrRefCount(objPtr); NEXT_INST_F(5, 0, 0); } @@ -2671,9 +2674,9 @@ TclExecuteByteCode( * non-recursive TEBC call (compiled scripts). */ - Tcl_Obj *objPtr = OBJ_AT_TOS; ByteCode *newCodePtr; + objPtr = OBJ_AT_TOS; cleanup = 1; pcAdjustment = 1; @@ -2938,7 +2941,6 @@ TclExecuteByteCode( } if (TRESULT == TCL_OK) { - Tcl_Obj *objPtr; #ifndef TCL_COMPILE_DEBUG if (*pc == INST_POP) { NEXT_INST_V(1, cleanup, 0); @@ -2983,8 +2985,8 @@ TclExecuteByteCode( * function into the stack. */ - int opnd, numArgs; - Tcl_Obj *objPtr, *tmpPtr1, *tmpPtr2; + int numArgs; + Tcl_Obj *tmpPtr1, *tmpPtr2; opnd = TclGetUInt1AtPtr(pc+1); if ((opnd < 0) || (opnd > LAST_BUILTIN_FUNC)) { @@ -3030,7 +3032,7 @@ TclExecuteByteCode( * ::tcl::mathfunc::$objv[0]. */ - Tcl_Obj *tmpPtr, *objPtr; + Tcl_Obj *tmpPtr; /* * Number of arguments. The function name is the 0-th argument. @@ -3076,9 +3078,7 @@ TclExecuteByteCode( * common execution code. */ { - int opnd, pcAdjustment; - Tcl_Obj *objPtr, *part1Ptr, *part2Ptr; - Var *varPtr, *arrayPtr; + int pcAdjustment; case INST_LOAD_SCALAR1: instLoadScalar1: @@ -3234,9 +3234,7 @@ TclExecuteByteCode( */ { - int opnd, pcAdjustment, storeFlags; - Tcl_Obj *part1Ptr, *part2Ptr, *objPtr, *valuePtr; - Var *varPtr, *arrayPtr; + int pcAdjustment, storeFlags; case INST_STORE_ARRAY4: opnd = TclGetUInt4AtPtr(pc+1); @@ -3496,13 +3494,12 @@ TclExecuteByteCode( /*TODO: Consider more untangling here; merge with LOAD and STORE ? */ { - Tcl_Obj *objPtr, *incrPtr, *part1Ptr, *part2Ptr; - int opnd, pcAdjustment; + Tcl_Obj *incrPtr; + int pcAdjustment; #ifndef NO_WIDE_TYPE Tcl_WideInt w; #endif long i; - Var *varPtr, *arrayPtr; case INST_INCR_SCALAR1: case INST_INCR_ARRAY1: @@ -3767,11 +3764,6 @@ TclExecuteByteCode( * Start of INST_EXIST instructions. */ - { - Tcl_Obj *part1Ptr, *part2Ptr; - Var *varPtr, *arrayPtr; - int opnd; - case INST_EXIST_SCALAR: opnd = TclGetUInt4AtPtr(pc+1); varPtr = LOCAL(opnd); @@ -3862,7 +3854,6 @@ TclExecuteByteCode( objResultPtr = TCONST(!varPtr || TclIsVarUndefined(varPtr) ? 0 : 1); TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_V(1, cleanup, 1); - } /* * End of INST_EXIST instructions. @@ -3871,9 +3862,7 @@ TclExecuteByteCode( */ { - Tcl_Obj *part1Ptr, *part2Ptr; - Var *varPtr, *arrayPtr; - int opnd, flags, localResult; + int flags, localResult; case INST_UNSET_SCALAR: flags = TclGetUInt1AtPtr(pc+1) ? TCL_LEAVE_ERR_MSG : 0; @@ -3991,8 +3980,7 @@ TclExecuteByteCode( */ { - int opnd; - Var *varPtr, *otherPtr; + Var *otherPtr; case INST_UPVAR: { CallFrame *framePtr, *savedFramePtr; @@ -4120,25 +4108,20 @@ TclExecuteByteCode( * ----------------------------------------------------------------- */ - case INST_JUMP1: { - int opnd = TclGetInt1AtPtr(pc+1); - + case INST_JUMP1: + opnd = TclGetInt1AtPtr(pc+1); TRACE(("%d => new pc %u\n", opnd, (unsigned)(pc + opnd - codePtr->codeStart))); NEXT_INST_F(opnd, 0, 0); - } - - case INST_JUMP4: { - int opnd = TclGetInt4AtPtr(pc+1); + case INST_JUMP4: + opnd = TclGetInt4AtPtr(pc+1); TRACE(("%d => new pc %u\n", opnd, (unsigned)(pc + opnd - codePtr->codeStart))); NEXT_INST_F(opnd, 0, 0); - } { int jmpOffset[2], b; - Tcl_Obj *valuePtr; /* TODO: consider rewrite so we don't compute the offset we're not * going to take. */ @@ -4199,7 +4182,6 @@ TclExecuteByteCode( case INST_JUMP_TABLE: { Tcl_HashEntry *hPtr; JumptableInfo *jtPtr; - int opnd; /* * Jump to location looked up in a hashtable; fall through to next @@ -4235,9 +4217,9 @@ TclExecuteByteCode( */ int i1, i2, iResult; - Tcl_Obj *value2Ptr = OBJ_AT_TOS; - Tcl_Obj *valuePtr = OBJ_UNDER_TOS; + value2Ptr = OBJ_AT_TOS; + valuePtr = OBJ_UNDER_TOS; TRESULT = TclGetBooleanFromObj(NULL, valuePtr, &i1); if (TRESULT != TCL_OK) { TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), @@ -4269,46 +4251,37 @@ TclExecuteByteCode( * Start of INST_LIST and related instructions. */ - case INST_LIST: { + case INST_LIST: /* * Pop the opnd (objc) top stack elements into a new list obj and then * decrement their ref counts. */ - int opnd; - opnd = TclGetUInt4AtPtr(pc+1); objResultPtr = Tcl_NewListObj(opnd, &OBJ_AT_DEPTH(opnd-1)); TRACE_WITH_OBJ(("%u => ", opnd), objResultPtr); NEXT_INST_V(5, opnd, 1); - } - - case INST_LIST_LENGTH: { - Tcl_Obj *valuePtr; - int length; + case INST_LIST_LENGTH: valuePtr = OBJ_AT_TOS; TRESULT = TclListObjLength(interp, valuePtr, &length); - if (TRESULT == TCL_OK) { - TclNewIntObj(objResultPtr, length); - TRACE(("%.20s => %d\n", O2S(valuePtr), length)); - NEXT_INST_F(1, 1, 1); - } else { + if (TRESULT != TCL_OK) { TRACE_WITH_OBJ(("%.30s => ERROR: ", O2S(valuePtr)), Tcl_GetObjResult(interp)); goto checkForCatch; } - } + TclNewIntObj(objResultPtr, length); + TRACE(("%.20s => %d\n", O2S(valuePtr), length)); + NEXT_INST_F(1, 1, 1); case INST_LIST_INDEX: { /*** lindex with objc == 3 ***/ /* Variables also for INST_LIST_INDEX_IMM */ - int listc, idx, opnd, pcAdjustment; + int listc, idx, pcAdjustment; Tcl_Obj **listv; - Tcl_Obj *valuePtr, *value2Ptr; /* * Pop the two operands. @@ -4366,44 +4339,45 @@ TclExecuteByteCode( TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); - if (TRESULT == TCL_OK) { - /* - * Select the list item based on the index. Negative operand means - * end-based indexing. - */ + if (TRESULT != TCL_OK) { + TRACE_WITH_OBJ(("\"%.30s\" %d => ERROR: ", O2S(valuePtr), opnd), + Tcl_GetObjResult(interp)); + goto checkForCatch; + } - if (opnd < -1) { - idx = opnd+1 + listc; - } else { - idx = opnd; - } + /* + * Select the list item based on the index. Negative operand means + * end-based indexing. + */ - lindexFastPath: - if (idx >= 0 && idx < listc) { - objResultPtr = listv[idx]; - } else { - TclNewObj(objResultPtr); - } + if (opnd < -1) { + idx = opnd+1 + listc; + } else { + idx = opnd; + } - TRACE_WITH_OBJ(("\"%.30s\" %d => ", O2S(valuePtr), opnd), - objResultPtr); - NEXT_INST_F(pcAdjustment, 1, 1); + lindexFastPath: + if (idx >= 0 && idx < listc) { + objResultPtr = listv[idx]; } else { - TRACE_WITH_OBJ(("\"%.30s\" %d => ERROR: ", O2S(valuePtr), opnd), - Tcl_GetObjResult(interp)); - goto checkForCatch; + TclNewObj(objResultPtr); } + + TRACE_WITH_OBJ(("\"%.30s\" %d => ", O2S(valuePtr), opnd), + objResultPtr); + NEXT_INST_F(pcAdjustment, 1, 1); } - case INST_LIST_INDEX_MULTI: { + { + int numIdx; + + case INST_LIST_INDEX_MULTI: /* * 'lindex' with multiple index args: * * Determine the count of index args. */ - int numIdx, opnd; - opnd = TclGetUInt4AtPtr(pc+1); numIdx = opnd-1; @@ -4430,16 +4404,12 @@ TclExecuteByteCode( TRESULT = TCL_ERROR; goto checkForCatch; } - } - case INST_LSET_FLAT: { + case INST_LSET_FLAT: /* * Lset with 3, 5, or more args. Get the number of index args. */ - int numIdx,opnd; - Tcl_Obj *valuePtr, *value2Ptr; - opnd = TclGetUInt4AtPtr(pc + 1); numIdx = opnd - 2; @@ -4484,14 +4454,10 @@ TclExecuteByteCode( } } - case INST_LSET_LIST: { + case INST_LSET_LIST: /* * 'lset' with 4 args. - */ - - Tcl_Obj *objPtr, *valuePtr, *value2Ptr; - - /* + * * Get the old value of variable, and remove the stack ref. This is * safe because the variable still references the object; the ref * count will never go zero here - we can use the smaller macro @@ -4518,26 +4484,25 @@ TclExecuteByteCode( * Check for errors. */ - if (objResultPtr) { - /* - * Set result. - */ - - TRACE(("=> %s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, -1); - } else { + if (!objResultPtr) { TRACE_WITH_OBJ(("\"%.30s\" => ERROR: ", O2S(value2Ptr)), Tcl_GetObjResult(interp)); TRESULT = TCL_ERROR; goto checkForCatch; } - } + + /* + * Set result. + */ + + TRACE(("=> %s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, -1); case INST_LIST_RANGE_IMM: { /*** lrange with objc==4 and both indices in bytecode stream ***/ int listc, fromIdx, toIdx; - Tcl_Obj **listv, *valuePtr; + Tcl_Obj **listv; /* * Pop the list and get the indices. @@ -4551,6 +4516,7 @@ TclExecuteByteCode( * Get the contents of the list, making sure that it really is a list * in the process. */ + TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); /* @@ -4620,9 +4586,7 @@ TclExecuteByteCode( */ int found, s1len, s2len, llen, i; - Tcl_Obj *valuePtr, *value2Ptr, *o; - const char *s1; - const char *s2; + const char *s1, *s2; value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -4643,6 +4607,8 @@ TclExecuteByteCode( i = 0; do { + Tcl_Obj *o; + Tcl_ListObjIndex(NULL, value2Ptr, i, &o); if (o != NULL) { s2 = TclGetStringFromObj(o, &s2len); @@ -4699,7 +4665,6 @@ TclExecuteByteCode( */ int iResult; - Tcl_Obj *valuePtr, *value2Ptr; value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -4764,7 +4729,6 @@ TclExecuteByteCode( const char *s1, *s2; int s1len, s2len, iResult; - Tcl_Obj *valuePtr, *value2Ptr; stringCompare: value2Ptr = OBJ_AT_TOS; @@ -4866,25 +4830,20 @@ TclExecuteByteCode( NEXT_INST_F(1, 2, 1); } - case INST_STR_LEN: { - int length; - Tcl_Obj *valuePtr; - + case INST_STR_LEN: valuePtr = OBJ_AT_TOS; length = Tcl_GetCharLength(valuePtr); TclNewIntObj(objResultPtr, length); TRACE(("%.20s => %d\n", O2S(valuePtr), length)); NEXT_INST_F(1, 1, 1); - } case INST_STR_INDEX: { /* * String compare. */ - int index, length; - Tcl_Obj *valuePtr, *value2Ptr; + int index; value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -4931,8 +4890,7 @@ TclExecuteByteCode( } case INST_STR_MATCH: { - int nocase, match; - Tcl_Obj *valuePtr, *value2Ptr; + int nocase, match, length2; nocase = TclGetInt1AtPtr(pc+1); valuePtr = OBJ_AT_TOS; /* String */ @@ -4946,19 +4904,17 @@ TclExecuteByteCode( if ((valuePtr->typePtr == &tclStringType) || (value2Ptr->typePtr == &tclStringType)) { Tcl_UniChar *ustring1, *ustring2; - int length1, length2; - ustring1 = Tcl_GetUnicodeFromObj(valuePtr, &length1); + ustring1 = Tcl_GetUnicodeFromObj(valuePtr, &length); ustring2 = Tcl_GetUnicodeFromObj(value2Ptr, &length2); - match = TclUniCharMatch(ustring1, length1, ustring2, length2, + match = TclUniCharMatch(ustring1, length, ustring2, length2, nocase); } else if (TclIsPureByteArray(valuePtr) && !nocase) { unsigned char *string1, *string2; - int length1, length2; - string1 = Tcl_GetByteArrayFromObj(valuePtr, &length1); + string1 = Tcl_GetByteArrayFromObj(valuePtr, &length); string2 = Tcl_GetByteArrayFromObj(value2Ptr, &length2); - match = TclByteArrayMatch(string1, length1, string2, length2, 0); + match = TclByteArrayMatch(string1, length, string2, length2, 0); } else { match = Tcl_StringCaseMatch(TclGetString(valuePtr), TclGetString(value2Ptr), nocase); @@ -4994,7 +4950,6 @@ TclExecuteByteCode( case INST_REGEXP: { int cflags, match; - Tcl_Obj *valuePtr, *value2Ptr; Tcl_RegExp regExpr; cflags = TclGetInt1AtPtr(pc+1); /* RE compile flages like NOCASE */ @@ -5049,22 +5004,25 @@ TclExecuteByteCode( * Start of numeric operator instructions. */ + { + ClientData ptr1, ptr2; + int type1, type2; + double d1, d2, dResult; + long l1, l2, lResult; + mp_int big1, big2, bigResult, bigRemainder; + Tcl_WideInt w1, w2, wResult; + case INST_EQ: case INST_NEQ: case INST_LT: case INST_GT: case INST_LE: case INST_GE: { - Tcl_Obj *valuePtr = OBJ_UNDER_TOS; - Tcl_Obj *value2Ptr = OBJ_AT_TOS; - ClientData ptr1, ptr2; - int iResult = 0, compare = 0, type1, type2; - double d1, d2, tmp; - long l1, l2; - mp_int big1, big2; -#ifndef NO_WIDE_TYPE - Tcl_WideInt w1, w2; -#endif + int iResult = 0, compare = 0; + double tmp; + + value2Ptr = OBJ_AT_TOS; + valuePtr = OBJ_UNDER_TOS; if (GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) { /* @@ -5369,11 +5327,11 @@ TclExecuteByteCode( case INST_MOD: case INST_LSHIFT: case INST_RSHIFT: { - Tcl_Obj *value2Ptr = OBJ_AT_TOS; - Tcl_Obj *valuePtr = OBJ_UNDER_TOS; - ClientData ptr1, ptr2; - int invalid, shift, type1, type2; - long l1 = 0; + int invalid, shift; + + l1 = 0; + value2Ptr = OBJ_AT_TOS; + valuePtr = OBJ_UNDER_TOS; TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_DOUBLE) @@ -5400,8 +5358,7 @@ TclExecuteByteCode( if (*pc == INST_MOD) { /* TODO: Attempts to re-use unshared operands on stack */ - long l2 = 0; /* silence gcc warning */ - + l2 = 0; /* silence gcc warning */ if (type2 == TCL_NUMBER_LONG) { l2 = *((const long *)ptr2); if (l2 == 0) { @@ -5461,8 +5418,7 @@ TclExecuteByteCode( #ifndef NO_WIDE_TYPE if (type2 == TCL_NUMBER_WIDE) { - Tcl_WideInt w2 = *((const Tcl_WideInt *)ptr2); - + w2 = *((const Tcl_WideInt *)ptr2); if ((l1 > 0) ^ (w2 > (Tcl_WideInt)0)) { /* * Arguments are opposite sign; remainder is sum. @@ -5481,42 +5437,35 @@ TclExecuteByteCode( NEXT_INST_F(1, 1, 0); } #endif - { - mp_int big2; - - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - - /* TODO: internals intrusion */ - if ((l1 > 0) ^ (big2.sign == MP_ZPOS)) { - /* - * Arguments are opposite sign; remainder is sum. - */ - - mp_int big1; - - TclBNInitBignumFromLong(&big1, l1); - mp_add(&big2, &big1, &big2); - mp_clear(&big1); - objResultPtr = Tcl_NewBignumObj(&big2); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + /* TODO: internals intrusion */ + if ((l1 > 0) ^ (big2.sign == MP_ZPOS)) { /* - * Arguments are same sign; remainder is first operand. + * Arguments are opposite sign; remainder is sum. */ - mp_clear(&big2); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + TclBNInitBignumFromLong(&big1, l1); + mp_add(&big2, &big1, &big2); + mp_clear(&big1); + objResultPtr = Tcl_NewBignumObj(&big2); + TRACE(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); } + + /* + * Arguments are same sign; remainder is first operand. + */ + + mp_clear(&big2); + TRACE(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); } #ifndef NO_WIDE_TYPE if (type1 == TCL_NUMBER_WIDE) { - Tcl_WideInt w1 = *((const Tcl_WideInt *)ptr1); - + w1 = *((const Tcl_WideInt *)ptr1); if (type2 != TCL_NUMBER_BIG) { - Tcl_WideInt w2, wQuotient, wRemainder; + Tcl_WideInt wQuotient, wRemainder; Tcl_GetWideIntFromObj(NULL, value2Ptr, &w2); wQuotient = w1 / w2; @@ -5538,67 +5487,59 @@ TclExecuteByteCode( TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } - { - mp_int big2; - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - /* TODO: internals intrusion */ - if ((w1 > ((Tcl_WideInt) 0)) ^ (big2.sign == MP_ZPOS)) { - /* - * Arguments are opposite sign; remainder is sum. - */ - - mp_int big1; - - TclBNInitBignumFromWideInt(&big1, w1); - mp_add(&big2, &big1, &big2); - mp_clear(&big1); - objResultPtr = Tcl_NewBignumObj(&big2); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - - /* - * Arguments are same sign; remainder is first operand. - */ + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - mp_clear(&big2); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } - } -#endif - { - mp_int big1, big2, bigResult, bigRemainder; - - Tcl_GetBignumFromObj(NULL, valuePtr, &big1); - Tcl_GetBignumFromObj(NULL, value2Ptr, &big2); - mp_init(&bigResult); - mp_init(&bigRemainder); - mp_div(&big1, &big2, &bigResult, &bigRemainder); - if (!mp_iszero(&bigRemainder) - && (bigRemainder.sign != big2.sign)) { + /* TODO: internals intrusion */ + if ((w1 > ((Tcl_WideInt) 0)) ^ (big2.sign == MP_ZPOS)) { /* - * Convert to Tcl's integer division rules. + * Arguments are opposite sign; remainder is sum. */ - mp_sub_d(&bigResult, 1, &bigResult); - mp_add(&bigRemainder, &big2, &bigRemainder); - } - mp_copy(&bigRemainder, &bigResult); - mp_clear(&bigRemainder); - mp_clear(&big1); - mp_clear(&big2); - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&bigResult); + TclBNInitBignumFromWideInt(&big1, w1); + mp_add(&big2, &big1, &big2); + mp_clear(&big1); + objResultPtr = Tcl_NewBignumObj(&big2); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } - Tcl_SetBignumObj(valuePtr, &bigResult); + + /* + * Arguments are same sign; remainder is first operand. + */ + + mp_clear(&big2); TRACE(("%s\n", O2S(valuePtr))); NEXT_INST_F(1, 1, 0); } +#endif + Tcl_GetBignumFromObj(NULL, valuePtr, &big1); + Tcl_GetBignumFromObj(NULL, value2Ptr, &big2); + mp_init(&bigResult); + mp_init(&bigRemainder); + mp_div(&big1, &big2, &bigResult, &bigRemainder); + if (!mp_iszero(&bigRemainder) + && (bigRemainder.sign != big2.sign)) { + /* + * Convert to Tcl's integer division rules. + */ + + mp_sub_d(&bigResult, 1, &bigResult); + mp_add(&bigRemainder, &big2, &bigRemainder); + } + mp_copy(&bigRemainder, &bigResult); + mp_clear(&bigRemainder); + mp_clear(&big1); + mp_clear(&big2); + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + if (Tcl_IsShared(valuePtr)) { + objResultPtr = Tcl_NewBignumObj(&bigResult); + TRACE(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); + } + Tcl_SetBignumObj(valuePtr, &bigResult); + TRACE(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); } /* @@ -5614,14 +5555,11 @@ TclExecuteByteCode( invalid = (*((const Tcl_WideInt *)ptr2) < (Tcl_WideInt)0); break; #endif - case TCL_NUMBER_BIG: { - mp_int big2; - + case TCL_NUMBER_BIG: Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); invalid = (mp_cmp_d(&big2, 0) == MP_LT); mp_clear(&big2); break; - } default: /* Unused, here to silence compiler warning */ invalid = 0; @@ -5690,13 +5628,11 @@ TclExecuteByteCode( TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); if ((type1 != TCL_NUMBER_BIG) && ((size_t)shift < CHAR_BIT*sizeof(Tcl_WideInt))) { - Tcl_WideInt w; - - TclGetWideIntFromObj(NULL, valuePtr, &w); - if (!((w>0 ? w : ~w) + TclGetWideIntFromObj(NULL, valuePtr, &w1); + if (!((w1>0 ? w1 : ~w1) & -(((Tcl_WideInt)1) << (CHAR_BIT*sizeof(Tcl_WideInt) - 1 - shift)))) { - objResultPtr = Tcl_NewWideIntObj(w< (Tcl_WideInt)0); break; #endif - case TCL_NUMBER_BIG: { - mp_int big1; + case TCL_NUMBER_BIG: Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); zero = (mp_cmp_d(&big1, 0) == MP_GT); mp_clear(&big1); break; - } default: /* Unused, here to silence compiler warning. */ zero = 0; @@ -5774,16 +5708,15 @@ TclExecuteByteCode( */ if (type1 == TCL_NUMBER_WIDE) { - Tcl_WideInt w = *(const Tcl_WideInt *)ptr1; - + w1 = *(const Tcl_WideInt *)ptr1; if ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideInt)) { - if (w >= (Tcl_WideInt)0) { + if (w1 >= (Tcl_WideInt)0) { objResultPtr = TCONST(0); } else { TclNewIntObj(objResultPtr, -1); } } else { - objResultPtr = Tcl_NewWideIntObj(w >> shift); + objResultPtr = Tcl_NewWideIntObj(w1 >> shift); } TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); @@ -5791,46 +5724,40 @@ TclExecuteByteCode( #endif } - { - mp_int big, bigResult, bigRemainder; - - Tcl_TakeBignumFromObj(NULL, valuePtr, &big); + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - mp_init(&bigResult); - if (*pc == INST_LSHIFT) { - mp_mul_2d(&big, shift, &bigResult); - } else { - mp_init(&bigRemainder); - mp_div_2d(&big, shift, &bigResult, &bigRemainder); - if (mp_cmp_d(&bigRemainder, 0) == MP_LT) { - /* - * Convert to Tcl's integer division rules. - */ + mp_init(&bigResult); + if (*pc == INST_LSHIFT) { + mp_mul_2d(&big1, shift, &bigResult); + } else { + mp_init(&bigRemainder); + mp_div_2d(&big1, shift, &bigResult, &bigRemainder); + if (mp_cmp_d(&bigRemainder, 0) == MP_LT) { + /* + * Convert to Tcl's integer division rules. + */ - mp_sub_d(&bigResult, 1, &bigResult); - } - mp_clear(&bigRemainder); + mp_sub_d(&bigResult, 1, &bigResult); } - mp_clear(&big); + mp_clear(&bigRemainder); + } + mp_clear(&big1); - if (!Tcl_IsShared(valuePtr)) { - Tcl_SetBignumObj(valuePtr, &bigResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } - objResultPtr = Tcl_NewBignumObj(&bigResult); + if (!Tcl_IsShared(valuePtr)) { + Tcl_SetBignumObj(valuePtr, &bigResult); + TRACE(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); } + objResultPtr = Tcl_NewBignumObj(&bigResult); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } case INST_BITOR: case INST_BITXOR: - case INST_BITAND: { - ClientData ptr1, ptr2; - int type1, type2; - Tcl_Obj *value2Ptr = OBJ_AT_TOS; - Tcl_Obj *valuePtr = OBJ_UNDER_TOS; + case INST_BITAND: + value2Ptr = OBJ_AT_TOS; + valuePtr = OBJ_UNDER_TOS; TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); if ((TRESULT != TCL_OK) @@ -5855,7 +5782,7 @@ TclExecuteByteCode( } if ((type1 == TCL_NUMBER_BIG) || (type2 == TCL_NUMBER_BIG)) { - mp_int big1, big2, bigResult, *First, *Second; + mp_int *First, *Second; int numPos; Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); @@ -6006,8 +5933,6 @@ TclExecuteByteCode( #ifndef NO_WIDE_TYPE if ((type1 == TCL_NUMBER_WIDE) || (type2 == TCL_NUMBER_WIDE)) { - Tcl_WideInt wResult, w1, w2; - TclGetWideIntFromObj(NULL, valuePtr, &w1); TclGetWideIntFromObj(NULL, value2Ptr, &w2); @@ -6037,53 +5962,44 @@ TclExecuteByteCode( NEXT_INST_F(1, 1, 0); } #endif - { - long lResult, l1 = *((const long *)ptr1); - long l2 = *((const long *)ptr2); + l1 = *((const long *)ptr1); + l2 = *((const long *)ptr2); - switch (*pc) { - case INST_BITAND: - lResult = l1 & l2; - break; - case INST_BITOR: - lResult = l1 | l2; - break; - case INST_BITXOR: - lResult = l1 ^ l2; - break; - default: - /* Unused, here to silence compiler warning. */ - lResult = 0; - } + switch (*pc) { + case INST_BITAND: + lResult = l1 & l2; + break; + case INST_BITOR: + lResult = l1 | l2; + break; + case INST_BITXOR: + lResult = l1 ^ l2; + break; + default: + /* Unused, here to silence compiler warning. */ + lResult = 0; + } - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, lResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - TclSetLongObj(valuePtr, lResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + if (Tcl_IsShared(valuePtr)) { + TclNewLongObj(objResultPtr, lResult); + TRACE(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); } - } + TclSetLongObj(valuePtr, lResult); + TRACE(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); case INST_EXPON: case INST_ADD: case INST_SUB: case INST_DIV: - case INST_MULT: { - ClientData ptr1, ptr2; - int type1, type2; - Tcl_Obj *value2Ptr = OBJ_AT_TOS; - Tcl_Obj *valuePtr = OBJ_UNDER_TOS; + case INST_MULT: + value2Ptr = OBJ_AT_TOS; + valuePtr = OBJ_UNDER_TOS; TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((TRESULT != TCL_OK) -#ifndef ACCEPT_NAN - || (type1 == TCL_NUMBER_NAN) -#endif - ) { + if ((TRESULT != TCL_OK) || IsErroringNaNType(type1)) { TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(value2Ptr), O2S(valuePtr), @@ -6103,11 +6019,7 @@ TclExecuteByteCode( #endif TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - if ((TRESULT != TCL_OK) -#ifndef ACCEPT_NAN - || (type2 == TCL_NUMBER_NAN) -#endif - ) { + if ((TRESULT != TCL_OK) || IsErroringNaNType(type2)) { TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(value2Ptr), O2S(valuePtr), @@ -6133,8 +6045,6 @@ TclExecuteByteCode( * floating point calculations. */ - double d1, d2, dResult; - Tcl_GetDoubleFromObj(NULL, valuePtr, &d1); Tcl_GetDoubleFromObj(NULL, value2Ptr, &d2); @@ -6201,16 +6111,15 @@ TclExecuteByteCode( if ((sizeof(long) >= 2*sizeof(int)) && (*pc == INST_MULT) && (type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) { - long l1 = *((const long *)ptr1); - long l2 = *((const long *)ptr2); + l1 = *((const long *)ptr1); + l2 = *((const long *)ptr2); if ((l1 <= INT_MAX) && (l1 >= INT_MIN) && (l2 <= INT_MAX) && (l2 >= INT_MIN)) { - long lResult = l1 * l2; - + lResult = l1 * l2; TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr,lResult); + TclNewLongObj(objResultPtr, lResult); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } @@ -6222,7 +6131,6 @@ TclExecuteByteCode( if ((sizeof(Tcl_WideInt) >= 2*sizeof(long)) && (*pc == INST_MULT) && (type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) { - Tcl_WideInt w1, w2, wResult; TclGetWideIntFromObj(NULL, valuePtr, &w1); TclGetWideIntFromObj(NULL, value2Ptr, &w2); @@ -6241,12 +6149,10 @@ TclExecuteByteCode( /* TODO: Attempts to re-use unshared operands on stack. */ if (*pc == INST_EXPON) { - long l1 = 0, l2 = 0; int oddExponent = 0, negativeExponent = 0; -#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) - Tcl_WideInt w1; -#endif + unsigned short base; + l1 = l2 = 0; if (type2 == TCL_NUMBER_LONG) { l2 = *((const long *) ptr2); if (l2 == 0) { @@ -6271,17 +6177,13 @@ TclExecuteByteCode( break; } #ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: { - Tcl_WideInt w2 = *((const Tcl_WideInt *)ptr2); - + case TCL_NUMBER_WIDE: + w2 = *((const Tcl_WideInt *)ptr2); negativeExponent = (w2 < 0); oddExponent = (int) (w2 & (Tcl_WideInt)1); break; - } #endif - case TCL_NUMBER_BIG: { - mp_int big2; - + case TCL_NUMBER_BIG: Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); negativeExponent = (mp_cmp_d(&big2, 0) == MP_LT); mp_mod_2d(&big2, 1, &big2); @@ -6289,7 +6191,6 @@ TclExecuteByteCode( mp_clear(&big2); break; } - } if (type1 == TCL_NUMBER_LONG) { l1 = *((const long *)ptr1); @@ -6427,7 +6328,7 @@ TclExecuteByteCode( * Small powers of 32-bit integers. */ - long lResult = l1 * l1; /* b**2 */ + lResult = l1 * l1; /* b**2 */ switch (l2) { case 2: break; @@ -6465,10 +6366,10 @@ TclExecuteByteCode( TRACE(("%s\n", O2S(valuePtr))); NEXT_INST_F(1, 1, 0); } + if (l1 - 3 >= 0 && l1 -2 < (long)Exp32IndexSize && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { - - unsigned short base = Exp32Index[l1 - 3] + base = Exp32Index[l1 - 3] + (unsigned short) (l2 - 2 - MaxBase32Size); if (base < Exp32Index[l1 - 2]) { /* @@ -6489,17 +6390,16 @@ TclExecuteByteCode( } if (-l1 - 3 >= 0 && -l1 - 2 < (long)Exp32IndexSize && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { - unsigned short base = Exp32Index[-l1 - 3] + base = Exp32Index[-l1 - 3] + (unsigned short) (l2 - 2 - MaxBase32Size); if (base < Exp32Index[-l1 - 2]) { - long lResult = (oddExponent) ? - -Exp32Value[base] : Exp32Value[base]; - /* * 32-bit number raised to intermediate power, done by * table lookup. */ + lResult = (oddExponent) ? + -Exp32Value[base] : Exp32Value[base]; TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); if (Tcl_IsShared(valuePtr)) { TclNewLongObj(objResultPtr, lResult); @@ -6530,8 +6430,7 @@ TclExecuteByteCode( * Small powers of integers whose result is wide. */ - Tcl_WideInt wResult = w1 * w1; /* b**2 */ - + wResult = w1 * w1; /* b**2 */ switch (l2) { case 2: break; @@ -6617,9 +6516,8 @@ TclExecuteByteCode( if (w1 - 3 >= 0 && w1 - 2 < (long)Exp64IndexSize && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { - unsigned short base = Exp64Index[w1 - 3] + base = Exp64Index[w1 - 3] + (unsigned short) (l2 - 2 - MaxBase64Size); - if (base < Exp64Index[w1 - 2]) { /* * 64-bit number raised to intermediate power, done by @@ -6640,17 +6538,16 @@ TclExecuteByteCode( if (-w1 - 3 >= 0 && -w1 - 2 < (long)Exp64IndexSize && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { - unsigned short base = Exp64Index[-w1 - 3] + base = Exp64Index[-w1 - 3] + (unsigned short) (l2 - 2 - MaxBase64Size); - if (base < Exp64Index[-w1 - 2]) { - Tcl_WideInt wResult = (oddExponent) ? - -Exp64Value[base] : Exp64Value[base]; /* * 64-bit number raised to intermediate power, done by * table lookup. */ + wResult = (oddExponent) ? + -Exp64Value[base] : Exp64Value[base]; TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); if (Tcl_IsShared(valuePtr)) { objResultPtr = Tcl_NewWideIntObj(wResult); @@ -6669,8 +6566,6 @@ TclExecuteByteCode( if ((*pc != INST_MULT) && (type1 != TCL_NUMBER_BIG) && (type2 != TCL_NUMBER_BIG)) { - Tcl_WideInt w1, w2, wResult; - TclGetWideIntFromObj(NULL, valuePtr, &w1); TclGetWideIntFromObj(NULL, value2Ptr, &w2); @@ -6761,74 +6656,70 @@ TclExecuteByteCode( } overflow: - { - mp_int big1, big2, bigResult, bigRemainder; - - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - mp_init(&bigResult); - switch (*pc) { - case INST_ADD: - mp_add(&big1, &big2, &bigResult); - break; - case INST_SUB: - mp_sub(&big1, &big2, &bigResult); - break; - case INST_MULT: - mp_mul(&big1, &big2, &bigResult); - break; - case INST_DIV: - if (mp_iszero(&big2)) { - TRACE(("%s %s => DIVIDE BY ZERO\n", O2S(valuePtr), - O2S(value2Ptr))); - mp_clear(&big1); - mp_clear(&big2); - mp_clear(&bigResult); - goto divideByZero; - } - mp_init(&bigRemainder); - mp_div(&big1, &big2, &bigResult, &bigRemainder); - /* TODO: internals intrusion */ - if (!mp_iszero(&bigRemainder) - && (bigRemainder.sign != big2.sign)) { - /* - * Convert to Tcl's integer division rules. - */ + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + mp_init(&bigResult); + switch (*pc) { + case INST_ADD: + mp_add(&big1, &big2, &bigResult); + break; + case INST_SUB: + mp_sub(&big1, &big2, &bigResult); + break; + case INST_MULT: + mp_mul(&big1, &big2, &bigResult); + break; + case INST_DIV: + if (mp_iszero(&big2)) { + TRACE(("%s %s => DIVIDE BY ZERO\n", O2S(valuePtr), + O2S(value2Ptr))); + mp_clear(&big1); + mp_clear(&big2); + mp_clear(&bigResult); + goto divideByZero; + } + mp_init(&bigRemainder); + mp_div(&big1, &big2, &bigResult, &bigRemainder); + /* TODO: internals intrusion */ + if (!mp_iszero(&bigRemainder) + && (bigRemainder.sign != big2.sign)) { + /* + * Convert to Tcl's integer division rules. + */ - mp_sub_d(&bigResult, 1, &bigResult); - mp_add(&bigRemainder, &big2, &bigRemainder); - } - mp_clear(&bigRemainder); - break; - case INST_EXPON: - if (big2.used > 1) { - Tcl_SetResult(interp, "exponent too large", TCL_STATIC); - mp_clear(&big1); - mp_clear(&big2); - mp_clear(&bigResult); - TRESULT = TCL_ERROR; - goto checkForCatch; - } - mp_expt_d(&big1, big2.dp[0], &bigResult); - break; + mp_sub_d(&bigResult, 1, &bigResult); + mp_add(&bigRemainder, &big2, &bigRemainder); } - mp_clear(&big1); - mp_clear(&big2); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&bigResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); + mp_clear(&bigRemainder); + break; + case INST_EXPON: + if (big2.used > 1) { + Tcl_SetResult(interp, "exponent too large", TCL_STATIC); + mp_clear(&big1); + mp_clear(&big2); + mp_clear(&bigResult); + TRESULT = TCL_ERROR; + goto checkForCatch; } - Tcl_SetBignumObj(valuePtr, &bigResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + mp_expt_d(&big1, big2.dp[0], &bigResult); + break; } - } + mp_clear(&big1); + mp_clear(&big2); + if (Tcl_IsShared(valuePtr)) { + objResultPtr = Tcl_NewBignumObj(&bigResult); + TRACE(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); + } + Tcl_SetBignumObj(valuePtr, &bigResult); + TRACE(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); case INST_LNOT: { int b; - Tcl_Obj *valuePtr = OBJ_AT_TOS; + + valuePtr = OBJ_AT_TOS; /* TODO - check claim that taking address of b harms performance */ /* TODO - consider optimization search for constants */ @@ -6844,15 +6735,11 @@ TclExecuteByteCode( NEXT_INST_F(1, 1, 1); } - case INST_BITNOT: { - mp_int big; - ClientData ptr; - int type; - Tcl_Obj *valuePtr = OBJ_AT_TOS; - - TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr, &type); - if ((TRESULT != TCL_OK) - || (type == TCL_NUMBER_NAN) || (type == TCL_NUMBER_DOUBLE)) { + case INST_BITNOT: + valuePtr = OBJ_AT_TOS; + TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); + if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_NAN) + || (type1 == TCL_NUMBER_DOUBLE)) { /* * ... ~$NonInteger => raise an error. */ @@ -6863,145 +6750,121 @@ TclExecuteByteCode( IllegalExprOperandType(interp, pc, valuePtr); goto checkForCatch; } - if (type == TCL_NUMBER_LONG) { - long l = *((const long *)ptr); - + if (type1 == TCL_NUMBER_LONG) { + l1 = *((const long *) ptr1); if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, ~l); + TclNewLongObj(objResultPtr, ~l1); NEXT_INST_F(1, 1, 1); } - TclSetLongObj(valuePtr, ~l); + TclSetLongObj(valuePtr, ~l1); NEXT_INST_F(1, 0, 0); } #ifndef NO_WIDE_TYPE - if (type == TCL_NUMBER_WIDE) { - Tcl_WideInt w = *((const Tcl_WideInt *)ptr); - + if (type1 == TCL_NUMBER_WIDE) { + w1 = *((const Tcl_WideInt *) ptr1); if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(~w); + objResultPtr = Tcl_NewWideIntObj(~w1); NEXT_INST_F(1, 1, 1); } - Tcl_SetWideIntObj(valuePtr, ~w); + Tcl_SetWideIntObj(valuePtr, ~w1); NEXT_INST_F(1, 0, 0); } #endif - Tcl_TakeBignumFromObj(NULL, valuePtr, &big); + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); /* ~a = - a - 1 */ - mp_neg(&big, &big); - mp_sub_d(&big, 1, &big); + mp_neg(&big1, &big1); + mp_sub_d(&big1, 1, &big1); if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&big); + objResultPtr = Tcl_NewBignumObj(&big1); NEXT_INST_F(1, 1, 1); } - Tcl_SetBignumObj(valuePtr, &big); + Tcl_SetBignumObj(valuePtr, &big1); NEXT_INST_F(1, 0, 0); - } - case INST_UMINUS: { - ClientData ptr; - int type; - Tcl_Obj *valuePtr = OBJ_AT_TOS; - - TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr, &type); - if ((TRESULT != TCL_OK) -#ifndef ACCEPT_NAN - || (type == TCL_NUMBER_NAN) -#endif - ) { + case INST_UMINUS: + valuePtr = OBJ_AT_TOS; + TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); + if ((TRESULT != TCL_OK) || IsErroringNaNType(type1)) { TRESULT = TCL_ERROR; TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); goto checkForCatch; } - switch (type) { - case TCL_NUMBER_DOUBLE: { - double d; - + switch (type1) { + case TCL_NUMBER_DOUBLE: if (Tcl_IsShared(valuePtr)) { - TclNewDoubleObj(objResultPtr, -(*((const double *)ptr))); + TclNewDoubleObj(objResultPtr, -(*((const double *) ptr1))); NEXT_INST_F(1, 1, 1); } - d = *((const double *)ptr); - TclSetDoubleObj(valuePtr, -d); + d1 = *((const double *) ptr1); + TclSetDoubleObj(valuePtr, -d1); NEXT_INST_F(1, 0, 0); - } - case TCL_NUMBER_LONG: { - long l = *((const long *)ptr); - - if (l != LONG_MIN) { + case TCL_NUMBER_LONG: + l1 = *((const long *) ptr1); + if (l1 != LONG_MIN) { if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, -l); + TclNewLongObj(objResultPtr, -l1); NEXT_INST_F(1, 1, 1); } - TclSetLongObj(valuePtr, -l); + TclSetLongObj(valuePtr, -l1); NEXT_INST_F(1, 0, 0); } /* FALLTHROUGH */ - } #ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: { - Tcl_WideInt w; - - if (type == TCL_NUMBER_LONG) { - w = (Tcl_WideInt)(*((const long *)ptr)); + case TCL_NUMBER_WIDE: + if (type1 == TCL_NUMBER_LONG) { + w1 = (Tcl_WideInt)(*((const long *) ptr1)); } else { - w = *((const Tcl_WideInt *)ptr); + w1 = *((const Tcl_WideInt *) ptr1); } - if (w != LLONG_MIN) { + if (w1 != LLONG_MIN) { if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(-w); + objResultPtr = Tcl_NewWideIntObj(-w1); NEXT_INST_F(1, 1, 1); } - Tcl_SetWideIntObj(valuePtr, -w); + Tcl_SetWideIntObj(valuePtr, -w1); NEXT_INST_F(1, 0, 0); } /* FALLTHROUGH */ - } #endif - case TCL_NUMBER_BIG: { - mp_int big; - - switch (type) { + case TCL_NUMBER_BIG: + switch (type1) { #ifdef NO_WIDE_TYPE case TCL_NUMBER_LONG: - TclBNInitBignumFromLong(&big, *(const long *) ptr); + TclBNInitBignumFromLong(&big1, *(const long *) ptr1); break; #else case TCL_NUMBER_WIDE: - TclBNInitBignumFromWideInt(&big, *(const Tcl_WideInt *) ptr); + TclBNInitBignumFromWideInt(&big1, *(const Tcl_WideInt *)ptr1); break; #endif case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, valuePtr, &big); + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); } - mp_neg(&big, &big); + mp_neg(&big1, &big1); if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&big); + objResultPtr = Tcl_NewBignumObj(&big1); NEXT_INST_F(1, 1, 1); } - Tcl_SetBignumObj(valuePtr, &big); + Tcl_SetBignumObj(valuePtr, &big1); NEXT_INST_F(1, 0, 0); - } case TCL_NUMBER_NAN: /* -NaN => NaN */ NEXT_INST_F(1, 0, 0); } - } case INST_UPLUS: - case INST_TRY_CVT_TO_NUMERIC: { + case INST_TRY_CVT_TO_NUMERIC: /* * Try to convert the topmost stack object to numeric object. This is * done in order to support [expr]'s policy of interpreting operands * if at all possible as numbers first, then strings. */ - ClientData ptr; - int type; - Tcl_Obj *valuePtr = OBJ_AT_TOS; + valuePtr = OBJ_AT_TOS; - if (GetNumberFromObj(NULL, valuePtr, &ptr, &type) != TCL_OK) { + if (GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) { if (*pc == INST_UPLUS) { /* * ... +$NonNumeric => raise an error. @@ -7012,14 +6875,13 @@ TclExecuteByteCode( (valuePtr->typePtr? valuePtr->typePtr->name:"null"))); IllegalExprOperandType(interp, pc, valuePtr); goto checkForCatch; - } else { - /* ... TryConvertToNumeric($NonNumeric) is acceptable */ - TRACE(("\"%.20s\" => not numeric\n", O2S(valuePtr))); - NEXT_INST_F(1, 0, 0); } + + /* ... TryConvertToNumeric($NonNumeric) is acceptable */ + TRACE(("\"%.20s\" => not numeric\n", O2S(valuePtr))); + NEXT_INST_F(1, 0, 0); } -#ifndef ACCEPT_NAN - if (type == TCL_NUMBER_NAN) { + if (IsErroringNaNType(type1)) { TRESULT = TCL_ERROR; if (*pc == INST_UPLUS) { /* @@ -7036,11 +6898,10 @@ TclExecuteByteCode( TRACE(("\"%.20s\" => IEEE FLOATING PT ERROR\n", O2S(objResultPtr))); - TclExprFloatError(interp, *((const double *)ptr)); + TclExprFloatError(interp, *((const double *) ptr1)); } goto checkForCatch; } -#endif /* * Ensure that the numeric value has a string rep the same as the @@ -7106,13 +6967,13 @@ TclExecuteByteCode( * number of iterations of the loop body to -1. */ - int opnd, iterTmpIndex; + int iterTmpIndex; ForeachInfo *infoPtr; Var *iterVarPtr; Tcl_Obj *oldValuePtr; opnd = TclGetUInt4AtPtr(pc+1); - infoPtr = (ForeachInfo *) codePtr->auxDataArrayPtr[opnd].clientData; + infoPtr = codePtr->auxDataArrayPtr[opnd].clientData; iterTmpIndex = infoPtr->loopCtTemp; iterVarPtr = LOCAL(iterTmpIndex); oldValuePtr = iterVarPtr->value.objPtr; @@ -7147,14 +7008,14 @@ TclExecuteByteCode( ForeachInfo *infoPtr; ForeachVarList *varListPtr; - Tcl_Obj *listPtr,*valuePtr, *value2Ptr, **elements; - Var *iterVarPtr, *listVarPtr, *varPtr; - int opnd, numLists, iterNum, listTmpIndex, listLen, numVars; + Tcl_Obj *listPtr, **elements; + Var *iterVarPtr, *listVarPtr; + int numLists, iterNum, listTmpIndex, listLen, numVars; int varIndex, valIndex, continueLoop, j; long i; opnd = TclGetUInt4AtPtr(pc+1); - infoPtr = (ForeachInfo *) codePtr->auxDataArrayPtr[opnd].clientData; + infoPtr = codePtr->auxDataArrayPtr[opnd].clientData; numLists = infoPtr->numLists; /* @@ -7297,14 +7158,10 @@ TclExecuteByteCode( /* * See the comments at INST_INVOKE_STK */ - { - Tcl_Obj *newObjResultPtr; - - TclNewObj(newObjResultPtr); - Tcl_IncrRefCount(newObjResultPtr); - iPtr->objResultPtr = newObjResultPtr; - } + TclNewObj(objPtr); + Tcl_IncrRefCount(objPtr); + iPtr->objResultPtr = objPtr; NEXT_INST_F(1, 0, -1); case INST_PUSH_RETURN_CODE: @@ -7338,10 +7195,9 @@ TclExecuteByteCode( */ { - int opnd, opnd2, allocateDict, done, i, length, allocdict; - Tcl_Obj *dictPtr, *valuePtr, *val2Ptr, *statePtr, *keyPtr; + int opnd2, allocateDict, done, i, allocdict; + Tcl_Obj *dictPtr, *statePtr, *keyPtr; Tcl_Obj *emptyPtr, **keyPtrPtr; - Var *varPtr; Tcl_DictSearch *searchPtr; DictUpdateInfo *duiPtr; @@ -7423,17 +7279,17 @@ TclExecuteByteCode( if (valuePtr == NULL) { Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS,Tcl_NewIntObj(opnd)); } else { - val2Ptr = Tcl_NewIntObj(opnd); - Tcl_IncrRefCount(val2Ptr); + value2Ptr = Tcl_NewIntObj(opnd); + Tcl_IncrRefCount(value2Ptr); if (Tcl_IsShared(valuePtr)) { valuePtr = Tcl_DuplicateObj(valuePtr); Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS, valuePtr); } - TRESULT = TclIncrObj(interp, valuePtr, val2Ptr); + TRESULT = TclIncrObj(interp, valuePtr, value2Ptr); if (TRESULT == TCL_OK) { Tcl_InvalidateStringRep(dictPtr); } - TclDecrRefCount(val2Ptr); + TclDecrRefCount(value2Ptr); } break; case INST_DICT_UNSET: @@ -7457,10 +7313,10 @@ TclExecuteByteCode( if (TclIsVarDirectWritable(varPtr)) { if (allocateDict) { - val2Ptr = varPtr->value.objPtr; + value2Ptr = varPtr->value.objPtr; Tcl_IncrRefCount(dictPtr); - if (val2Ptr != NULL) { - TclDecrRefCount(val2Ptr); + if (value2Ptr != NULL) { + TclDecrRefCount(value2Ptr); } varPtr->value.objPtr = dictPtr; } @@ -7573,10 +7429,10 @@ TclExecuteByteCode( if (TclIsVarDirectWritable(varPtr)) { if (allocateDict) { - val2Ptr = varPtr->value.objPtr; + value2Ptr = varPtr->value.objPtr; Tcl_IncrRefCount(dictPtr); - if (val2Ptr != NULL) { - TclDecrRefCount(val2Ptr); + if (value2Ptr != NULL) { + TclDecrRefCount(value2Ptr); } varPtr->value.objPtr = dictPtr; } @@ -7620,11 +7476,10 @@ TclExecuteByteCode( statePtr->internalRep.twoPtrValue.ptr2 = dictPtr; varPtr = LOCAL(opnd); if (varPtr->value.objPtr) { - if (varPtr->value.objPtr->typePtr != &dictIteratorType) { - TclDecrRefCount(varPtr->value.objPtr); - } else { + if (varPtr->value.objPtr->typePtr == &dictIteratorType) { Tcl_Panic("mis-issued dictFirst!"); } + TclDecrRefCount(varPtr->value.objPtr); } varPtr->value.objPtr = statePtr; Tcl_IncrRefCount(statePtr); @@ -7857,12 +7712,7 @@ TclExecuteByteCode( * range enclosing the pc. Used by various * instructions and processCatch to process * break, continue, and errors. */ - Tcl_Obj *valuePtr; const char *bytes; - int length; -#if TCL_COMPILE_DEBUG - int opnd; -#endif /* * An external evaluation (INST_INVOKE or INST_EVAL) returned @@ -7931,14 +7781,11 @@ TclExecuteByteCode( } #if TCL_COMPILE_DEBUG } else if (traceInstructions) { + objPtr = Tcl_GetObjResult(interp); if ((TRESULT != TCL_ERROR) && (TRESULT != TCL_RETURN)) { - Tcl_Obj *objPtr = Tcl_GetObjResult(interp); - TRACE_APPEND(("OTHER RETURN CODE %d, result= \"%s\"\n ", TRESULT, O2S(objPtr))); } else { - Tcl_Obj *objPtr = Tcl_GetObjResult(interp); - TRACE_APPEND(("%s, result= \"%s\"\n", StringForResultCode(TRESULT), O2S(objPtr))); } @@ -8100,8 +7947,7 @@ TclExecuteByteCode( POP_TAUX_OBJ(); } while (tosPtr > initTosPtr) { - Tcl_Obj *objPtr = POP_OBJECT(); - + objPtr = POP_OBJECT(); Tcl_DecrRefCount(objPtr); } -- cgit v0.12 From 96d071af5418655b8dfbecd0410b6e5d07bfbde5 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Feb 2010 14:30:31 +0000 Subject: Fix some nasties with handling duplicate keys in list->dict->list conversions. --- ChangeLog | 5 +++++ generic/tclDictObj.c | 10 +++++++++- generic/tclListObj.c | 8 +++++--- tests/dict.test | 18 +++++++++++++++--- 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c937d2b..c9db0b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-02-24 Donal K. Fellows + * generic/tclDictObj.c (SetDictFromAny): Prevent the list<->dict + * generic/tclListObj.c (SetListFromAny): conversion code from taking + too many liberties. Stops loss of duplicate keys in some scenarios. + Many thanks to Jean-Claude Wippler for finding this. + * generic/tclExecute.c (TclExecuteByteCode): Reduce ifdef-fery and size of activation record. More variables shared across instructions than before. diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index dab4418..2751b4a 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.80 2009/11/18 21:59:51 nijtmans Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.81 2010/02/24 14:30:34 dkf Exp $ */ #include "tclInt.h" @@ -613,6 +613,14 @@ SetDictFromAny( if (!isNew) { Tcl_Obj *discardedValue = Tcl_GetHashValue(hPtr); + /* + * Not really a well-formed dictionary as there are duplicate + * keys, so better get the string rep here so that we can + * convert back. + */ + + (void) Tcl_GetString(objPtr); + TclDecrRefCount(discardedValue); } Tcl_SetHashValue(hPtr, objv[i+1]); diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 659017c..896dcd3 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.58 2009/09/30 03:11:26 dgp Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.59 2010/02/24 14:30:34 dkf Exp $ */ #include "tclInt.h" @@ -1684,10 +1684,12 @@ SetListFromAny( /* * Dictionaries are a special case; they have a string representation such * that *all* valid dictionaries are valid lists. Hence we can convert - * more directly. + * more directly. Only do this when there's no existing string rep; if + * there is, it is the string rep that's authoritative (because it could + * describe duplicate keys). */ - if (objPtr->typePtr == &tclDictType) { + if (objPtr->typePtr == &tclDictType && !objPtr->bytes) { Tcl_Obj *keyPtr, *valuePtr; Tcl_DictSearch search; int done, size; diff --git a/tests/dict.test b/tests/dict.test index 7c16c5f..e6b9ba4 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.34 2009/10/29 11:49:25 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.35 2010/02/24 14:30:34 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -29,7 +29,7 @@ if {[testConstraint memory]} { expr {$end - $tmp} } } - + test dict-1.1 {dict command basic syntax} -returnCodes error -body { dict } -result {wrong # args: should be "dict subcommand ?arg ...?"} @@ -938,6 +938,18 @@ test dict-18.2 {dict-list relationship} -body { } -cleanup { unset d t } -result 6 +test dict-18.3 {dict-list relationship} -body { + set ld [list a b c d c e f g] + list [string length $ld] [dict size $ld] [llength $ld] +} -cleanup { + unset ld +} -result {15 3 8} +test dict-18.4 {dict-list relationship} -body { + set ld [list a b c d c e f g] + list [llength $ld] [dict size $ld] [llength $ld] +} -cleanup { + unset ld +} -result {8 3 8} # This is a test for a specific bug. # It shows a bad ref counter when running with memdebug on. @@ -1340,7 +1352,7 @@ test dict-22.11 {dict with command: no recursive structures [Bug 1786481]} -body } -cleanup { unset foo t inner } -result OK - + # cleanup ::tcltest::cleanupTests return -- cgit v0.12 From e5590dd89ca80546a81ef0baaa341d322c66560b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Feb 2010 10:56:16 +0000 Subject: Correct silly error with missing semicolons --- generic/tclCompCmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 6010182..280ab5e 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.165 2010/02/22 23:31:41 nijtmans Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.166 2010/02/25 10:56:16 dkf Exp $ */ #include "tclInt.h" @@ -4039,9 +4039,9 @@ TclSubstCompile( breakJump = CurrentOffset(envPtr) - breakOffset; if (breakJump > 127) { - TclEmitInstInt4(INST_JUMP4, -breakJump, envPtr) + TclEmitInstInt4(INST_JUMP4, -breakJump, envPtr); } else { - TclEmitInstInt1(INST_JUMP1, -breakJump, envPtr) + TclEmitInstInt1(INST_JUMP1, -breakJump, envPtr); } /* CONTINUE destination */ -- cgit v0.12 From 526e8665e559eb977cf2475cfcd08492be633a87 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Feb 2010 14:49:01 +0000 Subject: Convert many multi-line macros to use the best-practice do-while(0) form --- generic/tclCompile.h | 334 ++++++++++++++++++++++++++++----------------------- 1 file changed, 183 insertions(+), 151 deletions(-) diff --git a/generic/tclCompile.h b/generic/tclCompile.h index b9b93cb..1102833 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.123 2010/02/13 18:11:06 dkf Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.124 2010/02/25 14:49:01 dkf Exp $ */ #ifndef _TCLCOMPILATION @@ -129,17 +129,17 @@ typedef struct CmdLocation { typedef struct ECL { int srcOffset; /* Command location to find the entry. */ - int nline; /* Number of words in the command */ + int nline; /* Number of words in the command */ int *line; /* Line information for all words in the * command. */ - int** next; /* Transient information used by the compiler + int **next; /* Transient information used by the compiler * for tracking of hidden continuation * lines. */ } ECL; typedef struct ExtCmdLoc { int type; /* Context type. */ - int start; /* Starting line for compiled script. Needed + int start; /* Starting line for compiled script. Needed * for the extended recompile check in * tclCompileObj. */ Tcl_Obj *path; /* Path of the sourced file the command is @@ -147,7 +147,7 @@ typedef struct ExtCmdLoc { ECL *loc; /* Command word locations (lines). */ int nloc; /* Number of allocated entries in 'loc'. */ int nuloc; /* Number of used entries in 'loc'. */ - Tcl_HashTable litInfo; /* Indexed by bytecode 'PC', to have the + Tcl_HashTable litInfo; /* Indexed by bytecode 'PC', to have the * information accessible per command and * argument, not per whole bytecode. Value is * index of command in 'loc', giving us the @@ -172,7 +172,7 @@ typedef struct ExtCmdLoc { */ typedef ClientData (AuxDataDupProc) (ClientData clientData); -typedef void (AuxDataFreeProc) (ClientData clientData); +typedef void (AuxDataFreeProc) (ClientData clientData); typedef void (AuxDataPrintProc)(ClientData clientData, Tcl_Obj *appendObj, struct ByteCode *codePtr, unsigned int pcOffset); @@ -208,7 +208,7 @@ typedef struct AuxDataType { */ typedef struct AuxData { - const AuxDataType *type; /* Pointer to the AuxData type associated with + const AuxDataType *type; /* Pointer to the AuxData type associated with * this ClientData. */ ClientData clientData; /* The compilation data itself. */ } AuxData; @@ -312,13 +312,13 @@ typedef struct CompileEnv { * should be issued; they should never be * issued repeatedly, as that is significantly * inefficient. */ - ContLineLoc* clLoc; /* If not NULL, the table holding the - * locations of the invisible continuation - * lines in the input script, to adjust the - * line counter. */ - int* clNext; /* If not NULL, it refers to the next slot in - * clLoc to check for an invisible - * continuation line. */ + ContLineLoc *clLoc; /* If not NULL, the table holding the + * locations of the invisible continuation + * lines in the input script, to adjust the + * line counter. */ + int *clNext; /* If not NULL, it refers to the next slot in + * clLoc to check for an invisible + * continuation line. */ } CompileEnv; /* @@ -440,7 +440,7 @@ typedef struct ByteCode { * code deltas. Source lengths are always * positive. This sequence is just after the * last byte in the source delta sequence. */ - LocalCache *localCachePtr; /* Pointer to the start of the cached variable + LocalCache *localCachePtr; /* Pointer to the start of the cached variable * names and initialisation data for local * variables. */ #ifdef TCL_COMPILE_STATS @@ -709,7 +709,7 @@ typedef enum InstOperandType { } InstOperandType; typedef struct InstructionDesc { - const char *name; /* Name of instruction. */ + const char *name; /* Name of instruction. */ int numBytes; /* Total number of bytes for instruction. */ int stackEffect; /* The worst-case balance stack effect of the * instruction, used for stack requirements @@ -849,7 +849,7 @@ MODULE_SCOPE const AuxDataType tclDictUpdateInfoType; */ typedef struct { - const char *op; /* Do not call it 'operator': C++ reserved */ + const char *op; /* Do not call it 'operator': C++ reserved */ const char *expected; union { int numArgs; @@ -857,21 +857,20 @@ typedef struct { } i; } TclOpCmdClientData; - /* *---------------------------------------------------------------- * Procedures exported by tclBasic.c to be used within the engine. *---------------------------------------------------------------- */ -MODULE_SCOPE Tcl_NRPostProc NRCallTEBC; -MODULE_SCOPE Tcl_NRPostProc NRCommand; -MODULE_SCOPE Tcl_ObjCmdProc NRInterpCoroutine; +MODULE_SCOPE Tcl_NRPostProc NRCallTEBC; +MODULE_SCOPE Tcl_NRPostProc NRCommand; +MODULE_SCOPE Tcl_ObjCmdProc NRInterpCoroutine; -#define TCL_NR_BC_TYPE 0 -#define TCL_NR_ATEXIT_TYPE 1 -#define TCL_NR_TAILCALL_TYPE 2 -#define TCL_NR_YIELD_TYPE 3 +#define TCL_NR_BC_TYPE 0 +#define TCL_NR_ATEXIT_TYPE 1 +#define TCL_NR_TAILCALL_TYPE 2 +#define TCL_NR_YIELD_TYPE 3 /* *---------------------------------------------------------------- @@ -894,7 +893,7 @@ MODULE_SCOPE void TclCompileCmdWord(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, CompileEnv *envPtr); MODULE_SCOPE void TclCompileExpr(Tcl_Interp *interp, const char *script, - int numBytes, CompileEnv *envPtr, int optimize); + int numBytes, CompileEnv *envPtr, int optimize); MODULE_SCOPE void TclCompileExprWords(Tcl_Interp *interp, Tcl_Token *tokenPtr, int numWords, CompileEnv *envPtr); @@ -913,17 +912,17 @@ MODULE_SCOPE int TclCreateAuxData(ClientData clientData, MODULE_SCOPE int TclCreateExceptRange(ExceptionRangeType type, CompileEnv *envPtr); MODULE_SCOPE ExecEnv * TclCreateExecEnv(Tcl_Interp *interp, int size); -MODULE_SCOPE Tcl_Obj * TclCreateLiteral(Interp *iPtr, char *bytes, - int length, unsigned int hash, int *newPtr, - Namespace *nsPtr, int flags, - LiteralEntry **globalPtrPtr); +MODULE_SCOPE Tcl_Obj * TclCreateLiteral(Interp *iPtr, char *bytes, + int length, unsigned int hash, int *newPtr, + Namespace *nsPtr, int flags, + LiteralEntry **globalPtrPtr); MODULE_SCOPE void TclDeleteExecEnv(ExecEnv *eePtr); MODULE_SCOPE void TclDeleteLiteralTable(Tcl_Interp *interp, LiteralTable *tablePtr); MODULE_SCOPE void TclEmitForwardJump(CompileEnv *envPtr, TclJumpType jumpType, JumpFixup *jumpFixupPtr); MODULE_SCOPE ExceptionRange * TclGetExceptionRangeForPc(unsigned char *pc, - int catchOnly, ByteCode* codePtr); + int catchOnly, ByteCode *codePtr); MODULE_SCOPE void TclExpandJumpFixupArray(JumpFixupArray *fixupArrayPtr); MODULE_SCOPE int TclExecuteByteCode(Tcl_Interp *interp, ByteCode *codePtr); @@ -943,7 +942,7 @@ MODULE_SCOPE void TclInitByteCodeObj(Tcl_Obj *objPtr, MODULE_SCOPE void TclInitCompilation(void); MODULE_SCOPE void TclInitCompileEnv(Tcl_Interp *interp, CompileEnv *envPtr, const char *string, - int numBytes, const CmdFrame* invoker, int word); + int numBytes, const CmdFrame *invoker, int word); MODULE_SCOPE void TclInitJumpFixupArray(JumpFixupArray *fixupArrayPtr); MODULE_SCOPE void TclInitLiteralTable(LiteralTable *tablePtr); #ifdef TCL_COMPILE_STATS @@ -954,7 +953,7 @@ MODULE_SCOPE int TclLog2(int value); MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp, Tcl_Obj *objPtr); #endif -MODULE_SCOPE int TclPrintInstruction(ByteCode* codePtr, +MODULE_SCOPE int TclPrintInstruction(ByteCode *codePtr, const unsigned char *pc); MODULE_SCOPE void TclPrintObject(FILE *outFile, Tcl_Obj *objPtr, int maxChars); @@ -990,8 +989,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, *---------------------------------------------------------------- */ -#define LITERAL_ON_HEAP 0x01 -#define LITERAL_NS_SCOPE 0x02 +#define LITERAL_ON_HEAP 0x01 +#define LITERAL_NS_SCOPE 0x02 /* * Form of TclRegisterLiteral with flags == 0. In that case, it is safe to @@ -1002,19 +1001,19 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclRegisterNewLiteral(envPtr, bytes, length) \ - TclRegisterLiteral(envPtr, (char *)(bytes), length, /*flags*/ 0) + TclRegisterLiteral(envPtr, (char *)(bytes), length, /*flags*/ 0) /* - * Form of TclRegisterLiteral with flags == LITERAL_NS_SCOPE. In that case, it is safe to - * cast away constness, and it is cleanest to do that here, all in one place. + * Form of TclRegisterLiteral with flags == LITERAL_NS_SCOPE. In that case, it + * is safe to cast away constness, and it is cleanest to do that here, all in + * one place. * * int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes, * int length); */ #define TclRegisterNewNSLiteral(envPtr, bytes, length) \ - TclRegisterLiteral(envPtr, (char *)(bytes), length, \ - /*flags*/ LITERAL_NS_SCOPE) + TclRegisterLiteral(envPtr, (char *)(bytes), length, LITERAL_NS_SCOPE) /* * Macro used to manually adjust the stack requirements; used in cases where @@ -1025,12 +1024,14 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclAdjustStackDepth(delta, envPtr) \ - if ((delta) < 0) {\ - if((envPtr)->maxStackDepth < (envPtr)->currStackDepth) {\ - (envPtr)->maxStackDepth = (envPtr)->currStackDepth;\ - }\ - }\ - (envPtr)->currStackDepth += (delta) + do { \ + if ((delta) < 0) { \ + if ((envPtr)->maxStackDepth < (envPtr)->currStackDepth) { \ + (envPtr)->maxStackDepth = (envPtr)->currStackDepth; \ + } \ + } \ + (envPtr)->currStackDepth += (delta); \ + } while (0) /* * Macro used to update the stack requirements. It is called by the macros @@ -1043,15 +1044,15 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclUpdateStackReqs(op, i, envPtr) \ - {\ - int delta = tclInstructionTable[(op)].stackEffect;\ - if (delta) {\ - if (delta == INT_MIN) {\ - delta = 1 - (i);\ - }\ - TclAdjustStackDepth(delta, envPtr);\ - }\ - } + do { \ + int delta = tclInstructionTable[(op)].stackEffect; \ + if (delta) { \ + if (delta == INT_MIN) { \ + delta = 1 - (i); \ + } \ + TclAdjustStackDepth(delta, envPtr); \ + } \ + } while (0) /* * Macro to emit an opcode byte into a CompileEnv's code array. The ANSI C @@ -1061,12 +1062,14 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclEmitOpcode(op, envPtr) \ - if ((envPtr)->codeNext == (envPtr)->codeEnd) { \ - TclExpandCodeArray(envPtr); \ - } \ - *(envPtr)->codeNext++ = (unsigned char) (op);\ - (envPtr)->atCmdStart = ((op) == INST_START_CMD); \ - TclUpdateStackReqs(op, 0, envPtr) + do { \ + if ((envPtr)->codeNext == (envPtr)->codeEnd) { \ + TclExpandCodeArray(envPtr); \ + } \ + *(envPtr)->codeNext++ = (unsigned char) (op); \ + (envPtr)->atCmdStart = ((op) == INST_START_CMD); \ + TclUpdateStackReqs(op, 0, envPtr); \ + } while (0) /* * Macros to emit an integer operand. The ANSI C "prototype" for these macros @@ -1077,23 +1080,27 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclEmitInt1(i, envPtr) \ - if ((envPtr)->codeNext == (envPtr)->codeEnd) { \ - TclExpandCodeArray(envPtr); \ - } \ - *(envPtr)->codeNext++ = (unsigned char) ((unsigned int) (i)) + do { \ + if ((envPtr)->codeNext == (envPtr)->codeEnd) { \ + TclExpandCodeArray(envPtr); \ + } \ + *(envPtr)->codeNext++ = (unsigned char) ((unsigned int) (i)); \ + } while (0) #define TclEmitInt4(i, envPtr) \ - if (((envPtr)->codeNext + 4) > (envPtr)->codeEnd) { \ - TclExpandCodeArray(envPtr); \ - } \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) >> 24); \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) >> 16); \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) >> 8); \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) ) + do { \ + if (((envPtr)->codeNext + 4) > (envPtr)->codeEnd) { \ + TclExpandCodeArray(envPtr); \ + } \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) >> 24); \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) >> 16); \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) >> 8); \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) ); \ + } while (0) /* * Macros to emit an instruction with signed or unsigned integer operands. @@ -1106,29 +1113,33 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclEmitInstInt1(op, i, envPtr) \ - if (((envPtr)->codeNext + 2) > (envPtr)->codeEnd) { \ - TclExpandCodeArray(envPtr); \ - } \ - *(envPtr)->codeNext++ = (unsigned char) (op); \ - *(envPtr)->codeNext++ = (unsigned char) ((unsigned int) (i));\ - (envPtr)->atCmdStart = ((op) == INST_START_CMD); \ - TclUpdateStackReqs(op, i, envPtr) + do { \ + if (((envPtr)->codeNext + 2) > (envPtr)->codeEnd) { \ + TclExpandCodeArray(envPtr); \ + } \ + *(envPtr)->codeNext++ = (unsigned char) (op); \ + *(envPtr)->codeNext++ = (unsigned char) ((unsigned int) (i)); \ + (envPtr)->atCmdStart = ((op) == INST_START_CMD); \ + TclUpdateStackReqs(op, i, envPtr); \ + } while (0) #define TclEmitInstInt4(op, i, envPtr) \ - if (((envPtr)->codeNext + 5) > (envPtr)->codeEnd) { \ - TclExpandCodeArray(envPtr); \ - } \ - *(envPtr)->codeNext++ = (unsigned char) (op); \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) >> 24); \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) >> 16); \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) >> 8); \ - *(envPtr)->codeNext++ = \ - (unsigned char) ((unsigned int) (i) );\ - (envPtr)->atCmdStart = ((op) == INST_START_CMD); \ - TclUpdateStackReqs(op, i, envPtr) + do { \ + if (((envPtr)->codeNext + 5) > (envPtr)->codeEnd) { \ + TclExpandCodeArray(envPtr); \ + } \ + *(envPtr)->codeNext++ = (unsigned char) (op); \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) >> 24); \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) >> 16); \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) >> 8); \ + *(envPtr)->codeNext++ = \ + (unsigned char) ((unsigned int) (i) ); \ + (envPtr)->atCmdStart = ((op) == INST_START_CMD); \ + TclUpdateStackReqs(op, i, envPtr); \ + } while (0) /* * Macro to push a Tcl object onto the Tcl evaluation stack. It emits the @@ -1140,14 +1151,14 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclEmitPush(objIndex, envPtr) \ - {\ - register int objIndexCopy = (objIndex);\ - if (objIndexCopy <= 255) { \ + do { \ + register int objIndexCopy = (objIndex); \ + if (objIndexCopy <= 255) { \ TclEmitInstInt1(INST_PUSH1, objIndexCopy, (envPtr)); \ - } else { \ + } else { \ TclEmitInstInt4(INST_PUSH4, objIndexCopy, (envPtr)); \ - }\ - } + } \ + } while (0) /* * Macros to update a (signed or unsigned) integer starting at a pointer. The @@ -1162,10 +1173,12 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, *(p) = (unsigned char) ((unsigned int) (i)) #define TclStoreInt4AtPtr(i, p) \ - *(p) = (unsigned char) ((unsigned int) (i) >> 24); \ - *(p+1) = (unsigned char) ((unsigned int) (i) >> 16); \ - *(p+2) = (unsigned char) ((unsigned int) (i) >> 8); \ - *(p+3) = (unsigned char) ((unsigned int) (i) ) + do { \ + *(p) = (unsigned char) ((unsigned int) (i) >> 24); \ + *(p+1) = (unsigned char) ((unsigned int) (i) >> 16); \ + *(p+2) = (unsigned char) ((unsigned int) (i) >> 8); \ + *(p+3) = (unsigned char) ((unsigned int) (i) ); \ + } while (0) /* * Macros to update instructions at a particular pc with a new op code and a @@ -1177,12 +1190,16 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclUpdateInstInt1AtPc(op, i, pc) \ - *(pc) = (unsigned char) (op); \ - TclStoreInt1AtPtr((i), ((pc)+1)) + do { \ + *(pc) = (unsigned char) (op); \ + TclStoreInt1AtPtr((i), ((pc)+1)); \ + } while (0) #define TclUpdateInstInt4AtPc(op, i, pc) \ - *(pc) = (unsigned char) (op); \ - TclStoreInt4AtPtr((i), ((pc)+1)) + do { \ + *(pc) = (unsigned char) (op); \ + TclStoreInt4AtPtr((i), ((pc)+1)); \ + } while (0) /* * Macro to fix up a forward jump to point to the current code-generation @@ -1194,7 +1211,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define TclFixupForwardJumpToHere(envPtr, fixupPtr, threshold) \ - TclFixupForwardJump((envPtr), (fixupPtr), \ + TclFixupForwardJump((envPtr), (fixupPtr), \ (envPtr)->codeNext-(envPtr)->codeStart-(fixupPtr)->codeOffset, \ (threshold)) @@ -1220,25 +1237,26 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #ifndef __CHAR_UNSIGNED__ # define TclGetInt1AtPtr(p) ((int) *((char *) p)) +#elif defined(HAVE_SIGNED_CHAR) +# define TclGetInt1AtPtr(p) ((int) *((signed char *) p)) #else -# ifdef HAVE_SIGNED_CHAR -# define TclGetInt1AtPtr(p) ((int) *((signed char *) p)) -# else -# define TclGetInt1AtPtr(p) (((int) *((char *) p)) \ - | ((*(p) & 0200) ? (-256) : 0)) -# endif +# define TclGetInt1AtPtr(p) \ + (((int) *((char *) p)) | ((*(p) & 0200) ? (-256) : 0)) #endif -#define TclGetInt4AtPtr(p) (((int) TclGetInt1AtPtr(p) << 24) | \ - (*((p)+1) << 16) | \ - (*((p)+2) << 8) | \ - (*((p)+3))) +#define TclGetInt4AtPtr(p) \ + (((int) TclGetInt1AtPtr(p) << 24) | \ + (*((p)+1) << 16) | \ + (*((p)+2) << 8) | \ + (*((p)+3))) -#define TclGetUInt1AtPtr(p) ((unsigned int) *(p)) -#define TclGetUInt4AtPtr(p) ((unsigned int) (*(p) << 24) | \ - (*((p)+1) << 16) | \ - (*((p)+2) << 8) | \ - (*((p)+3))) +#define TclGetUInt1AtPtr(p) \ + ((unsigned int) *(p)) +#define TclGetUInt4AtPtr(p) \ + ((unsigned int) (*(p) << 24) | \ + (*((p)+1) << 16) | \ + (*((p)+2) << 8) | \ + (*((p)+3))) /* * Macros used to compute the minimum and maximum of two integers. The ANSI C @@ -1248,8 +1266,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, * int TclMax(int i, int j); */ -#define TclMin(i, j) ((((int) i) < ((int) j))? (i) : (j)) -#define TclMax(i, j) ((((int) i) > ((int) j))? (i) : (j)) +#define TclMin(i, j) ((((int) i) < ((int) j))? (i) : (j)) +#define TclMax(i, j) ((((int) i) > ((int) j))? (i) : (j)) /* * Convenience macro for use when compiling bodies of commands. The ANSI C @@ -1367,7 +1385,9 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #ifdef USE_DTRACE #if defined(__GNUC__) && __GNUC__ > 2 -/* Use gcc branch prediction hint to minimize cost of DTrace ENABLED checks. */ +/* + * Use gcc branch prediction hint to minimize cost of DTrace ENABLED checks. + */ #define unlikely(x) (__builtin_expect((x), 0)) #else #define unlikely(x) (x) @@ -1410,7 +1430,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, #define TCL_DTRACE_DEBUG_LOG() -MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, int *argsi); +MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, + int *argsi); #else /* USE_DTRACE */ @@ -1468,24 +1489,33 @@ MODULE_SCOPE void TclDTraceOpenDebugLog(void); MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, int *argsi); #define TCL_DTRACE_DEBUG_LOG() \ - int tclDTraceDebugEnabled = TCL_DTRACE_DEBUG_LOG_ENABLED;\ - int tclDTraceDebugIndent = 0; \ - FILE *tclDTraceDebugLog = NULL; \ - void TclDTraceOpenDebugLog(void) { char n[35]; \ - sprintf(n, "/tmp/tclDTraceDebug-%lu.log", (unsigned long) getpid()); \ - tclDTraceDebugLog = fopen(n, "a"); } \ - -#define TclDTraceDbgMsg(p, m, ...) do { if (tclDTraceDebugEnabled) { \ - int _l, _t = 0; if (!tclDTraceDebugLog) { TclDTraceOpenDebugLog(); } \ - fprintf(tclDTraceDebugLog, "%.12s:%.4d:%n", strrchr(__FILE__, '/') + \ - 1, __LINE__, &_l); _t += _l; \ - fprintf(tclDTraceDebugLog, " %.*s():%n", (_t < 18 ? 18 - _t : 0) + \ - 18, __func__, &_l); _t += _l; \ - fprintf(tclDTraceDebugLog, "%*s" p "%n", (_t < 40 ? 40 - _t : 0) + \ - 2 * tclDTraceDebugIndent, "", &_l); _t += _l; \ - fprintf(tclDTraceDebugLog, "%*s" m "\n", (_t < 64 ? 64 - _t : 1), "", \ - ##__VA_ARGS__); fflush(tclDTraceDebugLog); \ - } } while (0) + int tclDTraceDebugEnabled = TCL_DTRACE_DEBUG_LOG_ENABLED; \ + int tclDTraceDebugIndent = 0; \ + FILE *tclDTraceDebugLog = NULL; \ + void TclDTraceOpenDebugLog(void) { \ + char n[35]; \ + sprintf(n, "/tmp/tclDTraceDebug-%lu.log", \ + (unsigned long) getpid()); \ + tclDTraceDebugLog = fopen(n, "a"); \ + } + +#define TclDTraceDbgMsg(p, m, ...) \ + do { \ + if (tclDTraceDebugEnabled) { \ + int _l, _t = 0; \ + if (!tclDTraceDebugLog) { TclDTraceOpenDebugLog(); } \ + fprintf(tclDTraceDebugLog, "%.12s:%.4d:%n", \ + strrchr(__FILE__, '/')+1, __LINE__, &_l); _t += _l; \ + fprintf(tclDTraceDebugLog, " %.*s():%n", \ + (_t < 18 ? 18 - _t : 0) + 18, __func__, &_l); _t += _l; \ + fprintf(tclDTraceDebugLog, "%*s" p "%n", \ + (_t < 40 ? 40 - _t : 0) + 2 * tclDTraceDebugIndent, \ + "", &_l); _t += _l; \ + fprintf(tclDTraceDebugLog, "%*s" m "\n", \ + (_t < 64 ? 64 - _t : 1), "", ##__VA_ARGS__); \ + fflush(tclDTraceDebugLog); \ + } \ + } while (0) #define TCL_DTRACE_PROC_ENTRY_ENABLED() 1 #define TCL_DTRACE_PROC_RETURN_ENABLED() 1 @@ -1536,9 +1566,11 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, int *argsi); #define TCL_DTRACE_TCL_PROBE_ENABLED() 1 #define TCL_DTRACE_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ - tclDTraceDebugEnabled = 1; \ + do { \ + tclDTraceDebugEnabled = 1; \ TclDTraceDbgMsg(" | tcl-probe", "%s %s %s %s %s %s %s %s %s %s", a0, \ - a1, a2, a3, a4, a5, a6, a7, a8, a9) + a1, a2, a3, a4, a5, a6, a7, a8, a9); \ + } while (0) #endif /* TCL_DTRACE_DEBUG */ -- cgit v0.12 From 98fb386a75b36633c9e4df45415e296bf62ec42f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 25 Feb 2010 22:20:10 +0000 Subject: [ tcl-Feature Requests-2958832 ] Further speed-up of ouster-hash function. Eliminate various unnecessary (ClientData) type casts. --- ChangeLog | 13 ++++ generic/tclCkalloc.c | 6 +- generic/tclHash.c | 14 ++-- generic/tclLiteral.c | 16 +++-- generic/tclObj.c | 15 ++-- generic/tclTest.c | 158 +++++++++++++++++++++---------------------- generic/tclTestObj.c | 16 ++--- generic/tclTestProcBodyObj.c | 4 +- unix/tclUnixTest.c | 22 +++--- unix/tclUnixTime.c | 4 +- unix/tclXtTest.c | 4 +- 11 files changed, 147 insertions(+), 125 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9db0b5..db2e2c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2010-02-25 Jan Nijtmans + + * generic/tclHash.c [ tcl-Feature Requests-2958832 ] Further + * generic/tclLiteral.c speed-up of ouster-hash function. + * generic/tclObj.c + * generic/tclCkalloc.c Eliminate various unnecessary (ClientData) + * generic/tclTest.c type casts. + * generic/tclTestObj.c + * generic/tclTestProcBodyObj.c + * unix/tclUnixTest.c + * unix/tclUnixTime.c + * unix/tclXtTest.c + 2010-02-24 Donal K. Fellows * generic/tclDictObj.c (SetDictFromAny): Prevent the list<->dict diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 9d9343f..70aead9 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -14,7 +14,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.37 2009/09/29 05:03:46 dgp Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.38 2010/02/25 22:20:10 nijtmans Exp $ */ #include "tclInt.h" @@ -1010,8 +1010,8 @@ Tcl_InitMemory( * added */ { TclInitDbCkalloc(); - Tcl_CreateCommand(interp, "memory", MemoryCmd, (ClientData) NULL, NULL); - Tcl_CreateCommand(interp, "checkmem", CheckmemCmd, (ClientData) 0, NULL); + Tcl_CreateCommand(interp, "memory", MemoryCmd, NULL, NULL); + Tcl_CreateCommand(interp, "checkmem", CheckmemCmd, NULL, NULL); } diff --git a/generic/tclHash.c b/generic/tclHash.c index a7d6b40..7647db0 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclHash.c,v 1.44 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.45 2010/02/25 22:20:10 nijtmans Exp $ */ #include "tclInt.h" @@ -871,8 +871,8 @@ HashStringKey( Tcl_HashTable *tablePtr, /* Hash table. */ void *keyPtr) /* Key from which to compute hash value. */ { - register const char *string = (const char *) keyPtr; - register unsigned int result = 0; + register const char *string = keyPtr; + register unsigned int result; register char c; /* @@ -903,10 +903,14 @@ HashStringKey( * * See also HashString in tclLiteral.c. * See also TclObjHashKey in tclObj.c. + * + * See [tcl-Feature Request #2958832] */ - for (; (c=*string++) != 0 ;) { - result += (result<<3) + UCHAR(c); + if ((result = UCHAR(*string)) != 0) { + while ((c = *++string) != 0) { + result += (result << 3) + UCHAR(c); + } } return result; } diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index bcf2bd8..a456627 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.41 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.42 2010/02/25 22:20:10 nijtmans Exp $ */ #include "tclInt.h" @@ -33,7 +33,7 @@ static int AddLocalLiteralEntry(CompileEnv *envPtr, Tcl_Obj *objPtr, int localHash); static void ExpandLocalLiteralArray(CompileEnv *envPtr); -static unsigned HashString(const char *bytes, int length); +static unsigned HashString(const char *string, int length); static void RebuildLiteralTable(LiteralTable *tablePtr); /* @@ -891,11 +891,10 @@ TclReleaseLiteral( static unsigned HashString( - register const char *bytes, /* String for which to compute hash value. */ + register const char *string, /* String for which to compute hash value. */ int length) /* Number of bytes in the string. */ { register unsigned int result = 0; - register int i; /* * I tried a zillion different hash functions and asked many other people @@ -923,10 +922,15 @@ HashString( * * See also HashStringKey in tclHash.c. * See also TclObjHashKey in tclObj.c. + * + * See [tcl-Feature Request #2958832] */ - for (i=0; i 0) { + result = UCHAR(*string); + while (--length) { + result += (result << 3) + UCHAR(*++string); + } } return result; } diff --git a/generic/tclObj.c b/generic/tclObj.c index 05bba4d..8123213 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.170 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.171 2010/02/25 22:20:10 nijtmans Exp $ */ #include "tclInt.h" @@ -4037,9 +4037,9 @@ TclHashObjKey( void *keyPtr) /* Key from which to compute hash value. */ { Tcl_Obj *objPtr = keyPtr; - const char *string = TclGetString(objPtr); + int length; + const char *string = TclGetStringFromObj(objPtr, &length); unsigned int result = 0; - const char *end = string + objPtr->length; /* * I tried a zillion different hash functions and asked many other people @@ -4071,10 +4071,15 @@ TclHashObjKey( * * See also HashStringKey in tclHash.c. * See also HashString in tclLiteral.c. + * + * See [tcl-Feature Request #2958832] */ - while (string < end) { - result += (result << 3) + UCHAR(*string++); + if (length > 0) { + result = UCHAR(*string); + while (--length) { + result += (result << 3) + UCHAR(*++string); + } } return result; } diff --git a/generic/tclTest.c b/generic/tclTest.c index 1eca77d..5b035fe 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.146 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.147 2010/02/25 22:20:10 nijtmans Exp $ */ #undef STATIC_BUILD @@ -170,11 +170,11 @@ static void CmdTraceDeleteProc( ClientData clientData, Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *cmdProc, ClientData cmdClientData, int argc, - char **argv); + const char *argv[]); static void CmdTraceProc(ClientData clientData, Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *cmdProc, ClientData cmdClientData, - int argc, char **argv); + int argc, const char *argv[]); static int CreatedCommandProc( ClientData clientData, Tcl_Interp *interp, int argc, const char **argv); @@ -552,132 +552,132 @@ Tcltest_Init( * Create additional commands and math functions for testing Tcl. */ - Tcl_CreateCommand(interp, "gettimes", GetTimesCmd, (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "noop", NoopCmd, (ClientData) 0, NULL); - Tcl_CreateObjCommand(interp, "noop", NoopObjCmd, (ClientData) 0, NULL); + Tcl_CreateCommand(interp, "gettimes", GetTimesCmd, NULL, NULL); + Tcl_CreateCommand(interp, "noop", NoopCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "noop", NoopObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testwrongnumargs", TestWrongNumArgsObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testfilesystem", TestFilesystemObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testsimplefilesystem", TestSimpleFilesystemObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testgetindexfromobjstruct", - TestGetIndexFromObjStructObjCmd, (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testasync", TestasyncCmd, (ClientData) 0, NULL); + TestGetIndexFromObjStructObjCmd, NULL, NULL); + Tcl_CreateCommand(interp, "testasync", TestasyncCmd, NULL, NULL); Tcl_CreateCommand(interp, "testchannel", TestChannelCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testchannelevent", TestChannelEventCmd, - (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testcmdtoken", TestcmdtokenCmd, (ClientData) 0, + NULL, NULL); + Tcl_CreateCommand(interp, "testcmdtoken", TestcmdtokenCmd, NULL, NULL); - Tcl_CreateCommand(interp, "testcmdinfo", TestcmdinfoCmd, (ClientData) 0, + Tcl_CreateCommand(interp, "testcmdinfo", TestcmdinfoCmd, NULL, NULL); Tcl_CreateCommand(interp, "testcmdtrace", TestcmdtraceCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testconcatobj", TestconcatobjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testcreatecommand", TestcreatecommandCmd, - (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testdcall", TestdcallCmd, (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testdel", TestdelCmd, (ClientData) 0, NULL); + NULL, NULL); + Tcl_CreateCommand(interp, "testdcall", TestdcallCmd, NULL, NULL); + Tcl_CreateCommand(interp, "testdel", TestdelCmd, NULL, NULL); Tcl_CreateCommand(interp, "testdelassocdata", TestdelassocdataCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_DStringInit(&dstring); - Tcl_CreateCommand(interp, "testdstring", TestdstringCmd, (ClientData) 0, + Tcl_CreateCommand(interp, "testdstring", TestdstringCmd, NULL, NULL); - Tcl_CreateObjCommand(interp, "testencoding", TestencodingObjCmd, (ClientData) 0, + Tcl_CreateObjCommand(interp, "testencoding", TestencodingObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testevalex", TestevalexObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testevalobjv", TestevalobjvObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testevent", TesteventObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testexithandler", TestexithandlerCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testexprlong", TestexprlongCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testexprlongobj", TestexprlongobjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testexprdouble", TestexprdoubleCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testexprdoubleobj", TestexprdoubleobjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testexprparser", TestexprparserObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testexprstring", TestexprstringCmd, - (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testfevent", TestfeventCmd, (ClientData) 0, + NULL, NULL); + Tcl_CreateCommand(interp, "testfevent", TestfeventCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testfilelink", TestfilelinkCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testfile", TestfileCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testhashsystemhash", - TestHashSystemHashCmd, (ClientData) 0, NULL); + TestHashSystemHashCmd, NULL, NULL); Tcl_CreateCommand(interp, "testgetassocdata", TestgetassocdataCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testgetint", TestgetintCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testgetplatform", TestgetplatformCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testgetvarfullname", - TestgetvarfullnameCmd, (ClientData) 0, NULL); + TestgetvarfullnameCmd, NULL, NULL); Tcl_CreateCommand(interp, "testinterpdelete", TestinterpdeleteCmd, - (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testlink", TestlinkCmd, (ClientData) 0, NULL); - Tcl_CreateObjCommand(interp, "testlocale", TestlocaleCmd, (ClientData) 0, + NULL, NULL); + Tcl_CreateCommand(interp, "testlink", TestlinkCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testlocale", TestlocaleCmd, NULL, NULL); - Tcl_CreateCommand(interp, "testpanic", TestpanicCmd, (ClientData) 0, NULL); - Tcl_CreateObjCommand(interp, "testfinexit", TestfinexitObjCmd, (ClientData) 0, NULL); + Tcl_CreateCommand(interp, "testpanic", TestpanicCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testfinexit", TestfinexitObjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testparser", TestparserObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testparsevar", TestparsevarObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testparsevarname", TestparsevarnameObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testregexp", TestregexpObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testreturn", TestreturnObjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testsaveresult", TestsaveresultCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testsetassocdata", TestsetassocdataCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testsetnoerr", TestsetCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testseterr", TestsetCmd, (ClientData) TCL_LEAVE_ERR_MSG, NULL); Tcl_CreateCommand(interp, "testset2", Testset2Cmd, (ClientData) TCL_LEAVE_ERR_MSG, NULL); Tcl_CreateCommand(interp, "testseterrorcode", TestseterrorcodeCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testsetobjerrorcode", - TestsetobjerrorcodeCmd, (ClientData) 0, NULL); + TestsetobjerrorcodeCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testnumutfchars", - TestNumUtfCharsCmd, (ClientData) 0, NULL); + TestNumUtfCharsCmd, NULL, NULL); Tcl_CreateCommand(interp, "testsetplatform", TestsetplatformCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "teststaticpkg", TeststaticpkgCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testtranslatefilename", - TesttranslatefilenameCmd, (ClientData) 0, NULL); - Tcl_CreateCommand(interp, "testupvar", TestupvarCmd, (ClientData) 0, NULL); + TesttranslatefilenameCmd, NULL, NULL); + Tcl_CreateCommand(interp, "testupvar", TestupvarCmd, NULL, NULL); Tcl_CreateMathFunc(interp, "T1", 0, NULL, TestMathFunc, (ClientData) 123); Tcl_CreateMathFunc(interp, "T2", 0, NULL, TestMathFunc, (ClientData) 345); - Tcl_CreateCommand(interp, "testmainthread", TestmainthreadCmd, (ClientData) 0, + Tcl_CreateCommand(interp, "testmainthread", TestmainthreadCmd, NULL, NULL); Tcl_CreateCommand(interp, "testsetmainloop", TestsetmainloopCmd, - (ClientData) NULL, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testexitmainloop", TestexitmainloopCmd, - (ClientData) NULL, NULL); + NULL, NULL); t3ArgTypes[0] = TCL_EITHER; t3ArgTypes[1] = TCL_EITHER; Tcl_CreateMathFunc(interp, "T3", 2, t3ArgTypes, TestMathFunc2, - (ClientData) 0); + NULL); Tcl_CreateObjCommand(interp, "testnrelevels", TestNRELevels, - (ClientData) NULL, NULL); + NULL, NULL); if (TclObjTest_Init(interp) != TCL_OK) { return TCL_ERROR; @@ -1024,7 +1024,7 @@ TestcmdinfoCmd( info.proc = CmdProc2; info.clientData = (ClientData) "new_command_data"; info.objProc = NULL; - info.objClientData = (ClientData) NULL; + info.objClientData = NULL; info.deleteProc = CmdDelProc2; info.deleteData = (ClientData) "new_delete_data"; if (Tcl_SetCommandInfo(interp, argv[2], &info) == 0) { @@ -1182,8 +1182,7 @@ TestcmdtraceCmd( if (strcmp(argv[1], "tracetest") == 0) { Tcl_DStringInit(&buffer); - cmdTrace = Tcl_CreateTrace(interp, 50000, - (Tcl_CmdTraceProc *) CmdTraceProc, (ClientData) &buffer); + cmdTrace = Tcl_CreateTrace(interp, 50000, CmdTraceProc, &buffer); result = Tcl_Eval(interp, argv[2]); if (result == TCL_OK) { Tcl_ResetResult(interp); @@ -1199,14 +1198,13 @@ TestcmdtraceCmd( * TclExecuteByteCode. */ - cmdTrace = Tcl_CreateTrace(interp, 50000, - (Tcl_CmdTraceProc *) CmdTraceDeleteProc, (ClientData) NULL); + cmdTrace = Tcl_CreateTrace(interp, 50000, CmdTraceDeleteProc, NULL); Tcl_Eval(interp, argv[2]); } else if (strcmp(argv[1], "leveltest") == 0) { Interp *iPtr = (Interp *) interp; Tcl_DStringInit(&buffer); - cmdTrace = Tcl_CreateTrace(interp, iPtr->numLevels + 4, - (Tcl_CmdTraceProc *) CmdTraceProc, (ClientData) &buffer); + cmdTrace = Tcl_CreateTrace(interp, iPtr->numLevels + 4, CmdTraceProc, + &buffer); result = Tcl_Eval(interp, argv[2]); if (result == TCL_OK) { Tcl_ResetResult(interp); @@ -1237,10 +1235,8 @@ TestcmdtraceCmd( Tcl_Trace t1, t2; Tcl_DStringInit(&buffer); - t1 = Tcl_CreateTrace(interp, 1, - (Tcl_CmdTraceProc *) CmdTraceProc, (ClientData) &buffer); - t2 = Tcl_CreateTrace(interp, 50000, - (Tcl_CmdTraceProc *) CmdTraceProc, (ClientData) &buffer); + t1 = Tcl_CreateTrace(interp, 1, CmdTraceProc, &buffer); + t2 = Tcl_CreateTrace(interp, 50000, CmdTraceProc, &buffer); result = Tcl_Eval(interp, argv[2]); if (result == TCL_OK) { Tcl_ResetResult(interp); @@ -1270,7 +1266,7 @@ CmdTraceProc( ClientData cmdClientData, /* Client data associated with command * procedure. */ int argc, /* Number of arguments. */ - char **argv) /* Argument strings. */ + const char *argv[]) /* Argument strings. */ { Tcl_DString *bufPtr = (Tcl_DString *) clientData; int i; @@ -1295,7 +1291,7 @@ CmdTraceDeleteProc( ClientData cmdClientData, /* Client data associated with command * procedure. */ int argc, /* Number of arguments. */ - char **argv) /* Argument strings. */ + const char *argv[]) /* Argument strings. */ { /* * Remove ourselves to test whether calling Tcl_DeleteTrace within a trace @@ -1377,12 +1373,12 @@ TestcreatecommandCmd( } if (strcmp(argv[1], "create") == 0) { Tcl_CreateCommand(interp, "test_ns_basic::createdcommand", - CreatedCommandProc, (ClientData) NULL, NULL); + CreatedCommandProc, NULL, NULL); } else if (strcmp(argv[1], "delete") == 0) { Tcl_DeleteCommand(interp, "test_ns_basic::createdcommand"); } else if (strcmp(argv[1], "create2") == 0) { Tcl_CreateCommand(interp, "value:at:", - CreatedCommandProc2, (ClientData) NULL, NULL); + CreatedCommandProc2, NULL, NULL); } else if (strcmp(argv[1], "delete2") == 0) { Tcl_DeleteCommand(interp, "value:at:"); } else { diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index ec7b83b..1b33412 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.36 2009/11/19 21:17:36 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.37 2010/02/25 22:20:10 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -91,18 +91,18 @@ TclObjTest_Init( } Tcl_CreateObjCommand(interp, "testbignumobj", TestbignumobjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testbooleanobj", TestbooleanobjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testdoubleobj", TestdoubleobjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testintobj", TestintobjCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateObjCommand(interp, "testindexobj", TestindexobjCmd, - (ClientData) 0, NULL); - Tcl_CreateObjCommand(interp, "testobj", TestobjCmd, (ClientData) 0, NULL); + NULL, NULL); + Tcl_CreateObjCommand(interp, "testobj", TestobjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "teststringobj", TeststringobjCmd, - (ClientData) 0, NULL); + NULL, NULL); return TCL_OK; } diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index 2d5745e..2172869 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.10 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.11 2010/02/25 22:20:10 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -298,7 +298,7 @@ ProcBodyTestProcObjCmd( myobjv[3] = bodyObjPtr; myobjv[4] = NULL; - result = Tcl_ProcObjCmd((ClientData) NULL, interp, objc, myobjv); + result = Tcl_ProcObjCmd(NULL, interp, objc, myobjv); Tcl_DecrRefCount(bodyObjPtr); return result; diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index 05b1da9..e36e4a7 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.32 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.33 2010/02/25 22:20:10 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -107,23 +107,23 @@ TclplatformtestInit( Tcl_Interp *interp) /* Interpreter to add commands to. */ { Tcl_CreateCommand(interp, "testchmod", TestchmodCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testfilehandler", TestfilehandlerCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testfilewait", TestfilewaitCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testfindexecutable", TestfindexecutableCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testgetopenfile", TestgetopenfileCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testgetdefenc", TestgetdefencdirCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testsetdefenc", TestsetdefencdirCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testalarm", TestalarmCmd, - (ClientData) 0, NULL); + NULL, NULL); Tcl_CreateCommand(interp, "testgotsig", TestgotsigCmd, - (ClientData) 0, NULL); + NULL, NULL); return TCL_OK; } @@ -496,7 +496,7 @@ TestgetopenfileCmd( == TCL_ERROR) { return TCL_ERROR; } - if (filePtr == (ClientData) NULL) { + if (filePtr == NULL) { Tcl_AppendResult(interp, "Tcl_GetOpenFile succeeded but FILE * NULL!", NULL); return TCL_ERROR; diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index d3ec43e..e56d60c 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTime.c,v 1.36 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixTime.c,v 1.37 2010/02/25 22:20:10 nijtmans Exp $ */ #include "tclInt.h" @@ -639,7 +639,7 @@ SetTZIfNecessary(void) if (lastTZ == NULL || strcmp(lastTZ, newTZ)) { tzset(); if (lastTZ == NULL) { - Tcl_CreateExitHandler(CleanupMemory, (ClientData) NULL); + Tcl_CreateExitHandler(CleanupMemory, NULL); } else { Tcl_Free(lastTZ); } diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index 92f5b36..d4bef9e 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtTest.c,v 1.9 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclXtTest.c,v 1.10 2010/02/25 22:20:10 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -62,7 +62,7 @@ Tclxttest_Init( XtToolkitInitialize(); InitNotifier(); Tcl_CreateCommand(interp, "testeventloop", TesteventloopCmd, - (ClientData) 0, NULL); + NULL, NULL); return TCL_OK; } -- cgit v0.12 From a344ae3793c73dc106829db09c1fe1e43a588da6 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Feb 2010 23:39:50 +0000 Subject: Squelch some warnings --- win/tclWinDde.c | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 40c44b7..6fc902d 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.40 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.41 2010/02/25 23:39:50 dkf Exp $ */ #undef STATIC_BUILD @@ -53,7 +53,7 @@ typedef struct Conversation { /* The next conversation in the list. */ RegisteredInterp *riPtr; /* The info we know about the conversation. */ HCONV hConv; /* The DDE handle for this conversation. */ - Tcl_Obj *returnPackagePtr; /* The result package for this conversation. */ + Tcl_Obj *returnPackagePtr; /* The result package for this conversation */ } Conversation; typedef struct DdeEnumServices { @@ -98,7 +98,8 @@ TCL_DECLARE_MUTEX(ddeMutex) static LRESULT CALLBACK DdeClientWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static int DdeCreateClient(struct DdeEnumServices *es); -static BOOL CALLBACK DdeEnumWindowsCallback(HWND hwndTarget, LPARAM lParam); +static BOOL CALLBACK DdeEnumWindowsCallback(HWND hwndTarget, + LPARAM lParam); static void DdeExitProc(ClientData clientData); static int DdeGetServicesList(Tcl_Interp *interp, const char *serviceName, const char *topicName); @@ -110,10 +111,9 @@ static LRESULT DdeServicesOnAck(HWND hwnd, WPARAM wParam, static void DeleteProc(ClientData clientData); static Tcl_Obj * ExecuteRemoteObject(RegisteredInterp *riPtr, Tcl_Obj *ddeObjectPtr); -static int MakeDdeConnection(Tcl_Interp *interp, const char *name, - HCONV *ddeConvPtr); +static int MakeDdeConnection(Tcl_Interp *interp, + const char *name, HCONV *ddeConvPtr); static void SetDdeError(Tcl_Interp *interp); - static int DdeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -360,7 +360,7 @@ DdeSetServerName( Tcl_DStringAppend(&dString, name, -1); Tcl_DStringAppend(&dString, " #", 2); offset = Tcl_DStringLength(&dString); - Tcl_DStringSetLength(&dString, offset + TCL_INTEGER_SPACE); + Tcl_DStringSetLength(&dString, offset+TCL_INTEGER_SPACE); actualName = Tcl_DStringValue(&dString); } sprintf(Tcl_DStringValue(&dString) + offset, "%d", suffix); @@ -543,7 +543,8 @@ ExecuteRemoteObject( Tcl_Obj *cmdPtr = Tcl_DuplicateObj(riPtr->handlerPtr); - result = Tcl_ListObjAppendElement(riPtr->interp, cmdPtr, ddeObjectPtr); + result = Tcl_ListObjAppendElement(riPtr->interp, cmdPtr, + ddeObjectPtr); if (result == TCL_OK) { ddeObjectPtr = cmdPtr; } @@ -598,7 +599,7 @@ static HDDEDATA CALLBACK DdeServerProc( UINT uType, /* The type of DDE transaction we are * performing. */ - UINT uFmt, /* The format that data is sent or received. */ + UINT uFmt, /* The format that data is sent or received */ HCONV hConv, /* The conversation associated with the * current transaction. */ HSZ ddeTopic, HSZ ddeItem, /* String handles. Transaction-type @@ -889,7 +890,7 @@ MakeDdeConnection( HCONV ddeConv; ddeService = DdeCreateStringHandle(ddeInstance, TCL_DDE_SERVICE_NAME, 0); - ddeTopic = DdeCreateStringHandle(ddeInstance, name, 0); + ddeTopic = DdeCreateStringHandle(ddeInstance, (void *) name, 0); ddeConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL); DdeFreeStringHandle(ddeInstance, ddeService); @@ -1300,8 +1301,8 @@ DdeObjCmd( int dummy; firstArg = 2; - if (Tcl_GetIndexFromObj(NULL, objv[2], ddeExecOptions, "option", 0, - &dummy) == TCL_OK) { + if (Tcl_GetIndexFromObj(NULL, objv[2], ddeExecOptions, "option", + 0, &dummy) == TCL_OK) { if (objc < 5) { goto wrongDdeEvalArgs; } @@ -1323,7 +1324,7 @@ DdeObjCmd( if (length == 0) { serviceName = NULL; } else if ((index != DDE_SERVERNAME) && (index != DDE_EVAL)) { - ddeService = DdeCreateStringHandle(ddeInstance, serviceName, + ddeService = DdeCreateStringHandle(ddeInstance, (void *) serviceName, CP_WINANSI); } @@ -1332,14 +1333,15 @@ DdeObjCmd( if (length == 0) { topicName = NULL; } else { - ddeTopic = DdeCreateStringHandle(ddeInstance, topicName, + ddeTopic = DdeCreateStringHandle(ddeInstance, (void *) topicName, CP_WINANSI); } } switch ((enum DdeSubcommands) index) { case DDE_SERVERNAME: - serviceName = DdeSetServerName(interp, serviceName, exact, handlerPtr); + serviceName = DdeSetServerName(interp, serviceName, exact, + handlerPtr); if (serviceName != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj(serviceName, -1)); } else { @@ -1391,7 +1393,8 @@ DdeObjCmd( break; } case DDE_REQUEST: { - const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); + const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], + &length); if (length == 0) { Tcl_SetObjResult(interp, @@ -1408,7 +1411,7 @@ DdeObjCmd( result = TCL_ERROR; } else { Tcl_Obj *returnObjPtr; - ddeItem = DdeCreateStringHandle(ddeInstance, itemString, + ddeItem = DdeCreateStringHandle(ddeInstance, (void *) itemString, CP_WINANSI); if (ddeItem != NULL) { ddeData = DdeClientTransaction(NULL, 0, hConv, ddeItem, @@ -1424,7 +1427,7 @@ DdeObjCmd( returnObjPtr = Tcl_NewByteArrayObj(dataString, (int) tmp); } else { - returnObjPtr = Tcl_NewStringObj((char *)dataString, -1); + returnObjPtr = Tcl_NewStringObj((char*)dataString,-1); } DdeUnaccessData(ddeData); DdeFreeDataHandle(ddeData); @@ -1439,7 +1442,8 @@ DdeObjCmd( break; } case DDE_POKE: { - const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], &length); + const char *itemString = Tcl_GetStringFromObj(objv[firstArg + 2], + &length); BYTE *dataString; if (length == 0) { @@ -1448,7 +1452,8 @@ DdeObjCmd( result = TCL_ERROR; goto cleanup; } - dataString = (BYTE *) Tcl_GetStringFromObj(objv[firstArg + 3], &length); + dataString = (BYTE *) Tcl_GetStringFromObj(objv[firstArg + 3], + &length); hConv = DdeConnect(ddeInstance, ddeService, ddeTopic, NULL); DdeFreeStringHandle(ddeInstance, ddeService); @@ -1458,7 +1463,7 @@ DdeObjCmd( SetDdeError(interp); result = TCL_ERROR; } else { - ddeItem = DdeCreateStringHandle(ddeInstance, itemString, + ddeItem = DdeCreateStringHandle(ddeInstance, (void *) itemString, CP_WINANSI); if (ddeItem != NULL) { ddeData = DdeClientTransaction(dataString, (DWORD) length+1, -- cgit v0.12 From 85c76436fded17c553a0f921bf68497af3adef0f Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 26 Feb 2010 00:39:29 +0000 Subject: [Bug 2818131] further tests added to cover use of mismatched zlib algorithms Using zlib gzip to write and inflate to read from a channel where gets was also used for reading data was causing a crash. This has been fixed by Andreas' last commit. --- ChangeLog | 6 +++++ tests/zlib.test | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index db2e2c4..b4d08ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-26 Pat Thoyts + + * tests/zlib.test: Add tests for [Bug 2818131] which was crashing + with mismatched zlib algorithms used in combination with + gets. This issue has been fixed by Andreas last commit. + 2010-02-25 Jan Nijtmans * generic/tclHash.c [ tcl-Feature Requests-2958832 ] Further diff --git a/tests/zlib.test b/tests/zlib.test index 4903df4..6159e65 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: zlib.test,v 1.11 2009/07/10 17:37:19 patthoyts Exp $ +# RCS: @(#) $Id: zlib.test,v 1.12 2010/02/26 00:39:29 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -458,7 +458,7 @@ test zlib-9.11 "bug #2818131 (deflate mismatch)" -constraints zlib -setup { rename bgerror {} } -result {error {incorrect header check}} -test zlib-10.1 "bug #2818131 (close with null interp)" -constraints { +test zlib-10.0 "bug #2818131 (close with null interp)" -constraints { zlib } -setup { proc bgerror {s} {set ::total [list error $s]} @@ -497,6 +497,80 @@ test zlib-10.1 "bug #2818131 (close with null interp)" -constraints { rename bgerror {} } -returnCodes error \ -result {bad event name "xyzzy": must be readable or writable} +test zlib-10.1 "bug #2818131 (mismatch read)" -constraints { + zlib +} -setup { + proc bgerror {s} {set ::total [list error $s]} + proc zlibRead {c} { + set d [read $c] + if {[eof $c]} { + chan event $c readable {} + close $c + set ::total [list eof [string length $d]] + } + } + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push inflate $c + chan event $c readable [list zlibRead $c] + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + chan configure $s -translation binary -buffering none + zlib push gzip $s + chan event $s readable [list zlibRead $s] + after idle [list apply {{s} { + puts $s test + chan close $s + after 100 {set ::total done} + }} $s] + vwait ::total + set ::total +} -cleanup { + close $srv + rename bgerror {} + rename zlibRead {} +} -result {error {invalid block type}} +test zlib-10.2 "bug #2818131 (mismatch gets)" -constraints { + zlib +} -setup { + proc bgerror {s} {set ::total [list error $s]} + proc zlibRead {c} { + if {[gets $c line] < 0} { + close $c + set ::total [list error -1] + } elseif {[eof $c]} { + chan event $c readable {} + close $c + set ::total [list eof 0] + } + } + set srv [socket -myaddr localhost -server {apply {{c a p} { + chan configure $c -translation binary -buffering none + zlib push inflate $c + chan event $c readable [list zlibRead $c] + }}} 0] +} -body { + lassign [chan configure $srv -sockname] addr name port + after 1000 {set ::total timeout} + set s [socket $addr $port] + chan configure $s -translation binary -buffering none + zlib push gzip $s + chan event $s readable [list zlibRead $s] + after idle [list apply {{s} { + puts $s test + chan close $s + after 100 {set ::total done} + }} $s] + vwait ::total + set ::total +} -cleanup { + close $srv + rename bgerror {} + rename zlibRead {} +} -result {error {invalid block type}} ::tcltest::cleanupTests return -- cgit v0.12 From 3434566a605bb11e0f5a78d6f3996ede7f728e68 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 26 Feb 2010 10:25:35 +0000 Subject: Remap non-alphanumeric sequences in manpage filenames to single underscores. --- ChangeLog | 31 ++++++++++++++++++------------- unix/installManPage | 7 ++++--- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4d08ce..cec1c2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,21 +1,26 @@ +2010-02-26 Donal K. Fellows + + * unix/installManPage: Remap non-alphanumeric sequences in filenames + to single underscores (especially colons). + 2010-02-26 Pat Thoyts - * tests/zlib.test: Add tests for [Bug 2818131] which was crashing - with mismatched zlib algorithms used in combination with - gets. This issue has been fixed by Andreas last commit. + * tests/zlib.test: Add tests for [Bug 2818131] which was crashing with + mismatched zlib algorithms used in combination with gets. This issue + has been fixed by Andreas's last commit. 2010-02-25 Jan Nijtmans - * generic/tclHash.c [ tcl-Feature Requests-2958832 ] Further - * generic/tclLiteral.c speed-up of ouster-hash function. - * generic/tclObj.c - * generic/tclCkalloc.c Eliminate various unnecessary (ClientData) - * generic/tclTest.c type casts. - * generic/tclTestObj.c - * generic/tclTestProcBodyObj.c - * unix/tclUnixTest.c - * unix/tclUnixTime.c - * unix/tclXtTest.c + * generic/tclHash.c: [FRQ 2958832]: Further speed-up of the + * generic/tclLiteral.c: ouster-hash function. + * generic/tclObj.c: + * generic/tclCkalloc.c: Eliminate various unnecessary (ClientData) + * generic/tclTest.c: type casts. + * generic/tclTestObj.c: + * generic/tclTestProcBodyObj.c: + * unix/tclUnixTest.c: + * unix/tclUnixTime.c: + * unix/tclXtTest.c: 2010-02-24 Donal K. Fellows diff --git a/unix/installManPage b/unix/installManPage index 6bdccf0..4d615bf 100755 --- a/unix/installManPage +++ b/unix/installManPage @@ -59,9 +59,7 @@ test -z "$SymOrLoc" && SymOrLoc="$Dir/" # backticks which doesn't pass backslashes literally. # Names=`sed -n ' -# Look for a line, that starts with .SH NAME -# optionally allow NAME to be surrounded -# by quotes. +# Look for a line that starts with .SH NAME /^\.SH NAME/{ # Read next line n @@ -71,6 +69,9 @@ Names=`sed -n ' s/\\\ //g # Delete from \- to the end of line s/ \\\-.*// +# Convert all non-space non-alphanum sequences +# to single underscores. + s/[^ A-Za-z0-9][^ A-Za-z0-9]*/_/g # print the result and exit p;q }' $ManPage` -- cgit v0.12 From 1c859b9a446ac6321e095bef4dcba93cdeae5602 Mon Sep 17 00:00:00 2001 From: rmax Date: Fri, 26 Feb 2010 10:32:40 +0000 Subject: Cleanup doc/safe.n --- ChangeLog | 6 ++++++ doc/safe.n | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index cec1c2c..dd710eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-26 Reinhard Max + + * doc/safe.n: Name the installed file after the command it + documents. Use "Safe Tcl" instead of the "Safe Base", "Safe Tcl" + mixture. + 2010-02-26 Donal K. Fellows * unix/installManPage: Remap non-alphanumeric sequences in filenames diff --git a/doc/safe.n b/doc/safe.n index 4adf283..7ec1cef 100644 --- a/doc/safe.n +++ b/doc/safe.n @@ -4,14 +4,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: safe.n,v 1.13 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: safe.n,v 1.14 2010/02/26 10:32:40 rmax Exp $ '\" .so man.macros .TH "Safe Tcl" n 8.0 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -Safe\ Base \- A mechanism for creating and manipulating safe interpreters +safe \- Creating and manipulating safe interpreters .SH SYNOPSIS \fB::safe::interpCreate\fR ?\fIslave\fR? ?\fIoptions...\fR? .sp @@ -38,15 +38,15 @@ Safe Tcl is a mechanism for executing untrusted Tcl scripts safely and for providing mediated access by such scripts to potentially dangerous functionality. .PP -The Safe Base ensures that untrusted Tcl scripts cannot harm the +Safe Tcl ensures that untrusted Tcl scripts cannot harm the hosting application. -The Safe Base prevents integrity and privacy attacks. Untrusted Tcl +It prevents integrity and privacy attacks. Untrusted Tcl scripts are prevented from corrupting the state of the hosting application or computer. Untrusted scripts are also prevented from disclosing information stored on the hosting computer or in the hosting application to any party. .PP -The Safe Base allows a master interpreter to create safe, restricted +Safe Tcl allows a master interpreter to create safe, restricted interpreters that contain a set of predefined aliases for the \fBsource\fR, \fBload\fR, \fBfile\fR, \fBencoding\fR, and \fBexit\fR commands and are able to use the auto-loading and package mechanisms. @@ -61,7 +61,7 @@ requested operation (see the section \fBSECURITY\fR below for details). Different levels of security can be selected by using the optional flags of the commands described below. .PP -All commands provided in the master interpreter by the Safe Base reside in +All commands provided in the master interpreter by Safe Tcl reside in the \fBsafe\fR namespace. .SH COMMANDS The following commands are provided in the master interpreter: @@ -263,13 +263,13 @@ the system encoding, but allows all other subcommands including The calling interpreter is deleted and its computation is stopped, but the Tcl process in which this interpreter exists is not terminated. .SH SECURITY -The Safe Base does not attempt to completely prevent annoyance and +Safe Tcl does not attempt to completely prevent annoyance and denial of service attacks. These forms of attack prevent the application or user from temporarily using the computer to perform useful work, for example by consuming all available CPU time or all available screen real estate. These attacks, while aggravating, are deemed to be of lesser importance -in general than integrity and privacy attacks that the Safe Base +in general than integrity and privacy attacks that Safe Tcl is to prevent. .PP The commands available in a safe interpreter, in addition to -- cgit v0.12 From 43489532dea0636fb88a85b2b5fa8097b27166da Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 26 Feb 2010 11:05:22 +0000 Subject: * unix/Makefile.in (NATIVE_TCLSH): Added this variable to allow for better control of what tclsh to use for various scripts when doing cross compiling. An imperfect solution, but works. --- ChangeLog | 4 ++++ unix/Makefile.in | 62 ++++++++++++++++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd710eb..7cd85c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,10 @@ 2010-02-26 Donal K. Fellows + * unix/Makefile.in (NATIVE_TCLSH): Added this variable to allow for + better control of what tclsh to use for various scripts when doing + cross compiling. An imperfect solution, but works. + * unix/installManPage: Remap non-alphanumeric sequences in filenames to single underscores (especially colons). diff --git a/unix/Makefile.in b/unix/Makefile.in index 0c356a6..1cf2c71 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.290 2010/02/22 23:31:41 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.291 2010/02/26 11:05:22 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -160,13 +160,14 @@ INSTALL_PROGRAM = ${INSTALL} INSTALL_LIBRARY = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 -# TCL_EXE is the name of a tclsh executable that is available *BEFORE* running -# make for the first time. Certain build targets (make genstubs) need it to be -# available on the PATH. This executable should *NOT* be required just to do a -# normal build although it can be required to run make dist. +# NATIVE_TCLSH is the name of a tclsh executable that is available *BEFORE* +# running make for the first time. Certain build targets (make genstubs) need +# it to be available on the PATH. This executable should *NOT* be required +# just to do a normal build although it can be required to run make dist. EXE_SUFFIX = @EXEEXT@ TCL_EXE = tclsh${EXE_SUFFIX} TCLTEST_EXE = tcltest${EXE_SUFFIX} +NATIVE_TCLSH = ./${TCL_EXE} # The symbols below provide support for dynamic loading and shared libraries. # See configure.in for a description of what the symbols mean. The values of @@ -625,6 +626,9 @@ ${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o ${TCL_EXE} +${NATIVE_TCLSH}: + @: + Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in $(SHELL) config.status #tclConfig.h: $(UNIX_DIR)/tclConfig.h.in @@ -865,18 +869,18 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs "$(SCRIPT_INSTALL_DIR)"/tm.tcl; \ fi -install-tzdata: ${TCL_EXE} +install-tzdata: ${NATIVE_TCLSH} @echo "Installing time zone data" @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./${TCL_EXE} $(TOOL_DIR)/installData.tcl \ + ${NATIVE_TCLSH} $(TOOL_DIR)/installData.tcl \ $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata -install-msgs: ${TCL_EXE} +install-msgs: ${NATIVE_TCLSH} @echo "Installing message catalogs" @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./${TCL_EXE} $(TOOL_DIR)/installData.tcl \ + ${NATIVE_TCLSH} $(TOOL_DIR)/installData.tcl \ $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs install-doc: doc @@ -1629,12 +1633,12 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c # Bundled Package targets #-------------------------------------------------------------------------- -# propagate configure args like --enable-64bit to package configure +# Propagate configure args like --enable-64bit to package configure PKG_CFG_ARGS = @PKG_CFG_ARGS@ -# if PKG_DIR is changed to a different relative depth to the build dir, -# need to adapt the ../.. relative paths below and at the top of configure.in -# (cannot use absolute paths due to issues in nested configure when path to -# build dir contains spaces). +# If PKG_DIR is changed to a different relative depth to the build dir, need +# to adapt the ../.. relative paths below and at the top of configure.in (we +# cannot use absolute paths due to issues in nested configure when path to +# build dir contains spaces). PKG_DIR = ./pkgs configure-packages: @@ -1758,7 +1762,7 @@ gendate: # run (and the results checked) after updating to a new release of libtommath. gentommath_h: - $(TCL_EXE) "$(TOOL_DIR)/fix_tommath_h.tcl" \ + $(NATIVE_TCLSH) "$(TOOL_DIR)/fix_tommath_h.tcl" \ "$(TOMMATH_DIR)/tommath.h" \ > "$(GENERIC_DIR)/tclTomMath.h" @@ -1778,10 +1782,10 @@ $(GENERIC_DIR)/tclOOStubInit.c: $(GENERIC_DIR)/tclOO.decls @echo "This warning can be safely ignored, do not report as a bug!" genstubs: - $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ + $(NATIVE_TCLSH) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ $(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls \ $(GENERIC_DIR)/tclTomMath.decls - $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ + $(NATIVE_TCLSH) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ $(GENERIC_DIR)/tclOO.decls # @@ -1872,7 +1876,7 @@ $(MAC_OSX_DIR)/configure: $(MAC_OSX_DIR)/configure.ac $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in: $(MAC_OSX_DIR)/configure cd $(MAC_OSX_DIR); autoheader; touch $@ -dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(MAC_OSX_DIR)/configure genstubs dist-packages +dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(MAC_OSX_DIR)/configure genstubs dist-packages ${NATIVE_TCLSH} rm -rf $(DISTDIR) mkdir -p $(DISTDIR)/unix cp -p $(UNIX_DIR)/*.[ch] $(DISTDIR)/unix @@ -1937,17 +1941,17 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(M cp -p $(TOP_DIR)/win/*.[ch] $(TOP_DIR)/win/*.ico $(TOP_DIR)/win/*.rc \ $(DISTDIR)/win cp -p $(TOP_DIR)/win/*.bat $(DISTDIR)/win - $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/*.bat + $(NATIVE_TCLSH) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/*.bat cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win - $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/makefile.* + $(NATIVE_TCLSH) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/makefile.* cp -p $(TOP_DIR)/win/rules.vc $(DISTDIR)/win - $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/rules.vc + $(NATIVE_TCLSH) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/rules.vc cp -p $(TOP_DIR)/win/coffbase.txt $(DISTDIR)/win - $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/coffbase.txt + $(NATIVE_TCLSH) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/coffbase.txt cp -p $(TOP_DIR)/win/tcl.hpj.in $(DISTDIR)/win - $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/tcl.hpj.in + $(NATIVE_TCLSH) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/tcl.hpj.in cp -p $(TOP_DIR)/win/tcl.ds* $(DISTDIR)/win - $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/tcl.ds* + $(NATIVE_TCLSH) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/tcl.ds* cp -p $(TOP_DIR)/win/README $(DISTDIR)/win cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win mkdir $(DISTDIR)/macosx @@ -1975,7 +1979,7 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in $(M $(TOOL_DIR)/tcl.wse.in $(TOOL_DIR)/*.bmp \ $(TOOL_DIR)/tcl.hpj.in \ $(DISTDIR)/tools - $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/tools/tcl.hpj.in \ + $(NATIVE_TCLSH) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/tools/tcl.hpj.in \ $(DISTDIR)/tools/tcl.wse.in mkdir $(DISTDIR)/libtommath cp -p $(TOMMATH_SRCS) $(TOMMATH_DIR)/*.h \ @@ -2025,20 +2029,20 @@ allpatch: dist # to function on those of the Tcl/Tk maintainers. #-------------------------------------------------------------------------- -html: ${TCL_EXE} +html: ${NATIVE_TCLSH} $(BUILD_HTML) @EXTRA_BUILD_HTML@ -html-tcl: ${TCL_EXE} +html-tcl: ${NATIVE_TCLSH} $(BUILD_HTML) --tcl @EXTRA_BUILD_HTML@ -html-tk: ${TCL_EXE} +html-tk: ${NATIVE_TCLSH} $(BUILD_HTML) --tk @EXTRA_BUILD_HTML@ BUILD_HTML = \ @@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./${TCL_EXE} $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ + ${NATIVE_TCLSH} $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \ --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS) #-------------------------------------------------------------------------- -- cgit v0.12 From 42d4d24dbd5e820e6f3e0d50b3a619ee6dc0f8d7 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 26 Feb 2010 14:38:35 +0000 Subject: Split tclCompCmds.c into two pieces to improve developer sanity. --- ChangeLog | 11 +- generic/tclCompCmds.c | 4274 ++++++----------------------------------------- generic/tclCompCmdsSZ.c | 3499 ++++++++++++++++++++++++++++++++++++++ unix/Makefile.in | 12 +- win/Makefile.in | 3 +- win/makefile.bc | 1 + win/makefile.vc | 3 +- 7 files changed, 4074 insertions(+), 3729 deletions(-) create mode 100644 generic/tclCompCmdsSZ.c diff --git a/ChangeLog b/ChangeLog index 7cd85c8..7be6e8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ +2010-02-26 Donal K. Fellows + + * generic/tclCompCmds.c: Split this file into two pieces to make it + * generic/tclCompCmdsSZ.c: easier to work with. It's still two very + long files even after the split. + 2010-02-26 Reinhard Max - * doc/safe.n: Name the installed file after the command it - documents. Use "Safe Tcl" instead of the "Safe Base", "Safe Tcl" - mixture. + * doc/safe.n: Name the installed file after the command it documents. + Use "Safe Tcl" instead of the "Safe Base", "Safe Tcl" mixture. 2010-02-26 Donal K. Fellows diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 280ab5e..3a564ff 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.166 2010/02/25 10:56:16 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.167 2010/02/26 14:38:36 dkf Exp $ */ #include "tclInt.h" @@ -32,54 +32,16 @@ static void FreeForeachInfo(ClientData clientData); static void PrintForeachInfo(ClientData clientData, Tcl_Obj *appendObj, ByteCode *codePtr, unsigned int pcOffset); -static ClientData DupJumptableInfo(ClientData clientData); -static void FreeJumptableInfo(ClientData clientData); -static void PrintJumptableInfo(ClientData clientData, - Tcl_Obj *appendObj, ByteCode *codePtr, - unsigned int pcOffset); +static void CompileReturnInternal(CompileEnv *envPtr, + unsigned char op, int code, int level, + Tcl_Obj *returnOpts); +static int IndexTailVarIfKnown(Tcl_Interp *interp, + Tcl_Token *varTokenPtr, CompileEnv *envPtr); static int PushVarName(Tcl_Interp *interp, Tcl_Token *varTokenPtr, CompileEnv *envPtr, int flags, int *localIndexPtr, int *simpleVarNamePtr, int *isScalarPtr, int line, int *clNext); -static int CompileAssociativeBinaryOpCmd(Tcl_Interp *interp, - Tcl_Parse *parsePtr, const char *identity, - int instruction, CompileEnv *envPtr); -static int CompileComparisonOpCmd(Tcl_Interp *interp, - Tcl_Parse *parsePtr, int instruction, - CompileEnv *envPtr); -static int CompileStrictlyBinaryOpCmd(Tcl_Interp *interp, - Tcl_Parse *parsePtr, int instruction, - CompileEnv *envPtr); -static int CompileUnaryOpCmd(Tcl_Interp *interp, - Tcl_Parse *parsePtr, int instruction, - CompileEnv *envPtr); -static void CompileReturnInternal(CompileEnv *envPtr, - unsigned char op, int code, int level, - Tcl_Obj *returnOpts); -static void IssueSwitchChainedTests(Tcl_Interp *interp, - CompileEnv *envPtr, ExtCmdLoc *mapPtr, - int eclIndex, int mode, int noCase, - int valueIndex, Tcl_Token *valueTokenPtr, - int numWords, Tcl_Token **bodyToken, - int *bodyLines, int **bodyNext); -static void IssueSwitchJumpTable(Tcl_Interp *interp, - CompileEnv *envPtr, ExtCmdLoc *mapPtr, - int eclIndex, int valueIndex, - Tcl_Token *valueTokenPtr, int numWords, - Tcl_Token **bodyToken, int *bodyLines, - int **bodyContLines); -static int IssueTryFinallyInstructions(Tcl_Interp *interp, - CompileEnv *envPtr, Tcl_Token *bodyToken, - int numHandlers, int *matchCodes, - Tcl_Obj **matchClauses, int *resultVarIndices, - int *optionVarIndices, Tcl_Token **handlerTokens, - Tcl_Token *finallyToken); -static int IssueTryInstructions(Tcl_Interp *interp, - CompileEnv *envPtr, Tcl_Token *bodyToken, - int numHandlers, int *matchCodes, - Tcl_Obj **matchClauses, int *resultVarIndices, - int *optionVarIndices, Tcl_Token **handlerTokens); /* * Macro that encapsulates an efficiency trick that avoids a function call for @@ -139,13 +101,6 @@ const AuxDataType tclForeachInfoType = { PrintForeachInfo /* printProc */ }; -const AuxDataType tclJumptableInfoType = { - "JumptableInfo", /* name */ - DupJumptableInfo, /* dupProc */ - FreeJumptableInfo, /* freeProc */ - PrintJumptableInfo /* printProc */ -}; - const AuxDataType tclDictUpdateInfoType = { "DictUpdateInfo", /* name */ DupDictUpdateInfo, /* dupProc */ @@ -2026,6 +1981,81 @@ PrintForeachInfo( /* *---------------------------------------------------------------------- * + * TclCompileGlobalCmd -- + * + * Procedure called to compile the "global" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "global" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileGlobalCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *varTokenPtr; + int localIndex, numWords, i; + DefineLineInformation; /* TIP #280 */ + + numWords = parsePtr->numWords; + if (numWords < 2) { + return TCL_ERROR; + } + + /* + * 'global' has no effect outside of proc bodies; handle that at runtime + */ + + if (envPtr->procPtr == NULL) { + return TCL_ERROR; + } + + /* + * Push the namespace + */ + + PushLiteral(envPtr, "::", 2); + + /* + * Loop over the variables. + */ + + varTokenPtr = TokenAfter(parsePtr->tokenPtr); + for (i=2; i<=numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) { + localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); + + if (localIndex < 0) { + return TCL_ERROR; + } + + CompileWord(envPtr, varTokenPtr, interp, 1); + TclEmitInstInt4(INST_NSUPVAR, localIndex, envPtr); + } + + /* + * Pop the namespace, and set the result to empty + */ + + TclEmitOpcode(INST_POP, envPtr); + PushLiteral(envPtr, "", 0); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclCompileIfCmd -- * * Procedure called to compile the "if" command. @@ -2462,6 +2492,78 @@ TclCompileIncrCmd( /* *---------------------------------------------------------------------- * + * TclCompileInfoExistsCmd -- + * + * Procedure called to compile the "info exists" subcommand. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "info exists" + * subcommand at runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileInfoExistsCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *tokenPtr; + int isScalar, simpleVarName, localIndex; + DefineLineInformation; /* TIP #280 */ + + if (parsePtr->numWords != 2) { + return TCL_ERROR; + } + + /* + * Decide if we can use a frame slot for the var/array name or if we need + * to emit code to compute and push the name at runtime. We use a frame + * slot (entry in the array of local vars) if we are compiling a procedure + * body and if the name is simple text that does not include namespace + * qualifiers. + */ + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + PushVarNameWord(interp, tokenPtr, envPtr, 0, &localIndex, + &simpleVarName, &isScalar, 1); + + /* + * Emit instruction to check the variable for existence. + */ + + if (simpleVarName) { + if (isScalar) { + if (localIndex < 0) { + TclEmitOpcode(INST_EXIST_STK, envPtr); + } else { + TclEmitInstInt4(INST_EXIST_SCALAR, localIndex, envPtr); + } + } else { + if (localIndex < 0) { + TclEmitOpcode(INST_EXIST_ARRAY_STK, envPtr); + } else { + TclEmitInstInt4(INST_EXIST_ARRAY, localIndex, envPtr); + } + } + } else { + TclEmitOpcode(INST_EXIST_STK, envPtr); + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclCompileLappendCmd -- * * Procedure called to compile the "lappend" command. @@ -3066,6 +3168,98 @@ TclCompileLsetCmd( /* *---------------------------------------------------------------------- * + * TclCompileNamespaceCmd -- + * + * Procedure called to compile the "namespace" command; currently, only + * the subcommand "namespace upvar" is compiled to bytecodes. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "namespace upvar" + * command at runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileNamespaceCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr; + int simpleVarName, isScalar, localIndex, numWords, i; + DefineLineInformation; /* TIP #280 */ + + if (envPtr->procPtr == NULL) { + return TCL_ERROR; + } + + /* + * Only compile [namespace upvar ...]: needs an odd number of args, >=5 + */ + + numWords = parsePtr->numWords; + if (!(numWords%2) || (numWords < 5)) { + return TCL_ERROR; + } + + /* + * Check if the second argument is "upvar" + */ + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + if ((tokenPtr->size != 5) /* 5 == strlen("upvar") */ + || strncmp(tokenPtr->start, "upvar", 5)) { + return TCL_ERROR; + } + + /* + * Push the namespace + */ + + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 1); + + /* + * Loop over the (otherVar, thisVar) pairs. If any of the thisVar is not a + * local variable, return an error so that the non-compiled command will + * be called at runtime. + */ + + localTokenPtr = tokenPtr; + for (i=4; i<=numWords; i+=2) { + otherTokenPtr = TokenAfter(localTokenPtr); + localTokenPtr = TokenAfter(otherTokenPtr); + + CompileWord(envPtr, otherTokenPtr, interp, 1); + PushVarNameWord(interp, localTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); + + if ((localIndex < 0) || !isScalar) { + return TCL_ERROR; + } + TclEmitInstInt4(INST_NSUPVAR, localIndex, envPtr); + } + + /* + * Pop the namespace, and set the result to empty + */ + + TclEmitOpcode(INST_POP, envPtr); + PushLiteral(envPtr, "", 0); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclCompileRegexpCmd -- * * Procedure called to compile the "regexp" command. @@ -3425,23 +3619,23 @@ TclCompileSyntaxError( /* *---------------------------------------------------------------------- * - * TclCompileSetCmd -- + * TclCompileUpvarCmd -- * - * Procedure called to compile the "set" command. + * Procedure called to compile the "upvar" command. * * Results: * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer * evaluation to runtime. * * Side effects: - * Instructions are added to envPtr to execute the "set" command at + * Instructions are added to envPtr to execute the "upvar" command at * runtime. * *---------------------------------------------------------------------- */ int -TclCompileSetCmd( +TclCompileUpvarCmd( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ @@ -3449,200 +3643,108 @@ TclCompileSetCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { - Tcl_Token *varTokenPtr, *valueTokenPtr; - int isAssignment, isScalar, simpleVarName, localIndex, numWords; - DefineLineInformation; /* TIP #280 */ + Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr; + int simpleVarName, isScalar, localIndex, numWords, i; + DefineLineInformation; /* TIP #280 */ + Tcl_Obj *objPtr = Tcl_NewObj(); + + if (envPtr->procPtr == NULL) { + Tcl_DecrRefCount(objPtr); + return TCL_ERROR; + } numWords = parsePtr->numWords; - if ((numWords != 2) && (numWords != 3)) { + if (numWords < 3) { + Tcl_DecrRefCount(objPtr); return TCL_ERROR; } - isAssignment = (numWords == 3); /* - * Decide if we can use a frame slot for the var/array name or if we need - * to emit code to compute and push the name at runtime. We use a frame - * slot (entry in the array of local vars) if we are compiling a procedure - * body and if the name is simple text that does not include namespace - * qualifiers. + * Push the frame index if it is known at compile time */ - varTokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarNameWord(interp, varTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); - - /* - * If we are doing an assignment, push the new value. - */ + tokenPtr = TokenAfter(parsePtr->tokenPtr); + if (TclWordKnownAtCompileTime(tokenPtr, objPtr)) { + CallFrame *framePtr; + const Tcl_ObjType *newTypePtr, *typePtr = objPtr->typePtr; - if (isAssignment) { - valueTokenPtr = TokenAfter(varTokenPtr); - CompileWord(envPtr, valueTokenPtr, interp, 2); - } + /* + * Attempt to convert to a level reference. Note that TclObjGetFrame + * only changes the obj type when a conversion was successful. + */ - /* - * Emit instructions to set/get the variable. - */ + TclObjGetFrame(interp, objPtr, &framePtr); + newTypePtr = objPtr->typePtr; + Tcl_DecrRefCount(objPtr); - if (simpleVarName) { - if (isScalar) { - if (localIndex < 0) { - TclEmitOpcode((isAssignment? - INST_STORE_SCALAR_STK : INST_LOAD_SCALAR_STK), - envPtr); - } else if (localIndex <= 255) { - TclEmitInstInt1((isAssignment? - INST_STORE_SCALAR1 : INST_LOAD_SCALAR1), - localIndex, envPtr); - } else { - TclEmitInstInt4((isAssignment? - INST_STORE_SCALAR4 : INST_LOAD_SCALAR4), - localIndex, envPtr); + if (newTypePtr != typePtr) { + if (numWords%2) { + return TCL_ERROR; } + CompileWord(envPtr, tokenPtr, interp, 1); + otherTokenPtr = TokenAfter(tokenPtr); + i = 4; } else { - if (localIndex < 0) { - TclEmitOpcode((isAssignment? - INST_STORE_ARRAY_STK : INST_LOAD_ARRAY_STK), envPtr); - } else if (localIndex <= 255) { - TclEmitInstInt1((isAssignment? - INST_STORE_ARRAY1 : INST_LOAD_ARRAY1), - localIndex, envPtr); - } else { - TclEmitInstInt4((isAssignment? - INST_STORE_ARRAY4 : INST_LOAD_ARRAY4), - localIndex, envPtr); + if (!(numWords%2)) { + return TCL_ERROR; } + PushLiteral(envPtr, "1", 1); + otherTokenPtr = tokenPtr; + i = 3; } } else { - TclEmitOpcode((isAssignment? INST_STORE_STK : INST_LOAD_STK), envPtr); - } - - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileStringCmpCmd -- - * - * Procedure called to compile the simplest and most common form of the - * "string compare" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "string compare" - * command at runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileStringCmpCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - DefineLineInformation; /* TIP #280 */ - Tcl_Token *tokenPtr; - - /* - * We don't support any flags; the bytecode isn't that sophisticated. - */ - - if (parsePtr->numWords != 3) { + Tcl_DecrRefCount(objPtr); return TCL_ERROR; } /* - * Push the two operands onto the stack and then the test. + * Loop over the (otherVar, thisVar) pairs. If any of the thisVar is not a + * local variable, return an error so that the non-compiled command will + * be called at runtime. */ - tokenPtr = TokenAfter(parsePtr->tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 1); - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 2); - TclEmitOpcode(INST_STR_CMP, envPtr); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileStringEqualCmd -- - * - * Procedure called to compile the simplest and most common form of the - * "string equal" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "string equal" command - * at runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileStringEqualCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - DefineLineInformation; /* TIP #280 */ - Tcl_Token *tokenPtr; + for (; i<=numWords; i+=2, otherTokenPtr = TokenAfter(localTokenPtr)) { + localTokenPtr = TokenAfter(otherTokenPtr); - /* - * We don't support any flags; the bytecode isn't that sophisticated. - */ + CompileWord(envPtr, otherTokenPtr, interp, 1); + PushVarNameWord(interp, localTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); - if (parsePtr->numWords != 3) { - return TCL_ERROR; + if ((localIndex < 0) || !isScalar) { + return TCL_ERROR; + } + TclEmitInstInt4(INST_UPVAR, localIndex, envPtr); } /* - * Push the two operands onto the stack and then the test. + * Pop the frame index, and set the result to empty */ - tokenPtr = TokenAfter(parsePtr->tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 1); - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 2); - TclEmitOpcode(INST_STR_EQ, envPtr); + TclEmitOpcode(INST_POP, envPtr); + PushLiteral(envPtr, "", 0); return TCL_OK; } /* *---------------------------------------------------------------------- * - * TclCompileStringIndexCmd -- + * TclCompileVariableCmd -- * - * Procedure called to compile the simplest and most common form of the - * "string index" command. + * Procedure called to compile the "variable" command. * * Results: * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer * evaluation to runtime. * * Side effects: - * Instructions are added to envPtr to execute the "string index" command - * at runtime. + * Instructions are added to envPtr to execute the "variable" command at + * runtime. * *---------------------------------------------------------------------- */ int -TclCompileStringIndexCmd( +TclCompileVariableCmd( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ @@ -3650,3661 +3752,393 @@ TclCompileStringIndexCmd( * compiled. */ CompileEnv *envPtr) /* Holds resulting instructions. */ { + Tcl_Token *varTokenPtr, *valueTokenPtr; + int localIndex, numWords, i; DefineLineInformation; /* TIP #280 */ - Tcl_Token *tokenPtr; - if (parsePtr->numWords != 3) { + numWords = parsePtr->numWords; + if (numWords < 2) { return TCL_ERROR; } /* - * Push the two operands onto the stack and then the index operation. + * Bail out if not compiling a proc body */ - tokenPtr = TokenAfter(parsePtr->tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 1); - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 2); - TclEmitOpcode(INST_STR_INDEX, envPtr); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileStringMatchCmd -- - * - * Procedure called to compile the simplest and most common form of the - * "string match" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "string match" command - * at runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileStringMatchCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - DefineLineInformation; /* TIP #280 */ - Tcl_Token *tokenPtr; - int i, length, exactMatch = 0, nocase = 0; - const char *str; - - if (parsePtr->numWords < 3 || parsePtr->numWords > 4) { + if (envPtr->procPtr == NULL) { return TCL_ERROR; } - tokenPtr = TokenAfter(parsePtr->tokenPtr); /* - * Check if we have a -nocase flag. + * Loop over the (var, value) pairs. */ - if (parsePtr->numWords == 4) { - if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { - return TCL_ERROR; - } - str = tokenPtr[1].start; - length = tokenPtr[1].size; - if ((length <= 1) || strncmp(str, "-nocase", (size_t) length)) { - /* - * Fail at run time, not in compilation. - */ + valueTokenPtr = parsePtr->tokenPtr; + for (i=2; i<=numWords; i+=2) { + varTokenPtr = TokenAfter(valueTokenPtr); + valueTokenPtr = TokenAfter(varTokenPtr); + + localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); + if (localIndex < 0) { return TCL_ERROR; } - nocase = 1; - tokenPtr = TokenAfter(tokenPtr); - } - /* - * Push the strings to match against each other. - */ - - for (i = 0; i < 2; i++) { - if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { - str = tokenPtr[1].start; - length = tokenPtr[1].size; - if (!nocase && (i == 0)) { - /* - * Trivial matches can be done by 'string equal'. If -nocase - * was specified, we can't do this because INST_STR_EQ has no - * support for nocase. - */ + CompileWord(envPtr, varTokenPtr, interp, 1); + TclEmitInstInt4(INST_VARIABLE, localIndex, envPtr); - Tcl_Obj *copy = Tcl_NewStringObj(str, length); + if (i != numWords) { + /* + * A value has been given: set the variable, pop the value + */ - Tcl_IncrRefCount(copy); - exactMatch = TclMatchIsTrivial(TclGetString(copy)); - TclDecrRefCount(copy); - } - PushLiteral(envPtr, str, length); - } else { - SetLineInformation(i+1+nocase); - CompileTokens(envPtr, tokenPtr, interp); + CompileWord(envPtr, valueTokenPtr, interp, 1); + TclEmitInstInt4(INST_STORE_SCALAR4, localIndex, envPtr); + TclEmitOpcode(INST_POP, envPtr); } - tokenPtr = TokenAfter(tokenPtr); } /* - * Push the matcher. + * Set the result to empty */ - if (exactMatch) { - TclEmitOpcode(INST_STR_EQ, envPtr); - } else { - TclEmitInstInt1(INST_STR_MATCH, nocase, envPtr); - } + PushLiteral(envPtr, "", 0); return TCL_OK; } /* *---------------------------------------------------------------------- * - * TclCompileStringLenCmd -- + * IndexTailVarIfKnown -- * - * Procedure called to compile the simplest and most common form of the - * "string length" command. + * Procedure used in compiling [global] and [variable] commands. It + * inspects the variable name described by varTokenPtr and, if the tail + * is known at compile time, defines a corresponding local variable. * * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. + * Returns the variable's index in the table of compiled locals if the + * tail is known at compile time, or -1 otherwise. * * Side effects: - * Instructions are added to envPtr to execute the "string length" - * command at runtime. + * None. * *---------------------------------------------------------------------- */ -int -TclCompileStringLenCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ +static int +IndexTailVarIfKnown( + Tcl_Interp *interp, + Tcl_Token *varTokenPtr, /* Token representing the variable name */ CompileEnv *envPtr) /* Holds resulting instructions. */ { - DefineLineInformation; /* TIP #280 */ - Tcl_Token *tokenPtr; - Tcl_Obj *objPtr; - - if (parsePtr->numWords != 2) { - return TCL_ERROR; - } - - tokenPtr = TokenAfter(parsePtr->tokenPtr); - TclNewObj(objPtr); - if (TclWordKnownAtCompileTime(tokenPtr, objPtr)) { - /* - * Here someone is asking for the length of a static string (or - * something with backslashes). Just push the actual character (not - * byte) length. - */ - - char buf[TCL_INTEGER_SPACE]; - int len = Tcl_GetCharLength(objPtr); - - len = sprintf(buf, "%d", len); - PushLiteral(envPtr, buf, len); - } else { - SetLineInformation(1); - CompileTokens(envPtr, tokenPtr, interp); - TclEmitOpcode(INST_STR_LEN, envPtr); - } - TclDecrRefCount(objPtr); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileSubstCmd -- - * - * Procedure called to compile the "subst" command. - * - * Results: - * Returns TCL_OK for successful compile, or TCL_ERROR to defer - * evaluation to runtime (either when it is too complex to get the - * semantics right, or when we know for sure that it is an error but need - * the error to happen at the right time). - * - * Side effects: - * Instructions are added to envPtr to execute the "subst" command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileSubstCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - int numArgs = parsePtr->numWords - 1; - int numOpts = numArgs - 1; - int objc, flags = TCL_SUBST_ALL; - Tcl_Obj **objv/*, *toSubst = NULL*/; - Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); - int code = TCL_ERROR; - DefineLineInformation; /* TIP #280 */ - - if (numArgs == 0) { - return TCL_ERROR; - } - - objv = TclStackAlloc(interp, /*numArgs*/ numOpts * sizeof(Tcl_Obj *)); - - for (objc = 0; objc < /*numArgs*/ numOpts; objc++) { - objv[objc] = Tcl_NewObj(); - Tcl_IncrRefCount(objv[objc]); - if (!TclWordKnownAtCompileTime(wordTokenPtr, objv[objc])) { - objc++; - goto cleanup; - } - wordTokenPtr = TokenAfter(wordTokenPtr); - } - -/* - if (TclSubstOptions(NULL, numOpts, objv, &flags) == TCL_OK) { - toSubst = objv[numOpts]; - Tcl_IncrRefCount(toSubst); - } -*/ + Tcl_Obj *tailPtr; + const char *tailName, *p; + int len, n = varTokenPtr->numComponents; + Tcl_Token *lastTokenPtr; + int full, localIndex; - /* TODO: Figure out expansion to cover WordKnownAtCompileTime - * The difficulty is that WKACT makes a copy, and if TclSubstParse - * below parses the copy of the original source string, some deep - * parts of the compile machinery get upset. They want all pointers - * stored in Tcl_Tokens to point back to the same original string. + /* + * Determine if the tail is (a) known at compile time, and (b) not an + * array element. Should any of these fail, return an error so that the + * non-compiled command will be called at runtime. + * + * In order for the tail to be known at compile time, the last token in + * the word has to be constant and contain "::" if it is not the only one. */ - if (wordTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { - code = TclSubstOptions(NULL, numOpts, objv, &flags); - } - cleanup: - while (--objc >= 0) { - TclDecrRefCount(objv[objc]); - } - TclStackFree(interp, objv); - if (/*toSubst == NULL*/ code != TCL_OK) { - return TCL_ERROR; + if (!EnvHasLVT(envPtr)) { + return -1; } - SetLineInformation(numArgs); - TclSubstCompile(interp, wordTokenPtr[1].start, wordTokenPtr[1].size, - flags, mapPtr->loc[eclIndex].line[numArgs], envPtr); - -/* TclDecrRefCount(toSubst);*/ - return TCL_OK; -} - -void -TclSubstCompile( - Tcl_Interp *interp, - const char *bytes, - int numBytes, - int flags, - int line, - CompileEnv *envPtr) -{ - Tcl_Token *endTokenPtr, *tokenPtr; - int breakOffset = 0, count = 0, bline = line; - Tcl_Parse parse; - Tcl_InterpState state = NULL; - - TclSubstParse(interp, bytes, numBytes, flags, &parse, &state); - - for (tokenPtr = parse.tokenPtr, endTokenPtr = tokenPtr + parse.numTokens; - tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) { - int length, literal, catchRange, breakJump; - char buf[TCL_UTF_MAX]; - JumpFixup startFixup, okFixup, returnFixup, breakFixup; - JumpFixup continueFixup, otherFixup, endFixup; - - switch (tokenPtr->type) { - case TCL_TOKEN_TEXT: - literal = TclRegisterNewLiteral(envPtr, - tokenPtr->start, tokenPtr->size); - TclEmitPush(literal, envPtr); - TclAdvanceLines(&bline, tokenPtr->start, - tokenPtr->start + tokenPtr->size); - count++; - continue; - case TCL_TOKEN_BS: - length = Tcl_UtfBackslash(tokenPtr->start, NULL, buf); - literal = TclRegisterNewLiteral(envPtr, buf, length); - TclEmitPush(literal, envPtr); - count++; - continue; - } - - while (count > 255) { - TclEmitInstInt1(INST_CONCAT1, 255, envPtr); - count -= 254; - } - if (count > 1) { - TclEmitInstInt1(INST_CONCAT1, count, envPtr); - count = 1; - } - - if (breakOffset == 0) { - /* Jump to the start (jump over the jump to end) */ - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &startFixup); - - /* Jump to the end (all BREAKs land here) */ - breakOffset = CurrentOffset(envPtr); - TclEmitInstInt4(INST_JUMP4, 0, envPtr); - - /* Start */ - if (TclFixupForwardJumpToHere(envPtr, &startFixup, 127)) { - Tcl_Panic("TclCompileSubstCmd: bad start jump distance %d", - CurrentOffset(envPtr) - startFixup.codeOffset); - } - } - - envPtr->line = bline; - catchRange = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); - TclEmitInstInt4(INST_BEGIN_CATCH4, catchRange, envPtr); - ExceptionRangeStarts(envPtr, catchRange); - - switch (tokenPtr->type) { - case TCL_TOKEN_COMMAND: - TclCompileScript(interp, tokenPtr->start+1, tokenPtr->size-2, - envPtr); - count++; - break; - case TCL_TOKEN_VARIABLE: - TclCompileVarSubst(interp, tokenPtr, envPtr); - count++; - break; - default: - Tcl_Panic("unexpected token type in TclCompileSubstCmd: %d", - tokenPtr->type); - } - - ExceptionRangeEnds(envPtr, catchRange); - - /* Substitution produced TCL_OK */ - TclEmitOpcode(INST_END_CATCH, envPtr); - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &okFixup); - - /* Exceptional return codes processed here */ - ExceptionRangeTarget(envPtr, catchRange, catchOffset); - TclEmitOpcode(INST_PUSH_RETURN_OPTIONS, envPtr); - TclEmitOpcode(INST_PUSH_RESULT, envPtr); - TclEmitOpcode(INST_PUSH_RETURN_CODE, envPtr); - TclEmitOpcode(INST_END_CATCH, envPtr); - TclEmitOpcode(INST_RETURN_CODE_BRANCH, envPtr); - - /* ERROR -> reraise it */ - TclEmitOpcode(INST_RETURN_STK, envPtr); - TclEmitOpcode(INST_NOP, envPtr); - - /* RETURN */ - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &returnFixup); - - /* BREAK */ - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &breakFixup); - - /* CONTINUE */ - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &continueFixup); - - /* OTHER */ - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &otherFixup); - - /* BREAK destination */ - if (TclFixupForwardJumpToHere(envPtr, &breakFixup, 127)) { - Tcl_Panic("TclCompileSubstCmd: bad break jump distance %d", - CurrentOffset(envPtr) - breakFixup.codeOffset); + TclNewObj(tailPtr); + if (TclWordKnownAtCompileTime(varTokenPtr, tailPtr)) { + full = 1; + lastTokenPtr = varTokenPtr; + } else { + full = 0; + lastTokenPtr = varTokenPtr + n; + if (!TclWordKnownAtCompileTime(lastTokenPtr, tailPtr)) { + Tcl_DecrRefCount(tailPtr); + return -1; } - TclEmitOpcode(INST_POP, envPtr); - TclEmitOpcode(INST_POP, envPtr); + } - breakJump = CurrentOffset(envPtr) - breakOffset; - if (breakJump > 127) { - TclEmitInstInt4(INST_JUMP4, -breakJump, envPtr); - } else { - TclEmitInstInt1(INST_JUMP1, -breakJump, envPtr); - } + tailName = TclGetStringFromObj(tailPtr, &len); - /* CONTINUE destination */ - if (TclFixupForwardJumpToHere(envPtr, &continueFixup, 127)) { - Tcl_Panic("TclCompileSubstCmd: bad continue jump distance %d", - CurrentOffset(envPtr) - continueFixup.codeOffset); - } - TclEmitOpcode(INST_POP, envPtr); - TclEmitOpcode(INST_POP, envPtr); - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &endFixup); + if (len) { + if (*(tailName+len-1) == ')') { + /* + * Possible array: bail out + */ - /* RETURN + other destination */ - if (TclFixupForwardJumpToHere(envPtr, &returnFixup, 127)) { - Tcl_Panic("TclCompileSubstCmd: bad return jump distance %d", - CurrentOffset(envPtr) - returnFixup.codeOffset); - } - if (TclFixupForwardJumpToHere(envPtr, &otherFixup, 127)) { - Tcl_Panic("TclCompileSubstCmd: bad other jump distance %d", - CurrentOffset(envPtr) - otherFixup.codeOffset); + Tcl_DecrRefCount(tailPtr); + return -1; } - /* Pull the result to top of stack, discard options dict */ - TclEmitInstInt4(INST_REVERSE, 2, envPtr); - TclEmitOpcode(INST_POP, envPtr); /* - * We've emitted several POP instructions, and the automatic - * computations for stack depth requirements have been decrementing - * for every one. However, we know that every branch actually taken - * only encounters some of those instructions. No branch passes - * through them all. So, we now have a stack requirements estimate - * that is too low. Here we manually fix that up. + * Get the tail: immediately after the last '::' */ - TclAdjustStackDepth(5, envPtr); - /* OK destination */ - if (TclFixupForwardJumpToHere(envPtr, &okFixup, 127)) { - Tcl_Panic("TclCompileSubstCmd: bad ok jump distance %d", - CurrentOffset(envPtr) - okFixup.codeOffset); - } - if (count > 1) { - TclEmitInstInt1(INST_CONCAT1, count, envPtr); - count = 1; + for (p = tailName + len -1; p > tailName; p--) { + if ((*p == ':') && (*(p-1) == ':')) { + p++; + break; + } } + if (!full && (p == tailName)) { + /* + * No :: in the last component. + */ - /* CONTINUE jump to here */ - if (TclFixupForwardJumpToHere(envPtr, &endFixup, 127)) { - Tcl_Panic("TclCompileSubstCmd: bad end jump distance %d", - CurrentOffset(envPtr) - endFixup.codeOffset); + Tcl_DecrRefCount(tailPtr); + return -1; } - bline = envPtr->line; - } - - - while (count > 255) { - TclEmitInstInt1(INST_CONCAT1, 255, envPtr); - count -= 254; - } - if (count > 1) { - TclEmitInstInt1(INST_CONCAT1, count, envPtr); - } - - Tcl_FreeParse(&parse); - - if (state != NULL) { - Tcl_RestoreInterpState(interp, state); - TclCompileSyntaxError(interp, envPtr); + len -= p - tailName; + tailName = p; } - /* Final target of the multi-jump from all BREAKs */ - if (breakOffset > 0) { - TclUpdateInstInt4AtPc(INST_JUMP4, CurrentOffset(envPtr) - breakOffset, - envPtr->codeStart + breakOffset); - } + localIndex = TclFindCompiledLocal(tailName, len, 1, envPtr); + Tcl_DecrRefCount(tailPtr); + return localIndex; } /* *---------------------------------------------------------------------- * - * TclCompileSwitchCmd -- + * PushVarName -- * - * Procedure called to compile the "switch" command. + * Procedure used in the compiling where pushing a variable name is + * necessary (append, lappend, set). * * Results: - * Returns TCL_OK for successful compile, or TCL_ERROR to defer - * evaluation to runtime (either when it is too complex to get the - * semantics right, or when we know for sure that it is an error but need - * the error to happen at the right time). + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. * * Side effects: - * Instructions are added to envPtr to execute the "switch" command at + * Instructions are added to envPtr to execute the "set" command at * runtime. * - * FIXME: - * Stack depths are probably not calculated correctly. - * *---------------------------------------------------------------------- */ -int -TclCompileSwitchCmd( +static int +PushVarName( Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ + Tcl_Token *varTokenPtr, /* Points to a variable token. */ + CompileEnv *envPtr, /* Holds resulting instructions. */ + int flags, /* TCL_NO_LARGE_INDEX. */ + int *localIndexPtr, /* Must not be NULL. */ + int *simpleVarNamePtr, /* Must not be NULL. */ + int *isScalarPtr, /* Must not be NULL. */ + int line, /* Line the token starts on. */ + int *clNext) /* Reference to offset of next hidden cont. + * line. */ { - Tcl_Token *tokenPtr; /* Pointer to tokens in command. */ - int numWords; /* Number of words in command. */ - Tcl_Token *valueTokenPtr; /* Token for the value to switch on. */ - enum {Switch_Exact, Switch_Glob, Switch_Regexp} mode; - /* What kind of switch are we doing? */ - Tcl_Token *bodyTokenArray; /* Array of real pattern list items. */ - Tcl_Token **bodyToken; /* Array of pointers to pattern list items. */ - int *bodyLines; /* Array of line numbers for body list - * items. */ - int **bodyContLines; /* Array of continuation line info. */ - int noCase; /* Has the -nocase flag been given? */ - int foundMode = 0; /* Have we seen a mode flag yet? */ - int isListedArms = 0; - int i, valueIndex; - int result = TCL_ERROR; - DefineLineInformation; /* TIP #280 */ - int *clNext = envPtr->clNext; - - /* - * Only handle the following versions: - * switch ?--? word {pattern body ...} - * switch -exact ?--? word {pattern body ...} - * switch -glob ?--? word {pattern body ...} - * switch -regexp ?--? word {pattern body ...} - * switch -- word simpleWordPattern simpleWordBody ... - * switch -exact -- word simpleWordPattern simpleWordBody ... - * switch -glob -- word simpleWordPattern simpleWordBody ... - * switch -regexp -- word simpleWordPattern simpleWordBody ... - * When the mode is -glob, can also handle a -nocase flag. - * - * First off, we don't care how the command's word was generated; we're - * compiling it anyway! So skip it... - */ - - tokenPtr = TokenAfter(parsePtr->tokenPtr); - valueIndex = 1; - numWords = parsePtr->numWords-1; + register const char *p; + const char *name, *elName; + register int i, n; + Tcl_Token *elemTokenPtr = NULL; + int nameChars, elNameChars, simpleVarName, localIndex; + int elemTokenCount = 0, allocedTokens = 0, removedParen = 0; /* - * Check for options. + * Decide if we can use a frame slot for the var/array name or if we need + * to emit code to compute and push the name at runtime. We use a frame + * slot (entry in the array of local vars) if we are compiling a procedure + * body and if the name is simple text that does not include namespace + * qualifiers. */ - noCase = 0; - mode = Switch_Exact; - if (numWords == 2) { - /* - * There's just the switch value and the bodies list. In that case, we - * can skip all option parsing and move on to consider switch values - * and the body list. - */ - - goto finishedOptionParse; - } + simpleVarName = 0; + name = elName = NULL; + nameChars = elNameChars = 0; + localIndex = -1; /* - * There must be at least one option, --, because without that there is no - * way to statically avoid the problems you get from strings-to-be-matched - * that start with a - (the interpreted code falls apart if it encounters - * them, so we punt if we *might* encounter them as that is the easiest - * way of emulating the behaviour). + * Check not only that the type is TCL_TOKEN_SIMPLE_WORD, but whether + * curly braces surround the variable name. This really matters for array + * elements to handle things like + * set {x($foo)} 5 + * which raises an undefined var error if we are not careful here. */ - for (; numWords>=3 ; tokenPtr=TokenAfter(tokenPtr),numWords--) { - register unsigned size = tokenPtr[1].size; - register const char *chrs = tokenPtr[1].start; - + if ((varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) && + (varTokenPtr->start[0] != '{')) { /* - * We only process literal options, and we assume that -e, -g and -n - * are unique prefixes of -exact, -glob and -nocase respectively (true - * at time of writing). Note that -exact and -glob may only be given - * at most once or we bail out (error case). + * A simple variable name. Divide it up into "name" and "elName" + * strings. If it is not a local variable, look it up at runtime. */ - if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD || size < 2) { - return TCL_ERROR; - } + simpleVarName = 1; - if ((size <= 6) && !memcmp(chrs, "-exact", size)) { - if (foundMode) { - return TCL_ERROR; - } - mode = Switch_Exact; - foundMode = 1; - valueIndex++; - continue; - } else if ((size <= 5) && !memcmp(chrs, "-glob", size)) { - if (foundMode) { - return TCL_ERROR; - } - mode = Switch_Glob; - foundMode = 1; - valueIndex++; - continue; - } else if ((size <= 7) && !memcmp(chrs, "-regexp", size)) { - if (foundMode) { - return TCL_ERROR; + name = varTokenPtr[1].start; + nameChars = varTokenPtr[1].size; + if (name[nameChars-1] == ')') { + /* + * last char is ')' => potential array reference. + */ + + for (i=0,p=name ; itype != TCL_TOKEN_SIMPLE_WORD) { - return TCL_ERROR; - } - - Tcl_DStringInit(&bodyList); - Tcl_DStringAppend(&bodyList, tokenPtr[1].start, tokenPtr[1].size); - if (Tcl_SplitList(NULL, Tcl_DStringValue(&bodyList), &numWords, - &argv) != TCL_OK) { - Tcl_DStringFree(&bodyList); - return TCL_ERROR; - } - Tcl_DStringFree(&bodyList); - - /* - * Now we know what the switch arms are, we've got to see whether we - * can synthesize tokens for the arms. First check whether we've got a - * valid number of arms since we can do that now. - */ - - if (numWords == 0 || numWords % 2) { - ckfree((char *) argv); - return TCL_ERROR; - } - - isListedArms = 1; - bodyTokenArray = (Tcl_Token *) ckalloc(sizeof(Tcl_Token) * numWords); - bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); - bodyLines = (int *) ckalloc(sizeof(int) * numWords); - bodyContLines = (int **) ckalloc(sizeof(int*) * numWords); - - /* - * Locate the start of the arms within the overall word. - */ - - bline = mapPtr->loc[eclIndex].line[valueIndex+1]; - p = tokenStartPtr = tokenPtr[1].start; - while (isspace(UCHAR(*tokenStartPtr))) { - tokenStartPtr++; - } - if (*tokenStartPtr == '{') { - tokenStartPtr++; - isTokenBraced = 1; - } else { - isTokenBraced = 0; + elemTokenPtr = TclStackAlloc(interp, sizeof(Tcl_Token)); + allocedTokens = 1; + elemTokenPtr->type = TCL_TOKEN_TEXT; + elemTokenPtr->start = elName; + elemTokenPtr->size = elNameChars; + elemTokenPtr->numComponents = 0; + elemTokenCount = 1; + } } - + } else if (((n = varTokenPtr->numComponents) > 1) + && (varTokenPtr[1].type == TCL_TOKEN_TEXT) + && (varTokenPtr[n].type == TCL_TOKEN_TEXT) + && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) { /* - * TIP #280: Count lines within the literal list. + * Check for parentheses inside first token. */ - for (i=0 ; isource); - bodyLines[i] = bline; - bodyContLines[i] = clNext; - p = bodyTokenArray[i].start; - - while (isspace(UCHAR(*tokenStartPtr))) { - tokenStartPtr++; - if (tokenStartPtr >= tokenPtr[1].start+tokenPtr[1].size) { - break; - } - } - if (*tokenStartPtr == '{') { - tokenStartPtr++; - isTokenBraced = 1; + if (varTokenPtr[n].size == 1) { + --n; } else { - isTokenBraced = 0; + --varTokenPtr[n].size; + removedParen = n; } - } - ckfree((char *) argv); - /* - * Check that we've parsed everything we thought we were going to - * parse. If not, something odd is going on (I believe it is possible - * to defeat the code above) and we should bail out. - */ + name = varTokenPtr[1].start; + nameChars = p - varTokenPtr[1].start; + elName = p + 1; + remainingChars = (varTokenPtr[2].start - p) - 1; + elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 2; - if (tokenStartPtr != tokenPtr[1].start+tokenPtr[1].size) { - goto freeTemporaries; - } + if (remainingChars) { + /* + * Make a first token with the extra characters in the first + * token. + */ - } else if (numWords % 2 || numWords == 0) { - /* - * Odd number of words (>1) available, or no words at all available. - * Both are error cases, so punt and let the interpreted-version - * generate the error message. Note that the second case probably - * should get caught earlier, but it's easy to check here again anyway - * because it'd cause a nasty crash otherwise. - */ + elemTokenPtr = TclStackAlloc(interp, n * sizeof(Tcl_Token)); + allocedTokens = 1; + elemTokenPtr->type = TCL_TOKEN_TEXT; + elemTokenPtr->start = elName; + elemTokenPtr->size = remainingChars; + elemTokenPtr->numComponents = 0; + elemTokenCount = n; - return TCL_ERROR; - } else { - /* - * Multi-word definition of patterns & actions. - */ + /* + * Copy the remaining tokens. + */ - bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); - bodyLines = (int *) ckalloc(sizeof(int) * numWords); - bodyContLines = (int **) ckalloc(sizeof(int*) * numWords); - bodyTokenArray = NULL; - for (i=0 ; itype != TCL_TOKEN_SIMPLE_WORD || - tokenPtr->numComponents != 1) { - goto freeTemporaries; + elemTokenPtr = &varTokenPtr[2]; + elemTokenCount = n - 1; } - bodyToken[i] = tokenPtr+1; - - /* - * TIP #280: Copy line information from regular cmd info. - */ - - bodyLines[i] = mapPtr->loc[eclIndex].line[valueIndex+1+i]; - bodyContLines[i] = mapPtr->loc[eclIndex].next[valueIndex+1+i]; - tokenPtr = TokenAfter(tokenPtr); } } - /* - * Fall back to interpreted if the last body is a continuation (it's - * illegal, but this makes the error happen at the right time). - */ - - if (bodyToken[numWords-1]->size == 1 && - bodyToken[numWords-1]->start[0] == '-') { - goto freeTemporaries; - } - - /* - * Now we commit to generating code; the parsing stage per se is done. - * Check if we can generate a jump table, since if so that's faster than - * doing an explicit compare with each body. Note that we're definitely - * over-conservative with determining whether we can do the jump table, - * but it handles the most common case well enough. - */ - - if ((isListedArms) && (mode == Switch_Exact) && (!noCase)) { - IssueSwitchJumpTable(interp, envPtr, mapPtr, eclIndex, valueIndex, - valueTokenPtr, numWords, bodyToken, bodyLines, bodyContLines); - } else { - IssueSwitchChainedTests(interp, envPtr, mapPtr, eclIndex, mode,noCase, - valueIndex, valueTokenPtr, numWords, bodyToken, bodyLines, - bodyContLines); - } - result = TCL_OK; - - /* - * Clean up all our temporary space and return. - */ - - freeTemporaries: - ckfree((char *) bodyToken); - ckfree((char *) bodyLines); - ckfree((char *) bodyContLines); - if (bodyTokenArray != NULL) { - ckfree((char *) bodyTokenArray); - } - return result; -} - -/* - *---------------------------------------------------------------------- - * - * IssueSwitchChainedTests -- - * - * Generate instructions for a [switch] command that is to be compiled - * into a sequence of tests. This is the generic handle-everything mode - * that inherently has performance that is (on average) linear in the - * number of tests. It is the only mode that can handle -glob and -regexp - * matches, or anything that is case-insensitive. It does not handle the - * wild-and-wooly end of regexp matching (i.e., capture of match results) - * so that's when we spill to the interpreted version. - * - *---------------------------------------------------------------------- - */ - -static void -IssueSwitchChainedTests( - Tcl_Interp *interp, /* Context for compiling script bodies. */ - CompileEnv *envPtr, /* Holds resulting instructions. */ - ExtCmdLoc *mapPtr, /* For mapping tokens to their source code - * location. */ - int eclIndex, - int mode, /* Exact, Glob or Regexp */ - int noCase, /* Case-insensitivity flag. */ - int valueIndex, /* The value to match against. */ - Tcl_Token *valueTokenPtr, - int numBodyTokens, /* Number of tokens describing things the - * switch can match against and bodies to - * execute when the match succeeds. */ - Tcl_Token **bodyToken, /* Array of pointers to pattern list items. */ - int *bodyLines, /* Array of line numbers for body list - * items. */ - int **bodyContLines) /* Array of continuation line info. */ -{ - enum {Switch_Exact, Switch_Glob, Switch_Regexp}; - int savedStackDepth = envPtr->currStackDepth; - int foundDefault; /* Flag to indicate whether a "default" clause - * is present. */ - JumpFixup *fixupArray; /* Array of forward-jump fixup records. */ - int *fixupTargetArray; /* Array of places for fixups to point at. */ - int fixupCount; /* Number of places to fix up. */ - int contFixIndex; /* Where the first of the jumps due to a group - * of continuation bodies starts, or -1 if - * there aren't any. */ - int contFixCount; /* Number of continuation bodies pointing to - * the current (or next) real body. */ - int nextArmFixupIndex; - int simple, exact; /* For extracting the type of regexp. */ - int i; - - /* - * First, we push the value we're matching against on the stack. - */ - - SetLineInformation(valueIndex); - CompileTokens(envPtr, valueTokenPtr, interp); - - /* - * Generate a test for each arm. - */ - - contFixIndex = -1; - contFixCount = 0; - fixupArray = TclStackAlloc(interp, sizeof(JumpFixup) * numBodyTokens); - fixupTargetArray = TclStackAlloc(interp, sizeof(int) * numBodyTokens); - memset(fixupTargetArray, 0, numBodyTokens * sizeof(int)); - fixupCount = 0; - foundDefault = 0; - for (i=0 ; icurrStackDepth = savedStackDepth + 1; - if (i!=numBodyTokens-2 || bodyToken[numBodyTokens-2]->size != 7 || - memcmp(bodyToken[numBodyTokens-2]->start, "default", 7)) { - /* - * Generate the test for the arm. - */ - - switch (mode) { - case Switch_Exact: - TclEmitOpcode(INST_DUP, envPtr); - TclCompileTokens(interp, bodyToken[i], 1, envPtr); - TclEmitOpcode(INST_STR_EQ, envPtr); - break; - case Switch_Glob: - TclCompileTokens(interp, bodyToken[i], 1, envPtr); - TclEmitInstInt4(INST_OVER, 1, envPtr); - TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); - break; - case Switch_Regexp: - simple = exact = 0; - - /* - * Keep in sync with TclCompileRegexpCmd. - */ - - if (bodyToken[i]->type == TCL_TOKEN_TEXT) { - Tcl_DString ds; - - if (bodyToken[i]->size == 0) { - /* - * The semantics of regexps are that they always match - * when the RE == "". - */ - - PushLiteral(envPtr, "1", 1); - break; - } + if (simpleVarName) { + /* + * See whether name has any namespace separators (::'s). + */ - /* - * Attempt to convert pattern to glob. If successful, push - * the converted pattern. - */ - - if (TclReToGlob(NULL, bodyToken[i]->start, - bodyToken[i]->size, &ds, &exact) == TCL_OK) { - simple = 1; - PushLiteral(envPtr, Tcl_DStringValue(&ds), - Tcl_DStringLength(&ds)); - Tcl_DStringFree(&ds); - } - } - if (!simple) { - TclCompileTokens(interp, bodyToken[i], 1, envPtr); - } + int hasNsQualifiers = 0; - TclEmitInstInt4(INST_OVER, 1, envPtr); - if (!simple) { - /* - * Pass correct RE compile flags. We use only Int1 - * (8-bit), but that handles all the flags we want to - * pass. Don't use TCL_REG_NOSUB as we may have backrefs - * or capture vars. - */ - - int cflags = TCL_REG_ADVANCED - | (noCase ? TCL_REG_NOCASE : 0); - - TclEmitInstInt1(INST_REGEXP, cflags, envPtr); - } else if (exact && !noCase) { - TclEmitOpcode(INST_STR_EQ, envPtr); - } else { - TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); - } + for (i = 0, p = name; i < nameChars; i++, p++) { + if ((*p == ':') && ((i+1) < nameChars) && (*(p+1) == ':')) { + hasNsQualifiers = 1; break; - default: - Tcl_Panic("unknown switch mode: %d", mode); - } - - /* - * In a fall-through case, we will jump on _true_ to the place - * where the body starts (generated later, with guarantee of this - * ensured earlier; the final body is never a fall-through). - */ - - if (bodyToken[i+1]->size==1 && bodyToken[i+1]->start[0]=='-') { - if (contFixIndex == -1) { - contFixIndex = fixupCount; - contFixCount = 0; - } - TclEmitForwardJump(envPtr, TCL_TRUE_JUMP, - &fixupArray[contFixIndex+contFixCount]); - fixupCount++; - contFixCount++; - continue; } - - TclEmitForwardJump(envPtr, TCL_FALSE_JUMP, - &fixupArray[fixupCount]); - nextArmFixupIndex = fixupCount; - fixupCount++; - } else { - /* - * Got a default clause; set a flag to inhibit the generation of - * the jump after the body and the cleanup of the intermediate - * value that we are switching against. - * - * Note that default clauses (which are always terminal clauses) - * cannot be fall-through clauses as well, since the last clause - * is never a fall-through clause (which we have already - * verified). - */ - - foundDefault = 1; } /* - * Generate the body for the arm. This is guaranteed not to be a - * fall-through case, but it might have preceding fall-through cases, - * so we must process those first. + * Look up the var name's index in the array of local vars in the proc + * frame. If retrieving the var's value and it doesn't already exist, + * push its name and look it up at runtime. */ - if (contFixIndex != -1) { - int j; + if (!hasNsQualifiers) { + localIndex = TclFindCompiledLocal(name, nameChars, + 1, envPtr); + if ((flags & TCL_NO_LARGE_INDEX) && (localIndex > 255)) { + /* + * We'll push the name. + */ - for (j=0 ; jcurrStackDepth = savedStackDepth + 1; - envPtr->line = bodyLines[i+1]; /* TIP #280 */ - envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */ - TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); - - if (!foundDefault) { - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, - &fixupArray[fixupCount]); - fixupCount++; - fixupTargetArray[nextArmFixupIndex] = CurrentOffset(envPtr); + if (elName != NULL) { + if (elNameChars) { + envPtr->line = line; + envPtr->clNext = clNext; + TclCompileTokens(interp, elemTokenPtr, elemTokenCount, + envPtr); + } else { + PushLiteral(envPtr, "", 0); + } } - } - - /* - * Discard the value we are matching against unless we've had a default - * clause (in which case it will already be gone due to the code at the - * start of processing an arm, guaranteed) and make the result of the - * command an empty string. - */ + } else { + /* + * The var name isn't simple: compile and push it. + */ - if (!foundDefault) { - TclEmitOpcode(INST_POP, envPtr); - PushLiteral(envPtr, "", 0); + envPtr->line = line; + envPtr->clNext = clNext; + CompileTokens(envPtr, varTokenPtr, interp); } - /* - * Do jump fixups for arms that were executed. First, fill in the jumps of - * all jumps that don't point elsewhere to point to here. - */ - - for (i=0 ; icodeNext-envPtr->codeStart; - } + if (removedParen) { + ++varTokenPtr[removedParen].size; } - - /* - * Now scan backwards over all the jumps (all of which are forward jumps) - * doing each one. When we do one and there is a size changes, we must - * scan back over all the previous ones and see if they need adjusting - * before proceeding with further jump fixups (the interleaved nature of - * all the jumps makes this impossible to do without nested loops). - */ - - for (i=fixupCount-1 ; i>=0 ; i--) { - if (TclFixupForwardJump(envPtr, &fixupArray[i], - fixupTargetArray[i] - fixupArray[i].codeOffset, 127)) { - int j; - - for (j=i-1 ; j>=0 ; j--) { - if (fixupTargetArray[j] > fixupArray[i].codeOffset) { - fixupTargetArray[j] += 3; - } - } - } + if (allocedTokens) { + TclStackFree(interp, elemTokenPtr); } - TclStackFree(interp, fixupTargetArray); - TclStackFree(interp, fixupArray); - - envPtr->currStackDepth = savedStackDepth + 1; -} - -/* - *---------------------------------------------------------------------- - * - * IssueSwitchJumpTable -- - * - * Generate instructions for a [switch] command that is to be compiled - * into a jump table. This only handles the case where case-sensitive, - * exact matching is used, but this is actually the most common case in - * real code. - * - *---------------------------------------------------------------------- - */ - -static void -IssueSwitchJumpTable( - Tcl_Interp *interp, /* Context for compiling script bodies. */ - CompileEnv *envPtr, /* Holds resulting instructions. */ - ExtCmdLoc *mapPtr, /* For mapping tokens to their source code - * location. */ - int eclIndex, - int valueIndex, /* The value to match against. */ - Tcl_Token *valueTokenPtr, - int numBodyTokens, /* Number of tokens describing things the - * switch can match against and bodies to - * execute when the match succeeds. */ - Tcl_Token **bodyToken, /* Array of pointers to pattern list items. */ - int *bodyLines, /* Array of line numbers for body list - * items. */ - int **bodyContLines) /* Array of continuation line info. */ -{ - JumptableInfo *jtPtr; - int infoIndex, isNew, *finalFixups, numRealBodies = 0, jumpLocation; - int mustGenerate, foundDefault, jumpToDefault, i; - Tcl_DString buffer; - Tcl_HashEntry *hPtr; - - /* - * First, we push the value we're matching against on the stack. - */ - - SetLineInformation(valueIndex); - CompileTokens(envPtr, valueTokenPtr, interp); - - /* - * Compile the switch by using a jump table, which is basically a - * hashtable that maps from literal values to match against to the offset - * (relative to the INST_JUMP_TABLE instruction) to jump to. The jump - * table itself is independent of any invokation of the bytecode, and as - * such is stored in an auxData block. - * - * Start by allocating the jump table itself, plus some workspace. - */ - - jtPtr = (JumptableInfo *) ckalloc(sizeof(JumptableInfo)); - Tcl_InitHashTable(&jtPtr->hashTable, TCL_STRING_KEYS); - infoIndex = TclCreateAuxData(jtPtr, &tclJumptableInfoType, envPtr); - finalFixups = TclStackAlloc(interp, sizeof(int) * (numBodyTokens/2)); - foundDefault = 0; - mustGenerate = 1; - - /* - * Next, issue the instruction to do the jump, together with what we want - * to do if things do not work out (jump to either the default clause or - * the "default" default, which just sets the result to empty). Note that - * we will come back and rewrite the jump's offset parameter when we know - * what it should be, and that all jumps we issue are of the wide kind - * because that makes the code much easier to debug! - */ - - jumpLocation = CurrentOffset(envPtr); - TclEmitInstInt4(INST_JUMP_TABLE, infoIndex, envPtr); - jumpToDefault = CurrentOffset(envPtr); - TclEmitInstInt4(INST_JUMP4, 0, envPtr); - - for (i=0 ; isize != 7 || - memcmp(bodyToken[numBodyTokens-2]->start, "default", 7)) { - /* - * This is not a default clause, so insert the current location as - * a target in the jump table (assuming it isn't already there, - * which would indicate that this clause is probably masked by an - * earlier one). Note that we use a Tcl_DString here simply - * because the hash API does not let us specify the string length. - */ - - Tcl_DStringInit(&buffer); - Tcl_DStringAppend(&buffer, bodyToken[i]->start, - bodyToken[i]->size); - hPtr = Tcl_CreateHashEntry(&jtPtr->hashTable, - Tcl_DStringValue(&buffer), &isNew); - if (isNew) { - /* - * First time we've encountered this match clause, so it must - * point to here. - */ - - Tcl_SetHashValue(hPtr, CurrentOffset(envPtr) - jumpLocation); - } - Tcl_DStringFree(&buffer); - } else { - /* - * This is a default clause, so patch up the fallthrough from the - * INST_JUMP_TABLE instruction to here. - */ - - foundDefault = 1; - isNew = 1; - TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, - envPtr->codeStart+jumpToDefault+1); - } - - /* - * Now, for each arm we must deal with the body of the clause. - * - * If this is a continuation body (never true of a final clause, - * whether default or not) we're done because the next jump target - * will also point here, so we advance to the next clause. - */ - - if (bodyToken[i+1]->size == 1 && bodyToken[i+1]->start[0] == '-') { - mustGenerate = 1; - continue; - } - - /* - * Also skip this arm if its only match clause is masked. (We could - * probably be more aggressive about this, but that would be much more - * difficult to get right.) - */ - - if (!isNew && !mustGenerate) { - continue; - } - mustGenerate = 0; - - /* - * Compile the body of the arm. - */ - - envPtr->line = bodyLines[i+1]; /* TIP #280 */ - envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */ - TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); - - /* - * Compile a jump in to the end of the command if this body is - * anything other than a user-supplied default arm (to either skip - * over the remaining bodies or the code that generates an empty - * result). - */ - - if (i+2 < numBodyTokens || !foundDefault) { - finalFixups[numRealBodies++] = CurrentOffset(envPtr); - - /* - * Easier by far to issue this jump as a fixed-width jump, since - * otherwise we'd need to do a lot more (and more awkward) - * rewriting when we fixed this all up. - */ - - TclEmitInstInt4(INST_JUMP4, 0, envPtr); - } - } - - /* - * We're at the end. If we've not already done so through the processing - * of a user-supplied default clause, add in a "default" default clause - * now. - */ - - if (!foundDefault) { - TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, - envPtr->codeStart+jumpToDefault+1); - PushLiteral(envPtr, "", 0); - } - - /* - * No more instructions to be issued; everything that needs to jump to the - * end of the command is fixed up at this point. - */ - - for (i=0 ; icodeStart+finalFixups[i]+1); - } - - /* - * Clean up all our temporary space and return. - */ - - TclStackFree(interp, finalFixups); -} - -/* - *---------------------------------------------------------------------- - * - * DupJumptableInfo, FreeJumptableInfo -- - * - * Functions to duplicate, release and print a jump-table created for use - * with the INST_JUMP_TABLE instruction. - * - * Results: - * DupJumptableInfo: a copy of the jump-table - * FreeJumptableInfo: none - * PrintJumptableInfo: none - * - * Side effects: - * DupJumptableInfo: allocates memory - * FreeJumptableInfo: releases memory - * PrintJumptableInfo: none - * - *---------------------------------------------------------------------- - */ - -static ClientData -DupJumptableInfo( - ClientData clientData) -{ - JumptableInfo *jtPtr = clientData; - JumptableInfo *newJtPtr = (JumptableInfo *) - ckalloc(sizeof(JumptableInfo)); - Tcl_HashEntry *hPtr, *newHPtr; - Tcl_HashSearch search; - int isNew; - - Tcl_InitHashTable(&newJtPtr->hashTable, TCL_STRING_KEYS); - hPtr = Tcl_FirstHashEntry(&jtPtr->hashTable, &search); - while (hPtr != NULL) { - newHPtr = Tcl_CreateHashEntry(&newJtPtr->hashTable, - Tcl_GetHashKey(&jtPtr->hashTable, hPtr), &isNew); - Tcl_SetHashValue(newHPtr, Tcl_GetHashValue(hPtr)); - } - return newJtPtr; -} - -static void -FreeJumptableInfo( - ClientData clientData) -{ - JumptableInfo *jtPtr = clientData; - - Tcl_DeleteHashTable(&jtPtr->hashTable); - ckfree((char *) jtPtr); -} - -static void -PrintJumptableInfo( - ClientData clientData, - Tcl_Obj *appendObj, - ByteCode *codePtr, - unsigned int pcOffset) -{ - register JumptableInfo *jtPtr = clientData; - Tcl_HashEntry *hPtr; - Tcl_HashSearch search; - const char *keyPtr; - int offset, i = 0; - - hPtr = Tcl_FirstHashEntry(&jtPtr->hashTable, &search); - for (; hPtr ; hPtr = Tcl_NextHashEntry(&search)) { - keyPtr = Tcl_GetHashKey(&jtPtr->hashTable, hPtr); - offset = PTR2INT(Tcl_GetHashValue(hPtr)); - - if (i++) { - Tcl_AppendToObj(appendObj, ", ", -1); - if (i%4==0) { - Tcl_AppendToObj(appendObj, "\n\t\t", -1); - } - } - Tcl_AppendPrintfToObj(appendObj, "\"%s\"->pc %d", - keyPtr, pcOffset + offset); - } -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileTryCmd -- - * - * Procedure called to compile the "try" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "try" command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileTryCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - int numWords = parsePtr->numWords, numHandlers, result = TCL_ERROR; - Tcl_Token *bodyToken, *finallyToken, *tokenPtr; - Tcl_Token **handlerTokens = NULL; - Tcl_Obj **matchClauses = NULL; - int *matchCodes=NULL, *resultVarIndices=NULL, *optionVarIndices=NULL; - int i; - - if (numWords < 2) { - return TCL_ERROR; - } - - bodyToken = TokenAfter(parsePtr->tokenPtr); - - if (numWords == 2) { - /* - * No handlers or finally; do nothing beyond evaluating the body. - */ - - DefineLineInformation; /* TIP #280 */ - SetLineInformation(1); - CompileBody(envPtr, bodyToken, interp); - return TCL_OK; - } - - numWords -= 2; - tokenPtr = TokenAfter(bodyToken); - - /* - * Extract information about what handlers there are. - */ - - numHandlers = numWords >> 2; - numWords -= numHandlers * 4; - if (numHandlers > 0) { - handlerTokens = TclStackAlloc(interp, sizeof(Tcl_Token*)*numHandlers); - matchClauses = TclStackAlloc(interp, sizeof(Tcl_Obj *) * numHandlers); - memset(matchClauses, 0, sizeof(Tcl_Obj *) * numHandlers); - matchCodes = TclStackAlloc(interp, sizeof(int) * numHandlers); - resultVarIndices = TclStackAlloc(interp, sizeof(int) * numHandlers); - optionVarIndices = TclStackAlloc(interp, sizeof(int) * numHandlers); - - for (i=0 ; itype != TCL_TOKEN_SIMPLE_WORD) { - goto failedToCompile; - } - if (tokenPtr[1].size == 4 - && !strncmp(tokenPtr[1].start, "trap", 4)) { - /* - * Parse the list of errorCode words to match against. - */ - - matchCodes[i] = TCL_ERROR; - tokenPtr = TokenAfter(tokenPtr); - TclNewObj(tmpObj); - Tcl_IncrRefCount(tmpObj); - if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj) - || Tcl_ListObjLength(NULL, tmpObj, &objc) != TCL_OK - || (objc == 0)) { - TclDecrRefCount(tmpObj); - goto failedToCompile; - } - Tcl_ListObjReplace(NULL, tmpObj, 0, 0, 0, NULL); - matchClauses[i] = tmpObj; - } else if (tokenPtr[1].size == 2 - && !strncmp(tokenPtr[1].start, "on", 2)) { - int code; - static const char *codes[] = { - "ok", "error", "return", "break", "continue", NULL - }; - - /* - * Parse the result code to look for. - */ - - tokenPtr = TokenAfter(tokenPtr); - TclNewObj(tmpObj); - Tcl_IncrRefCount(tmpObj); - if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj)) { - TclDecrRefCount(tmpObj); - goto failedToCompile; - } - if (Tcl_GetIntFromObj(NULL, tmpObj, &code) != TCL_OK - && Tcl_GetIndexFromObj(NULL, tmpObj, codes, "", - TCL_EXACT, &code) != TCL_OK) { - TclDecrRefCount(tmpObj); - goto failedToCompile; - } - matchCodes[i] = code; - TclDecrRefCount(tmpObj); - } else { - goto failedToCompile; - } - - /* - * Parse the variable binding. - */ - - tokenPtr = TokenAfter(tokenPtr); - TclNewObj(tmpObj); - Tcl_IncrRefCount(tmpObj); - if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj)) { - TclDecrRefCount(tmpObj); - goto failedToCompile; - } - if (Tcl_ListObjGetElements(NULL, tmpObj, &objc, &objv) != TCL_OK - || (objc > 2)) { - TclDecrRefCount(tmpObj); - goto failedToCompile; - } - if (objc > 0) { - int len; - const char *varname = Tcl_GetStringFromObj(objv[0], &len); - - if (!TclIsLocalScalar(varname, len)) { - TclDecrRefCount(tmpObj); - goto failedToCompile; - } - resultVarIndices[i] = - TclFindCompiledLocal(varname, len, 1, envPtr); - } else { - resultVarIndices[i] = -1; - } - if (objc == 2) { - int len; - const char *varname = Tcl_GetStringFromObj(objv[1], &len); - - if (!TclIsLocalScalar(varname, len)) { - TclDecrRefCount(tmpObj); - goto failedToCompile; - } - optionVarIndices[i] = - TclFindCompiledLocal(varname, len, 1, envPtr); - } else { - optionVarIndices[i] = -1; - } - TclDecrRefCount(tmpObj); - - /* - * Extract the body for this handler. - */ - - tokenPtr = TokenAfter(tokenPtr); - if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { - goto failedToCompile; - } - if (tokenPtr[1].size == 1 && tokenPtr[1].start[0] == '-') { - handlerTokens[i] = NULL; - } else { - handlerTokens[i] = tokenPtr; - } - - tokenPtr = TokenAfter(tokenPtr); - } - - if (handlerTokens[numHandlers-1] == NULL) { - goto failedToCompile; - } - } - - /* - * Parse the finally clause - */ - - if (numWords == 0) { - finallyToken = NULL; - } else if (numWords == 2) { - if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD || tokenPtr[1].size != 7 - || strncmp(tokenPtr[1].start, "finally", 7)) { - goto failedToCompile; - } - finallyToken = TokenAfter(tokenPtr); - } else { - goto failedToCompile; - } - - /* - * Issue the bytecode. - */ - - if (finallyToken) { - result = IssueTryFinallyInstructions(interp, envPtr, bodyToken, - numHandlers, matchCodes, matchClauses, resultVarIndices, - optionVarIndices, handlerTokens, finallyToken); - } else { - result = IssueTryInstructions(interp, envPtr, bodyToken, numHandlers, - matchCodes, matchClauses, resultVarIndices, optionVarIndices, - handlerTokens); - } - - /* - * Delete any temporary state and finish off. - */ - - failedToCompile: - if (numHandlers > 0) { - for (i=0 ; icodeStart+(var)+1) - -static int -IssueTryInstructions( - Tcl_Interp *interp, - CompileEnv *envPtr, - Tcl_Token *bodyToken, - int numHandlers, - int *matchCodes, - Tcl_Obj **matchClauses, - int *resultVars, - int *optionVars, - Tcl_Token **handlerTokens) -{ - DefineLineInformation; /* TIP #280 */ - int range, resultVar, optionsVar; - int i, j, len, forwardsNeedFixing = 0; - int *addrsToFix, *forwardsToFix, notCodeJumpSource, notECJumpSource; - char buf[TCL_INTEGER_SPACE]; - - resultVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); - optionsVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); - if (resultVar < 0 || optionsVar < 0) { - return TCL_ERROR; - } - - /* - * Compile the body, trapping any error in it so that we can trap on it - * and/or run a finally clause. Note that there must be at least one - * on/trap clause; when none is present, this whole function is not called - * (and it's never called when there's a finally clause). - */ - - range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); - OP4( BEGIN_CATCH4, range); - ExceptionRangeStarts(envPtr, range); - BODY( bodyToken, 1); - ExceptionRangeEnds(envPtr, range); - OP1( JUMP1, 3); - ExceptionRangeTarget(envPtr, range, catchOffset); - OP( PUSH_RESULT); - OP4( STORE_SCALAR4, resultVar); - OP( POP); - OP( PUSH_RETURN_OPTIONS); - OP4( STORE_SCALAR4, optionsVar); - OP( POP); - OP( PUSH_RETURN_CODE); - OP( END_CATCH); - - /* - * Now we handle all the registered 'on' and 'trap' handlers in order. - * For us to be here, there must be at least one handler. - * - * Slight overallocation, but reduces size of this function. - */ - - addrsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); - forwardsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); - - for (i=0 ; i= 0) { - OP4( LOAD_SCALAR4, resultVar); - OP4( STORE_SCALAR4, resultVars[i]); - OP( POP); - if (optionVars[i] >= 0) { - OP4( LOAD_SCALAR4, optionsVar); - OP4( STORE_SCALAR4, optionVars[i]); - OP( POP); - } - } - if (!handlerTokens[i]) { - forwardsNeedFixing = 1; - JUMP(forwardsToFix[i], JUMP4); - } else { - forwardsToFix[i] = -1; - if (forwardsNeedFixing) { - forwardsNeedFixing = 0; - for (j=0 ; jcurrStackDepth; - int range, resultVar, optionsVar, i, j, len, forwardsNeedFixing = 0; - int *addrsToFix, *forwardsToFix, notCodeJumpSource, notECJumpSource; - char buf[TCL_INTEGER_SPACE]; - - resultVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); - optionsVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); - if (resultVar < 0 || optionsVar < 0) { - return TCL_ERROR; - } - - /* - * Compile the body, trapping any error in it so that we can trap on it - * (if any trap matches) and run a finally clause. - */ - - range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); - OP4( BEGIN_CATCH4, range); - ExceptionRangeStarts(envPtr, range); - BODY( bodyToken, 1); - ExceptionRangeEnds(envPtr, range); - OP1( JUMP1, 3); - ExceptionRangeTarget(envPtr, range, catchOffset); - OP( PUSH_RESULT); - OP4( STORE_SCALAR4, resultVar); - OP( POP); - OP( PUSH_RETURN_OPTIONS); - OP4( STORE_SCALAR4, optionsVar); - OP( POP); - OP( PUSH_RETURN_CODE); - OP( END_CATCH); - envPtr->currStackDepth = savedStackDepth + 1; - - /* - * Now we handle all the registered 'on' and 'trap' handlers in order. - */ - - if (numHandlers) { - /* - * Slight overallocation, but reduces size of this function. - */ - - addrsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); - forwardsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); - - for (i=0 ; i= 0 || handlerTokens[i]) { - range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); - OP4( BEGIN_CATCH4, range); - ExceptionRangeStarts(envPtr, range); - } - if (resultVars[i] >= 0) { - OP4( LOAD_SCALAR4, resultVar); - OP4( STORE_SCALAR4, resultVars[i]); - OP( POP); - if (optionVars[i] >= 0) { - OP4( LOAD_SCALAR4, optionsVar); - OP4( STORE_SCALAR4, optionVars[i]); - OP( POP); - } - } - if (!handlerTokens[i]) { - /* - * No handler. Will not be the last handler (that condition is - * checked by the caller). Chain to the next one. - */ - - ExceptionRangeEnds(envPtr, range); - forwardsNeedFixing = 1; - JUMP(forwardsToFix[i], JUMP4); - if (resultVars[i] >= 0) { - goto finishTrapCatchHandling; - } - } else { - /* - * Got a handler. Make sure that any pending patch-up actions - * from previous unprocessed handlers are dealt with now that - * we know where they are to jump to. - */ - - if (forwardsNeedFixing) { - forwardsNeedFixing = 0; - OP1( JUMP1, 7); - for (j=0 ; jcurrStackDepth = savedStackDepth; - - /* - * Process the finally clause (at last!) Note that we do not wrap this in - * error handlers because we would just rethrow immediately anyway. Then - * (on normal success) we reissue the exception. Note also that - * INST_RETURN_STK can proceed to the next instruction; that'll be the - * next command (or some inter-command manipulation). - */ - - BODY( finallyToken, 3 + 4*numHandlers); - OP( POP); - OP4( LOAD_SCALAR4, optionsVar); - OP4( LOAD_SCALAR4, resultVar); - OP( RETURN_STK); - - return TCL_OK; -} - -#undef OP -#undef OP1 -#undef OP4 -#undef OP44 -#undef BODY -#undef PUSH -#undef JUMP -#undef FIXJUMP - -/* - *---------------------------------------------------------------------- - * - * TclCompileUnsetCmd -- - * - * Procedure called to compile the "unset" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "unset" command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileUnsetCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Token *varTokenPtr; - int isScalar, simpleVarName, localIndex, numWords, flags, i; - Tcl_Obj *leadingWord; - DefineLineInformation; /* TIP #280 */ - - numWords = parsePtr->numWords-1; - flags = 1; - varTokenPtr = TokenAfter(parsePtr->tokenPtr); - leadingWord = Tcl_NewObj(); - if (TclWordKnownAtCompileTime(varTokenPtr, leadingWord)) { - int len; - const char *bytes = Tcl_GetStringFromObj(leadingWord, &len); - - if (len == 11 && !strncmp("-nocomplain", bytes, 11)) { - flags = 0; - varTokenPtr = TokenAfter(varTokenPtr); - numWords--; - } else if (len == 2 && !strncmp("--", bytes, 2)) { - varTokenPtr = TokenAfter(varTokenPtr); - numWords--; - } - } else { - /* - * Cannot guarantee that the first word is not '-nocomplain' at - * evaluation with reasonable effort, so spill to interpreted version. - */ - - return TCL_ERROR; - } - TclDecrRefCount(leadingWord); - - for (i=0 ; icurrStackDepth; - int loopMayEnd = 1; /* This is set to 0 if it is recognized as an - * infinite loop. */ - Tcl_Obj *boolObj; - DefineLineInformation; /* TIP #280 */ - - if (parsePtr->numWords != 3) { - return TCL_ERROR; - } - - /* - * If the test expression requires substitutions, don't compile the while - * command inline. E.g., the expression might cause the loop to never - * execute or execute forever, as in "while "$x < 5" {}". - * - * Bail out also if the body expression requires substitutions in order to - * insure correct behaviour [Bug 219166] - */ - - testTokenPtr = TokenAfter(parsePtr->tokenPtr); - bodyTokenPtr = TokenAfter(testTokenPtr); - - if ((testTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) - || (bodyTokenPtr->type != TCL_TOKEN_SIMPLE_WORD)) { - return TCL_ERROR; - } - - /* - * Find out if the condition is a constant. - */ - - boolObj = Tcl_NewStringObj(testTokenPtr[1].start, testTokenPtr[1].size); - Tcl_IncrRefCount(boolObj); - code = Tcl_GetBooleanFromObj(NULL, boolObj, &boolVal); - TclDecrRefCount(boolObj); - if (code == TCL_OK) { - if (boolVal) { - /* - * It is an infinite loop; flag it so that we generate a more - * efficient body. - */ - - loopMayEnd = 0; - } else { - /* - * This is an empty loop: "while 0 {...}" or such. Compile no - * bytecodes. - */ - - goto pushResult; - } - } - - /* - * Create a ExceptionRange record for the loop body. This is used to - * implement break and continue. - */ - - range = DeclareExceptionRange(envPtr, LOOP_EXCEPTION_RANGE); - - /* - * Jump to the evaluation of the condition. This code uses the "loop - * rotation" optimisation (which eliminates one branch from the loop). - * "while cond body" produces then: - * goto A - * B: body : bodyCodeOffset - * A: cond -> result : testCodeOffset, continueOffset - * if (result) goto B - * - * The infinite loop "while 1 body" produces: - * B: body : all three offsets here - * goto B - */ - - if (loopMayEnd) { - TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, - &jumpEvalCondFixup); - testCodeOffset = 0; /* Avoid compiler warning. */ - } else { - /* - * Make sure that the first command in the body is preceded by an - * INST_START_CMD, and hence counted properly. [Bug 1752146] - */ - - envPtr->atCmdStart = 0; - testCodeOffset = CurrentOffset(envPtr); - } - - /* - * Compile the loop body. - */ - - SetLineInformation(2); - bodyCodeOffset = ExceptionRangeStarts(envPtr, range); - CompileBody(envPtr, bodyTokenPtr, interp); - ExceptionRangeEnds(envPtr, range); - envPtr->currStackDepth = savedStackDepth + 1; - TclEmitOpcode(INST_POP, envPtr); - - /* - * Compile the test expression then emit the conditional jump that - * terminates the while. We already know it's a simple word. - */ - - if (loopMayEnd) { - testCodeOffset = CurrentOffset(envPtr); - jumpDist = testCodeOffset - jumpEvalCondFixup.codeOffset; - if (TclFixupForwardJump(envPtr, &jumpEvalCondFixup, jumpDist, 127)) { - bodyCodeOffset += 3; - testCodeOffset += 3; - } - envPtr->currStackDepth = savedStackDepth; - SetLineInformation(1); - TclCompileExprWords(interp, testTokenPtr, 1, envPtr); - envPtr->currStackDepth = savedStackDepth + 1; - - jumpDist = CurrentOffset(envPtr) - bodyCodeOffset; - if (jumpDist > 127) { - TclEmitInstInt4(INST_JUMP_TRUE4, -jumpDist, envPtr); - } else { - TclEmitInstInt1(INST_JUMP_TRUE1, -jumpDist, envPtr); - } - } else { - jumpDist = CurrentOffset(envPtr) - bodyCodeOffset; - if (jumpDist > 127) { - TclEmitInstInt4(INST_JUMP4, -jumpDist, envPtr); - } else { - TclEmitInstInt1(INST_JUMP1, -jumpDist, envPtr); - } - } - - /* - * Set the loop's body, continue and break offsets. - */ - - envPtr->exceptArrayPtr[range].continueOffset = testCodeOffset; - envPtr->exceptArrayPtr[range].codeOffset = bodyCodeOffset; - ExceptionRangeTarget(envPtr, range, breakOffset); - - /* - * The while command's result is an empty string. - */ - - pushResult: - envPtr->currStackDepth = savedStackDepth; - PushLiteral(envPtr, "", 0); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * PushVarName -- - * - * Procedure used in the compiling where pushing a variable name is - * necessary (append, lappend, set). - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "set" command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -static int -PushVarName( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Token *varTokenPtr, /* Points to a variable token. */ - CompileEnv *envPtr, /* Holds resulting instructions. */ - int flags, /* TCL_NO_LARGE_INDEX. */ - int *localIndexPtr, /* Must not be NULL. */ - int *simpleVarNamePtr, /* Must not be NULL. */ - int *isScalarPtr, /* Must not be NULL. */ - int line, /* Line the token starts on. */ - int *clNext) /* Reference to offset of next hidden cont. - * line. */ -{ - register const char *p; - const char *name, *elName; - register int i, n; - Tcl_Token *elemTokenPtr = NULL; - int nameChars, elNameChars, simpleVarName, localIndex; - int elemTokenCount = 0, allocedTokens = 0, removedParen = 0; - - /* - * Decide if we can use a frame slot for the var/array name or if we need - * to emit code to compute and push the name at runtime. We use a frame - * slot (entry in the array of local vars) if we are compiling a procedure - * body and if the name is simple text that does not include namespace - * qualifiers. - */ - - simpleVarName = 0; - name = elName = NULL; - nameChars = elNameChars = 0; - localIndex = -1; - - /* - * Check not only that the type is TCL_TOKEN_SIMPLE_WORD, but whether - * curly braces surround the variable name. This really matters for array - * elements to handle things like - * set {x($foo)} 5 - * which raises an undefined var error if we are not careful here. - */ - - if ((varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) && - (varTokenPtr->start[0] != '{')) { - /* - * A simple variable name. Divide it up into "name" and "elName" - * strings. If it is not a local variable, look it up at runtime. - */ - - simpleVarName = 1; - - name = varTokenPtr[1].start; - nameChars = varTokenPtr[1].size; - if (name[nameChars-1] == ')') { - /* - * last char is ')' => potential array reference. - */ - - for (i=0,p=name ; itype = TCL_TOKEN_TEXT; - elemTokenPtr->start = elName; - elemTokenPtr->size = elNameChars; - elemTokenPtr->numComponents = 0; - elemTokenCount = 1; - } - } - } else if (((n = varTokenPtr->numComponents) > 1) - && (varTokenPtr[1].type == TCL_TOKEN_TEXT) - && (varTokenPtr[n].type == TCL_TOKEN_TEXT) - && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) { - /* - * Check for parentheses inside first token. - */ - - simpleVarName = 0; - for (i = 0, p = varTokenPtr[1].start; - i < varTokenPtr[1].size; i++, p++) { - if (*p == '(') { - simpleVarName = 1; - break; - } - } - if (simpleVarName) { - int remainingChars; - - /* - * Check the last token: if it is just ')', do not count it. - * Otherwise, remove the ')' and flag so that it is restored at - * the end. - */ - - if (varTokenPtr[n].size == 1) { - --n; - } else { - --varTokenPtr[n].size; - removedParen = n; - } - - name = varTokenPtr[1].start; - nameChars = p - varTokenPtr[1].start; - elName = p + 1; - remainingChars = (varTokenPtr[2].start - p) - 1; - elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 2; - - if (remainingChars) { - /* - * Make a first token with the extra characters in the first - * token. - */ - - elemTokenPtr = TclStackAlloc(interp, n * sizeof(Tcl_Token)); - allocedTokens = 1; - elemTokenPtr->type = TCL_TOKEN_TEXT; - elemTokenPtr->start = elName; - elemTokenPtr->size = remainingChars; - elemTokenPtr->numComponents = 0; - elemTokenCount = n; - - /* - * Copy the remaining tokens. - */ - - memcpy(elemTokenPtr+1, varTokenPtr+2, - (n-1) * sizeof(Tcl_Token)); - } else { - /* - * Use the already available tokens. - */ - - elemTokenPtr = &varTokenPtr[2]; - elemTokenCount = n - 1; - } - } - } - - if (simpleVarName) { - /* - * See whether name has any namespace separators (::'s). - */ - - int hasNsQualifiers = 0; - - for (i = 0, p = name; i < nameChars; i++, p++) { - if ((*p == ':') && ((i+1) < nameChars) && (*(p+1) == ':')) { - hasNsQualifiers = 1; - break; - } - } - - /* - * Look up the var name's index in the array of local vars in the proc - * frame. If retrieving the var's value and it doesn't already exist, - * push its name and look it up at runtime. - */ - - if (!hasNsQualifiers) { - localIndex = TclFindCompiledLocal(name, nameChars, - 1, envPtr); - if ((flags & TCL_NO_LARGE_INDEX) && (localIndex > 255)) { - /* - * We'll push the name. - */ - - localIndex = -1; - } - } - if (localIndex < 0) { - PushLiteral(envPtr, name, nameChars); - } - - /* - * Compile the element script, if any. - */ - - if (elName != NULL) { - if (elNameChars) { - envPtr->line = line; - envPtr->clNext = clNext; - TclCompileTokens(interp, elemTokenPtr, elemTokenCount, - envPtr); - } else { - PushLiteral(envPtr, "", 0); - } - } - } else { - /* - * The var name isn't simple: compile and push it. - */ - - envPtr->line = line; - envPtr->clNext = clNext; - CompileTokens(envPtr, varTokenPtr, interp); - } - - if (removedParen) { - ++varTokenPtr[removedParen].size; - } - if (allocedTokens) { - TclStackFree(interp, elemTokenPtr); - } - *localIndexPtr = localIndex; - *simpleVarNamePtr = simpleVarName; - *isScalarPtr = (elName == NULL); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * CompileUnaryOpCmd -- - * - * Utility routine to compile the unary operator commands. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the compiled command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -static int -CompileUnaryOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - int instruction, - CompileEnv *envPtr) -{ - Tcl_Token *tokenPtr; - DefineLineInformation; /* TIP #280 */ - - if (parsePtr->numWords != 2) { - return TCL_ERROR; - } - tokenPtr = TokenAfter(parsePtr->tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 1); - TclEmitOpcode(instruction, envPtr); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * CompileAssociativeBinaryOpCmd -- - * - * Utility routine to compile the binary operator commands that accept an - * arbitrary number of arguments, and that are associative operations. - * Because of the associativity, we may combine operations from right to - * left, saving us any effort of re-ordering the arguments on the stack - * after substitutions are completed. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the compiled command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -static int -CompileAssociativeBinaryOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - const char *identity, - int instruction, - CompileEnv *envPtr) -{ - Tcl_Token *tokenPtr = parsePtr->tokenPtr; - DefineLineInformation; /* TIP #280 */ - int words; - - for (words=1 ; wordsnumWords ; words++) { - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, words); - } - if (parsePtr->numWords <= 2) { - PushLiteral(envPtr, identity, -1); - words++; - } - if (words > 3) { - /* - * Reverse order of arguments to get precise agreement with [expr] in - * calcuations, including roundoff errors. - */ - - TclEmitInstInt4(INST_REVERSE, words-1, envPtr); - } - while (--words > 1) { - TclEmitOpcode(instruction, envPtr); - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * CompileStrictlyBinaryOpCmd -- - * - * Utility routine to compile the binary operator commands, that strictly - * accept exactly two arguments. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the compiled command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -static int -CompileStrictlyBinaryOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - int instruction, - CompileEnv *envPtr) -{ - if (parsePtr->numWords != 3) { - return TCL_ERROR; - } - return CompileAssociativeBinaryOpCmd(interp, parsePtr, - NULL, instruction, envPtr); -} - -/* - *---------------------------------------------------------------------- - * - * CompileComparisonOpCmd -- - * - * Utility routine to compile the n-ary comparison operator commands. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the compiled command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -static int -CompileComparisonOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - int instruction, - CompileEnv *envPtr) -{ - Tcl_Token *tokenPtr; - DefineLineInformation; /* TIP #280 */ - - if (parsePtr->numWords < 3) { - PushLiteral(envPtr, "1", 1); - } else if (parsePtr->numWords == 3) { - tokenPtr = TokenAfter(parsePtr->tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 1); - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 2); - TclEmitOpcode(instruction, envPtr); - } else if (envPtr->procPtr == NULL) { - /* - * No local variable space! - */ - - return TCL_ERROR; - } else { - int tmpIndex = TclFindCompiledLocal(NULL, 0, 1, envPtr); - int words; - - tokenPtr = TokenAfter(parsePtr->tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 1); - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 2); - if (tmpIndex <= 255) { - TclEmitInstInt1(INST_STORE_SCALAR1, tmpIndex, envPtr); - } else { - TclEmitInstInt4(INST_STORE_SCALAR4, tmpIndex, envPtr); - } - TclEmitOpcode(instruction, envPtr); - for (words=3 ; wordsnumWords ;) { - if (tmpIndex <= 255) { - TclEmitInstInt1(INST_LOAD_SCALAR1, tmpIndex, envPtr); - } else { - TclEmitInstInt4(INST_LOAD_SCALAR4, tmpIndex, envPtr); - } - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, words); - if (++words < parsePtr->numWords) { - if (tmpIndex <= 255) { - TclEmitInstInt1(INST_STORE_SCALAR1, tmpIndex, envPtr); - } else { - TclEmitInstInt4(INST_STORE_SCALAR4, tmpIndex, envPtr); - } - } - TclEmitOpcode(instruction, envPtr); - } - for (; words>3 ; words--) { - TclEmitOpcode(INST_BITAND, envPtr); - } - - /* - * Drop the value from the temp variable; retaining that reference - * might be expensive elsewhere. - */ - - PushLiteral(envPtr, "", 0); - if (tmpIndex <= 255) { - TclEmitInstInt1(INST_STORE_SCALAR1, tmpIndex, envPtr); - } else { - TclEmitInstInt4(INST_STORE_SCALAR4, tmpIndex, envPtr); - } - TclEmitOpcode(INST_POP, envPtr); - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompile*OpCmd -- - * - * Procedures called to compile the corresponding "::tcl::mathop::*" - * commands. These are all wrappers around the utility operator command - * compiler functions, except for the compilers for subtraction and - * division, which are special. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the compiled command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileInvertOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileUnaryOpCmd(interp, parsePtr, INST_BITNOT, envPtr); -} - -int -TclCompileNotOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileUnaryOpCmd(interp, parsePtr, INST_LNOT, envPtr); -} - -int -TclCompileAddOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_ADD, - envPtr); -} - -int -TclCompileMulOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileAssociativeBinaryOpCmd(interp, parsePtr, "1", INST_MULT, - envPtr); -} - -int -TclCompileAndOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileAssociativeBinaryOpCmd(interp, parsePtr, "-1", INST_BITAND, - envPtr); -} - -int -TclCompileOrOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_BITOR, - envPtr); -} - -int -TclCompileXorOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_BITXOR, - envPtr); -} - -int -TclCompilePowOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - /* - * This one has its own implementation because the ** operator is the only - * one with right associativity. - */ - - Tcl_Token *tokenPtr = parsePtr->tokenPtr; - DefineLineInformation; /* TIP #280 */ - int words; - - for (words=1 ; wordsnumWords ; words++) { - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, words); - } - if (parsePtr->numWords <= 2) { - PushLiteral(envPtr, "1", 1); - words++; - } - while (--words > 1) { - TclEmitOpcode(INST_EXPON, envPtr); - } - return TCL_OK; -} - -int -TclCompileLshiftOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LSHIFT, envPtr); -} - -int -TclCompileRshiftOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_RSHIFT, envPtr); -} - -int -TclCompileModOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_MOD, envPtr); -} - -int -TclCompileNeqOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_NEQ, envPtr); -} - -int -TclCompileStrneqOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_STR_NEQ, envPtr); -} - -int -TclCompileInOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LIST_IN, envPtr); -} - -int -TclCompileNiOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LIST_NOT_IN, - envPtr); -} - -int -TclCompileLessOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileComparisonOpCmd(interp, parsePtr, INST_LT, envPtr); -} - -int -TclCompileLeqOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileComparisonOpCmd(interp, parsePtr, INST_LE, envPtr); -} - -int -TclCompileGreaterOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileComparisonOpCmd(interp, parsePtr, INST_GT, envPtr); -} - -int -TclCompileGeqOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileComparisonOpCmd(interp, parsePtr, INST_GE, envPtr); -} - -int -TclCompileEqOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileComparisonOpCmd(interp, parsePtr, INST_EQ, envPtr); -} - -int -TclCompileStreqOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - return CompileComparisonOpCmd(interp, parsePtr, INST_STR_EQ, envPtr); -} - -int -TclCompileMinusOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - Tcl_Token *tokenPtr = parsePtr->tokenPtr; - DefineLineInformation; /* TIP #280 */ - int words; - - if (parsePtr->numWords == 1) { - /* Fallback to direct eval to report syntax error */ - return TCL_ERROR; - } - for (words=1 ; wordsnumWords ; words++) { - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, words); - } - if (words == 2) { - TclEmitOpcode(INST_UMINUS, envPtr); - return TCL_OK; - } - if (words == 3) { - TclEmitOpcode(INST_SUB, envPtr); - return TCL_OK; - } - - /* - * Reverse order of arguments to get precise agreement with [expr] in - * calcuations, including roundoff errors. - */ - - TclEmitInstInt4(INST_REVERSE, words-1, envPtr); - while (--words > 1) { - TclEmitInstInt4(INST_REVERSE, 2, envPtr); - TclEmitOpcode(INST_SUB, envPtr); - } - return TCL_OK; -} - -int -TclCompileDivOpCmd( - Tcl_Interp *interp, - Tcl_Parse *parsePtr, - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) -{ - Tcl_Token *tokenPtr = parsePtr->tokenPtr; - DefineLineInformation; /* TIP #280 */ - int words; - - if (parsePtr->numWords == 1) { - /* Fallback to direct eval to report syntax error */ - return TCL_ERROR; - } - if (parsePtr->numWords == 2) { - PushLiteral(envPtr, "1.0", 3); - } - for (words=1 ; wordsnumWords ; words++) { - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, words); - } - if (words <= 3) { - TclEmitOpcode(INST_DIV, envPtr); - return TCL_OK; - } - - /* - * Reverse order of arguments to get precise agreement with [expr] in - * calcuations, including roundoff errors. - */ - - TclEmitInstInt4(INST_REVERSE, words-1, envPtr); - while (--words > 1) { - TclEmitInstInt4(INST_REVERSE, 2, envPtr); - TclEmitOpcode(INST_DIV, envPtr); - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * IndexTailVarIfKnown -- - * - * Procedure used in compiling [global] and [variable] commands. It - * inspects the variable name described by varTokenPtr and, if the tail - * is known at compile time, defines a corresponding local variable. - * - * Results: - * Returns the variable's index in the table of compiled locals if the - * tail is known at compile time, or -1 otherwise. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -IndexTailVarIfKnown( - Tcl_Interp *interp, - Tcl_Token *varTokenPtr, /* Token representing the variable name */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Obj *tailPtr; - const char *tailName, *p; - int len, n = varTokenPtr->numComponents; - Tcl_Token *lastTokenPtr; - int full, localIndex; - - /* - * Determine if the tail is (a) known at compile time, and (b) not an - * array element. Should any of these fail, return an error so that the - * non-compiled command will be called at runtime. - * - * In order for the tail to be known at compile time, the last token in - * the word has to be constant and contain "::" if it is not the only one. - */ - - if (!EnvHasLVT(envPtr)) { - return -1; - } - - TclNewObj(tailPtr); - if (TclWordKnownAtCompileTime(varTokenPtr, tailPtr)) { - full = 1; - lastTokenPtr = varTokenPtr; - } else { - full = 0; - lastTokenPtr = varTokenPtr + n; - if (!TclWordKnownAtCompileTime(lastTokenPtr, tailPtr)) { - Tcl_DecrRefCount(tailPtr); - return -1; - } - } - - tailName = TclGetStringFromObj(tailPtr, &len); - - if (len) { - if (*(tailName+len-1) == ')') { - /* - * Possible array: bail out - */ - - Tcl_DecrRefCount(tailPtr); - return -1; - } - - /* - * Get the tail: immediately after the last '::' - */ - - for (p = tailName + len -1; p > tailName; p--) { - if ((*p == ':') && (*(p-1) == ':')) { - p++; - break; - } - } - if (!full && (p == tailName)) { - /* - * No :: in the last component. - */ - - Tcl_DecrRefCount(tailPtr); - return -1; - } - len -= p - tailName; - tailName = p; - } - - localIndex = TclFindCompiledLocal(tailName, len, 1, envPtr); - Tcl_DecrRefCount(tailPtr); - return localIndex; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileUpvarCmd -- - * - * Procedure called to compile the "upvar" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "upvar" command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileUpvarCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr; - int simpleVarName, isScalar, localIndex, numWords, i; - DefineLineInformation; /* TIP #280 */ - Tcl_Obj *objPtr = Tcl_NewObj(); - - if (envPtr->procPtr == NULL) { - Tcl_DecrRefCount(objPtr); - return TCL_ERROR; - } - - numWords = parsePtr->numWords; - if (numWords < 3) { - Tcl_DecrRefCount(objPtr); - return TCL_ERROR; - } - - /* - * Push the frame index if it is known at compile time - */ - - tokenPtr = TokenAfter(parsePtr->tokenPtr); - if (TclWordKnownAtCompileTime(tokenPtr, objPtr)) { - CallFrame *framePtr; - const Tcl_ObjType *newTypePtr, *typePtr = objPtr->typePtr; - - /* - * Attempt to convert to a level reference. Note that TclObjGetFrame - * only changes the obj type when a conversion was successful. - */ - - TclObjGetFrame(interp, objPtr, &framePtr); - newTypePtr = objPtr->typePtr; - Tcl_DecrRefCount(objPtr); - - if (newTypePtr != typePtr) { - if (numWords%2) { - return TCL_ERROR; - } - CompileWord(envPtr, tokenPtr, interp, 1); - otherTokenPtr = TokenAfter(tokenPtr); - i = 4; - } else { - if (!(numWords%2)) { - return TCL_ERROR; - } - PushLiteral(envPtr, "1", 1); - otherTokenPtr = tokenPtr; - i = 3; - } - } else { - Tcl_DecrRefCount(objPtr); - return TCL_ERROR; - } - - /* - * Loop over the (otherVar, thisVar) pairs. If any of the thisVar is not a - * local variable, return an error so that the non-compiled command will - * be called at runtime. - */ - - for (; i<=numWords; i+=2, otherTokenPtr = TokenAfter(localTokenPtr)) { - localTokenPtr = TokenAfter(otherTokenPtr); - - CompileWord(envPtr, otherTokenPtr, interp, 1); - PushVarNameWord(interp, localTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); - - if ((localIndex < 0) || !isScalar) { - return TCL_ERROR; - } - TclEmitInstInt4(INST_UPVAR, localIndex, envPtr); - } - - /* - * Pop the frame index, and set the result to empty - */ - - TclEmitOpcode(INST_POP, envPtr); - PushLiteral(envPtr, "", 0); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileNamespaceCmd -- - * - * Procedure called to compile the "namespace" command; currently, only - * the subcommand "namespace upvar" is compiled to bytecodes. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "namespace upvar" - * command at runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileNamespaceCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Token *tokenPtr, *otherTokenPtr, *localTokenPtr; - int simpleVarName, isScalar, localIndex, numWords, i; - DefineLineInformation; /* TIP #280 */ - - if (envPtr->procPtr == NULL) { - return TCL_ERROR; - } - - /* - * Only compile [namespace upvar ...]: needs an odd number of args, >=5 - */ - - numWords = parsePtr->numWords; - if (!(numWords%2) || (numWords < 5)) { - return TCL_ERROR; - } - - /* - * Check if the second argument is "upvar" - */ - - tokenPtr = TokenAfter(parsePtr->tokenPtr); - if ((tokenPtr->size != 5) /* 5 == strlen("upvar") */ - || strncmp(tokenPtr->start, "upvar", 5)) { - return TCL_ERROR; - } - - /* - * Push the namespace - */ - - tokenPtr = TokenAfter(tokenPtr); - CompileWord(envPtr, tokenPtr, interp, 1); - - /* - * Loop over the (otherVar, thisVar) pairs. If any of the thisVar is not a - * local variable, return an error so that the non-compiled command will - * be called at runtime. - */ - - localTokenPtr = tokenPtr; - for (i=4; i<=numWords; i+=2) { - otherTokenPtr = TokenAfter(localTokenPtr); - localTokenPtr = TokenAfter(otherTokenPtr); - - CompileWord(envPtr, otherTokenPtr, interp, 1); - PushVarNameWord(interp, localTokenPtr, envPtr, 0, - &localIndex, &simpleVarName, &isScalar, 1); - - if ((localIndex < 0) || !isScalar) { - return TCL_ERROR; - } - TclEmitInstInt4(INST_NSUPVAR, localIndex, envPtr); - } - - /* - * Pop the namespace, and set the result to empty - */ - - TclEmitOpcode(INST_POP, envPtr); - PushLiteral(envPtr, "", 0); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileGlobalCmd -- - * - * Procedure called to compile the "global" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "global" command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileGlobalCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Token *varTokenPtr; - int localIndex, numWords, i; - DefineLineInformation; /* TIP #280 */ - - numWords = parsePtr->numWords; - if (numWords < 2) { - return TCL_ERROR; - } - - /* - * 'global' has no effect outside of proc bodies; handle that at runtime - */ - - if (envPtr->procPtr == NULL) { - return TCL_ERROR; - } - - /* - * Push the namespace - */ - - PushLiteral(envPtr, "::", 2); - - /* - * Loop over the variables. - */ - - varTokenPtr = TokenAfter(parsePtr->tokenPtr); - for (i=2; i<=numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) { - localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); - - if (localIndex < 0) { - return TCL_ERROR; - } - - CompileWord(envPtr, varTokenPtr, interp, 1); - TclEmitInstInt4(INST_NSUPVAR, localIndex, envPtr); - } - - /* - * Pop the namespace, and set the result to empty - */ - - TclEmitOpcode(INST_POP, envPtr); - PushLiteral(envPtr, "", 0); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileVariableCmd -- - * - * Procedure called to compile the "variable" command. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "variable" command at - * runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileVariableCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Token *varTokenPtr, *valueTokenPtr; - int localIndex, numWords, i; - DefineLineInformation; /* TIP #280 */ - - numWords = parsePtr->numWords; - if (numWords < 2) { - return TCL_ERROR; - } - - /* - * Bail out if not compiling a proc body - */ - - if (envPtr->procPtr == NULL) { - return TCL_ERROR; - } - - /* - * Loop over the (var, value) pairs. - */ - - valueTokenPtr = parsePtr->tokenPtr; - for (i=2; i<=numWords; i+=2) { - varTokenPtr = TokenAfter(valueTokenPtr); - valueTokenPtr = TokenAfter(varTokenPtr); - - localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); - - if (localIndex < 0) { - return TCL_ERROR; - } - - CompileWord(envPtr, varTokenPtr, interp, 1); - TclEmitInstInt4(INST_VARIABLE, localIndex, envPtr); - - if (i != numWords) { - /* - * A value has been given: set the variable, pop the value - */ - - CompileWord(envPtr, valueTokenPtr, interp, 1); - TclEmitInstInt4(INST_STORE_SCALAR4, localIndex, envPtr); - TclEmitOpcode(INST_POP, envPtr); - } - } - - /* - * Set the result to empty - */ - - PushLiteral(envPtr, "", 0); - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * - * TclCompileInfoExistsCmd -- - * - * Procedure called to compile the "info exists" subcommand. - * - * Results: - * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer - * evaluation to runtime. - * - * Side effects: - * Instructions are added to envPtr to execute the "info exists" - * subcommand at runtime. - * - *---------------------------------------------------------------------- - */ - -int -TclCompileInfoExistsCmd( - Tcl_Interp *interp, /* Used for error reporting. */ - Tcl_Parse *parsePtr, /* Points to a parse structure for the command - * created by Tcl_ParseCommand. */ - Command *cmdPtr, /* Points to defintion of command being - * compiled. */ - CompileEnv *envPtr) /* Holds resulting instructions. */ -{ - Tcl_Token *tokenPtr; - int isScalar, simpleVarName, localIndex; - DefineLineInformation; /* TIP #280 */ - - if (parsePtr->numWords != 2) { - return TCL_ERROR; - } - - /* - * Decide if we can use a frame slot for the var/array name or if we need - * to emit code to compute and push the name at runtime. We use a frame - * slot (entry in the array of local vars) if we are compiling a procedure - * body and if the name is simple text that does not include namespace - * qualifiers. - */ - - tokenPtr = TokenAfter(parsePtr->tokenPtr); - PushVarNameWord(interp, tokenPtr, envPtr, 0, &localIndex, - &simpleVarName, &isScalar, 1); - - /* - * Emit instruction to check the variable for existence. - */ - - if (simpleVarName) { - if (isScalar) { - if (localIndex < 0) { - TclEmitOpcode(INST_EXIST_STK, envPtr); - } else { - TclEmitInstInt4(INST_EXIST_SCALAR, localIndex, envPtr); - } - } else { - if (localIndex < 0) { - TclEmitOpcode(INST_EXIST_ARRAY_STK, envPtr); - } else { - TclEmitInstInt4(INST_EXIST_ARRAY, localIndex, envPtr); - } - } - } else { - TclEmitOpcode(INST_EXIST_STK, envPtr); - } - + *localIndexPtr = localIndex; + *simpleVarNamePtr = simpleVarName; + *isScalarPtr = (elName == NULL); return TCL_OK; } diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c new file mode 100644 index 0000000..88954ed --- /dev/null +++ b/generic/tclCompCmdsSZ.c @@ -0,0 +1,3499 @@ +/* + * tclCompCmdsSZ.c -- + * + * This file contains compilation procedures that compile various Tcl + * commands (beginning with the letters 's' through 'z', except for + * [upvar] and [variable]) into a sequence of instructions ("bytecodes"). + * Also includes the operator command compilers. + * + * Copyright (c) 1997-1998 Sun Microsystems, Inc. + * Copyright (c) 2001 by Kevin B. Kenny. All rights reserved. + * Copyright (c) 2002 ActiveState Corporation. + * Copyright (c) 2004-2010 by Donal K. Fellows. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.1 2010/02/26 14:38:36 dkf Exp $ + */ + +#include "tclInt.h" +#include "tclCompile.h" + +/* + * Prototypes for procedures defined later in this file: + */ + +static ClientData DupJumptableInfo(ClientData clientData); +static void FreeJumptableInfo(ClientData clientData); +static void PrintJumptableInfo(ClientData clientData, + Tcl_Obj *appendObj, ByteCode *codePtr, + unsigned int pcOffset); +static int PushVarName(Tcl_Interp *interp, + Tcl_Token *varTokenPtr, CompileEnv *envPtr, + int flags, int *localIndexPtr, + int *simpleVarNamePtr, int *isScalarPtr, + int line, int *clNext); +static int CompileAssociativeBinaryOpCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, const char *identity, + int instruction, CompileEnv *envPtr); +static int CompileComparisonOpCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, int instruction, + CompileEnv *envPtr); +static int CompileStrictlyBinaryOpCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, int instruction, + CompileEnv *envPtr); +static int CompileUnaryOpCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, int instruction, + CompileEnv *envPtr); +static void IssueSwitchChainedTests(Tcl_Interp *interp, + CompileEnv *envPtr, ExtCmdLoc *mapPtr, + int eclIndex, int mode, int noCase, + int valueIndex, Tcl_Token *valueTokenPtr, + int numWords, Tcl_Token **bodyToken, + int *bodyLines, int **bodyNext); +static void IssueSwitchJumpTable(Tcl_Interp *interp, + CompileEnv *envPtr, ExtCmdLoc *mapPtr, + int eclIndex, int valueIndex, + Tcl_Token *valueTokenPtr, int numWords, + Tcl_Token **bodyToken, int *bodyLines, + int **bodyContLines); +static int IssueTryFinallyInstructions(Tcl_Interp *interp, + CompileEnv *envPtr, Tcl_Token *bodyToken, + int numHandlers, int *matchCodes, + Tcl_Obj **matchClauses, int *resultVarIndices, + int *optionVarIndices, Tcl_Token **handlerTokens, + Tcl_Token *finallyToken); +static int IssueTryInstructions(Tcl_Interp *interp, + CompileEnv *envPtr, Tcl_Token *bodyToken, + int numHandlers, int *matchCodes, + Tcl_Obj **matchClauses, int *resultVarIndices, + int *optionVarIndices, Tcl_Token **handlerTokens); + +/* + * Macro that encapsulates an efficiency trick that avoids a function call for + * the simplest of compiles. The ANSI C "prototype" for this macro is: + * + * static void CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr, + * Tcl_Interp *interp, int word); + */ + +#define CompileWord(envPtr, tokenPtr, interp, word) \ + if ((tokenPtr)->type == TCL_TOKEN_SIMPLE_WORD) { \ + TclEmitPush(TclRegisterNewLiteral((envPtr), (tokenPtr)[1].start, \ + (tokenPtr)[1].size), (envPtr)); \ + } else { \ + envPtr->line = mapPtr->loc[eclIndex].line[word]; \ + envPtr->clNext = mapPtr->loc[eclIndex].next[word]; \ + TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \ + (envPtr)); \ + } + +/* + * TIP #280: Remember the per-word line information of the current command. An + * index is used instead of a pointer as recursive compilation may reallocate, + * i.e. move, the array. This is also the reason to save the nuloc now, it may + * change during the course of the function. + * + * Macro to encapsulate the variable definition and setup. + */ + +#define DefineLineInformation \ + ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \ + int eclIndex = mapPtr->nuloc - 1 + +#define SetLineInformation(word) \ + envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \ + envPtr->clNext = mapPtr->loc[eclIndex].next[(word)] + +#define PushVarNameWord(i,v,e,f,l,s,sc,word) \ + PushVarName(i,v,e,f,l,s,sc, \ + mapPtr->loc[eclIndex].line[(word)], \ + mapPtr->loc[eclIndex].next[(word)]) + +/* + * Flags bits used by PushVarName. + */ + +#define TCL_NO_LARGE_INDEX 1 /* Do not return localIndex value > 255 */ + +/* + * The structures below define the AuxData types defined in this file. + */ + +const AuxDataType tclJumptableInfoType = { + "JumptableInfo", /* name */ + DupJumptableInfo, /* dupProc */ + FreeJumptableInfo, /* freeProc */ + PrintJumptableInfo /* printProc */ +}; + +/* + * Shorthand macros for instruction issuing. + */ + +#define OP(name) TclEmitOpcode(INST_##name, envPtr) +#define OP1(name,val) TclEmitInstInt1(INST_##name,(val),envPtr) +#define OP4(name,val) TclEmitInstInt4(INST_##name,(val),envPtr) +#define OP44(name,val1,val2) \ + TclEmitInstInt4(INST_##name,(val1),envPtr);TclEmitInt4((val2),envPtr) +#define BODY(token,index) \ + SetLineInformation((index));CompileBody(envPtr,(token),interp) +#define PUSH(str) \ + PushLiteral(envPtr,(str),strlen(str)) +#define JUMP(var,name) \ + (var) = CurrentOffset(envPtr);TclEmitInstInt4(INST_##name,0,envPtr) +#define FIXJUMP(var) \ + TclStoreInt4AtPtr(CurrentOffset(envPtr)-(var),envPtr->codeStart+(var)+1) + +/* + *---------------------------------------------------------------------- + * + * TclCompileSetCmd -- + * + * Procedure called to compile the "set" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "set" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileSetCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *varTokenPtr, *valueTokenPtr; + int isAssignment, isScalar, simpleVarName, localIndex, numWords; + DefineLineInformation; /* TIP #280 */ + + numWords = parsePtr->numWords; + if ((numWords != 2) && (numWords != 3)) { + return TCL_ERROR; + } + isAssignment = (numWords == 3); + + /* + * Decide if we can use a frame slot for the var/array name or if we need + * to emit code to compute and push the name at runtime. We use a frame + * slot (entry in the array of local vars) if we are compiling a procedure + * body and if the name is simple text that does not include namespace + * qualifiers. + */ + + varTokenPtr = TokenAfter(parsePtr->tokenPtr); + PushVarNameWord(interp, varTokenPtr, envPtr, 0, + &localIndex, &simpleVarName, &isScalar, 1); + + /* + * If we are doing an assignment, push the new value. + */ + + if (isAssignment) { + valueTokenPtr = TokenAfter(varTokenPtr); + CompileWord(envPtr, valueTokenPtr, interp, 2); + } + + /* + * Emit instructions to set/get the variable. + */ + + if (simpleVarName) { + if (isScalar) { + if (localIndex < 0) { + TclEmitOpcode((isAssignment? + INST_STORE_SCALAR_STK : INST_LOAD_SCALAR_STK), + envPtr); + } else if (localIndex <= 255) { + TclEmitInstInt1((isAssignment? + INST_STORE_SCALAR1 : INST_LOAD_SCALAR1), + localIndex, envPtr); + } else { + TclEmitInstInt4((isAssignment? + INST_STORE_SCALAR4 : INST_LOAD_SCALAR4), + localIndex, envPtr); + } + } else { + if (localIndex < 0) { + TclEmitOpcode((isAssignment? + INST_STORE_ARRAY_STK : INST_LOAD_ARRAY_STK), envPtr); + } else if (localIndex <= 255) { + TclEmitInstInt1((isAssignment? + INST_STORE_ARRAY1 : INST_LOAD_ARRAY1), + localIndex, envPtr); + } else { + TclEmitInstInt4((isAssignment? + INST_STORE_ARRAY4 : INST_LOAD_ARRAY4), + localIndex, envPtr); + } + } + } else { + TclEmitOpcode((isAssignment? INST_STORE_STK : INST_LOAD_STK), envPtr); + } + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileStringCmpCmd -- + * + * Procedure called to compile the simplest and most common form of the + * "string compare" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "string compare" + * command at runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileStringCmpCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + DefineLineInformation; /* TIP #280 */ + Tcl_Token *tokenPtr; + + /* + * We don't support any flags; the bytecode isn't that sophisticated. + */ + + if (parsePtr->numWords != 3) { + return TCL_ERROR; + } + + /* + * Push the two operands onto the stack and then the test. + */ + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 1); + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 2); + TclEmitOpcode(INST_STR_CMP, envPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileStringEqualCmd -- + * + * Procedure called to compile the simplest and most common form of the + * "string equal" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "string equal" command + * at runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileStringEqualCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + DefineLineInformation; /* TIP #280 */ + Tcl_Token *tokenPtr; + + /* + * We don't support any flags; the bytecode isn't that sophisticated. + */ + + if (parsePtr->numWords != 3) { + return TCL_ERROR; + } + + /* + * Push the two operands onto the stack and then the test. + */ + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 1); + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 2); + TclEmitOpcode(INST_STR_EQ, envPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileStringIndexCmd -- + * + * Procedure called to compile the simplest and most common form of the + * "string index" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "string index" command + * at runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileStringIndexCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + DefineLineInformation; /* TIP #280 */ + Tcl_Token *tokenPtr; + + if (parsePtr->numWords != 3) { + return TCL_ERROR; + } + + /* + * Push the two operands onto the stack and then the index operation. + */ + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 1); + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 2); + TclEmitOpcode(INST_STR_INDEX, envPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileStringMatchCmd -- + * + * Procedure called to compile the simplest and most common form of the + * "string match" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "string match" command + * at runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileStringMatchCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + DefineLineInformation; /* TIP #280 */ + Tcl_Token *tokenPtr; + int i, length, exactMatch = 0, nocase = 0; + const char *str; + + if (parsePtr->numWords < 3 || parsePtr->numWords > 4) { + return TCL_ERROR; + } + tokenPtr = TokenAfter(parsePtr->tokenPtr); + + /* + * Check if we have a -nocase flag. + */ + + if (parsePtr->numWords == 4) { + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { + return TCL_ERROR; + } + str = tokenPtr[1].start; + length = tokenPtr[1].size; + if ((length <= 1) || strncmp(str, "-nocase", (size_t) length)) { + /* + * Fail at run time, not in compilation. + */ + + return TCL_ERROR; + } + nocase = 1; + tokenPtr = TokenAfter(tokenPtr); + } + + /* + * Push the strings to match against each other. + */ + + for (i = 0; i < 2; i++) { + if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { + str = tokenPtr[1].start; + length = tokenPtr[1].size; + if (!nocase && (i == 0)) { + /* + * Trivial matches can be done by 'string equal'. If -nocase + * was specified, we can't do this because INST_STR_EQ has no + * support for nocase. + */ + + Tcl_Obj *copy = Tcl_NewStringObj(str, length); + + Tcl_IncrRefCount(copy); + exactMatch = TclMatchIsTrivial(TclGetString(copy)); + TclDecrRefCount(copy); + } + PushLiteral(envPtr, str, length); + } else { + SetLineInformation(i+1+nocase); + CompileTokens(envPtr, tokenPtr, interp); + } + tokenPtr = TokenAfter(tokenPtr); + } + + /* + * Push the matcher. + */ + + if (exactMatch) { + TclEmitOpcode(INST_STR_EQ, envPtr); + } else { + TclEmitInstInt1(INST_STR_MATCH, nocase, envPtr); + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileStringLenCmd -- + * + * Procedure called to compile the simplest and most common form of the + * "string length" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "string length" + * command at runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileStringLenCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + DefineLineInformation; /* TIP #280 */ + Tcl_Token *tokenPtr; + Tcl_Obj *objPtr; + + if (parsePtr->numWords != 2) { + return TCL_ERROR; + } + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + TclNewObj(objPtr); + if (TclWordKnownAtCompileTime(tokenPtr, objPtr)) { + /* + * Here someone is asking for the length of a static string (or + * something with backslashes). Just push the actual character (not + * byte) length. + */ + + char buf[TCL_INTEGER_SPACE]; + int len = Tcl_GetCharLength(objPtr); + + len = sprintf(buf, "%d", len); + PushLiteral(envPtr, buf, len); + } else { + SetLineInformation(1); + CompileTokens(envPtr, tokenPtr, interp); + TclEmitOpcode(INST_STR_LEN, envPtr); + } + TclDecrRefCount(objPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileSubstCmd -- + * + * Procedure called to compile the "subst" command. + * + * Results: + * Returns TCL_OK for successful compile, or TCL_ERROR to defer + * evaluation to runtime (either when it is too complex to get the + * semantics right, or when we know for sure that it is an error but need + * the error to happen at the right time). + * + * Side effects: + * Instructions are added to envPtr to execute the "subst" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileSubstCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + int numArgs = parsePtr->numWords - 1; + int numOpts = numArgs - 1; + int objc, flags = TCL_SUBST_ALL; + Tcl_Obj **objv/*, *toSubst = NULL*/; + Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr); + int code = TCL_ERROR; + DefineLineInformation; /* TIP #280 */ + + if (numArgs == 0) { + return TCL_ERROR; + } + + objv = TclStackAlloc(interp, /*numArgs*/ numOpts * sizeof(Tcl_Obj *)); + + for (objc = 0; objc < /*numArgs*/ numOpts; objc++) { + objv[objc] = Tcl_NewObj(); + Tcl_IncrRefCount(objv[objc]); + if (!TclWordKnownAtCompileTime(wordTokenPtr, objv[objc])) { + objc++; + goto cleanup; + } + wordTokenPtr = TokenAfter(wordTokenPtr); + } + +/* + if (TclSubstOptions(NULL, numOpts, objv, &flags) == TCL_OK) { + toSubst = objv[numOpts]; + Tcl_IncrRefCount(toSubst); + } +*/ + + /* TODO: Figure out expansion to cover WordKnownAtCompileTime + * The difficulty is that WKACT makes a copy, and if TclSubstParse + * below parses the copy of the original source string, some deep + * parts of the compile machinery get upset. They want all pointers + * stored in Tcl_Tokens to point back to the same original string. + */ + if (wordTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { + code = TclSubstOptions(NULL, numOpts, objv, &flags); + } + + cleanup: + while (--objc >= 0) { + TclDecrRefCount(objv[objc]); + } + TclStackFree(interp, objv); + if (/*toSubst == NULL*/ code != TCL_OK) { + return TCL_ERROR; + } + + SetLineInformation(numArgs); + TclSubstCompile(interp, wordTokenPtr[1].start, wordTokenPtr[1].size, + flags, mapPtr->loc[eclIndex].line[numArgs], envPtr); + +/* TclDecrRefCount(toSubst);*/ + return TCL_OK; +} + +void +TclSubstCompile( + Tcl_Interp *interp, + const char *bytes, + int numBytes, + int flags, + int line, + CompileEnv *envPtr) +{ + Tcl_Token *endTokenPtr, *tokenPtr; + int breakOffset = 0, count = 0, bline = line; + Tcl_Parse parse; + Tcl_InterpState state = NULL; + + TclSubstParse(interp, bytes, numBytes, flags, &parse, &state); + + for (tokenPtr = parse.tokenPtr, endTokenPtr = tokenPtr + parse.numTokens; + tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) { + int length, literal, catchRange, breakJump; + char buf[TCL_UTF_MAX]; + JumpFixup startFixup, okFixup, returnFixup, breakFixup; + JumpFixup continueFixup, otherFixup, endFixup; + + switch (tokenPtr->type) { + case TCL_TOKEN_TEXT: + literal = TclRegisterNewLiteral(envPtr, + tokenPtr->start, tokenPtr->size); + TclEmitPush(literal, envPtr); + TclAdvanceLines(&bline, tokenPtr->start, + tokenPtr->start + tokenPtr->size); + count++; + continue; + case TCL_TOKEN_BS: + length = Tcl_UtfBackslash(tokenPtr->start, NULL, buf); + literal = TclRegisterNewLiteral(envPtr, buf, length); + TclEmitPush(literal, envPtr); + count++; + continue; + } + + while (count > 255) { + TclEmitInstInt1(INST_CONCAT1, 255, envPtr); + count -= 254; + } + if (count > 1) { + TclEmitInstInt1(INST_CONCAT1, count, envPtr); + count = 1; + } + + if (breakOffset == 0) { + /* Jump to the start (jump over the jump to end) */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &startFixup); + + /* Jump to the end (all BREAKs land here) */ + breakOffset = CurrentOffset(envPtr); + TclEmitInstInt4(INST_JUMP4, 0, envPtr); + + /* Start */ + if (TclFixupForwardJumpToHere(envPtr, &startFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad start jump distance %d", + CurrentOffset(envPtr) - startFixup.codeOffset); + } + } + + envPtr->line = bline; + catchRange = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); + TclEmitInstInt4(INST_BEGIN_CATCH4, catchRange, envPtr); + ExceptionRangeStarts(envPtr, catchRange); + + switch (tokenPtr->type) { + case TCL_TOKEN_COMMAND: + TclCompileScript(interp, tokenPtr->start+1, tokenPtr->size-2, + envPtr); + count++; + break; + case TCL_TOKEN_VARIABLE: + TclCompileVarSubst(interp, tokenPtr, envPtr); + count++; + break; + default: + Tcl_Panic("unexpected token type in TclCompileSubstCmd: %d", + tokenPtr->type); + } + + ExceptionRangeEnds(envPtr, catchRange); + + /* Substitution produced TCL_OK */ + TclEmitOpcode(INST_END_CATCH, envPtr); + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &okFixup); + + /* Exceptional return codes processed here */ + ExceptionRangeTarget(envPtr, catchRange, catchOffset); + TclEmitOpcode(INST_PUSH_RETURN_OPTIONS, envPtr); + TclEmitOpcode(INST_PUSH_RESULT, envPtr); + TclEmitOpcode(INST_PUSH_RETURN_CODE, envPtr); + TclEmitOpcode(INST_END_CATCH, envPtr); + TclEmitOpcode(INST_RETURN_CODE_BRANCH, envPtr); + + /* ERROR -> reraise it */ + TclEmitOpcode(INST_RETURN_STK, envPtr); + TclEmitOpcode(INST_NOP, envPtr); + + /* RETURN */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &returnFixup); + + /* BREAK */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &breakFixup); + + /* CONTINUE */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &continueFixup); + + /* OTHER */ + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &otherFixup); + + /* BREAK destination */ + if (TclFixupForwardJumpToHere(envPtr, &breakFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad break jump distance %d", + CurrentOffset(envPtr) - breakFixup.codeOffset); + } + TclEmitOpcode(INST_POP, envPtr); + TclEmitOpcode(INST_POP, envPtr); + + breakJump = CurrentOffset(envPtr) - breakOffset; + if (breakJump > 127) { + TclEmitInstInt4(INST_JUMP4, -breakJump, envPtr); + } else { + TclEmitInstInt1(INST_JUMP1, -breakJump, envPtr); + } + + /* CONTINUE destination */ + if (TclFixupForwardJumpToHere(envPtr, &continueFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad continue jump distance %d", + CurrentOffset(envPtr) - continueFixup.codeOffset); + } + TclEmitOpcode(INST_POP, envPtr); + TclEmitOpcode(INST_POP, envPtr); + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &endFixup); + + /* RETURN + other destination */ + if (TclFixupForwardJumpToHere(envPtr, &returnFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad return jump distance %d", + CurrentOffset(envPtr) - returnFixup.codeOffset); + } + if (TclFixupForwardJumpToHere(envPtr, &otherFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad other jump distance %d", + CurrentOffset(envPtr) - otherFixup.codeOffset); + } + /* Pull the result to top of stack, discard options dict */ + TclEmitInstInt4(INST_REVERSE, 2, envPtr); + TclEmitOpcode(INST_POP, envPtr); + + /* + * We've emitted several POP instructions, and the automatic + * computations for stack depth requirements have been decrementing + * for every one. However, we know that every branch actually taken + * only encounters some of those instructions. No branch passes + * through them all. So, we now have a stack requirements estimate + * that is too low. Here we manually fix that up. + */ + TclAdjustStackDepth(5, envPtr); + + /* OK destination */ + if (TclFixupForwardJumpToHere(envPtr, &okFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad ok jump distance %d", + CurrentOffset(envPtr) - okFixup.codeOffset); + } + if (count > 1) { + TclEmitInstInt1(INST_CONCAT1, count, envPtr); + count = 1; + } + + /* CONTINUE jump to here */ + if (TclFixupForwardJumpToHere(envPtr, &endFixup, 127)) { + Tcl_Panic("TclCompileSubstCmd: bad end jump distance %d", + CurrentOffset(envPtr) - endFixup.codeOffset); + } + bline = envPtr->line; + } + + + while (count > 255) { + TclEmitInstInt1(INST_CONCAT1, 255, envPtr); + count -= 254; + } + if (count > 1) { + TclEmitInstInt1(INST_CONCAT1, count, envPtr); + } + + Tcl_FreeParse(&parse); + + if (state != NULL) { + Tcl_RestoreInterpState(interp, state); + TclCompileSyntaxError(interp, envPtr); + } + + /* Final target of the multi-jump from all BREAKs */ + if (breakOffset > 0) { + TclUpdateInstInt4AtPc(INST_JUMP4, CurrentOffset(envPtr) - breakOffset, + envPtr->codeStart + breakOffset); + } +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileSwitchCmd -- + * + * Procedure called to compile the "switch" command. + * + * Results: + * Returns TCL_OK for successful compile, or TCL_ERROR to defer + * evaluation to runtime (either when it is too complex to get the + * semantics right, or when we know for sure that it is an error but need + * the error to happen at the right time). + * + * Side effects: + * Instructions are added to envPtr to execute the "switch" command at + * runtime. + * + * FIXME: + * Stack depths are probably not calculated correctly. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileSwitchCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *tokenPtr; /* Pointer to tokens in command. */ + int numWords; /* Number of words in command. */ + Tcl_Token *valueTokenPtr; /* Token for the value to switch on. */ + enum {Switch_Exact, Switch_Glob, Switch_Regexp} mode; + /* What kind of switch are we doing? */ + Tcl_Token *bodyTokenArray; /* Array of real pattern list items. */ + Tcl_Token **bodyToken; /* Array of pointers to pattern list items. */ + int *bodyLines; /* Array of line numbers for body list + * items. */ + int **bodyContLines; /* Array of continuation line info. */ + int noCase; /* Has the -nocase flag been given? */ + int foundMode = 0; /* Have we seen a mode flag yet? */ + int isListedArms = 0; + int i, valueIndex; + int result = TCL_ERROR; + DefineLineInformation; /* TIP #280 */ + int *clNext = envPtr->clNext; + + /* + * Only handle the following versions: + * switch ?--? word {pattern body ...} + * switch -exact ?--? word {pattern body ...} + * switch -glob ?--? word {pattern body ...} + * switch -regexp ?--? word {pattern body ...} + * switch -- word simpleWordPattern simpleWordBody ... + * switch -exact -- word simpleWordPattern simpleWordBody ... + * switch -glob -- word simpleWordPattern simpleWordBody ... + * switch -regexp -- word simpleWordPattern simpleWordBody ... + * When the mode is -glob, can also handle a -nocase flag. + * + * First off, we don't care how the command's word was generated; we're + * compiling it anyway! So skip it... + */ + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + valueIndex = 1; + numWords = parsePtr->numWords-1; + + /* + * Check for options. + */ + + noCase = 0; + mode = Switch_Exact; + if (numWords == 2) { + /* + * There's just the switch value and the bodies list. In that case, we + * can skip all option parsing and move on to consider switch values + * and the body list. + */ + + goto finishedOptionParse; + } + + /* + * There must be at least one option, --, because without that there is no + * way to statically avoid the problems you get from strings-to-be-matched + * that start with a - (the interpreted code falls apart if it encounters + * them, so we punt if we *might* encounter them as that is the easiest + * way of emulating the behaviour). + */ + + for (; numWords>=3 ; tokenPtr=TokenAfter(tokenPtr),numWords--) { + register unsigned size = tokenPtr[1].size; + register const char *chrs = tokenPtr[1].start; + + /* + * We only process literal options, and we assume that -e, -g and -n + * are unique prefixes of -exact, -glob and -nocase respectively (true + * at time of writing). Note that -exact and -glob may only be given + * at most once or we bail out (error case). + */ + + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD || size < 2) { + return TCL_ERROR; + } + + if ((size <= 6) && !memcmp(chrs, "-exact", size)) { + if (foundMode) { + return TCL_ERROR; + } + mode = Switch_Exact; + foundMode = 1; + valueIndex++; + continue; + } else if ((size <= 5) && !memcmp(chrs, "-glob", size)) { + if (foundMode) { + return TCL_ERROR; + } + mode = Switch_Glob; + foundMode = 1; + valueIndex++; + continue; + } else if ((size <= 7) && !memcmp(chrs, "-regexp", size)) { + if (foundMode) { + return TCL_ERROR; + } + mode = Switch_Regexp; + foundMode = 1; + valueIndex++; + continue; + } else if ((size <= 7) && !memcmp(chrs, "-nocase", size)) { + noCase = 1; + valueIndex++; + continue; + } else if ((size == 2) && !memcmp(chrs, "--", 2)) { + valueIndex++; + break; + } + + /* + * The switch command has many flags we cannot compile at all (e.g. + * all the RE-related ones) which we must have encountered. Either + * that or we have run off the end. The action here is the same: punt + * to interpreted version. + */ + + return TCL_ERROR; + } + if (numWords < 3) { + return TCL_ERROR; + } + tokenPtr = TokenAfter(tokenPtr); + numWords--; + if (noCase && (mode == Switch_Exact)) { + /* + * Can't compile this case; no opcode for case-insensitive equality! + */ + + return TCL_ERROR; + } + + /* + * The value to test against is going to always get pushed on the stack. + * But not yet; we need to verify that the rest of the command is + * compilable too. + */ + + finishedOptionParse: + valueTokenPtr = tokenPtr; + /* For valueIndex, see previous loop. */ + tokenPtr = TokenAfter(tokenPtr); + numWords--; + + /* + * Build an array of tokens for the matcher terms and script bodies. Note + * that in the case of the quoted bodies, this is tricky as we cannot use + * copies of the string from the input token for the generated tokens (it + * causes a crash during exception handling). When multiple tokens are + * available at this point, this is pretty easy. + */ + + if (numWords == 1) { + Tcl_DString bodyList; + const char **argv = NULL, *tokenStartPtr, *p; + int bline; /* TIP #280: line of the pattern/action list, + * and start of list for when tracking the + * location. This list comes immediately after + * the value we switch on. */ + int isTokenBraced; + + /* + * Test that we've got a suitable body list as a simple (i.e. braced) + * word, and that the elements of the body are simple words too. This + * is really rather nasty indeed. + */ + + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { + return TCL_ERROR; + } + + Tcl_DStringInit(&bodyList); + Tcl_DStringAppend(&bodyList, tokenPtr[1].start, tokenPtr[1].size); + if (Tcl_SplitList(NULL, Tcl_DStringValue(&bodyList), &numWords, + &argv) != TCL_OK) { + Tcl_DStringFree(&bodyList); + return TCL_ERROR; + } + Tcl_DStringFree(&bodyList); + + /* + * Now we know what the switch arms are, we've got to see whether we + * can synthesize tokens for the arms. First check whether we've got a + * valid number of arms since we can do that now. + */ + + if (numWords == 0 || numWords % 2) { + ckfree((char *) argv); + return TCL_ERROR; + } + + isListedArms = 1; + bodyTokenArray = (Tcl_Token *) ckalloc(sizeof(Tcl_Token) * numWords); + bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); + bodyLines = (int *) ckalloc(sizeof(int) * numWords); + bodyContLines = (int **) ckalloc(sizeof(int*) * numWords); + + /* + * Locate the start of the arms within the overall word. + */ + + bline = mapPtr->loc[eclIndex].line[valueIndex+1]; + p = tokenStartPtr = tokenPtr[1].start; + while (isspace(UCHAR(*tokenStartPtr))) { + tokenStartPtr++; + } + if (*tokenStartPtr == '{') { + tokenStartPtr++; + isTokenBraced = 1; + } else { + isTokenBraced = 0; + } + + /* + * TIP #280: Count lines within the literal list. + */ + + for (i=0 ; isource); + bodyLines[i] = bline; + bodyContLines[i] = clNext; + p = bodyTokenArray[i].start; + + while (isspace(UCHAR(*tokenStartPtr))) { + tokenStartPtr++; + if (tokenStartPtr >= tokenPtr[1].start+tokenPtr[1].size) { + break; + } + } + if (*tokenStartPtr == '{') { + tokenStartPtr++; + isTokenBraced = 1; + } else { + isTokenBraced = 0; + } + } + ckfree((char *) argv); + + /* + * Check that we've parsed everything we thought we were going to + * parse. If not, something odd is going on (I believe it is possible + * to defeat the code above) and we should bail out. + */ + + if (tokenStartPtr != tokenPtr[1].start+tokenPtr[1].size) { + goto freeTemporaries; + } + + } else if (numWords % 2 || numWords == 0) { + /* + * Odd number of words (>1) available, or no words at all available. + * Both are error cases, so punt and let the interpreted-version + * generate the error message. Note that the second case probably + * should get caught earlier, but it's easy to check here again anyway + * because it'd cause a nasty crash otherwise. + */ + + return TCL_ERROR; + } else { + /* + * Multi-word definition of patterns & actions. + */ + + bodyToken = (Tcl_Token **) ckalloc(sizeof(Tcl_Token *) * numWords); + bodyLines = (int *) ckalloc(sizeof(int) * numWords); + bodyContLines = (int **) ckalloc(sizeof(int*) * numWords); + bodyTokenArray = NULL; + for (i=0 ; itype != TCL_TOKEN_SIMPLE_WORD || + tokenPtr->numComponents != 1) { + goto freeTemporaries; + } + bodyToken[i] = tokenPtr+1; + + /* + * TIP #280: Copy line information from regular cmd info. + */ + + bodyLines[i] = mapPtr->loc[eclIndex].line[valueIndex+1+i]; + bodyContLines[i] = mapPtr->loc[eclIndex].next[valueIndex+1+i]; + tokenPtr = TokenAfter(tokenPtr); + } + } + + /* + * Fall back to interpreted if the last body is a continuation (it's + * illegal, but this makes the error happen at the right time). + */ + + if (bodyToken[numWords-1]->size == 1 && + bodyToken[numWords-1]->start[0] == '-') { + goto freeTemporaries; + } + + /* + * Now we commit to generating code; the parsing stage per se is done. + * Check if we can generate a jump table, since if so that's faster than + * doing an explicit compare with each body. Note that we're definitely + * over-conservative with determining whether we can do the jump table, + * but it handles the most common case well enough. + */ + + if ((isListedArms) && (mode == Switch_Exact) && (!noCase)) { + IssueSwitchJumpTable(interp, envPtr, mapPtr, eclIndex, valueIndex, + valueTokenPtr, numWords, bodyToken, bodyLines, bodyContLines); + } else { + IssueSwitchChainedTests(interp, envPtr, mapPtr, eclIndex, mode,noCase, + valueIndex, valueTokenPtr, numWords, bodyToken, bodyLines, + bodyContLines); + } + result = TCL_OK; + + /* + * Clean up all our temporary space and return. + */ + + freeTemporaries: + ckfree((char *) bodyToken); + ckfree((char *) bodyLines); + ckfree((char *) bodyContLines); + if (bodyTokenArray != NULL) { + ckfree((char *) bodyTokenArray); + } + return result; +} + +/* + *---------------------------------------------------------------------- + * + * IssueSwitchChainedTests -- + * + * Generate instructions for a [switch] command that is to be compiled + * into a sequence of tests. This is the generic handle-everything mode + * that inherently has performance that is (on average) linear in the + * number of tests. It is the only mode that can handle -glob and -regexp + * matches, or anything that is case-insensitive. It does not handle the + * wild-and-wooly end of regexp matching (i.e., capture of match results) + * so that's when we spill to the interpreted version. + * + *---------------------------------------------------------------------- + */ + +static void +IssueSwitchChainedTests( + Tcl_Interp *interp, /* Context for compiling script bodies. */ + CompileEnv *envPtr, /* Holds resulting instructions. */ + ExtCmdLoc *mapPtr, /* For mapping tokens to their source code + * location. */ + int eclIndex, + int mode, /* Exact, Glob or Regexp */ + int noCase, /* Case-insensitivity flag. */ + int valueIndex, /* The value to match against. */ + Tcl_Token *valueTokenPtr, + int numBodyTokens, /* Number of tokens describing things the + * switch can match against and bodies to + * execute when the match succeeds. */ + Tcl_Token **bodyToken, /* Array of pointers to pattern list items. */ + int *bodyLines, /* Array of line numbers for body list + * items. */ + int **bodyContLines) /* Array of continuation line info. */ +{ + enum {Switch_Exact, Switch_Glob, Switch_Regexp}; + int savedStackDepth = envPtr->currStackDepth; + int foundDefault; /* Flag to indicate whether a "default" clause + * is present. */ + JumpFixup *fixupArray; /* Array of forward-jump fixup records. */ + int *fixupTargetArray; /* Array of places for fixups to point at. */ + int fixupCount; /* Number of places to fix up. */ + int contFixIndex; /* Where the first of the jumps due to a group + * of continuation bodies starts, or -1 if + * there aren't any. */ + int contFixCount; /* Number of continuation bodies pointing to + * the current (or next) real body. */ + int nextArmFixupIndex; + int simple, exact; /* For extracting the type of regexp. */ + int i; + + /* + * First, we push the value we're matching against on the stack. + */ + + SetLineInformation(valueIndex); + CompileTokens(envPtr, valueTokenPtr, interp); + + /* + * Generate a test for each arm. + */ + + contFixIndex = -1; + contFixCount = 0; + fixupArray = TclStackAlloc(interp, sizeof(JumpFixup) * numBodyTokens); + fixupTargetArray = TclStackAlloc(interp, sizeof(int) * numBodyTokens); + memset(fixupTargetArray, 0, numBodyTokens * sizeof(int)); + fixupCount = 0; + foundDefault = 0; + for (i=0 ; icurrStackDepth = savedStackDepth + 1; + if (i!=numBodyTokens-2 || bodyToken[numBodyTokens-2]->size != 7 || + memcmp(bodyToken[numBodyTokens-2]->start, "default", 7)) { + /* + * Generate the test for the arm. + */ + + switch (mode) { + case Switch_Exact: + TclEmitOpcode(INST_DUP, envPtr); + TclCompileTokens(interp, bodyToken[i], 1, envPtr); + TclEmitOpcode(INST_STR_EQ, envPtr); + break; + case Switch_Glob: + TclCompileTokens(interp, bodyToken[i], 1, envPtr); + TclEmitInstInt4(INST_OVER, 1, envPtr); + TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); + break; + case Switch_Regexp: + simple = exact = 0; + + /* + * Keep in sync with TclCompileRegexpCmd. + */ + + if (bodyToken[i]->type == TCL_TOKEN_TEXT) { + Tcl_DString ds; + + if (bodyToken[i]->size == 0) { + /* + * The semantics of regexps are that they always match + * when the RE == "". + */ + + PushLiteral(envPtr, "1", 1); + break; + } + + /* + * Attempt to convert pattern to glob. If successful, push + * the converted pattern. + */ + + if (TclReToGlob(NULL, bodyToken[i]->start, + bodyToken[i]->size, &ds, &exact) == TCL_OK) { + simple = 1; + PushLiteral(envPtr, Tcl_DStringValue(&ds), + Tcl_DStringLength(&ds)); + Tcl_DStringFree(&ds); + } + } + if (!simple) { + TclCompileTokens(interp, bodyToken[i], 1, envPtr); + } + + TclEmitInstInt4(INST_OVER, 1, envPtr); + if (!simple) { + /* + * Pass correct RE compile flags. We use only Int1 + * (8-bit), but that handles all the flags we want to + * pass. Don't use TCL_REG_NOSUB as we may have backrefs + * or capture vars. + */ + + int cflags = TCL_REG_ADVANCED + | (noCase ? TCL_REG_NOCASE : 0); + + TclEmitInstInt1(INST_REGEXP, cflags, envPtr); + } else if (exact && !noCase) { + TclEmitOpcode(INST_STR_EQ, envPtr); + } else { + TclEmitInstInt1(INST_STR_MATCH, noCase, envPtr); + } + break; + default: + Tcl_Panic("unknown switch mode: %d", mode); + } + + /* + * In a fall-through case, we will jump on _true_ to the place + * where the body starts (generated later, with guarantee of this + * ensured earlier; the final body is never a fall-through). + */ + + if (bodyToken[i+1]->size==1 && bodyToken[i+1]->start[0]=='-') { + if (contFixIndex == -1) { + contFixIndex = fixupCount; + contFixCount = 0; + } + TclEmitForwardJump(envPtr, TCL_TRUE_JUMP, + &fixupArray[contFixIndex+contFixCount]); + fixupCount++; + contFixCount++; + continue; + } + + TclEmitForwardJump(envPtr, TCL_FALSE_JUMP, + &fixupArray[fixupCount]); + nextArmFixupIndex = fixupCount; + fixupCount++; + } else { + /* + * Got a default clause; set a flag to inhibit the generation of + * the jump after the body and the cleanup of the intermediate + * value that we are switching against. + * + * Note that default clauses (which are always terminal clauses) + * cannot be fall-through clauses as well, since the last clause + * is never a fall-through clause (which we have already + * verified). + */ + + foundDefault = 1; + } + + /* + * Generate the body for the arm. This is guaranteed not to be a + * fall-through case, but it might have preceding fall-through cases, + * so we must process those first. + */ + + if (contFixIndex != -1) { + int j; + + for (j=0 ; jcurrStackDepth = savedStackDepth + 1; + envPtr->line = bodyLines[i+1]; /* TIP #280 */ + envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */ + TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); + + if (!foundDefault) { + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, + &fixupArray[fixupCount]); + fixupCount++; + fixupTargetArray[nextArmFixupIndex] = CurrentOffset(envPtr); + } + } + + /* + * Discard the value we are matching against unless we've had a default + * clause (in which case it will already be gone due to the code at the + * start of processing an arm, guaranteed) and make the result of the + * command an empty string. + */ + + if (!foundDefault) { + TclEmitOpcode(INST_POP, envPtr); + PushLiteral(envPtr, "", 0); + } + + /* + * Do jump fixups for arms that were executed. First, fill in the jumps of + * all jumps that don't point elsewhere to point to here. + */ + + for (i=0 ; icodeNext-envPtr->codeStart; + } + } + + /* + * Now scan backwards over all the jumps (all of which are forward jumps) + * doing each one. When we do one and there is a size changes, we must + * scan back over all the previous ones and see if they need adjusting + * before proceeding with further jump fixups (the interleaved nature of + * all the jumps makes this impossible to do without nested loops). + */ + + for (i=fixupCount-1 ; i>=0 ; i--) { + if (TclFixupForwardJump(envPtr, &fixupArray[i], + fixupTargetArray[i] - fixupArray[i].codeOffset, 127)) { + int j; + + for (j=i-1 ; j>=0 ; j--) { + if (fixupTargetArray[j] > fixupArray[i].codeOffset) { + fixupTargetArray[j] += 3; + } + } + } + } + TclStackFree(interp, fixupTargetArray); + TclStackFree(interp, fixupArray); + + envPtr->currStackDepth = savedStackDepth + 1; +} + +/* + *---------------------------------------------------------------------- + * + * IssueSwitchJumpTable -- + * + * Generate instructions for a [switch] command that is to be compiled + * into a jump table. This only handles the case where case-sensitive, + * exact matching is used, but this is actually the most common case in + * real code. + * + *---------------------------------------------------------------------- + */ + +static void +IssueSwitchJumpTable( + Tcl_Interp *interp, /* Context for compiling script bodies. */ + CompileEnv *envPtr, /* Holds resulting instructions. */ + ExtCmdLoc *mapPtr, /* For mapping tokens to their source code + * location. */ + int eclIndex, + int valueIndex, /* The value to match against. */ + Tcl_Token *valueTokenPtr, + int numBodyTokens, /* Number of tokens describing things the + * switch can match against and bodies to + * execute when the match succeeds. */ + Tcl_Token **bodyToken, /* Array of pointers to pattern list items. */ + int *bodyLines, /* Array of line numbers for body list + * items. */ + int **bodyContLines) /* Array of continuation line info. */ +{ + JumptableInfo *jtPtr; + int infoIndex, isNew, *finalFixups, numRealBodies = 0, jumpLocation; + int mustGenerate, foundDefault, jumpToDefault, i; + Tcl_DString buffer; + Tcl_HashEntry *hPtr; + + /* + * First, we push the value we're matching against on the stack. + */ + + SetLineInformation(valueIndex); + CompileTokens(envPtr, valueTokenPtr, interp); + + /* + * Compile the switch by using a jump table, which is basically a + * hashtable that maps from literal values to match against to the offset + * (relative to the INST_JUMP_TABLE instruction) to jump to. The jump + * table itself is independent of any invokation of the bytecode, and as + * such is stored in an auxData block. + * + * Start by allocating the jump table itself, plus some workspace. + */ + + jtPtr = (JumptableInfo *) ckalloc(sizeof(JumptableInfo)); + Tcl_InitHashTable(&jtPtr->hashTable, TCL_STRING_KEYS); + infoIndex = TclCreateAuxData(jtPtr, &tclJumptableInfoType, envPtr); + finalFixups = TclStackAlloc(interp, sizeof(int) * (numBodyTokens/2)); + foundDefault = 0; + mustGenerate = 1; + + /* + * Next, issue the instruction to do the jump, together with what we want + * to do if things do not work out (jump to either the default clause or + * the "default" default, which just sets the result to empty). Note that + * we will come back and rewrite the jump's offset parameter when we know + * what it should be, and that all jumps we issue are of the wide kind + * because that makes the code much easier to debug! + */ + + jumpLocation = CurrentOffset(envPtr); + TclEmitInstInt4(INST_JUMP_TABLE, infoIndex, envPtr); + jumpToDefault = CurrentOffset(envPtr); + TclEmitInstInt4(INST_JUMP4, 0, envPtr); + + for (i=0 ; isize != 7 || + memcmp(bodyToken[numBodyTokens-2]->start, "default", 7)) { + /* + * This is not a default clause, so insert the current location as + * a target in the jump table (assuming it isn't already there, + * which would indicate that this clause is probably masked by an + * earlier one). Note that we use a Tcl_DString here simply + * because the hash API does not let us specify the string length. + */ + + Tcl_DStringInit(&buffer); + Tcl_DStringAppend(&buffer, bodyToken[i]->start, + bodyToken[i]->size); + hPtr = Tcl_CreateHashEntry(&jtPtr->hashTable, + Tcl_DStringValue(&buffer), &isNew); + if (isNew) { + /* + * First time we've encountered this match clause, so it must + * point to here. + */ + + Tcl_SetHashValue(hPtr, CurrentOffset(envPtr) - jumpLocation); + } + Tcl_DStringFree(&buffer); + } else { + /* + * This is a default clause, so patch up the fallthrough from the + * INST_JUMP_TABLE instruction to here. + */ + + foundDefault = 1; + isNew = 1; + TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, + envPtr->codeStart+jumpToDefault+1); + } + + /* + * Now, for each arm we must deal with the body of the clause. + * + * If this is a continuation body (never true of a final clause, + * whether default or not) we're done because the next jump target + * will also point here, so we advance to the next clause. + */ + + if (bodyToken[i+1]->size == 1 && bodyToken[i+1]->start[0] == '-') { + mustGenerate = 1; + continue; + } + + /* + * Also skip this arm if its only match clause is masked. (We could + * probably be more aggressive about this, but that would be much more + * difficult to get right.) + */ + + if (!isNew && !mustGenerate) { + continue; + } + mustGenerate = 0; + + /* + * Compile the body of the arm. + */ + + envPtr->line = bodyLines[i+1]; /* TIP #280 */ + envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */ + TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr); + + /* + * Compile a jump in to the end of the command if this body is + * anything other than a user-supplied default arm (to either skip + * over the remaining bodies or the code that generates an empty + * result). + */ + + if (i+2 < numBodyTokens || !foundDefault) { + finalFixups[numRealBodies++] = CurrentOffset(envPtr); + + /* + * Easier by far to issue this jump as a fixed-width jump, since + * otherwise we'd need to do a lot more (and more awkward) + * rewriting when we fixed this all up. + */ + + TclEmitInstInt4(INST_JUMP4, 0, envPtr); + } + } + + /* + * We're at the end. If we've not already done so through the processing + * of a user-supplied default clause, add in a "default" default clause + * now. + */ + + if (!foundDefault) { + TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault, + envPtr->codeStart+jumpToDefault+1); + PushLiteral(envPtr, "", 0); + } + + /* + * No more instructions to be issued; everything that needs to jump to the + * end of the command is fixed up at this point. + */ + + for (i=0 ; icodeStart+finalFixups[i]+1); + } + + /* + * Clean up all our temporary space and return. + */ + + TclStackFree(interp, finalFixups); +} + +/* + *---------------------------------------------------------------------- + * + * DupJumptableInfo, FreeJumptableInfo -- + * + * Functions to duplicate, release and print a jump-table created for use + * with the INST_JUMP_TABLE instruction. + * + * Results: + * DupJumptableInfo: a copy of the jump-table + * FreeJumptableInfo: none + * PrintJumptableInfo: none + * + * Side effects: + * DupJumptableInfo: allocates memory + * FreeJumptableInfo: releases memory + * PrintJumptableInfo: none + * + *---------------------------------------------------------------------- + */ + +static ClientData +DupJumptableInfo( + ClientData clientData) +{ + JumptableInfo *jtPtr = clientData; + JumptableInfo *newJtPtr = (JumptableInfo *) + ckalloc(sizeof(JumptableInfo)); + Tcl_HashEntry *hPtr, *newHPtr; + Tcl_HashSearch search; + int isNew; + + Tcl_InitHashTable(&newJtPtr->hashTable, TCL_STRING_KEYS); + hPtr = Tcl_FirstHashEntry(&jtPtr->hashTable, &search); + while (hPtr != NULL) { + newHPtr = Tcl_CreateHashEntry(&newJtPtr->hashTable, + Tcl_GetHashKey(&jtPtr->hashTable, hPtr), &isNew); + Tcl_SetHashValue(newHPtr, Tcl_GetHashValue(hPtr)); + } + return newJtPtr; +} + +static void +FreeJumptableInfo( + ClientData clientData) +{ + JumptableInfo *jtPtr = clientData; + + Tcl_DeleteHashTable(&jtPtr->hashTable); + ckfree((char *) jtPtr); +} + +static void +PrintJumptableInfo( + ClientData clientData, + Tcl_Obj *appendObj, + ByteCode *codePtr, + unsigned int pcOffset) +{ + register JumptableInfo *jtPtr = clientData; + Tcl_HashEntry *hPtr; + Tcl_HashSearch search; + const char *keyPtr; + int offset, i = 0; + + hPtr = Tcl_FirstHashEntry(&jtPtr->hashTable, &search); + for (; hPtr ; hPtr = Tcl_NextHashEntry(&search)) { + keyPtr = Tcl_GetHashKey(&jtPtr->hashTable, hPtr); + offset = PTR2INT(Tcl_GetHashValue(hPtr)); + + if (i++) { + Tcl_AppendToObj(appendObj, ", ", -1); + if (i%4==0) { + Tcl_AppendToObj(appendObj, "\n\t\t", -1); + } + } + Tcl_AppendPrintfToObj(appendObj, "\"%s\"->pc %d", + keyPtr, pcOffset + offset); + } +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileTryCmd -- + * + * Procedure called to compile the "try" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "try" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileTryCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + int numWords = parsePtr->numWords, numHandlers, result = TCL_ERROR; + Tcl_Token *bodyToken, *finallyToken, *tokenPtr; + Tcl_Token **handlerTokens = NULL; + Tcl_Obj **matchClauses = NULL; + int *matchCodes=NULL, *resultVarIndices=NULL, *optionVarIndices=NULL; + int i; + + if (numWords < 2) { + return TCL_ERROR; + } + + bodyToken = TokenAfter(parsePtr->tokenPtr); + + if (numWords == 2) { + /* + * No handlers or finally; do nothing beyond evaluating the body. + */ + + DefineLineInformation; /* TIP #280 */ + SetLineInformation(1); + CompileBody(envPtr, bodyToken, interp); + return TCL_OK; + } + + numWords -= 2; + tokenPtr = TokenAfter(bodyToken); + + /* + * Extract information about what handlers there are. + */ + + numHandlers = numWords >> 2; + numWords -= numHandlers * 4; + if (numHandlers > 0) { + handlerTokens = TclStackAlloc(interp, sizeof(Tcl_Token*)*numHandlers); + matchClauses = TclStackAlloc(interp, sizeof(Tcl_Obj *) * numHandlers); + memset(matchClauses, 0, sizeof(Tcl_Obj *) * numHandlers); + matchCodes = TclStackAlloc(interp, sizeof(int) * numHandlers); + resultVarIndices = TclStackAlloc(interp, sizeof(int) * numHandlers); + optionVarIndices = TclStackAlloc(interp, sizeof(int) * numHandlers); + + for (i=0 ; itype != TCL_TOKEN_SIMPLE_WORD) { + goto failedToCompile; + } + if (tokenPtr[1].size == 4 + && !strncmp(tokenPtr[1].start, "trap", 4)) { + /* + * Parse the list of errorCode words to match against. + */ + + matchCodes[i] = TCL_ERROR; + tokenPtr = TokenAfter(tokenPtr); + TclNewObj(tmpObj); + Tcl_IncrRefCount(tmpObj); + if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj) + || Tcl_ListObjLength(NULL, tmpObj, &objc) != TCL_OK + || (objc == 0)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + Tcl_ListObjReplace(NULL, tmpObj, 0, 0, 0, NULL); + matchClauses[i] = tmpObj; + } else if (tokenPtr[1].size == 2 + && !strncmp(tokenPtr[1].start, "on", 2)) { + int code; + static const char *codes[] = { + "ok", "error", "return", "break", "continue", NULL + }; + + /* + * Parse the result code to look for. + */ + + tokenPtr = TokenAfter(tokenPtr); + TclNewObj(tmpObj); + Tcl_IncrRefCount(tmpObj); + if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + if (Tcl_GetIntFromObj(NULL, tmpObj, &code) != TCL_OK + && Tcl_GetIndexFromObj(NULL, tmpObj, codes, "", + TCL_EXACT, &code) != TCL_OK) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + matchCodes[i] = code; + TclDecrRefCount(tmpObj); + } else { + goto failedToCompile; + } + + /* + * Parse the variable binding. + */ + + tokenPtr = TokenAfter(tokenPtr); + TclNewObj(tmpObj); + Tcl_IncrRefCount(tmpObj); + if (!TclWordKnownAtCompileTime(tokenPtr, tmpObj)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + if (Tcl_ListObjGetElements(NULL, tmpObj, &objc, &objv) != TCL_OK + || (objc > 2)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + if (objc > 0) { + int len; + const char *varname = Tcl_GetStringFromObj(objv[0], &len); + + if (!TclIsLocalScalar(varname, len)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + resultVarIndices[i] = + TclFindCompiledLocal(varname, len, 1, envPtr); + } else { + resultVarIndices[i] = -1; + } + if (objc == 2) { + int len; + const char *varname = Tcl_GetStringFromObj(objv[1], &len); + + if (!TclIsLocalScalar(varname, len)) { + TclDecrRefCount(tmpObj); + goto failedToCompile; + } + optionVarIndices[i] = + TclFindCompiledLocal(varname, len, 1, envPtr); + } else { + optionVarIndices[i] = -1; + } + TclDecrRefCount(tmpObj); + + /* + * Extract the body for this handler. + */ + + tokenPtr = TokenAfter(tokenPtr); + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { + goto failedToCompile; + } + if (tokenPtr[1].size == 1 && tokenPtr[1].start[0] == '-') { + handlerTokens[i] = NULL; + } else { + handlerTokens[i] = tokenPtr; + } + + tokenPtr = TokenAfter(tokenPtr); + } + + if (handlerTokens[numHandlers-1] == NULL) { + goto failedToCompile; + } + } + + /* + * Parse the finally clause + */ + + if (numWords == 0) { + finallyToken = NULL; + } else if (numWords == 2) { + if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD || tokenPtr[1].size != 7 + || strncmp(tokenPtr[1].start, "finally", 7)) { + goto failedToCompile; + } + finallyToken = TokenAfter(tokenPtr); + } else { + goto failedToCompile; + } + + /* + * Issue the bytecode. + */ + + if (finallyToken) { + result = IssueTryFinallyInstructions(interp, envPtr, bodyToken, + numHandlers, matchCodes, matchClauses, resultVarIndices, + optionVarIndices, handlerTokens, finallyToken); + } else { + result = IssueTryInstructions(interp, envPtr, bodyToken, numHandlers, + matchCodes, matchClauses, resultVarIndices, optionVarIndices, + handlerTokens); + } + + /* + * Delete any temporary state and finish off. + */ + + failedToCompile: + if (numHandlers > 0) { + for (i=0 ; i= 0) { + OP4( LOAD_SCALAR4, resultVar); + OP4( STORE_SCALAR4, resultVars[i]); + OP( POP); + if (optionVars[i] >= 0) { + OP4( LOAD_SCALAR4, optionsVar); + OP4( STORE_SCALAR4, optionVars[i]); + OP( POP); + } + } + if (!handlerTokens[i]) { + forwardsNeedFixing = 1; + JUMP(forwardsToFix[i], JUMP4); + } else { + forwardsToFix[i] = -1; + if (forwardsNeedFixing) { + forwardsNeedFixing = 0; + for (j=0 ; jcurrStackDepth; + int range, resultVar, optionsVar, i, j, len, forwardsNeedFixing = 0; + int *addrsToFix, *forwardsToFix, notCodeJumpSource, notECJumpSource; + char buf[TCL_INTEGER_SPACE]; + + resultVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); + optionsVar = TclFindCompiledLocal(NULL, 0, 1, envPtr); + if (resultVar < 0 || optionsVar < 0) { + return TCL_ERROR; + } + + /* + * Compile the body, trapping any error in it so that we can trap on it + * (if any trap matches) and run a finally clause. + */ + + range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); + OP4( BEGIN_CATCH4, range); + ExceptionRangeStarts(envPtr, range); + BODY( bodyToken, 1); + ExceptionRangeEnds(envPtr, range); + OP1( JUMP1, 3); + ExceptionRangeTarget(envPtr, range, catchOffset); + OP( PUSH_RESULT); + OP4( STORE_SCALAR4, resultVar); + OP( POP); + OP( PUSH_RETURN_OPTIONS); + OP4( STORE_SCALAR4, optionsVar); + OP( POP); + OP( PUSH_RETURN_CODE); + OP( END_CATCH); + envPtr->currStackDepth = savedStackDepth + 1; + + /* + * Now we handle all the registered 'on' and 'trap' handlers in order. + */ + + if (numHandlers) { + /* + * Slight overallocation, but reduces size of this function. + */ + + addrsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); + forwardsToFix = TclStackAlloc(interp, sizeof(int)*numHandlers); + + for (i=0 ; i= 0 || handlerTokens[i]) { + range = DeclareExceptionRange(envPtr, CATCH_EXCEPTION_RANGE); + OP4( BEGIN_CATCH4, range); + ExceptionRangeStarts(envPtr, range); + } + if (resultVars[i] >= 0) { + OP4( LOAD_SCALAR4, resultVar); + OP4( STORE_SCALAR4, resultVars[i]); + OP( POP); + if (optionVars[i] >= 0) { + OP4( LOAD_SCALAR4, optionsVar); + OP4( STORE_SCALAR4, optionVars[i]); + OP( POP); + } + } + if (!handlerTokens[i]) { + /* + * No handler. Will not be the last handler (that condition is + * checked by the caller). Chain to the next one. + */ + + ExceptionRangeEnds(envPtr, range); + forwardsNeedFixing = 1; + JUMP(forwardsToFix[i], JUMP4); + if (resultVars[i] >= 0) { + goto finishTrapCatchHandling; + } + } else { + /* + * Got a handler. Make sure that any pending patch-up actions + * from previous unprocessed handlers are dealt with now that + * we know where they are to jump to. + */ + + if (forwardsNeedFixing) { + forwardsNeedFixing = 0; + OP1( JUMP1, 7); + for (j=0 ; jcurrStackDepth = savedStackDepth; + + /* + * Process the finally clause (at last!) Note that we do not wrap this in + * error handlers because we would just rethrow immediately anyway. Then + * (on normal success) we reissue the exception. Note also that + * INST_RETURN_STK can proceed to the next instruction; that'll be the + * next command (or some inter-command manipulation). + */ + + BODY( finallyToken, 3 + 4*numHandlers); + OP( POP); + OP4( LOAD_SCALAR4, optionsVar); + OP4( LOAD_SCALAR4, resultVar); + OP( RETURN_STK); + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompileUnsetCmd -- + * + * Procedure called to compile the "unset" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "unset" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileUnsetCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + Tcl_Token *varTokenPtr; + int isScalar, simpleVarName, localIndex, numWords, flags, i; + Tcl_Obj *leadingWord; + DefineLineInformation; /* TIP #280 */ + + numWords = parsePtr->numWords-1; + flags = 1; + varTokenPtr = TokenAfter(parsePtr->tokenPtr); + leadingWord = Tcl_NewObj(); + if (TclWordKnownAtCompileTime(varTokenPtr, leadingWord)) { + int len; + const char *bytes = Tcl_GetStringFromObj(leadingWord, &len); + + if (len == 11 && !strncmp("-nocomplain", bytes, 11)) { + flags = 0; + varTokenPtr = TokenAfter(varTokenPtr); + numWords--; + } else if (len == 2 && !strncmp("--", bytes, 2)) { + varTokenPtr = TokenAfter(varTokenPtr); + numWords--; + } + } else { + /* + * Cannot guarantee that the first word is not '-nocomplain' at + * evaluation with reasonable effort, so spill to interpreted version. + */ + + return TCL_ERROR; + } + TclDecrRefCount(leadingWord); + + for (i=0 ; icurrStackDepth; + int loopMayEnd = 1; /* This is set to 0 if it is recognized as an + * infinite loop. */ + Tcl_Obj *boolObj; + DefineLineInformation; /* TIP #280 */ + + if (parsePtr->numWords != 3) { + return TCL_ERROR; + } + + /* + * If the test expression requires substitutions, don't compile the while + * command inline. E.g., the expression might cause the loop to never + * execute or execute forever, as in "while "$x < 5" {}". + * + * Bail out also if the body expression requires substitutions in order to + * insure correct behaviour [Bug 219166] + */ + + testTokenPtr = TokenAfter(parsePtr->tokenPtr); + bodyTokenPtr = TokenAfter(testTokenPtr); + + if ((testTokenPtr->type != TCL_TOKEN_SIMPLE_WORD) + || (bodyTokenPtr->type != TCL_TOKEN_SIMPLE_WORD)) { + return TCL_ERROR; + } + + /* + * Find out if the condition is a constant. + */ + + boolObj = Tcl_NewStringObj(testTokenPtr[1].start, testTokenPtr[1].size); + Tcl_IncrRefCount(boolObj); + code = Tcl_GetBooleanFromObj(NULL, boolObj, &boolVal); + TclDecrRefCount(boolObj); + if (code == TCL_OK) { + if (boolVal) { + /* + * It is an infinite loop; flag it so that we generate a more + * efficient body. + */ + + loopMayEnd = 0; + } else { + /* + * This is an empty loop: "while 0 {...}" or such. Compile no + * bytecodes. + */ + + goto pushResult; + } + } + + /* + * Create a ExceptionRange record for the loop body. This is used to + * implement break and continue. + */ + + range = DeclareExceptionRange(envPtr, LOOP_EXCEPTION_RANGE); + + /* + * Jump to the evaluation of the condition. This code uses the "loop + * rotation" optimisation (which eliminates one branch from the loop). + * "while cond body" produces then: + * goto A + * B: body : bodyCodeOffset + * A: cond -> result : testCodeOffset, continueOffset + * if (result) goto B + * + * The infinite loop "while 1 body" produces: + * B: body : all three offsets here + * goto B + */ + + if (loopMayEnd) { + TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, + &jumpEvalCondFixup); + testCodeOffset = 0; /* Avoid compiler warning. */ + } else { + /* + * Make sure that the first command in the body is preceded by an + * INST_START_CMD, and hence counted properly. [Bug 1752146] + */ + + envPtr->atCmdStart = 0; + testCodeOffset = CurrentOffset(envPtr); + } + + /* + * Compile the loop body. + */ + + SetLineInformation(2); + bodyCodeOffset = ExceptionRangeStarts(envPtr, range); + CompileBody(envPtr, bodyTokenPtr, interp); + ExceptionRangeEnds(envPtr, range); + envPtr->currStackDepth = savedStackDepth + 1; + TclEmitOpcode(INST_POP, envPtr); + + /* + * Compile the test expression then emit the conditional jump that + * terminates the while. We already know it's a simple word. + */ + + if (loopMayEnd) { + testCodeOffset = CurrentOffset(envPtr); + jumpDist = testCodeOffset - jumpEvalCondFixup.codeOffset; + if (TclFixupForwardJump(envPtr, &jumpEvalCondFixup, jumpDist, 127)) { + bodyCodeOffset += 3; + testCodeOffset += 3; + } + envPtr->currStackDepth = savedStackDepth; + SetLineInformation(1); + TclCompileExprWords(interp, testTokenPtr, 1, envPtr); + envPtr->currStackDepth = savedStackDepth + 1; + + jumpDist = CurrentOffset(envPtr) - bodyCodeOffset; + if (jumpDist > 127) { + TclEmitInstInt4(INST_JUMP_TRUE4, -jumpDist, envPtr); + } else { + TclEmitInstInt1(INST_JUMP_TRUE1, -jumpDist, envPtr); + } + } else { + jumpDist = CurrentOffset(envPtr) - bodyCodeOffset; + if (jumpDist > 127) { + TclEmitInstInt4(INST_JUMP4, -jumpDist, envPtr); + } else { + TclEmitInstInt1(INST_JUMP1, -jumpDist, envPtr); + } + } + + /* + * Set the loop's body, continue and break offsets. + */ + + envPtr->exceptArrayPtr[range].continueOffset = testCodeOffset; + envPtr->exceptArrayPtr[range].codeOffset = bodyCodeOffset; + ExceptionRangeTarget(envPtr, range, breakOffset); + + /* + * The while command's result is an empty string. + */ + + pushResult: + envPtr->currStackDepth = savedStackDepth; + PushLiteral(envPtr, "", 0); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * PushVarName -- + * + * Procedure used in the compiling where pushing a variable name is + * necessary (append, lappend, set). + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "set" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +static int +PushVarName( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Token *varTokenPtr, /* Points to a variable token. */ + CompileEnv *envPtr, /* Holds resulting instructions. */ + int flags, /* TCL_NO_LARGE_INDEX. */ + int *localIndexPtr, /* Must not be NULL. */ + int *simpleVarNamePtr, /* Must not be NULL. */ + int *isScalarPtr, /* Must not be NULL. */ + int line, /* Line the token starts on. */ + int *clNext) /* Reference to offset of next hidden cont. + * line. */ +{ + register const char *p; + const char *name, *elName; + register int i, n; + Tcl_Token *elemTokenPtr = NULL; + int nameChars, elNameChars, simpleVarName, localIndex; + int elemTokenCount = 0, allocedTokens = 0, removedParen = 0; + + /* + * Decide if we can use a frame slot for the var/array name or if we need + * to emit code to compute and push the name at runtime. We use a frame + * slot (entry in the array of local vars) if we are compiling a procedure + * body and if the name is simple text that does not include namespace + * qualifiers. + */ + + simpleVarName = 0; + name = elName = NULL; + nameChars = elNameChars = 0; + localIndex = -1; + + /* + * Check not only that the type is TCL_TOKEN_SIMPLE_WORD, but whether + * curly braces surround the variable name. This really matters for array + * elements to handle things like + * set {x($foo)} 5 + * which raises an undefined var error if we are not careful here. + */ + + if ((varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) && + (varTokenPtr->start[0] != '{')) { + /* + * A simple variable name. Divide it up into "name" and "elName" + * strings. If it is not a local variable, look it up at runtime. + */ + + simpleVarName = 1; + + name = varTokenPtr[1].start; + nameChars = varTokenPtr[1].size; + if (name[nameChars-1] == ')') { + /* + * last char is ')' => potential array reference. + */ + + for (i=0,p=name ; itype = TCL_TOKEN_TEXT; + elemTokenPtr->start = elName; + elemTokenPtr->size = elNameChars; + elemTokenPtr->numComponents = 0; + elemTokenCount = 1; + } + } + } else if (((n = varTokenPtr->numComponents) > 1) + && (varTokenPtr[1].type == TCL_TOKEN_TEXT) + && (varTokenPtr[n].type == TCL_TOKEN_TEXT) + && (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) { + /* + * Check for parentheses inside first token. + */ + + simpleVarName = 0; + for (i = 0, p = varTokenPtr[1].start; + i < varTokenPtr[1].size; i++, p++) { + if (*p == '(') { + simpleVarName = 1; + break; + } + } + if (simpleVarName) { + int remainingChars; + + /* + * Check the last token: if it is just ')', do not count it. + * Otherwise, remove the ')' and flag so that it is restored at + * the end. + */ + + if (varTokenPtr[n].size == 1) { + --n; + } else { + --varTokenPtr[n].size; + removedParen = n; + } + + name = varTokenPtr[1].start; + nameChars = p - varTokenPtr[1].start; + elName = p + 1; + remainingChars = (varTokenPtr[2].start - p) - 1; + elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 2; + + if (remainingChars) { + /* + * Make a first token with the extra characters in the first + * token. + */ + + elemTokenPtr = TclStackAlloc(interp, n * sizeof(Tcl_Token)); + allocedTokens = 1; + elemTokenPtr->type = TCL_TOKEN_TEXT; + elemTokenPtr->start = elName; + elemTokenPtr->size = remainingChars; + elemTokenPtr->numComponents = 0; + elemTokenCount = n; + + /* + * Copy the remaining tokens. + */ + + memcpy(elemTokenPtr+1, varTokenPtr+2, + (n-1) * sizeof(Tcl_Token)); + } else { + /* + * Use the already available tokens. + */ + + elemTokenPtr = &varTokenPtr[2]; + elemTokenCount = n - 1; + } + } + } + + if (simpleVarName) { + /* + * See whether name has any namespace separators (::'s). + */ + + int hasNsQualifiers = 0; + + for (i = 0, p = name; i < nameChars; i++, p++) { + if ((*p == ':') && ((i+1) < nameChars) && (*(p+1) == ':')) { + hasNsQualifiers = 1; + break; + } + } + + /* + * Look up the var name's index in the array of local vars in the proc + * frame. If retrieving the var's value and it doesn't already exist, + * push its name and look it up at runtime. + */ + + if (!hasNsQualifiers) { + localIndex = TclFindCompiledLocal(name, nameChars, + 1, envPtr); + if ((flags & TCL_NO_LARGE_INDEX) && (localIndex > 255)) { + /* + * We'll push the name. + */ + + localIndex = -1; + } + } + if (localIndex < 0) { + PushLiteral(envPtr, name, nameChars); + } + + /* + * Compile the element script, if any. + */ + + if (elName != NULL) { + if (elNameChars) { + envPtr->line = line; + envPtr->clNext = clNext; + TclCompileTokens(interp, elemTokenPtr, elemTokenCount, + envPtr); + } else { + PushLiteral(envPtr, "", 0); + } + } + } else { + /* + * The var name isn't simple: compile and push it. + */ + + envPtr->line = line; + envPtr->clNext = clNext; + CompileTokens(envPtr, varTokenPtr, interp); + } + + if (removedParen) { + ++varTokenPtr[removedParen].size; + } + if (allocedTokens) { + TclStackFree(interp, elemTokenPtr); + } + *localIndexPtr = localIndex; + *simpleVarNamePtr = simpleVarName; + *isScalarPtr = (elName == NULL); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * CompileUnaryOpCmd -- + * + * Utility routine to compile the unary operator commands. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the compiled command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +static int +CompileUnaryOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + int instruction, + CompileEnv *envPtr) +{ + Tcl_Token *tokenPtr; + DefineLineInformation; /* TIP #280 */ + + if (parsePtr->numWords != 2) { + return TCL_ERROR; + } + tokenPtr = TokenAfter(parsePtr->tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 1); + TclEmitOpcode(instruction, envPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * CompileAssociativeBinaryOpCmd -- + * + * Utility routine to compile the binary operator commands that accept an + * arbitrary number of arguments, and that are associative operations. + * Because of the associativity, we may combine operations from right to + * left, saving us any effort of re-ordering the arguments on the stack + * after substitutions are completed. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the compiled command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +static int +CompileAssociativeBinaryOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + const char *identity, + int instruction, + CompileEnv *envPtr) +{ + Tcl_Token *tokenPtr = parsePtr->tokenPtr; + DefineLineInformation; /* TIP #280 */ + int words; + + for (words=1 ; wordsnumWords ; words++) { + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, words); + } + if (parsePtr->numWords <= 2) { + PushLiteral(envPtr, identity, -1); + words++; + } + if (words > 3) { + /* + * Reverse order of arguments to get precise agreement with [expr] in + * calcuations, including roundoff errors. + */ + + TclEmitInstInt4(INST_REVERSE, words-1, envPtr); + } + while (--words > 1) { + TclEmitOpcode(instruction, envPtr); + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * CompileStrictlyBinaryOpCmd -- + * + * Utility routine to compile the binary operator commands, that strictly + * accept exactly two arguments. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the compiled command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +static int +CompileStrictlyBinaryOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + int instruction, + CompileEnv *envPtr) +{ + if (parsePtr->numWords != 3) { + return TCL_ERROR; + } + return CompileAssociativeBinaryOpCmd(interp, parsePtr, + NULL, instruction, envPtr); +} + +/* + *---------------------------------------------------------------------- + * + * CompileComparisonOpCmd -- + * + * Utility routine to compile the n-ary comparison operator commands. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the compiled command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +static int +CompileComparisonOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + int instruction, + CompileEnv *envPtr) +{ + Tcl_Token *tokenPtr; + DefineLineInformation; /* TIP #280 */ + + if (parsePtr->numWords < 3) { + PushLiteral(envPtr, "1", 1); + } else if (parsePtr->numWords == 3) { + tokenPtr = TokenAfter(parsePtr->tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 1); + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 2); + TclEmitOpcode(instruction, envPtr); + } else if (envPtr->procPtr == NULL) { + /* + * No local variable space! + */ + + return TCL_ERROR; + } else { + int tmpIndex = TclFindCompiledLocal(NULL, 0, 1, envPtr); + int words; + + tokenPtr = TokenAfter(parsePtr->tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 1); + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, 2); + if (tmpIndex <= 255) { + TclEmitInstInt1(INST_STORE_SCALAR1, tmpIndex, envPtr); + } else { + TclEmitInstInt4(INST_STORE_SCALAR4, tmpIndex, envPtr); + } + TclEmitOpcode(instruction, envPtr); + for (words=3 ; wordsnumWords ;) { + if (tmpIndex <= 255) { + TclEmitInstInt1(INST_LOAD_SCALAR1, tmpIndex, envPtr); + } else { + TclEmitInstInt4(INST_LOAD_SCALAR4, tmpIndex, envPtr); + } + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, words); + if (++words < parsePtr->numWords) { + if (tmpIndex <= 255) { + TclEmitInstInt1(INST_STORE_SCALAR1, tmpIndex, envPtr); + } else { + TclEmitInstInt4(INST_STORE_SCALAR4, tmpIndex, envPtr); + } + } + TclEmitOpcode(instruction, envPtr); + } + for (; words>3 ; words--) { + TclEmitOpcode(INST_BITAND, envPtr); + } + + /* + * Drop the value from the temp variable; retaining that reference + * might be expensive elsewhere. + */ + + PushLiteral(envPtr, "", 0); + if (tmpIndex <= 255) { + TclEmitInstInt1(INST_STORE_SCALAR1, tmpIndex, envPtr); + } else { + TclEmitInstInt4(INST_STORE_SCALAR4, tmpIndex, envPtr); + } + TclEmitOpcode(INST_POP, envPtr); + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * TclCompile*OpCmd -- + * + * Procedures called to compile the corresponding "::tcl::mathop::*" + * commands. These are all wrappers around the utility operator command + * compiler functions, except for the compilers for subtraction and + * division, which are special. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the compiled command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileInvertOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileUnaryOpCmd(interp, parsePtr, INST_BITNOT, envPtr); +} + +int +TclCompileNotOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileUnaryOpCmd(interp, parsePtr, INST_LNOT, envPtr); +} + +int +TclCompileAddOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_ADD, + envPtr); +} + +int +TclCompileMulOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileAssociativeBinaryOpCmd(interp, parsePtr, "1", INST_MULT, + envPtr); +} + +int +TclCompileAndOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileAssociativeBinaryOpCmd(interp, parsePtr, "-1", INST_BITAND, + envPtr); +} + +int +TclCompileOrOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_BITOR, + envPtr); +} + +int +TclCompileXorOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileAssociativeBinaryOpCmd(interp, parsePtr, "0", INST_BITXOR, + envPtr); +} + +int +TclCompilePowOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + /* + * This one has its own implementation because the ** operator is the only + * one with right associativity. + */ + + Tcl_Token *tokenPtr = parsePtr->tokenPtr; + DefineLineInformation; /* TIP #280 */ + int words; + + for (words=1 ; wordsnumWords ; words++) { + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, words); + } + if (parsePtr->numWords <= 2) { + PushLiteral(envPtr, "1", 1); + words++; + } + while (--words > 1) { + TclEmitOpcode(INST_EXPON, envPtr); + } + return TCL_OK; +} + +int +TclCompileLshiftOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LSHIFT, envPtr); +} + +int +TclCompileRshiftOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_RSHIFT, envPtr); +} + +int +TclCompileModOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_MOD, envPtr); +} + +int +TclCompileNeqOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_NEQ, envPtr); +} + +int +TclCompileStrneqOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_STR_NEQ, envPtr); +} + +int +TclCompileInOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LIST_IN, envPtr); +} + +int +TclCompileNiOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileStrictlyBinaryOpCmd(interp, parsePtr, INST_LIST_NOT_IN, + envPtr); +} + +int +TclCompileLessOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileComparisonOpCmd(interp, parsePtr, INST_LT, envPtr); +} + +int +TclCompileLeqOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileComparisonOpCmd(interp, parsePtr, INST_LE, envPtr); +} + +int +TclCompileGreaterOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileComparisonOpCmd(interp, parsePtr, INST_GT, envPtr); +} + +int +TclCompileGeqOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileComparisonOpCmd(interp, parsePtr, INST_GE, envPtr); +} + +int +TclCompileEqOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileComparisonOpCmd(interp, parsePtr, INST_EQ, envPtr); +} + +int +TclCompileStreqOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + return CompileComparisonOpCmd(interp, parsePtr, INST_STR_EQ, envPtr); +} + +int +TclCompileMinusOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + Tcl_Token *tokenPtr = parsePtr->tokenPtr; + DefineLineInformation; /* TIP #280 */ + int words; + + if (parsePtr->numWords == 1) { + /* + * Fallback to direct eval to report syntax error. + */ + + return TCL_ERROR; + } + for (words=1 ; wordsnumWords ; words++) { + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, words); + } + if (words == 2) { + TclEmitOpcode(INST_UMINUS, envPtr); + return TCL_OK; + } + if (words == 3) { + TclEmitOpcode(INST_SUB, envPtr); + return TCL_OK; + } + + /* + * Reverse order of arguments to get precise agreement with [expr] in + * calcuations, including roundoff errors. + */ + + TclEmitInstInt4(INST_REVERSE, words-1, envPtr); + while (--words > 1) { + TclEmitInstInt4(INST_REVERSE, 2, envPtr); + TclEmitOpcode(INST_SUB, envPtr); + } + return TCL_OK; +} + +int +TclCompileDivOpCmd( + Tcl_Interp *interp, + Tcl_Parse *parsePtr, + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) +{ + Tcl_Token *tokenPtr = parsePtr->tokenPtr; + DefineLineInformation; /* TIP #280 */ + int words; + + if (parsePtr->numWords == 1) { + /* + * Fallback to direct eval to report syntax error. + */ + + return TCL_ERROR; + } + if (parsePtr->numWords == 2) { + PushLiteral(envPtr, "1.0", 3); + } + for (words=1 ; wordsnumWords ; words++) { + tokenPtr = TokenAfter(tokenPtr); + CompileWord(envPtr, tokenPtr, interp, words); + } + if (words <= 3) { + TclEmitOpcode(INST_DIV, envPtr); + return TCL_OK; + } + + /* + * Reverse order of arguments to get precise agreement with [expr] in + * calcuations, including roundoff errors. + */ + + TclEmitInstInt4(INST_REVERSE, words-1, envPtr); + while (--words > 1) { + TclEmitInstInt4(INST_REVERSE, 2, envPtr); + TclEmitOpcode(INST_DIV, envPtr); + } + return TCL_OK; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/unix/Makefile.in b/unix/Makefile.in index 1cf2c71..f90ecfb 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.291 2010/02/26 11:05:22 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.292 2010/02/26 14:38:36 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -295,9 +295,9 @@ XTTEST_OBJS = xtTestInit.o tclTest.o tclTestObj.o tclTestProcBodyObj.o \ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o \ - tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompExpr.o \ - tclCompile.o tclConfig.o tclDate.o tclDictObj.o tclEncoding.o \ - tclEnsemble.o \ + tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompCmdsSZ.o \ + tclCompExpr.o tclCompile.o tclConfig.o tclDate.o tclDictObj.o \ + tclEncoding.o tclEnsemble.o \ tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o \ tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o \ tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o \ @@ -394,6 +394,7 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclCmdIL.c \ $(GENERIC_DIR)/tclCmdMZ.c \ $(GENERIC_DIR)/tclCompCmds.c \ + $(GENERIC_DIR)/tclCompCmdsSZ.c \ $(GENERIC_DIR)/tclCompExpr.c \ $(GENERIC_DIR)/tclCompile.c \ $(GENERIC_DIR)/tclConfig.c \ @@ -1039,6 +1040,9 @@ tclDate.o: $(GENERIC_DIR)/tclDate.c tclCompCmds.o: $(GENERIC_DIR)/tclCompCmds.c $(COMPILEHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCompCmds.c +tclCompCmdsSZ.o: $(GENERIC_DIR)/tclCompCmdsSZ.c $(COMPILEHDR) + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCompCmdsSZ.c + tclCompExpr.o: $(GENERIC_DIR)/tclCompExpr.c $(COMPILEHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclCompExpr.c diff --git a/win/Makefile.in b/win/Makefile.in index d7e1041..2a5e97e 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.171 2010/02/13 18:11:06 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.172 2010/02/26 14:38:36 dkf Exp $ VERSION = @TCL_VERSION@ @@ -225,6 +225,7 @@ GENERIC_OBJS = \ tclCmdIL.$(OBJEXT) \ tclCmdMZ.$(OBJEXT) \ tclCompCmds.$(OBJEXT) \ + tclCompCmdsSZ.$(OBJEXT) \ tclCompExpr.$(OBJEXT) \ tclCompile.$(OBJEXT) \ tclConfig.$(OBJEXT) \ diff --git a/win/makefile.bc b/win/makefile.bc index c66acfd..968805a 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -202,6 +202,7 @@ TCLOBJS = \ $(TMPDIR)\tclCmdIL.obj \ $(TMPDIR)\tclCmdMZ.obj \ $(TMPDIR)\tclCompCmds.obj \ + $(TMPDIR)\tclCompCmdsSZ.obj \ $(TMPDIR)\tclCompExpr.obj \ $(TMPDIR)\tclCompile.obj \ $(TMPDIR)\tclConfig.obj \ diff --git a/win/makefile.vc b/win/makefile.vc index 99718f2..b72bb4a 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.206 2010/02/13 18:11:06 dkf Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.207 2010/02/26 14:38:37 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -262,6 +262,7 @@ COREOBJS = \ $(TMP_DIR)\tclCmdIL.obj \ $(TMP_DIR)\tclCmdMZ.obj \ $(TMP_DIR)\tclCompCmds.obj \ + $(TMP_DIR)\tclCompCmdsSZ.obj \ $(TMP_DIR)\tclCompExpr.obj \ $(TMP_DIR)\tclCompile.obj \ $(TMP_DIR)\tclConfig.obj \ -- cgit v0.12 From 2d6c9719837b34ab16c25970b47c1ab1f84e7f02 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Feb 2010 11:51:30 +0000 Subject: Corrections to make things work in the non-cross-compiling case --- unix/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index f90ecfb..92fefa2 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.292 2010/02/26 14:38:36 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.293 2010/02/27 11:51:30 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -627,8 +627,8 @@ ${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o ${TCL_EXE} +# Must be empty so it doesn't conflict with rule for ${TCL_EXE} above ${NATIVE_TCLSH}: - @: Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in $(SHELL) config.status -- cgit v0.12 From 82facaaadc38055a533bb63ecd26a98eccac0373 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Feb 2010 12:07:04 +0000 Subject: * generic/tclMain.c (Tcl_Main): [Bug 801429]: Factor out the holding of the client-installed main loop function into thread-specific data. ***POTENTIAL INCOMPATIBILITY*** Code that previously tried to set the main loop from another thread will now fail. On the other hand, there is a fairly high probability that such programs would have been failing before due to the lack of any kind of inter-thread memory barriers guarding accesses to this part of Tcl's state. --- ChangeLog | 12 +++++++ generic/tclMain.c | 104 ++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 82 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7be6e8d..ce4e1aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-02-27 Donal K. Fellows + + * generic/tclMain.c (Tcl_Main): [Bug 801429]: Factor out the holding + of the client-installed main loop function into thread-specific data. + + ***POTENTIAL INCOMPATIBILITY*** + Code that previously tried to set the main loop from another thread + will now fail. On the other hand, there is a fairly high probability + that such programs would have been failing before due to the lack of + any kind of inter-thread memory barriers guarding accesses to this + part of Tcl's state. + 2010-02-26 Donal K. Fellows * generic/tclCompCmds.c: Split this file into two pieces to make it diff --git a/generic/tclMain.c b/generic/tclMain.c index 60425d9..39bacc1 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMain.c,v 1.48 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclMain.c,v 1.49 2010/02/27 12:07:04 dkf Exp $ */ #include "tclInt.h" @@ -32,16 +32,21 @@ extern CRTIMPORT int isatty(int fd); -typedef struct StartupScript { - Tcl_Obj *path; /* The filename of the script for *_Main() routines - * to [source] as a startup script, or NULL for - * none set, meaning enter interactive mode. */ - Tcl_Obj *encoding; /* The encoding of the startup script file. */ -} StartupScript; - -static Tcl_ThreadDataKey startupScriptKey; +/* + * The thread-local variables for this file's functions. + */ -static Tcl_MainLoopProc *mainLoopProc = NULL; +typedef struct { + Tcl_Obj *path; /* The filename of the script for *_Main() + * routines to [source] as a startup script, + * or NULL for none set, meaning enter + * interactive mode. */ + Tcl_Obj *encoding; /* The encoding of the startup script file. */ + Tcl_MainLoopProc *mainLoopProc; + /* Any installed main loop handler. The main + * extension that installs these is Tk. */ +} ThreadSpecificData; +static Tcl_ThreadDataKey dataKey; /* * Structure definition for information used to keep the state of an @@ -72,6 +77,7 @@ typedef struct InteractiveState { * Forward declarations for functions defined later in this file. */ +static Tcl_MainLoopProc * GetMainLoop(void); static void Prompt(Tcl_Interp *interp, PromptType *promptPtr); static void StdinProc(ClientData clientData, int mask); @@ -96,28 +102,27 @@ Tcl_SetStartupScript( Tcl_Obj *path, /* Filesystem path of startup script file */ const char *encoding) /* Encoding of the data in that file */ { - StartupScript *scriptPtr = Tcl_GetThreadData(&startupScriptKey, - (int) sizeof(StartupScript)); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); Tcl_Obj *newEncoding = NULL; if (encoding != NULL) { newEncoding = Tcl_NewStringObj(encoding, -1); } - if (scriptPtr->path != NULL) { - Tcl_DecrRefCount(scriptPtr->path); + if (tsdPtr->path != NULL) { + Tcl_DecrRefCount(tsdPtr->path); } - scriptPtr->path = path; - if (scriptPtr->path != NULL) { - Tcl_IncrRefCount(scriptPtr->path); + tsdPtr->path = path; + if (tsdPtr->path != NULL) { + Tcl_IncrRefCount(tsdPtr->path); } - if (scriptPtr->encoding != NULL) { - Tcl_DecrRefCount(scriptPtr->encoding); + if (tsdPtr->encoding != NULL) { + Tcl_DecrRefCount(tsdPtr->encoding); } - scriptPtr->encoding = newEncoding; - if (scriptPtr->encoding != NULL) { - Tcl_IncrRefCount(scriptPtr->encoding); + tsdPtr->encoding = newEncoding; + if (tsdPtr->encoding != NULL) { + Tcl_IncrRefCount(tsdPtr->encoding); } } @@ -146,19 +151,18 @@ Tcl_GetStartupScript( const char **encodingPtr) /* When not NULL, points to storage for the * (const char *) that points to the * registered encoding name for the startup - * script */ + * script. */ { - StartupScript *scriptPtr = Tcl_GetThreadData(&startupScriptKey, - (int) sizeof(StartupScript)); + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); if (encodingPtr != NULL) { - if (scriptPtr->encoding == NULL) { + if (tsdPtr->encoding == NULL) { *encodingPtr = NULL; } else { - *encodingPtr = Tcl_GetString(scriptPtr->encoding); + *encodingPtr = Tcl_GetString(tsdPtr->encoding); } } - return scriptPtr->path; + return tsdPtr->path; } /*---------------------------------------------------------------------- @@ -251,6 +255,7 @@ Tcl_Main( const char *encodingName = NULL; PromptType prompt = PROMPT_START; int code, length, tty, exitCode = 0; + Tcl_MainLoopProc *mainLoopProc; Tcl_Channel inChannel, outChannel, errChannel; Tcl_Interp *interp; Tcl_DString appName; @@ -399,6 +404,7 @@ Tcl_Main( inChannel = Tcl_GetStdChannel(TCL_STDIN); outChannel = Tcl_GetStdChannel(TCL_STDOUT); while ((inChannel != NULL) && !Tcl_InterpDeleted(interp)) { + mainLoopProc = GetMainLoop(); if (mainLoopProc == NULL) { if (tty) { Prompt(interp, &prompt); @@ -509,7 +515,7 @@ Tcl_Main( isPtr->interp = interp; Tcl_UnlinkVar(interp, "tcl_interactive"); - Tcl_LinkVar(interp, "tcl_interactive", (char *) &(isPtr->tty), + Tcl_LinkVar(interp, "tcl_interactive", (char *) &isPtr->tty, TCL_LINK_BOOLEAN); Tcl_CreateChannelHandler(inChannel, TCL_READABLE, StdinProc, @@ -517,7 +523,7 @@ Tcl_Main( } mainLoopProc(); - mainLoopProc = NULL; + Tcl_SetMainLoop(NULL); if (inChannel) { tty = isPtr->tty; @@ -543,13 +549,14 @@ Tcl_Main( */ if (tclMemDumpFileName != NULL) { - mainLoopProc = NULL; + Tcl_SetMainLoop(NULL); Tcl_DeleteInterp(interp); } #endif } done: + mainLoopProc = GetMainLoop(); if ((exitCode == 0) && (mainLoopProc != NULL) && !Tcl_LimitExceeded(interp)) { /* @@ -559,7 +566,7 @@ Tcl_Main( */ mainLoopProc(); - mainLoopProc = NULL; + Tcl_SetMainLoop(NULL); } if (commandPtr != NULL) { Tcl_DecrRefCount(commandPtr); @@ -610,7 +617,7 @@ Tcl_Main( * Sets an alternative main loop function. * * Results: - * Returns the previously defined main loop function. + * None. * * Side effects: * This function will be called before Tcl exits, allowing for the @@ -623,7 +630,36 @@ void Tcl_SetMainLoop( Tcl_MainLoopProc *proc) { - mainLoopProc = proc; + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + + tsdPtr->mainLoopProc = proc; +} + +/* + *--------------------------------------------------------------- + * + * GetMainLoop -- + * + * Returns the current alternative main loop function. + * + * Results: + * Returns the previously defined main loop function, or NULL to indicate + * that no such function has been installed and standard tclsh behaviour + * (i.e., exit once the script is evaluated if not interactive) is + * requested.. + * + * Side effects: + * None (other than possible creation of this file's TSD block). + * + *--------------------------------------------------------------- + */ + +static Tcl_MainLoopProc * +GetMainLoop(void) +{ + ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); + + return tsdPtr->mainLoopProc; } /* -- cgit v0.12 From fbada465b441596587db58a5972e6acc516208f2 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 27 Feb 2010 19:02:25 +0000 Subject: Only look for the needle when it fits in the haystack. [Bug 2960021] --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce4e1aa..98c8360 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-02-27 Donal K. Fellows + * generic/tclCmdMZ.c (StringFirstCmd, StringLastCmd): [Bug 2960021]: + Only search for the needle in the haystack when the needle isn't + larger than the haystack. Prevents an odd crash from sometimes + happening when things get mixed up (a common programming error). + * generic/tclMain.c (Tcl_Main): [Bug 801429]: Factor out the holding of the client-installed main loop function into thread-specific data. diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 5ec25b3..af97570 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.201 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.202 2010/02/27 19:02:26 dkf Exp $ */ #include "tclInt.h" @@ -1208,7 +1208,12 @@ StringFirstCmd( } } - if (needleLen > 0) { + /* + * If the length of the needle is more than the length of the haystack, it + * cannot be contained in there so we can avoid searching. [Bug 2960021] + */ + + if (needleLen > 0 && needleLen <= haystackLen) { register Tcl_UniChar *p, *end; end = haystackStr + haystackLen - needleLen + 1; @@ -1313,7 +1318,12 @@ StringLastCmd( p = haystackStr + haystackLen - needleLen; } - if (needleLen > 0) { + /* + * If the length of the needle is more than the length of the haystack, it + * cannot be contained in there so we can avoid searching. [Bug 2960021] + */ + + if (needleLen > 0 && needleLen <= haystackLen) { for (; p >= haystackStr; p--) { /* * Scan backwards to find the first character. -- cgit v0.12 From 51d18971aabe6812540c7f9220ef39ec630ac6ba Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 28 Feb 2010 09:05:55 +0000 Subject: Fix Bug #2959713: Link error with gcc 4.1 --- ChangeLog | 4 ++++ generic/tclStubInit.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 98c8360..26a2a31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-02-28 Jan Nijtmans + + * generic/tclStubInit.c Fix Bug #2959713: Link error with gcc 4.1 + 2010-02-27 Donal K. Fellows * generic/tclCmdMZ.c (StringFirstCmd, StringLastCmd): [Bug 2960021]: diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 8f651ef..d4dfdbe 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.187 2010/02/15 22:56:20 nijtmans Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.188 2010/02/28 09:05:56 nijtmans Exp $ */ #include "tclInt.h" @@ -42,6 +42,7 @@ */ MODULE_SCOPE const TclStubs tclStubs; +MODULE_SCOPE const TclTomMathStubs tclTomMathStubs; /* !BEGIN!: Do not edit below this line. */ -- cgit v0.12 From 294846060a28508a5a5c4d42a5b1dd7770b7f4c7 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 28 Feb 2010 20:12:45 +0000 Subject: More additions of {TCL LOOKUP} error-code generation to various subcommands of [info] as part of long-term project to classify all Tcl's generated errors. --- ChangeLog | 8 +++++++- generic/tclCmdIL.c | 10 +++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26a2a31..33f1ba4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ +2010-02-28 Donal K. Fellows + + * generic/tclCmdIL.c: More additions of {TCL LOOKUP} error-code + generation to various subcommands of [info] as part of long-term + project to classify all Tcl's generated errors. + 2010-02-28 Jan Nijtmans - * generic/tclStubInit.c Fix Bug #2959713: Link error with gcc 4.1 + * generic/tclStubInit.c: [Bug 2959713]: Link error with gcc 4.1 2010-02-27 Donal K. Fellows diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index fff4e14..2a4a260 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.177 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.178 2010/02/28 20:12:48 dkf Exp $ */ #include "tclInt.h" @@ -487,6 +487,7 @@ InfoArgsCmd( procPtr = TclFindProc(iPtr, name); if (procPtr == NULL) { Tcl_AppendResult(interp, "\"", name, "\" isn't a procedure", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL); return TCL_ERROR; } @@ -547,6 +548,7 @@ InfoBodyCmd( procPtr = TclFindProc(iPtr, name); if (procPtr == NULL) { Tcl_AppendResult(interp, "\"", name, "\" isn't a procedure", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL); return TCL_ERROR; } @@ -975,6 +977,7 @@ InfoDefaultCmd( procPtr = TclFindProc(iPtr, procName); if (procPtr == NULL) { Tcl_AppendResult(interp, "\"", procName, "\" isn't a procedure",NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL); return TCL_ERROR; } @@ -1005,6 +1008,7 @@ InfoDefaultCmd( Tcl_AppendResult(interp, "procedure \"", procName, "\" doesn't have an argument \"", argName, "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARGUMENT", argName, NULL); return TCL_ERROR; defStoreError: @@ -1128,6 +1132,8 @@ InfoFrameCmd( levelError: Tcl_AppendResult(interp, "bad level \"", TclGetString(objv[1]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_FRAME", + TclGetString(obj[1]), NULL); return TCL_ERROR; } @@ -1523,6 +1529,8 @@ InfoLevelCmd( levelError: Tcl_AppendResult(interp, "bad level \"", TclGetString(objv[1]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_LEVEL", + TclGetString(objv[1]), NULL); return TCL_ERROR; } -- cgit v0.12 From 1592955d3d971dec6ac19643471d60ecb1240bab Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 28 Feb 2010 21:15:11 +0000 Subject: Oops! [Bug 2960852] --- generic/tclCmdIL.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 2a4a260..85f9696 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.178 2010/02/28 20:12:48 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.179 2010/02/28 21:15:11 dkf Exp $ */ #include "tclInt.h" @@ -977,7 +977,8 @@ InfoDefaultCmd( procPtr = TclFindProc(iPtr, procName); if (procPtr == NULL) { Tcl_AppendResult(interp, "\"", procName, "\" isn't a procedure",NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", procName, + NULL); return TCL_ERROR; } @@ -1133,7 +1134,7 @@ InfoFrameCmd( Tcl_AppendResult(interp, "bad level \"", TclGetString(objv[1]), "\"", NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_FRAME", - TclGetString(obj[1]), NULL); + TclGetString(objv[1]), NULL); return TCL_ERROR; } @@ -3995,12 +3996,14 @@ Tcl_LsortObjCmd( * "repeated" elements in each of the left and right lists. In that case, * if any element of the left list is equivalent to one in the right list * it is omitted from the merged list. - * This simplified mechanism works because of the special way - * our MergeSort creates the sublists to be merged and will fail to - * eliminate all repeats in the general case where they are already - * present in either the left or right list. A general code would need to - * skip adjacent initial repeats in the left and right lists before - * comparing their initial elements, at each step. + * + * This simplified mechanism works because of the special way our + * MergeSort creates the sublists to be merged and will fail to eliminate + * all repeats in the general case where they are already present in + * either the left or right list. A general code would need to skip + * adjacent initial repeats in the left and right lists before comparing + * their initial elements, at each step. + * *---------------------------------------------------------------------- */ -- cgit v0.12 From 96f932d0209b23eaf5071be70dda9796f1d1ef39 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 1 Mar 2010 14:57:46 +0000 Subject: Refrain from a possibly lengthy reverse-DNS lookup on 0.0.0.0 when calling [fconfigure -sockname] on an universally-bound (default) server socket. --- ChangeLog | 6 ++++++ unix/tclUnixSock.c | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33f1ba4..6bf0af1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-01 Alexandre Ferrieux + + * unix/tclUnixSock.c: Refrain from a possibly lengthy reverse-DNS + lookup on 0.0.0.0 when calling [fconfigure -sockname] on an + universally-bound (default) server socket. + 2010-02-28 Donal K. Fellows * generic/tclCmdIL.c: More additions of {TCL LOOKUP} error-code diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 1c852ce..8169357 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixSock.c,v 1.23 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.24 2010/03/01 14:57:47 ferrieux Exp $ */ #include "tclInt.h" @@ -685,9 +685,13 @@ TcpGetOptionProc( Tcl_DStringStartSublist(dsPtr); } Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); - hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ - (char *) &sockname.sin_addr, - sizeof(sockname.sin_addr), AF_INET); + if (sockname.sin_addr.s_addr == INADDR_ANY) { + hostEntPtr = NULL; /* we don't want to resolve INADDR_ANY */ + } else { + hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ + (char *) &sockname.sin_addr, + sizeof(sockname.sin_addr), AF_INET); + } if (hostEntPtr != NULL) { Tcl_DString ds; @@ -1335,5 +1339,7 @@ TcpAccept( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ -- cgit v0.12 From 40fac87a4b5eb36ddf12e7a72de80cedad5a6158 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Mar 2010 15:00:45 +0000 Subject: Make the code prettier --- unix/tclUnixSock.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 8169357..97217ba 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixSock.c,v 1.24 2010/03/01 14:57:47 ferrieux Exp $ + * RCS: @(#) $Id: tclUnixSock.c,v 1.25 2010/03/01 15:00:45 dkf Exp $ */ #include "tclInt.h" @@ -686,11 +686,16 @@ TcpGetOptionProc( } Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr)); if (sockname.sin_addr.s_addr == INADDR_ANY) { - hostEntPtr = NULL; /* we don't want to resolve INADDR_ANY */ + /* + * We don't want to resolve INADDR_ANY; it can sometimes cause + * problems (and never has a name). + */ + + hostEntPtr = NULL; } else { - hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ - (char *) &sockname.sin_addr, - sizeof(sockname.sin_addr), AF_INET); + hostEntPtr = TclpGetHostByAddr( /* INTL: Native. */ + (char *) &sockname.sin_addr, + sizeof(sockname.sin_addr), AF_INET); } if (hostEntPtr != NULL) { Tcl_DString ds; -- cgit v0.12 From 0e6bbcf25f9e4b6964290efecf6ca3e0e416426d Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 1 Mar 2010 22:20:50 +0000 Subject: fix [AT 86258]: special-casing of empty tables when generating error messages for [::tcl::prefix match]. --- ChangeLog | 3 +++ generic/tclIndexObj.c | 26 +++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bf0af1..b75d6aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ lookup on 0.0.0.0 when calling [fconfigure -sockname] on an universally-bound (default) server socket. + * generic/tclIndexObj.c: fix [AT 86258]: special-casing of empty + tables when generating error messages for [::tcl::prefix match]. + 2010-02-28 Donal K. Fellows * generic/tclCmdIL.c: More additions of {TCL LOOKUP} error-code diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index f631d73..ee1ec43 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.55 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.56 2010/03/01 22:20:51 ferrieux Exp $ */ #include "tclInt.h" @@ -365,16 +365,20 @@ Tcl_GetIndexFromObjStruct( TclNewObj(resultPtr); Tcl_SetObjResult(interp, resultPtr); Tcl_AppendStringsToObj(resultPtr, (numAbbrev > 1) && - !(flags & TCL_EXACT) ? "ambiguous " : "bad ", msg, " \"", key, - "\": must be ", STRING_AT(tablePtr, offset, 0), NULL); - for (entryPtr = NEXT_ENTRY(tablePtr, offset), count = 0; - *entryPtr != NULL; - entryPtr = NEXT_ENTRY(entryPtr, offset), count++) { - if (*NEXT_ENTRY(entryPtr, offset) == NULL) { - Tcl_AppendStringsToObj(resultPtr, ((count > 0) ? "," : ""), - " or ", *entryPtr, NULL); - } else { - Tcl_AppendStringsToObj(resultPtr, ", ", *entryPtr, NULL); + !(flags & TCL_EXACT) ? "ambiguous " : "bad ", msg, " \"", key, NULL); + if (STRING_AT(tablePtr, offset, 0) == NULL) { + Tcl_AppendStringsToObj(resultPtr, "\": empty table !", NULL); + } else { + Tcl_AppendStringsToObj(resultPtr, "\": must be ", STRING_AT(tablePtr, offset, 0), NULL); + for (entryPtr = NEXT_ENTRY(tablePtr, offset), count = 0; + *entryPtr != NULL; + entryPtr = NEXT_ENTRY(entryPtr, offset), count++) { + if (*NEXT_ENTRY(entryPtr, offset) == NULL) { + Tcl_AppendStringsToObj(resultPtr, ((count > 0) ? "," : ""), + " or ", *entryPtr, NULL); + } else { + Tcl_AppendStringsToObj(resultPtr, ", ", *entryPtr, NULL); + } } } Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", msg, key, NULL); -- cgit v0.12 From b44f57e1dde02e93b0193c005029439e460b7acc Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 1 Mar 2010 23:19:36 +0000 Subject: Improve error message for corner case in ::prefix --- generic/tclIndexObj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index ee1ec43..c732cec 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.56 2010/03/01 22:20:51 ferrieux Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.57 2010/03/01 23:19:36 ferrieux Exp $ */ #include "tclInt.h" @@ -367,7 +367,7 @@ Tcl_GetIndexFromObjStruct( Tcl_AppendStringsToObj(resultPtr, (numAbbrev > 1) && !(flags & TCL_EXACT) ? "ambiguous " : "bad ", msg, " \"", key, NULL); if (STRING_AT(tablePtr, offset, 0) == NULL) { - Tcl_AppendStringsToObj(resultPtr, "\": empty table !", NULL); + Tcl_AppendStringsToObj(resultPtr, "\": no valid options", NULL); } else { Tcl_AppendStringsToObj(resultPtr, "\": must be ", STRING_AT(tablePtr, offset, 0), NULL); for (entryPtr = NEXT_ENTRY(tablePtr, offset), count = 0; -- cgit v0.12 From d11b1250fc7ee6e7a97d270d93961e8580140753 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 1 Mar 2010 23:25:43 +0000 Subject: Added test case for empty table in ::prefix --- tests/string.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/string.test b/tests/string.test index 3fc1153..39b12ff 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: string.test,v 1.77 2009/06/24 15:17:41 dgp Exp $ +# RCS: @(#) $Id: string.test,v 1.78 2010/03/01 23:25:43 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1676,6 +1676,9 @@ test string-26.1 {tcl::prefix, too few args} -body { test string-26.2 {tcl::prefix, bad args} -body { tcl::prefix match a b c } -returnCodes 1 -result {bad option "a": must be -error, -exact, or -message} +test string-26.2.1 {tcl::prefix, empty table} -body { + tcl::prefix match {} foo +} -returnCodes 1 -result {bad option "foo": no valid options} test string-26.3 {tcl::prefix, bad args} -body { tcl::prefix match -error "{}x" -exact str1 str2 } -returnCodes 1 -result {list element in braces followed by "x" instead of space} -- cgit v0.12 From f73c7daa07ce0b9759ce82a413ebd06b5fa86003 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 2 Mar 2010 08:47:35 +0000 Subject: Use a less hacky way of using a char as a hash key --- generic/tclCmdMZ.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index af97570..84fbe1b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.202 2010/02/27 19:02:26 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.203 2010/03/02 08:47:35 dkf Exp $ */ #include "tclInt.h" @@ -1067,7 +1067,7 @@ Tcl_SplitObjCmd( * Assume Tcl_UniChar is an integral type... */ - hPtr = Tcl_CreateHashEntry(&charReuseTable, (char*)0+ch, &isNew); + hPtr = Tcl_CreateHashEntry(&charReuseTable, INT2PTR(ch), &isNew); if (isNew) { TclNewStringObj(objPtr, stringPtr, len); @@ -1077,7 +1077,7 @@ Tcl_SplitObjCmd( Tcl_SetHashValue(hPtr, objPtr); } else { - objPtr = (Tcl_Obj *) Tcl_GetHashValue(hPtr); + objPtr = Tcl_GetHashValue(hPtr); } Tcl_ListObjAppendElement(NULL, listPtr, objPtr); } -- cgit v0.12 From 618503676d9bd1174c263775d6a2aeef4a838ae1 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 2 Mar 2010 23:39:33 +0000 Subject: [Enh 2959069] Support for -fvisibility=hidden --- ChangeLog | 5 +++++ unix/configure | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- unix/tcl.m4 | 18 +++++++++++----- 3 files changed, 79 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b75d6aa..5b87ea4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-02 Jan Nijtmans + + * unix/tcl.m4 [Enh 2959069] Support for -fvisibility=hidden + * unix/configure (regenerated with autoconf-2.59) + 2010-03-01 Alexandre Ferrieux * unix/tclUnixSock.c: Refrain from a possibly lengthy reverse-DNS diff --git a/unix/configure b/unix/configure index 3931b92..181bc7f 100755 --- a/unix/configure +++ b/unix/configure @@ -6434,6 +6434,63 @@ if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_visibility_hidden=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_visibility_hidden=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 + if test $tcl_cv_cc_visibility_hidden = yes; then + + CFLAGS="$CFLAGS -fvisibility=hidden" + +else + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6484,10 +6541,7 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags -fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 - if test $tcl_cv_cc_visibility_hidden = yes; then + if test $tcl_cv_cc_visibility_hidden = yes; then cat >>confdefs.h <<\_ACEOF @@ -6498,6 +6552,9 @@ _ACEOF fi +fi + + # Step 0.d: Disable -rpath support? echo "$as_me:$LINENO: checking if rpath support is requested" >&5 diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 34a06bd..c5045c7 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1052,16 +1052,24 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_CACHE_CHECK([if compiler supports visibility "hidden"], tcl_cv_cc_visibility_hidden, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden" + AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes, + tcl_cv_cc_visibility_hidden=no) + CFLAGS=$hold_cflags]) + AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ + CFLAGS="$CFLAGS -fvisibility=hidden" + ], [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" AC_TRY_LINK([ extern __attribute__((__visibility__("hidden"))) void f(void); void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes, tcl_cv_cc_visibility_hidden=no) - CFLAGS=$hold_cflags]) - AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ - AC_DEFINE(MODULE_SCOPE, - [extern __attribute__((__visibility__("hidden")))], - [Compiler support for module scope symbols]) + CFLAGS=$hold_cflags + AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ + AC_DEFINE(MODULE_SCOPE, + [extern __attribute__((__visibility__("hidden")))], + [Compiler support for module scope symbols]) + ]) ]) # Step 0.d: Disable -rpath support? -- cgit v0.12 From 4a7184ccc431e5e65151b8bccee62179269d099e Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 3 Mar 2010 18:30:26 +0000 Subject: * doc/refchan.n: Followup to ChangeLog entry 2009-10-07 (generic/tclIORChan.c). Fixed the documentation to explain that errno numbers are operating system dependent, and reworked the associated example. --- ChangeLog | 7 +++++++ doc/refchan.n | 17 ++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b87ea4..24dcbc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-03 Andreas Kupries + + * doc/refchan.n: Followup to ChangeLog entry 2009-10-07 + (generic/tclIORChan.c). Fixed the documentation to explain that + errno numbers are operating system dependent, and reworked the + associated example. + 2010-03-02 Jan Nijtmans * unix/tcl.m4 [Enh 2959069] Support for -fvisibility=hidden diff --git a/doc/refchan.n b/doc/refchan.n index b3ad232..4edd7ad 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.18 2010/01/14 18:13:12 dkf Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.19 2010/03/03 18:30:28 andreas_kupries Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -132,8 +132,11 @@ error EAGAIN .PP For extensibility any error whose value is a negative integer number will cause the higher layers to set the C-level variable "\fBerrno\fR" -to the absolute value of this number, signaling a system error. This -means that both +to the absolute value of this number, signaling a system error. +However, note that the exact mapping between these error numbers and +their meanings is operating system dependent. +.PP +For example, while on Linux both .PP .CS return -code error -11 @@ -143,8 +146,12 @@ and error -11 .CE .PP -are equivalent to the examples above, using the more readable string "EAGAIN". -No other error value has such a mapping to a symbolic string. +are equivalent to the examples above, using the more readable string "EAGAIN", +this is not true for BSD, where the equivalent number is -35. +.PP +The symbolic string however is the same across systems, and internally +translated to the correct number. No other error value has such a mapping +to a symbolic string. .PP If the subcommand throws any other error, the command which caused its invocation (usually \fBgets\fR, or \fBread\fR) will appear to have -- cgit v0.12 From ead00d5d7d7afa8be16eacf5a93a931c84b6749a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 4 Mar 2010 22:29:04 +0000 Subject: Split tommath stub lib source file in separate file. Don't use -fvisibility=hidden for cygwin --- ChangeLog | 15 ++++++++ compat/strncasecmp.c | 4 +- compat/strtod.c | 11 +++--- compat/strtoul.c | 4 +- generic/tclStubLib.c | 57 +++------------------------- generic/tclTomMathStubLib.c | 91 +++++++++++++++++++++++++++++++++++++++++++++ unix/Makefile.in | 8 +++- unix/configure | 2 +- unix/tcl.m4 | 2 +- win/Makefile.in | 8 +++- win/makefile.bc | 7 ++++ win/makefile.vc | 6 ++- win/tcl.dsp | 8 ++++ 13 files changed, 157 insertions(+), 66 deletions(-) create mode 100644 generic/tclTomMathStubLib.c diff --git a/ChangeLog b/ChangeLog index 24dcbc3..30cedfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2010-03-03 Jan Nijtmans + + * generic/tclStubLib.c Split tommath stub lib + * generic/tclTomMathStubLib.c in separate file. + * win/makefile.bc + * win/Makefile.in + * win/makefile.vc + * win/tcl.dsp + * unix/Makefile.in + * unix/tcl.m4 Cygwin only gives warning + * unix/configure using -fvisibility=hidden + * compat/strncasecmp.c A few more const's + * compat/strtod.c + * compat/strtoul.c + 2010-03-03 Andreas Kupries * doc/refchan.n: Followup to ChangeLog entry 2009-10-07 diff --git a/compat/strncasecmp.c b/compat/strncasecmp.c index f944aaa..6a17b32 100644 --- a/compat/strncasecmp.c +++ b/compat/strncasecmp.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strncasecmp.c,v 1.4 2008/04/27 22:21:28 dkf Exp $ + * RCS: @(#) $Id: strncasecmp.c,v 1.5 2010/03/04 22:29:05 nijtmans Exp $ */ #include "tclPort.h" @@ -20,7 +20,7 @@ * sequences. */ -static unsigned char charmap[] = { +static const unsigned char charmap[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, diff --git a/compat/strtod.c b/compat/strtod.c index aa73ab0..7171101 100644 --- a/compat/strtod.c +++ b/compat/strtod.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtod.c,v 1.9 2008/04/27 22:21:28 dkf Exp $ + * RCS: @(#) $Id: strtod.c,v 1.10 2010/03/04 22:29:05 nijtmans Exp $ */ #include "tclInt.h" @@ -23,12 +23,12 @@ #define NULL 0 #endif -static int maxExponent = 511; /* Largest possible base 10 exponent. Any +static const int maxExponent = 511; /* Largest possible base 10 exponent. Any * exponent larger than this will already * produce underflow or overflow, so there's * no need to worry about additional digits. */ -static double powersOf10[] = { /* Table giving binary powers of 10. Entry */ +static const double powersOf10[] = { /* Table giving binary powers of 10. Entry */ 10., /* is 10^2^i. Used to convert decimal */ 100., /* exponents into floating-point numbers. */ 1.0e4, @@ -78,7 +78,8 @@ strtod( * address here. */ { int sign, expSign = FALSE; - double fraction, dblExp, *d; + double fraction, dblExp; + const double *d; register const char *p; register int c; int exp = 0; /* Exponent read from "EX" field. */ @@ -231,7 +232,7 @@ strtod( errno = ERANGE; } dblExp = 1.0; - for (d = powersOf10; exp != 0; exp >>= 1, d += 1) { + for (d = powersOf10; exp != 0; exp >>= 1, ++d) { if (exp & 01) { dblExp *= *d; } diff --git a/compat/strtoul.c b/compat/strtoul.c index 21ee445..0b2b625 100644 --- a/compat/strtoul.c +++ b/compat/strtoul.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtoul.c,v 1.8 2008/04/27 22:21:28 dkf Exp $ + * RCS: @(#) $Id: strtoul.c,v 1.9 2010/03/04 22:29:05 nijtmans Exp $ */ #include "tclInt.h" @@ -20,7 +20,7 @@ * characters). */ -static char cvtIn[] = { +static const char cvtIn[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /* '0' - '9' */ 100, 100, 100, 100, 100, 100, 100, /* punctuation */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'A' - 'Z' */ diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index b2f39fa..af14e2e 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.30 2010/02/21 20:09:38 nijtmans Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.31 2010/03/04 22:29:05 nijtmans Exp $ */ /* @@ -145,54 +145,9 @@ Tcl_InitStubs( } /* - *---------------------------------------------------------------------- - * - * TclTomMathInitStubs -- - * - * Initializes the Stubs table for Tcl's subset of libtommath - * - * Results: - * Returns a standard Tcl result. - * - * This procedure should not be called directly, but rather through - * the TclTomMath_InitStubs macro, to insure that the Stubs table - * matches the header files used in compilation. - * - *---------------------------------------------------------------------- + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: */ - -MODULE_SCOPE const char * -TclTomMathInitializeStubs( - Tcl_Interp *interp, /* Tcl interpreter */ - const char *version, /* Tcl version needed */ - int epoch, /* Stubs table epoch from the header files */ - int revision) /* Stubs table revision number from the - * header files */ -{ - int exact = 0; - const char *packageName = "tcl::tommath"; - const char *errMsg = NULL; - ClientData pkgClientData = NULL; - const char *actualVersion = - Tcl_PkgRequireEx(interp, packageName, version, exact, &pkgClientData); - const TclTomMathStubs *stubsPtr = pkgClientData; - - if (actualVersion == NULL) { - return NULL; - } - if (pkgClientData == NULL) { - errMsg = "missing stub table pointer"; - } else if ((stubsPtr->tclBN_epoch)() != epoch) { - errMsg = "epoch number mismatch"; - } else if ((stubsPtr->tclBN_revision)() != revision) { - errMsg = "requires a later revision"; - } else { - tclTomMathStubsPtr = stubsPtr; - return actualVersion; - } - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "error loading ", packageName, - " (requested version ", version, ", actual version ", - actualVersion, "): ", errMsg, NULL); - return NULL; -} diff --git a/generic/tclTomMathStubLib.c b/generic/tclTomMathStubLib.c new file mode 100644 index 0000000..4139261 --- /dev/null +++ b/generic/tclTomMathStubLib.c @@ -0,0 +1,91 @@ +/* + * tclTomMathStubLib.c -- + * + * Stub object that will be statically linked into extensions that want + * to access Tcl. + * + * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998 Paul Duffin. + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclTomMathStubLib.c,v 1.1 2010/03/04 22:29:05 nijtmans Exp $ + */ + +/* + * We need to ensure that we use the stub macros so that this file contains no + * references to any of the stub functions. This will make it possible to + * build an extension that references Tcl_InitStubs but doesn't end up + * including the rest of the stub functions. + */ + +#define USE_TCL_STUBS + +#include "tclInt.h" + +MODULE_SCOPE const TclTomMathStubs *tclTomMathStubsPtr; + +const TclTomMathStubs *tclTomMathStubsPtr = NULL; + + +/* + *---------------------------------------------------------------------- + * + * TclTomMathInitStubs -- + * + * Initializes the Stubs table for Tcl's subset of libtommath + * + * Results: + * Returns a standard Tcl result. + * + * This procedure should not be called directly, but rather through + * the TclTomMath_InitStubs macro, to insure that the Stubs table + * matches the header files used in compilation. + * + *---------------------------------------------------------------------- + */ + +MODULE_SCOPE const char * +TclTomMathInitializeStubs( + Tcl_Interp *interp, /* Tcl interpreter */ + const char *version, /* Tcl version needed */ + int epoch, /* Stubs table epoch from the header files */ + int revision) /* Stubs table revision number from the + * header files */ +{ + int exact = 0; + const char *packageName = "tcl::tommath"; + const char *errMsg = NULL; + ClientData pkgClientData = NULL; + const char *actualVersion = + Tcl_PkgRequireEx(interp, packageName, version, exact, &pkgClientData); + const TclTomMathStubs *stubsPtr = pkgClientData; + + if (actualVersion == NULL) { + return NULL; + } + if (pkgClientData == NULL) { + errMsg = "missing stub table pointer"; + } else if ((stubsPtr->tclBN_epoch)() != epoch) { + errMsg = "epoch number mismatch"; + } else if ((stubsPtr->tclBN_revision)() != revision) { + errMsg = "requires a later revision"; + } else { + tclTomMathStubsPtr = stubsPtr; + return actualVersion; + } + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "error loading ", packageName, + " (requested version ", version, ", actual version ", + actualVersion, "): ", errMsg, NULL); + return NULL; +} + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/unix/Makefile.in b/unix/Makefile.in index 92fefa2..b58f138 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.293 2010/02/27 11:51:30 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.294 2010/03/04 22:29:06 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -335,7 +335,7 @@ TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \ bn_mp_unsigned_bin_size.o bn_mp_xor.o bn_mp_zero.o bn_s_mp_add.o \ bn_s_mp_mul_digs.o bn_s_mp_sqr.o bn_s_mp_sub.o -STUB_LIB_OBJS = tclStubLib.o tclOOStubLib.o ${COMPAT_OBJS} +STUB_LIB_OBJS = tclStubLib.o tclTomMathStubLib.o tclOOStubLib.o ${COMPAT_OBJS} UNIX_OBJS = tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o \ tclUnixFile.o tclUnixPipe.o tclUnixSock.o \ @@ -466,6 +466,7 @@ OO_SRCS = \ STUB_SRCS = \ $(GENERIC_DIR)/tclStubLib.c \ + $(GENERIC_DIR)/tclTomMathStubLib.c \ $(GENERIC_DIR)/tclOOStubLib.o TOMMATH_SRCS = \ @@ -1627,6 +1628,9 @@ Zzutil.o: $(ZLIB_DIR)/zutil.c tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubLib.c +tclTomMathStubLib.o: $(GENERIC_DIR)/tclTomMathStubLib.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclTomMathStubLib.c + tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclOOStubLib.c diff --git a/unix/configure b/unix/configure index 181bc7f..d0fcd74 100755 --- a/unix/configure +++ b/unix/configure @@ -6434,7 +6434,7 @@ if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden" + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c5045c7..d6769af 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1052,7 +1052,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_CACHE_CHECK([if compiler supports visibility "hidden"], tcl_cv_cc_visibility_hidden, [ - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden" + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes, tcl_cv_cc_visibility_hidden=no) CFLAGS=$hold_cflags]) diff --git a/win/Makefile.in b/win/Makefile.in index 2a5e97e..2ffc9fa 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.172 2010/02/26 14:38:36 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.173 2010/03/04 22:29:05 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -381,6 +381,7 @@ REG_OBJS = tclWinReg.$(OBJEXT) STUB_OBJS = \ tclStubLib.$(OBJEXT) \ + tclTomMathStubLib.$(OBJEXT) \ tclOOStubLib.$(OBJEXT) TCLSH_OBJS = tclAppInit.$(OBJEXT) @@ -538,6 +539,11 @@ tclPkgConfig.${OBJEXT}: tclPkgConfig.c tclStubLib.${OBJEXT}: tclStubLib.c $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME) +tclTomMathStubLib.${OBJEXT}: tclTomMathStubLib.c + $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME) + +tclOOStubLib.${OBJEXT}: tclOOStubLib.c + $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME) # Implicit rule for all object files that will end up in the Tcl library diff --git a/win/makefile.bc b/win/makefile.bc index 968805a..a0020bc 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -279,6 +279,7 @@ TCLOBJS = \ TCLSTUBOBJS = \ $(TMPDIR)\tclStubLib.obj \ + $(TMPDIR)\tclTomMathStubLib.obj \ $(TMPDIR)\tclOOStubLib.obj WINDIR = $(ROOT)\win @@ -534,6 +535,12 @@ $(TMPDIR)\tclWinDde.obj : $(WINDIR)\tclWinDde.c $(TMPDIR)\tclStubLib.obj : $(GENERICDIR)\tclStubLib.c $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -o$(TMPDIR)\$@ $? +$(TMPDIR)\tclTomMathStubLib.obj : $(GENERICDIR)\tclTomMathStubLib.c + $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -o$(TMPDIR)\$@ $? + +$(TMPDIR)\tclOOStubLib.obj : $(GENERICDIR)\tclOOStubLib.c + $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -o$(TMPDIR)\$@ $? + # Dedependency rules diff --git a/win/makefile.vc b/win/makefile.vc index b72bb4a..73fa236 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.207 2010/02/26 14:38:37 dkf Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.208 2010/03/04 22:29:05 nijtmans Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -431,6 +431,7 @@ TCLOBJS = $(COREOBJS) $(ZLIBOBJS) $(TOMMATHOBJS) $(PLATFORMOBJS) TCLSTUBOBJS = \ $(TMP_DIR)\tclStubLib.obj \ + $(TMP_DIR)\tclTomMathStubLib.obj \ $(TMP_DIR)\tclOOStubLib.obj ### The following paths CANNOT have spaces in them. @@ -970,6 +971,9 @@ $(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c $(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? +$(TMP_DIR)\tclTomMathStubLib.obj: $(GENERICDIR)\tclTomMathStubLib.c + $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? + $(TMP_DIR)\tclOOStubLib.obj: $(GENERICDIR)\tclOOStubLib.c $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? diff --git a/win/tcl.dsp b/win/tcl.dsp index b3de0ff..b16a98d 100644 --- a/win/tcl.dsp +++ b/win/tcl.dsp @@ -1300,6 +1300,14 @@ SOURCE=..\generic\tclStubLib.c # End Source File # Begin Source File +SOURCE=..\generic\tclOOStubLib.c +# End Source File +# Begin Source File + +SOURCE=..\generic\tclTomMathStubLib.c +# End Source File +# Begin Source File + SOURCE=..\generic\tclTest.c # End Source File # Begin Source File -- cgit v0.12 From f9102947da376b595e386d9bc0e443bf45b39110 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 4 Mar 2010 23:16:56 +0000 Subject: 3 unnecessary MODULE_SCOPE symbols --- ChangeLog | 4 +++- generic/tclDate.c | 4 ---- generic/tclGetDate.y | 6 +----- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30cedfe..2c9b6f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ -2010-03-03 Jan Nijtmans +2010-03-04 Jan Nijtmans + * generic/tclGetDate.y 3 unnecessary MODULE_SCOPE + * generic/tclDate.c symbols * generic/tclStubLib.c Split tommath stub lib * generic/tclTomMathStubLib.c in separate file. * win/makefile.bc diff --git a/generic/tclDate.c b/generic/tclDate.c index f873e3f..13033f0 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2292,10 +2292,6 @@ yyreturn: -MODULE_SCOPE int yychar; -MODULE_SCOPE YYSTYPE yylval; -MODULE_SCOPE int yynerrs; - /* * Month and day table. */ diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index c2498b2..a27179c 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGetDate.y,v 1.44 2010/02/21 20:09:37 nijtmans Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.45 2010/03/04 23:16:56 nijtmans Exp $ */ %parse-param {DateInfo* info} @@ -504,10 +504,6 @@ o_merid : /* NULL */ { ; %% -MODULE_SCOPE int yychar; -MODULE_SCOPE YYSTYPE yylval; -MODULE_SCOPE int yynerrs; - /* * Month and day table. */ -- cgit v0.12 From 8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Mar 2010 23:42:52 +0000 Subject: Fix [Bug 2962664] by forcing oo::object deletion on oo::class deletion. --- ChangeLog | 51 ++++++++++++++++++++++++++++------------------- generic/tclOO.c | 30 ++++++++++++++++++++++------ generic/tclOODefineCmds.c | 10 +++++----- generic/tclOOInt.h | 6 +++++- tests/oo.test | 26 +++++++++++++++++++++++- 5 files changed, 89 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c9b6f8..90a0375 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,36 +1,45 @@ +2010-03-04 Donal K. Fellows + + * generic/tclOO.c (ObjectRenamedTrace): Add special handling so that + when the class of classes is deleted, so is the class of objects. + Immediately. [Bug 2962664] + + * generic/tclOOInt.h (ROOT_CLASS): Add new flag for specially marking + the root class. Simpler than the + 2010-03-04 Jan Nijtmans - * generic/tclGetDate.y 3 unnecessary MODULE_SCOPE - * generic/tclDate.c symbols - * generic/tclStubLib.c Split tommath stub lib - * generic/tclTomMathStubLib.c in separate file. - * win/makefile.bc - * win/Makefile.in - * win/makefile.vc - * win/tcl.dsp - * unix/Makefile.in - * unix/tcl.m4 Cygwin only gives warning - * unix/configure using -fvisibility=hidden - * compat/strncasecmp.c A few more const's - * compat/strtod.c - * compat/strtoul.c + * generic/tclGetDate.y: 3 unnecessary MODULE_SCOPE + * generic/tclDate.c: symbols + * generic/tclStubLib.c: Split tommath stub lib + * generic/tclTomMathStubLib.c: in separate file. + * win/makefile.bc: + * win/Makefile.in: + * win/makefile.vc: + * win/tcl.dsp: + * unix/Makefile.in: + * unix/tcl.m4: Cygwin only gives warning + * unix/configure: using -fvisibility=hidden + * compat/strncasecmp.c: A few more const's + * compat/strtod.c: + * compat/strtoul.c: 2010-03-03 Andreas Kupries * doc/refchan.n: Followup to ChangeLog entry 2009-10-07 - (generic/tclIORChan.c). Fixed the documentation to explain that - errno numbers are operating system dependent, and reworked the - associated example. + (generic/tclIORChan.c). Fixed the documentation to explain that errno + numbers are operating system dependent, and reworked the associated + example. 2010-03-02 Jan Nijtmans - * unix/tcl.m4 [Enh 2959069] Support for -fvisibility=hidden - * unix/configure (regenerated with autoconf-2.59) + * unix/tcl.m4: [FRQ 2959069]: Support for -fvisibility=hidden + * unix/configure (regenerated with autoconf-2.59) 2010-03-01 Alexandre Ferrieux - * unix/tclUnixSock.c: Refrain from a possibly lengthy reverse-DNS - lookup on 0.0.0.0 when calling [fconfigure -sockname] on an + * unix/tclUnixSock.c: Refrain from a possibly lengthy reverse-DNS + lookup on 0.0.0.0 when calling [fconfigure -sockname] on an universally-bound (default) server socket. * generic/tclIndexObj.c: fix [AT 86258]: special-casing of empty diff --git a/generic/tclOO.c b/generic/tclOO.c index e6c86c7..7ae6ac0 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.33 2010/02/15 22:56:20 nijtmans Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.34 2010/03/04 23:42:53 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -297,6 +297,7 @@ InitFoundation( ckfree((char *) fPtr->objectCls->superclasses.list); fPtr->objectCls->superclasses.list = NULL; fPtr->classCls->thisPtr->selfCls = fPtr->classCls; + fPtr->classCls->thisPtr->flags |= ROOT_CLASS; TclOOAddToInstances(fPtr->objectCls->thisPtr, fPtr->classCls); TclOOAddToInstances(fPtr->classCls->thisPtr, fPtr->classCls); AddRef(fPtr->objectCls->thisPtr); @@ -705,8 +706,7 @@ ObjectRenamedTrace( oPtr->flags |= OBJECT_DELETED; if (!(oPtr->flags & DESTRUCTOR_CALLED) && (!Tcl_InterpDeleted(interp) - || (oPtr != oPtr->fPtr->objectCls->thisPtr - && oPtr != oPtr->fPtr->classCls->thisPtr))) { + || (oPtr->flags & (ROOT_OBJECT|ROOT_CLASS)))) { contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL); oPtr->flags |= DESTRUCTOR_CALLED; if (contextPtr != NULL) { @@ -731,15 +731,33 @@ ObjectRenamedTrace( * and nuke the namespace (which triggers the final crushing of the object * structure itself). * - * The namespace is only deleted if it hasn't already been deleted. [Bug - * 2950259] + * The class of classes needs some special care; if it is deleted (and + * we're not killing the whole interpreter) we force the delete of the + * class of objects now as well. Due to the incestuous nature of those two + * classes, if one goes the other must too and yet the tangle can + * sometimes not go away automatically; we force it here. [Bug 2962664] */ + if (!Tcl_InterpDeleted(interp)) { + if ((oPtr->flags & ROOT_OBJECT) && oPtr->fPtr->classCls != NULL) { + Tcl_DeleteCommandFromToken(interp, + oPtr->fPtr->classCls->thisPtr->command); + } else if (oPtr->flags & ROOT_CLASS) { + oPtr->fPtr->classCls = NULL; + } + } + clsPtr = oPtr->classPtr; if (clsPtr != NULL) { AddRef(clsPtr); ReleaseClassContents(interp, oPtr); } + + /* + * The namespace is only deleted if it hasn't already been deleted. [Bug + * 2950259] + */ + if (((Namespace *) oPtr->namespacePtr)->earlyDeleteProc != NULL) { Tcl_DeleteNamespace(oPtr->namespacePtr); } @@ -1644,7 +1662,7 @@ Tcl_CopyObjectInstance( NULL); return NULL; } - if (oPtr->classPtr == GetFoundation(interp)->classCls) { + if (oPtr->flags & ROOT_CLASS) { Tcl_AppendResult(interp, "may not clone the class of classes", NULL); return NULL; } diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index 2fb9ce5..ad088af 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.11 2009/05/04 17:39:51 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.12 2010/03/04 23:42:54 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1043,12 +1043,12 @@ TclOODefineClassObjCmd( if (oPtr == NULL) { return TCL_ERROR; } - if (oPtr == fPtr->objectCls->thisPtr) { + if (oPtr->flags & ROOT_OBJECT) { Tcl_AppendResult(interp, - "may not modify the class of the root object", NULL); + "may not modify the class of the root object class", NULL); return TCL_ERROR; } - if (oPtr == fPtr->classCls->thisPtr) { + if (oPtr->flags & ROOT_CLASS) { Tcl_AppendResult(interp, "may not modify the class of the class of classes", NULL); return TCL_ERROR; @@ -1679,7 +1679,7 @@ TclOODefineSuperclassObjCmd( NULL); return TCL_ERROR; } - if (oPtr == fPtr->objectCls->thisPtr) { + if (oPtr->flags & ROOT_OBJECT) { Tcl_AppendResult(interp, "may not modify the superclass of the root object", NULL); return TCL_ERROR; diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index dc52638..2103dc0 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.15 2010/01/29 16:17:20 nijtmans Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.16 2010/03/04 23:42:54 dkf Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -212,6 +212,10 @@ typedef struct Object { * instance of the class, and has had nothing * added that changes the dispatch chain (i.e. * no methods, mixins, or filters. */ +#define ROOT_CLASS 0x8000 /* Flag to say that this object is the root + * class of classes, and should be treated + * specially during teardown (and in a few + * other spots). */ /* * And the definition of a class. Note that every class also has an associated diff --git a/tests/oo.test b/tests/oo.test index fbb8971..adcab4b 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.37 2010/02/15 11:53:45 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.38 2010/03/04 23:42:54 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -72,6 +72,30 @@ test oo-0.5 {testing literal leak on interp delete} memory { interp delete foo } } 0 +test oo-0.6 {cleaning the core class pair; way #1} -setup { + interp create t + initInterpreter t +} -body { + t eval { + package require TclOO + namespace path oo + list [catch {class destroy} m] $m [catch {object destroy} m] $m + } +} -cleanup { + interp delete t +} -result {0 {} 1 {invalid command name "object"}} +test oo-0.7 {cleaning the core class pair; way #2} -setup { + interp create t + initInterpreter t +} -body { + t eval { + package require TclOO + namespace path oo + list [catch {object destroy} m] $m [catch {class destroy} m] $m + } +} -cleanup { + interp delete t +} -result {0 {} 1 {invalid command name "class"}} test oo-1.1 {basic test of OO functionality: no classes} { set result {} -- cgit v0.12 From d6af24cbdef686e4ce9d694d72d6935e8e35aa33 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Mar 2010 23:52:28 +0000 Subject: Minor correction to log entry. --- ChangeLog | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90a0375..aaa8920 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,11 @@ 2010-03-04 Donal K. Fellows - * generic/tclOO.c (ObjectRenamedTrace): Add special handling so that - when the class of classes is deleted, so is the class of objects. - Immediately. [Bug 2962664] + * generic/tclOO.c (ObjectRenamedTrace): [Bug 2962664]: Add special + handling so that when the class of classes is deleted, so is the class + of objects. Immediately. * generic/tclOOInt.h (ROOT_CLASS): Add new flag for specially marking - the root class. Simpler than the + the root class. Simpler and more robust than the previous technique. 2010-03-04 Jan Nijtmans -- cgit v0.12 From 7450c3fa6dd11ccc316cd37f463ae02cd8f41b18 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 4 Mar 2010 23:55:15 +0000 Subject: ignore shared libraries from checking in --- unix/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/unix/.cvsignore b/unix/.cvsignore index 9f2e617..9e40900 100644 --- a/unix/.cvsignore +++ b/unix/.cvsignore @@ -16,3 +16,4 @@ tcltest test1 test2 confdefs.h +*.so -- cgit v0.12 From f7a64b3a111891d5f7f79ce94bbb37abedd30176 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Mar 2010 11:36:19 +0000 Subject: Remove unused variable --- generic/tclOODefineCmds.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c index ad088af..1cf0786 100644 --- a/generic/tclOODefineCmds.c +++ b/generic/tclOODefineCmds.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOODefineCmds.c,v 1.12 2010/03/04 23:42:54 dkf Exp $ + * RCS: @(#) $Id: tclOODefineCmds.c,v 1.13 2010/03/05 11:36:19 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1657,7 +1657,6 @@ TclOODefineSuperclassObjCmd( Tcl_Obj *const *objv) { Object *oPtr; - Foundation *fPtr = TclOOGetFoundation(interp); Class **superclasses, *superPtr; int i, j; -- cgit v0.12 From b501910778714de837dc4367698256e996737e9b Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Mar 2010 14:34:03 +0000 Subject: Code Audit results: * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations --- generic/tclBasic.c | 144 ++++++++++++++-------------- generic/tclBinary.c | 30 +++--- generic/tclClock.c | 19 ++-- generic/tclCmdAH.c | 3 +- generic/tclCmdIL.c | 9 +- generic/tclCmdMZ.c | 8 +- generic/tclCompCmds.c | 8 +- generic/tclCompCmdsSZ.c | 8 +- generic/tclCompExpr.c | 18 ++-- generic/tclCompile.c | 3 +- generic/tclDictObj.c | 4 +- generic/tclEnsemble.c | 28 +++--- generic/tclEnv.c | 5 +- generic/tclFileName.c | 9 +- generic/tclIORTrans.c | 19 ++-- generic/tclIOUtil.c | 4 +- generic/tclIndexObj.c | 83 ++++++++-------- generic/tclInt.h | 242 ++++++++++++++++++++++++++--------------------- generic/tclInterp.c | 18 ++-- generic/tclLoad.c | 14 +-- generic/tclNamesp.c | 13 ++- generic/tclOO.c | 5 +- generic/tclParse.c | 6 +- generic/tclPathObj.c | 44 +++++---- generic/tclProc.c | 12 +-- generic/tclScan.c | 14 +-- generic/tclStrToD.c | 36 +++---- generic/tclStringObj.c | 8 +- generic/tclThreadAlloc.c | 30 +++--- generic/tclUtil.c | 25 +++-- generic/tclVar.c | 19 ++-- generic/tclZlib.c | 65 ++++++------- macosx/tclMacOSXFCmd.c | 19 ++-- unix/tclUnixFCmd.c | 19 ++-- unix/tclUnixThrd.c | 63 +++++++----- 35 files changed, 547 insertions(+), 507 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index fde9b1b..b9282ae 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.447 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.448 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -1310,6 +1310,7 @@ DeleteInterpProc( Tcl_HashSearch search; Tcl_HashTable *hTablePtr; ResolverScheme *resPtr, *nextResPtr; + int i; /* * Punt if there is an error in the Tcl_Release/Tcl_Preserve matchup. @@ -1503,89 +1504,87 @@ DeleteInterpProc( * contents. */ - { - Tcl_HashEntry *hPtr; - Tcl_HashSearch hSearch; - int i; - - for (hPtr = Tcl_FirstHashEntry(iPtr->linePBodyPtr, &hSearch); - hPtr != NULL; - hPtr = Tcl_NextHashEntry(&hSearch)) { - CmdFrame *cfPtr = Tcl_GetHashValue(hPtr); + for (hPtr = Tcl_FirstHashEntry(iPtr->linePBodyPtr, &search); + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&search)) { + CmdFrame *cfPtr = Tcl_GetHashValue(hPtr); - if (cfPtr->type == TCL_LOCATION_SOURCE) { - Tcl_DecrRefCount(cfPtr->data.eval.path); - } - ckfree((char *) cfPtr->line); - ckfree((char *) cfPtr); - Tcl_DeleteHashEntry(hPtr); + if (cfPtr->type == TCL_LOCATION_SOURCE) { + Tcl_DecrRefCount(cfPtr->data.eval.path); } - Tcl_DeleteHashTable(iPtr->linePBodyPtr); - ckfree((char *) iPtr->linePBodyPtr); - iPtr->linePBodyPtr = NULL; + ckfree((char *) cfPtr->line); + ckfree((char *) cfPtr); + Tcl_DeleteHashEntry(hPtr); + } + Tcl_DeleteHashTable(iPtr->linePBodyPtr); + ckfree((char *) iPtr->linePBodyPtr); + iPtr->linePBodyPtr = NULL; - /* - * See also tclCompile.c, TclCleanupByteCode - */ + /* + * See also tclCompile.c, TclCleanupByteCode + */ - for (hPtr = Tcl_FirstHashEntry(iPtr->lineBCPtr, &hSearch); - hPtr != NULL; - hPtr = Tcl_NextHashEntry(&hSearch)) { - ExtCmdLoc *eclPtr = Tcl_GetHashValue(hPtr); + for (hPtr = Tcl_FirstHashEntry(iPtr->lineBCPtr, &search); + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&search)) { + ExtCmdLoc *eclPtr = Tcl_GetHashValue(hPtr); - if (eclPtr->type == TCL_LOCATION_SOURCE) { - Tcl_DecrRefCount(eclPtr->path); - } - for (i=0; i< eclPtr->nuloc; i++) { - ckfree((char *) eclPtr->loc[i].line); - } + if (eclPtr->type == TCL_LOCATION_SOURCE) { + Tcl_DecrRefCount(eclPtr->path); + } + for (i=0; i< eclPtr->nuloc; i++) { + ckfree((char *) eclPtr->loc[i].line); + } - if (eclPtr->loc != NULL) { - ckfree((char *) eclPtr->loc); - } + if (eclPtr->loc != NULL) { + ckfree((char *) eclPtr->loc); + } - Tcl_DeleteHashTable(&eclPtr->litInfo); + Tcl_DeleteHashTable(&eclPtr->litInfo); - ckfree((char *) eclPtr); - Tcl_DeleteHashEntry(hPtr); - } - Tcl_DeleteHashTable(iPtr->lineBCPtr); - ckfree((char *) iPtr->lineBCPtr); - iPtr->lineBCPtr = NULL; + ckfree((char *) eclPtr); + Tcl_DeleteHashEntry(hPtr); + } + Tcl_DeleteHashTable(iPtr->lineBCPtr); + ckfree((char *) iPtr->lineBCPtr); + iPtr->lineBCPtr = NULL; + + /* + * Location stack for uplevel/eval/... scripts which were passed through + * proc arguments. Actually we track all arguments as we do not and cannot + * know which arguments will be used as scripts and which will not. + */ + if (iPtr->lineLAPtr->numEntries) { /* - * Location stack for uplevel/eval/... scripts which were passed - * through proc arguments. Actually we track all arguments as we do - * not and cannot know which arguments will be used as scripts and - * which will not. + * When the interp goes away we have nothing on the stack, so there + * are no arguments, so this table has to be empty. */ - if (iPtr->lineLAPtr->numEntries) { - /* - * When the interp goes away we have nothing on the stack, so - * there are no arguments, so this table has to be empty. - */ + Tcl_Panic("Argument location tracking table not empty"); + } - Tcl_Panic("Argument location tracking table not empty"); - } + Tcl_DeleteHashTable(iPtr->lineLAPtr); + ckfree((char *) iPtr->lineLAPtr); + iPtr->lineLAPtr = NULL; - Tcl_DeleteHashTable(iPtr->lineLAPtr); - ckfree((char *) iPtr->lineLAPtr); - iPtr->lineLAPtr = NULL; + if (iPtr->lineLABCPtr->numEntries) { + /* + * When the interp goes away we have nothing on the stack, so there + * are no arguments, so this table has to be empty. + */ - if (iPtr->lineLABCPtr->numEntries) { - /* - * When the interp goes away we have nothing on the stack, so - * there are no arguments, so this table has to be empty. - */ + Tcl_Panic("Argument location tracking table not empty"); + } - Tcl_Panic("Argument location tracking table not empty"); - } + Tcl_DeleteHashTable(iPtr->lineLABCPtr); + ckfree((char *) iPtr->lineLABCPtr); + iPtr->lineLABCPtr = NULL; - Tcl_DeleteHashTable(iPtr->lineLABCPtr); - ckfree((char *) iPtr->lineLABCPtr); - iPtr->lineLABCPtr = NULL; - } + /* + * Squelch the tables of traces on variables and searches over arrays in + * the in the interpreter. + */ Tcl_DeleteHashTable(&iPtr->varTraces); Tcl_DeleteHashTable(&iPtr->varSearches); @@ -7423,12 +7422,17 @@ ExprAbsFunc( goto unChanged; } else if (l == (long)0) { const char *string = objv[1]->bytes; + if (!string) { - /* There is no string representation, so internal one is correct */ + /* + * There is no string representation, so internal one is + * correct. + */ + goto unChanged; } while (isspace(UCHAR(*string))) { - ++string; + string++; } if (*string != '-') { goto unChanged; @@ -7927,7 +7931,7 @@ MathFuncWrongNumArgs( const char *tail = name + strlen(name); while (tail > name+1) { - --tail; + tail--; if (*tail == ':' && tail[-1] == ':') { name = tail+1; break; diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 042cbed..62f8f46 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.59 2009/12/29 01:43:23 patthoyts Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.60 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -1303,7 +1303,6 @@ BinaryScanCmd( case 'H': { char *dest; unsigned char *src; - int i; static const char hexdigit[] = "0123456789abcdef"; if (arg >= objc) { @@ -2303,13 +2302,15 @@ BinaryDecodeHex( value |= (c & 0xf); } else { value <<= 4; - ++cut; + cut++; } } *cursor++ = UCHAR(value); value = 0; } - if (cut > size) cut = size; + if (cut > size) { + cut = size; + } Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; @@ -2344,7 +2345,7 @@ BinaryDecodeHex( #define OUTPUT(c) \ do { \ *cursor++ = (c); \ - ++outindex; \ + outindex++; \ if (maxlen > 0 && cursor != limit) { \ if (outindex == maxlen) { \ memcpy(cursor, wrapchar, wrapcharlen); \ @@ -2505,10 +2506,12 @@ BinaryDecodeUu( continue; } } else { - ++cut; + cut++; } } - if (cut>3) cut=3; + if (cut > 3) { + cut = 3; + } *cursor++ = (((d[0] - 0x20) & 0x3f) << 2) | (((d[1] - 0x20) & 0x3f) >> 4); *cursor++ = (((d[1] - 0x20) & 0x3f) << 4) @@ -2516,7 +2519,9 @@ BinaryDecodeUu( *cursor++ = (((d[2] - 0x20) & 0x3f) << 6) | (((d[3] - 0x20) & 0x3f)); } - if (cut > size) cut = size; + if (cut > size) { + cut = size; + } Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; @@ -2584,7 +2589,6 @@ BinaryDecode64( size = ((count + 3) & ~3) * 3 / 4; begin = cursor = Tcl_SetByteArrayLength(resultObj, size); while (data < dataend) { - int i; unsigned long value = 0; for (i=0 ; i<4 ; i++) { @@ -2604,7 +2608,7 @@ BinaryDecode64( } else if (c == '=') { value <<= 6; if (cut < 2) { - ++cut; + cut++; } } else { if (strict || !isspace(c)) { @@ -2615,14 +2619,16 @@ BinaryDecode64( } } else { value <<= 6; - ++cut; + cut++; } } *cursor++ = UCHAR((value >> 16) & 0xff); *cursor++ = UCHAR((value >> 8) & 0xff); *cursor++ = UCHAR(value & 0xff); } - if (cut > size) cut = size; + if (cut > size) { + cut = size; + } Tcl_SetByteArrayLength(resultObj, cursor - begin - cut); Tcl_SetObjResult(interp, resultObj); return TCL_OK; diff --git a/generic/tclClock.c b/generic/tclClock.c index 6c87db0..7519da8 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.74 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.75 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -796,8 +796,7 @@ ConvertLocalToUTCUsingTable( if (nHave == 8) { Tcl_Panic("loop in ConvertLocalToUTCUsingTable"); } - have[nHave] = fields->tzOffset; - ++nHave; + have[nHave++] = fields->tzOffset; } fields->seconds = fields->localSeconds - fields->tzOffset; } @@ -844,7 +843,7 @@ ConvertLocalToUTCUsingC( secondOfDay = (int)(jsec % SECONDS_PER_DAY); if (secondOfDay < 0) { secondOfDay += SECONDS_PER_DAY; - --fields->julianDay; + fields->julianDay--; } GetGregorianEraYearDay(fields, changeover); GetMonthDay(fields); @@ -1257,7 +1256,7 @@ GetGregorianEraYearDay( day %= FOUR_CENTURIES; if (day < 0) { day += FOUR_CENTURIES; - --n; + n--; } year += 400 * n; @@ -1295,7 +1294,7 @@ GetGregorianEraYearDay( day %= FOUR_YEARS; if (day < 0) { day += FOUR_YEARS; - --n; + n--; } year += 4 * n; @@ -1476,15 +1475,15 @@ GetJulianDayFromEraYearMonthDay( ym1o4 = ym1 / 4; if (ym1 % 4 < 0) { - --ym1o4; + ym1o4--; } ym1o100 = ym1 / 100; if (ym1 % 100 < 0) { - --ym1o100; + ym1o100--; } ym1o400 = ym1 / 400; if (ym1 % 400 < 0) { - --ym1o400; + ym1o400--; } fields->julianDay = JDAY_1_JAN_1_CE_GREGORIAN - 1 + fields->dayOfMonth @@ -2022,7 +2021,7 @@ ClockDeleteCmdProc( ClockClientData *data = clientData; int i; - --data->refCount; + data->refCount--; if (data->refCount == 0) { for (i = 0; i < LIT__END; ++i) { Tcl_DecrRefCount(data->literals[i]); diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 4edfdec..6456bd5 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.123 2009/12/28 12:55:48 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.124 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -1121,7 +1121,6 @@ Tcl_FileObjCmd( } case FCMD_LINK: { Tcl_Obj *contents; - int index; if (objc < 3 || objc > 5) { Tcl_WrongNumArgs(interp, 2, objv, "?-linktype? linkname ?target?"); diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 85f9696..d063014 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.179 2010/02/28 21:15:11 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.180 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -3610,7 +3610,7 @@ Tcl_LsortObjCmd( sortInfo.isIncreasing = 1; break; case LSORT_INDEX: { - Tcl_Obj **indices; + Tcl_Obj **indexv; /* === START SPECIAL CASE === * @@ -3634,7 +3634,7 @@ Tcl_LsortObjCmd( */ if (TclListObjGetElements(interp, objv[i+1], &sortInfo.indexc, - &indices) != TCL_OK) { + &indexv) != TCL_OK) { return TCL_ERROR; } /* === END SPECIAL CASE === */ @@ -3661,7 +3661,7 @@ Tcl_LsortObjCmd( */ for (j=0 ; jinternalRep.twoPtrValue.ptr1; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 84fbe1b..eb6bb7f 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.203 2010/03/02 08:47:35 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.204 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -2513,7 +2513,7 @@ StringEqualCmd( if (i+1 >= objc-2) { goto str_cmp_args; } - ++i; + i++; if (TclGetIntFromObj(interp, objv[i], &reqlength) != TCL_OK) { return TCL_ERROR; } @@ -2660,7 +2660,7 @@ StringCmpCmd( if (i+1 >= objc-2) { goto str_cmp_args; } - ++i; + i++; if (TclGetIntFromObj(interp, objv[i], &reqlength) != TCL_OK) { return TCL_ERROR; } @@ -3927,7 +3927,7 @@ TclNRSwitchObjCmd( static int SwitchPostProc( ClientData data[], /* Data passed from Tcl_NRAddCallback above */ - Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Interp *interp, /* Tcl interpreter */ int result) /* Result to return*/ { /* Unpack the preserved data */ diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 3a564ff..e96c196 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.167 2010/02/26 14:38:36 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.168 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -4028,9 +4028,9 @@ PushVarName( */ if (varTokenPtr[n].size == 1) { - --n; + n--; } else { - --varTokenPtr[n].size; + varTokenPtr[n].size--; removedParen = n; } @@ -4131,7 +4131,7 @@ PushVarName( } if (removedParen) { - ++varTokenPtr[removedParen].size; + varTokenPtr[removedParen].size++; } if (allocedTokens) { TclStackFree(interp, elemTokenPtr); diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 88954ed..fb34f66 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.1 2010/02/26 14:38:36 dkf Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.2 2010/03/05 14:34:03 dkf Exp $ */ #include "tclInt.h" @@ -2790,9 +2790,9 @@ PushVarName( */ if (varTokenPtr[n].size == 1) { - --n; + n--; } else { - --varTokenPtr[n].size; + varTokenPtr[n].size--; removedParen = n; } @@ -2893,7 +2893,7 @@ PushVarName( } if (removedParen) { - ++varTokenPtr[removedParen].size; + varTokenPtr[removedParen].size++; } if (allocedTokens) { TclStackFree(interp, elemTokenPtr); diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 0b06d15..8bfd116 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.103 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.104 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1477,7 +1477,7 @@ ConvertTreeToTokens( /* Skip any white space that comes before the literal */ scanned = TclParseAllWhiteSpace(start, numBytes); - start +=scanned; + start += scanned; numBytes -= scanned; /* @@ -1498,7 +1498,7 @@ ConvertTreeToTokens( subExprTokenPtr[1].numComponents = 0; parsePtr->numTokens += 2; - start +=scanned; + start += scanned; numBytes -= scanned; break; @@ -1550,7 +1550,7 @@ ConvertTreeToTokens( } scanned = tokenPtr->start + tokenPtr->size - start; - start +=scanned; + start += scanned; numBytes -= scanned; tokenPtr += toCopy; break; @@ -1566,7 +1566,7 @@ ConvertTreeToTokens( */ scanned = TclParseAllWhiteSpace(start, numBytes); - start +=scanned; + start += scanned; numBytes -= scanned; /* @@ -1641,7 +1641,7 @@ ConvertTreeToTokens( /* Skip any white space that comes before the operator */ scanned = TclParseAllWhiteSpace(start, numBytes); - start +=scanned; + start += scanned; numBytes -= scanned; /* @@ -1672,7 +1672,7 @@ ConvertTreeToTokens( break; } - start +=scanned; + start += scanned; numBytes -= scanned; break; @@ -1693,10 +1693,10 @@ ConvertTreeToTokens( /* Skip past matching close paren. */ scanned = TclParseAllWhiteSpace(start, numBytes); - start +=scanned; + start += scanned; numBytes -= scanned; scanned = ParseLexeme(start, numBytes, &lexeme, NULL); - start +=scanned; + start += scanned; numBytes -= scanned; break; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 9552b64..d788d43 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.183 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.184 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -861,7 +861,6 @@ TclCleanupByteCode( if (hePtr) { ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr); - int i; if (eclPtr->type == TCL_LOCATION_SOURCE) { Tcl_DecrRefCount(eclPtr->path); diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 2751b4a..e0aea5b 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDictObj.c,v 1.81 2010/02/24 14:30:34 dkf Exp $ + * RCS: @(#) $Id: tclDictObj.c,v 1.82 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -405,7 +405,7 @@ FreeDictInternalRep( { Dict *dict = dictPtr->internalRep.otherValuePtr; - --dict->refcount; + dict->refcount--; if (dict->refcount <= 0) { DeleteDict(dict); } diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index bc92251..c4750c5 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnsemble.c,v 1.4 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclEnsemble.c,v 1.5 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -204,14 +204,14 @@ TclNamespaceEnsembleCmd( paramObj = (len > 0 ? objv[1] : NULL); continue; case CRT_MAP: { - Tcl_Obj *patchedDict = NULL, *subcmdObj; + Tcl_Obj *patchedDict = NULL, *subcmdWordsObj; /* * Verify that the map is sensible. */ if (Tcl_DictObjFirst(interp, objv[1], &search, - &subcmdObj, &listObj, &done) != TCL_OK) { + &subcmdWordsObj, &listObj, &done) != TCL_OK) { if (allocatedMapFlag) { Tcl_DecrRefCount(mapObj); } @@ -262,9 +262,10 @@ TclNamespaceEnsembleCmd( if (patchedDict == NULL) { patchedDict = Tcl_DuplicateObj(objv[1]); } - Tcl_DictObjPut(NULL, patchedDict, subcmdObj, newList); + Tcl_DictObjPut(NULL, patchedDict, subcmdWordsObj, + newList); } - Tcl_DictObjNext(&search, &subcmdObj, &listObj, &done); + Tcl_DictObjNext(&search, &subcmdWordsObj,&listObj, &done); } while (!done); if (allocatedMapFlag) { @@ -491,7 +492,7 @@ TclNamespaceEnsembleCmd( paramObj = (len > 0 ? objv[1] : NULL); continue; case CONF_MAP: { - Tcl_Obj *patchedDict = NULL, *subcmdObj, **listv; + Tcl_Obj *patchedDict = NULL, *subcmdWordsObj, **listv; const char *cmd; /* @@ -499,7 +500,7 @@ TclNamespaceEnsembleCmd( */ if (Tcl_DictObjFirst(interp, objv[1], &search, - &subcmdObj, &listObj, &done) != TCL_OK) { + &subcmdWordsObj, &listObj, &done) != TCL_OK) { goto freeMapAndError; } if (done) { @@ -539,10 +540,11 @@ TclNamespaceEnsembleCmd( if (patchedDict == NULL) { patchedDict = Tcl_DuplicateObj(objv[1]); } - Tcl_DictObjPut(NULL, patchedDict, subcmdObj, + Tcl_DictObjPut(NULL, patchedDict, subcmdWordsObj, newList); } - Tcl_DictObjNext(&search, &subcmdObj, &listObj, &done); + Tcl_DictObjNext(&search, &subcmdWordsObj, &listObj, + &done); } while (!done); if (allocatedMapFlag) { Tcl_DecrRefCount(mapObj); @@ -865,14 +867,14 @@ Tcl_SetEnsembleMappingDict( for (Tcl_DictObjFirst(NULL, mapDict, &search, NULL, &valuePtr, &done); !done; Tcl_DictObjNext(&search, NULL, &valuePtr, &done)) { - Tcl_Obj *cmdPtr; + Tcl_Obj *cmdObjPtr; const char *bytes; - if (Tcl_ListObjIndex(interp, valuePtr, 0, &cmdPtr) != TCL_OK) { + if (Tcl_ListObjIndex(interp, valuePtr, 0, &cmdObjPtr) != TCL_OK) { Tcl_DictObjDone(&search); return TCL_ERROR; } - bytes = TclGetString(cmdPtr); + bytes = TclGetString(cmdObjPtr); if (bytes[0] != ':' || bytes[1] != ':') { Tcl_AppendResult(interp, "ensemble target is not a fully-qualified command", @@ -2311,8 +2313,6 @@ BuildEnsembleConfig( * Remove pre-existing table. */ - Tcl_HashSearch search; - ckfree((char *) ensemblePtr->subcommandArrayPtr); hPtr = Tcl_FirstHashEntry(hash, &search); while (hPtr != NULL) { diff --git a/generic/tclEnv.c b/generic/tclEnv.c index f89ca41..87fb3d7 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.41 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.42 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -722,8 +722,7 @@ TclCygwinPutenv( /* Can't happen. */ return; } - *value = '\0'; - ++value; + *(value++) = '\0'; if (*value == '\0') { value = NULL; } diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 8e67238..28c0ab8 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.101 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.102 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -421,7 +421,7 @@ TclpGetNativePathType( && (path[1] == '/') && isdigit(UCHAR(path[2]))) { path += 3; while (isdigit(UCHAR(*path))) { - ++path; + path++; } } #endif @@ -647,11 +647,12 @@ SplitUnixPath( /* * Check for QNX // prefix */ + if ((path[0] == '/') && (path[1] == '/') && isdigit(UCHAR(path[2]))) { /* INTL: digit */ path += 3; while (isdigit(UCHAR(*path))) { /* INTL: digit */ - ++path; + path++; } } #endif @@ -1823,7 +1824,7 @@ TclGlob( if (tail[0] == '/') { tail++; } else { - tail+=2; + tail += 2; } Tcl_IncrRefCount(pathPrefix); break; diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index a6e7ed5..dcad087 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.12 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.13 2010/03/05 14:34:04 dkf Exp $ */ #include @@ -1058,7 +1058,7 @@ ReflectInput( int *errorCodePtr) { ReflectedTransform *rtPtr = clientData; - int gotBytes, copied, read; + int gotBytes, copied, readBytes; /* * The following check can be done before thread redirection, because we @@ -1124,8 +1124,8 @@ ReflectInput( return gotBytes; } - read = Tcl_ReadRaw(rtPtr->parent, buf, toRead); - if (read < 0) { + readBytes = Tcl_ReadRaw(rtPtr->parent, buf, toRead); + if (readBytes < 0) { /* * Report errors to caller. The state of the seek system is * unchanged! @@ -1144,7 +1144,7 @@ ReflectInput( return -1; } - if (read == 0) { + if (readBytes == 0) { /* * Check wether we hit on EOF in 'parent' or not. If not * differentiate between blocking and non-blocking modes. In @@ -1200,7 +1200,7 @@ ReflectInput( ((Channel *) rtPtr->parent)->state->flags &= ~CHANNEL_EOF; continue; /* at: while (toRead > 0) */ } - } /* read == 0 */ + } /* readBytes == 0 */ /* * Transform the read chunk, which was not empty. Anything we got back @@ -1208,7 +1208,7 @@ ReflectInput( * iteration will put it into the result. */ - if (!TransformRead(rtPtr, errorCodePtr, UCHARP(buf), read)) { + if (!TransformRead(rtPtr, errorCodePtr, UCHARP(buf), readBytes)) { return -1; } } /* while toRead > 0 */ @@ -2656,9 +2656,7 @@ ForwardProc( break; } - case ForwardedLimit: { - Tcl_Obj *resObj; - + case ForwardedLimit: if (InvokeTclMethod(rtPtr, "limit?", NULL, NULL, &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); paramPtr->limit.max = -1; @@ -2670,7 +2668,6 @@ ForwardProc( Tcl_DecrRefCount(resObj); break; - } default: /* diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index a22e664..23e864b 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.168 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.169 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1511,7 +1511,7 @@ TclGetOpenModeEx( default: goto error; } - i=1; + i = 1; while (i<3 && modeString[i]) { if (modeString[i] == modeString[i-1]) { goto error; diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index c732cec..edb05d7 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.57 2010/03/01 23:19:36 ferrieux Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.58 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -46,11 +46,11 @@ static void PrintUsage(Tcl_Interp *interp, */ static const Tcl_ObjType indexType = { - "index", /* name */ - FreeIndex, /* freeIntRepProc */ - DupIndex, /* dupIntRepProc */ - UpdateStringOfIndex, /* updateStringProc */ - SetIndexFromAny /* setFromAnyProc */ + "index", /* name */ + FreeIndex, /* freeIntRepProc */ + DupIndex, /* dupIntRepProc */ + UpdateStringOfIndex, /* updateStringProc */ + SetIndexFromAny /* setFromAnyProc */ }; /* @@ -145,23 +145,22 @@ Tcl_GetIndexFromObj( * * GetIndexFromObjList -- * - * This procedure looks up an object's value in a table of strings - * and returns the index of the matching string, if any. + * This procedure looks up an object's value in a table of strings and + * returns the index of the matching string, if any. * * Results: - * If the value of objPtr is identical to or a unique abbreviation - * for one of the entries in tableObjPtr, then the return value is - * TCL_OK and the index of the matching entry is stored at - * *indexPtr. If there isn't a proper match, then TCL_ERROR is - * returned and an error message is left in interp's result (unless - * interp is NULL). The msg argument is used in the error - * message; for example, if msg has the value "option" then the - * error message will say something flag 'bad option "foo": must be - * ...' + * If the value of objPtr is identical to or a unique abbreviation for + * one of the entries in tableObjPtr, then the return value is TCL_OK and + * the index of the matching entry is stored at *indexPtr. If there isn't + * a proper match, then TCL_ERROR is returned and an error message is + * left in interp's result (unless interp is NULL). The msg argument is + * used in the error message; for example, if msg has the value "option" + * then the error message will say something flag 'bad option "foo": must + * be ...' * * Side effects: - * The result of the lookup is cached as the internal rep of - * objPtr, so that repeated lookups can be done quickly. + * Removes any internal representation that the object might have. (TODO: + * find a way to cache the lookup.) * *---------------------------------------------------------------------- */ @@ -183,8 +182,8 @@ GetIndexFromObjList( const char **tablePtr; /* - * Use Tcl_GetIndexFromObjStruct to do the work to avoid duplicating - * most of the code there. This is a bit ineffiecient but simpler. + * Use Tcl_GetIndexFromObjStruct to do the work to avoid duplicating most + * of the code there. This is a bit ineffiecient but simpler. */ result = Tcl_ListObjGetElements(interp, tableObjPtr, &objc, &objv); @@ -237,13 +236,13 @@ GetIndexFromObjList( * * Results: * If the value of objPtr is identical to or a unique abbreviation for - * one of the entries in tablePtr, then the return value is TCL_OK and the - * index of the matching entry is stored at *indexPtr. If there isn't a - * proper match, then TCL_ERROR is returned and an error message is left - * in interp's result (unless interp is NULL). The msg argument is used - * in the error message; for example, if msg has the value "option" then - * the error message will say something flag 'bad option "foo": must be - * ...' + * one of the entries in tablePtr, then the return value is TCL_OK and + * the index of the matching entry is stored at *indexPtr. If there isn't + * a proper match, then TCL_ERROR is returned and an error message is + * left in interp's result (unless interp is NULL). The msg argument is + * used in the error message; for example, if msg has the value "option" + * then the error message will say something flag 'bad option "foo": must + * be ...' * * Side effects: * The result of the lookup is cached as the internal rep of objPtr, so @@ -348,8 +347,8 @@ Tcl_GetIndexFromObjStruct( objPtr->typePtr = &indexType; } indexRep->tablePtr = (void *) tablePtr; - indexRep->offset = offset; - indexRep->index = index; + indexRep->offset = offset; + indexRep->index = index; *indexPtr = index; return TCL_OK; @@ -364,18 +363,20 @@ Tcl_GetIndexFromObjStruct( TclNewObj(resultPtr); Tcl_SetObjResult(interp, resultPtr); - Tcl_AppendStringsToObj(resultPtr, (numAbbrev > 1) && - !(flags & TCL_EXACT) ? "ambiguous " : "bad ", msg, " \"", key, NULL); + Tcl_AppendStringsToObj(resultPtr, + (numAbbrev>1 && !(flags & TCL_EXACT) ? "ambiguous " : "bad "), + msg, " \"", key, NULL); if (STRING_AT(tablePtr, offset, 0) == NULL) { Tcl_AppendStringsToObj(resultPtr, "\": no valid options", NULL); } else { - Tcl_AppendStringsToObj(resultPtr, "\": must be ", STRING_AT(tablePtr, offset, 0), NULL); + Tcl_AppendStringsToObj(resultPtr, "\": must be ", + STRING_AT(tablePtr, offset, 0), NULL); for (entryPtr = NEXT_ENTRY(tablePtr, offset), count = 0; - *entryPtr != NULL; - entryPtr = NEXT_ENTRY(entryPtr, offset), count++) { + *entryPtr != NULL; + entryPtr = NEXT_ENTRY(entryPtr, offset), count++) { if (*NEXT_ENTRY(entryPtr, offset) == NULL) { - Tcl_AppendStringsToObj(resultPtr, ((count > 0) ? "," : ""), - " or ", *entryPtr, NULL); + Tcl_AppendStringsToObj(resultPtr, (count > 0 ? "," : ""), + " or ", *entryPtr, NULL); } else { Tcl_AppendStringsToObj(resultPtr, ", ", *entryPtr, NULL); } @@ -1232,7 +1233,7 @@ Tcl_ParseArgsObjv( (double *) infoPtr->dstPtr) == TCL_ERROR) { Tcl_AppendResult(interp, "expected floating-point argument ", "for \"", infoPtr->keyStr, "\" but got \"", - Tcl_GetString((Tcl_Obj *) objv[srcIndex]),"\"", NULL); + Tcl_GetString(objv[srcIndex]), "\"", NULL); goto error; } srcIndex++; @@ -1285,7 +1286,7 @@ Tcl_ParseArgsObjv( */ argsDone: - if (remObjv==NULL) { + if (remObjv == NULL) { /* * Nothing to do. */ @@ -1295,9 +1296,9 @@ Tcl_ParseArgsObjv( if (objc > 0) { leftovers = (Tcl_Obj **) ckrealloc((void *) leftovers, - (nrem+objc+1) * sizeof(Tcl_Obj*)); + (nrem+objc+1) * sizeof(Tcl_Obj *)); while (objc) { - leftovers[nrem]=objv[srcIndex]; + leftovers[nrem] = objv[srcIndex]; nrem++; srcIndex++; objc--; diff --git a/generic/tclInt.h b/generic/tclInt.h index 9c9a073..4bdb3c7 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.463 2010/02/16 21:34:30 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.464 2010/03/05 14:34:04 dkf Exp $ */ #ifndef _TCLINT @@ -2781,7 +2781,8 @@ typedef struct ForIterData { MODULE_SCOPE int TclNREvalCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp); -MODULE_SCOPE void TclAdvanceContinuations(int *line, int **next, int loc); +MODULE_SCOPE void TclAdvanceContinuations(int *line, int **next, + int loc); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp, @@ -2802,18 +2803,19 @@ MODULE_SCOPE int TclByteArrayMatch(const unsigned char *string, int strLen, const unsigned char *pattern, int ptnLen, int flags); MODULE_SCOPE double TclCeil(mp_int *a); -MODULE_SCOPE int TclCheckBadOctal(Tcl_Interp *interp, const char *value); +MODULE_SCOPE int TclCheckBadOctal(Tcl_Interp *interp, + const char *value); MODULE_SCOPE int TclChanCaughtErrorBypass(Tcl_Interp *interp, Tcl_Channel chan); MODULE_SCOPE int TclClearRootEnsemble(ClientData data[], Tcl_Interp *interp, int result); MODULE_SCOPE void TclCleanupLiteralTable(Tcl_Interp *interp, LiteralTable *tablePtr); -MODULE_SCOPE ContLineLoc* TclContinuationsEnter(Tcl_Obj *objPtr, int num, +MODULE_SCOPE ContLineLoc *TclContinuationsEnter(Tcl_Obj *objPtr, int num, int *loc); MODULE_SCOPE void TclContinuationsEnterDerived(Tcl_Obj *objPtr, int start, int *clNext); -MODULE_SCOPE ContLineLoc* TclContinuationsGet(Tcl_Obj *objPtr); +MODULE_SCOPE ContLineLoc *TclContinuationsGet(Tcl_Obj *objPtr); MODULE_SCOPE void TclContinuationsCopy(Tcl_Obj *objPtr, Tcl_Obj *originObjPtr); MODULE_SCOPE int TclDoubleDigits(char *buf, double value, int *signum); @@ -2937,7 +2939,7 @@ MODULE_SCOPE int TclMarkList(Tcl_Interp *interp, const char *list, MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr, int *codePtr, int *levelPtr); -MODULE_SCOPE int TclNokia770Doubles(); +MODULE_SCOPE int TclNokia770Doubles(void); MODULE_SCOPE void TclNsDecrRefCount(Namespace *nsPtr); MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const char *operation, @@ -3847,21 +3849,25 @@ MODULE_SCOPE void TclpFreeAllocCache(void *); MODULE_SCOPE Tcl_Mutex tclObjMutex; #endif -# define TclAllocObjStorageEx(interp, objPtr) \ - Tcl_MutexLock(&tclObjMutex); \ - if (tclFreeObjList == NULL) { \ - TclAllocateFreeObjects(); \ - } \ - (objPtr) = tclFreeObjList; \ - tclFreeObjList = (Tcl_Obj *) \ - tclFreeObjList->internalRep.otherValuePtr; \ - Tcl_MutexUnlock(&tclObjMutex) +# define TclAllocObjStorageEx(interp, objPtr) \ + do { \ + Tcl_MutexLock(&tclObjMutex); \ + if (tclFreeObjList == NULL) { \ + TclAllocateFreeObjects(); \ + } \ + (objPtr) = tclFreeObjList; \ + tclFreeObjList = (Tcl_Obj *) \ + tclFreeObjList->internalRep.otherValuePtr; \ + Tcl_MutexUnlock(&tclObjMutex); \ + } while (0) -# define TclFreeObjStorageEx(interp, objPtr) \ - Tcl_MutexLock(&tclObjMutex); \ +# define TclFreeObjStorageEx(interp, objPtr) \ + do { \ + Tcl_MutexLock(&tclObjMutex); \ (objPtr)->internalRep.otherValuePtr = (void *) tclFreeObjList; \ - tclFreeObjList = (objPtr); \ - Tcl_MutexUnlock(&tclObjMutex) + tclFreeObjList = (objPtr); \ + Tcl_MutexUnlock(&tclObjMutex); \ + } while (0) #endif #else /* TCL_MEM_DEBUG */ @@ -3869,10 +3875,13 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, int line); # define TclDbNewObj(objPtr, file, line) \ - TclIncrObjsAllocated(); \ - (objPtr) = (Tcl_Obj *) Tcl_DbCkalloc(sizeof(Tcl_Obj), (file), (line)); \ - TclDbInitNewObj((objPtr), (file), (line)); \ - TCL_DTRACE_OBJ_CREATE(objPtr) + do { \ + TclIncrObjsAllocated(); \ + (objPtr) = (Tcl_Obj *) \ + Tcl_DbCkalloc(sizeof(Tcl_Obj), (file), (line)); \ + TclDbInitNewObj((objPtr), (file), (line)); \ + TCL_DTRACE_OBJ_CREATE(objPtr); \ + } while (0) # define TclNewObj(objPtr) \ TclDbNewObj(objPtr, __FILE__, __LINE__); @@ -3983,40 +3992,40 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, #define TCL_MAX_TOKENS (int)(UINT_MAX / sizeof(Tcl_Token)) #define TCL_MIN_TOKEN_GROWTH 50 #define TclGrowTokenArray(tokenPtr, used, available, append, staticPtr) \ -{ \ - int needed = (used) + (append); \ - if (needed > TCL_MAX_TOKENS) { \ - Tcl_Panic("max # of tokens for a Tcl parse (%d) exceeded", \ - TCL_MAX_TOKENS); \ - } \ - if (needed > (available)) { \ - int allocated = 2 * needed; \ - Tcl_Token *oldPtr = (tokenPtr); \ - Tcl_Token *newPtr; \ - if (oldPtr == (staticPtr)) { \ - oldPtr = NULL; \ - } \ - if (allocated > TCL_MAX_TOKENS) { \ - allocated = TCL_MAX_TOKENS; \ + do { \ + int needed = (used) + (append); \ + if (needed > TCL_MAX_TOKENS) { \ + Tcl_Panic("max # of tokens for a Tcl parse (%d) exceeded", \ + TCL_MAX_TOKENS); \ } \ - newPtr = (Tcl_Token *) attemptckrealloc((char *) oldPtr, \ - (unsigned int) (allocated * sizeof(Tcl_Token))); \ - if (newPtr == NULL) { \ - allocated = needed + (append) + TCL_MIN_TOKEN_GROWTH; \ + if (needed > (available)) { \ + int allocated = 2 * needed; \ + Tcl_Token *oldPtr = (tokenPtr); \ + Tcl_Token *newPtr; \ + if (oldPtr == (staticPtr)) { \ + oldPtr = NULL; \ + } \ if (allocated > TCL_MAX_TOKENS) { \ allocated = TCL_MAX_TOKENS; \ } \ - newPtr = (Tcl_Token *) ckrealloc((char *) oldPtr, \ + newPtr = (Tcl_Token *) attemptckrealloc((char *) oldPtr, \ (unsigned int) (allocated * sizeof(Tcl_Token))); \ + if (newPtr == NULL) { \ + allocated = needed + (append) + TCL_MIN_TOKEN_GROWTH; \ + if (allocated > TCL_MAX_TOKENS) { \ + allocated = TCL_MAX_TOKENS; \ + } \ + newPtr = (Tcl_Token *) ckrealloc((char *) oldPtr, \ + (unsigned int) (allocated * sizeof(Tcl_Token))); \ + } \ + (available) = allocated; \ + if (oldPtr == NULL) { \ + memcpy(newPtr, staticPtr, \ + (size_t) ((used) * sizeof(Tcl_Token))); \ + } \ + (tokenPtr) = newPtr; \ } \ - (available) = allocated; \ - if (oldPtr == NULL) { \ - memcpy(newPtr, staticPtr, \ - (size_t) ((used) * sizeof(Tcl_Token))); \ - } \ - (tokenPtr) = newPtr; \ - } \ -} + } while (0) #define TclGrowParseTokenArray(parsePtr, append) \ TclGrowTokenArray((parsePtr)->tokenPtr, (parsePtr)->numTokens, \ @@ -4110,8 +4119,8 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, */ #define TclInvalidateNsCmdLookup(nsPtr) \ - if ((nsPtr)->numExportPatterns) { \ - (nsPtr)->exportLookupEpoch++; \ + if ((nsPtr)->numExportPatterns) { \ + (nsPtr)->exportLookupEpoch++; \ } /* @@ -4154,7 +4163,8 @@ MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); *---------------------------------------------------------------- */ -#define TclMatchIsTrivial(pattern) strpbrk((pattern), "*[?\\") == NULL +#define TclMatchIsTrivial(pattern) \ + (strpbrk((pattern), "*[?\\") == NULL) /* *---------------------------------------------------------------- @@ -4165,7 +4175,8 @@ MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); *---------------------------------------------------------------- */ -#define TclFormatInt(buf, n) sprintf((buf), "%ld", (long)(n)) +#define TclFormatInt(buf, n) \ + sprintf((buf), "%ld", (long)(n)) /* *---------------------------------------------------------------- @@ -4183,10 +4194,12 @@ MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); */ #define TclSetIntObj(objPtr, i) \ - TclInvalidateStringRep(objPtr);\ - TclFreeIntRep(objPtr); \ - (objPtr)->internalRep.longValue = (long)(i); \ - (objPtr)->typePtr = &tclIntType + do { \ + TclInvalidateStringRep(objPtr); \ + TclFreeIntRep(objPtr); \ + (objPtr)->internalRep.longValue = (long)(i); \ + (objPtr)->typePtr = &tclIntType; \ + } while (0) #define TclSetLongObj(objPtr, l) \ TclSetIntObj((objPtr), (l)) @@ -4203,17 +4216,21 @@ MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); #ifndef NO_WIDE_TYPE #define TclSetWideIntObj(objPtr, w) \ - TclInvalidateStringRep(objPtr);\ - TclFreeIntRep(objPtr); \ - (objPtr)->internalRep.wideValue = (Tcl_WideInt)(w); \ - (objPtr)->typePtr = &tclWideIntType + do { \ + TclInvalidateStringRep(objPtr); \ + TclFreeIntRep(objPtr); \ + (objPtr)->internalRep.wideValue = (Tcl_WideInt)(w); \ + (objPtr)->typePtr = &tclWideIntType; \ + } while (0) #endif #define TclSetDoubleObj(objPtr, d) \ - TclInvalidateStringRep(objPtr);\ - TclFreeIntRep(objPtr); \ - (objPtr)->internalRep.doubleValue = (double)(d); \ - (objPtr)->typePtr = &tclDoubleType + do { \ + TclInvalidateStringRep(objPtr); \ + TclFreeIntRep(objPtr); \ + (objPtr)->internalRep.doubleValue = (double)(d); \ + (objPtr)->typePtr = &tclDoubleType; \ + } while (0) /* *---------------------------------------------------------------- @@ -4234,13 +4251,15 @@ MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); #ifndef TCL_MEM_DEBUG #define TclNewIntObj(objPtr, i) \ - TclIncrObjsAllocated(); \ - TclAllocObjStorage(objPtr); \ - (objPtr)->refCount = 0; \ - (objPtr)->bytes = NULL; \ - (objPtr)->internalRep.longValue = (long)(i); \ - (objPtr)->typePtr = &tclIntType; \ - TCL_DTRACE_OBJ_CREATE(objPtr) + do { \ + TclIncrObjsAllocated(); \ + TclAllocObjStorage(objPtr); \ + (objPtr)->refCount = 0; \ + (objPtr)->bytes = NULL; \ + (objPtr)->internalRep.longValue = (long)(i); \ + (objPtr)->typePtr = &tclIntType; \ + TCL_DTRACE_OBJ_CREATE(objPtr); \ + } while (0) #define TclNewLongObj(objPtr, l) \ TclNewIntObj((objPtr), (l)) @@ -4253,21 +4272,25 @@ MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); TclNewIntObj((objPtr), ((b)? 1 : 0)) #define TclNewDoubleObj(objPtr, d) \ - TclIncrObjsAllocated(); \ - TclAllocObjStorage(objPtr); \ - (objPtr)->refCount = 0; \ - (objPtr)->bytes = NULL; \ - (objPtr)->internalRep.doubleValue = (double)(d); \ - (objPtr)->typePtr = &tclDoubleType; \ - TCL_DTRACE_OBJ_CREATE(objPtr) + do { \ + TclIncrObjsAllocated(); \ + TclAllocObjStorage(objPtr); \ + (objPtr)->refCount = 0; \ + (objPtr)->bytes = NULL; \ + (objPtr)->internalRep.doubleValue = (double)(d); \ + (objPtr)->typePtr = &tclDoubleType; \ + TCL_DTRACE_OBJ_CREATE(objPtr); \ + } while (0) #define TclNewStringObj(objPtr, s, len) \ - TclIncrObjsAllocated(); \ - TclAllocObjStorage(objPtr); \ - (objPtr)->refCount = 0; \ - TclInitStringRep((objPtr), (s), (len));\ - (objPtr)->typePtr = NULL; \ - TCL_DTRACE_OBJ_CREATE(objPtr) + do { \ + TclIncrObjsAllocated(); \ + TclAllocObjStorage(objPtr); \ + (objPtr)->refCount = 0; \ + TclInitStringRep((objPtr), (s), (len)); \ + (objPtr)->typePtr = NULL; \ + TCL_DTRACE_OBJ_CREATE(objPtr); \ + } while (0) #else /* TCL_MEM_DEBUG */ #define TclNewIntObj(objPtr, i) \ @@ -4396,43 +4419,45 @@ MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); *---------------------------------------------------------------- */ -#define TclSmallAlloc(nbytes, memPtr) \ +#define TclSmallAlloc(nbytes, memPtr) \ TclSmallAllocEx(NULL, (nbytes), (memPtr)) -#define TclSmallFree(memPtr) \ +#define TclSmallFree(memPtr) \ TclSmallFreeEx(NULL, (memPtr)) #ifndef TCL_MEM_DEBUG -#define TclSmallAllocEx(interp, nbytes, memPtr) \ - { \ +#define TclSmallAllocEx(interp, nbytes, memPtr) \ + do { \ Tcl_Obj *objPtr; \ TCL_CT_ASSERT((nbytes)<=sizeof(Tcl_Obj)); \ TclIncrObjsAllocated(); \ TclAllocObjStorageEx((interp), (objPtr)); \ memPtr = (ClientData) (objPtr); \ - } + } while (0) -#define TclSmallFreeEx(interp, memPtr) \ - TclFreeObjStorageEx((interp), (Tcl_Obj *) (memPtr)); \ - TclIncrObjsFreed() +#define TclSmallFreeEx(interp, memPtr) \ + do { \ + TclFreeObjStorageEx((interp), (Tcl_Obj *) (memPtr)); \ + TclIncrObjsFreed(); \ + } while (0) #else /* TCL_MEM_DEBUG */ -#define TclSmallAllocEx(interp, nbytes, memPtr) \ - { \ +#define TclSmallAllocEx(interp, nbytes, memPtr) \ + do { \ Tcl_Obj *objPtr; \ TCL_CT_ASSERT((nbytes)<=sizeof(Tcl_Obj)); \ TclNewObj(objPtr); \ memPtr = (ClientData) objPtr; \ - } + } while (0) -#define TclSmallFreeEx(interp, memPtr) \ - { \ +#define TclSmallFreeEx(interp, memPtr) \ + do { \ Tcl_Obj *objPtr = (Tcl_Obj *) memPtr; \ objPtr->bytes = NULL; \ objPtr->typePtr = NULL; \ objPtr->refCount = 1; \ TclDecrRefCount(objPtr); \ - } + } while (0) #endif /* TCL_MEM_DEBUG */ /* @@ -4479,7 +4504,8 @@ typedef struct TEOV_callback { * Inline version of Tcl_NRAddCallback. */ -#define TclNRAddCallback(interp,postProcPtr,data0,data1,data2,data3) { \ +#define TclNRAddCallback(interp,postProcPtr,data0,data1,data2,data3) \ + do { \ TEOV_callback *callbackPtr; \ TCLNR_ALLOC((interp), (callbackPtr)); \ callbackPtr->procPtr = (postProcPtr); \ @@ -4489,9 +4515,10 @@ typedef struct TEOV_callback { callbackPtr->data[3] = (ClientData)(data3); \ callbackPtr->nextPtr = TOP_CB(interp); \ TOP_CB(interp) = callbackPtr; \ - } + } while (0) -#define TclNRDeferCallback(interp,postProcPtr,data0,data1,data2,data3) { \ +#define TclNRDeferCallback(interp,postProcPtr,data0,data1,data2,data3) \ + do { \ TEOV_callback *callbackPtr; \ TCLNR_ALLOC((interp), (callbackPtr)); \ callbackPtr->procPtr = (postProcPtr); \ @@ -4501,16 +4528,17 @@ typedef struct TEOV_callback { callbackPtr->data[3] = (ClientData)(data3); \ callbackPtr->nextPtr = ((Interp *)interp)->deferredCallbacks; \ ((Interp *)interp)->deferredCallbacks = callbackPtr; \ - } + } while (0) -#define TclNRSpliceCallbacks(interp,topPtr) { \ +#define TclNRSpliceCallbacks(interp, topPtr) \ + do { \ TEOV_callback *bottomPtr = topPtr; \ while (bottomPtr->nextPtr) { \ bottomPtr = bottomPtr->nextPtr; \ } \ bottomPtr->nextPtr = TOP_CB(interp); \ TOP_CB(interp) = topPtr; \ - } + } while (0) #define TclNRSpliceDeferred(interp) \ if (((Interp *)interp)->deferredCallbacks) { \ diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 7c5e5b5..c9959fc 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInterp.c,v 1.111 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclInterp.c,v 1.112 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -645,7 +645,7 @@ Tcl_InterpObjCmd( int i, flags; Tcl_Interp *slaveInterp; Tcl_Obj *resultObjPtr; - static const char *const options[] = { + static const char *const cancelOptions[] = { "-unwind", "--", NULL }; enum option { @@ -658,8 +658,8 @@ Tcl_InterpObjCmd( if (TclGetString(objv[i])[0] != '-') { break; } - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, - &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], cancelOptions, "option", + 0, &index) != TCL_OK) { return TCL_ERROR; } @@ -720,7 +720,7 @@ Tcl_InterpObjCmd( int i, last, safe; Tcl_Obj *slavePtr; char buf[16 + TCL_INTEGER_SPACE]; - static const char *const options[] = { + static const char *const createOptions[] = { "-safe", "--", NULL }; enum option { @@ -737,8 +737,8 @@ Tcl_InterpObjCmd( last = 0; for (i = 2; i < objc; i++) { if ((last == 0) && (Tcl_GetString(objv[i])[0] == '-')) { - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, - &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], createOptions, + "option", 0, &index) != TCL_OK) { return TCL_ERROR; } if (index == OPT_SAFE) { @@ -879,7 +879,7 @@ Tcl_InterpObjCmd( return TCL_OK; } case OPT_INVOKEHID: { - int i, index; + int i; const char *namespaceName; Tcl_Interp *slaveInterp; static const char *const hiddenOptions[] = { @@ -2460,7 +2460,7 @@ SlaveObjCmd( Tcl_SetObjResult(interp, Tcl_NewBooleanObj(Tcl_IsSafe(slaveInterp))); return TCL_OK; case OPT_INVOKEHIDDEN: { - int i, index; + int i; const char *namespaceName; static const char *const hiddenOptions[] = { "-global", "-namespace", "--", NULL diff --git a/generic/tclLoad.c b/generic/tclLoad.c index e5b70c3..e6e2ba5 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.23 2008/12/19 09:33:16 nijtmans Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.24 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -443,9 +443,9 @@ Tcl_LoadObjCmd( Tcl_MutexLock(&packageMutex); if (Tcl_IsSafe(target)) { - ++pkgPtr->safeInterpRefCount; + pkgPtr->safeInterpRefCount++; } else { - ++pkgPtr->interpRefCount; + pkgPtr->interpRefCount++; } Tcl_MutexUnlock(&packageMutex); @@ -725,9 +725,9 @@ Tcl_UnloadObjCmd( Tcl_MutexUnlock(&packageMutex); if (Tcl_IsSafe(target)) { - --safeRefCount; + safeRefCount--; } else { - --trustedRefCount; + trustedRefCount--; } if (safeRefCount <= 0 && trustedRefCount <= 0) { @@ -747,7 +747,7 @@ Tcl_UnloadObjCmd( Tcl_MutexLock(&packageMutex); if (Tcl_IsSafe(target)) { - --pkgPtr->safeInterpRefCount; + pkgPtr->safeInterpRefCount--; /* * Do not let counter get negative. @@ -757,7 +757,7 @@ Tcl_UnloadObjCmd( pkgPtr->safeInterpRefCount = 0; } } else { - --pkgPtr->interpRefCount; + pkgPtr->interpRefCount--; /* * Do not let counter get negative. diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index dee324c..e32e0ba 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.203 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.204 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1638,13 +1638,12 @@ DoImport( cmdPtr = Tcl_GetHashValue(hPtr); if (found != NULL && cmdPtr->deleteProc == DeleteImportedCmd) { Command *overwrite = Tcl_GetHashValue(found); - Command *link = cmdPtr; + Command *linkCmd = cmdPtr; - while (link->deleteProc == DeleteImportedCmd) { - ImportedCmdData *dataPtr = link->objClientData; - - link = dataPtr->realCmdPtr; - if (overwrite == link) { + while (linkCmd->deleteProc == DeleteImportedCmd) { + dataPtr = linkCmd->objClientData; + linkCmd = dataPtr->realCmdPtr; + if (overwrite == linkCmd) { Tcl_AppendResult(interp, "import pattern \"", pattern, "\" would create a loop containing command \"", Tcl_DStringValue(&ds), "\"", NULL); diff --git a/generic/tclOO.c b/generic/tclOO.c index 7ae6ac0..905626a 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.34 2010/03/04 23:42:53 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.35 2010/03/05 14:34:04 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -1006,10 +1006,9 @@ ObjectNamespaceDeleted( } if (clsPtr != NULL) { - Class *superPtr, *mixinPtr; + Class *superPtr; if (clsPtr->metadataPtr != NULL) { - FOREACH_HASH_DECLS; Tcl_ObjectMetadataType *metadataTypePtr; ClientData value; diff --git a/generic/tclParse.c b/generic/tclParse.c index dd9e4ff..0e55549 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -468,7 +468,7 @@ Tcl_ParseCommand( for(s=elemStart;size>0;s++,size--) { if ((*s)=='\\') { - nakedbs=1; + nakedbs = 1; break; } } @@ -661,7 +661,7 @@ ParseWhiteSpace( if (p[1] != '\n') { break; } - p+=2; + p += 2; if (--numBytes == 0) { *incompletePtr = 1; break; @@ -746,7 +746,7 @@ TclParseHex( break; } - ++p; + p++; result <<= 4; if (digit >= 'a') { diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index df1af1c..152ffde 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.87 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.88 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -251,7 +251,7 @@ TclFSNormalizeAbsolutePath( continue; } if (dirSep[2] == '.' && IsSeparatorOrNull(dirSep[3])) { - Tcl_Obj *link; + Tcl_Obj *linkObj; int curLen; char *linkStr; @@ -261,6 +261,7 @@ TclFSNormalizeAbsolutePath( if (retVal == NULL) { const char *path = TclGetString(pathPtr); + retVal = Tcl_NewStringObj(path, dirSep - path); Tcl_IncrRefCount(retVal); } @@ -269,16 +270,17 @@ TclFSNormalizeAbsolutePath( Tcl_AppendToObj(retVal, dirSep, 1); } if (!first || (tclPlatform == TCL_PLATFORM_UNIX)) { - link = Tcl_FSLink(retVal, NULL, 0); - if (link != NULL) { + linkObj = Tcl_FSLink(retVal, NULL, 0); + if (linkObj != NULL) { /* * Got a link. Need to check if the link is relative * or absolute, for those platforms where relative * links exist. */ - if (tclPlatform != TCL_PLATFORM_WINDOWS && - Tcl_FSGetPathType(link) == TCL_PATH_RELATIVE) { + if (tclPlatform != TCL_PLATFORM_WINDOWS + && Tcl_FSGetPathType(linkObj) + == TCL_PATH_RELATIVE) { /* * We need to follow this link which is relative * to retVal's directory. This means concatenating @@ -304,8 +306,8 @@ TclFSNormalizeAbsolutePath( */ Tcl_SetObjLength(retVal, curLen+1); - Tcl_AppendObjToObj(retVal, link); - TclDecrRefCount(link); + Tcl_AppendObjToObj(retVal, linkObj); + TclDecrRefCount(linkObj); linkStr = Tcl_GetStringFromObj(retVal, &curLen); } else { /* @@ -313,7 +315,7 @@ TclFSNormalizeAbsolutePath( */ TclDecrRefCount(retVal); - retVal = link; + retVal = linkObj; linkStr = Tcl_GetStringFromObj(retVal, &curLen); /* @@ -878,18 +880,18 @@ Tcl_FSJoinPath( * could expand that in the future. */ - if ((i == (elements-2)) && (i == 0) && (elt->typePtr == &tclFsPathType) - && !(elt->bytes != NULL && (elt->bytes[0] == '\0'))) { - Tcl_Obj *tail; - Tcl_PathType type; + if ((i == (elements-2)) && (i == 0) + && (elt->typePtr == &tclFsPathType) + && !((elt->bytes != NULL) && (elt->bytes[0] == '\0'))) { + Tcl_Obj *tailObj; - Tcl_ListObjIndex(NULL, listObj, i+1, &tail); - type = TclGetPathType(tail, NULL, NULL, NULL); + Tcl_ListObjIndex(NULL, listObj, i+1, &tailObj); + type = TclGetPathType(tailObj, NULL, NULL, NULL); if (type == TCL_PATH_RELATIVE) { const char *str; int len; - str = Tcl_GetStringFromObj(tail, &len); + str = Tcl_GetStringFromObj(tailObj, &len); if (len == 0) { /* * This happens if we try to handle the root volume '/'. @@ -931,22 +933,22 @@ Tcl_FSJoinPath( /* * Otherwise we don't have an easy join, and we must let the - * more general code below handle things + * more general code below handle things. */ } else if (tclPlatform == TCL_PLATFORM_UNIX) { if (res != NULL) { TclDecrRefCount(res); } - return tail; + return tailObj; } else { - const char *str = Tcl_GetString(tail); + const char *str = TclGetString(tailObj); if (tclPlatform == TCL_PLATFORM_WINDOWS) { if (strchr(str, '\\') == NULL) { if (res != NULL) { TclDecrRefCount(res); } - return tail; + return tailObj; } } } @@ -2752,7 +2754,7 @@ TclNativePathInFilesystem( int len; - Tcl_GetStringFromObj(pathPtr, &len); + (void) Tcl_GetStringFromObj(pathPtr, &len); if (len == 0) { /* * We reject the empty path "". diff --git a/generic/tclProc.c b/generic/tclProc.c index e705108..e4ca35b 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclProc.c,v 1.178 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.179 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -332,8 +332,8 @@ Tcl_ProcObjCmd( } if ((procArgs[0] == 'a') && (strncmp(procArgs, "args", 4) == 0)) { - procArgs +=4; - while(*procArgs != '\0') { + procArgs += 4; + while (*procArgs != '\0') { if (*procArgs != ' ') { goto done; } @@ -973,11 +973,11 @@ TclNRUplevelObjCmd( if (result == -1) { return TCL_ERROR; } - objc -= (result+1); + objc -= result + 1; if (objc == 0) { goto uplevelSyntax; } - objv += (result+1); + objv += result + 1; /* * Modify the interpreter state to execute in the given frame. @@ -1390,7 +1390,7 @@ InitLocalCache( i++; } namePtr++; - localPtr=localPtr->nextPtr; + localPtr = localPtr->nextPtr; } codePtr->localCachePtr = localCachePtr; localCachePtr->refCount = 1; diff --git a/generic/tclScan.c b/generic/tclScan.c index a9be080..6d23950 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.34 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.35 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -449,14 +449,10 @@ ValidateFormat( TCL_STATIC); goto error; default: - { - char buf[TCL_UTF_MAX+1]; - - buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; - Tcl_AppendResult(interp, "bad scan conversion character \"", - buf, "\"", NULL); - goto error; - } + buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; + Tcl_AppendResult(interp, "bad scan conversion character \"", buf, + "\"", NULL); + goto error; } if (!(flags & SCAN_SUPPRESS)) { if (objIndex >= nspace) { diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 20016db..9577798 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.40 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.41 2010/03/05 14:34:04 dkf Exp $ * *---------------------------------------------------------------------- */ @@ -143,7 +143,7 @@ static int n770_fp; /* Flag is 1 on Nokia N770 floating point. static double AbsoluteValue(double v, int *signum); static int AccumulateDecimalDigit(unsigned, int, Tcl_WideUInt *, mp_int *, int); -static double BignumToBiasedFrExp(mp_int *big, int* machexp); +static double BignumToBiasedFrExp(mp_int *big, int *machexp); static int GetIntegerTimesPower(double v, mp_int *r, int *e); static double MakeHighPrecisionDouble(int signum, mp_int *significand, int nSigDigs, int exponent); @@ -456,7 +456,7 @@ TclParseNumber( case ZERO_O: zeroo: if (c == '0') { - ++numTrailZeros; + numTrailZeros++; state = OCTAL; break; } else if (c >= '1' && c <= '7') { @@ -529,7 +529,7 @@ TclParseNumber( */ if (c == '0') { - ++numTrailZeros; + numTrailZeros++; state = BAD_OCTAL; break; } else if (isdigit(UCHAR(c))) { @@ -572,7 +572,7 @@ TclParseNumber( case ZERO_X: zerox: if (c == '0') { - ++numTrailZeros; + numTrailZeros++; state = HEXADECIMAL; break; } else if (isdigit(UCHAR(c))) { @@ -619,7 +619,7 @@ TclParseNumber( case ZERO_B: zerob: if (c == '0') { - ++numTrailZeros; + numTrailZeros++; state = BINARY; break; } else if (c != '1') { @@ -666,7 +666,7 @@ TclParseNumber( acceptPoint = p; acceptLen = len; if (c == '0') { - ++numTrailZeros; + numTrailZeros++; state = DECIMAL; break; } else if (isdigit(UCHAR(c))) { @@ -709,12 +709,12 @@ TclParseNumber( case LEADING_RADIX_POINT: if (c == '0') { - ++numDigitsAfterDp; - ++numTrailZeros; + numDigitsAfterDp++; + numTrailZeros++; state = FRACTION; break; } else if (isdigit(UCHAR(c))) { - ++numDigitsAfterDp; + numDigitsAfterDp++; if (objPtr != NULL) { significandOverflow = AccumulateDecimalDigit( (unsigned)(c-'0'), numTrailZeros, @@ -894,8 +894,8 @@ TclParseNumber( acceptLen = len; goto endgame; } - ++p; - --len; + p++; + len--; } endgame: @@ -921,8 +921,8 @@ TclParseNumber( */ while (len != 0 && isspace(UCHAR(*p))) { - ++p; - --len; + p++; + len--; } } if (endPtrPtr == NULL) { @@ -1924,7 +1924,7 @@ TclDoubleDigits( i = mp_cmp_mag(&temp, &s); if (i>0 || (highOK && i==0)) { mp_mul_d(&s, 10, &s); - ++k; + k++; } else { mp_mul_d(&temp, 10, &temp); i = mp_cmp_mag(&temp, &s); @@ -1932,7 +1932,7 @@ TclDoubleDigits( mp_mul_d(&r, 10, &r); mp_mul_d(&mplus, 10, &mplus); mp_mul_d(&mminus, 10, &mminus); - --k; + k--; } } @@ -1961,7 +1961,7 @@ TclDoubleDigits( if (highOK) { tc2 = (tc2 >= 0); } else { - tc2= (tc2 > 0); + tc2 = (tc2 > 0); } if (!tc1) { if (!tc2) { @@ -2206,7 +2206,7 @@ TclInitDoubleConversion(void) if (frexp((double) FLT_RADIX, &log2FLT_RADIX) != 0.5) { Tcl_Panic("This code doesn't work on a decimal machine!"); } - --log2FLT_RADIX; + log2FLT_RADIX--; mantBits = DBL_MANT_DIG * log2FLT_RADIX; d = 1.0; diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 005f3d9..30851c1 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.133 2010/02/24 10:32:17 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.134 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2376,7 +2376,6 @@ AppendPrintfToObjVA( int code, objc; Tcl_Obj **objv, *list = Tcl_NewObj(); const char *p; - char *end; p = format; Tcl_IncrRefCount(list); @@ -2469,10 +2468,13 @@ AppendPrintfToObjVA( p++; break; case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': + case '5': case '6': case '7': case '8': case '9': { + char *end; + lastNum = (int) strtoul(p, &end, 10); p = end; break; + } case '.': gotPrecision = 1; p++; diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index bd6491c..6ea6351 100755 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadAlloc.c,v 1.31 2009/11/26 17:37:26 das Exp $ + * RCS: @(#) $Id: tclThreadAlloc.c,v 1.32 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -325,7 +325,7 @@ TclpAlloc( blockPtr = NULL; size = reqSize + sizeof(Block); #if RCHECK - ++size; + size++; #endif if (size > MAXALLOC) { bucket = NBUCKETS; @@ -336,13 +336,13 @@ TclpAlloc( } else { bucket = 0; while (bucketInfo[bucket].blockSize < size) { - ++bucket; + bucket++; } if (cachePtr->buckets[bucket].numFree || GetBlocks(cachePtr, bucket)) { blockPtr = cachePtr->buckets[bucket].firstPtr; cachePtr->buckets[bucket].firstPtr = blockPtr->nextBlock; - --cachePtr->buckets[bucket].numFree; - ++cachePtr->buckets[bucket].numRemoves; + cachePtr->buckets[bucket].numFree--; + cachePtr->buckets[bucket].numRemoves++; cachePtr->buckets[bucket].totalAssigned += reqSize; } } @@ -402,8 +402,8 @@ TclpFree( cachePtr->buckets[bucket].totalAssigned -= blockPtr->blockReqSize; blockPtr->nextBlock = cachePtr->buckets[bucket].firstPtr; cachePtr->buckets[bucket].firstPtr = blockPtr; - ++cachePtr->buckets[bucket].numFree; - ++cachePtr->buckets[bucket].numInserts; + cachePtr->buckets[bucket].numFree++; + cachePtr->buckets[bucket].numInserts++; if (cachePtr != sharedPtr && cachePtr->buckets[bucket].numFree > bucketInfo[bucket].maxBlocks) { @@ -469,7 +469,7 @@ TclpRealloc( blockPtr = Ptr2Block(ptr); size = reqSize + sizeof(Block); #if RCHECK - ++size; + size++; #endif bucket = blockPtr->sourceBucket; if (bucket != NBUCKETS) { @@ -578,7 +578,7 @@ TclThreadAllocObj(void) objPtr = cachePtr->firstObjPtr; cachePtr->firstObjPtr = objPtr->internalRep.otherValuePtr; - --cachePtr->numObjects; + cachePtr->numObjects--; return objPtr; } @@ -618,7 +618,7 @@ TclThreadFreeObj( objPtr->internalRep.otherValuePtr = cachePtr->firstObjPtr; cachePtr->firstObjPtr = objPtr; - ++cachePtr->numObjects; + cachePtr->numObjects++; /* * If the number of free objects has exceeded the high water mark, move @@ -810,14 +810,14 @@ LockBucket( #if 0 if (Tcl_MutexTryLock(bucketInfo[bucket].lockPtr) != TCL_OK) { Tcl_MutexLock(bucketInfo[bucket].lockPtr); - ++cachePtr->buckets[bucket].numWaits; - ++sharedPtr->buckets[bucket].numWaits; + cachePtr->buckets[bucket].numWaits++; + sharedPtr->buckets[bucket].numWaits++; } #else Tcl_MutexLock(bucketInfo[bucket].lockPtr); #endif - ++cachePtr->buckets[bucket].numLocks; - ++sharedPtr->buckets[bucket].numLocks; + cachePtr->buckets[bucket].numLocks++; + sharedPtr->buckets[bucket].numLocks++; } static void @@ -956,7 +956,7 @@ GetBlocks( size = bucketInfo[n].blockSize; blockPtr = cachePtr->buckets[n].firstPtr; cachePtr->buckets[n].firstPtr = blockPtr->nextBlock; - --cachePtr->buckets[n].numFree; + cachePtr->buckets[n].numFree--; break; } } diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 6b054d8..71e4093 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.113 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.114 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -435,7 +435,7 @@ Tcl_SplitList( if (next == '\0') { break; } - ++l; + l++; if (isspace(UCHAR(next))) { /* INTL: ISO space. */ continue; } @@ -553,7 +553,7 @@ TclMarkList( if ((l+1) == end) { break; } - ++l; + l++; if (isspace(UCHAR(next))) { /* INTL: ISO space. */ continue; } @@ -2238,7 +2238,7 @@ Tcl_PrintDouble( * at least TCL_DOUBLE_SPACE characters. */ { char *p, c; - int exp; + int exponent; int signum; char buffer[TCL_DOUBLE_SPACE]; Tcl_UniChar ch; @@ -2279,12 +2279,12 @@ Tcl_PrintDouble( * Ordinary (normal and denormal) values. */ - exp = TclDoubleDigits(buffer, value, &signum); + exponent = TclDoubleDigits(buffer, value, &signum); if (signum) { *dst++ = '-'; } p = buffer; - if (exp < -3 || exp > 17) { + if (exponent < -3 || exponent > 17) { /* * E format for numbers < 1e-3 or >= 1e17. */ @@ -2298,17 +2298,17 @@ Tcl_PrintDouble( c = *++p; } } - sprintf(dst, "e%+d", exp-1); + sprintf(dst, "e%+d", exponent-1); } else { /* * F format for others. */ - if (exp <= 0) { + if (exponent <= 0) { *dst++ = '0'; } c = *p; - while (exp-- > 0) { + while (exponent-- > 0) { if (c != '\0') { *dst++ = c; c = *++p; @@ -2320,7 +2320,7 @@ Tcl_PrintDouble( if (c == '\0') { *dst++ = '0'; } else { - while (++exp < 0) { + while (++exponent < 0) { *dst++ = '0'; } while (c != '\0') { @@ -2624,14 +2624,13 @@ TclGetIntForIndex( parseError: if (interp != NULL) { - const char *bytes = Tcl_GetString(objPtr); - /* * The result might not be empty; this resets it which should be both * a cheap operation, and of little problem because this is an * error-generation path anyway. */ + bytes = Tcl_GetString(objPtr); Tcl_ResetResult(interp); Tcl_AppendResult(interp, "bad index \"", bytes, "\": must be integer?[+-]integer? or end?[+-]integer?", NULL); @@ -2820,7 +2819,7 @@ TclCheckBadOctal( } if (*p == '0') { if ((p[1] == 'o') || p[1] == 'O') { - p+=2; + p += 2; } while (isdigit(UCHAR(*p))) { /* INTL: digit. */ p++; diff --git a/generic/tclVar.c b/generic/tclVar.c index 6ad657f..9b2a11b 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.197 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.198 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -2445,7 +2445,7 @@ UnsetVarStruct( if (traced) { VarTrace *tracePtr = NULL; - Tcl_HashEntry *tPtr = NULL; + Tcl_HashEntry *tPtr; if (TclIsVarTraced(&dummyVar)) { /* @@ -2454,9 +2454,8 @@ UnsetVarStruct( */ int isNew; - Tcl_HashEntry *tPtr = - Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); + tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); tracePtr = Tcl_GetHashValue(tPtr); varPtr->flags &= ~VAR_ALL_TRACES; Tcl_DeleteHashEntry(tPtr); @@ -2464,8 +2463,6 @@ UnsetVarStruct( tPtr = Tcl_CreateHashEntry(&iPtr->varTraces, (char *) &dummyVar, &isNew); Tcl_SetHashValue(tPtr, tracePtr); - } else { - tPtr = NULL; } } @@ -2484,12 +2481,12 @@ UnsetVarStruct( tracePtr = NULL; if (TclIsVarTraced(&dummyVar)) { - tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) &dummyVar); + tPtr = Tcl_FindHashEntry(&iPtr->varTraces, + (char *) &dummyVar); tracePtr = Tcl_GetHashValue(tPtr); - } - - if (tPtr) { - Tcl_DeleteHashEntry(tPtr); + if (tPtr) { + Tcl_DeleteHashEntry(tPtr); + } } } diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 21d9a82..a8d97d4 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.35 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.36 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -1700,15 +1700,16 @@ TclZlibCmd( NULL }; enum zlibCommands { - z_adler32, z_compress, z_crc32, z_decompress, z_deflate, z_gunzip, - z_gzip, z_inflate, z_push, z_stream + CMD_ADLER, CMD_COMPRESS, CMD_CRC, CMD_DECOMPRESS, CMD_DEFLATE, + CMD_GUNZIP, CMD_GZIP, CMD_INFLATE, CMD_PUSH, CMD_STREAM }; static const char *const stream_formats[] = { "compress", "decompress", "deflate", "gunzip", "gzip", "inflate", NULL }; enum zlibFormats { - f_compress, f_decompress, f_deflate, f_gunzip, f_gzip, f_inflate + FMT_COMPRESS, FMT_DECOMPRESS, FMT_DEFLATE, FMT_GUNZIP, FMT_GZIP, + FMT_INFLATE }; if (objc < 2) { @@ -1721,7 +1722,7 @@ TclZlibCmd( } switch ((enum zlibCommands) command) { - case z_adler32: /* adler32 str ?startvalue? + case CMD_ADLER: /* adler32 str ?startvalue? * -> checksum */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); @@ -1738,7 +1739,7 @@ TclZlibCmd( Tcl_SetWideIntObj(obj, (Tcl_WideInt) Tcl_ZlibAdler32(start, data, dlen)); return TCL_OK; - case z_crc32: /* crc32 str ?startvalue? + case CMD_CRC: /* crc32 str ?startvalue? * -> checksum */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?"); @@ -1755,7 +1756,7 @@ TclZlibCmd( Tcl_SetWideIntObj(obj, (Tcl_WideInt) Tcl_ZlibCRC32(start, data, dlen)); return TCL_OK; - case z_deflate: /* deflate data ?level? + case CMD_DEFLATE: /* deflate data ?level? * -> rawCompressedData */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); @@ -1771,7 +1772,7 @@ TclZlibCmd( } return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], level, NULL); - case z_compress: /* compress data ?level? + case CMD_COMPRESS: /* compress data ?level? * -> zlibCompressedData */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?level?"); @@ -1787,7 +1788,7 @@ TclZlibCmd( } return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], level, NULL); - case z_gzip: /* gzip data ?level? + case CMD_GZIP: /* gzip data ?level? * -> gzippedCompressedData */ if (objc < 3 || objc > 7 || ((objc & 1) == 0)) { Tcl_WrongNumArgs(interp, 2, objv, @@ -1822,7 +1823,7 @@ TclZlibCmd( } return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], level, headerDictObj); - case z_inflate: /* inflate rawcomprdata ?bufferSize? + case CMD_INFLATE: /* inflate rawcomprdata ?bufferSize? * -> decompressedData */ if (objc < 3 || objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?"); @@ -1839,7 +1840,7 @@ TclZlibCmd( } return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2], buffersize, NULL); - case z_decompress: /* decompress zlibcomprdata \ + case CMD_DECOMPRESS: /* decompress zlibcomprdata \ * ?bufferSize? * -> decompressedData */ if (objc < 3 || objc > 4) { @@ -1857,7 +1858,7 @@ TclZlibCmd( } return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2], buffersize, NULL); - case z_gunzip: /* gunzip gzippeddata ?bufferSize? + case CMD_GUNZIP: /* gunzip gzippeddata ?bufferSize? * -> decompressedData */ if (objc < 3 || objc > 5 || ((objc & 1) == 0)) { Tcl_WrongNumArgs(interp, 2, objv, "data ?-headerVar varName?"); @@ -1904,7 +1905,7 @@ TclZlibCmd( return TCL_ERROR; } return TCL_OK; - case z_stream: /* stream deflate/inflate/...gunzip \ + case CMD_STREAM: /* stream deflate/inflate/...gunzip \ * ?level? * -> handleCmd */ if (objc < 3 || objc > 4) { @@ -1917,19 +1918,19 @@ TclZlibCmd( } mode = TCL_ZLIB_STREAM_INFLATE; switch ((enum zlibFormats) format) { - case f_deflate: + case FMT_DEFLATE: mode = TCL_ZLIB_STREAM_DEFLATE; - case f_inflate: + case FMT_INFLATE: format = TCL_ZLIB_FORMAT_RAW; break; - case f_compress: + case FMT_COMPRESS: mode = TCL_ZLIB_STREAM_DEFLATE; - case f_decompress: + case FMT_DECOMPRESS: format = TCL_ZLIB_FORMAT_ZLIB; break; - case f_gzip: + case FMT_GZIP: mode = TCL_ZLIB_STREAM_DEFLATE; - case f_gunzip: + case FMT_GUNZIP: format = TCL_ZLIB_FORMAT_GZIP; break; } @@ -1950,10 +1951,10 @@ TclZlibCmd( } Tcl_SetObjResult(interp, Tcl_ZlibStreamGetCommandName(zh)); return TCL_OK; - case z_push: { /* push mode channel options... + case CMD_PUSH: { /* push mode channel options... * -> channel */ Tcl_Channel chan; - int chanMode, mode; + int chanMode; static const char *const pushOptions[] = { "-header", "-level", "-limit", NULL @@ -1972,27 +1973,27 @@ TclZlibCmd( return TCL_ERROR; } switch ((enum zlibFormats) format) { - case f_deflate: + case FMT_DEFLATE: mode = TCL_ZLIB_STREAM_DEFLATE; format = TCL_ZLIB_FORMAT_RAW; break; - case f_inflate: + case FMT_INFLATE: mode = TCL_ZLIB_STREAM_INFLATE; format = TCL_ZLIB_FORMAT_RAW; break; - case f_compress: + case FMT_COMPRESS: mode = TCL_ZLIB_STREAM_DEFLATE; format = TCL_ZLIB_FORMAT_ZLIB; break; - case f_decompress: + case FMT_DECOMPRESS: mode = TCL_ZLIB_STREAM_INFLATE; format = TCL_ZLIB_FORMAT_ZLIB; break; - case f_gzip: + case FMT_GZIP: mode = TCL_ZLIB_STREAM_DEFLATE; format = TCL_ZLIB_FORMAT_GZIP; break; - case f_gunzip: + case FMT_GUNZIP: mode = TCL_ZLIB_STREAM_INFLATE; format = TCL_ZLIB_FORMAT_GZIP; break; @@ -2397,7 +2398,7 @@ ZlibTransformInput( ZlibChannelData *cd = instanceData; Tcl_DriverInputProc *inProc = Tcl_ChannelInputProc(Tcl_GetChannelType(cd->parent)); - int e, read, flush = Z_NO_FLUSH; + int e, readBytes, flush = Z_NO_FLUSH; if (cd->mode == TCL_ZLIB_STREAM_DEFLATE) { return inProc(Tcl_GetChannelInstanceData(cd->parent), buf, toRead, @@ -2457,16 +2458,16 @@ ZlibTransformInput( * work around the general problem in this way. */ - read = Tcl_ReadRaw(cd->parent, cd->inBuffer, 1); - if (read < 0) { + readBytes = Tcl_ReadRaw(cd->parent, cd->inBuffer, 1); + if (readBytes < 0) { *errorCodePtr = Tcl_GetErrno(); return -1; - } else if (read == 0) { + } else if (readBytes == 0) { flush = Z_SYNC_FLUSH; } cd->inStream.next_in = (Bytef *) cd->inBuffer; - cd->inStream.avail_in = read; + cd->inStream.avail_in = readBytes; } } diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 9d4e1a1..7b80a9d 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.17 2009/02/03 23:10:57 nijtmans Exp $ + * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.18 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -89,7 +89,7 @@ enum { kIsInvisible = 0x4000, }; -#define kFinfoIsInvisible (OSSwapHostToBigConstInt16(kIsInvisible)) +#define kFinfoIsInvisible (OSSwapHostToBigConstInt16(kIsInvisible)) typedef struct finderinfo { u_int32_t type; @@ -568,7 +568,7 @@ GetOSTypeFromObj( if (objPtr->typePtr != &tclOSTypeType) { result = tclOSTypeType.setFromAnyProc(interp, objPtr); - }; + } *osTypePtr = (OSType) objPtr->internalRep.longValue; return result; } @@ -635,16 +635,17 @@ SetOSTypeFromAny( if (Tcl_DStringLength(&ds) > 4) { Tcl_AppendResult(interp, "expected Macintosh OS type but got \"", string, "\": ", NULL); + Tcl_SetErrorCode(interp, "TCL", "VALUE", "MAC_OSTYPE", NULL); result = TCL_ERROR; } else { OSType osType; - char string[4] = {'\0','\0','\0','\0'}; + char bytes[4] = {'\0','\0','\0','\0'}; - memcpy(string, Tcl_DStringValue(&ds), (size_t)Tcl_DStringLength(&ds)); - osType = (OSType) string[0] << 24 | - (OSType) string[1] << 16 | - (OSType) string[2] << 8 | - (OSType) string[3]; + memcpy(bytes, Tcl_DStringValue(&ds), (size_t)Tcl_DStringLength(&ds)); + osType = (OSType) bytes[0] << 24 | + (OSType) bytes[1] << 16 | + (OSType) bytes[2] << 8 | + (OSType) bytes[3]; TclFreeIntRep(objPtr); objPtr->internalRep.longValue = (long) osType; objPtr->typePtr = &tclOSTypeType; diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index a1ed50f..851c979 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.74 2009/11/25 14:25:57 stwo Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.75 2010/03/05 14:34:04 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -456,15 +456,16 @@ DoCopyFile( switch ((int) (statBufPtr->st_mode & S_IFMT)) { #ifndef DJGPP case S_IFLNK: { - char link[MAXPATHLEN]; + char linkBuf[MAXPATHLEN]; int length; - length = readlink(src, link, sizeof(link)); /* INTL: Native. */ + length = readlink(src, linkBuf, sizeof(linkBuf)); + /* INTL: Native. */ if (length == -1) { return TCL_ERROR; } - link[length] = '\0'; - if (symlink(link, dst) < 0) { /* INTL: Native. */ + linkBuf[length] = '\0'; + if (symlink(linkBuf, dst) < 0) { /* INTL: Native. */ return TCL_ERROR; } #ifdef MAC_OSX_TCL @@ -1907,10 +1908,10 @@ TclpObjNormalizePath( int pathLen; char cur; const char *path = Tcl_GetStringFromObj(pathPtr, &pathLen); -#ifndef NO_REALPATH - char normPath[MAXPATHLEN]; Tcl_DString ds; const char *nativePath; +#ifndef NO_REALPATH + char normPath[MAXPATHLEN]; #endif /* @@ -1962,8 +1963,6 @@ TclpObjNormalizePath( * Reached directory separator. */ - Tcl_DString ds; - const char *nativePath; int accessOk; nativePath = Tcl_UtfToExternalDString(NULL, path, @@ -2014,7 +2013,7 @@ TclpObjNormalizePath( return 0; } - nativePath = Tcl_UtfToExternalDString(NULL, path, nextCheckpoint, &ds); + nativePath = Tcl_UtfToExternalDString(NULL, path,nextCheckpoint, &ds); if (Realpath(nativePath, normPath) != NULL) { int newNormLen; diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index b4ba1a0..1766756 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixThrd.c,v 1.61 2009/08/16 10:20:20 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixThrd.c,v 1.62 2010/03/05 14:34:04 dkf Exp $ */ #include "tclInt.h" @@ -56,7 +56,6 @@ static pthread_mutex_t *allocLockPtr = &allocLock; #define MASTER_UNLOCK pthread_mutex_unlock(&masterLock) #endif /* TCL_THREADS */ - /* *---------------------------------------------------------------------- @@ -110,18 +109,19 @@ TclpThreadCreate( */ size_t size; + result = pthread_attr_getstacksize(&attr, &size); if (!result && (size < TCL_THREAD_STACK_MIN)) { pthread_attr_setstacksize(&attr, (size_t) TCL_THREAD_STACK_MIN); } -#endif +#endif /* TCL_THREAD_STACK_MIN */ } -#endif +#endif /* HAVE_PTHREAD_ATTR_SETSTACKSIZE */ + if (! (flags & TCL_THREAD_JOINABLE)) { pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); } - if (pthread_create(&theThread, &attr, (void * (*)(void *))proc, (void *)clientData) && pthread_create(&theThread, NULL, @@ -424,6 +424,7 @@ Tcl_MutexLock( Tcl_Mutex *mutexPtr) /* Really (pthread_mutex_t **) */ { pthread_mutex_t *pmutexPtr; + if (*mutexPtr == NULL) { MASTER_LOCK; if (*mutexPtr == NULL) { @@ -431,7 +432,7 @@ Tcl_MutexLock( * Double inside master lock check to avoid a race condition. */ - pmutexPtr = (pthread_mutex_t *)ckalloc(sizeof(pthread_mutex_t)); + pmutexPtr = (pthread_mutex_t *) ckalloc(sizeof(pthread_mutex_t)); pthread_mutex_init(pmutexPtr, NULL); *mutexPtr = (Tcl_Mutex)pmutexPtr; TclRememberMutex(mutexPtr); @@ -463,7 +464,8 @@ void Tcl_MutexUnlock( Tcl_Mutex *mutexPtr) /* Really (pthread_mutex_t **) */ { - pthread_mutex_t *pmutexPtr = *(pthread_mutex_t **)mutexPtr; + pthread_mutex_t *pmutexPtr = *(pthread_mutex_t **) mutexPtr; + pthread_mutex_unlock(pmutexPtr); } @@ -490,7 +492,8 @@ void TclpFinalizeMutex( Tcl_Mutex *mutexPtr) { - pthread_mutex_t *pmutexPtr = *(pthread_mutex_t **)mutexPtr; + pthread_mutex_t *pmutexPtr = *(pthread_mutex_t **) mutexPtr; + if (pmutexPtr != NULL) { pthread_mutex_destroy(pmutexPtr); ckfree((char *) pmutexPtr); @@ -760,45 +763,55 @@ TclpSetAllocCache( } #endif /* USE_THREAD_ALLOC */ +void * +TclpThreadCreateKey(void) +{ + pthread_key_t *ptkeyPtr; - -void *TclpThreadCreateKey(void) { - pthread_key_t *key; - - key = TclpSysAlloc(sizeof *key, 0); - if (NULL == key) { + ptkeyPtr = TclpSysAlloc(sizeof *ptkeyPtr, 0); + if (NULL == ptkeyPtr) { Tcl_Panic("unable to allocate thread key!"); } - if (pthread_key_create(key, NULL)) { + if (pthread_key_create(ptkeyPtr, NULL)) { Tcl_Panic("unable to create pthread key!"); } - return key; + return ptkeyPtr; } -void TclpThreadDeleteKey(void *keyPtr) { - pthread_key_t *key = keyPtr; +void +TclpThreadDeleteKey( + void *keyPtr) +{ + pthread_key_t *ptkeyPtr = keyPtr; - if (pthread_key_delete(*key)) { + if (pthread_key_delete(*ptkeyPtr)) { Tcl_Panic("unable to delete key!"); } TclpSysFree(keyPtr); } -void TclpThreadSetMasterTSD(void *tsdKeyPtr, void *ptr) { - pthread_key_t *key = tsdKeyPtr; +void +TclpThreadSetMasterTSD( + void *tsdKeyPtr, + void *ptr) +{ + pthread_key_t *ptkeyPtr = tsdKeyPtr; - if (pthread_setspecific(*key, ptr)) { + if (pthread_setspecific(*ptkeyPtr, ptr)) { Tcl_Panic("unable to set master TSD value"); } } -void *TclpThreadGetMasterTSD(void *tsdKeyPtr) { - pthread_key_t *key = tsdKeyPtr; +void * +TclpThreadGetMasterTSD( + void *tsdKeyPtr) +{ + pthread_key_t *ptkeyPtr = tsdKeyPtr; - return pthread_getspecific(*key); + return pthread_getspecific(*ptkeyPtr); } #endif /* TCL_THREADS */ -- cgit v0.12 From 9ec2f6a0332cda78247229df47c6a6e5c0469c94 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Mar 2010 15:32:15 +0000 Subject: [Patch 2961556]: Change TclOO to use the same style of function typedefs as Tcl, as this is about the last chance to get this right. --- ChangeLog | 11 +++++++++++ generic/tclOO.c | 6 +++--- generic/tclOO.decls | 12 ++++++------ generic/tclOO.h | 23 ++++++++++++----------- generic/tclOODecls.h | 10 +++++----- generic/tclOOInt.h | 20 ++++++++++---------- generic/tclOOIntDecls.h | 14 +++++++------- 7 files changed, 54 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index aaa8920..65db95d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-03-05 Donal K. Fellows + + * generic/tclOO.h, generic/tclOOInt.h: [Patch 2961556]: Change TclOO + to use the same style of function typedefs as Tcl, as this is about + the last chance to get this right. + + ***POTENTIAL INCOMPATIBILITY*** + Source code that uses function typedefs from TclOO will need to update + variables and argument definitions so that pointers to the function + values are used instead. Binary compatibility is not affected. + 2010-03-04 Donal K. Fellows * generic/tclOO.c (ObjectRenamedTrace): [Bug 2962664]: Add special diff --git a/generic/tclOO.c b/generic/tclOO.c index 905626a..820fee0 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.c,v 1.35 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclOO.c,v 1.36 2010/03/05 15:32:16 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -2702,7 +2702,7 @@ Tcl_GetClassAsObject( return (Tcl_Object) ((Class *)clazz)->thisPtr; } -Tcl_ObjectMapMethodNameProc +Tcl_ObjectMapMethodNameProc * Tcl_ObjectGetMethodNameMapper( Tcl_Object object) { @@ -2712,7 +2712,7 @@ Tcl_ObjectGetMethodNameMapper( void Tcl_ObjectSetMethodNameMapper( Tcl_Object object, - Tcl_ObjectMapMethodNameProc mapMethodNameProc) + Tcl_ObjectMapMethodNameProc *mapMethodNameProc) { ((Object *) object)->mapMethodNameProc = mapMethodNameProc; } diff --git a/generic/tclOO.decls b/generic/tclOO.decls index 0be831a..f334103 100644 --- a/generic/tclOO.decls +++ b/generic/tclOO.decls @@ -1,4 +1,4 @@ -# $Id: tclOO.decls,v 1.6 2010/02/05 10:03:23 nijtmans Exp $ +# $Id: tclOO.decls,v 1.7 2010/03/05 15:32:16 dkf Exp $ library tclOO @@ -97,12 +97,12 @@ declare 23 generic { int skip) } declare 24 generic { - Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper( + Tcl_ObjectMapMethodNameProc *Tcl_ObjectGetMethodNameMapper( Tcl_Object object) } declare 25 generic { void Tcl_ObjectSetMethodNameMapper(Tcl_Object object, - Tcl_ObjectMapMethodNameProc mapMethodNameProc) + Tcl_ObjectMapMethodNameProc *mapMethodNameProc) } declare 26 generic { void Tcl_ClassSetConstructor(Tcl_Interp *interp, Tcl_Class clazz, @@ -164,14 +164,14 @@ declare 8 generic { } declare 9 generic { Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, - Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, ProcErrorProc *errProc, + Tcl_Object oPtr, TclOO_PreCallProc *preCallPtr, + TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr) } declare 10 generic { Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp, Tcl_Class clsPtr, - TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, + TclOO_PreCallProc *preCallPtr, TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr) diff --git a/generic/tclOO.h b/generic/tclOO.h index a2a6aa1..d97ec47 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.h,v 1.9 2009/11/27 07:27:52 dkf Exp $ + * RCS: @(#) $Id: tclOO.h,v 1.10 2010/03/05 15:32:16 dkf Exp $ */ #ifndef TCLOO_H_INCLUDED @@ -51,13 +51,13 @@ typedef struct Tcl_ObjectContext_ *Tcl_ObjectContext; * and to allow the attachment of arbitrary data to objects and classes. */ -typedef int (*Tcl_MethodCallProc)(ClientData clientData, Tcl_Interp *interp, +typedef int (Tcl_MethodCallProc)(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext objectContext, int objc, Tcl_Obj *const *objv); -typedef void (*Tcl_MethodDeleteProc)(ClientData clientData); -typedef int (*Tcl_CloneProc)(Tcl_Interp *interp, ClientData oldClientData, +typedef void (Tcl_MethodDeleteProc)(ClientData clientData); +typedef int (Tcl_CloneProc)(Tcl_Interp *interp, ClientData oldClientData, ClientData *newClientData); -typedef void (*Tcl_ObjectMetadataDeleteProc)(ClientData clientData); -typedef int (*Tcl_ObjectMapMethodNameProc)(Tcl_Interp *interp, +typedef void (Tcl_ObjectMetadataDeleteProc)(ClientData clientData); +typedef int (Tcl_ObjectMapMethodNameProc)(Tcl_Interp *interp, Tcl_Object object, Tcl_Class *startClsPtr, Tcl_Obj *methodNameObj); /* @@ -72,12 +72,13 @@ typedef struct { * declarations. */ const char *name; /* Name of this type of method, mostly for * debugging purposes. */ - Tcl_MethodCallProc callProc;/* How to invoke this method. */ - Tcl_MethodDeleteProc deleteProc; + Tcl_MethodCallProc *callProc; + /* How to invoke this method. */ + Tcl_MethodDeleteProc *deleteProc; /* How to delete this method's type-specific * data, or NULL if the type-specific data * does not need deleting. */ - Tcl_CloneProc cloneProc; /* How to copy this method's type-specific + Tcl_CloneProc *cloneProc; /* How to copy this method's type-specific * data, or NULL if the type-specific data can * be copied directly. */ } Tcl_MethodType; @@ -101,10 +102,10 @@ typedef struct { * to TCL_OO_METADATA_VERSION_CURRENT in * declarations. */ const char *name; - Tcl_ObjectMetadataDeleteProc deleteProc; + Tcl_ObjectMetadataDeleteProc *deleteProc; /* How to delete the metadata. This must not * be NULL. */ - Tcl_CloneProc cloneProc; /* How to copy the metadata, or NULL if the + Tcl_CloneProc *cloneProc; /* How to copy the metadata, or NULL if the * type-specific data can be copied * directly. */ } Tcl_ObjectMetadataType; diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h index edbb677..d6ed407 100644 --- a/generic/tclOODecls.h +++ b/generic/tclOODecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOODecls.h,v 1.14 2010/02/05 10:03:23 nijtmans Exp $ + * $Id: tclOODecls.h,v 1.15 2010/03/05 15:32:16 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -186,14 +186,14 @@ EXTERN int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp, #ifndef Tcl_ObjectGetMethodNameMapper_TCL_DECLARED #define Tcl_ObjectGetMethodNameMapper_TCL_DECLARED /* 24 */ -EXTERN Tcl_ObjectMapMethodNameProc Tcl_ObjectGetMethodNameMapper( +EXTERN Tcl_ObjectMapMethodNameProc * Tcl_ObjectGetMethodNameMapper( Tcl_Object object); #endif #ifndef Tcl_ObjectSetMethodNameMapper_TCL_DECLARED #define Tcl_ObjectSetMethodNameMapper_TCL_DECLARED /* 25 */ EXTERN void Tcl_ObjectSetMethodNameMapper(Tcl_Object object, - Tcl_ObjectMapMethodNameProc mapMethodNameProc); + Tcl_ObjectMapMethodNameProc *mapMethodNameProc); #endif #ifndef Tcl_ClassSetConstructor_TCL_DECLARED #define Tcl_ClassSetConstructor_TCL_DECLARED @@ -246,8 +246,8 @@ typedef struct TclOOStubs { ClientData (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType *typePtr); /* 21 */ void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType *typePtr, ClientData metadata); /* 22 */ int (*tcl_ObjectContextInvokeNext) (Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, int skip); /* 23 */ - Tcl_ObjectMapMethodNameProc (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ - void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc mapMethodNameProc); /* 25 */ + Tcl_ObjectMapMethodNameProc * (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */ + void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc *mapMethodNameProc); /* 25 */ void (*tcl_ClassSetConstructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 26 */ void (*tcl_ClassSetDestructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 27 */ Tcl_Obj * (*tcl_GetObjectName) (Tcl_Interp *interp, Tcl_Object object); /* 28 */ diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 2103dc0..192d684 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.16 2010/03/04 23:42:54 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.17 2010/03/05 15:32:16 dkf Exp $ */ #ifndef TCL_OO_INTERNAL_H @@ -67,12 +67,12 @@ typedef struct Method { * tuned in their behaviour. */ -typedef int (*TclOO_PreCallProc)(ClientData clientData, Tcl_Interp *interp, +typedef int (TclOO_PreCallProc)(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext context, Tcl_CallFrame *framePtr, int *isFinished); -typedef int (*TclOO_PostCallProc)(ClientData clientData, Tcl_Interp *interp, +typedef int (TclOO_PostCallProc)(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext context, Tcl_Namespace *namespacePtr, int result); -typedef void (*TclOO_PmCDDeleteProc)(ClientData clientData); -typedef ClientData (*TclOO_PmCDCloneProc)(ClientData clientData); +typedef void (TclOO_PmCDDeleteProc)(ClientData clientData); +typedef ClientData (TclOO_PmCDCloneProc)(ClientData clientData); /* * Procedure-like methods have the following extra information. @@ -87,13 +87,13 @@ typedef struct ProcedureMethod { int flags; /* Flags to control features. */ int refCount; ClientData clientData; - TclOO_PmCDDeleteProc deleteClientdataProc; - TclOO_PmCDCloneProc cloneClientdataProc; + TclOO_PmCDDeleteProc *deleteClientdataProc; + TclOO_PmCDCloneProc *cloneClientdataProc; ProcErrorProc *errProc; /* Replacement error handler. */ - TclOO_PreCallProc preCallProc; + TclOO_PreCallProc *preCallProc; /* Callback to allow for additional setup * before the method executes. */ - TclOO_PostCallProc postCallProc; + TclOO_PostCallProc *postCallProc; /* Callback to allow for additional cleanup * after the method executes. */ GetFrameInfoValueProc *gfivProc; @@ -191,7 +191,7 @@ typedef struct Object { Tcl_Obj *cachedNameObj; /* Cache of the name of the object. */ Tcl_HashTable *chainCache; /* Place to keep unused contexts. This table * is indexed by method name as Tcl_Obj. */ - Tcl_ObjectMapMethodNameProc mapMethodNameProc; + Tcl_ObjectMapMethodNameProc *mapMethodNameProc; /* Function to allow remapping of method * names. For itcl-ng. */ LIST_STATIC(Tcl_Obj *) variables; diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h index c307287..2d3400c 100644 --- a/generic/tclOOIntDecls.h +++ b/generic/tclOOIntDecls.h @@ -1,5 +1,5 @@ /* - * $Id: tclOOIntDecls.h,v 1.12 2010/02/05 10:03:23 nijtmans Exp $ + * $Id: tclOOIntDecls.h,v 1.13 2010/03/05 15:32:16 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. */ @@ -101,8 +101,8 @@ EXTERN Method * TclOONewForwardInstanceMethod(Tcl_Interp *interp, /* 9 */ EXTERN Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, Tcl_Object oPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, + TclOO_PreCallProc *preCallPtr, + TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, @@ -113,8 +113,8 @@ EXTERN Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp, /* 10 */ EXTERN Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp, Tcl_Class clsPtr, - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, + TclOO_PreCallProc *preCallPtr, + TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, @@ -168,8 +168,8 @@ typedef struct TclOOIntStubs { int (*tclOOIsReachable) (Class *targetPtr, Class *startPtr); /* 6 */ Method * (*tclOONewForwardMethod) (Tcl_Interp *interp, Class *clsPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 7 */ Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 8 */ - Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 9 */ - Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc preCallPtr, TclOO_PostCallProc postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 10 */ + Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc *preCallPtr, TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 9 */ + Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc *preCallPtr, TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 10 */ int (*tclOOInvokeObject) (Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const *objv); /* 11 */ void (*tclOOObjectSetFilters) (Object *oPtr, int numFilters, Tcl_Obj *const *filters); /* 12 */ void (*tclOOClassSetFilters) (Tcl_Interp *interp, Class *classPtr, int numFilters, Tcl_Obj *const *filters); /* 13 */ -- cgit v0.12 From e2c9dd401d8396244a2d94f15c05c019aa2a3b4c Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Mar 2010 22:50:32 +0000 Subject: Fix [Bug 2964425]. --- ChangeLog | 5 +++++ generic/tclIORTrans.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65db95d..77cd117 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-03-05 Donal K. Fellows + * generic/tclIORTrans.c (ForwardProc): [Bug 2964425]: When cleaning + the stables, it is sometimes necessary to do more than the minimum. In + this case, rationalizing the variables for a forwarded limit? method + required removing an extra Tcl_DecrRefCount too. + * generic/tclOO.h, generic/tclOOInt.h: [Patch 2961556]: Change TclOO to use the same style of function typedefs as Tcl, as this is about the last chance to get this right. diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index dcad087..eb40ce5 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.13 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.14 2010/03/05 22:50:32 dkf Exp $ */ #include @@ -2665,8 +2665,6 @@ ForwardProc( ForwardSetObjError(paramPtr, MarshallError(interp)); paramPtr->limit.max = -1; } - - Tcl_DecrRefCount(resObj); break; default: -- cgit v0.12 From 68229918fe6fcdfed3765fb67237c56da8eda8e9 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Mar 2010 23:12:54 +0000 Subject: Quell a warning in Kevin Kenny's build environment --- generic/tclCmdMZ.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index eb6bb7f..696835a 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.204 2010/03/05 14:34:03 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.205 2010/03/05 23:12:54 dkf Exp $ */ #include "tclInt.h" @@ -1067,7 +1067,8 @@ Tcl_SplitObjCmd( * Assume Tcl_UniChar is an integral type... */ - hPtr = Tcl_CreateHashEntry(&charReuseTable, INT2PTR(ch), &isNew); + hPtr = Tcl_CreateHashEntry(&charReuseTable, INT2PTR((int) ch), + &isNew); if (isNew) { TclNewStringObj(objPtr, stringPtr, len); -- cgit v0.12 From 50f9d6b3744f31f806d0f0a86cf96cb2608c86e0 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 5 Mar 2010 23:23:06 +0000 Subject: Updated changelog with message relating to code audit from earlier --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 77cd117..164b86d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,15 @@ variables and argument definitions so that pointers to the function values are used instead. Binary compatibility is not affected. + * generic/*.c, generic/tclInt.h, unix/*.c, macosx/*.c: Applied results + of doing a Code Audit. Principal changes: + * Use do { ... } while (0) in macros + * Avoid shadowing one local variable with another + * Use clearer 'foo.bar++;' instead of '++foo.bar;' where result not + required (i.e., semantically equivalent); clarity is increased + because it is bar that is incremented, not foo. + * Follow Engineering Manual rules on spacing and declarations + 2010-03-04 Donal K. Fellows * generic/tclOO.c (ObjectRenamedTrace): [Bug 2962664]: Add special -- cgit v0.12 From e0f4b9aef0aed9b336779d768d41cf8fba52f137 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 6 Mar 2010 06:29:24 +0000 Subject: remove presence of tclTomMathStubsPtr in tclStubLib.c test that tommath stubs are present in stub library --- ChangeLog | 5 +++++ generic/tclStubLib.c | 4 +--- generic/tclTest.c | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 164b86d..304c261 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-06 Jan Nijtmans + + * generic/tclStubLib.c remove presence of tclTomMathStubsPtr here + * generic/tclTest.c test that tommath stubs are present in stub library + 2010-03-05 Donal K. Fellows * generic/tclIORTrans.c (ForwardProc): [Bug 2964425]: When cleaning diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index af14e2e..8603e02 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubLib.c,v 1.31 2010/03/04 22:29:05 nijtmans Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.32 2010/03/06 06:29:24 nijtmans Exp $ */ /* @@ -28,13 +28,11 @@ MODULE_SCOPE const TclStubs *tclStubsPtr; MODULE_SCOPE const TclPlatStubs *tclPlatStubsPtr; MODULE_SCOPE const TclIntStubs *tclIntStubsPtr; MODULE_SCOPE const TclIntPlatStubs *tclIntPlatStubsPtr; -MODULE_SCOPE const TclTomMathStubs *tclTomMathStubsPtr; const TclStubs *tclStubsPtr = NULL; const TclPlatStubs *tclPlatStubsPtr = NULL; const TclIntStubs *tclIntStubsPtr = NULL; const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; -const TclTomMathStubs *tclTomMathStubsPtr = NULL; static const TclStubs * HasStubSupport( diff --git a/generic/tclTest.c b/generic/tclTest.c index 5b035fe..35bff84 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.147 2010/02/25 22:20:10 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.148 2010/03/06 06:29:24 nijtmans Exp $ */ #undef STATIC_BUILD @@ -539,7 +539,10 @@ Tcltest_Init( "-appinitprocclosestderr", "-appinitprocsetrcfile", NULL }; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5", 0) == NULL) { + return TCL_ERROR; + } + if (Tcl_TomMath_InitStubs(interp, "8.5") == NULL) { return TCL_ERROR; } /* TIP #268: Full patchlevel instead of just major.minor */ -- cgit v0.12 From 646fc65d90e21ea34b47fee9ef22f8fbaf4e40ca Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sun, 7 Mar 2010 14:39:25 +0000 Subject: test that tclOO stubs are present in stub library Applied missing part of [Patch 2961556] Change all tclWinProcs signatures to use TCHAR* in stead of WCHAR*. This is meant as preparation to make [Enh 2965056] possible at all. --- ChangeLog | 12 ++++++++++++ generic/tclOOMethod.c | 10 +++++----- generic/tclTest.c | 9 ++++++--- win/tclWin32Dll.c | 52 +++++++++++++++++++++++++-------------------------- win/tclWinDde.c | 8 ++++---- win/tclWinFCmd.c | 16 ++++++++-------- win/tclWinFile.c | 28 ++++++++++++--------------- win/tclWinInt.h | 24 ++++++++++++------------ win/tclWinPipe.c | 25 ++++++++++++------------- win/tclWinSock.c | 10 +++++----- 10 files changed, 102 insertions(+), 92 deletions(-) diff --git a/ChangeLog b/ChangeLog index 304c261..34bf6a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-03-07 Jan Nijtmans + + * generic/tclTest.c test that tclOO stubs are present in stub library + * generic/tclOOMethod.c Applied missing part of [Patch 2961556] + * win/tclWinInt.h Change all tclWinProcs signatures to use + * win/tclWin32Dll.c TCHAR* in stead of WCHAR*. This is meant + * win/tclWinDde.c as preparation to make [Enh 2965056] + * win/tclWinFCmd.c possible at all. + * win/tclWinFile.c + * win/tclWinPipe.c + * win/tclWinSock.c + 2010-03-06 Jan Nijtmans * generic/tclStubLib.c remove presence of tclTomMathStubsPtr here diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index bc6bd86..6c13116 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.24 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.25 2010/03/07 14:39:26 nijtmans Exp $ */ #ifdef HAVE_CONFIG_H @@ -1655,8 +1655,8 @@ Tcl_Method TclOONewProcInstanceMethodEx( Tcl_Interp *interp, /* The interpreter containing the object. */ Tcl_Object oPtr, /* The object to modify. */ - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, + TclOO_PreCallProc *preCallPtr, + TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, /* The name of the method, which must not be @@ -1692,8 +1692,8 @@ Tcl_Method TclOONewProcMethodEx( Tcl_Interp *interp, /* The interpreter containing the class. */ Tcl_Class clsPtr, /* The class to modify. */ - TclOO_PreCallProc preCallPtr, - TclOO_PostCallProc postCallPtr, + TclOO_PreCallProc *preCallPtr, + TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, ClientData clientData, Tcl_Obj *nameObj, /* The name of the method, which may be NULL; diff --git a/generic/tclTest.c b/generic/tclTest.c index 35bff84..4e717bd 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.148 2010/03/06 06:29:24 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.149 2010/03/07 14:39:26 nijtmans Exp $ */ #undef STATIC_BUILD @@ -22,7 +22,7 @@ # define USE_TCL_STUBS #endif #include "tclInt.h" - +#include "tclOO.h" /* * Required for Testregexp*Cmd */ @@ -545,6 +545,9 @@ Tcltest_Init( if (Tcl_TomMath_InitStubs(interp, "8.5") == NULL) { return TCL_ERROR; } + if (Tcl_OOInitStubs(interp) == NULL) { + return TCL_ERROR; + } /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvide(interp, "Tcltest", TCL_PATCH_LEVEL) == TCL_ERROR) { @@ -757,7 +760,7 @@ int Tcltest_SafeInit( Tcl_Interp *interp) /* Interpreter for application. */ { - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5", 0) == NULL) { return TCL_ERROR; } return Procbodytest_SafeInit(interp); diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 76fc642..50689bc 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.61 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.62 2010/03/07 14:39:25 nijtmans Exp $ */ #include "tclWinInt.h" @@ -130,24 +130,24 @@ static TclWinProcs asciiProcs = { (BOOL (WINAPI *)(const TCHAR *)) DeleteFileA, (HANDLE (WINAPI *)(const TCHAR *, WIN32_FIND_DATAT *)) FindFirstFileA, (BOOL (WINAPI *)(HANDLE, WIN32_FIND_DATAT *)) FindNextFileA, - (BOOL (WINAPI *)(WCHAR *, LPDWORD)) GetComputerNameA, - (DWORD (WINAPI *)(DWORD, WCHAR *)) GetCurrentDirectoryA, + (BOOL (WINAPI *)(TCHAR *, LPDWORD)) GetComputerNameA, + (DWORD (WINAPI *)(DWORD, TCHAR *)) GetCurrentDirectoryA, (DWORD (WINAPI *)(const TCHAR *)) GetFileAttributesA, - (DWORD (WINAPI *)(const TCHAR *, DWORD nBufferLength, WCHAR *, + (DWORD (WINAPI *)(const TCHAR *, DWORD nBufferLength, TCHAR *, TCHAR **)) GetFullPathNameA, - (DWORD (WINAPI *)(HMODULE, WCHAR *, int)) GetModuleFileNameA, - (DWORD (WINAPI *)(const TCHAR *, WCHAR *, DWORD)) GetShortPathNameA, + (DWORD (WINAPI *)(HMODULE, TCHAR *, int)) GetModuleFileNameA, + (DWORD (WINAPI *)(const TCHAR *, TCHAR *, DWORD)) GetShortPathNameA, (UINT (WINAPI *)(const TCHAR *, const TCHAR *, UINT uUnique, - WCHAR *)) GetTempFileNameA, - (DWORD (WINAPI *)(DWORD, WCHAR *)) GetTempPathA, - (BOOL (WINAPI *)(const TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, - WCHAR *, DWORD)) GetVolumeInformationA, + TCHAR *)) GetTempFileNameA, + (DWORD (WINAPI *)(DWORD, TCHAR *)) GetTempPathA, + (BOOL (WINAPI *)(const TCHAR *, TCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, + TCHAR *, DWORD)) GetVolumeInformationA, (HINSTANCE (WINAPI *)(const TCHAR *)) LoadLibraryA, - (TCHAR (WINAPI *)(WCHAR *, const TCHAR *)) lstrcpyA, + (TCHAR (WINAPI *)(TCHAR *, const TCHAR *)) lstrcpyA, (BOOL (WINAPI *)(const TCHAR *, const TCHAR *)) MoveFileA, (BOOL (WINAPI *)(const TCHAR *)) RemoveDirectoryA, (DWORD (WINAPI *)(const TCHAR *, const TCHAR *, const TCHAR *, DWORD, - WCHAR *, TCHAR **)) SearchPathA, + TCHAR *, TCHAR **)) SearchPathA, (BOOL (WINAPI *)(const TCHAR *)) SetCurrentDirectoryA, (BOOL (WINAPI *)(const TCHAR *, DWORD)) SetFileAttributesA, @@ -189,24 +189,24 @@ static TclWinProcs unicodeProcs = { (BOOL (WINAPI *)(const TCHAR *)) DeleteFileW, (HANDLE (WINAPI *)(const TCHAR *, WIN32_FIND_DATAT *)) FindFirstFileW, (BOOL (WINAPI *)(HANDLE, WIN32_FIND_DATAT *)) FindNextFileW, - (BOOL (WINAPI *)(WCHAR *, LPDWORD)) GetComputerNameW, - (DWORD (WINAPI *)(DWORD, WCHAR *)) GetCurrentDirectoryW, + (BOOL (WINAPI *)(TCHAR *, LPDWORD)) GetComputerNameW, + (DWORD (WINAPI *)(DWORD, TCHAR *)) GetCurrentDirectoryW, (DWORD (WINAPI *)(const TCHAR *)) GetFileAttributesW, - (DWORD (WINAPI *)(const TCHAR *, DWORD nBufferLength, WCHAR *, + (DWORD (WINAPI *)(const TCHAR *, DWORD nBufferLength, TCHAR *, TCHAR **)) GetFullPathNameW, - (DWORD (WINAPI *)(HMODULE, WCHAR *, int)) GetModuleFileNameW, - (DWORD (WINAPI *)(const TCHAR *, WCHAR *, DWORD)) GetShortPathNameW, + (DWORD (WINAPI *)(HMODULE, TCHAR *, int)) GetModuleFileNameW, + (DWORD (WINAPI *)(const TCHAR *, TCHAR *, DWORD)) GetShortPathNameW, (UINT (WINAPI *)(const TCHAR *, const TCHAR *, UINT uUnique, - WCHAR *)) GetTempFileNameW, - (DWORD (WINAPI *)(DWORD, WCHAR *)) GetTempPathW, - (BOOL (WINAPI *)(const TCHAR *, WCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, - WCHAR *, DWORD)) GetVolumeInformationW, + TCHAR *)) GetTempFileNameW, + (DWORD (WINAPI *)(DWORD, TCHAR *)) GetTempPathW, + (BOOL (WINAPI *)(const TCHAR *, TCHAR *, DWORD, LPDWORD, LPDWORD, LPDWORD, + TCHAR *, DWORD)) GetVolumeInformationW, (HINSTANCE (WINAPI *)(const TCHAR *)) LoadLibraryW, - (TCHAR (WINAPI *)(WCHAR *, const TCHAR *)) lstrcpyW, + (TCHAR (WINAPI *)(TCHAR *, const TCHAR *)) lstrcpyW, (BOOL (WINAPI *)(const TCHAR *, const TCHAR *)) MoveFileW, (BOOL (WINAPI *)(const TCHAR *)) RemoveDirectoryW, (DWORD (WINAPI *)(const TCHAR *, const TCHAR *, const TCHAR *, DWORD, - WCHAR *, TCHAR **)) SearchPathW, + TCHAR *, TCHAR **)) SearchPathW, (BOOL (WINAPI *)(const TCHAR *)) SetCurrentDirectoryW, (BOOL (WINAPI *)(const TCHAR *, DWORD)) SetFileAttributesW, @@ -250,7 +250,7 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, */ typedef struct MountPointMap { - const WCHAR *volumeName; /* Native wide string volume name. */ + const TCHAR *volumeName; /* Native wide string volume name. */ char driveLetter; /* Drive letter corresponding to the volume * name. */ struct MountPointMap *nextPtr; @@ -695,7 +695,7 @@ TclWinDriveLetterForVolMountPoint( Tcl_MutexLock(&mountPointMap); dlIter = driveLetterLookup; while (dlIter != NULL) { - if (wcscmp(dlIter->volumeName, mountPoint) == 0) { + if (wcscmp((WCHAR *)dlIter->volumeName, mountPoint) == 0) { /* * We need to check whether this information is still valid, since * either the user or various programs could have adjusted the @@ -794,7 +794,7 @@ TclWinDriveLetterForVolMountPoint( for (dlIter = driveLetterLookup; dlIter != NULL; dlIter = dlIter->nextPtr) { - if (wcscmp(dlIter->volumeName, mountPoint) == 0) { + if (wcscmp((WCHAR *)dlIter->volumeName, mountPoint) == 0) { Tcl_MutexUnlock(&mountPointMap); return dlIter->driveLetter; } diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 6fc902d..3421510 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.41 2010/02/25 23:39:50 dkf Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.42 2010/03/07 14:39:25 nijtmans Exp $ */ #undef STATIC_BUILD @@ -991,7 +991,7 @@ DdeServicesOnAck( ATOM service = (ATOM)LOWORD(lParam); ATOM topic = (ATOM)HIWORD(lParam); struct DdeEnumServices *es; - TCHAR sz[255]; + char sz[255]; #ifdef _WIN64 es = (struct DdeEnumServices *) GetWindowLongPtr(hwnd, GWLP_USERDATA); @@ -1004,9 +1004,9 @@ DdeServicesOnAck( Tcl_Obj *matchPtr = Tcl_NewListObj(0, NULL); Tcl_Obj *resultPtr = Tcl_GetObjResult(es->interp); - GlobalGetAtomName(service, sz, 255); + GlobalGetAtomNameA(service, sz, 255); Tcl_ListObjAppendElement(NULL, matchPtr, Tcl_NewStringObj(sz, -1)); - GlobalGetAtomName(topic, sz, 255); + GlobalGetAtomNameA(topic, sz, 255); Tcl_ListObjAppendElement(NULL, matchPtr, Tcl_NewStringObj(sz, -1)); /* diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index a60ea61..6fa7441 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.60 2010/02/15 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.61 2010/03/07 14:39:25 nijtmans Exp $ */ #include "tclWinInt.h" @@ -328,8 +328,8 @@ DoRenameFile( TCHAR *nativeSrcRest, *nativeDstRest; const char **srcArgv, **dstArgv; int size, srcArgc, dstArgc; - WCHAR nativeSrcPath[MAX_PATH]; - WCHAR nativeDstPath[MAX_PATH]; + TCHAR nativeSrcPath[MAX_PATH*2]; + TCHAR nativeDstPath[MAX_PATH*2]; Tcl_DString srcString, dstString; const char *src, *dst; @@ -343,11 +343,11 @@ DoRenameFile( if ((size == 0) || (size > MAX_PATH)) { return TCL_ERROR; } - tclWinProcs->charLowerProc((TCHAR *) nativeSrcPath); - tclWinProcs->charLowerProc((TCHAR *) nativeDstPath); + tclWinProcs->charLowerProc(nativeSrcPath); + tclWinProcs->charLowerProc(nativeDstPath); - src = tclWinProcs->tchar2utf((TCHAR *) nativeSrcPath, -1, &srcString); - dst = tclWinProcs->tchar2utf((TCHAR *) nativeDstPath, -1, &dstString); + src = tclWinProcs->tchar2utf(nativeSrcPath, -1, &srcString); + dst = tclWinProcs->tchar2utf(nativeDstPath, -1, &dstString); /* * Check whether the destination path is actually inside the @@ -465,7 +465,7 @@ DoRenameFile( TCHAR *nativeRest, *nativeTmp, *nativePrefix; int result, size; - WCHAR tempBuf[MAX_PATH]; + TCHAR tempBuf[MAX_PATH*2]; size = tclWinProcs->getFullPathNameProc(nativeDst, MAX_PATH, tempBuf, &nativeRest); diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 9522c52..2785912 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.104 2010/02/15 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.105 2010/03/07 14:39:25 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -224,7 +224,7 @@ WinLink( const TCHAR *linkTargetPath, int linkAction) { - WCHAR tempFileName[MAX_PATH]; + TCHAR tempFileName[MAX_PATH*2]; TCHAR *tempFilePart; DWORD attr; @@ -345,7 +345,7 @@ static Tcl_Obj * WinReadLink( const TCHAR *linkSourcePath) { - WCHAR tempFileName[MAX_PATH]; + TCHAR tempFileName[MAX_PATH*2]; TCHAR *tempFilePart; DWORD attr; @@ -1946,7 +1946,7 @@ TclpGetCwd( Tcl_DString *bufferPtr) /* Uninitialized or free DString filled with * name of current directory. */ { - WCHAR buffer[MAX_PATH]; + TCHAR buffer[MAX_PATH*2]; char *p; if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) { @@ -1963,18 +1963,14 @@ TclpGetCwd( */ if (tclWinProcs->useWide) { - WCHAR *native; - - native = (WCHAR *) buffer; + WCHAR *native = (WCHAR *) buffer; if ((native[0] != '\0') && (native[1] == ':') && (native[2] == '\\') && (native[3] == '\\')) { native += 2; } tclWinProcs->tchar2utf((TCHAR *) native, -1, bufferPtr); } else { - char *native; - - native = (char *) buffer; + char *native = (char *) buffer; if ((native[0] != '\0') && (native[1] == ':') && (native[2] == '\\') && (native[3] == '\\')) { native += 2; @@ -2197,14 +2193,14 @@ NativeDev( { int dev; Tcl_DString ds; - WCHAR nativeFullPath[MAX_PATH]; + TCHAR nativeFullPath[MAX_PATH*2]; TCHAR *nativePart; const char *fullPath; tclWinProcs->getFullPathNameProc(nativePath, MAX_PATH, nativeFullPath, &nativePart); - fullPath = tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds); + fullPath = tclWinProcs->tchar2utf(nativeFullPath, -1, &ds); if ((fullPath[0] == '\\') && (fullPath[1] == '\\')) { const char *p; @@ -2371,7 +2367,7 @@ ClientData TclpGetNativeCwd( ClientData clientData) { - WCHAR buffer[MAX_PATH]; + TCHAR buffer[MAX_PATH*2]; if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) { TclWinConvertError(GetLastError()); @@ -2489,7 +2485,7 @@ TclpFilesystemPathType( { #define VOL_BUF_SIZE 32 int found; - WCHAR volType[VOL_BUF_SIZE]; + TCHAR volType[VOL_BUF_SIZE*2]; char *firstSeparator; const char *path; Tcl_Obj *normPath = Tcl_FSGetNormalizedPath(NULL, pathPtr); @@ -2506,14 +2502,14 @@ TclpFilesystemPathType( if (firstSeparator == NULL) { found = tclWinProcs->getVolumeInformationProc( Tcl_FSGetNativePath(pathPtr), NULL, 0, NULL, NULL, NULL, - (WCHAR *) volType, VOL_BUF_SIZE); + volType, VOL_BUF_SIZE); } else { Tcl_Obj *driveName = Tcl_NewStringObj(path, firstSeparator - path+1); Tcl_IncrRefCount(driveName); found = tclWinProcs->getVolumeInformationProc( Tcl_FSGetNativePath(driveName), NULL, 0, NULL, NULL, NULL, - (WCHAR *) volType, VOL_BUF_SIZE); + volType, VOL_BUF_SIZE); Tcl_DecrRefCount(driveName); } diff --git a/win/tclWinInt.h b/win/tclWinInt.h index 13d25ef..8d02d0e 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInt.h,v 1.34 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInt.h,v 1.35 2010/03/07 14:39:25 nijtmans Exp $ */ #ifndef _TCLWININT @@ -54,24 +54,24 @@ typedef struct TclWinProcs { BOOL (WINAPI *deleteFileProc)(const TCHAR *); HANDLE (WINAPI *findFirstFileProc)(const TCHAR *, WIN32_FIND_DATAT *); BOOL (WINAPI *findNextFileProc)(HANDLE, WIN32_FIND_DATAT *); - BOOL (WINAPI *getComputerNameProc)(WCHAR *, LPDWORD); - DWORD (WINAPI *getCurrentDirectoryProc)(DWORD, WCHAR *); + BOOL (WINAPI *getComputerNameProc)(TCHAR *, LPDWORD); + DWORD (WINAPI *getCurrentDirectoryProc)(DWORD, TCHAR *); DWORD (WINAPI *getFileAttributesProc)(const TCHAR *); - DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD, WCHAR *, + DWORD (WINAPI *getFullPathNameProc)(const TCHAR *, DWORD, TCHAR *, TCHAR **); - DWORD (WINAPI *getModuleFileNameProc)(HMODULE, WCHAR *, int); - DWORD (WINAPI *getShortPathNameProc)(const TCHAR *, WCHAR *, DWORD); + DWORD (WINAPI *getModuleFileNameProc)(HMODULE, TCHAR *, int); + DWORD (WINAPI *getShortPathNameProc)(const TCHAR *, TCHAR *, DWORD); UINT (WINAPI *getTempFileNameProc)(const TCHAR *, const TCHAR *, UINT, - WCHAR *); - DWORD (WINAPI *getTempPathProc)(DWORD, WCHAR *); - BOOL (WINAPI *getVolumeInformationProc)(const TCHAR *, WCHAR *, DWORD, - LPDWORD, LPDWORD, LPDWORD, WCHAR *, DWORD); + TCHAR *); + DWORD (WINAPI *getTempPathProc)(DWORD, TCHAR *); + BOOL (WINAPI *getVolumeInformationProc)(const TCHAR *, TCHAR *, DWORD, + LPDWORD, LPDWORD, LPDWORD, TCHAR *, DWORD); HINSTANCE (WINAPI *loadLibraryProc)(const TCHAR *); - TCHAR (WINAPI *lstrcpyProc)(WCHAR *, const TCHAR *); + TCHAR (WINAPI *lstrcpyProc)(TCHAR *, const TCHAR *); BOOL (WINAPI *moveFileProc)(const TCHAR *, const TCHAR *); BOOL (WINAPI *removeDirectoryProc)(const TCHAR *); DWORD (WINAPI *searchPathProc)(const TCHAR *, const TCHAR *, - const TCHAR *, DWORD, WCHAR *, TCHAR **); + const TCHAR *, DWORD, TCHAR *, TCHAR **); BOOL (WINAPI *setCurrentDirectoryProc)(const TCHAR *); BOOL (WINAPI *setFileAttributesProc)(const TCHAR *, DWORD); /* diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 5d97915..a625ae8 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.76 2010/02/15 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.77 2010/03/07 14:39:25 nijtmans Exp $ */ #include "tclWinInt.h" @@ -196,7 +196,7 @@ static DWORD WINAPI PipeReaderThread(LPVOID arg); static void PipeSetupProc(ClientData clientData, int flags); static void PipeWatchProc(ClientData instanceData, int mask); static DWORD WINAPI PipeWriterThread(LPVOID arg); -static int TempFileName(WCHAR name[MAX_PATH]); +static int TempFileName(TCHAR name[MAX_PATH*2]); static int WaitForRead(PipeInfo *infoPtr, int blocking); static void PipeThreadActionProc(ClientData instanceData, int action); @@ -474,15 +474,14 @@ TclWinMakeFile( static int TempFileName( - WCHAR name[MAX_PATH]) /* Buffer in which name for temporary file + TCHAR name[MAX_PATH*2]) /* Buffer in which name for temporary file * gets stored. */ { TCHAR *prefix; prefix = (tclWinProcs->useWide) ? (TCHAR *) L"TCL" : (TCHAR *) "TCL"; if (tclWinProcs->getTempPathProc(MAX_PATH, name) != 0) { - if (tclWinProcs->getTempFileNameProc((TCHAR *) name, prefix, 0, - name) != 0) { + if (tclWinProcs->getTempFileNameProc(name, prefix, 0, name) != 0) { return 1; } } @@ -493,7 +492,7 @@ TempFileName( ((char *) name)[0] = '.'; ((char *) name)[1] = '\0'; } - return tclWinProcs->getTempFileNameProc((TCHAR *) name, prefix, 0, name); + return tclWinProcs->getTempFileNameProc(name, prefix, 0, name); } /* @@ -669,7 +668,7 @@ TclFile TclpCreateTempFile( const char *contents) /* String to write into temp file, or NULL. */ { - WCHAR name[MAX_PATH]; + TCHAR name[MAX_PATH*2]; const char *native; Tcl_DString dstring; HANDLE handle; @@ -761,7 +760,7 @@ TclpCreateTempFile( Tcl_Obj * TclpTempFileName(void) { - WCHAR fileName[MAX_PATH]; + TCHAR fileName[MAX_PATH*2]; if (TempFileName(fileName) == 0) { return NULL; @@ -1375,7 +1374,7 @@ ApplicationType( IMAGE_DOS_HEADER header; Tcl_DString nameBuf, ds; const TCHAR *nativeName; - WCHAR nativeFullPath[MAX_PATH]; + TCHAR nativeFullPath[MAX_PATH*2]; static char extensions[][5] = {"", ".com", ".exe", ".bat"}; /* @@ -1413,11 +1412,11 @@ ApplicationType( * known type. */ - attr = tclWinProcs->getFileAttributesProc((TCHAR *) nativeFullPath); + attr = tclWinProcs->getFileAttributesProc(nativeFullPath); if ((attr == 0xffffffff) || (attr & FILE_ATTRIBUTE_DIRECTORY)) { continue; } - strcpy(fullName, tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds)); + strcpy(fullName, tclWinProcs->tchar2utf(nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); ext = strrchr(fullName, '.'); @@ -1426,7 +1425,7 @@ ApplicationType( break; } - hFile = tclWinProcs->createFileProc((TCHAR *) nativeFullPath, + hFile = tclWinProcs->createFileProc(nativeFullPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { @@ -3172,7 +3171,7 @@ TclpOpenTemporaryFile( Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj) { - WCHAR name[MAX_PATH]; + TCHAR name[MAX_PATH*2]; char *namePtr; HANDLE handle; DWORD flags = FILE_ATTRIBUTE_TEMPORARY; diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 933523a..27f7245 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.69 2010/02/15 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.70 2010/03/07 14:39:25 nijtmans Exp $ */ #include "tclWinInt.h" @@ -2423,16 +2423,16 @@ InitializeHostName( int *lengthPtr, Tcl_Encoding *encodingPtr) { - WCHAR wbuf[MAX_COMPUTERNAME_LENGTH + 1]; - DWORD length = sizeof(wbuf) / sizeof(WCHAR); + TCHAR tbuf[(MAX_COMPUTERNAME_LENGTH + 1)*2]; + DWORD length = MAX_COMPUTERNAME_LENGTH + 1; Tcl_DString ds; - if (tclWinProcs->getComputerNameProc(wbuf, &length) != 0) { + if (tclWinProcs->getComputerNameProc(tbuf, &length) != 0) { /* * Convert string from native to UTF then change to lowercase. */ - Tcl_UtfToLower((char *) tclWinProcs->tchar2utf((TCHAR *) wbuf, -1, &ds)); + Tcl_UtfToLower((char *) tclWinProcs->tchar2utf(tbuf, -1, &ds)); } else { Tcl_DStringInit(&ds); -- cgit v0.12 From 2867759e778d170453f568cec080f7f2256aa62f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 9 Mar 2010 18:23:26 +0000 Subject: * library/tzdata/America/Matamoros: New locale * library/tzdata/America/Ojinaga: New locale * library/tzdata/America/Santa_Isabel: New locale * library/tzdata/America/Asuncion: * library/tzdata/America/Tijuana: * library/tzdata/Antarctica/Casey: * library/tzdata/Antarctica/Davis: * library/tzdata/Antarctica/Mawson: * library/tzdata/Asia/Dhaka: * library/tzdata/Pacific/Fiji: Olson tzdata2010c. --- ChangeLog | 14 ++ library/tzdata/America/Asuncion | 360 +++++++++++++++++------------------ library/tzdata/America/Matamoros | 219 ++++++++++++++++++++++ library/tzdata/America/Ojinaga | 222 ++++++++++++++++++++++ library/tzdata/America/Santa_Isabel | 284 ++++++++++++++++++++++++++++ library/tzdata/America/Tijuana | 361 ++++++++++++++++++------------------ library/tzdata/Antarctica/Casey | 1 + library/tzdata/Antarctica/Davis | 1 + library/tzdata/Antarctica/Mawson | 1 + library/tzdata/Asia/Dhaka | 181 ++++++++++++++++++ library/tzdata/Pacific/Fiji | 2 + 11 files changed, 1286 insertions(+), 360 deletions(-) create mode 100644 library/tzdata/America/Matamoros create mode 100644 library/tzdata/America/Ojinaga create mode 100644 library/tzdata/America/Santa_Isabel diff --git a/ChangeLog b/ChangeLog index 34bf6a8..4ce46bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-03-09 Don Porter + + * library/tzdata/America/Matamoros: New locale + * library/tzdata/America/Ojinaga: New locale + * library/tzdata/America/Santa_Isabel: New locale + * library/tzdata/America/Asuncion: + * library/tzdata/America/Tijuana: + * library/tzdata/Antarctica/Casey: + * library/tzdata/Antarctica/Davis: + * library/tzdata/Antarctica/Mawson: + * library/tzdata/Asia/Dhaka: + * library/tzdata/Pacific/Fiji: + Olson tzdata2010c. + 2010-03-07 Jan Nijtmans * generic/tclTest.c test that tclOO stubs are present in stub library diff --git a/library/tzdata/America/Asuncion b/library/tzdata/America/Asuncion index fde228c..14bbab2 100644 --- a/library/tzdata/America/Asuncion +++ b/library/tzdata/America/Asuncion @@ -76,184 +76,184 @@ set TZData(:America/Asuncion) { {1224388800 -10800 1 PYST} {1236481200 -14400 0 PYT} {1255838400 -10800 1 PYST} - {1268535600 -14400 0 PYT} - {1287288000 -10800 1 PYST} - {1299985200 -14400 0 PYT} - {1318737600 -10800 1 PYST} - {1331434800 -14400 0 PYT} - {1350792000 -10800 1 PYST} - {1362884400 -14400 0 PYT} - {1382241600 -10800 1 PYST} - {1394334000 -14400 0 PYT} - {1413691200 -10800 1 PYST} - {1425783600 -14400 0 PYT} - {1445140800 -10800 1 PYST} - {1457838000 -14400 0 PYT} - {1476590400 -10800 1 PYST} - {1489287600 -14400 0 PYT} - {1508040000 -10800 1 PYST} - {1520737200 -14400 0 PYT} - {1540094400 -10800 1 PYST} - {1552186800 -14400 0 PYT} - {1571544000 -10800 1 PYST} - {1583636400 -14400 0 PYT} - {1602993600 -10800 1 PYST} - {1615690800 -14400 0 PYT} - {1634443200 -10800 1 PYST} - {1647140400 -14400 0 PYT} - {1665892800 -10800 1 PYST} - {1678590000 -14400 0 PYT} - {1697342400 -10800 1 PYST} - {1710039600 -14400 0 PYT} - {1729396800 -10800 1 PYST} - {1741489200 -14400 0 PYT} - {1760846400 -10800 1 PYST} - {1772938800 -14400 0 PYT} - {1792296000 -10800 1 PYST} - {1804993200 -14400 0 PYT} - {1823745600 -10800 1 PYST} - {1836442800 -14400 0 PYT} - {1855195200 -10800 1 PYST} - {1867892400 -14400 0 PYT} - {1887249600 -10800 1 PYST} - {1899342000 -14400 0 PYT} - {1918699200 -10800 1 PYST} - {1930791600 -14400 0 PYT} - {1950148800 -10800 1 PYST} - {1962846000 -14400 0 PYT} - {1981598400 -10800 1 PYST} - {1994295600 -14400 0 PYT} - {2013048000 -10800 1 PYST} - {2025745200 -14400 0 PYT} - {2044497600 -10800 1 PYST} - {2057194800 -14400 0 PYT} - {2076552000 -10800 1 PYST} - {2088644400 -14400 0 PYT} - {2108001600 -10800 1 PYST} - {2120094000 -14400 0 PYT} - {2139451200 -10800 1 PYST} - {2152148400 -14400 0 PYT} - {2170900800 -10800 1 PYST} - {2183598000 -14400 0 PYT} - {2202350400 -10800 1 PYST} - {2215047600 -14400 0 PYT} - {2234404800 -10800 1 PYST} - {2246497200 -14400 0 PYT} - {2265854400 -10800 1 PYST} - {2277946800 -14400 0 PYT} - {2297304000 -10800 1 PYST} - {2309396400 -14400 0 PYT} - {2328753600 -10800 1 PYST} - {2341450800 -14400 0 PYT} - {2360203200 -10800 1 PYST} - {2372900400 -14400 0 PYT} - {2391652800 -10800 1 PYST} - {2404350000 -14400 0 PYT} - {2423707200 -10800 1 PYST} - {2435799600 -14400 0 PYT} - {2455156800 -10800 1 PYST} - {2467249200 -14400 0 PYT} - {2486606400 -10800 1 PYST} - {2499303600 -14400 0 PYT} - {2518056000 -10800 1 PYST} - {2530753200 -14400 0 PYT} - {2549505600 -10800 1 PYST} - {2562202800 -14400 0 PYT} - {2580955200 -10800 1 PYST} - {2593652400 -14400 0 PYT} - {2613009600 -10800 1 PYST} - {2625102000 -14400 0 PYT} - {2644459200 -10800 1 PYST} - {2656551600 -14400 0 PYT} - {2675908800 -10800 1 PYST} - {2688606000 -14400 0 PYT} - {2707358400 -10800 1 PYST} - {2720055600 -14400 0 PYT} - {2738808000 -10800 1 PYST} - {2751505200 -14400 0 PYT} - {2770862400 -10800 1 PYST} - {2782954800 -14400 0 PYT} - {2802312000 -10800 1 PYST} - {2814404400 -14400 0 PYT} - {2833761600 -10800 1 PYST} - {2846458800 -14400 0 PYT} - {2865211200 -10800 1 PYST} - {2877908400 -14400 0 PYT} - {2896660800 -10800 1 PYST} - {2909358000 -14400 0 PYT} - {2928110400 -10800 1 PYST} - {2940807600 -14400 0 PYT} - {2960164800 -10800 1 PYST} - {2972257200 -14400 0 PYT} - {2991614400 -10800 1 PYST} - {3003706800 -14400 0 PYT} - {3023064000 -10800 1 PYST} - {3035761200 -14400 0 PYT} - {3054513600 -10800 1 PYST} - {3067210800 -14400 0 PYT} - {3085963200 -10800 1 PYST} - {3098660400 -14400 0 PYT} - {3118017600 -10800 1 PYST} - {3130110000 -14400 0 PYT} - {3149467200 -10800 1 PYST} - {3161559600 -14400 0 PYT} - {3180916800 -10800 1 PYST} - {3193009200 -14400 0 PYT} - {3212366400 -10800 1 PYST} - {3225063600 -14400 0 PYT} - {3243816000 -10800 1 PYST} - {3256513200 -14400 0 PYT} - {3275265600 -10800 1 PYST} - {3287962800 -14400 0 PYT} - {3307320000 -10800 1 PYST} - {3319412400 -14400 0 PYT} - {3338769600 -10800 1 PYST} - {3350862000 -14400 0 PYT} - {3370219200 -10800 1 PYST} - {3382916400 -14400 0 PYT} - {3401668800 -10800 1 PYST} - {3414366000 -14400 0 PYT} - {3433118400 -10800 1 PYST} - {3445815600 -14400 0 PYT} - {3464568000 -10800 1 PYST} - {3477265200 -14400 0 PYT} - {3496622400 -10800 1 PYST} - {3508714800 -14400 0 PYT} - {3528072000 -10800 1 PYST} - {3540164400 -14400 0 PYT} - {3559521600 -10800 1 PYST} - {3572218800 -14400 0 PYT} - {3590971200 -10800 1 PYST} - {3603668400 -14400 0 PYT} - {3622420800 -10800 1 PYST} - {3635118000 -14400 0 PYT} - {3654475200 -10800 1 PYST} - {3666567600 -14400 0 PYT} - {3685924800 -10800 1 PYST} - {3698017200 -14400 0 PYT} - {3717374400 -10800 1 PYST} - {3730071600 -14400 0 PYT} - {3748824000 -10800 1 PYST} - {3761521200 -14400 0 PYT} - {3780273600 -10800 1 PYST} - {3792970800 -14400 0 PYT} - {3811723200 -10800 1 PYST} - {3824420400 -14400 0 PYT} - {3843777600 -10800 1 PYST} - {3855870000 -14400 0 PYT} - {3875227200 -10800 1 PYST} - {3887319600 -14400 0 PYT} - {3906676800 -10800 1 PYST} - {3919374000 -14400 0 PYT} - {3938126400 -10800 1 PYST} - {3950823600 -14400 0 PYT} - {3969576000 -10800 1 PYST} - {3982273200 -14400 0 PYT} - {4001630400 -10800 1 PYST} - {4013722800 -14400 0 PYT} - {4033080000 -10800 1 PYST} - {4045172400 -14400 0 PYT} - {4064529600 -10800 1 PYST} - {4076622000 -14400 0 PYT} - {4095979200 -10800 1 PYST} + {1270954800 -14400 0 PYT} + {1286078400 -10800 1 PYST} + {1302404400 -14400 0 PYT} + {1317528000 -10800 1 PYST} + {1333854000 -14400 0 PYT} + {1349582400 -10800 1 PYST} + {1365908400 -14400 0 PYT} + {1381032000 -10800 1 PYST} + {1397358000 -14400 0 PYT} + {1412481600 -10800 1 PYST} + {1428807600 -14400 0 PYT} + {1443931200 -10800 1 PYST} + {1460257200 -14400 0 PYT} + {1475380800 -10800 1 PYST} + {1491706800 -14400 0 PYT} + {1506830400 -10800 1 PYST} + {1523156400 -14400 0 PYT} + {1538884800 -10800 1 PYST} + {1555210800 -14400 0 PYT} + {1570334400 -10800 1 PYST} + {1586660400 -14400 0 PYT} + {1601784000 -10800 1 PYST} + {1618110000 -14400 0 PYT} + {1633233600 -10800 1 PYST} + {1649559600 -14400 0 PYT} + {1664683200 -10800 1 PYST} + {1681009200 -14400 0 PYT} + {1696132800 -10800 1 PYST} + {1713063600 -14400 0 PYT} + {1728187200 -10800 1 PYST} + {1744513200 -14400 0 PYT} + {1759636800 -10800 1 PYST} + {1775962800 -14400 0 PYT} + {1791086400 -10800 1 PYST} + {1807412400 -14400 0 PYT} + {1822536000 -10800 1 PYST} + {1838862000 -14400 0 PYT} + {1853985600 -10800 1 PYST} + {1870311600 -14400 0 PYT} + {1886040000 -10800 1 PYST} + {1902366000 -14400 0 PYT} + {1917489600 -10800 1 PYST} + {1933815600 -14400 0 PYT} + {1948939200 -10800 1 PYST} + {1965265200 -14400 0 PYT} + {1980388800 -10800 1 PYST} + {1996714800 -14400 0 PYT} + {2011838400 -10800 1 PYST} + {2028164400 -14400 0 PYT} + {2043288000 -10800 1 PYST} + {2059614000 -14400 0 PYT} + {2075342400 -10800 1 PYST} + {2091668400 -14400 0 PYT} + {2106792000 -10800 1 PYST} + {2123118000 -14400 0 PYT} + {2138241600 -10800 1 PYST} + {2154567600 -14400 0 PYT} + {2169691200 -10800 1 PYST} + {2186017200 -14400 0 PYT} + {2201140800 -10800 1 PYST} + {2217466800 -14400 0 PYT} + {2233195200 -10800 1 PYST} + {2249521200 -14400 0 PYT} + {2264644800 -10800 1 PYST} + {2280970800 -14400 0 PYT} + {2296094400 -10800 1 PYST} + {2312420400 -14400 0 PYT} + {2327544000 -10800 1 PYST} + {2343870000 -14400 0 PYT} + {2358993600 -10800 1 PYST} + {2375319600 -14400 0 PYT} + {2390443200 -10800 1 PYST} + {2406769200 -14400 0 PYT} + {2422497600 -10800 1 PYST} + {2438823600 -14400 0 PYT} + {2453947200 -10800 1 PYST} + {2470273200 -14400 0 PYT} + {2485396800 -10800 1 PYST} + {2501722800 -14400 0 PYT} + {2516846400 -10800 1 PYST} + {2533172400 -14400 0 PYT} + {2548296000 -10800 1 PYST} + {2564622000 -14400 0 PYT} + {2579745600 -10800 1 PYST} + {2596676400 -14400 0 PYT} + {2611800000 -10800 1 PYST} + {2628126000 -14400 0 PYT} + {2643249600 -10800 1 PYST} + {2659575600 -14400 0 PYT} + {2674699200 -10800 1 PYST} + {2691025200 -14400 0 PYT} + {2706148800 -10800 1 PYST} + {2722474800 -14400 0 PYT} + {2737598400 -10800 1 PYST} + {2753924400 -14400 0 PYT} + {2769652800 -10800 1 PYST} + {2785978800 -14400 0 PYT} + {2801102400 -10800 1 PYST} + {2817428400 -14400 0 PYT} + {2832552000 -10800 1 PYST} + {2848878000 -14400 0 PYT} + {2864001600 -10800 1 PYST} + {2880327600 -14400 0 PYT} + {2895451200 -10800 1 PYST} + {2911777200 -14400 0 PYT} + {2926900800 -10800 1 PYST} + {2943226800 -14400 0 PYT} + {2958955200 -10800 1 PYST} + {2975281200 -14400 0 PYT} + {2990404800 -10800 1 PYST} + {3006730800 -14400 0 PYT} + {3021854400 -10800 1 PYST} + {3038180400 -14400 0 PYT} + {3053304000 -10800 1 PYST} + {3069630000 -14400 0 PYT} + {3084753600 -10800 1 PYST} + {3101079600 -14400 0 PYT} + {3116808000 -10800 1 PYST} + {3133134000 -14400 0 PYT} + {3148257600 -10800 1 PYST} + {3164583600 -14400 0 PYT} + {3179707200 -10800 1 PYST} + {3196033200 -14400 0 PYT} + {3211156800 -10800 1 PYST} + {3227482800 -14400 0 PYT} + {3242606400 -10800 1 PYST} + {3258932400 -14400 0 PYT} + {3274056000 -10800 1 PYST} + {3290382000 -14400 0 PYT} + {3306110400 -10800 1 PYST} + {3322436400 -14400 0 PYT} + {3337560000 -10800 1 PYST} + {3353886000 -14400 0 PYT} + {3369009600 -10800 1 PYST} + {3385335600 -14400 0 PYT} + {3400459200 -10800 1 PYST} + {3416785200 -14400 0 PYT} + {3431908800 -10800 1 PYST} + {3448234800 -14400 0 PYT} + {3463358400 -10800 1 PYST} + {3480289200 -14400 0 PYT} + {3495412800 -10800 1 PYST} + {3511738800 -14400 0 PYT} + {3526862400 -10800 1 PYST} + {3543188400 -14400 0 PYT} + {3558312000 -10800 1 PYST} + {3574638000 -14400 0 PYT} + {3589761600 -10800 1 PYST} + {3606087600 -14400 0 PYT} + {3621211200 -10800 1 PYST} + {3637537200 -14400 0 PYT} + {3653265600 -10800 1 PYST} + {3669591600 -14400 0 PYT} + {3684715200 -10800 1 PYST} + {3701041200 -14400 0 PYT} + {3716164800 -10800 1 PYST} + {3732490800 -14400 0 PYT} + {3747614400 -10800 1 PYST} + {3763940400 -14400 0 PYT} + {3779064000 -10800 1 PYST} + {3795390000 -14400 0 PYT} + {3810513600 -10800 1 PYST} + {3826839600 -14400 0 PYT} + {3842568000 -10800 1 PYST} + {3858894000 -14400 0 PYT} + {3874017600 -10800 1 PYST} + {3890343600 -14400 0 PYT} + {3905467200 -10800 1 PYST} + {3921793200 -14400 0 PYT} + {3936916800 -10800 1 PYST} + {3953242800 -14400 0 PYT} + {3968366400 -10800 1 PYST} + {3984692400 -14400 0 PYT} + {4000420800 -10800 1 PYST} + {4016746800 -14400 0 PYT} + {4031870400 -10800 1 PYST} + {4048196400 -14400 0 PYT} + {4063320000 -10800 1 PYST} + {4079646000 -14400 0 PYT} + {4094769600 -10800 1 PYST} } diff --git a/library/tzdata/America/Matamoros b/library/tzdata/America/Matamoros new file mode 100644 index 0000000..2b98652 --- /dev/null +++ b/library/tzdata/America/Matamoros @@ -0,0 +1,219 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:America/Matamoros) { + {-9223372036854775808 -24000 0 LMT} + {-1514743200 -21600 0 CST} + {568015200 -21600 0 CST} + {576057600 -18000 1 CDT} + {594198000 -21600 0 CST} + {599637600 -21600 0 CST} + {828864000 -18000 1 CDT} + {846399600 -21600 0 CST} + {860313600 -18000 1 CDT} + {877849200 -21600 0 CST} + {891763200 -18000 1 CDT} + {909298800 -21600 0 CST} + {923212800 -18000 1 CDT} + {941353200 -21600 0 CST} + {954662400 -18000 1 CDT} + {972802800 -21600 0 CST} + {989136000 -18000 1 CDT} + {1001833200 -21600 0 CST} + {1018166400 -18000 1 CDT} + {1035702000 -21600 0 CST} + {1049616000 -18000 1 CDT} + {1067151600 -21600 0 CST} + {1081065600 -18000 1 CDT} + {1099206000 -21600 0 CST} + {1112515200 -18000 1 CDT} + {1130655600 -21600 0 CST} + {1143964800 -18000 1 CDT} + {1162105200 -21600 0 CST} + {1175414400 -18000 1 CDT} + {1193554800 -21600 0 CST} + {1207468800 -18000 1 CDT} + {1225004400 -21600 0 CST} + {1238918400 -18000 1 CDT} + {1256454000 -21600 0 CST} + {1262325600 -21600 0 CST} + {1268553600 -18000 1 CDT} + {1289113200 -21600 0 CST} + {1300003200 -18000 1 CDT} + {1320562800 -21600 0 CST} + {1331452800 -18000 1 CDT} + {1352012400 -21600 0 CST} + {1362902400 -18000 1 CDT} + {1383462000 -21600 0 CST} + {1394352000 -18000 1 CDT} + {1414911600 -21600 0 CST} + {1425801600 -18000 1 CDT} + {1446361200 -21600 0 CST} + {1457856000 -18000 1 CDT} + {1478415600 -21600 0 CST} + {1489305600 -18000 1 CDT} + {1509865200 -21600 0 CST} + {1520755200 -18000 1 CDT} + {1541314800 -21600 0 CST} + {1552204800 -18000 1 CDT} + {1572764400 -21600 0 CST} + {1583654400 -18000 1 CDT} + {1604214000 -21600 0 CST} + {1615708800 -18000 1 CDT} + {1636268400 -21600 0 CST} + {1647158400 -18000 1 CDT} + {1667718000 -21600 0 CST} + {1678608000 -18000 1 CDT} + {1699167600 -21600 0 CST} + {1710057600 -18000 1 CDT} + {1730617200 -21600 0 CST} + {1741507200 -18000 1 CDT} + {1762066800 -21600 0 CST} + {1772956800 -18000 1 CDT} + {1793516400 -21600 0 CST} + {1805011200 -18000 1 CDT} + {1825570800 -21600 0 CST} + {1836460800 -18000 1 CDT} + {1857020400 -21600 0 CST} + {1867910400 -18000 1 CDT} + {1888470000 -21600 0 CST} + {1899360000 -18000 1 CDT} + {1919919600 -21600 0 CST} + {1930809600 -18000 1 CDT} + {1951369200 -21600 0 CST} + {1962864000 -18000 1 CDT} + {1983423600 -21600 0 CST} + {1994313600 -18000 1 CDT} + {2014873200 -21600 0 CST} + {2025763200 -18000 1 CDT} + {2046322800 -21600 0 CST} + {2057212800 -18000 1 CDT} + {2077772400 -21600 0 CST} + {2088662400 -18000 1 CDT} + {2109222000 -21600 0 CST} + {2120112000 -18000 1 CDT} + {2140671600 -21600 0 CST} + {2152166400 -18000 1 CDT} + {2172726000 -21600 0 CST} + {2183616000 -18000 1 CDT} + {2204175600 -21600 0 CST} + {2215065600 -18000 1 CDT} + {2235625200 -21600 0 CST} + {2246515200 -18000 1 CDT} + {2267074800 -21600 0 CST} + {2277964800 -18000 1 CDT} + {2298524400 -21600 0 CST} + {2309414400 -18000 1 CDT} + {2329974000 -21600 0 CST} + {2341468800 -18000 1 CDT} + {2362028400 -21600 0 CST} + {2372918400 -18000 1 CDT} + {2393478000 -21600 0 CST} + {2404368000 -18000 1 CDT} + {2424927600 -21600 0 CST} + {2435817600 -18000 1 CDT} + {2456377200 -21600 0 CST} + {2467267200 -18000 1 CDT} + {2487826800 -21600 0 CST} + {2499321600 -18000 1 CDT} + {2519881200 -21600 0 CST} + {2530771200 -18000 1 CDT} + {2551330800 -21600 0 CST} + {2562220800 -18000 1 CDT} + {2582780400 -21600 0 CST} + {2593670400 -18000 1 CDT} + {2614230000 -21600 0 CST} + {2625120000 -18000 1 CDT} + {2645679600 -21600 0 CST} + {2656569600 -18000 1 CDT} + {2677129200 -21600 0 CST} + {2688624000 -18000 1 CDT} + {2709183600 -21600 0 CST} + {2720073600 -18000 1 CDT} + {2740633200 -21600 0 CST} + {2751523200 -18000 1 CDT} + {2772082800 -21600 0 CST} + {2782972800 -18000 1 CDT} + {2803532400 -21600 0 CST} + {2814422400 -18000 1 CDT} + {2834982000 -21600 0 CST} + {2846476800 -18000 1 CDT} + {2867036400 -21600 0 CST} + {2877926400 -18000 1 CDT} + {2898486000 -21600 0 CST} + {2909376000 -18000 1 CDT} + {2929935600 -21600 0 CST} + {2940825600 -18000 1 CDT} + {2961385200 -21600 0 CST} + {2972275200 -18000 1 CDT} + {2992834800 -21600 0 CST} + {3003724800 -18000 1 CDT} + {3024284400 -21600 0 CST} + {3035779200 -18000 1 CDT} + {3056338800 -21600 0 CST} + {3067228800 -18000 1 CDT} + {3087788400 -21600 0 CST} + {3098678400 -18000 1 CDT} + {3119238000 -21600 0 CST} + {3130128000 -18000 1 CDT} + {3150687600 -21600 0 CST} + {3161577600 -18000 1 CDT} + {3182137200 -21600 0 CST} + {3193027200 -18000 1 CDT} + {3213586800 -21600 0 CST} + {3225081600 -18000 1 CDT} + {3245641200 -21600 0 CST} + {3256531200 -18000 1 CDT} + {3277090800 -21600 0 CST} + {3287980800 -18000 1 CDT} + {3308540400 -21600 0 CST} + {3319430400 -18000 1 CDT} + {3339990000 -21600 0 CST} + {3350880000 -18000 1 CDT} + {3371439600 -21600 0 CST} + {3382934400 -18000 1 CDT} + {3403494000 -21600 0 CST} + {3414384000 -18000 1 CDT} + {3434943600 -21600 0 CST} + {3445833600 -18000 1 CDT} + {3466393200 -21600 0 CST} + {3477283200 -18000 1 CDT} + {3497842800 -21600 0 CST} + {3508732800 -18000 1 CDT} + {3529292400 -21600 0 CST} + {3540182400 -18000 1 CDT} + {3560742000 -21600 0 CST} + {3572236800 -18000 1 CDT} + {3592796400 -21600 0 CST} + {3603686400 -18000 1 CDT} + {3624246000 -21600 0 CST} + {3635136000 -18000 1 CDT} + {3655695600 -21600 0 CST} + {3666585600 -18000 1 CDT} + {3687145200 -21600 0 CST} + {3698035200 -18000 1 CDT} + {3718594800 -21600 0 CST} + {3730089600 -18000 1 CDT} + {3750649200 -21600 0 CST} + {3761539200 -18000 1 CDT} + {3782098800 -21600 0 CST} + {3792988800 -18000 1 CDT} + {3813548400 -21600 0 CST} + {3824438400 -18000 1 CDT} + {3844998000 -21600 0 CST} + {3855888000 -18000 1 CDT} + {3876447600 -21600 0 CST} + {3887337600 -18000 1 CDT} + {3907897200 -21600 0 CST} + {3919392000 -18000 1 CDT} + {3939951600 -21600 0 CST} + {3950841600 -18000 1 CDT} + {3971401200 -21600 0 CST} + {3982291200 -18000 1 CDT} + {4002850800 -21600 0 CST} + {4013740800 -18000 1 CDT} + {4034300400 -21600 0 CST} + {4045190400 -18000 1 CDT} + {4065750000 -21600 0 CST} + {4076640000 -18000 1 CDT} + {4097199600 -21600 0 CST} +} diff --git a/library/tzdata/America/Ojinaga b/library/tzdata/America/Ojinaga new file mode 100644 index 0000000..1172708 --- /dev/null +++ b/library/tzdata/America/Ojinaga @@ -0,0 +1,222 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:America/Ojinaga) { + {-9223372036854775808 -25060 0 LMT} + {-1514739600 -25200 0 MST} + {-1343066400 -21600 0 CST} + {-1234807200 -25200 0 MST} + {-1220292000 -21600 0 CST} + {-1207159200 -25200 0 MST} + {-1191344400 -21600 0 CST} + {820476000 -21600 0 CST} + {828864000 -18000 1 CDT} + {846399600 -21600 0 CST} + {860313600 -18000 1 CDT} + {877849200 -21600 0 CST} + {883634400 -21600 0 CST} + {891766800 -21600 0 MDT} + {909302400 -25200 0 MST} + {923216400 -21600 1 MDT} + {941356800 -25200 0 MST} + {954666000 -21600 1 MDT} + {972806400 -25200 0 MST} + {989139600 -21600 1 MDT} + {1001836800 -25200 0 MST} + {1018170000 -21600 1 MDT} + {1035705600 -25200 0 MST} + {1049619600 -21600 1 MDT} + {1067155200 -25200 0 MST} + {1081069200 -21600 1 MDT} + {1099209600 -25200 0 MST} + {1112518800 -21600 1 MDT} + {1130659200 -25200 0 MST} + {1143968400 -21600 1 MDT} + {1162108800 -25200 0 MST} + {1175418000 -21600 1 MDT} + {1193558400 -25200 0 MST} + {1207472400 -21600 1 MDT} + {1225008000 -25200 0 MST} + {1238922000 -21600 1 MDT} + {1256457600 -25200 0 MST} + {1262329200 -25200 0 MST} + {1268557200 -21600 1 MDT} + {1289116800 -25200 0 MST} + {1300006800 -21600 1 MDT} + {1320566400 -25200 0 MST} + {1331456400 -21600 1 MDT} + {1352016000 -25200 0 MST} + {1362906000 -21600 1 MDT} + {1383465600 -25200 0 MST} + {1394355600 -21600 1 MDT} + {1414915200 -25200 0 MST} + {1425805200 -21600 1 MDT} + {1446364800 -25200 0 MST} + {1457859600 -21600 1 MDT} + {1478419200 -25200 0 MST} + {1489309200 -21600 1 MDT} + {1509868800 -25200 0 MST} + {1520758800 -21600 1 MDT} + {1541318400 -25200 0 MST} + {1552208400 -21600 1 MDT} + {1572768000 -25200 0 MST} + {1583658000 -21600 1 MDT} + {1604217600 -25200 0 MST} + {1615712400 -21600 1 MDT} + {1636272000 -25200 0 MST} + {1647162000 -21600 1 MDT} + {1667721600 -25200 0 MST} + {1678611600 -21600 1 MDT} + {1699171200 -25200 0 MST} + {1710061200 -21600 1 MDT} + {1730620800 -25200 0 MST} + {1741510800 -21600 1 MDT} + {1762070400 -25200 0 MST} + {1772960400 -21600 1 MDT} + {1793520000 -25200 0 MST} + {1805014800 -21600 1 MDT} + {1825574400 -25200 0 MST} + {1836464400 -21600 1 MDT} + {1857024000 -25200 0 MST} + {1867914000 -21600 1 MDT} + {1888473600 -25200 0 MST} + {1899363600 -21600 1 MDT} + {1919923200 -25200 0 MST} + {1930813200 -21600 1 MDT} + {1951372800 -25200 0 MST} + {1962867600 -21600 1 MDT} + {1983427200 -25200 0 MST} + {1994317200 -21600 1 MDT} + {2014876800 -25200 0 MST} + {2025766800 -21600 1 MDT} + {2046326400 -25200 0 MST} + {2057216400 -21600 1 MDT} + {2077776000 -25200 0 MST} + {2088666000 -21600 1 MDT} + {2109225600 -25200 0 MST} + {2120115600 -21600 1 MDT} + {2140675200 -25200 0 MST} + {2152170000 -21600 1 MDT} + {2172729600 -25200 0 MST} + {2183619600 -21600 1 MDT} + {2204179200 -25200 0 MST} + {2215069200 -21600 1 MDT} + {2235628800 -25200 0 MST} + {2246518800 -21600 1 MDT} + {2267078400 -25200 0 MST} + {2277968400 -21600 1 MDT} + {2298528000 -25200 0 MST} + {2309418000 -21600 1 MDT} + {2329977600 -25200 0 MST} + {2341472400 -21600 1 MDT} + {2362032000 -25200 0 MST} + {2372922000 -21600 1 MDT} + {2393481600 -25200 0 MST} + {2404371600 -21600 1 MDT} + {2424931200 -25200 0 MST} + {2435821200 -21600 1 MDT} + {2456380800 -25200 0 MST} + {2467270800 -21600 1 MDT} + {2487830400 -25200 0 MST} + {2499325200 -21600 1 MDT} + {2519884800 -25200 0 MST} + {2530774800 -21600 1 MDT} + {2551334400 -25200 0 MST} + {2562224400 -21600 1 MDT} + {2582784000 -25200 0 MST} + {2593674000 -21600 1 MDT} + {2614233600 -25200 0 MST} + {2625123600 -21600 1 MDT} + {2645683200 -25200 0 MST} + {2656573200 -21600 1 MDT} + {2677132800 -25200 0 MST} + {2688627600 -21600 1 MDT} + {2709187200 -25200 0 MST} + {2720077200 -21600 1 MDT} + {2740636800 -25200 0 MST} + {2751526800 -21600 1 MDT} + {2772086400 -25200 0 MST} + {2782976400 -21600 1 MDT} + {2803536000 -25200 0 MST} + {2814426000 -21600 1 MDT} + {2834985600 -25200 0 MST} + {2846480400 -21600 1 MDT} + {2867040000 -25200 0 MST} + {2877930000 -21600 1 MDT} + {2898489600 -25200 0 MST} + {2909379600 -21600 1 MDT} + {2929939200 -25200 0 MST} + {2940829200 -21600 1 MDT} + {2961388800 -25200 0 MST} + {2972278800 -21600 1 MDT} + {2992838400 -25200 0 MST} + {3003728400 -21600 1 MDT} + {3024288000 -25200 0 MST} + {3035782800 -21600 1 MDT} + {3056342400 -25200 0 MST} + {3067232400 -21600 1 MDT} + {3087792000 -25200 0 MST} + {3098682000 -21600 1 MDT} + {3119241600 -25200 0 MST} + {3130131600 -21600 1 MDT} + {3150691200 -25200 0 MST} + {3161581200 -21600 1 MDT} + {3182140800 -25200 0 MST} + {3193030800 -21600 1 MDT} + {3213590400 -25200 0 MST} + {3225085200 -21600 1 MDT} + {3245644800 -25200 0 MST} + {3256534800 -21600 1 MDT} + {3277094400 -25200 0 MST} + {3287984400 -21600 1 MDT} + {3308544000 -25200 0 MST} + {3319434000 -21600 1 MDT} + {3339993600 -25200 0 MST} + {3350883600 -21600 1 MDT} + {3371443200 -25200 0 MST} + {3382938000 -21600 1 MDT} + {3403497600 -25200 0 MST} + {3414387600 -21600 1 MDT} + {3434947200 -25200 0 MST} + {3445837200 -21600 1 MDT} + {3466396800 -25200 0 MST} + {3477286800 -21600 1 MDT} + {3497846400 -25200 0 MST} + {3508736400 -21600 1 MDT} + {3529296000 -25200 0 MST} + {3540186000 -21600 1 MDT} + {3560745600 -25200 0 MST} + {3572240400 -21600 1 MDT} + {3592800000 -25200 0 MST} + {3603690000 -21600 1 MDT} + {3624249600 -25200 0 MST} + {3635139600 -21600 1 MDT} + {3655699200 -25200 0 MST} + {3666589200 -21600 1 MDT} + {3687148800 -25200 0 MST} + {3698038800 -21600 1 MDT} + {3718598400 -25200 0 MST} + {3730093200 -21600 1 MDT} + {3750652800 -25200 0 MST} + {3761542800 -21600 1 MDT} + {3782102400 -25200 0 MST} + {3792992400 -21600 1 MDT} + {3813552000 -25200 0 MST} + {3824442000 -21600 1 MDT} + {3845001600 -25200 0 MST} + {3855891600 -21600 1 MDT} + {3876451200 -25200 0 MST} + {3887341200 -21600 1 MDT} + {3907900800 -25200 0 MST} + {3919395600 -21600 1 MDT} + {3939955200 -25200 0 MST} + {3950845200 -21600 1 MDT} + {3971404800 -25200 0 MST} + {3982294800 -21600 1 MDT} + {4002854400 -25200 0 MST} + {4013744400 -21600 1 MDT} + {4034304000 -25200 0 MST} + {4045194000 -21600 1 MDT} + {4065753600 -25200 0 MST} + {4076643600 -21600 1 MDT} + {4097203200 -25200 0 MST} +} diff --git a/library/tzdata/America/Santa_Isabel b/library/tzdata/America/Santa_Isabel new file mode 100644 index 0000000..87cb5a8 --- /dev/null +++ b/library/tzdata/America/Santa_Isabel @@ -0,0 +1,284 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:America/Santa_Isabel) { + {-9223372036854775808 -27568 0 LMT} + {-1514736000 -25200 0 MST} + {-1451667600 -28800 0 PST} + {-1343062800 -25200 0 MST} + {-1234803600 -28800 0 PST} + {-1222963200 -25200 1 PDT} + {-1207242000 -28800 0 PST} + {-873820800 -25200 1 PWT} + {-769395600 -25200 1 PPT} + {-761677200 -28800 0 PST} + {-686073600 -25200 1 PDT} + {-661539600 -28800 0 PST} + {-504892800 -28800 0 PST} + {-495036000 -25200 1 PDT} + {-481734000 -28800 0 PST} + {-463586400 -25200 1 PDT} + {-450284400 -28800 0 PST} + {-431532000 -25200 1 PDT} + {-418230000 -28800 0 PST} + {-400082400 -25200 1 PDT} + {-386780400 -28800 0 PST} + {-368632800 -25200 1 PDT} + {-355330800 -28800 0 PST} + {-337183200 -25200 1 PDT} + {-323881200 -28800 0 PST} + {-305733600 -25200 1 PDT} + {-292431600 -28800 0 PST} + {-283968000 -28800 0 PST} + {189331200 -28800 0 PST} + {199274400 -25200 1 PDT} + {215600400 -28800 0 PST} + {230724000 -25200 1 PDT} + {247050000 -28800 0 PST} + {262778400 -25200 1 PDT} + {278499600 -28800 0 PST} + {294228000 -25200 1 PDT} + {309949200 -28800 0 PST} + {325677600 -25200 1 PDT} + {341398800 -28800 0 PST} + {357127200 -25200 1 PDT} + {372848400 -28800 0 PST} + {388576800 -25200 1 PDT} + {404902800 -28800 0 PST} + {420026400 -25200 1 PDT} + {436352400 -28800 0 PST} + {452080800 -25200 1 PDT} + {467802000 -28800 0 PST} + {483530400 -25200 1 PDT} + {499251600 -28800 0 PST} + {514980000 -25200 1 PDT} + {530701200 -28800 0 PST} + {544615200 -25200 1 PDT} + {562150800 -28800 0 PST} + {576064800 -25200 1 PDT} + {594205200 -28800 0 PST} + {607514400 -25200 1 PDT} + {625654800 -28800 0 PST} + {638964000 -25200 1 PDT} + {657104400 -28800 0 PST} + {671018400 -25200 1 PDT} + {688554000 -28800 0 PST} + {702468000 -25200 1 PDT} + {720003600 -28800 0 PST} + {733917600 -25200 1 PDT} + {752058000 -28800 0 PST} + {765367200 -25200 1 PDT} + {783507600 -28800 0 PST} + {796816800 -25200 1 PDT} + {814957200 -28800 0 PST} + {820483200 -28800 0 PST} + {828871200 -25200 1 PDT} + {846406800 -28800 0 PST} + {860320800 -25200 1 PDT} + {877856400 -28800 0 PST} + {891770400 -25200 1 PDT} + {909306000 -28800 0 PST} + {923220000 -25200 1 PDT} + {941360400 -28800 0 PST} + {954669600 -25200 1 PDT} + {972810000 -28800 0 PST} + {978336000 -28800 0 PST} + {986119200 -25200 1 PDT} + {1004259600 -28800 0 PST} + {1014192000 -28800 0 PST} + {1018173600 -25200 1 PDT} + {1035709200 -28800 0 PST} + {1049623200 -25200 1 PDT} + {1067158800 -28800 0 PST} + {1081072800 -25200 1 PDT} + {1099213200 -28800 0 PST} + {1112522400 -25200 1 PDT} + {1130662800 -28800 0 PST} + {1143972000 -25200 1 PDT} + {1162112400 -28800 0 PST} + {1175421600 -25200 1 PDT} + {1193562000 -28800 0 PST} + {1207476000 -25200 1 PDT} + {1225011600 -28800 0 PST} + {1238925600 -25200 1 PDT} + {1256461200 -28800 0 PST} + {1270375200 -25200 1 PDT} + {1288515600 -28800 0 PST} + {1301824800 -25200 1 PDT} + {1319965200 -28800 0 PST} + {1333274400 -25200 1 PDT} + {1351414800 -28800 0 PST} + {1365328800 -25200 1 PDT} + {1382864400 -28800 0 PST} + {1396778400 -25200 1 PDT} + {1414314000 -28800 0 PST} + {1428228000 -25200 1 PDT} + {1445763600 -28800 0 PST} + {1459677600 -25200 1 PDT} + {1477818000 -28800 0 PST} + {1491127200 -25200 1 PDT} + {1509267600 -28800 0 PST} + {1522576800 -25200 1 PDT} + {1540717200 -28800 0 PST} + {1554631200 -25200 1 PDT} + {1572166800 -28800 0 PST} + {1586080800 -25200 1 PDT} + {1603616400 -28800 0 PST} + {1617530400 -25200 1 PDT} + {1635670800 -28800 0 PST} + {1648980000 -25200 1 PDT} + {1667120400 -28800 0 PST} + {1680429600 -25200 1 PDT} + {1698570000 -28800 0 PST} + {1712484000 -25200 1 PDT} + {1730019600 -28800 0 PST} + {1743933600 -25200 1 PDT} + {1761469200 -28800 0 PST} + {1775383200 -25200 1 PDT} + {1792918800 -28800 0 PST} + {1806832800 -25200 1 PDT} + {1824973200 -28800 0 PST} + {1838282400 -25200 1 PDT} + {1856422800 -28800 0 PST} + {1869732000 -25200 1 PDT} + {1887872400 -28800 0 PST} + {1901786400 -25200 1 PDT} + {1919322000 -28800 0 PST} + {1933236000 -25200 1 PDT} + {1950771600 -28800 0 PST} + {1964685600 -25200 1 PDT} + {1982826000 -28800 0 PST} + {1996135200 -25200 1 PDT} + {2014275600 -28800 0 PST} + {2027584800 -25200 1 PDT} + {2045725200 -28800 0 PST} + {2059034400 -25200 1 PDT} + {2077174800 -28800 0 PST} + {2091088800 -25200 1 PDT} + {2108624400 -28800 0 PST} + {2122538400 -25200 1 PDT} + {2140074000 -28800 0 PST} + {2153988000 -25200 1 PDT} + {2172128400 -28800 0 PST} + {2185437600 -25200 1 PDT} + {2203578000 -28800 0 PST} + {2216887200 -25200 1 PDT} + {2235027600 -28800 0 PST} + {2248941600 -25200 1 PDT} + {2266477200 -28800 0 PST} + {2280391200 -25200 1 PDT} + {2297926800 -28800 0 PST} + {2311840800 -25200 1 PDT} + {2329376400 -28800 0 PST} + {2343290400 -25200 1 PDT} + {2361430800 -28800 0 PST} + {2374740000 -25200 1 PDT} + {2392880400 -28800 0 PST} + {2406189600 -25200 1 PDT} + {2424330000 -28800 0 PST} + {2438244000 -25200 1 PDT} + {2455779600 -28800 0 PST} + {2469693600 -25200 1 PDT} + {2487229200 -28800 0 PST} + {2501143200 -25200 1 PDT} + {2519283600 -28800 0 PST} + {2532592800 -25200 1 PDT} + {2550733200 -28800 0 PST} + {2564042400 -25200 1 PDT} + {2582182800 -28800 0 PST} + {2596096800 -25200 1 PDT} + {2613632400 -28800 0 PST} + {2627546400 -25200 1 PDT} + {2645082000 -28800 0 PST} + {2658996000 -25200 1 PDT} + {2676531600 -28800 0 PST} + {2690445600 -25200 1 PDT} + {2708586000 -28800 0 PST} + {2721895200 -25200 1 PDT} + {2740035600 -28800 0 PST} + {2753344800 -25200 1 PDT} + {2771485200 -28800 0 PST} + {2785399200 -25200 1 PDT} + {2802934800 -28800 0 PST} + {2816848800 -25200 1 PDT} + {2834384400 -28800 0 PST} + {2848298400 -25200 1 PDT} + {2866438800 -28800 0 PST} + {2879748000 -25200 1 PDT} + {2897888400 -28800 0 PST} + {2911197600 -25200 1 PDT} + {2929338000 -28800 0 PST} + {2942647200 -25200 1 PDT} + {2960787600 -28800 0 PST} + {2974701600 -25200 1 PDT} + {2992237200 -28800 0 PST} + {3006151200 -25200 1 PDT} + {3023686800 -28800 0 PST} + {3037600800 -25200 1 PDT} + {3055741200 -28800 0 PST} + {3069050400 -25200 1 PDT} + {3087190800 -28800 0 PST} + {3100500000 -25200 1 PDT} + {3118640400 -28800 0 PST} + {3132554400 -25200 1 PDT} + {3150090000 -28800 0 PST} + {3164004000 -25200 1 PDT} + {3181539600 -28800 0 PST} + {3195453600 -25200 1 PDT} + {3212989200 -28800 0 PST} + {3226903200 -25200 1 PDT} + {3245043600 -28800 0 PST} + {3258352800 -25200 1 PDT} + {3276493200 -28800 0 PST} + {3289802400 -25200 1 PDT} + {3307942800 -28800 0 PST} + {3321856800 -25200 1 PDT} + {3339392400 -28800 0 PST} + {3353306400 -25200 1 PDT} + {3370842000 -28800 0 PST} + {3384756000 -25200 1 PDT} + {3402896400 -28800 0 PST} + {3416205600 -25200 1 PDT} + {3434346000 -28800 0 PST} + {3447655200 -25200 1 PDT} + {3465795600 -28800 0 PST} + {3479709600 -25200 1 PDT} + {3497245200 -28800 0 PST} + {3511159200 -25200 1 PDT} + {3528694800 -28800 0 PST} + {3542608800 -25200 1 PDT} + {3560144400 -28800 0 PST} + {3574058400 -25200 1 PDT} + {3592198800 -28800 0 PST} + {3605508000 -25200 1 PDT} + {3623648400 -28800 0 PST} + {3636957600 -25200 1 PDT} + {3655098000 -28800 0 PST} + {3669012000 -25200 1 PDT} + {3686547600 -28800 0 PST} + {3700461600 -25200 1 PDT} + {3717997200 -28800 0 PST} + {3731911200 -25200 1 PDT} + {3750051600 -28800 0 PST} + {3763360800 -25200 1 PDT} + {3781501200 -28800 0 PST} + {3794810400 -25200 1 PDT} + {3812950800 -28800 0 PST} + {3826260000 -25200 1 PDT} + {3844400400 -28800 0 PST} + {3858314400 -25200 1 PDT} + {3875850000 -28800 0 PST} + {3889764000 -25200 1 PDT} + {3907299600 -28800 0 PST} + {3921213600 -25200 1 PDT} + {3939354000 -28800 0 PST} + {3952663200 -25200 1 PDT} + {3970803600 -28800 0 PST} + {3984112800 -25200 1 PDT} + {4002253200 -28800 0 PST} + {4016167200 -25200 1 PDT} + {4033702800 -28800 0 PST} + {4047616800 -25200 1 PDT} + {4065152400 -28800 0 PST} + {4079066400 -25200 1 PDT} + {4096602000 -28800 0 PST} +} diff --git a/library/tzdata/America/Tijuana b/library/tzdata/America/Tijuana index c191c3c..6118cde 100644 --- a/library/tzdata/America/Tijuana +++ b/library/tzdata/America/Tijuana @@ -101,184 +101,185 @@ set TZData(:America/Tijuana) { {1225011600 -28800 0 PST} {1238925600 -25200 1 PDT} {1256461200 -28800 0 PST} - {1270375200 -25200 1 PDT} - {1288515600 -28800 0 PST} - {1301824800 -25200 1 PDT} - {1319965200 -28800 0 PST} - {1333274400 -25200 1 PDT} - {1351414800 -28800 0 PST} - {1365328800 -25200 1 PDT} - {1382864400 -28800 0 PST} - {1396778400 -25200 1 PDT} - {1414314000 -28800 0 PST} - {1428228000 -25200 1 PDT} - {1445763600 -28800 0 PST} - {1459677600 -25200 1 PDT} - {1477818000 -28800 0 PST} - {1491127200 -25200 1 PDT} - {1509267600 -28800 0 PST} - {1522576800 -25200 1 PDT} - {1540717200 -28800 0 PST} - {1554631200 -25200 1 PDT} - {1572166800 -28800 0 PST} - {1586080800 -25200 1 PDT} - {1603616400 -28800 0 PST} - {1617530400 -25200 1 PDT} - {1635670800 -28800 0 PST} - {1648980000 -25200 1 PDT} - {1667120400 -28800 0 PST} - {1680429600 -25200 1 PDT} - {1698570000 -28800 0 PST} - {1712484000 -25200 1 PDT} - {1730019600 -28800 0 PST} - {1743933600 -25200 1 PDT} - {1761469200 -28800 0 PST} - {1775383200 -25200 1 PDT} - {1792918800 -28800 0 PST} - {1806832800 -25200 1 PDT} - {1824973200 -28800 0 PST} - {1838282400 -25200 1 PDT} - {1856422800 -28800 0 PST} - {1869732000 -25200 1 PDT} - {1887872400 -28800 0 PST} - {1901786400 -25200 1 PDT} - {1919322000 -28800 0 PST} - {1933236000 -25200 1 PDT} - {1950771600 -28800 0 PST} - {1964685600 -25200 1 PDT} - {1982826000 -28800 0 PST} - {1996135200 -25200 1 PDT} - {2014275600 -28800 0 PST} - {2027584800 -25200 1 PDT} - {2045725200 -28800 0 PST} - {2059034400 -25200 1 PDT} - {2077174800 -28800 0 PST} - {2091088800 -25200 1 PDT} - {2108624400 -28800 0 PST} - {2122538400 -25200 1 PDT} - {2140074000 -28800 0 PST} - {2153988000 -25200 1 PDT} - {2172128400 -28800 0 PST} - {2185437600 -25200 1 PDT} - {2203578000 -28800 0 PST} - {2216887200 -25200 1 PDT} - {2235027600 -28800 0 PST} - {2248941600 -25200 1 PDT} - {2266477200 -28800 0 PST} - {2280391200 -25200 1 PDT} - {2297926800 -28800 0 PST} - {2311840800 -25200 1 PDT} - {2329376400 -28800 0 PST} - {2343290400 -25200 1 PDT} - {2361430800 -28800 0 PST} - {2374740000 -25200 1 PDT} - {2392880400 -28800 0 PST} - {2406189600 -25200 1 PDT} - {2424330000 -28800 0 PST} - {2438244000 -25200 1 PDT} - {2455779600 -28800 0 PST} - {2469693600 -25200 1 PDT} - {2487229200 -28800 0 PST} - {2501143200 -25200 1 PDT} - {2519283600 -28800 0 PST} - {2532592800 -25200 1 PDT} - {2550733200 -28800 0 PST} - {2564042400 -25200 1 PDT} - {2582182800 -28800 0 PST} - {2596096800 -25200 1 PDT} - {2613632400 -28800 0 PST} - {2627546400 -25200 1 PDT} - {2645082000 -28800 0 PST} - {2658996000 -25200 1 PDT} - {2676531600 -28800 0 PST} - {2690445600 -25200 1 PDT} - {2708586000 -28800 0 PST} - {2721895200 -25200 1 PDT} - {2740035600 -28800 0 PST} - {2753344800 -25200 1 PDT} - {2771485200 -28800 0 PST} - {2785399200 -25200 1 PDT} - {2802934800 -28800 0 PST} - {2816848800 -25200 1 PDT} - {2834384400 -28800 0 PST} - {2848298400 -25200 1 PDT} - {2866438800 -28800 0 PST} - {2879748000 -25200 1 PDT} - {2897888400 -28800 0 PST} - {2911197600 -25200 1 PDT} - {2929338000 -28800 0 PST} - {2942647200 -25200 1 PDT} - {2960787600 -28800 0 PST} - {2974701600 -25200 1 PDT} - {2992237200 -28800 0 PST} - {3006151200 -25200 1 PDT} - {3023686800 -28800 0 PST} - {3037600800 -25200 1 PDT} - {3055741200 -28800 0 PST} - {3069050400 -25200 1 PDT} - {3087190800 -28800 0 PST} - {3100500000 -25200 1 PDT} - {3118640400 -28800 0 PST} - {3132554400 -25200 1 PDT} - {3150090000 -28800 0 PST} - {3164004000 -25200 1 PDT} - {3181539600 -28800 0 PST} - {3195453600 -25200 1 PDT} - {3212989200 -28800 0 PST} - {3226903200 -25200 1 PDT} - {3245043600 -28800 0 PST} - {3258352800 -25200 1 PDT} - {3276493200 -28800 0 PST} - {3289802400 -25200 1 PDT} - {3307942800 -28800 0 PST} - {3321856800 -25200 1 PDT} - {3339392400 -28800 0 PST} - {3353306400 -25200 1 PDT} - {3370842000 -28800 0 PST} - {3384756000 -25200 1 PDT} - {3402896400 -28800 0 PST} - {3416205600 -25200 1 PDT} - {3434346000 -28800 0 PST} - {3447655200 -25200 1 PDT} - {3465795600 -28800 0 PST} - {3479709600 -25200 1 PDT} - {3497245200 -28800 0 PST} - {3511159200 -25200 1 PDT} - {3528694800 -28800 0 PST} - {3542608800 -25200 1 PDT} - {3560144400 -28800 0 PST} - {3574058400 -25200 1 PDT} - {3592198800 -28800 0 PST} - {3605508000 -25200 1 PDT} - {3623648400 -28800 0 PST} - {3636957600 -25200 1 PDT} - {3655098000 -28800 0 PST} - {3669012000 -25200 1 PDT} - {3686547600 -28800 0 PST} - {3700461600 -25200 1 PDT} - {3717997200 -28800 0 PST} - {3731911200 -25200 1 PDT} - {3750051600 -28800 0 PST} - {3763360800 -25200 1 PDT} - {3781501200 -28800 0 PST} - {3794810400 -25200 1 PDT} - {3812950800 -28800 0 PST} - {3826260000 -25200 1 PDT} - {3844400400 -28800 0 PST} - {3858314400 -25200 1 PDT} - {3875850000 -28800 0 PST} - {3889764000 -25200 1 PDT} - {3907299600 -28800 0 PST} - {3921213600 -25200 1 PDT} - {3939354000 -28800 0 PST} - {3952663200 -25200 1 PDT} - {3970803600 -28800 0 PST} - {3984112800 -25200 1 PDT} - {4002253200 -28800 0 PST} - {4016167200 -25200 1 PDT} - {4033702800 -28800 0 PST} - {4047616800 -25200 1 PDT} - {4065152400 -28800 0 PST} - {4079066400 -25200 1 PDT} - {4096602000 -28800 0 PST} + {1262332800 -28800 0 PST} + {1268560800 -25200 1 PDT} + {1289120400 -28800 0 PST} + {1300010400 -25200 1 PDT} + {1320570000 -28800 0 PST} + {1331460000 -25200 1 PDT} + {1352019600 -28800 0 PST} + {1362909600 -25200 1 PDT} + {1383469200 -28800 0 PST} + {1394359200 -25200 1 PDT} + {1414918800 -28800 0 PST} + {1425808800 -25200 1 PDT} + {1446368400 -28800 0 PST} + {1457863200 -25200 1 PDT} + {1478422800 -28800 0 PST} + {1489312800 -25200 1 PDT} + {1509872400 -28800 0 PST} + {1520762400 -25200 1 PDT} + {1541322000 -28800 0 PST} + {1552212000 -25200 1 PDT} + {1572771600 -28800 0 PST} + {1583661600 -25200 1 PDT} + {1604221200 -28800 0 PST} + {1615716000 -25200 1 PDT} + {1636275600 -28800 0 PST} + {1647165600 -25200 1 PDT} + {1667725200 -28800 0 PST} + {1678615200 -25200 1 PDT} + {1699174800 -28800 0 PST} + {1710064800 -25200 1 PDT} + {1730624400 -28800 0 PST} + {1741514400 -25200 1 PDT} + {1762074000 -28800 0 PST} + {1772964000 -25200 1 PDT} + {1793523600 -28800 0 PST} + {1805018400 -25200 1 PDT} + {1825578000 -28800 0 PST} + {1836468000 -25200 1 PDT} + {1857027600 -28800 0 PST} + {1867917600 -25200 1 PDT} + {1888477200 -28800 0 PST} + {1899367200 -25200 1 PDT} + {1919926800 -28800 0 PST} + {1930816800 -25200 1 PDT} + {1951376400 -28800 0 PST} + {1962871200 -25200 1 PDT} + {1983430800 -28800 0 PST} + {1994320800 -25200 1 PDT} + {2014880400 -28800 0 PST} + {2025770400 -25200 1 PDT} + {2046330000 -28800 0 PST} + {2057220000 -25200 1 PDT} + {2077779600 -28800 0 PST} + {2088669600 -25200 1 PDT} + {2109229200 -28800 0 PST} + {2120119200 -25200 1 PDT} + {2140678800 -28800 0 PST} + {2152173600 -25200 1 PDT} + {2172733200 -28800 0 PST} + {2183623200 -25200 1 PDT} + {2204182800 -28800 0 PST} + {2215072800 -25200 1 PDT} + {2235632400 -28800 0 PST} + {2246522400 -25200 1 PDT} + {2267082000 -28800 0 PST} + {2277972000 -25200 1 PDT} + {2298531600 -28800 0 PST} + {2309421600 -25200 1 PDT} + {2329981200 -28800 0 PST} + {2341476000 -25200 1 PDT} + {2362035600 -28800 0 PST} + {2372925600 -25200 1 PDT} + {2393485200 -28800 0 PST} + {2404375200 -25200 1 PDT} + {2424934800 -28800 0 PST} + {2435824800 -25200 1 PDT} + {2456384400 -28800 0 PST} + {2467274400 -25200 1 PDT} + {2487834000 -28800 0 PST} + {2499328800 -25200 1 PDT} + {2519888400 -28800 0 PST} + {2530778400 -25200 1 PDT} + {2551338000 -28800 0 PST} + {2562228000 -25200 1 PDT} + {2582787600 -28800 0 PST} + {2593677600 -25200 1 PDT} + {2614237200 -28800 0 PST} + {2625127200 -25200 1 PDT} + {2645686800 -28800 0 PST} + {2656576800 -25200 1 PDT} + {2677136400 -28800 0 PST} + {2688631200 -25200 1 PDT} + {2709190800 -28800 0 PST} + {2720080800 -25200 1 PDT} + {2740640400 -28800 0 PST} + {2751530400 -25200 1 PDT} + {2772090000 -28800 0 PST} + {2782980000 -25200 1 PDT} + {2803539600 -28800 0 PST} + {2814429600 -25200 1 PDT} + {2834989200 -28800 0 PST} + {2846484000 -25200 1 PDT} + {2867043600 -28800 0 PST} + {2877933600 -25200 1 PDT} + {2898493200 -28800 0 PST} + {2909383200 -25200 1 PDT} + {2929942800 -28800 0 PST} + {2940832800 -25200 1 PDT} + {2961392400 -28800 0 PST} + {2972282400 -25200 1 PDT} + {2992842000 -28800 0 PST} + {3003732000 -25200 1 PDT} + {3024291600 -28800 0 PST} + {3035786400 -25200 1 PDT} + {3056346000 -28800 0 PST} + {3067236000 -25200 1 PDT} + {3087795600 -28800 0 PST} + {3098685600 -25200 1 PDT} + {3119245200 -28800 0 PST} + {3130135200 -25200 1 PDT} + {3150694800 -28800 0 PST} + {3161584800 -25200 1 PDT} + {3182144400 -28800 0 PST} + {3193034400 -25200 1 PDT} + {3213594000 -28800 0 PST} + {3225088800 -25200 1 PDT} + {3245648400 -28800 0 PST} + {3256538400 -25200 1 PDT} + {3277098000 -28800 0 PST} + {3287988000 -25200 1 PDT} + {3308547600 -28800 0 PST} + {3319437600 -25200 1 PDT} + {3339997200 -28800 0 PST} + {3350887200 -25200 1 PDT} + {3371446800 -28800 0 PST} + {3382941600 -25200 1 PDT} + {3403501200 -28800 0 PST} + {3414391200 -25200 1 PDT} + {3434950800 -28800 0 PST} + {3445840800 -25200 1 PDT} + {3466400400 -28800 0 PST} + {3477290400 -25200 1 PDT} + {3497850000 -28800 0 PST} + {3508740000 -25200 1 PDT} + {3529299600 -28800 0 PST} + {3540189600 -25200 1 PDT} + {3560749200 -28800 0 PST} + {3572244000 -25200 1 PDT} + {3592803600 -28800 0 PST} + {3603693600 -25200 1 PDT} + {3624253200 -28800 0 PST} + {3635143200 -25200 1 PDT} + {3655702800 -28800 0 PST} + {3666592800 -25200 1 PDT} + {3687152400 -28800 0 PST} + {3698042400 -25200 1 PDT} + {3718602000 -28800 0 PST} + {3730096800 -25200 1 PDT} + {3750656400 -28800 0 PST} + {3761546400 -25200 1 PDT} + {3782106000 -28800 0 PST} + {3792996000 -25200 1 PDT} + {3813555600 -28800 0 PST} + {3824445600 -25200 1 PDT} + {3845005200 -28800 0 PST} + {3855895200 -25200 1 PDT} + {3876454800 -28800 0 PST} + {3887344800 -25200 1 PDT} + {3907904400 -28800 0 PST} + {3919399200 -25200 1 PDT} + {3939958800 -28800 0 PST} + {3950848800 -25200 1 PDT} + {3971408400 -28800 0 PST} + {3982298400 -25200 1 PDT} + {4002858000 -28800 0 PST} + {4013748000 -25200 1 PDT} + {4034307600 -28800 0 PST} + {4045197600 -25200 1 PDT} + {4065757200 -28800 0 PST} + {4076647200 -25200 1 PDT} + {4097206800 -28800 0 PST} } diff --git a/library/tzdata/Antarctica/Casey b/library/tzdata/Antarctica/Casey index 6d383f3..053da4c 100644 --- a/library/tzdata/Antarctica/Casey +++ b/library/tzdata/Antarctica/Casey @@ -3,4 +3,5 @@ set TZData(:Antarctica/Casey) { {-9223372036854775808 0 0 zzz} {-31536000 28800 0 WST} + {1255802400 39600 0 CAST} } diff --git a/library/tzdata/Antarctica/Davis b/library/tzdata/Antarctica/Davis index f4b7282..3c4ab7b 100644 --- a/library/tzdata/Antarctica/Davis +++ b/library/tzdata/Antarctica/Davis @@ -5,4 +5,5 @@ set TZData(:Antarctica/Davis) { {-409190400 25200 0 DAVT} {-163062000 0 0 zzz} {-28857600 25200 0 DAVT} + {1255806000 18000 0 DAVT} } diff --git a/library/tzdata/Antarctica/Mawson b/library/tzdata/Antarctica/Mawson index 1f0c3fe..ba03ba1 100644 --- a/library/tzdata/Antarctica/Mawson +++ b/library/tzdata/Antarctica/Mawson @@ -3,4 +3,5 @@ set TZData(:Antarctica/Mawson) { {-9223372036854775808 0 0 zzz} {-501206400 21600 0 MAWT} + {1255809600 18000 0 MAWT} } diff --git a/library/tzdata/Asia/Dhaka b/library/tzdata/Asia/Dhaka index 7ce68ce..ecd94cd 100644 --- a/library/tzdata/Asia/Dhaka +++ b/library/tzdata/Asia/Dhaka @@ -8,5 +8,186 @@ set TZData(:Asia/Dhaka) { {-862637400 23400 0 BURT} {-576138600 21600 0 DACT} {38772000 21600 0 BDT} + {1230746400 21600 0 BDT} {1245430800 25200 1 BDST} + {1270054800 25200 1 BDST} + {1288544400 21600 0 BDT} + {1301590800 25200 1 BDST} + {1320080400 21600 0 BDT} + {1333213200 25200 1 BDST} + {1351702800 21600 0 BDT} + {1364749200 25200 1 BDST} + {1383238800 21600 0 BDT} + {1396285200 25200 1 BDST} + {1414774800 21600 0 BDT} + {1427821200 25200 1 BDST} + {1446310800 21600 0 BDT} + {1459443600 25200 1 BDST} + {1477933200 21600 0 BDT} + {1490979600 25200 1 BDST} + {1509469200 21600 0 BDT} + {1522515600 25200 1 BDST} + {1541005200 21600 0 BDT} + {1554051600 25200 1 BDST} + {1572541200 21600 0 BDT} + {1585674000 25200 1 BDST} + {1604163600 21600 0 BDT} + {1617210000 25200 1 BDST} + {1635699600 21600 0 BDT} + {1648746000 25200 1 BDST} + {1667235600 21600 0 BDT} + {1680282000 25200 1 BDST} + {1698771600 21600 0 BDT} + {1711904400 25200 1 BDST} + {1730394000 21600 0 BDT} + {1743440400 25200 1 BDST} + {1761930000 21600 0 BDT} + {1774976400 25200 1 BDST} + {1793466000 21600 0 BDT} + {1806512400 25200 1 BDST} + {1825002000 21600 0 BDT} + {1838134800 25200 1 BDST} + {1856624400 21600 0 BDT} + {1869670800 25200 1 BDST} + {1888160400 21600 0 BDT} + {1901206800 25200 1 BDST} + {1919696400 21600 0 BDT} + {1932742800 25200 1 BDST} + {1951232400 21600 0 BDT} + {1964365200 25200 1 BDST} + {1982854800 21600 0 BDT} + {1995901200 25200 1 BDST} + {2014390800 21600 0 BDT} + {2027437200 25200 1 BDST} + {2045926800 21600 0 BDT} + {2058973200 25200 1 BDST} + {2077462800 21600 0 BDT} + {2090595600 25200 1 BDST} + {2109085200 21600 0 BDT} + {2122131600 25200 1 BDST} + {2140621200 21600 0 BDT} + {2153667600 25200 1 BDST} + {2172157200 21600 0 BDT} + {2185203600 25200 1 BDST} + {2203693200 21600 0 BDT} + {2216826000 25200 1 BDST} + {2235315600 21600 0 BDT} + {2248362000 25200 1 BDST} + {2266851600 21600 0 BDT} + {2279898000 25200 1 BDST} + {2298387600 21600 0 BDT} + {2311434000 25200 1 BDST} + {2329923600 21600 0 BDT} + {2343056400 25200 1 BDST} + {2361546000 21600 0 BDT} + {2374592400 25200 1 BDST} + {2393082000 21600 0 BDT} + {2406128400 25200 1 BDST} + {2424618000 21600 0 BDT} + {2437664400 25200 1 BDST} + {2456154000 21600 0 BDT} + {2469286800 25200 1 BDST} + {2487776400 21600 0 BDT} + {2500822800 25200 1 BDST} + {2519312400 21600 0 BDT} + {2532358800 25200 1 BDST} + {2550848400 21600 0 BDT} + {2563894800 25200 1 BDST} + {2582384400 21600 0 BDT} + {2595517200 25200 1 BDST} + {2614006800 21600 0 BDT} + {2627053200 25200 1 BDST} + {2645542800 21600 0 BDT} + {2658589200 25200 1 BDST} + {2677078800 21600 0 BDT} + {2690125200 25200 1 BDST} + {2708614800 21600 0 BDT} + {2721747600 25200 1 BDST} + {2740237200 21600 0 BDT} + {2753283600 25200 1 BDST} + {2771773200 21600 0 BDT} + {2784819600 25200 1 BDST} + {2803309200 21600 0 BDT} + {2816355600 25200 1 BDST} + {2834845200 21600 0 BDT} + {2847978000 25200 1 BDST} + {2866467600 21600 0 BDT} + {2879514000 25200 1 BDST} + {2898003600 21600 0 BDT} + {2911050000 25200 1 BDST} + {2929539600 21600 0 BDT} + {2942586000 25200 1 BDST} + {2961075600 21600 0 BDT} + {2974208400 25200 1 BDST} + {2992698000 21600 0 BDT} + {3005744400 25200 1 BDST} + {3024234000 21600 0 BDT} + {3037280400 25200 1 BDST} + {3055770000 21600 0 BDT} + {3068816400 25200 1 BDST} + {3087306000 21600 0 BDT} + {3100438800 25200 1 BDST} + {3118928400 21600 0 BDT} + {3131974800 25200 1 BDST} + {3150464400 21600 0 BDT} + {3163510800 25200 1 BDST} + {3182000400 21600 0 BDT} + {3195046800 25200 1 BDST} + {3213536400 21600 0 BDT} + {3226669200 25200 1 BDST} + {3245158800 21600 0 BDT} + {3258205200 25200 1 BDST} + {3276694800 21600 0 BDT} + {3289741200 25200 1 BDST} + {3308230800 21600 0 BDT} + {3321277200 25200 1 BDST} + {3339766800 21600 0 BDT} + {3352899600 25200 1 BDST} + {3371389200 21600 0 BDT} + {3384435600 25200 1 BDST} + {3402925200 21600 0 BDT} + {3415971600 25200 1 BDST} + {3434461200 21600 0 BDT} + {3447507600 25200 1 BDST} + {3465997200 21600 0 BDT} + {3479130000 25200 1 BDST} + {3497619600 21600 0 BDT} + {3510666000 25200 1 BDST} + {3529155600 21600 0 BDT} + {3542202000 25200 1 BDST} + {3560691600 21600 0 BDT} + {3573738000 25200 1 BDST} + {3592227600 21600 0 BDT} + {3605360400 25200 1 BDST} + {3623850000 21600 0 BDT} + {3636896400 25200 1 BDST} + {3655386000 21600 0 BDT} + {3668432400 25200 1 BDST} + {3686922000 21600 0 BDT} + {3699968400 25200 1 BDST} + {3718458000 21600 0 BDT} + {3731590800 25200 1 BDST} + {3750080400 21600 0 BDT} + {3763126800 25200 1 BDST} + {3781616400 21600 0 BDT} + {3794662800 25200 1 BDST} + {3813152400 21600 0 BDT} + {3826198800 25200 1 BDST} + {3844688400 21600 0 BDT} + {3857821200 25200 1 BDST} + {3876310800 21600 0 BDT} + {3889357200 25200 1 BDST} + {3907846800 21600 0 BDT} + {3920893200 25200 1 BDST} + {3939382800 21600 0 BDT} + {3952429200 25200 1 BDST} + {3970918800 21600 0 BDT} + {3984051600 25200 1 BDST} + {4002541200 21600 0 BDT} + {4015587600 25200 1 BDST} + {4034077200 21600 0 BDT} + {4047123600 25200 1 BDST} + {4065613200 21600 0 BDT} + {4078659600 25200 1 BDST} + {4097149200 21600 0 BDT} } diff --git a/library/tzdata/Pacific/Fiji b/library/tzdata/Pacific/Fiji index 2194d59..9916d9c 100644 --- a/library/tzdata/Pacific/Fiji +++ b/library/tzdata/Pacific/Fiji @@ -7,4 +7,6 @@ set TZData(:Pacific/Fiji) { {920124000 43200 0 FJT} {941896800 46800 1 FJST} {951573600 43200 0 FJT} + {1259416800 46800 1 FJST} + {1272117600 43200 0 FJT} } -- cgit v0.12 From 2c4e9fc134585c9dbbd25671018e100165ad1b63 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 9 Mar 2010 21:15:18 +0000 Subject: * generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieux * doc/refchan.n: for debugging and fixing * tests/ioCmd.test: the problem. It is the write-side equivalent to the bug fixed 2009-08-06. --- ChangeLog | 7 +++++ doc/refchan.n | 38 +++++++++++++++++++++++-- generic/tclIORChan.c | 33 ++++++++++++++++++---- tests/ioCmd.test | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 147 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ce46bd..3c2425e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-09 Andreas Kupries + + * generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieux + * doc/refchan.n: for debugging and fixing + * tests/ioCmd.test: the problem. It is the write-side equivalent + to the bug fixed 2009-08-06. + 2010-03-09 Don Porter * library/tzdata/America/Matamoros: New locale diff --git a/doc/refchan.n b/doc/refchan.n index 4edd7ad..5007a09 100644 --- a/doc/refchan.n +++ b/doc/refchan.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: refchan.n,v 1.19 2010/03/03 18:30:28 andreas_kupries Exp $ +'\" RCS: @(#) $Id: refchan.n,v 1.20 2010/03/09 21:15:19 andreas_kupries Exp $ .so man.macros .TH refchan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -176,7 +176,41 @@ negative value implies that the write failed. Returning a value greater than the number of bytes given to the handler, or zero, is forbidden and will cause the Tcl core to throw an error. .PP -If the subcommand throws an error the command which caused its +To signal that the channel is not able to accept data for writing +right now, it is necessary to throw the error "EAGAIN", i.e. to either +.PP +.CS +return -code error EAGAIN +.CE +or +.CS +error EAGAIN +.CE +.PP +For extensibility any error whose value is a negative integer number +will cause the higher layers to set the C-level variable "\fBerrno\fR" +to the absolute value of this number, signaling a system error. +However, note that the exact mapping between these error numbers and +their meanings is operating system dependent. +.PP +For example, while on Linux both +.PP +.CS +return -code error -11 +.CE +and +.CS +error -11 +.CE +.PP +are equivalent to the examples above, using the more readable string "EAGAIN", +this is not true for BSD, where the equivalent number is -35. +.PP +The symbolic string however is the same across systems, and internally +translated to the correct number. No other error value has such a mapping +to a symbolic string. +.PP +If the subcommand throws any other error the command which caused its invocation (usually \fBputs\fR) will appear to have thrown this error. Any exception beyond \fBerror\fR (e.g.,\ \fBbreak\fR, etc.) is treated as and converted to an error. diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 3139268..50374a5 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.45 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.46 2010/03/09 21:15:19 andreas_kupries Exp $ */ #include @@ -1331,8 +1331,13 @@ ReflectOutput( ForwardOpToOwnerThread(rcPtr, ForwardedOutput, &p); if (p.base.code != TCL_OK) { - PassReceivedError(rcPtr->chan, &p); - *errorCodePtr = EINVAL; + if (p.base.code < 0) { + /* No error message, this is an errno signal. */ + *errorCodePtr = -p.base.code; + } else { + PassReceivedError(rcPtr->chan, &p); + *errorCodePtr = EINVAL; + } p.output.toWrite = -1; } else { *errorCodePtr = EOK; @@ -1347,6 +1352,14 @@ ReflectOutput( bufObj = Tcl_NewByteArrayObj((unsigned char *) buf, toWrite); if (InvokeTclMethod(rcPtr, "write", bufObj, NULL, &resObj) != TCL_OK) { + int code = ErrnoReturn(rcPtr, resObj); + + if (code < 0) { + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + *errorCodePtr = -code; + return -1; + } + Tcl_SetChannelError(rcPtr->chan, resObj); Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ *errorCodePtr = EINVAL; @@ -2295,8 +2308,8 @@ InvokeTclMethod( * None. * * Users: - * Currently only ReflectInput(), to enable the signaling of EAGAIN. - * by non-blocking channels at buffer-empty, but not EOF. + * ReflectInput/Output(), to enable the signaling of EAGAIN + * on 0-sized short reads/writes. * *---------------------------------------------------------------------- */ @@ -2857,7 +2870,13 @@ ForwardProc( paramPtr->output.buf, paramPtr->output.toWrite); if (InvokeTclMethod(rcPtr, "write", bufObj, NULL, &resObj) != TCL_OK) { - ForwardSetObjError(paramPtr, resObj); + int code = ErrnoReturn(rcPtr, resObj); + + if (code < 0) { + paramPtr->base.code = code; + } else { + ForwardSetObjError(paramPtr, resObj); + } paramPtr->output.toWrite = -1; } else { /* @@ -3099,5 +3118,7 @@ ForwardSetObjError( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/tests/ioCmd.test b/tests/ioCmd.test index cafe3d9..4467492 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioCmd.test,v 1.51 2010/02/11 15:20:37 dkf Exp $ +# RCS: @(#) $Id: ioCmd.test,v 1.52 2010/03/09 21:15:19 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1190,6 +1190,40 @@ test iocmd-24.13 {chan write, failed write, level is ignored} -match glob -body rename foo {} set res } -result {{write rc* snarfsnarfsnarf} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "write"*}} +test iocmd-24.14 {chan write, no EAGAIN means that writing is allowed at this time, bug 2936225} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + return 3 + } + set c [chan create {r w} foo] +} -body { + note [puts -nonewline $c ABC ; flush $c] + set res +} -cleanup { + close $c + rename foo {} + unset res +} -result {{write rc* ABC} {}} +test iocmd-24.15 {chan write, EAGAIN means that writing is not allowed at this time, bug 2936225} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + # Note: The EAGAIN signals that the channel cannot accept + # write requests right now, this in turn causes the IO core to + # request the generation of writable events (see expected + # result below, and compare to case 24.14 above). + error EAGAIN + } + set c [chan create {r w} foo] +} -body { + note [puts -nonewline $c ABC ; flush $c] + set res +} -cleanup { + close $c + rename foo {} + unset res +} -result {{write rc* ABC} {watch rc* write} {}} # --- === *** ########################### # method cgetall @@ -2507,6 +2541,48 @@ test iocmd.tf-24.13 {chan write, failed write, level is ignored} -match glob -bo set res } -result {{write rc* snarfsnarfsnarf} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "write"*}} \ -constraints {testchannel testthread} +test iocmd.tf-24.14 {chan write, no EAGAIN means that writing is allowed at this time, bug 2936225} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + return 3 + } + set c [chan create {r w} foo] +} -body { + notes [inthread $c { + note [puts -nonewline $c ABC ; flush $c] + close $c + notes + } c] + set res +} -cleanup { + rename foo {} + unset res +} -result {{write rc* ABC} {}} \ + -constraints {testchannel testthread} +test iocmd.tf-24.15 {chan write, EAGAIN means that writing is not allowed at this time, bug 2936225} -match glob -setup { + set res {} + proc foo {args} { + oninit; onfinal; track + # Note: The EAGAIN signals that the channel cannot accept + # write requests right now, this in turn causes the IO core to + # request the generation of writable events (see expected + # result below, and compare to case 24.14 above). + error EAGAIN + } + set c [chan create {r w} foo] +} -body { + notes [inthread $c { + note [puts -nonewline $c ABC ; flush $c] + close $c + notes + } c] + set res +} -cleanup { + rename foo {} + unset res +} -result {{write rc* ABC} {watch rc* write} {}} \ + -constraints {testchannel testthread} # --- === *** ########################### # method cgetall -- cgit v0.12 From ad3425f0ba4af76882183ec4bf7a07034fd77311 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 11 Mar 2010 13:35:23 +0000 Subject: Remove unnecessary '&' decoration for function pointers. Fix double declaration of TclNativeDupInternalRep --- ChangeLog | 14 ++++++++++++ generic/tclIOUtil.c | 58 +++++++++++++++++++++++++------------------------- generic/tclTest.c | 58 +++++++++++++++++++++++++------------------------- unix/dltest/.cvsignore | 1 + unix/tclLoadDl.c | 4 ++-- unix/tclLoadDyld.c | 6 +++--- unix/tclLoadNext.c | 4 ++-- unix/tclLoadOSF.c | 4 ++-- unix/tclLoadShl.c | 4 ++-- win/tclWin32Dll.c | 4 +--- win/tclWinLoad.c | 4 ++-- 11 files changed, 87 insertions(+), 74 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c2425e..e88fd25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-03-10 Jan Nijtmans + + * generic/tclTest.c Remove unnecessary '&' decoration for function + * generic/tclIOUtil.c pointers + * win/tclWin32Dll.c Double declaration of TclNativeDupInternalRep + * win/tclWinLoad.c + * unix/tclIOUtil.c + * unix/tclLoadDl.c + * unix/tclLoadDyld.c + * unix/tclLoadNext.c + * unix/tclLoadOSF.c + * unix/tclLoadShl.c + * unix/dltest/.cvsignore Ignore *.so here + 2010-03-09 Andreas Kupries * generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieux diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 23e864b..a838df6 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.169 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.170 2010/03/11 13:35:24 nijtmans Exp $ */ #include "tclInt.h" @@ -111,39 +111,39 @@ const Tcl_Filesystem tclNativeFilesystem = { "native", sizeof(Tcl_Filesystem), TCL_FILESYSTEM_VERSION_2, - &TclNativePathInFilesystem, - &TclNativeDupInternalRep, - &NativeFreeInternalRep, - &TclpNativeToNormalized, - &TclNativeCreateNativeRep, - &TclpObjNormalizePath, - &TclpFilesystemPathType, - &NativeFilesystemSeparator, - &TclpObjStat, - &TclpObjAccess, - &TclpOpenFileChannel, - &TclpMatchInDirectory, - &TclpUtime, + TclNativePathInFilesystem, + TclNativeDupInternalRep, + NativeFreeInternalRep, + TclpNativeToNormalized, + TclNativeCreateNativeRep, + TclpObjNormalizePath, + TclpFilesystemPathType, + NativeFilesystemSeparator, + TclpObjStat, + TclpObjAccess, + TclpOpenFileChannel, + TclpMatchInDirectory, + TclpUtime, #ifndef S_IFLNK NULL, #else - &TclpObjLink, + TclpObjLink, #endif /* S_IFLNK */ - &TclpObjListVolumes, - &NativeFileAttrStrings, - &NativeFileAttrsGet, - &NativeFileAttrsSet, - &TclpObjCreateDirectory, - &TclpObjRemoveDirectory, - &TclpObjDeleteFile, - &TclpObjCopyFile, - &TclpObjRenameFile, - &TclpObjCopyDirectory, - &TclpObjLstat, - &TclpDlopen, + TclpObjListVolumes, + NativeFileAttrStrings, + NativeFileAttrsGet, + NativeFileAttrsSet, + TclpObjCreateDirectory, + TclpObjRemoveDirectory, + TclpObjDeleteFile, + TclpObjCopyFile, + TclpObjRenameFile, + TclpObjCopyDirectory, + TclpObjLstat, + TclpDlopen, /* Needs a cast since we're using version_2. */ - (Tcl_FSGetCwdProc *) &TclpGetNativeCwd, - &TclpObjChdir + (Tcl_FSGetCwdProc *) TclpGetNativeCwd, + TclpObjChdir }; /* diff --git a/generic/tclTest.c b/generic/tclTest.c index 4e717bd..5aedb14 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.149 2010/03/07 14:39:26 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.150 2010/03/11 13:35:25 nijtmans Exp $ */ #undef STATIC_BUILD @@ -428,41 +428,41 @@ static const Tcl_Filesystem testReportingFilesystem = { "reporting", sizeof(Tcl_Filesystem), TCL_FILESYSTEM_VERSION_1, - &TestReportInFilesystem, /* path in */ - &TestReportDupInternalRep, - &TestReportFreeInternalRep, + TestReportInFilesystem, /* path in */ + TestReportDupInternalRep, + TestReportFreeInternalRep, NULL, /* native to norm */ NULL, /* convert to native */ - &TestReportNormalizePath, + TestReportNormalizePath, NULL, /* path type */ NULL, /* separator */ - &TestReportStat, - &TestReportAccess, - &TestReportOpenFileChannel, - &TestReportMatchInDirectory, - &TestReportUtime, - &TestReportLink, + TestReportStat, + TestReportAccess, + TestReportOpenFileChannel, + TestReportMatchInDirectory, + TestReportUtime, + TestReportLink, NULL /* list volumes */, - &TestReportFileAttrStrings, - &TestReportFileAttrsGet, - &TestReportFileAttrsSet, - &TestReportCreateDirectory, - &TestReportRemoveDirectory, - &TestReportDeleteFile, - &TestReportCopyFile, - &TestReportRenameFile, - &TestReportCopyDirectory, - &TestReportLstat, - &TestReportLoadFile, + TestReportFileAttrStrings, + TestReportFileAttrsGet, + TestReportFileAttrsSet, + TestReportCreateDirectory, + TestReportRemoveDirectory, + TestReportDeleteFile, + TestReportCopyFile, + TestReportRenameFile, + TestReportCopyDirectory, + TestReportLstat, + TestReportLoadFile, NULL /* cwd */, - &TestReportChdir + TestReportChdir }; static const Tcl_Filesystem simpleFilesystem = { "simple", sizeof(Tcl_Filesystem), TCL_FILESYSTEM_VERSION_1, - &SimplePathInFilesystem, + SimplePathInFilesystem, NULL, NULL, /* No internal to normalized, since we don't create any @@ -476,14 +476,14 @@ static const Tcl_Filesystem simpleFilesystem = { NULL, NULL, NULL, - &SimpleStat, - &SimpleAccess, - &SimpleOpenFileChannel, - &SimpleMatchInDirectory, + SimpleStat, + SimpleAccess, + SimpleOpenFileChannel, + SimpleMatchInDirectory, NULL, /* We choose not to support symbolic links inside our vfs's */ NULL, - &SimpleListVolumes, + SimpleListVolumes, NULL, NULL, NULL, diff --git a/unix/dltest/.cvsignore b/unix/dltest/.cvsignore index 5325f6e..6ff1067 100644 --- a/unix/dltest/.cvsignore +++ b/unix/dltest/.cvsignore @@ -2,3 +2,4 @@ Makefile *.bundle *.dylib *.dll +*.so diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 7bb1da3..3043f92 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.17 2008/04/27 22:21:33 dkf Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.18 2010/03/11 13:35:25 nijtmans Exp $ */ #include "tclInt.h" @@ -104,7 +104,7 @@ TclpDlopen( return TCL_ERROR; } - *unloadProcPtr = &TclpUnloadFile; + *unloadProcPtr = TclpUnloadFile; *loadHandle = (Tcl_LoadHandle) handle; return TCL_OK; } diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 5e330c8..79fa227 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.32 2009/04/10 18:10:39 das Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.33 2010/03/11 13:35:25 nijtmans Exp $ */ #include "tclInt.h" @@ -308,7 +308,7 @@ TclpDlopen( dyldLoadHandle->modulePtr = modulePtr; #endif *loadHandle = (Tcl_LoadHandle) dyldLoadHandle; - *unloadProcPtr = &TclpUnloadFile; + *unloadProcPtr = TclpUnloadFile; result = TCL_OK; } else { Tcl_AppendResult(interp, errMsg, NULL); @@ -758,7 +758,7 @@ TclpLoadMemory( dyldLoadHandle->dyldLibHeader = NULL; dyldLoadHandle->modulePtr = modulePtr; *loadHandle = (Tcl_LoadHandle) dyldLoadHandle; - *unloadProcPtr = &TclpUnloadFile; + *unloadProcPtr = TclpUnloadFile; return TCL_OK; } #endif /* TCL_LOAD_FROM_MEMORY */ diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c index 4168ebb..5b66f4e 100644 --- a/unix/tclLoadNext.c +++ b/unix/tclLoadNext.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadNext.c,v 1.14 2008/04/27 22:21:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadNext.c,v 1.15 2010/03/11 13:35:25 nijtmans Exp $ */ #include "tclInt.h" @@ -96,7 +96,7 @@ TclpDlopen( NXCloseMemory(errorStream, NX_FREEBUFFER); *loadHandle = (Tcl_LoadHandle)1; /* A dummy non-NULL value */ - *unloadProcPtr = &TclpUnloadFile; + *unloadProcPtr = TclpUnloadFile; return TCL_OK; } diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c index 8a63035..4d91243 100644 --- a/unix/tclLoadOSF.c +++ b/unix/tclLoadOSF.c @@ -31,7 +31,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadOSF.c,v 1.14 2008/04/27 22:21:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadOSF.c,v 1.15 2010/03/11 13:35:25 nijtmans Exp $ */ #include "tclInt.h" @@ -120,7 +120,7 @@ TclpDlopen( pkg++; } *loadHandle = pkg; - *unloadProcPtr = &TclpUnloadFile; + *unloadProcPtr = TclpUnloadFile; return TCL_OK; } diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c index a3a3fc5..b989d7e 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadShl.c,v 1.17 2008/04/27 22:21:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadShl.c,v 1.18 2010/03/11 13:35:25 nijtmans Exp $ */ #include @@ -98,7 +98,7 @@ TclpDlopen( return TCL_ERROR; } *loadHandle = (Tcl_LoadHandle) handle; - *unloadProcPtr = &TclpUnloadFile; + *unloadProcPtr = TclpUnloadFile; return TCL_OK; } diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index 50689bc..3b2b0a0 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.62 2010/03/07 14:39:25 nijtmans Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.63 2010/03/11 13:35:23 nijtmans Exp $ */ #include "tclWinInt.h" @@ -270,8 +270,6 @@ TCL_DECLARE_MUTEX(mountPointMap) * We will need this below. */ -extern Tcl_FSDupInternalRepProc TclNativeDupInternalRep; - #ifdef __WIN32__ #ifndef STATIC_BUILD diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 26f50a4..fea7b85 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.24 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.25 2010/03/11 13:35:23 nijtmans Exp $ */ #include "tclWinInt.h" @@ -130,7 +130,7 @@ TclpDlopen( } return TCL_ERROR; } else { - *unloadProcPtr = &TclpUnloadFile; + *unloadProcPtr = TclpUnloadFile; } return TCL_OK; } -- cgit v0.12 From 9d18c761c4715d164e990bd70d90a73517f5d79f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 11 Mar 2010 15:02:32 +0000 Subject: Revert a few files from the previous commit, preventing conflicts with Kevin's TIP #357 work --- ChangeLog | 6 ------ unix/tclLoadDl.c | 4 ++-- unix/tclLoadDyld.c | 6 +++--- unix/tclLoadNext.c | 4 ++-- unix/tclLoadOSF.c | 4 ++-- unix/tclLoadShl.c | 4 ++-- win/tclWinLoad.c | 4 ++-- 7 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index e88fd25..e063929 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,13 +3,7 @@ * generic/tclTest.c Remove unnecessary '&' decoration for function * generic/tclIOUtil.c pointers * win/tclWin32Dll.c Double declaration of TclNativeDupInternalRep - * win/tclWinLoad.c * unix/tclIOUtil.c - * unix/tclLoadDl.c - * unix/tclLoadDyld.c - * unix/tclLoadNext.c - * unix/tclLoadOSF.c - * unix/tclLoadShl.c * unix/dltest/.cvsignore Ignore *.so here 2010-03-09 Andreas Kupries diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 3043f92..282d5bb 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.18 2010/03/11 13:35:25 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.19 2010/03/11 15:02:33 nijtmans Exp $ */ #include "tclInt.h" @@ -104,7 +104,7 @@ TclpDlopen( return TCL_ERROR; } - *unloadProcPtr = TclpUnloadFile; + *unloadProcPtr = &TclpUnloadFile; *loadHandle = (Tcl_LoadHandle) handle; return TCL_OK; } diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 79fa227..4b64032 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.33 2010/03/11 13:35:25 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.34 2010/03/11 15:02:33 nijtmans Exp $ */ #include "tclInt.h" @@ -308,7 +308,7 @@ TclpDlopen( dyldLoadHandle->modulePtr = modulePtr; #endif *loadHandle = (Tcl_LoadHandle) dyldLoadHandle; - *unloadProcPtr = TclpUnloadFile; + *unloadProcPtr = &TclpUnloadFile; result = TCL_OK; } else { Tcl_AppendResult(interp, errMsg, NULL); @@ -758,7 +758,7 @@ TclpLoadMemory( dyldLoadHandle->dyldLibHeader = NULL; dyldLoadHandle->modulePtr = modulePtr; *loadHandle = (Tcl_LoadHandle) dyldLoadHandle; - *unloadProcPtr = TclpUnloadFile; + *unloadProcPtr = &TclpUnloadFile; return TCL_OK; } #endif /* TCL_LOAD_FROM_MEMORY */ diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c index 5b66f4e..0f82593 100644 --- a/unix/tclLoadNext.c +++ b/unix/tclLoadNext.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadNext.c,v 1.15 2010/03/11 13:35:25 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadNext.c,v 1.16 2010/03/11 15:02:33 nijtmans Exp $ */ #include "tclInt.h" @@ -96,7 +96,7 @@ TclpDlopen( NXCloseMemory(errorStream, NX_FREEBUFFER); *loadHandle = (Tcl_LoadHandle)1; /* A dummy non-NULL value */ - *unloadProcPtr = TclpUnloadFile; + *unloadProcPtr = &TclpUnloadFile; return TCL_OK; } diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c index 4d91243..136fad9 100644 --- a/unix/tclLoadOSF.c +++ b/unix/tclLoadOSF.c @@ -31,7 +31,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadOSF.c,v 1.15 2010/03/11 13:35:25 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadOSF.c,v 1.16 2010/03/11 15:02:33 nijtmans Exp $ */ #include "tclInt.h" @@ -120,7 +120,7 @@ TclpDlopen( pkg++; } *loadHandle = pkg; - *unloadProcPtr = TclpUnloadFile; + *unloadProcPtr = &TclpUnloadFile; return TCL_OK; } diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c index b989d7e..bf46cf5 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadShl.c,v 1.18 2010/03/11 13:35:25 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadShl.c,v 1.19 2010/03/11 15:02:33 nijtmans Exp $ */ #include @@ -98,7 +98,7 @@ TclpDlopen( return TCL_ERROR; } *loadHandle = (Tcl_LoadHandle) handle; - *unloadProcPtr = TclpUnloadFile; + *unloadProcPtr = &TclpUnloadFile; return TCL_OK; } diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index fea7b85..bdc62ae 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.25 2010/03/11 13:35:23 nijtmans Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.26 2010/03/11 15:02:33 nijtmans Exp $ */ #include "tclWinInt.h" @@ -130,7 +130,7 @@ TclpDlopen( } return TCL_ERROR; } else { - *unloadProcPtr = TclpUnloadFile; + *unloadProcPtr = &TclpUnloadFile; } return TCL_OK; } -- cgit v0.12 From d1cd3efa0aa04ba0c8a2c7491bb2c6c4a5dda250 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 12 Mar 2010 15:18:41 +0000 Subject: Fix [Bug 2967340]: Static build failure --- ChangeLog | 5 +++++ win/.cvsignore | 3 +++ win/makefile.vc | 10 +--------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index e063929..ae96eb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-12 Jan Nijtmans + + * win/makefile.vc Fix [Bug 2967340]: Static build failure + * win/.cvsignore + 2010-03-10 Jan Nijtmans * generic/tclTest.c Remove unnecessary '&' decoration for function diff --git a/win/.cvsignore b/win/.cvsignore index 7a35fbb..c3044c9 100644 --- a/win/.cvsignore +++ b/win/.cvsignore @@ -26,3 +26,6 @@ tcl.suo *.lib *.pdb *.ilk +*.pch +versions.vc +vercl.x diff --git a/win/makefile.vc b/win/makefile.vc index 73fa236..511abaf 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.208 2010/03/04 22:29:05 nijtmans Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.209 2010/03/12 15:18:42 nijtmans Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -620,12 +620,8 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c $(_VC_MANIFEST_EMBED_DLL) !if $(STATIC_BUILD) -!if $(TCL_USE_STATIC_PACKAGES) -$(TCLDDELIB): -!else $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(lib32) -nologo $(LINKERFLAGS) -out:$@ $** -!endif !else $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tcldde -out:$@ \ @@ -634,12 +630,8 @@ $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) !endif !if $(STATIC_BUILD) -!if $(TCL_USE_STATIC_PACKAGES) -$(TCLREGLIB): -!else $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(lib32) -nologo $(LINKERFLAGS) -out:$@ $** -!endif !else $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tclreg -out:$@ \ -- cgit v0.12 From 6b64f45b9a293ab9cd7c97afa0399c6c37bd4a00 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 14 Mar 2010 14:59:25 +0000 Subject: Squelch unnecessary parens, shorten overlong comment lines. --- unix/tclUnixTime.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index e56d60c..01217b6 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTime.c,v 1.37 2010/02/25 22:20:10 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixTime.c,v 1.38 2010/03/14 14:59:25 dkf Exp $ */ #include "tclInt.h" @@ -64,7 +64,7 @@ Tcl_ScaleTimeProc *tclScaleTimeProcPtr = NativeScaleTime; ClientData tclTimeClientData = NULL; /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpGetSeconds -- * @@ -77,7 +77,7 @@ ClientData tclTimeClientData = NULL; * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ unsigned long @@ -87,7 +87,7 @@ TclpGetSeconds(void) } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpGetClicks -- * @@ -102,7 +102,7 @@ TclpGetSeconds(void) * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ unsigned long @@ -136,7 +136,7 @@ TclpGetClicks(void) #ifdef TCL_WIDE_CLICKS /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpGetWideClicks -- * @@ -151,7 +151,7 @@ TclpGetClicks(void) * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ Tcl_WideInt @@ -176,7 +176,7 @@ TclpGetWideClicks(void) } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpWideClicksToNanoseconds -- * @@ -189,7 +189,7 @@ TclpGetWideClicks(void) * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ double @@ -424,14 +424,14 @@ TclpGmtime( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tmKey); #ifdef HAVE_GMTIME_R - gmtime_r(timePtr, &(tsdPtr->gmtime_buf)); + gmtime_r(timePtr, &tsdPtr->gmtime_buf); #else Tcl_MutexLock(&tmMutex); - memcpy(&(tsdPtr->gmtime_buf), gmtime(timePtr), sizeof(struct tm)); + memcpy(&tsdPtr->gmtime_buf, gmtime(timePtr), sizeof(struct tm)); Tcl_MutexUnlock(&tmMutex); #endif - return &(tsdPtr->gmtime_buf); + return &tsdPtr->gmtime_buf; } /* @@ -475,14 +475,14 @@ TclpLocaltime( SetTZIfNecessary(); #ifdef HAVE_LOCALTIME_R - localtime_r(timePtr, &(tsdPtr->localtime_buf)); + localtime_r(timePtr, &tsdPtr->localtime_buf); #else Tcl_MutexLock(&tmMutex); - memcpy(&(tsdPtr->localtime_buf), localtime(timePtr), sizeof(struct tm)); + memcpy(&tsdPtr->localtime_buf, localtime(timePtr), sizeof(struct tm)); Tcl_MutexUnlock(&tmMutex); #endif - return &(tsdPtr->localtime_buf); + return &tsdPtr->localtime_buf; } /* * Forwarder for obsolete item in Stubs -- cgit v0.12 From d8aa6f53b956aac50cc8abbee8efde417120f022 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 16 Mar 2010 09:01:02 +0000 Subject: Upgrade zlib to version 1.2.4 --- ChangeLog | 6 + compat/zlib/CMakeLists.txt | 197 ++ compat/zlib/ChangeLog | 280 ++- compat/zlib/FAQ | 261 +-- compat/zlib/INDEX | 29 +- compat/zlib/Makefile | 157 +- compat/zlib/Makefile.in | 208 +- compat/zlib/README | 85 +- compat/zlib/adler32.c | 40 +- compat/zlib/algorithm.txt | 209 -- compat/zlib/amiga/Makefile.pup | 9 +- compat/zlib/amiga/Makefile.sas | 9 +- compat/zlib/as400/bndsrc | 132 -- compat/zlib/as400/compile.clp | 123 -- compat/zlib/as400/readme.txt | 111 - compat/zlib/as400/zlib.inc | 331 --- compat/zlib/compress.c | 7 +- compat/zlib/configure | 271 ++- compat/zlib/contrib/README.contrib | 22 +- compat/zlib/contrib/ada/buffer_demo.adb | 2 +- compat/zlib/contrib/ada/mtest.adb | 2 +- compat/zlib/contrib/ada/read.adb | 2 +- compat/zlib/contrib/ada/test.adb | 2 +- compat/zlib/contrib/ada/zlib-streams.adb | 2 +- compat/zlib/contrib/ada/zlib-streams.ads | 2 +- compat/zlib/contrib/ada/zlib-thin.adb | 2 +- compat/zlib/contrib/ada/zlib-thin.ads | 2 +- compat/zlib/contrib/ada/zlib.adb | 2 +- compat/zlib/contrib/ada/zlib.ads | 2 +- compat/zlib/contrib/amd64/amd64-match.S | 452 ++++ compat/zlib/contrib/asm686/README.686 | 17 + compat/zlib/contrib/asm686/match.S | 24 +- compat/zlib/contrib/delphi/ZLib.pas | 2 +- compat/zlib/contrib/delphi/zlibd32.mak | 16 +- compat/zlib/contrib/dotzlib/DotZLib.build | 64 +- compat/zlib/contrib/dotzlib/DotZLib.chm | Bin 72728 -> 72726 bytes compat/zlib/contrib/dotzlib/DotZLib.sln | 42 +- .../zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs | 116 +- .../zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs | 402 ++-- .../zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs | 166 +- compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs | 396 ++-- compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs | 212 +- compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs | 576 +++--- compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj | 282 +-- compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs | 602 +++--- compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs | 210 +- compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 546 ++--- compat/zlib/contrib/dotzlib/LICENSE_1_0.txt | 44 +- compat/zlib/contrib/dotzlib/readme.txt | 116 +- compat/zlib/contrib/gcc_gvmat64/gvmat64.S | 574 ++++++ compat/zlib/contrib/infback9/infback9.c | 91 +- compat/zlib/contrib/infback9/inftree9.c | 21 +- compat/zlib/contrib/infback9/inftree9.h | 24 +- compat/zlib/contrib/inflate86/inffas86.c | 2 +- compat/zlib/contrib/iostream2/zstream.h | 2 +- compat/zlib/contrib/masmx64/bld_ml64.bat | 4 +- compat/zlib/contrib/masmx64/gvmat64.asm | 1066 +++++----- compat/zlib/contrib/masmx64/inffas8664.c | 372 ++-- compat/zlib/contrib/masmx64/inffasx64.asm | 788 +++---- compat/zlib/contrib/masmx64/readme.txt | 59 +- compat/zlib/contrib/masmx86/bld_ml32.bat | 4 +- compat/zlib/contrib/masmx86/inffas32.asm | 2166 ++++++++++---------- compat/zlib/contrib/masmx86/match686.asm | 478 +++++ compat/zlib/contrib/masmx86/readme.txt | 14 +- compat/zlib/contrib/minizip/MiniZip64_Changes.txt | 6 + compat/zlib/contrib/minizip/MiniZip64_info.txt | 74 + compat/zlib/contrib/minizip/crypt.h | 17 +- compat/zlib/contrib/minizip/ioapi.c | 220 +- compat/zlib/contrib/minizip/ioapi.h | 181 +- compat/zlib/contrib/minizip/iowin32.c | 309 ++- compat/zlib/contrib/minizip/iowin32.h | 15 +- compat/zlib/contrib/minizip/make_vms.com | 25 + compat/zlib/contrib/minizip/miniunz.c | 141 +- compat/zlib/contrib/minizip/minizip.c | 131 +- compat/zlib/contrib/minizip/mztools.c | 30 +- compat/zlib/contrib/minizip/mztools.h | 8 +- compat/zlib/contrib/minizip/unzip.c | 1283 ++++++++---- compat/zlib/contrib/minizip/unzip.h | 127 +- compat/zlib/contrib/minizip/zip.c | 1829 ++++++++++++----- compat/zlib/contrib/minizip/zip.h | 175 +- compat/zlib/contrib/pascal/zlibd32.mak | 16 +- compat/zlib/contrib/pascal/zlibpas.pas | 2 +- compat/zlib/contrib/puff/puff.c | 193 +- compat/zlib/contrib/puff/puff.h | 4 +- compat/zlib/contrib/testzlib/testzlib.c | 550 ++--- compat/zlib/contrib/testzlib/testzlib.txt | 18 +- compat/zlib/contrib/vstudio/readme.txt | 133 +- compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj | 310 +++ .../contrib/vstudio/vc10/miniunz.vcxproj.filters | 22 + .../zlib/contrib/vstudio/vc10/miniunz.vcxproj.user | 3 + compat/zlib/contrib/vstudio/vc10/minizip.vcxproj | 307 +++ .../contrib/vstudio/vc10/minizip.vcxproj.filters | 22 + .../zlib/contrib/vstudio/vc10/minizip.vcxproj.user | 3 + compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj | 420 ++++ .../contrib/vstudio/vc10/testzlib.vcxproj.filters | 58 + .../contrib/vstudio/vc10/testzlib.vcxproj.user | 3 + .../zlib/contrib/vstudio/vc10/testzlibdll.vcxproj | 310 +++ .../vstudio/vc10/testzlibdll.vcxproj.filters | 22 + .../contrib/vstudio/vc10/testzlibdll.vcxproj.user | 3 + compat/zlib/contrib/vstudio/vc10/zlib.rc | 32 + compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj | 457 +++++ .../contrib/vstudio/vc10/zlibstat.vcxproj.filters | 77 + .../contrib/vstudio/vc10/zlibstat.vcxproj.user | 3 + compat/zlib/contrib/vstudio/vc10/zlibvc.def | 130 ++ compat/zlib/contrib/vstudio/vc10/zlibvc.sln | 135 ++ compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj | 659 ++++++ .../contrib/vstudio/vc10/zlibvc.vcxproj.filters | 118 ++ .../zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user | 3 + compat/zlib/contrib/vstudio/vc9/miniunz.vcproj | 565 +++++ compat/zlib/contrib/vstudio/vc9/minizip.vcproj | 562 +++++ compat/zlib/contrib/vstudio/vc9/testzlib.vcproj | 852 ++++++++ compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj | 565 +++++ compat/zlib/contrib/vstudio/vc9/zlib.rc | 32 + compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj | 835 ++++++++ compat/zlib/contrib/vstudio/vc9/zlibvc.def | 130 ++ compat/zlib/contrib/vstudio/vc9/zlibvc.sln | 144 ++ compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj | 1156 +++++++++++ compat/zlib/crc32.c | 35 +- compat/zlib/deflate.c | 270 ++- compat/zlib/deflate.h | 19 +- compat/zlib/doc/algorithm.txt | 209 ++ compat/zlib/doc/rfc1950.txt | 619 ++++++ compat/zlib/doc/rfc1951.txt | 955 +++++++++ compat/zlib/doc/rfc1952.txt | 675 ++++++ compat/zlib/doc/txtvsbin.txt | 107 + compat/zlib/example.c | 6 +- compat/zlib/examples/README.examples | 15 +- compat/zlib/examples/enough.c | 569 +++++ compat/zlib/examples/gun.c | 44 +- compat/zlib/examples/gzlog.c | 1303 +++++++++--- compat/zlib/examples/gzlog.h | 93 +- compat/zlib/examples/zlib_how.html | 36 +- compat/zlib/examples/zpipe.c | 24 +- compat/zlib/examples/zran.c | 2 +- compat/zlib/gzclose.c | 25 + compat/zlib/gzguts.h | 132 ++ compat/zlib/gzio.c | 1026 ---------- compat/zlib/gzlib.c | 535 +++++ compat/zlib/gzread.c | 652 ++++++ compat/zlib/gzwrite.c | 531 +++++ compat/zlib/infback.c | 93 +- compat/zlib/inffast.c | 78 +- compat/zlib/inflate.c | 282 ++- compat/zlib/inflate.h | 31 +- compat/zlib/inftrees.c | 61 +- compat/zlib/inftrees.h | 23 +- compat/zlib/make_vms.com | 479 ++++- compat/zlib/minigzip.c | 131 +- compat/zlib/msdos/Makefile.bor | 16 +- compat/zlib/msdos/Makefile.dj2 | 4 +- compat/zlib/msdos/Makefile.emx | 4 +- compat/zlib/msdos/Makefile.msc | 12 +- compat/zlib/msdos/Makefile.tc | 16 +- compat/zlib/nintendods/Makefile | 126 ++ compat/zlib/nintendods/README | 5 + compat/zlib/old/as400/bndsrc | 132 ++ compat/zlib/old/as400/compile.clp | 123 ++ compat/zlib/old/as400/readme.txt | 111 + compat/zlib/old/as400/zlib.inc | 331 +++ compat/zlib/old/zlib.html | 971 --------- compat/zlib/projects/visualc6/README.txt | 146 +- compat/zlib/projects/visualc6/example.dsp | 556 ++--- compat/zlib/projects/visualc6/minigzip.dsp | 556 ++--- compat/zlib/projects/visualc6/zlib.dsp | 1230 +++++------ compat/zlib/projects/visualc6/zlib.dsw | 118 +- compat/zlib/qnx/package.qpg | 10 +- compat/zlib/treebuild.xml | 116 ++ compat/zlib/trees.c | 84 +- compat/zlib/uncompr.c | 6 +- compat/zlib/watcom/watcom_f.mak | 43 + compat/zlib/watcom/watcom_l.mak | 43 + compat/zlib/win32/DLL_FAQ.txt | 8 +- compat/zlib/win32/Makefile.bor | 21 +- compat/zlib/win32/Makefile.emx | 4 +- compat/zlib/win32/Makefile.gcc | 31 +- compat/zlib/win32/Makefile.msc | 45 +- compat/zlib/win32/zdll.lib | Bin 10590 -> 13438 bytes compat/zlib/win32/zlib.def | 17 +- compat/zlib/win32/zlib1.dll | Bin 59904 -> 77876 bytes compat/zlib/win32/zlib1.rc | 6 +- compat/zlib/zconf.h | 180 +- compat/zlib/zconf.h.cmakein | 418 ++++ compat/zlib/zconf.h.in | 416 ++++ compat/zlib/zconf.in.h | 332 --- compat/zlib/zlib.3 | 66 +- compat/zlib/zlib.3.pdf | Bin 0 -> 8688 bytes compat/zlib/zlib.h | 1156 ++++++----- compat/zlib/zlib.map | 68 + compat/zlib/zlib.pc.in | 12 + compat/zlib/zlib2ansi | 152 ++ compat/zlib/zutil.c | 10 +- compat/zlib/zutil.h | 54 +- unix/Makefile.in | 6 +- win/makefile.vc | 3 +- 194 files changed, 30381 insertions(+), 12325 deletions(-) create mode 100644 compat/zlib/CMakeLists.txt delete mode 100644 compat/zlib/algorithm.txt delete mode 100644 compat/zlib/as400/bndsrc delete mode 100644 compat/zlib/as400/compile.clp delete mode 100644 compat/zlib/as400/readme.txt delete mode 100644 compat/zlib/as400/zlib.inc create mode 100644 compat/zlib/contrib/amd64/amd64-match.S create mode 100644 compat/zlib/contrib/gcc_gvmat64/gvmat64.S create mode 100644 compat/zlib/contrib/masmx86/match686.asm create mode 100644 compat/zlib/contrib/minizip/MiniZip64_Changes.txt create mode 100644 compat/zlib/contrib/minizip/MiniZip64_info.txt create mode 100644 compat/zlib/contrib/minizip/make_vms.com create mode 100644 compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj create mode 100644 compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters create mode 100644 compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user create mode 100644 compat/zlib/contrib/vstudio/vc10/minizip.vcxproj create mode 100644 compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters create mode 100644 compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user create mode 100644 compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj create mode 100644 compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters create mode 100644 compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user create mode 100644 compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj create mode 100644 compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters create mode 100644 compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user create mode 100644 compat/zlib/contrib/vstudio/vc10/zlib.rc create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibvc.def create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibvc.sln create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters create mode 100644 compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user create mode 100644 compat/zlib/contrib/vstudio/vc9/miniunz.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc9/minizip.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc9/testzlib.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc9/zlib.rc create mode 100644 compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj create mode 100644 compat/zlib/contrib/vstudio/vc9/zlibvc.def create mode 100644 compat/zlib/contrib/vstudio/vc9/zlibvc.sln create mode 100644 compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj create mode 100644 compat/zlib/doc/algorithm.txt create mode 100644 compat/zlib/doc/rfc1950.txt create mode 100644 compat/zlib/doc/rfc1951.txt create mode 100644 compat/zlib/doc/rfc1952.txt create mode 100644 compat/zlib/doc/txtvsbin.txt create mode 100644 compat/zlib/examples/enough.c create mode 100644 compat/zlib/gzclose.c create mode 100644 compat/zlib/gzguts.h delete mode 100644 compat/zlib/gzio.c create mode 100644 compat/zlib/gzlib.c create mode 100644 compat/zlib/gzread.c create mode 100644 compat/zlib/gzwrite.c create mode 100644 compat/zlib/nintendods/Makefile create mode 100644 compat/zlib/nintendods/README create mode 100644 compat/zlib/old/as400/bndsrc create mode 100644 compat/zlib/old/as400/compile.clp create mode 100644 compat/zlib/old/as400/readme.txt create mode 100644 compat/zlib/old/as400/zlib.inc delete mode 100644 compat/zlib/old/zlib.html create mode 100644 compat/zlib/treebuild.xml create mode 100644 compat/zlib/watcom/watcom_f.mak create mode 100644 compat/zlib/watcom/watcom_l.mak create mode 100644 compat/zlib/zconf.h.cmakein create mode 100644 compat/zlib/zconf.h.in delete mode 100644 compat/zlib/zconf.in.h create mode 100644 compat/zlib/zlib.3.pdf create mode 100644 compat/zlib/zlib.map create mode 100644 compat/zlib/zlib.pc.in create mode 100644 compat/zlib/zlib2ansi diff --git a/ChangeLog b/ChangeLog index ae96eb5..c86d6f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-16 Jan Nijtmans + + * compat/zlib/* Upgrade zlib to version 1.2.4 + * win/makefile.vc + * unix/Makefile.in + 2010-03-12 Jan Nijtmans * win/makefile.vc Fix [Bug 2967340]: Static build failure diff --git a/compat/zlib/CMakeLists.txt b/compat/zlib/CMakeLists.txt new file mode 100644 index 0000000..7eefa49 --- /dev/null +++ b/compat/zlib/CMakeLists.txt @@ -0,0 +1,197 @@ +cmake_minimum_required(VERSION 2.4.4) +set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) + +project(zlib C) + +if(NOT DEFINED BUILD_SHARED_LIBS) + option(BUILD_SHARED_LIBS "Build a shared library form of zlib" ON) +endif() + +include(CheckTypeSize) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckCSourceCompiles) +enable_testing() + +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(stddef.h HAVE_STDDEF_H) + +# +# Check to see if we have large file support +# +set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE) +# We add these other definitions here because CheckTypeSize.cmake +# in CMake 2.4.x does not automatically do so and we want +# compatibility with CMake 2.4.x. +if(HAVE_SYS_TYPES_H) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) +endif() +if(HAVE_STDINT_H) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) +endif() +if(HAVE_STDDEF_H) + list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) +endif() +check_type_size(off64_t OFF64_T) +if(HAVE_OFF64_T) + add_definitions(-D_LARGEFILE64_SOURCE) +endif() +set(CMAKE_REQUIRED_DEFINITIONS) # clear variable + +# +# Check for fseeko +# +check_function_exists(fseeko HAVE_FSEEKO) +if(NOT HAVE_FSEEKO) + add_definitions(-DNO_FSEEKO) +endif() + +# +# Check for unistd.h +# +check_include_file(unistd.h Z_HAVE_UNISTD_H) + +# +# Check for errno.h +check_include_file(errno.h HAVE_ERRNO_H) +if(NOT HAVE_ERRNO_H) + add_definitions(-DNO_ERRNO_H) +endif() + +if(MSVC) + set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) + # If we're doing an out of source build and the user has a zconf.h + # in their source tree... + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h) + message(FATAL_ERROR + "You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h " + "from the source tree. This file is included with zlib " + "but CMake generates this file for you automatically " + "in the build directory.") + endif() +endif() + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + + +#============================================================================ +# zlib +#============================================================================ + +set(ZLIB_PUBLIC_HDRS + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h + zlib.h +) +set(ZLIB_PRIVATE_HDRS + crc32.h + deflate.h + gzguts.h + inffast.h + inffixed.h + inflate.h + inftrees.h + trees.h + zutil.h +) +set(ZLIB_SRCS + adler32.c + compress.c + crc32.c + deflate.c + gzclose.c + gzlib.c + gzread.c + gzwrite.c + inflate.c + infback.c + inftrees.c + inffast.c + trees.c + uncompr.c + zutil.c + win32/zlib1.rc +) + +# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) +string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +if(MINGW) + # This gets us DLL resource information when compiling on MinGW. + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + COMMAND windres.exe + -D GCC_WINDRES + -I ${CMAKE_CURRENT_SOURCE_DIR} + -I ${CMAKE_CURRENT_BINARY_DIR} + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +endif(MINGW) + +add_library(zlib ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + +set_target_properties(zlib PROPERTIES SOVERSION 1) + +if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version + # encoded into their final filename. We disable this on Cygwin because + # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll + # seems to be the default. + # + # This has no effect with MSVC, on that platform the version info for + # the DLL comes from the resource file win32/zlib1.rc + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) +endif() + +if(UNIX) + # On unix-like platforms the library is almost always called libz + set_target_properties(zlib PROPERTIES OUTPUT_NAME z) +elseif(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version + set_target_properties(zlib PROPERTIES SUFFIX "1.dll") +endif() + +if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) + install(TARGETS zlib + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib ) +endif() +if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) + install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION include) +endif() +if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) + install(FILES zlib.3 DESTINATION share/man/man3) +endif() + +#============================================================================ +# Example binaries +#============================================================================ + +add_executable(example example.c) +target_link_libraries(example zlib) +add_test(example example) + +add_executable(minigzip minigzip.c) +target_link_libraries(minigzip zlib) + +if(HAVE_OFF64_T) + add_executable(example64 example.c) + target_link_libraries(example64 zlib) + set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + add_test(example64 example64) + + add_executable(minigzip64 minigzip.c) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") +endif() diff --git a/compat/zlib/ChangeLog b/compat/zlib/ChangeLog index e65d5b5..c73ed87 100644 --- a/compat/zlib/ChangeLog +++ b/compat/zlib/ChangeLog @@ -1,8 +1,280 @@ ChangeLog file for zlib -Changes in 1.2.3-f-tcl (19 Dec 2008) -- add symbols deflateSetHeader and inflateGetHeader to win32/zlib.def +Changes in 1.2.4 (14 Mar 2010) +- Fix VER3 extraction in configure for no fourth subversion +- Update zlib.3, add docs to Makefile.in to make .pdf out of it +- Add zlib.3.pdf to distribution +- Don't set error code in gzerror() if passed pointer is NULL +- Apply destination directory fixes to CMakeLists.txt [Lowman] +- Move #cmakedefine's to a new zconf.in.cmakein +- Restore zconf.h for builds that don't use configure or cmake +- Add distclean to dummy Makefile for convenience +- Update and improve INDEX, README, and FAQ +- Update CMakeLists.txt for the return of zconf.h [Lowman] +- Update contrib/vstudio/vc9 and vc10 [Vollant] +- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc +- Apply license and readme changes to contrib/asm686 [Raiter] +- Check file name lengths and add -c option in minigzip.c [Li] +- Update contrib/amd64 and contrib/masmx86/ [Vollant] +- Avoid use of "eof" parameter in trees.c to not shadow library variable +- Update make_vms.com for removal of zlibdefs.h [Zinser] +- Update assembler code and vstudio projects in contrib [Vollant] +- Remove outdated assembler code contrib/masm686 and contrib/asm586 +- Remove old vc7 and vc8 from contrib/vstudio +- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe] +- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open() +- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant] +- Remove *64 functions from win32/zlib.def (they're not 64-bit yet) +- Fix bug in void-returning vsprintf() case in gzwrite.c +- Fix name change from inflate.h in contrib/inflate86/inffas86.c +- Check if temporary file exists before removing in make_vms.com [Zinser] +- Fix make install and uninstall for --static option +- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta] +- Update readme.txt in contrib/masmx64 and masmx86 to assemble + +Changes in 1.2.3.9 (21 Feb 2010) +- Expunge gzio.c +- Move as400 build information to old +- Fix updates in contrib/minizip and contrib/vstudio +- Add const to vsnprintf test in configure to avoid warnings [Weigelt] +- Delete zconf.h (made by configure) [Weigelt] +- Change zconf.in.h to zconf.h.in per convention [Weigelt] +- Check for NULL buf in gzgets() +- Return empty string for gzgets() with len == 1 (like fgets()) +- Fix description of gzgets() in zlib.h for end-of-file, NULL return +- Update minizip to 1.1 [Vollant] +- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c +- Note in zlib.h that gzerror() should be used to distinguish from EOF +- Remove use of snprintf() from gzlib.c +- Fix bug in gzseek() +- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant] +- Fix zconf.h generation in CMakeLists.txt [Lowman] +- Improve comments in zconf.h where modified by configure + +Changes in 1.2.3.8 (13 Feb 2010) +- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer] +- Use z_off64_t in gz_zero() and gz_skip() to match state->skip +- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t) +- Revert to Makefile.in from 1.2.3.6 (live with the clutter) +- Fix missing error return in gzflush(), add zlib.h note +- Add *64 functions to zlib.map [Levin] +- Fix signed/unsigned comparison in gz_comp() +- Use SFLAGS when testing shared linking in configure +- Add --64 option to ./configure to use -m64 with gcc +- Fix ./configure --help to correctly name options +- Have make fail if a test fails [Levin] +- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson] +- Remove assembler object files from contrib + +Changes in 1.2.3.7 (24 Jan 2010) +- Always gzopen() with O_LARGEFILE if available +- Fix gzdirect() to work immediately after gzopen() or gzdopen() +- Make gzdirect() more precise when the state changes while reading +- Improve zlib.h documentation in many places +- Catch memory allocation failure in gz_open() +- Complete close operation if seek forward in gzclose_w() fails +- Return Z_ERRNO from gzclose_r() if close() fails +- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL +- Return zero for gzwrite() errors to match zlib.h description +- Return -1 on gzputs() error to match zlib.h description +- Add zconf.in.h to allow recovery from configure modification [Weigelt] +- Fix static library permissions in Makefile.in [Weigelt] +- Avoid warnings in configure tests that hide functionality [Weigelt] +- Add *BSD and DragonFly to Linux case in configure [gentoo 123571] +- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212] +- Avoid access of uninitialized data for first inflateReset2 call [Gomes] +- Keep object files in subdirectories to reduce the clutter somewhat +- Remove default Makefile and zlibdefs.h, add dummy Makefile +- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_ +- Remove zlibdefs.h completely -- modify zconf.h instead + +Changes in 1.2.3.6 (17 Jan 2010) +- Avoid void * arithmetic in gzread.c and gzwrite.c +- Make compilers happier with const char * for gz_error message +- Avoid unused parameter warning in inflate.c +- Avoid signed-unsigned comparison warning in inflate.c +- Indent #pragma's for traditional C +- Fix usage of strwinerror() in glib.c, change to gz_strwinerror() +- Correct email address in configure for system options +- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] +- Update zlib.map [Brown] +- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Tšršk] +- Apply various fixes to CMakeLists.txt [Lowman] +- Add checks on len in gzread() and gzwrite() +- Add error message for no more room for gzungetc() +- Remove zlib version check in gzwrite() +- Defer compression of gzprintf() result until need to +- Use snprintf() in gzdopen() if available +- Remove USE_MMAP configuration determination (only used by minigzip) +- Remove examples/pigz.c (available separately) +- Update examples/gun.c to 1.6 + +Changes in 1.2.3.5 (8 Jan 2010) +- Add space after #if in zutil.h for some compilers +- Fix relatively harmless bug in deflate_fast() [Exarevsky] +- Fix same problem in deflate_slow() +- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown] +- Add deflate_rle() for faster Z_RLE strategy run-length encoding +- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding +- Change name of "write" variable in inffast.c to avoid library collisions +- Fix premature EOF from gzread() in gzio.c [Brown] +- Use zlib header window size if windowBits is 0 in inflateInit2() +- Remove compressBound() call in deflate.c to avoid linking compress.o +- Replace use of errno in gz* with functions, support WinCE [Alves] +- Provide alternative to perror() in minigzip.c for WinCE [Alves] +- Don't use _vsnprintf on later versions of MSVC [Lowman] +- Add CMake build script and input file [Lowman] +- Update contrib/minizip to 1.1 [Svensson, Vollant] +- Moved nintendods directory from contrib to . +- Replace gzio.c with a new set of routines with the same functionality +- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above +- Update contrib/minizip to 1.1b +- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h + +Changes in 1.2.3.4 (21 Dec 2009) +- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility +- Update comments in configure and Makefile.in for default --shared +- Fix test -z's in configure [Marquess] +- Build examplesh and minigzipsh when not testing +- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h +- Import LDFLAGS from the environment in configure +- Fix configure to populate SFLAGS with discovered CFLAGS options +- Adapt make_vms.com to the new Makefile.in [Zinser] +- Add zlib2ansi script for C++ compilation [Marquess] +- Add _FILE_OFFSET_BITS=64 test to make test (when applicable) +- Add AMD64 assembler code for longest match to contrib [Teterin] +- Include options from $SFLAGS when doing $LDSHARED +- Simplify 64-bit file support by introducing z_off64_t type +- Make shared object files in objs directory to work around old Sun cc +- Use only three-part version number for Darwin shared compiles +- Add rc option to ar in Makefile.in for when ./configure not run +- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4* +- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile +- Protect against _FILE_OFFSET_BITS being defined when compiling zlib +- Rename Makefile.in targets allstatic to static and allshared to shared +- Fix static and shared Makefile.in targets to be independent +- Correct error return bug in gz_open() by setting state [Brown] +- Put spaces before ;;'s in configure for better sh compatibility +- Add pigz.c (parallel implementation of gzip) to examples/ +- Correct constant in crc32.c to UL [Leventhal] +- Reject negative lengths in crc32_combine() +- Add inflateReset2() function to work like inflateEnd()/inflateInit2() +- Include sys/types.h for _LARGEFILE64_SOURCE [Brown] +- Correct typo in doc/algorithm.txt [Janik] +- Fix bug in adler32_combine() [Zhu] +- Catch missing-end-of-block-code error in all inflates and in puff + Assures that random input to inflate eventually results in an error +- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/ +- Update ENOUGH and its usage to reflect discovered bounds +- Fix gzerror() error report on empty input file [Brown] +- Add ush casts in trees.c to avoid pedantic runtime errors +- Fix typo in zlib.h uncompress() description [Reiss] +- Correct inflate() comments with regard to automatic header detection +- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays) +- Put new version of gzlog (2.0) in examples with interruption recovery +- Add puff compile option to permit invalid distance-too-far streams +- Add puff TEST command options, ability to read piped input +- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but + _LARGEFILE64_SOURCE not defined +- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart +- Fix deflateSetDictionary() to use all 32K for output consistency +- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h) +- Clear bytes after deflate lookahead to avoid use of uninitialized data +- Change a limit in inftrees.c to be more transparent to Coverity Prevent +- Update win32/zlib.def with exported symbols from zlib.h +- Correct spelling error in zlib.h [Willem] +- Allow Z_BLOCK for deflate() to force a new block +- Allow negative bits in inflatePrime() to delete existing bit buffer +- Add Z_TREES flush option to inflate() to return at end of trees +- Add inflateMark() to return current state information for random access +- Add Makefile for NintendoDS to contrib [Costa] +- Add -w in configure compile tests to avoid spurious warnings [Beucler] +- Fix typos in zlib.h comments for deflateSetDictionary() +- Fix EOF detection in transparent gzread() [Maier] + +Changes in 1.2.3.3 (2 October 2006) +- Make --shared the default for configure, add a --static option +- Add compile option to permit invalid distance-too-far streams +- Add inflateUndermine() function which is required to enable above +- Remove use of "this" variable name for C++ compatibility [Marquess] +- Add testing of shared library in make test, if shared library built +- Use ftello() and fseeko() if available instead of ftell() and fseek() +- Provide two versions of all functions that use the z_off_t type for + binary compatibility -- a normal version and a 64-bit offset version, + per the Large File Support Extension when _LARGEFILE64_SOURCE is + defined; use the 64-bit versions by default when _FILE_OFFSET_BITS + is defined to be 64 +- Add a --uname= option to configure to perhaps help with cross-compiling + +Changes in 1.2.3.2 (3 September 2006) +- Turn off silly Borland warnings [Hay] +- Use off64_t and define _LARGEFILE64_SOURCE when present +- Fix missing dependency on inffixed.h in Makefile.in +- Rig configure --shared to build both shared and static [Teredesai, Truta] +- Remove zconf.in.h and instead create a new zlibdefs.h file +- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant] +- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt] + +Changes in 1.2.3.1 (16 August 2006) +- Add watcom directory with OpenWatcom make files [Daniel] +- Remove #undef of FAR in zconf.in.h for MVS [Fedtke] +- Update make_vms.com [Zinser] +- Use -fPIC for shared build in configure [Teredesai, Nicholson] +- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] +- Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck] +- Add some FAQ entries about the contrib directory +- Update the MVS question in the FAQ +- Avoid extraneous reads after EOF in gzio.c [Brown] +- Correct spelling of "successfully" in gzio.c [Randers-Pehrson] +- Add comments to zlib.h about gzerror() usage [Brown] +- Set extra flags in gzip header in gzopen() like deflate() does +- Make configure options more compatible with double-dash conventions + [Weigelt] +- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] +- Fix uninstall target in Makefile.in [Truta] +- Add pkgconfig support [Weigelt] +- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] +- Replace set_data_type() with a more accurate detect_data_type() in + trees.c, according to the txtvsbin.txt document [Truta] +- Swap the order of #include and #include "zlib.h" in + gzio.c, example.c and minigzip.c [Truta] +- Shut up annoying VS2005 warnings about standard C deprecation [Rowe, + Truta] (where?) +- Fix target "clean" from win32/Makefile.bor [Truta] +- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] +- Update zlib www home address in win32/DLL_FAQ.txt [Truta] +- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] +- Enable browse info in the "Debug" and "ASM Debug" configurations in + the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] +- Add pkgconfig support [Weigelt] +- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, + for use in win32/zlib1.rc [Polushin, Rowe, Truta] +- Add a document that explains the new text detection scheme to + doc/txtvsbin.txt [Truta] +- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] +- Move algorithm.txt into doc/ [Truta] +- Synchronize FAQ with website +- Fix compressBound(), was low for some pathological cases [Fearnley] +- Take into account wrapper variations in deflateBound() +- Set examples/zpipe.c input and output to binary mode for Windows +- Update examples/zlib_how.html with new zpipe.c (also web site) +- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems + that gcc became pickier in 4.0) +- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain + un-versioned, the patch adds versioning only for symbols introduced in + zlib-1.2.0 or later. It also declares as local those symbols which are + not designed to be exported." [Levin] +- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure +- Do not initialize global static by default in trees.c, add a response + NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] +- Don't use strerror() in gzio.c under WinCE [Yakimov] +- Don't use errno.h in zutil.h under WinCE [Yakimov] +- Move arguments for AR to its usage to allow replacing ar [Marot] +- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] +- Improve inflateInit() and inflateInit2() documentation +- Fix structure size comment in inflate.h +- Change configure help option from --h* to --help [Santos] Changes in 1.2.3 (18 July 2005) - Apply security vulnerability fixes to contrib/infback9 as well @@ -16,7 +288,7 @@ Changes in 1.2.2.4 (11 July 2005) compile - Fix some spelling errors in comments [Betts] - Correct inflateInit2() error return documentation in zlib.h -- Added zran.c example of compressed data random access to examples +- Add zran.c example of compressed data random access to examples directory, shows use of inflatePrime() - Fix cast for assignments to strm->state in inflate.c and infback.c - Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer] @@ -602,7 +874,7 @@ Changes in 1.0.6 (19 Jan 1998) - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) - added makelcc.bat for lcc-win32 (Tom St Denis) - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id: ChangeLog,v 1.2 2008/12/19 09:14:03 nijtmans Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- Avoid expanded $Id: ChangeLog,v 1.3 2010/03/16 09:01:04 nijtmans Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. - check for unistd.h in configure (for off_t) - remove useless check parameter in inflate_blocks_free - avoid useless assignment of s->check to itself in inflate_blocks_new diff --git a/compat/zlib/FAQ b/compat/zlib/FAQ index 441d910..1a22750 100644 --- a/compat/zlib/FAQ +++ b/compat/zlib/FAQ @@ -3,8 +3,8 @@ If your question is not there, please check the zlib home page -http://www.zlib.org which may have more recent information. -The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html +http://zlib.net/ which may have more recent information. +The lastest zlib FAQ is at http://zlib.net/zlib_faq.html 1. Is zlib Y2K-compliant? @@ -13,54 +13,51 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 2. Where can I get a Windows DLL version? - The zlib sources can be compiled without change to produce a DLL. - See the file win32/DLL_FAQ.txt in the zlib distribution. - Pointers to the precompiled DLL are found in the zlib web site at - http://www.zlib.org. + The zlib sources can be compiled without change to produce a DLL. See the + file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the + precompiled DLL are found in the zlib web site at http://zlib.net/ . 3. Where can I get a Visual Basic interface to zlib? See - * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm - * contrib/visual-basic.txt in the zlib distribution + * http://marknelson.us/1997/01/01/zlib-engine/ * win32/DLL_FAQ.txt in the zlib distribution 4. compress() returns Z_BUF_ERROR. - Make sure that before the call of compress, the length of the compressed - buffer is equal to the total size of the compressed buffer and not - zero. For Visual Basic, check that this parameter is passed by reference + Make sure that before the call of compress(), the length of the compressed + buffer is equal to the available size of the compressed buffer and not + zero. For Visual Basic, check that this parameter is passed by reference ("as any"), not by value ("as long"). 5. deflate() or inflate() returns Z_BUF_ERROR. - Before making the call, make sure that avail_in and avail_out are not - zero. When setting the parameter flush equal to Z_FINISH, also make sure - that avail_out is big enough to allow processing all pending input. - Note that a Z_BUF_ERROR is not fatal--another call to deflate() or - inflate() can be made with more input or output space. A Z_BUF_ERROR - may in fact be unavoidable depending on how the functions are used, since - it is not possible to tell whether or not there is more output pending - when strm.avail_out returns with zero. + Before making the call, make sure that avail_in and avail_out are not zero. + When setting the parameter flush equal to Z_FINISH, also make sure that + avail_out is big enough to allow processing all pending input. Note that a + Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be + made with more input or output space. A Z_BUF_ERROR may in fact be + unavoidable depending on how the functions are used, since it is not + possible to tell whether or not there is more output pending when + strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a + heavily annotated example. 6. Where's the zlib documentation (man pages, etc.)? - It's in zlib.h for the moment, and Francis S. Lin has converted it to a - web page zlib.html. Volunteers to transform this to Unix-style man pages, - please contact us (zlib@gzip.org). Examples of zlib usage are in the files - example.c and minigzip.c. + It's in zlib.h . Examples of zlib usage are in the files example.c and + minigzip.c, with more in examples/ . 7. Why don't you use GNU autoconf or libtool or ...? - Because we would like to keep zlib as a very small and simple - package. zlib is rather portable and doesn't need much configuration. + Because we would like to keep zlib as a very small and simple package. + zlib is rather portable and doesn't need much configuration. 8. I found a bug in zlib. - Most of the time, such problems are due to an incorrect usage of - zlib. Please try to reproduce the problem with a small program and send - the corresponding source to us at zlib@gzip.org . Do not send - multi-megabyte data files without prior agreement. + Most of the time, such problems are due to an incorrect usage of zlib. + Please try to reproduce the problem with a small program and send the + corresponding source to us at zlib@gzip.org . Do not send multi-megabyte + data files without prior agreement. 9. Why do I get "undefined reference to gzputc"? @@ -82,7 +79,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 12. Can zlib handle .Z files? - No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt + No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt the code of uncompress on your own. 13. How can I make a Unix shared library? @@ -99,8 +96,10 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html However, many flavors of Unix come with a shared zlib already installed. Before going to the trouble of compiling a shared version of zlib and - trying to install it, you may want to check if it's already there! If you - can #include , it's there. The -lz option will probably link to it. + trying to install it, you may want to check if it's already there! If you + can #include , it's there. The -lz option will probably link to + it. You can check the version at the top of zlib.h or with the + ZLIB_VERSION symbol defined in zlib.h . 15. I have a question about OttoPDF. @@ -109,8 +108,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 16. Can zlib decode Flate data in an Adobe PDF file? - Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ . - To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ . + Yes. See http://www.pdflib.com/ . To modify PDF forms, see + http://sourceforge.net/projects/acroformtool/ . 17. Why am I getting this "register_frame_info not found" error on Solaris? @@ -121,67 +120,67 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html symbol __register_frame_info: referenced symbol not found The symbol __register_frame_info is not part of zlib, it is generated by - the C compiler (cc or gcc). You must recompile applications using zlib - which have this problem. This problem is specific to Solaris. See + the C compiler (cc or gcc). You must recompile applications using zlib + which have this problem. This problem is specific to Solaris. See http://www.sunfreeware.com for Solaris versions of zlib and applications using zlib. 18. Why does gzip give an error on a file I make with compress/deflate? The compress and deflate functions produce data in the zlib format, which - is different and incompatible with the gzip format. The gz* functions in - zlib on the other hand use the gzip format. Both the zlib and gzip - formats use the same compressed data format internally, but have different - headers and trailers around the compressed data. + is different and incompatible with the gzip format. The gz* functions in + zlib on the other hand use the gzip format. Both the zlib and gzip formats + use the same compressed data format internally, but have different headers + and trailers around the compressed data. 19. Ok, so why are there two different formats? - The gzip format was designed to retain the directory information about - a single file, such as the name and last modification date. The zlib - format on the other hand was designed for in-memory and communication - channel applications, and has a much more compact header and trailer and - uses a faster integrity check than gzip. + The gzip format was designed to retain the directory information about a + single file, such as the name and last modification date. The zlib format + on the other hand was designed for in-memory and communication channel + applications, and has a much more compact header and trailer and uses a + faster integrity check than gzip. 20. Well that's nice, but how do I make a gzip file in memory? You can request that deflate write the gzip format instead of the zlib - format using deflateInit2(). You can also request that inflate decode - the gzip format using inflateInit2(). Read zlib.h for more details. + format using deflateInit2(). You can also request that inflate decode the + gzip format using inflateInit2(). Read zlib.h for more details. 21. Is zlib thread-safe? - Yes. However any library routines that zlib uses and any application- - provided memory allocation routines must also be thread-safe. zlib's gz* + Yes. However any library routines that zlib uses and any application- + provided memory allocation routines must also be thread-safe. zlib's gz* functions use stdio library routines, and most of zlib's functions use the - library memory allocation routines by default. zlib's Init functions allow - for the application to provide custom memory allocation routines. + library memory allocation routines by default. zlib's *Init* functions + allow for the application to provide custom memory allocation routines. Of course, you should only operate on any given zlib or gzip stream from a single thread at a time. 22. Can I use zlib in my commercial application? - Yes. Please read the license in zlib.h. + Yes. Please read the license in zlib.h. 23. Is zlib under the GNU license? - No. Please read the license in zlib.h. + No. Please read the license in zlib.h. 24. The license says that altered source versions must be "plainly marked". So what exactly do I need to do to meet that requirement? - You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In + You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In particular, the final version number needs to be changed to "f", and an - identification string should be appended to ZLIB_VERSION. Version numbers + identification string should be appended to ZLIB_VERSION. Version numbers x.x.x.f are reserved for modifications to zlib by others than the zlib - maintainers. For example, if the version of the base zlib you are altering + maintainers. For example, if the version of the base zlib you are altering is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and - ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also + ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also update the version strings in deflate.c and inftrees.c. For altered source distributions, you should also note the origin and nature of the changes in zlib.h, as well as in ChangeLog and README, along - with the dates of the alterations. The origin should include at least your + with the dates of the alterations. The origin should include at least your name (or your company's name), and an email address to contact for help or issues with the library. @@ -197,105 +196,112 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 26. Will zlib work on a 64-bit machine? - It should. It has been tested on 64-bit machines, and has no dependence - on any data types being limited to 32-bits in length. If you have any + Yes. It has been tested on 64-bit machines, and has no dependence on any + data types being limited to 32-bits in length. If you have any difficulties, please provide a complete problem report to zlib@gzip.org 27. Will zlib decompress data from the PKWare Data Compression Library? - No. The PKWare DCL uses a completely different compressed data format - than does PKZIP and zlib. However, you can look in zlib's contrib/blast + No. The PKWare DCL uses a completely different compressed data format than + does PKZIP and zlib. However, you can look in zlib's contrib/blast directory for a possible solution to your problem. 28. Can I access data randomly in a compressed stream? - No, not without some preparation. If when compressing you periodically - use Z_FULL_FLUSH, carefully write all the pending data at those points, - and keep an index of those locations, then you can start decompression - at those points. You have to be careful to not use Z_FULL_FLUSH too - often, since it can significantly degrade compression. + No, not without some preparation. If when compressing you periodically use + Z_FULL_FLUSH, carefully write all the pending data at those points, and + keep an index of those locations, then you can start decompression at those + points. You have to be careful to not use Z_FULL_FLUSH too often, since it + can significantly degrade compression. Alternatively, you can scan a + deflate stream once to generate an index, and then use that index for + random access. See examples/zran.c . 29. Does zlib work on MVS, OS/390, CICS, etc.? - We don't know for sure. We have heard occasional reports of success on - these systems. If you do use it on one of these, please provide us with - a report, instructions, and patches that we can reference when we get - these questions. Thanks. + It has in the past, but we have not heard of any recent evidence. There + were working ports of zlib 1.1.4 to MVS, but those links no longer work. + If you know of recent, successful applications of zlib on these operating + systems, please let us know. Thanks. -30. Is there some simpler, easier to read version of inflate I can look at - to understand the deflate format? +30. Is there some simpler, easier to read version of inflate I can look at to + understand the deflate format? - First off, you should read RFC 1951. Second, yes. Look in zlib's + First off, you should read RFC 1951. Second, yes. Look in zlib's contrib/puff directory. 31. Does zlib infringe on any patents? - As far as we know, no. In fact, that was originally the whole point behind - zlib. Look here for some more information: + As far as we know, no. In fact, that was originally the whole point behind + zlib. Look here for some more information: http://www.gzip.org/#faq11 32. Can zlib work with greater than 4 GB of data? - Yes. inflate() and deflate() will process any amount of data correctly. + Yes. inflate() and deflate() will process any amount of data correctly. Each call of inflate() or deflate() is limited to input and output chunks of the maximum value that can be stored in the compiler's "unsigned int" - type, but there is no limit to the number of chunks. Note however that the - strm.total_in and strm_total_out counters may be limited to 4 GB. These + type, but there is no limit to the number of chunks. Note however that the + strm.total_in and strm_total_out counters may be limited to 4 GB. These counters are provided as a convenience and are not used internally by - inflate() or deflate(). The application can easily set up its own counters + inflate() or deflate(). The application can easily set up its own counters updated after each call of inflate() or deflate() to count beyond 4 GB. compress() and uncompress() may be limited to 4 GB, since they operate in a - single call. gzseek() and gztell() may be limited to 4 GB depending on how - zlib is compiled. See the zlibCompileFlags() function in zlib.h. + single call. gzseek() and gztell() may be limited to 4 GB depending on how + zlib is compiled. See the zlibCompileFlags() function in zlib.h. - The word "may" appears several times above since there is a 4 GB limit - only if the compiler's "long" type is 32 bits. If the compiler's "long" - type is 64 bits, then the limit is 16 exabytes. + The word "may" appears several times above since there is a 4 GB limit only + if the compiler's "long" type is 32 bits. If the compiler's "long" type is + 64 bits, then the limit is 16 exabytes. 33. Does zlib have any security vulnerabilities? - The only one that we are aware of is potentially in gzprintf(). If zlib - is compiled to use sprintf() or vsprintf(), then there is no protection - against a buffer overflow of a 4K string space, other than the caller of - gzprintf() assuring that the output will not exceed 4K. On the other - hand, if zlib is compiled to use snprintf() or vsnprintf(), which should - normally be the case, then there is no vulnerability. The ./configure - script will display warnings if an insecure variation of sprintf() will - be used by gzprintf(). Also the zlibCompileFlags() function will return - information on what variant of sprintf() is used by gzprintf(). + The only one that we are aware of is potentially in gzprintf(). If zlib is + compiled to use sprintf() or vsprintf(), then there is no protection + against a buffer overflow of an 8K string space (or other value as set by + gzbuffer()), other than the caller of gzprintf() assuring that the output + will not exceed 8K. On the other hand, if zlib is compiled to use + snprintf() or vsnprintf(), which should normally be the case, then there is + no vulnerability. The ./configure script will display warnings if an + insecure variation of sprintf() will be used by gzprintf(). Also the + zlibCompileFlags() function will return information on what variant of + sprintf() is used by gzprintf(). If you don't have snprintf() or vsnprintf() and would like one, you can find a portable implementation here: http://www.ijs.si/software/snprintf/ - Note that you should be using the most recent version of zlib. Versions - 1.1.3 and before were subject to a double-free vulnerability. + Note that you should be using the most recent version of zlib. Versions + 1.1.3 and before were subject to a double-free vulnerability, and versions + 1.2.1 and 1.2.2 were subject to an access exception when decompressing + invalid compressed data. 34. Is there a Java version of zlib? Probably what you want is to use zlib in Java. zlib is already included as part of the Java SDK in the java.util.zip package. If you really want a version of zlib written in the Java language, look on the zlib home - page for links: http://www.zlib.org/ + page for links: http://zlib.net/ . 35. I get this or that compiler or source-code scanner warning when I crank it up to maximally-pedantic. Can't you guys write proper code? Many years ago, we gave up attempting to avoid warnings on every compiler - in the universe. It just got to be a waste of time, and some compilers - were downright silly. So now, we simply make sure that the code always - works. + in the universe. It just got to be a waste of time, and some compilers + were downright silly as well as contradicted each other. So now, we simply + make sure that the code always works. 36. Valgrind (or some similar memory access checker) says that deflate is performing a conditional jump that depends on an uninitialized value. Isn't that a bug? - No. That is intentional for performance reasons, and the output of - deflate is not affected. This only started showing up recently since - zlib 1.2.x uses malloc() by default for allocations, whereas earlier - versions used calloc(), which zeros out the allocated memory. + No. That is intentional for performance reasons, and the output of deflate + is not affected. This only started showing up recently since zlib 1.2.x + uses malloc() by default for allocations, whereas earlier versions used + calloc(), which zeros out the allocated memory. Even though the code was + correct, versions 1.2.4 and later was changed to not stimulate these + checkers. 37. Will zlib read the (insert any ancient or arcane format here) compressed data format? @@ -305,20 +311,21 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 38. How can I encrypt/decrypt zip files with zlib? - zlib doesn't support encryption. The original PKZIP encryption is very weak - and can be broken with freely available programs. To get strong encryption, - use GnuPG, http://www.gnupg.org/ , which already includes zlib compression. - For PKZIP compatible "encryption", look at http://www.info-zip.org/ + zlib doesn't support encryption. The original PKZIP encryption is very + weak and can be broken with freely available programs. To get strong + encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib + compression. For PKZIP compatible "encryption", look at + http://www.info-zip.org/ 39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings? - "gzip" is the gzip format, and "deflate" is the zlib format. They should - probably have called the second one "zlib" instead to avoid confusion - with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 + "gzip" is the gzip format, and "deflate" is the zlib format. They should + probably have called the second one "zlib" instead to avoid confusion with + the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 correctly points to the zlib specification in RFC 1950 for the "deflate" transfer encoding, there have been reports of servers and browsers that incorrectly produce or expect raw deflate data per the deflate - specficiation in RFC 1951, most notably Microsoft. So even though the + specficiation in RFC 1951, most notably Microsoft. So even though the "deflate" transfer encoding using the zlib format would be the more efficient approach (and in fact exactly what the zlib format was designed for), using the "gzip" transfer encoding is probably more reliable due to @@ -328,12 +335,32 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html 40. Does zlib support the new "Deflate64" format introduced by PKWare? - No. PKWare has apparently decided to keep that format proprietary, since - they have not documented it as they have previous compression formats. - In any case, the compression improvements are so modest compared to other - more modern approaches, that it's not worth the effort to implement. + No. PKWare has apparently decided to keep that format proprietary, since + they have not documented it as they have previous compression formats. In + any case, the compression improvements are so modest compared to other more + modern approaches, that it's not worth the effort to implement. -41. Can you please sign these lengthy legal documents and fax them back to us +41. I'm having a problem with the zip functions in zlib, can you help? + + There are no zip functions in zlib. You are probably using minizip by + Giles Vollant, which is found in the contrib directory of zlib. It is not + part of zlib. In fact none of the stuff in contrib is part of zlib. The + files in there are not supported by the zlib authors. You need to contact + the authors of the respective contribution for help. + +42. The match.asm code in contrib is under the GNU General Public License. + Since it's part of zlib, doesn't that mean that all of zlib falls under the + GNU GPL? + + No. The files in contrib are not part of zlib. They were contributed by + other authors and are provided as a convenience to the user within the zlib + distribution. Each item in contrib has its own license. + +43. Is zlib subject to export controls? What is its ECCN? + + zlib is not subject to export controls, and so is classified as EAR99. + +44. Can you please sign these lengthy legal documents and fax them back to us so that we can use your software in our product? No. Go away. Shoo. diff --git a/compat/zlib/INDEX b/compat/zlib/INDEX index 0587e59..f66bf9b 100644 --- a/compat/zlib/INDEX +++ b/compat/zlib/INDEX @@ -1,23 +1,33 @@ +CMakeLists.txt cmake build file ChangeLog history of changes FAQ Frequently Asked Questions about zlib INDEX this file -Makefile makefile for Unix (generated by configure) -Makefile.in makefile for Unix (template for configure) +Makefile dummy Makefile that tells you to ./configure +Makefile.in template for Unix Makefile README guess what -algorithm.txt description of the (de)compression algorithm configure configure script for Unix -zconf.in.h template for zconf.h (used by configure) +make_vms.com makefile for VMS +treebuild.xml XML description of source file dependencies +zconf.h.cmakein zconf.h template for cmake +zconf.h.in zconf.h template for configure +zlib.3 Man page for zlib +zlib.3.pdf Man page in PDF format +zlib.map Linux symbol information +zlib.pc.in Template for pkg-config descriptor +zlib2ansi perl script to convert source files for C++ compilation amiga/ makefiles for Amiga SAS C -as400/ makefiles for IBM AS/400 +doc/ documentation for formats and algorithms msdos/ makefiles for MSDOS +nintendods/ makefile for Nintendo DS old/ makefiles for various architectures and zlib documentation files that have not yet been updated for zlib 1.2.x projects/ projects for various Integrated Development Environments qnx/ makefiles for QNX +watcom/ makefiles for OpenWatcom win32/ makefiles for Windows - zlib public header files (must be kept): + zlib public header files (required for library use): zconf.h zlib.h @@ -28,7 +38,11 @@ crc32.c crc32.h deflate.c deflate.h -gzio.c +gzclose.c +gzguts.h +gzlib.c +gzread.c +gzwrite.c infback.c inffast.c inffast.h @@ -46,6 +60,7 @@ zutil.h source files for sample programs: example.c minigzip.c +See examples/README.examples for more unsupported contribution by third parties See contrib/README.contrib diff --git a/compat/zlib/Makefile b/compat/zlib/Makefile index 2fd6e45..6bba86c 100644 --- a/compat/zlib/Makefile +++ b/compat/zlib/Makefile @@ -1,154 +1,5 @@ -# Makefile for zlib -# Copyright (C) 1995-2005 Jean-loup Gailly. -# For conditions of distribution and use, see copyright notice in zlib.h +all: + -@echo "Please use ./configure first. Thank you." -# To compile and test, type: -# ./configure; make test -# The call of configure is optional if you don't have special requirements -# If you wish to build zlib as a shared library, use: ./configure -s - -# To use the asm code, type: -# cp contrib/asm?86/match.S ./match.S -# make LOC=-DASMV OBJA=match.o - -# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: -# make install -# To install in $HOME instead of /usr/local, use: -# make install prefix=$HOME - -CC=cc - -CFLAGS=-O -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 -#CFLAGS=-g -DDEBUG -#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ -# -Wstrict-prototypes -Wmissing-prototypes - -LDFLAGS=libz.a -LDSHARED=$(CC) -CPP=$(CC) -E - -LIBS=libz.a -SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.2.3 -SHAREDLIBM=libz.so.1 - -AR=ar rc -RANLIB=ranlib -TAR=tar -SHELL=/bin/sh -EXE= - -prefix = /usr/local -exec_prefix = ${prefix} -libdir = ${exec_prefix}/lib -includedir = ${prefix}/include -mandir = ${prefix}/share/man -man3dir = ${mandir}/man3 - -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infback.o inftrees.o inffast.o - -OBJA = -# to use the asm code: make OBJA=match.o - -TEST_OBJS = example.o minigzip.o - -all: example$(EXE) minigzip$(EXE) - -check: test -test: all - @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - echo hello world | ./minigzip | ./minigzip -d || \ - echo ' *** minigzip test FAILED ***' ; \ - if ./example; then \ - echo ' *** zlib test OK ***'; \ - else \ - echo ' *** zlib test FAILED ***'; \ - fi - -libz.a: $(OBJS) $(OBJA) - $(AR) $@ $(OBJS) $(OBJA) - -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 - -match.o: match.S - $(CPP) match.S > _match.s - $(CC) -c _match.s - mv _match.o match.o - rm -f _match.s - -$(SHAREDLIBV): $(OBJS) - $(LDSHARED) -o $@ $(OBJS) - rm -f $(SHAREDLIB) $(SHAREDLIBM) - ln -s $@ $(SHAREDLIB) - ln -s $@ $(SHAREDLIBM) - -example$(EXE): example.o $(LIBS) - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) - -minigzip$(EXE): minigzip.o $(LIBS) - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) - -install: $(LIBS) - -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi - -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi - -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi - -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi - cp zlib.h zconf.h $(includedir) - chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h - cp $(LIBS) $(libdir) - cd $(libdir); chmod 755 $(LIBS) - -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 - cd $(libdir); if test -f $(SHAREDLIBV); then \ - rm -f $(SHAREDLIB) $(SHAREDLIBM); \ - ln -s $(SHAREDLIBV) $(SHAREDLIB); \ - ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ - (ldconfig || true) >/dev/null 2>&1; \ - fi - cp zlib.3 $(man3dir) - chmod 644 $(man3dir)/zlib.3 -# The ranlib in install is needed on NeXTSTEP which checks file times -# ldconfig is for Linux - -uninstall: - cd $(includedir); \ - cd $(libdir); rm -f libz.a; \ - if test -f $(SHAREDLIBV); then \ - rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ - fi - cd $(man3dir); rm -f zlib.3 - -mostlyclean: clean -clean: - rm -f *.o *~ example$(EXE) minigzip$(EXE) \ - libz.* foo.gz so_locations \ - _match.s maketree contrib/infback9/*.o - -maintainer-clean: distclean -distclean: clean - cp -p Makefile.in Makefile - cp -p zconf.in.h zconf.h - rm -f .DS_Store - -tags: - etags *.[ch] - -depend: - makedepend -- $(CFLAGS) -- *.[ch] - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: crc32.h zlib.h zconf.h -deflate.o: deflate.h zutil.h zlib.h zconf.h -example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h -inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inftrees.o: zutil.h zlib.h zconf.h inftrees.h -minigzip.o: zlib.h zconf.h -trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h +distclean: + make -f Makefile.in distclean diff --git a/compat/zlib/Makefile.in b/compat/zlib/Makefile.in index 2fd6e45..5a2300a 100644 --- a/compat/zlib/Makefile.in +++ b/compat/zlib/Makefile.in @@ -1,11 +1,11 @@ # Makefile for zlib -# Copyright (C) 1995-2005 Jean-loup Gailly. +# Copyright (C) 1995-2010 Jean-loup Gailly. # For conditions of distribution and use, see copyright notice in zlib.h # To compile and test, type: # ./configure; make test -# The call of configure is optional if you don't have special requirements -# If you wish to build zlib as a shared library, use: ./configure -s +# Normally configure builds both a static and a shared library. +# If you want to build just a static library, use: ./configure --static # To use the asm code, type: # cp contrib/asm?86/match.S ./match.S @@ -24,14 +24,17 @@ CFLAGS=-O #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ # -Wstrict-prototypes -Wmissing-prototypes -LDFLAGS=libz.a +SFLAGS=-O + +LDFLAGS=-L. libz.a LDSHARED=$(CC) CPP=$(CC) -E -LIBS=libz.a +STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.2.3 +SHAREDLIBV=libz.so.1.2.4 SHAREDLIBM=libz.so.1 +LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV) AR=ar rc RANLIB=ranlib @@ -45,30 +48,64 @@ libdir = ${exec_prefix}/lib includedir = ${prefix}/include mandir = ${prefix}/share/man man3dir = ${mandir}/man3 +pkgconfigdir = ${libdir}/pkgconfig + +OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infback.o inftrees.o inffast.o +PIC_OBJC = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo \ + gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo +# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo OBJA = -# to use the asm code: make OBJA=match.o +PIC_OBJA = + +OBJS = $(OBJC) $(OBJA) + +PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA) -TEST_OBJS = example.o minigzip.o +all: static shared -all: example$(EXE) minigzip$(EXE) +static: example$(EXE) minigzip$(EXE) + +shared: examplesh$(EXE) minigzipsh$(EXE) + +all64: example64$(EXE) minigzip64$(EXE) check: test -test: all - @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ - echo hello world | ./minigzip | ./minigzip -d || \ - echo ' *** minigzip test FAILED ***' ; \ - if ./example; then \ + +test: all teststatic testshared + +teststatic: static + @if echo hello world | ./minigzip | ./minigzip -d && ./example; then \ echo ' *** zlib test OK ***'; \ else \ - echo ' *** zlib test FAILED ***'; \ + echo ' *** zlib test FAILED ***'; false; \ fi + -@rm -f foo.gz + +testshared: shared + @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ + LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ + DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ + SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \ + if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh; then \ + echo ' *** zlib shared test OK ***'; \ + else \ + echo ' *** zlib shared test FAILED ***'; false; \ + fi + -@rm -f foo.gz -libz.a: $(OBJS) $(OBJA) - $(AR) $@ $(OBJS) $(OBJA) +test64: all64 + @if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64; then \ + echo ' *** zlib 64-bit test OK ***'; \ + else \ + echo ' *** zlib 64-bit test FAILED ***'; false; \ + fi + -@rm -f foo.gz + +libz.a: $(OBJS) + $(AR) $@ $(OBJS) -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 match.o: match.S @@ -77,58 +114,114 @@ match.o: match.S mv _match.o match.o rm -f _match.s -$(SHAREDLIBV): $(OBJS) - $(LDSHARED) -o $@ $(OBJS) +match.lo: match.S + $(CPP) match.S > _match.s + $(CC) -c -fPIC _match.s + mv _match.o match.lo + rm -f _match.s + +example64.o: example.c zlib.h zconf.h + $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ example.c + +minigzip64.o: minigzip.c zlib.h zconf.h + $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ minigzip.c + +.SUFFIXES: .lo + +.c.lo: + -@if [ ! -d objs ]; then mkdir objs; fi + $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $< + -@mv objs/$*.o $@ + +$(SHAREDLIBV): $(PIC_OBJS) + $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc rm -f $(SHAREDLIB) $(SHAREDLIBM) ln -s $@ $(SHAREDLIB) ln -s $@ $(SHAREDLIBM) + -@rmdir objs -example$(EXE): example.o $(LIBS) +example$(EXE): example.o $(STATICLIB) $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -minigzip$(EXE): minigzip.o $(LIBS) +minigzip$(EXE): minigzip.o $(STATICLIB) $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -install: $(LIBS) - -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi - -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi - -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi - -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi - cp zlib.h zconf.h $(includedir) - chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h - cp $(LIBS) $(libdir) - cd $(libdir); chmod 755 $(LIBS) - -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 - cd $(libdir); if test -f $(SHAREDLIBV); then \ +examplesh$(EXE): example.o $(SHAREDLIBV) + $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) + +minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) + $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) + +example64$(EXE): example64.o $(STATICLIB) + $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS) + +minigzip64$(EXE): minigzip64.o $(STATICLIB) + $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS) + +install-libs: $(LIBS) + -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi + -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi + -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi + -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi + cp $(LIBS) $(DESTDIR)$(libdir) + cd $(DESTDIR)$(libdir); chmod u=rw,go=r $(STATICLIB) + -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 + -@cd $(DESTDIR)$(libdir); if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ + chmod 755 $(SHAREDLIBV); \ rm -f $(SHAREDLIB) $(SHAREDLIBM); \ ln -s $(SHAREDLIBV) $(SHAREDLIB); \ ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ (ldconfig || true) >/dev/null 2>&1; \ fi - cp zlib.3 $(man3dir) - chmod 644 $(man3dir)/zlib.3 + cp zlib.3 $(DESTDIR)$(man3dir) + chmod 644 $(DESTDIR)$(man3dir)/zlib.3 + cp zlib.pc $(DESTDIR)$(pkgconfigdir) + chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc # The ranlib in install is needed on NeXTSTEP which checks file times # ldconfig is for Linux +install: install-libs + -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi + cp zlib.h zconf.h $(DESTDIR)$(includedir) + chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h + uninstall: - cd $(includedir); \ - cd $(libdir); rm -f libz.a; \ - if test -f $(SHAREDLIBV); then \ + cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h + cd $(DESTDIR)$(libdir); rm -f libz.a; \ + if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ fi - cd $(man3dir); rm -f zlib.3 + cd $(DESTDIR)$(man3dir); rm -f zlib.3 + cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc + +docs: zlib.3.pdf + +zlib.3.pdf: zlib.3 + groff -mandoc -f H -T ps zlib.3 | ps2pdf - zlib.3.pdf + +zconf.h.in: zconf.h.cmakein + sed "/^#cmakedefine/D" < zconf.h.cmakein > zconf.h.in + touch -r zconf.h.cmakein zconf.h.in + +zconf: zconf.h.in + cp -p zconf.h.in zconf.h mostlyclean: clean clean: - rm -f *.o *~ example$(EXE) minigzip$(EXE) \ + rm -f *.o *.lo *~ \ + example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ + example64$(EXE) minigzip64$(EXE) \ libz.* foo.gz so_locations \ _match.s maketree contrib/infback9/*.o + rm -rf objs maintainer-clean: distclean -distclean: clean - cp -p Makefile.in Makefile - cp -p zconf.in.h zconf.h - rm -f .DS_Store +distclean: clean zconf docs + rm -f Makefile zlib.pc + -@rm -f .DS_Store + -@printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile + -@printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile + -@touch -r Makefile.in Makefile tags: etags *.[ch] @@ -138,17 +231,22 @@ depend: # DO NOT DELETE THIS LINE -- make depend depends on it. -adler32.o: zlib.h zconf.h -compress.o: zlib.h zconf.h -crc32.o: crc32.h zlib.h zconf.h +adler32.o zutil.o: zutil.h zlib.h zconf.h +gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h +compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h +crc32.o: zutil.h zlib.h zconf.h crc32.h deflate.o: deflate.h zutil.h zlib.h zconf.h -example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h +infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h -infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inftrees.o: zutil.h zlib.h zconf.h inftrees.h -minigzip.o: zlib.h zconf.h trees.o: deflate.h zutil.h zlib.h zconf.h trees.h -uncompr.o: zlib.h zconf.h -zutil.o: zutil.h zlib.h zconf.h + +adler32.lo zutil.lo: zutil.h zlib.h zconf.h +gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h +compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h +crc32.lo: zutil.h zlib.h zconf.h crc32.h +deflate.lo: deflate.h zutil.h zlib.h zconf.h +infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h +inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h +inftrees.lo: zutil.h zlib.h zconf.h inftrees.h +trees.lo: deflate.h zutil.h zlib.h zconf.h trees.h diff --git a/compat/zlib/README b/compat/zlib/README index 3ebffb0..f24aeee 100644 --- a/compat/zlib/README +++ b/compat/zlib/README @@ -1,56 +1,51 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.3.f-tcl is a general purpose data compression library. All the code is +zlib 1.2.4 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) -and rfc1952.txt (gzip format). These documents are also available in other -formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html +and rfc1952.txt (gzip format). All functions of the compression library are documented in the file zlib.h -(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example +(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example of the library is given in the file example.c which also tests that the library -is working correctly. Another example is given in the file minigzip.c. The +is working correctly. Another example is given in the file minigzip.c. The compression library itself is composed of all source files except example.c and minigzip.c. To compile all files and run the test program, follow the instructions given at -the top of Makefile. In short "make test; make install" should work for most -machines. For Unix: "./configure; make test; make install". For MSDOS, use one -of the special makefiles such as Makefile.msc. For VMS, use make_vms.com. +the top of Makefile.in. In short "./configure; make test", and if that goes +well, "make install" should work for most flavors of Unix. For Windows, use one +of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com. Questions about zlib should be sent to , or to Gilles Vollant - for the Windows DLL version. The zlib home page is -http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem, -please check this site to verify that you have the latest version of zlib; -otherwise get the latest version and check whether the problem still exists or -not. + for the Windows DLL version. The zlib home page is +http://zlib.net/ . Before reporting a problem, please check this site to +verify that you have the latest version of zlib; otherwise get the latest +version and check whether the problem still exists or not. -PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking -for help. +PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. -Mark Nelson wrote an article about zlib for the Jan. 1997 -issue of Dr. Dobb's Journal; a copy of the article is available in -http://dogma.net/markn/articles/zlibtool/zlibtool.htm +Mark Nelson wrote an article about zlib for the Jan. 1997 +issue of Dr. Dobb's Journal; a copy of the article is available at +http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.3.f-tcl are documented in the file ChangeLog. +The changes made in version 1.2.4 are documented in the file ChangeLog. -Unsupported third party contributions are provided in directory "contrib". +Unsupported third party contributions are provided in directory contrib/ . -A Java implementation of zlib is available in the Java Development Kit -http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html -See the zlib home page http://www.zlib.org for details. +zlib is available in Java using the java.util.zip package, documented at +http://java.sun.com/developer/technicalArticles/Programming/compression/ . -A Perl interface to zlib written by Paul Marquess is in the -CPAN (Comprehensive Perl Archive Network) sites -http://www.cpan.org/modules/by-module/Compress/ +A Perl interface to zlib written by Paul Marquess is available +at CPAN (Comprehensive Perl Archive Network) sites, including +http://search.cpan.org/~pmqs/IO-Compress-Zlib/ . A Python interface to zlib written by A.M. Kuchling is available in Python 1.5 and later versions, see -http://www.python.org/doc/lib/module-zlib.html +http://www.python.org/doc/lib/module-zlib.html . -A zlib binding for TCL written by Andreas Kupries is -availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html +zlib is built into tcl: http://wiki.tcl.tk/4610 . An experimental package to read and write files in .zip format, written on top of zlib by Gilles Vollant , is available in the @@ -74,25 +69,21 @@ Notes for some targets: - zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with other compilers. Use "make test" to check your compiler. -- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers. +- gzdopen is not supported on RISCOS or BEOS. - For PalmOs, see http://palmzlib.sourceforge.net/ -- When building a shared, i.e. dynamic library on Mac OS X, the library must be - installed before testing (do "make install" before "make test"), since the - library location is specified in the library. - Acknowledgments: - The deflate format used by zlib was defined by Phil Katz. The deflate - and zlib specifications were written by L. Peter Deutsch. Thanks to all the - people who reported problems and suggested various improvements in zlib; - they are too numerous to cite here. + The deflate format used by zlib was defined by Phil Katz. The deflate and + zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; they + are too numerous to cite here. Copyright notice: - (C) 1995-2004 Jean-loup Gailly and Mark Adler + (C) 1995-2010 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -113,13 +104,11 @@ Copyright notice: Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu -If you use the zlib library in a product, we would appreciate *not* -receiving lengthy legal documents to sign. The sources are provided -for free but without warranty of any kind. The library has been -entirely written by Jean-loup Gailly and Mark Adler; it does not -include third-party code. +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. -If you redistribute modified sources, we would appreciate that you include -in the file ChangeLog history information documenting your changes. Please -read the FAQ for more information on the distribution of modified source -versions. +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. diff --git a/compat/zlib/adler32.c b/compat/zlib/adler32.c index 26121fe..d2960f1 100644 --- a/compat/zlib/adler32.c +++ b/compat/zlib/adler32.c @@ -1,12 +1,15 @@ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2004 Mark Adler + * Copyright (C) 1995-2007 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: adler32.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: adler32.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ -#define ZLIB_INTERNAL -#include "zlib.h" +#include "zutil.h" + +#define local static + +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2); #define BASE 65521UL /* largest prime smaller than 65536 */ #define NMAX 5552 @@ -125,10 +128,10 @@ uLong ZEXPORT adler32(adler, buf, len) } /* ========================================================================= */ -uLong ZEXPORT adler32_combine(adler1, adler2, len2) +local uLong adler32_combine_(adler1, adler2, len2) uLong adler1; uLong adler2; - z_off_t len2; + z_off64_t len2; { unsigned long sum1; unsigned long sum2; @@ -141,9 +144,26 @@ uLong ZEXPORT adler32_combine(adler1, adler2, len2) MOD(sum2); sum1 += (adler2 & 0xffff) + BASE - 1; sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; - if (sum1 > BASE) sum1 -= BASE; - if (sum1 > BASE) sum1 -= BASE; - if (sum2 > (BASE << 1)) sum2 -= (BASE << 1); - if (sum2 > BASE) sum2 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; return sum1 | (sum2 << 16); } + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} + +uLong ZEXPORT adler32_combine64(adler1, adler2, len2) + uLong adler1; + uLong adler2; + z_off64_t len2; +{ + return adler32_combine_(adler1, adler2, len2); +} diff --git a/compat/zlib/algorithm.txt b/compat/zlib/algorithm.txt deleted file mode 100644 index b022dde..0000000 --- a/compat/zlib/algorithm.txt +++ /dev/null @@ -1,209 +0,0 @@ -1. Compression algorithm (deflate) - -The deflation algorithm used by gzip (also zip and zlib) is a variation of -LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in -the input data. The second occurrence of a string is replaced by a -pointer to the previous string, in the form of a pair (distance, -length). Distances are limited to 32K bytes, and lengths are limited -to 258 bytes. When a string does not occur anywhere in the previous -32K bytes, it is emitted as a sequence of literal bytes. (In this -description, `string' must be taken as an arbitrary sequence of bytes, -and is not restricted to printable characters.) - -Literals or match lengths are compressed with one Huffman tree, and -match distances are compressed with another tree. The trees are stored -in a compact form at the start of each block. The blocks can have any -size (except that the compressed data for one block must fit in -available memory). A block is terminated when deflate() determines that -it would be useful to start another block with fresh trees. (This is -somewhat similar to the behavior of LZW-based _compress_.) - -Duplicated strings are found using a hash table. All input strings of -length 3 are inserted in the hash table. A hash index is computed for -the next 3 bytes. If the hash chain for this index is not empty, all -strings in the chain are compared with the current input string, and -the longest match is selected. - -The hash chains are searched starting with the most recent strings, to -favor small distances and thus take advantage of the Huffman encoding. -The hash chains are singly linked. There are no deletions from the -hash chains, the algorithm simply discards matches that are too old. - -To avoid a worst-case situation, very long hash chains are arbitrarily -truncated at a certain length, determined by a runtime option (level -parameter of deflateInit). So deflate() does not always find the longest -possible match but generally finds a match which is long enough. - -deflate() also defers the selection of matches with a lazy evaluation -mechanism. After a match of length N has been found, deflate() searches for -a longer match at the next input byte. If a longer match is found, the -previous match is truncated to a length of one (thus producing a single -literal byte) and the process of lazy evaluation begins again. Otherwise, -the original match is kept, and the next match search is attempted only N -steps later. - -The lazy match evaluation is also subject to a runtime parameter. If -the current match is long enough, deflate() reduces the search for a longer -match, thus speeding up the whole process. If compression ratio is more -important than speed, deflate() attempts a complete second search even if -the first match is already long enough. - -The lazy match evaluation is not performed for the fastest compression -modes (level parameter 1 to 3). For these fast modes, new strings -are inserted in the hash table only when no match was found, or -when the match is not too long. This degrades the compression ratio -but saves time since there are both fewer insertions and fewer searches. - - -2. Decompression algorithm (inflate) - -2.1 Introduction - -The key question is how to represent a Huffman code (or any prefix code) so -that you can decode fast. The most important characteristic is that shorter -codes are much more common than longer codes, so pay attention to decoding the -short codes fast, and let the long codes take longer to decode. - -inflate() sets up a first level table that covers some number of bits of -input less than the length of longest code. It gets that many bits from the -stream, and looks it up in the table. The table will tell if the next -code is that many bits or less and how many, and if it is, it will tell -the value, else it will point to the next level table for which inflate() -grabs more bits and tries to decode a longer code. - -How many bits to make the first lookup is a tradeoff between the time it -takes to decode and the time it takes to build the table. If building the -table took no time (and if you had infinite memory), then there would only -be a first level table to cover all the way to the longest code. However, -building the table ends up taking a lot longer for more bits since short -codes are replicated many times in such a table. What inflate() does is -simply to make the number of bits in the first table a variable, and then -to set that variable for the maximum speed. - -For inflate, which has 286 possible codes for the literal/length tree, the size -of the first table is nine bits. Also the distance trees have 30 possible -values, and the size of the first table is six bits. Note that for each of -those cases, the table ended up one bit longer than the ``average'' code -length, i.e. the code length of an approximately flat code which would be a -little more than eight bits for 286 symbols and a little less than five bits -for 30 symbols. - - -2.2 More details on the inflate table lookup - -Ok, you want to know what this cleverly obfuscated inflate tree actually -looks like. You are correct that it's not a Huffman tree. It is simply a -lookup table for the first, let's say, nine bits of a Huffman symbol. The -symbol could be as short as one bit or as long as 15 bits. If a particular -symbol is shorter than nine bits, then that symbol's translation is duplicated -in all those entries that start with that symbol's bits. For example, if the -symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a -symbol is nine bits long, it appears in the table once. - -If the symbol is longer than nine bits, then that entry in the table points -to another similar table for the remaining bits. Again, there are duplicated -entries as needed. The idea is that most of the time the symbol will be short -and there will only be one table look up. (That's whole idea behind data -compression in the first place.) For the less frequent long symbols, there -will be two lookups. If you had a compression method with really long -symbols, you could have as many levels of lookups as is efficient. For -inflate, two is enough. - -So a table entry either points to another table (in which case nine bits in -the above example are gobbled), or it contains the translation for the symbol -and the number of bits to gobble. Then you start again with the next -ungobbled bit. - -You may wonder: why not just have one lookup table for how ever many bits the -longest symbol is? The reason is that if you do that, you end up spending -more time filling in duplicate symbol entries than you do actually decoding. -At least for deflate's output that generates new trees every several 10's of -kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code -would take too long if you're only decoding several thousand symbols. At the -other extreme, you could make a new table for every bit in the code. In fact, -that's essentially a Huffman tree. But then you spend two much time -traversing the tree while decoding, even for short symbols. - -So the number of bits for the first lookup table is a trade of the time to -fill out the table vs. the time spent looking at the second level and above of -the table. - -Here is an example, scaled down: - -The code being decoded, with 10 symbols, from 1 to 6 bits long: - -A: 0 -B: 10 -C: 1100 -D: 11010 -E: 11011 -F: 11100 -G: 11101 -H: 11110 -I: 111110 -J: 111111 - -Let's make the first table three bits long (eight entries): - -000: A,1 -001: A,1 -010: A,1 -011: A,1 -100: B,2 -101: B,2 -110: -> table X (gobble 3 bits) -111: -> table Y (gobble 3 bits) - -Each entry is what the bits decode as and how many bits that is, i.e. how -many bits to gobble. Or the entry points to another table, with the number of -bits to gobble implicit in the size of the table. - -Table X is two bits long since the longest code starting with 110 is five bits -long: - -00: C,1 -01: C,1 -10: D,2 -11: E,2 - -Table Y is three bits long since the longest code starting with 111 is six -bits long: - -000: F,2 -001: F,2 -010: G,2 -011: G,2 -100: H,2 -101: H,2 -110: I,3 -111: J,3 - -So what we have here are three tables with a total of 20 entries that had to -be constructed. That's compared to 64 entries for a single table. Or -compared to 16 entries for a Huffman tree (six two entry tables and one four -entry table). Assuming that the code ideally represents the probability of -the symbols, it takes on the average 1.25 lookups per symbol. That's compared -to one lookup for the single table, or 1.66 lookups per symbol for the -Huffman tree. - -There, I think that gives you a picture of what's going on. For inflate, the -meaning of a particular symbol is often more than just a letter. It can be a -byte (a "literal"), or it can be either a length or a distance which -indicates a base value and a number of bits to fetch after the code that is -added to the base value. Or it might be the special end-of-block code. The -data structures created in inftrees.c try to encode all that information -compactly in the tables. - - -Jean-loup Gailly Mark Adler -jloup@gzip.org madler@alumni.caltech.edu - - -References: - -[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data -Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, -pp. 337-343. - -``DEFLATE Compressed Data Format Specification'' available in -http://www.ietf.org/rfc/rfc1951.txt diff --git a/compat/zlib/amiga/Makefile.pup b/compat/zlib/amiga/Makefile.pup index 3f7e155..8940c12 100644 --- a/compat/zlib/amiga/Makefile.pup +++ b/compat/zlib/amiga/Makefile.pup @@ -14,8 +14,8 @@ LDFLAGS = -o LDLIBS = LIB:scppc.a LIB:end.o RM = delete quiet -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infback.o inftrees.o inffast.o +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o TEST_OBJS = example.o minigzip.o @@ -55,7 +55,10 @@ compress.o: zlib.h zconf.h crc32.o: crc32.h zlib.h zconf.h deflate.o: deflate.h zutil.h zlib.h zconf.h example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h +gzclose.o: zlib.h zconf.h gzguts.h +gzlib.o: zlib.h zconf.h gzguts.h +gzread.o: zlib.h zconf.h gzguts.h +gzwrite.o: zlib.h zconf.h gzguts.h inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h diff --git a/compat/zlib/amiga/Makefile.sas b/compat/zlib/amiga/Makefile.sas index 296ef48..749e291 100644 --- a/compat/zlib/amiga/Makefile.sas +++ b/compat/zlib/amiga/Makefile.sas @@ -13,8 +13,8 @@ SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \ NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \ DEF=POSTINC -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infback.o inftrees.o inffast.o +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o TEST_OBJS = example.o minigzip.o @@ -54,7 +54,10 @@ compress.o: zlib.h zconf.h crc32.o: crc32.h zlib.h zconf.h deflate.o: deflate.h zutil.h zlib.h zconf.h example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h +gzclose.o: zlib.h zconf.h gzguts.h +gzlib.o: zlib.h zconf.h gzguts.h +gzread.o: zlib.h zconf.h gzguts.h +gzwrite.o: zlib.h zconf.h gzguts.h inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h diff --git a/compat/zlib/as400/bndsrc b/compat/zlib/as400/bndsrc deleted file mode 100644 index 9cf94bb..0000000 --- a/compat/zlib/as400/bndsrc +++ /dev/null @@ -1,132 +0,0 @@ -STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.1.3 entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - -/********************************************************************/ -/* *MODULE ADLER32 ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("adler32") - -/********************************************************************/ -/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("compress") - EXPORT SYMBOL("compress2") - -/********************************************************************/ -/* *MODULE CRC32 ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("crc32") - EXPORT SYMBOL("get_crc_table") - -/********************************************************************/ -/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("deflate") - EXPORT SYMBOL("deflateEnd") - EXPORT SYMBOL("deflateSetDictionary") - EXPORT SYMBOL("deflateCopy") - EXPORT SYMBOL("deflateReset") - EXPORT SYMBOL("deflateParams") - EXPORT SYMBOL("deflatePrime") - EXPORT SYMBOL("deflateInit_") - EXPORT SYMBOL("deflateInit2_") - -/********************************************************************/ -/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("gzopen") - EXPORT SYMBOL("gzdopen") - EXPORT SYMBOL("gzsetparams") - EXPORT SYMBOL("gzread") - EXPORT SYMBOL("gzwrite") - EXPORT SYMBOL("gzprintf") - EXPORT SYMBOL("gzputs") - EXPORT SYMBOL("gzgets") - EXPORT SYMBOL("gzputc") - EXPORT SYMBOL("gzgetc") - EXPORT SYMBOL("gzflush") - EXPORT SYMBOL("gzseek") - EXPORT SYMBOL("gzrewind") - EXPORT SYMBOL("gztell") - EXPORT SYMBOL("gzeof") - EXPORT SYMBOL("gzclose") - EXPORT SYMBOL("gzerror") - -/********************************************************************/ -/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("inflate") - EXPORT SYMBOL("inflateEnd") - EXPORT SYMBOL("inflateSetDictionary") - EXPORT SYMBOL("inflateSync") - EXPORT SYMBOL("inflateReset") - EXPORT SYMBOL("inflateInit_") - EXPORT SYMBOL("inflateInit2_") - EXPORT SYMBOL("inflateSyncPoint") - -/********************************************************************/ -/* *MODULE UNCOMPR ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("uncompress") - -/********************************************************************/ -/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("zlibVersion") - EXPORT SYMBOL("zError") - -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ -/* Version 1.2.1 additional entry points. */ -/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ - -/********************************************************************/ -/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("compressBound") - -/********************************************************************/ -/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("deflateBound") - -/********************************************************************/ -/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("gzungetc") - EXPORT SYMBOL("gzclearerr") - -/********************************************************************/ -/* *MODULE INFBACK ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("inflateBack") - EXPORT SYMBOL("inflateBackEnd") - EXPORT SYMBOL("inflateBackInit_") - -/********************************************************************/ -/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("inflateCopy") - -/********************************************************************/ -/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */ -/********************************************************************/ - - EXPORT SYMBOL("zlibCompileFlags") - -ENDPGMEXP diff --git a/compat/zlib/as400/compile.clp b/compat/zlib/as400/compile.clp deleted file mode 100644 index 8554951..0000000 --- a/compat/zlib/as400/compile.clp +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************/ -/* */ -/* ZLIB */ -/* */ -/* Compile sources into modules and link them into a service program. */ -/* */ -/******************************************************************************/ - - PGM - -/* Configuration adjustable parameters. */ - - DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) + - VALUE('ZLIB') /* Source library. */ - DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) + - VALUE('SOURCES') /* Source member file. */ - DCL VAR(&CTLFILE) TYPE(*CHAR) LEN(10) + - VALUE('TOOLS') /* Control member file. */ - - DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) + - VALUE('ZLIB') /* Module library. */ - - DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) + - VALUE('LGPL') /* Service program library. */ - - DCL VAR(&CFLAGS) TYPE(*CHAR) + - VALUE('OPTIMIZE(40)') /* Compile options. */ - - -/* Working storage. */ - - DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */ - DCL VAR(&CMD) TYPE(*CHAR) LEN(512) - - -/* Compile sources into modules. */ - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/ADLER32) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/COMPRESS) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/CRC32) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/DEFLATE) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/GZIO) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/INFBACK) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/INFFAST) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/INFLATE) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/INFTREES) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/TREES) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/UNCOMPR) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + - '/ZUTIL) SRCFILE(' *TCAT + - &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + - ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) - CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) - - -/* Link modules into a service program. */ - - CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) + - MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS + - &MODLIB/CRC32 &MODLIB/DEFLATE + - &MODLIB/GZIO &MODLIB/INFBACK + - &MODLIB/INFFAST &MODLIB/INFLATE + - &MODLIB/INFTREES &MODLIB/TREES + - &MODLIB/UNCOMPR &MODLIB/ZUTIL) + - SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) + - TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0) - - ENDPGM diff --git a/compat/zlib/as400/readme.txt b/compat/zlib/as400/readme.txt deleted file mode 100644 index beae13f..0000000 --- a/compat/zlib/as400/readme.txt +++ /dev/null @@ -1,111 +0,0 @@ - ZLIB version 1.2.3 for AS400 installation instructions - -I) From an AS400 *SAVF file: - -1) Unpacking archive to an AS400 save file - -On the AS400: - -_ Create the ZLIB AS400 library: - - CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library') - -_ Create a work save file, for example: - - CRTSAVF FILE(ZLIB/ZLIBSAVF) - -On a PC connected to the target AS400: - -_ Unpack the save file image to a PC file "ZLIBSAVF" -_ Upload this file into the save file on the AS400, for example - using ftp in BINARY mode. - - -2) Populating the ZLIB AS400 source library - -On the AS400: - -_ Extract the saved objects into the ZLIB AS400 library using: - -RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB) - - -3) Customize installation: - -_ Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed, - according to the comments. - -_ Compile this member with: - - CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE) - - -4) Compile and generate the service program: - -_ This can now be done by executing: - - CALL PGM(ZLIB/COMPILE) - - - -II) From the original source distribution: - -1) On the AS400, create the source library: - - CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library') - -2) Create the source files: - - CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules') - CRTSRCPF FILE(ZLIB/H) RCDLEN(112) TEXT('ZLIB library includes') - CRTSRCPF FILE(ZLIB/TOOLS) RCDLEN(112) TEXT('ZLIB library control utilities') - -3) From the machine hosting the distribution files, upload them (with - FTP in text mode, for example) according to the following table: - - Original AS400 AS400 AS400 AS400 - file file member type description - SOURCES Original ZLIB C subprogram sources - adler32.c ADLER32 C ZLIB - Compute the Adler-32 checksum of a dta strm - compress.c COMPRESS C ZLIB - Compress a memory buffer - crc32.c CRC32 C ZLIB - Compute the CRC-32 of a data stream - deflate.c DEFLATE C ZLIB - Compress data using the deflation algorithm - gzio.c GZIO C ZLIB - IO on .gz files - infback.c INFBACK C ZLIB - Inflate using a callback interface - inffast.c INFFAST C ZLIB - Fast proc. literals & length/distance pairs - inflate.c INFLATE C ZLIB - Interface to inflate modules - inftrees.c INFTREES C ZLIB - Generate Huffman trees for efficient decode - trees.c TREES C ZLIB - Output deflated data using Huffman coding - uncompr.c UNCOMPR C ZLIB - Decompress a memory buffer - zutil.c ZUTIL C ZLIB - Target dependent utility functions - H Original ZLIB C and ILE/RPG include files - crc32.h CRC32 C ZLIB - CRC32 tables - deflate.h DEFLATE C ZLIB - Internal compression state - inffast.h INFFAST C ZLIB - Header to use inffast.c - inffixed.h INFFIXED C ZLIB - Table for decoding fixed codes - inflate.h INFLATE C ZLIB - Internal inflate state definitions - inftrees.h INFTREES C ZLIB - Header to use inftrees.c - trees.h TREES C ZLIB - Created automatically with -DGEN_TREES_H - zconf.h ZCONF C ZLIB - Compression library configuration - zlib.h ZLIB C ZLIB - Compression library C user interface - as400/zlib.inc ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface - zutil.h ZUTIL C ZLIB - Internal interface and configuration - TOOLS Building source software & AS/400 README - as400/bndsrc BNDSRC Entry point exportation list - as400/compile.clp COMPILE CLP Compile sources & generate service program - as400/readme.txt README TXT Installation instructions - -4) Continue as in I)3). - - - - -Notes: For AS400 ILE RPG programmers, a /copy member defining the ZLIB - API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC). - Please read comments in this member for more information. - - Remember that most foreign textual data are ASCII coded: this - implementation does not handle conversion from/to ASCII, so - text data code conversions must be done explicitely. - - Always open zipped files in binary mode. diff --git a/compat/zlib/as400/zlib.inc b/compat/zlib/as400/zlib.inc deleted file mode 100644 index 7bbfb7e..0000000 --- a/compat/zlib/as400/zlib.inc +++ /dev/null @@ -1,331 +0,0 @@ - * ZLIB.INC - Interface to the general purpose compression library - * - * ILE RPG400 version by Patrick Monnerat, DATASPHERE. - * Version 1.2.3 - * - * - * WARNING: - * Procedures inflateInit(), inflateInit2(), deflateInit(), - * deflateInit2() and inflateBackInit() need to be called with - * two additional arguments: - * the package version string and the stream control structure. - * size. This is needed because RPG lacks some macro feature. - * Call these procedures as: - * inflateInit(...: ZLIB_VERSION: %size(z_stream)) - * - /if not defined(ZLIB_H_) - /define ZLIB_H_ - * - ************************************************************************** - * Constants - ************************************************************************** - * - * Versioning information. - * - D ZLIB_VERSION C '1.2.3' - D ZLIB_VERNUM C X'1230' - * - * Other equates. - * - D Z_NO_FLUSH C 0 - D Z_SYNC_FLUSH C 2 - D Z_FULL_FLUSH C 3 - D Z_FINISH C 4 - D Z_BLOCK C 5 - * - D Z_OK C 0 - D Z_STREAM_END C 1 - D Z_NEED_DICT C 2 - D Z_ERRNO C -1 - D Z_STREAM_ERROR C -2 - D Z_DATA_ERROR C -3 - D Z_MEM_ERROR C -4 - D Z_BUF_ERROR C -5 - DZ_VERSION_ERROR C -6 - * - D Z_NO_COMPRESSION... - D C 0 - D Z_BEST_SPEED C 1 - D Z_BEST_COMPRESSION... - D C 9 - D Z_DEFAULT_COMPRESSION... - D C -1 - * - D Z_FILTERED C 1 - D Z_HUFFMAN_ONLY C 2 - D Z_RLE C 3 - D Z_DEFAULT_STRATEGY... - D C 0 - * - D Z_BINARY C 0 - D Z_ASCII C 1 - D Z_UNKNOWN C 2 - * - D Z_DEFLATED C 8 - * - D Z_NULL C 0 - * - ************************************************************************** - * Types - ************************************************************************** - * - D z_streamp S * Stream struct ptr - D gzFile S * File pointer - D z_off_t S 10i 0 Stream offsets - * - ************************************************************************** - * Structures - ************************************************************************** - * - * The GZIP encode/decode stream support structure. - * - D z_stream DS align based(z_streamp) - D zs_next_in * Next input byte - D zs_avail_in 10U 0 Byte cnt at next_in - D zs_total_in 10U 0 Total bytes read - D zs_next_out * Output buffer ptr - D zs_avail_out 10U 0 Room left @ next_out - D zs_total_out 10U 0 Total bytes written - D zs_msg * Last errmsg or null - D zs_state * Internal state - D zs_zalloc * procptr Int. state allocator - D zs_free * procptr Int. state dealloc. - D zs_opaque * Private alloc. data - D zs_data_type 10i 0 ASC/BIN best guess - D zs_adler 10u 0 Uncompr. adler32 val - D 10U 0 Reserved - D 10U 0 Ptr. alignment - * - ************************************************************************** - * Utility function prototypes - ************************************************************************** - * - D compress PR 10I 0 extproc('compress') - D dest 32767 options(*varsize) Destination buffer - D destLen 10U 0 Destination length - D source 32767 const options(*varsize) Source buffer - D sourceLen 10u 0 value Source length - * - D compress2 PR 10I 0 extproc('compress2') - D dest 32767 options(*varsize) Destination buffer - D destLen 10U 0 Destination length - D source 32767 const options(*varsize) Source buffer - D sourceLen 10U 0 value Source length - D level 10I 0 value Compression level - * - D compressBound PR 10U 0 extproc('compressBound') - D sourceLen 10U 0 value - * - D uncompress PR 10I 0 extproc('uncompress') - D dest 32767 options(*varsize) Destination buffer - D destLen 10U 0 Destination length - D source 32767 const options(*varsize) Source buffer - D sourceLen 10U 0 value Source length - * - D gzopen PR extproc('gzopen') - D like(gzFile) - D path * value options(*string) File pathname - D mode * value options(*string) Open mode - * - D gzdopen PR extproc('gzdopen') - D like(gzFile) - D fd 10i 0 value File descriptor - D mode * value options(*string) Open mode - * - D gzsetparams PR 10I 0 extproc('gzsetparams') - D file value like(gzFile) File pointer - D level 10I 0 value - D strategy 10i 0 value - * - D gzread PR 10I 0 extproc('gzread') - D file value like(gzFile) File pointer - D buf 32767 options(*varsize) Buffer - D len 10u 0 value Buffer length - * - D gzwrite PR 10I 0 extproc('gzwrite') - D file value like(gzFile) File pointer - D buf 32767 const options(*varsize) Buffer - D len 10u 0 value Buffer length - * - D gzputs PR 10I 0 extproc('gzputs') - D file value like(gzFile) File pointer - D s * value options(*string) String to output - * - D gzgets PR * extproc('gzgets') - D file value like(gzFile) File pointer - D buf 32767 options(*varsize) Read buffer - D len 10i 0 value Buffer length - * - D gzflush PR 10i 0 extproc('gzflush') - D file value like(gzFile) File pointer - D flush 10I 0 value Type of flush - * - D gzseek PR extproc('gzseek') - D like(z_off_t) - D file value like(gzFile) File pointer - D offset value like(z_off_t) Offset - D whence 10i 0 value Origin - * - D gzrewind PR 10i 0 extproc('gzrewind') - D file value like(gzFile) File pointer - * - D gztell PR extproc('gztell') - D like(z_off_t) - D file value like(gzFile) File pointer - * - D gzeof PR 10i 0 extproc('gzeof') - D file value like(gzFile) File pointer - * - D gzclose PR 10i 0 extproc('gzclose') - D file value like(gzFile) File pointer - * - D gzerror PR * extproc('gzerror') Error string - D file value like(gzFile) File pointer - D errnum 10I 0 Error code - * - D gzclearerr PR extproc('gzclearerr') - D file value like(gzFile) File pointer - * - ************************************************************************** - * Basic function prototypes - ************************************************************************** - * - D zlibVersion PR * extproc('zlibVersion') Version string - * - D deflateInit PR 10I 0 extproc('deflateInit_') Init. compression - D strm like(z_stream) Compression stream - D level 10I 0 value Compression level - D version * value options(*string) Version string - D stream_size 10i 0 value Stream struct. size - * - D deflate PR 10I 0 extproc('deflate') Compress data - D strm like(z_stream) Compression stream - D flush 10I 0 value Flush type required - * - D deflateEnd PR 10I 0 extproc('deflateEnd') Termin. compression - D strm like(z_stream) Compression stream - * - D inflateInit PR 10I 0 extproc('inflateInit_') Init. expansion - D strm like(z_stream) Expansion stream - D version * value options(*string) Version string - D stream_size 10i 0 value Stream struct. size - * - D inflate PR 10I 0 extproc('inflate') Expand data - D strm like(z_stream) Expansion stream - D flush 10I 0 value Flush type required - * - D inflateEnd PR 10I 0 extproc('inflateEnd') Termin. expansion - D strm like(z_stream) Expansion stream - * - ************************************************************************** - * Advanced function prototypes - ************************************************************************** - * - D deflateInit2 PR 10I 0 extproc('deflateInit2_') Init. compression - D strm like(z_stream) Compression stream - D level 10I 0 value Compression level - D method 10I 0 value Compression method - D windowBits 10I 0 value log2(window size) - D memLevel 10I 0 value Mem/cmpress tradeoff - D strategy 10I 0 value Compression stategy - D version * value options(*string) Version string - D stream_size 10i 0 value Stream struct. size - * - D deflateSetDictionary... - D PR 10I 0 extproc('deflateSetDictionary') Init. dictionary - D strm like(z_stream) Compression stream - D dictionary 32767 const options(*varsize) Dictionary bytes - D dictLength 10U 0 value Dictionary length - * - D deflateCopy PR 10I 0 extproc('deflateCopy') Compress strm 2 strm - D dest like(z_stream) Destination stream - D source like(z_stream) Source stream - * - D deflateReset PR 10I 0 extproc('deflateReset') End and init. stream - D strm like(z_stream) Compression stream - * - D deflateParams PR 10I 0 extproc('deflateParams') Change level & strat - D strm like(z_stream) Compression stream - D level 10I 0 value Compression level - D strategy 10I 0 value Compression stategy - * - D deflateBound PR 10U 0 extproc('deflateBound') Change level & strat - D strm like(z_stream) Compression stream - D sourcelen 10U 0 value Compression level - * - D deflatePrime PR 10I 0 extproc('deflatePrime') Change level & strat - D strm like(z_stream) Compression stream - D bits 10I 0 value Number of bits to insert - D value 10I 0 value Bits to insert - * - D inflateInit2 PR 10I 0 extproc('inflateInit2_') Init. expansion - D strm like(z_stream) Expansion stream - D windowBits 10I 0 value log2(window size) - D version * value options(*string) Version string - D stream_size 10i 0 value Stream struct. size - * - D inflateSetDictionary... - D PR 10I 0 extproc('inflateSetDictionary') Init. dictionary - D strm like(z_stream) Expansion stream - D dictionary 32767 const options(*varsize) Dictionary bytes - D dictLength 10U 0 value Dictionary length - * - D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansion - D strm like(z_stream) Expansion stream - * - D inflateCopy PR 10I 0 extproc('inflateCopy') - D dest like(z_stream) Destination stream - D source like(z_stream) Source stream - * - D inflateReset PR 10I 0 extproc('inflateReset') End and init. stream - D strm like(z_stream) Expansion stream - * - D inflateBackInit... - D PR 10I 0 extproc('inflateBackInit_') - D strm like(z_stream) Expansion stream - D windowBits 10I 0 value Log2(buffer size) - D window 32767 options(*varsize) Buffer - D version * value options(*string) Version string - D stream_size 10i 0 value Stream struct. size - * - D inflateBack PR 10I 0 extproc('inflateBack') - D strm like(z_stream) Expansion stream - D in * value procptr Input function - D in_desc * value Input descriptor - D out * value procptr Output function - D out_desc * value Output descriptor - * - D inflateBackEnd PR 10I 0 extproc('inflateBackEnd') - D strm like(z_stream) Expansion stream - * - D zlibCompileFlags... - D PR 10U 0 extproc('zlibCompileFlags') - * - ************************************************************************** - * Checksum function prototypes - ************************************************************************** - * - D adler32 PR 10U 0 extproc('adler32') New checksum - D adler 10U 0 value Old checksum - D buf 32767 const options(*varsize) Bytes to accumulate - D len 10U 0 value Buffer length - * - D crc32 PR 10U 0 extproc('crc32') New checksum - D crc 10U 0 value Old checksum - D buf 32767 const options(*varsize) Bytes to accumulate - D len 10U 0 value Buffer length - * - ************************************************************************** - * Miscellaneous function prototypes - ************************************************************************** - * - D zError PR * extproc('zError') Error string - D err 10I 0 value Error code - * - D inflateSyncPoint... - D PR 10I 0 extproc('inflateSyncPoint') - D strm like(z_stream) Expansion stream - * - D get_crc_table PR * extproc('get_crc_table') Ptr to ulongs - * - /endif diff --git a/compat/zlib/compress.c b/compat/zlib/compress.c index 6f3eac1..b9e0c5a 100644 --- a/compat/zlib/compress.c +++ b/compat/zlib/compress.c @@ -1,9 +1,9 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2005 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: compress.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: compress.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ #define ZLIB_INTERNAL #include "zlib.h" @@ -75,5 +75,6 @@ int ZEXPORT compress (dest, destLen, source, sourceLen) uLong ZEXPORT compressBound (sourceLen) uLong sourceLen; { - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13; } diff --git a/compat/zlib/configure b/compat/zlib/configure index d7ffdc3..672fd37 100755 --- a/compat/zlib/configure +++ b/compat/zlib/configure @@ -1,29 +1,26 @@ #!/bin/sh -# configure script for zlib. This script is needed only if -# you wish to build a shared library and your system supports them, -# of if you need special compiler, flags or install directory. -# Otherwise, you can just use directly "make test; make install" +# configure script for zlib. # -# To create a shared library, use "configure --shared"; by default a static -# library is created. If the primitive shared library support provided here -# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz +# Normally configure builds both a static and a shared library. +# If you want to build just a static library, use: ./configure --static # # To impose specific compiler or flags or install directory, use for example: # prefix=$HOME CC=cc CFLAGS="-O4" ./configure # or for csh/tcsh users: # (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) -# LDSHARED is the command to be used to create a shared library # Incorrect settings of CC or CFLAGS may prevent creating a shared library. # If you have problems, try without defining CC and CFLAGS before reporting # an error. -LIBS=libz.a -LDFLAGS="-L. ${LIBS}" +STATICLIB=libz.a +LDFLAGS="${LDFLAGS} -L. ${STATICLIB}" VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` +VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h` VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` -AR=${AR-"ar rc"} +AR=${AR-"ar"} +AR_RC="${AR} rc" RANLIB=${RANLIB-"ranlib"} prefix=${prefix-/usr/local} exec_prefix=${exec_prefix-'${prefix}'} @@ -31,7 +28,9 @@ libdir=${libdir-'${exec_prefix}/lib'} includedir=${includedir-'${prefix}/include'} mandir=${mandir-'${prefix}/share/man'} shared_ext='.so' -shared=0 +shared=1 +zprefix=0 +build64=0 gcc=0 old_cc="$CC" old_cflags="$CFLAGS" @@ -39,21 +38,27 @@ old_cflags="$CFLAGS" while test $# -ge 1 do case "$1" in - -h* | --h*) + -h* | --help) echo 'usage:' - echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' - echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' - exit 0;; - -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; - -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; - -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; - -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; - -p* | --p*) prefix="$2"; shift; shift;; - -e* | --e*) exec_prefix="$2"; shift; shift;; - -l* | --l*) libdir="$2"; shift; shift;; - -i* | --i*) includedir="$2"; shift; shift;; - -s* | --s*) shared=1; shift;; - *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;; + echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' + echo ' [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' + exit 0 ;; + -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; + -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; + -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; + -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;; + -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;; + -p* | --prefix) prefix="$2"; shift; shift ;; + -e* | --eprefix) exec_prefix="$2"; shift; shift ;; + -l* | --libdir) libdir="$2"; shift; shift ;; + -i* | --includedir) includedir="$2"; shift; shift ;; + -s* | --shared | --enable-shared) shared=1; shift ;; + -t | --static) shared=0; shift ;; + -z* | --zprefix) zprefix=1; shift ;; + -6* | --64) build64=1; shift ;; + --sysconfdir=*) echo "ignored option: --sysconfdir"; shift ;; + --localstatedir=*) echo "ignored option: --localstatedir"; shift ;; + *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1 ;; esac done @@ -68,41 +73,54 @@ cc=${CC-gcc} cflags=${CFLAGS-"-O3"} # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure case "$cc" in - *gcc*) gcc=1;; + *gcc*) gcc=1 ;; esac if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then CC="$cc" - SFLAGS=${CFLAGS-"-fPIC -O3"} - CFLAGS="$cflags" - case `(uname -s || echo unknown) 2>/dev/null` in - Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; + SFLAGS="${CFLAGS-"-O3"} -fPIC" + CFLAGS="${CFLAGS-"-O3"}" + if test $build64 -eq 1; then + CFLAGS="${CFLAGS} -m64" + SFLAGS="${SFLAGS} -m64" + fi + if test "${ZLIBGCCWARN}" = "YES"; then + CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" + fi + if test -z "$uname"; then + uname=`(uname -s || echo unknown) 2>/dev/null` + fi + case "$uname" in + Linux | linux | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;; CYGWIN* | Cygwin* | cygwin* | OS/2* ) - EXE='.exe';; + EXE='.exe' ;; QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 # (alain.bonnefoy@icbt.com) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; + LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;; HP-UX*) LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} case `(uname -m || echo unknown) 2>/dev/null` in ia64) shared_ext='.so' - SHAREDLIB='libz.so';; + SHAREDLIB='libz.so' ;; *) shared_ext='.sl' - SHAREDLIB='libz.sl';; - esac;; + SHAREDLIB='libz.sl' ;; + esac ;; Darwin*) shared_ext='.dylib' SHAREDLIB=libz$shared_ext SHAREDLIBV=libz.$VER$shared_ext SHAREDLIBM=libz.$VER1$shared_ext - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};; - *) LDSHARED=${LDSHARED-"$cc -shared"};; + LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} ;; + *) LDSHARED=${LDSHARED-"$cc -shared"} ;; esac else # find system name and corresponding cc options CC=${CC-cc} - case `(uname -sr || echo unknown) 2>/dev/null` in + if test -z "$uname"; then + uname=`(uname -sr || echo unknown) 2>/dev/null` + fi + case "$uname" in HP-UX*) SFLAGS=${CFLAGS-"-O +z"} CFLAGS=${CFLAGS-"-O"} # LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} @@ -110,57 +128,64 @@ else case `(uname -m || echo unknown) 2>/dev/null` in ia64) shared_ext='.so' - SHAREDLIB='libz.so';; + SHAREDLIB='libz.so' ;; *) shared_ext='.sl' - SHAREDLIB='libz.sl';; - esac;; + SHAREDLIB='libz.sl' ;; + esac ;; IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} CFLAGS=${CFLAGS-"-ansi -O2"} - LDSHARED=${LDSHARED-"cc -shared"};; + LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} CFLAGS=${CFLAGS-"-O -std1"} - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; + LDFLAGS="${LDFLAGS} -Wl,-rpath,." + LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;; OSF1*) SFLAGS=${CFLAGS-"-O -std1"} CFLAGS=${CFLAGS-"-O -std1"} - LDSHARED=${LDSHARED-"cc -shared"};; + LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;; QNX*) SFLAGS=${CFLAGS-"-4 -O"} CFLAGS=${CFLAGS-"-4 -O"} LDSHARED=${LDSHARED-"cc"} RANLIB=${RANLIB-"true"} - AR="cc -A";; + AR_RC="cc -A" ;; SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} CFLAGS=${CFLAGS-"-O3"} - LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; - SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} - CFLAGS=${CFLAGS-"-fast -xcg89"} - LDSHARED=${LDSHARED-"cc -G"};; + LDSHARED=${LDSHARED-"cc -dy -KPIC -G"} ;; + SunOS\ 5*) LDSHARED=${LDSHARED-"cc -G"} + case `(uname -m || echo unknown) 2>/dev/null` in + i86*) + SFLAGS=${CFLAGS-"-xpentium -fast -KPIC -R."} + CFLAGS=${CFLAGS-"-xpentium -fast"} ;; + *) + SFLAGS=${CFLAGS-"-fast -xcg92 -KPIC -R."} + CFLAGS=${CFLAGS-"-fast -xcg92"} ;; + esac ;; SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} CFLAGS=${CFLAGS-"-O2"} - LDSHARED=${LDSHARED-"ld"};; - SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} - CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"} - LDSHARED=${LDSHARED-"cc -xarch=v9b"};; + LDSHARED=${LDSHARED-"ld"} ;; + SunStudio\ 9*) SFLAGS=${CFLAGS-"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} + CFLAGS=${CFLAGS-"-fast -xtarget=ultra3 -xarch=v9b"} + LDSHARED=${LDSHARED-"cc -xarch=v9b"} ;; UNIX_System_V\ 4.2.0) SFLAGS=${CFLAGS-"-KPIC -O"} CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"};; + LDSHARED=${LDSHARED-"cc -G"} ;; UNIX_SV\ 4.2MP) SFLAGS=${CFLAGS-"-Kconform_pic -O"} CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"};; + LDSHARED=${LDSHARED-"cc -G"} ;; OpenUNIX\ 5) SFLAGS=${CFLAGS-"-KPIC -O"} CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -G"};; + LDSHARED=${LDSHARED-"cc -G"} ;; AIX*) # Courtesy of dbakker@arrayasolutions.com SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} - LDSHARED=${LDSHARED-"xlc -G"};; - # send working options for other systems to support@gzip.org + LDSHARED=${LDSHARED-"xlc -G"} ;; + # send working options for other systems to zlib@gzip.org *) SFLAGS=${CFLAGS-"-O"} CFLAGS=${CFLAGS-"-O"} - LDSHARED=${LDSHARED-"cc -shared"};; + LDSHARED=${LDSHARED-"cc -shared"} ;; esac fi @@ -171,38 +196,83 @@ SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"} if test $shared -eq 1; then echo Checking for shared library support... # we must test in two steps (cc then ld), required at least on SunOS 4.x - if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && - test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then - CFLAGS="$SFLAGS" - LIBS="$SHAREDLIBV" + if test "`($CC -w -c $SFLAGS $test.c) 2>&1`" = "" && + test "`($LDSHARED $SFLAGS -o $test$shared_ext $test.o) 2>&1`" = ""; then echo Building shared library $SHAREDLIBV with $CC. elif test -z "$old_cc" -a -z "$old_cflags"; then echo No shared library support. shared=0; else + echo Tested $CC -w -c $SFLAGS $test.c + $CC -w -c $SFLAGS $test.c + echo Tested $LDSHARED $SFLAGS -o $test$shared_ext $test.o + $LDSHARED $SFLAGS -o $test$shared_ext $test.o echo 'No shared library support; try without defining CC and CFLAGS' shared=0; fi fi if test $shared -eq 0; then LDSHARED="$CC" - echo Building static library $LIBS version $VER with $CC. + ALL="static" + TEST="all teststatic" + SHAREDLIB="" + SHAREDLIBV="" + SHAREDLIBM="" + echo Building static library $STATICLIB version $VER with $CC. else - LDFLAGS="-L. ${SHAREDLIBV}" + ALL="static shared" + TEST="all teststatic testshared" fi cat > $test.c < +off64_t dummy = 0; +EOF +if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c) 2>&1`" = ""; then + CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" + SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" + ALL="${ALL} all64" + TEST="${TEST} test64" + echo "Checking for off64_t... Yes." + echo "Checking for fseeko... Yes." +else + echo "Checking for off64_t... No." + cat > $test.c < +int main(void) { + fseeko(NULL, 0, 0); + return 0; +} +EOF + if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then + echo "Checking for fseeko... Yes." + else + CFLAGS="${CFLAGS} -DNO_FSEEKO" + SFLAGS="${SFLAGS} -DNO_FSEEKO" + echo "Checking for fseeko... No." + fi +fi + +cp -p zconf.h.in zconf.h + +cat > $test.c < int main() { return 0; } EOF if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then - sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h + sed < zconf.h "/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\(.*\) may be/ 1\1 was/" > zconf.temp.h + mv zconf.temp.h zconf.h echo "Checking for unistd.h... Yes." else - cp -p zconf.in.h zconf.h echo "Checking for unistd.h... No." fi +if test $zprefix -eq 1; then + sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h + mv zconf.temp.h zconf.h + echo "Using z_ prefix on all symbols." +fi + cat > $test.c < #include @@ -219,13 +289,13 @@ int main() EOF if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then - echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()" + echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." cat > $test.c < #include -int mytest(char *fmt, ...) +int mytest(const char *fmt, ...) { char buf[20]; va_list ap; @@ -249,7 +319,7 @@ EOF #include #include -int mytest(char *fmt, ...) +int mytest(const char *fmt, ...) { int n; char buf[20]; @@ -271,6 +341,7 @@ EOF echo "Checking for return value of vsnprintf()... Yes." else CFLAGS="$CFLAGS -DHAS_vsnprintf_void" + SFLAGS="$SFLAGS -DHAS_vsnprintf_void" echo "Checking for return value of vsnprintf()... No." echo " WARNING: apparently vsnprintf() does not return a value. zlib" echo " can build but will be open to possible string-format security" @@ -278,6 +349,7 @@ EOF fi else CFLAGS="$CFLAGS -DNO_vsnprintf" + SFLAGS="$SFLAGS -DNO_vsnprintf" echo "Checking for vsnprintf() in stdio.h... No." echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" echo " can build but will be open to possible buffer-overflow security" @@ -287,7 +359,7 @@ EOF #include #include -int mytest(char *fmt, ...) +int mytest(const char *fmt, ...) { int n; char buf[20]; @@ -309,6 +381,7 @@ EOF echo "Checking for return value of vsprintf()... Yes." else CFLAGS="$CFLAGS -DHAS_vsprintf_void" + SFLAGS="$SFLAGS -DHAS_vsprintf_void" echo "Checking for return value of vsprintf()... No." echo " WARNING: apparently vsprintf() does not return a value. zlib" echo " can build but will be open to possible string-format security" @@ -316,7 +389,7 @@ EOF fi fi else - echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()" + echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." cat >$test.c < @@ -358,6 +431,7 @@ EOF echo "Checking for return value of snprintf()... Yes." else CFLAGS="$CFLAGS -DHAS_snprintf_void" + SFLAGS="$SFLAGS -DHAS_snprintf_void" echo "Checking for return value of snprintf()... No." echo " WARNING: apparently snprintf() does not return a value. zlib" echo " can build but will be open to possible string-format security" @@ -365,6 +439,7 @@ EOF fi else CFLAGS="$CFLAGS -DNO_snprintf" + SFLAGS="$SFLAGS -DNO_snprintf" echo "Checking for snprintf() in stdio.h... No." echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" echo " can build but will be open to possible buffer-overflow security" @@ -390,6 +465,7 @@ EOF echo "Checking for return value of sprintf()... Yes." else CFLAGS="$CFLAGS -DHAS_sprintf_void" + SFLAGS="$SFLAGS -DHAS_sprintf_void" echo "Checking for return value of sprintf()... No." echo " WARNING: apparently sprintf() does not return a value. zlib" echo " can build but will be open to possible string-format security" @@ -407,21 +483,7 @@ if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then else echo "Checking for errno.h... No." CFLAGS="$CFLAGS -DNO_ERRNO_H" -fi - -cat > $test.c < -#include -#include -caddr_t hello() { - return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); -} -EOF -if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then - CFLAGS="$CFLAGS -DUSE_MMAP" - echo Checking for mmap support... Yes. -else - echo Checking for mmap support... No. + SFLAGS="$SFLAGS -DNO_ERRNO_H" fi CPP=${CPP-"$CC -E"} @@ -432,7 +494,7 @@ case $CFLAGS in echo Checking for underline in external names... No. else echo Checking for underline in external names... Yes. - fi;; + fi ;; esac rm -f $test.[co] $test $test$shared_ext @@ -441,13 +503,36 @@ rm -f $test.[co] $test $test$shared_ext sed < Makefile.in " /^CC *=/s#=.*#=$CC# /^CFLAGS *=/s#=.*#=$CFLAGS# +/^SFLAGS *=/s#=.*#=$SFLAGS# +/^LDFLAGS *=/s#=.*#=$LDFLAGS# +/^LDSHARED *=/s#=.*#=$LDSHARED# +/^CPP *=/s#=.*#=$CPP# +/^STATICLIB *=/s#=.*#=$STATICLIB# +/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# +/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# +/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# +/^AR *=/s#=.*#=$AR_RC# +/^RANLIB *=/s#=.*#=$RANLIB# +/^EXE *=/s#=.*#=$EXE# +/^prefix *=/s#=.*#=$prefix# +/^exec_prefix *=/s#=.*#=$exec_prefix# +/^libdir *=/s#=.*#=$libdir# +/^includedir *=/s#=.*#=$includedir# +/^mandir *=/s#=.*#=$mandir# +/^all: */s#:.*#: $ALL# +/^test: */s#:.*#: $TEST# +" > Makefile + +sed < zlib.pc.in " +/^CC *=/s#=.*#=$CC# +/^CFLAGS *=/s#=.*#=$CFLAGS# /^CPP *=/s#=.*#=$CPP# /^LDSHARED *=/s#=.*#=$LDSHARED# -/^LIBS *=/s#=.*#=$LIBS# +/^STATICLIB *=/s#=.*#=$STATICLIB# /^SHAREDLIB *=/s#=.*#=$SHAREDLIB# /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# -/^AR *=/s#=.*#=$AR# +/^AR *=/s#=.*#=$AR_RC# /^RANLIB *=/s#=.*#=$RANLIB# /^EXE *=/s#=.*#=$EXE# /^prefix *=/s#=.*#=$prefix# @@ -456,4 +541,6 @@ sed < Makefile.in " /^includedir *=/s#=.*#=$includedir# /^mandir *=/s#=.*#=$mandir# /^LDFLAGS *=/s#=.*#=$LDFLAGS# -" > Makefile +" | sed -e " +s/\@VERSION\@/$VER/g; +" > zlib.pc diff --git a/compat/zlib/contrib/README.contrib b/compat/zlib/contrib/README.contrib index 20afc62..dd2285d 100644 --- a/compat/zlib/contrib/README.contrib +++ b/compat/zlib/contrib/README.contrib @@ -8,7 +8,10 @@ ada/ by Dmitriy Anisimkov Support for Ada See http://zlib-ada.sourceforge.net/ -asm586/ +amd64/ by Mikhail Teterin + asm code for AMD64 + See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393 + asm686/ by Brian Raiter asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax See http://www.muppetlabs.com/~breadbox/software/assembly.html @@ -22,6 +25,10 @@ delphi/ by Cosmin Truta dotzlib/ by Henrik Ravn Support for Microsoft .Net and Visual C++ .Net +gcc_gvmat64/by Gilles Vollant + GCC Version of x86 64-bit (AMD64 and Intel EM64t) code for x64 + assembler to replace longest_match() and inflate_fast() + infback9/ by Mark Adler Unsupported diffs to infback to decode the deflate64 format @@ -38,20 +45,19 @@ iostream3/ by Ludwig Schwardt and Kevin Ruland Yet another C++ I/O streams interface -masm686/ by Dan Higdon - and Chuck Walbourn - asm code for Pentium Pro/PII, using the MASM syntax - masmx64/ by Gilles Vollant - x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to - replace longest_match() and inflate_fast() + x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to + replace longest_match() and inflate_fast(), also masm x86 + 64-bits translation of Chris Anderson inflate_fast() masmx86/ by Gilles Vollant x86 asm code to replace longest_match() and inflate_fast(), - for Visual C++ and MASM + for Visual C++ and MASM (32 bits). + Based on Brian Raiter (asm686) and Chris Anderson (inflate86) minizip/ by Gilles Vollant Mini zip and unzip based on zlib + Includes Zip64 support by Mathias Svensson See http://www.winimage.com/zLibDll/unzip.html pascal/ by Bob Dellaca et al. diff --git a/compat/zlib/contrib/ada/buffer_demo.adb b/compat/zlib/contrib/ada/buffer_demo.adb index 3926e6f..0e99515 100644 --- a/compat/zlib/contrib/ada/buffer_demo.adb +++ b/compat/zlib/contrib/ada/buffer_demo.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- -- --- $Id: buffer_demo.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: buffer_demo.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ -- This demo program provided by Dr Steve Sangwine -- diff --git a/compat/zlib/contrib/ada/mtest.adb b/compat/zlib/contrib/ada/mtest.adb index 9caaf22..5fbd060 100644 --- a/compat/zlib/contrib/ada/mtest.adb +++ b/compat/zlib/contrib/ada/mtest.adb @@ -8,7 +8,7 @@ -- Continuous test for ZLib multithreading. If the test would fail -- we should provide thread safe allocation routines for the Z_Stream. -- --- $Id: mtest.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: mtest.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ with ZLib; with Ada.Streams; diff --git a/compat/zlib/contrib/ada/read.adb b/compat/zlib/contrib/ada/read.adb index 365d600..5099b32 100644 --- a/compat/zlib/contrib/ada/read.adb +++ b/compat/zlib/contrib/ada/read.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: read.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: read.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ -- Test/demo program for the generic read interface. diff --git a/compat/zlib/contrib/ada/test.adb b/compat/zlib/contrib/ada/test.adb index 11a92d7..0d60e89 100644 --- a/compat/zlib/contrib/ada/test.adb +++ b/compat/zlib/contrib/ada/test.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: test.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: test.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ -- The program has a few aims. -- 1. Test ZLib.Ada95 thick binding functionality. diff --git a/compat/zlib/contrib/ada/zlib-streams.adb b/compat/zlib/contrib/ada/zlib-streams.adb index e90ed11..dd8f409 100644 --- a/compat/zlib/contrib/ada/zlib-streams.adb +++ b/compat/zlib/contrib/ada/zlib-streams.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-streams.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: zlib-streams.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ with Ada.Unchecked_Deallocation; diff --git a/compat/zlib/contrib/ada/zlib-streams.ads b/compat/zlib/contrib/ada/zlib-streams.ads index aeb06b5..9b3fa3e 100644 --- a/compat/zlib/contrib/ada/zlib-streams.ads +++ b/compat/zlib/contrib/ada/zlib-streams.ads @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-streams.ads,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: zlib-streams.ads,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ package ZLib.Streams is diff --git a/compat/zlib/contrib/ada/zlib-thin.adb b/compat/zlib/contrib/ada/zlib-thin.adb index 941f5d0..f3f5cb2 100644 --- a/compat/zlib/contrib/ada/zlib-thin.adb +++ b/compat/zlib/contrib/ada/zlib-thin.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-thin.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: zlib-thin.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ package body ZLib.Thin is diff --git a/compat/zlib/contrib/ada/zlib-thin.ads b/compat/zlib/contrib/ada/zlib-thin.ads index b38fc7c..f295688 100644 --- a/compat/zlib/contrib/ada/zlib-thin.ads +++ b/compat/zlib/contrib/ada/zlib-thin.ads @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-thin.ads,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: zlib-thin.ads,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ with Interfaces.C.Strings; diff --git a/compat/zlib/contrib/ada/zlib.adb b/compat/zlib/contrib/ada/zlib.adb index 80acd9d..5680356 100644 --- a/compat/zlib/contrib/ada/zlib.adb +++ b/compat/zlib/contrib/ada/zlib.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib.adb,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: zlib.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ with Ada.Exceptions; with Ada.Unchecked_Conversion; diff --git a/compat/zlib/contrib/ada/zlib.ads b/compat/zlib/contrib/ada/zlib.ads index 5dfabc3..3166665 100644 --- a/compat/zlib/contrib/ada/zlib.ads +++ b/compat/zlib/contrib/ada/zlib.ads @@ -25,7 +25,7 @@ -- covered by the GNU Public License. -- ------------------------------------------------------------------------------ --- $Id: zlib.ads,v 1.1 2008/12/19 14:44:49 dkf Exp $ +-- $Id: zlib.ads,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ with Ada.Streams; diff --git a/compat/zlib/contrib/amd64/amd64-match.S b/compat/zlib/contrib/amd64/amd64-match.S new file mode 100644 index 0000000..81d4a1c --- /dev/null +++ b/compat/zlib/contrib/amd64/amd64-match.S @@ -0,0 +1,452 @@ +/* + * match.S -- optimized version of longest_match() + * based on the similar work by Gilles Vollant, and Brian Raiter, written 1998 + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the BSD License. Use by owners of Che Guevarra + * parafernalia is prohibited, where possible, and highly discouraged + * elsewhere. + */ + +#ifndef NO_UNDERLINE +# define match_init _match_init +# define longest_match _longest_match +#endif + +#define scanend ebx +#define scanendw bx +#define chainlenwmask edx /* high word: current chain len low word: s->wmask */ +#define curmatch rsi +#define curmatchd esi +#define windowbestlen r8 +#define scanalign r9 +#define scanalignd r9d +#define window r10 +#define bestlen r11 +#define bestlend r11d +#define scanstart r12d +#define scanstartw r12w +#define scan r13 +#define nicematch r14d +#define limit r15 +#define limitd r15d +#define prev rcx + +/* + * The 258 is a "magic number, not a parameter -- changing it + * breaks the hell loose + */ +#define MAX_MATCH (258) +#define MIN_MATCH (3) +#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1) +#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7) + +/* stack frame offsets */ +#define LocalVarsSize (112) +#define _chainlenwmask ( 8-LocalVarsSize)(%rsp) +#define _windowbestlen (16-LocalVarsSize)(%rsp) +#define save_r14 (24-LocalVarsSize)(%rsp) +#define save_rsi (32-LocalVarsSize)(%rsp) +#define save_rbx (40-LocalVarsSize)(%rsp) +#define save_r12 (56-LocalVarsSize)(%rsp) +#define save_r13 (64-LocalVarsSize)(%rsp) +#define save_r15 (80-LocalVarsSize)(%rsp) + + +.globl match_init, longest_match + +/* + * On AMD64 the first argument of a function (in our case -- the pointer to + * deflate_state structure) is passed in %rdi, hence our offsets below are + * all off of that. + */ + +/* you can check the structure offset by running + +#include +#include +#include "deflate.h" + +void print_depl() +{ +deflate_state ds; +deflate_state *s=&ds; +printf("size pointer=%u\n",(int)sizeof(void*)); + +printf("#define dsWSize (%3u)(%%rdi)\n",(int)(((char*)&(s->w_size))-((char*)s))); +printf("#define dsWMask (%3u)(%%rdi)\n",(int)(((char*)&(s->w_mask))-((char*)s))); +printf("#define dsWindow (%3u)(%%rdi)\n",(int)(((char*)&(s->window))-((char*)s))); +printf("#define dsPrev (%3u)(%%rdi)\n",(int)(((char*)&(s->prev))-((char*)s))); +printf("#define dsMatchLen (%3u)(%%rdi)\n",(int)(((char*)&(s->match_length))-((char*)s))); +printf("#define dsPrevMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_match))-((char*)s))); +printf("#define dsStrStart (%3u)(%%rdi)\n",(int)(((char*)&(s->strstart))-((char*)s))); +printf("#define dsMatchStart (%3u)(%%rdi)\n",(int)(((char*)&(s->match_start))-((char*)s))); +printf("#define dsLookahead (%3u)(%%rdi)\n",(int)(((char*)&(s->lookahead))-((char*)s))); +printf("#define dsPrevLen (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_length))-((char*)s))); +printf("#define dsMaxChainLen (%3u)(%%rdi)\n",(int)(((char*)&(s->max_chain_length))-((char*)s))); +printf("#define dsGoodMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->good_match))-((char*)s))); +printf("#define dsNiceMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->nice_match))-((char*)s))); +} + +*/ + + +/* + to compile for XCode 3.2 on MacOSX x86_64 + - run "gcc -g -c -DXCODE_MAC_X64_STRUCTURE amd64-match.S" + */ + + +#ifndef CURRENT_LINX_XCODE_MAC_X64_STRUCTURE +#define dsWSize ( 68)(%rdi) +#define dsWMask ( 76)(%rdi) +#define dsWindow ( 80)(%rdi) +#define dsPrev ( 96)(%rdi) +#define dsMatchLen (144)(%rdi) +#define dsPrevMatch (148)(%rdi) +#define dsStrStart (156)(%rdi) +#define dsMatchStart (160)(%rdi) +#define dsLookahead (164)(%rdi) +#define dsPrevLen (168)(%rdi) +#define dsMaxChainLen (172)(%rdi) +#define dsGoodMatch (188)(%rdi) +#define dsNiceMatch (192)(%rdi) + +#else + +#ifndef STRUCT_OFFSET +# define STRUCT_OFFSET (0) +#endif + + +#define dsWSize ( 56 + STRUCT_OFFSET)(%rdi) +#define dsWMask ( 64 + STRUCT_OFFSET)(%rdi) +#define dsWindow ( 72 + STRUCT_OFFSET)(%rdi) +#define dsPrev ( 88 + STRUCT_OFFSET)(%rdi) +#define dsMatchLen (136 + STRUCT_OFFSET)(%rdi) +#define dsPrevMatch (140 + STRUCT_OFFSET)(%rdi) +#define dsStrStart (148 + STRUCT_OFFSET)(%rdi) +#define dsMatchStart (152 + STRUCT_OFFSET)(%rdi) +#define dsLookahead (156 + STRUCT_OFFSET)(%rdi) +#define dsPrevLen (160 + STRUCT_OFFSET)(%rdi) +#define dsMaxChainLen (164 + STRUCT_OFFSET)(%rdi) +#define dsGoodMatch (180 + STRUCT_OFFSET)(%rdi) +#define dsNiceMatch (184 + STRUCT_OFFSET)(%rdi) + +#endif + + + + +.text + +/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */ + +longest_match: +/* + * Retrieve the function arguments. %curmatch will hold cur_match + * throughout the entire function (passed via rsi on amd64). + * rdi will hold the pointer to the deflate_state (first arg on amd64) + */ + mov %rsi, save_rsi + mov %rbx, save_rbx + mov %r12, save_r12 + mov %r13, save_r13 + mov %r14, save_r14 + mov %r15, save_r15 + +/* uInt wmask = s->w_mask; */ +/* unsigned chain_length = s->max_chain_length; */ +/* if (s->prev_length >= s->good_match) { */ +/* chain_length >>= 2; */ +/* } */ + + movl dsPrevLen, %eax + movl dsGoodMatch, %ebx + cmpl %ebx, %eax + movl dsWMask, %eax + movl dsMaxChainLen, %chainlenwmask + jl LastMatchGood + shrl $2, %chainlenwmask +LastMatchGood: + +/* chainlen is decremented once beforehand so that the function can */ +/* use the sign flag instead of the zero flag for the exit test. */ +/* It is then shifted into the high word, to make room for the wmask */ +/* value, which it will always accompany. */ + + decl %chainlenwmask + shll $16, %chainlenwmask + orl %eax, %chainlenwmask + +/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */ + + movl dsNiceMatch, %eax + movl dsLookahead, %ebx + cmpl %eax, %ebx + jl LookaheadLess + movl %eax, %ebx +LookaheadLess: movl %ebx, %nicematch + +/* register Bytef *scan = s->window + s->strstart; */ + + mov dsWindow, %window + movl dsStrStart, %limitd + lea (%limit, %window), %scan + +/* Determine how many bytes the scan ptr is off from being */ +/* dword-aligned. */ + + mov %scan, %scanalign + negl %scanalignd + andl $3, %scanalignd + +/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */ +/* s->strstart - (IPos)MAX_DIST(s) : NIL; */ + + movl dsWSize, %eax + subl $MIN_LOOKAHEAD, %eax + xorl %ecx, %ecx + subl %eax, %limitd + cmovng %ecx, %limitd + +/* int best_len = s->prev_length; */ + + movl dsPrevLen, %bestlend + +/* Store the sum of s->window + best_len in %windowbestlen locally, and in memory. */ + + lea (%window, %bestlen), %windowbestlen + mov %windowbestlen, _windowbestlen + +/* register ush scan_start = *(ushf*)scan; */ +/* register ush scan_end = *(ushf*)(scan+best_len-1); */ +/* Posf *prev = s->prev; */ + + movzwl (%scan), %scanstart + movzwl -1(%scan, %bestlen), %scanend + mov dsPrev, %prev + +/* Jump into the main loop. */ + + movl %chainlenwmask, _chainlenwmask + jmp LoopEntry + +.balign 16 + +/* do { + * match = s->window + cur_match; + * if (*(ushf*)(match+best_len-1) != scan_end || + * *(ushf*)match != scan_start) continue; + * [...] + * } while ((cur_match = prev[cur_match & wmask]) > limit + * && --chain_length != 0); + * + * Here is the inner loop of the function. The function will spend the + * majority of its time in this loop, and majority of that time will + * be spent in the first ten instructions. + */ +LookupLoop: + andl %chainlenwmask, %curmatchd + movzwl (%prev, %curmatch, 2), %curmatchd + cmpl %limitd, %curmatchd + jbe LeaveNow + subl $0x00010000, %chainlenwmask + js LeaveNow +LoopEntry: cmpw -1(%windowbestlen, %curmatch), %scanendw + jne LookupLoop + cmpw %scanstartw, (%window, %curmatch) + jne LookupLoop + +/* Store the current value of chainlen. */ + movl %chainlenwmask, _chainlenwmask + +/* %scan is the string under scrutiny, and %prev to the string we */ +/* are hoping to match it up with. In actuality, %esi and %edi are */ +/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */ +/* initialized to -(MAX_MATCH_8 - scanalign). */ + + mov $(-MAX_MATCH_8), %rdx + lea (%curmatch, %window), %windowbestlen + lea MAX_MATCH_8(%windowbestlen, %scanalign), %windowbestlen + lea MAX_MATCH_8(%scan, %scanalign), %prev + +/* the prefetching below makes very little difference... */ + prefetcht1 (%windowbestlen, %rdx) + prefetcht1 (%prev, %rdx) + +/* + * Test the strings for equality, 8 bytes at a time. At the end, + * adjust %rdx so that it is offset to the exact byte that mismatched. + * + * It should be confessed that this loop usually does not represent + * much of the total running time. Replacing it with a more + * straightforward "rep cmpsb" would not drastically degrade + * performance -- unrolling it, for example, makes no difference. + */ + +#undef USE_SSE /* works, but is 6-7% slower, than non-SSE... */ + +LoopCmps: +#ifdef USE_SSE + /* Preload the SSE registers */ + movdqu (%windowbestlen, %rdx), %xmm1 + movdqu (%prev, %rdx), %xmm2 + pcmpeqb %xmm2, %xmm1 + movdqu 16(%windowbestlen, %rdx), %xmm3 + movdqu 16(%prev, %rdx), %xmm4 + pcmpeqb %xmm4, %xmm3 + movdqu 32(%windowbestlen, %rdx), %xmm5 + movdqu 32(%prev, %rdx), %xmm6 + pcmpeqb %xmm6, %xmm5 + movdqu 48(%windowbestlen, %rdx), %xmm7 + movdqu 48(%prev, %rdx), %xmm8 + pcmpeqb %xmm8, %xmm7 + + /* Check the comparisions' results */ + pmovmskb %xmm1, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + /* this is the only iteration of the loop with a possibility of having + incremented rdx by 0x108 (each loop iteration add 16*4 = 0x40 + and (0x40*4)+8=0x108 */ + add $8, %rdx + jz LenMaximum + add $8, %rdx + + + pmovmskb %xmm3, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + + add $16, %rdx + + + pmovmskb %xmm5, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + add $16, %rdx + + + pmovmskb %xmm7, %rax + notw %ax + bsfw %ax, %ax + jnz LeaveLoopCmps + + add $16, %rdx + + jmp LoopCmps +LeaveLoopCmps: add %rax, %rdx +#else + mov (%windowbestlen, %rdx), %rax + xor (%prev, %rdx), %rax + jnz LeaveLoopCmps + + mov 8(%windowbestlen, %rdx), %rax + xor 8(%prev, %rdx), %rax + jnz LeaveLoopCmps8 + + mov 16(%windowbestlen, %rdx), %rax + xor 16(%prev, %rdx), %rax + jnz LeaveLoopCmps16 + + add $24, %rdx + jnz LoopCmps + jmp LenMaximum +# if 0 +/* + * This three-liner is tantalizingly simple, but bsf is a slow instruction, + * and the complicated alternative down below is quite a bit faster. Sad... + */ + +LeaveLoopCmps: bsf %rax, %rax /* find the first non-zero bit */ + shrl $3, %eax /* divide by 8 to get the byte */ + add %rax, %rdx +# else +LeaveLoopCmps16: + add $8, %rdx +LeaveLoopCmps8: + add $8, %rdx +LeaveLoopCmps: testl $0xFFFFFFFF, %eax /* Check the first 4 bytes */ + jnz Check16 + add $4, %rdx + shr $32, %rax +Check16: testw $0xFFFF, %ax + jnz LenLower + add $2, %rdx + shrl $16, %eax +LenLower: subb $1, %al + adc $0, %rdx +# endif +#endif + +/* Calculate the length of the match. If it is longer than MAX_MATCH, */ +/* then automatically accept it as the best possible match and leave. */ + + lea (%prev, %rdx), %rax + sub %scan, %rax + cmpl $MAX_MATCH, %eax + jge LenMaximum + +/* If the length of the match is not longer than the best match we */ +/* have so far, then forget it and return to the lookup loop. */ + + cmpl %bestlend, %eax + jg LongerMatch + mov _windowbestlen, %windowbestlen + mov dsPrev, %prev + movl _chainlenwmask, %edx + jmp LookupLoop + +/* s->match_start = cur_match; */ +/* best_len = len; */ +/* if (len >= nice_match) break; */ +/* scan_end = *(ushf*)(scan+best_len-1); */ + +LongerMatch: + movl %eax, %bestlend + movl %curmatchd, dsMatchStart + cmpl %nicematch, %eax + jge LeaveNow + + lea (%window, %bestlen), %windowbestlen + mov %windowbestlen, _windowbestlen + + movzwl -1(%scan, %rax), %scanend + mov dsPrev, %prev + movl _chainlenwmask, %chainlenwmask + jmp LookupLoop + +/* Accept the current string, with the maximum possible length. */ + +LenMaximum: + movl $MAX_MATCH, %bestlend + movl %curmatchd, dsMatchStart + +/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */ +/* return s->lookahead; */ + +LeaveNow: + movl dsLookahead, %eax + cmpl %eax, %bestlend + cmovngl %bestlend, %eax +LookaheadRet: + +/* Restore the registers and return from whence we came. */ + + mov save_rsi, %rsi + mov save_rbx, %rbx + mov save_r12, %r12 + mov save_r13, %r13 + mov save_r14, %r14 + mov save_r15, %r15 + + ret + +match_init: ret diff --git a/compat/zlib/contrib/asm686/README.686 b/compat/zlib/contrib/asm686/README.686 index a593f23..a0bf3be 100644 --- a/compat/zlib/contrib/asm686/README.686 +++ b/compat/zlib/contrib/asm686/README.686 @@ -32,3 +32,20 @@ then do: CFLAGS="-O3 -DASMV" ./configure make OBJA=match.o + + +Update: + +I've been ignoring these assembly routines for years, believing that +gcc's generated code had caught up with it sometime around gcc 2.95 +and the major rearchitecting of the Pentium 4. However, I recently +learned that, despite what I believed, this code still has some life +in it. On the Pentium 4 and AMD64 chips, it continues to run about 8% +faster than the code produced by gcc 4.1. + +In acknowledgement of its continuing usefulness, I've altered the +license to match that of the rest of zlib. Share and Enjoy! + +Brian Raiter +breadbox@muppetlabs.com +April, 2007 diff --git a/compat/zlib/contrib/asm686/match.S b/compat/zlib/contrib/asm686/match.S index 5c3e9ee..06817e1 100644 --- a/compat/zlib/contrib/asm686/match.S +++ b/compat/zlib/contrib/asm686/match.S @@ -1,9 +1,23 @@ -/* match.s -- Pentium-Pro-optimized version of longest_match() - * Written for zlib 1.1.2 - * Copyright (C) 1998 Brian Raiter +/* match.S -- x86 assembly version of the zlib longest_match() function. + * Optimized for the Intel 686 chips (PPro and later). * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License. + * Copyright (C) 1998, 2007 Brian Raiter + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. */ #ifndef NO_UNDERLINE diff --git a/compat/zlib/contrib/delphi/ZLib.pas b/compat/zlib/contrib/delphi/ZLib.pas index 3f2b8b4..179f9a9 100644 --- a/compat/zlib/contrib/delphi/ZLib.pas +++ b/compat/zlib/contrib/delphi/ZLib.pas @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; const OutBuf: Pointer; BufSize: Integer); const - zlib_version = '1.2.3'; + zlib_version = '1.2.4'; type EZlibError = class(Exception); diff --git a/compat/zlib/contrib/delphi/zlibd32.mak b/compat/zlib/contrib/delphi/zlibd32.mak index 88fafa0..0d0699a 100644 --- a/compat/zlib/contrib/delphi/zlibd32.mak +++ b/compat/zlib/contrib/delphi/zlibd32.mak @@ -18,10 +18,10 @@ LDFLAGS = # variables ZLIB_LIB = zlib.lib -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj -OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj -OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj # targets @@ -38,7 +38,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -gzio.obj: gzio.c zutil.h zlib.h zconf.h +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ inffast.h inffixed.h diff --git a/compat/zlib/contrib/dotzlib/DotZLib.build b/compat/zlib/contrib/dotzlib/DotZLib.build index ed19cc9..e69630c 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib.build +++ b/compat/zlib/contrib/dotzlib/DotZLib.build @@ -1,33 +1,33 @@ - - - A .Net wrapper library around ZLib1.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + A .Net wrapper library around ZLib1.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/DotZLib.chm b/compat/zlib/contrib/dotzlib/DotZLib.chm index 0bc7df7..f214a44 100644 Binary files a/compat/zlib/contrib/dotzlib/DotZLib.chm and b/compat/zlib/contrib/dotzlib/DotZLib.chm differ diff --git a/compat/zlib/contrib/dotzlib/DotZLib.sln b/compat/zlib/contrib/dotzlib/DotZLib.sln index ac45ca0..5d533d6 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib.sln +++ b/compat/zlib/contrib/dotzlib/DotZLib.sln @@ -1,21 +1,21 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs index 6fc0fdc..724c534 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs @@ -1,58 +1,58 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("DotZLib")] -[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Henrik Ravn")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("DotZLib")] +[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Henrik Ravn")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs index dfe7e90..b110dae 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -1,202 +1,202 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Runtime.InteropServices; -using System.Text; - - -namespace DotZLib -{ - #region ChecksumGeneratorBase - /// - /// Implements the common functionality needed for all s - /// - /// - public abstract class ChecksumGeneratorBase : ChecksumGenerator - { - /// - /// The value of the current checksum - /// - protected uint _current; - - /// - /// Initializes a new instance of the checksum generator base - the current checksum is - /// set to zero - /// - public ChecksumGeneratorBase() - { - _current = 0; - } - - /// - /// Initializes a new instance of the checksum generator basewith a specified value - /// - /// The value to set the current checksum to - public ChecksumGeneratorBase(uint initialValue) - { - _current = initialValue; - } - - /// - /// Resets the current checksum to zero - /// - public void Reset() { _current = 0; } - - /// - /// Gets the current checksum value - /// - public uint Value { get { return _current; } } - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - /// All the other Update methods are implmeneted in terms of this one. - /// This is therefore the only method a derived class has to implement - public abstract void Update(byte[] data, int offset, int count); - - /// - /// Updates the current checksum with an array of bytes. - /// - /// The data to update the checksum with - public void Update(byte[] data) - { - Update(data, 0, data.Length); - } - - /// - /// Updates the current checksum with the data from a string - /// - /// The string to update the checksum with - /// The characters in the string are converted by the UTF-8 encoding - public void Update(string data) - { - Update(Encoding.UTF8.GetBytes(data)); - } - - /// - /// Updates the current checksum with the data from a string, using a specific encoding - /// - /// The string to update the checksum with - /// The encoding to use - public void Update(string data, Encoding encoding) - { - Update(encoding.GetBytes(data)); - } - - } - #endregion - - #region CRC32 - /// - /// Implements a CRC32 checksum generator - /// - public sealed class CRC32Checksum : ChecksumGeneratorBase - { - #region DLL imports - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint crc32(uint crc, int data, uint length); - - #endregion - - /// - /// Initializes a new instance of the CRC32 checksum generator - /// - public CRC32Checksum() : base() {} - - /// - /// Initializes a new instance of the CRC32 checksum generator with a specified value - /// - /// The value to set the current checksum to - public CRC32Checksum(uint initialValue) : base(initialValue) {} - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - public override void Update(byte[] data, int offset, int count) - { - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); - try - { - _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); - } - finally - { - hData.Free(); - } - } - - } - #endregion - - #region Adler - /// - /// Implements a checksum generator that computes the Adler checksum on data - /// - public sealed class AdlerChecksum : ChecksumGeneratorBase - { - #region DLL imports - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint adler32(uint adler, int data, uint length); - - #endregion - - /// - /// Initializes a new instance of the Adler checksum generator - /// - public AdlerChecksum() : base() {} - - /// - /// Initializes a new instance of the Adler checksum generator with a specified value - /// - /// The value to set the current checksum to - public AdlerChecksum(uint initialValue) : base(initialValue) {} - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - public override void Update(byte[] data, int offset, int count) - { - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); - try - { - _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); - } - finally - { - hData.Free(); - } - } - - } - #endregion - +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + #region ChecksumGeneratorBase + /// + /// Implements the common functionality needed for all s + /// + /// + public abstract class ChecksumGeneratorBase : ChecksumGenerator + { + /// + /// The value of the current checksum + /// + protected uint _current; + + /// + /// Initializes a new instance of the checksum generator base - the current checksum is + /// set to zero + /// + public ChecksumGeneratorBase() + { + _current = 0; + } + + /// + /// Initializes a new instance of the checksum generator basewith a specified value + /// + /// The value to set the current checksum to + public ChecksumGeneratorBase(uint initialValue) + { + _current = initialValue; + } + + /// + /// Resets the current checksum to zero + /// + public void Reset() { _current = 0; } + + /// + /// Gets the current checksum value + /// + public uint Value { get { return _current; } } + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + /// All the other Update methods are implmeneted in terms of this one. + /// This is therefore the only method a derived class has to implement + public abstract void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with an array of bytes. + /// + /// The data to update the checksum with + public void Update(byte[] data) + { + Update(data, 0, data.Length); + } + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + public void Update(string data) + { + Update(Encoding.UTF8.GetBytes(data)); + } + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + public void Update(string data, Encoding encoding) + { + Update(encoding.GetBytes(data)); + } + + } + #endregion + + #region CRC32 + /// + /// Implements a CRC32 checksum generator + /// + public sealed class CRC32Checksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint crc32(uint crc, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the CRC32 checksum generator + /// + public CRC32Checksum() : base() {} + + /// + /// Initializes a new instance of the CRC32 checksum generator with a specified value + /// + /// The value to set the current checksum to + public CRC32Checksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + + #region Adler + /// + /// Implements a checksum generator that computes the Adler checksum on data + /// + public sealed class AdlerChecksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint adler32(uint adler, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the Adler checksum generator + /// + public AdlerChecksum() : base() {} + + /// + /// Initializes a new instance of the Adler checksum generator with a specified value + /// + /// The value to set the current checksum to + public AdlerChecksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + } \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs index 16997e9..9c8d601 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs @@ -1,83 +1,83 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; - -namespace DotZLib -{ - - /// - /// This class implements a circular buffer - /// - internal class CircularBuffer - { - #region Private data - private int _capacity; - private int _head; - private int _tail; - private int _size; - private byte[] _buffer; - #endregion - - public CircularBuffer(int capacity) - { - Debug.Assert( capacity > 0 ); - _buffer = new byte[capacity]; - _capacity = capacity; - _head = 0; - _tail = 0; - _size = 0; - } - - public int Size { get { return _size; } } - - public int Put(byte[] source, int offset, int count) - { - Debug.Assert( count > 0 ); - int trueCount = Math.Min(count, _capacity - Size); - for (int i = 0; i < trueCount; ++i) - _buffer[(_tail+i) % _capacity] = source[offset+i]; - _tail += trueCount; - _tail %= _capacity; - _size += trueCount; - return trueCount; - } - - public bool Put(byte b) - { - if (Size == _capacity) // no room - return false; - _buffer[_tail++] = b; - _tail %= _capacity; - ++_size; - return true; - } - - public int Get(byte[] destination, int offset, int count) - { - int trueCount = Math.Min(count,Size); - for (int i = 0; i < trueCount; ++i) - destination[offset + i] = _buffer[(_head+i) % _capacity]; - _head += trueCount; - _head %= _capacity; - _size -= trueCount; - return trueCount; - } - - public int Get() - { - if (Size == 0) - return -1; - - int result = (int)_buffer[_head++ % _capacity]; - --_size; - return result; - } - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; + +namespace DotZLib +{ + + /// + /// This class implements a circular buffer + /// + internal class CircularBuffer + { + #region Private data + private int _capacity; + private int _head; + private int _tail; + private int _size; + private byte[] _buffer; + #endregion + + public CircularBuffer(int capacity) + { + Debug.Assert( capacity > 0 ); + _buffer = new byte[capacity]; + _capacity = capacity; + _head = 0; + _tail = 0; + _size = 0; + } + + public int Size { get { return _size; } } + + public int Put(byte[] source, int offset, int count) + { + Debug.Assert( count > 0 ); + int trueCount = Math.Min(count, _capacity - Size); + for (int i = 0; i < trueCount; ++i) + _buffer[(_tail+i) % _capacity] = source[offset+i]; + _tail += trueCount; + _tail %= _capacity; + _size += trueCount; + return trueCount; + } + + public bool Put(byte b) + { + if (Size == _capacity) // no room + return false; + _buffer[_tail++] = b; + _tail %= _capacity; + ++_size; + return true; + } + + public int Get(byte[] destination, int offset, int count) + { + int trueCount = Math.Min(count,Size); + for (int i = 0; i < trueCount; ++i) + destination[offset + i] = _buffer[(_head+i) % _capacity]; + _head += trueCount; + _head %= _capacity; + _size -= trueCount; + return trueCount; + } + + public int Get() + { + if (Size == 0) + return -1; + + int result = (int)_buffer[_head++ % _capacity]; + --_size; + return result; + } + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs index 954db7d..b0eb78a 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs @@ -1,198 +1,198 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - /// - /// Implements the common functionality needed for all s - /// - public abstract class CodecBase : Codec, IDisposable - { - - #region Data members - - /// - /// Instance of the internal zlib buffer structure that is - /// passed to all functions in the zlib dll - /// - internal ZStream _ztream = new ZStream(); - - /// - /// True if the object instance has been disposed, false otherwise - /// - protected bool _isDisposed = false; - - /// - /// The size of the internal buffers - /// - protected const int kBufferSize = 16384; - - private byte[] _outBuffer = new byte[kBufferSize]; - private byte[] _inBuffer = new byte[kBufferSize]; - - private GCHandle _hInput; - private GCHandle _hOutput; - - private uint _checksum = 0; - - #endregion - - /// - /// Initializes a new instance of the CodeBase class. - /// - public CodecBase() - { - try - { - _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned); - _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned); - } - catch (Exception) - { - CleanUp(false); - throw; - } - } - - - #region Codec Members - - /// - /// Occurs when more processed data are available. - /// - public event DataAvailableHandler DataAvailable; - - /// - /// Fires the event - /// - protected void OnDataAvailable() - { - if (_ztream.total_out > 0) - { - if (DataAvailable != null) - DataAvailable( _outBuffer, 0, (int)_ztream.total_out); - resetOutput(); - } - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// Adding data may, or may not, raise the DataAvailable event - public void Add(byte[] data) - { - Add(data,0,data.Length); - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - /// This must be implemented by a derived class - public abstract void Add(byte[] data, int offset, int count); - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - /// This must be implemented by a derived class - public abstract void Finish(); - - /// - /// Gets the checksum of the data that has been added so far - /// - public uint Checksum { get { return _checksum; } } - - #endregion - - #region Destructor & IDisposable stuff - - /// - /// Destroys this instance - /// - ~CodecBase() - { - CleanUp(false); - } - - /// - /// Releases any unmanaged resources and calls the method of the derived class - /// - public void Dispose() - { - CleanUp(true); - } - - /// - /// Performs any codec specific cleanup - /// - /// This must be implemented by a derived class - protected abstract void CleanUp(); - - // performs the release of the handles and calls the dereived CleanUp() - private void CleanUp(bool isDisposing) - { - if (!_isDisposed) - { - CleanUp(); - if (_hInput.IsAllocated) - _hInput.Free(); - if (_hOutput.IsAllocated) - _hOutput.Free(); - - _isDisposed = true; - } - } - - - #endregion - - #region Helper methods - - /// - /// Copies a number of bytes to the internal codec buffer - ready for proccesing - /// - /// The byte array that contains the data to copy - /// The index of the first byte to copy - /// The number of bytes to copy from data - protected void copyInput(byte[] data, int startIndex, int count) - { - Array.Copy(data, startIndex, _inBuffer,0, count); - _ztream.next_in = _hInput.AddrOfPinnedObject(); - _ztream.total_in = 0; - _ztream.avail_in = (uint)count; - - } - - /// - /// Resets the internal output buffers to a known state - ready for processing - /// - protected void resetOutput() - { - _ztream.total_out = 0; - _ztream.avail_out = kBufferSize; - _ztream.next_out = _hOutput.AddrOfPinnedObject(); - } - - /// - /// Updates the running checksum property - /// - /// The new checksum value - protected void setChecksum(uint newSum) - { - _checksum = newSum; - } - #endregion - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements the common functionality needed for all s + /// + public abstract class CodecBase : Codec, IDisposable + { + + #region Data members + + /// + /// Instance of the internal zlib buffer structure that is + /// passed to all functions in the zlib dll + /// + internal ZStream _ztream = new ZStream(); + + /// + /// True if the object instance has been disposed, false otherwise + /// + protected bool _isDisposed = false; + + /// + /// The size of the internal buffers + /// + protected const int kBufferSize = 16384; + + private byte[] _outBuffer = new byte[kBufferSize]; + private byte[] _inBuffer = new byte[kBufferSize]; + + private GCHandle _hInput; + private GCHandle _hOutput; + + private uint _checksum = 0; + + #endregion + + /// + /// Initializes a new instance of the CodeBase class. + /// + public CodecBase() + { + try + { + _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned); + _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned); + } + catch (Exception) + { + CleanUp(false); + throw; + } + } + + + #region Codec Members + + /// + /// Occurs when more processed data are available. + /// + public event DataAvailableHandler DataAvailable; + + /// + /// Fires the event + /// + protected void OnDataAvailable() + { + if (_ztream.total_out > 0) + { + if (DataAvailable != null) + DataAvailable( _outBuffer, 0, (int)_ztream.total_out); + resetOutput(); + } + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + public void Add(byte[] data) + { + Add(data,0,data.Length); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + /// This must be implemented by a derived class + public abstract void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + /// This must be implemented by a derived class + public abstract void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + public uint Checksum { get { return _checksum; } } + + #endregion + + #region Destructor & IDisposable stuff + + /// + /// Destroys this instance + /// + ~CodecBase() + { + CleanUp(false); + } + + /// + /// Releases any unmanaged resources and calls the method of the derived class + /// + public void Dispose() + { + CleanUp(true); + } + + /// + /// Performs any codec specific cleanup + /// + /// This must be implemented by a derived class + protected abstract void CleanUp(); + + // performs the release of the handles and calls the dereived CleanUp() + private void CleanUp(bool isDisposing) + { + if (!_isDisposed) + { + CleanUp(); + if (_hInput.IsAllocated) + _hInput.Free(); + if (_hOutput.IsAllocated) + _hOutput.Free(); + + _isDisposed = true; + } + } + + + #endregion + + #region Helper methods + + /// + /// Copies a number of bytes to the internal codec buffer - ready for proccesing + /// + /// The byte array that contains the data to copy + /// The index of the first byte to copy + /// The number of bytes to copy from data + protected void copyInput(byte[] data, int startIndex, int count) + { + Array.Copy(data, startIndex, _inBuffer,0, count); + _ztream.next_in = _hInput.AddrOfPinnedObject(); + _ztream.total_in = 0; + _ztream.avail_in = (uint)count; + + } + + /// + /// Resets the internal output buffers to a known state - ready for processing + /// + protected void resetOutput() + { + _ztream.total_out = 0; + _ztream.avail_out = kBufferSize; + _ztream.next_out = _hOutput.AddrOfPinnedObject(); + } + + /// + /// Updates the running checksum property + /// + /// The new checksum value + protected void setChecksum(uint newSum) + { + _checksum = newSum; + } + #endregion + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs index d7b8dcc..9039f41 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs @@ -1,106 +1,106 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - - /// - /// Implements a data compressor, using the deflate algorithm in the ZLib dll - /// - public sealed class Deflater : CodecBase - { - #region Dll imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflate(ref ZStream sz, int flush); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflateReset(ref ZStream sz); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflateEnd(ref ZStream sz); - #endregion - - /// - /// Constructs an new instance of the Deflater - /// - /// The compression level to use for this Deflater - public Deflater(CompressLevel level) : base() - { - int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream)); - if (retval != 0) - throw new ZLibException(retval, "Could not initialize deflater"); - - resetOutput(); - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - public override void Add(byte[] data, int offset, int count) - { - if (data == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - - int total = count; - int inputIndex = offset; - int err = 0; - - while (err >= 0 && inputIndex < total) - { - copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); - while (err >= 0 && _ztream.avail_in > 0) - { - err = deflate(ref _ztream, (int)FlushTypes.None); - if (err == 0) - while (_ztream.avail_out == 0) - { - OnDataAvailable(); - err = deflate(ref _ztream, (int)FlushTypes.None); - } - inputIndex += (int)_ztream.total_in; - } - } - setChecksum( _ztream.adler ); - } - - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - public override void Finish() - { - int err; - do - { - err = deflate(ref _ztream, (int)FlushTypes.Finish); - OnDataAvailable(); - } - while (err == 0); - setChecksum( _ztream.adler ); - deflateReset(ref _ztream); - resetOutput(); - } - - /// - /// Closes the internal zlib deflate stream - /// - protected override void CleanUp() { deflateEnd(ref _ztream); } - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data compressor, using the deflate algorithm in the ZLib dll + /// + public sealed class Deflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Deflater + /// + /// The compression level to use for this Deflater + public Deflater(CompressLevel level) : base() + { + int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize deflater"); + + resetOutput(); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + while (err >= 0 && _ztream.avail_in > 0) + { + err = deflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = deflate(ref _ztream, (int)FlushTypes.None); + } + inputIndex += (int)_ztream.total_in; + } + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = deflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + deflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib deflate stream + /// + protected override void CleanUp() { deflateEnd(ref _ztream); } + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs index 410deb0..90c7c3b 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs @@ -1,288 +1,288 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; - - -namespace DotZLib -{ - - #region Internal types - - /// - /// Defines constants for the various flush types used with zlib - /// - internal enum FlushTypes - { - None, Partial, Sync, Full, Finish, Block - } - - #region ZStream structure - // internal mapping of the zlib zstream structure for marshalling - [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)] - internal struct ZStream - { - public IntPtr next_in; - public uint avail_in; - public uint total_in; - - public IntPtr next_out; - public uint avail_out; - public uint total_out; - - [MarshalAs(UnmanagedType.LPStr)] - string msg; - uint state; - - uint zalloc; - uint zfree; - uint opaque; - - int data_type; - public uint adler; - uint reserved; - } - - #endregion - - #endregion - - #region Public enums - /// - /// Defines constants for the available compression levels in zlib - /// - public enum CompressLevel : int - { - /// - /// The default compression level with a reasonable compromise between compression and speed - /// - Default = -1, - /// - /// No compression at all. The data are passed straight through. - /// - None = 0, - /// - /// The maximum compression rate available. - /// - Best = 9, - /// - /// The fastest available compression level. - /// - Fastest = 1 - } - #endregion - - #region Exception classes - /// - /// The exception that is thrown when an error occurs on the zlib dll - /// - public class ZLibException : ApplicationException - { - /// - /// Initializes a new instance of the class with a specified - /// error message and error code - /// - /// The zlib error code that caused the exception - /// A message that (hopefully) describes the error - public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg)) - { - } - - /// - /// Initializes a new instance of the class with a specified - /// error code - /// - /// The zlib error code that caused the exception - public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode)) - { - } - } - #endregion - - #region Interfaces - - /// - /// Declares methods and properties that enables a running checksum to be calculated - /// - public interface ChecksumGenerator - { - /// - /// Gets the current value of the checksum - /// - uint Value { get; } - - /// - /// Clears the current checksum to 0 - /// - void Reset(); - - /// - /// Updates the current checksum with an array of bytes - /// - /// The data to update the checksum with - void Update(byte[] data); - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - void Update(byte[] data, int offset, int count); - - /// - /// Updates the current checksum with the data from a string - /// - /// The string to update the checksum with - /// The characters in the string are converted by the UTF-8 encoding - void Update(string data); - - /// - /// Updates the current checksum with the data from a string, using a specific encoding - /// - /// The string to update the checksum with - /// The encoding to use - void Update(string data, Encoding encoding); - } - - - /// - /// Represents the method that will be called from a codec when new data - /// are available. - /// - /// The byte array containing the processed data - /// The index of the first processed byte in data - /// The number of processed bytes available - /// On return from this method, the data may be overwritten, so grab it while you can. - /// You cannot assume that startIndex will be zero. - /// - public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); - - /// - /// Declares methods and events for implementing compressors/decompressors - /// - public interface Codec - { - /// - /// Occurs when more processed data are available. - /// - event DataAvailableHandler DataAvailable; - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// Adding data may, or may not, raise the DataAvailable event - void Add(byte[] data); - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - void Add(byte[] data, int offset, int count); - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - void Finish(); - - /// - /// Gets the checksum of the data that has been added so far - /// - uint Checksum { get; } - - - } - - #endregion - - #region Classes - /// - /// Encapsulates general information about the ZLib library - /// - public class Info - { - #region DLL imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint zlibCompileFlags(); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern string zlibVersion(); - #endregion - - #region Private stuff - private uint _flags; - - // helper function that unpacks a bitsize mask - private static int bitSize(uint bits) - { - switch (bits) - { - case 0: return 16; - case 1: return 32; - case 2: return 64; - } - return -1; - } - #endregion - - /// - /// Constructs an instance of the Info class. - /// - public Info() - { - _flags = zlibCompileFlags(); - } - - /// - /// True if the library is compiled with debug info - /// - public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } } - - /// - /// True if the library is compiled with assembly optimizations - /// - public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } } - - /// - /// Gets the size of the unsigned int that was compiled into Zlib - /// - public int SizeOfUInt { get { return bitSize(_flags & 3); } } - - /// - /// Gets the size of the unsigned long that was compiled into Zlib - /// - public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } } - - /// - /// Gets the size of the pointers that were compiled into Zlib - /// - public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } } - - /// - /// Gets the size of the z_off_t type that was compiled into Zlib - /// - public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } } - - /// - /// Gets the version of ZLib as a string, e.g. "1.2.1" - /// - public static string Version { get { return zlibVersion(); } } - } - - #endregion - -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + + #region Internal types + + /// + /// Defines constants for the various flush types used with zlib + /// + internal enum FlushTypes + { + None, Partial, Sync, Full, Finish, Block + } + + #region ZStream structure + // internal mapping of the zlib zstream structure for marshalling + [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)] + internal struct ZStream + { + public IntPtr next_in; + public uint avail_in; + public uint total_in; + + public IntPtr next_out; + public uint avail_out; + public uint total_out; + + [MarshalAs(UnmanagedType.LPStr)] + string msg; + uint state; + + uint zalloc; + uint zfree; + uint opaque; + + int data_type; + public uint adler; + uint reserved; + } + + #endregion + + #endregion + + #region Public enums + /// + /// Defines constants for the available compression levels in zlib + /// + public enum CompressLevel : int + { + /// + /// The default compression level with a reasonable compromise between compression and speed + /// + Default = -1, + /// + /// No compression at all. The data are passed straight through. + /// + None = 0, + /// + /// The maximum compression rate available. + /// + Best = 9, + /// + /// The fastest available compression level. + /// + Fastest = 1 + } + #endregion + + #region Exception classes + /// + /// The exception that is thrown when an error occurs on the zlib dll + /// + public class ZLibException : ApplicationException + { + /// + /// Initializes a new instance of the class with a specified + /// error message and error code + /// + /// The zlib error code that caused the exception + /// A message that (hopefully) describes the error + public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg)) + { + } + + /// + /// Initializes a new instance of the class with a specified + /// error code + /// + /// The zlib error code that caused the exception + public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode)) + { + } + } + #endregion + + #region Interfaces + + /// + /// Declares methods and properties that enables a running checksum to be calculated + /// + public interface ChecksumGenerator + { + /// + /// Gets the current value of the checksum + /// + uint Value { get; } + + /// + /// Clears the current checksum to 0 + /// + void Reset(); + + /// + /// Updates the current checksum with an array of bytes + /// + /// The data to update the checksum with + void Update(byte[] data); + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + void Update(string data); + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + void Update(string data, Encoding encoding); + } + + + /// + /// Represents the method that will be called from a codec when new data + /// are available. + /// + /// The byte array containing the processed data + /// The index of the first processed byte in data + /// The number of processed bytes available + /// On return from this method, the data may be overwritten, so grab it while you can. + /// You cannot assume that startIndex will be zero. + /// + public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); + + /// + /// Declares methods and events for implementing compressors/decompressors + /// + public interface Codec + { + /// + /// Occurs when more processed data are available. + /// + event DataAvailableHandler DataAvailable; + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data); + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + uint Checksum { get; } + + + } + + #endregion + + #region Classes + /// + /// Encapsulates general information about the ZLib library + /// + public class Info + { + #region DLL imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint zlibCompileFlags(); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern string zlibVersion(); + #endregion + + #region Private stuff + private uint _flags; + + // helper function that unpacks a bitsize mask + private static int bitSize(uint bits) + { + switch (bits) + { + case 0: return 16; + case 1: return 32; + case 2: return 64; + } + return -1; + } + #endregion + + /// + /// Constructs an instance of the Info class. + /// + public Info() + { + _flags = zlibCompileFlags(); + } + + /// + /// True if the library is compiled with debug info + /// + public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } } + + /// + /// True if the library is compiled with assembly optimizations + /// + public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } } + + /// + /// Gets the size of the unsigned int that was compiled into Zlib + /// + public int SizeOfUInt { get { return bitSize(_flags & 3); } } + + /// + /// Gets the size of the unsigned long that was compiled into Zlib + /// + public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } } + + /// + /// Gets the size of the pointers that were compiled into Zlib + /// + public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } } + + /// + /// Gets the size of the z_off_t type that was compiled into Zlib + /// + public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } } + + /// + /// Gets the version of ZLib as a string, e.g. "1.2.1" + /// + public static string Version { get { return zlibVersion(); } } + } + + #endregion + +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj index 71eeb85..dea7fb1 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +++ b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj @@ -1,141 +1,141 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs index f861675..f0eada1 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs @@ -1,301 +1,301 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - /// - /// Implements a compressed , in GZip (.gz) format. - /// - public class GZipStream : Stream, IDisposable - { - #region Dll Imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern IntPtr gzopen(string name, string mode); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzclose(IntPtr gzFile); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzwrite(IntPtr gzFile, int data, int length); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzread(IntPtr gzFile, int data, int length); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzgetc(IntPtr gzFile); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzputc(IntPtr gzFile, int c); - - #endregion - - #region Private data - private IntPtr _gzFile; - private bool _isDisposed = false; - private bool _isWriting; - #endregion - - #region Constructors - /// - /// Creates a new file as a writeable GZipStream - /// - /// The name of the compressed file to create - /// The compression level to use when adding data - /// If an error occurred in the internal zlib function - public GZipStream(string fileName, CompressLevel level) - { - _isWriting = true; - _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level)); - if (_gzFile == IntPtr.Zero) - throw new ZLibException(-1, "Could not open " + fileName); - } - - /// - /// Opens an existing file as a readable GZipStream - /// - /// The name of the file to open - /// If an error occurred in the internal zlib function - public GZipStream(string fileName) - { - _isWriting = false; - _gzFile = gzopen(fileName, "rb"); - if (_gzFile == IntPtr.Zero) - throw new ZLibException(-1, "Could not open " + fileName); - - } - #endregion - - #region Access properties - /// - /// Returns true of this stream can be read from, false otherwise - /// - public override bool CanRead - { - get - { - return !_isWriting; - } - } - - - /// - /// Returns false. - /// - public override bool CanSeek - { - get - { - return false; - } - } - - /// - /// Returns true if this tsream is writeable, false otherwise - /// - public override bool CanWrite - { - get - { - return _isWriting; - } - } - #endregion - - #region Destructor & IDispose stuff - - /// - /// Destroys this instance - /// - ~GZipStream() - { - cleanUp(false); - } - - /// - /// Closes the external file handle - /// - public void Dispose() - { - cleanUp(true); - } - - // Does the actual closing of the file handle. - private void cleanUp(bool isDisposing) - { - if (!_isDisposed) - { - gzclose(_gzFile); - _isDisposed = true; - } - } - #endregion - - #region Basic reading and writing - /// - /// Attempts to read a number of bytes from the stream. - /// - /// The destination data buffer - /// The index of the first destination byte in buffer - /// The number of bytes requested - /// The number of bytes read - /// If buffer is null - /// If count or offset are negative - /// If offset + count is > buffer.Length - /// If this stream is not readable. - /// If this stream has been disposed. - public override int Read(byte[] buffer, int offset, int count) - { - if (!CanRead) throw new NotSupportedException(); - if (buffer == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > buffer.Length) throw new ArgumentException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); - int result; - try - { - result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); - if (result < 0) - throw new IOException(); - } - finally - { - h.Free(); - } - return result; - } - - /// - /// Attempts to read a single byte from the stream. - /// - /// The byte that was read, or -1 in case of error or End-Of-File - public override int ReadByte() - { - if (!CanRead) throw new NotSupportedException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - return gzgetc(_gzFile); - } - - /// - /// Writes a number of bytes to the stream - /// - /// - /// - /// - /// If buffer is null - /// If count or offset are negative - /// If offset + count is > buffer.Length - /// If this stream is not writeable. - /// If this stream has been disposed. - public override void Write(byte[] buffer, int offset, int count) - { - if (!CanWrite) throw new NotSupportedException(); - if (buffer == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > buffer.Length) throw new ArgumentException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); - try - { - int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); - if (result < 0) - throw new IOException(); - } - finally - { - h.Free(); - } - } - - /// - /// Writes a single byte to the stream - /// - /// The byte to add to the stream. - /// If this stream is not writeable. - /// If this stream has been disposed. - public override void WriteByte(byte value) - { - if (!CanWrite) throw new NotSupportedException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - int result = gzputc(_gzFile, (int)value); - if (result < 0) - throw new IOException(); - } - #endregion - - #region Position & length stuff - /// - /// Not supported. - /// - /// - /// Always thrown - public override void SetLength(long value) - { - throw new NotSupportedException(); - } - - /// - /// Not suppported. - /// - /// - /// - /// - /// Always thrown - public override long Seek(long offset, SeekOrigin origin) - { - throw new NotSupportedException(); - } - - /// - /// Flushes the GZipStream. - /// - /// In this implementation, this method does nothing. This is because excessive - /// flushing may degrade the achievable compression rates. - public override void Flush() - { - // left empty on purpose - } - - /// - /// Gets/sets the current position in the GZipStream. Not suppported. - /// - /// In this implementation this property is not supported - /// Always thrown - public override long Position - { - get - { - throw new NotSupportedException(); - } - set - { - throw new NotSupportedException(); - } - } - - /// - /// Gets the size of the stream. Not suppported. - /// - /// In this implementation this property is not supported - /// Always thrown - public override long Length - { - get - { - throw new NotSupportedException(); - } - } - #endregion - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements a compressed , in GZip (.gz) format. + /// + public class GZipStream : Stream, IDisposable + { + #region Dll Imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern IntPtr gzopen(string name, string mode); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzclose(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzwrite(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzread(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzgetc(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzputc(IntPtr gzFile, int c); + + #endregion + + #region Private data + private IntPtr _gzFile; + private bool _isDisposed = false; + private bool _isWriting; + #endregion + + #region Constructors + /// + /// Creates a new file as a writeable GZipStream + /// + /// The name of the compressed file to create + /// The compression level to use when adding data + /// If an error occurred in the internal zlib function + public GZipStream(string fileName, CompressLevel level) + { + _isWriting = true; + _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level)); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + } + + /// + /// Opens an existing file as a readable GZipStream + /// + /// The name of the file to open + /// If an error occurred in the internal zlib function + public GZipStream(string fileName) + { + _isWriting = false; + _gzFile = gzopen(fileName, "rb"); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + + } + #endregion + + #region Access properties + /// + /// Returns true of this stream can be read from, false otherwise + /// + public override bool CanRead + { + get + { + return !_isWriting; + } + } + + + /// + /// Returns false. + /// + public override bool CanSeek + { + get + { + return false; + } + } + + /// + /// Returns true if this tsream is writeable, false otherwise + /// + public override bool CanWrite + { + get + { + return _isWriting; + } + } + #endregion + + #region Destructor & IDispose stuff + + /// + /// Destroys this instance + /// + ~GZipStream() + { + cleanUp(false); + } + + /// + /// Closes the external file handle + /// + public void Dispose() + { + cleanUp(true); + } + + // Does the actual closing of the file handle. + private void cleanUp(bool isDisposing) + { + if (!_isDisposed) + { + gzclose(_gzFile); + _isDisposed = true; + } + } + #endregion + + #region Basic reading and writing + /// + /// Attempts to read a number of bytes from the stream. + /// + /// The destination data buffer + /// The index of the first destination byte in buffer + /// The number of bytes requested + /// The number of bytes read + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not readable. + /// If this stream has been disposed. + public override int Read(byte[] buffer, int offset, int count) + { + if (!CanRead) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + int result; + try + { + result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + return result; + } + + /// + /// Attempts to read a single byte from the stream. + /// + /// The byte that was read, or -1 in case of error or End-Of-File + public override int ReadByte() + { + if (!CanRead) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + return gzgetc(_gzFile); + } + + /// + /// Writes a number of bytes to the stream + /// + /// + /// + /// + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void Write(byte[] buffer, int offset, int count) + { + if (!CanWrite) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + try + { + int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + } + + /// + /// Writes a single byte to the stream + /// + /// The byte to add to the stream. + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void WriteByte(byte value) + { + if (!CanWrite) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + int result = gzputc(_gzFile, (int)value); + if (result < 0) + throw new IOException(); + } + #endregion + + #region Position & length stuff + /// + /// Not supported. + /// + /// + /// Always thrown + public override void SetLength(long value) + { + throw new NotSupportedException(); + } + + /// + /// Not suppported. + /// + /// + /// + /// + /// Always thrown + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException(); + } + + /// + /// Flushes the GZipStream. + /// + /// In this implementation, this method does nothing. This is because excessive + /// flushing may degrade the achievable compression rates. + public override void Flush() + { + // left empty on purpose + } + + /// + /// Gets/sets the current position in the GZipStream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Position + { + get + { + throw new NotSupportedException(); + } + set + { + throw new NotSupportedException(); + } + } + + /// + /// Gets the size of the stream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Length + { + get + { + throw new NotSupportedException(); + } + } + #endregion + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs index 4e60cda..d295f26 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs @@ -1,105 +1,105 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - - /// - /// Implements a data decompressor, using the inflate algorithm in the ZLib dll - /// - public class Inflater : CodecBase - { - #region Dll imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern int inflateInit_(ref ZStream sz, string vs, int size); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflate(ref ZStream sz, int flush); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflateReset(ref ZStream sz); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflateEnd(ref ZStream sz); - #endregion - - /// - /// Constructs an new instance of the Inflater - /// - public Inflater() : base() - { - int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); - if (retval != 0) - throw new ZLibException(retval, "Could not initialize inflater"); - - resetOutput(); - } - - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - public override void Add(byte[] data, int offset, int count) - { - if (data == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - - int total = count; - int inputIndex = offset; - int err = 0; - - while (err >= 0 && inputIndex < total) - { - copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); - err = inflate(ref _ztream, (int)FlushTypes.None); - if (err == 0) - while (_ztream.avail_out == 0) - { - OnDataAvailable(); - err = inflate(ref _ztream, (int)FlushTypes.None); - } - - inputIndex += (int)_ztream.total_in; - } - setChecksum( _ztream.adler ); - } - - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - public override void Finish() - { - int err; - do - { - err = inflate(ref _ztream, (int)FlushTypes.Finish); - OnDataAvailable(); - } - while (err == 0); - setChecksum( _ztream.adler ); - inflateReset(ref _ztream); - resetOutput(); - } - - /// - /// Closes the internal zlib inflate stream - /// - protected override void CleanUp() { inflateEnd(ref _ztream); } - - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data decompressor, using the inflate algorithm in the ZLib dll + /// + public class Inflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int inflateInit_(ref ZStream sz, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Inflater + /// + public Inflater() : base() + { + int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize inflater"); + + resetOutput(); + } + + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + err = inflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = inflate(ref _ztream, (int)FlushTypes.None); + } + + inputIndex += (int)_ztream.total_in; + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = inflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + inflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib inflate stream + /// + protected override void CleanUp() { inflateEnd(ref _ztream); } + + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs index 8dc00db..6e3b609 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs @@ -1,274 +1,274 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Collections; -using System.IO; - -// uncomment the define below to include unit tests -//#define nunit -#if nunit -using NUnit.Framework; - -// Unit tests for the DotZLib class library -// ---------------------------------------- -// -// Use this with NUnit 2 from http://www.nunit.org -// - -namespace DotZLibTests -{ - using DotZLib; - - // helper methods - internal class Utils - { - public static bool byteArrEqual( byte[] lhs, byte[] rhs ) - { - if (lhs.Length != rhs.Length) - return false; - for (int i = lhs.Length-1; i >= 0; --i) - if (lhs[i] != rhs[i]) - return false; - return true; - } - - } - - - [TestFixture] - public class CircBufferTests - { - #region Circular buffer tests - [Test] - public void SinglePutGet() - { - CircularBuffer buf = new CircularBuffer(10); - Assert.AreEqual( 0, buf.Size ); - Assert.AreEqual( -1, buf.Get() ); - - Assert.IsTrue(buf.Put( 1 )); - Assert.AreEqual( 1, buf.Size ); - Assert.AreEqual( 1, buf.Get() ); - Assert.AreEqual( 0, buf.Size ); - Assert.AreEqual( -1, buf.Get() ); - } - - [Test] - public void BlockPutGet() - { - CircularBuffer buf = new CircularBuffer(10); - byte[] arr = {1,2,3,4,5,6,7,8,9,10}; - Assert.AreEqual( 10, buf.Put(arr,0,10) ); - Assert.AreEqual( 10, buf.Size ); - Assert.IsFalse( buf.Put(11) ); - Assert.AreEqual( 1, buf.Get() ); - Assert.IsTrue( buf.Put(11) ); - - byte[] arr2 = (byte[])arr.Clone(); - Assert.AreEqual( 9, buf.Get(arr2,1,9) ); - Assert.IsTrue( Utils.byteArrEqual(arr,arr2) ); - } - - #endregion - } - - [TestFixture] - public class ChecksumTests - { - #region CRC32 Tests - [Test] - public void CRC32_Null() - { - CRC32Checksum crc32 = new CRC32Checksum(); - Assert.AreEqual( 0, crc32.Value ); - - crc32 = new CRC32Checksum(1); - Assert.AreEqual( 1, crc32.Value ); - - crc32 = new CRC32Checksum(556); - Assert.AreEqual( 556, crc32.Value ); - } - - [Test] - public void CRC32_Data() - { - CRC32Checksum crc32 = new CRC32Checksum(); - byte[] data = { 1,2,3,4,5,6,7 }; - crc32.Update(data); - Assert.AreEqual( 0x70e46888, crc32.Value ); - - crc32 = new CRC32Checksum(); - crc32.Update("penguin"); - Assert.AreEqual( 0x0e5c1a120, crc32.Value ); - - crc32 = new CRC32Checksum(1); - crc32.Update("penguin"); - Assert.AreEqual(0x43b6aa94, crc32.Value); - - } - #endregion - - #region Adler tests - - [Test] - public void Adler_Null() - { - AdlerChecksum adler = new AdlerChecksum(); - Assert.AreEqual(0, adler.Value); - - adler = new AdlerChecksum(1); - Assert.AreEqual( 1, adler.Value ); - - adler = new AdlerChecksum(556); - Assert.AreEqual( 556, adler.Value ); - } - - [Test] - public void Adler_Data() - { - AdlerChecksum adler = new AdlerChecksum(1); - byte[] data = { 1,2,3,4,5,6,7 }; - adler.Update(data); - Assert.AreEqual( 0x5b001d, adler.Value ); - - adler = new AdlerChecksum(); - adler.Update("penguin"); - Assert.AreEqual(0x0bcf02f6, adler.Value ); - - adler = new AdlerChecksum(1); - adler.Update("penguin"); - Assert.AreEqual(0x0bd602f7, adler.Value); - - } - #endregion - } - - [TestFixture] - public class InfoTests - { - #region Info tests - [Test] - public void Info_Version() - { - Info info = new Info(); - Assert.AreEqual("1.2.3", Info.Version); - Assert.AreEqual(32, info.SizeOfUInt); - Assert.AreEqual(32, info.SizeOfULong); - Assert.AreEqual(32, info.SizeOfPointer); - Assert.AreEqual(32, info.SizeOfOffset); - } - #endregion - } - - [TestFixture] - public class DeflateInflateTests - { - #region Deflate tests - [Test] - public void Deflate_Init() - { - using (Deflater def = new Deflater(CompressLevel.Default)) - { - } - } - - private ArrayList compressedData = new ArrayList(); - private uint adler1; - - private ArrayList uncompressedData = new ArrayList(); - private uint adler2; - - public void CDataAvail(byte[] data, int startIndex, int count) - { - for (int i = 0; i < count; ++i) - compressedData.Add(data[i+startIndex]); - } - - [Test] - public void Deflate_Compress() - { - compressedData.Clear(); - - byte[] testData = new byte[35000]; - for (int i = 0; i < testData.Length; ++i) - testData[i] = 5; - - using (Deflater def = new Deflater((CompressLevel)5)) - { - def.DataAvailable += new DataAvailableHandler(CDataAvail); - def.Add(testData); - def.Finish(); - adler1 = def.Checksum; - } - } - #endregion - - #region Inflate tests - [Test] - public void Inflate_Init() - { - using (Inflater inf = new Inflater()) - { - } - } - - private void DDataAvail(byte[] data, int startIndex, int count) - { - for (int i = 0; i < count; ++i) - uncompressedData.Add(data[i+startIndex]); - } - - [Test] - public void Inflate_Expand() - { - uncompressedData.Clear(); - - using (Inflater inf = new Inflater()) - { - inf.DataAvailable += new DataAvailableHandler(DDataAvail); - inf.Add((byte[])compressedData.ToArray(typeof(byte))); - inf.Finish(); - adler2 = inf.Checksum; - } - Assert.AreEqual( adler1, adler2 ); - } - #endregion - } - - [TestFixture] - public class GZipStreamTests - { - #region GZipStream test - [Test] - public void GZipStream_WriteRead() - { - using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best)) - { - BinaryWriter writer = new BinaryWriter(gzOut); - writer.Write("hi there"); - writer.Write(Math.PI); - writer.Write(42); - } - - using (GZipStream gzIn = new GZipStream("gzstream.gz")) - { - BinaryReader reader = new BinaryReader(gzIn); - string s = reader.ReadString(); - Assert.AreEqual("hi there",s); - double d = reader.ReadDouble(); - Assert.AreEqual(Math.PI, d); - int i = reader.ReadInt32(); - Assert.AreEqual(42,i); - } - - } - #endregion - } -} - +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Collections; +using System.IO; + +// uncomment the define below to include unit tests +//#define nunit +#if nunit +using NUnit.Framework; + +// Unit tests for the DotZLib class library +// ---------------------------------------- +// +// Use this with NUnit 2 from http://www.nunit.org +// + +namespace DotZLibTests +{ + using DotZLib; + + // helper methods + internal class Utils + { + public static bool byteArrEqual( byte[] lhs, byte[] rhs ) + { + if (lhs.Length != rhs.Length) + return false; + for (int i = lhs.Length-1; i >= 0; --i) + if (lhs[i] != rhs[i]) + return false; + return true; + } + + } + + + [TestFixture] + public class CircBufferTests + { + #region Circular buffer tests + [Test] + public void SinglePutGet() + { + CircularBuffer buf = new CircularBuffer(10); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + + Assert.IsTrue(buf.Put( 1 )); + Assert.AreEqual( 1, buf.Size ); + Assert.AreEqual( 1, buf.Get() ); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + } + + [Test] + public void BlockPutGet() + { + CircularBuffer buf = new CircularBuffer(10); + byte[] arr = {1,2,3,4,5,6,7,8,9,10}; + Assert.AreEqual( 10, buf.Put(arr,0,10) ); + Assert.AreEqual( 10, buf.Size ); + Assert.IsFalse( buf.Put(11) ); + Assert.AreEqual( 1, buf.Get() ); + Assert.IsTrue( buf.Put(11) ); + + byte[] arr2 = (byte[])arr.Clone(); + Assert.AreEqual( 9, buf.Get(arr2,1,9) ); + Assert.IsTrue( Utils.byteArrEqual(arr,arr2) ); + } + + #endregion + } + + [TestFixture] + public class ChecksumTests + { + #region CRC32 Tests + [Test] + public void CRC32_Null() + { + CRC32Checksum crc32 = new CRC32Checksum(); + Assert.AreEqual( 0, crc32.Value ); + + crc32 = new CRC32Checksum(1); + Assert.AreEqual( 1, crc32.Value ); + + crc32 = new CRC32Checksum(556); + Assert.AreEqual( 556, crc32.Value ); + } + + [Test] + public void CRC32_Data() + { + CRC32Checksum crc32 = new CRC32Checksum(); + byte[] data = { 1,2,3,4,5,6,7 }; + crc32.Update(data); + Assert.AreEqual( 0x70e46888, crc32.Value ); + + crc32 = new CRC32Checksum(); + crc32.Update("penguin"); + Assert.AreEqual( 0x0e5c1a120, crc32.Value ); + + crc32 = new CRC32Checksum(1); + crc32.Update("penguin"); + Assert.AreEqual(0x43b6aa94, crc32.Value); + + } + #endregion + + #region Adler tests + + [Test] + public void Adler_Null() + { + AdlerChecksum adler = new AdlerChecksum(); + Assert.AreEqual(0, adler.Value); + + adler = new AdlerChecksum(1); + Assert.AreEqual( 1, adler.Value ); + + adler = new AdlerChecksum(556); + Assert.AreEqual( 556, adler.Value ); + } + + [Test] + public void Adler_Data() + { + AdlerChecksum adler = new AdlerChecksum(1); + byte[] data = { 1,2,3,4,5,6,7 }; + adler.Update(data); + Assert.AreEqual( 0x5b001d, adler.Value ); + + adler = new AdlerChecksum(); + adler.Update("penguin"); + Assert.AreEqual(0x0bcf02f6, adler.Value ); + + adler = new AdlerChecksum(1); + adler.Update("penguin"); + Assert.AreEqual(0x0bd602f7, adler.Value); + + } + #endregion + } + + [TestFixture] + public class InfoTests + { + #region Info tests + [Test] + public void Info_Version() + { + Info info = new Info(); + Assert.AreEqual("1.2.4", Info.Version); + Assert.AreEqual(32, info.SizeOfUInt); + Assert.AreEqual(32, info.SizeOfULong); + Assert.AreEqual(32, info.SizeOfPointer); + Assert.AreEqual(32, info.SizeOfOffset); + } + #endregion + } + + [TestFixture] + public class DeflateInflateTests + { + #region Deflate tests + [Test] + public void Deflate_Init() + { + using (Deflater def = new Deflater(CompressLevel.Default)) + { + } + } + + private ArrayList compressedData = new ArrayList(); + private uint adler1; + + private ArrayList uncompressedData = new ArrayList(); + private uint adler2; + + public void CDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + compressedData.Add(data[i+startIndex]); + } + + [Test] + public void Deflate_Compress() + { + compressedData.Clear(); + + byte[] testData = new byte[35000]; + for (int i = 0; i < testData.Length; ++i) + testData[i] = 5; + + using (Deflater def = new Deflater((CompressLevel)5)) + { + def.DataAvailable += new DataAvailableHandler(CDataAvail); + def.Add(testData); + def.Finish(); + adler1 = def.Checksum; + } + } + #endregion + + #region Inflate tests + [Test] + public void Inflate_Init() + { + using (Inflater inf = new Inflater()) + { + } + } + + private void DDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + uncompressedData.Add(data[i+startIndex]); + } + + [Test] + public void Inflate_Expand() + { + uncompressedData.Clear(); + + using (Inflater inf = new Inflater()) + { + inf.DataAvailable += new DataAvailableHandler(DDataAvail); + inf.Add((byte[])compressedData.ToArray(typeof(byte))); + inf.Finish(); + adler2 = inf.Checksum; + } + Assert.AreEqual( adler1, adler2 ); + } + #endregion + } + + [TestFixture] + public class GZipStreamTests + { + #region GZipStream test + [Test] + public void GZipStream_WriteRead() + { + using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best)) + { + BinaryWriter writer = new BinaryWriter(gzOut); + writer.Write("hi there"); + writer.Write(Math.PI); + writer.Write(42); + } + + using (GZipStream gzIn = new GZipStream("gzstream.gz")) + { + BinaryReader reader = new BinaryReader(gzIn); + string s = reader.ReadString(); + Assert.AreEqual("hi there",s); + double d = reader.ReadDouble(); + Assert.AreEqual(Math.PI, d); + int i = reader.ReadInt32(); + Assert.AreEqual(42,i); + } + + } + #endregion + } +} + #endif \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt b/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt index 30aac2c..127a5bc 100644 --- a/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt +++ b/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt @@ -1,23 +1,23 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/readme.txt b/compat/zlib/contrib/dotzlib/readme.txt index 210f4b0..4d8c2dd 100644 --- a/compat/zlib/contrib/dotzlib/readme.txt +++ b/compat/zlib/contrib/dotzlib/readme.txt @@ -1,58 +1,58 @@ -This directory contains a .Net wrapper class library for the ZLib1.dll - -The wrapper includes support for inflating/deflating memory buffers, -.Net streaming wrappers for the gz streams part of zlib, and wrappers -for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. - -Directory structure: --------------------- - -LICENSE_1_0.txt - License file. -readme.txt - This file. -DotZLib.chm - Class library documentation -DotZLib.build - NAnt build file -DotZLib.sln - Microsoft Visual Studio 2003 solution file - -DotZLib\*.cs - Source files for the class library - -Unit tests: ------------ -The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher. -To include unit tests in the build, define nunit before building. - - -Build instructions: -------------------- - -1. Using Visual Studio.Net 2003: - Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) - will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on - you are building the release or debug version of the library. Check - DotZLib/UnitTests.cs for instructions on how to include unit tests in the - build. - -2. Using NAnt: - Open a command prompt with access to the build environment and run nant - in the same directory as the DotZLib.build file. - You can define 2 properties on the nant command-line to control the build: - debug={true|false} to toggle between release/debug builds (default=true). - nunit={true|false} to include or esclude unit tests (default=true). - Also the target clean will remove binaries. - Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release - or ./DotZLib/bin/debug, depending on whether you are building the release - or debug version of the library. - - Examples: - nant -D:debug=false -D:nunit=false - will build a release mode version of the library without unit tests. - nant - will build a debug version of the library with unit tests - nant clean - will remove all previously built files. - - ---------------------------------- -Copyright (c) Henrik Ravn 2004 - -Use, modification and distribution are subject to the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +This directory contains a .Net wrapper class library for the ZLib1.dll + +The wrapper includes support for inflating/deflating memory buffers, +.Net streaming wrappers for the gz streams part of zlib, and wrappers +for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. + +Directory structure: +-------------------- + +LICENSE_1_0.txt - License file. +readme.txt - This file. +DotZLib.chm - Class library documentation +DotZLib.build - NAnt build file +DotZLib.sln - Microsoft Visual Studio 2003 solution file + +DotZLib\*.cs - Source files for the class library + +Unit tests: +----------- +The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher. +To include unit tests in the build, define nunit before building. + + +Build instructions: +------------------- + +1. Using Visual Studio.Net 2003: + Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) + will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on + you are building the release or debug version of the library. Check + DotZLib/UnitTests.cs for instructions on how to include unit tests in the + build. + +2. Using NAnt: + Open a command prompt with access to the build environment and run nant + in the same directory as the DotZLib.build file. + You can define 2 properties on the nant command-line to control the build: + debug={true|false} to toggle between release/debug builds (default=true). + nunit={true|false} to include or esclude unit tests (default=true). + Also the target clean will remove binaries. + Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release + or ./DotZLib/bin/debug, depending on whether you are building the release + or debug version of the library. + + Examples: + nant -D:debug=false -D:nunit=false + will build a release mode version of the library without unit tests. + nant + will build a debug version of the library with unit tests + nant clean + will remove all previously built files. + + +--------------------------------- +Copyright (c) Henrik Ravn 2004 + +Use, modification and distribution are subject to the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/compat/zlib/contrib/gcc_gvmat64/gvmat64.S b/compat/zlib/contrib/gcc_gvmat64/gvmat64.S new file mode 100644 index 0000000..23309fa --- /dev/null +++ b/compat/zlib/contrib/gcc_gvmat64/gvmat64.S @@ -0,0 +1,574 @@ +/* +;uInt longest_match_x64( +; deflate_state *s, +; IPos cur_match); // current match + +; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64 +; (AMD64 on Athlon 64, Opteron, Phenom +; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) +; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode) +; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; +; File written by Gilles Vollant, by converting to assembly the longest_match +; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. +; and by taking inspiration on asm686 with masm, optimised assembly code +; from Brian Raiter, written 1998 +; +; This software is provided 'as-is', without any express or implied +; warranty. In no event will the authors be held liable for any damages +; arising from the use of this software. +; +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it +; freely, subject to the following restrictions: +; +; 1. The origin of this software must not be misrepresented; you must not +; claim that you wrote the original software. If you use this software +; in a product, an acknowledgment in the product documentation would be +; appreciated but is not required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software +; 3. This notice may not be removed or altered from any source distribution. +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; to compile this file for zLib, I use option: +; gcc -c -arch x86_64 gvmat64.S + + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; // current match / +; +; with XCode for Mac, I had strange error with some jump on intel syntax +; this is why BEFORE_JMP and AFTER_JMP are used + */ + + +#define BEFORE_JMP .att_syntax +#define AFTER_JMP .intel_syntax noprefix + +#ifndef NO_UNDERLINE +# define match_init _match_init +# define longest_match _longest_match +#endif + +.intel_syntax noprefix + +.globl match_init, longest_match +.text +longest_match: + + + +#define LocalVarsSize 96 +/* +; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 +; free register : r14,r15 +; register can be saved : rsp +*/ + +#define chainlenwmask (rsp + 8 - LocalVarsSize) +#define nicematch (rsp + 16 - LocalVarsSize) + +#define save_rdi (rsp + 24 - LocalVarsSize) +#define save_rsi (rsp + 32 - LocalVarsSize) +#define save_rbx (rsp + 40 - LocalVarsSize) +#define save_rbp (rsp + 48 - LocalVarsSize) +#define save_r12 (rsp + 56 - LocalVarsSize) +#define save_r13 (rsp + 64 - LocalVarsSize) +#define save_r14 (rsp + 72 - LocalVarsSize) +#define save_r15 (rsp + 80 - LocalVarsSize) + + +/* +; all the +4 offsets are due to the addition of pending_buf_size (in zlib +; in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, remove the +4). +; Note : these value are good with a 8 bytes boundary pack structure +*/ + +#define MAX_MATCH 258 +#define MIN_MATCH 3 +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) + +/* +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). +*/ + + + +/* you can check the structure offset by running + +#include +#include +#include "deflate.h" + +void print_depl() +{ +deflate_state ds; +deflate_state *s=&ds; +printf("size pointer=%u\n",(int)sizeof(void*)); + +printf("#define dsWSize %u\n",(int)(((char*)&(s->w_size))-((char*)s))); +printf("#define dsWMask %u\n",(int)(((char*)&(s->w_mask))-((char*)s))); +printf("#define dsWindow %u\n",(int)(((char*)&(s->window))-((char*)s))); +printf("#define dsPrev %u\n",(int)(((char*)&(s->prev))-((char*)s))); +printf("#define dsMatchLen %u\n",(int)(((char*)&(s->match_length))-((char*)s))); +printf("#define dsPrevMatch %u\n",(int)(((char*)&(s->prev_match))-((char*)s))); +printf("#define dsStrStart %u\n",(int)(((char*)&(s->strstart))-((char*)s))); +printf("#define dsMatchStart %u\n",(int)(((char*)&(s->match_start))-((char*)s))); +printf("#define dsLookahead %u\n",(int)(((char*)&(s->lookahead))-((char*)s))); +printf("#define dsPrevLen %u\n",(int)(((char*)&(s->prev_length))-((char*)s))); +printf("#define dsMaxChainLen %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s))); +printf("#define dsGoodMatch %u\n",(int)(((char*)&(s->good_match))-((char*)s))); +printf("#define dsNiceMatch %u\n",(int)(((char*)&(s->nice_match))-((char*)s))); +} +*/ + +#define dsWSize 68 +#define dsWMask 76 +#define dsWindow 80 +#define dsPrev 96 +#define dsMatchLen 144 +#define dsPrevMatch 148 +#define dsStrStart 156 +#define dsMatchStart 160 +#define dsLookahead 164 +#define dsPrevLen 168 +#define dsMaxChainLen 172 +#define dsGoodMatch 188 +#define dsNiceMatch 192 + +#define window_size [ rcx + dsWSize] +#define WMask [ rcx + dsWMask] +#define window_ad [ rcx + dsWindow] +#define prev_ad [ rcx + dsPrev] +#define strstart [ rcx + dsStrStart] +#define match_start [ rcx + dsMatchStart] +#define Lookahead [ rcx + dsLookahead] //; 0ffffffffh on infozip +#define prev_length [ rcx + dsPrevLen] +#define max_chain_length [ rcx + dsMaxChainLen] +#define good_match [ rcx + dsGoodMatch] +#define nice_match [ rcx + dsNiceMatch] + +/* +; windows: +; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match) + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. + +; +; gcc on macosx-linux: +; see http://www.x86-64.org/documentation/abi-0.99.pdf +; param 1 in rdi, param 2 in rsi +; rbx, rsp, rbp, r12 to r15 must be preserved + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + +;;; Retrieve the function arguments. r8d will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + +; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) +; mac: param 1 in rdi, param 2 rsi +; this clear high 32 bits of r8, which can be garbage in both r8 and rdx +*/ + mov [save_rbx],rbx + mov [save_rbp],rbp + + + mov rcx,rdi + + mov r8d,esi + + + mov [save_r12],r12 + mov [save_r13],r13 + mov [save_r14],r14 + mov [save_r15],r15 + + +//;;; uInt wmask = s->w_mask; +//;;; unsigned chain_length = s->max_chain_length; +//;;; if (s->prev_length >= s->good_match) { +//;;; chain_length >>= 2; +//;;; } + + + mov edi, prev_length + mov esi, good_match + mov eax, WMask + mov ebx, max_chain_length + cmp edi, esi + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +//;;; chainlen is decremented once beforehand so that the function can +//;;; use the sign flag instead of the zero flag for the exit test. +//;;; It is then shifted into the high word, to make room for the wmask +//;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + +//;;; on zlib only +//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + + + mov eax, nice_match + mov [chainlenwmask], ebx + mov r10d, Lookahead + cmp r10d, eax + cmovnl r10d, eax + mov [nicematch],r10d + + + +//;;; register Bytef *scan = s->window + s->strstart; + mov r10, window_ad + mov ebp, strstart + lea r13, [r10 + rbp] + +//;;; Determine how many bytes the scan ptr is off from being +//;;; dword-aligned. + + mov r9,r13 + neg r13 + and r13,3 + +//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +//;;; s->strstart - (IPos)MAX_DIST(s) : NIL; + + + mov eax, window_size + sub eax, MIN_LOOKAHEAD + + + xor edi,edi + sub ebp, eax + + mov r11d, prev_length + + cmovng ebp,edi + +//;;; int best_len = s->prev_length; + + +//;;; Store the sum of s->window + best_len in esi locally, and in esi. + + lea rsi,[r10+r11] + +//;;; register ush scan_start = *(ushf*)scan; +//;;; register ush scan_end = *(ushf*)(scan+best_len-1); +//;;; Posf *prev = s->prev; + + movzx r12d,word ptr [r9] + movzx ebx, word ptr [r9 + r11 - 1] + + mov rdi, prev_ad + +//;;; Jump into the main loop. + + mov edx, [chainlenwmask] + + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + + + +LookupLoop1: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + + + + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry1: + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jz LookupLoopIsZero + AFTER_JMP + +LookupLoop2: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry2: + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jz LookupLoopIsZero + AFTER_JMP + +LookupLoop4: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry4: + + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jnz LookupLoop1 + jmp LookupLoopIsZero + AFTER_JMP +/* +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; r8d = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit +*/ +.balign 16 +LookupLoop: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry: + + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jnz LookupLoop1 + AFTER_JMP +LookupLoopIsZero: + cmp r12w, word ptr [r10 + r8] + BEFORE_JMP + jnz LookupLoop1 + AFTER_JMP + + +//;;; Store the current value of chainlen. + mov [chainlenwmask], edx +/* +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). +*/ + lea rsi,[r8+r10] + mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8) + lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8] + lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8] + + prefetcht1 [rsi+rdx] + prefetcht1 [rdi+rdx] + +/* +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust rdx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (rsi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. +*/ + +LoopCmps: + mov rax, [rsi + rdx] + xor rax, [rdi + rdx] + jnz LeaveLoopCmps + + mov rax, [rsi + rdx + 8] + xor rax, [rdi + rdx + 8] + jnz LeaveLoopCmps8 + + + mov rax, [rsi + rdx + 8+8] + xor rax, [rdi + rdx + 8+8] + jnz LeaveLoopCmps16 + + add rdx,8+8+8 + + BEFORE_JMP + jnz LoopCmps + jmp LenMaximum + AFTER_JMP + +LeaveLoopCmps16: add rdx,8 +LeaveLoopCmps8: add rdx,8 +LeaveLoopCmps: + + test eax, 0x0000FFFF + jnz LenLower + + test eax,0xffffffff + + jnz LenLower32 + + add rdx,4 + shr rax,32 + or ax,ax + BEFORE_JMP + jnz LenLower + AFTER_JMP + +LenLower32: + shr eax,16 + add rdx,2 + +LenLower: + sub al, 1 + adc rdx, 0 +//;;; Calculate the length of the match. If it is longer than MAX_MATCH, +//;;; then automatically accept it as the best possible match and leave. + + lea rax, [rdi + rdx] + sub rax, r9 + cmp eax, MAX_MATCH + BEFORE_JMP + jge LenMaximum + AFTER_JMP +/* +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. +;/////////////////////////////////// +*/ + cmp eax, r11d + jg LongerMatch + + lea rsi,[r10+r11] + + mov rdi, prev_ad + mov edx, [chainlenwmask] + BEFORE_JMP + jmp LookupLoop + AFTER_JMP +/* +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); +*/ +LongerMatch: + mov r11d, eax + mov match_start, r8d + cmp eax, [nicematch] + BEFORE_JMP + jge LeaveNow + AFTER_JMP + + lea rsi,[r10+rax] + + movzx ebx, word ptr [r9 + rax - 1] + mov rdi, prev_ad + mov edx, [chainlenwmask] + BEFORE_JMP + jmp LookupLoop + AFTER_JMP + +//;;; Accept the current string, with the maximum possible length. + +LenMaximum: + mov r11d,MAX_MATCH + mov match_start, r8d + +//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +//;;; return s->lookahead; + +LeaveNow: + mov eax, Lookahead + cmp r11d, eax + cmovng eax, r11d + + + +//;;; Restore the stack and return from whence we came. + + +// mov rsi,[save_rsi] +// mov rdi,[save_rdi] + mov rbx,[save_rbx] + mov rbp,[save_rbp] + mov r12,[save_r12] + mov r13,[save_r13] + mov r14,[save_r14] + mov r15,[save_r15] + + + ret 0 +//; please don't remove this string ! +//; Your can freely use gvmat64 in any free or commercial app +//; but it is far better don't remove the string in the binary! + // db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 + + +match_init: + ret 0 + + diff --git a/compat/zlib/contrib/infback9/infback9.c b/compat/zlib/contrib/infback9/infback9.c index f5ddde6..7bbe90c 100644 --- a/compat/zlib/contrib/infback9/infback9.c +++ b/compat/zlib/contrib/infback9/infback9.c @@ -1,5 +1,5 @@ /* infback9.c -- inflate deflate64 data using a call-back interface - * Copyright (C) 1995-2003 Mark Adler + * Copyright (C) 1995-2008 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -242,7 +242,7 @@ void FAR *out_desc; code const FAR *distcode; /* starting table for distance codes */ unsigned lenbits; /* index bits for lencode */ unsigned distbits; /* index bits for distcode */ - code this; /* current decoding table entry */ + code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ int ret; /* return code */ @@ -384,19 +384,19 @@ void FAR *out_desc; state->have = 0; while (state->have < state->nlen + state->ndist) { for (;;) { - this = lencode[BITS(lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = lencode[BITS(lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.val < 16) { - NEEDBITS(this.bits); - DROPBITS(this.bits); - state->lens[state->have++] = this.val; + if (here.val < 16) { + NEEDBITS(here.bits); + DROPBITS(here.bits); + state->lens[state->have++] = here.val; } else { - if (this.val == 16) { - NEEDBITS(this.bits + 2); - DROPBITS(this.bits); + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); if (state->have == 0) { strm->msg = (char *)"invalid bit length repeat"; mode = BAD; @@ -406,16 +406,16 @@ void FAR *out_desc; copy = 3 + BITS(2); DROPBITS(2); } - else if (this.val == 17) { - NEEDBITS(this.bits + 3); - DROPBITS(this.bits); + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); len = 0; copy = 3 + BITS(3); DROPBITS(3); } else { - NEEDBITS(this.bits + 7); - DROPBITS(this.bits); + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); len = 0; copy = 11 + BITS(7); DROPBITS(7); @@ -433,7 +433,16 @@ void FAR *out_desc; /* handle error breaks in while */ if (mode == BAD) break; - /* build code tables */ + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftree9.h + concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; lencode = (code const FAR *)(state->next); lenbits = 9; @@ -460,28 +469,28 @@ void FAR *out_desc; case LEN: /* get a literal, length, or end-of-block code */ for (;;) { - this = lencode[BITS(lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = lencode[BITS(lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.op && (this.op & 0xf0) == 0) { - last = this; + if (here.op && (here.op & 0xf0) == 0) { + last = here; for (;;) { - this = lencode[last.val + + here = lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } - DROPBITS(this.bits); - length = (unsigned)this.val; + DROPBITS(here.bits); + length = (unsigned)here.val; /* process literal */ - if (this.op == 0) { - Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + if (here.op == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", this.val)); + "inflate: literal 0x%02x\n", here.val)); ROOM(); *put++ = (unsigned char)(length); left--; @@ -490,21 +499,21 @@ void FAR *out_desc; } /* process end of block */ - if (this.op & 32) { + if (here.op & 32) { Tracevv((stderr, "inflate: end of block\n")); mode = TYPE; break; } /* invalid code */ - if (this.op & 64) { + if (here.op & 64) { strm->msg = (char *)"invalid literal/length code"; mode = BAD; break; } /* length code -- get extra bits, if any */ - extra = (unsigned)(this.op) & 31; + extra = (unsigned)(here.op) & 31; if (extra != 0) { NEEDBITS(extra); length += BITS(extra); @@ -514,30 +523,30 @@ void FAR *out_desc; /* get distance code */ for (;;) { - this = distcode[BITS(distbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = distcode[BITS(distbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if ((this.op & 0xf0) == 0) { - last = this; + if ((here.op & 0xf0) == 0) { + last = here; for (;;) { - this = distcode[last.val + + here = distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } - DROPBITS(this.bits); - if (this.op & 64) { + DROPBITS(here.bits); + if (here.op & 64) { strm->msg = (char *)"invalid distance code"; mode = BAD; break; } - offset = (unsigned)this.val; + offset = (unsigned)here.val; /* get distance extra bits, if any */ - extra = (unsigned)(this.op) & 15; + extra = (unsigned)(here.op) & 15; if (extra != 0) { NEEDBITS(extra); offset += BITS(extra); diff --git a/compat/zlib/contrib/infback9/inftree9.c b/compat/zlib/contrib/infback9/inftree9.c index 0993f75..510bba6 100644 --- a/compat/zlib/contrib/infback9/inftree9.c +++ b/compat/zlib/contrib/infback9/inftree9.c @@ -1,5 +1,5 @@ /* inftree9.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate9_copyright[] = - " inflate9 1.2.3 Copyright 1995-2005 Mark Adler "; + " inflate9 1.2.4 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -64,7 +64,7 @@ unsigned short FAR *work; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 201, 196}; + 133, 133, 133, 133, 144, 64, 195}; static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, @@ -160,11 +160,10 @@ unsigned short FAR *work; entered in the tables. used keeps track of how many table entries have been allocated from the - provided *table space. It is checked when a LENS table is being made - against the space in *table, ENOUGH, minus the maximum space needed by - the worst case distance code, MAXD. This should never happen, but the - sufficiency of ENOUGH has not been proven exhaustively, hence the check. - This assumes that when type == LENS, bits == 9. + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftree9.h + for more information. sym increments through all symbols, and the loop terminates when all codes of length max, i.e. all codes, have been processed. This @@ -203,7 +202,8 @@ unsigned short FAR *work; mask = used - 1; /* mask for comparing low */ /* check available table space */ - if (type == LENS && used >= ENOUGH - MAXD) + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* process all codes and make table entries */ @@ -270,7 +270,8 @@ unsigned short FAR *work; /* check for enough space */ used += 1U << curr; - if (type == LENS && used >= ENOUGH - MAXD) + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* point entry in root table to sub-table */ diff --git a/compat/zlib/contrib/infback9/inftree9.h b/compat/zlib/contrib/infback9/inftree9.h index a268084..5ab21f0 100644 --- a/compat/zlib/contrib/infback9/inftree9.h +++ b/compat/zlib/contrib/infback9/inftree9.h @@ -1,5 +1,5 @@ /* inftree9.h -- header to use inftree9.c - * Copyright (C) 1995-2003 Mark Adler + * Copyright (C) 1995-2008 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -35,15 +35,21 @@ typedef struct { 01000000 - invalid code */ -/* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1444 code structures (852 for length/literals - and 592 for distances, the latter actually the result of an - exhaustive search). The true maximum is not known, but the value - below is more than safe. */ -#define ENOUGH 2048 -#define MAXD 592 +/* Maximum size of the dynamic table. The maximum number of code structures is + 1446, which is the sum of 852 for literal/length codes and 594 for distance + codes. These values were found by exhaustive searches using the program + examples/enough.c found in the zlib distribtution. The arguments to that + program are the number of symbols, the initial root table size, and the + maximum bit length of a code. "enough 286 9 15" for literal/length codes + returns returns 852, and "enough 32 6 15" for distance codes returns 594. + The initial root table size (9 or 6) is found in the fifth argument of the + inflate_table() calls in infback9.c. If the root table size is changed, + then these maximum sizes would be need to be recalculated and updated. */ +#define ENOUGH_LENS 852 +#define ENOUGH_DISTS 594 +#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) -/* Type of code to build for inftable() */ +/* Type of code to build for inflate_table9() */ typedef enum { CODES, LENS, diff --git a/compat/zlib/contrib/inflate86/inffas86.c b/compat/zlib/contrib/inflate86/inffas86.c index 6da7635..7292f67 100644 --- a/compat/zlib/contrib/inflate86/inffas86.c +++ b/compat/zlib/contrib/inflate86/inffas86.c @@ -113,7 +113,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ ar.beg = ar.out - (start - strm->avail_out); ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); ar.wsize = state->wsize; - ar.write = state->write; + ar.write = state->wnext; ar.window = state->window; ar.hold = state->hold; ar.bits = state->bits; diff --git a/compat/zlib/contrib/iostream2/zstream.h b/compat/zlib/contrib/iostream2/zstream.h index 29edb2a..12ad336 100644 --- a/compat/zlib/contrib/iostream2/zstream.h +++ b/compat/zlib/contrib/iostream2/zstream.h @@ -21,7 +21,7 @@ /* * zstream.h - C++ interface to the 'zlib' general purpose compression library - * $Id: zstream.h,v 1.1 2008/12/19 14:44:49 dkf Exp $ + * $Id: zstream.h,v 1.2 2010/03/16 09:01:38 nijtmans Exp $ */ #include diff --git a/compat/zlib/contrib/masmx64/bld_ml64.bat b/compat/zlib/contrib/masmx64/bld_ml64.bat index 8f9343d..f74bcef 100644 --- a/compat/zlib/contrib/masmx64/bld_ml64.bat +++ b/compat/zlib/contrib/masmx64/bld_ml64.bat @@ -1,2 +1,2 @@ -ml64.exe /Flinffasx64 /c /Zi inffasx64.asm -ml64.exe /Flgvmat64 /c /Zi gvmat64.asm +ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +ml64.exe /Flgvmat64 /c /Zi gvmat64.asm diff --git a/compat/zlib/contrib/masmx64/gvmat64.asm b/compat/zlib/contrib/masmx64/gvmat64.asm index 790d655..c1817f1 100644 --- a/compat/zlib/contrib/masmx64/gvmat64.asm +++ b/compat/zlib/contrib/masmx64/gvmat64.asm @@ -1,513 +1,553 @@ -;uInt longest_match_x64( -; deflate_state *s, -; IPos cur_match); /* current match */ - -; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86 -; Copyright (C) 1995-2005 Jean-loup Gailly, Brian Raiter and Gilles Vollant. -; -; File written by Gilles Vollant, by converting to assembly the longest_match -; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. -; -; and by taking inspiration on asm686 with masm, optimised assembly code -; from Brian Raiter, written 1998 -; -; http://www.zlib.net -; http://www.winimage.com/zLibDll -; http://www.muppetlabs.com/~breadbox/software/assembly.html -; -; to compile this file for infozip Zip, I use option: -; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm -; -; to compile this file for zLib, I use option: -; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm -; Be carrefull to adapt zlib1222add below to your version of zLib -; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change -; value of zlib1222add later) -; -; This file compile with Microsoft Macro Assembler (x64) for AMD64 -; -; ml64.exe is given with Visual Studio 2005 and Windows 2003 server DDK -; -; (you can get Windows 2003 server DDK with ml64 and cl for AMD64 from -; http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) -; - - -;uInt longest_match(s, cur_match) -; deflate_state *s; -; IPos cur_match; /* current match */ -.code -longest_match PROC - - -;LocalVarsSize equ 88 - LocalVarsSize equ 72 - -; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 -; free register : r14,r15 -; register can be saved : rsp - - chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len - ; low word: s->wmask -;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10 -;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11 -;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w -;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx -;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13 -;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d -;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9 -IFDEF INFOZIP -ELSE - nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size -ENDIF - -save_rdi equ rsp + 24 - LocalVarsSize -save_rsi equ rsp + 32 - LocalVarsSize -save_rbx equ rsp + 40 - LocalVarsSize -save_rbp equ rsp + 48 - LocalVarsSize -save_r12 equ rsp + 56 - LocalVarsSize -save_r13 equ rsp + 64 - LocalVarsSize -;save_r14 equ rsp + 72 - LocalVarsSize -;save_r15 equ rsp + 80 - LocalVarsSize - - - -; all the +4 offsets are due to the addition of pending_buf_size (in zlib -; in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, remove the +4). -; Note : these value are good with a 8 bytes boundary pack structure - - - MAX_MATCH equ 258 - MIN_MATCH equ 3 - MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) - - -;;; Offsets for fields in the deflate_state structure. These numbers -;;; are calculated from the definition of deflate_state, with the -;;; assumption that the compiler will dword-align the fields. (Thus, -;;; changing the definition of deflate_state could easily cause this -;;; program to crash horribly, without so much as a warning at -;;; compile time. Sigh.) - -; all the +zlib1222add offsets are due to the addition of fields -; in zlib in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). -; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). -; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). - - -IFDEF INFOZIP - -_DATA SEGMENT -COMM window_size:DWORD -; WMask ; 7fff -COMM window:BYTE:010040H -COMM prev:WORD:08000H -; MatchLen : unused -; PrevMatch : unused -COMM strstart:DWORD -COMM match_start:DWORD -; Lookahead : ignore -COMM prev_length:DWORD ; PrevLen -COMM max_chain_length:DWORD -COMM good_match:DWORD -COMM nice_match:DWORD -prev_ad equ OFFSET prev -window_ad equ OFFSET window -nicematch equ nice_match -_DATA ENDS -WMask equ 07fffh - -ELSE - - IFNDEF zlib1222add - zlib1222add equ 8 - ENDIF -dsWSize equ 56+zlib1222add+(zlib1222add/2) -dsWMask equ 64+zlib1222add+(zlib1222add/2) -dsWindow equ 72+zlib1222add -dsPrev equ 88+zlib1222add -dsMatchLen equ 128+zlib1222add -dsPrevMatch equ 132+zlib1222add -dsStrStart equ 140+zlib1222add -dsMatchStart equ 144+zlib1222add -dsLookahead equ 148+zlib1222add -dsPrevLen equ 152+zlib1222add -dsMaxChainLen equ 156+zlib1222add -dsGoodMatch equ 172+zlib1222add -dsNiceMatch equ 176+zlib1222add - -window_size equ [ rcx + dsWSize] -WMask equ [ rcx + dsWMask] -window_ad equ [ rcx + dsWindow] -prev_ad equ [ rcx + dsPrev] -strstart equ [ rcx + dsStrStart] -match_start equ [ rcx + dsMatchStart] -Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip -prev_length equ [ rcx + dsPrevLen] -max_chain_length equ [ rcx + dsMaxChainLen] -good_match equ [ rcx + dsGoodMatch] -nice_match equ [ rcx + dsNiceMatch] -ENDIF - -; parameter 1 in r8(deflate state s), param 2 in rdx (cur match) - -; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and -; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp -; -; All registers must be preserved across the call, except for -; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. - - - -;;; Save registers that the compiler may be using, and adjust esp to -;;; make room for our stack frame. - - -;;; Retrieve the function arguments. r8d will hold cur_match -;;; throughout the entire function. edx will hold the pointer to the -;;; deflate_state structure during the function's setup (before -;;; entering the main loop. - -; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) - -; this clear high 32 bits of r8, which can be garbage in both r8 and rdx - - mov [save_rdi],rdi - mov [save_rsi],rsi - mov [save_rbx],rbx - mov [save_rbp],rbp -IFDEF INFOZIP - mov r8d,ecx -ELSE - mov r8d,edx -ENDIF - mov [save_r12],r12 - mov [save_r13],r13 -; mov [save_r14],r14 -; mov [save_r15],r15 - - -;;; uInt wmask = s->w_mask; -;;; unsigned chain_length = s->max_chain_length; -;;; if (s->prev_length >= s->good_match) { -;;; chain_length >>= 2; -;;; } - - mov edi, prev_length - mov esi, good_match - mov eax, WMask - mov ebx, max_chain_length - cmp edi, esi - jl LastMatchGood - shr ebx, 2 -LastMatchGood: - -;;; chainlen is decremented once beforehand so that the function can -;;; use the sign flag instead of the zero flag for the exit test. -;;; It is then shifted into the high word, to make room for the wmask -;;; value, which it will always accompany. - - dec ebx - shl ebx, 16 - or ebx, eax - -;;; on zlib only -;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; - -IFDEF INFOZIP - mov [chainlenwmask], ebx -; on infozip nice_match = [nice_match] -ELSE - mov eax, nice_match - mov [chainlenwmask], ebx - mov r10d, Lookahead - cmp r10d, eax - cmovnl r10d, eax - mov [nicematch],r10d -ENDIF - -;;; register Bytef *scan = s->window + s->strstart; - mov r10, window_ad - mov ebp, strstart - lea r13, [r10 + rbp] - -;;; Determine how many bytes the scan ptr is off from being -;;; dword-aligned. - - mov r9,r13 - neg r13 - and r13,3 - -;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? -;;; s->strstart - (IPos)MAX_DIST(s) : NIL; -IFDEF INFOZIP - mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1)) -ELSE - mov eax, window_size - sub eax, MIN_LOOKAHEAD -ENDIF - xor edi,edi - sub ebp, eax - - mov r11d, prev_length - - cmovng ebp,edi - -;;; int best_len = s->prev_length; - - -;;; Store the sum of s->window + best_len in esi locally, and in esi. - - lea rsi,[r10+r11] - -;;; register ush scan_start = *(ushf*)scan; -;;; register ush scan_end = *(ushf*)(scan+best_len-1); -;;; Posf *prev = s->prev; - - movzx r12d,word ptr [r9] - movzx ebx, word ptr [r9 + r11 - 1] - - mov rdi, prev_ad - -;;; Jump into the main loop. - - mov edx, [chainlenwmask] - - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - -LookupLoop1: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry1: - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - -LookupLoop2: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry2: - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - -LookupLoop4: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry4: - - cmp bx,word ptr [rsi + r8 - 1] - jnz LookupLoop1 - jmp LookupLoopIsZero - - -;;; do { -;;; match = s->window + cur_match; -;;; if (*(ushf*)(match+best_len-1) != scan_end || -;;; *(ushf*)match != scan_start) continue; -;;; [...] -;;; } while ((cur_match = prev[cur_match & wmask]) > limit -;;; && --chain_length != 0); -;;; -;;; Here is the inner loop of the function. The function will spend the -;;; majority of its time in this loop, and majority of that time will -;;; be spent in the first ten instructions. -;;; -;;; Within this loop: -;;; ebx = scanend -;;; r8d = curmatch -;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) -;;; esi = windowbestlen - i.e., (window + bestlen) -;;; edi = prev -;;; ebp = limit - -LookupLoop: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry: - - cmp bx,word ptr [rsi + r8 - 1] - jnz LookupLoop1 -LookupLoopIsZero: - cmp r12w, word ptr [r10 + r8] - jnz LookupLoop1 - - -;;; Store the current value of chainlen. - mov [chainlenwmask], edx - -;;; Point edi to the string under scrutiny, and esi to the string we -;;; are hoping to match it up with. In actuality, esi and edi are -;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is -;;; initialized to -(MAX_MATCH_8 - scanalign). - - lea rsi,[r8+r10] - mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8) - lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8] - lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8] - - prefetcht1 [rsi+rdx] - prefetcht1 [rdi+rdx] - - -;;; Test the strings for equality, 8 bytes at a time. At the end, -;;; adjust rdx so that it is offset to the exact byte that mismatched. -;;; -;;; We already know at this point that the first three bytes of the -;;; strings match each other, and they can be safely passed over before -;;; starting the compare loop. So what this code does is skip over 0-3 -;;; bytes, as much as necessary in order to dword-align the edi -;;; pointer. (rsi will still be misaligned three times out of four.) -;;; -;;; It should be confessed that this loop usually does not represent -;;; much of the total running time. Replacing it with a more -;;; straightforward "rep cmpsb" would not drastically degrade -;;; performance. - - -LoopCmps: - mov rax, [rsi + rdx] - xor rax, [rdi + rdx] - jnz LeaveLoopCmps - - mov rax, [rsi + rdx + 8] - xor rax, [rdi + rdx + 8] - jnz LeaveLoopCmps8 - - - mov rax, [rsi + rdx + 8+8] - xor rax, [rdi + rdx + 8+8] - jnz LeaveLoopCmps16 - - add rdx,8+8+8 - - jmp short LoopCmps -LeaveLoopCmps16: add rdx,8 -LeaveLoopCmps8: add rdx,8 -LeaveLoopCmps: - - test eax, 0000FFFFh - jnz LenLower - - test eax,0ffffffffh - - jnz LenLower32 - - add rdx,4 - shr rax,32 - or ax,ax - jnz LenLower - -LenLower32: - shr eax,16 - add rdx,2 -LenLower: sub al, 1 - adc rdx, 0 -;;; Calculate the length of the match. If it is longer than MAX_MATCH, -;;; then automatically accept it as the best possible match and leave. - - lea rax, [rdi + rdx] - sub rax, r9 - cmp eax, MAX_MATCH - jge LenMaximum - -;;; If the length of the match is not longer than the best match we -;;; have so far, then forget it and return to the lookup loop. -;/////////////////////////////////// - - cmp eax, r11d - jg LongerMatch - - lea rsi,[r10+r11] - - mov rdi, prev_ad - mov edx, [chainlenwmask] - jmp LookupLoop - -;;; s->match_start = cur_match; -;;; best_len = len; -;;; if (len >= nice_match) break; -;;; scan_end = *(ushf*)(scan+best_len-1); - -LongerMatch: - mov r11d, eax - mov match_start, r8d - cmp eax, [nicematch] - jge LeaveNow - - lea rsi,[r10+rax] - - movzx ebx, word ptr [r9 + rax - 1] - mov rdi, prev_ad - mov edx, [chainlenwmask] - jmp LookupLoop - -;;; Accept the current string, with the maximum possible length. - -LenMaximum: - mov r11d,MAX_MATCH - mov match_start, r8d - -;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; -;;; return s->lookahead; - -LeaveNow: -IFDEF INFOZIP - mov eax,r11d -ELSE - mov eax, Lookahead - cmp r11d, eax - cmovng eax, r11d -ENDIF - -;;; Restore the stack and return from whence we came. - - - mov rsi,[save_rsi] - mov rdi,[save_rdi] - mov rbx,[save_rbx] - mov rbp,[save_rbp] - mov r12,[save_r12] - mov r13,[save_r13] -; mov r14,[save_r14] -; mov r15,[save_r15] - - - ret 0 -; please don't remove this string ! -; Your can freely use gvmat64 in any free or commercial app -; but it is far better don't remove the string in the binary! - db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 -longest_match ENDP - -match_init PROC - ret 0 -match_init ENDP - - -END +;uInt longest_match_x64( +; deflate_state *s, +; IPos cur_match); /* current match */ + +; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64 +; (AMD64 on Athlon 64, Opteron, Phenom +; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) +; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; +; File written by Gilles Vollant, by converting to assembly the longest_match +; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. +; +; and by taking inspiration on asm686 with masm, optimised assembly code +; from Brian Raiter, written 1998 +; +; This software is provided 'as-is', without any express or implied +; warranty. In no event will the authors be held liable for any damages +; arising from the use of this software. +; +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it +; freely, subject to the following restrictions: +; +; 1. The origin of this software must not be misrepresented; you must not +; claim that you wrote the original software. If you use this software +; in a product, an acknowledgment in the product documentation would be +; appreciated but is not required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software +; 3. This notice may not be removed or altered from any source distribution. +; +; +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; to compile this file for infozip Zip, I use option: +; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm +; +; to compile this file for zLib, I use option: +; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm +; Be carrefull to adapt zlib1222add below to your version of zLib +; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change +; value of zlib1222add later) +; +; This file compile with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK +; +; (you can get Windows WDK with ml64 for AMD64 from +; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) +; + + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ +.code +longest_match PROC + + +;LocalVarsSize equ 88 + LocalVarsSize equ 72 + +; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 +; free register : r14,r15 +; register can be saved : rsp + + chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len + ; low word: s->wmask +;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10 +;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11 +;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w +;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx +;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13 +;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d +;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9 +IFDEF INFOZIP +ELSE + nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size +ENDIF + +save_rdi equ rsp + 24 - LocalVarsSize +save_rsi equ rsp + 32 - LocalVarsSize +save_rbx equ rsp + 40 - LocalVarsSize +save_rbp equ rsp + 48 - LocalVarsSize +save_r12 equ rsp + 56 - LocalVarsSize +save_r13 equ rsp + 64 - LocalVarsSize +;save_r14 equ rsp + 72 - LocalVarsSize +;save_r15 equ rsp + 80 - LocalVarsSize + + +; summary of register usage +; scanend ebx +; scanendw bx +; chainlenwmask edx +; curmatch rsi +; curmatchd esi +; windowbestlen r8 +; scanalign r9 +; scanalignd r9d +; window r10 +; bestlen r11 +; bestlend r11d +; scanstart r12d +; scanstartw r12w +; scan r13 +; nicematch r14d +; limit r15 +; limitd r15d +; prev rcx + +; all the +4 offsets are due to the addition of pending_buf_size (in zlib +; in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, remove the +4). +; Note : these value are good with a 8 bytes boundary pack structure + + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + +IFDEF INFOZIP + +_DATA SEGMENT +COMM window_size:DWORD +; WMask ; 7fff +COMM window:BYTE:010040H +COMM prev:WORD:08000H +; MatchLen : unused +; PrevMatch : unused +COMM strstart:DWORD +COMM match_start:DWORD +; Lookahead : ignore +COMM prev_length:DWORD ; PrevLen +COMM max_chain_length:DWORD +COMM good_match:DWORD +COMM nice_match:DWORD +prev_ad equ OFFSET prev +window_ad equ OFFSET window +nicematch equ nice_match +_DATA ENDS +WMask equ 07fffh + +ELSE + + IFNDEF zlib1222add + zlib1222add equ 8 + ENDIF +dsWSize equ 56+zlib1222add+(zlib1222add/2) +dsWMask equ 64+zlib1222add+(zlib1222add/2) +dsWindow equ 72+zlib1222add +dsPrev equ 88+zlib1222add +dsMatchLen equ 128+zlib1222add +dsPrevMatch equ 132+zlib1222add +dsStrStart equ 140+zlib1222add +dsMatchStart equ 144+zlib1222add +dsLookahead equ 148+zlib1222add +dsPrevLen equ 152+zlib1222add +dsMaxChainLen equ 156+zlib1222add +dsGoodMatch equ 172+zlib1222add +dsNiceMatch equ 176+zlib1222add + +window_size equ [ rcx + dsWSize] +WMask equ [ rcx + dsWMask] +window_ad equ [ rcx + dsWindow] +prev_ad equ [ rcx + dsPrev] +strstart equ [ rcx + dsStrStart] +match_start equ [ rcx + dsMatchStart] +Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip +prev_length equ [ rcx + dsPrevLen] +max_chain_length equ [ rcx + dsMaxChainLen] +good_match equ [ rcx + dsGoodMatch] +nice_match equ [ rcx + dsNiceMatch] +ENDIF + +; parameter 1 in r8(deflate state s), param 2 in rdx (cur match) + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. + + + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + +;;; Retrieve the function arguments. r8d will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + +; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) + +; this clear high 32 bits of r8, which can be garbage in both r8 and rdx + + mov [save_rdi],rdi + mov [save_rsi],rsi + mov [save_rbx],rbx + mov [save_rbp],rbp +IFDEF INFOZIP + mov r8d,ecx +ELSE + mov r8d,edx +ENDIF + mov [save_r12],r12 + mov [save_r13],r13 +; mov [save_r14],r14 +; mov [save_r15],r15 + + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov edi, prev_length + mov esi, good_match + mov eax, WMask + mov ebx, max_chain_length + cmp edi, esi + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + +;;; on zlib only +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + +IFDEF INFOZIP + mov [chainlenwmask], ebx +; on infozip nice_match = [nice_match] +ELSE + mov eax, nice_match + mov [chainlenwmask], ebx + mov r10d, Lookahead + cmp r10d, eax + cmovnl r10d, eax + mov [nicematch],r10d +ENDIF + +;;; register Bytef *scan = s->window + s->strstart; + mov r10, window_ad + mov ebp, strstart + lea r13, [r10 + rbp] + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov r9,r13 + neg r13 + and r13,3 + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; +IFDEF INFOZIP + mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1)) +ELSE + mov eax, window_size + sub eax, MIN_LOOKAHEAD +ENDIF + xor edi,edi + sub ebp, eax + + mov r11d, prev_length + + cmovng ebp,edi + +;;; int best_len = s->prev_length; + + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + lea rsi,[r10+r11] + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx r12d,word ptr [r9] + movzx ebx, word ptr [r9 + r11 - 1] + + mov rdi, prev_ad + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop1: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry1: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop2: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry2: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop4: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry4: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 + jmp LookupLoopIsZero + + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; r8d = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 +LookupLoopIsZero: + cmp r12w, word ptr [r10 + r8] + jnz LookupLoop1 + + +;;; Store the current value of chainlen. + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + lea rsi,[r8+r10] + mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8) + lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8] + lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8] + + prefetcht1 [rsi+rdx] + prefetcht1 [rdi+rdx] + + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust rdx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (rsi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + + +LoopCmps: + mov rax, [rsi + rdx] + xor rax, [rdi + rdx] + jnz LeaveLoopCmps + + mov rax, [rsi + rdx + 8] + xor rax, [rdi + rdx + 8] + jnz LeaveLoopCmps8 + + + mov rax, [rsi + rdx + 8+8] + xor rax, [rdi + rdx + 8+8] + jnz LeaveLoopCmps16 + + add rdx,8+8+8 + + jnz short LoopCmps + jmp short LenMaximum +LeaveLoopCmps16: add rdx,8 +LeaveLoopCmps8: add rdx,8 +LeaveLoopCmps: + + test eax, 0000FFFFh + jnz LenLower + + test eax,0ffffffffh + + jnz LenLower32 + + add rdx,4 + shr rax,32 + or ax,ax + jnz LenLower + +LenLower32: + shr eax,16 + add rdx,2 +LenLower: sub al, 1 + adc rdx, 0 +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea rax, [rdi + rdx] + sub rax, r9 + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. +;/////////////////////////////////// + + cmp eax, r11d + jg LongerMatch + + lea rsi,[r10+r11] + + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: + mov r11d, eax + mov match_start, r8d + cmp eax, [nicematch] + jge LeaveNow + + lea rsi,[r10+rax] + + movzx ebx, word ptr [r9 + rax - 1] + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: + mov r11d,MAX_MATCH + mov match_start, r8d + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: +IFDEF INFOZIP + mov eax,r11d +ELSE + mov eax, Lookahead + cmp r11d, eax + cmovng eax, r11d +ENDIF + +;;; Restore the stack and return from whence we came. + + + mov rsi,[save_rsi] + mov rdi,[save_rdi] + mov rbx,[save_rbx] + mov rbp,[save_rbp] + mov r12,[save_r12] + mov r13,[save_r13] +; mov r14,[save_r14] +; mov r15,[save_r15] + + + ret 0 +; please don't remove this string ! +; Your can freely use gvmat64 in any free or commercial app +; but it is far better don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 +longest_match ENDP + +match_init PROC + ret 0 +match_init ENDP + + +END diff --git a/compat/zlib/contrib/masmx64/inffas8664.c b/compat/zlib/contrib/masmx64/inffas8664.c index 3af764d..aa861a3 100644 --- a/compat/zlib/contrib/masmx64/inffas8664.c +++ b/compat/zlib/contrib/masmx64/inffas8664.c @@ -1,186 +1,186 @@ -/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding - * version for AMD64 on Windows using Microsoft C compiler - * - * Copyright (C) 1995-2003 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Copyright (C) 2003 Chris Anderson - * Please use the copyright conditions above. - * - * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant - * - * inffas8664.c call function inffas8664fnc in inffasx64.asm - * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c - * - * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also - * slightly quicker on x86 systems because, instead of using rep movsb to copy - * data, it uses rep movsw, which moves data in 2-byte chunks instead of single - * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates - * from http://fedora.linux.duke.edu/fc1_x86_64 - * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with - * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, - * when decompressing mozilla-source-1.3.tar.gz. - * - * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from - * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at - * the moment. I have successfully compiled and tested this code with gcc2.96, - * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S - * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX - * enabled. I will attempt to merge the MMX code into this version. Newer - * versions of this and inffast.S can be found at - * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ - * - */ - -#include -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -/* Mark Adler's comments from inffast.c: */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state->mode == LEN - strm->avail_in >= 6 - strm->avail_out >= 258 - start >= strm->avail_out - state->bits < 8 - - On return, state->mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm->avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm->avail_out >= 258 for each loop to avoid checking for - output space. - */ - - - - typedef struct inffast_ar { -/* 64 32 x86 x86_64 */ -/* ar offset register */ -/* 0 0 */ void *esp; /* esp save */ -/* 8 4 */ void *ebp; /* ebp save */ -/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ -/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ -/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ -/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ -/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ -/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ -/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ -/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ -/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */ -/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ -/* 92 48 */ unsigned wsize; /* window size */ -/* 96 52 */ unsigned write; /* window write index */ -/*100 56 */ unsigned lmask; /* r12 mask for lcode */ -/*104 60 */ unsigned dmask; /* r13 mask for dcode */ -/*108 64 */ unsigned len; /* r14 match length */ -/*112 68 */ unsigned dist; /* r15 match distance */ -/*116 72 */ unsigned status; /* set when state chng*/ - } type_ar; -#ifdef ASMINF - -void inflate_fast(strm, start) -z_streamp strm; -unsigned start; /* inflate()'s starting value for strm->avail_out */ -{ - struct inflate_state FAR *state; - type_ar ar; - void inffas8664fnc(struct inffast_ar * par); - - - -#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64)) -#define PAD_AVAIL_IN 6 -#define PAD_AVAIL_OUT 258 -#else -#define PAD_AVAIL_IN 5 -#define PAD_AVAIL_OUT 257 -#endif - - /* copy state to local variables */ - state = (struct inflate_state FAR *)strm->state; - - ar.in = strm->next_in; - ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); - ar.out = strm->next_out; - ar.beg = ar.out - (start - strm->avail_out); - ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); - ar.wsize = state->wsize; - ar.write = state->write; - ar.window = state->window; - ar.hold = state->hold; - ar.bits = state->bits; - ar.lcode = state->lencode; - ar.dcode = state->distcode; - ar.lmask = (1U << state->lenbits) - 1; - ar.dmask = (1U << state->distbits) - 1; - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - /* align in on 1/2 hold size boundary */ - while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { - ar.hold += (unsigned long)*ar.in++ << ar.bits; - ar.bits += 8; - } - - inffas8664fnc(&ar); - - if (ar.status > 1) { - if (ar.status == 2) - strm->msg = "invalid literal/length code"; - else if (ar.status == 3) - strm->msg = "invalid distance code"; - else - strm->msg = "invalid distance too far back"; - state->mode = BAD; - } - else if ( ar.status == 1 ) { - state->mode = TYPE; - } - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - ar.len = ar.bits >> 3; - ar.in -= ar.len; - ar.bits -= ar.len << 3; - ar.hold &= (1U << ar.bits) - 1; - - /* update state and return */ - strm->next_in = ar.in; - strm->next_out = ar.out; - strm->avail_in = (unsigned)(ar.in < ar.last ? - PAD_AVAIL_IN + (ar.last - ar.in) : - PAD_AVAIL_IN - (ar.in - ar.last)); - strm->avail_out = (unsigned)(ar.out < ar.end ? - PAD_AVAIL_OUT + (ar.end - ar.out) : - PAD_AVAIL_OUT - (ar.out - ar.end)); - state->hold = (unsigned long)ar.hold; - state->bits = ar.bits; - return; -} - -#endif +/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding + * version for AMD64 on Windows using Microsoft C compiler + * + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant + * + * inffas8664.c call function inffas8664fnc in inffasx64.asm + * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c + * + * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also + * slightly quicker on x86 systems because, instead of using rep movsb to copy + * data, it uses rep movsw, which moves data in 2-byte chunks instead of single + * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates + * from http://fedora.linux.duke.edu/fc1_x86_64 + * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with + * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, + * when decompressing mozilla-source-1.3.tar.gz. + * + * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from + * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at + * the moment. I have successfully compiled and tested this code with gcc2.96, + * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S + * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX + * enabled. I will attempt to merge the MMX code into this version. Newer + * versions of this and inffast.S can be found at + * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ + * + */ + +#include +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* Mark Adler's comments from inffast.c: */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ + + + + typedef struct inffast_ar { +/* 64 32 x86 x86_64 */ +/* ar offset register */ +/* 0 0 */ void *esp; /* esp save */ +/* 8 4 */ void *ebp; /* ebp save */ +/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ +/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ +/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ +/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ +/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ +/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ +/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ +/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ +/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */ +/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ +/* 92 48 */ unsigned wsize; /* window size */ +/* 96 52 */ unsigned write; /* window write index */ +/*100 56 */ unsigned lmask; /* r12 mask for lcode */ +/*104 60 */ unsigned dmask; /* r13 mask for dcode */ +/*108 64 */ unsigned len; /* r14 match length */ +/*112 68 */ unsigned dist; /* r15 match distance */ +/*116 72 */ unsigned status; /* set when state chng*/ + } type_ar; +#ifdef ASMINF + +void inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + type_ar ar; + void inffas8664fnc(struct inffast_ar * par); + + + +#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64)) +#define PAD_AVAIL_IN 6 +#define PAD_AVAIL_OUT 258 +#else +#define PAD_AVAIL_IN 5 +#define PAD_AVAIL_OUT 257 +#endif + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + + ar.in = strm->next_in; + ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); + ar.out = strm->next_out; + ar.beg = ar.out - (start - strm->avail_out); + ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); + ar.wsize = state->wsize; + ar.write = state->wnext; + ar.window = state->window; + ar.hold = state->hold; + ar.bits = state->bits; + ar.lcode = state->lencode; + ar.dcode = state->distcode; + ar.lmask = (1U << state->lenbits) - 1; + ar.dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + /* align in on 1/2 hold size boundary */ + while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { + ar.hold += (unsigned long)*ar.in++ << ar.bits; + ar.bits += 8; + } + + inffas8664fnc(&ar); + + if (ar.status > 1) { + if (ar.status == 2) + strm->msg = "invalid literal/length code"; + else if (ar.status == 3) + strm->msg = "invalid distance code"; + else + strm->msg = "invalid distance too far back"; + state->mode = BAD; + } + else if ( ar.status == 1 ) { + state->mode = TYPE; + } + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + ar.len = ar.bits >> 3; + ar.in -= ar.len; + ar.bits -= ar.len << 3; + ar.hold &= (1U << ar.bits) - 1; + + /* update state and return */ + strm->next_in = ar.in; + strm->next_out = ar.out; + strm->avail_in = (unsigned)(ar.in < ar.last ? + PAD_AVAIL_IN + (ar.last - ar.in) : + PAD_AVAIL_IN - (ar.in - ar.last)); + strm->avail_out = (unsigned)(ar.out < ar.end ? + PAD_AVAIL_OUT + (ar.end - ar.out) : + PAD_AVAIL_OUT - (ar.out - ar.end)); + state->hold = (unsigned long)ar.hold; + state->bits = ar.bits; + return; +} + +#endif diff --git a/compat/zlib/contrib/masmx64/inffasx64.asm b/compat/zlib/contrib/masmx64/inffasx64.asm index b5d93a2..41ec823 100644 --- a/compat/zlib/contrib/masmx64/inffasx64.asm +++ b/compat/zlib/contrib/masmx64/inffasx64.asm @@ -1,392 +1,396 @@ -; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding -; version for AMD64 on Windows using Microsoft C compiler -; -; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c -; inffasx64.asm is called by inffas8664.c, which contain more info. - - -; to compile this file, I use option -; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm -; with Microsoft Macro Assembler (x64) for AMD64 -; -; ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK -; -; (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from -; http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) -; - -.code -inffas8664fnc PROC - -; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and -; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp -; -; All registers must be preserved across the call, except for -; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch. - - - mov [rsp-8],rsi - mov [rsp-16],rdi - mov [rsp-24],r12 - mov [rsp-32],r13 - mov [rsp-40],r14 - mov [rsp-48],r15 - mov [rsp-56],rbx - - mov rax,rcx - - mov [rax+8], rbp ; /* save regs rbp and rsp */ - mov [rax], rsp - - mov rsp, rax ; /* make rsp point to &ar */ - - mov rsi, [rsp+16] ; /* rsi = in */ - mov rdi, [rsp+32] ; /* rdi = out */ - mov r9, [rsp+24] ; /* r9 = last */ - mov r10, [rsp+48] ; /* r10 = end */ - mov rbp, [rsp+64] ; /* rbp = lcode */ - mov r11, [rsp+72] ; /* r11 = dcode */ - mov rdx, [rsp+80] ; /* rdx = hold */ - mov ebx, [rsp+88] ; /* ebx = bits */ - mov r12d, [rsp+100] ; /* r12d = lmask */ - mov r13d, [rsp+104] ; /* r13d = dmask */ - ; /* r14d = len */ - ; /* r15d = dist */ - - - cld - cmp r10, rdi - je L_one_time ; /* if only one decode left */ - cmp r9, rsi - - jne L_do_loop - - -L_one_time: - mov r8, r12 ; /* r8 = lmask */ - cmp bl, 32 - ja L_get_length_code_one_time - - lodsd ; /* eax = *(uint *)in++ */ - mov cl, bl ; /* cl = bits, needs it for shifting */ - add bl, 32 ; /* bits += 32 */ - shl rax, cl - or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ - jmp L_get_length_code_one_time - -ALIGN 4 -L_while_test: - cmp r10, rdi - jbe L_break_loop - cmp r9, rsi - jbe L_break_loop - -L_do_loop: - mov r8, r12 ; /* r8 = lmask */ - cmp bl, 32 - ja L_get_length_code ; /* if (32 < bits) */ - - lodsd ; /* eax = *(uint *)in++ */ - mov cl, bl ; /* cl = bits, needs it for shifting */ - add bl, 32 ; /* bits += 32 */ - shl rax, cl - or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ - -L_get_length_code: - and r8, rdx ; /* r8 &= hold */ - mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ - - mov cl, ah ; /* cl = this.bits */ - sub bl, ah ; /* bits -= this.bits */ - shr rdx, cl ; /* hold >>= this.bits */ - - test al, al - jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ - - mov r8, r12 ; /* r8 = lmask */ - shr eax, 16 ; /* output this.val char */ - stosb - -L_get_length_code_one_time: - and r8, rdx ; /* r8 &= hold */ - mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ - -L_dolen: - mov cl, ah ; /* cl = this.bits */ - sub bl, ah ; /* bits -= this.bits */ - shr rdx, cl ; /* hold >>= this.bits */ - - test al, al - jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ - - shr eax, 16 ; /* output this.val char */ - stosb - jmp L_while_test - -ALIGN 4 -L_test_for_length_base: - mov r14d, eax ; /* len = this */ - shr r14d, 16 ; /* len = this.val */ - mov cl, al - - test al, 16 - jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */ - and cl, 15 ; /* op &= 15 */ - jz L_decode_distance ; /* if (!op) */ - -L_add_bits_to_len: - sub bl, cl - xor eax, eax - inc eax - shl eax, cl - dec eax - and eax, edx ; /* eax &= hold */ - shr rdx, cl - add r14d, eax ; /* len += hold & mask[op] */ - -L_decode_distance: - mov r8, r13 ; /* r8 = dmask */ - cmp bl, 32 - ja L_get_distance_code ; /* if (32 < bits) */ - - lodsd ; /* eax = *(uint *)in++ */ - mov cl, bl ; /* cl = bits, needs it for shifting */ - add bl, 32 ; /* bits += 32 */ - shl rax, cl - or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ - -L_get_distance_code: - and r8, rdx ; /* r8 &= hold */ - mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */ - -L_dodist: - mov r15d, eax ; /* dist = this */ - shr r15d, 16 ; /* dist = this.val */ - mov cl, ah - sub bl, ah ; /* bits -= this.bits */ - shr rdx, cl ; /* hold >>= this.bits */ - mov cl, al ; /* cl = this.op */ - - test al, 16 ; /* if ((op & 16) == 0) */ - jz L_test_for_second_level_dist - and cl, 15 ; /* op &= 15 */ - jz L_check_dist_one - -L_add_bits_to_dist: - sub bl, cl - xor eax, eax - inc eax - shl eax, cl - dec eax ; /* (1 << op) - 1 */ - and eax, edx ; /* eax &= hold */ - shr rdx, cl - add r15d, eax ; /* dist += hold & ((1 << op) - 1) */ - -L_check_window: - mov r8, rsi ; /* save in so from can use it's reg */ - mov rax, rdi - sub rax, [rsp+40] ; /* nbytes = out - beg */ - - cmp eax, r15d - jb L_clip_window ; /* if (dist > nbytes) 4.2% */ - - mov ecx, r14d ; /* ecx = len */ - mov rsi, rdi - sub rsi, r15 ; /* from = out - dist */ - - sar ecx, 1 - jnc L_copy_two ; /* if len % 2 == 0 */ - - rep movsw - mov al, [rsi] - mov [rdi], al - inc rdi - - mov rsi, r8 ; /* move in back to %rsi, toss from */ - jmp L_while_test - -L_copy_two: - rep movsw - mov rsi, r8 ; /* move in back to %rsi, toss from */ - jmp L_while_test - -ALIGN 4 -L_check_dist_one: - cmp r15d, 1 ; /* if dist 1, is a memset */ - jne L_check_window - cmp [rsp+40], rdi ; /* if out == beg, outside window */ - je L_check_window - - mov ecx, r14d ; /* ecx = len */ - mov al, [rdi-1] - mov ah, al - - sar ecx, 1 - jnc L_set_two - mov [rdi], al - inc rdi - -L_set_two: - rep stosw - jmp L_while_test - -ALIGN 4 -L_test_for_second_level_length: - test al, 64 - jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */ - - xor eax, eax - inc eax - shl eax, cl - dec eax - and eax, edx ; /* eax &= hold */ - add eax, r14d ; /* eax += len */ - mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/ - jmp L_dolen - -ALIGN 4 -L_test_for_second_level_dist: - test al, 64 - jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */ - - xor eax, eax - inc eax - shl eax, cl - dec eax - and eax, edx ; /* eax &= hold */ - add eax, r15d ; /* eax += dist */ - mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/ - jmp L_dodist - -ALIGN 4 -L_clip_window: - mov ecx, eax ; /* ecx = nbytes */ - mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */ - neg ecx ; /* nbytes = -nbytes */ - - cmp eax, r15d - jb L_invalid_distance_too_far ; /* if (dist > wsize) */ - - add ecx, r15d ; /* nbytes = dist - nbytes */ - cmp dword ptr [rsp+96], 0 - jne L_wrap_around_window ; /* if (write != 0) */ - - mov rsi, [rsp+56] ; /* from = window */ - sub eax, ecx ; /* eax -= nbytes */ - add rsi, rax ; /* from += wsize - nbytes */ - - mov eax, r14d ; /* eax = len */ - cmp r14d, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* eax -= nbytes */ - rep movsb - mov rsi, rdi - sub rsi, r15 ; /* from = &out[ -dist ] */ - jmp L_do_copy - -ALIGN 4 -L_wrap_around_window: - mov eax, [rsp+96] ; /* eax = write */ - cmp ecx, eax - jbe L_contiguous_in_window ; /* if (write >= nbytes) */ - - mov esi, [rsp+92] ; /* from = wsize */ - add rsi, [rsp+56] ; /* from += window */ - add rsi, rax ; /* from += write */ - sub rsi, rcx ; /* from -= nbytes */ - sub ecx, eax ; /* nbytes -= write */ - - mov eax, r14d ; /* eax = len */ - cmp eax, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* len -= nbytes */ - rep movsb - mov rsi, [rsp+56] ; /* from = window */ - mov ecx, [rsp+96] ; /* nbytes = write */ - cmp eax, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* len -= nbytes */ - rep movsb - mov rsi, rdi - sub rsi, r15 ; /* from = out - dist */ - jmp L_do_copy - -ALIGN 4 -L_contiguous_in_window: - mov rsi, [rsp+56] ; /* rsi = window */ - add rsi, rax - sub rsi, rcx ; /* from += write - nbytes */ - - mov eax, r14d ; /* eax = len */ - cmp eax, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* len -= nbytes */ - rep movsb - mov rsi, rdi - sub rsi, r15 ; /* from = out - dist */ - jmp L_do_copy ; /* if (nbytes >= len) */ - -ALIGN 4 -L_do_copy: - mov ecx, eax ; /* ecx = len */ - rep movsb - - mov rsi, r8 ; /* move in back to %esi, toss from */ - jmp L_while_test - -L_test_for_end_of_block: - test al, 32 - jz L_invalid_literal_length_code - mov dword ptr [rsp+116], 1 - jmp L_break_loop_with_status - -L_invalid_literal_length_code: - mov dword ptr [rsp+116], 2 - jmp L_break_loop_with_status - -L_invalid_distance_code: - mov dword ptr [rsp+116], 3 - jmp L_break_loop_with_status - -L_invalid_distance_too_far: - mov dword ptr [rsp+116], 4 - jmp L_break_loop_with_status - -L_break_loop: - mov dword ptr [rsp+116], 0 - -L_break_loop_with_status: -; /* put in, out, bits, and hold back into ar and pop esp */ - mov [rsp+16], rsi ; /* in */ - mov [rsp+32], rdi ; /* out */ - mov [rsp+88], ebx ; /* bits */ - mov [rsp+80], rdx ; /* hold */ - - mov rax, [rsp] ; /* restore rbp and rsp */ - mov rbp, [rsp+8] - mov rsp, rax - - - - mov rsi,[rsp-8] - mov rdi,[rsp-16] - mov r12,[rsp-24] - mov r13,[rsp-32] - mov r14,[rsp-40] - mov r15,[rsp-48] - mov rbx,[rsp-56] - - ret 0 -; : -; : "m" (ar) -; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", -; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" -; ); - -inffas8664fnc ENDP -;_TEXT ENDS -END +; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding +; version for AMD64 on Windows using Microsoft C compiler +; +; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c +; inffasx64.asm is called by inffas8664.c, which contain more info. + + +; to compile this file, I use option +; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +; with Microsoft Macro Assembler (x64) for AMD64 +; + +; This file compile with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK +; +; (you can get Windows WDK with ml64 for AMD64 from +; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) +; + + +.code +inffas8664fnc PROC + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch. + + + mov [rsp-8],rsi + mov [rsp-16],rdi + mov [rsp-24],r12 + mov [rsp-32],r13 + mov [rsp-40],r14 + mov [rsp-48],r15 + mov [rsp-56],rbx + + mov rax,rcx + + mov [rax+8], rbp ; /* save regs rbp and rsp */ + mov [rax], rsp + + mov rsp, rax ; /* make rsp point to &ar */ + + mov rsi, [rsp+16] ; /* rsi = in */ + mov rdi, [rsp+32] ; /* rdi = out */ + mov r9, [rsp+24] ; /* r9 = last */ + mov r10, [rsp+48] ; /* r10 = end */ + mov rbp, [rsp+64] ; /* rbp = lcode */ + mov r11, [rsp+72] ; /* r11 = dcode */ + mov rdx, [rsp+80] ; /* rdx = hold */ + mov ebx, [rsp+88] ; /* ebx = bits */ + mov r12d, [rsp+100] ; /* r12d = lmask */ + mov r13d, [rsp+104] ; /* r13d = dmask */ + ; /* r14d = len */ + ; /* r15d = dist */ + + + cld + cmp r10, rdi + je L_one_time ; /* if only one decode left */ + cmp r9, rsi + + jne L_do_loop + + +L_one_time: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code_one_time + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + jmp L_get_length_code_one_time + +ALIGN 4 +L_while_test: + cmp r10, rdi + jbe L_break_loop + cmp r9, rsi + jbe L_break_loop + +L_do_loop: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_length_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + mov r8, r12 ; /* r8 = lmask */ + shr eax, 16 ; /* output this.val char */ + stosb + +L_get_length_code_one_time: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + +L_dolen: + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + shr eax, 16 ; /* output this.val char */ + stosb + jmp L_while_test + +ALIGN 4 +L_test_for_length_base: + mov r14d, eax ; /* len = this */ + shr r14d, 16 ; /* len = this.val */ + mov cl, al + + test al, 16 + jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */ + and cl, 15 ; /* op &= 15 */ + jz L_decode_distance ; /* if (!op) */ + +L_add_bits_to_len: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r14d, eax ; /* len += hold & mask[op] */ + +L_decode_distance: + mov r8, r13 ; /* r8 = dmask */ + cmp bl, 32 + ja L_get_distance_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_distance_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */ + +L_dodist: + mov r15d, eax ; /* dist = this */ + shr r15d, 16 ; /* dist = this.val */ + mov cl, ah + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + mov cl, al ; /* cl = this.op */ + + test al, 16 ; /* if ((op & 16) == 0) */ + jz L_test_for_second_level_dist + and cl, 15 ; /* op &= 15 */ + jz L_check_dist_one + +L_add_bits_to_dist: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax ; /* (1 << op) - 1 */ + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r15d, eax ; /* dist += hold & ((1 << op) - 1) */ + +L_check_window: + mov r8, rsi ; /* save in so from can use it's reg */ + mov rax, rdi + sub rax, [rsp+40] ; /* nbytes = out - beg */ + + cmp eax, r15d + jb L_clip_window ; /* if (dist > nbytes) 4.2% */ + + mov ecx, r14d ; /* ecx = len */ + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + + sar ecx, 1 + jnc L_copy_two ; /* if len % 2 == 0 */ + + rep movsw + mov al, [rsi] + mov [rdi], al + inc rdi + + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +L_copy_two: + rep movsw + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp r15d, 1 ; /* if dist 1, is a memset */ + jne L_check_window + cmp [rsp+40], rdi ; /* if out == beg, outside window */ + je L_check_window + + mov ecx, r14d ; /* ecx = len */ + mov al, [rdi-1] + mov ah, al + + sar ecx, 1 + jnc L_set_two + mov [rdi], al + inc rdi + +L_set_two: + rep stosw + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + test al, 64 + jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r14d ; /* eax += len */ + mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/ + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + test al, 64 + jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r15d ; /* eax += dist */ + mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/ + jmp L_dodist + +ALIGN 4 +L_clip_window: + mov ecx, eax ; /* ecx = nbytes */ + mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */ + neg ecx ; /* nbytes = -nbytes */ + + cmp eax, r15d + jb L_invalid_distance_too_far ; /* if (dist > wsize) */ + + add ecx, r15d ; /* nbytes = dist - nbytes */ + cmp dword ptr [rsp+96], 0 + jne L_wrap_around_window ; /* if (write != 0) */ + + mov rsi, [rsp+56] ; /* from = window */ + sub eax, ecx ; /* eax -= nbytes */ + add rsi, rax ; /* from += wsize - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp r14d, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* eax -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = &out[ -dist ] */ + jmp L_do_copy + +ALIGN 4 +L_wrap_around_window: + mov eax, [rsp+96] ; /* eax = write */ + cmp ecx, eax + jbe L_contiguous_in_window ; /* if (write >= nbytes) */ + + mov esi, [rsp+92] ; /* from = wsize */ + add rsi, [rsp+56] ; /* from += window */ + add rsi, rax ; /* from += write */ + sub rsi, rcx ; /* from -= nbytes */ + sub ecx, eax ; /* nbytes -= write */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, [rsp+56] ; /* from = window */ + mov ecx, [rsp+96] ; /* nbytes = write */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_contiguous_in_window: + mov rsi, [rsp+56] ; /* rsi = window */ + add rsi, rax + sub rsi, rcx ; /* from += write - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy ; /* if (nbytes >= len) */ + +ALIGN 4 +L_do_copy: + mov ecx, eax ; /* ecx = len */ + rep movsb + + mov rsi, r8 ; /* move in back to %esi, toss from */ + jmp L_while_test + +L_test_for_end_of_block: + test al, 32 + jz L_invalid_literal_length_code + mov dword ptr [rsp+116], 1 + jmp L_break_loop_with_status + +L_invalid_literal_length_code: + mov dword ptr [rsp+116], 2 + jmp L_break_loop_with_status + +L_invalid_distance_code: + mov dword ptr [rsp+116], 3 + jmp L_break_loop_with_status + +L_invalid_distance_too_far: + mov dword ptr [rsp+116], 4 + jmp L_break_loop_with_status + +L_break_loop: + mov dword ptr [rsp+116], 0 + +L_break_loop_with_status: +; /* put in, out, bits, and hold back into ar and pop esp */ + mov [rsp+16], rsi ; /* in */ + mov [rsp+32], rdi ; /* out */ + mov [rsp+88], ebx ; /* bits */ + mov [rsp+80], rdx ; /* hold */ + + mov rax, [rsp] ; /* restore rbp and rsp */ + mov rbp, [rsp+8] + mov rsp, rax + + + + mov rsi,[rsp-8] + mov rdi,[rsp-16] + mov r12,[rsp-24] + mov r13,[rsp-32] + mov r14,[rsp-40] + mov r15,[rsp-48] + mov rbx,[rsp-56] + + ret 0 +; : +; : "m" (ar) +; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", +; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" +; ); + +inffas8664fnc ENDP +;_TEXT ENDS +END diff --git a/compat/zlib/contrib/masmx64/readme.txt b/compat/zlib/contrib/masmx64/readme.txt index ee03115..652571c 100644 --- a/compat/zlib/contrib/masmx64/readme.txt +++ b/compat/zlib/contrib/masmx64/readme.txt @@ -1,28 +1,31 @@ -Summary -------- -This directory contains ASM implementations of the functions -longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t), -for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits. - -gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits - assembly optimized version from Jean-loup Gailly original longest_match function - -inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing - original function from Mark Adler - -Use instructions ----------------- -Copy these files into the zlib source directory. - -define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, -and inffasx64.obj and gvmat64.obj as object to link. - - -Build instructions ------------------- -run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) - -ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK - -You can get Windows 2003 server DDK with ml64 and cl for AMD64 from - http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) +Summary +------- +This directory contains ASM implementations of the functions +longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t), +for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits. + +gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits + assembly optimized version from Jean-loup Gailly original longest_match function + +inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing + original function from Mark Adler + +Use instructions +---------------- +Assemble the .asm files using MASM and put the object files into the zlib source +directory. You can also get object files here: + + http://www.winimage.com/zLibDll/zlib124_masm_obj.zip + +define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, +and inffasx64.obj and gvmat64.obj as object to link. + + +Build instructions +------------------ +run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) + +ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK + +You can get Windows 2003 server DDK with ml64 and cl for AMD64 from + http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) diff --git a/compat/zlib/contrib/masmx86/bld_ml32.bat b/compat/zlib/contrib/masmx86/bld_ml32.bat index 99144d0..fcf5755 100644 --- a/compat/zlib/contrib/masmx86/bld_ml32.bat +++ b/compat/zlib/contrib/masmx86/bld_ml32.bat @@ -1,2 +1,2 @@ -ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm -ml /coff /Zi /c /Flinffas32.lst inffas32.asm +ml /coff /Zi /c /Flmatch686.lst match686.asm +ml /coff /Zi /c /Flinffas32.lst inffas32.asm diff --git a/compat/zlib/contrib/masmx86/inffas32.asm b/compat/zlib/contrib/masmx86/inffas32.asm index 4a20512..14f9d35 100644 --- a/compat/zlib/contrib/masmx86/inffas32.asm +++ b/compat/zlib/contrib/masmx86/inffas32.asm @@ -1,1083 +1,1083 @@ -;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding -; * -; * inffas32.asm is derivated from inffas86.c, with translation of assembly code -; * -; * Copyright (C) 1995-2003 Mark Adler -; * For conditions of distribution and use, see copyright notice in zlib.h -; * -; * Copyright (C) 2003 Chris Anderson -; * Please use the copyright conditions above. -; * -; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from -; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at -; * the moment. I have successfully compiled and tested this code with gcc2.96, -; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S -; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX -; * enabled. I will attempt to merge the MMX code into this version. Newer -; * versions of this and inffast.S can be found at -; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ -; * -; * 2005 : modification by Gilles Vollant -; */ -; For Visual C++ 4.x and higher and ML 6.x and higher -; ml.exe is in directory \MASM611C of Win95 DDK -; ml.exe is also distributed in http://www.masm32.com/masmdl.htm -; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ -; -; -; compile with command line option -; ml /coff /Zi /c /Flinffas32.lst inffas32.asm - -; if you define NO_GZIP (see inflate.h), compile with -; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm - - -; zlib122sup is 0 fort zlib 1.2.2.1 and lower -; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head -; in inflate_state in inflate.h) -zlib1222sup equ 8 - - -IFDEF GUNZIP - INFLATE_MODE_TYPE equ 11 - INFLATE_MODE_BAD equ 26 -ELSE - IFNDEF NO_GUNZIP - INFLATE_MODE_TYPE equ 11 - INFLATE_MODE_BAD equ 26 - ELSE - INFLATE_MODE_TYPE equ 3 - INFLATE_MODE_BAD equ 17 - ENDIF -ENDIF - - -; 75 "inffast.S" -;FILE "inffast.S" - -;;;GLOBAL _inflate_fast - -;;;SECTION .text - - - - .586p - .mmx - - name inflate_fast_x86 - .MODEL FLAT - -_DATA segment -inflate_fast_use_mmx: - dd 1 - - -_TEXT segment -PUBLIC _inflate_fast - -ALIGN 4 -_inflate_fast: - jmp inflate_fast_entry - - - -ALIGN 4 - db 'Fast decoding Code from Chris Anderson' - db 0 - -ALIGN 4 -invalid_literal_length_code_msg: - db 'invalid literal/length code' - db 0 - -ALIGN 4 -invalid_distance_code_msg: - db 'invalid distance code' - db 0 - -ALIGN 4 -invalid_distance_too_far_msg: - db 'invalid distance too far back' - db 0 - - -ALIGN 4 -inflate_fast_mask: -dd 0 -dd 1 -dd 3 -dd 7 -dd 15 -dd 31 -dd 63 -dd 127 -dd 255 -dd 511 -dd 1023 -dd 2047 -dd 4095 -dd 8191 -dd 16383 -dd 32767 -dd 65535 -dd 131071 -dd 262143 -dd 524287 -dd 1048575 -dd 2097151 -dd 4194303 -dd 8388607 -dd 16777215 -dd 33554431 -dd 67108863 -dd 134217727 -dd 268435455 -dd 536870911 -dd 1073741823 -dd 2147483647 -dd 4294967295 - - -mode_state equ 0 ;/* state->mode */ -wsize_state equ (32+zlib1222sup) ;/* state->wsize */ -write_state equ (36+4+zlib1222sup) ;/* state->write */ -window_state equ (40+4+zlib1222sup) ;/* state->window */ -hold_state equ (44+4+zlib1222sup) ;/* state->hold */ -bits_state equ (48+4+zlib1222sup) ;/* state->bits */ -lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ -distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ -lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ -distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ - - -;;SECTION .text -; 205 "inffast.S" -;GLOBAL inflate_fast_use_mmx - -;SECTION .data - - -; GLOBAL inflate_fast_use_mmx:object -;.size inflate_fast_use_mmx, 4 -; 226 "inffast.S" -;SECTION .text - -ALIGN 4 -inflate_fast_entry: - push edi - push esi - push ebp - push ebx - pushfd - sub esp,64 - cld - - - - - mov esi, [esp+88] - mov edi, [esi+28] - - - - - - - - mov edx, [esi+4] - mov eax, [esi+0] - - add edx,eax - sub edx,11 - - mov [esp+44],eax - mov [esp+20],edx - - mov ebp, [esp+92] - mov ecx, [esi+16] - mov ebx, [esi+12] - - sub ebp,ecx - neg ebp - add ebp,ebx - - sub ecx,257 - add ecx,ebx - - mov [esp+60],ebx - mov [esp+40],ebp - mov [esp+16],ecx -; 285 "inffast.S" - mov eax, [edi+lencode_state] - mov ecx, [edi+distcode_state] - - mov [esp+8],eax - mov [esp+12],ecx - - mov eax,1 - mov ecx, [edi+lenbits_state] - shl eax,cl - dec eax - mov [esp+0],eax - - mov eax,1 - mov ecx, [edi+distbits_state] - shl eax,cl - dec eax - mov [esp+4],eax - - mov eax, [edi+wsize_state] - mov ecx, [edi+write_state] - mov edx, [edi+window_state] - - mov [esp+52],eax - mov [esp+48],ecx - mov [esp+56],edx - - mov ebp, [edi+hold_state] - mov ebx, [edi+bits_state] -; 321 "inffast.S" - mov esi, [esp+44] - mov ecx, [esp+20] - cmp ecx,esi - ja L_align_long - - add ecx,11 - sub ecx,esi - mov eax,12 - sub eax,ecx - lea edi, [esp+28] - rep movsb - mov ecx,eax - xor eax,eax - rep stosb - lea esi, [esp+28] - mov [esp+20],esi - jmp L_is_aligned - - -L_align_long: - test esi,3 - jz L_is_aligned - xor eax,eax - mov al, [esi] - inc esi - mov ecx,ebx - add ebx,8 - shl eax,cl - or ebp,eax - jmp L_align_long - -L_is_aligned: - mov edi, [esp+60] -; 366 "inffast.S" -L_check_mmx: - cmp dword ptr [inflate_fast_use_mmx],2 - je L_init_mmx - ja L_do_loop - - push eax - push ebx - push ecx - push edx - pushfd - mov eax, [esp] - xor dword ptr [esp],0200000h - - - - - popfd - pushfd - pop edx - xor edx,eax - jz L_dont_use_mmx - xor eax,eax - cpuid - cmp ebx,0756e6547h - jne L_dont_use_mmx - cmp ecx,06c65746eh - jne L_dont_use_mmx - cmp edx,049656e69h - jne L_dont_use_mmx - mov eax,1 - cpuid - shr eax,8 - and eax,15 - cmp eax,6 - jne L_dont_use_mmx - test edx,0800000h - jnz L_use_mmx - jmp L_dont_use_mmx -L_use_mmx: - mov dword ptr [inflate_fast_use_mmx],2 - jmp L_check_mmx_pop -L_dont_use_mmx: - mov dword ptr [inflate_fast_use_mmx],3 -L_check_mmx_pop: - pop edx - pop ecx - pop ebx - pop eax - jmp L_check_mmx -; 426 "inffast.S" -ALIGN 4 -L_do_loop: -; 437 "inffast.S" - cmp bl,15 - ja L_get_length_code - - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - -L_get_length_code: - mov edx, [esp+0] - mov ecx, [esp+8] - and edx,ebp - mov eax, [ecx+edx*4] - -L_dolen: - - - - - - - mov cl,ah - sub bl,ah - shr ebp,cl - - - - - - - test al,al - jnz L_test_for_length_base - - shr eax,16 - stosb - -L_while_test: - - - cmp [esp+16],edi - jbe L_break_loop - - cmp [esp+20],esi - ja L_do_loop - jmp L_break_loop - -L_test_for_length_base: -; 502 "inffast.S" - mov edx,eax - shr edx,16 - mov cl,al - - test al,16 - jz L_test_for_second_level_length - and cl,15 - jz L_save_len - cmp bl,cl - jae L_add_bits_to_len - - mov ch,cl - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - mov cl,ch - -L_add_bits_to_len: - mov eax,1 - shl eax,cl - dec eax - sub bl,cl - and eax,ebp - shr ebp,cl - add edx,eax - -L_save_len: - mov [esp+24],edx - - -L_decode_distance: -; 549 "inffast.S" - cmp bl,15 - ja L_get_distance_code - - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - -L_get_distance_code: - mov edx, [esp+4] - mov ecx, [esp+12] - and edx,ebp - mov eax, [ecx+edx*4] - - -L_dodist: - mov edx,eax - shr edx,16 - mov cl,ah - sub bl,ah - shr ebp,cl -; 584 "inffast.S" - mov cl,al - - test al,16 - jz L_test_for_second_level_dist - and cl,15 - jz L_check_dist_one - cmp bl,cl - jae L_add_bits_to_dist - - mov ch,cl - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - mov cl,ch - -L_add_bits_to_dist: - mov eax,1 - shl eax,cl - dec eax - sub bl,cl - and eax,ebp - shr ebp,cl - add edx,eax - jmp L_check_window - -L_check_window: -; 625 "inffast.S" - mov [esp+44],esi - mov eax,edi - sub eax, [esp+40] - - cmp eax,edx - jb L_clip_window - - mov ecx, [esp+24] - mov esi,edi - sub esi,edx - - sub ecx,3 - mov al, [esi] - mov [edi],al - mov al, [esi+1] - mov dl, [esi+2] - add esi,3 - mov [edi+1],al - mov [edi+2],dl - add edi,3 - rep movsb - - mov esi, [esp+44] - jmp L_while_test - -ALIGN 4 -L_check_dist_one: - cmp edx,1 - jne L_check_window - cmp [esp+40],edi - je L_check_window - - dec edi - mov ecx, [esp+24] - mov al, [edi] - sub ecx,3 - - mov [edi+1],al - mov [edi+2],al - mov [edi+3],al - add edi,4 - rep stosb - - jmp L_while_test - -ALIGN 4 -L_test_for_second_level_length: - - - - - test al,64 - jnz L_test_for_end_of_block - - mov eax,1 - shl eax,cl - dec eax - and eax,ebp - add eax,edx - mov edx, [esp+8] - mov eax, [edx+eax*4] - jmp L_dolen - -ALIGN 4 -L_test_for_second_level_dist: - - - - - test al,64 - jnz L_invalid_distance_code - - mov eax,1 - shl eax,cl - dec eax - and eax,ebp - add eax,edx - mov edx, [esp+12] - mov eax, [edx+eax*4] - jmp L_dodist - -ALIGN 4 -L_clip_window: -; 721 "inffast.S" - mov ecx,eax - mov eax, [esp+52] - neg ecx - mov esi, [esp+56] - - cmp eax,edx - jb L_invalid_distance_too_far - - add ecx,edx - cmp dword ptr [esp+48],0 - jne L_wrap_around_window - - sub eax,ecx - add esi,eax -; 749 "inffast.S" - mov eax, [esp+24] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - jmp L_do_copy1 - - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - jmp L_do_copy1 - -L_wrap_around_window: -; 793 "inffast.S" - mov eax, [esp+48] - cmp ecx,eax - jbe L_contiguous_in_window - - add esi, [esp+52] - add esi,eax - sub esi,ecx - sub ecx,eax - - - mov eax, [esp+24] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi, [esp+56] - mov ecx, [esp+48] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - jmp L_do_copy1 - -L_contiguous_in_window: -; 836 "inffast.S" - add esi,eax - sub esi,ecx - - - mov eax, [esp+24] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - -L_do_copy1: -; 862 "inffast.S" - mov ecx,eax - rep movsb - - mov esi, [esp+44] - jmp L_while_test -; 878 "inffast.S" -ALIGN 4 -L_init_mmx: - emms - - - - - - movd mm0,ebp - mov ebp,ebx -; 896 "inffast.S" - movd mm4,[esp+0] - movq mm3,mm4 - movd mm5,[esp+4] - movq mm2,mm5 - pxor mm1,mm1 - mov ebx, [esp+8] - jmp L_do_loop_mmx - -ALIGN 4 -L_do_loop_mmx: - psrlq mm0,mm1 - - cmp ebp,32 - ja L_get_length_code_mmx - - movd mm6,ebp - movd mm7,[esi] - add esi,4 - psllq mm7,mm6 - add ebp,32 - por mm0,mm7 - -L_get_length_code_mmx: - pand mm4,mm0 - movd eax,mm4 - movq mm4,mm3 - mov eax, [ebx+eax*4] - -L_dolen_mmx: - movzx ecx,ah - movd mm1,ecx - sub ebp,ecx - - test al,al - jnz L_test_for_length_base_mmx - - shr eax,16 - stosb - -L_while_test_mmx: - - - cmp [esp+16],edi - jbe L_break_loop - - cmp [esp+20],esi - ja L_do_loop_mmx - jmp L_break_loop - -L_test_for_length_base_mmx: - - mov edx,eax - shr edx,16 - - test al,16 - jz L_test_for_second_level_length_mmx - and eax,15 - jz L_decode_distance_mmx - - psrlq mm0,mm1 - movd mm1,eax - movd ecx,mm0 - sub ebp,eax - and ecx, [inflate_fast_mask+eax*4] - add edx,ecx - -L_decode_distance_mmx: - psrlq mm0,mm1 - - cmp ebp,32 - ja L_get_dist_code_mmx - - movd mm6,ebp - movd mm7,[esi] - add esi,4 - psllq mm7,mm6 - add ebp,32 - por mm0,mm7 - -L_get_dist_code_mmx: - mov ebx, [esp+12] - pand mm5,mm0 - movd eax,mm5 - movq mm5,mm2 - mov eax, [ebx+eax*4] - -L_dodist_mmx: - - movzx ecx,ah - mov ebx,eax - shr ebx,16 - sub ebp,ecx - movd mm1,ecx - - test al,16 - jz L_test_for_second_level_dist_mmx - and eax,15 - jz L_check_dist_one_mmx - -L_add_bits_to_dist_mmx: - psrlq mm0,mm1 - movd mm1,eax - movd ecx,mm0 - sub ebp,eax - and ecx, [inflate_fast_mask+eax*4] - add ebx,ecx - -L_check_window_mmx: - mov [esp+44],esi - mov eax,edi - sub eax, [esp+40] - - cmp eax,ebx - jb L_clip_window_mmx - - mov ecx,edx - mov esi,edi - sub esi,ebx - - sub ecx,3 - mov al, [esi] - mov [edi],al - mov al, [esi+1] - mov dl, [esi+2] - add esi,3 - mov [edi+1],al - mov [edi+2],dl - add edi,3 - rep movsb - - mov esi, [esp+44] - mov ebx, [esp+8] - jmp L_while_test_mmx - -ALIGN 4 -L_check_dist_one_mmx: - cmp ebx,1 - jne L_check_window_mmx - cmp [esp+40],edi - je L_check_window_mmx - - dec edi - mov ecx,edx - mov al, [edi] - sub ecx,3 - - mov [edi+1],al - mov [edi+2],al - mov [edi+3],al - add edi,4 - rep stosb - - mov ebx, [esp+8] - jmp L_while_test_mmx - -ALIGN 4 -L_test_for_second_level_length_mmx: - test al,64 - jnz L_test_for_end_of_block - - and eax,15 - psrlq mm0,mm1 - movd ecx,mm0 - and ecx, [inflate_fast_mask+eax*4] - add ecx,edx - mov eax, [ebx+ecx*4] - jmp L_dolen_mmx - -ALIGN 4 -L_test_for_second_level_dist_mmx: - test al,64 - jnz L_invalid_distance_code - - and eax,15 - psrlq mm0,mm1 - movd ecx,mm0 - and ecx, [inflate_fast_mask+eax*4] - mov eax, [esp+12] - add ecx,ebx - mov eax, [eax+ecx*4] - jmp L_dodist_mmx - -ALIGN 4 -L_clip_window_mmx: - - mov ecx,eax - mov eax, [esp+52] - neg ecx - mov esi, [esp+56] - - cmp eax,ebx - jb L_invalid_distance_too_far - - add ecx,ebx - cmp dword ptr [esp+48],0 - jne L_wrap_around_window_mmx - - sub eax,ecx - add esi,eax - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - jmp L_do_copy1_mmx - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - jmp L_do_copy1_mmx - -L_wrap_around_window_mmx: - - mov eax, [esp+48] - cmp ecx,eax - jbe L_contiguous_in_window_mmx - - add esi, [esp+52] - add esi,eax - sub esi,ecx - sub ecx,eax - - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi, [esp+56] - mov ecx, [esp+48] - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - jmp L_do_copy1_mmx - -L_contiguous_in_window_mmx: - - add esi,eax - sub esi,ecx - - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - -L_do_copy1_mmx: - - - mov ecx,edx - rep movsb - - mov esi, [esp+44] - mov ebx, [esp+8] - jmp L_while_test_mmx -; 1174 "inffast.S" -L_invalid_distance_code: - - - - - - mov ecx, invalid_distance_code_msg - mov edx,INFLATE_MODE_BAD - jmp L_update_stream_state - -L_test_for_end_of_block: - - - - - - test al,32 - jz L_invalid_literal_length_code - - mov ecx,0 - mov edx,INFLATE_MODE_TYPE - jmp L_update_stream_state - -L_invalid_literal_length_code: - - - - - - mov ecx, invalid_literal_length_code_msg - mov edx,INFLATE_MODE_BAD - jmp L_update_stream_state - -L_invalid_distance_too_far: - - - - mov esi, [esp+44] - mov ecx, invalid_distance_too_far_msg - mov edx,INFLATE_MODE_BAD - jmp L_update_stream_state - -L_update_stream_state: - - mov eax, [esp+88] - test ecx,ecx - jz L_skip_msg - mov [eax+24],ecx -L_skip_msg: - mov eax, [eax+28] - mov [eax+mode_state],edx - jmp L_break_loop - -ALIGN 4 -L_break_loop: -; 1243 "inffast.S" - cmp dword ptr [inflate_fast_use_mmx],2 - jne L_update_next_in - - - - mov ebx,ebp - -L_update_next_in: -; 1266 "inffast.S" - mov eax, [esp+88] - mov ecx,ebx - mov edx, [eax+28] - shr ecx,3 - sub esi,ecx - shl ecx,3 - sub ebx,ecx - mov [eax+12],edi - mov [edx+bits_state],ebx - mov ecx,ebx - - lea ebx, [esp+28] - cmp [esp+20],ebx - jne L_buf_not_used - - sub esi,ebx - mov ebx, [eax+0] - mov [esp+20],ebx - add esi,ebx - mov ebx, [eax+4] - sub ebx,11 - add [esp+20],ebx - -L_buf_not_used: - mov [eax+0],esi - - mov ebx,1 - shl ebx,cl - dec ebx - - - - - - cmp dword ptr [inflate_fast_use_mmx],2 - jne L_update_hold - - - - psrlq mm0,mm1 - movd ebp,mm0 - - emms - -L_update_hold: - - - - and ebp,ebx - mov [edx+hold_state],ebp - - - - - mov ebx, [esp+20] - cmp ebx,esi - jbe L_last_is_smaller - - sub ebx,esi - add ebx,11 - mov [eax+4],ebx - jmp L_fixup_out -L_last_is_smaller: - sub esi,ebx - neg esi - add esi,11 - mov [eax+4],esi - - - - -L_fixup_out: - - mov ebx, [esp+16] - cmp ebx,edi - jbe L_end_is_smaller - - sub ebx,edi - add ebx,257 - mov [eax+16],ebx - jmp L_done -L_end_is_smaller: - sub edi,ebx - neg edi - add edi,257 - mov [eax+16],edi - - - - - -L_done: - add esp,64 - popfd - pop ebx - pop ebp - pop esi - pop edi - ret - -_TEXT ends -end +;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding +; * +; * inffas32.asm is derivated from inffas86.c, with translation of assembly code +; * +; * Copyright (C) 1995-2003 Mark Adler +; * For conditions of distribution and use, see copyright notice in zlib.h +; * +; * Copyright (C) 2003 Chris Anderson +; * Please use the copyright conditions above. +; * +; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from +; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at +; * the moment. I have successfully compiled and tested this code with gcc2.96, +; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S +; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX +; * enabled. I will attempt to merge the MMX code into this version. Newer +; * versions of this and inffast.S can be found at +; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ +; * +; * 2005 : modification by Gilles Vollant +; */ +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is in directory \MASM611C of Win95 DDK +; ml.exe is also distributed in http://www.masm32.com/masmdl.htm +; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ +; +; +; compile with command line option +; ml /coff /Zi /c /Flinffas32.lst inffas32.asm + +; if you define NO_GZIP (see inflate.h), compile with +; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm + + +; zlib122sup is 0 fort zlib 1.2.2.1 and lower +; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head +; in inflate_state in inflate.h) +zlib1222sup equ 8 + + +IFDEF GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 +ELSE + IFNDEF NO_GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 + ELSE + INFLATE_MODE_TYPE equ 3 + INFLATE_MODE_BAD equ 17 + ENDIF +ENDIF + + +; 75 "inffast.S" +;FILE "inffast.S" + +;;;GLOBAL _inflate_fast + +;;;SECTION .text + + + + .586p + .mmx + + name inflate_fast_x86 + .MODEL FLAT + +_DATA segment +inflate_fast_use_mmx: + dd 1 + + +_TEXT segment +PUBLIC _inflate_fast + +ALIGN 4 +_inflate_fast: + jmp inflate_fast_entry + + + +ALIGN 4 + db 'Fast decoding Code from Chris Anderson' + db 0 + +ALIGN 4 +invalid_literal_length_code_msg: + db 'invalid literal/length code' + db 0 + +ALIGN 4 +invalid_distance_code_msg: + db 'invalid distance code' + db 0 + +ALIGN 4 +invalid_distance_too_far_msg: + db 'invalid distance too far back' + db 0 + + +ALIGN 4 +inflate_fast_mask: +dd 0 +dd 1 +dd 3 +dd 7 +dd 15 +dd 31 +dd 63 +dd 127 +dd 255 +dd 511 +dd 1023 +dd 2047 +dd 4095 +dd 8191 +dd 16383 +dd 32767 +dd 65535 +dd 131071 +dd 262143 +dd 524287 +dd 1048575 +dd 2097151 +dd 4194303 +dd 8388607 +dd 16777215 +dd 33554431 +dd 67108863 +dd 134217727 +dd 268435455 +dd 536870911 +dd 1073741823 +dd 2147483647 +dd 4294967295 + + +mode_state equ 0 ;/* state->mode */ +wsize_state equ (32+zlib1222sup) ;/* state->wsize */ +write_state equ (36+4+zlib1222sup) ;/* state->write */ +window_state equ (40+4+zlib1222sup) ;/* state->window */ +hold_state equ (44+4+zlib1222sup) ;/* state->hold */ +bits_state equ (48+4+zlib1222sup) ;/* state->bits */ +lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ +distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ +lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ +distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ + + +;;SECTION .text +; 205 "inffast.S" +;GLOBAL inflate_fast_use_mmx + +;SECTION .data + + +; GLOBAL inflate_fast_use_mmx:object +;.size inflate_fast_use_mmx, 4 +; 226 "inffast.S" +;SECTION .text + +ALIGN 4 +inflate_fast_entry: + push edi + push esi + push ebp + push ebx + pushfd + sub esp,64 + cld + + + + + mov esi, [esp+88] + mov edi, [esi+28] + + + + + + + + mov edx, [esi+4] + mov eax, [esi+0] + + add edx,eax + sub edx,11 + + mov [esp+44],eax + mov [esp+20],edx + + mov ebp, [esp+92] + mov ecx, [esi+16] + mov ebx, [esi+12] + + sub ebp,ecx + neg ebp + add ebp,ebx + + sub ecx,257 + add ecx,ebx + + mov [esp+60],ebx + mov [esp+40],ebp + mov [esp+16],ecx +; 285 "inffast.S" + mov eax, [edi+lencode_state] + mov ecx, [edi+distcode_state] + + mov [esp+8],eax + mov [esp+12],ecx + + mov eax,1 + mov ecx, [edi+lenbits_state] + shl eax,cl + dec eax + mov [esp+0],eax + + mov eax,1 + mov ecx, [edi+distbits_state] + shl eax,cl + dec eax + mov [esp+4],eax + + mov eax, [edi+wsize_state] + mov ecx, [edi+write_state] + mov edx, [edi+window_state] + + mov [esp+52],eax + mov [esp+48],ecx + mov [esp+56],edx + + mov ebp, [edi+hold_state] + mov ebx, [edi+bits_state] +; 321 "inffast.S" + mov esi, [esp+44] + mov ecx, [esp+20] + cmp ecx,esi + ja L_align_long + + add ecx,11 + sub ecx,esi + mov eax,12 + sub eax,ecx + lea edi, [esp+28] + rep movsb + mov ecx,eax + xor eax,eax + rep stosb + lea esi, [esp+28] + mov [esp+20],esi + jmp L_is_aligned + + +L_align_long: + test esi,3 + jz L_is_aligned + xor eax,eax + mov al, [esi] + inc esi + mov ecx,ebx + add ebx,8 + shl eax,cl + or ebp,eax + jmp L_align_long + +L_is_aligned: + mov edi, [esp+60] +; 366 "inffast.S" +L_check_mmx: + cmp dword ptr [inflate_fast_use_mmx],2 + je L_init_mmx + ja L_do_loop + + push eax + push ebx + push ecx + push edx + pushfd + mov eax, [esp] + xor dword ptr [esp],0200000h + + + + + popfd + pushfd + pop edx + xor edx,eax + jz L_dont_use_mmx + xor eax,eax + cpuid + cmp ebx,0756e6547h + jne L_dont_use_mmx + cmp ecx,06c65746eh + jne L_dont_use_mmx + cmp edx,049656e69h + jne L_dont_use_mmx + mov eax,1 + cpuid + shr eax,8 + and eax,15 + cmp eax,6 + jne L_dont_use_mmx + test edx,0800000h + jnz L_use_mmx + jmp L_dont_use_mmx +L_use_mmx: + mov dword ptr [inflate_fast_use_mmx],2 + jmp L_check_mmx_pop +L_dont_use_mmx: + mov dword ptr [inflate_fast_use_mmx],3 +L_check_mmx_pop: + pop edx + pop ecx + pop ebx + pop eax + jmp L_check_mmx +; 426 "inffast.S" +ALIGN 4 +L_do_loop: +; 437 "inffast.S" + cmp bl,15 + ja L_get_length_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_length_code: + mov edx, [esp+0] + mov ecx, [esp+8] + and edx,ebp + mov eax, [ecx+edx*4] + +L_dolen: + + + + + + + mov cl,ah + sub bl,ah + shr ebp,cl + + + + + + + test al,al + jnz L_test_for_length_base + + shr eax,16 + stosb + +L_while_test: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop + jmp L_break_loop + +L_test_for_length_base: +; 502 "inffast.S" + mov edx,eax + shr edx,16 + mov cl,al + + test al,16 + jz L_test_for_second_level_length + and cl,15 + jz L_save_len + cmp bl,cl + jae L_add_bits_to_len + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_len: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + +L_save_len: + mov [esp+24],edx + + +L_decode_distance: +; 549 "inffast.S" + cmp bl,15 + ja L_get_distance_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_distance_code: + mov edx, [esp+4] + mov ecx, [esp+12] + and edx,ebp + mov eax, [ecx+edx*4] + + +L_dodist: + mov edx,eax + shr edx,16 + mov cl,ah + sub bl,ah + shr ebp,cl +; 584 "inffast.S" + mov cl,al + + test al,16 + jz L_test_for_second_level_dist + and cl,15 + jz L_check_dist_one + cmp bl,cl + jae L_add_bits_to_dist + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_dist: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + jmp L_check_window + +L_check_window: +; 625 "inffast.S" + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,edx + jb L_clip_window + + mov ecx, [esp+24] + mov esi,edi + sub esi,edx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp edx,1 + jne L_check_window + cmp [esp+40],edi + je L_check_window + + dec edi + mov ecx, [esp+24] + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + + + + + test al,64 + jnz L_test_for_end_of_block + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+8] + mov eax, [edx+eax*4] + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + + + + + test al,64 + jnz L_invalid_distance_code + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+12] + mov eax, [edx+eax*4] + jmp L_dodist + +ALIGN 4 +L_clip_window: +; 721 "inffast.S" + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,edx + jb L_invalid_distance_too_far + + add ecx,edx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window + + sub eax,ecx + add esi,eax +; 749 "inffast.S" + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_wrap_around_window: +; 793 "inffast.S" + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_contiguous_in_window: +; 836 "inffast.S" + add esi,eax + sub esi,ecx + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + +L_do_copy1: +; 862 "inffast.S" + mov ecx,eax + rep movsb + + mov esi, [esp+44] + jmp L_while_test +; 878 "inffast.S" +ALIGN 4 +L_init_mmx: + emms + + + + + + movd mm0,ebp + mov ebp,ebx +; 896 "inffast.S" + movd mm4,dword ptr [esp+0] + movq mm3,mm4 + movd mm5,dword ptr [esp+4] + movq mm2,mm5 + pxor mm1,mm1 + mov ebx, [esp+8] + jmp L_do_loop_mmx + +ALIGN 4 +L_do_loop_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_length_code_mmx + + movd mm6,ebp + movd mm7,dword ptr [esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_length_code_mmx: + pand mm4,mm0 + movd eax,mm4 + movq mm4,mm3 + mov eax, [ebx+eax*4] + +L_dolen_mmx: + movzx ecx,ah + movd mm1,ecx + sub ebp,ecx + + test al,al + jnz L_test_for_length_base_mmx + + shr eax,16 + stosb + +L_while_test_mmx: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop_mmx + jmp L_break_loop + +L_test_for_length_base_mmx: + + mov edx,eax + shr edx,16 + + test al,16 + jz L_test_for_second_level_length_mmx + and eax,15 + jz L_decode_distance_mmx + + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add edx,ecx + +L_decode_distance_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_dist_code_mmx + + movd mm6,ebp + movd mm7,dword ptr [esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_dist_code_mmx: + mov ebx, [esp+12] + pand mm5,mm0 + movd eax,mm5 + movq mm5,mm2 + mov eax, [ebx+eax*4] + +L_dodist_mmx: + + movzx ecx,ah + mov ebx,eax + shr ebx,16 + sub ebp,ecx + movd mm1,ecx + + test al,16 + jz L_test_for_second_level_dist_mmx + and eax,15 + jz L_check_dist_one_mmx + +L_add_bits_to_dist_mmx: + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add ebx,ecx + +L_check_window_mmx: + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,ebx + jb L_clip_window_mmx + + mov ecx,edx + mov esi,edi + sub esi,ebx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_check_dist_one_mmx: + cmp ebx,1 + jne L_check_window_mmx + cmp [esp+40],edi + je L_check_window_mmx + + dec edi + mov ecx,edx + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_test_for_second_level_length_mmx: + test al,64 + jnz L_test_for_end_of_block + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + add ecx,edx + mov eax, [ebx+ecx*4] + jmp L_dolen_mmx + +ALIGN 4 +L_test_for_second_level_dist_mmx: + test al,64 + jnz L_invalid_distance_code + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + mov eax, [esp+12] + add ecx,ebx + mov eax, [eax+ecx*4] + jmp L_dodist_mmx + +ALIGN 4 +L_clip_window_mmx: + + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,ebx + jb L_invalid_distance_too_far + + add ecx,ebx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window_mmx + + sub eax,ecx + add esi,eax + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_wrap_around_window_mmx: + + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window_mmx + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_contiguous_in_window_mmx: + + add esi,eax + sub esi,ecx + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + +L_do_copy1_mmx: + + + mov ecx,edx + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx +; 1174 "inffast.S" +L_invalid_distance_code: + + + + + + mov ecx, invalid_distance_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_test_for_end_of_block: + + + + + + test al,32 + jz L_invalid_literal_length_code + + mov ecx,0 + mov edx,INFLATE_MODE_TYPE + jmp L_update_stream_state + +L_invalid_literal_length_code: + + + + + + mov ecx, invalid_literal_length_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_invalid_distance_too_far: + + + + mov esi, [esp+44] + mov ecx, invalid_distance_too_far_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_update_stream_state: + + mov eax, [esp+88] + test ecx,ecx + jz L_skip_msg + mov [eax+24],ecx +L_skip_msg: + mov eax, [eax+28] + mov [eax+mode_state],edx + jmp L_break_loop + +ALIGN 4 +L_break_loop: +; 1243 "inffast.S" + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_next_in + + + + mov ebx,ebp + +L_update_next_in: +; 1266 "inffast.S" + mov eax, [esp+88] + mov ecx,ebx + mov edx, [eax+28] + shr ecx,3 + sub esi,ecx + shl ecx,3 + sub ebx,ecx + mov [eax+12],edi + mov [edx+bits_state],ebx + mov ecx,ebx + + lea ebx, [esp+28] + cmp [esp+20],ebx + jne L_buf_not_used + + sub esi,ebx + mov ebx, [eax+0] + mov [esp+20],ebx + add esi,ebx + mov ebx, [eax+4] + sub ebx,11 + add [esp+20],ebx + +L_buf_not_used: + mov [eax+0],esi + + mov ebx,1 + shl ebx,cl + dec ebx + + + + + + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_hold + + + + psrlq mm0,mm1 + movd ebp,mm0 + + emms + +L_update_hold: + + + + and ebp,ebx + mov [edx+hold_state],ebp + + + + + mov ebx, [esp+20] + cmp ebx,esi + jbe L_last_is_smaller + + sub ebx,esi + add ebx,11 + mov [eax+4],ebx + jmp L_fixup_out +L_last_is_smaller: + sub esi,ebx + neg esi + add esi,11 + mov [eax+4],esi + + + + +L_fixup_out: + + mov ebx, [esp+16] + cmp ebx,edi + jbe L_end_is_smaller + + sub ebx,edi + add ebx,257 + mov [eax+16],ebx + jmp L_done +L_end_is_smaller: + sub edi,ebx + neg edi + add edi,257 + mov [eax+16],edi + + + + + +L_done: + add esp,64 + popfd + pop ebx + pop ebp + pop esi + pop edi + ret + +_TEXT ends +end diff --git a/compat/zlib/contrib/masmx86/match686.asm b/compat/zlib/contrib/masmx86/match686.asm new file mode 100644 index 0000000..21ae704 --- /dev/null +++ b/compat/zlib/contrib/masmx86/match686.asm @@ -0,0 +1,478 @@ +; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86 +; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; File written by Gilles Vollant, by converting match686.S from Brian Raiter +; for MASM. This is as assembly version of longest_match +; from Jean-loup Gailly in deflate.c +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is distributed in +; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 +; +; this file contain two implementation of longest_match +; +; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro +; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom) +; +; for using an assembly version of longest_match, you need define ASMV in project +; +; compile the asm file running +; ml /coff /Zi /c /Flmatch686.lst match686.asm +; and do not include match686.obj in your project +; +; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for +; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor +; with autoselect (with cpu detection code) +; if you want support the old pentium optimization, you can still use these version +; +; this file is not optimized for old pentium, but it compatible with all x86 32 bits +; processor (starting 80386) +; +; +; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2 + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ + + NbStack equ 76 + cur_match equ dword ptr[esp+NbStack-0] + str_s equ dword ptr[esp+NbStack-4] +; 5 dword on top (ret,ebp,esi,edi,ebx) + adrret equ dword ptr[esp+NbStack-8] + pushebp equ dword ptr[esp+NbStack-12] + pushedi equ dword ptr[esp+NbStack-16] + pushesi equ dword ptr[esp+NbStack-20] + pushebx equ dword ptr[esp+NbStack-24] + + chain_length equ dword ptr [esp+NbStack-28] + limit equ dword ptr [esp+NbStack-32] + best_len equ dword ptr [esp+NbStack-36] + window equ dword ptr [esp+NbStack-40] + prev equ dword ptr [esp+NbStack-44] + scan_start equ word ptr [esp+NbStack-48] + wmask equ dword ptr [esp+NbStack-52] + match_start_ptr equ dword ptr [esp+NbStack-56] + nice_match equ dword ptr [esp+NbStack-60] + scan equ dword ptr [esp+NbStack-64] + + windowlen equ dword ptr [esp+NbStack-68] + match_start equ dword ptr [esp+NbStack-72] + strend equ dword ptr [esp+NbStack-76] + NbStackAdd equ (NbStack-24) + + .386p + + name gvmatch + .MODEL FLAT + + + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + zlib1222add equ 8 + +; Note : these value are good with a 8 bytes boundary pack structure + dep_chain_length equ 74h+zlib1222add + dep_window equ 30h+zlib1222add + dep_strstart equ 64h+zlib1222add + dep_prev_length equ 70h+zlib1222add + dep_nice_match equ 88h+zlib1222add + dep_w_size equ 24h+zlib1222add + dep_prev equ 38h+zlib1222add + dep_w_mask equ 2ch+zlib1222add + dep_good_match equ 84h+zlib1222add + dep_match_start equ 68h+zlib1222add + dep_lookahead equ 6ch+zlib1222add + + +_TEXT segment + +IFDEF NOUNDERLINE + public longest_match + public match_init +ELSE + public _longest_match + public _match_init +ENDIF + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + + +MAX_MATCH equ 258 +MIN_MATCH equ 3 +MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1) +MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h) + + +;;; stack frame offsets + +chainlenwmask equ esp + 0 ; high word: current chain len + ; low word: s->wmask +window equ esp + 4 ; local copy of s->window +windowbestlen equ esp + 8 ; s->window + bestlen +scanstart equ esp + 16 ; first two bytes of string +scanend equ esp + 12 ; last two bytes of string +scanalign equ esp + 20 ; dword-misalignment of string +nicematch equ esp + 24 ; a good enough match size +bestlen equ esp + 28 ; size of best match so far +scan equ esp + 32 ; ptr to string wanting match + +LocalVarsSize equ 36 +; saved ebx byte esp + 36 +; saved edi byte esp + 40 +; saved esi byte esp + 44 +; saved ebp byte esp + 48 +; return address byte esp + 52 +deflatestate equ esp + 56 ; the function arguments +curmatch equ esp + 60 + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +dsWSize equ 36+zlib1222add +dsWMask equ 44+zlib1222add +dsWindow equ 48+zlib1222add +dsPrev equ 56+zlib1222add +dsMatchLen equ 88+zlib1222add +dsPrevMatch equ 92+zlib1222add +dsStrStart equ 100+zlib1222add +dsMatchStart equ 104+zlib1222add +dsLookahead equ 108+zlib1222add +dsPrevLen equ 112+zlib1222add +dsMaxChainLen equ 116+zlib1222add +dsGoodMatch equ 132+zlib1222add +dsNiceMatch equ 136+zlib1222add + + +;;; match686.asm -- Pentium-Pro-optimized version of longest_match() +;;; Written for zlib 1.1.2 +;;; Copyright (C) 1998 Brian Raiter +;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html +;;; +;; +;; This software is provided 'as-is', without any express or implied +;; warranty. In no event will the authors be held liable for any damages +;; arising from the use of this software. +;; +;; Permission is granted to anyone to use this software for any purpose, +;; including commercial applications, and to alter it and redistribute it +;; freely, subject to the following restrictions: +;; +;; 1. The origin of this software must not be misrepresented; you must not +;; claim that you wrote the original software. If you use this software +;; in a product, an acknowledgment in the product documentation would be +;; appreciated but is not required. +;; 2. Altered source versions must be plainly marked as such, and must not be +;; misrepresented as being the original software +;; 3. This notice may not be removed or altered from any source distribution. +;; + +;GLOBAL _longest_match, _match_init + + +;SECTION .text + +;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch) + +;_longest_match: + IFDEF NOUNDERLINE + longest_match proc near + ELSE + _longest_match proc near + ENDIF + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + push ebp + push edi + push esi + push ebx + sub esp, LocalVarsSize + +;;; Retrieve the function arguments. ecx will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + + mov edx, [deflatestate] + mov ecx, [curmatch] + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov eax, [edx + dsPrevLen] + mov ebx, [edx + dsGoodMatch] + cmp eax, ebx + mov eax, [edx + dsWMask] + mov ebx, [edx + dsMaxChainLen] + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + mov [chainlenwmask], ebx + +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + mov eax, [edx + dsNiceMatch] + mov ebx, [edx + dsLookahead] + cmp ebx, eax + jl LookaheadLess + mov ebx, eax +LookaheadLess: mov [nicematch], ebx + +;;; register Bytef *scan = s->window + s->strstart; + + mov esi, [edx + dsWindow] + mov [window], esi + mov ebp, [edx + dsStrStart] + lea edi, [esi + ebp] + mov [scan], edi + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov eax, edi + neg eax + and eax, 3 + mov [scanalign], eax + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; + + mov eax, [edx + dsWSize] + sub eax, MIN_LOOKAHEAD + sub ebp, eax + jg LimitPositive + xor ebp, ebp +LimitPositive: + +;;; int best_len = s->prev_length; + + mov eax, [edx + dsPrevLen] + mov [bestlen], eax + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + add esi, eax + mov [windowbestlen], esi + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx ebx, word ptr [edi] + mov [scanstart], ebx + movzx ebx, word ptr [edi + eax - 1] + mov [scanend], ebx + mov edi, [edx + dsPrev] + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + jmp short LoopEntry + +align 4 + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; ecx = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and ecx, edx + movzx ecx, word ptr [edi + ecx*2] + cmp ecx, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow +LoopEntry: movzx eax, word ptr [esi + ecx - 1] + cmp eax, ebx + jnz LookupLoop + mov eax, [window] + movzx eax, word ptr [eax + ecx] + cmp eax, [scanstart] + jnz LookupLoop + +;;; Store the current value of chainlen. + + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + mov esi, [window] + mov edi, [scan] + add esi, ecx + mov eax, [scanalign] + mov edx, 0fffffef8h; -(MAX_MATCH_8) + lea edi, [edi + eax + 0108h] ;MAX_MATCH_8] + lea esi, [esi + eax + 0108h] ;MAX_MATCH_8] + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust edx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (esi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + +LoopCmps: + mov eax, [esi + edx] + xor eax, [edi + edx] + jnz LeaveLoopCmps + mov eax, [esi + edx + 4] + xor eax, [edi + edx + 4] + jnz LeaveLoopCmps4 + add edx, 8 + jnz LoopCmps + jmp short LenMaximum +LeaveLoopCmps4: add edx, 4 +LeaveLoopCmps: test eax, 0000FFFFh + jnz LenLower + add edx, 2 + shr eax, 16 +LenLower: sub al, 1 + adc edx, 0 + +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea eax, [edi + edx] + mov edi, [scan] + sub eax, edi + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. + + mov edx, [deflatestate] + mov ebx, [bestlen] + cmp eax, ebx + jg LongerMatch + mov esi, [windowbestlen] + mov edi, [edx + dsPrev] + mov ebx, [scanend] + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: mov ebx, [nicematch] + mov [bestlen], eax + mov [edx + dsMatchStart], ecx + cmp eax, ebx + jge LeaveNow + mov esi, [window] + add esi, eax + mov [windowbestlen], esi + movzx ebx, word ptr [edi + eax - 1] + mov edi, [edx + dsPrev] + mov [scanend], ebx + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: mov edx, [deflatestate] + mov dword ptr [bestlen], MAX_MATCH + mov [edx + dsMatchStart], ecx + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: + mov edx, [deflatestate] + mov ebx, [bestlen] + mov eax, [edx + dsLookahead] + cmp ebx, eax + jg LookaheadRet + mov eax, ebx +LookaheadRet: + +;;; Restore the stack and return from whence we came. + + add esp, LocalVarsSize + pop ebx + pop esi + pop edi + pop ebp + + ret +; please don't remove this string ! +; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah + + + IFDEF NOUNDERLINE + longest_match endp + ELSE + _longest_match endp + ENDIF + + IFDEF NOUNDERLINE + match_init proc near + ret + match_init endp + ELSE + _match_init proc near + ret + _match_init endp + ENDIF + + +_TEXT ends +end diff --git a/compat/zlib/contrib/masmx86/readme.txt b/compat/zlib/contrib/masmx86/readme.txt index 7b57167..3f88886 100644 --- a/compat/zlib/contrib/masmx86/readme.txt +++ b/compat/zlib/contrib/masmx86/readme.txt @@ -7,15 +7,21 @@ longest_match() and inflate_fast(). Use instructions ---------------- -Copy these files into the zlib source directory, then run the -appropriate makefile, as suggested below. +Assemble using MASM, and copy the object files into the zlib source +directory, then run the appropriate makefile, as suggested below. You can +donwload MASM from here: + http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 + +You can also get objects files here: + + http://www.winimage.com/zLibDll/zlib124_masm_obj.zip Build instructions ------------------ * With Microsoft C and MASM: -nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" +nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" * With Borland C and TASM: -make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" OBJPA="+gvmat32c.obj+gvmat32.obj+inffas32.obj" +make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" diff --git a/compat/zlib/contrib/minizip/MiniZip64_Changes.txt b/compat/zlib/contrib/minizip/MiniZip64_Changes.txt new file mode 100644 index 0000000..13a1bd9 --- /dev/null +++ b/compat/zlib/contrib/minizip/MiniZip64_Changes.txt @@ -0,0 +1,6 @@ + +MiniZip 1.1 was derrived from MiniZip at version 1.01f + +Change in 1.0 (Okt 2009) + - **TODO - Add history** + diff --git a/compat/zlib/contrib/minizip/MiniZip64_info.txt b/compat/zlib/contrib/minizip/MiniZip64_info.txt new file mode 100644 index 0000000..57d7152 --- /dev/null +++ b/compat/zlib/contrib/minizip/MiniZip64_info.txt @@ -0,0 +1,74 @@ +MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson + +Introduction +--------------------- +MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html ) + +When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0. +All possible work was done for compatibility. + + +Background +--------------------- +When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64 +support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ ) + +That was used as a starting point. And after that ZIP64 support was added to zip.c +some refactoring and code cleanup was also done. + + +Changed from MiniZip 1.0 to MiniZip 1.1 +--------------------------------------- +* Added ZIP64 support for unzip ( by Even Rouault ) +* Added ZIP64 support for zip ( by Mathias Svensson ) +* Reverted some changed that Even Rouault did. +* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users. +* Added unzip patch for BZIP Compression method (patch create by Daniel Borca) +* Added BZIP Compress method for zip +* Did some refactoring and code cleanup + + +Credits + + Gilles Vollant - Original MiniZip author + Even Rouault - ZIP64 unzip Support + Daniel Borca - BZip Compression method support in unzip + Mathias Svensson - ZIP64 zip support + Mathias Svensson - BZip Compression method support in zip + + Resources + + ZipLayout http://result42.com/projects/ZipFileLayout + Command line tool for Windows that shows the layout and information of the headers in a zip archive. + Used when debugging and validating the creation of zip files using MiniZip64 + + + ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT + Zip File specification + + +Notes. + * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined. + +License +---------------------------------------------------------- + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +---------------------------------------------------------- + diff --git a/compat/zlib/contrib/minizip/crypt.h b/compat/zlib/contrib/minizip/crypt.h index 622f4bc..a01d08d 100644 --- a/compat/zlib/contrib/minizip/crypt.h +++ b/compat/zlib/contrib/minizip/crypt.h @@ -87,13 +87,12 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned lon # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ # endif -static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) - const char *passwd; /* password string */ - unsigned char *buf; /* where to write header */ - int bufSize; - unsigned long* pkeys; - const unsigned long* pcrc_32_tab; - unsigned long crcForCrypting; +static int crypthead(const char* passwd, /* password string */ + unsigned char* buf, /* where to write header */ + int bufSize, + unsigned long* pkeys, + const unsigned long* pcrc_32_tab, + unsigned long crcForCrypting) { int n; /* index in random header */ int t; /* temporary */ @@ -124,8 +123,8 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) { buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); } - buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); - buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); return n; } diff --git a/compat/zlib/contrib/minizip/ioapi.c b/compat/zlib/contrib/minizip/ioapi.c index f1bee23..49958f6 100644 --- a/compat/zlib/contrib/minizip/ioapi.c +++ b/compat/zlib/contrib/minizip/ioapi.c @@ -1,74 +1,104 @@ -/* ioapi.c -- IO base function header for compress/uncompress .zip - files using zlib + zip or unzip API +/* ioapi.h -- IO base function header for compress/uncompress .zip + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant -*/ - -#include -#include -#include - -#include "zlib.h" -#include "ioapi.h" + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + For more info read MiniZip_info.txt -/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ +*/ -#ifndef SEEK_CUR -#define SEEK_CUR 1 +#if (defined(_WIN32)) + #define _CRT_SECURE_NO_WARNINGS #endif -#ifndef SEEK_END -#define SEEK_END 2 -#endif +#include "ioapi.h" -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif +voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) +{ + if (pfilefunc->zfile_func64.zopen64_file != NULL) + return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode); + else + { + return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode); + } +} -voidpf ZCALLBACK fopen_file_func OF(( - voidpf opaque, - const char* filename, - int mode)); +long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); + else + { + uLong offsetTruncated = (uLong)offset; + if (offsetTruncated != offset) + return -1; + else + return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); + } +} -uLong ZCALLBACK fread_file_func OF(( - voidpf opaque, - voidpf stream, - void* buf, - uLong size)); +ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream); + else + { + uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream); + if ((tell_uLong) == ((uLong)-1)) + return (ZPOS64_T)-1; + else + return tell_uLong; + } +} -uLong ZCALLBACK fwrite_file_func OF(( - voidpf opaque, - voidpf stream, - const void* buf, - uLong size)); +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32) +{ + p_filefunc64_32->zfile_func64.zopen64_file = NULL; + p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; + p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; + p_filefunc64_32->zfile_func64.ztell64_file = NULL; + p_filefunc64_32->zfile_func64.zseek64_file = NULL; + p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque; + p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file; + p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file; +} -long ZCALLBACK ftell_file_func OF(( - voidpf opaque, - voidpf stream)); -long ZCALLBACK fseek_file_func OF(( - voidpf opaque, - voidpf stream, - uLong offset, - int origin)); -int ZCALLBACK fclose_file_func OF(( - voidpf opaque, - voidpf stream)); +static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode)); +static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); +static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream)); +static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream)); +static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream)); -int ZCALLBACK ferror_file_func OF(( - voidpf opaque, - voidpf stream)); +static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode) +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + if ((filename!=NULL) && (mode_fopen != NULL)) + file = fopen(filename, mode_fopen); + return file; +} -voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) - voidpf opaque; - const char* filename; - int mode; +static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode) { FILE* file = NULL; const char* mode_fopen = NULL; @@ -82,48 +112,41 @@ voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) mode_fopen = "wb"; if ((filename!=NULL) && (mode_fopen != NULL)) - file = fopen(filename, mode_fopen); + file = fopen64((const char*)filename, mode_fopen); return file; } -uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - void* buf; - uLong size; +static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) { uLong ret; ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); return ret; } - -uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - const void* buf; - uLong size; +static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) { uLong ret; ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); return ret; } -long ZCALLBACK ftell_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) { long ret; ret = ftell((FILE *)stream); return ret; } -long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) - voidpf opaque; - voidpf stream; - uLong offset; - int origin; + +static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) +{ + ZPOS64_T ret; + ret = ftello64((FILE *)stream); + return ret; +} + +static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin) { int fseek_origin=0; long ret; @@ -141,22 +164,45 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) default: return -1; } ret = 0; - fseek((FILE *)stream, offset, fseek_origin); + if (fseek((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; return ret; } -int ZCALLBACK fclose_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + + if(fseeko64((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; + + return ret; +} + + +static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) { int ret; ret = fclose((FILE *)stream); return ret; } -int ZCALLBACK ferror_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) { int ret; ret = ferror((FILE *)stream); @@ -175,3 +221,15 @@ void fill_fopen_filefunc (pzlib_filefunc_def) pzlib_filefunc_def->zerror_file = ferror_file_func; pzlib_filefunc_def->opaque = NULL; } + +void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = fopen64_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell64_file = ftell64_file_func; + pzlib_filefunc_def->zseek64_file = fseek64_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} diff --git a/compat/zlib/contrib/minizip/ioapi.h b/compat/zlib/contrib/minizip/ioapi.h index 7d457ba..8309c4c 100644 --- a/compat/zlib/contrib/minizip/ioapi.h +++ b/compat/zlib/contrib/minizip/ioapi.h @@ -1,13 +1,104 @@ /* ioapi.h -- IO base function header for compress/uncompress .zip - files using zlib + zip or unzip API + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Version 1.01e, February 12th, 2005 + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2005 Gilles Vollant + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + + Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) + Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. + More if/def section may be needed to support other platforms + Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. + (but you should use iowin32.c for windows instead) + +*/ + +#ifndef _ZLIBIOAPI64_H +#define _ZLIBIOAPI64_H + +#if (!defined(_WIN32)) && (!defined(WIN32)) + + // Linux needs this to support file operation on files larger then 4+GB + // But might need better if/def to select just the platforms that needs them. + + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif +#endif + +#include +#include +#include "zlib.h" + +#if defined(USE_FILE32API) +#define fopen64 fopen +#define ftello64 ftell +#define fseeko64 fseek +#else +#ifdef _MSC_VER + #define fopen64 fopen + #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) + #define ftello64 _ftelli64 + #define fseeko64 _fseeki64 + #else // old MSC + #define ftello64 ftell + #define fseeko64 fseek + #endif +#endif +#endif + +/* +#ifndef ZPOS64_T + #ifdef _WIN32 + #define ZPOS64_T fpos_t + #else + #include + #define ZPOS64_T uint64_t + #endif +#endif */ -#ifndef _ZLIBIOAPI_H -#define _ZLIBIOAPI_H +#ifdef HAVE_MINIZIP64_CONF_H +#include "mz64conf.h" +#endif + +/* a type choosen by DEFINE */ +#ifdef HAVE_64BIT_INT_CUSTOM +typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; +#else +#ifdef HAS_STDINT_H +#include "stdint.h" +typedef uint64_t ZPOS64_T; +#else + + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef unsigned __int64 ZPOS64_T; +#else +typedef unsigned long long int ZPOS64_T; +#endif +#endif +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif #define ZLIB_FILEFUNC_SEEK_CUR (1) @@ -23,26 +114,27 @@ #ifndef ZCALLBACK - -#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) -#define ZCALLBACK CALLBACK -#else -#define ZCALLBACK -#endif + #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) + #define ZCALLBACK CALLBACK + #else + #define ZCALLBACK + #endif #endif -#ifdef __cplusplus -extern "C" { -#endif -typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); -typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); -typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); -typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); -typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); -typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); + +typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); +typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); +typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); + +typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); + + +/* here is the "old" 32 bits structure structure */ typedef struct zlib_filefunc_def_s { open_file_func zopen_file; @@ -55,21 +147,54 @@ typedef struct zlib_filefunc_def_s voidpf opaque; } zlib_filefunc_def; +typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); +typedef struct zlib_filefunc64_def_s +{ + open64_file_func zopen64_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell64_file_func ztell64_file; + seek64_file_func zseek64_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc64_def; +void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); -#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) -#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) -#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) -#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) -#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) -#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) +/* now internal definition, only for zip.c and unzip.h */ +typedef struct zlib_filefunc64_32_def_s +{ + zlib_filefunc64_def zfile_func64; + open_file_func zopen32_file; + tell_file_func ztell32_file; + seek_file_func zseek32_file; +} zlib_filefunc64_32_def; + + +#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) +//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) +#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) +#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) +voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); +long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); +ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); + +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); + +#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) +#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) +#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) #ifdef __cplusplus } #endif #endif - diff --git a/compat/zlib/contrib/minizip/iowin32.c b/compat/zlib/contrib/minizip/iowin32.c index a9b5f78..6a2a883 100644 --- a/compat/zlib/contrib/minizip/iowin32.c +++ b/compat/zlib/contrib/minizip/iowin32.c @@ -1,10 +1,14 @@ /* iowin32.c -- IO base function header for compress/uncompress .zip - files using zlib + zip or unzip API - This IO API version uses the Win32 API (for Microsoft Windows) + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Version 1.01e, February 12th, 2005 + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt - Copyright (C) 1998-2005 Gilles Vollant */ #include @@ -21,40 +25,13 @@ #define INVALID_SET_FILE_POINTER ((DWORD)-1) #endif -voidpf ZCALLBACK win32_open_file_func OF(( - voidpf opaque, - const char* filename, - int mode)); - -uLong ZCALLBACK win32_read_file_func OF(( - voidpf opaque, - voidpf stream, - void* buf, - uLong size)); - -uLong ZCALLBACK win32_write_file_func OF(( - voidpf opaque, - voidpf stream, - const void* buf, - uLong size)); - -long ZCALLBACK win32_tell_file_func OF(( - voidpf opaque, - voidpf stream)); - -long ZCALLBACK win32_seek_file_func OF(( - voidpf opaque, - voidpf stream, - uLong offset, - int origin)); - -int ZCALLBACK win32_close_file_func OF(( - voidpf opaque, - voidpf stream)); - -int ZCALLBACK win32_error_file_func OF(( - voidpf opaque, - voidpf stream)); +voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode)); +uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +uLong ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +ZPOS64_T ZCALLBACK win32_tell64_file_func OF((voidpf opaque, voidpf stream)); +long ZCALLBACK win32_seek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +int ZCALLBACK win32_close_file_func OF((voidpf opaque, voidpf stream)); +int ZCALLBACK win32_error_file_func OF((voidpf opaque, voidpf stream)); typedef struct { @@ -62,69 +39,121 @@ typedef struct int error; } WIN32FILE_IOWIN; -voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode) - voidpf opaque; - const char* filename; - int mode; -{ - const char* mode_fopen = NULL; - DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; - HANDLE hFile = 0; - voidpf ret=NULL; - dwDesiredAccess = dwShareMode = dwFlagsAndAttributes = 0; +static void win32_translate_open_mode(int mode, + DWORD* lpdwDesiredAccess, + DWORD* lpdwCreationDisposition, + DWORD* lpdwShareMode, + DWORD* lpdwFlagsAndAttributes) +{ + *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0; if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) { - dwDesiredAccess = GENERIC_READ; - dwCreationDisposition = OPEN_EXISTING; - dwShareMode = FILE_SHARE_READ; + *lpdwDesiredAccess = GENERIC_READ; + *lpdwCreationDisposition = OPEN_EXISTING; + *lpdwShareMode = FILE_SHARE_READ; } - else - if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) { - dwDesiredAccess = GENERIC_WRITE | GENERIC_READ; - dwCreationDisposition = OPEN_EXISTING; + *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ; + *lpdwCreationDisposition = OPEN_EXISTING; } - else - if (mode & ZLIB_FILEFUNC_MODE_CREATE) + else if (mode & ZLIB_FILEFUNC_MODE_CREATE) { - dwDesiredAccess = GENERIC_WRITE | GENERIC_READ; - dwCreationDisposition = CREATE_ALWAYS; + *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ; + *lpdwCreationDisposition = CREATE_ALWAYS; } +} - if ((filename!=NULL) && (dwDesiredAccess != 0)) - hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, - dwCreationDisposition, dwFlagsAndAttributes, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - hFile = NULL; +static voidpf win32_build_iowin(HANDLE hFile) +{ + voidpf ret=NULL; - if (hFile != NULL) + if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE)) { WIN32FILE_IOWIN w32fiow; w32fiow.hf = hFile; w32fiow.error = 0; ret = malloc(sizeof(WIN32FILE_IOWIN)); + if (ret==NULL) CloseHandle(hFile); - else *((WIN32FILE_IOWIN*)ret) = w32fiow; + else + *((WIN32FILE_IOWIN*)ret) = w32fiow; } return ret; } +voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); + + return win32_build_iowin(hFile); +} + -uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - void* buf; - uLong size; +voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); + + return win32_build_iowin(hFile); +} + + +voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); + + return win32_build_iowin(hFile); +} + + +voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode) +{ + const char* mode_fopen = NULL; + DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; + HANDLE hFile = NULL; + + win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes); + + if ((filename!=NULL) && (dwDesiredAccess != 0)) + hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL); + + return win32_build_iowin(hFile); +} + + +uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size) { uLong ret=0; HANDLE hFile = NULL; if (stream!=NULL) hFile = ((WIN32FILE_IOWIN*)stream) -> hf; + if (hFile != NULL) + { if (!ReadFile(hFile, buf, size, &ret, NULL)) { DWORD dwErr = GetLastError(); @@ -132,23 +161,21 @@ uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size) dwErr = 0; ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; } + } return ret; } -uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - const void* buf; - uLong size; +uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size) { uLong ret=0; HANDLE hFile = NULL; if (stream!=NULL) hFile = ((WIN32FILE_IOWIN*)stream) -> hf; - if (hFile !=NULL) + if (hFile != NULL) + { if (!WriteFile(hFile, buf, size, &ret, NULL)) { DWORD dwErr = GetLastError(); @@ -156,13 +183,12 @@ uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size) dwErr = 0; ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; } + } return ret; } -long ZCALLBACK win32_tell_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream) { long ret=-1; HANDLE hFile = NULL; @@ -183,11 +209,32 @@ long ZCALLBACK win32_tell_file_func (opaque, stream) return ret; } -long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin) - voidpf opaque; - voidpf stream; - uLong offset; - int origin; +ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream) +{ + ZPOS64_T ret= (ZPOS64_T)-1; + HANDLE hFile = NULL; + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream)->hf; + + if (hFile) + { + LARGE_INTEGER li; + li.QuadPart = 0; + li.u.LowPart = SetFilePointer(hFile, li.u.LowPart, &li.u.HighPart, FILE_CURRENT); + if ( (li.LowPart == 0xFFFFFFFF) && (GetLastError() != NO_ERROR)) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = (ZPOS64_T)-1; + } + else + ret=li.QuadPart; + } + return ret; +} + + +long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin) { DWORD dwMoveMethod=0xFFFFFFFF; HANDLE hFile = NULL; @@ -224,9 +271,46 @@ long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin) return ret; } -int ZCALLBACK win32_close_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin) +{ + DWORD dwMoveMethod=0xFFFFFFFF; + HANDLE hFile = NULL; + long ret=-1; + + if (stream!=NULL) + hFile = ((WIN32FILE_IOWIN*)stream)->hf; + + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + dwMoveMethod = FILE_CURRENT; + break; + case ZLIB_FILEFUNC_SEEK_END : + dwMoveMethod = FILE_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + dwMoveMethod = FILE_BEGIN; + break; + default: return -1; + } + + if (hFile) + { + LARGE_INTEGER* li = (LARGE_INTEGER*)&offset; + DWORD dwSet = SetFilePointer(hFile, li->u.LowPart, &li->u.HighPart, dwMoveMethod); + if (dwSet == INVALID_SET_FILE_POINTER) + { + DWORD dwErr = GetLastError(); + ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr; + ret = -1; + } + else + ret=0; + } + return ret; +} + +int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream) { int ret=-1; @@ -244,9 +328,7 @@ int ZCALLBACK win32_close_file_func (opaque, stream) return ret; } -int ZCALLBACK win32_error_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream) { int ret=-1; if (stream!=NULL) @@ -256,8 +338,7 @@ int ZCALLBACK win32_error_file_func (opaque, stream) return ret; } -void fill_win32_filefunc (pzlib_filefunc_def) - zlib_filefunc_def* pzlib_filefunc_def; +void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen_file = win32_open_file_func; pzlib_filefunc_def->zread_file = win32_read_file_func; @@ -266,5 +347,43 @@ void fill_win32_filefunc (pzlib_filefunc_def) pzlib_filefunc_def->zseek_file = win32_seek_file_func; pzlib_filefunc_def->zclose_file = win32_close_file_func; pzlib_filefunc_def->zerror_file = win32_error_file_func; - pzlib_filefunc_def->opaque=NULL; + pzlib_filefunc_def->opaque = NULL; +} + +void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = win32_open64_file_func; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; + pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque = NULL; +} + + +void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; + pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque = NULL; +} + + +void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW; + pzlib_filefunc_def->zread_file = win32_read_file_func; + pzlib_filefunc_def->zwrite_file = win32_write_file_func; + pzlib_filefunc_def->ztell64_file = win32_tell64_file_func; + pzlib_filefunc_def->zseek64_file = win32_seek64_file_func; + pzlib_filefunc_def->zclose_file = win32_close_file_func; + pzlib_filefunc_def->zerror_file = win32_error_file_func; + pzlib_filefunc_def->opaque = NULL; } diff --git a/compat/zlib/contrib/minizip/iowin32.h b/compat/zlib/contrib/minizip/iowin32.h index a3a437a..0ca0969 100644 --- a/compat/zlib/contrib/minizip/iowin32.h +++ b/compat/zlib/contrib/minizip/iowin32.h @@ -1,10 +1,14 @@ /* iowin32.h -- IO base function header for compress/uncompress .zip - files using zlib + zip or unzip API - This IO API version uses the Win32 API (for Microsoft Windows) + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Version 1.01e, February 12th, 2005 + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt - Copyright (C) 1998-2005 Gilles Vollant */ #include @@ -15,6 +19,9 @@ extern "C" { #endif void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); +void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); #ifdef __cplusplus } diff --git a/compat/zlib/contrib/minizip/make_vms.com b/compat/zlib/contrib/minizip/make_vms.com new file mode 100644 index 0000000..9ac13a9 --- /dev/null +++ b/compat/zlib/contrib/minizip/make_vms.com @@ -0,0 +1,25 @@ +$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig +$ open/write zdef vmsdefs.h +$ copy sys$input: zdef +$ deck +#define unix +#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from +#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator +#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord +#define Write_EndOfCentralDirectoryRecord Write_EoDRecord +$ eod +$ close zdef +$ copy vmsdefs.h,ioapi.h_orig ioapi.h +$ cc/include=[--]/prefix=all ioapi.c +$ cc/include=[--]/prefix=all miniunz.c +$ cc/include=[--]/prefix=all unzip.c +$ cc/include=[--]/prefix=all minizip.c +$ cc/include=[--]/prefix=all zip.c +$ link miniunz,unzip,ioapi,[--]libz.olb/lib +$ link minizip,zip,ioapi,[--]libz.olb/lib +$ mcr []minizip test minizip_info.txt +$ mcr []miniunz -l test.zip +$ rename minizip_info.txt; minizip_info.txt_old +$ mcr []miniunz test.zip +$ delete test.zip;* +$exit diff --git a/compat/zlib/contrib/minizip/miniunz.c b/compat/zlib/contrib/minizip/miniunz.c index f599938..9ed009f 100644 --- a/compat/zlib/contrib/minizip/miniunz.c +++ b/compat/zlib/contrib/minizip/miniunz.c @@ -1,10 +1,31 @@ /* miniunz.c - Version 1.01e, February 12th, 2005 + Version 1.1, February 14h, 2010 + sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2005 Gilles Vollant + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) */ +#ifndef _WIN32 + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif +#endif #include #include @@ -27,7 +48,7 @@ #define WRITEBUFFERSIZE (8192) #define MAXFILENAME (256) -#ifdef WIN32 +#ifdef _WIN32 #define USEWIN32IOAPI #include "iowin32.h" #endif @@ -51,11 +72,11 @@ void change_file_date(filename,dosdate,tmu_date) uLong dosdate; tm_unz tmu_date; { -#ifdef WIN32 +#ifdef _WIN32 HANDLE hFile; FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite; - hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE, + hFile = CreateFileA(filename,GENERIC_READ | GENERIC_WRITE, 0,NULL,OPEN_EXISTING,0,NULL); GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite); DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal); @@ -91,8 +112,8 @@ int mymkdir(dirname) const char* dirname; { int ret=0; -#ifdef WIN32 - ret = mkdir(dirname); +#ifdef _WIN32 + ret = _mkdir(dirname); #else #ifdef unix ret = mkdir (dirname,0775); @@ -112,6 +133,11 @@ int makedir (newdir) return 0; buffer = (char*)malloc(len+1); + if (buffer==NULL) + { + printf("Error allocating memory\n"); + return UNZ_INTERNALERROR; + } strcpy(buffer,newdir); if (buffer[len-1] == '/') { @@ -164,34 +190,61 @@ void do_help() " -p extract crypted file using password\n\n"); } +void Display64BitsSize(ZPOS64_T n, int size_char) +{ + /* to avoid compatibility problem , we do here the conversion */ + char number[21]; + int offset=19; + int pos_string = 19; + number[20]=0; + for (;;) { + number[offset]=(char)((n%10)+'0'); + if (number[offset] != '0') + pos_string=offset; + n/=10; + if (offset==0) + break; + offset--; + } + { + int size_display_string = 19-pos_string; + while (size_char > size_display_string) + { + size_char--; + printf(" "); + } + } + + printf("%s",&number[pos_string]); +} int do_list(uf) unzFile uf; { uLong i; - unz_global_info gi; + unz_global_info64 gi; int err; - err = unzGetGlobalInfo (uf,&gi); + err = unzGetGlobalInfo64(uf,&gi); if (err!=UNZ_OK) printf("error %d with zipfile in unzGetGlobalInfo \n",err); - printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); - printf(" ------ ------ ---- ----- ---- ---- ------ ----\n"); + printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); + printf(" ------ ------ ---- ----- ---- ---- ------ ----\n"); for (i=0;i0) - ratio = (file_info.compressed_size*100)/file_info.uncompressed_size; + ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size); /* display a '*' if the file is crypted */ if ((file_info.flag & 1) != 0) @@ -211,12 +264,17 @@ int do_list(uf) string_method="Defl:F"; /* 2:fast , 3 : extra fast*/ } else + if (file_info.compression_method==Z_BZIP2ED) + { + string_method="BZip2 "; + } + else string_method="Unkn. "; - printf("%7lu %6s%c%7lu %3lu%% %2.2lu-%2.2lu-%2.2lu %2.2lu:%2.2lu %8.8lx %s\n", - file_info.uncompressed_size,string_method, - charCrypt, - file_info.compressed_size, + Display64BitsSize(file_info.uncompressed_size,7); + printf(" %6s%c",string_method,charCrypt); + Display64BitsSize(file_info.compressed_size,7); + printf(" %3lu%% %2.2lu-%2.2lu-%2.2lu %2.2lu:%2.2lu %8.8lx %s\n", ratio, (uLong)file_info.tmu_date.tm_mon + 1, (uLong)file_info.tmu_date.tm_mday, @@ -252,9 +310,9 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) void* buf; uInt size_buf; - unz_file_info file_info; + unz_file_info64 file_info; uLong ratio=0; - err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); + err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); if (err!=UNZ_OK) { @@ -306,7 +364,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) { char rep=0; FILE* ftestexist; - ftestexist = fopen(write_filename,"rb"); + ftestexist = fopen64(write_filename,"rb"); if (ftestexist!=NULL) { fclose(ftestexist); @@ -317,7 +375,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename); ret = scanf("%1s",answer); - if (ret != 1) + if (ret != 1) { exit(EXIT_FAILURE); } @@ -337,7 +395,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) if ((skip==0) && (err==UNZ_OK)) { - fout=fopen(write_filename,"wb"); + fout=fopen64(write_filename,"wb"); /* some zipfile don't contain directory alone before file */ if ((fout==NULL) && ((*popt_extract_without_path)==0) && @@ -347,7 +405,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password) *(filename_withoutpath-1)='\0'; makedir(write_filename); *(filename_withoutpath-1)=c; - fout=fopen(write_filename,"wb"); + fout=fopen64(write_filename,"wb"); } if (fout==NULL) @@ -409,11 +467,11 @@ int do_extract(uf,opt_extract_without_path,opt_overwrite,password) const char* password; { uLong i; - unz_global_info gi; + unz_global_info64 gi; int err; FILE* fout=NULL; - err = unzGetGlobalInfo (uf,&gi); + err = unzGetGlobalInfo64(uf,&gi); if (err!=UNZ_OK) printf("error %d with zipfile in unzGetGlobalInfo \n",err); @@ -470,6 +528,7 @@ int main(argc,argv) const char *password=NULL; char filename_try[MAXFILENAME+16] = ""; int i; + int ret_value=0; int opt_do_list=0; int opt_do_extract=1; int opt_do_extract_withoutpath=0; @@ -532,7 +591,7 @@ int main(argc,argv) { # ifdef USEWIN32IOAPI - zlib_filefunc_def ffunc; + zlib_filefunc64_def ffunc; # endif strncpy(filename_try, zipfilename,MAXFILENAME-1); @@ -540,18 +599,18 @@ int main(argc,argv) filename_try[ MAXFILENAME ] = '\0'; # ifdef USEWIN32IOAPI - fill_win32_filefunc(&ffunc); - uf = unzOpen2(zipfilename,&ffunc); + fill_win32_filefunc64A(&ffunc); + uf = unzOpen2_64(zipfilename,&ffunc); # else - uf = unzOpen(zipfilename); + uf = unzOpen64(zipfilename); # endif if (uf==NULL) { strcat(filename_try,".zip"); # ifdef USEWIN32IOAPI - uf = unzOpen2(filename_try,&ffunc); + uf = unzOpen2_64(filename_try,&ffunc); # else - uf = unzOpen(filename_try); + uf = unzOpen64(filename_try); # endif } } @@ -564,22 +623,26 @@ int main(argc,argv) printf("%s opened\n",filename_try); if (opt_do_list==1) - return do_list(uf); + ret_value = do_list(uf); else if (opt_do_extract==1) { - if (opt_extractdir && chdir(dirname)) +#ifdef _WIN32 + if (opt_extractdir && _chdir(dirname)) +#else + if (opt_extractdir && chdir(dirname)) +#endif { printf("Error changing into %s, aborting\n", dirname); exit(-1); } if (filename_to_extract == NULL) - return do_extract(uf,opt_do_extract_withoutpath,opt_overwrite,password); + ret_value = do_extract(uf, opt_do_extract_withoutpath, opt_overwrite, password); else - return do_extract_onefile(uf,filename_to_extract, - opt_do_extract_withoutpath,opt_overwrite,password); + ret_value = do_extract_onefile(uf, filename_to_extract, opt_do_extract_withoutpath, opt_overwrite, password); } - unzCloseCurrentFile(uf); - return 0; + unzClose(uf); + + return ret_value; } diff --git a/compat/zlib/contrib/minizip/minizip.c b/compat/zlib/contrib/minizip/minizip.c index f2dfecd..7a4fa5a 100644 --- a/compat/zlib/contrib/minizip/minizip.c +++ b/compat/zlib/contrib/minizip/minizip.c @@ -1,10 +1,33 @@ /* minizip.c - Version 1.01e, February 12th, 2005 + Version 1.1, February 14h, 2010 + sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2005 Gilles Vollant + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) */ + +#ifndef _WIN32 + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif +#endif + #include #include #include @@ -24,9 +47,9 @@ #include "zip.h" -#ifdef WIN32 -#define USEWIN32IOAPI -#include "iowin32.h" +#ifdef _WIN32 + #define USEWIN32IOAPI + #include "iowin32.h" #endif @@ -34,7 +57,7 @@ #define WRITEBUFFERSIZE (16384) #define MAXFILENAME (256) -#ifdef WIN32 +#ifdef _WIN32 uLong filetime(f, tmzip, dt) char *f; /* name of file to get info on */ tm_zip *tmzip; /* return value: access, modific. and creation times */ @@ -44,9 +67,9 @@ uLong filetime(f, tmzip, dt) { FILETIME ftLocal; HANDLE hFind; - WIN32_FIND_DATA ff32; + WIN32_FIND_DATAA ff32; - hFind = FindFirstFile(f,&ff32); + hFind = FindFirstFileA(f,&ff32); if (hFind != INVALID_HANDLE_VALUE) { FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal); @@ -119,7 +142,7 @@ int check_exist_file(filename) { FILE* ftestexist; int ret = 1; - ftestexist = fopen(filename,"rb"); + ftestexist = fopen64(filename,"rb"); if (ftestexist==NULL) ret = 0; else @@ -129,18 +152,19 @@ int check_exist_file(filename) void do_banner() { - printf("MiniZip 1.01b, demo of zLib + Zip package written by Gilles Vollant\n"); - printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n"); + printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n"); + printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n"); } void do_help() { - printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] file.zip [files_to_add]\n\n" \ + printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \ " -o Overwrite existing file.zip\n" \ " -a Append to existing file.zip\n" \ " -0 Store only\n" \ " -1 Compress faster\n" \ - " -9 Compress better\n\n"); + " -9 Compress better\n\n" \ + " -j exclude path. store only the file name.\n\n"); } /* calculate the CRC32 of a file, @@ -149,7 +173,7 @@ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigne { unsigned long calculate_crc=0; int err=ZIP_OK; - FILE * fin = fopen(filenameinzip,"rb"); + FILE * fin = fopen64(filenameinzip,"rb"); unsigned long size_read = 0; unsigned long total_read = 0; if (fin==NULL) @@ -179,10 +203,33 @@ int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigne fclose(fin); *result_crc=calculate_crc; - printf("file %s crc %x\n",filenameinzip,calculate_crc); + printf("file %s crc %lx\n", filenameinzip, calculate_crc); return err; } +int isLargeFile(const char* filename) +{ + int largeFile = 0; + ZPOS64_T pos = 0; + FILE* pFile = fopen64(filename, "rb"); + + if(pFile != NULL) + { + int n = fseeko64(pFile, 0, SEEK_END); + + pos = ftello64(pFile); + + printf("File : %s is %lld bytes\n", filename, pos); + + if(pos >= 0xffffffff) + largeFile = 1; + + fclose(pFile); + } + + return largeFile; +} + int main(argc,argv) int argc; char *argv[]; @@ -190,6 +237,7 @@ int main(argc,argv) int i; int opt_overwrite=0; int opt_compress_level=Z_DEFAULT_COMPRESSION; + int opt_exclude_path=0; int zipfilenamearg = 0; char filename_try[MAXFILENAME+16]; int zipok; @@ -222,6 +270,8 @@ int main(argc,argv) opt_overwrite = 2; if ((c>='0') && (c<='9')) opt_compress_level = c-'0'; + if ((c=='j') || (c=='J')) + opt_exclude_path = 1; if (((c=='p') || (c=='P')) && (i+1 0) { if (fread(filename, 1, fnsize, fpZip) == fnsize) { @@ -103,7 +103,7 @@ uLong* bytesRecovered; break; } } - + /* Data */ { int dataSize = cpsize; @@ -133,7 +133,7 @@ uLong* bytesRecovered; } } } - + /* Central directory entry */ { char header[46]; @@ -159,7 +159,7 @@ uLong* bytesRecovered; /* Header */ if (fwrite(header, 1, 46, fpOutCD) == 46) { offsetCD += 46; - + /* Filename */ if (fnsize > 0) { if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { @@ -172,7 +172,7 @@ uLong* bytesRecovered; err = Z_STREAM_ERROR; break; } - + /* Extra field */ if (extsize > 0) { if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { @@ -182,7 +182,7 @@ uLong* bytesRecovered; break; } } - + /* Comment field */ if (comsize > 0) { if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { @@ -192,8 +192,8 @@ uLong* bytesRecovered; break; } } - - + + } else { err = Z_ERRNO; break; @@ -225,17 +225,17 @@ uLong* bytesRecovered; WRITE_32(header + 12, offsetCD); /* size of CD */ WRITE_32(header + 16, offset); /* offset to CD */ WRITE_16(header + 20, comsize); /* comment */ - + /* Header */ if (fwrite(header, 1, 22, fpOutCD) == 22) { - + /* Comment field */ if (comsize > 0) { if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { err = Z_ERRNO; } } - + } else { err = Z_ERRNO; } @@ -257,14 +257,14 @@ uLong* bytesRecovered; fclose(fpOutCD); } } - + /* Close */ fclose(fpZip); fclose(fpOut); - + /* Wipe temporary file */ (void)remove(fileOutTmp); - + /* Number of recovered entries */ if (err == Z_OK) { if (nRecovered != NULL) { diff --git a/compat/zlib/contrib/minizip/mztools.h b/compat/zlib/contrib/minizip/mztools.h index eee78dc..88b3459 100644 --- a/compat/zlib/contrib/minizip/mztools.h +++ b/compat/zlib/contrib/minizip/mztools.h @@ -17,14 +17,14 @@ extern "C" { #include "unzip.h" -/* Repair a ZIP file (missing central directory) +/* Repair a ZIP file (missing central directory) file: file to recover fileOut: output file after recovery fileOutTmp: temporary file name used for recovery */ -extern int ZEXPORT unzRepair(const char* file, - const char* fileOut, - const char* fileOutTmp, +extern int ZEXPORT unzRepair(const char* file, + const char* fileOut, + const char* fileOutTmp, uLong* nRecovered, uLong* bytesRecovered); diff --git a/compat/zlib/contrib/minizip/unzip.c b/compat/zlib/contrib/minizip/unzip.c index 9ad4766..7617f41 100644 --- a/compat/zlib/contrib/minizip/unzip.c +++ b/compat/zlib/contrib/minizip/unzip.c @@ -1,43 +1,77 @@ /* unzip.c -- IO for uncompress .zip files using zlib - Version 1.01e, February 12th, 2005 + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2005 Gilles Vollant + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - Read unzip.h for more info -*/ + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault + + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + + ------------------------------------------------------------------------------------ + Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of + compatibility with older software. The following is from the original crypt.c. + Code woven in by Terry Thorsen 1/2003. -/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of -compatibility with older software. The following is from the original crypt.c. Code -woven in by Terry Thorsen 1/2003. -*/ -/* Copyright (c) 1990-2000 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2000-Apr-09 or later (the contents of which are also included in zip.h) for terms of use. If, for some reason, all these files are missing, the Info-ZIP license also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html -*/ -/* - crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] + + crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] The encryption/decryption parts of this source code (as opposed to the non-echoing password parts) were originally written in Europe. The whole source package can be freely distributed, including from the USA. (Prior to January 2000, re-export from the US was a violation of US law.) - */ -/* - This encryption code is a direct transcription of the algorithm from + This encryption code is a direct transcription of the algorithm from Roger Schlafly, described by Phil Katz in the file appnote.txt. This file (appnote.txt) is distributed with the PKZIP program (even in the version without encryption capabilities). - */ + + ------------------------------------------------------------------------------------ + + Changes in unzip.c + + 2007-2008 - Even Rouault - Addition of cpl_unzGetCurrentFileZStreamPos + 2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz* + 2007-2008 - Even Rouault - Remove old C style function prototypes + 2007-2008 - Even Rouault - Add unzip support for ZIP64 + + Copyright (C) 2007-2008 Even Rouault + + + Oct-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again). + Oct-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G + should only read the compressed/uncompressed size from the Zip64 format if + the size from normal header was 0xFFFFFFFF + Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant + Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required) + Patch created by Daniel Borca + + Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer + + Copyright (C) 1998 - 2010 Gilles Vollant, Even Rouault, Mathias Svensson + +*/ #include #include #include + +#ifndef NOUNCRYPT + #define NOUNCRYPT +#endif + #include "zlib.h" #include "unzip.h" @@ -85,16 +119,14 @@ woven in by Terry Thorsen 1/2003. #define SIZEZIPLOCALHEADER (0x1e) - - const char unz_copyright[] = " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; /* unz_file_info_interntal contain internal info about a file in zipfile*/ -typedef struct unz_file_info_internal_s +typedef struct unz_file_info64_internal_s { - uLong offset_curfile;/* relative offset of local header 4 bytes */ -} unz_file_info_internal; + ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */ +} unz_file_info64_internal; /* file_in_zip_read_info_s contain internal information about a file in zipfile, @@ -104,52 +136,61 @@ typedef struct char *read_buffer; /* internal buffer for compressed data */ z_stream stream; /* zLib stream structure for inflate */ - uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ +#ifdef HAVE_BZIP2 + bz_stream bstream; /* bzLib stream structure for bziped */ +#endif + + ZPOS64_T pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ uLong stream_initialised; /* flag set if stream structure is initialised*/ - uLong offset_local_extrafield;/* offset of the local extra field */ + ZPOS64_T offset_local_extrafield;/* offset of the local extra field */ uInt size_local_extrafield;/* size of the local extra field */ - uLong pos_local_extrafield; /* position in the local extra field in read*/ + ZPOS64_T pos_local_extrafield; /* position in the local extra field in read*/ + ZPOS64_T total_out_64; uLong crc32; /* crc32 of all data uncompressed */ uLong crc32_wait; /* crc32 we must obtain after decompress all */ - uLong rest_read_compressed; /* number of byte to be decompressed */ - uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/ - zlib_filefunc_def z_filefunc; + ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */ + ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/ + zlib_filefunc64_32_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ uLong compression_method; /* compression method (0==store) */ - uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ int raw; -} file_in_zip_read_info_s; +} file_in_zip64_read_info_s; -/* unz_s contain internal information about the zipfile +/* unz64_s contain internal information about the zipfile */ typedef struct { - zlib_filefunc_def z_filefunc; + zlib_filefunc64_32_def z_filefunc; + int is64bitOpenFunction; voidpf filestream; /* io structore of the zipfile */ - unz_global_info gi; /* public global information */ - uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - uLong num_file; /* number of the current file in the zipfile*/ - uLong pos_in_central_dir; /* pos of the current file in the central dir*/ - uLong current_file_ok; /* flag about the usability of the current file*/ - uLong central_pos; /* position of the beginning of the central dir*/ - - uLong size_central_dir; /* size of the central directory */ - uLong offset_central_dir; /* offset of start of central directory with + unz_global_info64 gi; /* public global information */ + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + ZPOS64_T num_file; /* number of the current file in the zipfile*/ + ZPOS64_T pos_in_central_dir; /* pos of the current file in the central dir*/ + ZPOS64_T current_file_ok; /* flag about the usability of the current file*/ + ZPOS64_T central_pos; /* position of the beginning of the central dir*/ + + ZPOS64_T size_central_dir; /* size of the central directory */ + ZPOS64_T offset_central_dir; /* offset of start of central directory with respect to the starting disk number */ - unz_file_info cur_file_info; /* public info about the current file in zip*/ - unz_file_info_internal cur_file_info_internal; /* private info about it*/ - file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current + unz_file_info64 cur_file_info; /* public info about the current file in zip*/ + unz_file_info64_internal cur_file_info_internal; /* private info about it*/ + file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current file if we are decompressing it */ int encrypted; + + int isZip64; + # ifndef NOUNCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ const unsigned long* pcrc_32_tab; # endif -} unz_s; +} unz64_s; #ifndef NOUNCRYPT @@ -163,18 +204,15 @@ typedef struct */ -local int unzlocal_getByte OF(( - const zlib_filefunc_def* pzlib_filefunc_def, +local int unz64local_getByte OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); -local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - int *pi; +local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi) { unsigned char c; - int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); if (err==1) { *pi = (int)c; @@ -182,7 +220,7 @@ local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) } else { - if (ZERROR(*pzlib_filefunc_def,filestream)) + if (ZERROR64(*pzlib_filefunc_def,filestream)) return UNZ_ERRNO; else return UNZ_EOF; @@ -193,26 +231,25 @@ local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ -local int unzlocal_getShort OF(( - const zlib_filefunc_def* pzlib_filefunc_def, +local int unz64local_getShort OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); -local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) { uLong x ; - int i; + int i = 0; int err; - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<8; if (err==UNZ_OK) *pX = x; @@ -221,33 +258,32 @@ local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) return err; } -local int unzlocal_getLong OF(( - const zlib_filefunc_def* pzlib_filefunc_def, +local int unz64local_getLong OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); -local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) { uLong x ; - int i; + int i = 0; int err; - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<8; if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<16; + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((uLong)i)<<16; if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<24; if (err==UNZ_OK) @@ -257,11 +293,60 @@ local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) return err; } +local int unz64local_getLong64 OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + ZPOS64_T *pX)); + + +local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream, + ZPOS64_T *pX) +{ + ZPOS64_T x ; + int i = 0; + int err; + + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (ZPOS64_T)i; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<8; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<16; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<24; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<32; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<40; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<48; + + if (err==UNZ_OK) + err = unz64local_getByte(pzlib_filefunc_def,filestream,&i); + x |= ((ZPOS64_T)i)<<56; + + if (err==UNZ_OK) + *pX = x; + else + *pX = 0; + return err; +} /* My own strcmpi / strcasecmp */ -local int strcmpcasenosensitive_internal (fileName1,fileName2) - const char* fileName1; - const char* fileName2; +local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2) { for (;;) { @@ -302,10 +387,10 @@ local int strcmpcasenosensitive_internal (fileName1,fileName2) (like 1 on Unix, 2 on Windows) */ -extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity) - const char* fileName1; - const char* fileName2; - int iCaseSensitivity; +extern int ZEXPORT unzStringFileNameCompare (const char* fileName1, + const char* fileName2, + int iCaseSensitivity) + { if (iCaseSensitivity==0) iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; @@ -324,25 +409,20 @@ extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivit Locate the Central directory of a zipfile (at the end, just before the global comment) */ -local uLong unzlocal_SearchCentralDir OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream)); - -local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; +local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); +local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { unsigned char* buf; - uLong uSizeFile; - uLong uBackRead; - uLong uMaxBack=0xffff; /* maximum size of global comment */ - uLong uPosFound=0; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; - if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) return 0; - uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; @@ -354,7 +434,8 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) uBackRead = 4; while (uBackReaduMaxBack) uBackRead = uMaxBack; @@ -363,11 +444,11 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) uReadPos = uSizeFile-uBackRead ; uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); - if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) break; - if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) break; for (i=(int)uReadSize-3; (i--)>0;) @@ -385,6 +466,112 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) return uPosFound; } + +/* + Locate the Central directory 64 of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T unz64local_SearchCentralDir64 OF(( + const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream)); + +local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, + voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + uLong uL; + ZPOS64_T relativeOffset; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + if (uPosFound == 0) + return 0; + + /* Zip64 end of central directory locator */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature, already checked */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + + /* number of the disk with the start of the zip64 end of central directory */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + if (uL != 0) + return 0; + + /* relative offset of the zip64 end of central directory record */ + if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK) + return 0; + + /* total number of disks */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + if (uL != 1) + return 0; + + /* Goto end of central directory record */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature */ + if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK) + return 0; + + if (uL != 0x06064b50) + return 0; + + return relativeOffset; +} + /* Open a Zip file. path contain the full pathname (by example, on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer @@ -394,19 +581,20 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) Else, the return value is a unzFile Handle, usable with other function of this unzip package. */ -extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) - const char *path; - zlib_filefunc_def* pzlib_filefunc_def; +local unzFile unzOpenInternal (const void *path, + zlib_filefunc64_32_def* pzlib_filefunc64_32_def, + int is64bitOpenFunction) { - unz_s us; - unz_s *s; - uLong central_pos,uL; + unz64_s us; + unz64_s *s; + ZPOS64_T central_pos; + uLong uL; uLong number_disk; /* number of the current dist, used for spaning ZIP, unsupported, always 0*/ uLong number_disk_with_CD; /* number the the disk with central dir, used for spaning ZIP, unsupported, always 0*/ - uLong number_entry_CD; /* total number of entries in + ZPOS64_T number_entry_CD; /* total number of entries in the central dir (same than number_entry on nospan) */ @@ -415,63 +603,137 @@ extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) if (unz_copyright[0]!=' ') return NULL; - if (pzlib_filefunc_def==NULL) - fill_fopen_filefunc(&us.z_filefunc); + us.z_filefunc.zseek32_file = NULL; + us.z_filefunc.ztell32_file = NULL; + if (pzlib_filefunc64_32_def==NULL) + fill_fopen64_filefunc(&us.z_filefunc.zfile_func64); else - us.z_filefunc = *pzlib_filefunc_def; + us.z_filefunc = *pzlib_filefunc64_32_def; + us.is64bitOpenFunction = is64bitOpenFunction; - us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque, + + + us.filestream = ZOPEN64(us.z_filefunc, path, ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_EXISTING); if (us.filestream==NULL) return NULL; - central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream); - if (central_pos==0) - err=UNZ_ERRNO; + central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream); + if (central_pos) + { + uLong uS; + ZPOS64_T uL64; + + us.isZip64 = 1; - if (ZSEEK(us.z_filefunc, us.filestream, + if (ZSEEK64(us.z_filefunc, us.filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; - /* the signature, already checked */ - if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; + /* the signature, already checked */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; - /* number of this disk */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) - err=UNZ_ERRNO; + /* size of zip64 end of central directory record */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&uL64)!=UNZ_OK) + err=UNZ_ERRNO; - /* number of the disk with the start of the central directory */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) - err=UNZ_ERRNO; + /* version made by */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) + err=UNZ_ERRNO; - /* total number of entries in the central dir on this disk */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) - err=UNZ_ERRNO; + /* version needed to extract */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uS)!=UNZ_OK) + err=UNZ_ERRNO; - /* total number of entries in the central dir */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) - err=UNZ_ERRNO; + /* number of this disk */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; - if ((number_entry_CD!=us.gi.number_entry) || - (number_disk_with_CD!=0) || - (number_disk!=0)) - err=UNZ_BADZIPFILE; + /* number of the disk with the start of the central directory */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; - /* size of the central directory */ - if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) - err=UNZ_ERRNO; + /* total number of entries in the central directory on this disk */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central directory */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) + err=UNZ_ERRNO; - /* offset of start of central directory with respect to the + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; + + /* offset of start of central directory with respect to the starting disk number */ - if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) - err=UNZ_ERRNO; + if (unz64local_getLong64(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) + err=UNZ_ERRNO; - /* zipfile comment length */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) - err=UNZ_ERRNO; + us.gi.size_comment = 0; + } + else + { + central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream); + if (central_pos==0) + err=UNZ_ERRNO; + + us.isZip64 = 0; + + if (ZSEEK64(us.z_filefunc, us.filestream, + central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=UNZ_ERRNO; + + /* the signature, already checked */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of this disk */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) + err=UNZ_ERRNO; + + /* number of the disk with the start of the central directory */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) + err=UNZ_ERRNO; + + /* total number of entries in the central dir on this disk */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.gi.number_entry = uL; + + /* total number of entries in the central dir */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + number_entry_CD = uL; + + if ((number_entry_CD!=us.gi.number_entry) || + (number_disk_with_CD!=0) || + (number_disk!=0)) + err=UNZ_BADZIPFILE; + + /* size of the central directory */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.size_central_dir = uL; + + /* offset of start of central directory with respect to the + starting disk number */ + if (unz64local_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) + err=UNZ_ERRNO; + us.offset_central_dir = uL; + + /* zipfile comment length */ + if (unz64local_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) + err=UNZ_ERRNO; + } if ((central_pospfile_in_zip_read!=NULL) unzCloseCurrentFile(file); - ZCLOSE(s->z_filefunc, s->filestream); + ZCLOSE64(s->z_filefunc, s->filestream); TRYFREE(s); return UNZ_OK; } @@ -529,28 +825,34 @@ extern int ZEXPORT unzClose (file) Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info) - unzFile file; - unz_global_info *pglobal_info; +extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info) { - unz_s* s; + unz64_s* s; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; *pglobal_info=s->gi; return UNZ_OK; } - +extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32) +{ + unz64_s* s; + if (file==NULL) + return UNZ_PARAMERROR; + s=(unz64_s*)file; + /* to do : check if number_entry is not truncated */ + pglobal_info32->number_entry = (uLong)s->gi.number_entry; + pglobal_info32->size_comment = s->gi.size_comment; + return UNZ_OK; +} /* Translate date/time from Dos format to tm_unz (readable more easilty) */ -local void unzlocal_DosDateToTmuDate (ulDosDate, ptm) - uLong ulDosDate; - tm_unz* ptm; +local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm) { - uLong uDate; - uDate = (uLong)(ulDosDate>>16); + ZPOS64_T uDate; + uDate = (ZPOS64_T)(ulDosDate>>16); ptm->tm_mday = (uInt)(uDate&0x1f) ; ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; @@ -563,9 +865,9 @@ local void unzlocal_DosDateToTmuDate (ulDosDate, ptm) /* Get Info about the current file in the zipfile, with internal only info */ -local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, - unz_file_info *pfile_info, - unz_file_info_internal +local int unz64local_GetCurrentFileInfoInternal OF((unzFile file, + unz_file_info64 *pfile_info, + unz_file_info64_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, @@ -574,33 +876,29 @@ local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, char *szComment, uLong commentBufferSize)); -local int unzlocal_GetCurrentFileInfoInternal (file, - pfile_info, - pfile_info_internal, - szFileName, fileNameBufferSize, - extraField, extraFieldBufferSize, - szComment, commentBufferSize) - unzFile file; - unz_file_info *pfile_info; - unz_file_info_internal *pfile_info_internal; - char *szFileName; - uLong fileNameBufferSize; - void *extraField; - uLong extraFieldBufferSize; - char *szComment; - uLong commentBufferSize; +local int unz64local_GetCurrentFileInfoInternal (unzFile file, + unz_file_info64 *pfile_info, + unz_file_info64_internal + *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize) { - unz_s* s; - unz_file_info file_info; - unz_file_info_internal file_info_internal; + unz64_s* s; + unz_file_info64 file_info; + unz_file_info64_internal file_info_internal; int err=UNZ_OK; uLong uMagic; long lSeek=0; + uLong uL; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; - if (ZSEEK(s->z_filefunc, s->filestream, + s=(unz64_s*)file; + if (ZSEEK64(s->z_filefunc, s->filestream, s->pos_in_central_dir+s->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) err=UNZ_ERRNO; @@ -608,57 +906,63 @@ local int unzlocal_GetCurrentFileInfoInternal (file, /* we check the magic */ if (err==UNZ_OK) - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + { + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x02014b50) err=UNZ_BADZIPFILE; + } - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) err=UNZ_ERRNO; - unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); + unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; + file_info.compressed_size = uL; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; + file_info.uncompressed_size = uL; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) + if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) + // relative offset of local header + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) err=UNZ_ERRNO; + file_info_internal.offset_curfile = uL; lSeek+=file_info.size_filename; if ((err==UNZ_OK) && (szFileName!=NULL)) @@ -673,33 +977,105 @@ local int unzlocal_GetCurrentFileInfoInternal (file, uSizeRead = fileNameBufferSize; if ((file_info.size_filename>0) && (fileNameBufferSize>0)) - if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) + if (ZREAD64(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek -= uSizeRead; } - + // Read extrafield if ((err==UNZ_OK) && (extraField!=NULL)) { - uLong uSizeRead ; + ZPOS64_T uSizeRead ; if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + { + if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; + } + if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) - if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead) + if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead) err=UNZ_ERRNO; - lSeek += file_info.size_file_extra - uSizeRead; + + lSeek += file_info.size_file_extra - (uLong)uSizeRead; } else - lSeek+=file_info.size_file_extra; + lSeek += file_info.size_file_extra; + + + if ((err==UNZ_OK) && (file_info.size_file_extra != 0)) + { + uLong acc = 0; + + // since lSeek now points to after the extra field we need to move back + lSeek -= file_info.size_file_extra; + + if (lSeek!=0) + { + if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + lSeek=0; + else + err=UNZ_ERRNO; + } + while(acc < file_info.size_file_extra) + { + uLong headerId; + uLong dataSize; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK) + err=UNZ_ERRNO; + + if (unz64local_getShort(&s->z_filefunc, s->filestream,&dataSize) != UNZ_OK) + err=UNZ_ERRNO; + + /* ZIP64 extra fields */ + if (headerId == 0x0001) + { + uLong uL; + + if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1) + { + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info_internal.offset_curfile == (ZPOS64_T)(unsigned long)-1) + { + /* Relative Header offset */ + if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) + err=UNZ_ERRNO; + } + + if(file_info.disk_num_start == (unsigned long)-1) + { + /* Disk Start Number */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) + err=UNZ_ERRNO; + } + + } + else + { + if (ZSEEK64(s->z_filefunc, s->filestream,dataSize,ZLIB_FILEFUNC_SEEK_CUR)!=0) + err=UNZ_ERRNO; + } + + acc += 2 + 2 + dataSize; + } + } if ((err==UNZ_OK) && (szComment!=NULL)) { @@ -713,18 +1089,22 @@ local int unzlocal_GetCurrentFileInfoInternal (file, uSizeRead = commentBufferSize; if (lSeek!=0) - if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) + { + if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; + } + if ((file_info.size_file_comment>0) && (commentBufferSize>0)) - if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) + if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; lSeek+=file_info.size_file_comment - uSizeRead; } else lSeek+=file_info.size_file_comment; + if ((err==UNZ_OK) && (pfile_info!=NULL)) *pfile_info=file_info; @@ -741,41 +1121,70 @@ local int unzlocal_GetCurrentFileInfoInternal (file, No preparation of the structure is needed return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetCurrentFileInfo (file, - pfile_info, - szFileName, fileNameBufferSize, - extraField, extraFieldBufferSize, - szComment, commentBufferSize) - unzFile file; - unz_file_info *pfile_info; - char *szFileName; - uLong fileNameBufferSize; - void *extraField; - uLong extraFieldBufferSize; - char *szComment; - uLong commentBufferSize; +extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file, + unz_file_info64 * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) { - return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL, + return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL, szFileName,fileNameBufferSize, extraField,extraFieldBufferSize, szComment,commentBufferSize); } +extern int ZEXPORT unzGetCurrentFileInfo (unzFile file, + unz_file_info * pfile_info, + char * szFileName, uLong fileNameBufferSize, + void *extraField, uLong extraFieldBufferSize, + char* szComment, uLong commentBufferSize) +{ + int err; + unz_file_info64 file_info64; + err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL, + szFileName,fileNameBufferSize, + extraField,extraFieldBufferSize, + szComment,commentBufferSize); + if (err==UNZ_OK) + { + pfile_info->version = file_info64.version; + pfile_info->version_needed = file_info64.version_needed; + pfile_info->flag = file_info64.flag; + pfile_info->compression_method = file_info64.compression_method; + pfile_info->dosDate = file_info64.dosDate; + pfile_info->crc = file_info64.crc; + + pfile_info->size_filename = file_info64.size_filename; + pfile_info->size_file_extra = file_info64.size_file_extra; + pfile_info->size_file_comment = file_info64.size_file_comment; + + pfile_info->disk_num_start = file_info64.disk_num_start; + pfile_info->internal_fa = file_info64.internal_fa; + pfile_info->external_fa = file_info64.external_fa; + + pfile_info->tmu_date = file_info64.tmu_date, + + + pfile_info->compressed_size = (uLong)file_info64.compressed_size; + pfile_info->uncompressed_size = (uLong)file_info64.uncompressed_size; + + } + return err; +} /* Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ -extern int ZEXPORT unzGoToFirstFile (file) - unzFile file; +extern int ZEXPORT unzGoToFirstFile (unzFile file) { int err=UNZ_OK; - unz_s* s; + unz64_s* s; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; s->pos_in_central_dir=s->offset_central_dir; s->num_file=0; - err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + err=unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); @@ -787,15 +1196,14 @@ extern int ZEXPORT unzGoToFirstFile (file) return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ -extern int ZEXPORT unzGoToNextFile (file) - unzFile file; +extern int ZEXPORT unzGoToNextFile (unzFile file) { - unz_s* s; + unz64_s* s; int err; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ @@ -805,7 +1213,7 @@ extern int ZEXPORT unzGoToNextFile (file) s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; s->num_file++; - err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); @@ -821,21 +1229,18 @@ extern int ZEXPORT unzGoToNextFile (file) UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ -extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) - unzFile file; - const char *szFileName; - int iCaseSensitivity; +extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity) { - unz_s* s; + unz64_s* s; int err; /* We remember the 'current' position in the file so that we can jump * back there if we fail. */ - unz_file_info cur_file_infoSaved; - unz_file_info_internal cur_file_info_internalSaved; - uLong num_fileSaved; - uLong pos_in_central_dirSaved; + unz_file_info64 cur_file_infoSaved; + unz_file_info64_internal cur_file_info_internalSaved; + ZPOS64_T num_fileSaved; + ZPOS64_T pos_in_central_dirSaved; if (file==NULL) @@ -844,7 +1249,7 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; @@ -859,7 +1264,7 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) while (err == UNZ_OK) { char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; - err = unzGetCurrentFileInfo(file,NULL, + err = unzGetCurrentFileInfo64(file,NULL, szCurrentFileName,sizeof(szCurrentFileName)-1, NULL,0,NULL,0); if (err == UNZ_OK) @@ -895,20 +1300,18 @@ extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) /* typedef struct unz_file_pos_s { - uLong pos_in_zip_directory; // offset in file - uLong num_of_file; // # of file + ZPOS64_T pos_in_zip_directory; // offset in file + ZPOS64_T num_of_file; // # of file } unz_file_pos; */ -extern int ZEXPORT unzGetFilePos(file, file_pos) - unzFile file; - unz_file_pos* file_pos; +extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) { - unz_s* s; + unz64_s* s; if (file==NULL || file_pos==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_END_OF_LIST_OF_FILE; @@ -918,23 +1321,35 @@ extern int ZEXPORT unzGetFilePos(file, file_pos) return UNZ_OK; } -extern int ZEXPORT unzGoToFilePos(file, file_pos) - unzFile file; - unz_file_pos* file_pos; +extern int ZEXPORT unzGetFilePos( + unzFile file, + unz_file_pos* file_pos) +{ + unz64_file_pos file_pos64; + int err = unzGetFilePos64(file,&file_pos64); + if (err==UNZ_OK) + { + file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory; + file_pos->num_of_file = (uLong)file_pos64.num_of_file; + } + return err; +} + +extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) { - unz_s* s; + unz64_s* s; int err; if (file==NULL || file_pos==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; /* jump to the right spot */ s->pos_in_central_dir = file_pos->pos_in_zip_directory; s->num_file = file_pos->num_of_file; /* set the current file */ - err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); /* return results */ @@ -942,6 +1357,19 @@ extern int ZEXPORT unzGoToFilePos(file, file_pos) return err; } +extern int ZEXPORT unzGoToFilePos( + unzFile file, + unz_file_pos* file_pos) +{ + unz64_file_pos file_pos64; + if (file_pos == NULL) + return UNZ_PARAMERROR; + + file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory; + file_pos64.num_of_file = file_pos->num_of_file; + return unzGoToFilePos64(file,&file_pos64); +} + /* // Unzip Helper Functions - should be here? /////////////////////////////////////////// @@ -954,13 +1382,9 @@ extern int ZEXPORT unzGoToFilePos(file, file_pos) store in *piSizeVar the size of extra info in local header (filename and size of extra field data) */ -local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, - poffset_local_extrafield, - psize_local_extrafield) - unz_s* s; - uInt* piSizeVar; - uLong *poffset_local_extrafield; - uInt *psize_local_extrafield; +local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar, + ZPOS64_T * poffset_local_extrafield, + uInt * psize_local_extrafield) { uLong uMagic,uData,uFlags; uLong size_filename; @@ -971,65 +1395,66 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, *poffset_local_extrafield = 0; *psize_local_extrafield = 0; - if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + + if (ZSEEK64(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (err==UNZ_OK) - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) + { + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x04034b50) err=UNZ_BADZIPFILE; + } - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; /* else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) err=UNZ_BADZIPFILE; */ - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) err=UNZ_ERRNO; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) err=UNZ_BADZIPFILE; if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && +/* #ifdef HAVE_BZIP2 */ + (s->cur_file_info.compression_method!=Z_BZIP2ED) && +/* #endif */ (s->cur_file_info.compression_method!=Z_DEFLATED)) err=UNZ_BADZIPFILE; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ err=UNZ_ERRNO; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && - ((uFlags & 8)==0)) + else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && - ((uFlags & 8)==0)) + else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ + if (unz64local_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && - ((uFlags & 8)==0)) + else if (uData != 0xFFFFFFFF && (err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && ((uFlags & 8)==0)) err=UNZ_BADZIPFILE; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) err=UNZ_ERRNO; else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) err=UNZ_BADZIPFILE; *piSizeVar += (uInt)size_filename; - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) + if (unz64local_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) err=UNZ_ERRNO; *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + size_filename; @@ -1044,18 +1469,14 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, Open for reading data the current file in the zipfile. If there is no error and the file is opened, the return value is UNZ_OK. */ -extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) - unzFile file; - int* method; - int* level; - int raw; - const char* password; +extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method, + int* level, int raw, const char* password) { int err=UNZ_OK; uInt iSizeVar; - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - uLong offset_local_extrafield; /* offset of the local extra field */ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + ZPOS64_T offset_local_extrafield; /* offset of the local extra field */ uInt size_local_extrafield; /* size of the local extra field */ # ifndef NOUNCRYPT char source[12]; @@ -1066,19 +1487,17 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; if (!s->current_file_ok) return UNZ_PARAMERROR; if (s->pfile_in_zip_read != NULL) unzCloseCurrentFile(file); - if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, - &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) + if (unz64local_CheckCurrentFileCoherencyHeader(s,&iSizeVar, &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) return UNZ_BADZIPFILE; - pfile_in_zip_read_info = (file_in_zip_read_info_s*) - ALLOC(sizeof(file_in_zip_read_info_s)); + pfile_in_zip_read_info = (file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s)); if (pfile_in_zip_read_info==NULL) return UNZ_INTERNALERROR; @@ -1111,31 +1530,60 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) } if ((s->cur_file_info.compression_method!=0) && +/* #ifdef HAVE_BZIP2 */ + (s->cur_file_info.compression_method!=Z_BZIP2ED) && +/* #endif */ (s->cur_file_info.compression_method!=Z_DEFLATED)) + err=UNZ_BADZIPFILE; pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; pfile_in_zip_read_info->crc32=0; - pfile_in_zip_read_info->compression_method = - s->cur_file_info.compression_method; + pfile_in_zip_read_info->total_out_64=0; + pfile_in_zip_read_info->compression_method = s->cur_file_info.compression_method; pfile_in_zip_read_info->filestream=s->filestream; pfile_in_zip_read_info->z_filefunc=s->z_filefunc; pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; pfile_in_zip_read_info->stream.total_out = 0; - if ((s->cur_file_info.compression_method==Z_DEFLATED) && - (!raw)) + if ((s->cur_file_info.compression_method==Z_BZIP2ED) && (!raw)) { +#ifdef HAVE_BZIP2 + pfile_in_zip_read_info->bstream.bzalloc = (void *(*) (void *, int, int))0; + pfile_in_zip_read_info->bstream.bzfree = (free_func)0; + pfile_in_zip_read_info->bstream.opaque = (voidpf)0; + pfile_in_zip_read_info->bstream.state = (voidpf)0; + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; pfile_in_zip_read_info->stream.zfree = (free_func)0; pfile_in_zip_read_info->stream.opaque = (voidpf)0; pfile_in_zip_read_info->stream.next_in = (voidpf)0; pfile_in_zip_read_info->stream.avail_in = 0; + err=BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0); + if (err == Z_OK) + pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED; + else + { + TRYFREE(pfile_in_zip_read_info); + return err; + } +#else + pfile_in_zip_read_info->raw=1; +#endif + } + else if ((s->cur_file_info.compression_method==Z_DEFLATED) && (!raw)) + { + pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; + pfile_in_zip_read_info->stream.zfree = (free_func)0; + pfile_in_zip_read_info->stream.opaque = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = 0; + pfile_in_zip_read_info->stream.avail_in = 0; + err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); if (err == Z_OK) - pfile_in_zip_read_info->stream_initialised=1; + pfile_in_zip_read_info->stream_initialised=Z_DEFLATED; else { TRYFREE(pfile_in_zip_read_info); @@ -1162,6 +1610,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) pfile_in_zip_read_info->stream.avail_in = (uInt)0; s->pfile_in_zip_read = pfile_in_zip_read_info; + s->encrypted = 0; # ifndef NOUNCRYPT if (password != NULL) @@ -1169,12 +1618,12 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) int i; s->pcrc_32_tab = get_crc_table(); init_keys(password,s->keys,s->pcrc_32_tab); - if (ZSEEK(s->z_filefunc, s->filestream, + if (ZSEEK64(s->z_filefunc, s->filestream, s->pfile_in_zip_read->pos_in_zipfile + s->pfile_in_zip_read->byte_before_the_zipfile, SEEK_SET)!=0) return UNZ_INTERNALERROR; - if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12) + if(ZREAD64(s->z_filefunc, s->filestream,source, 12)<12) return UNZ_INTERNALERROR; for (i = 0; i<12; i++) @@ -1189,28 +1638,39 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) return UNZ_OK; } -extern int ZEXPORT unzOpenCurrentFile (file) - unzFile file; +extern int ZEXPORT unzOpenCurrentFile (unzFile file) { return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); } -extern int ZEXPORT unzOpenCurrentFilePassword (file, password) - unzFile file; - const char* password; +extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password) { return unzOpenCurrentFile3(file, NULL, NULL, 0, password); } -extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw) - unzFile file; - int* method; - int* level; - int raw; +extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw) { return unzOpenCurrentFile3(file, method, level, raw, NULL); } +/** Addition for GDAL : START */ + +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file) +{ + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + s=(unz64_s*)file; + if (file==NULL) + return 0; //UNZ_PARAMERROR; + pfile_in_zip_read_info=s->pfile_in_zip_read; + if (pfile_in_zip_read_info==NULL) + return 0; //UNZ_PARAMERROR; + return pfile_in_zip_read_info->pos_in_zipfile + + pfile_in_zip_read_info->byte_before_the_zipfile; +} + +/** Addition for GDAL : END */ + /* Read bytes from the current file. buf contain buffer where data must be copied @@ -1221,18 +1681,15 @@ extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw) return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ -extern int ZEXPORT unzReadCurrentFile (file, buf, len) - unzFile file; - voidp buf; - unsigned len; +extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) { int err=UNZ_OK; uInt iRead = 0; - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) @@ -1270,13 +1727,13 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len) uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed; if (uReadThis == 0) return UNZ_EOF; - if (ZSEEK(pfile_in_zip_read_info->z_filefunc, + if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; - if (ZREAD(pfile_in_zip_read_info->z_filefunc, + if (ZREAD64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->read_buffer, uReadThis)!=uReadThis) @@ -1322,6 +1779,8 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len) *(pfile_in_zip_read_info->stream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i); + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uDoCopy; + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, pfile_in_zip_read_info->stream.next_out, uDoCopy); @@ -1333,11 +1792,54 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len) pfile_in_zip_read_info->stream.total_out += uDoCopy; iRead += uDoCopy; } - else + else if (pfile_in_zip_read_info->compression_method==Z_BZIP2ED) { +#ifdef HAVE_BZIP2 uLong uTotalOutBefore,uTotalOutAfter; const Bytef *bufBefore; uLong uOutThis; + + pfile_in_zip_read_info->bstream.next_in = (char*)pfile_in_zip_read_info->stream.next_in; + pfile_in_zip_read_info->bstream.avail_in = pfile_in_zip_read_info->stream.avail_in; + pfile_in_zip_read_info->bstream.total_in_lo32 = pfile_in_zip_read_info->stream.total_in; + pfile_in_zip_read_info->bstream.total_in_hi32 = 0; + pfile_in_zip_read_info->bstream.next_out = (char*)pfile_in_zip_read_info->stream.next_out; + pfile_in_zip_read_info->bstream.avail_out = pfile_in_zip_read_info->stream.avail_out; + pfile_in_zip_read_info->bstream.total_out_lo32 = pfile_in_zip_read_info->stream.total_out; + pfile_in_zip_read_info->bstream.total_out_hi32 = 0; + + uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32; + bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out; + + err=BZ2_bzDecompress(&pfile_in_zip_read_info->bstream); + + uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32; + uOutThis = uTotalOutAfter-uTotalOutBefore; + + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; + + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); + pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; + iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); + + pfile_in_zip_read_info->stream.next_in = (Bytef*)pfile_in_zip_read_info->bstream.next_in; + pfile_in_zip_read_info->stream.avail_in = pfile_in_zip_read_info->bstream.avail_in; + pfile_in_zip_read_info->stream.total_in = pfile_in_zip_read_info->bstream.total_in_lo32; + pfile_in_zip_read_info->stream.next_out = (Bytef*)pfile_in_zip_read_info->bstream.next_out; + pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out; + pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32; + + if (err==BZ_STREAM_END) + return (iRead==0) ? UNZ_EOF : iRead; + if (err!=BZ_OK) + break; +#endif + } // end Z_BZIP2ED + else + { + ZPOS64_T uTotalOutBefore,uTotalOutAfter; + const Bytef *bufBefore; + ZPOS64_T uOutThis; int flush=Z_SYNC_FLUSH; uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; @@ -1357,6 +1859,8 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len) uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; uOutThis = uTotalOutAfter-uTotalOutBefore; + pfile_in_zip_read_info->total_out_64 = pfile_in_zip_read_info->total_out_64 + uOutThis; + pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,bufBefore, (uInt)(uOutThis)); @@ -1382,14 +1886,13 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len) /* Give the current position in uncompressed data */ -extern z_off_t ZEXPORT unztell (file) - unzFile file; +extern z_off_t ZEXPORT unztell (unzFile file) { - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) @@ -1398,18 +1901,33 @@ extern z_off_t ZEXPORT unztell (file) return (z_off_t)pfile_in_zip_read_info->stream.total_out; } +extern ZPOS64_T ZEXPORT unztell64 (unzFile file) +{ + + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; + if (file==NULL) + return (ZPOS64_T)-1; + s=(unz64_s*)file; + pfile_in_zip_read_info=s->pfile_in_zip_read; + + if (pfile_in_zip_read_info==NULL) + return (ZPOS64_T)-1; + + return pfile_in_zip_read_info->total_out_64; +} + /* return 1 if the end of file was reached, 0 elsewhere */ -extern int ZEXPORT unzeof (file) - unzFile file; +extern int ZEXPORT unzeof (unzFile file) { - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) @@ -1424,9 +1942,9 @@ extern int ZEXPORT unzeof (file) /* - Read extra field from the current file (opened by unzOpenCurrentFile) - This is the local-header version of the extra field (sometimes, there is - more info in the local-header version than in the central-header) +Read extra field from the current file (opened by unzOpenCurrentFile) +This is the local-header version of the extra field (sometimes, there is +more info in the local-header version than in the central-header) if buf==NULL, it return the size of the local extra field that can be read @@ -1435,19 +1953,16 @@ extern int ZEXPORT unzeof (file) the return value is the number of bytes copied in buf, or (if <0) the error code */ -extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) - unzFile file; - voidp buf; - unsigned len; +extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len) { - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; uInt read_now; - uLong size_to_read; + ZPOS64_T size_to_read; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) @@ -1467,14 +1982,14 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) if (read_now==0) return 0; - if (ZSEEK(pfile_in_zip_read_info->z_filefunc, + if (ZSEEK64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, pfile_in_zip_read_info->offset_local_extrafield + pfile_in_zip_read_info->pos_local_extrafield, ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; - if (ZREAD(pfile_in_zip_read_info->z_filefunc, + if (ZREAD64(pfile_in_zip_read_info->z_filefunc, pfile_in_zip_read_info->filestream, buf,read_now)!=read_now) return UNZ_ERRNO; @@ -1486,16 +2001,15 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) Close the file in zip opened with unzipOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ -extern int ZEXPORT unzCloseCurrentFile (file) - unzFile file; +extern int ZEXPORT unzCloseCurrentFile (unzFile file) { int err=UNZ_OK; - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; + unz64_s* s; + file_in_zip64_read_info_s* pfile_in_zip_read_info; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; pfile_in_zip_read_info=s->pfile_in_zip_read; if (pfile_in_zip_read_info==NULL) @@ -1512,8 +2026,13 @@ extern int ZEXPORT unzCloseCurrentFile (file) TRYFREE(pfile_in_zip_read_info->read_buffer); pfile_in_zip_read_info->read_buffer = NULL; - if (pfile_in_zip_read_info->stream_initialised) + if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED) inflateEnd(&pfile_in_zip_read_info->stream); +#ifdef HAVE_BZIP2 + else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED) + BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream); +#endif + pfile_in_zip_read_info->stream_initialised = 0; TRYFREE(pfile_in_zip_read_info); @@ -1529,29 +2048,25 @@ extern int ZEXPORT unzCloseCurrentFile (file) uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ -extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) - unzFile file; - char *szComment; - uLong uSizeBuf; +extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf) { - int err=UNZ_OK; - unz_s* s; + unz64_s* s; uLong uReadThis ; if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; + return (int)UNZ_PARAMERROR; + s=(unz64_s*)file; uReadThis = uSizeBuf; if (uReadThis>s->gi.size_comment) uReadThis = s->gi.size_comment; - if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) + if (ZSEEK64(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) return UNZ_ERRNO; if (uReadThis>0) { *szComment='\0'; - if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) + if (ZREAD64(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) return UNZ_ERRNO; } @@ -1561,14 +2076,13 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) } /* Additions by RX '2004 */ -extern uLong ZEXPORT unzGetOffset (file) - unzFile file; +extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) { - unz_s* s; + unz64_s* s; if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; + return 0; //UNZ_PARAMERROR; + s=(unz64_s*)file; if (!s->current_file_ok) return 0; if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) @@ -1577,22 +2091,35 @@ extern uLong ZEXPORT unzGetOffset (file) return s->pos_in_central_dir; } -extern int ZEXPORT unzSetOffset (file, pos) - unzFile file; - uLong pos; +extern uLong ZEXPORT unzGetOffset (unzFile file) +{ + ZPOS64_T offset64; + + if (file==NULL) + return 0; //UNZ_PARAMERROR; + offset64 = unzGetOffset64(file); + return (uLong)offset64; +} + +extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) { - unz_s* s; + unz64_s* s; int err; if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; + s=(unz64_s*)file; s->pos_in_central_dir = pos; s->num_file = s->gi.number_entry; /* hack */ - err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, + err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info, &s->cur_file_info_internal, NULL,0,NULL,0,NULL,0); s->current_file_ok = (err == UNZ_OK); return err; } + +extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) +{ + return unzSetOffset64(file,pos); +} diff --git a/compat/zlib/contrib/minizip/unzip.h b/compat/zlib/contrib/minizip/unzip.h index b247937..3183968 100644 --- a/compat/zlib/contrib/minizip/unzip.h +++ b/compat/zlib/contrib/minizip/unzip.h @@ -1,20 +1,20 @@ /* unzip.h -- IO for uncompress .zip files using zlib - Version 1.01e, February 12th, 2005 + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2005 Gilles Vollant + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g - WinZip, InfoZip tools and compatible. + Modifications of Unzip for Zip64 + Copyright (C) 2007-2008 Even Rouault - Multi volume ZipFile (span) are not supported. - Encryption compatible with pkzip 2.04g only supported - Old compressions used by old PKZip 1.x are not supported + Modifications for Zip64 support on both zip and unzip + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + For more info read MiniZip_info.txt - I WAIT FEEDBACK at mail info@winimage.com - Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution + --------------------------------------------------------------------------------- - Condition of use and distribution are the same than zlib : + Condition of use and distribution are the same than zlib : This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -32,18 +32,16 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. + --------------------------------------------------------------------------------- -*/ + Changes + + See header of unzip64.c -/* for more info about .ZIP format, see - http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip - http://www.info-zip.org/pub/infozip/doc/ - PkWare has also a specification at : - ftp://ftp.pkware.com/probdesc.zip */ -#ifndef _unz_H -#define _unz_H +#ifndef _unz64_H +#define _unz64_H #ifdef __cplusplus extern "C" { @@ -53,10 +51,16 @@ extern "C" { #include "zlib.h" #endif -#ifndef _ZLIBIOAPI_H +#ifndef _ZLIBIOAPI_H #include "ioapi.h" #endif +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted from (void*) without cast */ @@ -89,15 +93,42 @@ typedef struct tm_unz_s /* unz_global_info structure contain global data about the ZIPfile These data comes from the end of central dir */ +typedef struct unz_global_info64_s +{ + ZPOS64_T number_entry; /* total number of entries in + the central dir on this disk */ + uLong size_comment; /* size of the global comment of the zipfile */ +} unz_global_info64; + typedef struct unz_global_info_s { uLong number_entry; /* total number of entries in - the central dir on this disk */ + the central dir on this disk */ uLong size_comment; /* size of the global comment of the zipfile */ } unz_global_info; - /* unz_file_info contain information about a file in the zipfile */ +typedef struct unz_file_info64_s +{ + uLong version; /* version made by 2 bytes */ + uLong version_needed; /* version needed to extract 2 bytes */ + uLong flag; /* general purpose bit flag 2 bytes */ + uLong compression_method; /* compression method 2 bytes */ + uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ + uLong crc; /* crc-32 4 bytes */ + ZPOS64_T compressed_size; /* compressed size 8 bytes */ + ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */ + uLong size_filename; /* filename length 2 bytes */ + uLong size_file_extra; /* extra field length 2 bytes */ + uLong size_file_comment; /* file comment length 2 bytes */ + + uLong disk_num_start; /* disk number start 2 bytes */ + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ + + tm_unz tmu_date; +} unz_file_info64; + typedef struct unz_file_info_s { uLong version; /* version made by 2 bytes */ @@ -133,6 +164,7 @@ extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, extern unzFile ZEXPORT unzOpen OF((const char *path)); +extern unzFile ZEXPORT unzOpen64 OF((const void *path)); /* Open a Zip file. path contain the full pathname (by example, on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer @@ -141,8 +173,14 @@ extern unzFile ZEXPORT unzOpen OF((const char *path)); return value is NULL. Else, the return value is a unzFile Handle, usable with other function of this unzip package. + the "64" function take a const void* pointer, because the path is just the + value passed to the open64_file_func callback. + Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path + is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char* + does not describe the reality */ + extern unzFile ZEXPORT unzOpen2 OF((const char *path, zlib_filefunc_def* pzlib_filefunc_def)); /* @@ -150,6 +188,13 @@ extern unzFile ZEXPORT unzOpen2 OF((const char *path, for read/write the zip file (see ioapi.h) */ +extern unzFile ZEXPORT unzOpen2_64 OF((const void *path, + zlib_filefunc64_def* pzlib_filefunc_def)); +/* + Open a Zip file, like unz64Open, but provide a set of file low level API + for read/write the zip file (see ioapi.h) +*/ + extern int ZEXPORT unzClose OF((unzFile file)); /* Close a ZipFile opened with unzipOpen. @@ -159,6 +204,9 @@ extern int ZEXPORT unzClose OF((unzFile file)); extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, unz_global_info *pglobal_info)); + +extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file, + unz_global_info64 *pglobal_info)); /* Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed @@ -221,8 +269,31 @@ extern int ZEXPORT unzGoToFilePos( unzFile file, unz_file_pos* file_pos); +typedef struct unz64_file_pos_s +{ + ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */ + ZPOS64_T num_of_file; /* # of file */ +} unz64_file_pos; + +extern int ZEXPORT unzGetFilePos64( + unzFile file, + unz64_file_pos* file_pos); + +extern int ZEXPORT unzGoToFilePos64( + unzFile file, + const unz64_file_pos* file_pos); + /* ****************************************** */ +extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file, + unz_file_info64 *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize)); + extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, unz_file_info *pfile_info, char *szFileName, @@ -244,6 +315,14 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, (commentBufferSize is the size of the buffer) */ + +/** Addition for GDAL : START */ + +extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file)); + +/** Addition for GDAL : END */ + + /***************************************************************************/ /* for reading the content of the current zipfile, you can open it, read data from it, and close it (you can close it before reading all the file) @@ -312,6 +391,8 @@ extern int ZEXPORT unzReadCurrentFile OF((unzFile file, */ extern z_off_t ZEXPORT unztell OF((unzFile file)); + +extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file)); /* Give the current position in uncompressed data */ @@ -340,9 +421,11 @@ extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, /***************************************************************************/ /* Get the current file offset */ +extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file); extern uLong ZEXPORT unzGetOffset (unzFile file); /* Set the current file offset */ +extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos); extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); @@ -351,4 +434,4 @@ extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); } #endif -#endif /* _unz_H */ +#endif /* _unz64_H */ diff --git a/compat/zlib/contrib/minizip/zip.c b/compat/zlib/contrib/minizip/zip.c index 7fbe002..3c34fc8 100644 --- a/compat/zlib/contrib/minizip/zip.c +++ b/compat/zlib/contrib/minizip/zip.c @@ -1,12 +1,24 @@ /* zip.c -- IO on .zip files using zlib - Version 1.01e, February 12th, 2005 + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - 27 Dec 2004 Rolf Kalbermatter - Modification to zipOpen2 to support globalComment retrieval. + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2005 Gilles Vollant + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + Oct-2009 - Mathias Svensson - Remove old C style function prototypes + Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives + Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions. + Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data + It is used when recreting zip archive with RAW when deleting items from a zip. + ZIP64 data is automaticly added to items that needs it, and existing ZIP64 data need to be removed. + Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required) + Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer - Read zip.h for more info */ @@ -39,7 +51,7 @@ #endif #ifndef Z_BUFSIZE -#define Z_BUFSIZE (16384) +#define Z_BUFSIZE (64*1024) //(16384) #endif #ifndef Z_MAXFILENAMEINZIP @@ -60,6 +72,10 @@ /* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + +// NOT sure that this work on ALL platform +#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) + #ifndef SEEK_CUR #define SEEK_CUR 1 #endif @@ -79,8 +95,7 @@ # define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif #endif -const char zip_copyright[] = - " zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; +const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; #define SIZEDATA_INDATABLOCK (4096-(4*4)) @@ -88,6 +103,8 @@ const char zip_copyright[] = #define LOCALHEADERMAGIC (0x04034b50) #define CENTRALHEADERMAGIC (0x02014b50) #define ENDHEADERMAGIC (0x06054b50) +#define ZIP64ENDHEADERMAGIC (0x6064b50) +#define ZIP64ENDLOCHEADERMAGIC (0x7064b50) #define FLAG_LOCALHEADER_OFFSET (0x06) #define CRC_LOCALHEADER_OFFSET (0x0e) @@ -113,13 +130,19 @@ typedef struct linkedlist_data_s typedef struct { z_stream stream; /* zLib stream structure for inflate */ +#ifdef HAVE_BZIP2 + bz_stream bstream; /* bzLib stream structure for bziped */ +#endif + int stream_initialised; /* 1 is stream is initialised */ uInt pos_in_buffered_data; /* last written byte in buffered_data */ - uLong pos_local_header; /* offset of the local header of the file + ZPOS64_T pos_local_header; /* offset of the local header of the file currenty writing */ char* central_header; /* central header data for the current file */ + uLong size_centralExtra; uLong size_centralheader; /* size of the central header for cur file */ + uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */ uLong flag; /* flag of the file currently writing */ int method; /* compression method of file currenty wr.*/ @@ -128,29 +151,34 @@ typedef struct uLong dosDate; uLong crc32; int encrypt; + int zip64; /* Add ZIP64 extened information in the extra field */ + ZPOS64_T pos_zip64extrainfo; + ZPOS64_T totalCompressedData; + ZPOS64_T totalUncompressedData; #ifndef NOCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ const unsigned long* pcrc_32_tab; int crypt_header_size; #endif -} curfile_info; +} curfile64_info; typedef struct { - zlib_filefunc_def z_filefunc; + zlib_filefunc64_32_def z_filefunc; voidpf filestream; /* io structore of the zipfile */ linkedlist_data central_dir;/* datablock with central dir in construction*/ int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ - curfile_info ci; /* info on the file curretly writing */ + curfile64_info ci; /* info on the file curretly writing */ + + ZPOS64_T begin_pos; /* position of the beginning of the zipfile */ + ZPOS64_T add_position_when_writting_offset; + ZPOS64_T number_entry; - uLong begin_pos; /* position of the beginning of the zipfile */ - uLong add_position_when_writting_offset; - uLong number_entry; #ifndef NO_ADDFILEINEXISTINGZIP char *globalcomment; #endif -} zip_internal; +} zip64_internal; #ifndef NOCRYPT @@ -172,8 +200,7 @@ local linkedlist_datablock_internal* allocate_new_datablock() return ldi; } -local void free_datablock(ldi) - linkedlist_datablock_internal* ldi; +local void free_datablock(linkedlist_datablock_internal* ldi) { while (ldi!=NULL) { @@ -183,24 +210,19 @@ local void free_datablock(ldi) } } -local void init_linkedlist(ll) - linkedlist_data* ll; +local void init_linkedlist(linkedlist_data* ll) { ll->first_block = ll->last_block = NULL; } -local void free_linkedlist(ll) - linkedlist_data* ll; +local void free_linkedlist(linkedlist_data* ll) { free_datablock(ll->first_block); ll->first_block = ll->last_block = NULL; } -local int add_data_in_datablock(ll,buf,len) - linkedlist_data* ll; - const void* buf; - uLong len; +local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) { linkedlist_datablock_internal* ldi; const unsigned char* from_copy; @@ -258,18 +280,13 @@ local int add_data_in_datablock(ll,buf,len) #ifndef NO_ADDFILEINEXISTINGZIP /* =========================================================================== Inputs a long in LSB order to the given file - nbByte == 1, 2 or 4 (byte, short or long) + nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T) */ -local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, uLong x, int nbByte)); -local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong x; - int nbByte; +local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)); +local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) { - unsigned char buf[4]; + unsigned char buf[8]; int n; for (n = 0; n < nbByte; n++) { @@ -284,17 +301,14 @@ local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte) } } - if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) + if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) return ZIP_ERRNO; else return ZIP_OK; } -local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte)); -local void ziplocal_putValue_inmemory (dest, x, nbByte) - void* dest; - uLong x; - int nbByte; +local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte)); +local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) { unsigned char* buf=(unsigned char*)dest; int n; @@ -315,14 +329,12 @@ local void ziplocal_putValue_inmemory (dest, x, nbByte) /****************************************************************************/ -local uLong ziplocal_TmzDateToDosDate(ptm,dosDate) - const tm_zip* ptm; - uLong dosDate; +local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) { uLong year = (uLong)ptm->tm_year; - if (year>1980) + if (year>=1980) year-=1980; - else if (year>80) + else if (year>=80) year-=80; return (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | @@ -332,18 +344,12 @@ local uLong ziplocal_TmzDateToDosDate(ptm,dosDate) /****************************************************************************/ -local int ziplocal_getByte OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - int *pi)); +local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); -local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - int *pi; +local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi) { unsigned char c; - int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); if (err==1) { *pi = (int)c; @@ -351,7 +357,7 @@ local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi) } else { - if (ZERROR(*pzlib_filefunc_def,filestream)) + if (ZERROR64(*pzlib_filefunc_def,filestream)) return ZIP_ERRNO; else return ZIP_EOF; @@ -362,25 +368,19 @@ local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi) /* =========================================================================== Reads a long in LSB order from the given gz_stream. Sets */ -local int ziplocal_getShort OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); - -local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); + +local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { uLong x ; - int i; + int i = 0; int err; - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==ZIP_OK) @@ -390,33 +390,27 @@ local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX) return err; } -local int ziplocal_getLong OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); +local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); -local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) { uLong x ; - int i; + int i = 0; int err; - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x = (uLong)i; if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<8; if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<16; if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); x += ((uLong)i)<<24; if (err==ZIP_OK) @@ -426,6 +420,54 @@ local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX) return err; } +local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)); + + +local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) +{ + ZPOS64_T x; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (ZPOS64_T)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<8; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<16; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<24; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<32; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<40; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<48; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<56; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + + return err; +} + #ifndef BUFREADCOMMENT #define BUFREADCOMMENT (0x400) #endif @@ -433,87 +475,391 @@ local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX) Locate the Central directory of a zipfile (at the end, just before the global comment) */ -local uLong ziplocal_SearchCentralDir OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream)); +local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); -local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; +local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) { - unsigned char* buf; - uLong uSizeFile; - uLong uBackRead; - uLong uMaxBack=0xffff; /* maximum size of global comment */ - uLong uPosFound=0; + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; - if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return 0; + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); - uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; - if (uMaxBack>uSizeFile) - uMaxBack = uSizeFile; + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; - buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); - if (buf==NULL) - return 0; + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} - uBackRead = 4; - while (uBackReaduSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) { - uLong uReadSize,uReadPos ; - int i; - if (uBackRead+BUFREADCOMMENT>uMaxBack) - uBackRead = uMaxBack; - else - uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; + // Signature "0x07064b50" Zip64 end of central directory locater + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) + { + uPosFound = uReadPos+i; + break; + } + } - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); - if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) - break; + if (uPosFound!=0) + break; + } - if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) - break; + TRYFREE(buf); + if (uPosFound == 0) + return 0; - for (i=(int)uReadSize-3; (i--)>0;) - if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && - ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) - { - uPosFound = uReadPos+i; - break; - } + /* Zip64 end of central directory locator */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature, already checked */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + /* number of the disk with the start of the zip64 end of central directory */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 0) + return 0; + + /* relative offset of the zip64 end of central directory record */ + if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK) + return 0; + + /* total number of disks */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 1) + return 0; - if (uPosFound!=0) - break; + /* Goto Zip64 end of central directory record */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + if (uL != 0x06064b50) // signature of 'Zip64 end of central directory' + return 0; + + return relativeOffset; +} + +int LoadCentralDirectoryRecord(zip64_internal* pziinit) +{ + int err=ZIP_OK; + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + + ZPOS64_T size_central_dir; /* size of the central directory */ + ZPOS64_T offset_central_dir; /* offset of start of central directory */ + ZPOS64_T central_pos; + uLong uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + ZPOS64_T number_entry; + ZPOS64_T number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + uLong VersionMadeBy; + uLong VersionNeeded; + uLong size_comment; + + int hasZIP64Record = 0; + + // check first if we find a ZIP64 record + central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream); + if(central_pos > 0) + { + hasZIP64Record = 1; + } + else if(central_pos == 0) + { + central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream); + } + +/* disable to allow appending to empty ZIP archive + if (central_pos==0) + err=ZIP_ERRNO; +*/ + + if(hasZIP64Record) + { + ZPOS64_T sizeEndOfCentralDirectory; + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* size of zip64 end of central directory record */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version made by */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version needed to extract */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory on this disk */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + // TODO.. + // read the comment from the standard central header. + size_comment = 0; + } + else + { + // Read End of central Directory info + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir on this disk */ + number_entry = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry = uL; + + /* total number of entries in the central dir */ + number_entry_CD = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry_CD = uL; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + size_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + size_central_dir = uL; + + /* offset of start of central directory with respect to the starting disk number */ + offset_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + offset_central_dir = uL; + + + /* zipfile global comment length */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK) + err=ZIP_ERRNO; + } + + if ((central_posz_filefunc, pziinit->filestream); + return ZIP_ERRNO; + } + + if (size_comment>0) + { + pziinit->globalcomment = (char*)ALLOC(size_comment+1); + if (pziinit->globalcomment) + { + size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment); + pziinit->globalcomment[size_comment]=0; } - TRYFREE(buf); - return uPosFound; + } + + byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir); + pziinit->add_position_when_writting_offset = byte_before_the_zipfile; + + { + ZPOS64_T size_central_dir_to_read = size_central_dir; + size_t buf_size = SIZEDATA_INDATABLOCK; + void* buf_read = (void*)ALLOC(buf_size); + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + while ((size_central_dir_to_read>0) && (err==ZIP_OK)) + { + ZPOS64_T read_this = SIZEDATA_INDATABLOCK; + if (read_this > size_central_dir_to_read) + read_this = size_central_dir_to_read; + + if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this) + err=ZIP_ERRNO; + + if (err==ZIP_OK) + err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this); + + size_central_dir_to_read-=read_this; + } + TRYFREE(buf_read); + } + pziinit->begin_pos = byte_before_the_zipfile; + pziinit->number_entry = number_entry_CD; + + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + return err; } + + #endif /* !NO_ADDFILEINEXISTINGZIP*/ + /************************************************************/ -extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def) - const char *pathname; - int append; - zipcharpc* globalcomment; - zlib_filefunc_def* pzlib_filefunc_def; +extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) { - zip_internal ziinit; - zip_internal* zi; + zip64_internal ziinit; + zip64_internal* zi; int err=ZIP_OK; - - if (pzlib_filefunc_def==NULL) - fill_fopen_filefunc(&ziinit.z_filefunc); + ziinit.z_filefunc.zseek32_file = NULL; + ziinit.z_filefunc.ztell32_file = NULL; + if (pzlib_filefunc64_32_def==NULL) + fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); else - ziinit.z_filefunc = *pzlib_filefunc_def; + ziinit.z_filefunc = *pzlib_filefunc64_32_def; - ziinit.filestream = (*(ziinit.z_filefunc.zopen_file)) - (ziinit.z_filefunc.opaque, + ziinit.filestream = ZOPEN64(ziinit.z_filefunc, pathname, (append == APPEND_STATUS_CREATE) ? (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : @@ -521,7 +867,11 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc if (ziinit.filestream == NULL) return NULL; - ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream); + + if (append == APPEND_STATUS_CREATEAFTER) + ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END); + + ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream); ziinit.in_opened_file_inzip = 0; ziinit.ci.stream_initialised = 0; ziinit.number_entry = 0; @@ -529,10 +879,11 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc init_linkedlist(&(ziinit.central_dir)); - zi = (zip_internal*)ALLOC(sizeof(zip_internal)); + + zi = (zip64_internal*)ALLOC(sizeof(zip64_internal)); if (zi==NULL) { - ZCLOSE(ziinit.z_filefunc,ziinit.filestream); + ZCLOSE64(ziinit.z_filefunc,ziinit.filestream); return NULL; } @@ -541,122 +892,8 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc ziinit.globalcomment = NULL; if (append == APPEND_STATUS_ADDINZIP) { - uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - - uLong size_central_dir; /* size of the central directory */ - uLong offset_central_dir; /* offset of start of central directory */ - uLong central_pos,uL; - - uLong number_disk; /* number of the current dist, used for - spaning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number the the disk with central dir, used - for spaning ZIP, unsupported, always 0*/ - uLong number_entry; - uLong number_entry_CD; /* total number of entries in - the central dir - (same than number_entry on nospan) */ - uLong size_comment; - - central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream); - if (central_pos==0) - err=ZIP_ERRNO; - - if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, - central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=ZIP_ERRNO; - - /* the signature, already checked */ - if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of this disk */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of the disk with the start of the central directory */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK) - err=ZIP_ERRNO; - - /* total number of entries in the central dir on this disk */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK) - err=ZIP_ERRNO; - - /* total number of entries in the central dir */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK) - err=ZIP_ERRNO; - - if ((number_entry_CD!=number_entry) || - (number_disk_with_CD!=0) || - (number_disk!=0)) - err=ZIP_BADZIPFILE; - - /* size of the central directory */ - if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK) - err=ZIP_ERRNO; - - /* offset of start of central directory with respect to the - starting disk number */ - if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK) - err=ZIP_ERRNO; - - /* zipfile global comment length */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK) - err=ZIP_ERRNO; - - if ((central_pos0) - { - ziinit.globalcomment = ALLOC(size_comment+1); - if (ziinit.globalcomment) - { - size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream,ziinit.globalcomment,size_comment); - ziinit.globalcomment[size_comment]=0; - } - } - - byte_before_the_zipfile = central_pos - - (offset_central_dir+size_central_dir); - ziinit.add_position_when_writting_offset = byte_before_the_zipfile; - - { - uLong size_central_dir_to_read = size_central_dir; - size_t buf_size = SIZEDATA_INDATABLOCK; - void* buf_read = (void*)ALLOC(buf_size); - if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, - offset_central_dir + byte_before_the_zipfile, - ZLIB_FILEFUNC_SEEK_SET) != 0) - err=ZIP_ERRNO; - - while ((size_central_dir_to_read>0) && (err==ZIP_OK)) - { - uLong read_this = SIZEDATA_INDATABLOCK; - if (read_this > size_central_dir_to_read) - read_this = size_central_dir_to_read; - if (ZREAD(ziinit.z_filefunc, ziinit.filestream,buf_read,read_this) != read_this) - err=ZIP_ERRNO; - - if (err==ZIP_OK) - err = add_data_in_datablock(&ziinit.central_dir,buf_read, - (uLong)read_this); - size_central_dir_to_read-=read_this; - } - TRYFREE(buf_read); - } - ziinit.begin_pos = byte_before_the_zipfile; - ziinit.number_entry = number_entry_CD; - - if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, - offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=ZIP_ERRNO; + // Read and Cache Central Directory Records + err = LoadCentralDirectoryRecord(&ziinit); } if (globalcomment) @@ -680,37 +917,150 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc } } -extern zipFile ZEXPORT zipOpen (pathname, append) - const char *pathname; - int append; +extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) { - return zipOpen2(pathname,append,NULL,NULL); + if (pzlib_filefunc32_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); } -extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; - int raw; - int windowBits; - int memLevel; - int strategy; - const char* password; - uLong crcForCrypting; +extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) +{ + if (pzlib_filefunc_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; + zlib_filefunc64_32_def_fill.ztell32_file = NULL; + zlib_filefunc64_32_def_fill.zseek32_file = NULL; + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); +} + + + +extern zipFile ZEXPORT zipOpen (const char* pathname, int append) { - zip_internal* zi; + return zipOpen3((const void*)pathname,append,NULL,NULL); +} + +extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append) +{ + return zipOpen3(pathname,append,NULL,NULL); +} + +int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) +{ + /* write the local header */ + int err; + uInt size_filename = (uInt)strlen(filename); + uInt size_extrafield = size_extrafield_local; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4); + + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); + + // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ + } + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); + + if(zi->ci.zip64) + { + size_extrafield += 20; + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2); + + if ((err==ZIP_OK) && (size_filename > 0)) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) + err = ZIP_ERRNO; + } + + if ((err==ZIP_OK) && (size_extrafield_local > 0)) + { + if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local) + err = ZIP_ERRNO; + } + + + if ((err==ZIP_OK) && (zi->ci.zip64)) + { + // write the Zip64 extended info + short HeaderID = 1; + short DataSize = 16; + ZPOS64_T CompressedSize = 0; + ZPOS64_T UncompressedSize = 0; + + // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file) + zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8); + } + + return err; +} + +/* + NOTE. + When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped + before calling this function it can be done with zipRemoveExtraInfoBlock + + It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize + unnecessary allocations. + */ +extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase, int zip64) +{ + zip64_internal* zi; uInt size_filename; uInt size_comment; uInt i; @@ -723,10 +1073,16 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, if (file == NULL) return ZIP_PARAMERROR; + +#ifdef HAVE_BZIP2 + if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED)) + return ZIP_PARAMERROR; +#else if ((method!=0) && (method!=Z_DEFLATED)) - return ZIP_PARAMERROR; + return ZIP_PARAMERROR; +#endif - zi = (zip_internal*)file; + zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 1) { @@ -735,7 +1091,6 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, return err; } - if (filename==NULL) filename="-"; @@ -752,10 +1107,11 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, { if (zipfi->dosDate != 0) zi->ci.dosDate = zipfi->dosDate; - else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate); + else + zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); } - zi->ci.flag = 0; + zi->ci.flag = flagBase; if ((level==8) || (level==9)) zi->ci.flag |= 2; if ((level==2)) @@ -771,37 +1127,43 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, zi->ci.stream_initialised = 0; zi->ci.pos_in_buffered_data = 0; zi->ci.raw = raw; - zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ; - zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + - size_extrafield_global + size_comment; - zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader); + zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); + + zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment; + zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data - ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); + zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree); + + zi->ci.size_centralExtra = size_extrafield_global; + zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); /* version info */ - ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2); - ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); - ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); - ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); - ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); - ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ - ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ - ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ - ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); - ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); - ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); - ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); + zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); + zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); + zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); + zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ + zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); + zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); + zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ if (zipfi==NULL) - ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); else - ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); if (zipfi==NULL) - ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); else - ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); - ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4); + if(zi->ci.pos_local_header >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); + else + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writting_offset,4); for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); @@ -816,63 +1178,66 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, if (zi->ci.central_header == NULL) return ZIP_INTERNALERROR; - /* write the local header */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2); - - if ((err==ZIP_OK) && (size_filename>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) - err = ZIP_ERRNO; - - if ((err==ZIP_OK) && (size_extrafield_local>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local) - !=size_extrafield_local) - err = ZIP_ERRNO; + zi->ci.zip64 = zip64; + zi->ci.totalCompressedData = 0; + zi->ci.totalUncompressedData = 0; + zi->ci.pos_zip64extrainfo = 0; + + err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local); + +#ifdef HAVE_BZIP2 + zi->ci.bstream.avail_in = (uInt)0; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + zi->ci.bstream.total_in_hi32 = 0; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_out_hi32 = 0; + zi->ci.bstream.total_out_lo32 = 0; +#endif zi->ci.stream.avail_in = (uInt)0; zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; zi->ci.stream.next_out = zi->ci.buffered_data; zi->ci.stream.total_in = 0; zi->ci.stream.total_out = 0; + zi->ci.stream.data_type = Z_BINARY; +#ifdef HAVE_BZIP2 + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) +#else if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) +#endif { - zi->ci.stream.zalloc = (alloc_func)0; - zi->ci.stream.zfree = (free_func)0; - zi->ci.stream.opaque = (voidpf)0; + if(zi->ci.method == Z_DEFLATED) + { + zi->ci.stream.zalloc = (alloc_func)0; + zi->ci.stream.zfree = (free_func)0; + zi->ci.stream.opaque = (voidpf)0; - if (windowBits>0) - windowBits = -windowBits; + if (windowBits>0) + windowBits = -windowBits; - err = deflateInit2(&zi->ci.stream, level, - Z_DEFLATED, windowBits, memLevel, strategy); + err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); + + if (err==Z_OK) + zi->ci.stream_initialised = Z_DEFLATED; + } + else if(zi->ci.method == Z_BZIP2ED) + { +#ifdef HAVE_BZIP2 + // Init BZip stuff here + zi->ci.bstream.bzalloc = 0; + zi->ci.bstream.bzfree = 0; + zi->ci.bstream.opaque = (voidpf)0; + + err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); + if(err == BZ_OK) + zi->ci.stream_initialised = Z_BZIP2ED; +#endif + } - if (err==Z_OK) - zi->ci.stream_initialised = 1; } + # ifndef NOCRYPT zi->ci.crypt_header_size = 0; if ((err==Z_OK) && (password != NULL)) @@ -886,7 +1251,7 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); zi->ci.crypt_header_size = sizeHead; - if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) err = ZIP_ERRNO; } # endif @@ -896,53 +1261,105 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, return err; } -extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; - int raw; +extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, versionMadeBy, flagBase, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw) { - return zipOpenNewFileInZip3 (file, filename, zipfi, + return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0); + NULL, 0, VERSIONMADEBY, 0, 0); } -extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; +extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, int zip64) { - return zipOpenNewFileInZip2 (file, filename, zipfi, + return zipOpenNewFileInZip4_64 (file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, - comment, method, level, 0); + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); } -local int zipFlushWriteBuffer(zi) - zip_internal* zi; +extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); +} + +local int zip64FlushWriteBuffer(zip64_internal* zi) { int err=ZIP_OK; @@ -952,169 +1369,372 @@ local int zipFlushWriteBuffer(zi) uInt i; int t; for (i=0;ici.pos_in_buffered_data;i++) - zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, - zi->ci.buffered_data[i],t); + zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); #endif } - if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) - !=zi->ci.pos_in_buffered_data) + + if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data) err = ZIP_ERRNO; + + zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; + +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED) + { + zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_in_hi32 = 0; + } + else +#endif + { + zi->ci.totalUncompressedData += zi->ci.stream.total_in; + zi->ci.stream.total_in = 0; + } + + zi->ci.pos_in_buffered_data = 0; + return err; } -extern int ZEXPORT zipWriteInFileInZip (file, buf, len) - zipFile file; - const void* buf; - unsigned len; +extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len) { - zip_internal* zi; + zip64_internal* zi; int err=ZIP_OK; if (file == NULL) return ZIP_PARAMERROR; - zi = (zip_internal*)file; + zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; - zi->ci.stream.next_in = (void*)buf; - zi->ci.stream.avail_in = len; - zi->ci.crc32 = crc32(zi->ci.crc32,buf,len); + zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); - while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) { - if (zi->ci.stream.avail_out == 0) + zi->ci.bstream.next_in = (void*)buf; + zi->ci.bstream.avail_in = len; + err = BZ_RUN_OK; + + while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) + { + if (zi->ci.bstream.avail_out == 0) { - if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; } - if(err != ZIP_OK) - break; + if(err != BZ_RUN_OK) + break; - if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) { - uLong uTotalOutBefore = zi->ci.stream.total_out; - err=deflate(&zi->ci.stream, Z_NO_FLUSH); - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; +// uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; } - else - { - uInt copy_this,i; - if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) - copy_this = zi->ci.stream.avail_in; - else - copy_this = zi->ci.stream.avail_out; - for (i=0;ici.stream.next_out)+i) = - *(((const char*)zi->ci.stream.next_in)+i); - { - zi->ci.stream.avail_in -= copy_this; - zi->ci.stream.avail_out-= copy_this; - zi->ci.stream.next_in+= copy_this; - zi->ci.stream.next_out+= copy_this; - zi->ci.stream.total_in+= copy_this; - zi->ci.stream.total_out+= copy_this; - zi->ci.pos_in_buffered_data += copy_this; - } - } + } + + if(err == BZ_RUN_OK) + err = ZIP_OK; + } + else +#endif + { + zi->ci.stream.next_in = (Bytef*)buf; + zi->ci.stream.avail_in = len; + + while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) + { + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + + + if(err != ZIP_OK) + break; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_NO_FLUSH); + if(uTotalOutBefore > zi->ci.stream.total_out) + { + int bBreak = 0; + bBreak++; + } + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + else + { + uInt copy_this,i; + if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) + copy_this = zi->ci.stream.avail_in; + else + copy_this = zi->ci.stream.avail_out; + + for (i = 0; i < copy_this; i++) + *(((char*)zi->ci.stream.next_out)+i) = + *(((const char*)zi->ci.stream.next_in)+i); + { + zi->ci.stream.avail_in -= copy_this; + zi->ci.stream.avail_out-= copy_this; + zi->ci.stream.next_in+= copy_this; + zi->ci.stream.next_out+= copy_this; + zi->ci.stream.total_in+= copy_this; + zi->ci.stream.total_out+= copy_this; + zi->ci.pos_in_buffered_data += copy_this; + } + } + }// while(...) } return err; } -extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32) - zipFile file; - uLong uncompressed_size; - uLong crc32; +extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) +{ + return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32); +} + +extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32) { - zip_internal* zi; - uLong compressed_size; + zip64_internal* zi; + ZPOS64_T compressed_size; + uLong invalidValue = 0xffffffff; + short datasize = 0; int err=ZIP_OK; if (file == NULL) return ZIP_PARAMERROR; - zi = (zip_internal*)file; + zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; zi->ci.stream.avail_in = 0; if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - while (err==ZIP_OK) + { + while (err==ZIP_OK) + { + uLong uTotalOutBefore; + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_FINISH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + } + else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) { +#ifdef HAVE_BZIP2 + err = BZ_FINISH_OK; + while (err==BZ_FINISH_OK) + { uLong uTotalOutBefore; - if (zi->ci.stream.avail_out == 0) + if (zi->ci.bstream.avail_out == 0) { - if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; } - uTotalOutBefore = zi->ci.stream.total_out; - err=deflate(&zi->ci.stream, Z_FINISH); - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + uTotalOutBefore = zi->ci.bstream.total_out_lo32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); + if(err == BZ_STREAM_END) + err = Z_STREAM_END; + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); + } + + if(err == BZ_FINISH_OK) + err = ZIP_OK; +#endif } if (err==Z_STREAM_END) err=ZIP_OK; /* this is normal */ if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) - if (zipFlushWriteBuffer(zi)==ZIP_ERRNO) + { + if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO) err = ZIP_ERRNO; + } if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) { - err=deflateEnd(&zi->ci.stream); + int tmp_err = deflateEnd(&zi->ci.stream); + if (err == ZIP_OK) + err = tmp_err; zi->ci.stream_initialised = 0; } +#ifdef HAVE_BZIP2 + else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { + int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); + if (err==ZIP_OK) + err = tmperr; + zi->ci.stream_initialised = 0; + } +#endif if (!zi->ci.raw) { crc32 = (uLong)zi->ci.crc32; - uncompressed_size = (uLong)zi->ci.stream.total_in; + uncompressed_size = zi->ci.totalUncompressedData; } - compressed_size = (uLong)zi->ci.stream.total_out; + compressed_size = zi->ci.totalCompressedData; + # ifndef NOCRYPT compressed_size += zi->ci.crypt_header_size; # endif - ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ - ziplocal_putValue_inmemory(zi->ci.central_header+20, - compressed_size,4); /*compr size*/ + // update Current Item crc and sizes, + if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff) + { + /*version Made by*/ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); + /*version needed*/ + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); + + } + + zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ + + + if(compressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ + + /// set internal file attributes field if (zi->ci.stream.data_type == Z_ASCII) - ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); - ziplocal_putValue_inmemory(zi->ci.central_header+24, - uncompressed_size,4); /*uncompr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); + + if(uncompressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ + + // Add ZIP64 extra info field for uncompressed size + if(uncompressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for compressed size + if(compressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for relative offset to local file header of current file + if(zi->ci.pos_local_header >= 0xffffffff) + datasize += 8; + + if(datasize > 0) + { + char* p = NULL; + + if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) + { + // we can not write more data to the buffer that we have room for. + return ZIP_BADZIPFILE; + } + + p = zi->ci.central_header + zi->ci.size_centralheader; + + // Add Extra Information Header for 'ZIP64 information' + zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID + p += 2; + zip64local_putValue_inmemory(p, datasize, 2); // DataSize + p += 2; + + if(uncompressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, uncompressed_size, 8); + p += 8; + } + + if(compressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, compressed_size, 8); + p += 8; + } + + if(zi->ci.pos_local_header >= 0xffffffff) + { + zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); + p += 8; + } + + // Update how much extra free space we got in the memory buffer + // and increase the centralheader size so the new ZIP64 fields are included + // ( 4 below is the size of HeaderID and DataSize field ) + zi->ci.size_centralExtraFree -= datasize + 4; + zi->ci.size_centralheader += datasize + 4; + + // Update the extra info size field + zi->ci.size_centralExtra += datasize + 4; + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); + } if (err==ZIP_OK) - err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header, - (uLong)zi->ci.size_centralheader); + err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader); + free(zi->ci.central_header); if (err==ZIP_OK) { - long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); - if (ZSEEK(zi->z_filefunc,zi->filestream, - zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) + // Update the LocalFileHeader with the new values. + + ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) err = ZIP_ERRNO; if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ - if (err==ZIP_OK) /* compressed size, unknown */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); + if(uncompressed_size >= 0xffffffff) + { + if(zi->ci.pos_zip64extrainfo > 0) + { + // Update the size in the ZIP64 extended field. + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8); + } + } + else + { + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); - if (err==ZIP_OK) /* uncompressed size, unknown */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); + } - if (ZSEEK(zi->z_filefunc,zi->filestream, - cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) + if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) err = ZIP_ERRNO; } @@ -1124,24 +1744,150 @@ extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32) return err; } -extern int ZEXPORT zipCloseFileInZip (file) - zipFile file; +extern int ZEXPORT zipCloseFileInZip (zipFile file) { return zipCloseFileInZipRaw (file,0,0); } -extern int ZEXPORT zipClose (file, global_comment) - zipFile file; - const char* global_comment; +int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) { - zip_internal* zi; + int err = ZIP_OK; + ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4); + + /*num disks*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + /*relative offset*/ + if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8); + + /*total disks*/ /* Do not support spawning of disk so always say 1 here*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4); + + return err; +} + +int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + uLong Zip64DataSize = 44; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ? + + if (err==ZIP_OK) /* version made by */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* version needed */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* total number of entries in the central dir */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8); + } + return err; +} +int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + /*signature*/ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + { + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + } + + if (err==ZIP_OK) /* total number of entries in the central dir */ + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + if(pos >= 0xffffffff) + { + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4); + } + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); + } + + return err; +} + +int Write_GlobalComment(zip64_internal* zi, const char* global_comment) +{ + int err = ZIP_OK; + uInt size_global_comment = 0; + + if(global_comment != NULL) + size_global_comment = (uInt)strlen(global_comment); + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); + + if (err == ZIP_OK && size_global_comment > 0) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) + err = ZIP_ERRNO; + } + return err; +} + +extern int ZEXPORT zipClose (zipFile file, const char* global_comment) +{ + zip64_internal* zi; int err = 0; uLong size_centraldir = 0; - uLong centraldir_pos_inzip; - uInt size_global_comment; + ZPOS64_T centraldir_pos_inzip; + ZPOS64_T pos; + if (file == NULL) return ZIP_PARAMERROR; - zi = (zip_internal*)file; + + zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 1) { @@ -1152,61 +1898,42 @@ extern int ZEXPORT zipClose (file, global_comment) if (global_comment==NULL) global_comment = zi->globalcomment; #endif - if (global_comment==NULL) - size_global_comment = 0; - else - size_global_comment = (uInt)strlen(global_comment); - centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); + centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + if (err==ZIP_OK) { - linkedlist_datablock_internal* ldi = zi->central_dir.first_block ; + linkedlist_datablock_internal* ldi = zi->central_dir.first_block; while (ldi!=NULL) { if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream, - ldi->data,ldi->filled_in_this_block) - !=ldi->filled_in_this_block ) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block) err = ZIP_ERRNO; + } size_centraldir += ldi->filled_in_this_block; ldi = ldi->next_datablock; } } - free_datablock(zi->central_dir.first_block); - - if (err==ZIP_OK) /* Magic End */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); - - if (err==ZIP_OK) /* number of this disk */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); - - if (err==ZIP_OK) /* number of the disk with the start of the central directory */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); - - if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + free_linkedlist(&(zi->central_dir)); - if (err==ZIP_OK) /* total number of entries in the central dir */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + if(pos >= 0xffffffff) + { + ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream); + Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); - if (err==ZIP_OK) /* size of the central directory */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); + Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos); + } - if (err==ZIP_OK) /* offset of start of central directory with respect to the - starting disk number */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream, - (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); + if (err==ZIP_OK) + err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); - if (err==ZIP_OK) /* zipfile comment length */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); + if(err == ZIP_OK) + err = Write_GlobalComment(zi, global_comment); - if ((err==ZIP_OK) && (size_global_comment>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream, - global_comment,size_global_comment) != size_global_comment) - err = ZIP_ERRNO; - - if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0) + if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0) if (err == ZIP_OK) err = ZIP_ERRNO; @@ -1217,3 +1944,61 @@ extern int ZEXPORT zipClose (file, global_comment) return err; } + +extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader) +{ + char* p = pData; + int size = 0; + char* pNewHeader; + char* pTmp; + short header; + short dataSize; + + int retVal = ZIP_OK; + + if(pData == NULL || *dataLen < 4) + return ZIP_PARAMERROR; + + pNewHeader = (char*)ALLOC(*dataLen); + pTmp = pNewHeader; + + while(p < (pData + *dataLen)) + { + header = *(short*)p; + dataSize = *(((short*)p)+1); + + if( header == sHeader ) // Header found. + { + p += dataSize + 4; // skip it. do not copy to temp buffer + } + else + { + // Extra Info block should not be removed, So copy it to the temp buffer. + memcpy(pTmp, p, dataSize + 4); + p += dataSize + 4; + size += dataSize + 4; + } + + } + + if(size < *dataLen) + { + // clean old extra info block. + memset(pData,0, *dataLen); + + // copy the new extra info block over the old + if(size > 0) + memcpy(pData, pNewHeader, size); + + // set the new extra info size + *dataLen = size; + + retVal = ZIP_OK; + } + else + retVal = ZIP_ERRNO; + + TRYFREE(pNewHeader); + + return retVal; +} diff --git a/compat/zlib/contrib/minizip/zip.h b/compat/zlib/contrib/minizip/zip.h index acacce8..8aaebb6 100644 --- a/compat/zlib/contrib/minizip/zip.h +++ b/compat/zlib/contrib/minizip/zip.h @@ -1,19 +1,15 @@ -/* zip.h -- IO for compress .zip files using zlib - Version 1.01e, February 12th, 2005 +/* zip.h -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - Copyright (C) 1998-2005 Gilles Vollant + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - This unzip package allow creates .ZIP file, compatible with PKZip 2.04g - WinZip, InfoZip tools and compatible. - Multi volume ZipFile (span) are not supported. - Encryption compatible with pkzip 2.04g only supported - Old compressions used by old PKZip 1.x are not supported + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For uncompress .zip file, look at unzip.h + For more info read MiniZip_info.txt - - I WAIT FEEDBACK at mail info@winimage.com - Visit also http://www.winimage.com/zLibDll/unzip.html for evolution + --------------------------------------------------------------------------- Condition of use and distribution are the same than zlib : @@ -33,23 +29,23 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. + --------------------------------------------------------------------------- -*/ + Changes + + See header of zip.h -/* for more info about .ZIP format, see - http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip - http://www.info-zip.org/pub/infozip/doc/ - PkWare has also a specification at : - ftp://ftp.pkware.com/probdesc.zip */ -#ifndef _zip_H -#define _zip_H +#ifndef _zip12_H +#define _zip12_H #ifdef __cplusplus extern "C" { #endif +//#define HAVE_BZIP2 + #ifndef _ZLIB_H #include "zlib.h" #endif @@ -58,6 +54,12 @@ extern "C" { #include "ioapi.h" #endif +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + #if defined(STRICTZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted from (void*) without cast */ @@ -112,6 +114,7 @@ typedef const char* zipcharpc; #define APPEND_STATUS_ADDINZIP (2) extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); +extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); /* Create a zipfile. pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on @@ -136,6 +139,11 @@ extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc_def)); +extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc64_def* pzlib_filefunc_def)); + extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, const char* filename, const zip_fileinfo* zipfi, @@ -146,6 +154,19 @@ extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, const char* comment, int method, int level)); + +extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int zip64)); + /* Open a file in the ZIP for writing. filename : the filename in zip (if NULL, '-' without quote will be used @@ -157,6 +178,9 @@ extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, if comment != NULL, comment contain the comment string method contain the compression method (0 for store, Z_DEFLATED for deflate) level contain the level of compression (can be Z_DEFAULT_COMPRESSION) + zip64 is set to 1 if a zip64 extended information block should be added to the local file header. + this MUST be '1' if the uncompressed size is >= 0xffffffff. + */ @@ -172,6 +196,19 @@ extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, int level, int raw)); + +extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int zip64)); /* Same than zipOpenNewFileInZip, except if raw=1, we write raw file */ @@ -191,13 +228,79 @@ extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, int memLevel, int strategy, const char* password, - uLong crcForCtypting)); + uLong crcForCrypting)); + +extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + int zip64 + )); /* Same than zipOpenNewFileInZip2, except windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 password : crypting password (NULL for no crypting) - crcForCtypting : crc of file to compress (needed for crypting) + crcForCrypting : crc of file to compress (needed for crypting) + */ + +extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase + )); + + +extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase, + int zip64 + )); +/* + Same than zipOpenNewFileInZip4, except + versionMadeBy : value for Version made by field + flag : value for flag field (compression level info will be added) */ @@ -216,8 +319,13 @@ extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, uLong uncompressed_size, uLong crc32)); + +extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file, + ZPOS64_T uncompressed_size, + uLong crc32)); + /* - Close the current file in the zipfile, for fiel opened with + Close the current file in the zipfile, for file opened with parameter raw=1 in zipOpenNewFileInZip2 uncompressed_size and crc32 are value for the uncompressed size */ @@ -228,8 +336,27 @@ extern int ZEXPORT zipClose OF((zipFile file, Close the zipfile */ + +extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader)); +/* + zipRemoveExtraInfoBlock - Added by Mathias Svensson + + Remove extra information block from a extra information data for the local file header or central directory header + + It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. + + 0x0001 is the signature header for the ZIP64 extra information blocks + + usage. + Remove ZIP64 Extra information from a central director extra field data + zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); + + Remove ZIP64 Extra information from a Local File Header extra field data + zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); +*/ + #ifdef __cplusplus } #endif -#endif /* _zip_H */ +#endif /* _zip64_H */ diff --git a/compat/zlib/contrib/pascal/zlibd32.mak b/compat/zlib/contrib/pascal/zlibd32.mak index 88fafa0..0d0699a 100644 --- a/compat/zlib/contrib/pascal/zlibd32.mak +++ b/compat/zlib/contrib/pascal/zlibd32.mak @@ -18,10 +18,10 @@ LDFLAGS = # variables ZLIB_LIB = zlib.lib -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj -OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj -OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj # targets @@ -38,7 +38,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -gzio.obj: gzio.c zutil.h zlib.h zconf.h +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ inffast.h inffixed.h diff --git a/compat/zlib/contrib/pascal/zlibpas.pas b/compat/zlib/contrib/pascal/zlibpas.pas index 836848c..dc7d37d 100644 --- a/compat/zlib/contrib/pascal/zlibpas.pas +++ b/compat/zlib/contrib/pascal/zlibpas.pas @@ -10,7 +10,7 @@ unit zlibpas; interface const - ZLIB_VERSION = '1.2.3'; + ZLIB_VERSION = '1.2.4'; type alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; diff --git a/compat/zlib/contrib/puff/puff.c b/compat/zlib/contrib/puff/puff.c index ce0cc40..df5b79f 100644 --- a/compat/zlib/contrib/puff/puff.c +++ b/compat/zlib/contrib/puff/puff.c @@ -1,8 +1,8 @@ /* * puff.c - * Copyright (C) 2002-2004 Mark Adler + * Copyright (C) 2002-2008 Mark Adler * For conditions of distribution and use, see copyright notice in puff.h - * version 1.8, 9 Jan 2004 + * version 2.0, 25 Jul 2008 * * puff.c is a simple inflate written to be an unambiguous way to specify the * deflate format. It is not written for speed but rather simplicity. As a @@ -61,6 +61,12 @@ * 1.7 3 Mar 2003 - Added test code for distribution * - Added zlib-like license * 1.8 9 Jan 2004 - Added some comments on no distance codes case + * 1.9 21 Feb 2008 - Fix bug on 16-bit integer architectures [Pohland] + * - Catch missing end-of-block symbol error + * 2.0 25 Jul 2008 - Add #define to permit distance too far back + * - Add option in TEST code for puff to write the data + * - Add option in TEST code to skip input bytes + * - Allow TEST code to read from piped stdin */ #include /* for setjmp(), longjmp(), and jmp_buf */ @@ -194,7 +200,7 @@ struct huffman { * Decode a code from the stream s using huffman table h. Return the symbol or * a negative value if there is an error. If all of the lengths are zero, i.e. * an empty code, or if the code is incomplete and an invalid code is received, - * then -9 is returned after reading MAXBITS bits. + * then -10 is returned after reading MAXBITS bits. * * Format notes: * @@ -226,14 +232,14 @@ local int decode(struct state *s, struct huffman *h) for (len = 1; len <= MAXBITS; len++) { code |= bits(s, 1); /* get next bit */ count = h->count[len]; - if (code < first + count) /* if length len, return symbol */ + if (code - count < first) /* if length len, return symbol */ return h->symbol[index + (code - first)]; index += count; /* else update for next length */ first += count; first <<= 1; code <<= 1; } - return -9; /* ran out of codes */ + return -10; /* ran out of codes */ } /* @@ -263,7 +269,7 @@ local int decode(struct state *s, struct huffman *h) code |= bitbuf & 1; bitbuf >>= 1; count = *next++; - if (code < first + count) { /* if length len, return symbol */ + if (code - count < first) { /* if length len, return symbol */ s->bitbuf = bitbuf; s->bitcnt = (s->bitcnt - len) & 7; return h->symbol[index + (code - first)]; @@ -280,7 +286,7 @@ local int decode(struct state *s, struct huffman *h) bitbuf = s->in[s->incnt++]; if (left > 8) left = 8; } - return -9; /* ran out of codes */ + return -10; /* ran out of codes */ } #endif /* SLOW */ @@ -448,21 +454,27 @@ local int codes(struct state *s, else if (symbol > 256) { /* length */ /* get and compute length */ symbol -= 257; - if (symbol >= 29) return -9; /* invalid fixed code */ + if (symbol >= 29) return -10; /* invalid fixed code */ len = lens[symbol] + bits(s, lext[symbol]); /* get and check distance */ symbol = decode(s, distcode); if (symbol < 0) return symbol; /* invalid symbol */ dist = dists[symbol] + bits(s, dext[symbol]); +#ifndef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR if (dist > s->outcnt) - return -10; /* distance too far back */ + return -11; /* distance too far back */ +#endif /* copy length bytes from distance bytes back */ if (s->out != NIL) { if (s->outcnt + len > s->outlen) return 1; while (len--) { - s->out[s->outcnt] = s->out[s->outcnt - dist]; + s->out[s->outcnt] = +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + dist > s->outcnt ? 0 : +#endif + s->out[s->outcnt - dist]; s->outcnt++; } } @@ -680,6 +692,10 @@ local int dynamic(struct state *s) } } + /* check for end-of-block code -- there better be one! */ + if (lengths[256] == 0) + return -9; + /* build huffman table for literal/length codes */ err = construct(&lencode, lengths, nlen); if (err < 0 || (err > 0 && nlen - lencode.count[0] != 1)) @@ -724,8 +740,9 @@ local int dynamic(struct state *s) * -6: dynamic block code description: repeat more than specified lengths * -7: dynamic block code description: invalid literal/length code lengths * -8: dynamic block code description: invalid distance code lengths - * -9: invalid literal/length or distance code in fixed or dynamic block - * -10: distance is too far back in fixed or dynamic block + * -9: dynamic block code description: missing end-of-block code + * -10: invalid literal/length or distance code in fixed or dynamic block + * -11: distance is too far back in fixed or dynamic block * * Format notes: * @@ -783,54 +800,142 @@ int puff(unsigned char *dest, /* pointer to destination pointer */ } #ifdef TEST -/* Example of how to use puff() */ +/* Examples of how to use puff(). + + Usage: puff [-w] [-nnn] file + ... | puff [-w] [-nnn] + + where file is the input file with deflate data, nnn is the number of bytes + of input to skip before inflating (e.g. to skip a zlib or gzip header), and + -w is used to write the decompressed data to stdout */ + #include #include -#include -#include -local unsigned char *yank(char *name, unsigned long *len) +/* Return size times approximately the cube root of 2, keeping the result as 1, + 3, or 5 times a power of 2 -- the result is always > size, until the result + is the maximum value of an unsigned long, where it remains. This is useful + to keep reallocations less than ~33% over the actual data. */ +local size_t bythirds(size_t size) { - unsigned long size; - unsigned char *buf; + int n; + size_t m; + + m = size; + for (n = 0; m; n++) + m >>= 1; + if (n < 3) + return size + 1; + n -= 3; + m = size >> n; + m += m == 6 ? 2 : 1; + m <<= n; + return m > size ? m : (size_t)(-1); +} + +/* Read the input file *name, or stdin if name is NULL, into allocated memory. + Reallocate to larger buffers until the entire file is read in. Return a + pointer to the allocated data, or NULL if there was a memory allocation + failure. *len is the number of bytes of data read from the input file (even + if load() returns NULL). If the input file was empty or could not be opened + or read, *len is zero. */ +local void *load(char *name, size_t *len) +{ + size_t size; + void *buf, *swap; FILE *in; - struct stat s; *len = 0; - if (stat(name, &s)) return NULL; - if ((s.st_mode & S_IFMT) != S_IFREG) return NULL; - size = (unsigned long)(s.st_size); - if (size == 0 || (off_t)size != s.st_size) return NULL; - in = fopen(name, "r"); - if (in == NULL) return NULL; - buf = malloc(size); - if (buf != NULL && fread(buf, 1, size, in) != size) { - free(buf); - buf = NULL; + buf = malloc(size = 4096); + if (buf == NULL) + return NULL; + in = name == NULL ? stdin : fopen(name, "rb"); + if (in != NULL) { + for (;;) { + *len += fread((char *)buf + *len, 1, size - *len, in); + if (*len < size) break; + size = bythirds(size); + if (size == *len || (swap = realloc(buf, size)) == NULL) { + free(buf); + buf = NULL; + break; + } + buf = swap; + } + fclose(in); } - fclose(in); - *len = size; return buf; } int main(int argc, char **argv) { - int ret; - unsigned char *source; - unsigned long len, sourcelen, destlen; - - if (argc < 2) return 2; - source = yank(argv[1], &len); - if (source == NULL) return 2; - sourcelen = len; - ret = puff(NIL, &destlen, source, &sourcelen); + int ret, skip = 0, put = 0; + char *arg, *name = NULL; + unsigned char *source = NULL, *dest; + size_t len = 0; + unsigned long sourcelen, destlen; + + /* process arguments */ + while (arg = *++argv, --argc) + if (arg[0] == '-') { + if (arg[1] == 'w' && arg[2] == 0) + put = 1; + else if (arg[1] >= '0' && arg[1] <= '9') + skip = atoi(arg + 1); + else { + fprintf(stderr, "invalid option %s\n", arg); + return 3; + } + } + else if (name != NULL) { + fprintf(stderr, "only one file name allowed\n"); + return 3; + } + else + name = arg; + source = load(name, &len); + if (source == NULL) { + fprintf(stderr, "memory allocation failure\n"); + return 4; + } + if (len == 0) { + fprintf(stderr, "could not read %s, or it was empty\n", + name == NULL ? "" : name); + free(source); + return 3; + } + if (skip >= len) { + fprintf(stderr, "skip request of %d leaves no input\n", skip); + free(source); + return 3; + } + + /* test inflate data with offset skip */ + len -= skip; + sourcelen = (unsigned long)len; + ret = puff(NIL, &destlen, source + skip, &sourcelen); if (ret) - printf("puff() failed with return code %d\n", ret); + fprintf(stderr, "puff() failed with return code %d\n", ret); else { - printf("puff() succeeded uncompressing %lu bytes\n", destlen); - if (sourcelen < len) printf("%lu compressed bytes unused\n", - len - sourcelen); + fprintf(stderr, "puff() succeeded uncompressing %lu bytes\n", destlen); + if (sourcelen < len) fprintf(stderr, "%lu compressed bytes unused\n", + len - sourcelen); } + + /* if requested, inflate again and write decompressd data to stdout */ + if (put) { + dest = malloc(destlen); + if (dest == NULL) { + fprintf(stderr, "memory allocation failure\n"); + free(source); + return 4; + } + puff(dest, &destlen, source + skip, &sourcelen); + fwrite(dest, 1, destlen, stdout); + free(dest); + } + + /* clean up */ free(source); return ret; } diff --git a/compat/zlib/contrib/puff/puff.h b/compat/zlib/contrib/puff/puff.h index ef61252..8d7f5f8 100644 --- a/compat/zlib/contrib/puff/puff.h +++ b/compat/zlib/contrib/puff/puff.h @@ -1,6 +1,6 @@ /* puff.h - Copyright (C) 2002, 2003 Mark Adler, all rights reserved - version 1.7, 3 Mar 2002 + Copyright (C) 2002-2008 Mark Adler, all rights reserved + version 1.9, 10 Jan 2008 This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages diff --git a/compat/zlib/contrib/testzlib/testzlib.c b/compat/zlib/contrib/testzlib/testzlib.c index e5574f4..f559a36 100644 --- a/compat/zlib/contrib/testzlib/testzlib.c +++ b/compat/zlib/contrib/testzlib/testzlib.c @@ -1,275 +1,275 @@ -#include -#include -#include - -#include "zlib.h" - - -void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B) -{ - R->HighPart = A.HighPart - B.HighPart; - if (A.LowPart >= B.LowPart) - R->LowPart = A.LowPart - B.LowPart; - else - { - R->LowPart = A.LowPart - B.LowPart; - R->HighPart --; - } -} - -#ifdef _M_X64 -// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc -unsigned __int64 __rdtsc(void); -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ - // printf("rdtsc = %I64x\n",__rdtsc()); - pbeginTime64->QuadPart=__rdtsc(); -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER LIres; - unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart)); - LIres.QuadPart=res; - // printf("rdtsc = %I64x\n",__rdtsc()); - return LIres; -} -#else -#ifdef _M_IX86 -void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) -{ - DWORD dwEdx,dwEax; - _asm - { - rdtsc - mov dwEax,eax - mov dwEdx,edx - } - pbeginTime64->LowPart=dwEax; - pbeginTime64->HighPart=dwEdx; -} - -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ - myGetRDTSC32(pbeginTime64); -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER LIres,endTime64; - myGetRDTSC32(&endTime64); - - LIres.LowPart=LIres.HighPart=0; - MyDoMinus64(&LIres,endTime64,beginTime64); - return LIres; -} -#else -void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) -{ -} - -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER lr; - lr.QuadPart=0; - return lr; -} -#endif -#endif - -void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf) -{ - if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64))) - { - pbeginTime64->LowPart = GetTickCount(); - pbeginTime64->HighPart = 0; - } -} - -DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER endTime64,ticksPerSecond,ticks; - DWORDLONG ticksShifted,tickSecShifted; - DWORD dwLog=16+0; - DWORD dwRet; - if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64))) - dwRet = (GetTickCount() - beginTime64.LowPart)*1; - else - { - MyDoMinus64(&ticks,endTime64,beginTime64); - QueryPerformanceFrequency(&ticksPerSecond); - - - { - ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog); - tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog); - - } - - dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted)); - dwRet *=1; - } - return dwRet; -} - -int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr) -{ - FILE* stream; - void* ptr; - int retVal=1; - stream=fopen(filename, "rb"); - if (stream==NULL) - return 0; - - fseek(stream,0,SEEK_END); - - *plFileSize=ftell(stream); - fseek(stream,0,SEEK_SET); - ptr=malloc((*plFileSize)+1); - if (ptr==NULL) - retVal=0; - else - { - if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize)) - retVal=0; - } - fclose(stream); - *pFilePtr=ptr; - return retVal; -} - -int main(int argc, char *argv[]) -{ - int BlockSizeCompress=0x8000; - int BlockSizeUncompress=0x8000; - int cprLevel=Z_DEFAULT_COMPRESSION ; - long lFileSize; - unsigned char* FilePtr; - long lBufferSizeCpr; - long lBufferSizeUncpr; - long lCompressedSize=0; - unsigned char* CprPtr; - unsigned char* UncprPtr; - long lSizeCpr,lSizeUncpr; - DWORD dwGetTick,dwMsecQP; - LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc; - - if (argc<=1) - { - printf("run TestZlib [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n"); - return 0; - } - - if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0) - { - printf("error reading %s\n",argv[1]); - return 1; - } - else printf("file %s read, %u bytes\n",argv[1],lFileSize); - - if (argc>=3) - BlockSizeCompress=atol(argv[2]); - - if (argc>=4) - BlockSizeUncompress=atol(argv[3]); - - if (argc>=5) - cprLevel=(int)atol(argv[4]); - - lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200; - lBufferSizeUncpr = lBufferSizeCpr; - - CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress); - - BeginCountPerfCounter(&li_qp,TRUE); - dwGetTick=GetTickCount(); - BeginCountRdtsc(&li_rdtsc); - { - z_stream zcpr; - int ret=Z_OK; - long lOrigToDo = lFileSize; - long lOrigDone = 0; - int step=0; - memset(&zcpr,0,sizeof(z_stream)); - deflateInit(&zcpr,cprLevel); - - zcpr.next_in = FilePtr; - zcpr.next_out = CprPtr; - - - do - { - long all_read_before = zcpr.total_in; - zcpr.avail_in = min(lOrigToDo,BlockSizeCompress); - zcpr.avail_out = BlockSizeCompress; - ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH); - lOrigDone += (zcpr.total_in-all_read_before); - lOrigToDo -= (zcpr.total_in-all_read_before); - step++; - } while (ret==Z_OK); - - lSizeCpr=zcpr.total_out; - deflateEnd(&zcpr); - dwGetTick=GetTickCount()-dwGetTick; - dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); - dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); - printf("total compress size = %u, in %u step\n",lSizeCpr,step); - printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); - printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); - printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); - } - - CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr); - UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress); - - BeginCountPerfCounter(&li_qp,TRUE); - dwGetTick=GetTickCount(); - BeginCountRdtsc(&li_rdtsc); - { - z_stream zcpr; - int ret=Z_OK; - long lOrigToDo = lSizeCpr; - long lOrigDone = 0; - int step=0; - memset(&zcpr,0,sizeof(z_stream)); - inflateInit(&zcpr); - - zcpr.next_in = CprPtr; - zcpr.next_out = UncprPtr; - - - do - { - long all_read_before = zcpr.total_in; - zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress); - zcpr.avail_out = BlockSizeUncompress; - ret=inflate(&zcpr,Z_SYNC_FLUSH); - lOrigDone += (zcpr.total_in-all_read_before); - lOrigToDo -= (zcpr.total_in-all_read_before); - step++; - } while (ret==Z_OK); - - lSizeUncpr=zcpr.total_out; - inflateEnd(&zcpr); - dwGetTick=GetTickCount()-dwGetTick; - dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); - dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); - printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step); - printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); - printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); - printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); - } - - if (lSizeUncpr==lFileSize) - { - if (memcmp(FilePtr,UncprPtr,lFileSize)==0) - printf("compare ok\n"); - - } - - return 0; -} +#include +#include +#include + +#include "zlib.h" + + +void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B) +{ + R->HighPart = A.HighPart - B.HighPart; + if (A.LowPart >= B.LowPart) + R->LowPart = A.LowPart - B.LowPart; + else + { + R->LowPart = A.LowPart - B.LowPart; + R->HighPart --; + } +} + +#ifdef _M_X64 +// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc +unsigned __int64 __rdtsc(void); +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + // printf("rdtsc = %I64x\n",__rdtsc()); + pbeginTime64->QuadPart=__rdtsc(); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres; + unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart)); + LIres.QuadPart=res; + // printf("rdtsc = %I64x\n",__rdtsc()); + return LIres; +} +#else +#ifdef _M_IX86 +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ + DWORD dwEdx,dwEax; + _asm + { + rdtsc + mov dwEax,eax + mov dwEdx,edx + } + pbeginTime64->LowPart=dwEax; + pbeginTime64->HighPart=dwEdx; +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + myGetRDTSC32(pbeginTime64); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres,endTime64; + myGetRDTSC32(&endTime64); + + LIres.LowPart=LIres.HighPart=0; + MyDoMinus64(&LIres,endTime64,beginTime64); + return LIres; +} +#else +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER lr; + lr.QuadPart=0; + return lr; +} +#endif +#endif + +void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf) +{ + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64))) + { + pbeginTime64->LowPart = GetTickCount(); + pbeginTime64->HighPart = 0; + } +} + +DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER endTime64,ticksPerSecond,ticks; + DWORDLONG ticksShifted,tickSecShifted; + DWORD dwLog=16+0; + DWORD dwRet; + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64))) + dwRet = (GetTickCount() - beginTime64.LowPart)*1; + else + { + MyDoMinus64(&ticks,endTime64,beginTime64); + QueryPerformanceFrequency(&ticksPerSecond); + + + { + ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog); + tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog); + + } + + dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted)); + dwRet *=1; + } + return dwRet; +} + +int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr) +{ + FILE* stream; + void* ptr; + int retVal=1; + stream=fopen(filename, "rb"); + if (stream==NULL) + return 0; + + fseek(stream,0,SEEK_END); + + *plFileSize=ftell(stream); + fseek(stream,0,SEEK_SET); + ptr=malloc((*plFileSize)+1); + if (ptr==NULL) + retVal=0; + else + { + if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize)) + retVal=0; + } + fclose(stream); + *pFilePtr=ptr; + return retVal; +} + +int main(int argc, char *argv[]) +{ + int BlockSizeCompress=0x8000; + int BlockSizeUncompress=0x8000; + int cprLevel=Z_DEFAULT_COMPRESSION ; + long lFileSize; + unsigned char* FilePtr; + long lBufferSizeCpr; + long lBufferSizeUncpr; + long lCompressedSize=0; + unsigned char* CprPtr; + unsigned char* UncprPtr; + long lSizeCpr,lSizeUncpr; + DWORD dwGetTick,dwMsecQP; + LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc; + + if (argc<=1) + { + printf("run TestZlib [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n"); + return 0; + } + + if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0) + { + printf("error reading %s\n",argv[1]); + return 1; + } + else printf("file %s read, %u bytes\n",argv[1],lFileSize); + + if (argc>=3) + BlockSizeCompress=atol(argv[2]); + + if (argc>=4) + BlockSizeUncompress=atol(argv[3]); + + if (argc>=5) + cprLevel=(int)atol(argv[4]); + + lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200; + lBufferSizeUncpr = lBufferSizeCpr; + + CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lFileSize; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + deflateInit(&zcpr,cprLevel); + + zcpr.next_in = FilePtr; + zcpr.next_out = CprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeCompress); + zcpr.avail_out = BlockSizeCompress; + ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeCpr=zcpr.total_out; + deflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total compress size = %u, in %u step\n",lSizeCpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr); + UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lSizeCpr; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + inflateInit(&zcpr); + + zcpr.next_in = CprPtr; + zcpr.next_out = UncprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress); + zcpr.avail_out = BlockSizeUncompress; + ret=inflate(&zcpr,Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeUncpr=zcpr.total_out; + inflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + if (lSizeUncpr==lFileSize) + { + if (memcmp(FilePtr,UncprPtr,lFileSize)==0) + printf("compare ok\n"); + + } + + return 0; +} diff --git a/compat/zlib/contrib/testzlib/testzlib.txt b/compat/zlib/contrib/testzlib/testzlib.txt index 62258f1..e508bb2 100644 --- a/compat/zlib/contrib/testzlib/testzlib.txt +++ b/compat/zlib/contrib/testzlib/testzlib.txt @@ -1,10 +1,10 @@ -To build testzLib with Visual Studio 2005: - -copy to a directory file from : -- root of zLib tree -- contrib/testzlib -- contrib/masmx86 -- contrib/masmx64 -- contrib/vstudio/vc7 - +To build testzLib with Visual Studio 2005: + +copy to a directory file from : +- root of zLib tree +- contrib/testzlib +- contrib/masmx86 +- contrib/masmx64 +- contrib/vstudio/vc7 + and open testzlib8.sln \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/readme.txt b/compat/zlib/contrib/vstudio/readme.txt index 16159f9..ebe13bf 100644 --- a/compat/zlib/contrib/vstudio/readme.txt +++ b/compat/zlib/contrib/vstudio/readme.txt @@ -1,73 +1,60 @@ -Building instructions for the DLL versions of Zlib 1.2.3 -======================================================== - -This directory contains projects that build zlib and minizip using -Microsoft Visual C++ 7.0/7.1, and Visual C++ . - -You don't need to build these projects yourself. You can download the -binaries from: - http://www.winimage.com/zLibDll - -More information can be found at this site. - - -Build instructions for Visual Studio 7.x (32 bits) --------------------------------------------------- -- Uncompress current zlib, including all contrib/* files -- Download the crtdll library from - http://www.winimage.com/zLibDll/crtdll.zip - Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc7. -- Open contrib\vstudio\vc7\zlibvc.sln with Microsoft Visual C++ 7.x - (Visual Studio .Net 2002 or 2003). - -Build instructions for Visual Studio 2005 (32 bits or 64 bits) --------------------------------------------------------------- -- Uncompress current zlib, including all contrib/* files -- For 32 bits only: download the crtdll library from - http://www.winimage.com/zLibDll/crtdll.zip - Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc8. -- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0 - -Build instructions for Visual Studio 2005 64 bits, PSDK compiler ----------------------------------------------------------------- -at the time of writing this text file, Visual Studio 2005 (and - Microsoft Visual C++ 8.0) is on the beta 2 stage. -Using you can get the free 64 bits compiler from Platform SDK, - which is NOT a beta, and compile using the Visual studio 2005 IDE -see http://www.winimage.com/misc/sdk64onvs2005/ for instruction - -- Uncompress current zlib, including all contrib/* files -- start Visual Studio 2005 from a platform SDK command prompt, using - the /useenv switch -- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0 - - -Important ---------- -- To use zlibwapi.dll in your application, you must define the - macro ZLIB_WINAPI when compiling your application's source files. - - -Additional notes ----------------- -- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built - by Gilles Vollant from the zlib 1.1.x sources, and distributed at - http://www.winimage.com/zLibDll - It uses the WINAPI calling convention for the exported functions, and - includes the minizip functionality. If your application needs that - particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. - -- The new DLL was renamed because there exist several incompatible - versions of zlib.dll on the Internet. - -- There is also an official DLL build of zlib, named zlib1.dll. This one - is exporting the functions using the CDECL convention. See the file - win32\DLL_FAQ.txt found in this zlib distribution. - -- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol - has a slightly different effect. To avoid compatibility problems, do - not define it here. - - -Gilles Vollant -info@winimage.com +Building instructions for the DLL versions of Zlib 1.2.4 +======================================================== + +This directory contains projects that build zlib and minizip using +Microsoft Visual C++ 9.0/10.0, and Visual C++ . + +You don't need to build these projects yourself. You can download the +binaries from: + http://www.winimage.com/zLibDll + +More information can be found at this site. + +first compile assembly code by running +bld_ml64.bat in contrib\masmx64 +bld_ml32.bat in contrib\masmx86 + + + + +Build instructions for Visual Studio 2008 (32 bits or 64 bits) +-------------------------------------------------------------- +- Uncompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008.0 +- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" + +Build instructions for Visual Studio 2010 (32 bits or 64 bits) +-------------------------------------------------------------- +- Uncompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010.0 + + +Important +--------- +- To use zlibwapi.dll in your application, you must define the + macro ZLIB_WINAPI when compiling your application's source files. + + +Additional notes +---------------- +- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built + by Gilles Vollant from the zlib 1.1.x sources, and distributed at + http://www.winimage.com/zLibDll + It uses the WINAPI calling convention for the exported functions, and + includes the minizip functionality. If your application needs that + particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. + +- The new DLL was renamed because there exist several incompatible + versions of zlib.dll on the Internet. + +- There is also an official DLL build of zlib, named zlib1.dll. This one + is exporting the functions using the CDECL convention. See the file + win32\DLL_FAQ.txt found in this zlib distribution. + +- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol + has a slightly different effect. To avoid compatibility problems, do + not define it here. + + +Gilles Vollant +info@winimage.com diff --git a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj new file mode 100644 index 0000000..1b36242 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj @@ -0,0 +1,310 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694382A} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + true + false + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + true + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + true + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + false + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters new file mode 100644 index 0000000..0bd1221 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {048af943-022b-4db6-beeb-a54c34774ee2} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} + h;hpp;hxx;hm;inl;inc + + + {0844199a-966b-4f19-81db-1e0125e141b9} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj new file mode 100644 index 0000000..ccd3651 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj @@ -0,0 +1,307 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + true + false + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + false + x64\$(Configuration)\ + x64\$(Configuration)\ + true + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + true + false + x64\$(Configuration)\ + x64\$(Configuration)\ + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters new file mode 100644 index 0000000..7076d76 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {c0419b40-bf50-40da-b153-ff74215b79de} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {bb87b070-735b-478e-92ce-7383abb2f36c} + h;hpp;hxx;hm;inl;inc + + + {f46ab6a6-548f-43cb-ae96-681abb5bd5db} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj new file mode 100644 index 0000000..476b8ea --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj @@ -0,0 +1,420 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} + testzlib + Win32Proj + + + + Application + MultiByte + true + + + Application + MultiByte + true + + + Application + MultiByte + + + Application + MultiByte + true + + + Application + MultiByte + true + + + Application + MultiByte + + + Application + true + + + Application + true + + + Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + true + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + true + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + EditAndContinue + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters new file mode 100644 index 0000000..3276491 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters @@ -0,0 +1,58 @@ + + + + + {c1f6a2e3-5da5-4955-8653-310d3efe05a9} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {c2aaffdc-2c95-4d6f-8466-4bec5890af2c} + h;hpp;hxx;hm;inl;inc + + + {c274fe07-05f2-461c-964b-f6341e4e7eb5} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj new file mode 100644 index 0000000..c6e453b --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj @@ -0,0 +1,310 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694366A} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + true + false + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + true + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + true + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + false + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters new file mode 100644 index 0000000..ab87f09 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {fa61a89f-93fc-4c89-b29e-36224b7592f4} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {d4b85da0-2ba2-4934-b57f-e2584e3848ee} + h;hpp;hxx;hm;inl;inc + + + {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlib.rc b/compat/zlib/contrib/vstudio/vc10/zlib.rc new file mode 100644 index 0000000..f27ffb6 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1,2,4,0 + PRODUCTVERSION 1,2,4,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.4.0\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlib.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj new file mode 100644 index 0000000..9382021 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj @@ -0,0 +1,457 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDebug + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters new file mode 100644 index 0000000..0c8b250 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters @@ -0,0 +1,77 @@ + + + + + {174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + + + Source Files + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.def b/compat/zlib/contrib/vstudio/vc10/zlibvc.def new file mode 100644 index 0000000..fa171ae --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.def @@ -0,0 +1,130 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.24 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.sln b/compat/zlib/contrib/vstudio/vc10/zlibvc.sln new file mode 100644 index 0000000..649f40c --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.sln @@ -0,0 +1,135 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj new file mode 100644 index 0000000..9bb4c63 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj @@ -0,0 +1,659 @@ + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + true + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + true + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + true + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + + + MultiThreadedDebug + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters new file mode 100644 index 0000000..2278682 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters @@ -0,0 +1,118 @@ + + + + + {07934a85-8b61-443d-a0ee-b2eedb74f3cd} + cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 + + + {1d99675b-433d-4a21-9e50-ed4ab8b19762} + h;hpp;hxx;hm;inl;fi;fd + + + {431c0958-fa71-44d0-9084-2d19d100c0cc} + ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc9/miniunz.vcproj b/compat/zlib/contrib/vstudio/vc9/miniunz.vcproj new file mode 100644 index 0000000..038a9e5 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/miniunz.vcproj @@ -0,0 +1,565 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/minizip.vcproj b/compat/zlib/contrib/vstudio/vc9/minizip.vcproj new file mode 100644 index 0000000..ad40239 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/minizip.vcproj @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/testzlib.vcproj b/compat/zlib/contrib/vstudio/vc9/testzlib.vcproj new file mode 100644 index 0000000..c9f19d2 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/testzlib.vcproj @@ -0,0 +1,852 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj b/compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj new file mode 100644 index 0000000..d7530fd --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj @@ -0,0 +1,565 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/zlib.rc b/compat/zlib/contrib/vstudio/vc9/zlib.rc new file mode 100644 index 0000000..f27ffb6 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/zlib.rc @@ -0,0 +1,32 @@ +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1,2,4,0 + PRODUCTVERSION 1,2,4,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.4.0\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlib.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj b/compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj new file mode 100644 index 0000000..d4ffb46 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj @@ -0,0 +1,835 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/zlibvc.def b/compat/zlib/contrib/vstudio/vc9/zlibvc.def new file mode 100644 index 0000000..fa171ae --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/zlibvc.def @@ -0,0 +1,130 @@ +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.24 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 diff --git a/compat/zlib/contrib/vstudio/vc9/zlibvc.sln b/compat/zlib/contrib/vstudio/vc9/zlibvc.sln new file mode 100644 index 0000000..75c64c3 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/zlibvc.sln @@ -0,0 +1,144 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj b/compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj new file mode 100644 index 0000000..95bb241 --- /dev/null +++ b/compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj @@ -0,0 +1,1156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/crc32.c b/compat/zlib/crc32.c index 667cd15..aba512c 100644 --- a/compat/zlib/crc32.c +++ b/compat/zlib/crc32.c @@ -1,5 +1,5 @@ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2006 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster @@ -9,7 +9,7 @@ * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. */ -/* @(#) $Id: crc32.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: crc32.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ /* Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore @@ -53,7 +53,7 @@ /* Definitions for doing the crc four data bytes at a time. */ #ifdef BYFOUR -# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \ +# define REV(w) ((((w)>>24)&0xff)+(((w)>>8)&0xff00)+ \ (((w)&0xff00)<<8)+(((w)&0xff)<<24)) local unsigned long crc32_little OF((unsigned long, const unsigned char FAR *, unsigned)); @@ -68,6 +68,8 @@ local unsigned long gf2_matrix_times OF((unsigned long *mat, unsigned long vec)); local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat)); +local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2); + #ifdef DYNAMIC_CRC_TABLE @@ -367,22 +369,22 @@ local void gf2_matrix_square(square, mat) } /* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) +local uLong crc32_combine_(crc1, crc2, len2) uLong crc1; uLong crc2; - z_off_t len2; + z_off64_t len2; { int n; unsigned long row; unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */ unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */ - /* degenerate case */ - if (len2 == 0) + /* degenerate case (also disallow negative lengths) */ + if (len2 <= 0) return crc1; /* put operator for one zero bit in odd */ - odd[0] = 0xedb88320L; /* CRC-32 polynomial */ + odd[0] = 0xedb88320UL; /* CRC-32 polynomial */ row = 1; for (n = 1; n < GF2_DIM; n++) { odd[n] = row; @@ -421,3 +423,20 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2) crc1 ^= crc2; return crc1; } + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} + +uLong ZEXPORT crc32_combine64(crc1, crc2, len2) + uLong crc1; + uLong crc2; + z_off64_t len2; +{ + return crc32_combine_(crc1, crc2, len2); +} diff --git a/compat/zlib/deflate.c b/compat/zlib/deflate.c index fbc07d8..1501917 100644 --- a/compat/zlib/deflate.c +++ b/compat/zlib/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -47,12 +47,12 @@ * */ -/* @(#) $Id: deflate.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: deflate.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly "; + " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -79,19 +79,18 @@ local block_state deflate_fast OF((deflate_state *s, int flush)); #ifndef FASTEST local block_state deflate_slow OF((deflate_state *s, int flush)); #endif +local block_state deflate_rle OF((deflate_state *s, int flush)); +local block_state deflate_huff OF((deflate_state *s, int flush)); local void lm_init OF((deflate_state *s)); local void putShortMSB OF((deflate_state *s, uInt b)); local void flush_pending OF((z_streamp strm)); local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifndef FASTEST #ifdef ASMV void match_init OF((void)); /* asm code initialization */ uInt longest_match OF((deflate_state *s, IPos cur_match)); #else local uInt longest_match OF((deflate_state *s, IPos cur_match)); #endif -#endif -local uInt longest_match_fast OF((deflate_state *s, IPos cur_match)); #ifdef DEBUG local void check_match OF((deflate_state *s, IPos start, IPos match, @@ -110,11 +109,6 @@ local void check_match OF((deflate_state *s, IPos start, IPos match, #endif /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - /* Values for max_lazy_match, good_match and max_chain_length, depending on * the desired pack level (0..9). The values given below have been tuned to * exclude worst case performance for pathological files. Better values may be @@ -288,6 +282,8 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + s->high_water = 0; /* nothing written to s->window yet */ + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); @@ -332,8 +328,8 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) strm->adler = adler32(strm->adler, dictionary, dictLength); if (length < MIN_MATCH) return Z_OK; - if (length > MAX_DIST(s)) { - length = MAX_DIST(s); + if (length > s->w_size) { + length = s->w_size; dictionary += dictLength - length; /* use the tail of the dictionary */ } zmemcpy(s->window, dictionary, length); @@ -435,9 +431,10 @@ int ZEXPORT deflateParams(strm, level, strategy) } func = configuration_table[s->level].func; - if (func != configuration_table[level].func && strm->total_in != 0) { + if ((strategy != s->strategy || func != configuration_table[level].func) && + strm->total_in != 0) { /* Flush the last buffer: */ - err = deflate(strm, Z_PARTIAL_FLUSH); + err = deflate(strm, Z_BLOCK); } if (s->level != level) { s->level = level; @@ -481,33 +478,66 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) * resulting from using fixed blocks instead of stored blocks, which deflate * can emit on compressed data for some combinations of the parameters. * - * This function could be more sophisticated to provide closer upper bounds - * for every combination of windowBits and memLevel, as well as wrap. - * But even the conservative upper bound of about 14% expansion does not - * seem onerous for output buffer allocation. + * This function could be more sophisticated to provide closer upper bounds for + * every combination of windowBits and memLevel. But even the conservative + * upper bound of about 14% expansion does not seem onerous for output buffer + * allocation. */ uLong ZEXPORT deflateBound(strm, sourceLen) z_streamp strm; uLong sourceLen; { deflate_state *s; - uLong destLen; + uLong complen, wraplen; + Bytef *str; - /* conservative upper bound */ - destLen = sourceLen + - ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11; + /* conservative upper bound for compressed data */ + complen = sourceLen + + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; - /* if can't get parameters, return conservative bound */ + /* if can't get parameters, return conservative bound plus zlib wrapper */ if (strm == Z_NULL || strm->state == Z_NULL) - return destLen; + return complen + 6; - /* if not default parameters, return conservative bound */ + /* compute wrapper length */ s = strm->state; + switch (s->wrap) { + case 0: /* raw deflate */ + wraplen = 0; + break; + case 1: /* zlib wrapper */ + wraplen = 6 + (s->strstart ? 4 : 0); + break; + case 2: /* gzip wrapper */ + wraplen = 18; + if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ + if (s->gzhead->extra != Z_NULL) + wraplen += 2 + s->gzhead->extra_len; + str = s->gzhead->name; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + str = s->gzhead->comment; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + if (s->gzhead->hcrc) + wraplen += 2; + } + break; + default: /* for compiler happiness */ + wraplen = 6; + } + + /* if not default parameters, return conservative bound */ if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return destLen; + return complen + wraplen; /* default settings: return tight bound for that case */ - return compressBound(sourceLen); + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13 - 6 + wraplen; } /* ========================================================================= @@ -557,7 +587,7 @@ int ZEXPORT deflate (strm, flush) deflate_state *s; if (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_FINISH || flush < 0) { + flush > Z_BLOCK || flush < 0) { return Z_STREAM_ERROR; } s = strm->state; @@ -581,7 +611,7 @@ int ZEXPORT deflate (strm, flush) put_byte(s, 31); put_byte(s, 139); put_byte(s, 8); - if (s->gzhead == NULL) { + if (s->gzhead == Z_NULL) { put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); @@ -608,7 +638,7 @@ int ZEXPORT deflate (strm, flush) (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? 4 : 0)); put_byte(s, s->gzhead->os & 0xff); - if (s->gzhead->extra != NULL) { + if (s->gzhead->extra != Z_NULL) { put_byte(s, s->gzhead->extra_len & 0xff); put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); } @@ -650,7 +680,7 @@ int ZEXPORT deflate (strm, flush) } #ifdef GZIP if (s->status == EXTRA_STATE) { - if (s->gzhead->extra != NULL) { + if (s->gzhead->extra != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ while (s->gzindex < (s->gzhead->extra_len & 0xffff)) { @@ -678,7 +708,7 @@ int ZEXPORT deflate (strm, flush) s->status = NAME_STATE; } if (s->status == NAME_STATE) { - if (s->gzhead->name != NULL) { + if (s->gzhead->name != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ int val; @@ -709,7 +739,7 @@ int ZEXPORT deflate (strm, flush) s->status = COMMENT_STATE; } if (s->status == COMMENT_STATE) { - if (s->gzhead->comment != NULL) { + if (s->gzhead->comment != Z_NULL) { uInt beg = s->pending; /* start of bytes to update crc */ int val; @@ -787,7 +817,9 @@ int ZEXPORT deflate (strm, flush) (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { block_state bstate; - bstate = (*(configuration_table[s->level].func))(s, flush); + bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : + (s->strategy == Z_RLE ? deflate_rle(s, flush) : + (*(configuration_table[s->level].func))(s, flush)); if (bstate == finish_started || bstate == finish_done) { s->status = FINISH_STATE; @@ -808,13 +840,17 @@ int ZEXPORT deflate (strm, flush) if (bstate == block_done) { if (flush == Z_PARTIAL_FLUSH) { _tr_align(s); - } else { /* FULL_FLUSH or SYNC_FLUSH */ + } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ _tr_stored_block(s, (char*)0, 0L, 0); /* For a full flush, this empty block will be recognized * as a special marker by inflate_sync(). */ if (flush == Z_FULL_FLUSH) { CLEAR_HASH(s); /* forget history */ + if (s->lookahead == 0) { + s->strstart = 0; + s->block_start = 0L; + } } } flush_pending(strm); @@ -1167,12 +1203,13 @@ local uInt longest_match(s, cur_match) return s->lookahead; } #endif /* ASMV */ -#endif /* FASTEST */ + +#else /* FASTEST */ /* --------------------------------------------------------------------------- - * Optimized version for level == 1 or strategy == Z_RLE only + * Optimized version for FASTEST only */ -local uInt longest_match_fast(s, cur_match) +local uInt longest_match(s, cur_match) deflate_state *s; IPos cur_match; /* current match */ { @@ -1225,6 +1262,8 @@ local uInt longest_match_fast(s, cur_match) return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; } +#endif /* FASTEST */ + #ifdef DEBUG /* =========================================================================== * Check that the match at match_start is indeed a match. @@ -1303,7 +1342,6 @@ local void fill_window(s) later. (Using level 0 permanently is not an optimal usage of zlib, so we don't care about this pathological case.) */ - /* %%% avoid this when Z_RLE */ n = s->hash_size; p = &s->head[n]; do { @@ -1355,27 +1393,61 @@ local void fill_window(s) */ } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ + if (s->high_water < s->window_size) { + ulg curr = s->strstart + (ulg)(s->lookahead); + ulg init; + + if (s->high_water < curr) { + /* Previous high water mark below current data -- zero WIN_INIT + * bytes or up to end of window, whichever is less. + */ + init = s->window_size - curr; + if (init > WIN_INIT) + init = WIN_INIT; + zmemzero(s->window + curr, (unsigned)init); + s->high_water = curr + init; + } + else if (s->high_water < (ulg)curr + WIN_INIT) { + /* High water mark at or above current data, but below current data + * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up + * to end of window, whichever is less. + */ + init = (ulg)curr + WIN_INIT - s->high_water; + if (init > s->window_size - s->high_water) + init = s->window_size - s->high_water; + zmemzero(s->window + s->high_water, (unsigned)init); + s->high_water += init; + } + } } /* =========================================================================== * Flush the current block, with given end-of-file flag. * IN assertion: strstart is set to the end of the current match. */ -#define FLUSH_BLOCK_ONLY(s, eof) { \ +#define FLUSH_BLOCK_ONLY(s, last) { \ _tr_flush_block(s, (s->block_start >= 0L ? \ (charf *)&s->window[(unsigned)s->block_start] : \ (charf *)Z_NULL), \ (ulg)((long)s->strstart - s->block_start), \ - (eof)); \ + (last)); \ s->block_start = s->strstart; \ flush_pending(s->strm); \ Tracev((stderr,"[FLUSH]")); \ } /* Same but force premature exit if necessary. */ -#define FLUSH_BLOCK(s, eof) { \ - FLUSH_BLOCK_ONLY(s, eof); \ - if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \ +#define FLUSH_BLOCK(s, last) { \ + FLUSH_BLOCK_ONLY(s, last); \ + if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ } /* =========================================================================== @@ -1449,7 +1521,7 @@ local block_state deflate_fast(s, flush) deflate_state *s; int flush; { - IPos hash_head = NIL; /* head of the hash chain */ + IPos hash_head; /* head of the hash chain */ int bflush; /* set if current block must be flushed */ for (;;) { @@ -1469,6 +1541,7 @@ local block_state deflate_fast(s, flush) /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ + hash_head = NIL; if (s->lookahead >= MIN_MATCH) { INSERT_STRING(s, s->strstart, hash_head); } @@ -1481,19 +1554,8 @@ local block_state deflate_fast(s, flush) * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ -#ifdef FASTEST - if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) || - (s->strategy == Z_RLE && s->strstart - hash_head == 1)) { - s->match_length = longest_match_fast (s, hash_head); - } -#else - if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { - s->match_length = longest_match (s, hash_head); - } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { - s->match_length = longest_match_fast (s, hash_head); - } -#endif - /* longest_match() or longest_match_fast() sets match_start */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ } if (s->match_length >= MIN_MATCH) { check_match(s, s->strstart, s->match_start, s->match_length); @@ -1555,7 +1617,7 @@ local block_state deflate_slow(s, flush) deflate_state *s; int flush; { - IPos hash_head = NIL; /* head of hash chain */ + IPos hash_head; /* head of hash chain */ int bflush; /* set if current block must be flushed */ /* Process the input block. */ @@ -1576,6 +1638,7 @@ local block_state deflate_slow(s, flush) /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ + hash_head = NIL; if (s->lookahead >= MIN_MATCH) { INSERT_STRING(s, s->strstart, hash_head); } @@ -1591,12 +1654,8 @@ local block_state deflate_slow(s, flush) * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ - if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) { - s->match_length = longest_match (s, hash_head); - } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) { - s->match_length = longest_match_fast (s, hash_head); - } - /* longest_match() or longest_match_fast() sets match_start */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ if (s->match_length <= 5 && (s->strategy == Z_FILTERED #if TOO_FAR <= 32767 @@ -1674,7 +1733,6 @@ local block_state deflate_slow(s, flush) } #endif /* FASTEST */ -#if 0 /* =========================================================================== * For Z_RLE, simply look for runs of bytes, generate matches only of distance * one. Do not maintain a hash table. (It will be regenerated if this run of @@ -1684,11 +1742,9 @@ local block_state deflate_rle(s, flush) deflate_state *s; int flush; { - int bflush; /* set if current block must be flushed */ - uInt run; /* length of run */ - uInt max; /* maximum length of run */ - uInt prev; /* byte at distance one to match */ - Bytef *scan; /* scan for end of run */ + int bflush; /* set if current block must be flushed */ + uInt prev; /* byte at distance one to match */ + Bytef *scan, *strend; /* scan goes up to strend for length of run */ for (;;) { /* Make sure that we always have enough lookahead, except @@ -1704,23 +1760,33 @@ local block_state deflate_rle(s, flush) } /* See how many times the previous byte repeats */ - run = 0; - if (s->strstart > 0) { /* if there is a previous byte, that is */ - max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH; + s->match_length = 0; + if (s->lookahead >= MIN_MATCH && s->strstart > 0) { scan = s->window + s->strstart - 1; - prev = *scan++; - do { - if (*scan++ != prev) - break; - } while (++run < max); + prev = *scan; + if (prev == *++scan && prev == *++scan && prev == *++scan) { + strend = s->window + s->strstart + MAX_MATCH; + do { + } while (prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + scan < strend); + s->match_length = MAX_MATCH - (int)(strend - scan); + if (s->match_length > s->lookahead) + s->match_length = s->lookahead; + } } /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (run >= MIN_MATCH) { - check_match(s, s->strstart, s->strstart - 1, run); - _tr_tally_dist(s, 1, run - MIN_MATCH, bflush); - s->lookahead -= run; - s->strstart += run; + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->strstart - 1, s->match_length); + + _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + s->strstart += s->match_length; + s->match_length = 0; } else { /* No match, output a literal byte */ Tracevv((stderr,"%c", s->window[s->strstart])); @@ -1733,4 +1799,36 @@ local block_state deflate_rle(s, flush) FLUSH_BLOCK(s, flush == Z_FINISH); return flush == Z_FINISH ? finish_done : block_done; } -#endif + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +local block_state deflate_huff(s, flush) + deflate_state *s; + int flush; +{ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s->lookahead == 0) { + fill_window(s); + if (s->lookahead == 0) { + if (flush == Z_NO_FLUSH) + return need_more; + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s->match_length = 0; + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + if (bflush) FLUSH_BLOCK(s, 0); + } + FLUSH_BLOCK(s, flush == Z_FINISH); + return flush == Z_FINISH ? finish_done : block_done; +} diff --git a/compat/zlib/deflate.h b/compat/zlib/deflate.h index c64eb02..bae0d4c 100644 --- a/compat/zlib/deflate.h +++ b/compat/zlib/deflate.h @@ -1,5 +1,5 @@ /* deflate.h -- internal compression state - * Copyright (C) 1995-2004 Jean-loup Gailly + * Copyright (C) 1995-2009 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,7 +8,7 @@ subject to change. Applications should only use zlib.h. */ -/* @(#) $Id: deflate.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: deflate.h,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ #ifndef DEFLATE_H #define DEFLATE_H @@ -260,6 +260,13 @@ typedef struct internal_state { * are always zero. */ + ulg high_water; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ + } FAR deflate_state; /* Output a byte on the stream. @@ -278,14 +285,18 @@ typedef struct internal_state { * distances are limited to MAX_DIST instead of WSIZE. */ +#define WIN_INIT MAX_MATCH +/* Number of bytes after end of data in window to initialize in order to avoid + memory checker errors from longest match routines */ + /* in trees.c */ void _tr_init OF((deflate_state *s)); int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); + int last)); void _tr_align OF((deflate_state *s)); void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); + int last)); #define d_code(dist) \ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) diff --git a/compat/zlib/doc/algorithm.txt b/compat/zlib/doc/algorithm.txt new file mode 100644 index 0000000..34960bd --- /dev/null +++ b/compat/zlib/doc/algorithm.txt @@ -0,0 +1,209 @@ +1. Compression algorithm (deflate) + +The deflation algorithm used by gzip (also zip and zlib) is a variation of +LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in +the input data. The second occurrence of a string is replaced by a +pointer to the previous string, in the form of a pair (distance, +length). Distances are limited to 32K bytes, and lengths are limited +to 258 bytes. When a string does not occur anywhere in the previous +32K bytes, it is emitted as a sequence of literal bytes. (In this +description, `string' must be taken as an arbitrary sequence of bytes, +and is not restricted to printable characters.) + +Literals or match lengths are compressed with one Huffman tree, and +match distances are compressed with another tree. The trees are stored +in a compact form at the start of each block. The blocks can have any +size (except that the compressed data for one block must fit in +available memory). A block is terminated when deflate() determines that +it would be useful to start another block with fresh trees. (This is +somewhat similar to the behavior of LZW-based _compress_.) + +Duplicated strings are found using a hash table. All input strings of +length 3 are inserted in the hash table. A hash index is computed for +the next 3 bytes. If the hash chain for this index is not empty, all +strings in the chain are compared with the current input string, and +the longest match is selected. + +The hash chains are searched starting with the most recent strings, to +favor small distances and thus take advantage of the Huffman encoding. +The hash chains are singly linked. There are no deletions from the +hash chains, the algorithm simply discards matches that are too old. + +To avoid a worst-case situation, very long hash chains are arbitrarily +truncated at a certain length, determined by a runtime option (level +parameter of deflateInit). So deflate() does not always find the longest +possible match but generally finds a match which is long enough. + +deflate() also defers the selection of matches with a lazy evaluation +mechanism. After a match of length N has been found, deflate() searches for +a longer match at the next input byte. If a longer match is found, the +previous match is truncated to a length of one (thus producing a single +literal byte) and the process of lazy evaluation begins again. Otherwise, +the original match is kept, and the next match search is attempted only N +steps later. + +The lazy match evaluation is also subject to a runtime parameter. If +the current match is long enough, deflate() reduces the search for a longer +match, thus speeding up the whole process. If compression ratio is more +important than speed, deflate() attempts a complete second search even if +the first match is already long enough. + +The lazy match evaluation is not performed for the fastest compression +modes (level parameter 1 to 3). For these fast modes, new strings +are inserted in the hash table only when no match was found, or +when the match is not too long. This degrades the compression ratio +but saves time since there are both fewer insertions and fewer searches. + + +2. Decompression algorithm (inflate) + +2.1 Introduction + +The key question is how to represent a Huffman code (or any prefix code) so +that you can decode fast. The most important characteristic is that shorter +codes are much more common than longer codes, so pay attention to decoding the +short codes fast, and let the long codes take longer to decode. + +inflate() sets up a first level table that covers some number of bits of +input less than the length of longest code. It gets that many bits from the +stream, and looks it up in the table. The table will tell if the next +code is that many bits or less and how many, and if it is, it will tell +the value, else it will point to the next level table for which inflate() +grabs more bits and tries to decode a longer code. + +How many bits to make the first lookup is a tradeoff between the time it +takes to decode and the time it takes to build the table. If building the +table took no time (and if you had infinite memory), then there would only +be a first level table to cover all the way to the longest code. However, +building the table ends up taking a lot longer for more bits since short +codes are replicated many times in such a table. What inflate() does is +simply to make the number of bits in the first table a variable, and then +to set that variable for the maximum speed. + +For inflate, which has 286 possible codes for the literal/length tree, the size +of the first table is nine bits. Also the distance trees have 30 possible +values, and the size of the first table is six bits. Note that for each of +those cases, the table ended up one bit longer than the ``average'' code +length, i.e. the code length of an approximately flat code which would be a +little more than eight bits for 286 symbols and a little less than five bits +for 30 symbols. + + +2.2 More details on the inflate table lookup + +Ok, you want to know what this cleverly obfuscated inflate tree actually +looks like. You are correct that it's not a Huffman tree. It is simply a +lookup table for the first, let's say, nine bits of a Huffman symbol. The +symbol could be as short as one bit or as long as 15 bits. If a particular +symbol is shorter than nine bits, then that symbol's translation is duplicated +in all those entries that start with that symbol's bits. For example, if the +symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a +symbol is nine bits long, it appears in the table once. + +If the symbol is longer than nine bits, then that entry in the table points +to another similar table for the remaining bits. Again, there are duplicated +entries as needed. The idea is that most of the time the symbol will be short +and there will only be one table look up. (That's whole idea behind data +compression in the first place.) For the less frequent long symbols, there +will be two lookups. If you had a compression method with really long +symbols, you could have as many levels of lookups as is efficient. For +inflate, two is enough. + +So a table entry either points to another table (in which case nine bits in +the above example are gobbled), or it contains the translation for the symbol +and the number of bits to gobble. Then you start again with the next +ungobbled bit. + +You may wonder: why not just have one lookup table for how ever many bits the +longest symbol is? The reason is that if you do that, you end up spending +more time filling in duplicate symbol entries than you do actually decoding. +At least for deflate's output that generates new trees every several 10's of +kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code +would take too long if you're only decoding several thousand symbols. At the +other extreme, you could make a new table for every bit in the code. In fact, +that's essentially a Huffman tree. But then you spend too much time +traversing the tree while decoding, even for short symbols. + +So the number of bits for the first lookup table is a trade of the time to +fill out the table vs. the time spent looking at the second level and above of +the table. + +Here is an example, scaled down: + +The code being decoded, with 10 symbols, from 1 to 6 bits long: + +A: 0 +B: 10 +C: 1100 +D: 11010 +E: 11011 +F: 11100 +G: 11101 +H: 11110 +I: 111110 +J: 111111 + +Let's make the first table three bits long (eight entries): + +000: A,1 +001: A,1 +010: A,1 +011: A,1 +100: B,2 +101: B,2 +110: -> table X (gobble 3 bits) +111: -> table Y (gobble 3 bits) + +Each entry is what the bits decode as and how many bits that is, i.e. how +many bits to gobble. Or the entry points to another table, with the number of +bits to gobble implicit in the size of the table. + +Table X is two bits long since the longest code starting with 110 is five bits +long: + +00: C,1 +01: C,1 +10: D,2 +11: E,2 + +Table Y is three bits long since the longest code starting with 111 is six +bits long: + +000: F,2 +001: F,2 +010: G,2 +011: G,2 +100: H,2 +101: H,2 +110: I,3 +111: J,3 + +So what we have here are three tables with a total of 20 entries that had to +be constructed. That's compared to 64 entries for a single table. Or +compared to 16 entries for a Huffman tree (six two entry tables and one four +entry table). Assuming that the code ideally represents the probability of +the symbols, it takes on the average 1.25 lookups per symbol. That's compared +to one lookup for the single table, or 1.66 lookups per symbol for the +Huffman tree. + +There, I think that gives you a picture of what's going on. For inflate, the +meaning of a particular symbol is often more than just a letter. It can be a +byte (a "literal"), or it can be either a length or a distance which +indicates a base value and a number of bits to fetch after the code that is +added to the base value. Or it might be the special end-of-block code. The +data structures created in inftrees.c try to encode all that information +compactly in the tables. + + +Jean-loup Gailly Mark Adler +jloup@gzip.org madler@alumni.caltech.edu + + +References: + +[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data +Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3, +pp. 337-343. + +``DEFLATE Compressed Data Format Specification'' available in +http://www.ietf.org/rfc/rfc1951.txt diff --git a/compat/zlib/doc/rfc1950.txt b/compat/zlib/doc/rfc1950.txt new file mode 100644 index 0000000..ce6428a --- /dev/null +++ b/compat/zlib/doc/rfc1950.txt @@ -0,0 +1,619 @@ + + + + + + +Network Working Group P. Deutsch +Request for Comments: 1950 Aladdin Enterprises +Category: Informational J-L. Gailly + Info-ZIP + May 1996 + + + ZLIB Compressed Data Format Specification version 3.3 + +Status of This Memo + + This memo provides information for the Internet community. This memo + does not specify an Internet standard of any kind. Distribution of + this memo is unlimited. + +IESG Note: + + The IESG takes no position on the validity of any Intellectual + Property Rights statements contained in this document. + +Notices + + Copyright (c) 1996 L. Peter Deutsch and Jean-Loup Gailly + + Permission is granted to copy and distribute this document for any + purpose and without charge, including translations into other + languages and incorporation into compilations, provided that the + copyright notice and this notice are preserved, and that any + substantive changes or deletions from the original are clearly + marked. + + A pointer to the latest version of this and related documentation in + HTML format can be found at the URL + . + +Abstract + + This specification defines a lossless compressed data format. The + data can be produced or consumed, even for an arbitrarily long + sequentially presented input data stream, using only an a priori + bounded amount of intermediate storage. The format presently uses + the DEFLATE compression method but can be easily extended to use + other compression methods. It can be implemented readily in a manner + not covered by patents. This specification also defines the ADLER-32 + checksum (an extension and improvement of the Fletcher checksum), + used for detection of data corruption, and provides an algorithm for + computing it. + + + + +Deutsch & Gailly Informational [Page 1] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + +Table of Contents + + 1. Introduction ................................................... 2 + 1.1. Purpose ................................................... 2 + 1.2. Intended audience ......................................... 3 + 1.3. Scope ..................................................... 3 + 1.4. Compliance ................................................ 3 + 1.5. Definitions of terms and conventions used ................ 3 + 1.6. Changes from previous versions ............................ 3 + 2. Detailed specification ......................................... 3 + 2.1. Overall conventions ....................................... 3 + 2.2. Data format ............................................... 4 + 2.3. Compliance ................................................ 7 + 3. References ..................................................... 7 + 4. Source code .................................................... 8 + 5. Security Considerations ........................................ 8 + 6. Acknowledgements ............................................... 8 + 7. Authors' Addresses ............................................. 8 + 8. Appendix: Rationale ............................................ 9 + 9. Appendix: Sample code ..........................................10 + +1. Introduction + + 1.1. Purpose + + The purpose of this specification is to define a lossless + compressed data format that: + + * Is independent of CPU type, operating system, file system, + and character set, and hence can be used for interchange; + + * Can be produced or consumed, even for an arbitrarily long + sequentially presented input data stream, using only an a + priori bounded amount of intermediate storage, and hence can + be used in data communications or similar structures such as + Unix filters; + + * Can use a number of different compression methods; + + * Can be implemented readily in a manner not covered by + patents, and hence can be practiced freely. + + The data format defined by this specification does not attempt to + allow random access to compressed data. + + + + + + + +Deutsch & Gailly Informational [Page 2] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + + 1.2. Intended audience + + This specification is intended for use by implementors of software + to compress data into zlib format and/or decompress data from zlib + format. + + The text of the specification assumes a basic background in + programming at the level of bits and other primitive data + representations. + + 1.3. Scope + + The specification specifies a compressed data format that can be + used for in-memory compression of a sequence of arbitrary bytes. + + 1.4. Compliance + + Unless otherwise indicated below, a compliant decompressor must be + able to accept and decompress any data set that conforms to all + the specifications presented here; a compliant compressor must + produce data sets that conform to all the specifications presented + here. + + 1.5. Definitions of terms and conventions used + + byte: 8 bits stored or transmitted as a unit (same as an octet). + (For this specification, a byte is exactly 8 bits, even on + machines which store a character on a number of bits different + from 8.) See below, for the numbering of bits within a byte. + + 1.6. Changes from previous versions + + Version 3.1 was the first public release of this specification. + In version 3.2, some terminology was changed and the Adler-32 + sample code was rewritten for clarity. In version 3.3, the + support for a preset dictionary was introduced, and the + specification was converted to RFC style. + +2. Detailed specification + + 2.1. Overall conventions + + In the diagrams below, a box like this: + + +---+ + | | <-- the vertical bars might be missing + +---+ + + + + +Deutsch & Gailly Informational [Page 3] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + + represents one byte; a box like this: + + +==============+ + | | + +==============+ + + represents a variable number of bytes. + + Bytes stored within a computer do not have a "bit order", since + they are always treated as a unit. However, a byte considered as + an integer between 0 and 255 does have a most- and least- + significant bit, and since we write numbers with the most- + significant digit on the left, we also write bytes with the most- + significant bit on the left. In the diagrams below, we number the + bits of a byte so that bit 0 is the least-significant bit, i.e., + the bits are numbered: + + +--------+ + |76543210| + +--------+ + + Within a computer, a number may occupy multiple bytes. All + multi-byte numbers in the format described here are stored with + the MOST-significant byte first (at the lower memory address). + For example, the decimal number 520 is stored as: + + 0 1 + +--------+--------+ + |00000010|00001000| + +--------+--------+ + ^ ^ + | | + | + less significant byte = 8 + + more significant byte = 2 x 256 + + 2.2. Data format + + A zlib stream has the following structure: + + 0 1 + +---+---+ + |CMF|FLG| (more-->) + +---+---+ + + + + + + + + +Deutsch & Gailly Informational [Page 4] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + + (if FLG.FDICT set) + + 0 1 2 3 + +---+---+---+---+ + | DICTID | (more-->) + +---+---+---+---+ + + +=====================+---+---+---+---+ + |...compressed data...| ADLER32 | + +=====================+---+---+---+---+ + + Any data which may appear after ADLER32 are not part of the zlib + stream. + + CMF (Compression Method and flags) + This byte is divided into a 4-bit compression method and a 4- + bit information field depending on the compression method. + + bits 0 to 3 CM Compression method + bits 4 to 7 CINFO Compression info + + CM (Compression method) + This identifies the compression method used in the file. CM = 8 + denotes the "deflate" compression method with a window size up + to 32K. This is the method used by gzip and PNG (see + references [1] and [2] in Chapter 3, below, for the reference + documents). CM = 15 is reserved. It might be used in a future + version of this specification to indicate the presence of an + extra field before the compressed data. + + CINFO (Compression info) + For CM = 8, CINFO is the base-2 logarithm of the LZ77 window + size, minus eight (CINFO=7 indicates a 32K window size). Values + of CINFO above 7 are not allowed in this version of the + specification. CINFO is not defined in this specification for + CM not equal to 8. + + FLG (FLaGs) + This flag byte is divided as follows: + + bits 0 to 4 FCHECK (check bits for CMF and FLG) + bit 5 FDICT (preset dictionary) + bits 6 to 7 FLEVEL (compression level) + + The FCHECK value must be such that CMF and FLG, when viewed as + a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG), + is a multiple of 31. + + + + +Deutsch & Gailly Informational [Page 5] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + + FDICT (Preset dictionary) + If FDICT is set, a DICT dictionary identifier is present + immediately after the FLG byte. The dictionary is a sequence of + bytes which are initially fed to the compressor without + producing any compressed output. DICT is the Adler-32 checksum + of this sequence of bytes (see the definition of ADLER32 + below). The decompressor can use this identifier to determine + which dictionary has been used by the compressor. + + FLEVEL (Compression level) + These flags are available for use by specific compression + methods. The "deflate" method (CM = 8) sets these flags as + follows: + + 0 - compressor used fastest algorithm + 1 - compressor used fast algorithm + 2 - compressor used default algorithm + 3 - compressor used maximum compression, slowest algorithm + + The information in FLEVEL is not needed for decompression; it + is there to indicate if recompression might be worthwhile. + + compressed data + For compression method 8, the compressed data is stored in the + deflate compressed data format as described in the document + "DEFLATE Compressed Data Format Specification" by L. Peter + Deutsch. (See reference [3] in Chapter 3, below) + + Other compressed data formats are not specified in this version + of the zlib specification. + + ADLER32 (Adler-32 checksum) + This contains a checksum value of the uncompressed data + (excluding any dictionary data) computed according to Adler-32 + algorithm. This algorithm is a 32-bit extension and improvement + of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 + standard. See references [4] and [5] in Chapter 3, below) + + Adler-32 is composed of two sums accumulated per byte: s1 is + the sum of all bytes, s2 is the sum of all s1 values. Both sums + are done modulo 65521. s1 is initialized to 1, s2 to zero. The + Adler-32 checksum is stored as s2*65536 + s1 in most- + significant-byte first (network) order. + + + + + + + + +Deutsch & Gailly Informational [Page 6] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + + 2.3. Compliance + + A compliant compressor must produce streams with correct CMF, FLG + and ADLER32, but need not support preset dictionaries. When the + zlib data format is used as part of another standard data format, + the compressor may use only preset dictionaries that are specified + by this other data format. If this other format does not use the + preset dictionary feature, the compressor must not set the FDICT + flag. + + A compliant decompressor must check CMF, FLG, and ADLER32, and + provide an error indication if any of these have incorrect values. + A compliant decompressor must give an error indication if CM is + not one of the values defined in this specification (only the + value 8 is permitted in this version), since another value could + indicate the presence of new features that would cause subsequent + data to be interpreted incorrectly. A compliant decompressor must + give an error indication if FDICT is set and DICTID is not the + identifier of a known preset dictionary. A decompressor may + ignore FLEVEL and still be compliant. When the zlib data format + is being used as a part of another standard format, a compliant + decompressor must support all the preset dictionaries specified by + the other format. When the other format does not use the preset + dictionary feature, a compliant decompressor must reject any + stream in which the FDICT flag is set. + +3. References + + [1] Deutsch, L.P.,"GZIP Compressed Data Format Specification", + available in ftp://ftp.uu.net/pub/archiving/zip/doc/ + + [2] Thomas Boutell, "PNG (Portable Network Graphics) specification", + available in ftp://ftp.uu.net/graphics/png/documents/ + + [3] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", + available in ftp://ftp.uu.net/pub/archiving/zip/doc/ + + [4] Fletcher, J. G., "An Arithmetic Checksum for Serial + Transmissions," IEEE Transactions on Communications, Vol. COM-30, + No. 1, January 1982, pp. 247-252. + + [5] ITU-T Recommendation X.224, Annex D, "Checksum Algorithms," + November, 1993, pp. 144, 145. (Available from + gopher://info.itu.ch). ITU-T X.244 is also the same as ISO 8073. + + + + + + + +Deutsch & Gailly Informational [Page 7] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + +4. Source code + + Source code for a C language implementation of a "zlib" compliant + library is available at ftp://ftp.uu.net/pub/archiving/zip/zlib/. + +5. Security Considerations + + A decoder that fails to check the ADLER32 checksum value may be + subject to undetected data corruption. + +6. Acknowledgements + + Trademarks cited in this document are the property of their + respective owners. + + Jean-Loup Gailly and Mark Adler designed the zlib format and wrote + the related software described in this specification. Glenn + Randers-Pehrson converted this document to RFC and HTML format. + +7. Authors' Addresses + + L. Peter Deutsch + Aladdin Enterprises + 203 Santa Margarita Ave. + Menlo Park, CA 94025 + + Phone: (415) 322-0103 (AM only) + FAX: (415) 322-1734 + EMail: + + + Jean-Loup Gailly + + EMail: + + Questions about the technical content of this specification can be + sent by email to + + Jean-Loup Gailly and + Mark Adler + + Editorial comments on this specification can be sent by email to + + L. Peter Deutsch and + Glenn Randers-Pehrson + + + + + + +Deutsch & Gailly Informational [Page 8] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + +8. Appendix: Rationale + + 8.1. Preset dictionaries + + A preset dictionary is specially useful to compress short input + sequences. The compressor can take advantage of the dictionary + context to encode the input in a more compact manner. The + decompressor can be initialized with the appropriate context by + virtually decompressing a compressed version of the dictionary + without producing any output. However for certain compression + algorithms such as the deflate algorithm this operation can be + achieved without actually performing any decompression. + + The compressor and the decompressor must use exactly the same + dictionary. The dictionary may be fixed or may be chosen among a + certain number of predefined dictionaries, according to the kind + of input data. The decompressor can determine which dictionary has + been chosen by the compressor by checking the dictionary + identifier. This document does not specify the contents of + predefined dictionaries, since the optimal dictionaries are + application specific. Standard data formats using this feature of + the zlib specification must precisely define the allowed + dictionaries. + + 8.2. The Adler-32 algorithm + + The Adler-32 algorithm is much faster than the CRC32 algorithm yet + still provides an extremely low probability of undetected errors. + + The modulo on unsigned long accumulators can be delayed for 5552 + bytes, so the modulo operation time is negligible. If the bytes + are a, b, c, the second sum is 3a + 2b + c + 3, and so is position + and order sensitive, unlike the first sum, which is just a + checksum. That 65521 is prime is important to avoid a possible + large class of two-byte errors that leave the check unchanged. + (The Fletcher checksum uses 255, which is not prime and which also + makes the Fletcher check insensitive to single byte changes 0 <-> + 255.) + + The sum s1 is initialized to 1 instead of zero to make the length + of the sequence part of s2, so that the length does not have to be + checked separately. (Any sequence of zeroes has a Fletcher + checksum of zero.) + + + + + + + + +Deutsch & Gailly Informational [Page 9] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + +9. Appendix: Sample code + + The following C code computes the Adler-32 checksum of a data buffer. + It is written for clarity, not for speed. The sample code is in the + ANSI C programming language. Non C users may find it easier to read + with these hints: + + & Bitwise AND operator. + >> Bitwise right shift operator. When applied to an + unsigned quantity, as here, right shift inserts zero bit(s) + at the left. + << Bitwise left shift operator. Left shift inserts zero + bit(s) at the right. + ++ "n++" increments the variable n. + % modulo operator: a % b is the remainder of a divided by b. + + #define BASE 65521 /* largest prime smaller than 65536 */ + + /* + Update a running Adler-32 checksum with the bytes buf[0..len-1] + and return the updated checksum. The Adler-32 checksum should be + initialized to 1. + + Usage example: + + unsigned long adler = 1L; + + while (read_buffer(buffer, length) != EOF) { + adler = update_adler32(adler, buffer, length); + } + if (adler != original_adler) error(); + */ + unsigned long update_adler32(unsigned long adler, + unsigned char *buf, int len) + { + unsigned long s1 = adler & 0xffff; + unsigned long s2 = (adler >> 16) & 0xffff; + int n; + + for (n = 0; n < len; n++) { + s1 = (s1 + buf[n]) % BASE; + s2 = (s2 + s1) % BASE; + } + return (s2 << 16) + s1; + } + + /* Return the adler32 of the bytes buf[0..len-1] */ + + + + +Deutsch & Gailly Informational [Page 10] + +RFC 1950 ZLIB Compressed Data Format Specification May 1996 + + + unsigned long adler32(unsigned char *buf, int len) + { + return update_adler32(1L, buf, len); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Deutsch & Gailly Informational [Page 11] + diff --git a/compat/zlib/doc/rfc1951.txt b/compat/zlib/doc/rfc1951.txt new file mode 100644 index 0000000..403c8c7 --- /dev/null +++ b/compat/zlib/doc/rfc1951.txt @@ -0,0 +1,955 @@ + + + + + + +Network Working Group P. Deutsch +Request for Comments: 1951 Aladdin Enterprises +Category: Informational May 1996 + + + DEFLATE Compressed Data Format Specification version 1.3 + +Status of This Memo + + This memo provides information for the Internet community. This memo + does not specify an Internet standard of any kind. Distribution of + this memo is unlimited. + +IESG Note: + + The IESG takes no position on the validity of any Intellectual + Property Rights statements contained in this document. + +Notices + + Copyright (c) 1996 L. Peter Deutsch + + Permission is granted to copy and distribute this document for any + purpose and without charge, including translations into other + languages and incorporation into compilations, provided that the + copyright notice and this notice are preserved, and that any + substantive changes or deletions from the original are clearly + marked. + + A pointer to the latest version of this and related documentation in + HTML format can be found at the URL + . + +Abstract + + This specification defines a lossless compressed data format that + compresses data using a combination of the LZ77 algorithm and Huffman + coding, with efficiency comparable to the best currently available + general-purpose compression methods. The data can be produced or + consumed, even for an arbitrarily long sequentially presented input + data stream, using only an a priori bounded amount of intermediate + storage. The format can be implemented readily in a manner not + covered by patents. + + + + + + + + +Deutsch Informational [Page 1] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + +Table of Contents + + 1. Introduction ................................................... 2 + 1.1. Purpose ................................................... 2 + 1.2. Intended audience ......................................... 3 + 1.3. Scope ..................................................... 3 + 1.4. Compliance ................................................ 3 + 1.5. Definitions of terms and conventions used ................ 3 + 1.6. Changes from previous versions ............................ 4 + 2. Compressed representation overview ............................. 4 + 3. Detailed specification ......................................... 5 + 3.1. Overall conventions ....................................... 5 + 3.1.1. Packing into bytes .................................. 5 + 3.2. Compressed block format ................................... 6 + 3.2.1. Synopsis of prefix and Huffman coding ............... 6 + 3.2.2. Use of Huffman coding in the "deflate" format ....... 7 + 3.2.3. Details of block format ............................. 9 + 3.2.4. Non-compressed blocks (BTYPE=00) ................... 11 + 3.2.5. Compressed blocks (length and distance codes) ...... 11 + 3.2.6. Compression with fixed Huffman codes (BTYPE=01) .... 12 + 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) .. 13 + 3.3. Compliance ............................................... 14 + 4. Compression algorithm details ................................. 14 + 5. References .................................................... 16 + 6. Security Considerations ....................................... 16 + 7. Source code ................................................... 16 + 8. Acknowledgements .............................................. 16 + 9. Author's Address .............................................. 17 + +1. Introduction + + 1.1. Purpose + + The purpose of this specification is to define a lossless + compressed data format that: + * Is independent of CPU type, operating system, file system, + and character set, and hence can be used for interchange; + * Can be produced or consumed, even for an arbitrarily long + sequentially presented input data stream, using only an a + priori bounded amount of intermediate storage, and hence + can be used in data communications or similar structures + such as Unix filters; + * Compresses data with efficiency comparable to the best + currently available general-purpose compression methods, + and in particular considerably better than the "compress" + program; + * Can be implemented readily in a manner not covered by + patents, and hence can be practiced freely; + + + +Deutsch Informational [Page 2] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + * Is compatible with the file format produced by the current + widely used gzip utility, in that conforming decompressors + will be able to read data produced by the existing gzip + compressor. + + The data format defined by this specification does not attempt to: + + * Allow random access to compressed data; + * Compress specialized data (e.g., raster graphics) as well + as the best currently available specialized algorithms. + + A simple counting argument shows that no lossless compression + algorithm can compress every possible input data set. For the + format defined here, the worst case expansion is 5 bytes per 32K- + byte block, i.e., a size increase of 0.015% for large data sets. + English text usually compresses by a factor of 2.5 to 3; + executable files usually compress somewhat less; graphical data + such as raster images may compress much more. + + 1.2. Intended audience + + This specification is intended for use by implementors of software + to compress data into "deflate" format and/or decompress data from + "deflate" format. + + The text of the specification assumes a basic background in + programming at the level of bits and other primitive data + representations. Familiarity with the technique of Huffman coding + is helpful but not required. + + 1.3. Scope + + The specification specifies a method for representing a sequence + of bytes as a (usually shorter) sequence of bits, and a method for + packing the latter bit sequence into bytes. + + 1.4. Compliance + + Unless otherwise indicated below, a compliant decompressor must be + able to accept and decompress any data set that conforms to all + the specifications presented here; a compliant compressor must + produce data sets that conform to all the specifications presented + here. + + 1.5. Definitions of terms and conventions used + + Byte: 8 bits stored or transmitted as a unit (same as an octet). + For this specification, a byte is exactly 8 bits, even on machines + + + +Deutsch Informational [Page 3] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + which store a character on a number of bits different from eight. + See below, for the numbering of bits within a byte. + + String: a sequence of arbitrary bytes. + + 1.6. Changes from previous versions + + There have been no technical changes to the deflate format since + version 1.1 of this specification. In version 1.2, some + terminology was changed. Version 1.3 is a conversion of the + specification to RFC style. + +2. Compressed representation overview + + A compressed data set consists of a series of blocks, corresponding + to successive blocks of input data. The block sizes are arbitrary, + except that non-compressible blocks are limited to 65,535 bytes. + + Each block is compressed using a combination of the LZ77 algorithm + and Huffman coding. The Huffman trees for each block are independent + of those for previous or subsequent blocks; the LZ77 algorithm may + use a reference to a duplicated string occurring in a previous block, + up to 32K input bytes before. + + Each block consists of two parts: a pair of Huffman code trees that + describe the representation of the compressed data part, and a + compressed data part. (The Huffman trees themselves are compressed + using Huffman encoding.) The compressed data consists of a series of + elements of two types: literal bytes (of strings that have not been + detected as duplicated within the previous 32K input bytes), and + pointers to duplicated strings, where a pointer is represented as a + pair . The representation used in the + "deflate" format limits distances to 32K bytes and lengths to 258 + bytes, but does not limit the size of a block, except for + uncompressible blocks, which are limited as noted above. + + Each type of value (literals, distances, and lengths) in the + compressed data is represented using a Huffman code, using one code + tree for literals and lengths and a separate code tree for distances. + The code trees for each block appear in a compact form just before + the compressed data for that block. + + + + + + + + + + +Deutsch Informational [Page 4] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + +3. Detailed specification + + 3.1. Overall conventions In the diagrams below, a box like this: + + +---+ + | | <-- the vertical bars might be missing + +---+ + + represents one byte; a box like this: + + +==============+ + | | + +==============+ + + represents a variable number of bytes. + + Bytes stored within a computer do not have a "bit order", since + they are always treated as a unit. However, a byte considered as + an integer between 0 and 255 does have a most- and least- + significant bit, and since we write numbers with the most- + significant digit on the left, we also write bytes with the most- + significant bit on the left. In the diagrams below, we number the + bits of a byte so that bit 0 is the least-significant bit, i.e., + the bits are numbered: + + +--------+ + |76543210| + +--------+ + + Within a computer, a number may occupy multiple bytes. All + multi-byte numbers in the format described here are stored with + the least-significant byte first (at the lower memory address). + For example, the decimal number 520 is stored as: + + 0 1 + +--------+--------+ + |00001000|00000010| + +--------+--------+ + ^ ^ + | | + | + more significant byte = 2 x 256 + + less significant byte = 8 + + 3.1.1. Packing into bytes + + This document does not address the issue of the order in which + bits of a byte are transmitted on a bit-sequential medium, + since the final data format described here is byte- rather than + + + +Deutsch Informational [Page 5] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + bit-oriented. However, we describe the compressed block format + in below, as a sequence of data elements of various bit + lengths, not a sequence of bytes. We must therefore specify + how to pack these data elements into bytes to form the final + compressed byte sequence: + + * Data elements are packed into bytes in order of + increasing bit number within the byte, i.e., starting + with the least-significant bit of the byte. + * Data elements other than Huffman codes are packed + starting with the least-significant bit of the data + element. + * Huffman codes are packed starting with the most- + significant bit of the code. + + In other words, if one were to print out the compressed data as + a sequence of bytes, starting with the first byte at the + *right* margin and proceeding to the *left*, with the most- + significant bit of each byte on the left as usual, one would be + able to parse the result from right to left, with fixed-width + elements in the correct MSB-to-LSB order and Huffman codes in + bit-reversed order (i.e., with the first bit of the code in the + relative LSB position). + + 3.2. Compressed block format + + 3.2.1. Synopsis of prefix and Huffman coding + + Prefix coding represents symbols from an a priori known + alphabet by bit sequences (codes), one code for each symbol, in + a manner such that different symbols may be represented by bit + sequences of different lengths, but a parser can always parse + an encoded string unambiguously symbol-by-symbol. + + We define a prefix code in terms of a binary tree in which the + two edges descending from each non-leaf node are labeled 0 and + 1 and in which the leaf nodes correspond one-for-one with (are + labeled with) the symbols of the alphabet; then the code for a + symbol is the sequence of 0's and 1's on the edges leading from + the root to the leaf labeled with that symbol. For example: + + + + + + + + + + + +Deutsch Informational [Page 6] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + /\ Symbol Code + 0 1 ------ ---- + / \ A 00 + /\ B B 1 + 0 1 C 011 + / \ D 010 + A /\ + 0 1 + / \ + D C + + A parser can decode the next symbol from an encoded input + stream by walking down the tree from the root, at each step + choosing the edge corresponding to the next input bit. + + Given an alphabet with known symbol frequencies, the Huffman + algorithm allows the construction of an optimal prefix code + (one which represents strings with those symbol frequencies + using the fewest bits of any possible prefix codes for that + alphabet). Such a code is called a Huffman code. (See + reference [1] in Chapter 5, references for additional + information on Huffman codes.) + + Note that in the "deflate" format, the Huffman codes for the + various alphabets must not exceed certain maximum code lengths. + This constraint complicates the algorithm for computing code + lengths from symbol frequencies. Again, see Chapter 5, + references for details. + + 3.2.2. Use of Huffman coding in the "deflate" format + + The Huffman codes used for each alphabet in the "deflate" + format have two additional rules: + + * All codes of a given bit length have lexicographically + consecutive values, in the same order as the symbols + they represent; + + * Shorter codes lexicographically precede longer codes. + + + + + + + + + + + + +Deutsch Informational [Page 7] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + We could recode the example above to follow this rule as + follows, assuming that the order of the alphabet is ABCD: + + Symbol Code + ------ ---- + A 10 + B 0 + C 110 + D 111 + + I.e., 0 precedes 10 which precedes 11x, and 110 and 111 are + lexicographically consecutive. + + Given this rule, we can define the Huffman code for an alphabet + just by giving the bit lengths of the codes for each symbol of + the alphabet in order; this is sufficient to determine the + actual codes. In our example, the code is completely defined + by the sequence of bit lengths (2, 1, 3, 3). The following + algorithm generates the codes as integers, intended to be read + from most- to least-significant bit. The code lengths are + initially in tree[I].Len; the codes are produced in + tree[I].Code. + + 1) Count the number of codes for each code length. Let + bl_count[N] be the number of codes of length N, N >= 1. + + 2) Find the numerical value of the smallest code for each + code length: + + code = 0; + bl_count[0] = 0; + for (bits = 1; bits <= MAX_BITS; bits++) { + code = (code + bl_count[bits-1]) << 1; + next_code[bits] = code; + } + + 3) Assign numerical values to all codes, using consecutive + values for all codes of the same length with the base + values determined at step 2. Codes that are never used + (which have a bit length of zero) must not be assigned a + value. + + for (n = 0; n <= max_code; n++) { + len = tree[n].Len; + if (len != 0) { + tree[n].Code = next_code[len]; + next_code[len]++; + } + + + +Deutsch Informational [Page 8] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + } + + Example: + + Consider the alphabet ABCDEFGH, with bit lengths (3, 3, 3, 3, + 3, 2, 4, 4). After step 1, we have: + + N bl_count[N] + - ----------- + 2 1 + 3 5 + 4 2 + + Step 2 computes the following next_code values: + + N next_code[N] + - ------------ + 1 0 + 2 0 + 3 2 + 4 14 + + Step 3 produces the following code values: + + Symbol Length Code + ------ ------ ---- + A 3 010 + B 3 011 + C 3 100 + D 3 101 + E 3 110 + F 2 00 + G 4 1110 + H 4 1111 + + 3.2.3. Details of block format + + Each block of compressed data begins with 3 header bits + containing the following data: + + first bit BFINAL + next 2 bits BTYPE + + Note that the header bits do not necessarily begin on a byte + boundary, since a block does not necessarily occupy an integral + number of bytes. + + + + + +Deutsch Informational [Page 9] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + BFINAL is set if and only if this is the last block of the data + set. + + BTYPE specifies how the data are compressed, as follows: + + 00 - no compression + 01 - compressed with fixed Huffman codes + 10 - compressed with dynamic Huffman codes + 11 - reserved (error) + + The only difference between the two compressed cases is how the + Huffman codes for the literal/length and distance alphabets are + defined. + + In all cases, the decoding algorithm for the actual data is as + follows: + + do + read block header from input stream. + if stored with no compression + skip any remaining bits in current partially + processed byte + read LEN and NLEN (see next section) + copy LEN bytes of data to output + otherwise + if compressed with dynamic Huffman codes + read representation of code trees (see + subsection below) + loop (until end of block code recognized) + decode literal/length value from input stream + if value < 256 + copy value (literal byte) to output stream + otherwise + if value = end of block (256) + break from loop + otherwise (value = 257..285) + decode distance from input stream + + move backwards distance bytes in the output + stream, and copy length bytes from this + position to the output stream. + end loop + while not last block + + Note that a duplicated string reference may refer to a string + in a previous block; i.e., the backward distance may cross one + or more block boundaries. However a distance cannot refer past + the beginning of the output stream. (An application using a + + + +Deutsch Informational [Page 10] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + preset dictionary might discard part of the output stream; a + distance can refer to that part of the output stream anyway) + Note also that the referenced string may overlap the current + position; for example, if the last 2 bytes decoded have values + X and Y, a string reference with + adds X,Y,X,Y,X to the output stream. + + We now specify each compression method in turn. + + 3.2.4. Non-compressed blocks (BTYPE=00) + + Any bits of input up to the next byte boundary are ignored. + The rest of the block consists of the following information: + + 0 1 2 3 4... + +---+---+---+---+================================+ + | LEN | NLEN |... LEN bytes of literal data...| + +---+---+---+---+================================+ + + LEN is the number of data bytes in the block. NLEN is the + one's complement of LEN. + + 3.2.5. Compressed blocks (length and distance codes) + + As noted above, encoded data blocks in the "deflate" format + consist of sequences of symbols drawn from three conceptually + distinct alphabets: either literal bytes, from the alphabet of + byte values (0..255), or pairs, + where the length is drawn from (3..258) and the distance is + drawn from (1..32,768). In fact, the literal and length + alphabets are merged into a single alphabet (0..285), where + values 0..255 represent literal bytes, the value 256 indicates + end-of-block, and values 257..285 represent length codes + (possibly in conjunction with extra bits following the symbol + code) as follows: + + + + + + + + + + + + + + + + +Deutsch Informational [Page 11] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + Extra Extra Extra + Code Bits Length(s) Code Bits Lengths Code Bits Length(s) + ---- ---- ------ ---- ---- ------- ---- ---- ------- + 257 0 3 267 1 15,16 277 4 67-82 + 258 0 4 268 1 17,18 278 4 83-98 + 259 0 5 269 2 19-22 279 4 99-114 + 260 0 6 270 2 23-26 280 4 115-130 + 261 0 7 271 2 27-30 281 5 131-162 + 262 0 8 272 2 31-34 282 5 163-194 + 263 0 9 273 3 35-42 283 5 195-226 + 264 0 10 274 3 43-50 284 5 227-257 + 265 1 11,12 275 3 51-58 285 0 258 + 266 1 13,14 276 3 59-66 + + The extra bits should be interpreted as a machine integer + stored with the most-significant bit first, e.g., bits 1110 + represent the value 14. + + Extra Extra Extra + Code Bits Dist Code Bits Dist Code Bits Distance + ---- ---- ---- ---- ---- ------ ---- ---- -------- + 0 0 1 10 4 33-48 20 9 1025-1536 + 1 0 2 11 4 49-64 21 9 1537-2048 + 2 0 3 12 5 65-96 22 10 2049-3072 + 3 0 4 13 5 97-128 23 10 3073-4096 + 4 1 5,6 14 6 129-192 24 11 4097-6144 + 5 1 7,8 15 6 193-256 25 11 6145-8192 + 6 2 9-12 16 7 257-384 26 12 8193-12288 + 7 2 13-16 17 7 385-512 27 12 12289-16384 + 8 3 17-24 18 8 513-768 28 13 16385-24576 + 9 3 25-32 19 8 769-1024 29 13 24577-32768 + + 3.2.6. Compression with fixed Huffman codes (BTYPE=01) + + The Huffman codes for the two alphabets are fixed, and are not + represented explicitly in the data. The Huffman code lengths + for the literal/length alphabet are: + + Lit Value Bits Codes + --------- ---- ----- + 0 - 143 8 00110000 through + 10111111 + 144 - 255 9 110010000 through + 111111111 + 256 - 279 7 0000000 through + 0010111 + 280 - 287 8 11000000 through + 11000111 + + + +Deutsch Informational [Page 12] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + The code lengths are sufficient to generate the actual codes, + as described above; we show the codes in the table for added + clarity. Literal/length values 286-287 will never actually + occur in the compressed data, but participate in the code + construction. + + Distance codes 0-31 are represented by (fixed-length) 5-bit + codes, with possible additional bits as shown in the table + shown in Paragraph 3.2.5, above. Note that distance codes 30- + 31 will never actually occur in the compressed data. + + 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) + + The Huffman codes for the two alphabets appear in the block + immediately after the header bits and before the actual + compressed data, first the literal/length code and then the + distance code. Each code is defined by a sequence of code + lengths, as discussed in Paragraph 3.2.2, above. For even + greater compactness, the code length sequences themselves are + compressed using a Huffman code. The alphabet for code lengths + is as follows: + + 0 - 15: Represent code lengths of 0 - 15 + 16: Copy the previous code length 3 - 6 times. + The next 2 bits indicate repeat length + (0 = 3, ... , 3 = 6) + Example: Codes 8, 16 (+2 bits 11), + 16 (+2 bits 10) will expand to + 12 code lengths of 8 (1 + 6 + 5) + 17: Repeat a code length of 0 for 3 - 10 times. + (3 bits of length) + 18: Repeat a code length of 0 for 11 - 138 times + (7 bits of length) + + A code length of 0 indicates that the corresponding symbol in + the literal/length or distance alphabet will not occur in the + block, and should not participate in the Huffman code + construction algorithm given earlier. If only one distance + code is used, it is encoded using one bit, not zero bits; in + this case there is a single code length of one, with one unused + code. One distance code of zero bits means that there are no + distance codes used at all (the data is all literals). + + We can now define the format of the block: + + 5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286) + 5 Bits: HDIST, # of Distance codes - 1 (1 - 32) + 4 Bits: HCLEN, # of Code Length codes - 4 (4 - 19) + + + +Deutsch Informational [Page 13] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + (HCLEN + 4) x 3 bits: code lengths for the code length + alphabet given just above, in the order: 16, 17, 18, + 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 + + These code lengths are interpreted as 3-bit integers + (0-7); as above, a code length of 0 means the + corresponding symbol (literal/length or distance code + length) is not used. + + HLIT + 257 code lengths for the literal/length alphabet, + encoded using the code length Huffman code + + HDIST + 1 code lengths for the distance alphabet, + encoded using the code length Huffman code + + The actual compressed data of the block, + encoded using the literal/length and distance Huffman + codes + + The literal/length symbol 256 (end of data), + encoded using the literal/length Huffman code + + The code length repeat codes can cross from HLIT + 257 to the + HDIST + 1 code lengths. In other words, all code lengths form + a single sequence of HLIT + HDIST + 258 values. + + 3.3. Compliance + + A compressor may limit further the ranges of values specified in + the previous section and still be compliant; for example, it may + limit the range of backward pointers to some value smaller than + 32K. Similarly, a compressor may limit the size of blocks so that + a compressible block fits in memory. + + A compliant decompressor must accept the full range of possible + values defined in the previous section, and must accept blocks of + arbitrary size. + +4. Compression algorithm details + + While it is the intent of this document to define the "deflate" + compressed data format without reference to any particular + compression algorithm, the format is related to the compressed + formats produced by LZ77 (Lempel-Ziv 1977, see reference [2] below); + since many variations of LZ77 are patented, it is strongly + recommended that the implementor of a compressor follow the general + algorithm presented here, which is known not to be patented per se. + The material in this section is not part of the definition of the + + + +Deutsch Informational [Page 14] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + + specification per se, and a compressor need not follow it in order to + be compliant. + + The compressor terminates a block when it determines that starting a + new block with fresh trees would be useful, or when the block size + fills up the compressor's block buffer. + + The compressor uses a chained hash table to find duplicated strings, + using a hash function that operates on 3-byte sequences. At any + given point during compression, let XYZ be the next 3 input bytes to + be examined (not necessarily all different, of course). First, the + compressor examines the hash chain for XYZ. If the chain is empty, + the compressor simply writes out X as a literal byte and advances one + byte in the input. If the hash chain is not empty, indicating that + the sequence XYZ (or, if we are unlucky, some other 3 bytes with the + same hash function value) has occurred recently, the compressor + compares all strings on the XYZ hash chain with the actual input data + sequence starting at the current point, and selects the longest + match. + + The compressor searches the hash chains starting with the most recent + strings, to favor small distances and thus take advantage of the + Huffman encoding. The hash chains are singly linked. There are no + deletions from the hash chains; the algorithm simply discards matches + that are too old. To avoid a worst-case situation, very long hash + chains are arbitrarily truncated at a certain length, determined by a + run-time parameter. + + To improve overall compression, the compressor optionally defers the + selection of matches ("lazy matching"): after a match of length N has + been found, the compressor searches for a longer match starting at + the next input byte. If it finds a longer match, it truncates the + previous match to a length of one (thus producing a single literal + byte) and then emits the longer match. Otherwise, it emits the + original match, and, as described above, advances N bytes before + continuing. + + Run-time parameters also control this "lazy match" procedure. If + compression ratio is most important, the compressor attempts a + complete second search regardless of the length of the first match. + In the normal case, if the current match is "long enough", the + compressor reduces the search for a longer match, thus speeding up + the process. If speed is most important, the compressor inserts new + strings in the hash table only when no match was found, or when the + match is not "too long". This degrades the compression ratio but + saves time since there are both fewer insertions and fewer searches. + + + + + +Deutsch Informational [Page 15] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + +5. References + + [1] Huffman, D. A., "A Method for the Construction of Minimum + Redundancy Codes", Proceedings of the Institute of Radio + Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101. + + [2] Ziv J., Lempel A., "A Universal Algorithm for Sequential Data + Compression", IEEE Transactions on Information Theory, Vol. 23, + No. 3, pp. 337-343. + + [3] Gailly, J.-L., and Adler, M., ZLIB documentation and sources, + available in ftp://ftp.uu.net/pub/archiving/zip/doc/ + + [4] Gailly, J.-L., and Adler, M., GZIP documentation and sources, + available as gzip-*.tar in ftp://prep.ai.mit.edu/pub/gnu/ + + [5] Schwartz, E. S., and Kallick, B. "Generating a canonical prefix + encoding." Comm. ACM, 7,3 (Mar. 1964), pp. 166-169. + + [6] Hirschberg and Lelewer, "Efficient decoding of prefix codes," + Comm. ACM, 33,4, April 1990, pp. 449-459. + +6. Security Considerations + + Any data compression method involves the reduction of redundancy in + the data. Consequently, any corruption of the data is likely to have + severe effects and be difficult to correct. Uncompressed text, on + the other hand, will probably still be readable despite the presence + of some corrupted bytes. + + It is recommended that systems using this data format provide some + means of validating the integrity of the compressed data. See + reference [3], for example. + +7. Source code + + Source code for a C language implementation of a "deflate" compliant + compressor and decompressor is available within the zlib package at + ftp://ftp.uu.net/pub/archiving/zip/zlib/. + +8. Acknowledgements + + Trademarks cited in this document are the property of their + respective owners. + + Phil Katz designed the deflate format. Jean-Loup Gailly and Mark + Adler wrote the related software described in this specification. + Glenn Randers-Pehrson converted this document to RFC and HTML format. + + + +Deutsch Informational [Page 16] + +RFC 1951 DEFLATE Compressed Data Format Specification May 1996 + + +9. Author's Address + + L. Peter Deutsch + Aladdin Enterprises + 203 Santa Margarita Ave. + Menlo Park, CA 94025 + + Phone: (415) 322-0103 (AM only) + FAX: (415) 322-1734 + EMail: + + Questions about the technical content of this specification can be + sent by email to: + + Jean-Loup Gailly and + Mark Adler + + Editorial comments on this specification can be sent by email to: + + L. Peter Deutsch and + Glenn Randers-Pehrson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Deutsch Informational [Page 17] + diff --git a/compat/zlib/doc/rfc1952.txt b/compat/zlib/doc/rfc1952.txt new file mode 100644 index 0000000..a8e51b4 --- /dev/null +++ b/compat/zlib/doc/rfc1952.txt @@ -0,0 +1,675 @@ + + + + + + +Network Working Group P. Deutsch +Request for Comments: 1952 Aladdin Enterprises +Category: Informational May 1996 + + + GZIP file format specification version 4.3 + +Status of This Memo + + This memo provides information for the Internet community. This memo + does not specify an Internet standard of any kind. Distribution of + this memo is unlimited. + +IESG Note: + + The IESG takes no position on the validity of any Intellectual + Property Rights statements contained in this document. + +Notices + + Copyright (c) 1996 L. Peter Deutsch + + Permission is granted to copy and distribute this document for any + purpose and without charge, including translations into other + languages and incorporation into compilations, provided that the + copyright notice and this notice are preserved, and that any + substantive changes or deletions from the original are clearly + marked. + + A pointer to the latest version of this and related documentation in + HTML format can be found at the URL + . + +Abstract + + This specification defines a lossless compressed data format that is + compatible with the widely used GZIP utility. The format includes a + cyclic redundancy check value for detecting data corruption. The + format presently uses the DEFLATE method of compression but can be + easily extended to use other compression methods. The format can be + implemented readily in a manner not covered by patents. + + + + + + + + + + +Deutsch Informational [Page 1] + +RFC 1952 GZIP File Format Specification May 1996 + + +Table of Contents + + 1. Introduction ................................................... 2 + 1.1. Purpose ................................................... 2 + 1.2. Intended audience ......................................... 3 + 1.3. Scope ..................................................... 3 + 1.4. Compliance ................................................ 3 + 1.5. Definitions of terms and conventions used ................. 3 + 1.6. Changes from previous versions ............................ 3 + 2. Detailed specification ......................................... 4 + 2.1. Overall conventions ....................................... 4 + 2.2. File format ............................................... 5 + 2.3. Member format ............................................. 5 + 2.3.1. Member header and trailer ........................... 6 + 2.3.1.1. Extra field ................................... 8 + 2.3.1.2. Compliance .................................... 9 + 3. References .................................................. 9 + 4. Security Considerations .................................... 10 + 5. Acknowledgements ........................................... 10 + 6. Author's Address ........................................... 10 + 7. Appendix: Jean-Loup Gailly's gzip utility .................. 11 + 8. Appendix: Sample CRC Code .................................. 11 + +1. Introduction + + 1.1. Purpose + + The purpose of this specification is to define a lossless + compressed data format that: + + * Is independent of CPU type, operating system, file system, + and character set, and hence can be used for interchange; + * Can compress or decompress a data stream (as opposed to a + randomly accessible file) to produce another data stream, + using only an a priori bounded amount of intermediate + storage, and hence can be used in data communications or + similar structures such as Unix filters; + * Compresses data with efficiency comparable to the best + currently available general-purpose compression methods, + and in particular considerably better than the "compress" + program; + * Can be implemented readily in a manner not covered by + patents, and hence can be practiced freely; + * Is compatible with the file format produced by the current + widely used gzip utility, in that conforming decompressors + will be able to read data produced by the existing gzip + compressor. + + + + +Deutsch Informational [Page 2] + +RFC 1952 GZIP File Format Specification May 1996 + + + The data format defined by this specification does not attempt to: + + * Provide random access to compressed data; + * Compress specialized data (e.g., raster graphics) as well as + the best currently available specialized algorithms. + + 1.2. Intended audience + + This specification is intended for use by implementors of software + to compress data into gzip format and/or decompress data from gzip + format. + + The text of the specification assumes a basic background in + programming at the level of bits and other primitive data + representations. + + 1.3. Scope + + The specification specifies a compression method and a file format + (the latter assuming only that a file can store a sequence of + arbitrary bytes). It does not specify any particular interface to + a file system or anything about character sets or encodings + (except for file names and comments, which are optional). + + 1.4. Compliance + + Unless otherwise indicated below, a compliant decompressor must be + able to accept and decompress any file that conforms to all the + specifications presented here; a compliant compressor must produce + files that conform to all the specifications presented here. The + material in the appendices is not part of the specification per se + and is not relevant to compliance. + + 1.5. Definitions of terms and conventions used + + byte: 8 bits stored or transmitted as a unit (same as an octet). + (For this specification, a byte is exactly 8 bits, even on + machines which store a character on a number of bits different + from 8.) See below for the numbering of bits within a byte. + + 1.6. Changes from previous versions + + There have been no technical changes to the gzip format since + version 4.1 of this specification. In version 4.2, some + terminology was changed, and the sample CRC code was rewritten for + clarity and to eliminate the requirement for the caller to do pre- + and post-conditioning. Version 4.3 is a conversion of the + specification to RFC style. + + + +Deutsch Informational [Page 3] + +RFC 1952 GZIP File Format Specification May 1996 + + +2. Detailed specification + + 2.1. Overall conventions + + In the diagrams below, a box like this: + + +---+ + | | <-- the vertical bars might be missing + +---+ + + represents one byte; a box like this: + + +==============+ + | | + +==============+ + + represents a variable number of bytes. + + Bytes stored within a computer do not have a "bit order", since + they are always treated as a unit. However, a byte considered as + an integer between 0 and 255 does have a most- and least- + significant bit, and since we write numbers with the most- + significant digit on the left, we also write bytes with the most- + significant bit on the left. In the diagrams below, we number the + bits of a byte so that bit 0 is the least-significant bit, i.e., + the bits are numbered: + + +--------+ + |76543210| + +--------+ + + This document does not address the issue of the order in which + bits of a byte are transmitted on a bit-sequential medium, since + the data format described here is byte- rather than bit-oriented. + + Within a computer, a number may occupy multiple bytes. All + multi-byte numbers in the format described here are stored with + the least-significant byte first (at the lower memory address). + For example, the decimal number 520 is stored as: + + 0 1 + +--------+--------+ + |00001000|00000010| + +--------+--------+ + ^ ^ + | | + | + more significant byte = 2 x 256 + + less significant byte = 8 + + + +Deutsch Informational [Page 4] + +RFC 1952 GZIP File Format Specification May 1996 + + + 2.2. File format + + A gzip file consists of a series of "members" (compressed data + sets). The format of each member is specified in the following + section. The members simply appear one after another in the file, + with no additional information before, between, or after them. + + 2.3. Member format + + Each member has the following structure: + + +---+---+---+---+---+---+---+---+---+---+ + |ID1|ID2|CM |FLG| MTIME |XFL|OS | (more-->) + +---+---+---+---+---+---+---+---+---+---+ + + (if FLG.FEXTRA set) + + +---+---+=================================+ + | XLEN |...XLEN bytes of "extra field"...| (more-->) + +---+---+=================================+ + + (if FLG.FNAME set) + + +=========================================+ + |...original file name, zero-terminated...| (more-->) + +=========================================+ + + (if FLG.FCOMMENT set) + + +===================================+ + |...file comment, zero-terminated...| (more-->) + +===================================+ + + (if FLG.FHCRC set) + + +---+---+ + | CRC16 | + +---+---+ + + +=======================+ + |...compressed blocks...| (more-->) + +=======================+ + + 0 1 2 3 4 5 6 7 + +---+---+---+---+---+---+---+---+ + | CRC32 | ISIZE | + +---+---+---+---+---+---+---+---+ + + + + +Deutsch Informational [Page 5] + +RFC 1952 GZIP File Format Specification May 1996 + + + 2.3.1. Member header and trailer + + ID1 (IDentification 1) + ID2 (IDentification 2) + These have the fixed values ID1 = 31 (0x1f, \037), ID2 = 139 + (0x8b, \213), to identify the file as being in gzip format. + + CM (Compression Method) + This identifies the compression method used in the file. CM + = 0-7 are reserved. CM = 8 denotes the "deflate" + compression method, which is the one customarily used by + gzip and which is documented elsewhere. + + FLG (FLaGs) + This flag byte is divided into individual bits as follows: + + bit 0 FTEXT + bit 1 FHCRC + bit 2 FEXTRA + bit 3 FNAME + bit 4 FCOMMENT + bit 5 reserved + bit 6 reserved + bit 7 reserved + + If FTEXT is set, the file is probably ASCII text. This is + an optional indication, which the compressor may set by + checking a small amount of the input data to see whether any + non-ASCII characters are present. In case of doubt, FTEXT + is cleared, indicating binary data. For systems which have + different file formats for ascii text and binary data, the + decompressor can use FTEXT to choose the appropriate format. + We deliberately do not specify the algorithm used to set + this bit, since a compressor always has the option of + leaving it cleared and a decompressor always has the option + of ignoring it and letting some other program handle issues + of data conversion. + + If FHCRC is set, a CRC16 for the gzip header is present, + immediately before the compressed data. The CRC16 consists + of the two least significant bytes of the CRC32 for all + bytes of the gzip header up to and not including the CRC16. + [The FHCRC bit was never set by versions of gzip up to + 1.2.4, even though it was documented with a different + meaning in gzip 1.2.4.] + + If FEXTRA is set, optional extra fields are present, as + described in a following section. + + + +Deutsch Informational [Page 6] + +RFC 1952 GZIP File Format Specification May 1996 + + + If FNAME is set, an original file name is present, + terminated by a zero byte. The name must consist of ISO + 8859-1 (LATIN-1) characters; on operating systems using + EBCDIC or any other character set for file names, the name + must be translated to the ISO LATIN-1 character set. This + is the original name of the file being compressed, with any + directory components removed, and, if the file being + compressed is on a file system with case insensitive names, + forced to lower case. There is no original file name if the + data was compressed from a source other than a named file; + for example, if the source was stdin on a Unix system, there + is no file name. + + If FCOMMENT is set, a zero-terminated file comment is + present. This comment is not interpreted; it is only + intended for human consumption. The comment must consist of + ISO 8859-1 (LATIN-1) characters. Line breaks should be + denoted by a single line feed character (10 decimal). + + Reserved FLG bits must be zero. + + MTIME (Modification TIME) + This gives the most recent modification time of the original + file being compressed. The time is in Unix format, i.e., + seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this + may cause problems for MS-DOS and other systems that use + local rather than Universal time.) If the compressed data + did not come from a file, MTIME is set to the time at which + compression started. MTIME = 0 means no time stamp is + available. + + XFL (eXtra FLags) + These flags are available for use by specific compression + methods. The "deflate" method (CM = 8) sets these flags as + follows: + + XFL = 2 - compressor used maximum compression, + slowest algorithm + XFL = 4 - compressor used fastest algorithm + + OS (Operating System) + This identifies the type of file system on which compression + took place. This may be useful in determining end-of-line + convention for text files. The currently defined values are + as follows: + + + + + + +Deutsch Informational [Page 7] + +RFC 1952 GZIP File Format Specification May 1996 + + + 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32) + 1 - Amiga + 2 - VMS (or OpenVMS) + 3 - Unix + 4 - VM/CMS + 5 - Atari TOS + 6 - HPFS filesystem (OS/2, NT) + 7 - Macintosh + 8 - Z-System + 9 - CP/M + 10 - TOPS-20 + 11 - NTFS filesystem (NT) + 12 - QDOS + 13 - Acorn RISCOS + 255 - unknown + + XLEN (eXtra LENgth) + If FLG.FEXTRA is set, this gives the length of the optional + extra field. See below for details. + + CRC32 (CRC-32) + This contains a Cyclic Redundancy Check value of the + uncompressed data computed according to CRC-32 algorithm + used in the ISO 3309 standard and in section 8.1.1.6.2 of + ITU-T recommendation V.42. (See http://www.iso.ch for + ordering ISO documents. See gopher://info.itu.ch for an + online version of ITU-T V.42.) + + ISIZE (Input SIZE) + This contains the size of the original (uncompressed) input + data modulo 2^32. + + 2.3.1.1. Extra field + + If the FLG.FEXTRA bit is set, an "extra field" is present in + the header, with total length XLEN bytes. It consists of a + series of subfields, each of the form: + + +---+---+---+---+==================================+ + |SI1|SI2| LEN |... LEN bytes of subfield data ...| + +---+---+---+---+==================================+ + + SI1 and SI2 provide a subfield ID, typically two ASCII letters + with some mnemonic value. Jean-Loup Gailly + is maintaining a registry of subfield + IDs; please send him any subfield ID you wish to use. Subfield + IDs with SI2 = 0 are reserved for future use. The following + IDs are currently defined: + + + +Deutsch Informational [Page 8] + +RFC 1952 GZIP File Format Specification May 1996 + + + SI1 SI2 Data + ---------- ---------- ---- + 0x41 ('A') 0x70 ('P') Apollo file type information + + LEN gives the length of the subfield data, excluding the 4 + initial bytes. + + 2.3.1.2. Compliance + + A compliant compressor must produce files with correct ID1, + ID2, CM, CRC32, and ISIZE, but may set all the other fields in + the fixed-length part of the header to default values (255 for + OS, 0 for all others). The compressor must set all reserved + bits to zero. + + A compliant decompressor must check ID1, ID2, and CM, and + provide an error indication if any of these have incorrect + values. It must examine FEXTRA/XLEN, FNAME, FCOMMENT and FHCRC + at least so it can skip over the optional fields if they are + present. It need not examine any other part of the header or + trailer; in particular, a decompressor may ignore FTEXT and OS + and always produce binary output, and still be compliant. A + compliant decompressor must give an error indication if any + reserved bit is non-zero, since such a bit could indicate the + presence of a new field that would cause subsequent data to be + interpreted incorrectly. + +3. References + + [1] "Information Processing - 8-bit single-byte coded graphic + character sets - Part 1: Latin alphabet No.1" (ISO 8859-1:1987). + The ISO 8859-1 (Latin-1) character set is a superset of 7-bit + ASCII. Files defining this character set are available as + iso_8859-1.* in ftp://ftp.uu.net/graphics/png/documents/ + + [2] ISO 3309 + + [3] ITU-T recommendation V.42 + + [4] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", + available in ftp://ftp.uu.net/pub/archiving/zip/doc/ + + [5] Gailly, J.-L., GZIP documentation, available as gzip-*.tar in + ftp://prep.ai.mit.edu/pub/gnu/ + + [6] Sarwate, D.V., "Computation of Cyclic Redundancy Checks via Table + Look-Up", Communications of the ACM, 31(8), pp.1008-1013. + + + + +Deutsch Informational [Page 9] + +RFC 1952 GZIP File Format Specification May 1996 + + + [7] Schwaderer, W.D., "CRC Calculation", April 85 PC Tech Journal, + pp.118-133. + + [8] ftp://ftp.adelaide.edu.au/pub/rocksoft/papers/crc_v3.txt, + describing the CRC concept. + +4. Security Considerations + + Any data compression method involves the reduction of redundancy in + the data. Consequently, any corruption of the data is likely to have + severe effects and be difficult to correct. Uncompressed text, on + the other hand, will probably still be readable despite the presence + of some corrupted bytes. + + It is recommended that systems using this data format provide some + means of validating the integrity of the compressed data, such as by + setting and checking the CRC-32 check value. + +5. Acknowledgements + + Trademarks cited in this document are the property of their + respective owners. + + Jean-Loup Gailly designed the gzip format and wrote, with Mark Adler, + the related software described in this specification. Glenn + Randers-Pehrson converted this document to RFC and HTML format. + +6. Author's Address + + L. Peter Deutsch + Aladdin Enterprises + 203 Santa Margarita Ave. + Menlo Park, CA 94025 + + Phone: (415) 322-0103 (AM only) + FAX: (415) 322-1734 + EMail: + + Questions about the technical content of this specification can be + sent by email to: + + Jean-Loup Gailly and + Mark Adler + + Editorial comments on this specification can be sent by email to: + + L. Peter Deutsch and + Glenn Randers-Pehrson + + + +Deutsch Informational [Page 10] + +RFC 1952 GZIP File Format Specification May 1996 + + +7. Appendix: Jean-Loup Gailly's gzip utility + + The most widely used implementation of gzip compression, and the + original documentation on which this specification is based, were + created by Jean-Loup Gailly . Since this + implementation is a de facto standard, we mention some more of its + features here. Again, the material in this section is not part of + the specification per se, and implementations need not follow it to + be compliant. + + When compressing or decompressing a file, gzip preserves the + protection, ownership, and modification time attributes on the local + file system, since there is no provision for representing protection + attributes in the gzip file format itself. Since the file format + includes a modification time, the gzip decompressor provides a + command line switch that assigns the modification time from the file, + rather than the local modification time of the compressed input, to + the decompressed output. + +8. Appendix: Sample CRC Code + + The following sample code represents a practical implementation of + the CRC (Cyclic Redundancy Check). (See also ISO 3309 and ITU-T V.42 + for a formal specification.) + + The sample code is in the ANSI C programming language. Non C users + may find it easier to read with these hints: + + & Bitwise AND operator. + ^ Bitwise exclusive-OR operator. + >> Bitwise right shift operator. When applied to an + unsigned quantity, as here, right shift inserts zero + bit(s) at the left. + ! Logical NOT operator. + ++ "n++" increments the variable n. + 0xNNN 0x introduces a hexadecimal (base 16) constant. + Suffix L indicates a long value (at least 32 bits). + + /* Table of CRCs of all 8-bit messages. */ + unsigned long crc_table[256]; + + /* Flag: has the table been computed? Initially false. */ + int crc_table_computed = 0; + + /* Make the table for a fast CRC. */ + void make_crc_table(void) + { + unsigned long c; + + + +Deutsch Informational [Page 11] + +RFC 1952 GZIP File Format Specification May 1996 + + + int n, k; + for (n = 0; n < 256; n++) { + c = (unsigned long) n; + for (k = 0; k < 8; k++) { + if (c & 1) { + c = 0xedb88320L ^ (c >> 1); + } else { + c = c >> 1; + } + } + crc_table[n] = c; + } + crc_table_computed = 1; + } + + /* + Update a running crc with the bytes buf[0..len-1] and return + the updated crc. The crc should be initialized to zero. Pre- and + post-conditioning (one's complement) is performed within this + function so it shouldn't be done by the caller. Usage example: + + unsigned long crc = 0L; + + while (read_buffer(buffer, length) != EOF) { + crc = update_crc(crc, buffer, length); + } + if (crc != original_crc) error(); + */ + unsigned long update_crc(unsigned long crc, + unsigned char *buf, int len) + { + unsigned long c = crc ^ 0xffffffffL; + int n; + + if (!crc_table_computed) + make_crc_table(); + for (n = 0; n < len; n++) { + c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8); + } + return c ^ 0xffffffffL; + } + + /* Return the CRC of the bytes buf[0..len-1]. */ + unsigned long crc(unsigned char *buf, int len) + { + return update_crc(0L, buf, len); + } + + + + +Deutsch Informational [Page 12] + diff --git a/compat/zlib/doc/txtvsbin.txt b/compat/zlib/doc/txtvsbin.txt new file mode 100644 index 0000000..3d0f063 --- /dev/null +++ b/compat/zlib/doc/txtvsbin.txt @@ -0,0 +1,107 @@ +A Fast Method for Identifying Plain Text Files +============================================== + + +Introduction +------------ + +Given a file coming from an unknown source, it is sometimes desirable +to find out whether the format of that file is plain text. Although +this may appear like a simple task, a fully accurate detection of the +file type requires heavy-duty semantic analysis on the file contents. +It is, however, possible to obtain satisfactory results by employing +various heuristics. + +Previous versions of PKZip and other zip-compatible compression tools +were using a crude detection scheme: if more than 80% (4/5) of the bytes +found in a certain buffer are within the range [7..127], the file is +labeled as plain text, otherwise it is labeled as binary. A prominent +limitation of this scheme is the restriction to Latin-based alphabets. +Other alphabets, like Greek, Cyrillic or Asian, make extensive use of +the bytes within the range [128..255], and texts using these alphabets +are most often misidentified by this scheme; in other words, the rate +of false negatives is sometimes too high, which means that the recall +is low. Another weakness of this scheme is a reduced precision, due to +the false positives that may occur when binary files containing large +amounts of textual characters are misidentified as plain text. + +In this article we propose a new, simple detection scheme that features +a much increased precision and a near-100% recall. This scheme is +designed to work on ASCII, Unicode and other ASCII-derived alphabets, +and it handles single-byte encodings (ISO-8859, MacRoman, KOI8, etc.) +and variable-sized encodings (ISO-2022, UTF-8, etc.). Wider encodings +(UCS-2/UTF-16 and UCS-4/UTF-32) are not handled, however. + + +The Algorithm +------------- + +The algorithm works by dividing the set of bytecodes [0..255] into three +categories: +- The white list of textual bytecodes: + 9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255. +- The gray list of tolerated bytecodes: + 7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC). +- The black list of undesired, non-textual bytecodes: + 0 (NUL) to 6, 14 to 31. + +If a file contains at least one byte that belongs to the white list and +no byte that belongs to the black list, then the file is categorized as +plain text; otherwise, it is categorized as binary. (The boundary case, +when the file is empty, automatically falls into the latter category.) + + +Rationale +--------- + +The idea behind this algorithm relies on two observations. + +The first observation is that, although the full range of 7-bit codes +[0..127] is properly specified by the ASCII standard, most control +characters in the range [0..31] are not used in practice. The only +widely-used, almost universally-portable control codes are 9 (TAB), +10 (LF) and 13 (CR). There are a few more control codes that are +recognized on a reduced range of platforms and text viewers/editors: +7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB) and 27 (ESC); but these +codes are rarely (if ever) used alone, without being accompanied by +some printable text. Even the newer, portable text formats such as +XML avoid using control characters outside the list mentioned here. + +The second observation is that most of the binary files tend to contain +control characters, especially 0 (NUL). Even though the older text +detection schemes observe the presence of non-ASCII codes from the range +[128..255], the precision rarely has to suffer if this upper range is +labeled as textual, because the files that are genuinely binary tend to +contain both control characters and codes from the upper range. On the +other hand, the upper range needs to be labeled as textual, because it +is used by virtually all ASCII extensions. In particular, this range is +used for encoding non-Latin scripts. + +Since there is no counting involved, other than simply observing the +presence or the absence of some byte values, the algorithm produces +consistent results, regardless what alphabet encoding is being used. +(If counting were involved, it could be possible to obtain different +results on a text encoded, say, using ISO-8859-16 versus UTF-8.) + +There is an extra category of plain text files that are "polluted" with +one or more black-listed codes, either by mistake or by peculiar design +considerations. In such cases, a scheme that tolerates a small fraction +of black-listed codes would provide an increased recall (i.e. more true +positives). This, however, incurs a reduced precision overall, since +false positives are more likely to appear in binary files that contain +large chunks of textual data. Furthermore, "polluted" plain text should +be regarded as binary by general-purpose text detection schemes, because +general-purpose text processing algorithms might not be applicable. +Under this premise, it is safe to say that our detection method provides +a near-100% recall. + +Experiments have been run on many files coming from various platforms +and applications. We tried plain text files, system logs, source code, +formatted office documents, compiled object code, etc. The results +confirm the optimistic assumptions about the capabilities of this +algorithm. + + +-- +Cosmin Truta +Last updated: 2006-May-28 diff --git a/compat/zlib/example.c b/compat/zlib/example.c index 56ad08c..d315261 100644 --- a/compat/zlib/example.c +++ b/compat/zlib/example.c @@ -1,12 +1,12 @@ /* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-2004 Jean-loup Gailly. + * Copyright (C) 1995-2006 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: example.c,v 1.1 2008/12/19 14:44:48 dkf Exp $ */ +/* @(#) $Id: example.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ -#include #include "zlib.h" +#include #ifdef STDC # include diff --git a/compat/zlib/examples/README.examples b/compat/zlib/examples/README.examples index 5632d7a..56a3171 100644 --- a/compat/zlib/examples/README.examples +++ b/compat/zlib/examples/README.examples @@ -1,4 +1,10 @@ -This directory contains examples of the use of zlib. +This directory contains examples of the use of zlib and other relevant +programs and documentation. + +enough.c + calculation and justification of ENOUGH parameter in inftrees.h + - calculates the maximum table space used in inflate tree + construction over all possible Huffman codes fitblk.c compress just enough input to nearly fill a requested output size @@ -23,9 +29,10 @@ gzjoin.c gzlog.c gzlog.h - efficiently maintain a message log file in gzip format - - illustrates use of raw deflate and Z_SYNC_FLUSH - - illustrates use of gzip header extra field + efficiently and robustly maintain a message log file in gzip format + - illustrates use of raw deflate, Z_PARTIAL_FLUSH, deflatePrime(), + and deflateSetDictionary() + - illustrates use of a gzip header extra field zlib_how.html painfully comprehensive description of zpipe.c (see below) diff --git a/compat/zlib/examples/enough.c b/compat/zlib/examples/enough.c new file mode 100644 index 0000000..c40410b --- /dev/null +++ b/compat/zlib/examples/enough.c @@ -0,0 +1,569 @@ +/* enough.c -- determine the maximum size of inflate's Huffman code tables over + * all possible valid and complete Huffman codes, subject to a length limit. + * Copyright (C) 2007, 2008 Mark Adler + * Version 1.3 17 February 2008 Mark Adler + */ + +/* Version history: + 1.0 3 Jan 2007 First version (derived from codecount.c version 1.4) + 1.1 4 Jan 2007 Use faster incremental table usage computation + Prune examine() search on previously visited states + 1.2 5 Jan 2007 Comments clean up + As inflate does, decrease root for short codes + Refuse cases where inflate would increase root + 1.3 17 Feb 2008 Add argument for initial root table size + Fix bug for initial root table size == max - 1 + Use a macro to compute the history index + */ + +/* + Examine all possible Huffman codes for a given number of symbols and a + maximum code length in bits to determine the maximum table size for zilb's + inflate. Only complete Huffman codes are counted. + + Two codes are considered distinct if the vectors of the number of codes per + length are not identical. So permutations of the symbol assignments result + in the same code for the counting, as do permutations of the assignments of + the bit values to the codes (i.e. only canonical codes are counted). + + We build a code from shorter to longer lengths, determining how many symbols + are coded at each length. At each step, we have how many symbols remain to + be coded, what the last code length used was, and how many bit patterns of + that length remain unused. Then we add one to the code length and double the + number of unused patterns to graduate to the next code length. We then + assign all portions of the remaining symbols to that code length that + preserve the properties of a correct and eventually complete code. Those + properties are: we cannot use more bit patterns than are available; and when + all the symbols are used, there are exactly zero possible bit patterns + remaining. + + The inflate Huffman decoding algorithm uses two-level lookup tables for + speed. There is a single first-level table to decode codes up to root bits + in length (root == 9 in the current inflate implementation). The table + has 1 << root entries and is indexed by the next root bits of input. Codes + shorter than root bits have replicated table entries, so that the correct + entry is pointed to regardless of the bits that follow the short code. If + the code is longer than root bits, then the table entry points to a second- + level table. The size of that table is determined by the longest code with + that root-bit prefix. If that longest code has length len, then the table + has size 1 << (len - root), to index the remaining bits in that set of + codes. Each subsequent root-bit prefix then has its own sub-table. The + total number of table entries required by the code is calculated + incrementally as the number of codes at each bit length is populated. When + all of the codes are shorter than root bits, then root is reduced to the + longest code length, resulting in a single, smaller, one-level table. + + The inflate algorithm also provides for small values of root (relative to + the log2 of the number of symbols), where the shortest code has more bits + than root. In that case, root is increased to the length of the shortest + code. This program, by design, does not handle that case, so it is verified + that the number of symbols is less than 2^(root + 1). + + In order to speed up the examination (by about ten orders of magnitude for + the default arguments), the intermediate states in the build-up of a code + are remembered and previously visited branches are pruned. The memory + required for this will increase rapidly with the total number of symbols and + the maximum code length in bits. However this is a very small price to pay + for the vast speedup. + + First, all of the possible Huffman codes are counted, and reachable + intermediate states are noted by a non-zero count in a saved-results array. + Second, the intermediate states that lead to (root + 1) bit or longer codes + are used to look at all sub-codes from those junctures for their inflate + memory usage. (The amount of memory used is not affected by the number of + codes of root bits or less in length.) Third, the visited states in the + construction of those sub-codes and the associated calculation of the table + size is recalled in order to avoid recalculating from the same juncture. + Beginning the code examination at (root + 1) bit codes, which is enabled by + identifying the reachable nodes, accounts for about six of the orders of + magnitude of improvement for the default arguments. About another four + orders of magnitude come from not revisiting previous states. Out of + approximately 2x10^16 possible Huffman codes, only about 2x10^6 sub-codes + need to be examined to cover all of the possible table memory usage cases + for the default arguments of 286 symbols limited to 15-bit codes. + + Note that an unsigned long long type is used for counting. It is quite easy + to exceed the capacity of an eight-byte integer with a large number of + symbols and a large maximum code length, so multiple-precision arithmetic + would need to replace the unsigned long long arithmetic in that case. This + program will abort if an overflow occurs. The big_t type identifies where + the counting takes place. + + An unsigned long long type is also used for calculating the number of + possible codes remaining at the maximum length. This limits the maximum + code length to the number of bits in a long long minus the number of bits + needed to represent the symbols in a flat code. The code_t type identifies + where the bit pattern counting takes place. + */ + +#include +#include +#include +#include + +#define local static + +/* special data types */ +typedef unsigned long long big_t; /* type for code counting */ +typedef unsigned long long code_t; /* type for bit pattern counting */ +struct tab { /* type for been here check */ + size_t len; /* length of bit vector in char's */ + char *vec; /* allocated bit vector */ +}; + +/* The array for saving results, num[], is indexed with this triplet: + + syms: number of symbols remaining to code + left: number of available bit patterns at length len + len: number of bits in the codes currently being assigned + + Those indices are constrained thusly when saving results: + + syms: 3..totsym (totsym == total symbols to code) + left: 2..syms - 1, but only the evens (so syms == 8 -> 2, 4, 6) + len: 1..max - 1 (max == maximum code length in bits) + + syms == 2 is not saved since that immediately leads to a single code. left + must be even, since it represents the number of available bit patterns at + the current length, which is double the number at the previous length. + left ends at syms-1 since left == syms immediately results in a single code. + (left > sym is not allowed since that would result in an incomplete code.) + len is less than max, since the code completes immediately when len == max. + + The offset into the array is calculated for the three indices with the + first one (syms) being outermost, and the last one (len) being innermost. + We build the array with length max-1 lists for the len index, with syms-3 + of those for each symbol. There are totsym-2 of those, with each one + varying in length as a function of sym. See the calculation of index in + count() for the index, and the calculation of size in main() for the size + of the array. + + For the deflate example of 286 symbols limited to 15-bit codes, the array + has 284,284 entries, taking up 2.17 MB for an 8-byte big_t. More than + half of the space allocated for saved results is actually used -- not all + possible triplets are reached in the generation of valid Huffman codes. + */ + +/* The array for tracking visited states, done[], is itself indexed identically + to the num[] array as described above for the (syms, left, len) triplet. + Each element in the array is further indexed by the (mem, rem) doublet, + where mem is the amount of inflate table space used so far, and rem is the + remaining unused entries in the current inflate sub-table. Each indexed + element is simply one bit indicating whether the state has been visited or + not. Since the ranges for mem and rem are not known a priori, each bit + vector is of a variable size, and grows as needed to accommodate the visited + states. mem and rem are used to calculate a single index in a triangular + array. Since the range of mem is expected in the default case to be about + ten times larger than the range of rem, the array is skewed to reduce the + memory usage, with eight times the range for mem than for rem. See the + calculations for offset and bit in beenhere() for the details. + + For the deflate example of 286 symbols limited to 15-bit codes, the bit + vectors grow to total approximately 21 MB, in addition to the 4.3 MB done[] + array itself. + */ + +/* Globals to avoid propagating constants or constant pointers recursively */ +local int max; /* maximum allowed bit length for the codes */ +local int root; /* size of base code table in bits */ +local int large; /* largest code table so far */ +local size_t size; /* number of elements in num and done */ +local int *code; /* number of symbols assigned to each bit length */ +local big_t *num; /* saved results array for code counting */ +local struct tab *done; /* states already evaluated array */ + +/* Index function for num[] and done[] */ +#define INDEX(i,j,k) (((size_t)((i-1)>>1)*((i-2)>>1)+(j>>1)-1)*(max-1)+k-1) + +/* Free allocated space. Uses globals code, num, and done. */ +local void cleanup(void) +{ + size_t n; + + if (done != NULL) { + for (n = 0; n < size; n++) + if (done[n].len) + free(done[n].vec); + free(done); + } + if (num != NULL) + free(num); + if (code != NULL) + free(code); +} + +/* Return the number of possible Huffman codes using bit patterns of lengths + len through max inclusive, coding syms symbols, with left bit patterns of + length len unused -- return -1 if there is an overflow in the counting. + Keep a record of previous results in num to prevent repeating the same + calculation. Uses the globals max and num. */ +local big_t count(int syms, int len, int left) +{ + big_t sum; /* number of possible codes from this juncture */ + big_t got; /* value returned from count() */ + int least; /* least number of syms to use at this juncture */ + int most; /* most number of syms to use at this juncture */ + int use; /* number of bit patterns to use in next call */ + size_t index; /* index of this case in *num */ + + /* see if only one possible code */ + if (syms == left) + return 1; + + /* note and verify the expected state */ + assert(syms > left && left > 0 && len < max); + + /* see if we've done this one already */ + index = INDEX(syms, left, len); + got = num[index]; + if (got) + return got; /* we have -- return the saved result */ + + /* we need to use at least this many bit patterns so that the code won't be + incomplete at the next length (more bit patterns than symbols) */ + least = (left << 1) - syms; + if (least < 0) + least = 0; + + /* we can use at most this many bit patterns, lest there not be enough + available for the remaining symbols at the maximum length (if there were + no limit to the code length, this would become: most = left - 1) */ + most = (((code_t)left << (max - len)) - syms) / + (((code_t)1 << (max - len)) - 1); + + /* count all possible codes from this juncture and add them up */ + sum = 0; + for (use = least; use <= most; use++) { + got = count(syms - use, len + 1, (left - use) << 1); + sum += got; + if (got == -1 || sum < got) /* overflow */ + return -1; + } + + /* verify that all recursive calls are productive */ + assert(sum != 0); + + /* save the result and return it */ + num[index] = sum; + return sum; +} + +/* Return true if we've been here before, set to true if not. Set a bit in a + bit vector to indicate visiting this state. Each (syms,len,left) state + has a variable size bit vector indexed by (mem,rem). The bit vector is + lengthened if needed to allow setting the (mem,rem) bit. */ +local int beenhere(int syms, int len, int left, int mem, int rem) +{ + size_t index; /* index for this state's bit vector */ + size_t offset; /* offset in this state's bit vector */ + int bit; /* mask for this state's bit */ + size_t length; /* length of the bit vector in bytes */ + char *vector; /* new or enlarged bit vector */ + + /* point to vector for (syms,left,len), bit in vector for (mem,rem) */ + index = INDEX(syms, left, len); + mem -= 1 << root; + offset = (mem >> 3) + rem; + offset = ((offset * (offset + 1)) >> 1) + rem; + bit = 1 << (mem & 7); + + /* see if we've been here */ + length = done[index].len; + if (offset < length && (done[index].vec[offset] & bit) != 0) + return 1; /* done this! */ + + /* we haven't been here before -- set the bit to show we have now */ + + /* see if we need to lengthen the vector in order to set the bit */ + if (length <= offset) { + /* if we have one already, enlarge it, zero out the appended space */ + if (length) { + do { + length <<= 1; + } while (length <= offset); + vector = realloc(done[index].vec, length); + if (vector != NULL) + memset(vector + done[index].len, 0, length - done[index].len); + } + + /* otherwise we need to make a new vector and zero it out */ + else { + length = 1 << (len - root); + while (length <= offset) + length <<= 1; + vector = calloc(length, sizeof(char)); + } + + /* in either case, bail if we can't get the memory */ + if (vector == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + cleanup(); + exit(1); + } + + /* install the new vector */ + done[index].len = length; + done[index].vec = vector; + } + + /* set the bit */ + done[index].vec[offset] |= bit; + return 0; +} + +/* Examine all possible codes from the given node (syms, len, left). Compute + the amount of memory required to build inflate's decoding tables, where the + number of code structures used so far is mem, and the number remaining in + the current sub-table is rem. Uses the globals max, code, root, large, and + done. */ +local void examine(int syms, int len, int left, int mem, int rem) +{ + int least; /* least number of syms to use at this juncture */ + int most; /* most number of syms to use at this juncture */ + int use; /* number of bit patterns to use in next call */ + + /* see if we have a complete code */ + if (syms == left) { + /* set the last code entry */ + code[len] = left; + + /* complete computation of memory used by this code */ + while (rem < left) { + left -= rem; + rem = 1 << (len - root); + mem += rem; + } + assert(rem == left); + + /* if this is a new maximum, show the entries used and the sub-code */ + if (mem > large) { + large = mem; + printf("max %d: ", mem); + for (use = root + 1; use <= max; use++) + if (code[use]) + printf("%d[%d] ", code[use], use); + putchar('\n'); + fflush(stdout); + } + + /* remove entries as we drop back down in the recursion */ + code[len] = 0; + return; + } + + /* prune the tree if we can */ + if (beenhere(syms, len, left, mem, rem)) + return; + + /* we need to use at least this many bit patterns so that the code won't be + incomplete at the next length (more bit patterns than symbols) */ + least = (left << 1) - syms; + if (least < 0) + least = 0; + + /* we can use at most this many bit patterns, lest there not be enough + available for the remaining symbols at the maximum length (if there were + no limit to the code length, this would become: most = left - 1) */ + most = (((code_t)left << (max - len)) - syms) / + (((code_t)1 << (max - len)) - 1); + + /* occupy least table spaces, creating new sub-tables as needed */ + use = least; + while (rem < use) { + use -= rem; + rem = 1 << (len - root); + mem += rem; + } + rem -= use; + + /* examine codes from here, updating table space as we go */ + for (use = least; use <= most; use++) { + code[len] = use; + examine(syms - use, len + 1, (left - use) << 1, + mem + (rem ? 1 << (len - root) : 0), rem << 1); + if (rem == 0) { + rem = 1 << (len - root); + mem += rem; + } + rem--; + } + + /* remove entries as we drop back down in the recursion */ + code[len] = 0; +} + +/* Look at all sub-codes starting with root + 1 bits. Look at only the valid + intermediate code states (syms, left, len). For each completed code, + calculate the amount of memory required by inflate to build the decoding + tables. Find the maximum amount of memory required and show the code that + requires that maximum. Uses the globals max, root, and num. */ +local void enough(int syms) +{ + int n; /* number of remaing symbols for this node */ + int left; /* number of unused bit patterns at this length */ + size_t index; /* index of this case in *num */ + + /* clear code */ + for (n = 0; n <= max; n++) + code[n] = 0; + + /* look at all (root + 1) bit and longer codes */ + large = 1 << root; /* base table */ + if (root < max) /* otherwise, there's only a base table */ + for (n = 3; n <= syms; n++) + for (left = 2; left < n; left += 2) + { + /* look at all reachable (root + 1) bit nodes, and the + resulting codes (complete at root + 2 or more) */ + index = INDEX(n, left, root + 1); + if (root + 1 < max && num[index]) /* reachable node */ + examine(n, root + 1, left, 1 << root, 0); + + /* also look at root bit codes with completions at root + 1 + bits (not saved in num, since complete), just in case */ + if (num[index - 1] && n <= left << 1) + examine((n - left) << 1, root + 1, (n - left) << 1, + 1 << root, 0); + } + + /* done */ + printf("done: maximum of %d table entries\n", large); +} + +/* + Examine and show the total number of possible Huffman codes for a given + maximum number of symbols, initial root table size, and maximum code length + in bits -- those are the command arguments in that order. The default + values are 286, 9, and 15 respectively, for the deflate literal/length code. + The possible codes are counted for each number of coded symbols from two to + the maximum. The counts for each of those and the total number of codes are + shown. The maximum number of inflate table entires is then calculated + across all possible codes. Each new maximum number of table entries and the + associated sub-code (starting at root + 1 == 10 bits) is shown. + + To count and examine Huffman codes that are not length-limited, provide a + maximum length equal to the number of symbols minus one. + + For the deflate literal/length code, use "enough". For the deflate distance + code, use "enough 30 6". + + This uses the %llu printf format to print big_t numbers, which assumes that + big_t is an unsigned long long. If the big_t type is changed (for example + to a multiple precision type), the method of printing will also need to be + updated. + */ +int main(int argc, char **argv) +{ + int syms; /* total number of symbols to code */ + int n; /* number of symbols to code for this run */ + big_t got; /* return value of count() */ + big_t sum; /* accumulated number of codes over n */ + + /* set up globals for cleanup() */ + code = NULL; + num = NULL; + done = NULL; + + /* get arguments -- default to the deflate literal/length code */ + syms = 286; + root = 9; + max = 15; + if (argc > 1) { + syms = atoi(argv[1]); + if (argc > 2) { + root = atoi(argv[2]); + if (argc > 3) + max = atoi(argv[3]); + } + } + if (argc > 4 || syms < 2 || root < 1 || max < 1) { + fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n", + stderr); + return 1; + } + + /* if not restricting the code length, the longest is syms - 1 */ + if (max > syms - 1) + max = syms - 1; + + /* determine the number of bits in a code_t */ + n = 0; + while (((code_t)1 << n) != 0) + n++; + + /* make sure that the calculation of most will not overflow */ + if (max > n || syms - 2 >= (((code_t)0 - 1) >> (max - 1))) { + fputs("abort: code length too long for internal types\n", stderr); + return 1; + } + + /* reject impossible code requests */ + if (syms - 1 > ((code_t)1 << max) - 1) { + fprintf(stderr, "%d symbols cannot be coded in %d bits\n", + syms, max); + return 1; + } + + /* allocate code vector */ + code = calloc(max + 1, sizeof(int)); + if (code == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + return 1; + } + + /* determine size of saved results array, checking for overflows, + allocate and clear the array (set all to zero with calloc()) */ + if (syms == 2) /* iff max == 1 */ + num = NULL; /* won't be saving any results */ + else { + size = syms >> 1; + if (size > ((size_t)0 - 1) / (n = (syms - 1) >> 1) || + (size *= n, size > ((size_t)0 - 1) / (n = max - 1)) || + (size *= n, size > ((size_t)0 - 1) / sizeof(big_t)) || + (num = calloc(size, sizeof(big_t))) == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + cleanup(); + return 1; + } + } + + /* count possible codes for all numbers of symbols, add up counts */ + sum = 0; + for (n = 2; n <= syms; n++) { + got = count(n, 1, 2); + sum += got; + if (got == -1 || sum < got) { /* overflow */ + fputs("abort: can't count that high!\n", stderr); + cleanup(); + return 1; + } + printf("%llu %d-codes\n", got, n); + } + printf("%llu total codes for 2 to %d symbols", sum, syms); + if (max < syms - 1) + printf(" (%d-bit length limit)\n", max); + else + puts(" (no length limit)"); + + /* allocate and clear done array for beenhere() */ + if (syms == 2) + done = NULL; + else if (size > ((size_t)0 - 1) / sizeof(struct tab) || + (done = calloc(size, sizeof(struct tab))) == NULL) { + fputs("abort: unable to allocate enough memory\n", stderr); + cleanup(); + return 1; + } + + /* find and show maximum inflate table usage */ + if (root > max) /* reduce root to max length */ + root = max; + if (syms < ((code_t)1 << (root + 1))) + enough(syms); + else + puts("cannot handle minimum code lengths > root"); + + /* done */ + cleanup(); + return 0; +} diff --git a/compat/zlib/examples/gun.c b/compat/zlib/examples/gun.c index bfec590..72b0882 100644 --- a/compat/zlib/examples/gun.c +++ b/compat/zlib/examples/gun.c @@ -1,7 +1,7 @@ /* gun.c -- simple gunzip to give an example of the use of inflateBack() - * Copyright (C) 2003, 2005 Mark Adler + * Copyright (C) 2003, 2005, 2008, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h - Version 1.3 12 June 2005 Mark Adler */ + Version 1.6 17 January 2010 Mark Adler */ /* Version history: 1.0 16 Feb 2003 First version for testing of inflateBack() @@ -15,6 +15,9 @@ 1.2 20 Mar 2005 Add Unix compress (LZW) decompression Copy file attributes from input file to output file 1.3 12 Jun 2005 Add casts for error messages [Oberhumer] + 1.4 8 Dec 2006 LZW decompression speed improvements + 1.5 9 Feb 2008 Avoid warning in latest version of gcc + 1.6 17 Jan 2010 Avoid signed/unsigned comparison warnings */ /* @@ -197,14 +200,14 @@ local int lunpipe(unsigned have, unsigned char *next, struct ind *indp, int outfile, z_stream *strm) { int last; /* last byte read by NEXT(), or -1 if EOF */ - int chunk; /* bytes left in current chunk */ + unsigned chunk; /* bytes left in current chunk */ int left; /* bits left in rem */ unsigned rem; /* unused bits from input */ int bits; /* current bits per code */ unsigned code; /* code, table traversal index */ unsigned mask; /* mask for current bits codes */ int max; /* maximum bits per code for this stream */ - int flags; /* compress flags, then block compress flag */ + unsigned flags; /* compress flags, then block compress flag */ unsigned end; /* last valid entry in prefix/suffix tables */ unsigned temp; /* current code */ unsigned prev; /* previous code */ @@ -212,6 +215,7 @@ local int lunpipe(unsigned have, unsigned char *next, struct ind *indp, unsigned stack; /* next position for reversed string */ unsigned outcnt; /* bytes in output buffer */ struct outd outd; /* output structure */ + unsigned char *p; /* set up output */ outd.outfile = outfile; @@ -322,10 +326,12 @@ local int lunpipe(unsigned have, unsigned char *next, struct ind *indp, } /* walk through linked list to generate output in reverse order */ + p = match + stack; while (code >= 256) { - match[stack++] = suffix[code]; + *p++ = suffix[code]; code = prefix[code]; } + stack = p - match; match[stack++] = (unsigned char)code; final = code; @@ -349,9 +355,11 @@ local int lunpipe(unsigned have, unsigned char *next, struct ind *indp, } outcnt = 0; } + p = match + stack; do { - outbuf[outcnt++] = match[--stack]; - } while (stack); + outbuf[outcnt++] = *--p; + } while (p > match); + stack = 0; /* loop for next code with final and prev as the last match, rem and left provide the first 0..7 bits of the next code, end is the last @@ -375,7 +383,7 @@ local int gunpipe(z_stream *strm, int infile, int outfile) { int ret, first, last; unsigned have, flags, len; - unsigned char *next; + unsigned char *next = NULL; struct ind ind, *indp; struct outd outd; @@ -471,10 +479,10 @@ local int gunpipe(z_stream *strm, int infile, int outfile) /* check trailer */ ret = Z_BUF_ERROR; - if (NEXT() != (outd.crc & 0xff) || - NEXT() != ((outd.crc >> 8) & 0xff) || - NEXT() != ((outd.crc >> 16) & 0xff) || - NEXT() != ((outd.crc >> 24) & 0xff)) { + if (NEXT() != (int)(outd.crc & 0xff) || + NEXT() != (int)((outd.crc >> 8) & 0xff) || + NEXT() != (int)((outd.crc >> 16) & 0xff) || + NEXT() != (int)((outd.crc >> 24) & 0xff)) { /* crc error */ if (last != -1) { strm->msg = (char *)"incorrect data check"; @@ -482,10 +490,10 @@ local int gunpipe(z_stream *strm, int infile, int outfile) } break; } - if (NEXT() != (outd.total & 0xff) || - NEXT() != ((outd.total >> 8) & 0xff) || - NEXT() != ((outd.total >> 16) & 0xff) || - NEXT() != ((outd.total >> 24) & 0xff)) { + if (NEXT() != (int)(outd.total & 0xff) || + NEXT() != (int)((outd.total >> 8) & 0xff) || + NEXT() != (int)((outd.total >> 16) & 0xff) || + NEXT() != (int)((outd.total >> 24) & 0xff)) { /* length error */ if (last != -1) { strm->msg = (char *)"incorrect length check"; @@ -642,8 +650,8 @@ int main(int argc, char **argv) argv++; test = 0; if (argc && strcmp(*argv, "-h") == 0) { - fprintf(stderr, "gun 1.3 (12 Jun 2005)\n"); - fprintf(stderr, "Copyright (c) 2005 Mark Adler\n"); + fprintf(stderr, "gun 1.6 (17 Jan 2010)\n"); + fprintf(stderr, "Copyright (C) 2003-2010 Mark Adler\n"); fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n"); return 0; } diff --git a/compat/zlib/examples/gzlog.c b/compat/zlib/examples/gzlog.c index f71f817..d70aaca 100644 --- a/compat/zlib/examples/gzlog.c +++ b/compat/zlib/examples/gzlog.c @@ -1,413 +1,1058 @@ /* * gzlog.c - * Copyright (C) 2004 Mark Adler + * Copyright (C) 2004, 2008 Mark Adler, all rights reserved * For conditions of distribution and use, see copyright notice in gzlog.h - * version 1.0, 26 Nov 2004 - * + * version 2.0, 25 Apr 2008 */ -#include /* memcmp() */ -#include /* malloc(), free(), NULL */ -#include /* size_t, off_t */ -#include /* read(), close(), sleep(), ftruncate(), */ - /* lseek() */ -#include /* open() */ -#include /* flock() */ -#include "zlib.h" /* deflateInit2(), deflate(), deflateEnd() */ +/* + gzlog provides a mechanism for frequently appending short strings to a gzip + file that is efficient both in execution time and compression ratio. The + strategy is to write the short strings in an uncompressed form to the end of + the gzip file, only compressing when the amount of uncompressed data has + reached a given threshold. + + gzlog also provides protection against interruptions in the process due to + system crashes. The status of the operation is recorded in an extra field + in the gzip file, and is only updated once the gzip file is brought to a + valid state. The last data to be appended or compressed is saved in an + auxiliary file, so that if the operation is interrupted, it can be completed + the next time an append operation is attempted. + + gzlog maintains another auxiliary file with the last 32K of data from the + compressed portion, which is preloaded for the compression of the subsequent + data. This minimizes the impact to the compression ratio of appending. + */ + +/* + Operations Concept: + + Files (log name "foo"): + foo.gz -- gzip file with the complete log + foo.add -- last message to append or last data to compress + foo.dict -- dictionary of the last 32K of data for next compression + foo.temp -- temporary dictionary file for compression after this one + foo.lock -- lock file for reading and writing the other files + foo.repairs -- log file for log file recovery operations (not compressed) + + gzip file structure: + - fixed-length (no file name) header with extra field (see below) + - compressed data ending initially with empty stored block + - uncompressed data filling out originally empty stored block and + subsequent stored blocks as needed (16K max each) + - gzip trailer + - no junk at end (no other gzip streams) + + When appending data, the information in the first three items above plus the + foo.add file are sufficient to recover an interrupted append operation. The + extra field has the necessary information to restore the start of the last + stored block and determine where to append the data in the foo.add file, as + well as the crc and length of the gzip data before the append operation. + + The foo.add file is created before the gzip file is marked for append, and + deleted after the gzip file is marked as complete. So if the append + operation is interrupted, the data to add will still be there. If due to + some external force, the foo.add file gets deleted between when the append + operation was interrupted and when recovery is attempted, the gzip file will + still be restored, but without the appended data. + + When compressing data, the information in the first two items above plus the + foo.add file are sufficient to recover an interrupted compress operation. + The extra field has the necessary information to find the end of the + compressed data, and contains both the crc and length of just the compressed + data and of the complete set of data including the contents of the foo.add + file. + + Again, the foo.add file is maintained during the compress operation in case + of an interruption. If in the unlikely event the foo.add file with the data + to be compressed is missing due to some external force, a gzip file with + just the previous compressed data will be reconstructed. In this case, all + of the data that was to be compressed is lost (approximately one megabyte). + This will not occur if all that happened was an interruption of the compress + operation. + + The third state that is marked is the replacement of the old dictionary with + the new dictionary after a compress operation. Once compression is + complete, the gzip file is marked as being in the replace state. This + completes the gzip file, so an interrupt after being so marked does not + result in recompression. Then the dictionary file is replaced, and the gzip + file is marked as completed. This state prevents the possibility of + restarting compression with the wrong dictionary file. + + All three operations are wrapped by a lock/unlock procedure. In order to + gain exclusive access to the log files, first a foo.lock file must be + exclusively created. When all operations are complete, the lock is + released by deleting the foo.lock file. If when attempting to create the + lock file, it already exists and the modify time of the lock file is more + than five minutes old (set by the PATIENCE define below), then the old + lock file is considered stale and deleted, and the exclusive creation of + the lock file is retried. To assure that there are no false assessments + of the staleness of the lock file, the operations periodically touch the + lock file to update the modified date. + + Following is the definition of the extra field with all of the information + required to enable the above append and compress operations and their + recovery if interrupted. Multi-byte values are stored little endian + (consistent with the gzip format). File pointers are eight bytes long. + The crc's and lengths for the gzip trailer are four bytes long. (Note that + the length at the end of a gzip file is used for error checking only, and + for large files is actually the length modulo 2^32.) The stored block + length is two bytes long. The gzip extra field two-byte identification is + "ap" for append. It is assumed that writing the extra field to the file is + an "atomic" operation. That is, either all of the extra field is written + to the file, or none of it is, if the operation is interrupted right at the + point of updating the extra field. This is a reasonable assumption, since + the extra field is within the first 52 bytes of the file, which is smaller + than any expected block size for a mass storage device (usually 512 bytes or + larger). + + Extra field (35 bytes): + - Pointer to first stored block length -- this points to the two-byte length + of the first stored block, which is followed by the two-byte, one's + complement of that length. The stored block length is preceded by the + three-bit header of the stored block, which is the actual start of the + stored block in the deflate format. See the bit offset field below. + - Pointer to the last stored block length. This is the same as above, but + for the last stored block of the uncompressed data in the gzip file. + Initially this is the same as the first stored block length pointer. + When the stored block gets to 16K (see the MAX_STORE define), then a new + stored block as added, at which point the last stored block length pointer + is different from the first stored block length pointer. When they are + different, the first bit of the last stored block header is eight bits, or + one byte back from the block length. + - Compressed data crc and length. This is the crc and length of the data + that is in the compressed portion of the deflate stream. These are used + only in the event that the foo.add file containing the data to compress is + lost after a compress operation is interrupted. + - Total data crc and length. This is the crc and length of all of the data + stored in the gzip file, compressed and uncompressed. It is used to + reconstruct the gzip trailer when compressing, as well as when recovering + interrupted operations. + - Final stored block length. This is used to quickly find where to append, + and allows the restoration of the original final stored block state when + an append operation is interrupted. + - First stored block start as the number of bits back from the final stored + block first length byte. This value is in the range of 3..10, and is + stored as the low three bits of the final byte of the extra field after + subtracting three (0..7). This allows the last-block bit of the stored + block header to be updated when a new stored block is added, for the case + when the first stored block and the last stored block are the same. (When + they are different, the numbers of bits back is known to be eight.) This + also allows for new compressed data to be appended to the old compressed + data in the compress operation, overwriting the previous first stored + block, or for the compressed data to be terminated and a valid gzip file + reconstructed on the off chance that a compression operation was + interrupted and the data to compress in the foo.add file was deleted. + - The operation in process. This is the next two bits in the last byte (the + bits under the mask 0x18). The are interpreted as 0: nothing in process, + 1: append in process, 2: compress in process, 3: replace in process. + - The top three bits of the last byte in the extra field are reserved and + are currently set to zero. + + Main procedure: + - Exclusively create the foo.lock file using the O_CREAT and O_EXCL modes of + the system open() call. If the modify time of an existing lock file is + more than PATIENCE seconds old, then the lock file is deleted and the + exclusive create is retried. + - Load the extra field from the foo.gz file, and see if an operation was in + progress but not completed. If so, apply the recovery procedure below. + - Perform the append procedure with the provided data. + - If the uncompressed data in the foo.gz file is 1MB or more, apply the + compress procedure. + - Delete the foo.lock file. + + Append procedure: + - Put what to append in the foo.add file so that the operation can be + restarted if this procedure is interrupted. + - Mark the foo.gz extra field with the append operation in progress. + + Restore the original last-block bit and stored block length of the last + stored block from the information in the extra field, in case a previous + append operation was interrupted. + - Append the provided data to the last stored block, creating new stored + blocks as needed and updating the stored blocks last-block bits and + lengths. + - Update the crc and length with the new data, and write the gzip trailer. + - Write over the extra field (with a single write operation) with the new + pointers, lengths, and crc's, and mark the gzip file as not in process. + Though there is still a foo.add file, it will be ignored since nothing + is in process. If a foo.add file is leftover from a previously + completed operation, it is truncated when writing new data to it. + - Delete the foo.add file. + + Compress and replace procedures: + - Read all of the uncompressed data in the stored blocks in foo.gz and write + it to foo.add. Also write foo.temp with the last 32K of that data to + provide a dictionary for the next invocation of this procedure. + - Rewrite the extra field marking foo.gz with a compression in process. + * If there is no data provided to compress (due to a missing foo.add file + when recovering), reconstruct and truncate the foo.gz file to contain + only the previous compressed data and proceed to the step after the next + one. Otherwise ... + - Compress the data with the dictionary in foo.dict, and write to the + foo.gz file starting at the bit immediately following the last previously + compressed block. If there is no foo.dict, proceed anyway with the + compression at slightly reduced efficiency. (For the foo.dict file to be + missing requires some external failure beyond simply the interruption of + a compress operation.) During this process, the foo.lock file is + periodically touched to assure that that file is not considered stale by + another process before we're done. The deflation is terminated with a + non-last empty static block (10 bits long), that is then located and + written over by a last-bit-set empty stored block. + - Append the crc and length of the data in the gzip file (previously + calculated during the append operations). + - Write over the extra field with the updated stored block offsets, bits + back, crc's, and lengths, and mark foo.gz as in process for a replacement + of the dictionary. + @ Delete the foo.add file. + - Replace foo.dict with foo.temp. + - Write over the extra field, marking foo.gz as complete. + + Recovery procedure: + - If not a replace recovery, read in the foo.add file, and provide that data + to the appropriate recovery below. If there is no foo.add file, provide + a zero data length to the recovery. In that case, the append recovery + restores the foo.gz to the previous compressed + uncompressed data state. + For the the compress recovery, a missing foo.add file results in foo.gz + being restored to the previous compressed-only data state. + - Append recovery: + - Pick up append at + step above + - Compress recovery: + - Pick up compress at * step above + - Replace recovery: + - Pick up compress at @ step above + - Log the repair with a date stamp in foo.repairs + */ + +#include +#include /* rename, fopen, fprintf, fclose */ +#include /* malloc, free */ +#include /* strlen, strrchr, strcpy, strncpy, strcmp */ +#include /* open */ +#include /* lseek, read, write, close, unlink, sleep, */ + /* ftruncate, fsync */ +#include /* errno */ +#include /* time, ctime */ +#include /* stat */ +#include /* utimes */ +#include "zlib.h" /* crc32 */ + +#include "gzlog.h" /* header for external access */ -#include "gzlog.h" /* interface */ #define local static +typedef unsigned int uint; +typedef unsigned long ulong; + +/* Macro for debugging to deterministically force recovery operations */ +#ifdef DEBUG + #include /* longjmp */ + jmp_buf gzlog_jump; /* where to go back to */ + int gzlog_bail = 0; /* which point to bail at (1..8) */ + int gzlog_count = -1; /* number of times through to wait */ +# define BAIL(n) do { if (n == gzlog_bail && gzlog_count-- == 0) \ + longjmp(gzlog_jump, gzlog_bail); } while (0) +#else +# define BAIL(n) +#endif + +/* how old the lock file can be in seconds before considering it stale */ +#define PATIENCE 300 + +/* maximum stored block size in Kbytes -- must be in 1..63 */ +#define MAX_STORE 16 -/* log object structure */ -typedef struct { - int id; /* object identifier */ - int fd; /* log file descriptor */ - off_t extra; /* offset of extra "ap" subfield */ - off_t mark_off; /* offset of marked data */ - off_t last_off; /* offset of last block */ - unsigned long crc; /* uncompressed crc */ - unsigned long len; /* uncompressed length (modulo 2^32) */ - unsigned stored; /* length of current stored block */ -} gz_log; - -#define GZLOGID 19334 /* gz_log object identifier */ - -#define LOCK_RETRY 1 /* retry lock once a second */ -#define LOCK_PATIENCE 1200 /* try about twenty minutes before forcing */ - -/* acquire a lock on a file */ -local int lock(int fd) +/* number of stored Kbytes to trigger compression (must be >= 32 to allow + dictionary construction, and <= 204 * MAX_STORE, in order for >> 10 to + discard the stored block headers contribution of five bytes each) */ +#define TRIGGER 1024 + +/* size of a deflate dictionary (this cannot be changed) */ +#define DICT 32768U + +/* values for the operation (2 bits) */ +#define NO_OP 0 +#define APPEND_OP 1 +#define COMPRESS_OP 2 +#define REPLACE_OP 3 + +/* macros to extract little-endian integers from an unsigned byte buffer */ +#define PULL2(p) ((p)[0]+((uint)((p)[1])<<8)) +#define PULL4(p) (PULL2(p)+((ulong)PULL2(p+2)<<16)) +#define PULL8(p) (PULL4(p)+((off_t)PULL4(p+4)<<32)) + +/* macros to store integers into a byte buffer in little-endian order */ +#define PUT2(p,a) do {(p)[0]=a;(p)[1]=(a)>>8;} while(0) +#define PUT4(p,a) do {PUT2(p,a);PUT2(p+2,a>>16);} while(0) +#define PUT8(p,a) do {PUT4(p,a);PUT4(p+4,a>>32);} while(0) + +/* internal structure for log information */ +#define LOGID "\106\035\172" /* should be three non-zero characters */ +struct log { + char id[4]; /* contains LOGID to detect inadvertent overwrites */ + int fd; /* file descriptor for .gz file, opened read/write */ + char *path; /* allocated path, e.g. "/var/log/foo" or "foo" */ + char *end; /* end of path, for appending suffices such as ".gz" */ + off_t first; /* offset of first stored block first length byte */ + int back; /* location of first block id in bits back from first */ + uint stored; /* bytes currently in last stored block */ + off_t last; /* offset of last stored block first length byte */ + ulong ccrc; /* crc of compressed data */ + ulong clen; /* length (modulo 2^32) of compressed data */ + ulong tcrc; /* crc of total data */ + ulong tlen; /* length (modulo 2^32) of total data */ + time_t lock; /* last modify time of our lock file */ +}; + +/* gzip header for gzlog */ +local unsigned char log_gzhead[] = { + 0x1f, 0x8b, /* magic gzip id */ + 8, /* compression method is deflate */ + 4, /* there is an extra field (no file name) */ + 0, 0, 0, 0, /* no modification time provided */ + 0, 0xff, /* no extra flags, no OS specified */ + 39, 0, 'a', 'p', 35, 0 /* extra field with "ap" subfield */ + /* 35 is EXTRA, 39 is EXTRA + 4 */ +}; + +#define HEAD sizeof(log_gzhead) /* should be 16 */ + +/* initial gzip extra field content (52 == HEAD + EXTRA + 1) */ +local unsigned char log_gzext[] = { + 52, 0, 0, 0, 0, 0, 0, 0, /* offset of first stored block length */ + 52, 0, 0, 0, 0, 0, 0, 0, /* offset of last stored block length */ + 0, 0, 0, 0, 0, 0, 0, 0, /* compressed data crc and length */ + 0, 0, 0, 0, 0, 0, 0, 0, /* total data crc and length */ + 0, 0, /* final stored block data length */ + 5 /* op is NO_OP, last bit 8 bits back */ +}; + +#define EXTRA sizeof(log_gzext) /* should be 35 */ + +/* initial gzip data and trailer */ +local unsigned char log_gzbody[] = { + 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */ + 0, 0, 0, 0, /* crc */ + 0, 0, 0, 0 /* uncompressed length */ +}; + +#define BODY sizeof(log_gzbody) + +/* Exclusively create foo.lock in order to negotiate exclusive access to the + foo.* files. If the modify time of an existing lock file is greater than + PATIENCE seconds in the past, then consider the lock file to have been + abandoned, delete it, and try the exclusive create again. Save the lock + file modify time for verification of ownership. Return 0 on success, or -1 + on failure, usually due to an access restriction or invalid path. Note that + if stat() or unlink() fails, it may be due to another process noticing the + abandoned lock file a smidge sooner and deleting it, so those are not + flagged as an error. */ +local int log_lock(struct log *log) { - int patience; + int fd; + struct stat st; - /* try to lock every LOCK_RETRY seconds for LOCK_PATIENCE seconds */ - patience = LOCK_PATIENCE; - do { - if (flock(fd, LOCK_EX + LOCK_NB) == 0) - return 0; - (void)sleep(LOCK_RETRY); - patience -= LOCK_RETRY; - } while (patience > 0); + strcpy(log->end, ".lock"); + while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) { + if (errno != EEXIST) + return -1; + if (stat(log->path, &st) == 0 && time(NULL) - st.st_mtime > PATIENCE) { + unlink(log->path); + continue; + } + sleep(2); /* relinquish the CPU for two seconds while waiting */ + } + close(fd); + if (stat(log->path, &st) == 0) + log->lock = st.st_mtime; + return 0; +} - /* we've run out of patience -- give up */ - return -1; +/* Update the modify time of the lock file to now, in order to prevent another + task from thinking that the lock is stale. Save the lock file modify time + for verification of ownership. */ +local void log_touch(struct log *log) +{ + struct stat st; + + strcpy(log->end, ".lock"); + utimes(log->path, NULL); + if (stat(log->path, &st) == 0) + log->lock = st.st_mtime; } -/* release lock */ -local void unlock(int fd) +/* Check the log file modify time against what is expected. Return true if + this is not our lock. If it is our lock, touch it to keep it. */ +local int log_check(struct log *log) { - (void)flock(fd, LOCK_UN); + struct stat st; + + strcpy(log->end, ".lock"); + if (stat(log->path, &st) || st.st_mtime != log->lock) + return 1; + log_touch(log); + return 0; } -/* release a log object */ -local void log_clean(gz_log *log) +/* Unlock a previously acquired lock, but only if it's ours. */ +local void log_unlock(struct log *log) { - unlock(log->fd); - (void)close(log->fd); - free(log); + if (log_check(log)) + return; + strcpy(log->end, ".lock"); + unlink(log->path); + log->lock = 0; } -/* read an unsigned long from a byte buffer little-endian */ -local unsigned long make_ulg(unsigned char *buf) +/* Check the gzip header and read in the extra field, filling in the values in + the log structure. Return op on success or -1 if the gzip header was not as + expected. op is the current operation in progress last written to the extra + field. This assumes that the gzip file has already been opened, with the + file descriptor log->fd. */ +local int log_head(struct log *log) { - int n; - unsigned long val; + int op; + unsigned char buf[HEAD + EXTRA]; - val = (unsigned long)(*buf++); - for (n = 8; n < 32; n += 8) - val += (unsigned long)(*buf++) << n; - return val; + if (lseek(log->fd, 0, SEEK_SET) < 0 || + read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA || + memcmp(buf, log_gzhead, HEAD)) { + return -1; + } + log->first = PULL8(buf + HEAD); + log->last = PULL8(buf + HEAD + 8); + log->ccrc = PULL4(buf + HEAD + 16); + log->clen = PULL4(buf + HEAD + 20); + log->tcrc = PULL4(buf + HEAD + 24); + log->tlen = PULL4(buf + HEAD + 28); + log->stored = PULL2(buf + HEAD + 32); + log->back = 3 + (buf[HEAD + 34] & 7); + op = (buf[HEAD + 34] >> 3) & 3; + return op; } -/* read an off_t from a byte buffer little-endian */ -local off_t make_off(unsigned char *buf) +/* Write over the extra field contents, marking the operation as op. Use fsync + to assure that the device is written to, and in the requested order. This + operation, and only this operation, is assumed to be atomic in order to + assure that the log is recoverable in the event of an interruption at any + point in the process. Return -1 if the write to foo.gz failed. */ +local int log_mark(struct log *log, int op) { - int n; - off_t val; + int ret; + unsigned char ext[EXTRA]; - val = (off_t)(*buf++); - for (n = 8; n < 64; n += 8) - val += (off_t)(*buf++) << n; - return val; + PUT8(ext, log->first); + PUT8(ext + 8, log->last); + PUT4(ext + 16, log->ccrc); + PUT4(ext + 20, log->clen); + PUT4(ext + 24, log->tcrc); + PUT4(ext + 28, log->tlen); + PUT2(ext + 32, log->stored); + ext[34] = log->back - 3 + (op << 3); + fsync(log->fd); + ret = lseek(log->fd, HEAD, SEEK_SET) < 0 || + write(log->fd, ext, EXTRA) != EXTRA ? -1 : 0; + fsync(log->fd); + return ret; } -/* write an unsigned long little-endian to byte buffer */ -local void dice_ulg(unsigned long val, unsigned char *buf) +/* Rewrite the last block header bits and subsequent zero bits to get to a byte + boundary, setting the last block bit if last is true, and then write the + remainder of the stored block header (length and one's complement). Leave + the file pointer after the end of the last stored block data. Return -1 if + there is a read or write failure on the foo.gz file */ +local int log_last(struct log *log, int last) { - int n; + int back, len, mask; + unsigned char buf[6]; + + /* determine the locations of the bytes and bits to modify */ + back = log->last == log->first ? log->back : 8; + len = back > 8 ? 2 : 1; /* bytes back from log->last */ + mask = 0x80 >> ((back - 1) & 7); /* mask for block last-bit */ + + /* get the byte to modify (one or two back) into buf[0] -- don't need to + read the byte if the last-bit is eight bits back, since in that case + the entire byte will be modified */ + buf[0] = 0; + if (back != 8 && (lseek(log->fd, log->last - len, SEEK_SET) < 0 || + read(log->fd, buf, 1) != 1)) + return -1; + + /* change the last-bit of the last stored block as requested -- note + that all bits above the last-bit are set to zero, per the type bits + of a stored block being 00 and per the convention that the bits to + bring the stream to a byte boundary are also zeros */ + buf[1] = 0; + buf[2 - len] = (*buf & (mask - 1)) + (last ? mask : 0); - for (n = 0; n < 4; n++) { - *buf++ = val & 0xff; - val >>= 8; + /* write the modified stored block header and lengths, move the file + pointer to after the last stored block data */ + PUT2(buf + 2, log->stored); + PUT2(buf + 4, log->stored ^ 0xffff); + return lseek(log->fd, log->last - len, SEEK_SET) < 0 || + write(log->fd, buf + 2 - len, len + 4) != len + 4 || + lseek(log->fd, log->stored, SEEK_CUR) < 0 ? -1 : 0; +} + +/* Append len bytes from data to the locked and open log file. len may be zero + if recovering and no .add file was found. In that case, the previous state + of the foo.gz file is restored. The data is appended uncompressed in + deflate stored blocks. Return -1 if there was an error reading or writing + the foo.gz file. */ +local int log_append(struct log *log, unsigned char *data, size_t len) +{ + uint put; + off_t end; + unsigned char buf[8]; + + /* set the last block last-bit and length, in case recovering an + interrupted append, then position the file pointer to append to the + block */ + if (log_last(log, 1)) + return -1; + + /* append, adding stored blocks and updating the offset of the last stored + block as needed, and update the total crc and length */ + while (len) { + /* append as much as we can to the last block */ + put = (MAX_STORE << 10) - log->stored; + if (put > len) + put = (uint)len; + if (put) { + if (write(log->fd, data, put) != put) + return -1; + BAIL(1); + log->tcrc = crc32(log->tcrc, data, put); + log->tlen += put; + log->stored += put; + data += put; + len -= put; + } + + /* if we need to, add a new empty stored block */ + if (len) { + /* mark current block as not last */ + if (log_last(log, 0)) + return -1; + + /* point to new, empty stored block */ + log->last += 4 + log->stored + 1; + log->stored = 0; + } + + /* mark last block as last, update its length */ + if (log_last(log, 1)) + return -1; + BAIL(2); } + + /* write the new crc and length trailer, and truncate just in case (could + be recovering from partial append with a missing foo.add file) */ + PUT4(buf, log->tcrc); + PUT4(buf + 4, log->tlen); + if (write(log->fd, buf, 8) != 8 || + (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) + return -1; + + /* write the extra field, marking the log file as done, delete .add file */ + if (log_mark(log, NO_OP)) + return -1; + strcpy(log->end, ".add"); + unlink(log->path); /* ignore error, since may not exist */ + return 0; } -/* write an off_t little-endian to byte buffer */ -local void dice_off(off_t val, unsigned char *buf) +/* Replace the foo.dict file with the foo.temp file. Also delete the foo.add + file, since the compress operation may have been interrupted before that was + done. Returns 1 if memory could not be allocated, or -1 if reading or + writing foo.gz fails, or if the rename fails for some reason other than + foo.temp not existing. foo.temp not existing is a permitted error, since + the replace operation may have been interrupted after the rename is done, + but before foo.gz is marked as complete. */ +local int log_replace(struct log *log) { - int n; + int ret; + char *dest; + + /* delete foo.add file */ + strcpy(log->end, ".add"); + unlink(log->path); /* ignore error, since may not exist */ + BAIL(3); + + /* rename foo.name to foo.dict, replacing foo.dict if it exists */ + strcpy(log->end, ".dict"); + dest = malloc(strlen(log->path) + 1); + if (dest == NULL) + return -2; + strcpy(dest, log->path); + strcpy(log->end, ".temp"); + ret = rename(log->path, dest); + free(dest); + if (ret && errno != ENOENT) + return -1; + BAIL(4); - for (n = 0; n < 8; n++) { - *buf++ = val & 0xff; - val >>= 8; + /* mark the foo.gz file as done */ + return log_mark(log, NO_OP); +} + +/* Compress the len bytes at data and append the compressed data to the + foo.gz deflate data immediately after the previous compressed data. This + overwrites the previous uncompressed data, which was stored in foo.add + and is the data provided in data[0..len-1]. If this operation is + interrupted, it picks up at the start of this routine, with the foo.add + file read in again. If there is no data to compress (len == 0), then we + simply terminate the foo.gz file after the previously compressed data, + appending a final empty stored block and the gzip trailer. Return -1 if + reading or writing the log.gz file failed, or -2 if there was a memory + allocation failure. */ +local int log_compress(struct log *log, unsigned char *data, size_t len) +{ + int fd; + uint got, max; + ssize_t dict; + off_t end; + z_stream strm; + unsigned char buf[DICT]; + + /* compress and append compressed data */ + if (len) { + /* set up for deflate, allocating memory */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + if (deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -15, 8, + Z_DEFAULT_STRATEGY) != Z_OK) + return -2; + + /* read in dictionary (last 32K of data that was compressed) */ + strcpy(log->end, ".dict"); + fd = open(log->path, O_RDONLY, 0); + if (fd >= 0) { + dict = read(fd, buf, DICT); + close(fd); + if (dict < 0) { + deflateEnd(&strm); + return -1; + } + if (dict) + deflateSetDictionary(&strm, buf, (uint)dict); + } + log_touch(log); + + /* prime deflate with last bits of previous block, position write + pointer to write those bits and overwrite what follows */ + if (lseek(log->fd, log->first - (log->back > 8 ? 2 : 1), + SEEK_SET) < 0 || + read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) { + deflateEnd(&strm); + return -1; + } + deflatePrime(&strm, (8 - log->back) & 7, *buf); + + /* compress, finishing with a partial non-last empty static block */ + strm.next_in = data; + max = (((uint)0 - 1) >> 1) + 1; /* in case int smaller than size_t */ + do { + strm.avail_in = len > max ? max : (uint)len; + len -= strm.avail_in; + do { + strm.avail_out = DICT; + strm.next_out = buf; + deflate(&strm, len ? Z_NO_FLUSH : Z_PARTIAL_FLUSH); + got = DICT - strm.avail_out; + if (got && write(log->fd, buf, got) != got) { + deflateEnd(&strm); + return -1; + } + log_touch(log); + } while (strm.avail_out == 0); + } while (len); + deflateEnd(&strm); + BAIL(5); + + /* find start of empty static block -- scanning backwards the first one + bit is the second bit of the block, if the last byte is zero, then + we know the byte before that has a one in the top bit, since an + empty static block is ten bits long */ + if ((log->first = lseek(log->fd, -1, SEEK_CUR)) < 0 || + read(log->fd, buf, 1) != 1) + return -1; + log->first++; + if (*buf) { + log->back = 1; + while ((*buf & ((uint)1 << (8 - log->back++))) == 0) + ; /* guaranteed to terminate, since *buf != 0 */ + } + else + log->back = 10; + + /* update compressed crc and length */ + log->ccrc = log->tcrc; + log->clen = log->tlen; + } + else { + /* no data to compress -- fix up existing gzip stream */ + log->tcrc = log->ccrc; + log->tlen = log->clen; } + + /* complete and truncate gzip stream */ + log->last = log->first; + log->stored = 0; + PUT4(buf, log->tcrc); + PUT4(buf + 4, log->tlen); + if (log_last(log, 1) || write(log->fd, buf, 8) != 8 || + (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end)) + return -1; + BAIL(6); + + /* mark as being in the replace operation */ + if (log_mark(log, REPLACE_OP)) + return -1; + + /* execute the replace operation and mark the file as done */ + return log_replace(log); } -/* initial, empty gzip file for appending */ -local char empty_gz[] = { - 0x1f, 0x8b, /* magic gzip id */ - 8, /* compression method is deflate */ - 4, /* there is an extra field */ - 0, 0, 0, 0, /* no modification time provided */ - 0, 0xff, /* no extra flags, no OS */ - 20, 0, 'a', 'p', 16, 0, /* extra field with "ap" subfield */ - 32, 0, 0, 0, 0, 0, 0, 0, /* offset of uncompressed data */ - 32, 0, 0, 0, 0, 0, 0, 0, /* offset of last block */ - 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */ - 0, 0, 0, 0, /* crc */ - 0, 0, 0, 0 /* uncompressed length */ -}; +/* log a repair record to the .repairs file */ +local void log_log(struct log *log, int op, char *record) +{ + time_t now; + FILE *rec; -/* initialize a log object with locking */ -void *gzlog_open(char *path) + now = time(NULL); + strcpy(log->end, ".repairs"); + rec = fopen(log->path, "a"); + if (rec == NULL) + return; + fprintf(rec, "%.24s %s recovery: %s\n", ctime(&now), op == APPEND_OP ? + "append" : (op == COMPRESS_OP ? "compress" : "replace"), record); + fclose(rec); + return; +} + +/* Recover the interrupted operation op. First read foo.add for recovering an + append or compress operation. Return -1 if there was an error reading or + writing foo.gz or reading an existing foo.add, or -2 if there was a memory + allocation failure. */ +local int log_recover(struct log *log, int op) { - unsigned xlen; - unsigned char temp[20]; - unsigned sub_len; - int good; - gz_log *log; - - /* allocate log structure */ - log = malloc(sizeof(gz_log)); - if (log == NULL) - return NULL; - log->id = GZLOGID; + int fd, ret = 0; + unsigned char *data = NULL; + size_t len = 0; + struct stat st; - /* open file, creating it if necessary, and locking it */ - log->fd = open(path, O_RDWR | O_CREAT, 0600); - if (log->fd < 0) { - free(log); - return NULL; + /* log recovery */ + log_log(log, op, "start"); + + /* load foo.add file if expected and present */ + if (op == APPEND_OP || op == COMPRESS_OP) { + strcpy(log->end, ".add"); + if (stat(log->path, &st) == 0 && st.st_size) { + len = (size_t)(st.st_size); + if (len != st.st_size || (data = malloc(st.st_size)) == NULL) { + log_log(log, op, "allocation failure"); + return -2; + } + if ((fd = open(log->path, O_RDONLY, 0)) < 0) { + log_log(log, op, ".add file read failure"); + return -1; + } + ret = read(fd, data, len) != len; + close(fd); + if (ret) { + log_log(log, op, ".add file read failure"); + return -1; + } + log_log(log, op, "loaded .add file"); + } + else + log_log(log, op, "missing .add file!"); + } + + /* recover the interrupted operation */ + switch (op) { + case APPEND_OP: + ret = log_append(log, data, len); + break; + case COMPRESS_OP: + ret = log_compress(log, data, len); + break; + case REPLACE_OP: + ret = log_replace(log); } - if (lock(log->fd)) { + + /* log status */ + log_log(log, op, ret ? "failure" : "complete"); + + /* clean up */ + if (data != NULL) + free(data); + return ret; +} + +/* Close the foo.gz file (if open) and release the lock. */ +local void log_close(struct log *log) +{ + if (log->fd >= 0) close(log->fd); - free(log); - return NULL; + log->fd = -1; + log_unlock(log); +} + +/* Open foo.gz, verify the header, and load the extra field contents, after + first creating the foo.lock file to gain exclusive access to the foo.* + files. If foo.gz does not exist or is empty, then write the initial header, + extra, and body content of an empty foo.gz log file. If there is an error + creating the lock file due to access restrictions, or an error reading or + writing the foo.gz file, or if the foo.gz file is not a proper log file for + this object (e.g. not a gzip file or does not contain the expected extra + field), then return true. If there is an error, the lock is released. + Otherwise, the lock is left in place. */ +local int log_open(struct log *log) +{ + int op; + + /* release open file resource if left over -- can occur if lock lost + between gzlog_open() and gzlog_write() */ + if (log->fd >= 0) + close(log->fd); + log->fd = -1; + + /* negotiate exclusive access */ + if (log_lock(log) < 0) + return -1; + + /* open the log file, foo.gz */ + strcpy(log->end, ".gz"); + log->fd = open(log->path, O_RDWR | O_CREAT, 0644); + if (log->fd < 0) { + log_close(log); + return -1; } - /* if file is empty, write new gzip stream */ + /* if new, initialize foo.gz with an empty log, delete old dictionary */ if (lseek(log->fd, 0, SEEK_END) == 0) { - if (write(log->fd, empty_gz, sizeof(empty_gz)) != sizeof(empty_gz)) { - log_clean(log); - return NULL; + if (write(log->fd, log_gzhead, HEAD) != HEAD || + write(log->fd, log_gzext, EXTRA) != EXTRA || + write(log->fd, log_gzbody, BODY) != BODY) { + log_close(log); + return -1; } + strcpy(log->end, ".dict"); + unlink(log->path); } - /* check gzip header */ - (void)lseek(log->fd, 0, SEEK_SET); - if (read(log->fd, temp, 12) != 12 || temp[0] != 0x1f || - temp[1] != 0x8b || temp[2] != 8 || (temp[3] & 4) == 0) { - log_clean(log); - return NULL; + /* verify log file and load extra field information */ + if ((op = log_head(log)) < 0) { + log_close(log); + return -1; } - /* process extra field to find "ap" sub-field */ - xlen = temp[10] + (temp[11] << 8); - good = 0; - while (xlen) { - if (xlen < 4 || read(log->fd, temp, 4) != 4) - break; - sub_len = temp[2]; - sub_len += temp[3] << 8; - xlen -= 4; - if (memcmp(temp, "ap", 2) == 0 && sub_len == 16) { - good = 1; - break; - } - if (xlen < sub_len) - break; - (void)lseek(log->fd, sub_len, SEEK_CUR); - xlen -= sub_len; + /* check for interrupted process and if so, recover */ + if (op != NO_OP && log_recover(log, op)) { + log_close(log); + return -1; } - if (!good) { - log_clean(log); + + /* touch the lock file to prevent another process from grabbing it */ + log_touch(log); + return 0; +} + +/* See gzlog.h for the description of the external methods below */ +gzlog *gzlog_open(char *path) +{ + size_t n; + struct log *log; + + /* check arguments */ + if (path == NULL || *path == 0) return NULL; - } - /* read in "ap" sub-field */ - log->extra = lseek(log->fd, 0, SEEK_CUR); - if (read(log->fd, temp, 16) != 16) { - log_clean(log); + /* allocate and initialize log structure */ + log = malloc(sizeof(struct log)); + if (log == NULL) + return NULL; + strcpy(log->id, LOGID); + log->fd = -1; + + /* save path and end of path for name construction */ + n = strlen(path); + log->path = malloc(n + 9); /* allow for ".repairs" */ + if (log->path == NULL) { + free(log); return NULL; } - log->mark_off = make_off(temp); - log->last_off = make_off(temp + 8); - - /* get crc, length of gzip file */ - (void)lseek(log->fd, log->last_off, SEEK_SET); - if (read(log->fd, temp, 13) != 13 || - memcmp(temp, "\001\000\000\377\377", 5) != 0) { - log_clean(log); + strcpy(log->path, path); + log->end = log->path + n; + + /* gain exclusive access and verify log file -- may perform a + recovery operation if needed */ + if (log_open(log)) { + free(log->path); + free(log); return NULL; } - log->crc = make_ulg(temp + 5); - log->len = make_ulg(temp + 9); - /* set up to write over empty last block */ - (void)lseek(log->fd, log->last_off + 5, SEEK_SET); - log->stored = 0; - return (void *)log; + /* return pointer to log structure */ + return log; } -/* maximum amount to put in a stored block before starting a new one */ -#define MAX_BLOCK 16384 - -/* write a block to a log object */ -int gzlog_write(void *obj, char *data, size_t len) +/* gzlog_compress() return values: + 0: all good + -1: file i/o error (usually access issue) + -2: memory allocation failure + -3: invalid log pointer argument */ +int gzlog_compress(gzlog *logd) { - size_t some; - unsigned char temp[5]; - gz_log *log; + int fd, ret; + uint block; + size_t len, next; + unsigned char *data, buf[5]; + struct log *log = logd; - /* check object */ - log = (gz_log *)obj; - if (log == NULL || log->id != GZLOGID) - return 1; + /* check arguments */ + if (log == NULL || strcmp(log->id, LOGID) || len < 0) + return -3; - /* write stored blocks until all of the input is written */ - do { - some = MAX_BLOCK - log->stored; - if (some > len) - some = len; - if (write(log->fd, data, some) != some) - return 1; - log->crc = crc32(log->crc, data, some); - log->len += some; - len -= some; - data += some; - log->stored += some; - - /* if the stored block is full, end it and start another */ - if (log->stored == MAX_BLOCK) { - (void)lseek(log->fd, log->last_off, SEEK_SET); - temp[0] = 0; - dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16), - temp + 1); - if (write(log->fd, temp, 5) != 5) - return 1; - log->last_off = lseek(log->fd, log->stored, SEEK_CUR); - (void)lseek(log->fd, 5, SEEK_CUR); - log->stored = 0; - } - } while (len); - return 0; -} + /* see if we lost the lock -- if so get it again and reload the extra + field information (it probably changed), recover last operation if + necessary */ + if (log_check(log) && log_open(log)) + return -1; -/* recompress the remaining stored deflate data in place */ -local int recomp(gz_log *log) -{ - z_stream strm; - size_t len, max; - unsigned char *in; - unsigned char *out; - unsigned char temp[16]; - - /* allocate space and read it all in (it's around 1 MB) */ - len = log->last_off - log->mark_off; - max = len + (len >> 12) + (len >> 14) + 11; - out = malloc(max); - if (out == NULL) - return 1; - in = malloc(len); - if (in == NULL) { - free(out); - return 1; - } - (void)lseek(log->fd, log->mark_off, SEEK_SET); - if (read(log->fd, in, len) != len) { - free(in); - free(out); - return 1; - } + /* create space for uncompressed data */ + len = ((size_t)(log->last - log->first) & ~(((size_t)1 << 10) - 1)) + + log->stored; + if ((data = malloc(len)) == NULL) + return -2; - /* recompress in memory, decoding stored data as we go */ - /* note: this assumes that unsigned is four bytes or more */ - /* consider not making that assumption */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - if (deflateInit2(&strm, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 8, - Z_DEFAULT_STRATEGY) != Z_OK) { - free(in); - free(out); - return 1; - } - strm.next_in = in; - strm.avail_out = max; - strm.next_out = out; - while (len >= 5) { - if (strm.next_in[0] != 0) + /* do statement here is just a cheap trick for error handling */ + do { + /* read in the uncompressed data */ + if (lseek(log->fd, log->first - 1, SEEK_SET) < 0) break; - strm.avail_in = strm.next_in[1] + (strm.next_in[2] << 8); - strm.next_in += 5; - len -= 5; - if (strm.avail_in != 0) { - if (len < strm.avail_in) + next = 0; + while (next < len) { + if (read(log->fd, buf, 5) != 5) break; - len -= strm.avail_in; - (void)deflate(&strm, Z_NO_FLUSH); - if (strm.avail_in != 0 || strm.avail_out == 0) + block = PULL2(buf + 1); + if (next + block > len || + read(log->fd, (char *)data + next, block) != block) break; + next += block; } - } - (void)deflate(&strm, Z_SYNC_FLUSH); - (void)deflateEnd(&strm); - free(in); - if (len != 0 || strm.avail_out == 0) { - free(out); - return 1; - } + if (lseek(log->fd, 0, SEEK_CUR) != log->last + 4 + log->stored) + break; + log_touch(log); - /* overwrite stored data with compressed data */ - (void)lseek(log->fd, log->mark_off, SEEK_SET); - len = max - strm.avail_out; - if (write(log->fd, out, len) != len) { - free(out); - return 1; - } - free(out); - - /* write last empty block, crc, and length */ - log->mark_off = log->last_off = lseek(log->fd, 0, SEEK_CUR); - temp[0] = 1; - dice_ulg(0xffffL << 16, temp + 1); - dice_ulg(log->crc, temp + 5); - dice_ulg(log->len, temp + 9); - if (write(log->fd, temp, 13) != 13) - return 1; + /* write the uncompressed data to the .add file */ + strcpy(log->end, ".add"); + fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd < 0) + break; + ret = write(fd, data, len) != len; + if (ret | close(fd)) + break; + log_touch(log); - /* truncate file to discard remaining stored data and old trailer */ - ftruncate(log->fd, lseek(log->fd, 0, SEEK_CUR)); + /* write the dictionary for the next compress to the .temp file */ + strcpy(log->end, ".temp"); + fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd < 0) + break; + next = DICT > len ? len : DICT; + ret = write(fd, (char *)data + len - next, next) != next; + if (ret | close(fd)) + break; + log_touch(log); - /* update extra field to point to new last empty block */ - (void)lseek(log->fd, log->extra, SEEK_SET); - dice_off(log->mark_off, temp); - dice_off(log->last_off, temp + 8); - if (write(log->fd, temp, 16) != 16) - return 1; - return 0; -} + /* roll back to compressed data, mark the compress in progress */ + log->last = log->first; + log->stored = 0; + if (log_mark(log, COMPRESS_OP)) + break; + BAIL(7); + + /* compress and append the data (clears mark) */ + ret = log_compress(log, data, len); + free(data); + return ret; + } while (0); -/* maximum accumulation of stored blocks before compressing */ -#define MAX_STORED 1048576 + /* broke out of do above on i/o error */ + free(data); + return -1; +} -/* close log object */ -int gzlog_close(void *obj) +/* gzlog_write() return values: + 0: all good + -1: file i/o error (usually access issue) + -2: memory allocation failure + -3: invalid log pointer argument */ +int gzlog_write(gzlog *logd, void *data, size_t len) { - unsigned char temp[8]; - gz_log *log; + int fd, ret; + struct log *log = logd; - /* check object */ - log = (gz_log *)obj; - if (log == NULL || log->id != GZLOGID) - return 1; + /* check arguments */ + if (log == NULL || strcmp(log->id, LOGID) || len < 0) + return -3; + if (data == NULL || len == 0) + return 0; - /* go to start of most recent block being written */ - (void)lseek(log->fd, log->last_off, SEEK_SET); - - /* if some stuff was put there, update block */ - if (log->stored) { - temp[0] = 0; - dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16), - temp + 1); - if (write(log->fd, temp, 5) != 5) - return 1; - log->last_off = lseek(log->fd, log->stored, SEEK_CUR); - } + /* see if we lost the lock -- if so get it again and reload the extra + field information (it probably changed), recover last operation if + necessary */ + if (log_check(log) && log_open(log)) + return -1; - /* write last block (empty) */ - if (write(log->fd, "\001\000\000\377\377", 5) != 5) - return 1; + /* create and write .add file */ + strcpy(log->end, ".add"); + fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd < 0) + return -1; + ret = write(fd, data, len) != len; + if (ret | close(fd)) + return -1; + log_touch(log); - /* write updated crc and uncompressed length */ - dice_ulg(log->crc, temp); - dice_ulg(log->len, temp + 4); - if (write(log->fd, temp, 8) != 8) - return 1; + /* mark log file with append in progress */ + if (log_mark(log, APPEND_OP)) + return -1; + BAIL(8); - /* put offset of that last block in gzip extra block */ - (void)lseek(log->fd, log->extra + 8, SEEK_SET); - dice_off(log->last_off, temp); - if (write(log->fd, temp, 8) != 8) - return 1; + /* append data (clears mark) */ + if (log_append(log, data, len)) + return -1; - /* if more than 1 MB stored, then time to compress it */ - if (log->last_off - log->mark_off > MAX_STORED) { - if (recomp(log)) - return 1; - } + /* check to see if it's time to compress -- if not, then done */ + if (((log->last - log->first) >> 10) + (log->stored >> 10) < TRIGGER) + return 0; + + /* time to compress */ + return gzlog_compress(log); +} + +/* gzlog_close() return values: + 0: ok + -3: invalid log pointer argument */ +int gzlog_close(gzlog *logd) +{ + struct log *log = logd; - /* unlock and close file */ - log_clean(log); + /* check arguments */ + if (log == NULL || strcmp(log->id, LOGID)) + return -3; + + /* close the log file and release the lock */ + log_close(log); + + /* free structure and return */ + if (log->path != NULL) + free(log->path); + strcpy(log->id, "bad"); + free(log); return 0; } diff --git a/compat/zlib/examples/gzlog.h b/compat/zlib/examples/gzlog.h index a800bd5..c461426 100644 --- a/compat/zlib/examples/gzlog.h +++ b/compat/zlib/examples/gzlog.h @@ -1,6 +1,6 @@ /* gzlog.h - Copyright (C) 2004 Mark Adler, all rights reserved - version 1.0, 26 Nov 2004 + Copyright (C) 2004, 2008 Mark Adler, all rights reserved + version 2.0, 25 Apr 2008 This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages @@ -21,38 +21,69 @@ Mark Adler madler@alumni.caltech.edu */ +/* Version History: + 1.0 26 Nov 2004 First version + 2.0 25 Apr 2008 Complete redesign for recovery of interrupted operations + Interface changed slightly in that now path is a prefix + Compression now occurs as needed during gzlog_write() + gzlog_write() now always leaves the log file as valid gzip + */ + /* The gzlog object allows writing short messages to a gzipped log file, opening the log file locked for small bursts, and then closing it. The log - object works by appending stored data to the gzip file until 1 MB has been - accumulated. At that time, the stored data is compressed, and replaces the - uncompressed data in the file. The log file is truncated to its new size at - that time. After closing, the log file is always valid gzip file that can - decompressed to recover what was written. - - A gzip header "extra" field contains two file offsets for appending. The - first points to just after the last compressed data. The second points to - the last stored block in the deflate stream, which is empty. All of the - data between those pointers is uncompressed. + object works by appending stored (uncompressed) data to the gzip file until + 1 MB has been accumulated. At that time, the stored data is compressed, and + replaces the uncompressed data in the file. The log file is truncated to + its new size at that time. After each write operation, the log file is a + valid gzip file that can decompressed to recover what was written. + + The gzlog operations can be interupted at any point due to an application or + system crash, and the log file will be recovered the next time the log is + opened with gzlog_open(). */ +#ifndef GZLOG_H +#define GZLOG_H + +/* gzlog object type */ +typedef void gzlog; + /* Open a gzlog object, creating the log file if it does not exist. Return - NULL on error. Note that gzlog_open() could take a long time to return if - there is difficulty in locking the file. */ -void *gzlog_open(char *path); - -/* Write to a gzlog object. Return non-zero on error. This function will - simply write data to the file uncompressed. Compression of the data - will not occur until gzlog_close() is called. It is expected that - gzlog_write() is used for a short message, and then gzlog_close() is - called. If a large amount of data is to be written, then the application - should write no more than 1 MB at a time with gzlog_write() before - calling gzlog_close() and then gzlog_open() again. */ -int gzlog_write(void *log, char *data, size_t len); - -/* Close a gzlog object. Return non-zero on error. The log file is locked - until this function is called. This function will compress stored data - at the end of the gzip file if at least 1 MB has been accumulated. Note - that the file will not be a valid gzip file until this function completes. - */ -int gzlog_close(void *log); + NULL on error. Note that gzlog_open() could take a while to complete if it + has to wait to verify that a lock is stale (possibly for five minutes), or + if there is significant contention with other instantiations of this object + when locking the resource. path is the prefix of the file names created by + this object. If path is "foo", then the log file will be "foo.gz", and + other auxiliary files will be created and destroyed during the process: + "foo.dict" for a compression dictionary, "foo.temp" for a temporary (next) + dictionary, "foo.add" for data being added or compressed, "foo.lock" for the + lock file, and "foo.repairs" to log recovery operations performed due to + interrupted gzlog operations. A gzlog_open() followed by a gzlog_close() + will recover a previously interrupted operation, if any. */ +gzlog *gzlog_open(char *path); + +/* Write to a gzlog object. Return zero on success, -1 if there is a file i/o + error on any of the gzlog files (this should not happen if gzlog_open() + succeeded, unless the device has run out of space or leftover auxiliary + files have permissions or ownership that prevent their use), -2 if there is + a memory allocation failure, or -3 if the log argument is invalid (e.g. if + it was not created by gzlog_open()). This function will write data to the + file uncompressed, until 1 MB has been accumulated, at which time that data + will be compressed. The log file will be a valid gzip file upon successful + return. */ +int gzlog_write(gzlog *log, void *data, size_t len); + +/* Force compression of any uncompressed data in the log. This should be used + sparingly, if at all. The main application would be when a log file will + not be appended to again. If this is used to compress frequently while + appending, it will both significantly increase the execution time and + reduce the compression ratio. The return codes are the same as for + gzlog_write(). */ +int gzlog_compress(gzlog *log); + +/* Close a gzlog object. Return zero on success, -3 if the log argument is + invalid. The log object is freed, and so cannot be referenced again. */ +int gzlog_close(gzlog *log); + +#endif diff --git a/compat/zlib/examples/zlib_how.html b/compat/zlib/examples/zlib_how.html index 40998db..444ff1c 100644 --- a/compat/zlib/examples/zlib_how.html +++ b/compat/zlib/examples/zlib_how.html @@ -4,7 +4,7 @@ zlib Usage Example - +

zlib Usage Example

@@ -21,13 +21,16 @@ Without further adieu, here is the program
zpipe.c /* zpipe.c: example of proper use of zlib's inflate() and deflate() Not copyrighted -- provided to the public domain - Version 1.2 9 November 2004 Mark Adler */ + Version 1.4 11 December 2005 Mark Adler */ /* Version history: 1.0 30 Oct 2004 First version 1.1 8 Nov 2004 Add void casting for unused return values Use switch statement for inflate() return values 1.2 9 Nov 2004 Add assertions to document zlib guarantees + 1.3 6 Apr 2005 Remove incorrect assertion in inf() + 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions + Avoid some compiler warnings for input and output buffers */ We now include the header files for the required definitions. From @@ -47,6 +50,21 @@ functions inflateInit(), inflate(), and #include <assert.h> #include "zlib.h" +This is an ugly hack required to avoid corruption of the input and output data on +Windows/MS-DOS systems. Without this, those systems would assume that the input and output +files are text, and try to convert the end-of-line characters from one standard to +another. That would corrupt binary data, and in particular would render the compressed data unusable. +This sets the input and output to binary which suppresses the end-of-line conversions. +SET_BINARY_MODE() will be used later on stdin and stdout, at the beginning of main(). +

+#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
+#  include <fcntl.h>
+#  include <io.h>
+#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
+#else
+#  define SET_BINARY_MODE(file)
+#endif
+
CHUNK is simply the buffer size for feeding data to and pulling data from the zlib routines. Larger buffer sizes would be more efficient, especially for inflate(). If the memory is available, buffers sizes @@ -80,8 +98,8 @@ is used to pass information to and from the zlib routines, and to maint int ret, flush; unsigned have; z_stream strm; - char in[CHUNK]; - char out[CHUNK]; + unsigned char in[CHUNK]; + unsigned char out[CHUNK];
The first thing we do is to initialize the zlib state for compression using deflateInit(). This must be done before the first use of deflate(). @@ -313,8 +331,8 @@ can tell from the zlib stream itself when the stream is complete. int ret; unsigned have; z_stream strm; - char in[CHUNK]; - char out[CHUNK]; + unsigned char in[CHUNK]; + unsigned char out[CHUNK]; The initialization of the state is the same, except that there is no compression level, of course, and two more elements of the structure are initialized. avail_in @@ -494,6 +512,10 @@ int main(int argc, char **argv) { int ret; + /* avoid end-of-line conversions */ + SET_BINARY_MODE(stdin); + SET_BINARY_MODE(stdout); + /* do compression if no arguments */ if (argc == 1) { ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); @@ -518,6 +540,6 @@ int main(int argc, char **argv) }
-Copyright (c) 2004 by Mark Adler
Last modified 13 November 2004
+Copyright (c) 2004, 2005 by Mark Adler
Last modified 11 December 2005
diff --git a/compat/zlib/examples/zpipe.c b/compat/zlib/examples/zpipe.c index 26abb56..83535d1 100644 --- a/compat/zlib/examples/zpipe.c +++ b/compat/zlib/examples/zpipe.c @@ -1,6 +1,6 @@ /* zpipe.c: example of proper use of zlib's inflate() and deflate() Not copyrighted -- provided to the public domain - Version 1.2 9 November 2004 Mark Adler */ + Version 1.4 11 December 2005 Mark Adler */ /* Version history: 1.0 30 Oct 2004 First version @@ -8,6 +8,8 @@ Use switch statement for inflate() return values 1.2 9 Nov 2004 Add assertions to document zlib guarantees 1.3 6 Apr 2005 Remove incorrect assertion in inf() + 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions + Avoid some compiler warnings for input and output buffers */ #include @@ -15,6 +17,14 @@ #include #include "zlib.h" +#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) +# include +# include +# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) +#else +# define SET_BINARY_MODE(file) +#endif + #define CHUNK 16384 /* Compress from file source to file dest until EOF on source. @@ -28,8 +38,8 @@ int def(FILE *source, FILE *dest, int level) int ret, flush; unsigned have; z_stream strm; - char in[CHUNK]; - char out[CHUNK]; + unsigned char in[CHUNK]; + unsigned char out[CHUNK]; /* allocate deflate state */ strm.zalloc = Z_NULL; @@ -84,8 +94,8 @@ int inf(FILE *source, FILE *dest) int ret; unsigned have; z_stream strm; - char in[CHUNK]; - char out[CHUNK]; + unsigned char in[CHUNK]; + unsigned char out[CHUNK]; /* allocate inflate state */ strm.zalloc = Z_NULL; @@ -167,6 +177,10 @@ int main(int argc, char **argv) { int ret; + /* avoid end-of-line conversions */ + SET_BINARY_MODE(stdin); + SET_BINARY_MODE(stdout); + /* do compression if no arguments */ if (argc == 1) { ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); diff --git a/compat/zlib/examples/zran.c b/compat/zlib/examples/zran.c index 8c7717e..617a130 100644 --- a/compat/zlib/examples/zran.c +++ b/compat/zlib/examples/zran.c @@ -351,7 +351,7 @@ int main(int argc, char **argv) int len; off_t offset; FILE *in; - struct access *index; + struct access *index = NULL; unsigned char buf[CHUNK]; /* open input file */ diff --git a/compat/zlib/gzclose.c b/compat/zlib/gzclose.c new file mode 100644 index 0000000..caeb99a --- /dev/null +++ b/compat/zlib/gzclose.c @@ -0,0 +1,25 @@ +/* gzclose.c -- zlib gzclose() function + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* gzclose() is in a separate file so that it is linked in only if it is used. + That way the other gzclose functions can be used instead to avoid linking in + unneeded compression or decompression routines. */ +int ZEXPORT gzclose(file) + gzFile file; +{ +#ifndef NO_GZCOMPRESS + gz_statep state; + + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); +#else + return gzclose_r(file); +#endif +} diff --git a/compat/zlib/gzguts.h b/compat/zlib/gzguts.h new file mode 100644 index 0000000..0e7ed43 --- /dev/null +++ b/compat/zlib/gzguts.h @@ -0,0 +1,132 @@ +/* gzguts.h -- zlib internal header definitions for gz* operations + * Copyright (C) 2004, 2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#ifdef _LARGEFILE64_SOURCE +# ifndef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE +# endif +# ifdef _FILE_OFFSET_BITS +# undef _FILE_OFFSET_BITS +# endif +#endif + +#define ZLIB_INTERNAL + +#include +#include "zlib.h" +#ifdef STDC +# include +# include +# include +#endif +#include + +#ifdef NO_DEFLATE /* for compatibility with old definition */ +# define NO_GZCOMPRESS +#endif + +#ifdef _MSC_VER +# include +# define vsnprintf _vsnprintf +#endif + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +/* gz* functions always use library allocation functions */ +#ifndef STDC + extern voidp malloc OF((uInt size)); + extern void free OF((voidpf ptr)); +#endif + +/* get errno and strerror definition */ +#if defined UNDER_CE && defined NO_ERRNO_H +# include +# define zstrerror() gz_strwinerror((DWORD)GetLastError()) +#else +# ifdef STDC +# include +# define zstrerror() strerror(errno) +# else +# define zstrerror() "stdio error (consult errno)" +# endif +#endif + +/* MVS fdopen() */ +#ifdef __MVS__ + #pragma map (fdopen , "\174\174FDOPEN") + FILE *fdopen(int, const char *); +#endif + +#ifdef _LARGEFILE64_SOURCE +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + +/* default i/o buffer size -- double this for output when reading */ +#define GZBUFSIZE 8192 + +/* gzip modes, also provide a little integrity check on the passed structure */ +#define GZ_NONE 0 +#define GZ_READ 7247 +#define GZ_WRITE 31153 +#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ + +/* values for gz_state how */ +#define LOOK 0 /* look for a gzip header */ +#define COPY 1 /* copy input directly */ +#define GZIP 2 /* decompress a gzip stream */ + +/* internal gzip file state data structure */ +typedef struct { + /* used for both reading and writing */ + int mode; /* see gzip modes above */ + int fd; /* file descriptor */ + char *path; /* path or fd for error messages */ + z_off64_t pos; /* current position in uncompressed data */ + unsigned size; /* buffer size, zero if not allocated yet */ + unsigned want; /* requested buffer size, default is GZBUFSIZE */ + unsigned char *in; /* input buffer */ + unsigned char *out; /* output buffer (double-sized when reading) */ + unsigned char *next; /* next output data to deliver or write */ + /* just for reading */ + unsigned have; /* amount of output data unused at next */ + int eof; /* true if end of input file reached */ + z_off64_t start; /* where the gzip data started, for rewinding */ + z_off64_t raw; /* where the raw data started, for seeking */ + int how; /* 0: get header, 1: copy, 2: decompress */ + int direct; /* true if last read direct, false if gzip */ + /* just for writing */ + int level; /* compression level */ + int strategy; /* compression strategy */ + /* seek request */ + z_off64_t skip; /* amount to skip (already rewound if backwards) */ + int seek; /* true if seek request pending */ + /* error information */ + int err; /* error code */ + char *msg; /* error message */ + /* zlib inflate or deflate stream */ + z_stream strm; /* stream structure in-place (not a pointer) */ +} gz_state; +typedef gz_state FAR *gz_statep; + +/* shared functions */ +ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); +#if defined UNDER_CE && defined NO_ERRNO_H +ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); +#endif + +/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t + value -- needed when comparing unsigned to z_off64_t, which is signed + (possible z_off64_t types off_t, off64_t, and long are all signed) */ +#ifdef INT_MAX +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) +#else +ZEXTERN unsigned ZEXPORT gz_intmax OF((void)); +# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) +#endif diff --git a/compat/zlib/gzio.c b/compat/zlib/gzio.c deleted file mode 100644 index 8307498..0000000 --- a/compat/zlib/gzio.c +++ /dev/null @@ -1,1026 +0,0 @@ -/* gzio.c -- IO on .gz files - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Compile this file with -DNO_GZCOMPRESS to avoid the compression code. - */ - -/* @(#) $Id: gzio.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ - -#include - -#include "zutil.h" - -#ifdef NO_DEFLATE /* for compatibility with old definition */ -# define NO_GZCOMPRESS -#endif - -#ifndef NO_DUMMY_DECL -struct internal_state {int dummy;}; /* for buggy compilers */ -#endif - -#ifndef Z_BUFSIZE -# ifdef MAXSEG_64K -# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */ -# else -# define Z_BUFSIZE 16384 -# endif -#endif -#ifndef Z_PRINTF_BUFSIZE -# define Z_PRINTF_BUFSIZE 4096 -#endif - -#ifdef __MVS__ -# pragma map (fdopen , "\174\174FDOPEN") - FILE *fdopen(int, const char *); -#endif - -#ifndef STDC -extern voidp malloc OF((uInt size)); -extern void free OF((voidpf ptr)); -#endif - -#define ALLOC(size) malloc(size) -#define TRYFREE(p) {if (p) free(p);} - -static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ - -/* gzip flag byte */ -#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ -#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ -#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ -#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ -#define COMMENT 0x10 /* bit 4 set: file comment present */ -#define RESERVED 0xE0 /* bits 5..7: reserved */ - -typedef struct gz_stream { - z_stream stream; - int z_err; /* error code for last stream operation */ - int z_eof; /* set if end of input file */ - FILE *file; /* .gz file */ - Byte *inbuf; /* input buffer */ - Byte *outbuf; /* output buffer */ - uLong crc; /* crc32 of uncompressed data */ - char *msg; /* error message */ - char *path; /* path name for debugging only */ - int transparent; /* 1 if input file is not a .gz file */ - char mode; /* 'w' or 'r' */ - z_off_t start; /* start of compressed data in file (header skipped) */ - z_off_t in; /* bytes into deflate or inflate */ - z_off_t out; /* bytes out of deflate or inflate */ - int back; /* one character push-back */ - int last; /* true if push-back is last character */ -} gz_stream; - - -local gzFile gz_open OF((const char *path, const char *mode, int fd)); -local int do_flush OF((gzFile file, int flush)); -local int get_byte OF((gz_stream *s)); -local void check_header OF((gz_stream *s)); -local int destroy OF((gz_stream *s)); -local void putLong OF((FILE *file, uLong x)); -local uLong getLong OF((gz_stream *s)); - -/* =========================================================================== - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb"). The file is given either by file descriptor - or path name (if fd == -1). - gz_open returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). -*/ -local gzFile gz_open (path, mode, fd) - const char *path; - const char *mode; - int fd; -{ - int err; - int level = Z_DEFAULT_COMPRESSION; /* compression level */ - int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */ - char *p = (char*)mode; - gz_stream *s; - char fmode[80]; /* copy of mode, without the compression level */ - char *m = fmode; - - if (!path || !mode) return Z_NULL; - - s = (gz_stream *)ALLOC(sizeof(gz_stream)); - if (!s) return Z_NULL; - - s->stream.zalloc = (alloc_func)0; - s->stream.zfree = (free_func)0; - s->stream.opaque = (voidpf)0; - s->stream.next_in = s->inbuf = Z_NULL; - s->stream.next_out = s->outbuf = Z_NULL; - s->stream.avail_in = s->stream.avail_out = 0; - s->file = NULL; - s->z_err = Z_OK; - s->z_eof = 0; - s->in = 0; - s->out = 0; - s->back = EOF; - s->crc = crc32(0L, Z_NULL, 0); - s->msg = NULL; - s->transparent = 0; - - s->path = (char*)ALLOC(strlen(path)+1); - if (s->path == NULL) { - return destroy(s), (gzFile)Z_NULL; - } - strcpy(s->path, path); /* do this early for debugging */ - - s->mode = '\0'; - do { - if (*p == 'r') s->mode = 'r'; - if (*p == 'w' || *p == 'a') s->mode = 'w'; - if (*p >= '0' && *p <= '9') { - level = *p - '0'; - } else if (*p == 'f') { - strategy = Z_FILTERED; - } else if (*p == 'h') { - strategy = Z_HUFFMAN_ONLY; - } else if (*p == 'R') { - strategy = Z_RLE; - } else { - *m++ = *p; /* copy the mode */ - } - } while (*p++ && m != fmode + sizeof(fmode)); - if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL; - - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - err = Z_STREAM_ERROR; -#else - err = deflateInit2(&(s->stream), level, - Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy); - /* windowBits is passed < 0 to suppress zlib header */ - - s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); -#endif - if (err != Z_OK || s->outbuf == Z_NULL) { - return destroy(s), (gzFile)Z_NULL; - } - } else { - s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); - - err = inflateInit2(&(s->stream), -MAX_WBITS); - /* windowBits is passed < 0 to tell that there is no zlib header. - * Note that in this case inflate *requires* an extra "dummy" byte - * after the compressed stream in order to complete decompression and - * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are - * present after the compressed stream. - */ - if (err != Z_OK || s->inbuf == Z_NULL) { - return destroy(s), (gzFile)Z_NULL; - } - } - s->stream.avail_out = Z_BUFSIZE; - - errno = 0; - s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode); - - if (s->file == NULL) { - return destroy(s), (gzFile)Z_NULL; - } - if (s->mode == 'w') { - /* Write a very simple .gz header: - */ - fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], - Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); - s->start = 10L; - /* We use 10L instead of ftell(s->file) to because ftell causes an - * fflush on some systems. This version of the library doesn't use - * start anyway in write mode, so this initialization is not - * necessary. - */ - } else { - check_header(s); /* skip the .gz header */ - s->start = ftell(s->file) - s->stream.avail_in; - } - - return (gzFile)s; -} - -/* =========================================================================== - Opens a gzip (.gz) file for reading or writing. -*/ -gzFile ZEXPORT gzopen (path, mode) - const char *path; - const char *mode; -{ - return gz_open (path, mode, -1); -} - -/* =========================================================================== - Associate a gzFile with the file descriptor fd. fd is not dup'ed here - to mimic the behavio(u)r of fdopen. -*/ -gzFile ZEXPORT gzdopen (fd, mode) - int fd; - const char *mode; -{ - char name[46]; /* allow for up to 128-bit integers */ - - if (fd < 0) return (gzFile)Z_NULL; - sprintf(name, "", fd); /* for debugging */ - - return gz_open (name, mode, fd); -} - -/* =========================================================================== - * Update the compression level and strategy - */ -int ZEXPORT gzsetparams (file, level, strategy) - gzFile file; - int level; - int strategy; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - /* Make room to allow flushing */ - if (s->stream.avail_out == 0) { - - s->stream.next_out = s->outbuf; - if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { - s->z_err = Z_ERRNO; - } - s->stream.avail_out = Z_BUFSIZE; - } - - return deflateParams (&(s->stream), level, strategy); -} - -/* =========================================================================== - Read a byte from a gz_stream; update next_in and avail_in. Return EOF - for end of file. - IN assertion: the stream s has been sucessfully opened for reading. -*/ -local int get_byte(s) - gz_stream *s; -{ - if (s->z_eof) return EOF; - if (s->stream.avail_in == 0) { - errno = 0; - s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file); - if (s->stream.avail_in == 0) { - s->z_eof = 1; - if (ferror(s->file)) s->z_err = Z_ERRNO; - return EOF; - } - s->stream.next_in = s->inbuf; - } - s->stream.avail_in--; - return *(s->stream.next_in)++; -} - -/* =========================================================================== - Check the gzip header of a gz_stream opened for reading. Set the stream - mode to transparent if the gzip magic header is not present; set s->err - to Z_DATA_ERROR if the magic header is present but the rest of the header - is incorrect. - IN assertion: the stream s has already been created sucessfully; - s->stream.avail_in is zero for the first time, but may be non-zero - for concatenated .gz files. -*/ -local void check_header(s) - gz_stream *s; -{ - int method; /* method byte */ - int flags; /* flags byte */ - uInt len; - int c; - - /* Assure two bytes in the buffer so we can peek ahead -- handle case - where first byte of header is at the end of the buffer after the last - gzip segment */ - len = s->stream.avail_in; - if (len < 2) { - if (len) s->inbuf[0] = s->stream.next_in[0]; - errno = 0; - len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file); - if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO; - s->stream.avail_in += len; - s->stream.next_in = s->inbuf; - if (s->stream.avail_in < 2) { - s->transparent = s->stream.avail_in; - return; - } - } - - /* Peek ahead to check the gzip magic header */ - if (s->stream.next_in[0] != gz_magic[0] || - s->stream.next_in[1] != gz_magic[1]) { - s->transparent = 1; - return; - } - s->stream.avail_in -= 2; - s->stream.next_in += 2; - - /* Check the rest of the gzip header */ - method = get_byte(s); - flags = get_byte(s); - if (method != Z_DEFLATED || (flags & RESERVED) != 0) { - s->z_err = Z_DATA_ERROR; - return; - } - - /* Discard time, xflags and OS code: */ - for (len = 0; len < 6; len++) (void)get_byte(s); - - if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ - len = (uInt)get_byte(s); - len += ((uInt)get_byte(s))<<8; - /* len is garbage if EOF but the loop below will quit anyway */ - while (len-- != 0 && get_byte(s) != EOF) ; - } - if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ - while ((c = get_byte(s)) != 0 && c != EOF) ; - } - if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ - while ((c = get_byte(s)) != 0 && c != EOF) ; - } - if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ - for (len = 0; len < 2; len++) (void)get_byte(s); - } - s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK; -} - - /* =========================================================================== - * Cleanup then free the given gz_stream. Return a zlib error code. - Try freeing in the reverse order of allocations. - */ -local int destroy (s) - gz_stream *s; -{ - int err = Z_OK; - - if (!s) return Z_STREAM_ERROR; - - TRYFREE(s->msg); - - if (s->stream.state != NULL) { - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - err = Z_STREAM_ERROR; -#else - err = deflateEnd(&(s->stream)); -#endif - } else if (s->mode == 'r') { - err = inflateEnd(&(s->stream)); - } - } - if (s->file != NULL && fclose(s->file)) { -#ifdef ESPIPE - if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */ -#endif - err = Z_ERRNO; - } - if (s->z_err < 0) err = s->z_err; - - TRYFREE(s->inbuf); - TRYFREE(s->outbuf); - TRYFREE(s->path); - TRYFREE(s); - return err; -} - -/* =========================================================================== - Reads the given number of uncompressed bytes from the compressed file. - gzread returns the number of bytes actually read (0 for end of file). -*/ -int ZEXPORT gzread (file, buf, len) - gzFile file; - voidp buf; - unsigned len; -{ - gz_stream *s = (gz_stream*)file; - Bytef *start = (Bytef*)buf; /* starting point for crc computation */ - Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */ - - if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR; - - if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1; - if (s->z_err == Z_STREAM_END) return 0; /* EOF */ - - next_out = (Byte*)buf; - s->stream.next_out = (Bytef*)buf; - s->stream.avail_out = len; - - if (s->stream.avail_out && s->back != EOF) { - *next_out++ = s->back; - s->stream.next_out++; - s->stream.avail_out--; - s->back = EOF; - s->out++; - start++; - if (s->last) { - s->z_err = Z_STREAM_END; - return 1; - } - } - - while (s->stream.avail_out != 0) { - - if (s->transparent) { - /* Copy first the lookahead bytes: */ - uInt n = s->stream.avail_in; - if (n > s->stream.avail_out) n = s->stream.avail_out; - if (n > 0) { - zmemcpy(s->stream.next_out, s->stream.next_in, n); - next_out += n; - s->stream.next_out = next_out; - s->stream.next_in += n; - s->stream.avail_out -= n; - s->stream.avail_in -= n; - } - if (s->stream.avail_out > 0) { - s->stream.avail_out -= - (uInt)fread(next_out, 1, s->stream.avail_out, s->file); - } - len -= s->stream.avail_out; - s->in += len; - s->out += len; - if (len == 0) s->z_eof = 1; - return (int)len; - } - if (s->stream.avail_in == 0 && !s->z_eof) { - - errno = 0; - s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file); - if (s->stream.avail_in == 0) { - s->z_eof = 1; - if (ferror(s->file)) { - s->z_err = Z_ERRNO; - break; - } - } - s->stream.next_in = s->inbuf; - } - s->in += s->stream.avail_in; - s->out += s->stream.avail_out; - s->z_err = inflate(&(s->stream), Z_NO_FLUSH); - s->in -= s->stream.avail_in; - s->out -= s->stream.avail_out; - - if (s->z_err == Z_STREAM_END) { - /* Check CRC and original size */ - s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); - start = s->stream.next_out; - - if (getLong(s) != s->crc) { - s->z_err = Z_DATA_ERROR; - } else { - (void)getLong(s); - /* The uncompressed length returned by above getlong() may be - * different from s->out in case of concatenated .gz files. - * Check for such files: - */ - check_header(s); - if (s->z_err == Z_OK) { - inflateReset(&(s->stream)); - s->crc = crc32(0L, Z_NULL, 0); - } - } - } - if (s->z_err != Z_OK || s->z_eof) break; - } - s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); - - if (len == s->stream.avail_out && - (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO)) - return -1; - return (int)(len - s->stream.avail_out); -} - - -/* =========================================================================== - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. -*/ -int ZEXPORT gzgetc(file) - gzFile file; -{ - unsigned char c; - - return gzread(file, &c, 1) == 1 ? c : -1; -} - - -/* =========================================================================== - Push one byte back onto the stream. -*/ -int ZEXPORT gzungetc(c, file) - int c; - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF; - s->back = c; - s->out--; - s->last = (s->z_err == Z_STREAM_END); - if (s->last) s->z_err = Z_OK; - s->z_eof = 0; - return c; -} - - -/* =========================================================================== - Reads bytes from the compressed file until len-1 characters are - read, or a newline character is read and transferred to buf, or an - end-of-file condition is encountered. The string is then terminated - with a null character. - gzgets returns buf, or Z_NULL in case of error. - - The current implementation is not optimized at all. -*/ -char * ZEXPORT gzgets(file, buf, len) - gzFile file; - char *buf; - int len; -{ - char *b = buf; - if (buf == Z_NULL || len <= 0) return Z_NULL; - - while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ; - *buf = '\0'; - return b == buf && len > 0 ? Z_NULL : b; -} - - -#ifndef NO_GZCOMPRESS -/* =========================================================================== - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of bytes actually written (0 in case of error). -*/ -int ZEXPORT gzwrite (file, buf, len) - gzFile file; - voidpc buf; - unsigned len; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - s->stream.next_in = (Bytef*)buf; - s->stream.avail_in = len; - - while (s->stream.avail_in != 0) { - - if (s->stream.avail_out == 0) { - - s->stream.next_out = s->outbuf; - if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { - s->z_err = Z_ERRNO; - break; - } - s->stream.avail_out = Z_BUFSIZE; - } - s->in += s->stream.avail_in; - s->out += s->stream.avail_out; - s->z_err = deflate(&(s->stream), Z_NO_FLUSH); - s->in -= s->stream.avail_in; - s->out -= s->stream.avail_out; - if (s->z_err != Z_OK) break; - } - s->crc = crc32(s->crc, (const Bytef *)buf, len); - - return (int)(len - s->stream.avail_in); -} - - -/* =========================================================================== - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). -*/ -#ifdef STDC -#include - -int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) -{ - char buf[Z_PRINTF_BUFSIZE]; - va_list va; - int len; - - buf[sizeof(buf) - 1] = 0; - va_start(va, format); -#ifdef NO_vsnprintf -# ifdef HAS_vsprintf_void - (void)vsprintf(buf, format, va); - va_end(va); - for (len = 0; len < sizeof(buf); len++) - if (buf[len] == 0) break; -# else - len = vsprintf(buf, format, va); - va_end(va); -# endif -#else -# ifdef HAS_vsnprintf_void - (void)vsnprintf(buf, sizeof(buf), format, va); - va_end(va); - len = strlen(buf); -# else - len = vsnprintf(buf, sizeof(buf), format, va); - va_end(va); -# endif -#endif - if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0) - return 0; - return gzwrite(file, buf, (unsigned)len); -} -#else /* not ANSI C */ - -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) - gzFile file; - const char *format; - int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, - a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; -{ - char buf[Z_PRINTF_BUFSIZE]; - int len; - - buf[sizeof(buf) - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - for (len = 0; len < sizeof(buf); len++) - if (buf[len] == 0) break; -# else - len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#else -# ifdef HAS_snprintf_void - snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen(buf); -# else - len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#endif - if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0) - return 0; - return gzwrite(file, buf, len); -} -#endif - -/* =========================================================================== - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. -*/ -int ZEXPORT gzputc(file, c) - gzFile file; - int c; -{ - unsigned char cc = (unsigned char) c; /* required for big endian systems */ - - return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1; -} - - -/* =========================================================================== - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. -*/ -int ZEXPORT gzputs(file, s) - gzFile file; - const char *s; -{ - return gzwrite(file, (char*)s, (unsigned)strlen(s)); -} - - -/* =========================================================================== - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. -*/ -local int do_flush (file, flush) - gzFile file; - int flush; -{ - uInt len; - int done = 0; - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; - - s->stream.avail_in = 0; /* should be zero already anyway */ - - for (;;) { - len = Z_BUFSIZE - s->stream.avail_out; - - if (len != 0) { - if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) { - s->z_err = Z_ERRNO; - return Z_ERRNO; - } - s->stream.next_out = s->outbuf; - s->stream.avail_out = Z_BUFSIZE; - } - if (done) break; - s->out += s->stream.avail_out; - s->z_err = deflate(&(s->stream), flush); - s->out -= s->stream.avail_out; - - /* Ignore the second of two consecutive flushes: */ - if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK; - - /* deflate has finished flushing only when it hasn't used up - * all the available space in the output buffer: - */ - done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END); - - if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break; - } - return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; -} - -int ZEXPORT gzflush (file, flush) - gzFile file; - int flush; -{ - gz_stream *s = (gz_stream*)file; - int err = do_flush (file, flush); - - if (err) return err; - fflush(s->file); - return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; -} -#endif /* NO_GZCOMPRESS */ - -/* =========================================================================== - Sets the starting position for the next gzread or gzwrite on the given - compressed file. The offset represents a number of bytes in the - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error. - SEEK_END is not implemented, returns error. - In this version of the library, gzseek can be extremely slow. -*/ -z_off_t ZEXPORT gzseek (file, offset, whence) - gzFile file; - z_off_t offset; - int whence; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || whence == SEEK_END || - s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) { - return -1L; - } - - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - return -1L; -#else - if (whence == SEEK_SET) { - offset -= s->in; - } - if (offset < 0) return -1L; - - /* At this point, offset is the number of zero bytes to write. */ - if (s->inbuf == Z_NULL) { - s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */ - if (s->inbuf == Z_NULL) return -1L; - zmemzero(s->inbuf, Z_BUFSIZE); - } - while (offset > 0) { - uInt size = Z_BUFSIZE; - if (offset < Z_BUFSIZE) size = (uInt)offset; - - size = gzwrite(file, s->inbuf, size); - if (size == 0) return -1L; - - offset -= size; - } - return s->in; -#endif - } - /* Rest of function is for reading only */ - - /* compute absolute position */ - if (whence == SEEK_CUR) { - offset += s->out; - } - if (offset < 0) return -1L; - - if (s->transparent) { - /* map to fseek */ - s->back = EOF; - s->stream.avail_in = 0; - s->stream.next_in = s->inbuf; - if (fseek(s->file, offset, SEEK_SET) < 0) return -1L; - - s->in = s->out = offset; - return offset; - } - - /* For a negative seek, rewind and use positive seek */ - if (offset >= s->out) { - offset -= s->out; - } else if (gzrewind(file) < 0) { - return -1L; - } - /* offset is now the number of bytes to skip. */ - - if (offset != 0 && s->outbuf == Z_NULL) { - s->outbuf = (Byte*)ALLOC(Z_BUFSIZE); - if (s->outbuf == Z_NULL) return -1L; - } - if (offset && s->back != EOF) { - s->back = EOF; - s->out++; - offset--; - if (s->last) s->z_err = Z_STREAM_END; - } - while (offset > 0) { - int size = Z_BUFSIZE; - if (offset < Z_BUFSIZE) size = (int)offset; - - size = gzread(file, s->outbuf, (uInt)size); - if (size <= 0) return -1L; - offset -= size; - } - return s->out; -} - -/* =========================================================================== - Rewinds input file. -*/ -int ZEXPORT gzrewind (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'r') return -1; - - s->z_err = Z_OK; - s->z_eof = 0; - s->back = EOF; - s->stream.avail_in = 0; - s->stream.next_in = s->inbuf; - s->crc = crc32(0L, Z_NULL, 0); - if (!s->transparent) (void)inflateReset(&s->stream); - s->in = 0; - s->out = 0; - return fseek(s->file, s->start, SEEK_SET); -} - -/* =========================================================================== - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. -*/ -z_off_t ZEXPORT gztell (file) - gzFile file; -{ - return gzseek(file, 0L, SEEK_CUR); -} - -/* =========================================================================== - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. -*/ -int ZEXPORT gzeof (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - /* With concatenated compressed files that can have embedded - * crc trailers, z_eof is no longer the only/best indicator of EOF - * on a gz_stream. Handle end-of-stream error explicitly here. - */ - if (s == NULL || s->mode != 'r') return 0; - if (s->z_eof) return 1; - return s->z_err == Z_STREAM_END; -} - -/* =========================================================================== - Returns 1 if reading and doing so transparently, otherwise zero. -*/ -int ZEXPORT gzdirect (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL || s->mode != 'r') return 0; - return s->transparent; -} - -/* =========================================================================== - Outputs a long in LSB order to the given file -*/ -local void putLong (file, x) - FILE *file; - uLong x; -{ - int n; - for (n = 0; n < 4; n++) { - fputc((int)(x & 0xff), file); - x >>= 8; - } -} - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets z_err in case - of error. -*/ -local uLong getLong (s) - gz_stream *s; -{ - uLong x = (uLong)get_byte(s); - int c; - - x += ((uLong)get_byte(s))<<8; - x += ((uLong)get_byte(s))<<16; - c = get_byte(s); - if (c == EOF) s->z_err = Z_DATA_ERROR; - x += ((uLong)c)<<24; - return x; -} - -/* =========================================================================== - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. -*/ -int ZEXPORT gzclose (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL) return Z_STREAM_ERROR; - - if (s->mode == 'w') { -#ifdef NO_GZCOMPRESS - return Z_STREAM_ERROR; -#else - if (do_flush (file, Z_FINISH) != Z_OK) - return destroy((gz_stream*)file); - - putLong (s->file, s->crc); - putLong (s->file, (uLong)(s->in & 0xffffffff)); -#endif - } - return destroy((gz_stream*)file); -} - -#ifdef STDC -# define zstrerror(errnum) strerror(errnum) -#else -# define zstrerror(errnum) "" -#endif - -/* =========================================================================== - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. -*/ -const char * ZEXPORT gzerror (file, errnum) - gzFile file; - int *errnum; -{ - char *m; - gz_stream *s = (gz_stream*)file; - - if (s == NULL) { - *errnum = Z_STREAM_ERROR; - return (const char*)ERR_MSG(Z_STREAM_ERROR); - } - *errnum = s->z_err; - if (*errnum == Z_OK) return (const char*)""; - - m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg); - - if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err); - - TRYFREE(s->msg); - s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3); - if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR); - strcpy(s->msg, s->path); - strcat(s->msg, ": "); - strcat(s->msg, m); - return (const char*)s->msg; -} - -/* =========================================================================== - Clear the error and end-of-file flags, and do the same for the real file. -*/ -void ZEXPORT gzclearerr (file) - gzFile file; -{ - gz_stream *s = (gz_stream*)file; - - if (s == NULL) return; - if (s->z_err != Z_STREAM_END) s->z_err = Z_OK; - s->z_eof = 0; - clearerr(s->file); -} diff --git a/compat/zlib/gzlib.c b/compat/zlib/gzlib.c new file mode 100644 index 0000000..6fdb08a --- /dev/null +++ b/compat/zlib/gzlib.c @@ -0,0 +1,535 @@ +/* gzlib.c -- zlib functions common to reading and writing gzip files + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +#ifdef _LARGEFILE64_SOURCE +# define LSEEK lseek64 +#else +# define LSEEK lseek +#endif + +/* Local functions */ +local void gz_reset OF((gz_statep)); +local gzFile gz_open OF((const char *, int, const char *)); + +#if defined UNDER_CE && defined NO_ERRNO_H + +/* Map the Windows error number in ERROR to a locale-dependent error message + string and return a pointer to it. Typically, the values for ERROR come + from GetLastError. + + The string pointed to shall not be modified by the application, but may be + overwritten by a subsequent call to gz_strwinerror + + The gz_strwinerror function does not change the current setting of + GetLastError. */ +char ZEXPORT *gz_strwinerror (error) + DWORD error; +{ + static char buf[1024]; + + wchar_t *msgbuf; + DWORD lasterr = GetLastError(); + DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, + error, + 0, /* Default language */ + (LPVOID)&msgbuf, + 0, + NULL); + if (chars != 0) { + /* If there is an \r\n appended, zap it. */ + if (chars >= 2 + && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { + chars -= 2; + msgbuf[chars] = 0; + } + + if (chars > sizeof (buf) - 1) { + chars = sizeof (buf) - 1; + msgbuf[chars] = 0; + } + + wcstombs(buf, msgbuf, chars + 1); + LocalFree(msgbuf); + } + else { + sprintf(buf, "unknown win32 error (%ld)", error); + } + + SetLastError(lasterr); + return buf; +} + +#endif /* UNDER_CE && NO_ERRNO_H */ + +/* Reset gzip file state */ +local void gz_reset(state) + gz_statep state; +{ + if (state->mode == GZ_READ) { /* for reading ... */ + state->have = 0; /* no output data available */ + state->eof = 0; /* not at end of file */ + state->how = LOOK; /* look for gzip header */ + state->direct = 1; /* default for empty file */ + } + state->seek = 0; /* no seek request pending */ + gz_error(state, Z_OK, NULL); /* clear error */ + state->pos = 0; /* no uncompressed data yet */ + state->strm.avail_in = 0; /* no input data yet */ +} + +/* Open a gzip file either by name or file descriptor. */ +local gzFile gz_open(path, fd, mode) + const char *path; + int fd; + const char *mode; +{ + gz_statep state; + + /* allocate gzFile structure to return */ + state = malloc(sizeof(gz_state)); + if (state == NULL) + return NULL; + state->size = 0; /* no buffers allocated yet */ + state->want = GZBUFSIZE; /* requested buffer size */ + state->msg = NULL; /* no error message yet */ + + /* interpret mode */ + state->mode = GZ_NONE; + state->level = Z_DEFAULT_COMPRESSION; + state->strategy = Z_DEFAULT_STRATEGY; + while (*mode) { + if (*mode >= '0' && *mode <= '9') + state->level = *mode - '0'; + else + switch (*mode) { + case 'r': + state->mode = GZ_READ; + break; +#ifndef NO_GZCOMPRESS + case 'w': + state->mode = GZ_WRITE; + break; + case 'a': + state->mode = GZ_APPEND; + break; +#endif + case '+': /* can't read and write at the same time */ + free(state); + return NULL; + case 'b': /* ignore -- will request binary anyway */ + break; + case 'f': + state->strategy = Z_FILTERED; + break; + case 'h': + state->strategy = Z_HUFFMAN_ONLY; + break; + case 'R': + state->strategy = Z_RLE; + break; + case 'F': + state->strategy = Z_FIXED; + default: /* could consider as an error, but just ignore */ + ; + } + mode++; + } + + /* must provide an "r", "w", or "a" */ + if (state->mode == GZ_NONE) { + free(state); + return NULL; + } + + /* save the path name for error messages */ + state->path = malloc(strlen(path) + 1); + if (state->path == NULL) { + free(state); + return NULL; + } + strcpy(state->path, path); + + /* open the file with the appropriate mode (or just use fd) */ + state->fd = fd != -1 ? fd : + open(path, +#ifdef O_LARGEFILE + O_LARGEFILE | +#endif +#ifdef O_BINARY + O_BINARY | +#endif + (state->mode == GZ_READ ? + O_RDONLY : + (O_WRONLY | O_CREAT | ( + state->mode == GZ_WRITE ? + O_TRUNC : + O_APPEND))), + 0666); + if (state->fd == -1) { + free(state); + return NULL; + } + if (state->mode == GZ_APPEND) + state->mode = GZ_WRITE; /* simplify later checks */ + + /* save the current position for rewinding (only if reading) */ + if (state->mode == GZ_READ) { + state->start = LSEEK(state->fd, 0, SEEK_CUR); + if (state->start == -1) state->start = 0; + } + + /* initialize stream */ + gz_reset(state); + + /* return stream */ + return (gzFile)state; +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen64(path, mode) + const char *path; + const char *mode; +{ + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzdopen(fd, mode) + int fd; + const char *mode; +{ + char *path; /* identifier for error messages */ + gzFile gz; + + if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) + return NULL; + sprintf(path, "", fd); + gz = gz_open(path, fd, mode); + free(path); + return gz; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzbuffer(file, size) + gzFile file; + unsigned size; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* make sure we haven't already allocated memory */ + if (state->size != 0) + return -1; + + /* check and set requested size */ + if (size == 0) + return -1; + state->want = size; + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzrewind(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* back up and start over */ + if (LSEEK(state->fd, state->start, SEEK_SET) == -1) + return -1; + gz_reset(state); + return 0; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzseek64(file, offset, whence) + gzFile file; + z_off64_t offset; + int whence; +{ + unsigned n; + z_off64_t ret; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* check that there's no error */ + if (state->err != Z_OK) + return -1; + + /* can only seek from start or relative to current position */ + if (whence != SEEK_SET && whence != SEEK_CUR) + return -1; + + /* normalize offset to a SEEK_CUR specification */ + if (whence == SEEK_SET) + offset -= state->pos; + else if (state->seek) + offset += state->skip; + state->seek = 0; + + /* if within raw area while reading, just go there */ + if (state->mode == GZ_READ && state->how == COPY && + state->pos + offset >= state->raw) { + ret = LSEEK(state->fd, offset, SEEK_CUR); + if (ret == -1) + return -1; + state->have = 0; + state->eof = 0; + state->seek = 0; + gz_error(state, Z_OK, NULL); + state->strm.avail_in = 0; + state->pos += offset; + return state->pos; + } + + /* calculate skip amount, rewinding if needed for back seek when reading */ + if (offset < 0) { + if (state->mode != GZ_READ) /* writing -- can't go backwards */ + return -1; + offset += state->pos; + if (offset < 0) /* before start of file! */ + return -1; + if (gzrewind(file) == -1) /* rewind, then skip to offset */ + return -1; + } + + /* if reading, skip what's in output buffer (one less gzgetc() check) */ + if (state->mode == GZ_READ) { + n = GT_OFF(state->have) || (z_off64_t)state->have > offset ? + (unsigned)offset : state->have; + state->have -= n; + state->next += n; + state->pos += n; + offset -= n; + } + + /* request skip (if not zero) */ + if (offset) { + state->seek = 1; + state->skip = offset; + } + return state->pos + offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzseek(file, offset, whence) + gzFile file; + z_off_t offset; + int whence; +{ + z_off64_t ret; + + ret = gzseek64(file, (z_off64_t)offset, whence); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gztell64(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* return position */ + return state->pos + (state->seek ? state->skip : 0); +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gztell(file) + gzFile file; +{ + z_off64_t ret; + + ret = gztell64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzoffset64(file) + gzFile file; +{ + z_off64_t offset; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* compute and return effective offset in file */ + offset = LSEEK(state->fd, 0, SEEK_CUR); + if (offset == -1) + return -1; + if (state->mode == GZ_READ) /* reading */ + offset -= state->strm.avail_in; /* don't count buffered input */ + return offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzoffset(file) + gzFile file; +{ + z_off64_t ret; + + ret = gzoffset64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzeof(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return 0; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return 0; + + /* return end-of-file state */ + return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0; +} + +/* -- see zlib.h -- */ +const char * ZEXPORT gzerror(file, errnum) + gzFile file; + int *errnum; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return NULL; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return NULL; + + /* return error information */ + if (errnum != NULL) + *errnum = state->err; + return state->msg == NULL ? "" : state->msg; +} + +/* -- see zlib.h -- */ +void ZEXPORT gzclearerr(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return; + + /* clear error and end-of-file */ + if (state->mode == GZ_READ) + state->eof = 0; + gz_error(state, Z_OK, NULL); +} + +/* Create an error message in allocated memory and set state->err and + state->msg accordingly. Free any previous error message already there. Do + not try to free or allocate space if the error is Z_MEM_ERROR (out of + memory). Simply save the error message as a static string. If there is an + allocation failure constructing the error message, then convert the error to + out of memory. */ +void ZEXPORT gz_error(state, err, msg) + gz_statep state; + int err; + const char *msg; +{ + /* free previously allocated message and clear */ + if (state->msg != NULL) { + if (state->err != Z_MEM_ERROR) + free(state->msg); + state->msg = NULL; + } + + /* set error code, and if no message, then done */ + state->err = err; + if (msg == NULL) + return; + + /* for an out of memory error, save as static string */ + if (err == Z_MEM_ERROR) { + state->msg = (char *)msg; + return; + } + + /* construct error message with path */ + if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { + state->err = Z_MEM_ERROR; + state->msg = (char *)"out of memory"; + return; + } + strcpy(state->msg, state->path); + strcat(state->msg, ": "); + strcat(state->msg, msg); + return; +} + +#ifndef INT_MAX +/* portably return maximum value for an int (when limits.h presumed not + available) -- we need to do this to cover cases where 2's complement not + used, since C standard permits 1's complement and sign-bit representations, + otherwise we could just use ((unsigned)-1) >> 1 */ +unsigned ZEXPORT gz_intmax() +{ + unsigned p, q; + + p = 1; + do { + q = p; + p <<= 1; + p++; + } while (p > q); + return q >> 1; +} +#endif diff --git a/compat/zlib/gzread.c b/compat/zlib/gzread.c new file mode 100644 index 0000000..434ef02 --- /dev/null +++ b/compat/zlib/gzread.c @@ -0,0 +1,652 @@ +/* gzread.c -- zlib functions for reading gzip files + * Copyright (C) 2004, 2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *)); +local int gz_avail OF((gz_statep)); +local int gz_next4 OF((gz_statep, unsigned long *)); +local int gz_head OF((gz_statep)); +local int gz_decomp OF((gz_statep)); +local int gz_make OF((gz_statep)); +local int gz_skip OF((gz_statep, z_off64_t)); + +/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from + state->fd, and update state->eof, state->err, and state->msg as appropriate. + This function needs to loop on read(), since read() is not guaranteed to + read the number of bytes requested, depending on the type of descriptor. */ +local int gz_load(state, buf, len, have) + gz_statep state; + unsigned char *buf; + unsigned len; + unsigned *have; +{ + int ret; + + *have = 0; + do { + ret = read(state->fd, buf + *have, len - *have); + if (ret <= 0) + break; + *have += ret; + } while (*have < len); + if (ret < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (ret == 0) + state->eof = 1; + return 0; +} + +/* Load up input buffer and set eof flag if last data loaded -- return -1 on + error, 0 otherwise. Note that the eof flag is set when the end of the input + file is reached, even though there may be unused data in the buffer. Once + that data has been used, no more attempts will be made to read the file. + gz_avail() assumes that strm->avail_in == 0. */ +local int gz_avail(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + if (state->err != Z_OK) + return -1; + if (state->eof == 0) { + if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1) + return -1; + strm->next_in = state->in; + } + return 0; +} + +/* Get next byte from input, or -1 if end or error. */ +#define NEXT() ((strm->avail_in == 0 && gz_avail(state) == -1) ? -1 : \ + (strm->avail_in == 0 ? -1 : \ + (strm->avail_in--, *(strm->next_in)++))) + +/* Get a four-byte little-endian integer and return 0 on success and the value + in *ret. Otherwise -1 is returned and *ret is not modified. */ +local int gz_next4(state, ret) + gz_statep state; + unsigned long *ret; +{ + int ch; + unsigned long val; + z_streamp strm = &(state->strm); + + val = NEXT(); + val += (unsigned)NEXT() << 8; + val += (unsigned long)NEXT() << 16; + ch = NEXT(); + if (ch == -1) + return -1; + val += (unsigned long)ch << 24; + *ret = val; + return 0; +} + +/* Look for gzip header, set up for inflate or copy. state->have must be zero. + If this is the first time in, allocate required memory. state->how will be + left unchanged if there is no more input data available, will be set to COPY + if there is no gzip header and direct copying will be performed, or it will + be set to GZIP for decompression, and the gzip header will be skipped so + that the next available input data is the raw deflate stream. If direct + copying, then leftover input data from the input buffer will be copied to + the output buffer. In that case, all further file reads will be directly to + either the output buffer or a user buffer. If decompressing, the inflate + state and the check value will be initialized. gz_head() will return 0 on + success or -1 on failure. Failures may include read errors or gzip header + errors. */ +local int gz_head(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + int flags; + unsigned len; + + /* allocate read buffers and inflate memory */ + if (state->size == 0) { + /* allocate buffers */ + state->in = malloc(state->want); + state->out = malloc(state->want << 1); + if (state->in == NULL || state->out == NULL) { + if (state->out != NULL) + free(state->out); + if (state->in != NULL) + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + state->size = state->want; + + /* allocate inflate memory */ + state->strm.zalloc = Z_NULL; + state->strm.zfree = Z_NULL; + state->strm.opaque = Z_NULL; + state->strm.avail_in = 0; + state->strm.next_in = Z_NULL; + if (inflateInit2(&(state->strm), -15) != Z_OK) { /* raw inflate */ + free(state->out); + free(state->in); + state->size = 0; + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + } + + /* get some data in the input buffer */ + if (strm->avail_in == 0) { + if (gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) + return 0; + } + + /* look for the gzip magic header bytes 31 and 139 */ + if (strm->next_in[0] == 31) { + strm->avail_in--; + strm->next_in++; + if (strm->avail_in == 0 && gz_avail(state) == -1) + return -1; + if (strm->avail_in && strm->next_in[0] == 139) { + /* we have a gzip header, woo hoo! */ + strm->avail_in--; + strm->next_in++; + + /* skip rest of header */ + if (NEXT() != 8) { /* compression method */ + gz_error(state, Z_DATA_ERROR, "unknown compression method"); + return -1; + } + flags = NEXT(); + if (flags & 0xe0) { /* reserved flag bits */ + gz_error(state, Z_DATA_ERROR, "unknown header flags set"); + return -1; + } + NEXT(); /* modification time */ + NEXT(); + NEXT(); + NEXT(); + NEXT(); /* extra flags */ + NEXT(); /* operating system */ + if (flags & 4) { /* extra field */ + len = (unsigned)NEXT(); + len += (unsigned)NEXT() << 8; + while (len--) + if (NEXT() < 0) + break; + } + if (flags & 8) /* file name */ + while (NEXT() > 0) + ; + if (flags & 16) /* comment */ + while (NEXT() > 0) + ; + if (flags & 2) { /* header crc */ + NEXT(); + NEXT(); + } + /* an unexpected end of file is not checked for here -- it will be + noticed on the first request for uncompressed data */ + + /* set up for decompression */ + inflateReset(strm); + strm->adler = crc32(0L, Z_NULL, 0); + state->how = GZIP; + state->direct = 0; + return 0; + } + else { + /* not a gzip file -- save first byte (31) and fall to raw i/o */ + state->out[0] = 31; + state->have = 1; + } + } + + /* doing raw i/o, save start of raw data for seeking, copy any leftover + input to output -- this assumes that the output buffer is larger than + the input buffer, which also assures space for gzungetc() */ + state->raw = state->pos; + state->next = state->out; + if (strm->avail_in) { + memcpy(state->next + state->have, strm->next_in, strm->avail_in); + state->have += strm->avail_in; + strm->avail_in = 0; + } + state->how = COPY; + state->direct = 1; + return 0; +} + +/* Decompress from input to the provided next_out and avail_out in the state. + If the end of the compressed data is reached, then verify the gzip trailer + check value and length (modulo 2^32). state->have and state->next are set + to point to the just decompressed data, and the crc is updated. If the + trailer is verified, state->how is reset to LOOK to look for the next gzip + stream or raw data, once state->have is depleted. Returns 0 on success, -1 + on failure. Failures may include invalid compressed data or a failed gzip + trailer verification. */ +local int gz_decomp(state) + gz_statep state; +{ + int ret; + unsigned had; + unsigned long crc, len; + z_streamp strm = &(state->strm); + + /* fill output buffer up to end of deflate stream */ + had = strm->avail_out; + do { + /* get more input for inflate() */ + if (strm->avail_in == 0 && gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) { + gz_error(state, Z_DATA_ERROR, "unexpected end of file"); + return -1; + } + + /* decompress and handle errors */ + ret = inflate(strm, Z_NO_FLUSH); + if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { + gz_error(state, Z_STREAM_ERROR, + "internal error: inflate stream corrupt"); + return -1; + } + if (ret == Z_MEM_ERROR) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ + gz_error(state, Z_DATA_ERROR, + strm->msg == NULL ? "compressed data error" : strm->msg); + return -1; + } + } while (strm->avail_out && ret != Z_STREAM_END); + + /* update available output and crc check value */ + state->have = had - strm->avail_out; + state->next = strm->next_out - state->have; + strm->adler = crc32(strm->adler, state->next, state->have); + + /* check gzip trailer if at end of deflate stream */ + if (ret == Z_STREAM_END) { + if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) { + gz_error(state, Z_DATA_ERROR, "unexpected end of file"); + return -1; + } + if (crc != strm->adler) { + gz_error(state, Z_DATA_ERROR, "incorrect data check"); + return -1; + } + if (len != (strm->total_out & 0xffffffffL)) { + gz_error(state, Z_DATA_ERROR, "incorrect length check"); + return -1; + } + state->how = LOOK; /* ready for next stream, once have is 0 (leave + state->direct unchanged to remember how) */ + } + + /* good decompression */ + return 0; +} + +/* Make data and put in the output buffer. Assumes that state->have == 0. + Data is either copied from the input file or decompressed from the input + file depending on state->how. If state->how is LOOK, then a gzip header is + looked for (and skipped if found) to determine wither to copy or decompress. + Returns -1 on error, otherwise 0. gz_make() will leave state->have as COPY + or GZIP unless the end of the input file has been reached and all data has + been processed. */ +local int gz_make(state) + gz_statep state; +{ + z_streamp strm = &(state->strm); + + if (state->how == LOOK) { /* look for gzip header */ + if (gz_head(state) == -1) + return -1; + if (state->have) /* got some data from gz_head() */ + return 0; + } + if (state->how == COPY) { /* straight copy */ + if (gz_load(state, state->out, state->size << 1, &(state->have)) == -1) + return -1; + state->next = state->out; + } + else if (state->how == GZIP) { /* decompress */ + strm->avail_out = state->size << 1; + strm->next_out = state->out; + if (gz_decomp(state) == -1) + return -1; + } + return 0; +} + +/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ +local int gz_skip(state, len) + gz_statep state; + z_off64_t len; +{ + unsigned n; + + /* skip over len bytes or reach end-of-file, whichever comes first */ + while (len) + /* skip over whatever is in output buffer */ + if (state->have) { + n = GT_OFF(state->have) || (z_off64_t)state->have > len ? + (unsigned)len : state->have; + state->have -= n; + state->next += n; + state->pos += n; + len -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) + break; + + /* need more data to skip -- load up output buffer */ + else { + /* get more output, looking for header if required */ + if (gz_make(state) == -1) + return -1; + } + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzread(file, buf, len) + gzFile file; + voidp buf; + unsigned len; +{ + unsigned got, n; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids the flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_BUF_ERROR, "requested length does not fit in int"); + return -1; + } + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return -1; + } + + /* get len bytes to buf, or less than len if at the end */ + got = 0; + do { + /* first just try copying data from the output buffer */ + if (state->have) { + n = state->have > len ? len : state->have; + memcpy(buf, state->next, n); + state->next += n; + state->have -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && strm->avail_in == 0) + break; + + /* need output data -- for small len or new stream load up our output + buffer */ + else if (state->how == LOOK || len < (state->size << 1)) { + /* get more output, looking for header if required */ + if (gz_make(state) == -1) + return -1; + continue; /* no progress yet -- go back to memcpy() above */ + /* the copy above assures that we will leave with space in the + output buffer, allowing at least one gzungetc() to succeed */ + } + + /* large len -- read directly into user buffer */ + else if (state->how == COPY) { /* read directly */ + if (gz_load(state, buf, len, &n) == -1) + return -1; + } + + /* large len -- decompress directly into user buffer */ + else { /* state->how == GZIP */ + strm->avail_out = len; + strm->next_out = buf; + if (gz_decomp(state) == -1) + return -1; + n = state->have; + state->have = 0; + } + + /* update progress */ + len -= n; + buf = (char *)buf + n; + got += n; + state->pos += n; + } while (len); + + /* return number of bytes read into user buffer (will fit in int) */ + return (int)got; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzgetc(file) + gzFile file; +{ + int ret; + unsigned char buf[1]; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* try output buffer (no need to check for skip request) */ + if (state->have) { + state->have--; + state->pos++; + return *(state->next)++; + } + + /* nothing there -- try gzread() */ + ret = gzread(file, buf, 1); + return ret < 1 ? -1 : buf[0]; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzungetc(c, file) + int c; + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return -1; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return -1; + } + + /* can't push EOF */ + if (c < 0) + return -1; + + /* if output buffer empty, put byte at end (allows more pushing) */ + if (state->have == 0) { + state->have = 1; + state->next = state->out + (state->size << 1) - 1; + state->next[0] = c; + state->pos--; + return c; + } + + /* if no room, give up (must have already done a gzungetc()) */ + if (state->have == (state->size << 1)) { + gz_error(state, Z_BUF_ERROR, "out of room to push characters"); + return -1; + } + + /* slide output data if needed and insert byte before existing data */ + if (state->next == state->out) { + unsigned char *src = state->out + state->have; + unsigned char *dest = state->out + (state->size << 1); + while (src > state->out) + *--dest = *--src; + state->next = dest; + } + state->have++; + state->next--; + state->next[0] = c; + state->pos--; + return c; +} + +/* -- see zlib.h -- */ +char * ZEXPORT gzgets(file, buf, len) + gzFile file; + char *buf; + int len; +{ + unsigned left, n; + char *str; + unsigned char *eol; + gz_statep state; + + /* check parameters and get internal structure */ + if (file == NULL || buf == NULL || len < 1) + return NULL; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || state->err != Z_OK) + return NULL; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return NULL; + } + + /* copy output bytes up to new line or len - 1, whichever comes first -- + append a terminating zero to the string (we don't check for a zero in + the contents, let the user worry about that) */ + str = buf; + left = (unsigned)len - 1; + if (left) do { + /* assure that something is in the output buffer */ + if (state->have == 0) { + if (gz_make(state) == -1) + return NULL; /* error */ + if (state->have == 0) { /* end of file */ + if (buf == str) /* got bupkus */ + return NULL; + break; /* got something -- return it */ + } + } + + /* look for end-of-line in current output buffer */ + n = state->have > left ? left : state->have; + eol = memchr(state->next, '\n', n); + if (eol != NULL) + n = (unsigned)(eol - state->next) + 1; + + /* copy through end-of-line, or remainder if not found */ + memcpy(buf, state->next, n); + state->have -= n; + state->next += n; + state->pos += n; + left -= n; + buf += n; + } while (left && eol == NULL); + + /* found end-of-line or out of space -- terminate string and return it */ + buf[0] = 0; + return str; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzdirect(file) + gzFile file; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're reading */ + if (state->mode != GZ_READ) + return 0; + + /* if the state is not known, but we can find out, then do so (this is + mainly for right after a gzopen() or gzdopen()) */ + if (state->how == LOOK && state->have == 0) + (void)gz_head(state); + + /* return 1 if reading direct, 0 if decompressing a gzip stream */ + return state->direct; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_r(file) + gzFile file; +{ + int ret; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're reading */ + if (state->mode != GZ_READ) + return Z_STREAM_ERROR; + + /* free memory and close file */ + if (state->size) { + inflateEnd(&(state->strm)); + free(state->out); + free(state->in); + } + gz_error(state, Z_OK, NULL); + free(state->path); + ret = close(state->fd); + free(state); + return ret ? Z_ERRNO : Z_OK; +} diff --git a/compat/zlib/gzwrite.c b/compat/zlib/gzwrite.c new file mode 100644 index 0000000..e8defc6 --- /dev/null +++ b/compat/zlib/gzwrite.c @@ -0,0 +1,531 @@ +/* gzwrite.c -- zlib functions for writing gzip files + * Copyright (C) 2004, 2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Local functions */ +local int gz_init OF((gz_statep)); +local int gz_comp OF((gz_statep, int)); +local int gz_zero OF((gz_statep, z_off64_t)); + +/* Initialize state for writing a gzip file. Mark initialization by setting + state->size to non-zero. Return -1 on failure or 0 on success. */ +local int gz_init(state) + gz_statep state; +{ + int ret; + z_streamp strm = &(state->strm); + + /* allocate input and output buffers */ + state->in = malloc(state->want); + state->out = malloc(state->want); + if (state->in == NULL || state->out == NULL) { + if (state->out != NULL) + free(state->out); + if (state->in != NULL) + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* allocate deflate memory, set up for gzip compression */ + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = deflateInit2(strm, state->level, Z_DEFLATED, + 15 + 16, 8, state->strategy); + if (ret != Z_OK) { + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* mark state as initialized */ + state->size = state->want; + + /* initialize write buffer */ + strm->avail_out = state->size; + strm->next_out = state->out; + state->next = strm->next_out; + return 0; +} + +/* Compress whatever is at avail_in and next_in and write to the output file. + Return -1 if there is an error writing to the output file, otherwise 0. + flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH, + then the deflate() state is reset to start a new gzip stream. */ +local int gz_comp(state, flush) + gz_statep state; + int flush; +{ + int ret, got; + unsigned have; + z_streamp strm = &(state->strm); + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return -1; + + /* run deflate() on provided input until it produces no more output */ + ret = Z_OK; + do { + /* write out current buffer contents if full, or if flushing, but if + doing Z_FINISH then don't write until we get to Z_STREAM_END */ + if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && + (flush != Z_FINISH || ret == Z_STREAM_END))) { + have = (unsigned)(strm->next_out - state->next); + if (have && ((got = write(state->fd, state->next, have)) < 0 || + (unsigned)got != have)) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (strm->avail_out == 0) { + strm->avail_out = state->size; + strm->next_out = state->out; + } + state->next = strm->next_out; + } + + /* compress */ + have = strm->avail_out; + ret = deflate(strm, flush); + if (ret == Z_STREAM_ERROR) { + gz_error(state, Z_STREAM_ERROR, + "internal error: deflate stream corrupt"); + return -1; + } + have -= strm->avail_out; + } while (have); + + /* if that completed a deflate stream, allow another to start */ + if (flush == Z_FINISH) + deflateReset(strm); + + /* all done, no errors */ + return 0; +} + +/* Compress len zeros to output. Return -1 on error, 0 on success. */ +local int gz_zero(state, len) + gz_statep state; + z_off64_t len; +{ + int first; + unsigned n; + z_streamp strm = &(state->strm); + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + + /* compress len zeros (len guaranteed > 0) */ + first = 1; + while (len) { + n = GT_OFF(state->size) || (z_off64_t)state->size > len ? + (unsigned)len : state->size; + if (first) { + memset(state->in, 0, n); + first = 0; + } + strm->avail_in = n; + strm->next_in = state->in; + state->pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + len -= n; + } + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzwrite(file, buf, len) + gzFile file; + voidpc buf; + unsigned len; +{ + unsigned put = len; + unsigned n; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids the flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_BUF_ERROR, "requested length does not fit in int"); + return 0; + } + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* for small len, copy to input buffer, otherwise compress directly */ + if (len < state->size) { + /* copy to input buffer, compress when full */ + do { + if (strm->avail_in == 0) + strm->next_in = state->in; + n = state->size - strm->avail_in; + if (n > len) + n = len; + memcpy(strm->next_in + strm->avail_in, buf, n); + strm->avail_in += n; + state->pos += n; + buf = (char *)buf + n; + len -= n; + if (len && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } while (len); + } + else { + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* directly compress user buffer to file */ + strm->avail_in = len; + strm->next_in = (voidp)buf; + state->pos += len; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } + + /* input was all buffered or compressed (put will fit in int) */ + return (int)put; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputc(file, c) + gzFile file; + int c; +{ + unsigned char buf[1]; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* try writing to input buffer for speed (state->size == 0 if buffer not + initialized) */ + if (strm->avail_in < state->size) { + if (strm->avail_in == 0) + strm->next_in = state->in; + strm->next_in[strm->avail_in++] = c; + state->pos++; + return c; + } + + /* no room in buffer or not initialized, use gz_write() */ + buf[0] = c; + if (gzwrite(file, buf, 1) != 1) + return -1; + return c; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputs(file, str) + gzFile file; + const char *str; +{ + int ret; + unsigned len; + + /* write string */ + len = (unsigned)strlen(str); + ret = gzwrite(file, str, len); + return ret == 0 && len != 0 ? -1 : ret; +} + +#ifdef STDC +#include + +/* -- see zlib.h -- */ +int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) +{ + int size, len; + gz_statep state; + z_streamp strm; + va_list va; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* do the printf() into the input buffer, put length in len */ + size = (int)(state->size); + state->in[size - 1] = 0; + va_start(va, format); +#ifdef NO_vsnprintf +# ifdef HAS_vsprintf_void + (void)vsprintf(state->in, format, va); + va_end(va); + for (len = 0; len < size; len++) + if (state->in[len] == 0) break; +# else + len = vsprintf(state->in, format, va); + va_end(va); +# endif +#else +# ifdef HAS_vsnprintf_void + (void)vsnprintf(state->in, size, format, va); + va_end(va); + len = strlen(state->in); +# else + len = vsnprintf((char *)(state->in), size, format, va); + va_end(va); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) + return 0; + + /* update buffer and position, defer compression until needed */ + strm->avail_in = (unsigned)len; + strm->next_in = state->in; + state->pos += len; + return len; +} + +#else /* !STDC */ + +/* -- see zlib.h -- */ +int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) + gzFile file; + const char *format; + int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +{ + int size, len; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* do the printf() into the input buffer, put length in len */ + size = (int)(state->size); + state->in[size - 1] = 0; +#ifdef NO_snprintf +# ifdef HAS_sprintf_void + sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + for (len = 0; len < size; len++) + if (state->in[len] == 0) break; +# else + len = sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#else +# ifdef HAS_snprintf_void + snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + len = strlen(state->in); +# else + len = snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) + return 0; + + /* update buffer and position, defer compression until needed */ + strm->avail_in = (unsigned)len; + strm->next_in = state->in; + state->pos += len; + return len; +} + +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzflush(file, flush) + gzFile file; + int flush; +{ + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* check flush parameter */ + if (flush < 0 || flush > Z_FINISH) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* compress remaining data with requested flush */ + gz_comp(state, flush); + return state->err; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzsetparams(file, level, strategy) + gzFile file; + int level; + int strategy; +{ + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* if no change is requested, then do nothing */ + if (level == state->level && strategy == state->strategy) + return Z_OK; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* change compression parameters for subsequent input */ + if (state->size) { + /* flush previous input with previous parameters before changing */ + if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1) + return state->err; + deflateParams(strm, level, strategy); + } + state->level = level; + state->strategy = strategy; + return Z_OK; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_w(file) + gzFile file; +{ + int ret = 0; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing */ + if (state->mode != GZ_WRITE) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + ret += gz_zero(state, state->skip); + } + + /* flush, free memory, and close file */ + ret += gz_comp(state, Z_FINISH); + (void)deflateEnd(&(state->strm)); + free(state->out); + free(state->in); + gz_error(state, Z_OK, NULL); + free(state->path); + ret += close(state->fd); + free(state); + return ret ? Z_ERRNO : Z_OK; +} diff --git a/compat/zlib/infback.c b/compat/zlib/infback.c index 455dbc9..af3a8c9 100644 --- a/compat/zlib/infback.c +++ b/compat/zlib/infback.c @@ -1,5 +1,5 @@ /* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2009 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -55,7 +55,7 @@ int stream_size; state->wbits = windowBits; state->wsize = 1U << windowBits; state->window = window; - state->write = 0; + state->wnext = 0; state->whave = 0; return Z_OK; } @@ -253,7 +253,7 @@ void FAR *out_desc; unsigned bits; /* bits in bit buffer */ unsigned copy; /* number of stored or match bytes to copy */ unsigned char FAR *from; /* where to copy match bytes from */ - code this; /* current decoding table entry */ + code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ int ret; /* return code */ @@ -389,19 +389,19 @@ void FAR *out_desc; state->have = 0; while (state->have < state->nlen + state->ndist) { for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.val < 16) { - NEEDBITS(this.bits); - DROPBITS(this.bits); - state->lens[state->have++] = this.val; + if (here.val < 16) { + NEEDBITS(here.bits); + DROPBITS(here.bits); + state->lens[state->have++] = here.val; } else { - if (this.val == 16) { - NEEDBITS(this.bits + 2); - DROPBITS(this.bits); + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); if (state->have == 0) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; @@ -411,16 +411,16 @@ void FAR *out_desc; copy = 3 + BITS(2); DROPBITS(2); } - else if (this.val == 17) { - NEEDBITS(this.bits + 3); - DROPBITS(this.bits); + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); len = 0; copy = 3 + BITS(3); DROPBITS(3); } else { - NEEDBITS(this.bits + 7); - DROPBITS(this.bits); + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); len = 0; copy = 11 + BITS(7); DROPBITS(7); @@ -438,7 +438,16 @@ void FAR *out_desc; /* handle error breaks in while */ if (state->mode == BAD) break; - /* build code tables */ + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 9; @@ -474,28 +483,28 @@ void FAR *out_desc; /* get a literal, length, or end-of-block code */ for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.op && (this.op & 0xf0) == 0) { - last = this; + if (here.op && (here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->lencode[last.val + + here = state->lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } - DROPBITS(this.bits); - state->length = (unsigned)this.val; + DROPBITS(here.bits); + state->length = (unsigned)here.val; /* process literal */ - if (this.op == 0) { - Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + if (here.op == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", this.val)); + "inflate: literal 0x%02x\n", here.val)); ROOM(); *put++ = (unsigned char)(state->length); left--; @@ -504,21 +513,21 @@ void FAR *out_desc; } /* process end of block */ - if (this.op & 32) { + if (here.op & 32) { Tracevv((stderr, "inflate: end of block\n")); state->mode = TYPE; break; } /* invalid code */ - if (this.op & 64) { + if (here.op & 64) { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } /* length code -- get extra bits, if any */ - state->extra = (unsigned)(this.op) & 15; + state->extra = (unsigned)(here.op) & 15; if (state->extra != 0) { NEEDBITS(state->extra); state->length += BITS(state->extra); @@ -528,30 +537,30 @@ void FAR *out_desc; /* get distance code */ for (;;) { - this = state->distcode[BITS(state->distbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if ((this.op & 0xf0) == 0) { - last = this; + if ((here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->distcode[last.val + + here = state->distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); } - DROPBITS(this.bits); - if (this.op & 64) { + DROPBITS(here.bits); + if (here.op & 64) { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } - state->offset = (unsigned)this.val; + state->offset = (unsigned)here.val; /* get distance extra bits, if any */ - state->extra = (unsigned)(this.op) & 15; + state->extra = (unsigned)(here.op) & 15; if (state->extra != 0) { NEEDBITS(state->extra); state->offset += BITS(state->extra); diff --git a/compat/zlib/inffast.c b/compat/zlib/inffast.c index bbee92e..0a0761f 100644 --- a/compat/zlib/inffast.c +++ b/compat/zlib/inffast.c @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2004 Mark Adler + * Copyright (C) 1995-2008 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -79,7 +79,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ #endif unsigned wsize; /* window size or zero if not using window */ unsigned whave; /* valid bytes in the window */ - unsigned write; /* window write index */ + unsigned wnext; /* window write index */ unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ unsigned long hold; /* local strm->hold */ unsigned bits; /* local strm->bits */ @@ -87,7 +87,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ code const FAR *dcode; /* local strm->distcode */ unsigned lmask; /* mask for first level of length codes */ unsigned dmask; /* mask for first level of distance codes */ - code this; /* retrieved table entry */ + code here; /* retrieved table entry */ unsigned op; /* code bits, operation, extra bits, or */ /* window position, window bytes to copy */ unsigned len; /* match length, unused bytes */ @@ -106,7 +106,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ #endif wsize = state->wsize; whave = state->whave; - write = state->write; + wnext = state->wnext; window = state->window; hold = state->hold; bits = state->bits; @@ -124,20 +124,20 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ hold += (unsigned long)(PUP(in)) << bits; bits += 8; } - this = lcode[hold & lmask]; + here = lcode[hold & lmask]; dolen: - op = (unsigned)(this.bits); + op = (unsigned)(here.bits); hold >>= op; bits -= op; - op = (unsigned)(this.op); + op = (unsigned)(here.op); if (op == 0) { /* literal */ - Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", this.val)); - PUP(out) = (unsigned char)(this.val); + "inflate: literal 0x%02x\n", here.val)); + PUP(out) = (unsigned char)(here.val); } else if (op & 16) { /* length base */ - len = (unsigned)(this.val); + len = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (op) { if (bits < op) { @@ -155,14 +155,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ hold += (unsigned long)(PUP(in)) << bits; bits += 8; } - this = dcode[hold & dmask]; + here = dcode[hold & dmask]; dodist: - op = (unsigned)(this.bits); + op = (unsigned)(here.bits); hold >>= op; bits -= op; - op = (unsigned)(this.op); + op = (unsigned)(here.op); if (op & 16) { /* distance base */ - dist = (unsigned)(this.val); + dist = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (bits < op) { hold += (unsigned long)(PUP(in)) << bits; @@ -187,12 +187,34 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ if (dist > op) { /* see if copy from window */ op = dist - op; /* distance back in window */ if (op > whave) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; + if (state->sane) { + strm->msg = + (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + if (len <= op - whave) { + do { + PUP(out) = 0; + } while (--len); + continue; + } + len -= op - whave; + do { + PUP(out) = 0; + } while (--op > whave); + if (op == 0) { + from = out - dist; + do { + PUP(out) = PUP(from); + } while (--len); + continue; + } +#endif } from = window - OFF; - if (write == 0) { /* very common case */ + if (wnext == 0) { /* very common case */ from += wsize - op; if (op < len) { /* some from window */ len -= op; @@ -202,17 +224,17 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ from = out - dist; /* rest from output */ } } - else if (write < op) { /* wrap around window */ - from += wsize + write - op; - op -= write; + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; if (op < len) { /* some from end of window */ len -= op; do { PUP(out) = PUP(from); } while (--op); from = window - OFF; - if (write < len) { /* some from start of window */ - op = write; + if (wnext < len) { /* some from start of window */ + op = wnext; len -= op; do { PUP(out) = PUP(from); @@ -222,7 +244,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else { /* contiguous in window */ - from += write - op; + from += wnext - op; if (op < len) { /* some from window */ len -= op; do { @@ -259,7 +281,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else if ((op & 64) == 0) { /* 2nd level distance code */ - this = dcode[this.val + (hold & ((1U << op) - 1))]; + here = dcode[here.val + (hold & ((1U << op) - 1))]; goto dodist; } else { @@ -269,7 +291,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ } } else if ((op & 64) == 0) { /* 2nd level length code */ - this = lcode[this.val + (hold & ((1U << op) - 1))]; + here = lcode[here.val + (hold & ((1U << op) - 1))]; goto dolen; } else if (op & 32) { /* end-of-block */ @@ -305,7 +327,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - Using bit fields for code structure - Different op definition to avoid & for extra bits (do & for table bits) - - Three separate decoding do-loops for direct, window, and write == 0 + - Three separate decoding do-loops for direct, window, and wnext == 0 - Special case for distance > 1 copies to do overlapped load and store copy - Explicit branch predictions (based on measured branch probabilities) - Deferring match copy and interspersed it with decoding subsequent codes diff --git a/compat/zlib/inflate.c b/compat/zlib/inflate.c index 792fdee..a8431ab 100644 --- a/compat/zlib/inflate.c +++ b/compat/zlib/inflate.c @@ -1,5 +1,5 @@ /* inflate.c -- zlib decompression - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -45,7 +45,7 @@ * - Rearrange window copies in inflate_fast() for speed and simplification * - Unroll last copy for window match in inflate_fast() * - Use local copies of window variables in inflate_fast() for speed - * - Pull out common write == 0 case for speed in inflate_fast() + * - Pull out common wnext == 0 case for speed in inflate_fast() * - Make op and len in inflate_fast() unsigned for consistency * - Add FAR to lcode and dcode declarations in inflate_fast() * - Simplified bad distance check in inflate_fast() @@ -117,28 +117,52 @@ z_streamp strm; state->head = Z_NULL; state->wsize = 0; state->whave = 0; - state->write = 0; + state->wnext = 0; state->hold = 0; state->bits = 0; state->lencode = state->distcode = state->next = state->codes; + state->sane = 1; + state->back = -1; Tracev((stderr, "inflate: reset\n")); return Z_OK; } -int ZEXPORT inflatePrime(strm, bits, value) +int ZEXPORT inflateReset2(strm, windowBits) z_streamp strm; -int bits; -int value; +int windowBits; { + int wrap; struct inflate_state FAR *state; + /* get the state */ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; - if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += value << state->bits; - state->bits += bits; - return Z_OK; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; +#ifdef GUNZIP + if (windowBits < 48) + windowBits &= 15; +#endif + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) + return Z_STREAM_ERROR; + if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { + ZFREE(strm, state->window); + state->window = Z_NULL; + } + + /* update state and reset the rest of it */ + state->wrap = wrap; + state->wbits = (unsigned)windowBits; + return inflateReset(strm); } int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) @@ -147,6 +171,7 @@ int windowBits; const char *version; int stream_size; { + int ret; struct inflate_state FAR *state; if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || @@ -164,24 +189,13 @@ int stream_size; if (state == Z_NULL) return Z_MEM_ERROR; Tracev((stderr, "inflate: allocated\n")); strm->state = (struct internal_state FAR *)state; - if (windowBits < 0) { - state->wrap = 0; - windowBits = -windowBits; - } - else { - state->wrap = (windowBits >> 4) + 1; -#ifdef GUNZIP - if (windowBits < 48) windowBits &= 15; -#endif - } - if (windowBits < 8 || windowBits > 15) { + state->window = Z_NULL; + ret = inflateReset2(strm, windowBits); + if (ret != Z_OK) { ZFREE(strm, state); strm->state = Z_NULL; - return Z_STREAM_ERROR; } - state->wbits = (unsigned)windowBits; - state->window = Z_NULL; - return inflateReset(strm); + return ret; } int ZEXPORT inflateInit_(strm, version, stream_size) @@ -192,6 +206,27 @@ int stream_size; return inflateInit2_(strm, DEF_WBITS, version, stream_size); } +int ZEXPORT inflatePrime(strm, bits, value) +z_streamp strm; +int bits; +int value; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (bits < 0) { + state->hold = 0; + state->bits = 0; + return Z_OK; + } + if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; + value &= (1L << bits) - 1; + state->hold += value << state->bits; + state->bits += bits; + return Z_OK; +} + /* Return state with length and distance decoding tables and index sizes set to fixed code decoding. Normally this returns fixed tables from inffixed.h. @@ -340,7 +375,7 @@ unsigned out; /* if window not in use yet, initialize */ if (state->wsize == 0) { state->wsize = 1U << state->wbits; - state->write = 0; + state->wnext = 0; state->whave = 0; } @@ -348,22 +383,22 @@ unsigned out; copy = out - strm->avail_out; if (copy >= state->wsize) { zmemcpy(state->window, strm->next_out - state->wsize, state->wsize); - state->write = 0; + state->wnext = 0; state->whave = state->wsize; } else { - dist = state->wsize - state->write; + dist = state->wsize - state->wnext; if (dist > copy) dist = copy; - zmemcpy(state->window + state->write, strm->next_out - copy, dist); + zmemcpy(state->window + state->wnext, strm->next_out - copy, dist); copy -= dist; if (copy) { zmemcpy(state->window, strm->next_out - copy, copy); - state->write = copy; + state->wnext = copy; state->whave = state->wsize; } else { - state->write += dist; - if (state->write == state->wsize) state->write = 0; + state->wnext += dist; + if (state->wnext == state->wsize) state->wnext = 0; if (state->whave < state->wsize) state->whave += dist; } } @@ -564,7 +599,7 @@ int flush; unsigned in, out; /* save starting available input and output */ unsigned copy; /* number of stored or match bytes to copy */ unsigned char FAR *from; /* where to copy match bytes from */ - code this; /* current decoding table entry */ + code here; /* current decoding table entry */ code last; /* parent table entry */ unsigned len; /* length to copy for repeats, bits to drop */ int ret; /* return code */ @@ -619,7 +654,9 @@ int flush; } DROPBITS(4); len = BITS(4) + 8; - if (len > state->wbits) { + if (state->wbits == 0) + state->wbits = len; + else if (len > state->wbits) { strm->msg = (char *)"invalid window size"; state->mode = BAD; break; @@ -771,7 +808,7 @@ int flush; strm->adler = state->check = adler32(0L, Z_NULL, 0); state->mode = TYPE; case TYPE: - if (flush == Z_BLOCK) goto inf_leave; + if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; case TYPEDO: if (state->last) { BYTEBITS(); @@ -791,7 +828,11 @@ int flush; fixedtables(state); Tracev((stderr, "inflate: fixed codes block%s\n", state->last ? " (last)" : "")); - state->mode = LEN; /* decode codes */ + state->mode = LEN_; /* decode codes */ + if (flush == Z_TREES) { + DROPBITS(2); + goto inf_leave; + } break; case 2: /* dynamic block */ Tracev((stderr, "inflate: dynamic codes block%s\n", @@ -816,6 +857,9 @@ int flush; Tracev((stderr, "inflate: stored length %u\n", state->length)); INITBITS(); + state->mode = COPY_; + if (flush == Z_TREES) goto inf_leave; + case COPY_: state->mode = COPY; case COPY: copy = state->length; @@ -876,19 +920,19 @@ int flush; case CODELENS: while (state->have < state->nlen + state->ndist) { for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.val < 16) { - NEEDBITS(this.bits); - DROPBITS(this.bits); - state->lens[state->have++] = this.val; + if (here.val < 16) { + NEEDBITS(here.bits); + DROPBITS(here.bits); + state->lens[state->have++] = here.val; } else { - if (this.val == 16) { - NEEDBITS(this.bits + 2); - DROPBITS(this.bits); + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); if (state->have == 0) { strm->msg = (char *)"invalid bit length repeat"; state->mode = BAD; @@ -898,16 +942,16 @@ int flush; copy = 3 + BITS(2); DROPBITS(2); } - else if (this.val == 17) { - NEEDBITS(this.bits + 3); - DROPBITS(this.bits); + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); len = 0; copy = 3 + BITS(3); DROPBITS(3); } else { - NEEDBITS(this.bits + 7); - DROPBITS(this.bits); + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); len = 0; copy = 11 + BITS(7); DROPBITS(7); @@ -925,7 +969,16 @@ int flush; /* handle error breaks in while */ if (state->mode == BAD) break; - /* build code tables */ + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); state->lenbits = 9; @@ -946,88 +999,102 @@ int flush; break; } Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN_; + if (flush == Z_TREES) goto inf_leave; + case LEN_: state->mode = LEN; case LEN: if (have >= 6 && left >= 258) { RESTORE(); inflate_fast(strm, out); LOAD(); + if (state->mode == TYPE) + state->back = -1; break; } + state->back = 0; for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if (this.op && (this.op & 0xf0) == 0) { - last = this; + if (here.op && (here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->lencode[last.val + + here = state->lencode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); + state->back += last.bits; } - DROPBITS(this.bits); - state->length = (unsigned)this.val; - if ((int)(this.op) == 0) { - Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ? + DROPBITS(here.bits); + state->back += here.bits; + state->length = (unsigned)here.val; + if ((int)(here.op) == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", this.val)); + "inflate: literal 0x%02x\n", here.val)); state->mode = LIT; break; } - if (this.op & 32) { + if (here.op & 32) { Tracevv((stderr, "inflate: end of block\n")); + state->back = -1; state->mode = TYPE; break; } - if (this.op & 64) { + if (here.op & 64) { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; } - state->extra = (unsigned)(this.op) & 15; + state->extra = (unsigned)(here.op) & 15; state->mode = LENEXT; case LENEXT: if (state->extra) { NEEDBITS(state->extra); state->length += BITS(state->extra); DROPBITS(state->extra); + state->back += state->extra; } Tracevv((stderr, "inflate: length %u\n", state->length)); + state->was = state->length; state->mode = DIST; case DIST: for (;;) { - this = state->distcode[BITS(state->distbits)]; - if ((unsigned)(this.bits) <= bits) break; + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; PULLBYTE(); } - if ((this.op & 0xf0) == 0) { - last = this; + if ((here.op & 0xf0) == 0) { + last = here; for (;;) { - this = state->distcode[last.val + + here = state->distcode[last.val + (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; + if ((unsigned)(last.bits + here.bits) <= bits) break; PULLBYTE(); } DROPBITS(last.bits); + state->back += last.bits; } - DROPBITS(this.bits); - if (this.op & 64) { + DROPBITS(here.bits); + state->back += here.bits; + if (here.op & 64) { strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } - state->offset = (unsigned)this.val; - state->extra = (unsigned)(this.op) & 15; + state->offset = (unsigned)here.val; + state->extra = (unsigned)(here.op) & 15; state->mode = DISTEXT; case DISTEXT: if (state->extra) { NEEDBITS(state->extra); state->offset += BITS(state->extra); DROPBITS(state->extra); + state->back += state->extra; } #ifdef INFLATE_STRICT if (state->offset > state->dmax) { @@ -1036,11 +1103,6 @@ int flush; break; } #endif - if (state->offset > state->whave + out - left) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } Tracevv((stderr, "inflate: distance %u\n", state->offset)); state->mode = MATCH; case MATCH: @@ -1048,12 +1110,32 @@ int flush; copy = out - left; if (state->offset > copy) { /* copy from window */ copy = state->offset - copy; - if (copy > state->write) { - copy -= state->write; + if (copy > state->whave) { + if (state->sane) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + Trace((stderr, "inflate.c too far\n")); + copy -= state->whave; + if (copy > state->length) copy = state->length; + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = 0; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; +#endif + } + if (copy > state->wnext) { + copy -= state->wnext; from = state->window + (state->wsize - copy); } else - from = state->window + (state->write - copy); + from = state->window + (state->wnext - copy); if (copy > state->length) copy = state->length; } else { /* copy from output */ @@ -1146,7 +1228,8 @@ int flush; strm->adler = state->check = UPDATE(state->check, strm->next_out - out, out); strm->data_type = state->bits + (state->last ? 64 : 0) + - (state->mode == TYPE ? 128 : 0); + (state->mode == TYPE ? 128 : 0) + + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) ret = Z_BUF_ERROR; return ret; @@ -1366,3 +1449,32 @@ z_streamp source; dest->state = (struct internal_state FAR *)copy; return Z_OK; } + +int ZEXPORT inflateUndermine(strm, subvert) +z_streamp strm; +int subvert; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + state->sane = !subvert; +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + return Z_OK; +#else + state->sane = 1; + return Z_DATA_ERROR; +#endif +} + +long ZEXPORT inflateMark(strm) +z_streamp strm; +{ + struct inflate_state FAR *state; + + if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; + state = (struct inflate_state FAR *)strm->state; + return ((long)(state->back) << 16) + + (state->mode == COPY ? state->length : + (state->mode == MATCH ? state->was - state->length : 0)); +} diff --git a/compat/zlib/inflate.h b/compat/zlib/inflate.h index 07bd3e7..95f4986 100644 --- a/compat/zlib/inflate.h +++ b/compat/zlib/inflate.h @@ -1,5 +1,5 @@ /* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2004 Mark Adler + * Copyright (C) 1995-2009 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -32,11 +32,13 @@ typedef enum { TYPE, /* i: waiting for type bits, including last-flag bit */ TYPEDO, /* i: same, but skip check to exit inflate on new block */ STORED, /* i: waiting for stored size (length and complement) */ + COPY_, /* i/o: same as COPY below, but only first time in */ COPY, /* i/o: waiting for input or output to copy stored block */ TABLE, /* i: waiting for dynamic block table lengths */ LENLENS, /* i: waiting for code length code lengths */ CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN, /* i: waiting for length/lit code */ + LEN_, /* i: same as LEN below, but only first time in */ + LEN, /* i: waiting for length/lit/eob code */ LENEXT, /* i: waiting for length extra bits */ DIST, /* i: waiting for distance code */ DISTEXT, /* i: waiting for distance extra bits */ @@ -53,19 +55,21 @@ typedef enum { /* State transitions between above modes - - (most modes can go to the BAD or MEM mode -- not shown for clarity) + (most modes can go to BAD or MEM on error -- not shown for clarity) Process header: - HEAD -> (gzip) or (zlib) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME - NAME -> COMMENT -> HCRC -> TYPE + HEAD -> (gzip) or (zlib) or (raw) + (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> + HCRC -> TYPE (zlib) -> DICTID or TYPE DICTID -> DICT -> TYPE + (raw) -> TYPEDO Read deflate blocks: - TYPE -> STORED or TABLE or LEN or CHECK - STORED -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN - Read deflate codes: + TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK + STORED -> COPY_ -> COPY -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN_ + LEN_ -> LEN + Read deflate codes in fixed or dynamic block: LEN -> LENEXT or LIT or TYPE LENEXT -> DIST -> DISTEXT -> MATCH -> LEN LIT -> LEN @@ -73,7 +77,7 @@ typedef enum { CHECK -> LENGTH -> DONE */ -/* state maintained between inflate() calls. Approximately 7K bytes. */ +/* state maintained between inflate() calls. Approximately 10K bytes. */ struct inflate_state { inflate_mode mode; /* current inflate mode */ int last; /* true if processing last block */ @@ -88,7 +92,7 @@ struct inflate_state { unsigned wbits; /* log base 2 of requested window size */ unsigned wsize; /* window size or zero if not using window */ unsigned whave; /* valid bytes in the window */ - unsigned write; /* window write index */ + unsigned wnext; /* window write index */ unsigned char FAR *window; /* allocated sliding window, if needed */ /* bit accumulator */ unsigned long hold; /* input bit accumulator */ @@ -112,4 +116,7 @@ struct inflate_state { unsigned short lens[320]; /* temporary storage for code lengths */ unsigned short work[288]; /* work area for code table building */ code codes[ENOUGH]; /* space for code tables */ + int sane; /* if false, allow invalid distance too far */ + int back; /* bits back of last unprocessed length/lit */ + unsigned was; /* initial length of match */ }; diff --git a/compat/zlib/inftrees.c b/compat/zlib/inftrees.c index 8a9c13f..ccf7fa9 100644 --- a/compat/zlib/inftrees.c +++ b/compat/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.3 Copyright 1995-2005 Mark Adler "; + " inflate 1.2.4 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -50,7 +50,7 @@ unsigned short FAR *work; unsigned fill; /* index for replicating entries */ unsigned low; /* low bits for current root entry */ unsigned mask; /* mask for low root bits */ - code this; /* table entry for duplication */ + code here; /* table entry for duplication */ code FAR *next; /* next available space in table */ const unsigned short FAR *base; /* base value table to use */ const unsigned short FAR *extra; /* extra bits table to use */ @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, @@ -115,15 +115,15 @@ unsigned short FAR *work; if (count[max] != 0) break; if (root > max) root = max; if (max == 0) { /* no symbols to code at all */ - this.op = (unsigned char)64; /* invalid code marker */ - this.bits = (unsigned char)1; - this.val = (unsigned short)0; - *(*table)++ = this; /* make a table to force an error */ - *(*table)++ = this; + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)1; + here.val = (unsigned short)0; + *(*table)++ = here; /* make a table to force an error */ + *(*table)++ = here; *bits = 1; return 0; /* no symbols, but wait for decoding to report error */ } - for (min = 1; min <= MAXBITS; min++) + for (min = 1; min < max; min++) if (count[min] != 0) break; if (root < min) root = min; @@ -166,11 +166,10 @@ unsigned short FAR *work; entered in the tables. used keeps track of how many table entries have been allocated from the - provided *table space. It is checked when a LENS table is being made - against the space in *table, ENOUGH, minus the maximum space needed by - the worst case distance code, MAXD. This should never happen, but the - sufficiency of ENOUGH has not been proven exhaustively, hence the check. - This assumes that when type == LENS, bits == 9. + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. sym increments through all symbols, and the loop terminates when all codes of length max, i.e. all codes, have been processed. This @@ -209,24 +208,25 @@ unsigned short FAR *work; mask = used - 1; /* mask for comparing low */ /* check available table space */ - if (type == LENS && used >= ENOUGH - MAXD) + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* process all codes and make table entries */ for (;;) { /* create table entry */ - this.bits = (unsigned char)(len - drop); + here.bits = (unsigned char)(len - drop); if ((int)(work[sym]) < end) { - this.op = (unsigned char)0; - this.val = work[sym]; + here.op = (unsigned char)0; + here.val = work[sym]; } else if ((int)(work[sym]) > end) { - this.op = (unsigned char)(extra[work[sym]]); - this.val = base[work[sym]]; + here.op = (unsigned char)(extra[work[sym]]); + here.val = base[work[sym]]; } else { - this.op = (unsigned char)(32 + 64); /* end of block */ - this.val = 0; + here.op = (unsigned char)(32 + 64); /* end of block */ + here.val = 0; } /* replicate for those indices with low len bits equal to huff */ @@ -235,7 +235,7 @@ unsigned short FAR *work; min = fill; /* save offset to next table */ do { fill -= incr; - next[(huff >> drop) + fill] = this; + next[(huff >> drop) + fill] = here; } while (fill != 0); /* backwards increment the len-bit code huff */ @@ -277,7 +277,8 @@ unsigned short FAR *work; /* check for enough space */ used += 1U << curr; - if (type == LENS && used >= ENOUGH - MAXD) + if ((type == LENS && used >= ENOUGH_LENS) || + (type == DISTS && used >= ENOUGH_DISTS)) return 1; /* point entry in root table to sub-table */ @@ -295,20 +296,20 @@ unsigned short FAR *work; through high index bits. When the current sub-table is filled, the loop drops back to the root table to fill in any remaining entries there. */ - this.op = (unsigned char)64; /* invalid code marker */ - this.bits = (unsigned char)(len - drop); - this.val = (unsigned short)0; + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)(len - drop); + here.val = (unsigned short)0; while (huff != 0) { /* when done with sub-table, drop back to root table */ if (drop != 0 && (huff & mask) != low) { drop = 0; len = root; next = *table; - this.bits = (unsigned char)len; + here.bits = (unsigned char)len; } /* put invalid code marker in table */ - next[huff >> drop] = this; + next[huff >> drop] = here; /* backwards increment the len-bit code huff */ incr = 1U << (len - 1); diff --git a/compat/zlib/inftrees.h b/compat/zlib/inftrees.h index b1104c8..67461da 100644 --- a/compat/zlib/inftrees.h +++ b/compat/zlib/inftrees.h @@ -35,15 +35,22 @@ typedef struct { 01000000 - invalid code */ -/* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1444 code structures (852 for length/literals - and 592 for distances, the latter actually the result of an - exhaustive search). The true maximum is not known, but the value - below is more than safe. */ -#define ENOUGH 2048 -#define MAXD 592 +/* Maximum size of the dynamic table. The maximum number of code structures is + 1444, which is the sum of 852 for literal/length codes and 592 for distance + codes. These values were found by exhaustive searches using the program + examples/enough.c found in the zlib distribtution. The arguments to that + program are the number of symbols, the initial root table size, and the + maximum bit length of a code. "enough 286 9 15" for literal/length codes + returns returns 852, and "enough 30 6 15" for distance codes returns 592. + The initial root table size (9 or 6) is found in the fifth argument of the + inflate_table() calls in inflate.c and infback.c. If the root table size is + changed, then these maximum sizes would be need to be recalculated and + updated. */ +#define ENOUGH_LENS 852 +#define ENOUGH_DISTS 592 +#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) -/* Type of code to build for inftable() */ +/* Type of code to build for inflate_table() */ typedef enum { CODES, LENS, diff --git a/compat/zlib/make_vms.com b/compat/zlib/make_vms.com index c2a1fb5..6576490 100644 --- a/compat/zlib/make_vms.com +++ b/compat/zlib/make_vms.com @@ -1,33 +1,57 @@ $! make libz under VMS written by $! Martin P.J. Zinser -$! $! -$ on error then goto err_exit +$! In case of problems with the install you might contact me at +$! zinser@zinser.no-ip.info(preferred) or +$! zinser@sysdev.deutsche-boerse.com (work) +$! +$! Make procedure history for Zlib $! +$!------------------------------------------------------------------------------ +$! Version history +$! 0.01 20060120 First version to receive a number +$! 0.02 20061008 Adapt to new Makefile.in +$! 0.03 20091224 Add support for large file check +$! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite +$! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in $! -$! Just some general constants... +$ on error then goto err_exit +$ set proc/parse=ext $! $ true = 1 $ false = 0 $ tmpnam = "temp_" + f$getjpi("","pid") -$ SAY = "WRITE SYS$OUTPUT" +$ tt = tmpnam + ".txt" +$ tc = tmpnam + ".c" +$ th = tmpnam + ".h" +$ define/nolog tconfig 'th' +$ its_decc = false +$ its_vaxc = false +$ its_gnuc = false +$ s_case = False $! $! Setup variables holding "config" information $! -$ Make = "" +$ Make = "" $ name = "Zlib" $ version = "?.?.?" $ v_string = "ZLIB_VERSION" $ v_file = "zlib.h" -$ ccopt = "" -$ lopts = "" +$ ccopt = "" +$ lopts = "" +$ dnsrl = "" +$ aconf_in_file = "zconf.h.in#zconf.h_in" +$ conf_check_string = "" $ linkonly = false $ optfile = name + ".opt" -$ its_decc = false -$ its_vaxc = false -$ its_gnuc = false -$ axp = f$getsyi("HW_MODEL").ge.1024 -$ s_case = false +$ libdefs = "" +$ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 +$! +$ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL") +$ mydef = F$parse(whoami,,,"DEVICE") +$ mydir = f$parse(whoami,,,"DIRECTORY") - "][" +$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type") +$! $! Check for MMK/MMS $! $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" @@ -36,11 +60,16 @@ $! $! $ gosub find_version $! +$ open/write topt tmp.opt +$ open/write optf 'optfile' +$! $ gosub check_opts $! $! Look for the compiler used $! $ gosub check_compiler +$ close topt +$! $ if its_decc $ then $ ccopt = "/prefix=all" + ccopt @@ -60,6 +89,52 @@ $ then $ if f$trnlnm("SYS").eqs."" then define sys sys$library: $ endif $! +$! Build a fake configure input header +$! +$ open/write conf_hin config.hin +$ write conf_hin "#undef _LARGEFILE64_SOURCE" +$ close conf_hin +$! +$! +$ i = 0 +$FIND_ACONF: +$ fname = f$element(i,"#",aconf_in_file) +$ if fname .eqs. "#" then goto AMISS_ERR +$ if f$search(fname) .eqs. "" +$ then +$ i = i + 1 +$ goto find_aconf +$ endif +$ open/read/err=aconf_err aconf_in 'fname' +$ open/write aconf zconf.h +$ACONF_LOOP: +$ read/end_of_file=aconf_exit aconf_in line +$ work = f$edit(line, "compress,trim") +$ if f$extract(0,6,work) .nes. "#undef" +$ then +$ if f$extract(0,12,work) .nes. "#cmakedefine" +$ then +$ write aconf line +$ endif +$ else +$ cdef = f$element(1," ",work) +$ gosub check_config +$ endif +$ goto aconf_loop +$ACONF_EXIT: +$ write aconf "#define VMS 1" +$ write aconf "#include " +$ write aconf "#include " +$ write aconf "#ifdef _LARGEFILE" +$ write aconf "#define off64_t __off64_t" +$ write aconf "#define fopen64 fopen" +$ write aconf "#define fseeko64 fseeko" +$ write aconf "#define lseek64 lseek" +$ write aconf "#define ftello64 ftell" +$ write aconf "#endif" +$ close aconf_in +$ close aconf +$ if f$search("''th'") .nes. "" then delete 'th';* $! Build the thing plain or with mms $! $ write sys$output "Compiling Zlib sources ..." @@ -74,8 +149,14 @@ $ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" - crc32.c zlib.h zconf.h $ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" - deflate.c deflate.h zutil.h zlib.h zconf.h -$ CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" - - gzio.c zutil.h zlib.h zconf.h +$ CALL MAKE gzclose.OBJ "CC ''CCOPT' gzclose" - + gzclose.c zutil.h zlib.h zconf.h +$ CALL MAKE gzlib.OBJ "CC ''CCOPT' gzlib" - + gzlib.c zutil.h zlib.h zconf.h +$ CALL MAKE gzread.OBJ "CC ''CCOPT' gzread" - + gzread.c zutil.h zlib.h zconf.h +$ CALL MAKE gzwrite.OBJ "CC ''CCOPT' gzwrite" - + gzwrite.c zutil.h zlib.h zconf.h $ CALL MAKE infback.OBJ "CC ''CCOPT' infback" - infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h $ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" - @@ -107,7 +188,7 @@ $ call make minigzip.exe - $ endif $ else $ gosub crea_mms -$ SAY "Make ''name' ''version' with ''Make' " +$ write sys$output "Make ''name' ''version' with ''Make' " $ 'make' $ endif $! @@ -133,6 +214,15 @@ $ write sys$output "C compiler required to build ''name'" $ goto err_exit $ERR_EXIT: $ set message/facil/ident/sever/text +$ close/nolog optf +$ close/nolog topt +$ close/nolog conf_hin +$ close/nolog aconf_in +$ close/nolog aconf +$ close/nolog out +$ close/nolog min +$ close/nolog mod +$ close/nolog h_in $ write sys$output "Exiting..." $ exit 2 $! @@ -180,61 +270,72 @@ $!------------------------------------------------------------------------------ $! $! Check command line options and set symbols accordingly $! +$!------------------------------------------------------------------------------ +$! Version history +$! 0.01 20041206 First version to receive a number +$! 0.02 20060126 Add new "HELP" target $ CHECK_OPTS: $ i = 1 $ OPT_LOOP: $ if i .lt. 9 $ then $ cparm = f$edit(p'i',"upcase") -$ if cparm .eqs. "DEBUG" -$ then -$ ccopt = ccopt + "/noopt/deb" -$ lopts = lopts + "/deb" -$ endif -$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ ccopt = ccopt + f$extract(start,len,cparm) -$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - - then s_case = true -$ endif -$ if cparm .eqs. "LINK" then linkonly = true -$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ lopts = lopts + f$extract(start,len,cparm) -$ endif -$ if f$locate("CC=",cparm) .lt. f$length(cparm) +$! +$! Check if parameter actually contains something +$! +$ if f$edit(cparm,"trim") .nes. "" $ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ cc_com = f$extract(start,len,cparm) - if (cc_com .nes. "DECC") .and. - - (cc_com .nes. "VAXC") .and. - - (cc_com .nes. "GNUC") +$ if cparm .eqs. "DEBUG" $ then -$ write sys$output "Unsupported compiler choice ''cc_com' ignored" -$ write sys$output "Use DECC, VAXC, or GNUC instead" -$ else -$ if cc_com .eqs. "DECC" then its_decc = true -$ if cc_com .eqs. "VAXC" then its_vaxc = true -$ if cc_com .eqs. "GNUC" then its_gnuc = true +$ ccopt = ccopt + "/noopt/deb" +$ lopts = lopts + "/deb" $ endif -$ endif -$ if f$locate("MAKE=",cparm) .lt. f$length(cparm) -$ then -$ start = f$locate("=",cparm) + 1 -$ len = f$length(cparm) - start -$ mmks = f$extract(start,len,cparm) -$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS") +$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) $ then -$ make = mmks -$ else -$ write sys$output "Unsupported make choice ''mmks' ignored" -$ write sys$output "Use MMK or MMS instead" +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ ccopt = ccopt + f$extract(start,len,cparm) +$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - + then s_case = true +$ endif +$ if cparm .eqs. "LINK" then linkonly = true +$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ lopts = lopts + f$extract(start,len,cparm) $ endif +$ if f$locate("CC=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ cc_com = f$extract(start,len,cparm) + if (cc_com .nes. "DECC") .and. - + (cc_com .nes. "VAXC") .and. - + (cc_com .nes. "GNUC") +$ then +$ write sys$output "Unsupported compiler choice ''cc_com' ignored" +$ write sys$output "Use DECC, VAXC, or GNUC instead" +$ else +$ if cc_com .eqs. "DECC" then its_decc = true +$ if cc_com .eqs. "VAXC" then its_vaxc = true +$ if cc_com .eqs. "GNUC" then its_gnuc = true +$ endif +$ endif +$ if f$locate("MAKE=",cparm) .lt. f$length(cparm) +$ then +$ start = f$locate("=",cparm) + 1 +$ len = f$length(cparm) - start +$ mmks = f$extract(start,len,cparm) +$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS") +$ then +$ make = mmks +$ else +$ write sys$output "Unsupported make choice ''mmks' ignored" +$ write sys$output "Use MMK or MMS instead" +$ endif +$ endif +$ if cparm .eqs. "HELP" then gosub bhelp $ endif $ i = i + 1 $ goto opt_loop @@ -244,6 +345,11 @@ $!------------------------------------------------------------------------------ $! $! Look for the compiler used $! +$! Version history +$! 0.01 20040223 First version to receive a number +$! 0.02 20040229 Save/set value of decc$no_rooted_search_lists +$! 0.03 20060202 Extend handling of GNU C +$! 0.04 20090402 Compaq -> hp $CHECK_COMPILER: $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) $ then @@ -257,9 +363,26 @@ $! $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) $ then goto CC_ERR $ else -$ if its_decc then write sys$output "CC compiler check ... Compaq C" -$ if its_vaxc then write sys$output "CC compiler check ... VAX C" -$ if its_gnuc then write sys$output "CC compiler check ... GNU C" +$ if its_decc +$ then +$ write sys$output "CC compiler check ... hp C" +$ if f$trnlnm("decc$no_rooted_search_lists") .nes. "" +$ then +$ dnrsl = f$trnlnm("decc$no_rooted_search_lists") +$ endif +$ define/nolog decc$no_rooted_search_lists 1 +$ else +$ if its_vaxc then write sys$output "CC compiler check ... VAX C" +$ if its_gnuc +$ then +$ write sys$output "CC compiler check ... GNU C" +$ if f$trnlnm(topt) then write topt "gnu_cc:[000000]gcclib.olb/lib" +$ if f$trnlnm(optf) then write optf "gnu_cc:[000000]gcclib.olb/lib" +$ cc = "gcc" +$ endif +$ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share" +$ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share" +$ endif $ endif $ return $!------------------------------------------------------------------------------ @@ -276,7 +399,8 @@ $ deck # written by Martin P.J. Zinser # -OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj, infback.obj\ +OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\ + gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\ deflate.obj, trees.obj, zutil.obj, inflate.obj, \ inftrees.obj, inffast.obj @@ -308,7 +432,10 @@ compress.obj : compress.c zlib.h zconf.h crc32.obj : crc32.c zutil.h zlib.h zconf.h deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h example.obj : example.c zlib.h zconf.h -gzio.obj : gzio.c zutil.h zlib.h zconf.h +gzclose.obj : gzclose.c zutil.h zlib.h zconf.h +gzlib.obj : gzlib.c zutil.h zlib.h zconf.h +gzread.obj : gzread.c zutil.h zlib.h zconf.h +gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h inflate.obj : inflate.c zutil.h zlib.h zconf.h inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h @@ -328,7 +455,7 @@ $! $CREA_OLIST: $ open/read min makefile.in $ open/write mod modules.opt -$ src_check = "OBJS =" +$ src_check = "OBJC =" $MRLOOP: $ read/end=mrdone min rec $ if (f$extract(0,6,rec) .nes. src_check) then goto mrloop @@ -382,13 +509,182 @@ $ close h_in $ return $!------------------------------------------------------------------------------ $! +$CHECK_CONFIG: +$! +$ in_ldef = f$locate(cdef,libdefs) +$ if (in_ldef .lt. f$length(libdefs)) +$ then +$ write aconf "#define ''cdef' 1" +$ libdefs = f$extract(0,in_ldef,libdefs) + - + f$extract(in_ldef + f$length(cdef) + 1, - + f$length(libdefs) - in_ldef - f$length(cdef) - 1, - + libdefs) +$ else +$ if (f$type('cdef') .eqs. "INTEGER") +$ then +$ write aconf "#define ''cdef' ", 'cdef' +$ else +$ if (f$type('cdef') .eqs. "STRING") +$ then +$ write aconf "#define ''cdef' ", """", '''cdef'', """" +$ else +$ gosub check_cc_def +$ endif +$ endif +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Check if this is a define relating to the properties of the C/C++ +$! compiler +$! +$ CHECK_CC_DEF: +$ if (cdef .eqs. "_LARGEFILE64_SOURCE") +$ then +$ copy sys$input: 'tc' +$ deck +#include "tconfig" +#define _LARGEFILE +#include + +int main(){ +FILE *fp; + fp = fopen("temp.txt","r"); + fseeko(fp,1,SEEK_SET); + fclose(fp); +} + +$ eod +$ test_inv = false +$ comm_h = false +$ gosub cc_prop_check +$ return +$ endif +$ write aconf "/* ", line, " */" +$ return +$!------------------------------------------------------------------------------ +$! +$! Check for properties of C/C++ compiler +$! +$! Version history +$! 0.01 20031020 First version to receive a number +$! 0.02 20031022 Added logic for defines with value +$! 0.03 20040309 Make sure local config file gets not deleted +$! 0.04 20041230 Also write include for configure run +$! 0.05 20050103 Add processing of "comment defines" +$CC_PROP_CHECK: +$ cc_prop = true +$ is_need = false +$ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true) +$ if f$search(th) .eqs. "" then create 'th' +$ set message/nofac/noident/nosever/notext +$ on error then continue +$ cc 'tmpnam' +$ if .not. ($status) then cc_prop = false +$ on error then continue +$! The headers might lie about the capabilities of the RTL +$ link 'tmpnam',tmp.opt/opt +$ if .not. ($status) then cc_prop = false +$ set message/fac/ident/sever/text +$ on error then goto err_exit +$ delete/nolog 'tmpnam'.*;*/exclude='th' +$ if (cc_prop .and. .not. is_need) .or. - + (.not. cc_prop .and. is_need) +$ then +$ write sys$output "Checking for ''cdef'... yes" +$ if f$type('cdef_val'_yes) .nes. "" +$ then +$ if f$type('cdef_val'_yes) .eqs. "INTEGER" - + then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes) +$ if f$type('cdef_val'_yes) .eqs. "STRING" - + then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_yes) +$ else +$ call write_config f$fao("#define !AS 1",cdef) +$ endif +$ if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. - + (cdef .eqs. "_LARGEFILE64_SOURCE") then - + call write_config f$string("#define _LARGEFILE 1") +$ else +$ write sys$output "Checking for ''cdef'... no" +$ if (comm_h) +$ then + call write_config f$fao("/* !AS */",line) +$ else +$ if f$type('cdef_val'_no) .nes. "" +$ then +$ if f$type('cdef_val'_no) .eqs. "INTEGER" - + then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_no) +$ if f$type('cdef_val'_no) .eqs. "STRING" - + then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_no) +$ else +$ call write_config f$fao("#undef !AS",cdef) +$ endif +$ endif +$ endif +$ return +$!------------------------------------------------------------------------------ +$! +$! Check for properties of C/C++ compiler with multiple result values +$! +$! Version history +$! 0.01 20040127 First version +$! 0.02 20050103 Reconcile changes from cc_prop up to version 0.05 +$CC_MPROP_CHECK: +$ cc_prop = true +$ i = 1 +$ idel = 1 +$ MT_LOOP: +$ if f$type(result_'i') .eqs. "STRING" +$ then +$ set message/nofac/noident/nosever/notext +$ on error then continue +$ cc 'tmpnam'_'i' +$ if .not. ($status) then cc_prop = false +$ on error then continue +$! The headers might lie about the capabilities of the RTL +$ link 'tmpnam'_'i',tmp.opt/opt +$ if .not. ($status) then cc_prop = false +$ set message/fac/ident/sever/text +$ on error then goto err_exit +$ delete/nolog 'tmpnam'_'i'.*;* +$ if (cc_prop) +$ then +$ write sys$output "Checking for ''cdef'... ", mdef_'i' +$ if f$type(mdef_'i') .eqs. "INTEGER" - + then call write_config f$fao("#define !AS !UL",cdef,mdef_'i') +$ if f$type('cdef_val'_yes) .eqs. "STRING" - + then call write_config f$fao("#define !AS !AS",cdef,mdef_'i') +$ goto msym_clean +$ else +$ i = i + 1 +$ goto mt_loop +$ endif +$ endif +$ write sys$output "Checking for ''cdef'... no" +$ call write_config f$fao("#undef !AS",cdef) +$ MSYM_CLEAN: +$ if (idel .le. msym_max) +$ then +$ delete/sym mdef_'idel' +$ idel = idel + 1 +$ goto msym_clean +$ endif +$ return +$!------------------------------------------------------------------------------ +$! $! Analyze Object files for OpenVMS AXP to extract Procedure and Data $! information to build a symbol vector for a shareable image $! All the "brains" of this logic was suggested by Hartmut Becker $! (Hartmut.Becker@compaq.com). All the bugs were introduced by me -$! (zinser@decus.de), so if you do have problem reports please do not +$! (zinser@zinser.no-ip.info), so if you do have problem reports please do not $! bother Hartmut/HP, but get in touch with me $! +$! Version history +$! 0.01 20040406 Skip over shareable images in option file +$! 0.02 20041109 Fix option file for shareable images with case_sensitive=YES +$! 0.03 20050107 Skip over Identification labels in option file +$! 0.04 20060117 Add uppercase alias to code compiled with /name=as_is +$! $ ANAL_OBJ_AXP: Subroutine $ V = 'F$Verify(0) $ SAY := "WRITE_ SYS$OUTPUT" @@ -409,6 +705,17 @@ $ create a.tmp $ open/append atmp a.tmp $ loop: $ read/end=end_loop in line +$ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line) +$ then +$ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'" +$ goto loop +$ endif +$ if f$locate("IDENTIFICATION=",f$edit(line,"upcase")) .lt. f$length(line) +$ then +$ write sys$output "ANAL_OBJ_AXP-i-ident: Identification ", - + f$element(1,"=",line) +$ goto loop +$ endif $ f= f$search(line) $ if f .eqs. "" $ then @@ -450,8 +757,31 @@ $ edito/edt/command=sys$input f.tmp sub/symbol: "/symbol_vector=(/whole sub/"/=DATA)/whole exit -$ sort/nodupl d.tmp,f.tmp 'p2' -$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;* +$ sort/nodupl d.tmp,f.tmp g.tmp +$ open/read raw_vector g.tmp +$ open/write case_vector 'p2' +$ RAWLOOP: +$ read/end=end_rawloop raw_vector raw_element +$ write case_vector raw_element +$ if f$locate("=PROCEDURE)",raw_element) .lt. f$length(raw_element) +$ then +$ name = f$element(1,"=",raw_element) - "(" +$ if f$edit(name,"UPCASE") .nes. name then - + write case_vector f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)", - + f$edit(name,"UPCASE"), name) +$ endif +$ if f$locate("=DATA)",raw_element) .lt. f$length(raw_element) +$ then +$ name = f$element(1,"=",raw_element) - "(" +$ if f$edit(name,"UPCASE") .nes. name then - + write case_vector f$fao(" symbol_vector=(!AS/!AS=DATA)", - + f$edit(name,"UPCASE"), name) +$ endif +$ goto rawloop +$ END_RAWLOOP: +$ close raw_vector +$ close case_vector +$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*,g.tmp;* $ if f$search("x.tmp") .nes. "" - then $ delete x.tmp;* $! @@ -459,3 +789,16 @@ $ EXIT_AA: $ if V then set verify $ endsubroutine $!------------------------------------------------------------------------------ +$! +$! Write configuration to both permanent and temporary config file +$! +$! Version history +$! 0.01 20031029 First version to receive a number +$! +$WRITE_CONFIG: SUBROUTINE +$ write aconf 'p1' +$ open/append confh 'th' +$ write confh 'p1' +$ close confh +$ENDSUBROUTINE +$!------------------------------------------------------------------------------ diff --git a/compat/zlib/minigzip.c b/compat/zlib/minigzip.c index eb0f4cc..e67cde3 100644 --- a/compat/zlib/minigzip.c +++ b/compat/zlib/minigzip.c @@ -1,5 +1,5 @@ /* minigzip.c -- simulate gzip using the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2006, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -13,10 +13,10 @@ * or in pipe mode. */ -/* @(#) $Id: minigzip.c,v 1.1 2008/12/19 14:44:48 dkf Exp $ */ +/* @(#) $Id: minigzip.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ -#include #include "zlib.h" +#include #ifdef STDC # include @@ -54,6 +54,70 @@ extern int unlink OF((const char *)); #endif +#if defined(UNDER_CE) && defined(NO_ERRNO_H) +# include +# define perror(s) pwinerror(s) + +/* Map the Windows error number in ERROR to a locale-dependent error + message string and return a pointer to it. Typically, the values + for ERROR come from GetLastError. + + The string pointed to shall not be modified by the application, + but may be overwritten by a subsequent call to strwinerror + + The strwinerror function does not change the current setting + of GetLastError. */ + +static char *strwinerror (error) + DWORD error; +{ + static char buf[1024]; + + wchar_t *msgbuf; + DWORD lasterr = GetLastError(); + DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, + error, + 0, /* Default language */ + (LPVOID)&msgbuf, + 0, + NULL); + if (chars != 0) { + /* If there is an \r\n appended, zap it. */ + if (chars >= 2 + && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { + chars -= 2; + msgbuf[chars] = 0; + } + + if (chars > sizeof (buf) - 1) { + chars = sizeof (buf) - 1; + msgbuf[chars] = 0; + } + + wcstombs(buf, msgbuf, chars + 1); + LocalFree(msgbuf); + } + else { + sprintf(buf, "unknown win32 error (%ld)", error); + } + + SetLastError(lasterr); + return buf; +} + +static void pwinerror (s) + const char *s; +{ + if (s && *s) + fprintf(stderr, "%s: %s\n", s, strwinerror(GetLastError ())); + else + fprintf(stderr, "%s\n", strwinerror(GetLastError ())); +} + +#endif /* UNDER_CE && NO_ERRNO_H */ + #ifndef GZ_SUFFIX # define GZ_SUFFIX ".gz" #endif @@ -198,6 +262,11 @@ void file_compress(file, mode) FILE *in; gzFile out; + if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { + fprintf(stderr, "%s: filename too long\n", prog); + exit(1); + } + strcpy(outfile, file); strcat(outfile, GZ_SUFFIX); @@ -227,7 +296,12 @@ void file_uncompress(file) char *infile, *outfile; FILE *out; gzFile in; - uInt len = (uInt)strlen(file); + size_t len = strlen(file); + + if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) { + fprintf(stderr, "%s: filename too long\n", prog); + exit(1); + } strcpy(buf, file); @@ -258,7 +332,8 @@ void file_uncompress(file) /* =========================================================================== - * Usage: minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...] + * Usage: minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...] + * -c : write to standard output * -d : decompress * -f : compress with Z_FILTERED * -h : compress with Z_HUFFMAN_ONLY @@ -270,17 +345,30 @@ int main(argc, argv) int argc; char *argv[]; { + int copyout = 0; int uncompr = 0; gzFile file; - char outmode[20]; + char *bname, outmode[20]; strcpy(outmode, "wb6 "); prog = argv[0]; + bname = strrchr(argv[0], '/'); + if (bname) + bname++; + else + bname = argv[0]; argc--, argv++; + if (!strcmp(bname, "gunzip")) + uncompr = 1; + else if (!strcmp(bname, "zcat")) + copyout = uncompr = 1; + while (argc > 0) { - if (strcmp(*argv, "-d") == 0) + if (strcmp(*argv, "-c") == 0) + copyout = 1; + else if (strcmp(*argv, "-d") == 0) uncompr = 1; else if (strcmp(*argv, "-f") == 0) outmode[3] = 'f'; @@ -310,11 +398,36 @@ int main(argc, argv) gz_compress(stdin, file); } } else { + if (copyout) { + SET_BINARY_MODE(stdout); + } do { if (uncompr) { - file_uncompress(*argv); + if (copyout) { + file = gzopen(*argv, "rb"); + if (file == NULL) + fprintf(stderr, "%s: can't gzopen %s\n", prog, *argv); + else + gz_uncompress(file, stdout); + } else { + file_uncompress(*argv); + } } else { - file_compress(*argv, outmode); + if (copyout) { + FILE * in = fopen(*argv, "rb"); + + if (in == NULL) { + perror(*argv); + } else { + file = gzdopen(fileno(stdout), outmode); + if (file == NULL) error("can't gzdopen stdout"); + + gz_compress(in, file); + } + + } else { + file_compress(*argv, outmode); + } } } while (argv++, --argc); } diff --git a/compat/zlib/msdos/Makefile.bor b/compat/zlib/msdos/Makefile.bor index 8f8132d..0c1b99c 100644 --- a/compat/zlib/msdos/Makefile.bor +++ b/compat/zlib/msdos/Makefile.bor @@ -41,10 +41,10 @@ LDFLAGS=-m$(MODEL) -f- # variables ZLIB_LIB = zlib_$(MODEL).lib -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj -OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj -OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj # targets @@ -61,7 +61,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -gzio.obj: gzio.c zutil.h zlib.h zconf.h +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ inffast.h inffixed.h diff --git a/compat/zlib/msdos/Makefile.dj2 b/compat/zlib/msdos/Makefile.dj2 index 283d1d9..29b0395 100644 --- a/compat/zlib/msdos/Makefile.dj2 +++ b/compat/zlib/msdos/Makefile.dj2 @@ -51,8 +51,8 @@ AR=ar rcs prefix=/usr/local exec_prefix = $(prefix) -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infback.o inftrees.o inffast.o +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o OBJA = # to use the asm code: make OBJA=match.o diff --git a/compat/zlib/msdos/Makefile.emx b/compat/zlib/msdos/Makefile.emx index ed4c31f..9c1b57a 100644 --- a/compat/zlib/msdos/Makefile.emx +++ b/compat/zlib/msdos/Makefile.emx @@ -33,8 +33,8 @@ AR=ar rcs prefix=/usr/local exec_prefix = $(prefix) -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infback.o inftrees.o inffast.o +OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ + uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o TEST_OBJS = example.o minigzip.o diff --git a/compat/zlib/msdos/Makefile.msc b/compat/zlib/msdos/Makefile.msc index b8fc665..cd2816f 100644 --- a/compat/zlib/msdos/Makefile.msc +++ b/compat/zlib/msdos/Makefile.msc @@ -37,8 +37,8 @@ LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode # variables ZLIB_LIB = zlib_$(MODEL).lib -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj -OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj # targets @@ -55,7 +55,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -gzio.obj: gzio.c zutil.h zlib.h zconf.h +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ inffast.h inffixed.h diff --git a/compat/zlib/msdos/Makefile.tc b/compat/zlib/msdos/Makefile.tc index 480750a..bcd0d18 100644 --- a/compat/zlib/msdos/Makefile.tc +++ b/compat/zlib/msdos/Makefile.tc @@ -26,10 +26,10 @@ LDFLAGS=-m$(MODEL) -f- # variables ZLIB_LIB = zlib_$(MODEL).lib -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj -OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj -OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj # targets @@ -46,7 +46,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -gzio.obj: gzio.c zutil.h zlib.h zconf.h +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ inffast.h inffixed.h diff --git a/compat/zlib/nintendods/Makefile b/compat/zlib/nintendods/Makefile new file mode 100644 index 0000000..21337d0 --- /dev/null +++ b/compat/zlib/nintendods/Makefile @@ -0,0 +1,126 @@ +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- + +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") +endif + +include $(DEVKITARM)/ds_rules + +#--------------------------------------------------------------------------------- +# TARGET is the name of the output +# BUILD is the directory where object files & intermediate files will be placed +# SOURCES is a list of directories containing source code +# DATA is a list of directories containing data files +# INCLUDES is a list of directories containing header files +#--------------------------------------------------------------------------------- +TARGET := $(shell basename $(CURDIR)) +BUILD := build +SOURCES := ../../ +DATA := data +INCLUDES := include + +#--------------------------------------------------------------------------------- +# options for code generation +#--------------------------------------------------------------------------------- +ARCH := -mthumb -mthumb-interwork + +CFLAGS := -Wall -O2\ + -march=armv5te -mtune=arm946e-s \ + -fomit-frame-pointer -ffast-math \ + $(ARCH) + +CFLAGS += $(INCLUDE) -DARM9 +CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions + +ASFLAGS := $(ARCH) -march=armv5te -mtune=arm946e-s +LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) + +#--------------------------------------------------------------------------------- +# list of directories containing libraries, this must be the top level containing +# include and lib +#--------------------------------------------------------------------------------- +LIBDIRS := $(LIBNDS) + +#--------------------------------------------------------------------------------- +# no real need to edit anything past this point unless you need to add additional +# rules for different file extensions +#--------------------------------------------------------------------------------- +ifneq ($(BUILD),$(notdir $(CURDIR))) +#--------------------------------------------------------------------------------- + +export OUTPUT := $(CURDIR)/lib/libz.a + +export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ + $(foreach dir,$(DATA),$(CURDIR)/$(dir)) + +export DEPSDIR := $(CURDIR)/$(BUILD) + +CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) +CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) +SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) + +#--------------------------------------------------------------------------------- +# use CXX for linking C++ projects, CC for standard C +#--------------------------------------------------------------------------------- +ifeq ($(strip $(CPPFILES)),) +#--------------------------------------------------------------------------------- + export LD := $(CC) +#--------------------------------------------------------------------------------- +else +#--------------------------------------------------------------------------------- + export LD := $(CXX) +#--------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------- + +export OFILES := $(addsuffix .o,$(BINFILES)) \ + $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) + +export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ + $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ + -I$(CURDIR)/$(BUILD) + +.PHONY: $(BUILD) clean all + +#--------------------------------------------------------------------------------- +all: $(BUILD) + @[ -d $@ ] || mkdir -p include + @cp ../../*.h include + +lib: + @[ -d $@ ] || mkdir -p $@ + +$(BUILD): lib + @[ -d $@ ] || mkdir -p $@ + @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile + +#--------------------------------------------------------------------------------- +clean: + @echo clean ... + @rm -fr $(BUILD) lib + +#--------------------------------------------------------------------------------- +else + +DEPENDS := $(OFILES:.o=.d) + +#--------------------------------------------------------------------------------- +# main targets +#--------------------------------------------------------------------------------- +$(OUTPUT) : $(OFILES) + +#--------------------------------------------------------------------------------- +%.bin.o : %.bin +#--------------------------------------------------------------------------------- + @echo $(notdir $<) + @$(bin2o) + + +-include $(DEPENDS) + +#--------------------------------------------------------------------------------------- +endif +#--------------------------------------------------------------------------------------- diff --git a/compat/zlib/nintendods/README b/compat/zlib/nintendods/README new file mode 100644 index 0000000..ba7a37d --- /dev/null +++ b/compat/zlib/nintendods/README @@ -0,0 +1,5 @@ +This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. + +Eduardo Costa +January 3, 2009 + diff --git a/compat/zlib/old/as400/bndsrc b/compat/zlib/old/as400/bndsrc new file mode 100644 index 0000000..9cf94bb --- /dev/null +++ b/compat/zlib/old/as400/bndsrc @@ -0,0 +1,132 @@ +STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB') + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.1.3 entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + +/********************************************************************/ +/* *MODULE ADLER32 ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("adler32") + +/********************************************************************/ +/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("compress") + EXPORT SYMBOL("compress2") + +/********************************************************************/ +/* *MODULE CRC32 ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("crc32") + EXPORT SYMBOL("get_crc_table") + +/********************************************************************/ +/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("deflate") + EXPORT SYMBOL("deflateEnd") + EXPORT SYMBOL("deflateSetDictionary") + EXPORT SYMBOL("deflateCopy") + EXPORT SYMBOL("deflateReset") + EXPORT SYMBOL("deflateParams") + EXPORT SYMBOL("deflatePrime") + EXPORT SYMBOL("deflateInit_") + EXPORT SYMBOL("deflateInit2_") + +/********************************************************************/ +/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("gzopen") + EXPORT SYMBOL("gzdopen") + EXPORT SYMBOL("gzsetparams") + EXPORT SYMBOL("gzread") + EXPORT SYMBOL("gzwrite") + EXPORT SYMBOL("gzprintf") + EXPORT SYMBOL("gzputs") + EXPORT SYMBOL("gzgets") + EXPORT SYMBOL("gzputc") + EXPORT SYMBOL("gzgetc") + EXPORT SYMBOL("gzflush") + EXPORT SYMBOL("gzseek") + EXPORT SYMBOL("gzrewind") + EXPORT SYMBOL("gztell") + EXPORT SYMBOL("gzeof") + EXPORT SYMBOL("gzclose") + EXPORT SYMBOL("gzerror") + +/********************************************************************/ +/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("inflate") + EXPORT SYMBOL("inflateEnd") + EXPORT SYMBOL("inflateSetDictionary") + EXPORT SYMBOL("inflateSync") + EXPORT SYMBOL("inflateReset") + EXPORT SYMBOL("inflateInit_") + EXPORT SYMBOL("inflateInit2_") + EXPORT SYMBOL("inflateSyncPoint") + +/********************************************************************/ +/* *MODULE UNCOMPR ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("uncompress") + +/********************************************************************/ +/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("zlibVersion") + EXPORT SYMBOL("zError") + +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ +/* Version 1.2.1 additional entry points. */ +/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/ + +/********************************************************************/ +/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("compressBound") + +/********************************************************************/ +/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("deflateBound") + +/********************************************************************/ +/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("gzungetc") + EXPORT SYMBOL("gzclearerr") + +/********************************************************************/ +/* *MODULE INFBACK ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("inflateBack") + EXPORT SYMBOL("inflateBackEnd") + EXPORT SYMBOL("inflateBackInit_") + +/********************************************************************/ +/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("inflateCopy") + +/********************************************************************/ +/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */ +/********************************************************************/ + + EXPORT SYMBOL("zlibCompileFlags") + +ENDPGMEXP diff --git a/compat/zlib/old/as400/compile.clp b/compat/zlib/old/as400/compile.clp new file mode 100644 index 0000000..8554951 --- /dev/null +++ b/compat/zlib/old/as400/compile.clp @@ -0,0 +1,123 @@ +/******************************************************************************/ +/* */ +/* ZLIB */ +/* */ +/* Compile sources into modules and link them into a service program. */ +/* */ +/******************************************************************************/ + + PGM + +/* Configuration adjustable parameters. */ + + DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) + + VALUE('ZLIB') /* Source library. */ + DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) + + VALUE('SOURCES') /* Source member file. */ + DCL VAR(&CTLFILE) TYPE(*CHAR) LEN(10) + + VALUE('TOOLS') /* Control member file. */ + + DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) + + VALUE('ZLIB') /* Module library. */ + + DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) + + VALUE('LGPL') /* Service program library. */ + + DCL VAR(&CFLAGS) TYPE(*CHAR) + + VALUE('OPTIMIZE(40)') /* Compile options. */ + + +/* Working storage. */ + + DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */ + DCL VAR(&CMD) TYPE(*CHAR) LEN(512) + + +/* Compile sources into modules. */ + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/ADLER32) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/COMPRESS) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/CRC32) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/DEFLATE) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/GZIO) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/INFBACK) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/INFFAST) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/INFLATE) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/INFTREES) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/TREES) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/UNCOMPR) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT + + '/ZUTIL) SRCFILE(' *TCAT + + &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT + + ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS) + CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN) + + +/* Link modules into a service program. */ + + CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) + + MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS + + &MODLIB/CRC32 &MODLIB/DEFLATE + + &MODLIB/GZIO &MODLIB/INFBACK + + &MODLIB/INFFAST &MODLIB/INFLATE + + &MODLIB/INFTREES &MODLIB/TREES + + &MODLIB/UNCOMPR &MODLIB/ZUTIL) + + SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) + + TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0) + + ENDPGM diff --git a/compat/zlib/old/as400/readme.txt b/compat/zlib/old/as400/readme.txt new file mode 100644 index 0000000..beae13f --- /dev/null +++ b/compat/zlib/old/as400/readme.txt @@ -0,0 +1,111 @@ + ZLIB version 1.2.3 for AS400 installation instructions + +I) From an AS400 *SAVF file: + +1) Unpacking archive to an AS400 save file + +On the AS400: + +_ Create the ZLIB AS400 library: + + CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library') + +_ Create a work save file, for example: + + CRTSAVF FILE(ZLIB/ZLIBSAVF) + +On a PC connected to the target AS400: + +_ Unpack the save file image to a PC file "ZLIBSAVF" +_ Upload this file into the save file on the AS400, for example + using ftp in BINARY mode. + + +2) Populating the ZLIB AS400 source library + +On the AS400: + +_ Extract the saved objects into the ZLIB AS400 library using: + +RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB) + + +3) Customize installation: + +_ Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed, + according to the comments. + +_ Compile this member with: + + CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE) + + +4) Compile and generate the service program: + +_ This can now be done by executing: + + CALL PGM(ZLIB/COMPILE) + + + +II) From the original source distribution: + +1) On the AS400, create the source library: + + CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library') + +2) Create the source files: + + CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules') + CRTSRCPF FILE(ZLIB/H) RCDLEN(112) TEXT('ZLIB library includes') + CRTSRCPF FILE(ZLIB/TOOLS) RCDLEN(112) TEXT('ZLIB library control utilities') + +3) From the machine hosting the distribution files, upload them (with + FTP in text mode, for example) according to the following table: + + Original AS400 AS400 AS400 AS400 + file file member type description + SOURCES Original ZLIB C subprogram sources + adler32.c ADLER32 C ZLIB - Compute the Adler-32 checksum of a dta strm + compress.c COMPRESS C ZLIB - Compress a memory buffer + crc32.c CRC32 C ZLIB - Compute the CRC-32 of a data stream + deflate.c DEFLATE C ZLIB - Compress data using the deflation algorithm + gzio.c GZIO C ZLIB - IO on .gz files + infback.c INFBACK C ZLIB - Inflate using a callback interface + inffast.c INFFAST C ZLIB - Fast proc. literals & length/distance pairs + inflate.c INFLATE C ZLIB - Interface to inflate modules + inftrees.c INFTREES C ZLIB - Generate Huffman trees for efficient decode + trees.c TREES C ZLIB - Output deflated data using Huffman coding + uncompr.c UNCOMPR C ZLIB - Decompress a memory buffer + zutil.c ZUTIL C ZLIB - Target dependent utility functions + H Original ZLIB C and ILE/RPG include files + crc32.h CRC32 C ZLIB - CRC32 tables + deflate.h DEFLATE C ZLIB - Internal compression state + inffast.h INFFAST C ZLIB - Header to use inffast.c + inffixed.h INFFIXED C ZLIB - Table for decoding fixed codes + inflate.h INFLATE C ZLIB - Internal inflate state definitions + inftrees.h INFTREES C ZLIB - Header to use inftrees.c + trees.h TREES C ZLIB - Created automatically with -DGEN_TREES_H + zconf.h ZCONF C ZLIB - Compression library configuration + zlib.h ZLIB C ZLIB - Compression library C user interface + as400/zlib.inc ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface + zutil.h ZUTIL C ZLIB - Internal interface and configuration + TOOLS Building source software & AS/400 README + as400/bndsrc BNDSRC Entry point exportation list + as400/compile.clp COMPILE CLP Compile sources & generate service program + as400/readme.txt README TXT Installation instructions + +4) Continue as in I)3). + + + + +Notes: For AS400 ILE RPG programmers, a /copy member defining the ZLIB + API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC). + Please read comments in this member for more information. + + Remember that most foreign textual data are ASCII coded: this + implementation does not handle conversion from/to ASCII, so + text data code conversions must be done explicitely. + + Always open zipped files in binary mode. diff --git a/compat/zlib/old/as400/zlib.inc b/compat/zlib/old/as400/zlib.inc new file mode 100644 index 0000000..a9a4f5c --- /dev/null +++ b/compat/zlib/old/as400/zlib.inc @@ -0,0 +1,331 @@ + * ZLIB.INC - Interface to the general purpose compression library + * + * ILE RPG400 version by Patrick Monnerat, DATASPHERE. + * Version 1.2.3.9 + * + * + * WARNING: + * Procedures inflateInit(), inflateInit2(), deflateInit(), + * deflateInit2() and inflateBackInit() need to be called with + * two additional arguments: + * the package version string and the stream control structure. + * size. This is needed because RPG lacks some macro feature. + * Call these procedures as: + * inflateInit(...: ZLIB_VERSION: %size(z_stream)) + * + /if not defined(ZLIB_H_) + /define ZLIB_H_ + * + ************************************************************************** + * Constants + ************************************************************************** + * + * Versioning information. + * + D ZLIB_VERSION C '1.2.3.9' + D ZLIB_VERNUM C X'1239' + * + * Other equates. + * + D Z_NO_FLUSH C 0 + D Z_SYNC_FLUSH C 2 + D Z_FULL_FLUSH C 3 + D Z_FINISH C 4 + D Z_BLOCK C 5 + * + D Z_OK C 0 + D Z_STREAM_END C 1 + D Z_NEED_DICT C 2 + D Z_ERRNO C -1 + D Z_STREAM_ERROR C -2 + D Z_DATA_ERROR C -3 + D Z_MEM_ERROR C -4 + D Z_BUF_ERROR C -5 + DZ_VERSION_ERROR C -6 + * + D Z_NO_COMPRESSION... + D C 0 + D Z_BEST_SPEED C 1 + D Z_BEST_COMPRESSION... + D C 9 + D Z_DEFAULT_COMPRESSION... + D C -1 + * + D Z_FILTERED C 1 + D Z_HUFFMAN_ONLY C 2 + D Z_RLE C 3 + D Z_DEFAULT_STRATEGY... + D C 0 + * + D Z_BINARY C 0 + D Z_ASCII C 1 + D Z_UNKNOWN C 2 + * + D Z_DEFLATED C 8 + * + D Z_NULL C 0 + * + ************************************************************************** + * Types + ************************************************************************** + * + D z_streamp S * Stream struct ptr + D gzFile S * File pointer + D z_off_t S 10i 0 Stream offsets + * + ************************************************************************** + * Structures + ************************************************************************** + * + * The GZIP encode/decode stream support structure. + * + D z_stream DS align based(z_streamp) + D zs_next_in * Next input byte + D zs_avail_in 10U 0 Byte cnt at next_in + D zs_total_in 10U 0 Total bytes read + D zs_next_out * Output buffer ptr + D zs_avail_out 10U 0 Room left @ next_out + D zs_total_out 10U 0 Total bytes written + D zs_msg * Last errmsg or null + D zs_state * Internal state + D zs_zalloc * procptr Int. state allocator + D zs_free * procptr Int. state dealloc. + D zs_opaque * Private alloc. data + D zs_data_type 10i 0 ASC/BIN best guess + D zs_adler 10u 0 Uncompr. adler32 val + D 10U 0 Reserved + D 10U 0 Ptr. alignment + * + ************************************************************************** + * Utility function prototypes + ************************************************************************** + * + D compress PR 10I 0 extproc('compress') + D dest 32767 options(*varsize) Destination buffer + D destLen 10U 0 Destination length + D source 32767 const options(*varsize) Source buffer + D sourceLen 10u 0 value Source length + * + D compress2 PR 10I 0 extproc('compress2') + D dest 32767 options(*varsize) Destination buffer + D destLen 10U 0 Destination length + D source 32767 const options(*varsize) Source buffer + D sourceLen 10U 0 value Source length + D level 10I 0 value Compression level + * + D compressBound PR 10U 0 extproc('compressBound') + D sourceLen 10U 0 value + * + D uncompress PR 10I 0 extproc('uncompress') + D dest 32767 options(*varsize) Destination buffer + D destLen 10U 0 Destination length + D source 32767 const options(*varsize) Source buffer + D sourceLen 10U 0 value Source length + * + D gzopen PR extproc('gzopen') + D like(gzFile) + D path * value options(*string) File pathname + D mode * value options(*string) Open mode + * + D gzdopen PR extproc('gzdopen') + D like(gzFile) + D fd 10i 0 value File descriptor + D mode * value options(*string) Open mode + * + D gzsetparams PR 10I 0 extproc('gzsetparams') + D file value like(gzFile) File pointer + D level 10I 0 value + D strategy 10i 0 value + * + D gzread PR 10I 0 extproc('gzread') + D file value like(gzFile) File pointer + D buf 32767 options(*varsize) Buffer + D len 10u 0 value Buffer length + * + D gzwrite PR 10I 0 extproc('gzwrite') + D file value like(gzFile) File pointer + D buf 32767 const options(*varsize) Buffer + D len 10u 0 value Buffer length + * + D gzputs PR 10I 0 extproc('gzputs') + D file value like(gzFile) File pointer + D s * value options(*string) String to output + * + D gzgets PR * extproc('gzgets') + D file value like(gzFile) File pointer + D buf 32767 options(*varsize) Read buffer + D len 10i 0 value Buffer length + * + D gzflush PR 10i 0 extproc('gzflush') + D file value like(gzFile) File pointer + D flush 10I 0 value Type of flush + * + D gzseek PR extproc('gzseek') + D like(z_off_t) + D file value like(gzFile) File pointer + D offset value like(z_off_t) Offset + D whence 10i 0 value Origin + * + D gzrewind PR 10i 0 extproc('gzrewind') + D file value like(gzFile) File pointer + * + D gztell PR extproc('gztell') + D like(z_off_t) + D file value like(gzFile) File pointer + * + D gzeof PR 10i 0 extproc('gzeof') + D file value like(gzFile) File pointer + * + D gzclose PR 10i 0 extproc('gzclose') + D file value like(gzFile) File pointer + * + D gzerror PR * extproc('gzerror') Error string + D file value like(gzFile) File pointer + D errnum 10I 0 Error code + * + D gzclearerr PR extproc('gzclearerr') + D file value like(gzFile) File pointer + * + ************************************************************************** + * Basic function prototypes + ************************************************************************** + * + D zlibVersion PR * extproc('zlibVersion') Version string + * + D deflateInit PR 10I 0 extproc('deflateInit_') Init. compression + D strm like(z_stream) Compression stream + D level 10I 0 value Compression level + D version * value options(*string) Version string + D stream_size 10i 0 value Stream struct. size + * + D deflate PR 10I 0 extproc('deflate') Compress data + D strm like(z_stream) Compression stream + D flush 10I 0 value Flush type required + * + D deflateEnd PR 10I 0 extproc('deflateEnd') Termin. compression + D strm like(z_stream) Compression stream + * + D inflateInit PR 10I 0 extproc('inflateInit_') Init. expansion + D strm like(z_stream) Expansion stream + D version * value options(*string) Version string + D stream_size 10i 0 value Stream struct. size + * + D inflate PR 10I 0 extproc('inflate') Expand data + D strm like(z_stream) Expansion stream + D flush 10I 0 value Flush type required + * + D inflateEnd PR 10I 0 extproc('inflateEnd') Termin. expansion + D strm like(z_stream) Expansion stream + * + ************************************************************************** + * Advanced function prototypes + ************************************************************************** + * + D deflateInit2 PR 10I 0 extproc('deflateInit2_') Init. compression + D strm like(z_stream) Compression stream + D level 10I 0 value Compression level + D method 10I 0 value Compression method + D windowBits 10I 0 value log2(window size) + D memLevel 10I 0 value Mem/cmpress tradeoff + D strategy 10I 0 value Compression stategy + D version * value options(*string) Version string + D stream_size 10i 0 value Stream struct. size + * + D deflateSetDictionary... + D PR 10I 0 extproc('deflateSetDictionary') Init. dictionary + D strm like(z_stream) Compression stream + D dictionary 32767 const options(*varsize) Dictionary bytes + D dictLength 10U 0 value Dictionary length + * + D deflateCopy PR 10I 0 extproc('deflateCopy') Compress strm 2 strm + D dest like(z_stream) Destination stream + D source like(z_stream) Source stream + * + D deflateReset PR 10I 0 extproc('deflateReset') End and init. stream + D strm like(z_stream) Compression stream + * + D deflateParams PR 10I 0 extproc('deflateParams') Change level & strat + D strm like(z_stream) Compression stream + D level 10I 0 value Compression level + D strategy 10I 0 value Compression stategy + * + D deflateBound PR 10U 0 extproc('deflateBound') Change level & strat + D strm like(z_stream) Compression stream + D sourcelen 10U 0 value Compression level + * + D deflatePrime PR 10I 0 extproc('deflatePrime') Change level & strat + D strm like(z_stream) Compression stream + D bits 10I 0 value Number of bits to insert + D value 10I 0 value Bits to insert + * + D inflateInit2 PR 10I 0 extproc('inflateInit2_') Init. expansion + D strm like(z_stream) Expansion stream + D windowBits 10I 0 value log2(window size) + D version * value options(*string) Version string + D stream_size 10i 0 value Stream struct. size + * + D inflateSetDictionary... + D PR 10I 0 extproc('inflateSetDictionary') Init. dictionary + D strm like(z_stream) Expansion stream + D dictionary 32767 const options(*varsize) Dictionary bytes + D dictLength 10U 0 value Dictionary length + * + D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansion + D strm like(z_stream) Expansion stream + * + D inflateCopy PR 10I 0 extproc('inflateCopy') + D dest like(z_stream) Destination stream + D source like(z_stream) Source stream + * + D inflateReset PR 10I 0 extproc('inflateReset') End and init. stream + D strm like(z_stream) Expansion stream + * + D inflateBackInit... + D PR 10I 0 extproc('inflateBackInit_') + D strm like(z_stream) Expansion stream + D windowBits 10I 0 value Log2(buffer size) + D window 32767 options(*varsize) Buffer + D version * value options(*string) Version string + D stream_size 10i 0 value Stream struct. size + * + D inflateBack PR 10I 0 extproc('inflateBack') + D strm like(z_stream) Expansion stream + D in * value procptr Input function + D in_desc * value Input descriptor + D out * value procptr Output function + D out_desc * value Output descriptor + * + D inflateBackEnd PR 10I 0 extproc('inflateBackEnd') + D strm like(z_stream) Expansion stream + * + D zlibCompileFlags... + D PR 10U 0 extproc('zlibCompileFlags') + * + ************************************************************************** + * Checksum function prototypes + ************************************************************************** + * + D adler32 PR 10U 0 extproc('adler32') New checksum + D adler 10U 0 value Old checksum + D buf 32767 const options(*varsize) Bytes to accumulate + D len 10U 0 value Buffer length + * + D crc32 PR 10U 0 extproc('crc32') New checksum + D crc 10U 0 value Old checksum + D buf 32767 const options(*varsize) Bytes to accumulate + D len 10U 0 value Buffer length + * + ************************************************************************** + * Miscellaneous function prototypes + ************************************************************************** + * + D zError PR * extproc('zError') Error string + D err 10I 0 value Error code + * + D inflateSyncPoint... + D PR 10I 0 extproc('inflateSyncPoint') + D strm like(z_stream) Expansion stream + * + D get_crc_table PR * extproc('get_crc_table') Ptr to ulongs + * + /endif diff --git a/compat/zlib/old/zlib.html b/compat/zlib/old/zlib.html deleted file mode 100644 index 8c1b190..0000000 --- a/compat/zlib/old/zlib.html +++ /dev/null @@ -1,971 +0,0 @@ - - - - zlib general purpose compression library version 1.1.4 - - - - - -

zlib 1.1.4 Manual

-
-

Contents

-
    -
  1. Prologue -
  2. Introduction -
  3. Utility functions -
  4. Basic functions -
  5. Advanced functions -
  6. Constants -
  7. struct z_stream_s -
  8. Checksum functions -
  9. Misc -
-
-

Prologue

- 'zlib' general purpose compression library version 1.1.4, March 11th, 2002 -

- Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler -

- This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. -

- Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: -

    -
  1. The origin of this software must not be misrepresented ; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -
  2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -
  3. This notice may not be removed or altered from any source distribution. -
- -
-
Jean-loup Gailly -
jloup@gzip.org -
Mark Adler -
madler@alumni.caltech.edu -
- - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files - - ftp://ds.internic.net/rfc/rfc1950.txt - (zlib format), - - rfc1951.txt - (deflate format) and - - rfc1952.txt - (gzip format). -

- This manual is converted from zlib.h by - piaip -

- Visit - http://ftp.cdrom.com/pub/infozip/zlib/ - for the official zlib web page. -

- -


-

Introduction

- The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. -

- - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output - (providing more output space) before each call. -

- - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio. -

- - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. -

- -


-

Utility functions

- The following utility functions are implemented on top of the -
basic stream-oriented functions. - To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. -

Function list

-
    -
  • int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); -
  • int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level); -
  • int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); -
  • typedef voidp gzFile; -
  • gzFile gzopen (const char *path, const char *mode); -
  • gzFile gzdopen (int fd, const char *mode); -
  • int gzsetparams (gzFile file, int level, int strategy); -
  • int gzread (gzFile file, voidp buf, unsigned len); -
  • int gzwrite (gzFile file, const voidp buf, unsigned len); -
  • int VA gzprintf (gzFile file, const char *format, ...); -
  • int gzputs (gzFile file, const char *s); -
  • char * gzgets (gzFile file, char *buf, int len); -
  • int gzputc (gzFile file, int c); -
  • int gzgetc (gzFile file); -
  • int gzflush (gzFile file, int flush); -
  • z_off_t gzseek (gzFile file, z_off_t offset, int whence); -
  • z_off_t gztell (gzFile file); -
  • int gzrewind (gzFile file); -
  • int gzeof (gzFile file); -
  • int gzclose (gzFile file); -
  • const char * gzerror (gzFile file, int *errnum); -
-

Function description

-
-
int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); -
- Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least 0.1% larger than - sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the - compressed buffer.

- This function can be used to compress a whole file at once if the - input file is mmap'ed.

- compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer.

- -

int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level); -
- Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least 0.1% larger than sourceLen plus - 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. -

- - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -

- -

int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); -
- Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer.

- This function can be used to decompress a whole file at once if the - input file is mmap'ed. -

- - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted. -

- -

typedef voidp gzFile; -

- -

gzFile gzopen (const char *path, const char *mode); -
- Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h". (See the description - of deflateInit2 for more information about the strategy parameter.) -

- - gzopen can be used to read a file which is not in gzip format ; in this - case gzread will directly read from the file without decompression. -

- - gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state ; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). -

- -

gzFile gzdopen (int fd, const char *mode); -
- gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. -

- The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). -

- gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. -

- -

int gzsetparams (gzFile file, int level, int strategy); -
- Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. -

- gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -

- -

int gzread (gzFile file, voidp buf, unsigned len); -
- Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. -

- gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). -

- -

int gzwrite (gzFile file, const voidp buf, unsigned len); -
- Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). -

- -

int VA gzprintf (gzFile file, const char *format, ...); -
- Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). -

- -

int gzputs (gzFile file, const char *s); -
- Writes the given null-terminated string to the compressed file, excluding - the terminating null character. -

- gzputs returns the number of characters written, or -1 in case of error. -

- -

char * gzgets (gzFile file, char *buf, int len); -
- Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. -

- gzgets returns buf, or Z_NULL in case of error. -

- -

int gzputc (gzFile file, int c); -
- Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. -

- -

int gzgetc (gzFile file); -
- Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. -

- -

int gzflush (gzFile file, int flush); -
- Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. -

- gzflush should be called only when strictly necessary because it can - degrade compression. -

- -

z_off_t gzseek (gzFile file, z_off_t offset, int whence); -
- Sets the starting position for the next gzread or gzwrite on the - given compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. -

- If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported ; gzseek then compresses a sequence of zeroes up to the new - starting position. -

- gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -

- -

int gzrewind (gzFile file); -
- Rewinds the given file. This function is supported only for reading. -

- gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -

- -

z_off_t gztell (gzFile file); -
- Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. -

- - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -

- -

int gzeof (gzFile file); -
- Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. -

- -

int gzclose (gzFile file); -
- Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). -

- -

const char * gzerror (gzFile file, int *errnum); -
- Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. -

-

-
-

Basic functions

-

Function list

-
- -

Function description

-
-
const char * zlibVersion (void); -
The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. -

- -

int deflateInit (z_streamp strm, int level); -
- Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. -

- - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). -

- - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). -

- - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). -

- -

int deflate (z_streamp strm, int flush); -
- deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when - forced to flush.

- - The detailed semantics are as follows. deflate performs one or both of the - following actions: - -

    -
  • Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - -
  • - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. -

- - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly ; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. -

- - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. -

- - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - the compression. -

- - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). -

- - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space ; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. -

- - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - 0.1% larger than avail_in plus 12 bytes. If deflate does not return - Z_STREAM_END, then it must be called again as described above. -

- - deflate() sets strm-> adler to the adler32 checksum of all input read - so far (that is, total_in bytes). -

- - deflate() may update data_type if it can make a good guess about - the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. -

- - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). -

- -

int deflateEnd (z_streamp strm); -
- All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. -

- - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be - deallocated). -

- -

int inflateInit (z_streamp strm); -
- Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly ; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. -

- - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) -

- -

int inflate (z_streamp strm, int flush); -
- inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may some - introduce some output latency (reading input without producing any output) - except when forced to flush. -

- - The detailed semantics are as follows. inflate performs one or both of the - following actions: - -

    -
  • Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). - -
  • Provide more output starting at next_out and update next_out and - avail_out accordingly. inflate() provides as much output as possible, - until there is no more input data or no more space in the output buffer - (see below about the flush parameter). -

- - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. -

- - If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much - output as possible to the output buffer. The flushing behavior of inflate is - not specified for values of the flush parameter other than Z_SYNC_FLUSH - and Z_FINISH, but the current implementation actually flushes as much output - as possible anyway. -

- - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed ; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster routine - may be used for the single inflate() call. -

- - If a preset dictionary is needed at this point (see inflateSetDictionary - below), inflate sets strm-adler to the adler32 checksum of the - dictionary chosen by the compressor and returns Z_NEED_DICT ; otherwise - it sets strm-> adler to the adler32 checksum of all output produced - so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or - an error code as described below. At the end of the stream, inflate() - checks that its computed adler32 checksum is equal to that saved by the - compressor and returns Z_STREAM_END only if the checksum is correct. -

- - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect - adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent - (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if no progress is possible or if there was not - enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR - case, the application may then call inflateSync to look for a good - compression block. -

- -

int inflateEnd (z_streamp strm); -
- All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. -

- - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -

-
-

Advanced functions

- The following functions are needed only in some special applications. -

Function list

-
-

Function description

-
-
int deflateInit2 (z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy); - -
This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller.

- - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library.

- - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead.

- - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio ; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel.

- - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match). Filtered data consists mostly of small values with a - somewhat random distribution. In this case, the compression algorithm is - tuned to compress them better. The effect of Z_FILTERED is to force more - Huffman coding and less string matching ; it is somewhat intermediate - between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects - the compression ratio but not the correctness of the compressed output even - if it is not set appropriately.

- - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate().

- -

int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength); -
- Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit, deflateInit2 or deflateReset, before any - call of deflate. The compressor and decompressor must use exactly the same - dictionary (see inflateSetDictionary).

- - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy ; the data can then be compressed better than - with the default empty dictionary.

- - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front.

- - Upon return of this function, strm-> adler is set to the Adler32 value - of the dictionary ; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The Adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.)

- - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not - perform any compression: this will be done by deflate().

- -

int deflateCopy (z_streamp dest, z_streamp source); -
- Sets the destination stream as a complete copy of the source stream.

- - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory.

- - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and - destination.

- -

int deflateReset (z_streamp strm); -
This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2.

- - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL).

- -

int deflateParams (z_streamp strm, int level, int strategy); -
- Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate().

- - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm-> avail_out must be - non-zero.

- - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero.

- -

int inflateInit2 (z_streamp strm, int windowBits); - -
This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller.

- - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. If a compressed stream with a larger window size is given as - input, inflate() will return with the error code Z_DATA_ERROR instead of - trying to allocate a larger window.

- - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative - memLevel). msg is set to null if there is no error message. inflateInit2 - does not perform any decompression apart from reading the zlib header if - present: this will be done by inflate(). (So next_in and avail_in may be - modified, but next_out and avail_out are unchanged.)

- -

int inflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength); -
- Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate - if this call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the Adler32 value returned by this call of - inflate. The compressor and decompressor must use exactly the same - dictionary (see deflateSetDictionary).

- - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect Adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate().

- -

int inflateSync (z_streamp strm); - -
Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided.

- - inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data.

- -

int inflateReset (z_streamp strm); -
- This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. -

- - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). -

-

- -
-

Checksum functions

- These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. -

Function list

-
-

Function description

-
-
uLong adler32 (uLong adler, const Bytef *buf, uInt len); -
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. -

- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: -

-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-   
- -
uLong crc32 (uLong crc, const Bytef *buf, uInt len); -
- Update a running crc with the bytes buf[0..len-1] and return the updated - crc. If buf is NULL, this function returns the required initial value - for the crc. Pre- and post-conditioning (one's complement) is performed - within this function so it shouldn't be done by the application. - Usage example: -
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-   
-
-
-

struct z_stream_s

- -
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: ascii or binary */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream ;
-
-typedef z_stream FAR * z_streamp;  ÿ
-
-
- The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application.

- - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value.

- - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe.

- - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). -

- - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step).

- -


-

Constants

- -
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1
-	/* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-/* Allowed flush values ; see deflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy ; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_ASCII    1
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions less than 1.0.2 */
-
-
- -
-

Misc

-
deflateInit and inflateInit are macros to allow checking the zlib version - and the compiler's view of z_stream. -

- Other functions: -

-
const char * zError (int err); -
int inflateSyncPoint (z_streamp z); -
const uLongf * get_crc_table (void); -
-
- - Last update: Wed Oct 13 20:42:34 1999
- piapi@csie.ntu.edu.tw -
- - - diff --git a/compat/zlib/projects/visualc6/README.txt b/compat/zlib/projects/visualc6/README.txt index d0296c2..3d0aef0 100644 --- a/compat/zlib/projects/visualc6/README.txt +++ b/compat/zlib/projects/visualc6/README.txt @@ -1,73 +1,73 @@ -Microsoft Developer Studio Project Files, Format Version 6.00 for zlib. - -Copyright (C) 2000-2004 Simon-Pierre Cadieux. -Copyright (C) 2004 Cosmin Truta. -For conditions of distribution and use, see copyright notice in zlib.h. - - -This project builds the zlib binaries as follows: - -* Win32_DLL_Release\zlib1.dll DLL build -* Win32_DLL_Debug\zlib1d.dll DLL build (debug version) -* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code -* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version) -* Win32_LIB_Release\zlib.lib static build -* Win32_LIB_Debug\zlibd.lib static build (debug version) -* Win32_LIB_ASM_Release\zlib.lib static build using ASM code -* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version) - - -For more information regarding the DLL builds, please see the DLL FAQ -in ..\..\win32\DLL_FAQ.txt. - - -To build and test: - -1) On the main menu, select "File | Open Workspace". - Open "zlib.dsw". - -2) Select "Build | Set Active Configuration". - Choose the configuration you wish to build. - -3) Select "Build | Clean". - -4) Select "Build | Build ... (F7)". Ignore warning messages about - not being able to find certain include files (e.g. alloc.h). - -5) If you built one of the sample programs (example or minigzip), - select "Build | Execute ... (Ctrl+F5)". - - -To use: - -1) Select "Project | Settings (Alt+F7)". - Make note of the configuration names used in your project. - Usually, these names are "Win32 Release" and "Win32 Debug". - -2) In the Workspace window, select the "FileView" tab. - Right-click on the root item "Workspace '...'". - Select "Insert Project into Workspace". - Switch on the checkbox "Dependency of:", and select the name - of your project. Open "zlib.dsp". - -3) Select "Build | Configurations". - For each configuration of your project: - 3.1) Choose the zlib configuration you wish to use. - 3.2) Click on "Add". - 3.3) Set the new zlib configuration name to the name used by - the configuration from the current iteration. - -4) Select "Build | Set Active Configuration". - Choose the configuration you wish to build. - -5) Select "Build | Build ... (F7)". - -6) If you built an executable program, select - "Build | Execute ... (Ctrl+F5)". - - -Note: - -To build the ASM-enabled code, you need Microsoft Assembler -(ML.EXE). You can get it by downloading and installing the -latest Processor Pack for Visual C++ 6.0. +Microsoft Developer Studio Project Files, Format Version 6.00 for zlib. + +Copyright (C) 2000-2004 Simon-Pierre Cadieux. +Copyright (C) 2004 Cosmin Truta. +For conditions of distribution and use, see copyright notice in zlib.h. + + +This project builds the zlib binaries as follows: + +* Win32_DLL_Release\zlib1.dll DLL build +* Win32_DLL_Debug\zlib1d.dll DLL build (debug version) +* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code +* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version) +* Win32_LIB_Release\zlib.lib static build +* Win32_LIB_Debug\zlibd.lib static build (debug version) +* Win32_LIB_ASM_Release\zlib.lib static build using ASM code +* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version) + + +For more information regarding the DLL builds, please see the DLL FAQ +in ..\..\win32\DLL_FAQ.txt. + + +To build and test: + +1) On the main menu, select "File | Open Workspace". + Open "zlib.dsw". + +2) Select "Build | Set Active Configuration". + Choose the configuration you wish to build. + +3) Select "Build | Clean". + +4) Select "Build | Build ... (F7)". Ignore warning messages about + not being able to find certain include files (e.g. alloc.h). + +5) If you built one of the sample programs (example or minigzip), + select "Build | Execute ... (Ctrl+F5)". + + +To use: + +1) Select "Project | Settings (Alt+F7)". + Make note of the configuration names used in your project. + Usually, these names are "Win32 Release" and "Win32 Debug". + +2) In the Workspace window, select the "FileView" tab. + Right-click on the root item "Workspace '...'". + Select "Insert Project into Workspace". + Switch on the checkbox "Dependency of:", and select the name + of your project. Open "zlib.dsp". + +3) Select "Build | Configurations". + For each configuration of your project: + 3.1) Choose the zlib configuration you wish to use. + 3.2) Click on "Add". + 3.3) Set the new zlib configuration name to the name used by + the configuration from the current iteration. + +4) Select "Build | Set Active Configuration". + Choose the configuration you wish to build. + +5) Select "Build | Build ... (F7)". + +6) If you built an executable program, select + "Build | Execute ... (Ctrl+F5)". + + +Note: + +To build the ASM-enabled code, you need Microsoft Assembler +(ML.EXE). You can get it by downloading and installing the +latest Processor Pack for Visual C++ 6.0. diff --git a/compat/zlib/projects/visualc6/example.dsp b/compat/zlib/projects/visualc6/example.dsp index e072a37..2599efd 100644 --- a/compat/zlib/projects/visualc6/example.dsp +++ b/compat/zlib/projects/visualc6/example.dsp @@ -1,278 +1,278 @@ -# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=example - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "example.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "example - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_DLL_Release" -# PROP BASE Intermediate_Dir "example___Win32_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_Release" -# PROP Intermediate_Dir "Win32_DLL_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_DLL_Debug" -# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_Debug" -# PROP Intermediate_Dir "Win32_DLL_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release" -# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_ASM_Release" -# PROP Intermediate_Dir "Win32_DLL_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug" -# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_ASM_Debug" -# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "example - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_LIB_Release" -# PROP BASE Intermediate_Dir "example___Win32_LIB_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_Release" -# PROP Intermediate_Dir "Win32_LIB_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_LIB_Debug" -# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_Debug" -# PROP Intermediate_Dir "Win32_LIB_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release" -# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_ASM_Release" -# PROP Intermediate_Dir "Win32_LIB_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug" -# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_ASM_Debug" -# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "example - Win32 DLL Release" -# Name "example - Win32 DLL Debug" -# Name "example - Win32 DLL ASM Release" -# Name "example - Win32 DLL ASM Debug" -# Name "example - Win32 LIB Release" -# Name "example - Win32 LIB Debug" -# Name "example - Win32 LIB ASM Release" -# Name "example - Win32 LIB ASM Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\example.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\zconf.h -# End Source File -# Begin Source File - -SOURCE=..\..\zlib.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=example - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "example.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "example - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "example___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "example___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "example - Win32 DLL ASM Release" +# Name "example - Win32 DLL ASM Debug" +# Name "example - Win32 DLL Release" +# Name "example - Win32 DLL Debug" +# Name "example - Win32 LIB ASM Release" +# Name "example - Win32 LIB ASM Debug" +# Name "example - Win32 LIB Release" +# Name "example - Win32 LIB Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\example.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# End Group +# End Target +# End Project diff --git a/compat/zlib/projects/visualc6/minigzip.dsp b/compat/zlib/projects/visualc6/minigzip.dsp index f32024e..941582b 100644 --- a/compat/zlib/projects/visualc6/minigzip.dsp +++ b/compat/zlib/projects/visualc6/minigzip.dsp @@ -1,278 +1,278 @@ -# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=minigzip - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "minigzip.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "minigzip - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_DLL_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_Release" -# PROP Intermediate_Dir "Win32_DLL_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_Debug" -# PROP Intermediate_Dir "Win32_DLL_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_ASM_Release" -# PROP Intermediate_Dir "Win32_DLL_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_ASM_Debug" -# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_LIB_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_Release" -# PROP Intermediate_Dir "Win32_LIB_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_Debug" -# PROP Intermediate_Dir "Win32_LIB_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_ASM_Release" -# PROP Intermediate_Dir "Win32_LIB_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_ASM_Debug" -# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "minigzip - Win32 DLL Release" -# Name "minigzip - Win32 DLL Debug" -# Name "minigzip - Win32 DLL ASM Release" -# Name "minigzip - Win32 DLL ASM Debug" -# Name "minigzip - Win32 LIB Release" -# Name "minigzip - Win32 LIB Debug" -# Name "minigzip - Win32 LIB ASM Release" -# Name "minigzip - Win32 LIB ASM Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\minigzip.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\zconf.h -# End Source File -# Begin Source File - -SOURCE=..\..\zlib.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=minigzip - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "minigzip.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "minigzip - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "minigzip - Win32 DLL ASM Release" +# Name "minigzip - Win32 DLL ASM Debug" +# Name "minigzip - Win32 DLL Release" +# Name "minigzip - Win32 DLL Debug" +# Name "minigzip - Win32 LIB ASM Release" +# Name "minigzip - Win32 LIB ASM Debug" +# Name "minigzip - Win32 LIB Release" +# Name "minigzip - Win32 LIB Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\minigzip.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# End Group +# End Target +# End Project diff --git a/compat/zlib/projects/visualc6/zlib.dsp b/compat/zlib/projects/visualc6/zlib.dsp index 0fe0604..34f1f30 100644 --- a/compat/zlib/projects/visualc6/zlib.dsp +++ b/compat/zlib/projects/visualc6/zlib.dsp @@ -1,609 +1,621 @@ -# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=zlib - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" - -!IF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_DLL_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_Release" -# PROP Intermediate_Dir "Win32_DLL_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_DLL_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_Debug" -# PROP Intermediate_Dir "Win32_DLL_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_ASM_Release" -# PROP Intermediate_Dir "Win32_DLL_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_ASM_Debug" -# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_LIB_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_Release" -# PROP Intermediate_Dir "Win32_LIB_Release" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_LIB_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_Debug" -# PROP Intermediate_Dir "Win32_LIB_Debug" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_ASM_Release" -# PROP Intermediate_Dir "Win32_LIB_ASM_Release" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_ASM_Debug" -# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib" - -!ENDIF - -# Begin Target - -# Name "zlib - Win32 DLL Release" -# Name "zlib - Win32 DLL Debug" -# Name "zlib - Win32 DLL ASM Release" -# Name "zlib - Win32 DLL ASM Debug" -# Name "zlib - Win32 LIB Release" -# Name "zlib - Win32 LIB Debug" -# Name "zlib - Win32 LIB ASM Release" -# Name "zlib - Win32 LIB ASM Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\adler32.c -# End Source File -# Begin Source File - -SOURCE=..\..\compress.c -# End Source File -# Begin Source File - -SOURCE=..\..\crc32.c -# End Source File -# Begin Source File - -SOURCE=..\..\deflate.c -# End Source File -# Begin Source File - -SOURCE=..\..\gzio.c -# End Source File -# Begin Source File - -SOURCE=..\..\infback.c -# End Source File -# Begin Source File - -SOURCE=..\..\inffast.c -# End Source File -# Begin Source File - -SOURCE=..\..\inflate.c -# End Source File -# Begin Source File - -SOURCE=..\..\inftrees.c -# End Source File -# Begin Source File - -SOURCE=..\..\trees.c -# End Source File -# Begin Source File - -SOURCE=..\..\uncompr.c -# End Source File -# Begin Source File - -SOURCE=..\..\win32\zlib.def - -!IF "$(CFG)" == "zlib - Win32 DLL Release" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\zutil.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\crc32.h -# End Source File -# Begin Source File - -SOURCE=..\..\deflate.h -# End Source File -# Begin Source File - -SOURCE=..\..\inffast.h -# End Source File -# Begin Source File - -SOURCE=..\..\inffixed.h -# End Source File -# Begin Source File - -SOURCE=..\..\inflate.h -# End Source File -# Begin Source File - -SOURCE=..\..\inftrees.h -# End Source File -# Begin Source File - -SOURCE=..\..\trees.h -# End Source File -# Begin Source File - -SOURCE=..\..\zconf.h -# End Source File -# Begin Source File - -SOURCE=..\..\zlib.h -# End Source File -# Begin Source File - -SOURCE=..\..\zutil.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=..\..\win32\zlib1.rc -# End Source File -# End Group -# Begin Group "Assembler Files (Unsupported)" - -# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx" -# Begin Source File - -SOURCE=..\..\contrib\masmx86\gvmat32.asm - -!IF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Release -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Debug -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Release -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Debug -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\contrib\masmx86\gvmat32c.c - -!IF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# ADD CPP /I "..\.." - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\contrib\masmx86\inffas32.asm - -!IF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Release -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Debug -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Release -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Debug -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# Begin Source File - -SOURCE=.\README.txt -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=zlib - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib" + +!ENDIF + +# Begin Target + +# Name "zlib - Win32 DLL ASM Release" +# Name "zlib - Win32 DLL ASM Debug" +# Name "zlib - Win32 DLL Release" +# Name "zlib - Win32 DLL Debug" +# Name "zlib - Win32 LIB ASM Release" +# Name "zlib - Win32 LIB ASM Debug" +# Name "zlib - Win32 LIB Release" +# Name "zlib - Win32 LIB Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\adler32.c +# End Source File +# Begin Source File + +SOURCE=..\..\compress.c +# End Source File +# Begin Source File + +SOURCE=..\..\crc32.c +# End Source File +# Begin Source File + +SOURCE=..\..\deflate.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzclose.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzread.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzwrite.c +# End Source File +# Begin Source File + +SOURCE=..\..\infback.c +# End Source File +# Begin Source File + +SOURCE=..\..\inffast.c +# End Source File +# Begin Source File + +SOURCE=..\..\inflate.c +# End Source File +# Begin Source File + +SOURCE=..\..\inftrees.c +# End Source File +# Begin Source File + +SOURCE=..\..\trees.c +# End Source File +# Begin Source File + +SOURCE=..\..\uncompr.c +# End Source File +# Begin Source File + +SOURCE=..\..\win32\zlib.def + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\zutil.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\crc32.h +# End Source File +# Begin Source File + +SOURCE=..\..\deflate.h +# End Source File +# Begin Source File + +SOURCE=..\..\inffast.h +# End Source File +# Begin Source File + +SOURCE=..\..\inffixed.h +# End Source File +# Begin Source File + +SOURCE=..\..\inflate.h +# End Source File +# Begin Source File + +SOURCE=..\..\inftrees.h +# End Source File +# Begin Source File + +SOURCE=..\..\trees.h +# End Source File +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\zutil.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\win32\zlib1.rc +# End Source File +# End Group +# Begin Group "Assembler Files (Unsupported)" + +# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx" +# Begin Source File + +SOURCE=..\..\contrib\masmx86\gvmat32.asm + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Release +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Debug +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Release +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Debug +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\contrib\masmx86\gvmat32c.c + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\contrib\masmx86\inffas32.asm + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Release +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Debug +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Release +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Debug +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# End Group +# Begin Source File + +SOURCE=.\README.txt +# End Source File +# End Target +# End Project diff --git a/compat/zlib/projects/visualc6/zlib.dsw b/compat/zlib/projects/visualc6/zlib.dsw index 3a771fc..2644856 100644 --- a/compat/zlib/projects/visualc6/zlib.dsw +++ b/compat/zlib/projects/visualc6/zlib.dsw @@ -1,59 +1,59 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "example"=.\example.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name zlib - End Project Dependency -}}} - -############################################################################### - -Project: "minigzip"=.\minigzip.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name zlib - End Project Dependency -}}} - -############################################################################### - -Project: "zlib"=.\zlib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "example"=.\example.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency +}}} + +############################################################################### + +Project: "minigzip"=.\minigzip.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency +}}} + +############################################################################### + +Project: "zlib"=.\zlib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/compat/zlib/qnx/package.qpg b/compat/zlib/qnx/package.qpg index 8a4a47c..470d2d5 100644 --- a/compat/zlib/qnx/package.qpg +++ b/compat/zlib/qnx/package.qpg @@ -25,10 +25,10 @@ - - - - + + + + @@ -63,7 +63,7 @@ - 1.2.3 + 1.2.4 Medium Stable diff --git a/compat/zlib/treebuild.xml b/compat/zlib/treebuild.xml new file mode 100644 index 0000000..91ee891 --- /dev/null +++ b/compat/zlib/treebuild.xml @@ -0,0 +1,116 @@ + + + + zip compression library + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/trees.c b/compat/zlib/trees.c index badf371..39e9a95 100644 --- a/compat/zlib/trees.c +++ b/compat/zlib/trees.c @@ -1,5 +1,6 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2005 Jean-loup Gailly + * Copyright (C) 1995-2009 Jean-loup Gailly + * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -29,7 +30,7 @@ * Addison-Wesley, 1983. ISBN 0-201-06672-6. */ -/* @(#) $Id: trees.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: trees.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ /* #define GEN_TREES_H */ @@ -152,7 +153,7 @@ local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, int blcodes)); local void compress_block OF((deflate_state *s, ct_data *ltree, ct_data *dtree)); -local void set_data_type OF((deflate_state *s)); +local int detect_data_type OF((deflate_state *s)); local unsigned bi_reverse OF((unsigned value, int length)); local void bi_windup OF((deflate_state *s)); local void bi_flush OF((deflate_state *s)); @@ -203,12 +204,12 @@ local void send_bits(s, value, length) * unused bits in value. */ if (s->bi_valid > (int)Buf_size - length) { - s->bi_buf |= (value << s->bi_valid); + s->bi_buf |= (ush)value << s->bi_valid; put_short(s, s->bi_buf); s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); s->bi_valid += length - Buf_size; } else { - s->bi_buf |= value << s->bi_valid; + s->bi_buf |= (ush)value << s->bi_valid; s->bi_valid += length; } } @@ -218,12 +219,12 @@ local void send_bits(s, value, length) { int len = length;\ if (s->bi_valid > (int)Buf_size - len) {\ int val = value;\ - s->bi_buf |= (val << s->bi_valid);\ + s->bi_buf |= (ush)val << s->bi_valid;\ put_short(s, s->bi_buf);\ s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ s->bi_valid += len - Buf_size;\ } else {\ - s->bi_buf |= (value) << s->bi_valid;\ + s->bi_buf |= (ush)(value) << s->bi_valid;\ s->bi_valid += len;\ }\ } @@ -250,11 +251,13 @@ local void tr_static_init() if (static_init_done) return; /* For some embedded targets, global variables are not initialized: */ +#ifdef NO_INIT_GLOBAL_POINTERS static_l_desc.static_tree = static_ltree; static_l_desc.extra_bits = extra_lbits; static_d_desc.static_tree = static_dtree; static_d_desc.extra_bits = extra_dbits; static_bl_desc.extra_bits = extra_blbits; +#endif /* Initialize the mapping length (0..255) -> length code (0..28) */ length = 0; @@ -864,13 +867,13 @@ local void send_all_trees(s, lcodes, dcodes, blcodes) /* =========================================================================== * Send a stored block */ -void _tr_stored_block(s, buf, stored_len, eof) +void _tr_stored_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block */ ulg stored_len; /* length of input block */ - int eof; /* true if this is the last block for a file */ + int last; /* one if this is the last block for a file */ { - send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */ + send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ #ifdef DEBUG s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; s->compressed_len += (stored_len + 4) << 3; @@ -918,11 +921,11 @@ void _tr_align(s) * Determine the best encoding for the current block: dynamic trees, static * trees or store, and output the encoded block to the zip file. */ -void _tr_flush_block(s, buf, stored_len, eof) +void _tr_flush_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block, or NULL if too old */ ulg stored_len; /* length of input block */ - int eof; /* true if this is the last block for a file */ + int last; /* one if this is the last block for a file */ { ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ int max_blindex = 0; /* index of last bit length code of non zero freq */ @@ -931,8 +934,8 @@ void _tr_flush_block(s, buf, stored_len, eof) if (s->level > 0) { /* Check if the file is binary or text */ - if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN) - set_data_type(s); + if (s->strm->data_type == Z_UNKNOWN) + s->strm->data_type = detect_data_type(s); /* Construct the literal and distance trees */ build_tree(s, (tree_desc *)(&(s->l_desc))); @@ -978,20 +981,20 @@ void _tr_flush_block(s, buf, stored_len, eof) * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to * transform a block into a stored block. */ - _tr_stored_block(s, buf, stored_len, eof); + _tr_stored_block(s, buf, stored_len, last); #ifdef FORCE_STATIC } else if (static_lenb >= 0) { /* force static trees */ #else } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { #endif - send_bits(s, (STATIC_TREES<<1)+eof, 3); + send_bits(s, (STATIC_TREES<<1)+last, 3); compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); #ifdef DEBUG s->compressed_len += 3 + s->static_len; #endif } else { - send_bits(s, (DYN_TREES<<1)+eof, 3); + send_bits(s, (DYN_TREES<<1)+last, 3); send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, max_blindex+1); compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); @@ -1005,14 +1008,14 @@ void _tr_flush_block(s, buf, stored_len, eof) */ init_block(s); - if (eof) { + if (last) { bi_windup(s); #ifdef DEBUG s->compressed_len += 7; /* align on byte boundary */ #endif } Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - s->compressed_len-7*eof)); + s->compressed_len-7*last)); } /* =========================================================================== @@ -1118,24 +1121,45 @@ local void compress_block(s, ltree, dtree) } /* =========================================================================== - * Set the data type to BINARY or TEXT, using a crude approximation: - * set it to Z_TEXT if all symbols are either printable characters (33 to 255) - * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise. + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). * IN assertion: the fields Freq of dyn_ltree are set. */ -local void set_data_type(s) +local int detect_data_type(s) deflate_state *s; { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + unsigned long black_mask = 0xf3ffc07fUL; int n; - for (n = 0; n < 9; n++) + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>= 1) + if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0)) + return Z_BINARY; + + /* Check for textual ("white-listed") bytes. */ + if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 + || s->dyn_ltree[13].Freq != 0) + return Z_TEXT; + for (n = 32; n < LITERALS; n++) if (s->dyn_ltree[n].Freq != 0) - break; - if (n == 9) - for (n = 14; n < 32; n++) - if (s->dyn_ltree[n].Freq != 0) - break; - s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY; + return Z_TEXT; + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; } /* =========================================================================== diff --git a/compat/zlib/uncompr.c b/compat/zlib/uncompr.c index 34c2c97..66b123a 100644 --- a/compat/zlib/uncompr.c +++ b/compat/zlib/uncompr.c @@ -1,9 +1,9 @@ /* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: uncompr.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: uncompr.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ #define ZLIB_INTERNAL #include "zlib.h" @@ -16,8 +16,6 @@ been saved previously by the compressor and transmitted to the decompressor by some mechanism outside the scope of this compression library.) Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output diff --git a/compat/zlib/watcom/watcom_f.mak b/compat/zlib/watcom/watcom_f.mak new file mode 100644 index 0000000..37f4d74 --- /dev/null +++ b/compat/zlib/watcom/watcom_f.mak @@ -0,0 +1,43 @@ +# Makefile for zlib +# OpenWatcom flat model +# Last updated: 28-Dec-2005 + +# To use, do "wmake -f watcom_f.mak" + +C_SOURCE = adler32.c compress.c crc32.c deflate.c & + gzclose.c gzlib.c gzread.c gzwrite.c & + infback.c inffast.c inflate.c inftrees.c & + trees.c uncompr.c zutil.c + +OBJS = adler32.obj compress.obj crc32.obj deflate.obj & + gzclose.obj gzlib.obj gzread.obj gzwrite.obj & + infback.obj inffast.obj inflate.obj inftrees.obj & + trees.obj uncompr.obj zutil.obj + +CC = wcc386 +LINKER = wcl386 +CFLAGS = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx +ZLIB_LIB = zlib_f.lib + +.C.OBJ: + $(CC) $(CFLAGS) $[@ + +all: $(ZLIB_LIB) example.exe minigzip.exe + +$(ZLIB_LIB): $(OBJS) + wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj + wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj + wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj + wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj + wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj + +example.exe: $(ZLIB_LIB) example.obj + $(LINKER) -ldos32a -fe=example.exe example.obj $(ZLIB_LIB) + +minigzip.exe: $(ZLIB_LIB) minigzip.obj + $(LINKER) -ldos32a -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) + +clean: .SYMBOLIC + del *.obj + del $(ZLIB_LIB) + @echo Cleaning done diff --git a/compat/zlib/watcom/watcom_l.mak b/compat/zlib/watcom/watcom_l.mak new file mode 100644 index 0000000..193eed7 --- /dev/null +++ b/compat/zlib/watcom/watcom_l.mak @@ -0,0 +1,43 @@ +# Makefile for zlib +# OpenWatcom large model +# Last updated: 28-Dec-2005 + +# To use, do "wmake -f watcom_l.mak" + +C_SOURCE = adler32.c compress.c crc32.c deflate.c & + gzclose.c gzlib.c gzread.c gzwrite.c & + infback.c inffast.c inflate.c inftrees.c & + trees.c uncompr.c zutil.c + +OBJS = adler32.obj compress.obj crc32.obj deflate.obj & + gzclose.obj gzlib.obj gzread.obj gzwrite.obj & + infback.obj inffast.obj inflate.obj inftrees.obj & + trees.obj uncompr.obj zutil.obj + +CC = wcc +LINKER = wcl +CFLAGS = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx +ZLIB_LIB = zlib_l.lib + +.C.OBJ: + $(CC) $(CFLAGS) $[@ + +all: $(ZLIB_LIB) example.exe minigzip.exe + +$(ZLIB_LIB): $(OBJS) + wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj + wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj + wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj + wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj + wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj + +example.exe: $(ZLIB_LIB) example.obj + $(LINKER) -fe=example.exe example.obj $(ZLIB_LIB) + +minigzip.exe: $(ZLIB_LIB) minigzip.obj + $(LINKER) -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) + +clean: .SYMBOLIC + del *.obj + del $(ZLIB_LIB) + @echo Cleaning done diff --git a/compat/zlib/win32/DLL_FAQ.txt b/compat/zlib/win32/DLL_FAQ.txt index fb18e07..12c0090 100644 --- a/compat/zlib/win32/DLL_FAQ.txt +++ b/compat/zlib/win32/DLL_FAQ.txt @@ -16,7 +16,7 @@ in the zlib distribution, or at the following location: Pointers to a precompiled ZLIB1.DLL can be found in the zlib web site at: - http://www.zlib.org/ + http://www.zlib.net/ Applications that link to ZLIB1.DLL can rely on the following specification: @@ -350,9 +350,9 @@ in the zlib distribution, or at the following location: your build is unofficial. You should give it a different file name, and/or install it in a private directory that can be accessed by your application only, and is not visible to the - others (e.g. it's not in the SYSTEM or the SYSTEM32 directory, - and it's not in the PATH). Otherwise, your build may clash - with applications that link to the official build. + others (i.e. it's neither in the PATH, nor in the SYSTEM or + SYSTEM32 directories). Otherwise, your build may clash with + applications that link to the official build. For example, in Cygwin, zlib is linked to the Cygwin runtime CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. diff --git a/compat/zlib/win32/Makefile.bor b/compat/zlib/win32/Makefile.bor index b802519..3981d42 100644 --- a/compat/zlib/win32/Makefile.bor +++ b/compat/zlib/win32/Makefile.bor @@ -1,9 +1,6 @@ # Makefile for zlib # Borland C++ for Win32 # -# Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003 -# Last updated: 28-Aug-2003 -# # Usage: # make -f win32/Makefile.bor # make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj @@ -27,11 +24,11 @@ LDFLAGS = $(LOC) # variables ZLIB_LIB = zlib.lib -OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj -OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj #OBJA = -OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj -OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj +OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj +OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj #OBJPA= @@ -52,7 +49,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -gzio.obj: gzio.c zutil.h zlib.h zconf.h +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ inffast.h inffixed.h @@ -99,8 +102,8 @@ minigzip.exe: minigzip.obj $(ZLIB_LIB) # cleanup clean: + -del $(ZLIB_LIB) -del *.obj - -del *.lib -del *.exe -del *.tds -del zlib.bak diff --git a/compat/zlib/win32/Makefile.emx b/compat/zlib/win32/Makefile.emx index 7b08424..4d6ab0e 100644 --- a/compat/zlib/win32/Makefile.emx +++ b/compat/zlib/win32/Makefile.emx @@ -33,8 +33,8 @@ AR=ar rcs prefix=/usr/local exec_prefix = $(prefix) -OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ - zutil.o inflate.o infback.o inftrees.o inffast.o +OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o TEST_OBJS = example.o minigzip.o diff --git a/compat/zlib/win32/Makefile.gcc b/compat/zlib/win32/Makefile.gcc index 62a8430..abe3d5a 100644 --- a/compat/zlib/win32/Makefile.gcc +++ b/compat/zlib/win32/Makefile.gcc @@ -45,6 +45,8 @@ ARFLAGS = rcs RC = windres RCFLAGS = --define GCC_WINDRES +STRIP = strip + CP = cp -fp # If GNU install is available, replace $(CP) with install. INSTALL = $(CP) @@ -53,17 +55,17 @@ RM = rm -f prefix = /usr/local exec_prefix = $(prefix) -OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \ - inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o +OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ + gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o OBJA = -all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d +all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe -test: example minigzip +test: example.exe minigzip.exe ./example echo hello world | ./minigzip | ./minigzip -d -testdll: example_d minigzip_d +testdll: example_d.exe minigzip_d.exe ./example_d echo hello world | ./minigzip_d | ./minigzip_d -d @@ -79,20 +81,20 @@ $(STATICLIB): $(OBJS) $(OBJA) $(IMPLIB): $(SHAREDLIB) $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o - dllwrap --driver-name $(CC) --def win32/zlib.def \ - --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o - strip $@ + $(CC) -shared -Wl,--out-implib,$(IMPLIB) \ + -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o + $(STRIP) $@ -example: example.o $(STATICLIB) +example.exe: example.o $(STATICLIB) $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) -minigzip: minigzip.o $(STATICLIB) +minigzip.exe: minigzip.o $(STATICLIB) $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB) -example_d: example.o $(IMPLIB) +example_d.exe: example.o $(IMPLIB) $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB) -minigzip_d: minigzip.o $(IMPLIB) +minigzip_d.exe: minigzip.o $(IMPLIB) $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB) zlibrc.o: win32/zlib1.rc @@ -130,7 +132,10 @@ compress.o: zlib.h zconf.h crc32.o: crc32.h zlib.h zconf.h deflate.o: deflate.h zutil.h zlib.h zconf.h example.o: zlib.h zconf.h -gzio.o: zutil.h zlib.h zconf.h +gzclose.o: zlib.h zconf.h gzguts.h +gzlib.o: zlib.h zconf.h gzguts.h +gzread.o: zlib.h zconf.h gzguts.h +gzwrite.o: zlib.h zconf.h gzguts.h inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h diff --git a/compat/zlib/win32/Makefile.msc b/compat/zlib/win32/Makefile.msc index 528ecaa..a731c0c 100644 --- a/compat/zlib/win32/Makefile.msc +++ b/compat/zlib/win32/Makefile.msc @@ -1,11 +1,5 @@ -# Makefile for zlib -- Microsoft (Visual) C -# -# Authors: -# Cosmin Truta, 11-Mar-2003 -# Christian Spieler, 19-Mar-2003 -# -# Last updated: -# Cosmin Truta, 27-Aug-2003 +# Makefile for zlib using Microsoft (Visual) C +# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler # # Usage: # nmake -f win32/Makefile.msc (standard build) @@ -27,14 +21,15 @@ AS = ml LD = link AR = lib RC = rc -CFLAGS = -nologo -MD -O2 $(LOC) -ASFLAGS = -coff -LDFLAGS = -nologo -release +CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) +WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE +ASFLAGS = -coff -Zi +LDFLAGS = -nologo -debug -incremental:no -opt:ref ARFLAGS = -nologo RCFLAGS = /dWIN32 /r -OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \ - inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj +OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \ + gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj OBJA = @@ -49,22 +44,32 @@ $(IMPLIB): $(SHAREDLIB) $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \ - -out:$@ $(OBJS) $(OBJA) zlib1.res + -out:$@ -base:0x5A4C0000 $(OBJS) $(OBJA) zlib1.res + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;2 example.exe: example.obj $(STATICLIB) $(LD) $(LDFLAGS) example.obj $(STATICLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 minigzip.exe: minigzip.obj $(STATICLIB) $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 example_d.exe: example.obj $(IMPLIB) $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 minigzip_d.exe: minigzip.obj $(IMPLIB) $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB) + if exist $@.manifest \ + mt -nologo -manifest $@.manifest -outputresource:$@;1 .c.obj: - $(CC) -c $(CFLAGS) $< + $(CC) -c $(WFLAGS) $(CFLAGS) $< .asm.obj: $(AS) -c $(ASFLAGS) $< @@ -77,7 +82,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h -gzio.obj: gzio.c zutil.h zlib.h zconf.h +gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h + +gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h + +gzread.obj: gzread.c zlib.h zconf.h gzguts.h + +gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \ inffast.h inffixed.h @@ -123,4 +134,6 @@ clean: -del *.res -del *.exp -del *.exe + -del *.pdb + -del *.manifest -del foo.gz diff --git a/compat/zlib/win32/zdll.lib b/compat/zlib/win32/zdll.lib index 01f4e10..4e53491 100644 Binary files a/compat/zlib/win32/zdll.lib and b/compat/zlib/win32/zdll.lib differ diff --git a/compat/zlib/win32/zlib.def b/compat/zlib/win32/zlib.def index 964316d..03df8bf 100644 --- a/compat/zlib/win32/zlib.def +++ b/compat/zlib/win32/zlib.def @@ -13,18 +13,20 @@ EXPORTS deflateCopy deflateReset deflateParams + deflateTune deflateBound deflatePrime deflateSetHeader - deflateTune inflateSetDictionary inflateSync inflateCopy inflateReset + inflateReset2 + inflatePrime + inflateMark + inflateGetHeader inflateBack inflateBackEnd - inflateGetHeader - inflatePrime zlibCompileFlags ; utility functions compress @@ -33,6 +35,7 @@ EXPORTS uncompress gzopen gzdopen + gzbuffer gzsetparams gzread gzwrite @@ -46,15 +49,18 @@ EXPORTS gzseek gzrewind gztell + gzoffset gzeof gzdirect gzclose + gzclose_r + gzclose_w gzerror gzclearerr ; checksum functions adler32 - adler32_combine crc32 + adler32_combine crc32_combine ; various hacks, don't look :) deflateInit_ @@ -62,6 +68,7 @@ EXPORTS inflateInit_ inflateInit2_ inflateBackInit_ + zError inflateSyncPoint get_crc_table - zError + inflateUndermine diff --git a/compat/zlib/win32/zlib1.dll b/compat/zlib/win32/zlib1.dll index 1cf8a47..bfc3ba9 100644 Binary files a/compat/zlib/win32/zlib1.dll and b/compat/zlib/win32/zlib1.dll differ diff --git a/compat/zlib/win32/zlib1.rc b/compat/zlib/win32/zlib1.rc index 77e8388..0d1d7ff 100644 --- a/compat/zlib/win32/zlib1.rc +++ b/compat/zlib/win32/zlib1.rc @@ -14,7 +14,7 @@ VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE #else FILEFLAGS 0 #endif - FILEOS VOS_DOS_WINDOWS32 + FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL FILESUBTYPE 0 // not used BEGIN @@ -26,11 +26,11 @@ BEGIN VALUE "FileDescription", "zlib data compression library\0" VALUE "FileVersion", ZLIB_VERSION "\0" VALUE "InternalName", "zlib1.dll\0" - VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0" + VALUE "LegalCopyright", "(C) 1995-2006 Jean-loup Gailly & Mark Adler\0" VALUE "OriginalFilename", "zlib1.dll\0" VALUE "ProductName", "zlib\0" VALUE "ProductVersion", ZLIB_VERSION "\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "Comments", "For more information visit http://www.zlib.net/\0" END END BLOCK "VarFileInfo" diff --git a/compat/zlib/zconf.h b/compat/zlib/zconf.h index 0b73561..ce4c5f7 100644 --- a/compat/zlib/zconf.h +++ b/compat/zlib/zconf.h @@ -1,9 +1,9 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zconf.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: zconf.h,v 1.2 2010/03/16 09:01:02 nijtmans Exp $ */ #ifndef ZCONF_H #define ZCONF_H @@ -11,52 +11,124 @@ /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ + +/* all linked symbols */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 # define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy # define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd # define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset +# define deflateInit_ z_deflateInit_ # define deflateParams z_deflateParams -# define deflateBound z_deflateBound # define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzgetc z_gzgetc +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzwrite z_gzwrite +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetHeader z_inflateGetHeader # define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 # define inflateSetDictionary z_inflateSetDictionary # define inflateSync z_inflateSync # define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound +# define inflateUndermine z_inflateUndermine +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table # define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table # define zError z_zError +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef # define alloc_func z_alloc_func +# define charf z_charf # define free_func z_free_func +# define gzFile z_gzFile +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp # define in_func z_in_func +# define intf z_intf # define out_func z_out_func -# define Byte z_Byte # define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf # define uIntf z_uIntf +# define uLong z_uLong # define uLongf z_uLongf -# define voidpf z_voidpf # define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + #endif #if defined(__MSDOS__) && !defined(MSDOS) @@ -243,6 +315,10 @@ # endif #endif +#ifdef HAVE_VISIBILITY_PRAGMA +# define ZEXTERN __attribute__((visibility ("default"))) extern +#endif + #ifndef ZEXTERN # define ZEXTERN extern #endif @@ -284,14 +360,25 @@ typedef uLong FAR uLongf; typedef Byte *voidp; #endif -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ -# include /* for off_t */ -# include /* for SEEK_* and off_t */ +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef Z_HAVE_UNISTD_H +# include /* for off_t */ +# include /* for SEEK_* and off_t */ # ifdef VMS -# include /* for off_t */ +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t # endif -# define z_off_t off_t #endif + +#ifdef _LARGEFILE64_SOURCE +# include +#endif + #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ @@ -307,26 +394,23 @@ typedef uLong FAR uLongf; #if defined(__MVS__) # define NO_vsnprintf -# ifdef FAR -# undef FAR -# endif #endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(deflateBound,"DEBND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(compressBound,"CMBND") -# pragma map(inflate_table,"INTABL") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_copyright,"INCOPY") + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") #endif #endif /* ZCONF_H */ diff --git a/compat/zlib/zconf.h.cmakein b/compat/zlib/zconf.h.cmakein new file mode 100644 index 0000000..b659568 --- /dev/null +++ b/compat/zlib/zconf.h.cmakein @@ -0,0 +1,418 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2010 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zconf.h.cmakein,v 1.1 2010/03/16 09:01:03 nijtmans Exp $ */ + +#ifndef ZCONF_H +#define ZCONF_H +#cmakedefine Z_PREFIX +#cmakedefine Z_HAVE_UNISTD_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ + +/* all linked symbols */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzgetc z_gzgetc +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzwrite z_gzwrite +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetHeader z_inflateGetHeader +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# define uncompress z_uncompress +# define zError z_zError +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# define gzFile z_gzFile +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifdef HAVE_VISIBILITY_PRAGMA +# define ZEXTERN __attribute__((visibility ("default"))) extern +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef Z_HAVE_UNISTD_H +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +#endif + +#ifdef _LARGEFILE64_SOURCE +# include +#endif + +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +#if defined(__OS400__) +# define NO_vsnprintf +#endif + +#if defined(__MVS__) +# define NO_vsnprintf +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/compat/zlib/zconf.h.in b/compat/zlib/zconf.h.in new file mode 100644 index 0000000..e1a788b --- /dev/null +++ b/compat/zlib/zconf.h.in @@ -0,0 +1,416 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2010 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zconf.h.in,v 1.1 2010/03/16 09:01:04 nijtmans Exp $ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ + +/* all linked symbols */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzgetc z_gzgetc +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzwrite z_gzwrite +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetHeader z_inflateGetHeader +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# define uncompress z_uncompress +# define zError z_zError +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# define gzFile z_gzFile +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifdef HAVE_VISIBILITY_PRAGMA +# define ZEXTERN __attribute__((visibility ("default"))) extern +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef Z_HAVE_UNISTD_H +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +#endif + +#ifdef _LARGEFILE64_SOURCE +# include +#endif + +#ifndef SEEK_SET +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif +#ifndef z_off_t +# define z_off_t long +#endif + +#if defined(__OS400__) +# define NO_vsnprintf +#endif + +#if defined(__MVS__) +# define NO_vsnprintf +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/compat/zlib/zconf.in.h b/compat/zlib/zconf.in.h deleted file mode 100644 index 49595cc..0000000 --- a/compat/zlib/zconf.in.h +++ /dev/null @@ -1,332 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.in.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams -# define deflateBound z_deflateBound -# define deflatePrime z_deflatePrime -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table -# define zError z_zError - -# define alloc_func z_alloc_func -# define free_func z_free_func -# define in_func z_in_func -# define out_func z_out_func -# define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf -# define uIntf z_uIntf -# define uLongf z_uLongf -# define voidpf z_voidpf -# define voidp z_voidp -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ -# include /* for off_t */ -# include /* for SEEK_* and off_t */ -# ifdef VMS -# include /* for off_t */ -# endif -# define z_off_t off_t -#endif -#ifndef SEEK_SET -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif -#ifndef z_off_t -# define z_off_t long -#endif - -#if defined(__OS400__) -# define NO_vsnprintf -#endif - -#if defined(__MVS__) -# define NO_vsnprintf -# ifdef FAR -# undef FAR -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(deflateBound,"DEBND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(compressBound,"CMBND") -# pragma map(inflate_table,"INTABL") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/compat/zlib/zlib.3 b/compat/zlib/zlib.3 index 90b8162..52999c7 100644 --- a/compat/zlib/zlib.3 +++ b/compat/zlib/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "18 July 2005" +.TH ZLIB 3 "14 March 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -9,15 +9,15 @@ for full description] The .I zlib library is a general purpose data compression library. -The code is thread safe. +The code is thread safe, assuming that the standard library functions +used are thread safe, such as memory allocation routines. It provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. This version of the library supports only one compression method (deflation) -but other algorithms will be added later -and will have the same stream interface. +but other algorithms may be added later +with the same stream interface. .LP Compression can be done in a single step if the buffers are large enough -(for example if an input file is mmap'ed), or can be done by repeated calls of the compression function. In the latter case, the application must provide more input and/or consume the output @@ -30,7 +30,7 @@ with an interface similar to that of stdio. .LP The library does not install any signal handler. The decoder checks the consistency of the compressed data, -so the library should never crash even in case of corrupted input. +so the library should never crash even in the case of corrupted input. .LP All functions of the compression library are documented in the file .IR zlib.h . @@ -38,18 +38,19 @@ The distribution source includes examples of use of the library in the files .I example.c and -.IR minigzip.c . +.IR minigzip.c, +as well as other examples in the +.IR examples/ +directory. .LP Changes to this version are documented in the file .I ChangeLog -that accompanies the source, -and are concerned primarily with bug fixes and portability enhancements. +that accompanies the source. .LP -A Java implementation of .I zlib -is available in the Java Development Kit 1.1: +is available in Java using the java.util.zip package: .IP -http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html +http://java.sun.com/developer/technicalArticles/Programming/compression/ .LP A Perl interface to .IR zlib , @@ -57,7 +58,7 @@ written by Paul Marquess (pmqs@cpan.org), is available at CPAN (Comprehensive Perl Archive Network) sites, including: .IP -http://www.cpan.org/modules/by-module/Compress/ +http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .LP A Python interface to .IR zlib , @@ -66,14 +67,11 @@ is available in Python 1.5 and later versions: .IP http://www.python.org/doc/lib/module-zlib.html .LP -A .I zlib -binding for -.IR tcl (1), -written by Andreas Kupries (a.kupries@westend.com), -is availlable at: +is built into +.IR tcl: .IP -http://www.westend.com/~kupries/doc/trf/man/man.html +http://wiki.tcl.tk/4610 .LP An experimental package to read and write files in .zip format, written on top of @@ -81,40 +79,34 @@ written on top of by Gilles Vollant (info@winimage.com), is available at: .IP -http://www.winimage.com/zLibDll/unzip.html +http://www.winimage.com/zLibDll/minizip.html and also in the .I contrib/minizip directory of the main .I zlib -web site. +source distribution. .SH "SEE ALSO" The .I zlib -web site can be found at either of these locations: +web site can be found at: .IP -http://www.zlib.org -.br -http://www.gzip.org/zlib/ +http://zlib.net/ .LP The data format used by the zlib library is described by RFC (Request for Comments) 1950 to 1952 in the files: .IP -http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format) +http://www.ietf.org/rfc/rfc1950.txt (for the zlib header and trailer format) .br -http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format) +http://www.ietf.org/rfc/rfc1951.txt (for the deflate compressed data format) .br -http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format) -.LP -These documents are also available in other formats from: -.IP -ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html +http://www.ietf.org/rfc/rfc1952.txt (for the gzip header and trailer format) .LP -Mark Nelson (markn@ieee.org) wrote an article about +Mark Nelson wrote an article about .I zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at: .IP -http://dogma.net/markn/articles/zlibtool/zlibtool.htm +http://marknelson.us/1997/01/01/zlib-engine/ .SH "REPORTING PROBLEMS" Before reporting a problem, please check the @@ -127,14 +119,14 @@ Please read the .I zlib FAQ at: .IP -http://www.gzip.org/zlib/zlib_faq.html +http://zlib.net/zlib_faq.html .LP before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.3 -Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org) +Version 1.2.4 +Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP This software is provided "as-is," diff --git a/compat/zlib/zlib.3.pdf b/compat/zlib/zlib.3.pdf new file mode 100644 index 0000000..05ed2d0 Binary files /dev/null and b/compat/zlib/zlib.3.pdf differ diff --git a/compat/zlib/zlib.h b/compat/zlib/zlib.h index 78a1b32..f5785be 100644 --- a/compat/zlib/zlib.h +++ b/compat/zlib/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3.f-tcl, Dec 22th, 2008 + version 1.2.4, Mar 14th, 2010 - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,49 +37,44 @@ extern "C" { #endif -/* This version is modified from the original - * sources, in that the symbols deflateSetHeader - * and inflateGetHeader are added to win32/zlib.def - * modified by nijtmans@users.sourceforge.net - */ -#define ZLIB_VERSION "1.2.3.f-tcl" -#define ZLIB_VERNUM 0x123f +#define ZLIB_VERSION "1.2.4" +#define ZLIB_VERNUM 0x1240 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 3 +#define ZLIB_VER_REVISION 4 +#define ZLIB_VER_SUBREVISION 0 /* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. - - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. + + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output (providing more output space) before each call. - The compressed data format used by default by the in-memory functions is + The compressed data format used by default by the in-memory functions is the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped around a deflate stream, which is itself documented in RFC 1951. - The library also supports reading and writing files in gzip (.gz) format + The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The gzip format is different from the zlib format. gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - This library can optionally read and write gzip streams in memory as well. + This library can optionally read and write gzip streams in memory as well. - The zlib format was designed to be compact and fast for use in memory + The zlib format was designed to be compact and fast for use in memory and on communications channels. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib. - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in case of corrupted input. */ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); @@ -134,45 +129,45 @@ typedef struct gz_header_s { typedef gz_header FAR *gz_headerp; /* - The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the opaque value. - zalloc must return Z_NULL if there is not enough memory for the object. + zalloc must return Z_NULL if there is not enough memory for the object. If zlib is used in a multi-threaded application, zalloc and zfree must be thread safe. - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step). + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use in the decompressor (particularly + if the decompressor wants to decompress everything in a single step). */ /* constants */ #define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ +#define Z_PARTIAL_FLUSH 1 #define Z_SYNC_FLUSH 2 #define Z_FULL_FLUSH 3 #define Z_FINISH 4 #define Z_BLOCK 5 +#define Z_TREES 6 /* Allowed flush values; see deflate() and inflate() below for details */ #define Z_OK 0 @@ -184,8 +179,8 @@ typedef gz_header FAR *gz_headerp; #define Z_MEM_ERROR (-4) #define Z_BUF_ERROR (-5) #define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative - * values are errors, positive values are used for special but normal events. +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. */ #define Z_NO_COMPRESSION 0 @@ -215,119 +210,140 @@ typedef gz_header FAR *gz_headerp; #define zlib_version zlibVersion() /* for compatibility with versions < 1.0.2 */ + /* basic functions */ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. */ /* ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). */ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); /* deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when forced to flush. - The detailed semantics are as follows. deflate performs one or both of the + The detailed semantics are as follows. deflate performs one or both of the following actions: - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not + accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in and avail_in are updated and processing will resume at this point for the next call of deflate(). - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. + accordingly. This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. + should be set only when necessary (in interactive applications). Some + output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumualte before producing output, in order to + decide how much data to accumulate before producing output, in order to maximize compression. If the parameter flush is set to Z_SYNC_FLUSH, all pending output is flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed code + block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. If flush is set to Z_FULL_FLUSH, all output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade compression. If deflate returns with avail_out == 0, this function must be called again with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that avail_out is greater than six to avoid repeated flush markers due to avail_out == 0 on return. If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space; if deflate returns with Z_OK, this function must be + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space; if deflate returns with Z_OK, this function must be called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the stream + are deflateReset or deflateEnd. Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - the value returned by deflateBound (see below). If deflate does not return + is to be done in a single step. In this case, avail_out must be at least the + value returned by deflateBound (see below). If deflate does not return Z_STREAM_END, then it must be called again as described above. deflate() sets strm->adler to the adler32 checksum of all input read so far (that is, total_in bytes). deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. + the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered + binary. This field is only for information purposes and does not affect the + compression algorithm in any manner. deflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if all input has been consumed and all output has been produced (only when flush is set to Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not + if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and deflate() can be called again with more input and more output space to continue compressing. */ @@ -336,13 +352,13 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be deallocated). */ @@ -350,10 +366,10 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - Initializes the internal stream state for decompression. The fields + Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the + the caller. If next_in is not Z_NULL and avail_in is large enough (the + exact value depends on the compression method), inflateInit determines the compression method from the zlib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first call of inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to @@ -361,95 +377,108 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit() does not process any header information -- that is deferred + until inflate() is called. */ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); /* inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce + buffer becomes empty or the output buffer becomes full. It may introduce some output latency (reading input without producing any output) except when forced to flush. - The detailed semantics are as follows. inflate performs one or both of the + The detailed semantics are as follows. inflate performs one or both of the following actions: - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing will + resume at this point for the next call of inflate(). - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there - is no more input data or no more space in the output buffer (see below - about the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, - Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() stop - if and when it gets to the next deflate block boundary. When decoding the - zlib or gzip format, this will cause inflate() to return immediately after - the header and before the first block. When doing a raw inflate, inflate() - will go ahead and process the first block, and will return when it gets to - the end of that block, or when it runs out of data. + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. The Z_BLOCK option assists in appending to or combining deflate streams. Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 - if inflate() is currently decoding the last block in the deflate stream, - plus 128 if inflate() returned immediately after decoding an end-of-block - code or decoding the complete header up to just before the first byte of the - deflate stream. The end-of-block will not be indicated until all of the - uncompressed data from that block has been written to strm->next_out. The - number of unused bits may in general be greater than seven, except when - bit 7 of data_type is set, in which case the number of unused bits will be - less than eight. + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster approach - may be used for the single inflate() call. + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all the uncompressed data. (The size + of the uncompressed data may have been saved by the compressor for this + purpose.) The next operation on this stream must be inflateEnd to deallocate + the decompression state. The use of Z_FINISH is never required, but can be + used to inform inflate that a faster approach may be used for the single + inflate() call. In this implementation, inflate() always flushes as much output as possible to the output buffer, and always uses the faster approach on the - first call. So the only effect of the flush parameter in this implementation + first call. So the only effect of the flush parameter in this implementation is on the return value of inflate(), as noted below, or when it returns early - because Z_BLOCK is used. + because Z_BLOCK or Z_TREES is used. If a preset dictionary is needed after this call (see inflateSetDictionary below), inflate sets strm->adler to the adler32 checksum of the dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise it sets strm->adler to the adler32 checksum of all output produced so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 + below. At the end of the stream, inflate() checks that its computed adler32 checksum is equal to that saved by the compressor and returns Z_STREAM_END only if the checksum is correct. - inflate() will decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically. Any information - contained in the gzip header is not retained, so applications that need that - information should instead use raw inflate, see inflateInit2() below, or - inflateBack() and perform their own processing of the gzip header and - trailer. + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained, so applications that need that information should + instead use raw inflate, see inflateInit2() below, or inflateBack() and + perform their own processing of the gzip header and trailer. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has @@ -457,27 +486,28 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); preset dictionary is needed at this point, Z_DATA_ERROR if the input data was corrupted (input stream not conforming to the zlib format or incorrect check value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, + next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may then - call inflateSync() to look for a good compression block if a partial recovery - of the data is desired. + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is desired. */ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); /* All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. + This function discards any unprocessed input and does not flush any pending + output. inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a + was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). */ + /* Advanced functions */ /* @@ -492,55 +522,57 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, int memLevel, int strategy)); - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by the + caller. - The method parameter is the compression method. It must be Z_DEFLATED in + The method parameter is the compression method. It must be Z_DEFLATED in this version of the library. The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if deflateInit is used instead. - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data with no zlib header or trailer, and will not compute an adler32 check value. - windowBits can also be greater than 15 for optional gzip encoding. Add + windowBits can also be greater than 15 for optional gzip encoding. Add 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), - no header crc, and the operating system will be set to 255 (unknown). If a + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to 255 (unknown). If a gzip stream is being written, strm->adler is a crc32 instead of an adler32. The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. - The strategy parameter is used to tune the compression algorithm. Use the + The strategy parameter is used to tune the compression algorithm. Use the value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between - Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as - Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy - parameter only affects the compression ratio but not the correctness of the - compressed output even if it is not set appropriately. Z_FIXED prevents the - use of dynamic Huffman codes, allowing for a simpler decoder for special - applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate(). + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). */ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, @@ -548,37 +580,37 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, uInt dictLength)); /* Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit, deflateInit2 or deflateReset, before any - call of deflate. The compressor and decompressor must use exactly the same + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any call + of deflate. The compressor and decompressor must use exactly the same dictionary (see inflateSetDictionary). The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a + used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. Depending on the size of the compression data structures selected by deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front. In addition, the - current implementation of deflate will use at most the window size minus - 262 bytes of the provided dictionary. + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. Upon return of this function, strm->adler is set to the adler32 value of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value + which dictionary has been used by the compressor. (The adler32 value applies to the whole dictionary even if only a subset of the dictionary is actually used by the compressor.) If a raw deflate was requested, then the adler32 value is not computed and strm->adler is not set. deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not + or if the compression method is bsort). deflateSetDictionary does not perform any compression: this will be done by deflate(). */ @@ -589,26 +621,26 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, This function can be useful when several compression strategies will be tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed + data with a filter. The streams that will be discarded should then be freed by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory. + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and + (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); /* This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2. + but does not free and reallocate all the internal compression state. The + stream will keep the same compression level and any other attributes that + may have been set by deflateInit2. - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). */ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, @@ -618,18 +650,18 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2. This can be used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate(). + to switch to a different kind of input data requiring a different strategy. + If the compression level is changed, the input available so far is + compressed with the old level (and may be flushed); the new level will take + effect only at the next call of deflate(). Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm->avail_out must be non-zero. + a call of deflate(), since the currently available input may have to be + compressed and flushed. In particular, strm->avail_out must be non-zero. deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero. + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if + strm->avail_out was zero. */ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, @@ -653,9 +685,10 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, uLong sourceLen)); /* deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() - or deflateInit2(). This would be used to allocate an output buffer - for deflation in a single pass, and so would be called before deflate(). + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). */ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, @@ -663,21 +696,21 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, int value)); /* deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the - bits leftover from a previous deflate stream when appending to it. As such, - this function can only be used for raw deflate, and must be used before the - first deflate() call after a deflateInit2() or deflateReset(). bits must be - less than or equal to 16, and that many of the least significant bits of - value will be inserted in the output. - - deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. + + deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gz_headerp head)); /* - deflateSetHeader() provides gzip header information for when a gzip + deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called after deflateInit2() or deflateReset() and before the first call of deflate(). The text, time, os, extra field, name, and comment information @@ -690,11 +723,11 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, 1.3.x) do not support header crc's, and will report that it is a "multi-part gzip file" and give up. - If deflateSetHeader is not used, the default gzip header has text false, + If deflateSetHeader is not used, the default gzip header has text false, the time set to zero, and os set to 255, with no extra, name, or comment fields. The gzip header is returned to the default state by deflateReset(). - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ @@ -702,43 +735,50 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, int windowBits)); - This is another version of inflateInit with an extra parameter. The + This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by the caller. The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window + deflateInit2() was not used. If a compressed stream with a larger window size is given as input, inflate() will return with the error code Z_DATA_ERROR instead of trying to allocate a larger window. - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This + looking for any check values for comparison at the end of the stream. This is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom + such as zip. Those formats provide their own check values. If a custom format is developed using the raw deflate format for compressed data, it is recommended that a check value such as an adler32 or a crc32 be applied to the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments + most applications, the zlib format should be used as is. Note that comments above on the use in deflateInit2() applies to the magnitude of windowBits. - windowBits can also be greater than 15 for optional gzip decoding. Add + windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is - a crc32 instead of an adler32. + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + crc32 instead of an adler32. inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg - is set to null if there is no error message. inflateInit2 does not perform - any decompression apart from reading the zlib header if present: this will - be done by inflate(). (So next_in and avail_in may be modified, but next_out - and avail_out are unchanged.) + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. */ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, @@ -746,8 +786,8 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, uInt dictLength)); /* Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor can be determined from the adler32 value returned by that call of inflate. The compressor and decompressor must use exactly the same dictionary (see deflateSetDictionary). For raw inflate, this function can be called @@ -756,26 +796,26 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, dictionary that was used for compression is provided. inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not + expected one (incorrect adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of inflate(). */ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); /* - Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data. + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been + found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the + success case, the application may save the current current value of total_in + which indicates where valid compressed data was found. In the error case, + the application may repeatedly call inflateSync, providing more input each + time, until success or end of the input data. */ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, @@ -790,18 +830,30 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and + (such as zalloc being Z_NULL). msg is left unchanged in both source and destination. */ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); /* This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. + but does not free and reallocate all the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, + int windowBits)); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. */ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, @@ -809,54 +861,87 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, int value)); /* This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ +ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above or -1 << 16 if the provided + source stream state was inconsistent. +*/ + ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, gz_headerp head)); /* - inflateGetHeader() requests that gzip header information be stored in the + inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after inflateInit2() or inflateReset(), and before the first call of inflate(). As inflate() processes the gzip stream, head->done is zero until the header is completed, at which time head->done is set to one. If a zlib stream is being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK can be used to - force inflate() to return immediately after header processing is complete - and before any actual data is decompressed. + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. - The text, time, xflags, and os fields are filled in with the gzip header + The text, time, xflags, and os fields are filled in with the gzip header contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max + was valid if done is set to one.) If extra is not Z_NULL, then extra_max contains the maximum number of bytes to write to extra. Once done is true, extra_len contains the actual extra field length, and extra contains the extra field, or that field truncated if extra_max is less than extra_len. If name is not Z_NULL, then up to name_max characters are written there, terminated with a zero unless the length is greater than name_max. If comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When - any of extra, name, or comment are not Z_NULL and the respective field is - not present in the header, then that field is set to Z_NULL to signal its + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its absence. This allows the use of deflateSetHeader() with the returned structure to duplicate the header. However if those fields are set to allocated memory, then the application will need to save those pointers elsewhere so that they can be eventually freed. - If inflateGetHeader is not used, then the header information is simply + If inflateGetHeader is not used, then the header information is simply discarded. The header is always checked for validity, including the header CRC if present. inflateReset() will reset the process to discard the header information. The application would need to call inflateGetHeader() again to retrieve the header from the next gzip stream. - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ @@ -877,9 +962,9 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, See inflateBack() for the usage of these routines. inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the paramaters are invalid, Z_MEM_ERROR if the internal state could not - be allocated, or Z_VERSION_ERROR if the version of the library does not - match the version of the header file. + the paramaters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. */ typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); @@ -899,15 +984,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, inflateBackInit() must be called first to allocate the internal state and to initialize the state with the user-provided window buffer. inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free - the allocated state. + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. A raw deflate stream is one with no zlib or gzip header or trailer. This routine would normally be used in a utility that reads zip or gzip files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects - only the raw deflate stream to decompress. This is different from the - normal behavior of inflate(), which expects either a zlib or gzip header and + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the normal + behavior of inflate(), which expects either a zlib or gzip header and trailer around the deflate stream. inflateBack() uses two subroutines supplied by the caller that are then @@ -933,7 +1018,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. The in_desc and out_desc parameters of inflateBack() is passed as the first parameter of in() and out() respectively when they are called. These @@ -943,15 +1028,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, On return, inflateBack() will set strm->next_in and strm->avail_in to pass back any unused input that was provided by the last in() call. The return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format - error in the deflate stream (in which case strm->msg is set to indicate the - nature of the error), or Z_STREAM_ERROR if the stream was not properly - initialized. In the case of Z_BUF_ERROR, an input or output error can be - distinguished using strm->next_in which will be Z_NULL only if in() returned - an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to - out() returning non-zero. (in() will always be called before out(), so - strm->next_in is assured to be defined if out() returns non-zero.) Note - that inflateBack() cannot return Z_OK. + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. */ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); @@ -1007,23 +1092,22 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); /* utility functions */ /* - The following utility functions are implemented on top of the - basic stream-oriented functions. To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. */ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least the value returned - by compressBound(sourceLen). Upon exit, destLen is the actual size of the + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to compress a whole file at once if the - input file is mmap'ed. + compress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer. @@ -1033,11 +1117,11 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level)); /* - Compresses the source buffer into the destination buffer. The level + Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the + length of the source buffer. Upon entry, destLen is the total size of the destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressBound(sourceLen). Upon exit, destLen is the actual size of the compressed buffer. compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough @@ -1048,22 +1132,20 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); /* compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before - a compress() or compress2() call to allocate the destination buffer. + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. */ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)); /* Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed buffer. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output @@ -1071,136 +1153,199 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, */ -typedef voidp gzFile; + /* gzip file access functions */ -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); /* - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h", or 'R' for run-length encoding - as in "wb1R". (See the description of deflateInit2 for more information - about the strategy parameter.) + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef voidp gzFile; /* opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + + Opens a gzip (.gz) file for reading or writing. The mode parameter is as + in fopen ("rb" or "wb") but can also include a compression level ("wb9") or + a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only + compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F' + for fixed code compression as in "wb9F". (See the description of + deflateInit2 for more information about the strategy parameter.) Also "a" + can be used instead of "w" to request that the gzip stream that will be + written be appended to the file. "+" will result in an error, since reading + and writing to the same gzip file is not supported. gzopen can be used to read a file which is not in gzip format; in this case gzread will directly read from the file without decompression. - gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). */ + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + gzdopen associates a gzFile with the file descriptor fd. File descriptors + are obtained from calls like open, dup, creat, pipe or fileno (if the file + has been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); /* - gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. - The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). - gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. + Set the internal buffer size used by this library's functions. The + default buffer size is 8192 bytes. This function must be called after + gzopen() or gzdopen(), and before any other calls that read or write the + file. The buffer memory allocation is always deferred to the first read or + write. Two buffers are allocated, either both of the specified size when + writing, or one of the specified size and the other twice that size when + reading. A larger buffer size of, for example, 64K or 128K bytes will + noticeably increase the speed of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. */ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); /* - Dynamically update the compression level or strategy. See the description + Dynamically update the compression level or strategy. See the description of deflateInit2 for the meaning of these parameters. + gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not opened for writing. */ -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); /* - Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. - gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). */ + Reads the given number of uncompressed bytes from the compressed file. If + the input file was not in gzip format, gzread copies the given number of + bytes into the buffer. + + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream, or failing that, reading the rest + of the input file directly without decompression. The entire input file + will be read if gzread is called until it returns less than the requested + len. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. +*/ -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + voidpc buf, unsigned len)); /* Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). + gzwrite returns the number of uncompressed bytes written or 0 in case of + error. */ -ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); /* - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). The number of - uncompressed bytes written is limited to 4095. The caller should assure that - this limit is not exceeded. If it is exceeded, then gzprintf() will return - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf() - because the secure snprintf() or vsnprintf() functions were not available. + Converts, formats, and writes the arguments to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or 0 in case of error. The number of + uncompressed bytes written is limited to 8191, or one less than the buffer + size given to gzbuffer(). The caller should assure that this limit is not + exceeded. If it is exceeded, then gzprintf() will return an error (0) with + nothing written. In this case, there may also be a buffer overflow with + unpredictable consequences, which is possible only if zlib was compiled with + the insecure functions sprintf() or vsprintf() because the secure snprintf() + or vsnprintf() functions were not available. This can be determined using + zlibCompileFlags(). */ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); /* - Writes the given null-terminated string to the compressed file, excluding + Writes the given null-terminated string to the compressed file, excluding the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. + + gzputs returns the number of characters written, or -1 in case of error. */ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); /* - Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. - gzgets returns buf, or Z_NULL in case of error. + Reads bytes from the compressed file until len-1 characters are read, or a + newline character is read and transferred to buf, or an end-of-file + condition is encountered. If any characters are read or if len == 1, the + string is terminated with a null character. If no characters are read due + to an end-of-file or len < 1, then the buffer is left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. */ -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); /* - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. + Writes c, converted to an unsigned char, into the compressed file. gzputc + returns the value that was written, or -1 in case of error. */ -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); /* - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. + Reads one byte from the compressed file. gzgetc returns this byte or -1 + in case of end of file or error. */ -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); /* - Push one character back onto the stream to be read again later. - Only one character of push-back is allowed. gzungetc() returns the - character pushed, or -1 on failure. gzungetc() will fail if a - character has been pushed but not read yet, or if c is -1. The pushed - character will be discarded if the stream is repositioned with gzseek() - or gzrewind(). + Push one character back onto the stream to be read as the first character + on the next read. At least one character of push-back is allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). */ -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); /* - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. - gzflush should be called only when strictly necessary because it can - degrade compression. + Flushes all pending output into the compressed file. The parameter flush + is as in the deflate() function. The return value is the zlib error number + (see function gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatented gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. */ -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); /* - Sets the starting position for the next gzread or gzwrite on the - given compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + + Sets the starting position for the next gzread or gzwrite on the given + compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are + extremely slow. If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position. - gzseek returns the resulting offset location as measured in bytes from + gzseek returns the resulting offset location as measured in bytes from the beginning of the uncompressed stream, or -1 in case of error, in particular if the file is opened for writing and the new starting position would be before the current position. @@ -1210,68 +1355,127 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); /* Rewinds the given file. This function is supported only for reading. - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) */ +/* ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); + + Returns the starting position for the next gzread or gzwrite on the given + compressed file. This position represents a number of bytes in the + uncompressed data stream, and is zero when starting, even if appending or + reading a gzip stream from the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + /* - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) + Returns the current offset in the file being read or written. This offset + includes the count of bytes that precede the gzip stream, for example when + appending or when using gzdopen() for reading. When reading, the offset + does not include as yet unused buffered input. This information can be used + for a progress indicator. On error, gzoffset() returns -1. */ ZEXTERN int ZEXPORT gzeof OF((gzFile file)); /* - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. + Returns true (1) if the end-of-file indicator has been set while reading, + false (0) otherwise. Note that the end-of-file indicator is set only if the + read tried to go past the end of the input, but came up short. Therefore, + just like feof(), gzeof() may return false even if there is no more data to + read, in the event that the last read request was for the exact number of + bytes remaining in the input file. This will happen if the input file size + is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. */ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); /* - Returns 1 if file is being read directly without decompression, otherwise - zero. + Returns true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. This state can change from + false to true while reading the input file if the end of a gzip stream is + reached, but is followed by data that is not another gzip stream. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). */ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); /* - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). + Flushes all pending output if necessary, closes the compressed file and + deallocates the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. */ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); /* - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. + Returns the error message for the last error which occurred on the given + compressed file. errnum is set to zlib error number. If an error occurred + in the file system and not in the compression library, errnum is set to + Z_ERRNO and the application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. */ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); /* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip + Clears the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip file that is being written concurrently. */ + /* checksum functions */ /* These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. + anyway because they might be useful in applications using the compression + library. */ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: + return the updated checksum. If buf is Z_NULL, this function returns the + required initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. + + Usage example: uLong adler = adler32(0L, Z_NULL, 0); @@ -1281,9 +1485,10 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ +/* ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, z_off_t len2)); -/* + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of @@ -1293,9 +1498,11 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); /* Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is NULL, this function returns the required initial - value for the for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. + updated CRC-32. If buf is Z_NULL, this function returns the required + initial value for the for the crc. Pre- and post-conditioning (one's + complement) is performed within this function so it shouldn't be done by the + application. + Usage example: uLong crc = crc32(0L, Z_NULL, 0); @@ -1306,9 +1513,9 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ +/* ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); -/* Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 @@ -1347,16 +1554,49 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) #define inflateBackInit(strm, windowBits, window) \ inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, sizeof(z_stream)) + ZLIB_VERSION, sizeof(z_stream)) + +#ifdef _LARGEFILE64_SOURCE + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); + ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); +#endif +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# ifndef _LARGEFILE64_SOURCE + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); + ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); +#endif #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) struct internal_state {int dummy;}; /* hack for buggy compilers */ #endif ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); #ifdef __cplusplus } diff --git a/compat/zlib/zlib.map b/compat/zlib/zlib.map new file mode 100644 index 0000000..f282d36 --- /dev/null +++ b/compat/zlib/zlib.map @@ -0,0 +1,68 @@ +ZLIB_1.2.0 { + global: + compressBound; + deflateBound; + inflateBack; + inflateBackEnd; + inflateBackInit_; + inflateCopy; + local: + deflate_copyright; + inflate_copyright; + inflate_fast; + inflate_table; + zcalloc; + zcfree; + z_errmsg; + gz_error; + gz_intmax; + _*; +}; + +ZLIB_1.2.0.2 { + gzclearerr; + gzungetc; + zlibCompileFlags; +} ZLIB_1.2.0; + +ZLIB_1.2.0.8 { + deflatePrime; +} ZLIB_1.2.0.2; + +ZLIB_1.2.2 { + adler32_combine; + crc32_combine; + deflateSetHeader; + inflateGetHeader; +} ZLIB_1.2.0.8; + +ZLIB_1.2.2.3 { + deflateTune; + gzdirect; +} ZLIB_1.2.2; + +ZLIB_1.2.2.4 { + inflatePrime; +} ZLIB_1.2.2.3; + +ZLIB_1.2.3.3 { + adler32_combine64; + crc32_combine64; + gzopen64; + gzseek64; + gztell64; + inflateUndermine; +} ZLIB_1.2.2.4; + +ZLIB_1.2.3.4 { + inflateReset2; + inflateMark; +} ZLIB_1.2.3.3; + +ZLIB_1.2.3.5 { + gzbuffer; + gzoffset; + gzoffset64; + gzclose_r; + gzclose_w; +} ZLIB_1.2.3.4; diff --git a/compat/zlib/zlib.pc.in b/compat/zlib/zlib.pc.in new file mode 100644 index 0000000..b4f98e5 --- /dev/null +++ b/compat/zlib/zlib.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: zlib +Description: zlib compression library +Version: @VERSION@ + +Requires: +Libs: -L${libdir} -lz +Cflags: -I${includedir} diff --git a/compat/zlib/zlib2ansi b/compat/zlib/zlib2ansi new file mode 100644 index 0000000..15e3e16 --- /dev/null +++ b/compat/zlib/zlib2ansi @@ -0,0 +1,152 @@ +#!/usr/bin/perl + +# Transform K&R C function definitions into ANSI equivalent. +# +# Author: Paul Marquess +# Version: 1.0 +# Date: 3 October 2006 + +# TODO +# +# Asumes no function pointer parameters. unless they are typedefed. +# Assumes no literal strings that look like function definitions +# Assumes functions start at the beginning of a line + +use strict; +use warnings; + +local $/; +$_ = <>; + +my $sp = qr{ \s* (?: /\* .*? \*/ )? \s* }x; # assume no nested comments + +my $d1 = qr{ $sp (?: [\w\*\s]+ $sp)* $sp \w+ $sp [\[\]\s]* $sp }x ; +my $decl = qr{ $sp (?: \w+ $sp )+ $d1 }xo ; +my $dList = qr{ $sp $decl (?: $sp , $d1 )* $sp ; $sp }xo ; + + +while (s/^ + ( # Start $1 + ( # Start $2 + .*? # Minimal eat content + ( ^ \w [\w\s\*]+ ) # $3 -- function name + \s* # optional whitespace + ) # $2 - Matched up to before parameter list + + \( \s* # Literal "(" + optional whitespace + ( [^\)]+ ) # $4 - one or more anythings except ")" + \s* \) # optional whitespace surrounding a Literal ")" + + ( (?: $dList )+ ) # $5 + + $sp ^ { # literal "{" at start of line + ) # Remember to $1 + //xsom + ) +{ + my $all = $1 ; + my $prefix = $2; + my $param_list = $4 ; + my $params = $5; + + StripComments($params); + StripComments($param_list); + $param_list =~ s/^\s+//; + $param_list =~ s/\s+$//; + + my $i = 0 ; + my %pList = map { $_ => $i++ } + split /\s*,\s*/, $param_list; + my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ; + + my @params = split /\s*;\s*/, $params; + my @outParams = (); + foreach my $p (@params) + { + if ($p =~ /,/) + { + my @bits = split /\s*,\s*/, $p; + my $first = shift @bits; + $first =~ s/^\s*//; + push @outParams, $first; + $first =~ /^(\w+\s*)/; + my $type = $1 ; + push @outParams, map { $type . $_ } @bits; + } + else + { + $p =~ s/^\s+//; + push @outParams, $p; + } + } + + + my %tmp = map { /$pMatch/; $_ => $pList{$1} } + @outParams ; + + @outParams = map { " $_" } + sort { $tmp{$a} <=> $tmp{$b} } + @outParams ; + + print $prefix ; + print "(\n" . join(",\n", @outParams) . ")\n"; + print "{" ; + +} + +# Output any trailing code. +print ; +exit 0; + + +sub StripComments +{ + + no warnings; + + # Strip C & C++ coments + # From the perlfaq + $_[0] =~ + + s{ + /\* ## Start of /* ... */ comment + [^*]*\*+ ## Non-* followed by 1-or-more *'s + ( + [^/*][^*]*\*+ + )* ## 0-or-more things which don't start with / + ## but do end with '*' + / ## End of /* ... */ comment + + | ## OR C++ Comment + // ## Start of C++ comment // + [^\n]* ## followed by 0-or-more non end of line characters + + | ## OR various things which aren't comments: + + ( + " ## Start of " ... " string + ( + \\. ## Escaped char + | ## OR + [^"\\] ## Non "\ + )* + " ## End of " ... " string + + | ## OR + + ' ## Start of ' ... ' string + ( + \\. ## Escaped char + | ## OR + [^'\\] ## Non '\ + )* + ' ## End of ' ... ' string + + | ## OR + + . ## Anything other char + [^/"'\\]* ## Chars which doesn't start a comment, string or escape + ) + }{$2}gxs; + +} diff --git a/compat/zlib/zutil.c b/compat/zlib/zutil.c index e97d051..f46f523 100644 --- a/compat/zlib/zutil.c +++ b/compat/zlib/zutil.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zutil.c,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: zutil.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ #include "zutil.h" @@ -34,25 +34,25 @@ uLong ZEXPORT zlibCompileFlags() uLong flags; flags = 0; - switch (sizeof(uInt)) { + switch ((int)(sizeof(uInt))) { case 2: break; case 4: flags += 1; break; case 8: flags += 2; break; default: flags += 3; } - switch (sizeof(uLong)) { + switch ((int)(sizeof(uLong))) { case 2: break; case 4: flags += 1 << 2; break; case 8: flags += 2 << 2; break; default: flags += 3 << 2; } - switch (sizeof(voidpf)) { + switch ((int)(sizeof(voidpf))) { case 2: break; case 4: flags += 1 << 4; break; case 8: flags += 2 << 4; break; default: flags += 3 << 4; } - switch (sizeof(z_off_t)) { + switch ((int)(sizeof(z_off_t))) { case 2: break; case 4: flags += 1 << 6; break; case 8: flags += 2 << 6; break; diff --git a/compat/zlib/zutil.h b/compat/zlib/zutil.h index fa42524..2450ae7 100644 --- a/compat/zlib/zutil.h +++ b/compat/zlib/zutil.h @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,7 +8,7 @@ subject to change. Applications should only use zlib.h. */ -/* @(#) $Id: zutil.h,v 1.1 2008/12/18 14:14:59 dkf Exp $ */ +/* @(#) $Id: zutil.h,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ #ifndef ZUTIL_H #define ZUTIL_H @@ -17,26 +17,24 @@ #include "zlib.h" #ifdef STDC -# ifndef _WIN32_WCE +# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) # include # endif # include # include #endif -#ifdef NO_ERRNO_H -# ifdef _WIN32_WCE - /* The Microsoft C Run-Time Library for Windows CE doesn't have - * errno. We define it as a global variable to simplify porting. - * Its value is always 0 and should not be used. We rename it to - * avoid conflict with other libraries that use the same workaround. - */ -# define errno z_errno -# endif - extern int errno; + +#if defined(UNDER_CE) && defined(NO_ERRNO_H) +# define zseterrno(ERR) SetLastError((DWORD)(ERR)) +# define zerrno() ((int)GetLastError()) #else -# ifndef _WIN32_WCE +# ifdef NO_ERRNO_H + extern int errno; +# else # include # endif +# define zseterrno(ERR) do { errno = (ERR); } while (0) +# define zerrno() errno #endif #ifndef local @@ -89,7 +87,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) # define OS_CODE 0x00 # if defined(__TURBOC__) || defined(__BORLANDC__) -# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) +# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) /* Allow compilation with ANSI keywords only enabled */ void _Cdecl farfree( void *block ); void *_Cdecl farmalloc( unsigned long nbytes ); @@ -118,7 +116,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #ifdef OS2 # define OS_CODE 0x06 # ifdef M_I86 - #include +# include # endif #endif @@ -151,7 +149,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define fdopen(fd,mode) NULL /* No fdopen() */ #endif -#if (defined(_MSC_VER) && (_MSC_VER > 600)) +#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX # if defined(_WIN32_WCE) # define fdopen(fd,mode) NULL /* No fdopen() */ # ifndef _PTRDIFF_T_DEFINED @@ -163,6 +161,18 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # endif #endif +#if defined(__BORLANDC__) + #pragma warn -8004 + #pragma warn -8008 + #pragma warn -8066 +#endif + +#ifdef _LARGEFILE64_SOURCE +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + /* common defaults */ #ifndef OS_CODE @@ -173,6 +183,12 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define F_OPEN(name, mode) fopen((name), (mode)) #endif +#ifdef _LARGEFILE64_SOURCE +# define F_OPEN64(name, mode) fopen64((name), (mode)) +#else +# define F_OPEN64(name, mode) fopen((name), (mode)) +#endif + /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) @@ -197,7 +213,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # ifdef WIN32 /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ # if !defined(vsnprintf) && !defined(NO_vsnprintf) -# define vsnprintf _vsnprintf +# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) +# define vsnprintf _vsnprintf +# endif # endif # endif # ifdef __SASC diff --git a/unix/Makefile.in b/unix/Makefile.in index b58f138..446ce1c 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.294 2010/03/04 22:29:06 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.295 2010/03/16 09:01:38 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -348,7 +348,7 @@ MAC_OSX_OBJS = tclMacOSXBundle.o tclMacOSXFCmd.o tclMacOSXNotify.o DTRACE_OBJ = tclDTrace.o -ZLIB_OBJS = Zadler32.o Zcompress.o Zcrc32.o Zdeflate.o Zgzio.o Zinfback.o \ +ZLIB_OBJS = Zadler32.o Zcompress.o Zcrc32.o Zdeflate.o Zinfback.o \ Zinffast.o Zinflate.o Zinftrees.o Ztrees.o Zuncompr.o Zzutil.o TCL_OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} \ @@ -1603,8 +1603,6 @@ Zcrc32.o: $(ZLIB_DIR)/crc32.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/crc32.c Zdeflate.o: $(ZLIB_DIR)/deflate.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/deflate.c -Zgzio.o: $(ZLIB_DIR)/gzio.c - $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/gzio.c Zinfback.o: $(ZLIB_DIR)/infback.c $(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/infback.c Zinffast.o: $(ZLIB_DIR)/inffast.c diff --git a/win/makefile.vc b/win/makefile.vc index 511abaf..4a7602b 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.209 2010/03/12 15:18:42 nijtmans Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.210 2010/03/16 09:01:37 nijtmans Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -335,7 +335,6 @@ ZLIBOBJS = \ $(TMP_DIR)\compress.obj \ $(TMP_DIR)\crc32.obj \ $(TMP_DIR)\deflate.obj \ - $(TMP_DIR)\gzio.obj \ $(TMP_DIR)\infback.obj \ $(TMP_DIR)\inffast.obj \ $(TMP_DIR)\inflate.obj \ -- cgit v0.12 From 0cf955ab149d4c4221bdafaaab80d53352ac4446 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 16 Mar 2010 16:18:35 +0000 Subject: don't cast away "const" without reason. --- ChangeLog | 1 + win/tclWinChan.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c86d6f4..c3b44bf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * compat/zlib/* Upgrade zlib to version 1.2.4 * win/makefile.vc * unix/Makefile.in + * win/tclWinChan.c don't cast away "const" without reason. 2010-03-12 Jan Nijtmans diff --git a/win/tclWinChan.c b/win/tclWinChan.c index c2bddb9..6ab056d 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.55 2010/01/10 22:58:39 nijtmans Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.56 2010/03/16 16:18:35 nijtmans Exp $ */ #include "tclWinInt.h" @@ -856,7 +856,7 @@ TclpOpenFileChannel( char channelName[16 + TCL_INTEGER_SPACE]; TclFile readFile = NULL, writeFile = NULL; - nativeName = (TCHAR *) Tcl_FSGetNativePath(pathPtr); + nativeName = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); if (nativeName == NULL) { return NULL; } -- cgit v0.12 From 5d7a1c17873ac12e80410c4cf4fef6ace21565f6 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 17 Mar 2010 16:35:40 +0000 Subject: * generic/tclIORTrans.c (ReflectInput, ReflectOutput, ReflectSeekWide): [Bug 2921116]: Added missing TclEventuallyFree calls for preserved ReflectedTransform* structures. Reworked ReflectInput to preserve the structure for its whole life, not only in InvokeTclMethod. * generic/tclIO.c (Tcl_GetsObj): [Bug 2921116]: Regenerate topChan, may have been changed by a self-modifying transformation. * tests/ioTrans/test (iortrans-4.8, iortrans-4.9, iortrans-5.11, iortrans-7.4, iortrans-8.3): New test cases. --- ChangeLog | 14 ++++++++ generic/tclIO.c | 30 ++++++++++++++++- generic/tclIORTrans.c | 56 ++++++++++++++++++++----------- tests/ioTrans.test | 93 +++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 170 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3b44bf8..b260099 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-03-17 Andreas Kupries + + * generic/tclIORTrans.c (ReflectInput, ReflectOutput, + ReflectSeekWide): [Bug 2921116]: Added missing TclEventuallyFree + calls for preserved ReflectedTransform* structures. Reworked + ReflectInput to preserve the structure for its whole life, not + only in InvokeTclMethod. + + * generic/tclIO.c (Tcl_GetsObj): [Bug 2921116]: Regenerate + topChan, may have been changed by a self-modifying transformation. + + * tests/ioTrans/test (iortrans-4.8, iortrans-4.9, iortrans-5.11, + iortrans-7.4, iortrans-8.3): New test cases. + 2010-03-16 Jan Nijtmans * compat/zlib/* Upgrade zlib to version 1.2.4 diff --git a/generic/tclIO.c b/generic/tclIO.c index 7ed714c..bc94bb6 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.172 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.173 2010/03/17 16:35:42 andreas_kupries Exp $ */ #include "tclInt.h" @@ -4715,6 +4715,13 @@ Tcl_GetsObj( */ gotEOL: + /* + * Regenerate the top channel, in case it was changed due to + * self-modifying reflected transforms. + */ + + chanPtr = statePtr->topChanPtr; + bufPtr = gs.bufPtr; if (bufPtr == NULL) { Tcl_Panic("Tcl_GetsObj: gotEOL reached with bufPtr==NULL"); @@ -4743,6 +4750,13 @@ Tcl_GetsObj( */ restore: + /* + * Regenerate the top channel, in case it was changed due to + * self-modifying reflected transforms. + */ + + chanPtr = statePtr->topChanPtr; + bufPtr = statePtr->inQueueHead; if (bufPtr == NULL) { Tcl_Panic("Tcl_GetsObj: restore reached with bufPtr==NULL"); @@ -4778,6 +4792,13 @@ Tcl_GetsObj( */ done: + /* + * Regenerate the top channel, in case it was changed due to + * self-modifying reflected transforms. + */ + + chanPtr = statePtr->topChanPtr; + UpdateInterest(chanPtr); return copiedTotal; } @@ -5776,6 +5797,13 @@ DoReadChars( */ done: + /* + * Regenerate the top channel, in case it was changed due to + * self-modifying reflected transforms. + */ + + chanPtr = statePtr->topChanPtr; + UpdateInterest(chanPtr); return copied; } diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index eb40ce5..801f5fb 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.14 2010/03/05 22:50:32 dkf Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.15 2010/03/17 16:35:42 andreas_kupries Exp $ */ #include @@ -721,7 +721,7 @@ TclChanPushObjCmd( * structure. */ - FreeReflectedTransform(rtPtr); + Tcl_EventuallyFree (rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); return TCL_ERROR; #undef CHAN @@ -931,7 +931,7 @@ ReflectClose( } #endif - FreeReflectedTransform(rtPtr); + Tcl_EventuallyFree (rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); return EOK; } @@ -1030,7 +1030,7 @@ ReflectClose( } #endif - FreeReflectedTransform(rtPtr); + Tcl_EventuallyFree (rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); return (result == TCL_OK) ? EOK : EINVAL; } @@ -1072,8 +1072,9 @@ ReflectInput( return -1; } - gotBytes = 0; + Tcl_Preserve(rtPtr); + gotBytes = 0; while (toRead > 0) { /* * Loop until the request is satisfied (or no data available from @@ -1086,7 +1087,7 @@ ReflectInput( gotBytes += copied; if (toRead == 0) { - return gotBytes; + goto stop; } /* @@ -1109,10 +1110,10 @@ ReflectInput( int maxRead = -1; if (!TransformLimit(rtPtr, errorCodePtr, &maxRead)) { - return -1; + goto error; } if (maxRead == 0) { - return gotBytes; + goto stop; } else if (maxRead > 0) { if (maxRead < toRead) { toRead = maxRead; @@ -1121,7 +1122,7 @@ ReflectInput( } if (toRead <= 0) { - return gotBytes; + goto stop; } readBytes = Tcl_ReadRaw(rtPtr->parent, buf, toRead); @@ -1137,11 +1138,11 @@ ReflectInput( * we report that instead of the request to re-try. */ - return gotBytes; + goto stop; } *errorCodePtr = Tcl_GetErrno(); - return -1; + goto error; } if (readBytes == 0) { @@ -1162,16 +1163,16 @@ ReflectInput( if ((gotBytes == 0) && rtPtr->nonblocking) { *errorCodePtr = EWOULDBLOCK; - return -1; + goto error; } - return gotBytes; + goto stop; } else { /* * Eof in parent. */ if (rtPtr->readIsDrained) { - return gotBytes; + goto stop; } /* @@ -1181,7 +1182,7 @@ ReflectInput( if (HAS(rtPtr->methods, METH_DRAIN)) { if (!TransformDrain(rtPtr, errorCodePtr)) { - return -1; + goto error; } } @@ -1190,7 +1191,7 @@ ReflectInput( * The drain delivered nothing. */ - return gotBytes; + goto stop; } /* @@ -1209,11 +1210,17 @@ ReflectInput( */ if (!TransformRead(rtPtr, errorCodePtr, UCHARP(buf), readBytes)) { - return -1; + goto error; } } /* while toRead > 0 */ + stop: + Tcl_Release(rtPtr); return gotBytes; + + error: + gotBytes = -1; + goto stop; } /* @@ -1266,6 +1273,8 @@ ReflectOutput( * we do when explicitly seeking as well. */ + Tcl_Preserve(rtPtr); + if ((rtPtr->methods & FLAG(METH_CLEAR))) { TransformClear(rtPtr); } @@ -1277,10 +1286,12 @@ ReflectOutput( */ if (!TransformWrite(rtPtr, errorCodePtr, UCHARP(buf), toWrite)) { + Tcl_Release(rtPtr); return -1; } *errorCodePtr = EOK; + Tcl_Release(rtPtr); return toWrite; } @@ -1331,6 +1342,8 @@ ReflectSeekWide( * request down and the result back up unchanged. */ + Tcl_Preserve(rtPtr); + if (((seekMode != SEEK_CUR) || (offset != 0)) && (HAS(rtPtr->methods, METH_CLEAR) || HAS(rtPtr->methods, METH_FLUSH))) { @@ -1353,6 +1366,7 @@ ReflectSeekWide( if (HAS(rtPtr->methods, METH_FLUSH)) { if (!TransformFlush(rtPtr, errorCodePtr, FLUSH_DISCARD)) { + Tcl_Release(rtPtr); return -1; } } @@ -1382,6 +1396,7 @@ ReflectSeekWide( } *errorCodePtr = EOK; + Tcl_Release(rtPtr); return curPos; } @@ -1971,7 +1986,7 @@ InvokeTclMethod( */ sr = Tcl_SaveInterpState(rtPtr->interp, 0 /* Dummy */); - Tcl_Preserve(rtPtr->interp); + Tcl_Preserve(rtPtr); result = Tcl_EvalObjv(rtPtr->interp, cmdc, rtPtr->argv, TCL_EVAL_GLOBAL); /* @@ -2016,7 +2031,7 @@ InvokeTclMethod( Tcl_IncrRefCount(resObj); } Tcl_RestoreInterpState(rtPtr->interp, sr); - Tcl_Release(rtPtr->interp); + Tcl_Release(rtPtr); /* * Cleanup of the dynamic parts of the command. @@ -2531,7 +2546,8 @@ ForwardProc( rtmPtr = GetThreadReflectedTransformMap(); hPtr = Tcl_FindHashEntry(&rtmPtr->map, Tcl_GetString(rtPtr->handle)); Tcl_DeleteHashEntry(hPtr); - FreeReflectedTransform(rtPtr); + + Tcl_EventuallyFree (rtPtr, (Tcl_FreeProc *) FreeReflectedTransform); break; case ForwardedInput: { diff --git a/tests/ioTrans.test b/tests/ioTrans.test index d26789c..7399bfb 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ioTrans.test,v 1.7 2008/07/21 21:12:49 ferrieux Exp $ +# RCS: @(#) $Id: ioTrans.test,v 1.8 2010/03/17 16:35:42 andreas_kupries Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -41,6 +41,7 @@ set helperscript { } proc note {item} {global res; lappend res $item; return} + #proc note {item} {global res; lappend res $item; puts $item ; flush stdout ; return} proc track {} {upvar args item; note $item; return} proc notes {items} {foreach i $items {note $i}} @@ -452,7 +453,41 @@ test iortrans-4.7 {chan read, level is squashed} -match glob -body { set res } -result {{read rt* {test data }} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "read"*}} - +test iortrans-4.8 {chan read, read, bug 2921116} -match glob -setup { + set res {} + proc foo {fd args} { + oninit; onfinal; track + # Kill and recreate transform while it is operating + chan pop $fd + chan push $fd [list foo $fd] + } + set c [chan push [set c [tempchan]] [list foo $c]] +} -body { + note [read $c] + #note [gets $c] + set res +} -cleanup { + tempdone + rename foo {} +} -result {{read rt* {test data +}} file*} +test iortrans-4.9 {chan read, gets, bug 2921116} -match glob -setup { + set res {} + proc foo {fd args} { + oninit; onfinal; track + # Kill and recreate transform while it is operating + chan pop $fd + chan push $fd [list foo $fd] + } + set c [chan push [set c [tempchan]] [list foo $c]] +} -body { + note [gets $c] + set res +} -cleanup { + tempdone + rename foo {} +} -result {{read rt* {test data +}} file*} # --- === *** ########################### # method write (via puts) @@ -560,6 +595,28 @@ test iortrans-5.10 {chan write, failed write, level is ignored} -match glob -bod rename foo {} set res } -result {{write rt* snarfsnarfsnarf} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "write"*}} +test iortrans-5.11 {chan write, bug 2921116} -match glob -setup { + set res {} + set level 0 + proc foo {fd args} { + oninit; onfinal; track + # pop - invokes flush - invokes 'foo write' - infinite recursion - stop it + global level + if {$level} { return "" } + incr level + # Kill and recreate transform while it is operating + chan pop $fd + chan push $fd [list foo $fd] + } + set c [chan push [set c [tempchan]] [list foo $c]] +} -body { + note [puts -nonewline $c abcdef] + note [flush $c] + set res +} -cleanup { + tempdone + rename foo {} +} -result {{} {write rt* abcdef} {write rt* abcdef} {}} # --- === *** ########################### # method limit?, drain (via read) @@ -631,6 +688,22 @@ test iortrans-7.3 {clear, any result is ignored} -match glob -body { rename foo {} set res } -result {{clear rt*}} +test iortrans-7.4 {chan clear, bug 2921116} -match glob -setup { + set res {} + proc foo {fd args} { + oninit clear; onfinal; track + # Kill and recreate transform while it is operating + chan pop $fd + chan push $fd [list foo $fd] + } + set c [chan push [set c [tempchan]] [list foo $c]] +} -body { + seek $c 2 + set res +} -cleanup { + tempdone + rename foo {} +} -result {{clear rt*}} # --- === *** ########################### # method flush (via seek, close) @@ -666,6 +739,22 @@ test iortrans-8.2 {close flushes write buffers, writes data} -match glob -body { set res } -result {{flush rt*} {finalize rt*} .flushed.} +test iortrans-8.3 {chan flush, bug 2921116} -match glob -setup { + set res {} + proc foo {fd args} { + oninit flush; onfinal; track + # Kill and recreate transform while it is operating + chan pop $fd + chan push $fd [list foo $fd] + } + set c [chan push [set c [tempchan]] [list foo $c]] +} -body { + seek $c 2 + set res +} -cleanup { + tempdone + rename foo {} +} -result {{flush rt*}} # --- === *** ########################### # method watch - removed from TIP (rev 1.12+) -- cgit v0.12 From 29b735fa6d45d36e552be123a3704a9a84b60d97 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Mar 2010 10:59:45 +0000 Subject: [Bug 2971921]: Corrected jump so that it doesn't skip into the middle of an instruction! Tightened the instruction issuing. Moved endCatch calls closer to their point that they guard. --- ChangeLog | 75 +++++++++++++++++++++++++++---------------------- generic/tclCompCmdsSZ.c | 73 +++++++++++++++++++++++++---------------------- tests/error.test | 24 +++++++++++++++- 3 files changed, 105 insertions(+), 67 deletions(-) diff --git a/ChangeLog b/ChangeLog index b260099..fc4cc6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,43 +1,50 @@ +2010-03-18 Donal K. Fellows + + * generic/tclCompCmdsSZ.c (IssueTryFinallyInstructions): + [Bug 2971921]: Corrected jump so that it doesn't skip into the middle + of an instruction! Tightened the instruction issuing. Moved endCatch + calls closer to their point that they guard. + 2010-03-17 Andreas Kupries - * generic/tclIORTrans.c (ReflectInput, ReflectOutput, - ReflectSeekWide): [Bug 2921116]: Added missing TclEventuallyFree + * generic/tclIORTrans.c (ReflectInput, ReflectOutput) + (ReflectSeekWide): [Bug 2921116]: Added missing TclEventuallyFree calls for preserved ReflectedTransform* structures. Reworked - ReflectInput to preserve the structure for its whole life, not - only in InvokeTclMethod. + ReflectInput to preserve the structure for its whole life, not only in + InvokeTclMethod. - * generic/tclIO.c (Tcl_GetsObj): [Bug 2921116]: Regenerate - topChan, may have been changed by a self-modifying transformation. + * generic/tclIO.c (Tcl_GetsObj): [Bug 2921116]: Regenerate topChan, + may have been changed by a self-modifying transformation. - * tests/ioTrans/test (iortrans-4.8, iortrans-4.9, iortrans-5.11, - iortrans-7.4, iortrans-8.3): New test cases. + * tests/ioTrans/test (iortrans-4.8, iortrans-4.9, iortrans-5.11) + (iortrans-7.4, iortrans-8.3): New test cases. 2010-03-16 Jan Nijtmans - * compat/zlib/* Upgrade zlib to version 1.2.4 - * win/makefile.vc - * unix/Makefile.in - * win/tclWinChan.c don't cast away "const" without reason. + * compat/zlib/*: Upgrade zlib to version 1.2.4. + * win/makefile.vc: + * unix/Makefile.in: + * win/tclWinChan.c: Don't cast away "const" without reason. 2010-03-12 Jan Nijtmans - * win/makefile.vc Fix [Bug 2967340]: Static build failure - * win/.cvsignore + * win/makefile.vc: [Bug 2967340]: Static build was failing. + * win/.cvsignore: 2010-03-10 Jan Nijtmans - * generic/tclTest.c Remove unnecessary '&' decoration for function - * generic/tclIOUtil.c pointers - * win/tclWin32Dll.c Double declaration of TclNativeDupInternalRep - * unix/tclIOUtil.c - * unix/dltest/.cvsignore Ignore *.so here + * generic/tclTest.c: Remove unnecessary '&' decoration for + * generic/tclIOUtil.c: function pointers + * win/tclWin32Dll.c: Double declaration of TclNativeDupInternalRep + * unix/tclIOUtil.c: + * unix/dltest/.cvsignore: Ignore *.so here 2010-03-09 Andreas Kupries * generic/tclIORChan.c: [Bug 2936225]: Thanks to Alexandre Ferrieux - * doc/refchan.n: for debugging and fixing - * tests/ioCmd.test: the problem. It is the write-side equivalent - to the bug fixed 2009-08-06. + * doc/refchan.n: for debugging and + * tests/ioCmd.test: fixing the problem. It is the write-side + equivalent to the bug fixed 2009-08-06. 2010-03-09 Don Porter @@ -55,20 +62,22 @@ 2010-03-07 Jan Nijtmans - * generic/tclTest.c test that tclOO stubs are present in stub library - * generic/tclOOMethod.c Applied missing part of [Patch 2961556] - * win/tclWinInt.h Change all tclWinProcs signatures to use - * win/tclWin32Dll.c TCHAR* in stead of WCHAR*. This is meant - * win/tclWinDde.c as preparation to make [Enh 2965056] - * win/tclWinFCmd.c possible at all. - * win/tclWinFile.c - * win/tclWinPipe.c - * win/tclWinSock.c + * generic/tclTest.c: Test that tclOO stubs are present in stub + library + * generic/tclOOMethod.c: Applied missing part of [Patch 2961556] + * win/tclWinInt.h: Change all tclWinProcs signatures to use + * win/tclWin32Dll.c: TCHAR* in stead of WCHAR*. This is meant + * win/tclWinDde.c: as preparation to make [Enh 2965056] + * win/tclWinFCmd.c: possible at all. + * win/tclWinFile.c: + * win/tclWinPipe.c: + * win/tclWinSock.c: 2010-03-06 Jan Nijtmans - * generic/tclStubLib.c remove presence of tclTomMathStubsPtr here - * generic/tclTest.c test that tommath stubs are present in stub library + * generic/tclStubLib.c: Remove presence of tclTomMathStubsPtr here. + * generic/tclTest.c: Test that tommath stubs are present in stub + library. 2010-03-05 Donal K. Fellows diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index fb34f66..b55367c 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.2 2010/03/05 14:34:03 dkf Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.3 2010/03/18 10:59:48 dkf Exp $ */ #include "tclInt.h" @@ -145,6 +145,10 @@ const AuxDataType tclJumptableInfoType = { (var) = CurrentOffset(envPtr);TclEmitInstInt4(INST_##name,0,envPtr) #define FIXJUMP(var) \ TclStoreInt4AtPtr(CurrentOffset(envPtr)-(var),envPtr->codeStart+(var)+1) +#define LOAD(idx) \ + if ((idx)<256) {OP1(LOAD_SCALAR1,(idx));} else {OP4(LOAD_SCALAR4,(idx));} +#define STORE(idx) \ + if ((idx)<256) {OP1(STORE_SCALAR1,(idx));} else {OP4(STORE_SCALAR4,(idx));} /* *---------------------------------------------------------------------- @@ -2072,16 +2076,17 @@ IssueTryInstructions( ExceptionRangeStarts(envPtr, range); BODY( bodyToken, 1); ExceptionRangeEnds(envPtr, range); - OP1( JUMP1, 3); + PUSH( "0"); + OP1( JUMP1, 4); ExceptionRangeTarget(envPtr, range, catchOffset); + OP( PUSH_RETURN_CODE); OP( PUSH_RESULT); - OP4( STORE_SCALAR4, resultVar); - OP( POP); OP( PUSH_RETURN_OPTIONS); - OP4( STORE_SCALAR4, optionsVar); - OP( POP); - OP( PUSH_RETURN_CODE); OP( END_CATCH); + STORE( optionsVar); + OP( POP); + STORE( resultVar); + OP( POP); /* * Now we handle all the registered 'on' and 'trap' handlers in order. @@ -2106,7 +2111,7 @@ IssueTryInstructions( * Match the errorcode according to try/trap rules. */ - OP4( LOAD_SCALAR4, optionsVar); + LOAD( optionsVar); PUSH( "-errorcode"); OP4( DICT_GET, 1); OP44( LIST_RANGE_IMM, 0, len-1); @@ -2125,12 +2130,12 @@ IssueTryInstructions( */ if (resultVars[i] >= 0) { - OP4( LOAD_SCALAR4, resultVar); - OP4( STORE_SCALAR4, resultVars[i]); + LOAD( resultVar); + STORE( resultVars[i]); OP( POP); if (optionVars[i] >= 0) { - OP4( LOAD_SCALAR4, optionsVar); - OP4( STORE_SCALAR4, optionVars[i]); + LOAD( optionsVar); + STORE( optionVars[i]); OP( POP); } } @@ -2166,8 +2171,8 @@ IssueTryInstructions( */ OP( POP); - OP4( LOAD_SCALAR4, optionsVar); - OP4( LOAD_SCALAR4, resultVar); + LOAD( optionsVar); + LOAD( resultVar); OP( RETURN_STK); /* @@ -2218,16 +2223,17 @@ IssueTryFinallyInstructions( ExceptionRangeStarts(envPtr, range); BODY( bodyToken, 1); ExceptionRangeEnds(envPtr, range); - OP1( JUMP1, 3); + PUSH( "0"); + OP1( JUMP1, 4); ExceptionRangeTarget(envPtr, range, catchOffset); + OP( PUSH_RETURN_CODE); OP( PUSH_RESULT); - OP4( STORE_SCALAR4, resultVar); - OP( POP); OP( PUSH_RETURN_OPTIONS); - OP4( STORE_SCALAR4, optionsVar); - OP( POP); - OP( PUSH_RETURN_CODE); OP( END_CATCH); + STORE( optionsVar); + OP( POP); + STORE( resultVar); + OP( POP); envPtr->currStackDepth = savedStackDepth + 1; /* @@ -2255,7 +2261,7 @@ IssueTryFinallyInstructions( * Match the errorcode according to try/trap rules. */ - OP4( LOAD_SCALAR4, optionsVar); + LOAD( optionsVar); PUSH( "-errorcode"); OP4( DICT_GET, 1); OP44( LIST_RANGE_IMM, 0, len-1); @@ -2279,12 +2285,12 @@ IssueTryFinallyInstructions( ExceptionRangeStarts(envPtr, range); } if (resultVars[i] >= 0) { - OP4( LOAD_SCALAR4, resultVar); - OP4( STORE_SCALAR4, resultVars[i]); + LOAD( resultVar); + STORE( resultVars[i]); OP( POP); if (optionVars[i] >= 0) { - OP4( LOAD_SCALAR4, optionsVar); - OP4( STORE_SCALAR4, optionVars[i]); + LOAD( optionsVar); + STORE( optionVars[i]); OP( POP); } } @@ -2321,8 +2327,9 @@ IssueTryFinallyInstructions( } BODY( handlerTokens[i], 5+i*4); ExceptionRangeEnds(envPtr, range); - OP( POP); - OP1( JUMP1, 6); + OP( PUSH_RETURN_OPTIONS); + OP4( REVERSE, 2); + OP1( JUMP1, 4); forwardsToFix[i] = -1; /* @@ -2334,13 +2341,13 @@ IssueTryFinallyInstructions( finishTrapCatchHandling: ExceptionRangeTarget(envPtr, range, catchOffset); + OP( PUSH_RETURN_OPTIONS); OP( PUSH_RESULT); - OP4( STORE_SCALAR4, resultVar); + OP( END_CATCH); + STORE( resultVar); OP( POP); - OP( PUSH_RETURN_OPTIONS); - OP4( STORE_SCALAR4, optionsVar); + STORE( optionsVar); OP( POP); - OP( END_CATCH); } if (i+1 < numHandlers) { JUMP(addrsToFix[i], JUMP4); @@ -2380,8 +2387,8 @@ IssueTryFinallyInstructions( BODY( finallyToken, 3 + 4*numHandlers); OP( POP); - OP4( LOAD_SCALAR4, optionsVar); - OP4( LOAD_SCALAR4, resultVar); + LOAD( optionsVar); + LOAD( resultVar); OP( RETURN_STK); return TCL_OK; diff --git a/tests/error.test b/tests/error.test index 8f0c0f0..86e52c2 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.25 2009/12/07 15:08:47 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.26 2010/03/18 10:59:48 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -803,6 +803,28 @@ test error-19.5 {multiple unrelated fallthroughs #2} { } set RES } {err} +test error-19.6 {compiled try executes all clauses} -setup { + proc addmsg msg { + variable RES + lappend RES $msg + } + set RES {} +} -body { + apply {{} { + try { + addmsg a + throw bar hello + } trap bar {res opt} { + addmsg b + } finally { + addmsg c + } + addmsg d + } ::tcl::test::error} +} -cleanup { + rename addmsg {} + unset RES +} -result {a b c d} # FIXME test what vars get set on fallthough ... what is the correct behavior? # It would seem appropriate to set at least those for the matching handler and -- cgit v0.12 From 334db97a72461fd68bc9574ff8f6fc628cd40650 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Mar 2010 14:35:03 +0000 Subject: Fix silly error in bytecode generation for [try]. --- ChangeLog | 3 ++- generic/tclCompCmdsSZ.c | 4 +++- tests/error.test | 61 ++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 60 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc4cc6f..979c569 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,8 @@ * generic/tclCompCmdsSZ.c (IssueTryFinallyInstructions): [Bug 2971921]: Corrected jump so that it doesn't skip into the middle of an instruction! Tightened the instruction issuing. Moved endCatch - calls closer to their point that they guard. + calls closer to their point that they guard, ensuring correct ordering + of result values. 2010-03-17 Andreas Kupries diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index b55367c..25ff92a 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.3 2010/03/18 10:59:48 dkf Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.4 2010/03/18 14:35:04 dkf Exp $ */ #include "tclInt.h" @@ -2077,6 +2077,7 @@ IssueTryInstructions( BODY( bodyToken, 1); ExceptionRangeEnds(envPtr, range); PUSH( "0"); + OP4( REVERSE, 2); OP1( JUMP1, 4); ExceptionRangeTarget(envPtr, range, catchOffset); OP( PUSH_RETURN_CODE); @@ -2224,6 +2225,7 @@ IssueTryFinallyInstructions( BODY( bodyToken, 1); ExceptionRangeEnds(envPtr, range); PUSH( "0"); + OP4( REVERSE, 2); OP1( JUMP1, 4); ExceptionRangeTarget(envPtr, range, catchOffset); OP( PUSH_RETURN_CODE); diff --git a/tests/error.test b/tests/error.test index 86e52c2..95cd4c2 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.26 2010/03/18 10:59:48 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.27 2010/03/18 14:35:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -803,11 +803,11 @@ test error-19.5 {multiple unrelated fallthroughs #2} { } set RES } {err} +proc addmsg msg { + variable RES + lappend RES $msg +} test error-19.6 {compiled try executes all clauses} -setup { - proc addmsg msg { - variable RES - lappend RES $msg - } set RES {} } -body { apply {{} { @@ -822,9 +822,58 @@ test error-19.6 {compiled try executes all clauses} -setup { addmsg d } ::tcl::test::error} } -cleanup { - rename addmsg {} unset RES } -result {a b c d} +test error-19.7 {compiled try executes all clauses} -setup { + set RES {} +} -body { + apply {{} { + try { + addmsg a + } on error {res opt} { + addmsg b + } on ok {} { + addmsg c + } finally { + addmsg d + } + addmsg e + } ::tcl::test::error} +} -cleanup { + unset RES +} -result {a c d e} +test error-19.8 {compiled try executes all clauses} -setup { + set RES {} +} -body { + apply {{} { + try { + addmsg a + throw bar hello + } trap bar {res opt} { + addmsg b + } + addmsg c + } ::tcl::test::error} +} -cleanup { + unset RES +} -result {a b c} +test error-19.9 {compiled try executes all clauses} -setup { + set RES {} +} -body { + apply {{} { + try { + addmsg a + } on error {res opt} { + addmsg b + } on ok {} { + addmsg c + } + addmsg d + } ::tcl::test::error} +} -cleanup { + unset RES +} -result {a c d} +rename addmsg {} # FIXME test what vars get set on fallthough ... what is the correct behavior? # It would seem appropriate to set at least those for the matching handler and -- cgit v0.12 From eb5c3529d6f7ce0af6006fd19ef2053042141731 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 18 Mar 2010 20:34:47 +0000 Subject: * generic/tclListObj.c: Prevent in overflow trouble in [lreplace] * generic/tclTestObj.c: operations. Thanks to kbk for fix and test. * tests/listObj.test: [Bug 2971669]. --- ChangeLog | 6 +++ generic/tclListObj.c | 8 +++- generic/tclTestObj.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++- tests/listObj.test | 26 ++++++++++++- 4 files changed, 138 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 979c569..54f0135 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-18 Don Porter + + * generic/tclListObj.c: Prevent in overflow trouble in [lreplace] + * generic/tclTestObj.c: operations. Thanks to kbk for fix and test. + * tests/listObj.test: [Bug 2971669]. + 2010-03-18 Donal K. Fellows * generic/tclCompCmdsSZ.c (IssueTryFinallyInstructions): diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 896dcd3..6745f62 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclListObj.c,v 1.59 2010/02/24 14:30:34 dkf Exp $ + * RCS: @(#) $Id: tclListObj.c,v 1.60 2010/03/18 20:34:48 dgp Exp $ */ #include "tclInt.h" @@ -832,7 +832,11 @@ Tcl_ListObjReplace( } if (count < 0) { count = 0; - } else if (numElems < first+count) { + } else if (numElems < first+count || first+count < 0) { + /* + * The 'first+count < 0' condition here guards agains integer + * overflow in determining 'first+count' + */ count = numElems - first; } diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 1b33412..89f42a6 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.37 2010/02/25 22:20:10 nijtmans Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.38 2010/03/18 20:34:48 dgp Exp $ */ #ifndef USE_TCL_STUBS @@ -50,6 +50,8 @@ static int TestindexobjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int TestintobjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +static int TestlistobjCmd(ClientData dummy, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); static int TestobjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int TeststringobjCmd(ClientData dummy, Tcl_Interp *interp, @@ -100,6 +102,8 @@ TclObjTest_Init( NULL, NULL); Tcl_CreateObjCommand(interp, "testindexobj", TestindexobjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testlistobj", TestlistobjCmd, + NULL, NULL); Tcl_CreateObjCommand(interp, "testobj", TestobjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "teststringobj", TeststringobjCmd, NULL, NULL); @@ -777,6 +781,102 @@ TestintobjCmd( } /* + *----------------------------------------------------------------------------- + * + * TestlistobjCmd -- + * + * This function implements the 'testlistobj' command. It is used to + * test a few possible corner cases in list object manipulation from + * C code that cannot occur at the Tcl level. + * + * Results: + * A standard Tcl object result. + * + * Side effects: + * Creates, manipulates and frees list objects. + * + *----------------------------------------------------------------------------- + */ + +static int +TestlistobjCmd( + ClientData clientData, /* Not used */ + Tcl_Interp *interp, /* Tcl interpreter */ + int objc, /* Number of arguments */ + Tcl_Obj *const objv[]) /* Argument objects */ +{ + /* Subcommands supported by this command */ + const char* subcommands[] = { + "set", + "get", + "replace" + }; + enum listobjCmdIndex { + LISTOBJ_SET, + LISTOBJ_GET, + LISTOBJ_REPLACE + }; + + const char* index; /* Argument giving the variable number */ + int varIndex; /* Variable number converted to binary */ + int cmdIndex; /* Ordinal number of the subcommand */ + int first; /* First index in the list */ + int count; /* Count of elements in a list */ + + if (objc < 3) { + Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg...?"); + return TCL_ERROR; + } + index = Tcl_GetString(objv[2]); + if (GetVariableIndex(interp, index, &varIndex) != TCL_OK) { + return TCL_ERROR; + } + if (Tcl_GetIndexFromObj(interp, objv[1], subcommands, "command", + 0, &cmdIndex) != TCL_OK) { + return TCL_ERROR; + } + switch(cmdIndex) { + case LISTOBJ_SET: + if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) { + Tcl_SetListObj(varPtr[varIndex], objc-3, objv+3); + } else { + SetVarToObj(varIndex, Tcl_NewListObj(objc-3, objv+3)); + } + Tcl_SetObjResult(interp, varPtr[varIndex]); + break; + + case LISTOBJ_GET: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "varIndex"); + return TCL_ERROR; + } + if (CheckIfVarUnset(interp, varIndex)) { + return TCL_ERROR; + } + Tcl_SetObjResult(interp, varPtr[varIndex]); + break; + + case LISTOBJ_REPLACE: + if (objc < 5) { + Tcl_WrongNumArgs(interp, 2, objv, + "varIndex start count ?element...?"); + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(interp, objv[3], &first) != TCL_OK + || Tcl_GetIntFromObj(interp, objv[4], &count) != TCL_OK) { + return TCL_ERROR; + } + if (Tcl_IsShared(varPtr[varIndex])) { + SetVarToObj(varIndex, Tcl_DuplicateObj(varPtr[varIndex])); + } + Tcl_ResetResult(interp); + return Tcl_ListObjReplace(interp, varPtr[varIndex], first, count, + objc-5, objv+5); + } + return TCL_OK; +} + +/* *---------------------------------------------------------------------- * * TestobjCmd -- diff --git a/tests/listObj.test b/tests/listObj.test index a3c9f20..2e8ae17 100644 --- a/tests/listObj.test +++ b/tests/listObj.test @@ -11,13 +11,15 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: listObj.test,v 1.8 2005/07/27 18:12:43 dgp Exp $ +# RCS: @(#) $Id: listObj.test,v 1.9 2010/03/18 20:34:48 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } +testConstraint testobj [llength [info commands testobj]] + catch {unset x} test listobj-1.1 {Tcl_GetListObjType} emptyTest { # Test removed; tested an internal detail @@ -175,6 +177,28 @@ test listobj-9.1 {UpdateStringOfList} { string length [list foo\x00help] } 8 +test listobj-10.1 {Bug [2971669]} {*}{ + -constraints testobj + -setup { + testobj freeallvars + } + -body { + set result {} + lappend result \ + [testlistobj set 1 a b c d e] \ + [testlistobj replace 1 0x7fffffff 0x7fffffff f] \ + [testlistobj get 1] + } + -cleanup { + testobj freeallvars + } + -result {{a b c d e} {} {a b c d e f}} +} + # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: \ No newline at end of file -- cgit v0.12 From 5047cca473a0226f06a3b69d9f0b62a0b3732e79 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 18 Mar 2010 20:54:03 +0000 Subject: commit msg error --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 54f0135..94956d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2010-03-18 Don Porter - * generic/tclListObj.c: Prevent in overflow trouble in [lreplace] + * generic/tclListObj.c: Prevent in overflow trouble in ListObjReplace * generic/tclTestObj.c: operations. Thanks to kbk for fix and test. * tests/listObj.test: [Bug 2971669]. -- cgit v0.12 From 9d6f5201163bb582aa7e121e4c8b9799ec415479 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 19 Mar 2010 11:54:06 +0000 Subject: Compile the [throw] command. --- ChangeLog | 11 +++-- generic/tclBasic.c | 4 +- generic/tclCompCmdsSZ.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++- generic/tclInt.h | 5 ++- 4 files changed, 125 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94956d9..da1ea61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ +2010-03-19 Donal K. Fellows + + * generic/tclCompCmdsSZ.c (TclCompileThrowCmd): Added compilation for + the [throw] command. + 2010-03-18 Don Porter - * generic/tclListObj.c: Prevent in overflow trouble in ListObjReplace - * generic/tclTestObj.c: operations. Thanks to kbk for fix and test. - * tests/listObj.test: [Bug 2971669]. + * generic/tclListObj.c: [Bug 2971669]: Prevent in overflow trouble in + * generic/tclTestObj.c: ListObjReplace operations. Thanks to kbk for + * tests/listObj.test: fix and test. 2010-03-18 Donal K. Fellows diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b9282ae..148baa4 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.448 2010/03/05 14:34:03 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.449 2010/03/19 11:54:06 dkf Exp $ */ #include "tclInt.h" @@ -238,7 +238,7 @@ static const CmdInfo builtInCmds[] = { {"subst", Tcl_SubstObjCmd, TclCompileSubstCmd, TclNRSubstObjCmd, 1}, {"switch", Tcl_SwitchObjCmd, TclCompileSwitchCmd, TclNRSwitchObjCmd, 1}, {"tailcall", NULL, NULL, TclNRTailcallObjCmd, 1}, - {"throw", Tcl_ThrowObjCmd, NULL, NULL, 1}, + {"throw", Tcl_ThrowObjCmd, TclCompileThrowCmd, NULL, 1}, {"trace", Tcl_TraceObjCmd, NULL, NULL, 1}, {"try", Tcl_TryObjCmd, TclCompileTryCmd, TclNRTryObjCmd, 1}, {"unset", Tcl_UnsetObjCmd, TclCompileUnsetCmd, NULL, 1}, diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 25ff92a..f6f8efb 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.4 2010/03/18 14:35:04 dkf Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.5 2010/03/19 11:54:07 dkf Exp $ */ #include "tclInt.h" @@ -1789,6 +1789,116 @@ PrintJumptableInfo( /* *---------------------------------------------------------------------- * + * TclCompileThrowCmd -- + * + * Procedure called to compile the "throw" command. + * + * Results: + * Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer + * evaluation to runtime. + * + * Side effects: + * Instructions are added to envPtr to execute the "throw" command at + * runtime. + * + *---------------------------------------------------------------------- + */ + +int +TclCompileThrowCmd( + Tcl_Interp *interp, /* Used for error reporting. */ + Tcl_Parse *parsePtr, /* Points to a parse structure for the command + * created by Tcl_ParseCommand. */ + Command *cmdPtr, /* Points to defintion of command being + * compiled. */ + CompileEnv *envPtr) /* Holds resulting instructions. */ +{ + DefineLineInformation; /* TIP #280 */ + int numWords = parsePtr->numWords; + Tcl_Token *codeToken, *msgToken; + Tcl_Obj *objPtr; + + if (numWords != 3) { + return TCL_ERROR; + } + codeToken = TokenAfter(parsePtr->tokenPtr); + msgToken = TokenAfter(codeToken); + + TclNewObj(objPtr); + Tcl_IncrRefCount(objPtr); + if (TclWordKnownAtCompileTime(codeToken, objPtr)) { + Tcl_Obj *errPtr, *dictPtr; + const char *string; + int len; + + /* + * The code is known at compilation time. This allows us to issue a + * very efficient sequence of instructions. + */ + + if (Tcl_ListObjLength(interp, objPtr, &len) != TCL_OK) { + /* + * Must still do this; might generate an error when getting this + * "ignored" value prepared as an argument. + */ + + CompileWord(envPtr, msgToken, interp, 2); + TclCompileSyntaxError(interp, envPtr); + return TCL_OK; + } + if (len == 0) { + /* + * Must still do this; might generate an error when getting this + * "ignored" value prepared as an argument. + */ + + CompileWord(envPtr, msgToken, interp, 2); + goto issueErrorForEmptyCode; + } + TclNewLiteralStringObj(errPtr, "-errorcode"); + TclNewObj(dictPtr); + Tcl_DictObjPut(NULL, dictPtr, errPtr, objPtr); + Tcl_IncrRefCount(dictPtr); + string = Tcl_GetStringFromObj(dictPtr, &len); + CompileWord(envPtr, msgToken, interp, 2); + PushLiteral(envPtr, string, len); + TclDecrRefCount(dictPtr); + OP44( RETURN_IMM, 1, 0); + } else { + /* + * When the code token is not known at compilation time, we need to do + * a little bit more work. The main tricky bit here is that the error + * code has to be a list (a [throw] restriction) so we must emit extra + * instructions to enforce that condition. + */ + + CompileWord(envPtr, codeToken, interp, 1); + PUSH( "-errorcode"); + CompileWord(envPtr, msgToken, interp, 2); + OP4( REVERSE, 3); + OP( DUP); + OP( LIST_LENGTH); + OP1( JUMP_FALSE1, 16); + OP4( LIST, 2); + OP44( RETURN_IMM, 1, 0); + + /* + * Generate an error for being an empty list. Can't leverage anything + * else to do this for us. + */ + + issueErrorForEmptyCode: + PUSH( "type must be non-empty list"); + PUSH( ""); + OP44( RETURN_IMM, 1, 0); + } + TclDecrRefCount(objPtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclCompileTryCmd -- * * Procedure called to compile the "try" command. diff --git a/generic/tclInt.h b/generic/tclInt.h index 4bdb3c7..9661894 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.464 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.465 2010/03/19 11:54:07 dkf Exp $ */ #ifndef _TCLINT @@ -3481,6 +3481,9 @@ MODULE_SCOPE int TclCompileSubstCmd(Tcl_Interp *interp, MODULE_SCOPE int TclCompileSwitchCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); +MODULE_SCOPE int TclCompileThrowCmd(Tcl_Interp *interp, + Tcl_Parse *parsePtr, Command *cmdPtr, + struct CompileEnv *envPtr); MODULE_SCOPE int TclCompileTryCmd(Tcl_Interp *interp, Tcl_Parse *parsePtr, Command *cmdPtr, struct CompileEnv *envPtr); -- cgit v0.12 From ebf2f83895304cba3d46bd0714bc6e1cf38fbe83 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 20 Mar 2010 12:00:41 +0000 Subject: stub16.c Don't hide that we use the ASCII API here. tclWinPipe.c 2 unnecessary type casts. --- ChangeLog | 6 ++++++ win/stub16.c | 14 +++++++------- win/tclWinPipe.c | 6 +++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index da1ea61..9e2208b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-20 Jan Nijtmans + + * win/stub16.c Don't hide that we use the ASCII API here. + (does someone still use that?) + * win/tclWinPipe.c 2 unnecessary type casts. + 2010-03-19 Donal K. Fellows * generic/tclCompCmdsSZ.c (TclCompileThrowCmd): Added compilation for diff --git a/win/stub16.c b/win/stub16.c index 737a53e..52460c3 100644 --- a/win/stub16.c +++ b/win/stub16.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: stub16.c,v 1.5 2005/11/04 00:06:50 dkf Exp $ + * RCS: @(#) $Id: stub16.c,v 1.6 2010/03/20 12:00:41 nijtmans Exp $ */ #define STRICT @@ -61,7 +61,7 @@ main(void) char *cmdLine; HANDLE hStdInput, hStdOutput, hStdError; HANDLE hFileInput, hFileOutput, hFileError; - STARTUPINFO si; + STARTUPINFOA si; PROCESS_INFORMATION pi; char buf[8192]; DWORD result; @@ -81,7 +81,7 @@ main(void) * stub16.exe program arg1 arg2 ... */ - cmdLine = strchr(GetCommandLine(), ' '); + cmdLine = strchr(GetCommandLineA(), ' '); if (cmdLine == NULL) { return 1; } @@ -124,7 +124,7 @@ main(void) ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); - if (CreateProcess(NULL, cmdLine, NULL, NULL, TRUE, 0, NULL, NULL, &si, + if (CreateProcessA(NULL, cmdLine, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi) == FALSE) { goto cleanup; } @@ -181,17 +181,17 @@ CreateTempFile(void) char name[MAX_PATH]; SECURITY_ATTRIBUTES sa; - if (GetTempPath(sizeof(name), name) == 0) { + if (GetTempPathA(MAX_PATH, name) == 0) { return INVALID_HANDLE_VALUE; } - if (GetTempFileName(name, "tcl", 0, name) == 0) { + if (GetTempFileNameA(name, "tcl", 0, name) == 0) { return INVALID_HANDLE_VALUE; } sa.nLength = sizeof(sa); sa.lpSecurityDescriptor = NULL; sa.bInheritHandle = TRUE; - return CreateFile(name, GENERIC_READ | GENERIC_WRITE, 0, &sa, + return CreateFileA(name, GENERIC_READ | GENERIC_WRITE, 0, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, NULL); } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index a625ae8..2ee7310 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.77 2010/03/07 14:39:25 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.78 2010/03/20 12:00:42 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1505,9 +1505,9 @@ ApplicationType( * application name from the arguments. */ - tclWinProcs->getShortPathNameProc((TCHAR *) nativeFullPath, + tclWinProcs->getShortPathNameProc(nativeFullPath, nativeFullPath, MAX_PATH); - strcpy(fullName, tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds)); + strcpy(fullName, tclWinProcs->tchar2utf(nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); } return applType; -- cgit v0.12 From 981ede1b28ef6c7040d9526a568faf7d7e6f73de Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 20 Mar 2010 15:39:46 +0000 Subject: Allow [fcopy] to move more than 2GB per call. Frederic Bonnet identified issue. --- ChangeLog | 14 +++++++-- generic/tclIO.c | 86 +++++++++++++++++++++++++++++----------------------- generic/tclIO.h | 6 ++-- generic/tclIOCmd.c | 12 +++++--- generic/tclInt.decls | 9 ++++-- 5 files changed, 77 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e2208b..76c0438 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,18 @@ +2010-03-20 Donal K. Fellows + + * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Lift the restriction + * generic/tclIO.c (TclCopyChannel, CopyData): on the [fcopy] command + * generic/tclIO.h (CopyState): that forced it to only + copy up to 2GB per script-level callback. Now it is anything that can + fit in a (signed) 64-bit integer. Problem identified by Frederic + Bonnet on comp.lang.tcl. Note that individual low-level reads and + writes are still smaller as the optimal buffer size is smaller. + 2010-03-20 Jan Nijtmans - * win/stub16.c Don't hide that we use the ASCII API here. + * win/stub16.c: Don't hide that we use the ASCII API here. (does someone still use that?) - * win/tclWinPipe.c 2 unnecessary type casts. + * win/tclWinPipe.c: 2 unnecessary type casts. 2010-03-19 Donal K. Fellows diff --git a/generic/tclIO.c b/generic/tclIO.c index bc94bb6..2ec35cc 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.173 2010/03/17 16:35:42 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.174 2010/03/20 15:39:46 dkf Exp $ */ #include "tclInt.h" @@ -231,7 +231,7 @@ static const Tcl_ObjType tclChannelType = { #define SET_CHANNELINTERP(objPtr, storePtr) \ ((objPtr)->internalRep.twoPtrValue.ptr2 = (void *) (storePtr)) -#define BUSY_STATE(st,fl) \ +#define BUSY_STATE(st, fl) \ ((((st)->csPtrR) && ((fl) & TCL_READABLE)) || \ (((st)->csPtrW) && ((fl) & TCL_WRITABLE))) @@ -1726,9 +1726,9 @@ Tcl_UnstackChannel( if (chanPtr->downChanPtr != NULL) { /* * Instead of manipulating the per-thread / per-interp list/hashtable - * of registered channels we wind down the state of the transformation, - * and then restore the state of underlying channel into the old - * structure. + * of registered channels we wind down the state of the + * transformation, and then restore the state of underlying channel + * into the old structure. */ Channel *downChanPtr = chanPtr->downChanPtr; @@ -2653,7 +2653,7 @@ CloseChannel( if (statePtr->chanMsg != NULL) { if (interp != NULL) { - Tcl_SetChannelErrorInterp(interp,statePtr->chanMsg); + Tcl_SetChannelErrorInterp(interp, statePtr->chanMsg); } TclDecrRefCount(statePtr->chanMsg); statePtr->chanMsg = NULL; @@ -2709,7 +2709,7 @@ CloseChannel( statePtr->chanMsg = NULL; } if (interp) { - Tcl_SetChannelErrorInterp(interp,statePtr->unreportedMsg); + Tcl_SetChannelErrorInterp(interp, statePtr->unreportedMsg); } } if (errorCode == 0) { @@ -3051,7 +3051,7 @@ Tcl_Close( if (statePtr->chanMsg != NULL) { if (interp != NULL) { - Tcl_SetChannelErrorInterp(interp,statePtr->chanMsg); + Tcl_SetChannelErrorInterp(interp, statePtr->chanMsg); } TclDecrRefCount(statePtr->chanMsg); statePtr->chanMsg = NULL; @@ -3412,7 +3412,7 @@ CloseChannelPart( if (statePtr->chanMsg != NULL) { if (interp != NULL) { - Tcl_SetChannelErrorInterp(interp,statePtr->chanMsg); + Tcl_SetChannelErrorInterp(interp, statePtr->chanMsg); } TclDecrRefCount(statePtr->chanMsg); statePtr->chanMsg = NULL; @@ -3446,7 +3446,7 @@ CloseChannelPart( statePtr->chanMsg = NULL; } if (interp) { - Tcl_SetChannelErrorInterp(interp,statePtr->unreportedMsg); + Tcl_SetChannelErrorInterp(interp, statePtr->unreportedMsg); } } if (errorCode == 0) { @@ -6697,10 +6697,10 @@ GetInput( #ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING /* - * [SF Tcl Bug 943274]. Better emulation of non-blocking channels for - * channels without BlockModeProc, by keeping track of true fileevents - * generated by the OS == Data waiting and reading if and only if we are - * sure to have data. + * [Bug 943274]: Better emulation of non-blocking channels for channels + * without BlockModeProc, by keeping track of true fileevents generated by + * the OS == Data waiting and reading if and only if we are sure to have + * data. */ if (GotFlag(statePtr, CHANNEL_NONBLOCKING) && @@ -6735,8 +6735,7 @@ GetInput( #ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING if (nread <= toRead) { /* - * [SF Tcl Bug 943274] We have read the available data, clear - * flag. + * [Bug 943274]: We have read the available data, clear flag. */ ResetFlag(statePtr, CHANNEL_HAS_MORE_DATA); @@ -7207,7 +7206,7 @@ CheckChannelErrors( * retrieving and transforming the data to copy. */ - if (BUSY_STATE(statePtr,flags) && ((flags & CHANNEL_RAW_MODE) == 0)) { + if (BUSY_STATE(statePtr, flags) && ((flags & CHANNEL_RAW_MODE) == 0)) { Tcl_SetErrno(EBUSY); return -1; } @@ -7865,12 +7864,10 @@ Tcl_SetChannelOption( (strncmp(newValue, "none", len) == 0)) { ResetFlag(statePtr, CHANNEL_LINEBUFFERED); SetFlag(statePtr, CHANNEL_UNBUFFERED); - } else { - if (interp) { - Tcl_AppendResult(interp, "bad value for -buffering: " - "must be one of full, line, or none", NULL); - return TCL_ERROR; - } + } else if (interp) { + Tcl_AppendResult(interp, "bad value for -buffering: " + "must be one of full, line, or none", NULL); + return TCL_ERROR; } return TCL_OK; } else if (HaveOpt(7, "-buffersize")) { @@ -8937,13 +8934,25 @@ Tcl_FileEventObjCmd( */ int -TclCopyChannel( +TclCopyChannelOld( Tcl_Interp *interp, /* Current interpreter. */ Tcl_Channel inChan, /* Channel to read from. */ Tcl_Channel outChan, /* Channel to write to. */ int toRead, /* Amount of data to copy, or -1 for all. */ Tcl_Obj *cmdPtr) /* Pointer to script to execute or NULL. */ { + return TclCopyChannel(interp, inChan, outChan, (Tcl_WideInt) toRead, + cmdPtr); +} + +int +TclCopyChannel( + Tcl_Interp *interp, /* Current interpreter. */ + Tcl_Channel inChan, /* Channel to read from. */ + Tcl_Channel outChan, /* Channel to write to. */ + Tcl_WideInt toRead, /* Amount of data to copy, or -1 for all. */ + Tcl_Obj *cmdPtr) /* Pointer to script to execute or NULL. */ +{ Channel *inPtr = (Channel *) inChan; Channel *outPtr = (Channel *) outChan; ChannelState *inStatePtr, *outStatePtr; @@ -8954,14 +8963,14 @@ TclCopyChannel( inStatePtr = inPtr->state; outStatePtr = outPtr->state; - if (BUSY_STATE(inStatePtr,TCL_READABLE)) { + if (BUSY_STATE(inStatePtr, TCL_READABLE)) { if (interp) { Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(inChan), "\" is busy", NULL); } return TCL_ERROR; } - if (BUSY_STATE(outStatePtr,TCL_WRITABLE)) { + if (BUSY_STATE(outStatePtr, TCL_WRITABLE)) { if (interp) { Tcl_AppendResult(interp, "channel \"", Tcl_GetChannelName(outChan), "\" is busy", NULL); @@ -9013,7 +9022,7 @@ TclCopyChannel( csPtr->readFlags = readFlags; csPtr->writeFlags = writeFlags; csPtr->toRead = toRead; - csPtr->total = 0; + csPtr->total = (Tcl_WideInt) 0; csPtr->interp = interp; if (cmdPtr) { Tcl_IncrRefCount(cmdPtr); @@ -9056,7 +9065,8 @@ CopyData( Tcl_Obj *cmdPtr, *errObj = NULL, *bufObj = NULL, *msg = NULL; Tcl_Channel inChan, outChan; ChannelState *inStatePtr, *outStatePtr; - int result = TCL_OK, size, total, sizeb; + int result = TCL_OK, size, sizeb; + Tcl_WideInt total; const char *buffer; int inBinary, outBinary, sameEncoding; /* Encoding control */ @@ -9086,7 +9096,7 @@ CopyData( Tcl_IncrRefCount(bufObj); } - while (csPtr->toRead != 0) { + while (csPtr->toRead != (Tcl_WideInt) 0) { /* * Check for unreported background errors. */ @@ -9117,17 +9127,18 @@ CopyData( * Read up to bufSize bytes. */ - if ((csPtr->toRead == -1) || (csPtr->toRead > csPtr->bufSize)) { + if ((csPtr->toRead == (Tcl_WideInt) -1) + || (csPtr->toRead > (Tcl_WideInt) csPtr->bufSize)) { sizeb = csPtr->bufSize; } else { - sizeb = csPtr->toRead; + sizeb = (int) csPtr->toRead; } if (inBinary || sameEncoding) { size = DoRead(inStatePtr->topChanPtr, csPtr->buffer, sizeb); } else { size = DoReadChars(inStatePtr->topChanPtr, bufObj, sizeb, - 0 /* No append */); + 0 /* No append */); } underflow = (size >= 0) && (size < sizeb); /* Input underflow */ } @@ -9161,7 +9172,7 @@ CopyData( break; } if (((!Tcl_Eof(inChan)) || (cmdPtr && (mask == 0))) && - !(mask & TCL_READABLE)) { + !(mask & TCL_READABLE)) { if (mask & TCL_WRITABLE) { Tcl_DeleteChannelHandler(outChan, CopyEventProc, csPtr); } @@ -9315,7 +9326,7 @@ CopyData( StopCopy(csPtr); Tcl_Preserve(interp); - Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewIntObj(total)); + Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewWideIntObj(total)); if (errObj) { Tcl_ListObjAppendElement(interp, cmdPtr, errObj); } @@ -9346,9 +9357,8 @@ CopyData( * * DoRead -- * - * Reads a given number of bytes from a channel. - * - * No encoding conversions are applied to the bytes being read. + * Reads a given number of bytes from a channel. No encoding conversions + * are applied to the bytes being read. * * Results: * The number of characters read, or -1 on error. Use Tcl_GetErrno() to @@ -11273,7 +11283,7 @@ DumpFlags( char buf[20]; int i = 0; -#define ChanFlag(chr,bit) (buf[i++] = ((flags & (bit)) ? (chr) : '_')) +#define ChanFlag(chr, bit) (buf[i++] = ((flags & (bit)) ? (chr) : '_')) ChanFlag('r', TCL_READABLE); ChanFlag('w', TCL_WRITABLE); diff --git a/generic/tclIO.h b/generic/tclIO.h index 5f330f5..5ff855f 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.16 2009/02/27 23:03:42 nijtmans Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.17 2010/03/20 15:39:46 dkf Exp $ */ /* @@ -42,8 +42,8 @@ typedef struct CopyState { struct Channel *writePtr; /* Pointer to output channel. */ int readFlags; /* Original read channel flags. */ int writeFlags; /* Original write channel flags. */ - int toRead; /* Number of bytes to copy, or -1. */ - int total; /* Total bytes transferred (written). */ + Tcl_WideInt toRead; /* Number of bytes to copy, or -1. */ + Tcl_WideInt total; /* Total bytes transferred (written). */ Tcl_Interp *interp; /* Interp that started the copy. */ Tcl_Obj *cmdPtr; /* Command to be invoked at completion. */ int bufSize; /* Size of appended buffer. */ diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index ae6fe62..2b45169 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.67 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.68 2010/03/20 15:39:46 dkf Exp $ */ #include "tclInt.h" @@ -1462,7 +1462,7 @@ Tcl_SocketObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { static const char *const socketOptions[] = { - "-async", "-myaddr", "-myport","-server", NULL + "-async", "-myaddr", "-myport", "-server", NULL }; enum socketOptions { SKT_ASYNC, SKT_MYADDR, SKT_MYPORT, SKT_SERVER @@ -1640,7 +1640,8 @@ Tcl_FcopyObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Channel inChan, outChan; - int mode, i, toRead, index; + int mode, i, index; + Tcl_WideInt toRead; Tcl_Obj *cmdPtr; static const char *const switches[] = { "-size", "-command", NULL }; enum { FcopySize, FcopyCommand }; @@ -1682,16 +1683,17 @@ Tcl_FcopyObjCmd( } switch (index) { case FcopySize: - if (TclGetIntFromObj(interp, objv[i+1], &toRead) != TCL_OK) { + if (Tcl_GetWideIntFromObj(interp, objv[i+1], &toRead) != TCL_OK) { return TCL_ERROR; } - if (toRead<0) { + if (toRead < 0) { /* * Handle all negative sizes like -1, meaning 'copy all'. By * resetting toRead we avoid changes in the core copying * functions (which explicitly check for -1 and crash on any * other negative value). */ + toRead = -1; } break; diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 0f2e275..79a68e1 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.144 2010/02/05 10:03:23 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.145 2010/03/20 15:39:46 dkf Exp $ library tcl @@ -54,7 +54,7 @@ declare 7 generic { int TclCopyAndCollapse(int count, const char *src, char *dst) } declare 8 generic { - int TclCopyChannel(Tcl_Interp *interp, Tcl_Channel inChan, + int TclCopyChannelOld(Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr) } @@ -990,6 +990,11 @@ declare 246 generic { declare 247 generic { void TclResetRewriteEnsemble(Tcl_Interp *interp, int isRootEnsemble) } + +declare 248 generic { + int TclCopyChannel(Tcl_Interp *interp, Tcl_Channel inChan, + Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr) +} ############################################################################## -- cgit v0.12 From d1bb696494e79660e15cf20562a88f119df66388 Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 20 Mar 2010 15:40:13 +0000 Subject: regen --- generic/tclIntDecls.h | 28 ++++++++++++++++++++-------- generic/tclStubInit.c | 5 +++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index f7ef521..3797664 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.137 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.138 2010/03/20 15:40:13 dkf Exp $ */ #ifndef _TCLINTDECLS @@ -71,10 +71,10 @@ EXTERN void TclCleanupCommand(Command *cmdPtr); EXTERN int TclCopyAndCollapse(int count, const char *src, char *dst); #endif -#ifndef TclCopyChannel_TCL_DECLARED -#define TclCopyChannel_TCL_DECLARED +#ifndef TclCopyChannelOld_TCL_DECLARED +#define TclCopyChannelOld_TCL_DECLARED /* 8 */ -EXTERN int TclCopyChannel(Tcl_Interp *interp, +EXTERN int TclCopyChannelOld(Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr); #endif @@ -1043,6 +1043,13 @@ EXTERN int TclInitRewriteEnsemble(Tcl_Interp *interp, EXTERN void TclResetRewriteEnsemble(Tcl_Interp *interp, int isRootEnsemble); #endif +#ifndef TclCopyChannel_TCL_DECLARED +#define TclCopyChannel_TCL_DECLARED +/* 248 */ +EXTERN int TclCopyChannel(Tcl_Interp *interp, + Tcl_Channel inChan, Tcl_Channel outChan, + Tcl_WideInt toRead, Tcl_Obj *cmdPtr); +#endif typedef struct TclIntStubs { int magic; @@ -1056,7 +1063,7 @@ typedef struct TclIntStubs { int (*tclCleanupChildren) (Tcl_Interp *interp, int numPids, Tcl_Pid *pidPtr, Tcl_Channel errorChan); /* 5 */ void (*tclCleanupCommand) (Command *cmdPtr); /* 6 */ int (*tclCopyAndCollapse) (int count, const char *src, char *dst); /* 7 */ - int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr); /* 8 */ + int (*tclCopyChannelOld) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr); /* 8 */ int (*tclCreatePipeline) (Tcl_Interp *interp, int argc, const char **argv, Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr, TclFile *errFilePtr); /* 9 */ int (*tclCreateProc) (Tcl_Interp *interp, Namespace *nsPtr, const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Proc **procPtrPtr); /* 10 */ void (*tclDeleteCompiledLocalVars) (Interp *iPtr, CallFrame *framePtr); /* 11 */ @@ -1296,6 +1303,7 @@ typedef struct TclIntStubs { Tcl_HashTable * (*tclGetNamespaceCommandTable) (Tcl_Namespace *nsPtr); /* 245 */ int (*tclInitRewriteEnsemble) (Tcl_Interp *interp, int numRemoved, int numInserted, Tcl_Obj *const *objv); /* 246 */ void (*tclResetRewriteEnsemble) (Tcl_Interp *interp, int isRootEnsemble); /* 247 */ + int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr); /* 248 */ } TclIntStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -1328,9 +1336,9 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclCopyAndCollapse \ (tclIntStubsPtr->tclCopyAndCollapse) /* 7 */ #endif -#ifndef TclCopyChannel -#define TclCopyChannel \ - (tclIntStubsPtr->tclCopyChannel) /* 8 */ +#ifndef TclCopyChannelOld +#define TclCopyChannelOld \ + (tclIntStubsPtr->tclCopyChannelOld) /* 8 */ #endif #ifndef TclCreatePipeline #define TclCreatePipeline \ @@ -2018,6 +2026,10 @@ extern const TclIntStubs *tclIntStubsPtr; #define TclResetRewriteEnsemble \ (tclIntStubsPtr->tclResetRewriteEnsemble) /* 247 */ #endif +#ifndef TclCopyChannel +#define TclCopyChannel \ + (tclIntStubsPtr->tclCopyChannel) /* 248 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index d4dfdbe..b7e4b9a 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.188 2010/02/28 09:05:56 nijtmans Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.189 2010/03/20 15:40:14 dkf Exp $ */ #include "tclInt.h" @@ -57,7 +57,7 @@ static const TclIntStubs tclIntStubs = { TclCleanupChildren, /* 5 */ TclCleanupCommand, /* 6 */ TclCopyAndCollapse, /* 7 */ - TclCopyChannel, /* 8 */ + TclCopyChannelOld, /* 8 */ TclCreatePipeline, /* 9 */ TclCreateProc, /* 10 */ TclDeleteCompiledLocalVars, /* 11 */ @@ -297,6 +297,7 @@ static const TclIntStubs tclIntStubs = { TclGetNamespaceCommandTable, /* 245 */ TclInitRewriteEnsemble, /* 246 */ TclResetRewriteEnsemble, /* 247 */ + TclCopyChannel, /* 248 */ }; static const TclIntPlatStubs tclIntPlatStubs = { -- cgit v0.12 From 8d0ad6bd16b01c1d0e781660e7ecd138120f5a7a Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 20 Mar 2010 17:49:15 +0000 Subject: Missed a spot. --- generic/tclIO.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 2ec35cc..0ed57d0 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.174 2010/03/20 15:39:46 dkf Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.175 2010/03/20 17:49:15 dkf Exp $ */ #include "tclInt.h" @@ -9345,7 +9345,7 @@ CopyData( result = TCL_ERROR; } else { Tcl_ResetResult(interp); - Tcl_SetObjResult(interp, Tcl_NewIntObj(total)); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(total)); } } } -- cgit v0.12 From 8e9d12df9d9208d8c13676dfa05cfbb0cf4abf1d Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 20 Mar 2010 21:26:38 +0000 Subject: Clarify the use of '&' for backgrounding a pipeline. --- ChangeLog | 3 +++ doc/exec.n | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76c0438..2434e1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-03-20 Donal K. Fellows + * doc/exec.n: Make it a bit clearer that there is an option to run a + pipeline in the background. + * generic/tclIOCmd.c (Tcl_FcopyObjCmd): Lift the restriction * generic/tclIO.c (TclCopyChannel, CopyData): on the [fcopy] command * generic/tclIO.h (CopyState): that forced it to only diff --git a/doc/exec.n b/doc/exec.n index 1326e35..b84f5ea 100644 --- a/doc/exec.n +++ b/doc/exec.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: exec.n,v 1.26 2010/01/20 13:40:23 dkf Exp $ +'\" RCS: @(#) $Id: exec.n,v 1.27 2010/03/20 21:26:39 dkf Exp $ '\" .so man.macros .TH exec n 8.5 Tcl "Tcl Built-In Commands" @@ -15,7 +15,7 @@ .SH NAME exec \- Invoke subprocesses .SH SYNOPSIS -\fBexec \fR?\fIswitches\fR? \fIarg \fR?\fIarg ...\fR? +\fBexec \fR?\fIswitches\fR? \fIarg \fR?\fIarg ...\fR? ?\fB&\fR? .BE .SH DESCRIPTION .PP -- cgit v0.12 From 6838a5c3396760aa126ef99f25c1bb7b992700ba Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 22 Mar 2010 22:47:03 +0000 Subject: * generic/tclCmdMZ.c: [Bug 2973361]: Compute the correct integer values to identify the argument indices of the various script arguments to [try]. Passing in -1 led to invalid memory reads. --- ChangeLog | 6 ++++++ generic/tclCmdMZ.c | 17 +++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2434e1b..9085a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-22 Don Porter + + * generic/tclCmdMZ.c: [Bug 2973361]: Compute the correct integer + values to identify the argument indices of the various script arguments + to [try]. Passing in -1 led to invalid memory reads. + 2010-03-20 Donal K. Fellows * doc/exec.n: Make it a bit clearer that there is an option to run a diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 696835a..ebfd7e7 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.205 2010/03/05 23:12:54 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.206 2010/03/22 22:47:03 dgp Exp $ */ #include "tclInt.h" @@ -4351,6 +4351,7 @@ TryPostBody( { Tcl_Obj *resultObj, *options, *handlersObj, *finallyObj, *cmdObj; int i, dummy, code; + int numHandlers = 0; handlersObj = data[0]; finallyObj = data[1]; @@ -4377,7 +4378,7 @@ TryPostBody( */ if (handlersObj != NULL) { - int numHandlers, found = 0; + int found = 0; Tcl_Obj **handlers, **info; Tcl_ListObjGetElements(NULL, handlersObj, &numHandlers, &handlers); @@ -4487,7 +4488,7 @@ TryPostBody( info[0], finallyObj); Tcl_DecrRefCount(handlersObj); return TclNREvalObjEx(interp, handlerBodyObj, 0, - ((Interp *) interp)->cmdFramePtr, -1); + ((Interp *) interp)->cmdFramePtr, 4*i + 5); handlerFailed: options = During(interp, result, options, NULL); @@ -4512,7 +4513,7 @@ TryPostBody( Tcl_NRAddCallback(interp, TryPostFinal, resultObj, INT2PTR(result), options, cmdObj); return TclNREvalObjEx(interp, finallyObj, 0, - ((Interp *) interp)->cmdFramePtr, -1); + ((Interp *) interp)->cmdFramePtr, numHandlers*4 + 3); } /* @@ -4574,10 +4575,14 @@ TryPostHandler( */ if (finallyObj != NULL) { + Interp *iPtr = (Interp *) interp; + Tcl_NRAddCallback(interp, TryPostFinal, resultObj, INT2PTR(result), options, cmdObj); - return TclNREvalObjEx(interp, finallyObj, 0, - ((Interp *) interp)->cmdFramePtr, -1); + + /* The 'finally' script is always the last argument word. */ + return TclNREvalObjEx(interp, finallyObj, 0, iPtr->cmdFramePtr, + iPtr->cmdFramePtr->nline - 1); } /* -- cgit v0.12 From ddc540e0328b146dd871015f3c32296da797920a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 23 Mar 2010 12:58:38 +0000 Subject: Make error message in "try" implementation exactly the same as the one in "return" --- ChangeLog | 7 +++++++ generic/tclCmdMZ.c | 18 ++++++++++-------- generic/tclCompCmdsSZ.c | 6 +++--- libtommath/mtest/mpi.c | 8 ++++---- tests/error.test | 6 +++--- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9085a07..1223c14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-?? Jan Nijtmans + + * generic/tclCmdMZ.c Make error message in "try" implementation + * generic/tclCompCmdsSZ.c exactly the same as the one in "return" + * tests/error.test + * libtommath/mtests/mpi.c Single "const" addition + 2010-03-22 Don Porter * generic/tclCmdMZ.c: [Bug 2973361]: Compute the correct integer diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index ebfd7e7..3f1618d 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.206 2010/03/22 22:47:03 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.207 2010/03/23 12:58:38 nijtmans Exp $ */ #include "tclInt.h" @@ -4159,13 +4159,13 @@ TclNRTryObjCmd( { Tcl_Obj *bodyObj, *handlersObj, *finallyObj = NULL; int i, bodyShared, haveHandlers, dummy, code; - static const char *handlerNames[] = { + static const char *const handlerNames[] = { "finally", "on", "trap", NULL }; enum Handlers { TryFinally, TryOn, TryTrap }; - static const char *exceptionNames[] = { + static const char *const returnCodes[] = { "ok", "error", "return", "break", "continue", NULL }; @@ -4218,12 +4218,14 @@ TclNRTryObjCmd( return TCL_ERROR; } if (Tcl_GetIntFromObj(NULL, objv[i+1], &code) != TCL_OK - && Tcl_GetIndexFromObj(NULL, objv[i+1], exceptionNames, + && Tcl_GetIndexFromObj(NULL, objv[i+1], returnCodes, "code", 0, &code) != TCL_OK) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "bad code '%s': must be integer, \"ok\", \"error\", " - "\"return\", \"break\" or \"continue\"", - Tcl_GetString(objv[i+1]))); + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "bad completion code \"", + TclGetString(objv[i+1]), + "\": must be ok, error, return, break, " + "continue, or an integer", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); Tcl_DecrRefCount(handlersObj); return TCL_ERROR; } diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index f6f8efb..d8fdcd1 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.5 2010/03/19 11:54:07 dkf Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.6 2010/03/23 12:58:39 nijtmans Exp $ */ #include "tclInt.h" @@ -1992,7 +1992,7 @@ TclCompileTryCmd( } else if (tokenPtr[1].size == 2 && !strncmp(tokenPtr[1].start, "on", 2)) { int code; - static const char *codes[] = { + static const char *const returnCodes[] = { "ok", "error", "return", "break", "continue", NULL }; @@ -2008,7 +2008,7 @@ TclCompileTryCmd( goto failedToCompile; } if (Tcl_GetIntFromObj(NULL, tmpObj, &code) != TCL_OK - && Tcl_GetIndexFromObj(NULL, tmpObj, codes, "", + && Tcl_GetIndexFromObj(NULL, tmpObj, returnCodes, "", TCL_EXACT, &code) != TCL_OK) { TclDecrRefCount(tmpObj); goto failedToCompile; diff --git a/libtommath/mtest/mpi.c b/libtommath/mtest/mpi.c index 1b6f114..2122389 100644 --- a/libtommath/mtest/mpi.c +++ b/libtommath/mtest/mpi.c @@ -6,7 +6,7 @@ Arbitrary precision integer arithmetic library - $Id: mpi.c,v 1.1.1.2 2005/09/26 16:32:17 kennykb Exp $ + $Id: mpi.c,v 1.2 2010/03/23 12:58:41 nijtmans Exp $ */ #include "mpi.h" @@ -91,7 +91,7 @@ static unsigned int s_mp_defprec = MP_DEFPREC; /* {{{ Constant strings */ /* Constant strings returned by mp_strerror() */ -static const char *mp_err_string[] = { +static const char *const mp_err_string[] = { "unknown result code", /* say what? */ "boolean true", /* MP_OKAY, MP_YES */ "boolean false", /* MP_NO */ @@ -3981,5 +3981,5 @@ int s_mp_outlen(int bits, int r) /* crc==4242132123, version==2, Sat Feb 02 06:43:52 2002 */ /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/mtest/mpi.c,v $ */ -/* $Revision: 1.1.1.2 $ */ -/* $Date: 2005/09/26 16:32:17 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/03/23 12:58:41 $ */ diff --git a/tests/error.test b/tests/error.test index 95cd4c2..9e192ef 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.27 2010/03/18 14:35:04 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.28 2010/03/23 12:58:39 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -883,10 +883,10 @@ rename addmsg {} test error-20.1 {bad code name in on handler} -body { try { list a b c } on foo {} {} -} -returnCodes error -match glob -result {bad code *} +} -returnCodes error -match glob -result {bad completion code *} test error-20.2 {bad code value in on handler} -body { try { list a b c } on 34985723094872345 {} {} -} -returnCodes error -match glob -result {bad code *} +} -returnCodes error -match glob -result {bad completion code *} test error-21.1 {memory leaks in try: Bug 2910044} memory { leaktest { -- cgit v0.12 From 1c34df3008fc247efe8e129fce9fcfc51ed282a5 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 23 Mar 2010 13:08:18 +0000 Subject: Make error message in "try" implementation exactly the same as the one in "return" --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1223c14..ac71344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2010-03-?? Jan Nijtmans +2010-03-23 Jan Nijtmans * generic/tclCmdMZ.c Make error message in "try" implementation * generic/tclCompCmdsSZ.c exactly the same as the one in "return" -- cgit v0.12 From ca6cb5920260f029a64602994d097845239aacd3 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 23 Mar 2010 23:25:55 +0000 Subject: * generic/tclCmdMZ.c: [Bug 2973361] Revised fix for computing indices of script arguments to [try]. --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 53 +++++++++++++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac71344..75434aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-24 Don Porter + + * generic/tclCmdMZ.c: [Bug 2973361] Revised fix for computing + indices of script arguments to [try]. + 2010-03-23 Jan Nijtmans * generic/tclCmdMZ.c Make error message in "try" implementation diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 3f1618d..6c311f9b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.207 2010/03/23 12:58:38 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.208 2010/03/23 23:25:55 dgp Exp $ */ #include "tclInt.h" @@ -4288,8 +4288,8 @@ TclNRTryObjCmd( * Execute the body. */ - Tcl_NRAddCallback(interp, TryPostBody, handlersObj, finallyObj, objv[0], - NULL); + Tcl_NRAddCallback(interp, TryPostBody, handlersObj, finallyObj, + (ClientData)objv, INT2PTR(objc)); return TclNREvalObjEx(interp, bodyObj, 0, ((Interp *) interp)->cmdFramePtr, 1); } @@ -4351,13 +4351,16 @@ TryPostBody( Tcl_Interp *interp, int result) { - Tcl_Obj *resultObj, *options, *handlersObj, *finallyObj, *cmdObj; - int i, dummy, code; + Tcl_Obj *resultObj, *options, *handlersObj, *finallyObj, *cmdObj, **objv; + int i, dummy, code, objc; int numHandlers = 0; handlersObj = data[0]; finallyObj = data[1]; - cmdObj = data[2]; + objv = data[2]; + objc = PTR2INT(data[3]); + + cmdObj = objv[0]; /* * Basic processing of the outcome of the script, including adding of @@ -4486,8 +4489,8 @@ TryPostBody( */ handlerBodyObj = info[4]; - Tcl_NRAddCallback(interp, TryPostHandler, cmdObj, options, - info[0], finallyObj); + Tcl_NRAddCallback(interp, TryPostHandler, objv, options, info[0], + INT2PTR((finallyObj == NULL) ? 0 : objc - 1)); Tcl_DecrRefCount(handlersObj); return TclNREvalObjEx(interp, handlerBodyObj, 0, ((Interp *) interp)->cmdFramePtr, 4*i + 5); @@ -4512,10 +4515,10 @@ TryPostBody( */ if (finallyObj != NULL) { - Tcl_NRAddCallback(interp, TryPostFinal, resultObj, INT2PTR(result), - options, cmdObj); + Tcl_NRAddCallback(interp, TryPostFinal, resultObj, options, cmdObj, + NULL); return TclNREvalObjEx(interp, finallyObj, 0, - ((Interp *) interp)->cmdFramePtr, numHandlers*4 + 3); + ((Interp *) interp)->cmdFramePtr, objc - 1); } /* @@ -4547,13 +4550,18 @@ TryPostHandler( Tcl_Interp *interp, int result) { - Tcl_Obj *resultObj, *cmdObj, *options, *handlerKindObj; + Tcl_Obj *resultObj, *cmdObj, *options, *handlerKindObj, **objv; Tcl_Obj *finallyObj; + int finally; - cmdObj = data[0]; + + objv = data[0]; options = data[1]; handlerKindObj = data[2]; - finallyObj = data[3]; + finally = PTR2INT(data[3]); + + cmdObj = objv[0]; + finallyObj = finally ? objv[finally] : 0; /* * The handler result completely substitutes for the result of the body. @@ -4579,12 +4587,12 @@ TryPostHandler( if (finallyObj != NULL) { Interp *iPtr = (Interp *) interp; - Tcl_NRAddCallback(interp, TryPostFinal, resultObj, INT2PTR(result), - options, cmdObj); + Tcl_NRAddCallback(interp, TryPostFinal, resultObj, options, cmdObj, + NULL); /* The 'finally' script is always the last argument word. */ return TclNREvalObjEx(interp, finallyObj, 0, iPtr->cmdFramePtr, - iPtr->cmdFramePtr->nline - 1); + finally); } /* @@ -4614,24 +4622,21 @@ static int TryPostFinal( ClientData data[], Tcl_Interp *interp, - int finalResult) + int result) { Tcl_Obj *resultObj, *options, *cmdObj; - int result; resultObj = data[0]; - result = PTR2INT(data[1]); - options = data[2]; - cmdObj = data[3]; + options = data[1]; + cmdObj = data[2]; /* * If the result wasn't OK, we need to adjust the result options. */ - if (finalResult != TCL_OK) { + if (result != TCL_OK) { Tcl_DecrRefCount(resultObj); resultObj = NULL; - result = finalResult; if (result == TCL_ERROR) { options = During(interp, result, options, Tcl_ObjPrintf( "\n (\"%s ... finally\" body line %d)", -- cgit v0.12 From 26683d2945cd970b898e6e20c238bdc844c9af94 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Mar 2010 10:25:59 +0000 Subject: * generic/tclCmdMZ.c (TryPostBody, TryPostHandler): Make sure that the [try] command does not trap unwinding due to limits. --- ChangeLog | 19 ++++++++++++------- generic/tclCmdMZ.c | 36 +++++++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75434aa..76dfb6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,20 +1,25 @@ +2010-03-24 Donal K. Fellows + + * generic/tclCmdMZ.c (TryPostBody, TryPostHandler): Make sure that the + [try] command does not trap unwinding due to limits. + 2010-03-24 Don Porter - * generic/tclCmdMZ.c: [Bug 2973361] Revised fix for computing + * generic/tclCmdMZ.c: [Bug 2973361]: Revised fix for computing indices of script arguments to [try]. 2010-03-23 Jan Nijtmans - * generic/tclCmdMZ.c Make error message in "try" implementation - * generic/tclCompCmdsSZ.c exactly the same as the one in "return" - * tests/error.test - * libtommath/mtests/mpi.c Single "const" addition + * generic/tclCmdMZ.c: Make error message in "try" implementation + * generic/tclCompCmdsSZ.c: exactly the same as the one in "return" + * tests/error.test: + * libtommath/mtests/mpi.c: Single "const" addition 2010-03-22 Don Porter * generic/tclCmdMZ.c: [Bug 2973361]: Compute the correct integer - values to identify the argument indices of the various script arguments - to [try]. Passing in -1 led to invalid memory reads. + values to identify the argument indices of the various script + arguments to [try]. Passing in -1 led to invalid memory reads. 2010-03-20 Donal K. Fellows diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 6c311f9b..e63e07c 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -10,12 +10,12 @@ * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-2000 Scriptics Corporation. * Copyright (c) 2002 ActiveState Corporation. - * Copyright (c) 2003 Donal K. Fellows. + * Copyright (c) 2003-2009 Donal K. Fellows. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.208 2010/03/23 23:25:55 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.209 2010/03/24 10:25:59 dkf Exp $ */ #include "tclInt.h" @@ -4363,17 +4363,31 @@ TryPostBody( cmdObj = objv[0]; /* + * Check for limits/rewinding, which override normal trapping behaviour. + */ + + if (((Interp*) interp)->execEnvPtr->rewind || Tcl_LimitExceeded(interp)) { + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n (\"%s\" body line %d)", TclGetString(cmdObj), + Tcl_GetErrorLine(interp))); + if (handlersObj != NULL) { + Tcl_DecrRefCount(handlersObj); + } + return TCL_ERROR; + } + + /* * Basic processing of the outcome of the script, including adding of * errorinfo trace. */ - resultObj = Tcl_GetObjResult(interp); - Tcl_IncrRefCount(resultObj); if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (\"%s\" body line %d)", TclGetString(cmdObj), Tcl_GetErrorLine(interp))); } + resultObj = Tcl_GetObjResult(interp); + Tcl_IncrRefCount(resultObj); options = Tcl_GetReturnOptions(interp, result); Tcl_IncrRefCount(options); Tcl_ResetResult(interp); @@ -4554,7 +4568,6 @@ TryPostHandler( Tcl_Obj *finallyObj; int finally; - objv = data[0]; options = data[1]; handlerKindObj = data[2]; @@ -4564,6 +4577,19 @@ TryPostHandler( finallyObj = finally ? objv[finally] : 0; /* + * Check for limits/rewinding, which override normal trapping behaviour. + */ + + if (((Interp*) interp)->execEnvPtr->rewind || Tcl_LimitExceeded(interp)) { + options = During(interp, result, options, Tcl_ObjPrintf( + "\n (\"%s ... %s\" handler line %d)", + TclGetString(cmdObj), TclGetString(handlerKindObj), + Tcl_GetErrorLine(interp))); + Tcl_DecrRefCount(options); + return TCL_ERROR; + } + + /* * The handler result completely substitutes for the result of the body. */ -- cgit v0.12 From 8158cea2c168d259b1161bffdc4cd276b93b386b Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Mar 2010 10:35:21 +0000 Subject: * tests/async.test (async-4.*): Reduce obscurity of these tests by putting the bulk of the code for them inside the test body with the help of [apply]. --- ChangeLog | 4 ++++ tests/async.test | 68 ++++++++++++++++++++++++++------------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76dfb6e..85214c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-03-24 Donal K. Fellows + * tests/async.test (async-4.*): Reduce obscurity of these tests by + putting the bulk of the code for them inside the test body with the + help of [apply]. + * generic/tclCmdMZ.c (TryPostBody, TryPostHandler): Make sure that the [try] command does not trap unwinding due to limits. diff --git a/tests/async.test b/tests/async.test index 014740a..654f995 100644 --- a/tests/async.test +++ b/tests/async.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: async.test,v 1.9 2006/03/21 11:12:27 dkf Exp $ +# RCS: @(#) $Id: async.test,v 1.10 2010/03/24 10:35:21 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -149,44 +149,25 @@ test async-3.1 {deleting handlers} testasync { list [catch {testasync mark $hm2 "foobar" 5} msg] $msg $x } {3 del2 {0 0 0 del1 del2}} -proc nothing {} { - # empty proc -} -proc hang1 {handle} { - global aresult - set aresult {Async event not delivered} - testasync marklater $handle - for {set i 0} { - $i < 2500000 && $aresult eq "Async event not delivered" - } {incr i} { - nothing - } - return $aresult -} -proc hang2 {handle} { - global aresult - set aresult {Async event not delivered} - testasync marklater $handle - for {set i 0} { - $i < 2500000 && $aresult eq "Async event not delivered" - } {incr i} {} - return $aresult -} -proc hang3 {handle} [concat { - global aresult - set aresult {Async event not delivered} - testasync marklater $handle - set i 0 -} [string repeat {;incr i;} 1500000] { - return $aresult -}] - test async-4.1 {async interrupting bytecode sequence} -constraints { testasync threaded } -setup { set hm [testasync create async3] + proc nothing {} { + # empty proc + } } -body { - hang1 $hm + apply {{handle} { + global aresult + set aresult {Async event not delivered} + testasync marklater $handle + for {set i 0} { + $i < 2500000 && $aresult eq "Async event not delivered" + } {incr i} { + nothing + } + return $aresult + }} $hm } -result {test pattern} -cleanup { testasync delete $hm } @@ -195,7 +176,15 @@ test async-4.2 {async interrupting straight bytecode sequence} -constraints { } -setup { set hm [testasync create async3] } -body { - hang2 $hm + apply {{handle} { + global aresult + set aresult {Async event not delivered} + testasync marklater $handle + for {set i 0} { + $i < 2500000 && $aresult eq "Async event not delivered" + } {incr i} {} + return $aresult + }} $hm } -result {test pattern} -cleanup { testasync delete $hm } @@ -204,7 +193,14 @@ test async-4.3 {async interrupting loop-less bytecode sequence} -constraints { } -setup { set hm [testasync create async3] } -body { - hang3 $hm + apply [list {handle} [concat { + global aresult + set aresult {Async event not delivered} + testasync marklater $handle + set i 0 + } [string repeat {;incr i;} 1500000] { + return $aresult + }]] $hm } -result {test pattern} -cleanup { testasync delete $hm } -- cgit v0.12 From 188c38659bf0d5e51f7263d592af87cd8c753a17 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 24 Mar 2010 13:21:11 +0000 Subject: * generic/tclOOInfo.c (InfoObjectMethodTypeCmd) (InfoClassMethodTypeCmd): Added introspection of method types so that it is possible to find this info out without using errors. --- ChangeLog | 7 +++ doc/info.n | 20 +++++++- generic/tclOOInfo.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclOOMethod.c | 4 +- tests/oo.test | 16 +++--- 5 files changed, 171 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85214c7..d80ef80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-03-24 Donal K. Fellows + * generic/tclOOInfo.c (InfoObjectMethodTypeCmd) + (InfoClassMethodTypeCmd): Added introspection of method types so that + it is possible to find this info out without using errors. + * generic/tclOOMethod.c (procMethodType): Now that introspection can + reveal the name of method types, regularize the name of normal methods + to be the name of the definition type used to create them. + * tests/async.test (async-4.*): Reduce obscurity of these tests by putting the bulk of the code for them inside the test body with the help of [apply]. diff --git a/doc/info.n b/doc/info.n index 7a14ea0..246b83f 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.35 2009/11/16 18:00:11 dgp Exp $ +'\" RCS: @(#) $Id: info.n,v 1.36 2010/03/24 13:21:11 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -443,6 +443,15 @@ mixins, if \fB\-all\fR is also given). .RE .VE 8.6 .TP +\fBinfo class methodtype\fI class method\fR +.VS 8.6 +This subcommand returns a description of the type of implementation used for +the method named \fImethod\fR of class \fIclass\fR. When the result is +\fBmethod\fR, further information can be discovered with \fBinfo class +definition\fR, and when the result is \fBforward\fR, further information can +be discovered with \fBinfo class forward\fR. +.VE 8.6 +.TP \fBinfo class mixins\fI class\fR .VS 8.6 This subcommand returns a list of all classes that have been mixed into the @@ -561,6 +570,15 @@ the private (i.e. non-exported) methods of the object (and classes, if .RE .VE 8.6 .TP +\fBinfo object methodtype\fI object method\fR +.VS 8.6 +This subcommand returns a description of the type of implementation used for +the method named \fImethod\fR of object \fIobject\fR. When the result is +\fBmethod\fR, further information can be discovered with \fBinfo object +definition\fR, and when the result is \fBforward\fR, further information can +be discovered with \fBinfo object forward\fR. +.VE 8.6 +.TP \fBinfo object mixins\fI object\fR .VS 8.6 This subcommand returns a list of all classes that have been mixed into the diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c index 9874864..b8679b3 100644 --- a/generic/tclOOInfo.c +++ b/generic/tclOOInfo.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInfo.c,v 1.13 2009/05/15 10:08:02 dkf Exp $ + * RCS: @(#) $Id: tclOOInfo.c,v 1.14 2010/03/24 13:21:11 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -25,6 +25,7 @@ static Tcl_ObjCmdProc InfoObjectFiltersCmd; static Tcl_ObjCmdProc InfoObjectForwardCmd; static Tcl_ObjCmdProc InfoObjectIsACmd; static Tcl_ObjCmdProc InfoObjectMethodsCmd; +static Tcl_ObjCmdProc InfoObjectMethodTypeCmd; static Tcl_ObjCmdProc InfoObjectMixinsCmd; static Tcl_ObjCmdProc InfoObjectNsCmd; static Tcl_ObjCmdProc InfoObjectVarsCmd; @@ -36,6 +37,7 @@ static Tcl_ObjCmdProc InfoClassFiltersCmd; static Tcl_ObjCmdProc InfoClassForwardCmd; static Tcl_ObjCmdProc InfoClassInstancesCmd; static Tcl_ObjCmdProc InfoClassMethodsCmd; +static Tcl_ObjCmdProc InfoClassMethodTypeCmd; static Tcl_ObjCmdProc InfoClassMixinsCmd; static Tcl_ObjCmdProc InfoClassSubsCmd; static Tcl_ObjCmdProc InfoClassSupersCmd; @@ -54,6 +56,7 @@ static const struct NameProcMap infoObjectCmds[] = { {"::oo::InfoObject::forward", InfoObjectForwardCmd}, {"::oo::InfoObject::isa", InfoObjectIsACmd}, {"::oo::InfoObject::methods", InfoObjectMethodsCmd}, + {"::oo::InfoObject::methodtype", InfoObjectMethodTypeCmd}, {"::oo::InfoObject::mixins", InfoObjectMixinsCmd}, {"::oo::InfoObject::namespace", InfoObjectNsCmd}, {"::oo::InfoObject::variables", InfoObjectVariablesCmd}, @@ -73,6 +76,7 @@ static const struct NameProcMap infoClassCmds[] = { {"::oo::InfoClass::forward", InfoClassForwardCmd}, {"::oo::InfoClass::instances", InfoClassInstancesCmd}, {"::oo::InfoClass::methods", InfoClassMethodsCmd}, + {"::oo::InfoClass::methodtype", InfoClassMethodTypeCmd}, {"::oo::InfoClass::mixins", InfoClassMixinsCmd}, {"::oo::InfoClass::subclasses", InfoClassSubsCmd}, {"::oo::InfoClass::superclasses", InfoClassSupersCmd}, @@ -173,6 +177,8 @@ GetClassFromObj( if (oPtr->classPtr == NULL) { Tcl_AppendResult(interp, "\"", TclGetString(objPtr), "\" is not a class", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", + TclGetString(objPtr), NULL); return NULL; } return oPtr->classPtr; @@ -223,6 +229,8 @@ InfoObjectClassCmd( if (o2Ptr->classPtr == NULL) { Tcl_AppendResult(interp, "object \"", TclGetString(objv[2]), "\" is not a class", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "CLASS", + TclGetString(objv[2]), NULL); return TCL_ERROR; } @@ -279,12 +287,16 @@ InfoObjectDefnCmd( unknownMethod: Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } procPtr = TclOOGetProcFromMethod(Tcl_GetHashValue(hPtr)); if (procPtr == NULL) { Tcl_AppendResult(interp, "definition not available for this kind of method", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } @@ -386,6 +398,8 @@ InfoObjectForwardCmd( unknownMethod: Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } prefixObj = TclOOGetFwdFromMethod(Tcl_GetHashValue(hPtr)); @@ -393,6 +407,8 @@ InfoObjectForwardCmd( Tcl_AppendResult(interp, "prefix argument list not available for this kind of method", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } @@ -605,6 +621,63 @@ InfoObjectMethodsCmd( /* * ---------------------------------------------------------------------- * + * InfoObjectMethodTypeCmd -- + * + * Implements [info object methodtype $objName $methodName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoObjectMethodTypeCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Object *oPtr; + Tcl_HashEntry *hPtr; + Method *mPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "objName methodName"); + return TCL_ERROR; + } + + oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]); + if (oPtr == NULL) { + return TCL_ERROR; + } + + if (!oPtr->methodsPtr) { + goto unknownMethod; + } + hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[2]); + if (hPtr == NULL) { + unknownMethod: + Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), + "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); + return TCL_ERROR; + } + mPtr = Tcl_GetHashValue(hPtr); + if (mPtr->typePtr == NULL) { + /* + * Special entry for visibility control: pretend the method doesnt + * exist. + */ + + goto unknownMethod; + } + + Tcl_SetObjResult(interp, Tcl_NewStringObj(mPtr->typePtr->name, -1)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * * InfoObjectMixinsCmd -- * * Implements [info object mixins $objName] @@ -869,12 +942,16 @@ InfoClassDefnCmd( if (hPtr == NULL) { Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } procPtr = TclOOGetProcFromMethod(Tcl_GetHashValue(hPtr)); if (procPtr == NULL) { Tcl_AppendResult(interp, "definition not available for this kind of method", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } @@ -1012,6 +1089,8 @@ InfoClassForwardCmd( if (hPtr == NULL) { Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } prefixObj = TclOOGetFwdFromMethod(Tcl_GetHashValue(hPtr)); @@ -1019,6 +1098,8 @@ InfoClassForwardCmd( Tcl_AppendResult(interp, "prefix argument list not available for this kind of method", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); return TCL_ERROR; } @@ -1160,6 +1241,58 @@ InfoClassMethodsCmd( /* * ---------------------------------------------------------------------- * + * InfoClassMethodTypeCmd -- + * + * Implements [info class methodtype $clsName $methodName] + * + * ---------------------------------------------------------------------- + */ + +static int +InfoClassMethodTypeCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + Tcl_HashEntry *hPtr; + Method *mPtr; + Class *clsPtr; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "className methodName"); + return TCL_ERROR; + } + clsPtr = GetClassFromObj(interp, objv[1]); + if (clsPtr == NULL) { + return TCL_ERROR; + } + + hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); + if (hPtr == NULL) { + unknownMethod: + Tcl_AppendResult(interp, "unknown method \"", TclGetString(objv[2]), + "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "METHOD", + TclGetString(objv[2]), NULL); + return TCL_ERROR; + } + mPtr = Tcl_GetHashValue(hPtr); + if (mPtr->typePtr == NULL) { + /* + * Special entry for visibility control: pretend the method doesnt + * exist. + */ + + goto unknownMethod; + } + Tcl_SetObjResult(interp, Tcl_NewStringObj(mPtr->typePtr->name, -1)); + return TCL_OK; +} + +/* + * ---------------------------------------------------------------------- + * * InfoClassMixinsCmd -- * * Implements [info class mixins $clsName] diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 6c13116..9f5be6b 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.25 2010/03/07 14:39:26 nijtmans Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.26 2010/03/24 13:21:11 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -108,7 +108,7 @@ static int ProcedureMethodCompiledVarResolver(Tcl_Interp *interp, */ static const Tcl_MethodType procMethodType = { - TCL_OO_METHOD_VERSION_CURRENT, "procedural method", + TCL_OO_METHOD_VERSION_CURRENT, "method", InvokeProcedureMethod, DeleteProcedureMethod, CloneProcedureMethod }; static const Tcl_MethodType fwdMethodType = { diff --git a/tests/oo.test b/tests/oo.test index adcab4b..50edb11 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.38 2010/03/04 23:42:54 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.39 2010/03/24 13:21:11 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1514,7 +1514,7 @@ test oo-16.2 {OO: object introspection} -body { } -returnCodes 1 -result {NOTANOBJECT does not refer to an object} test oo-16.3 {OO: object introspection} -body { info object gorp oo::object -} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, namespace, variables, or vars} +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, methodtype, mixins, namespace, variables, or vars} test oo-16.4 {OO: object introspection} -setup { oo::class create meta { superclass oo::class } [meta create instance1] create instance2 @@ -1555,10 +1555,11 @@ test oo-16.7 {OO: object introspection} -setup { } -body { oo::objdefine foo method bar {a {b c} args} {the body} set result [info object methods foo] - lappend result [info object definition foo bar] + lappend result [info object methodtype foo bar] \ + [info object definition foo bar] } -cleanup { foo destroy -} -result {bar {{a {b c} args} {the body}}} +} -result {bar method {{a {b c} args} {the body}}} test oo-16.8 {OO: object introspection} { oo::object create foo oo::class create bar @@ -1635,7 +1636,7 @@ test oo-17.3 {OO: class introspection} -setup { } -result {"foo" is not a class} test oo-17.4 {OO: class introspection} -body { info class gorp oo::object -} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be constructor, definition, destructor, filters, forward, instances, methods, mixins, subclasses, superclasses, or variables} +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be constructor, definition, destructor, filters, forward, instances, methods, methodtype, mixins, subclasses, superclasses, or variables} test oo-17.5 {OO: class introspection} -setup { oo::class create testClass } -body { @@ -1651,10 +1652,11 @@ test oo-17.6 {OO: class introspection} -setup { } -body { oo::define foo method bar {a {b c} args} {the body} set result [info class methods foo] - lappend result [info class definition foo bar] + lappend result [info class methodtype foo bar] \ + [info class definition foo bar] } -cleanup { foo destroy -} -result {bar {{a {b c} args} {the body}}} +} -result {bar method {{a {b c} args} {the body}}} test oo-17.7 {OO: class introspection} { info class superclasses oo::class } ::oo::object -- cgit v0.12 From f39f64f06bbce181e06855f40981b19669febdd0 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 24 Mar 2010 15:33:14 +0000 Subject: * generic/tclResult.c: [Bug 2383005] Revise [return -errorcode] so * tests/result.test: that it rejects illegal non-list values. --- generic/tclResult.c | 24 +++++++++++++++++++++++- tests/result.test | 5 ++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/generic/tclResult.c b/generic/tclResult.c index 273416d..3c329f1 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.57 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.58 2010/03/24 15:33:14 dgp Exp $ */ #include "tclInt.h" @@ -1425,6 +1425,28 @@ TclMergeReturnOptions( } /* + * Check for bogus -errorcode value. + */ + + Tcl_DictObjGet(NULL, returnOpts, keys[KEY_ERRORCODE], &valuePtr); + if (valuePtr != NULL) { + int length; + + if (TCL_ERROR == Tcl_ListObjLength(NULL, valuePtr, &length )) { + /* + * Value is not a list, which is illegal for -errorcode. + */ + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "bad -errorcode value: " + "expected a list but got \"", + TclGetString(valuePtr), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_ERRORCODE", + NULL); + goto error; + } + } + + /* * Convert [return -code return -level X] to [return -code ok -level X+1] */ diff --git a/tests/result.test b/tests/result.test index 95407b9..b2db8ec 100644 --- a/tests/result.test +++ b/tests/result.test @@ -131,7 +131,10 @@ test result-6.2 {Bug 1649062} -setup { } -cleanup { rename foo {} } -result {foo {} {}} - +test result-6.3 {Bug 2383005} { + catch {return -code error -errorcode {{}a} eek} m + set m +} {bad -errorcode value: expected a list but got "{}a"} # cleanup cleanupTests return -- cgit v0.12 From 6eb70f006fff06733664d05b19756a3e8e06dce8 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 24 Mar 2010 16:53:45 +0000 Subject: oops --- ChangeLog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d80ef80..5504389 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-24 Don Porter + + * generic/tclResult.c: [Bug 2383005] Revise [return -errorcode] so + * tests/result.test: that it rejects illegal non-list values. + 2010-03-24 Donal K. Fellows * generic/tclOOInfo.c (InfoObjectMethodTypeCmd) @@ -14,7 +19,7 @@ * generic/tclCmdMZ.c (TryPostBody, TryPostHandler): Make sure that the [try] command does not trap unwinding due to limits. -2010-03-24 Don Porter +2010-03-23 Don Porter * generic/tclCmdMZ.c: [Bug 2973361]: Revised fix for computing indices of script arguments to [try]. -- cgit v0.12 From 851cf874f33c0a191357ff2968e12e7a91147b85 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Mar 2010 14:02:10 +0000 Subject: * macosx/tclMacOSXBundle.c, macosx/tclMacOSXFCmd.c: * macosx/tclMacOSXNotify.c: Reduce the level of ifdeffery in the functions of these files to improve readability. They need to be audited for whether complexity can be removed based on the minimum supported version of OSX, but that requires a real expert. --- ChangeLog | 10 +- macosx/tclMacOSXBundle.c | 153 ++++++++++++---------- macosx/tclMacOSXFCmd.c | 152 +++++++++++----------- macosx/tclMacOSXNotify.c | 331 +++++++++++++++++++++++++---------------------- 4 files changed, 351 insertions(+), 295 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5504389..b23c791 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ +2010-03-25 Donal K. Fellows + + * macosx/tclMacOSXBundle.c, macosx/tclMacOSXFCmd.c: + * macosx/tclMacOSXNotify.c: Reduce the level of ifdeffery in the + functions of these files to improve readability. They need to be + audited for whether complexity can be removed based on the minimum + supported version of OSX, but that requires a real expert. + 2010-03-24 Don Porter - * generic/tclResult.c: [Bug 2383005] Revise [return -errorcode] so + * generic/tclResult.c: [Bug 2383005]: Revise [return -errorcode] so * tests/result.test: that it rejects illegal non-list values. 2010-03-24 Donal K. Fellows diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 97124cf..1748ee3 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.16 2009/10/05 02:41:07 das Exp $ + * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.17 2010/03/25 14:02:11 dkf Exp $ */ #include "tclPort.h" @@ -27,7 +27,7 @@ # else # define TCL_DYLD_USE_DLFCN 0 # endif -#endif +#endif /* TCL_DYLD_USE_DLFCN */ #ifndef TCL_DYLD_USE_NSMODULE /* @@ -38,7 +38,7 @@ # else # define TCL_DYLD_USE_NSMODULE 0 # endif -#endif +#endif /* TCL_DYLD_USE_NSMODULE */ #if TCL_DYLD_USE_DLFCN #include @@ -46,10 +46,11 @@ /* * Support for weakly importing dlfcn API. */ -extern void *dlsym(void *handle, const char *symbol) WEAK_IMPORT_ATTRIBUTE; -extern char *dlerror(void) WEAK_IMPORT_ATTRIBUTE; -#endif +extern void * dlsym(void *handle, const char *symbol) + WEAK_IMPORT_ATTRIBUTE; +extern char * dlerror(void) WEAK_IMPORT_ATTRIBUTE; #endif +#endif /* TCL_DYLD_USE_DLFCN */ #if TCL_DYLD_USE_NSMODULE #include @@ -57,21 +58,89 @@ extern char *dlerror(void) WEAK_IMPORT_ATTRIBUTE; #if (TCL_DYLD_USE_DLFCN && MAC_OS_X_VERSION_MIN_REQUIRED < 1040) || \ (MAC_OS_X_VERSION_MIN_REQUIRED < 1050) -MODULE_SCOPE long tclMacOSXDarwinRelease; +MODULE_SCOPE long tclMacOSXDarwinRelease; #endif #ifdef TCL_DEBUG_LOAD -#define TclLoadDbgMsg(m, ...) do { \ - fprintf(stderr, "%s:%d: %s(): " m ".\n", \ - strrchr(__FILE__, '/')+1, __LINE__, __func__, ##__VA_ARGS__); \ - } while (0) +#define TclLoadDbgMsg(m, ...) \ + do { \ + fprintf(stderr, "%s:%d: %s(): " m ".\n", \ + strrchr(__FILE__, '/')+1, __LINE__, __func__, \ + ##__VA_ARGS__); \ + } while (0) #else #define TclLoadDbgMsg(m, ...) -#endif +#endif /* TCL_DEBUG_LOAD */ #endif /* HAVE_COREFOUNDATION */ /* + * Forward declaration of functions defined in this file: + */ + +static short OpenResourceMap(CFBundleRef bundleRef); + +/* + *---------------------------------------------------------------------- + * + * OpenResourceMap -- + * + * Wrapper that dynamically acquires the address for the function + * CFBundleOpenBundleResourceMap before calling it, since it is only + * present in full CoreFoundation on Mac OS X and not in CFLite on pure + * Darwin. Factored out because it is moderately ugly code. + * + *---------------------------------------------------------------------- + */ + +static short +OpenResourceMap( + CFBundleRef bundleRef) +{ + static int initialized = FALSE; + static short (*openresourcemap)(CFBundleRef) = NULL; + + if (!initialized) { +#if TCL_DYLD_USE_DLFCN +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1040 + if (tclMacOSXDarwinRelease >= 8) +#endif + { + openresourcemap = dlsym(RTLD_NEXT, + "CFBundleOpenBundleResourceMap"); +#ifdef TCL_DEBUG_LOAD + if (!openresourcemap) { + const char *errMsg = dlerror(); + + TclLoadDbgMsg("dlsym() failed: %s", errMsg); + } +#endif /* TCL_DEBUG_LOAD */ + } + if (!openresourcemap) +#endif /* TCL_DYLD_USE_DLFCN */ + { +#if TCL_DYLD_USE_NSMODULE + if (NSIsSymbolNameDefinedWithHint( + "_CFBundleOpenBundleResourceMap", "CoreFoundation")) { + NSSymbol nsSymbol = NSLookupAndBindSymbolWithHint( + "_CFBundleOpenBundleResourceMap", "CoreFoundation"); + + if (nsSymbol) { + openresourcemap = NSAddressOfSymbol(nsSymbol); + } + } +#endif /* TCL_DYLD_USE_NSMODULE */ + } + initialized = TRUE; + } + + if (openresourcemap) { + return openresourcemap(bundleRef); + } + return -1; +} + +/* *---------------------------------------------------------------------- * * Tcl_MacOSXOpenBundleResources -- @@ -99,8 +168,8 @@ Tcl_MacOSXOpenBundleResources( int maxPathLen, char *libraryPath) { - return Tcl_MacOSXOpenVersionedBundleResources(interp, bundleName, - NULL, hasResourceFile, maxPathLen, libraryPath); + return Tcl_MacOSXOpenVersionedBundleResources(interp, bundleName, NULL, + hasResourceFile, maxPathLen, libraryPath); } /* @@ -195,54 +264,7 @@ Tcl_MacOSXOpenVersionedBundleResources( if (bundleRef) { if (hasResourceFile) { - /* - * Dynamically acquire address for CFBundleOpenBundleResourceMap - * symbol, since it is only present in full CoreFoundation on Mac - * OS X and not in CFLite on pure Darwin. - */ - - static int initialized = FALSE; - static short (*openresourcemap)(CFBundleRef) = NULL; - - if (!initialized) { -#if TCL_DYLD_USE_DLFCN -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1040 - if (tclMacOSXDarwinRelease >= 8) -#endif - { - const char *errMsg = nil; - openresourcemap = dlsym(RTLD_NEXT, - "CFBundleOpenBundleResourceMap"); - if (!openresourcemap) { - errMsg = dlerror(); - TclLoadDbgMsg("dlsym() failed: %s", errMsg); - } - } - if (!openresourcemap) -#endif - { -#if TCL_DYLD_USE_NSMODULE - NSSymbol nsSymbol = NULL; - if (NSIsSymbolNameDefinedWithHint( - "_CFBundleOpenBundleResourceMap", - "CoreFoundation")) { - nsSymbol = NSLookupAndBindSymbolWithHint( - "_CFBundleOpenBundleResourceMap", - "CoreFoundation"); - if (nsSymbol) { - openresourcemap = NSAddressOfSymbol(nsSymbol); - } - } -#endif - } - initialized = TRUE; - } - - if (openresourcemap) { - short refNum; - - refNum = openresourcemap(bundleRef); - } + (void) OpenResourceMap(bundleRef); } libURL = CFBundleCopyResourceURL(bundleRef, CFSTR("Scripts"), @@ -255,7 +277,7 @@ Tcl_MacOSXOpenVersionedBundleResources( */ CFURLGetFileSystemRepresentation(libURL, TRUE, - (unsigned char*) libraryPath, maxPathLen); + (unsigned char *) libraryPath, maxPathLen); CFRelease(libURL); } if (versionedBundleRef) { @@ -271,12 +293,9 @@ Tcl_MacOSXOpenVersionedBundleResources( if (libraryPath[0]) { return TCL_OK; - } else { - return TCL_ERROR; } -#else /* HAVE_COREFOUNDATION */ - return TCL_ERROR; #endif /* HAVE_COREFOUNDATION */ + return TCL_ERROR; } /* diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c index 7b80a9d..818b91d 100644 --- a/macosx/tclMacOSXFCmd.c +++ b/macosx/tclMacOSXFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.18 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.19 2010/03/25 14:02:11 dkf Exp $ */ #include "tclInt.h" @@ -24,7 +24,7 @@ #ifdef HAVE_COPYFILE #ifdef HAVE_COPYFILE_H #include -#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +#if defined(HAVE_WEAK_IMPORT) && (MAC_OS_X_VERSION_MIN_REQUIRED < 1040) /* Support for weakly importing copyfile. */ #define WEAK_IMPORT_COPYFILE extern int copyfile(const char *from, const char *to, @@ -34,10 +34,10 @@ extern int copyfile(const char *from, const char *to, #else /* HAVE_COPYFILE_H */ int copyfile(const char *from, const char *to, void *state, uint32_t flags); -#define COPYFILE_ACL (1<<0) -#define COPYFILE_XATTR (1<<2) -#define COPYFILE_NOFOLLOW_SRC (1<<18) -#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 +#define COPYFILE_ACL (1<<0) +#define COPYFILE_XATTR (1<<2) +#define COPYFILE_NOFOLLOW_SRC (1<<18) +#if defined(HAVE_WEAK_IMPORT) && (MAC_OS_X_VERSION_MIN_REQUIRED < 1040) /* Support for weakly importing copyfile. */ #define WEAK_IMPORT_COPYFILE extern int copyfile(const char *from, const char *to, @@ -47,6 +47,14 @@ extern int copyfile(const char *from, const char *to, #endif /* HAVE_COPYFILE_H */ #endif /* HAVE_COPYFILE */ +#ifdef WEAK_IMPORT_COPYFILE +#define MayUseCopyFile() (copyfile != NULL) +#elif defined(HAVE_COPYFILE) +#define MayUseCopyFile() (1) +#else +#define MayUseCopyFile() (0) +#endif + #include /* @@ -86,7 +94,7 @@ static const Tcl_ObjType tclOSTypeType = { }; enum { - kIsInvisible = 0x4000, + kIsInvisible = 0x4000, }; #define kFinfoIsInvisible (OSSwapHostToBigConstInt16(kIsInvisible)) @@ -142,8 +150,8 @@ TclMacOSXGetFileAttribute( result = TclpObjStat(fileName, &statBuf); if (result != 0) { - Tcl_AppendResult(interp, "could not read \"", - TclGetString(fileName), "\": ", Tcl_PosixError(interp), NULL); + Tcl_AppendResult(interp, "could not read \"", TclGetString(fileName), + "\": ", Tcl_PosixError(interp), NULL); return TCL_ERROR; } @@ -234,8 +242,8 @@ TclMacOSXSetFileAttribute( result = TclpObjStat(fileName, &statBuf); if (result != 0) { - Tcl_AppendResult(interp, "could not read \"", - TclGetString(fileName), "\": ", Tcl_PosixError(interp), NULL); + Tcl_AppendResult(interp, "could not read \"", TclGetString(fileName), + "\": ", Tcl_PosixError(interp), NULL); return TCL_ERROR; } @@ -300,8 +308,8 @@ TclMacOSXSetFileAttribute( if (result != 0) { Tcl_AppendResult(interp, "could not set attributes of \"", - TclGetString(fileName), "\": ", - Tcl_PosixError(interp), NULL); + TclGetString(fileName), "\": ", Tcl_PosixError(interp), + NULL); return TCL_ERROR; } } else { @@ -320,7 +328,7 @@ TclMacOSXSetFileAttribute( * supported. */ - if(newRsrcForkSize != 0) { + if (newRsrcForkSize != 0) { Tcl_AppendResult(interp, "setting nonzero rsrclength not supported", NULL); return TCL_ERROR; @@ -337,11 +345,13 @@ TclMacOSXSetFileAttribute( result = truncate(Tcl_DStringValue(&ds), (off_t)0); if (result != 0) { /* - * truncate() on a valid resource fork path may fail with - * a permission error in some OS releases, try truncating - * with open() instead: + * truncate() on a valid resource fork path may fail with a + * permission error in some OS releases, try truncating with + * open() instead: */ + int fd = open(Tcl_DStringValue(&ds), O_WRONLY | O_TRUNC); + if (fd > 0) { result = close(fd); } @@ -390,25 +400,21 @@ TclMacOSXCopyFileAttributes( const Tcl_StatBuf *statBufPtr) /* Stat info for source file */ { -#ifdef WEAK_IMPORT_COPYFILE - if (copyfile != NULL) { -#endif + if (MayUseCopyFile()) { #ifdef HAVE_COPYFILE - if (copyfile(src, dst, NULL, COPYFILE_XATTR | - (S_ISLNK(statBufPtr->st_mode) - ? COPYFILE_NOFOLLOW_SRC : COPYFILE_ACL)) < 0) { - return TCL_ERROR; + if (0 == copyfile(src, dst, NULL, (S_ISLNK(statBufPtr->st_mode) + ? COPYFILE_XATTR | COPYFILE_NOFOLLOW_SRC + : COPYFILE_XATTR | COPYFILE_ACL))) { + return TCL_OK; } - return TCL_OK; #endif /* HAVE_COPYFILE */ -#ifdef WEAK_IMPORT_COPYFILE } else { -#endif -#if !defined(HAVE_COPYFILE) || defined(WEAK_IMPORT_COPYFILE) -#ifdef HAVE_GETATTRLIST +#if (!defined(HAVE_COPYFILE) || defined(WEAK_IMPORT_COPYFILE)) && defined(HAVE_GETATTRLIST) struct attrlist alist; fileinfobuf finfo; off_t *rsrcForkSize = (off_t *) &finfo.data; + Tcl_DString srcBuf, dstBuf; + int result; bzero(&alist, sizeof(struct attrlist)); alist.bitmapcount = ATTR_BIT_MAP_COUNT; @@ -417,57 +423,56 @@ TclMacOSXCopyFileAttributes( if (getattrlist(src, &alist, &finfo, sizeof(fileinfobuf), 0)) { return TCL_ERROR; } - if (setattrlist(dst, &alist, &finfo.data, sizeof(finfo.data), 0)) { return TCL_ERROR; } - if (!S_ISDIR(statBufPtr->st_mode)) { - /* - * Only copy non-empty resource fork. - */ - - alist.commonattr = 0; - alist.fileattr = ATTR_FILE_RSRCLENGTH; + /* + * If we're a directory, we're done as they never have resource forks. + */ - if (getattrlist(src, &alist, &finfo, sizeof(fileinfobuf), 0)) { - return TCL_ERROR; - } + if (S_ISDIR(statBufPtr->st_mode)) { + return TCL_OK; + } - if (*rsrcForkSize > 0) { - int result; - Tcl_DString ds_src, ds_dst; + /* + * We only copy a non-empty resource fork, so determine if that's the + * case first. + */ - /* - * Construct paths to resource forks. - */ + alist.commonattr = 0; + alist.fileattr = ATTR_FILE_RSRCLENGTH; + if (getattrlist(src, &alist, &finfo, sizeof(fileinfobuf), 0)) { + return TCL_ERROR; + } else if (*rsrcForkSize == 0) { + return TCL_OK; + } - Tcl_DStringInit(&ds_src); - Tcl_DStringAppend(&ds_src, src, -1); - Tcl_DStringAppend(&ds_src, _PATH_RSRCFORKSPEC, -1); - Tcl_DStringInit(&ds_dst); - Tcl_DStringAppend(&ds_dst, dst, -1); - Tcl_DStringAppend(&ds_dst, _PATH_RSRCFORKSPEC, -1); + /* + * Construct paths to resource forks. + */ - result = TclUnixCopyFile(Tcl_DStringValue(&ds_src), - Tcl_DStringValue(&ds_dst), statBufPtr, 1); + Tcl_DStringInit(&srcBuf); + Tcl_DStringAppend(&srcBuf, src, -1); + Tcl_DStringAppend(&srcBuf, _PATH_RSRCFORKSPEC, -1); + Tcl_DStringInit(&dstBuf); + Tcl_DStringAppend(&dstBuf, dst, -1); + Tcl_DStringAppend(&dstBuf, _PATH_RSRCFORKSPEC, -1); - Tcl_DStringFree(&ds_src); - Tcl_DStringFree(&ds_dst); + /* + * Do the copy. + */ - if (result != 0) { - return TCL_ERROR; - } - } + result = TclUnixCopyFile(Tcl_DStringValue(&srcBuf), + Tcl_DStringValue(&dstBuf), statBufPtr, 1); + Tcl_DStringFree(&srcBuf); + Tcl_DStringFree(&dstBuf); + if (result == 0) { + return TCL_OK; } - return TCL_OK; -#else - return TCL_ERROR; -#endif /* HAVE_GETATTRLIST */ -#endif /* !defined(HAVE_COPYFILE) || defined(WEAK_IMPORT_COPYFILE) */ -#ifdef WEAK_IMPORT_COPYFILE +#endif /* (!HAVE_COPYFILE || WEAK_IMPORT_COPYFILE) && HAVE_GETATTRLIST */ } -#endif + return TCL_ERROR; } /* @@ -491,11 +496,11 @@ TclMacOSXCopyFileAttributes( int TclMacOSXMatchType( - Tcl_Interp *interp, /* Interpreter to receive errors. */ - const char *pathName, /* Native path to check. */ - const char *fileName, /* Native filename to check. */ - Tcl_StatBuf *statBufPtr, /* Stat info for file to check */ - Tcl_GlobTypeData *types) /* Type description to match against. */ + Tcl_Interp *interp, /* Interpreter to receive errors. */ + const char *pathName, /* Native path to check. */ + const char *fileName, /* Native filename to check. */ + Tcl_StatBuf *statBufPtr, /* Stat info for file to check */ + Tcl_GlobTypeData *types) /* Type description to match against. */ { #ifdef HAVE_GETATTRLIST struct attrlist alist; @@ -676,7 +681,8 @@ SetOSTypeFromAny( static void UpdateStringOfOSType( - register Tcl_Obj *objPtr) /* OSType object whose string rep to update. */ + register Tcl_Obj *objPtr) /* OSType object whose string rep to + * update. */ { char string[5]; OSType osType = (OSType) objPtr->internalRep.longValue; diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 2fae4b6..f65f6e6 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.28 2009/08/24 00:27:47 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.29 2010/03/25 14:02:12 dkf Exp $ */ #include "tclInt.h" @@ -48,22 +48,30 @@ #define VOLATILE volatile #else #define VOLATILE -#endif +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 */ #ifndef bool #define bool int #endif -extern void OSSpinLockLock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; -extern void OSSpinLockUnlock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; -extern bool OSSpinLockTry(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; -extern void _spin_lock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; -extern void _spin_unlock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; -extern bool _spin_lock_try(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; +extern void OSSpinLockLock(VOLATILE OSSpinLock *lock) + WEAK_IMPORT_ATTRIBUTE; +extern void OSSpinLockUnlock(VOLATILE OSSpinLock *lock) + WEAK_IMPORT_ATTRIBUTE; +extern bool OSSpinLockTry(VOLATILE OSSpinLock *lock) + WEAK_IMPORT_ATTRIBUTE; +extern void _spin_lock(VOLATILE OSSpinLock *lock) + WEAK_IMPORT_ATTRIBUTE; +extern void _spin_unlock(VOLATILE OSSpinLock *lock) + WEAK_IMPORT_ATTRIBUTE; +extern bool _spin_lock_try(VOLATILE OSSpinLock *lock) + WEAK_IMPORT_ATTRIBUTE; static void (* lockLock)(VOLATILE OSSpinLock *lock) = NULL; static void (* lockUnlock)(VOLATILE OSSpinLock *lock) = NULL; static bool (* lockTry)(VOLATILE OSSpinLock *lock) = NULL; #undef VOLATILE static pthread_once_t spinLockLockInitControl = PTHREAD_ONCE_INIT; -static void SpinLockLockInit(void) { +static void +SpinLockLockInit(void) +{ lockLock = OSSpinLockLock != NULL ? OSSpinLockLock : _spin_lock; lockUnlock = OSSpinLockUnlock != NULL ? OSSpinLockUnlock : _spin_unlock; lockTry = OSSpinLockTry != NULL ? OSSpinLockTry : _spin_lock_try; @@ -73,13 +81,13 @@ static void SpinLockLockInit(void) { } #define SpinLockLock(p) lockLock(p) #define SpinLockUnlock(p) lockUnlock(p) -#define SpinLockTry(p) lockTry(p) +#define SpinLockTry(p) lockTry(p) #else #define SpinLockLock(p) OSSpinLockLock(p) #define SpinLockUnlock(p) OSSpinLockUnlock(p) -#define SpinLockTry(p) OSSpinLockTry(p) +#define SpinLockTry(p) OSSpinLockTry(p) #endif /* HAVE_WEAK_IMPORT */ -#define SPINLOCK_INIT OS_SPINLOCK_INIT +#define SPINLOCK_INIT OS_SPINLOCK_INIT #else /* @@ -87,13 +95,13 @@ static void SpinLockLockInit(void) { */ typedef uint32_t OSSpinLock; -extern void _spin_lock(OSSpinLock *lock); -extern void _spin_unlock(OSSpinLock *lock); -extern int _spin_lock_try(OSSpinLock *lock); +extern void _spin_lock(OSSpinLock *lock); +extern void _spin_unlock(OSSpinLock *lock); +extern int _spin_lock_try(OSSpinLock *lock); #define SpinLockLock(p) _spin_lock(p) #define SpinLockUnlock(p) _spin_unlock(p) -#define SpinLockTry(p) _spin_lock_try(p) -#define SPINLOCK_INIT 0 +#define SpinLockTry(p) _spin_lock_try(p) +#define SPINLOCK_INIT 0 #endif /* HAVE_LIBKERN_OSATOMIC_H && HAVE_OSSPINLOCKLOCK */ @@ -116,23 +124,27 @@ static OSSpinLock notifierLock = SPINLOCK_INIT; #define UNLOCK_NOTIFIER_TSD SpinLockUnlock(&tsdPtr->tsdLock) #ifdef TCL_MAC_DEBUG_NOTIFIER -#define TclMacOSXNotifierDbgMsg(m, ...) do { \ - fprintf(notifierLog?notifierLog:stderr, "tclMacOSXNotify.c:%d: " \ - "%s() pid %5d thread %10p: " m "\n", __LINE__, __func__, \ - getpid(), pthread_self(), ##__VA_ARGS__); \ - fflush(notifierLog?notifierLog:stderr); \ - } while (0) +#define TclMacOSXNotifierDbgMsg(m, ...) \ + do { \ + fprintf(notifierLog?notifierLog:stderr, "tclMacOSXNotify.c:%d: " \ + "%s() pid %5d thread %10p: " m "\n", __LINE__, __func__, \ + getpid(), pthread_self(), ##__VA_ARGS__); \ + fflush(notifierLog?notifierLog:stderr); \ + } while (0) /* * Debug version of SpinLockLock that logs the time spent waiting for the lock */ -#define SpinLockLockDbg(p) if (!SpinLockTry(p)) { \ - Tcl_WideInt s = TclpGetWideClicks(), e; \ - SpinLockLock(p); e = TclpGetWideClicks(); \ - TclMacOSXNotifierDbgMsg("waited on %s for %8.0f ns", \ - #p, TclpWideClicksToNanoseconds(e-s)); \ - } +#define SpinLockLockDbg(p) \ + if (!SpinLockTry(p)) { \ + Tcl_WideInt s = TclpGetWideClicks(), e; \ + \ + SpinLockLock(p); \ + e = TclpGetWideClicks(); \ + TclMacOSXNotifierDbgMsg("waited on %s for %8.0f ns", \ + #p, TclpWideClicksToNanoseconds(e-s)); \ + } #undef LOCK_NOTIFIER_INIT #define LOCK_NOTIFIER_INIT SpinLockLockDbg(¬ifierInitLock) #undef LOCK_NOTIFIER @@ -144,42 +156,44 @@ static FILE *notifierLog = NULL; #ifndef NOTIFIER_LOG #define NOTIFIER_LOG "/tmp/tclMacOSXNotify.log" #endif -#define OPEN_NOTIFIER_LOG if (!notifierLog) { \ - notifierLog = fopen(NOTIFIER_LOG, "a"); \ - /*TclMacOSXNotifierDbgMsg("open log"); \ - asl_set_filter(NULL, \ - ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); \ - asl_add_log_file(NULL, \ - fileno(notifierLog));*/ \ - } -#define CLOSE_NOTIFIER_LOG if (notifierLog) { \ - /*asl_remove_log_file(NULL, \ - fileno(notifierLog)); \ - TclMacOSXNotifierDbgMsg("close log");*/ \ - fclose(notifierLog); \ - notifierLog = NULL; \ - } -#define ENABLE_ASL if (notifierLog) { \ - /*tsdPtr->asl = asl_open(NULL, "com.apple.console", ASL_OPT_NO_REMOTE); \ - asl_set_filter(tsdPtr->asl, \ - ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); \ - asl_add_log_file(tsdPtr->asl, \ - fileno(notifierLog));*/ \ - } -#define DISABLE_ASL /*if (tsdPtr->asl) { \ - if (notifierLog) { \ - asl_remove_log_file(tsdPtr->asl, \ - fileno(notifierLog)); \ - } \ - asl_close(tsdPtr->asl); \ - }*/ -#define ASLCLIENT /*aslclient asl*/ +#define OPEN_NOTIFIER_LOG \ + if (!notifierLog) { \ + notifierLog = fopen(NOTIFIER_LOG, "a"); \ + /*TclMacOSXNotifierDbgMsg("open log"); \ + *asl_set_filter(NULL, \ + * ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); \ + *asl_add_log_file(NULL, fileno(notifierLog));*/ \ + } +#define CLOSE_NOTIFIER_LOG \ + if (notifierLog) { \ + /*asl_remove_log_file(NULL, fileno(notifierLog)); \ + *TclMacOSXNotifierDbgMsg("close log");*/ \ + fclose(notifierLog); \ + notifierLog = NULL; \ + } +#define ENABLE_ASL \ + if (notifierLog) { \ + /*tsdPtr->asl = asl_open(NULL, "com.apple.console", \ + * ASL_OPT_NO_REMOTE); \ + *asl_set_filter(tsdPtr->asl, \ + * ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); \ + *asl_add_log_file(tsdPtr->asl, fileno(notifierLog));*/ \ + } +#define DISABLE_ASL \ + /*if (tsdPtr->asl) { \ + * if (notifierLog) { \ + * asl_remove_log_file(tsdPtr->asl, fileno(notifierLog)); \ + * } \ + * asl_close(tsdPtr->asl); \ + *}*/ +#define ASLCLIENT_DECL /*aslclient asl*/ #else #define TclMacOSXNotifierDbgMsg(m, ...) #define OPEN_NOTIFIER_LOG #define CLOSE_NOTIFIER_LOG #define ENABLE_ASL #define DISABLE_ASL +#define ASLCLIENT_DECL #endif /* TCL_MAC_DEBUG_NOTIFIER */ /* @@ -236,28 +250,30 @@ typedef struct ThreadSpecificData { FileHandler *firstFileHandlerPtr; /* Pointer to head of file handler list. */ int polled; /* True if the notifier thread has polled for - * this thread. - */ + * this thread. */ int sleeping; /* True if runloop is inside Tcl_Sleep. */ int runLoopSourcePerformed; /* True after the runLoopSource callack was * performed. */ - int runLoopRunning; /* True if this thread's Tcl runLoop is running */ - int runLoopNestingLevel; /* Level of nested runLoop invocations */ + int runLoopRunning; /* True if this thread's Tcl runLoop is + * running. */ + int runLoopNestingLevel; /* Level of nested runLoop invocations. */ int runLoopServicingEvents; /* True if this thread's runLoop is servicing - * tcl events */ + * Tcl events. */ + /* Must hold the notifierLock before accessing the following fields: */ /* Start notifierLock section */ - int onList; /* True if this thread is on the waitingList */ + int onList; /* True if this thread is on the + * waitingList */ struct ThreadSpecificData *nextPtr, *prevPtr; /* All threads that are currently waiting on * an event have their ThreadSpecificData * structure on a doubly-linked listed formed - * from these pointers. - */ + * from these pointers. */ /* End notifierLock section */ + OSSpinLock tsdLock; /* Must hold this lock before acessing the - * following fields from more than one thread. - */ + * following fields from more than one + * thread. */ /* Start tsdLock section */ SelectMasks checkMasks; /* This structure is used to build up the * masks to be used in the next call to @@ -269,9 +285,11 @@ typedef struct ThreadSpecificData { int numFdBits; /* Number of valid bits in checkMasks (one * more than highest fd for which * Tcl_WatchFile has been called). */ - int polling; /* True if this thread is polling for events */ + int polling; /* True if this thread is polling for + * events. */ CFRunLoopRef runLoop; /* This thread's CFRunLoop, needs to be woken - * up whenever the runLoopSource is signaled */ + * up whenever the runLoopSource is + * signaled. */ CFRunLoopSourceRef runLoopSource; /* Any other thread alerts a notifier that an * event is ready to be processed by signaling @@ -283,11 +301,10 @@ typedef struct ThreadSpecificData { /* Wakes up CFRunLoop after given timeout when * running embedded. */ /* End tsdLock section */ + CFTimeInterval waitTime; /* runLoopTimer wait time when running * embedded. */ -#ifdef TCL_MAC_DEBUG_NOTIFIER - ASLCLIENT; -#endif + ASLCLIENT_DECL; } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; @@ -337,8 +354,8 @@ static int receivePipe = -1; /* Output end of triggerPipe */ static int notifierThreadRunning; /* - * This is the thread ID of the notifier thread that does select. - * Only valid when notifierThreadRunning is non-zero. + * This is the thread ID of the notifier thread that does select. Only valid + * when notifierThreadRunning is non-zero. * * You must hold the notifierInitLock before accessing this variable. */ @@ -347,7 +364,7 @@ static pthread_t notifierThread; /* * Custom runloop mode for running with only the runloop source for the - * notifier thread + * notifier thread. */ #ifndef TCL_EVENTS_ONLY_RUN_LOOP_MODE @@ -369,38 +386,45 @@ static CFStringRef tclEventsOnlyRunLoopMode = NULL; * Static routines defined in this file. */ -static void StartNotifierThread(void); -static void NotifierThreadProc(ClientData clientData) - __attribute__ ((__noreturn__)); -static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); -static void TimerWakeUp(CFRunLoopTimerRef timer, void *info); -static void QueueFileEvents(void *info); -static void UpdateWaitingListAndServiceEvents(CFRunLoopObserverRef observer, - CFRunLoopActivity activity, void *info); -static int OnOffWaitingList(ThreadSpecificData *tsdPtr, int onList, - int signalNotifier); +static void StartNotifierThread(void); +static void NotifierThreadProc(ClientData clientData) + __attribute__ ((__noreturn__)); +static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); +static void TimerWakeUp(CFRunLoopTimerRef timer, void *info); +static void QueueFileEvents(void *info); +static void UpdateWaitingListAndServiceEvents( + CFRunLoopObserverRef observer, + CFRunLoopActivity activity, void *info); +static int OnOffWaitingList(ThreadSpecificData *tsdPtr, + int onList, int signalNotifier); #ifdef HAVE_PTHREAD_ATFORK -static int atForkInit = 0; -static void AtForkPrepare(void); -static void AtForkParent(void); -static void AtForkChild(void); +static int atForkInit = 0; +static void AtForkPrepare(void); +static void AtForkParent(void); +static void AtForkChild(void); #if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040 /* Support for weakly importing pthread_atfork. */ #define WEAK_IMPORT_PTHREAD_ATFORK -extern int pthread_atfork(void (*prepare)(void), void (*parent)(void), - void (*child)(void)) WEAK_IMPORT_ATTRIBUTE; +extern int pthread_atfork(void (*prepare)(void), + void (*parent)(void), void (*child)(void)) + WEAK_IMPORT_ATTRIBUTE; +#define MayUsePthreadAtfork() (pthread_atfork != NULL) +#else +#define MayUsePthreadAtfork() (1) #endif /* HAVE_WEAK_IMPORT */ + /* * On Darwin 9 and later, it is not possible to call CoreFoundation after * a fork. */ + #if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || \ MAC_OS_X_VERSION_MIN_REQUIRED < 1050 MODULE_SCOPE long tclMacOSXDarwinRelease; -#define noCFafterFork (tclMacOSXDarwinRelease >= 9) +#define noCFafterFork (tclMacOSXDarwinRelease >= 9) #else /* MAC_OS_X_VERSION_MIN_REQUIRED */ -#define noCFafterFork 1 +#define noCFafterFork 1 #endif /* MAC_OS_X_VERSION_MIN_REQUIRED */ #endif /* HAVE_PTHREAD_ATFORK */ @@ -516,11 +540,7 @@ Tcl_InitNotifier(void) * child of a fork. */ - if ( -#ifdef WEAK_IMPORT_PTHREAD_ATFORK - pthread_atfork != NULL && -#endif - !atForkInit) { + if (MayUsePthreadAtfork() && !atForkInit) { int result = pthread_atfork(AtForkPrepare, AtForkParent, AtForkChild); if (result) { @@ -528,7 +548,7 @@ Tcl_InitNotifier(void) } atForkInit = 1; } -#endif +#endif /* HAVE_PTHREAD_ATFORK */ if (notifierCount == 0) { int fds[2], status; @@ -569,7 +589,7 @@ Tcl_InitNotifier(void) notifierCount++; UNLOCK_NOTIFIER_INIT; - return (ClientData) tsdPtr; + return tsdPtr; } /* @@ -695,10 +715,10 @@ Tcl_FinalizeNotifier( * terminate. The notifier will return from its call to select() * and notice that a "q" message has arrived, it will then close * its side of the pipe and terminate its thread. Note the we can - * not just close the pipe and check for EOF in the notifier thread - * because if a background child process was created with exec, - * select() would not register the EOF on the pipe until the child - * processes had terminated. [Bug: 4139] [Bug: 1222872] + * not just close the pipe and check for EOF in the notifier + * thread because if a background child process was created with + * exec, select() would not register the EOF on the pipe until the + * child processes had terminated. [Bug: 4139] [Bug 1222872] */ write(triggerPipe, "q", 1); @@ -821,7 +841,7 @@ Tcl_SetTimer( return; } if (timePtr) { - Tcl_Time vTime = *timePtr; + Tcl_Time vTime = *timePtr; if (vTime.sec != 0 || vTime.usec != 0) { tclScaleTimeProcPtr(&vTime, tclTimeClientData); @@ -965,19 +985,19 @@ Tcl_CreateFileHandler( LOCK_NOTIFIER_TSD; if (mask & TCL_READABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.readable)); + FD_SET(fd, &tsdPtr->checkMasks.readable); } else { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + FD_CLR(fd, &tsdPtr->checkMasks.readable); } if (mask & TCL_WRITABLE) { - FD_SET(fd, &(tsdPtr->checkMasks.writable)); + FD_SET(fd, &tsdPtr->checkMasks.writable); } else { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + FD_CLR(fd, &tsdPtr->checkMasks.writable); } if (mask & TCL_EXCEPTION) { - FD_SET(fd, &(tsdPtr->checkMasks.exceptional)); + FD_SET(fd, &tsdPtr->checkMasks.exceptional); } else { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + FD_CLR(fd, &tsdPtr->checkMasks.exceptional); } if (tsdPtr->numFdBits <= fd) { tsdPtr->numFdBits = fd+1; @@ -1039,9 +1059,9 @@ Tcl_DeleteFileHandler( if (fd+1 == tsdPtr->numFdBits) { numFdBits = 0; for (i = fd-1; i >= 0; i--) { - if (FD_ISSET(i, &(tsdPtr->checkMasks.readable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.writable)) - || FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { + if (FD_ISSET(i, &tsdPtr->checkMasks.readable) + || FD_ISSET(i, &tsdPtr->checkMasks.writable) + || FD_ISSET(i, &tsdPtr->checkMasks.exceptional)) { numFdBits = i+1; break; } @@ -1058,13 +1078,13 @@ Tcl_DeleteFileHandler( */ if (filePtr->mask & TCL_READABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.readable)); + FD_CLR(fd, &tsdPtr->checkMasks.readable); } if (filePtr->mask & TCL_WRITABLE) { - FD_CLR(fd, &(tsdPtr->checkMasks.writable)); + FD_CLR(fd, &tsdPtr->checkMasks.writable); } if (filePtr->mask & TCL_EXCEPTION) { - FD_CLR(fd, &(tsdPtr->checkMasks.exceptional)); + FD_CLR(fd, &tsdPtr->checkMasks.exceptional); } UNLOCK_NOTIFIER_TSD; @@ -1148,13 +1168,13 @@ FileHandlerEventProc( if (mask != 0) { LOCK_NOTIFIER_TSD; if (mask & TCL_READABLE) { - FD_CLR(filePtr->fd, &(tsdPtr->readyMasks.readable)); + FD_CLR(filePtr->fd, &tsdPtr->readyMasks.readable); } if (mask & TCL_WRITABLE) { - FD_CLR(filePtr->fd, &(tsdPtr->readyMasks.writable)); + FD_CLR(filePtr->fd, &tsdPtr->readyMasks.writable); } if (mask & TCL_EXCEPTION) { - FD_CLR(filePtr->fd, &(tsdPtr->readyMasks.exceptional)); + FD_CLR(filePtr->fd, &tsdPtr->readyMasks.exceptional); } UNLOCK_NOTIFIER_TSD; filePtr->proc(filePtr->clientData, mask); @@ -1205,7 +1225,7 @@ Tcl_WaitForEvent( } if (timePtr) { - Tcl_Time vTime = *timePtr; + Tcl_Time vTime = *timePtr; /* * TIP #233 (Virtualized Time). Is virtual time in effect? And do we @@ -1256,7 +1276,7 @@ Tcl_WaitForEvent( UNLOCK_NOTIFIER_TSD; switch (runLoopStatus) { case kCFRunLoopRunFinished: - Tcl_Panic("Tcl_WaitForEvent: CFRunLoop finished"); + Tcl_Panic("Tcl_WaitForEvent: CFRunLoop finished"); break; case kCFRunLoopRunTimedOut: QueueFileEvents(tsdPtr); @@ -1293,19 +1313,19 @@ QueueFileEvents( { SelectMasks readyMasks; FileHandler *filePtr; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) info; + ThreadSpecificData *tsdPtr = info; /* * Queue all detected file events. */ LOCK_NOTIFIER_TSD; - FD_COPY(&(tsdPtr->readyMasks.readable), &readyMasks.readable); - FD_COPY(&(tsdPtr->readyMasks.writable), &readyMasks.writable); - FD_COPY(&(tsdPtr->readyMasks.exceptional), &readyMasks.exceptional); - FD_ZERO(&(tsdPtr->readyMasks.readable)); - FD_ZERO(&(tsdPtr->readyMasks.writable)); - FD_ZERO(&(tsdPtr->readyMasks.exceptional)); + FD_COPY(&tsdPtr->readyMasks.readable, &readyMasks.readable); + FD_COPY(&tsdPtr->readyMasks.writable, &readyMasks.writable); + FD_COPY(&tsdPtr->readyMasks.exceptional, &readyMasks.exceptional); + FD_ZERO(&tsdPtr->readyMasks.readable); + FD_ZERO(&tsdPtr->readyMasks.writable); + FD_ZERO(&tsdPtr->readyMasks.exceptional); UNLOCK_NOTIFIER_TSD; tsdPtr->runLoopSourcePerformed = 1; @@ -1365,7 +1385,7 @@ UpdateWaitingListAndServiceEvents( CFRunLoopActivity activity, void *info) { - ThreadSpecificData *tsdPtr = (ThreadSpecificData*) info; + ThreadSpecificData *tsdPtr = info; if (tsdPtr->sleeping) { return; @@ -1376,7 +1396,7 @@ UpdateWaitingListAndServiceEvents( if (tsdPtr->numFdBits > 0 || tsdPtr->polling) { LOCK_NOTIFIER; if (!OnOffWaitingList(tsdPtr, 1, 1) && tsdPtr->polling) { - write(triggerPipe, "", 1); + write(triggerPipe, "", 1); } UNLOCK_NOTIFIER; } @@ -1391,7 +1411,8 @@ UpdateWaitingListAndServiceEvents( break; case kCFRunLoopBeforeWaiting: if (tsdPtr->runLoopTimer && !tsdPtr->runLoopServicingEvents && - (tsdPtr->runLoopNestingLevel > 1 || !tsdPtr->runLoopRunning)) { + (tsdPtr->runLoopNestingLevel > 1 + || !tsdPtr->runLoopRunning)) { tsdPtr->runLoopServicingEvents = 1; while (Tcl_ServiceAll() && tsdPtr->waitTime == 0) {} tsdPtr->runLoopServicingEvents = 0; @@ -1407,8 +1428,8 @@ UpdateWaitingListAndServiceEvents( * * OnOffWaitingList -- * - * Add/remove the specified thread to/from the global waitingList - * and optionally signal the notifier. + * Add/remove the specified thread to/from the global waitingList and + * optionally signal the notifier. * * !!! Requires notifierLock to be held !!! * @@ -1428,8 +1449,9 @@ OnOffWaitingList( int signalNotifier) { int changeWaitingList; + #ifdef TCL_MAC_DEBUG_NOTIFIER - if(SpinLockTry(¬ifierLock)) { + if (SpinLockTry(¬ifierLock)) { Tcl_Panic("OnOffWaitingList: notifierLock unlocked"); } #endif @@ -1456,7 +1478,7 @@ OnOffWaitingList( tsdPtr->onList = 0; } if (signalNotifier) { - write(triggerPipe, "", 1); + write(triggerPipe, "", 1); } } @@ -1494,7 +1516,7 @@ Tcl_Sleep( * TIP #233: Scale from virtual time to real-time. */ - vdelay.sec = ms / 1000; + vdelay.sec = ms / 1000; vdelay.usec = (ms % 1000) * 1000; tclScaleTimeProcPtr(&vdelay, tclTimeClientData); @@ -1520,8 +1542,8 @@ Tcl_Sleep( } tsdPtr->sleeping = 1; do { - runLoopStatus = CFRunLoopRunInMode(kCFRunLoopDefaultMode, waitTime, - FALSE); + runLoopStatus = CFRunLoopRunInMode(kCFRunLoopDefaultMode, + waitTime, FALSE); switch (runLoopStatus) { case kCFRunLoopRunFinished: Tcl_Panic("Tcl_Sleep: CFRunLoop finished"); @@ -1657,10 +1679,10 @@ TclUnixWaitForFile( * Setup the select masks for the fd. */ - if (mask & TCL_READABLE) { + if (mask & TCL_READABLE) { FD_SET(fd, &readableMask); } - if (mask & TCL_WRITABLE) { + if (mask & TCL_WRITABLE) { FD_SET(fd, &writableMask); } if (mask & TCL_EXCEPTION) { @@ -1674,10 +1696,10 @@ TclUnixWaitForFile( numFound = select(fd + 1, &readableMask, &writableMask, &exceptionalMask, timeoutPtr); if (numFound == 1) { - if (FD_ISSET(fd, &readableMask)) { + if (FD_ISSET(fd, &readableMask)) { SET_BITS(result, TCL_READABLE); } - if (FD_ISSET(fd, &writableMask)) { + if (FD_ISSET(fd, &writableMask)) { SET_BITS(result, TCL_WRITABLE); } if (FD_ISSET(fd, &exceptionalMask)) { @@ -1761,13 +1783,13 @@ NotifierThreadProc( for (tsdPtr = waitingListPtr; tsdPtr; tsdPtr = tsdPtr->nextPtr) { LOCK_NOTIFIER_TSD; for (i = tsdPtr->numFdBits-1; i >= 0; --i) { - if (FD_ISSET(i, &(tsdPtr->checkMasks.readable))) { + if (FD_ISSET(i, &tsdPtr->checkMasks.readable)) { FD_SET(i, &readableMask); } - if (FD_ISSET(i, &(tsdPtr->checkMasks.writable))) { + if (FD_ISSET(i, &tsdPtr->checkMasks.writable)) { FD_SET(i, &writableMask); } - if (FD_ISSET(i, &(tsdPtr->checkMasks.exceptional))) { + if (FD_ISSET(i, &tsdPtr->checkMasks.exceptional)) { FD_SET(i, &exceptionalMask); } } @@ -1810,9 +1832,9 @@ NotifierThreadProc( SelectMasks readyMasks, checkMasks; LOCK_NOTIFIER_TSD; - FD_COPY(&(tsdPtr->checkMasks.readable), &checkMasks.readable); - FD_COPY(&(tsdPtr->checkMasks.writable), &checkMasks.writable); - FD_COPY(&(tsdPtr->checkMasks.exceptional), &checkMasks.exceptional); + FD_COPY(&tsdPtr->checkMasks.readable, &checkMasks.readable); + FD_COPY(&tsdPtr->checkMasks.writable, &checkMasks.writable); + FD_COPY(&tsdPtr->checkMasks.exceptional, &checkMasks.exceptional); UNLOCK_NOTIFIER_TSD; found = tsdPtr->polled; FD_ZERO(&readyMasks.readable); @@ -1848,9 +1870,10 @@ NotifierThreadProc( OnOffWaitingList(tsdPtr, 0, 0); LOCK_NOTIFIER_TSD; - FD_COPY(&readyMasks.readable, &(tsdPtr->readyMasks.readable)); - FD_COPY(&readyMasks.writable, &(tsdPtr->readyMasks.writable)); - FD_COPY(&readyMasks.exceptional, &(tsdPtr->readyMasks.exceptional)); + FD_COPY(&readyMasks.readable, &tsdPtr->readyMasks.readable); + FD_COPY(&readyMasks.writable, &tsdPtr->readyMasks.writable); + FD_COPY(&readyMasks.exceptional, + &tsdPtr->readyMasks.exceptional); UNLOCK_NOTIFIER_TSD; tsdPtr->polled = 0; if (tsdPtr->runLoop) { -- cgit v0.12 From 79109281ed47427b88e1cc5eae8325954cc7de80 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 25 Mar 2010 14:53:35 +0000 Subject: * unix/tclUnixFCmd.c (TclUnixCopyFile): [Bug 2976504]: Corrected number of arguments to fstatfs() call. --- ChangeLog | 3 +++ unix/tclUnixFCmd.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b23c791..621065e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-03-25 Donal K. Fellows + * unix/tclUnixFCmd.c (TclUnixCopyFile): [Bug 2976504]: Corrected + number of arguments to fstatfs() call. + * macosx/tclMacOSXBundle.c, macosx/tclMacOSXFCmd.c: * macosx/tclMacOSXNotify.c: Reduce the level of ifdeffery in the functions of these files to improve readability. They need to be diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 851c979..daa40da 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFCmd.c,v 1.75 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.76 2010/03/25 14:53:35 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has the * following copyright notice: @@ -554,7 +554,7 @@ TclUnixCopyFile( { struct statfs fs; - if (fstatfs(srcFd, &fs, sizeof(fs), 0) == 0) { + if (fstatfs(srcFd, &fs) == 0) { blockSize = fs.f_bsize; } else { blockSize = DEFAULT_COPY_BLOCK_SIZE; -- cgit v0.12 From 05f862b0622794e90c90544b62b929ac0f47753c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 26 Mar 2010 09:43:51 +0000 Subject: [Bug 2976508] tcl HEAD fails on HP-UX --- ChangeLog | 4 ++++ generic/tclExecute.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 621065e..b636744 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-03-26 Jan Nijtmans + + * generic/tclExecute.c [Bug 2976508] tcl HEAD fails on HP-UX + 2010-03-25 Donal K. Fellows * unix/tclUnixFCmd.c (TclUnixCopyFile): [Bug 2976504]: Corrected diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d4bcae0..f12fb4d 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.474 2010/02/24 10:49:04 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.475 2010/03/26 09:43:51 nijtmans Exp $ */ #include "tclInt.h" @@ -1922,7 +1922,7 @@ TclExecuteByteCode( NULL, NULL, NULL, - &iPtr->execEnvPtr->constants[0], + NULL, 0, 0, NULL, @@ -1977,6 +1977,7 @@ TclExecuteByteCode( char cmdNameBuf[21]; #endif + TAUX.constants = &iPtr->execEnvPtr->constants[0]; if (!codePtr) { CoroutineData *corPtr; -- cgit v0.12 From 419d5645c272033992ce63a5c714a64436e9f189 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 27 Mar 2010 22:40:13 +0000 Subject: [Freq 2974744] share exception codes (ObjType?) --- ChangeLog | 7 +++++ generic/tclCmdMZ.c | 15 ++-------- generic/tclCompCmdsSZ.c | 9 ++---- generic/tclInt.h | 4 ++- generic/tclResult.c | 75 ++++++++++++++++++++++++++++++++++--------------- 5 files changed, 67 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index b636744..49b408c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-27 Jan Nijtmans + + * generic/tclInt.h [Freq 2974744] share exception codes (ObjType?) + * generic/tclResult.c + * generic/tclCmdMZ.c + * generic/tclCompCmdsSZ.c + 2010-03-26 Jan Nijtmans * generic/tclExecute.c [Bug 2976508] tcl HEAD fails on HP-UX diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index e63e07c..618bb6b 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.209 2010/03/24 10:25:59 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.210 2010/03/27 22:40:13 nijtmans Exp $ */ #include "tclInt.h" @@ -4165,9 +4165,6 @@ TclNRTryObjCmd( enum Handlers { TryFinally, TryOn, TryTrap }; - static const char *const returnCodes[] = { - "ok", "error", "return", "break", "continue", NULL - }; /* * Parse the arguments. The handlers are passed to subsequent callbacks as @@ -4217,15 +4214,7 @@ TclNRTryObjCmd( Tcl_DecrRefCount(handlersObj); return TCL_ERROR; } - if (Tcl_GetIntFromObj(NULL, objv[i+1], &code) != TCL_OK - && Tcl_GetIndexFromObj(NULL, objv[i+1], returnCodes, - "code", 0, &code) != TCL_OK) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "bad completion code \"", - TclGetString(objv[i+1]), - "\": must be ok, error, return, break, " - "continue, or an integer", NULL); - Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); + if (TCL_ERROR == TclGetCompletionCodeFromObj(interp, objv[i+1], &code)) { Tcl_DecrRefCount(handlersObj); return TCL_ERROR; } diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index d8fdcd1..b19dfc8 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.6 2010/03/23 12:58:39 nijtmans Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.7 2010/03/27 22:40:14 nijtmans Exp $ */ #include "tclInt.h" @@ -1992,9 +1992,6 @@ TclCompileTryCmd( } else if (tokenPtr[1].size == 2 && !strncmp(tokenPtr[1].start, "on", 2)) { int code; - static const char *const returnCodes[] = { - "ok", "error", "return", "break", "continue", NULL - }; /* * Parse the result code to look for. @@ -2007,9 +2004,7 @@ TclCompileTryCmd( TclDecrRefCount(tmpObj); goto failedToCompile; } - if (Tcl_GetIntFromObj(NULL, tmpObj, &code) != TCL_OK - && Tcl_GetIndexFromObj(NULL, tmpObj, returnCodes, "", - TCL_EXACT, &code) != TCL_OK) { + if (TCL_ERROR == TclGetCompletionCodeFromObj(NULL, tmpObj, &code)) { TclDecrRefCount(tmpObj); goto failedToCompile; } diff --git a/generic/tclInt.h b/generic/tclInt.h index 9661894..422e203 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.465 2010/03/19 11:54:07 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.466 2010/03/27 22:40:14 nijtmans Exp $ */ #ifndef _TCLINT @@ -2870,6 +2870,8 @@ MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp); MODULE_SCOPE int TclGetChannelFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Channel *chanPtr, int *modePtr, int flags); +MODULE_SCOPE int TclGetCompletionCodeFromObj(Tcl_Interp *interp, + Tcl_Obj *value, int *code); MODULE_SCOPE int TclGetNumberFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, ClientData *clientDataPtr, int *typePtr); diff --git a/generic/tclResult.c b/generic/tclResult.c index 3c329f1..4fcd285 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.58 2010/03/24 15:33:14 dgp Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.59 2010/03/27 22:40:14 nijtmans Exp $ */ #include "tclInt.h" @@ -1292,12 +1292,61 @@ TclProcessReturn( /* *---------------------------------------------------------------------- * + * TclGetCompletionCodeFromObj -- + * + * Parses Completion code Code + * + * Results: + * Returns TCL_ERROR if the value is an invalid completion code. + * Otherwise, returns TCL_OK, and writes the completion code to + * the pointer provided. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +TclGetCompletionCodeFromObj( + Tcl_Interp *interp, /* Current interpreter. */ + Tcl_Obj *value, + int *code) /* Argument objects. */ +{ + if (TCL_ERROR == TclGetIntFromObj(NULL, value, code)) { + static const char *const returnCodes[] = { + "ok", "error", "return", "break", "continue", NULL + }; + + if (TCL_ERROR == Tcl_GetIndexFromObj(NULL, value, returnCodes, + NULL, TCL_EXACT, code)) { + /* + * Value is not a legal return code. + */ + + if (interp != NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "bad completion code \"", + TclGetString(value), + "\": must be ok, error, return, break, " + "continue, or an integer", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); + } + return TCL_ERROR; + } + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclMergeReturnOptions -- * * Parses, checks, and stores the options to the [return] command. * * Results: - * Returns TCL_ERROR is any of the option values are invalid. Otherwise, + * Returns TCL_ERROR if any of the option values are invalid. Otherwise, * returns TCL_OK, and writes the returnOpts, code, and level values to * the pointers provided. * @@ -1377,28 +1426,10 @@ TclMergeReturnOptions( */ Tcl_DictObjGet(NULL, returnOpts, keys[KEY_CODE], &valuePtr); - if ((valuePtr != NULL) - && (TCL_ERROR == TclGetIntFromObj(NULL, valuePtr, &code))) { - static const char *const returnCodes[] = { - "ok", "error", "return", "break", "continue", NULL - }; - - if (TCL_ERROR == Tcl_GetIndexFromObj(NULL, valuePtr, returnCodes, - NULL, TCL_EXACT, &code)) { - /* - * Value is not a legal return code. - */ - - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "bad completion code \"", - TclGetString(valuePtr), - "\": must be ok, error, return, break, " - "continue, or an integer", NULL); - Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); + if (valuePtr != NULL) { + if (TCL_ERROR == TclGetCompletionCodeFromObj(interp, valuePtr, &code)) { goto error; } - } - if (valuePtr != NULL) { Tcl_DictObjRemove(NULL, returnOpts, keys[KEY_CODE]); } -- cgit v0.12 From d6b47c13b9de8ed40d1c144b8a70ccec677a5231 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Sat, 27 Mar 2010 22:47:04 +0000 Subject: Provide "lowest supported Tcl version" to the Tcl_InitStubs functions in unix/dltest, in stead of "current Tcl version" --- ChangeLog | 3 +++ unix/dltest/pkga.c | 4 ++-- unix/dltest/pkgb.c | 6 +++--- unix/dltest/pkgc.c | 6 +++--- unix/dltest/pkgd.c | 6 +++--- unix/dltest/pkge.c | 4 ++-- unix/dltest/pkgua.c | 4 ++-- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49b408c..bf4d6c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ * generic/tclResult.c * generic/tclCmdMZ.c * generic/tclCompCmdsSZ.c + * unix/dltest/*.c Provide "lowest supported Tcl version" to + the Tcl_InitStubs functions, in stead of + "current Tcl version" 2010-03-26 Jan Nijtmans diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index c58e11a..18ff997 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkga.c,v 1.14 2010/02/22 23:31:42 nijtmans Exp $ + * RCS: @(#) $Id: pkga.c,v 1.15 2010/03/27 22:47:04 nijtmans Exp $ */ #include "tcl.h" @@ -132,7 +132,7 @@ Pkga_Init( { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkga", "1.0"); diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 9ad1425..185f39c 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgb.c,v 1.11 2010/02/22 23:31:42 nijtmans Exp $ + * RCS: @(#) $Id: pkgb.c,v 1.12 2010/03/27 22:47:04 nijtmans Exp $ */ #include "tcl.h" @@ -122,7 +122,7 @@ Pkgb_Init( { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); @@ -159,7 +159,7 @@ Pkgb_SafeInit( { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index 3e50863..16c768a 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgc.c,v 1.11 2010/02/22 23:31:42 nijtmans Exp $ + * RCS: @(#) $Id: pkgc.c,v 1.12 2010/03/27 22:47:04 nijtmans Exp $ */ #include "tcl.h" @@ -122,7 +122,7 @@ Pkgc_Init( { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2"); @@ -159,7 +159,7 @@ Pkgc_SafeInit( { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2"); diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index 211902c..ef6f339 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgd.c,v 1.10 2010/02/22 23:31:42 nijtmans Exp $ + * RCS: @(#) $Id: pkgd.c,v 1.11 2010/03/27 22:47:04 nijtmans Exp $ */ #include "tcl.h" @@ -122,7 +122,7 @@ Pkgd_Init( { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); @@ -159,7 +159,7 @@ Pkgd_SafeInit( { int code; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c index 145bbf5..3e93602 100644 --- a/unix/dltest/pkge.c +++ b/unix/dltest/pkge.c @@ -10,7 +10,7 @@ * 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.12 2010/02/22 23:31:42 nijtmans Exp $ + * RCS: @(#) $Id: pkge.c,v 1.13 2010/03/27 22:47:04 nijtmans Exp $ */ #include "tcl.h" @@ -48,7 +48,7 @@ Pkge_Init( { static const char script[] = "if 44 {open non_existent}"; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } return Tcl_Eval(interp, script); diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index 74a550d..d22adcb 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgua.c,v 1.9 2010/02/22 23:31:41 nijtmans Exp $ + * RCS: @(#) $Id: pkgua.c,v 1.10 2010/03/27 22:47:04 nijtmans Exp $ */ #include "tcl.h" @@ -209,7 +209,7 @@ Pkgua_Init( int code, cmdIndex = 0; Tcl_Command *cmdTokens; - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5", 0) == NULL) { return TCL_ERROR; } -- cgit v0.12 From 9197b2055e8b84a7e209d45dd88997ba18a1e4e5 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 28 Mar 2010 03:17:47 +0000 Subject: Revert the conversion of TCL_VERSION to "8.1" and "8.5" in the Tcl_InitStubs() calls of the pkg*.c testing extensions. --- ChangeLog | 3 --- unix/dltest/pkga.c | 4 ++-- unix/dltest/pkgb.c | 6 +++--- unix/dltest/pkgc.c | 6 +++--- unix/dltest/pkgd.c | 6 +++--- unix/dltest/pkge.c | 4 ++-- unix/dltest/pkgua.c | 4 ++-- 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf4d6c5..49b408c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,9 +4,6 @@ * generic/tclResult.c * generic/tclCmdMZ.c * generic/tclCompCmdsSZ.c - * unix/dltest/*.c Provide "lowest supported Tcl version" to - the Tcl_InitStubs functions, in stead of - "current Tcl version" 2010-03-26 Jan Nijtmans diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index 18ff997..3c12289 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkga.c,v 1.15 2010/03/27 22:47:04 nijtmans Exp $ + * RCS: @(#) $Id: pkga.c,v 1.16 2010/03/28 03:17:50 dgp Exp $ */ #include "tcl.h" @@ -132,7 +132,7 @@ Pkga_Init( { int code; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkga", "1.0"); diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index 185f39c..df0cde3 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgb.c,v 1.12 2010/03/27 22:47:04 nijtmans Exp $ + * RCS: @(#) $Id: pkgb.c,v 1.13 2010/03/28 03:17:50 dgp Exp $ */ #include "tcl.h" @@ -122,7 +122,7 @@ Pkgb_Init( { int code; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); @@ -159,7 +159,7 @@ Pkgb_SafeInit( { int code; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgb", "2.3"); diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index 16c768a..3e4c4e6 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgc.c,v 1.12 2010/03/27 22:47:04 nijtmans Exp $ + * RCS: @(#) $Id: pkgc.c,v 1.13 2010/03/28 03:17:50 dgp Exp $ */ #include "tcl.h" @@ -122,7 +122,7 @@ Pkgc_Init( { int code; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2"); @@ -159,7 +159,7 @@ Pkgc_SafeInit( { int code; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgc", "1.7.2"); diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index ef6f339..d713e2e 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgd.c,v 1.11 2010/03/27 22:47:04 nijtmans Exp $ + * RCS: @(#) $Id: pkgd.c,v 1.12 2010/03/28 03:17:50 dgp Exp $ */ #include "tcl.h" @@ -122,7 +122,7 @@ Pkgd_Init( { int code; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); @@ -159,7 +159,7 @@ Pkgd_SafeInit( { int code; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvide(interp, "Pkgd", "7.3"); diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c index 3e93602..bd0d838 100644 --- a/unix/dltest/pkge.c +++ b/unix/dltest/pkge.c @@ -10,7 +10,7 @@ * 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.13 2010/03/27 22:47:04 nijtmans Exp $ + * RCS: @(#) $Id: pkge.c,v 1.14 2010/03/28 03:17:50 dgp Exp $ */ #include "tcl.h" @@ -48,7 +48,7 @@ Pkge_Init( { static const char script[] = "if 44 {open non_existent}"; - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } return Tcl_Eval(interp, script); diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index d22adcb..e431deb 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: pkgua.c,v 1.10 2010/03/27 22:47:04 nijtmans Exp $ + * RCS: @(#) $Id: pkgua.c,v 1.11 2010/03/28 03:17:50 dgp Exp $ */ #include "tcl.h" @@ -209,7 +209,7 @@ Pkgua_Init( int code, cmdIndex = 0; Tcl_Command *cmdTokens; - if (Tcl_InitStubs(interp, "8.5", 0) == NULL) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } -- cgit v0.12 From 22eff425b19fe30b4d3ed173f860d908bb7592f9 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 29 Mar 2010 09:31:57 +0000 Subject: Minor formatting corrections --- ChangeLog | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49b408c..de114f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,13 @@ 2010-03-27 Jan Nijtmans - * generic/tclInt.h [Freq 2974744] share exception codes (ObjType?) - * generic/tclResult.c - * generic/tclCmdMZ.c - * generic/tclCompCmdsSZ.c + * generic/tclInt.h: [FRQ 2974744]: share exception codes + * generic/tclResult.c: (ObjType?) + * generic/tclCmdMZ.c: + * generic/tclCompCmdsSZ.c: 2010-03-26 Jan Nijtmans - * generic/tclExecute.c [Bug 2976508] tcl HEAD fails on HP-UX + * generic/tclExecute.c: [Bug 2976508]: Tcl HEAD fails on HP-UX 2010-03-25 Donal K. Fellows -- cgit v0.12 From 1df0c99376f51c3ea31e38fb947ba43057cafa9a Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 29 Mar 2010 21:58:58 +0000 Subject: * generic/tclStringObj.c: Fix array overrun in test format-1.12 caught by valgrind testing. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index de114f1..e419e2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-29 Don Porter + + * generic/tclStringObj.c: Fix array overrun in test format-1.12 + caught by valgrind testing. + 2010-03-27 Jan Nijtmans * generic/tclInt.h: [FRQ 2974744]: share exception codes diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 30851c1..e075d77 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.134 2010/03/05 14:34:04 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.135 2010/03/29 21:58:58 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2131,7 +2131,7 @@ Tcl_AppendFormatToObj( int digitOffset; if (useBig && big.used) { - if ((size_t) shift < + if (index < big.used && (size_t) shift < CHAR_BIT*sizeof(Tcl_WideUInt) - DIGIT_BIT) { bits |= ((Tcl_WideUInt) big.dp[index++]) << shift; shift += DIGIT_BIT; -- cgit v0.12 From 1800bb7cff79bda28c05c8702f44b3fe5d069716 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 29 Mar 2010 22:31:53 +0000 Subject: Only test for -visibility=hidden with gcc (Second remark in [Bug 2976508]) --- ChangeLog | 6 ++++++ unix/configure | 17 +++++++++++++---- unix/tcl.m4 | 13 +++++++++---- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e419e2d..4cd68e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-29 Jan Nijtmans + + * unix/tcl.m4 Only test for -visibility=hidden with gcc + (Second remark in [Bug 2976508]) + * unix/configure regen + 2010-03-29 Don Porter * generic/tclStringObj.c: Fix array overrun in test format-1.12 diff --git a/unix/configure b/unix/configure index d0fcd74..0396443 100755 --- a/unix/configure +++ b/unix/configure @@ -6434,8 +6434,10 @@ if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" - cat >conftest.$ac_ext <<_ACEOF + if test "$GCC" = yes; then + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -6480,7 +6482,15 @@ sed 's/^/| /' conftest.$ac_ext >&5 tcl_cv_cc_visibility_hidden=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$hold_cflags + CFLAGS=$hold_cflags + +else + + tcl_cv_cc_visibility_hidden=no + +fi + + fi echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 @@ -6490,7 +6500,6 @@ echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 else - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ diff --git a/unix/tcl.m4 b/unix/tcl.m4 index d6769af..06b6ae6 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1052,10 +1052,15 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_CACHE_CHECK([if compiler supports visibility "hidden"], tcl_cv_cc_visibility_hidden, [ - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" - AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes, - tcl_cv_cc_visibility_hidden=no) - CFLAGS=$hold_cflags]) + AS_IF([test "$GCC" = yes], [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" + AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes, + tcl_cv_cc_visibility_hidden=no) + CFLAGS=$hold_cflags + ], [ + tcl_cv_cc_visibility_hidden=no + ]) + ]) AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ CFLAGS="$CFLAGS -fvisibility=hidden" ], [ -- cgit v0.12 From 289662f4dd776fb4e9410efcc9a5512714b83927 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 30 Mar 2010 12:33:46 +0000 Subject: TIP #362 IMPLEMENTATION * win/tclWinReg.c: [Patch 2960976]: Apply patch from Damon Courtney to * tests/registry.test: allow the registry command to be told to work with both 32-bit and 64-bit registries. --- ChangeLog | 12 +- tests/registry.test | 53 ++++++++- win/tclWinReg.c | 318 +++++++++++++++++++++++++++++++++------------------- 3 files changed, 260 insertions(+), 123 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4cd68e5..8614245 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,16 @@ +2010-03-30 Donal K. Fellows + + TIP #362 IMPLEMENTATION + + * win/tclWinReg.c: [Patch 2960976]: Apply patch from Damon Courtney to + * tests/registry.test: allow the registry command to be told to work + with both 32-bit and 64-bit registries. + 2010-03-29 Jan Nijtmans - * unix/tcl.m4 Only test for -visibility=hidden with gcc + * unix/tcl.m4: Only test for -visibility=hidden with gcc (Second remark in [Bug 2976508]) - * unix/configure regen + * unix/configure: regen 2010-03-29 Don Porter diff --git a/tests/registry.test b/tests/registry.test index 62c9d84..8a7c4d4 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -10,7 +10,7 @@ # Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# RCS: @(#) $Id: registry.test,v 1.24 2008/11/29 14:44:24 patthoyts Exp $ +# RCS: @(#) $Id: registry.test,v 1.25 2010/03/30 12:33:47 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35,17 +35,32 @@ testConstraint english [expr { [llength [info commands testlocale]] && [string match "English*" [testlocale all ""]] }] - + test registry-1.1 {argument parsing for registry command} {win reg} { list [catch {registry} msg] $msg -} {1 {wrong # args: should be "registry option ?arg ...?"}} +} {1 {wrong # args: should be "registry ?-32bit|-64bit? option ?arg ...?"}} +test registry-1.1a {argument parsing for registry command} {win reg} { + list [catch {registry -32bit} msg] $msg +} {1 {wrong # args: should be "registry ?-32bit|-64bit? option ?arg ...?"}} +test registry-1.1b {argument parsing for registry command} {win reg} { + list [catch {registry -64bit} msg] $msg +} {1 {wrong # args: should be "registry ?-32bit|-64bit? option ?arg ...?"}} test registry-1.2 {argument parsing for registry command} {win reg} { list [catch {registry foo} msg] $msg } {1 {bad option "foo": must be broadcast, delete, get, keys, set, type, or values}} +test registry-1.2a {argument parsing for registry command} {win reg} { + list [catch {registry -33bit foo} msg] $msg +} {1 {bad option "-33bit": must be broadcast, delete, get, keys, set, type, or values}} test registry-1.3 {argument parsing for registry command} {win reg} { list [catch {registry d} msg] $msg } {1 {wrong # args: should be "registry delete keyName ?valueName?"}} +test registry-1.3a {argument parsing for registry command} {win reg} { + list [catch {registry -32bit d} msg] $msg +} {1 {wrong # args: should be "registry -32bit delete keyName ?valueName?"}} +test registry-1.3b {argument parsing for registry command} {win reg} { + list [catch {registry -64bit d} msg] $msg +} {1 {wrong # args: should be "registry -64bit delete keyName ?valueName?"}} test registry-1.4 {argument parsing for registry command} {win reg} { list [catch {registry delete} msg] $msg } {1 {wrong # args: should be "registry delete keyName ?valueName?"}} @@ -56,6 +71,12 @@ test registry-1.5 {argument parsing for registry command} {win reg} { test registry-1.6 {argument parsing for registry command} {win reg} { list [catch {registry g} msg] $msg } {1 {wrong # args: should be "registry get keyName valueName"}} +test registry-1.6a {argument parsing for registry command} {win reg} { + list [catch {registry -32bit g} msg] $msg +} {1 {wrong # args: should be "registry -32bit get keyName valueName"}} +test registry-1.6b {argument parsing for registry command} {win reg} { + list [catch {registry -64bit g} msg] $msg +} {1 {wrong # args: should be "registry -64bit get keyName valueName"}} test registry-1.7 {argument parsing for registry command} {win reg} { list [catch {registry get} msg] $msg } {1 {wrong # args: should be "registry get keyName valueName"}} @@ -69,6 +90,12 @@ test registry-1.9 {argument parsing for registry command} {win reg} { test registry-1.10 {argument parsing for registry command} {win reg} { list [catch {registry k} msg] $msg } {1 {wrong # args: should be "registry keys keyName ?pattern?"}} +test registry-1.10a {argument parsing for registry command} {win reg} { + list [catch {registry -32bit k} msg] $msg +} {1 {wrong # args: should be "registry -32bit keys keyName ?pattern?"}} +test registry-1.10b {argument parsing for registry command} {win reg} { + list [catch {registry -64bit k} msg] $msg +} {1 {wrong # args: should be "registry -64bit keys keyName ?pattern?"}} test registry-1.11 {argument parsing for registry command} {win reg} { list [catch {registry keys} msg] $msg } {1 {wrong # args: should be "registry keys keyName ?pattern?"}} @@ -79,6 +106,12 @@ test registry-1.12 {argument parsing for registry command} {win reg} { test registry-1.13 {argument parsing for registry command} {win reg} { list [catch {registry s} msg] $msg } {1 {wrong # args: should be "registry set keyName ?valueName data ?type??"}} +test registry-1.13a {argument parsing for registry command} {win reg} { + list [catch {registry -32bit s} msg] $msg +} {1 {wrong # args: should be "registry -32bit set keyName ?valueName data ?type??"}} +test registry-1.13b {argument parsing for registry command} {win reg} { + list [catch {registry -64bit s} msg] $msg +} {1 {wrong # args: should be "registry -64bit set keyName ?valueName data ?type??"}} test registry-1.14 {argument parsing for registry command} {win reg} { list [catch {registry set} msg] $msg } {1 {wrong # args: should be "registry set keyName ?valueName data ?type??"}} @@ -92,6 +125,12 @@ test registry-1.16 {argument parsing for registry command} {win reg} { test registry-1.17 {argument parsing for registry command} {win reg} { list [catch {registry t} msg] $msg } {1 {wrong # args: should be "registry type keyName valueName"}} +test registry-1.17a {argument parsing for registry command} {win reg} { + list [catch {registry -32bit t} msg] $msg +} {1 {wrong # args: should be "registry -32bit type keyName valueName"}} +test registry-1.17b {argument parsing for registry command} {win reg} { + list [catch {registry -64bit t} msg] $msg +} {1 {wrong # args: should be "registry -64bit type keyName valueName"}} test registry-1.18 {argument parsing for registry command} {win reg} { list [catch {registry type} msg] $msg } {1 {wrong # args: should be "registry type keyName valueName"}} @@ -105,6 +144,12 @@ test registry-1.20 {argument parsing for registry command} {win reg} { test registry-1.21 {argument parsing for registry command} {win reg} { list [catch {registry v} msg] $msg } {1 {wrong # args: should be "registry values keyName ?pattern?"}} +test registry-1.21a {argument parsing for registry command} {win reg} { + list [catch {registry -32bit v} msg] $msg +} {1 {wrong # args: should be "registry -32bit values keyName ?pattern?"}} +test registry-1.21b {argument parsing for registry command} {win reg} { + list [catch {registry -64bit v} msg] $msg +} {1 {wrong # args: should be "registry -64bit values keyName ?pattern?"}} test registry-1.22 {argument parsing for registry command} {win reg} { list [catch {registry values} msg] $msg } {1 {wrong # args: should be "registry values keyName ?pattern?"}} @@ -630,7 +675,7 @@ test registry-12.4 {BroadcastValue} -constraints {win reg} -body { test registry-12.5 {BroadcastValue} -constraints {win reg} -body { registry b {} } -result {1 0} - + # cleanup ::tcltest::cleanupTests return diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 195afd2..d5e1a28 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.50 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.51 2010/03/30 12:33:47 dkf Exp $ */ #undef STATIC_BUILD @@ -25,6 +25,17 @@ #include /* + * Ensure that we can say which registry is being accessed. + */ + +#ifndef KEY_WOW64_64KEY +#define KEY_WOW64_64KEY (0x0100) +#endif +#ifndef KEY_WOW64_32KEY +#define KEY_WOW64_32KEY (0x0200) +#endif + +/* * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the * Registry_Init declaration is in the source file itself, which is only * accessed when we are building a library. @@ -37,8 +48,8 @@ * The following macros convert between different endian ints. */ -#define SWAPWORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x)) -#define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x))) +#define SWAPWORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x)) +#define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)), SWAPWORD(LOWORD(x))) /* * The following flag is used in OpenKeys to indicate that the specified key @@ -171,17 +182,18 @@ static int BroadcastValue(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static DWORD ConvertDWORD(DWORD type, DWORD value); static void DeleteCmd(ClientData clientData); -static int DeleteKey(Tcl_Interp *interp, Tcl_Obj *keyNameObj); +static int DeleteKey(Tcl_Interp *interp, Tcl_Obj *keyNameObj, + REGSAM mode); static int DeleteValue(Tcl_Interp *interp, Tcl_Obj *keyNameObj, - Tcl_Obj *valueNameObj); + Tcl_Obj *valueNameObj, REGSAM mode); static int GetKeyNames(Tcl_Interp *interp, Tcl_Obj *keyNameObj, - Tcl_Obj *patternObj); + Tcl_Obj *patternObj, REGSAM mode); static int GetType(Tcl_Interp *interp, Tcl_Obj *keyNameObj, - Tcl_Obj *valueNameObj); + Tcl_Obj *valueNameObj, REGSAM mode); static int GetValue(Tcl_Interp *interp, Tcl_Obj *keyNameObj, - Tcl_Obj *valueNameObj); + Tcl_Obj *valueNameObj, REGSAM mode); static int GetValueNames(Tcl_Interp *interp, Tcl_Obj *keyNameObj, - Tcl_Obj *patternObj); + Tcl_Obj *patternObj, REGSAM mode); static int OpenKey(Tcl_Interp *interp, Tcl_Obj *keyNameObj, REGSAM mode, int flags, HKEY *keyPtr); static DWORD OpenSubKey(char *hostName, HKEY rootKey, @@ -191,13 +203,13 @@ static int ParseKeyName(Tcl_Interp *interp, char *name, char **hostNamePtr, HKEY *rootKeyPtr, char **keyNamePtr); static DWORD RecursiveDeleteKey(HKEY hStartKey, - const TCHAR * pKeyName); + const TCHAR * pKeyName, REGSAM mode); static int RegistryObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int SetValue(Tcl_Interp *interp, Tcl_Obj *keyNameObj, Tcl_Obj *valueNameObj, Tcl_Obj *dataObj, - Tcl_Obj *typeObj); + Tcl_Obj *typeObj, REGSAM mode); EXTERN int Registry_Init(Tcl_Interp *interp); EXTERN int Registry_Unload(Tcl_Interp *interp, int flags); @@ -235,11 +247,11 @@ Registry_Init( */ useWide = (TclWinGetPlatformId() != VER_PLATFORM_WIN32_WINDOWS); - regWinProcs = useWide ? &unicodeProcs : &asciiProcs; + regWinProcs = useWide ? &unicodeProcs : &asciiProcs; cmd = Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, - (ClientData)interp, DeleteCmd); - Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, (ClientData)cmd); + interp, DeleteCmd); + Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, cmd); return Tcl_PkgProvide(interp, "registry", "1.2.1"); } @@ -280,7 +292,7 @@ Registry_Unload( * Delete the originally registered command. */ - cmd = (Tcl_Command)Tcl_GetAssocData(interp, REGISTRY_ASSOC_KEY, NULL); + cmd = Tcl_GetAssocData(interp, REGISTRY_ASSOC_KEY, NULL); if (cmd != NULL) { Tcl_DeleteCommandFromToken(interp, cmd); } @@ -310,7 +322,8 @@ DeleteCmd( ClientData clientData) { Tcl_Interp *interp = clientData; - Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, (ClientData)NULL); + + Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, NULL); } /* @@ -336,7 +349,9 @@ RegistryObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - int index; + int n = 1; + int index, argc; + REGSAM mode = 0; const char *errString = NULL; static const char *const subcommands[] = { @@ -345,78 +360,112 @@ RegistryObjCmd( enum SubCmdIdx { BroadcastIdx, DeleteIdx, GetIdx, KeysIdx, SetIdx, TypeIdx, ValuesIdx }; + static const char *const modes[] = { + "-32bit", "-64bit", NULL + }; if (objc < 2) { - Tcl_WrongNumArgs(interp, objc, objv, "option ?arg ...?"); + wrongArgs: + Tcl_WrongNumArgs(interp, 1, objv, "?-32bit|-64bit? option ?arg ...?"); return TCL_ERROR; } - if (Tcl_GetIndexFromObj(interp, objv[1], subcommands, "option", 0, &index) - != TCL_OK) { + if (Tcl_GetString(objv[n])[0] == '-') { + if (Tcl_GetIndexFromObj(interp, objv[n++], modes, "mode", 0, + &index) != TCL_OK) { + return TCL_ERROR; + } + switch (index) { + case 0: /* -32bit */ + mode |= KEY_WOW64_32KEY; + break; + case 1: /* -64bit */ + mode |= KEY_WOW64_64KEY; + break; + } + if (objc < 3) { + goto wrongArgs; + } + } + + if (Tcl_GetIndexFromObj(interp, objv[n++], subcommands, "option", 0, + &index) != TCL_OK) { return TCL_ERROR; } + argc = (objc - n); switch (index) { case BroadcastIdx: /* broadcast */ - return BroadcastValue(interp, objc, objv); + if (argc == 1 || argc == 3) { + int res = BroadcastValue(interp, argc, objv + n); + + if (res != TCL_BREAK) { + return res; + } + } + errString = "keyName ?-timeout milliseconds?"; break; case DeleteIdx: /* delete */ - if (objc == 3) { - return DeleteKey(interp, objv[2]); - } else if (objc == 4) { - return DeleteValue(interp, objv[2], objv[3]); + if (argc == 1) { + return DeleteKey(interp, objv[n], mode); + } else if (argc == 2) { + return DeleteValue(interp, objv[n], objv[++n], mode); } errString = "keyName ?valueName?"; break; case GetIdx: /* get */ - if (objc == 4) { - return GetValue(interp, objv[2], objv[3]); + if (argc == 2) { + return GetValue(interp, objv[n], objv[++n], mode); } errString = "keyName valueName"; break; case KeysIdx: /* keys */ - if (objc == 3) { - return GetKeyNames(interp, objv[2], NULL); - } else if (objc == 4) { - return GetKeyNames(interp, objv[2], objv[3]); + if (argc == 1) { + return GetKeyNames(interp, objv[n], NULL, mode); + } else if (argc == 2) { + return GetKeyNames(interp, objv[n], objv[++n], mode); } errString = "keyName ?pattern?"; break; case SetIdx: /* set */ - if (objc == 3) { + if (argc == 1) { HKEY key; /* * Create the key and then close it immediately. */ - if (OpenKey(interp, objv[2], KEY_ALL_ACCESS, 1, &key) != TCL_OK) { + mode |= KEY_ALL_ACCESS; + if (OpenKey(interp, objv[n], mode, 1, &key) != TCL_OK) { return TCL_ERROR; } RegCloseKey(key); return TCL_OK; - } else if (objc == 5 || objc == 6) { - Tcl_Obj *typeObj = (objc == 5) ? NULL : objv[5]; - return SetValue(interp, objv[2], objv[3], objv[4], typeObj); + } else if (argc == 3) { + return SetValue(interp, objv[n], objv[++n], objv[++n], NULL, + mode); + } else if (argc == 4) { + return SetValue(interp, objv[n], objv[++n], objv[++n], objv[++n], + mode); } errString = "keyName ?valueName data ?type??"; break; case TypeIdx: /* type */ - if (objc == 4) { - return GetType(interp, objv[2], objv[3]); + if (argc == 2) { + return GetType(interp, objv[n], objv[++n], mode); } errString = "keyName valueName"; break; case ValuesIdx: /* values */ - if (objc == 3) { - return GetValueNames(interp, objv[2], NULL); - } else if (objc == 4) { - return GetValueNames(interp, objv[2], objv[3]); + if (argc == 1) { + return GetValueNames(interp, objv[n], NULL, mode); + } else if (argc == 2) { + return GetValueNames(interp, objv[n], objv[++n], mode); } errString = "keyName ?pattern?"; break; } - Tcl_WrongNumArgs(interp, 2, objv, errString); + Tcl_WrongNumArgs(interp, (mode ? 3 : 2), objv, errString); return TCL_ERROR; } @@ -439,7 +488,8 @@ RegistryObjCmd( static int DeleteKey( Tcl_Interp *interp, /* Current interpreter. */ - Tcl_Obj *keyNameObj) /* Name of key to delete. */ + Tcl_Obj *keyNameObj, /* Name of key to delete. */ + REGSAM mode) /* Mode flags to pass. */ { char *tail, *buffer, *hostName, *keyName; const char *nativeTail; @@ -447,13 +497,14 @@ DeleteKey( DWORD result; int length; Tcl_DString buf; + REGSAM saveMode = mode; /* * Find the parent of the key being deleted and open it. */ keyName = Tcl_GetStringFromObj(keyNameObj, &length); - buffer = ckalloc((unsigned int) length + 1); + buffer = ckalloc((unsigned) length + 1); strcpy(buffer, keyName); if (ParseKeyName(interp, buffer, &hostName, &rootKey, @@ -463,8 +514,8 @@ DeleteKey( } if (*keyName == '\0') { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "bad key: cannot delete root keys", -1)); + Tcl_SetObjResult(interp, + Tcl_NewStringObj("bad key: cannot delete root keys", -1)); ckfree(buffer); return TCL_ERROR; } @@ -477,15 +528,15 @@ DeleteKey( keyName = NULL; } - result = OpenSubKey(hostName, rootKey, keyName, - KEY_ENUMERATE_SUB_KEYS | DELETE, 0, &subkey); + mode |= KEY_ENUMERATE_SUB_KEYS | DELETE; + result = OpenSubKey(hostName, rootKey, keyName, mode, 0, &subkey); if (result != ERROR_SUCCESS) { ckfree(buffer); if (result == ERROR_FILE_NOT_FOUND) { return TCL_OK; } - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "unable to delete key: ", -1)); + Tcl_SetObjResult(interp, + Tcl_NewStringObj("unable to delete key: ", -1)); AppendSystemError(interp, result); return TCL_ERROR; } @@ -495,7 +546,7 @@ DeleteKey( */ nativeTail = Tcl_WinUtfToTChar(tail, -1, &buf); - result = RecursiveDeleteKey(subkey, nativeTail); + result = RecursiveDeleteKey(subkey, nativeTail, saveMode); Tcl_DStringFree(&buf); if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) { @@ -532,7 +583,8 @@ static int DeleteValue( Tcl_Interp *interp, /* Current interpreter. */ Tcl_Obj *keyNameObj, /* Name of key. */ - Tcl_Obj *valueNameObj) /* Name of value to delete. */ + Tcl_Obj *valueNameObj, /* Name of value to delete. */ + REGSAM mode) /* Mode flags to pass. */ { HKEY key; char *valueName; @@ -544,8 +596,8 @@ DeleteValue( * Attempt to open the key for deletion. */ - if (OpenKey(interp, keyNameObj, KEY_SET_VALUE, 0, &key) - != TCL_OK) { + mode |= KEY_SET_VALUE; + if (OpenKey(interp, keyNameObj, mode, 0, &key) != TCL_OK) { return TCL_ERROR; } @@ -589,9 +641,10 @@ static int GetKeyNames( Tcl_Interp *interp, /* Current interpreter. */ Tcl_Obj *keyNameObj, /* Key to enumerate. */ - Tcl_Obj *patternObj) /* Optional match pattern. */ + Tcl_Obj *patternObj, /* Optional match pattern. */ + REGSAM mode) /* Mode flags to pass. */ { - const char *pattern; /* Pattern being matched against subkeys */ + const char *pattern; /* Pattern being matched against subkeys */ HKEY key; /* Handle to the key being examined */ DWORD subKeyCount; /* Number of subkeys to list */ DWORD maxSubKeyLen; /* Maximum string length of any subkey */ @@ -609,26 +662,26 @@ GetKeyNames( pattern = NULL; } - /* Attempt to open the key for enumeration. */ + /* + * Attempt to open the key for enumeration. + */ - if (OpenKey(interp, keyNameObj, - KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, - 0, &key) != TCL_OK) { + mode |= KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS; + if (OpenKey(interp, keyNameObj, mode, 0, &key) != TCL_OK) { return TCL_ERROR; } /* - * Determine how big a buffer is needed for enumerating subkeys, and - * how many subkeys there are + * Determine how big a buffer is needed for enumerating subkeys, and how + * many subkeys there are. */ - result = (*regWinProcs->regQueryInfoKeyProc) - (key, NULL, NULL, NULL, &subKeyCount, &maxSubKeyLen, NULL, NULL, - NULL, NULL, NULL, NULL); + result = regWinProcs->regQueryInfoKeyProc(key, NULL, NULL, NULL, + &subKeyCount, &maxSubKeyLen, NULL, NULL, NULL, NULL, NULL, NULL); if (result != ERROR_SUCCESS) { Tcl_SetObjResult(interp, Tcl_NewObj()); Tcl_AppendResult(interp, "unable to query key \"", - Tcl_GetString(keyNameObj), "\": ", NULL); + Tcl_GetString(keyNameObj), "\": ", NULL); AppendSystemError(interp, result); RegCloseKey(key); return TCL_ERROR; @@ -639,19 +692,19 @@ GetKeyNames( buffer = ckalloc(maxSubKeyLen+1); } - /* Enumerate the subkeys */ + /* + * Enumerate the subkeys. + */ resultPtr = Tcl_NewObj(); for (index = 0; index < subKeyCount; ++index) { bufSize = maxSubKeyLen+1; - result = (*regWinProcs->regEnumKeyExProc) - (key, index, buffer, &bufSize, NULL, NULL, NULL, NULL); + result = regWinProcs->regEnumKeyExProc(key, index, buffer, &bufSize, + NULL, NULL, NULL, NULL); if (result != ERROR_SUCCESS) { Tcl_SetObjResult(interp, Tcl_NewObj()); - Tcl_AppendResult(interp, - "unable to enumerate subkeys of \"", - Tcl_GetString(keyNameObj), - "\": ", NULL); + Tcl_AppendResult(interp, "unable to enumerate subkeys of \"", + Tcl_GetString(keyNameObj), "\": ", NULL); AppendSystemError(interp, result); result = TCL_ERROR; break; @@ -703,11 +756,11 @@ static int GetType( Tcl_Interp *interp, /* Current interpreter. */ Tcl_Obj *keyNameObj, /* Name of key. */ - Tcl_Obj *valueNameObj) /* Name of value to get. */ + Tcl_Obj *valueNameObj, /* Name of value to get. */ + REGSAM mode) /* Mode flags to pass. */ { HKEY key; - DWORD result; - DWORD type; + DWORD result, type; Tcl_DString ds; const char *valueName, *nativeValue; int length; @@ -716,8 +769,8 @@ GetType( * Attempt to open the key for reading. */ - if (OpenKey(interp, keyNameObj, KEY_QUERY_VALUE, 0, &key) - != TCL_OK) { + mode |= KEY_QUERY_VALUE; + if (OpenKey(interp, keyNameObj, mode, 0, &key) != TCL_OK) { return TCL_ERROR; } @@ -774,7 +827,8 @@ static int GetValue( Tcl_Interp *interp, /* Current interpreter. */ Tcl_Obj *keyNameObj, /* Name of key. */ - Tcl_Obj *valueNameObj) /* Name of value to get. */ + Tcl_Obj *valueNameObj, /* Name of value to get. */ + REGSAM mode) /* Mode flags to pass. */ { HKEY key; const char *valueName, *nativeValue; @@ -786,7 +840,8 @@ GetValue( * Attempt to open the key for reading. */ - if (OpenKey(interp, keyNameObj, KEY_QUERY_VALUE, 0, &key) != TCL_OK) { + mode |= KEY_QUERY_VALUE; + if (OpenKey(interp, keyNameObj, mode, 0, &key) != TCL_OK) { return TCL_ERROR; } @@ -841,7 +896,7 @@ GetValue( if (type == REG_DWORD || type == REG_DWORD_BIG_ENDIAN) { Tcl_SetObjResult(interp, Tcl_NewIntObj((int) ConvertDWORD(type, - *((DWORD*) Tcl_DStringValue(&data))))); + *((DWORD *) Tcl_DStringValue(&data))))); } else if (type == REG_MULTI_SZ) { char *p = Tcl_DStringValue(&data); char *end = Tcl_DStringValue(&data) + length; @@ -853,16 +908,17 @@ GetValue( * we get bogus data. */ - while (p < end && ((regWinProcs->useWide) - ? *((Tcl_UniChar *)p) : *p) != 0) { + while ((p < end) + && (regWinProcs->useWide ? *((Tcl_UniChar *) p) : *p) != 0) { Tcl_WinTCharToUtf((TCHAR *) p, -1, &buf); Tcl_ListObjAppendElement(interp, resultPtr, Tcl_NewStringObj(Tcl_DStringValue(&buf), Tcl_DStringLength(&buf))); if (regWinProcs->useWide) { - Tcl_UniChar* up = (Tcl_UniChar*) p; + Tcl_UniChar *up = (Tcl_UniChar *) p; + while (*up++ != 0) {} - p = (char*) up; + p = (char *) up; } else { while (*p++ != '\0') {} } @@ -907,7 +963,8 @@ static int GetValueNames( Tcl_Interp *interp, /* Current interpreter. */ Tcl_Obj *keyNameObj, /* Key to enumerate. */ - Tcl_Obj *patternObj) /* Optional match pattern. */ + Tcl_Obj *patternObj, /* Optional match pattern. */ + REGSAM mode) /* Mode flags to pass. */ { HKEY key; Tcl_Obj *resultPtr; @@ -919,8 +976,8 @@ GetValueNames( * Attempt to open the key for enumeration. */ - if (OpenKey(interp, keyNameObj, KEY_QUERY_VALUE, 0, &key) - != TCL_OK) { + mode |= KEY_QUERY_VALUE; + if (OpenKey(interp, keyNameObj, mode, 0, &key) != TCL_OK) { return TCL_ERROR; } @@ -944,7 +1001,7 @@ GetValueNames( resultPtr = Tcl_NewObj(); Tcl_DStringInit(&buffer); Tcl_DStringSetLength(&buffer, - (int) ((regWinProcs->useWide) ? maxSize*2 : maxSize)); + (int) (regWinProcs->useWide ? maxSize*2 : maxSize)); index = 0; result = TCL_OK; @@ -1022,7 +1079,7 @@ OpenKey( DWORD result; keyName = Tcl_GetStringFromObj(keyNameObj, &length); - buffer = ckalloc((unsigned int) length + 1); + buffer = ckalloc((unsigned) length + 1); strcpy(buffer, keyName); result = ParseKeyName(interp, buffer, &hostName, &rootKey, &keyName); @@ -1223,12 +1280,16 @@ ParseKeyName( static DWORD RecursiveDeleteKey( HKEY startKey, /* Parent of key to be deleted. */ - const char *keyName) /* Name of key to be deleted in external + const char *keyName, /* Name of key to be deleted in external * encoding, not UTF. */ + REGSAM mode) /* Mode flags to pass. */ { DWORD result, size, maxSize; Tcl_DString subkey; HKEY hKey; + REGSAM saveMode = mode; + static int checkExProc = 0; + static FARPROC regDeleteKeyExProc = NULL; /* * Do not allow NULL or empty key name. @@ -1238,8 +1299,8 @@ RecursiveDeleteKey( return ERROR_BADKEY; } - result = regWinProcs->regOpenKeyExProc(startKey, keyName, 0, - KEY_ENUMERATE_SUB_KEYS | DELETE | KEY_QUERY_VALUE, &hKey); + mode |= KEY_ENUMERATE_SUB_KEYS | DELETE | KEY_QUERY_VALUE; + result = regWinProcs->regOpenKeyExProc(startKey, keyName, 0, mode, &hKey); if (result != ERROR_SUCCESS) { return result; } @@ -1254,6 +1315,7 @@ RecursiveDeleteKey( Tcl_DStringSetLength(&subkey, (int) ((regWinProcs->useWide) ? maxSize * 2 : maxSize)); + mode = saveMode; while (result == ERROR_SUCCESS) { /* * Always get index 0 because key deletion changes ordering. @@ -1263,10 +1325,36 @@ RecursiveDeleteKey( result = regWinProcs->regEnumKeyExProc(hKey, 0, Tcl_DStringValue(&subkey), &size, NULL, NULL, NULL, NULL); if (result == ERROR_NO_MORE_ITEMS) { - result = regWinProcs->regDeleteKeyProc(startKey, keyName); + /* + * RegDeleteKeyEx doesn't exist on non-64bit XP platforms, so we + * can't compile with it in. We need to check for it at runtime + * and use it if we find it. + */ + + if (mode && !checkExProc) { + HINSTANCE dllH; + + checkExProc = 1; + dllH = LoadLibrary("advapi32.dll"); + if (dllH) { + if (regWinProcs->useWide) { + regDeleteKeyExProc = (FARPROC) + GetProcAddress(dllH, "RegDeleteKeyExW"); + } else { + regDeleteKeyExProc = (FARPROC) + GetProcAddress(dllH, "RegDeleteKeyExA"); + } + } + } + if (mode && regDeleteKeyExProc) { + result = regDeleteKeyExProc(startKey, keyName, mode, 0); + } else { + result = regWinProcs->regDeleteKeyProc(startKey, keyName); + } break; } else if (result == ERROR_SUCCESS) { - result = RecursiveDeleteKey(hKey, Tcl_DStringValue(&subkey)); + result = RecursiveDeleteKey(hKey, Tcl_DStringValue(&subkey), + mode); } } Tcl_DStringFree(&subkey); @@ -1298,12 +1386,12 @@ SetValue( Tcl_Obj *keyNameObj, /* Name of key. */ Tcl_Obj *valueNameObj, /* Name of value to set. */ Tcl_Obj *dataObj, /* Data to be written. */ - Tcl_Obj *typeObj) /* Type of data to be written. */ + Tcl_Obj *typeObj, /* Type of data to be written. */ + REGSAM mode) /* Mode flags to pass. */ { - int type; + int type, length; DWORD result; HKEY key; - int length; const char *valueName; Tcl_DString nameBuf; @@ -1311,12 +1399,13 @@ SetValue( type = REG_SZ; } else if (Tcl_GetIndexFromObj(interp, typeObj, typeNames, "type", 0, (int *) &type) != TCL_OK) { - if (Tcl_GetIntFromObj(NULL, typeObj, (int*) &type) != TCL_OK) { + if (Tcl_GetIntFromObj(NULL, typeObj, (int *) &type) != TCL_OK) { return TCL_ERROR; } Tcl_ResetResult(interp); } - if (OpenKey(interp, keyNameObj, KEY_ALL_ACCESS, 1, &key) != TCL_OK) { + mode |= KEY_ALL_ACCESS; + if (OpenKey(interp, keyNameObj, mode, 1, &key) != TCL_OK) { return TCL_ERROR; } @@ -1369,7 +1458,7 @@ SetValue( Tcl_WinUtfToTChar(Tcl_DStringValue(&data), Tcl_DStringLength(&data)+1, &buf); result = regWinProcs->regSetValueExProc(key, valueName, 0, - (DWORD) type, (BYTE *) Tcl_DStringValue(&buf), + (DWORD) type, (BYTE *) Tcl_DStringValue(&buf), (DWORD) Tcl_DStringLength(&buf)); Tcl_DStringFree(&data); Tcl_DStringFree(&buf); @@ -1389,7 +1478,7 @@ SetValue( length = Tcl_DStringLength(&buf) + 1; result = regWinProcs->regSetValueExProc(key, valueName, 0, - (DWORD) type, (BYTE *) data, (DWORD) length); + (DWORD) type, (BYTE *) data, (DWORD) length); Tcl_DStringFree(&buf); } else { BYTE *data; @@ -1400,7 +1489,7 @@ SetValue( data = (BYTE *) Tcl_GetByteArrayFromObj(dataObj, &length); result = regWinProcs->regSetValueExProc(key, valueName, 0, - (DWORD) type, data, (DWORD) length); + (DWORD) type, data, (DWORD) length); } Tcl_DStringFree(&nameBuf); @@ -1445,24 +1534,18 @@ BroadcastValue( const char *str; Tcl_Obj *objPtr; - if ((objc != 3) && (objc != 5)) { - Tcl_WrongNumArgs(interp, 2, objv, "keyName ?-timeout millisecs?"); - return TCL_ERROR; - } - - if (objc > 3) { - str = Tcl_GetStringFromObj(objv[3], &len); + if (objc == 3) { + str = Tcl_GetStringFromObj(objv[1], &len); if ((len < 2) || (*str != '-') || strncmp(str, "-timeout", (size_t) len)) { - Tcl_WrongNumArgs(interp, 2, objv, "keyName ?-timeout millisecs?"); - return TCL_ERROR; + return TCL_BREAK; } - if (Tcl_GetIntFromObj(interp, objv[4], (int *) &timeout) != TCL_OK) { + if (Tcl_GetIntFromObj(interp, objv[2], (int *) &timeout) != TCL_OK) { return TCL_ERROR; } } - str = Tcl_GetStringFromObj(objv[2], &len); + str = Tcl_GetStringFromObj(objv[0], &len); if (len == 0) { str = NULL; } @@ -1526,7 +1609,8 @@ AppendSystemError( MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (char *) &msgPtr, 0, NULL); if (length > 0) { - wMsgPtr = (WCHAR *) LocalAlloc(LPTR, (length + 1) * sizeof(WCHAR)); + wMsgPtr = (WCHAR *) + LocalAlloc(LPTR, (length + 1) * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, msgPtr, length + 1, wMsgPtr, length + 1); LocalFree(msgPtr); @@ -1604,7 +1688,7 @@ ConvertDWORD( * Check to see if the low bit is in the first byte. */ - localType = (*((char*) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; + localType = (*((char *) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; return (type != localType) ? (DWORD) SWAPLONG(value) : value; } -- cgit v0.12 From 7e552e85798f37d8c50d6a4720359422e664b63d Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 30 Mar 2010 12:38:30 +0000 Subject: Bump version of registry package to 1.3. --- ChangeLog | 3 ++- library/reg/pkgIndex.tcl | 4 ++-- win/tclWinReg.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8614245..1fd071c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,8 @@ * win/tclWinReg.c: [Patch 2960976]: Apply patch from Damon Courtney to * tests/registry.test: allow the registry command to be told to work - with both 32-bit and 64-bit registries. + with both 32-bit and 64-bit registries. Bump + version of registry package to 1.3. 2010-03-29 Jan Nijtmans diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl index d2ed72f..c24e700 100755 --- a/library/reg/pkgIndex.tcl +++ b/library/reg/pkgIndex.tcl @@ -1,9 +1,9 @@ if {![package vsatisfies [package provide Tcl] 8]} {return} if {[string compare $::tcl_platform(platform) windows]} {return} if {[info exists ::tcl_platform(debug)]} { - package ifneeded registry 1.2.1 \ + package ifneeded registry 1.3 \ [list load [file join $dir tclreg12g.dll] registry] } else { - package ifneeded registry 1.2.1 \ + package ifneeded registry 1.3 \ [list load [file join $dir tclreg12.dll] registry] } diff --git a/win/tclWinReg.c b/win/tclWinReg.c index d5e1a28..d7eeae6 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.51 2010/03/30 12:33:47 dkf Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.52 2010/03/30 12:38:30 dkf Exp $ */ #undef STATIC_BUILD @@ -252,7 +252,7 @@ Registry_Init( cmd = Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, interp, DeleteCmd); Tcl_SetAssocData(interp, REGISTRY_ASSOC_KEY, NULL, cmd); - return Tcl_PkgProvide(interp, "registry", "1.2.1"); + return Tcl_PkgProvide(interp, "registry", "1.3"); } /* -- cgit v0.12 From 99a07b16e988b6a00af29bde329bd9cae3e10cb0 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 30 Mar 2010 13:17:18 +0000 Subject: [FRQ 2974744]: share exception codes (ObjType?): further optimization, making use of indexType. --- ChangeLog | 5 +++++ generic/tclIndexObj.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclResult.c | 51 +------------------------------------------------ 3 files changed, 58 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1fd071c..fdbaa8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-30 Jan Nijtmans + + * generic/tclIndexObj: [FRQ 2974744]: share exception codes (ObjType?): + * generic/tclResult.c: further optimization, making use of indexType. + 2010-03-30 Donal K. Fellows TIP #362 IMPLEMENTATION diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index edb05d7..9eef11a 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.58 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.59 2010/03/30 13:17:18 nijtmans Exp $ */ #include "tclInt.h" @@ -1422,6 +1422,57 @@ PrintUsage( } /* + *---------------------------------------------------------------------- + * + * TclGetCompletionCodeFromObj -- + * + * Parses Completion code Code + * + * Results: + * Returns TCL_ERROR if the value is an invalid completion code. + * Otherwise, returns TCL_OK, and writes the completion code to + * the pointer provided. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +TclGetCompletionCodeFromObj( + Tcl_Interp *interp, /* Current interpreter. */ + Tcl_Obj *value, + int *code) /* Argument objects. */ +{ + static const char *const returnCodes[] = { + "ok", "error", "return", "break", "continue", NULL + }; + + if ((value->typePtr != &indexType) + && (TCL_OK == TclGetIntFromObj(NULL, value, code))) { + return TCL_OK; + } + if (TCL_OK == Tcl_GetIndexFromObj( + NULL, value, returnCodes, NULL, TCL_EXACT, code)) { + return TCL_OK; + } + /* + * Value is not a legal completion code. + */ + + if (interp != NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "bad completion code \"", + TclGetString(value), + "\": must be ok, error, return, break, " + "continue, or an integer", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); + } + return TCL_ERROR; +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclResult.c b/generic/tclResult.c index 4fcd285..1fcdfba 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.59 2010/03/27 22:40:14 nijtmans Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.60 2010/03/30 13:17:18 nijtmans Exp $ */ #include "tclInt.h" @@ -1292,55 +1292,6 @@ TclProcessReturn( /* *---------------------------------------------------------------------- * - * TclGetCompletionCodeFromObj -- - * - * Parses Completion code Code - * - * Results: - * Returns TCL_ERROR if the value is an invalid completion code. - * Otherwise, returns TCL_OK, and writes the completion code to - * the pointer provided. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -int -TclGetCompletionCodeFromObj( - Tcl_Interp *interp, /* Current interpreter. */ - Tcl_Obj *value, - int *code) /* Argument objects. */ -{ - if (TCL_ERROR == TclGetIntFromObj(NULL, value, code)) { - static const char *const returnCodes[] = { - "ok", "error", "return", "break", "continue", NULL - }; - - if (TCL_ERROR == Tcl_GetIndexFromObj(NULL, value, returnCodes, - NULL, TCL_EXACT, code)) { - /* - * Value is not a legal return code. - */ - - if (interp != NULL) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "bad completion code \"", - TclGetString(value), - "\": must be ok, error, return, break, " - "continue, or an integer", NULL); - Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_CODE", NULL); - } - return TCL_ERROR; - } - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * * TclMergeReturnOptions -- * * Parses, checks, and stores the options to the [return] command. -- cgit v0.12 From 12a044c1cb8a5053df967f4a9fa8f90f1cf3388e Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 30 Mar 2010 14:05:53 +0000 Subject: Finish bump to registry 1.3.0 --- ChangeLog | 7 +++++-- win/Makefile.in | 8 ++++---- win/configure | 6 +++--- win/configure.in | 8 ++++---- win/makefile.bc | 6 +++--- win/makefile.vc | 4 ++-- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index fdbaa8a..b14a9b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,8 +9,11 @@ * win/tclWinReg.c: [Patch 2960976]: Apply patch from Damon Courtney to * tests/registry.test: allow the registry command to be told to work - with both 32-bit and 64-bit registries. Bump - version of registry package to 1.3. + * win/Makefile.in: with both 32-bit and 64-bit registries. Bump + * win/configure.in: version of registry package to 1.3. + * win/makefile.bc: + * win/makefile.vc: + * win/configure: autoconf-2.59 2010-03-29 Jan Nijtmans diff --git a/win/Makefile.in b/win/Makefile.in index 2ffc9fa..5c6e085 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.173 2010/03/04 22:29:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.174 2010/03/30 14:05:53 dgp Exp $ VERSION = @TCL_VERSION@ @@ -619,13 +619,13 @@ install-binaries: binaries fi @if [ -f $(REG_DLL_FILE) ]; then \ echo installing $(REG_DLL_FILE); \ - $(COPY) $(REG_DLL_FILE) $(LIB_INSTALL_DIR)/reg1.2; \ + $(COPY) $(REG_DLL_FILE) $(LIB_INSTALL_DIR)/reg1.3; \ $(COPY) $(ROOT_DIR)/library/reg/pkgIndex.tcl \ - $(LIB_INSTALL_DIR)/reg1.2; \ + $(LIB_INSTALL_DIR)/reg1.3; \ fi @if [ -f $(REG_LIB_FILE) ]; then \ echo installing $(REG_LIB_FILE); \ - $(COPY) $(REG_LIB_FILE) $(LIB_INSTALL_DIR)/reg1.2; \ + $(COPY) $(REG_LIB_FILE) $(LIB_INSTALL_DIR)/reg1.3; \ fi install-libraries: libraries install-tzdata install-msgs diff --git a/win/configure b/win/configure index 11807a1..7561a2a 100755 --- a/win/configure +++ b/win/configure @@ -1318,10 +1318,10 @@ TCL_DDE_MINOR_VERSION=3 TCL_DDE_PATCH_LEVEL="2" DDEVER=$TCL_DDE_MAJOR_VERSION$TCL_DDE_MINOR_VERSION -TCL_REG_VERSION=1.2 +TCL_REG_VERSION=1.3 TCL_REG_MAJOR_VERSION=1 -TCL_REG_MINOR_VERSION=2 -TCL_REG_PATCH_LEVEL="1" +TCL_REG_MINOR_VERSION=3 +TCL_REG_PATCH_LEVEL="0" REGVER=$TCL_REG_MAJOR_VERSION$TCL_REG_MINOR_VERSION PKG_CFG_ARGS=$@ diff --git a/win/configure.in b/win/configure.in index 7995106..8223a7e 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.120 2010/01/22 13:02:50 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.121 2010/03/30 14:05:53 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -25,10 +25,10 @@ TCL_DDE_MINOR_VERSION=3 TCL_DDE_PATCH_LEVEL="2" DDEVER=$TCL_DDE_MAJOR_VERSION$TCL_DDE_MINOR_VERSION -TCL_REG_VERSION=1.2 +TCL_REG_VERSION=1.3 TCL_REG_MAJOR_VERSION=1 -TCL_REG_MINOR_VERSION=2 -TCL_REG_PATCH_LEVEL="1" +TCL_REG_MINOR_VERSION=3 +TCL_REG_PATCH_LEVEL="0" REGVER=$TCL_REG_MAJOR_VERSION$TCL_REG_MINOR_VERSION PKG_CFG_ARGS=$@ diff --git a/win/makefile.bc b/win/makefile.bc index a0020bc..e2e8a00 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -129,8 +129,8 @@ VERSION = 86 DDEVERSION = 13 DDEDOTVERSION = 1.3 -REGVERSION = 12 -REGDOTVERSION = 1.2 +REGVERSION = 13 +REGDOTVERSION = 1.3 BINROOT = .. !IF "$(NODEBUG)" == "1" @@ -461,7 +461,7 @@ install-libraries: -@copy "$(ROOT)\library\dde\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\dde1.3" @echo installing $(TCLREGDLLNAME) -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\reg1.2" - -@copy "$(TCLREGDLL)" "$(SCRIPT_INSTALL_DIR)\reg1.2" + -@copy "$(TCLREGDLL)" "$(SCRIPT_INSTALL_DIR)\reg1.3" -@copy "$(ROOT)\library\reg\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\reg1.2" @echo installing encoding files -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\encoding" diff --git a/win/makefile.vc b/win/makefile.vc index 4a7602b..6e258c9 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.210 2010/03/16 09:01:37 nijtmans Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.211 2010/03/30 14:05:53 dgp Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -193,7 +193,7 @@ VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) DDEDOTVERSION = 1.3 DDEVERSION = $(DDEDOTVERSION:.=) -REGDOTVERSION = 1.2 +REGDOTVERSION = 1.3 REGVERSION = $(REGDOTVERSION:.=) BINROOT = $(MAKEDIR) # originally . -- cgit v0.12 From dfeca193ef249620df45325196b9ee70e984eef6 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 30 Mar 2010 14:16:11 +0000 Subject: [Bug 2979399] uninitialized value troubles --- ChangeLog | 1 + generic/tclZlib.c | 33 +++++---------------------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index b14a9b9..b95dd0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclIndexObj: [FRQ 2974744]: share exception codes (ObjType?): * generic/tclResult.c: further optimization, making use of indexType. + * generic/tclZlib.c [Bug 2979399] uninitialized value troubles 2010-03-30 Donal K. Fellows diff --git a/generic/tclZlib.c b/generic/tclZlib.c index a8d97d4..ea9c996 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclZlib.c,v 1.36 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclZlib.c,v 1.37 2010/03/30 14:16:11 nijtmans Exp $ */ #include "tclInt.h" @@ -619,20 +619,12 @@ Tcl_ZlibStreamInit( zshPtr->wbits = wbits; zshPtr->currentInput = NULL; zshPtr->streamEnd = 0; - zshPtr->stream.avail_in = 0; - zshPtr->stream.next_in = 0; - zshPtr->stream.zalloc = 0; - zshPtr->stream.zfree = 0; - zshPtr->stream.opaque = 0; /* Must be initialized before calling - * (de|in)flateInit2 */ + memset(&zshPtr->stream, 0, sizeof(z_stream)); /* * No output buffer available yet */ - zshPtr->stream.avail_out = 0; - zshPtr->stream.next_out = NULL; - if (mode == TCL_ZLIB_STREAM_DEFLATE) { e = deflateInit2(&zshPtr->stream, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); @@ -852,20 +844,12 @@ Tcl_ZlibStreamReset( zshPtr->outPos = 0; zshPtr->streamEnd = 0; - zshPtr->stream.avail_in = 0; - zshPtr->stream.next_in = 0; - zshPtr->stream.zalloc = 0; - zshPtr->stream.zfree = 0; - zshPtr->stream.opaque = 0; /* Must be initialized before calling - * (de|in)flateInit2 */ + memset(&zshPtr->stream, 0, sizeof(z_stream)); /* * No output buffer available yet. */ - zshPtr->stream.avail_out = 0; - zshPtr->stream.next_out = NULL; - if (zshPtr->mode == TCL_ZLIB_STREAM_DEFLATE) { e = deflateInit2(&zshPtr->stream, zshPtr->level, Z_DEFLATED, zshPtr->wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); @@ -1370,20 +1354,14 @@ Tcl_ZlibDeflate( */ inData = Tcl_GetByteArrayFromObj(data, &inLen); + memset(&stream, 0, sizeof(z_stream)); stream.avail_in = (uInt) inLen; stream.next_in = inData; - stream.zalloc = 0; - stream.zfree = 0; - stream.opaque = 0; /* Must be initialized before calling - * deflateInit2 */ /* * No output buffer available yet, will alloc after deflateInit2. */ - stream.avail_out = 0; - stream.next_out = NULL; - e = deflateInit2(&stream, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); if (e != Z_OK) { @@ -1541,8 +1519,7 @@ Tcl_ZlibInflate( } outData = Tcl_SetByteArrayLength(obj, bufferSize); - stream.zalloc = 0; - stream.zfree = 0; + memset(&stream, 0, sizeof(z_stream)); stream.avail_in = (uInt) inLen+1; /* +1 because zlib can "over-request" * input (but ignore it!) */ stream.next_in = inData; -- cgit v0.12 From 8898a2eaab27f4b350653e9cee5640c532ce6591 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 30 Mar 2010 16:31:09 +0000 Subject: * generic/tclObj.c (Tcl_GetCommandFromObj): [Bug 2979402]: Reorder the validity tests on internal rep of a "cmdName" value to avoid invalid reads reported by valgrind. --- ChangeLog | 6 ++++++ generic/tclObj.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b95dd0c..63a71b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-30 Don Porter + + * generic/tclObj.c (Tcl_GetCommandFromObj): [Bug 2979402]: Reorder + the validity tests on internal rep of a "cmdName" value to avoid + invalid reads reported by valgrind. + 2010-03-30 Jan Nijtmans * generic/tclIndexObj: [FRQ 2974744]: share exception codes (ObjType?): diff --git a/generic/tclObj.c b/generic/tclObj.c index 8123213..f16cb66 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.171 2010/02/25 22:20:10 nijtmans Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.172 2010/03/30 16:31:09 dgp Exp $ */ #include "tclInt.h" @@ -4139,8 +4139,8 @@ Tcl_GetCommandFromObj( register Command *cmdPtr = resPtr->cmdPtr; if ((cmdPtr->cmdEpoch == resPtr->cmdEpoch) - && (interp == cmdPtr->nsPtr->interp) && !(cmdPtr->flags & CMD_IS_DELETED) + && (interp == cmdPtr->nsPtr->interp) && !(cmdPtr->nsPtr->flags & NS_DYING)) { register Namespace *refNsPtr = (Namespace *) TclGetCurrentNamespace(interp); -- cgit v0.12 From bab53b84ede66f9acc9a284a16008e39f100f1ca Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Tue, 30 Mar 2010 21:17:11 +0000 Subject: * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput, ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption, ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve ReflectedChannel* structures across handler invokations, to avoid crashes when the handler implementation induces nested callbacks and destruction of the channel deep inside such a nesting. --- ChangeLog | 9 +++ generic/tclIORChan.c | 157 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 107 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63a71b2..1a49b1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-03-30 Andreas Kupries + + * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput, + ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption, + ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve + ReflectedChannel* structures across handler invokations, to avoid + crashes when the handler implementation induces nested callbacks + and destruction of the channel deep inside such a nesting. + 2010-03-30 Don Porter * generic/tclObj.c (Tcl_GetCommandFromObj): [Bug 2979402]: Reorder diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 50374a5..95a488e 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.46 2010/03/09 21:15:19 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.47 2010/03/30 21:17:13 andreas_kupries Exp $ */ #include @@ -1086,7 +1086,7 @@ ReflectClose( } #endif - FreeReflectedChannel(rcPtr); + Tcl_EventuallyFree (rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); return EOK; } @@ -1098,7 +1098,7 @@ ReflectClose( */ if (rcPtr->methods == 0) { - FreeReflectedChannel(rcPtr); + Tcl_EventuallyFree (rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); return EOK; } @@ -1161,7 +1161,7 @@ ReflectClose( } #endif - FreeReflectedChannel(rcPtr); + Tcl_EventuallyFree (rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); #ifdef TCL_THREADS } #endif @@ -1242,29 +1242,26 @@ ReflectInput( /* ASSERT: rcPtr->method & FLAG(METH_READ) */ /* ASSERT: rcPtr->mode & TCL_READABLE */ + Tcl_Preserve(rcPtr); + toReadObj = Tcl_NewIntObj(toRead); if (InvokeTclMethod(rcPtr, "read", toReadObj, NULL, &resObj)!=TCL_OK) { int code = ErrnoReturn(rcPtr, resObj); if (code < 0) { - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ *errorCodePtr = -code; - return -1; + goto error; } Tcl_SetChannelError(rcPtr->chan, resObj); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - *errorCodePtr = EINVAL; - return -1; + goto invalid; } bytev = Tcl_GetByteArrayFromObj(resObj, &bytec); if (toRead < bytec) { - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ SetChannelErrorStr(rcPtr->chan, msg_read_toomuch); - *errorCodePtr = EINVAL; - return -1; + goto invalid; } *errorCodePtr = EOK; @@ -1273,8 +1270,15 @@ ReflectInput( memcpy(buf, bytev, (size_t)bytec); } + stop: Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_Release(rcPtr); return bytec; + invalid: + *errorCodePtr = EINVAL; + error: + bytec = -1; + goto stop; } /* @@ -1350,31 +1354,26 @@ ReflectOutput( /* ASSERT: rcPtr->method & FLAG(METH_WRITE) */ /* ASSERT: rcPtr->mode & TCL_WRITABLE */ + Tcl_Preserve(rcPtr); + bufObj = Tcl_NewByteArrayObj((unsigned char *) buf, toWrite); if (InvokeTclMethod(rcPtr, "write", bufObj, NULL, &resObj) != TCL_OK) { int code = ErrnoReturn(rcPtr, resObj); if (code < 0) { - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ *errorCodePtr = -code; - return -1; + goto error; } Tcl_SetChannelError(rcPtr->chan, resObj); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - *errorCodePtr = EINVAL; - return -1; + goto invalid; } if (Tcl_GetIntFromObj(rcPtr->interp, resObj, &written) != TCL_OK) { - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ Tcl_SetChannelError(rcPtr->chan, MarshallError(rcPtr->interp)); - *errorCodePtr = EINVAL; - return -1; + goto invalid; } - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - if ((written == 0) && (toWrite > 0)) { /* * The handler claims to have written nothing of what it was @@ -1382,8 +1381,7 @@ ReflectOutput( */ SetChannelErrorStr(rcPtr->chan, msg_write_nothing); - *errorCodePtr = EINVAL; - return -1; + goto invalid; } if (toWrite < written) { /* @@ -1393,12 +1391,19 @@ ReflectOutput( */ SetChannelErrorStr(rcPtr->chan, msg_write_toomuch); - *errorCodePtr = EINVAL; - return -1; + goto invalid; } *errorCodePtr = EOK; + stop: + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_Release(rcPtr); return written; + invalid: + *errorCodePtr = EINVAL; + error: + written = -1; + goto stop; } /* @@ -1456,33 +1461,35 @@ ReflectSeekWide( /* ASSERT: rcPtr->method & FLAG(METH_SEEK) */ + Tcl_Preserve(rcPtr); + offObj = Tcl_NewWideIntObj(offset); baseObj = Tcl_NewStringObj((seekMode == SEEK_SET) ? "start" : - ((seekMode == SEEK_CUR) ? "current" : "end"), -1); + ((seekMode == SEEK_CUR) ? "current" : "end"), -1); if (InvokeTclMethod(rcPtr, "seek", offObj, baseObj, &resObj)!=TCL_OK) { Tcl_SetChannelError(rcPtr->chan, resObj); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - *errorCodePtr = EINVAL; - return -1; + goto invalid; } if (Tcl_GetWideIntFromObj(rcPtr->interp, resObj, &newLoc) != TCL_OK) { - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ Tcl_SetChannelError(rcPtr->chan, MarshallError(rcPtr->interp)); - *errorCodePtr = EINVAL; - return -1; + goto invalid; } - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - if (newLoc < Tcl_LongAsWide(0)) { SetChannelErrorStr(rcPtr->chan, msg_seek_beforestart); - *errorCodePtr = EINVAL; - return -1; + goto invalid; } *errorCodePtr = EOK; + stop: + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_Release(rcPtr); return newLoc; + invalid: + *errorCodePtr = EINVAL; + newLoc = -1; + goto stop; } static int @@ -1568,9 +1575,13 @@ ReflectWatch( } #endif + Tcl_Preserve(rcPtr); + maskObj = DecodeEventMask(mask); (void) InvokeTclMethod(rcPtr, "watch", maskObj, NULL, NULL); Tcl_DecrRefCount(maskObj); + + Tcl_Release(rcPtr); } /* @@ -1623,6 +1634,8 @@ ReflectBlock( blockObj = Tcl_NewBooleanObj(!nonblocking); + Tcl_Preserve(rcPtr); + if (InvokeTclMethod(rcPtr, "blocking", blockObj, NULL, &resObj)!=TCL_OK) { Tcl_SetChannelError(rcPtr->chan, resObj); errorNum = EINVAL; @@ -1631,6 +1644,8 @@ ReflectBlock( } Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + + Tcl_Release(rcPtr); return errorNum; } @@ -1686,6 +1701,7 @@ ReflectSetOption( return p.base.code; } #endif + Tcl_Preserve(rcPtr); optionObj = Tcl_NewStringObj(optionName, -1); valueObj = Tcl_NewStringObj(newValue, -1); @@ -1695,6 +1711,7 @@ ReflectSetOption( } Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_Release(rcPtr); return result; } @@ -1781,10 +1798,11 @@ ReflectGetOption( optionObj = Tcl_NewStringObj(optionName, -1); } + Tcl_Preserve(rcPtr); + if (InvokeTclMethod(rcPtr, method, optionObj, NULL, &resObj)!=TCL_OK) { UnmarshallErrorResult(interp, resObj); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - return TCL_ERROR; + goto error; } /* @@ -1794,8 +1812,7 @@ ReflectGetOption( if (optionObj != NULL) { Tcl_DStringAppend(dsPtr, TclGetString(resObj), -1); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - return TCL_OK; + goto ok; } /* @@ -1810,8 +1827,7 @@ ReflectGetOption( */ if (Tcl_ListObjGetElements(interp, resObj, &listc, &listv) != TCL_OK) { - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - return TCL_ERROR; + goto error; } if ((listc % 2) == 1) { @@ -1824,8 +1840,7 @@ ReflectGetOption( "Expected list with even number of " "elements, got %d element%s instead", listc, (listc == 1 ? "" : "s"))); - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - return TCL_ERROR; + goto error; } else { int len; const char *str = Tcl_GetStringFromObj(resObj, &len); @@ -1834,9 +1849,17 @@ ReflectGetOption( Tcl_DStringAppend(dsPtr, " ", 1); Tcl_DStringAppend(dsPtr, str, len); } - Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ - return TCL_OK; + goto ok; } + + ok: + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_Release(rcPtr); + return TCL_OK; + error: + Tcl_DecrRefCount(resObj); /* Remove reference held from invoke */ + Tcl_Release(rcPtr); + return TCL_ERROR; } /* @@ -2775,8 +2798,8 @@ ForwardProc( ForwardParam *paramPtr = evPtr->param; Tcl_Obj *resObj = NULL; /* Interp result of InvokeTclMethod */ ReflectedChannelMap *rcmPtr; - /* Map of reflected channels with handlers in - * this interp. */ + /* Map of reflected channels with handlers in + * this interp. */ Tcl_HashEntry *hPtr; /* Entry in the above map */ /* @@ -2819,20 +2842,21 @@ ForwardProc( rcmPtr = GetReflectedChannelMap(interp); hPtr = Tcl_FindHashEntry(&rcmPtr->map, - Tcl_GetChannelName(rcPtr->chan)); + Tcl_GetChannelName(rcPtr->chan)); Tcl_DeleteHashEntry(hPtr); rcmPtr = GetThreadReflectedChannelMap(); hPtr = Tcl_FindHashEntry(&rcmPtr->map, - Tcl_GetChannelName(rcPtr->chan)); + Tcl_GetChannelName(rcPtr->chan)); Tcl_DeleteHashEntry(hPtr); - FreeReflectedChannel(rcPtr); + Tcl_EventuallyFree (rcPtr, (Tcl_FreeProc *) FreeReflectedChannel); break; case ForwardedInput: { Tcl_Obj *toReadObj = Tcl_NewIntObj(paramPtr->input.toRead); + Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, "read", toReadObj, NULL, &resObj)!=TCL_OK){ int code = ErrnoReturn(rcPtr, resObj); @@ -2862,13 +2886,15 @@ ForwardProc( paramPtr->input.toRead = bytec; } } + Tcl_Release(rcPtr); break; } case ForwardedOutput: { Tcl_Obj *bufObj = Tcl_NewByteArrayObj((unsigned char *) - paramPtr->output.buf, paramPtr->output.toWrite); + paramPtr->output.buf, paramPtr->output.toWrite); + Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, "write", bufObj, NULL, &resObj) != TCL_OK) { int code = ErrnoReturn(rcPtr, resObj); @@ -2895,15 +2921,17 @@ ForwardProc( paramPtr->output.toWrite = written; } } + Tcl_Release(rcPtr); break; } case ForwardedSeek: { Tcl_Obj *offObj = Tcl_NewWideIntObj(paramPtr->seek.offset); Tcl_Obj *baseObj = Tcl_NewStringObj( - (paramPtr->seek.seekMode==SEEK_SET) ? "start" : - (paramPtr->seek.seekMode==SEEK_CUR) ? "current" : "end", -1); + (paramPtr->seek.seekMode==SEEK_SET) ? "start" : + (paramPtr->seek.seekMode==SEEK_CUR) ? "current" : "end", -1); + Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, "seek", offObj, baseObj, &resObj)!=TCL_OK){ ForwardSetObjError(paramPtr, resObj); paramPtr->seek.offset = -1; @@ -2927,24 +2955,29 @@ ForwardProc( paramPtr->seek.offset = -1; } } + Tcl_Release(rcPtr); break; } case ForwardedWatch: { Tcl_Obj *maskObj = DecodeEventMask(paramPtr->watch.mask); + Tcl_Preserve(rcPtr); (void) InvokeTclMethod(rcPtr, "watch", maskObj, NULL, NULL); Tcl_DecrRefCount(maskObj); + Tcl_Release(rcPtr); break; } case ForwardedBlock: { Tcl_Obj *blockObj = Tcl_NewBooleanObj(!paramPtr->block.nonblocking); + Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, "blocking", blockObj, NULL, - &resObj) != TCL_OK) { + &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); } + Tcl_Release(rcPtr); break; } @@ -2952,10 +2985,12 @@ ForwardProc( Tcl_Obj *optionObj = Tcl_NewStringObj(paramPtr->setOpt.name, -1); Tcl_Obj *valueObj = Tcl_NewStringObj(paramPtr->setOpt.value, -1); + Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, "configure", optionObj, valueObj, - &resObj) != TCL_OK) { + &resObj) != TCL_OK) { ForwardSetObjError(paramPtr, resObj); } + Tcl_Release(rcPtr); break; } @@ -2966,12 +3001,14 @@ ForwardProc( Tcl_Obj *optionObj = Tcl_NewStringObj(paramPtr->getOpt.name, -1); + Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, "cget", optionObj, NULL, &resObj)!=TCL_OK){ ForwardSetObjError(paramPtr, resObj); } else { Tcl_DStringAppend(paramPtr->getOpt.value, - TclGetString(resObj), -1); + TclGetString(resObj), -1); } + Tcl_Release(rcPtr); break; } @@ -2980,6 +3017,7 @@ ForwardProc( * Retrieve all options. */ + Tcl_Preserve(rcPtr); if (InvokeTclMethod(rcPtr, "cgetall", NULL, NULL, &resObj) != TCL_OK){ ForwardSetObjError(paramPtr, resObj); } else { @@ -2992,7 +3030,7 @@ ForwardProc( Tcl_Obj **listv; if (Tcl_ListObjGetElements(interp, resObj, &listc, - &listv) != TCL_OK) { + &listv) != TCL_OK) { ForwardSetObjError(paramPtr, MarshallError(interp)); } else if ((listc % 2) == 1) { /* @@ -3015,6 +3053,7 @@ ForwardProc( } } } + Tcl_Release(rcPtr); break; default: -- cgit v0.12 From d939798dd89166dee8a80e460ca723c718099d64 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 31 Mar 2010 10:29:22 +0000 Subject: [FRQ 2974744]: share exception codes (ObjType?): Revised test cases, making sure that abbreviated codes are checked resulting in an error, and checking for the exact error message. --- ChangeLog | 7 +++++++ tests/cmdMZ.test | 12 ++++++------ tests/error.test | 8 ++++---- tests/proc-old.test | 14 +++++++------- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a49b1d..73442ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-31 Jan Nijtmans + + * test/cmdMZ.test: [FRQ 2974744]: share exception codes (ObjType?): + * test/error.test: Revised test cases, making sure that abbreviated + * test/proc-old.test: codes are checked resulting in an error, and + checking for the exact error message. + 2010-03-30 Andreas Kupries * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput, diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index c0f2738..0a86e42 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdMZ.test,v 1.28 2009/11/16 18:00:11 dgp Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.29 2010/03/31 10:29:22 nijtmans Exp $ if {[catch {package require tcltest 2.1}]} { puts stderr "Skipping tests in [info script]. tcltest 2.1 required." @@ -96,11 +96,11 @@ test cmdMZ-return-1.0 {return checks for bad option values} -body { return -options foo } -returnCodes error -match glob -result {bad -options value:*} test cmdMZ-return-1.1 {return checks for bad option values} -body { - return -code foo -} -returnCodes error -match glob -result {bad completion code*} + return -code err +} -returnCodes error -match glob -result {bad completion code "err": must be ok, error, return, break, continue*, or an integer} test cmdMZ-return-1.2 {return checks for bad option values} -body { return -code 0x100000000 -} -returnCodes error -match glob -result {bad completion code*} +} -returnCodes error -match glob -result {bad completion code "0x100000000": must be ok, error, return, break, continue*, or an integer} test cmdMZ-return-1.3 {return checks for bad option values} -body { return -level foo } -returnCodes error -match glob -result {bad -level value: *} @@ -161,8 +161,8 @@ test cmdMZ-return-2.12 {return option handling} -body { return -level 0 -code error -options {-code ok} } -returnCodes ok -result {} test cmdMZ-return-2.13 {return option handling} -body { - return -level 0 -code error -options {-code foo} -} -returnCodes error -match glob -result {bad completion code*} + return -level 0 -code error -options {-code err} +} -returnCodes error -match glob -result {bad completion code "err": must be ok, error, return, break, continue*, or an integer} test cmdMZ-return-2.14 {return option handling} -body { return -level 0 -code error -options {-code foo -options {-code break}} } -returnCodes break -result {} diff --git a/tests/error.test b/tests/error.test index 9e192ef..623595c 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.28 2010/03/23 12:58:39 nijtmans Exp $ +# RCS: @(#) $Id: error.test,v 1.29 2010/03/31 10:29:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -882,11 +882,11 @@ rename addmsg {} # negative case try tests - bad "on" handler test error-20.1 {bad code name in on handler} -body { - try { list a b c } on foo {} {} -} -returnCodes error -match glob -result {bad completion code *} + try { list a b c } on err {} {} +} -returnCodes error -match glob -result {bad completion code "err": must be ok, error, return, break, continue*, or an integer} test error-20.2 {bad code value in on handler} -body { try { list a b c } on 34985723094872345 {} {} -} -returnCodes error -match glob -result {bad completion code *} +} -returnCodes error -match glob -result {bad completion code "34985723094872345": must be ok, error, return, break, continue*, or an integer} test error-21.1 {memory leaks in try: Bug 2910044} memory { leaktest { diff --git a/tests/proc-old.test b/tests/proc-old.test index 29a0607..6a95528 100644 --- a/tests/proc-old.test +++ b/tests/proc-old.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: proc-old.test,v 1.17 2008/09/25 19:26:39 dgp Exp $ +# RCS: @(#) $Id: proc-old.test,v 1.18 2010/03/31 10:29:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -408,12 +408,12 @@ test proc-old-7.5 {return with special completion code} { test proc-old-7.6 {return with special completion code} { list [catch {tproc -14} msg] $msg } {-14 abc} -test proc-old-7.7 {return with special completion code} { - list [catch {tproc gorp} msg] $msg -} {1 {bad completion code "gorp": must be ok, error, return, break, continue, or an integer}} -test proc-old-7.8 {return with special completion code} { - list [catch {tproc 10b} msg] $msg -} {1 {bad completion code "10b": must be ok, error, return, break, continue, or an integer}} +test proc-old-7.7 {return with special completion code} -body { + tproc err +} -returnCodes error -match glob -result {bad completion code "err": must be ok, error, return, break, continue*, or an integer} +test proc-old-7.8 {return with special completion code} -body { + tproc 10b +} -returnCodes error -match glob -result {bad completion code "10b": must be ok, error, return, break, continue*, or an integer} test proc-old-7.9 {return with special completion code} { proc tproc2 {} { tproc return -- cgit v0.12 From cba938f2dc8da1903c146685526669dcbc31ed43 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 31 Mar 2010 14:14:04 +0000 Subject: Improve the documentation of how to make and use a thread. --- ChangeLog | 18 ++++++++++++------ doc/Thread.3 | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73442ef..229d1fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-31 Donal K. Fellows + + * doc/Thread.3: Added some better documentation of how to create and + use a thread using the C-level thread API, based on realization that + no such tutorial appeared to exist. + 2010-03-31 Jan Nijtmans * test/cmdMZ.test: [FRQ 2974744]: share exception codes (ObjType?): @@ -8,11 +14,11 @@ 2010-03-30 Andreas Kupries * generic/tclIORChan.c (ReflectClose, ReflectInput, ReflectOutput, - ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption, - ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve + (ReflectSeekWide, ReflectWatch, ReflectBlock, ReflectSetOption, + (ReflectGetOption, ForwardProc): [Bug 2978773]: Preserve ReflectedChannel* structures across handler invokations, to avoid - crashes when the handler implementation induces nested callbacks - and destruction of the channel deep inside such a nesting. + crashes when the handler implementation induces nested callbacks and + destruction of the channel deep inside such a nesting. 2010-03-30 Don Porter @@ -22,9 +28,9 @@ 2010-03-30 Jan Nijtmans - * generic/tclIndexObj: [FRQ 2974744]: share exception codes (ObjType?): + * generic/tclIndexObj: [FRQ 2974744]: share exception codes * generic/tclResult.c: further optimization, making use of indexType. - * generic/tclZlib.c [Bug 2979399] uninitialized value troubles + * generic/tclZlib.c [Bug 2979399]: uninitialized value troubles 2010-03-30 Donal K. Fellows diff --git a/doc/Thread.3 b/doc/Thread.3 index 97e759a..e5ea559 100644 --- a/doc/Thread.3 +++ b/doc/Thread.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Thread.3,v 1.30 2008/07/24 21:54:43 nijtmans Exp $ +'\" RCS: @(#) $Id: Thread.3,v 1.31 2010/03/31 14:14:04 dkf Exp $ '\" .so man.macros .TH Threads 3 "8.1" Tcl "Tcl Library Procedures" @@ -188,6 +188,53 @@ manage, or join threads, nor any script-level access to mutex or condition variables. It provides such facilities only via C interfaces, and leaves it up to packages to expose these matters to the script level. One such package is the \fBThread\fR package. +.SH EXAMPLE +.PP +To create a thread with portable code, its implementation function should be +declared as follows: +.PP +.CS +static \fBTcl_ThreadCreateProc\fR MyThreadImplFunc; +.CE +.PP +It should then be defined like this example, which just counts up to a given +value and then finishes. +.PP +.CS +static \fBTcl_ThreadCreateType\fR +MyThreadImplFunc( + ClientData clientData) +{ + int i, limit = (int) clientData; + for (i=0 ; i Date: Wed, 31 Mar 2010 20:55:52 +0000 Subject: * doc/package.n: [Bug 2980210]: Document the arguments taken by the [package present] command correctly. --- ChangeLog | 3 +++ doc/package.n | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 229d1fe..ed41c92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-03-31 Donal K. Fellows + * doc/package.n: [Bug 2980210]: Document the arguments taken by + the [package present] command correctly. + * doc/Thread.3: Added some better documentation of how to create and use a thread using the C-level thread API, based on realization that no such tutorial appeared to exist. diff --git a/doc/package.n b/doc/package.n index 9e2cf75..034cc18 100644 --- a/doc/package.n +++ b/doc/package.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: package.n,v 1.24 2010/01/20 13:42:17 dkf Exp $ +'\" RCS: @(#) $Id: package.n,v 1.25 2010/03/31 20:55:52 dkf Exp $ '\" .so man.macros .TH package n 7.5 Tcl "Tcl Built-In Commands" @@ -81,7 +81,7 @@ interpreter for which a version has been provided (via script is available. The order of elements in the list is arbitrary. .TP -\fBpackage present\fR +\fBpackage present\fR ?\fB\-exact\fR? \fIpackage\fR ?\fIrequirement...\fR? . This command is equivalent to \fBpackage require\fR except that it does not try and load the package if it is not already loaded. -- cgit v0.12 From acc46294253a87374633bdf1c1945bfaf95b2edb Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 31 Mar 2010 22:12:26 +0000 Subject: Added missing doc. Oops! --- ChangeLog | 2 ++ doc/registry.n | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed41c92..cb8a85f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-03-31 Donal K. Fellows + * doc/registry.n: Added missing documentation of TIP#362 flags. + * doc/package.n: [Bug 2980210]: Document the arguments taken by the [package present] command correctly. diff --git a/doc/registry.n b/doc/registry.n index b9c7b14..18e8ae0 100644 --- a/doc/registry.n +++ b/doc/registry.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: registry.n,v 1.22 2008/01/18 15:59:22 dkf Exp $ +'\" RCS: @(#) $Id: registry.n,v 1.23 2010/03/31 22:12:26 dkf Exp $ '\" .so man.macros .TH registry n 1.1 registry "Tcl Bundled Packages" @@ -15,9 +15,9 @@ registry \- Manipulate the Windows registry .SH SYNOPSIS .sp -\fBpackage require registry 1.1\fR +\fBpackage require registry 1.3\fR .sp -\fBregistry \fIoption\fR \fIkeyName\fR ?\fIarg arg ...\fR? +\fBregistry \fR?\fI\-mode\fR? \fIoption\fR \fIkeyName\fR ?\fIarg arg ...\fR? .BE .SH DESCRIPTION .PP @@ -46,6 +46,14 @@ one of \fBHKEY_LOCAL_MACHINE\fR, \fBHKEY_USERS\fR, \fBHKEY_DYN_DATA\fR. The \fIkeypath\fR can be one or more registry key names separated by backslash (\fB\e\fR) characters. .PP +.VS 8.6 +The optional \fI\-mode\fR argument indicates which registry to work +with; when it is \fB\-32bit\fR the 32-bit registry will be used, and +when it is \fB\-64bit\fR the 64-bit registry will be used. If this +argument is omitted, the system's default registry will be the subject +of the requested operation. +.VE 8.6 +.PP \fIOption\fR indicates what to do with the registry key name. Any unique abbreviation for \fIoption\fR is acceptable. The valid options are: @@ -207,3 +215,6 @@ puts "$ext opens with $command" .CE .SH KEYWORDS registry +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From eea8077922683bcbf1bfa11eaf8f26e5c95c0b49 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 2 Apr 2010 19:23:57 +0000 Subject: * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallest floating point number until it is actually used. (This change avoids a bogus syslog message regarding a 'floating point software assist fault' on SGI systems.) --- ChangeLog | 7 +++++++ generic/tclStrToD.c | 8 +++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb8a85f..7997e27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-02 Kevin B. Kenny + + * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallest + floating point number until it is actually used. (This change avoids + a bogus syslog message regarding a 'floating point software assist + fault' on SGI systems.) + 2010-03-31 Donal K. Fellows * doc/registry.n: Added missing documentation of TIP#362 flags. diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 9577798..b9b9950 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.41 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.42 2010/04/02 19:23:58 kennykb Exp $ * *---------------------------------------------------------------------- */ @@ -110,7 +110,6 @@ static int log2FLT_RADIX; /* Logarithm of the floating point radix. */ static int mantBits; /* Number of bits in a double's significand */ static mp_int pow5[9]; /* Table of powers of 5**(2**n), up to * 5**256 */ -static double tiny; /* The smallest representable double */ static int maxDigits; /* The maximum number of digits to the left of * the decimal point of a double. */ static int minDigits; /* The maximum number of digits to the right @@ -1490,8 +1489,8 @@ MakeHighPrecisionDouble( goto returnValue; } retval = SafeLdExp(retval, machexp); - if (retval < tiny) { - retval = tiny; + if (retval <= 0.0) { + retval = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); } /* @@ -2245,7 +2244,6 @@ TclInitDoubleConversion(void) * the significand of a double. */ - tiny = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); maxDigits = (int) ((DBL_MAX_EXP * log((double) FLT_RADIX) + 0.5 * log(10.)) / log(10.)); minDigits = (int) floor((DBL_MIN_EXP - DBL_MANT_DIG) -- cgit v0.12 From 859e9838d18c82b7c6fbcc1c9af736f6be73aecb Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 2 Apr 2010 19:27:44 +0000 Subject: * library/reg/pkgIndex.tcl: [TIP #362]: Fixed first round of * tests/registry.test: bugs resulting from the recent commits * win/tclWinReg.c: of changes in support of the referenced TIP. --- ChangeLog | 5 +++++ library/reg/pkgIndex.tcl | 4 ++-- tests/registry.test | 10 +++++----- win/tclWinReg.c | 16 ++++++++-------- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7997e27..cfeb154 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,11 @@ floating point number until it is actually used. (This change avoids a bogus syslog message regarding a 'floating point software assist fault' on SGI systems.) + + * library/reg/pkgIndex.tcl: [TIP #362]: Fixed first round of + * tests/registry.test: bugs resulting from the recent commits + * win/tclWinReg.c: of changes in support of the referenced + TIP. 2010-03-31 Donal K. Fellows diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl index c24e700..f07dee4 100755 --- a/library/reg/pkgIndex.tcl +++ b/library/reg/pkgIndex.tcl @@ -2,8 +2,8 @@ if {![package vsatisfies [package provide Tcl] 8]} {return} if {[string compare $::tcl_platform(platform) windows]} {return} if {[info exists ::tcl_platform(debug)]} { package ifneeded registry 1.3 \ - [list load [file join $dir tclreg12g.dll] registry] + [list load [file join $dir tclreg13g.dll] registry] } else { package ifneeded registry 1.3 \ - [list load [file join $dir tclreg12.dll] registry] + [list load [file join $dir tclreg13.dll] registry] } diff --git a/tests/registry.test b/tests/registry.test index 8a7c4d4..02866f3 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -10,7 +10,7 @@ # Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# RCS: @(#) $Id: registry.test,v 1.25 2010/03/30 12:33:47 dkf Exp $ +# RCS: @(#) $Id: registry.test,v 1.26 2010/04/02 19:27:44 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -50,7 +50,7 @@ test registry-1.2 {argument parsing for registry command} {win reg} { } {1 {bad option "foo": must be broadcast, delete, get, keys, set, type, or values}} test registry-1.2a {argument parsing for registry command} {win reg} { list [catch {registry -33bit foo} msg] $msg -} {1 {bad option "-33bit": must be broadcast, delete, get, keys, set, type, or values}} +} {1 {bad mode "-33bit": must be -32bit or -64bit}} test registry-1.3 {argument parsing for registry command} {win reg} { list [catch {registry d} msg] $msg @@ -662,13 +662,13 @@ test registry-11.3 {SetValue: failure} \ test registry-12.1 {BroadcastValue} -constraints {win reg} -body { registry broadcast -} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout millisecs?\"" +} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout milliseconds?\"" test registry-12.2 {BroadcastValue} -constraints {win reg} -body { registry broadcast "" -time -} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout millisecs?\"" +} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout milliseconds?\"" test registry-12.3 {BroadcastValue} -constraints {win reg} -body { registry broadcast "" - 500 -} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout millisecs?\"" +} -returnCodes error -result "wrong # args: should be \"registry broadcast keyName ?-timeout milliseconds?\"" test registry-12.4 {BroadcastValue} -constraints {win reg} -body { registry broadcast {Environment} } -result {1 0} diff --git a/win/tclWinReg.c b/win/tclWinReg.c index d7eeae6..a2d9085 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.52 2010/03/30 12:38:30 dkf Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.53 2010/04/02 19:27:44 kennykb Exp $ */ #undef STATIC_BUILD @@ -409,13 +409,13 @@ RegistryObjCmd( if (argc == 1) { return DeleteKey(interp, objv[n], mode); } else if (argc == 2) { - return DeleteValue(interp, objv[n], objv[++n], mode); + return DeleteValue(interp, objv[n], objv[n+1], mode); } errString = "keyName ?valueName?"; break; case GetIdx: /* get */ if (argc == 2) { - return GetValue(interp, objv[n], objv[++n], mode); + return GetValue(interp, objv[n], objv[n+1], mode); } errString = "keyName valueName"; break; @@ -423,7 +423,7 @@ RegistryObjCmd( if (argc == 1) { return GetKeyNames(interp, objv[n], NULL, mode); } else if (argc == 2) { - return GetKeyNames(interp, objv[n], objv[++n], mode); + return GetKeyNames(interp, objv[n], objv[n+1], mode); } errString = "keyName ?pattern?"; break; @@ -442,17 +442,17 @@ RegistryObjCmd( RegCloseKey(key); return TCL_OK; } else if (argc == 3) { - return SetValue(interp, objv[n], objv[++n], objv[++n], NULL, + return SetValue(interp, objv[n], objv[n+1], objv[n+2], NULL, mode); } else if (argc == 4) { - return SetValue(interp, objv[n], objv[++n], objv[++n], objv[++n], + return SetValue(interp, objv[n], objv[n+1], objv[n+2], objv[n+3], mode); } errString = "keyName ?valueName data ?type??"; break; case TypeIdx: /* type */ if (argc == 2) { - return GetType(interp, objv[n], objv[++n], mode); + return GetType(interp, objv[n], objv[n+1], mode); } errString = "keyName valueName"; break; @@ -460,7 +460,7 @@ RegistryObjCmd( if (argc == 1) { return GetValueNames(interp, objv[n], NULL, mode); } else if (argc == 2) { - return GetValueNames(interp, objv[n], objv[++n], mode); + return GetValueNames(interp, objv[n], objv[n+1], mode); } errString = "keyName ?pattern?"; break; -- cgit v0.12 From bd2c56d7039122dcb51ef36f39766e245c84d821 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Fri, 2 Apr 2010 21:21:04 +0000 Subject: * generic/tcl.decls: [TIP #357]: First round of changes * generic/tclDecls.h: to export Tcl_LoadFile, Tcl_FindSymbol, * generic/tclIOUtil.c: and Tcl_FSUnloadFile to the public API. * generic/tclInt.h: * generic/tclLoad.c: * generic/tclLoadNone.c: * generic/tclStubInit.c: * tests/fileSystem.test: * tests/load.test: * tests/unload.test: * unix/tclLoadDl.c: * unix/tclLoadDyld.c: * unix/tclLoadNext.c: * unix/tclLoadOSF.c: * unix/tclLoadShl.c: * unix/tclUnixPipe.c: * win/Makefile.in: * win/tclWinLoad.c: --- generic/tcl.decls | 16 ++- generic/tclDecls.h | 36 +++++- generic/tclIOUtil.c | 310 ++++++++++++++++++++++++++++++++++++++------------ generic/tclInt.h | 31 +++-- generic/tclLoad.c | 71 ++++-------- generic/tclLoadNone.c | 57 +--------- generic/tclStubInit.c | 5 +- tests/fileSystem.test | 18 ++- tests/load.test | 8 +- tests/unload.test | 25 +++- unix/tclLoadDl.c | 42 +++++-- unix/tclLoadDyld.c | 50 +++++--- unix/tclLoadNext.c | 35 ++++-- unix/tclLoadOSF.c | 38 +++++-- unix/tclLoadShl.c | 40 +++++-- unix/tclUnixPipe.c | 36 +++++- win/Makefile.in | 4 +- win/tclWinLoad.c | 168 +++++++++++++++++++++++---- 18 files changed, 714 insertions(+), 276 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index e9843a8..0e59216 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.172 2010/01/29 16:17:20 nijtmans Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.173 2010/04/02 21:21:04 kennykb Exp $ library tcl @@ -2305,6 +2305,20 @@ declare 626 generic { int Tcl_NRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) } +# TIP #357 (Export TclLoadFile and TclpFindSymbol) kbk +declare 627 generic { + int Tcl_LoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, + const char *symv[], int flags, void* procPtrs, + Tcl_LoadHandle* handlePtr) +} +declare 628 generic { + void* Tcl_FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle handle, + const char* symbol) +} +declare 629 generic { + int Tcl_FSUnloadFile(Tcl_Interp* interp, Tcl_LoadHandle handlePtr) +} + # ----- BASELINE -- FOR -- 8.6.0 ----- # ############################################################################## diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 2508da9..8c2db65 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.174 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.175 2010/04/02 21:21:05 kennykb Exp $ */ #ifndef _TCLDECLS @@ -3684,6 +3684,25 @@ EXTERN int Tcl_NRExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr, EXTERN int Tcl_NRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); #endif +#ifndef Tcl_LoadFile_TCL_DECLARED +#define Tcl_LoadFile_TCL_DECLARED +/* 627 */ +EXTERN int Tcl_LoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, + const char *symv[], int flags, void*procPtrs, + Tcl_LoadHandle*handlePtr); +#endif +#ifndef Tcl_FindSymbol_TCL_DECLARED +#define Tcl_FindSymbol_TCL_DECLARED +/* 628 */ +EXTERN void* Tcl_FindSymbol(Tcl_Interp*interp, + Tcl_LoadHandle handle, const char*symbol); +#endif +#ifndef Tcl_FSUnloadFile_TCL_DECLARED +#define Tcl_FSUnloadFile_TCL_DECLARED +/* 629 */ +EXTERN int Tcl_FSUnloadFile(Tcl_Interp*interp, + Tcl_LoadHandle handlePtr); +#endif typedef struct TclStubHooks { const struct TclPlatStubs *tclPlatStubs; @@ -4346,6 +4365,9 @@ typedef struct TclStubs { int (*tcl_CloseEx) (Tcl_Interp *interp, Tcl_Channel chan, int flags); /* 624 */ int (*tcl_NRExprObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *resultPtr); /* 625 */ int (*tcl_NRSubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 626 */ + int (*tcl_LoadFile) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *symv[], int flags, void*procPtrs, Tcl_LoadHandle*handlePtr); /* 627 */ + void* (*tcl_FindSymbol) (Tcl_Interp*interp, Tcl_LoadHandle handle, const char*symbol); /* 628 */ + int (*tcl_FSUnloadFile) (Tcl_Interp*interp, Tcl_LoadHandle handlePtr); /* 629 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) @@ -6884,6 +6906,18 @@ extern const TclStubs *tclStubsPtr; #define Tcl_NRSubstObj \ (tclStubsPtr->tcl_NRSubstObj) /* 626 */ #endif +#ifndef Tcl_LoadFile +#define Tcl_LoadFile \ + (tclStubsPtr->tcl_LoadFile) /* 627 */ +#endif +#ifndef Tcl_FindSymbol +#define Tcl_FindSymbol \ + (tclStubsPtr->tcl_FindSymbol) /* 628 */ +#endif +#ifndef Tcl_FSUnloadFile +#define Tcl_FSUnloadFile \ + (tclStubsPtr->tcl_FSUnloadFile) /* 629 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index a838df6..c1e9430 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.170 2010/03/11 13:35:24 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.171 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" @@ -42,6 +42,10 @@ static void FsUpdateCwd(Tcl_Obj *cwdObj, ClientData clientData); #ifdef TCL_THREADS static void FsRecacheFilesystemList(void); #endif +static void* DivertFindSymbol(Tcl_Interp* interp, + Tcl_LoadHandle loadHandle, + const char* symbol); +static void DivertUnloadFile(Tcl_LoadHandle loadHandle); /* * These form part of the native filesystem support. They are needed here @@ -2967,9 +2971,8 @@ Tcl_FSLoadFile( * function which should be used for this * file. */ { - const char *symbols[2]; - Tcl_PackageInitProc **procPtrs[2]; - ClientData clientData; + const char *symbols[3]; + void *procPtrs[2]; int res; /* @@ -2978,35 +2981,27 @@ Tcl_FSLoadFile( symbols[0] = sym1; symbols[1] = sym2; - procPtrs[0] = proc1Ptr; - procPtrs[1] = proc2Ptr; + symbols[2] = NULL; /* * Perform the load. */ - res = TclLoadFile(interp, pathPtr, 2, symbols, procPtrs, handlePtr, - &clientData, unloadProcPtr); - - /* - * Due to an unfortunate mis-design in Tcl 8.4 fs, when loading a shared - * library, we don't keep the loadHandle (for TclpFindSymbol) and the - * clientData (for the unloadProc) separately. In fact we effectively - * throw away the loadHandle and only use the clientData. It just so - * happens, for the native filesystem only, that these two are identical. - * - * This also means that the signatures Tcl_FSUnloadFileProc and - * Tcl_FSLoadFileProc are both misleading. - */ + res = Tcl_LoadFile(interp, pathPtr, symbols, 0, procPtrs, handlePtr); + if (res == TCL_OK) { + *proc1Ptr = (Tcl_PackageInitProc*) procPtrs[0]; + *proc2Ptr = (Tcl_PackageInitProc*) procPtrs[1]; + } else { + *proc1Ptr = *proc2Ptr = NULL; + } - *handlePtr = clientData; return res; } /* *---------------------------------------------------------------------- * - * TclLoadFile -- + * Tcl_LoadFile -- * * Dynamically loads a binary code file into memory and returns the * addresses of a number of given functions within that file, if they are @@ -3020,54 +3015,42 @@ Tcl_FSLoadFile( * filesystems (and has other problems documented in the load man-page), * so it is advised that full paths are always used. * - * This function is currently private to Tcl. It may be exported in the - * future and its interface fixed (but we should clean up the - * loadHandle/clientData confusion at that time -- see the above comments - * in Tcl_FSLoadFile for details). For a public function, see - * Tcl_FSLoadFile. - * * Results: * A standard Tcl completion code. If an error occurs, an error message * is left in the interp's result. * * Side effects: * New code suddenly appears in memory. This may later be unloaded by - * passing the clientData to the unloadProc. + * calling TclFS_UnloadFile. * *---------------------------------------------------------------------- */ int -TclLoadFile( +Tcl_LoadFile( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Obj *pathPtr, /* Name of the file containing the desired * code. */ - int symc, /* Number of symbols/procPtrs in the next two - * arrays. */ const char *symbols[], /* Names of functions to look up in the file's * symbol table. */ - Tcl_PackageInitProc **procPtrs[], - /* Where to return the addresses corresponding + int flags, /* Flags (unused) */ + void *procVPtrs, /* Where to return the addresses corresponding * to symbols[]. */ - Tcl_LoadHandle *handlePtr, /* Filled with token for shared library + Tcl_LoadHandle *handlePtr) /* Filled with token for shared library * information which can be used in * TclpFindSymbol. */ - ClientData *clientDataPtr, /* Filled with token for dynamically loaded - * file which will be passed back to - * (*unloadProcPtr)() to unload the file. */ - Tcl_FSUnloadFileProc **unloadProcPtr) - /* Filled with address of Tcl_FSUnloadFileProc - * function which should be used for this - * file. */ { + void** procPtrs = (void**) procVPtrs; const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); const Tcl_Filesystem *copyFsPtr; + Tcl_FSUnloadFileProc* unloadProcPtr; Tcl_Obj *copyToPtr; Tcl_LoadHandle newLoadHandle = NULL; - ClientData newClientData = NULL; + Tcl_LoadHandle divertedLoadHandle = NULL; Tcl_FSUnloadFileProc *newUnloadProcPtr = NULL; FsDivertLoad *tvdlPtr; int retVal; + int i; if (fsPtr == NULL) { Tcl_SetErrno(ENOENT); @@ -3076,18 +3059,12 @@ TclLoadFile( if (fsPtr->loadFileProc != NULL) { int retVal = fsPtr->loadFileProc(interp, pathPtr, handlePtr, - unloadProcPtr); + &unloadProcPtr); if (retVal == TCL_OK) { if (*handlePtr == NULL) { return TCL_ERROR; } - - /* - * Copy this across, since both are equal for the native fs. - */ - - *clientDataPtr = *handlePtr; Tcl_ResetResult(interp); goto resolveSymbols; } @@ -3147,7 +3124,7 @@ TclLoadFile( ret = Tcl_Read(data, buffer, size); Tcl_Close(interp, data); ret = TclpLoadMemory(interp, buffer, size, ret, handlePtr, - unloadProcPtr); + &unloadProcPtr); if (ret == TCL_OK && *handlePtr != NULL) { *clientDataPtr = *handlePtr; goto resolveSymbols; @@ -3163,12 +3140,7 @@ TclLoadFile( * to load. */ - copyToPtr = TclpTempFileName(); - if (copyToPtr == NULL) { - Tcl_AppendResult(interp, "couldn't create temporary file: ", - Tcl_PosixError(interp), NULL); - return TCL_ERROR; - } + copyToPtr = TclpTempFileNameForLibrary(interp, pathPtr); Tcl_IncrRefCount(copyToPtr); copyFsPtr = Tcl_FSGetFileSystemForPath(copyToPtr); @@ -3223,8 +3195,8 @@ TclLoadFile( Tcl_ResetResult(interp); - retVal = TclLoadFile(interp, copyToPtr, symc, symbols, procPtrs, - &newLoadHandle, &newClientData, &newUnloadProcPtr); + retVal = Tcl_LoadFile(interp, copyToPtr, symbols, 0, procPtrs, + &newLoadHandle); if (retVal != TCL_OK) { /* * The file didn't load successfully. @@ -3251,8 +3223,6 @@ TclLoadFile( */ *handlePtr = newLoadHandle; - *clientDataPtr = newClientData; - *unloadProcPtr = newUnloadProcPtr; Tcl_ResetResult(interp); return TCL_OK; } @@ -3307,20 +3277,36 @@ TclLoadFile( } copyToPtr = NULL; - *handlePtr = newLoadHandle; - *clientDataPtr = tvdlPtr; - *unloadProcPtr = TclFSUnloadTempFile; + + + divertedLoadHandle = (Tcl_LoadHandle) + ckalloc(sizeof (struct Tcl_LoadHandle_)); + divertedLoadHandle->clientData = (ClientData) tvdlPtr; + divertedLoadHandle->findSymbolProcPtr = DivertFindSymbol; + divertedLoadHandle->unloadFileProcPtr = DivertUnloadFile; + *handlePtr = divertedLoadHandle; Tcl_ResetResult(interp); return retVal; resolveSymbols: - { - int i; - - for (i=0 ; iunloadFileProcPtr(*handlePtr); + *handlePtr = NULL; + return TCL_ERROR; } } } @@ -3328,6 +3314,113 @@ TclLoadFile( } /* + *----------------------------------------------------------------------------- + * + * DivertFindSymbol -- + * + * Find a symbol in a shared library loaded by copy-from-VFS. + * + *----------------------------------------------------------------------------- + */ + +static void* +DivertFindSymbol(Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_LoadHandle loadHandle, /* Handle to the diverted module */ + const char* symbol) /* Symbol to resolve */ +{ + FsDivertLoad* tvdlPtr = (FsDivertLoad*) (loadHandle->clientData); + Tcl_LoadHandle originalHandle = tvdlPtr->loadHandle; + return originalHandle->findSymbolProcPtr(interp, originalHandle, symbol); +} + +/* + *----------------------------------------------------------------------------- + * + * DivertUnloadFile -- + * + * Unloads a file that has been loaded by copying from VFS to the + * native filesystem. + * + * Parameters: + * loadHandle -- Handle of the file to unload + * + *----------------------------------------------------------------------------- + */ + +static void +DivertUnloadFile(Tcl_LoadHandle loadHandle) +{ + FsDivertLoad* tvdlPtr = (FsDivertLoad*) (loadHandle->clientData); + Tcl_LoadHandle originalHandle = tvdlPtr->loadHandle; + + /* + * This test should never trigger, since we give the client data in the + * function above. + */ + + if (tvdlPtr == NULL) { + return; + } + + /* + * Call the real 'unloadfile' proc we actually used. It is very important + * that we call this first, so that the shared library is actually + * unloaded by the OS. Otherwise, the following 'delete' may well fail + * because the shared library is still in use. + */ + + originalHandle->unloadFileProcPtr(originalHandle); + + /* What filesystem contains the temp copy of the library? */ + + if (tvdlPtr->divertedFilesystem == NULL) { + /* + * It was the native filesystem, and we have a special function + * available just for this purpose, which we know works even at this + * late stage. + */ + + TclpDeleteFile(tvdlPtr->divertedFileNativeRep); + NativeFreeInternalRep(tvdlPtr->divertedFileNativeRep); + } else { + /* + * Remove the temporary file we created. Note, we may crash here + * because encodings have been taken down already. + */ + + if (tvdlPtr->divertedFilesystem->deleteFileProc(tvdlPtr->divertedFile) + != TCL_OK) { + /* + * The above may have failed because the filesystem, or something + * it depends upon (e.g. encodings) have been taken down because + * Tcl is exiting. + * + * We may need to work out how to delete this file more robustly + * (or give the filesystem the information it needs to delete the + * file more robustly). + * + * In particular, one problem might be that the filesystem cannot + * extract the information it needs from the above path object + * because Tcl's entire filesystem apparatus (the code in this + * file) has been finalized, and it refuses to pass the internal + * representation to the filesystem. + */ + } + + /* + * And free up the allocations. This will also of course remove a + * refCount from the Tcl_Filesystem to which this file belongs, which + * could then free up the filesystem if we are exiting. + */ + + Tcl_DecrRefCount(tvdlPtr->divertedFile); + } + + ckfree((void*)tvdlPtr); + ckfree((void*)loadHandle); +} + +/* * This function used to be in the platform specific directories, but it has * now been made to work cross-platform. */ @@ -3366,9 +3459,84 @@ TclpLoadFile( *clientDataPtr = handle; - *proc1Ptr = TclpFindSymbol(interp, handle, sym1); - *proc2Ptr = TclpFindSymbol(interp, handle, sym2); + *proc1Ptr = Tcl_FindSymbol(interp, handle, sym1); + *proc2Ptr = Tcl_FindSymbol(interp, handle, sym2); + return TCL_OK; +} + +/* + *----------------------------------------------------------------------------- + * + * Tcl_FindSymbol -- + * + * Find a symbol in a loaded library + * + * Results: + * Returns a pointer to the symbol if found. If not found, returns + * NULL and leaves an error message in the interpreter result. + * + * This function was once filesystem-specific, but has been made portable + * by having TclpDlopen return a structure that includes procedure pointers. + * + *----------------------------------------------------------------------------- + */ + +void* +Tcl_FindSymbol(Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_LoadHandle loadHandle, /* Handle to the loaded library */ + const char* symbol) /* Name of the symbol to resolve */ +{ + return (*(loadHandle->findSymbolProcPtr))(interp, loadHandle, symbol); +} + +/* + *----------------------------------------------------------------------------- + * + * Tcl_FSUnloadFile -- + * + * Unloads a library given its handle. Checks first that the library + * supports unloading. + * + *----------------------------------------------------------------------------- + */ + +int +Tcl_FSUnloadFile(Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_LoadHandle handle) /* Handle of the file to unload */ +{ + if (handle->unloadFileProcPtr == NULL) { + if (interp != NULL) { + Tcl_SetObjResult(interp, + Tcl_NewStringObj("cannot unload: filesystem " + "does not support unloading", + -1)); + } + return TCL_ERROR; + } else { + TclpUnloadFile(handle); return TCL_OK; + } +} + +/* + *----------------------------------------------------------------------------- + * + * TclpUnloadFile -- + * + * Unloads a library given its handle + * + * This function was once filesystem-specific, but has been made portable + * by having TclpDlopen return a structure that includes procedure pointers. + * + *----------------------------------------------------------------------------- + */ + +void +TclpUnloadFile(Tcl_LoadHandle handle) +{ + if (handle->unloadFileProcPtr != NULL) { + (*(handle->unloadFileProcPtr))(handle); + } } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 422e203..6c70fd2 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.466 2010/03/27 22:40:14 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.467 2010/04/02 21:21:06 kennykb Exp $ */ #ifndef _TCLINT @@ -2772,6 +2772,25 @@ typedef struct ForIterData { int word; /* Index of the body script in the command */ } ForIterData; +/* TIP #357 - Structure doing the bookkeeping of handles for Tcl_LoadFile + * and Tcl_FindSymbol. This structure corresponds to an opaque + * typedef in tcl.h */ + +typedef void* TclFindSymbolProc(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, + const char* symbol); +struct Tcl_LoadHandle_ { + ClientData clientData; /* Client data is the load handle in the + * native filesystem if a module was loaded + * there, or an opaque pointer to a structure + * for further bookkeeping on load-from-VFS + * and load-from-memory */ + TclFindSymbolProc* findSymbolProcPtr; + /* Procedure that resolves symbols in a + * loaded module */ + Tcl_FSUnloadFileProc* unloadFileProcPtr; + /* Procedure that unloads a loaded module */ +}; + /* *---------------------------------------------------------------- * Procedures shared among Tcl modules but not used by the outside world: @@ -2922,12 +2941,6 @@ MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, MODULE_SCOPE void TclListLines(Tcl_Obj *listObj, int line, int n, int *lines, Tcl_Obj *const *elems); MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr); -MODULE_SCOPE int TclLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, - int symc, const char *symbols[], - Tcl_PackageInitProc **procPtrs[], - Tcl_LoadHandle *handlePtr, - ClientData *clientDataPtr, - Tcl_FSUnloadFileProc **unloadProcPtr); MODULE_SCOPE Tcl_Obj * TclLsetList(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *indexPtr, Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, @@ -2965,6 +2978,7 @@ MODULE_SCOPE int TclProcessReturn(Tcl_Interp *interp, int code, int level, Tcl_Obj *returnOpts); MODULE_SCOPE int TclpObjLstat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf); MODULE_SCOPE Tcl_Obj * TclpTempFileName(void); +MODULE_SCOPE Tcl_Obj * TclpTempFileNameForLibrary(Tcl_Interp *interp, Tcl_Obj* pathPtr); MODULE_SCOPE Tcl_Obj * TclNewFSPathObj(Tcl_Obj *dirPtr, const char *addStrRep, int len); MODULE_SCOPE int TclpDeleteFile(const char *path); @@ -3017,7 +3031,6 @@ MODULE_SCOPE char * TclpReadlink(const char *fileName, Tcl_DString *linkPtr); MODULE_SCOPE void TclpSetInterfaces(void); MODULE_SCOPE void TclpSetVariables(Tcl_Interp *interp); -MODULE_SCOPE void TclpUnloadFile(Tcl_LoadHandle loadHandle); MODULE_SCOPE void * TclThreadStorageKeyGet(Tcl_ThreadDataKey *keyPtr); MODULE_SCOPE void TclThreadStorageKeySet(Tcl_ThreadDataKey *keyPtr, void *data); @@ -3058,8 +3071,6 @@ MODULE_SCOPE int TclSubstTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int *clNextOuter, const char *outerScript); MODULE_SCOPE Tcl_Obj * TclpNativeToNormalized(ClientData clientData); MODULE_SCOPE Tcl_Obj * TclpFilesystemPathType(Tcl_Obj *pathPtr); -MODULE_SCOPE Tcl_PackageInitProc *TclpFindSymbol(Tcl_Interp *interp, - Tcl_LoadHandle loadHandle, const char *symbol); MODULE_SCOPE int TclpDlopen(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_LoadHandle *loadHandle, Tcl_FSUnloadFileProc **unloadProcPtr); diff --git a/generic/tclLoad.c b/generic/tclLoad.c index e6e2ba5..8ba90ed 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.24 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.25 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" @@ -57,11 +57,6 @@ typedef struct LoadedPackage { * in trusted interpreters. */ int safeInterpRefCount; /* How many times the package has been loaded * in safe interpreters. */ - Tcl_FSUnloadFileProc *unLoadProcPtr; - /* Function to use to unload this package. If - * NULL, then we do not attempt to unload the - * package. If fileName is NULL, then this - * field is irrelevant. */ struct LoadedPackage *nextPtr; /* Next in list of all packages loaded into * this application process. NULL means end of @@ -131,15 +126,12 @@ Tcl_LoadObjCmd( LoadedPackage *pkgPtr, *defaultPtr; Tcl_DString pkgName, tmp, initName, safeInitName; Tcl_DString unloadName, safeUnloadName; - Tcl_PackageInitProc *initProc, *safeInitProc, *unloadProc, *safeUnloadProc; InterpPackage *ipFirstPtr, *ipPtr; int code, namesMatch, filesMatch, offset; - const char *symbols[4]; - Tcl_PackageInitProc **procPtrs[4]; - ClientData clientData; + const char *symbols[2]; + void* procPtrs[1]; const char *p, *fullFileName, *packageName; Tcl_LoadHandle loadHandle; - Tcl_FSUnloadFileProc *unLoadProcPtr = NULL; Tcl_UniChar ch; if ((objc < 2) || (objc > 4)) { @@ -359,33 +351,15 @@ Tcl_LoadObjCmd( */ symbols[0] = Tcl_DStringValue(&initName); - symbols[1] = Tcl_DStringValue(&safeInitName); - symbols[2] = Tcl_DStringValue(&unloadName); - symbols[3] = Tcl_DStringValue(&safeUnloadName); - procPtrs[0] = &initProc; - procPtrs[1] = &safeInitProc; - procPtrs[2] = &unloadProc; - procPtrs[3] = &safeUnloadProc; + symbols[1] = NULL; Tcl_MutexLock(&packageMutex); - code = TclLoadFile(interp, objv[1], 4, symbols, procPtrs, - &loadHandle, &clientData, &unLoadProcPtr); + code = Tcl_LoadFile(interp, objv[1], symbols, 0, procPtrs, &loadHandle); Tcl_MutexUnlock(&packageMutex); - loadHandle = clientData; if (code != TCL_OK) { goto done; } - if (*procPtrs[0] /* initProc */ == NULL) { - Tcl_AppendResult(interp, "couldn't find procedure ", - Tcl_DStringValue(&initName), NULL); - if (unLoadProcPtr != NULL) { - unLoadProcPtr(loadHandle); - } - code = TCL_ERROR; - goto done; - } - /* * Create a new record to describe this package. */ @@ -398,11 +372,14 @@ Tcl_LoadObjCmd( ckalloc((unsigned) (Tcl_DStringLength(&pkgName) + 1)); strcpy(pkgPtr->packageName, Tcl_DStringValue(&pkgName)); pkgPtr->loadHandle = loadHandle; - pkgPtr->unLoadProcPtr = unLoadProcPtr; - pkgPtr->initProc = *procPtrs[0]; - pkgPtr->safeInitProc = *procPtrs[1]; - pkgPtr->unloadProc = (Tcl_PackageUnloadProc *) *procPtrs[2]; - pkgPtr->safeUnloadProc = (Tcl_PackageUnloadProc *) *procPtrs[3]; + pkgPtr->initProc = (Tcl_PackageInitProc*) procPtrs[0]; + pkgPtr->safeInitProc = (Tcl_PackageInitProc*) + Tcl_FindSymbol(interp, loadHandle, Tcl_DStringValue(&safeInitName)); + pkgPtr->unloadProc = (Tcl_PackageUnloadProc*) + Tcl_FindSymbol(interp, loadHandle, Tcl_DStringValue(&unloadName)); + pkgPtr->safeUnloadProc = (Tcl_PackageUnloadProc *) + Tcl_FindSymbol(interp, loadHandle, + Tcl_DStringValue(&safeUnloadName)); pkgPtr->interpRefCount = 0; pkgPtr->safeInterpRefCount = 0; @@ -410,6 +387,11 @@ Tcl_LoadObjCmd( pkgPtr->nextPtr = firstPackagePtr; firstPackagePtr = pkgPtr; Tcl_MutexUnlock(&packageMutex); + /* + * The Tcl_FindSymbol calls may have left a spurious error message + * in the interpreter result. + */ + Tcl_ResetResult(interp); } /* @@ -787,14 +769,9 @@ Tcl_UnloadObjCmd( */ if (pkgPtr->fileName[0] != '\0') { - Tcl_FSUnloadFileProc *unLoadProcPtr = pkgPtr->unLoadProcPtr; - if (unLoadProcPtr != NULL) { Tcl_MutexLock(&packageMutex); - if ((pkgPtr->unloadProc != NULL) || (unLoadProcPtr == TclFSUnloadTempFile)) { - unLoadProcPtr(pkgPtr->loadHandle); - } - + if (Tcl_FSUnloadFile(interp, pkgPtr->loadHandle) == TCL_OK) { /* * Remove this library from the loaded library cache. */ @@ -839,9 +816,6 @@ Tcl_UnloadObjCmd( ckfree((char *) ipPtr); Tcl_MutexUnlock(&packageMutex); } else { - Tcl_AppendResult(interp, "file \"", fullFileName, - "\" cannot be unloaded: filesystem does not support unloading", - NULL); code = TCL_ERROR; } } @@ -1146,12 +1120,7 @@ TclFinalizeLoad(void) */ if (pkgPtr->fileName[0] != '\0') { - Tcl_FSUnloadFileProc *unLoadProcPtr = pkgPtr->unLoadProcPtr; - if ((unLoadProcPtr != NULL) - && ((pkgPtr->unloadProc != NULL) - || (unLoadProcPtr == TclFSUnloadTempFile))) { - unLoadProcPtr(pkgPtr->loadHandle); - } + Tcl_FSUnloadFile(NULL, pkgPtr->loadHandle); } #endif diff --git a/generic/tclLoadNone.c b/generic/tclLoadNone.c index 27484ca..dbb0a25 100644 --- a/generic/tclLoadNone.c +++ b/generic/tclLoadNone.c @@ -1,7 +1,7 @@ /* * tclLoadNone.c -- * - * This procedure provides a version of the TclLoadFile for use in + * This procedure provides a version of the TclpDlopen for use in * systems that don't support dynamic loading; it just returns an error. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadNone.c,v 1.13 2008/04/27 22:21:31 dkf Exp $ + * RCS: @(#) $Id: tclLoadNone.c,v 1.14 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" @@ -55,33 +55,6 @@ TclpDlopen( /* *---------------------------------------------------------------------- * - * TclpFindSymbol -- - * - * Looks up a symbol, by name, through a handle associated with a - * previously loaded piece of code (shared library). This version of this - * routine should never be called because the associated TclpDlopen() - * function always returns an error. - * - * Results: - * Returns a pointer to the function associated with 'symbol' if it is - * found. Otherwise returns NULL and may leave an error message in the - * interp's result. - * - *---------------------------------------------------------------------- - */ - -Tcl_PackageInitProc * -TclpFindSymbol( - Tcl_Interp *interp, - Tcl_LoadHandle loadHandle, - const char *symbol) -{ - return NULL; -} - -/* - *---------------------------------------------------------------------- - * * TclGuessPackageName -- * * If the "load" command is invoked without providing a package name, @@ -110,32 +83,6 @@ TclGuessPackageName( } /* - *---------------------------------------------------------------------- - * - * TclpUnloadFile -- - * - * This procedure is called to carry out dynamic unloading of binary code; - * it is intended for use only on systems that don't support dynamic - * loading (it does nothing). - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TclpUnloadFile( - Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to - * TclpDlopen(). The loadHandle is a token - * that represents the loaded file. */ -{ -} - -/* * Local Variables: * mode: c * c-basic-offset: 4 diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index b7e4b9a..7cfa58a 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.189 2010/03/20 15:40:14 dkf Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.190 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" @@ -1115,6 +1115,9 @@ const TclStubs tclStubs = { Tcl_CloseEx, /* 624 */ Tcl_NRExprObj, /* 625 */ Tcl_NRSubstObj, /* 626 */ + Tcl_LoadFile, /* 627 */ + Tcl_FindSymbol, /* 628 */ + Tcl_FSUnloadFile, /* 629 */ }; /* !END!: Do not edit above this line. */ diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 9937618..071b63f 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -619,7 +619,7 @@ if {[testConstraint testfilesystem]} { while {![catch {testfilesystem 0}]} {} } -test filesystem-7.1 {load from vfs} -setup { +test filesystem-7.1.1 {load from vfs} -setup { set dir [pwd] } -constraints {win testsimplefilesystem} -body { # This may cause a crash on exit @@ -634,6 +634,22 @@ test filesystem-7.1 {load from vfs} -setup { } -cleanup { cd $dir } -result ok +test filesystem-7.1.2 {load from vfs, and then unload again} -setup { + set dir [pwd] +} -constraints {win testsimplefilesystem} -body { + # This may cause a crash on exit + cd [file dirname [info nameof]] + set reg [lindex [glob tclreg*[info sharedlib]] 0] + testsimplefilesystem 1 + # This loads reg via a complex copy-to-temp operation + load simplefs:/$reg Registry + unload simplefs:/$reg + testsimplefilesystem 0 + return ok + # The real result of this test is what happens when Tcl exits. +} -cleanup { + cd $dir +} -result ok test filesystem-7.2 {cross-filesystem copy from vfs maintains mtime} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] diff --git a/tests/load.test b/tests/load.test index 8ecdaf5..711b919 100644 --- a/tests/load.test +++ b/tests/load.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: load.test,v 1.20 2010/02/07 08:03:11 dkf Exp $ +# RCS: @(#) $Id: load.test,v 1.21 2010/04/02 21:21:06 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -77,8 +77,10 @@ test load-2.2 {loading into a safe interpreter, with package name conversion} \ } {31 1 {invalid command name "pkgb_unsafe"} 1 {invalid command name "pkgb_sub"}} test load-2.3 {loading with no _Init procedure} -constraints [list $dll $loaded] \ -body { - list [catch {load [file join $testDir pkgc$ext] foo} msg] $msg -} -match glob -result {1 {*couldn't find procedure Foo_Init}} + list [catch {load [file join $testDir pkgc$ext] foo} msg] $msg $errorCode +} -match glob \ + -result [list 1 {cannot find symbol "Foo_Init"*} \ + {TCL LOOKUP LOAD_SYMBOL *Foo_Init}] test load-2.4 {loading with no _SafeInit procedure} [list $dll $loaded] { list [catch {load [file join $testDir pkga$ext] {} child} msg] $msg } {1 {can't use package in a safe interpreter: no Pkga_SafeInit procedure}} diff --git a/tests/unload.test b/tests/unload.test index b61e4cc..bf704c7 100644 --- a/tests/unload.test +++ b/tests/unload.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unload.test,v 1.8 2008/07/21 21:25:22 nijtmans Exp $ +# RCS: @(#) $Id: unload.test,v 1.9 2010/04/02 21:21:06 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -40,6 +40,10 @@ set alreadyTotalLoaded [info loaded] # Certain tests require the 'teststaticpkg' command from tcltest testConstraint teststaticpkg [llength [info commands teststaticpkg]] +# Certain tests need the 'testsimplefilsystem' in tcltest +testConstraint testsimplefilesystem \ + [llength [info commands testsimplefilesystem]] + # Basic tests: parameter testing... test unload-1.1 {basic errors} -returnCodes error -body { unload @@ -213,9 +217,28 @@ test unload-4.6 {basic unloading of unloadable package from a safe interpreter, [child-trusted eval {list $pkgua_loaded $pkgua_detached $pkgua_unloaded}] } {{. {} {}} {} {} {. . .}} +test unload-5.1 {unload a module loaded from vfs} \ + -constraints [list $dll $loaded testsimplefilesystem] \ + -setup { + set dir [pwd] + cd $testDir + testsimplefilesystem 1 + load simplefs:/pkgua$ext pkgua + } \ + -body { + list [catch {unload simplefs:/pkgua$ext} msg] $msg + } \ + -result {0 {}} + + + # cleanup interp delete child interp delete child-trusted unset ext ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 282d5bb..802e0dd 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.19 2010/03/11 15:02:33 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.20 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" @@ -34,6 +34,12 @@ # define RTLD_GLOBAL 0 #endif +/* Static procedures defined within this file */ + +static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, + const char* symbol); +static void UnloadFile(Tcl_LoadHandle loadHandle); + /* *--------------------------------------------------------------------------- * @@ -66,6 +72,7 @@ TclpDlopen( * file. */ { void *handle; + Tcl_LoadHandle newHandle; const char *native; /* @@ -103,16 +110,20 @@ TclpDlopen( Tcl_GetString(pathPtr), "\": ", errorStr, NULL); return TCL_ERROR; } + newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle)); + newHandle->clientData = (ClientData) handle; + newHandle->findSymbolProcPtr = &FindSymbol; + newHandle->unloadFileProcPtr = &UnloadFile; + *unloadProcPtr = &UnloadFile; + *loadHandle = newHandle; - *unloadProcPtr = &TclpUnloadFile; - *loadHandle = (Tcl_LoadHandle) handle; return TCL_OK; } /* *---------------------------------------------------------------------- * - * TclpFindSymbol -- + * FindSymbol -- * * Looks up a symbol, by name, through a handle associated with a * previously loaded piece of code (shared library). @@ -125,15 +136,15 @@ TclpDlopen( *---------------------------------------------------------------------- */ -Tcl_PackageInitProc * -TclpFindSymbol( +static void * +FindSymbol( Tcl_Interp *interp, /* Place to put error messages. */ Tcl_LoadHandle loadHandle, /* Value from TcpDlopen(). */ const char *symbol) /* Symbol to look up. */ { const char *native; Tcl_DString newName, ds; - void *handle = (void *) loadHandle; + void *handle = (void *)(loadHandle->clientData); Tcl_PackageInitProc *proc; /* @@ -154,14 +165,20 @@ TclpFindSymbol( Tcl_DStringFree(&newName); } Tcl_DStringFree(&ds); - + if (proc == NULL && interp != NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "cannot find symbol \"", symbol, "\": ", + dlerror(), NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, + NULL); + } return proc; } /* *---------------------------------------------------------------------- * - * TclpUnloadFile -- + * UnloadFile -- * * Unloads a dynamically loaded binary code file from memory. Code * pointers in the formerly loaded file are no longer valid after calling @@ -176,16 +193,17 @@ TclpFindSymbol( *---------------------------------------------------------------------- */ -void -TclpUnloadFile( +static void +UnloadFile( Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { void *handle; - handle = (void *) loadHandle; + handle = (void *)(loadHandle->clientData); dlclose(handle); + ckfree((char*)loadHandle); } /* diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 4b64032..2f833cd 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.34 2010/03/11 15:02:33 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.35 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" @@ -94,6 +94,14 @@ MODULE_SCOPE long tclMacOSXDarwinRelease; #define TclLoadDbgMsg(m, ...) #endif +/* Static functions defined in this file */ + +static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, + const char* symbol); +static void UnloadFile(Tcl_LoadHandle handle); + + + #if TCL_DYLD_USE_NSMODULE || defined(TCL_LOAD_FROM_MEMORY) /* *---------------------------------------------------------------------- @@ -167,6 +175,7 @@ TclpDlopen( * file. */ { Tcl_DyldLoadHandle *dyldLoadHandle; + Tcl_LoadHandle* newHandle; #if TCL_DYLD_USE_DLFCN void *dlHandle = NULL; #endif @@ -307,8 +316,12 @@ TclpDlopen( dyldLoadHandle->dyldLibHeader = dyldLibHeader; dyldLoadHandle->modulePtr = modulePtr; #endif - *loadHandle = (Tcl_LoadHandle) dyldLoadHandle; - *unloadProcPtr = &TclpUnloadFile; + newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle)); + newHandle->clientData = dyldLoadHandle; + newHandle->findSymbolProcPtr = &FindSymbol; + newHandle->unloadProcPtr = &UnloadFile; + *unloadProcPtr = &UnloadFile; + *loadHandle = newHandle; result = TCL_OK; } else { Tcl_AppendResult(interp, errMsg, NULL); @@ -329,7 +342,7 @@ TclpDlopen( /* *---------------------------------------------------------------------- * - * TclpFindSymbol -- + * FindSymbol -- * * Looks up a symbol, by name, through a handle associated with a * previously loaded piece of code (shared library). @@ -342,13 +355,14 @@ TclpDlopen( *---------------------------------------------------------------------- */ -MODULE_SCOPE Tcl_PackageInitProc * -TclpFindSymbol( +static void* +FindSymbol( Tcl_Interp *interp, /* For error reporting. */ Tcl_LoadHandle loadHandle, /* Handle from TclpDlopen. */ const char *symbol) /* Symbol name to look up. */ { - Tcl_DyldLoadHandle *dyldLoadHandle = (Tcl_DyldLoadHandle *) loadHandle; + Tcl_DyldLoadHandle *dyldLoadHandle = + (Tcl_DyldLoadHandle *) (loadHandle->clientData); Tcl_PackageInitProc *proc = NULL; const char *errMsg = NULL; Tcl_DString ds; @@ -436,8 +450,9 @@ TclpFindSymbol( #endif /* TCL_DYLD_USE_NSMODULE */ } Tcl_DStringFree(&ds); - if (errMsg) { + if (errMsg && (interp != NULL)) { Tcl_AppendResult(interp, errMsg, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); } return proc; } @@ -445,7 +460,7 @@ TclpFindSymbol( /* *---------------------------------------------------------------------- * - * TclpUnloadFile -- + * UnloadFile -- * * Unloads a dynamically loaded binary code file from memory. Code * pointers in the formerly loaded file are no longer valid after calling @@ -462,13 +477,14 @@ TclpFindSymbol( *---------------------------------------------------------------------- */ -MODULE_SCOPE void -TclpUnloadFile( +static void +UnloadFile( Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { - Tcl_DyldLoadHandle *dyldLoadHandle = (Tcl_DyldLoadHandle *) loadHandle; + Tcl_DyldLoadHandle *dyldLoadHandle = + (Tcl_DyldLoadHandle *) (loadHandle->clientData); #if TCL_DYLD_USE_DLFCN if (dyldLoadHandle->dlHandle) { @@ -504,6 +520,7 @@ TclpUnloadFile( #endif /* TCL_DYLD_USE_NSMODULE */ } ckfree((char*) dyldLoadHandle); + ckfree((char*) loadHandle); } /* @@ -613,6 +630,7 @@ TclpLoadMemory( * function which should be used for this * file. */ { + Tcl_LoadHandle newHandle; Tcl_DyldLoadHandle *dyldLoadHandle; NSObjectFileImage dyldObjFileImage = NULL; Tcl_DyldModuleHandle *modulePtr; @@ -757,8 +775,12 @@ TclpLoadMemory( #endif dyldLoadHandle->dyldLibHeader = NULL; dyldLoadHandle->modulePtr = modulePtr; - *loadHandle = (Tcl_LoadHandle) dyldLoadHandle; - *unloadProcPtr = &TclpUnloadFile; + newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle)); + newHandle->clientData = dyldLoadHandle; + newHandle->findSymbolProcPtr = &FindSymbol; + newHandle->unloadFileProcPtr = &UnloadFile; + *loadHandle = newHandle; + *unloadProcPtr = &UnloadFile; return TCL_OK; } #endif /* TCL_LOAD_FROM_MEMORY */ diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c index 0f82593..35aeba4 100644 --- a/unix/tclLoadNext.c +++ b/unix/tclLoadNext.c @@ -9,12 +9,19 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadNext.c,v 1.16 2010/03/11 15:02:33 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadNext.c,v 1.17 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" #include #include + +/* Static procedures defined within this file */ + +static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, + const char* symbol); +static void UnloadFile(Tcl_LoadHandle loadHandle); + /* *---------------------------------------------------------------------- @@ -47,6 +54,7 @@ TclpDlopen( * function which should be used for this * file. */ { + Tcl_LoadHandle newHandle; struct mach_header *header; char *fileName; char *files[2]; @@ -95,8 +103,12 @@ TclpDlopen( } NXCloseMemory(errorStream, NX_FREEBUFFER); - *loadHandle = (Tcl_LoadHandle)1; /* A dummy non-NULL value */ - *unloadProcPtr = &TclpUnloadFile; + newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle)); + newHandle->clientData = (ClientData) 1; + newHandle->findSymbolProcPtr = &FindSymbol; + newHandle->unloadFileProcPtr = &UnloadFile; + *loadHandle = newHandle; + *unloadProcPtr = &UnloadFile; return TCL_OK; } @@ -104,7 +116,7 @@ TclpDlopen( /* *---------------------------------------------------------------------- * - * TclpFindSymbol -- + * FindSymbol -- * * Looks up a symbol, by name, through a handle associated with a * previously loaded piece of code (shared library). @@ -117,8 +129,8 @@ TclpDlopen( *---------------------------------------------------------------------- */ -Tcl_PackageInitProc * -TclpFindSymbol( +static void* +FindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, const char *symbol) @@ -132,13 +144,19 @@ TclpFindSymbol( strcat(sym, symbol); rld_lookup(NULL, sym, (unsigned long *)&proc); } + if (proc == NULL && interp != NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "cannot find symbol \"", symbol, + "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); + } return proc; } /* *---------------------------------------------------------------------- * - * TclpUnloadFile -- + * UnloadFile -- * * Unloads a dynamically loaded binary code file from memory. Code * pointers in the formerly loaded file are no longer valid after calling @@ -154,11 +172,12 @@ TclpFindSymbol( */ void -TclpUnloadFile( +UnloadFile( Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { + ckfree((char*) loadHandle); } /* diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c index 136fad9..2810a7c 100644 --- a/unix/tclLoadOSF.c +++ b/unix/tclLoadOSF.c @@ -31,13 +31,19 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadOSF.c,v 1.16 2010/03/11 15:02:33 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadOSF.c,v 1.17 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" #include #include +/* Static functions defined within this file */ + +static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, + const char* symbol); +static void UnloadFile(Tcl_LoadHandle handle); + /* *---------------------------------------------------------------------- * @@ -69,6 +75,7 @@ TclpDlopen( * function which should be used for this * file. */ { + Tcl_LoadHandle newHandle; ldr_module_t lm; char *pkg; char *fileName = Tcl_GetString(pathPtr); @@ -119,15 +126,19 @@ TclpDlopen( } else { pkg++; } - *loadHandle = pkg; - *unloadProcPtr = &TclpUnloadFile; + newHandle = (Tcl_LoadHandle*) ckalloc(sizeof(*newHandle)); + newHandle->clientData = pkg; + newHandle->findSymbolProcPtr = &FindSymbol; + newHandle->unloadFileProcPtr = &UnloadFile; + *loadHandle = newHandle; + *unloadProcPtr = &UnloadFile; return TCL_OK; } /* *---------------------------------------------------------------------- * - * TclpFindSymbol -- + * FindSymbol -- * * Looks up a symbol, by name, through a handle associated with a * previously loaded piece of code (shared library). @@ -140,19 +151,25 @@ TclpDlopen( *---------------------------------------------------------------------- */ -Tcl_PackageInitProc * -TclpFindSymbol( +static void * +FindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, const char *symbol) { - return ldr_lookup_package((char *)loadHandle, symbol); + void* retval = ldr_lookup_package((char *)loadHandle, symbol); + if (retval == NULL && interp != NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "cannot find symbol\"", symbol, "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); + } + return retval; } /* *---------------------------------------------------------------------- * - * TclpUnloadFile -- + * UnloadFile -- * * Unloads a dynamically loaded binary code file from memory. Code * pointers in the formerly loaded file are no longer valid after calling @@ -167,12 +184,13 @@ TclpFindSymbol( *---------------------------------------------------------------------- */ -void -TclpUnloadFile( +static void +UnloadFile( Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { + ckfree((char*) loadHandle); } /* diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c index bf46cf5..a690dac 100644 --- a/unix/tclLoadShl.c +++ b/unix/tclLoadShl.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadShl.c,v 1.19 2010/03/11 15:02:33 nijtmans Exp $ + * RCS: @(#) $Id: tclLoadShl.c,v 1.20 2010/04/02 21:21:06 kennykb Exp $ */ #include @@ -25,6 +25,14 @@ #include "tclInt.h" +/* Static functions defined within this file */ + +static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, + const char* symbol); +static void +UnloadFile(Tcl_LoadHandle handle); + + /* *---------------------------------------------------------------------- * @@ -57,6 +65,7 @@ TclpDlopen( * file. */ { shl_t handle; + Tcl_LoadHandle newHandle; const char *native; char *fileName = Tcl_GetString(pathPtr); @@ -97,15 +106,18 @@ TclpDlopen( Tcl_PosixError(interp), (char *) NULL); return TCL_ERROR; } - *loadHandle = (Tcl_LoadHandle) handle; - *unloadProcPtr = &TclpUnloadFile; + newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle)); + newHandle->clientData = handle; + newHandle->findSymbolProcPtr = &FindSymbol; + newHandle->unloadFileProcPtr = *unloadProcPtr = &UnloadFile; + *loadHandle = newHandle; return TCL_OK; } /* *---------------------------------------------------------------------- * - * TclpFindSymbol -- + * Tcl_FindSymbol -- * * Looks up a symbol, by name, through a handle associated with a * previously loaded piece of code (shared library). @@ -118,15 +130,15 @@ TclpDlopen( *---------------------------------------------------------------------- */ -Tcl_PackageInitProc * -TclpFindSymbol( +static void* +FindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, const char *symbol) { Tcl_DString newName; Tcl_PackageInitProc *proc = NULL; - shl_t handle = (shl_t)loadHandle; + shl_t handle = (shl_t)(loadHandle->clientData); /* * Some versions of the HP system software still use "_" at the beginning @@ -144,13 +156,18 @@ TclpFindSymbol( } Tcl_DStringFree(&newName); } + if (proc == NULL && interp != NULL) { + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "cannot find symbol\"", symbol, + "\": ", Tcl_PosixError(interp), NULL); + } return proc; } /* *---------------------------------------------------------------------- * - * TclpUnloadFile -- + * UnloadFile -- * * Unloads a dynamically loaded binary code file from memory. Code * pointers in the formerly loaded file are no longer valid after calling @@ -165,16 +182,17 @@ TclpFindSymbol( *---------------------------------------------------------------------- */ -void -TclpUnloadFile( +static void +UnloadFile( Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { shl_t handle; - handle = (shl_t) loadHandle; + handle = (shl_t) (loadHandle -> clientData); shl_unload(handle); + ckfree((char*) loadHandle); } /* diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index 21a0153..ccb97c2 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.51 2010/01/10 22:58:41 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.52 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclInt.h" @@ -269,6 +269,40 @@ TclpTempFileName(void) } /* + *----------------------------------------------------------------------------- + * + * TclpTempFileNameForLibrary -- + * + * Constructs a file name in the native file system where a + * dynamically loaded library may be placed. + * + * Results: + * Returns the constructed file name. If an error occurs, + * returns NULL and leaves an error message in the interpreter + * result. + * + * On Unix, it works to load a shared object from a file of any + * name, so this function is merely a thin wrapper around + * TclpTempFileName(). + * + *----------------------------------------------------------------------------- + */ + +Tcl_Obj* +TclpTempFileNameForLibrary(Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Obj* path) /* Path name of the library + * in the VFS */ +{ + Tcl_Obj* retval; + retval = TclpTempFileName(); + if (retval == NULL) { + Tcl_AppendResult(interp, "couldn't create temporary file: ", + Tcl_PosixError(interp), NULL); + } + return retval; +} + +/* *---------------------------------------------------------------------- * * TclpCreatePipe -- diff --git a/win/Makefile.in b/win/Makefile.in index 5c6e085..0a5956a 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.174 2010/03/30 14:05:53 dgp Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.175 2010/04/02 21:21:06 kennykb Exp $ VERSION = @TCL_VERSION@ @@ -585,7 +585,7 @@ install-binaries: binaries else true; \ fi; \ done; - @for i in dde1.3 reg1.2; \ + @for i in dde${DDEDOTVER} reg${REGDOTVER}; \ do \ if [ ! -d $(LIB_INSTALL_DIR)/$$i ] ; then \ echo "Making directory $(LIB_INSTALL_DIR)/$$i"; \ diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index bdc62ae..606171d 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,11 +10,30 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.26 2010/03/11 15:02:33 nijtmans Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.27 2010/04/02 21:21:06 kennykb Exp $ */ #include "tclWinInt.h" +/* + * Mutex protecting static data in this file; + */ + +static Tcl_Mutex loadMutex; + +/* + * Name of the directory in the native filesystem where DLLs used in this + * process are copied prior to loading. + */ + +static WCHAR* dllDirectoryName = NULL; + +/* Static functions defined within this file */ + +void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, + const char* symbol); +void UnloadFile(Tcl_LoadHandle loadHandle); + /* *---------------------------------------------------------------------- @@ -47,8 +66,9 @@ TclpDlopen( * function which should be used for this * file. */ { - HINSTANCE handle; + HINSTANCE hInstance; const TCHAR *nativeName; + Tcl_LoadHandle handlePtr; /* * First try the full path the user gave us. This is particularly @@ -57,8 +77,8 @@ TclpDlopen( */ nativeName = Tcl_FSGetNativePath(pathPtr); - handle = tclWinProcs->loadLibraryProc(nativeName); - if (handle == NULL) { + hInstance = tclWinProcs->loadLibraryProc(nativeName); + if (hInstance == NULL) { /* * Let the OS loader examine the binary search path for whatever * string the user gave us which hopefully refers to a file on the @@ -69,13 +89,11 @@ TclpDlopen( const char *fileName = Tcl_GetString(pathPtr); nativeName = tclWinProcs->utf2tchar(fileName, -1, &ds); - handle = tclWinProcs->loadLibraryProc(nativeName); + hInstance = tclWinProcs->loadLibraryProc(nativeName); Tcl_DStringFree(&ds); } - *loadHandle = (Tcl_LoadHandle) handle; - - if (handle == NULL) { + if (hInstance == NULL) { DWORD lastError = GetLastError(); #if 0 @@ -130,7 +148,13 @@ TclpDlopen( } return TCL_ERROR; } else { - *unloadProcPtr = &TclpUnloadFile; + handlePtr = + (Tcl_LoadHandle) ckalloc(sizeof(struct Tcl_LoadHandle_)); + handlePtr->clientData = (ClientData) hInstance; + handlePtr->findSymbolProcPtr = &FindSymbol; + handlePtr->unloadFileProcPtr = &UnloadFile; + *loadHandle = (Tcl_LoadHandle) handlePtr; + *unloadProcPtr = &UnloadFile; } return TCL_OK; } @@ -138,7 +162,7 @@ TclpDlopen( /* *---------------------------------------------------------------------- * - * TclpFindSymbol -- + * FindSymbol -- * * Looks up a symbol, by name, through a handle associated with a * previously loaded piece of code (shared library). @@ -151,37 +175,41 @@ TclpDlopen( *---------------------------------------------------------------------- */ -Tcl_PackageInitProc * -TclpFindSymbol( +void * +FindSymbol( Tcl_Interp *interp, Tcl_LoadHandle loadHandle, const char *symbol) { Tcl_PackageInitProc *proc = NULL; - HINSTANCE handle = (HINSTANCE)loadHandle; + HINSTANCE hInstance = (HINSTANCE)(loadHandle->clientData); /* * For each symbol, check for both Symbol and _Symbol, since Borland * generates C symbols with a leading '_' by default. */ - proc = (Tcl_PackageInitProc *) GetProcAddress(handle, symbol); + proc = (void*) GetProcAddress(hInstance, symbol); if (proc == NULL) { Tcl_DString ds; - + const char* sym2; Tcl_DStringInit(&ds); Tcl_DStringAppend(&ds, "_", 1); - symbol = Tcl_DStringAppend(&ds, symbol, -1); - proc = (Tcl_PackageInitProc *) GetProcAddress(handle, symbol); + sym2 = Tcl_DStringAppend(&ds, symbol, -1); + proc = (Tcl_PackageInitProc *) GetProcAddress(hInstance, sym2); Tcl_DStringFree(&ds); } + if (proc == NULL && interp != NULL) { + Tcl_AppendResult(interp, "cannot find symbol \"", symbol, "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); + } return proc; } /* *---------------------------------------------------------------------- * - * TclpUnloadFile -- + * UnloadFile -- * * Unloads a dynamically loaded binary code file from memory. Code * pointers in the formerly loaded file are no longer valid after calling @@ -197,15 +225,14 @@ TclpFindSymbol( */ void -TclpUnloadFile( +UnloadFile( Tcl_LoadHandle loadHandle) /* loadHandle returned by a previous call to * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { - HINSTANCE handle; - - handle = (HINSTANCE) loadHandle; - FreeLibrary(handle); + HINSTANCE hInstance = (HINSTANCE) loadHandle->clientData; + FreeLibrary(hInstance); + ckfree((char*) loadHandle); } /* @@ -239,6 +266,101 @@ TclGuessPackageName( } /* + *----------------------------------------------------------------------------- + * + * TclpTempFileNameForLibrary -- + * + * Constructs a temporary file name for loading a shared object (DLL). + * + * Results: + * Returns the constructed file name. + * + * On Windows, a DLL is identified by the final component of its path name. + * Cross linking among DLL's (and hence, preloading) will not work unless + * this name is preserved when copying a DLL from a VFS to a temp file for + * preloading. For this reason, all DLLs in a given process are copied + * to a temp directory, and their names are preserved. + * + *----------------------------------------------------------------------------- + */ + +Tcl_Obj* +TclpTempFileNameForLibrary(Tcl_Interp* interp, /* Tcl interpreter */ + Tcl_Obj* path) /* Path name of the DLL in + * the VFS */ +{ + size_t nameLen; /* Length of the temp folder name */ + WCHAR name[MAX_PATH]; /* Path name of the temp folder */ + BOOL status; /* Status from Win32 API calls */ + Tcl_Obj* fileName; /* Name of the temp file */ + Tcl_Obj* tail; /* Tail of the source path */ + + /* + * Determine the name of the directory to use, and create it. + * (Keep trying with new names until an attempt to create the directory + * succeeds) + */ + + nameLen = 0; + if (dllDirectoryName == NULL) { + Tcl_MutexLock(&loadMutex); + if (dllDirectoryName == NULL) { + if ((nameLen = GetTempPathW(MAX_PATH, name)) >= 0) { + if (nameLen >= MAX_PATH-12) { + Tcl_SetErrno(ENAMETOOLONG); + nameLen = 0; + } else { + wcscpy(name+nameLen, L"TCLXXXXXXXX"); + nameLen += 11; + } + } + status = 1; + if (nameLen != 0) { + DWORD id; + int i = 0; + id = GetCurrentProcessId(); + for (;;) { + DWORD lastError; + wsprintfW(name+nameLen-8, L"%08x", id); + status = CreateDirectoryW(name, NULL); + if (status) { + break; + } + if ((lastError = GetLastError()) != ERROR_ALREADY_EXISTS) { + TclWinConvertError(lastError); + break; + } else if (++i > 256) { + TclWinConvertError(lastError); + break; + } + id *= 16777619; + } + } + if (status != 0) { + dllDirectoryName = (WCHAR*) + ckalloc((nameLen+1) * sizeof(WCHAR)); + wcscpy(dllDirectoryName, name); + } + } + Tcl_MutexUnlock(&loadMutex); + } + if (dllDirectoryName == NULL) { + Tcl_AppendResult(interp, "couldn't create temporary directory: ", + Tcl_PosixError(interp), NULL); + } + fileName = TclpNativeToNormalized((ClientData) dllDirectoryName); + tail = TclPathPart(interp, path, TCL_PATH_TAIL); + if (tail == NULL) { + Tcl_DecrRefCount(fileName); + return NULL; + } else { + Tcl_AppendToObj(fileName, "/", 1); + Tcl_AppendObjToObj(fileName, tail); + return fileName; + } +} + +/* * Local Variables: * mode: c * c-basic-offset: 4 -- cgit v0.12 From cc240f86c997bfabb858ee9cac79fe0eee309355 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 2 Apr 2010 22:52:26 +0000 Subject: * generic/tclIOUtil.c (Tcl_LoadFile): Corrections to previous commit * unix/tclLoadDyld.c (TclpDlopen): to make it build on OSX. Also add missing ChangeLog entry for previous commit by KBK. --- ChangeLog | 38 ++++++++++++++++++++++++++++++++------ generic/tclIOUtil.c | 3 +-- unix/tclLoadDyld.c | 45 +++++++++++++++++++++++---------------------- 3 files changed, 56 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfeb154..75aadb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,39 @@ +2010-04-02 Donal K. Fellows + + * generic/tclIOUtil.c (Tcl_LoadFile): Corrections to previous commit + * unix/tclLoadDyld.c (TclpDlopen): to make it build on OSX. + 2010-04-02 Kevin B. Kenny - * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallest - floating point number until it is actually used. (This change avoids - a bogus syslog message regarding a 'floating point software assist + TIP #357 IMPLEMENTATION + + * generic/tcl.decls: First round of changes to export + * generic/tclDecls.h: Tcl_LoadFile, Tcl_FindSymbol, and + * generic/tclIOUtil.c: Tcl_FSUnloadFile to the public API. + * generic/tclInt.h: + * generic/tclLoad.c: + * generic/tclLoadNone.c: + * generic/tclStubInit.c: + * tests/fileSystem.test: + * tests/load.test: + * tests/unload.test: + * unix/tclLoadDl.c: + * unix/tclLoadDyld.c: + * unix/tclLoadNext.c: + * unix/tclLoadOSF.c: + * unix/tclLoadShl.c: + * unix/tclUnixPipe.c: + * win/Makefile.in: + * win/tclWinLoad.c: + + * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallest + floating point number until it is actually used. (This change avoids a + bogus syslog message regarding a 'floating point software assist fault' on SGI systems.) - * library/reg/pkgIndex.tcl: [TIP #362]: Fixed first round of - * tests/registry.test: bugs resulting from the recent commits - * win/tclWinReg.c: of changes in support of the referenced + * library/reg/pkgIndex.tcl: [TIP #362]: Fixed first round of bugs + * tests/registry.test: resulting from the recent commits of + * win/tclWinReg.c: changes in support of the referenced TIP. 2010-03-31 Donal K. Fellows diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index c1e9430..f4dac35 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.171 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.172 2010/04/02 22:52:26 dkf Exp $ */ #include "tclInt.h" @@ -3126,7 +3126,6 @@ Tcl_LoadFile( ret = TclpLoadMemory(interp, buffer, size, ret, handlePtr, &unloadProcPtr); if (ret == TCL_OK && *handlePtr != NULL) { - *clientDataPtr = *handlePtr; goto resolveSymbols; } } diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 2f833cd..bfdcc00 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.35 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.36 2010/04/02 22:52:26 dkf Exp $ */ #include "tclInt.h" @@ -86,21 +86,23 @@ MODULE_SCOPE long tclMacOSXDarwinRelease; #endif #ifdef TCL_DEBUG_LOAD -#define TclLoadDbgMsg(m, ...) do { \ - fprintf(stderr, "%s:%d: %s(): " m ".\n", \ - strrchr(__FILE__, '/')+1, __LINE__, __func__, ##__VA_ARGS__); \ - } while (0) +#define TclLoadDbgMsg(m, ...) \ + do { \ + fprintf(stderr, "%s:%d: %s(): " m ".\n", \ + strrchr(__FILE__, '/')+1, __LINE__, __func__, \ + ##__VA_ARGS__); \ + } while (0) #else #define TclLoadDbgMsg(m, ...) #endif - -/* Static functions defined in this file */ - -static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, - const char* symbol); -static void UnloadFile(Tcl_LoadHandle handle); +/* + * Static functions defined in this file. + */ +static void * FindSymbol(Tcl_Interp *interp, + Tcl_LoadHandle loadHandle, const char *symbol); +static void UnloadFile(Tcl_LoadHandle handle); #if TCL_DYLD_USE_NSMODULE || defined(TCL_LOAD_FROM_MEMORY) /* @@ -120,7 +122,7 @@ static void UnloadFile(Tcl_LoadHandle handle); *---------------------------------------------------------------------- */ -static const char* +static const char * DyldOFIErrorMsg( int err) { @@ -175,7 +177,7 @@ TclpDlopen( * file. */ { Tcl_DyldLoadHandle *dyldLoadHandle; - Tcl_LoadHandle* newHandle; + Tcl_LoadHandle newHandle; #if TCL_DYLD_USE_DLFCN void *dlHandle = NULL; #endif @@ -319,7 +321,7 @@ TclpDlopen( newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle)); newHandle->clientData = dyldLoadHandle; newHandle->findSymbolProcPtr = &FindSymbol; - newHandle->unloadProcPtr = &UnloadFile; + newHandle->unloadFileProcPtr = &UnloadFile; *unloadProcPtr = &UnloadFile; *loadHandle = newHandle; result = TCL_OK; @@ -355,14 +357,13 @@ TclpDlopen( *---------------------------------------------------------------------- */ -static void* +static void * FindSymbol( Tcl_Interp *interp, /* For error reporting. */ Tcl_LoadHandle loadHandle, /* Handle from TclpDlopen. */ const char *symbol) /* Symbol name to look up. */ { - Tcl_DyldLoadHandle *dyldLoadHandle = - (Tcl_DyldLoadHandle *) (loadHandle->clientData); + Tcl_DyldLoadHandle *dyldLoadHandle = loadHandle->clientData; Tcl_PackageInitProc *proc = NULL; const char *errMsg = NULL; Tcl_DString ds; @@ -452,7 +453,8 @@ FindSymbol( Tcl_DStringFree(&ds); if (errMsg && (interp != NULL)) { Tcl_AppendResult(interp, errMsg, NULL); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, + NULL); } return proc; } @@ -483,8 +485,7 @@ UnloadFile( * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { - Tcl_DyldLoadHandle *dyldLoadHandle = - (Tcl_DyldLoadHandle *) (loadHandle->clientData); + Tcl_DyldLoadHandle *dyldLoadHandle = loadHandle->clientData; #if TCL_DYLD_USE_DLFCN if (dyldLoadHandle->dlHandle) { @@ -519,8 +520,8 @@ UnloadFile( } #endif /* TCL_DYLD_USE_NSMODULE */ } - ckfree((char*) dyldLoadHandle); - ckfree((char*) loadHandle); + ckfree((char *) dyldLoadHandle); + ckfree((char *) loadHandle); } /* -- cgit v0.12 From 7b740a30c4476bd267eae2adfa261599303a9651 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 2 Apr 2010 23:11:55 +0000 Subject: Add missing "const" in signature, and some formatting fixes --- ChangeLog | 6 ++++++ generic/tcl.decls | 12 ++++++------ generic/tclDecls.h | 18 +++++++++--------- generic/tclIOUtil.c | 4 ++-- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75aadb4..222b1a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-02 Jan Nijtmans + + * generic/tcl.decls (Tcl_LoadFile): Add missing "const" in signature, + * generic/tclIOUtil.c (Tcl_LoadFile): and some formatting fixes + * generic/tclDecls.h (regenerated) + 2010-04-02 Donal K. Fellows * generic/tclIOUtil.c (Tcl_LoadFile): Corrections to previous commit diff --git a/generic/tcl.decls b/generic/tcl.decls index 0e59216..b090747 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.173 2010/04/02 21:21:04 kennykb Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.174 2010/04/02 23:11:55 nijtmans Exp $ library tcl @@ -2308,15 +2308,15 @@ declare 626 generic { # TIP #357 (Export TclLoadFile and TclpFindSymbol) kbk declare 627 generic { int Tcl_LoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, - const char *symv[], int flags, void* procPtrs, - Tcl_LoadHandle* handlePtr) + const char *const symv[], int flags, void *procPtrs, + Tcl_LoadHandle *handlePtr) } declare 628 generic { - void* Tcl_FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle handle, - const char* symbol) + void* Tcl_FindSymbol(Tcl_Interp *interp, Tcl_LoadHandle handle, + const char *symbol) } declare 629 generic { - int Tcl_FSUnloadFile(Tcl_Interp* interp, Tcl_LoadHandle handlePtr) + int Tcl_FSUnloadFile(Tcl_Interp *interp, Tcl_LoadHandle handlePtr) } # ----- BASELINE -- FOR -- 8.6.0 ----- # diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 8c2db65..39f53fc 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.175 2010/04/02 21:21:05 kennykb Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.176 2010/04/02 23:11:55 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -3688,19 +3688,19 @@ EXTERN int Tcl_NRSubstObj(Tcl_Interp *interp, Tcl_Obj *objPtr, #define Tcl_LoadFile_TCL_DECLARED /* 627 */ EXTERN int Tcl_LoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, - const char *symv[], int flags, void*procPtrs, - Tcl_LoadHandle*handlePtr); + const char *const symv[], int flags, + void *procPtrs, Tcl_LoadHandle *handlePtr); #endif #ifndef Tcl_FindSymbol_TCL_DECLARED #define Tcl_FindSymbol_TCL_DECLARED /* 628 */ -EXTERN void* Tcl_FindSymbol(Tcl_Interp*interp, - Tcl_LoadHandle handle, const char*symbol); +EXTERN void* Tcl_FindSymbol(Tcl_Interp *interp, + Tcl_LoadHandle handle, const char *symbol); #endif #ifndef Tcl_FSUnloadFile_TCL_DECLARED #define Tcl_FSUnloadFile_TCL_DECLARED /* 629 */ -EXTERN int Tcl_FSUnloadFile(Tcl_Interp*interp, +EXTERN int Tcl_FSUnloadFile(Tcl_Interp *interp, Tcl_LoadHandle handlePtr); #endif @@ -4365,9 +4365,9 @@ typedef struct TclStubs { int (*tcl_CloseEx) (Tcl_Interp *interp, Tcl_Channel chan, int flags); /* 624 */ int (*tcl_NRExprObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *resultPtr); /* 625 */ int (*tcl_NRSubstObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 626 */ - int (*tcl_LoadFile) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *symv[], int flags, void*procPtrs, Tcl_LoadHandle*handlePtr); /* 627 */ - void* (*tcl_FindSymbol) (Tcl_Interp*interp, Tcl_LoadHandle handle, const char*symbol); /* 628 */ - int (*tcl_FSUnloadFile) (Tcl_Interp*interp, Tcl_LoadHandle handlePtr); /* 629 */ + int (*tcl_LoadFile) (Tcl_Interp *interp, Tcl_Obj *pathPtr, const char *const symv[], int flags, void *procPtrs, Tcl_LoadHandle *handlePtr); /* 627 */ + void* (*tcl_FindSymbol) (Tcl_Interp *interp, Tcl_LoadHandle handle, const char *symbol); /* 628 */ + int (*tcl_FSUnloadFile) (Tcl_Interp *interp, Tcl_LoadHandle handlePtr); /* 629 */ } TclStubs; #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index f4dac35..ff7af5a 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.172 2010/04/02 22:52:26 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.173 2010/04/02 23:11:55 nijtmans Exp $ */ #include "tclInt.h" @@ -3031,7 +3031,7 @@ Tcl_LoadFile( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Obj *pathPtr, /* Name of the file containing the desired * code. */ - const char *symbols[], /* Names of functions to look up in the file's + const char *const symbols[], /* Names of functions to look up in the file's * symbol table. */ int flags, /* Flags (unused) */ void *procVPtrs, /* Where to return the addresses corresponding -- cgit v0.12 From e153b47292aeb4f64d8272684422c487e06d125d Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 4 Apr 2010 11:59:22 +0000 Subject: * macosx/tclMacOSXBundle.c (OpenResourceMap): [Bug 2981528]: Only define this function when HAVE_COREFOUNDATION is defined. --- ChangeLog | 7 ++++++- macosx/tclMacOSXBundle.c | 15 +++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 222b1a7..541cd3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ +2010-04-04 Donal K. Fellows + + * macosx/tclMacOSXBundle.c (OpenResourceMap): [Bug 2981528]: Only + define this function when HAVE_COREFOUNDATION is defined. + 2010-04-02 Jan Nijtmans * generic/tcl.decls (Tcl_LoadFile): Add missing "const" in signature, * generic/tclIOUtil.c (Tcl_LoadFile): and some formatting fixes - * generic/tclDecls.h (regenerated) + * generic/tclDecls.h: (regenerated) 2010-04-02 Donal K. Fellows diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c index 1748ee3..d7153fa 100644 --- a/macosx/tclMacOSXBundle.c +++ b/macosx/tclMacOSXBundle.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.17 2010/03/25 14:02:11 dkf Exp $ + * RCS: @(#) $Id: tclMacOSXBundle.c,v 1.18 2010/04/04 11:59:23 dkf Exp $ */ #include "tclPort.h" @@ -72,13 +72,13 @@ MODULE_SCOPE long tclMacOSXDarwinRelease; #define TclLoadDbgMsg(m, ...) #endif /* TCL_DEBUG_LOAD */ -#endif /* HAVE_COREFOUNDATION */ - /* * Forward declaration of functions defined in this file: */ static short OpenResourceMap(CFBundleRef bundleRef); + +#endif /* HAVE_COREFOUNDATION */ /* *---------------------------------------------------------------------- @@ -93,6 +93,8 @@ static short OpenResourceMap(CFBundleRef bundleRef); *---------------------------------------------------------------------- */ +#ifdef HAVE_COREFOUNDATION + static short OpenResourceMap( CFBundleRef bundleRef) @@ -139,6 +141,8 @@ OpenResourceMap( } return -1; } + +#endif /* HAVE_COREFOUNDATION */ /* *---------------------------------------------------------------------- @@ -282,7 +286,10 @@ Tcl_MacOSXOpenVersionedBundleResources( } if (versionedBundleRef) { #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 - /* Workaround CFBundle bug in Tiger and earlier. [Bug 2569449] */ + /* + * Workaround CFBundle bug in Tiger and earlier. [Bug 2569449] + */ + if (tclMacOSXDarwinRelease >= 9) #endif { -- cgit v0.12 From 89b9cfbb6ef818bf151a6edeb87edb4c2d2d9a50 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 4 Apr 2010 15:03:07 +0000 Subject: Added a first crack at documentation for TIP #357's Tcl_LoadFile et al. --- ChangeLog | 2 ++ doc/FileSystem.3 | 32 +++++++++++++++++++------ doc/Load.3 | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 doc/Load.3 diff --git a/ChangeLog b/ChangeLog index 541cd3d..7bbd361 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-04-04 Donal K. Fellows + * doc/FileSystem.3, doc/Load.3: Documentation for TIP#357. + * macosx/tclMacOSXBundle.c (OpenResourceMap): [Bug 2981528]: Only define this function when HAVE_COREFOUNDATION is defined. diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index caab40f..bc52214 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -1,17 +1,17 @@ '\" '\" Copyright (c) 2001 Vincent Darley -'\" Copyright (c) 2008 Donal K. Fellows +'\" Copyright (c) 2008-2010 Donal K. Fellows '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.70 2010/01/14 11:47:07 dkf Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.71 2010/04/04 15:03:07 dkf Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_FSRegister, Tcl_FSUnregister, Tcl_FSData, Tcl_FSMountsChanged, Tcl_FSGetFileSystemForPath, Tcl_FSGetPathType, Tcl_FSCopyFile, Tcl_FSCopyDirectory, Tcl_FSCreateDirectory, Tcl_FSDeleteFile, Tcl_FSRemoveDirectory, Tcl_FSRenameFile, Tcl_FSListVolumes, Tcl_FSEvalFile, Tcl_FSEvalFileEx, Tcl_FSLoadFile, Tcl_FSMatchInDirectory, Tcl_FSLink, Tcl_FSLstat, Tcl_FSUtime, Tcl_FSFileAttrsGet, Tcl_FSFileAttrsSet, Tcl_FSFileAttrStrings, Tcl_FSStat, Tcl_FSAccess, Tcl_FSOpenFileChannel, Tcl_FSGetCwd, Tcl_FSChdir, Tcl_FSPathSeparator, Tcl_FSJoinPath, Tcl_FSSplitPath, Tcl_FSEqualPaths, Tcl_FSGetNormalizedPath, Tcl_FSJoinToPath, Tcl_FSConvertToPathType, Tcl_FSGetInternalRep, Tcl_FSGetTranslatedPath, Tcl_FSGetTranslatedStringPath, Tcl_FSNewNativePath, Tcl_FSGetNativePath, Tcl_FSFileSystemInfo, Tcl_GetAccessTimeFromStat, Tcl_GetBlockSizeFromStat, Tcl_GetBlocksFromStat, Tcl_GetChangeTimeFromStat, Tcl_GetDeviceTypeFromStat, Tcl_GetFSDeviceFromStat, Tcl_GetFSInodeFromStat, Tcl_GetGroupIdFromStat, Tcl_GetLinkCountFromStat, Tcl_GetModeFromStat, Tcl_GetModificationTimeFromStat, Tcl_GetSizeFromStat, Tcl_GetUserIdFromStat, Tcl_AllocStatBuf \- procedures to interact with any filesystem +Tcl_FSRegister, Tcl_FSUnregister, Tcl_FSData, Tcl_FSMountsChanged, Tcl_FSGetFileSystemForPath, Tcl_FSGetPathType, Tcl_FSCopyFile, Tcl_FSCopyDirectory, Tcl_FSCreateDirectory, Tcl_FSDeleteFile, Tcl_FSRemoveDirectory, Tcl_FSRenameFile, Tcl_FSListVolumes, Tcl_FSEvalFile, Tcl_FSEvalFileEx, Tcl_FSLoadFile, Tcl_FSUnloadFile, Tcl_FSMatchInDirectory, Tcl_FSLink, Tcl_FSLstat, Tcl_FSUtime, Tcl_FSFileAttrsGet, Tcl_FSFileAttrsSet, Tcl_FSFileAttrStrings, Tcl_FSStat, Tcl_FSAccess, Tcl_FSOpenFileChannel, Tcl_FSGetCwd, Tcl_FSChdir, Tcl_FSPathSeparator, Tcl_FSJoinPath, Tcl_FSSplitPath, Tcl_FSEqualPaths, Tcl_FSGetNormalizedPath, Tcl_FSJoinToPath, Tcl_FSConvertToPathType, Tcl_FSGetInternalRep, Tcl_FSGetTranslatedPath, Tcl_FSGetTranslatedStringPath, Tcl_FSNewNativePath, Tcl_FSGetNativePath, Tcl_FSFileSystemInfo, Tcl_GetAccessTimeFromStat, Tcl_GetBlockSizeFromStat, Tcl_GetBlocksFromStat, Tcl_GetChangeTimeFromStat, Tcl_GetDeviceTypeFromStat, Tcl_GetFSDeviceFromStat, Tcl_GetFSInodeFromStat, Tcl_GetGroupIdFromStat, Tcl_GetLinkCountFromStat, Tcl_GetModeFromStat, Tcl_GetModificationTimeFromStat, Tcl_GetSizeFromStat, Tcl_GetUserIdFromStat, Tcl_AllocStatBuf \- procedures to interact with any filesystem .SH SYNOPSIS .nf \fB#include \fR @@ -63,7 +63,12 @@ int .sp int \fBTcl_FSLoadFile\fR(\fIinterp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr, - handlePtr, unloadProcPtr\fR) + loadHandlePtr, unloadProcPtr\fR) +.sp +.VS 8.6 +int +\fBTcl_FSUnloadFile\fR(\fIinterp, loadHandle\fR) +.VE 8.6 .sp int \fBTcl_FSMatchInDirectory\fR(\fIinterp, resultPtr, pathPtr, pattern, types\fR) @@ -249,10 +254,12 @@ Filled with the safe-init function for this code. .AP ClientData *clientDataPtr out Filled with the clientData value to pass to this code's unload function when it is called. -.AP Tcl_LoadHandle *handlePtr out +.AP Tcl_LoadHandle *loadHandlePtr out Filled with an abstract token representing the loaded file. .AP Tcl_FSUnloadFileProc **unloadProcPtr out Filled with the function to use to unload this piece of code. +.AP Tcl_LoadHandle loadHandle in +Handle to the loaded library to be unloaded. .AP utimbuf *tval in The access and modification times in this structure are read and used to set those values for a given file. @@ -439,9 +446,20 @@ belongs will be called. If that filesystem does not implement this function (most virtual filesystems will not, because of OS limitations in dynamically loading binary code), Tcl will attempt to copy the file to a temporary directory and load that temporary file. +.VS 8.6 +\fBTcl_FSUnloadFile\fR reverses the operation, asking for the library +indicated by the \fIloadHandle\fR to be removed from the process. Note that, +unlike with the \fBunload\fR command, this does not give the library any +opportunity to clean up. +.VE 8.6 .PP -Returns a standard Tcl completion code. If an error occurs, an error -message is left in the \fIinterp\fR's result. +Both the above functions return a standard Tcl completion code. If an error +occurs, an error message is left in the \fIinterp\fR's result. +.PP +.VS 8.6 +The token provided via the variable indicated by \fIloadHandlePtr\fR may be +used with \fBTcl_FindSymbol\fR. +.VE 8.6 .PP \fBTcl_FSMatchInDirectory\fR is used by the globbing code to search a directory for all files which match a given pattern. The appropriate diff --git a/doc/Load.3 b/doc/Load.3 new file mode 100644 index 0000000..a8e8910 --- /dev/null +++ b/doc/Load.3 @@ -0,0 +1,71 @@ +'\" +'\" Copyright (c) 2009-2010 Kevin B. Kenny +'\" Copyright (c) 2010 Donal K. Fellows +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +'\" RCS: @(#) $Id: Load.3,v 1.1 2010/04/04 15:03:07 dkf Exp $ +'\" +.so man.macros +.TH Load 3 8.6 Tcl "Tcl Library Procedures" +.BS +.SH NAME +Tcl_LoadFile, Tcl_FindSymbol \- platform-independent dynamic library loading +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +int +Tcl_LoadFile(interp, pathPtr, symbols, flags, procPtrs, loadHandlePtr) +.sp +void * +Tcl_FindSymbol(interp, loadHandle, symbol) +.SH ARGUMENTS +.AS Tcl_LoadHandle *loadHandlePtr out +.AP Tcl_Interp *interp in +Interpreter to use for reporting error messages. +.AP Tcl_Obj *pathPtr in +The name of the file to load. If it is a single name, the library search path +of the current environment will be used to resolve it. +.AP "const char" *symbols[] in +Array of names of symbols to be resolved during the load of the library, or +NULL if no symbols are to be resolved. If an array is given, the last entry in +the array must be NULL. +.AP int flags in +Reserved for future expansion. Must be 0. +.AP void *procPtrs out +Points to an array that will hold the addresses of the functions described in +the \fIsymbols\fR argument. Should be NULL if no symbols are to be resolved. +.AP Tcl_LoadHandle *loadHandlePtr out +Points to a variable that will hold the handle to the abstract token +describing the library that has been loaded. +.AP Tcl_LoadHandle loadHandle +Abstract token describing the library to look up a symbol in. +.AP "const char" *symbol in +The name of the symbol to look up. +.BE +.SH DESCRIPTION +.PP +\fBTcl_LoadFile\fR loads a file from the filesystem (including potentially any +virtual filesystem that has been installed) and provides a handle to it that +may be used in further operations. The \fIsymbols\fR array, if non-NULL, +supplies a set of names of symbols (typically functions) that must be resolved +from the library and which will be stored in the array indicated by +\fIprocPtrs\fR. If any of the symbols is not resolved, the loading of the file +will fail with an error message left in the interpreter (if that is non-NULL). +The result of \fBTcl_LoadFile\fR is a standard Tcl error code. The library may +be unloaded with \fBTcl_FSUnloadFile\fR. +.PP +\fBTcl_FindSymbol\fR locates a symbol in a loaded library and returns it. If +the symbol cannot be found, it returns NULL and sets an error message in the +given \fIinterp\fR (if that is non-NULL). Note that it is unsafe to use this +operation on a handle that has been passed to \fBTcl_FSUnloadFile\fR. +.SH "SEE ALSO" +Tcl_FSLoad(3), Tcl_FSUnload(3), load(n), unload(n) +.SH KEYWORDS +binary code, loading, shared library +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: -- cgit v0.12 From c6d34ccc4d42388a8d6b75ea241569fa500aa0fe Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 4 Apr 2010 15:11:51 +0000 Subject: Minor changes to enforce Engineering Manual style rules. --- ChangeLog | 3 ++ generic/tclIOUtil.c | 139 ++++++++++++++++++++++++++++------------------------ 2 files changed, 77 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7bbd361..3a95f2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-04-04 Donal K. Fellows + * generic/tclIOUtil.c: Minor changes to enforce Engineering Manual + style rules. + * doc/FileSystem.3, doc/Load.3: Documentation for TIP#357. * macosx/tclMacOSXBundle.c (OpenResourceMap): [Bug 2981528]: Only diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index ff7af5a..6723f27 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.173 2010/04/02 23:11:55 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.174 2010/04/04 15:11:51 dkf Exp $ */ #include "tclInt.h" @@ -42,9 +42,8 @@ static void FsUpdateCwd(Tcl_Obj *cwdObj, ClientData clientData); #ifdef TCL_THREADS static void FsRecacheFilesystemList(void); #endif -static void* DivertFindSymbol(Tcl_Interp* interp, - Tcl_LoadHandle loadHandle, - const char* symbol); +static void * DivertFindSymbol(Tcl_Interp *interp, + Tcl_LoadHandle loadHandle, const char *symbol); static void DivertUnloadFile(Tcl_LoadHandle loadHandle); /* @@ -2989,8 +2988,8 @@ Tcl_FSLoadFile( res = Tcl_LoadFile(interp, pathPtr, symbols, 0, procPtrs, handlePtr); if (res == TCL_OK) { - *proc1Ptr = (Tcl_PackageInitProc*) procPtrs[0]; - *proc2Ptr = (Tcl_PackageInitProc*) procPtrs[1]; + *proc1Ptr = (Tcl_PackageInitProc *) procPtrs[0]; + *proc2Ptr = (Tcl_PackageInitProc *) procPtrs[1]; } else { *proc1Ptr = *proc2Ptr = NULL; } @@ -3031,7 +3030,7 @@ Tcl_LoadFile( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Obj *pathPtr, /* Name of the file containing the desired * code. */ - const char *const symbols[], /* Names of functions to look up in the file's + const char *const symbols[],/* Names of functions to look up in the file's * symbol table. */ int flags, /* Flags (unused) */ void *procVPtrs, /* Where to return the addresses corresponding @@ -3040,10 +3039,10 @@ Tcl_LoadFile( * information which can be used in * TclpFindSymbol. */ { - void** procPtrs = (void**) procVPtrs; + void **procPtrs = (void **) procVPtrs; const Tcl_Filesystem *fsPtr = Tcl_FSGetFileSystemForPath(pathPtr); const Tcl_Filesystem *copyFsPtr; - Tcl_FSUnloadFileProc* unloadProcPtr; + Tcl_FSUnloadFileProc *unloadProcPtr; Tcl_Obj *copyToPtr; Tcl_LoadHandle newLoadHandle = NULL; Tcl_LoadHandle divertedLoadHandle = NULL; @@ -3152,7 +3151,8 @@ Tcl_LoadFile( Tcl_FSDeleteFile(copyToPtr); Tcl_DecrRefCount(copyToPtr); - Tcl_AppendResult(interp, "couldn't load from current filesystem",NULL); + Tcl_AppendResult(interp, "couldn't load from current filesystem", + NULL); return TCL_ERROR; } @@ -3166,7 +3166,7 @@ Tcl_LoadFile( return TCL_ERROR; } -#if !defined(__WIN32__) +#ifndef __WIN32__ /* * Do we need to set appropriate permissions on the file? This may be * required on some systems. On Unix we could loop over the file @@ -3195,7 +3195,7 @@ Tcl_LoadFile( Tcl_ResetResult(interp); retVal = Tcl_LoadFile(interp, copyToPtr, symbols, 0, procPtrs, - &newLoadHandle); + &newLoadHandle); if (retVal != TCL_OK) { /* * The file didn't load successfully. @@ -3279,7 +3279,7 @@ Tcl_LoadFile( divertedLoadHandle = (Tcl_LoadHandle) - ckalloc(sizeof (struct Tcl_LoadHandle_)); + ckalloc(sizeof (struct Tcl_LoadHandle_)); divertedLoadHandle->clientData = (ClientData) tvdlPtr; divertedLoadHandle->findSymbolProcPtr = DivertFindSymbol; divertedLoadHandle->unloadFileProcPtr = DivertUnloadFile; @@ -3293,16 +3293,18 @@ Tcl_LoadFile( * At this point, *handlePtr is already set up to the handle for the * loaded library. We now try to resolve the symbols. */ + if (symbols != NULL) { for (i=0 ; symbols[i] != NULL; i++) { procPtrs[i] = Tcl_FindSymbol(interp, *handlePtr, symbols[i]); if (procPtrs[i] == NULL) { /* - * At least one symbol in the list was not found. - * Unload the file, and report the problem back to the - * caller. (Tcl_FindSymbol should already have left an - * appropriate error message.) - */ + * At least one symbol in the list was not found. Unload the + * file, and report the problem back to the caller. + * (Tcl_FindSymbol should already have left an appropriate + * error message.) + */ + (*handlePtr)->unloadFileProcPtr(*handlePtr); *handlePtr = NULL; return TCL_ERROR; @@ -3313,44 +3315,47 @@ Tcl_LoadFile( } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * DivertFindSymbol -- * * Find a symbol in a shared library loaded by copy-from-VFS. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ -static void* -DivertFindSymbol(Tcl_Interp* interp, /* Tcl interpreter */ - Tcl_LoadHandle loadHandle, /* Handle to the diverted module */ - const char* symbol) /* Symbol to resolve */ +static void * +DivertFindSymbol( + Tcl_Interp *interp, /* Tcl interpreter */ + Tcl_LoadHandle loadHandle, /* Handle to the diverted module */ + const char *symbol) /* Symbol to resolve */ { - FsDivertLoad* tvdlPtr = (FsDivertLoad*) (loadHandle->clientData); + FsDivertLoad *tvdlPtr = (FsDivertLoad *) loadHandle->clientData; Tcl_LoadHandle originalHandle = tvdlPtr->loadHandle; + return originalHandle->findSymbolProcPtr(interp, originalHandle, symbol); } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * DivertUnloadFile -- * - * Unloads a file that has been loaded by copying from VFS to the - * native filesystem. + * Unloads a file that has been loaded by copying from VFS to the native + * filesystem. * * Parameters: * loadHandle -- Handle of the file to unload * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ static void -DivertUnloadFile(Tcl_LoadHandle loadHandle) +DivertUnloadFile( + Tcl_LoadHandle loadHandle) { - FsDivertLoad* tvdlPtr = (FsDivertLoad*) (loadHandle->clientData); - Tcl_LoadHandle originalHandle = tvdlPtr->loadHandle; + FsDivertLoad *tvdlPtr = (FsDivertLoad *) loadHandle->clientData; + Tcl_LoadHandle originalHandle; /* * This test should never trigger, since we give the client data in the @@ -3360,6 +3365,7 @@ DivertUnloadFile(Tcl_LoadHandle loadHandle) if (tvdlPtr == NULL) { return; } + originalHandle = tvdlPtr->loadHandle; /* * Call the real 'unloadfile' proc we actually used. It is very important @@ -3370,7 +3376,9 @@ DivertUnloadFile(Tcl_LoadHandle loadHandle) originalHandle->unloadFileProcPtr(originalHandle); - /* What filesystem contains the temp copy of the library? */ + /* + * What filesystem contains the temp copy of the library? + */ if (tvdlPtr->divertedFilesystem == NULL) { /* @@ -3415,8 +3423,8 @@ DivertUnloadFile(Tcl_LoadHandle loadHandle) Tcl_DecrRefCount(tvdlPtr->divertedFile); } - ckfree((void*)tvdlPtr); - ckfree((void*)loadHandle); + ckfree((void *) tvdlPtr); + ckfree((void *) loadHandle); } /* @@ -3464,82 +3472,83 @@ TclpLoadFile( } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * Tcl_FindSymbol -- * * Find a symbol in a loaded library * * Results: - * Returns a pointer to the symbol if found. If not found, returns - * NULL and leaves an error message in the interpreter result. + * Returns a pointer to the symbol if found. If not found, returns NULL + * and leaves an error message in the interpreter result. * - * This function was once filesystem-specific, but has been made portable - * by having TclpDlopen return a structure that includes procedure pointers. + * This function was once filesystem-specific, but has been made portable by + * having TclpDlopen return a structure that includes procedure pointers. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ -void* -Tcl_FindSymbol(Tcl_Interp* interp, /* Tcl interpreter */ - Tcl_LoadHandle loadHandle, /* Handle to the loaded library */ - const char* symbol) /* Name of the symbol to resolve */ +void * +Tcl_FindSymbol( + Tcl_Interp *interp, /* Tcl interpreter */ + Tcl_LoadHandle loadHandle, /* Handle to the loaded library */ + const char *symbol) /* Name of the symbol to resolve */ { - return (*(loadHandle->findSymbolProcPtr))(interp, loadHandle, symbol); + return loadHandle->findSymbolProcPtr(interp, loadHandle, symbol); } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * Tcl_FSUnloadFile -- * * Unloads a library given its handle. Checks first that the library * supports unloading. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ int -Tcl_FSUnloadFile(Tcl_Interp* interp, /* Tcl interpreter */ - Tcl_LoadHandle handle) /* Handle of the file to unload */ +Tcl_FSUnloadFile( + Tcl_Interp *interp, /* Tcl interpreter */ + Tcl_LoadHandle handle) /* Handle of the file to unload */ { if (handle->unloadFileProcPtr == NULL) { if (interp != NULL) { - Tcl_SetObjResult(interp, - Tcl_NewStringObj("cannot unload: filesystem " - "does not support unloading", - -1)); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "cannot unload: filesystem does not support unloading", + -1)); } return TCL_ERROR; - } else { - TclpUnloadFile(handle); - return TCL_OK; } + TclpUnloadFile(handle); + return TCL_OK; } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpUnloadFile -- * * Unloads a library given its handle * - * This function was once filesystem-specific, but has been made portable - * by having TclpDlopen return a structure that includes procedure pointers. + * This function was once filesystem-specific, but has been made portable by + * having TclpDlopen return a structure that includes procedure pointers. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ void -TclpUnloadFile(Tcl_LoadHandle handle) +TclpUnloadFile( + Tcl_LoadHandle handle) { if (handle->unloadFileProcPtr != NULL) { - (*(handle->unloadFileProcPtr))(handle); + handle->unloadFileProcPtr(handle); } } /* - *--------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclFSUnloadTempFile -- * @@ -3554,7 +3563,7 @@ TclpUnloadFile(Tcl_LoadHandle handle) * The effects of the 'unload' function called, and of course the * temporary file will be deleted. * - *--------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ void -- cgit v0.12 From 648c5bbcac5d87bd675f90402e5f3f13a1fe8223 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 5 Apr 2010 07:38:07 +0000 Subject: Fix two failing tests by matching the can't-lookup-symbol error message. --- ChangeLog | 9 +++++++-- unix/tclLoadDl.c | 29 ++++++++++++++--------------- unix/tclLoadDyld.c | 5 +++-- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a95f2a..f9403d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,12 @@ +2010-04-05 Donal K. Fellows + + * unix/tclLoadDyld.c (FindSymbol): Better human-readable error message + generation to match code in tclLoadDl.c. + 2010-04-04 Donal K. Fellows - * generic/tclIOUtil.c: Minor changes to enforce Engineering Manual - style rules. + * generic/tclIOUtil.c, unix/tclLoadDl.c: Minor changes to enforce + Engineering Manual style rules. * doc/FileSystem.3, doc/Load.3: Documentation for TIP#357. diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 802e0dd..0620bd3 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.20 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.21 2010/04/05 07:38:08 dkf Exp $ */ #include "tclInt.h" @@ -34,11 +34,13 @@ # define RTLD_GLOBAL 0 #endif -/* Static procedures defined within this file */ +/* + * Static procedures defined within this file. + */ -static void* FindSymbol(Tcl_Interp* interp, Tcl_LoadHandle loadHandle, - const char* symbol); -static void UnloadFile(Tcl_LoadHandle loadHandle); +static void * FindSymbol(Tcl_Interp *interp, + Tcl_LoadHandle loadHandle, const char *symbol); +static void UnloadFile(Tcl_LoadHandle loadHandle); /* *--------------------------------------------------------------------------- @@ -144,7 +146,7 @@ FindSymbol( { const char *native; Tcl_DString newName, ds; - void *handle = (void *)(loadHandle->clientData); + void *handle = (void *) loadHandle->clientData; Tcl_PackageInitProc *proc; /* @@ -154,23 +156,21 @@ FindSymbol( */ native = Tcl_UtfToExternalDString(NULL, symbol, -1, &ds); - proc = (Tcl_PackageInitProc *) dlsym(handle, /* INTL: Native. */ - native); + proc = (Tcl_PackageInitProc *) dlsym(handle, native); /* INTL: Native. */ if (proc == NULL) { Tcl_DStringInit(&newName); Tcl_DStringAppend(&newName, "_", 1); native = Tcl_DStringAppend(&newName, native, -1); - proc = (Tcl_PackageInitProc *) dlsym(handle, /* INTL: Native. */ - native); + proc = (Tcl_PackageInitProc *) dlsym(handle, native); /* INTL: Native. */ Tcl_DStringFree(&newName); } Tcl_DStringFree(&ds); if (proc == NULL && interp != NULL) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "cannot find symbol \"", symbol, "\": ", - dlerror(), NULL); + dlerror(), NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, - NULL); + NULL); } return proc; } @@ -199,11 +199,10 @@ UnloadFile( * TclpDlopen(). The loadHandle is a token * that represents the loaded file. */ { - void *handle; + void *handle = (void *) loadHandle->clientData; - handle = (void *)(loadHandle->clientData); dlclose(handle); - ckfree((char*)loadHandle); + ckfree((char *) loadHandle); } /* diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index bfdcc00..35f732d 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDyld.c,v 1.36 2010/04/02 22:52:26 dkf Exp $ + * RCS: @(#) $Id: tclLoadDyld.c,v 1.37 2010/04/05 07:38:08 dkf Exp $ */ #include "tclInt.h" @@ -452,7 +452,8 @@ FindSymbol( } Tcl_DStringFree(&ds); if (errMsg && (interp != NULL)) { - Tcl_AppendResult(interp, errMsg, NULL); + Tcl_AppendResult(interp, "cannot find symbol \"", symbol, "\": ", + errMsg, NULL); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); } -- cgit v0.12 From dedace94f65c93d73097ebd2ce60dc232835c9f2 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 5 Apr 2010 12:45:26 +0000 Subject: Flip the defaults for whether to build threaded. Part of TIP #364. --- ChangeLog | 4 ++++ unix/tcl.m4 | 6 +++--- win/makefile.vc | 6 +++--- win/rules.vc | 12 ++++++------ win/tcl.m4 | 4 ++-- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9403d6..3f2019e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-04-05 Donal K. Fellows + * unix/tcl.m4 (SC_ENABLE_THREADS): Flip the default for whether to + * win/tcl.m4 (SC_ENABLE_THREADS): build in threaded mode. Part of + * win/rules.vc: TIP #364. + * unix/tclLoadDyld.c (FindSymbol): Better human-readable error message generation to match code in tclLoadDl.c. diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 06b6ae6..32b8215 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -618,8 +618,8 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ AC_DEFUN([SC_ENABLE_THREADS], [ AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads], - [build with threads (default: off)]), - [tcl_ok=$enableval], [tcl_ok=no]) + [build with threads (default: on)]), + [tcl_ok=$enableval], [tcl_ok=yes]) if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -690,7 +690,7 @@ AC_DEFUN([SC_ENABLE_THREADS], [ AC_MSG_RESULT([yes]) fi else - AC_MSG_RESULT([no (default)]) + AC_MSG_RESULT([no]) fi AC_SUBST(TCL_THREADS) diff --git a/win/makefile.vc b/win/makefile.vc index 6e258c9..189a03f 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -13,7 +13,7 @@ # Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.211 2010/03/30 14:05:53 dgp Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.212 2010/04/05 12:45:27 dkf Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -76,7 +76,7 @@ the build instructions. # Sets where to install Tcl from the built binaries. # C:\Progra~1\Tcl is assumed when not specified. # -# OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,unchecked,pdbs,none +# OPTS=static,msvcrt,staticpkg,nothreads,symbols,profile,loimpact,unchecked,pdbs,none # Sets special options for the core. The default is for none. # Any combination of the above may be used (comma separated). # 'none' will over-ride everything to nothing. @@ -90,7 +90,7 @@ the build instructions. # staticpkg = Affects the static option only to switch # tclshXX.exe to have the dde and reg extension linked # inside it. -# threads = Turns on full multithreading support. +# nothreads = Turns off full multithreading support. # thrdalloc = Use the thread allocator (shared global free pool) # This is the default on threaded builds. # tclalloc = Use the old non-thread allocator diff --git a/win/rules.vc b/win/rules.vc index ee216ab..28e93bd 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.40 2009/04/10 14:19:45 patthoyts Exp $ +# RCS: @(#) $Id: rules.vc,v 1.41 2010/04/05 12:45:27 dkf Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -212,7 +212,7 @@ _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -ou !if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"] STATIC_BUILD = 0 -TCL_THREADS = 0 +TCL_THREADS = 1 DEBUG = 0 SYMBOLS = 0 PROFILE = 0 @@ -220,7 +220,7 @@ PGO = 0 MSVCRT = 0 LOIMPACT = 0 TCL_USE_STATIC_PACKAGES = 0 -USE_THREAD_ALLOC = 0 +USE_THREAD_ALLOC = 1 UNCHECKED = 0 !else !if [nmakehlp -f $(OPTS) "static"] @@ -241,12 +241,12 @@ TCL_USE_STATIC_PACKAGES = 1 !else TCL_USE_STATIC_PACKAGES = 0 !endif -!if [nmakehlp -f $(OPTS) "threads"] +!if [nmakehlp -f $(OPTS) "nothreads"] +TCL_THREADS = 0 +!else !message *** Doing threads TCL_THREADS = 1 USE_THREAD_ALLOC= 1 -!else -TCL_THREADS = 0 !endif !if [nmakehlp -f $(OPTS) "symbols"] !message *** Doing symbols diff --git a/win/tcl.m4 b/win/tcl.m4 index bdcced8..6dbd69e 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -248,7 +248,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [ AC_DEFUN([SC_ENABLE_THREADS], [ AC_MSG_CHECKING(for building with threads) AC_ARG_ENABLE(threads, [ --enable-threads build with threads], - [tcl_ok=$enableval], [tcl_ok=no]) + [tcl_ok=$enableval], [tcl_ok=yes]) if test "$tcl_ok" = "yes"; then AC_MSG_RESULT(yes) @@ -259,7 +259,7 @@ AC_DEFUN([SC_ENABLE_THREADS], [ AC_DEFINE(USE_THREAD_ALLOC) else TCL_THREADS=0 - AC_MSG_RESULT([no (default)]) + AC_MSG_RESULT(no) fi AC_SUBST(TCL_THREADS) ]) -- cgit v0.12 From b40d694d271c049135dd1a9c6dc276b5de177de2 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 5 Apr 2010 13:54:36 +0000 Subject: Regen with autoconf 2.61 (what I have) --- unix/configure | 12634 +++++++++++++++++++++++++++---------------------------- win/configure | 4445 +++++++++++-------- 2 files changed, 8847 insertions(+), 8232 deletions(-) diff --git a/unix/configure b/unix/configure index 0396443..818cf1e 100755 --- a/unix/configure +++ b/unix/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for tcl 8.6. +# Generated by GNU Autoconf 2.61 for tcl 8.6. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='tcl' PACKAGE_TARNAME='tcl' @@ -274,42 +579,184 @@ PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +MAN_FLAGS +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +TCL_THREADS +ZLIB_DIR +ZLIB_OBJS +ZLIB_SRCS +ZLIB_INCLUDE +RANLIB +AR +LIBOBJS +TCL_LIBS +DL_LIBS +DL_OBJS +PLAT_OBJS +PLAT_SRCS +LDAIX_SRC +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +CC_SEARCH_FLAGS +LD_SEARCH_FLAGS +STLIB_LD +SHLIB_LD +TCL_SHLIB_LD_EXTRAS +TK_SHLIB_LD_EXTRAS +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +MAKE_LIB +MAKE_STUB_LIB +INSTALL_LIB +DLL_INSTALL_DIR +INSTALL_STUB_LIB +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +DTRACE +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +TCL_YEAR +PKG_CFG_ARGS +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_SRC_DIR +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +TCL_SHARED_BUILD +LD_LIBRARY_PATH_VAR +TCL_BUILD_LIB_SPEC +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_SHARED_LIB_SUFFIX +TCL_UNSHARED_LIB_SUFFIX +TCL_HAS_LONGLONG +INSTALL_TZDATA +DTRACE_SRC +DTRACE_HDR +DTRACE_OBJ +MAKEFILE_SHELL +BUILD_DLTEST +TCL_PACKAGE_PATH +TCL_MODULE_PATH +TCL_LIBRARY +PRIVATE_INCLUDE_DIR +HTML_DIR +PACKAGE_DIR +EXTRA_CC_SWITCHES +EXTRA_APP_CC_SWITCHES +EXTRA_INSTALL +EXTRA_INSTALL_BINARIES +EXTRA_BUILD_HTML +EXTRA_TCLSH_LIBS +DLTEST_LD +DLTEST_SUFFIX' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -336,34 +783,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -385,33 +846,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -438,6 +911,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -462,13 +941,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -533,6 +1015,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,24 +1077,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -633,8 +1121,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -654,27 +1141,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -701,74 +1180,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -797,9 +1278,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -817,15 +1295,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -848,7 +1333,7 @@ Optional Features: use STRING as a suffix to manpage file names (default: no, tcl if enabled without specifying STRING) - --enable-threads build with threads (default: off) + --enable-threads build with threads (default: on) --enable-shared build and link with shared libraries (default: on) --enable-64bit enable 64bit support (default: off) --enable-64bit-vis enable 64bit Sparc VIS support (default: off) @@ -876,128 +1361,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1016,7 +1468,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1030,6 +1482,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1051,7 +1504,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1062,7 +1514,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1084,9 +1536,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1097,8 +1547,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1111,20 +1561,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1135,22 +1599,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1162,26 +1632,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1212,14 +1680,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1235,8 +1706,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1248,12 +1719,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1278,8 +1748,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1296,12 +1765,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1326,6 +1789,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1371,24 +1839,23 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 - # Check whether --enable-man-symlinks or --disable-man-symlinks was given. + { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + # Check whether --enable-man-symlinks was given. if test "${enable_man_symlinks+set}" = set; then - enableval="$enable_man_symlinks" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi - echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 - # Check whether --enable-man-compression or --disable-man-compression was given. + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } + + { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-compression was given. if test "${enable_man_compression+set}" = set; then - enableval="$enable_man_compression" - case $enableval in + enableval=$enable_man_compression; case $enableval in yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 echo "$as_me: error: missing argument to --enable-man-compression" >&2;} { (exit 1); exit 1; }; };; @@ -1397,36 +1864,37 @@ echo "$as_me: error: missing argument to --enable-man-compression" >&2;} esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } if test "$enableval" != "no"; then - echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6 + { echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6; } fi - echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 - # Check whether --enable-man-suffix or --disable-man-suffix was given. + { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + # Check whether --enable-man-suffix was given. if test "${enable_man_suffix+set}" = set; then - enableval="$enable_man_suffix" - case $enableval in + enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi; - echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6 +fi + + { echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6; } @@ -1449,8 +1917,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1463,32 +1931,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1501,36 +1971,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1543,74 +2028,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1624,7 +2069,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1635,6 +2080,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1652,22 +2098,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1680,36 +2127,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1722,29 +2171,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1757,21 +2222,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1796,47 +2275,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1848,19 +2357,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1879,22 +2390,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1905,9 +2421,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1921,14 +2436,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1948,14 +2463,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1973,12 +2494,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2001,50 +2522,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2060,38 +2580,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2107,12 +2707,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2146,12 +2746,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2166,266 +2771,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2458,8 +2913,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2493,24 +2948,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2519,9 +2972,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2531,24 +2985,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2559,6 +3011,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2576,8 +3029,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2600,24 +3053,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2626,9 +3077,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2638,24 +3090,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2666,6 +3116,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2688,23 +3139,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2728,35 +3326,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2812,6 +3406,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2831,18 +3426,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2855,12 +3459,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2883,9 +3489,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2899,38 +3505,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -2942,8 +3545,8 @@ done - echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } if test "${tcl_cv_dirent_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2983,39 +3586,36 @@ closedir(d); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then @@ -3026,17 +3626,17 @@ _ACEOF fi if test "${ac_cv_header_float_h+set}" = set; then - echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3047,41 +3647,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3090,24 +3686,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3115,9 +3709,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3141,25 +3736,18 @@ echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } if test "${ac_cv_header_float_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_float_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6; } fi if test $ac_cv_header_float_h = yes; then @@ -3174,17 +3762,17 @@ fi if test "${ac_cv_header_values_h+set}" = set; then - echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3195,41 +3783,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3238,24 +3822,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3263,9 +3845,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3289,25 +3872,18 @@ echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } if test "${ac_cv_header_values_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_values_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6; } fi if test $ac_cv_header_values_h = yes; then @@ -3322,17 +3898,17 @@ fi if test "${ac_cv_header_limits_h+set}" = set; then - echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3343,41 +3919,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3386,24 +3958,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3411,9 +3981,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3437,25 +4008,18 @@ echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } if test "${ac_cv_header_limits_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_limits_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } fi if test $ac_cv_header_limits_h = yes; then @@ -3474,17 +4038,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3495,41 +4059,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3538,24 +4098,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3563,9 +4121,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3589,25 +4148,18 @@ echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } fi if test $ac_cv_header_stdlib_h = yes; then @@ -3676,17 +4228,17 @@ _ACEOF fi if test "${ac_cv_header_string_h+set}" = set; then - echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3697,41 +4249,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3740,24 +4288,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3765,9 +4311,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3791,25 +4338,18 @@ echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } if test "${ac_cv_header_string_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6; } fi if test $ac_cv_header_string_h = yes; then @@ -3866,17 +4406,17 @@ _ACEOF fi if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3887,41 +4427,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3930,24 +4466,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3955,9 +4489,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3981,25 +4516,18 @@ echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_wait_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } fi if test $ac_cv_header_sys_wait_h = yes; then @@ -4014,17 +4542,17 @@ fi if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4035,41 +4563,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4078,24 +4602,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4103,9 +4625,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4129,25 +4652,18 @@ echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } fi if test $ac_cv_header_dlfcn_h = yes; then @@ -4167,18 +4683,19 @@ fi for ac_header in sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4189,41 +4706,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4232,24 +4745,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4257,9 +4768,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4283,25 +4795,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4327,8 +4833,8 @@ done #------------------------------------------------------------------------ if test -z "$no_pipe" && test -n "$GCC"; then - echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4350,39 +4856,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_pipe=no + tcl_cv_cc_pipe=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -4393,13 +4895,13 @@ fi #------------------------------------------------------------------------ - # Check whether --enable-threads or --disable-threads was given. + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else - tcl_ok=no -fi; + tcl_ok=yes +fi + if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; @@ -4431,8 +4933,8 @@ cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4445,56 +4947,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4507,8 +5006,8 @@ fi # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4521,56 +5020,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_mutex_init (); int main () { -__pthread_mutex_init (); +return __pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes else @@ -4583,8 +5079,8 @@ fi # The space is needed THREADS_LIBS=" -lpthread" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4597,56 +5093,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4657,8 +5150,8 @@ fi # The space is needed THREADS_LIBS=" -lpthreads" else - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4671,56 +5164,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4728,8 +5218,8 @@ else fi if test "$tcl_ok" = "no"; then - echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4742,56 +5232,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_mutex_init (); int main () { -pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_mutex_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then tcl_ok=yes else @@ -4816,9 +5303,9 @@ echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you m for ac_func in pthread_attr_setstacksize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4844,68 +5331,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4918,8 +5397,8 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } if test "${TCL_THREADS}" = 1; then cat >>confdefs.h <<\_ACEOF @@ -4927,15 +5406,15 @@ cat >>confdefs.h <<\_ACEOF _ACEOF if test "${tcl_threaded_core}" = 1; then - echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6 + { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi else - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4947,11 +5426,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then @@ -4980,8 +5459,8 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6; } if test "${ac_cv_func_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5008,76 +5487,67 @@ cat >>conftest.$ac_ext <<_ACEOF #undef sin -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sin (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_sin) || defined (__stub___sin) +#if defined __stub_sin || defined __stub___sin choke me -#else -char (*f) () = sin; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != sin; +return sin (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_sin=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_sin=no + ac_cv_func_sin=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6; } if test $ac_cv_func_sin = yes; then MATH_LIBS="" else MATH_LIBS="-lm" fi - echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5094,46 +5564,43 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } if test $ac_cv_lib_ieee_main = yes; then MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5144,8 +5611,8 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5162,62 +5629,59 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -main (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } if test $ac_cv_lib_inet_main = yes; then LIBS="$LIBS -linet" fi if test "${ac_cv_header_net_errno_h+set}" = set; then - echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5228,41 +5692,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5271,24 +5731,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5296,9 +5754,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5322,25 +5781,18 @@ echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } if test "${ac_cv_header_net_errno_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_net_errno_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } fi if test $ac_cv_header_net_errno_h = yes; then @@ -5373,8 +5825,8 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5401,68 +5853,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef connect -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_connect) || defined (__stub___connect) +#if defined __stub_connect || defined __stub___connect choke me -#else -char (*f) () = connect; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != connect; +return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_connect=no + ac_cv_func_connect=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = yes; then tcl_checkSocket=0 else @@ -5470,8 +5913,8 @@ else fi if test "$tcl_checkSocket" = 1; then - echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } if test "${ac_cv_func_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5498,73 +5941,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef setsockopt -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +#if defined __stub_setsockopt || defined __stub___setsockopt choke me -#else -char (*f) () = setsockopt; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != setsockopt; +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_setsockopt=no + ac_cv_func_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } if test $ac_cv_func_setsockopt = yes; then : else - echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5577,56 +6011,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char setsockopt (); int main () { -setsockopt (); +return setsockopt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_setsockopt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } if test $ac_cv_lib_socket_setsockopt = yes; then LIBS="$LIBS -lsocket" else @@ -5639,8 +6070,8 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6; } if test "${ac_cv_func_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5667,68 +6098,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef accept -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char accept (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_accept) || defined (__stub___accept) +#if defined __stub_accept || defined __stub___accept choke me -#else -char (*f) () = accept; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != accept; +return accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_accept=no + ac_cv_func_accept=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6; } if test $ac_cv_func_accept = yes; then tcl_checkNsl=0 else @@ -5736,8 +6158,8 @@ else fi fi - echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5764,73 +6186,64 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +#if defined __stub_gethostbyname || defined __stub___gethostbyname choke me -#else -char (*f) () = gethostbyname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname; +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname=no + ac_cv_func_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = yes; then : else - echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5843,56 +6256,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } if test $ac_cv_lib_nsl_gethostbyname = yes; then LIBS="$LIBS -lnsl" fi @@ -5905,15 +6315,15 @@ fi LIBS="$LIBS$THREADS_LIBS" - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5923,12 +6333,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF @@ -5944,17 +6354,17 @@ _ACEOF zlib_ok=yes if test "${ac_cv_header_zlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5965,41 +6375,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6008,24 +6414,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -6033,9 +6437,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6059,31 +6464,24 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" > echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then - echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } if test "${ac_cv_type_gz_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6095,50 +6493,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +typedef gz_header ac__type_new_; int main () { -if ((gz_header *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (gz_header)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_gz_header=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_gz_header=no + ac_cv_type_gz_header=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } if test $ac_cv_type_gz_header = yes; then : else @@ -6153,13 +6548,12 @@ fi if test $zlib_ok = yes; then - echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } if test "${ac_cv_search_deflateSetHeader+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_deflateSetHeader=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6167,115 +6561,73 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char deflateSetHeader (); int main () { -deflateSetHeader (); +return deflateSetHeader (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_deflateSetHeader=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_deflateSetHeader" = no; then - for ac_lib in z; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflateSetHeader (); -int -main () -{ -deflateSetHeader (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_deflateSetHeader="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + : +else + ac_cv_search_deflateSetHeader=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 -if test "$ac_cv_search_deflateSetHeader" != no; then - test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +ac_res=$ac_cv_search_deflateSetHeader +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else @@ -6313,8 +6665,8 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6327,32 +6679,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6365,27 +6719,41 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6394,31 +6762,31 @@ fi # Step 0.a: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit-vis or --disable-64bit-vis was given. + { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then - enableval="$enable_64bit_vis" - do64bitVIS=$enableval + enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no -fi; - echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then do64bit=yes @@ -6428,8 +6796,8 @@ fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6453,35 +6821,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags else @@ -6492,8 +6856,8 @@ fi fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then CFLAGS="$CFLAGS -fvisibility=hidden" @@ -6519,35 +6883,32 @@ f(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_visibility_hidden=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags if test $tcl_cv_cc_visibility_hidden = yes; then @@ -6566,24 +6927,24 @@ fi # Step 0.d: Disable -rpath support? - echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 - # Check whether --enable-rpath or --disable-rpath was given. + { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - doRpath=$enableval + enableval=$enable_rpath; doRpath=$enableval else doRpath=yes -fi; - echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6 +fi + + { echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6610,16 +6971,16 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6632,56 +6993,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then have_dl=yes else @@ -6724,8 +7082,8 @@ fi TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6738,25 +7096,27 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = ""; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 @@ -6788,8 +7148,8 @@ fi CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac - echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6 + { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6; } fi @@ -6868,12 +7228,10 @@ fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then - case $LIBOBJS in - "tclLoadAix.$ac_objext" | \ - *" tclLoadAix.$ac_objext" | \ - "tclLoadAix.$ac_objext "* | \ + case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" + ;; esac DL_LIBS="-lld" @@ -6893,8 +7251,8 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6907,56 +7265,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); int main () { -gettimeofday (); +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } if test $ac_cv_lib_bsd_gettimeofday = yes; then libbsd=yes else @@ -6988,8 +7343,8 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7002,56 +7357,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bind_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } if test $ac_cv_lib_bind_inet_ntoa = yes; then LIBS="$LIBS -lbind -lsocket" fi @@ -7106,8 +7458,8 @@ fi SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" - echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 -echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 +echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; } if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7120,56 +7472,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_ntoa (); int main () { -inet_ntoa (); +return inet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_network_inet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_network_inet_ntoa=no + ac_cv_lib_network_inet_ntoa=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; } if test $ac_cv_lib_network_inet_ntoa = yes; then LIBS="$LIBS -lnetwork" fi @@ -7199,8 +7548,8 @@ else fi - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7213,56 +7562,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7336,8 +7682,8 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7350,56 +7696,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then tcl_ok=yes else @@ -7427,12 +7770,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7449,12 +7790,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7491,12 +7830,10 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - case $LIBOBJS in - "mkstemp.$ac_objext" | \ - *" mkstemp.$ac_objext" | \ - "mkstemp.$ac_objext "* | \ + case " $LIBOBJS " in *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" + ;; esac if test $doRpath = yes; then @@ -7555,8 +7892,8 @@ fi if test $do64bit = yes; then - echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_m64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7579,40 +7916,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_m64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" @@ -7701,8 +8035,8 @@ fi LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7728,8 +8062,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -7761,8 +8095,8 @@ fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } if test "${tcl_cv_ld_elf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7788,8 +8122,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic @@ -7891,8 +8225,8 @@ fi case `arch` in ppc) - echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7915,40 +8249,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_ppc64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -7957,8 +8288,8 @@ echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 fi ;; i386) - echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7981,40 +8312,37 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_arch_x86_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" @@ -8040,8 +8368,8 @@ fi fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8064,40 +8392,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_single_module=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -8116,8 +8441,8 @@ fi fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" - echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8140,40 +8465,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_search_paths_first=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -8200,21 +8522,21 @@ _ACEOF PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 - # Check whether --enable-corefoundation or --disable-corefoundation was given. + { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + # Check whether --enable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then - enableval="$enable_corefoundation" - tcl_corefoundation=$enableval + enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes -fi; - echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6 +fi + + { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6; } if test $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8248,35 +8570,32 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$fat_32_64" = yes; then @@ -8287,8 +8606,8 @@ fi LIBS=$hold_libs fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" @@ -8304,8 +8623,8 @@ fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } if test "${tcl_cv_lib_corefoundation_64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8329,42 +8648,39 @@ CFBundleRef b = CFBundleGetMainBundle(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_lib_corefoundation_64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } if test $tcl_cv_lib_corefoundation_64 = no; then @@ -8700,25 +9016,25 @@ fi else arch=`isainfo` - echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } if test "$arch" = "amd64 i386"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" if test "${ac_cv_header_sunmath_h+set}" = set; then - echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8729,41 +9045,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8772,24 +9084,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -8797,9 +9107,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -8823,25 +9134,18 @@ echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } if test "${ac_cv_header_sunmath_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sunmath_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } fi @@ -8850,8 +9154,8 @@ fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } use_sunmath=no fi @@ -8926,8 +9230,8 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8950,40 +9254,37 @@ int i; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_ld_Bexport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -9018,13 +9319,13 @@ fi # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load or --disable-load was given. + # Check whether --enable-load was given. if test "${enable_load+set}" = set; then - enableval="$enable_load" - tcl_ok=$enableval + enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "$tcl_ok" = no; then DL_OBJS="" fi @@ -9183,22 +9484,22 @@ _ACEOF - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -9208,8 +9509,8 @@ _ACEOF CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -9244,11 +9545,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -9269,8 +9570,8 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then @@ -9292,33 +9593,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9335,37 +9631,34 @@ char *p = (char *)strtoll; char *q = (char *)strtoull; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__isoc99_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__isoc99_source=no + tcl_cv_flag__isoc99_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then @@ -9397,33 +9690,28 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9440,37 +9728,34 @@ struct stat64 buf; int i = stat64("/", &buf); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile64_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile64_source=no + tcl_cv_flag__largefile64_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then @@ -9502,33 +9787,28 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9545,37 +9825,34 @@ char *p = (char *)open64; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_flag__largefile_source64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_flag__largefile_source64=no + tcl_cv_flag__largefile_source64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then @@ -9588,17 +9865,17 @@ _ACEOF fi if test "x${tcl_flags}" = "x" ; then - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } else - echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6; } fi - echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } if test "${tcl_cv_type_64bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9621,35 +9898,31 @@ __int64 value = (__int64) 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_type_64bit=__int64 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_type_64bit="long long" + tcl_type_64bit="long long" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -9671,34 +9944,31 @@ switch (0) { } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_64bit=${tcl_type_64bit} else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then @@ -9707,20 +9977,20 @@ cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF - echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6 + { echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9742,38 +10012,34 @@ struct dirent64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_dirent64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_dirent64=no + tcl_cv_struct_dirent64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9782,8 +10048,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9805,38 +10071,34 @@ struct stat64 p; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_struct_stat64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_struct_stat64=no + tcl_cv_struct_stat64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF @@ -9850,9 +10112,9 @@ _ACEOF for ac_func in open64 lseek64 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9878,68 +10140,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9948,8 +10202,8 @@ _ACEOF fi done - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9971,35 +10225,31 @@ off64_t offset; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_off64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_off64_t=no + tcl_cv_type_off64_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ @@ -10010,11 +10260,11 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi @@ -10024,8 +10274,8 @@ echo "${ECHO_T}no" >&6 # Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10042,7 +10292,8 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -10051,27 +10302,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10094,40 +10340,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -10137,11 +10379,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -10152,27 +10394,22 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -10188,8 +10425,10 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10197,27 +10436,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10230,13 +10483,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -10265,9 +10521,9 @@ esac for ac_func in getcwd do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10293,68 +10549,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10379,9 +10627,9 @@ done for ac_func in mkstemp opendir strtol waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10407,88 +10655,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi done -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } if test "${ac_cv_func_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10515,68 +10753,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strerror -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) +#if defined __stub_strerror || defined __stub___strerror choke me -#else -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strerror; +return strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strerror=no + ac_cv_func_strerror=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6; } if test $ac_cv_func_strerror = yes; then : else @@ -10587,8 +10816,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } if test "${ac_cv_func_getwd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10615,68 +10844,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getwd -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getwd (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getwd) || defined (__stub___getwd) +#if defined __stub_getwd || defined __stub___getwd choke me -#else -char (*f) () = getwd; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getwd; +return getwd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getwd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getwd=no + ac_cv_func_getwd=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6; } if test $ac_cv_func_getwd = yes; then : else @@ -10687,8 +10907,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10715,68 +10935,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef wait3 -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char wait3 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wait3) || defined (__stub___wait3) +#if defined __stub_wait3 || defined __stub___wait3 choke me -#else -char (*f) () = wait3; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != wait3; +return wait3 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_wait3=no + ac_cv_func_wait3=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6; } if test $ac_cv_func_wait3 = yes; then : else @@ -10787,8 +10998,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6; } if test "${ac_cv_func_uname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10815,68 +11026,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef uname -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char uname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_uname) || defined (__stub___uname) +#if defined __stub_uname || defined __stub___uname choke me -#else -char (*f) () = uname; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != uname; +return uname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_uname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_uname=no + ac_cv_func_uname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6; } if test $ac_cv_func_uname = yes; then : else @@ -10894,8 +11096,8 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ # use it when threads are enabled, c.f. bug # 711232 ac_cv_func_realpath=no fi -echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } if test "${ac_cv_func_realpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10922,68 +11124,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef realpath -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char realpath (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_realpath) || defined (__stub___realpath) +#if defined __stub_realpath || defined __stub___realpath choke me -#else -char (*f) () = realpath; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != realpath; +return realpath (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_realpath=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_realpath=no + ac_cv_func_realpath=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6; } if test $ac_cv_func_realpath = yes; then : else @@ -10995,8 +11188,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11023,72 +11216,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then - echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } if test "${tcl_cv_api_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11116,38 +11300,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_getaddrinfo=no + tcl_cv_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } tcl_ok=$tcl_cv_api_getaddrinfo if test "$tcl_ok" = yes; then @@ -11165,8 +11345,8 @@ fi #-------------------------------------------------------------------- if test "${TCL_THREADS}" = 1; then - echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwuid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11193,72 +11373,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwuid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwuid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +#if defined __stub_getpwuid_r || defined __stub___getpwuid_r choke me -#else -char (*f) () = getpwuid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwuid_r; +return getpwuid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwuid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwuid_r=no + ac_cv_func_getpwuid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } if test $ac_cv_func_getpwuid_r = yes; then - echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11289,38 +11460,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_5=no + tcl_cv_api_getpwuid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then @@ -11329,8 +11496,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11361,38 +11528,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwuid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwuid_r_4=no + tcl_cv_api_getpwuid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then @@ -11412,8 +11575,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getpwnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11440,72 +11603,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getpwnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getpwnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +#if defined __stub_getpwnam_r || defined __stub___getpwnam_r choke me -#else -char (*f) () = getpwnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getpwnam_r; +return getpwnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getpwnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getpwnam_r=no + ac_cv_func_getpwnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } if test $ac_cv_func_getpwnam_r = yes; then - echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11536,38 +11690,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_5=no + tcl_cv_api_getpwnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then @@ -11576,8 +11726,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11608,38 +11758,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getpwnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getpwnam_r_4=no + tcl_cv_api_getpwnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then @@ -11659,8 +11805,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrgid_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11687,72 +11833,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrgid_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrgid_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +#if defined __stub_getgrgid_r || defined __stub___getgrgid_r choke me -#else -char (*f) () = getgrgid_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrgid_r; +return getgrgid_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrgid_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrgid_r=no + ac_cv_func_getgrgid_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } if test $ac_cv_func_getgrgid_r = yes; then - echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11783,38 +11920,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_5=no + tcl_cv_api_getgrgid_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then @@ -11823,8 +11956,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11855,38 +11988,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrgid_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrgid_r_4=no + tcl_cv_api_getgrgid_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then @@ -11906,8 +12035,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } if test "${ac_cv_func_getgrnam_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11934,72 +12063,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getgrnam_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getgrnam_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +#if defined __stub_getgrnam_r || defined __stub___getgrnam_r choke me -#else -char (*f) () = getgrnam_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getgrnam_r; +return getgrnam_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_getgrnam_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getgrnam_r=no + ac_cv_func_getgrnam_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } if test $ac_cv_func_getgrnam_r = yes; then - echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12030,38 +12150,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_5=no + tcl_cv_api_getgrnam_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then @@ -12070,8 +12186,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12102,38 +12218,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_getgrnam_r_4=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_getgrnam_r_4=no + tcl_cv_api_getgrnam_r_4=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then @@ -12186,8 +12298,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12214,72 +12326,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12310,38 +12413,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_6=no + tcl_cv_api_gethostbyname_r_6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then @@ -12350,8 +12449,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12382,38 +12481,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_5=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_5=no + tcl_cv_api_gethostbyname_r_5=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then @@ -12422,8 +12517,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12452,38 +12547,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyname_r_3=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyname_r_3=no + tcl_cv_api_gethostbyname_r_3=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then @@ -12504,8 +12595,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12532,72 +12623,63 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gethostbyaddr_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r choke me -#else -char (*f) () = gethostbyaddr_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyaddr_r; +return gethostbyaddr_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyaddr_r=no + ac_cv_func_gethostbyaddr_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } if test $ac_cv_func_gethostbyaddr_r = yes; then - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12631,38 +12713,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_7=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_7=no + tcl_cv_api_gethostbyaddr_r_7=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then @@ -12671,8 +12749,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12706,38 +12784,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_api_gethostbyaddr_r_8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_gethostbyaddr_r_8=no + tcl_cv_api_gethostbyaddr_r_8=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then @@ -12771,18 +12845,19 @@ fi for ac_header in sys/modem.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12793,41 +12868,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12836,24 +12907,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12861,9 +12930,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12887,25 +12957,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -12917,8 +12981,8 @@ fi done - echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } if test "${tcl_cv_api_serial+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12946,13 +13010,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12965,8 +13038,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then tcl_cv_api_serial=no @@ -12990,13 +13065,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13009,8 +13093,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -13036,13 +13122,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13055,8 +13150,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no ; then if test "$cross_compiling" = yes; then @@ -13084,13 +13181,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13103,8 +13209,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13131,13 +13239,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13150,8 +13267,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi if test $tcl_cv_api_serial = no; then if test "$cross_compiling" = yes; then @@ -13179,13 +13298,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13198,12 +13326,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_api_serial=none fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6; } case $tcl_cv_api_serial in termios) cat >>confdefs.h <<\_ACEOF @@ -13233,8 +13363,8 @@ _ACEOF # special flag. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } if test "${tcl_cv_type_fd_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13255,42 +13385,38 @@ fd_set readMask, writeMask; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_fd_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_fd_set=no + tcl_cv_type_fd_set=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then - echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } if test "${tcl_cv_grep_fd_mask+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13313,8 +13439,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } if test $tcl_cv_grep_fd_mask = present; then cat >>confdefs.h <<\_ACEOF @@ -13341,18 +13467,19 @@ fi for ac_header in sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13363,41 +13490,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13406,24 +13529,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13431,9 +13552,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13457,25 +13579,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -13487,8 +13603,8 @@ fi done - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13512,38 +13628,34 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -13559,9 +13671,9 @@ fi for ac_func in gmtime_r localtime_r mktime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13587,68 +13699,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -13658,8 +13762,8 @@ fi done - echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_tzadj+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13680,38 +13784,34 @@ struct tm tm; tm.tm_tzadj; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_tzadj=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_tzadj=no + tcl_cv_member_tm_tzadj=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } if test $tcl_cv_member_tm_tzadj = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13720,8 +13820,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } if test "${tcl_cv_member_tm_gmtoff+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13742,38 +13842,34 @@ struct tm tm; tm.tm_gmtoff; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_member_tm_gmtoff=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_member_tm_gmtoff=no + tcl_cv_member_tm_gmtoff=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } if test $tcl_cv_member_tm_gmtoff = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13786,8 +13882,8 @@ _ACEOF # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13810,38 +13906,34 @@ extern long timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_long=no + tcl_cv_timezone_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } if test $tcl_cv_timezone_long = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13852,8 +13944,8 @@ _ACEOF # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } if test "${tcl_cv_timezone_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13876,38 +13968,34 @@ extern time_t timezone; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_timezone_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_timezone_time=no + tcl_cv_timezone_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } if test $tcl_cv_timezone_time = yes ; then cat >>confdefs.h <<\_ACEOF @@ -13924,8 +14012,8 @@ _ACEOF # lack blkcnt_t. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13947,33 +14035,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -13991,40 +14074,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blocks=no + ac_cv_member_struct_stat_st_blocks=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } if test $ac_cv_member_struct_stat_st_blocks = yes; then cat >>confdefs.h <<_ACEOF @@ -14033,8 +14113,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14056,33 +14136,28 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14100,40 +14175,37 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -14143,8 +14215,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for blkcnt_t" >&5 -echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for blkcnt_t" >&5 +echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6; } if test "${ac_cv_type_blkcnt_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14155,50 +14227,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef blkcnt_t ac__type_new_; int main () { -if ((blkcnt_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (blkcnt_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_blkcnt_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_blkcnt_t=no + ac_cv_type_blkcnt_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 -echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 +echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6; } if test $ac_cv_type_blkcnt_t = yes; then cat >>confdefs.h <<_ACEOF @@ -14208,8 +14277,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } if test "${ac_cv_func_fstatfs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14236,68 +14305,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef fstatfs -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char fstatfs (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +#if defined __stub_fstatfs || defined __stub___fstatfs choke me -#else -char (*f) () = fstatfs; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != fstatfs; +return fstatfs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_fstatfs=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_fstatfs=no + ac_cv_func_fstatfs=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } if test $ac_cv_func_fstatfs = yes; then : else @@ -14314,8 +14374,8 @@ fi # checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14334,9 +14394,9 @@ main () { /* Some versions of memcmp are not 8-bit clean. */ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; + char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - exit (1); + return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. @@ -14352,9 +14412,9 @@ main () strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) - exit (1); + return 1; } - exit (0); + return 0; } ; @@ -14362,13 +14422,22 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14381,17 +14450,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 -test $ac_cv_func_memcmp_working = no && case $LIBOBJS in - "memcmp.$ac_objext" | \ - *" memcmp.$ac_objext" | \ - "memcmp.$ac_objext "* | \ +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; esac @@ -14402,8 +14471,8 @@ esac # compat/string.h} #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14430,68 +14499,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef memmove -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char memmove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_memmove) || defined (__stub___memmove) +#if defined __stub_memmove || defined __stub___memmove choke me -#else -char (*f) () = memmove; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != memmove; +return memmove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_memmove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_memmove=no + ac_cv_func_memmove=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6; } if test $ac_cv_func_memmove = yes; then : else @@ -14515,8 +14575,8 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } if test "${ac_cv_func_strstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14543,68 +14603,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strstr -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strstr (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strstr) || defined (__stub___strstr) +#if defined __stub_strstr || defined __stub___strstr choke me -#else -char (*f) () = strstr; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strstr; +return strstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strstr=no + ac_cv_func_strstr=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6; } if test $ac_cv_func_strstr = yes; then tcl_ok=1 else @@ -14612,8 +14663,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } if test "${tcl_cv_strstr_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14632,13 +14683,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14651,11 +14711,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strstr_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } if test "$tcl_cv_strstr_unbroken" = "ok"; then tcl_ok=1 else @@ -14663,12 +14725,10 @@ echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strstr.$ac_objext" | \ - *" strstr.$ac_objext" | \ - "strstr.$ac_objext "* | \ + case " $LIBOBJS " in *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14682,8 +14742,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } if test "${ac_cv_func_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14710,68 +14770,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtoul -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtoul (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtoul) || defined (__stub___strtoul) +#if defined __stub_strtoul || defined __stub___strtoul choke me -#else -char (*f) () = strtoul; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtoul; +return strtoul (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtoul=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtoul=no + ac_cv_func_strtoul=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } if test $ac_cv_func_strtoul = yes; then tcl_ok=1 else @@ -14779,8 +14830,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtoul_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14800,13 +14851,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14819,11 +14879,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtoul_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } if test "$tcl_cv_strtoul_unbroken" = "ok"; then tcl_ok=1 else @@ -14831,12 +14893,10 @@ echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtoul.$ac_objext" | \ - *" strtoul.$ac_objext" | \ - "strtoul.$ac_objext "* | \ + case " $LIBOBJS " in *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; esac USE_COMPAT=1 @@ -14849,8 +14909,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14877,68 +14937,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_ok=1 else @@ -14946,8 +14997,8 @@ else fi if test "$tcl_ok" = 1; then - echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } if test "${tcl_cv_strtod_unbroken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14967,13 +15018,22 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -14986,11 +15046,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_unbroken=broken fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } if test "$tcl_cv_strtod_unbroken" = "ok"; then tcl_ok=1 else @@ -14998,12 +15060,10 @@ echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strtod.$ac_objext" | \ - *" strtod.$ac_objext" | \ - "strtod.$ac_objext "* | \ + case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15018,8 +15078,8 @@ esac #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } if test "${ac_cv_func_strtod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15046,68 +15106,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strtod -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strtod (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strtod) || defined (__stub___strtod) +#if defined __stub_strtod || defined __stub___strtod choke me -#else -char (*f) () = strtod; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strtod; +return strtod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strtod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strtod=no + ac_cv_func_strtod=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = yes; then tcl_strtod=1 else @@ -15115,8 +15166,8 @@ else fi if test "$tcl_strtod" = 1; then - echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } if test "${tcl_cv_strtod_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15152,13 +15203,22 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -15171,18 +15231,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_strtod_buggy=buggy fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } if test "$tcl_cv_strtod_buggy" = buggy; then - case $LIBOBJS in - "fixstrtod.$ac_objext" | \ - *" fixstrtod.$ac_objext" | \ - "fixstrtod.$ac_objext "* | \ + case " $LIBOBJS " in *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; esac USE_COMPAT=1 @@ -15200,8 +15260,8 @@ _ACEOF # they don't exist. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15212,50 +15272,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -15266,8 +15323,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15278,50 +15335,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -15332,8 +15386,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15344,62 +15398,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15421,8 +15472,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15437,8 +15488,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${tcl_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15464,38 +15515,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_type_socklen_t=no + tcl_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } if test $tcl_cv_type_socklen_t = no; then cat >>confdefs.h <<\_ACEOF @@ -15504,8 +15551,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15516,50 +15563,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef intptr_t ac__type_new_; int main () { -if ((intptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (intptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_intptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_intptr_t=no + ac_cv_type_intptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } if test $ac_cv_type_intptr_t = yes; then @@ -15569,8 +15613,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } if test "${tcl_cv_intptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15595,40 +15639,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } if test "$tcl_cv_intptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15639,8 +15679,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15651,50 +15691,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then @@ -15704,8 +15741,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } if test "${tcl_cv_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15731,40 +15768,36 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$tcl_ok" = yes && break; fi done fi -echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } if test "$tcl_cv_uintptr_t" != none; then cat >>confdefs.h <<_ACEOF @@ -15783,8 +15816,8 @@ fi # provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } if test "${ac_cv_func_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15811,68 +15844,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef opendir -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_opendir) || defined (__stub___opendir) +#if defined __stub_opendir || defined __stub___opendir choke me -#else -char (*f) () = opendir; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != opendir; +return opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_opendir=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_opendir=no + ac_cv_func_opendir=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6; } if test $ac_cv_func_opendir = yes; then : else @@ -15892,8 +15916,8 @@ fi # the trick. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6; } if test "${tcl_cv_union_wait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15919,39 +15943,36 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_union_wait=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_union_wait=no + tcl_cv_union_wait=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6; } if test $tcl_cv_union_wait = no; then cat >>confdefs.h <<\_ACEOF @@ -15966,8 +15987,8 @@ fi # under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } if test "${ac_cv_func_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15994,68 +16015,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef strncasecmp -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +#if defined __stub_strncasecmp || defined __stub___strncasecmp choke me -#else -char (*f) () = strncasecmp; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != strncasecmp; +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_strncasecmp=no + ac_cv_func_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else @@ -16063,8 +16075,8 @@ else fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16077,56 +16089,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_strncasecmp=no + ac_cv_lib_socket_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else @@ -16135,8 +16144,8 @@ fi fi if test "$tcl_ok" = 0; then - echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16149,56 +16158,53 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strncasecmp (); int main () { -strncasecmp (); +return strncasecmp (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_inet_strncasecmp=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_inet_strncasecmp=no + ac_cv_lib_inet_strncasecmp=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } if test $ac_cv_lib_inet_strncasecmp = yes; then tcl_ok=1 else @@ -16207,12 +16213,10 @@ fi fi if test "$tcl_ok" = 0; then - case $LIBOBJS in - "strncasecmp.$ac_objext" | \ - *" strncasecmp.$ac_objext" | \ - "strncasecmp.$ac_objext "* | \ + case " $LIBOBJS " in *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac USE_COMPAT=1 @@ -16229,8 +16233,8 @@ fi # declare it. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_BSDgettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16257,68 +16261,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef BSDgettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char BSDgettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday choke me -#else -char (*f) () = BSDgettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != BSDgettimeofday; +return BSDgettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_BSDgettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_BSDgettimeofday=no + ac_cv_func_BSDgettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } if test $ac_cv_func_BSDgettimeofday = yes; then cat >>confdefs.h <<\_ACEOF @@ -16327,8 +16322,8 @@ _ACEOF else - echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16355,68 +16350,59 @@ cat >>conftest.$ac_ext <<_ACEOF #undef gettimeofday -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gettimeofday (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +#if defined __stub_gettimeofday || defined __stub___gettimeofday choke me -#else -char (*f) () = gettimeofday; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gettimeofday; +return gettimeofday (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gettimeofday=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gettimeofday=no + ac_cv_func_gettimeofday=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } if test $ac_cv_func_gettimeofday = yes; then : else @@ -16430,8 +16416,8 @@ fi fi -echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } if test "${tcl_cv_grep_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16454,8 +16440,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } if test $tcl_cv_grep_gettimeofday = missing ; then cat >>confdefs.h <<\_ACEOF @@ -16471,8 +16457,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16494,38 +16480,34 @@ test_array [0] = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -16533,8 +16515,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } if test "${tcl_cv_char_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16558,38 +16540,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_char_signed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_char_signed=no + tcl_cv_char_signed=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6; } if test $tcl_cv_char_signed = yes; then cat >>confdefs.h <<\_ACEOF @@ -16602,8 +16580,8 @@ fi # Does putenv() copy or not? We need to know to avoid memory leaks. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } if test "${tcl_cv_putenv_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16638,13 +16616,22 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -16657,11 +16644,13 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_putenv_copy=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } if test $tcl_cv_putenv_copy = yes; then cat >>confdefs.h <<\_ACEOF @@ -16675,28 +16664,28 @@ fi #-------------------------------------------------------------------- - # Check whether --enable-langinfo or --disable-langinfo was given. + # Check whether --enable-langinfo was given. if test "${enable_langinfo+set}" = set; then - enableval="$enable_langinfo" - langinfo_ok=$enableval + enableval=$enable_langinfo; langinfo_ok=$enableval else langinfo_ok=yes -fi; +fi + HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then if test "${ac_cv_header_langinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16707,41 +16696,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16750,24 +16735,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -16775,9 +16758,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -16801,25 +16785,18 @@ echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then @@ -16830,8 +16807,8 @@ fi fi - echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } if test "$langinfo_ok" = "yes"; then if test "${tcl_cv_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -16853,39 +16830,35 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_langinfo_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_langinfo_h=no + tcl_cv_langinfo_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } if test $tcl_cv_langinfo_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -16894,8 +16867,8 @@ _ACEOF fi else - echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6 + { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6; } fi @@ -16908,9 +16881,9 @@ echo "${ECHO_T}$langinfo_ok" >&6 for ac_func in chflags mkstemps do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16936,68 +16909,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17011,8 +16976,8 @@ done # Check for support of isnan() function or macro #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6; } if test "${tcl_cv_isnan+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17035,39 +17000,36 @@ isnan(0.0); /* Generates an error if isnan is missing */ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_isnan=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_isnan=no + tcl_cv_isnan=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6; } if test $tcl_cv_isnan = no; then cat >>confdefs.h <<\_ACEOF @@ -17085,9 +17047,9 @@ if test "`uname -s`" = "Darwin" ; then for ac_func in getattrlist do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17113,68 +17075,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17187,18 +17141,19 @@ done for ac_header in copyfile.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17209,41 +17164,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17252,24 +17203,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17277,9 +17226,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17303,25 +17253,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17337,9 +17281,9 @@ done for ac_func in copyfile do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17365,68 +17309,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17440,18 +17376,19 @@ done for ac_header in libkern/OSAtomic.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17462,41 +17399,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17505,24 +17438,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17530,9 +17461,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17556,25 +17488,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17590,9 +17516,9 @@ done for ac_func in OSSpinLockLock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17618,68 +17544,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17692,9 +17610,9 @@ done for ac_func in pthread_atfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17720,68 +17638,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17815,18 +17725,19 @@ _ACEOF for ac_header in AvailabilityMacros.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17837,41 +17748,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17880,24 +17787,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -17905,9 +17810,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -17931,25 +17837,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -17962,8 +17862,8 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } if test "${tcl_cv_cc_weak_import+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17994,40 +17894,37 @@ rand(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_cc_weak_import=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then cat >>confdefs.h <<\_ACEOF @@ -18035,8 +17932,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 -echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 +echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6; } if test "${tcl_cv_cc_darwin_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18068,39 +17965,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cc_darwin_c_source=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cc_darwin_c_source=no + tcl_cv_cc_darwin_c_source=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 -echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 +echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6; } if test $tcl_cv_cc_darwin_c_source = yes; then cat >>confdefs.h <<\_ACEOF @@ -18121,8 +18014,8 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6; } if test "${tcl_cv_api_fts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18151,39 +18044,36 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then tcl_cv_api_fts=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_api_fts=no + tcl_cv_api_fts=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then cat >>confdefs.h <<\_ACEOF @@ -18203,18 +18093,19 @@ fi for ac_header in sys/ioctl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18225,41 +18116,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18268,24 +18155,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18293,9 +18178,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18319,25 +18205,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18353,18 +18233,19 @@ done for ac_header in sys/filio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18375,41 +18256,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18418,34 +18295,33 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18469,25 +18345,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -18500,8 +18370,8 @@ fi done - echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6; } if test "${tcl_cv_sys_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18528,12 +18398,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18546,8 +18416,8 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; SunOS-4*) @@ -18555,27 +18425,27 @@ cat >>confdefs.h <<\_ACEOF #define USE_FIONBIO 1 _ACEOF - echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6 + { echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6; } ;; *) - echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6 + { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 -# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +# Check whether --enable-dll-unloading was given. if test "${enable_dll_unloading+set}" = set; then - enableval="$enable_dll_unloading" - tcl_ok=$enableval + enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test $tcl_ok = yes; then cat >>confdefs.h <<\_ACEOF @@ -18583,8 +18453,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18592,24 +18462,24 @@ echo "${ECHO_T}$tcl_ok" >&6 # be overriden on the configure command line either way. #------------------------------------------------------------------------ -echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } -# Check whether --with-tzdata or --without-tzdata was given. +# Check whether --with-tzdata was given. if test "${with_tzdata+set}" = set; then - withval="$with_tzdata" - tcl_ok=$withval + withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto -fi; +fi + # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6 + { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6; } ;; yes) # nothing to do here @@ -18633,8 +18503,8 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6 + { echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6; } else tcl_ok=yes fi @@ -18647,8 +18517,8 @@ echo "$as_me: error: invalid argument: $tcl_ok" >&2;} esac if test $tcl_ok = yes then - echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6 + { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6; } INSTALL_TZDATA=install-tzdata fi @@ -18656,26 +18526,26 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace or --disable-dtrace was given. +# Check whether --enable-dtrace was given. if test "${enable_dtrace+set}" = set; then - enableval="$enable_dtrace" - tcl_ok=$enableval + enableval=$enable_dtrace; tcl_ok=$enableval else tcl_ok=no -fi; +fi + if test $tcl_ok = yes; then if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18686,41 +18556,37 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18729,24 +18595,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -18754,9 +18618,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -18780,25 +18645,18 @@ echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\" echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to the tcl lists. ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sdt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sdt_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } fi if test $ac_cv_header_sys_sdt_h = yes; then @@ -18812,8 +18670,8 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_DTRACE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18829,31 +18687,32 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi DTRACE=$ac_cv_path_DTRACE - if test -n "$DTRACE"; then - echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6 + { echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then @@ -18877,8 +18736,8 @@ _ACEOF fi fi fi -echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6 +{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18907,15 +18766,15 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 - # Check whether --enable-framework or --disable-framework was given. + { echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + # Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - enable_framework=$enableval + enableval=$enable_framework; enable_framework=$enableval else enable_framework=no -fi; +fi + if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 @@ -18929,16 +18788,16 @@ echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is availa fi fi if test $enable_framework = yes; then - echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6 + { echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6 + { echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6; } else - echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6 + { echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18950,7 +18809,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi @@ -18963,7 +18822,7 @@ _ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -19141,7 +19000,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} - ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" +ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -19161,39 +19020,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -19202,52 +19080,36 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` @@ -19276,17 +19138,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -19296,8 +19186,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -19311,18 +19236,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -19330,159 +19256,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -19491,7 +19378,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -19500,31 +19408,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19532,30 +19423,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -19563,7 +19443,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -19577,18 +19457,20 @@ Configuration commands: $config_commands Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -19599,60 +19481,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -19668,41 +19532,53 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - VERSION=${TCL_VERSION} _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; - "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + case $ac_config_target in + "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -19713,377 +19589,485 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@MAN_FLAGS@,$MAN_FLAGS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@ZLIB_DIR@,$ZLIB_DIR,;t t -s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t -s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t -s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@AR@,$AR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@TCL_LIBS@,$TCL_LIBS,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@DL_OBJS@,$DL_OBJS,;t t -s,@PLAT_OBJS@,$PLAT_OBJS,;t t -s,@PLAT_SRCS@,$PLAT_SRCS,;t t -s,@LDAIX_SRC@,$LDAIX_SRC,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t -s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t -s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t -s,@INSTALL_LIB@,$INSTALL_LIB,;t t -s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t -s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@DTRACE@,$DTRACE,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_YEAR@,$TCL_YEAR,;t t -s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t -s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t -s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t -s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t -s,@DTRACE_SRC@,$DTRACE_SRC,;t t -s,@DTRACE_HDR@,$DTRACE_HDR,;t t -s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t -s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t -s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t -s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t -s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t -s,@HTML_DIR@,$HTML_DIR,;t t -s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t -s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t -s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t -s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t -s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t -s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t -s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t -s,@DLTEST_LD@,$DLTEST_LD,;t t -s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +MAN_FLAGS!$MAN_FLAGS$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +ZLIB_DIR!$ZLIB_DIR$ac_delim +ZLIB_OBJS!$ZLIB_OBJS$ac_delim +ZLIB_SRCS!$ZLIB_SRCS$ac_delim +ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +TCL_LIBS!$TCL_LIBS$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +DL_OBJS!$DL_OBJS$ac_delim +PLAT_OBJS!$PLAT_OBJS$ac_delim +PLAT_SRCS!$PLAT_SRCS$ac_delim +LDAIX_SRC!$LDAIX_SRC$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim +LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim +TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim +INSTALL_LIB!$INSTALL_LIB$ac_delim +DLL_INSTALL_DIR!$DLL_INSTALL_DIR$ac_delim +INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +DTRACE!$DTRACE$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +TCL_YEAR!$TCL_YEAR$ac_delim +PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim +TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim +TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim +INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim +DTRACE_SRC!$DTRACE_SRC$ac_delim +DTRACE_HDR!$DTRACE_HDR$ac_delim +DTRACE_OBJ!$DTRACE_OBJ$ac_delim +MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim +BUILD_DLTEST!$BUILD_DLTEST$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim +TCL_LIBRARY!$TCL_LIBRARY$ac_delim +PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim +HTML_DIR!$HTML_DIR$ac_delim +PACKAGE_DIR!$PACKAGE_DIR$ac_delim +EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim +EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim +EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim +EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim +EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim +EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim +DLTEST_LD!$DLTEST_LD$ac_delim +DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 37; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -20091,152 +20075,52 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - Tcl.framework ) n=Tcl && + case $ac_file$ac_mode in + "Tcl.framework":C) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/win/configure b/win/configure index 7561a2a..7a02af5 100755 --- a/win/configure +++ b/win/configure @@ -1,25 +1,54 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.61. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,8 +58,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +108,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +128,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +518,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -275,42 +580,186 @@ ac_unique_file="../generic/tcl.h" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +AR +RANLIB +RC +SET_MAKE +TCL_THREADS +CYGPATH +CELIB_DIR +DL_LIBS +CFLAGS_DEBUG +CFLAGS_OPTIMIZE +CFLAGS_WARNING +ZLIB_DLL_FILE +ZLIB_LIBS +ZLIB_OBJS +CFLAGS_DEFAULT +LDFLAGS_DEFAULT +TCL_VERSION +TCL_MAJOR_VERSION +TCL_MINOR_VERSION +TCL_PATCH_LEVEL +PKG_CFG_ARGS +TCL_LIB_FILE +TCL_LIB_FLAG +TCL_STATIC_LIB_FILE +TCL_STATIC_LIB_FLAG +TCL_IMPORT_LIB_FILE +TCL_IMPORT_LIB_FLAG +TCL_LIB_SPEC +TCL_STUB_LIB_FILE +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_PATH +TCL_INCLUDE_SPEC +TCL_BUILD_STUB_LIB_SPEC +TCL_BUILD_STUB_LIB_PATH +TCL_DLL_FILE +TCL_SRC_DIR +TCL_BIN_DIR +TCL_DBGX +CFG_TCL_SHARED_LIB_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_EXPORT_FILE_SUFFIX +EXTRA_CFLAGS +DEPARG +CC_OBJNAME +CC_EXENAME +LDFLAGS_DEBUG +LDFLAGS_OPTIMIZE +LDFLAGS_CONSOLE +LDFLAGS_WINDOW +STLIB_LD +SHLIB_LD +SHLIB_LD_LIBS +SHLIB_CFLAGS +SHLIB_SUFFIX +TCL_SHARED_BUILD +LIBS_GUI +DLLSUFFIX +LIBPREFIX +LIBSUFFIX +EXESUFFIX +LIBRARIES +MAKE_LIB +POST_MAKE_LIB +MAKE_DLL +MAKE_EXE +TCL_BUILD_LIB_SPEC +TCL_LD_SEARCH_FLAGS +TCL_NEEDS_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_EXP_FILE +TCL_LIB_VERSIONS_OK +TCL_PACKAGE_PATH +TCL_DDE_VERSION +TCL_DDE_MAJOR_VERSION +TCL_DDE_MINOR_VERSION +TCL_DDE_PATCH_LEVEL +TCL_REG_VERSION +TCL_REG_MAJOR_VERSION +TCL_REG_MINOR_VERSION +TCL_REG_PATCH_LEVEL +RC_OUT +RC_TYPE +RC_INCLUDE +RC_DEFINE +RC_DEFINES +RES +LIBOBJS +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -337,34 +786,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -386,33 +849,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -439,6 +914,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -463,13 +944,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -534,6 +1018,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -586,24 +1080,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -634,8 +1124,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -655,27 +1144,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -702,74 +1183,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -798,9 +1281,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -818,15 +1298,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -857,126 +1344,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -995,7 +1451,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1009,6 +1465,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1030,7 +1487,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1041,7 +1497,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1063,9 +1519,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1076,8 +1530,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1090,20 +1544,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1114,22 +1582,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1141,26 +1615,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1191,14 +1663,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1214,8 +1689,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1227,12 +1702,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1257,8 +1731,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1275,12 +1748,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1297,6 +1764,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1357,8 +1829,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1371,32 +1843,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1409,36 +1883,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1451,74 +1940,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1532,7 +1981,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1543,6 +1992,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1560,22 +2010,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1588,36 +2039,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1630,29 +2083,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1665,21 +2134,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1704,47 +2187,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1756,19 +2269,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1787,22 +2302,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -1813,9 +2333,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -1829,14 +2348,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1856,14 +2375,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -1881,12 +2406,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1909,50 +2434,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -1968,38 +2492,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2015,12 +2619,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2054,12 +2658,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2074,266 +2683,116 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifndef __cplusplus - choke me +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif + _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -2356,8 +2815,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2391,24 +2850,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2417,9 +2874,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2429,24 +2887,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2457,6 +2913,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2474,8 +2931,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2498,24 +2955,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2524,9 +2979,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2536,24 +2992,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2564,6 +3018,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2586,23 +3041,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2626,35 +3228,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2710,6 +3308,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2729,18 +3328,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2753,12 +3361,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2778,8 +3388,8 @@ fi if test "${GCC}" = "yes" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2792,29 +3402,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2827,29 +3439,31 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2862,26 +3476,28 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RC="windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then - echo "$as_me:$LINENO: result: $RC" >&5 -echo "${ECHO_T}$RC" >&6 + { echo "$as_me:$LINENO: result: $RC" >&5 +echo "${ECHO_T}$RC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test "${AR}" = "" ; then { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;} @@ -2903,32 +3519,33 @@ fi # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2938,8 +3555,8 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 -echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 +echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6; } if test "${tcl_cv_seh+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2970,13 +3587,22 @@ int main(int argc, char** argv) { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2989,12 +3615,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) tcl_cv_seh=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 -echo "${ECHO_T}$tcl_cv_seh" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 +echo "${ECHO_T}$tcl_cv_seh" >&6; } if test "$tcl_cv_seh" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3009,8 +3637,8 @@ fi # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # -echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 -echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 +echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6; } if test "${tcl_cv_eh_disposition+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3036,39 +3664,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_eh_disposition=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_eh_disposition=no + tcl_cv_eh_disposition=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 -echo "${ECHO_T}$tcl_cv_eh_disposition" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 +echo "${ECHO_T}$tcl_cv_eh_disposition" >&6; } if test "$tcl_cv_eh_disposition" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3081,8 +3705,8 @@ fi # Check to see if the winsock2.h include file provided contains # typedefs like LPFN_ACCEPT and friends. # -echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 -echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 +echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6; } if test "${tcl_cv_lpfn_decls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3109,39 +3733,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_lpfn_decls=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_lpfn_decls=no + tcl_cv_lpfn_decls=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 -echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 +echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6; } if test "$tcl_cv_lpfn_decls" = "no" ; then cat >>confdefs.h <<\_ACEOF @@ -3154,8 +3774,8 @@ fi # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. -echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 -echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 +echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6; } if test "${tcl_cv_winnt_ignore_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3184,39 +3804,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_winnt_ignore_void=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_winnt_ignore_void=no + tcl_cv_winnt_ignore_void=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 -echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 +echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6; } if test "$tcl_cv_winnt_ignore_void" = "yes" ; then cat >>confdefs.h <<\_ACEOF @@ -3235,8 +3851,8 @@ fi # register and not on the stack. Instead, we just # call it from inline asm code. -echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 -echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 +echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6; } if test "${tcl_cv_malloc_decl_alloca+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3263,39 +3879,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_malloc_decl_alloca=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_malloc_decl_alloca=no + tcl_cv_malloc_decl_alloca=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 -echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 +echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6; } if test "$tcl_cv_malloc_decl_alloca" = "no" && test "${GCC}" = "yes" ; then @@ -3309,8 +3921,8 @@ fi # This is used to stop gcc from printing a compiler # warning when initializing a union member. -echo "$as_me:$LINENO: checking for cast to union support" >&5 -echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for cast to union support" >&5 +echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6; } if test "${tcl_cv_cast_to_union+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3333,39 +3945,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_cast_to_union=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_cast_to_union=no + tcl_cv_cast_to_union=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 -echo "${ECHO_T}$tcl_cv_cast_to_union" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 +echo "${ECHO_T}$tcl_cv_cast_to_union" >&6; } if test "$tcl_cv_cast_to_union" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -3379,8 +3987,8 @@ fi # missing from winbase.h. This is known to be # a problem with VC++ 5.2. -echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 -echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 +echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6; } if test "${tcl_cv_findex_enums+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3407,39 +4015,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_findex_enums=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_findex_enums=no + tcl_cv_findex_enums=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 -echo "${ECHO_T}$tcl_cv_findex_enums" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 +echo "${ECHO_T}$tcl_cv_findex_enums" >&6; } if test "$tcl_cv_findex_enums" = "no"; then cat >>confdefs.h <<\_ACEOF @@ -3451,8 +4055,8 @@ fi # See if MWMO_ALERTABLE is missing from winuser.h # This is known to be a problem with Mingw. -echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 -echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 +echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6; } if test "${tcl_cv_mwmo_alertable+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3478,39 +4082,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then tcl_cv_mwmo_alertable=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_cv_mwmo_alertable=no + tcl_cv_mwmo_alertable=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 -echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6 +{ echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 +echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6; } if test "$tcl_cv_mwmo_alertable" = "no"; then cat >>confdefs.h <<\_ACEOF @@ -3531,19 +4131,19 @@ fi #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 - # Check whether --enable-threads or --disable-threads was given. + { echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval + enableval=$enable_threads; tcl_ok=$enableval else - tcl_ok=no -fi; + tcl_ok=yes +fi + if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } TCL_THREADS=1 cat >>confdefs.h <<\_ACEOF #define TCL_THREADS 1 @@ -3557,8 +4157,8 @@ _ACEOF else TCL_THREADS=0 - echo "$as_me:$LINENO: result: no (default)" >&5 -echo "${ECHO_T}no (default)" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3569,11 +4169,11 @@ echo "${ECHO_T}no (default)" >&6 -# Check whether --with-encoding or --without-encoding was given. +# Check whether --with-encoding was given. if test "${with_encoding+set}" = set; then - withval="$with_encoding" - with_tcencoding=${withval} -fi; + withval=$with_encoding; with_tcencoding=${withval} +fi + if test x"${with_tcencoding}" != x ; then cat >>confdefs.h <<_ACEOF @@ -3595,15 +4195,15 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 - # Check whether --enable-shared or --disable-shared was given. + { echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval + enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes -fi; +fi + if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -3613,12 +4213,12 @@ fi; fi if test "$tcl_ok" = "yes" ; then - echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6 + { echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6; } SHARED_BUILD=1 else - echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6 + { echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6; } SHARED_BUILD=0 cat >>confdefs.h <<\_ACEOF #define STATIC_BUILD 1 @@ -3647,9 +4247,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3663,38 +4263,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3709,52 +4306,52 @@ done # Step 0: Enable 64 bit support? - echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 - # Check whether --enable-64bit or --disable-64bit was given. + { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval + enableval=$enable_64bit; do64bit=$enableval else do64bit=no -fi; - echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6 +fi + + { echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6; } # Cross-compiling options for Windows/CE builds - echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 -echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6 - # Check whether --enable-wince or --disable-wince was given. + { echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 +echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; } + # Check whether --enable-wince was given. if test "${enable_wince+set}" = set; then - enableval="$enable_wince" - doWince=$enableval + enableval=$enable_wince; doWince=$enableval else doWince=no -fi; - echo "$as_me:$LINENO: result: $doWince" >&5 -echo "${ECHO_T}$doWince" >&6 +fi + + { echo "$as_me:$LINENO: result: $doWince" >&5 +echo "${ECHO_T}$doWince" >&6; } - echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 -echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 +echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; } -# Check whether --with-celib or --without-celib was given. +# Check whether --with-celib was given. if test "${with_celib+set}" = set; then - withval="$with_celib" - CELIB_DIR=$withval + withval=$with_celib; CELIB_DIR=$withval else CELIB_DIR=NO_CELIB -fi; - echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 -echo "${ECHO_T}$CELIB_DIR" >&6 +fi + + { echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 +echo "${ECHO_T}$CELIB_DIR" >&6; } # Set some defaults (may get changed below) EXTRA_CFLAGS="" # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CYGPATH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3767,27 +4364,29 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CYGPATH="cygpath -w" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" fi fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then - echo "$as_me:$LINENO: result: $CYGPATH" >&5 -echo "${ECHO_T}$CYGPATH" >&6 + { echo "$as_me:$LINENO: result: $CYGPATH" >&5 +echo "${ECHO_T}$CYGPATH" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + SHLIB_SUFFIX=".dll" # Check for a bug in gcc's windres that causes the @@ -3803,8 +4402,8 @@ fi echo "101 \"name\"" >> $conftest echo "END" >> $conftest - echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 -echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 +echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6; } cyg_conftest=`$CYGPATH $conftest` if { ac_try='$RC -o conftest.res.o $cyg_conftest' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 @@ -3812,19 +4411,19 @@ echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } ; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } CYGPATH=echo fi conftest= cyg_conftest= fi - echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 -echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 +echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6; } if test "${ac_cv_cygwin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3848,39 +4447,35 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_cygwin=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_cygwin=yes + ac_cv_cygwin=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 -echo "${ECHO_T}$ac_cv_cygwin" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 +echo "${ECHO_T}$ac_cv_cygwin" >&6; } if test "$ac_cv_cygwin" = "yes" ; then { echo "$as_me:$LINENO: WARNING: Compiling under Cygwin is not currently supported. If you are not sure you want this, see the README @@ -3897,8 +4492,8 @@ file for information about building with Mingw." >&2;} # set various compiler flags depending on whether we are using gcc or cl - echo "$as_me:$LINENO: checking compiler flags" >&5 -echo $ECHO_N "checking compiler flags... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking compiler flags" >&5 +echo $ECHO_N "checking compiler flags... $ECHO_C" >&6; } if test "${GCC}" = "yes" ; then if test "$do64bit" != "no" ; then { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on Windows" >&5 @@ -3940,15 +4535,15 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} if test "${SHARED_BUILD}" = "0" ; then # static - echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6 + { echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6; } runtime= LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else # dynamic - echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6 + { echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6; } # ad-hoc check to see if CC supports -shared. if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then @@ -4013,15 +4608,15 @@ echo "$as_me: error: ${CC} does not support the -shared option. else if test "${SHARED_BUILD}" = "0" ; then # static - echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6 + { echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6; } runtime=-MT LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else # dynamic - echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6 + { echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6; } runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. LIBRARIES="\${SHARED_LIBRARIES}" @@ -4063,8 +4658,8 @@ echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} do64bit="no" else - echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 -echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 + { echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 +echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6; } fi fi @@ -4075,8 +4670,8 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 # TEA_PATH_NOSPACE to avoid this issue. # Check if _WIN64 is already recognized, and if so we don't # need to modify CC. - echo "$as_me:$LINENO: checking whether _WIN64 is declared" >&5 -echo $ECHO_N "checking whether _WIN64 is declared... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether _WIN64 is declared" >&5 +echo $ECHO_N "checking whether _WIN64 is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl__WIN64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4091,7 +4686,7 @@ int main () { #ifndef _WIN64 - char *p = (char *) _WIN64; + (void) _WIN64; #endif ; @@ -4099,38 +4694,34 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_have_decl__WIN64=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl__WIN64=no + ac_cv_have_decl__WIN64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl__WIN64" >&5 -echo "${ECHO_T}$ac_cv_have_decl__WIN64" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__WIN64" >&5 +echo "${ECHO_T}$ac_cv_have_decl__WIN64" >&6; } if test $ac_cv_have_decl__WIN64 = yes; then : else @@ -4368,22 +4959,22 @@ _ACEOF #-------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 - # Check whether --enable-symbols or --disable-symbols was given. + { echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then - enableval="$enable_symbols" - tcl_ok=$enableval + enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no -fi; +fi + # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define TCL_CFG_OPTIMIZED 1 @@ -4394,8 +4985,8 @@ _ACEOF LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' DBGX=g if test "$tcl_ok" = "yes"; then - echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6 + { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6; } fi fi @@ -4425,11 +5016,11 @@ _ACEOF if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } else - echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } fi fi @@ -4604,7 +5195,8 @@ fi - ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" +ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -4623,39 +5215,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -4664,63 +5275,48 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -4751,17 +5347,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -4771,8 +5395,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -4786,18 +5445,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -4805,159 +5465,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -4966,7 +5587,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -4975,31 +5617,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5007,30 +5632,18 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -5038,7 +5651,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -5049,18 +5662,20 @@ Configuration files: $config_files Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -5071,60 +5686,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -5140,30 +5737,44 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 - - - +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; - "tcl.hpj" ) CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; + "tcl.hpj") CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -5173,378 +5784,487 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@AR@,$AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@RC@,$RC,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@TCL_THREADS@,$TCL_THREADS,;t t -s,@CYGPATH@,$CYGPATH,;t t -s,@CELIB_DIR@,$CELIB_DIR,;t t -s,@DL_LIBS@,$DL_LIBS,;t t -s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t -s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t -s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t -s,@ZLIB_DLL_FILE@,$ZLIB_DLL_FILE,;t t -s,@ZLIB_LIBS@,$ZLIB_LIBS,;t t -s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t -s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t -s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t -s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t -s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t -s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t -s,@TCL_STATIC_LIB_FILE@,$TCL_STATIC_LIB_FILE,;t t -s,@TCL_STATIC_LIB_FLAG@,$TCL_STATIC_LIB_FLAG,;t t -s,@TCL_IMPORT_LIB_FILE@,$TCL_IMPORT_LIB_FILE,;t t -s,@TCL_IMPORT_LIB_FLAG@,$TCL_IMPORT_LIB_FLAG,;t t -s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t -s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t -s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t -s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t -s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t -s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t -s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t -s,@TCL_DLL_FILE@,$TCL_DLL_FILE,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t -s,@TCL_DBGX@,$TCL_DBGX,;t t -s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t -s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t -s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t -s,@DEPARG@,$DEPARG,;t t -s,@CC_OBJNAME@,$CC_OBJNAME,;t t -s,@CC_EXENAME@,$CC_EXENAME,;t t -s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t -s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t -s,@LDFLAGS_CONSOLE@,$LDFLAGS_CONSOLE,;t t -s,@LDFLAGS_WINDOW@,$LDFLAGS_WINDOW,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t -s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t -s,@LIBS_GUI@,$LIBS_GUI,;t t -s,@DLLSUFFIX@,$DLLSUFFIX,;t t -s,@LIBPREFIX@,$LIBPREFIX,;t t -s,@LIBSUFFIX@,$LIBSUFFIX,;t t -s,@EXESUFFIX@,$EXESUFFIX,;t t -s,@LIBRARIES@,$LIBRARIES,;t t -s,@MAKE_LIB@,$MAKE_LIB,;t t -s,@POST_MAKE_LIB@,$POST_MAKE_LIB,;t t -s,@MAKE_DLL@,$MAKE_DLL,;t t -s,@MAKE_EXE@,$MAKE_EXE,;t t -s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t -s,@TCL_LD_SEARCH_FLAGS@,$TCL_LD_SEARCH_FLAGS,;t t -s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t -s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t -s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t -s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t -s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t -s,@TCL_DDE_VERSION@,$TCL_DDE_VERSION,;t t -s,@TCL_DDE_MAJOR_VERSION@,$TCL_DDE_MAJOR_VERSION,;t t -s,@TCL_DDE_MINOR_VERSION@,$TCL_DDE_MINOR_VERSION,;t t -s,@TCL_DDE_PATCH_LEVEL@,$TCL_DDE_PATCH_LEVEL,;t t -s,@TCL_REG_VERSION@,$TCL_REG_VERSION,;t t -s,@TCL_REG_MAJOR_VERSION@,$TCL_REG_MAJOR_VERSION,;t t -s,@TCL_REG_MINOR_VERSION@,$TCL_REG_MINOR_VERSION,;t t -s,@TCL_REG_PATCH_LEVEL@,$TCL_REG_PATCH_LEVEL,;t t -s,@RC_OUT@,$RC_OUT,;t t -s,@RC_TYPE@,$RC_TYPE,;t t -s,@RC_INCLUDE@,$RC_INCLUDE,;t t -s,@RC_DEFINE@,$RC_DEFINE,;t t -s,@RC_DEFINES@,$RC_DEFINES,;t t -s,@RES@,$RES,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF +if test -n "$CONFIG_FILES"; then _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +RC!$RC$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +TCL_THREADS!$TCL_THREADS$ac_delim +CYGPATH!$CYGPATH$ac_delim +CELIB_DIR!$CELIB_DIR$ac_delim +DL_LIBS!$DL_LIBS$ac_delim +CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim +CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim +CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim +ZLIB_DLL_FILE!$ZLIB_DLL_FILE$ac_delim +ZLIB_LIBS!$ZLIB_LIBS$ac_delim +ZLIB_OBJS!$ZLIB_OBJS$ac_delim +CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim +LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim +TCL_VERSION!$TCL_VERSION$ac_delim +TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim +TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim +TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim +PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim +TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim +TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim +TCL_STATIC_LIB_FILE!$TCL_STATIC_LIB_FILE$ac_delim +TCL_STATIC_LIB_FLAG!$TCL_STATIC_LIB_FLAG$ac_delim +TCL_IMPORT_LIB_FILE!$TCL_IMPORT_LIB_FILE$ac_delim +TCL_IMPORT_LIB_FLAG!$TCL_IMPORT_LIB_FLAG$ac_delim +TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim +TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim +TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim +TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim +TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim +TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim +TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim +TCL_DLL_FILE!$TCL_DLL_FILE$ac_delim +TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim +TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim +TCL_DBGX!$TCL_DBGX$ac_delim +CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim +CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim +CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim +EXTRA_CFLAGS!$EXTRA_CFLAGS$ac_delim +DEPARG!$DEPARG$ac_delim +CC_OBJNAME!$CC_OBJNAME$ac_delim +CC_EXENAME!$CC_EXENAME$ac_delim +LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim +LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim +LDFLAGS_CONSOLE!$LDFLAGS_CONSOLE$ac_delim +LDFLAGS_WINDOW!$LDFLAGS_WINDOW$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +STLIB_LD!$STLIB_LD$ac_delim +SHLIB_LD!$SHLIB_LD$ac_delim +SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim +SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim +SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim +TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim +LIBS_GUI!$LIBS_GUI$ac_delim +DLLSUFFIX!$DLLSUFFIX$ac_delim +LIBPREFIX!$LIBPREFIX$ac_delim +LIBSUFFIX!$LIBSUFFIX$ac_delim +EXESUFFIX!$EXESUFFIX$ac_delim +LIBRARIES!$LIBRARIES$ac_delim +MAKE_LIB!$MAKE_LIB$ac_delim +POST_MAKE_LIB!$POST_MAKE_LIB$ac_delim +MAKE_DLL!$MAKE_DLL$ac_delim +MAKE_EXE!$MAKE_EXE$ac_delim +TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim +TCL_LD_SEARCH_FLAGS!$TCL_LD_SEARCH_FLAGS$ac_delim +TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim +TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim +TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim +TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim +TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim +TCL_DDE_VERSION!$TCL_DDE_VERSION$ac_delim +TCL_DDE_MAJOR_VERSION!$TCL_DDE_MAJOR_VERSION$ac_delim +TCL_DDE_MINOR_VERSION!$TCL_DDE_MINOR_VERSION$ac_delim +TCL_DDE_PATCH_LEVEL!$TCL_DDE_PATCH_LEVEL$ac_delim +TCL_REG_VERSION!$TCL_REG_VERSION$ac_delim +TCL_REG_MAJOR_VERSION!$TCL_REG_MAJOR_VERSION$ac_delim +TCL_REG_MINOR_VERSION!$TCL_REG_MINOR_VERSION$ac_delim +TCL_REG_PATCH_LEVEL!$TCL_REG_PATCH_LEVEL$ac_delim +RC_OUT!$RC_OUT$ac_delim +RC_TYPE!$RC_TYPE$ac_delim +RC_INCLUDE!$RC_INCLUDE$ac_delim +RC_DEFINE!$RC_DEFINE$ac_delim +RC_DEFINES!$RC_DEFINES$ac_delim +RES!$RES$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 39; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -5552,28 +6272,39 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF + + esac + +done # for ac_tag + { (exit 0); exit 0; } _ACEOF -- cgit v0.12 From 068f40511f242f8ead57c0dca5f00b0eba4b6309 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 5 Apr 2010 19:44:44 +0000 Subject: TIP #348 IMPLEMENTATION - Substituted error stack --- ChangeLog | 19 ++++++++++++ doc/catch.n | 48 ++++++++++++++++++++----------- doc/info.n | 12 +++++++- doc/return.n | 18 +++++++++++- generic/tclBasic.c | 15 +++++++++- generic/tclCmdIL.c | 57 +++++++++++++++++++++++++++++++++++- generic/tclInt.h | 6 +++- generic/tclNamesp.c | 43 ++++++++++++++++++++++++++- generic/tclResult.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++-- tests/cmdMZ.test | 12 +++++--- tests/error.test | 24 +++++++++++++++- tests/execute.test | 6 ++-- tests/info.test | 10 +++---- tests/init.test | 4 +-- tests/result.test | 8 ++++++ 15 files changed, 325 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f2019e..952da2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2010-04-05 Alexandre Ferrieux + + TIP #348 IMPLEMENTATION - Substituted error stack + + * generic/tclBasic.c + * generic/tclCmdIL.c + * generic/tclInt.h + * generic/tclNamesp.c + * generic/tclResult.c + * doc/catch.n + * doc/info.n + * doc/return.n + * tests/cmdMZ.test + * tests/error.test + * tests/execute.test + * tests/info.test + * tests/init.test + * tests/result.test + 2010-04-05 Donal K. Fellows * unix/tcl.m4 (SC_ENABLE_THREADS): Flip the default for whether to diff --git a/doc/catch.n b/doc/catch.n index a21fabd..1efb082 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.23 2010/01/13 12:08:30 dkf Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.24 2010/04/05 19:44:45 ferrieux Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -54,22 +54,36 @@ Only when the return code is \fBTCL_RETURN\fR will the values of the \fB\-level\fR and \fB\-code\fR entries be something else, as further described in the documentation for the \fBreturn\fR command. .PP -When the return code from evaluation of \fIscript\fR is \fBTCL_ERROR\fR, -three additional entries are defined in the dictionary of return options -stored in \fIoptionsVarName\fR: \fB\-errorinfo\fR, \fB\-errorcode\fR, -and \fB\-errorline\fR. The value of the \fB\-errorinfo\fR entry -is a formatted stack trace containing more information about -the context in which the error happened. The formatted stack -trace is meant to be read by a person. The value of -the \fB\-errorcode\fR entry is additional information about the -error stored as a list. The \fB\-errorcode\fR value is meant to -be further processed by programs, and may not be particularly -readable by people. The value of the \fB\-errorline\fR entry -is an integer indicating which line of \fIscript\fR was being -evaluated when the error occurred. The values of the \fB\-errorinfo\fR -and \fB\-errorcode\fR entries of the most recent error are also -available as values of the global variables \fB::errorInfo\fR -and \fB::errorCode\fR respectively. +When the return code from evaluation of \fIscript\fR is +\fBTCL_ERROR\fR, four additional entries are defined in the dictionary +of return options stored in \fIoptionsVarName\fR: \fB\-errorinfo\fR, +\fB\-errorcode\fR, \fB\-errorline\fR, and \fB\-errorstack\fR. The +value of the \fB\-errorinfo\fR entry is a formatted stack trace +containing more information about the context in which the error +happened. The formatted stack trace is meant to be read by a person. +The value of the \fB\-errorcode\fR entry is additional information +about the error stored as a list. The \fB\-errorcode\fR value is +meant to be further processed by programs, and may not be particularly +readable by people. The value of the \fB\-errorline\fR entry is an +integer indicating which line of \fIscript\fR was being evaluated when +the error occurred. The value of the \fB\-errorstack\fR entry is an +even-sized list made of token-parameter pairs accumulated while +unwinding the stack. The token may be "CALL", in which case the +parameter is a list made of the proc name and arguments at the +corresponding level; or it may be "UP", in which case the parameter is +the relative [uplevel] of the previous CALL. The salient differences +wrt -errorinfo are that (1) it is a machine-readable form amenable to +[foreach {tok prm} ...], (2) it contains the true (substituted) values +passed to the functions, instead of the static text of the calling +sites, and (3) it is coarser-grained, with only one element per stack +frame (like procs; no separate elements for [foreach] constructs for +example). + +The values of the \fB\-errorinfo\fR and \fB\-errorcode\fR entries of +the most recent error are also available as values of the global +variables \fB::errorInfo\fR and \fB::errorCode\fR respectively. The +value of the \fB\-errorstack\fR entry surfaces as \fBinfo +errorstack\fR. .PP Tcl packages may provide commands that set other entries in the dictionary of return options, and the \fBreturn\fR command may be diff --git a/doc/info.n b/doc/info.n index 246b83f..3076274 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.36 2010/03/24 13:21:11 dkf Exp $ +'\" RCS: @(#) $Id: info.n,v 1.37 2010/04/05 19:44:45 ferrieux Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -94,6 +94,16 @@ does not have a default value then the command returns \fB0\fR. Otherwise it returns \fB1\fR and places the default value of \fIarg\fR into variable \fIvarname\fR. .TP +\fBinfo errorstack \fR?\fIinterp\fR? +. +Returns a list of lists made of the function names and arguments at +each level from the call stack of the last error in the given +\fIinterp\fR, or in the current one if not specified. This +information is also present in the -errorstack entry of the options +dictionary returned by 3-arg \fBcatch\fR; \fBinfo errorstack\fR is a +convenient way of retrieving it for uncaught errors at toplevel in an +interactive tclsh. +.TP \fBinfo exists \fIvarName\fR . Returns \fB1\fR if the variable named \fIvarName\fR exists in the diff --git a/doc/return.n b/doc/return.n index 4f77135..8d0d96c 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.25 2010/01/20 13:42:17 dkf Exp $ +'\" RCS: @(#) $Id: return.n,v 1.26 2010/04/05 19:44:45 ferrieux Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -138,6 +138,22 @@ the value of \fB\-errorinfo\fR in a return options dictionary captured by the \fBcatch\fR command (or from the copy of that information stored in the global variable \fBerrorInfo\fR). .TP +\fB\-errorstack \fIlist\fR +. +The \fB\-errorstack\fR option receives special treatment only when the value +of the \fB\-code\fR option is \fBTCL_ERROR\fR. Then \fIlist\fR is the initial +error stack, recording actual argument values passed to each proc level. The error stack will +also be reachable through [info errorstack]. +If no \fB\-errorstack\fR option is provided to \fBreturn\fR when +the \fB\-code error\fR option is provided, Tcl will provide its own +initial error stack in the entry for \fB\-errorstack\fR. Tcl's +initial error stack will include only the call to the procedure, and +stack unwinding will append information about higher stack levels, but +there will be no information about the context of the error within +the procedure. Typically the \fIlist\fR value is supplied from +the value of \fB\-errorstack\fR in a return options dictionary captured +by the \fBcatch\fR command (or from the copy of that information from [info errorstack]). +.TP \fB\-level \fIlevel\fR . The \fB\-level\fR and \fB\-code\fR options work together to set the return diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 148baa4..ca2b045 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.449 2010/03/19 11:54:06 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.450 2010/04/05 19:44:45 ferrieux Exp $ */ #include "tclInt.h" @@ -529,6 +529,13 @@ Tcl_CreateInterp(void) iPtr->errorInfo = NULL; TclNewLiteralStringObj(iPtr->eiVar, "::errorInfo"); Tcl_IncrRefCount(iPtr->eiVar); + iPtr->errorStack = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(iPtr->errorStack); + iPtr->resetErrorStack = 1; + TclNewLiteralStringObj(iPtr->upLiteral,"UP"); + Tcl_IncrRefCount(iPtr->upLiteral); + TclNewLiteralStringObj(iPtr->callLiteral,"CALL"); + Tcl_IncrRefCount(iPtr->callLiteral); iPtr->errorCode = NULL; TclNewLiteralStringObj(iPtr->ecVar, "::errorCode"); Tcl_IncrRefCount(iPtr->ecVar); @@ -1467,6 +1474,10 @@ DeleteInterpProc( Tcl_DecrRefCount(iPtr->errorInfo); iPtr->errorInfo = NULL; } + Tcl_DecrRefCount(iPtr->errorStack); + iPtr->errorStack = NULL; + Tcl_DecrRefCount(iPtr->upLiteral); + Tcl_DecrRefCount(iPtr->callLiteral); if (iPtr->returnOpts) { Tcl_DecrRefCount(iPtr->returnOpts); } @@ -8943,5 +8954,7 @@ TclInfoCoroutineCmd( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index d063014..bdc6d2e 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.180 2010/03/05 14:34:03 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.181 2010/04/05 19:44:45 ferrieux Exp $ */ #include "tclInt.h" @@ -118,6 +118,9 @@ static int InfoCompleteCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int InfoDefaultCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +/* TIP #348 - New 'info' subcommand 'errorstack' */ +static int InfoErrorStackCmd(ClientData dummy, Tcl_Interp *interp, + int objc, Tcl_Obj *const objv[]); /* TIP #280 - New 'info' subcommand 'frame' */ static int InfoFrameCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -164,6 +167,7 @@ static const EnsembleImplMap defaultInfoMap[] = { {"complete", InfoCompleteCmd, NULL, NULL, NULL}, {"coroutine", TclInfoCoroutineCmd, NULL, NULL, NULL}, {"default", InfoDefaultCmd, NULL, NULL, NULL}, + {"errorstack", InfoErrorStackCmd, NULL, NULL, NULL}, {"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd, NULL, NULL}, {"frame", InfoFrameCmd, NULL, NULL, NULL}, {"functions", InfoFunctionsCmd, NULL, NULL, NULL}, @@ -1022,6 +1026,55 @@ InfoDefaultCmd( /* *---------------------------------------------------------------------- * + * InfoErrorStackCmd -- + * + * Called to implement the "info errorstack" command that returns information + * about the last error's call stack. Handles the following syntax: + * + * info errorstack ?interp? + * + * Results: + * Returns TCL_OK if successful and TCL_ERROR if there is an error. + * + * Side effects: + * Returns a result in the interpreter's result object. If there is an + * error, the result is an error message. + * + *---------------------------------------------------------------------- + */ + +static int +InfoErrorStackCmd( + ClientData dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_Interp *target; + Interp *iPtr; + + if ((objc != 1) && (objc != 2)) { + Tcl_WrongNumArgs(interp, 1, objv, "?interp?"); + return TCL_ERROR; + } + + target = interp; + if (objc == 2) { + target = Tcl_GetSlave(interp, Tcl_GetString(objv[1])); + if (target == NULL) { + return TCL_ERROR; + } + } + + iPtr = (Interp *) target; + Tcl_SetObjResult(interp, iPtr->errorStack); + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * TclInfoExistsCmd -- * * Called to implement the "info exists" command that determines whether @@ -4401,5 +4454,7 @@ SelectObjFromSublist( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/generic/tclInt.h b/generic/tclInt.h index 6c70fd2..047a823 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.467 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.468 2010/04/05 19:44:45 ferrieux Exp $ */ #ifndef _TCLINT @@ -1984,6 +1984,10 @@ typedef struct Interp { Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable. */ Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj). */ Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable. */ + Tcl_Obj *errorStack; /* [info errorstack] value (as a Tcl_Obj). */ + Tcl_Obj *upLiteral; /* "UP" literal for [info errorstack] */ + Tcl_Obj *callLiteral; /* "CALL" literal for [info errorstack] */ + int resetErrorStack; /* controls cleaning up of ::errorStack */ int returnLevel; /* [return -level] parameter. */ /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index e32e0ba..41032d1 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.204 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.205 2010/04/05 19:44:45 ferrieux Exp $ */ #include "tclInt.h" @@ -4932,6 +4932,45 @@ Tcl_LogCommandInfo( TCL_GLOBAL_ONLY); } } + + /* + * TIP #348 + */ + + if (Tcl_IsShared(iPtr->errorStack)) { + Tcl_Obj *newObj; + + newObj = Tcl_DuplicateObj(iPtr->errorStack); + Tcl_DecrRefCount(iPtr->errorStack); + Tcl_IncrRefCount(newObj); + iPtr->errorStack = newObj; + } + if (iPtr->resetErrorStack) { + int len; + + iPtr->resetErrorStack = 0; + Tcl_ListObjLength(interp, iPtr->errorStack, &len); + /* reset while keeping the list intrep as much as possible */ + Tcl_ListObjReplace(interp, iPtr->errorStack, 0, len, 0, NULL); + } + + if (iPtr->varFramePtr != iPtr->framePtr) { + /* uplevel case, [lappend errorstack UP $relativelevel] */ + struct CallFrame *frame; + int n; + + for (n=0, frame=iPtr->framePtr; + (frame && (frame != iPtr->varFramePtr)); + n++, frame=frame->callerVarPtr); + Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->upLiteral); + Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewIntObj(n)); + } else if (iPtr->framePtr != iPtr->rootFramePtr) { + /* normal case, [lappend errorstack CALL [info level 0]] */ + Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->callLiteral); + Tcl_ListObjAppendElement(NULL, iPtr->errorStack, + Tcl_NewListObj(iPtr->varFramePtr->objc, + iPtr->varFramePtr->objv)); + } } /* @@ -4939,5 +4978,7 @@ Tcl_LogCommandInfo( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/generic/tclResult.c b/generic/tclResult.c index 1fcdfba..07b50db 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclResult.c,v 1.60 2010/03/30 13:17:18 nijtmans Exp $ + * RCS: @(#) $Id: tclResult.c,v 1.61 2010/04/05 19:44:45 ferrieux Exp $ */ #include "tclInt.h" @@ -19,7 +19,7 @@ enum returnKeys { KEY_CODE, KEY_ERRORCODE, KEY_ERRORINFO, KEY_ERRORLINE, - KEY_LEVEL, KEY_OPTIONS, KEY_LAST + KEY_LEVEL, KEY_OPTIONS, KEY_ERRORSTACK, KEY_LAST }; /* @@ -46,6 +46,8 @@ typedef struct InterpState { Tcl_Obj *errorCode; Tcl_Obj *returnOpts; Tcl_Obj *objResult; + Tcl_Obj *errorStack; + int resetErrorStack; } InterpState; /* @@ -82,6 +84,8 @@ Tcl_SaveInterpState( statePtr->returnLevel = iPtr->returnLevel; statePtr->returnCode = iPtr->returnCode; statePtr->errorInfo = iPtr->errorInfo; + statePtr->errorStack = iPtr->errorStack; + statePtr->resetErrorStack = iPtr->resetErrorStack; if (statePtr->errorInfo) { Tcl_IncrRefCount(statePtr->errorInfo); } @@ -93,6 +97,9 @@ Tcl_SaveInterpState( if (statePtr->returnOpts) { Tcl_IncrRefCount(statePtr->returnOpts); } + if (statePtr->errorStack) { + Tcl_IncrRefCount(statePtr->errorStack); + } statePtr->objResult = Tcl_GetObjResult(interp); Tcl_IncrRefCount(statePtr->objResult); return (Tcl_InterpState) statePtr; @@ -130,6 +137,7 @@ Tcl_RestoreInterpState( iPtr->returnLevel = statePtr->returnLevel; iPtr->returnCode = statePtr->returnCode; + iPtr->resetErrorStack = statePtr->resetErrorStack; if (iPtr->errorInfo) { Tcl_DecrRefCount(iPtr->errorInfo); } @@ -144,6 +152,13 @@ Tcl_RestoreInterpState( if (iPtr->errorCode) { Tcl_IncrRefCount(iPtr->errorCode); } + if (iPtr->errorStack) { + Tcl_DecrRefCount(iPtr->errorStack); + } + iPtr->errorStack = statePtr->errorStack; + if (iPtr->errorStack) { + Tcl_IncrRefCount(iPtr->errorStack); + } if (iPtr->returnOpts) { Tcl_DecrRefCount(iPtr->returnOpts); } @@ -188,6 +203,9 @@ Tcl_DiscardInterpState( if (statePtr->returnOpts) { Tcl_DecrRefCount(statePtr->returnOpts); } + if (statePtr->errorStack) { + Tcl_DecrRefCount(statePtr->errorStack); + } Tcl_DecrRefCount(statePtr->objResult); ckfree((char *) statePtr); } @@ -924,6 +942,7 @@ Tcl_ResetResult( Tcl_DecrRefCount(iPtr->errorInfo); iPtr->errorInfo = NULL; } + iPtr->resetErrorStack = 1; iPtr->returnLevel = 1; iPtr->returnCode = TCL_OK; if (iPtr->returnOpts) { @@ -1161,6 +1180,7 @@ GetKeys(void) TclNewLiteralStringObj(keys[KEY_ERRORCODE], "-errorcode"); TclNewLiteralStringObj(keys[KEY_ERRORINFO], "-errorinfo"); TclNewLiteralStringObj(keys[KEY_ERRORLINE], "-errorline"); + TclNewLiteralStringObj(keys[KEY_ERRORSTACK],"-errorstack"); TclNewLiteralStringObj(keys[KEY_LEVEL], "-level"); TclNewLiteralStringObj(keys[KEY_OPTIONS], "-options"); @@ -1266,6 +1286,31 @@ TclProcessReturn( iPtr->flags |= ERR_ALREADY_LOGGED; } } + Tcl_DictObjGet(NULL, iPtr->returnOpts, keys[KEY_ERRORSTACK], &valuePtr); + if (valuePtr != NULL) { + int len, valueObjc; + Tcl_Obj **valueObjv; + + if (Tcl_IsShared(iPtr->errorStack)) { + Tcl_Obj *newObj; + + newObj = Tcl_DuplicateObj(iPtr->errorStack); + Tcl_DecrRefCount(iPtr->errorStack); + Tcl_IncrRefCount(newObj); + iPtr->errorStack = newObj; + } + /* + * List extraction done after duplication to avoid moving the rug + * if someone does [return -errorstack [info errorstack]] + */ + if (Tcl_ListObjGetElements(interp, valuePtr, &valueObjc, &valueObjv) == TCL_ERROR) { + return TCL_ERROR; + } + iPtr->resetErrorStack = 0; + Tcl_ListObjLength(interp, iPtr->errorStack, &len); + /* reset while keeping the list intrep as much as possible */ + Tcl_ListObjReplace(interp, iPtr->errorStack, 0, len, valueObjc, valueObjv); + } Tcl_DictObjGet(NULL, iPtr->returnOpts, keys[KEY_ERRORCODE], &valuePtr); if (valuePtr != NULL) { Tcl_SetObjErrorCode(interp, valuePtr); @@ -1429,6 +1474,37 @@ TclMergeReturnOptions( } /* + * Check for bogus -errorstack value. + */ + + Tcl_DictObjGet(NULL, returnOpts, keys[KEY_ERRORSTACK], &valuePtr); + if (valuePtr != NULL) { + int length; + + if (TCL_ERROR == Tcl_ListObjLength(NULL, valuePtr, &length )) { + /* + * Value is not a list, which is illegal for -errorstack. + */ + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "bad -errorstack value: " + "expected a list but got \"", + TclGetString(valuePtr), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "NONLIST_ERRORSTACK", NULL); + goto error; + } + if (length % 2) { + /* + * Errorstack must always be an even-sized list + */ + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "forbidden odd-sized list for -errorstack: \"", + TclGetString(valuePtr), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "RESULT", "ODDSIZEDLIST_ERRORSTACK", NULL); + goto error; + } + } + + /* * Convert [return -code return -level X] to [return -code ok -level X+1] */ @@ -1505,6 +1581,7 @@ Tcl_GetReturnOptions( if (result == TCL_ERROR) { Tcl_AddObjErrorInfo(interp, "", -1); + Tcl_DictObjPut(NULL, options, keys[KEY_ERRORSTACK], iPtr->errorStack); } if (iPtr->errorCode) { Tcl_DictObjPut(NULL, options, keys[KEY_ERRORCODE], iPtr->errorCode); @@ -1636,5 +1713,7 @@ Tcl_TransferResult( * mode: c * c-basic-offset: 4 * fill-column: 78 + * tab-width: 8 + * indent-tabs-mode: nil * End: */ diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index 0a86e42..c7f6e44 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdMZ.test,v 1.29 2010/03/31 10:29:22 nijtmans Exp $ +# RCS: @(#) $Id: cmdMZ.test,v 1.30 2010/04/05 19:44:45 ferrieux Exp $ if {[catch {package require tcltest 2.1}]} { puts stderr "Skipping tests in [info script]. tcltest 2.1 required." @@ -149,11 +149,11 @@ test cmdMZ-return-2.8 {return option handling} -body { test cmdMZ-return-2.9 {return option handling} -body { return -level 0 -code 10 } -returnCodes 10 -result {} -test cmdMZ-return-2.10 {return option handling} { +test cmdMZ-return-2.10 {return option handling} -body { list [catch {return -level 0 -code error} -> foo] [dictSort $foo] -} {1 {-code 1 -errorcode NONE -errorinfo { +} -match glob -result {1 {-code 1 -errorcode NONE -errorinfo { while executing -"return -level 0 -code error"} -errorline 1 -level 0}} +"return -level 0 -code error"} -errorline 1 -errorstack * -level 0}} test cmdMZ-return-2.11 {return option handling} { list [catch {return -level 0 -code break} -> foo] [dictSort $foo] } {3 {-code 3 -level 0}} @@ -193,6 +193,9 @@ test cmdMZ-return-2.17 {return opton handling} -setup { } -cleanup { rename p {} } -result {1 c {a b}} +test cmdMZ-return-2.18 {return option handling} { + list [catch {return -code error -errorstack [list CALL a CALL b] yo} -> foo] [dictSort $foo] [info errorstack] +} {2 {-code 1 -errorcode NONE -errorstack {CALL a CALL b} -level 1} {CALL a CALL b}} # Check that the result of a [return -options $opts $result] is # indistinguishable from that of the originally caught script, no matter what @@ -211,6 +214,7 @@ foreach {testid script} { cmdMZ-return-3.10 {return -code error -errorinfo foo} cmdMZ-return-3.11 {return -code error -errorinfo foo -errorcode bar} cmdMZ-return-3.12 {return -code error -errorinfo foo -errorcode bar -errorline 10} + cmdMZ-return-3.12.1 {return -code error -errorinfo foo -errorcode bar -errorline 10 -errorstack baz} cmdMZ-return-3.13 {return -options {x y z 2}} cmdMZ-return-3.14 {return -level 3 -code break sdf} } { diff --git a/tests/error.test b/tests/error.test index 623595c..ef09bc5 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.29 2010/03/31 10:29:22 nijtmans Exp $ +# RCS: @(#) $Id: error.test,v 1.30 2010/04/05 19:44:45 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -169,6 +169,19 @@ test error-4.5 {errorInfo and errorCode variables} { list [catch {error msg1 msg2 {}} msg] $msg $::errorInfo $::errorCode } {1 msg1 msg2 {}} +test error-4.6 {errorstack via info } -body { + proc f x {g $x$x} + proc g x {error G:$x} + catch {f 12} + info errorstack +} -match glob -result {CALL {g 1212} CALL {f 12} UP 1} +test error-4.7 {errorstack via options dict } -body { + proc f x {g $x$x} + proc g x {error G:$x} + catch {f 12} m d + dict get $d -errorstack +} -match glob -result {CALL {g 1212} CALL {f 12} UP 1} + # Errors in error command itself test error-5.1 {errors in error command} { @@ -223,6 +236,15 @@ test error-6.9 {catch must reset error state} { catch foo list $::errorCode } {NONE} +test error-6.10 {catch must reset errorstack} -body { + proc f x {g $x$x} + proc g x {error G:$x} + catch {f 12} + set e1 [info errorstack] + catch {f 13} + set e2 [info errorstack] + list $e1 $e2 +} -match glob -result {{CALL {g 1212} CALL {f 12} UP 1} {CALL {g 1313} CALL {f 13} UP 1}} test error-7.1 {Bug 1397843} -body { variable cmds diff --git a/tests/execute.test b/tests/execute.test index 87f835e..ce21040 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.34 2009/11/16 18:00:11 dgp Exp $ +# RCS: @(#) $Id: execute.test,v 1.35 2010/04/05 19:44:45 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -956,11 +956,11 @@ test execute-8.5 {Bug 2038069} -setup { demo } -cleanup { rename demo {} -} -result {-code 1 -level 0 -errorcode NONE -errorinfo {FOO +} -match glob -result {-code 1 -level 0 -errorstack * -errorcode NONE -errorinfo {FOO while executing "error FOO" invoked from within -"catch [list error FOO] m o"} -errorline 2} +"catch \[list error FOO\] m o"} -errorline 2} test execute-9.1 {Interp result resetting [Bug 1522803]} { set c 0 diff --git a/tests/info.test b/tests/info.test index 28fee2c..b25f4a6 100644 --- a/tests/info.test +++ b/tests/info.test @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: info.test,v 1.75 2010/02/10 23:24:25 dkf Exp $ +# RCS: @(#) $Id: info.test,v 1.76 2010/04/05 19:44:45 ferrieux Exp $ if {{::tcltest} ni [namespace children]} { package require tcltest 2 @@ -676,16 +676,16 @@ test info-21.1 {miscellaneous error conditions} -returnCodes error -body { } -result {wrong # args: should be "info subcommand ?arg ...?"} test info-21.2 {miscellaneous error conditions} -returnCodes error -body { info gorp -} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "gorp": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.3 {miscellaneous error conditions} -returnCodes error -body { info c -} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "c": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.4 {miscellaneous error conditions} -returnCodes error -body { info l -} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "l": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} test info-21.5 {miscellaneous error conditions} -returnCodes error -body { info s -} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} +} -result {unknown or ambiguous subcommand "s": must be args, body, class, cmdcount, commands, complete, coroutine, default, errorstack, exists, frame, functions, globals, hostname, level, library, loaded, locals, nameofexecutable, object, patchlevel, procs, script, sharedlibextension, tclversion, or vars} ## # ### ### ### ######### ######### ######### diff --git a/tests/init.test b/tests/init.test index 0a49472..9c16ee3 100644 --- a/tests/init.test +++ b/tests/init.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: init.test,v 1.21 2009/11/16 18:00:11 dgp Exp $ +# RCS: @(#) $Id: init.test,v 1.22 2010/04/05 19:44:45 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -181,7 +181,7 @@ test init-5.0 {return options passed through ::unknown} -setup { list $code $foo $bar $code2 $foo2 $bar2 } -cleanup { unset ::auto_index(::xxx) -} -result {2 xxx {-errorcode NONE -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE}} +} -match glob -result {2 xxx {-errorcode NONE -code 1 -level 1} 2 xxx {-code 1 -level 1 -errorcode NONE}} cleanupTests } ;# End of [interp eval $testInterp] diff --git a/tests/result.test b/tests/result.test index b2db8ec..8bde7ef 100644 --- a/tests/result.test +++ b/tests/result.test @@ -135,6 +135,14 @@ test result-6.3 {Bug 2383005} { catch {return -code error -errorcode {{}a} eek} m set m } {bad -errorcode value: expected a list but got "{}a"} +test result-6.4 {non-list -errorstack} { + catch {return -code error -errorstack {{}a} eek} m o + list $m [dict get $o -errorcode] [dict get $o -errorstack] +} {{bad -errorstack value: expected a list but got "{}a"} {TCL RESULT NONLIST_ERRORSTACK} {UP 1}} +test result-6.5 {odd-sized-list -errorstack} { + catch {return -code error -errorstack a eek} m o + list $m [dict get $o -errorcode] [dict get $o -errorstack] +} {{forbidden odd-sized list for -errorstack: "a"} {TCL RESULT ODDSIZEDLIST_ERRORSTACK} {UP 1}} # cleanup cleanupTests return -- cgit v0.12 From 69c7693180940219e1d636ee951cc98cf1ad9686 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Apr 2010 07:50:45 +0000 Subject: * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): Plug leak of object when setting a variable fails. --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 952da2a..572a3d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-06 Donal K. Fellows + + * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): Plug leak of object when + setting a variable fails. + 2010-04-05 Alexandre Ferrieux TIP #348 IMPLEMENTATION - Substituted error stack diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 618bb6b..e4298fc 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.210 2010/03/27 22:40:13 nijtmans Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.211 2010/04/06 07:50:45 dkf Exp $ */ #include "tclInt.h" @@ -391,6 +391,7 @@ Tcl_RegexpObjCmd( if (valuePtr == NULL) { Tcl_AppendResult(interp, "couldn't set variable \"", TclGetString(objv[i]), "\"", NULL); + Tcl_DecrRefCount(newPtr); return TCL_ERROR; } } -- cgit v0.12 From c108d1ac8a23ab5e463372710cbff40fe6047524 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Apr 2010 08:34:52 +0000 Subject: Undo --- ChangeLog | 5 ----- generic/tclCmdMZ.c | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 572a3d4..952da2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,3 @@ -2010-04-06 Donal K. Fellows - - * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): Plug leak of object when - setting a variable fails. - 2010-04-05 Alexandre Ferrieux TIP #348 IMPLEMENTATION - Substituted error stack diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index e4298fc..0cb172e 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.211 2010/04/06 07:50:45 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.212 2010/04/06 08:34:52 dkf Exp $ */ #include "tclInt.h" @@ -391,7 +391,6 @@ Tcl_RegexpObjCmd( if (valuePtr == NULL) { Tcl_AppendResult(interp, "couldn't set variable \"", TclGetString(objv[i]), "\"", NULL); - Tcl_DecrRefCount(newPtr); return TCL_ERROR; } } -- cgit v0.12 From 0409db88b9513c5287f06414eb45473405858fa3 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 6 Apr 2010 09:05:05 +0000 Subject: regenerated with autoconf-2.59 [Bug 2982540] configure and install* script files should always have LF --- ChangeLog | 7 + unix/configure | 18786 +++++++++++++++---------------------------------------- win/configure | 4529 ++++++-------- 3 files changed, 7175 insertions(+), 16147 deletions(-) diff --git a/ChangeLog b/ChangeLog index 952da2a..33b83f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-06 Jan Nijtmans + + * win/configure (regenerate with autoconf-2.59) + * unix/configure + * unix/installManPage [Bug 2982540] configure and install* script files + * unix/install-sh should always have LF + 2010-04-05 Alexandre Ferrieux TIP #348 IMPLEMENTATION - Substituted error stack diff --git a/unix/configure b/unix/configure index 818cf1e..dce95b1 100755 --- a/unix/configure +++ b/unix/configure @@ -1,60 +1,81 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for tcl 8.6. +# Generated by GNU Autoconf 2.64 for tcl 8.6. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -63,20 +84,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -87,32 +106,270 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi -done + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -126,13 +383,17 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -147,409 +408,123 @@ echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit } -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac -if as_func_ret_success; then - : +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi else - exitcode=1 - echo positional parameters were not saved. + as_ln_s='cp -p' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi +as_executable_p=$as_test_x +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -fi - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -exec 7<&0 &1 +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -567,7 +542,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='tcl' @@ -575,6 +549,7 @@ PACKAGE_TARNAME='tcl' PACKAGE_VERSION='8.6' PACKAGE_STRING='tcl 8.6' PACKAGE_BUGREPORT='' +PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ @@ -612,141 +587,162 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -MAN_FLAGS -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -TCL_THREADS -ZLIB_DIR -ZLIB_OBJS -ZLIB_SRCS -ZLIB_INCLUDE -RANLIB -AR -LIBOBJS -TCL_LIBS -DL_LIBS -DL_OBJS -PLAT_OBJS -PLAT_SRCS -LDAIX_SRC -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -CC_SEARCH_FLAGS -LD_SEARCH_FLAGS -STLIB_LD -SHLIB_LD -TCL_SHLIB_LD_EXTRAS -TK_SHLIB_LD_EXTRAS -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -MAKE_LIB -MAKE_STUB_LIB -INSTALL_LIB -DLL_INSTALL_DIR -INSTALL_STUB_LIB -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -DTRACE -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -TCL_YEAR -PKG_CFG_ARGS -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_SRC_DIR -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -TCL_SHARED_BUILD -LD_LIBRARY_PATH_VAR -TCL_BUILD_LIB_SPEC -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_SHARED_LIB_SUFFIX -TCL_UNSHARED_LIB_SUFFIX -TCL_HAS_LONGLONG -INSTALL_TZDATA -DTRACE_SRC -DTRACE_HDR -DTRACE_OBJ -MAKEFILE_SHELL -BUILD_DLTEST -TCL_PACKAGE_PATH -TCL_MODULE_PATH -TCL_LIBRARY -PRIVATE_INCLUDE_DIR -HTML_DIR -PACKAGE_DIR -EXTRA_CC_SWITCHES -EXTRA_APP_CC_SWITCHES -EXTRA_INSTALL -EXTRA_INSTALL_BINARIES -EXTRA_BUILD_HTML -EXTRA_TCLSH_LIBS +ac_subst_vars='DLTEST_SUFFIX DLTEST_LD -DLTEST_SUFFIX' +EXTRA_TCLSH_LIBS +EXTRA_BUILD_HTML +EXTRA_INSTALL_BINARIES +EXTRA_INSTALL +EXTRA_APP_CC_SWITCHES +EXTRA_CC_SWITCHES +PACKAGE_DIR +HTML_DIR +PRIVATE_INCLUDE_DIR +TCL_LIBRARY +TCL_MODULE_PATH +TCL_PACKAGE_PATH +BUILD_DLTEST +MAKEFILE_SHELL +DTRACE_OBJ +DTRACE_HDR +DTRACE_SRC +INSTALL_TZDATA +TCL_HAS_LONGLONG +TCL_UNSHARED_LIB_SUFFIX +TCL_SHARED_LIB_SUFFIX +TCL_LIB_VERSIONS_OK +TCL_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_NEEDS_EXP_FILE +TCL_BUILD_LIB_SPEC +LD_LIBRARY_PATH_VAR +TCL_SHARED_BUILD +CFG_TCL_EXPORT_FILE_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_SHARED_LIB_SUFFIX +TCL_SRC_DIR +TCL_BUILD_STUB_LIB_PATH +TCL_BUILD_STUB_LIB_SPEC +TCL_INCLUDE_SPEC +TCL_STUB_LIB_PATH +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_FILE +TCL_LIB_SPEC +TCL_LIB_FLAG +TCL_LIB_FILE +PKG_CFG_ARGS +TCL_YEAR +TCL_PATCH_LEVEL +TCL_MINOR_VERSION +TCL_MAJOR_VERSION +TCL_VERSION +DTRACE +LDFLAGS_DEFAULT +CFLAGS_DEFAULT +INSTALL_STUB_LIB +DLL_INSTALL_DIR +INSTALL_LIB +MAKE_STUB_LIB +MAKE_LIB +SHLIB_SUFFIX +SHLIB_CFLAGS +SHLIB_LD_LIBS +TK_SHLIB_LD_EXTRAS +TCL_SHLIB_LD_EXTRAS +SHLIB_LD +STLIB_LD +LD_SEARCH_FLAGS +CC_SEARCH_FLAGS +LDFLAGS_OPTIMIZE +LDFLAGS_DEBUG +CFLAGS_WARNING +CFLAGS_OPTIMIZE +CFLAGS_DEBUG +LDAIX_SRC +PLAT_SRCS +PLAT_OBJS +DL_OBJS +DL_LIBS +TCL_LIBS +LIBOBJS +AR +RANLIB +ZLIB_INCLUDE +ZLIB_SRCS +ZLIB_OBJS +ZLIB_DIR +TCL_THREADS +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAN_FLAGS +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_man_symlinks +enable_man_compression +enable_man_suffix +enable_threads +with_encoding +enable_shared +enable_64bit +enable_64bit_vis +enable_rpath +enable_corefoundation +enable_load +enable_symbols +enable_langinfo +enable_dll_unloading +with_tzdata +enable_dtrace +enable_framework +' ac_precious_vars='build_alias host_alias target_alias @@ -761,6 +757,8 @@ CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -859,13 +857,20 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -878,13 +883,20 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1075,22 +1087,36 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1110,25 +1136,25 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1137,23 +1163,36 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac fi -# Be sure to have absolute directory names. +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1167,7 +1206,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1183,23 +1222,21 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1226,13 +1263,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1280,9 +1315,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1292,25 +1327,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1324,6 +1359,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-man-symlinks use symlinks for the manpages (default: off) @@ -1369,6 +1405,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1376,15 +1413,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1420,7 +1459,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1430,61 +1469,523 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.64 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## -_ACEOF -exec 5>>config.log +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_c_try_compile -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -_ASUNAME + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS +} # ac_fn_c_try_link -} >&5 +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by tcl $as_me 8.6, which was +generated by GNU Autoconf 2.64. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 cat >&5 <<_ACEOF @@ -1515,12 +2016,12 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1536,13 +2037,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1567,12 +2068,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1601,9 +2103,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1618,9 +2120,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1636,64 +2138,69 @@ _ASBOX echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1703,16 +2210,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1726,68 +2233,56 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1839,26 +2334,24 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 -echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use symlinks for manpages" >&5 +$as_echo_n "checking whether to use symlinks for manpages... " >&6; } # Check whether --enable-man-symlinks was given. -if test "${enable_man_symlinks+set}" = set; then +if test "${enable_man_symlinks+set}" = set; then : enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" fi - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 +$as_echo "$enableval" >&6; } - { echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 -echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compress the manpages" >&5 +$as_echo_n "checking whether to compress the manpages... " >&6; } # Check whether --enable-man-compression was given. -if test "${enable_man_compression+set}" = set; then +if test "${enable_man_compression+set}" = set; then : enableval=$enable_man_compression; case $enableval in - yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 -echo "$as_me: error: missing argument to --enable-man-compression" >&2;} - { (exit 1); exit 1; }; };; + yes) as_fn_error "missing argument to --enable-man-compression" "$LINENO" 5;; no) ;; *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";; esac @@ -1866,24 +2359,24 @@ else enableval="no" fi - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 +$as_echo "$enableval" >&6; } if test "$enableval" != "no"; then - { echo "$as_me:$LINENO: checking for compressed file suffix" >&5 -echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compressed file suffix" >&5 +$as_echo_n "checking for compressed file suffix... " >&6; } touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { echo "$as_me:$LINENO: result: $Z" >&5 -echo "${ECHO_T}$Z" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $Z" >&5 +$as_echo "$Z" >&6; } fi - { echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 -echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add a package name suffix for the manpages" >&5 +$as_echo_n "checking whether to add a package name suffix for the manpages... " >&6; } # Check whether --enable-man-suffix was given. -if test "${enable_man_suffix+set}" = set; then +if test "${enable_man_suffix+set}" = set; then : enableval=$enable_man_suffix; case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; @@ -1893,8 +2386,8 @@ else enableval="no" fi - { echo "$as_me:$LINENO: result: $enableval" >&5 -echo "${ECHO_T}$enableval" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 +$as_echo "$enableval" >&6; } @@ -1917,10 +2410,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1930,25 +2423,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1957,10 +2450,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1970,25 +2463,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -1996,12 +2489,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2014,10 +2503,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2027,25 +2516,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2054,10 +2543,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2068,18 +2557,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2098,11 +2587,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2113,10 +2602,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2126,25 +2615,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2157,10 +2646,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2170,25 +2659,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2200,12 +2689,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2215,98 +2700,82 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2316,14 +2785,14 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2342,78 +2811,75 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then : + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } fi - ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2421,37 +2887,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2463,51 +2923,46 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2521,54 +2976,34 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2579,34 +3014,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2617,35 +3029,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2656,42 +3045,18 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2707,18 +3072,14 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -2775,31 +3136,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -2810,17 +3149,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2829,18 +3170,14 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; @@ -2849,39 +3186,16 @@ $ac_kw foo_t foo () {return 0; } #endif _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -2913,15 +3227,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -2935,11 +3249,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2948,76 +3258,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -3029,8 +3297,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3040,11 +3308,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3053,83 +3317,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -3139,45 +3360,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3189,77 +3405,61 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$EGREP"; then ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3271,46 +3471,31 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3325,47 +3510,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3375,18 +3536,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3396,14 +3553,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3430,113 +3583,36 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3545,17 +3621,13 @@ done - { echo "$as_me:$LINENO: checking dirent.h" >&5 -echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; } -if test "${tcl_cv_dirent_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5 +$as_echo_n "checking dirent.h... " >&6; } +if test "${tcl_cv_dirent_h+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3585,1366 +3657,371 @@ closedir(d); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_dirent_h=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_dirent_h=no + tcl_cv_dirent_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 -echo "${ECHO_T}$tcl_cv_dirent_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5 +$as_echo "$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then -cat >>confdefs.h <<\_ACEOF -#define NO_DIRENT_H 1 -_ACEOF +$as_echo "#define NO_DIRENT_H 1" >>confdefs.h fi - if test "${ac_cv_header_float_h+set}" = set; then - { echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } -if test "${ac_cv_header_float_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking float.h usability" >&5 -echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" +if test "x$ac_cv_header_float_h" = x""yes; then : -# Is the header present? -{ echo "$as_me:$LINENO: checking float.h presence" >&5 -echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for float.h" >&5 -echo $ECHO_N "checking for float.h... $ECHO_C" >&6; } -if test "${ac_cv_header_float_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_float_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 -echo "${ECHO_T}$ac_cv_header_float_h" >&6; } +$as_echo "#define NO_FLOAT_H 1" >>confdefs.h fi -if test $ac_cv_header_float_h = yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define NO_FLOAT_H 1 -_ACEOF -fi + ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default" +if test "x$ac_cv_header_values_h" = x""yes; then : - if test "${ac_cv_header_values_h+set}" = set; then - { echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } -if test "${ac_cv_header_values_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking values.h usability" >&5 -echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking values.h presence" >&5 -echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +$as_echo "#define NO_VALUES_H 1" >>confdefs.h - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: values.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: values.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} + ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = x""yes; then : - ;; -esac -{ echo "$as_me:$LINENO: checking for values.h" >&5 -echo $ECHO_N "checking for values.h... $ECHO_C" >&6; } -if test "${ac_cv_header_values_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_values_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 -echo "${ECHO_T}$ac_cv_header_values_h" >&6; } +$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h -fi -if test $ac_cv_header_values_h = yes; then - : else -cat >>confdefs.h <<\_ACEOF -#define NO_VALUES_H 1 -_ACEOF +$as_echo "#define NO_LIMITS_H 1" >>confdefs.h fi - if test "${ac_cv_header_limits_h+set}" = set; then - { echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } -if test "${ac_cv_header_limits_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking limits.h usability" >&5 -echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : + tcl_ok=1 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + tcl_ok=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking limits.h presence" >&5 -echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for limits.h" >&5 -echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; } -if test "${ac_cv_header_limits_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_limits_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 -echo "${ECHO_T}$ac_cv_header_limits_h" >&6; } - -fi -if test $ac_cv_header_limits_h = yes; then +#include -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIMITS_H 1 _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtol" >/dev/null 2>&1; then : else - -cat >>confdefs.h <<\_ACEOF -#define NO_LIMITS_H 1 -_ACEOF - + tcl_ok=0 fi +rm -f conftest* - - if test "${ac_cv_header_stdlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default #include + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtoul" >/dev/null 2>&1; then : - ac_header_compiler=no +else + tcl_ok=0 fi +rm -f conftest* -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtod" >/dev/null 2>&1; then : - ac_header_preproc=no +else + tcl_ok=0 fi +rm -f conftest* -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} + if test $tcl_ok = 0; then - ;; -esac -{ echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_stdlib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; } +$as_echo "#define NO_STDLIB_H 1" >>confdefs.h -fi -if test $ac_cv_header_stdlib_h = yes; then + fi + ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = x""yes; then : tcl_ok=1 else tcl_ok=0 fi - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strtol" >/dev/null 2>&1; then - : + $EGREP "strstr" >/dev/null 2>&1; then : + else tcl_ok=0 fi rm -f conftest* - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strtoul" >/dev/null 2>&1; then - : + $EGREP "strerror" >/dev/null 2>&1; then : + else tcl_ok=0 fi rm -f conftest* - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strtod" >/dev/null 2>&1; then - : -else - tcl_ok=0 -fi -rm -f conftest* + # See also memmove check below for a place where NO_STRING_H can be + # set and why. if test $tcl_ok = 0; then -cat >>confdefs.h <<\_ACEOF -#define NO_STDLIB_H 1 -_ACEOF +$as_echo "#define NO_STRING_H 1" >>confdefs.h fi - if test "${ac_cv_header_string_h+set}" = set; then - { echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } -if test "${ac_cv_header_string_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + + ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_wait_h" = x""yes; then : + +else + +$as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h + fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } + + + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking string.h usability" >&5 -echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +$as_echo "#define NO_DLFCN_H 1" >>confdefs.h + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking string.h presence" >&5 -echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include + + # OS/390 lacks sys/param.h (and doesn't need it, by chance). + for ac_header in sys/param.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_PARAM_H 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +done -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for string.h" >&5 -echo $ECHO_N "checking for string.h... $ECHO_C" >&6; } -if test "${ac_cv_header_string_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_string_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 -echo "${ECHO_T}$ac_cv_header_string_h" >&6; } -fi -if test $ac_cv_header_string_h = yes; then - tcl_ok=1 -else - tcl_ok=0 -fi +#-------------------------------------------------------------------- +# Determines the correct executable file extension (.exe) +#-------------------------------------------------------------------- - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strstr" >/dev/null 2>&1; then - : +#------------------------------------------------------------------------ +# If we're using GCC, see if the compiler understands -pipe. If so, use it. +# It makes compiling go faster. (This is only a performance feature.) +#------------------------------------------------------------------------ + +if test -z "$no_pipe" && test -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5 +$as_echo_n "checking if the compiler understands -pipe... " >&6; } +if test "${tcl_cv_cc_pipe+set}" = set; then : + $as_echo_n "(cached) " >&6 else - tcl_ok=0 -fi -rm -f conftest* - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +int +main () +{ + + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strerror" >/dev/null 2>&1; then - : +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_cc_pipe=yes else - tcl_ok=0 + tcl_cv_cc_pipe=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5 +$as_echo "$tcl_cv_cc_pipe" >&6; } + if test $tcl_cv_cc_pipe = yes; then + CFLAGS="$CFLAGS -pipe" + fi fi -rm -f conftest* - - - # See also memmove check below for a place where NO_STRING_H can be - # set and why. - - if test $tcl_ok = 0; then -cat >>confdefs.h <<\_ACEOF -#define NO_STRING_H 1 -_ACEOF +#------------------------------------------------------------------------ +# Threads support +#------------------------------------------------------------------------ - fi - if test "${ac_cv_header_sys_wait_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 -echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + # Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then : + enableval=$enable_threads; tcl_ok=$enableval else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + tcl_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 -echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test "${TCL_THREADS}" = 1; then + tcl_threaded_core=1; + fi - ac_header_preproc=no -fi + if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then + TCL_THREADS=1 + # USE_THREAD_ALLOC tells us to try the special thread-based + # allocator that significantly reduces lock contention -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/wait.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/wait.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5 -echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_wait_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +$as_echo "#define _REENTRANT 1" >>confdefs.h -fi -if test $ac_cv_header_sys_wait_h = yes; then - : -else + if test "`uname -s`" = "SunOS" ; then -cat >>confdefs.h <<\_ACEOF -#define NO_SYS_WAIT_H 1 -_ACEOF +$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h -fi + fi +$as_echo "#define _THREAD_SAFE 1" >>confdefs.h - if test "${ac_cv_header_dlfcn_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 +$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } +if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 -echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_init (); +int +main () +{ +return pthread_mutex_init (); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_mutex_init=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + ac_cv_lib_pthread_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 -echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then : + tcl_ok=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + tcl_ok=no fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} + if test "$tcl_ok" = "no"; then + # Check a little harder for __pthread_mutex_init in the same + # library, as some systems hide it there until pthread.h is + # defined. We could alternatively do an AC_TRY_COMPILE with + # pthread.h, but that will work with libpthread really doesn't + # exist, like AIX 4.2. [Bug: 4359] + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5 +$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; } +if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ;; -esac -{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 -echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dlfcn_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __pthread_mutex_init (); +int +main () +{ +return __pthread_mutex_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread___pthread_mutex_init=yes else - ac_cv_header_dlfcn_h=$ac_header_preproc + ac_cv_lib_pthread___pthread_mutex_init=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 -echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if test $ac_cv_header_dlfcn_h = yes; then - : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_pthread___pthread_mutex_init" = x""yes; then : + tcl_ok=yes else - -cat >>confdefs.h <<\_ACEOF -#define NO_DLFCN_H 1 -_ACEOF - + tcl_ok=no fi + fi - - # OS/390 lacks sys/param.h (and doesn't need it, by chance). - -for ac_header in sys/param.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -#-------------------------------------------------------------------- -# Determines the correct executable file extension (.exe) -#-------------------------------------------------------------------- - - - -#------------------------------------------------------------------------ -# If we're using GCC, see if the compiler understands -pipe. If so, use it. -# It makes compiling go faster. (This is only a performance feature.) -#------------------------------------------------------------------------ - -if test -z "$no_pipe" && test -n "$GCC"; then - { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 -echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; } -if test "${tcl_cv_cc_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_cc_pipe=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_pipe=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$hold_cflags -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 -echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; } - if test $tcl_cv_cc_pipe = yes; then - CFLAGS="$CFLAGS -pipe" - fi -fi - -#------------------------------------------------------------------------ -# Threads support -#------------------------------------------------------------------------ - - - # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then - enableval=$enable_threads; tcl_ok=$enableval -else - tcl_ok=yes -fi - - - if test "${TCL_THREADS}" = 1; then - tcl_threaded_core=1; - fi - - if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then - TCL_THREADS=1 - # USE_THREAD_ALLOC tells us to try the special thread-based - # allocator that significantly reduces lock contention - -cat >>confdefs.h <<\_ACEOF -#define USE_THREAD_ALLOC 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define _REENTRANT 1 -_ACEOF - - if test "`uname -s`" = "SunOS" ; then - -cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF - - fi - -cat >>confdefs.h <<\_ACEOF -#define _THREAD_SAFE 1 -_ACEOF - - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthread" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5 +$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; } +if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +LIBS="-lpthreads $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4962,62 +4039,35 @@ return pthread_mutex_init (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pthread_pthread_mutex_init=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthreads_pthread_mutex_init=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_mutex_init=no + ac_cv_lib_pthreads_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } -if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi - if test "$tcl_ok" = "no"; then - # Check a little harder for __pthread_mutex_init in the same - # library, as some systems hide it there until pthread.h is - # defined. We could alternatively do an AC_TRY_COMPILE with - # pthread.h, but that will work with libpthread really doesn't - # exist, like AIX 4.2. [Bug: 4359] - { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthreads" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5 +$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; } +if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5026,71 +4076,41 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char __pthread_mutex_init (); +char pthread_mutex_init (); int main () { -return __pthread_mutex_init (); +return pthread_mutex_init (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pthread___pthread_mutex_init=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_pthread_mutex_init=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_lib_c_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; } -if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_c_pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi - fi - - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthread" - else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "$tcl_ok" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5 +$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; } +if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthreads $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5108,286 +4128,43 @@ return pthread_mutex_init (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pthreads_pthread_mutex_init=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_r_pthread_mutex_init=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthreads_pthread_mutex_init=no + ac_cv_lib_c_r_pthread_mutex_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } -if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; } +if test "x$ac_cv_lib_c_r_pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthreads" - else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; } -if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -pthread" + else + TCL_THREADS=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5 +$as_echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;} + fi + fi + fi + fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_c_pthread_mutex_init=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_pthread_mutex_init=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; } -if test $ac_cv_lib_c_pthread_mutex_init = yes; then - tcl_ok=yes -else - tcl_ok=no -fi - - if test "$tcl_ok" = "no"; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; } -if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_c_r_pthread_mutex_init=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_r_pthread_mutex_init=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; } -if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then - tcl_ok=yes -else - tcl_ok=no -fi - - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -pthread" - else - TCL_THREADS=0 - { echo "$as_me:$LINENO: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5 -echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;} - fi - fi - fi - fi - - # Does the pthread-implementation provide - # 'pthread_attr_setstacksize' ? - -for ac_func in pthread_attr_setstacksize -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + # Does the pthread-implementation provide + # 'pthread_attr_setstacksize' ? + for ac_func in pthread_attr_setstacksize +do : + ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize" +if test "x$ac_cv_func_pthread_attr_setstacksize" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 _ACEOF fi @@ -5397,24 +4174,22 @@ done TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5 +$as_echo_n "checking for building with threads... " >&6; } if test "${TCL_THREADS}" = 1; then -cat >>confdefs.h <<\_ACEOF -#define TCL_THREADS 1 -_ACEOF +$as_echo "#define TCL_THREADS 1" >>confdefs.h if test "${tcl_threaded_core}" = 1; then - { echo "$as_me:$LINENO: result: yes (threaded core)" >&5 -echo "${ECHO_T}yes (threaded core)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (threaded core)" >&5 +$as_echo "yes (threaded core)" >&6; } else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5427,7 +4202,7 @@ echo "${ECHO_T}no" >&6; } # Check whether --with-encoding was given. -if test "${with_encoding+set}" = set; then +if test "${with_encoding+set}" = set; then : withval=$with_encoding; with_tcencoding=${withval} fi @@ -5440,9 +4215,7 @@ _ACEOF else -cat >>confdefs.h <<\_ACEOF -#define TCL_CFGVAL_ENCODING "iso8859-1" -_ACEOF +$as_echo "#define TCL_CFGVAL_ENCODING \"iso8859-1\"" >>confdefs.h fi @@ -5459,105 +4232,21 @@ _ACEOF # right (and it must appear before "-lm"). #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for sin" >&5 -echo $ECHO_N "checking for sin... $ECHO_C" >&6; } -if test "${ac_cv_func_sin+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define sin to an innocuous variant, in case declares sin. - For example, HP-UX 11i declares gettimeofday. */ -#define sin innocuous_sin - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char sin (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef sin - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sin (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_sin || defined __stub___sin -choke me -#endif - -int -main () -{ -return sin (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_sin=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_sin=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 -echo "${ECHO_T}$ac_cv_func_sin" >&6; } -if test $ac_cv_func_sin = yes; then + ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" +if test "x$ac_cv_func_sin" = x""yes; then : MATH_LIBS="" else MATH_LIBS="-lm" fi - { echo "$as_me:$LINENO: checking for main in -lieee" >&5 -echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; } -if test "${ac_cv_lib_ieee_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5 +$as_echo_n "checking for main in -lieee... " >&6; } +if test "${ac_cv_lib_ieee_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5569,39 +4258,18 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ieee_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ieee_main=no + ac_cv_lib_ieee_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; } -if test $ac_cv_lib_ieee_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5 +$as_echo "$ac_cv_lib_ieee_main" >&6; } +if test "x$ac_cv_lib_ieee_main" = x""yes; then : MATH_LIBS="-lieee $MATH_LIBS" fi @@ -5611,18 +4279,14 @@ fi # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for main in -linet" >&5 -echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; } -if test "${ac_cv_lib_inet_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 +$as_echo_n "checking for main in -linet... " >&6; } +if test "${ac_cv_lib_inet_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5634,173 +4298,26 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_inet_main=no + ac_cv_lib_inet_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; } -if test $ac_cv_lib_inet_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 +$as_echo "$ac_cv_lib_inet_main" >&6; } +if test "x$ac_cv_lib_inet_main" = x""yes; then : LIBS="$LIBS -linet" fi - if test "${ac_cv_header_net_errno_h+set}" = set; then - { echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } -if test "${ac_cv_header_net_errno_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5 -echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5 -echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for net/errno.h" >&5 -echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; } -if test "${ac_cv_header_net_errno_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_net_errno_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 -echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; } - -fi -if test $ac_cv_header_net_errno_h = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_net_errno_h" = x""yes; then : -cat >>confdefs.h <<\_ACEOF -#define HAVE_NET_ERRNO_H 1 -_ACEOF +$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h fi @@ -5825,190 +4342,26 @@ fi #-------------------------------------------------------------------- tcl_checkBoth=0 - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } -if test "${ac_cv_func_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = x""yes; then : + tcl_checkSocket=0 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define connect to an innocuous variant, in case declares connect. - For example, HP-UX 11i declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef connect - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect -choke me -#endif - -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_connect=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_connect=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } -if test $ac_cv_func_connect = yes; then - tcl_checkSocket=0 -else - tcl_checkSocket=1 -fi + tcl_checkSocket=1 +fi if test "$tcl_checkSocket" = 1; then - { echo "$as_me:$LINENO: checking for setsockopt" >&5 -echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } -if test "${ac_cv_func_setsockopt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define setsockopt to an innocuous variant, in case declares setsockopt. - For example, HP-UX 11i declares gettimeofday. */ -#define setsockopt innocuous_setsockopt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char setsockopt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef setsockopt - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char setsockopt (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_setsockopt || defined __stub___setsockopt -choke me -#endif - -int -main () -{ -return setsockopt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_setsockopt=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_setsockopt=no -fi + ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" +if test "x$ac_cv_func_setsockopt" = x""yes; then : -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; } -if test $ac_cv_func_setsockopt = yes; then - : else - { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 -echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; } -if test "${ac_cv_lib_socket_setsockopt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5 +$as_echo_n "checking for setsockopt in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_setsockopt+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6026,39 +4379,18 @@ return setsockopt (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_setsockopt=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_setsockopt=no + ac_cv_lib_socket_setsockopt=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } -if test $ac_cv_lib_socket_setsockopt = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5 +$as_echo "$ac_cv_lib_socket_setsockopt" >&6; } +if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then : LIBS="$LIBS -lsocket" else tcl_checkBoth=1 @@ -6070,190 +4402,26 @@ fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" - { echo "$as_me:$LINENO: checking for accept" >&5 -echo $ECHO_N "checking for accept... $ECHO_C" >&6; } -if test "${ac_cv_func_accept+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define accept to an innocuous variant, in case declares accept. - For example, HP-UX 11i declares gettimeofday. */ -#define accept innocuous_accept - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char accept (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef accept - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char accept (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_accept || defined __stub___accept -choke me -#endif - -int -main () -{ -return accept (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_accept=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_accept=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -echo "${ECHO_T}$ac_cv_func_accept" >&6; } -if test $ac_cv_func_accept = yes; then + ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" +if test "x$ac_cv_func_accept" = x""yes; then : tcl_checkNsl=0 else LIBS=$tk_oldLibs fi fi - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } -if test "${ac_cv_func_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname -choke me -#endif - -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = x""yes; then : - ac_cv_func_gethostbyname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } -if test $ac_cv_func_gethostbyname = yes; then - : else - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6271,39 +4439,18 @@ return gethostbyname (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } -if test $ac_cv_lib_nsl_gethostbyname = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : LIBS="$LIBS -lnsl" fi @@ -6315,10 +4462,10 @@ fi LIBS="$LIBS$THREADS_LIBS" - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 +$as_echo_n "checking how to build libraries... " >&6; } # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes @@ -6333,17 +4480,15 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 +$as_echo "shared" >&6; } SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 +$as_echo "static" >&6; } SHARED_BUILD=0 -cat >>confdefs.h <<\_ACEOF -#define STATIC_BUILD 1 -_ACEOF +$as_echo "#define STATIC_BUILD 1" >>confdefs.h fi @@ -6353,212 +4498,32 @@ _ACEOF #------------------------------------------------------------------------ zlib_ok=yes -if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = x""yes; then : - ac_header_compiler=no -fi + ac_fn_c_check_type "$LINENO" "gz_header" "ac_cv_type_gz_header" "#include +" +if test "x$ac_cv_type_gz_header" = x""yes; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +else + zlib_ok=no +fi -# Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + zlib_ok=no fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_zlib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } - -fi -if test $ac_cv_header_zlib_h = yes; then - - { echo "$as_me:$LINENO: checking for gz_header" >&5 -echo $ECHO_N "checking for gz_header... $ECHO_C" >&6; } -if test "${ac_cv_type_gz_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -typedef gz_header ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_gz_header=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_gz_header=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 -echo "${ECHO_T}$ac_cv_type_gz_header" >&6; } -if test $ac_cv_type_gz_header = yes; then - : -else - zlib_ok=no -fi - -else - - zlib_ok=no -fi +if test $zlib_ok = yes; then : -if test $zlib_ok = yes; then - - { echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 -echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6; } -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflateSetHeader" >&5 +$as_echo_n "checking for library containing deflateSetHeader... " >&6; } +if test "${ac_cv_search_deflateSetHeader+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6583,50 +4548,27 @@ for ac_lib in '' z; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_deflateSetHeader=$ac_res -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_deflateSetHeader+set}" = set; then : break fi done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then - : +if test "${ac_cv_search_deflateSetHeader+set}" = set; then : + else ac_cv_search_deflateSetHeader=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 -echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflateSetHeader" >&5 +$as_echo "$ac_cv_search_deflateSetHeader" >&6; } ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else @@ -6636,8 +4578,7 @@ else fi fi - -if test $zlib_ok = no; then +if test $zlib_ok = no; then : ZLIB_DIR=\${COMPAT_DIR}/zlib @@ -6650,10 +4591,7 @@ if test $zlib_ok = no; then fi - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZLIB 1 -_ACEOF +$as_echo "#define HAVE_ZLIB 1" >>confdefs.h #-------------------------------------------------------------------- @@ -6665,10 +4603,10 @@ _ACEOF if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -6678,25 +4616,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6705,10 +4643,10 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -6718,25 +4656,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -6744,12 +4682,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -6762,54 +4696,49 @@ fi # Step 0.a: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 +$as_echo_n "checking if 64bit support is requested... " >&6; } # Check whether --enable-64bit was given. -if test "${enable_64bit+set}" = set; then +if test "${enable_64bit+set}" = set; then : enableval=$enable_64bit; do64bit=$enableval else do64bit=no fi - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 +$as_echo "$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 -echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 +$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; } # Check whether --enable-64bit-vis was given. -if test "${enable_64bit_vis+set}" = set; then +if test "${enable_64bit_vis+set}" = set; then : enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no fi - { echo "$as_me:$LINENO: result: $do64bitVIS" >&5 -echo "${ECHO_T}$do64bitVIS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5 +$as_echo "$do64bitVIS" >&6; } # Force 64bit on with VIS - if test "$do64bitVIS" = "yes"; then + if test "$do64bitVIS" = "yes"; then : do64bit=yes fi - # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 -echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; } -if test "${tcl_cv_cc_visibility_hidden+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5 +$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; } +if test "${tcl_cv_cc_visibility_hidden+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$GCC" = yes; then + if test "$GCC" = yes; then : hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6820,31 +4749,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_cc_visibility_hidden=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags @@ -6854,22 +4763,17 @@ else fi - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 -echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; } - if test $tcl_cv_cc_visibility_hidden = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5 +$as_echo "$tcl_cv_cc_visibility_hidden" >&6; } + if test $tcl_cv_cc_visibility_hidden = yes; then : CFLAGS="$CFLAGS -fvisibility=hidden" else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern __attribute__((__visibility__("hidden"))) void f(void); @@ -6882,71 +4786,46 @@ f(); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_visibility_hidden=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_visibility_hidden=no + tcl_cv_cc_visibility_hidden=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags - if test $tcl_cv_cc_visibility_hidden = yes; then + if test $tcl_cv_cc_visibility_hidden = yes; then : -cat >>confdefs.h <<\_ACEOF -#define MODULE_SCOPE extern __attribute__((__visibility__("hidden"))) -_ACEOF +$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h fi - fi - # Step 0.d: Disable -rpath support? - { echo "$as_me:$LINENO: checking if rpath support is requested" >&5 -echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5 +$as_echo_n "checking if rpath support is requested... " >&6; } # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then +if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; doRpath=$enableval else doRpath=yes fi - { echo "$as_me:$LINENO: result: $doRpath" >&5 -echo "${ECHO_T}$doRpath" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 +$as_echo "$doRpath" >&6; } # Step 1: set the variable "system" to hold the name and version number # for the system. - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } -if test "${tcl_cv_sys_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 +$as_echo_n "checking system version... " >&6; } +if test "${tcl_cv_sys_version+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -f /usr/lib/NextStep/software_version; then @@ -6954,8 +4833,8 @@ else else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then - { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5 -echo "$as_me: WARNING: can't find uname command" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 +$as_echo "$as_me: WARNING: can't find uname command" >&2;} tcl_cv_sys_version=unknown else # Special check for weird MP-RAS system (uname returns weird @@ -6971,26 +4850,22 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 +$as_echo "$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7008,39 +4883,18 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : have_dl=yes else have_dl=no @@ -7065,7 +4919,7 @@ fi ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g - if test "$GCC" = yes; then + if test "$GCC" = yes; then : CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" @@ -7076,16 +4930,15 @@ else CFLAGS_WARNING="" fi - TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -7095,48 +4948,44 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test "${AR}" = ""; then + if test "${AR}" = ""; then : - { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 -echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi - STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" PLAT_OBJS="" PLAT_SRCS="" LDAIX_SRC="" - if test x"${SHLIB_VERSION}" = x; then + if test x"${SHLIB_VERSION}" = x; then : SHLIB_VERSION="1.0" fi - case $system in AIX-*) - if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then + if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then : # AIX requires the _r compiler when gcc isn't being used case "${CC}" in @@ -7148,11 +4997,10 @@ fi CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` ;; esac - { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 -echo "${ECHO_T}Using $CC for compiling with threads" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 +$as_echo "Using $CC for compiling with threads" >&6; } fi - LIBS="$LIBS -lc" SHLIB_CFLAGS="" # Note: need the LIBS below, otherwise Tk won't find Tcl's @@ -7164,12 +5012,12 @@ fi LD_LIBRARY_PATH_VAR="LIBPATH" # Check to enable 64-bit flags for compiler/linker on AIX 4+ - if test "$do64bit" = yes -a "`uname -v`" -gt 3; then + if test "$do64bit" = yes -a "`uname -v`" -gt 3; then : - if test "$GCC" = yes; then + if test "$GCC" = yes; then : - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 -echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} else @@ -7182,17 +5030,15 @@ else fi - fi - - if test "`uname -m`" = ia64; then + if test "`uname -m`" = ia64; then : # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" # AIX-5 has dl* in libc.so DL_LIBS="" - if test "$GCC" = yes; then + if test "$GCC" = yes; then : CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' @@ -7201,19 +5047,17 @@ else CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' fi - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else - if test "$GCC" = yes; then + if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' else SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" fi - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' @@ -7224,9 +5068,8 @@ fi fi - # AIX v<=4.1 has some different flags than 4.2+ - if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then + if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then : case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; @@ -7238,7 +5081,6 @@ esac fi - # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to @@ -7251,18 +5093,14 @@ fi # deduce the timezone by comparing the localtime result on a # known GMT value. - { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 -echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; } -if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday in -lbsd" >&5 +$as_echo_n "checking for gettimeofday in -lbsd... " >&6; } +if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7280,55 +5118,31 @@ return gettimeofday (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gettimeofday=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsd_gettimeofday=no + ac_cv_lib_bsd_gettimeofday=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; } -if test $ac_cv_lib_bsd_gettimeofday = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gettimeofday" >&5 +$as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; } +if test "x$ac_cv_lib_bsd_gettimeofday" = x""yes; then : libbsd=yes else libbsd=no fi - if test $libbsd = yes; then + if test $libbsd = yes; then : MATH_LIBS="$MATH_LIBS -lbsd" -cat >>confdefs.h <<\_ACEOF -#define USE_DELTA_FOR_TZ 1 -_ACEOF +$as_echo "#define USE_DELTA_FOR_TZ 1" >>confdefs.h fi - ;; BeOS*) SHLIB_CFLAGS="-fPIC" @@ -7343,18 +5157,14 @@ fi # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 -echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; } -if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5 +$as_echo_n "checking for inet_ntoa in -lbind... " >&6; } +if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbind $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7372,39 +5182,18 @@ return inet_ntoa (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bind_inet_ntoa=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bind_inet_ntoa=no + ac_cv_lib_bind_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; } -if test $ac_cv_lib_bind_inet_ntoa = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5 +$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; } +if test "x$ac_cv_lib_bind_inet_ntoa" = x""yes; then : LIBS="$LIBS -lbind -lsocket" fi @@ -7458,18 +5247,14 @@ fi SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" - { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 -echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; } -if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5 +$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; } +if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnetwork $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7487,39 +5272,18 @@ return inet_ntoa (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_network_inet_ntoa=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_network_inet_ntoa=no + ac_cv_lib_network_inet_ntoa=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; } -if test $ac_cv_lib_network_inet_ntoa = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5 +$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; } +if test "x$ac_cv_lib_network_inet_ntoa" = x""yes; then : LIBS="$LIBS -lnetwork" fi @@ -7527,18 +5291,14 @@ fi HP-UX-*.11.*) # Use updated header definitions where possible -cat >>confdefs.h <<\_ACEOF -#define _XOPEN_SOURCE_EXTENDED 1 -_ACEOF +$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define _XOPEN_SOURCE 1 -_ACEOF +$as_echo "#define _XOPEN_SOURCE 1" >>confdefs.h LIBS="$LIBS -lxnet" # Use the XOPEN network library - if test "`uname -m`" = ia64; then + if test "`uname -m`" = ia64; then : SHLIB_SUFFIX=".so" @@ -7547,19 +5307,14 @@ else SHLIB_SUFFIX=".sl" fi - - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7577,45 +5332,24 @@ return shl_load (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : tcl_ok=yes else tcl_ok=no fi - if test "$tcl_ok" = yes; then + if test "$tcl_ok" = yes; then : SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" @@ -7628,8 +5362,7 @@ fi LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi - - if test "$GCC" = yes; then + if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' @@ -7641,14 +5374,13 @@ else fi - # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes"; then + if test "$do64bit" = "yes"; then : - if test "$GCC" = yes; then + if test "$GCC" = yes; then : case `${CC} -dumpmachine` in hppa64*) @@ -7656,16 +5388,15 @@ fi do64bit_ok=yes SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 -echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} ;; esac @@ -7677,23 +5408,17 @@ else fi - -fi - ;; +fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7711,45 +5436,24 @@ return shl_load (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : tcl_ok=yes else tcl_ok=no fi - if test "$tcl_ok" = yes; then + if test "$tcl_ok" = yes; then : SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" @@ -7761,8 +5465,7 @@ fi LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" -fi - ;; +fi ;; IRIX-5.*) SHLIB_CFLAGS="" SHLIB_LD="ld -shared -rdata_shared" @@ -7776,12 +5479,11 @@ fi ;; esac - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - ;; IRIX-6.*) SHLIB_CFLAGS="" @@ -7796,13 +5498,12 @@ fi ;; esac - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - - if test "$GCC" = yes; then + if test "$GCC" = yes; then : CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" @@ -7821,7 +5522,6 @@ else LDFLAGS="$LDFLAGS -n32" fi - ;; IRIX64-6.*) SHLIB_CFLAGS="" @@ -7836,21 +5536,20 @@ fi ;; esac - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = yes; then + if test "$do64bit" = yes; then : - if test "$GCC" = yes; then + if test "$GCC" = yes; then : - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5 -echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} else @@ -7861,9 +5560,7 @@ else fi - fi - ;; Linux*) SHLIB_CFLAGS="-fPIC" @@ -7880,31 +5577,25 @@ fi DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "`uname -m`" = "alpha"; then + if test "`uname -m`" = "alpha"; then : CFLAGS="$CFLAGS -mieee" fi + if test $do64bit = yes; then : - if test $do64bit = yes; then - - { echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; } -if test "${tcl_cv_cc_m64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5 +$as_echo_n "checking if compiler accepts -m64 flag... " >&6; } +if test "${tcl_cv_cc_m64+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7915,59 +5606,35 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_m64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_m64=no + tcl_cv_cc_m64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 -echo "${ECHO_T}$tcl_cv_cc_m64" >&6; } - if test $tcl_cv_cc_m64 = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5 +$as_echo "$tcl_cv_cc_m64" >&6; } + if test $tcl_cv_cc_m64 = yes; then : CFLAGS="$CFLAGS -m64" do64bit_ok=yes fi - fi - # The combo of gcc + glibc has a bug related to inlining of # functions like strtod(). The -fno-builtin flag should address # this problem but it does not work. The -fno-inline flag is kind # of overkill but it works. Disable inlining only when one of the # files in compat/*.c is being linked in. - if test x"${USE_COMPAT}" != x; then + if test x"${USE_COMPAT}" != x; then : CFLAGS="$CFLAGS -fno-inline" fi - ;; GNU*) SHLIB_CFLAGS="-fPIC" @@ -7980,10 +5647,9 @@ fi LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" - if test "`uname -m`" = "alpha"; then + if test "`uname -m`" = "alpha"; then : CFLAGS="$CFLAGS -mieee" fi - ;; Lynx*) SHLIB_CFLAGS="-fPIC" @@ -7994,12 +5660,11 @@ fi DL_OBJS="tclLoadDl.o" DL_LIBS="-mshared -ldl" LD_FLAGS="-Wl,--export-dynamic" - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi - ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" @@ -8029,23 +5694,18 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } -if test "${tcl_cv_ld_elf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 +$as_echo_n "checking for ELF... " >&6; } +if test "${tcl_cv_ld_elf+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ @@ -8054,7 +5714,7 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then + $EGREP "yes" >/dev/null 2>&1; then : tcl_cv_ld_elf=yes else tcl_cv_ld_elf=no @@ -8062,9 +5722,9 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } - if test $tcl_cv_ld_elf = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 +$as_echo "$tcl_cv_ld_elf" >&6; } + if test $tcl_cv_ld_elf = yes; then : SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -8074,7 +5734,6 @@ else fi - # Ancient FreeBSD doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' @@ -8088,24 +5747,19 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - { echo "$as_me:$LINENO: checking for ELF" >&5 -echo $ECHO_N "checking for ELF... $ECHO_C" >&6; } -if test "${tcl_cv_ld_elf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 +$as_echo_n "checking for ELF... " >&6; } +if test "${tcl_cv_ld_elf+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ @@ -8114,7 +5768,7 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then + $EGREP "yes" >/dev/null 2>&1; then : tcl_cv_ld_elf=yes else tcl_cv_ld_elf=no @@ -8122,17 +5776,16 @@ fi rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 -echo "${ECHO_T}$tcl_cv_ld_elf" >&6; } - if test $tcl_cv_ld_elf = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 +$as_echo "$tcl_cv_ld_elf" >&6; } + if test $tcl_cv_ld_elf = yes; then : LDFLAGS=-Wl,-export-dynamic else LDFLAGS="" fi - - if test "${TCL_THREADS}" = "1"; then + if test "${TCL_THREADS}" = "1"; then : # OpenBSD builds and links with -pthread, never -lpthread. LIBS=`echo $LIBS | sed s/-lpthread//` @@ -8140,7 +5793,6 @@ fi SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" fi - # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots @@ -8155,13 +5807,12 @@ fi DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="$LDFLAGS -export-dynamic" - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "${TCL_THREADS}" = "1"; then + if test "${TCL_THREADS}" = "1"; then : # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` @@ -8169,7 +5820,6 @@ fi LDFLAGS="$LDFLAGS -pthread" fi - case $system in FreeBSD-3.*) # FreeBSD-3 doesn't handle version numbers with dots. @@ -8189,20 +5839,18 @@ fi DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="" - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - - if test "${TCL_THREADS}" = "1"; then + if test "${TCL_THREADS}" = "1"; then : # The -pthread needs to go in the LDFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LDFLAGS="$LDFLAGS $PTHREAD_LIBS" fi - # Version numbers are dot-stripped by system policy. TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' @@ -8221,23 +5869,19 @@ fi CFLAGS="`echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" - if test $do64bit = yes; then + if test $do64bit = yes; then : case `arch` in ppc) - { echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; } -if test "${tcl_cv_cc_arch_ppc64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5 +$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; } +if test "${tcl_cv_cc_arch_ppc64+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8248,59 +5892,33 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_arch_ppc64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_arch_ppc64=no + tcl_cv_cc_arch_ppc64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; } - if test $tcl_cv_cc_arch_ppc64 = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5 +$as_echo "$tcl_cv_cc_arch_ppc64" >&6; } + if test $tcl_cv_cc_arch_ppc64 = yes; then : CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" do64bit_ok=yes -fi -;; +fi;; i386) - { echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 -echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; } -if test "${tcl_cv_cc_arch_x86_64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5 +$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; } +if test "${tcl_cv_cc_arch_x86_64+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8311,76 +5929,48 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_arch_x86_64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_arch_x86_64=no + tcl_cv_cc_arch_x86_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 -echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; } - if test $tcl_cv_cc_arch_x86_64 = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5 +$as_echo "$tcl_cv_cc_arch_x86_64" >&6; } + if test $tcl_cv_cc_arch_x86_64 = yes; then : CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes -fi -;; +fi;; *) - { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 -echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 +$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; esac else # Check for combined 32-bit and 64-bit fat build if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ - && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then + && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then : fat_32_64=yes fi - fi - SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 -echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; } -if test "${tcl_cv_ld_single_module+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 +$as_echo_n "checking if ld accepts -single_module flag... " >&6; } +if test "${tcl_cv_ld_single_module+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8391,69 +5981,42 @@ int i; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_single_module=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_ld_single_module=no + tcl_cv_ld_single_module=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 -echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; } - if test $tcl_cv_ld_single_module = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 +$as_echo "$tcl_cv_ld_single_module" >&6; } + if test $tcl_cv_ld_single_module = yes; then : SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi - SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ - "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then + "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then : LDFLAGS="$LDFLAGS -prebind" fi - LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 -echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; } -if test "${tcl_cv_ld_search_paths_first+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 +$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } +if test "${tcl_cv_ld_search_paths_first+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8464,85 +6027,58 @@ int i; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_search_paths_first=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_ld_search_paths_first=no + tcl_cv_ld_search_paths_first=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 -echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; } - if test $tcl_cv_ld_search_paths_first = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5 +$as_echo "$tcl_cv_ld_search_paths_first" >&6; } + if test $tcl_cv_ld_search_paths_first = yes; then : LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi - - if test "$tcl_cv_cc_visibility_hidden" != yes; then + if test "$tcl_cv_cc_visibility_hidden" != yes; then : -cat >>confdefs.h <<\_ACEOF -#define MODULE_SCOPE __private_extern__ -_ACEOF +$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h fi - CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" -cat >>confdefs.h <<\_ACEOF -#define MAC_OSX_TCL 1 -_ACEOF +$as_echo "#define MAC_OSX_TCL 1" >>confdefs.h PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' - { echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 -echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use CoreFoundation" >&5 +$as_echo_n "checking whether to use CoreFoundation... " >&6; } # Check whether --enable-corefoundation was given. -if test "${enable_corefoundation+set}" = set; then +if test "${enable_corefoundation+set}" = set; then : enableval=$enable_corefoundation; tcl_corefoundation=$enableval else tcl_corefoundation=yes fi - { echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 -echo "${ECHO_T}$tcl_corefoundation" >&6; } - if test $tcl_corefoundation = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_corefoundation" >&5 +$as_echo "$tcl_corefoundation" >&6; } + if test $tcl_corefoundation = yes; then : - { echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 -echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6; } -if test "${tcl_cv_lib_corefoundation+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CoreFoundation.framework" >&5 +$as_echo_n "checking for CoreFoundation.framework... " >&6; } +if test "${tcl_cv_lib_corefoundation+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_libs=$LIBS - if test "$fat_32_64" = yes; then + if test "$fat_32_64" = yes; then : for v in CFLAGS CPPFLAGS LDFLAGS; do # On Tiger there is no 64-bit CF, so remove 64-bit @@ -8552,13 +6088,8 @@ else eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done fi - LIBS="$LIBS -framework CoreFoundation" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8569,74 +6100,45 @@ CFBundleRef b = CFBundleGetMainBundle(); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_lib_corefoundation=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_lib_corefoundation=no + tcl_cv_lib_corefoundation=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - if test "$fat_32_64" = yes; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$fat_32_64" = yes; then : for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi - LIBS=$hold_libs fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6; } - if test $tcl_cv_lib_corefoundation = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation" >&5 +$as_echo "$tcl_cv_lib_corefoundation" >&6; } + if test $tcl_cv_lib_corefoundation = yes; then : LIBS="$LIBS -framework CoreFoundation" -cat >>confdefs.h <<\_ACEOF -#define HAVE_COREFOUNDATION 1 -_ACEOF +$as_echo "#define HAVE_COREFOUNDATION 1" >>confdefs.h else tcl_corefoundation=no fi + if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then : - if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then - - { echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 -echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6; } -if test "${tcl_cv_lib_corefoundation_64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit CoreFoundation" >&5 +$as_echo_n "checking for 64-bit CoreFoundation... " >&6; } +if test "${tcl_cv_lib_corefoundation_64+set}" = set; then : + $as_echo_n "(cached) " >&6 else for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8647,57 +6149,31 @@ CFBundleRef b = CFBundleGetMainBundle(); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_lib_corefoundation_64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_lib_corefoundation_64=no + tcl_cv_lib_corefoundation_64=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 -echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6; } - if test $tcl_cv_lib_corefoundation_64 = no; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation_64" >&5 +$as_echo "$tcl_cv_lib_corefoundation_64" >&6; } + if test $tcl_cv_lib_corefoundation_64 = no; then : -cat >>confdefs.h <<\_ACEOF -#define NO_COREFOUNDATION_64 1 -_ACEOF +$as_echo "#define NO_COREFOUNDATION_64 1" >>confdefs.h LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings" fi - fi - fi - ;; NEXTSTEP-*) SHLIB_CFLAGS="" @@ -8712,9 +6188,7 @@ fi OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy -cat >>confdefs.h <<\_ACEOF -#define _OE_SOCKETS 1 -_ACEOF +$as_echo "#define _OE_SOCKETS 1" >>confdefs.h ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) @@ -8732,14 +6206,13 @@ _ACEOF OSF1-1.*) # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SHLIB_CFLAGS="-fPIC" - if test "$SHARED_BUILD" = 1; then + if test "$SHARED_BUILD" = 1; then : SHLIB_LD="ld -shared" else SHLIB_LD="ld -non_shared" fi - SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" @@ -8750,7 +6223,7 @@ fi OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" - if test "$SHARED_BUILD" = 1; then + if test "$SHARED_BUILD" = 1; then : SHLIB_LD='ld -shared -expect_unresolved "*"' @@ -8759,31 +6232,28 @@ else SHLIB_LD='ld -non_shared -expect_unresolved "*"' fi - SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - if test $doRpath = yes; then + if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - - if test "$GCC" = yes; then + if test "$GCC" = yes; then : CFLAGS="$CFLAGS -mieee" else CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" fi - # see pthread_intro(3) for pthread support on osf1, k.furukawa - if test "${TCL_THREADS}" = 1; then + if test "${TCL_THREADS}" = 1; then : CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` - if test "$GCC" = yes; then + if test "$GCC" = yes; then : LIBS="$LIBS -lpthread -lmach -lexc" @@ -8794,9 +6264,7 @@ else fi - fi - ;; QNX-6*) # QNX RTP @@ -8815,7 +6283,7 @@ fi # Note, dlopen is available only on SCO 3.2.5 and greater. However, # this test works, since "uname -s" was non-standard in 3.2.4 and # below. - if test "$GCC" = yes; then + if test "$GCC" = yes; then : SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" @@ -8826,7 +6294,6 @@ else LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" fi - SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" @@ -8871,14 +6338,10 @@ fi # won't define thread-safe library routines. -cat >>confdefs.h <<\_ACEOF -#define _REENTRANT 1 -_ACEOF +$as_echo "#define _REENTRANT 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF +$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" @@ -8890,7 +6353,7 @@ _ACEOF SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - if test "$GCC" = yes; then + if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' @@ -8903,37 +6366,32 @@ else LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} fi - ;; SunOS-5*) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. -cat >>confdefs.h <<\_ACEOF -#define _REENTRANT 1 -_ACEOF +$as_echo "#define _REENTRANT 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF +$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = yes; then + if test "$do64bit" = yes; then : arch=`isainfo` - if test "$arch" = "sparcv9 sparc"; then + if test "$arch" = "sparcv9 sparc"; then : - if test "$GCC" = yes; then + if test "$GCC" = yes; then : - if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then + if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then : - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 -echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} else @@ -8944,11 +6402,10 @@ else fi - else do64bit_ok=yes - if test "$do64bitVIS" = yes; then + if test "$do64bitVIS" = yes; then : CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS_ARCH="-xarch=v9a" @@ -8959,17 +6416,15 @@ else LDFLAGS_ARCH="-xarch=v9" fi - # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" fi - else - if test "$arch" = "amd64 i386"; then + if test "$arch" = "amd64 i386"; then : - if test "$GCC" = yes; then + if test "$GCC" = yes; then : case $system in SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) @@ -8977,8 +6432,8 @@ else CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 -echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; esac else @@ -8995,157 +6450,32 @@ else fi - else - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5 -echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} fi - fi - fi - #-------------------------------------------------------------------- # On Solaris 5.x i386 with the sunpro compiler we need to link # with sunmath to get floating point rounding control #-------------------------------------------------------------------- - if test "$GCC" = yes; then + if test "$GCC" = yes; then : use_sunmath=no else arch=`isainfo` - { echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 -echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6; } - if test "$arch" = "amd64 i386"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use -lsunmath for fp rounding control" >&5 +$as_echo_n "checking whether to use -lsunmath for fp rounding control... " >&6; } + if test "$arch" = "amd64 i386"; then : - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } MATH_LIBS="-lsunmath $MATH_LIBS" - if test "${ac_cv_header_sunmath_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sunmath_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sunmath.h usability" >&5 -echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sunmath.h presence" >&5 -echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sunmath.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sunmath.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sunmath.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sunmath.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sunmath.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sunmath.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sunmath.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for sunmath.h" >&5 -echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sunmath_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sunmath_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 -echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "sunmath.h" "ac_cv_header_sunmath_h" "$ac_includes_default" +if test "x$ac_cv_header_sunmath_h" = x""yes; then : fi @@ -9154,16 +6484,14 @@ fi else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } use_sunmath=no fi - fi - # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. @@ -9171,14 +6499,14 @@ fi SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - if test "$GCC" = yes; then + if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "$do64bit_ok" = yes; then + if test "$do64bit_ok" = yes; then : - if test "$arch" = "sparcv9 sparc"; then + if test "$arch" = "sparcv9 sparc"; then : # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. @@ -9189,26 +6517,22 @@ fi #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" else - if test "$arch" = "amd64 i386"; then + if test "$arch" = "amd64 i386"; then : SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" fi - fi - fi - else - if test "$use_sunmath" = yes; then + if test "$use_sunmath" = yes; then : textmode=textoff else textmode=text fi - case $system in SunOS-5.[1-9][0-9]*) SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";; @@ -9219,7 +6543,6 @@ fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi - ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" @@ -9230,19 +6553,15 @@ fi DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 -echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; } -if test "${tcl_cv_ld_Bexport+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5 +$as_echo_n "checking for ld accepts -Bexport flag... " >&6; } +if test "${tcl_cv_ld_Bexport+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9253,90 +6572,63 @@ int i; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_Bexport=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_ld_Bexport=no + tcl_cv_ld_Bexport=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 -echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; } - if test $tcl_cv_ld_Bexport = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5 +$as_echo "$tcl_cv_ld_Bexport" >&6; } + if test $tcl_cv_ld_Bexport = yes; then : LDFLAGS="$LDFLAGS -Wl,-Bexport" fi - CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; esac - if test "$do64bit" = yes -a "$do64bit_ok" = no; then + if test "$do64bit" = yes -a "$do64bit_ok" = no; then : - { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 -echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 +$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} fi - - if test "$do64bit" = yes -a "$do64bit_ok" = yes; then + if test "$do64bit" = yes -a "$do64bit_ok" = yes; then : -cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_DO64BIT 1 -_ACEOF +$as_echo "#define TCL_CFG_DO64BIT 1" >>confdefs.h fi - # Step 4: disable dynamic loading if requested via a command-line switch. # Check whether --enable-load was given. -if test "${enable_load+set}" = set; then +if test "${enable_load+set}" = set; then : enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes fi - if test "$tcl_ok" = no; then + if test "$tcl_ok" = no; then : DL_OBJS="" fi - - if test "x$DL_OBJS" != x; then + if test "x$DL_OBJS" != x; then : BUILD_DLTEST="\$(DLTEST_TARGETS)" else - { echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5 -echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5 +$as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;} SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" @@ -9348,14 +6640,13 @@ echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libr BUILD_DLTEST="" fi - LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. - if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then + if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then : case $system in AIX-*) ;; @@ -9369,24 +6660,21 @@ fi esac fi - - if test "$SHARED_LIB_SUFFIX" = ""; then + if test "$SHARED_LIB_SUFFIX" = ""; then : SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}' fi - - if test "$UNSHARED_LIB_SUFFIX" = ""; then + if test "$UNSHARED_LIB_SUFFIX" = ""; then : UNSHARED_LIB_SUFFIX='${VERSION}.a' fi - DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" - if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then + if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then : LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - if test "${SHLIB_SUFFIX}" = ".dll"; then + if test "${SHLIB_SUFFIX}" = ".dll"; then : INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" @@ -9397,12 +6685,11 @@ else fi - else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} - if test "$RANLIB" = ""; then + if test "$RANLIB" = ""; then : MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' @@ -9414,12 +6701,10 @@ else fi - fi - # Stub lib does not depend on shared/static configuration - if test "$RANLIB" = ""; then + if test "$RANLIB" = ""; then : MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}' INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"' @@ -9431,17 +6716,15 @@ else fi - # Define TCL_LIBS now that we know what DL_LIBS is. # The trick here is that we don't want to change the value of TCL_LIBS if # it is already set when tclConfig.sh had been loaded by Tk. - if test "x${TCL_LIBS}" = x; then + if test "x${TCL_LIBS}" = x; then : TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}" fi - # FIXME: This subst was left in only because the TCL_DL_LIBS # entry in tclConfig.sh uses it. It is not clear why someone # would use TCL_DL_LIBS instead of TCL_LIBS. @@ -9484,10 +6767,10 @@ _ACEOF - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 +$as_echo_n "checking for build with symbols... " >&6; } # Check whether --enable-symbols was given. -if test "${enable_symbols+set}" = set; then +if test "${enable_symbols+set}" = set; then : enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no @@ -9498,7582 +6781,2607 @@ fi if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_OPTIMIZED 1 -_ACEOF +$as_echo "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h else CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 +$as_echo "yes (standard debugging)" >&6; } fi fi ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging? -cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_DEBUG 1 -_ACEOF +$as_echo "#define TCL_CFG_DEBUG 1" >>confdefs.h if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then -cat >>confdefs.h <<\_ACEOF -#define TCL_MEM_DEBUG 1 -_ACEOF +$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h fi if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then -cat >>confdefs.h <<\_ACEOF -#define TCL_COMPILE_DEBUG 1 -_ACEOF +$as_echo "#define TCL_COMPILE_DEBUG 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define TCL_COMPILE_STATS 1 -_ACEOF +$as_echo "#define TCL_COMPILE_STATS 1" >>confdefs.h fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem compile debugging" >&5 +$as_echo "enabled symbols mem compile debugging" >&6; } else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 +$as_echo "enabled $tcl_ok debugging" >&6; } fi fi -cat >>confdefs.h <<\_ACEOF -#define TCL_TOMMATH 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define MP_PREC 4 -_ACEOF - - -#-------------------------------------------------------------------- -# Detect what compiler flags to set for 64-bit support. -#-------------------------------------------------------------------- - - - { echo "$as_me:$LINENO: checking for required early compiler flags" >&5 -echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; } - tcl_flags="" - - if test "${tcl_cv_flag__isoc99_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *)strtoll; char *q = (char *)strtoull; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__isoc99_source=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _ISOC99_SOURCE 1 -#include -int -main () -{ -char *p = (char *)strtoll; char *q = (char *)strtoull; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__isoc99_source=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_flag__isoc99_source=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define _ISOC99_SOURCE 1 -_ACEOF - - tcl_flags="$tcl_flags _ISOC99_SOURCE" - fi - - - if test "${tcl_cv_flag__largefile64_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -struct stat64 buf; int i = stat64("/", &buf); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__largefile64_source=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _LARGEFILE64_SOURCE 1 -#include -int -main () -{ -struct stat64 buf; int i = stat64("/", &buf); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__largefile64_source=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_flag__largefile64_source=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define _LARGEFILE64_SOURCE 1 -_ACEOF - - tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" - fi - - - if test "${tcl_cv_flag__largefile_source64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *)open64; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__largefile_source64=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE64 1 -#include -int -main () -{ -char *p = (char *)open64; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_flag__largefile_source64=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_flag__largefile_source64=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define _LARGEFILE_SOURCE64 1 -_ACEOF - - tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" - fi - - if test "x${tcl_flags}" = "x" ; then - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } - else - { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 -echo "${ECHO_T}${tcl_flags}" >&6; } - fi - - - - { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 -echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; } - if test "${tcl_cv_type_64bit+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - tcl_cv_type_64bit=none - # See if the compiler knows natively about __int64 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -__int64 value = (__int64) 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_type_64bit=__int64 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_type_64bit="long long" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - # See if we should use long anyway Note that we substitute in the - # type that is our current guess for a 64-bit type inside this check - # program, so it should be modified only carefully... - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -switch (0) { - case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; - } - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_type_64bit=${tcl_type_64bit} -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test "${tcl_cv_type_64bit}" = none ; then - -cat >>confdefs.h <<\_ACEOF -#define TCL_WIDE_INT_IS_LONG 1 -_ACEOF - - { echo "$as_me:$LINENO: result: using long" >&5 -echo "${ECHO_T}using long" >&6; } - else - -cat >>confdefs.h <<_ACEOF -#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} -_ACEOF - - { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 -echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; } - - # Now check for auxiliary declarations - { echo "$as_me:$LINENO: checking for struct dirent64" >&5 -echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; } -if test "${tcl_cv_struct_dirent64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -struct dirent64 p; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_struct_dirent64=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_struct_dirent64=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 -echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; } - if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_DIRENT64 1 -_ACEOF - - fi - - { echo "$as_me:$LINENO: checking for struct stat64" >&5 -echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; } -if test "${tcl_cv_struct_stat64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -struct stat64 p; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_struct_stat64=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_struct_stat64=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 -echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; } - if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_STAT64 1 -_ACEOF - - fi - - - -for ac_func in open64 lseek64 -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - { echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; } - if test "${tcl_cv_type_off64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -off64_t offset; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_type_off64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_type_off64_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - - if test "x${tcl_cv_type_off64_t}" = "xyes" && \ - test "x${ac_cv_func_lseek64}" = "xyes" && \ - test "x${ac_cv_func_open64}" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TYPE_OFF64_T 1 -_ACEOF - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - -#-------------------------------------------------------------------- -# Check endianness because we can optimize comparisons of -# Tcl_UniChar strings to memcmp on big-endian systems. -#-------------------------------------------------------------------- - -{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) - bogus endian macros -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_bigendian=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } -int -main () -{ - _ascii (); _ebcdic (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } -case $ac_cv_c_bigendian in - yes) - -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac - - -#-------------------------------------------------------------------- -# Supply substitutes for missing POSIX library procedures, or -# set flags so Tcl uses alternate procedures. -#-------------------------------------------------------------------- - -# Check if Posix compliant getcwd exists, if not we'll use getwd. - -for ac_func in getcwd -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - -cat >>confdefs.h <<\_ACEOF -#define USEGETWD 1 -_ACEOF - -fi -done - -# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really -# define USEGETWD even if the posix getcwd exists. Add a test ? - - - - - -for ac_func in mkstemp opendir strtol waitpid -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - case " $LIBOBJS " in - *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; -esac - -fi -done - - -{ echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6; } -if test "${ac_cv_func_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define strerror to an innocuous variant, in case declares strerror. - For example, HP-UX 11i declares gettimeofday. */ -#define strerror innocuous_strerror - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strerror (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef strerror - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strerror (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_strerror || defined __stub___strerror -choke me -#endif - -int -main () -{ -return strerror (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_strerror=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strerror=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6; } -if test $ac_cv_func_strerror = yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define NO_STRERROR 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for getwd" >&5 -echo $ECHO_N "checking for getwd... $ECHO_C" >&6; } -if test "${ac_cv_func_getwd+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getwd to an innocuous variant, in case declares getwd. - For example, HP-UX 11i declares gettimeofday. */ -#define getwd innocuous_getwd - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getwd (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getwd - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getwd (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getwd || defined __stub___getwd -choke me -#endif - -int -main () -{ -return getwd (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getwd=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getwd=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 -echo "${ECHO_T}$ac_cv_func_getwd" >&6; } -if test $ac_cv_func_getwd = yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define NO_GETWD 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for wait3" >&5 -echo $ECHO_N "checking for wait3... $ECHO_C" >&6; } -if test "${ac_cv_func_wait3+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define wait3 to an innocuous variant, in case declares wait3. - For example, HP-UX 11i declares gettimeofday. */ -#define wait3 innocuous_wait3 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wait3 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef wait3 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char wait3 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_wait3 || defined __stub___wait3 -choke me -#endif - -int -main () -{ -return wait3 (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_wait3=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_wait3=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 -echo "${ECHO_T}$ac_cv_func_wait3" >&6; } -if test $ac_cv_func_wait3 = yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define NO_WAIT3 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6; } -if test "${ac_cv_func_uname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define uname to an innocuous variant, in case declares uname. - For example, HP-UX 11i declares gettimeofday. */ -#define uname innocuous_uname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char uname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef uname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char uname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_uname || defined __stub___uname -choke me -#endif - -int -main () -{ -return uname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_uname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_uname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -echo "${ECHO_T}$ac_cv_func_uname" >&6; } -if test $ac_cv_func_uname = yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define NO_UNAME 1 -_ACEOF - -fi - - -if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ - test "`uname -r | awk -F. '{print $1}'`" -lt 7; then - # prior to Darwin 7, realpath is not threadsafe, so don't - # use it when threads are enabled, c.f. bug # 711232 - ac_cv_func_realpath=no -fi -{ echo "$as_me:$LINENO: checking for realpath" >&5 -echo $ECHO_N "checking for realpath... $ECHO_C" >&6; } -if test "${ac_cv_func_realpath+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define realpath to an innocuous variant, in case declares realpath. - For example, HP-UX 11i declares gettimeofday. */ -#define realpath innocuous_realpath - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char realpath (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef realpath - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char realpath (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_realpath || defined __stub___realpath -choke me -#endif - -int -main () -{ -return realpath (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_realpath=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_realpath=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 -echo "${ECHO_T}$ac_cv_func_realpath" >&6; } -if test $ac_cv_func_realpath = yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define NO_REALPATH 1 -_ACEOF - -fi - - -{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } -if test "${ac_cv_func_getaddrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. - For example, HP-UX 11i declares gettimeofday. */ -#define getaddrinfo innocuous_getaddrinfo - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getaddrinfo (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getaddrinfo - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getaddrinfo (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getaddrinfo || defined __stub___getaddrinfo -choke me -#endif - -int -main () -{ -return getaddrinfo (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getaddrinfo=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getaddrinfo=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } -if test $ac_cv_func_getaddrinfo = yes; then - - { echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 -echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6; } -if test "${tcl_cv_api_getaddrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - const char *name, *port; - struct addrinfo *aiPtr, hints; - (void)getaddrinfo(name,port, &hints, &aiPtr); - (void)freeaddrinfo(aiPtr); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getaddrinfo=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_getaddrinfo=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 -echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6; } - tcl_ok=$tcl_cv_api_getaddrinfo - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETADDRINFO 1 -_ACEOF - - fi - -fi - - -#-------------------------------------------------------------------- -# Look for thread-safe variants of some library functions. -#-------------------------------------------------------------------- - -if test "${TCL_THREADS}" = 1; then - { echo "$as_me:$LINENO: checking for getpwuid_r" >&5 -echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6; } -if test "${ac_cv_func_getpwuid_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getpwuid_r to an innocuous variant, in case declares getpwuid_r. - For example, HP-UX 11i declares gettimeofday. */ -#define getpwuid_r innocuous_getpwuid_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getpwuid_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getpwuid_r - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getpwuid_r (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwuid_r || defined __stub___getpwuid_r -choke me -#endif - -int -main () -{ -return getpwuid_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getpwuid_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getpwuid_r=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6; } -if test $ac_cv_func_getpwuid_r = yes; then - - { echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - uid_t uid; - struct passwd pw, *pwp; - char buf[512]; - int buflen = 512; - - (void) getpwuid_r(uid, &pw, buf, buflen, &pwp); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getpwuid_r_5=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getpwuid_r_5=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6; } - tcl_ok=$tcl_cv_api_getpwuid_r_5 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPWUID_R_5 1 -_ACEOF - - else - { echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 -echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - uid_t uid; - struct passwd pw; - char buf[512]; - int buflen = 512; - - (void)getpwnam_r(uid, &pw, buf, buflen); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getpwuid_r_4=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getpwuid_r_4=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6; } - tcl_ok=$tcl_cv_api_getpwuid_r_4 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPWUID_R_4 1 -_ACEOF - - fi - fi - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPWUID_R 1 -_ACEOF - - fi - -fi - - { echo "$as_me:$LINENO: checking for getpwnam_r" >&5 -echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6; } -if test "${ac_cv_func_getpwnam_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getpwnam_r to an innocuous variant, in case declares getpwnam_r. - For example, HP-UX 11i declares gettimeofday. */ -#define getpwnam_r innocuous_getpwnam_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getpwnam_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getpwnam_r - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getpwnam_r (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getpwnam_r || defined __stub___getpwnam_r -choke me -#endif - -int -main () -{ -return getpwnam_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getpwnam_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getpwnam_r=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6; } -if test $ac_cv_func_getpwnam_r = yes; then - - { echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - char *name; - struct passwd pw, *pwp; - char buf[512]; - int buflen = 512; - - (void) getpwnam_r(name, &pw, buf, buflen, &pwp); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getpwnam_r_5=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getpwnam_r_5=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6; } - tcl_ok=$tcl_cv_api_getpwnam_r_5 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPWNAM_R_5 1 -_ACEOF - - else - { echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 -echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - char *name; - struct passwd pw; - char buf[512]; - int buflen = 512; - - (void)getpwnam_r(name, &pw, buf, buflen); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getpwnam_r_4=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getpwnam_r_4=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6; } - tcl_ok=$tcl_cv_api_getpwnam_r_4 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPWNAM_R_4 1 -_ACEOF - - fi - fi - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPWNAM_R 1 -_ACEOF - - fi - -fi - - { echo "$as_me:$LINENO: checking for getgrgid_r" >&5 -echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6; } -if test "${ac_cv_func_getgrgid_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getgrgid_r to an innocuous variant, in case declares getgrgid_r. - For example, HP-UX 11i declares gettimeofday. */ -#define getgrgid_r innocuous_getgrgid_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getgrgid_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getgrgid_r - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getgrgid_r (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrgid_r || defined __stub___getgrgid_r -choke me -#endif - -int -main () -{ -return getgrgid_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getgrgid_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getgrgid_r=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6; } -if test $ac_cv_func_getgrgid_r = yes; then - - { echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - gid_t gid; - struct group gr, *grp; - char buf[512]; - int buflen = 512; - - (void) getgrgid_r(gid, &gr, buf, buflen, &grp); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getgrgid_r_5=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getgrgid_r_5=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6; } - tcl_ok=$tcl_cv_api_getgrgid_r_5 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETGRGID_R_5 1 -_ACEOF - - else - { echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 -echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - gid_t gid; - struct group gr; - char buf[512]; - int buflen = 512; - - (void)getgrgid_r(gid, &gr, buf, buflen); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getgrgid_r_4=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getgrgid_r_4=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6; } - tcl_ok=$tcl_cv_api_getgrgid_r_4 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETGRGID_R_4 1 -_ACEOF - - fi - fi - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETGRGID_R 1 -_ACEOF - - fi - -fi - - { echo "$as_me:$LINENO: checking for getgrnam_r" >&5 -echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6; } -if test "${ac_cv_func_getgrnam_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define getgrnam_r to an innocuous variant, in case declares getgrnam_r. - For example, HP-UX 11i declares gettimeofday. */ -#define getgrnam_r innocuous_getgrnam_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getgrnam_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getgrnam_r - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getgrnam_r (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getgrnam_r || defined __stub___getgrnam_r -choke me -#endif - -int -main () -{ -return getgrnam_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_getgrnam_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_getgrnam_r=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 -echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6; } -if test $ac_cv_func_getgrnam_r = yes; then - - { echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - char *name; - struct group gr, *grp; - char buf[512]; - int buflen = 512; - - (void) getgrnam_r(name, &gr, buf, buflen, &grp); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getgrnam_r_5=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getgrnam_r_5=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6; } - tcl_ok=$tcl_cv_api_getgrnam_r_5 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETGRNAM_R_5 1 -_ACEOF - - else - { echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 -echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include - -int -main () -{ - - char *name; - struct group gr; - char buf[512]; - int buflen = 512; - - (void)getgrnam_r(name, &gr, buf, buflen); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_getgrnam_r_4=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_getgrnam_r_4=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 -echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6; } - tcl_ok=$tcl_cv_api_getgrnam_r_4 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETGRNAM_R_4 1 -_ACEOF - - fi - fi - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETGRNAM_R 1 -_ACEOF - - fi - -fi - - if test "`uname -s`" = "Darwin" && \ - test "`uname -r | awk -F. '{print $1}'`" -gt 5; then - # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX - # are actually MT-safe as they always return pointers - # from TSD instead of static storage. - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MTSAFE_GETHOSTBYNAME 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MTSAFE_GETHOSTBYADDR 1 -_ACEOF - - - elif test "`uname -s`" = "HP-UX" && \ - test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then - # Starting with HPUX 11.00 (we believe), gethostbyX - # are actually MT-safe as they always return pointers - # from TSD instead of static storage. - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MTSAFE_GETHOSTBYNAME 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MTSAFE_GETHOSTBYADDR 1 -_ACEOF - - - else - { echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } -if test "${ac_cv_func_gethostbyname_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname_r to an innocuous variant, in case declares gethostbyname_r. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname_r innocuous_gethostbyname_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname_r - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname_r (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r -choke me -#endif - -int -main () -{ -return gethostbyname_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_gethostbyname_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname_r=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } -if test $ac_cv_func_gethostbyname_r = yes; then - - { echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - char *name; - struct hostent *he, *res; - char buffer[2048]; - int buflen = 2048; - int h_errnop; - - (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_gethostbyname_r_6=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_gethostbyname_r_6=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6; } - tcl_ok=$tcl_cv_api_gethostbyname_r_6 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYNAME_R_6 1 -_ACEOF - - else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - char *name; - struct hostent *he; - char buffer[2048]; - int buflen = 2048; - int h_errnop; - - (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_gethostbyname_r_5=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_gethostbyname_r_5=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6; } - tcl_ok=$tcl_cv_api_gethostbyname_r_5 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYNAME_R_5 1 -_ACEOF - - else - { echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - char *name; - struct hostent *he; - struct hostent_data data; - - (void) gethostbyname_r(name, he, &data); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_gethostbyname_r_3=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_gethostbyname_r_3=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6; } - tcl_ok=$tcl_cv_api_gethostbyname_r_3 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYNAME_R_3 1 -_ACEOF - - fi - fi - fi - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYNAME_R 1 -_ACEOF - - fi - -fi - - { echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 -echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6; } -if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyaddr_r to an innocuous variant, in case declares gethostbyaddr_r. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyaddr_r innocuous_gethostbyaddr_r - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyaddr_r (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyaddr_r - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyaddr_r (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r -choke me -#endif - -int -main () -{ -return gethostbyaddr_r (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_gethostbyaddr_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyaddr_r=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6; } -if test $ac_cv_func_gethostbyaddr_r = yes; then - - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - char *addr; - int length; - int type; - struct hostent *result; - char buffer[2048]; - int buflen = 2048; - int h_errnop; - - (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, - &h_errnop); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_gethostbyaddr_r_7=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_gethostbyaddr_r_7=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6; } - tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYADDR_R_7 1 -_ACEOF - - else - { echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 -echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6; } -if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - -int -main () -{ - - char *addr; - int length; - int type; - struct hostent *result, *resultp; - char buffer[2048]; - int buflen = 2048; - int h_errnop; - - (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, - &resultp, &h_errnop); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_api_gethostbyaddr_r_8=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_gethostbyaddr_r_8=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6; } - tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYADDR_R_8 1 -_ACEOF - - fi - fi - if test "$tcl_ok" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETHOSTBYADDR_R 1 -_ACEOF - - fi - -fi - - fi -fi - -#--------------------------------------------------------------------------- -# Determine which interface to use to talk to the serial port. -# Note that #include lines must begin in leftmost column for -# some compilers to recognize them as preprocessor directives. -#--------------------------------------------------------------------------- - - - -for ac_header in sys/modem.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - { echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 -echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6; } -if test "${tcl_cv_api_serial+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test "$cross_compiling" = yes; then - tcl_cv_api_serial=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -int main() { - struct termios t; - if (tcgetattr(0, &t) == 0) { - cfsetospeed(&t, 0); - t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_api_serial=termios -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_api_serial=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - if test $tcl_cv_api_serial = no ; then - if test "$cross_compiling" = yes; then - tcl_cv_api_serial=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -int main() { - struct termio t; - if (ioctl(0, TCGETA, &t) == 0) { - t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_api_serial=termio -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_api_serial=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi - if test $tcl_cv_api_serial = no ; then - if test "$cross_compiling" = yes; then - tcl_cv_api_serial=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -int main() { - struct sgttyb t; - if (ioctl(0, TIOCGETP, &t) == 0) { - t.sg_ospeed = 0; - t.sg_flags |= ODDP | EVENP | RAW; - return 0; - } - return 1; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_api_serial=sgtty -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_api_serial=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi - if test $tcl_cv_api_serial = no ; then - if test "$cross_compiling" = yes; then - tcl_cv_api_serial=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -int main() { - struct termios t; - if (tcgetattr(0, &t) == 0 - || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { - cfsetospeed(&t, 0); - t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_api_serial=termios -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_api_serial=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi - if test $tcl_cv_api_serial = no; then - if test "$cross_compiling" = yes; then - tcl_cv_api_serial=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -int main() { - struct termio t; - if (ioctl(0, TCGETA, &t) == 0 - || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { - t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; - } -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_api_serial=termio -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_api_serial=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi - if test $tcl_cv_api_serial = no; then - if test "$cross_compiling" = yes; then - tcl_cv_api_serial=none -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -int main() { - struct sgttyb t; - if (ioctl(0, TIOCGETP, &t) == 0 - || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { - t.sg_ospeed = 0; - t.sg_flags |= ODDP | EVENP | RAW; - return 0; - } - return 1; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_api_serial=sgtty -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_api_serial=none -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 -echo "${ECHO_T}$tcl_cv_api_serial" >&6; } - case $tcl_cv_api_serial in - termios) -cat >>confdefs.h <<\_ACEOF -#define USE_TERMIOS 1 -_ACEOF -;; - termio) -cat >>confdefs.h <<\_ACEOF -#define USE_TERMIO 1 -_ACEOF -;; - sgtty) -cat >>confdefs.h <<\_ACEOF -#define USE_SGTTY 1 -_ACEOF -;; - esac - - +$as_echo "#define TCL_TOMMATH 1" >>confdefs.h + + +$as_echo "#define MP_PREC 4" >>confdefs.h + + #-------------------------------------------------------------------- -# Include sys/select.h if it exists and if it supplies things -# that appear to be useful and aren't already in sys/types.h. -# This appears to be true only on the RS/6000 under AIX. Some -# systems like OSF/1 have a sys/select.h that's of no use, and -# other systems like SCO UNIX have a sys/select.h that's -# pernicious. If "fd_set" isn't defined anywhere then set a -# special flag. +# Detect what compiler flags to set for 64-bit support. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 -echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6; } -if test "${tcl_cv_type_fd_set+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5 +$as_echo_n "checking for required early compiler flags... " >&6; } + tcl_flags="" + + if test "${tcl_cv_flag__isoc99_source+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -fd_set readMask, writeMask; +char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_type_fd_set=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_type_fd_set=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 -echo "${ECHO_T}$tcl_cv_type_fd_set" >&6; } -tcl_ok=$tcl_cv_type_fd_set -if test $tcl_ok = no; then - { echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 -echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6; } -if test "${tcl_cv_grep_fd_mask+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__isoc99_source=no else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +#define _ISOC99_SOURCE 1 +#include +int +main () +{ +char *p = (char *)strtoll; char *q = (char *)strtoull; + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "fd_mask" >/dev/null 2>&1; then - tcl_cv_grep_fd_mask=present +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__isoc99_source=yes else - tcl_cv_grep_fd_mask=missing + tcl_cv_flag__isoc99_source=no fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 -echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6; } - if test $tcl_cv_grep_fd_mask = present; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_SELECT_H 1 -_ACEOF - - tcl_ok=yes - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -if test $tcl_ok = no; then -cat >>confdefs.h <<\_ACEOF -#define NO_FD_SET 1 -_ACEOF - -fi + if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then -#------------------------------------------------------------------------------ -# Find out all about time handling differences. -#------------------------------------------------------------------------------ +$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h + tcl_flags="$tcl_flags _ISOC99_SOURCE" + fi -for ac_header in sys/time.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } + if test "${tcl_cv_flag__largefile64_source+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +#include +int +main () +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile64_source=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <$ac_header> +#define _LARGEFILE64_SOURCE 1 +#include +int +main () +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile64_source=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + tcl_cv_flag__largefile64_source=no fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi + if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then + +$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h + + tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" + fi -done - { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } -if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${tcl_cv_flag__largefile_source64+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *)open64; + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile_source64=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include - +#define _LARGEFILE_SOURCE64 1 +#include int main () { -if ((struct tm *) 0) -return 0; +char *p = (char *)open64; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_time=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_flag__largefile_source64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no + tcl_cv_flag__largefile_source64=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then +$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h + tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" + fi + if test "x${tcl_flags}" = "x" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5 +$as_echo "${tcl_flags}" >&6; } + fi -for ac_func in gmtime_r localtime_r mktime -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 +$as_echo_n "checking for 64-bit integer type... " >&6; } + if test "${tcl_cv_type_64bit+set}" = set; then : + $as_echo_n "(cached) " >&6 +else -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif + tcl_cv_type_64bit=none + # See if the compiler knows natively about __int64 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () { -return $ac_func (); +__int64 value = (__int64) 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_compile "$LINENO"; then : + tcl_type_64bit=__int64 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - + tcl_type_64bit="long long" fi -done - - - { echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 -echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6; } -if test "${tcl_cv_member_tm_tzadj+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # See if we should use long anyway Note that we substitute in the + # type that is our current guess for a 64-bit type inside this check + # program, so it should be modified only carefully... + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -struct tm tm; tm.tm_tzadj; +switch (0) { + case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; + } ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_member_tm_tzadj=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_member_tm_tzadj=no +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_type_64bit=${tcl_type_64bit} fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6; } - if test $tcl_cv_member_tm_tzadj = yes ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_TZADJ 1 + if test "${tcl_cv_type_64bit}" = none ; then + +$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5 +$as_echo "using long" >&6; } + else + +cat >>confdefs.h <<_ACEOF +#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5 +$as_echo "${tcl_cv_type_64bit}" >&6; } - { echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 -echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6; } -if test "${tcl_cv_member_tm_gmtoff+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + # Now check for auxiliary declarations + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 +$as_echo_n "checking for struct dirent64... " >&6; } +if test "${tcl_cv_struct_dirent64+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +#include int main () { -struct tm tm; tm.tm_gmtoff; +struct dirent64 p; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_member_tm_gmtoff=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_struct_dirent64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_member_tm_gmtoff=no + tcl_cv_struct_dirent64=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 -echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6; } - if test $tcl_cv_member_tm_gmtoff = yes ; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5 +$as_echo "$tcl_cv_struct_dirent64" >&6; } + if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_GMTOFF 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h - fi + fi - # - # Its important to include time.h in this check, as some systems - # (like convex) have timezone functions, etc. - # - { echo "$as_me:$LINENO: checking long timezone variable" >&5 -echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6; } -if test "${tcl_cv_timezone_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 +$as_echo_n "checking for struct stat64... " >&6; } +if test "${tcl_cv_struct_stat64+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -extern long timezone; - timezone += 1; - exit (0); +struct stat64 p; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_timezone_long=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_struct_stat64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_timezone_long=no + tcl_cv_struct_stat64=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 -echo "${ECHO_T}$tcl_cv_timezone_long" >&6; } - if test $tcl_cv_timezone_long = yes ; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 +$as_echo "$tcl_cv_struct_stat64" >&6; } + if test "x${tcl_cv_struct_stat64}" = "xyes" ; then + +$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h + + fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMEZONE_VAR 1 + for ac_func in open64 lseek64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - else - # - # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. - # - { echo "$as_me:$LINENO: checking time_t timezone variable" >&5 -echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6; } -if test "${tcl_cv_timezone_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 +$as_echo_n "checking for off64_t... " >&6; } + if test "${tcl_cv_type_off64_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -extern time_t timezone; - timezone += 1; - exit (0); +off64_t offset; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_timezone_time=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_type_off64_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_timezone_time=no + tcl_cv_type_off64_t=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 -echo "${ECHO_T}$tcl_cv_timezone_time" >&6; } - if test $tcl_cv_timezone_time = yes ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMEZONE_VAR 1 -_ACEOF + if test "x${tcl_cv_type_off64_t}" = "xyes" && \ + test "x${ac_cv_func_lseek64}" = "xyes" && \ + test "x${ac_cv_func_open64}" = "xyes" ; then + +$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi #-------------------------------------------------------------------- -# Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But -# we might be able to use fstatfs instead. Some systems (OpenBSD?) also -# lack blkcnt_t. +# Check endianness because we can optimize comparisons of +# Tcl_UniChar strings to memcmp on big-endian systems. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include + #include + int main () { -static struct stat ac_aggr; -if (ac_aggr.st_blocks) -return 0; +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blocks=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include + #include + int main () { -static struct stat ac_aggr; -if (sizeof ac_aggr.st_blocks) -return 0; +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blocks=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_blocks=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } -if test $ac_cv_member_struct_stat_st_blocks = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 -_ACEOF + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif -fi -{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include + int main () { -static struct stat ac_aggr; -if (ac_aggr.st_blksize) -return 0; +#ifndef _BIG_ENDIAN + not big endian + #endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blksize=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { -static struct stat ac_aggr; -if (sizeof ac_aggr.st_blksize) -return 0; + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_blksize=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + +#-------------------------------------------------------------------- +# Supply substitutes for missing POSIX library procedures, or +# set flags so Tcl uses alternate procedures. +#-------------------------------------------------------------------- + +# Check if Posix compliant getcwd exists, if not we'll use getwd. +for ac_func in getcwd +do : + ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETCWD 1 +_ACEOF + +else + +$as_echo "#define USEGETWD 1" >>confdefs.h + +fi +done + +# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really +# define USEGETWD even if the posix getcwd exists. Add a test ? + +for ac_func in mkstemp opendir strtol waitpid +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac - ac_cv_member_struct_stat_st_blksize=no fi +done -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = x""yes; then : + +else + +$as_echo "#define NO_STRERROR 1" >>confdefs.h + fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } -if test $ac_cv_member_struct_stat_st_blksize = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd" +if test "x$ac_cv_func_getwd" = x""yes; then : +else + +$as_echo "#define NO_GETWD 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for blkcnt_t" >&5 -echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6; } -if test "${ac_cv_type_blkcnt_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" +if test "x$ac_cv_func_wait3" = x""yes; then : + else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef blkcnt_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_blkcnt_t=yes + +$as_echo "#define NO_WAIT3 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = x""yes; then : + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_blkcnt_t=no +$as_echo "#define NO_UNAME 1" >>confdefs.h + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ + test "`uname -r | awk -F. '{print $1}'`" -lt 7; then + # prior to Darwin 7, realpath is not threadsafe, so don't + # use it when threads are enabled, c.f. bug # 711232 + ac_cv_func_realpath=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 -echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6; } -if test $ac_cv_type_blkcnt_t = yes; then +ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" +if test "x$ac_cv_func_realpath" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_BLKCNT_T 1 -_ACEOF +else +$as_echo "#define NO_REALPATH 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for fstatfs" >&5 -echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6; } -if test "${ac_cv_func_fstatfs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define fstatfs to an innocuous variant, in case declares fstatfs. - For example, HP-UX 11i declares gettimeofday. */ -#define fstatfs innocuous_fstatfs -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char fstatfs (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = x""yes; then : -#ifdef __STDC__ -# include -#else -# include -#endif + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getaddrinfo" >&5 +$as_echo_n "checking for working getaddrinfo... " >&6; } +if test "${tcl_cv_api_getaddrinfo+set}" = set; then : + $as_echo_n "(cached) " >&6 +else -#undef fstatfs + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fstatfs (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_fstatfs || defined __stub___fstatfs -choke me -#endif + #include int main () { -return fstatfs (); + + const char *name, *port; + struct addrinfo *aiPtr, hints; + (void)getaddrinfo(name,port, &hints, &aiPtr); + (void)freeaddrinfo(aiPtr); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_fstatfs=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getaddrinfo=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_fstatfs=no + tcl_cv_getaddrinfo=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 -echo "${ECHO_T}$ac_cv_func_fstatfs" >&6; } -if test $ac_cv_func_fstatfs = yes; then - : -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getaddrinfo" >&5 +$as_echo "$tcl_cv_api_getaddrinfo" >&6; } + tcl_ok=$tcl_cv_api_getaddrinfo + if test "$tcl_ok" = yes; then -cat >>confdefs.h <<\_ACEOF -#define NO_FSTATFS 1 -_ACEOF +$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h + + fi fi #-------------------------------------------------------------------- -# Some system have no memcmp or it does not work with 8 bit data, this -# checks it and add memcmp.o to LIBOBJS if needed +# Look for thread-safe variants of some library functions. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } -if test "${ac_cv_func_memcmp_working+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_working=no +if test "${TCL_THREADS}" = 1; then + ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r" +if test "x$ac_cv_func_getpwuid_r" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwuid_r with 5 args" >&5 +$as_echo_n "checking for getpwuid_r with 5 args... " >&6; } +if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + + #include + #include + int main () { - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + uid_t uid; + struct passwd pw, *pwp; + char buf[512]; + int buflen = 512; - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } + (void) getpwuid_r(uid, &pw, buf, buflen, &pwp); ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_memcmp_working=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getpwuid_r_5=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_memcmp_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + tcl_cv_api_getpwuid_r_5=no fi - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwuid_r_5" >&5 +$as_echo "$tcl_cv_api_getpwuid_r_5" >&6; } + tcl_ok=$tcl_cv_api_getpwuid_r_5 + if test "$tcl_ok" = yes; then -#-------------------------------------------------------------------- -# Some system like SunOS 4 and other BSD like systems have no memmove -# (we assume they have bcopy instead). {The replacement define is in -# compat/string.h} -#-------------------------------------------------------------------- +$as_echo "#define HAVE_GETPWUID_R_5 1" >>confdefs.h -{ echo "$as_me:$LINENO: checking for memmove" >&5 -echo $ECHO_N "checking for memmove... $ECHO_C" >&6; } -if test "${ac_cv_func_memmove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwuid_r with 4 args" >&5 +$as_echo_n "checking for getpwuid_r with 4 args... " >&6; } +if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define memmove to an innocuous variant, in case declares memmove. - For example, HP-UX 11i declares gettimeofday. */ -#define memmove innocuous_memmove - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char memmove (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif -#undef memmove + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char memmove (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_memmove || defined __stub___memmove -choke me -#endif + #include + #include int main () { -return memmove (); + + uid_t uid; + struct passwd pw; + char buf[512]; + int buflen = 512; + + (void)getpwnam_r(uid, &pw, buf, buflen); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_memmove=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getpwuid_r_4=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_memmove=no + tcl_cv_api_getpwuid_r_4=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 -echo "${ECHO_T}$ac_cv_func_memmove" >&6; } -if test $ac_cv_func_memmove = yes; then - : -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwuid_r_4" >&5 +$as_echo "$tcl_cv_api_getpwuid_r_4" >&6; } + tcl_ok=$tcl_cv_api_getpwuid_r_4 + if test "$tcl_ok" = yes; then +$as_echo "#define HAVE_GETPWUID_R_4 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define NO_MEMMOVE 1 -_ACEOF + fi + fi + if test "$tcl_ok" = yes; then +$as_echo "#define HAVE_GETPWUID_R 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define NO_STRING_H 1 -_ACEOF + fi fi + ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r" +if test "x$ac_cv_func_getpwnam_r" = x""yes; then : -#-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even even if -# the original string is empty. -#-------------------------------------------------------------------- - - - { echo "$as_me:$LINENO: checking for strstr" >&5 -echo $ECHO_N "checking for strstr... $ECHO_C" >&6; } -if test "${ac_cv_func_strstr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define strstr to an innocuous variant, in case declares strstr. - For example, HP-UX 11i declares gettimeofday. */ -#define strstr innocuous_strstr - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strstr (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef strstr + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam_r with 5 args" >&5 +$as_echo_n "checking for getpwnam_r with 5 args... " >&6; } +if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then : + $as_echo_n "(cached) " >&6 +else -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strstr (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_strstr || defined __stub___strstr -choke me -#endif + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include int main () { -return strstr (); + + char *name; + struct passwd pw, *pwp; + char buf[512]; + int buflen = 512; + + (void) getpwnam_r(name, &pw, buf, buflen, &pwp); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_strstr=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getpwnam_r_5=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strstr=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + tcl_cv_api_getpwnam_r_5=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 -echo "${ECHO_T}$ac_cv_func_strstr" >&6; } -if test $ac_cv_func_strstr = yes; then - tcl_ok=1 -else - tcl_ok=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwnam_r_5" >&5 +$as_echo "$tcl_cv_api_getpwnam_r_5" >&6; } + tcl_ok=$tcl_cv_api_getpwnam_r_5 + if test "$tcl_ok" = yes; then - if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strstr implementation" >&5 -echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6; } -if test "${tcl_cv_strstr_unbroken+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - tcl_cv_strstr_unbroken=unknown +$as_echo "#define HAVE_GETPWNAM_R_5 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam_r with 4 args" >&5 +$as_echo_n "checking for getpwnam_r with 4 args... " >&6; } +if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int main() { - extern int strstr(); - exit(strstr("\0test", "test") ? 1 : 0); + + #include + #include + +int +main () +{ + + char *name; + struct passwd pw; + char buf[512]; + int buflen = 512; + + (void)getpwnam_r(name, &pw, buf, buflen); + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_strstr_unbroken=ok +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getpwnam_r_4=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_strstr_unbroken=broken + tcl_cv_api_getpwnam_r_4=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwnam_r_4" >&5 +$as_echo "$tcl_cv_api_getpwnam_r_4" >&6; } + tcl_ok=$tcl_cv_api_getpwnam_r_4 + if test "$tcl_ok" = yes; then +$as_echo "#define HAVE_GETPWNAM_R_4 1" >>confdefs.h -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6; } - if test "$tcl_cv_strstr_unbroken" = "ok"; then - tcl_ok=1 - else - tcl_ok=0 fi fi - if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; -esac + if test "$tcl_ok" = yes; then - USE_COMPAT=1 - fi +$as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h + fi -#-------------------------------------------------------------------- -# Check for strtoul function. This is tricky because under some -# versions of AIX strtoul returns an incorrect terminator -# pointer for the string "0". -#-------------------------------------------------------------------- +fi + ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r" +if test "x$ac_cv_func_getgrgid_r" = x""yes; then : - { echo "$as_me:$LINENO: checking for strtoul" >&5 -echo $ECHO_N "checking for strtoul... $ECHO_C" >&6; } -if test "${ac_cv_func_strtoul+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrgid_r with 5 args" >&5 +$as_echo_n "checking for getgrgid_r with 5 args... " >&6; } +if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define strtoul to an innocuous variant, in case declares strtoul. - For example, HP-UX 11i declares gettimeofday. */ -#define strtoul innocuous_strtoul - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strtoul (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif -#undef strtoul + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strtoul (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_strtoul || defined __stub___strtoul -choke me -#endif + #include + #include int main () { -return strtoul (); + + gid_t gid; + struct group gr, *grp; + char buf[512]; + int buflen = 512; + + (void) getgrgid_r(gid, &gr, buf, buflen, &grp); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_strtoul=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getgrgid_r_5=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strtoul=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + tcl_cv_api_getgrgid_r_5=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 -echo "${ECHO_T}$ac_cv_func_strtoul" >&6; } -if test $ac_cv_func_strtoul = yes; then - tcl_ok=1 -else - tcl_ok=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrgid_r_5" >&5 +$as_echo "$tcl_cv_api_getgrgid_r_5" >&6; } + tcl_ok=$tcl_cv_api_getgrgid_r_5 + if test "$tcl_ok" = yes; then - if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 -echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6; } -if test "${tcl_cv_strtoul_unbroken+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - tcl_cv_strtoul_unbroken=unknown +$as_echo "#define HAVE_GETGRGID_R_5 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrgid_r with 4 args" >&5 +$as_echo_n "checking for getgrgid_r with 4 args... " >&6; } +if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int main() { - extern int strtoul(); - char *term, *string = "0"; - exit(strtoul(string,&term,0) != 0 || term != string+1); + + #include + #include + +int +main () +{ + + gid_t gid; + struct group gr; + char buf[512]; + int buflen = 512; + + (void)getgrgid_r(gid, &gr, buf, buflen); + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_strtoul_unbroken=ok +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getgrgid_r_4=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_strtoul_unbroken=broken + tcl_cv_api_getgrgid_r_4=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrgid_r_4" >&5 +$as_echo "$tcl_cv_api_getgrgid_r_4" >&6; } + tcl_ok=$tcl_cv_api_getgrgid_r_4 + if test "$tcl_ok" = yes; then +$as_echo "#define HAVE_GETGRGID_R_4 1" >>confdefs.h -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6; } - if test "$tcl_cv_strtoul_unbroken" = "ok"; then - tcl_ok=1 - else - tcl_ok=0 fi fi - if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; -esac - - USE_COMPAT=1 - fi - - -#-------------------------------------------------------------------- -# Check for the strtod function. This is tricky because in some -# versions of Linux strtod mis-parses strings starting with "+". -#-------------------------------------------------------------------- - - - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } -if test "${ac_cv_func_strtod+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define strtod to an innocuous variant, in case declares strtod. - For example, HP-UX 11i declares gettimeofday. */ -#define strtod innocuous_strtod - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strtod (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + if test "$tcl_ok" = yes; then -#ifdef __STDC__ -# include -#else -# include -#endif +$as_echo "#define HAVE_GETGRGID_R 1" >>confdefs.h -#undef strtod + fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strtod (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod -choke me -#endif +fi + + ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r" +if test "x$ac_cv_func_getgrnam_r" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrnam_r with 5 args" >&5 +$as_echo_n "checking for getgrnam_r with 5 args... " >&6; } +if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include int main () { -return strtod (); + + char *name; + struct group gr, *grp; + char buf[512]; + int buflen = 512; + + (void) getgrnam_r(name, &gr, buf, buflen, &grp); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_strtod=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getgrnam_r_5=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strtod=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + tcl_cv_api_getgrnam_r_5=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = yes; then - tcl_ok=1 -else - tcl_ok=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrnam_r_5" >&5 +$as_echo "$tcl_cv_api_getgrnam_r_5" >&6; } + tcl_ok=$tcl_cv_api_getgrnam_r_5 + if test "$tcl_ok" = yes; then - if test "$tcl_ok" = 1; then - { echo "$as_me:$LINENO: checking proper strtod implementation" >&5 -echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6; } -if test "${tcl_cv_strtod_unbroken+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - tcl_cv_strtod_unbroken=unknown +$as_echo "#define HAVE_GETGRNAM_R_5 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrnam_r with 4 args" >&5 +$as_echo_n "checking for getgrnam_r with 4 args... " >&6; } +if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int main() { - extern double strtod(); - char *term, *string = " +69"; - exit(strtod(string,&term) != 69 || term != string+4); + + #include + #include + +int +main () +{ + + char *name; + struct group gr; + char buf[512]; + int buflen = 512; + + (void)getgrnam_r(name, &gr, buf, buflen); + + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_strtod_unbroken=ok +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_getgrnam_r_4=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_strtod_unbroken=broken + tcl_cv_api_getgrnam_r_4=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrnam_r_4" >&5 +$as_echo "$tcl_cv_api_getgrnam_r_4" >&6; } + tcl_ok=$tcl_cv_api_getgrnam_r_4 + if test "$tcl_ok" = yes; then +$as_echo "#define HAVE_GETGRNAM_R_4 1" >>confdefs.h -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 -echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6; } - if test "$tcl_cv_strtod_unbroken" = "ok"; then - tcl_ok=1 - else - tcl_ok=0 fi fi - if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; -esac + if test "$tcl_ok" = yes; then + +$as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h - USE_COMPAT=1 fi +fi -#-------------------------------------------------------------------- -# Under Solaris 2.4, strtod returns the wrong value for the -# terminating character under some conditions. Check for this -# and if the problem exists use a substitute procedure -# "fixstrtod" that corrects the error. -#-------------------------------------------------------------------- + if test "`uname -s`" = "Darwin" && \ + test "`uname -r | awk -F. '{print $1}'`" -gt 5; then + # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX + # are actually MT-safe as they always return pointers + # from TSD instead of static storage. +$as_echo "#define HAVE_MTSAFE_GETHOSTBYNAME 1" >>confdefs.h - { echo "$as_me:$LINENO: checking for strtod" >&5 -echo $ECHO_N "checking for strtod... $ECHO_C" >&6; } -if test "${ac_cv_func_strtod+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define strtod to an innocuous variant, in case declares strtod. - For example, HP-UX 11i declares gettimeofday. */ -#define strtod innocuous_strtod -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strtod (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +$as_echo "#define HAVE_MTSAFE_GETHOSTBYADDR 1" >>confdefs.h -#ifdef __STDC__ -# include -#else -# include -#endif -#undef strtod + elif test "`uname -s`" = "HP-UX" && \ + test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then + # Starting with HPUX 11.00 (we believe), gethostbyX + # are actually MT-safe as they always return pointers + # from TSD instead of static storage. -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strtod (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_strtod || defined __stub___strtod -choke me -#endif +$as_echo "#define HAVE_MTSAFE_GETHOSTBYNAME 1" >>confdefs.h + + +$as_echo "#define HAVE_MTSAFE_GETHOSTBYADDR 1" >>confdefs.h + + + else + ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" +if test "x$ac_cv_func_gethostbyname_r" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 6 args" >&5 +$as_echo_n "checking for gethostbyname_r with 6 args... " >&6; } +if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include int main () { -return strtod (); + + char *name; + struct hostent *he, *res; + char buffer[2048]; + int buflen = 2048; + int h_errnop; + + (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_strtod=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_gethostbyname_r_6=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strtod=no + tcl_cv_api_gethostbyname_r_6=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -echo "${ECHO_T}$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = yes; then - tcl_strtod=1 -else - tcl_strtod=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_6" >&5 +$as_echo "$tcl_cv_api_gethostbyname_r_6" >&6; } + tcl_ok=$tcl_cv_api_gethostbyname_r_6 + if test "$tcl_ok" = yes; then - if test "$tcl_strtod" = 1; then - { echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 -echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6; } -if test "${tcl_cv_strtod_buggy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else +$as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h - if test "$cross_compiling" = yes; then - tcl_cv_strtod_buggy=buggy + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 5 args" >&5 +$as_echo_n "checking for gethostbyname_r with 5 args... " >&6; } +if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - extern double strtod(); - int main() { - char *infString="Inf", *nanString="NaN", *spaceString=" "; - char *term; - double value; - value = strtod(infString, &term); - if ((term != infString) && (term[-1] == 0)) { - exit(1); - } - value = strtod(nanString, &term); - if ((term != nanString) && (term[-1] == 0)) { - exit(1); - } - value = strtod(spaceString, &term); - if (term == (spaceString+1)) { - exit(1); - } - exit(0); - } -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_strtod_buggy=ok -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -( exit $ac_status ) -tcl_cv_strtod_buggy=buggy -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi + #include +int +main () +{ -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 -echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6; } - if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in - *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; -esac + char *name; + struct hostent *he; + char buffer[2048]; + int buflen = 2048; + int h_errnop; - USE_COMPAT=1 + (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); -cat >>confdefs.h <<\_ACEOF -#define strtod fixstrtod + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_gethostbyname_r_5=yes +else + tcl_cv_api_gethostbyname_r_5=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_5" >&5 +$as_echo "$tcl_cv_api_gethostbyname_r_5" >&6; } + tcl_ok=$tcl_cv_api_gethostbyname_r_5 + if test "$tcl_ok" = yes; then - fi - fi - - -#-------------------------------------------------------------------- -# Check for various typedefs and provide substitutes if -# they don't exist. -#-------------------------------------------------------------------- +$as_echo "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 3 args" >&5 +$as_echo_n "checking for gethostbyname_r with 3 args... " >&6; } +if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef mode_t ac__type_new_; + + #include + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; + + char *name; + struct hostent *he; + struct hostent_data data; + + (void) gethostbyname_r(name, he, &data); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_mode_t=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_gethostbyname_r_3=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_mode_t=no + tcl_cv_api_gethostbyname_r_3=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } -if test $ac_cv_type_mode_t = yes; then - : -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_3" >&5 +$as_echo "$tcl_cv_api_gethostbyname_r_3" >&6; } + tcl_ok=$tcl_cv_api_gethostbyname_r_3 + if test "$tcl_ok" = yes; then -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF +$as_echo "#define HAVE_GETHOSTBYNAME_R_3 1" >>confdefs.h + + fi + fi + fi + if test "$tcl_ok" = yes; then + +$as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + + fi fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ac_fn_c_check_func "$LINENO" "gethostbyaddr_r" "ac_cv_func_gethostbyaddr_r" +if test "x$ac_cv_func_gethostbyaddr_r" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r with 7 args" >&5 +$as_echo_n "checking for gethostbyaddr_r with 7 args... " >&6; } +if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef pid_t ac__type_new_; + + #include + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; + + char *addr; + int length; + int type; + struct hostent *result; + char buffer[2048]; + int buflen = 2048; + int h_errnop; + + (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, + &h_errnop); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_pid_t=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_gethostbyaddr_r_7=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=no + tcl_cv_api_gethostbyaddr_r_7=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +$as_echo "$tcl_cv_api_gethostbyaddr_r_7" >&6; } + tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 + if test "$tcl_ok" = yes; then -fi +$as_echo "#define HAVE_GETHOSTBYADDR_R_7 1" >>confdefs.h -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r with 8 args" >&5 +$as_echo_n "checking for gethostbyaddr_r with 8 args... " >&6; } +if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; + + #include + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; + + char *addr; + int length; + int type; + struct hostent *result, *resultp; + char buffer[2048]; + int buflen = 2048; + int h_errnop; + + (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, + &resultp, &h_errnop); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_size_t=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_api_gethostbyaddr_r_8=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=no + tcl_cv_api_gethostbyaddr_r_8=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -if test $ac_cv_type_size_t = yes; then - : -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +$as_echo "$tcl_cv_api_gethostbyaddr_r_8" >&6; } + tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 + if test "$tcl_ok" = yes; then -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +$as_echo "#define HAVE_GETHOSTBYADDR_R_8 1" >>confdefs.h -fi + fi + fi + if test "$tcl_ok" = yes; then -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +$as_echo "#define HAVE_GETHOSTBYADDR_R 1" >>confdefs.h + + fi -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no fi -rm -f conftest* + fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF +#--------------------------------------------------------------------------- +# Determine which interface to use to talk to the serial port. +# Note that #include lines must begin in leftmost column for +# some compilers to recognize them as preprocessor directives. +#--------------------------------------------------------------------------- -cat >>confdefs.h <<\_ACEOF -#define gid_t int + for ac_header in sys/modem.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_modem_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_MODEM_H 1 _ACEOF fi +done -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } -if test "${tcl_cv_type_socklen_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking termios vs. termio vs. sgtty" >&5 +$as_echo_n "checking termios vs. termio vs. sgtty... " >&6; } +if test "${tcl_cv_api_serial+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + tcl_cv_api_serial=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include +#include -int -main () -{ +int main() { + struct termios t; + if (tcgetattr(0, &t) == 0) { + cfsetospeed(&t, 0); + t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_api_serial=termios +else + tcl_cv_api_serial=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - socklen_t foo; + if test $tcl_cv_api_serial = no ; then + if test "$cross_compiling" = yes; then : + tcl_cv_api_serial=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ; - return 0; +#include + +int main() { + struct termio t; + if (ioctl(0, TCGETA, &t) == 0) { + t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_type_socklen_t=yes +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_api_serial=termio else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_type_socklen_t=no + tcl_cv_api_serial=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 -echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6; } -if test $tcl_cv_type_socklen_t = no; then -cat >>confdefs.h <<\_ACEOF -#define socklen_t int -_ACEOF + fi + if test $tcl_cv_api_serial = no ; then + if test "$cross_compiling" = yes; then : + tcl_cv_api_serial=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int main() { + struct sgttyb t; + if (ioctl(0, TIOCGETP, &t) == 0) { + t.sg_ospeed = 0; + t.sg_flags |= ODDP | EVENP | RAW; + return 0; + } + return 1; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_api_serial=sgtty +else + tcl_cv_api_serial=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ echo "$as_me:$LINENO: checking for intptr_t" >&5 -echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6; } -if test "${ac_cv_type_intptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + if test $tcl_cv_api_serial = no ; then + if test "$cross_compiling" = yes; then : + tcl_cv_api_serial=no else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef intptr_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; + +#include +#include + +int main() { + struct termios t; + if (tcgetattr(0, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + cfsetospeed(&t, 0); + t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_intptr_t=yes +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_api_serial=termios else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_intptr_t=no + tcl_cv_api_serial=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_intptr_t" >&6; } -if test $ac_cv_type_intptr_t = yes; then + fi + if test $tcl_cv_api_serial = no; then + if test "$cross_compiling" = yes; then : + tcl_cv_api_serial=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<\_ACEOF -#define HAVE_INTPTR_T 1 -_ACEOF +#include +#include +int main() { + struct termio t; + if (ioctl(0, TCGETA, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_api_serial=termio else + tcl_cv_api_serial=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - { echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 -echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6; } -if test "${tcl_cv_intptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + if test $tcl_cv_api_serial = no; then + if test "$cross_compiling" = yes; then : + tcl_cv_api_serial=none else - - for tcl_cv_intptr_t in "int" "long" "long long" none; do - if test "$tcl_cv_intptr_t" != none; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))]; -test_array [0] = 0 - ; - return 0; +#include +#include + +int main() { + struct sgttyb t; + if (ioctl(0, TIOCGETP, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + t.sg_ospeed = 0; + t.sg_flags |= ODDP | EVENP | RAW; + return 0; + } + return 1; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_ok=yes +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_api_serial=sgtty else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_ok=no + tcl_cv_api_serial=none fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$tcl_ok" = yes && break; fi - done +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 -echo "${ECHO_T}$tcl_cv_intptr_t" >&6; } - if test "$tcl_cv_intptr_t" != none; then - -cat >>confdefs.h <<_ACEOF -#define intptr_t $tcl_cv_intptr_t -_ACEOF fi - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_serial" >&5 +$as_echo "$tcl_cv_api_serial" >&6; } + case $tcl_cv_api_serial in + termios) +$as_echo "#define USE_TERMIOS 1" >>confdefs.h +;; + termio) +$as_echo "#define USE_TERMIO 1" >>confdefs.h +;; + sgtty) +$as_echo "#define USE_SGTTY 1" >>confdefs.h +;; + esac + + +#-------------------------------------------------------------------- +# Include sys/select.h if it exists and if it supplies things +# that appear to be useful and aren't already in sys/types.h. +# This appears to be true only on the RS/6000 under AIX. Some +# systems like OSF/1 have a sys/select.h that's of no use, and +# other systems like SCO UNIX have a sys/select.h that's +# pernicious. If "fd_set" isn't defined anywhere then set a +# special flag. +#-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } -if test "${ac_cv_type_uintptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_set in sys/types" >&5 +$as_echo_n "checking for fd_set in sys/types... " >&6; } +if test "${tcl_cv_type_fd_set+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -typedef uintptr_t ac__type_new_; +#include int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +fd_set readMask, writeMask; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_uintptr_t=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_type_fd_set=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uintptr_t=no + tcl_cv_type_fd_set=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } -if test $ac_cv_type_uintptr_t = yes; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF - -else - - { echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 -echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6; } -if test "${tcl_cv_uintptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_type_fd_set" >&5 +$as_echo "$tcl_cv_type_fd_set" >&6; } +tcl_ok=$tcl_cv_type_fd_set +if test $tcl_ok = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_mask in sys/select" >&5 +$as_echo_n "checking for fd_mask in sys/select... " >&6; } +if test "${tcl_cv_grep_fd_mask+set}" = set; then : + $as_echo_n "(cached) " >&6 else - for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \ - none; do - if test "$tcl_cv_uintptr_t" != none; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))]; -test_array [0] = 0 +#include - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_ok=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "fd_mask" >/dev/null 2>&1; then : + tcl_cv_grep_fd_mask=present else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_ok=no + tcl_cv_grep_fd_mask=missing fi +rm -f conftest* -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$tcl_ok" = yes && break; fi - done fi -{ echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 -echo "${ECHO_T}$tcl_cv_uintptr_t" >&6; } - if test "$tcl_cv_uintptr_t" != none; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_grep_fd_mask" >&5 +$as_echo "$tcl_cv_grep_fd_mask" >&6; } + if test $tcl_cv_grep_fd_mask = present; then -cat >>confdefs.h <<_ACEOF -#define uintptr_t $tcl_cv_uintptr_t -_ACEOF +$as_echo "#define HAVE_SYS_SELECT_H 1" >>confdefs.h + tcl_ok=yes fi - fi +if test $tcl_ok = no; then +$as_echo "#define NO_FD_SET 1" >>confdefs.h -#-------------------------------------------------------------------- -# If a system doesn't have an opendir function (man, that's old!) -# then we have to supply a different version of dirent.h which -# is compatible with the substitute version of opendir that's -# provided. This version only works with V7-style directories. -#-------------------------------------------------------------------- - -{ echo "$as_me:$LINENO: checking for opendir" >&5 -echo $ECHO_N "checking for opendir... $ECHO_C" >&6; } -if test "${ac_cv_func_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define opendir to an innocuous variant, in case declares opendir. - For example, HP-UX 11i declares gettimeofday. */ -#define opendir innocuous_opendir - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char opendir (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef opendir - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_opendir || defined __stub___opendir -choke me -#endif - -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_opendir=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_opendir=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 -echo "${ECHO_T}$ac_cv_func_opendir" >&6; } -if test $ac_cv_func_opendir = yes; then - : -else +#------------------------------------------------------------------------------ +# Find out all about time handling differences. +#------------------------------------------------------------------------------ + -cat >>confdefs.h <<\_ACEOF -#define USE_DIRENT2_H 1 + for ac_header in sys/time.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIME_H 1 _ACEOF fi +done -#-------------------------------------------------------------------- -# The check below checks whether defines the type -# "union wait" correctly. It's needed because of weirdness in -# HP-UX where "union wait" is defined in both the BSD and SYS-V -# environments. Checking the usability of WIFEXITED seems to do -# the trick. -#-------------------------------------------------------------------- - -{ echo "$as_me:$LINENO: checking union wait" >&5 -echo $ECHO_N "checking union wait... $ECHO_C" >&6; } -if test "${tcl_cv_union_wait+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#include +#include +#include + int main () { - -union wait x; -WIFEXITED(x); /* Generates compiler error if WIFEXITED - * uses an int. */ - +if ((struct tm *) 0) +return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - tcl_cv_union_wait=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_union_wait=no + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 -echo "${ECHO_T}$tcl_cv_union_wait" >&6; } -if test $tcl_cv_union_wait = no; then -cat >>confdefs.h <<\_ACEOF -#define NO_UNION_WAIT 1 + + for ac_func in gmtime_r localtime_r mktime +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi +done -#-------------------------------------------------------------------- -# Check whether there is an strncasecmp function on this system. -# This is a bit tricky because under SCO it's in -lsocket and -# under Sequent Dynix it's in -linet. -#-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for strncasecmp" >&5 -echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6; } -if test "${ac_cv_func_strncasecmp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking tm_tzadj in struct tm" >&5 +$as_echo_n "checking tm_tzadj in struct tm... " >&6; } +if test "${tcl_cv_member_tm_tzadj+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define strncasecmp to an innocuous variant, in case declares strncasecmp. - For example, HP-UX 11i declares gettimeofday. */ -#define strncasecmp innocuous_strncasecmp -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strncasecmp (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct tm tm; tm.tm_tzadj; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_member_tm_tzadj=yes +else + tcl_cv_member_tm_tzadj=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_member_tm_tzadj" >&5 +$as_echo "$tcl_cv_member_tm_tzadj" >&6; } + if test $tcl_cv_member_tm_tzadj = yes ; then -#ifdef __STDC__ -# include -#else -# include -#endif +$as_echo "#define HAVE_TM_TZADJ 1" >>confdefs.h -#undef strncasecmp + fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strncasecmp (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_strncasecmp || defined __stub___strncasecmp -choke me -#endif + { $as_echo "$as_me:${as_lineno-$LINENO}: checking tm_gmtoff in struct tm" >&5 +$as_echo_n "checking tm_gmtoff in struct tm... " >&6; } +if test "${tcl_cv_member_tm_gmtoff+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -return strncasecmp (); +struct tm tm; tm.tm_gmtoff; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_strncasecmp=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_member_tm_gmtoff=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_strncasecmp=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + tcl_cv_member_tm_gmtoff=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6; } -if test $ac_cv_func_strncasecmp = yes; then - tcl_ok=1 -else - tcl_ok=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_member_tm_gmtoff" >&5 +$as_echo "$tcl_cv_member_tm_gmtoff" >&6; } + if test $tcl_cv_member_tm_gmtoff = yes ; then -if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 -echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6; } -if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h + + fi + + # + # Its important to include time.h in this check, as some systems + # (like convex) have timezone functions, etc. + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking long timezone variable" >&5 +$as_echo_n "checking long timezone variable... " >&6; } +if test "${tcl_cv_timezone_long+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strncasecmp (); + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -return strncasecmp (); +extern long timezone; + timezone += 1; + exit (0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_socket_strncasecmp=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_timezone_long=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_strncasecmp=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + tcl_cv_timezone_long=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6; } -if test $ac_cv_lib_socket_strncasecmp = yes; then - tcl_ok=1 -else - tcl_ok=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_timezone_long" >&5 +$as_echo "$tcl_cv_timezone_long" >&6; } + if test $tcl_cv_timezone_long = yes ; then -fi -if test "$tcl_ok" = 0; then - { echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 -echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6; } -if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +$as_echo "#define HAVE_TIMEZONE_VAR 1" >>confdefs.h + + else + # + # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking time_t timezone variable" >&5 +$as_echo_n "checking time_t timezone variable... " >&6; } +if test "${tcl_cv_timezone_time+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-linet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strncasecmp (); + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -return strncasecmp (); +extern time_t timezone; + timezone += 1; + exit (0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_inet_strncasecmp=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_timezone_time=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_inet_strncasecmp=no + tcl_cv_timezone_time=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 -echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6; } -if test $ac_cv_lib_inet_strncasecmp = yes; then - tcl_ok=1 -else - tcl_ok=0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_timezone_time" >&5 +$as_echo "$tcl_cv_timezone_time" >&6; } + if test $tcl_cv_timezone_time = yes ; then + +$as_echo "#define HAVE_TIMEZONE_VAR 1" >>confdefs.h + + fi + fi + + +#-------------------------------------------------------------------- +# Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But +# we might be able to use fstatfs instead. Some systems (OpenBSD?) also +# lack blkcnt_t. +#-------------------------------------------------------------------- + +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF + fi -if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; -esac - USE_COMPAT=1 +ac_fn_c_check_type "$LINENO" "blkcnt_t" "ac_cv_type_blkcnt_t" "$ac_includes_default" +if test "x$ac_cv_type_blkcnt_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_BLKCNT_T 1 +_ACEOF + + fi -#-------------------------------------------------------------------- -# The code below deals with several issues related to gettimeofday: -# 1. Some systems don't provide a gettimeofday function at all -# (set NO_GETTOD if this is the case). -# 2. SGI systems don't use the BSD form of the gettimeofday function, -# but they have a BSDgettimeofday function that can be used instead. -# 3. See if gettimeofday is declared in the header file. -# if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can -# declare it. -#-------------------------------------------------------------------- +ac_fn_c_check_func "$LINENO" "fstatfs" "ac_cv_func_fstatfs" +if test "x$ac_cv_func_fstatfs" = x""yes; then : -{ echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6; } -if test "${ac_cv_func_BSDgettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define BSDgettimeofday to an innocuous variant, in case declares BSDgettimeofday. - For example, HP-UX 11i declares gettimeofday. */ -#define BSDgettimeofday innocuous_BSDgettimeofday -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char BSDgettimeofday (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +$as_echo "#define NO_FSTATFS 1" >>confdefs.h -#ifdef __STDC__ -# include -#else -# include -#endif +fi -#undef BSDgettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char BSDgettimeofday (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday -choke me -#endif +#-------------------------------------------------------------------- +# Some system have no memcmp or it does not work with 8 bit data, this +# checks it and add memcmp.o to LIBOBJS if needed +#-------------------------------------------------------------------- +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 +$as_echo_n "checking for working memcmp... " >&6; } +if test "${ac_cv_func_memcmp_working+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_memcmp_working=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default int main () { -return BSDgettimeofday (); + + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; + + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + return 1; + } + return 0; + } + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_BSDgettimeofday=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_memcmp_working=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_BSDgettimeofday=no + ac_cv_func_memcmp_working=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6; } -if test $ac_cv_func_BSDgettimeofday = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 +$as_echo "$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; +esac -cat >>confdefs.h <<\_ACEOF -#define HAVE_BSDGETTIMEOFDAY 1 -_ACEOF -else - { echo "$as_me:$LINENO: checking for gettimeofday" >&5 -echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6; } -if test "${ac_cv_func_gettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +#-------------------------------------------------------------------- +# Some system like SunOS 4 and other BSD like systems have no memmove +# (we assume they have bcopy instead). {The replacement define is in +# compat/string.h} +#-------------------------------------------------------------------- + +ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" +if test "x$ac_cv_func_memmove" = x""yes; then : + else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gettimeofday to an innocuous variant, in case declares gettimeofday. - For example, HP-UX 11i declares gettimeofday. */ -#define gettimeofday innocuous_gettimeofday -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gettimeofday (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif +$as_echo "#define NO_MEMMOVE 1" >>confdefs.h -#undef gettimeofday -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gettimeofday (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gettimeofday || defined __stub___gettimeofday -choke me -#endif +$as_echo "#define NO_STRING_H 1" >>confdefs.h -int -main () -{ -return gettimeofday (); - ; - return 0; +fi + + +#-------------------------------------------------------------------- +# On some systems strstr is broken: it returns a pointer even even if +# the original string is empty. +#-------------------------------------------------------------------- + + + ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = x""yes; then : + tcl_ok=1 +else + tcl_ok=0 +fi + + if test "$tcl_ok" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strstr implementation" >&5 +$as_echo_n "checking proper strstr implementation... " >&6; } +if test "${tcl_cv_strstr_unbroken+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + tcl_cv_strstr_unbroken=unknown +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main() { + extern int strstr(); + exit(strstr("\0test", "test") ? 1 : 0); } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_gettimeofday=yes +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_strstr_unbroken=ok else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gettimeofday=no + tcl_cv_strstr_unbroken=broken +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6; } -if test $ac_cv_func_gettimeofday = yes; then - : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strstr_unbroken" >&5 +$as_echo "$tcl_cv_strstr_unbroken" >&6; } + if test "$tcl_cv_strstr_unbroken" = "ok"; then + tcl_ok=1 + else + tcl_ok=0 + fi + fi + if test "$tcl_ok" = 0; then + case " $LIBOBJS " in + *" strstr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" + ;; +esac + + USE_COMPAT=1 + fi + + +#-------------------------------------------------------------------- +# Check for strtoul function. This is tricky because under some +# versions of AIX strtoul returns an incorrect terminator +# pointer for the string "0". +#-------------------------------------------------------------------- + + + ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = x""yes; then : + tcl_ok=1 else + tcl_ok=0 +fi -cat >>confdefs.h <<\_ACEOF -#define NO_GETTOD 1 + if test "$tcl_ok" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strtoul implementation" >&5 +$as_echo_n "checking proper strtoul implementation... " >&6; } +if test "${tcl_cv_strtoul_unbroken+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + tcl_cv_strtoul_unbroken=unknown +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main() { + extern int strtoul(); + char *term, *string = "0"; + exit(strtoul(string,&term,0) != 0 || term != string+1); +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_strtoul_unbroken=ok +else + tcl_cv_strtoul_unbroken=broken +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtoul_unbroken" >&5 +$as_echo "$tcl_cv_strtoul_unbroken" >&6; } + if test "$tcl_cv_strtoul_unbroken" = "ok"; then + tcl_ok=1 + else + tcl_ok=0 + fi + fi + if test "$tcl_ok" = 0; then + case " $LIBOBJS " in + *" strtoul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" + ;; +esac + USE_COMPAT=1 + fi -fi -{ echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6; } -if test "${tcl_cv_grep_gettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +#-------------------------------------------------------------------- +# Check for the strtod function. This is tricky because in some +# versions of Linux strtod mis-parses strings starting with "+". +#-------------------------------------------------------------------- + + + ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" +if test "x$ac_cv_func_strtod" = x""yes; then : + tcl_ok=1 else + tcl_ok=0 +fi - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$tcl_ok" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strtod implementation" >&5 +$as_echo_n "checking proper strtod implementation... " >&6; } +if test "${tcl_cv_strtod_unbroken+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + tcl_cv_strtod_unbroken=unknown +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +int main() { + extern double strtod(); + char *term, *string = " +69"; + exit(strtod(string,&term) != 69 || term != string+4); +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "gettimeofday" >/dev/null 2>&1; then - tcl_cv_grep_gettimeofday=present +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_strtod_unbroken=ok else - tcl_cv_grep_gettimeofday=missing + tcl_cv_strtod_unbroken=broken +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 -echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6; } -if test $tcl_cv_grep_gettimeofday = missing ; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtod_unbroken" >&5 +$as_echo "$tcl_cv_strtod_unbroken" >&6; } + if test "$tcl_cv_strtod_unbroken" = "ok"; then + tcl_ok=1 + else + tcl_ok=0 + fi + fi + if test "$tcl_ok" = 0; then + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac -cat >>confdefs.h <<\_ACEOF -#define GETTOD_NOT_DECLARED 1 -_ACEOF + USE_COMPAT=1 + fi -fi #-------------------------------------------------------------------- -# The following code checks to see whether it is possible to get -# signed chars on this platform. This is needed in order to -# properly generate sign-extended ints from character values. +# Under Solaris 2.4, strtod returns the wrong value for the +# terminating character under some conditions. Check for this +# and if the problem exists use a substitute procedure +# "fixstrtod" that corrects the error. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } -if test "${ac_cv_c_char_unsigned+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" +if test "x$ac_cv_func_strtod" = x""yes; then : + tcl_strtod=1 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + tcl_strtod=0 +fi + + if test "$tcl_strtod" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris2.4/Tru64 strtod bugs" >&5 +$as_echo_n "checking for Solaris2.4/Tru64 strtod bugs... " >&6; } +if test "${tcl_cv_strtod_buggy+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + tcl_cv_strtod_buggy=buggy +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((char) -1) < 0)]; -test_array [0] = 0 - ; - return 0; -} + extern double strtod(); + int main() { + char *infString="Inf", *nanString="NaN", *spaceString=" "; + char *term; + double value; + value = strtod(infString, &term); + if ((term != infString) && (term[-1] == 0)) { + exit(1); + } + value = strtod(nanString, &term); + if ((term != nanString) && (term[-1] == 0)) { + exit(1); + } + value = strtod(spaceString, &term); + if (term == (spaceString+1)) { + exit(1); + } + exit(0); + } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_char_unsigned=no +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_strtod_buggy=ok else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + tcl_cv_strtod_buggy=buggy +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - ac_cv_c_char_unsigned=yes fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtod_buggy" >&5 +$as_echo "$tcl_cv_strtod_buggy" >&6; } + if test "$tcl_cv_strtod_buggy" = buggy; then + case " $LIBOBJS " in + *" fixstrtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" + ;; +esac + + USE_COMPAT=1 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } -if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - cat >>confdefs.h <<\_ACEOF -#define __CHAR_UNSIGNED__ 1 -_ACEOF +$as_echo "#define strtod fixstrtod" >>confdefs.h -fi + fi + fi -{ echo "$as_me:$LINENO: checking signed char declarations" >&5 -echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6; } -if test "${tcl_cv_char_signed+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#-------------------------------------------------------------------- +# Check for various typedefs and provide substitutes if +# they don't exist. +#-------------------------------------------------------------------- -int -main () -{ +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = x""yes; then : - signed char *p; - p = 0; +else - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define mode_t int _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_char_signed=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - tcl_cv_char_signed=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 -echo "${ECHO_T}$tcl_cv_char_signed" >&6; } -if test $tcl_cv_char_signed = yes; then +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : + +else -cat >>confdefs.h <<\_ACEOF -#define HAVE_SIGNED_CHAR 1 +cat >>confdefs.h <<_ACEOF +#define pid_t int _ACEOF fi -#-------------------------------------------------------------------- -# Does putenv() copy or not? We need to know to avoid memory leaks. -#-------------------------------------------------------------------- +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : -{ echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 -echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6; } -if test "${tcl_cv_putenv_copy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - tcl_cv_putenv_copy=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - #include - #define OURVAR "havecopy=yes" - int main (int argc, char *argv[]) - { - char *foo, *bar; - foo = (char *)strdup(OURVAR); - putenv(foo); - strcpy((char *)(strchr(foo, '=') + 1), "no"); - bar = getenv("havecopy"); - if (!strcmp(bar, "no")) { - /* doesnt copy */ - return 0; - } else { - /* does copy */ - return 1; - } - } +fi -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - tcl_cv_putenv_copy=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -( exit $ac_status ) -tcl_cv_putenv_copy=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no fi - +rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 -echo "${ECHO_T}$tcl_cv_putenv_copy" >&6; } -if test $tcl_cv_putenv_copy = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUTENV_THAT_COPIES 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then -fi +$as_echo "#define uid_t int" >>confdefs.h -#-------------------------------------------------------------------- -# Check for support of nl_langinfo function -#-------------------------------------------------------------------- +$as_echo "#define gid_t int" >>confdefs.h - # Check whether --enable-langinfo was given. -if test "${enable_langinfo+set}" = set; then - enableval=$enable_langinfo; langinfo_ok=$enableval -else - langinfo_ok=yes fi - HAVE_LANGINFO=0 - if test "$langinfo_ok" = "yes"; then - if test "${ac_cv_header_langinfo_h+set}" = set; then - { echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } -if test "${ac_cv_header_langinfo_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } +if test "${tcl_cv_type_socklen_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking langinfo.h usability" >&5 -echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi + #include + #include -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +int +main () +{ -# Is the header present? -{ echo "$as_me:$LINENO: checking langinfo.h presence" >&5 -echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include + socklen_t foo; + + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_type_socklen_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + tcl_cv_type_socklen_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_type_socklen_t" >&5 +$as_echo "$tcl_cv_type_socklen_t" >&6; } +if test $tcl_cv_type_socklen_t = no; then + +$as_echo "#define socklen_t int" >>confdefs.h - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" +if test "x$ac_cv_type_intptr_t" = x""yes; then : -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for langinfo.h" >&5 -echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } -if test "${ac_cv_header_langinfo_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_langinfo_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } +$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h -fi -if test $ac_cv_header_langinfo_h = yes; then - langinfo_ok=yes else - langinfo_ok=no -fi - - fi - { echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 -echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6; } - if test "$langinfo_ok" = "yes"; then - if test "${tcl_cv_langinfo_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size signed integer type" >&5 +$as_echo_n "checking for pointer-size signed integer type... " >&6; } +if test "${tcl_cv_intptr_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + for tcl_cv_intptr_t in "int" "long" "long long" none; do + if test "$tcl_cv_intptr_t" != none; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +$ac_includes_default int main () { -nl_langinfo(CODESET); +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))]; +test_array [0] = 0 + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - tcl_cv_langinfo_h=yes +if ac_fn_c_try_compile "$LINENO"; then : + tcl_ok=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_langinfo_h=no + tcl_ok=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$tcl_ok" = yes && break; fi + done fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_intptr_t" >&5 +$as_echo "$tcl_cv_intptr_t" >&6; } + if test "$tcl_cv_intptr_t" != none; then - { echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 -echo "${ECHO_T}$tcl_cv_langinfo_h" >&6; } - if test $tcl_cv_langinfo_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LANGINFO 1 +cat >>confdefs.h <<_ACEOF +#define intptr_t $tcl_cv_intptr_t _ACEOF - fi - else - { echo "$as_me:$LINENO: result: $langinfo_ok" >&5 -echo "${ECHO_T}$langinfo_ok" >&6; } fi +fi -#-------------------------------------------------------------------- -# Check for support of chflags and mkstemps functions -#-------------------------------------------------------------------- - - - -for ac_func in chflags mkstemps -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func +ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +if test "x$ac_cv_type_uintptr_t" = x""yes; then : -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif +$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h -#undef $ac_func +else -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size unsigned integer type" >&5 +$as_echo_n "checking for pointer-size unsigned integer type... " >&6; } +if test "${tcl_cv_uintptr_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \ + none; do + if test "$tcl_cv_uintptr_t" != none; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default int main () { -return $ac_func (); +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))]; +test_array [0] = 0 + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_compile "$LINENO"; then : + tcl_ok=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + tcl_ok=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$tcl_ok" = yes && break; fi + done fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_uintptr_t" >&5 +$as_echo "$tcl_cv_uintptr_t" >&6; } + if test "$tcl_cv_uintptr_t" != none; then -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define uintptr_t $tcl_cv_uintptr_t _ACEOF + fi + fi -done #-------------------------------------------------------------------- -# Check for support of isnan() function or macro +# If a system doesn't have an opendir function (man, that's old!) +# then we have to supply a different version of dirent.h which +# is compatible with the substitute version of opendir that's +# provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking isnan" >&5 -echo $ECHO_N "checking isnan... $ECHO_C" >&6; } -if test "${tcl_cv_isnan+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" +if test "x$ac_cv_func_opendir" = x""yes; then : + else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +$as_echo "#define USE_DIRENT2_H 1" >>confdefs.h + +fi + + +#-------------------------------------------------------------------- +# The check below checks whether defines the type +# "union wait" correctly. It's needed because of weirdness in +# HP-UX where "union wait" is defined in both the BSD and SYS-V +# environments. Checking the usability of WIFEXITED seems to do +# the trick. +#-------------------------------------------------------------------- + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking union wait" >&5 +$as_echo_n "checking union wait... " >&6; } +if test "${tcl_cv_union_wait+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +#include int main () { -isnan(0.0); /* Generates an error if isnan is missing */ +union wait x; +WIFEXITED(x); /* Generates compiler error if WIFEXITED + * uses an int. */ ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - tcl_cv_isnan=yes +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_union_wait=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_isnan=no + tcl_cv_union_wait=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 -echo "${ECHO_T}$tcl_cv_isnan" >&6; } -if test $tcl_cv_isnan = no; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_union_wait" >&5 +$as_echo "$tcl_cv_union_wait" >&6; } +if test $tcl_cv_union_wait = no; then -cat >>confdefs.h <<\_ACEOF -#define NO_ISNAN 1 -_ACEOF +$as_echo "#define NO_UNION_WAIT 1" >>confdefs.h fi #-------------------------------------------------------------------- -# Darwin specific API checks and defines +# Check whether there is an strncasecmp function on this system. +# This is a bit tricky because under SCO it's in -lsocket and +# under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -if test "`uname -s`" = "Darwin" ; then +ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" +if test "x$ac_cv_func_strncasecmp" = x""yes; then : + tcl_ok=1 +else + tcl_ok=0 +fi -for ac_func in getattrlist -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test "$tcl_ok" = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strncasecmp in -lsocket" >&5 +$as_echo_n "checking for strncasecmp in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -17081,780 +9389,484 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +char strncasecmp (); int main () { -return $ac_func (); +return strncasecmp (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_strncasecmp=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + ac_cv_lib_socket_strncasecmp=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_strncasecmp" >&5 +$as_echo "$ac_cv_lib_socket_strncasecmp" >&6; } +if test "x$ac_cv_lib_socket_strncasecmp" = x""yes; then : + tcl_ok=1 +else + tcl_ok=0 fi -done - -for ac_header in copyfile.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +if test "$tcl_ok" = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strncasecmp in -linet" >&5 +$as_echo_n "checking for strncasecmp in -linet... " >&6; } +if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-linet $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char strncasecmp (); +int +main () +{ +return strncasecmp (); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_inet_strncasecmp=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + ac_cv_lib_inet_strncasecmp=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_strncasecmp" >&5 +$as_echo "$ac_cv_lib_inet_strncasecmp" >&6; } +if test "x$ac_cv_lib_inet_strncasecmp" = x""yes; then : + tcl_ok=1 +else + tcl_ok=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +fi +if test "$tcl_ok" = 0; then + case " $LIBOBJS " in + *" strncasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" + ;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + USE_COMPAT=1 fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +#-------------------------------------------------------------------- +# The code below deals with several issues related to gettimeofday: +# 1. Some systems don't provide a gettimeofday function at all +# (set NO_GETTOD if this is the case). +# 2. SGI systems don't use the BSD form of the gettimeofday function, +# but they have a BSDgettimeofday function that can be used instead. +# 3. See if gettimeofday is declared in the header file. +# if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can +# declare it. +#-------------------------------------------------------------------- -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +ac_fn_c_check_func "$LINENO" "BSDgettimeofday" "ac_cv_func_BSDgettimeofday" +if test "x$ac_cv_func_BSDgettimeofday" = x""yes; then : + +$as_echo "#define HAVE_BSDGETTIMEOFDAY 1" >>confdefs.h - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } + + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = x""yes; then : + +else + +$as_echo "#define NO_GETTOD 1" >>confdefs.h fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday declaration" >&5 +$as_echo_n "checking for gettimeofday declaration... " >&6; } +if test "${tcl_cv_grep_gettimeofday+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -for ac_func in copyfile -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gettimeofday" >/dev/null 2>&1; then : + tcl_cv_grep_gettimeofday=present +else + tcl_cv_grep_gettimeofday=missing +fi +rm -f conftest* -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_grep_gettimeofday" >&5 +$as_echo "$tcl_cv_grep_gettimeofday" >&6; } +if test $tcl_cv_grep_gettimeofday = missing ; then -#ifdef __STDC__ -# include -#else -# include -#endif +$as_echo "#define GETTOD_NOT_DECLARED 1" >>confdefs.h -#undef $ac_func +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +#-------------------------------------------------------------------- +# The following code checks to see whether it is possible to get +# signed chars on this platform. This is needed in order to +# properly generate sign-extended ints from character values. +#-------------------------------------------------------------------- + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } +if test "${ac_cv_c_char_unsigned+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_char_unsigned=no +else + ac_cv_c_char_unsigned=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking signed char declarations" >&5 +$as_echo_n "checking signed char declarations... " >&6; } +if test "${tcl_cv_char_signed+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () { -return $ac_func (); + + signed char *p; + p = 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_char_signed=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + tcl_cv_char_signed=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_char_signed" >&5 +$as_echo "$tcl_cv_char_signed" >&6; } +if test $tcl_cv_char_signed = yes; then + +$as_echo "#define HAVE_SIGNED_CHAR 1" >>confdefs.h fi -done - if test $tcl_corefoundation = yes; then +#-------------------------------------------------------------------- +# Does putenv() copy or not? We need to know to avoid memory leaks. +#-------------------------------------------------------------------- -for ac_header in libkern/OSAtomic.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a putenv() that copies the buffer" >&5 +$as_echo_n "checking for a putenv() that copies the buffer... " >&6; } +if test "${tcl_cv_putenv_copy+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + if test "$cross_compiling" = yes; then : + tcl_cv_putenv_copy=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + #include + #define OURVAR "havecopy=yes" + int main (int argc, char *argv[]) + { + char *foo, *bar; + foo = (char *)strdup(OURVAR); + putenv(foo); + strcpy((char *)(strchr(foo, '=') + 1), "no"); + bar = getenv("havecopy"); + if (!strcmp(bar, "no")) { + /* doesnt copy */ + return 0; + } else { + /* does copy */ + return 1; + } + } + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if ac_fn_c_try_run "$LINENO"; then : + tcl_cv_putenv_copy=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + tcl_cv_putenv_copy=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_putenv_copy" >&5 +$as_echo "$tcl_cv_putenv_copy" >&6; } +if test $tcl_cv_putenv_copy = yes; then -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +$as_echo "#define HAVE_PUTENV_THAT_COPIES 1" >>confdefs.h - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +#-------------------------------------------------------------------- +# Check for support of nl_langinfo function +#-------------------------------------------------------------------- -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + # Check whether --enable-langinfo was given. +if test "${enable_langinfo+set}" = set; then : + enableval=$enable_langinfo; langinfo_ok=$enableval else - eval "$as_ac_Header=\$ac_header_preproc" + langinfo_ok=yes fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + HAVE_LANGINFO=0 + if test "$langinfo_ok" = "yes"; then + ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_langinfo_h" = x""yes; then : + langinfo_ok=yes +else + langinfo_ok=no fi -done + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use nl_langinfo" >&5 +$as_echo_n "checking whether to use nl_langinfo... " >&6; } + if test "$langinfo_ok" = "yes"; then + if test "${tcl_cv_langinfo_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else -for ac_func in OSSpinLockLock -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +#include int main () { -return $ac_func (); +nl_langinfo(CODESET); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_compile "$LINENO"; then : + tcl_cv_langinfo_h=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + tcl_cv_langinfo_h=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_langinfo_h" >&5 +$as_echo "$tcl_cv_langinfo_h" >&6; } + if test $tcl_cv_langinfo_h = yes; then +$as_echo "#define HAVE_LANGINFO 1" >>confdefs.h -for ac_func in pthread_atfork -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $langinfo_ok" >&5 +$as_echo "$langinfo_ok" >&6; } + fi + + +#-------------------------------------------------------------------- +# Check for support of chflags and mkstemps functions +#-------------------------------------------------------------------- + +for ac_func in chflags mkstemps +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +fi +done -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func +#-------------------------------------------------------------------- +# Check for support of isnan() function or macro +#-------------------------------------------------------------------- -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking isnan" >&5 +$as_echo_n "checking isnan... " >&6; } +if test "${tcl_cv_isnan+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -return $ac_func (); + +isnan(0.0); /* Generates an error if isnan is missing */ + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + tcl_cv_isnan=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + tcl_cv_isnan=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_isnan" >&5 +$as_echo "$tcl_cv_isnan" >&6; } +if test $tcl_cv_isnan = no; then + +$as_echo "#define NO_ISNAN 1" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then + +#-------------------------------------------------------------------- +# Darwin specific API checks and defines +#-------------------------------------------------------------------- + +if test "`uname -s`" = "Darwin" ; then + for ac_func in getattrlist +do : + ac_fn_c_check_func "$LINENO" "getattrlist" "ac_cv_func_getattrlist" +if test "x$ac_cv_func_getattrlist" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_GETATTRLIST 1 _ACEOF fi done - fi - -cat >>confdefs.h <<\_ACEOF -#define USE_VFORK 1 + for ac_header in copyfile.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "copyfile.h" "ac_cv_header_copyfile_h" "$ac_includes_default" +if test "x$ac_cv_header_copyfile_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COPYFILE_H 1 _ACEOF +fi -cat >>confdefs.h <<\_ACEOF -#define TCL_DEFAULT_ENCODING "utf-8" -_ACEOF - +done -cat >>confdefs.h <<\_ACEOF -#define TCL_LOAD_FROM_MEMORY 1 + for ac_func in copyfile +do : + ac_fn_c_check_func "$LINENO" "copyfile" "ac_cv_func_copyfile" +if test "x$ac_cv_func_copyfile" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COPYFILE 1 _ACEOF +fi +done -cat >>confdefs.h <<\_ACEOF -#define TCL_WIDE_CLICKS 1 + if test $tcl_corefoundation = yes; then + for ac_header in libkern/OSAtomic.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libkern/OSAtomic.h" "ac_cv_header_libkern_OSAtomic_h" "$ac_includes_default" +if test "x$ac_cv_header_libkern_OSAtomic_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBKERN_OSATOMIC_H 1 _ACEOF - -for ac_header in AvailabilityMacros.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +done + + for ac_func in OSSpinLockLock +do : + ac_fn_c_check_func "$LINENO" "OSSpinLockLock" "ac_cv_func_OSSpinLockLock" +if test "x$ac_cv_func_OSSpinLockLock" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OSSPINLOCKLOCK 1 +_ACEOF + fi +done -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + for ac_func in pthread_atfork +do : + ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" +if test "x$ac_cv_func_pthread_atfork" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_ATFORK 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi +done -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } + fi -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +$as_echo "#define USE_VFORK 1" >>confdefs.h - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +$as_echo "#define TCL_DEFAULT_ENCODING \"utf-8\"" >>confdefs.h + + +$as_echo "#define TCL_LOAD_FROM_MEMORY 1" >>confdefs.h + + +$as_echo "#define TCL_WIDE_CLICKS 1" >>confdefs.h + + for ac_header in AvailabilityMacros.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" +if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_AVAILABILITYMACROS_H 1 _ACEOF fi @@ -17862,18 +9874,14 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { echo "$as_me:$LINENO: checking if weak import is available" >&5 -echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6; } -if test "${tcl_cv_cc_weak_import+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if weak import is available" >&5 +$as_echo_n "checking if weak import is available... " >&6; } +if test "${tcl_cv_cc_weak_import+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ @@ -17893,57 +9901,30 @@ rand(); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_weak_import=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_weak_import=no + tcl_cv_cc_weak_import=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 -echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_weak_import" >&5 +$as_echo "$tcl_cv_cc_weak_import" >&6; } if test $tcl_cv_cc_weak_import = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WEAK_IMPORT 1 -_ACEOF +$as_echo "#define HAVE_WEAK_IMPORT 1" >>confdefs.h fi - { echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 -echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6; } -if test "${tcl_cv_cc_darwin_c_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin SUSv3 extensions are available" >&5 +$as_echo_n "checking if Darwin SUSv3 extensions are available... " >&6; } +if test "${tcl_cv_cc_darwin_c_source+set}" = set; then : + $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ @@ -17964,41 +9945,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_cc_darwin_c_source=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cc_darwin_c_source=no + tcl_cv_cc_darwin_c_source=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 -echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_darwin_c_source" >&5 +$as_echo "$tcl_cv_cc_darwin_c_source" >&6; } if test $tcl_cv_cc_darwin_c_source = yes; then -cat >>confdefs.h <<\_ACEOF -#define _DARWIN_C_SOURCE 1 -_ACEOF +$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h fi fi @@ -18014,17 +9973,13 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for fts" >&5 -echo $ECHO_N "checking for fts... $ECHO_C" >&6; } -if test "${tcl_cv_api_fts+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fts" >&5 +$as_echo_n "checking for fts... " >&6; } +if test "${tcl_cv_api_fts+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -18043,42 +9998,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : tcl_cv_api_fts=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_api_fts=no + tcl_cv_api_fts=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 -echo "${ECHO_T}$tcl_cv_api_fts" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_fts" >&5 +$as_echo "$tcl_cv_api_fts" >&6; } if test $tcl_cv_api_fts = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_FTS 1 -_ACEOF +$as_echo "#define HAVE_FTS 1" >>confdefs.h fi @@ -18089,280 +10021,24 @@ fi #-------------------------------------------------------------------- - -for ac_header in sys/ioctl.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in sys/ioctl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_IOCTL_H 1 _ACEOF fi done - -for ac_header in sys/filio.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in sys/filio.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_filio_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_FILIO_H 1 _ACEOF fi @@ -18370,10 +10046,10 @@ fi done - { echo "$as_me:$LINENO: checking system version" >&5 -echo $ECHO_N "checking system version... $ECHO_C" >&6; } -if test "${tcl_cv_sys_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 +$as_echo_n "checking system version... " >&6; } +if test "${tcl_cv_sys_version+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -f /usr/lib/NextStep/software_version; then @@ -18381,8 +10057,8 @@ else else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then - { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5 -echo "$as_me: WARNING: can't find uname command" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 +$as_echo "$as_me: WARNING: can't find uname command" >&2;} tcl_cv_sys_version=unknown else # Special check for weird MP-RAS system (uname returns weird @@ -18398,12 +10074,12 @@ echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 -echo "${ECHO_T}$tcl_cv_sys_version" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 +$as_echo "$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version - { echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +$as_echo_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... " >&6; } case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -18412,35 +10088,31 @@ echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >& OSF*) -cat >>confdefs.h <<\_ACEOF -#define USE_FIONBIO 1 -_ACEOF +$as_echo "#define USE_FIONBIO 1" >>confdefs.h - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FIONBIO" >&5 +$as_echo "FIONBIO" >&6; } ;; SunOS-4*) -cat >>confdefs.h <<\_ACEOF -#define USE_FIONBIO 1 -_ACEOF +$as_echo "#define USE_FIONBIO 1" >>confdefs.h - { echo "$as_me:$LINENO: result: FIONBIO" >&5 -echo "${ECHO_T}FIONBIO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FIONBIO" >&5 +$as_echo "FIONBIO" >&6; } ;; *) - { echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -echo "${ECHO_T}O_NONBLOCK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: O_NONBLOCK" >&5 +$as_echo "O_NONBLOCK" >&6; } ;; esac #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 -echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dll unloading" >&5 +$as_echo_n "checking whether to use dll unloading... " >&6; } # Check whether --enable-dll-unloading was given. -if test "${enable_dll_unloading+set}" = set; then +if test "${enable_dll_unloading+set}" = set; then : enableval=$enable_dll_unloading; tcl_ok=$enableval else tcl_ok=yes @@ -18448,13 +10120,11 @@ fi if test $tcl_ok = yes; then -cat >>confdefs.h <<\_ACEOF -#define TCL_UNLOAD_DLLS 1 -_ACEOF +$as_echo "#define TCL_UNLOAD_DLLS 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_ok" >&5 +$as_echo "$tcl_ok" >&6; } #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -18462,11 +10132,11 @@ echo "${ECHO_T}$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ echo "$as_me:$LINENO: checking for timezone data" >&5 -echo $ECHO_N "checking for timezone data... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone data" >&5 +$as_echo_n "checking for timezone data... " >&6; } # Check whether --with-tzdata was given. -if test "${with_tzdata+set}" = set; then +if test "${with_tzdata+set}" = set; then : withval=$with_tzdata; tcl_ok=$withval else tcl_ok=auto @@ -18478,15 +10148,15 @@ fi # case $tcl_ok in no) - { echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 -echo "${ECHO_T}supplied by OS vendor" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: supplied by OS vendor" >&5 +$as_echo "supplied by OS vendor" >&6; } ;; yes) # nothing to do here ;; auto*) - if test "${tcl_cv_dir_zoneinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${tcl_cv_dir_zoneinfo+set}" = set; then : + $as_echo_n "(cached) " >&6 else for dir in /usr/share/zoneinfo \ @@ -18494,172 +10164,46 @@ else /usr/lib/zoneinfo do if test -f $dir/UTC -o -f $dir/GMT - then - tcl_cv_dir_zoneinfo="$dir" - break - fi - done -fi - - if test -n "$tcl_cv_dir_zoneinfo"; then - tcl_ok=no - { echo "$as_me:$LINENO: result: $dir" >&5 -echo "${ECHO_T}$dir" >&6; } - else - tcl_ok=yes - fi - ;; - *) - { { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5 -echo "$as_me: error: invalid argument: $tcl_ok" >&2;} - { (exit 1); exit 1; }; } - ;; -esac -if test $tcl_ok = yes -then - { echo "$as_me:$LINENO: result: supplied by Tcl" >&5 -echo "${ECHO_T}supplied by Tcl" >&6; } - INSTALL_TZDATA=install-tzdata -fi - -#-------------------------------------------------------------------- -# DTrace support -#-------------------------------------------------------------------- - -# Check whether --enable-dtrace was given. -if test "${enable_dtrace+set}" = set; then - enableval=$enable_dtrace; tcl_ok=$enableval -else - tcl_ok=no -fi - -if test $tcl_ok = yes; then - if test "${ac_cv_header_sys_sdt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 -echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 -echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + then + tcl_cv_dir_zoneinfo="$dir" + break + fi + done fi -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes + if test -n "$tcl_cv_dir_zoneinfo"; then + tcl_ok=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dir" >&5 +$as_echo "$dir" >&6; } + else + tcl_ok=yes + fi ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/sdt.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} - + *) + as_fn_error "invalid argument: $tcl_ok" "$LINENO" 5 ;; esac -{ echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 -echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_sdt_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_sdt_h=$ac_header_preproc +if test $tcl_ok = yes +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: supplied by Tcl" >&5 +$as_echo "supplied by Tcl" >&6; } + INSTALL_TZDATA=install-tzdata fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6; } +#-------------------------------------------------------------------- +# DTrace support +#-------------------------------------------------------------------- + +# Check whether --enable-dtrace was given. +if test "${enable_dtrace+set}" = set; then : + enableval=$enable_dtrace; tcl_ok=$enableval +else + tcl_ok=no fi -if test $ac_cv_header_sys_sdt_h = yes; then + +if test $tcl_ok = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sdt_h" = x""yes; then : tcl_ok=yes else tcl_ok=no @@ -18670,10 +10214,10 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_DTRACE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DTRACE+set}" = set; then : + $as_echo_n "(cached) " >&6 else case $DTRACE in [\\/]* | ?:[\\/]*) @@ -18686,14 +10230,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -18701,24 +10245,22 @@ esac fi DTRACE=$ac_cv_path_DTRACE if test -n "$DTRACE"; then - { echo "$as_me:$LINENO: result: $DTRACE" >&5 -echo "${ECHO_T}$DTRACE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 +$as_echo "$DTRACE" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 -echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable DTrace support" >&5 +$as_echo_n "checking whether to enable DTrace support... " >&6; } MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then -cat >>confdefs.h <<\_ACEOF -#define USE_DTRACE 1 -_ACEOF +$as_echo "#define USE_DTRACE 1" >>confdefs.h DTRACE_SRC="\${DTRACE_SRC}" DTRACE_HDR="\${DTRACE_HDR}" @@ -18736,8 +10278,8 @@ _ACEOF fi fi fi -{ echo "$as_me:$LINENO: result: $tcl_ok" >&5 -echo "${ECHO_T}$tcl_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_ok" >&5 +$as_echo "$tcl_ok" >&6; } #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -18766,10 +10308,10 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { echo "$as_me:$LINENO: checking how to package libraries" >&5 -echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to package libraries" >&5 +$as_echo_n "checking how to package libraries... " >&6; } # Check whether --enable-framework was given. -if test "${enable_framework+set}" = set; then +if test "${enable_framework+set}" = set; then : enableval=$enable_framework; enable_framework=$enableval else enable_framework=no @@ -18777,27 +10319,27 @@ fi if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then - { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 -echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 +$as_echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;} enable_framework=no fi if test $tcl_corefoundation = no; then - { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5 -echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be used when CoreFoundation is available" >&5 +$as_echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;} enable_framework=no fi fi if test $enable_framework = yes; then - { echo "$as_me:$LINENO: result: framework" >&5 -echo "${ECHO_T}framework" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: framework" >&5 +$as_echo "framework" >&6; } FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { echo "$as_me:$LINENO: result: shared library" >&5 -echo "${ECHO_T}shared library" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library" >&5 +$as_echo "shared library" >&6; } else - { echo "$as_me:$LINENO: result: static library" >&5 -echo "${ECHO_T}static library" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static library" >&5 +$as_echo "static library" >&6; } fi FRAMEWORK_BUILD=0 fi @@ -18816,9 +10358,7 @@ fi if test "$FRAMEWORK_BUILD" = "1" ; then -cat >>confdefs.h <<\_ACEOF -#define TCL_FRAMEWORK 1 -_ACEOF +$as_echo "#define TCL_FRAMEWORK 1" >>confdefs.h # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work @@ -19029,12 +10569,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -19042,8 +10583,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -19066,12 +10607,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -19088,6 +10629,12 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -19115,12 +10662,15 @@ DEFS=`sed -n "$ac_script" confdefs.h` CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -19130,59 +10680,79 @@ cat >$CONFIG_STATUS <<_ACEOF debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -19191,20 +10761,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -19215,32 +10783,111 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi -done + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -19254,13 +10901,17 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -19275,104 +10926,103 @@ echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -19389,12 +11039,12 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -19409,13 +11059,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -19428,27 +11084,35 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files @@ -19456,26 +11120,26 @@ $config_files Configuration commands: $config_commands -Report bugs to ." +Report bugs to the package provider." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.64, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -19497,25 +11161,27 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -19530,27 +11196,29 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # @@ -19558,7 +11226,7 @@ VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -19572,9 +11240,7 @@ do "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -19600,7 +11266,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -19611,242 +11277,140 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -MAN_FLAGS!$MAN_FLAGS$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -ZLIB_DIR!$ZLIB_DIR$ac_delim -ZLIB_OBJS!$ZLIB_OBJS$ac_delim -ZLIB_SRCS!$ZLIB_SRCS$ac_delim -ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim -RANLIB!$RANLIB$ac_delim -AR!$AR$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -TCL_LIBS!$TCL_LIBS$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -DL_OBJS!$DL_OBJS$ac_delim -PLAT_OBJS!$PLAT_OBJS$ac_delim -PLAT_SRCS!$PLAT_SRCS$ac_delim -LDAIX_SRC!$LDAIX_SRC$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -CC_SEARCH_FLAGS!$CC_SEARCH_FLAGS$ac_delim -LD_SEARCH_FLAGS!$LD_SEARCH_FLAGS$ac_delim -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -TCL_SHLIB_LD_EXTRAS!$TCL_SHLIB_LD_EXTRAS$ac_delim -TK_SHLIB_LD_EXTRAS!$TK_SHLIB_LD_EXTRAS$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim -INSTALL_LIB!$INSTALL_LIB$ac_delim -DLL_INSTALL_DIR!$DLL_INSTALL_DIR$ac_delim -INSTALL_STUB_LIB!$INSTALL_STUB_LIB$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -DTRACE!$DTRACE$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -TCL_YEAR!$TCL_YEAR$ac_delim -PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr fi -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_SHARED_LIB_SUFFIX!$TCL_SHARED_LIB_SUFFIX$ac_delim -TCL_UNSHARED_LIB_SUFFIX!$TCL_UNSHARED_LIB_SUFFIX$ac_delim -TCL_HAS_LONGLONG!$TCL_HAS_LONGLONG$ac_delim -INSTALL_TZDATA!$INSTALL_TZDATA$ac_delim -DTRACE_SRC!$DTRACE_SRC$ac_delim -DTRACE_HDR!$DTRACE_HDR$ac_delim -DTRACE_OBJ!$DTRACE_OBJ$ac_delim -MAKEFILE_SHELL!$MAKEFILE_SHELL$ac_delim -BUILD_DLTEST!$BUILD_DLTEST$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_MODULE_PATH!$TCL_MODULE_PATH$ac_delim -TCL_LIBRARY!$TCL_LIBRARY$ac_delim -PRIVATE_INCLUDE_DIR!$PRIVATE_INCLUDE_DIR$ac_delim -HTML_DIR!$HTML_DIR$ac_delim -PACKAGE_DIR!$PACKAGE_DIR$ac_delim -EXTRA_CC_SWITCHES!$EXTRA_CC_SWITCHES$ac_delim -EXTRA_APP_CC_SWITCHES!$EXTRA_APP_CC_SWITCHES$ac_delim -EXTRA_INSTALL!$EXTRA_INSTALL$ac_delim -EXTRA_INSTALL_BINARIES!$EXTRA_INSTALL_BINARIES$ac_delim -EXTRA_BUILD_HTML!$EXTRA_BUILD_HTML$ac_delim -EXTRA_TCLSH_LIBS!$EXTRA_TCLSH_LIBS$ac_delim -DLTEST_LD!$DLTEST_LD$ac_delim -DLTEST_SUFFIX!$DLTEST_SUFFIX$ac_delim -_ACEOF + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 37; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi + print line +} -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACAWK _ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF - # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -19862,20 +11426,20 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -19903,26 +11467,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -19932,42 +11504,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19985,20 +11522,15 @@ echo X"$as_dir" | q } s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -20034,12 +11566,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -20047,36 +11579,37 @@ case `sed -n '/datarootdir/ { /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' $ac_file_inputs` in +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -20085,26 +11618,29 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -20122,11 +11658,13 @@ echo "$as_me: executing $ac_file commands" >&6;} done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -20146,7 +11684,11 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/win/configure b/win/configure index 7a02af5..834b59a 100755 --- a/win/configure +++ b/win/configure @@ -1,60 +1,81 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.64. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -63,20 +84,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -87,354 +106,321 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} } +as_unset=as_fn_unset -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -451,8 +437,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -462,49 +447,40 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -512,7 +488,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -529,12 +505,12 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -548,7 +524,6 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - exec 7<&0 &1 # Name of the host. @@ -561,195 +536,206 @@ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # ac_default_prefix=/usr/local ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="../generic/tcl.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -AR -RANLIB -RC -SET_MAKE -TCL_THREADS -CYGPATH -CELIB_DIR -DL_LIBS -CFLAGS_DEBUG -CFLAGS_OPTIMIZE -CFLAGS_WARNING -ZLIB_DLL_FILE -ZLIB_LIBS -ZLIB_OBJS -CFLAGS_DEFAULT -LDFLAGS_DEFAULT -TCL_VERSION -TCL_MAJOR_VERSION -TCL_MINOR_VERSION -TCL_PATCH_LEVEL -PKG_CFG_ARGS -TCL_LIB_FILE -TCL_LIB_FLAG -TCL_STATIC_LIB_FILE -TCL_STATIC_LIB_FLAG -TCL_IMPORT_LIB_FILE -TCL_IMPORT_LIB_FLAG -TCL_LIB_SPEC -TCL_STUB_LIB_FILE -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_PATH -TCL_INCLUDE_SPEC -TCL_BUILD_STUB_LIB_SPEC -TCL_BUILD_STUB_LIB_PATH -TCL_DLL_FILE -TCL_SRC_DIR -TCL_BIN_DIR -TCL_DBGX -CFG_TCL_SHARED_LIB_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_EXPORT_FILE_SUFFIX -EXTRA_CFLAGS -DEPARG -CC_OBJNAME -CC_EXENAME -LDFLAGS_DEBUG -LDFLAGS_OPTIMIZE -LDFLAGS_CONSOLE -LDFLAGS_WINDOW -STLIB_LD -SHLIB_LD -SHLIB_LD_LIBS -SHLIB_CFLAGS -SHLIB_SUFFIX -TCL_SHARED_BUILD -LIBS_GUI -DLLSUFFIX -LIBPREFIX -LIBSUFFIX -EXESUFFIX -LIBRARIES -MAKE_LIB -POST_MAKE_LIB -MAKE_DLL -MAKE_EXE -TCL_BUILD_LIB_SPEC -TCL_LD_SEARCH_FLAGS -TCL_NEEDS_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_EXP_FILE -TCL_LIB_VERSIONS_OK -TCL_PACKAGE_PATH -TCL_DDE_VERSION -TCL_DDE_MAJOR_VERSION -TCL_DDE_MINOR_VERSION -TCL_DDE_PATCH_LEVEL -TCL_REG_VERSION -TCL_REG_MAJOR_VERSION -TCL_REG_MINOR_VERSION -TCL_REG_PATCH_LEVEL -RC_OUT -RC_TYPE -RC_INCLUDE -RC_DEFINE -RC_DEFINES -RES +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= + +ac_unique_file="../generic/tcl.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS LIBOBJS -LTLIBOBJS' +RES +RC_DEFINES +RC_DEFINE +RC_INCLUDE +RC_TYPE +RC_OUT +TCL_REG_PATCH_LEVEL +TCL_REG_MINOR_VERSION +TCL_REG_MAJOR_VERSION +TCL_REG_VERSION +TCL_DDE_PATCH_LEVEL +TCL_DDE_MINOR_VERSION +TCL_DDE_MAJOR_VERSION +TCL_DDE_VERSION +TCL_PACKAGE_PATH +TCL_LIB_VERSIONS_OK +TCL_EXP_FILE +TCL_BUILD_EXP_FILE +TCL_NEEDS_EXP_FILE +TCL_LD_SEARCH_FLAGS +TCL_BUILD_LIB_SPEC +MAKE_EXE +MAKE_DLL +POST_MAKE_LIB +MAKE_LIB +LIBRARIES +EXESUFFIX +LIBSUFFIX +LIBPREFIX +DLLSUFFIX +LIBS_GUI +TCL_SHARED_BUILD +SHLIB_SUFFIX +SHLIB_CFLAGS +SHLIB_LD_LIBS +SHLIB_LD +STLIB_LD +LDFLAGS_WINDOW +LDFLAGS_CONSOLE +LDFLAGS_OPTIMIZE +LDFLAGS_DEBUG +CC_EXENAME +CC_OBJNAME +DEPARG +EXTRA_CFLAGS +CFG_TCL_EXPORT_FILE_SUFFIX +CFG_TCL_UNSHARED_LIB_SUFFIX +CFG_TCL_SHARED_LIB_SUFFIX +TCL_DBGX +TCL_BIN_DIR +TCL_SRC_DIR +TCL_DLL_FILE +TCL_BUILD_STUB_LIB_PATH +TCL_BUILD_STUB_LIB_SPEC +TCL_INCLUDE_SPEC +TCL_STUB_LIB_PATH +TCL_STUB_LIB_SPEC +TCL_STUB_LIB_FLAG +TCL_STUB_LIB_FILE +TCL_LIB_SPEC +TCL_IMPORT_LIB_FLAG +TCL_IMPORT_LIB_FILE +TCL_STATIC_LIB_FLAG +TCL_STATIC_LIB_FILE +TCL_LIB_FLAG +TCL_LIB_FILE +PKG_CFG_ARGS +TCL_PATCH_LEVEL +TCL_MINOR_VERSION +TCL_MAJOR_VERSION +TCL_VERSION +LDFLAGS_DEFAULT +CFLAGS_DEFAULT +ZLIB_OBJS +ZLIB_LIBS +ZLIB_DLL_FILE +CFLAGS_WARNING +CFLAGS_OPTIMIZE +CFLAGS_DEBUG +DL_LIBS +CELIB_DIR +CYGPATH +TCL_THREADS +SET_MAKE +RC +RANLIB +AR +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_threads +with_encoding +enable_shared +enable_64bit +enable_wince +with_celib +enable_symbols +' ac_precious_vars='build_alias host_alias target_alias @@ -764,6 +750,8 @@ CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -862,13 +850,20 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -881,13 +876,20 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1078,22 +1080,36 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1113,25 +1129,25 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1140,23 +1156,36 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac fi -# Be sure to have absolute directory names. +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1170,7 +1199,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1186,23 +1215,21 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1229,13 +1256,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1283,9 +1308,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1295,25 +1320,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1325,6 +1350,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-threads build with threads @@ -1352,6 +1378,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1359,15 +1386,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1392,42 +1421,232 @@ case $srcdir in ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.64 + +Copyright (C) 2009 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done + ac_retval=$ac_status fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.61 +} # ac_fn_c_try_run -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $2 + (void) $2; +#endif + + ; + return 0; +} _ACEOF - exit +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_decl + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -1463,8 +1682,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1498,12 +1717,12 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1519,13 +1738,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1550,12 +1769,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1584,9 +1804,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1601,9 +1821,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1619,64 +1839,69 @@ _ASBOX echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1686,16 +1911,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1709,60 +1934,56 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1829,10 +2050,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1842,25 +2063,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1869,10 +2090,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1882,25 +2103,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -1908,12 +2129,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -1926,10 +2143,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1939,25 +2156,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1966,10 +2183,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1980,18 +2197,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2010,11 +2227,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2025,10 +2242,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2038,25 +2255,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2069,10 +2286,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2082,25 +2299,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2112,12 +2329,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2127,98 +2340,82 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2228,14 +2425,14 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2254,78 +2451,75 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then : + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } fi - ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2333,37 +2527,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2375,51 +2563,46 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2433,54 +2616,34 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2491,34 +2654,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2529,35 +2669,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2568,42 +2685,18 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2619,18 +2712,14 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -2687,31 +2776,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -2722,17 +2789,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2741,18 +2810,14 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; @@ -2761,39 +2826,16 @@ $ac_kw foo_t foo () {return 0; } #endif _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -2815,15 +2857,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -2837,11 +2879,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2850,76 +2888,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -2931,8 +2927,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2942,11 +2938,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2955,83 +2947,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -3041,45 +2990,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3091,77 +3035,61 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$EGREP"; then ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3173,46 +3101,31 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3227,47 +3140,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3277,18 +3166,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3298,14 +3183,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3332,48 +3213,22 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi @@ -3388,10 +3243,10 @@ fi if test "${GCC}" = "yes" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -3401,34 +3256,34 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3438,34 +3293,34 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RC"; then ac_cv_prog_RC="$RC" # Let the user override the test. @@ -3475,43 +3330,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RC="windres" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then - { echo "$as_me:$LINENO: result: $RC" >&5 -echo "${ECHO_T}$RC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 +$as_echo "$RC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "${AR}" = "" ; then - { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 -echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Required archive tool 'ar' not found on PATH." "$LINENO" 5 fi if test "${RANLIB}" = "" ; then - { { echo "$as_me:$LINENO: error: Required archive index tool 'ranlib' not found on PATH." >&5 -echo "$as_me: error: Required archive index tool 'ranlib' not found on PATH." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Required archive index tool 'ranlib' not found on PATH." "$LINENO" 5 fi if test "${RC}" = "" ; then - { { echo "$as_me:$LINENO: error: Required resource tool 'windres' not found on PATH." >&5 -echo "$as_me: error: Required resource tool 'windres' not found on PATH." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Required resource tool 'windres' not found on PATH." "$LINENO" 5 fi fi @@ -3519,11 +3368,12 @@ fi # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -3540,12 +3390,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3555,19 +3405,15 @@ fi #-------------------------------------------------------------------- -{ echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 -echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6; } -if test "${tcl_cv_seh+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5 +$as_echo_n "checking for SEH support in compiler... " >&6; } +if test "${tcl_cv_seh+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : tcl_cv_seh=no else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3586,48 +3432,22 @@ int main(int argc, char** argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : tcl_cv_seh=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -tcl_cv_seh=no + tcl_cv_seh=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 -echo "${ECHO_T}$tcl_cv_seh" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5 +$as_echo "$tcl_cv_seh" >&6; } if test "$tcl_cv_seh" = "no" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_NO_SEH 1 -_ACEOF +$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h fi @@ -3637,16 +3457,12 @@ fi # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # -{ echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 -echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6; } -if test "${tcl_cv_eh_disposition+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5 +$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; } +if test "${tcl_cv_eh_disposition+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3663,41 +3479,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_eh_disposition=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_eh_disposition=no + tcl_cv_eh_disposition=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 -echo "${ECHO_T}$tcl_cv_eh_disposition" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5 +$as_echo "$tcl_cv_eh_disposition" >&6; } if test "$tcl_cv_eh_disposition" = "no" ; then -cat >>confdefs.h <<\_ACEOF -#define EXCEPTION_DISPOSITION int -_ACEOF +$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h fi @@ -3705,16 +3499,12 @@ fi # Check to see if the winsock2.h include file provided contains # typedefs like LPFN_ACCEPT and friends. # -{ echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 -echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6; } -if test "${tcl_cv_lpfn_decls+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LPFN_ACCEPT support in winsock2.h" >&5 +$as_echo_n "checking for LPFN_ACCEPT support in winsock2.h... " >&6; } +if test "${tcl_cv_lpfn_decls+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3732,41 +3522,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_lpfn_decls=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_lpfn_decls=no + tcl_cv_lpfn_decls=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 -echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lpfn_decls" >&5 +$as_echo "$tcl_cv_lpfn_decls" >&6; } if test "$tcl_cv_lpfn_decls" = "no" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_NO_LPFN_DECLS 1 -_ACEOF +$as_echo "#define HAVE_NO_LPFN_DECLS 1" >>confdefs.h fi @@ -3774,16 +3542,12 @@ fi # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. -{ echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 -echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6; } -if test "${tcl_cv_winnt_ignore_void+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5 +$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; } +if test "${tcl_cv_winnt_ignore_void+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define VOID void @@ -3803,41 +3567,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_winnt_ignore_void=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_winnt_ignore_void=no + tcl_cv_winnt_ignore_void=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 -echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5 +$as_echo "$tcl_cv_winnt_ignore_void" >&6; } if test "$tcl_cv_winnt_ignore_void" = "yes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WINNT_IGNORE_VOID 1 -_ACEOF +$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h fi @@ -3851,16 +3593,12 @@ fi # register and not on the stack. Instead, we just # call it from inline asm code. -{ echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 -echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6; } -if test "${tcl_cv_malloc_decl_alloca+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca declaration in malloc.h" >&5 +$as_echo_n "checking for alloca declaration in malloc.h... " >&6; } +if test "${tcl_cv_malloc_decl_alloca+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -3878,42 +3616,20 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_malloc_decl_alloca=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_malloc_decl_alloca=no + tcl_cv_malloc_decl_alloca=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 -echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_malloc_decl_alloca" >&5 +$as_echo "$tcl_cv_malloc_decl_alloca" >&6; } if test "$tcl_cv_malloc_decl_alloca" = "no" && test "${GCC}" = "yes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_GCC_INLINE 1 -_ACEOF +$as_echo "#define HAVE_ALLOCA_GCC_INLINE 1" >>confdefs.h fi @@ -3921,16 +3637,12 @@ fi # This is used to stop gcc from printing a compiler # warning when initializing a union member. -{ echo "$as_me:$LINENO: checking for cast to union support" >&5 -echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6; } -if test "${tcl_cv_cast_to_union+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 +$as_echo_n "checking for cast to union support... " >&6; } +if test "${tcl_cv_cast_to_union+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3944,41 +3656,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_cast_to_union=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_cast_to_union=no + tcl_cv_cast_to_union=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 -echo "${ECHO_T}$tcl_cv_cast_to_union" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5 +$as_echo "$tcl_cv_cast_to_union" >&6; } if test "$tcl_cv_cast_to_union" = "yes"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_CAST_TO_UNION 1 -_ACEOF +$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h fi @@ -3987,16 +3677,12 @@ fi # missing from winbase.h. This is known to be # a problem with VC++ 5.2. -{ echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 -echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6; } -if test "${tcl_cv_findex_enums+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 +$as_echo_n "checking for FINDEX_INFO_LEVELS in winbase.h... " >&6; } +if test "${tcl_cv_findex_enums+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -4014,57 +3700,31 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_findex_enums=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_findex_enums=no + tcl_cv_findex_enums=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 -echo "${ECHO_T}$tcl_cv_findex_enums" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_findex_enums" >&5 +$as_echo "$tcl_cv_findex_enums" >&6; } if test "$tcl_cv_findex_enums" = "no"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_NO_FINDEX_ENUMS 1 -_ACEOF +$as_echo "#define HAVE_NO_FINDEX_ENUMS 1" >>confdefs.h fi # See if MWMO_ALERTABLE is missing from winuser.h # This is known to be a problem with Mingw. -{ echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 -echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6; } -if test "${tcl_cv_mwmo_alertable+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MWMO_ALERTABLE in winuser.h" >&5 +$as_echo_n "checking for MWMO_ALERTABLE in winuser.h... " >&6; } +if test "${tcl_cv_mwmo_alertable+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -4081,41 +3741,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_mwmo_alertable=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - tcl_cv_mwmo_alertable=no + tcl_cv_mwmo_alertable=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 -echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_mwmo_alertable" >&5 +$as_echo "$tcl_cv_mwmo_alertable" >&6; } if test "$tcl_cv_mwmo_alertable" = "no"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_NO_MWMO_ALERTABLE 1 -_ACEOF +$as_echo "#define HAVE_NO_MWMO_ALERTABLE 1" >>confdefs.h fi @@ -4131,10 +3769,10 @@ fi #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for building with threads" >&5 -echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5 +$as_echo_n "checking for building with threads... " >&6; } # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then +if test "${enable_threads+set}" = set; then : enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=yes @@ -4142,23 +3780,19 @@ fi if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } TCL_THREADS=1 - cat >>confdefs.h <<\_ACEOF -#define TCL_THREADS 1 -_ACEOF + $as_echo "#define TCL_THREADS 1" >>confdefs.h # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention - cat >>confdefs.h <<\_ACEOF -#define USE_THREAD_ALLOC 1 -_ACEOF + $as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h else TCL_THREADS=0 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4170,7 +3804,7 @@ echo "${ECHO_T}no" >&6; } # Check whether --with-encoding was given. -if test "${with_encoding+set}" = set; then +if test "${with_encoding+set}" = set; then : withval=$with_encoding; with_tcencoding=${withval} fi @@ -4182,9 +3816,7 @@ _ACEOF else # Default encoding on windows is not "iso8859-1" - cat >>confdefs.h <<\_ACEOF -#define TCL_CFGVAL_ENCODING "cp1252" -_ACEOF + $as_echo "#define TCL_CFGVAL_ENCODING \"cp1252\"" >>confdefs.h fi @@ -4195,10 +3827,10 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking how to build libraries" >&5 -echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 +$as_echo_n "checking how to build libraries... " >&6; } # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes @@ -4213,16 +3845,14 @@ fi fi if test "$tcl_ok" = "yes" ; then - { echo "$as_me:$LINENO: result: shared" >&5 -echo "${ECHO_T}shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 +$as_echo "shared" >&6; } SHARED_BUILD=1 else - { echo "$as_me:$LINENO: result: static" >&5 -echo "${ECHO_T}static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 +$as_echo "static" >&6; } SHARED_BUILD=0 - cat >>confdefs.h <<\_ACEOF -#define STATIC_BUILD 1 -_ACEOF + $as_echo "#define STATIC_BUILD 1" >>confdefs.h fi @@ -4234,67 +3864,16 @@ _ACEOF #-------------------------------------------------------------------- # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4306,54 +3885,54 @@ done # Step 0: Enable 64 bit support? - { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 -echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 +$as_echo_n "checking if 64bit support is requested... " >&6; } # Check whether --enable-64bit was given. -if test "${enable_64bit+set}" = set; then +if test "${enable_64bit+set}" = set; then : enableval=$enable_64bit; do64bit=$enableval else do64bit=no fi - { echo "$as_me:$LINENO: result: $do64bit" >&5 -echo "${ECHO_T}$do64bit" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 +$as_echo "$do64bit" >&6; } # Cross-compiling options for Windows/CE builds - { echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 -echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5 +$as_echo_n "checking if Windows/CE build is requested... " >&6; } # Check whether --enable-wince was given. -if test "${enable_wince+set}" = set; then +if test "${enable_wince+set}" = set; then : enableval=$enable_wince; doWince=$enableval else doWince=no fi - { echo "$as_me:$LINENO: result: $doWince" >&5 -echo "${ECHO_T}$doWince" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5 +$as_echo "$doWince" >&6; } - { echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 -echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5 +$as_echo_n "checking for Windows/CE celib directory... " >&6; } # Check whether --with-celib was given. -if test "${with_celib+set}" = set; then +if test "${with_celib+set}" = set; then : withval=$with_celib; CELIB_DIR=$withval else CELIB_DIR=NO_CELIB fi - { echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 -echo "${ECHO_T}$CELIB_DIR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CELIB_DIR" >&5 +$as_echo "$CELIB_DIR" >&6; } # Set some defaults (may get changed below) EXTRA_CFLAGS="" # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CYGPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CYGPATH+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CYGPATH"; then ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. @@ -4363,14 +3942,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CYGPATH="cygpath -w" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" @@ -4378,11 +3957,11 @@ fi fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then - { echo "$as_me:$LINENO: result: $CYGPATH" >&5 -echo "${ECHO_T}$CYGPATH" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 +$as_echo "$CYGPATH" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4402,36 +3981,32 @@ fi echo "101 \"name\"" >> $conftest echo "END" >> $conftest - { echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 -echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows native path bug in windres" >&5 +$as_echo_n "checking for Windows native path bug in windres... " >&6; } cyg_conftest=`$CYGPATH $conftest` if { ac_try='$RC -o conftest.res.o $cyg_conftest' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } ; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } CYGPATH=echo fi conftest= cyg_conftest= fi - { echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 -echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6; } -if test "${ac_cv_cygwin+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cygwin version of gcc" >&5 +$as_echo_n "checking for Cygwin version of gcc... " >&6; } +if test "${ac_cv_cygwin+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __CYGWIN__ @@ -4446,41 +4021,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_cygwin=no else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_cygwin=yes + ac_cv_cygwin=yes fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 -echo "${ECHO_T}$ac_cv_cygwin" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cygwin" >&5 +$as_echo "$ac_cv_cygwin" >&6; } if test "$ac_cv_cygwin" = "yes" ; then - { echo "$as_me:$LINENO: WARNING: Compiling under Cygwin is not currently supported. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling under Cygwin is not currently supported. If you are not sure you want this, see the README file for information about building with Mingw." >&5 -echo "$as_me: WARNING: Compiling under Cygwin is not currently supported. +$as_echo "$as_me: WARNING: Compiling under Cygwin is not currently supported. If you are not sure you want this, see the README file for information about building with Mingw." >&2;} fi @@ -4492,12 +4047,12 @@ file for information about building with Mingw." >&2;} # set various compiler flags depending on whether we are using gcc or cl - { echo "$as_me:$LINENO: checking compiler flags" >&5 -echo $ECHO_N "checking compiler flags... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5 +$as_echo_n "checking compiler flags... " >&6; } if test "${GCC}" = "yes" ; then if test "$do64bit" != "no" ; then - { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on Windows" >&5 -echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on Windows" >&5 +$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} fi SHLIB_LD="" SHLIB_LD_LIBS='${LIBS}' @@ -4535,23 +4090,20 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} if test "${SHARED_BUILD}" = "0" ; then # static - { echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 +$as_echo "using static flags" >&6; } runtime= LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else # dynamic - { echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 +$as_echo "using shared flags" >&6; } # ad-hoc check to see if CC supports -shared. if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then - { { echo "$as_me:$LINENO: error: ${CC} does not support the -shared option. - You will need to upgrade to a newer version of the toolchain." >&5 -echo "$as_me: error: ${CC} does not support the -shared option. - You will need to upgrade to a newer version of the toolchain." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "${CC} does not support the -shared option. + You will need to upgrade to a newer version of the toolchain." "$LINENO" 5 fi runtime= @@ -4608,15 +4160,15 @@ echo "$as_me: error: ${CC} does not support the -shared option. else if test "${SHARED_BUILD}" = "0" ; then # static - { echo "$as_me:$LINENO: result: using static flags" >&5 -echo "${ECHO_T}using static flags" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 +$as_echo "using static flags" >&6; } runtime=-MT LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else # dynamic - { echo "$as_me:$LINENO: result: using shared flags" >&5 -echo "${ECHO_T}using shared flags" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 +$as_echo "using shared flags" >&6; } runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. LIBRARIES="\${SHARED_LIBRARIES}" @@ -4649,81 +4201,30 @@ echo "${ECHO_T}using shared flags" >&6; } ia64) MACHINE="IA64" PATH64="${MSSDK}/Bin/Win64" - ;; - esac - if test ! -d "${PATH64}" ; then - { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 -echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} - { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5 -echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} - do64bit="no" - else - { echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 -echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6; } - fi - fi - - LIBS="user32.lib advapi32.lib ws2_32.lib" - if test "$do64bit" != "no" ; then - # The space-based-path will work for the Makefile, but will - # not work if AC_TRY_COMPILE is called. TEA has the - # TEA_PATH_NOSPACE to avoid this issue. - # Check if _WIN64 is already recognized, and if so we don't - # need to modify CC. - { echo "$as_me:$LINENO: checking whether _WIN64 is declared" >&5 -echo $ECHO_N "checking whether _WIN64 is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl__WIN64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef _WIN64 - (void) _WIN64; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl__WIN64=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ;; + esac + if test ! -d "${PATH64}" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 +$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5 +$as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} + do64bit="no" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5 +$as_echo " Using 64-bit $MACHINE mode" >&6; } + fi + fi - ac_cv_have_decl__WIN64=no -fi + LIBS="user32.lib advapi32.lib ws2_32.lib" + if test "$do64bit" != "no" ; then + # The space-based-path will work for the Makefile, but will + # not work if AC_TRY_COMPILE is called. TEA has the + # TEA_PATH_NOSPACE to avoid this issue. + # Check if _WIN64 is already recognized, and if so we don't + # need to modify CC. + ac_fn_c_check_decl "$LINENO" "_WIN64" "ac_cv_have_decl__WIN64" "$ac_includes_default" +if test "x$ac_cv_have_decl__WIN64" = x""yes; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__WIN64" >&5 -echo "${ECHO_T}$ac_cv_have_decl__WIN64" >&6; } -if test $ac_cv_have_decl__WIN64 = yes; then - : else CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ -I\"${MSSDK}/Include/crt\" \ @@ -4791,15 +4292,11 @@ fi SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` if test ! -d "${CELIB_DIR}/inc"; then - { { echo "$as_me:$LINENO: error: Invalid celib directory \"${CELIB_DIR}\"" >&5 -echo "$as_me: error: Invalid celib directory \"${CELIB_DIR}\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Invalid celib directory \"${CELIB_DIR}\"" "$LINENO" 5 fi if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"\ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then - { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5 -echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5 else CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" if test -d "${CEINCLUDE}/${TARGETCPU}" ; then @@ -4894,9 +4391,7 @@ _ACEOF fi if test "$do64bit" != "no" ; then - cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_DO64BIT 1 -_ACEOF + $as_echo "#define TCL_CFG_DO64BIT 1" >>confdefs.h fi @@ -4912,13 +4407,13 @@ _ACEOF # as we just assume that the platform hasn't got a usable z.lib #------------------------------------------------------------------------ -if test "$do64bit" = "yes"; then +if test "$do64bit" = "yes"; then : tcl_ok=no else -if test "${enable_shared+set}" = "set"; then +if test "${enable_shared+set}" = "set"; then : enableval="$enable_shared" tcl_ok=$enableval @@ -4929,10 +4424,8 @@ else fi - fi - -if test "$tcl_ok" = "yes"; then +if test "$tcl_ok" = "yes"; then : ZLIB_DLL_FILE=\${ZLIB_DLL_FILE} @@ -4946,10 +4439,7 @@ else fi - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZLIB 1 -_ACEOF +$as_echo "#define HAVE_ZLIB 1" >>confdefs.h #-------------------------------------------------------------------- @@ -4959,10 +4449,10 @@ _ACEOF #-------------------------------------------------------------------- - { echo "$as_me:$LINENO: checking for build with symbols" >&5 -echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 +$as_echo_n "checking for build with symbols... " >&6; } # Check whether --enable-symbols was given. -if test "${enable_symbols+set}" = set; then +if test "${enable_symbols+set}" = set; then : enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no @@ -4973,54 +4463,44 @@ fi CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_OPTIMIZED 1 -_ACEOF + $as_echo "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h else CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' DBGX=g if test "$tcl_ok" = "yes"; then - { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 -echo "${ECHO_T}yes (standard debugging)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 +$as_echo "yes (standard debugging)" >&6; } fi fi - cat >>confdefs.h <<\_ACEOF -#define TCL_CFG_DEBUG 1 -_ACEOF + $as_echo "#define TCL_CFG_DEBUG 1" >>confdefs.h if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then - cat >>confdefs.h <<\_ACEOF -#define TCL_MEM_DEBUG 1 -_ACEOF + $as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h fi if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then - cat >>confdefs.h <<\_ACEOF -#define TCL_COMPILE_DEBUG 1 -_ACEOF + $as_echo "#define TCL_COMPILE_DEBUG 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define TCL_COMPILE_STATS 1 -_ACEOF + $as_echo "#define TCL_COMPILE_STATS 1" >>confdefs.h fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 -echo "${ECHO_T}enabled symbols mem compile debugging" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem compile debugging" >&5 +$as_echo "enabled symbols mem compile debugging" >&6; } else - { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 -echo "${ECHO_T}enabled $tcl_ok debugging" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 +$as_echo "enabled $tcl_ok debugging" >&6; } fi fi @@ -5224,12 +4704,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -5237,8 +4718,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -5261,12 +4742,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -5283,6 +4764,12 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -5312,11 +4799,11 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -5325,11 +4812,13 @@ LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -5339,59 +4828,79 @@ cat >$CONFIG_STATUS <<_ACEOF debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -5400,20 +4909,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -5424,32 +4931,111 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi -done + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -5463,13 +5049,17 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -5484,104 +5074,103 @@ echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -5598,12 +5187,12 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -5618,13 +5207,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5637,50 +5232,58 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files -Report bugs to ." +Report bugs to the package provider." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.64, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -5702,25 +5305,27 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -5735,30 +5340,32 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -5768,9 +5375,7 @@ do "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; "tcl.hpj") CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -5795,7 +5400,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -5806,244 +5411,140 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -RC!$RC$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -TCL_THREADS!$TCL_THREADS$ac_delim -CYGPATH!$CYGPATH$ac_delim -CELIB_DIR!$CELIB_DIR$ac_delim -DL_LIBS!$DL_LIBS$ac_delim -CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim -CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim -CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim -ZLIB_DLL_FILE!$ZLIB_DLL_FILE$ac_delim -ZLIB_LIBS!$ZLIB_LIBS$ac_delim -ZLIB_OBJS!$ZLIB_OBJS$ac_delim -CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim -LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim -TCL_VERSION!$TCL_VERSION$ac_delim -TCL_MAJOR_VERSION!$TCL_MAJOR_VERSION$ac_delim -TCL_MINOR_VERSION!$TCL_MINOR_VERSION$ac_delim -TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim -PKG_CFG_ARGS!$PKG_CFG_ARGS$ac_delim -TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim -TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim -TCL_STATIC_LIB_FILE!$TCL_STATIC_LIB_FILE$ac_delim -TCL_STATIC_LIB_FLAG!$TCL_STATIC_LIB_FLAG$ac_delim -TCL_IMPORT_LIB_FILE!$TCL_IMPORT_LIB_FILE$ac_delim -TCL_IMPORT_LIB_FLAG!$TCL_IMPORT_LIB_FLAG$ac_delim -TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim -TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim -TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim -TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim -TCL_STUB_LIB_PATH!$TCL_STUB_LIB_PATH$ac_delim -TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim -TCL_BUILD_STUB_LIB_SPEC!$TCL_BUILD_STUB_LIB_SPEC$ac_delim -TCL_BUILD_STUB_LIB_PATH!$TCL_BUILD_STUB_LIB_PATH$ac_delim -TCL_DLL_FILE!$TCL_DLL_FILE$ac_delim -TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim -TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim -TCL_DBGX!$TCL_DBGX$ac_delim -CFG_TCL_SHARED_LIB_SUFFIX!$CFG_TCL_SHARED_LIB_SUFFIX$ac_delim -CFG_TCL_UNSHARED_LIB_SUFFIX!$CFG_TCL_UNSHARED_LIB_SUFFIX$ac_delim -CFG_TCL_EXPORT_FILE_SUFFIX!$CFG_TCL_EXPORT_FILE_SUFFIX$ac_delim -EXTRA_CFLAGS!$EXTRA_CFLAGS$ac_delim -DEPARG!$DEPARG$ac_delim -CC_OBJNAME!$CC_OBJNAME$ac_delim -CC_EXENAME!$CC_EXENAME$ac_delim -LDFLAGS_DEBUG!$LDFLAGS_DEBUG$ac_delim -LDFLAGS_OPTIMIZE!$LDFLAGS_OPTIMIZE$ac_delim -LDFLAGS_CONSOLE!$LDFLAGS_CONSOLE$ac_delim -LDFLAGS_WINDOW!$LDFLAGS_WINDOW$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr fi -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -STLIB_LD!$STLIB_LD$ac_delim -SHLIB_LD!$SHLIB_LD$ac_delim -SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim -SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim -SHLIB_SUFFIX!$SHLIB_SUFFIX$ac_delim -TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim -LIBS_GUI!$LIBS_GUI$ac_delim -DLLSUFFIX!$DLLSUFFIX$ac_delim -LIBPREFIX!$LIBPREFIX$ac_delim -LIBSUFFIX!$LIBSUFFIX$ac_delim -EXESUFFIX!$EXESUFFIX$ac_delim -LIBRARIES!$LIBRARIES$ac_delim -MAKE_LIB!$MAKE_LIB$ac_delim -POST_MAKE_LIB!$POST_MAKE_LIB$ac_delim -MAKE_DLL!$MAKE_DLL$ac_delim -MAKE_EXE!$MAKE_EXE$ac_delim -TCL_BUILD_LIB_SPEC!$TCL_BUILD_LIB_SPEC$ac_delim -TCL_LD_SEARCH_FLAGS!$TCL_LD_SEARCH_FLAGS$ac_delim -TCL_NEEDS_EXP_FILE!$TCL_NEEDS_EXP_FILE$ac_delim -TCL_BUILD_EXP_FILE!$TCL_BUILD_EXP_FILE$ac_delim -TCL_EXP_FILE!$TCL_EXP_FILE$ac_delim -TCL_LIB_VERSIONS_OK!$TCL_LIB_VERSIONS_OK$ac_delim -TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim -TCL_DDE_VERSION!$TCL_DDE_VERSION$ac_delim -TCL_DDE_MAJOR_VERSION!$TCL_DDE_MAJOR_VERSION$ac_delim -TCL_DDE_MINOR_VERSION!$TCL_DDE_MINOR_VERSION$ac_delim -TCL_DDE_PATCH_LEVEL!$TCL_DDE_PATCH_LEVEL$ac_delim -TCL_REG_VERSION!$TCL_REG_VERSION$ac_delim -TCL_REG_MAJOR_VERSION!$TCL_REG_MAJOR_VERSION$ac_delim -TCL_REG_MINOR_VERSION!$TCL_REG_MINOR_VERSION$ac_delim -TCL_REG_PATCH_LEVEL!$TCL_REG_PATCH_LEVEL$ac_delim -RC_OUT!$RC_OUT$ac_delim -RC_TYPE!$RC_TYPE$ac_delim -RC_INCLUDE!$RC_INCLUDE$ac_delim -RC_DEFINE!$RC_DEFINE$ac_delim -RC_DEFINES!$RC_DEFINES$ac_delim -RES!$RES$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 39; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACAWK _ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF - # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -6059,20 +5560,20 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -for ac_tag in :F $CONFIG_FILES +eval set X " :F $CONFIG_FILES " +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -6100,26 +5601,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -6129,42 +5638,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6182,20 +5656,15 @@ echo X"$as_dir" | q } s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -6231,12 +5700,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -6244,36 +5713,37 @@ case `sed -n '/datarootdir/ { /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' $ac_file_inputs` in +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -6282,21 +5752,24 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; @@ -6306,11 +5779,13 @@ which seems to be undefined. Please make sure it is defined." >&2;} done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -6330,7 +5805,11 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi -- cgit v0.12 From 98f6e899d06fff1e57becd355ca90e052ceaa794 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 6 Apr 2010 09:17:17 +0000 Subject: regenerated with autoconf-2.59 [Bug 2982540] configure and install* script files should always have LF --- unix/configure | 23678 +++++++++++++++++++++++++++++++++++++------------------ win/configure | 5666 +++++++------ 2 files changed, 18854 insertions(+), 10490 deletions(-) diff --git a/unix/configure b/unix/configure index dce95b1..24729b9 100755 --- a/unix/configure +++ b/unix/configure @@ -1,413 +1,81 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for tcl 8.6. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# Generated by GNU Autoconf 2.59 for tcl 8.6. # +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + $as_unset $as_var fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -415,107 +83,146 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -524,24 +231,38 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -exec 7<&0 &1 +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='tcl' @@ -549,216 +270,50 @@ PACKAGE_TARNAME='tcl' PACKAGE_VERSION='8.6' PACKAGE_STRING='tcl 8.6' PACKAGE_BUGREPORT='' -PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='DLTEST_SUFFIX -DLTEST_LD -EXTRA_TCLSH_LIBS -EXTRA_BUILD_HTML -EXTRA_INSTALL_BINARIES -EXTRA_INSTALL -EXTRA_APP_CC_SWITCHES -EXTRA_CC_SWITCHES -PACKAGE_DIR -HTML_DIR -PRIVATE_INCLUDE_DIR -TCL_LIBRARY -TCL_MODULE_PATH -TCL_PACKAGE_PATH -BUILD_DLTEST -MAKEFILE_SHELL -DTRACE_OBJ -DTRACE_HDR -DTRACE_SRC -INSTALL_TZDATA -TCL_HAS_LONGLONG -TCL_UNSHARED_LIB_SUFFIX -TCL_SHARED_LIB_SUFFIX -TCL_LIB_VERSIONS_OK -TCL_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_NEEDS_EXP_FILE -TCL_BUILD_LIB_SPEC -LD_LIBRARY_PATH_VAR -TCL_SHARED_BUILD -CFG_TCL_EXPORT_FILE_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_SHARED_LIB_SUFFIX -TCL_SRC_DIR -TCL_BUILD_STUB_LIB_PATH -TCL_BUILD_STUB_LIB_SPEC -TCL_INCLUDE_SPEC -TCL_STUB_LIB_PATH -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_FILE -TCL_LIB_SPEC -TCL_LIB_FLAG -TCL_LIB_FILE -PKG_CFG_ARGS -TCL_YEAR -TCL_PATCH_LEVEL -TCL_MINOR_VERSION -TCL_MAJOR_VERSION -TCL_VERSION -DTRACE -LDFLAGS_DEFAULT -CFLAGS_DEFAULT -INSTALL_STUB_LIB -DLL_INSTALL_DIR -INSTALL_LIB -MAKE_STUB_LIB -MAKE_LIB -SHLIB_SUFFIX -SHLIB_CFLAGS -SHLIB_LD_LIBS -TK_SHLIB_LD_EXTRAS -TCL_SHLIB_LD_EXTRAS -SHLIB_LD -STLIB_LD -LD_SEARCH_FLAGS -CC_SEARCH_FLAGS -LDFLAGS_OPTIMIZE -LDFLAGS_DEBUG -CFLAGS_WARNING -CFLAGS_OPTIMIZE -CFLAGS_DEBUG -LDAIX_SRC -PLAT_SRCS -PLAT_OBJS -DL_OBJS -DL_LIBS -TCL_LIBS -LIBOBJS -AR -RANLIB -ZLIB_INCLUDE -ZLIB_SRCS -ZLIB_OBJS -ZLIB_DIR -TCL_THREADS -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAN_FLAGS -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS ZLIB_DIR ZLIB_OBJS ZLIB_SRCS ZLIB_INCLUDE RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT DTRACE TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG INSTALL_TZDATA DTRACE_SRC DTRACE_HDR DTRACE_OBJ MAKEFILE_SHELL BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR PACKAGE_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_TCLSH_LIBS DLTEST_LD DLTEST_SUFFIX' ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_man_symlinks -enable_man_compression -enable_man_suffix -enable_threads -with_encoding -enable_shared -enable_64bit -enable_64bit_vis -enable_rpath -enable_corefoundation -enable_load -enable_symbols -enable_langinfo -enable_dll_unloading -with_tzdata -enable_dtrace -enable_framework -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -781,48 +336,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -844,59 +385,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval enable_$ac_useropt=\$ac_optarg ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -923,12 +438,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -953,16 +462,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1027,16 +533,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1087,36 +583,26 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval with_$ac_useropt=\$ac_optarg ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1136,25 +622,26 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1163,36 +650,31 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var - # Remove trailing slashes. + eval ac_val=$`echo $ac_var` case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - # Be sure to have absolute directory names. +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1206,7 +688,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1219,72 +701,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1313,11 +797,14 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1327,25 +814,18 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/tcl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1359,7 +839,6 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-man-symlinks use symlinks for the manpages (default: off) @@ -1397,593 +876,160 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF tcl configure 8.6 -generated by GNU Autoconf 2.64 +generated by GNU Autoconf 2.59 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## +It was created by tcl $as_me 8.6, which was +generated by GNU Autoconf 2.59. Invocation command line was -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $ $0 $@ - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## -} # ac_fn_c_try_compile +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_member -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME +_ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS + echo "PATH: $as_dir" +done } >&5 @@ -2005,6 +1051,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -2015,13 +1062,13 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) - as_fn_append ac_configure_args1 " '$ac_arg'" + ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -2037,19 +1084,21 @@ do -* ) ac_must_keep_next=true ;; esac fi - as_fn_append ac_configure_args " '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -2062,35 +1111,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -2101,28 +1135,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -2134,26 +1162,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -2161,46 +1189,40 @@ cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -2210,79 +1232,69 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2295,6 +1307,31 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 @@ -2334,60 +1371,62 @@ TCL_SRC_DIR="`cd "$srcdir"/..; pwd`" #------------------------------------------------------------------------ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use symlinks for manpages" >&5 -$as_echo_n "checking whether to use symlinks for manpages... " >&6; } - # Check whether --enable-man-symlinks was given. -if test "${enable_man_symlinks+set}" = set; then : - enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" + echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5 +echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6 + # Check whether --enable-man-symlinks or --disable-man-symlinks was given. +if test "${enable_man_symlinks+set}" = set; then + enableval="$enable_man_symlinks" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks" else enableval="no" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 -$as_echo "$enableval" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compress the manpages" >&5 -$as_echo_n "checking whether to compress the manpages... " >&6; } - # Check whether --enable-man-compression was given. -if test "${enable_man_compression+set}" = set; then : - enableval=$enable_man_compression; case $enableval in - yes) as_fn_error "missing argument to --enable-man-compression" "$LINENO" 5;; +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 + + echo "$as_me:$LINENO: checking whether to compress the manpages" >&5 +echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6 + # Check whether --enable-man-compression or --disable-man-compression was given. +if test "${enable_man_compression+set}" = set; then + enableval="$enable_man_compression" + case $enableval in + yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5 +echo "$as_me: error: missing argument to --enable-man-compression" >&2;} + { (exit 1); exit 1; }; };; no) ;; *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";; esac else enableval="no" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 -$as_echo "$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 if test "$enableval" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compressed file suffix" >&5 -$as_echo_n "checking for compressed file suffix... " >&6; } + echo "$as_me:$LINENO: checking for compressed file suffix" >&5 +echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $Z" >&5 -$as_echo "$Z" >&6; } + echo "$as_me:$LINENO: result: $Z" >&5 +echo "${ECHO_T}$Z" >&6 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add a package name suffix for the manpages" >&5 -$as_echo_n "checking whether to add a package name suffix for the manpages... " >&6; } - # Check whether --enable-man-suffix was given. -if test "${enable_man_suffix+set}" = set; then : - enableval=$enable_man_suffix; case $enableval in + echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5 +echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6 + # Check whether --enable-man-suffix or --disable-man-suffix was given. +if test "${enable_man_suffix+set}" = set; then + enableval="$enable_man_suffix" + case $enableval in yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac else enableval="no" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5 -$as_echo "$enableval" >&6; } +fi; + echo "$as_me:$LINENO: result: $enableval" >&5 +echo "${ECHO_T}$enableval" >&6 @@ -2410,10 +1449,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2423,37 +1462,35 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2463,50 +1500,39 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2516,64 +1542,103 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - fi fi -if test -z "$CC"; then +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. @@ -2587,25 +1652,24 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2615,41 +1679,39 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2659,227 +1721,183 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } fi + ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2887,31 +1905,38 @@ $as_echo "$ac_try_echo"; } >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac done else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -2923,46 +1948,45 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -2976,49 +2000,55 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3029,34 +2059,39 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3072,14 +2107,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3107,17 +2146,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -3132,37 +2166,205 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3170,14 +2372,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; @@ -3186,16 +2392,41 @@ $ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 + case $ac_cv_c_inline in inline | yes) ;; @@ -3227,15 +2458,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3249,7 +2480,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3258,24 +2493,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -3285,7 +2564,7 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -3297,8 +2576,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3308,7 +2587,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3317,24 +2600,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -3344,13 +2671,14 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -3360,142 +2688,31 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3510,23 +2727,51 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - + $EGREP "memchr" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3536,14 +2781,18 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "free" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3553,13 +2802,16 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3579,40 +2831,109 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3621,13 +2942,17 @@ done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5 -$as_echo_n "checking dirent.h... " >&6; } -if test "${tcl_cv_dirent_h+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking dirent.h" >&5 +echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 +if test "${tcl_cv_dirent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3657,6216 +2982,14979 @@ closedir(d); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_dirent_h=yes else - tcl_cv_dirent_h=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_dirent_h=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5 -$as_echo "$tcl_cv_dirent_h" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5 +echo "${ECHO_T}$tcl_cv_dirent_h" >&6 if test $tcl_cv_dirent_h = no; then -$as_echo "#define NO_DIRENT_H 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NO_DIRENT_H 1 +_ACEOF fi - ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" -if test "x$ac_cv_header_float_h" = x""yes; then : - + if test "${ac_cv_header_float_h+set}" = set; then + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +if test "${ac_cv_header_float_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 else + # Is the header compilable? +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define NO_FLOAT_H 1" >>confdefs.h - +ac_header_compiler=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - - ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default" -if test "x$ac_cv_header_values_h" = x""yes; then : - +# Is the header present? +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - -$as_echo "#define NO_VALUES_H 1" >>confdefs.h - + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" -if test "x$ac_cv_header_limits_h" = x""yes; then : - -$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h - +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +if test "${ac_cv_header_float_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -$as_echo "#define NO_LIMITS_H 1" >>confdefs.h + ac_cv_header_float_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 fi +if test $ac_cv_header_float_h = yes; then + : +else +cat >>confdefs.h <<\_ACEOF +#define NO_FLOAT_H 1 +_ACEOF - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : - tcl_ok=1 -else - tcl_ok=0 fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${ac_cv_header_values_h+set}" = set; then + echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +if test "${ac_cv_header_values_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking values.h usability" >&5 +echo $ECHO_N "checking values.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +$ac_includes_default +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strtol" >/dev/null 2>&1; then : - +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - tcl_ok=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking values.h presence" >&5 +echo $ECHO_N "checking values.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strtoul" >/dev/null 2>&1; then : - +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - tcl_ok=0 + ac_cpp_err=yes fi -rm -f conftest* - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strtod" >/dev/null 2>&1; then : + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: values.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: values.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for values.h" >&5 +echo $ECHO_N "checking for values.h... $ECHO_C" >&6 +if test "${ac_cv_header_values_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - tcl_ok=0 + ac_cv_header_values_h=$ac_header_preproc fi -rm -f conftest* +echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5 +echo "${ECHO_T}$ac_cv_header_values_h" >&6 - if test $tcl_ok = 0; then +fi +if test $ac_cv_header_values_h = yes; then + : +else -$as_echo "#define NO_STDLIB_H 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NO_VALUES_H 1 +_ACEOF - fi - ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = x""yes; then : - tcl_ok=1 -else - tcl_ok=0 fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${ac_cv_header_limits_h+set}" = set; then + echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +if test "${ac_cv_header_limits_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking limits.h usability" >&5 +echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +$ac_includes_default +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strstr" >/dev/null 2>&1; then : - +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - tcl_ok=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking limits.h presence" >&5 +echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "strerror" >/dev/null 2>&1; then : - +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - tcl_ok=0 + ac_cpp_err=yes fi -rm -f conftest* - - - # See also memmove check below for a place where NO_STRING_H can be - # set and why. - - if test $tcl_ok = 0; then - -$as_echo "#define NO_STRING_H 1" >>confdefs.h - - fi - - ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_wait_h" = x""yes; then : - +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h - + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - - ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for limits.h" >&5 +echo $ECHO_N "checking for limits.h... $ECHO_C" >&6 +if test "${ac_cv_header_limits_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -$as_echo "#define NO_DLFCN_H 1" >>confdefs.h + ac_cv_header_limits_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5 +echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi +if test $ac_cv_header_limits_h = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIMITS_H 1 +_ACEOF +else - # OS/390 lacks sys/param.h (and doesn't need it, by chance). - for ac_header in sys/param.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_param_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PARAM_H 1 +cat >>confdefs.h <<\_ACEOF +#define NO_LIMITS_H 1 _ACEOF fi -done + if test "${ac_cv_header_stdlib_h+set}" = set; then + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -#-------------------------------------------------------------------- -# Determines the correct executable file extension (.exe) -#-------------------------------------------------------------------- - - - -#------------------------------------------------------------------------ -# If we're using GCC, see if the compiler understands -pipe. If so, use it. -# It makes compiling go faster. (This is only a performance feature.) -#------------------------------------------------------------------------ - -if test -z "$no_pipe" && test -n "$GCC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5 -$as_echo_n "checking if the compiler understands -pipe... " >&6; } -if test "${tcl_cv_cc_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_cc_pipe=yes +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - tcl_cv_cc_pipe=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$hold_cflags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5 -$as_echo "$tcl_cv_cc_pipe" >&6; } - if test $tcl_cv_cc_pipe = yes; then - CFLAGS="$CFLAGS -pipe" - fi + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#------------------------------------------------------------------------ -# Threads support -#------------------------------------------------------------------------ - + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then : - enableval=$enable_threads; tcl_ok=$enableval +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - tcl_ok=yes + ac_cv_header_stdlib_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +fi +if test $ac_cv_header_stdlib_h = yes; then + tcl_ok=1 +else + tcl_ok=0 +fi - if test "${TCL_THREADS}" = 1; then - tcl_threaded_core=1; - fi - if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then - TCL_THREADS=1 - # USE_THREAD_ALLOC tells us to try the special thread-based - # allocator that significantly reduces lock contention + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtol" >/dev/null 2>&1; then + : +else + tcl_ok=0 +fi +rm -f conftest* + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -$as_echo "#define _REENTRANT 1" >>confdefs.h +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtoul" >/dev/null 2>&1; then + : +else + tcl_ok=0 +fi +rm -f conftest* - if test "`uname -s`" = "SunOS" ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include -$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtod" >/dev/null 2>&1; then + : +else + tcl_ok=0 +fi +rm -f conftest* - fi + if test $tcl_ok = 0; then -$as_echo "#define _THREAD_SAFE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NO_STDLIB_H 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then : - $as_echo_n "(cached) " >&6 + fi + if test "${ac_cv_header_string_h+set}" = set; then + echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +if test "${ac_cv_header_string_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +echo "$as_me:$LINENO: checking string.h usability" >&5 +echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} +$ac_includes_default +#include _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_mutex_init=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - ac_cv_lib_pthread_pthread_mutex_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then : - tcl_ok=yes +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking string.h presence" >&5 +echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - tcl_ok=no + ac_cpp_err=yes fi - - if test "$tcl_ok" = "no"; then - # Check a little harder for __pthread_mutex_init in the same - # library, as some systems hide it there until pthread.h is - # defined. We could alternatively do an AC_TRY_COMPILE with - # pthread.h, but that will work with libpthread really doesn't - # exist, like AIX 4.2. [Bug: 4359] - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5 -$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __pthread_mutex_init (); -int -main () -{ -return __pthread_mutex_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread___pthread_mutex_init=yes + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for string.h" >&5 +echo $ECHO_N "checking for string.h... $ECHO_C" >&6 +if test "${ac_cv_header_string_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_lib_pthread___pthread_mutex_init=no + ac_cv_header_string_h=$ac_header_preproc fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +echo "${ECHO_T}$ac_cv_header_string_h" >&6 + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 -$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_pthread___pthread_mutex_init" = x""yes; then : - tcl_ok=yes +if test $ac_cv_header_string_h = yes; then + tcl_ok=1 else - tcl_ok=no + tcl_ok=0 fi - fi - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthread" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5 -$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; } -if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthreads $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthreads_pthread_mutex_init=yes -else - ac_cv_lib_pthreads_pthread_mutex_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 -$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = x""yes; then : - tcl_ok=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strstr" >/dev/null 2>&1; then + : else - tcl_ok=no + tcl_ok=0 fi +rm -f conftest* - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthreads" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5 -$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; } -if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_pthread_mutex_init=yes -else - ac_cv_lib_c_pthread_mutex_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5 -$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_c_pthread_mutex_init" = x""yes; then : - tcl_ok=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strerror" >/dev/null 2>&1; then + : else - tcl_ok=no + tcl_ok=0 fi +rm -f conftest* - if test "$tcl_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5 -$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; } -if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} + # See also memmove check below for a place where NO_STRING_H can be + # set and why. + + if test $tcl_ok = 0; then + +cat >>confdefs.h <<\_ACEOF +#define NO_STRING_H 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_r_pthread_mutex_init=yes -else - ac_cv_lib_c_r_pthread_mutex_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + + fi + + if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_c_r_pthread_mutex_init" = x""yes; then : - tcl_ok=yes +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 else - tcl_ok=no -fi + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/wait.h usability" >&5 +echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -pthread" - else - TCL_THREADS=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5 -$as_echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;} - fi - fi - fi - fi +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - # Does the pthread-implementation provide - # 'pthread_attr_setstacksize' ? - for ac_func in pthread_attr_setstacksize -do : - ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize" -if test "x$ac_cv_func_pthread_attr_setstacksize" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 +# Is the header present? +echo "$as_me:$LINENO: checking sys/wait.h presence" >&5 +echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -done +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - else - TCL_THREADS=0 - fi - # Do checking message here to not mess up interleaved configure output - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5 -$as_echo_n "checking for building with threads... " >&6; } - if test "${TCL_THREADS}" = 1; then + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -$as_echo "#define TCL_THREADS 1" >>confdefs.h +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/wait.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/wait.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sys/wait.h" >&5 +echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_wait_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 - if test "${tcl_threaded_core}" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (threaded core)" >&5 -$as_echo "yes (threaded core)" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi +fi +if test $ac_cv_header_sys_wait_h = yes; then + : +else +cat >>confdefs.h <<\_ACEOF +#define NO_SYS_WAIT_H 1 +_ACEOF +fi -#------------------------------------------------------------------------ -# Embedded configuration information, encoding to use for the values, TIP #59 -#------------------------------------------------------------------------ + if test "${ac_cv_header_dlfcn_h+set}" = set; then + echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +if test "${ac_cv_header_dlfcn_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --with-encoding was given. -if test "${with_encoding+set}" = set; then : - withval=$with_encoding; with_tcencoding=${withval} + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 +if test "${ac_cv_header_dlfcn_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_dlfcn_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 - if test x"${with_tcencoding}" != x ; then +fi +if test $ac_cv_header_dlfcn_h = yes; then + : +else -cat >>confdefs.h <<_ACEOF -#define TCL_CFGVAL_ENCODING "${with_tcencoding}" +cat >>confdefs.h <<\_ACEOF +#define NO_DLFCN_H 1 _ACEOF - else - -$as_echo "#define TCL_CFGVAL_ENCODING \"iso8859-1\"" >>confdefs.h +fi - fi -#-------------------------------------------------------------------- -# Look for libraries that we will need when compiling the Tcl shell -#-------------------------------------------------------------------- + # OS/390 lacks sys/param.h (and doesn't need it, by chance). +for ac_header in sys/param.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - #-------------------------------------------------------------------- - # On a few very rare systems, all of the libm.a stuff is - # already in libc.a. Set compiler flags accordingly. - # Also, Linux requires the "ieee" library for math to work - # right (and it must appear before "-lm"). - #-------------------------------------------------------------------- +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" -if test "x$ac_cv_func_sin" = x""yes; then : - MATH_LIBS="" +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - MATH_LIBS="-lm" + ac_cpp_err=yes fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5 -$as_echo_n "checking for main in -lieee... " >&6; } -if test "${ac_cv_lib_ieee_main+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lieee $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ieee_main=yes +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_lib_ieee_main=no + eval "$as_ac_Header=\$ac_header_preproc" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5 -$as_echo "$ac_cv_lib_ieee_main" >&6; } -if test "x$ac_cv_lib_ieee_main" = x""yes; then : - MATH_LIBS="-lieee $MATH_LIBS" +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi +done + - #-------------------------------------------------------------------- - # Interactive UNIX requires -linet instead of -lsocket, plus it - # needs net/errno.h to define the socket-related error codes. - #-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 -$as_echo_n "checking for main in -linet... " >&6; } -if test "${ac_cv_lib_inet_main+set}" = set; then : - $as_echo_n "(cached) " >&6 +#-------------------------------------------------------------------- +# Determines the correct executable file extension (.exe) +#-------------------------------------------------------------------- + + + +#------------------------------------------------------------------------ +# If we're using GCC, see if the compiler understands -pipe. If so, use it. +# It makes compiling go faster. (This is only a performance feature.) +#------------------------------------------------------------------------ + +if test -z "$no_pipe" && test -n "$GCC"; then + echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5 +echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6 +if test "${tcl_cv_cc_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-linet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () { -return main (); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_inet_main=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_pipe=yes else - ac_cv_lib_inet_main=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_pipe=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 -$as_echo "$ac_cv_lib_inet_main" >&6; } -if test "x$ac_cv_lib_inet_main" = x""yes; then : - LIBS="$LIBS -linet" +echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5 +echo "${ECHO_T}$tcl_cv_cc_pipe" >&6 + if test $tcl_cv_cc_pipe = yes; then + CFLAGS="$CFLAGS -pipe" + fi fi - ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default" -if test "x$ac_cv_header_net_errno_h" = x""yes; then : - - -$as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h +#------------------------------------------------------------------------ +# Threads support +#------------------------------------------------------------------------ -fi + # Check whether --enable-threads or --disable-threads was given. +if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + tcl_ok=$enableval +else + tcl_ok=yes +fi; + if test "${TCL_THREADS}" = 1; then + tcl_threaded_core=1; + fi - #-------------------------------------------------------------------- - # Check for the existence of the -lsocket and -lnsl libraries. - # The order here is important, so that they end up in the right - # order in the command line generated by make. Here are some - # special considerations: - # 1. Use "connect" and "accept" to check for -lsocket, and - # "gethostbyname" to check for -lnsl. - # 2. Use each function name only once: can't redo a check because - # autoconf caches the results of the last check and won't redo it. - # 3. Use -lnsl and -lsocket only if they supply procedures that - # aren't already present in the normal libraries. This is because - # IRIX 5.2 has libraries, but they aren't needed and they're - # bogus: they goof up name resolution if used. - # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. - # To get around this problem, check for both libraries together - # if -lsocket doesn't work by itself. - #-------------------------------------------------------------------- + if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then + TCL_THREADS=1 + # USE_THREAD_ALLOC tells us to try the special thread-based + # allocator that significantly reduces lock contention - tcl_checkBoth=0 - ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : - tcl_checkSocket=0 -else - tcl_checkSocket=1 -fi +cat >>confdefs.h <<\_ACEOF +#define USE_THREAD_ALLOC 1 +_ACEOF - if test "$tcl_checkSocket" = 1; then - ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" -if test "x$ac_cv_func_setsockopt" = x""yes; then : -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5 -$as_echo_n "checking for setsockopt in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_setsockopt+set}" = set; then : - $as_echo_n "(cached) " >&6 +cat >>confdefs.h <<\_ACEOF +#define _REENTRANT 1 +_ACEOF + + if test "`uname -s`" = "SunOS" ; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + fi + +cat >>confdefs.h <<\_ACEOF +#define _THREAD_SAFE 1 +_ACEOF + + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6 +if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif -char setsockopt (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_mutex_init (); int main () { -return setsockopt (); +pthread_mutex_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_setsockopt=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pthread_pthread_mutex_init=yes else - ac_cv_lib_socket_setsockopt=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_pthread_pthread_mutex_init=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5 -$as_echo "$ac_cv_lib_socket_setsockopt" >&6; } -if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then : - LIBS="$LIBS -lsocket" -else - tcl_checkBoth=1 -fi - -fi - - fi - if test "$tcl_checkBoth" = 1; then - tk_oldLibs=$LIBS - LIBS="$LIBS -lsocket -lnsl" - ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" -if test "x$ac_cv_func_accept" = x""yes; then : - tcl_checkNsl=0 +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6 +if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then + tcl_ok=yes else - LIBS=$tk_oldLibs + tcl_ok=no fi - fi - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "$tcl_ok" = "no"; then + # Check a little harder for __pthread_mutex_init in the same + # library, as some systems hide it there until pthread.h is + # defined. We could alternatively do an AC_TRY_COMPILE with + # pthread.h, but that will work with libpthread really doesn't + # exist, like AIX 4.2. [Bug: 4359] + echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6 +if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif -char gethostbyname (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __pthread_mutex_init (); int main () { -return gethostbyname (); +__pthread_mutex_init (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_gethostbyname=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pthread___pthread_mutex_init=yes else - ac_cv_lib_nsl_gethostbyname=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_pthread___pthread_mutex_init=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : - LIBS="$LIBS -lnsl" -fi - -fi - - - -# Add the threads support libraries -LIBS="$LIBS$THREADS_LIBS" - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 -$as_echo_n "checking how to build libraries... " >&6; } - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; tcl_ok=$enableval -else +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6 +if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then tcl_ok=yes +else + tcl_ok=no fi + fi - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 -$as_echo "shared" >&6; } - SHARED_BUILD=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 -$as_echo "static" >&6; } - SHARED_BUILD=0 - -$as_echo "#define STATIC_BUILD 1" >>confdefs.h - - fi - - -#------------------------------------------------------------------------ -# Add stuff for zlib -#------------------------------------------------------------------------ - -zlib_ok=yes -ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : - - ac_fn_c_check_type "$LINENO" "gz_header" "ac_cv_type_gz_header" "#include -" -if test "x$ac_cv_type_gz_header" = x""yes; then : - + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthread" + else + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6 +if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - zlib_ok=no -fi + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthreads $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_mutex_init (); +int +main () +{ +pthread_mutex_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pthreads_pthread_mutex_init=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - zlib_ok=no +ac_cv_lib_pthreads_pthread_mutex_init=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6 +if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then + tcl_ok=yes +else + tcl_ok=no fi - -if test $zlib_ok = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflateSetHeader" >&5 -$as_echo_n "checking for library containing deflateSetHeader... " >&6; } -if test "${ac_cv_search_deflateSetHeader+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthreads" + else + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6 +if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif -char deflateSetHeader (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_mutex_init (); int main () { -return deflateSetHeader (); +pthread_mutex_init (); ; return 0; } _ACEOF -for ac_lib in '' z; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_deflateSetHeader=$ac_res +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_c_pthread_mutex_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_c_pthread_mutex_init=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_deflateSetHeader+set}" = set; then : - break +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -done -if test "${ac_cv_search_deflateSetHeader+set}" = set; then : - +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6 +if test $ac_cv_lib_c_pthread_mutex_init = yes; then + tcl_ok=yes else - ac_cv_search_deflateSetHeader=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + tcl_ok=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflateSetHeader" >&5 -$as_echo "$ac_cv_search_deflateSetHeader" >&6; } -ac_res=$ac_cv_search_deflateSetHeader -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + if test "$tcl_ok" = "no"; then + echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6 +if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - zlib_ok=no +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_mutex_init (); +int +main () +{ +pthread_mutex_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_c_r_pthread_mutex_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_c_r_pthread_mutex_init=no fi - +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6 +if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then + tcl_ok=yes +else + tcl_ok=no fi -if test $zlib_ok = no; then : - - ZLIB_DIR=\${COMPAT_DIR}/zlib - - ZLIB_OBJS=\${ZLIB_OBJS} - ZLIB_SRCS=\${ZLIB_SRCS} + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -pthread" + else + TCL_THREADS=0 + { echo "$as_me:$LINENO: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5 +echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;} + fi + fi + fi + fi - ZLIB_INCLUDE=-I\${ZLIB_DIR} + # Does the pthread-implementation provide + # 'pthread_attr_setstacksize' ? +for ac_func in pthread_attr_setstacksize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -fi +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -$as_echo "#define HAVE_ZLIB 1" >>confdefs.h +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func -#-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This -# macro depends on the value of SHARED_BUILD, and should be called -# after SC_ENABLE_SHARED checks the configure switches. -#-------------------------------------------------------------------- +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +eval "$as_ac_var=no" fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi + else + TCL_THREADS=0 + fi + # Do checking message here to not mess up interleaved configure output + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + if test "${TCL_THREADS}" = 1; then +cat >>confdefs.h <<\_ACEOF +#define TCL_THREADS 1 +_ACEOF - # Step 0.a: Enable 64 bit support? + if test "${tcl_threaded_core}" = 1; then + echo "$as_me:$LINENO: result: yes (threaded core)" >&5 +echo "${ECHO_T}yes (threaded core)" >&6 + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + fi + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 -$as_echo_n "checking if 64bit support is requested... " >&6; } - # Check whether --enable-64bit was given. -if test "${enable_64bit+set}" = set; then : - enableval=$enable_64bit; do64bit=$enableval -else - do64bit=no -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 -$as_echo "$do64bit" >&6; } - # Step 0.b: Enable Solaris 64 bit VIS support? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 -$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; } - # Check whether --enable-64bit-vis was given. -if test "${enable_64bit_vis+set}" = set; then : - enableval=$enable_64bit_vis; do64bitVIS=$enableval -else - do64bitVIS=no -fi +#------------------------------------------------------------------------ +# Embedded configuration information, encoding to use for the values, TIP #59 +#------------------------------------------------------------------------ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5 -$as_echo "$do64bitVIS" >&6; } - # Force 64bit on with VIS - if test "$do64bitVIS" = "yes"; then : - do64bit=yes -fi - # Step 0.c: Check if visibility support is available. Do this here so - # that platform specific alternatives can be used below if this fails. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5 -$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; } -if test "${tcl_cv_cc_visibility_hidden+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +# Check whether --with-encoding or --without-encoding was given. +if test "${with_encoding+set}" = set; then + withval="$with_encoding" + with_tcencoding=${withval} +fi; - if test "$GCC" = yes; then : + if test x"${with_tcencoding}" != x ; then - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define TCL_CFGVAL_ENCODING "${with_tcencoding}" +_ACEOF -int -main () -{ + else - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define TCL_CFGVAL_ENCODING "iso8859-1" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_cc_visibility_hidden=yes -else - tcl_cv_cc_visibility_hidden=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$hold_cflags -else + fi - tcl_cv_cc_visibility_hidden=no -fi +#-------------------------------------------------------------------- +# Look for libraries that we will need when compiling the Tcl shell +#-------------------------------------------------------------------- -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5 -$as_echo "$tcl_cv_cc_visibility_hidden" >&6; } - if test $tcl_cv_cc_visibility_hidden = yes; then : - CFLAGS="$CFLAGS -fvisibility=hidden" + #-------------------------------------------------------------------- + # On a few very rare systems, all of the libm.a stuff is + # already in libc.a. Set compiler flags accordingly. + # Also, Linux requires the "ieee" library for math to work + # right (and it must appear before "-lm"). + #-------------------------------------------------------------------- + echo "$as_me:$LINENO: checking for sin" >&5 +echo $ECHO_N "checking for sin... $ECHO_C" >&6 +if test "${ac_cv_func_sin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define sin to an innocuous variant, in case declares sin. + For example, HP-UX 11i declares gettimeofday. */ +#define sin innocuous_sin + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char sin (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef sin + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sin (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_sin) || defined (__stub___sin) +choke me +#else +char (*f) () = sin; +#endif +#ifdef __cplusplus +} +#endif - extern __attribute__((__visibility__("hidden"))) void f(void); - void f(void) {} int main () { -f(); +return f != sin; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_cc_visibility_hidden=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_sin=yes else - tcl_cv_cc_visibility_hidden=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$hold_cflags - if test $tcl_cv_cc_visibility_hidden = yes; then : - - -$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h - - -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_sin=no fi - - # Step 0.d: Disable -rpath support? - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5 -$as_echo_n "checking if rpath support is requested... " >&6; } - # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; doRpath=$enableval -else - doRpath=yes +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 -$as_echo "$doRpath" >&6; } - - # Step 1: set the variable "system" to hold the name and version number - # for the system. - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 -$as_echo_n "checking system version... " >&6; } -if test "${tcl_cv_sys_version+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5 +echo "${ECHO_T}$ac_cv_func_sin" >&6 +if test $ac_cv_func_sin = yes; then + MATH_LIBS="" else - - if test -f /usr/lib/NextStep/software_version; then - tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` - else - tcl_cv_sys_version=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 -$as_echo "$as_me: WARNING: can't find uname command" >&2;} - tcl_cv_sys_version=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` - fi - if test "`uname -s`" = "AIX" ; then - tcl_cv_sys_version=AIX-`uname -v`.`uname -r` - fi - fi - fi - + MATH_LIBS="-lm" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 -$as_echo "$tcl_cv_sys_version" >&6; } - system=$tcl_cv_sys_version - - - # Step 2: check for existence of -ldl library. This is needed because - # Linux can use either -ldl or -ldld for dynamic loading. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for main in -lieee" >&5 +echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 +if test "${ac_cv_lib_ieee_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-lieee $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); + int main () { -return dlopen (); +main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ieee_main=yes else - ac_cv_lib_dl_dlopen=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ieee_main=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - have_dl=yes -else - have_dl=no +echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6 +if test $ac_cv_lib_ieee_main = yes; then + MATH_LIBS="-lieee $MATH_LIBS" fi - # Require ranlib early so we can override it in special cases below. + #-------------------------------------------------------------------- + # Interactive UNIX requires -linet instead of -lsocket, plus it + # needs net/errno.h to define the socket-related error codes. + #-------------------------------------------------------------------- + echo "$as_me:$LINENO: checking for main in -linet" >&5 +echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6 +if test "${ac_cv_lib_inet_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-linet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - # Step 3: set configuration options based on system name and version. - - do64bit_ok=no - LDFLAGS_ORIG="$LDFLAGS" - # When ld needs options to work in 64-bit mode, put them in - # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] - # is disabled by the user. [Bug 1016796] - LDFLAGS_ARCH="" - TCL_EXPORT_FILE_SUFFIX="" - UNSHARED_LIB_SUFFIX="" - TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' - ECHO_VERSION='`echo ${VERSION}`' - TCL_LIB_VERSIONS_OK=ok - CFLAGS_DEBUG=-g - if test "$GCC" = yes; then : - - CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall" - -else - - CFLAGS_OPTIMIZE=-O - CFLAGS_WARNING="" - -fi - TCL_NEEDS_EXP_FILE=0 - TCL_BUILD_EXP_FILE="" - TCL_EXP_FILE="" - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. +int +main () +{ +main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_inet_main=yes else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_inet_main=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_main" >&6 +if test $ac_cv_lib_inet_main = yes; then + LIBS="$LIBS -linet" fi - - if test "${AR}" = ""; then : - - as_fn_error "Required archive tool 'ar' not found on PATH." "$LINENO" 5 - -fi - STLIB_LD='${AR} cr' - LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" - PLAT_OBJS="" - PLAT_SRCS="" - LDAIX_SRC="" - if test x"${SHLIB_VERSION}" = x; then : - SHLIB_VERSION="1.0" + if test "${ac_cv_header_net_errno_h+set}" = set; then + echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +if test "${ac_cv_header_net_errno_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi - case $system in - AIX-*) - if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then : - - # AIX requires the _r compiler when gcc isn't being used - case "${CC}" in - *_r|*_r\ *) - # ok ... - ;; - *) - # Make sure only first arg gets _r - CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 -$as_echo "Using $CC for compiling with threads" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking net/errno.h usability" >&5 +echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no fi - LIBS="$LIBS -lc" - SHLIB_CFLAGS="" - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - - DL_OBJS="tclLoadDl.o" - LD_LIBRARY_PATH_VAR="LIBPATH" - - # Check to enable 64-bit flags for compiler/linker on AIX 4+ - if test "$do64bit" = yes -a "`uname -v`" -gt 3; then : - - if test "$GCC" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking net/errno.h presence" >&5 +echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - - do64bit_ok=yes - CFLAGS="$CFLAGS -q64" - LDFLAGS_ARCH="-q64" - RANLIB="${RANLIB} -X64" - AR="${AR} -X64" - SHLIB_LD_FLAGS="-b64" - + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - if test "`uname -m`" = ia64; then : - - # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - # AIX-5 has dl* in libc.so - DL_LIBS="" - if test "$GCC" = yes; then : - - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for net/errno.h" >&5 +echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6 +if test "${ac_cv_header_net_errno_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' - + ac_cv_header_net_errno_h=$ac_header_preproc fi - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' +echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 -else +fi +if test $ac_cv_header_net_errno_h = yes; then - if test "$GCC" = yes; then : - SHLIB_LD='${CC} -shared' -else - SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" +cat >>confdefs.h <<\_ACEOF +#define HAVE_NET_ERRNO_H 1 +_ACEOF fi - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}.exp' - LDAIX_SRC='$(UNIX_DIR)/ldAix' -fi - # AIX v<=4.1 has some different flags than 4.2+ - if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then : - case " $LIBOBJS " in - *" tclLoadAix.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" - ;; -esac + #-------------------------------------------------------------------- + # Check for the existence of the -lsocket and -lnsl libraries. + # The order here is important, so that they end up in the right + # order in the command line generated by make. Here are some + # special considerations: + # 1. Use "connect" and "accept" to check for -lsocket, and + # "gethostbyname" to check for -lnsl. + # 2. Use each function name only once: can't redo a check because + # autoconf caches the results of the last check and won't redo it. + # 3. Use -lnsl and -lsocket only if they supply procedures that + # aren't already present in the normal libraries. This is because + # IRIX 5.2 has libraries, but they aren't needed and they're + # bogus: they goof up name resolution if used. + # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. + # To get around this problem, check for both libraries together + # if -lsocket doesn't work by itself. + #-------------------------------------------------------------------- - DL_LIBS="-lld" + tcl_checkBoth=0 + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect -fi +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - # On AIX <=v4 systems, libbsd.a has to be linked in to support - # non-blocking file IO. This library has to be linked in after - # the MATH_LIBS or it breaks the pow() function. The way to - # insure proper sequencing, is to add it to the tail of MATH_LIBS. - # This library also supplies gettimeofday. - # - # AIX does not have a timezone field in struct tm. When the AIX - # bsd library is used, the timezone global and the gettimeofday - # methods are to be avoided for timezone deduction instead, we - # deduce the timezone by comparing the localtime result on a - # known GMT value. +#ifdef __STDC__ +# include +#else +# include +#endif - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday in -lbsd" >&5 -$as_echo_n "checking for gettimeofday in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef connect -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif -char gettimeofday (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_connect) || defined (__stub___connect) +choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} +#endif + int main () { -return gettimeofday (); +return f != connect; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bsd_gettimeofday=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_connect=yes else - ac_cv_lib_bsd_gettimeofday=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gettimeofday" >&5 -$as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; } -if test "x$ac_cv_lib_bsd_gettimeofday" = x""yes; then : - libbsd=yes +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 +if test $ac_cv_func_connect = yes; then + tcl_checkSocket=0 else - libbsd=no + tcl_checkSocket=1 fi - if test $libbsd = yes; then : + if test "$tcl_checkSocket" = 1; then + echo "$as_me:$LINENO: checking for setsockopt" >&5 +echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 +if test "${ac_cv_func_setsockopt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define setsockopt to an innocuous variant, in case declares setsockopt. + For example, HP-UX 11i declares gettimeofday. */ +#define setsockopt innocuous_setsockopt - MATH_LIBS="$MATH_LIBS -lbsd" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char setsockopt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -$as_echo "#define USE_DELTA_FOR_TZ 1" >>confdefs.h +#ifdef __STDC__ +# include +#else +# include +#endif +#undef setsockopt -fi - ;; - BeOS*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD='${CC} -nostart' - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char setsockopt (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_setsockopt) || defined (__stub___setsockopt) +choke me +#else +char (*f) () = setsockopt; +#endif +#ifdef __cplusplus +} +#endif - #----------------------------------------------------------- - # Check for inet_ntoa in -lbind, for BeOS (which also needs - # -lsocket, even if the network functions are in -lnet which - # is always linked to, for compatibility. - #----------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5 -$as_echo_n "checking for inet_ntoa in -lbind... " >&6; } -if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then : - $as_echo_n "(cached) " >&6 +int +main () +{ +return f != setsockopt; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_setsockopt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_setsockopt=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 +if test $ac_cv_func_setsockopt = yes; then + : +else + echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 +echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_setsockopt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lbind $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif -char inet_ntoa (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char setsockopt (); int main () { -return inet_ntoa (); +setsockopt (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bind_inet_ntoa=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_setsockopt=yes else - ac_cv_lib_bind_inet_ntoa=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_setsockopt=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5 -$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; } -if test "x$ac_cv_lib_bind_inet_ntoa" = x""yes; then : - LIBS="$LIBS -lbind -lsocket" +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 +if test $ac_cv_lib_socket_setsockopt = yes; then + LIBS="$LIBS -lsocket" +else + tcl_checkBoth=1 fi - ;; - BSD/OS-2.1*|BSD/OS-3*) - SHLIB_CFLAGS="" - SHLIB_LD="shlicc -r" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - BSD/OS-4.*) - SHLIB_CFLAGS="-export-dynamic -fPIC" - SHLIB_LD='${CC} -shared' - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="$LDFLAGS -export-dynamic" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - CYGWIN_*) - SHLIB_CFLAGS="" - SHLIB_LD='${CC} -shared' - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".dll" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - dgux*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD='${CC} -G' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - Haiku*) - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' - DL_OBJS="tclLoadDl.o" - DL_LIBS="-lroot" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5 -$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; } -if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then : - $as_echo_n "(cached) " >&6 +fi + + fi + if test "$tcl_checkBoth" = 1; then + tk_oldLibs=$LIBS + LIBS="$LIBS -lsocket -lnsl" + echo "$as_me:$LINENO: checking for accept" >&5 +echo $ECHO_N "checking for accept... $ECHO_C" >&6 +if test "${ac_cv_func_accept+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnetwork $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define accept to an innocuous variant, in case declares accept. + For example, HP-UX 11i declares gettimeofday. */ +#define accept innocuous_accept -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char accept (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef accept + +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif -char inet_ntoa (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char accept (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_accept) || defined (__stub___accept) +choke me +#else +char (*f) () = accept; +#endif +#ifdef __cplusplus +} +#endif + int main () { -return inet_ntoa (); +return f != accept; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_network_inet_ntoa=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_accept=yes else - ac_cv_lib_network_inet_ntoa=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_accept=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5 -$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; } -if test "x$ac_cv_lib_network_inet_ntoa" = x""yes; then : - LIBS="$LIBS -lnetwork" +echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 +echo "${ECHO_T}$ac_cv_func_accept" >&6 +if test $ac_cv_func_accept = yes; then + tcl_checkNsl=0 +else + LIBS=$tk_oldLibs fi - ;; - HP-UX-*.11.*) - # Use updated header definitions where possible - -$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h - + fi + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname -$as_echo "#define _XOPEN_SOURCE 1" >>confdefs.h +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - LIBS="$LIBS -lxnet" # Use the XOPEN network library +#ifdef __STDC__ +# include +#else +# include +#endif - if test "`uname -m`" = ia64; then : +#undef gethostbyname - SHLIB_SUFFIX=".so" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} +#endif +int +main () +{ +return f != gethostbyname; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyname=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - SHLIB_SUFFIX=".sl" - +ac_cv_func_gethostbyname=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +if test $ac_cv_func_gethostbyname = yes; then + : +else + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif -char shl_load (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); int main () { -return shl_load (); +gethostbyname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes else - ac_cv_lib_dld_shl_load=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - tcl_ok=yes -else - tcl_ok=no +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + LIBS="$LIBS -lnsl" fi - if test "$tcl_ok" = yes; then : - - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" - SHLIB_LD_LIBS='${LIBS}' - DL_OBJS="tclLoadShl.o" - DL_LIBS="-ldld" - LDFLAGS="$LDFLAGS -Wl,-E" - CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' - LD_LIBRARY_PATH_VAR="SHLIB_PATH" - fi - if test "$GCC" = yes; then : - - SHLIB_LD='${CC} -shared' - SHLIB_LD_LIBS='${LIBS}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} -else - CFLAGS="$CFLAGS -z" -fi +# Add the threads support libraries +LIBS="$LIBS$THREADS_LIBS" - # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc - #CFLAGS="$CFLAGS +DAportable" - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes"; then : + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval +else + tcl_ok=yes +fi; - if test "$GCC" = yes; then : + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi - case `${CC} -dumpmachine` in - hppa64*) - # 64-bit gcc in use. Fix flags for GNU ld. - do64bit_ok=yes - SHLIB_LD='${CC} -shared' - SHLIB_LD_LIBS='${LIBS}' - if test $doRpath = yes; then : + if test "$tcl_ok" = "yes" ; then + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 + SHARED_BUILD=1 + else + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 + SHARED_BUILD=0 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +cat >>confdefs.h <<\_ACEOF +#define STATIC_BUILD 1 +_ACEOF + + fi + + +#------------------------------------------------------------------------ +# Add stuff for zlib +#------------------------------------------------------------------------ + +zlib_ok=yes +if test "${ac_cv_header_zlib_h+set}" = set; then + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} - ;; - esac +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - do64bit_ok=yes - CFLAGS="$CFLAGS +DD64" - LDFLAGS_ARCH="+DD64" + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 fi +if test $ac_cv_header_zlib_h = yes; then -fi ;; - HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) - SHLIB_SUFFIX=".sl" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for gz_header" >&5 +echo $ECHO_N "checking for gz_header... $ECHO_C" >&6 +if test "${ac_cv_type_gz_header+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); int main () { -return shl_load (); +if ((gz_header *) 0) + return 0; +if (sizeof (gz_header)) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_gz_header=yes else - ac_cv_lib_dld_shl_load=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_gz_header=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - tcl_ok=yes +echo "$as_me:$LINENO: result: $ac_cv_type_gz_header" >&5 +echo "${ECHO_T}$ac_cv_type_gz_header" >&6 +if test $ac_cv_type_gz_header = yes; then + : else - tcl_ok=no + zlib_ok=no fi - if test "$tcl_ok" = yes; then : - - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" - SHLIB_LD_LIBS="" - DL_OBJS="tclLoadShl.o" - DL_LIBS="-ldld" - LDFLAGS="$LDFLAGS -Wl,-E" - CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' - LD_LIBRARY_PATH_VAR="SHLIB_PATH" - -fi ;; - IRIX-5.*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - case " $LIBOBJS " in - *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; -esac - - if test $doRpath = yes; then : +else - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' + zlib_ok=no fi - ;; - IRIX-6.*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -n32 -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - case " $LIBOBJS " in - *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; -esac - - if test $doRpath = yes; then : - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' -fi - if test "$GCC" = yes; then : - CFLAGS="$CFLAGS -mabi=n32" - LDFLAGS="$LDFLAGS -mabi=n32" +if test $zlib_ok = yes; then + echo "$as_me:$LINENO: checking for library containing deflateSetHeader" >&5 +echo $ECHO_N "checking for library containing deflateSetHeader... $ECHO_C" >&6 +if test "${ac_cv_search_deflateSetHeader+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_deflateSetHeader=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - case $system in - IRIX-6.3) - # Use to build 6.2 compatible binaries on 6.3. - CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" - ;; - *) - CFLAGS="$CFLAGS -n32" - ;; - esac - LDFLAGS="$LDFLAGS -n32" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi - ;; - IRIX64-6.*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -n32 -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - case " $LIBOBJS " in - *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; -esac +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_deflateSetHeader" = no; then + for ac_lib in z; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - if test $doRpath = yes; then : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char deflateSetHeader (); +int +main () +{ +deflateSetHeader (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_deflateSetHeader="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - - # Check to enable 64-bit flags for compiler/linker - - if test "$do64bit" = yes; then : - - if test "$GCC" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_deflateSetHeader" >&5 +echo "${ECHO_T}$ac_cv_search_deflateSetHeader" >&6 +if test "$ac_cv_search_deflateSetHeader" != no; then + test "$ac_cv_search_deflateSetHeader" = "none required" || LIBS="$ac_cv_search_deflateSetHeader $LIBS" else - do64bit_ok=yes - SHLIB_LD="ld -64 -shared -rdata_shared" - CFLAGS="$CFLAGS -64" - LDFLAGS_ARCH="-64" + zlib_ok=no fi fi - ;; - Linux*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - CFLAGS_OPTIMIZE="-O2" - # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings - # when you inline the string and math operations. Turn this off to - # get rid of the warnings. - #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" +if test $zlib_ok = no; then - SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" - if test $doRpath = yes; then : + ZLIB_DIR=\${COMPAT_DIR}/zlib - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' -fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "`uname -m`" = "alpha"; then : - CFLAGS="$CFLAGS -mieee" -fi - if test $do64bit = yes; then : + ZLIB_OBJS=\${ZLIB_OBJS} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5 -$as_echo_n "checking if compiler accepts -m64 flag... " >&6; } -if test "${tcl_cv_cc_m64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + ZLIB_SRCS=\${ZLIB_SRCS} - hold_cflags=$CFLAGS - CFLAGS="$CFLAGS -m64" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ZLIB_INCLUDE=-I\${ZLIB_DIR} -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_cc_m64=yes -else - tcl_cv_cc_m64=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5 -$as_echo "$tcl_cv_cc_m64" >&6; } - if test $tcl_cv_cc_m64 = yes; then : - CFLAGS="$CFLAGS -m64" - do64bit_ok=yes -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB 1 +_ACEOF -fi - # The combo of gcc + glibc has a bug related to inlining of - # functions like strtod(). The -fno-builtin flag should address - # this problem but it does not work. The -fno-inline flag is kind - # of overkill but it works. Disable inlining only when one of the - # files in compat/*.c is being linked in. +#-------------------------------------------------------------------- +# The statements below define a collection of compile flags. This +# macro depends on the value of SHARED_BUILD, and should be called +# after SC_ENABLE_SHARED checks the configure switches. +#-------------------------------------------------------------------- - if test x"${USE_COMPAT}" != x; then : - CFLAGS="$CFLAGS -fno-inline" -fi - ;; - GNU*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - SHLIB_LD='${CC} -shared' - DL_OBJS="" - DL_LIBS="-ldl" - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - if test "`uname -m`" = "alpha"; then : - CFLAGS="$CFLAGS -mieee" fi - ;; - Lynx*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - CFLAGS_OPTIMIZE=-02 - SHLIB_LD='${CC} -shared' - DL_OBJS="tclLoadDl.o" - DL_LIBS="-mshared -ldl" - LD_FLAGS="-Wl,--export-dynamic" - if test $doRpath = yes; then : - - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi - ;; - MP-RAS-02*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD='${CC} -G' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - MP-RAS-*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD='${CC} -G' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LDFLAGS="$LDFLAGS -Wl,-Bexport" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - NetBSD-1.*|FreeBSD-[1-2].*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - if test $doRpath = yes; then : +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 -$as_echo_n "checking for ELF... " >&6; } -if test "${tcl_cv_ld_elf+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __ELF__ - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - tcl_cv_ld_elf=yes + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - tcl_cv_ld_elf=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 -$as_echo "$tcl_cv_ld_elf" >&6; } - if test $tcl_cv_ld_elf = yes; then : - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + + # Step 0.a: Enable 64 bit support? + + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. +if test "${enable_64bit+set}" = set; then + enableval="$enable_64bit" + do64bit=$enableval else + do64bit=no +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + # Step 0.b: Enable Solaris 64 bit VIS support? + echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5 +echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit-vis or --disable-64bit-vis was given. +if test "${enable_64bit_vis+set}" = set; then + enableval="$enable_64bit_vis" + do64bitVIS=$enableval +else + do64bitVIS=no +fi; + echo "$as_me:$LINENO: result: $do64bitVIS" >&5 +echo "${ECHO_T}$do64bitVIS" >&6 + # Force 64bit on with VIS + if test "$do64bitVIS" = "yes"; then + do64bit=yes fi - # Ancient FreeBSD doesn't handle version numbers with dots. - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - OpenBSD-*) - CFLAGS_OPTIMIZE='-O2' - SHLIB_CFLAGS="-fPIC" - SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - if test $doRpath = yes; then : + # Step 0.c: Check if visibility support is available. Do this here so + # that platform specific alternatives can be used below if this fails. - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' -fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 -$as_echo_n "checking for ELF... " >&6; } -if test "${tcl_cv_ld_elf+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5 +echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6 +if test "${tcl_cv_cc_visibility_hidden+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$GCC" = yes; then + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef __ELF__ - yes -#endif +int +main () +{ + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - tcl_cv_ld_elf=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_visibility_hidden=yes else - tcl_cv_ld_elf=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_cc_visibility_hidden=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 -$as_echo "$tcl_cv_ld_elf" >&6; } - if test $tcl_cv_ld_elf = yes; then : - - LDFLAGS=-Wl,-export-dynamic +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$hold_cflags else - LDFLAGS="" + + tcl_cv_cc_visibility_hidden=no + fi - if test "${TCL_THREADS}" = "1"; then : - # OpenBSD builds and links with -pthread, never -lpthread. - LIBS=`echo $LIBS | sed s/-lpthread//` - CFLAGS="$CFLAGS -pthread" - SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" fi - # OpenBSD doesn't do version numbers with dots. - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - NetBSD-*|FreeBSD-[3-4].*) - # FreeBSD 3.* and greater have ELF. - # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs - SHLIB_CFLAGS="-fPIC" - SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="$LDFLAGS -export-dynamic" - if test $doRpath = yes; then : +echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5 +echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 + if test $tcl_cv_cc_visibility_hidden = yes; then - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + CFLAGS="$CFLAGS -fvisibility=hidden" + +else + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + extern __attribute__((__visibility__("hidden"))) void f(void); + void f(void) {} +int +main () +{ +f(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_visibility_hidden=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_visibility_hidden=no fi - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "${TCL_THREADS}" = "1"; then : +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags + if test $tcl_cv_cc_visibility_hidden = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define MODULE_SCOPE extern __attribute__((__visibility__("hidden"))) +_ACEOF - # The -pthread needs to go in the CFLAGS, not LIBS - LIBS=`echo $LIBS | sed s/-pthread//` - CFLAGS="$CFLAGS -pthread" - LDFLAGS="$LDFLAGS -pthread" fi - case $system in - FreeBSD-3.*) - # FreeBSD-3 doesn't handle version numbers with dots. - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' - TCL_LIB_VERSIONS_OK=nodots - ;; - esac - ;; - FreeBSD-*) - # This configuration from FreeBSD Ports. - SHLIB_CFLAGS="-fPIC" - SHLIB_LD="${CC} -shared" - TCL_SHLIB_LD_EXTRAS="-soname \$@" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - if test $doRpath = yes; then : - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' + fi - if test "${TCL_THREADS}" = "1"; then : + + + # Step 0.d: Disable -rpath support? + + echo "$as_me:$LINENO: checking if rpath support is requested" >&5 +echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6 + # Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + doRpath=$enableval +else + doRpath=yes +fi; + echo "$as_me:$LINENO: result: $doRpath" >&5 +echo "${ECHO_T}$doRpath" >&6 + + # Step 1: set the variable "system" to hold the name and version number + # for the system. + + + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 +if test "${tcl_cv_sys_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test -f /usr/lib/NextStep/software_version; then + tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` + else + tcl_cv_sys_version=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then + { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5 +echo "$as_me: WARNING: can't find uname command" >&2;} + tcl_cv_sys_version=unknown + else + # Special check for weird MP-RAS system (uname returns weird + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then + tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + tcl_cv_sys_version=AIX-`uname -v`.`uname -r` + fi + fi + fi + +fi +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 + system=$tcl_cv_sys_version + + + # Step 2: check for existence of -ldl library. This is needed because + # Linux can use either -ldl or -ldld for dynamic loading. + + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + have_dl=yes +else + have_dl=no +fi + + + # Require ranlib early so we can override it in special cases below. + + + + # Step 3: set configuration options based on system name and version. + + do64bit_ok=no + LDFLAGS_ORIG="$LDFLAGS" + # When ld needs options to work in 64-bit mode, put them in + # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] + # is disabled by the user. [Bug 1016796] + LDFLAGS_ARCH="" + TCL_EXPORT_FILE_SUFFIX="" + UNSHARED_LIB_SUFFIX="" + TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' + ECHO_VERSION='`echo ${VERSION}`' + TCL_LIB_VERSIONS_OK=ok + CFLAGS_DEBUG=-g + if test "$GCC" = yes; then + + CFLAGS_OPTIMIZE=-O2 + CFLAGS_WARNING="-Wall" + +else + + CFLAGS_OPTIMIZE=-O + CFLAGS_WARNING="" + +fi + + TCL_NEEDS_EXP_FILE=0 + TCL_BUILD_EXP_FILE="" + TCL_EXP_FILE="" + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test "${AR}" = ""; then + + { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 +echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;} + { (exit 1); exit 1; }; } + +fi + + STLIB_LD='${AR} cr' + LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" + PLAT_OBJS="" + PLAT_SRCS="" + LDAIX_SRC="" + if test x"${SHLIB_VERSION}" = x; then + SHLIB_VERSION="1.0" +fi + + case $system in + AIX-*) + if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then + + # AIX requires the _r compiler when gcc isn't being used + case "${CC}" in + *_r|*_r\ *) + # ok ... + ;; + *) + # Make sure only first arg gets _r + CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'` + ;; + esac + echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5 +echo "${ECHO_T}Using $CC for compiling with threads" >&6 + +fi + + LIBS="$LIBS -lc" + SHLIB_CFLAGS="" + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + DL_OBJS="tclLoadDl.o" + LD_LIBRARY_PATH_VAR="LIBPATH" + + # Check to enable 64-bit flags for compiler/linker on AIX 4+ + if test "$do64bit" = yes -a "`uname -v`" -gt 3; then + + if test "$GCC" = yes; then + + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 +echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + +else + + do64bit_ok=yes + CFLAGS="$CFLAGS -q64" + LDFLAGS_ARCH="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LD_FLAGS="-b64" + +fi + + +fi + + + if test "`uname -m`" = ia64; then + + # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + # AIX-5 has dl* in libc.so + DL_LIBS="" + if test "$GCC" = yes; then + + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + +else + + CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' + +fi + + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + +else + + if test "$GCC" = yes; then + SHLIB_LD='${CC} -shared' +else + + SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" + +fi + + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + TCL_NEEDS_EXP_FILE=1 + TCL_EXPORT_FILE_SUFFIX='${VERSION}.exp' + LDAIX_SRC='$(UNIX_DIR)/ldAix' + +fi + + + # AIX v<=4.1 has some different flags than 4.2+ + if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then + + case $LIBOBJS in + "tclLoadAix.$ac_objext" | \ + *" tclLoadAix.$ac_objext" | \ + "tclLoadAix.$ac_objext "* | \ + *" tclLoadAix.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; +esac + + DL_LIBS="-lld" + +fi + + + # On AIX <=v4 systems, libbsd.a has to be linked in to support + # non-blocking file IO. This library has to be linked in after + # the MATH_LIBS or it breaks the pow() function. The way to + # insure proper sequencing, is to add it to the tail of MATH_LIBS. + # This library also supplies gettimeofday. + # + # AIX does not have a timezone field in struct tm. When the AIX + # bsd library is used, the timezone global and the gettimeofday + # methods are to be avoided for timezone deduction instead, we + # deduce the timezone by comparing the localtime result on a + # known GMT value. + + echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5 +echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gettimeofday (); +int +main () +{ +gettimeofday (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bsd_gettimeofday=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_bsd_gettimeofday=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 +if test $ac_cv_lib_bsd_gettimeofday = yes; then + libbsd=yes +else + libbsd=no +fi + + if test $libbsd = yes; then + + MATH_LIBS="$MATH_LIBS -lbsd" + +cat >>confdefs.h <<\_ACEOF +#define USE_DELTA_FOR_TZ 1 +_ACEOF + + +fi + + ;; + BeOS*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -nostart' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + + #----------------------------------------------------------- + # Check for inet_ntoa in -lbind, for BeOS (which also needs + # -lsocket, even if the network functions are in -lnet which + # is always linked to, for compatibility. + #----------------------------------------------------------- + echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5 +echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6 +if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbind $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inet_ntoa (); +int +main () +{ +inet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bind_inet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_bind_inet_ntoa=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6 +if test $ac_cv_lib_bind_inet_ntoa = yes; then + LIBS="$LIBS -lbind -lsocket" +fi + + ;; + BSD/OS-2.1*|BSD/OS-3*) + SHLIB_CFLAGS="" + SHLIB_LD="shlicc -r" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + BSD/OS-4.*) + SHLIB_CFLAGS="-export-dynamic -fPIC" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -export-dynamic" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + CYGWIN_*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dll" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + dgux*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + Haiku*) + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-lroot" + echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5 +echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6 +if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetwork $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inet_ntoa (); +int +main () +{ +inet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_network_inet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_network_inet_ntoa=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6 +if test $ac_cv_lib_network_inet_ntoa = yes; then + LIBS="$LIBS -lnetwork" +fi + + ;; + HP-UX-*.11.*) + # Use updated header definitions where possible + +cat >>confdefs.h <<\_ACEOF +#define _XOPEN_SOURCE_EXTENDED 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _XOPEN_SOURCE 1 +_ACEOF + + LIBS="$LIBS -lxnet" # Use the XOPEN network library + + if test "`uname -m`" = ia64; then + + SHLIB_SUFFIX=".so" + +else + + SHLIB_SUFFIX=".sl" + +fi + + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = yes; then + + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" + SHLIB_LD_LIBS='${LIBS}' + DL_OBJS="tclLoadShl.o" + DL_LIBS="-ldld" + LDFLAGS="$LDFLAGS -Wl,-E" + CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_LIBRARY_PATH_VAR="SHLIB_PATH" + +fi + + if test "$GCC" = yes; then + + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + +else + + CFLAGS="$CFLAGS -z" + +fi + + + # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc + #CFLAGS="$CFLAGS +DAportable" + + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = "yes"; then + + if test "$GCC" = yes; then + + case `${CC} -dumpmachine` in + hppa64*) + # 64-bit gcc in use. Fix flags for GNU ld. + do64bit_ok=yes + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + ;; + *) + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 +echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + ;; + esac + +else + + do64bit_ok=yes + CFLAGS="$CFLAGS +DD64" + LDFLAGS_ARCH="+DD64" + +fi + + +fi + ;; + HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) + SHLIB_SUFFIX=".sl" + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + tcl_ok=yes +else + tcl_ok=no +fi + + if test "$tcl_ok" = yes; then + + SHLIB_CFLAGS="+z" + SHLIB_LD="ld -b" + SHLIB_LD_LIBS="" + DL_OBJS="tclLoadShl.o" + DL_LIBS="-ldld" + LDFLAGS="$LDFLAGS -Wl,-E" + CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' + LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' + LD_LIBRARY_PATH_VAR="SHLIB_PATH" + +fi + ;; + IRIX-5.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ + *" mkstemp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; +esac + + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + ;; + IRIX-6.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -n32 -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ + *" mkstemp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; +esac + + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + if test "$GCC" = yes; then + + CFLAGS="$CFLAGS -mabi=n32" + LDFLAGS="$LDFLAGS -mabi=n32" + +else + + case $system in + IRIX-6.3) + # Use to build 6.2 compatible binaries on 6.3. + CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" + ;; + *) + CFLAGS="$CFLAGS -n32" + ;; + esac + LDFLAGS="$LDFLAGS -n32" + +fi + + ;; + IRIX64-6.*) + SHLIB_CFLAGS="" + SHLIB_LD="ld -n32 -shared -rdata_shared" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + case $LIBOBJS in + "mkstemp.$ac_objext" | \ + *" mkstemp.$ac_objext" | \ + "mkstemp.$ac_objext "* | \ + *" mkstemp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;; +esac + + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + + # Check to enable 64-bit flags for compiler/linker + + if test "$do64bit" = yes; then + + if test "$GCC" = yes; then + + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5 +echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} + +else + + do64bit_ok=yes + SHLIB_LD="ld -64 -shared -rdata_shared" + CFLAGS="$CFLAGS -64" + LDFLAGS_ARCH="-64" + +fi + + +fi + + ;; + Linux*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + CFLAGS_OPTIMIZE="-O2" + # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings + # when you inline the string and math operations. Turn this off to + # get rid of the warnings. + #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + + SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + if test "`uname -m`" = "alpha"; then + CFLAGS="$CFLAGS -mieee" +fi + + if test $do64bit = yes; then + + echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6 +if test "${tcl_cv_cc_m64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -m64" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_m64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_m64=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5 +echo "${ECHO_T}$tcl_cv_cc_m64" >&6 + if test $tcl_cv_cc_m64 = yes; then + + CFLAGS="$CFLAGS -m64" + do64bit_ok=yes + +fi + + +fi + + + # The combo of gcc + glibc has a bug related to inlining of + # functions like strtod(). The -fno-builtin flag should address + # this problem but it does not work. The -fno-inline flag is kind + # of overkill but it works. Disable inlining only when one of the + # files in compat/*.c is being linked in. + + if test x"${USE_COMPAT}" != x; then + CFLAGS="$CFLAGS -fno-inline" +fi + + ;; + GNU*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + + SHLIB_LD='${CC} -shared' + DL_OBJS="" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + if test "`uname -m`" = "alpha"; then + CFLAGS="$CFLAGS -mieee" +fi + + ;; + Lynx*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + CFLAGS_OPTIMIZE=-02 + SHLIB_LD='${CC} -shared' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-mshared -ldl" + LD_FLAGS="-Wl,--export-dynamic" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + + ;; + MP-RAS-02*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + MP-RAS-*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,-Bexport" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + NetBSD-1.*|FreeBSD-[1-2].*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 +if test "${tcl_cv_ld_elf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef __ELF__ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + tcl_cv_ld_elf=yes +else + tcl_cv_ld_elf=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 + if test $tcl_cv_ld_elf = yes; then + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + +else + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + +fi + + + # Ancient FreeBSD doesn't handle version numbers with dots. + + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + OpenBSD-*) + CFLAGS_OPTIMIZE='-O2' + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + echo "$as_me:$LINENO: checking for ELF" >&5 +echo $ECHO_N "checking for ELF... $ECHO_C" >&6 +if test "${tcl_cv_ld_elf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef __ELF__ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + tcl_cv_ld_elf=yes +else + tcl_cv_ld_elf=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5 +echo "${ECHO_T}$tcl_cv_ld_elf" >&6 + if test $tcl_cv_ld_elf = yes; then + + LDFLAGS=-Wl,-export-dynamic + +else + LDFLAGS="" +fi + + if test "${TCL_THREADS}" = "1"; then + + # OpenBSD builds and links with -pthread, never -lpthread. + LIBS=`echo $LIBS | sed s/-lpthread//` + CFLAGS="$CFLAGS -pthread" + SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" + +fi + + # OpenBSD doesn't do version numbers with dots. + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + NetBSD-*|FreeBSD-[3-4].*) + # FreeBSD 3.* and greater have ELF. + # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs + SHLIB_CFLAGS="-fPIC" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="$LDFLAGS -export-dynamic" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' +fi + + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + if test "${TCL_THREADS}" = "1"; then + + # The -pthread needs to go in the CFLAGS, not LIBS + LIBS=`echo $LIBS | sed s/-pthread//` + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + +fi + + case $system in + FreeBSD-3.*) + # FreeBSD-3 doesn't handle version numbers with dots. + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' + TCL_LIB_VERSIONS_OK=nodots + ;; + esac + ;; + FreeBSD-*) + # This configuration from FreeBSD Ports. + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared" + TCL_SHLIB_LD_EXTRAS="-soname \$@" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LDFLAGS="" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + if test "${TCL_THREADS}" = "1"; then # The -pthread needs to go in the LDFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LDFLAGS="$LDFLAGS $PTHREAD_LIBS" fi - # Version numbers are dot-stripped by system policy. - TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' - TCL_LIB_VERSIONS_OK=nodots - ;; - Darwin-*) - CFLAGS_OPTIMIZE="-Os" - SHLIB_CFLAGS="-fno-common" - # To avoid discrepancies between what headers configure sees during - # preprocessing tests and compiling tests, move any -isysroot and - # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: - CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ - awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ - if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`" - CFLAGS="`echo " ${CFLAGS}" | \ - awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ - if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" - if test $do64bit = yes; then : - case `arch` in - ppc) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5 -$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; } -if test "${tcl_cv_cc_arch_ppc64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + # Version numbers are dot-stripped by system policy. + TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .` + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1' + TCL_LIB_VERSIONS_OK=nodots + ;; + Darwin-*) + CFLAGS_OPTIMIZE="-Os" + SHLIB_CFLAGS="-fno-common" + # To avoid discrepancies between what headers configure sees during + # preprocessing tests and compiling tests, move any -isysroot and + # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: + CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ + if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`" + CFLAGS="`echo " ${CFLAGS}" | \ + awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ + if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" + if test $do64bit = yes; then + + case `arch` in + ppc) + echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6 +if test "${tcl_cv_cc_arch_ppc64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_arch_ppc64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_arch_ppc64=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6 + if test $tcl_cv_cc_arch_ppc64 = yes; then + + CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" + do64bit_ok=yes + +fi +;; + i386) + echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5 +echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6 +if test "${tcl_cv_cc_arch_x86_64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_cflags=$CFLAGS + CFLAGS="$CFLAGS -arch x86_64" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_cc_arch_x86_64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_arch_x86_64=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$hold_cflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5 +echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6 + if test $tcl_cv_cc_arch_x86_64 = yes; then + + CFLAGS="$CFLAGS -arch x86_64" + do64bit_ok=yes + +fi +;; + *) + { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 +echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; + esac + +else + + # Check for combined 32-bit and 64-bit fat build + if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ + && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then + + fat_32_64=yes +fi + + +fi + + SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 +if test "${tcl_cv_ld_single_module+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_ld_single_module=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_ld_single_module=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 + if test $tcl_cv_ld_single_module = yes; then + + SHLIB_LD="${SHLIB_LD} -Wl,-single_module" + +fi + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dylib" + DL_OBJS="tclLoadDyld.o" + DL_LIBS="" + # Don't use -prebind when building for Mac OS X 10.4 or later only: + if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ + "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then + + LDFLAGS="$LDFLAGS -prebind" +fi + + LDFLAGS="$LDFLAGS -headerpad_max_install_names" + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 +if test "${tcl_cv_ld_search_paths_first+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_ld_search_paths_first=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_ld_search_paths_first=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 + if test $tcl_cv_ld_search_paths_first = yes; then + + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + +fi + + if test "$tcl_cv_cc_visibility_hidden" != yes; then + + +cat >>confdefs.h <<\_ACEOF +#define MODULE_SCOPE __private_extern__ +_ACEOF + + +fi + + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" + +cat >>confdefs.h <<\_ACEOF +#define MAC_OSX_TCL 1 +_ACEOF + + PLAT_OBJS='${MAC_OSX_OBJS}' + PLAT_SRCS='${MAC_OSX_SRCS}' + echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5 +echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6 + # Check whether --enable-corefoundation or --disable-corefoundation was given. +if test "${enable_corefoundation+set}" = set; then + enableval="$enable_corefoundation" + tcl_corefoundation=$enableval +else + tcl_corefoundation=yes +fi; + echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5 +echo "${ECHO_T}$tcl_corefoundation" >&6 + if test $tcl_corefoundation = yes; then + + echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5 +echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6 +if test "${tcl_cv_lib_corefoundation+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_libs=$LIBS + if test "$fat_32_64" = yes; then + + for v in CFLAGS CPPFLAGS LDFLAGS; do + # On Tiger there is no 64-bit CF, so remove 64-bit + # archs from CFLAGS et al. while testing for + # presence of CF. 64-bit CF is disabled in + # tclUnixPort.h if necessary. + eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' + done +fi + + LIBS="$LIBS -framework CoreFoundation" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +CFBundleRef b = CFBundleGetMainBundle(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_lib_corefoundation=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_lib_corefoundation=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$fat_32_64" = yes; then + + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="$hold_'$v'"' + done +fi + + LIBS=$hold_libs +fi +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6 + if test $tcl_cv_lib_corefoundation = yes; then + + LIBS="$LIBS -framework CoreFoundation" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_COREFOUNDATION 1 +_ACEOF + + +else + tcl_corefoundation=no +fi + + if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then + + echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5 +echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6 +if test "${tcl_cv_lib_corefoundation_64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' + done + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +CFBundleRef b = CFBundleGetMainBundle(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_lib_corefoundation_64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_lib_corefoundation_64=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + for v in CFLAGS CPPFLAGS LDFLAGS; do + eval $v'="$hold_'$v'"' + done +fi +echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5 +echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6 + if test $tcl_cv_lib_corefoundation_64 = no; then + + +cat >>confdefs.h <<\_ACEOF +#define NO_COREFOUNDATION_64 1 +_ACEOF + + LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings" + +fi + + +fi + + +fi + + ;; + NEXTSTEP-*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -nostdlib -r' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadNext.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OS/390-*) + CFLAGS_OPTIMIZE="" # Optimizer is buggy + +cat >>confdefs.h <<\_ACEOF +#define _OE_SOCKETS 1 +_ACEOF + + ;; + OSF1-1.0|OSF1-1.1|OSF1-1.2) + # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 + SHLIB_CFLAGS="" + # Hack: make package name same as library name + SHLIB_LD='ld -R -export :' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadOSF.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-1.*) + # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 + SHLIB_CFLAGS="-fPIC" + if test "$SHARED_BUILD" = 1; then + SHLIB_LD="ld -shared" +else + + SHLIB_LD="ld -non_shared" + +fi + + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + OSF1-V*) + # Digital OSF/1 + SHLIB_CFLAGS="" + if test "$SHARED_BUILD" = 1; then + + SHLIB_LD='ld -shared -expect_unresolved "*"' + +else + + SHLIB_LD='ld -non_shared -expect_unresolved "*"' + +fi + + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + if test $doRpath = yes; then + + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' +fi + + if test "$GCC" = yes; then + CFLAGS="$CFLAGS -mieee" +else + + CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" +fi + + # see pthread_intro(3) for pthread support on osf1, k.furukawa + if test "${TCL_THREADS}" = 1; then + + CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" + CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" + LIBS=`echo $LIBS | sed s/-lpthreads//` + if test "$GCC" = yes; then + + LIBS="$LIBS -lpthread -lmach -lexc" + +else + + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" + +fi + + +fi + + ;; + QNX-6*) + # QNX RTP + # This may work for all QNX, but it was only reported for v6. + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + # dlopen is in -lc on QNX + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SCO_SV-3.2*) + # Note, dlopen is available only on SCO 3.2.5 and greater. However, + # this test works, since "uname -s" was non-standard in 3.2.4 and + # below. + if test "$GCC" = yes; then + + SHLIB_CFLAGS="-fPIC -melf" + LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" + +else + + SHLIB_CFLAGS="-Kpic -belf" + LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" + +fi + + SHLIB_LD="ld -G" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SINIX*5.4*) + SHLIB_CFLAGS="-K PIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + SunOS-4*) + SHLIB_CFLAGS="-PIC" + SHLIB_LD="ld" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + + # SunOS can't handle version numbers with dots in them in library + # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it + # requires an extra version number at the end of .so file names. + # So, the library has to have a name like libtcl75.so.1.0 + + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' + TCL_LIB_VERSIONS_OK=nodots + ;; + SunOS-5.[0-6]) + # Careful to not let 5.10+ fall into this case + + # Note: If _REENTRANT isn't defined, then Solaris + # won't define thread-safe library routines. + + +cat >>confdefs.h <<\_ACEOF +#define _REENTRANT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + + SHLIB_CFLAGS="-KPIC" + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + if test "$GCC" = yes; then + + SHLIB_LD='${CC} -shared' + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + +else + + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + +fi + + ;; + SunOS-5*) + # Note: If _REENTRANT isn't defined, then Solaris + # won't define thread-safe library routines. + + +cat >>confdefs.h <<\_ACEOF +#define _REENTRANT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + + SHLIB_CFLAGS="-KPIC" + + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = yes; then + + arch=`isainfo` + if test "$arch" = "sparcv9 sparc"; then + + if test "$GCC" = yes; then + + if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then + + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 +echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} + +else + + do64bit_ok=yes + CFLAGS="$CFLAGS -m64 -mcpu=v9" + LDFLAGS="$LDFLAGS -m64 -mcpu=v9" + SHLIB_CFLAGS="-fPIC" + +fi + + +else + + do64bit_ok=yes + if test "$do64bitVIS" = yes; then + + CFLAGS="$CFLAGS -xarch=v9a" + LDFLAGS_ARCH="-xarch=v9a" + +else + + CFLAGS="$CFLAGS -xarch=v9" + LDFLAGS_ARCH="-xarch=v9" + +fi + + # Solaris 64 uses this as well + #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" + +fi + + +else + if test "$arch" = "amd64 i386"; then + + if test "$GCC" = yes; then + + case $system in + SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) + do64bit_ok=yes + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5 +echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; + esac + +else + + do64bit_ok=yes + case $system in + SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) + CFLAGS="$CFLAGS -m64" + LDFLAGS="$LDFLAGS -m64";; + *) + CFLAGS="$CFLAGS -xarch=amd64" + LDFLAGS="$LDFLAGS -xarch=amd64";; + esac + +fi + + +else + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5 +echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} +fi + +fi + + +fi + + + #-------------------------------------------------------------------- + # On Solaris 5.x i386 with the sunpro compiler we need to link + # with sunmath to get floating point rounding control + #-------------------------------------------------------------------- + if test "$GCC" = yes; then + use_sunmath=no +else + + arch=`isainfo` + echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 +echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 + if test "$arch" = "amd64 i386"; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + MATH_LIBS="-lsunmath $MATH_LIBS" + if test "${ac_cv_header_sunmath_h+set}" = set; then + echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +if test "${ac_cv_header_sunmath_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sunmath.h usability" >&5 +echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking sunmath.h presence" >&5 +echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sunmath.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sunmath.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sunmath.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sunmath.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sunmath.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sunmath.h" >&5 +echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6 +if test "${ac_cv_header_sunmath_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sunmath_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5 +echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6 + +fi + + + use_sunmath=yes + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + use_sunmath=no + +fi + + +fi + + + # Note: need the LIBS below, otherwise Tk won't find Tcl's + # symbols when dynamically loaded into tclsh. + + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + if test "$GCC" = yes; then + + SHLIB_LD='${CC} -shared' + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + if test "$do64bit_ok" = yes; then + + if test "$arch" = "sparcv9 sparc"; then + + # We need to specify -static-libgcc or we need to + # add the path to the sparv9 libgcc. + SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" + # for finding sparcv9 libgcc, get the regular libgcc + # path, remove so name and append 'sparcv9' + #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." + #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + +else + if test "$arch" = "amd64 i386"; then + + SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" + +fi + +fi + + +fi + + +else + + if test "$use_sunmath" = yes; then + textmode=textoff +else + textmode=text +fi + + case $system in + SunOS-5.[1-9][0-9]*) + SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";; + *) + SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";; + esac + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + +fi + + ;; + UNIX_SV* | UnixWare-5*) + SHLIB_CFLAGS="-KPIC" + SHLIB_LD='${CC} -G' + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers + # that don't grok the -Bexport option. Test that it does. + echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5 +echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6 +if test "${tcl_cv_ld_Bexport+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-Bexport" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_ld_Bexport=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_ld_Bexport=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5 +echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6 + if test $tcl_cv_ld_Bexport = yes; then + + LDFLAGS="$LDFLAGS -Wl,-Bexport" + +fi + + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; + esac + + if test "$do64bit" = yes -a "$do64bit_ok" = no; then + + { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 +echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} + +fi + + + if test "$do64bit" = yes -a "$do64bit_ok" = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_DO64BIT 1 +_ACEOF + + +fi + + + + + # Step 4: disable dynamic loading if requested via a command-line switch. + + # Check whether --enable-load or --disable-load was given. +if test "${enable_load+set}" = set; then + enableval="$enable_load" + tcl_ok=$enableval +else + tcl_ok=yes +fi; + if test "$tcl_ok" = no; then + DL_OBJS="" +fi + + + if test "x$DL_OBJS" != x; then + BUILD_DLTEST="\$(DLTEST_TARGETS)" +else + + { echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5 +echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;} + SHLIB_CFLAGS="" + SHLIB_LD="" + SHLIB_SUFFIX="" + DL_OBJS="tclLoadNone.o" + DL_LIBS="" + LDFLAGS="$LDFLAGS_ORIG" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + BUILD_DLTEST="" + +fi + + LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" + + # If we're running gcc, then change the C flags for compiling shared + # libraries to the right flags for gcc, instead of those for the + # standard manufacturer compiler. + + if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then + + case $system in + AIX-*) ;; + BSD/OS*) ;; + CYGWIN_*) ;; + IRIX*) ;; + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; + Darwin-*) ;; + SCO_SV-3.2*) ;; + *) SHLIB_CFLAGS="-fPIC" ;; + esac +fi + + + if test "$SHARED_LIB_SUFFIX" = ""; then + + SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}' +fi + + if test "$UNSHARED_LIB_SUFFIX" = ""; then + + UNSHARED_LIB_SUFFIX='${VERSION}.a' +fi + + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" + + if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then + + LIB_SUFFIX=${SHARED_LIB_SUFFIX} + MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' + if test "${SHLIB_SUFFIX}" = ".dll"; then + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + +else + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + +fi + + +else + + LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} + + if test "$RANLIB" = ""; then + + MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + +else + + MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' + +fi + + +fi + + + # Stub lib does not depend on shared/static configuration + if test "$RANLIB" = ""; then + + MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}' + INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"' + +else + + MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@' + INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' + +fi + + + # Define TCL_LIBS now that we know what DL_LIBS is. + # The trick here is that we don't want to change the value of TCL_LIBS if + # it is already set when tclConfig.sh had been loaded by Tk. + if test "x${TCL_LIBS}" = x; then + + TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}" +fi + + + + # FIXME: This subst was left in only because the TCL_DL_LIBS + # entry in tclConfig.sh uses it. It is not clear why someone + # would use TCL_DL_LIBS instead of TCL_LIBS. + + + + + + + + + + + + + + + + + + + + + + + + + +cat >>confdefs.h <<_ACEOF +#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}" +_ACEOF + + + + + + + + + + + + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. +if test "${enable_symbols+set}" = set; then + enableval="$enable_symbols" + tcl_ok=$enableval +else + tcl_ok=no +fi; +# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. + DBGX="" + if test "$tcl_ok" = "no"; then + CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' + LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_OPTIMIZED 1 +_ACEOF + + else + CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' + LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' + if test "$tcl_ok" = "yes"; then + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 + fi + fi + + + ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging? + +cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_DEBUG 1 +_ACEOF + + + if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then + +cat >>confdefs.h <<\_ACEOF +#define TCL_MEM_DEBUG 1 +_ACEOF + + fi + + if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then + +cat >>confdefs.h <<\_ACEOF +#define TCL_COMPILE_DEBUG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define TCL_COMPILE_STATS 1 +_ACEOF + + fi + + if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then + if test "$tcl_ok" = "all"; then + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 + else + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 + fi + fi + + + +cat >>confdefs.h <<\_ACEOF +#define TCL_TOMMATH 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define MP_PREC 4 +_ACEOF + + +#-------------------------------------------------------------------- +# Detect what compiler flags to set for 64-bit support. +#-------------------------------------------------------------------- + + + echo "$as_me:$LINENO: checking for required early compiler flags" >&5 +echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6 + tcl_flags="" + + if test "${tcl_cv_flag__isoc99_source+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *)strtoll; char *q = (char *)strtoull; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__isoc99_source=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _ISOC99_SOURCE 1 +#include +int +main () +{ +char *p = (char *)strtoll; char *q = (char *)strtoull; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__isoc99_source=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_flag__isoc99_source=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define _ISOC99_SOURCE 1 +_ACEOF + + tcl_flags="$tcl_flags _ISOC99_SOURCE" + fi + + + if test "${tcl_cv_flag__largefile64_source+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__largefile64_source=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGEFILE64_SOURCE 1 +#include +int +main () +{ +struct stat64 buf; int i = stat64("/", &buf); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__largefile64_source=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_flag__largefile64_source=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE64_SOURCE 1 +_ACEOF + + tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" + fi + + + if test "${tcl_cv_flag__largefile_source64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *)open64; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__largefile_source64=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGEFILE_SOURCE64 1 +#include +int +main () +{ +char *p = (char *)open64; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_flag__largefile_source64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_flag__largefile_source64=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE64 1 +_ACEOF + + tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" + fi + + if test "x${tcl_flags}" = "x" ; then + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 + else + echo "$as_me:$LINENO: result: ${tcl_flags}" >&5 +echo "${ECHO_T}${tcl_flags}" >&6 + fi + + + + echo "$as_me:$LINENO: checking for 64-bit integer type" >&5 +echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6 + if test "${tcl_cv_type_64bit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + tcl_cv_type_64bit=none + # See if the compiler knows natively about __int64 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +__int64 value = (__int64) 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_type_64bit=__int64 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_type_64bit="long long" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + # See if we should use long anyway Note that we substitute in the + # type that is our current guess for a 64-bit type inside this check + # program, so it should be modified only carefully... + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +switch (0) { + case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; + } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_type_64bit=${tcl_type_64bit} +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "${tcl_cv_type_64bit}" = none ; then + +cat >>confdefs.h <<\_ACEOF +#define TCL_WIDE_INT_IS_LONG 1 +_ACEOF + + echo "$as_me:$LINENO: result: using long" >&5 +echo "${ECHO_T}using long" >&6 + else + +cat >>confdefs.h <<_ACEOF +#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} +_ACEOF + + echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5 +echo "${ECHO_T}${tcl_cv_type_64bit}" >&6 + + # Now check for auxiliary declarations + echo "$as_me:$LINENO: checking for struct dirent64" >&5 +echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6 +if test "${tcl_cv_struct_dirent64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +struct dirent64 p; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_struct_dirent64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_struct_dirent64=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5 +echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6 + if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_DIRENT64 1 +_ACEOF + + fi + + echo "$as_me:$LINENO: checking for struct stat64" >&5 +echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6 +if test "${tcl_cv_struct_stat64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +struct stat64 p; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_struct_stat64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_struct_stat64=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5 +echo "${ECHO_T}$tcl_cv_struct_stat64" >&6 + if test "x${tcl_cv_struct_stat64}" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_STAT64 1 +_ACEOF + + fi + + + +for ac_func in open64 lseek64 +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 + if test "${tcl_cv_type_off64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +off64_t offset; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_type_off64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_type_off64_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test "x${tcl_cv_type_off64_t}" = "xyes" && \ + test "x${ac_cv_func_lseek64}" = "xyes" && \ + test "x${ac_cv_func_open64}" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TYPE_OFF64_T 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + + +#-------------------------------------------------------------------- +# Check endianness because we can optimize comparisons of +# Tcl_UniChar strings to memcmp on big-endian systems. +#-------------------------------------------------------------------- + +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_bigendian=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +#-------------------------------------------------------------------- +# Supply substitutes for missing POSIX library procedures, or +# set flags so Tcl uses alternate procedures. +#-------------------------------------------------------------------- + +# Check if Posix compliant getcwd exists, if not we'll use getwd. + +for ac_func in getcwd +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define USEGETWD 1 +_ACEOF + +fi +done + +# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really +# define USEGETWD even if the posix getcwd exists. Add a test ? + + + + + +for ac_func in mkstemp opendir strtol waitpid +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; +esac + +fi +done + + +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +if test "${ac_cv_func_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strerror to an innocuous variant, in case declares strerror. + For example, HP-UX 11i declares gettimeofday. */ +#define strerror innocuous_strerror + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strerror (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strerror + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strerror) || defined (__stub___strerror) +choke me +#else +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != strerror; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strerror=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_strerror=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 +if test $ac_cv_func_strerror = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_STRERROR 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for getwd" >&5 +echo $ECHO_N "checking for getwd... $ECHO_C" >&6 +if test "${ac_cv_func_getwd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getwd to an innocuous variant, in case declares getwd. + For example, HP-UX 11i declares gettimeofday. */ +#define getwd innocuous_getwd + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getwd (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getwd + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getwd (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getwd) || defined (__stub___getwd) +choke me +#else +char (*f) () = getwd; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != getwd; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getwd=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_getwd=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_getwd" >&5 +echo "${ECHO_T}$ac_cv_func_getwd" >&6 +if test $ac_cv_func_getwd = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_GETWD 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for wait3" >&5 +echo $ECHO_N "checking for wait3... $ECHO_C" >&6 +if test "${ac_cv_func_wait3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define wait3 to an innocuous variant, in case declares wait3. + For example, HP-UX 11i declares gettimeofday. */ +#define wait3 innocuous_wait3 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char wait3 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef wait3 + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char wait3 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_wait3) || defined (__stub___wait3) +choke me +#else +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != wait3; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_wait3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_wait3=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 +echo "${ECHO_T}$ac_cv_func_wait3" >&6 +if test $ac_cv_func_wait3 = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_WAIT3 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for uname" >&5 +echo $ECHO_N "checking for uname... $ECHO_C" >&6 +if test "${ac_cv_func_uname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define uname to an innocuous variant, in case declares uname. + For example, HP-UX 11i declares gettimeofday. */ +#define uname innocuous_uname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char uname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef uname + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char uname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_uname) || defined (__stub___uname) +choke me +#else +char (*f) () = uname; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != uname; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_uname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_uname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 +echo "${ECHO_T}$ac_cv_func_uname" >&6 +if test $ac_cv_func_uname = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_UNAME 1 +_ACEOF + +fi + + +if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ + test "`uname -r | awk -F. '{print $1}'`" -lt 7; then + # prior to Darwin 7, realpath is not threadsafe, so don't + # use it when threads are enabled, c.f. bug # 711232 + ac_cv_func_realpath=no +fi +echo "$as_me:$LINENO: checking for realpath" >&5 +echo $ECHO_N "checking for realpath... $ECHO_C" >&6 +if test "${ac_cv_func_realpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define realpath to an innocuous variant, in case declares realpath. + For example, HP-UX 11i declares gettimeofday. */ +#define realpath innocuous_realpath + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char realpath (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef realpath + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char realpath (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_realpath) || defined (__stub___realpath) +choke me +#else +char (*f) () = realpath; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != realpath; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_realpath=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_realpath=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5 +echo "${ECHO_T}$ac_cv_func_realpath" >&6 +if test $ac_cv_func_realpath = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_REALPATH 1 +_ACEOF + +fi + - hold_cflags=$CFLAGS - CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +if test "${ac_cv_func_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. + For example, HP-UX 11i declares gettimeofday. */ +#define getaddrinfo innocuous_getaddrinfo + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getaddrinfo (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getaddrinfo + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getaddrinfo (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) +choke me +#else +char (*f) () = getaddrinfo; +#endif +#ifdef __cplusplus +} +#endif int main () { - +return f != getaddrinfo; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_cc_arch_ppc64=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getaddrinfo=yes else - tcl_cv_cc_arch_ppc64=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_getaddrinfo=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$hold_cflags +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5 -$as_echo "$tcl_cv_cc_arch_ppc64" >&6; } - if test $tcl_cv_cc_arch_ppc64 = yes; then : - - CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" - do64bit_ok=yes +echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +if test $ac_cv_func_getaddrinfo = yes; then -fi;; - i386) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5 -$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; } -if test "${tcl_cv_cc_arch_x86_64+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 +if test "${tcl_cv_api_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_cflags=$CFLAGS - CFLAGS="$CFLAGS -arch x86_64" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include + int main () { + const char *name, *port; + struct addrinfo *aiPtr, hints; + (void)getaddrinfo(name,port, &hints, &aiPtr); + (void)freeaddrinfo(aiPtr); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_cc_arch_x86_64=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getaddrinfo=yes else - tcl_cv_cc_arch_x86_64=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_getaddrinfo=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$hold_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5 -$as_echo "$tcl_cv_cc_arch_x86_64" >&6; } - if test $tcl_cv_cc_arch_x86_64 = yes; then : +echo "$as_me:$LINENO: result: $tcl_cv_api_getaddrinfo" >&5 +echo "${ECHO_T}$tcl_cv_api_getaddrinfo" >&6 + tcl_ok=$tcl_cv_api_getaddrinfo + if test "$tcl_ok" = yes; then - CFLAGS="$CFLAGS -arch x86_64" - do64bit_ok=yes +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETADDRINFO 1 +_ACEOF -fi;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 -$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; - esac + fi -else +fi - # Check for combined 32-bit and 64-bit fat build - if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ - && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then : - fat_32_64=yes -fi +#-------------------------------------------------------------------- +# Look for thread-safe variants of some library functions. +#-------------------------------------------------------------------- -fi - SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 -$as_echo_n "checking if ld accepts -single_module flag... " >&6; } -if test "${tcl_cv_ld_single_module+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "${TCL_THREADS}" = 1; then + echo "$as_me:$LINENO: checking for getpwuid_r" >&5 +echo $ECHO_N "checking for getpwuid_r... $ECHO_C" >&6 +if test "${ac_cv_func_getpwuid_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - hold_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define getpwuid_r to an innocuous variant, in case declares getpwuid_r. + For example, HP-UX 11i declares gettimeofday. */ +#define getpwuid_r innocuous_getpwuid_r + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getpwuid_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getpwuid_r + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getpwuid_r (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r) +choke me +#else +char (*f) () = getpwuid_r; +#endif +#ifdef __cplusplus +} +#endif int main () { -int i; +return f != getpwuid_r; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_ld_single_module=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getpwuid_r=yes else - tcl_cv_ld_single_module=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 -$as_echo "$tcl_cv_ld_single_module" >&6; } - if test $tcl_cv_ld_single_module = yes; then : - - SHLIB_LD="${SHLIB_LD} -Wl,-single_module" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_getpwuid_r=no fi - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".dylib" - DL_OBJS="tclLoadDyld.o" - DL_LIBS="" - # Don't use -prebind when building for Mac OS X 10.4 or later only: - if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ - "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then : - - LDFLAGS="$LDFLAGS -prebind" +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 -$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } -if test "${tcl_cv_ld_search_paths_first+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_func_getpwuid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwuid_r" >&6 +if test $ac_cv_func_getpwuid_r = yes; then + + echo "$as_me:$LINENO: checking for getpwuid_r with 5 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 5 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include + #include + int main () { -int i; + + uid_t uid; + struct passwd pw, *pwp; + char buf[512]; + int buflen = 512; + + (void) getpwuid_r(uid, &pw, buf, buflen, &pwp); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_ld_search_paths_first=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getpwuid_r_5=yes else - tcl_cv_ld_search_paths_first=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5 -$as_echo "$tcl_cv_ld_search_paths_first" >&6; } - if test $tcl_cv_ld_search_paths_first = yes; then : - - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_api_getpwuid_r_5=no fi - if test "$tcl_cv_cc_visibility_hidden" != yes; then : - - -$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h - - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_5" >&6 + tcl_ok=$tcl_cv_api_getpwuid_r_5 + if test "$tcl_ok" = yes; then -$as_echo "#define MAC_OSX_TCL 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETPWUID_R_5 1 +_ACEOF - PLAT_OBJS='${MAC_OSX_OBJS}' - PLAT_SRCS='${MAC_OSX_SRCS}' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use CoreFoundation" >&5 -$as_echo_n "checking whether to use CoreFoundation... " >&6; } - # Check whether --enable-corefoundation was given. -if test "${enable_corefoundation+set}" = set; then : - enableval=$enable_corefoundation; tcl_corefoundation=$enableval + else + echo "$as_me:$LINENO: checking for getpwuid_r with 4 args" >&5 +echo $ECHO_N "checking for getpwuid_r with 4 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - tcl_corefoundation=yes -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_corefoundation" >&5 -$as_echo "$tcl_corefoundation" >&6; } - if test $tcl_corefoundation = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CoreFoundation.framework" >&5 -$as_echo_n "checking for CoreFoundation.framework... " >&6; } -if test "${tcl_cv_lib_corefoundation+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - hold_libs=$LIBS - if test "$fat_32_64" = yes; then : + #include + #include - for v in CFLAGS CPPFLAGS LDFLAGS; do - # On Tiger there is no 64-bit CF, so remove 64-bit - # archs from CFLAGS et al. while testing for - # presence of CF. 64-bit CF is disabled in - # tclUnixPort.h if necessary. - eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' - done -fi - LIBS="$LIBS -framework CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -CFBundleRef b = CFBundleGetMainBundle(); + + uid_t uid; + struct passwd pw; + char buf[512]; + int buflen = 512; + + (void)getpwnam_r(uid, &pw, buf, buflen); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_lib_corefoundation=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getpwuid_r_4=yes else - tcl_cv_lib_corefoundation=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$fat_32_64" = yes; then : + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - for v in CFLAGS CPPFLAGS LDFLAGS; do - eval $v'="$hold_'$v'"' - done +tcl_cv_api_getpwuid_r_4=no fi - LIBS=$hold_libs +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation" >&5 -$as_echo "$tcl_cv_lib_corefoundation" >&6; } - if test $tcl_cv_lib_corefoundation = yes; then : +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwuid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwuid_r_4" >&6 + tcl_ok=$tcl_cv_api_getpwuid_r_4 + if test "$tcl_ok" = yes; then - LIBS="$LIBS -framework CoreFoundation" +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETPWUID_R_4 1 +_ACEOF + + fi + fi + if test "$tcl_ok" = yes; then -$as_echo "#define HAVE_COREFOUNDATION 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETPWUID_R 1 +_ACEOF + fi -else - tcl_corefoundation=no fi - if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit CoreFoundation" >&5 -$as_echo_n "checking for 64-bit CoreFoundation... " >&6; } -if test "${tcl_cv_lib_corefoundation_64+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for getpwnam_r" >&5 +echo $ECHO_N "checking for getpwnam_r... $ECHO_C" >&6 +if test "${ac_cv_func_getpwnam_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getpwnam_r to an innocuous variant, in case declares getpwnam_r. + For example, HP-UX 11i declares gettimeofday. */ +#define getpwnam_r innocuous_getpwnam_r + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getpwnam_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getpwnam_r + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getpwnam_r (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r) +choke me +#else +char (*f) () = getpwnam_r; +#endif +#ifdef __cplusplus +} +#endif - for v in CFLAGS CPPFLAGS LDFLAGS; do - eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' - done - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -CFBundleRef b = CFBundleGetMainBundle(); +return f != getpwnam_r; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_lib_corefoundation_64=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getpwnam_r=yes else - tcl_cv_lib_corefoundation_64=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - for v in CFLAGS CPPFLAGS LDFLAGS; do - eval $v'="$hold_'$v'"' - done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation_64" >&5 -$as_echo "$tcl_cv_lib_corefoundation_64" >&6; } - if test $tcl_cv_lib_corefoundation_64 = no; then : - - -$as_echo "#define NO_COREFOUNDATION_64 1" >>confdefs.h - - LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings" - -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_getpwnam_r=no fi - +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - ;; - NEXTSTEP-*) - SHLIB_CFLAGS="" - SHLIB_LD='${CC} -nostdlib -r' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadNext.o" - DL_LIBS="" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy - -$as_echo "#define _OE_SOCKETS 1" >>confdefs.h +echo "$as_me:$LINENO: result: $ac_cv_func_getpwnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam_r" >&6 +if test $ac_cv_func_getpwnam_r = yes; then - ;; - OSF1-1.0|OSF1-1.1|OSF1-1.2) - # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 - SHLIB_CFLAGS="" - # Hack: make package name same as library name - SHLIB_LD='ld -R -export :' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadOSF.o" - DL_LIBS="" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-1.*) - # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 - SHLIB_CFLAGS="-fPIC" - if test "$SHARED_BUILD" = 1; then : - SHLIB_LD="ld -shared" + echo "$as_me:$LINENO: checking for getpwnam_r with 5 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 5 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - SHLIB_LD="ld -non_shared" - -fi - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-V*) - # Digital OSF/1 - SHLIB_CFLAGS="" - if test "$SHARED_BUILD" = 1; then : + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - SHLIB_LD='ld -shared -expect_unresolved "*"' + #include + #include -else +int +main () +{ - SHLIB_LD='ld -non_shared -expect_unresolved "*"' + char *name; + struct passwd pw, *pwp; + char buf[512]; + int buflen = 512; -fi - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - if test $doRpath = yes; then : + (void) getpwnam_r(name, &pw, buf, buflen, &pwp); - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' -fi - if test "$GCC" = yes; then : - CFLAGS="$CFLAGS -mieee" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getpwnam_r_5=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" +tcl_cv_api_getpwnam_r_5=no fi - # see pthread_intro(3) for pthread support on osf1, k.furukawa - if test "${TCL_THREADS}" = 1; then : - - CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" - CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" - LIBS=`echo $LIBS | sed s/-lpthreads//` - if test "$GCC" = yes; then : +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_5" >&6 + tcl_ok=$tcl_cv_api_getpwnam_r_5 + if test "$tcl_ok" = yes; then - LIBS="$LIBS -lpthread -lmach -lexc" +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETPWNAM_R_5 1 +_ACEOF + else + echo "$as_me:$LINENO: checking for getpwnam_r with 4 args" >&5 +echo $ECHO_N "checking for getpwnam_r with 4 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - CFLAGS="$CFLAGS -pthread" - LDFLAGS="$LDFLAGS -pthread" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi + #include + #include -fi - ;; - QNX-6*) - # QNX RTP - # This may work for all QNX, but it was only reported for v6. - SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - # dlopen is in -lc on QNX - DL_LIBS="" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - SCO_SV-3.2*) - # Note, dlopen is available only on SCO 3.2.5 and greater. However, - # this test works, since "uname -s" was non-standard in 3.2.4 and - # below. - if test "$GCC" = yes; then : +int +main () +{ - SHLIB_CFLAGS="-fPIC -melf" - LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" + char *name; + struct passwd pw; + char buf[512]; + int buflen = 512; -else + (void)getpwnam_r(name, &pw, buf, buflen); - SHLIB_CFLAGS="-Kpic -belf" - LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getpwnam_r_4=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_api_getpwnam_r_4=no fi - SHLIB_LD="ld -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - SINIX*5.4*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD='${CC} -G' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - SunOS-4*) - SHLIB_CFLAGS="-PIC" - SHLIB_LD="ld" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - - # SunOS can't handle version numbers with dots in them in library - # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it - # requires an extra version number at the end of .so file names. - # So, the library has to have a name like libtcl75.so.1.0 - - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - SunOS-5.[0-6]) - # Careful to not let 5.10+ fall into this case +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_api_getpwnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getpwnam_r_4" >&6 + tcl_ok=$tcl_cv_api_getpwnam_r_4 + if test "$tcl_ok" = yes; then - # Note: If _REENTRANT isn't defined, then Solaris - # won't define thread-safe library routines. +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETPWNAM_R_4 1 +_ACEOF + fi + fi + if test "$tcl_ok" = yes; then -$as_echo "#define _REENTRANT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETPWNAM_R 1 +_ACEOF + fi -$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h +fi + echo "$as_me:$LINENO: checking for getgrgid_r" >&5 +echo $ECHO_N "checking for getgrgid_r... $ECHO_C" >&6 +if test "${ac_cv_func_getgrgid_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getgrgid_r to an innocuous variant, in case declares getgrgid_r. + For example, HP-UX 11i declares gettimeofday. */ +#define getgrgid_r innocuous_getgrgid_r - SHLIB_CFLAGS="-KPIC" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getgrgid_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. +#ifdef __STDC__ +# include +#else +# include +#endif - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - if test "$GCC" = yes; then : +#undef getgrgid_r - SHLIB_LD='${CC} -shared' - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getgrgid_r (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r) +choke me +#else +char (*f) () = getgrgid_r; +#endif +#ifdef __cplusplus +} +#endif +int +main () +{ +return f != getgrgid_r; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getgrgid_r=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - +ac_cv_func_getgrgid_r=no fi - ;; - SunOS-5*) - # Note: If _REENTRANT isn't defined, then Solaris - # won't define thread-safe library routines. - - -$as_echo "#define _REENTRANT 1" >>confdefs.h +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_getgrgid_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrgid_r" >&6 +if test $ac_cv_func_getgrgid_r = yes; then + echo "$as_me:$LINENO: checking for getgrgid_r with 5 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 5 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else -$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include + #include - SHLIB_CFLAGS="-KPIC" +int +main () +{ - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = yes; then : + gid_t gid; + struct group gr, *grp; + char buf[512]; + int buflen = 512; - arch=`isainfo` - if test "$arch" = "sparcv9 sparc"; then : + (void) getgrgid_r(gid, &gr, buf, buflen, &grp); - if test "$GCC" = yes; then : + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getgrgid_r_5=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then : +tcl_cv_api_getgrgid_r_5=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_5" >&6 + tcl_ok=$tcl_cv_api_getgrgid_r_5 + if test "$tcl_ok" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETGRGID_R_5 1 +_ACEOF + else + echo "$as_me:$LINENO: checking for getgrgid_r with 4 args" >&5 +echo $ECHO_N "checking for getgrgid_r with 4 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - do64bit_ok=yes - CFLAGS="$CFLAGS -m64 -mcpu=v9" - LDFLAGS="$LDFLAGS -m64 -mcpu=v9" - SHLIB_CFLAGS="-fPIC" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi + #include + #include -else +int +main () +{ - do64bit_ok=yes - if test "$do64bitVIS" = yes; then : + gid_t gid; + struct group gr; + char buf[512]; + int buflen = 512; - CFLAGS="$CFLAGS -xarch=v9a" - LDFLAGS_ARCH="-xarch=v9a" + (void)getgrgid_r(gid, &gr, buf, buflen); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getgrgid_r_4=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$CFLAGS -xarch=v9" - LDFLAGS_ARCH="-xarch=v9" - +tcl_cv_api_getgrgid_r_4=no fi - # Solaris 64 uses this as well - #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrgid_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrgid_r_4" >&6 + tcl_ok=$tcl_cv_api_getgrgid_r_4 + if test "$tcl_ok" = yes; then -else - if test "$arch" = "amd64 i386"; then : - - if test "$GCC" = yes; then : - - case $system in - SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) - do64bit_ok=yes - CFLAGS="$CFLAGS -m64" - LDFLAGS="$LDFLAGS -m64";; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; - esac - -else +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETGRGID_R_4 1 +_ACEOF - do64bit_ok=yes - case $system in - SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) - CFLAGS="$CFLAGS -m64" - LDFLAGS="$LDFLAGS -m64";; - *) - CFLAGS="$CFLAGS -xarch=amd64" - LDFLAGS="$LDFLAGS -xarch=amd64";; - esac + fi + fi + if test "$tcl_ok" = yes; then -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETGRGID_R 1 +_ACEOF -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} -fi -fi + fi fi - #-------------------------------------------------------------------- - # On Solaris 5.x i386 with the sunpro compiler we need to link - # with sunmath to get floating point rounding control - #-------------------------------------------------------------------- - if test "$GCC" = yes; then : - use_sunmath=no + echo "$as_me:$LINENO: checking for getgrnam_r" >&5 +echo $ECHO_N "checking for getgrnam_r... $ECHO_C" >&6 +if test "${ac_cv_func_getgrnam_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getgrnam_r to an innocuous variant, in case declares getgrnam_r. + For example, HP-UX 11i declares gettimeofday. */ +#define getgrnam_r innocuous_getgrnam_r - arch=`isainfo` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use -lsunmath for fp rounding control" >&5 -$as_echo_n "checking whether to use -lsunmath for fp rounding control... " >&6; } - if test "$arch" = "amd64 i386"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - MATH_LIBS="-lsunmath $MATH_LIBS" - ac_fn_c_check_header_mongrel "$LINENO" "sunmath.h" "ac_cv_header_sunmath_h" "$ac_includes_default" -if test "x$ac_cv_header_sunmath_h" = x""yes; then : +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getgrnam_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -fi +#ifdef __STDC__ +# include +#else +# include +#endif +#undef getgrnam_r - use_sunmath=yes +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char getgrnam_r (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r) +choke me +#else +char (*f) () = getgrnam_r; +#endif +#ifdef __cplusplus +} +#endif +int +main () +{ +return f != getgrnam_r; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getgrnam_r=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - use_sunmath=no - +ac_cv_func_getgrnam_r=no fi - +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_func_getgrnam_r" >&5 +echo "${ECHO_T}$ac_cv_func_getgrnam_r" >&6 +if test $ac_cv_func_getgrnam_r = yes; then - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. + echo "$as_me:$LINENO: checking for getgrnam_r with 5 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 5 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - if test "$GCC" = yes; then : + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - SHLIB_LD='${CC} -shared' - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "$do64bit_ok" = yes; then : + #include + #include - if test "$arch" = "sparcv9 sparc"; then : +int +main () +{ - # We need to specify -static-libgcc or we need to - # add the path to the sparv9 libgcc. - SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" - # for finding sparcv9 libgcc, get the regular libgcc - # path, remove so name and append 'sparcv9' - #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." - #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" + char *name; + struct group gr, *grp; + char buf[512]; + int buflen = 512; -else - if test "$arch" = "amd64 i386"; then : + (void) getgrnam_r(name, &gr, buf, buflen, &grp); - SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getgrnam_r_5=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_api_getgrnam_r_5=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_5" >&6 + tcl_ok=$tcl_cv_api_getgrnam_r_5 + if test "$tcl_ok" = yes; then -fi - -else - - if test "$use_sunmath" = yes; then : - textmode=textoff -else - textmode=text -fi - case $system in - SunOS-5.[1-9][0-9]*) - SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";; - *) - SHLIB_LD="/usr/ccs/bin/ld -G -z $textmode";; - esac - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETGRNAM_R_5 1 +_ACEOF -fi - ;; - UNIX_SV* | UnixWare-5*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD='${CC} -G' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers - # that don't grok the -Bexport option. Test that it does. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5 -$as_echo_n "checking for ld accepts -Bexport flag... " >&6; } -if test "${tcl_cv_ld_Bexport+set}" = set; then : - $as_echo_n "(cached) " >&6 + else + echo "$as_me:$LINENO: checking for getgrnam_r with 4 args" >&5 +echo $ECHO_N "checking for getgrnam_r with 4 args... $ECHO_C" >&6 +if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_ldflags=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-Bexport" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include + #include + int main () { -int i; + + char *name; + struct group gr; + char buf[512]; + int buflen = 512; + + (void)getgrnam_r(name, &gr, buf, buflen); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_ld_Bexport=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_getgrnam_r_4=yes else - tcl_cv_ld_Bexport=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_api_getgrnam_r_4=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$hold_ldflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5 -$as_echo "$tcl_cv_ld_Bexport" >&6; } - if test $tcl_cv_ld_Bexport = yes; then : +echo "$as_me:$LINENO: result: $tcl_cv_api_getgrnam_r_4" >&5 +echo "${ECHO_T}$tcl_cv_api_getgrnam_r_4" >&6 + tcl_ok=$tcl_cv_api_getgrnam_r_4 + if test "$tcl_ok" = yes; then - LDFLAGS="$LDFLAGS -Wl,-Bexport" +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETGRNAM_R_4 1 +_ACEOF -fi - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - esac + fi + fi + if test "$tcl_ok" = yes; then - if test "$do64bit" = yes -a "$do64bit_ok" = no; then : +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETGRNAM_R 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 -$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} + fi fi - if test "$do64bit" = yes -a "$do64bit_ok" = yes; then : + if test "`uname -s`" = "Darwin" && \ + test "`uname -r | awk -F. '{print $1}'`" -gt 5; then + # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX + # are actually MT-safe as they always return pointers + # from TSD instead of static storage. +cat >>confdefs.h <<\_ACEOF +#define HAVE_MTSAFE_GETHOSTBYNAME 1 +_ACEOF -$as_echo "#define TCL_CFG_DO64BIT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_MTSAFE_GETHOSTBYADDR 1 +_ACEOF -fi + elif test "`uname -s`" = "HP-UX" && \ + test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then + # Starting with HPUX 11.00 (we believe), gethostbyX + # are actually MT-safe as they always return pointers + # from TSD instead of static storage. +cat >>confdefs.h <<\_ACEOF +#define HAVE_MTSAFE_GETHOSTBYNAME 1 +_ACEOF - # Step 4: disable dynamic loading if requested via a command-line switch. - # Check whether --enable-load was given. -if test "${enable_load+set}" = set; then : - enableval=$enable_load; tcl_ok=$enableval -else - tcl_ok=yes -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_MTSAFE_GETHOSTBYADDR 1 +_ACEOF - if test "$tcl_ok" = no; then : - DL_OBJS="" -fi - if test "x$DL_OBJS" != x; then : - BUILD_DLTEST="\$(DLTEST_TARGETS)" + else + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyname_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname_r to an innocuous variant, in case declares gethostbyname_r. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname_r innocuous_gethostbyname_r - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5 -$as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;} - SHLIB_CFLAGS="" - SHLIB_LD="" - SHLIB_SUFFIX="" - DL_OBJS="tclLoadNone.o" - DL_LIBS="" - LDFLAGS="$LDFLAGS_ORIG" - CC_SEARCH_FLAGS="" - LD_SEARCH_FLAGS="" - BUILD_DLTEST="" - -fi - LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - # If we're running gcc, then change the C flags for compiling shared - # libraries to the right flags for gcc, instead of those for the - # standard manufacturer compiler. +#ifdef __STDC__ +# include +#else +# include +#endif - if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then : +#undef gethostbyname_r - case $system in - AIX-*) ;; - BSD/OS*) ;; - CYGWIN_*) ;; - IRIX*) ;; - NetBSD-*|FreeBSD-*|OpenBSD-*) ;; - Darwin-*) ;; - SCO_SV-3.2*) ;; - *) SHLIB_CFLAGS="-fPIC" ;; - esac -fi +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname_r (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +choke me +#else +char (*f) () = gethostbyname_r; +#endif +#ifdef __cplusplus +} +#endif - if test "$SHARED_LIB_SUFFIX" = ""; then : +int +main () +{ +return f != gethostbyname_r; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyname_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}' +ac_cv_func_gethostbyname_r=no fi - if test "$UNSHARED_LIB_SUFFIX" = ""; then : - - UNSHARED_LIB_SUFFIX='${VERSION}.a' +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +if test $ac_cv_func_gethostbyname_r = yes; then - if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then : + echo "$as_me:$LINENO: checking for gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 6 args... $ECHO_C" >&6 +if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else - LIB_SUFFIX=${SHARED_LIB_SUFFIX} - MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - if test "${SHLIB_SUFFIX}" = ".dll"; then : + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' - DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + #include -else +int +main () +{ - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + char *name; + struct hostent *he, *res; + char buffer[2048]; + int buflen = 2048; + int h_errnop; -fi + (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_gethostbyname_r_6=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} - - if test "$RANLIB" = ""; then : +tcl_cv_api_gethostbyname_r_6=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_6" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_6" >&6 + tcl_ok=$tcl_cv_api_gethostbyname_r_6 + if test "$tcl_ok" = yes; then - MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_6 1 +_ACEOF + else + echo "$as_me:$LINENO: checking for gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 5 args... $ECHO_C" >&6 +if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi + #include -fi +int +main () +{ - # Stub lib does not depend on shared/static configuration - if test "$RANLIB" = ""; then : + char *name; + struct hostent *he; + char buffer[2048]; + int buflen = 2048; + int h_errnop; - MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"' + (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_gethostbyname_r_5=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' - +tcl_cv_api_gethostbyname_r_5=no fi - - # Define TCL_LIBS now that we know what DL_LIBS is. - # The trick here is that we don't want to change the value of TCL_LIBS if - # it is already set when tclConfig.sh had been loaded by Tk. - if test "x${TCL_LIBS}" = x; then : - - TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_5" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_5" >&6 + tcl_ok=$tcl_cv_api_gethostbyname_r_5 + if test "$tcl_ok" = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_5 1 +_ACEOF - # FIXME: This subst was left in only because the TCL_DL_LIBS - # entry in tclConfig.sh uses it. It is not clear why someone - # would use TCL_DL_LIBS instead of TCL_LIBS. + else + echo "$as_me:$LINENO: checking for gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking for gethostbyname_r with 3 args... $ECHO_C" >&6 +if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include +int +main () +{ + char *name; + struct hostent *he; + struct hostent_data data; + (void) gethostbyname_r(name, he, &data); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_gethostbyname_r_3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_api_gethostbyname_r_3=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyname_r_3" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyname_r_3" >&6 + tcl_ok=$tcl_cv_api_gethostbyname_r_3 + if test "$tcl_ok" = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_3 1 +_ACEOF + fi + fi + fi + if test "$tcl_ok" = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R 1 +_ACEOF + fi +fi + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 +echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyaddr_r to an innocuous variant, in case declares gethostbyaddr_r. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyaddr_r innocuous_gethostbyaddr_r +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyaddr_r (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gethostbyaddr_r +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyaddr_r (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) +choke me +#else +char (*f) () = gethostbyaddr_r; +#endif +#ifdef __cplusplus +} +#endif +int +main () +{ +return f != gethostbyaddr_r; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyaddr_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_gethostbyaddr_r=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 +if test $ac_cv_func_gethostbyaddr_r = yes; then + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 7 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 7 args... $ECHO_C" >&6 +if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include +int +main () +{ + char *addr; + int length; + int type; + struct hostent *result; + char buffer[2048]; + int buflen = 2048; + int h_errnop; + (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, + &h_errnop); -cat >>confdefs.h <<_ACEOF -#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}" + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_gethostbyaddr_r_7=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_api_gethostbyaddr_r_7=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_7" >&6 + tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 + if test "$tcl_ok" = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_7 1 +_ACEOF + else + echo "$as_me:$LINENO: checking for gethostbyaddr_r with 8 args" >&5 +echo $ECHO_N "checking for gethostbyaddr_r with 8 args... $ECHO_C" >&6 +if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include +int +main () +{ + char *addr; + int length; + int type; + struct hostent *result, *resultp; + char buffer[2048]; + int buflen = 2048; + int h_errnop; + (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, + &resultp, &h_errnop); - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 -$as_echo_n "checking for build with symbols... " >&6; } - # Check whether --enable-symbols was given. -if test "${enable_symbols+set}" = set; then : - enableval=$enable_symbols; tcl_ok=$enableval + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_gethostbyaddr_r_8=yes else - tcl_ok=no -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. - DBGX="" - if test "$tcl_ok" = "no"; then - CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' - LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +tcl_cv_api_gethostbyaddr_r_8=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 +echo "${ECHO_T}$tcl_cv_api_gethostbyaddr_r_8" >&6 + tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 + if test "$tcl_ok" = yes; then -$as_echo "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_8 1 +_ACEOF - else - CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' - LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' - if test "$tcl_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 -$as_echo "yes (standard debugging)" >&6; } fi fi + if test "$tcl_ok" = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R 1 +_ACEOF - ### FIXME: Surely TCL_CFG_DEBUG should be set to whether we're debugging? + fi -$as_echo "#define TCL_CFG_DEBUG 1" >>confdefs.h +fi + fi +fi - if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then +#--------------------------------------------------------------------------- +# Determine which interface to use to talk to the serial port. +# Note that #include lines must begin in leftmost column for +# some compilers to recognize them as preprocessor directives. +#--------------------------------------------------------------------------- -$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h - fi - if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then +for ac_header in sys/modem.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define TCL_COMPILE_DEBUG 1" >>confdefs.h +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define TCL_COMPILE_STATS 1" >>confdefs.h + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - fi +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then - if test "$tcl_ok" = "all"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem compile debugging" >&5 -$as_echo "enabled symbols mem compile debugging" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 -$as_echo "enabled $tcl_ok debugging" >&6; } - fi - fi +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done -$as_echo "#define TCL_TOMMATH 1" >>confdefs.h + echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5 +echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6 +if test "${tcl_cv_api_serial+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + tcl_cv_api_serial=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -$as_echo "#define MP_PREC 4" >>confdefs.h +#include +int main() { + struct termios t; + if (tcgetattr(0, &t) == 0) { + cfsetospeed(&t, 0); + t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_serial=termios +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#-------------------------------------------------------------------- -# Detect what compiler flags to set for 64-bit support. -#-------------------------------------------------------------------- +( exit $ac_status ) +tcl_cv_api_serial=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + if test $tcl_cv_api_serial = no ; then + if test "$cross_compiling" = yes; then + tcl_cv_api_serial=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5 -$as_echo_n "checking for required early compiler flags... " >&6; } - tcl_flags="" +int main() { + struct termio t; + if (ioctl(0, TCGETA, &t) == 0) { + t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_serial=termio +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "${tcl_cv_flag__isoc99_source+set}" = set; then : - $as_echo_n "(cached) " >&6 +( exit $ac_status ) +tcl_cv_api_serial=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + fi + if test $tcl_cv_api_serial = no ; then + if test "$cross_compiling" = yes; then + tcl_cv_api_serial=no else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *)strtoll; char *q = (char *)strtoull; - ; - return 0; + +#include + +int main() { + struct sgttyb t; + if (ioctl(0, TIOCGETP, &t) == 0) { + t.sg_ospeed = 0; + t.sg_flags |= ODDP | EVENP | RAW; + return 0; + } + return 1; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_flag__isoc99_source=no +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_serial=sgtty +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_api_serial=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + fi + if test $tcl_cv_api_serial = no ; then + if test "$cross_compiling" = yes; then + tcl_cv_api_serial=no else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _ISOC99_SOURCE 1 -#include -int -main () -{ -char *p = (char *)strtoll; char *q = (char *)strtoull; - ; - return 0; + +#include +#include + +int main() { + struct termios t; + if (tcgetattr(0, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + cfsetospeed(&t, 0); + t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_flag__isoc99_source=yes +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_serial=termios else - tcl_cv_flag__isoc99_source=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_api_serial=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi + if test $tcl_cv_api_serial = no; then + if test "$cross_compiling" = yes; then + tcl_cv_api_serial=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then +#include +#include -$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h +int main() { + struct termio t; + if (ioctl(0, TCGETA, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; + return 0; + } + return 1; + } +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_serial=termio +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - tcl_flags="$tcl_flags _ISOC99_SOURCE" +( exit $ac_status ) +tcl_cv_api_serial=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi fi - - - if test "${tcl_cv_flag__largefile64_source+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test $tcl_cv_api_serial = no; then + if test "$cross_compiling" = yes; then + tcl_cv_api_serial=none else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct stat64 buf; int i = stat64("/", &buf); - ; - return 0; -} + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_flag__largefile64_source=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _LARGEFILE64_SOURCE 1 -#include -int -main () -{ -struct stat64 buf; int i = stat64("/", &buf); - ; - return 0; + +#include +#include + +int main() { + struct sgttyb t; + if (ioctl(0, TIOCGETP, &t) == 0 + || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { + t.sg_ospeed = 0; + t.sg_flags |= ODDP | EVENP | RAW; + return 0; + } + return 1; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_flag__largefile64_source=yes +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_api_serial=sgtty else - tcl_cv_flag__largefile64_source=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_api_serial=none fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi fi +echo "$as_me:$LINENO: result: $tcl_cv_api_serial" >&5 +echo "${ECHO_T}$tcl_cv_api_serial" >&6 + case $tcl_cv_api_serial in + termios) +cat >>confdefs.h <<\_ACEOF +#define USE_TERMIOS 1 +_ACEOF +;; + termio) +cat >>confdefs.h <<\_ACEOF +#define USE_TERMIO 1 +_ACEOF +;; + sgtty) +cat >>confdefs.h <<\_ACEOF +#define USE_SGTTY 1 +_ACEOF +;; + esac - if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then - -$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h - - tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" - fi +#-------------------------------------------------------------------- +# Include sys/select.h if it exists and if it supplies things +# that appear to be useful and aren't already in sys/types.h. +# This appears to be true only on the RS/6000 under AIX. Some +# systems like OSF/1 have a sys/select.h that's of no use, and +# other systems like SCO UNIX have a sys/select.h that's +# pernicious. If "fd_set" isn't defined anywhere then set a +# special flag. +#-------------------------------------------------------------------- - if test "${tcl_cv_flag__largefile_source64+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5 +echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6 +if test "${tcl_cv_type_fd_set+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *)open64; - ; - return 0; -} + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_flag__largefile_source64=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _LARGEFILE_SOURCE64 1 -#include +#include int main () { -char *p = (char *)open64; +fd_set readMask, writeMask; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_flag__largefile_source64=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_type_fd_set=yes else - tcl_cv_flag__largefile_source64=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_type_fd_set=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - - if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then - -$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h - - tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" - fi - - if test "x${tcl_flags}" = "x" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5 -$as_echo "${tcl_flags}" >&6; } - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 -$as_echo_n "checking for 64-bit integer type... " >&6; } - if test "${tcl_cv_type_64bit+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5 +echo "${ECHO_T}$tcl_cv_type_fd_set" >&6 +tcl_ok=$tcl_cv_type_fd_set +if test $tcl_ok = no; then + echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5 +echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6 +if test "${tcl_cv_grep_fd_mask+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - tcl_cv_type_64bit=none - # See if the compiler knows natively about __int64 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include -int -main () -{ -__int64 value = (__int64) 0; - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_type_64bit=__int64 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "fd_mask" >/dev/null 2>&1; then + tcl_cv_grep_fd_mask=present else - tcl_type_64bit="long long" + tcl_cv_grep_fd_mask=missing fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - # See if we should use long anyway Note that we substitute in the - # type that is our current guess for a 64-bit type inside this check - # program, so it should be modified only carefully... - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +rm -f conftest* -int -main () -{ -switch (0) { - case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; - } - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_type_64bit=${tcl_type_64bit} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5 +echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6 + if test $tcl_cv_grep_fd_mask = present; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_SELECT_H 1 +_ACEOF + + tcl_ok=yes + fi fi +if test $tcl_ok = no; then - if test "${tcl_cv_type_64bit}" = none ; then +cat >>confdefs.h <<\_ACEOF +#define NO_FD_SET 1 +_ACEOF -$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5 -$as_echo "using long" >&6; } - else +#------------------------------------------------------------------------------ +# Find out all about time handling differences. +#------------------------------------------------------------------------------ -cat >>confdefs.h <<_ACEOF -#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} -_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5 -$as_echo "${tcl_cv_type_64bit}" >&6; } - # Now check for auxiliary declarations - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 -$as_echo_n "checking for struct dirent64... " >&6; } -if test "${tcl_cv_struct_dirent64+set}" = set; then : - $as_echo_n "(cached) " >&6 +for ac_header in sys/time.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -int -main () -{ -struct dirent64 p; - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_struct_dirent64=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - tcl_cv_struct_dirent64=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5 -$as_echo "$tcl_cv_struct_dirent64" >&6; } - if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then - -$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 -$as_echo_n "checking for struct stat64... " >&6; } -if test "${tcl_cv_struct_stat64+set}" = set; then : - $as_echo_n "(cached) " >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct stat64 p; + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_struct_stat64=yes +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - tcl_cv_struct_stat64=no + eval "$as_ac_Header=\$ac_header_preproc" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 -$as_echo "$tcl_cv_struct_stat64" >&6; } - if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - -$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h - - fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - for ac_func in open64 lseek64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi + done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 -$as_echo_n "checking for off64_t... " >&6; } - if test "${tcl_cv_type_off64_t+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include +#include + int main () { -off64_t offset; - +if ((struct tm *) 0) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_type_off64_t=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes else - tcl_cv_type_off64_t=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_time=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then - if test "x${tcl_cv_type_off64_t}" = "xyes" && \ - test "x${ac_cv_func_lseek64}" = "xyes" && \ - test "x${ac_cv_func_open64}" = "xyes" ; then +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF -$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi -#-------------------------------------------------------------------- -# Check endianness because we can optimize comparisons of -# Tcl_UniChar strings to memcmp on big-endian systems. -#-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +for ac_func in gmtime_r localtime_r mktime +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - #include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -int -main () -{ -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - ; - return 0; +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus } -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include +#endif int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_cv_c_bigendian=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif +fi +done - ; - return 0; -} + + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 +echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 +if test "${tcl_cv_member_tm_tzadj+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +#include int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif - +struct tm tm; tm.tm_tzadj; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_member_tm_tzadj=yes else - ac_cv_c_bigendian=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_member_tm_tzadj=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 + if test $tcl_cv_member_tm_tzadj = yes ; then -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_TZADJ 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 +if test "${tcl_cv_member_tm_gmtoff+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include int main () { - - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; - +struct tm tm; tm.tm_gmtoff; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_member_tm_gmtoff=yes else - ac_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi +tcl_cv_member_tm_gmtoff=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) - -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - - ;; #( - *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac - - -#-------------------------------------------------------------------- -# Supply substitutes for missing POSIX library procedures, or -# set flags so Tcl uses alternate procedures. -#-------------------------------------------------------------------- - -# Check if Posix compliant getcwd exists, if not we'll use getwd. -for ac_func in getcwd -do : - ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" -if test "x$ac_cv_func_getcwd" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETCWD 1 -_ACEOF - -else - -$as_echo "#define USEGETWD 1" >>confdefs.h - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -done - -# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really -# define USEGETWD even if the posix getcwd exists. Add a test ? +echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 +echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 + if test $tcl_cv_member_tm_gmtoff = yes ; then -for ac_func in mkstemp opendir strtol waitpid -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_GMTOFF 1 _ACEOF -else - case " $LIBOBJS " in - *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" - ;; -esac - -fi -done - - -ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" -if test "x$ac_cv_func_strerror" = x""yes; then : - -else - -$as_echo "#define NO_STRERROR 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd" -if test "x$ac_cv_func_getwd" = x""yes; then : - -else - -$as_echo "#define NO_GETWD 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" -if test "x$ac_cv_func_wait3" = x""yes; then : + fi + # + # Its important to include time.h in this check, as some systems + # (like convex) have timezone functions, etc. + # + echo "$as_me:$LINENO: checking long timezone variable" >&5 +echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 +if test "${tcl_cv_timezone_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else -$as_echo "#define NO_WAIT3 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" -if test "x$ac_cv_func_uname" = x""yes; then : - + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +extern long timezone; + timezone += 1; + exit (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_timezone_long=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define NO_UNAME 1" >>confdefs.h - -fi - - -if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ - test "`uname -r | awk -F. '{print $1}'`" -lt 7; then - # prior to Darwin 7, realpath is not threadsafe, so don't - # use it when threads are enabled, c.f. bug # 711232 - ac_cv_func_realpath=no +tcl_cv_timezone_long=no fi -ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" -if test "x$ac_cv_func_realpath" = x""yes; then : - -else - -$as_echo "#define NO_REALPATH 1" >>confdefs.h - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 +echo "${ECHO_T}$tcl_cv_timezone_long" >&6 + if test $tcl_cv_timezone_long = yes ; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_TIMEZONE_VAR 1 +_ACEOF -ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = x""yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getaddrinfo" >&5 -$as_echo_n "checking for working getaddrinfo... " >&6; } -if test "${tcl_cv_api_getaddrinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 + else + # + # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. + # + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 +echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 +if test "${tcl_cv_timezone_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - +#include int main () { - - const char *name, *port; - struct addrinfo *aiPtr, hints; - (void)getaddrinfo(name,port, &hints, &aiPtr); - (void)freeaddrinfo(aiPtr); - +extern time_t timezone; + timezone += 1; + exit (0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getaddrinfo=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_timezone_time=yes else - tcl_cv_getaddrinfo=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_timezone_time=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getaddrinfo" >&5 -$as_echo "$tcl_cv_api_getaddrinfo" >&6; } - tcl_ok=$tcl_cv_api_getaddrinfo - if test "$tcl_ok" = yes; then +echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 +echo "${ECHO_T}$tcl_cv_timezone_time" >&6 + if test $tcl_cv_timezone_time = yes ; then -$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_TIMEZONE_VAR 1 +_ACEOF + fi fi -fi - #-------------------------------------------------------------------- -# Look for thread-safe variants of some library functions. +# Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But +# we might be able to use fstatfs instead. Some systems (OpenBSD?) also +# lack blkcnt_t. #-------------------------------------------------------------------- -if test "${TCL_THREADS}" = 1; then - ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r" -if test "x$ac_cv_func_getpwuid_r" = x""yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwuid_r with 5 args" >&5 -$as_echo_n "checking for getpwuid_r with 5 args... " >&6; } -if test "${tcl_cv_api_getpwuid_r_5+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 +if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - #include - +$ac_includes_default int main () { - - uid_t uid; - struct passwd pw, *pwp; - char buf[512]; - int buflen = 512; - - (void) getpwuid_r(uid, &pw, buf, buflen, &pwp); - +static struct stat ac_aggr; +if (ac_aggr.st_blocks) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getpwuid_r_5=yes -else - tcl_cv_api_getpwuid_r_5=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwuid_r_5" >&5 -$as_echo "$tcl_cv_api_getpwuid_r_5" >&6; } - tcl_ok=$tcl_cv_api_getpwuid_r_5 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETPWUID_R_5 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwuid_r with 4 args" >&5 -$as_echo_n "checking for getpwuid_r with 4 args... " >&6; } -if test "${tcl_cv_api_getpwuid_r_4+set}" = set; then : - $as_echo_n "(cached) " >&6 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_blocks=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - #include - +$ac_includes_default int main () { - - uid_t uid; - struct passwd pw; - char buf[512]; - int buflen = 512; - - (void)getpwnam_r(uid, &pw, buf, buflen); - +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blocks) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getpwuid_r_4=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_blocks=yes else - tcl_cv_api_getpwuid_r_4=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_stat_st_blocks=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwuid_r_4" >&5 -$as_echo "$tcl_cv_api_getpwuid_r_4" >&6; } - tcl_ok=$tcl_cv_api_getpwuid_r_4 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETPWUID_R_4 1" >>confdefs.h - - fi - fi - if test "$tcl_ok" = yes; then +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 +if test $ac_cv_member_struct_stat_st_blocks = yes; then -$as_echo "#define HAVE_GETPWUID_R 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF - fi fi - - ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r" -if test "x$ac_cv_func_getpwnam_r" = x""yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam_r with 5 args" >&5 -$as_echo_n "checking for getpwnam_r with 5 args... " >&6; } -if test "${tcl_cv_api_getpwnam_r_5+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - #include - +$ac_includes_default int main () { - - char *name; - struct passwd pw, *pwp; - char buf[512]; - int buflen = 512; - - (void) getpwnam_r(name, &pw, buf, buflen, &pwp); - +static struct stat ac_aggr; +if (ac_aggr.st_blksize) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getpwnam_r_5=yes -else - tcl_cv_api_getpwnam_r_5=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwnam_r_5" >&5 -$as_echo "$tcl_cv_api_getpwnam_r_5" >&6; } - tcl_ok=$tcl_cv_api_getpwnam_r_5 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETPWNAM_R_5 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam_r with 4 args" >&5 -$as_echo_n "checking for getpwnam_r with 4 args... " >&6; } -if test "${tcl_cv_api_getpwnam_r_4+set}" = set; then : - $as_echo_n "(cached) " >&6 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_blksize=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - #include - +$ac_includes_default int main () { - - char *name; - struct passwd pw; - char buf[512]; - int buflen = 512; - - (void)getpwnam_r(name, &pw, buf, buflen); - +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blksize) +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getpwnam_r_4=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_blksize=yes else - tcl_cv_api_getpwnam_r_4=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_member_struct_stat_st_blksize=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getpwnam_r_4" >&5 -$as_echo "$tcl_cv_api_getpwnam_r_4" >&6; } - tcl_ok=$tcl_cv_api_getpwnam_r_4 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETPWNAM_R_4 1" >>confdefs.h - - fi - fi - if test "$tcl_ok" = yes; then +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +if test $ac_cv_member_struct_stat_st_blksize = yes; then -$as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF - fi fi - ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r" -if test "x$ac_cv_func_getgrgid_r" = x""yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrgid_r with 5 args" >&5 -$as_echo_n "checking for getgrgid_r with 5 args... " >&6; } -if test "${tcl_cv_api_getgrgid_r_5+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for blkcnt_t" >&5 +echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6 +if test "${ac_cv_type_blkcnt_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - #include - +$ac_includes_default int main () { - - gid_t gid; - struct group gr, *grp; - char buf[512]; - int buflen = 512; - - (void) getgrgid_r(gid, &gr, buf, buflen, &grp); - +if ((blkcnt_t *) 0) + return 0; +if (sizeof (blkcnt_t)) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getgrgid_r_5=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_blkcnt_t=yes else - tcl_cv_api_getgrgid_r_5=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_blkcnt_t=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrgid_r_5" >&5 -$as_echo "$tcl_cv_api_getgrgid_r_5" >&6; } - tcl_ok=$tcl_cv_api_getgrgid_r_5 - if test "$tcl_ok" = yes; then +echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 +echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6 +if test $ac_cv_type_blkcnt_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_BLKCNT_T 1 +_ACEOF -$as_echo "#define HAVE_GETGRGID_R_5 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrgid_r with 4 args" >&5 -$as_echo_n "checking for getgrgid_r with 4 args... " >&6; } -if test "${tcl_cv_api_getgrgid_r_4+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for fstatfs" >&5 +echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 +if test "${ac_cv_func_fstatfs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define fstatfs to an innocuous variant, in case declares fstatfs. + For example, HP-UX 11i declares gettimeofday. */ +#define fstatfs innocuous_fstatfs - #include - #include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fstatfs (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int -main () -{ +#ifdef __STDC__ +# include +#else +# include +#endif - gid_t gid; - struct group gr; - char buf[512]; - int buflen = 512; +#undef fstatfs - (void)getgrgid_r(gid, &gr, buf, buflen); +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char fstatfs (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_fstatfs) || defined (__stub___fstatfs) +choke me +#else +char (*f) () = fstatfs; +#endif +#ifdef __cplusplus +} +#endif +int +main () +{ +return f != fstatfs; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getgrgid_r_4=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_fstatfs=yes else - tcl_cv_api_getgrgid_r_4=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_fstatfs=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrgid_r_4" >&5 -$as_echo "$tcl_cv_api_getgrgid_r_4" >&6; } - tcl_ok=$tcl_cv_api_getgrgid_r_4 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETGRGID_R_4 1" >>confdefs.h - - fi - fi - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETGRGID_R 1" >>confdefs.h +echo "$as_me:$LINENO: result: $ac_cv_func_fstatfs" >&5 +echo "${ECHO_T}$ac_cv_func_fstatfs" >&6 +if test $ac_cv_func_fstatfs = yes; then + : +else - fi +cat >>confdefs.h <<\_ACEOF +#define NO_FSTATFS 1 +_ACEOF fi - ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r" -if test "x$ac_cv_func_getgrnam_r" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrnam_r with 5 args" >&5 -$as_echo_n "checking for getgrnam_r with 5 args... " >&6; } -if test "${tcl_cv_api_getgrnam_r_5+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +#-------------------------------------------------------------------- +# Some system have no memcmp or it does not work with 8 bit data, this +# checks it and add memcmp.o to LIBOBJS if needed +#-------------------------------------------------------------------- - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +if test "${ac_cv_func_memcmp_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_working=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - #include - +$ac_includes_default int main () { - char *name; - struct group gr, *grp; - char buf[512]; - int buflen = 512; + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = 0x40, c1 = 0x80, c2 = 0x81; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + exit (1); - (void) getgrnam_r(name, &gr, buf, buflen, &grp); + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + exit (1); + } + exit (0); + } ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getgrnam_r_5=yes +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_memcmp_working=yes else - tcl_cv_api_getgrnam_r_5=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_memcmp_working=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrnam_r_5" >&5 -$as_echo "$tcl_cv_api_getgrnam_r_5" >&6; } - tcl_ok=$tcl_cv_api_getgrnam_r_5 - if test "$tcl_ok" = yes; then +fi +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && case $LIBOBJS in + "memcmp.$ac_objext" | \ + *" memcmp.$ac_objext" | \ + "memcmp.$ac_objext "* | \ + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; +esac -$as_echo "#define HAVE_GETGRNAM_R_5 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgrnam_r with 4 args" >&5 -$as_echo_n "checking for getgrnam_r with 4 args... " >&6; } -if test "${tcl_cv_api_getgrnam_r_4+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +#-------------------------------------------------------------------- +# Some system like SunOS 4 and other BSD like systems have no memmove +# (we assume they have bcopy instead). {The replacement define is in +# compat/string.h} +#-------------------------------------------------------------------- + +echo "$as_me:$LINENO: checking for memmove" >&5 +echo $ECHO_N "checking for memmove... $ECHO_C" >&6 +if test "${ac_cv_func_memmove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define memmove to an innocuous variant, in case declares memmove. + For example, HP-UX 11i declares gettimeofday. */ +#define memmove innocuous_memmove - #include - #include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char memmove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int -main () -{ +#ifdef __STDC__ +# include +#else +# include +#endif - char *name; - struct group gr; - char buf[512]; - int buflen = 512; +#undef memmove - (void)getgrnam_r(name, &gr, buf, buflen); +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char memmove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_memmove) || defined (__stub___memmove) +choke me +#else +char (*f) () = memmove; +#endif +#ifdef __cplusplus +} +#endif +int +main () +{ +return f != memmove; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_getgrnam_r_4=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_memmove=yes else - tcl_cv_api_getgrnam_r_4=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_memmove=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_getgrnam_r_4" >&5 -$as_echo "$tcl_cv_api_getgrnam_r_4" >&6; } - tcl_ok=$tcl_cv_api_getgrnam_r_4 - if test "$tcl_ok" = yes; then +echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5 +echo "${ECHO_T}$ac_cv_func_memmove" >&6 +if test $ac_cv_func_memmove = yes; then + : +else -$as_echo "#define HAVE_GETGRNAM_R_4 1" >>confdefs.h - fi - fi - if test "$tcl_ok" = yes; then +cat >>confdefs.h <<\_ACEOF +#define NO_MEMMOVE 1 +_ACEOF -$as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h - fi +cat >>confdefs.h <<\_ACEOF +#define NO_STRING_H 1 +_ACEOF fi - if test "`uname -s`" = "Darwin" && \ - test "`uname -r | awk -F. '{print $1}'`" -gt 5; then - # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX - # are actually MT-safe as they always return pointers - # from TSD instead of static storage. - -$as_echo "#define HAVE_MTSAFE_GETHOSTBYNAME 1" >>confdefs.h - - -$as_echo "#define HAVE_MTSAFE_GETHOSTBYADDR 1" >>confdefs.h - - - elif test "`uname -s`" = "HP-UX" && \ - test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then - # Starting with HPUX 11.00 (we believe), gethostbyX - # are actually MT-safe as they always return pointers - # from TSD instead of static storage. - -$as_echo "#define HAVE_MTSAFE_GETHOSTBYNAME 1" >>confdefs.h +#-------------------------------------------------------------------- +# On some systems strstr is broken: it returns a pointer even even if +# the original string is empty. +#-------------------------------------------------------------------- -$as_echo "#define HAVE_MTSAFE_GETHOSTBYADDR 1" >>confdefs.h + echo "$as_me:$LINENO: checking for strstr" >&5 +echo $ECHO_N "checking for strstr... $ECHO_C" >&6 +if test "${ac_cv_func_strstr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strstr to an innocuous variant, in case declares strstr. + For example, HP-UX 11i declares gettimeofday. */ +#define strstr innocuous_strstr - else - ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" -if test "x$ac_cv_func_gethostbyname_r" = x""yes; then : +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strstr (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 6 args" >&5 -$as_echo_n "checking for gethostbyname_r with 6 args... " >&6; } -if test "${tcl_cv_api_gethostbyname_r_6+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +#ifdef __STDC__ +# include +#else +# include +#endif - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef strstr - #include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strstr (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strstr) || defined (__stub___strstr) +choke me +#else +char (*f) () = strstr; +#endif +#ifdef __cplusplus +} +#endif int main () { - - char *name; - struct hostent *he, *res; - char buffer[2048]; - int buflen = 2048; - int h_errnop; - - (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); - +return f != strstr; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_gethostbyname_r_6=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strstr=yes else - tcl_cv_api_gethostbyname_r_6=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_strstr=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_6" >&5 -$as_echo "$tcl_cv_api_gethostbyname_r_6" >&6; } - tcl_ok=$tcl_cv_api_gethostbyname_r_6 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 5 args" >&5 -$as_echo_n "checking for gethostbyname_r with 5 args... " >&6; } -if test "${tcl_cv_api_gethostbyname_r_5+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_func_strstr" >&5 +echo "${ECHO_T}$ac_cv_func_strstr" >&6 +if test $ac_cv_func_strstr = yes; then + tcl_ok=1 else + tcl_ok=0 +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$tcl_ok" = 1; then + echo "$as_me:$LINENO: checking proper strstr implementation" >&5 +echo $ECHO_N "checking proper strstr implementation... $ECHO_C" >&6 +if test "${tcl_cv_strstr_unbroken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + tcl_cv_strstr_unbroken=unknown +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - -int -main () -{ - - char *name; - struct hostent *he; - char buffer[2048]; - int buflen = 2048; - int h_errnop; - - (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); - - ; - return 0; +int main() { + extern int strstr(); + exit(strstr("\0test", "test") ? 1 : 0); } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_gethostbyname_r_5=yes +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_strstr_unbroken=ok else - tcl_cv_api_gethostbyname_r_5=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_strstr_unbroken=broken fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_5" >&5 -$as_echo "$tcl_cv_api_gethostbyname_r_5" >&6; } - tcl_ok=$tcl_cv_api_gethostbyname_r_5 - if test "$tcl_ok" = yes; then +fi +echo "$as_me:$LINENO: result: $tcl_cv_strstr_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strstr_unbroken" >&6 + if test "$tcl_cv_strstr_unbroken" = "ok"; then + tcl_ok=1 + else + tcl_ok=0 + fi + fi + if test "$tcl_ok" = 0; then + case $LIBOBJS in + "strstr.$ac_objext" | \ + *" strstr.$ac_objext" | \ + "strstr.$ac_objext "* | \ + *" strstr.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;; +esac + + USE_COMPAT=1 + fi -$as_echo "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 3 args" >&5 -$as_echo_n "checking for gethostbyname_r with 3 args... " >&6; } -if test "${tcl_cv_api_gethostbyname_r_3+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +#-------------------------------------------------------------------- +# Check for strtoul function. This is tricky because under some +# versions of AIX strtoul returns an incorrect terminator +# pointer for the string "0". +#-------------------------------------------------------------------- + - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for strtoul" >&5 +echo $ECHO_N "checking for strtoul... $ECHO_C" >&6 +if test "${ac_cv_func_strtoul+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define strtoul to an innocuous variant, in case declares strtoul. + For example, HP-UX 11i declares gettimeofday. */ +#define strtoul innocuous_strtoul - #include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strtoul (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strtoul + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strtoul (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strtoul) || defined (__stub___strtoul) +choke me +#else +char (*f) () = strtoul; +#endif +#ifdef __cplusplus +} +#endif int main () { +return f != strtoul; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strtoul=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - char *name; - struct hostent *he; - struct hostent_data data; - - (void) gethostbyname_r(name, he, &data); +ac_cv_func_strtoul=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strtoul" >&5 +echo "${ECHO_T}$ac_cv_func_strtoul" >&6 +if test $ac_cv_func_strtoul = yes; then + tcl_ok=1 +else + tcl_ok=0 +fi - ; - return 0; + if test "$tcl_ok" = 1; then + echo "$as_me:$LINENO: checking proper strtoul implementation" >&5 +echo $ECHO_N "checking proper strtoul implementation... $ECHO_C" >&6 +if test "${tcl_cv_strtoul_unbroken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + tcl_cv_strtoul_unbroken=unknown +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int main() { + extern int strtoul(); + char *term, *string = "0"; + exit(strtoul(string,&term,0) != 0 || term != string+1); } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_gethostbyname_r_3=yes +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_strtoul_unbroken=ok else - tcl_cv_api_gethostbyname_r_3=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_strtoul_unbroken=broken fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyname_r_3" >&5 -$as_echo "$tcl_cv_api_gethostbyname_r_3" >&6; } - tcl_ok=$tcl_cv_api_gethostbyname_r_3 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETHOSTBYNAME_R_3 1" >>confdefs.h - - fi +fi +echo "$as_me:$LINENO: result: $tcl_cv_strtoul_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtoul_unbroken" >&6 + if test "$tcl_cv_strtoul_unbroken" = "ok"; then + tcl_ok=1 + else + tcl_ok=0 fi fi - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + if test "$tcl_ok" = 0; then + case $LIBOBJS in + "strtoul.$ac_objext" | \ + *" strtoul.$ac_objext" | \ + "strtoul.$ac_objext "* | \ + *" strtoul.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" ;; +esac + USE_COMPAT=1 fi -fi - ac_fn_c_check_func "$LINENO" "gethostbyaddr_r" "ac_cv_func_gethostbyaddr_r" -if test "x$ac_cv_func_gethostbyaddr_r" = x""yes; then : +#-------------------------------------------------------------------- +# Check for the strtod function. This is tricky because in some +# versions of Linux strtod mis-parses strings starting with "+". +#-------------------------------------------------------------------- + - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r with 7 args" >&5 -$as_echo_n "checking for gethostbyaddr_r with 7 args... " >&6; } -if test "${tcl_cv_api_gethostbyaddr_r_7+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 +if test "${ac_cv_func_strtod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define strtod to an innocuous variant, in case declares strtod. + For example, HP-UX 11i declares gettimeofday. */ +#define strtod innocuous_strtod - #include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strtod (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int -main () -{ +#ifdef __STDC__ +# include +#else +# include +#endif - char *addr; - int length; - int type; - struct hostent *result; - char buffer[2048]; - int buflen = 2048; - int h_errnop; +#undef strtod - (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, - &h_errnop); +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strtod (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strtod) || defined (__stub___strtod) +choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} +#endif +int +main () +{ +return f != strtod; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_gethostbyaddr_r_7=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strtod=yes else - tcl_cv_api_gethostbyaddr_r_7=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_strtod=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyaddr_r_7" >&5 -$as_echo "$tcl_cv_api_gethostbyaddr_r_7" >&6; } - tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETHOSTBYADDR_R_7 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r with 8 args" >&5 -$as_echo_n "checking for gethostbyaddr_r with 8 args... " >&6; } -if test "${tcl_cv_api_gethostbyaddr_r_8+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 +if test $ac_cv_func_strtod = yes; then + tcl_ok=1 else + tcl_ok=0 +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$tcl_ok" = 1; then + echo "$as_me:$LINENO: checking proper strtod implementation" >&5 +echo $ECHO_N "checking proper strtod implementation... $ECHO_C" >&6 +if test "${tcl_cv_strtod_unbroken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + tcl_cv_strtod_unbroken=unknown +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #include - -int -main () -{ - - char *addr; - int length; - int type; - struct hostent *result, *resultp; - char buffer[2048]; - int buflen = 2048; - int h_errnop; - - (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, - &resultp, &h_errnop); - - ; - return 0; +int main() { + extern double strtod(); + char *term, *string = " +69"; + exit(strtod(string,&term) != 69 || term != string+4); } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_api_gethostbyaddr_r_8=yes +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_strtod_unbroken=ok else - tcl_cv_api_gethostbyaddr_r_8=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_strtod_unbroken=broken fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_gethostbyaddr_r_8" >&5 -$as_echo "$tcl_cv_api_gethostbyaddr_r_8" >&6; } - tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETHOSTBYADDR_R_8 1" >>confdefs.h - +fi +echo "$as_me:$LINENO: result: $tcl_cv_strtod_unbroken" >&5 +echo "${ECHO_T}$tcl_cv_strtod_unbroken" >&6 + if test "$tcl_cv_strtod_unbroken" = "ok"; then + tcl_ok=1 + else + tcl_ok=0 fi fi - if test "$tcl_ok" = yes; then - -$as_echo "#define HAVE_GETHOSTBYADDR_R 1" >>confdefs.h + if test "$tcl_ok" = 0; then + case $LIBOBJS in + "strtod.$ac_objext" | \ + *" strtod.$ac_objext" | \ + "strtod.$ac_objext "* | \ + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; +esac + USE_COMPAT=1 fi -fi - - fi -fi -#--------------------------------------------------------------------------- -# Determine which interface to use to talk to the serial port. -# Note that #include lines must begin in leftmost column for -# some compilers to recognize them as preprocessor directives. -#--------------------------------------------------------------------------- +#-------------------------------------------------------------------- +# Under Solaris 2.4, strtod returns the wrong value for the +# terminating character under some conditions. Check for this +# and if the problem exists use a substitute procedure +# "fixstrtod" that corrects the error. +#-------------------------------------------------------------------- - for ac_header in sys/modem.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_modem_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_MODEM_H 1 + echo "$as_me:$LINENO: checking for strtod" >&5 +echo $ECHO_N "checking for strtod... $ECHO_C" >&6 +if test "${ac_cv_func_strtod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strtod to an innocuous variant, in case declares strtod. + For example, HP-UX 11i declares gettimeofday. */ +#define strtod innocuous_strtod -fi - -done +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strtod (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking termios vs. termio vs. sgtty" >&5 -$as_echo_n "checking termios vs. termio vs. sgtty... " >&6; } -if test "${tcl_cv_api_serial+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +#ifdef __STDC__ +# include +#else +# include +#endif - if test "$cross_compiling" = yes; then : - tcl_cv_api_serial=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef strtod -#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strtod (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strtod) || defined (__stub___strtod) +choke me +#else +char (*f) () = strtod; +#endif +#ifdef __cplusplus +} +#endif -int main() { - struct termios t; - if (tcgetattr(0, &t) == 0) { - cfsetospeed(&t, 0); - t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; +int +main () +{ +return f != strtod; + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_api_serial=termios +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strtod=yes else - tcl_cv_api_serial=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_strtod=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6 +if test $ac_cv_func_strtod = yes; then + tcl_strtod=1 +else + tcl_strtod=0 fi - if test $tcl_cv_api_serial = no ; then - if test "$cross_compiling" = yes; then : - tcl_cv_api_serial=no + if test "$tcl_strtod" = 1; then + echo "$as_me:$LINENO: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo $ECHO_N "checking for Solaris2.4/Tru64 strtod bugs... $ECHO_C" >&6 +if test "${tcl_cv_strtod_buggy+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + if test "$cross_compiling" = yes; then + tcl_cv_strtod_buggy=buggy +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { - struct termio t; - if (ioctl(0, TCGETA, &t) == 0) { - t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; -} + extern double strtod(); + int main() { + char *infString="Inf", *nanString="NaN", *spaceString=" "; + char *term; + double value; + value = strtod(infString, &term); + if ((term != infString) && (term[-1] == 0)) { + exit(1); + } + value = strtod(nanString, &term); + if ((term != nanString) && (term[-1] == 0)) { + exit(1); + } + value = strtod(spaceString, &term); + if (term == (spaceString+1)) { + exit(1); + } + exit(0); + } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_api_serial=termio +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_strtod_buggy=ok else - tcl_cv_api_serial=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_strtod_buggy=buggy fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +fi +echo "$as_me:$LINENO: result: $tcl_cv_strtod_buggy" >&5 +echo "${ECHO_T}$tcl_cv_strtod_buggy" >&6 + if test "$tcl_cv_strtod_buggy" = buggy; then + case $LIBOBJS in + "fixstrtod.$ac_objext" | \ + *" fixstrtod.$ac_objext" | \ + "fixstrtod.$ac_objext "* | \ + *" fixstrtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" ;; +esac - fi - if test $tcl_cv_api_serial = no ; then - if test "$cross_compiling" = yes; then : - tcl_cv_api_serial=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include + USE_COMPAT=1 -int main() { - struct sgttyb t; - if (ioctl(0, TIOCGETP, &t) == 0) { - t.sg_ospeed = 0; - t.sg_flags |= ODDP | EVENP | RAW; - return 0; - } - return 1; -} +cat >>confdefs.h <<\_ACEOF +#define strtod fixstrtod _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_api_serial=sgtty -else - tcl_cv_api_serial=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + fi fi - if test $tcl_cv_api_serial = no ; then - if test "$cross_compiling" = yes; then : - tcl_cv_api_serial=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int main() { - struct termios t; - if (tcgetattr(0, &t) == 0 - || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { - cfsetospeed(&t, 0); - t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; +#-------------------------------------------------------------------- +# Check for various typedefs and provide substitutes if +# they don't exist. +#-------------------------------------------------------------------- + +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +if test "${ac_cv_type_mode_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((mode_t *) 0) + return 0; +if (sizeof (mode_t)) + return 0; + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_api_serial=termios +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_mode_t=yes else - tcl_cv_api_serial=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_mode_t=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - - fi - if test $tcl_cv_api_serial = no; then - if test "$cross_compiling" = yes; then : - tcl_cv_api_serial=no +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +if test $ac_cv_type_mode_t = yes; then + : else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int main() { - struct termio t; - if (ioctl(0, TCGETA, &t) == 0 - || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { - t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; - return 0; - } - return 1; - } +cat >>confdefs.h <<_ACEOF +#define mode_t int _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_api_serial=termio -else - tcl_cv_api_serial=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + fi - fi - if test $tcl_cv_api_serial = no; then - if test "$cross_compiling" = yes; then : - tcl_cv_api_serial=none +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include -#include - -int main() { - struct sgttyb t; - if (ioctl(0, TIOCGETP, &t) == 0 - || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { - t.sg_ospeed = 0; - t.sg_flags |= ODDP | EVENP | RAW; - return 0; - } - return 1; +$ac_includes_default +int +main () +{ +if ((pid_t *) 0) + return 0; +if (sizeof (pid_t)) + return 0; + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_api_serial=sgtty +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_pid_t=yes else - tcl_cv_api_serial=none -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi +ac_cv_type_pid_t=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_serial" >&5 -$as_echo "$tcl_cv_api_serial" >&6; } - case $tcl_cv_api_serial in - termios) -$as_echo "#define USE_TERMIOS 1" >>confdefs.h -;; - termio) -$as_echo "#define USE_TERMIO 1" >>confdefs.h -;; - sgtty) -$as_echo "#define USE_SGTTY 1" >>confdefs.h -;; - esac +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF -#-------------------------------------------------------------------- -# Include sys/select.h if it exists and if it supplies things -# that appear to be useful and aren't already in sys/types.h. -# This appears to be true only on the RS/6000 under AIX. Some -# systems like OSF/1 have a sys/select.h that's of no use, and -# other systems like SCO UNIX have a sys/select.h that's -# pernicious. If "fd_set" isn't defined anywhere then set a -# special flag. -#-------------------------------------------------------------------- +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_set in sys/types" >&5 -$as_echo_n "checking for fd_set in sys/types... " >&6; } -if test "${tcl_cv_type_fd_set+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -fd_set readMask, writeMask; +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_type_fd_set=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes else - tcl_cv_type_fd_set=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_type_fd_set" >&5 -$as_echo "$tcl_cv_type_fd_set" >&6; } -tcl_ok=$tcl_cv_type_fd_set -if test $tcl_ok = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_mask in sys/select" >&5 -$as_echo_n "checking for fd_mask in sys/select... " >&6; } -if test "${tcl_cv_grep_fd_mask+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +if test "${ac_cv_type_uid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "fd_mask" >/dev/null 2>&1; then : - tcl_cv_grep_fd_mask=present + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes else - tcl_cv_grep_fd_mask=missing + ac_cv_type_uid_t=no fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_grep_fd_mask" >&5 -$as_echo "$tcl_cv_grep_fd_mask" >&6; } - if test $tcl_cv_grep_fd_mask = present; then - -$as_echo "#define HAVE_SYS_SELECT_H 1" >>confdefs.h - - tcl_ok=yes - fi -fi -if test $tcl_ok = no; then - -$as_echo "#define NO_FD_SET 1" >>confdefs.h - -fi +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +if test $ac_cv_type_uid_t = no; then -#------------------------------------------------------------------------------ -# Find out all about time handling differences. -#------------------------------------------------------------------------------ +cat >>confdefs.h <<\_ACEOF +#define uid_t int +_ACEOF - for ac_header in sys/time.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TIME_H 1 +cat >>confdefs.h <<\_ACEOF +#define gid_t int _ACEOF fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +if test "${tcl_cv_type_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include + + #include + #include int main () { -if ((struct tm *) 0) -return 0; + + socklen_t foo; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_type_socklen_t=yes else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_type_socklen_t=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_type_socklen_t" >&5 +echo "${ECHO_T}$tcl_cv_type_socklen_t" >&6 +if test $tcl_cv_type_socklen_t = no; then - - for ac_func in gmtime_r localtime_r mktime -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define socklen_t int _ACEOF fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking tm_tzadj in struct tm" >&5 -$as_echo_n "checking tm_tzadj in struct tm... " >&6; } -if test "${tcl_cv_member_tm_tzadj+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for intptr_t" >&5 +echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6 +if test "${ac_cv_type_intptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -struct tm tm; tm.tm_tzadj; +if ((intptr_t *) 0) + return 0; +if (sizeof (intptr_t)) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_member_tm_tzadj=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_intptr_t=yes else - tcl_cv_member_tm_tzadj=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_intptr_t=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_member_tm_tzadj" >&5 -$as_echo "$tcl_cv_member_tm_tzadj" >&6; } - if test $tcl_cv_member_tm_tzadj = yes ; then +echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_intptr_t" >&6 +if test $ac_cv_type_intptr_t = yes; then -$as_echo "#define HAVE_TM_TZADJ 1" >>confdefs.h - fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_INTPTR_T 1 +_ACEOF + +else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking tm_gmtoff in struct tm" >&5 -$as_echo_n "checking tm_gmtoff in struct tm... " >&6; } -if test "${tcl_cv_member_tm_gmtoff+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5 +echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6 +if test "${tcl_cv_intptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + for tcl_cv_intptr_t in "int" "long" "long long" none; do + if test "$tcl_cv_intptr_t" != none; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -struct tm tm; tm.tm_gmtoff; +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))]; +test_array [0] = 0 + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_member_tm_gmtoff=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_ok=yes else - tcl_cv_member_tm_gmtoff=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + test "$tcl_ok" = yes && break; fi + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_member_tm_gmtoff" >&5 -$as_echo "$tcl_cv_member_tm_gmtoff" >&6; } - if test $tcl_cv_member_tm_gmtoff = yes ; then +echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5 +echo "${ECHO_T}$tcl_cv_intptr_t" >&6 + if test "$tcl_cv_intptr_t" != none; then -$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define intptr_t $tcl_cv_intptr_t +_ACEOF fi - # - # Its important to include time.h in this check, as some systems - # (like convex) have timezone functions, etc. - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking long timezone variable" >&5 -$as_echo_n "checking long timezone variable... " >&6; } -if test "${tcl_cv_timezone_long+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +if test "${ac_cv_type_uintptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -extern long timezone; - timezone += 1; - exit (0); +if ((uintptr_t *) 0) + return 0; +if (sizeof (uintptr_t)) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_timezone_long=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_uintptr_t=yes else - tcl_cv_timezone_long=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_uintptr_t=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_timezone_long" >&5 -$as_echo "$tcl_cv_timezone_long" >&6; } - if test $tcl_cv_timezone_long = yes ; then +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +if test $ac_cv_type_uintptr_t = yes; then -$as_echo "#define HAVE_TIMEZONE_VAR 1" >>confdefs.h - else - # - # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking time_t timezone variable" >&5 -$as_echo_n "checking time_t timezone variable... " >&6; } -if test "${tcl_cv_timezone_time+set}" = set; then : - $as_echo_n "(cached) " >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5 +echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6 +if test "${tcl_cv_uintptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \ + none; do + if test "$tcl_cv_uintptr_t" != none; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -extern time_t timezone; - timezone += 1; - exit (0); +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))]; +test_array [0] = 0 + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_timezone_time=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_ok=yes else - tcl_cv_timezone_time=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + test "$tcl_ok" = yes && break; fi + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_timezone_time" >&5 -$as_echo "$tcl_cv_timezone_time" >&6; } - if test $tcl_cv_timezone_time = yes ; then +echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5 +echo "${ECHO_T}$tcl_cv_uintptr_t" >&6 + if test "$tcl_cv_uintptr_t" != none; then -$as_echo "#define HAVE_TIMEZONE_VAR 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define uintptr_t $tcl_cv_uintptr_t +_ACEOF - fi fi +fi + #-------------------------------------------------------------------- -# Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But -# we might be able to use fstatfs instead. Some systems (OpenBSD?) also -# lack blkcnt_t. +# If a system doesn't have an opendir function (man, that's old!) +# then we have to supply a different version of dirent.h which +# is compatible with the substitute version of opendir that's +# provided. This version only works with V7-style directories. #-------------------------------------------------------------------- -ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +echo "$as_me:$LINENO: checking for opendir" >&5 +echo $ECHO_N "checking for opendir... $ECHO_C" >&6 +if test "${ac_cv_func_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define opendir to an innocuous variant, in case declares opendir. + For example, HP-UX 11i declares gettimeofday. */ +#define opendir innocuous_opendir +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char opendir (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -fi -ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 -_ACEOF - +#ifdef __STDC__ +# include +#else +# include +#endif -fi +#undef opendir -ac_fn_c_check_type "$LINENO" "blkcnt_t" "ac_cv_type_blkcnt_t" "$ac_includes_default" -if test "x$ac_cv_type_blkcnt_t" = x""yes; then : +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_opendir) || defined (__stub___opendir) +choke me +#else +char (*f) () = opendir; +#endif +#ifdef __cplusplus +} +#endif -cat >>confdefs.h <<_ACEOF -#define HAVE_BLKCNT_T 1 +int +main () +{ +return f != opendir; + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_opendir=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - +ac_cv_func_opendir=no fi - -ac_fn_c_check_func "$LINENO" "fstatfs" "ac_cv_func_fstatfs" -if test "x$ac_cv_func_fstatfs" = x""yes; then : - +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_opendir" >&5 +echo "${ECHO_T}$ac_cv_func_opendir" >&6 +if test $ac_cv_func_opendir = yes; then + : else -$as_echo "#define NO_FSTATFS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define USE_DIRENT2_H 1 +_ACEOF fi #-------------------------------------------------------------------- -# Some system have no memcmp or it does not work with 8 bit data, this -# checks it and add memcmp.o to LIBOBJS if needed +# The check below checks whether defines the type +# "union wait" correctly. It's needed because of weirdness in +# HP-UX where "union wait" is defined in both the BSD and SYS-V +# environments. Checking the usability of WIFEXITED seems to do +# the trick. #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 -$as_echo_n "checking for working memcmp... " >&6; } -if test "${ac_cv_func_memcmp_working+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_memcmp_working=no +echo "$as_me:$LINENO: checking union wait" >&5 +echo $ECHO_N "checking union wait... $ECHO_C" >&6 +if test "${tcl_cv_union_wait+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include +#include int main () { - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; - - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } +union wait x; +WIFEXITED(x); /* Generates compiler error if WIFEXITED + * uses an int. */ ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_memcmp_working=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_union_wait=yes else - ac_cv_func_memcmp_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +tcl_cv_union_wait=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 -$as_echo "$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5 +echo "${ECHO_T}$tcl_cv_union_wait" >&6 +if test $tcl_cv_union_wait = no; then +cat >>confdefs.h <<\_ACEOF +#define NO_UNION_WAIT 1 +_ACEOF +fi #-------------------------------------------------------------------- -# Some system like SunOS 4 and other BSD like systems have no memmove -# (we assume they have bcopy instead). {The replacement define is in -# compat/string.h} +# Check whether there is an strncasecmp function on this system. +# This is a bit tricky because under SCO it's in -lsocket and +# under Sequent Dynix it's in -linet. #-------------------------------------------------------------------- -ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" -if test "x$ac_cv_func_memmove" = x""yes; then : - +echo "$as_me:$LINENO: checking for strncasecmp" >&5 +echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6 +if test "${ac_cv_func_strncasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strncasecmp to an innocuous variant, in case declares strncasecmp. + For example, HP-UX 11i declares gettimeofday. */ +#define strncasecmp innocuous_strncasecmp +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strncasecmp (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -$as_echo "#define NO_MEMMOVE 1" >>confdefs.h - - -$as_echo "#define NO_STRING_H 1" >>confdefs.h - -fi - - -#-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even even if -# the original string is empty. -#-------------------------------------------------------------------- +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strncasecmp - ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" -if test "x$ac_cv_func_strstr" = x""yes; then : - tcl_ok=1 -else - tcl_ok=0 -fi +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strncasecmp (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp) +choke me +#else +char (*f) () = strncasecmp; +#endif +#ifdef __cplusplus +} +#endif - if test "$tcl_ok" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strstr implementation" >&5 -$as_echo_n "checking proper strstr implementation... " >&6; } -if test "${tcl_cv_strstr_unbroken+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - tcl_cv_strstr_unbroken=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main() { - extern int strstr(); - exit(strstr("\0test", "test") ? 1 : 0); +int +main () +{ +return f != strncasecmp; + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_strstr_unbroken=ok +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strncasecmp=yes else - tcl_cv_strstr_unbroken=broken -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_strncasecmp=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strstr_unbroken" >&5 -$as_echo "$tcl_cv_strstr_unbroken" >&6; } - if test "$tcl_cv_strstr_unbroken" = "ok"; then - tcl_ok=1 - else - tcl_ok=0 - fi - fi - if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strstr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strstr.$ac_objext" - ;; -esac - - USE_COMPAT=1 - fi - - -#-------------------------------------------------------------------- -# Check for strtoul function. This is tricky because under some -# versions of AIX strtoul returns an incorrect terminator -# pointer for the string "0". -#-------------------------------------------------------------------- - - - ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" -if test "x$ac_cv_func_strtoul" = x""yes; then : +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6 +if test $ac_cv_func_strncasecmp = yes; then tcl_ok=1 else tcl_ok=0 fi - if test "$tcl_ok" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strtoul implementation" >&5 -$as_echo_n "checking proper strtoul implementation... " >&6; } -if test "${tcl_cv_strtoul_unbroken+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - tcl_cv_strtoul_unbroken=unknown +if test "$tcl_ok" = 0; then + echo "$as_me:$LINENO: checking for strncasecmp in -lsocket" >&5 +echo $ECHO_N "checking for strncasecmp in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -int main() { - extern int strtoul(); - char *term, *string = "0"; - exit(strtoul(string,&term,0) != 0 || term != string+1); + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strncasecmp (); +int +main () +{ +strncasecmp (); + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_strtoul_unbroken=ok +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_strncasecmp=yes else - tcl_cv_strtoul_unbroken=broken -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_socket_strncasecmp=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtoul_unbroken" >&5 -$as_echo "$tcl_cv_strtoul_unbroken" >&6; } - if test "$tcl_cv_strtoul_unbroken" = "ok"; then - tcl_ok=1 - else - tcl_ok=0 - fi - fi - if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strtoul.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" - ;; -esac - - USE_COMPAT=1 - fi - - -#-------------------------------------------------------------------- -# Check for the strtod function. This is tricky because in some -# versions of Linux strtod mis-parses strings starting with "+". -#-------------------------------------------------------------------- - - - ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" -if test "x$ac_cv_func_strtod" = x""yes; then : +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_strncasecmp" >&6 +if test $ac_cv_lib_socket_strncasecmp = yes; then tcl_ok=1 else tcl_ok=0 fi - if test "$tcl_ok" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking proper strtod implementation" >&5 -$as_echo_n "checking proper strtod implementation... " >&6; } -if test "${tcl_cv_strtod_unbroken+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - tcl_cv_strtod_unbroken=unknown +fi +if test "$tcl_ok" = 0; then + echo "$as_me:$LINENO: checking for strncasecmp in -linet" >&5 +echo $ECHO_N "checking for strncasecmp in -linet... $ECHO_C" >&6 +if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-linet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -int main() { - extern double strtod(); - char *term, *string = " +69"; - exit(strtod(string,&term) != 69 || term != string+4); + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strncasecmp (); +int +main () +{ +strncasecmp (); + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_strtod_unbroken=ok +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_inet_strncasecmp=yes else - tcl_cv_strtod_unbroken=broken + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_inet_strncasecmp=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_cv_lib_inet_strncasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_inet_strncasecmp" >&6 +if test $ac_cv_lib_inet_strncasecmp = yes; then + tcl_ok=1 +else + tcl_ok=0 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtod_unbroken" >&5 -$as_echo "$tcl_cv_strtod_unbroken" >&6; } - if test "$tcl_cv_strtod_unbroken" = "ok"; then - tcl_ok=1 - else - tcl_ok=0 - fi - fi - if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; +if test "$tcl_ok" = 0; then + case $LIBOBJS in + "strncasecmp.$ac_objext" | \ + *" strncasecmp.$ac_objext" | \ + "strncasecmp.$ac_objext "* | \ + *" strncasecmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;; esac - USE_COMPAT=1 - fi - + USE_COMPAT=1 +fi #-------------------------------------------------------------------- -# Under Solaris 2.4, strtod returns the wrong value for the -# terminating character under some conditions. Check for this -# and if the problem exists use a substitute procedure -# "fixstrtod" that corrects the error. +# The code below deals with several issues related to gettimeofday: +# 1. Some systems don't provide a gettimeofday function at all +# (set NO_GETTOD if this is the case). +# 2. SGI systems don't use the BSD form of the gettimeofday function, +# but they have a BSDgettimeofday function that can be used instead. +# 3. See if gettimeofday is declared in the header file. +# if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can +# declare it. #-------------------------------------------------------------------- +echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 +echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6 +if test "${ac_cv_func_BSDgettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define BSDgettimeofday to an innocuous variant, in case declares BSDgettimeofday. + For example, HP-UX 11i declares gettimeofday. */ +#define BSDgettimeofday innocuous_BSDgettimeofday + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char BSDgettimeofday (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" -if test "x$ac_cv_func_strtod" = x""yes; then : - tcl_strtod=1 +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef BSDgettimeofday + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char BSDgettimeofday (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) +choke me +#else +char (*f) () = BSDgettimeofday; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != BSDgettimeofday; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_BSDgettimeofday=yes else - tcl_strtod=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_BSDgettimeofday=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6 +if test $ac_cv_func_BSDgettimeofday = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BSDGETTIMEOFDAY 1 +_ACEOF - if test "$tcl_strtod" = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris2.4/Tru64 strtod bugs" >&5 -$as_echo_n "checking for Solaris2.4/Tru64 strtod bugs... " >&6; } -if test "${tcl_cv_strtod_buggy+set}" = set; then : - $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - tcl_cv_strtod_buggy=buggy + echo "$as_me:$LINENO: checking for gettimeofday" >&5 +echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 +if test "${ac_cv_func_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define gettimeofday to an innocuous variant, in case declares gettimeofday. + For example, HP-UX 11i declares gettimeofday. */ +#define gettimeofday innocuous_gettimeofday - extern double strtod(); - int main() { - char *infString="Inf", *nanString="NaN", *spaceString=" "; - char *term; - double value; - value = strtod(infString, &term); - if ((term != infString) && (term[-1] == 0)) { - exit(1); - } - value = strtod(nanString, &term); - if ((term != nanString) && (term[-1] == 0)) { - exit(1); - } - value = strtod(spaceString, &term); - if (term == (spaceString+1)) { - exit(1); - } - exit(0); - } +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gettimeofday (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gettimeofday + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gettimeofday (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) +choke me +#else +char (*f) () = gettimeofday; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != gettimeofday; + ; + return 0; +} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_strtod_buggy=ok +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gettimeofday=yes else - tcl_cv_strtod_buggy=buggy + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_gettimeofday=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 +echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 +if test $ac_cv_func_gettimeofday = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define NO_GETTOD 1 +_ACEOF + fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtod_buggy" >&5 -$as_echo "$tcl_cv_strtod_buggy" >&6; } - if test "$tcl_cv_strtod_buggy" = buggy; then - case " $LIBOBJS " in - *" fixstrtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fixstrtod.$ac_objext" - ;; -esac - USE_COMPAT=1 +echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 +echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6 +if test "${tcl_cv_grep_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else -$as_echo "#define strtod fixstrtod" >>confdefs.h + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include - fi - fi +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gettimeofday" >/dev/null 2>&1; then + tcl_cv_grep_gettimeofday=present +else + tcl_cv_grep_gettimeofday=missing +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $tcl_cv_grep_gettimeofday" >&5 +echo "${ECHO_T}$tcl_cv_grep_gettimeofday" >&6 +if test $tcl_cv_grep_gettimeofday = missing ; then + +cat >>confdefs.h <<\_ACEOF +#define GETTOD_NOT_DECLARED 1 +_ACEOF +fi #-------------------------------------------------------------------- -# Check for various typedefs and provide substitutes if -# they don't exist. +# The following code checks to see whether it is possible to get +# signed chars on this platform. This is needed in order to +# properly generate sign-extended ints from character values. #-------------------------------------------------------------------- -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : +echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +if test "${ac_cv_c_char_unsigned+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 -cat >>confdefs.h <<_ACEOF -#define mode_t int + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_char_unsigned=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_c_char_unsigned=yes fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + cat >>confdefs.h <<\_ACEOF +#define __CHAR_UNSIGNED__ 1 +_ACEOF -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +fi +echo "$as_me:$LINENO: checking signed char declarations" >&5 +echo $ECHO_N "checking signed char declarations... $ECHO_C" >&6 +if test "${tcl_cv_char_signed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else -cat >>confdefs.h <<_ACEOF -#define pid_t int + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi +int +main () +{ -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : + signed char *p; + p = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_char_signed=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +tcl_cv_char_signed=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $tcl_cv_char_signed" >&5 +echo "${ECHO_T}$tcl_cv_char_signed" >&6 +if test $tcl_cv_char_signed = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SIGNED_CHAR 1 _ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : - $as_echo_n "(cached) " >&6 +#-------------------------------------------------------------------- +# Does putenv() copy or not? We need to know to avoid memory leaks. +#-------------------------------------------------------------------- + +echo "$as_me:$LINENO: checking for a putenv() that copies the buffer" >&5 +echo $ECHO_N "checking for a putenv() that copies the buffer... $ECHO_C" >&6 +if test "${tcl_cv_putenv_copy+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + tcl_cv_putenv_copy=no else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + + #include + #define OURVAR "havecopy=yes" + int main (int argc, char *argv[]) + { + char *foo, *bar; + foo = (char *)strdup(OURVAR); + putenv(foo); + strcpy((char *)(strchr(foo, '=') + 1), "no"); + bar = getenv("havecopy"); + if (!strcmp(bar, "no")) { + /* doesnt copy */ + return 0; + } else { + /* does copy */ + return 1; + } + } _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then : - ac_cv_type_uid_t=yes +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_putenv_copy=no else - ac_cv_type_uid_t=no -fi -rm -f conftest* + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +tcl_cv_putenv_copy=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -$as_echo "#define uid_t int" >>confdefs.h - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $tcl_cv_putenv_copy" >&5 +echo "${ECHO_T}$tcl_cv_putenv_copy" >&6 +if test $tcl_cv_putenv_copy = yes; then -$as_echo "#define gid_t int" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_PUTENV_THAT_COPIES 1 +_ACEOF fi +#-------------------------------------------------------------------- +# Check for support of nl_langinfo function +#-------------------------------------------------------------------- + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&6; } -if test "${tcl_cv_type_socklen_t+set}" = set; then : - $as_echo_n "(cached) " >&6 + # Check whether --enable-langinfo or --disable-langinfo was given. +if test "${enable_langinfo+set}" = set; then + enableval="$enable_langinfo" + langinfo_ok=$enableval else + langinfo_ok=yes +fi; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + HAVE_LANGINFO=0 + if test "$langinfo_ok" = "yes"; then + if test "${ac_cv_header_langinfo_h+set}" = set; then + echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +if test "${ac_cv_header_langinfo_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking langinfo.h usability" >&5 +echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - #include - #include - -int -main () -{ - - socklen_t foo; +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - ; - return 0; -} +# Is the header present? +echo "$as_me:$LINENO: checking langinfo.h presence" >&5 +echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_type_socklen_t=yes +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - tcl_cv_type_socklen_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cpp_err=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_type_socklen_t" >&5 -$as_echo "$tcl_cv_type_socklen_t" >&6; } -if test $tcl_cv_type_socklen_t = no; then - -$as_echo "#define socklen_t int" >>confdefs.h +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" -if test "x$ac_cv_type_intptr_t" = x""yes; then : - - -$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for langinfo.h" >&5 +echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6 +if test "${ac_cv_header_langinfo_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_langinfo_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6 +fi +if test $ac_cv_header_langinfo_h = yes; then + langinfo_ok=yes else + langinfo_ok=no +fi + - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size signed integer type" >&5 -$as_echo_n "checking for pointer-size signed integer type... " >&6; } -if test "${tcl_cv_intptr_t+set}" = set; then : - $as_echo_n "(cached) " >&6 + fi + echo "$as_me:$LINENO: checking whether to use nl_langinfo" >&5 +echo $ECHO_N "checking whether to use nl_langinfo... $ECHO_C" >&6 + if test "$langinfo_ok" = "yes"; then + if test "${tcl_cv_langinfo_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - for tcl_cv_intptr_t in "int" "long" "long long" none; do - if test "$tcl_cv_intptr_t" != none; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include int main () { -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))]; -test_array [0] = 0 - +nl_langinfo(CODESET); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_ok=yes +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_langinfo_h=yes else - tcl_ok=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_langinfo_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$tcl_ok" = yes && break; fi - done +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_intptr_t" >&5 -$as_echo "$tcl_cv_intptr_t" >&6; } - if test "$tcl_cv_intptr_t" != none; then -cat >>confdefs.h <<_ACEOF -#define intptr_t $tcl_cv_intptr_t + echo "$as_me:$LINENO: result: $tcl_cv_langinfo_h" >&5 +echo "${ECHO_T}$tcl_cv_langinfo_h" >&6 + if test $tcl_cv_langinfo_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO 1 _ACEOF + fi + else + echo "$as_me:$LINENO: result: $langinfo_ok" >&5 +echo "${ECHO_T}$langinfo_ok" >&6 fi -fi -ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" -if test "x$ac_cv_type_uintptr_t" = x""yes; then : +#-------------------------------------------------------------------- +# Check for support of chflags and mkstemps functions +#-------------------------------------------------------------------- -$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h -else +for ac_func in chflags mkstemps +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size unsigned integer type" >&5 -$as_echo_n "checking for pointer-size unsigned integer type... " >&6; } -if test "${tcl_cv_uintptr_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif - for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \ - none; do - if test "$tcl_cv_uintptr_t" != none; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default int main () { -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))]; -test_array [0] = 0 - +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_ok=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - tcl_ok=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$tcl_ok" = yes && break; fi - done +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_uintptr_t" >&5 -$as_echo "$tcl_cv_uintptr_t" >&6; } - if test "$tcl_cv_uintptr_t" != none; then - -cat >>confdefs.h <<_ACEOF -#define uintptr_t $tcl_cv_uintptr_t +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - fi - -fi - - -#-------------------------------------------------------------------- -# If a system doesn't have an opendir function (man, that's old!) -# then we have to supply a different version of dirent.h which -# is compatible with the substitute version of opendir that's -# provided. This version only works with V7-style directories. -#-------------------------------------------------------------------- - -ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" -if test "x$ac_cv_func_opendir" = x""yes; then : - -else - -$as_echo "#define USE_DIRENT2_H 1" >>confdefs.h - fi +done #-------------------------------------------------------------------- -# The check below checks whether defines the type -# "union wait" correctly. It's needed because of weirdness in -# HP-UX where "union wait" is defined in both the BSD and SYS-V -# environments. Checking the usability of WIFEXITED seems to do -# the trick. +# Check for support of isnan() function or macro #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking union wait" >&5 -$as_echo_n "checking union wait... " >&6; } -if test "${tcl_cv_union_wait+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking isnan" >&5 +echo $ECHO_N "checking isnan... $ECHO_C" >&6 +if test "${tcl_cv_isnan+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +#include int main () { -union wait x; -WIFEXITED(x); /* Generates compiler error if WIFEXITED - * uses an int. */ +isnan(0.0); /* Generates an error if isnan is missing */ ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_union_wait=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_isnan=yes else - tcl_cv_union_wait=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_isnan=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_union_wait" >&5 -$as_echo "$tcl_cv_union_wait" >&6; } -if test $tcl_cv_union_wait = no; then +echo "$as_me:$LINENO: result: $tcl_cv_isnan" >&5 +echo "${ECHO_T}$tcl_cv_isnan" >&6 +if test $tcl_cv_isnan = no; then -$as_echo "#define NO_UNION_WAIT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NO_ISNAN 1 +_ACEOF fi #-------------------------------------------------------------------- -# Check whether there is an strncasecmp function on this system. -# This is a bit tricky because under SCO it's in -lsocket and -# under Sequent Dynix it's in -linet. +# Darwin specific API checks and defines #-------------------------------------------------------------------- -ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" -if test "x$ac_cv_func_strncasecmp" = x""yes; then : - tcl_ok=1 -else - tcl_ok=0 -fi +if test "`uname -s`" = "Darwin" ; then -if test "$tcl_ok" = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strncasecmp in -lsocket" >&5 -$as_echo_n "checking for strncasecmp in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_strncasecmp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +for ac_func in getattrlist +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include #endif -char strncasecmp (); -int -main () -{ -return strncasecmp (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_strncasecmp=yes -else - ac_cv_lib_socket_strncasecmp=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_strncasecmp" >&5 -$as_echo "$ac_cv_lib_socket_strncasecmp" >&6; } -if test "x$ac_cv_lib_socket_strncasecmp" = x""yes; then : - tcl_ok=1 -else - tcl_ok=0 -fi -fi -if test "$tcl_ok" = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strncasecmp in -linet" >&5 -$as_echo_n "checking for strncasecmp in -linet... " >&6; } -if test "${ac_cv_lib_inet_strncasecmp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-linet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif -char strncasecmp (); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + int main () { -return strncasecmp (); +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_inet_strncasecmp=yes -else - ac_cv_lib_inet_strncasecmp=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_strncasecmp" >&5 -$as_echo "$ac_cv_lib_inet_strncasecmp" >&6; } -if test "x$ac_cv_lib_inet_strncasecmp" = x""yes; then : - tcl_ok=1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - tcl_ok=0 -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +eval "$as_ac_var=no" fi -if test "$tcl_ok" = 0; then - case " $LIBOBJS " in - *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; -esac - - USE_COMPAT=1 +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -#-------------------------------------------------------------------- -# The code below deals with several issues related to gettimeofday: -# 1. Some systems don't provide a gettimeofday function at all -# (set NO_GETTOD if this is the case). -# 2. SGI systems don't use the BSD form of the gettimeofday function, -# but they have a BSDgettimeofday function that can be used instead. -# 3. See if gettimeofday is declared in the header file. -# if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can -# declare it. -#-------------------------------------------------------------------- - -ac_fn_c_check_func "$LINENO" "BSDgettimeofday" "ac_cv_func_BSDgettimeofday" -if test "x$ac_cv_func_BSDgettimeofday" = x""yes; then : +fi +done -$as_echo "#define HAVE_BSDGETTIMEOFDAY 1" >>confdefs.h +for ac_header in copyfile.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - - ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = x""yes; then : - + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define NO_GETTOD 1" >>confdefs.h - +ac_header_compiler=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 - +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday declaration" >&5 -$as_echo_n "checking for gettimeofday declaration... " >&6; } -if test "${tcl_cv_grep_gettimeofday+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "gettimeofday" >/dev/null 2>&1; then : - tcl_cv_grep_gettimeofday=present +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - tcl_cv_grep_gettimeofday=missing + eval "$as_ac_Header=\$ac_header_preproc" fi -rm -f conftest* +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_grep_gettimeofday" >&5 -$as_echo "$tcl_cv_grep_gettimeofday" >&6; } -if test $tcl_cv_grep_gettimeofday = missing ; then - -$as_echo "#define GETTOD_NOT_DECLARED 1" >>confdefs.h +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -#-------------------------------------------------------------------- -# The following code checks to see whether it is possible to get -# signed chars on this platform. This is needed in order to -# properly generate sign-extended ints from character values. -#-------------------------------------------------------------------- +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 -$as_echo_n "checking whether char is unsigned... " >&6; } -if test "${ac_cv_c_char_unsigned+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((char) -1) < 0)]; -test_array [0] = 0 - ; - return 0; -} +for ac_func in copyfile +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_char_unsigned=no -else - ac_cv_c_char_unsigned=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 -$as_echo "$ac_cv_c_char_unsigned" >&6; } -if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -fi +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking signed char declarations" >&5 -$as_echo_n "checking signed char declarations... " >&6; } -if test "${tcl_cv_char_signed+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +#ifdef __STDC__ +# include +#else +# include +#endif - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif int main () { - - signed char *p; - p = 0; - +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_char_signed=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - tcl_cv_char_signed=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_char_signed" >&5 -$as_echo "$tcl_cv_char_signed" >&6; } -if test $tcl_cv_char_signed = yes; then - -$as_echo "#define HAVE_SIGNED_CHAR 1" >>confdefs.h +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done -#-------------------------------------------------------------------- -# Does putenv() copy or not? We need to know to avoid memory leaks. -#-------------------------------------------------------------------- - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a putenv() that copies the buffer" >&5 -$as_echo_n "checking for a putenv() that copies the buffer... " >&6; } -if test "${tcl_cv_putenv_copy+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + if test $tcl_corefoundation = yes; then - if test "$cross_compiling" = yes; then : - tcl_cv_putenv_copy=no +for ac_header in libkern/OSAtomic.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - #include - #define OURVAR "havecopy=yes" - int main (int argc, char *argv[]) - { - char *foo, *bar; - foo = (char *)strdup(OURVAR); - putenv(foo); - strcpy((char *)(strchr(foo, '=') + 1), "no"); - bar = getenv("havecopy"); - if (!strcmp(bar, "no")) { - /* doesnt copy */ - return 0; - } else { - /* does copy */ - return 1; - } - } +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - tcl_cv_putenv_copy=no +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - tcl_cv_putenv_copy=yes + ac_cpp_err=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_putenv_copy" >&5 -$as_echo "$tcl_cv_putenv_copy" >&6; } -if test $tcl_cv_putenv_copy = yes; then +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -$as_echo "#define HAVE_PUTENV_THAT_COPIES 1" >>confdefs.h +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -#-------------------------------------------------------------------- -# Check for support of nl_langinfo function -#-------------------------------------------------------------------- +done - # Check whether --enable-langinfo was given. -if test "${enable_langinfo+set}" = set; then : - enableval=$enable_langinfo; langinfo_ok=$enableval -else - langinfo_ok=yes -fi +for ac_func in OSSpinLockLock +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - HAVE_LANGINFO=0 - if test "$langinfo_ok" = "yes"; then - ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_langinfo_h" = x""yes; then : - langinfo_ok=yes -else - langinfo_ok=no -fi +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use nl_langinfo" >&5 -$as_echo_n "checking whether to use nl_langinfo... " >&6; } - if test "$langinfo_ok" = "yes"; then - if test "${tcl_cv_langinfo_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -nl_langinfo(CODESET); +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - tcl_cv_langinfo_h=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - tcl_cv_langinfo_h=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_langinfo_h" >&5 -$as_echo "$tcl_cv_langinfo_h" >&6; } - if test $tcl_cv_langinfo_h = yes; then - -$as_echo "#define HAVE_LANGINFO 1" >>confdefs.h - - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $langinfo_ok" >&5 -$as_echo "$langinfo_ok" >&6; } - fi - - -#-------------------------------------------------------------------- -# Check for support of chflags and mkstemps functions -#-------------------------------------------------------------------- - -for ac_func in chflags mkstemps -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -#-------------------------------------------------------------------- -# Check for support of isnan() function or macro -#-------------------------------------------------------------------- +for ac_func in pthread_atfork +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking isnan" >&5 -$as_echo_n "checking isnan... " >&6; } -if test "${tcl_cv_isnan+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { - -isnan(0.0); /* Generates an error if isnan is missing */ - +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - tcl_cv_isnan=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - tcl_cv_isnan=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_isnan" >&5 -$as_echo "$tcl_cv_isnan" >&6; } -if test $tcl_cv_isnan = no; then - -$as_echo "#define NO_ISNAN 1" >>confdefs.h + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +eval "$as_ac_var=no" fi - -#-------------------------------------------------------------------- -# Darwin specific API checks and defines -#-------------------------------------------------------------------- - -if test "`uname -s`" = "Darwin" ; then - for ac_func in getattrlist -do : - ac_fn_c_check_func "$LINENO" "getattrlist" "ac_cv_func_getattrlist" -if test "x$ac_cv_func_getattrlist" = x""yes; then : +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_GETATTRLIST 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done - for ac_header in copyfile.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "copyfile.h" "ac_cv_header_copyfile_h" "$ac_includes_default" -if test "x$ac_cv_header_copyfile_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_COPYFILE_H 1 -_ACEOF + fi -fi +cat >>confdefs.h <<\_ACEOF +#define USE_VFORK 1 +_ACEOF -done - for ac_func in copyfile -do : - ac_fn_c_check_func "$LINENO" "copyfile" "ac_cv_func_copyfile" -if test "x$ac_cv_func_copyfile" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_COPYFILE 1 +cat >>confdefs.h <<\_ACEOF +#define TCL_DEFAULT_ENCODING "utf-8" _ACEOF -fi -done - if test $tcl_corefoundation = yes; then - for ac_header in libkern/OSAtomic.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libkern/OSAtomic.h" "ac_cv_header_libkern_OSAtomic_h" "$ac_includes_default" -if test "x$ac_cv_header_libkern_OSAtomic_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBKERN_OSATOMIC_H 1 +cat >>confdefs.h <<\_ACEOF +#define TCL_LOAD_FROM_MEMORY 1 _ACEOF -fi - -done - for ac_func in OSSpinLockLock -do : - ac_fn_c_check_func "$LINENO" "OSSpinLockLock" "ac_cv_func_OSSpinLockLock" -if test "x$ac_cv_func_OSSpinLockLock" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OSSPINLOCKLOCK 1 +cat >>confdefs.h <<\_ACEOF +#define TCL_WIDE_CLICKS 1 _ACEOF -fi -done - for ac_func in pthread_atfork -do : - ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" -if test "x$ac_cv_func_pthread_atfork" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_ATFORK 1 +for ac_header in AvailabilityMacros.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> _ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no fi -done - - fi - -$as_echo "#define USE_VFORK 1" >>confdefs.h - - -$as_echo "#define TCL_DEFAULT_ENCODING \"utf-8\"" >>confdefs.h +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define TCL_LOAD_FROM_MEMORY 1" >>confdefs.h - + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -$as_echo "#define TCL_WIDE_CLICKS 1" >>confdefs.h +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - for ac_header in AvailabilityMacros.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default" -if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then : +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_AVAILABILITYMACROS_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -9874,14 +17962,18 @@ fi done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if weak import is available" >&5 -$as_echo_n "checking if weak import is available... " >&6; } -if test "${tcl_cv_cc_weak_import+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking if weak import is available" >&5 +echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6 +if test "${tcl_cv_cc_weak_import+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ @@ -9901,30 +17993,60 @@ rand(); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_weak_import=yes else - tcl_cv_cc_weak_import=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_weak_import=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_weak_import" >&5 -$as_echo "$tcl_cv_cc_weak_import" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5 +echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6 if test $tcl_cv_cc_weak_import = yes; then -$as_echo "#define HAVE_WEAK_IMPORT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_WEAK_IMPORT 1 +_ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin SUSv3 extensions are available" >&5 -$as_echo_n "checking if Darwin SUSv3 extensions are available... " >&6; } -if test "${tcl_cv_cc_darwin_c_source+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5 +echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6 +if test "${tcl_cv_cc_darwin_c_source+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ @@ -9945,19 +18067,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cc_darwin_c_source=yes else - tcl_cv_cc_darwin_c_source=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cc_darwin_c_source=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_darwin_c_source" >&5 -$as_echo "$tcl_cv_cc_darwin_c_source" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5 +echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6 if test $tcl_cv_cc_darwin_c_source = yes; then -$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define _DARWIN_C_SOURCE 1 +_ACEOF fi fi @@ -9973,13 +18121,17 @@ fi # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fts" >&5 -$as_echo_n "checking for fts... " >&6; } -if test "${tcl_cv_api_fts+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for fts" >&5 +echo $ECHO_N "checking for fts... $ECHO_C" >&6 +if test "${tcl_cv_api_fts+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include @@ -9998,19 +18150,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_api_fts=yes else - tcl_cv_api_fts=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_api_fts=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_api_fts" >&5 -$as_echo "$tcl_cv_api_fts" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_api_fts" >&5 +echo "${ECHO_T}$tcl_cv_api_fts" >&6 if test $tcl_cv_api_fts = yes; then -$as_echo "#define HAVE_FTS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FTS 1 +_ACEOF fi @@ -10021,24 +18199,300 @@ fi #-------------------------------------------------------------------- - for ac_header in sys/ioctl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then : + +for ac_header in sys/ioctl.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_IOCTL_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done - for ac_header in sys/filio.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/filio.h" "ac_cv_header_sys_filio_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_filio_h" = x""yes; then : + +for ac_header in sys/filio.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_FILIO_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -10046,10 +18500,10 @@ fi done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 -$as_echo_n "checking system version... " >&6; } -if test "${tcl_cv_sys_version+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking system version" >&5 +echo $ECHO_N "checking system version... $ECHO_C" >&6 +if test "${tcl_cv_sys_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -f /usr/lib/NextStep/software_version; then @@ -10057,8 +18511,8 @@ else else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 -$as_echo "$as_me: WARNING: can't find uname command" >&2;} + { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5 +echo "$as_me: WARNING: can't find uname command" >&2;} tcl_cv_sys_version=unknown else # Special check for weird MP-RAS system (uname returns weird @@ -10074,12 +18528,12 @@ $as_echo "$as_me: WARNING: can't find uname command" >&2;} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 -$as_echo "$tcl_cv_sys_version" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5 +echo "${ECHO_T}$tcl_cv_sys_version" >&6 system=$tcl_cv_sys_version - { $as_echo "$as_me:${as_lineno-$LINENO}: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -$as_echo_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... " >&6; } + echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo $ECHO_N "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... $ECHO_C" >&6 case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -10088,43 +18542,49 @@ $as_echo_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... " >&6; } OSF*) -$as_echo "#define USE_FIONBIO 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define USE_FIONBIO 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FIONBIO" >&5 -$as_echo "FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; SunOS-4*) -$as_echo "#define USE_FIONBIO 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define USE_FIONBIO 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FIONBIO" >&5 -$as_echo "FIONBIO" >&6; } + echo "$as_me:$LINENO: result: FIONBIO" >&5 +echo "${ECHO_T}FIONBIO" >&6 ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: O_NONBLOCK" >&5 -$as_echo "O_NONBLOCK" >&6; } + echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 +echo "${ECHO_T}O_NONBLOCK" >&6 ;; esac #------------------------------------------------------------------------ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dll unloading" >&5 -$as_echo_n "checking whether to use dll unloading... " >&6; } -# Check whether --enable-dll-unloading was given. -if test "${enable_dll_unloading+set}" = set; then : - enableval=$enable_dll_unloading; tcl_ok=$enableval +echo "$as_me:$LINENO: checking whether to use dll unloading" >&5 +echo $ECHO_N "checking whether to use dll unloading... $ECHO_C" >&6 +# Check whether --enable-dll-unloading or --disable-dll-unloading was given. +if test "${enable_dll_unloading+set}" = set; then + enableval="$enable_dll_unloading" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test $tcl_ok = yes; then -$as_echo "#define TCL_UNLOAD_DLLS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define TCL_UNLOAD_DLLS 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_ok" >&5 -$as_echo "$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #------------------------------------------------------------------------ # Check whether the timezone data is supplied by the OS or has @@ -10132,31 +18592,31 @@ $as_echo "$tcl_ok" >&6; } # be overriden on the configure command line either way. #------------------------------------------------------------------------ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone data" >&5 -$as_echo_n "checking for timezone data... " >&6; } +echo "$as_me:$LINENO: checking for timezone data" >&5 +echo $ECHO_N "checking for timezone data... $ECHO_C" >&6 -# Check whether --with-tzdata was given. -if test "${with_tzdata+set}" = set; then : - withval=$with_tzdata; tcl_ok=$withval +# Check whether --with-tzdata or --without-tzdata was given. +if test "${with_tzdata+set}" = set; then + withval="$with_tzdata" + tcl_ok=$withval else tcl_ok=auto -fi - +fi; # # Any directories that get added here must also be added to the # search path in ::tcl::clock::Initialize (library/clock.tcl). # case $tcl_ok in no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: supplied by OS vendor" >&5 -$as_echo "supplied by OS vendor" >&6; } + echo "$as_me:$LINENO: result: supplied by OS vendor" >&5 +echo "${ECHO_T}supplied by OS vendor" >&6 ;; yes) # nothing to do here ;; auto*) - if test "${tcl_cv_dir_zoneinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "${tcl_cv_dir_zoneinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else for dir in /usr/share/zoneinfo \ @@ -10173,20 +18633,22 @@ fi if test -n "$tcl_cv_dir_zoneinfo"; then tcl_ok=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dir" >&5 -$as_echo "$dir" >&6; } + echo "$as_me:$LINENO: result: $dir" >&5 +echo "${ECHO_T}$dir" >&6 else tcl_ok=yes fi ;; *) - as_fn_error "invalid argument: $tcl_ok" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: invalid argument: $tcl_ok" >&5 +echo "$as_me: error: invalid argument: $tcl_ok" >&2;} + { (exit 1); exit 1; }; } ;; esac if test $tcl_ok = yes then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: supplied by Tcl" >&5 -$as_echo "supplied by Tcl" >&6; } + echo "$as_me:$LINENO: result: supplied by Tcl" >&5 +echo "${ECHO_T}supplied by Tcl" >&6 INSTALL_TZDATA=install-tzdata fi @@ -10194,16 +18656,152 @@ fi # DTrace support #-------------------------------------------------------------------- -# Check whether --enable-dtrace was given. -if test "${enable_dtrace+set}" = set; then : - enableval=$enable_dtrace; tcl_ok=$enableval +# Check whether --enable-dtrace or --disable-dtrace was given. +if test "${enable_dtrace+set}" = set; then + enableval="$enable_dtrace" + tcl_ok=$enableval else tcl_ok=no +fi; +if test $tcl_ok = yes; then + if test "${ac_cv_header_sys_sdt_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_sdt_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/sdt.h usability" >&5 +echo $ECHO_N "checking sys/sdt.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -if test $tcl_ok = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sdt_h" = x""yes; then : +# Is the header present? +echo "$as_me:$LINENO: checking sys/sdt.h presence" >&5 +echo $ECHO_N "checking sys/sdt.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/sdt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/sdt.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/sdt.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/sdt.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/sdt.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/sdt.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/sdt.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/sdt.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to the tcl lists. ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sys/sdt.h" >&5 +echo $ECHO_N "checking for sys/sdt.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_sdt_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_sdt_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sdt_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sdt_h" >&6 + +fi +if test $ac_cv_header_sys_sdt_h = yes; then tcl_ok=yes else tcl_ok=no @@ -10214,10 +18812,10 @@ fi if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DTRACE+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_DTRACE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DTRACE in [\\/]* | ?:[\\/]*) @@ -10230,37 +18828,38 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done ;; esac fi DTRACE=$ac_cv_path_DTRACE + if test -n "$DTRACE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 -$as_echo "$DTRACE" >&6; } + echo "$as_me:$LINENO: result: $DTRACE" >&5 +echo "${ECHO_T}$DTRACE" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable DTrace support" >&5 -$as_echo_n "checking whether to enable DTrace support... " >&6; } +echo "$as_me:$LINENO: checking whether to enable DTrace support" >&5 +echo $ECHO_N "checking whether to enable DTrace support... $ECHO_C" >&6 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then -$as_echo "#define USE_DTRACE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define USE_DTRACE 1 +_ACEOF DTRACE_SRC="\${DTRACE_SRC}" DTRACE_HDR="\${DTRACE_HDR}" @@ -10278,8 +18877,8 @@ $as_echo "#define USE_DTRACE 1" >>confdefs.h fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_ok" >&5 -$as_echo "$tcl_ok" >&6; } +echo "$as_me:$LINENO: result: $tcl_ok" >&5 +echo "${ECHO_T}$tcl_ok" >&6 #-------------------------------------------------------------------- # The statements below define a collection of symbols related to @@ -10308,38 +18907,38 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to package libraries" >&5 -$as_echo_n "checking how to package libraries... " >&6; } - # Check whether --enable-framework was given. -if test "${enable_framework+set}" = set; then : - enableval=$enable_framework; enable_framework=$enableval + echo "$as_me:$LINENO: checking how to package libraries" >&5 +echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6 + # Check whether --enable-framework or --disable-framework was given. +if test "${enable_framework+set}" = set; then + enableval="$enable_framework" + enable_framework=$enableval else enable_framework=no -fi - +fi; if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 -$as_echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;} + { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 +echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;} enable_framework=no fi if test $tcl_corefoundation = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be used when CoreFoundation is available" >&5 -$as_echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;} + { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5 +echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;} enable_framework=no fi fi if test $enable_framework = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: framework" >&5 -$as_echo "framework" >&6; } + echo "$as_me:$LINENO: result: framework" >&5 +echo "${ECHO_T}framework" >&6 FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library" >&5 -$as_echo "shared library" >&6; } + echo "$as_me:$LINENO: result: shared library" >&5 +echo "${ECHO_T}shared library" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static library" >&5 -$as_echo "static library" >&6; } + echo "$as_me:$LINENO: result: static library" >&5 +echo "${ECHO_T}static library" >&6 fi FRAMEWORK_BUILD=0 fi @@ -10351,18 +18950,20 @@ $as_echo "static library" >&6; } TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' - ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + ac_config_files="$ac_config_files Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" TCL_YEAR="`date +%Y`" fi if test "$FRAMEWORK_BUILD" = "1" ; then -$as_echo "#define TCL_FRAMEWORK 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define TCL_FRAMEWORK 1 +_ACEOF # Construct a fake local framework structure to make linking with # '-framework Tcl' and running of tcltest work - ac_config_commands="$ac_config_commands Tcl.framework" + ac_config_commands="$ac_config_commands Tcl.framework" LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" # default install directory for bundled packages @@ -10540,7 +19141,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} -ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" + ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -10560,59 +19161,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -10621,56 +19202,63 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" - : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -10680,252 +19268,81 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -10933,123 +19350,148 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - +rm -f conf$$ conf$$.exe conf$$.file -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -11058,20 +19500,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to + +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by tcl $as_me 8.6, which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11079,40 +19532,43 @@ generated by GNU Autoconf 2.64. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi -_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages + -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files @@ -11120,69 +19576,83 @@ $config_files Configuration commands: $config_commands -Report bugs to the package provider." - +Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ tcl config.status 8.6 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk +srcdir=$srcdir _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -11196,55 +19666,43 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS +# INIT-COMMANDS section. # + VERSION=${TCL_VERSION} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Handling of arguments. + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Tcl-Info.plist") CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; - "Tclsh-Info.plist") CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; - "Tcl.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; - "dltest/Makefile") CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; - "tcl.pc") CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + case "$ac_config_target" in + # Handling of arguments. + "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;; + "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;; + "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;; + "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;; + "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -11255,416 +19713,536 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || { - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" +cat >>$CONFIG_STATUS <<_ACEOF +# +# CONFIG_FILES section. +# -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAN_FLAGS@,$MAN_FLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@ZLIB_DIR@,$ZLIB_DIR,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t +s,@ZLIB_SRCS@,$ZLIB_SRCS,;t t +s,@ZLIB_INCLUDE@,$ZLIB_INCLUDE,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@AR@,$AR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@TCL_LIBS@,$TCL_LIBS,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@DL_OBJS@,$DL_OBJS,;t t +s,@PLAT_OBJS@,$PLAT_OBJS,;t t +s,@PLAT_SRCS@,$PLAT_SRCS,;t t +s,@LDAIX_SRC@,$LDAIX_SRC,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t +s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t +s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t +s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t +s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@DTRACE@,$DTRACE,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@TCL_YEAR@,$TCL_YEAR,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_UNSHARED_LIB_SUFFIX@,$TCL_UNSHARED_LIB_SUFFIX,;t t +s,@TCL_HAS_LONGLONG@,$TCL_HAS_LONGLONG,;t t +s,@INSTALL_TZDATA@,$INSTALL_TZDATA,;t t +s,@DTRACE_SRC@,$DTRACE_SRC,;t t +s,@DTRACE_HDR@,$DTRACE_HDR,;t t +s,@DTRACE_OBJ@,$DTRACE_OBJ,;t t +s,@MAKEFILE_SHELL@,$MAKEFILE_SHELL,;t t +s,@BUILD_DLTEST@,$BUILD_DLTEST,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_MODULE_PATH@,$TCL_MODULE_PATH,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t +s,@HTML_DIR@,$HTML_DIR,;t t +s,@PACKAGE_DIR@,$PACKAGE_DIR,;t t +s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t +s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t +s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t +s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t +s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t +s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t +s,@DLTEST_LD@,$DLTEST_LD,;t t +s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t +CEOF - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done +_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; esac -_ACEOF -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_file$ac_mode in - "Tcl.framework":C) n=Tcl && + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + Tcl.framework ) n=Tcl && f=$n.framework && v=Versions/$VERSION && rm -rf $f && mkdir -p $f/$v/Resources && ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v && ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist && unset n f v ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -11684,11 +20262,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + $ac_cs_success || { (exit 1); exit 1; } fi diff --git a/win/configure b/win/configure index 834b59a..021688d 100755 --- a/win/configure +++ b/win/configure @@ -1,413 +1,81 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# Generated by GNU Autoconf 2.59. # +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + as_unset=false fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + $as_unset $as_var fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -415,107 +83,146 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -524,24 +231,38 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -exec 7<&0 &1 +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= @@ -549,209 +270,51 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= -PACKAGE_URL= ac_unique_file="../generic/tcl.h" # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='LTLIBOBJS -LIBOBJS -RES -RC_DEFINES -RC_DEFINE -RC_INCLUDE -RC_TYPE -RC_OUT -TCL_REG_PATCH_LEVEL -TCL_REG_MINOR_VERSION -TCL_REG_MAJOR_VERSION -TCL_REG_VERSION -TCL_DDE_PATCH_LEVEL -TCL_DDE_MINOR_VERSION -TCL_DDE_MAJOR_VERSION -TCL_DDE_VERSION -TCL_PACKAGE_PATH -TCL_LIB_VERSIONS_OK -TCL_EXP_FILE -TCL_BUILD_EXP_FILE -TCL_NEEDS_EXP_FILE -TCL_LD_SEARCH_FLAGS -TCL_BUILD_LIB_SPEC -MAKE_EXE -MAKE_DLL -POST_MAKE_LIB -MAKE_LIB -LIBRARIES -EXESUFFIX -LIBSUFFIX -LIBPREFIX -DLLSUFFIX -LIBS_GUI -TCL_SHARED_BUILD -SHLIB_SUFFIX -SHLIB_CFLAGS -SHLIB_LD_LIBS -SHLIB_LD -STLIB_LD -LDFLAGS_WINDOW -LDFLAGS_CONSOLE -LDFLAGS_OPTIMIZE -LDFLAGS_DEBUG -CC_EXENAME -CC_OBJNAME -DEPARG -EXTRA_CFLAGS -CFG_TCL_EXPORT_FILE_SUFFIX -CFG_TCL_UNSHARED_LIB_SUFFIX -CFG_TCL_SHARED_LIB_SUFFIX -TCL_DBGX -TCL_BIN_DIR -TCL_SRC_DIR -TCL_DLL_FILE -TCL_BUILD_STUB_LIB_PATH -TCL_BUILD_STUB_LIB_SPEC -TCL_INCLUDE_SPEC -TCL_STUB_LIB_PATH -TCL_STUB_LIB_SPEC -TCL_STUB_LIB_FLAG -TCL_STUB_LIB_FILE -TCL_LIB_SPEC -TCL_IMPORT_LIB_FLAG -TCL_IMPORT_LIB_FILE -TCL_STATIC_LIB_FLAG -TCL_STATIC_LIB_FILE -TCL_LIB_FLAG -TCL_LIB_FILE -PKG_CFG_ARGS -TCL_PATCH_LEVEL -TCL_MINOR_VERSION -TCL_MAJOR_VERSION -TCL_VERSION -LDFLAGS_DEFAULT -CFLAGS_DEFAULT -ZLIB_OBJS -ZLIB_LIBS -ZLIB_DLL_FILE -CFLAGS_WARNING -CFLAGS_OPTIMIZE -CFLAGS_DEBUG -DL_LIBS -CELIB_DIR -CYGPATH -TCL_THREADS -SET_MAKE -RC -RANLIB -AR -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING ZLIB_DLL_FILE ZLIB_LIBS ZLIB_OBJS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL PKG_CFG_ARGS TCL_LIB_FILE TCL_LIB_FLAG TCL_STATIC_LIB_FILE TCL_STATIC_LIB_FLAG TCL_IMPORT_LIB_FILE TCL_IMPORT_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_DLL_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_DBGX CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TCL_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TCL_BUILD_LIB_SPEC TCL_LD_SEARCH_FLAGS TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_PACKAGE_PATH TCL_DDE_VERSION TCL_DDE_MAJOR_VERSION TCL_DDE_MINOR_VERSION TCL_DDE_PATCH_LEVEL TCL_REG_VERSION TCL_REG_MAJOR_VERSION TCL_REG_MINOR_VERSION TCL_REG_PATCH_LEVEL RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_threads -with_encoding -enable_shared -enable_64bit -enable_wince -with_celib -enable_symbols -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -774,48 +337,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -837,59 +386,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval enable_$ac_useropt=\$ac_optarg ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -916,12 +439,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -946,16 +463,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1020,16 +534,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1080,36 +584,26 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval with_$ac_useropt=\$ac_optarg ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1129,25 +623,26 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1156,36 +651,31 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var - # Remove trailing slashes. + eval ac_val=$`echo $ac_var` case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - # Be sure to have absolute directory names. +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1199,7 +689,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1212,72 +702,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1306,11 +798,14 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1320,25 +815,18 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1350,7 +838,6 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-threads build with threads @@ -1370,325 +857,162 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.64 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## + $ $0 $@ -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () +_ACEOF { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -} # ac_fn_c_try_compile +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval +_ASUNAME -} # ac_fn_c_try_cpp +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +} >&5 - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.64. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF +cat >&5 <<_ACEOF ## ----------- ## @@ -1706,6 +1030,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1716,13 +1041,13 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) - as_fn_append ac_configure_args1 " '$ac_arg'" + ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1738,19 +1063,21 @@ do -* ) ac_must_keep_next=true ;; esac fi - as_fn_append ac_configure_args " '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1763,35 +1090,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1802,28 +1114,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1835,26 +1141,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1862,46 +1168,40 @@ cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1911,79 +1211,69 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1994,6 +1284,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + # The following define is needed when building with Cygwin since newer # versions of autoconf incorrectly set SHELL to /bin/bash instead of # /bin/sh. The bash shell seems to suffer from some strange failures. @@ -2050,10 +1357,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2063,37 +1370,35 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2103,50 +1408,39 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2156,37 +1450,77 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2197,19 +1531,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2227,25 +1560,24 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2255,41 +1587,39 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2299,227 +1629,183 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + int main () { -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } fi + ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2527,31 +1813,38 @@ $as_echo "$ac_try_echo"; } >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac done else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -2563,46 +1856,45 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -2616,49 +1908,55 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -2669,34 +1967,39 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2712,14 +2015,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -2747,17 +2054,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2772,52 +2074,224 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; @@ -2826,16 +2300,41 @@ $ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 + case $ac_cv_c_inline in inline | yes) ;; @@ -2857,15 +2356,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -2879,7 +2378,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2888,24 +2391,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -2915,7 +2462,7 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -2927,8 +2474,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2938,7 +2485,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2947,24 +2498,68 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -2974,13 +2569,14 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -2990,142 +2586,31 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3140,23 +2625,51 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - + $EGREP "memchr" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3166,14 +2679,18 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "free" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3183,13 +2700,16 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3209,26 +2729,41 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF fi @@ -3243,10 +2778,10 @@ fi if test "${GCC}" = "yes" ; then # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -3256,34 +2791,32 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3293,34 +2826,32 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RC+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RC"; then ac_cv_prog_RC="$RC" # Let the user override the test. @@ -3330,37 +2861,41 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RC="windres" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 -$as_echo "$RC" >&6; } + echo "$as_me:$LINENO: result: $RC" >&5 +echo "${ECHO_T}$RC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "${AR}" = "" ; then - as_fn_error "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5 +echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;} + { (exit 1); exit 1; }; } fi if test "${RANLIB}" = "" ; then - as_fn_error "Required archive index tool 'ranlib' not found on PATH." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Required archive index tool 'ranlib' not found on PATH." >&5 +echo "$as_me: error: Required archive index tool 'ranlib' not found on PATH." >&2;} + { (exit 1); exit 1; }; } fi if test "${RC}" = "" ; then - as_fn_error "Required resource tool 'windres' not found on PATH." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Required resource tool 'windres' not found on PATH." >&5 +echo "$as_me: error: Required resource tool 'windres' not found on PATH." >&2;} + { (exit 1); exit 1; }; } fi fi @@ -3368,34 +2903,32 @@ fi # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF -SHELL = /bin/sh all: - @echo '@@@%%%=$(MAKE)=@@@%%%' + @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi rm -f conftest.make fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -3405,15 +2938,19 @@ fi #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5 -$as_echo_n "checking for SEH support in compiler... " >&6; } -if test "${tcl_cv_seh+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 +echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6 +if test "${tcl_cv_seh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then tcl_cv_seh=no else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3432,22 +2969,37 @@ int main(int argc, char** argv) { } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_seh=yes else - tcl_cv_seh=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +tcl_cv_seh=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5 -$as_echo "$tcl_cv_seh" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5 +echo "${ECHO_T}$tcl_cv_seh" >&6 if test "$tcl_cv_seh" = "no" ; then -$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_NO_SEH 1 +_ACEOF fi @@ -3457,12 +3009,16 @@ fi # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5 -$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; } -if test "${tcl_cv_eh_disposition+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5 +echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6 +if test "${tcl_cv_eh_disposition+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3479,19 +3035,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_eh_disposition=yes else - tcl_cv_eh_disposition=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_eh_disposition=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5 -$as_echo "$tcl_cv_eh_disposition" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5 +echo "${ECHO_T}$tcl_cv_eh_disposition" >&6 if test "$tcl_cv_eh_disposition" = "no" ; then -$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define EXCEPTION_DISPOSITION int +_ACEOF fi @@ -3499,12 +3081,16 @@ fi # Check to see if the winsock2.h include file provided contains # typedefs like LPFN_ACCEPT and friends. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LPFN_ACCEPT support in winsock2.h" >&5 -$as_echo_n "checking for LPFN_ACCEPT support in winsock2.h... " >&6; } -if test "${tcl_cv_lpfn_decls+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for LPFN_ACCEPT support in winsock2.h" >&5 +echo $ECHO_N "checking for LPFN_ACCEPT support in winsock2.h... $ECHO_C" >&6 +if test "${tcl_cv_lpfn_decls+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3522,19 +3108,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_lpfn_decls=yes else - tcl_cv_lpfn_decls=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_lpfn_decls=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lpfn_decls" >&5 -$as_echo "$tcl_cv_lpfn_decls" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_lpfn_decls" >&5 +echo "${ECHO_T}$tcl_cv_lpfn_decls" >&6 if test "$tcl_cv_lpfn_decls" = "no" ; then -$as_echo "#define HAVE_NO_LPFN_DECLS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_NO_LPFN_DECLS 1 +_ACEOF fi @@ -3542,12 +3154,16 @@ fi # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5 -$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; } -if test "${tcl_cv_winnt_ignore_void+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5 +echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6 +if test "${tcl_cv_winnt_ignore_void+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define VOID void @@ -3567,19 +3183,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_winnt_ignore_void=yes else - tcl_cv_winnt_ignore_void=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_winnt_ignore_void=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5 -$as_echo "$tcl_cv_winnt_ignore_void" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5 +echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6 if test "$tcl_cv_winnt_ignore_void" = "yes" ; then -$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_WINNT_IGNORE_VOID 1 +_ACEOF fi @@ -3593,12 +3235,16 @@ fi # register and not on the stack. Instead, we just # call it from inline asm code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca declaration in malloc.h" >&5 -$as_echo_n "checking for alloca declaration in malloc.h... " >&6; } -if test "${tcl_cv_malloc_decl_alloca+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for alloca declaration in malloc.h" >&5 +echo $ECHO_N "checking for alloca declaration in malloc.h... $ECHO_C" >&6 +if test "${tcl_cv_malloc_decl_alloca+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include @@ -3616,20 +3262,46 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_malloc_decl_alloca=yes else - tcl_cv_malloc_decl_alloca=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_malloc_decl_alloca=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_malloc_decl_alloca" >&5 -$as_echo "$tcl_cv_malloc_decl_alloca" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_malloc_decl_alloca" >&5 +echo "${ECHO_T}$tcl_cv_malloc_decl_alloca" >&6 if test "$tcl_cv_malloc_decl_alloca" = "no" && test "${GCC}" = "yes" ; then -$as_echo "#define HAVE_ALLOCA_GCC_INLINE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_GCC_INLINE 1 +_ACEOF fi @@ -3637,12 +3309,16 @@ fi # This is used to stop gcc from printing a compiler # warning when initializing a union member. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 -$as_echo_n "checking for cast to union support... " >&6; } -if test "${tcl_cv_cast_to_union+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for cast to union support" >&5 +echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6 +if test "${tcl_cv_cast_to_union+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3656,19 +3332,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_cast_to_union=yes else - tcl_cv_cast_to_union=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_cast_to_union=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5 -$as_echo "$tcl_cv_cast_to_union" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5 +echo "${ECHO_T}$tcl_cv_cast_to_union" >&6 if test "$tcl_cv_cast_to_union" = "yes"; then -$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_CAST_TO_UNION 1 +_ACEOF fi @@ -3677,12 +3379,16 @@ fi # missing from winbase.h. This is known to be # a problem with VC++ 5.2. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 -$as_echo_n "checking for FINDEX_INFO_LEVELS in winbase.h... " >&6; } -if test "${tcl_cv_findex_enums+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5 +echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6 +if test "${tcl_cv_findex_enums+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3700,31 +3406,61 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_findex_enums=yes else - tcl_cv_findex_enums=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_findex_enums=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_findex_enums" >&5 -$as_echo "$tcl_cv_findex_enums" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5 +echo "${ECHO_T}$tcl_cv_findex_enums" >&6 if test "$tcl_cv_findex_enums" = "no"; then -$as_echo "#define HAVE_NO_FINDEX_ENUMS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_NO_FINDEX_ENUMS 1 +_ACEOF fi # See if MWMO_ALERTABLE is missing from winuser.h # This is known to be a problem with Mingw. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MWMO_ALERTABLE in winuser.h" >&5 -$as_echo_n "checking for MWMO_ALERTABLE in winuser.h... " >&6; } -if test "${tcl_cv_mwmo_alertable+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 +echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6 +if test "${tcl_cv_mwmo_alertable+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN @@ -3741,19 +3477,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then tcl_cv_mwmo_alertable=yes else - tcl_cv_mwmo_alertable=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_mwmo_alertable=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_mwmo_alertable" >&5 -$as_echo "$tcl_cv_mwmo_alertable" >&6; } +echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 +echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6 if test "$tcl_cv_mwmo_alertable" = "no"; then -$as_echo "#define HAVE_NO_MWMO_ALERTABLE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_NO_MWMO_ALERTABLE 1 +_ACEOF fi @@ -3769,30 +3531,34 @@ fi #-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5 -$as_echo_n "checking for building with threads... " >&6; } - # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then : - enableval=$enable_threads; tcl_ok=$enableval + echo "$as_me:$LINENO: checking for building with threads" >&5 +echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 + # Check whether --enable-threads or --disable-threads was given. +if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "$tcl_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 TCL_THREADS=1 - $as_echo "#define TCL_THREADS 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_THREADS 1 +_ACEOF # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention - $as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define USE_THREAD_ALLOC 1 +_ACEOF else TCL_THREADS=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi @@ -3803,11 +3569,11 @@ $as_echo "no" >&6; } -# Check whether --with-encoding was given. -if test "${with_encoding+set}" = set; then : - withval=$with_encoding; with_tcencoding=${withval} -fi - +# Check whether --with-encoding or --without-encoding was given. +if test "${with_encoding+set}" = set; then + withval="$with_encoding" + with_tcencoding=${withval} +fi; if test x"${with_tcencoding}" != x ; then cat >>confdefs.h <<_ACEOF @@ -3816,7 +3582,9 @@ _ACEOF else # Default encoding on windows is not "iso8859-1" - $as_echo "#define TCL_CFGVAL_ENCODING \"cp1252\"" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_CFGVAL_ENCODING "cp1252" +_ACEOF fi @@ -3827,15 +3595,15 @@ _ACEOF #-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 -$as_echo_n "checking how to build libraries... " >&6; } - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; tcl_ok=$enableval + echo "$as_me:$LINENO: checking how to build libraries" >&5 +echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6 + # Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval else tcl_ok=yes -fi - +fi; if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -3845,14 +3613,16 @@ fi fi if test "$tcl_ok" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 -$as_echo "shared" >&6; } + echo "$as_me:$LINENO: result: shared" >&5 +echo "${ECHO_T}shared" >&6 SHARED_BUILD=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 -$as_echo "static" >&6; } + echo "$as_me:$LINENO: result: static" >&5 +echo "${ECHO_T}static" >&6 SHARED_BUILD=0 - $as_echo "#define STATIC_BUILD 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define STATIC_BUILD 1 +_ACEOF fi @@ -3864,16 +3634,70 @@ $as_echo "static" >&6; } #-------------------------------------------------------------------- # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3885,54 +3709,54 @@ done # Step 0: Enable 64 bit support? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 -$as_echo_n "checking if 64bit support is requested... " >&6; } - # Check whether --enable-64bit was given. -if test "${enable_64bit+set}" = set; then : - enableval=$enable_64bit; do64bit=$enableval + echo "$as_me:$LINENO: checking if 64bit support is requested" >&5 +echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6 + # Check whether --enable-64bit or --disable-64bit was given. +if test "${enable_64bit+set}" = set; then + enableval="$enable_64bit" + do64bit=$enableval else do64bit=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 -$as_echo "$do64bit" >&6; } +fi; + echo "$as_me:$LINENO: result: $do64bit" >&5 +echo "${ECHO_T}$do64bit" >&6 # Cross-compiling options for Windows/CE builds - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5 -$as_echo_n "checking if Windows/CE build is requested... " >&6; } - # Check whether --enable-wince was given. -if test "${enable_wince+set}" = set; then : - enableval=$enable_wince; doWince=$enableval + echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5 +echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6 + # Check whether --enable-wince or --disable-wince was given. +if test "${enable_wince+set}" = set; then + enableval="$enable_wince" + doWince=$enableval else doWince=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5 -$as_echo "$doWince" >&6; } +fi; + echo "$as_me:$LINENO: result: $doWince" >&5 +echo "${ECHO_T}$doWince" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5 -$as_echo_n "checking for Windows/CE celib directory... " >&6; } + echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5 +echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6 -# Check whether --with-celib was given. -if test "${with_celib+set}" = set; then : - withval=$with_celib; CELIB_DIR=$withval +# Check whether --with-celib or --without-celib was given. +if test "${with_celib+set}" = set; then + withval="$with_celib" + CELIB_DIR=$withval else CELIB_DIR=NO_CELIB -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CELIB_DIR" >&5 -$as_echo "$CELIB_DIR" >&6; } +fi; + echo "$as_me:$LINENO: result: $CELIB_DIR" >&5 +echo "${ECHO_T}$CELIB_DIR" >&6 # Set some defaults (may get changed below) EXTRA_CFLAGS="" # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CYGPATH+set}" = set; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CYGPATH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CYGPATH"; then ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. @@ -3942,30 +3766,28 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CYGPATH="cygpath -w" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" fi fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 -$as_echo "$CYGPATH" >&6; } + echo "$as_me:$LINENO: result: $CYGPATH" >&5 +echo "${ECHO_T}$CYGPATH" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - SHLIB_SUFFIX=".dll" # Check for a bug in gcc's windres that causes the @@ -3981,32 +3803,36 @@ fi echo "101 \"name\"" >> $conftest echo "END" >> $conftest - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows native path bug in windres" >&5 -$as_echo_n "checking for Windows native path bug in windres... " >&6; } + echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5 +echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6 cyg_conftest=`$CYGPATH $conftest` if { ac_try='$RC -o conftest.res.o $cyg_conftest' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } ; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 CYGPATH=echo fi conftest= cyg_conftest= fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cygwin version of gcc" >&5 -$as_echo_n "checking for Cygwin version of gcc... " >&6; } -if test "${ac_cv_cygwin+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 +echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 +if test "${ac_cv_cygwin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __CYGWIN__ @@ -4021,21 +3847,45 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_cygwin=no else - ac_cv_cygwin=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_cygwin=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cygwin" >&5 -$as_echo "$ac_cv_cygwin" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 +echo "${ECHO_T}$ac_cv_cygwin" >&6 if test "$ac_cv_cygwin" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling under Cygwin is not currently supported. + { echo "$as_me:$LINENO: WARNING: Compiling under Cygwin is not currently supported. If you are not sure you want this, see the README file for information about building with Mingw." >&5 -$as_echo "$as_me: WARNING: Compiling under Cygwin is not currently supported. +echo "$as_me: WARNING: Compiling under Cygwin is not currently supported. If you are not sure you want this, see the README file for information about building with Mingw." >&2;} fi @@ -4047,12 +3897,12 @@ file for information about building with Mingw." >&2;} # set various compiler flags depending on whether we are using gcc or cl - { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5 -$as_echo_n "checking compiler flags... " >&6; } + echo "$as_me:$LINENO: checking compiler flags" >&5 +echo $ECHO_N "checking compiler flags... $ECHO_C" >&6 if test "${GCC}" = "yes" ; then if test "$do64bit" != "no" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on Windows" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} + { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on Windows" >&5 +echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} fi SHLIB_LD="" SHLIB_LD_LIBS='${LIBS}' @@ -4090,20 +3940,23 @@ $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} if test "${SHARED_BUILD}" = "0" ; then # static - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 -$as_echo "using static flags" >&6; } + echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6 runtime= LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else # dynamic - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 -$as_echo "using shared flags" >&6; } + echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6 # ad-hoc check to see if CC supports -shared. if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then - as_fn_error "${CC} does not support the -shared option. - You will need to upgrade to a newer version of the toolchain." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: ${CC} does not support the -shared option. + You will need to upgrade to a newer version of the toolchain." >&5 +echo "$as_me: error: ${CC} does not support the -shared option. + You will need to upgrade to a newer version of the toolchain." >&2;} + { (exit 1); exit 1; }; } fi runtime= @@ -4160,15 +4013,15 @@ $as_echo "using shared flags" >&6; } else if test "${SHARED_BUILD}" = "0" ; then # static - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5 -$as_echo "using static flags" >&6; } + echo "$as_me:$LINENO: result: using static flags" >&5 +echo "${ECHO_T}using static flags" >&6 runtime=-MT LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" else # dynamic - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5 -$as_echo "using shared flags" >&6; } + echo "$as_me:$LINENO: result: using shared flags" >&5 +echo "${ECHO_T}using shared flags" >&6 runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. LIBRARIES="\${SHARED_LIBRARIES}" @@ -4204,14 +4057,14 @@ $as_echo "using shared flags" >&6; } ;; esac if test ! -d "${PATH64}" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 -$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5 -$as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} + { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 +echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} + { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5 +echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} do64bit="no" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5 -$as_echo " Using 64-bit $MACHINE mode" >&6; } + echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5 +echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 fi fi @@ -4222,9 +4075,64 @@ $as_echo " Using 64-bit $MACHINE mode" >&6; } # TEA_PATH_NOSPACE to avoid this issue. # Check if _WIN64 is already recognized, and if so we don't # need to modify CC. - ac_fn_c_check_decl "$LINENO" "_WIN64" "ac_cv_have_decl__WIN64" "$ac_includes_default" -if test "x$ac_cv_have_decl__WIN64" = x""yes; then : + echo "$as_me:$LINENO: checking whether _WIN64 is declared" >&5 +echo $ECHO_N "checking whether _WIN64 is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl__WIN64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef _WIN64 + char *p = (char *) _WIN64; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl__WIN64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_have_decl__WIN64=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl__WIN64" >&5 +echo "${ECHO_T}$ac_cv_have_decl__WIN64" >&6 +if test $ac_cv_have_decl__WIN64 = yes; then + : else CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ -I\"${MSSDK}/Include/crt\" \ @@ -4292,11 +4200,15 @@ fi SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` if test ! -d "${CELIB_DIR}/inc"; then - as_fn_error "Invalid celib directory \"${CELIB_DIR}\"" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Invalid celib directory \"${CELIB_DIR}\"" >&5 +echo "$as_me: error: Invalid celib directory \"${CELIB_DIR}\"" >&2;} + { (exit 1); exit 1; }; } fi if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"\ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then - as_fn_error "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5 +echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;} + { (exit 1); exit 1; }; } else CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" if test -d "${CEINCLUDE}/${TARGETCPU}" ; then @@ -4391,7 +4303,9 @@ _ACEOF fi if test "$do64bit" != "no" ; then - $as_echo "#define TCL_CFG_DO64BIT 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_DO64BIT 1 +_ACEOF fi @@ -4407,13 +4321,13 @@ _ACEOF # as we just assume that the platform hasn't got a usable z.lib #------------------------------------------------------------------------ -if test "$do64bit" = "yes"; then : +if test "$do64bit" = "yes"; then tcl_ok=no else -if test "${enable_shared+set}" = "set"; then : +if test "${enable_shared+set}" = "set"; then enableval="$enable_shared" tcl_ok=$enableval @@ -4424,8 +4338,10 @@ else fi + fi -if test "$tcl_ok" = "yes"; then : + +if test "$tcl_ok" = "yes"; then ZLIB_DLL_FILE=\${ZLIB_DLL_FILE} @@ -4439,7 +4355,10 @@ else fi -$as_echo "#define HAVE_ZLIB 1" >>confdefs.h + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB 1 +_ACEOF #-------------------------------------------------------------------- @@ -4449,58 +4368,68 @@ $as_echo "#define HAVE_ZLIB 1" >>confdefs.h #-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 -$as_echo_n "checking for build with symbols... " >&6; } - # Check whether --enable-symbols was given. -if test "${enable_symbols+set}" = set; then : - enableval=$enable_symbols; tcl_ok=$enableval + echo "$as_me:$LINENO: checking for build with symbols" >&5 +echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 + # Check whether --enable-symbols or --disable-symbols was given. +if test "${enable_symbols+set}" = set; then + enableval="$enable_symbols" + tcl_ok=$enableval else tcl_ok=no -fi - +fi; # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 - $as_echo "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_OPTIMIZED 1 +_ACEOF else CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' DBGX=g if test "$tcl_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 -$as_echo "yes (standard debugging)" >&6; } + echo "$as_me:$LINENO: result: yes (standard debugging)" >&5 +echo "${ECHO_T}yes (standard debugging)" >&6 fi fi - $as_echo "#define TCL_CFG_DEBUG 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_CFG_DEBUG 1 +_ACEOF if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then - $as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_MEM_DEBUG 1 +_ACEOF fi if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then - $as_echo "#define TCL_COMPILE_DEBUG 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_COMPILE_DEBUG 1 +_ACEOF - $as_echo "#define TCL_COMPILE_STATS 1" >>confdefs.h + cat >>confdefs.h <<\_ACEOF +#define TCL_COMPILE_STATS 1 +_ACEOF fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem compile debugging" >&5 -$as_echo "enabled symbols mem compile debugging" >&6; } + echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5 +echo "${ECHO_T}enabled symbols mem compile debugging" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 -$as_echo "enabled $tcl_ok debugging" >&6; } + echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5 +echo "${ECHO_T}enabled $tcl_ok debugging" >&6 fi fi @@ -4675,8 +4604,7 @@ fi -ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" - + ac_config_files="$ac_config_files Makefile tclConfig.sh tcl.hpj" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -4695,59 +4623,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -4756,54 +4664,63 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, +# take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} +cat >confdef2opt.sed <<\_ACEOF t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -4812,13 +4729,11 @@ LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -4828,252 +4743,81 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + as_unset=false fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -5081,123 +4825,148 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - +rm -f conf$$ conf$$.exe conf$$.file -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5206,20 +4975,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to + +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by $as_me, which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5227,106 +5007,124 @@ generated by GNU Autoconf 2.64. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi -_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages + -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files -Report bugs to the package provider." - +Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk +srcdir=$srcdir _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -5340,46 +5138,32 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Handling of arguments. + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "tclConfig.sh") CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; - "tcl.hpj") CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh" ;; + "tcl.hpj" ) CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -5389,403 +5173,413 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || { - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" +cat >>$CONFIG_STATUS <<_ACEOF +# +# CONFIG_FILES section. +# -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@AR@,$AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@RC@,$RC,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@TCL_THREADS@,$TCL_THREADS,;t t +s,@CYGPATH@,$CYGPATH,;t t +s,@CELIB_DIR@,$CELIB_DIR,;t t +s,@DL_LIBS@,$DL_LIBS,;t t +s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t +s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t +s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t +s,@ZLIB_DLL_FILE@,$ZLIB_DLL_FILE,;t t +s,@ZLIB_LIBS@,$ZLIB_LIBS,;t t +s,@ZLIB_OBJS@,$ZLIB_OBJS,;t t +s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t +s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t +s,@TCL_VERSION@,$TCL_VERSION,;t t +s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t +s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t +s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t +s,@PKG_CFG_ARGS@,$PKG_CFG_ARGS,;t t +s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t +s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t +s,@TCL_STATIC_LIB_FILE@,$TCL_STATIC_LIB_FILE,;t t +s,@TCL_STATIC_LIB_FLAG@,$TCL_STATIC_LIB_FLAG,;t t +s,@TCL_IMPORT_LIB_FILE@,$TCL_IMPORT_LIB_FILE,;t t +s,@TCL_IMPORT_LIB_FLAG@,$TCL_IMPORT_LIB_FLAG,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t +s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t +s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t +s,@TCL_STUB_LIB_PATH@,$TCL_STUB_LIB_PATH,;t t +s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t +s,@TCL_BUILD_STUB_LIB_PATH@,$TCL_BUILD_STUB_LIB_PATH,;t t +s,@TCL_DLL_FILE@,$TCL_DLL_FILE,;t t +s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t +s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t +s,@TCL_DBGX@,$TCL_DBGX,;t t +s,@CFG_TCL_SHARED_LIB_SUFFIX@,$CFG_TCL_SHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,$CFG_TCL_UNSHARED_LIB_SUFFIX,;t t +s,@CFG_TCL_EXPORT_FILE_SUFFIX@,$CFG_TCL_EXPORT_FILE_SUFFIX,;t t +s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t +s,@DEPARG@,$DEPARG,;t t +s,@CC_OBJNAME@,$CC_OBJNAME,;t t +s,@CC_EXENAME@,$CC_EXENAME,;t t +s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t +s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t +s,@LDFLAGS_CONSOLE@,$LDFLAGS_CONSOLE,;t t +s,@LDFLAGS_WINDOW@,$LDFLAGS_WINDOW,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t +s,@LIBS_GUI@,$LIBS_GUI,;t t +s,@DLLSUFFIX@,$DLLSUFFIX,;t t +s,@LIBPREFIX@,$LIBPREFIX,;t t +s,@LIBSUFFIX@,$LIBSUFFIX,;t t +s,@EXESUFFIX@,$EXESUFFIX,;t t +s,@LIBRARIES@,$LIBRARIES,;t t +s,@MAKE_LIB@,$MAKE_LIB,;t t +s,@POST_MAKE_LIB@,$POST_MAKE_LIB,;t t +s,@MAKE_DLL@,$MAKE_DLL,;t t +s,@MAKE_EXE@,$MAKE_EXE,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_LD_SEARCH_FLAGS@,$TCL_LD_SEARCH_FLAGS,;t t +s,@TCL_NEEDS_EXP_FILE@,$TCL_NEEDS_EXP_FILE,;t t +s,@TCL_BUILD_EXP_FILE@,$TCL_BUILD_EXP_FILE,;t t +s,@TCL_EXP_FILE@,$TCL_EXP_FILE,;t t +s,@TCL_LIB_VERSIONS_OK@,$TCL_LIB_VERSIONS_OK,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TCL_DDE_VERSION@,$TCL_DDE_VERSION,;t t +s,@TCL_DDE_MAJOR_VERSION@,$TCL_DDE_MAJOR_VERSION,;t t +s,@TCL_DDE_MINOR_VERSION@,$TCL_DDE_MINOR_VERSION,;t t +s,@TCL_DDE_PATCH_LEVEL@,$TCL_DDE_PATCH_LEVEL,;t t +s,@TCL_REG_VERSION@,$TCL_REG_VERSION,;t t +s,@TCL_REG_MAJOR_VERSION@,$TCL_REG_MAJOR_VERSION,;t t +s,@TCL_REG_MINOR_VERSION@,$TCL_REG_MINOR_VERSION,;t t +s,@TCL_REG_PATCH_LEVEL@,$TCL_REG_PATCH_LEVEL,;t t +s,@RC_OUT@,$RC_OUT,;t t +s,@RC_TYPE@,$RC_TYPE,;t t +s,@RC_INCLUDE@,$RC_INCLUDE,;t t +s,@RC_DEFINE@,$RC_DEFINE,;t t +s,@RC_DEFINES@,$RC_DEFINES,;t t +s,@RES@,$RES,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done +_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -5805,11 +5599,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + $ac_cs_success || { (exit 1); exit 1; } fi -- cgit v0.12 From 69dd39646acc517c7190cb6bd2b3f21f1112d805 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 6 Apr 2010 12:35:03 +0000 Subject: Fix signature of Tcl_LoadFile in documentation --- ChangeLog | 1 + doc/Load.3 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33b83f6..b250a01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ * unix/configure * unix/installManPage [Bug 2982540] configure and install* script files * unix/install-sh should always have LF + * doc/Load.3 Fix signature of Tcl_LoadFile in documentation 2010-04-05 Alexandre Ferrieux diff --git a/doc/Load.3 b/doc/Load.3 index a8e8910..9664523 100644 --- a/doc/Load.3 +++ b/doc/Load.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Load.3,v 1.1 2010/04/04 15:03:07 dkf Exp $ +'\" RCS: @(#) $Id: Load.3,v 1.2 2010/04/06 12:35:03 nijtmans Exp $ '\" .so man.macros .TH Load 3 8.6 Tcl "Tcl Library Procedures" @@ -28,7 +28,7 @@ Interpreter to use for reporting error messages. .AP Tcl_Obj *pathPtr in The name of the file to load. If it is a single name, the library search path of the current environment will be used to resolve it. -.AP "const char" *symbols[] in +.AP "const char *const" symbols[] in Array of names of symbols to be resolved during the load of the library, or NULL if no symbols are to be resolved. If an array is given, the last entry in the array must be NULL. -- cgit v0.12 From 0acf99fc0c30894bc2055dd0c2fe1ca163c8aea0 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 6 Apr 2010 12:51:44 +0000 Subject: * doc/Load.3: Minor corrections of formatting and cross links. --- ChangeLog | 14 +++++++++----- doc/Load.3 | 12 ++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index b250a01..f6514da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,14 @@ +2010-04-06 Donal K. Fellows + + * doc/Load.3: Minor corrections of formatting and cross links. + 2010-04-06 Jan Nijtmans - * win/configure (regenerate with autoconf-2.59) - * unix/configure - * unix/installManPage [Bug 2982540] configure and install* script files - * unix/install-sh should always have LF - * doc/Load.3 Fix signature of Tcl_LoadFile in documentation + * win/configure: (regenerate with autoconf-2.59) + * unix/configure: + * unix/installManPage: [Bug 2982540]: configure and install* script + * unix/install-sh: files should always have LF line ending. + * doc/Load.3: Fix signature of Tcl_LoadFile in documentation. 2010-04-05 Alexandre Ferrieux diff --git a/doc/Load.3 b/doc/Load.3 index 9664523..9b9ffab 100644 --- a/doc/Load.3 +++ b/doc/Load.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Load.3,v 1.2 2010/04/06 12:35:03 nijtmans Exp $ +'\" RCS: @(#) $Id: Load.3,v 1.3 2010/04/06 12:51:44 dkf Exp $ '\" .so man.macros .TH Load 3 8.6 Tcl "Tcl Library Procedures" @@ -17,12 +17,12 @@ Tcl_LoadFile, Tcl_FindSymbol \- platform-independent dynamic library loading \fB#include \fR .sp int -Tcl_LoadFile(interp, pathPtr, symbols, flags, procPtrs, loadHandlePtr) +\fBTcl_LoadFile\fR(\fIinterp, pathPtr, symbols, flags, procPtrs, loadHandlePtr\fR) .sp void * -Tcl_FindSymbol(interp, loadHandle, symbol) +\fBTcl_FindSymbol\fR(\fIinterp, loadHandle, symbol\fR) .SH ARGUMENTS -.AS Tcl_LoadHandle *loadHandlePtr out +.AS Tcl_LoadHandle loadHandle in .AP Tcl_Interp *interp in Interpreter to use for reporting error messages. .AP Tcl_Obj *pathPtr in @@ -40,7 +40,7 @@ the \fIsymbols\fR argument. Should be NULL if no symbols are to be resolved. .AP Tcl_LoadHandle *loadHandlePtr out Points to a variable that will hold the handle to the abstract token describing the library that has been loaded. -.AP Tcl_LoadHandle loadHandle +.AP Tcl_LoadHandle loadHandle in Abstract token describing the library to look up a symbol in. .AP "const char" *symbol in The name of the symbol to look up. @@ -62,7 +62,7 @@ the symbol cannot be found, it returns NULL and sets an error message in the given \fIinterp\fR (if that is non-NULL). Note that it is unsafe to use this operation on a handle that has been passed to \fBTcl_FSUnloadFile\fR. .SH "SEE ALSO" -Tcl_FSLoad(3), Tcl_FSUnload(3), load(n), unload(n) +Tcl_FSLoadFile(3), Tcl_FSUnloadFile(3), load(n), unload(n) .SH KEYWORDS binary code, loading, shared library '\" Local Variables: -- cgit v0.12 From abb21bd3a6f2e9dd7cf5b131519cde734507e075 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Tue, 6 Apr 2010 19:59:48 +0000 Subject: Repair missing bits in ChangeLog --- ChangeLog | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6514da..c38f615 100644 --- a/ChangeLog +++ b/ChangeLog @@ -62,10 +62,21 @@ 2010-04-02 Kevin B. Kenny TIP #357 IMPLEMENTATION + TIP #362 IMPLEMENTATION + + * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallest + floating point number until it is actually used. (This change avoids a + bogus syslog message regarding a 'floating point software assist + fault' on SGI systems.) + + * library/reg/pkgIndex.tcl: [TIP #362]: Fixed first round of bugs + * tests/registry.test: resulting from the recent commits of + * win/tclWinReg.c: changes in support of the referenced + TIP. - * generic/tcl.decls: First round of changes to export - * generic/tclDecls.h: Tcl_LoadFile, Tcl_FindSymbol, and - * generic/tclIOUtil.c: Tcl_FSUnloadFile to the public API. + * generic/tcl.decls: [TIP #357]: First round of changes + * generic/tclDecls.h: to export Tcl_LoadFile, Tcl_FindSymbol, + * generic/tclIOUtil.c: and Tcl_FSUnloadFile to the public API. * generic/tclInt.h: * generic/tclLoad.c: * generic/tclLoadNone.c: @@ -81,16 +92,6 @@ * unix/tclUnixPipe.c: * win/Makefile.in: * win/tclWinLoad.c: - - * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallest - floating point number until it is actually used. (This change avoids a - bogus syslog message regarding a 'floating point software assist - fault' on SGI systems.) - - * library/reg/pkgIndex.tcl: [TIP #362]: Fixed first round of bugs - * tests/registry.test: resulting from the recent commits of - * win/tclWinReg.c: changes in support of the referenced - TIP. 2010-03-31 Donal K. Fellows -- cgit v0.12 From 9a41057f12f98c43dddf469be6d0822f1c90384c Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 Apr 2010 09:51:31 +0000 Subject: Formatting improvements for error stack docs --- ChangeLog | 40 +++++++++++++++++++--------------- doc/catch.n | 71 +++++++++++++++++++++++++++++++++++++----------------------- doc/info.n | 25 +++++++++++---------- doc/return.n | 10 +++++---- 4 files changed, 85 insertions(+), 61 deletions(-) diff --git a/ChangeLog b/ChangeLog index c38f615..2df8edc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-07 Donal K. Fellows + + * doc/catch.n, doc/info.n, doc/return.n: Formatting. + 2010-04-06 Donal K. Fellows * doc/Load.3: Minor corrections of formatting and cross links. @@ -12,22 +16,22 @@ 2010-04-05 Alexandre Ferrieux - TIP #348 IMPLEMENTATION - Substituted error stack + TIP #348 IMPLEMENTATION - * generic/tclBasic.c - * generic/tclCmdIL.c - * generic/tclInt.h - * generic/tclNamesp.c - * generic/tclResult.c - * doc/catch.n - * doc/info.n - * doc/return.n - * tests/cmdMZ.test - * tests/error.test - * tests/execute.test - * tests/info.test - * tests/init.test - * tests/result.test + * generic/tclBasic.c: [Patch 2868499]: Substituted error stack + * generic/tclCmdIL.c: + * generic/tclInt.h: + * generic/tclNamesp.c: + * generic/tclResult.c: + * doc/catch.n: + * doc/info.n: + * doc/return.n: + * tests/cmdMZ.test: + * tests/error.test: + * tests/execute.test: + * tests/info.test: + * tests/init.test: + * tests/result.test: 2010-04-05 Donal K. Fellows @@ -75,9 +79,9 @@ TIP. * generic/tcl.decls: [TIP #357]: First round of changes - * generic/tclDecls.h: to export Tcl_LoadFile, Tcl_FindSymbol, - * generic/tclIOUtil.c: and Tcl_FSUnloadFile to the public API. - * generic/tclInt.h: + * generic/tclDecls.h: to export Tcl_LoadFile, + * generic/tclIOUtil.c: Tcl_FindSymbol, and Tcl_FSUnloadFile + * generic/tclInt.h: to the public API. * generic/tclLoad.c: * generic/tclLoadNone.c: * generic/tclStubInit.c: diff --git a/doc/catch.n b/doc/catch.n index 1efb082..691b0c7 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.24 2010/04/05 19:44:45 ferrieux Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.25 2010/04/07 09:51:31 dkf Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -34,7 +34,7 @@ by a return code of \fBTCL_ERROR\fR. The other exceptional return codes are returned by the \fBreturn\fR, \fBbreak\fR, and \fBcontinue\fR commands and in other special situations as documented. Tcl packages can define new commands that return other integer values as return codes as well, -and scripts that make use of the \fBreturn -code\fR command can also +and scripts that make use of the \fBreturn \-code\fR command can also have return codes other than the five defined by Tcl. .PP If the \fIresultVarName\fR argument is given, then the variable it names is @@ -57,33 +57,46 @@ further described in the documentation for the \fBreturn\fR command. When the return code from evaluation of \fIscript\fR is \fBTCL_ERROR\fR, four additional entries are defined in the dictionary of return options stored in \fIoptionsVarName\fR: \fB\-errorinfo\fR, -\fB\-errorcode\fR, \fB\-errorline\fR, and \fB\-errorstack\fR. The -value of the \fB\-errorinfo\fR entry is a formatted stack trace -containing more information about the context in which the error -happened. The formatted stack trace is meant to be read by a person. -The value of the \fB\-errorcode\fR entry is additional information -about the error stored as a list. The \fB\-errorcode\fR value is -meant to be further processed by programs, and may not be particularly -readable by people. The value of the \fB\-errorline\fR entry is an -integer indicating which line of \fIscript\fR was being evaluated when -the error occurred. The value of the \fB\-errorstack\fR entry is an +\fB\-errorcode\fR, \fB\-errorline\fR, and +.VS 8.6 +\fB\-errorstack\fR. +.VE 8.6 +The value of the \fB\-errorinfo\fR entry is a formatted stack trace containing +more information about the context in which the error happened. The formatted +stack trace is meant to be read by a person. The value of the +\fB\-errorcode\fR entry is additional information about the error stored as a +list. The \fB\-errorcode\fR value is meant to be further processed by +programs, and may not be particularly readable by people. The value of the +\fB\-errorline\fR entry is an integer indicating which line of \fIscript\fR +was being evaluated when the error occurred. +.VS 8.6 +The value of the \fB\-errorstack\fR entry is an even-sized list made of token-parameter pairs accumulated while -unwinding the stack. The token may be "CALL", in which case the -parameter is a list made of the proc name and arguments at the -corresponding level; or it may be "UP", in which case the parameter is -the relative [uplevel] of the previous CALL. The salient differences -wrt -errorinfo are that (1) it is a machine-readable form amenable to -[foreach {tok prm} ...], (2) it contains the true (substituted) values -passed to the functions, instead of the static text of the calling -sites, and (3) it is coarser-grained, with only one element per stack -frame (like procs; no separate elements for [foreach] constructs for -example). - +unwinding the stack. The token may be +.QW \fBCALL\fR , +in which case the parameter is a list made of the proc name and arguments at +the corresponding level; or it may be +.QW \fBUP\fR , +in which case the parameter is +the relative level (as in \fBuplevel\fR) of the previous \fBCALL\fR. The +salient differences wrt \fB\-errorinfo\fR are that: +.IP (1) +it is a machine-readable form that is amenable to processing with +[\fBforeach\fR {tok prm} ...], +.IP (2) +it contains the true (substituted) values passed to the functions, instead of +the static text of the calling sites, and +.IP (3) +it is coarser-grained, with only one element per stack frame (like procs; no +separate elements for \fBforeach\fR constructs for example). +.VE 8.6 +.PP The values of the \fB\-errorinfo\fR and \fB\-errorcode\fR entries of the most recent error are also available as values of the global -variables \fB::errorInfo\fR and \fB::errorCode\fR respectively. The -value of the \fB\-errorstack\fR entry surfaces as \fBinfo -errorstack\fR. +variables \fB::errorInfo\fR and \fB::errorCode\fR respectively. +.VS 8.6 +The value of the \fB\-errorstack\fR entry surfaces as \fBinfo errorstack\fR. +.VE 8.6 .PP Tcl packages may provide commands that set other entries in the dictionary of return options, and the \fBreturn\fR command may be @@ -104,6 +117,10 @@ if { [\fBcatch\fR {open $someFile w} fid] } { There are more complex examples of \fBcatch\fR usage in the documentation for the \fBreturn\fR command. .SH "SEE ALSO" -break(n), continue(n), dict(n), error(n), return(n), tclvars(n) +break(n), continue(n), dict(n), error(n), info(n), return(n), tclvars(n) .SH KEYWORDS catch, error, exception +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: diff --git a/doc/info.n b/doc/info.n index 3076274..63ce180 100644 --- a/doc/info.n +++ b/doc/info.n @@ -8,7 +8,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: info.n,v 1.37 2010/04/05 19:44:45 ferrieux Exp $ +'\" RCS: @(#) $Id: info.n,v 1.38 2010/04/07 09:51:31 dkf Exp $ '\" .so man.macros .TH info n 8.4 Tcl "Tcl Built-In Commands" @@ -95,14 +95,14 @@ Otherwise it returns \fB1\fR and places the default value of \fIarg\fR into variable \fIvarname\fR. .TP \fBinfo errorstack \fR?\fIinterp\fR? -. -Returns a list of lists made of the function names and arguments at -each level from the call stack of the last error in the given -\fIinterp\fR, or in the current one if not specified. This -information is also present in the -errorstack entry of the options -dictionary returned by 3-arg \fBcatch\fR; \fBinfo errorstack\fR is a -convenient way of retrieving it for uncaught errors at toplevel in an -interactive tclsh. +.VS 8.6 +Returns a list of lists made of the function names and arguments at each level +from the call stack of the last error in the given \fIinterp\fR, or in the +current one if not specified. This information is also present in the +\fB\-errorstack\fR entry of the options dictionary returned by 3-argument +\fBcatch\fR; \fBinfo errorstack\fR is a convenient way of retrieving it for +uncaught errors at toplevel in an interactive tclsh. +.VE 8.6 .TP \fBinfo exists \fIvarName\fR . @@ -687,6 +687,7 @@ command, information, interpreter, introspection, level, namespace, object, .VE 8.6 procedure, variable -.\" Local Variables: -.\" mode: nroff -.\" End: +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: diff --git a/doc/return.n b/doc/return.n index 8d0d96c..9a44ff6 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.26 2010/04/05 19:44:45 ferrieux Exp $ +'\" RCS: @(#) $Id: return.n,v 1.27 2010/04/07 09:51:31 dkf Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -139,11 +139,11 @@ by the \fBcatch\fR command (or from the copy of that information stored in the global variable \fBerrorInfo\fR). .TP \fB\-errorstack \fIlist\fR -. +.VS 8.6 The \fB\-errorstack\fR option receives special treatment only when the value of the \fB\-code\fR option is \fBTCL_ERROR\fR. Then \fIlist\fR is the initial error stack, recording actual argument values passed to each proc level. The error stack will -also be reachable through [info errorstack]. +also be reachable through \fBinfo errorstack\fR. If no \fB\-errorstack\fR option is provided to \fBreturn\fR when the \fB\-code error\fR option is provided, Tcl will provide its own initial error stack in the entry for \fB\-errorstack\fR. Tcl's @@ -152,7 +152,9 @@ stack unwinding will append information about higher stack levels, but there will be no information about the context of the error within the procedure. Typically the \fIlist\fR value is supplied from the value of \fB\-errorstack\fR in a return options dictionary captured -by the \fBcatch\fR command (or from the copy of that information from [info errorstack]). +by the \fBcatch\fR command (or from the copy of that information from +\fBinfo errorstack\fR). +.VE 8.6 .TP \fB\-level \fIlevel\fR . -- cgit v0.12 From f10d81b895d8ca9d30428aac9884685fb284986a Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 8 Apr 2010 13:26:23 +0000 Subject: * generic/tclCompCmdsSZ.c (TclSubstCompile): If the first token does not result in a *guaranteed* push of a Tcl_Obj on the stack, we must push an empty object. Otherwise it is possible to get to a 'concat1' or 'done' without enough values on the stack, resulting in a crash. Thanks to Joe Mistachkin for identifying a script that could trigger this case. --- ChangeLog | 9 +++++++++ generic/tclCompCmdsSZ.c | 25 ++++++++++++++++++++++--- tests/subst.test | 20 +++++++++++++++++--- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2df8edc..a232ac5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-04-08 Donal K. Fellows + + * generic/tclCompCmdsSZ.c (TclSubstCompile): If the first token does + not result in a *guaranteed* push of a Tcl_Obj on the stack, we must + push an empty object. Otherwise it is possible to get to a 'concat1' + or 'done' without enough values on the stack, resulting in a crash. + Thanks to Joe Mistachkin for identifying a script that could trigger + this case. + 2010-04-07 Donal K. Fellows * doc/catch.n, doc/info.n, doc/return.n: Formatting. diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index b19dfc8..3d45833 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.7 2010/03/27 22:40:14 nijtmans Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.8 2010/04/08 13:26:24 dkf Exp $ */ #include "tclInt.h" @@ -659,7 +659,21 @@ TclSubstCompile( TclSubstParse(interp, bytes, numBytes, flags, &parse, &state); - for (tokenPtr = parse.tokenPtr, endTokenPtr = tokenPtr + parse.numTokens; + /* + * Tricky point! If the first token does not result in a *guaranteed* push + * of a Tcl_Obj on the stack, we must push an empty object. Otherwise it + * is possible to get to an INST_CONCAT1 or INST_DONE without enough + * values on the stack, resulting in a crash. Thanks to Joe Mistachkin for + * identifying a script that could trigger this case. + */ + + tokenPtr = parse.tokenPtr; + if (tokenPtr->type != TCL_TOKEN_TEXT && tokenPtr->type != TCL_TOKEN_BS) { + PushLiteral(envPtr, "", 0); + count++; + } + + for (endTokenPtr = tokenPtr + parse.numTokens; tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) { int length, literal, catchRange, breakJump; char buf[TCL_UTF_MAX]; @@ -790,7 +804,11 @@ TclSubstCompile( Tcl_Panic("TclCompileSubstCmd: bad other jump distance %d", CurrentOffset(envPtr) - otherFixup.codeOffset); } - /* Pull the result to top of stack, discard options dict */ + + /* + * Pull the result to top of stack, discard options dict. + */ + TclEmitInstInt4(INST_REVERSE, 2, envPtr); TclEmitOpcode(INST_POP, envPtr); @@ -802,6 +820,7 @@ TclSubstCompile( * through them all. So, we now have a stack requirements estimate * that is too low. Here we manually fix that up. */ + TclAdjustStackDepth(5, envPtr); /* OK destination */ diff --git a/tests/subst.test b/tests/subst.test index a7d6feb..1b9ccf6 100644 --- a/tests/subst.test +++ b/tests/subst.test @@ -11,13 +11,13 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: subst.test,v 1.19 2008/04/23 15:44:38 dkf Exp $ +# RCS: @(#) $Id: subst.test,v 1.20 2010/04/08 13:26:25 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 namespace import -force ::tcltest::* } - + test subst-1.1 {basics} -returnCodes error -body { subst } -result {wrong # args: should be "subst ?-nobackslashes? ?-nocommands? ?-novariables? string"} @@ -261,7 +261,21 @@ test subst-12.5 {nasty case, Bug 1036649} { } lappend res $x } {1 {missing close-bracket} 0} - +test subst-12.6 {nasty case with compilation} { + set x unset + set y unset + list [eval [list subst {[set x 1;break;incr x][set y $x]}]] $x $y +} {{} 1 unset} +test subst-12.7 {nasty case with compilation} { + set x unset + set y unset + list [eval [list subst {[set x 1;continue;incr x][set y $x]}]] $x $y +} {1 1 1} + # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: -- cgit v0.12 From c06c61b28e8878da81a9b56f34c5570f3f3f747a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 13 Apr 2010 13:37:28 +0000 Subject: Fix [Patch 2986105]: conditionally defining strcasecmp/strncasecmp Fix gcc warning: comparison of unsigned expression >= 0 is always true --- ChangeLog | 7 +++++++ win/tclWinFile.c | 8 ++++---- win/tclWinLoad.c | 17 ++++++++--------- win/tclWinPort.h | 54 +++++++++++++++++++++++++++--------------------------- 4 files changed, 46 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index a232ac5..b73c2e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-13 Jan Nijtmans + + * win/tclWinPort.h Fix [Patch 2986105]: conditionally defining + * win/tclWinFile.c strcasecmp/strncasecmp + * win/tclWinLoad.c Fix gcc warning: comparison of unsigned expression + >= 0 is always true + 2010-04-08 Donal K. Fellows * generic/tclCompCmdsSZ.c (TclSubstCompile): If the first token does diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 2785912..b18aa1c 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.105 2010/03/07 14:39:25 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.106 2010/04/13 13:37:29 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -1787,9 +1787,9 @@ NativeIsExec( * Use wide-char case-insensitive comparison */ - if ((wcscasecmp(path+len-3, L"exe") == 0) - || (wcscasecmp(path+len-3, L"com") == 0) - || (wcscasecmp(path+len-3, L"bat") == 0)) { + if ((_wcsicmp(path+len-3, L"exe") == 0) + || (_wcsicmp(path+len-3, L"com") == 0) + || (_wcsicmp(path+len-3, L"bat") == 0)) { return 1; } } else { diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 606171d..f1eb1e0 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.27 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.28 2010/04/13 13:37:29 nijtmans Exp $ */ #include "tclWinInt.h" @@ -305,14 +305,13 @@ TclpTempFileNameForLibrary(Tcl_Interp* interp, /* Tcl interpreter */ if (dllDirectoryName == NULL) { Tcl_MutexLock(&loadMutex); if (dllDirectoryName == NULL) { - if ((nameLen = GetTempPathW(MAX_PATH, name)) >= 0) { - if (nameLen >= MAX_PATH-12) { - Tcl_SetErrno(ENAMETOOLONG); - nameLen = 0; - } else { - wcscpy(name+nameLen, L"TCLXXXXXXXX"); - nameLen += 11; - } + nameLen = GetTempPathW(MAX_PATH, name); + if (nameLen >= MAX_PATH-12) { + Tcl_SetErrno(ENAMETOOLONG); + nameLen = 0; + } else { + wcscpy(name+nameLen, L"TCLXXXXXXXX"); + nameLen += 11; } status = 1; if (nameLen != 0) { diff --git a/win/tclWinPort.h b/win/tclWinPort.h index df76d46..b5edc6e 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.54 2010/01/22 13:02:50 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.55 2010/04/13 13:37:28 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -42,14 +42,10 @@ *--------------------------------------------------------------------------- */ -#ifdef __CYGWIN__ -# include -# include -#else -# include -#endif -#include +#include +#include #include +#include #include #include #include @@ -58,14 +54,18 @@ #include #include -/* - * These string functions are not defined with the same names on Windows. - */ - -#ifndef __CYGWIN__ -#define wcscasecmp _wcsicmp -#define strcasecmp stricmp -#define strncasecmp strnicmp +#ifdef __CYGWIN__ +# include +# ifndef _wcsicmp +# define _wcsicmp wcscasecmp +# endif +#else +# ifndef strncasecmp +# define strncasecmp strnicmp +# endif +# ifndef strcasecmp +# define strcasecmp stricmp +# endif #endif /* @@ -305,7 +305,7 @@ */ #ifndef S_IFLNK -#define S_IFLNK 0120000 /* Symbolic Link */ +# define S_IFLNK 0120000 /* Symbolic Link */ #endif #ifndef S_ISREG @@ -357,11 +357,11 @@ */ #ifndef MAXPATH -#define MAXPATH MAX_PATH +# define MAXPATH MAX_PATH #endif /* MAXPATH */ #ifndef MAXPATHLEN -#define MAXPATHLEN MAXPATH +# define MAXPATHLEN MAXPATH #endif /* MAXPATHLEN */ /* @@ -382,13 +382,13 @@ */ #if defined(_MSC_VER) || defined(__MINGW32__) -# define environ _environ -# define hypot _hypot -# define exception _exception -# undef EDEADLOCK -# if defined(__MINGW32__) && !defined(__MSVCRT__) +# define environ _environ +# define hypot _hypot +# define exception _exception +# undef EDEADLOCK +# if defined(__MINGW32__) && !defined(__MSVCRT__) # define timezone _timezone -# endif +# endif #endif /* _MSC_VER || __MINGW32__ */ /* @@ -402,8 +402,8 @@ #ifdef __CYGWIN__ /* On Cygwin, the environment is imported from the Cygwin DLL. */ -# define putenv TclCygwinPutenv -# define timezone _timezone +# define putenv TclCygwinPutenv +# define timezone _timezone #endif /* __CYGWIN__ */ -- cgit v0.12 From a3387d4927dad4d6a12d7f0509d16324384e0477 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 14 Apr 2010 19:43:12 +0000 Subject: * library/platform/platform.tcl: Linux platform identification: Check /lib64 for existence of files matching libc* before accepting it as base directory. This can happen on weirdly installed 32bit systems which have an empty or partially filled /lib64 without an actual libc. Bumped to version 1.0.6. --- ChangeLog | 8 ++++++++ library/platform/platform.tcl | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b73c2e8..aa30adc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-04-14 Andreas Kupries + + * library/platform/platform.tcl: Linux platform identification: + Check /lib64 for existence of files matching libc* before + accepting it as base directory. This can happen on weirdly + installed 32bit systems which have an empty or partially filled + /lib64 without an actual libc. Bumped to version 1.0.6. + 2010-04-13 Jan Nijtmans * win/tclWinPort.h Fix [Patch 2986105]: conditionally defining diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 1e47f5d..d132c6f 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -175,7 +175,10 @@ proc ::platform::identify {} { set v unknown - if {[file exists /lib64] && [file isdirectory /lib64]} { + if {[file exists /lib64] && + [file isdirectory /lib64] && + [llength [glob -nocomplain -directory /lib64 libc*]] + } { set base /lib64 } else { set base /lib @@ -254,7 +257,7 @@ proc ::platform::patterns {id} { } } macosx*-* { - # 10.5+ + # 10.5+ if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} { if {$v ne ""} { foreach {major minor} [split $v .] break @@ -289,7 +292,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.5 +package provide platform 1.0.6 # ### ### ### ######### ######### ######### ## Demo application -- cgit v0.12 From 621f0dd46f1de1fe740f5a4584767da5103a3099 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 14 Apr 2010 22:58:37 +0000 Subject: Fixed missing update of platform package index, and Makefiles. --- ChangeLog | 5 +++-- library/platform/pkgIndex.tcl | 2 +- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa30adc..51d778b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,9 @@ 2010-04-14 Andreas Kupries * library/platform/platform.tcl: Linux platform identification: - Check /lib64 for existence of files matching libc* before - accepting it as base directory. This can happen on weirdly + * library/platform/pkgIndex.tcl: Check /lib64 for existence of + * unix/Makefile.in: files matching libc* before accepting it as + * win/Makefile.in: base directory. This can happen on weirdly installed 32bit systems which have an empty or partially filled /lib64 without an actual libc. Bumped to version 1.0.6. diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 0b69432..5678e04 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.5 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.6 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/unix/Makefile.in b/unix/Makefile.in index 446ce1c..40ef07f 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.295 2010/03/16 09:01:38 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.296 2010/04/14 22:58:37 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -856,8 +856,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.5 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.5.tm; + @echo "Installing package platform 1.0.6 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.6.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 0a5956a..06c1789 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.175 2010/04/02 21:21:06 kennykb Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.176 2010/04/14 22:58:37 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -678,8 +678,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.3.tm; @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.5 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.5.tm; + @echo "Installing package platform 1.0.6 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.6.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12 From d38a5b66d8690611d238c2510750e024cc9570a9 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 15 Apr 2010 08:52:53 +0000 Subject: * doc/try.n: [Bug 2987551]: Fix typo. --- ChangeLog | 20 ++++++++++++-------- doc/try.n | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51d778b..3293de9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,21 @@ +2010-04-15 Donal K. Fellows + + * doc/try.n: [Bug 2987551]: Fix typo. + 2010-04-14 Andreas Kupries * library/platform/platform.tcl: Linux platform identification: - * library/platform/pkgIndex.tcl: Check /lib64 for existence of - * unix/Makefile.in: files matching libc* before accepting it as - * win/Makefile.in: base directory. This can happen on weirdly - installed 32bit systems which have an empty or partially filled - /lib64 without an actual libc. Bumped to version 1.0.6. + * library/platform/pkgIndex.tcl: Check /lib64 for existence of files + * unix/Makefile.in: matching libc* before accepting it as base + * win/Makefile.in: directory. This can happen on weirdly installed + 32bit systems which have an empty or partially filled /lib64 without + an actual libc. Bumped to version 1.0.6. 2010-04-13 Jan Nijtmans - * win/tclWinPort.h Fix [Patch 2986105]: conditionally defining - * win/tclWinFile.c strcasecmp/strncasecmp - * win/tclWinLoad.c Fix gcc warning: comparison of unsigned expression + * win/tclWinPort.h: Fix [Patch 2986105]: conditionally defining + * win/tclWinFile.c: strcasecmp/strncasecmp + * win/tclWinLoad.c: Fix gcc warning: comparison of unsigned expression >= 0 is always true 2010-04-08 Donal K. Fellows diff --git a/doc/try.n b/doc/try.n index 84bef03..15e545e 100644 --- a/doc/try.n +++ b/doc/try.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: try.n,v 1.2 2009/10/14 15:59:15 dkf Exp $ +'\" RCS: @(#) $Id: try.n,v 1.3 2010/04/15 08:52:55 dkf Exp $ '\" .so man.macros .TH try n 8.6 Tcl "Tcl Built-In Commands" @@ -31,7 +31,7 @@ one of the following forms: \fBon \fIcode variableList script\fR . This clause matches if the evaluation of \fIbody\fR completed with the -exeception code \fIcode\fR. The \fIcode\fR may be expressed as an integer or +exception code \fIcode\fR. The \fIcode\fR may be expressed as an integer or one of the following literal words: \fBok\fR, \fBerror\fR, \fBreturn\fR, \fBbreak\fR, or \fBcontinue\fR. Those literals correspond to the integers 0 through 4 respectively. -- cgit v0.12 From db01c2c09b47edf7346c5179c24675864c03d1f9 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 15 Apr 2010 13:58:44 +0000 Subject: Move inclusion of from tclPlatDecls.h to tclWinPort.h, where it belongs. Add fallback in tcl.h, so at least TCHAR typedef is always available in win32, even without Tk already did the same in tkWinPort.h, now Tcl does it the same (correct) way. --- ChangeLog | 7 +++++++ generic/tcl.h | 8 +++++++- generic/tclPlatDecls.h | 20 ++++---------------- win/tclWinPort.h | 14 +++++++++++++- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3293de9..e82ec18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-15 Jan Nijtmans + + * win/tclWinPort.h: Move inclusion of from + * generic/tcl.h tclPlatDecls.h to tclWinPort.h, + * generic/tclPlatDecls.h where it belongs. Add fallback in + tcl.h, so TCHAR is available in win32 always + 2010-04-15 Donal K. Fellows * doc/try.n: [Bug 2987551]: Fix typo. diff --git a/generic/tcl.h b/generic/tcl.h index 5420c7b..6aff11d 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.302 2010/02/16 16:30:52 dkf Exp $ + * RCS: @(#) $Id: tcl.h,v 1.303 2010/04/15 13:58:44 nijtmans Exp $ */ #ifndef _TCL @@ -2375,6 +2375,12 @@ EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); #endif +#if !defined(_TCHAR_DEFINED) +# if defined(__WIN32__) + typedef char TCHAR; +# define _TCHAR_DEFINED +# endif +#endif /* *---------------------------------------------------------------------------- * Include the public function declarations that are accessible via the stubs diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 34d05fd..b9117ac 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.37 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.38 2010/04/15 13:58:44 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -24,22 +24,10 @@ #endif /* - * Pull in the typedef of TCHAR for windows. + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tcl.decls script. */ -#if defined(__CYGWIN__) - typedef char TCHAR; -#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED) -# include -# ifndef _TCHAR_DEFINED - /* Borland seems to forget to set this. */ - typedef _TCHAR TCHAR; -# define _TCHAR_DEFINED -# endif -# if defined(_MSC_VER) && defined(__STDC__) - /* MSVC++ misses this. */ - typedef _TCHAR TCHAR; -# endif -#endif /* !BEGIN!: Do not edit below this line. */ diff --git a/win/tclWinPort.h b/win/tclWinPort.h index b5edc6e..204181f 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.55 2010/04/13 13:37:28 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.56 2010/04/15 13:58:44 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -36,6 +36,18 @@ #endif /* CHECK_UNICODE_CALLS */ /* + * Pull in the typedef of TCHAR for windows. + */ +#if !defined(_TCHAR_DEFINED) +# include +# ifndef _TCHAR_DEFINED + /* Borland seems to forget to set this. */ + typedef _TCHAR TCHAR; +# define _TCHAR_DEFINED +# endif +#endif + +/* *--------------------------------------------------------------------------- * The following sets of #includes and #ifdefs are required to get Tcl to * compile under the windows compilers. -- cgit v0.12 From 78452e7487441b936ac7f0fdfbb937472e413907 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 15 Apr 2010 14:56:32 +0000 Subject: Added comment --- generic/tcl.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/generic/tcl.h b/generic/tcl.h index 6aff11d..f9ce79a 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.303 2010/04/15 13:58:44 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.304 2010/04/15 14:56:32 nijtmans Exp $ */ #ifndef _TCL @@ -2375,6 +2375,12 @@ EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); #endif +/* + * Unfortunately, TCHAR is needed in tclPlatDecls.h for + * win32, so if TCHAR is not defined yet do it here. + * This way, we don't need to include just + * for one define. + */ #if !defined(_TCHAR_DEFINED) # if defined(__WIN32__) typedef char TCHAR; -- cgit v0.12 From b273f5ded8f1e632fd6d4b531347d4a6e88b210c Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 18 Apr 2010 11:51:43 +0000 Subject: * doc/unset.n: [Bug 2988940]: Fix typo. --- ChangeLog | 10 +++++++--- doc/unset.n | 9 +++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e82ec18..13bf5df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,13 @@ +2010-04-18 Donal K. Fellows + + * doc/unset.n: [Bug 2988940]: Fix typo. + 2010-04-15 Jan Nijtmans * win/tclWinPort.h: Move inclusion of from - * generic/tcl.h tclPlatDecls.h to tclWinPort.h, - * generic/tclPlatDecls.h where it belongs. Add fallback in - tcl.h, so TCHAR is available in win32 always + * generic/tcl.h: tclPlatDecls.h to tclWinPort.h, where it + * generic/tclPlatDecls.h: belongs. Add fallback in tcl.h, so TCHAR is + available in win32 always. 2010-04-15 Donal K. Fellows diff --git a/doc/unset.n b/doc/unset.n index 2608051..52d82a5 100644 --- a/doc/unset.n +++ b/doc/unset.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: unset.n,v 1.14 2008/10/17 10:22:25 dkf Exp $ +'\" RCS: @(#) $Id: unset.n,v 1.15 2010/04/18 11:51:43 dkf Exp $ '\" .so man.macros .TH unset n 8.4 Tcl "Tcl Built-In Commands" @@ -32,7 +32,8 @@ errors are suppressed. The option may not be abbreviated, in order to disambiguate it from possible variable names. The option \fI\-\-\fR indicates the end of the options, and should be used if you wish to remove a variable with the same name as any of the options. -If an error occurs, any variables after the named one causing the error not +If an error occurs during variable deletion, any variables after the named one +causing the error are not deleted. An error can occur when the named variable does not exist, or the name refers to an array element but the variable is a scalar, or the name refers to a variable in a non-existent namespace. @@ -63,3 +64,7 @@ parray squares set(n), trace(n), upvar(n) .SH KEYWORDS remove, variable +'\" Local Variables: +'\" mode: nroff +'\" fill-column: 78 +'\" End: -- cgit v0.12 From 5bf20eaead351b1a086435a585166dc64e2b0c9b Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 19 Apr 2010 15:43:32 +0000 Subject: * generic/tclExecute.c (TclExecuteByteCode): Improve commenting and reduce indentation for the Invocation Block. --- ChangeLog | 5 + generic/tclExecute.c | 350 ++++++++++++++++++++++++++------------------------- 2 files changed, 185 insertions(+), 170 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13bf5df..4c92ffa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-19 Donal K. Fellows + + * generic/tclExecute.c (TclExecuteByteCode): Improve commenting and + reduce indentation for the Invocation Block. + 2010-04-18 Donal K. Fellows * doc/unset.n: [Bug 2988940]: Fix typo. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f12fb4d..a7212ef 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.475 2010/03/26 09:43:51 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.476 2010/04/19 15:43:36 dkf Exp $ */ #include "tclInt.h" @@ -2667,54 +2667,65 @@ TclExecuteByteCode( int objc, pcAdjustment; Tcl_Obj **objv; - instEvalStk: - case INST_EVAL_STK: { - /* - * Moved here to support transforming the eval of objects to a - * simple command invocation (for canonical lists) or a - * non-recursive TEBC call (compiled scripts). - */ + instEvalStk: + case INST_EVAL_STK: + /* + * Moved here to support transforming the eval of objects to a simple + * command invocation (for canonical lists) or a non-recursive TEBC + * call (compiled scripts). + */ - ByteCode *newCodePtr; + objPtr = OBJ_AT_TOS; + cleanup = 1; + pcAdjustment = 1; - objPtr = OBJ_AT_TOS; - cleanup = 1; - pcAdjustment = 1; + if (objPtr->typePtr == &tclListType) { + List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; + Tcl_Obj *copyPtr; - if (objPtr->typePtr == &tclListType) { /* is a list... */ - List *listRepPtr = objPtr->internalRep.twoPtrValue.ptr1; - Tcl_Obj *copyPtr; + /* + * Test if the list is "pure" or "canonical", since in that case + * we can know for sure that there are no syntactic nasties and + * treat the list's elements as literal words without need for + * further substitution. "Pure" lists are those that have no + * string representation at all; they're known OK because we know + * the algorithm for generating the string representation never + * produces hazards. "Canonical" lists are where we know that the + * string representation was produced from the internal + * representation of the list. + */ - if (objPtr->bytes == NULL || /* ...without a string rep */ - listRepPtr->canonicalFlag) {/* ...or that is canonical - * */ - if (Tcl_IsShared(objPtr)) { - copyPtr = TclListObjCopy(interp, objPtr); - Tcl_IncrRefCount(copyPtr); - OBJ_AT_TOS = copyPtr; - listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; - Tcl_DecrRefCount(objPtr); - } - objc = listRepPtr->elemCount; - objv = &listRepPtr->elements; + if (objPtr->bytes == NULL || listRepPtr->canonicalFlag) { + if (Tcl_IsShared(objPtr)) { + copyPtr = TclListObjCopy(interp, objPtr); + Tcl_IncrRefCount(copyPtr); + OBJ_AT_TOS = copyPtr; + listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; + Tcl_DecrRefCount(objPtr); + } + objc = listRepPtr->elemCount; + objv = &listRepPtr->elements; - /* - * Fix for [Bug 2102930] - */ + /* + * Fix for [Bug 2102930] + */ - iPtr->numLevels++; - Tcl_NRAddCallback(interp, NRCommand, NULL,NULL,NULL,NULL); - goto doInvocationFromEval; - } + iPtr->numLevels++; + Tcl_NRAddCallback(interp, NRCommand, NULL,NULL,NULL,NULL); + goto doInvocationFromEval; } + } - /* - * Run the bytecode in this same TEBC instance! - * - * TIP #280: The invoking context is left NULL for a dynamically - * constructed command. We cannot match its lines to the outer - * context. - */ + /* + * Run the bytecode in this same TEBC instance! + * + * TIP #280: The invoking context is left NULL for a dynamically + * constructed command. We cannot match its lines to the outer + * context. + */ + + { + ByteCode *newCodePtr; DECACHE_STACK_INFO(); newCodePtr = TclCompileObj(interp, objPtr, NULL, 0); @@ -2727,13 +2738,10 @@ TclExecuteByteCode( } case INST_INVOKE_EXPANDED: - { - CLANG_ASSERT(auxObjList); - objc = CURR_DEPTH - - (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1; - POP_TAUX_OBJ(); - } - + CLANG_ASSERT(auxObjList); + objc = CURR_DEPTH + - (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1; + POP_TAUX_OBJ(); if (objc) { pcAdjustment = 1; goto doInvocation; @@ -2808,101 +2816,102 @@ TclExecuteByteCode( CACHE_STACK_INFO(); if (TOP_CB(interp) != BP->rootPtr) { + TEOV_callback *callbackPtr; + int type; + ClientData param; + NRE_ASSERT(TRESULT == TCL_OK); pc += pcAdjustment; nonRecursiveCallSetup: - { - TEOV_callback *callbackPtr = TOP_CB(interp); - int type = PTR2INT(callbackPtr->data[0]); - ClientData param = callbackPtr->data[1]; + callbackPtr = TOP_CB(interp); + type = PTR2INT(callbackPtr->data[0]); + param = callbackPtr->data[1]; - pcAdjustment = 0; /* silence warning */ + pcAdjustment = 0; /* silence warning */ - NRE_ASSERT(callbackPtr != BP->rootPtr); - NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); + NRE_ASSERT(callbackPtr != BP->rootPtr); + NRE_ASSERT(callbackPtr->procPtr == NRCallTEBC); - TOP_CB(interp) = callbackPtr->nextPtr; - TCLNR_FREE(interp, callbackPtr); + TOP_CB(interp) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); + + NR_DATA_BURY(); + switch (type) { + case TCL_NR_BC_TYPE: + if (param) { + codePtr = param; + goto nonRecursiveCallStart; + } else { + OBP = BP; + goto resumeCoroutine; + } + case TCL_NR_TAILCALL_TYPE: + /* + * A request to perform a tailcall: just drop this bytecode. + */ - NR_DATA_BURY(); - switch (type) { - case TCL_NR_BC_TYPE: - if (param) { - codePtr = param; - goto nonRecursiveCallStart; - } else { - OBP = BP; - goto resumeCoroutine; - } - break; - case TCL_NR_TAILCALL_TYPE: - /* - * A request to perform a tailcall: just drop this - * bytecode. - */ #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " Tailcall request received\n"); - } + if (traceInstructions) { + fprintf(stdout, " Tailcall request received\n"); + } #endif /* TCL_COMPILE_DEBUG */ - iPtr->cmdFramePtr = bcFramePtr->nextPtr; - TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); - - if (catchTop != initCatchTop) { - TclClearTailcall(interp, param); - iPtr->varFramePtr->tailcallPtr = NULL; - TRESULT = TCL_ERROR; - Tcl_SetResult(interp, - "tailcall called from within a catch environment", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", - NULL); - pc--; - goto checkForCatch; - } - iPtr->varFramePtr->tailcallPtr = param; - TclSpliceTailcall(interp, param); - goto abnormalReturn; - case TCL_NR_YIELD_TYPE: { /* [yield] */ - CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - - if (!corPtr) { - Tcl_SetResult(interp, - "yield can only be called in a coroutine", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", - "ILLEGAL_YIELD", NULL); - TRESULT = TCL_ERROR; - pc--; - goto checkForCatch; - } + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclArgumentBCRelease((Tcl_Interp *) iPtr, bcFramePtr); + + if (catchTop != initCatchTop) { + TclClearTailcall(interp, param); + iPtr->varFramePtr->tailcallPtr = NULL; + TRESULT = TCL_ERROR; + Tcl_SetResult(interp, + "tailcall called from within a catch environment", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", + NULL); + pc--; + goto checkForCatch; + } + iPtr->varFramePtr->tailcallPtr = param; + TclSpliceTailcall(interp, param); + goto abnormalReturn; + case TCL_NR_YIELD_TYPE: { /* [yield] */ + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + + if (!corPtr) { + Tcl_SetResult(interp, + "yield can only be called in a coroutine", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", + "ILLEGAL_YIELD", NULL); + TRESULT = TCL_ERROR; + pc--; + goto checkForCatch; + } - NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); - NRE_ASSERT(corPtr->stackLevel != NULL); - NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); - if (corPtr->stackLevel != &TAUX) { - Tcl_SetResult(interp, "cannot yield: C stack busy", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "COROUTINE", - "CANT_YIELD", NULL); - TRESULT = TCL_ERROR; - pc--; - goto checkForCatch; - } + NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); + NRE_ASSERT(corPtr->stackLevel != NULL); + NRE_ASSERT(BP == corPtr->eePtr->bottomPtr); + if (corPtr->stackLevel != &TAUX) { + Tcl_SetResult(interp, "cannot yield: C stack busy", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "CANT_YIELD", + NULL); + TRESULT = TCL_ERROR; + pc--; + goto checkForCatch; + } - /* - * Mark suspended, save our state and return - */ + /* + * Mark suspended, save our state and return + */ - corPtr->stackLevel = NULL; - iPtr->execEnvPtr = corPtr->callerEEPtr; - OBP = *corPtr->callerBPPtr; - goto returnToCaller; - } - default: - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); - } + corPtr->stackLevel = NULL; + iPtr->execEnvPtr = corPtr->callerEEPtr; + OBP = *corPtr->callerBPPtr; + goto returnToCaller; + } + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } @@ -2922,18 +2931,19 @@ TclExecuteByteCode( */ if (iPtr->varFramePtr->tailcallPtr) { - if (catchTop != initCatchTop) { - TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); - iPtr->varFramePtr->tailcallPtr = NULL; - TRESULT = TCL_ERROR; - Tcl_SetResult(interp, - "tailcall called from within a catch environment", - TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); - pc--; - goto checkForCatch; + if (catchTop == initCatchTop) { + goto abnormalReturn; } - goto abnormalReturn; + + TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); + iPtr->varFramePtr->tailcallPtr = NULL; + TRESULT = TCL_ERROR; + Tcl_SetResult(interp, + "tailcall called from within a catch environment", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); + pc--; + goto checkForCatch; } if (iPtr->execEnvPtr->rewind) { @@ -2941,41 +2951,41 @@ TclExecuteByteCode( goto abnormalReturn; } - if (TRESULT == TCL_OK) { + if (TRESULT != TCL_OK) { + pc--; + goto processExceptionReturn; + } + #ifndef TCL_COMPILE_DEBUG - if (*pc == INST_POP) { - NEXT_INST_V(1, cleanup, 0); - } + if (*pc == INST_POP) { + NEXT_INST_V(1, cleanup, 0); + } #endif - /* - * Push the call's object result and continue execution with the - * next instruction. - */ + /* + * Push the call's object result and continue execution with the next + * instruction. + */ - TRACE_WITH_OBJ(("%u => ... after \"%.20s\": TCL_OK, result=", - objc, cmdNameBuf), Tcl_GetObjResult(interp)); + TRACE_WITH_OBJ(("%u => ... after \"%.20s\": TCL_OK, result=", + objc, cmdNameBuf), Tcl_GetObjResult(interp)); - objResultPtr = Tcl_GetObjResult(interp); + objResultPtr = Tcl_GetObjResult(interp); - /* - * Reset the interp's result to avoid possible duplications of - * large objects [Bug 781585]. We do not call Tcl_ResetResult to - * avoid any side effects caused by the resetting of errorInfo and - * errorCode [Bug 804681], which are not needed here. We chose - * instead to manipulate the interp's object result directly. - * - * Note that the result object is now in objResultPtr, it keeps - * the refCount it had in its role of iPtr->objResultPtr. - */ + /* + * Reset the interp's result to avoid possible duplications of large + * objects [Bug 781585]. We do not call Tcl_ResetResult to avoid any + * side effects caused by the resetting of errorInfo and errorCode + * [Bug 804681], which are not needed here. We chose instead to + * manipulate the interp's object result directly. + * + * Note that the result object is now in objResultPtr, it keeps the + * refCount it had in its role of iPtr->objResultPtr. + */ - TclNewObj(objPtr); - Tcl_IncrRefCount(objPtr); - iPtr->objResultPtr = objPtr; - NEXT_INST_V(0, cleanup, -1); - } else { - pc--; - goto processExceptionReturn; - } + TclNewObj(objPtr); + Tcl_IncrRefCount(objPtr); + iPtr->objResultPtr = objPtr; + NEXT_INST_V(0, cleanup, -1); #if TCL_SUPPORT_84_BYTECODE case INST_CALL_BUILTIN_FUNC1: { -- cgit v0.12 From 04890d3f2b3093debd335e9bea71a39c99a9fa5e Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 20 Apr 2010 14:24:32 +0000 Subject: Use function prototypes from the FS API. --- ChangeLog | 4 +++ generic/tclTest.c | 79 +++++++++++++++++++++---------------------------------- 2 files changed, 34 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c92ffa..c76021d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-20 Jan Nijtmans + + * generic/tclTest.c Use function prototypes from the FS API. + 2010-04-19 Donal K. Fellows * generic/tclExecute.c (TclExecuteByteCode): Improve commenting and diff --git a/generic/tclTest.c b/generic/tclTest.c index 5aedb14..bdc9b90 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.150 2010/03/11 13:35:25 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.151 2010/04/20 14:24:34 nijtmans Exp $ */ #undef STATIC_BUILD @@ -365,55 +365,36 @@ static int TestSimpleFilesystemObjCmd( static void TestReport(const char *cmd, Tcl_Obj *arg1, Tcl_Obj *arg2); static Tcl_Obj * TestReportGetNativePath(Tcl_Obj *pathPtr); -static int TestReportStat(Tcl_Obj *path, Tcl_StatBuf *buf); -static int TestReportAccess(Tcl_Obj *path, int mode); -static Tcl_Channel TestReportOpenFileChannel( - Tcl_Interp *interp, Tcl_Obj *fileName, - int mode, int permissions); -static int TestReportMatchInDirectory(Tcl_Interp *interp, - Tcl_Obj *resultPtr, Tcl_Obj *dirPtr, - const char *pattern, Tcl_GlobTypeData *types); -static int TestReportChdir(Tcl_Obj *dirName); -static int TestReportLstat(Tcl_Obj *path, Tcl_StatBuf *buf); -static int TestReportCopyFile(Tcl_Obj *src, Tcl_Obj *dst); -static int TestReportDeleteFile(Tcl_Obj *path); -static int TestReportRenameFile(Tcl_Obj *src, Tcl_Obj *dst); -static int TestReportCreateDirectory(Tcl_Obj *path); -static int TestReportCopyDirectory(Tcl_Obj *src, - Tcl_Obj *dst, Tcl_Obj **errorPtr); -static int TestReportRemoveDirectory(Tcl_Obj *path, - int recursive, Tcl_Obj **errorPtr); -static int TestReportLoadFile(Tcl_Interp *interp, - Tcl_Obj *fileName, Tcl_LoadHandle *handlePtr, - Tcl_FSUnloadFileProc **unloadProcPtr); -static Tcl_Obj * TestReportLink(Tcl_Obj *path, - Tcl_Obj *to, int linkType); -static const char *const *TestReportFileAttrStrings( - Tcl_Obj *fileName, Tcl_Obj **objPtrRef); -static int TestReportFileAttrsGet(Tcl_Interp *interp, - int index, Tcl_Obj *fileName, Tcl_Obj **objPtrRef); -static int TestReportFileAttrsSet(Tcl_Interp *interp, - int index, Tcl_Obj *fileName, Tcl_Obj *objPtr); -static int TestReportUtime(Tcl_Obj *fileName, - struct utimbuf *tval); -static int TestReportNormalizePath(Tcl_Interp *interp, - Tcl_Obj *pathPtr, int nextCheckpoint); -static int TestReportInFilesystem(Tcl_Obj *pathPtr, ClientData *clientDataPtr); -static void TestReportFreeInternalRep(ClientData clientData); -static ClientData TestReportDupInternalRep(ClientData clientData); - -static int SimpleStat(Tcl_Obj *path, Tcl_StatBuf *buf); -static int SimpleAccess(Tcl_Obj *path, int mode); -static Tcl_Channel SimpleOpenFileChannel(Tcl_Interp *interp, - Tcl_Obj *fileName, int mode, int permissions); -static Tcl_Obj * SimpleListVolumes(void); -static int SimplePathInFilesystem( - Tcl_Obj *pathPtr, ClientData *clientDataPtr); +static Tcl_FSStatProc TestReportStat; +static Tcl_FSAccessProc TestReportAccess; +static Tcl_FSOpenFileChannelProc TestReportOpenFileChannel; +static Tcl_FSMatchInDirectoryProc TestReportMatchInDirectory; +static Tcl_FSChdirProc TestReportChdir; +static Tcl_FSLstatProc TestReportLstat; +static Tcl_FSCopyFileProc TestReportCopyFile; +static Tcl_FSDeleteFileProc TestReportDeleteFile; +static Tcl_FSRenameFileProc TestReportRenameFile; +static Tcl_FSCreateDirectoryProc TestReportCreateDirectory; +static Tcl_FSCopyDirectoryProc TestReportCopyDirectory; +static Tcl_FSRemoveDirectoryProc TestReportRemoveDirectory; +static Tcl_FSLoadFileProc TestReportLoadFile; +static Tcl_FSLinkProc TestReportLink; +static Tcl_FSFileAttrStringsProc TestReportFileAttrStrings; +static Tcl_FSFileAttrsGetProc TestReportFileAttrsGet; +static Tcl_FSFileAttrsSetProc TestReportFileAttrsSet; +static Tcl_FSUtimeProc TestReportUtime; +static Tcl_FSNormalizePathProc TestReportNormalizePath; +static Tcl_FSPathInFilesystemProc TestReportInFilesystem; +static Tcl_FSFreeInternalRepProc TestReportFreeInternalRep; +static Tcl_FSDupInternalRepProc TestReportDupInternalRep; + +static Tcl_FSStatProc SimpleStat; +static Tcl_FSAccessProc SimpleAccess; +static Tcl_FSOpenFileChannelProc SimpleOpenFileChannel; +static Tcl_FSListVolumesProc SimpleListVolumes; +static Tcl_FSPathInFilesystemProc SimplePathInFilesystem; static Tcl_Obj * SimpleRedirect(Tcl_Obj *pathPtr); -static int SimpleMatchInDirectory( - Tcl_Interp *interp, Tcl_Obj *resultPtr, - Tcl_Obj *dirPtr, const char *pattern, - Tcl_GlobTypeData *types); +static Tcl_FSMatchInDirectoryProc SimpleMatchInDirectory; static int TestNumUtfCharsCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -- cgit v0.12 From 833ea84043d927c416802983797aa3884a894012 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 20 Apr 2010 14:50:10 +0000 Subject: Upgrade to zlib 1.2.5 --- ChangeLog | 1 + compat/zlib/CMakeLists.txt | 11 +- compat/zlib/ChangeLog | 82 +- compat/zlib/INDEX | 1 - compat/zlib/Makefile.in | 31 +- compat/zlib/README | 7 +- compat/zlib/adler32.c | 2 +- compat/zlib/compress.c | 2 +- compat/zlib/configure | 100 +- compat/zlib/contrib/ada/buffer_demo.adb | 2 +- compat/zlib/contrib/ada/mtest.adb | 2 +- compat/zlib/contrib/ada/read.adb | 2 +- compat/zlib/contrib/ada/test.adb | 2 +- compat/zlib/contrib/ada/zlib-streams.adb | 2 +- compat/zlib/contrib/ada/zlib-streams.ads | 2 +- compat/zlib/contrib/ada/zlib-thin.adb | 2 +- compat/zlib/contrib/ada/zlib-thin.ads | 2 +- compat/zlib/contrib/ada/zlib.adb | 2 +- compat/zlib/contrib/ada/zlib.ads | 2 +- compat/zlib/contrib/delphi/ZLib.pas | 2 +- compat/zlib/contrib/dotzlib/DotZLib.build | 64 +- compat/zlib/contrib/dotzlib/DotZLib.sln | 42 +- .../zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs | 116 +- .../zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs | 402 ++-- .../zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs | 166 +- compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs | 396 ++-- compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs | 212 +- compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs | 576 ++--- compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj | 282 +-- compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs | 602 ++--- compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs | 210 +- compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 548 ++--- compat/zlib/contrib/dotzlib/LICENSE_1_0.txt | 44 +- compat/zlib/contrib/dotzlib/readme.txt | 116 +- compat/zlib/contrib/gcc_gvmat64/gvmat64.S | 1148 +++++----- compat/zlib/contrib/infback9/inftree9.c | 4 +- compat/zlib/contrib/iostream2/zstream.h | 2 +- compat/zlib/contrib/masmx64/bld_ml64.bat | 4 +- compat/zlib/contrib/masmx64/gvmat64.asm | 1106 +++++----- compat/zlib/contrib/masmx64/inffas8664.c | 372 ++-- compat/zlib/contrib/masmx64/inffasx64.asm | 792 +++---- compat/zlib/contrib/masmx64/readme.txt | 62 +- compat/zlib/contrib/masmx86/bld_ml32.bat | 4 +- compat/zlib/contrib/masmx86/inffas32.asm | 2166 +++++++++--------- compat/zlib/contrib/masmx86/match686.asm | 956 ++++---- compat/zlib/contrib/masmx86/readme.txt | 54 +- compat/zlib/contrib/pascal/zlibpas.pas | 2 +- compat/zlib/contrib/puff/puff.c | 29 +- compat/zlib/contrib/puff/puff.h | 4 +- compat/zlib/contrib/testzlib/testzlib.c | 550 ++--- compat/zlib/contrib/testzlib/testzlib.txt | 18 +- compat/zlib/contrib/vstudio/readme.txt | 120 +- compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj | 618 +++--- .../contrib/vstudio/vc10/miniunz.vcxproj.filters | 42 +- .../zlib/contrib/vstudio/vc10/miniunz.vcxproj.user | 4 +- compat/zlib/contrib/vstudio/vc10/minizip.vcxproj | 612 +++--- .../contrib/vstudio/vc10/minizip.vcxproj.filters | 42 +- .../zlib/contrib/vstudio/vc10/minizip.vcxproj.user | 4 +- compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj | 838 +++---- .../contrib/vstudio/vc10/testzlib.vcxproj.filters | 114 +- .../contrib/vstudio/vc10/testzlib.vcxproj.user | 4 +- .../zlib/contrib/vstudio/vc10/testzlibdll.vcxproj | 618 +++--- .../vstudio/vc10/testzlibdll.vcxproj.filters | 42 +- .../contrib/vstudio/vc10/testzlibdll.vcxproj.user | 4 +- compat/zlib/contrib/vstudio/vc10/zlib.rc | 64 +- compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj | 912 ++++---- .../contrib/vstudio/vc10/zlibstat.vcxproj.filters | 152 +- .../contrib/vstudio/vc10/zlibstat.vcxproj.user | 4 +- compat/zlib/contrib/vstudio/vc10/zlibvc.def | 260 +-- compat/zlib/contrib/vstudio/vc10/zlibvc.sln | 270 +-- compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj | 1316 +++++------ .../contrib/vstudio/vc10/zlibvc.vcxproj.filters | 234 +- .../zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user | 4 +- compat/zlib/contrib/vstudio/vc9/miniunz.vcproj | 1130 +++++----- compat/zlib/contrib/vstudio/vc9/minizip.vcproj | 1124 +++++----- compat/zlib/contrib/vstudio/vc9/testzlib.vcproj | 1704 +++++++-------- compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj | 1130 +++++----- compat/zlib/contrib/vstudio/vc9/zlib.rc | 64 +- compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj | 1670 +++++++------- compat/zlib/contrib/vstudio/vc9/zlibvc.def | 260 +-- compat/zlib/contrib/vstudio/vc9/zlibvc.sln | 288 +-- compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj | 2312 ++++++++++---------- compat/zlib/crc32.c | 6 +- compat/zlib/deflate.c | 4 +- compat/zlib/deflate.h | 26 +- compat/zlib/example.c | 2 +- compat/zlib/gzguts.h | 34 +- compat/zlib/gzlib.c | 20 +- compat/zlib/gzread.c | 3 +- compat/zlib/inffast.c | 4 +- compat/zlib/inffast.h | 4 +- compat/zlib/inftrees.c | 6 +- compat/zlib/inftrees.h | 4 +- compat/zlib/minigzip.c | 11 +- compat/zlib/old/visualc6/README.txt | 73 + compat/zlib/old/visualc6/example.dsp | 278 +++ compat/zlib/old/visualc6/minigzip.dsp | 278 +++ compat/zlib/old/visualc6/zlib.dsp | 621 ++++++ compat/zlib/old/visualc6/zlib.dsw | 59 + compat/zlib/projects/README.projects | 41 - compat/zlib/projects/visualc6/README.txt | 73 - compat/zlib/projects/visualc6/example.dsp | 278 --- compat/zlib/projects/visualc6/minigzip.dsp | 278 --- compat/zlib/projects/visualc6/zlib.dsp | 621 ------ compat/zlib/projects/visualc6/zlib.dsw | 59 - compat/zlib/qnx/package.qpg | 10 +- compat/zlib/treebuild.xml | 4 +- compat/zlib/trees.c | 19 +- compat/zlib/trees.h | 4 +- compat/zlib/uncompr.c | 2 +- compat/zlib/win32/Makefile.gcc | 44 +- compat/zlib/win32/Makefile.msc | 34 +- compat/zlib/win32/README-WIN32.txt | 103 + compat/zlib/zconf.h | 32 +- compat/zlib/zconf.h.cmakein | 32 +- compat/zlib/zconf.h.in | 32 +- compat/zlib/zlib.3 | 4 +- compat/zlib/zlib.3.pdf | Bin 8688 -> 8686 bytes compat/zlib/zlib.h | 44 +- compat/zlib/zlib.pc.in | 3 +- compat/zlib/zutil.c | 26 +- compat/zlib/zutil.h | 51 +- 122 files changed, 15387 insertions(+), 15108 deletions(-) create mode 100644 compat/zlib/old/visualc6/README.txt create mode 100644 compat/zlib/old/visualc6/example.dsp create mode 100644 compat/zlib/old/visualc6/minigzip.dsp create mode 100644 compat/zlib/old/visualc6/zlib.dsp create mode 100644 compat/zlib/old/visualc6/zlib.dsw delete mode 100644 compat/zlib/projects/README.projects delete mode 100644 compat/zlib/projects/visualc6/README.txt delete mode 100644 compat/zlib/projects/visualc6/example.dsp delete mode 100644 compat/zlib/projects/visualc6/minigzip.dsp delete mode 100644 compat/zlib/projects/visualc6/zlib.dsp delete mode 100644 compat/zlib/projects/visualc6/zlib.dsw create mode 100644 compat/zlib/win32/README-WIN32.txt diff --git a/ChangeLog b/ChangeLog index c76021d..d158bf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2010-04-20 Jan Nijtmans * generic/tclTest.c Use function prototypes from the FS API. + * compat/zlib/* Upgrade to zlib 1.2.5 2010-04-19 Donal K. Fellows diff --git a/compat/zlib/CMakeLists.txt b/compat/zlib/CMakeLists.txt index 7eefa49..a64fe0b 100644 --- a/compat/zlib/CMakeLists.txt +++ b/compat/zlib/CMakeLists.txt @@ -20,7 +20,7 @@ check_include_file(stddef.h HAVE_STDDEF_H) # # Check to see if we have large file support # -set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE) +set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) # We add these other definitions here because CheckTypeSize.cmake # in CMake 2.4.x does not automatically do so and we want # compatibility with CMake 2.4.x. @@ -35,7 +35,7 @@ if(HAVE_STDDEF_H) endif() check_type_size(off64_t OFF64_T) if(HAVE_OFF64_T) - add_definitions(-D_LARGEFILE64_SOURCE) + add_definitions(-D_LARGEFILE64_SOURCE=1) endif() set(CMAKE_REQUIRED_DEFINITIONS) # clear variable @@ -52,13 +52,6 @@ endif() # check_include_file(unistd.h Z_HAVE_UNISTD_H) -# -# Check for errno.h -check_include_file(errno.h HAVE_ERRNO_H) -if(NOT HAVE_ERRNO_H) - add_definitions(-DNO_ERRNO_H) -endif() - if(MSVC) set(CMAKE_DEBUG_POSTFIX "d") add_definitions(-D_CRT_SECURE_NO_DEPRECATE) diff --git a/compat/zlib/ChangeLog b/compat/zlib/ChangeLog index c73ed87..fc61964 100644 --- a/compat/zlib/ChangeLog +++ b/compat/zlib/ChangeLog @@ -1,6 +1,84 @@ ChangeLog file for zlib +Changes in 1.2.5 (19 Apr 2010) +- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev] +- Default to libdir as sharedlibdir in configure [Nieder] +- Update copyright dates on modified source files +- Update trees.c to be able to generate modified trees.h +- Exit configure for MinGW, suggesting win32/Makefile.gcc + +Changes in 1.2.4.5 (18 Apr 2010) +- Set sharedlibdir in configure [Torok] +- Set LDFLAGS in Makefile.in [Bar-Lev] +- Avoid mkdir objs race condition in Makefile.in [Bowler] +- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays +- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C +- Don't use hidden attribute when it is a warning generator (e.g. Solaris) + +Changes in 1.2.4.4 (18 Apr 2010) +- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok] +- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty +- Try to use bash or ksh regardless of functionality of /bin/sh +- Fix configure incompatibility with NetBSD sh +- Remove attempt to run under bash or ksh since have better NetBSD fix +- Fix win32/Makefile.gcc for MinGW [Bar-Lev] +- Add diagnostic messages when using CROSS_PREFIX in configure +- Added --sharedlibdir option to configure [Weigelt] +- Use hidden visibility attribute when available [Frysinger] + +Changes in 1.2.4.3 (10 Apr 2010) +- Only use CROSS_PREFIX in configure for ar and ranlib if they exist +- Use CROSS_PREFIX for nm [Bar-Lev] +- Assume _LARGEFILE64_SOURCE defined is equivalent to true +- Avoid use of undefined symbols in #if with && and || +- Make *64 prototypes in gzguts.h consistent with functions +- Add -shared load option for MinGW in configure [Bowler] +- Move z_off64_t to public interface, use instead of off64_t +- Remove ! from shell test in configure (not portable to Solaris) +- Change +0 macro tests to -0 for possibly increased portability + +Changes in 1.2.4.2 (9 Apr 2010) +- Add consistent carriage returns to readme.txt's in masmx86 and masmx64 +- Really provide prototypes for *64 functions when building without LFS +- Only define unlink() in minigzip.c if unistd.h not included +- Update README to point to contrib/vstudio project files +- Move projects/vc6 to old/ and remove projects/ +- Include stdlib.h in minigzip.c for setmode() definition under WinCE +- Clean up assembler builds in win32/Makefile.msc [Rowe] +- Include sys/types.h for Microsoft for off_t definition +- Fix memory leak on error in gz_open() +- Symbolize nm as $NM in configure [Weigelt] +- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt] +- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined +- Fix bug in gzeof() to take into account unused input data +- Avoid initialization of structures with variables in puff.c +- Updated win32/README-WIN32.txt [Rowe] + +Changes in 1.2.4.1 (28 Mar 2010) +- Remove the use of [a-z] constructs for sed in configure [gentoo 310225] +- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech] +- Restore "for debugging" comment on sprintf() in gzlib.c +- Remove fdopen for MVS from gzguts.h +- Put new README-WIN32.txt in win32 [Rowe] +- Add check for shell to configure and invoke another shell if needed +- Fix big fat stinking bug in gzseek() on uncompressed files +- Remove vestigial F_OPEN64 define in zutil.h +- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE +- Avoid errors on non-LFS systems when applications define LFS macros +- Set EXE to ".exe" in configure for MINGW [Kahle] +- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill] +- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev] +- Add DLL install in win32/makefile.gcc [Bar-Lev] +- Allow Linux* or linux* from uname in configure [Bar-Lev] +- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev] +- Add cross-compilation prefixes to configure [Bar-Lev] +- Match type exactly in gz_load() invocation in gzread.c +- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func +- Provide prototypes for *64 functions when building zlib without LFS +- Don't use -lc when linking shared library on MinGW +- Remove errno.h check in configure and vestigial errno code in zutil.h + Changes in 1.2.4 (14 Mar 2010) - Fix VER3 extraction in configure for no fourth subversion - Update zlib.3, add docs to Makefile.in to make .pdf out of it @@ -99,7 +177,7 @@ Changes in 1.2.3.6 (17 Jan 2010) - Correct email address in configure for system options - Update make_vms.com and add make_vms.com to contrib/minizip [Zinser] - Update zlib.map [Brown] -- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Tšršk] +- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok] - Apply various fixes to CMakeLists.txt [Lowman] - Add checks on len in gzread() and gzwrite() - Add error message for no more room for gzungetc() @@ -874,7 +952,7 @@ Changes in 1.0.6 (19 Jan 1998) - use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau) - added makelcc.bat for lcc-win32 (Tom St Denis) - in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe) -- Avoid expanded $Id: ChangeLog,v 1.3 2010/03/16 09:01:04 nijtmans Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. +- Avoid expanded $Id: ChangeLog,v 1.4 2010/04/20 14:50:10 nijtmans Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion. - check for unistd.h in configure (for off_t) - remove useless check parameter in inflate_blocks_free - avoid useless assignment of s->check to itself in inflate_blocks_new diff --git a/compat/zlib/INDEX b/compat/zlib/INDEX index f66bf9b..f6c51ca 100644 --- a/compat/zlib/INDEX +++ b/compat/zlib/INDEX @@ -22,7 +22,6 @@ msdos/ makefiles for MSDOS nintendods/ makefile for Nintendo DS old/ makefiles for various architectures and zlib documentation files that have not yet been updated for zlib 1.2.x -projects/ projects for various Integrated Development Environments qnx/ makefiles for QNX watcom/ makefiles for OpenWatcom win32/ makefiles for Windows diff --git a/compat/zlib/Makefile.in b/compat/zlib/Makefile.in index 5a2300a..5b15bd0 100644 --- a/compat/zlib/Makefile.in +++ b/compat/zlib/Makefile.in @@ -25,19 +25,21 @@ CFLAGS=-O # -Wstrict-prototypes -Wmissing-prototypes SFLAGS=-O - -LDFLAGS=-L. libz.a +LDFLAGS= +TEST_LDFLAGS=-L. libz.a LDSHARED=$(CC) CPP=$(CC) -E STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.2.4 +SHAREDLIBV=libz.so.1.2.5 SHAREDLIBM=libz.so.1 -LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV) +LIBS=$(STATICLIB) $(SHAREDLIBV) AR=ar rc RANLIB=ranlib +LDCONFIG=ldconfig +LDSHAREDLIBC=-lc TAR=tar SHELL=/bin/sh EXE= @@ -45,6 +47,7 @@ EXE= prefix = /usr/local exec_prefix = ${prefix} libdir = ${exec_prefix}/lib +sharedlibdir = ${libdir} includedir = ${prefix}/include mandir = ${prefix}/share/man man3dir = ${mandir}/man3 @@ -129,22 +132,22 @@ minigzip64.o: minigzip.c zlib.h zconf.h .SUFFIXES: .lo .c.lo: - -@if [ ! -d objs ]; then mkdir objs; fi + -@mkdir objs 2>/dev/null || test -d objs $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $< -@mv objs/$*.o $@ $(SHAREDLIBV): $(PIC_OBJS) - $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc + $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS) rm -f $(SHAREDLIB) $(SHAREDLIBM) ln -s $@ $(SHAREDLIB) ln -s $@ $(SHAREDLIBM) -@rmdir objs example$(EXE): example.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS) minigzip$(EXE): minigzip.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) examplesh$(EXE): example.o $(SHAREDLIBV) $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) @@ -153,25 +156,27 @@ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) example64$(EXE): example64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) minigzip64$(EXE): minigzip64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS) install-libs: $(LIBS) -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi + -@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi - cp $(LIBS) $(DESTDIR)$(libdir) + cp $(STATICLIB) $(DESTDIR)$(libdir) + cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir) cd $(DESTDIR)$(libdir); chmod u=rw,go=r $(STATICLIB) -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 - -@cd $(DESTDIR)$(libdir); if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ + -@cd $(DESTDIR)$(sharedlibdir); if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ chmod 755 $(SHAREDLIBV); \ rm -f $(SHAREDLIB) $(SHAREDLIBM); \ ln -s $(SHAREDLIBV) $(SHAREDLIB); \ ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ - (ldconfig || true) >/dev/null 2>&1; \ + ($(LDCONFIG) || true) >/dev/null 2>&1; \ fi cp zlib.3 $(DESTDIR)$(man3dir) chmod 644 $(DESTDIR)$(man3dir)/zlib.3 diff --git a/compat/zlib/README b/compat/zlib/README index f24aeee..d4219bf 100644 --- a/compat/zlib/README +++ b/compat/zlib/README @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.4 is a general purpose data compression library. All the code is +zlib 1.2.5 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -16,7 +16,8 @@ minigzip.c. To compile all files and run the test program, follow the instructions given at the top of Makefile.in. In short "./configure; make test", and if that goes well, "make install" should work for most flavors of Unix. For Windows, use one -of the special makefiles in win32/ or projects/ . For VMS, use make_vms.com. +of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use +make_vms.com. Questions about zlib should be sent to , or to Gilles Vollant for the Windows DLL version. The zlib home page is @@ -30,7 +31,7 @@ Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.4 are documented in the file ChangeLog. +The changes made in version 1.2.5 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . diff --git a/compat/zlib/adler32.c b/compat/zlib/adler32.c index d2960f1..997020d 100644 --- a/compat/zlib/adler32.c +++ b/compat/zlib/adler32.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: adler32.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ +/* @(#) $Id: adler32.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #include "zutil.h" diff --git a/compat/zlib/compress.c b/compat/zlib/compress.c index b9e0c5a..21fa4c1 100644 --- a/compat/zlib/compress.c +++ b/compat/zlib/compress.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: compress.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: compress.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #define ZLIB_INTERNAL #include "zlib.h" diff --git a/compat/zlib/configure b/compat/zlib/configure index 672fd37..bd9edd2 100755 --- a/compat/zlib/configure +++ b/compat/zlib/configure @@ -13,18 +13,43 @@ # If you have problems, try without defining CC and CFLAGS before reporting # an error. +if [ -n "${CHOST}" ]; then + uname="$(echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/')" + CROSS_PREFIX="${CHOST}-" +fi + STATICLIB=libz.a LDFLAGS="${LDFLAGS} -L. ${STATICLIB}" VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h` VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` -AR=${AR-"ar"} +if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then + AR=${AR-"${CROSS_PREFIX}ar"} + test -n "${CROSS_PREFIX}" && echo Using ${AR} +else + AR=${AR-"ar"} + test -n "${CROSS_PREFIX}" && echo Using ${AR} +fi AR_RC="${AR} rc" -RANLIB=${RANLIB-"ranlib"} +if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then + RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} + test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} +else + RANLIB=${RANLIB-"ranlib"} +fi +if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then + NM=${NM-"${CROSS_PREFIX}nm"} + test -n "${CROSS_PREFIX}" && echo Using ${NM} +else + NM=${NM-"nm"} +fi +LDCONFIG=${LDCONFIG-"ldconfig"} +LDSHAREDLIBC="${LDSHAREDLIBC--lc}" prefix=${prefix-/usr/local} exec_prefix=${exec_prefix-'${prefix}'} libdir=${libdir-'${exec_prefix}/lib'} +sharedlibdir=${sharedlibdir-'${libdir}'} includedir=${includedir-'${prefix}/include'} mandir=${mandir-'${prefix}/share/man'} shared_ext='.so' @@ -41,13 +66,15 @@ case "$1" in -h* | --help) echo 'usage:' echo ' configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' - echo ' [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' + echo ' [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' + echo ' [--includedir=INCLUDEDIR]' exit 0 ;; - -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; - -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; - -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;; - -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;; - -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;; + -p*=* | --prefix=*) prefix=`echo $1 | sed 's/.*=//'`; shift ;; + -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/.*=//'`; shift ;; + -l*=* | --libdir=*) libdir=`echo $1 | sed 's/.*=//'`; shift ;; + --sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/.*=//'`; shift ;; + -i*=* | --includedir=*) includedir=`echo $1 | sed 's/.*=//'`;shift ;; + -u*=* | --uname=*) uname=`echo $1 | sed 's/.*=//'`;shift ;; -p* | --prefix) prefix="$2"; shift; shift ;; -e* | --eprefix) exec_prefix="$2"; shift; shift ;; -l* | --libdir) libdir="$2"; shift; shift ;; @@ -68,8 +95,8 @@ extern int getchar(); int hello() {return getchar();} EOF -test -z "$CC" && echo Checking for gcc... -cc=${CC-gcc} +test -z "$CC" && echo Checking for ${CROSS_PREFIX}gcc... +cc=${CC-${CROSS_PREFIX}gcc} cflags=${CFLAGS-"-O3"} # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure case "$cc" in @@ -78,8 +105,8 @@ esac if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then CC="$cc" - SFLAGS="${CFLAGS-"-O3"} -fPIC" - CFLAGS="${CFLAGS-"-O3"}" + SFLAGS="${CFLAGS--O3} -fPIC" + CFLAGS="${CFLAGS--O3}" if test $build64 -eq 1; then CFLAGS="${CFLAGS} -m64" SFLAGS="${SFLAGS} -m64" @@ -91,9 +118,17 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then uname=`(uname -s || echo unknown) 2>/dev/null` fi case "$uname" in - Linux | linux | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;; - CYGWIN* | Cygwin* | cygwin* | OS/2* ) - EXE='.exe' ;; + Linux* | linux* | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;; + CYGWIN* | Cygwin* | cygwin* | OS/2*) + EXE='.exe' ;; + MINGW*|mingw*) +# temporary bypass + rm -f $test.[co] $test $test$shared_ext + echo "Please use win32/Makefile.gcc instead." + exit 1 + LDSHARED=${LDSHARED-"$cc -shared"} + LDSHAREDLIBC="" + EXE='.exe' ;; QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 # (alain.bonnefoy@icbt.com) LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;; @@ -117,6 +152,7 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then else # find system name and corresponding cc options CC=${CC-cc} + gcc=0 if test -z "$uname"; then uname=`(uname -sr || echo unknown) 2>/dev/null` fi @@ -474,22 +510,32 @@ EOF fi fi -cat >$test.c < -int main() { return 0; } +if test "$gcc" -eq 1; then + cat > $test.c <= 33) +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif +int ZLIB_INTERNAL foo; +int main() +{ + return 0; +} EOF -if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then - echo "Checking for errno.h... Yes." -else - echo "Checking for errno.h... No." - CFLAGS="$CFLAGS -DNO_ERRNO_H" - SFLAGS="$SFLAGS -DNO_ERRNO_H" + if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then + echo "Checking for attribute(visibility) support... Yes." + else + CFLAGS="$CFLAGS -DNO_VIZ" + SFLAGS="$SFLAGS -DNO_VIZ" + echo "Checking for attribute(visibility) support... No." + fi fi CPP=${CPP-"$CC -E"} case $CFLAGS in *ASMV*) - if test "`nm $test.o | grep _hello`" = ""; then + if test "`$NM $test.o | grep _hello`" = ""; then CPP="$CPP -DNO_UNDERLINE" echo Checking for underline in external names... No. else @@ -513,10 +559,13 @@ sed < Makefile.in " /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# /^AR *=/s#=.*#=$AR_RC# /^RANLIB *=/s#=.*#=$RANLIB# +/^LDCONFIG *=/s#=.*#=$LDCONFIG# +/^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC# /^EXE *=/s#=.*#=$EXE# /^prefix *=/s#=.*#=$prefix# /^exec_prefix *=/s#=.*#=$exec_prefix# /^libdir *=/s#=.*#=$libdir# +/^sharedlibdir *=/s#=.*#=$sharedlibdir# /^includedir *=/s#=.*#=$includedir# /^mandir *=/s#=.*#=$mandir# /^all: */s#:.*#: $ALL# @@ -538,6 +587,7 @@ sed < zlib.pc.in " /^prefix *=/s#=.*#=$prefix# /^exec_prefix *=/s#=.*#=$exec_prefix# /^libdir *=/s#=.*#=$libdir# +/^sharedlibdir *=/s#=.*#=$sharedlibdir# /^includedir *=/s#=.*#=$includedir# /^mandir *=/s#=.*#=$mandir# /^LDFLAGS *=/s#=.*#=$LDFLAGS# diff --git a/compat/zlib/contrib/ada/buffer_demo.adb b/compat/zlib/contrib/ada/buffer_demo.adb index 0e99515..8fe6e1c 100644 --- a/compat/zlib/contrib/ada/buffer_demo.adb +++ b/compat/zlib/contrib/ada/buffer_demo.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- -- --- $Id: buffer_demo.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: buffer_demo.adb,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ -- This demo program provided by Dr Steve Sangwine -- diff --git a/compat/zlib/contrib/ada/mtest.adb b/compat/zlib/contrib/ada/mtest.adb index 5fbd060..5516952 100644 --- a/compat/zlib/contrib/ada/mtest.adb +++ b/compat/zlib/contrib/ada/mtest.adb @@ -8,7 +8,7 @@ -- Continuous test for ZLib multithreading. If the test would fail -- we should provide thread safe allocation routines for the Z_Stream. -- --- $Id: mtest.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: mtest.adb,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ with ZLib; with Ada.Streams; diff --git a/compat/zlib/contrib/ada/read.adb b/compat/zlib/contrib/ada/read.adb index 5099b32..6df6a35 100644 --- a/compat/zlib/contrib/ada/read.adb +++ b/compat/zlib/contrib/ada/read.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: read.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: read.adb,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ -- Test/demo program for the generic read interface. diff --git a/compat/zlib/contrib/ada/test.adb b/compat/zlib/contrib/ada/test.adb index 0d60e89..0edf1d6 100644 --- a/compat/zlib/contrib/ada/test.adb +++ b/compat/zlib/contrib/ada/test.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: test.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: test.adb,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ -- The program has a few aims. -- 1. Test ZLib.Ada95 thick binding functionality. diff --git a/compat/zlib/contrib/ada/zlib-streams.adb b/compat/zlib/contrib/ada/zlib-streams.adb index dd8f409..eac7440 100644 --- a/compat/zlib/contrib/ada/zlib-streams.adb +++ b/compat/zlib/contrib/ada/zlib-streams.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-streams.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: zlib-streams.adb,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ with Ada.Unchecked_Deallocation; diff --git a/compat/zlib/contrib/ada/zlib-streams.ads b/compat/zlib/contrib/ada/zlib-streams.ads index 9b3fa3e..68dc0b4 100644 --- a/compat/zlib/contrib/ada/zlib-streams.ads +++ b/compat/zlib/contrib/ada/zlib-streams.ads @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-streams.ads,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: zlib-streams.ads,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ package ZLib.Streams is diff --git a/compat/zlib/contrib/ada/zlib-thin.adb b/compat/zlib/contrib/ada/zlib-thin.adb index f3f5cb2..7e1f562 100644 --- a/compat/zlib/contrib/ada/zlib-thin.adb +++ b/compat/zlib/contrib/ada/zlib-thin.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-thin.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: zlib-thin.adb,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ package body ZLib.Thin is diff --git a/compat/zlib/contrib/ada/zlib-thin.ads b/compat/zlib/contrib/ada/zlib-thin.ads index f295688..7e8e074 100644 --- a/compat/zlib/contrib/ada/zlib-thin.ads +++ b/compat/zlib/contrib/ada/zlib-thin.ads @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib-thin.ads,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: zlib-thin.ads,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ with Interfaces.C.Strings; diff --git a/compat/zlib/contrib/ada/zlib.adb b/compat/zlib/contrib/ada/zlib.adb index 5680356..ec01b1d 100644 --- a/compat/zlib/contrib/ada/zlib.adb +++ b/compat/zlib/contrib/ada/zlib.adb @@ -6,7 +6,7 @@ -- Open source license information is in the zlib.ads file. -- ---------------------------------------------------------------- --- $Id: zlib.adb,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: zlib.adb,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ with Ada.Exceptions; with Ada.Unchecked_Conversion; diff --git a/compat/zlib/contrib/ada/zlib.ads b/compat/zlib/contrib/ada/zlib.ads index 3166665..bdf1397 100644 --- a/compat/zlib/contrib/ada/zlib.ads +++ b/compat/zlib/contrib/ada/zlib.ads @@ -25,7 +25,7 @@ -- covered by the GNU Public License. -- ------------------------------------------------------------------------------ --- $Id: zlib.ads,v 1.2 2010/03/16 09:01:35 nijtmans Exp $ +-- $Id: zlib.ads,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ with Ada.Streams; diff --git a/compat/zlib/contrib/delphi/ZLib.pas b/compat/zlib/contrib/delphi/ZLib.pas index 179f9a9..0d86fb5 100644 --- a/compat/zlib/contrib/delphi/ZLib.pas +++ b/compat/zlib/contrib/delphi/ZLib.pas @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; const OutBuf: Pointer; BufSize: Integer); const - zlib_version = '1.2.4'; + zlib_version = '1.2.5'; type EZlibError = class(Exception); diff --git a/compat/zlib/contrib/dotzlib/DotZLib.build b/compat/zlib/contrib/dotzlib/DotZLib.build index e69630c..7f90d6b 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib.build +++ b/compat/zlib/contrib/dotzlib/DotZLib.build @@ -1,33 +1,33 @@ - - - A .Net wrapper library around ZLib1.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + A .Net wrapper library around ZLib1.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/DotZLib.sln b/compat/zlib/contrib/dotzlib/DotZLib.sln index 5d533d6..ac45ca0 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib.sln +++ b/compat/zlib/contrib/dotzlib/DotZLib.sln @@ -1,21 +1,21 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET - {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET + {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs index 724c534..0491bfc 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs @@ -1,58 +1,58 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("DotZLib")] -[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Henrik Ravn")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("DotZLib")] +[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Henrik Ravn")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs index b110dae..788b2fc 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -1,202 +1,202 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Runtime.InteropServices; -using System.Text; - - -namespace DotZLib -{ - #region ChecksumGeneratorBase - /// - /// Implements the common functionality needed for all s - /// - /// - public abstract class ChecksumGeneratorBase : ChecksumGenerator - { - /// - /// The value of the current checksum - /// - protected uint _current; - - /// - /// Initializes a new instance of the checksum generator base - the current checksum is - /// set to zero - /// - public ChecksumGeneratorBase() - { - _current = 0; - } - - /// - /// Initializes a new instance of the checksum generator basewith a specified value - /// - /// The value to set the current checksum to - public ChecksumGeneratorBase(uint initialValue) - { - _current = initialValue; - } - - /// - /// Resets the current checksum to zero - /// - public void Reset() { _current = 0; } - - /// - /// Gets the current checksum value - /// - public uint Value { get { return _current; } } - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - /// All the other Update methods are implmeneted in terms of this one. - /// This is therefore the only method a derived class has to implement - public abstract void Update(byte[] data, int offset, int count); - - /// - /// Updates the current checksum with an array of bytes. - /// - /// The data to update the checksum with - public void Update(byte[] data) - { - Update(data, 0, data.Length); - } - - /// - /// Updates the current checksum with the data from a string - /// - /// The string to update the checksum with - /// The characters in the string are converted by the UTF-8 encoding - public void Update(string data) - { - Update(Encoding.UTF8.GetBytes(data)); - } - - /// - /// Updates the current checksum with the data from a string, using a specific encoding - /// - /// The string to update the checksum with - /// The encoding to use - public void Update(string data, Encoding encoding) - { - Update(encoding.GetBytes(data)); - } - - } - #endregion - - #region CRC32 - /// - /// Implements a CRC32 checksum generator - /// - public sealed class CRC32Checksum : ChecksumGeneratorBase - { - #region DLL imports - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint crc32(uint crc, int data, uint length); - - #endregion - - /// - /// Initializes a new instance of the CRC32 checksum generator - /// - public CRC32Checksum() : base() {} - - /// - /// Initializes a new instance of the CRC32 checksum generator with a specified value - /// - /// The value to set the current checksum to - public CRC32Checksum(uint initialValue) : base(initialValue) {} - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - public override void Update(byte[] data, int offset, int count) - { - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); - try - { - _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); - } - finally - { - hData.Free(); - } - } - - } - #endregion - - #region Adler - /// - /// Implements a checksum generator that computes the Adler checksum on data - /// - public sealed class AdlerChecksum : ChecksumGeneratorBase - { - #region DLL imports - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint adler32(uint adler, int data, uint length); - - #endregion - - /// - /// Initializes a new instance of the Adler checksum generator - /// - public AdlerChecksum() : base() {} - - /// - /// Initializes a new instance of the Adler checksum generator with a specified value - /// - /// The value to set the current checksum to - public AdlerChecksum(uint initialValue) : base(initialValue) {} - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - public override void Update(byte[] data, int offset, int count) - { - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); - try - { - _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); - } - finally - { - hData.Free(); - } - } - - } - #endregion - +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + #region ChecksumGeneratorBase + /// + /// Implements the common functionality needed for all s + /// + /// + public abstract class ChecksumGeneratorBase : ChecksumGenerator + { + /// + /// The value of the current checksum + /// + protected uint _current; + + /// + /// Initializes a new instance of the checksum generator base - the current checksum is + /// set to zero + /// + public ChecksumGeneratorBase() + { + _current = 0; + } + + /// + /// Initializes a new instance of the checksum generator basewith a specified value + /// + /// The value to set the current checksum to + public ChecksumGeneratorBase(uint initialValue) + { + _current = initialValue; + } + + /// + /// Resets the current checksum to zero + /// + public void Reset() { _current = 0; } + + /// + /// Gets the current checksum value + /// + public uint Value { get { return _current; } } + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + /// All the other Update methods are implmeneted in terms of this one. + /// This is therefore the only method a derived class has to implement + public abstract void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with an array of bytes. + /// + /// The data to update the checksum with + public void Update(byte[] data) + { + Update(data, 0, data.Length); + } + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + public void Update(string data) + { + Update(Encoding.UTF8.GetBytes(data)); + } + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + public void Update(string data, Encoding encoding) + { + Update(encoding.GetBytes(data)); + } + + } + #endregion + + #region CRC32 + /// + /// Implements a CRC32 checksum generator + /// + public sealed class CRC32Checksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint crc32(uint crc, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the CRC32 checksum generator + /// + public CRC32Checksum() : base() {} + + /// + /// Initializes a new instance of the CRC32 checksum generator with a specified value + /// + /// The value to set the current checksum to + public CRC32Checksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + + #region Adler + /// + /// Implements a checksum generator that computes the Adler checksum on data + /// + public sealed class AdlerChecksum : ChecksumGeneratorBase + { + #region DLL imports + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint adler32(uint adler, int data, uint length); + + #endregion + + /// + /// Initializes a new instance of the Adler checksum generator + /// + public AdlerChecksum() : base() {} + + /// + /// Initializes a new instance of the Adler checksum generator with a specified value + /// + /// The value to set the current checksum to + public AdlerChecksum(uint initialValue) : base(initialValue) {} + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + public override void Update(byte[] data, int offset, int count) + { + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned); + try + { + _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count); + } + finally + { + hData.Free(); + } + } + + } + #endregion + } \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs index 9c8d601..c1cab3a 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs @@ -1,83 +1,83 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; - -namespace DotZLib -{ - - /// - /// This class implements a circular buffer - /// - internal class CircularBuffer - { - #region Private data - private int _capacity; - private int _head; - private int _tail; - private int _size; - private byte[] _buffer; - #endregion - - public CircularBuffer(int capacity) - { - Debug.Assert( capacity > 0 ); - _buffer = new byte[capacity]; - _capacity = capacity; - _head = 0; - _tail = 0; - _size = 0; - } - - public int Size { get { return _size; } } - - public int Put(byte[] source, int offset, int count) - { - Debug.Assert( count > 0 ); - int trueCount = Math.Min(count, _capacity - Size); - for (int i = 0; i < trueCount; ++i) - _buffer[(_tail+i) % _capacity] = source[offset+i]; - _tail += trueCount; - _tail %= _capacity; - _size += trueCount; - return trueCount; - } - - public bool Put(byte b) - { - if (Size == _capacity) // no room - return false; - _buffer[_tail++] = b; - _tail %= _capacity; - ++_size; - return true; - } - - public int Get(byte[] destination, int offset, int count) - { - int trueCount = Math.Min(count,Size); - for (int i = 0; i < trueCount; ++i) - destination[offset + i] = _buffer[(_head+i) % _capacity]; - _head += trueCount; - _head %= _capacity; - _size -= trueCount; - return trueCount; - } - - public int Get() - { - if (Size == 0) - return -1; - - int result = (int)_buffer[_head++ % _capacity]; - --_size; - return result; - } - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; + +namespace DotZLib +{ + + /// + /// This class implements a circular buffer + /// + internal class CircularBuffer + { + #region Private data + private int _capacity; + private int _head; + private int _tail; + private int _size; + private byte[] _buffer; + #endregion + + public CircularBuffer(int capacity) + { + Debug.Assert( capacity > 0 ); + _buffer = new byte[capacity]; + _capacity = capacity; + _head = 0; + _tail = 0; + _size = 0; + } + + public int Size { get { return _size; } } + + public int Put(byte[] source, int offset, int count) + { + Debug.Assert( count > 0 ); + int trueCount = Math.Min(count, _capacity - Size); + for (int i = 0; i < trueCount; ++i) + _buffer[(_tail+i) % _capacity] = source[offset+i]; + _tail += trueCount; + _tail %= _capacity; + _size += trueCount; + return trueCount; + } + + public bool Put(byte b) + { + if (Size == _capacity) // no room + return false; + _buffer[_tail++] = b; + _tail %= _capacity; + ++_size; + return true; + } + + public int Get(byte[] destination, int offset, int count) + { + int trueCount = Math.Min(count,Size); + for (int i = 0; i < trueCount; ++i) + destination[offset + i] = _buffer[(_head+i) % _capacity]; + _head += trueCount; + _head %= _capacity; + _size -= trueCount; + return trueCount; + } + + public int Get() + { + if (Size == 0) + return -1; + + int result = (int)_buffer[_head++ % _capacity]; + --_size; + return result; + } + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs index b0eb78a..42e6da3 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs @@ -1,198 +1,198 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - /// - /// Implements the common functionality needed for all s - /// - public abstract class CodecBase : Codec, IDisposable - { - - #region Data members - - /// - /// Instance of the internal zlib buffer structure that is - /// passed to all functions in the zlib dll - /// - internal ZStream _ztream = new ZStream(); - - /// - /// True if the object instance has been disposed, false otherwise - /// - protected bool _isDisposed = false; - - /// - /// The size of the internal buffers - /// - protected const int kBufferSize = 16384; - - private byte[] _outBuffer = new byte[kBufferSize]; - private byte[] _inBuffer = new byte[kBufferSize]; - - private GCHandle _hInput; - private GCHandle _hOutput; - - private uint _checksum = 0; - - #endregion - - /// - /// Initializes a new instance of the CodeBase class. - /// - public CodecBase() - { - try - { - _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned); - _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned); - } - catch (Exception) - { - CleanUp(false); - throw; - } - } - - - #region Codec Members - - /// - /// Occurs when more processed data are available. - /// - public event DataAvailableHandler DataAvailable; - - /// - /// Fires the event - /// - protected void OnDataAvailable() - { - if (_ztream.total_out > 0) - { - if (DataAvailable != null) - DataAvailable( _outBuffer, 0, (int)_ztream.total_out); - resetOutput(); - } - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// Adding data may, or may not, raise the DataAvailable event - public void Add(byte[] data) - { - Add(data,0,data.Length); - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - /// This must be implemented by a derived class - public abstract void Add(byte[] data, int offset, int count); - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - /// This must be implemented by a derived class - public abstract void Finish(); - - /// - /// Gets the checksum of the data that has been added so far - /// - public uint Checksum { get { return _checksum; } } - - #endregion - - #region Destructor & IDisposable stuff - - /// - /// Destroys this instance - /// - ~CodecBase() - { - CleanUp(false); - } - - /// - /// Releases any unmanaged resources and calls the method of the derived class - /// - public void Dispose() - { - CleanUp(true); - } - - /// - /// Performs any codec specific cleanup - /// - /// This must be implemented by a derived class - protected abstract void CleanUp(); - - // performs the release of the handles and calls the dereived CleanUp() - private void CleanUp(bool isDisposing) - { - if (!_isDisposed) - { - CleanUp(); - if (_hInput.IsAllocated) - _hInput.Free(); - if (_hOutput.IsAllocated) - _hOutput.Free(); - - _isDisposed = true; - } - } - - - #endregion - - #region Helper methods - - /// - /// Copies a number of bytes to the internal codec buffer - ready for proccesing - /// - /// The byte array that contains the data to copy - /// The index of the first byte to copy - /// The number of bytes to copy from data - protected void copyInput(byte[] data, int startIndex, int count) - { - Array.Copy(data, startIndex, _inBuffer,0, count); - _ztream.next_in = _hInput.AddrOfPinnedObject(); - _ztream.total_in = 0; - _ztream.avail_in = (uint)count; - - } - - /// - /// Resets the internal output buffers to a known state - ready for processing - /// - protected void resetOutput() - { - _ztream.total_out = 0; - _ztream.avail_out = kBufferSize; - _ztream.next_out = _hOutput.AddrOfPinnedObject(); - } - - /// - /// Updates the running checksum property - /// - /// The new checksum value - protected void setChecksum(uint newSum) - { - _checksum = newSum; - } - #endregion - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements the common functionality needed for all s + /// + public abstract class CodecBase : Codec, IDisposable + { + + #region Data members + + /// + /// Instance of the internal zlib buffer structure that is + /// passed to all functions in the zlib dll + /// + internal ZStream _ztream = new ZStream(); + + /// + /// True if the object instance has been disposed, false otherwise + /// + protected bool _isDisposed = false; + + /// + /// The size of the internal buffers + /// + protected const int kBufferSize = 16384; + + private byte[] _outBuffer = new byte[kBufferSize]; + private byte[] _inBuffer = new byte[kBufferSize]; + + private GCHandle _hInput; + private GCHandle _hOutput; + + private uint _checksum = 0; + + #endregion + + /// + /// Initializes a new instance of the CodeBase class. + /// + public CodecBase() + { + try + { + _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned); + _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned); + } + catch (Exception) + { + CleanUp(false); + throw; + } + } + + + #region Codec Members + + /// + /// Occurs when more processed data are available. + /// + public event DataAvailableHandler DataAvailable; + + /// + /// Fires the event + /// + protected void OnDataAvailable() + { + if (_ztream.total_out > 0) + { + if (DataAvailable != null) + DataAvailable( _outBuffer, 0, (int)_ztream.total_out); + resetOutput(); + } + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + public void Add(byte[] data) + { + Add(data,0,data.Length); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + /// This must be implemented by a derived class + public abstract void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + /// This must be implemented by a derived class + public abstract void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + public uint Checksum { get { return _checksum; } } + + #endregion + + #region Destructor & IDisposable stuff + + /// + /// Destroys this instance + /// + ~CodecBase() + { + CleanUp(false); + } + + /// + /// Releases any unmanaged resources and calls the method of the derived class + /// + public void Dispose() + { + CleanUp(true); + } + + /// + /// Performs any codec specific cleanup + /// + /// This must be implemented by a derived class + protected abstract void CleanUp(); + + // performs the release of the handles and calls the dereived CleanUp() + private void CleanUp(bool isDisposing) + { + if (!_isDisposed) + { + CleanUp(); + if (_hInput.IsAllocated) + _hInput.Free(); + if (_hOutput.IsAllocated) + _hOutput.Free(); + + _isDisposed = true; + } + } + + + #endregion + + #region Helper methods + + /// + /// Copies a number of bytes to the internal codec buffer - ready for proccesing + /// + /// The byte array that contains the data to copy + /// The index of the first byte to copy + /// The number of bytes to copy from data + protected void copyInput(byte[] data, int startIndex, int count) + { + Array.Copy(data, startIndex, _inBuffer,0, count); + _ztream.next_in = _hInput.AddrOfPinnedObject(); + _ztream.total_in = 0; + _ztream.avail_in = (uint)count; + + } + + /// + /// Resets the internal output buffers to a known state - ready for processing + /// + protected void resetOutput() + { + _ztream.total_out = 0; + _ztream.avail_out = kBufferSize; + _ztream.next_out = _hOutput.AddrOfPinnedObject(); + } + + /// + /// Updates the running checksum property + /// + /// The new checksum value + protected void setChecksum(uint newSum) + { + _checksum = newSum; + } + #endregion + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs index 9039f41..c247792 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/Deflater.cs @@ -1,106 +1,106 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - - /// - /// Implements a data compressor, using the deflate algorithm in the ZLib dll - /// - public sealed class Deflater : CodecBase - { - #region Dll imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflate(ref ZStream sz, int flush); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflateReset(ref ZStream sz); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int deflateEnd(ref ZStream sz); - #endregion - - /// - /// Constructs an new instance of the Deflater - /// - /// The compression level to use for this Deflater - public Deflater(CompressLevel level) : base() - { - int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream)); - if (retval != 0) - throw new ZLibException(retval, "Could not initialize deflater"); - - resetOutput(); - } - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - public override void Add(byte[] data, int offset, int count) - { - if (data == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - - int total = count; - int inputIndex = offset; - int err = 0; - - while (err >= 0 && inputIndex < total) - { - copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); - while (err >= 0 && _ztream.avail_in > 0) - { - err = deflate(ref _ztream, (int)FlushTypes.None); - if (err == 0) - while (_ztream.avail_out == 0) - { - OnDataAvailable(); - err = deflate(ref _ztream, (int)FlushTypes.None); - } - inputIndex += (int)_ztream.total_in; - } - } - setChecksum( _ztream.adler ); - } - - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - public override void Finish() - { - int err; - do - { - err = deflate(ref _ztream, (int)FlushTypes.Finish); - OnDataAvailable(); - } - while (err == 0); - setChecksum( _ztream.adler ); - deflateReset(ref _ztream); - resetOutput(); - } - - /// - /// Closes the internal zlib deflate stream - /// - protected override void CleanUp() { deflateEnd(ref _ztream); } - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data compressor, using the deflate algorithm in the ZLib dll + /// + public sealed class Deflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int deflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Deflater + /// + /// The compression level to use for this Deflater + public Deflater(CompressLevel level) : base() + { + int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize deflater"); + + resetOutput(); + } + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + while (err >= 0 && _ztream.avail_in > 0) + { + err = deflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = deflate(ref _ztream, (int)FlushTypes.None); + } + inputIndex += (int)_ztream.total_in; + } + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = deflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + deflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib deflate stream + /// + protected override void CleanUp() { deflateEnd(ref _ztream); } + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs index 90c7c3b..be184b4 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs @@ -1,288 +1,288 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; - - -namespace DotZLib -{ - - #region Internal types - - /// - /// Defines constants for the various flush types used with zlib - /// - internal enum FlushTypes - { - None, Partial, Sync, Full, Finish, Block - } - - #region ZStream structure - // internal mapping of the zlib zstream structure for marshalling - [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)] - internal struct ZStream - { - public IntPtr next_in; - public uint avail_in; - public uint total_in; - - public IntPtr next_out; - public uint avail_out; - public uint total_out; - - [MarshalAs(UnmanagedType.LPStr)] - string msg; - uint state; - - uint zalloc; - uint zfree; - uint opaque; - - int data_type; - public uint adler; - uint reserved; - } - - #endregion - - #endregion - - #region Public enums - /// - /// Defines constants for the available compression levels in zlib - /// - public enum CompressLevel : int - { - /// - /// The default compression level with a reasonable compromise between compression and speed - /// - Default = -1, - /// - /// No compression at all. The data are passed straight through. - /// - None = 0, - /// - /// The maximum compression rate available. - /// - Best = 9, - /// - /// The fastest available compression level. - /// - Fastest = 1 - } - #endregion - - #region Exception classes - /// - /// The exception that is thrown when an error occurs on the zlib dll - /// - public class ZLibException : ApplicationException - { - /// - /// Initializes a new instance of the class with a specified - /// error message and error code - /// - /// The zlib error code that caused the exception - /// A message that (hopefully) describes the error - public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg)) - { - } - - /// - /// Initializes a new instance of the class with a specified - /// error code - /// - /// The zlib error code that caused the exception - public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode)) - { - } - } - #endregion - - #region Interfaces - - /// - /// Declares methods and properties that enables a running checksum to be calculated - /// - public interface ChecksumGenerator - { - /// - /// Gets the current value of the checksum - /// - uint Value { get; } - - /// - /// Clears the current checksum to 0 - /// - void Reset(); - - /// - /// Updates the current checksum with an array of bytes - /// - /// The data to update the checksum with - void Update(byte[] data); - - /// - /// Updates the current checksum with part of an array of bytes - /// - /// The data to update the checksum with - /// Where in data to start updating - /// The number of bytes from data to use - /// The sum of offset and count is larger than the length of data - /// data is a null reference - /// Offset or count is negative. - void Update(byte[] data, int offset, int count); - - /// - /// Updates the current checksum with the data from a string - /// - /// The string to update the checksum with - /// The characters in the string are converted by the UTF-8 encoding - void Update(string data); - - /// - /// Updates the current checksum with the data from a string, using a specific encoding - /// - /// The string to update the checksum with - /// The encoding to use - void Update(string data, Encoding encoding); - } - - - /// - /// Represents the method that will be called from a codec when new data - /// are available. - /// - /// The byte array containing the processed data - /// The index of the first processed byte in data - /// The number of processed bytes available - /// On return from this method, the data may be overwritten, so grab it while you can. - /// You cannot assume that startIndex will be zero. - /// - public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); - - /// - /// Declares methods and events for implementing compressors/decompressors - /// - public interface Codec - { - /// - /// Occurs when more processed data are available. - /// - event DataAvailableHandler DataAvailable; - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// Adding data may, or may not, raise the DataAvailable event - void Add(byte[] data); - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - void Add(byte[] data, int offset, int count); - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - void Finish(); - - /// - /// Gets the checksum of the data that has been added so far - /// - uint Checksum { get; } - - - } - - #endregion - - #region Classes - /// - /// Encapsulates general information about the ZLib library - /// - public class Info - { - #region DLL imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern uint zlibCompileFlags(); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern string zlibVersion(); - #endregion - - #region Private stuff - private uint _flags; - - // helper function that unpacks a bitsize mask - private static int bitSize(uint bits) - { - switch (bits) - { - case 0: return 16; - case 1: return 32; - case 2: return 64; - } - return -1; - } - #endregion - - /// - /// Constructs an instance of the Info class. - /// - public Info() - { - _flags = zlibCompileFlags(); - } - - /// - /// True if the library is compiled with debug info - /// - public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } } - - /// - /// True if the library is compiled with assembly optimizations - /// - public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } } - - /// - /// Gets the size of the unsigned int that was compiled into Zlib - /// - public int SizeOfUInt { get { return bitSize(_flags & 3); } } - - /// - /// Gets the size of the unsigned long that was compiled into Zlib - /// - public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } } - - /// - /// Gets the size of the pointers that were compiled into Zlib - /// - public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } } - - /// - /// Gets the size of the z_off_t type that was compiled into Zlib - /// - public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } } - - /// - /// Gets the version of ZLib as a string, e.g. "1.2.1" - /// - public static string Version { get { return zlibVersion(); } } - } - - #endregion - -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; + + +namespace DotZLib +{ + + #region Internal types + + /// + /// Defines constants for the various flush types used with zlib + /// + internal enum FlushTypes + { + None, Partial, Sync, Full, Finish, Block + } + + #region ZStream structure + // internal mapping of the zlib zstream structure for marshalling + [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)] + internal struct ZStream + { + public IntPtr next_in; + public uint avail_in; + public uint total_in; + + public IntPtr next_out; + public uint avail_out; + public uint total_out; + + [MarshalAs(UnmanagedType.LPStr)] + string msg; + uint state; + + uint zalloc; + uint zfree; + uint opaque; + + int data_type; + public uint adler; + uint reserved; + } + + #endregion + + #endregion + + #region Public enums + /// + /// Defines constants for the available compression levels in zlib + /// + public enum CompressLevel : int + { + /// + /// The default compression level with a reasonable compromise between compression and speed + /// + Default = -1, + /// + /// No compression at all. The data are passed straight through. + /// + None = 0, + /// + /// The maximum compression rate available. + /// + Best = 9, + /// + /// The fastest available compression level. + /// + Fastest = 1 + } + #endregion + + #region Exception classes + /// + /// The exception that is thrown when an error occurs on the zlib dll + /// + public class ZLibException : ApplicationException + { + /// + /// Initializes a new instance of the class with a specified + /// error message and error code + /// + /// The zlib error code that caused the exception + /// A message that (hopefully) describes the error + public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg)) + { + } + + /// + /// Initializes a new instance of the class with a specified + /// error code + /// + /// The zlib error code that caused the exception + public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode)) + { + } + } + #endregion + + #region Interfaces + + /// + /// Declares methods and properties that enables a running checksum to be calculated + /// + public interface ChecksumGenerator + { + /// + /// Gets the current value of the checksum + /// + uint Value { get; } + + /// + /// Clears the current checksum to 0 + /// + void Reset(); + + /// + /// Updates the current checksum with an array of bytes + /// + /// The data to update the checksum with + void Update(byte[] data); + + /// + /// Updates the current checksum with part of an array of bytes + /// + /// The data to update the checksum with + /// Where in data to start updating + /// The number of bytes from data to use + /// The sum of offset and count is larger than the length of data + /// data is a null reference + /// Offset or count is negative. + void Update(byte[] data, int offset, int count); + + /// + /// Updates the current checksum with the data from a string + /// + /// The string to update the checksum with + /// The characters in the string are converted by the UTF-8 encoding + void Update(string data); + + /// + /// Updates the current checksum with the data from a string, using a specific encoding + /// + /// The string to update the checksum with + /// The encoding to use + void Update(string data, Encoding encoding); + } + + + /// + /// Represents the method that will be called from a codec when new data + /// are available. + /// + /// The byte array containing the processed data + /// The index of the first processed byte in data + /// The number of processed bytes available + /// On return from this method, the data may be overwritten, so grab it while you can. + /// You cannot assume that startIndex will be zero. + /// + public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); + + /// + /// Declares methods and events for implementing compressors/decompressors + /// + public interface Codec + { + /// + /// Occurs when more processed data are available. + /// + event DataAvailableHandler DataAvailable; + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data); + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + void Add(byte[] data, int offset, int count); + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + void Finish(); + + /// + /// Gets the checksum of the data that has been added so far + /// + uint Checksum { get; } + + + } + + #endregion + + #region Classes + /// + /// Encapsulates general information about the ZLib library + /// + public class Info + { + #region DLL imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern uint zlibCompileFlags(); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern string zlibVersion(); + #endregion + + #region Private stuff + private uint _flags; + + // helper function that unpacks a bitsize mask + private static int bitSize(uint bits) + { + switch (bits) + { + case 0: return 16; + case 1: return 32; + case 2: return 64; + } + return -1; + } + #endregion + + /// + /// Constructs an instance of the Info class. + /// + public Info() + { + _flags = zlibCompileFlags(); + } + + /// + /// True if the library is compiled with debug info + /// + public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } } + + /// + /// True if the library is compiled with assembly optimizations + /// + public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } } + + /// + /// Gets the size of the unsigned int that was compiled into Zlib + /// + public int SizeOfUInt { get { return bitSize(_flags & 3); } } + + /// + /// Gets the size of the unsigned long that was compiled into Zlib + /// + public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } } + + /// + /// Gets the size of the pointers that were compiled into Zlib + /// + public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } } + + /// + /// Gets the size of the z_off_t type that was compiled into Zlib + /// + public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } } + + /// + /// Gets the version of ZLib as a string, e.g. "1.2.1" + /// + public static string Version { get { return zlibVersion(); } } + } + + #endregion + +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj index dea7fb1..71eeb85 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +++ b/compat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj @@ -1,141 +1,141 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs index f0eada1..b161300 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs @@ -1,301 +1,301 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.IO; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - /// - /// Implements a compressed , in GZip (.gz) format. - /// - public class GZipStream : Stream, IDisposable - { - #region Dll Imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern IntPtr gzopen(string name, string mode); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzclose(IntPtr gzFile); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzwrite(IntPtr gzFile, int data, int length); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzread(IntPtr gzFile, int data, int length); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzgetc(IntPtr gzFile); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int gzputc(IntPtr gzFile, int c); - - #endregion - - #region Private data - private IntPtr _gzFile; - private bool _isDisposed = false; - private bool _isWriting; - #endregion - - #region Constructors - /// - /// Creates a new file as a writeable GZipStream - /// - /// The name of the compressed file to create - /// The compression level to use when adding data - /// If an error occurred in the internal zlib function - public GZipStream(string fileName, CompressLevel level) - { - _isWriting = true; - _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level)); - if (_gzFile == IntPtr.Zero) - throw new ZLibException(-1, "Could not open " + fileName); - } - - /// - /// Opens an existing file as a readable GZipStream - /// - /// The name of the file to open - /// If an error occurred in the internal zlib function - public GZipStream(string fileName) - { - _isWriting = false; - _gzFile = gzopen(fileName, "rb"); - if (_gzFile == IntPtr.Zero) - throw new ZLibException(-1, "Could not open " + fileName); - - } - #endregion - - #region Access properties - /// - /// Returns true of this stream can be read from, false otherwise - /// - public override bool CanRead - { - get - { - return !_isWriting; - } - } - - - /// - /// Returns false. - /// - public override bool CanSeek - { - get - { - return false; - } - } - - /// - /// Returns true if this tsream is writeable, false otherwise - /// - public override bool CanWrite - { - get - { - return _isWriting; - } - } - #endregion - - #region Destructor & IDispose stuff - - /// - /// Destroys this instance - /// - ~GZipStream() - { - cleanUp(false); - } - - /// - /// Closes the external file handle - /// - public void Dispose() - { - cleanUp(true); - } - - // Does the actual closing of the file handle. - private void cleanUp(bool isDisposing) - { - if (!_isDisposed) - { - gzclose(_gzFile); - _isDisposed = true; - } - } - #endregion - - #region Basic reading and writing - /// - /// Attempts to read a number of bytes from the stream. - /// - /// The destination data buffer - /// The index of the first destination byte in buffer - /// The number of bytes requested - /// The number of bytes read - /// If buffer is null - /// If count or offset are negative - /// If offset + count is > buffer.Length - /// If this stream is not readable. - /// If this stream has been disposed. - public override int Read(byte[] buffer, int offset, int count) - { - if (!CanRead) throw new NotSupportedException(); - if (buffer == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > buffer.Length) throw new ArgumentException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); - int result; - try - { - result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); - if (result < 0) - throw new IOException(); - } - finally - { - h.Free(); - } - return result; - } - - /// - /// Attempts to read a single byte from the stream. - /// - /// The byte that was read, or -1 in case of error or End-Of-File - public override int ReadByte() - { - if (!CanRead) throw new NotSupportedException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - return gzgetc(_gzFile); - } - - /// - /// Writes a number of bytes to the stream - /// - /// - /// - /// - /// If buffer is null - /// If count or offset are negative - /// If offset + count is > buffer.Length - /// If this stream is not writeable. - /// If this stream has been disposed. - public override void Write(byte[] buffer, int offset, int count) - { - if (!CanWrite) throw new NotSupportedException(); - if (buffer == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > buffer.Length) throw new ArgumentException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); - try - { - int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); - if (result < 0) - throw new IOException(); - } - finally - { - h.Free(); - } - } - - /// - /// Writes a single byte to the stream - /// - /// The byte to add to the stream. - /// If this stream is not writeable. - /// If this stream has been disposed. - public override void WriteByte(byte value) - { - if (!CanWrite) throw new NotSupportedException(); - if (_isDisposed) throw new ObjectDisposedException("GZipStream"); - - int result = gzputc(_gzFile, (int)value); - if (result < 0) - throw new IOException(); - } - #endregion - - #region Position & length stuff - /// - /// Not supported. - /// - /// - /// Always thrown - public override void SetLength(long value) - { - throw new NotSupportedException(); - } - - /// - /// Not suppported. - /// - /// - /// - /// - /// Always thrown - public override long Seek(long offset, SeekOrigin origin) - { - throw new NotSupportedException(); - } - - /// - /// Flushes the GZipStream. - /// - /// In this implementation, this method does nothing. This is because excessive - /// flushing may degrade the achievable compression rates. - public override void Flush() - { - // left empty on purpose - } - - /// - /// Gets/sets the current position in the GZipStream. Not suppported. - /// - /// In this implementation this property is not supported - /// Always thrown - public override long Position - { - get - { - throw new NotSupportedException(); - } - set - { - throw new NotSupportedException(); - } - } - - /// - /// Gets the size of the stream. Not suppported. - /// - /// In this implementation this property is not supported - /// Always thrown - public override long Length - { - get - { - throw new NotSupportedException(); - } - } - #endregion - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + /// + /// Implements a compressed , in GZip (.gz) format. + /// + public class GZipStream : Stream, IDisposable + { + #region Dll Imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern IntPtr gzopen(string name, string mode); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzclose(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzwrite(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzread(IntPtr gzFile, int data, int length); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzgetc(IntPtr gzFile); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int gzputc(IntPtr gzFile, int c); + + #endregion + + #region Private data + private IntPtr _gzFile; + private bool _isDisposed = false; + private bool _isWriting; + #endregion + + #region Constructors + /// + /// Creates a new file as a writeable GZipStream + /// + /// The name of the compressed file to create + /// The compression level to use when adding data + /// If an error occurred in the internal zlib function + public GZipStream(string fileName, CompressLevel level) + { + _isWriting = true; + _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level)); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + } + + /// + /// Opens an existing file as a readable GZipStream + /// + /// The name of the file to open + /// If an error occurred in the internal zlib function + public GZipStream(string fileName) + { + _isWriting = false; + _gzFile = gzopen(fileName, "rb"); + if (_gzFile == IntPtr.Zero) + throw new ZLibException(-1, "Could not open " + fileName); + + } + #endregion + + #region Access properties + /// + /// Returns true of this stream can be read from, false otherwise + /// + public override bool CanRead + { + get + { + return !_isWriting; + } + } + + + /// + /// Returns false. + /// + public override bool CanSeek + { + get + { + return false; + } + } + + /// + /// Returns true if this tsream is writeable, false otherwise + /// + public override bool CanWrite + { + get + { + return _isWriting; + } + } + #endregion + + #region Destructor & IDispose stuff + + /// + /// Destroys this instance + /// + ~GZipStream() + { + cleanUp(false); + } + + /// + /// Closes the external file handle + /// + public void Dispose() + { + cleanUp(true); + } + + // Does the actual closing of the file handle. + private void cleanUp(bool isDisposing) + { + if (!_isDisposed) + { + gzclose(_gzFile); + _isDisposed = true; + } + } + #endregion + + #region Basic reading and writing + /// + /// Attempts to read a number of bytes from the stream. + /// + /// The destination data buffer + /// The index of the first destination byte in buffer + /// The number of bytes requested + /// The number of bytes read + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not readable. + /// If this stream has been disposed. + public override int Read(byte[] buffer, int offset, int count) + { + if (!CanRead) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + int result; + try + { + result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + return result; + } + + /// + /// Attempts to read a single byte from the stream. + /// + /// The byte that was read, or -1 in case of error or End-Of-File + public override int ReadByte() + { + if (!CanRead) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + return gzgetc(_gzFile); + } + + /// + /// Writes a number of bytes to the stream + /// + /// + /// + /// + /// If buffer is null + /// If count or offset are negative + /// If offset + count is > buffer.Length + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void Write(byte[] buffer, int offset, int count) + { + if (!CanWrite) throw new NotSupportedException(); + if (buffer == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > buffer.Length) throw new ArgumentException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned); + try + { + int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count); + if (result < 0) + throw new IOException(); + } + finally + { + h.Free(); + } + } + + /// + /// Writes a single byte to the stream + /// + /// The byte to add to the stream. + /// If this stream is not writeable. + /// If this stream has been disposed. + public override void WriteByte(byte value) + { + if (!CanWrite) throw new NotSupportedException(); + if (_isDisposed) throw new ObjectDisposedException("GZipStream"); + + int result = gzputc(_gzFile, (int)value); + if (result < 0) + throw new IOException(); + } + #endregion + + #region Position & length stuff + /// + /// Not supported. + /// + /// + /// Always thrown + public override void SetLength(long value) + { + throw new NotSupportedException(); + } + + /// + /// Not suppported. + /// + /// + /// + /// + /// Always thrown + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException(); + } + + /// + /// Flushes the GZipStream. + /// + /// In this implementation, this method does nothing. This is because excessive + /// flushing may degrade the achievable compression rates. + public override void Flush() + { + // left empty on purpose + } + + /// + /// Gets/sets the current position in the GZipStream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Position + { + get + { + throw new NotSupportedException(); + } + set + { + throw new NotSupportedException(); + } + } + + /// + /// Gets the size of the stream. Not suppported. + /// + /// In this implementation this property is not supported + /// Always thrown + public override long Length + { + get + { + throw new NotSupportedException(); + } + } + #endregion + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs index d295f26..8ed5451 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/Inflater.cs @@ -1,105 +1,105 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace DotZLib -{ - - /// - /// Implements a data decompressor, using the inflate algorithm in the ZLib dll - /// - public class Inflater : CodecBase - { - #region Dll imports - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] - private static extern int inflateInit_(ref ZStream sz, string vs, int size); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflate(ref ZStream sz, int flush); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflateReset(ref ZStream sz); - - [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] - private static extern int inflateEnd(ref ZStream sz); - #endregion - - /// - /// Constructs an new instance of the Inflater - /// - public Inflater() : base() - { - int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); - if (retval != 0) - throw new ZLibException(retval, "Could not initialize inflater"); - - resetOutput(); - } - - - /// - /// Adds more data to the codec to be processed. - /// - /// Byte array containing the data to be added to the codec - /// The index of the first byte to add from data - /// The number of bytes to add - /// Adding data may, or may not, raise the DataAvailable event - public override void Add(byte[] data, int offset, int count) - { - if (data == null) throw new ArgumentNullException(); - if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); - if ((offset+count) > data.Length) throw new ArgumentException(); - - int total = count; - int inputIndex = offset; - int err = 0; - - while (err >= 0 && inputIndex < total) - { - copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); - err = inflate(ref _ztream, (int)FlushTypes.None); - if (err == 0) - while (_ztream.avail_out == 0) - { - OnDataAvailable(); - err = inflate(ref _ztream, (int)FlushTypes.None); - } - - inputIndex += (int)_ztream.total_in; - } - setChecksum( _ztream.adler ); - } - - - /// - /// Finishes up any pending data that needs to be processed and handled. - /// - public override void Finish() - { - int err; - do - { - err = inflate(ref _ztream, (int)FlushTypes.Finish); - OnDataAvailable(); - } - while (err == 0); - setChecksum( _ztream.adler ); - inflateReset(ref _ztream); - resetOutput(); - } - - /// - /// Closes the internal zlib inflate stream - /// - protected override void CleanUp() { inflateEnd(ref _ztream); } - - - } -} +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace DotZLib +{ + + /// + /// Implements a data decompressor, using the inflate algorithm in the ZLib dll + /// + public class Inflater : CodecBase + { + #region Dll imports + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)] + private static extern int inflateInit_(ref ZStream sz, string vs, int size); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflate(ref ZStream sz, int flush); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateReset(ref ZStream sz); + + [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)] + private static extern int inflateEnd(ref ZStream sz); + #endregion + + /// + /// Constructs an new instance of the Inflater + /// + public Inflater() : base() + { + int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); + if (retval != 0) + throw new ZLibException(retval, "Could not initialize inflater"); + + resetOutput(); + } + + + /// + /// Adds more data to the codec to be processed. + /// + /// Byte array containing the data to be added to the codec + /// The index of the first byte to add from data + /// The number of bytes to add + /// Adding data may, or may not, raise the DataAvailable event + public override void Add(byte[] data, int offset, int count) + { + if (data == null) throw new ArgumentNullException(); + if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); + if ((offset+count) > data.Length) throw new ArgumentException(); + + int total = count; + int inputIndex = offset; + int err = 0; + + while (err >= 0 && inputIndex < total) + { + copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize)); + err = inflate(ref _ztream, (int)FlushTypes.None); + if (err == 0) + while (_ztream.avail_out == 0) + { + OnDataAvailable(); + err = inflate(ref _ztream, (int)FlushTypes.None); + } + + inputIndex += (int)_ztream.total_in; + } + setChecksum( _ztream.adler ); + } + + + /// + /// Finishes up any pending data that needs to be processed and handled. + /// + public override void Finish() + { + int err; + do + { + err = inflate(ref _ztream, (int)FlushTypes.Finish); + OnDataAvailable(); + } + while (err == 0); + setChecksum( _ztream.adler ); + inflateReset(ref _ztream); + resetOutput(); + } + + /// + /// Closes the internal zlib inflate stream + /// + protected override void CleanUp() { inflateEnd(ref _ztream); } + + + } +} diff --git a/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs index 6e3b609..3bbcc8c 100644 --- a/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs @@ -1,274 +1,274 @@ -// -// © Copyright Henrik Ravn 2004 -// -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -using System; -using System.Collections; -using System.IO; - -// uncomment the define below to include unit tests -//#define nunit -#if nunit -using NUnit.Framework; - -// Unit tests for the DotZLib class library -// ---------------------------------------- -// -// Use this with NUnit 2 from http://www.nunit.org -// - -namespace DotZLibTests -{ - using DotZLib; - - // helper methods - internal class Utils - { - public static bool byteArrEqual( byte[] lhs, byte[] rhs ) - { - if (lhs.Length != rhs.Length) - return false; - for (int i = lhs.Length-1; i >= 0; --i) - if (lhs[i] != rhs[i]) - return false; - return true; - } - - } - - - [TestFixture] - public class CircBufferTests - { - #region Circular buffer tests - [Test] - public void SinglePutGet() - { - CircularBuffer buf = new CircularBuffer(10); - Assert.AreEqual( 0, buf.Size ); - Assert.AreEqual( -1, buf.Get() ); - - Assert.IsTrue(buf.Put( 1 )); - Assert.AreEqual( 1, buf.Size ); - Assert.AreEqual( 1, buf.Get() ); - Assert.AreEqual( 0, buf.Size ); - Assert.AreEqual( -1, buf.Get() ); - } - - [Test] - public void BlockPutGet() - { - CircularBuffer buf = new CircularBuffer(10); - byte[] arr = {1,2,3,4,5,6,7,8,9,10}; - Assert.AreEqual( 10, buf.Put(arr,0,10) ); - Assert.AreEqual( 10, buf.Size ); - Assert.IsFalse( buf.Put(11) ); - Assert.AreEqual( 1, buf.Get() ); - Assert.IsTrue( buf.Put(11) ); - - byte[] arr2 = (byte[])arr.Clone(); - Assert.AreEqual( 9, buf.Get(arr2,1,9) ); - Assert.IsTrue( Utils.byteArrEqual(arr,arr2) ); - } - - #endregion - } - - [TestFixture] - public class ChecksumTests - { - #region CRC32 Tests - [Test] - public void CRC32_Null() - { - CRC32Checksum crc32 = new CRC32Checksum(); - Assert.AreEqual( 0, crc32.Value ); - - crc32 = new CRC32Checksum(1); - Assert.AreEqual( 1, crc32.Value ); - - crc32 = new CRC32Checksum(556); - Assert.AreEqual( 556, crc32.Value ); - } - - [Test] - public void CRC32_Data() - { - CRC32Checksum crc32 = new CRC32Checksum(); - byte[] data = { 1,2,3,4,5,6,7 }; - crc32.Update(data); - Assert.AreEqual( 0x70e46888, crc32.Value ); - - crc32 = new CRC32Checksum(); - crc32.Update("penguin"); - Assert.AreEqual( 0x0e5c1a120, crc32.Value ); - - crc32 = new CRC32Checksum(1); - crc32.Update("penguin"); - Assert.AreEqual(0x43b6aa94, crc32.Value); - - } - #endregion - - #region Adler tests - - [Test] - public void Adler_Null() - { - AdlerChecksum adler = new AdlerChecksum(); - Assert.AreEqual(0, adler.Value); - - adler = new AdlerChecksum(1); - Assert.AreEqual( 1, adler.Value ); - - adler = new AdlerChecksum(556); - Assert.AreEqual( 556, adler.Value ); - } - - [Test] - public void Adler_Data() - { - AdlerChecksum adler = new AdlerChecksum(1); - byte[] data = { 1,2,3,4,5,6,7 }; - adler.Update(data); - Assert.AreEqual( 0x5b001d, adler.Value ); - - adler = new AdlerChecksum(); - adler.Update("penguin"); - Assert.AreEqual(0x0bcf02f6, adler.Value ); - - adler = new AdlerChecksum(1); - adler.Update("penguin"); - Assert.AreEqual(0x0bd602f7, adler.Value); - - } - #endregion - } - - [TestFixture] - public class InfoTests - { - #region Info tests - [Test] - public void Info_Version() - { - Info info = new Info(); - Assert.AreEqual("1.2.4", Info.Version); - Assert.AreEqual(32, info.SizeOfUInt); - Assert.AreEqual(32, info.SizeOfULong); - Assert.AreEqual(32, info.SizeOfPointer); - Assert.AreEqual(32, info.SizeOfOffset); - } - #endregion - } - - [TestFixture] - public class DeflateInflateTests - { - #region Deflate tests - [Test] - public void Deflate_Init() - { - using (Deflater def = new Deflater(CompressLevel.Default)) - { - } - } - - private ArrayList compressedData = new ArrayList(); - private uint adler1; - - private ArrayList uncompressedData = new ArrayList(); - private uint adler2; - - public void CDataAvail(byte[] data, int startIndex, int count) - { - for (int i = 0; i < count; ++i) - compressedData.Add(data[i+startIndex]); - } - - [Test] - public void Deflate_Compress() - { - compressedData.Clear(); - - byte[] testData = new byte[35000]; - for (int i = 0; i < testData.Length; ++i) - testData[i] = 5; - - using (Deflater def = new Deflater((CompressLevel)5)) - { - def.DataAvailable += new DataAvailableHandler(CDataAvail); - def.Add(testData); - def.Finish(); - adler1 = def.Checksum; - } - } - #endregion - - #region Inflate tests - [Test] - public void Inflate_Init() - { - using (Inflater inf = new Inflater()) - { - } - } - - private void DDataAvail(byte[] data, int startIndex, int count) - { - for (int i = 0; i < count; ++i) - uncompressedData.Add(data[i+startIndex]); - } - - [Test] - public void Inflate_Expand() - { - uncompressedData.Clear(); - - using (Inflater inf = new Inflater()) - { - inf.DataAvailable += new DataAvailableHandler(DDataAvail); - inf.Add((byte[])compressedData.ToArray(typeof(byte))); - inf.Finish(); - adler2 = inf.Checksum; - } - Assert.AreEqual( adler1, adler2 ); - } - #endregion - } - - [TestFixture] - public class GZipStreamTests - { - #region GZipStream test - [Test] - public void GZipStream_WriteRead() - { - using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best)) - { - BinaryWriter writer = new BinaryWriter(gzOut); - writer.Write("hi there"); - writer.Write(Math.PI); - writer.Write(42); - } - - using (GZipStream gzIn = new GZipStream("gzstream.gz")) - { - BinaryReader reader = new BinaryReader(gzIn); - string s = reader.ReadString(); - Assert.AreEqual("hi there",s); - double d = reader.ReadDouble(); - Assert.AreEqual(Math.PI, d); - int i = reader.ReadInt32(); - Assert.AreEqual(42,i); - } - - } - #endregion - } -} - -#endif \ No newline at end of file +// +// © Copyright Henrik Ravn 2004 +// +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +using System; +using System.Collections; +using System.IO; + +// uncomment the define below to include unit tests +//#define nunit +#if nunit +using NUnit.Framework; + +// Unit tests for the DotZLib class library +// ---------------------------------------- +// +// Use this with NUnit 2 from http://www.nunit.org +// + +namespace DotZLibTests +{ + using DotZLib; + + // helper methods + internal class Utils + { + public static bool byteArrEqual( byte[] lhs, byte[] rhs ) + { + if (lhs.Length != rhs.Length) + return false; + for (int i = lhs.Length-1; i >= 0; --i) + if (lhs[i] != rhs[i]) + return false; + return true; + } + + } + + + [TestFixture] + public class CircBufferTests + { + #region Circular buffer tests + [Test] + public void SinglePutGet() + { + CircularBuffer buf = new CircularBuffer(10); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + + Assert.IsTrue(buf.Put( 1 )); + Assert.AreEqual( 1, buf.Size ); + Assert.AreEqual( 1, buf.Get() ); + Assert.AreEqual( 0, buf.Size ); + Assert.AreEqual( -1, buf.Get() ); + } + + [Test] + public void BlockPutGet() + { + CircularBuffer buf = new CircularBuffer(10); + byte[] arr = {1,2,3,4,5,6,7,8,9,10}; + Assert.AreEqual( 10, buf.Put(arr,0,10) ); + Assert.AreEqual( 10, buf.Size ); + Assert.IsFalse( buf.Put(11) ); + Assert.AreEqual( 1, buf.Get() ); + Assert.IsTrue( buf.Put(11) ); + + byte[] arr2 = (byte[])arr.Clone(); + Assert.AreEqual( 9, buf.Get(arr2,1,9) ); + Assert.IsTrue( Utils.byteArrEqual(arr,arr2) ); + } + + #endregion + } + + [TestFixture] + public class ChecksumTests + { + #region CRC32 Tests + [Test] + public void CRC32_Null() + { + CRC32Checksum crc32 = new CRC32Checksum(); + Assert.AreEqual( 0, crc32.Value ); + + crc32 = new CRC32Checksum(1); + Assert.AreEqual( 1, crc32.Value ); + + crc32 = new CRC32Checksum(556); + Assert.AreEqual( 556, crc32.Value ); + } + + [Test] + public void CRC32_Data() + { + CRC32Checksum crc32 = new CRC32Checksum(); + byte[] data = { 1,2,3,4,5,6,7 }; + crc32.Update(data); + Assert.AreEqual( 0x70e46888, crc32.Value ); + + crc32 = new CRC32Checksum(); + crc32.Update("penguin"); + Assert.AreEqual( 0x0e5c1a120, crc32.Value ); + + crc32 = new CRC32Checksum(1); + crc32.Update("penguin"); + Assert.AreEqual(0x43b6aa94, crc32.Value); + + } + #endregion + + #region Adler tests + + [Test] + public void Adler_Null() + { + AdlerChecksum adler = new AdlerChecksum(); + Assert.AreEqual(0, adler.Value); + + adler = new AdlerChecksum(1); + Assert.AreEqual( 1, adler.Value ); + + adler = new AdlerChecksum(556); + Assert.AreEqual( 556, adler.Value ); + } + + [Test] + public void Adler_Data() + { + AdlerChecksum adler = new AdlerChecksum(1); + byte[] data = { 1,2,3,4,5,6,7 }; + adler.Update(data); + Assert.AreEqual( 0x5b001d, adler.Value ); + + adler = new AdlerChecksum(); + adler.Update("penguin"); + Assert.AreEqual(0x0bcf02f6, adler.Value ); + + adler = new AdlerChecksum(1); + adler.Update("penguin"); + Assert.AreEqual(0x0bd602f7, adler.Value); + + } + #endregion + } + + [TestFixture] + public class InfoTests + { + #region Info tests + [Test] + public void Info_Version() + { + Info info = new Info(); + Assert.AreEqual("1.2.5", Info.Version); + Assert.AreEqual(32, info.SizeOfUInt); + Assert.AreEqual(32, info.SizeOfULong); + Assert.AreEqual(32, info.SizeOfPointer); + Assert.AreEqual(32, info.SizeOfOffset); + } + #endregion + } + + [TestFixture] + public class DeflateInflateTests + { + #region Deflate tests + [Test] + public void Deflate_Init() + { + using (Deflater def = new Deflater(CompressLevel.Default)) + { + } + } + + private ArrayList compressedData = new ArrayList(); + private uint adler1; + + private ArrayList uncompressedData = new ArrayList(); + private uint adler2; + + public void CDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + compressedData.Add(data[i+startIndex]); + } + + [Test] + public void Deflate_Compress() + { + compressedData.Clear(); + + byte[] testData = new byte[35000]; + for (int i = 0; i < testData.Length; ++i) + testData[i] = 5; + + using (Deflater def = new Deflater((CompressLevel)5)) + { + def.DataAvailable += new DataAvailableHandler(CDataAvail); + def.Add(testData); + def.Finish(); + adler1 = def.Checksum; + } + } + #endregion + + #region Inflate tests + [Test] + public void Inflate_Init() + { + using (Inflater inf = new Inflater()) + { + } + } + + private void DDataAvail(byte[] data, int startIndex, int count) + { + for (int i = 0; i < count; ++i) + uncompressedData.Add(data[i+startIndex]); + } + + [Test] + public void Inflate_Expand() + { + uncompressedData.Clear(); + + using (Inflater inf = new Inflater()) + { + inf.DataAvailable += new DataAvailableHandler(DDataAvail); + inf.Add((byte[])compressedData.ToArray(typeof(byte))); + inf.Finish(); + adler2 = inf.Checksum; + } + Assert.AreEqual( adler1, adler2 ); + } + #endregion + } + + [TestFixture] + public class GZipStreamTests + { + #region GZipStream test + [Test] + public void GZipStream_WriteRead() + { + using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best)) + { + BinaryWriter writer = new BinaryWriter(gzOut); + writer.Write("hi there"); + writer.Write(Math.PI); + writer.Write(42); + } + + using (GZipStream gzIn = new GZipStream("gzstream.gz")) + { + BinaryReader reader = new BinaryReader(gzIn); + string s = reader.ReadString(); + Assert.AreEqual("hi there",s); + double d = reader.ReadDouble(); + Assert.AreEqual(Math.PI, d); + int i = reader.ReadInt32(); + Assert.AreEqual(42,i); + } + + } + #endregion + } +} + +#endif diff --git a/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt b/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt index 127a5bc..30aac2c 100644 --- a/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt +++ b/compat/zlib/contrib/dotzlib/LICENSE_1_0.txt @@ -1,23 +1,23 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/compat/zlib/contrib/dotzlib/readme.txt b/compat/zlib/contrib/dotzlib/readme.txt index 4d8c2dd..b239572 100644 --- a/compat/zlib/contrib/dotzlib/readme.txt +++ b/compat/zlib/contrib/dotzlib/readme.txt @@ -1,58 +1,58 @@ -This directory contains a .Net wrapper class library for the ZLib1.dll - -The wrapper includes support for inflating/deflating memory buffers, -.Net streaming wrappers for the gz streams part of zlib, and wrappers -for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. - -Directory structure: --------------------- - -LICENSE_1_0.txt - License file. -readme.txt - This file. -DotZLib.chm - Class library documentation -DotZLib.build - NAnt build file -DotZLib.sln - Microsoft Visual Studio 2003 solution file - -DotZLib\*.cs - Source files for the class library - -Unit tests: ------------ -The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher. -To include unit tests in the build, define nunit before building. - - -Build instructions: -------------------- - -1. Using Visual Studio.Net 2003: - Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) - will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on - you are building the release or debug version of the library. Check - DotZLib/UnitTests.cs for instructions on how to include unit tests in the - build. - -2. Using NAnt: - Open a command prompt with access to the build environment and run nant - in the same directory as the DotZLib.build file. - You can define 2 properties on the nant command-line to control the build: - debug={true|false} to toggle between release/debug builds (default=true). - nunit={true|false} to include or esclude unit tests (default=true). - Also the target clean will remove binaries. - Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release - or ./DotZLib/bin/debug, depending on whether you are building the release - or debug version of the library. - - Examples: - nant -D:debug=false -D:nunit=false - will build a release mode version of the library without unit tests. - nant - will build a debug version of the library with unit tests - nant clean - will remove all previously built files. - - ---------------------------------- -Copyright (c) Henrik Ravn 2004 - -Use, modification and distribution are subject to the Boost Software License, Version 1.0. -(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +This directory contains a .Net wrapper class library for the ZLib1.dll + +The wrapper includes support for inflating/deflating memory buffers, +.Net streaming wrappers for the gz streams part of zlib, and wrappers +for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. + +Directory structure: +-------------------- + +LICENSE_1_0.txt - License file. +readme.txt - This file. +DotZLib.chm - Class library documentation +DotZLib.build - NAnt build file +DotZLib.sln - Microsoft Visual Studio 2003 solution file + +DotZLib\*.cs - Source files for the class library + +Unit tests: +----------- +The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher. +To include unit tests in the build, define nunit before building. + + +Build instructions: +------------------- + +1. Using Visual Studio.Net 2003: + Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) + will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on + you are building the release or debug version of the library. Check + DotZLib/UnitTests.cs for instructions on how to include unit tests in the + build. + +2. Using NAnt: + Open a command prompt with access to the build environment and run nant + in the same directory as the DotZLib.build file. + You can define 2 properties on the nant command-line to control the build: + debug={true|false} to toggle between release/debug builds (default=true). + nunit={true|false} to include or esclude unit tests (default=true). + Also the target clean will remove binaries. + Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release + or ./DotZLib/bin/debug, depending on whether you are building the release + or debug version of the library. + + Examples: + nant -D:debug=false -D:nunit=false + will build a release mode version of the library without unit tests. + nant + will build a debug version of the library with unit tests + nant clean + will remove all previously built files. + + +--------------------------------- +Copyright (c) Henrik Ravn 2004 + +Use, modification and distribution are subject to the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/compat/zlib/contrib/gcc_gvmat64/gvmat64.S b/compat/zlib/contrib/gcc_gvmat64/gvmat64.S index 23309fa..dd858dd 100644 --- a/compat/zlib/contrib/gcc_gvmat64/gvmat64.S +++ b/compat/zlib/contrib/gcc_gvmat64/gvmat64.S @@ -1,574 +1,574 @@ -/* -;uInt longest_match_x64( -; deflate_state *s, -; IPos cur_match); // current match - -; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64 -; (AMD64 on Athlon 64, Opteron, Phenom -; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) -; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode) -; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. -; -; File written by Gilles Vollant, by converting to assembly the longest_match -; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. -; and by taking inspiration on asm686 with masm, optimised assembly code -; from Brian Raiter, written 1998 -; -; This software is provided 'as-is', without any express or implied -; warranty. In no event will the authors be held liable for any damages -; arising from the use of this software. -; -; Permission is granted to anyone to use this software for any purpose, -; including commercial applications, and to alter it and redistribute it -; freely, subject to the following restrictions: -; -; 1. The origin of this software must not be misrepresented; you must not -; claim that you wrote the original software. If you use this software -; in a product, an acknowledgment in the product documentation would be -; appreciated but is not required. -; 2. Altered source versions must be plainly marked as such, and must not be -; misrepresented as being the original software -; 3. This notice may not be removed or altered from any source distribution. -; -; http://www.zlib.net -; http://www.winimage.com/zLibDll -; http://www.muppetlabs.com/~breadbox/software/assembly.html -; -; to compile this file for zLib, I use option: -; gcc -c -arch x86_64 gvmat64.S - - -;uInt longest_match(s, cur_match) -; deflate_state *s; -; IPos cur_match; // current match / -; -; with XCode for Mac, I had strange error with some jump on intel syntax -; this is why BEFORE_JMP and AFTER_JMP are used - */ - - -#define BEFORE_JMP .att_syntax -#define AFTER_JMP .intel_syntax noprefix - -#ifndef NO_UNDERLINE -# define match_init _match_init -# define longest_match _longest_match -#endif - -.intel_syntax noprefix - -.globl match_init, longest_match -.text -longest_match: - - - -#define LocalVarsSize 96 -/* -; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 -; free register : r14,r15 -; register can be saved : rsp -*/ - -#define chainlenwmask (rsp + 8 - LocalVarsSize) -#define nicematch (rsp + 16 - LocalVarsSize) - -#define save_rdi (rsp + 24 - LocalVarsSize) -#define save_rsi (rsp + 32 - LocalVarsSize) -#define save_rbx (rsp + 40 - LocalVarsSize) -#define save_rbp (rsp + 48 - LocalVarsSize) -#define save_r12 (rsp + 56 - LocalVarsSize) -#define save_r13 (rsp + 64 - LocalVarsSize) -#define save_r14 (rsp + 72 - LocalVarsSize) -#define save_r15 (rsp + 80 - LocalVarsSize) - - -/* -; all the +4 offsets are due to the addition of pending_buf_size (in zlib -; in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, remove the +4). -; Note : these value are good with a 8 bytes boundary pack structure -*/ - -#define MAX_MATCH 258 -#define MIN_MATCH 3 -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) - -/* -;;; Offsets for fields in the deflate_state structure. These numbers -;;; are calculated from the definition of deflate_state, with the -;;; assumption that the compiler will dword-align the fields. (Thus, -;;; changing the definition of deflate_state could easily cause this -;;; program to crash horribly, without so much as a warning at -;;; compile time. Sigh.) - -; all the +zlib1222add offsets are due to the addition of fields -; in zlib in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). -; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). -; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). -*/ - - - -/* you can check the structure offset by running - -#include -#include -#include "deflate.h" - -void print_depl() -{ -deflate_state ds; -deflate_state *s=&ds; -printf("size pointer=%u\n",(int)sizeof(void*)); - -printf("#define dsWSize %u\n",(int)(((char*)&(s->w_size))-((char*)s))); -printf("#define dsWMask %u\n",(int)(((char*)&(s->w_mask))-((char*)s))); -printf("#define dsWindow %u\n",(int)(((char*)&(s->window))-((char*)s))); -printf("#define dsPrev %u\n",(int)(((char*)&(s->prev))-((char*)s))); -printf("#define dsMatchLen %u\n",(int)(((char*)&(s->match_length))-((char*)s))); -printf("#define dsPrevMatch %u\n",(int)(((char*)&(s->prev_match))-((char*)s))); -printf("#define dsStrStart %u\n",(int)(((char*)&(s->strstart))-((char*)s))); -printf("#define dsMatchStart %u\n",(int)(((char*)&(s->match_start))-((char*)s))); -printf("#define dsLookahead %u\n",(int)(((char*)&(s->lookahead))-((char*)s))); -printf("#define dsPrevLen %u\n",(int)(((char*)&(s->prev_length))-((char*)s))); -printf("#define dsMaxChainLen %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s))); -printf("#define dsGoodMatch %u\n",(int)(((char*)&(s->good_match))-((char*)s))); -printf("#define dsNiceMatch %u\n",(int)(((char*)&(s->nice_match))-((char*)s))); -} -*/ - -#define dsWSize 68 -#define dsWMask 76 -#define dsWindow 80 -#define dsPrev 96 -#define dsMatchLen 144 -#define dsPrevMatch 148 -#define dsStrStart 156 -#define dsMatchStart 160 -#define dsLookahead 164 -#define dsPrevLen 168 -#define dsMaxChainLen 172 -#define dsGoodMatch 188 -#define dsNiceMatch 192 - -#define window_size [ rcx + dsWSize] -#define WMask [ rcx + dsWMask] -#define window_ad [ rcx + dsWindow] -#define prev_ad [ rcx + dsPrev] -#define strstart [ rcx + dsStrStart] -#define match_start [ rcx + dsMatchStart] -#define Lookahead [ rcx + dsLookahead] //; 0ffffffffh on infozip -#define prev_length [ rcx + dsPrevLen] -#define max_chain_length [ rcx + dsMaxChainLen] -#define good_match [ rcx + dsGoodMatch] -#define nice_match [ rcx + dsNiceMatch] - -/* -; windows: -; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match) - -; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and -; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp -; -; All registers must be preserved across the call, except for -; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. - -; -; gcc on macosx-linux: -; see http://www.x86-64.org/documentation/abi-0.99.pdf -; param 1 in rdi, param 2 in rsi -; rbx, rsp, rbp, r12 to r15 must be preserved - -;;; Save registers that the compiler may be using, and adjust esp to -;;; make room for our stack frame. - - -;;; Retrieve the function arguments. r8d will hold cur_match -;;; throughout the entire function. edx will hold the pointer to the -;;; deflate_state structure during the function's setup (before -;;; entering the main loop. - -; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) -; mac: param 1 in rdi, param 2 rsi -; this clear high 32 bits of r8, which can be garbage in both r8 and rdx -*/ - mov [save_rbx],rbx - mov [save_rbp],rbp - - - mov rcx,rdi - - mov r8d,esi - - - mov [save_r12],r12 - mov [save_r13],r13 - mov [save_r14],r14 - mov [save_r15],r15 - - -//;;; uInt wmask = s->w_mask; -//;;; unsigned chain_length = s->max_chain_length; -//;;; if (s->prev_length >= s->good_match) { -//;;; chain_length >>= 2; -//;;; } - - - mov edi, prev_length - mov esi, good_match - mov eax, WMask - mov ebx, max_chain_length - cmp edi, esi - jl LastMatchGood - shr ebx, 2 -LastMatchGood: - -//;;; chainlen is decremented once beforehand so that the function can -//;;; use the sign flag instead of the zero flag for the exit test. -//;;; It is then shifted into the high word, to make room for the wmask -//;;; value, which it will always accompany. - - dec ebx - shl ebx, 16 - or ebx, eax - -//;;; on zlib only -//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; - - - - mov eax, nice_match - mov [chainlenwmask], ebx - mov r10d, Lookahead - cmp r10d, eax - cmovnl r10d, eax - mov [nicematch],r10d - - - -//;;; register Bytef *scan = s->window + s->strstart; - mov r10, window_ad - mov ebp, strstart - lea r13, [r10 + rbp] - -//;;; Determine how many bytes the scan ptr is off from being -//;;; dword-aligned. - - mov r9,r13 - neg r13 - and r13,3 - -//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? -//;;; s->strstart - (IPos)MAX_DIST(s) : NIL; - - - mov eax, window_size - sub eax, MIN_LOOKAHEAD - - - xor edi,edi - sub ebp, eax - - mov r11d, prev_length - - cmovng ebp,edi - -//;;; int best_len = s->prev_length; - - -//;;; Store the sum of s->window + best_len in esi locally, and in esi. - - lea rsi,[r10+r11] - -//;;; register ush scan_start = *(ushf*)scan; -//;;; register ush scan_end = *(ushf*)(scan+best_len-1); -//;;; Posf *prev = s->prev; - - movzx r12d,word ptr [r9] - movzx ebx, word ptr [r9 + r11 - 1] - - mov rdi, prev_ad - -//;;; Jump into the main loop. - - mov edx, [chainlenwmask] - - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - - - -LookupLoop1: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - - - - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry1: - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jz LookupLoopIsZero - AFTER_JMP - -LookupLoop2: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - BEFORE_JMP - jbe LeaveNow - AFTER_JMP - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry2: - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jz LookupLoopIsZero - AFTER_JMP - -LookupLoop4: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - BEFORE_JMP - jbe LeaveNow - AFTER_JMP - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry4: - - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jnz LookupLoop1 - jmp LookupLoopIsZero - AFTER_JMP -/* -;;; do { -;;; match = s->window + cur_match; -;;; if (*(ushf*)(match+best_len-1) != scan_end || -;;; *(ushf*)match != scan_start) continue; -;;; [...] -;;; } while ((cur_match = prev[cur_match & wmask]) > limit -;;; && --chain_length != 0); -;;; -;;; Here is the inner loop of the function. The function will spend the -;;; majority of its time in this loop, and majority of that time will -;;; be spent in the first ten instructions. -;;; -;;; Within this loop: -;;; ebx = scanend -;;; r8d = curmatch -;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) -;;; esi = windowbestlen - i.e., (window + bestlen) -;;; edi = prev -;;; ebp = limit -*/ -.balign 16 -LookupLoop: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - BEFORE_JMP - jbe LeaveNow - AFTER_JMP - sub edx, 0x00010000 - BEFORE_JMP - js LeaveNow - AFTER_JMP - -LoopEntry: - - cmp bx,word ptr [rsi + r8 - 1] - BEFORE_JMP - jnz LookupLoop1 - AFTER_JMP -LookupLoopIsZero: - cmp r12w, word ptr [r10 + r8] - BEFORE_JMP - jnz LookupLoop1 - AFTER_JMP - - -//;;; Store the current value of chainlen. - mov [chainlenwmask], edx -/* -;;; Point edi to the string under scrutiny, and esi to the string we -;;; are hoping to match it up with. In actuality, esi and edi are -;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is -;;; initialized to -(MAX_MATCH_8 - scanalign). -*/ - lea rsi,[r8+r10] - mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8) - lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8] - lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8] - - prefetcht1 [rsi+rdx] - prefetcht1 [rdi+rdx] - -/* -;;; Test the strings for equality, 8 bytes at a time. At the end, -;;; adjust rdx so that it is offset to the exact byte that mismatched. -;;; -;;; We already know at this point that the first three bytes of the -;;; strings match each other, and they can be safely passed over before -;;; starting the compare loop. So what this code does is skip over 0-3 -;;; bytes, as much as necessary in order to dword-align the edi -;;; pointer. (rsi will still be misaligned three times out of four.) -;;; -;;; It should be confessed that this loop usually does not represent -;;; much of the total running time. Replacing it with a more -;;; straightforward "rep cmpsb" would not drastically degrade -;;; performance. -*/ - -LoopCmps: - mov rax, [rsi + rdx] - xor rax, [rdi + rdx] - jnz LeaveLoopCmps - - mov rax, [rsi + rdx + 8] - xor rax, [rdi + rdx + 8] - jnz LeaveLoopCmps8 - - - mov rax, [rsi + rdx + 8+8] - xor rax, [rdi + rdx + 8+8] - jnz LeaveLoopCmps16 - - add rdx,8+8+8 - - BEFORE_JMP - jnz LoopCmps - jmp LenMaximum - AFTER_JMP - -LeaveLoopCmps16: add rdx,8 -LeaveLoopCmps8: add rdx,8 -LeaveLoopCmps: - - test eax, 0x0000FFFF - jnz LenLower - - test eax,0xffffffff - - jnz LenLower32 - - add rdx,4 - shr rax,32 - or ax,ax - BEFORE_JMP - jnz LenLower - AFTER_JMP - -LenLower32: - shr eax,16 - add rdx,2 - -LenLower: - sub al, 1 - adc rdx, 0 -//;;; Calculate the length of the match. If it is longer than MAX_MATCH, -//;;; then automatically accept it as the best possible match and leave. - - lea rax, [rdi + rdx] - sub rax, r9 - cmp eax, MAX_MATCH - BEFORE_JMP - jge LenMaximum - AFTER_JMP -/* -;;; If the length of the match is not longer than the best match we -;;; have so far, then forget it and return to the lookup loop. -;/////////////////////////////////// -*/ - cmp eax, r11d - jg LongerMatch - - lea rsi,[r10+r11] - - mov rdi, prev_ad - mov edx, [chainlenwmask] - BEFORE_JMP - jmp LookupLoop - AFTER_JMP -/* -;;; s->match_start = cur_match; -;;; best_len = len; -;;; if (len >= nice_match) break; -;;; scan_end = *(ushf*)(scan+best_len-1); -*/ -LongerMatch: - mov r11d, eax - mov match_start, r8d - cmp eax, [nicematch] - BEFORE_JMP - jge LeaveNow - AFTER_JMP - - lea rsi,[r10+rax] - - movzx ebx, word ptr [r9 + rax - 1] - mov rdi, prev_ad - mov edx, [chainlenwmask] - BEFORE_JMP - jmp LookupLoop - AFTER_JMP - -//;;; Accept the current string, with the maximum possible length. - -LenMaximum: - mov r11d,MAX_MATCH - mov match_start, r8d - -//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; -//;;; return s->lookahead; - -LeaveNow: - mov eax, Lookahead - cmp r11d, eax - cmovng eax, r11d - - - -//;;; Restore the stack and return from whence we came. - - -// mov rsi,[save_rsi] -// mov rdi,[save_rdi] - mov rbx,[save_rbx] - mov rbp,[save_rbp] - mov r12,[save_r12] - mov r13,[save_r13] - mov r14,[save_r14] - mov r15,[save_r15] - - - ret 0 -//; please don't remove this string ! -//; Your can freely use gvmat64 in any free or commercial app -//; but it is far better don't remove the string in the binary! - // db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 - - -match_init: - ret 0 - - +/* +;uInt longest_match_x64( +; deflate_state *s, +; IPos cur_match); // current match + +; gvmat64.S -- Asm portion of the optimized longest_match for 32 bits x86_64 +; (AMD64 on Athlon 64, Opteron, Phenom +; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) +; this file is translation from gvmat64.asm to GCC 4.x (for Linux, Mac XCode) +; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; +; File written by Gilles Vollant, by converting to assembly the longest_match +; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. +; and by taking inspiration on asm686 with masm, optimised assembly code +; from Brian Raiter, written 1998 +; +; This software is provided 'as-is', without any express or implied +; warranty. In no event will the authors be held liable for any damages +; arising from the use of this software. +; +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it +; freely, subject to the following restrictions: +; +; 1. The origin of this software must not be misrepresented; you must not +; claim that you wrote the original software. If you use this software +; in a product, an acknowledgment in the product documentation would be +; appreciated but is not required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software +; 3. This notice may not be removed or altered from any source distribution. +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; to compile this file for zLib, I use option: +; gcc -c -arch x86_64 gvmat64.S + + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; // current match / +; +; with XCode for Mac, I had strange error with some jump on intel syntax +; this is why BEFORE_JMP and AFTER_JMP are used + */ + + +#define BEFORE_JMP .att_syntax +#define AFTER_JMP .intel_syntax noprefix + +#ifndef NO_UNDERLINE +# define match_init _match_init +# define longest_match _longest_match +#endif + +.intel_syntax noprefix + +.globl match_init, longest_match +.text +longest_match: + + + +#define LocalVarsSize 96 +/* +; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 +; free register : r14,r15 +; register can be saved : rsp +*/ + +#define chainlenwmask (rsp + 8 - LocalVarsSize) +#define nicematch (rsp + 16 - LocalVarsSize) + +#define save_rdi (rsp + 24 - LocalVarsSize) +#define save_rsi (rsp + 32 - LocalVarsSize) +#define save_rbx (rsp + 40 - LocalVarsSize) +#define save_rbp (rsp + 48 - LocalVarsSize) +#define save_r12 (rsp + 56 - LocalVarsSize) +#define save_r13 (rsp + 64 - LocalVarsSize) +#define save_r14 (rsp + 72 - LocalVarsSize) +#define save_r15 (rsp + 80 - LocalVarsSize) + + +/* +; all the +4 offsets are due to the addition of pending_buf_size (in zlib +; in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, remove the +4). +; Note : these value are good with a 8 bytes boundary pack structure +*/ + +#define MAX_MATCH 258 +#define MIN_MATCH 3 +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) + +/* +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). +*/ + + + +/* you can check the structure offset by running + +#include +#include +#include "deflate.h" + +void print_depl() +{ +deflate_state ds; +deflate_state *s=&ds; +printf("size pointer=%u\n",(int)sizeof(void*)); + +printf("#define dsWSize %u\n",(int)(((char*)&(s->w_size))-((char*)s))); +printf("#define dsWMask %u\n",(int)(((char*)&(s->w_mask))-((char*)s))); +printf("#define dsWindow %u\n",(int)(((char*)&(s->window))-((char*)s))); +printf("#define dsPrev %u\n",(int)(((char*)&(s->prev))-((char*)s))); +printf("#define dsMatchLen %u\n",(int)(((char*)&(s->match_length))-((char*)s))); +printf("#define dsPrevMatch %u\n",(int)(((char*)&(s->prev_match))-((char*)s))); +printf("#define dsStrStart %u\n",(int)(((char*)&(s->strstart))-((char*)s))); +printf("#define dsMatchStart %u\n",(int)(((char*)&(s->match_start))-((char*)s))); +printf("#define dsLookahead %u\n",(int)(((char*)&(s->lookahead))-((char*)s))); +printf("#define dsPrevLen %u\n",(int)(((char*)&(s->prev_length))-((char*)s))); +printf("#define dsMaxChainLen %u\n",(int)(((char*)&(s->max_chain_length))-((char*)s))); +printf("#define dsGoodMatch %u\n",(int)(((char*)&(s->good_match))-((char*)s))); +printf("#define dsNiceMatch %u\n",(int)(((char*)&(s->nice_match))-((char*)s))); +} +*/ + +#define dsWSize 68 +#define dsWMask 76 +#define dsWindow 80 +#define dsPrev 96 +#define dsMatchLen 144 +#define dsPrevMatch 148 +#define dsStrStart 156 +#define dsMatchStart 160 +#define dsLookahead 164 +#define dsPrevLen 168 +#define dsMaxChainLen 172 +#define dsGoodMatch 188 +#define dsNiceMatch 192 + +#define window_size [ rcx + dsWSize] +#define WMask [ rcx + dsWMask] +#define window_ad [ rcx + dsWindow] +#define prev_ad [ rcx + dsPrev] +#define strstart [ rcx + dsStrStart] +#define match_start [ rcx + dsMatchStart] +#define Lookahead [ rcx + dsLookahead] //; 0ffffffffh on infozip +#define prev_length [ rcx + dsPrevLen] +#define max_chain_length [ rcx + dsMaxChainLen] +#define good_match [ rcx + dsGoodMatch] +#define nice_match [ rcx + dsNiceMatch] + +/* +; windows: +; parameter 1 in rcx(deflate state s), param 2 in rdx (cur match) + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. + +; +; gcc on macosx-linux: +; see http://www.x86-64.org/documentation/abi-0.99.pdf +; param 1 in rdi, param 2 in rsi +; rbx, rsp, rbp, r12 to r15 must be preserved + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + +;;; Retrieve the function arguments. r8d will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + +; ms: parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) +; mac: param 1 in rdi, param 2 rsi +; this clear high 32 bits of r8, which can be garbage in both r8 and rdx +*/ + mov [save_rbx],rbx + mov [save_rbp],rbp + + + mov rcx,rdi + + mov r8d,esi + + + mov [save_r12],r12 + mov [save_r13],r13 + mov [save_r14],r14 + mov [save_r15],r15 + + +//;;; uInt wmask = s->w_mask; +//;;; unsigned chain_length = s->max_chain_length; +//;;; if (s->prev_length >= s->good_match) { +//;;; chain_length >>= 2; +//;;; } + + + mov edi, prev_length + mov esi, good_match + mov eax, WMask + mov ebx, max_chain_length + cmp edi, esi + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +//;;; chainlen is decremented once beforehand so that the function can +//;;; use the sign flag instead of the zero flag for the exit test. +//;;; It is then shifted into the high word, to make room for the wmask +//;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + +//;;; on zlib only +//;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + + + mov eax, nice_match + mov [chainlenwmask], ebx + mov r10d, Lookahead + cmp r10d, eax + cmovnl r10d, eax + mov [nicematch],r10d + + + +//;;; register Bytef *scan = s->window + s->strstart; + mov r10, window_ad + mov ebp, strstart + lea r13, [r10 + rbp] + +//;;; Determine how many bytes the scan ptr is off from being +//;;; dword-aligned. + + mov r9,r13 + neg r13 + and r13,3 + +//;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +//;;; s->strstart - (IPos)MAX_DIST(s) : NIL; + + + mov eax, window_size + sub eax, MIN_LOOKAHEAD + + + xor edi,edi + sub ebp, eax + + mov r11d, prev_length + + cmovng ebp,edi + +//;;; int best_len = s->prev_length; + + +//;;; Store the sum of s->window + best_len in esi locally, and in esi. + + lea rsi,[r10+r11] + +//;;; register ush scan_start = *(ushf*)scan; +//;;; register ush scan_end = *(ushf*)(scan+best_len-1); +//;;; Posf *prev = s->prev; + + movzx r12d,word ptr [r9] + movzx ebx, word ptr [r9 + r11 - 1] + + mov rdi, prev_ad + +//;;; Jump into the main loop. + + mov edx, [chainlenwmask] + + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + + + +LookupLoop1: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + + + + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry1: + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jz LookupLoopIsZero + AFTER_JMP + +LookupLoop2: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry2: + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jz LookupLoopIsZero + AFTER_JMP + +LookupLoop4: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry4: + + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jnz LookupLoop1 + jmp LookupLoopIsZero + AFTER_JMP +/* +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; r8d = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit +*/ +.balign 16 +LookupLoop: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + BEFORE_JMP + jbe LeaveNow + AFTER_JMP + sub edx, 0x00010000 + BEFORE_JMP + js LeaveNow + AFTER_JMP + +LoopEntry: + + cmp bx,word ptr [rsi + r8 - 1] + BEFORE_JMP + jnz LookupLoop1 + AFTER_JMP +LookupLoopIsZero: + cmp r12w, word ptr [r10 + r8] + BEFORE_JMP + jnz LookupLoop1 + AFTER_JMP + + +//;;; Store the current value of chainlen. + mov [chainlenwmask], edx +/* +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). +*/ + lea rsi,[r8+r10] + mov rdx, 0xfffffffffffffef8 //; -(MAX_MATCH_8) + lea rsi, [rsi + r13 + 0x0108] //;MAX_MATCH_8] + lea rdi, [r9 + r13 + 0x0108] //;MAX_MATCH_8] + + prefetcht1 [rsi+rdx] + prefetcht1 [rdi+rdx] + +/* +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust rdx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (rsi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. +*/ + +LoopCmps: + mov rax, [rsi + rdx] + xor rax, [rdi + rdx] + jnz LeaveLoopCmps + + mov rax, [rsi + rdx + 8] + xor rax, [rdi + rdx + 8] + jnz LeaveLoopCmps8 + + + mov rax, [rsi + rdx + 8+8] + xor rax, [rdi + rdx + 8+8] + jnz LeaveLoopCmps16 + + add rdx,8+8+8 + + BEFORE_JMP + jnz LoopCmps + jmp LenMaximum + AFTER_JMP + +LeaveLoopCmps16: add rdx,8 +LeaveLoopCmps8: add rdx,8 +LeaveLoopCmps: + + test eax, 0x0000FFFF + jnz LenLower + + test eax,0xffffffff + + jnz LenLower32 + + add rdx,4 + shr rax,32 + or ax,ax + BEFORE_JMP + jnz LenLower + AFTER_JMP + +LenLower32: + shr eax,16 + add rdx,2 + +LenLower: + sub al, 1 + adc rdx, 0 +//;;; Calculate the length of the match. If it is longer than MAX_MATCH, +//;;; then automatically accept it as the best possible match and leave. + + lea rax, [rdi + rdx] + sub rax, r9 + cmp eax, MAX_MATCH + BEFORE_JMP + jge LenMaximum + AFTER_JMP +/* +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. +;/////////////////////////////////// +*/ + cmp eax, r11d + jg LongerMatch + + lea rsi,[r10+r11] + + mov rdi, prev_ad + mov edx, [chainlenwmask] + BEFORE_JMP + jmp LookupLoop + AFTER_JMP +/* +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); +*/ +LongerMatch: + mov r11d, eax + mov match_start, r8d + cmp eax, [nicematch] + BEFORE_JMP + jge LeaveNow + AFTER_JMP + + lea rsi,[r10+rax] + + movzx ebx, word ptr [r9 + rax - 1] + mov rdi, prev_ad + mov edx, [chainlenwmask] + BEFORE_JMP + jmp LookupLoop + AFTER_JMP + +//;;; Accept the current string, with the maximum possible length. + +LenMaximum: + mov r11d,MAX_MATCH + mov match_start, r8d + +//;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +//;;; return s->lookahead; + +LeaveNow: + mov eax, Lookahead + cmp r11d, eax + cmovng eax, r11d + + + +//;;; Restore the stack and return from whence we came. + + +// mov rsi,[save_rsi] +// mov rdi,[save_rdi] + mov rbx,[save_rbx] + mov rbp,[save_rbp] + mov r12,[save_r12] + mov r13,[save_r13] + mov r14,[save_r14] + mov r15,[save_r15] + + + ret 0 +//; please don't remove this string ! +//; Your can freely use gvmat64 in any free or commercial app +//; but it is far better don't remove the string in the binary! + // db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 + + +match_init: + ret 0 + + diff --git a/compat/zlib/contrib/infback9/inftree9.c b/compat/zlib/contrib/infback9/inftree9.c index 510bba6..306c5f1 100644 --- a/compat/zlib/contrib/infback9/inftree9.c +++ b/compat/zlib/contrib/infback9/inftree9.c @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate9_copyright[] = - " inflate9 1.2.4 Copyright 1995-2010 Mark Adler "; + " inflate9 1.2.5 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -64,7 +64,7 @@ unsigned short FAR *work; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, - 133, 133, 133, 133, 144, 64, 195}; + 133, 133, 133, 133, 144, 73, 195}; static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, diff --git a/compat/zlib/contrib/iostream2/zstream.h b/compat/zlib/contrib/iostream2/zstream.h index 12ad336..ba5e328 100644 --- a/compat/zlib/contrib/iostream2/zstream.h +++ b/compat/zlib/contrib/iostream2/zstream.h @@ -21,7 +21,7 @@ /* * zstream.h - C++ interface to the 'zlib' general purpose compression library - * $Id: zstream.h,v 1.2 2010/03/16 09:01:38 nijtmans Exp $ + * $Id: zstream.h,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #include diff --git a/compat/zlib/contrib/masmx64/bld_ml64.bat b/compat/zlib/contrib/masmx64/bld_ml64.bat index f74bcef..8f9343d 100644 --- a/compat/zlib/contrib/masmx64/bld_ml64.bat +++ b/compat/zlib/contrib/masmx64/bld_ml64.bat @@ -1,2 +1,2 @@ -ml64.exe /Flinffasx64 /c /Zi inffasx64.asm -ml64.exe /Flgvmat64 /c /Zi gvmat64.asm +ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +ml64.exe /Flgvmat64 /c /Zi gvmat64.asm diff --git a/compat/zlib/contrib/masmx64/gvmat64.asm b/compat/zlib/contrib/masmx64/gvmat64.asm index c1817f1..9879c28 100644 --- a/compat/zlib/contrib/masmx64/gvmat64.asm +++ b/compat/zlib/contrib/masmx64/gvmat64.asm @@ -1,553 +1,553 @@ -;uInt longest_match_x64( -; deflate_state *s, -; IPos cur_match); /* current match */ - -; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64 -; (AMD64 on Athlon 64, Opteron, Phenom -; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) -; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. -; -; File written by Gilles Vollant, by converting to assembly the longest_match -; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. -; -; and by taking inspiration on asm686 with masm, optimised assembly code -; from Brian Raiter, written 1998 -; -; This software is provided 'as-is', without any express or implied -; warranty. In no event will the authors be held liable for any damages -; arising from the use of this software. -; -; Permission is granted to anyone to use this software for any purpose, -; including commercial applications, and to alter it and redistribute it -; freely, subject to the following restrictions: -; -; 1. The origin of this software must not be misrepresented; you must not -; claim that you wrote the original software. If you use this software -; in a product, an acknowledgment in the product documentation would be -; appreciated but is not required. -; 2. Altered source versions must be plainly marked as such, and must not be -; misrepresented as being the original software -; 3. This notice may not be removed or altered from any source distribution. -; -; -; -; http://www.zlib.net -; http://www.winimage.com/zLibDll -; http://www.muppetlabs.com/~breadbox/software/assembly.html -; -; to compile this file for infozip Zip, I use option: -; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm -; -; to compile this file for zLib, I use option: -; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm -; Be carrefull to adapt zlib1222add below to your version of zLib -; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change -; value of zlib1222add later) -; -; This file compile with Microsoft Macro Assembler (x64) for AMD64 -; -; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK -; -; (you can get Windows WDK with ml64 for AMD64 from -; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) -; - - -;uInt longest_match(s, cur_match) -; deflate_state *s; -; IPos cur_match; /* current match */ -.code -longest_match PROC - - -;LocalVarsSize equ 88 - LocalVarsSize equ 72 - -; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 -; free register : r14,r15 -; register can be saved : rsp - - chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len - ; low word: s->wmask -;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10 -;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11 -;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w -;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx -;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13 -;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d -;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9 -IFDEF INFOZIP -ELSE - nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size -ENDIF - -save_rdi equ rsp + 24 - LocalVarsSize -save_rsi equ rsp + 32 - LocalVarsSize -save_rbx equ rsp + 40 - LocalVarsSize -save_rbp equ rsp + 48 - LocalVarsSize -save_r12 equ rsp + 56 - LocalVarsSize -save_r13 equ rsp + 64 - LocalVarsSize -;save_r14 equ rsp + 72 - LocalVarsSize -;save_r15 equ rsp + 80 - LocalVarsSize - - -; summary of register usage -; scanend ebx -; scanendw bx -; chainlenwmask edx -; curmatch rsi -; curmatchd esi -; windowbestlen r8 -; scanalign r9 -; scanalignd r9d -; window r10 -; bestlen r11 -; bestlend r11d -; scanstart r12d -; scanstartw r12w -; scan r13 -; nicematch r14d -; limit r15 -; limitd r15d -; prev rcx - -; all the +4 offsets are due to the addition of pending_buf_size (in zlib -; in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, remove the +4). -; Note : these value are good with a 8 bytes boundary pack structure - - - MAX_MATCH equ 258 - MIN_MATCH equ 3 - MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) - - -;;; Offsets for fields in the deflate_state structure. These numbers -;;; are calculated from the definition of deflate_state, with the -;;; assumption that the compiler will dword-align the fields. (Thus, -;;; changing the definition of deflate_state could easily cause this -;;; program to crash horribly, without so much as a warning at -;;; compile time. Sigh.) - -; all the +zlib1222add offsets are due to the addition of fields -; in zlib in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). -; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). -; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). - - -IFDEF INFOZIP - -_DATA SEGMENT -COMM window_size:DWORD -; WMask ; 7fff -COMM window:BYTE:010040H -COMM prev:WORD:08000H -; MatchLen : unused -; PrevMatch : unused -COMM strstart:DWORD -COMM match_start:DWORD -; Lookahead : ignore -COMM prev_length:DWORD ; PrevLen -COMM max_chain_length:DWORD -COMM good_match:DWORD -COMM nice_match:DWORD -prev_ad equ OFFSET prev -window_ad equ OFFSET window -nicematch equ nice_match -_DATA ENDS -WMask equ 07fffh - -ELSE - - IFNDEF zlib1222add - zlib1222add equ 8 - ENDIF -dsWSize equ 56+zlib1222add+(zlib1222add/2) -dsWMask equ 64+zlib1222add+(zlib1222add/2) -dsWindow equ 72+zlib1222add -dsPrev equ 88+zlib1222add -dsMatchLen equ 128+zlib1222add -dsPrevMatch equ 132+zlib1222add -dsStrStart equ 140+zlib1222add -dsMatchStart equ 144+zlib1222add -dsLookahead equ 148+zlib1222add -dsPrevLen equ 152+zlib1222add -dsMaxChainLen equ 156+zlib1222add -dsGoodMatch equ 172+zlib1222add -dsNiceMatch equ 176+zlib1222add - -window_size equ [ rcx + dsWSize] -WMask equ [ rcx + dsWMask] -window_ad equ [ rcx + dsWindow] -prev_ad equ [ rcx + dsPrev] -strstart equ [ rcx + dsStrStart] -match_start equ [ rcx + dsMatchStart] -Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip -prev_length equ [ rcx + dsPrevLen] -max_chain_length equ [ rcx + dsMaxChainLen] -good_match equ [ rcx + dsGoodMatch] -nice_match equ [ rcx + dsNiceMatch] -ENDIF - -; parameter 1 in r8(deflate state s), param 2 in rdx (cur match) - -; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and -; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp -; -; All registers must be preserved across the call, except for -; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. - - - -;;; Save registers that the compiler may be using, and adjust esp to -;;; make room for our stack frame. - - -;;; Retrieve the function arguments. r8d will hold cur_match -;;; throughout the entire function. edx will hold the pointer to the -;;; deflate_state structure during the function's setup (before -;;; entering the main loop. - -; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) - -; this clear high 32 bits of r8, which can be garbage in both r8 and rdx - - mov [save_rdi],rdi - mov [save_rsi],rsi - mov [save_rbx],rbx - mov [save_rbp],rbp -IFDEF INFOZIP - mov r8d,ecx -ELSE - mov r8d,edx -ENDIF - mov [save_r12],r12 - mov [save_r13],r13 -; mov [save_r14],r14 -; mov [save_r15],r15 - - -;;; uInt wmask = s->w_mask; -;;; unsigned chain_length = s->max_chain_length; -;;; if (s->prev_length >= s->good_match) { -;;; chain_length >>= 2; -;;; } - - mov edi, prev_length - mov esi, good_match - mov eax, WMask - mov ebx, max_chain_length - cmp edi, esi - jl LastMatchGood - shr ebx, 2 -LastMatchGood: - -;;; chainlen is decremented once beforehand so that the function can -;;; use the sign flag instead of the zero flag for the exit test. -;;; It is then shifted into the high word, to make room for the wmask -;;; value, which it will always accompany. - - dec ebx - shl ebx, 16 - or ebx, eax - -;;; on zlib only -;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; - -IFDEF INFOZIP - mov [chainlenwmask], ebx -; on infozip nice_match = [nice_match] -ELSE - mov eax, nice_match - mov [chainlenwmask], ebx - mov r10d, Lookahead - cmp r10d, eax - cmovnl r10d, eax - mov [nicematch],r10d -ENDIF - -;;; register Bytef *scan = s->window + s->strstart; - mov r10, window_ad - mov ebp, strstart - lea r13, [r10 + rbp] - -;;; Determine how many bytes the scan ptr is off from being -;;; dword-aligned. - - mov r9,r13 - neg r13 - and r13,3 - -;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? -;;; s->strstart - (IPos)MAX_DIST(s) : NIL; -IFDEF INFOZIP - mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1)) -ELSE - mov eax, window_size - sub eax, MIN_LOOKAHEAD -ENDIF - xor edi,edi - sub ebp, eax - - mov r11d, prev_length - - cmovng ebp,edi - -;;; int best_len = s->prev_length; - - -;;; Store the sum of s->window + best_len in esi locally, and in esi. - - lea rsi,[r10+r11] - -;;; register ush scan_start = *(ushf*)scan; -;;; register ush scan_end = *(ushf*)(scan+best_len-1); -;;; Posf *prev = s->prev; - - movzx r12d,word ptr [r9] - movzx ebx, word ptr [r9 + r11 - 1] - - mov rdi, prev_ad - -;;; Jump into the main loop. - - mov edx, [chainlenwmask] - - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - -LookupLoop1: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry1: - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - -LookupLoop2: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry2: - cmp bx,word ptr [rsi + r8 - 1] - jz LookupLoopIsZero - -LookupLoop4: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry4: - - cmp bx,word ptr [rsi + r8 - 1] - jnz LookupLoop1 - jmp LookupLoopIsZero - - -;;; do { -;;; match = s->window + cur_match; -;;; if (*(ushf*)(match+best_len-1) != scan_end || -;;; *(ushf*)match != scan_start) continue; -;;; [...] -;;; } while ((cur_match = prev[cur_match & wmask]) > limit -;;; && --chain_length != 0); -;;; -;;; Here is the inner loop of the function. The function will spend the -;;; majority of its time in this loop, and majority of that time will -;;; be spent in the first ten instructions. -;;; -;;; Within this loop: -;;; ebx = scanend -;;; r8d = curmatch -;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) -;;; esi = windowbestlen - i.e., (window + bestlen) -;;; edi = prev -;;; ebp = limit - -LookupLoop: - and r8d, edx - - movzx r8d, word ptr [rdi + r8*2] - cmp r8d, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow - -LoopEntry: - - cmp bx,word ptr [rsi + r8 - 1] - jnz LookupLoop1 -LookupLoopIsZero: - cmp r12w, word ptr [r10 + r8] - jnz LookupLoop1 - - -;;; Store the current value of chainlen. - mov [chainlenwmask], edx - -;;; Point edi to the string under scrutiny, and esi to the string we -;;; are hoping to match it up with. In actuality, esi and edi are -;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is -;;; initialized to -(MAX_MATCH_8 - scanalign). - - lea rsi,[r8+r10] - mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8) - lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8] - lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8] - - prefetcht1 [rsi+rdx] - prefetcht1 [rdi+rdx] - - -;;; Test the strings for equality, 8 bytes at a time. At the end, -;;; adjust rdx so that it is offset to the exact byte that mismatched. -;;; -;;; We already know at this point that the first three bytes of the -;;; strings match each other, and they can be safely passed over before -;;; starting the compare loop. So what this code does is skip over 0-3 -;;; bytes, as much as necessary in order to dword-align the edi -;;; pointer. (rsi will still be misaligned three times out of four.) -;;; -;;; It should be confessed that this loop usually does not represent -;;; much of the total running time. Replacing it with a more -;;; straightforward "rep cmpsb" would not drastically degrade -;;; performance. - - -LoopCmps: - mov rax, [rsi + rdx] - xor rax, [rdi + rdx] - jnz LeaveLoopCmps - - mov rax, [rsi + rdx + 8] - xor rax, [rdi + rdx + 8] - jnz LeaveLoopCmps8 - - - mov rax, [rsi + rdx + 8+8] - xor rax, [rdi + rdx + 8+8] - jnz LeaveLoopCmps16 - - add rdx,8+8+8 - - jnz short LoopCmps - jmp short LenMaximum -LeaveLoopCmps16: add rdx,8 -LeaveLoopCmps8: add rdx,8 -LeaveLoopCmps: - - test eax, 0000FFFFh - jnz LenLower - - test eax,0ffffffffh - - jnz LenLower32 - - add rdx,4 - shr rax,32 - or ax,ax - jnz LenLower - -LenLower32: - shr eax,16 - add rdx,2 -LenLower: sub al, 1 - adc rdx, 0 -;;; Calculate the length of the match. If it is longer than MAX_MATCH, -;;; then automatically accept it as the best possible match and leave. - - lea rax, [rdi + rdx] - sub rax, r9 - cmp eax, MAX_MATCH - jge LenMaximum - -;;; If the length of the match is not longer than the best match we -;;; have so far, then forget it and return to the lookup loop. -;/////////////////////////////////// - - cmp eax, r11d - jg LongerMatch - - lea rsi,[r10+r11] - - mov rdi, prev_ad - mov edx, [chainlenwmask] - jmp LookupLoop - -;;; s->match_start = cur_match; -;;; best_len = len; -;;; if (len >= nice_match) break; -;;; scan_end = *(ushf*)(scan+best_len-1); - -LongerMatch: - mov r11d, eax - mov match_start, r8d - cmp eax, [nicematch] - jge LeaveNow - - lea rsi,[r10+rax] - - movzx ebx, word ptr [r9 + rax - 1] - mov rdi, prev_ad - mov edx, [chainlenwmask] - jmp LookupLoop - -;;; Accept the current string, with the maximum possible length. - -LenMaximum: - mov r11d,MAX_MATCH - mov match_start, r8d - -;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; -;;; return s->lookahead; - -LeaveNow: -IFDEF INFOZIP - mov eax,r11d -ELSE - mov eax, Lookahead - cmp r11d, eax - cmovng eax, r11d -ENDIF - -;;; Restore the stack and return from whence we came. - - - mov rsi,[save_rsi] - mov rdi,[save_rdi] - mov rbx,[save_rbx] - mov rbp,[save_rbp] - mov r12,[save_r12] - mov r13,[save_r13] -; mov r14,[save_r14] -; mov r15,[save_r15] - - - ret 0 -; please don't remove this string ! -; Your can freely use gvmat64 in any free or commercial app -; but it is far better don't remove the string in the binary! - db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 -longest_match ENDP - -match_init PROC - ret 0 -match_init ENDP - - -END +;uInt longest_match_x64( +; deflate_state *s, +; IPos cur_match); /* current match */ + +; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64 +; (AMD64 on Athlon 64, Opteron, Phenom +; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7) +; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; +; File written by Gilles Vollant, by converting to assembly the longest_match +; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. +; +; and by taking inspiration on asm686 with masm, optimised assembly code +; from Brian Raiter, written 1998 +; +; This software is provided 'as-is', without any express or implied +; warranty. In no event will the authors be held liable for any damages +; arising from the use of this software. +; +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it +; freely, subject to the following restrictions: +; +; 1. The origin of this software must not be misrepresented; you must not +; claim that you wrote the original software. If you use this software +; in a product, an acknowledgment in the product documentation would be +; appreciated but is not required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software +; 3. This notice may not be removed or altered from any source distribution. +; +; +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; to compile this file for infozip Zip, I use option: +; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm +; +; to compile this file for zLib, I use option: +; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm +; Be carrefull to adapt zlib1222add below to your version of zLib +; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change +; value of zlib1222add later) +; +; This file compile with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK +; +; (you can get Windows WDK with ml64 for AMD64 from +; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) +; + + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ +.code +longest_match PROC + + +;LocalVarsSize equ 88 + LocalVarsSize equ 72 + +; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12 +; free register : r14,r15 +; register can be saved : rsp + + chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len + ; low word: s->wmask +;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10 +;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11 +;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w +;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx +;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13 +;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d +;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9 +IFDEF INFOZIP +ELSE + nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size +ENDIF + +save_rdi equ rsp + 24 - LocalVarsSize +save_rsi equ rsp + 32 - LocalVarsSize +save_rbx equ rsp + 40 - LocalVarsSize +save_rbp equ rsp + 48 - LocalVarsSize +save_r12 equ rsp + 56 - LocalVarsSize +save_r13 equ rsp + 64 - LocalVarsSize +;save_r14 equ rsp + 72 - LocalVarsSize +;save_r15 equ rsp + 80 - LocalVarsSize + + +; summary of register usage +; scanend ebx +; scanendw bx +; chainlenwmask edx +; curmatch rsi +; curmatchd esi +; windowbestlen r8 +; scanalign r9 +; scanalignd r9d +; window r10 +; bestlen r11 +; bestlend r11d +; scanstart r12d +; scanstartw r12w +; scan r13 +; nicematch r14d +; limit r15 +; limitd r15d +; prev rcx + +; all the +4 offsets are due to the addition of pending_buf_size (in zlib +; in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, remove the +4). +; Note : these value are good with a 8 bytes boundary pack structure + + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + +IFDEF INFOZIP + +_DATA SEGMENT +COMM window_size:DWORD +; WMask ; 7fff +COMM window:BYTE:010040H +COMM prev:WORD:08000H +; MatchLen : unused +; PrevMatch : unused +COMM strstart:DWORD +COMM match_start:DWORD +; Lookahead : ignore +COMM prev_length:DWORD ; PrevLen +COMM max_chain_length:DWORD +COMM good_match:DWORD +COMM nice_match:DWORD +prev_ad equ OFFSET prev +window_ad equ OFFSET window +nicematch equ nice_match +_DATA ENDS +WMask equ 07fffh + +ELSE + + IFNDEF zlib1222add + zlib1222add equ 8 + ENDIF +dsWSize equ 56+zlib1222add+(zlib1222add/2) +dsWMask equ 64+zlib1222add+(zlib1222add/2) +dsWindow equ 72+zlib1222add +dsPrev equ 88+zlib1222add +dsMatchLen equ 128+zlib1222add +dsPrevMatch equ 132+zlib1222add +dsStrStart equ 140+zlib1222add +dsMatchStart equ 144+zlib1222add +dsLookahead equ 148+zlib1222add +dsPrevLen equ 152+zlib1222add +dsMaxChainLen equ 156+zlib1222add +dsGoodMatch equ 172+zlib1222add +dsNiceMatch equ 176+zlib1222add + +window_size equ [ rcx + dsWSize] +WMask equ [ rcx + dsWMask] +window_ad equ [ rcx + dsWindow] +prev_ad equ [ rcx + dsPrev] +strstart equ [ rcx + dsStrStart] +match_start equ [ rcx + dsMatchStart] +Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip +prev_length equ [ rcx + dsPrevLen] +max_chain_length equ [ rcx + dsMaxChainLen] +good_match equ [ rcx + dsGoodMatch] +nice_match equ [ rcx + dsNiceMatch] +ENDIF + +; parameter 1 in r8(deflate state s), param 2 in rdx (cur match) + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch. + + + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + +;;; Retrieve the function arguments. r8d will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + +; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match) + +; this clear high 32 bits of r8, which can be garbage in both r8 and rdx + + mov [save_rdi],rdi + mov [save_rsi],rsi + mov [save_rbx],rbx + mov [save_rbp],rbp +IFDEF INFOZIP + mov r8d,ecx +ELSE + mov r8d,edx +ENDIF + mov [save_r12],r12 + mov [save_r13],r13 +; mov [save_r14],r14 +; mov [save_r15],r15 + + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov edi, prev_length + mov esi, good_match + mov eax, WMask + mov ebx, max_chain_length + cmp edi, esi + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + +;;; on zlib only +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + +IFDEF INFOZIP + mov [chainlenwmask], ebx +; on infozip nice_match = [nice_match] +ELSE + mov eax, nice_match + mov [chainlenwmask], ebx + mov r10d, Lookahead + cmp r10d, eax + cmovnl r10d, eax + mov [nicematch],r10d +ENDIF + +;;; register Bytef *scan = s->window + s->strstart; + mov r10, window_ad + mov ebp, strstart + lea r13, [r10 + rbp] + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov r9,r13 + neg r13 + and r13,3 + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; +IFDEF INFOZIP + mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1)) +ELSE + mov eax, window_size + sub eax, MIN_LOOKAHEAD +ENDIF + xor edi,edi + sub ebp, eax + + mov r11d, prev_length + + cmovng ebp,edi + +;;; int best_len = s->prev_length; + + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + lea rsi,[r10+r11] + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx r12d,word ptr [r9] + movzx ebx, word ptr [r9 + r11 - 1] + + mov rdi, prev_ad + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop1: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry1: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop2: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry2: + cmp bx,word ptr [rsi + r8 - 1] + jz LookupLoopIsZero + +LookupLoop4: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry4: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 + jmp LookupLoopIsZero + + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; r8d = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and r8d, edx + + movzx r8d, word ptr [rdi + r8*2] + cmp r8d, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow + +LoopEntry: + + cmp bx,word ptr [rsi + r8 - 1] + jnz LookupLoop1 +LookupLoopIsZero: + cmp r12w, word ptr [r10 + r8] + jnz LookupLoop1 + + +;;; Store the current value of chainlen. + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + lea rsi,[r8+r10] + mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8) + lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8] + lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8] + + prefetcht1 [rsi+rdx] + prefetcht1 [rdi+rdx] + + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust rdx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (rsi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + + +LoopCmps: + mov rax, [rsi + rdx] + xor rax, [rdi + rdx] + jnz LeaveLoopCmps + + mov rax, [rsi + rdx + 8] + xor rax, [rdi + rdx + 8] + jnz LeaveLoopCmps8 + + + mov rax, [rsi + rdx + 8+8] + xor rax, [rdi + rdx + 8+8] + jnz LeaveLoopCmps16 + + add rdx,8+8+8 + + jnz short LoopCmps + jmp short LenMaximum +LeaveLoopCmps16: add rdx,8 +LeaveLoopCmps8: add rdx,8 +LeaveLoopCmps: + + test eax, 0000FFFFh + jnz LenLower + + test eax,0ffffffffh + + jnz LenLower32 + + add rdx,4 + shr rax,32 + or ax,ax + jnz LenLower + +LenLower32: + shr eax,16 + add rdx,2 +LenLower: sub al, 1 + adc rdx, 0 +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea rax, [rdi + rdx] + sub rax, r9 + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. +;/////////////////////////////////// + + cmp eax, r11d + jg LongerMatch + + lea rsi,[r10+r11] + + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: + mov r11d, eax + mov match_start, r8d + cmp eax, [nicematch] + jge LeaveNow + + lea rsi,[r10+rax] + + movzx ebx, word ptr [r9 + rax - 1] + mov rdi, prev_ad + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: + mov r11d,MAX_MATCH + mov match_start, r8d + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: +IFDEF INFOZIP + mov eax,r11d +ELSE + mov eax, Lookahead + cmp r11d, eax + cmovng eax, r11d +ENDIF + +;;; Restore the stack and return from whence we came. + + + mov rsi,[save_rsi] + mov rdi,[save_rdi] + mov rbx,[save_rbx] + mov rbp,[save_rbp] + mov r12,[save_r12] + mov r13,[save_r13] +; mov r14,[save_r14] +; mov r15,[save_r15] + + + ret 0 +; please don't remove this string ! +; Your can freely use gvmat64 in any free or commercial app +; but it is far better don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0 +longest_match ENDP + +match_init PROC + ret 0 +match_init ENDP + + +END diff --git a/compat/zlib/contrib/masmx64/inffas8664.c b/compat/zlib/contrib/masmx64/inffas8664.c index aa861a3..e8af06f 100644 --- a/compat/zlib/contrib/masmx64/inffas8664.c +++ b/compat/zlib/contrib/masmx64/inffas8664.c @@ -1,186 +1,186 @@ -/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding - * version for AMD64 on Windows using Microsoft C compiler - * - * Copyright (C) 1995-2003 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Copyright (C) 2003 Chris Anderson - * Please use the copyright conditions above. - * - * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant - * - * inffas8664.c call function inffas8664fnc in inffasx64.asm - * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c - * - * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also - * slightly quicker on x86 systems because, instead of using rep movsb to copy - * data, it uses rep movsw, which moves data in 2-byte chunks instead of single - * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates - * from http://fedora.linux.duke.edu/fc1_x86_64 - * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with - * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, - * when decompressing mozilla-source-1.3.tar.gz. - * - * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from - * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at - * the moment. I have successfully compiled and tested this code with gcc2.96, - * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S - * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX - * enabled. I will attempt to merge the MMX code into this version. Newer - * versions of this and inffast.S can be found at - * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ - * - */ - -#include -#include "zutil.h" -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" - -/* Mark Adler's comments from inffast.c: */ - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state->mode == LEN - strm->avail_in >= 6 - strm->avail_out >= 258 - start >= strm->avail_out - state->bits < 8 - - On return, state->mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm->avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm->avail_out >= 258 for each loop to avoid checking for - output space. - */ - - - - typedef struct inffast_ar { -/* 64 32 x86 x86_64 */ -/* ar offset register */ -/* 0 0 */ void *esp; /* esp save */ -/* 8 4 */ void *ebp; /* ebp save */ -/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ -/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ -/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ -/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ -/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ -/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ -/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ -/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ -/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */ -/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ -/* 92 48 */ unsigned wsize; /* window size */ -/* 96 52 */ unsigned write; /* window write index */ -/*100 56 */ unsigned lmask; /* r12 mask for lcode */ -/*104 60 */ unsigned dmask; /* r13 mask for dcode */ -/*108 64 */ unsigned len; /* r14 match length */ -/*112 68 */ unsigned dist; /* r15 match distance */ -/*116 72 */ unsigned status; /* set when state chng*/ - } type_ar; -#ifdef ASMINF - -void inflate_fast(strm, start) -z_streamp strm; -unsigned start; /* inflate()'s starting value for strm->avail_out */ -{ - struct inflate_state FAR *state; - type_ar ar; - void inffas8664fnc(struct inffast_ar * par); - - - -#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64)) -#define PAD_AVAIL_IN 6 -#define PAD_AVAIL_OUT 258 -#else -#define PAD_AVAIL_IN 5 -#define PAD_AVAIL_OUT 257 -#endif - - /* copy state to local variables */ - state = (struct inflate_state FAR *)strm->state; - - ar.in = strm->next_in; - ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); - ar.out = strm->next_out; - ar.beg = ar.out - (start - strm->avail_out); - ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); - ar.wsize = state->wsize; - ar.write = state->wnext; - ar.window = state->window; - ar.hold = state->hold; - ar.bits = state->bits; - ar.lcode = state->lencode; - ar.dcode = state->distcode; - ar.lmask = (1U << state->lenbits) - 1; - ar.dmask = (1U << state->distbits) - 1; - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ - - /* align in on 1/2 hold size boundary */ - while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { - ar.hold += (unsigned long)*ar.in++ << ar.bits; - ar.bits += 8; - } - - inffas8664fnc(&ar); - - if (ar.status > 1) { - if (ar.status == 2) - strm->msg = "invalid literal/length code"; - else if (ar.status == 3) - strm->msg = "invalid distance code"; - else - strm->msg = "invalid distance too far back"; - state->mode = BAD; - } - else if ( ar.status == 1 ) { - state->mode = TYPE; - } - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - ar.len = ar.bits >> 3; - ar.in -= ar.len; - ar.bits -= ar.len << 3; - ar.hold &= (1U << ar.bits) - 1; - - /* update state and return */ - strm->next_in = ar.in; - strm->next_out = ar.out; - strm->avail_in = (unsigned)(ar.in < ar.last ? - PAD_AVAIL_IN + (ar.last - ar.in) : - PAD_AVAIL_IN - (ar.in - ar.last)); - strm->avail_out = (unsigned)(ar.out < ar.end ? - PAD_AVAIL_OUT + (ar.end - ar.out) : - PAD_AVAIL_OUT - (ar.out - ar.end)); - state->hold = (unsigned long)ar.hold; - state->bits = ar.bits; - return; -} - -#endif +/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding + * version for AMD64 on Windows using Microsoft C compiler + * + * Copyright (C) 1995-2003 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * Copyright (C) 2003 Chris Anderson + * Please use the copyright conditions above. + * + * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant + * + * inffas8664.c call function inffas8664fnc in inffasx64.asm + * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c + * + * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also + * slightly quicker on x86 systems because, instead of using rep movsb to copy + * data, it uses rep movsw, which moves data in 2-byte chunks instead of single + * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates + * from http://fedora.linux.duke.edu/fc1_x86_64 + * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with + * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version, + * when decompressing mozilla-source-1.3.tar.gz. + * + * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from + * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at + * the moment. I have successfully compiled and tested this code with gcc2.96, + * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S + * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX + * enabled. I will attempt to merge the MMX code into this version. Newer + * versions of this and inffast.S can be found at + * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ + * + */ + +#include +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* Mark Adler's comments from inffast.c: */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ + + + + typedef struct inffast_ar { +/* 64 32 x86 x86_64 */ +/* ar offset register */ +/* 0 0 */ void *esp; /* esp save */ +/* 8 4 */ void *ebp; /* ebp save */ +/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */ +/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */ +/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */ +/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */ +/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */ +/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */ +/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */ +/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */ +/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */ +/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */ +/* 92 48 */ unsigned wsize; /* window size */ +/* 96 52 */ unsigned write; /* window write index */ +/*100 56 */ unsigned lmask; /* r12 mask for lcode */ +/*104 60 */ unsigned dmask; /* r13 mask for dcode */ +/*108 64 */ unsigned len; /* r14 match length */ +/*112 68 */ unsigned dist; /* r15 match distance */ +/*116 72 */ unsigned status; /* set when state chng*/ + } type_ar; +#ifdef ASMINF + +void inflate_fast(strm, start) +z_streamp strm; +unsigned start; /* inflate()'s starting value for strm->avail_out */ +{ + struct inflate_state FAR *state; + type_ar ar; + void inffas8664fnc(struct inffast_ar * par); + + + +#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64)) +#define PAD_AVAIL_IN 6 +#define PAD_AVAIL_OUT 258 +#else +#define PAD_AVAIL_IN 5 +#define PAD_AVAIL_OUT 257 +#endif + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + + ar.in = strm->next_in; + ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN); + ar.out = strm->next_out; + ar.beg = ar.out - (start - strm->avail_out); + ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); + ar.wsize = state->wsize; + ar.write = state->wnext; + ar.window = state->window; + ar.hold = state->hold; + ar.bits = state->bits; + ar.lcode = state->lencode; + ar.dcode = state->distcode; + ar.lmask = (1U << state->lenbits) - 1; + ar.dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + /* align in on 1/2 hold size boundary */ + while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) { + ar.hold += (unsigned long)*ar.in++ << ar.bits; + ar.bits += 8; + } + + inffas8664fnc(&ar); + + if (ar.status > 1) { + if (ar.status == 2) + strm->msg = "invalid literal/length code"; + else if (ar.status == 3) + strm->msg = "invalid distance code"; + else + strm->msg = "invalid distance too far back"; + state->mode = BAD; + } + else if ( ar.status == 1 ) { + state->mode = TYPE; + } + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + ar.len = ar.bits >> 3; + ar.in -= ar.len; + ar.bits -= ar.len << 3; + ar.hold &= (1U << ar.bits) - 1; + + /* update state and return */ + strm->next_in = ar.in; + strm->next_out = ar.out; + strm->avail_in = (unsigned)(ar.in < ar.last ? + PAD_AVAIL_IN + (ar.last - ar.in) : + PAD_AVAIL_IN - (ar.in - ar.last)); + strm->avail_out = (unsigned)(ar.out < ar.end ? + PAD_AVAIL_OUT + (ar.end - ar.out) : + PAD_AVAIL_OUT - (ar.out - ar.end)); + state->hold = (unsigned long)ar.hold; + state->bits = ar.bits; + return; +} + +#endif diff --git a/compat/zlib/contrib/masmx64/inffasx64.asm b/compat/zlib/contrib/masmx64/inffasx64.asm index 41ec823..60a8d89 100644 --- a/compat/zlib/contrib/masmx64/inffasx64.asm +++ b/compat/zlib/contrib/masmx64/inffasx64.asm @@ -1,396 +1,396 @@ -; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding -; version for AMD64 on Windows using Microsoft C compiler -; -; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c -; inffasx64.asm is called by inffas8664.c, which contain more info. - - -; to compile this file, I use option -; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm -; with Microsoft Macro Assembler (x64) for AMD64 -; - -; This file compile with Microsoft Macro Assembler (x64) for AMD64 -; -; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK -; -; (you can get Windows WDK with ml64 for AMD64 from -; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) -; - - -.code -inffas8664fnc PROC - -; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and -; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp -; -; All registers must be preserved across the call, except for -; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch. - - - mov [rsp-8],rsi - mov [rsp-16],rdi - mov [rsp-24],r12 - mov [rsp-32],r13 - mov [rsp-40],r14 - mov [rsp-48],r15 - mov [rsp-56],rbx - - mov rax,rcx - - mov [rax+8], rbp ; /* save regs rbp and rsp */ - mov [rax], rsp - - mov rsp, rax ; /* make rsp point to &ar */ - - mov rsi, [rsp+16] ; /* rsi = in */ - mov rdi, [rsp+32] ; /* rdi = out */ - mov r9, [rsp+24] ; /* r9 = last */ - mov r10, [rsp+48] ; /* r10 = end */ - mov rbp, [rsp+64] ; /* rbp = lcode */ - mov r11, [rsp+72] ; /* r11 = dcode */ - mov rdx, [rsp+80] ; /* rdx = hold */ - mov ebx, [rsp+88] ; /* ebx = bits */ - mov r12d, [rsp+100] ; /* r12d = lmask */ - mov r13d, [rsp+104] ; /* r13d = dmask */ - ; /* r14d = len */ - ; /* r15d = dist */ - - - cld - cmp r10, rdi - je L_one_time ; /* if only one decode left */ - cmp r9, rsi - - jne L_do_loop - - -L_one_time: - mov r8, r12 ; /* r8 = lmask */ - cmp bl, 32 - ja L_get_length_code_one_time - - lodsd ; /* eax = *(uint *)in++ */ - mov cl, bl ; /* cl = bits, needs it for shifting */ - add bl, 32 ; /* bits += 32 */ - shl rax, cl - or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ - jmp L_get_length_code_one_time - -ALIGN 4 -L_while_test: - cmp r10, rdi - jbe L_break_loop - cmp r9, rsi - jbe L_break_loop - -L_do_loop: - mov r8, r12 ; /* r8 = lmask */ - cmp bl, 32 - ja L_get_length_code ; /* if (32 < bits) */ - - lodsd ; /* eax = *(uint *)in++ */ - mov cl, bl ; /* cl = bits, needs it for shifting */ - add bl, 32 ; /* bits += 32 */ - shl rax, cl - or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ - -L_get_length_code: - and r8, rdx ; /* r8 &= hold */ - mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ - - mov cl, ah ; /* cl = this.bits */ - sub bl, ah ; /* bits -= this.bits */ - shr rdx, cl ; /* hold >>= this.bits */ - - test al, al - jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ - - mov r8, r12 ; /* r8 = lmask */ - shr eax, 16 ; /* output this.val char */ - stosb - -L_get_length_code_one_time: - and r8, rdx ; /* r8 &= hold */ - mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ - -L_dolen: - mov cl, ah ; /* cl = this.bits */ - sub bl, ah ; /* bits -= this.bits */ - shr rdx, cl ; /* hold >>= this.bits */ - - test al, al - jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ - - shr eax, 16 ; /* output this.val char */ - stosb - jmp L_while_test - -ALIGN 4 -L_test_for_length_base: - mov r14d, eax ; /* len = this */ - shr r14d, 16 ; /* len = this.val */ - mov cl, al - - test al, 16 - jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */ - and cl, 15 ; /* op &= 15 */ - jz L_decode_distance ; /* if (!op) */ - -L_add_bits_to_len: - sub bl, cl - xor eax, eax - inc eax - shl eax, cl - dec eax - and eax, edx ; /* eax &= hold */ - shr rdx, cl - add r14d, eax ; /* len += hold & mask[op] */ - -L_decode_distance: - mov r8, r13 ; /* r8 = dmask */ - cmp bl, 32 - ja L_get_distance_code ; /* if (32 < bits) */ - - lodsd ; /* eax = *(uint *)in++ */ - mov cl, bl ; /* cl = bits, needs it for shifting */ - add bl, 32 ; /* bits += 32 */ - shl rax, cl - or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ - -L_get_distance_code: - and r8, rdx ; /* r8 &= hold */ - mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */ - -L_dodist: - mov r15d, eax ; /* dist = this */ - shr r15d, 16 ; /* dist = this.val */ - mov cl, ah - sub bl, ah ; /* bits -= this.bits */ - shr rdx, cl ; /* hold >>= this.bits */ - mov cl, al ; /* cl = this.op */ - - test al, 16 ; /* if ((op & 16) == 0) */ - jz L_test_for_second_level_dist - and cl, 15 ; /* op &= 15 */ - jz L_check_dist_one - -L_add_bits_to_dist: - sub bl, cl - xor eax, eax - inc eax - shl eax, cl - dec eax ; /* (1 << op) - 1 */ - and eax, edx ; /* eax &= hold */ - shr rdx, cl - add r15d, eax ; /* dist += hold & ((1 << op) - 1) */ - -L_check_window: - mov r8, rsi ; /* save in so from can use it's reg */ - mov rax, rdi - sub rax, [rsp+40] ; /* nbytes = out - beg */ - - cmp eax, r15d - jb L_clip_window ; /* if (dist > nbytes) 4.2% */ - - mov ecx, r14d ; /* ecx = len */ - mov rsi, rdi - sub rsi, r15 ; /* from = out - dist */ - - sar ecx, 1 - jnc L_copy_two ; /* if len % 2 == 0 */ - - rep movsw - mov al, [rsi] - mov [rdi], al - inc rdi - - mov rsi, r8 ; /* move in back to %rsi, toss from */ - jmp L_while_test - -L_copy_two: - rep movsw - mov rsi, r8 ; /* move in back to %rsi, toss from */ - jmp L_while_test - -ALIGN 4 -L_check_dist_one: - cmp r15d, 1 ; /* if dist 1, is a memset */ - jne L_check_window - cmp [rsp+40], rdi ; /* if out == beg, outside window */ - je L_check_window - - mov ecx, r14d ; /* ecx = len */ - mov al, [rdi-1] - mov ah, al - - sar ecx, 1 - jnc L_set_two - mov [rdi], al - inc rdi - -L_set_two: - rep stosw - jmp L_while_test - -ALIGN 4 -L_test_for_second_level_length: - test al, 64 - jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */ - - xor eax, eax - inc eax - shl eax, cl - dec eax - and eax, edx ; /* eax &= hold */ - add eax, r14d ; /* eax += len */ - mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/ - jmp L_dolen - -ALIGN 4 -L_test_for_second_level_dist: - test al, 64 - jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */ - - xor eax, eax - inc eax - shl eax, cl - dec eax - and eax, edx ; /* eax &= hold */ - add eax, r15d ; /* eax += dist */ - mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/ - jmp L_dodist - -ALIGN 4 -L_clip_window: - mov ecx, eax ; /* ecx = nbytes */ - mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */ - neg ecx ; /* nbytes = -nbytes */ - - cmp eax, r15d - jb L_invalid_distance_too_far ; /* if (dist > wsize) */ - - add ecx, r15d ; /* nbytes = dist - nbytes */ - cmp dword ptr [rsp+96], 0 - jne L_wrap_around_window ; /* if (write != 0) */ - - mov rsi, [rsp+56] ; /* from = window */ - sub eax, ecx ; /* eax -= nbytes */ - add rsi, rax ; /* from += wsize - nbytes */ - - mov eax, r14d ; /* eax = len */ - cmp r14d, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* eax -= nbytes */ - rep movsb - mov rsi, rdi - sub rsi, r15 ; /* from = &out[ -dist ] */ - jmp L_do_copy - -ALIGN 4 -L_wrap_around_window: - mov eax, [rsp+96] ; /* eax = write */ - cmp ecx, eax - jbe L_contiguous_in_window ; /* if (write >= nbytes) */ - - mov esi, [rsp+92] ; /* from = wsize */ - add rsi, [rsp+56] ; /* from += window */ - add rsi, rax ; /* from += write */ - sub rsi, rcx ; /* from -= nbytes */ - sub ecx, eax ; /* nbytes -= write */ - - mov eax, r14d ; /* eax = len */ - cmp eax, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* len -= nbytes */ - rep movsb - mov rsi, [rsp+56] ; /* from = window */ - mov ecx, [rsp+96] ; /* nbytes = write */ - cmp eax, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* len -= nbytes */ - rep movsb - mov rsi, rdi - sub rsi, r15 ; /* from = out - dist */ - jmp L_do_copy - -ALIGN 4 -L_contiguous_in_window: - mov rsi, [rsp+56] ; /* rsi = window */ - add rsi, rax - sub rsi, rcx ; /* from += write - nbytes */ - - mov eax, r14d ; /* eax = len */ - cmp eax, ecx - jbe L_do_copy ; /* if (nbytes >= len) */ - - sub eax, ecx ; /* len -= nbytes */ - rep movsb - mov rsi, rdi - sub rsi, r15 ; /* from = out - dist */ - jmp L_do_copy ; /* if (nbytes >= len) */ - -ALIGN 4 -L_do_copy: - mov ecx, eax ; /* ecx = len */ - rep movsb - - mov rsi, r8 ; /* move in back to %esi, toss from */ - jmp L_while_test - -L_test_for_end_of_block: - test al, 32 - jz L_invalid_literal_length_code - mov dword ptr [rsp+116], 1 - jmp L_break_loop_with_status - -L_invalid_literal_length_code: - mov dword ptr [rsp+116], 2 - jmp L_break_loop_with_status - -L_invalid_distance_code: - mov dword ptr [rsp+116], 3 - jmp L_break_loop_with_status - -L_invalid_distance_too_far: - mov dword ptr [rsp+116], 4 - jmp L_break_loop_with_status - -L_break_loop: - mov dword ptr [rsp+116], 0 - -L_break_loop_with_status: -; /* put in, out, bits, and hold back into ar and pop esp */ - mov [rsp+16], rsi ; /* in */ - mov [rsp+32], rdi ; /* out */ - mov [rsp+88], ebx ; /* bits */ - mov [rsp+80], rdx ; /* hold */ - - mov rax, [rsp] ; /* restore rbp and rsp */ - mov rbp, [rsp+8] - mov rsp, rax - - - - mov rsi,[rsp-8] - mov rdi,[rsp-16] - mov r12,[rsp-24] - mov r13,[rsp-32] - mov r14,[rsp-40] - mov r15,[rsp-48] - mov rbx,[rsp-56] - - ret 0 -; : -; : "m" (ar) -; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", -; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" -; ); - -inffas8664fnc ENDP -;_TEXT ENDS -END +; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding +; version for AMD64 on Windows using Microsoft C compiler +; +; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c +; inffasx64.asm is called by inffas8664.c, which contain more info. + + +; to compile this file, I use option +; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm +; with Microsoft Macro Assembler (x64) for AMD64 +; + +; This file compile with Microsoft Macro Assembler (x64) for AMD64 +; +; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK +; +; (you can get Windows WDK with ml64 for AMD64 from +; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price) +; + + +.code +inffas8664fnc PROC + +; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and +; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp +; +; All registers must be preserved across the call, except for +; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch. + + + mov [rsp-8],rsi + mov [rsp-16],rdi + mov [rsp-24],r12 + mov [rsp-32],r13 + mov [rsp-40],r14 + mov [rsp-48],r15 + mov [rsp-56],rbx + + mov rax,rcx + + mov [rax+8], rbp ; /* save regs rbp and rsp */ + mov [rax], rsp + + mov rsp, rax ; /* make rsp point to &ar */ + + mov rsi, [rsp+16] ; /* rsi = in */ + mov rdi, [rsp+32] ; /* rdi = out */ + mov r9, [rsp+24] ; /* r9 = last */ + mov r10, [rsp+48] ; /* r10 = end */ + mov rbp, [rsp+64] ; /* rbp = lcode */ + mov r11, [rsp+72] ; /* r11 = dcode */ + mov rdx, [rsp+80] ; /* rdx = hold */ + mov ebx, [rsp+88] ; /* ebx = bits */ + mov r12d, [rsp+100] ; /* r12d = lmask */ + mov r13d, [rsp+104] ; /* r13d = dmask */ + ; /* r14d = len */ + ; /* r15d = dist */ + + + cld + cmp r10, rdi + je L_one_time ; /* if only one decode left */ + cmp r9, rsi + + jne L_do_loop + + +L_one_time: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code_one_time + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + jmp L_get_length_code_one_time + +ALIGN 4 +L_while_test: + cmp r10, rdi + jbe L_break_loop + cmp r9, rsi + jbe L_break_loop + +L_do_loop: + mov r8, r12 ; /* r8 = lmask */ + cmp bl, 32 + ja L_get_length_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_length_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + mov r8, r12 ; /* r8 = lmask */ + shr eax, 16 ; /* output this.val char */ + stosb + +L_get_length_code_one_time: + and r8, rdx ; /* r8 &= hold */ + mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */ + +L_dolen: + mov cl, ah ; /* cl = this.bits */ + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + + test al, al + jnz L_test_for_length_base ; /* if (op != 0) 45.7% */ + + shr eax, 16 ; /* output this.val char */ + stosb + jmp L_while_test + +ALIGN 4 +L_test_for_length_base: + mov r14d, eax ; /* len = this */ + shr r14d, 16 ; /* len = this.val */ + mov cl, al + + test al, 16 + jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */ + and cl, 15 ; /* op &= 15 */ + jz L_decode_distance ; /* if (!op) */ + +L_add_bits_to_len: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r14d, eax ; /* len += hold & mask[op] */ + +L_decode_distance: + mov r8, r13 ; /* r8 = dmask */ + cmp bl, 32 + ja L_get_distance_code ; /* if (32 < bits) */ + + lodsd ; /* eax = *(uint *)in++ */ + mov cl, bl ; /* cl = bits, needs it for shifting */ + add bl, 32 ; /* bits += 32 */ + shl rax, cl + or rdx, rax ; /* hold |= *((uint *)in)++ << bits */ + +L_get_distance_code: + and r8, rdx ; /* r8 &= hold */ + mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */ + +L_dodist: + mov r15d, eax ; /* dist = this */ + shr r15d, 16 ; /* dist = this.val */ + mov cl, ah + sub bl, ah ; /* bits -= this.bits */ + shr rdx, cl ; /* hold >>= this.bits */ + mov cl, al ; /* cl = this.op */ + + test al, 16 ; /* if ((op & 16) == 0) */ + jz L_test_for_second_level_dist + and cl, 15 ; /* op &= 15 */ + jz L_check_dist_one + +L_add_bits_to_dist: + sub bl, cl + xor eax, eax + inc eax + shl eax, cl + dec eax ; /* (1 << op) - 1 */ + and eax, edx ; /* eax &= hold */ + shr rdx, cl + add r15d, eax ; /* dist += hold & ((1 << op) - 1) */ + +L_check_window: + mov r8, rsi ; /* save in so from can use it's reg */ + mov rax, rdi + sub rax, [rsp+40] ; /* nbytes = out - beg */ + + cmp eax, r15d + jb L_clip_window ; /* if (dist > nbytes) 4.2% */ + + mov ecx, r14d ; /* ecx = len */ + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + + sar ecx, 1 + jnc L_copy_two ; /* if len % 2 == 0 */ + + rep movsw + mov al, [rsi] + mov [rdi], al + inc rdi + + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +L_copy_two: + rep movsw + mov rsi, r8 ; /* move in back to %rsi, toss from */ + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp r15d, 1 ; /* if dist 1, is a memset */ + jne L_check_window + cmp [rsp+40], rdi ; /* if out == beg, outside window */ + je L_check_window + + mov ecx, r14d ; /* ecx = len */ + mov al, [rdi-1] + mov ah, al + + sar ecx, 1 + jnc L_set_two + mov [rdi], al + inc rdi + +L_set_two: + rep stosw + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + test al, 64 + jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r14d ; /* eax += len */ + mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/ + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + test al, 64 + jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */ + + xor eax, eax + inc eax + shl eax, cl + dec eax + and eax, edx ; /* eax &= hold */ + add eax, r15d ; /* eax += dist */ + mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/ + jmp L_dodist + +ALIGN 4 +L_clip_window: + mov ecx, eax ; /* ecx = nbytes */ + mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */ + neg ecx ; /* nbytes = -nbytes */ + + cmp eax, r15d + jb L_invalid_distance_too_far ; /* if (dist > wsize) */ + + add ecx, r15d ; /* nbytes = dist - nbytes */ + cmp dword ptr [rsp+96], 0 + jne L_wrap_around_window ; /* if (write != 0) */ + + mov rsi, [rsp+56] ; /* from = window */ + sub eax, ecx ; /* eax -= nbytes */ + add rsi, rax ; /* from += wsize - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp r14d, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* eax -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = &out[ -dist ] */ + jmp L_do_copy + +ALIGN 4 +L_wrap_around_window: + mov eax, [rsp+96] ; /* eax = write */ + cmp ecx, eax + jbe L_contiguous_in_window ; /* if (write >= nbytes) */ + + mov esi, [rsp+92] ; /* from = wsize */ + add rsi, [rsp+56] ; /* from += window */ + add rsi, rax ; /* from += write */ + sub rsi, rcx ; /* from -= nbytes */ + sub ecx, eax ; /* nbytes -= write */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, [rsp+56] ; /* from = window */ + mov ecx, [rsp+96] ; /* nbytes = write */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy + +ALIGN 4 +L_contiguous_in_window: + mov rsi, [rsp+56] ; /* rsi = window */ + add rsi, rax + sub rsi, rcx ; /* from += write - nbytes */ + + mov eax, r14d ; /* eax = len */ + cmp eax, ecx + jbe L_do_copy ; /* if (nbytes >= len) */ + + sub eax, ecx ; /* len -= nbytes */ + rep movsb + mov rsi, rdi + sub rsi, r15 ; /* from = out - dist */ + jmp L_do_copy ; /* if (nbytes >= len) */ + +ALIGN 4 +L_do_copy: + mov ecx, eax ; /* ecx = len */ + rep movsb + + mov rsi, r8 ; /* move in back to %esi, toss from */ + jmp L_while_test + +L_test_for_end_of_block: + test al, 32 + jz L_invalid_literal_length_code + mov dword ptr [rsp+116], 1 + jmp L_break_loop_with_status + +L_invalid_literal_length_code: + mov dword ptr [rsp+116], 2 + jmp L_break_loop_with_status + +L_invalid_distance_code: + mov dword ptr [rsp+116], 3 + jmp L_break_loop_with_status + +L_invalid_distance_too_far: + mov dword ptr [rsp+116], 4 + jmp L_break_loop_with_status + +L_break_loop: + mov dword ptr [rsp+116], 0 + +L_break_loop_with_status: +; /* put in, out, bits, and hold back into ar and pop esp */ + mov [rsp+16], rsi ; /* in */ + mov [rsp+32], rdi ; /* out */ + mov [rsp+88], ebx ; /* bits */ + mov [rsp+80], rdx ; /* hold */ + + mov rax, [rsp] ; /* restore rbp and rsp */ + mov rbp, [rsp+8] + mov rsp, rax + + + + mov rsi,[rsp-8] + mov rdi,[rsp-16] + mov r12,[rsp-24] + mov r13,[rsp-32] + mov r14,[rsp-40] + mov r15,[rsp-48] + mov rbx,[rsp-56] + + ret 0 +; : +; : "m" (ar) +; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", +; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" +; ); + +inffas8664fnc ENDP +;_TEXT ENDS +END diff --git a/compat/zlib/contrib/masmx64/readme.txt b/compat/zlib/contrib/masmx64/readme.txt index 652571c..2da6733 100644 --- a/compat/zlib/contrib/masmx64/readme.txt +++ b/compat/zlib/contrib/masmx64/readme.txt @@ -1,31 +1,31 @@ -Summary -------- -This directory contains ASM implementations of the functions -longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t), -for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits. - -gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits - assembly optimized version from Jean-loup Gailly original longest_match function - -inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing - original function from Mark Adler - -Use instructions ----------------- -Assemble the .asm files using MASM and put the object files into the zlib source -directory. You can also get object files here: - - http://www.winimage.com/zLibDll/zlib124_masm_obj.zip - -define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, -and inffasx64.obj and gvmat64.obj as object to link. - - -Build instructions ------------------- -run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) - -ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK - -You can get Windows 2003 server DDK with ml64 and cl for AMD64 from - http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) +Summary +------- +This directory contains ASM implementations of the functions +longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t), +for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits. + +gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits + assembly optimized version from Jean-loup Gailly original longest_match function + +inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing + original function from Mark Adler + +Use instructions +---------------- +Assemble the .asm files using MASM and put the object files into the zlib source +directory. You can also get object files here: + + http://www.winimage.com/zLibDll/zlib124_masm_obj.zip + +define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, +and inffasx64.obj and gvmat64.obj as object to link. + + +Build instructions +------------------ +run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) + +ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK + +You can get Windows 2003 server DDK with ml64 and cl for AMD64 from + http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) diff --git a/compat/zlib/contrib/masmx86/bld_ml32.bat b/compat/zlib/contrib/masmx86/bld_ml32.bat index fcf5755..e1b86bf 100644 --- a/compat/zlib/contrib/masmx86/bld_ml32.bat +++ b/compat/zlib/contrib/masmx86/bld_ml32.bat @@ -1,2 +1,2 @@ -ml /coff /Zi /c /Flmatch686.lst match686.asm -ml /coff /Zi /c /Flinffas32.lst inffas32.asm +ml /coff /Zi /c /Flmatch686.lst match686.asm +ml /coff /Zi /c /Flinffas32.lst inffas32.asm diff --git a/compat/zlib/contrib/masmx86/inffas32.asm b/compat/zlib/contrib/masmx86/inffas32.asm index 14f9d35..92ac22a 100644 --- a/compat/zlib/contrib/masmx86/inffas32.asm +++ b/compat/zlib/contrib/masmx86/inffas32.asm @@ -1,1083 +1,1083 @@ -;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding -; * -; * inffas32.asm is derivated from inffas86.c, with translation of assembly code -; * -; * Copyright (C) 1995-2003 Mark Adler -; * For conditions of distribution and use, see copyright notice in zlib.h -; * -; * Copyright (C) 2003 Chris Anderson -; * Please use the copyright conditions above. -; * -; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from -; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at -; * the moment. I have successfully compiled and tested this code with gcc2.96, -; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S -; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX -; * enabled. I will attempt to merge the MMX code into this version. Newer -; * versions of this and inffast.S can be found at -; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ -; * -; * 2005 : modification by Gilles Vollant -; */ -; For Visual C++ 4.x and higher and ML 6.x and higher -; ml.exe is in directory \MASM611C of Win95 DDK -; ml.exe is also distributed in http://www.masm32.com/masmdl.htm -; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ -; -; -; compile with command line option -; ml /coff /Zi /c /Flinffas32.lst inffas32.asm - -; if you define NO_GZIP (see inflate.h), compile with -; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm - - -; zlib122sup is 0 fort zlib 1.2.2.1 and lower -; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head -; in inflate_state in inflate.h) -zlib1222sup equ 8 - - -IFDEF GUNZIP - INFLATE_MODE_TYPE equ 11 - INFLATE_MODE_BAD equ 26 -ELSE - IFNDEF NO_GUNZIP - INFLATE_MODE_TYPE equ 11 - INFLATE_MODE_BAD equ 26 - ELSE - INFLATE_MODE_TYPE equ 3 - INFLATE_MODE_BAD equ 17 - ENDIF -ENDIF - - -; 75 "inffast.S" -;FILE "inffast.S" - -;;;GLOBAL _inflate_fast - -;;;SECTION .text - - - - .586p - .mmx - - name inflate_fast_x86 - .MODEL FLAT - -_DATA segment -inflate_fast_use_mmx: - dd 1 - - -_TEXT segment -PUBLIC _inflate_fast - -ALIGN 4 -_inflate_fast: - jmp inflate_fast_entry - - - -ALIGN 4 - db 'Fast decoding Code from Chris Anderson' - db 0 - -ALIGN 4 -invalid_literal_length_code_msg: - db 'invalid literal/length code' - db 0 - -ALIGN 4 -invalid_distance_code_msg: - db 'invalid distance code' - db 0 - -ALIGN 4 -invalid_distance_too_far_msg: - db 'invalid distance too far back' - db 0 - - -ALIGN 4 -inflate_fast_mask: -dd 0 -dd 1 -dd 3 -dd 7 -dd 15 -dd 31 -dd 63 -dd 127 -dd 255 -dd 511 -dd 1023 -dd 2047 -dd 4095 -dd 8191 -dd 16383 -dd 32767 -dd 65535 -dd 131071 -dd 262143 -dd 524287 -dd 1048575 -dd 2097151 -dd 4194303 -dd 8388607 -dd 16777215 -dd 33554431 -dd 67108863 -dd 134217727 -dd 268435455 -dd 536870911 -dd 1073741823 -dd 2147483647 -dd 4294967295 - - -mode_state equ 0 ;/* state->mode */ -wsize_state equ (32+zlib1222sup) ;/* state->wsize */ -write_state equ (36+4+zlib1222sup) ;/* state->write */ -window_state equ (40+4+zlib1222sup) ;/* state->window */ -hold_state equ (44+4+zlib1222sup) ;/* state->hold */ -bits_state equ (48+4+zlib1222sup) ;/* state->bits */ -lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ -distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ -lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ -distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ - - -;;SECTION .text -; 205 "inffast.S" -;GLOBAL inflate_fast_use_mmx - -;SECTION .data - - -; GLOBAL inflate_fast_use_mmx:object -;.size inflate_fast_use_mmx, 4 -; 226 "inffast.S" -;SECTION .text - -ALIGN 4 -inflate_fast_entry: - push edi - push esi - push ebp - push ebx - pushfd - sub esp,64 - cld - - - - - mov esi, [esp+88] - mov edi, [esi+28] - - - - - - - - mov edx, [esi+4] - mov eax, [esi+0] - - add edx,eax - sub edx,11 - - mov [esp+44],eax - mov [esp+20],edx - - mov ebp, [esp+92] - mov ecx, [esi+16] - mov ebx, [esi+12] - - sub ebp,ecx - neg ebp - add ebp,ebx - - sub ecx,257 - add ecx,ebx - - mov [esp+60],ebx - mov [esp+40],ebp - mov [esp+16],ecx -; 285 "inffast.S" - mov eax, [edi+lencode_state] - mov ecx, [edi+distcode_state] - - mov [esp+8],eax - mov [esp+12],ecx - - mov eax,1 - mov ecx, [edi+lenbits_state] - shl eax,cl - dec eax - mov [esp+0],eax - - mov eax,1 - mov ecx, [edi+distbits_state] - shl eax,cl - dec eax - mov [esp+4],eax - - mov eax, [edi+wsize_state] - mov ecx, [edi+write_state] - mov edx, [edi+window_state] - - mov [esp+52],eax - mov [esp+48],ecx - mov [esp+56],edx - - mov ebp, [edi+hold_state] - mov ebx, [edi+bits_state] -; 321 "inffast.S" - mov esi, [esp+44] - mov ecx, [esp+20] - cmp ecx,esi - ja L_align_long - - add ecx,11 - sub ecx,esi - mov eax,12 - sub eax,ecx - lea edi, [esp+28] - rep movsb - mov ecx,eax - xor eax,eax - rep stosb - lea esi, [esp+28] - mov [esp+20],esi - jmp L_is_aligned - - -L_align_long: - test esi,3 - jz L_is_aligned - xor eax,eax - mov al, [esi] - inc esi - mov ecx,ebx - add ebx,8 - shl eax,cl - or ebp,eax - jmp L_align_long - -L_is_aligned: - mov edi, [esp+60] -; 366 "inffast.S" -L_check_mmx: - cmp dword ptr [inflate_fast_use_mmx],2 - je L_init_mmx - ja L_do_loop - - push eax - push ebx - push ecx - push edx - pushfd - mov eax, [esp] - xor dword ptr [esp],0200000h - - - - - popfd - pushfd - pop edx - xor edx,eax - jz L_dont_use_mmx - xor eax,eax - cpuid - cmp ebx,0756e6547h - jne L_dont_use_mmx - cmp ecx,06c65746eh - jne L_dont_use_mmx - cmp edx,049656e69h - jne L_dont_use_mmx - mov eax,1 - cpuid - shr eax,8 - and eax,15 - cmp eax,6 - jne L_dont_use_mmx - test edx,0800000h - jnz L_use_mmx - jmp L_dont_use_mmx -L_use_mmx: - mov dword ptr [inflate_fast_use_mmx],2 - jmp L_check_mmx_pop -L_dont_use_mmx: - mov dword ptr [inflate_fast_use_mmx],3 -L_check_mmx_pop: - pop edx - pop ecx - pop ebx - pop eax - jmp L_check_mmx -; 426 "inffast.S" -ALIGN 4 -L_do_loop: -; 437 "inffast.S" - cmp bl,15 - ja L_get_length_code - - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - -L_get_length_code: - mov edx, [esp+0] - mov ecx, [esp+8] - and edx,ebp - mov eax, [ecx+edx*4] - -L_dolen: - - - - - - - mov cl,ah - sub bl,ah - shr ebp,cl - - - - - - - test al,al - jnz L_test_for_length_base - - shr eax,16 - stosb - -L_while_test: - - - cmp [esp+16],edi - jbe L_break_loop - - cmp [esp+20],esi - ja L_do_loop - jmp L_break_loop - -L_test_for_length_base: -; 502 "inffast.S" - mov edx,eax - shr edx,16 - mov cl,al - - test al,16 - jz L_test_for_second_level_length - and cl,15 - jz L_save_len - cmp bl,cl - jae L_add_bits_to_len - - mov ch,cl - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - mov cl,ch - -L_add_bits_to_len: - mov eax,1 - shl eax,cl - dec eax - sub bl,cl - and eax,ebp - shr ebp,cl - add edx,eax - -L_save_len: - mov [esp+24],edx - - -L_decode_distance: -; 549 "inffast.S" - cmp bl,15 - ja L_get_distance_code - - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - -L_get_distance_code: - mov edx, [esp+4] - mov ecx, [esp+12] - and edx,ebp - mov eax, [ecx+edx*4] - - -L_dodist: - mov edx,eax - shr edx,16 - mov cl,ah - sub bl,ah - shr ebp,cl -; 584 "inffast.S" - mov cl,al - - test al,16 - jz L_test_for_second_level_dist - and cl,15 - jz L_check_dist_one - cmp bl,cl - jae L_add_bits_to_dist - - mov ch,cl - xor eax,eax - lodsw - mov cl,bl - add bl,16 - shl eax,cl - or ebp,eax - mov cl,ch - -L_add_bits_to_dist: - mov eax,1 - shl eax,cl - dec eax - sub bl,cl - and eax,ebp - shr ebp,cl - add edx,eax - jmp L_check_window - -L_check_window: -; 625 "inffast.S" - mov [esp+44],esi - mov eax,edi - sub eax, [esp+40] - - cmp eax,edx - jb L_clip_window - - mov ecx, [esp+24] - mov esi,edi - sub esi,edx - - sub ecx,3 - mov al, [esi] - mov [edi],al - mov al, [esi+1] - mov dl, [esi+2] - add esi,3 - mov [edi+1],al - mov [edi+2],dl - add edi,3 - rep movsb - - mov esi, [esp+44] - jmp L_while_test - -ALIGN 4 -L_check_dist_one: - cmp edx,1 - jne L_check_window - cmp [esp+40],edi - je L_check_window - - dec edi - mov ecx, [esp+24] - mov al, [edi] - sub ecx,3 - - mov [edi+1],al - mov [edi+2],al - mov [edi+3],al - add edi,4 - rep stosb - - jmp L_while_test - -ALIGN 4 -L_test_for_second_level_length: - - - - - test al,64 - jnz L_test_for_end_of_block - - mov eax,1 - shl eax,cl - dec eax - and eax,ebp - add eax,edx - mov edx, [esp+8] - mov eax, [edx+eax*4] - jmp L_dolen - -ALIGN 4 -L_test_for_second_level_dist: - - - - - test al,64 - jnz L_invalid_distance_code - - mov eax,1 - shl eax,cl - dec eax - and eax,ebp - add eax,edx - mov edx, [esp+12] - mov eax, [edx+eax*4] - jmp L_dodist - -ALIGN 4 -L_clip_window: -; 721 "inffast.S" - mov ecx,eax - mov eax, [esp+52] - neg ecx - mov esi, [esp+56] - - cmp eax,edx - jb L_invalid_distance_too_far - - add ecx,edx - cmp dword ptr [esp+48],0 - jne L_wrap_around_window - - sub eax,ecx - add esi,eax -; 749 "inffast.S" - mov eax, [esp+24] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - jmp L_do_copy1 - - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - jmp L_do_copy1 - -L_wrap_around_window: -; 793 "inffast.S" - mov eax, [esp+48] - cmp ecx,eax - jbe L_contiguous_in_window - - add esi, [esp+52] - add esi,eax - sub esi,ecx - sub ecx,eax - - - mov eax, [esp+24] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi, [esp+56] - mov ecx, [esp+48] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - jmp L_do_copy1 - -L_contiguous_in_window: -; 836 "inffast.S" - add esi,eax - sub esi,ecx - - - mov eax, [esp+24] - cmp eax,ecx - jbe L_do_copy1 - - sub eax,ecx - rep movsb - mov esi,edi - sub esi,edx - -L_do_copy1: -; 862 "inffast.S" - mov ecx,eax - rep movsb - - mov esi, [esp+44] - jmp L_while_test -; 878 "inffast.S" -ALIGN 4 -L_init_mmx: - emms - - - - - - movd mm0,ebp - mov ebp,ebx -; 896 "inffast.S" - movd mm4,dword ptr [esp+0] - movq mm3,mm4 - movd mm5,dword ptr [esp+4] - movq mm2,mm5 - pxor mm1,mm1 - mov ebx, [esp+8] - jmp L_do_loop_mmx - -ALIGN 4 -L_do_loop_mmx: - psrlq mm0,mm1 - - cmp ebp,32 - ja L_get_length_code_mmx - - movd mm6,ebp - movd mm7,dword ptr [esi] - add esi,4 - psllq mm7,mm6 - add ebp,32 - por mm0,mm7 - -L_get_length_code_mmx: - pand mm4,mm0 - movd eax,mm4 - movq mm4,mm3 - mov eax, [ebx+eax*4] - -L_dolen_mmx: - movzx ecx,ah - movd mm1,ecx - sub ebp,ecx - - test al,al - jnz L_test_for_length_base_mmx - - shr eax,16 - stosb - -L_while_test_mmx: - - - cmp [esp+16],edi - jbe L_break_loop - - cmp [esp+20],esi - ja L_do_loop_mmx - jmp L_break_loop - -L_test_for_length_base_mmx: - - mov edx,eax - shr edx,16 - - test al,16 - jz L_test_for_second_level_length_mmx - and eax,15 - jz L_decode_distance_mmx - - psrlq mm0,mm1 - movd mm1,eax - movd ecx,mm0 - sub ebp,eax - and ecx, [inflate_fast_mask+eax*4] - add edx,ecx - -L_decode_distance_mmx: - psrlq mm0,mm1 - - cmp ebp,32 - ja L_get_dist_code_mmx - - movd mm6,ebp - movd mm7,dword ptr [esi] - add esi,4 - psllq mm7,mm6 - add ebp,32 - por mm0,mm7 - -L_get_dist_code_mmx: - mov ebx, [esp+12] - pand mm5,mm0 - movd eax,mm5 - movq mm5,mm2 - mov eax, [ebx+eax*4] - -L_dodist_mmx: - - movzx ecx,ah - mov ebx,eax - shr ebx,16 - sub ebp,ecx - movd mm1,ecx - - test al,16 - jz L_test_for_second_level_dist_mmx - and eax,15 - jz L_check_dist_one_mmx - -L_add_bits_to_dist_mmx: - psrlq mm0,mm1 - movd mm1,eax - movd ecx,mm0 - sub ebp,eax - and ecx, [inflate_fast_mask+eax*4] - add ebx,ecx - -L_check_window_mmx: - mov [esp+44],esi - mov eax,edi - sub eax, [esp+40] - - cmp eax,ebx - jb L_clip_window_mmx - - mov ecx,edx - mov esi,edi - sub esi,ebx - - sub ecx,3 - mov al, [esi] - mov [edi],al - mov al, [esi+1] - mov dl, [esi+2] - add esi,3 - mov [edi+1],al - mov [edi+2],dl - add edi,3 - rep movsb - - mov esi, [esp+44] - mov ebx, [esp+8] - jmp L_while_test_mmx - -ALIGN 4 -L_check_dist_one_mmx: - cmp ebx,1 - jne L_check_window_mmx - cmp [esp+40],edi - je L_check_window_mmx - - dec edi - mov ecx,edx - mov al, [edi] - sub ecx,3 - - mov [edi+1],al - mov [edi+2],al - mov [edi+3],al - add edi,4 - rep stosb - - mov ebx, [esp+8] - jmp L_while_test_mmx - -ALIGN 4 -L_test_for_second_level_length_mmx: - test al,64 - jnz L_test_for_end_of_block - - and eax,15 - psrlq mm0,mm1 - movd ecx,mm0 - and ecx, [inflate_fast_mask+eax*4] - add ecx,edx - mov eax, [ebx+ecx*4] - jmp L_dolen_mmx - -ALIGN 4 -L_test_for_second_level_dist_mmx: - test al,64 - jnz L_invalid_distance_code - - and eax,15 - psrlq mm0,mm1 - movd ecx,mm0 - and ecx, [inflate_fast_mask+eax*4] - mov eax, [esp+12] - add ecx,ebx - mov eax, [eax+ecx*4] - jmp L_dodist_mmx - -ALIGN 4 -L_clip_window_mmx: - - mov ecx,eax - mov eax, [esp+52] - neg ecx - mov esi, [esp+56] - - cmp eax,ebx - jb L_invalid_distance_too_far - - add ecx,ebx - cmp dword ptr [esp+48],0 - jne L_wrap_around_window_mmx - - sub eax,ecx - add esi,eax - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - jmp L_do_copy1_mmx - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - jmp L_do_copy1_mmx - -L_wrap_around_window_mmx: - - mov eax, [esp+48] - cmp ecx,eax - jbe L_contiguous_in_window_mmx - - add esi, [esp+52] - add esi,eax - sub esi,ecx - sub ecx,eax - - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi, [esp+56] - mov ecx, [esp+48] - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - jmp L_do_copy1_mmx - -L_contiguous_in_window_mmx: - - add esi,eax - sub esi,ecx - - - cmp edx,ecx - jbe L_do_copy1_mmx - - sub edx,ecx - rep movsb - mov esi,edi - sub esi,ebx - -L_do_copy1_mmx: - - - mov ecx,edx - rep movsb - - mov esi, [esp+44] - mov ebx, [esp+8] - jmp L_while_test_mmx -; 1174 "inffast.S" -L_invalid_distance_code: - - - - - - mov ecx, invalid_distance_code_msg - mov edx,INFLATE_MODE_BAD - jmp L_update_stream_state - -L_test_for_end_of_block: - - - - - - test al,32 - jz L_invalid_literal_length_code - - mov ecx,0 - mov edx,INFLATE_MODE_TYPE - jmp L_update_stream_state - -L_invalid_literal_length_code: - - - - - - mov ecx, invalid_literal_length_code_msg - mov edx,INFLATE_MODE_BAD - jmp L_update_stream_state - -L_invalid_distance_too_far: - - - - mov esi, [esp+44] - mov ecx, invalid_distance_too_far_msg - mov edx,INFLATE_MODE_BAD - jmp L_update_stream_state - -L_update_stream_state: - - mov eax, [esp+88] - test ecx,ecx - jz L_skip_msg - mov [eax+24],ecx -L_skip_msg: - mov eax, [eax+28] - mov [eax+mode_state],edx - jmp L_break_loop - -ALIGN 4 -L_break_loop: -; 1243 "inffast.S" - cmp dword ptr [inflate_fast_use_mmx],2 - jne L_update_next_in - - - - mov ebx,ebp - -L_update_next_in: -; 1266 "inffast.S" - mov eax, [esp+88] - mov ecx,ebx - mov edx, [eax+28] - shr ecx,3 - sub esi,ecx - shl ecx,3 - sub ebx,ecx - mov [eax+12],edi - mov [edx+bits_state],ebx - mov ecx,ebx - - lea ebx, [esp+28] - cmp [esp+20],ebx - jne L_buf_not_used - - sub esi,ebx - mov ebx, [eax+0] - mov [esp+20],ebx - add esi,ebx - mov ebx, [eax+4] - sub ebx,11 - add [esp+20],ebx - -L_buf_not_used: - mov [eax+0],esi - - mov ebx,1 - shl ebx,cl - dec ebx - - - - - - cmp dword ptr [inflate_fast_use_mmx],2 - jne L_update_hold - - - - psrlq mm0,mm1 - movd ebp,mm0 - - emms - -L_update_hold: - - - - and ebp,ebx - mov [edx+hold_state],ebp - - - - - mov ebx, [esp+20] - cmp ebx,esi - jbe L_last_is_smaller - - sub ebx,esi - add ebx,11 - mov [eax+4],ebx - jmp L_fixup_out -L_last_is_smaller: - sub esi,ebx - neg esi - add esi,11 - mov [eax+4],esi - - - - -L_fixup_out: - - mov ebx, [esp+16] - cmp ebx,edi - jbe L_end_is_smaller - - sub ebx,edi - add ebx,257 - mov [eax+16],ebx - jmp L_done -L_end_is_smaller: - sub edi,ebx - neg edi - add edi,257 - mov [eax+16],edi - - - - - -L_done: - add esp,64 - popfd - pop ebx - pop ebp - pop esi - pop edi - ret - -_TEXT ends -end +;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding +; * +; * inffas32.asm is derivated from inffas86.c, with translation of assembly code +; * +; * Copyright (C) 1995-2003 Mark Adler +; * For conditions of distribution and use, see copyright notice in zlib.h +; * +; * Copyright (C) 2003 Chris Anderson +; * Please use the copyright conditions above. +; * +; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from +; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at +; * the moment. I have successfully compiled and tested this code with gcc2.96, +; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S +; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX +; * enabled. I will attempt to merge the MMX code into this version. Newer +; * versions of this and inffast.S can be found at +; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/ +; * +; * 2005 : modification by Gilles Vollant +; */ +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is in directory \MASM611C of Win95 DDK +; ml.exe is also distributed in http://www.masm32.com/masmdl.htm +; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/ +; +; +; compile with command line option +; ml /coff /Zi /c /Flinffas32.lst inffas32.asm + +; if you define NO_GZIP (see inflate.h), compile with +; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm + + +; zlib122sup is 0 fort zlib 1.2.2.1 and lower +; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head +; in inflate_state in inflate.h) +zlib1222sup equ 8 + + +IFDEF GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 +ELSE + IFNDEF NO_GUNZIP + INFLATE_MODE_TYPE equ 11 + INFLATE_MODE_BAD equ 26 + ELSE + INFLATE_MODE_TYPE equ 3 + INFLATE_MODE_BAD equ 17 + ENDIF +ENDIF + + +; 75 "inffast.S" +;FILE "inffast.S" + +;;;GLOBAL _inflate_fast + +;;;SECTION .text + + + + .586p + .mmx + + name inflate_fast_x86 + .MODEL FLAT + +_DATA segment +inflate_fast_use_mmx: + dd 1 + + +_TEXT segment +PUBLIC _inflate_fast + +ALIGN 4 +_inflate_fast: + jmp inflate_fast_entry + + + +ALIGN 4 + db 'Fast decoding Code from Chris Anderson' + db 0 + +ALIGN 4 +invalid_literal_length_code_msg: + db 'invalid literal/length code' + db 0 + +ALIGN 4 +invalid_distance_code_msg: + db 'invalid distance code' + db 0 + +ALIGN 4 +invalid_distance_too_far_msg: + db 'invalid distance too far back' + db 0 + + +ALIGN 4 +inflate_fast_mask: +dd 0 +dd 1 +dd 3 +dd 7 +dd 15 +dd 31 +dd 63 +dd 127 +dd 255 +dd 511 +dd 1023 +dd 2047 +dd 4095 +dd 8191 +dd 16383 +dd 32767 +dd 65535 +dd 131071 +dd 262143 +dd 524287 +dd 1048575 +dd 2097151 +dd 4194303 +dd 8388607 +dd 16777215 +dd 33554431 +dd 67108863 +dd 134217727 +dd 268435455 +dd 536870911 +dd 1073741823 +dd 2147483647 +dd 4294967295 + + +mode_state equ 0 ;/* state->mode */ +wsize_state equ (32+zlib1222sup) ;/* state->wsize */ +write_state equ (36+4+zlib1222sup) ;/* state->write */ +window_state equ (40+4+zlib1222sup) ;/* state->window */ +hold_state equ (44+4+zlib1222sup) ;/* state->hold */ +bits_state equ (48+4+zlib1222sup) ;/* state->bits */ +lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */ +distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */ +lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */ +distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */ + + +;;SECTION .text +; 205 "inffast.S" +;GLOBAL inflate_fast_use_mmx + +;SECTION .data + + +; GLOBAL inflate_fast_use_mmx:object +;.size inflate_fast_use_mmx, 4 +; 226 "inffast.S" +;SECTION .text + +ALIGN 4 +inflate_fast_entry: + push edi + push esi + push ebp + push ebx + pushfd + sub esp,64 + cld + + + + + mov esi, [esp+88] + mov edi, [esi+28] + + + + + + + + mov edx, [esi+4] + mov eax, [esi+0] + + add edx,eax + sub edx,11 + + mov [esp+44],eax + mov [esp+20],edx + + mov ebp, [esp+92] + mov ecx, [esi+16] + mov ebx, [esi+12] + + sub ebp,ecx + neg ebp + add ebp,ebx + + sub ecx,257 + add ecx,ebx + + mov [esp+60],ebx + mov [esp+40],ebp + mov [esp+16],ecx +; 285 "inffast.S" + mov eax, [edi+lencode_state] + mov ecx, [edi+distcode_state] + + mov [esp+8],eax + mov [esp+12],ecx + + mov eax,1 + mov ecx, [edi+lenbits_state] + shl eax,cl + dec eax + mov [esp+0],eax + + mov eax,1 + mov ecx, [edi+distbits_state] + shl eax,cl + dec eax + mov [esp+4],eax + + mov eax, [edi+wsize_state] + mov ecx, [edi+write_state] + mov edx, [edi+window_state] + + mov [esp+52],eax + mov [esp+48],ecx + mov [esp+56],edx + + mov ebp, [edi+hold_state] + mov ebx, [edi+bits_state] +; 321 "inffast.S" + mov esi, [esp+44] + mov ecx, [esp+20] + cmp ecx,esi + ja L_align_long + + add ecx,11 + sub ecx,esi + mov eax,12 + sub eax,ecx + lea edi, [esp+28] + rep movsb + mov ecx,eax + xor eax,eax + rep stosb + lea esi, [esp+28] + mov [esp+20],esi + jmp L_is_aligned + + +L_align_long: + test esi,3 + jz L_is_aligned + xor eax,eax + mov al, [esi] + inc esi + mov ecx,ebx + add ebx,8 + shl eax,cl + or ebp,eax + jmp L_align_long + +L_is_aligned: + mov edi, [esp+60] +; 366 "inffast.S" +L_check_mmx: + cmp dword ptr [inflate_fast_use_mmx],2 + je L_init_mmx + ja L_do_loop + + push eax + push ebx + push ecx + push edx + pushfd + mov eax, [esp] + xor dword ptr [esp],0200000h + + + + + popfd + pushfd + pop edx + xor edx,eax + jz L_dont_use_mmx + xor eax,eax + cpuid + cmp ebx,0756e6547h + jne L_dont_use_mmx + cmp ecx,06c65746eh + jne L_dont_use_mmx + cmp edx,049656e69h + jne L_dont_use_mmx + mov eax,1 + cpuid + shr eax,8 + and eax,15 + cmp eax,6 + jne L_dont_use_mmx + test edx,0800000h + jnz L_use_mmx + jmp L_dont_use_mmx +L_use_mmx: + mov dword ptr [inflate_fast_use_mmx],2 + jmp L_check_mmx_pop +L_dont_use_mmx: + mov dword ptr [inflate_fast_use_mmx],3 +L_check_mmx_pop: + pop edx + pop ecx + pop ebx + pop eax + jmp L_check_mmx +; 426 "inffast.S" +ALIGN 4 +L_do_loop: +; 437 "inffast.S" + cmp bl,15 + ja L_get_length_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_length_code: + mov edx, [esp+0] + mov ecx, [esp+8] + and edx,ebp + mov eax, [ecx+edx*4] + +L_dolen: + + + + + + + mov cl,ah + sub bl,ah + shr ebp,cl + + + + + + + test al,al + jnz L_test_for_length_base + + shr eax,16 + stosb + +L_while_test: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop + jmp L_break_loop + +L_test_for_length_base: +; 502 "inffast.S" + mov edx,eax + shr edx,16 + mov cl,al + + test al,16 + jz L_test_for_second_level_length + and cl,15 + jz L_save_len + cmp bl,cl + jae L_add_bits_to_len + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_len: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + +L_save_len: + mov [esp+24],edx + + +L_decode_distance: +; 549 "inffast.S" + cmp bl,15 + ja L_get_distance_code + + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + +L_get_distance_code: + mov edx, [esp+4] + mov ecx, [esp+12] + and edx,ebp + mov eax, [ecx+edx*4] + + +L_dodist: + mov edx,eax + shr edx,16 + mov cl,ah + sub bl,ah + shr ebp,cl +; 584 "inffast.S" + mov cl,al + + test al,16 + jz L_test_for_second_level_dist + and cl,15 + jz L_check_dist_one + cmp bl,cl + jae L_add_bits_to_dist + + mov ch,cl + xor eax,eax + lodsw + mov cl,bl + add bl,16 + shl eax,cl + or ebp,eax + mov cl,ch + +L_add_bits_to_dist: + mov eax,1 + shl eax,cl + dec eax + sub bl,cl + and eax,ebp + shr ebp,cl + add edx,eax + jmp L_check_window + +L_check_window: +; 625 "inffast.S" + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,edx + jb L_clip_window + + mov ecx, [esp+24] + mov esi,edi + sub esi,edx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + jmp L_while_test + +ALIGN 4 +L_check_dist_one: + cmp edx,1 + jne L_check_window + cmp [esp+40],edi + je L_check_window + + dec edi + mov ecx, [esp+24] + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + jmp L_while_test + +ALIGN 4 +L_test_for_second_level_length: + + + + + test al,64 + jnz L_test_for_end_of_block + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+8] + mov eax, [edx+eax*4] + jmp L_dolen + +ALIGN 4 +L_test_for_second_level_dist: + + + + + test al,64 + jnz L_invalid_distance_code + + mov eax,1 + shl eax,cl + dec eax + and eax,ebp + add eax,edx + mov edx, [esp+12] + mov eax, [edx+eax*4] + jmp L_dodist + +ALIGN 4 +L_clip_window: +; 721 "inffast.S" + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,edx + jb L_invalid_distance_too_far + + add ecx,edx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window + + sub eax,ecx + add esi,eax +; 749 "inffast.S" + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_wrap_around_window: +; 793 "inffast.S" + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + jmp L_do_copy1 + +L_contiguous_in_window: +; 836 "inffast.S" + add esi,eax + sub esi,ecx + + + mov eax, [esp+24] + cmp eax,ecx + jbe L_do_copy1 + + sub eax,ecx + rep movsb + mov esi,edi + sub esi,edx + +L_do_copy1: +; 862 "inffast.S" + mov ecx,eax + rep movsb + + mov esi, [esp+44] + jmp L_while_test +; 878 "inffast.S" +ALIGN 4 +L_init_mmx: + emms + + + + + + movd mm0,ebp + mov ebp,ebx +; 896 "inffast.S" + movd mm4,dword ptr [esp+0] + movq mm3,mm4 + movd mm5,dword ptr [esp+4] + movq mm2,mm5 + pxor mm1,mm1 + mov ebx, [esp+8] + jmp L_do_loop_mmx + +ALIGN 4 +L_do_loop_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_length_code_mmx + + movd mm6,ebp + movd mm7,dword ptr [esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_length_code_mmx: + pand mm4,mm0 + movd eax,mm4 + movq mm4,mm3 + mov eax, [ebx+eax*4] + +L_dolen_mmx: + movzx ecx,ah + movd mm1,ecx + sub ebp,ecx + + test al,al + jnz L_test_for_length_base_mmx + + shr eax,16 + stosb + +L_while_test_mmx: + + + cmp [esp+16],edi + jbe L_break_loop + + cmp [esp+20],esi + ja L_do_loop_mmx + jmp L_break_loop + +L_test_for_length_base_mmx: + + mov edx,eax + shr edx,16 + + test al,16 + jz L_test_for_second_level_length_mmx + and eax,15 + jz L_decode_distance_mmx + + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add edx,ecx + +L_decode_distance_mmx: + psrlq mm0,mm1 + + cmp ebp,32 + ja L_get_dist_code_mmx + + movd mm6,ebp + movd mm7,dword ptr [esi] + add esi,4 + psllq mm7,mm6 + add ebp,32 + por mm0,mm7 + +L_get_dist_code_mmx: + mov ebx, [esp+12] + pand mm5,mm0 + movd eax,mm5 + movq mm5,mm2 + mov eax, [ebx+eax*4] + +L_dodist_mmx: + + movzx ecx,ah + mov ebx,eax + shr ebx,16 + sub ebp,ecx + movd mm1,ecx + + test al,16 + jz L_test_for_second_level_dist_mmx + and eax,15 + jz L_check_dist_one_mmx + +L_add_bits_to_dist_mmx: + psrlq mm0,mm1 + movd mm1,eax + movd ecx,mm0 + sub ebp,eax + and ecx, [inflate_fast_mask+eax*4] + add ebx,ecx + +L_check_window_mmx: + mov [esp+44],esi + mov eax,edi + sub eax, [esp+40] + + cmp eax,ebx + jb L_clip_window_mmx + + mov ecx,edx + mov esi,edi + sub esi,ebx + + sub ecx,3 + mov al, [esi] + mov [edi],al + mov al, [esi+1] + mov dl, [esi+2] + add esi,3 + mov [edi+1],al + mov [edi+2],dl + add edi,3 + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_check_dist_one_mmx: + cmp ebx,1 + jne L_check_window_mmx + cmp [esp+40],edi + je L_check_window_mmx + + dec edi + mov ecx,edx + mov al, [edi] + sub ecx,3 + + mov [edi+1],al + mov [edi+2],al + mov [edi+3],al + add edi,4 + rep stosb + + mov ebx, [esp+8] + jmp L_while_test_mmx + +ALIGN 4 +L_test_for_second_level_length_mmx: + test al,64 + jnz L_test_for_end_of_block + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + add ecx,edx + mov eax, [ebx+ecx*4] + jmp L_dolen_mmx + +ALIGN 4 +L_test_for_second_level_dist_mmx: + test al,64 + jnz L_invalid_distance_code + + and eax,15 + psrlq mm0,mm1 + movd ecx,mm0 + and ecx, [inflate_fast_mask+eax*4] + mov eax, [esp+12] + add ecx,ebx + mov eax, [eax+ecx*4] + jmp L_dodist_mmx + +ALIGN 4 +L_clip_window_mmx: + + mov ecx,eax + mov eax, [esp+52] + neg ecx + mov esi, [esp+56] + + cmp eax,ebx + jb L_invalid_distance_too_far + + add ecx,ebx + cmp dword ptr [esp+48],0 + jne L_wrap_around_window_mmx + + sub eax,ecx + add esi,eax + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_wrap_around_window_mmx: + + mov eax, [esp+48] + cmp ecx,eax + jbe L_contiguous_in_window_mmx + + add esi, [esp+52] + add esi,eax + sub esi,ecx + sub ecx,eax + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi, [esp+56] + mov ecx, [esp+48] + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + jmp L_do_copy1_mmx + +L_contiguous_in_window_mmx: + + add esi,eax + sub esi,ecx + + + cmp edx,ecx + jbe L_do_copy1_mmx + + sub edx,ecx + rep movsb + mov esi,edi + sub esi,ebx + +L_do_copy1_mmx: + + + mov ecx,edx + rep movsb + + mov esi, [esp+44] + mov ebx, [esp+8] + jmp L_while_test_mmx +; 1174 "inffast.S" +L_invalid_distance_code: + + + + + + mov ecx, invalid_distance_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_test_for_end_of_block: + + + + + + test al,32 + jz L_invalid_literal_length_code + + mov ecx,0 + mov edx,INFLATE_MODE_TYPE + jmp L_update_stream_state + +L_invalid_literal_length_code: + + + + + + mov ecx, invalid_literal_length_code_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_invalid_distance_too_far: + + + + mov esi, [esp+44] + mov ecx, invalid_distance_too_far_msg + mov edx,INFLATE_MODE_BAD + jmp L_update_stream_state + +L_update_stream_state: + + mov eax, [esp+88] + test ecx,ecx + jz L_skip_msg + mov [eax+24],ecx +L_skip_msg: + mov eax, [eax+28] + mov [eax+mode_state],edx + jmp L_break_loop + +ALIGN 4 +L_break_loop: +; 1243 "inffast.S" + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_next_in + + + + mov ebx,ebp + +L_update_next_in: +; 1266 "inffast.S" + mov eax, [esp+88] + mov ecx,ebx + mov edx, [eax+28] + shr ecx,3 + sub esi,ecx + shl ecx,3 + sub ebx,ecx + mov [eax+12],edi + mov [edx+bits_state],ebx + mov ecx,ebx + + lea ebx, [esp+28] + cmp [esp+20],ebx + jne L_buf_not_used + + sub esi,ebx + mov ebx, [eax+0] + mov [esp+20],ebx + add esi,ebx + mov ebx, [eax+4] + sub ebx,11 + add [esp+20],ebx + +L_buf_not_used: + mov [eax+0],esi + + mov ebx,1 + shl ebx,cl + dec ebx + + + + + + cmp dword ptr [inflate_fast_use_mmx],2 + jne L_update_hold + + + + psrlq mm0,mm1 + movd ebp,mm0 + + emms + +L_update_hold: + + + + and ebp,ebx + mov [edx+hold_state],ebp + + + + + mov ebx, [esp+20] + cmp ebx,esi + jbe L_last_is_smaller + + sub ebx,esi + add ebx,11 + mov [eax+4],ebx + jmp L_fixup_out +L_last_is_smaller: + sub esi,ebx + neg esi + add esi,11 + mov [eax+4],esi + + + + +L_fixup_out: + + mov ebx, [esp+16] + cmp ebx,edi + jbe L_end_is_smaller + + sub ebx,edi + add ebx,257 + mov [eax+16],ebx + jmp L_done +L_end_is_smaller: + sub edi,ebx + neg edi + add edi,257 + mov [eax+16],edi + + + + + +L_done: + add esp,64 + popfd + pop ebx + pop ebp + pop esi + pop edi + ret + +_TEXT ends +end diff --git a/compat/zlib/contrib/masmx86/match686.asm b/compat/zlib/contrib/masmx86/match686.asm index 21ae704..1eaf555 100644 --- a/compat/zlib/contrib/masmx86/match686.asm +++ b/compat/zlib/contrib/masmx86/match686.asm @@ -1,478 +1,478 @@ -; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86 -; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant. -; File written by Gilles Vollant, by converting match686.S from Brian Raiter -; for MASM. This is as assembly version of longest_match -; from Jean-loup Gailly in deflate.c -; -; http://www.zlib.net -; http://www.winimage.com/zLibDll -; http://www.muppetlabs.com/~breadbox/software/assembly.html -; -; For Visual C++ 4.x and higher and ML 6.x and higher -; ml.exe is distributed in -; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 -; -; this file contain two implementation of longest_match -; -; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro -; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom) -; -; for using an assembly version of longest_match, you need define ASMV in project -; -; compile the asm file running -; ml /coff /Zi /c /Flmatch686.lst match686.asm -; and do not include match686.obj in your project -; -; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for -; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor -; with autoselect (with cpu detection code) -; if you want support the old pentium optimization, you can still use these version -; -; this file is not optimized for old pentium, but it compatible with all x86 32 bits -; processor (starting 80386) -; -; -; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2 - -;uInt longest_match(s, cur_match) -; deflate_state *s; -; IPos cur_match; /* current match */ - - NbStack equ 76 - cur_match equ dword ptr[esp+NbStack-0] - str_s equ dword ptr[esp+NbStack-4] -; 5 dword on top (ret,ebp,esi,edi,ebx) - adrret equ dword ptr[esp+NbStack-8] - pushebp equ dword ptr[esp+NbStack-12] - pushedi equ dword ptr[esp+NbStack-16] - pushesi equ dword ptr[esp+NbStack-20] - pushebx equ dword ptr[esp+NbStack-24] - - chain_length equ dword ptr [esp+NbStack-28] - limit equ dword ptr [esp+NbStack-32] - best_len equ dword ptr [esp+NbStack-36] - window equ dword ptr [esp+NbStack-40] - prev equ dword ptr [esp+NbStack-44] - scan_start equ word ptr [esp+NbStack-48] - wmask equ dword ptr [esp+NbStack-52] - match_start_ptr equ dword ptr [esp+NbStack-56] - nice_match equ dword ptr [esp+NbStack-60] - scan equ dword ptr [esp+NbStack-64] - - windowlen equ dword ptr [esp+NbStack-68] - match_start equ dword ptr [esp+NbStack-72] - strend equ dword ptr [esp+NbStack-76] - NbStackAdd equ (NbStack-24) - - .386p - - name gvmatch - .MODEL FLAT - - - -; all the +zlib1222add offsets are due to the addition of fields -; in zlib in the deflate_state structure since the asm code was first written -; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). -; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). -; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). - - zlib1222add equ 8 - -; Note : these value are good with a 8 bytes boundary pack structure - dep_chain_length equ 74h+zlib1222add - dep_window equ 30h+zlib1222add - dep_strstart equ 64h+zlib1222add - dep_prev_length equ 70h+zlib1222add - dep_nice_match equ 88h+zlib1222add - dep_w_size equ 24h+zlib1222add - dep_prev equ 38h+zlib1222add - dep_w_mask equ 2ch+zlib1222add - dep_good_match equ 84h+zlib1222add - dep_match_start equ 68h+zlib1222add - dep_lookahead equ 6ch+zlib1222add - - -_TEXT segment - -IFDEF NOUNDERLINE - public longest_match - public match_init -ELSE - public _longest_match - public _match_init -ENDIF - - MAX_MATCH equ 258 - MIN_MATCH equ 3 - MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) - - - -MAX_MATCH equ 258 -MIN_MATCH equ 3 -MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1) -MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h) - - -;;; stack frame offsets - -chainlenwmask equ esp + 0 ; high word: current chain len - ; low word: s->wmask -window equ esp + 4 ; local copy of s->window -windowbestlen equ esp + 8 ; s->window + bestlen -scanstart equ esp + 16 ; first two bytes of string -scanend equ esp + 12 ; last two bytes of string -scanalign equ esp + 20 ; dword-misalignment of string -nicematch equ esp + 24 ; a good enough match size -bestlen equ esp + 28 ; size of best match so far -scan equ esp + 32 ; ptr to string wanting match - -LocalVarsSize equ 36 -; saved ebx byte esp + 36 -; saved edi byte esp + 40 -; saved esi byte esp + 44 -; saved ebp byte esp + 48 -; return address byte esp + 52 -deflatestate equ esp + 56 ; the function arguments -curmatch equ esp + 60 - -;;; Offsets for fields in the deflate_state structure. These numbers -;;; are calculated from the definition of deflate_state, with the -;;; assumption that the compiler will dword-align the fields. (Thus, -;;; changing the definition of deflate_state could easily cause this -;;; program to crash horribly, without so much as a warning at -;;; compile time. Sigh.) - -dsWSize equ 36+zlib1222add -dsWMask equ 44+zlib1222add -dsWindow equ 48+zlib1222add -dsPrev equ 56+zlib1222add -dsMatchLen equ 88+zlib1222add -dsPrevMatch equ 92+zlib1222add -dsStrStart equ 100+zlib1222add -dsMatchStart equ 104+zlib1222add -dsLookahead equ 108+zlib1222add -dsPrevLen equ 112+zlib1222add -dsMaxChainLen equ 116+zlib1222add -dsGoodMatch equ 132+zlib1222add -dsNiceMatch equ 136+zlib1222add - - -;;; match686.asm -- Pentium-Pro-optimized version of longest_match() -;;; Written for zlib 1.1.2 -;;; Copyright (C) 1998 Brian Raiter -;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html -;;; -;; -;; This software is provided 'as-is', without any express or implied -;; warranty. In no event will the authors be held liable for any damages -;; arising from the use of this software. -;; -;; Permission is granted to anyone to use this software for any purpose, -;; including commercial applications, and to alter it and redistribute it -;; freely, subject to the following restrictions: -;; -;; 1. The origin of this software must not be misrepresented; you must not -;; claim that you wrote the original software. If you use this software -;; in a product, an acknowledgment in the product documentation would be -;; appreciated but is not required. -;; 2. Altered source versions must be plainly marked as such, and must not be -;; misrepresented as being the original software -;; 3. This notice may not be removed or altered from any source distribution. -;; - -;GLOBAL _longest_match, _match_init - - -;SECTION .text - -;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch) - -;_longest_match: - IFDEF NOUNDERLINE - longest_match proc near - ELSE - _longest_match proc near - ENDIF - -;;; Save registers that the compiler may be using, and adjust esp to -;;; make room for our stack frame. - - push ebp - push edi - push esi - push ebx - sub esp, LocalVarsSize - -;;; Retrieve the function arguments. ecx will hold cur_match -;;; throughout the entire function. edx will hold the pointer to the -;;; deflate_state structure during the function's setup (before -;;; entering the main loop. - - mov edx, [deflatestate] - mov ecx, [curmatch] - -;;; uInt wmask = s->w_mask; -;;; unsigned chain_length = s->max_chain_length; -;;; if (s->prev_length >= s->good_match) { -;;; chain_length >>= 2; -;;; } - - mov eax, [edx + dsPrevLen] - mov ebx, [edx + dsGoodMatch] - cmp eax, ebx - mov eax, [edx + dsWMask] - mov ebx, [edx + dsMaxChainLen] - jl LastMatchGood - shr ebx, 2 -LastMatchGood: - -;;; chainlen is decremented once beforehand so that the function can -;;; use the sign flag instead of the zero flag for the exit test. -;;; It is then shifted into the high word, to make room for the wmask -;;; value, which it will always accompany. - - dec ebx - shl ebx, 16 - or ebx, eax - mov [chainlenwmask], ebx - -;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; - - mov eax, [edx + dsNiceMatch] - mov ebx, [edx + dsLookahead] - cmp ebx, eax - jl LookaheadLess - mov ebx, eax -LookaheadLess: mov [nicematch], ebx - -;;; register Bytef *scan = s->window + s->strstart; - - mov esi, [edx + dsWindow] - mov [window], esi - mov ebp, [edx + dsStrStart] - lea edi, [esi + ebp] - mov [scan], edi - -;;; Determine how many bytes the scan ptr is off from being -;;; dword-aligned. - - mov eax, edi - neg eax - and eax, 3 - mov [scanalign], eax - -;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? -;;; s->strstart - (IPos)MAX_DIST(s) : NIL; - - mov eax, [edx + dsWSize] - sub eax, MIN_LOOKAHEAD - sub ebp, eax - jg LimitPositive - xor ebp, ebp -LimitPositive: - -;;; int best_len = s->prev_length; - - mov eax, [edx + dsPrevLen] - mov [bestlen], eax - -;;; Store the sum of s->window + best_len in esi locally, and in esi. - - add esi, eax - mov [windowbestlen], esi - -;;; register ush scan_start = *(ushf*)scan; -;;; register ush scan_end = *(ushf*)(scan+best_len-1); -;;; Posf *prev = s->prev; - - movzx ebx, word ptr [edi] - mov [scanstart], ebx - movzx ebx, word ptr [edi + eax - 1] - mov [scanend], ebx - mov edi, [edx + dsPrev] - -;;; Jump into the main loop. - - mov edx, [chainlenwmask] - jmp short LoopEntry - -align 4 - -;;; do { -;;; match = s->window + cur_match; -;;; if (*(ushf*)(match+best_len-1) != scan_end || -;;; *(ushf*)match != scan_start) continue; -;;; [...] -;;; } while ((cur_match = prev[cur_match & wmask]) > limit -;;; && --chain_length != 0); -;;; -;;; Here is the inner loop of the function. The function will spend the -;;; majority of its time in this loop, and majority of that time will -;;; be spent in the first ten instructions. -;;; -;;; Within this loop: -;;; ebx = scanend -;;; ecx = curmatch -;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) -;;; esi = windowbestlen - i.e., (window + bestlen) -;;; edi = prev -;;; ebp = limit - -LookupLoop: - and ecx, edx - movzx ecx, word ptr [edi + ecx*2] - cmp ecx, ebp - jbe LeaveNow - sub edx, 00010000h - js LeaveNow -LoopEntry: movzx eax, word ptr [esi + ecx - 1] - cmp eax, ebx - jnz LookupLoop - mov eax, [window] - movzx eax, word ptr [eax + ecx] - cmp eax, [scanstart] - jnz LookupLoop - -;;; Store the current value of chainlen. - - mov [chainlenwmask], edx - -;;; Point edi to the string under scrutiny, and esi to the string we -;;; are hoping to match it up with. In actuality, esi and edi are -;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is -;;; initialized to -(MAX_MATCH_8 - scanalign). - - mov esi, [window] - mov edi, [scan] - add esi, ecx - mov eax, [scanalign] - mov edx, 0fffffef8h; -(MAX_MATCH_8) - lea edi, [edi + eax + 0108h] ;MAX_MATCH_8] - lea esi, [esi + eax + 0108h] ;MAX_MATCH_8] - -;;; Test the strings for equality, 8 bytes at a time. At the end, -;;; adjust edx so that it is offset to the exact byte that mismatched. -;;; -;;; We already know at this point that the first three bytes of the -;;; strings match each other, and they can be safely passed over before -;;; starting the compare loop. So what this code does is skip over 0-3 -;;; bytes, as much as necessary in order to dword-align the edi -;;; pointer. (esi will still be misaligned three times out of four.) -;;; -;;; It should be confessed that this loop usually does not represent -;;; much of the total running time. Replacing it with a more -;;; straightforward "rep cmpsb" would not drastically degrade -;;; performance. - -LoopCmps: - mov eax, [esi + edx] - xor eax, [edi + edx] - jnz LeaveLoopCmps - mov eax, [esi + edx + 4] - xor eax, [edi + edx + 4] - jnz LeaveLoopCmps4 - add edx, 8 - jnz LoopCmps - jmp short LenMaximum -LeaveLoopCmps4: add edx, 4 -LeaveLoopCmps: test eax, 0000FFFFh - jnz LenLower - add edx, 2 - shr eax, 16 -LenLower: sub al, 1 - adc edx, 0 - -;;; Calculate the length of the match. If it is longer than MAX_MATCH, -;;; then automatically accept it as the best possible match and leave. - - lea eax, [edi + edx] - mov edi, [scan] - sub eax, edi - cmp eax, MAX_MATCH - jge LenMaximum - -;;; If the length of the match is not longer than the best match we -;;; have so far, then forget it and return to the lookup loop. - - mov edx, [deflatestate] - mov ebx, [bestlen] - cmp eax, ebx - jg LongerMatch - mov esi, [windowbestlen] - mov edi, [edx + dsPrev] - mov ebx, [scanend] - mov edx, [chainlenwmask] - jmp LookupLoop - -;;; s->match_start = cur_match; -;;; best_len = len; -;;; if (len >= nice_match) break; -;;; scan_end = *(ushf*)(scan+best_len-1); - -LongerMatch: mov ebx, [nicematch] - mov [bestlen], eax - mov [edx + dsMatchStart], ecx - cmp eax, ebx - jge LeaveNow - mov esi, [window] - add esi, eax - mov [windowbestlen], esi - movzx ebx, word ptr [edi + eax - 1] - mov edi, [edx + dsPrev] - mov [scanend], ebx - mov edx, [chainlenwmask] - jmp LookupLoop - -;;; Accept the current string, with the maximum possible length. - -LenMaximum: mov edx, [deflatestate] - mov dword ptr [bestlen], MAX_MATCH - mov [edx + dsMatchStart], ecx - -;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; -;;; return s->lookahead; - -LeaveNow: - mov edx, [deflatestate] - mov ebx, [bestlen] - mov eax, [edx + dsLookahead] - cmp ebx, eax - jg LookaheadRet - mov eax, ebx -LookaheadRet: - -;;; Restore the stack and return from whence we came. - - add esp, LocalVarsSize - pop ebx - pop esi - pop edi - pop ebp - - ret -; please don't remove this string ! -; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary! - db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah - - - IFDEF NOUNDERLINE - longest_match endp - ELSE - _longest_match endp - ENDIF - - IFDEF NOUNDERLINE - match_init proc near - ret - match_init endp - ELSE - _match_init proc near - ret - _match_init endp - ENDIF - - -_TEXT ends -end +; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86 +; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant. +; File written by Gilles Vollant, by converting match686.S from Brian Raiter +; for MASM. This is as assembly version of longest_match +; from Jean-loup Gailly in deflate.c +; +; http://www.zlib.net +; http://www.winimage.com/zLibDll +; http://www.muppetlabs.com/~breadbox/software/assembly.html +; +; For Visual C++ 4.x and higher and ML 6.x and higher +; ml.exe is distributed in +; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 +; +; this file contain two implementation of longest_match +; +; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro +; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom) +; +; for using an assembly version of longest_match, you need define ASMV in project +; +; compile the asm file running +; ml /coff /Zi /c /Flmatch686.lst match686.asm +; and do not include match686.obj in your project +; +; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for +; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor +; with autoselect (with cpu detection code) +; if you want support the old pentium optimization, you can still use these version +; +; this file is not optimized for old pentium, but it compatible with all x86 32 bits +; processor (starting 80386) +; +; +; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2 + +;uInt longest_match(s, cur_match) +; deflate_state *s; +; IPos cur_match; /* current match */ + + NbStack equ 76 + cur_match equ dword ptr[esp+NbStack-0] + str_s equ dword ptr[esp+NbStack-4] +; 5 dword on top (ret,ebp,esi,edi,ebx) + adrret equ dword ptr[esp+NbStack-8] + pushebp equ dword ptr[esp+NbStack-12] + pushedi equ dword ptr[esp+NbStack-16] + pushesi equ dword ptr[esp+NbStack-20] + pushebx equ dword ptr[esp+NbStack-24] + + chain_length equ dword ptr [esp+NbStack-28] + limit equ dword ptr [esp+NbStack-32] + best_len equ dword ptr [esp+NbStack-36] + window equ dword ptr [esp+NbStack-40] + prev equ dword ptr [esp+NbStack-44] + scan_start equ word ptr [esp+NbStack-48] + wmask equ dword ptr [esp+NbStack-52] + match_start_ptr equ dword ptr [esp+NbStack-56] + nice_match equ dword ptr [esp+NbStack-60] + scan equ dword ptr [esp+NbStack-64] + + windowlen equ dword ptr [esp+NbStack-68] + match_start equ dword ptr [esp+NbStack-72] + strend equ dword ptr [esp+NbStack-76] + NbStackAdd equ (NbStack-24) + + .386p + + name gvmatch + .MODEL FLAT + + + +; all the +zlib1222add offsets are due to the addition of fields +; in zlib in the deflate_state structure since the asm code was first written +; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)"). +; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0"). +; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8"). + + zlib1222add equ 8 + +; Note : these value are good with a 8 bytes boundary pack structure + dep_chain_length equ 74h+zlib1222add + dep_window equ 30h+zlib1222add + dep_strstart equ 64h+zlib1222add + dep_prev_length equ 70h+zlib1222add + dep_nice_match equ 88h+zlib1222add + dep_w_size equ 24h+zlib1222add + dep_prev equ 38h+zlib1222add + dep_w_mask equ 2ch+zlib1222add + dep_good_match equ 84h+zlib1222add + dep_match_start equ 68h+zlib1222add + dep_lookahead equ 6ch+zlib1222add + + +_TEXT segment + +IFDEF NOUNDERLINE + public longest_match + public match_init +ELSE + public _longest_match + public _match_init +ENDIF + + MAX_MATCH equ 258 + MIN_MATCH equ 3 + MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) + + + +MAX_MATCH equ 258 +MIN_MATCH equ 3 +MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1) +MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h) + + +;;; stack frame offsets + +chainlenwmask equ esp + 0 ; high word: current chain len + ; low word: s->wmask +window equ esp + 4 ; local copy of s->window +windowbestlen equ esp + 8 ; s->window + bestlen +scanstart equ esp + 16 ; first two bytes of string +scanend equ esp + 12 ; last two bytes of string +scanalign equ esp + 20 ; dword-misalignment of string +nicematch equ esp + 24 ; a good enough match size +bestlen equ esp + 28 ; size of best match so far +scan equ esp + 32 ; ptr to string wanting match + +LocalVarsSize equ 36 +; saved ebx byte esp + 36 +; saved edi byte esp + 40 +; saved esi byte esp + 44 +; saved ebp byte esp + 48 +; return address byte esp + 52 +deflatestate equ esp + 56 ; the function arguments +curmatch equ esp + 60 + +;;; Offsets for fields in the deflate_state structure. These numbers +;;; are calculated from the definition of deflate_state, with the +;;; assumption that the compiler will dword-align the fields. (Thus, +;;; changing the definition of deflate_state could easily cause this +;;; program to crash horribly, without so much as a warning at +;;; compile time. Sigh.) + +dsWSize equ 36+zlib1222add +dsWMask equ 44+zlib1222add +dsWindow equ 48+zlib1222add +dsPrev equ 56+zlib1222add +dsMatchLen equ 88+zlib1222add +dsPrevMatch equ 92+zlib1222add +dsStrStart equ 100+zlib1222add +dsMatchStart equ 104+zlib1222add +dsLookahead equ 108+zlib1222add +dsPrevLen equ 112+zlib1222add +dsMaxChainLen equ 116+zlib1222add +dsGoodMatch equ 132+zlib1222add +dsNiceMatch equ 136+zlib1222add + + +;;; match686.asm -- Pentium-Pro-optimized version of longest_match() +;;; Written for zlib 1.1.2 +;;; Copyright (C) 1998 Brian Raiter +;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html +;;; +;; +;; This software is provided 'as-is', without any express or implied +;; warranty. In no event will the authors be held liable for any damages +;; arising from the use of this software. +;; +;; Permission is granted to anyone to use this software for any purpose, +;; including commercial applications, and to alter it and redistribute it +;; freely, subject to the following restrictions: +;; +;; 1. The origin of this software must not be misrepresented; you must not +;; claim that you wrote the original software. If you use this software +;; in a product, an acknowledgment in the product documentation would be +;; appreciated but is not required. +;; 2. Altered source versions must be plainly marked as such, and must not be +;; misrepresented as being the original software +;; 3. This notice may not be removed or altered from any source distribution. +;; + +;GLOBAL _longest_match, _match_init + + +;SECTION .text + +;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch) + +;_longest_match: + IFDEF NOUNDERLINE + longest_match proc near + ELSE + _longest_match proc near + ENDIF + +;;; Save registers that the compiler may be using, and adjust esp to +;;; make room for our stack frame. + + push ebp + push edi + push esi + push ebx + sub esp, LocalVarsSize + +;;; Retrieve the function arguments. ecx will hold cur_match +;;; throughout the entire function. edx will hold the pointer to the +;;; deflate_state structure during the function's setup (before +;;; entering the main loop. + + mov edx, [deflatestate] + mov ecx, [curmatch] + +;;; uInt wmask = s->w_mask; +;;; unsigned chain_length = s->max_chain_length; +;;; if (s->prev_length >= s->good_match) { +;;; chain_length >>= 2; +;;; } + + mov eax, [edx + dsPrevLen] + mov ebx, [edx + dsGoodMatch] + cmp eax, ebx + mov eax, [edx + dsWMask] + mov ebx, [edx + dsMaxChainLen] + jl LastMatchGood + shr ebx, 2 +LastMatchGood: + +;;; chainlen is decremented once beforehand so that the function can +;;; use the sign flag instead of the zero flag for the exit test. +;;; It is then shifted into the high word, to make room for the wmask +;;; value, which it will always accompany. + + dec ebx + shl ebx, 16 + or ebx, eax + mov [chainlenwmask], ebx + +;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + + mov eax, [edx + dsNiceMatch] + mov ebx, [edx + dsLookahead] + cmp ebx, eax + jl LookaheadLess + mov ebx, eax +LookaheadLess: mov [nicematch], ebx + +;;; register Bytef *scan = s->window + s->strstart; + + mov esi, [edx + dsWindow] + mov [window], esi + mov ebp, [edx + dsStrStart] + lea edi, [esi + ebp] + mov [scan], edi + +;;; Determine how many bytes the scan ptr is off from being +;;; dword-aligned. + + mov eax, edi + neg eax + and eax, 3 + mov [scanalign], eax + +;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? +;;; s->strstart - (IPos)MAX_DIST(s) : NIL; + + mov eax, [edx + dsWSize] + sub eax, MIN_LOOKAHEAD + sub ebp, eax + jg LimitPositive + xor ebp, ebp +LimitPositive: + +;;; int best_len = s->prev_length; + + mov eax, [edx + dsPrevLen] + mov [bestlen], eax + +;;; Store the sum of s->window + best_len in esi locally, and in esi. + + add esi, eax + mov [windowbestlen], esi + +;;; register ush scan_start = *(ushf*)scan; +;;; register ush scan_end = *(ushf*)(scan+best_len-1); +;;; Posf *prev = s->prev; + + movzx ebx, word ptr [edi] + mov [scanstart], ebx + movzx ebx, word ptr [edi + eax - 1] + mov [scanend], ebx + mov edi, [edx + dsPrev] + +;;; Jump into the main loop. + + mov edx, [chainlenwmask] + jmp short LoopEntry + +align 4 + +;;; do { +;;; match = s->window + cur_match; +;;; if (*(ushf*)(match+best_len-1) != scan_end || +;;; *(ushf*)match != scan_start) continue; +;;; [...] +;;; } while ((cur_match = prev[cur_match & wmask]) > limit +;;; && --chain_length != 0); +;;; +;;; Here is the inner loop of the function. The function will spend the +;;; majority of its time in this loop, and majority of that time will +;;; be spent in the first ten instructions. +;;; +;;; Within this loop: +;;; ebx = scanend +;;; ecx = curmatch +;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask) +;;; esi = windowbestlen - i.e., (window + bestlen) +;;; edi = prev +;;; ebp = limit + +LookupLoop: + and ecx, edx + movzx ecx, word ptr [edi + ecx*2] + cmp ecx, ebp + jbe LeaveNow + sub edx, 00010000h + js LeaveNow +LoopEntry: movzx eax, word ptr [esi + ecx - 1] + cmp eax, ebx + jnz LookupLoop + mov eax, [window] + movzx eax, word ptr [eax + ecx] + cmp eax, [scanstart] + jnz LookupLoop + +;;; Store the current value of chainlen. + + mov [chainlenwmask], edx + +;;; Point edi to the string under scrutiny, and esi to the string we +;;; are hoping to match it up with. In actuality, esi and edi are +;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is +;;; initialized to -(MAX_MATCH_8 - scanalign). + + mov esi, [window] + mov edi, [scan] + add esi, ecx + mov eax, [scanalign] + mov edx, 0fffffef8h; -(MAX_MATCH_8) + lea edi, [edi + eax + 0108h] ;MAX_MATCH_8] + lea esi, [esi + eax + 0108h] ;MAX_MATCH_8] + +;;; Test the strings for equality, 8 bytes at a time. At the end, +;;; adjust edx so that it is offset to the exact byte that mismatched. +;;; +;;; We already know at this point that the first three bytes of the +;;; strings match each other, and they can be safely passed over before +;;; starting the compare loop. So what this code does is skip over 0-3 +;;; bytes, as much as necessary in order to dword-align the edi +;;; pointer. (esi will still be misaligned three times out of four.) +;;; +;;; It should be confessed that this loop usually does not represent +;;; much of the total running time. Replacing it with a more +;;; straightforward "rep cmpsb" would not drastically degrade +;;; performance. + +LoopCmps: + mov eax, [esi + edx] + xor eax, [edi + edx] + jnz LeaveLoopCmps + mov eax, [esi + edx + 4] + xor eax, [edi + edx + 4] + jnz LeaveLoopCmps4 + add edx, 8 + jnz LoopCmps + jmp short LenMaximum +LeaveLoopCmps4: add edx, 4 +LeaveLoopCmps: test eax, 0000FFFFh + jnz LenLower + add edx, 2 + shr eax, 16 +LenLower: sub al, 1 + adc edx, 0 + +;;; Calculate the length of the match. If it is longer than MAX_MATCH, +;;; then automatically accept it as the best possible match and leave. + + lea eax, [edi + edx] + mov edi, [scan] + sub eax, edi + cmp eax, MAX_MATCH + jge LenMaximum + +;;; If the length of the match is not longer than the best match we +;;; have so far, then forget it and return to the lookup loop. + + mov edx, [deflatestate] + mov ebx, [bestlen] + cmp eax, ebx + jg LongerMatch + mov esi, [windowbestlen] + mov edi, [edx + dsPrev] + mov ebx, [scanend] + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; s->match_start = cur_match; +;;; best_len = len; +;;; if (len >= nice_match) break; +;;; scan_end = *(ushf*)(scan+best_len-1); + +LongerMatch: mov ebx, [nicematch] + mov [bestlen], eax + mov [edx + dsMatchStart], ecx + cmp eax, ebx + jge LeaveNow + mov esi, [window] + add esi, eax + mov [windowbestlen], esi + movzx ebx, word ptr [edi + eax - 1] + mov edi, [edx + dsPrev] + mov [scanend], ebx + mov edx, [chainlenwmask] + jmp LookupLoop + +;;; Accept the current string, with the maximum possible length. + +LenMaximum: mov edx, [deflatestate] + mov dword ptr [bestlen], MAX_MATCH + mov [edx + dsMatchStart], ecx + +;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len; +;;; return s->lookahead; + +LeaveNow: + mov edx, [deflatestate] + mov ebx, [bestlen] + mov eax, [edx + dsLookahead] + cmp ebx, eax + jg LookaheadRet + mov eax, ebx +LookaheadRet: + +;;; Restore the stack and return from whence we came. + + add esp, LocalVarsSize + pop ebx + pop esi + pop edi + pop ebp + + ret +; please don't remove this string ! +; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary! + db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah + + + IFDEF NOUNDERLINE + longest_match endp + ELSE + _longest_match endp + ENDIF + + IFDEF NOUNDERLINE + match_init proc near + ret + match_init endp + ELSE + _match_init proc near + ret + _match_init endp + ENDIF + + +_TEXT ends +end diff --git a/compat/zlib/contrib/masmx86/readme.txt b/compat/zlib/contrib/masmx86/readme.txt index 3f88886..3271f72 100644 --- a/compat/zlib/contrib/masmx86/readme.txt +++ b/compat/zlib/contrib/masmx86/readme.txt @@ -1,27 +1,27 @@ - -Summary -------- -This directory contains ASM implementations of the functions -longest_match() and inflate_fast(). - - -Use instructions ----------------- -Assemble using MASM, and copy the object files into the zlib source -directory, then run the appropriate makefile, as suggested below. You can -donwload MASM from here: - - http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 - -You can also get objects files here: - - http://www.winimage.com/zLibDll/zlib124_masm_obj.zip - -Build instructions ------------------- -* With Microsoft C and MASM: -nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" - -* With Borland C and TASM: -make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" - + +Summary +------- +This directory contains ASM implementations of the functions +longest_match() and inflate_fast(). + + +Use instructions +---------------- +Assemble using MASM, and copy the object files into the zlib source +directory, then run the appropriate makefile, as suggested below. You can +donwload MASM from here: + + http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 + +You can also get objects files here: + + http://www.winimage.com/zLibDll/zlib124_masm_obj.zip + +Build instructions +------------------ +* With Microsoft C and MASM: +nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" + +* With Borland C and TASM: +make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" + diff --git a/compat/zlib/contrib/pascal/zlibpas.pas b/compat/zlib/contrib/pascal/zlibpas.pas index dc7d37d..637ae3a 100644 --- a/compat/zlib/contrib/pascal/zlibpas.pas +++ b/compat/zlib/contrib/pascal/zlibpas.pas @@ -10,7 +10,7 @@ unit zlibpas; interface const - ZLIB_VERSION = '1.2.4'; + ZLIB_VERSION = '1.2.5'; type alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; diff --git a/compat/zlib/contrib/puff/puff.c b/compat/zlib/contrib/puff/puff.c index df5b79f..650694e 100644 --- a/compat/zlib/contrib/puff/puff.c +++ b/compat/zlib/contrib/puff/puff.c @@ -1,8 +1,8 @@ /* * puff.c - * Copyright (C) 2002-2008 Mark Adler + * Copyright (C) 2002-2010 Mark Adler * For conditions of distribution and use, see copyright notice in puff.h - * version 2.0, 25 Jul 2008 + * version 2.1, 4 Apr 2010 * * puff.c is a simple inflate written to be an unambiguous way to specify the * deflate format. It is not written for speed but rather simplicity. As a @@ -67,6 +67,8 @@ * - Add option in TEST code for puff to write the data * - Add option in TEST code to skip input bytes * - Allow TEST code to read from piped stdin + * 2.1 4 Apr 2010 - Avoid variable initialization for happier compilers + * - Avoid unsigned comparisons for even happier compilers */ #include /* for setjmp(), longjmp(), and jmp_buf */ @@ -516,8 +518,7 @@ local int fixed(struct state *s) static int virgin = 1; static short lencnt[MAXBITS+1], lensym[FIXLCODES]; static short distcnt[MAXBITS+1], distsym[MAXDCODES]; - static struct huffman lencode = {lencnt, lensym}; - static struct huffman distcode = {distcnt, distsym}; + static struct huffman lencode, distcode; /* build fixed huffman tables if first call (may not be thread safe) */ if (virgin) { @@ -540,6 +541,12 @@ local int fixed(struct state *s) lengths[symbol] = 5; construct(&distcode, lengths, MAXDCODES); + /* construct lencode and distcode */ + lencode.count = lencnt; + lencode.symbol = lensym; + distcode.count = distcnt; + distcode.symbol = distsym; + /* do this just once */ virgin = 0; } @@ -643,11 +650,16 @@ local int dynamic(struct state *s) short lengths[MAXCODES]; /* descriptor code lengths */ short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */ short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */ - struct huffman lencode = {lencnt, lensym}; /* length code */ - struct huffman distcode = {distcnt, distsym}; /* distance code */ + struct huffman lencode, distcode; /* length and distance codes */ static const short order[19] = /* permutation of code length codes */ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + /* construct lencode and distcode */ + lencode.count = lencnt; + lencode.symbol = lensym; + distcode.count = distcnt; + distcode.symbol = distsym; + /* get number of lengths in each table, check lengths */ nlen = bits(s, 5) + 257; ndist = bits(s, 5) + 1; @@ -869,7 +881,8 @@ local void *load(char *name, size_t *len) int main(int argc, char **argv) { - int ret, skip = 0, put = 0; + int ret, put = 0; + unsigned skip = 0; char *arg, *name = NULL; unsigned char *source = NULL, *dest; size_t len = 0; @@ -881,7 +894,7 @@ int main(int argc, char **argv) if (arg[1] == 'w' && arg[2] == 0) put = 1; else if (arg[1] >= '0' && arg[1] <= '9') - skip = atoi(arg + 1); + skip = (unsigned)atoi(arg + 1); else { fprintf(stderr, "invalid option %s\n", arg); return 3; diff --git a/compat/zlib/contrib/puff/puff.h b/compat/zlib/contrib/puff/puff.h index 8d7f5f8..88d1b38 100644 --- a/compat/zlib/contrib/puff/puff.h +++ b/compat/zlib/contrib/puff/puff.h @@ -1,6 +1,6 @@ /* puff.h - Copyright (C) 2002-2008 Mark Adler, all rights reserved - version 1.9, 10 Jan 2008 + Copyright (C) 2002-2010 Mark Adler, all rights reserved + version 2.1, 4 Apr 2010 This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages diff --git a/compat/zlib/contrib/testzlib/testzlib.c b/compat/zlib/contrib/testzlib/testzlib.c index f559a36..135888e 100644 --- a/compat/zlib/contrib/testzlib/testzlib.c +++ b/compat/zlib/contrib/testzlib/testzlib.c @@ -1,275 +1,275 @@ -#include -#include -#include - -#include "zlib.h" - - -void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B) -{ - R->HighPart = A.HighPart - B.HighPart; - if (A.LowPart >= B.LowPart) - R->LowPart = A.LowPart - B.LowPart; - else - { - R->LowPart = A.LowPart - B.LowPart; - R->HighPart --; - } -} - -#ifdef _M_X64 -// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc -unsigned __int64 __rdtsc(void); -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ - // printf("rdtsc = %I64x\n",__rdtsc()); - pbeginTime64->QuadPart=__rdtsc(); -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER LIres; - unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart)); - LIres.QuadPart=res; - // printf("rdtsc = %I64x\n",__rdtsc()); - return LIres; -} -#else -#ifdef _M_IX86 -void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) -{ - DWORD dwEdx,dwEax; - _asm - { - rdtsc - mov dwEax,eax - mov dwEdx,edx - } - pbeginTime64->LowPart=dwEax; - pbeginTime64->HighPart=dwEdx; -} - -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ - myGetRDTSC32(pbeginTime64); -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER LIres,endTime64; - myGetRDTSC32(&endTime64); - - LIres.LowPart=LIres.HighPart=0; - MyDoMinus64(&LIres,endTime64,beginTime64); - return LIres; -} -#else -void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) -{ -} - -void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) -{ -} - -LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER lr; - lr.QuadPart=0; - return lr; -} -#endif -#endif - -void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf) -{ - if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64))) - { - pbeginTime64->LowPart = GetTickCount(); - pbeginTime64->HighPart = 0; - } -} - -DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) -{ - LARGE_INTEGER endTime64,ticksPerSecond,ticks; - DWORDLONG ticksShifted,tickSecShifted; - DWORD dwLog=16+0; - DWORD dwRet; - if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64))) - dwRet = (GetTickCount() - beginTime64.LowPart)*1; - else - { - MyDoMinus64(&ticks,endTime64,beginTime64); - QueryPerformanceFrequency(&ticksPerSecond); - - - { - ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog); - tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog); - - } - - dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted)); - dwRet *=1; - } - return dwRet; -} - -int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr) -{ - FILE* stream; - void* ptr; - int retVal=1; - stream=fopen(filename, "rb"); - if (stream==NULL) - return 0; - - fseek(stream,0,SEEK_END); - - *plFileSize=ftell(stream); - fseek(stream,0,SEEK_SET); - ptr=malloc((*plFileSize)+1); - if (ptr==NULL) - retVal=0; - else - { - if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize)) - retVal=0; - } - fclose(stream); - *pFilePtr=ptr; - return retVal; -} - -int main(int argc, char *argv[]) -{ - int BlockSizeCompress=0x8000; - int BlockSizeUncompress=0x8000; - int cprLevel=Z_DEFAULT_COMPRESSION ; - long lFileSize; - unsigned char* FilePtr; - long lBufferSizeCpr; - long lBufferSizeUncpr; - long lCompressedSize=0; - unsigned char* CprPtr; - unsigned char* UncprPtr; - long lSizeCpr,lSizeUncpr; - DWORD dwGetTick,dwMsecQP; - LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc; - - if (argc<=1) - { - printf("run TestZlib [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n"); - return 0; - } - - if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0) - { - printf("error reading %s\n",argv[1]); - return 1; - } - else printf("file %s read, %u bytes\n",argv[1],lFileSize); - - if (argc>=3) - BlockSizeCompress=atol(argv[2]); - - if (argc>=4) - BlockSizeUncompress=atol(argv[3]); - - if (argc>=5) - cprLevel=(int)atol(argv[4]); - - lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200; - lBufferSizeUncpr = lBufferSizeCpr; - - CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress); - - BeginCountPerfCounter(&li_qp,TRUE); - dwGetTick=GetTickCount(); - BeginCountRdtsc(&li_rdtsc); - { - z_stream zcpr; - int ret=Z_OK; - long lOrigToDo = lFileSize; - long lOrigDone = 0; - int step=0; - memset(&zcpr,0,sizeof(z_stream)); - deflateInit(&zcpr,cprLevel); - - zcpr.next_in = FilePtr; - zcpr.next_out = CprPtr; - - - do - { - long all_read_before = zcpr.total_in; - zcpr.avail_in = min(lOrigToDo,BlockSizeCompress); - zcpr.avail_out = BlockSizeCompress; - ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH); - lOrigDone += (zcpr.total_in-all_read_before); - lOrigToDo -= (zcpr.total_in-all_read_before); - step++; - } while (ret==Z_OK); - - lSizeCpr=zcpr.total_out; - deflateEnd(&zcpr); - dwGetTick=GetTickCount()-dwGetTick; - dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); - dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); - printf("total compress size = %u, in %u step\n",lSizeCpr,step); - printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); - printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); - printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); - } - - CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr); - UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress); - - BeginCountPerfCounter(&li_qp,TRUE); - dwGetTick=GetTickCount(); - BeginCountRdtsc(&li_rdtsc); - { - z_stream zcpr; - int ret=Z_OK; - long lOrigToDo = lSizeCpr; - long lOrigDone = 0; - int step=0; - memset(&zcpr,0,sizeof(z_stream)); - inflateInit(&zcpr); - - zcpr.next_in = CprPtr; - zcpr.next_out = UncprPtr; - - - do - { - long all_read_before = zcpr.total_in; - zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress); - zcpr.avail_out = BlockSizeUncompress; - ret=inflate(&zcpr,Z_SYNC_FLUSH); - lOrigDone += (zcpr.total_in-all_read_before); - lOrigToDo -= (zcpr.total_in-all_read_before); - step++; - } while (ret==Z_OK); - - lSizeUncpr=zcpr.total_out; - inflateEnd(&zcpr); - dwGetTick=GetTickCount()-dwGetTick; - dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); - dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); - printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step); - printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); - printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); - printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); - } - - if (lSizeUncpr==lFileSize) - { - if (memcmp(FilePtr,UncprPtr,lFileSize)==0) - printf("compare ok\n"); - - } - - return 0; -} +#include +#include +#include + +#include "zlib.h" + + +void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B) +{ + R->HighPart = A.HighPart - B.HighPart; + if (A.LowPart >= B.LowPart) + R->LowPart = A.LowPart - B.LowPart; + else + { + R->LowPart = A.LowPart - B.LowPart; + R->HighPart --; + } +} + +#ifdef _M_X64 +// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc +unsigned __int64 __rdtsc(void); +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + // printf("rdtsc = %I64x\n",__rdtsc()); + pbeginTime64->QuadPart=__rdtsc(); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres; + unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart)); + LIres.QuadPart=res; + // printf("rdtsc = %I64x\n",__rdtsc()); + return LIres; +} +#else +#ifdef _M_IX86 +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ + DWORD dwEdx,dwEax; + _asm + { + rdtsc + mov dwEax,eax + mov dwEdx,edx + } + pbeginTime64->LowPart=dwEax; + pbeginTime64->HighPart=dwEdx; +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ + myGetRDTSC32(pbeginTime64); +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER LIres,endTime64; + myGetRDTSC32(&endTime64); + + LIres.LowPart=LIres.HighPart=0; + MyDoMinus64(&LIres,endTime64,beginTime64); + return LIres; +} +#else +void myGetRDTSC32(LARGE_INTEGER * pbeginTime64) +{ +} + +void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64) +{ +} + +LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER lr; + lr.QuadPart=0; + return lr; +} +#endif +#endif + +void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf) +{ + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64))) + { + pbeginTime64->LowPart = GetTickCount(); + pbeginTime64->HighPart = 0; + } +} + +DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf) +{ + LARGE_INTEGER endTime64,ticksPerSecond,ticks; + DWORDLONG ticksShifted,tickSecShifted; + DWORD dwLog=16+0; + DWORD dwRet; + if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64))) + dwRet = (GetTickCount() - beginTime64.LowPart)*1; + else + { + MyDoMinus64(&ticks,endTime64,beginTime64); + QueryPerformanceFrequency(&ticksPerSecond); + + + { + ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog); + tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog); + + } + + dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted)); + dwRet *=1; + } + return dwRet; +} + +int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr) +{ + FILE* stream; + void* ptr; + int retVal=1; + stream=fopen(filename, "rb"); + if (stream==NULL) + return 0; + + fseek(stream,0,SEEK_END); + + *plFileSize=ftell(stream); + fseek(stream,0,SEEK_SET); + ptr=malloc((*plFileSize)+1); + if (ptr==NULL) + retVal=0; + else + { + if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize)) + retVal=0; + } + fclose(stream); + *pFilePtr=ptr; + return retVal; +} + +int main(int argc, char *argv[]) +{ + int BlockSizeCompress=0x8000; + int BlockSizeUncompress=0x8000; + int cprLevel=Z_DEFAULT_COMPRESSION ; + long lFileSize; + unsigned char* FilePtr; + long lBufferSizeCpr; + long lBufferSizeUncpr; + long lCompressedSize=0; + unsigned char* CprPtr; + unsigned char* UncprPtr; + long lSizeCpr,lSizeUncpr; + DWORD dwGetTick,dwMsecQP; + LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc; + + if (argc<=1) + { + printf("run TestZlib [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n"); + return 0; + } + + if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0) + { + printf("error reading %s\n",argv[1]); + return 1; + } + else printf("file %s read, %u bytes\n",argv[1],lFileSize); + + if (argc>=3) + BlockSizeCompress=atol(argv[2]); + + if (argc>=4) + BlockSizeUncompress=atol(argv[3]); + + if (argc>=5) + cprLevel=(int)atol(argv[4]); + + lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200; + lBufferSizeUncpr = lBufferSizeCpr; + + CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lFileSize; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + deflateInit(&zcpr,cprLevel); + + zcpr.next_in = FilePtr; + zcpr.next_out = CprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeCompress); + zcpr.avail_out = BlockSizeCompress; + ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeCpr=zcpr.total_out; + deflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total compress size = %u, in %u step\n",lSizeCpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr); + UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress); + + BeginCountPerfCounter(&li_qp,TRUE); + dwGetTick=GetTickCount(); + BeginCountRdtsc(&li_rdtsc); + { + z_stream zcpr; + int ret=Z_OK; + long lOrigToDo = lSizeCpr; + long lOrigDone = 0; + int step=0; + memset(&zcpr,0,sizeof(z_stream)); + inflateInit(&zcpr); + + zcpr.next_in = CprPtr; + zcpr.next_out = UncprPtr; + + + do + { + long all_read_before = zcpr.total_in; + zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress); + zcpr.avail_out = BlockSizeUncompress; + ret=inflate(&zcpr,Z_SYNC_FLUSH); + lOrigDone += (zcpr.total_in-all_read_before); + lOrigToDo -= (zcpr.total_in-all_read_before); + step++; + } while (ret==Z_OK); + + lSizeUncpr=zcpr.total_out; + inflateEnd(&zcpr); + dwGetTick=GetTickCount()-dwGetTick; + dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE); + dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE); + printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step); + printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.); + printf("uncpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.); + printf("uncpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart); + } + + if (lSizeUncpr==lFileSize) + { + if (memcmp(FilePtr,UncprPtr,lFileSize)==0) + printf("compare ok\n"); + + } + + return 0; +} diff --git a/compat/zlib/contrib/testzlib/testzlib.txt b/compat/zlib/contrib/testzlib/testzlib.txt index e508bb2..62258f1 100644 --- a/compat/zlib/contrib/testzlib/testzlib.txt +++ b/compat/zlib/contrib/testzlib/testzlib.txt @@ -1,10 +1,10 @@ -To build testzLib with Visual Studio 2005: - -copy to a directory file from : -- root of zLib tree -- contrib/testzlib -- contrib/masmx86 -- contrib/masmx64 -- contrib/vstudio/vc7 - +To build testzLib with Visual Studio 2005: + +copy to a directory file from : +- root of zLib tree +- contrib/testzlib +- contrib/masmx86 +- contrib/masmx64 +- contrib/vstudio/vc7 + and open testzlib8.sln \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/readme.txt b/compat/zlib/contrib/vstudio/readme.txt index ebe13bf..904888b 100644 --- a/compat/zlib/contrib/vstudio/readme.txt +++ b/compat/zlib/contrib/vstudio/readme.txt @@ -1,60 +1,60 @@ -Building instructions for the DLL versions of Zlib 1.2.4 -======================================================== - -This directory contains projects that build zlib and minizip using -Microsoft Visual C++ 9.0/10.0, and Visual C++ . - -You don't need to build these projects yourself. You can download the -binaries from: - http://www.winimage.com/zLibDll - -More information can be found at this site. - -first compile assembly code by running -bld_ml64.bat in contrib\masmx64 -bld_ml32.bat in contrib\masmx86 - - - - -Build instructions for Visual Studio 2008 (32 bits or 64 bits) --------------------------------------------------------------- -- Uncompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008.0 -- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" - -Build instructions for Visual Studio 2010 (32 bits or 64 bits) --------------------------------------------------------------- -- Uncompress current zlib, including all contrib/* files -- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010.0 - - -Important ---------- -- To use zlibwapi.dll in your application, you must define the - macro ZLIB_WINAPI when compiling your application's source files. - - -Additional notes ----------------- -- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built - by Gilles Vollant from the zlib 1.1.x sources, and distributed at - http://www.winimage.com/zLibDll - It uses the WINAPI calling convention for the exported functions, and - includes the minizip functionality. If your application needs that - particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. - -- The new DLL was renamed because there exist several incompatible - versions of zlib.dll on the Internet. - -- There is also an official DLL build of zlib, named zlib1.dll. This one - is exporting the functions using the CDECL convention. See the file - win32\DLL_FAQ.txt found in this zlib distribution. - -- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol - has a slightly different effect. To avoid compatibility problems, do - not define it here. - - -Gilles Vollant -info@winimage.com +Building instructions for the DLL versions of Zlib 1.2.4 +======================================================== + +This directory contains projects that build zlib and minizip using +Microsoft Visual C++ 9.0/10.0, and Visual C++ . + +You don't need to build these projects yourself. You can download the +binaries from: + http://www.winimage.com/zLibDll + +More information can be found at this site. + +first compile assembly code by running +bld_ml64.bat in contrib\masmx64 +bld_ml32.bat in contrib\masmx86 + + + + +Build instructions for Visual Studio 2008 (32 bits or 64 bits) +-------------------------------------------------------------- +- Uncompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008.0 +- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32" + +Build instructions for Visual Studio 2010 (32 bits or 64 bits) +-------------------------------------------------------------- +- Uncompress current zlib, including all contrib/* files +- Open contrib\vstudio\vc10\zlibvc.sln with Microsoft Visual C++ 2010.0 + + +Important +--------- +- To use zlibwapi.dll in your application, you must define the + macro ZLIB_WINAPI when compiling your application's source files. + + +Additional notes +---------------- +- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built + by Gilles Vollant from the zlib 1.1.x sources, and distributed at + http://www.winimage.com/zLibDll + It uses the WINAPI calling convention for the exported functions, and + includes the minizip functionality. If your application needs that + particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll. + +- The new DLL was renamed because there exist several incompatible + versions of zlib.dll on the Internet. + +- There is also an official DLL build of zlib, named zlib1.dll. This one + is exporting the functions using the CDECL convention. See the file + win32\DLL_FAQ.txt found in this zlib distribution. + +- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol + has a slightly different effect. To avoid compatibility problems, do + not define it here. + + +Gilles Vollant +info@winimage.com diff --git a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj index 1b36242..74e15c9 100644 --- a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj +++ b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj @@ -1,310 +1,310 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694382A} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - true - false - x86\MiniUnzip$(Configuration)\ - x86\MiniUnzip$(Configuration)\Tmp\ - false - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - true - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - true - false - x64\MiniUnzip$(Configuration)\ - x64\MiniUnzip$(Configuration)\Tmp\ - false - false - ia64\MiniUnzip$(Configuration)\ - ia64\MiniUnzip$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - $(OutDir)miniunz.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)miniunz.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694382A} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + true + false + x86\MiniUnzip$(Configuration)\ + x86\MiniUnzip$(Configuration)\Tmp\ + false + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + true + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + true + false + x64\MiniUnzip$(Configuration)\ + x64\MiniUnzip$(Configuration)\Tmp\ + false + false + ia64\MiniUnzip$(Configuration)\ + ia64\MiniUnzip$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + $(OutDir)miniunz.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)miniunz.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters index 0bd1221..0b2a3de 100644 --- a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters +++ b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters @@ -1,22 +1,22 @@ - - - - - {048af943-022b-4db6-beeb-a54c34774ee2} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} - h;hpp;hxx;hm;inl;inc - - - {0844199a-966b-4f19-81db-1e0125e141b9} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - + + + + + {048af943-022b-4db6-beeb-a54c34774ee2} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} + h;hpp;hxx;hm;inl;inc + + + {0844199a-966b-4f19-81db-1e0125e141b9} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user index ace9a86..695b5c7 100644 --- a/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user +++ b/compat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj index ccd3651..917e156 100644 --- a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj +++ b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj @@ -1,307 +1,307 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - true - false - x86\MiniZip$(Configuration)\ - x86\MiniZip$(Configuration)\Tmp\ - false - x64\$(Configuration)\ - x64\$(Configuration)\ - true - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - true - false - x64\$(Configuration)\ - x64\$(Configuration)\ - false - ia64\$(Configuration)\ - ia64\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - $(OutDir)minizip.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)minizip.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + true + false + x86\MiniZip$(Configuration)\ + x86\MiniZip$(Configuration)\Tmp\ + false + x64\$(Configuration)\ + x64\$(Configuration)\ + true + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + true + false + x64\$(Configuration)\ + x64\$(Configuration)\ + false + ia64\$(Configuration)\ + ia64\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + $(OutDir)minizip.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)minizip.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters index 7076d76..dd73cd3 100644 --- a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters +++ b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters @@ -1,22 +1,22 @@ - - - - - {c0419b40-bf50-40da-b153-ff74215b79de} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {bb87b070-735b-478e-92ce-7383abb2f36c} - h;hpp;hxx;hm;inl;inc - - - {f46ab6a6-548f-43cb-ae96-681abb5bd5db} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - + + + + + {c0419b40-bf50-40da-b153-ff74215b79de} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {bb87b070-735b-478e-92ce-7383abb2f36c} + h;hpp;hxx;hm;inl;inc + + + {f46ab6a6-548f-43cb-ae96-681abb5bd5db} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user index ace9a86..695b5c7 100644 --- a/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user +++ b/compat/zlib/contrib/vstudio/vc10/minizip.vcxproj.user @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj index 476b8ea..9088d17 100644 --- a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj +++ b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj @@ -1,420 +1,420 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} - testzlib - Win32Proj - - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - MultiByte - true - - - Application - MultiByte - true - - - Application - MultiByte - - - Application - true - - - Application - true - - - Application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - true - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x86\TestZlib$(Configuration)\ - x86\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - true - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - x64\TestZlib$(Configuration)\ - x64\TestZlib$(Configuration)\Tmp\ - false - ia64\TestZlib$(Configuration)\ - ia64\TestZlib$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - EditAndContinue - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDebugDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - Disabled - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - AssemblyAndSourceCode - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - %(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - ..\..\..;%(AdditionalIncludeDirectories) - ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - Default - MultiThreadedDLL - false - $(IntDir) - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B} + testzlib + Win32Proj + + + + Application + MultiByte + true + + + Application + MultiByte + true + + + Application + MultiByte + + + Application + MultiByte + true + + + Application + MultiByte + true + + + Application + MultiByte + + + Application + true + + + Application + true + + + Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + true + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x86\TestZlib$(Configuration)\ + x86\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + true + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + x64\TestZlib$(Configuration)\ + x64\TestZlib$(Configuration)\Tmp\ + false + ia64\TestZlib$(Configuration)\ + ia64\TestZlib$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + EditAndContinue + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDebugDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + Disabled + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + AssemblyAndSourceCode + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + %(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + ..\..\..;%(AdditionalIncludeDirectories) + ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Default + MultiThreadedDLL + false + $(IntDir) + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters index 3276491..249daa8 100644 --- a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters +++ b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters @@ -1,58 +1,58 @@ - - - - - {c1f6a2e3-5da5-4955-8653-310d3efe05a9} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {c2aaffdc-2c95-4d6f-8466-4bec5890af2c} - h;hpp;hxx;hm;inl;inc - - - {c274fe07-05f2-461c-964b-f6341e4e7eb5} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - + + + + + {c1f6a2e3-5da5-4955-8653-310d3efe05a9} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {c2aaffdc-2c95-4d6f-8466-4bec5890af2c} + h;hpp;hxx;hm;inl;inc + + + {c274fe07-05f2-461c-964b-f6341e4e7eb5} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user index ace9a86..695b5c7 100644 --- a/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user +++ b/compat/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj index c6e453b..2d62815 100644 --- a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj +++ b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj @@ -1,310 +1,310 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {C52F9E7B-498A-42BE-8DB4-85A15694366A} - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - true - false - x86\TestZlibDll$(Configuration)\ - x86\TestZlibDll$(Configuration)\Tmp\ - false - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - true - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - true - false - x64\TestZlibDll$(Configuration)\ - x64\TestZlibDll$(Configuration)\Tmp\ - false - false - ia64\TestZlibDll$(Configuration)\ - ia64\TestZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebug - false - - - $(IntDir) - Level3 - EditAndContinue - - - x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - false - - - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - Default - MultiThreaded - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - false - - - MachineX86 - - - - - X64 - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineX64 - - - - - Itanium - - - Disabled - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDebugDLL - false - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - $(OutDir)testzlib.pdb - Console - MachineIA64 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - MachineX64 - - - - - Itanium - - - MaxSpeed - OnlyExplicitInline - true - ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - true - - - $(IntDir) - Level3 - ProgramDatabase - - - ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) - $(OutDir)testzlib.exe - true - Console - true - true - MachineIA64 - - - - - - - - {8fd826f8-3739-44e6-8cc8-997122e53b8d} - - - - - + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {C52F9E7B-498A-42BE-8DB4-85A15694366A} + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + true + false + x86\TestZlibDll$(Configuration)\ + x86\TestZlibDll$(Configuration)\Tmp\ + false + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + true + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + true + false + x64\TestZlibDll$(Configuration)\ + x64\TestZlibDll$(Configuration)\Tmp\ + false + false + ia64\TestZlibDll$(Configuration)\ + ia64\TestZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + false + + + $(IntDir) + Level3 + EditAndContinue + + + x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + false + + + MachineX86 + + + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + Default + MultiThreaded + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + false + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineX64 + + + + + Itanium + + + Disabled + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebugDLL + false + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + $(OutDir)testzlib.pdb + Console + MachineIA64 + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + MachineX64 + + + + + Itanium + + + MaxSpeed + OnlyExplicitInline + true + ..\..\..;..\..\minizip;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions) + true + Default + MultiThreadedDLL + false + true + + + $(IntDir) + Level3 + ProgramDatabase + + + ia64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies) + $(OutDir)testzlib.exe + true + Console + true + true + MachineIA64 + + + + + + + + {8fd826f8-3739-44e6-8cc8-997122e53b8d} + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters index ab87f09..53a8693 100644 --- a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +++ b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters @@ -1,22 +1,22 @@ - - - - - {fa61a89f-93fc-4c89-b29e-36224b7592f4} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {d4b85da0-2ba2-4934-b57f-e2584e3848ee} - h;hpp;hxx;hm;inl;inc - - - {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - + + + + + {fa61a89f-93fc-4c89-b29e-36224b7592f4} + cpp;c;cxx;def;odl;idl;hpj;bat;asm + + + {d4b85da0-2ba2-4934-b57f-e2584e3848ee} + h;hpp;hxx;hm;inl;inc + + + {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user index ace9a86..695b5c7 100644 --- a/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user +++ b/compat/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlib.rc b/compat/zlib/contrib/vstudio/vc10/zlib.rc index f27ffb6..f822450 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlib.rc +++ b/compat/zlib/contrib/vstudio/vc10/zlib.rc @@ -1,32 +1,32 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1,2,4,0 - PRODUCTVERSION 1,2,4,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.4.0\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlib.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1,2,5,0 + PRODUCTVERSION 1,2,5,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.5\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlib.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj index 9382021..2682fca 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj +++ b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj @@ -1,457 +1,457 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} - - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - StaticLibrary - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x86\ZlibStat$(Configuration)\ - x86\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - x64\ZlibStat$(Configuration)\ - x64\ZlibStat$(Configuration)\Tmp\ - ia64\ZlibStat$(Configuration)\ - ia64\ZlibStat$(Configuration)\Tmp\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDebug - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - OldStyle - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - X64 - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - Itanium - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibstat.pch - $(IntDir) - $(IntDir) - $(OutDir) - Level3 - true - - - 0x040c - - - /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) - $(OutDir)zlibstat.lib - true - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x86\ZlibStat$(Configuration)\ + x86\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + x64\ZlibStat$(Configuration)\ + x64\ZlibStat$(Configuration)\Tmp\ + ia64\ZlibStat$(Configuration)\ + ia64\ZlibStat$(Configuration)\Tmp\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + + + MultiThreadedDebug + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + OldStyle + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + Itanium + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibstat.pch + $(IntDir) + $(IntDir) + $(OutDir) + Level3 + true + + + 0x040c + + + /MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions) + $(OutDir)zlibstat.lib + true + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters index 0c8b250..c8c7f7e 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters +++ b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters @@ -1,77 +1,77 @@ - - - - - {174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Source Files - - + + + + + {174213f6-7f66-4ae8-a3a8-a1e0a1e6ffdd} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + + + Source Files + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user index ace9a86..695b5c7 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user +++ b/compat/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.def b/compat/zlib/contrib/vstudio/vc10/zlibvc.def index fa171ae..0269ef7 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibvc.def +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.def @@ -1,130 +1,130 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.24 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.24 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.sln b/compat/zlib/contrib/vstudio/vc10/zlibvc.sln index 649f40c..6f6ffd5 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibvc.sln +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.sln @@ -1,135 +1,135 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj index 9bb4c63..9862398 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj @@ -1,659 +1,659 @@ - - - - - Debug - Itanium - - - Debug - Win32 - - - Debug - x64 - - - ReleaseWithoutAsm - Itanium - - - ReleaseWithoutAsm - Win32 - - - ReleaseWithoutAsm - x64 - - - Release - Itanium - - - Release - Win32 - - - Release - x64 - - - - {8FD826F8-3739-44E6-8CC8-997122E53B8D} - - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - DynamicLibrary - false - true - - - DynamicLibrary - false - true - - - DynamicLibrary - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30128.1 - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - true - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x86\ZlibDll$(Configuration)\ - x86\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - true - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - true - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - x64\ZlibDll$(Configuration)\ - x64\ZlibDll$(Configuration)\Tmp\ - false - false - ia64\ZlibDll$(Configuration)\ - ia64\ZlibDll$(Configuration)\Tmp\ - false - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - - - MultiThreadedDebug - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - EditAndContinue - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) - true - - - MultiThreaded - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - /MACHINE:I386 %(AdditionalOptions) - ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - false - - - $(OutDir)zlibwapi.lib - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - Disabled - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - - - MultiThreadedDebugDLL - false - $(IntDir)zlibvc.pch - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - ProgramDatabase - - - _DEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - .\zlibvc.def - true - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Itanium - $(OutDir)zlibvc.tlb - - - OnlyExplicitInline - ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) - _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) - true - - - MultiThreadedDLL - false - true - $(IntDir)zlibvc.pch - All - $(IntDir) - $(IntDir) - $(OutDir) - - - Level3 - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x040c - - - $(OutDir)zlibwapi.dll - true - false - .\zlibvc.def - $(OutDir)zlibwapi.pdb - true - $(OutDir)zlibwapi.map - Windows - $(OutDir)zlibwapi.lib - MachineIA64 - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Itanium + + + Debug + Win32 + + + Debug + x64 + + + ReleaseWithoutAsm + Itanium + + + ReleaseWithoutAsm + Win32 + + + ReleaseWithoutAsm + x64 + + + Release + Itanium + + + Release + Win32 + + + Release + x64 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + DynamicLibrary + false + true + + + DynamicLibrary + false + true + + + DynamicLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30128.1 + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + true + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x86\ZlibDll$(Configuration)\ + x86\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + true + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + true + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + x64\ZlibDll$(Configuration)\ + x64\ZlibDll$(Configuration)\Tmp\ + false + false + ia64\ZlibDll$(Configuration)\ + ia64\ZlibDll$(Configuration)\Tmp\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + + + MultiThreadedDebug + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + ..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Itanium + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories) + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions) + true + + + MultiThreadedDLL + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + $(OutDir)zlibwapi.lib + MachineIA64 + + + + + + + + + + + + + + true + true + true + true + true + true + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters index 2278682..180b71c 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters @@ -1,118 +1,118 @@ - - - - - {07934a85-8b61-443d-a0ee-b2eedb74f3cd} - cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 - - - {1d99675b-433d-4a21-9e50-ed4ab8b19762} - h;hpp;hxx;hm;inl;fi;fd - - - {431c0958-fa71-44d0-9084-2d19d100c0cc} - ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - + + + + + {07934a85-8b61-443d-a0ee-b2eedb74f3cd} + cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 + + + {1d99675b-433d-4a21-9e50-ed4ab8b19762} + h;hpp;hxx;hm;inl;fi;fd + + + {431c0958-fa71-44d0-9084-2d19d100c0cc} + ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user index ace9a86..695b5c7 100644 --- a/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user +++ b/compat/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/compat/zlib/contrib/vstudio/vc9/miniunz.vcproj b/compat/zlib/contrib/vstudio/vc9/miniunz.vcproj index 038a9e5..7da32b9 100644 --- a/compat/zlib/contrib/vstudio/vc9/miniunz.vcproj +++ b/compat/zlib/contrib/vstudio/vc9/miniunz.vcproj @@ -1,565 +1,565 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/minizip.vcproj b/compat/zlib/contrib/vstudio/vc9/minizip.vcproj index ad40239..e57e07d 100644 --- a/compat/zlib/contrib/vstudio/vc9/minizip.vcproj +++ b/compat/zlib/contrib/vstudio/vc9/minizip.vcproj @@ -1,562 +1,562 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/testzlib.vcproj b/compat/zlib/contrib/vstudio/vc9/testzlib.vcproj index c9f19d2..9cb0bf8 100644 --- a/compat/zlib/contrib/vstudio/vc9/testzlib.vcproj +++ b/compat/zlib/contrib/vstudio/vc9/testzlib.vcproj @@ -1,852 +1,852 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj b/compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj index d7530fd..b1ddde0 100644 --- a/compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj +++ b/compat/zlib/contrib/vstudio/vc9/testzlibdll.vcproj @@ -1,565 +1,565 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/zlib.rc b/compat/zlib/contrib/vstudio/vc9/zlib.rc index f27ffb6..f822450 100644 --- a/compat/zlib/contrib/vstudio/vc9/zlib.rc +++ b/compat/zlib/contrib/vstudio/vc9/zlib.rc @@ -1,32 +1,32 @@ -#include - -#define IDR_VERSION1 1 -IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE - FILEVERSION 1,2,4,0 - PRODUCTVERSION 1,2,4,0 - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS 0 - FILEOS VOS_DOS_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0 // not used -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - //language ID = U.S. English, char set = Windows, Multilingual - - BEGIN - VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" - VALUE "FileVersion", "1.2.4.0\0" - VALUE "InternalName", "zlib\0" - VALUE "OriginalFilename", "zlib.dll\0" - VALUE "ProductName", "ZLib.DLL\0" - VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" - VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 1252 - END -END +#include + +#define IDR_VERSION1 1 +IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE + FILEVERSION 1,2,5,0 + PRODUCTVERSION 1,2,5,0 + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS 0 + FILEOS VOS_DOS_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0 // not used +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + //language ID = U.S. English, char set = Windows, Multilingual + + BEGIN + VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" + VALUE "FileVersion", "1.2.5\0" + VALUE "InternalName", "zlib\0" + VALUE "OriginalFilename", "zlib.dll\0" + VALUE "ProductName", "ZLib.DLL\0" + VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" + VALUE "LegalCopyright", "(C) 1995-2010 Jean-loup Gailly & Mark Adler\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1252 + END +END diff --git a/compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj b/compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj index d4ffb46..61c76c7 100644 --- a/compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj +++ b/compat/zlib/contrib/vstudio/vc9/zlibstat.vcproj @@ -1,835 +1,835 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/contrib/vstudio/vc9/zlibvc.def b/compat/zlib/contrib/vstudio/vc9/zlibvc.def index fa171ae..0269ef7 100644 --- a/compat/zlib/contrib/vstudio/vc9/zlibvc.def +++ b/compat/zlib/contrib/vstudio/vc9/zlibvc.def @@ -1,130 +1,130 @@ -LIBRARY -; zlib data compression and ZIP file I/O library - -VERSION 1.24 - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 - inflateCopy @42 - inflateBackInit_ @43 - inflateBack @44 - inflateBackEnd @45 - compressBound @46 - deflateBound @47 - gzclearerr @48 - gzungetc @49 - zlibCompileFlags @50 - deflatePrime @51 - - unzOpen @61 - unzClose @62 - unzGetGlobalInfo @63 - unzGetCurrentFileInfo @64 - unzGoToFirstFile @65 - unzGoToNextFile @66 - unzOpenCurrentFile @67 - unzReadCurrentFile @68 - unzOpenCurrentFile3 @69 - unztell @70 - unzeof @71 - unzCloseCurrentFile @72 - unzGetGlobalComment @73 - unzStringFileNameCompare @74 - unzLocateFile @75 - unzGetLocalExtrafield @76 - unzOpen2 @77 - unzOpenCurrentFile2 @78 - unzOpenCurrentFilePassword @79 - - zipOpen @80 - zipOpenNewFileInZip @81 - zipWriteInFileInZip @82 - zipCloseFileInZip @83 - zipClose @84 - zipOpenNewFileInZip2 @86 - zipCloseFileInZipRaw @87 - zipOpen2 @88 - zipOpenNewFileInZip3 @89 - - unzGetFilePos @100 - unzGoToFilePos @101 - - fill_win32_filefunc @110 - -; zlibwapi v1.2.4 added: - fill_win32_filefunc64 @111 - fill_win32_filefunc64A @112 - fill_win32_filefunc64W @113 - - unzOpen64 @120 - unzOpen2_64 @121 - unzGetGlobalInfo64 @122 - unzGetCurrentFileInfo64 @124 - unzGetCurrentFileZStreamPos64 @125 - unztell64 @126 - unzGetFilePos64 @127 - unzGoToFilePos64 @128 - - zipOpen64 @130 - zipOpen2_64 @131 - zipOpenNewFileInZip64 @132 - zipOpenNewFileInZip2_64 @133 - zipOpenNewFileInZip3_64 @134 - zipOpenNewFileInZip4_64 @135 - zipCloseFileInZipRaw64 @136 - -; zlib1 v1.2.4 added: - adler32_combine @140 - crc32_combine @142 - deflateSetHeader @144 - deflateTune @145 - gzbuffer @146 - gzclose_r @147 - gzclose_w @148 - gzdirect @149 - gzoffset @150 - inflateGetHeader @156 - inflateMark @157 - inflatePrime @158 - inflateReset2 @159 - inflateUndermine @160 +LIBRARY +; zlib data compression and ZIP file I/O library + +VERSION 1.24 + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 + inflateCopy @42 + inflateBackInit_ @43 + inflateBack @44 + inflateBackEnd @45 + compressBound @46 + deflateBound @47 + gzclearerr @48 + gzungetc @49 + zlibCompileFlags @50 + deflatePrime @51 + + unzOpen @61 + unzClose @62 + unzGetGlobalInfo @63 + unzGetCurrentFileInfo @64 + unzGoToFirstFile @65 + unzGoToNextFile @66 + unzOpenCurrentFile @67 + unzReadCurrentFile @68 + unzOpenCurrentFile3 @69 + unztell @70 + unzeof @71 + unzCloseCurrentFile @72 + unzGetGlobalComment @73 + unzStringFileNameCompare @74 + unzLocateFile @75 + unzGetLocalExtrafield @76 + unzOpen2 @77 + unzOpenCurrentFile2 @78 + unzOpenCurrentFilePassword @79 + + zipOpen @80 + zipOpenNewFileInZip @81 + zipWriteInFileInZip @82 + zipCloseFileInZip @83 + zipClose @84 + zipOpenNewFileInZip2 @86 + zipCloseFileInZipRaw @87 + zipOpen2 @88 + zipOpenNewFileInZip3 @89 + + unzGetFilePos @100 + unzGoToFilePos @101 + + fill_win32_filefunc @110 + +; zlibwapi v1.2.4 added: + fill_win32_filefunc64 @111 + fill_win32_filefunc64A @112 + fill_win32_filefunc64W @113 + + unzOpen64 @120 + unzOpen2_64 @121 + unzGetGlobalInfo64 @122 + unzGetCurrentFileInfo64 @124 + unzGetCurrentFileZStreamPos64 @125 + unztell64 @126 + unzGetFilePos64 @127 + unzGoToFilePos64 @128 + + zipOpen64 @130 + zipOpen2_64 @131 + zipOpenNewFileInZip64 @132 + zipOpenNewFileInZip2_64 @133 + zipOpenNewFileInZip3_64 @134 + zipOpenNewFileInZip4_64 @135 + zipCloseFileInZipRaw64 @136 + +; zlib1 v1.2.4 added: + adler32_combine @140 + crc32_combine @142 + deflateSetHeader @144 + deflateTune @145 + gzbuffer @146 + gzclose_r @147 + gzclose_w @148 + gzdirect @149 + gzoffset @150 + inflateGetHeader @156 + inflateMark @157 + inflatePrime @158 + inflateReset2 @159 + inflateUndermine @160 diff --git a/compat/zlib/contrib/vstudio/vc9/zlibvc.sln b/compat/zlib/contrib/vstudio/vc9/zlibvc.sln index 75c64c3..b482967 100644 --- a/compat/zlib/contrib/vstudio/vc9/zlibvc.sln +++ b/compat/zlib/contrib/vstudio/vc9/zlibvc.sln @@ -1,144 +1,144 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" - ProjectSection(ProjectDependencies) = postProject - {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Itanium = Debug|Itanium - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Itanium = Release|Itanium - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}" + ProjectSection(ProjectDependencies) = postProject + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium + ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 + ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 + {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj b/compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj index 95bb241..c9a8947 100644 --- a/compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj +++ b/compat/zlib/contrib/vstudio/vc9/zlibvc.vcproj @@ -1,1156 +1,1156 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compat/zlib/crc32.c b/compat/zlib/crc32.c index aba512c..5511cd5 100644 --- a/compat/zlib/crc32.c +++ b/compat/zlib/crc32.c @@ -1,5 +1,5 @@ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2006 Mark Adler + * Copyright (C) 1995-2006, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster @@ -9,7 +9,7 @@ * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. */ -/* @(#) $Id: crc32.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ +/* @(#) $Id: crc32.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ /* Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore @@ -221,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_crc_table() unsigned long ZEXPORT crc32(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; - unsigned len; + uInt len; { if (buf == Z_NULL) return 0UL; diff --git a/compat/zlib/deflate.c b/compat/zlib/deflate.c index 1501917..fa892ad 100644 --- a/compat/zlib/deflate.c +++ b/compat/zlib/deflate.c @@ -47,12 +47,12 @@ * */ -/* @(#) $Id: deflate.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: deflate.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot diff --git a/compat/zlib/deflate.h b/compat/zlib/deflate.h index bae0d4c..9199d88 100644 --- a/compat/zlib/deflate.h +++ b/compat/zlib/deflate.h @@ -1,5 +1,5 @@ /* deflate.h -- internal compression state - * Copyright (C) 1995-2009 Jean-loup Gailly + * Copyright (C) 1995-2010 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,7 +8,7 @@ subject to change. Applications should only use zlib.h. */ -/* @(#) $Id: deflate.h,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: deflate.h,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #ifndef DEFLATE_H #define DEFLATE_H @@ -290,13 +290,13 @@ typedef struct internal_state { memory checker errors from longest match routines */ /* in trees.c */ -void _tr_init OF((deflate_state *s)); -int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, - int last)); -void _tr_align OF((deflate_state *s)); -void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, - int last)); +void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); +int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); +void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); +void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); #define d_code(dist) \ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) @@ -309,11 +309,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, /* Inline versions of _tr_tally for speed: */ #if defined(GEN_TREES_H) || !defined(STDC) - extern uch _length_code[]; - extern uch _dist_code[]; + extern uch ZLIB_INTERNAL _length_code[]; + extern uch ZLIB_INTERNAL _dist_code[]; #else - extern const uch _length_code[]; - extern const uch _dist_code[]; + extern const uch ZLIB_INTERNAL _length_code[]; + extern const uch ZLIB_INTERNAL _dist_code[]; #endif # define _tr_tally_lit(s, c, flush) \ diff --git a/compat/zlib/example.c b/compat/zlib/example.c index d315261..c6c2905 100644 --- a/compat/zlib/example.c +++ b/compat/zlib/example.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: example.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ +/* @(#) $Id: example.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #include "zlib.h" #include diff --git a/compat/zlib/gzguts.h b/compat/zlib/gzguts.h index 0e7ed43..0f8fb79 100644 --- a/compat/zlib/gzguts.h +++ b/compat/zlib/gzguts.h @@ -5,14 +5,18 @@ #ifdef _LARGEFILE64_SOURCE # ifndef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 # endif # ifdef _FILE_OFFSET_BITS # undef _FILE_OFFSET_BITS # endif #endif -#define ZLIB_INTERNAL +#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif #include #include "zlib.h" @@ -44,7 +48,7 @@ #endif /* get errno and strerror definition */ -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE # include # define zstrerror() gz_strwinerror((DWORD)GetLastError()) #else @@ -56,16 +60,12 @@ # endif #endif -/* MVS fdopen() */ -#ifdef __MVS__ - #pragma map (fdopen , "\174\174FDOPEN") - FILE *fdopen(int, const char *); -#endif - -#ifdef _LARGEFILE64_SOURCE -# define z_off64_t off64_t -#else -# define z_off64_t z_off_t +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); #endif /* default i/o buffer size -- double this for output when reading */ @@ -116,9 +116,9 @@ typedef struct { typedef gz_state FAR *gz_statep; /* shared functions */ -ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H -ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); +void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); +#if defined UNDER_CE +char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error)); #endif /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t @@ -127,6 +127,6 @@ ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error)); #ifdef INT_MAX # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) #else -ZEXTERN unsigned ZEXPORT gz_intmax OF((void)); +unsigned ZLIB_INTERNAL gz_intmax OF((void)); # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) #endif diff --git a/compat/zlib/gzlib.c b/compat/zlib/gzlib.c index 6fdb08a..603e60e 100644 --- a/compat/zlib/gzlib.c +++ b/compat/zlib/gzlib.c @@ -5,7 +5,7 @@ #include "gzguts.h" -#ifdef _LARGEFILE64_SOURCE +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 # define LSEEK lseek64 #else # define LSEEK lseek @@ -15,7 +15,7 @@ local void gz_reset OF((gz_statep)); local gzFile gz_open OF((const char *, int, const char *)); -#if defined UNDER_CE && defined NO_ERRNO_H +#if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message string and return a pointer to it. Typically, the values for ERROR come @@ -26,7 +26,7 @@ local gzFile gz_open OF((const char *, int, const char *)); The gz_strwinerror function does not change the current setting of GetLastError. */ -char ZEXPORT *gz_strwinerror (error) +char ZLIB_INTERNAL *gz_strwinerror (error) DWORD error; { static char buf[1024]; @@ -65,7 +65,7 @@ char ZEXPORT *gz_strwinerror (error) return buf; } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ /* Reset gzip file state */ local void gz_reset(state) @@ -172,6 +172,7 @@ local gzFile gz_open(path, fd, mode) O_APPEND))), 0666); if (state->fd == -1) { + free(state->path); free(state); return NULL; } @@ -217,7 +218,7 @@ gzFile ZEXPORT gzdopen(fd, mode) if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) return NULL; - sprintf(path, "", fd); + sprintf(path, "", fd); /* for debugging */ gz = gz_open(path, fd, mode); free(path); return gz; @@ -305,7 +306,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence) /* if within raw area while reading, just go there */ if (state->mode == GZ_READ && state->how == COPY && state->pos + offset >= state->raw) { - ret = LSEEK(state->fd, offset, SEEK_CUR); + ret = LSEEK(state->fd, offset - state->have, SEEK_CUR); if (ret == -1) return -1; state->have = 0; @@ -432,7 +433,8 @@ int ZEXPORT gzeof(file) return 0; /* return end-of-file state */ - return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0; + return state->mode == GZ_READ ? + (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0; } /* -- see zlib.h -- */ @@ -480,7 +482,7 @@ void ZEXPORT gzclearerr(file) memory). Simply save the error message as a static string. If there is an allocation failure constructing the error message, then convert the error to out of memory. */ -void ZEXPORT gz_error(state, err, msg) +void ZLIB_INTERNAL gz_error(state, err, msg) gz_statep state; int err; const char *msg; @@ -520,7 +522,7 @@ void ZEXPORT gz_error(state, err, msg) available) -- we need to do this to cover cases where 2's complement not used, since C standard permits 1's complement and sign-bit representations, otherwise we could just use ((unsigned)-1) >> 1 */ -unsigned ZEXPORT gz_intmax() +unsigned ZLIB_INTERNAL gz_intmax() { unsigned p, q; diff --git a/compat/zlib/gzread.c b/compat/zlib/gzread.c index 434ef02..548201a 100644 --- a/compat/zlib/gzread.c +++ b/compat/zlib/gzread.c @@ -55,7 +55,8 @@ local int gz_avail(state) if (state->err != Z_OK) return -1; if (state->eof == 0) { - if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1) + if (gz_load(state, state->in, state->size, + (unsigned *)&(strm->avail_in)) == -1) return -1; strm->next_in = state->in; } diff --git a/compat/zlib/inffast.c b/compat/zlib/inffast.c index 0a0761f..2f1d60b 100644 --- a/compat/zlib/inffast.c +++ b/compat/zlib/inffast.c @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2008 Mark Adler + * Copyright (C) 1995-2008, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -64,7 +64,7 @@ requires strm->avail_out >= 258 for each loop to avoid checking for output space. */ -void inflate_fast(strm, start) +void ZLIB_INTERNAL inflate_fast(strm, start) z_streamp strm; unsigned start; /* inflate()'s starting value for strm->avail_out */ { diff --git a/compat/zlib/inffast.h b/compat/zlib/inffast.h index 1e88d2d..e5c1aa4 100644 --- a/compat/zlib/inffast.h +++ b/compat/zlib/inffast.h @@ -1,5 +1,5 @@ /* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003 Mark Adler + * Copyright (C) 1995-2003, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,4 +8,4 @@ subject to change. Applications should only use zlib.h. */ -void inflate_fast OF((z_streamp strm, unsigned start)); +void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/compat/zlib/inftrees.c b/compat/zlib/inftrees.c index ccf7fa9..11e9c52 100644 --- a/compat/zlib/inftrees.c +++ b/compat/zlib/inftrees.c @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.4 Copyright 1995-2010 Mark Adler "; + " inflate 1.2.5 Copyright 1995-2010 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -29,7 +29,7 @@ const char inflate_copyright[] = table index bits. It will differ if the request is greater than the longest code or if it is less than the shortest code. */ -int inflate_table(type, lens, codes, table, bits, work) +int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) codetype type; unsigned short FAR *lens; unsigned codes; @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/compat/zlib/inftrees.h b/compat/zlib/inftrees.h index 67461da..baa53a0 100644 --- a/compat/zlib/inftrees.h +++ b/compat/zlib/inftrees.h @@ -1,5 +1,5 @@ /* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005 Mark Adler + * Copyright (C) 1995-2005, 2010 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -57,6 +57,6 @@ typedef enum { DISTS } codetype; -extern int inflate_table OF((codetype type, unsigned short FAR *lens, +int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, unsigned codes, code FAR * FAR *table, unsigned FAR *bits, unsigned short FAR *work)); diff --git a/compat/zlib/minigzip.c b/compat/zlib/minigzip.c index e67cde3..4f64c9a 100644 --- a/compat/zlib/minigzip.c +++ b/compat/zlib/minigzip.c @@ -13,7 +13,7 @@ * or in pipe mode. */ -/* @(#) $Id: minigzip.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: minigzip.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #include "zlib.h" #include @@ -32,6 +32,9 @@ #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) # include # include +# ifdef UNDER_CE +# include +# endif # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) #else # define SET_BINARY_MODE(file) @@ -50,11 +53,13 @@ # include /* for fileno */ #endif +#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE) #ifndef WIN32 /* unlink already in stdio.h for WIN32 */ extern int unlink OF((const char *)); #endif +#endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) +#if defined(UNDER_CE) # include # define perror(s) pwinerror(s) @@ -116,7 +121,7 @@ static void pwinerror (s) fprintf(stderr, "%s\n", strwinerror(GetLastError ())); } -#endif /* UNDER_CE && NO_ERRNO_H */ +#endif /* UNDER_CE */ #ifndef GZ_SUFFIX # define GZ_SUFFIX ".gz" diff --git a/compat/zlib/old/visualc6/README.txt b/compat/zlib/old/visualc6/README.txt new file mode 100644 index 0000000..d0296c2 --- /dev/null +++ b/compat/zlib/old/visualc6/README.txt @@ -0,0 +1,73 @@ +Microsoft Developer Studio Project Files, Format Version 6.00 for zlib. + +Copyright (C) 2000-2004 Simon-Pierre Cadieux. +Copyright (C) 2004 Cosmin Truta. +For conditions of distribution and use, see copyright notice in zlib.h. + + +This project builds the zlib binaries as follows: + +* Win32_DLL_Release\zlib1.dll DLL build +* Win32_DLL_Debug\zlib1d.dll DLL build (debug version) +* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code +* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version) +* Win32_LIB_Release\zlib.lib static build +* Win32_LIB_Debug\zlibd.lib static build (debug version) +* Win32_LIB_ASM_Release\zlib.lib static build using ASM code +* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version) + + +For more information regarding the DLL builds, please see the DLL FAQ +in ..\..\win32\DLL_FAQ.txt. + + +To build and test: + +1) On the main menu, select "File | Open Workspace". + Open "zlib.dsw". + +2) Select "Build | Set Active Configuration". + Choose the configuration you wish to build. + +3) Select "Build | Clean". + +4) Select "Build | Build ... (F7)". Ignore warning messages about + not being able to find certain include files (e.g. alloc.h). + +5) If you built one of the sample programs (example or minigzip), + select "Build | Execute ... (Ctrl+F5)". + + +To use: + +1) Select "Project | Settings (Alt+F7)". + Make note of the configuration names used in your project. + Usually, these names are "Win32 Release" and "Win32 Debug". + +2) In the Workspace window, select the "FileView" tab. + Right-click on the root item "Workspace '...'". + Select "Insert Project into Workspace". + Switch on the checkbox "Dependency of:", and select the name + of your project. Open "zlib.dsp". + +3) Select "Build | Configurations". + For each configuration of your project: + 3.1) Choose the zlib configuration you wish to use. + 3.2) Click on "Add". + 3.3) Set the new zlib configuration name to the name used by + the configuration from the current iteration. + +4) Select "Build | Set Active Configuration". + Choose the configuration you wish to build. + +5) Select "Build | Build ... (F7)". + +6) If you built an executable program, select + "Build | Execute ... (Ctrl+F5)". + + +Note: + +To build the ASM-enabled code, you need Microsoft Assembler +(ML.EXE). You can get it by downloading and installing the +latest Processor Pack for Visual C++ 6.0. diff --git a/compat/zlib/old/visualc6/example.dsp b/compat/zlib/old/visualc6/example.dsp new file mode 100644 index 0000000..d358052 --- /dev/null +++ b/compat/zlib/old/visualc6/example.dsp @@ -0,0 +1,278 @@ +# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=example - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "example.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application") +!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "example - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "example___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "example - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "example___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "example___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "example - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "example___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "example - Win32 DLL ASM Release" +# Name "example - Win32 DLL ASM Debug" +# Name "example - Win32 DLL Release" +# Name "example - Win32 DLL Debug" +# Name "example - Win32 LIB ASM Release" +# Name "example - Win32 LIB ASM Debug" +# Name "example - Win32 LIB Release" +# Name "example - Win32 LIB Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\example.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# End Group +# End Target +# End Project diff --git a/compat/zlib/old/visualc6/minigzip.dsp b/compat/zlib/old/visualc6/minigzip.dsp new file mode 100644 index 0000000..7103468 --- /dev/null +++ b/compat/zlib/old/visualc6/minigzip.dsp @@ -0,0 +1,278 @@ +# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=minigzip - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "minigzip.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application") +!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "minigzip - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "minigzip___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "minigzip - Win32 DLL ASM Release" +# Name "minigzip - Win32 DLL ASM Debug" +# Name "minigzip - Win32 DLL Release" +# Name "minigzip - Win32 DLL Debug" +# Name "minigzip - Win32 LIB ASM Release" +# Name "minigzip - Win32 LIB ASM Debug" +# Name "minigzip - Win32 LIB Release" +# Name "minigzip - Win32 LIB Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\minigzip.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# End Group +# End Target +# End Project diff --git a/compat/zlib/old/visualc6/zlib.dsp b/compat/zlib/old/visualc6/zlib.dsp new file mode 100644 index 0000000..00f54ea --- /dev/null +++ b/compat/zlib/old/visualc6/zlib.dsp @@ -0,0 +1,621 @@ +# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=zlib - Win32 LIB Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_ASM_Release" +# PROP Intermediate_Dir "Win32_DLL_ASM_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_ASM_Debug" +# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_DLL_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_DLL_Release" +# PROP Intermediate_Dir "Win32_DLL_Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_DLL_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_DLL_Debug" +# PROP Intermediate_Dir "Win32_DLL_Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_ASM_Release" +# PROP Intermediate_Dir "Win32_LIB_ASM_Release" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_ASM_Debug" +# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_LIB_Release" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Win32_LIB_Release" +# PROP Intermediate_Dir "Win32_LIB_Release" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "zlib___Win32_LIB_Debug" +# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Win32_LIB_Debug" +# PROP Intermediate_Dir "Win32_LIB_Debug" +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib" + +!ENDIF + +# Begin Target + +# Name "zlib - Win32 DLL ASM Release" +# Name "zlib - Win32 DLL ASM Debug" +# Name "zlib - Win32 DLL Release" +# Name "zlib - Win32 DLL Debug" +# Name "zlib - Win32 LIB ASM Release" +# Name "zlib - Win32 LIB ASM Debug" +# Name "zlib - Win32 LIB Release" +# Name "zlib - Win32 LIB Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\adler32.c +# End Source File +# Begin Source File + +SOURCE=..\..\compress.c +# End Source File +# Begin Source File + +SOURCE=..\..\crc32.c +# End Source File +# Begin Source File + +SOURCE=..\..\deflate.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzclose.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzread.c +# End Source File +# Begin Source File + +SOURCE=..\..\gzwrite.c +# End Source File +# Begin Source File + +SOURCE=..\..\infback.c +# End Source File +# Begin Source File + +SOURCE=..\..\inffast.c +# End Source File +# Begin Source File + +SOURCE=..\..\inflate.c +# End Source File +# Begin Source File + +SOURCE=..\..\inftrees.c +# End Source File +# Begin Source File + +SOURCE=..\..\trees.c +# End Source File +# Begin Source File + +SOURCE=..\..\uncompr.c +# End Source File +# Begin Source File + +SOURCE=..\..\win32\zlib.def + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\zutil.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\crc32.h +# End Source File +# Begin Source File + +SOURCE=..\..\deflate.h +# End Source File +# Begin Source File + +SOURCE=..\..\inffast.h +# End Source File +# Begin Source File + +SOURCE=..\..\inffixed.h +# End Source File +# Begin Source File + +SOURCE=..\..\inflate.h +# End Source File +# Begin Source File + +SOURCE=..\..\inftrees.h +# End Source File +# Begin Source File + +SOURCE=..\..\trees.h +# End Source File +# Begin Source File + +SOURCE=..\..\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\zlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\zutil.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\win32\zlib1.rc +# End Source File +# End Group +# Begin Group "Assembler Files (Unsupported)" + +# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx" +# Begin Source File + +SOURCE=..\..\contrib\masmx86\gvmat32.asm + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Release +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Debug +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Release +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Debug +InputPath=..\..\contrib\masmx86\gvmat32.asm +InputName=gvmat32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\contrib\masmx86\gvmat32c.c + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 +# ADD CPP /I "..\.." + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\contrib\masmx86\inffas32.asm + +!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Release +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_DLL_ASM_Debug +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Release +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" + +# Begin Custom Build - Assembling... +IntDir=.\Win32_LIB_ASM_Debug +InputPath=..\..\contrib\masmx86\inffas32.asm +InputName=inffas32 + +"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# End Group +# Begin Source File + +SOURCE=.\README.txt +# End Source File +# End Target +# End Project diff --git a/compat/zlib/old/visualc6/zlib.dsw b/compat/zlib/old/visualc6/zlib.dsw new file mode 100644 index 0000000..3a771fc --- /dev/null +++ b/compat/zlib/old/visualc6/zlib.dsw @@ -0,0 +1,59 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "example"=.\example.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency +}}} + +############################################################################### + +Project: "minigzip"=.\minigzip.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency +}}} + +############################################################################### + +Project: "zlib"=.\zlib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/compat/zlib/projects/README.projects b/compat/zlib/projects/README.projects deleted file mode 100644 index 1c029e4..0000000 --- a/compat/zlib/projects/README.projects +++ /dev/null @@ -1,41 +0,0 @@ -This directory contains project files for building zlib under various -Integrated Development Environments (IDE). - -If you wish to submit a new project to this directory, you should comply -to the following requirements. Otherwise (e.g. if you wish to integrate -a custom piece of code that changes the zlib interface or its behavior), -please consider submitting the project to the contrib directory. - - -Requirements -============ - -- The project must build zlib using the source files from the official - zlib source distribution, exclusively. - -- If the project produces redistributable builds (e.g. shared objects - or DLL files), these builds must be compatible to those produced by - makefiles, if such makefiles exist in the zlib distribution. - In particular, if the project produces a DLL build for the Win32 - platform, this build must comply to the officially-ammended Win32 DLL - Application Binary Interface (ABI), described in win32/DLL_FAQ.txt. - -- The project may provide additional build targets, which depend on - 3rd-party (unofficially-supported) software, present in the contrib - directory. For example, it is possible to provide an "ASM build", - besides the officially-supported build, and have ASM source files - among its dependencies. - -- If there are significant differences between the project files created - by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name - of the project directory should contain the version number of the IDE - for which the project is intended (e.g. "visualc6" for Visual C++ 6.0, - or "visualc7" for Visual C++ 7.0 and 7.1). - - -Current projects -================ - -visualc6/ by Simon-Pierre Cadieux - and Cosmin Truta - Project for Microsoft Visual C++ 6.0 diff --git a/compat/zlib/projects/visualc6/README.txt b/compat/zlib/projects/visualc6/README.txt deleted file mode 100644 index 3d0aef0..0000000 --- a/compat/zlib/projects/visualc6/README.txt +++ /dev/null @@ -1,73 +0,0 @@ -Microsoft Developer Studio Project Files, Format Version 6.00 for zlib. - -Copyright (C) 2000-2004 Simon-Pierre Cadieux. -Copyright (C) 2004 Cosmin Truta. -For conditions of distribution and use, see copyright notice in zlib.h. - - -This project builds the zlib binaries as follows: - -* Win32_DLL_Release\zlib1.dll DLL build -* Win32_DLL_Debug\zlib1d.dll DLL build (debug version) -* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code -* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version) -* Win32_LIB_Release\zlib.lib static build -* Win32_LIB_Debug\zlibd.lib static build (debug version) -* Win32_LIB_ASM_Release\zlib.lib static build using ASM code -* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version) - - -For more information regarding the DLL builds, please see the DLL FAQ -in ..\..\win32\DLL_FAQ.txt. - - -To build and test: - -1) On the main menu, select "File | Open Workspace". - Open "zlib.dsw". - -2) Select "Build | Set Active Configuration". - Choose the configuration you wish to build. - -3) Select "Build | Clean". - -4) Select "Build | Build ... (F7)". Ignore warning messages about - not being able to find certain include files (e.g. alloc.h). - -5) If you built one of the sample programs (example or minigzip), - select "Build | Execute ... (Ctrl+F5)". - - -To use: - -1) Select "Project | Settings (Alt+F7)". - Make note of the configuration names used in your project. - Usually, these names are "Win32 Release" and "Win32 Debug". - -2) In the Workspace window, select the "FileView" tab. - Right-click on the root item "Workspace '...'". - Select "Insert Project into Workspace". - Switch on the checkbox "Dependency of:", and select the name - of your project. Open "zlib.dsp". - -3) Select "Build | Configurations". - For each configuration of your project: - 3.1) Choose the zlib configuration you wish to use. - 3.2) Click on "Add". - 3.3) Set the new zlib configuration name to the name used by - the configuration from the current iteration. - -4) Select "Build | Set Active Configuration". - Choose the configuration you wish to build. - -5) Select "Build | Build ... (F7)". - -6) If you built an executable program, select - "Build | Execute ... (Ctrl+F5)". - - -Note: - -To build the ASM-enabled code, you need Microsoft Assembler -(ML.EXE). You can get it by downloading and installing the -latest Processor Pack for Visual C++ 6.0. diff --git a/compat/zlib/projects/visualc6/example.dsp b/compat/zlib/projects/visualc6/example.dsp deleted file mode 100644 index 2599efd..0000000 --- a/compat/zlib/projects/visualc6/example.dsp +++ /dev/null @@ -1,278 +0,0 @@ -# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=example - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "example.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application") -!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "example - Win32 DLL ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release" -# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_ASM_Release" -# PROP Intermediate_Dir "Win32_DLL_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug" -# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_ASM_Debug" -# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "example - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_DLL_Release" -# PROP BASE Intermediate_Dir "example___Win32_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_Release" -# PROP Intermediate_Dir "Win32_DLL_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_DLL_Debug" -# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_Debug" -# PROP Intermediate_Dir "Win32_DLL_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release" -# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_ASM_Release" -# PROP Intermediate_Dir "Win32_LIB_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug" -# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_ASM_Debug" -# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "example - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "example___Win32_LIB_Release" -# PROP BASE Intermediate_Dir "example___Win32_LIB_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_Release" -# PROP Intermediate_Dir "Win32_LIB_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "example - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "example___Win32_LIB_Debug" -# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_Debug" -# PROP Intermediate_Dir "Win32_LIB_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "example - Win32 DLL ASM Release" -# Name "example - Win32 DLL ASM Debug" -# Name "example - Win32 DLL Release" -# Name "example - Win32 DLL Debug" -# Name "example - Win32 LIB ASM Release" -# Name "example - Win32 LIB ASM Debug" -# Name "example - Win32 LIB Release" -# Name "example - Win32 LIB Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\example.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\zconf.h -# End Source File -# Begin Source File - -SOURCE=..\..\zlib.h -# End Source File -# End Group -# End Target -# End Project diff --git a/compat/zlib/projects/visualc6/minigzip.dsp b/compat/zlib/projects/visualc6/minigzip.dsp deleted file mode 100644 index 941582b..0000000 --- a/compat/zlib/projects/visualc6/minigzip.dsp +++ /dev/null @@ -1,278 +0,0 @@ -# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=minigzip - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "minigzip.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application") -!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "minigzip - Win32 DLL ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_ASM_Release" -# PROP Intermediate_Dir "Win32_DLL_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_ASM_Debug" -# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_DLL_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_Release" -# PROP Intermediate_Dir "Win32_DLL_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_Debug" -# PROP Intermediate_Dir "Win32_DLL_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_ASM_Release" -# PROP Intermediate_Dir "Win32_LIB_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_ASM_Debug" -# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "minigzip___Win32_LIB_Release" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_Release" -# PROP Intermediate_Dir "Win32_LIB_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug" -# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_Debug" -# PROP Intermediate_Dir "Win32_LIB_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "minigzip - Win32 DLL ASM Release" -# Name "minigzip - Win32 DLL ASM Debug" -# Name "minigzip - Win32 DLL Release" -# Name "minigzip - Win32 DLL Debug" -# Name "minigzip - Win32 LIB ASM Release" -# Name "minigzip - Win32 LIB ASM Debug" -# Name "minigzip - Win32 LIB Release" -# Name "minigzip - Win32 LIB Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\minigzip.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\zconf.h -# End Source File -# Begin Source File - -SOURCE=..\..\zlib.h -# End Source File -# End Group -# End Target -# End Project diff --git a/compat/zlib/projects/visualc6/zlib.dsp b/compat/zlib/projects/visualc6/zlib.dsp deleted file mode 100644 index 34f1f30..0000000 --- a/compat/zlib/projects/visualc6/zlib.dsp +++ /dev/null @@ -1,621 +0,0 @@ -# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=zlib - Win32 LIB Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" - -!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_ASM_Release" -# PROP Intermediate_Dir "Win32_DLL_ASM_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_ASM_Debug" -# PROP Intermediate_Dir "Win32_DLL_ASM_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_DLL_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_DLL_Release" -# PROP Intermediate_Dir "Win32_DLL_Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_DLL_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_DLL_Debug" -# PROP Intermediate_Dir "Win32_DLL_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -MTL=midl.exe -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_ASM_Release" -# PROP Intermediate_Dir "Win32_LIB_ASM_Release" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_ASM_Debug" -# PROP Intermediate_Dir "Win32_LIB_ASM_Debug" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_LIB_Release" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Win32_LIB_Release" -# PROP Intermediate_Dir "Win32_LIB_Release" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "zlib___Win32_LIB_Debug" -# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Win32_LIB_Debug" -# PROP Intermediate_Dir "Win32_LIB_Debug" -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -# SUBTRACT BASE CPP /YX /Yc /Yu -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c -# SUBTRACT CPP /YX /Yc /Yu -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib" - -!ENDIF - -# Begin Target - -# Name "zlib - Win32 DLL ASM Release" -# Name "zlib - Win32 DLL ASM Debug" -# Name "zlib - Win32 DLL Release" -# Name "zlib - Win32 DLL Debug" -# Name "zlib - Win32 LIB ASM Release" -# Name "zlib - Win32 LIB ASM Debug" -# Name "zlib - Win32 LIB Release" -# Name "zlib - Win32 LIB Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\adler32.c -# End Source File -# Begin Source File - -SOURCE=..\..\compress.c -# End Source File -# Begin Source File - -SOURCE=..\..\crc32.c -# End Source File -# Begin Source File - -SOURCE=..\..\deflate.c -# End Source File -# Begin Source File - -SOURCE=..\..\gzclose.c -# End Source File -# Begin Source File - -SOURCE=..\..\gzlib.c -# End Source File -# Begin Source File - -SOURCE=..\..\gzread.c -# End Source File -# Begin Source File - -SOURCE=..\..\gzwrite.c -# End Source File -# Begin Source File - -SOURCE=..\..\infback.c -# End Source File -# Begin Source File - -SOURCE=..\..\inffast.c -# End Source File -# Begin Source File - -SOURCE=..\..\inflate.c -# End Source File -# Begin Source File - -SOURCE=..\..\inftrees.c -# End Source File -# Begin Source File - -SOURCE=..\..\trees.c -# End Source File -# Begin Source File - -SOURCE=..\..\uncompr.c -# End Source File -# Begin Source File - -SOURCE=..\..\win32\zlib.def - -!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\zutil.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\crc32.h -# End Source File -# Begin Source File - -SOURCE=..\..\deflate.h -# End Source File -# Begin Source File - -SOURCE=..\..\inffast.h -# End Source File -# Begin Source File - -SOURCE=..\..\inffixed.h -# End Source File -# Begin Source File - -SOURCE=..\..\inflate.h -# End Source File -# Begin Source File - -SOURCE=..\..\inftrees.h -# End Source File -# Begin Source File - -SOURCE=..\..\trees.h -# End Source File -# Begin Source File - -SOURCE=..\..\zconf.h -# End Source File -# Begin Source File - -SOURCE=..\..\zlib.h -# End Source File -# Begin Source File - -SOURCE=..\..\zutil.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=..\..\win32\zlib1.rc -# End Source File -# End Group -# Begin Group "Assembler Files (Unsupported)" - -# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx" -# Begin Source File - -SOURCE=..\..\contrib\masmx86\gvmat32.asm - -!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Release -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Debug -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Release -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Debug -InputPath=..\..\contrib\masmx86\gvmat32.asm -InputName=gvmat32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\contrib\masmx86\gvmat32c.c - -!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 -# ADD CPP /I "..\.." - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\contrib\masmx86\inffas32.asm - -!IF "$(CFG)" == "zlib - Win32 DLL ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Release -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_DLL_ASM_Debug -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Release -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" - -# Begin Custom Build - Assembling... -IntDir=.\Win32_LIB_ASM_Debug -InputPath=..\..\contrib\masmx86\inffas32.asm -InputName=inffas32 - -"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)" - -# End Custom Build - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# End Group -# Begin Source File - -SOURCE=.\README.txt -# End Source File -# End Target -# End Project diff --git a/compat/zlib/projects/visualc6/zlib.dsw b/compat/zlib/projects/visualc6/zlib.dsw deleted file mode 100644 index 2644856..0000000 --- a/compat/zlib/projects/visualc6/zlib.dsw +++ /dev/null @@ -1,59 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "example"=.\example.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name zlib - End Project Dependency -}}} - -############################################################################### - -Project: "minigzip"=.\minigzip.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name zlib - End Project Dependency -}}} - -############################################################################### - -Project: "zlib"=.\zlib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/compat/zlib/qnx/package.qpg b/compat/zlib/qnx/package.qpg index 470d2d5..2bc63b2 100644 --- a/compat/zlib/qnx/package.qpg +++ b/compat/zlib/qnx/package.qpg @@ -25,10 +25,10 @@ - - - - + + + + @@ -63,7 +63,7 @@ - 1.2.4 + 1.2.5 Medium Stable diff --git a/compat/zlib/treebuild.xml b/compat/zlib/treebuild.xml index 91ee891..6b8f542 100644 --- a/compat/zlib/treebuild.xml +++ b/compat/zlib/treebuild.xml @@ -1,6 +1,6 @@ - - + + zip compression library diff --git a/compat/zlib/trees.c b/compat/zlib/trees.c index 39e9a95..b207380 100644 --- a/compat/zlib/trees.c +++ b/compat/zlib/trees.c @@ -1,5 +1,5 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2009 Jean-loup Gailly + * Copyright (C) 1995-2010 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -30,7 +30,7 @@ * Addison-Wesley, 1983. ISBN 0-201-06672-6. */ -/* @(#) $Id: trees.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: trees.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ /* #define GEN_TREES_H */ @@ -351,13 +351,14 @@ void gen_trees_header() static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); } - fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n"); + fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); for (i = 0; i < DIST_CODE_LEN; i++) { fprintf(header, "%2u%s", _dist_code[i], SEPARATOR(i, DIST_CODE_LEN-1, 20)); } - fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + fprintf(header, + "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { fprintf(header, "%2u%s", _length_code[i], SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); @@ -382,7 +383,7 @@ void gen_trees_header() /* =========================================================================== * Initialize the tree data structures for a new zlib stream. */ -void _tr_init(s) +void ZLIB_INTERNAL _tr_init(s) deflate_state *s; { tr_static_init(); @@ -867,7 +868,7 @@ local void send_all_trees(s, lcodes, dcodes, blcodes) /* =========================================================================== * Send a stored block */ -void _tr_stored_block(s, buf, stored_len, last) +void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block */ ulg stored_len; /* length of input block */ @@ -892,7 +893,7 @@ void _tr_stored_block(s, buf, stored_len, last) * To simplify the code, we assume the worst case of last real code encoded * on one bit only. */ -void _tr_align(s) +void ZLIB_INTERNAL _tr_align(s) deflate_state *s; { send_bits(s, STATIC_TREES<<1, 3); @@ -921,7 +922,7 @@ void _tr_align(s) * Determine the best encoding for the current block: dynamic trees, static * trees or store, and output the encoded block to the zip file. */ -void _tr_flush_block(s, buf, stored_len, last) +void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) deflate_state *s; charf *buf; /* input block, or NULL if too old */ ulg stored_len; /* length of input block */ @@ -1022,7 +1023,7 @@ void _tr_flush_block(s, buf, stored_len, last) * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ -int _tr_tally (s, dist, lc) +int ZLIB_INTERNAL _tr_tally (s, dist, lc) deflate_state *s; unsigned dist; /* distance of matched string */ unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ diff --git a/compat/zlib/trees.h b/compat/zlib/trees.h index 72facf9..d35639d 100644 --- a/compat/zlib/trees.h +++ b/compat/zlib/trees.h @@ -70,7 +70,7 @@ local const ct_data static_dtree[D_CODES] = { {{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} }; -const uch _dist_code[DIST_CODE_LEN] = { +const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, @@ -99,7 +99,7 @@ const uch _dist_code[DIST_CODE_LEN] = { 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 }; -const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { +const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, diff --git a/compat/zlib/uncompr.c b/compat/zlib/uncompr.c index 66b123a..5cbf08f 100644 --- a/compat/zlib/uncompr.c +++ b/compat/zlib/uncompr.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: uncompr.c,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: uncompr.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #define ZLIB_INTERNAL #include "zlib.h" diff --git a/compat/zlib/win32/Makefile.gcc b/compat/zlib/win32/Makefile.gcc index abe3d5a..0a33bf6 100644 --- a/compat/zlib/win32/Makefile.gcc +++ b/compat/zlib/win32/Makefile.gcc @@ -27,25 +27,32 @@ STATICLIB = libz.a SHAREDLIB = zlib1.dll IMPLIB = libzdll.a +# +# Set to 1 if shared object needs to be installed +# +SHARED_MODE=0 + #LOC = -DASMV #LOC = -DDEBUG -g -CC = gcc +PREFIX = +CC = $(PREFIX)gcc CFLAGS = $(LOC) -O3 -Wall +EXTRA_CFLAGS = -DNO_VIZ AS = $(CC) ASFLAGS = $(LOC) -Wall LD = $(CC) -LDFLAGS = $(LOC) -s +LDFLAGS = $(LOC) -AR = ar +AR = $(PREFIX)ar ARFLAGS = rcs -RC = windres +RC = $(PREFIX)windres RCFLAGS = --define GCC_WINDRES -STRIP = strip +STRIP = $(PREFIX)strip CP = cp -fp # If GNU install is available, replace $(CP) with install. @@ -70,7 +77,7 @@ testdll: example_d.exe minigzip_d.exe echo hello world | ./minigzip_d | ./minigzip_d -d .c.o: - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< .S.o: $(AS) $(ASFLAGS) -c -o $@ $< @@ -81,43 +88,54 @@ $(STATICLIB): $(OBJS) $(OBJA) $(IMPLIB): $(SHAREDLIB) $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o - $(CC) -shared -Wl,--out-implib,$(IMPLIB) \ + $(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \ -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o $(STRIP) $@ example.exe: example.o $(STATICLIB) $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB) + $(STRIP) $@ minigzip.exe: minigzip.o $(STATICLIB) $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB) + $(STRIP) $@ example_d.exe: example.o $(IMPLIB) $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB) + $(STRIP) $@ minigzip_d.exe: minigzip.o $(IMPLIB) $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB) + $(STRIP) $@ zlibrc.o: win32/zlib1.rc $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc -# INCLUDE_PATH and LIBRARY_PATH must be set. +# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set. .PHONY: install uninstall clean -install: zlib.h zconf.h $(LIB) - -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH) - -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH) +install: zlib.h zconf.h $(STATICLIB) $(IMPLIB) + -@mkdir -p $(INCLUDE_PATH) + -@mkdir -p $(LIBRARY_PATH) + -if [ "$(SHARED_MODE)" = "1" ]; then \ + mkdir -p $(BINARY_PATH); \ + $(INSTALL) $(SHAREDLIB) $(BINARY_PATH); \ + $(INSTALL) $(IMPLIB) $(LIBRARY_PATH); \ + fi -$(INSTALL) zlib.h $(INCLUDE_PATH) -$(INSTALL) zconf.h $(INCLUDE_PATH) -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH) - -$(INSTALL) $(IMPLIB) $(LIBRARY_PATH) uninstall: + -if [ "$(SHARED_MODE)" = "1" ]; then \ + $(RM) $(BINARY_PATH)/$(SHAREDLIB); \ + $(RM) $(LIBRARY_PATH)/$(IMPLIB); \ + fi -$(RM) $(INCLUDE_PATH)/zlib.h -$(RM) $(INCLUDE_PATH)/zconf.h -$(RM) $(LIBRARY_PATH)/$(STATICLIB) - -$(RM) $(LIBRARY_PATH)/$(IMPLIB) clean: -$(RM) $(STATICLIB) diff --git a/compat/zlib/win32/Makefile.msc b/compat/zlib/win32/Makefile.msc index a731c0c..fa10a1a 100644 --- a/compat/zlib/win32/Makefile.msc +++ b/compat/zlib/win32/Makefile.msc @@ -2,15 +2,16 @@ # zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler # # Usage: -# nmake -f win32/Makefile.msc (standard build) -# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build) -# nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj (use ASM code) - +# nmake -f win32/Makefile.msc (standard build) +# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build) +# nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" \ +# OBJA="inffas32.obj match686.obj" (use ASM code, x86) +# nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF" \ +# OBJA="inffasx64.obj gvmat64.obj inffas8664.c" (use ASM code, x64) # optional build flags LOC = - # variables STATICLIB = zlib.lib SHAREDLIB = zlib1.dll @@ -23,13 +24,13 @@ AR = lib RC = rc CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC) WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -ASFLAGS = -coff -Zi +ASFLAGS = -coff -Zi $(LOC) LDFLAGS = -nologo -debug -incremental:no -opt:ref ARFLAGS = -nologo RCFLAGS = /dWIN32 /r OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \ - gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj + gzwrite.obj infback.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj OBJA = @@ -71,7 +72,13 @@ minigzip_d.exe: minigzip.obj $(IMPLIB) .c.obj: $(CC) -c $(WFLAGS) $(CFLAGS) $< -.asm.obj: +{contrib/masmx64}.c.obj: + $(CC) -c $(WFLAGS) $(CFLAGS) $< + +{contrib/masmx64}.asm.obj: + $(AS) -c $(ASFLAGS) $< + +{contrib/masmx86}.asm.obj: $(AS) -c $(ASFLAGS) $< adler32.obj: adler32.c zlib.h zconf.h @@ -107,6 +114,17 @@ uncompr.obj: uncompr.c zlib.h zconf.h zutil.obj: zutil.c zutil.h zlib.h zconf.h +gvmat64.obj: contrib\masmx64\gvmat64.asm + +inffasx64.obj: contrib\masmx64\inffasx64.asm + +inffas8664.obj: contrib\masmx64\inffas8664.c zutil.h zlib.h zconf.h \ + inftrees.h inflate.h inffast.h + +inffas32.obj: contrib\masmx86\inffas32.asm + +match686.obj: contrib\masmx86\match686.asm + example.obj: example.c zlib.h zconf.h minigzip.obj: minigzip.c zlib.h zconf.h diff --git a/compat/zlib/win32/README-WIN32.txt b/compat/zlib/win32/README-WIN32.txt new file mode 100644 index 0000000..1e4c093 --- /dev/null +++ b/compat/zlib/win32/README-WIN32.txt @@ -0,0 +1,103 @@ +ZLIB DATA COMPRESSION LIBRARY + +zlib 1.2.4 is a general purpose data compression library. All the code is +thread safe. The data format used by the zlib library is described by RFCs +(Request for Comments) 1950 to 1952 in the files +http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) +and rfc1952.txt (gzip format). + +All functions of the compression library are documented in the file zlib.h +(volunteer to write man pages welcome, contact zlib@gzip.org). Two compiled +examples are distributed in this package, example and minigzip. The example_d +and minigzip_d flavors validate that the zlib1.dll file is working correctly. + +Questions about zlib should be sent to . The zlib home page +is http://zlib.net/ . Before reporting a problem, please check this site to +verify that you have the latest version of zlib; otherwise get the latest +version and check whether the problem still exists or not. + +PLEASE read DLL_FAQ.txt, and the the zlib FAQ http://zlib.net/zlib_faq.html +before asking for help. + + +Manifest: + +The package zlib-1.2.4-win32-x86.zip contains the following files: + + README-WIN32.txt This document + ChangeLog Changes since previous zlib packages + DLL_FAQ.txt Frequently asked questions about zlib1.dll + zlib.3.pdf Documentation of this library in Adobe Acrobat format + + example.exe A statically-bound example (using zlib.lib, not the dll) + example.pdb Symbolic information for debugging example.exe + + example_d.exe A zlib1.dll bound example (using zdll.lib) + example_d.pdb Symbolic information for debugging example_d.exe + + minigzip.exe A statically-bound test program (using zlib.lib, not the dll) + minigzip.pdb Symbolic information for debugging minigzip.exe + + minigzip_d.exe A zlib1.dll bound test program (using zdll.lib) + minigzip_d.pdb Symbolic information for debugging minigzip_d.exe + + zlib.h Install these files into the compilers' INCLUDE path to + zconf.h compile programs which use zlib.lib or zdll.lib + + zdll.lib Install these files into the compilers' LIB path if linking + zdll.exp a compiled program to the zlib1.dll binary + + zlib.lib Install these files into the compilers' LIB path to link zlib + zlib.pdb into compiled programs, without zlib1.dll runtime dependency + (zlib.pdb provides debugging info to the compile time linker) + + zlib1.dll Install this binary shared library into the system PATH, or + the program's runtime directory (where the .exe resides) + zlib1.pdb Install in the same directory as zlib1.dll, in order to debug + an application crash using WinDbg or similar tools. + +All .pdb files above are entirely optional, but are very useful to a developer +attempting to diagnose program misbehavior or a crash. Many additional +important files for developers can be found in the zlib124.zip source package +available from http://zlib.net/ - review that package's README file for details. + + +Acknowledgments: + +The deflate format used by zlib was defined by Phil Katz. The deflate and +zlib specifications were written by L. Peter Deutsch. Thanks to all the +people who reported problems and suggested various improvements in zlib; they +are too numerous to cite here. + + +Copyright notice: + + (C) 1995-2010 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. diff --git a/compat/zlib/zconf.h b/compat/zlib/zconf.h index ce4c5f7..e9f7bd7 100644 --- a/compat/zlib/zconf.h +++ b/compat/zlib/zconf.h @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zconf.h,v 1.2 2010/03/16 09:01:02 nijtmans Exp $ */ +/* @(#) $Id: zconf.h,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #ifndef ZCONF_H #define ZCONF_H @@ -315,10 +315,6 @@ # endif #endif -#ifdef HAVE_VISIBILITY_PRAGMA -# define ZEXTERN __attribute__((visibility ("default"))) extern -#endif - #ifndef ZEXTERN # define ZEXTERN extern #endif @@ -364,8 +360,21 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#ifdef Z_HAVE_UNISTD_H +#ifdef STDC # include /* for off_t */ +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include /* for SEEK_* and off_t */ # ifdef VMS # include /* for off_t */ @@ -375,19 +384,22 @@ typedef uLong FAR uLongf; # endif #endif -#ifdef _LARGEFILE64_SOURCE -# include -#endif - #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t # define z_off_t long #endif +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + #if defined(__OS400__) # define NO_vsnprintf #endif diff --git a/compat/zlib/zconf.h.cmakein b/compat/zlib/zconf.h.cmakein index b659568..9e69b1b 100644 --- a/compat/zlib/zconf.h.cmakein +++ b/compat/zlib/zconf.h.cmakein @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zconf.h.cmakein,v 1.1 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: zconf.h.cmakein,v 1.2 2010/04/20 14:50:10 nijtmans Exp $ */ #ifndef ZCONF_H #define ZCONF_H @@ -317,10 +317,6 @@ # endif #endif -#ifdef HAVE_VISIBILITY_PRAGMA -# define ZEXTERN __attribute__((visibility ("default"))) extern -#endif - #ifndef ZEXTERN # define ZEXTERN extern #endif @@ -366,8 +362,21 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#ifdef Z_HAVE_UNISTD_H +#ifdef STDC # include /* for off_t */ +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include /* for SEEK_* and off_t */ # ifdef VMS # include /* for off_t */ @@ -377,19 +386,22 @@ typedef uLong FAR uLongf; # endif #endif -#ifdef _LARGEFILE64_SOURCE -# include -#endif - #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t # define z_off_t long #endif +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + #if defined(__OS400__) # define NO_vsnprintf #endif diff --git a/compat/zlib/zconf.h.in b/compat/zlib/zconf.h.in index e1a788b..d0a2267 100644 --- a/compat/zlib/zconf.h.in +++ b/compat/zlib/zconf.h.in @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zconf.h.in,v 1.1 2010/03/16 09:01:04 nijtmans Exp $ */ +/* @(#) $Id: zconf.h.in,v 1.2 2010/04/20 14:50:10 nijtmans Exp $ */ #ifndef ZCONF_H #define ZCONF_H @@ -315,10 +315,6 @@ # endif #endif -#ifdef HAVE_VISIBILITY_PRAGMA -# define ZEXTERN __attribute__((visibility ("default"))) extern -#endif - #ifndef ZEXTERN # define ZEXTERN extern #endif @@ -364,8 +360,21 @@ typedef uLong FAR uLongf; # define Z_HAVE_UNISTD_H #endif -#ifdef Z_HAVE_UNISTD_H +#ifdef STDC # include /* for off_t */ +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include /* for SEEK_* and off_t */ # ifdef VMS # include /* for off_t */ @@ -375,19 +384,22 @@ typedef uLong FAR uLongf; # endif #endif -#ifdef _LARGEFILE64_SOURCE -# include -#endif - #ifndef SEEK_SET # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif + #ifndef z_off_t # define z_off_t long #endif +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define z_off64_t off64_t +#else +# define z_off64_t z_off_t +#endif + #if defined(__OS400__) # define NO_vsnprintf #endif diff --git a/compat/zlib/zlib.3 b/compat/zlib/zlib.3 index 52999c7..27adc4c 100644 --- a/compat/zlib/zlib.3 +++ b/compat/zlib/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "14 March 2010" +.TH ZLIB 3 "19 Apr 2010" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -125,7 +125,7 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS -Version 1.2.4 +Version 1.2.5 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). .LP diff --git a/compat/zlib/zlib.3.pdf b/compat/zlib/zlib.3.pdf index 05ed2d0..9f8a2c3 100644 Binary files a/compat/zlib/zlib.3.pdf and b/compat/zlib/zlib.3.pdf differ diff --git a/compat/zlib/zlib.h b/compat/zlib/zlib.h index f5785be..bfbba83 100644 --- a/compat/zlib/zlib.h +++ b/compat/zlib/zlib.h @@ -1,5 +1,5 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.4, Mar 14th, 2010 + version 1.2.5, April 19th, 2010 Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.4" -#define ZLIB_VERNUM 0x1240 +#define ZLIB_VERSION "1.2.5" +#define ZLIB_VERNUM 0x1250 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 4 +#define ZLIB_VER_REVISION 5 #define ZLIB_VER_SUBREVISION 0 /* @@ -1556,29 +1556,35 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, sizeof(z_stream)) -#ifdef _LARGEFILE64_SOURCE +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); - ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); #endif -#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64 +#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 # define gzopen gzopen64 # define gzseek gzseek64 # define gztell gztell64 # define gzoffset gzoffset64 # define adler32_combine adler32_combine64 # define crc32_combine crc32_combine64 -# ifndef _LARGEFILE64_SOURCE +# ifdef _LARGEFILE64_SOURCE ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int)); - ZEXTERN off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); # endif #else ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); @@ -1589,10 +1595,12 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); #endif +/* hack for buggy compilers */ #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; /* hack for buggy compilers */ + struct internal_state {int dummy;}; #endif +/* undocumented functions */ ZEXTERN const char * ZEXPORT zError OF((int)); ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); diff --git a/compat/zlib/zlib.pc.in b/compat/zlib/zlib.pc.in index b4f98e5..7e5acf9 100644 --- a/compat/zlib/zlib.pc.in +++ b/compat/zlib/zlib.pc.in @@ -1,6 +1,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ +sharedlibdir=@sharedlibdir@ includedir=@includedir@ Name: zlib @@ -8,5 +9,5 @@ Description: zlib compression library Version: @VERSION@ Requires: -Libs: -L${libdir} -lz +Libs: -L${libdir} -L${sharedlibdir} -lz Cflags: -I${includedir} diff --git a/compat/zlib/zutil.c b/compat/zlib/zutil.c index f46f523..7a55c44 100644 --- a/compat/zlib/zutil.c +++ b/compat/zlib/zutil.c @@ -1,9 +1,9 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. + * Copyright (C) 1995-2005, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zutil.c,v 1.2 2010/03/16 09:01:04 nijtmans Exp $ */ +/* @(#) $Id: zutil.c,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #include "zutil.h" @@ -117,9 +117,9 @@ uLong ZEXPORT zlibCompileFlags() # ifndef verbose # define verbose 0 # endif -int z_verbose = verbose; +int ZLIB_INTERNAL z_verbose = verbose; -void z_error (m) +void ZLIB_INTERNAL z_error (m) char *m; { fprintf(stderr, "%s\n", m); @@ -146,7 +146,7 @@ const char * ZEXPORT zError(err) #ifndef HAVE_MEMCPY -void zmemcpy(dest, source, len) +void ZLIB_INTERNAL zmemcpy(dest, source, len) Bytef* dest; const Bytef* source; uInt len; @@ -157,7 +157,7 @@ void zmemcpy(dest, source, len) } while (--len != 0); } -int zmemcmp(s1, s2, len) +int ZLIB_INTERNAL zmemcmp(s1, s2, len) const Bytef* s1; const Bytef* s2; uInt len; @@ -170,7 +170,7 @@ int zmemcmp(s1, s2, len) return 0; } -void zmemzero(dest, len) +void ZLIB_INTERNAL zmemzero(dest, len) Bytef* dest; uInt len; { @@ -213,7 +213,7 @@ local ptr_table table[MAX_PTR]; * a protected system like OS/2. Use Microsoft C instead. */ -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) { voidpf buf = opaque; /* just to make some compilers happy */ ulg bsize = (ulg)items*size; @@ -237,7 +237,7 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) return buf; } -void zcfree (voidpf opaque, voidpf ptr) +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { int n; if (*(ush*)&ptr != 0) { /* object < 64K */ @@ -272,13 +272,13 @@ void zcfree (voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) +voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size) { if (opaque) opaque = 0; /* to make compiler happy */ return _halloc((long)items, size); } -void zcfree (voidpf opaque, voidpf ptr) +void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { if (opaque) opaque = 0; /* to make compiler happy */ _hfree(ptr); @@ -297,7 +297,7 @@ extern voidp calloc OF((uInt items, uInt size)); extern void free OF((voidpf ptr)); #endif -voidpf zcalloc (opaque, items, size) +voidpf ZLIB_INTERNAL zcalloc (opaque, items, size) voidpf opaque; unsigned items; unsigned size; @@ -307,7 +307,7 @@ voidpf zcalloc (opaque, items, size) (voidpf)calloc(items, size); } -void zcfree (opaque, ptr) +void ZLIB_INTERNAL zcfree (opaque, ptr) voidpf opaque; voidpf ptr; { diff --git a/compat/zlib/zutil.h b/compat/zlib/zutil.h index 2450ae7..51a43fb 100644 --- a/compat/zlib/zutil.h +++ b/compat/zlib/zutil.h @@ -8,12 +8,17 @@ subject to change. Applications should only use zlib.h. */ -/* @(#) $Id: zutil.h,v 1.2 2010/03/16 09:01:03 nijtmans Exp $ */ +/* @(#) $Id: zutil.h,v 1.3 2010/04/20 14:50:10 nijtmans Exp $ */ #ifndef ZUTIL_H #define ZUTIL_H -#define ZLIB_INTERNAL +#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ) +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + #include "zlib.h" #ifdef STDC @@ -24,19 +29,6 @@ # include #endif -#if defined(UNDER_CE) && defined(NO_ERRNO_H) -# define zseterrno(ERR) SetLastError((DWORD)(ERR)) -# define zerrno() ((int)GetLastError()) -#else -# ifdef NO_ERRNO_H - extern int errno; -# else -# include -# endif -# define zseterrno(ERR) do { errno = (ERR); } while (0) -# define zerrno() errno -#endif - #ifndef local # define local static #endif @@ -167,10 +159,10 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #pragma warn -8066 #endif -#ifdef _LARGEFILE64_SOURCE -# define z_off64_t off64_t -#else -# define z_off64_t z_off_t +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); #endif /* common defaults */ @@ -183,12 +175,6 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define F_OPEN(name, mode) fopen((name), (mode)) #endif -#ifdef _LARGEFILE64_SOURCE -# define F_OPEN64(name, mode) fopen64((name), (mode)) -#else -# define F_OPEN64(name, mode) fopen((name), (mode)) -#endif - /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) @@ -250,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define zmemzero(dest, len) memset(dest, 0, len) # endif #else - extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - extern void zmemzero OF((Bytef* dest, uInt len)); + void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); + int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); + void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); #endif /* Diagnostic functions */ #ifdef DEBUG # include - extern int z_verbose; - extern void z_error OF((char *m)); + extern int ZLIB_INTERNAL z_verbose; + extern void ZLIB_INTERNAL z_error OF((char *m)); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} @@ -276,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif -voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); -void zcfree OF((voidpf opaque, voidpf ptr)); +voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, + unsigned size)); +void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); #define ZALLOC(strm, items, size) \ (*((strm)->zalloc))((strm)->opaque, (items), (size)) -- cgit v0.12 From 4c3a083386d8c35e9a7d32b9f88b3ba9dc9fc9de Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 22 Apr 2010 11:40:31 +0000 Subject: Move TCHAR fallback typedef from tcl.h to tclPlatDecls.h (as suggested by dgp) Eliminate various unnecessary type casts. --- ChangeLog | 14 ++++++++++++ generic/tcl.h | 14 +----------- generic/tclIOUtil.c | 4 ++-- generic/tclInt.h | 4 ++-- generic/tclPlatDecls.h | 15 ++++++++++++- unix/tclUnixFile.c | 10 ++++----- unix/tclUnixPipe.c | 4 ++-- win/tclWinChan.c | 4 ++-- win/tclWinFCmd.c | 8 +++---- win/tclWinFile.c | 60 +++++++++++++++++++++++++------------------------- win/tclWinLoad.c | 4 ++-- win/tclWinPipe.c | 4 ++-- 12 files changed, 80 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index d158bf0..5d95fe7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-04-22 Jan Nijtmans + + * generic/tclPlatDecls.h Move TCHAR fallback typedef from tcl.h to + * generic/tcl.h tclPlatDecls.h (as suggested by dgp) + * generic/tclInt.h fix typo + * generic/tclIOUtil.c Eliminate various unnecessary + * unix/tclUnixFile.c type casts. + * unix/tclUnixPipe.c + * win/tclWinChan.c + * win/tclWinFCmd.c + * win/tclWinFile.c + * win/tclWinLoad.c + * win/tclWinPipe.c + 2010-04-20 Jan Nijtmans * generic/tclTest.c Use function prototypes from the FS API. diff --git a/generic/tcl.h b/generic/tcl.h index f9ce79a..8fd5772 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.304 2010/04/15 14:56:32 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.305 2010/04/22 11:40:31 nijtmans Exp $ */ #ifndef _TCL @@ -2376,18 +2376,6 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); #endif /* - * Unfortunately, TCHAR is needed in tclPlatDecls.h for - * win32, so if TCHAR is not defined yet do it here. - * This way, we don't need to include just - * for one define. - */ -#if !defined(_TCHAR_DEFINED) -# if defined(__WIN32__) - typedef char TCHAR; -# define _TCHAR_DEFINED -# endif -#endif -/* *---------------------------------------------------------------------------- * Include the public function declarations that are accessible via the stubs * table. diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 6723f27..69114e3 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.174 2010/04/04 15:11:51 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.175 2010/04/22 11:40:31 nijtmans Exp $ */ #include "tclInt.h" @@ -4568,7 +4568,7 @@ const char * Tcl_FSGetNativePath( Tcl_Obj *pathPtr) { - return (const char *) Tcl_FSGetInternalRep(pathPtr, &tclNativeFilesystem); + return Tcl_FSGetInternalRep(pathPtr, &tclNativeFilesystem); } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 047a823..d04bd07 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.468 2010/04/05 19:44:45 ferrieux Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.469 2010/04/22 11:40:31 nijtmans Exp $ */ #ifndef _TCLINT @@ -64,7 +64,7 @@ typedef int ptrdiff_t; #endif /* - * Ensure WORDS_BIGENDIAN is defined correcly: + * Ensure WORDS_BIGENDIAN is defined correctly: * Needs to happen here in addition to configure to work with fat compiles on * Darwin (where configure runs only once for multiple architectures). */ diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index b9117ac..6d44a7e 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.38 2010/04/15 13:58:44 nijtmans Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.39 2010/04/22 11:40:31 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -29,6 +29,19 @@ * in the generic/tcl.decls script. */ +/* + * TCHAR is needed here for win32, so if it is not defined yet do it here. + * This way, we don't need to include just for one define. + */ +#if defined(_WIN32) && !defined(_TCHAR_DEFINED) +# if defined(_UNICODE) + typedef wchar_t TCHAR; +# else + typedef char TCHAR; +# endif +# define _TCHAR_DEFINED +#endif + /* !BEGIN!: Do not edit below this line. */ /* diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index a656f4c..d6cf239 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixFile.c,v 1.56 2009/12/16 23:26:00 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.57 2010/04/22 11:40:32 nijtmans Exp $ */ #include "tclInt.h" @@ -232,9 +232,9 @@ TclpMatchInDirectory( Tcl_Obj *tailPtr; const char *nativeTail; - native = (const char *) Tcl_FSGetNativePath(pathPtr); + native = Tcl_FSGetNativePath(pathPtr); tailPtr = TclPathPart(interp, pathPtr, TCL_PATH_TAIL); - nativeTail = (const char *) Tcl_FSGetNativePath(tailPtr); + nativeTail = Tcl_FSGetNativePath(tailPtr); matchResult = NativeMatchType(interp, native, nativeTail, types); if (matchResult == 1) { Tcl_ListObjAppendElement(interp, resultPtr, pathPtr); @@ -1115,7 +1115,7 @@ TclNativeCreateNativeRep( memcpy(nativePathPtr, Tcl_DStringValue(&ds), (size_t) len); Tcl_DStringFree(&ds); - return (ClientData)nativePathPtr; + return nativePathPtr; } /* @@ -1154,7 +1154,7 @@ TclNativeDupInternalRep( copy = ckalloc(len); memcpy(copy, clientData, len); - return (ClientData) copy; + return copy; } /* diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index ccb97c2..391c7a1 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.52 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.53 2010/04/22 11:40:32 nijtmans Exp $ */ #include "tclInt.h" @@ -263,7 +263,7 @@ TclpTempFileName(void) fcntl(fd, F_SETFD, FD_CLOEXEC); unlink(fileName); /* INTL: Native. */ - result = TclpNativeToNormalized((ClientData) fileName); + result = TclpNativeToNormalized(fileName); close(fd); return result; } diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 6ab056d..400fb64 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.56 2010/03/16 16:18:35 nijtmans Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.57 2010/04/22 11:40:32 nijtmans Exp $ */ #include "tclWinInt.h" @@ -856,7 +856,7 @@ TclpOpenFileChannel( char channelName[16 + TCL_INTEGER_SPACE]; TclFile readFile = NULL, writeFile = NULL; - nativeName = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); + nativeName = Tcl_FSGetNativePath(pathPtr); if (nativeName == NULL) { return NULL; } diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 6fa7441..89cb59f 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.61 2010/03/07 14:39:25 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.62 2010/04/22 11:40:32 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1188,7 +1188,7 @@ DoRemoveDirectory( * filled with UTF-8 name of file causing * error. */ { - int res = DoRemoveJustDirectory(Tcl_DStringValue(pathPtr), recursive, + int res = DoRemoveJustDirectory((const TCHAR *)Tcl_DStringValue(pathPtr), recursive, errorPtr); if ((res == TCL_ERROR) && (recursive != 0) && (Tcl_GetErrno() == EEXIST)) { @@ -1400,8 +1400,8 @@ TraverseWinTree( * files in that directory. */ - result = traverseProc(Tcl_DStringValue(sourcePtr), - (targetPtr == NULL ? NULL : Tcl_DStringValue(targetPtr)), + result = traverseProc((const TCHAR *)Tcl_DStringValue(sourcePtr), + (const TCHAR *)(targetPtr == NULL ? NULL : Tcl_DStringValue(targetPtr)), DOTREE_POSTD, errorPtr); } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index b18aa1c..c38a86f 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.106 2010/04/13 13:37:29 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.107 2010/04/22 11:40:32 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -667,7 +667,7 @@ WinReadLinkDirectory( } } - tclWinProcs->tchar2utf((const char *) + tclWinProcs->tchar2utf((const TCHAR *) reparseBuffer->MountPointReparseBuffer.PathBuffer, (int) reparseBuffer->MountPointReparseBuffer .SubstituteNameLength, &ds); @@ -908,7 +908,7 @@ TclpMatchInDirectory( DWORD attr; const char *str = Tcl_GetStringFromObj(norm,&len); - native = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); + native = Tcl_FSGetNativePath(pathPtr); if (tclWinProcs->getFileAttributesExProc == NULL) { attr = tclWinProcs->getFileAttributesProc(native); @@ -1851,7 +1851,7 @@ TclpObjChdir( Tcl_DString ds; #endif /* __CYGWIN__ */ - nativePath = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); + nativePath = Tcl_FSGetNativePath(pathPtr); #ifdef __CYGWIN__ /* @@ -2003,7 +2003,7 @@ TclpObjStat( TclWinFlushDirtyChannels(); - return NativeStat((const TCHAR *) Tcl_FSGetNativePath(pathPtr), + return NativeStat(Tcl_FSGetNativePath(pathPtr), statPtr, 0); } @@ -2394,7 +2394,7 @@ TclpGetNativeCwd( } } - return TclNativeDupInternalRep((ClientData) buffer); + return TclNativeDupInternalRep(buffer); } int @@ -2402,7 +2402,7 @@ TclpObjAccess( Tcl_Obj *pathPtr, int mode) { - return NativeAccess((const TCHAR *) Tcl_FSGetNativePath(pathPtr), mode); + return NativeAccess(Tcl_FSGetNativePath(pathPtr), mode); } int @@ -2418,7 +2418,7 @@ TclpObjLstat( TclWinFlushDirtyChannels(); - return NativeStat((const TCHAR *) Tcl_FSGetNativePath(pathPtr), + return NativeStat(Tcl_FSGetNativePath(pathPtr), statPtr, 1); } @@ -2431,15 +2431,15 @@ TclpObjLink( { if (toPtr != NULL) { int res; - TCHAR *LinkTarget; - TCHAR *LinkSource = (TCHAR *) Tcl_FSGetNativePath(pathPtr); + const TCHAR *LinkTarget; + const TCHAR *LinkSource = Tcl_FSGetNativePath(pathPtr); Tcl_Obj *normalizedToPtr = Tcl_FSGetNormalizedPath(NULL, toPtr); if (normalizedToPtr == NULL) { return NULL; } - LinkTarget = (TCHAR *) Tcl_FSGetNativePath(normalizedToPtr); + LinkTarget = Tcl_FSGetNativePath(normalizedToPtr); if (LinkSource == NULL || LinkTarget == NULL) { return NULL; @@ -2451,7 +2451,7 @@ TclpObjLink( return NULL; } } else { - TCHAR *LinkSource = (TCHAR *) Tcl_FSGetNativePath(pathPtr); + const TCHAR *LinkSource = Tcl_FSGetNativePath(pathPtr); if (LinkSource == NULL) { return NULL; @@ -2501,14 +2501,14 @@ TclpFilesystemPathType( firstSeparator = strchr(path, '/'); if (firstSeparator == NULL) { found = tclWinProcs->getVolumeInformationProc( - Tcl_FSGetNativePath(pathPtr), NULL, 0, NULL, NULL, NULL, + Tcl_FSGetNativePath(pathPtr), NULL, 0, NULL, NULL, NULL, volType, VOL_BUF_SIZE); } else { Tcl_Obj *driveName = Tcl_NewStringObj(path, firstSeparator - path+1); Tcl_IncrRefCount(driveName); found = tclWinProcs->getVolumeInformationProc( - Tcl_FSGetNativePath(driveName), NULL, 0, NULL, NULL, NULL, + Tcl_FSGetNativePath(driveName), NULL, 0, NULL, NULL, NULL, volType, VOL_BUF_SIZE); Tcl_DecrRefCount(driveName); } @@ -2519,7 +2519,7 @@ TclpFilesystemPathType( Tcl_DString ds; Tcl_Obj *objPtr; - tclWinProcs->tchar2utf((const char *) volType, -1, &ds); + tclWinProcs->tchar2utf(volType, -1, &ds); objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); @@ -2667,7 +2667,7 @@ TclpObjNormalizePath( * path segment and continue */ - Tcl_DStringAppend(&dsNorm, (TCHAR *) + Tcl_DStringAppend(&dsNorm, (const char *) (nativePath + Tcl_DStringLength(&ds)-dotLen), dotLen); } else { @@ -2675,7 +2675,7 @@ TclpObjNormalizePath( * Normal path. */ - WIN32_FIND_DATA fData; + WIN32_FIND_DATAA fData; HANDLE handle; handle = FindFirstFileA(nativePath, &fData); @@ -2746,7 +2746,7 @@ TclpObjNormalizePath( */ WIN32_FILE_ATTRIBUTE_DATA data; - const char *nativePath = tclWinProcs->utf2tchar(path, + const TCHAR *nativePath = tclWinProcs->utf2tchar(path, currentPathEndPosition - path, &ds); if (tclWinProcs->getFileAttributesExProc(nativePath, @@ -2773,7 +2773,7 @@ TclpObjNormalizePath( ((WCHAR *) nativePath)[i] = wc; } } - Tcl_DStringAppend(&dsNorm, nativePath, + Tcl_DStringAppend(&dsNorm, (const char *)nativePath, (int)(sizeof(WCHAR) * len)); lastValidPathEnd = currentPathEndPosition; } @@ -2855,7 +2855,7 @@ TclpObjNormalizePath( drive -= (L'a' - L'A'); ((WCHAR *) nativePath)[0] = drive; } - Tcl_DStringAppend(&dsNorm, nativePath, + Tcl_DStringAppend(&dsNorm, (const char *)nativePath, Tcl_DStringLength(&ds)); } else { char *checkDots = NULL; @@ -2880,8 +2880,8 @@ TclpObjNormalizePath( * path segment and continue. */ - Tcl_DStringAppend(&dsNorm, (TCHAR *) - ((WCHAR*)(nativePath + Tcl_DStringLength(&ds)) + Tcl_DStringAppend(&dsNorm, (const char *) + ((WCHAR *)(nativePath + Tcl_DStringLength(&ds)) - dotLen), (int)(dotLen * sizeof(WCHAR))); } else { /* @@ -2911,7 +2911,7 @@ TclpObjNormalizePath( FindClose(handle); Tcl_DStringAppend(&dsNorm, (const char *) L"/", sizeof(WCHAR)); - Tcl_DStringAppend(&dsNorm, (TCHAR *) nativeName, + Tcl_DStringAppend(&dsNorm, (const char *) nativeName, (int) (wcslen(nativeName)*sizeof(WCHAR))); } } @@ -2940,7 +2940,7 @@ TclpObjNormalizePath( if (1) { WCHAR wpath[MAX_PATH]; - const char *nativePath = + const TCHAR *nativePath = tclWinProcs->utf2tchar(path, lastValidPathEnd - path, &ds); DWORD wpathlen = tclWinProcs->getLongPathNameProc(nativePath, (TCHAR *) wpath, MAX_PATH); @@ -2952,7 +2952,7 @@ TclpObjNormalizePath( if (wpath[0] >= L'a') { wpath[0] -= (L'a' - L'A'); } - Tcl_DStringAppend(&dsNorm, (TCHAR*)wpath, wpathlen*sizeof(WCHAR)); + Tcl_DStringAppend(&dsNorm, (const char *)wpath, wpathlen*sizeof(WCHAR)); Tcl_DStringFree(&ds); } #endif @@ -2972,7 +2972,7 @@ TclpObjNormalizePath( Tcl_DString dsTemp; - tclWinProcs->tchar2utf(Tcl_DStringValue(&dsNorm), + tclWinProcs->tchar2utf((const TCHAR *)Tcl_DStringValue(&dsNorm), Tcl_DStringLength(&dsNorm), &dsTemp); nextCheckpoint = Tcl_DStringLength(&dsTemp); if (*lastValidPathEnd != 0) { @@ -3150,7 +3150,7 @@ TclpNativeToNormalized( int len; char *copy, *p; - tclWinProcs->tchar2utf((const char *) clientData, -1, &ds); + tclWinProcs->tchar2utf((const TCHAR *) clientData, -1, &ds); copy = Tcl_DStringValue(&ds); len = Tcl_DStringLength(&ds); @@ -3255,7 +3255,7 @@ TclNativeCreateNativeRep( memcpy(nativePathPtr, Tcl_DStringValue(&ds), (size_t) len); Tcl_DStringFree(&ds); - return (ClientData) nativePathPtr; + return nativePathPtr; } /* @@ -3302,7 +3302,7 @@ TclNativeDupInternalRep( copy = (char *) ckalloc(len); memcpy(copy, clientData, len); - return (ClientData) copy; + return copy; } /* @@ -3337,7 +3337,7 @@ TclpUtime( FromCTime(tval->actime, &lastAccessTime); FromCTime(tval->modtime, &lastModTime); - native = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); + native = Tcl_FSGetNativePath(pathPtr); attr = tclWinProcs->getFileAttributesProc(native); diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index f1eb1e0..3eb0134 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.28 2010/04/13 13:37:29 nijtmans Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.29 2010/04/22 11:40:32 nijtmans Exp $ */ #include "tclWinInt.h" @@ -347,7 +347,7 @@ TclpTempFileNameForLibrary(Tcl_Interp* interp, /* Tcl interpreter */ Tcl_AppendResult(interp, "couldn't create temporary directory: ", Tcl_PosixError(interp), NULL); } - fileName = TclpNativeToNormalized((ClientData) dllDirectoryName); + fileName = TclpNativeToNormalized(dllDirectoryName); tail = TclPathPart(interp, path, TCL_PATH_TAIL); if (tail == NULL) { Tcl_DecrRefCount(fileName); diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 2ee7310..7c19e38 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.78 2010/03/20 12:00:42 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.79 2010/04/22 11:40:32 nijtmans Exp $ */ #include "tclWinInt.h" @@ -766,7 +766,7 @@ TclpTempFileName(void) return NULL; } - return TclpNativeToNormalized((ClientData) fileName); + return TclpNativeToNormalized(fileName); } /* -- cgit v0.12 From 31f9ebcae6f4c9e30de64b164c8e35f1f13db6e1 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 23 Apr 2010 15:45:15 +0000 Subject: Fix [Bug #2991415] tclport.h #included before limits.h --- ChangeLog | 4 ++++ unix/tclUnixPort.h | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5d95fe7..5a2b140 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-23 Jan Nijtmans + + * unix/tclUnixPort.h Fix [Bug #2991415] tclport.h #included before limits.h + 2010-04-22 Jan Nijtmans * generic/tclPlatDecls.h Move TCHAR fallback typedef from tcl.h to diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 237224e..6ed41a1 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.71 2010/02/22 23:31:41 nijtmans Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.72 2010/04/23 15:45:15 nijtmans Exp $ */ #ifndef _TCLUNIXPORT @@ -104,6 +104,11 @@ typedef off_t Tcl_SeekOffset; #if HAVE_INTTYPES_H # include #endif +#ifdef NO_LIMITS_H +# include "../compat/limits.h" +#else +# include +#endif #if HAVE_STDINT_H # include #endif -- cgit v0.12 From eac8ecf3bb3d3d4cc99c78f12abf28cf9e408174 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 24 Apr 2010 17:07:31 +0000 Subject: * generic/tclBasic.test: modify api of TclSpliceTailcall() * generic/tclExecute.c: to fix yieldTo, which had not survived * generic/tclInt.h: the latest mods to tailcall. Thanks kbk for detecting the problem. --- ChangeLog | 7 +++++++ generic/tclBasic.c | 14 +++++++------- generic/tclExecute.c | 4 ++-- generic/tclInt.h | 5 +++-- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a2b140..621f806 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-24 Miguel Sofer + + * generic/tclBasic.test: modify api of TclSpliceTailcall() + * generic/tclExecute.c: to fix yieldTo, which had not survived + * generic/tclInt.h: the latest mods to tailcall. Thanks kbk + for detecting the problem. + 2010-04-23 Jan Nijtmans * unix/tclUnixPort.h Fix [Bug #2991415] tclport.h #included before limits.h diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ca2b045..e3b5714 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.450 2010/04/05 19:44:45 ferrieux Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.451 2010/04/24 17:07:31 msofer Exp $ */ #include "tclInt.h" @@ -8270,25 +8270,25 @@ Tcl_NRCmdSwap( void TclSpliceTailcall( Tcl_Interp *interp, - TEOV_callback *tailcallPtr) + TEOV_callback *tailcallPtr, + int skip) { /* * Find the splicing spot: right before the NRCommand of the thing * being tailcalled. Note that we skip NRCommands marked in data[1] * (used by command redirectors), and we skip the first command that we - * find: it corresponds to [tailcall] itself. + * find if requested to do so: it corresponds to [tailcall] itself. */ Interp *iPtr = (Interp *) interp; TEOV_callback *runPtr; ExecEnv *eePtr = NULL; - int second = 0; restart: for (runPtr = TOP_CB(interp); runPtr; runPtr = runPtr->nextPtr) { if (((runPtr->procPtr) == NRCommand) && !runPtr->data[1]) { - if (second) break; - second = 1; + if (!skip) break; + skip = 0; } } if (!runPtr) { @@ -8566,7 +8566,7 @@ YieldToCallback( cbPtr = TOP_CB(interp); TOP_CB(interp) = cbPtr->nextPtr; - TclSpliceTailcall(interp, cbPtr); + TclSpliceTailcall(interp, cbPtr, 0); return TCL_OK; } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a7212ef..3c440c3 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.476 2010/04/19 15:43:36 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.477 2010/04/24 17:07:32 msofer Exp $ */ #include "tclInt.h" @@ -2872,7 +2872,7 @@ TclExecuteByteCode( goto checkForCatch; } iPtr->varFramePtr->tailcallPtr = param; - TclSpliceTailcall(interp, param); + TclSpliceTailcall(interp, param, 1); goto abnormalReturn; case TCL_NR_YIELD_TYPE: { /* [yield] */ CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; diff --git a/generic/tclInt.h b/generic/tclInt.h index d04bd07..28b0e3c 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.469 2010/04/22 11:40:31 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.470 2010/04/24 17:07:32 msofer Exp $ */ #ifndef _TCLINT @@ -2756,7 +2756,8 @@ MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldToObjCmd; MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, struct TEOV_callback *tailcallPtr); MODULE_SCOPE void TclSpliceTailcall(Tcl_Interp *interp, - struct TEOV_callback *tailcallPtr); + struct TEOV_callback *tailcallPtr, + int skip); /* * This structure holds the data for the various iteration callbacks used to -- cgit v0.12 From 645ae6e948ae08dfa895b2c01c79119733011da6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sun, 25 Apr 2010 13:39:24 +0000 Subject: * generic/tclBasic.c: add unsupported [yieldm] command. * generic/tclInt.h: --- ChangeLog | 7 +++++- generic/tclBasic.c | 66 +++++++++++++++++++++++++++++++++++------------------- generic/tclInt.h | 6 ++++- 3 files changed, 54 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 621f806..6e07a11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +2010-04-25 Miguel Sofer + + * generic/tclBasic.c: add unsupported [yieldm] command. + * generic/tclInt.h: + 2010-04-24 Miguel Sofer - * generic/tclBasic.test: modify api of TclSpliceTailcall() + * generic/tclBasic.c: modify api of TclSpliceTailcall() * generic/tclExecute.c: to fix yieldTo, which had not survived * generic/tclInt.h: the latest mods to tailcall. Thanks kbk for detecting the problem. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index e3b5714..11ddefd 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.451 2010/04/24 17:07:31 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.452 2010/04/25 13:39:25 msofer Exp $ */ #include "tclInt.h" @@ -800,6 +800,8 @@ Tcl_CreateInterp(void) Tcl_NRCreateCommand(interp, "::tcl::unsupported::yieldTo", NULL, TclNRYieldToObjCmd, NULL, NULL); + Tcl_NRCreateCommand(interp, "::tcl::unsupported::yieldm", NULL, + TclNRYieldmObjCmd, NULL, NULL); #ifdef USE_DTRACE /* @@ -8486,13 +8488,29 @@ TclNRYieldObjCmd( iPtr->numLevels = corPtr->auxNumLevels; corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; - + corPtr->nargs = -2; + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; } int +TclNRYieldmObjCmd( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *const objv[]) +{ + CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; + int result; + + result = TclNRYieldObjCmd(clientData, interp, objc, objv); + corPtr->nargs = -1; + return result; +} + +int TclNRYieldToObjCmd( ClientData clientData, Tcl_Interp *interp, @@ -8500,7 +8518,6 @@ TclNRYieldToObjCmd( Tcl_Obj *const objv[]) { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - int numLevels = iPtr->numLevels; Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; @@ -8518,10 +8535,9 @@ TclNRYieldToObjCmd( return TCL_ERROR; } - iPtr->numLevels = corPtr->auxNumLevels; - corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; - /* + * Add the tailcall in the caller env, then just yield. + * * This is essentially code from TclNRTailcallObjCmd */ @@ -8544,9 +8560,7 @@ TclNRYieldToObjCmd( NULL); iPtr->execEnvPtr = corPtr->eePtr; - TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), - NULL, NULL, NULL); - return TCL_OK; + return TclNRYieldObjCmd(clientData, interp, objc-1, objv+1); } static int @@ -8716,16 +8730,8 @@ NRInterpCoroutine( { CoroutineData *corPtr = clientData; int nestNumLevels = corPtr->auxNumLevels; - - /* - * objc==0 indicates a call to rewind the coroutine - */ - - if (objc > 2) { - Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); - return TCL_ERROR; - } - + int nargs = corPtr->nargs; + if (!COR_IS_SUSPENDED(corPtr)) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "coroutine \"", Tcl_GetString(objv[0]), @@ -8734,16 +8740,30 @@ NRInterpCoroutine( return TCL_ERROR; } + if (nargs == -2) { + if (objc > 2) { + Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); + return TCL_ERROR; + } else if (objc == 2) { + Tcl_SetObjResult(interp, objv[1]); + } + } else { + if ((nargs != -1) && (nargs != (objc-1))) { + Tcl_SetObjResult(interp, + Tcl_NewStringObj("wrong coro nargs; how did we get here? not implemeted!", -1)); + return TCL_ERROR; + } + if (objc > 1) { + Tcl_SetObjResult(interp, Tcl_NewListObj(objc-1, objv+1)); + } + } + /* * Swap the interp's environment to make it suitable to run this * coroutine. TEBC needs no info to resume executing after a suspension: * the codePtr will be read from the execEnv's saved bottomPtr. */ - if (objc == 2) { - Tcl_SetObjResult(interp, objv[1]); - } - SAVE_CONTEXT(corPtr->caller); RESTORE_CONTEXT(corPtr->running); corPtr->auxNumLevels = iPtr->numLevels; diff --git a/generic/tclInt.h b/generic/tclInt.h index 28b0e3c..965f69b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.470 2010/04/24 17:07:32 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.471 2010/04/25 13:39:25 msofer Exp $ */ #ifndef _TCLINT @@ -1494,6 +1494,9 @@ typedef struct CoroutineData { /* Where to stash the caller's bottomPointer, * if the coro is running in the caller's TEBC * instance. Put a NULL in there otherwise. */ + int nargs; /* Number of args required for resuming this + * coroutine; -2 means "0 or 1" (default), -1 + * means "any" */ } CoroutineData; typedef struct ExecEnv { @@ -2751,6 +2754,7 @@ MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback; MODULE_SCOPE Tcl_ObjCmdProc TclNRTailcallObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd; +MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldmObjCmd; MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldToObjCmd; MODULE_SCOPE void TclClearTailcall(Tcl_Interp *interp, -- cgit v0.12 From f49dacd43520f86a548ed97f21b8fbd24c016153 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 26 Apr 2010 13:32:27 +0000 Subject: * generic/tclStubInit.c: Add a small amount of gcc-isms (with #ifdef * generic/tclOOStubInit.c: guards) to ensure that warnings are issued when these files are older than the various *.decls files. --- ChangeLog | 19 +++++++++++++------ generic/tclOOStubInit.c | 6 +++++- generic/tclStubInit.c | 8 +++++++- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e07a11..e8017cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,18 +1,25 @@ +2010-04-26 Donal K. Fellows + + * generic/tclStubInit.c: Add a small amount of gcc-isms (with #ifdef + * generic/tclOOStubInit.c: guards) to ensure that warnings are issued + when these files are older than the various *.decls files. + 2010-04-25 Miguel Sofer - * generic/tclBasic.c: add unsupported [yieldm] command. + * generic/tclBasic.c: Add unsupported [yieldm] command. * generic/tclInt.h: 2010-04-24 Miguel Sofer - * generic/tclBasic.c: modify api of TclSpliceTailcall() - * generic/tclExecute.c: to fix yieldTo, which had not survived - * generic/tclInt.h: the latest mods to tailcall. Thanks kbk - for detecting the problem. + * generic/tclBasic.c: Modify api of TclSpliceTailcall() to fix + * generic/tclExecute.c: yieldTo, which had not survived the latest + * generic/tclInt.h: mods to tailcall. Thanks kbk for detecting + the problem. 2010-04-23 Jan Nijtmans - * unix/tclUnixPort.h Fix [Bug #2991415] tclport.h #included before limits.h + * unix/tclUnixPort.h: [Bug 2991415]: tclport.h #included before + limits.h 2010-04-22 Jan Nijtmans diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c index d83c719..bb46abb 100644 --- a/generic/tclOOStubInit.c +++ b/generic/tclOOStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: tclOOStubInit.c,v 1.10 2010/02/15 22:56:20 nijtmans Exp $ + * $Id: tclOOStubInit.c,v 1.11 2010/04/26 13:32:33 dkf Exp $ * * This file is (mostly) automatically generated from tclOO.decls. * It is compiled and linked in with the tclOO package proper. @@ -12,6 +12,10 @@ MODULE_SCOPE const TclOOStubs tclOOStubs; +#ifdef __GNUC__ +#pragma GCC dependency "tclOO.decls" +#endif + /* !BEGIN!: Do not edit below this line. */ static const TclOOIntStubs tclOOIntStubs = { diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 7cfa58a..d27f626 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,12 +8,18 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.190 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.191 2010/04/26 13:32:33 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" +#ifdef __GNUC__ +#pragma GCC dependency "tcl.decls" +#pragma GCC dependency "tclInt.decls" +#pragma GCC dependency "tclTomMath.decls" +#endif + /* * Remove macros that will interfere with the definitions below. */ -- cgit v0.12 From 029c446654c56522b070653cc19103d11fc57c2a Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 26 Apr 2010 13:34:20 +0000 Subject: typofix --- ChangeLog | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8017cc..8b457b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,22 +23,22 @@ 2010-04-22 Jan Nijtmans - * generic/tclPlatDecls.h Move TCHAR fallback typedef from tcl.h to - * generic/tcl.h tclPlatDecls.h (as suggested by dgp) - * generic/tclInt.h fix typo - * generic/tclIOUtil.c Eliminate various unnecessary - * unix/tclUnixFile.c type casts. - * unix/tclUnixPipe.c - * win/tclWinChan.c - * win/tclWinFCmd.c - * win/tclWinFile.c - * win/tclWinLoad.c - * win/tclWinPipe.c + * generic/tclPlatDecls.h: Move TCHAR fallback typedef from tcl.h to + * generic/tcl.h: tclPlatDecls.h (as suggested by dgp) + * generic/tclInt.h: fix typo + * generic/tclIOUtil.c: Eliminate various unnecessary + * unix/tclUnixFile.c: type casts. + * unix/tclUnixPipe.c: + * win/tclWinChan.c: + * win/tclWinFCmd.c: + * win/tclWinFile.c: + * win/tclWinLoad.c: + * win/tclWinPipe.c: 2010-04-20 Jan Nijtmans - * generic/tclTest.c Use function prototypes from the FS API. - * compat/zlib/* Upgrade to zlib 1.2.5 + * generic/tclTest.c: Use function prototypes from the FS API. + * compat/zlib/*: Upgrade to zlib 1.2.5 2010-04-19 Donal K. Fellows -- cgit v0.12 From 4138af452c3949c861b66d47a0f123966698f74d Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 26 Apr 2010 13:49:12 +0000 Subject: * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Added an explicit cast because auto-casting between function and non-function types is never naturally warning-free. --- ChangeLog | 4 ++++ unix/tclLoadDl.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b457b6..67ec5bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-04-26 Donal K. Fellows + * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Added an explicit cast + because auto-casting between function and non-function types is never + naturally warning-free. + * generic/tclStubInit.c: Add a small amount of gcc-isms (with #ifdef * generic/tclOOStubInit.c: guards) to ensure that warnings are issued when these files are older than the various *.decls files. diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 0620bd3..71349bb 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.21 2010/04/05 07:38:08 dkf Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.22 2010/04/26 13:49:12 dkf Exp $ */ #include "tclInt.h" @@ -172,7 +172,7 @@ FindSymbol( Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); } - return proc; + return (void *) proc; } /* -- cgit v0.12 From 66d33c6513aced61bd81726fdbecf546712c36cf Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Mon, 26 Apr 2010 22:30:05 +0000 Subject: * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Simplified the logic so that the casts added in Donal Fellows's change for the same bug are no longer necessary. --- ChangeLog | 6 ++++++ unix/tclLoadDl.c | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67ec5bb..99b0df2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-27 Kevin B. Kenny + + * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Simplified the + logic so that the casts added in Donal Fellows's change for the + same bug are no longer necessary. + 2010-04-26 Donal K. Fellows * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Added an explicit cast diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 71349bb..b0bff77 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoadDl.c,v 1.22 2010/04/26 13:49:12 dkf Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.23 2010/04/26 22:30:05 kennykb Exp $ */ #include "tclInt.h" @@ -144,10 +144,15 @@ FindSymbol( Tcl_LoadHandle loadHandle, /* Value from TcpDlopen(). */ const char *symbol) /* Symbol to look up. */ { - const char *native; - Tcl_DString newName, ds; + const char *native; /* Name of the library to be loaded, in + * system encoding */ + Tcl_DString newName, ds; /* Buffers for converting the name to + * system encoding and prepending an + * underscore*/ void *handle = (void *) loadHandle->clientData; - Tcl_PackageInitProc *proc; + /* Native handle to the loaded library */ + void *proc; /* Address corresponding to the resolved + * symbol */ /* * Some platforms still add an underscore to the beginning of symbol @@ -156,12 +161,12 @@ FindSymbol( */ native = Tcl_UtfToExternalDString(NULL, symbol, -1, &ds); - proc = (Tcl_PackageInitProc *) dlsym(handle, native); /* INTL: Native. */ + proc = dlsym(handle, native); /* INTL: Native. */ if (proc == NULL) { Tcl_DStringInit(&newName); Tcl_DStringAppend(&newName, "_", 1); native = Tcl_DStringAppend(&newName, native, -1); - proc = (Tcl_PackageInitProc *) dlsym(handle, native); /* INTL: Native. */ + proc = dlsym(handle, native); /* INTL: Native. */ Tcl_DStringFree(&newName); } Tcl_DStringFree(&ds); @@ -172,7 +177,7 @@ FindSymbol( Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL); } - return (void *) proc; + return proc; } /* -- cgit v0.12 From 0d984b7ada501f2f945b60fcb181532452ee09f2 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 27 Apr 2010 08:20:00 +0000 Subject: [Bug 2992292]: tclIOUtil.c assignment type mismatch compiler warning --- ChangeLog | 5 +++++ generic/tclIOUtil.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99b0df2..005ae29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-27 Jan Nijtmans + + * generic/tclIOUtil.c (Tcl_FSGetNativePath): [Bug 2992292]: + tclIOUtil.c assignment type mismatch compiler warning + 2010-04-27 Kevin B. Kenny * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Simplified the diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 69114e3..eb2eb92 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.175 2010/04/22 11:40:31 nijtmans Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.176 2010/04/27 08:20:00 nijtmans Exp $ */ #include "tclInt.h" @@ -3466,8 +3466,8 @@ TclpLoadFile( *clientDataPtr = handle; - *proc1Ptr = Tcl_FindSymbol(interp, handle, sym1); - *proc2Ptr = Tcl_FindSymbol(interp, handle, sym2); + *proc1Ptr = (Tcl_PackageInitProc*) Tcl_FindSymbol(interp, handle, sym1); + *proc2Ptr = (Tcl_PackageInitProc*) Tcl_FindSymbol(interp, handle, sym2); return TCL_OK; } @@ -4550,7 +4550,7 @@ Tcl_FSGetFileSystemForPath( * functions not in this file), then one cannot necessarily guarantee * that the path object pointer is from the correct filesystem. * - * Note: in the future it might be desireable to have separate versions + * Note: in the future it might be desirable to have separate versions * of this function with different signatures, for example * Tcl_FSGetNativeWinPath, Tcl_FSGetNativeUnixPath etc. Right now, since * native paths are all string based, we use just one function. -- cgit v0.12 From f7b4327454669c5f4b4c8ffb934734279b61ada9 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 27 Apr 2010 12:36:21 +0000 Subject: If tclInt.h or tclPort.h is already included, don't include again. Follow-up to [Bug 2991415]: tclport.h #included before limits.h See comments in [Bug 2991415] --- ChangeLog | 13 +++++++++++++ compat/strtod.c | 3 +-- compat/strtol.c | 3 +-- generic/regguts.h | 12 ------------ generic/tclBasic.c | 6 ++---- generic/tclExecute.c | 4 +--- generic/tclIORChan.c | 4 ++-- generic/tclIORTrans.c | 4 ++-- generic/tclOOInt.h | 4 ++-- generic/tclObj.c | 3 +-- generic/tclStrToD.c | 11 +++-------- generic/tclTomMath.h | 13 ++++--------- generic/tclTomMathInterface.c | 3 +-- generic/tclUtil.c | 3 +-- 14 files changed, 34 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index 005ae29..be9c57a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,19 @@ * generic/tclIOUtil.c (Tcl_FSGetNativePath): [Bug 2992292]: tclIOUtil.c assignment type mismatch compiler warning + * generic/regguts.h If tclInt.h or tclPort.h is already + * generic/tclBasic.c included, don't include + * generic/tclExecute.c again. Follow-up to [Bug 2991415]: + * generic/tclIORChan.c tclport.h #included before limits.h + * generic/tclIORTrans.c See comments in [Bug 2991415] + * generic/tclObj.c + * generic/tclOOInt.h + * generic/tclStrToD.c + * generic/tclTomMath.h + * generic/tclTomMathInterface.c + * generic/tclUtil.c + * compat/strtod.c + * compat/strtol.c 2010-04-27 Kevin B. Kenny diff --git a/compat/strtod.c b/compat/strtod.c index 7171101..89ad625 100644 --- a/compat/strtod.c +++ b/compat/strtod.c @@ -9,11 +9,10 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtod.c,v 1.10 2010/03/04 22:29:05 nijtmans Exp $ + * RCS: @(#) $Id: strtod.c,v 1.11 2010/04/27 12:36:23 nijtmans Exp $ */ #include "tclInt.h" -#include #ifndef TRUE #define TRUE 1 diff --git a/compat/strtol.c b/compat/strtol.c index 85c2520..1c52a9e 100644 --- a/compat/strtol.c +++ b/compat/strtol.c @@ -9,10 +9,9 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtol.c,v 1.7 2008/04/27 22:21:28 dkf Exp $ + * RCS: @(#) $Id: strtol.c,v 1.8 2010/04/27 12:36:23 nijtmans Exp $ */ -#include #include "tclInt.h" /* diff --git a/generic/regguts.h b/generic/regguts.h index f72542c..e57b8f8 100644 --- a/generic/regguts.h +++ b/generic/regguts.h @@ -39,15 +39,6 @@ * Things that regcustom.h might override. */ -/* standard header files (NULL is a reasonable indicator for them) */ -#ifndef NULL -#include -#include -#include -#include -#include -#endif - /* assertions */ #ifndef assert #ifndef REG_DEBUG @@ -96,9 +87,6 @@ #endif /* want size of a char in bits, and max value in bounded quantifiers */ -#ifndef CHAR_BIT -#include -#endif #ifndef _POSIX2_RE_DUP_MAX #define _POSIX2_RE_DUP_MAX 255 /* normally from */ #endif diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 11ddefd..3a37aac 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,16 +16,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.452 2010/04/25 13:39:25 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.453 2010/04/27 12:36:21 nijtmans Exp $ */ #include "tclInt.h" #include "tclOOInt.h" #include "tclCompile.h" -#include -#include -#include #include "tommath.h" +#include #if NRE_ENABLE_ASSERTS #include diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 3c440c3..7132535 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,15 +14,13 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.477 2010/04/24 17:07:32 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.478 2010/04/27 12:36:21 nijtmans Exp $ */ #include "tclInt.h" #include "tclCompile.h" #include "tommath.h" - #include -#include #if NRE_ENABLE_ASSERTS #include diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 95a488e..4d9832c 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,10 +15,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.47 2010/03/30 21:17:13 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.48 2010/04/27 12:36:22 nijtmans Exp $ */ -#include +#include "tclInt.h" #include #include diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 801f5fb..608ff88 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,10 +15,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.15 2010/03/17 16:35:42 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.16 2010/04/27 12:36:21 nijtmans Exp $ */ -#include +#include "tclInt.h" #include #include diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index 192d684..56da45d 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -9,13 +9,13 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOInt.h,v 1.17 2010/03/05 15:32:16 dkf Exp $ + * RCS: @(#) $Id: tclOOInt.h,v 1.18 2010/04/27 12:36:21 nijtmans Exp $ */ #ifndef TCL_OO_INTERNAL_H #define TCL_OO_INTERNAL_H 1 -#include +#include "tclInt.h" #include "tclOO.h" /* diff --git a/generic/tclObj.c b/generic/tclObj.c index f16cb66..0d80189 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,12 +13,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.172 2010/03/30 16:31:09 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.173 2010/04/27 12:36:21 nijtmans Exp $ */ #include "tclInt.h" #include "tommath.h" -#include #include /* diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index b9b9950..fdfdb5e 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,19 +14,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.42 2010/04/02 19:23:58 kennykb Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.43 2010/04/27 12:36:22 nijtmans Exp $ * *---------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include "tclInt.h" +#include "tommath.h" #include -#include -#include /* * Define KILL_OCTAL to suppress interpretation of numbers with leading zero diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h index 48bb603..4e28663 100644 --- a/generic/tclTomMath.h +++ b/generic/tclTomMath.h @@ -15,17 +15,12 @@ #ifndef BN_H_ #define BN_H_ +#include "tclInt.h" #include #ifndef MODULE_SCOPE #define MODULE_SCOPE extern #endif -#include -#include -#include -#include -#include - #ifndef MIN #define MIN(x,y) ((x)<(y)?(x):(y)) #endif @@ -830,7 +825,7 @@ MODULE_SCOPE const char *mp_s_rmap; #endif #ifdef __cplusplus - } +} #endif #endif @@ -838,6 +833,6 @@ MODULE_SCOPE const char *mp_s_rmap; /* $Source: /root/tcl/repos-to-convert/tcl/generic/tclTomMath.h,v $ */ /* Based on Tom's version 1.8 */ -/* $Revision: 1.11 $ */ -/* $Date: 2009/10/06 16:31:01 $ */ +/* $Revision: 1.12 $ */ +/* $Date: 2010/04/27 12:36:21 $ */ diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index 8de65db..eb93fe6 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -11,12 +11,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathInterface.c,v 1.14 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclTomMathInterface.c,v 1.15 2010/04/27 12:36:21 nijtmans Exp $ */ #include "tclInt.h" #include "tommath.h" -#include MODULE_SCOPE const TclTomMathStubs tclTomMathStubs; diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 71e4093..b583af5 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,11 +11,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.114 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.115 2010/04/27 12:36:22 nijtmans Exp $ */ #include "tclInt.h" -#include #include /* -- cgit v0.12 From 91166d1db7388574e92265306029c9dd9dcca9ef Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 27 Apr 2010 14:58:18 +0000 Subject: Code reordering to slightly shorten generated object code. --- ChangeLog | 37 ++-- generic/tclExecute.c | 569 ++++++++++++++++++++++----------------------------- 2 files changed, 260 insertions(+), 346 deletions(-) diff --git a/ChangeLog b/ChangeLog index be9c57a..73ea47e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,26 +1,31 @@ +2010-04-27 Donal K. Fellows + + * generic/tclExecute.c (TclExecuteByteCode): Rearrange location of an + assignment to shorten the object code. + 2010-04-27 Jan Nijtmans * generic/tclIOUtil.c (Tcl_FSGetNativePath): [Bug 2992292]: tclIOUtil.c assignment type mismatch compiler warning - * generic/regguts.h If tclInt.h or tclPort.h is already - * generic/tclBasic.c included, don't include - * generic/tclExecute.c again. Follow-up to [Bug 2991415]: - * generic/tclIORChan.c tclport.h #included before limits.h - * generic/tclIORTrans.c See comments in [Bug 2991415] - * generic/tclObj.c - * generic/tclOOInt.h - * generic/tclStrToD.c - * generic/tclTomMath.h - * generic/tclTomMathInterface.c - * generic/tclUtil.c - * compat/strtod.c - * compat/strtol.c + * generic/regguts.h: If tclInt.h or tclPort.h is already + * generic/tclBasic.c: included, don't include + * generic/tclExecute.c: again. Follow-up to [Bug 2991415]: + * generic/tclIORChan.c: tclport.h #included before limits.h + * generic/tclIORTrans.c: See comments in [Bug 2991415] + * generic/tclObj.c: + * generic/tclOOInt.h: + * generic/tclStrToD.c: + * generic/tclTomMath.h: + * generic/tclTomMathInterface.c: + * generic/tclUtil.c: + * compat/strtod.c: + * compat/strtol.c: 2010-04-27 Kevin B. Kenny - * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Simplified the - logic so that the casts added in Donal Fellows's change for the - same bug are no longer necessary. + * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Simplified the logic + so that the casts added in Donal Fellows's change for the same bug are + no longer necessary. 2010-04-26 Donal K. Fellows diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 7132535..f59827c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.478 2010/04/27 12:36:21 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.479 2010/04/27 14:58:18 dkf Exp $ */ #include "tclInt.h" @@ -1913,7 +1913,7 @@ TclExecuteByteCode( const char *curInstName; int result; /* Return code returned after execution. * Result variable - needed only when going to - * checkForcatch or other error handlers; also + * checkForCatch or other error handlers; also * used as local in some opcodes. */ } TAUX = { NULL, @@ -2185,18 +2185,15 @@ TclExecuteByteCode( localResult = Tcl_AsyncInvoke(interp, TRESULT); CACHE_STACK_INFO(); if (localResult == TCL_ERROR) { - TRESULT = localResult; - goto checkForCatch; + goto gotError; } } DECACHE_STACK_INFO(); localResult = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); CACHE_STACK_INFO(); - if (localResult == TCL_ERROR) { - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } if (TclLimitReady(iPtr->limit)) { @@ -2204,8 +2201,7 @@ TclExecuteByteCode( localResult = Tcl_LimitCheck(interp); CACHE_STACK_INFO(); if (localResult == TCL_ERROR) { - TRESULT = localResult; - goto checkForCatch; + goto gotError; } } } @@ -2287,10 +2283,9 @@ TclExecuteByteCode( } #endif goto checkForCatch; - } else { - (void) POP_OBJECT(); - goto abnormalReturn; } + (void) POP_OBJECT(); + goto abnormalReturn; case INST_PUSH1: instPush1Peephole: @@ -2347,13 +2342,13 @@ TclExecuteByteCode( iPtr->cmdCount += TclGetUInt4AtPtr(pc+5); if (!TAUX.checkInterp) { - instStartCmdOK: - NEXT_INST_F(9, 0, 0); + goto instStartCmdOK; } else if (((codePtr->compileEpoch == iPtr->compileEpoch) && (codePtr->nsEpoch == iPtr->varFramePtr->nsPtr->resolverEpoch)) || (codePtr->flags & TCL_BYTECODE_PRECOMPILED)) { TAUX.checkInterp = 0; - goto instStartCmdOK; + instStartCmdOK: + NEXT_INST_F(9, 0, 0); } else { const char *bytes; @@ -2366,8 +2361,7 @@ TclExecuteByteCode( */ if (TclInterpReady(interp) == TCL_ERROR) { - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } codePtr->flags |= TCL_BYTECODE_RECOMPILE; @@ -2593,8 +2587,7 @@ TclExecuteByteCode( if (TclListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK){ TRACE_WITH_OBJ(("%.30s => ERROR: ", O2S(objPtr)), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } (void) POP_OBJECT(); @@ -2860,14 +2853,13 @@ TclExecuteByteCode( if (catchTop != initCatchTop) { TclClearTailcall(interp, param); iPtr->varFramePtr->tailcallPtr = NULL; - TRESULT = TCL_ERROR; Tcl_SetResult(interp, "tailcall called from within a catch environment", TCL_STATIC); Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); pc--; - goto checkForCatch; + goto gotError; } iPtr->varFramePtr->tailcallPtr = param; TclSpliceTailcall(interp, param, 1); @@ -2881,9 +2873,8 @@ TclExecuteByteCode( TCL_STATIC); Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", NULL); - TRESULT = TCL_ERROR; pc--; - goto checkForCatch; + goto gotError; } NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr); @@ -2894,9 +2885,8 @@ TclExecuteByteCode( TCL_STATIC); Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "CANT_YIELD", NULL); - TRESULT = TCL_ERROR; pc--; - goto checkForCatch; + goto gotError; } /* @@ -2935,13 +2925,12 @@ TclExecuteByteCode( TclClearTailcall(interp, iPtr->varFramePtr->tailcallPtr); iPtr->varFramePtr->tailcallPtr = NULL; - TRESULT = TCL_ERROR; Tcl_SetResult(interp, "tailcall called from within a catch environment", TCL_STATIC); Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "ILLEGAL", NULL); pc--; - goto checkForCatch; + goto gotError; } if (iPtr->execEnvPtr->rewind) { @@ -3166,10 +3155,8 @@ TclExecuteByteCode( varPtr = TclLookupArrayElement(interp, part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, "read", 0, 1, arrayPtr, opnd); if (varPtr == NULL) { - TRACE_APPEND(("ERROR: %.30s\n", - O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); + goto gotError; } cleanup = 1; goto doCallPtrGetVar; @@ -3193,25 +3180,23 @@ TclExecuteByteCode( varPtr = TclObjLookupVarEx(interp, part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, "read", /*createPart1*/0, /*createPart2*/1, &arrayPtr); - if (varPtr) { - if (TclIsVarDirectReadable2(varPtr, arrayPtr)) { - /* - * No errors, no traces: just get the value. - */ - - objResultPtr = varPtr->value.objPtr; - TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); - NEXT_INST_V(1, cleanup, 1); - } - pcAdjustment = 1; - opnd = -1; - goto doCallPtrGetVar; - } else { + if (!varPtr) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } + if (TclIsVarDirectReadable2(varPtr, arrayPtr)) { + /* + * No errors, no traces: just get the value. + */ + + objResultPtr = varPtr->value.objPtr; + TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); + NEXT_INST_V(1, cleanup, 1); + } + pcAdjustment = 1; + opnd = -1; + doCallPtrGetVar: /* * There are either errors or the variable is traced: call @@ -3222,14 +3207,12 @@ TclExecuteByteCode( objResultPtr = TclPtrGetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, opnd); CACHE_STACK_INFO(); - if (objResultPtr) { - TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); - NEXT_INST_V(pcAdjustment, cleanup, 1); - } else { + if (!objResultPtr) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } + TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); + NEXT_INST_V(pcAdjustment, cleanup, 1); } /* @@ -3293,34 +3276,35 @@ TclExecuteByteCode( while (TclIsVarLink(varPtr)) { varPtr = varPtr->value.linkPtr; } - if (TclIsVarDirectWritable(varPtr)) { - doStoreVarDirect: - /* - * No traces, no errors, plain 'set': we can safely inline. The - * value *will* be set to what's requested, so that the stack top - * remains pointing to the same Tcl_Obj. - */ + if (!TclIsVarDirectWritable(varPtr)) { + storeFlags = TCL_LEAVE_ERR_MSG; + part1Ptr = NULL; + goto doStoreScalar; + } - valuePtr = varPtr->value.objPtr; - if (valuePtr != NULL) { - TclDecrRefCount(valuePtr); - } - objResultPtr = OBJ_AT_TOS; - varPtr->value.objPtr = objResultPtr; + /* + * No traces, no errors, plain 'set': we can safely inline. The value + * *will* be set to what's requested, so that the stack top remains + * pointing to the same Tcl_Obj. + */ + + doStoreVarDirect: + valuePtr = varPtr->value.objPtr; + if (valuePtr != NULL) { + TclDecrRefCount(valuePtr); + } + objResultPtr = OBJ_AT_TOS; + varPtr->value.objPtr = objResultPtr; #ifndef TCL_COMPILE_DEBUG - if (*(pc+pcAdjustment) == INST_POP) { - tosPtr--; - NEXT_INST_F((pcAdjustment+1), 0, 0); - } + if (*(pc+pcAdjustment) == INST_POP) { + tosPtr--; + NEXT_INST_F((pcAdjustment+1), 0, 0); + } #else - TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); + TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); #endif - Tcl_IncrRefCount(objResultPtr); - NEXT_INST_F(pcAdjustment, 0, 0); - } - storeFlags = TCL_LEAVE_ERR_MSG; - part1Ptr = NULL; - goto doStoreScalar; + Tcl_IncrRefCount(objResultPtr); + NEXT_INST_F(pcAdjustment, 0, 0); case INST_LAPPEND_STK: valuePtr = OBJ_AT_TOS; /* value to append */ @@ -3373,16 +3357,14 @@ TclExecuteByteCode( #endif varPtr = TclObjLookupVarEx(interp, objPtr,part2Ptr, TCL_LEAVE_ERR_MSG, "set", /*createPart1*/ 1, /*createPart2*/ 1, &arrayPtr); - if (varPtr) { - cleanup = ((part2Ptr == NULL)? 2 : 3); - pcAdjustment = 1; - opnd = -1; - goto doCallPtrSetVar; - } else { + if (!varPtr) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } + cleanup = ((part2Ptr == NULL)? 2 : 3); + pcAdjustment = 1; + opnd = -1; + goto doCallPtrSetVar; case INST_LAPPEND_ARRAY4: opnd = TclGetUInt4AtPtr(pc+1); @@ -3425,13 +3407,11 @@ TclExecuteByteCode( doStoreArrayDirectFailed: varPtr = TclLookupArrayElement(interp, part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, "set", 1, 1, arrayPtr, opnd); - if (varPtr) { - goto doCallPtrSetVar; - } else { + if (!varPtr) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } + goto doCallPtrSetVar; case INST_LAPPEND_SCALAR4: opnd = TclGetUInt4AtPtr(pc+1); @@ -3475,19 +3455,17 @@ TclExecuteByteCode( objResultPtr = TclPtrSetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr, valuePtr, storeFlags, opnd); CACHE_STACK_INFO(); - if (objResultPtr) { -#ifndef TCL_COMPILE_DEBUG - if (*(pc+pcAdjustment) == INST_POP) { - NEXT_INST_V((pcAdjustment+1), cleanup, 0); - } -#endif - TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); - NEXT_INST_V(pcAdjustment, cleanup, 1); - } else { + if (!objResultPtr) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; + } +#ifndef TCL_COMPILE_DEBUG + if (*(pc+pcAdjustment) == INST_POP) { + NEXT_INST_V((pcAdjustment+1), cleanup, 0); } +#endif + TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); + NEXT_INST_V(pcAdjustment, cleanup, 1); } /* @@ -3553,17 +3531,15 @@ TclExecuteByteCode( opnd = -1; varPtr = TclObjLookupVarEx(interp, objPtr, part2Ptr, TCL_LEAVE_ERR_MSG, "read", 1, 1, &arrayPtr); - if (varPtr) { - cleanup = ((part2Ptr == NULL)? 1 : 2); - goto doIncrVar; - } else { + if (!varPtr) { Tcl_AddObjErrorInfo(interp, "\n (reading value of variable to increment)", -1); TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; Tcl_DecrRefCount(incrPtr); - goto checkForCatch; + goto gotError; } + cleanup = ((part2Ptr == NULL)? 1 : 2); + goto doIncrVar; case INST_INCR_ARRAY1_IMM: opnd = TclGetUInt1AtPtr(pc+1); @@ -3583,14 +3559,12 @@ TclExecuteByteCode( TRACE(("%u \"%.30s\" (by %ld) => ", opnd, O2S(part2Ptr), i)); varPtr = TclLookupArrayElement(interp, part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, "read", 1, 1, arrayPtr, opnd); - if (varPtr) { - goto doIncrVar; - } else { + if (!varPtr) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; Tcl_DecrRefCount(incrPtr); - goto checkForCatch; + goto gotError; } + goto doIncrVar; case INST_INCR_SCALAR1_IMM: opnd = TclGetUInt1AtPtr(pc+1); @@ -3698,13 +3672,12 @@ TclExecuteByteCode( TclNewLongObj(incrPtr, i); TRESULT = TclIncrObj(interp, objResultPtr, incrPtr); Tcl_DecrRefCount(incrPtr); - if (TRESULT == TCL_OK) { - goto doneIncr; - } else { + if (TRESULT != TCL_OK) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - goto checkForCatch; + goto gotError; } + goto doneIncr; } /* @@ -3737,13 +3710,12 @@ TclExecuteByteCode( } TRESULT = TclIncrObj(interp, objResultPtr, incrPtr); Tcl_DecrRefCount(incrPtr); - if (TRESULT == TCL_OK) { - goto doneIncr; - } else { + if (TRESULT != TCL_OK) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - goto checkForCatch; + goto gotError; } + goto doneIncr; } else { DECACHE_STACK_INFO(); objResultPtr = TclPtrIncrObjVar(interp, varPtr, arrayPtr, @@ -3753,8 +3725,7 @@ TclExecuteByteCode( if (objResultPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } } doneIncr: @@ -3895,6 +3866,7 @@ TclExecuteByteCode( varPtr->value.objPtr = NULL; NEXT_INST_F(6, 0, 0); } + slowUnsetScalar: DECACHE_STACK_INFO(); localResult = TclPtrUnsetVar(interp, varPtr, NULL, NULL, NULL, flags, @@ -3977,9 +3949,8 @@ TclExecuteByteCode( NEXT_INST_V(2, cleanup, 0); errorInUnset: - TRESULT = TCL_ERROR; TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - goto checkForCatch; + goto gotError; } /* @@ -3998,8 +3969,7 @@ TclExecuteByteCode( TRESULT = TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr); if (TRESULT == -1) { - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } /* @@ -4008,14 +3978,14 @@ TclExecuteByteCode( savedFramePtr = iPtr->varFramePtr; iPtr->varFramePtr = framePtr; - otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, TCL_LEAVE_ERR_MSG, - "access", /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); + otherPtr = TclObjLookupVarEx(interp, OBJ_AT_TOS, NULL, + TCL_LEAVE_ERR_MSG, "access", /*createPart1*/ 1, + /*createPart2*/ 1, &varPtr); iPtr->varFramePtr = savedFramePtr; if (otherPtr) { goto doLinkVars; } - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } case INST_NSUPVAR: { @@ -4023,9 +3993,8 @@ TclExecuteByteCode( Namespace *savedNsPtr; TRACE_WITH_OBJ(("nsupvar "), OBJ_UNDER_TOS); - TRESULT = TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr); - if (TRESULT != TCL_OK) { - goto checkForCatch; + if (TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr) != TCL_OK) { + goto gotError; } /* @@ -4038,12 +4007,10 @@ TclExecuteByteCode( (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); iPtr->varFramePtr->nsPtr = savedNsPtr; - if (otherPtr) { - goto doLinkVars; + if (!otherPtr) { + goto gotError; } - - TRESULT = TCL_ERROR; - goto checkForCatch; + goto doLinkVars; } case INST_VARIABLE: @@ -4052,8 +4019,7 @@ TclExecuteByteCode( (TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), "access", /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); if (!otherPtr) { - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } /* @@ -4097,11 +4063,9 @@ TclExecuteByteCode( if (TclIsVarInHash(otherPtr)) { VarHashRefCount(otherPtr)++; } - } else { - TRESULT = TclPtrObjMakeUpvar(interp, otherPtr, NULL, 0, opnd); - if (TRESULT != TCL_OK) { - goto checkForCatch; - } + } else if (TclPtrObjMakeUpvar(interp, otherPtr, NULL, 0, + opnd) != TCL_OK) { + goto gotError; } /* @@ -4158,12 +4122,11 @@ TclExecuteByteCode( /* TODO - check claim that taking address of b harms performance */ /* TODO - consider optimization search for constants */ - TRESULT = TclGetBooleanFromObj(interp, valuePtr, &b); - if (TRESULT != TCL_OK) { + if (TclGetBooleanFromObj(interp, valuePtr, &b) != TCL_OK) { TRACE_WITH_OBJ(("%d => ERROR: ", jmpOffset[ ((*pc == INST_JUMP_FALSE1) || (*pc == INST_JUMP_FALSE4)) ? 0 : 1]), Tcl_GetObjResult(interp)); - goto checkForCatch; + goto gotError; } #ifdef TCL_COMPILE_DEBUG @@ -4229,20 +4192,18 @@ TclExecuteByteCode( value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; - TRESULT = TclGetBooleanFromObj(NULL, valuePtr, &i1); - if (TRESULT != TCL_OK) { + if (TclGetBooleanFromObj(NULL, valuePtr, &i1) != TCL_OK) { TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } - TRESULT = TclGetBooleanFromObj(NULL, value2Ptr, &i2); - if (TRESULT != TCL_OK) { + if (TclGetBooleanFromObj(NULL, value2Ptr, &i2) != TCL_OK) { TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(value2Ptr), (value2Ptr->typePtr? value2Ptr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, value2Ptr); - goto checkForCatch; + goto gotError; } if (*pc == INST_LOR) { @@ -4274,11 +4235,10 @@ TclExecuteByteCode( case INST_LIST_LENGTH: valuePtr = OBJ_AT_TOS; - TRESULT = TclListObjLength(interp, valuePtr, &length); - if (TRESULT != TCL_OK) { + if (TclListObjLength(interp, valuePtr, &length) != TCL_OK) { TRACE_WITH_OBJ(("%.30s => ERROR: ", O2S(valuePtr)), Tcl_GetObjResult(interp)); - goto checkForCatch; + goto gotError; } TclNewIntObj(objResultPtr, length); TRACE(("%.20s => %d\n", O2S(valuePtr), length)); @@ -4314,21 +4274,20 @@ TclExecuteByteCode( } objResultPtr = TclLindexList(interp, valuePtr, value2Ptr); - if (objResultPtr) { - /* - * Stash the list element on the stack. - */ - - TRACE(("%.20s %.20s => %s\n", - O2S(valuePtr), O2S(value2Ptr), O2S(objResultPtr))); - NEXT_INST_F(1, 2, -1); /* Already has the correct refCount */ - } else { + if (!objResultPtr) { TRACE_WITH_OBJ(("%.30s %.30s => ERROR: ", O2S(valuePtr), O2S(value2Ptr)), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } + /* + * Stash the list element on the stack. + */ + + TRACE(("%.20s %.20s => %s\n", + O2S(valuePtr), O2S(value2Ptr), O2S(objResultPtr))); + NEXT_INST_F(1, 2, -1); /* Already has the correct refCount */ + case INST_LIST_INDEX_IMM: /*** lindex with objc==3 and index in bytecode stream ***/ @@ -4346,12 +4305,10 @@ TclExecuteByteCode( * in the process. */ - TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); - - if (TRESULT != TCL_OK) { + if (TclListObjGetElements(interp, valuePtr, &listc, &listv)!=TCL_OK) { TRACE_WITH_OBJ(("\"%.30s\" %d => ERROR: ", O2S(valuePtr), opnd), Tcl_GetObjResult(interp)); - goto checkForCatch; + goto gotError; } /* @@ -4396,23 +4353,17 @@ TclExecuteByteCode( objResultPtr = TclLindexFlat(interp, OBJ_AT_DEPTH(numIdx), numIdx, &OBJ_AT_DEPTH(numIdx - 1)); + if (!objResultPtr) { + TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); + goto gotError; + } /* - * Check for errors. + * Set result. */ - if (objResultPtr) { - /* - * Set result. - */ - - TRACE(("%d => %s\n", opnd, O2S(objResultPtr))); - NEXT_INST_V(5, opnd, -1); - } else { - TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; - goto checkForCatch; - } + TRACE(("%d => %s\n", opnd, O2S(objResultPtr))); + NEXT_INST_V(5, opnd, -1); case INST_LSET_FLAT: /* @@ -4444,23 +4395,17 @@ TclExecuteByteCode( objResultPtr = TclLsetFlat(interp, value2Ptr, numIdx, &OBJ_AT_DEPTH(numIdx), valuePtr); + if (!objResultPtr) { + TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); + goto gotError; + } /* - * Check for errors. + * Set result. */ - if (objResultPtr) { - /* - * Set result. - */ - - TRACE(("%d => %s\n", opnd, O2S(objResultPtr))); - NEXT_INST_V(5, (numIdx+1), -1); - } else { - TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; - goto checkForCatch; - } + TRACE(("%d => %s\n", opnd, O2S(objResultPtr))); + NEXT_INST_V(5, (numIdx+1), -1); } case INST_LSET_LIST: @@ -4488,16 +4433,10 @@ TclExecuteByteCode( */ objResultPtr = TclLsetList(interp, objPtr, value2Ptr, valuePtr); - - /* - * Check for errors. - */ - if (!objResultPtr) { TRACE_WITH_OBJ(("\"%.30s\" => ERROR: ", O2S(value2Ptr)), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } /* @@ -4526,24 +4465,22 @@ TclExecuteByteCode( * in the process. */ - TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); + if (TclListObjGetElements(interp, valuePtr, &listc, &listv)!=TCL_OK) { + TRACE_WITH_OBJ(("\"%.30s\" %d %d => ERROR: ", O2S(valuePtr), + fromIdx, toIdx), Tcl_GetObjResult(interp)); + goto gotError; + } /* * Skip a lot of work if we're about to throw the result away (common * with uses of [lassign]). */ - if (TRESULT == TCL_OK) { #ifndef TCL_COMPILE_DEBUG - if (*(pc+9) == INST_POP) { - NEXT_INST_F(10, 1, 0); - } -#endif - } else { - TRACE_WITH_OBJ(("\"%.30s\" %d %d => ERROR: ", O2S(valuePtr), - fromIdx, toIdx), Tcl_GetObjResult(interp)); - goto checkForCatch; + if (*(pc+9) == INST_POP) { + NEXT_INST_F(10, 1, 0); } +#endif /* * Adjust the indices for end-based handling. @@ -4602,12 +4539,12 @@ TclExecuteByteCode( /* TODO: Consider more efficient tests than strcmp() */ s1 = TclGetStringFromObj(valuePtr, &s1len); - TRESULT = TclListObjLength(interp, value2Ptr, &llen); - if (TRESULT != TCL_OK) { + if (TclListObjLength(interp, value2Ptr, &llen) != TCL_OK) { TRACE_WITH_OBJ(("\"%.30s\" \"%.30s\" => ERROR: ", O2S(valuePtr), O2S(value2Ptr)), Tcl_GetObjResult(interp)); - goto checkForCatch; + goto gotError; } + found = 0; if (llen > 0) { /* @@ -4862,9 +4799,8 @@ TclExecuteByteCode( */ length = Tcl_GetCharLength(valuePtr); - TRESULT = TclGetIntForIndexM(interp, value2Ptr, length - 1, &index); - if (TRESULT != TCL_OK) { - goto checkForCatch; + if (TclGetIntForIndexM(interp, value2Ptr, length-1, &index)!=TCL_OK) { + goto gotError; } if ((index >= 0) && (index < length)) { @@ -4980,8 +4916,7 @@ TclExecuteByteCode( objResultPtr = Tcl_GetObjResult(interp); TRACE_WITH_OBJ(("%.20s %.20s => ERROR: ", O2S(valuePtr), O2S(value2Ptr)), objResultPtr); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match)); @@ -5345,23 +5280,21 @@ TclExecuteByteCode( TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_DOUBLE) || (type1 == TCL_NUMBER_NAN)) { - TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); if ((TRESULT != TCL_OK) || (type2 == TCL_NUMBER_DOUBLE) || (type2 == TCL_NUMBER_NAN)) { - TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (value2Ptr->typePtr? value2Ptr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, value2Ptr); - goto checkForCatch; + goto gotError; } if (*pc == INST_MOD) { @@ -5575,8 +5508,7 @@ TclExecuteByteCode( } if (invalid) { Tcl_SetResult(interp, "negative shift argument", TCL_STATIC); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } /* @@ -5610,8 +5542,7 @@ TclExecuteByteCode( Tcl_SetResult(interp, "integer value too large to represent", TCL_STATIC); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } shift = (int)(*((const long *)ptr2)); @@ -5772,22 +5703,20 @@ TclExecuteByteCode( if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_NAN) || (type1 == TCL_NUMBER_DOUBLE)) { - TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); if ((TRESULT != TCL_OK) || (type2 == TCL_NUMBER_NAN) || (type2 == TCL_NUMBER_DOUBLE)) { - TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (value2Ptr->typePtr? value2Ptr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, value2Ptr); - goto checkForCatch; + goto gotError; } if ((type1 == TCL_NUMBER_BIG) || (type2 == TCL_NUMBER_BIG)) { @@ -6009,12 +5938,11 @@ TclExecuteByteCode( TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); if ((TRESULT != TCL_OK) || IsErroringNaNType(type1)) { - TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(value2Ptr), O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name: "null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } #ifdef ACCEPT_NAN @@ -6029,12 +5957,11 @@ TclExecuteByteCode( TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); if ((TRESULT != TCL_OK) || IsErroringNaNType(type2)) { - TRESULT = TCL_ERROR; TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(value2Ptr), O2S(valuePtr), (value2Ptr->typePtr? value2Ptr->typePtr->name: "null"))); IllegalExprOperandType(interp, pc, value2Ptr); - goto checkForCatch; + goto gotError; } #ifdef ACCEPT_NAN @@ -6103,8 +6030,7 @@ TclExecuteByteCode( TRACE(("%.20s %.20s => IEEE FLOATING PT ERROR\n", O2S(valuePtr), O2S(value2Ptr))); TclExprFloatError(interp, dResult); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } #endif TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); @@ -6278,8 +6204,7 @@ TclExecuteByteCode( if (type2 != TCL_NUMBER_LONG) { Tcl_SetResult(interp, "exponent too large", TCL_STATIC); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } if (type1 == TCL_NUMBER_LONG) { @@ -6708,8 +6633,7 @@ TclExecuteByteCode( mp_clear(&big1); mp_clear(&big2); mp_clear(&bigResult); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } mp_expt_d(&big1, big2.dp[0], &bigResult); break; @@ -6732,12 +6656,11 @@ TclExecuteByteCode( /* TODO - check claim that taking address of b harms performance */ /* TODO - consider optimization search for constants */ - TRESULT = TclGetBooleanFromObj(NULL, valuePtr, &b); - if (TRESULT != TCL_OK) { + if (TclGetBooleanFromObj(NULL, valuePtr, &b) != TCL_OK) { TRACE(("\"%.20s\" => ILLEGAL TYPE %s\n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } /* TODO: Consider peephole opt. */ objResultPtr = TCONST(!b); @@ -6753,11 +6676,10 @@ TclExecuteByteCode( * ... ~$NonInteger => raise an error. */ - TRESULT = TCL_ERROR; TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } if (type1 == TCL_NUMBER_LONG) { l1 = *((const long *) ptr1); @@ -6794,11 +6716,10 @@ TclExecuteByteCode( valuePtr = OBJ_AT_TOS; TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); if ((TRESULT != TCL_OK) || IsErroringNaNType(type1)) { - TRESULT = TCL_ERROR; TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } switch (type1) { case TCL_NUMBER_DOUBLE: @@ -6879,11 +6800,10 @@ TclExecuteByteCode( * ... +$NonNumeric => raise an error. */ - TRESULT = TCL_ERROR; TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), (valuePtr->typePtr? valuePtr->typePtr->name:"null"))); IllegalExprOperandType(interp, pc, valuePtr); - goto checkForCatch; + goto gotError; } /* ... TryConvertToNumeric($NonNumeric) is acceptable */ @@ -6891,7 +6811,6 @@ TclExecuteByteCode( NEXT_INST_F(1, 0, 0); } if (IsErroringNaNType(type1)) { - TRESULT = TCL_ERROR; if (*pc == INST_UPLUS) { /* * ... +$NonNumeric => raise an error. @@ -6909,7 +6828,7 @@ TclExecuteByteCode( O2S(objResultPtr))); TclExprFloatError(interp, *((const double *) ptr1)); } - goto checkForCatch; + goto gotError; } /* @@ -7049,17 +6968,17 @@ TclExecuteByteCode( listVarPtr = LOCAL(listTmpIndex); listPtr = listVarPtr->value.objPtr; - TRESULT = TclListObjLength(interp, listPtr, &listLen); - if (TRESULT == TCL_OK) { - if (listLen > (iterNum * numVars)) { - continueLoop = 1; - } - listTmpIndex++; - } else { + + if (TclListObjLength(interp, listPtr, &listLen) != TCL_OK) { TRACE_WITH_OBJ(("%u => ERROR converting list %ld, \"%s\": ", opnd, i, O2S(listPtr)), Tcl_GetObjResult(interp)); - goto checkForCatch; + goto gotError; + } + + if (listLen > iterNum * numVars) { + continueLoop = 1; } + listTmpIndex++; } /* @@ -7112,9 +7031,8 @@ TclExecuteByteCode( TRACE_WITH_OBJ(( "%u => ERROR init. index temp %d: ", opnd,varIndex), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; TclDecrRefCount(listPtr); - goto checkForCatch; + goto gotError; } } valIndex++; @@ -7222,8 +7140,7 @@ TclExecuteByteCode( "%u => ERROR tracing dictionary path into \"%s\": ", opnd, O2S(OBJ_AT_DEPTH(opnd))), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } } TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &objResultPtr); @@ -7236,13 +7153,12 @@ TclExecuteByteCode( "%u => ERROR reading leaf dictionary key \"%s\": ", opnd, O2S(dictPtr)), Tcl_GetObjResult(interp)); } else { - Tcl_ResetResult(interp); + Tcl_ResetResult(interp); Tcl_AppendResult(interp, "key \"", TclGetString(OBJ_AT_TOS), "\" not known in dictionary", NULL); TRACE_WITH_OBJ(("%u => ERROR ", opnd), Tcl_GetObjResult(interp)); - TRESULT = TCL_ERROR; } - goto checkForCatch; + goto gotError; case INST_DICT_SET: case INST_DICT_UNSET: @@ -7317,7 +7233,7 @@ TclExecuteByteCode( } TRACE_WITH_OBJ(("%u %u => ERROR updating dictionary: ", opnd, opnd2), Tcl_GetObjResult(interp)); - goto checkForCatch; + goto gotError; } if (TclIsVarDirectWritable(varPtr)) { @@ -7340,8 +7256,7 @@ TclExecuteByteCode( if (objResultPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } } #ifndef TCL_COMPILE_DEBUG @@ -7378,12 +7293,12 @@ TclExecuteByteCode( } } - TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, &valuePtr); - if (TRESULT != TCL_OK) { + if (Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, + &valuePtr) != TCL_OK) { if (allocateDict) { TclDecrRefCount(dictPtr); } - goto checkForCatch; + goto gotError; } /* @@ -7395,12 +7310,13 @@ TclExecuteByteCode( switch (*pc) { case INST_DICT_APPEND: if (valuePtr == NULL) { - valuePtr = OBJ_AT_TOS; + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, OBJ_AT_TOS); } else { if (Tcl_IsShared(valuePtr)) { valuePtr = Tcl_DuplicateObj(valuePtr); } Tcl_AppendObjToObj(valuePtr, OBJ_AT_TOS); + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); } break; case INST_DICT_LAPPEND: @@ -7410,32 +7326,32 @@ TclExecuteByteCode( if (valuePtr == NULL) { valuePtr = Tcl_NewListObj(1, &OBJ_AT_TOS); - break; - } - if (Tcl_IsShared(valuePtr)) { + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); + } else if (Tcl_IsShared(valuePtr)) { valuePtr = Tcl_DuplicateObj(valuePtr); - TRESULT = Tcl_ListObjAppendElement(interp, valuePtr, - OBJ_AT_TOS); - if (TRESULT != TCL_OK) { + if (Tcl_ListObjAppendElement(interp, valuePtr, + OBJ_AT_TOS) != TCL_OK) { TclDecrRefCount(valuePtr); + if (allocateDict) { + TclDecrRefCount(dictPtr); + } + goto gotError; } + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); } else { - TRESULT = Tcl_ListObjAppendElement(interp, valuePtr, - OBJ_AT_TOS); - } - if (TRESULT != TCL_OK) { - if (allocateDict) { - TclDecrRefCount(dictPtr); + if (Tcl_ListObjAppendElement(interp, valuePtr, + OBJ_AT_TOS) != TCL_OK) { + if (allocateDict) { + TclDecrRefCount(dictPtr); + } + goto gotError; } - goto checkForCatch; } break; default: Tcl_Panic("Should not happen!"); } - Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); - if (TclIsVarDirectWritable(varPtr)) { if (allocateDict) { value2Ptr = varPtr->value.objPtr; @@ -7456,8 +7372,7 @@ TclExecuteByteCode( if (objResultPtr == NULL) { TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } } #ifndef TCL_COMPILE_DEBUG @@ -7473,11 +7388,10 @@ TclExecuteByteCode( TRACE(("%u => ", opnd)); dictPtr = POP_OBJECT(); searchPtr = (Tcl_DictSearch *) ckalloc(sizeof(Tcl_DictSearch)); - TRESULT = Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr, - &valuePtr, &done); - if (TRESULT != TCL_OK) { + if (Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr, &valuePtr, + &done) != TCL_OK) { ckfree((char *) searchPtr); - goto checkForCatch; + goto gotError; } TclNewObj(statePtr); statePtr->typePtr = &dictIteratorType; @@ -7568,12 +7482,12 @@ TclExecuteByteCode( TCL_LEAVE_ERR_MSG, opnd); CACHE_STACK_INFO(); if (dictPtr == NULL) { - goto dictUpdateStartFailed; + goto gotError; } } if (TclListObjGetElements(interp, OBJ_AT_TOS, &length, &keyPtrPtr) != TCL_OK) { - goto dictUpdateStartFailed; + goto gotError; } if (length != duiPtr->length) { Tcl_Panic("dictUpdateStart argument length mismatch"); @@ -7581,7 +7495,7 @@ TclExecuteByteCode( for (i=0 ; ivarIndices[i]); while (TclIsVarLink(varPtr)) { @@ -7596,14 +7510,11 @@ TclExecuteByteCode( valuePtr, TCL_LEAVE_ERR_MSG, duiPtr->varIndices[i]) == NULL) { CACHE_STACK_INFO(); - goto dictUpdateStartFailed; + goto gotError; } CACHE_STACK_INFO(); } NEXT_INST_F(9, 0, 0); - dictUpdateStartFailed: - TRESULT = TCL_ERROR; - goto checkForCatch; case INST_DICT_UPDATE_END: opnd = TclGetUInt4AtPtr(pc+1); @@ -7627,8 +7538,7 @@ TclExecuteByteCode( if (Tcl_DictObjSize(interp, dictPtr, &length) != TCL_OK || TclListObjGetElements(interp, OBJ_AT_TOS, &length, &keyPtrPtr) != TCL_OK) { - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } allocdict = Tcl_IsShared(dictPtr); if (allocdict) { @@ -7670,8 +7580,7 @@ TclExecuteByteCode( if (allocdict) { TclDecrRefCount(dictPtr); } - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; } } NEXT_INST_F(9, 1, 0); @@ -7694,9 +7603,7 @@ TclExecuteByteCode( divideByZero: Tcl_SetResult(interp, "divide by zero", TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", NULL); - - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; /* * Exponentiation of zero by negative number in an expression. Control @@ -7708,8 +7615,7 @@ TclExecuteByteCode( TCL_STATIC); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", "exponentiation of zero by negative power", NULL); - TRESULT = TCL_ERROR; - goto checkForCatch; + goto gotError; /* * Block for variables needed to process exception returns. @@ -7774,22 +7680,22 @@ TclExecuteByteCode( StringForResultCode(TRESULT), rangePtr->codeOffset, rangePtr->breakOffset)); NEXT_INST_F(0, 0, 0); - } else { - if (rangePtr->continueOffset == -1) { - TRACE_APPEND(( - "%s, loop w/o continue, checking for catch\n", - StringForResultCode(TRESULT))); - goto checkForCatch; - } - TRESULT = TCL_OK; - pc = (codePtr->codeStart + rangePtr->continueOffset); - TRACE_APPEND(("%s, range at %d, new pc %d\n", - StringForResultCode(TRESULT), - rangePtr->codeOffset, rangePtr->continueOffset)); - NEXT_INST_F(0, 0, 0); + } else if (rangePtr->continueOffset == -1) { + TRACE_APPEND(( + "%s, loop w/o continue, checking for catch\n", + StringForResultCode(TRESULT))); + goto checkForCatch; } + + TRESULT = TCL_OK; + pc = (codePtr->codeStart + rangePtr->continueOffset); + TRACE_APPEND(("%s, range at %d, new pc %d\n", + StringForResultCode(TRESULT), + rangePtr->codeOffset, rangePtr->continueOffset)); + NEXT_INST_F(0, 0, 0); + } #if TCL_COMPILE_DEBUG - } else if (traceInstructions) { + if (traceInstructions) { objPtr = Tcl_GetObjResult(interp); if ((TRESULT != TCL_ERROR) && (TRESULT != TCL_RETURN)) { TRACE_APPEND(("OTHER RETURN CODE %d, result= \"%s\"\n ", @@ -7798,8 +7704,9 @@ TclExecuteByteCode( TRACE_APPEND(("%s, result= \"%s\"\n", StringForResultCode(TRESULT), O2S(objPtr))); } -#endif } +#endif + goto checkForCatch; /* * Execution has generated an "exception" such as TCL_ERROR. If the @@ -7809,6 +7716,8 @@ TclExecuteByteCode( * and return the "exception" code. */ + gotError: + TRESULT = TCL_ERROR; checkForCatch: if (iPtr->execEnvPtr->rewind) { goto abnormalReturn; -- cgit v0.12 From ad4fb382c8f0c304d9349c4b2db7aecd8ace54cb Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 28 Apr 2010 10:50:15 +0000 Subject: * generic/tclInt.h (TclIsVarDirectUnsettable): Corrected flags so that deletion of traces is not optimized out... * generic/tclExecute.c (ExecuteExtendedBinaryMathOp) (TclCompareTwoNumbers,ExecuteExtendedUnaryMathOp,TclExecuteByteCode): [Patch 2981677]: Move the less common arithmetic operations (i.e., exponentiation and operations on non-longs) out of TEBC for a big drop in the overall size of the stack frame for most code. Net effect on speed is minimal (slightly faster overall in tclbench). Also extended the number of places where TRESULT handling is replaced with a jump to dedicated code. --- ChangeLog | 16 +- generic/tclExecute.c | 5673 +++++++++++++++++++++++++------------------------- generic/tclInt.h | 4 +- 3 files changed, 2864 insertions(+), 2829 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73ea47e..4148c5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-04-28 Donal K. Fellows + + * generic/tclInt.h (TclIsVarDirectUnsettable): Corrected flags so that + deletion of traces is not optimized out... + + * generic/tclExecute.c (ExecuteExtendedBinaryMathOp) + (TclCompareTwoNumbers,ExecuteExtendedUnaryMathOp,TclExecuteByteCode): + [Patch 2981677]: Move the less common arithmetic operations (i.e., + exponentiation and operations on non-longs) out of TEBC for a big drop + in the overall size of the stack frame for most code. Net effect on + speed is minimal (slightly faster overall in tclbench). Also extended + the number of places where TRESULT handling is replaced with a jump to + dedicated code. + 2010-04-27 Donal K. Fellows * generic/tclExecute.c (TclExecuteByteCode): Rearrange location of an @@ -45,7 +59,7 @@ 2010-04-24 Miguel Sofer * generic/tclBasic.c: Modify api of TclSpliceTailcall() to fix - * generic/tclExecute.c: yieldTo, which had not survived the latest + * generic/tclExecute.c: [yieldTo], which had not survived the latest * generic/tclInt.h: mods to tailcall. Thanks kbk for detecting the problem. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f59827c..44988ae 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.479 2010/04/27 14:58:18 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.480 2010/04/28 10:50:34 dkf Exp $ */ #include "tclInt.h" @@ -214,7 +214,7 @@ typedef struct BottomData { #define POP_TAUX_OBJ() \ do { \ - Tcl_Obj *tmpPtr = auxObjList; \ + tmpPtr = auxObjList; \ auxObjList = (Tcl_Obj *) tmpPtr->internalRep.twoPtrValue.ptr2; \ Tcl_DecrRefCount(tmpPtr); \ } while (0) @@ -680,6 +680,14 @@ static const Tcl_WideInt Exp64Value[] = { }; static const size_t Exp64ValueSize = sizeof(Exp64Value) / sizeof(Tcl_WideInt); #endif /* (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) */ + +/* + * Markers for ExecuteExtendedBinaryMathOp. + */ + +#define DIVIDED_BY_ZERO ((Tcl_Obj *) -1) +#define EXPONENT_OF_ZERO ((Tcl_Obj *) -2) +#define GENERAL_ARITHMETIC_ERROR ((Tcl_Obj *) -3) /* * Declarations for local procedures to this file: @@ -702,6 +710,13 @@ static ByteCode * CompileExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr); static void DeleteExecStack(ExecStack *esPtr); static void DupExprCodeInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); +MODULE_SCOPE int TclCompareTwoNumbers(Tcl_Obj *valuePtr, + Tcl_Obj *value2Ptr); +static Tcl_Obj * ExecuteExtendedBinaryMathOp(Tcl_Interp *interp, + int opcode, Tcl_Obj **constants, + Tcl_Obj *valuePtr, Tcl_Obj *value2Ptr); +static Tcl_Obj * ExecuteExtendedUnaryMathOp(int opcode, + Tcl_Obj *valuePtr); static void FreeExprCodeInternalRep(Tcl_Obj *objPtr); static ExceptionRange * GetExceptRangeForPc(const unsigned char *pc, int catchOnly, ByteCode *codePtr); @@ -1967,8 +1982,9 @@ TclExecuteByteCode( * NOTE: These are now mostly defined locally where needed. */ - Tcl_Obj *objPtr, *valuePtr, *value2Ptr, *part1Ptr, *part2Ptr; - int opnd, length; + Tcl_Obj *objPtr, *valuePtr, *value2Ptr, *part1Ptr, *part2Ptr, *tmpPtr; + Tcl_Obj **objv; + int opnd, objc, length, pcAdjustment; Var *varPtr, *arrayPtr; #ifdef TCL_COMPILE_DEBUG int traceInstructions = (tclTraceExec == 3); @@ -2178,32 +2194,27 @@ TclExecuteByteCode( */ if ((TAUX.instructionCount++ & ASYNC_CHECK_COUNT_MASK) == 0) { - int localResult; - + DECACHE_STACK_INFO(); if (TclAsyncReady(iPtr)) { - DECACHE_STACK_INFO(); - localResult = Tcl_AsyncInvoke(interp, TRESULT); - CACHE_STACK_INFO(); - if (localResult == TCL_ERROR) { + TRESULT = Tcl_AsyncInvoke(interp, TRESULT); + if (TRESULT == TCL_ERROR) { + CACHE_STACK_INFO(); goto gotError; } } - DECACHE_STACK_INFO(); - localResult = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); - CACHE_STACK_INFO(); - if (localResult == TCL_ERROR) { + if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) { + CACHE_STACK_INFO(); goto gotError; } if (TclLimitReady(iPtr->limit)) { - DECACHE_STACK_INFO(); - localResult = Tcl_LimitCheck(interp); - CACHE_STACK_INFO(); - if (localResult == TCL_ERROR) { + if (Tcl_LimitCheck(interp) == TCL_ERROR) { + CACHE_STACK_INFO(); goto gotError; } } + CACHE_STACK_INFO(); } TCL_DTRACE_INST_NEXT(); @@ -2239,14 +2250,13 @@ TclExecuteByteCode( TRACE_APPEND(("continuing to next instruction (TRESULT=\"%.30s\")", O2S(objResultPtr))); NEXT_INST_F(9, 1, 0); - } else { - Tcl_SetObjResult(interp, OBJ_UNDER_TOS); - if (*pc == INST_SYNTAX) { - iPtr->flags &= ~ERR_ALREADY_LOGGED; - } - cleanup = 2; - goto processExceptionReturn; } + Tcl_SetObjResult(interp, OBJ_UNDER_TOS); + if (*pc == INST_SYNTAX) { + iPtr->flags &= ~ERR_ALREADY_LOGGED; + } + cleanup = 2; + goto processExceptionReturn; } case INST_RETURN_STK: @@ -2259,11 +2269,10 @@ TclExecuteByteCode( TRACE_APPEND(("continuing to next instruction (TRESULT=\"%.30s\")", O2S(objResultPtr))); NEXT_INST_F(1, 0, 0); - } else { - Tcl_SetObjResult(interp, objResultPtr); - cleanup = 1; - goto processExceptionReturn; } + Tcl_SetObjResult(interp, objResultPtr); + cleanup = 1; + goto processExceptionReturn; case INST_DONE: if (tosPtr > initTosPtr) { @@ -2394,10 +2403,9 @@ TclExecuteByteCode( a = tosPtr-(opnd-1); b = tosPtr; while (a ERROR: ", O2S(objPtr)), Tcl_GetObjResult(interp)); goto gotError; @@ -2654,10 +2661,6 @@ TclExecuteByteCode( * INVOCATION BLOCK */ - { - int objc, pcAdjustment; - Tcl_Obj **objv; - instEvalStk: case INST_EVAL_STK: /* @@ -2692,7 +2695,14 @@ TclExecuteByteCode( Tcl_IncrRefCount(copyPtr); OBJ_AT_TOS = copyPtr; listRepPtr = copyPtr->internalRep.twoPtrValue.ptr1; - Tcl_DecrRefCount(objPtr); + + /* + * Decrement the refcount on the *original* copy of the + * list directly; we know it was greater than 1 here so it + * can't be deallocated. + */ + + objPtr->refCount--; } objc = listRepPtr->elemCount; objv = &listRepPtr->elements; @@ -2975,7 +2985,7 @@ TclExecuteByteCode( NEXT_INST_V(0, cleanup, -1); #if TCL_SUPPORT_84_BYTECODE - case INST_CALL_BUILTIN_FUNC1: { + case INST_CALL_BUILTIN_FUNC1: /* * Call one of the built-in pre-8.5 Tcl math functions. This * translates to INST_INVOKE_STK1 with the first argument of @@ -2983,9 +2993,6 @@ TclExecuteByteCode( * function into the stack. */ - int numArgs; - Tcl_Obj *tmpPtr1, *tmpPtr2; - opnd = TclGetUInt1AtPtr(pc+1); if ((opnd < 0) || (opnd > LAST_BUILTIN_FUNC)) { TRACE(("UNRECOGNIZED BUILTIN FUNC CODE %d\n", opnd)); @@ -2999,30 +3006,32 @@ TclExecuteByteCode( * Only 0, 1 or 2 args. */ - numArgs = tclBuiltinFuncTable[opnd].numArgs; - if (numArgs == 0) { - PUSH_OBJECT(objPtr); - } else if (numArgs == 1) { - tmpPtr1 = POP_OBJECT(); - PUSH_OBJECT(objPtr); - PUSH_OBJECT(tmpPtr1); - Tcl_DecrRefCount(tmpPtr1); - } else { - tmpPtr2 = POP_OBJECT(); - tmpPtr1 = POP_OBJECT(); - PUSH_OBJECT(objPtr); - PUSH_OBJECT(tmpPtr1); - PUSH_OBJECT(tmpPtr2); - Tcl_DecrRefCount(tmpPtr1); - Tcl_DecrRefCount(tmpPtr2); + { + int numArgs = tclBuiltinFuncTable[opnd].numArgs; + Tcl_Obj *tmpPtr1, *tmpPtr2; + + if (numArgs == 0) { + PUSH_OBJECT(objPtr); + } else if (numArgs == 1) { + tmpPtr1 = POP_OBJECT(); + PUSH_OBJECT(objPtr); + PUSH_OBJECT(tmpPtr1); + Tcl_DecrRefCount(tmpPtr1); + } else { + tmpPtr2 = POP_OBJECT(); + tmpPtr1 = POP_OBJECT(); + PUSH_OBJECT(objPtr); + PUSH_OBJECT(tmpPtr1); + PUSH_OBJECT(tmpPtr2); + Tcl_DecrRefCount(tmpPtr1); + Tcl_DecrRefCount(tmpPtr2); + } + objc = numArgs + 1; } - - objc = numArgs + 1; pcAdjustment = 2; goto doInvocation; - } - case INST_CALL_FUNC1: { + case INST_CALL_FUNC1: /* * Call a non-builtin Tcl math function previously registered by a * call to Tcl_CreateMathFunc pre-8.5. This is essentially @@ -3030,13 +3039,8 @@ TclExecuteByteCode( * ::tcl::mathfunc::$objv[0]. */ - Tcl_Obj *tmpPtr; - - /* - * Number of arguments. The function name is the 0-th argument. - */ - - objc = TclGetUInt1AtPtr(pc+1); + objc = TclGetUInt1AtPtr(pc+1); /* Number of arguments. The function + * name is the 0-th argument. */ objPtr = OBJ_AT_DEPTH(objc-1); TclNewLiteralStringObj(tmpPtr, "::tcl::mathfunc::"); @@ -3052,7 +3056,6 @@ TclExecuteByteCode( pcAdjustment = 2; goto doInvocation; - } #else /* * INST_CALL_BUILTIN_FUNC1 and INST_CALL_FUNC1 were made obsolete by the @@ -3065,7 +3068,6 @@ TclExecuteByteCode( case INST_CALL_FUNC1: Tcl_Panic("TclExecuteByteCode: obsolete INST_CALL_FUNC1 found"); #endif - } /* * ----------------------------------------------------------------- @@ -3075,8 +3077,6 @@ TclExecuteByteCode( * instructions set the value of some variables and then jump to some * common execution code. */ - { - int pcAdjustment; case INST_LOAD_SCALAR1: instLoadScalar1: @@ -3213,7 +3213,6 @@ TclExecuteByteCode( } TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_V(pcAdjustment, cleanup, 1); - } /* * End of INST_LOAD instructions. @@ -3226,7 +3225,7 @@ TclExecuteByteCode( */ { - int pcAdjustment, storeFlags; + int storeFlags; case INST_STORE_ARRAY4: opnd = TclGetUInt4AtPtr(pc+1); @@ -3482,11 +3481,10 @@ TclExecuteByteCode( { Tcl_Obj *incrPtr; - int pcAdjustment; #ifndef NO_WIDE_TYPE Tcl_WideInt w; #endif - long i; + long increment; case INST_INCR_SCALAR1: case INST_INCR_ARRAY1: @@ -3510,8 +3508,8 @@ TclExecuteByteCode( case INST_INCR_ARRAY_STK_IMM: case INST_INCR_SCALAR_STK_IMM: case INST_INCR_STK_IMM: - i = TclGetInt1AtPtr(pc+1); - incrPtr = Tcl_NewIntObj(i); + increment = TclGetInt1AtPtr(pc+1); + incrPtr = Tcl_NewIntObj(increment); Tcl_IncrRefCount(incrPtr); pcAdjustment = 2; @@ -3521,11 +3519,11 @@ TclExecuteByteCode( part2Ptr = OBJ_AT_TOS; objPtr = OBJ_UNDER_TOS; TRACE(("\"%.30s(%.30s)\" (by %ld) => ", - O2S(objPtr), O2S(part2Ptr), i)); + O2S(objPtr), O2S(part2Ptr), increment)); } else { part2Ptr = NULL; objPtr = OBJ_AT_TOS; - TRACE(("\"%.30s\" (by %ld) => ", O2S(objPtr), i)); + TRACE(("\"%.30s\" (by %ld) => ", O2S(objPtr), increment)); } part1Ptr = objPtr; opnd = -1; @@ -3543,8 +3541,8 @@ TclExecuteByteCode( case INST_INCR_ARRAY1_IMM: opnd = TclGetUInt1AtPtr(pc+1); - i = TclGetInt1AtPtr(pc+2); - incrPtr = Tcl_NewIntObj(i); + increment = TclGetInt1AtPtr(pc+2); + incrPtr = Tcl_NewIntObj(increment); Tcl_IncrRefCount(incrPtr); pcAdjustment = 3; @@ -3556,7 +3554,7 @@ TclExecuteByteCode( while (TclIsVarLink(arrayPtr)) { arrayPtr = arrayPtr->value.linkPtr; } - TRACE(("%u \"%.30s\" (by %ld) => ", opnd, O2S(part2Ptr), i)); + TRACE(("%u \"%.30s\" (by %ld) => ", opnd, O2S(part2Ptr), increment)); varPtr = TclLookupArrayElement(interp, part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, "read", 1, 1, arrayPtr, opnd); if (!varPtr) { @@ -3568,7 +3566,7 @@ TclExecuteByteCode( case INST_INCR_SCALAR1_IMM: opnd = TclGetUInt1AtPtr(pc+1); - i = TclGetInt1AtPtr(pc+2); + increment = TclGetInt1AtPtr(pc+2); pcAdjustment = 3; cleanup = 0; varPtr = LOCAL(opnd); @@ -3584,16 +3582,16 @@ TclExecuteByteCode( if (GetNumberFromObj(NULL, objPtr, &ptr, &type) == TCL_OK) { if (type == TCL_NUMBER_LONG) { long augend = *((const long *)ptr); - long sum = augend + i; + long sum = augend + increment; /* * Overflow when (augend and sum have different sign) and - * (augend and i have the same sign). This is encapsulated - * in the Overflowing macro. + * (augend and increment have the same sign). This is + * encapsulated in the Overflowing macro. */ - if (!Overflowing(augend, i, sum)) { - TRACE(("%u %ld => ", opnd, i)); + if (!Overflowing(augend, increment, sum)) { + TRACE(("%u %ld => ", opnd, increment)); if (Tcl_IsShared(objPtr)) { objPtr->refCount--; /* We know it's shared. */ TclNewLongObj(objResultPtr, sum); @@ -3608,10 +3606,10 @@ TclExecuteByteCode( #ifndef NO_WIDE_TYPE w = (Tcl_WideInt)augend; - TRACE(("%u %ld => ", opnd, i)); + TRACE(("%u %ld => ", opnd, increment)); if (Tcl_IsShared(objPtr)) { objPtr->refCount--; /* We know it's shared. */ - objResultPtr = Tcl_NewWideIntObj(w+i); + objResultPtr = Tcl_NewWideIntObj(w+increment); Tcl_IncrRefCount(objResultPtr); varPtr->value.objPtr = objResultPtr; } else { @@ -3622,7 +3620,7 @@ TclExecuteByteCode( * use macro form that doesn't range test again. */ - TclSetWideIntObj(objPtr, w+i); + TclSetWideIntObj(objPtr, w+increment); } goto doneIncr; #endif @@ -3632,14 +3630,14 @@ TclExecuteByteCode( Tcl_WideInt sum; w = *((const Tcl_WideInt *) ptr); - sum = w + i; + sum = w + increment; /* * Check for overflow. */ - if (!Overflowing(w, i, sum)) { - TRACE(("%u %ld => ", opnd, i)); + if (!Overflowing(w, increment, sum)) { + TRACE(("%u %ld => ", opnd, increment)); if (Tcl_IsShared(objPtr)) { objPtr->refCount--; /* We know it's shared. */ objResultPtr = Tcl_NewWideIntObj(sum); @@ -3669,14 +3667,14 @@ TclExecuteByteCode( } else { objResultPtr = objPtr; } - TclNewLongObj(incrPtr, i); - TRESULT = TclIncrObj(interp, objResultPtr, incrPtr); - Tcl_DecrRefCount(incrPtr); - if (TRESULT != TCL_OK) { + TclNewLongObj(incrPtr, increment); + if (TclIncrObj(interp, objResultPtr, incrPtr) != TCL_OK) { + Tcl_DecrRefCount(incrPtr); TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); goto gotError; } + Tcl_DecrRefCount(incrPtr); goto doneIncr; } @@ -3684,7 +3682,7 @@ TclExecuteByteCode( * All other cases, flow through to generic handling. */ - TclNewLongObj(incrPtr, i); + TclNewLongObj(incrPtr, increment); Tcl_IncrRefCount(incrPtr); doIncrScalar: @@ -3695,7 +3693,7 @@ TclExecuteByteCode( arrayPtr = NULL; part1Ptr = part2Ptr = NULL; cleanup = 0; - TRACE(("%u %ld => ", opnd, i)); + TRACE(("%u %ld => ", opnd, increment)); doIncrVar: if (TclIsVarDirectModifyable2(varPtr, arrayPtr)) { @@ -3708,14 +3706,13 @@ TclExecuteByteCode( } else { objResultPtr = objPtr; } - TRESULT = TclIncrObj(interp, objResultPtr, incrPtr); - Tcl_DecrRefCount(incrPtr); - if (TRESULT != TCL_OK) { + if (TclIncrObj(interp, objResultPtr, incrPtr) != TCL_OK) { + Tcl_DecrRefCount(incrPtr); TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); goto gotError; } - goto doneIncr; + Tcl_DecrRefCount(incrPtr); } else { DECACHE_STACK_INFO(); objResultPtr = TclPtrIncrObjVar(interp, varPtr, arrayPtr, @@ -3842,7 +3839,7 @@ TclExecuteByteCode( */ { - int flags, localResult; + int flags; case INST_UNSET_SCALAR: flags = TclGetUInt1AtPtr(pc+1) ? TCL_LEAVE_ERR_MSG : 0; @@ -3859,7 +3856,7 @@ TclExecuteByteCode( */ if (!TclIsVarUndefined(varPtr)) { - Tcl_DecrRefCount(varPtr->value.objPtr); + TclDecrRefCount(varPtr->value.objPtr); } else if (flags & TCL_LEAVE_ERR_MSG) { goto slowUnsetScalar; } @@ -3869,12 +3866,11 @@ TclExecuteByteCode( slowUnsetScalar: DECACHE_STACK_INFO(); - localResult = TclPtrUnsetVar(interp, varPtr, NULL, NULL, NULL, flags, - opnd); - CACHE_STACK_INFO(); - if (localResult != TCL_OK && flags) { + if (TclPtrUnsetVar(interp, varPtr, NULL, NULL, NULL, flags, + opnd) != TCL_OK && flags) { goto errorInUnset; } + CACHE_STACK_INFO(); NEXT_INST_F(6, 0, 0); case INST_UNSET_ARRAY: @@ -3885,7 +3881,8 @@ TclExecuteByteCode( while (TclIsVarLink(arrayPtr)) { arrayPtr = arrayPtr->value.linkPtr; } - TRACE(("%s %u \"%.30s\"\n", (flags?"normal":"noerr"), opnd, O2S(part2Ptr))); + TRACE(("%s %u \"%.30s\"\n", + (flags ? "normal" : "noerr"), opnd, O2S(part2Ptr))); if (TclIsVarArray(arrayPtr) && !UnsetTraced(arrayPtr)) { varPtr = VarHashFindVar(arrayPtr->value.tablePtr, part2Ptr); if (varPtr && TclIsVarDirectUnsettable(varPtr)) { @@ -3895,32 +3892,33 @@ TclExecuteByteCode( */ if (!TclIsVarUndefined(varPtr)) { - Tcl_DecrRefCount(varPtr->value.objPtr); + TclDecrRefCount(varPtr->value.objPtr); } else if (flags & TCL_LEAVE_ERR_MSG) { goto slowUnsetArray; } varPtr->value.objPtr = NULL; NEXT_INST_F(6, 1, 0); + } else if (!varPtr && !(flags & TCL_LEAVE_ERR_MSG)) { + /* + * Don't need to do anything here. + */ + + NEXT_INST_F(6, 1, 0); } } slowUnsetArray: DECACHE_STACK_INFO(); varPtr = TclLookupArrayElement(interp, NULL, part2Ptr, flags, "unset", 0, 0, arrayPtr, opnd); - if (!varPtr && (flags & TCL_LEAVE_ERR_MSG)) { - CACHE_STACK_INFO(); + if (!varPtr) { + if (flags & TCL_LEAVE_ERR_MSG) { + goto errorInUnset; + } + } else if (TclPtrUnsetVar(interp, varPtr, arrayPtr, NULL, part2Ptr, + flags, opnd) != TCL_OK && (flags & TCL_LEAVE_ERR_MSG)) { goto errorInUnset; } - if (varPtr) { - localResult = TclPtrUnsetVar(interp, varPtr, arrayPtr, NULL, - part2Ptr, flags, opnd); - } else { - localResult = TCL_OK; - } CACHE_STACK_INFO(); - if (localResult != TCL_OK && (flags & TCL_LEAVE_ERR_MSG)) { - goto errorInUnset; - } NEXT_INST_F(6, 1, 0); case INST_UNSET_ARRAY_STK: @@ -3941,14 +3939,15 @@ TclExecuteByteCode( doUnsetStk: DECACHE_STACK_INFO(); - localResult = TclObjUnsetVar2(interp, part1Ptr, part2Ptr, flags); - CACHE_STACK_INFO(); - if (localResult != TCL_OK && (flags & TCL_LEAVE_ERR_MSG)) { + if (TclObjUnsetVar2(interp, part1Ptr, part2Ptr, flags) != TCL_OK + && (flags & TCL_LEAVE_ERR_MSG)) { goto errorInUnset; } + CACHE_STACK_INFO(); NEXT_INST_V(2, cleanup, 0); errorInUnset: + CACHE_STACK_INFO(); TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp)))); goto gotError; } @@ -3961,14 +3960,14 @@ TclExecuteByteCode( { Var *otherPtr; - - case INST_UPVAR: { CallFrame *framePtr, *savedFramePtr; + Tcl_Namespace *nsPtr; + Namespace *savedNsPtr; + case INST_UPVAR: TRACE_WITH_OBJ(("upvar "), OBJ_UNDER_TOS); - TRESULT = TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr); - if (TRESULT == -1) { + if (TclObjGetFrame(interp, OBJ_UNDER_TOS, &framePtr) == -1) { goto gotError; } @@ -3982,16 +3981,12 @@ TclExecuteByteCode( TCL_LEAVE_ERR_MSG, "access", /*createPart1*/ 1, /*createPart2*/ 1, &varPtr); iPtr->varFramePtr = savedFramePtr; - if (otherPtr) { - goto doLinkVars; + if (!otherPtr) { + goto gotError; } - goto gotError; - } - - case INST_NSUPVAR: { - Tcl_Namespace *nsPtr; - Namespace *savedNsPtr; + goto doLinkVars; + case INST_NSUPVAR: TRACE_WITH_OBJ(("nsupvar "), OBJ_UNDER_TOS); if (TclGetNamespaceFromObj(interp, OBJ_UNDER_TOS, &nsPtr) != TCL_OK) { goto gotError; @@ -4011,7 +4006,6 @@ TclExecuteByteCode( goto gotError; } goto doLinkVars; - } case INST_VARIABLE: TRACE(("variable ")); @@ -4040,7 +4034,6 @@ TclExecuteByteCode( varPtr = LOCAL(opnd); if ((varPtr != otherPtr) && !TclIsVarTraced(varPtr) && (TclIsVarUndefined(varPtr) || TclIsVarLink(varPtr))) { - TRESULT = TCL_OK; if (!TclIsVarUndefined(varPtr)) { /* * Then it is a defined link. @@ -4221,6 +4214,11 @@ TclExecuteByteCode( * Start of INST_LIST and related instructions. */ + { + int index, numIndices, fromIdx, toIdx; + int nocase, match, length2, cflags, s1len, s2len; + const char *s1, *s2; + case INST_LIST: /* * Pop the opnd (objc) top stack elements into a new list obj and then @@ -4234,7 +4232,6 @@ TclExecuteByteCode( case INST_LIST_LENGTH: valuePtr = OBJ_AT_TOS; - if (TclListObjLength(interp, valuePtr, &length) != TCL_OK) { TRACE_WITH_OBJ(("%.30s => ERROR: ", O2S(valuePtr)), Tcl_GetObjResult(interp)); @@ -4244,18 +4241,7 @@ TclExecuteByteCode( TRACE(("%.20s => %d\n", O2S(valuePtr), length)); NEXT_INST_F(1, 1, 1); - case INST_LIST_INDEX: { - /*** lindex with objc == 3 ***/ - - /* Variables also for INST_LIST_INDEX_IMM */ - - int listc, idx, pcAdjustment; - Tcl_Obj **listv; - - /* - * Pop the two operands. - */ - + case INST_LIST_INDEX: /* lindex with objc == 3 */ value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -4263,10 +4249,10 @@ TclExecuteByteCode( * Extract the desired list element. */ - TRESULT = TclListObjGetElements(interp, valuePtr, &listc, &listv); - if ((TRESULT == TCL_OK) && (value2Ptr->typePtr != &tclListType) - && (TclGetIntForIndexM(NULL , value2Ptr, listc-1, - &idx) == TCL_OK)) { + if ((TclListObjGetElements(interp, valuePtr, &objc, &objv) == TCL_OK) + && (value2Ptr->typePtr != &tclListType) + && (TclGetIntForIndexM(NULL , value2Ptr, objc-1, + &index) == TCL_OK)) { TclDecrRefCount(value2Ptr); tosPtr--; pcAdjustment = 1; @@ -4288,10 +4274,8 @@ TclExecuteByteCode( O2S(valuePtr), O2S(value2Ptr), O2S(objResultPtr))); NEXT_INST_F(1, 2, -1); /* Already has the correct refCount */ - case INST_LIST_INDEX_IMM: - /*** lindex with objc==3 and index in bytecode stream ***/ - - pcAdjustment = 5; + case INST_LIST_INDEX_IMM: /* lindex with objc==3 and index in bytecode + * stream */ /* * Pop the list and get the index. @@ -4305,7 +4289,7 @@ TclExecuteByteCode( * in the process. */ - if (TclListObjGetElements(interp, valuePtr, &listc, &listv)!=TCL_OK) { + if (TclListObjGetElements(interp, valuePtr, &objc, &objv) != TCL_OK) { TRACE_WITH_OBJ(("\"%.30s\" %d => ERROR: ", O2S(valuePtr), opnd), Tcl_GetObjResult(interp)); goto gotError; @@ -4317,14 +4301,15 @@ TclExecuteByteCode( */ if (opnd < -1) { - idx = opnd+1 + listc; + index = opnd+1 + objc; } else { - idx = opnd; + index = opnd; } + pcAdjustment = 5; lindexFastPath: - if (idx >= 0 && idx < listc) { - objResultPtr = listv[idx]; + if (index >= 0 && index < objc) { + objResultPtr = objv[index]; } else { TclNewObj(objResultPtr); } @@ -4332,27 +4317,21 @@ TclExecuteByteCode( TRACE_WITH_OBJ(("\"%.30s\" %d => ", O2S(valuePtr), opnd), objResultPtr); NEXT_INST_F(pcAdjustment, 1, 1); - } - { - int numIdx; - - case INST_LIST_INDEX_MULTI: + case INST_LIST_INDEX_MULTI: /* 'lindex' with multiple index args */ /* - * 'lindex' with multiple index args: - * * Determine the count of index args. */ opnd = TclGetUInt4AtPtr(pc+1); - numIdx = opnd-1; + numIndices = opnd-1; /* * Do the 'lindex' operation. */ - objResultPtr = TclLindexFlat(interp, OBJ_AT_DEPTH(numIdx), - numIdx, &OBJ_AT_DEPTH(numIdx - 1)); + objResultPtr = TclLindexFlat(interp, OBJ_AT_DEPTH(numIndices), + numIndices, &OBJ_AT_DEPTH(numIndices - 1)); if (!objResultPtr) { TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); goto gotError; @@ -4371,7 +4350,7 @@ TclExecuteByteCode( */ opnd = TclGetUInt4AtPtr(pc + 1); - numIdx = opnd - 2; + numIndices = opnd - 2; /* * Get the old value of variable, and remove the stack ref. This is @@ -4380,21 +4359,15 @@ TclExecuteByteCode( * Tcl_DecrRefCount. */ - value2Ptr = POP_OBJECT(); - Tcl_DecrRefCount(value2Ptr); /* This one should be done here */ - - /* - * Get the new element value. - */ - - valuePtr = OBJ_AT_TOS; + valuePtr = POP_OBJECT(); + Tcl_DecrRefCount(valuePtr); /* This one should be done here */ /* * Compute the new variable value. */ - objResultPtr = TclLsetFlat(interp, value2Ptr, numIdx, - &OBJ_AT_DEPTH(numIdx), valuePtr); + objResultPtr = TclLsetFlat(interp, valuePtr, numIndices, + &OBJ_AT_DEPTH(numIndices), OBJ_AT_TOS); if (!objResultPtr) { TRACE_WITH_OBJ(("%d => ERROR: ", opnd), Tcl_GetObjResult(interp)); goto gotError; @@ -4405,13 +4378,10 @@ TclExecuteByteCode( */ TRACE(("%d => %s\n", opnd, O2S(objResultPtr))); - NEXT_INST_V(5, (numIdx+1), -1); - } + NEXT_INST_V(5, numIndices+1, -1); - case INST_LSET_LIST: + case INST_LSET_LIST: /* 'lset' with 4 args */ /* - * 'lset' with 4 args. - * * Get the old value of variable, and remove the stack ref. This is * safe because the variable still references the object; the ref * count will never go zero here - we can use the smaller macro @@ -4446,11 +4416,8 @@ TclExecuteByteCode( TRACE(("=> %s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, -1); - case INST_LIST_RANGE_IMM: { - /*** lrange with objc==4 and both indices in bytecode stream ***/ - - int listc, fromIdx, toIdx; - Tcl_Obj **listv; + case INST_LIST_RANGE_IMM: /* lrange with objc==4 and both indices in + * bytecode stream */ /* * Pop the list and get the indices. @@ -4465,7 +4432,7 @@ TclExecuteByteCode( * in the process. */ - if (TclListObjGetElements(interp, valuePtr, &listc, &listv)!=TCL_OK) { + if (TclListObjGetElements(interp, valuePtr, &objc, &objv) != TCL_OK) { TRACE_WITH_OBJ(("\"%.30s\" %d %d => ERROR: ", O2S(valuePtr), fromIdx, toIdx), Tcl_GetObjResult(interp)); goto gotError; @@ -4487,20 +4454,20 @@ TclExecuteByteCode( */ if (fromIdx < -1) { - fromIdx += 1+listc; + fromIdx += 1+objc; if (fromIdx < -1) { fromIdx = -1; } - } else if (fromIdx > listc) { - fromIdx = listc; + } else if (fromIdx > objc) { + fromIdx = objc; } if (toIdx < -1) { - toIdx += 1+listc; + toIdx += 1 + objc; if (toIdx < -1) { toIdx = -1; } - } else if (toIdx > listc) { - toIdx = listc; + } else if (toIdx > objc) { + toIdx = objc; } /* @@ -4508,14 +4475,14 @@ TclExecuteByteCode( * so, build the list of elements in that range. */ - if (fromIdx<=toIdx && fromIdx=0) { + if (fromIdx<=toIdx && fromIdx=0) { if (fromIdx<0) { fromIdx = 0; } - if (toIdx >= listc) { - toIdx = listc-1; + if (toIdx >= objc) { + toIdx = objc-1; } - objResultPtr = Tcl_NewListObj(toIdx-fromIdx+1, listv+fromIdx); + objResultPtr = Tcl_NewListObj(toIdx-fromIdx+1, objv+fromIdx); } else { TclNewObj(objResultPtr); } @@ -4523,56 +4490,48 @@ TclExecuteByteCode( TRACE_WITH_OBJ(("\"%.30s\" %d %d => ", O2S(valuePtr), TclGetInt4AtPtr(pc+1), TclGetInt4AtPtr(pc+5)), objResultPtr); NEXT_INST_F(9, 1, 1); - } case INST_LIST_IN: - case INST_LIST_NOT_IN: { - /* - * Basic list containment operators. - */ - - int found, s1len, s2len, llen, i; - const char *s1, *s2; - + case INST_LIST_NOT_IN: /* Basic list containment operators. */ value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; /* TODO: Consider more efficient tests than strcmp() */ s1 = TclGetStringFromObj(valuePtr, &s1len); - if (TclListObjLength(interp, value2Ptr, &llen) != TCL_OK) { + if (TclListObjLength(interp, value2Ptr, &length) != TCL_OK) { TRACE_WITH_OBJ(("\"%.30s\" \"%.30s\" => ERROR: ", O2S(valuePtr), O2S(value2Ptr)), Tcl_GetObjResult(interp)); goto gotError; } + match = 0; + if (length > 0) { + int i = 0; + Tcl_Obj *o; - found = 0; - if (llen > 0) { /* * An empty list doesn't match anything. */ - i = 0; do { - Tcl_Obj *o; - Tcl_ListObjIndex(NULL, value2Ptr, i, &o); if (o != NULL) { s2 = TclGetStringFromObj(o, &s2len); } else { - s2 = ""; s2len = 0; + s2 = ""; + s2len = 0; } if (s1len == s2len) { - found = (strcmp(s1, s2) == 0); + match = (strcmp(s1, s2) == 0); } i++; - } while (i < llen && found == 0); + } while (i < length && match == 0); } if (*pc == INST_LIST_NOT_IN) { - found = !found; + match = !match; } - TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), found)); + TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match)); /* * Peep-hole optimisation: if you're about to jump, do jump from here. @@ -4584,18 +4543,17 @@ TclExecuteByteCode( #ifndef TCL_COMPILE_DEBUG switch (*pc) { case INST_JUMP_FALSE1: - NEXT_INST_F((found ? 2 : TclGetInt1AtPtr(pc+1)), 2, 0); + NEXT_INST_F((match ? 2 : TclGetInt1AtPtr(pc+1)), 2, 0); case INST_JUMP_TRUE1: - NEXT_INST_F((found ? TclGetInt1AtPtr(pc+1) : 2), 2, 0); + NEXT_INST_F((match ? TclGetInt1AtPtr(pc+1) : 2), 2, 0); case INST_JUMP_FALSE4: - NEXT_INST_F((found ? 5 : TclGetInt4AtPtr(pc+1)), 2, 0); + NEXT_INST_F((match ? 5 : TclGetInt4AtPtr(pc+1)), 2, 0); case INST_JUMP_TRUE4: - NEXT_INST_F((found ? TclGetInt4AtPtr(pc+1) : 5), 2, 0); + NEXT_INST_F((match ? TclGetInt4AtPtr(pc+1) : 5), 2, 0); } #endif - objResultPtr = TCONST(found); + objResultPtr = TCONST(match); NEXT_INST_F(0, 2, 1); - } /* * End of INST_LIST and related instructions. @@ -4604,14 +4562,11 @@ TclExecuteByteCode( */ case INST_STR_EQ: - case INST_STR_NEQ: { + case INST_STR_NEQ: /* String (in)equality check */ /* - * String (in)equality check * TODO: Consider merging into INST_STR_CMP */ - int iResult; - value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -4621,11 +4576,8 @@ TclExecuteByteCode( * really have to think hard about equality. */ - iResult = (*pc == INST_STR_EQ); + match = (*pc == INST_STR_EQ); } else { - const char *s1, *s2; - int s1len, s2len; - s1 = TclGetStringFromObj(valuePtr, &s1len); s2 = TclGetStringFromObj(value2Ptr, &s2len); if (s1len == s2len) { @@ -4635,17 +4587,17 @@ TclExecuteByteCode( */ if (*pc == INST_STR_NEQ) { - iResult = (strcmp(s1, s2) != 0); + match = (strcmp(s1, s2) != 0); } else { /* INST_STR_EQ */ - iResult = (strcmp(s1, s2) == 0); + match = (strcmp(s1, s2) == 0); } } else { - iResult = (*pc == INST_STR_NEQ); + match = (*pc == INST_STR_NEQ); } } - TRACE(("%.20s %.20s => %d\n", O2S(valuePtr),O2S(value2Ptr),iResult)); + TRACE(("%.20s %.20s => %d\n", O2S(valuePtr),O2S(value2Ptr),match)); /* * Peep-hole optimisation: if you're about to jump, do jump from here. @@ -4655,28 +4607,20 @@ TclExecuteByteCode( #ifndef TCL_COMPILE_DEBUG switch (*pc) { case INST_JUMP_FALSE1: - NEXT_INST_F((iResult? 2 : TclGetInt1AtPtr(pc+1)), 2, 0); + NEXT_INST_F((match? 2 : TclGetInt1AtPtr(pc+1)), 2, 0); case INST_JUMP_TRUE1: - NEXT_INST_F((iResult? TclGetInt1AtPtr(pc+1) : 2), 2, 0); + NEXT_INST_F((match? TclGetInt1AtPtr(pc+1) : 2), 2, 0); case INST_JUMP_FALSE4: - NEXT_INST_F((iResult? 5 : TclGetInt4AtPtr(pc+1)), 2, 0); + NEXT_INST_F((match? 5 : TclGetInt4AtPtr(pc+1)), 2, 0); case INST_JUMP_TRUE4: - NEXT_INST_F((iResult? TclGetInt4AtPtr(pc+1) : 5), 2, 0); + NEXT_INST_F((match? TclGetInt4AtPtr(pc+1) : 5), 2, 0); } #endif - objResultPtr = TCONST(iResult); + objResultPtr = TCONST(match); NEXT_INST_F(0, 2, 1); - } - - case INST_STR_CMP: { - /* - * String compare. - */ - - const char *s1, *s2; - int s1len, s2len, iResult; stringCompare: + case INST_STR_CMP: /* String compare. */ value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -4691,12 +4635,12 @@ TclExecuteByteCode( * (or we could goto beyond it). */ - iResult = s1len = s2len = 0; + match = s1len = s2len = 0; } else if (TclIsPureByteArray(valuePtr) && TclIsPureByteArray(value2Ptr)) { s1 = (char *) Tcl_GetByteArrayFromObj(valuePtr, &s1len); s2 = (char *) Tcl_GetByteArrayFromObj(value2Ptr, &s2len); - iResult = memcmp(s1, s2, + match = memcmp(s1, s2, (size_t) ((s1len < s2len) ? s1len : s2len)); } else if (((valuePtr->typePtr == &tclStringType) && (value2Ptr->typePtr == &tclStringType))) { @@ -4710,10 +4654,10 @@ TclExecuteByteCode( s1len = Tcl_GetCharLength(valuePtr); s2len = Tcl_GetCharLength(value2Ptr); if ((s1len == valuePtr->length) && (s2len == value2Ptr->length)) { - iResult = memcmp(valuePtr->bytes, value2Ptr->bytes, + match = memcmp(valuePtr->bytes, value2Ptr->bytes, (unsigned) ((s1len < s2len) ? s1len : s2len)); } else { - iResult = TclUniCharNcmp(Tcl_GetUnicode(valuePtr), + match = TclUniCharNcmp(Tcl_GetUnicode(valuePtr), Tcl_GetUnicode(value2Ptr), (unsigned) ((s1len < s2len) ? s1len : s2len)); } @@ -4725,7 +4669,7 @@ TclExecuteByteCode( s1 = TclGetStringFromObj(valuePtr, &s1len); s2 = TclGetStringFromObj(value2Ptr, &s2len); - iResult = TclpUtfNcmp2(s1, s2, + match = TclpUtfNcmp2(s1, s2, (size_t) ((s1len < s2len) ? s1len : s2len)); } @@ -4734,8 +4678,8 @@ TclExecuteByteCode( * TODO: consider peephole opt. */ - if (iResult == 0) { - iResult = s1len - s2len; + if (match == 0) { + match = s1len - s2len; } if (*pc != INST_STR_CMP) { @@ -4745,52 +4689,42 @@ TclExecuteByteCode( switch (*pc) { case INST_EQ: - iResult = (iResult == 0); + match = (match == 0); break; case INST_NEQ: - iResult = (iResult != 0); + match = (match != 0); break; case INST_LT: - iResult = (iResult < 0); + match = (match < 0); break; case INST_GT: - iResult = (iResult > 0); + match = (match > 0); break; case INST_LE: - iResult = (iResult <= 0); + match = (match <= 0); break; case INST_GE: - iResult = (iResult >= 0); + match = (match >= 0); break; } } - if (iResult < 0) { + if (match < 0) { TclNewIntObj(objResultPtr, -1); - TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), -1)); } else { - objResultPtr = TCONST(iResult>0); - TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), - (iResult > 0))); + objResultPtr = TCONST(match > 0); } - + TRACE(("%.20s %.20s => %s\n", O2S(valuePtr), O2S(value2Ptr), + O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); - } case INST_STR_LEN: valuePtr = OBJ_AT_TOS; - length = Tcl_GetCharLength(valuePtr); TclNewIntObj(objResultPtr, length); TRACE(("%.20s => %d\n", O2S(valuePtr), length)); NEXT_INST_F(1, 1, 1); - case INST_STR_INDEX: { - /* - * String compare. - */ - - int index; - + case INST_STR_INDEX: value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -4803,40 +4737,33 @@ TclExecuteByteCode( goto gotError; } - if ((index >= 0) && (index < length)) { - if (TclIsPureByteArray(valuePtr)) { - objResultPtr = Tcl_NewByteArrayObj( - Tcl_GetByteArrayFromObj(valuePtr, &length)+index, 1); - } else if (valuePtr->bytes && length == valuePtr->length) { - objResultPtr = Tcl_NewStringObj((const char *) - (&valuePtr->bytes[index]), 1); - } else { - char buf[TCL_UTF_MAX]; - Tcl_UniChar ch; - - ch = Tcl_GetUniChar(valuePtr, index); + if ((index < 0) || (index >= length)) { + TclNewObj(objResultPtr); + } else if (TclIsPureByteArray(valuePtr)) { + objResultPtr = Tcl_NewByteArrayObj( + Tcl_GetByteArrayFromObj(valuePtr, &length)+index, 1); + } else if (valuePtr->bytes && length == valuePtr->length) { + objResultPtr = Tcl_NewStringObj((const char *) + valuePtr->bytes+index, 1); + } else { + char buf[TCL_UTF_MAX]; + Tcl_UniChar ch = Tcl_GetUniChar(valuePtr, index); - /* - * This could be: Tcl_NewUnicodeObj((const Tcl_UniChar *)&ch, - * 1) but creating the object as a string seems to be faster - * in practical use. - */ + /* + * This could be: Tcl_NewUnicodeObj((const Tcl_UniChar *)&ch, 1) + * but creating the object as a string seems to be faster in + * practical use. + */ - length = Tcl_UniCharToUtf(ch, buf); - objResultPtr = Tcl_NewStringObj(buf, length); - } - } else { - TclNewObj(objResultPtr); + length = Tcl_UniCharToUtf(ch, buf); + objResultPtr = Tcl_NewStringObj(buf, length); } TRACE(("%.20s %.20s => %s\n", O2S(valuePtr), O2S(value2Ptr), O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); - } - - case INST_STR_MATCH: { - int nocase, match, length2; + case INST_STR_MATCH: nocase = TclGetInt1AtPtr(pc+1); valuePtr = OBJ_AT_TOS; /* String */ value2Ptr = OBJ_UNDER_TOS; /* Pattern */ @@ -4855,11 +4782,11 @@ TclExecuteByteCode( match = TclUniCharMatch(ustring1, length, ustring2, length2, nocase); } else if (TclIsPureByteArray(valuePtr) && !nocase) { - unsigned char *string1, *string2; + unsigned char *bytes1, *bytes2; - string1 = Tcl_GetByteArrayFromObj(valuePtr, &length); - string2 = Tcl_GetByteArrayFromObj(value2Ptr, &length2); - match = TclByteArrayMatch(string1, length, string2, length2, 0); + bytes1 = Tcl_GetByteArrayFromObj(valuePtr, &length); + bytes2 = Tcl_GetByteArrayFromObj(value2Ptr, &length2); + match = TclByteArrayMatch(bytes1, length, bytes2, length2, 0); } else { match = Tcl_StringCaseMatch(TclGetString(valuePtr), TclGetString(value2Ptr), nocase); @@ -4891,38 +4818,42 @@ TclExecuteByteCode( #endif objResultPtr = TCONST(match); NEXT_INST_F(0, 2, 1); - } - - case INST_REGEXP: { - int cflags, match; - Tcl_RegExp regExpr; + case INST_REGEXP: cflags = TclGetInt1AtPtr(pc+1); /* RE compile flages like NOCASE */ valuePtr = OBJ_AT_TOS; /* String */ value2Ptr = OBJ_UNDER_TOS; /* Pattern */ - regExpr = Tcl_GetRegExpFromObj(interp, value2Ptr, cflags); - if (regExpr == NULL) { - match = -1; - } else { - match = Tcl_RegExpExecObj(interp, regExpr, valuePtr, 0, 0, 0); - } - /* - * Adjustment is 2 due to the nocase byte + * Compile and match the regular expression. */ - if (match < 0) { - objResultPtr = Tcl_GetObjResult(interp); - TRACE_WITH_OBJ(("%.20s %.20s => ERROR: ", - O2S(valuePtr), O2S(value2Ptr)), objResultPtr); - goto gotError; + { + Tcl_RegExp regExpr = + Tcl_GetRegExpFromObj(interp, value2Ptr, cflags); + + if (regExpr == NULL) { + goto regexpFailure; + } + + match = Tcl_RegExpExecObj(interp, regExpr, valuePtr, 0, 0, 0); + + if (match < 0) { + regexpFailure: +#ifdef TCL_COMPILE_DEBUG + objResultPtr = Tcl_GetObjResult(interp); + TRACE_WITH_OBJ(("%.20s %.20s => ERROR: ", + O2S(valuePtr), O2S(value2Ptr)), objResultPtr); +#endif + goto gotError; + } } TRACE(("%.20s %.20s => %d\n", O2S(valuePtr), O2S(value2Ptr), match)); /* * Peep-hole optimisation: if you're about to jump, do jump from here. + * Adjustment is 2 due to the nocase byte. */ pc += 2; @@ -4951,10 +4882,7 @@ TclExecuteByteCode( { ClientData ptr1, ptr2; int type1, type2; - double d1, d2, dResult; long l1, l2, lResult; - mp_int big1, big2, bigResult, bigRemainder; - Tcl_WideInt w1, w2, wResult; case INST_EQ: case INST_NEQ: @@ -4963,7 +4891,6 @@ TclExecuteByteCode( case INST_LE: case INST_GE: { int iResult = 0, compare = 0; - double tmp; value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; @@ -5002,249 +4929,39 @@ TclExecuteByteCode( iResult = (*pc == INST_NEQ); goto foundResult; } - switch (type1) { - case TCL_NUMBER_LONG: + if ((type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) { l1 = *((const long *)ptr1); - switch (type2) { - case TCL_NUMBER_LONG: - l2 = *((const long *)ptr2); - longCompare: - compare = (l1 < l2) ? MP_LT : ((l1 > l2) ? MP_GT : MP_EQ); - break; -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: - w2 = *((const Tcl_WideInt *)ptr2); - w1 = (Tcl_WideInt)l1; - goto wideCompare; -#endif - case TCL_NUMBER_DOUBLE: - d2 = *((const double *)ptr2); - d1 = (double) l1; - - /* - * If the double has a fractional part, or if the long can be - * converted to double without loss of precision, then compare - * as doubles. - */ - - if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) - || l1 == (long) d1 - || modf(d2, &tmp) != 0.0) { - goto doubleCompare; - } + l2 = *((const long *)ptr2); + compare = (l1 < l2) ? MP_LT : ((l1 > l2) ? MP_GT : MP_EQ); + } else { + compare = TclCompareTwoNumbers(valuePtr, value2Ptr); + } - /* - * Otherwise, to make comparision based on full precision, - * need to convert the double to a suitably sized integer. - * - * Need this to get comparsions like - * expr 20000000000000003 < 20000000000000004.0 - * right. Converting the first argument to double will yield - * two double values that are equivalent within double - * precision. Converting the double to an integer gets done - * exactly, then integer comparison can tell the difference. - */ + /* + * Turn comparison outcome into appropriate result for opcode. + */ - if (d2 < (double)LONG_MIN) { - compare = MP_GT; - break; - } - if (d2 > (double)LONG_MAX) { - compare = MP_LT; - break; - } - l2 = (long) d2; - goto longCompare; - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - if (mp_cmp_d(&big2, 0) == MP_LT) { - compare = MP_GT; - } else { - compare = MP_LT; - } - mp_clear(&big2); - } + convertComparison: + switch (*pc) { + case INST_EQ: + iResult = (compare == MP_EQ); break; - -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: - w1 = *((const Tcl_WideInt *)ptr1); - switch (type2) { - case TCL_NUMBER_WIDE: - w2 = *((const Tcl_WideInt *)ptr2); - wideCompare: - compare = (w1 < w2) ? MP_LT : ((w1 > w2) ? MP_GT : MP_EQ); - break; - case TCL_NUMBER_LONG: - l2 = *((const long *)ptr2); - w2 = (Tcl_WideInt)l2; - goto wideCompare; - case TCL_NUMBER_DOUBLE: - d2 = *((const double *)ptr2); - d1 = (double) w1; - if (DBL_MANT_DIG > CHAR_BIT*sizeof(Tcl_WideInt) - || w1 == (Tcl_WideInt) d1 - || modf(d2, &tmp) != 0.0) { - goto doubleCompare; - } - if (d2 < (double)LLONG_MIN) { - compare = MP_GT; - break; - } - if (d2 > (double)LLONG_MAX) { - compare = MP_LT; - break; - } - w2 = (Tcl_WideInt) d2; - goto wideCompare; - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - if (mp_cmp_d(&big2, 0) == MP_LT) { - compare = MP_GT; - } else { - compare = MP_LT; - } - mp_clear(&big2); - } + case INST_NEQ: + iResult = (compare != MP_EQ); break; -#endif - - case TCL_NUMBER_DOUBLE: - d1 = *((const double *)ptr1); - switch (type2) { - case TCL_NUMBER_DOUBLE: - d2 = *((const double *)ptr2); - doubleCompare: - compare = (d1 < d2) ? MP_LT : ((d1 > d2) ? MP_GT : MP_EQ); - break; - case TCL_NUMBER_LONG: - l2 = *((const long *)ptr2); - d2 = (double) l2; - if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) - || l2 == (long) d2 - || modf(d1, &tmp) != 0.0) { - goto doubleCompare; - } - if (d1 < (double)LONG_MIN) { - compare = MP_LT; - break; - } - if (d1 > (double)LONG_MAX) { - compare = MP_GT; - break; - } - l1 = (long) d1; - goto longCompare; -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: - w2 = *((const Tcl_WideInt *)ptr2); - d2 = (double) w2; - if (DBL_MANT_DIG > CHAR_BIT*sizeof(Tcl_WideInt) - || w2 == (Tcl_WideInt) d2 - || modf(d1, &tmp) != 0.0) { - goto doubleCompare; - } - if (d1 < (double)LLONG_MIN) { - compare = MP_LT; - break; - } - if (d1 > (double)LLONG_MAX) { - compare = MP_GT; - break; - } - w1 = (Tcl_WideInt) d1; - goto wideCompare; -#endif - case TCL_NUMBER_BIG: - if (TclIsInfinite(d1)) { - compare = (d1 > 0.0) ? MP_GT : MP_LT; - break; - } - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - if ((d1 < (double)LONG_MAX) && (d1 > (double)LONG_MIN)) { - if (mp_cmp_d(&big2, 0) == MP_LT) { - compare = MP_GT; - } else { - compare = MP_LT; - } - mp_clear(&big2); - break; - } - if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) - && modf(d1, &tmp) != 0.0) { - d2 = TclBignumToDouble(&big2); - mp_clear(&big2); - goto doubleCompare; - } - Tcl_InitBignumFromDouble(NULL, d1, &big1); - goto bigCompare; - } - break; - - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - switch (type2) { -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: -#endif - case TCL_NUMBER_LONG: - compare = mp_cmp_d(&big1, 0); - mp_clear(&big1); - break; - case TCL_NUMBER_DOUBLE: - d2 = *((const double *)ptr2); - if (TclIsInfinite(d2)) { - compare = (d2 > 0.0) ? MP_LT : MP_GT; - mp_clear(&big1); - break; - } - if ((d2 < (double)LONG_MAX) && (d2 > (double)LONG_MIN)) { - compare = mp_cmp_d(&big1, 0); - mp_clear(&big1); - break; - } - if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) - && modf(d2, &tmp) != 0.0) { - d1 = TclBignumToDouble(&big1); - mp_clear(&big1); - goto doubleCompare; - } - Tcl_InitBignumFromDouble(NULL, d2, &big2); - goto bigCompare; - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - bigCompare: - compare = mp_cmp(&big1, &big2); - mp_clear(&big1); - mp_clear(&big2); - } - } - - /* - * Turn comparison outcome into appropriate result for opcode. - */ - - convertComparison: - switch (*pc) { - case INST_EQ: - iResult = (compare == MP_EQ); - break; - case INST_NEQ: - iResult = (compare != MP_EQ); - break; - case INST_LT: - iResult = (compare == MP_LT); - break; - case INST_GT: - iResult = (compare == MP_GT); - break; - case INST_LE: - iResult = (compare != MP_GT); - break; - case INST_GE: - iResult = (compare != MP_LT); - break; - } + case INST_LT: + iResult = (compare == MP_LT); + break; + case INST_GT: + iResult = (compare == MP_GT); + break; + case INST_LE: + iResult = (compare != MP_GT); + break; + case INST_GE: + iResult = (compare != MP_LT); + break; + } /* * Peep-hole optimisation: if you're about to jump, do jump from here. @@ -5270,16 +4987,15 @@ TclExecuteByteCode( case INST_MOD: case INST_LSHIFT: - case INST_RSHIFT: { - int invalid, shift; - - l1 = 0; + case INST_RSHIFT: + case INST_BITOR: + case INST_BITXOR: + case INST_BITAND: value2Ptr = OBJ_AT_TOS; valuePtr = OBJ_UNDER_TOS; - TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_DOUBLE) - || (type1 == TCL_NUMBER_NAN)) { + if ((GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) + || (type1==TCL_NUMBER_DOUBLE) || (type1==TCL_NUMBER_NAN)) { TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); @@ -5287,9 +5003,8 @@ TclExecuteByteCode( goto gotError; } - TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - if ((TRESULT != TCL_OK) || (type2 == TCL_NUMBER_DOUBLE) - || (type2 == TCL_NUMBER_NAN)) { + if ((GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2) != TCL_OK) + || (type2==TCL_NUMBER_DOUBLE) || (type2==TCL_NUMBER_NAN)) { TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(valuePtr), O2S(value2Ptr), (value2Ptr->typePtr? value2Ptr->typePtr->name : "null"))); @@ -5297,2656 +5012,2962 @@ TclExecuteByteCode( goto gotError; } - if (*pc == INST_MOD) { - /* TODO: Attempts to re-use unshared operands on stack */ + /* + * Check for common, simple case. + */ + + if ((type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) { + l1 = *((const long *)ptr1); + l2 = *((const long *)ptr2); - l2 = 0; /* silence gcc warning */ - if (type2 == TCL_NUMBER_LONG) { - l2 = *((const long *)ptr2); + switch (*pc) { + case INST_MOD: if (l2 == 0) { TRACE(("%s %s => DIVIDE BY ZERO\n", O2S(valuePtr), O2S(value2Ptr))); goto divideByZero; - } - if ((l2 == 1) || (l2 == -1)) { + } else if ((l2 == 1) || (l2 == -1)) { /* * Div. by |1| always yields remainder of 0. */ + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); - } - } - if (type1 == TCL_NUMBER_LONG) { - l1 = *((const long *)ptr1); - if (l1 == 0) { + } else if (l1 == 0) { /* * 0 % (non-zero) always yields remainder of 0. */ + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); - } - if (type2 == TCL_NUMBER_LONG) { - /* - * Both operands are long; do native calculation. - */ - - long lRemainder, lQuotient = l1 / l2; + } else { + lResult = l1 / l2; /* * Force Tcl's integer division rules. * TODO: examine for logic simplification */ - if ((lQuotient < 0 || (lQuotient == 0 && + if ((lResult < 0 || (lResult == 0 && ((l1 < 0 && l2 > 0) || (l1 > 0 && l2 < 0)))) && - (lQuotient * l2 != l1)) { - lQuotient -= 1; + (lResult * l2 != l1)) { + lResult -= 1; } - lRemainder = l1 - l2*lQuotient; - TclNewLongObj(objResultPtr, lRemainder); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); + lResult = l1 - l2*lResult; + goto longResultOfArithmetic; } - /* - * First operand fits in long; second does not, so the second - * has greater magnitude than first. No need to divide to - * determine the remainder. - */ + case INST_RSHIFT: + if (l2 < 0) { + Tcl_SetResult(interp, "negative shift argument", + TCL_STATIC); +#if 0 + Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", + "domain error: argument not in valid range", + NULL); +#endif + goto gotError; + } else if (l1 == 0) { + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + objResultPtr = TCONST(0); + TRACE(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); + } else { + /* + * Quickly force large right shifts to 0 or -1. + */ -#ifndef NO_WIDE_TYPE - if (type2 == TCL_NUMBER_WIDE) { - w2 = *((const Tcl_WideInt *)ptr2); - if ((l1 > 0) ^ (w2 > (Tcl_WideInt)0)) { + if (l2 >= CHAR_BIT*sizeof(long)) { /* - * Arguments are opposite sign; remainder is sum. + * We assume that INT_MAX is much larger than the + * number of bits in a long. This is a pretty safe + * assumption, given that the former is usually around + * 4e9 and the latter 32 or 64... */ - objResultPtr = Tcl_NewWideIntObj(w2+(Tcl_WideInt)l1); + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + if (l1 > 0L) { + objResultPtr = TCONST(0); + } else { + TclNewIntObj(objResultPtr, -1); + } TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } /* - * Arguments are same sign; remainder is first operand. + * Handle shifts within the native long range. */ - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + lResult = l1 >> ((int) l2); + goto longResultOfArithmetic; } -#endif - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - /* TODO: internals intrusion */ - if ((l1 > 0) ^ (big2.sign == MP_ZPOS)) { - /* - * Arguments are opposite sign; remainder is sum. - */ - - TclBNInitBignumFromLong(&big1, l1); - mp_add(&big2, &big1, &big2); - mp_clear(&big1); - objResultPtr = Tcl_NewBignumObj(&big2); + case INST_LSHIFT: + if (l2 < 0) { + Tcl_SetResult(interp, "negative shift argument", + TCL_STATIC); +#if 0 + Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", + "domain error: argument not in valid range", + NULL); +#endif + goto gotError; + } else if (l1 == 0) { + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); - } - - /* - * Arguments are same sign; remainder is first operand. - */ - - mp_clear(&big2); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } -#ifndef NO_WIDE_TYPE - if (type1 == TCL_NUMBER_WIDE) { - w1 = *((const Tcl_WideInt *)ptr1); - if (type2 != TCL_NUMBER_BIG) { - Tcl_WideInt wQuotient, wRemainder; + } else if (l2 > (long) INT_MAX) { + /* + * Technically, we could hold the value (1 << (INT_MAX+1)) + * in an mp_int, but since we're using mp_mul_2d() to do + * the work, and it takes only an int argument, that's a + * good place to draw the line. + */ - Tcl_GetWideIntFromObj(NULL, value2Ptr, &w2); - wQuotient = w1 / w2; + Tcl_SetResult(interp, + "integer value too large to represent", + TCL_STATIC); +#if 0 + Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", + "integer value too large to represent", NULL); +#endif + goto gotError; + } else { + int shift = (int) l2; /* - * Force Tcl's integer division rules. - * TODO: examine for logic simplification + * Handle shifts within the native long range. */ - if (((wQuotient < (Tcl_WideInt) 0) - || ((wQuotient == (Tcl_WideInt) 0) - && ((w1 < (Tcl_WideInt)0 && w2 > (Tcl_WideInt)0) - || (w1 > (Tcl_WideInt)0 && w2 < (Tcl_WideInt)0)))) - && (wQuotient * w2 != w1)) { - wQuotient -= (Tcl_WideInt) 1; + if ((size_t) shift < CHAR_BIT*sizeof(long) && (l1 != 0) + && !((l1>0 ? l1 : ~l1) & + -(1L<<(CHAR_BIT*sizeof(long) - 1 - shift)))) { + lResult = l1 << shift; + goto longResultOfArithmetic; } - wRemainder = w1 - w2*wQuotient; - objResultPtr = Tcl_NewWideIntObj(wRemainder); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); } - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + /* + * Too large; need to use the broken-out function. + */ - /* TODO: internals intrusion */ - if ((w1 > ((Tcl_WideInt) 0)) ^ (big2.sign == MP_ZPOS)) { - /* - * Arguments are opposite sign; remainder is sum. - */ + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + break; - TclBNInitBignumFromWideInt(&big1, w1); - mp_add(&big2, &big1, &big2); - mp_clear(&big1); - objResultPtr = Tcl_NewBignumObj(&big2); + case INST_BITAND: + lResult = l1 & l2; + goto longResultOfArithmetic; + case INST_BITOR: + lResult = l1 | l2; + goto longResultOfArithmetic; + case INST_BITXOR: + lResult = l1 ^ l2; + longResultOfArithmetic: + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + if (Tcl_IsShared(valuePtr)) { + TclNewLongObj(objResultPtr, lResult); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } - - /* - * Arguments are same sign; remainder is first operand. - */ - - mp_clear(&big2); + TclSetLongObj(valuePtr, lResult); TRACE(("%s\n", O2S(valuePtr))); NEXT_INST_F(1, 1, 0); } -#endif - Tcl_GetBignumFromObj(NULL, valuePtr, &big1); - Tcl_GetBignumFromObj(NULL, value2Ptr, &big2); - mp_init(&bigResult); - mp_init(&bigRemainder); - mp_div(&big1, &big2, &bigResult, &bigRemainder); - if (!mp_iszero(&bigRemainder) - && (bigRemainder.sign != big2.sign)) { - /* - * Convert to Tcl's integer division rules. - */ - - mp_sub_d(&bigResult, 1, &bigResult); - mp_add(&bigRemainder, &big2, &bigRemainder); - } - mp_copy(&bigRemainder, &bigResult); - mp_clear(&bigRemainder); - mp_clear(&big1); - mp_clear(&big2); - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&bigResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetBignumObj(valuePtr, &bigResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); } /* - * Reject negative shift argument. + * DO NOT MERGE THIS WITH THE EQUIVALENT SECTION LATER! That would + * encourage the compiler to inline ExecuteExtendedBinaryMathOp, which + * is highly undesirable due to the overall impact on size. */ - switch (type2) { - case TCL_NUMBER_LONG: - invalid = (*((const long *)ptr2) < (long)0); - break; -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: - invalid = (*((const Tcl_WideInt *)ptr2) < (Tcl_WideInt)0); - break; -#endif - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - invalid = (mp_cmp_d(&big2, 0) == MP_LT); - mp_clear(&big2); - break; - default: - /* Unused, here to silence compiler warning */ - invalid = 0; - } - if (invalid) { - Tcl_SetResult(interp, "negative shift argument", TCL_STATIC); + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + objResultPtr = ExecuteExtendedBinaryMathOp(interp, *pc, &TCONST(0), + valuePtr, value2Ptr); + if (objResultPtr == DIVIDED_BY_ZERO) { + TRACE_APPEND(("DIVIDE BY ZERO\n")); + goto divideByZero; + } else if (objResultPtr == GENERAL_ARITHMETIC_ERROR) { + TRACE_APPEND(("ERROR: %s\n", + TclGetString(Tcl_GetObjResult(interp)))); goto gotError; + } else if (objResultPtr == NULL) { + TRACE_APPEND(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); + } else { + TRACE_APPEND(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); } - /* - * Zero shifted any number of bits is still zero. - */ + case INST_EXPON: + case INST_ADD: + case INST_SUB: + case INST_DIV: + case INST_MULT: + value2Ptr = OBJ_AT_TOS; + valuePtr = OBJ_UNDER_TOS; - if ((type1==TCL_NUMBER_LONG) && (*((const long *)ptr1) == (long)0)) { - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - objResultPtr = TCONST(0); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); + if ((GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) + || IsErroringNaNType(type1)) { + TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", + O2S(value2Ptr), O2S(valuePtr), + (valuePtr->typePtr? valuePtr->typePtr->name: "null"))); + IllegalExprOperandType(interp, pc, valuePtr); + goto gotError; } - if (*pc == INST_LSHIFT) { +#ifdef ACCEPT_NAN + if (type1 == TCL_NUMBER_NAN) { /* - * Large left shifts create integer overflow. - * - * BEWARE! Can't use Tcl_GetIntFromObj() here because that - * converts values in the (unsigned) range to their signed int - * counterparts, leading to incorrect results. + * NaN first argument -> result is also NaN. */ - if ((type2 != TCL_NUMBER_LONG) - || (*((const long *)ptr2) > (long) INT_MAX)) { - /* - * Technically, we could hold the value (1 << (INT_MAX+1)) in - * an mp_int, but since we're using mp_mul_2d() to do the - * work, and it takes only an int argument, that's a good - * place to draw the line. - */ - - Tcl_SetResult(interp, "integer value too large to represent", - TCL_STATIC); - goto gotError; - } - shift = (int)(*((const long *)ptr2)); - - /* - * Handle shifts within the native long range. - */ + NEXT_INST_F(1, 1, 0); + } +#endif - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if ((type1 == TCL_NUMBER_LONG) - && (size_t) shift < CHAR_BIT*sizeof(long) - && ((l1 = *(const long *)ptr1) != 0) - && !((l1>0 ? l1 : ~l1) - & -(1L<<(CHAR_BIT*sizeof(long) - 1 - shift)))) { - TclNewLongObj(objResultPtr, (l1< ILLEGAL 2nd TYPE %s\n", + O2S(value2Ptr), O2S(valuePtr), + (value2Ptr->typePtr? value2Ptr->typePtr->name: "null"))); + IllegalExprOperandType(interp, pc, value2Ptr); + goto gotError; + } +#ifdef ACCEPT_NAN + if (type2 == TCL_NUMBER_NAN) { /* - * Handle shifts within the native wide range. + * NaN second argument -> result is also NaN. */ - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if ((type1 != TCL_NUMBER_BIG) - && ((size_t)shift < CHAR_BIT*sizeof(Tcl_WideInt))) { - TclGetWideIntFromObj(NULL, valuePtr, &w1); - if (!((w1>0 ? w1 : ~w1) - & -(((Tcl_WideInt)1) - << (CHAR_BIT*sizeof(Tcl_WideInt) - 1 - shift)))) { - objResultPtr = Tcl_NewWideIntObj(w1< ", O2S(valuePtr), O2S(value2Ptr))); - if ((type2 != TCL_NUMBER_LONG) - || (*(const long *)ptr2 > INT_MAX)) { + /* + * Handle (long,long) arithmetic as best we can without going out to + * an external function. + */ + + if ((type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) { + Tcl_WideInt w1, w2, wResult; + + l1 = *((const long *)ptr1); + l2 = *((const long *)ptr2); + + switch (*pc) { + case INST_ADD: + w1 = (Tcl_WideInt) l1; + w2 = (Tcl_WideInt) l2; + wResult = w1 + w2; +#ifdef NO_WIDE_TYPE /* - * Again, technically, the value to be shifted could be an - * mp_int so huge that a right shift by (INT_MAX+1) bits could - * not take us to the result of 0 or -1, but since we're using - * mp_div_2d to do the work, and it takes only an int - * argument, we draw the line there. + * Check for overflow. */ - int zero; + if (Overflowing(w1, w2, wResult)) { + goto overflow; + } +#endif + goto wideResultOfArithmetic; + + case INST_SUB: + w1 = (Tcl_WideInt) l1; + w2 = (Tcl_WideInt) l2; + wResult = w1 - w2; +#ifdef NO_WIDE_TYPE + /* + * Must check for overflow. The macro tests for overflows in + * sums by looking at the sign bits. As we have a subtraction + * here, we are adding -w2. As -w2 could in turn overflow, we + * test with ~w2 instead: it has the opposite sign bit to w2 + * so it does the job. Note that the only "bad" case (w2==0) + * is irrelevant for this macro, as in that case w1 and + * wResult have the same sign and there is no overflow anyway. + */ - switch (type1) { - case TCL_NUMBER_LONG: - zero = (*(const long *)ptr1 > 0L); - break; -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: - zero = (*(const Tcl_WideInt *)ptr1 > (Tcl_WideInt)0); - break; + if (Overflowing(w1, ~w2, wResult)) { + goto overflow; + } #endif - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - zero = (mp_cmp_d(&big1, 0) == MP_GT); - mp_clear(&big1); - break; - default: - /* Unused, here to silence compiler warning. */ - zero = 0; + wideResultOfArithmetic: + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + if (Tcl_IsShared(valuePtr)) { + objResultPtr = Tcl_NewWideIntObj(wResult); + TRACE(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); } - if (zero) { - objResultPtr = TCONST(0); - } else { - TclNewIntObj(objResultPtr, -1); + Tcl_SetWideIntObj(valuePtr, wResult); + TRACE(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); + + case INST_DIV: + if (l2 == 0) { + TRACE(("%s %s => DIVIDE BY ZERO\n", + O2S(valuePtr), O2S(value2Ptr))); + goto divideByZero; + } else if ((l1 == LONG_MIN) && (l2 == -1)) { + /* + * Can't represent (-LONG_MIN) as a long. + */ + + goto overflow; } - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - shift = (int)(*(const long *)ptr2); + lResult = l1 / l2; - /* - * Handle shifts within the native long range. - */ + /* + * Force Tcl's integer division rules. + * TODO: examine for logic simplification + */ - if (type1 == TCL_NUMBER_LONG) { - l1 = *((const long *)ptr1); - if ((size_t)shift >= CHAR_BIT*sizeof(long)) { - if (l1 >= (long)0) { - objResultPtr = TCONST(0); - } else { - TclNewIntObj(objResultPtr, -1); - } - } else { - TclNewLongObj(objResultPtr, (l1 >> shift)); + if (((lResult < 0) || ((lResult == 0) && + ((l1 < 0 && l2 > 0) || (l1 > 0 && l2 < 0)))) && + ((lResult * l2) != l1)) { + lResult -= 1; + } + goto longResultOfArithmetic; + + case INST_MULT: + if (((sizeof(long) >= 2*sizeof(int)) + && (l1 <= INT_MAX) && (l1 >= INT_MIN) + && (l2 <= INT_MAX) && (l2 >= INT_MIN)) + || ((sizeof(long) >= 2*sizeof(short)) + && (l1 <= SHRT_MAX) && (l1 >= SHRT_MIN) + && (l2 <= SHRT_MAX) && (l2 >= SHRT_MIN))) { + lResult = l1 * l2; + goto longResultOfArithmetic; } - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); } -#ifndef NO_WIDE_TYPE /* - * Handle shifts within the native wide range. + * Fall through with INST_EXPON, INST_DIV and large multiplies. */ - - if (type1 == TCL_NUMBER_WIDE) { - w1 = *(const Tcl_WideInt *)ptr1; - if ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideInt)) { - if (w1 >= (Tcl_WideInt)0) { - objResultPtr = TCONST(0); - } else { - TclNewIntObj(objResultPtr, -1); - } - } else { - objResultPtr = Tcl_NewWideIntObj(w1 >> shift); - } - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } -#endif } - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - - mp_init(&bigResult); - if (*pc == INST_LSHIFT) { - mp_mul_2d(&big1, shift, &bigResult); + overflow: + TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); + objResultPtr = ExecuteExtendedBinaryMathOp(interp, *pc, &TCONST(0), + valuePtr, value2Ptr); + if (objResultPtr == DIVIDED_BY_ZERO) { + TRACE_APPEND(("DIVIDE BY ZERO\n")); + goto divideByZero; + } else if (objResultPtr == EXPONENT_OF_ZERO) { + TRACE_APPEND(("EXPONENT OF ZERO\n")); + goto exponOfZero; + } else if (objResultPtr == GENERAL_ARITHMETIC_ERROR) { + TRACE_APPEND(("ERROR: %s\n", + TclGetString(Tcl_GetObjResult(interp)))); + goto gotError; + } else if (objResultPtr == NULL) { + TRACE_APPEND(("%s\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 0); } else { - mp_init(&bigRemainder); - mp_div_2d(&big1, shift, &bigResult, &bigRemainder); - if (mp_cmp_d(&bigRemainder, 0) == MP_LT) { - /* - * Convert to Tcl's integer division rules. - */ - - mp_sub_d(&bigResult, 1, &bigResult); - } - mp_clear(&bigRemainder); + TRACE_APPEND(("%s\n", O2S(objResultPtr))); + NEXT_INST_F(1, 2, 1); } - mp_clear(&big1); - if (!Tcl_IsShared(valuePtr)) { - Tcl_SetBignumObj(valuePtr, &bigResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + case INST_LNOT: { + int b; + + valuePtr = OBJ_AT_TOS; + + /* TODO - check claim that taking address of b harms performance */ + /* TODO - consider optimization search for constants */ + if (TclGetBooleanFromObj(NULL, valuePtr, &b) != TCL_OK) { + TRACE(("\"%.20s\" => ILLEGAL TYPE %s\n", O2S(valuePtr), + (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); + IllegalExprOperandType(interp, pc, valuePtr); + goto gotError; } - objResultPtr = Tcl_NewBignumObj(&bigResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); + /* TODO: Consider peephole opt. */ + objResultPtr = TCONST(!b); + NEXT_INST_F(1, 1, 1); } - case INST_BITOR: - case INST_BITXOR: - case INST_BITAND: - value2Ptr = OBJ_AT_TOS; - valuePtr = OBJ_UNDER_TOS; + case INST_BITNOT: + valuePtr = OBJ_AT_TOS; + if ((GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) + || (type1==TCL_NUMBER_NAN) || (type1==TCL_NUMBER_DOUBLE)) { + /* + * ... ~$NonInteger => raise an error. + */ - TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((TRESULT != TCL_OK) - || (type1 == TCL_NUMBER_NAN) - || (type1 == TCL_NUMBER_DOUBLE)) { - TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", O2S(valuePtr), - O2S(value2Ptr), (valuePtr->typePtr? - valuePtr->typePtr->name : "null"))); + TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), + (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); IllegalExprOperandType(interp, pc, valuePtr); goto gotError; } - TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - if ((TRESULT != TCL_OK) || (type2 == TCL_NUMBER_NAN) - || (type2 == TCL_NUMBER_DOUBLE)) { - TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", O2S(valuePtr), - O2S(value2Ptr), (value2Ptr->typePtr? - value2Ptr->typePtr->name : "null"))); - IllegalExprOperandType(interp, pc, value2Ptr); + if (type1 == TCL_NUMBER_LONG) { + l1 = *((const long *) ptr1); + if (Tcl_IsShared(valuePtr)) { + TclNewLongObj(objResultPtr, ~l1); + NEXT_INST_F(1, 1, 1); + } + TclSetLongObj(valuePtr, ~l1); + NEXT_INST_F(1, 0, 0); + } + objResultPtr = ExecuteExtendedUnaryMathOp(*pc, valuePtr); + if (objResultPtr != NULL) { + NEXT_INST_F(1, 1, 1); + } else { + NEXT_INST_F(1, 0, 0); + } + + case INST_UMINUS: + valuePtr = OBJ_AT_TOS; + if ((GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) + || IsErroringNaNType(type1)) { + TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), + (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); + IllegalExprOperandType(interp, pc, valuePtr); goto gotError; } + switch (type1) { + case TCL_NUMBER_NAN: + /* -NaN => NaN */ + NEXT_INST_F(1, 0, 0); + case TCL_NUMBER_LONG: + l1 = *((const long *) ptr1); + if (l1 != LONG_MIN) { + if (Tcl_IsShared(valuePtr)) { + TclNewLongObj(objResultPtr, -l1); + NEXT_INST_F(1, 1, 1); + } + TclSetLongObj(valuePtr, -l1); + NEXT_INST_F(1, 0, 0); + } + /* FALLTHROUGH */ + } + objResultPtr = ExecuteExtendedUnaryMathOp(*pc, valuePtr); + if (objResultPtr != NULL) { + NEXT_INST_F(1, 1, 1); + } else { + NEXT_INST_F(1, 0, 0); + } - if ((type1 == TCL_NUMBER_BIG) || (type2 == TCL_NUMBER_BIG)) { - mp_int *First, *Second; - int numPos; + case INST_UPLUS: + case INST_TRY_CVT_TO_NUMERIC: + /* + * Try to convert the topmost stack object to numeric object. This is + * done in order to support [expr]'s policy of interpreting operands + * if at all possible as numbers first, then strings. + */ - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + valuePtr = OBJ_AT_TOS; - /* - * Count how many positive arguments we have. If only one of the - * arguments is negative, store it in 'Second'. - */ + if (GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) { + if (*pc == INST_UPLUS) { + /* + * ... +$NonNumeric => raise an error. + */ - if (mp_cmp_d(&big1, 0) != MP_LT) { - numPos = 1 + (mp_cmp_d(&big2, 0) != MP_LT); - First = &big1; - Second = &big2; - } else { - First = &big2; - Second = &big1; - numPos = (mp_cmp_d(First, 0) != MP_LT); + TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), + (valuePtr->typePtr? valuePtr->typePtr->name:"null"))); + IllegalExprOperandType(interp, pc, valuePtr); + goto gotError; } - mp_init(&bigResult); - - switch (*pc) { - case INST_BITAND: - switch (numPos) { - case 2: - /* - * Both arguments positive, base case. - */ - mp_and(First, Second, &bigResult); - break; - case 1: - /* - * First is positive; second negative: - * P & N = P & ~~N = P&~(-N-1) = P & (P ^ (-N-1)) - */ - - mp_neg(Second, Second); - mp_sub_d(Second, 1, Second); - mp_xor(First, Second, &bigResult); - mp_and(First, &bigResult, &bigResult); - break; - case 0: - /* - * Both arguments negative: - * a & b = ~ (~a | ~b) = -(-a-1|-b-1)-1 - */ + /* ... TryConvertToNumeric($NonNumeric) is acceptable */ + TRACE(("\"%.20s\" => not numeric\n", O2S(valuePtr))); + NEXT_INST_F(1, 0, 0); + } + if (IsErroringNaNType(type1)) { + if (*pc == INST_UPLUS) { + /* + * ... +$NonNumeric => raise an error. + */ - mp_neg(First, First); - mp_sub_d(First, 1, First); - mp_neg(Second, Second); - mp_sub_d(Second, 1, Second); - mp_or(First, Second, &bigResult); - mp_neg(&bigResult, &bigResult); - mp_sub_d(&bigResult, 1, &bigResult); - break; - } - break; + TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), + (valuePtr->typePtr? valuePtr->typePtr->name:"null"))); + IllegalExprOperandType(interp, pc, valuePtr); + } else { + /* + * Numeric conversion of NaN -> error. + */ - case INST_BITOR: - switch (numPos) { - case 2: - /* - * Both arguments positive, base case. - */ + TRACE(("\"%.20s\" => IEEE FLOATING PT ERROR\n", + O2S(objResultPtr))); + TclExprFloatError(interp, *((const double *) ptr1)); + } + goto gotError; + } - mp_or(First, Second, &bigResult); - break; - case 1: - /* - * First is positive; second negative: - * N|P = ~(~N&~P) = ~((-N-1)&~P) = -((-N-1)&((-N-1)^P))-1 - */ + /* + * Ensure that the numeric value has a string rep the same as the + * formatted version of its internal rep. This is used, e.g., to make + * sure that "expr {0001}" yields "1", not "0001". We implement this + * by _discarding_ the string rep since we know it will be + * regenerated, if needed later, by formatting the internal rep's + * value. + */ - mp_neg(Second, Second); - mp_sub_d(Second, 1, Second); - mp_xor(First, Second, &bigResult); - mp_and(Second, &bigResult, &bigResult); - mp_neg(&bigResult, &bigResult); - mp_sub_d(&bigResult, 1, &bigResult); - break; - case 0: - /* - * Both arguments negative: - * a | b = ~ (~a & ~b) = -(-a-1&-b-1)-1 - */ + if (valuePtr->bytes == NULL) { + TRACE(("\"%.20s\" => numeric, same Tcl_Obj\n", O2S(valuePtr))); + NEXT_INST_F(1, 0, 0); + } + if (Tcl_IsShared(valuePtr)) { + /* + * Here we do some surgery within the Tcl_Obj internals. We want + * to copy the intrep, but not the string, so we temporarily hide + * the string so we do not copy it. + */ - mp_neg(First, First); - mp_sub_d(First, 1, First); - mp_neg(Second, Second); - mp_sub_d(Second, 1, Second); - mp_and(First, Second, &bigResult); - mp_neg(&bigResult, &bigResult); - mp_sub_d(&bigResult, 1, &bigResult); - break; - } - break; + char *savedString = valuePtr->bytes; - case INST_BITXOR: - switch (numPos) { - case 2: - /* - * Both arguments positive, base case. - */ + valuePtr->bytes = NULL; + objResultPtr = Tcl_DuplicateObj(valuePtr); + valuePtr->bytes = savedString; + TRACE(("\"%.20s\" => numeric, new Tcl_Obj\n", O2S(valuePtr))); + NEXT_INST_F(1, 1, 1); + } + TclInvalidateStringRep(valuePtr); + TRACE(("\"%.20s\" => numeric, same Tcl_Obj\n", O2S(valuePtr))); + NEXT_INST_F(1, 0, 0); + } - mp_xor(First, Second, &bigResult); - break; - case 1: - /* - * First is positive; second negative: - * P^N = ~(P^~N) = -(P^(-N-1))-1 - */ + /* + * End of numeric operator instructions. + * ----------------------------------------------------------------- + */ - mp_neg(Second, Second); - mp_sub_d(Second, 1, Second); - mp_xor(First, Second, &bigResult); - mp_neg(&bigResult, &bigResult); - mp_sub_d(&bigResult, 1, &bigResult); - break; - case 0: - /* - * Both arguments negative: - * a ^ b = (~a ^ ~b) = (-a-1^-b-1) - */ + case INST_BREAK: + /* + DECACHE_STACK_INFO(); + Tcl_ResetResult(interp); + CACHE_STACK_INFO(); + */ + TRESULT = TCL_BREAK; + cleanup = 0; + goto processExceptionReturn; - mp_neg(First, First); - mp_sub_d(First, 1, First); - mp_neg(Second, Second); - mp_sub_d(Second, 1, Second); - mp_xor(First, Second, &bigResult); - break; - } - break; - } + case INST_CONTINUE: + /* + DECACHE_STACK_INFO(); + Tcl_ResetResult(interp); + CACHE_STACK_INFO(); + */ + TRESULT = TCL_CONTINUE; + cleanup = 0; + goto processExceptionReturn; - mp_clear(&big1); - mp_clear(&big2); - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&bigResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetBignumObj(valuePtr, &bigResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } + { + ForeachInfo *infoPtr; + Var *iterVarPtr, *listVarPtr; + Tcl_Obj *oldValuePtr, *listPtr, **elements; + ForeachVarList *varListPtr; + int numLists, iterNum, listTmpIndex, listLen, numVars; + int varIndex, valIndex, continueLoop, j, iterTmpIndex; + long i; -#ifndef NO_WIDE_TYPE - if ((type1 == TCL_NUMBER_WIDE) || (type2 == TCL_NUMBER_WIDE)) { - TclGetWideIntFromObj(NULL, valuePtr, &w1); - TclGetWideIntFromObj(NULL, value2Ptr, &w2); + case INST_FOREACH_START4: + /* + * Initialize the temporary local var that holds the count of the + * number of iterations of the loop body to -1. + */ - switch (*pc) { - case INST_BITAND: - wResult = w1 & w2; - break; - case INST_BITOR: - wResult = w1 | w2; - break; - case INST_BITXOR: - wResult = w1 ^ w2; - break; - default: - /* Unused, here to silence compiler warning. */ - wResult = 0; - } + opnd = TclGetUInt4AtPtr(pc+1); + infoPtr = codePtr->auxDataArrayPtr[opnd].clientData; + iterTmpIndex = infoPtr->loopCtTemp; + iterVarPtr = LOCAL(iterTmpIndex); + oldValuePtr = iterVarPtr->value.objPtr; - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(wResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetWideIntObj(valuePtr, wResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + if (oldValuePtr == NULL) { + TclNewLongObj(iterVarPtr->value.objPtr, -1); + Tcl_IncrRefCount(iterVarPtr->value.objPtr); + } else { + TclSetLongObj(oldValuePtr, -1); } + TRACE(("%u => loop iter count temp %d\n", opnd, iterTmpIndex)); + +#ifndef TCL_COMPILE_DEBUG + /* + * Remark that the compiler ALWAYS sets INST_FOREACH_STEP4 immediately + * after INST_FOREACH_START4 - let us just fall through instead of + * jumping back to the top. + */ + + pc += 5; + TCL_DTRACE_INST_NEXT(); +#else + NEXT_INST_F(5, 0, 0); #endif - l1 = *((const long *)ptr1); - l2 = *((const long *)ptr2); - switch (*pc) { - case INST_BITAND: - lResult = l1 & l2; - break; - case INST_BITOR: - lResult = l1 | l2; - break; - case INST_BITXOR: - lResult = l1 ^ l2; - break; - default: - /* Unused, here to silence compiler warning. */ - lResult = 0; - } + case INST_FOREACH_STEP4: + /* + * "Step" a foreach loop (i.e., begin its next iteration) by assigning + * the next value list element to each loop var. + */ - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, lResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - TclSetLongObj(valuePtr, lResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + opnd = TclGetUInt4AtPtr(pc+1); + infoPtr = codePtr->auxDataArrayPtr[opnd].clientData; + numLists = infoPtr->numLists; - case INST_EXPON: - case INST_ADD: - case INST_SUB: - case INST_DIV: - case INST_MULT: - value2Ptr = OBJ_AT_TOS; - valuePtr = OBJ_UNDER_TOS; + /* + * Increment the temp holding the loop iteration number. + */ - TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((TRESULT != TCL_OK) || IsErroringNaNType(type1)) { - TRACE(("%.20s %.20s => ILLEGAL 1st TYPE %s\n", - O2S(value2Ptr), O2S(valuePtr), - (valuePtr->typePtr? valuePtr->typePtr->name: "null"))); - IllegalExprOperandType(interp, pc, valuePtr); - goto gotError; - } + iterVarPtr = LOCAL(infoPtr->loopCtTemp); + valuePtr = iterVarPtr->value.objPtr; + iterNum = valuePtr->internalRep.longValue + 1; + TclSetLongObj(valuePtr, iterNum); -#ifdef ACCEPT_NAN - if (type1 == TCL_NUMBER_NAN) { - /* - * NaN first argument -> result is also NaN. - */ + /* + * Check whether all value lists are exhausted and we should stop the + * loop. + */ - NEXT_INST_F(1, 1, 0); - } -#endif + continueLoop = 0; + listTmpIndex = infoPtr->firstValueTemp; + for (i = 0; i < numLists; i++) { + varListPtr = infoPtr->varLists[i]; + numVars = varListPtr->numVars; - TRESULT = GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - if ((TRESULT != TCL_OK) || IsErroringNaNType(type2)) { - TRACE(("%.20s %.20s => ILLEGAL 2nd TYPE %s\n", - O2S(value2Ptr), O2S(valuePtr), - (value2Ptr->typePtr? value2Ptr->typePtr->name: "null"))); - IllegalExprOperandType(interp, pc, value2Ptr); - goto gotError; + listVarPtr = LOCAL(listTmpIndex); + listPtr = listVarPtr->value.objPtr; + if (TclListObjLength(interp, listPtr, &listLen) != TCL_OK) { + TRACE_WITH_OBJ(("%u => ERROR converting list %ld, \"%s\": ", + opnd, i, O2S(listPtr)), Tcl_GetObjResult(interp)); + goto gotError; + } + if (listLen > iterNum * numVars) { + continueLoop = 1; + } + listTmpIndex++; } -#ifdef ACCEPT_NAN - if (type2 == TCL_NUMBER_NAN) { - /* - * NaN second argument -> result is also NaN. - */ - - objResultPtr = value2Ptr; - NEXT_INST_F(1, 2, 1); - } -#endif + /* + * If some var in some var list still has a remaining list element + * iterate one more time. Assign to var the next element from its + * value list. We already checked above that each list temp holds a + * valid list object (by calling Tcl_ListObjLength), but cannot rely + * on that check remaining valid: one list could have been shimmered + * as a side effect of setting a traced variable. + */ - if ((type1 == TCL_NUMBER_DOUBLE) || (type2 == TCL_NUMBER_DOUBLE)) { - /* - * At least one of the values is floating-point, so perform - * floating point calculations. - */ + if (continueLoop) { + listTmpIndex = infoPtr->firstValueTemp; + for (i = 0; i < numLists; i++) { + varListPtr = infoPtr->varLists[i]; + numVars = varListPtr->numVars; - Tcl_GetDoubleFromObj(NULL, valuePtr, &d1); - Tcl_GetDoubleFromObj(NULL, value2Ptr, &d2); + listVarPtr = LOCAL(listTmpIndex); + listPtr = TclListObjCopy(NULL, listVarPtr->value.objPtr); + TclListObjGetElements(interp, listPtr, &listLen, &elements); - switch (*pc) { - case INST_ADD: - dResult = d1 + d2; - break; - case INST_SUB: - dResult = d1 - d2; - break; - case INST_MULT: - dResult = d1 * d2; - break; - case INST_DIV: -#ifndef IEEE_FLOATING_POINT - if (d2 == 0.0) { - TRACE(("%.6g %.6g => DIVIDE BY ZERO\n", d1, d2)); - goto divideByZero; - } -#endif - /* - * We presume that we are running with zero-divide unmasked if - * we're on an IEEE box. Otherwise, this statement might cause - * demons to fly out our noses. - */ + valIndex = (iterNum * numVars); + for (j = 0; j < numVars; j++) { + if (valIndex >= listLen) { + TclNewObj(valuePtr); + } else { + valuePtr = elements[valIndex]; + } - dResult = d1 / d2; - break; - case INST_EXPON: - if (d1==0.0 && d2<0.0) { - TRACE(("%.6g %.6g => EXPONENT OF ZERO\n", d1, d2)); - goto exponOfZero; + varIndex = varListPtr->varIndexes[j]; + varPtr = LOCAL(varIndex); + while (TclIsVarLink(varPtr)) { + varPtr = varPtr->value.linkPtr; + } + if (TclIsVarDirectWritable(varPtr)) { + value2Ptr = varPtr->value.objPtr; + if (valuePtr != value2Ptr) { + if (value2Ptr != NULL) { + TclDecrRefCount(value2Ptr); + } + varPtr->value.objPtr = valuePtr; + Tcl_IncrRefCount(valuePtr); + } + } else { + DECACHE_STACK_INFO(); + if (TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, + valuePtr, TCL_LEAVE_ERR_MSG, varIndex)==NULL){ + CACHE_STACK_INFO(); + TRACE_WITH_OBJ(( + "%u => ERROR init. index temp %d: ", + opnd,varIndex), Tcl_GetObjResult(interp)); + TclDecrRefCount(listPtr); + goto gotError; + } + CACHE_STACK_INFO(); + } + valIndex++; } - dResult = pow(d1, d2); - break; - default: - /* Unused, here to silence compiler warning. */ - dResult = 0; - } - -#ifndef ACCEPT_NAN - /* - * Check now for IEEE floating-point error. - */ - - if (TclIsNaN(dResult)) { - TRACE(("%.20s %.20s => IEEE FLOATING PT ERROR\n", - O2S(valuePtr), O2S(value2Ptr))); - TclExprFloatError(interp, dResult); - goto gotError; - } -#endif - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - TclNewDoubleObj(objResultPtr, dResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); + TclDecrRefCount(listPtr); + listTmpIndex++; } - TclSetDoubleObj(valuePtr, dResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); } + TRACE(("%u => %d lists, iter %d, %s loop\n", opnd, numLists, + iterNum, (continueLoop? "continue" : "exit"))); - if ((sizeof(long) >= 2*sizeof(int)) && (*pc == INST_MULT) - && (type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) { - l1 = *((const long *)ptr1); - l2 = *((const long *)ptr2); + /* + * Run-time peep-hole optimisation: the compiler ALWAYS follows + * INST_FOREACH_STEP4 with an INST_JUMP_FALSE. We just skip that + * instruction and jump direct from here. + */ - if ((l1 <= INT_MAX) && (l1 >= INT_MIN) - && (l2 <= INT_MAX) && (l2 >= INT_MIN)) { - lResult = l1 * l2; - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, lResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - TclSetLongObj(valuePtr, lResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } + pc += 5; + if (*pc == INST_JUMP_FALSE1) { + NEXT_INST_F((continueLoop? 2 : TclGetInt1AtPtr(pc+1)), 0, 0); + } else { + NEXT_INST_F((continueLoop? 5 : TclGetInt4AtPtr(pc+1)), 0, 0); } + } - if ((sizeof(Tcl_WideInt) >= 2*sizeof(long)) && (*pc == INST_MULT) - && (type1 == TCL_NUMBER_LONG) && (type2 == TCL_NUMBER_LONG)) { - TclGetWideIntFromObj(NULL, valuePtr, &w1); - TclGetWideIntFromObj(NULL, value2Ptr, &w2); + case INST_BEGIN_CATCH4: + /* + * Record start of the catch command with exception range index equal + * to the operand. Push the current stack depth onto the special catch + * stack. + */ - wResult = w1 * w2; + *(++catchTop) = CURR_DEPTH; + TRACE(("%u => catchTop=%d, stackTop=%d\n", + TclGetUInt4AtPtr(pc+1), (int) (catchTop - initCatchTop - 1), + (int) CURR_DEPTH)); + NEXT_INST_F(5, 0, 0); - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(wResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetWideIntObj(valuePtr, wResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } + case INST_END_CATCH: + catchTop--; + Tcl_ResetResult(interp); + TRESULT = TCL_OK; + TRACE(("=> catchTop=%d\n", (int) (catchTop - initCatchTop - 1))); + NEXT_INST_F(1, 0, 0); - /* TODO: Attempts to re-use unshared operands on stack. */ - if (*pc == INST_EXPON) { - int oddExponent = 0, negativeExponent = 0; - unsigned short base; + case INST_PUSH_RESULT: + objResultPtr = Tcl_GetObjResult(interp); + TRACE_WITH_OBJ(("=> "), objResultPtr); - l1 = l2 = 0; - if (type2 == TCL_NUMBER_LONG) { - l2 = *((const long *) ptr2); - if (l2 == 0) { - /* - * Anything to the zero power is 1. - */ + /* + * See the comments at INST_INVOKE_STK + */ - objResultPtr = TCONST(1); - NEXT_INST_F(1, 2, 1); - } else if (l2 == 1) { - /* - * Anything to the first power is itself - */ - NEXT_INST_F(1, 1, 0); - } - } + TclNewObj(objPtr); + Tcl_IncrRefCount(objPtr); + iPtr->objResultPtr = objPtr; + NEXT_INST_F(1, 0, -1); - switch (type2) { - case TCL_NUMBER_LONG: { - negativeExponent = (l2 < 0); - oddExponent = (int) (l2 & 1); - break; - } -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: - w2 = *((const Tcl_WideInt *)ptr2); - negativeExponent = (w2 < 0); - oddExponent = (int) (w2 & (Tcl_WideInt)1); - break; -#endif - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - negativeExponent = (mp_cmp_d(&big2, 0) == MP_LT); - mp_mod_2d(&big2, 1, &big2); - oddExponent = !mp_iszero(&big2); - mp_clear(&big2); - break; - } + case INST_PUSH_RETURN_CODE: + TclNewIntObj(objResultPtr, TRESULT); + TRACE(("=> %u\n", TRESULT)); + NEXT_INST_F(1, 0, 1); - if (type1 == TCL_NUMBER_LONG) { - l1 = *((const long *)ptr1); - } - if (negativeExponent) { - if (type1 == TCL_NUMBER_LONG) { - switch (l1) { - case 0: - /* - * Zero to a negative power is div by zero error. - */ + case INST_PUSH_RETURN_OPTIONS: + objResultPtr = Tcl_GetReturnOptions(interp, TRESULT); + TRACE_WITH_OBJ(("=> "), objResultPtr); + NEXT_INST_F(1, 0, 1); - TRACE(("%s %s => EXPONENT OF ZERO\n", O2S(valuePtr), - O2S(value2Ptr))); - goto exponOfZero; - case -1: - if (oddExponent) { - TclNewIntObj(objResultPtr, -1); - } else { - objResultPtr = TCONST(1); - } - NEXT_INST_F(1, 2, 1); - case 1: - /* - * 1 to any power is 1. - */ + case INST_RETURN_CODE_BRANCH: { + int code; - objResultPtr = TCONST(1); - NEXT_INST_F(1, 2, 1); - } - } - - /* - * Integers with magnitude greater than 1 raise to a negative - * power yield the answer zero (see TIP 123). - */ - - objResultPtr = TCONST(0); - NEXT_INST_F(1, 2, 1); - } - - if (type1 == TCL_NUMBER_LONG) { - switch (l1) { - case 0: - /* - * Zero to a positive power is zero. - */ - - objResultPtr = TCONST(0); - NEXT_INST_F(1, 2, 1); - case 1: - /* - * 1 to any power is 1. - */ + if (TclGetIntFromObj(NULL, OBJ_AT_TOS, &code) != TCL_OK) { + Tcl_Panic("INST_RETURN_CODE_BRANCH: TOS not a return code!"); + } + if (code == TCL_OK) { + Tcl_Panic("INST_RETURN_CODE_BRANCH: TOS is TCL_OK!"); + } + if (code < TCL_ERROR || code > TCL_CONTINUE) { + code = TCL_CONTINUE + 1; + } + NEXT_INST_F(2*code -1, 1, 0); + } - objResultPtr = TCONST(1); - NEXT_INST_F(1, 2, 1); - case -1: - if (oddExponent) { - TclNewIntObj(objResultPtr, -1); - } else { - objResultPtr = TCONST(1); - } - NEXT_INST_F(1, 2, 1); - } - } + /* + * ----------------------------------------------------------------- + * Start of dictionary-related instructions. + */ - /* - * We refuse to accept exponent arguments that exceed one mp_digit - * which means the max exponent value is 2**28-1 = 0x0fffffff = - * 268435455, which fits into a signed 32 bit int which is within - * the range of the long int type. This means any numeric Tcl_Obj - * value not using TCL_NUMBER_LONG type must hold a value larger - * than we accept. - */ + { + int opnd2, allocateDict, done, i, allocdict; + Tcl_Obj *dictPtr, *statePtr, *keyPtr; + Tcl_Obj *emptyPtr, **keyPtrPtr; + Tcl_DictSearch *searchPtr; + DictUpdateInfo *duiPtr; - if (type2 != TCL_NUMBER_LONG) { - Tcl_SetResult(interp, "exponent too large", TCL_STATIC); + case INST_DICT_GET: + opnd = TclGetUInt4AtPtr(pc+1); + TRACE(("%u => ", opnd)); + dictPtr = OBJ_AT_DEPTH(opnd); + if (opnd > 1) { + dictPtr = TclTraceDictPath(interp, dictPtr, opnd-1, + &OBJ_AT_DEPTH(opnd-1), DICT_PATH_READ); + if (dictPtr == NULL) { + TRACE_WITH_OBJ(( + "%u => ERROR tracing dictionary path into \"%s\": ", + opnd, O2S(OBJ_AT_DEPTH(opnd))), + Tcl_GetObjResult(interp)); goto gotError; } + } + if (Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, + &objResultPtr) == TCL_OK) { + if (objResultPtr) { + TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); + NEXT_INST_V(5, opnd+1, 1); + } + Tcl_ResetResult(interp); + Tcl_AppendResult(interp, "key \"", TclGetString(OBJ_AT_TOS), + "\" not known in dictionary", NULL); + TRACE_WITH_OBJ(("%u => ERROR ", opnd), Tcl_GetObjResult(interp)); + } else { + TRACE_WITH_OBJ(( + "%u => ERROR reading leaf dictionary key \"%s\": ", + opnd, O2S(dictPtr)), Tcl_GetObjResult(interp)); + } + goto gotError; - if (type1 == TCL_NUMBER_LONG) { - if (l1 == 2) { - /* - * Reduce small powers of 2 to shifts. - */ - - if ((unsigned long) l2 < CHAR_BIT * sizeof(long) - 1) { - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - TclNewLongObj(objResultPtr, (1L << l2)); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } -#if !defined(TCL_WIDE_INT_IS_LONG) - if ((unsigned long)l2 < CHAR_BIT*sizeof(Tcl_WideInt) - 1){ - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - objResultPtr = - Tcl_NewWideIntObj(((Tcl_WideInt) 1) << l2); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } -#endif - goto overflow; - } - if (l1 == -2) { - int signum = oddExponent ? -1 : 1; - - /* - * Reduce small powers of 2 to shifts. - */ - - if ((unsigned long) l2 < CHAR_BIT * sizeof(long) - 1) { - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - TclNewLongObj(objResultPtr, signum * (1L << l2)); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } -#if !defined(TCL_WIDE_INT_IS_LONG) - if ((unsigned long)l2 < CHAR_BIT*sizeof(Tcl_WideInt) - 1){ - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - objResultPtr = Tcl_NewWideIntObj( - signum * (((Tcl_WideInt) 1) << l2)); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } -#endif - goto overflow; - } -#if (LONG_MAX == 0x7fffffff) - if (l2 - 2 < (long)MaxBase32Size - && l1 <= MaxBase32[l2 - 2] - && l1 >= -MaxBase32[l2 - 2]) { - /* - * Small powers of 32-bit integers. - */ - - lResult = l1 * l1; /* b**2 */ - switch (l2) { - case 2: - break; - case 3: - lResult *= l1; /* b**3 */ - break; - case 4: - lResult *= lResult; /* b**4 */ - break; - case 5: - lResult *= lResult; /* b**4 */ - lResult *= l1; /* b**5 */ - break; - case 6: - lResult *= l1; /* b**3 */ - lResult *= lResult; /* b**6 */ - break; - case 7: - lResult *= l1; /* b**3 */ - lResult *= lResult; /* b**6 */ - lResult *= l1; /* b**7 */ - break; - case 8: - lResult *= lResult; /* b**4 */ - lResult *= lResult; /* b**8 */ - break; - } - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, lResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetLongObj(valuePtr, lResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } - - if (l1 - 3 >= 0 && l1 -2 < (long)Exp32IndexSize - && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { - base = Exp32Index[l1 - 3] - + (unsigned short) (l2 - 2 - MaxBase32Size); - if (base < Exp32Index[l1 - 2]) { - /* - * 32-bit number raised to intermediate power, done by - * table lookup. - */ + case INST_DICT_SET: + case INST_DICT_UNSET: + case INST_DICT_INCR_IMM: + opnd = TclGetUInt4AtPtr(pc+1); + opnd2 = TclGetUInt4AtPtr(pc+5); - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, Exp32Value[base]); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetLongObj(valuePtr, Exp32Value[base]); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } - } - if (-l1 - 3 >= 0 && -l1 - 2 < (long)Exp32IndexSize - && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { - base = Exp32Index[-l1 - 3] - + (unsigned short) (l2 - 2 - MaxBase32Size); - if (base < Exp32Index[-l1 - 2]) { - /* - * 32-bit number raised to intermediate power, done by - * table lookup. - */ + varPtr = LOCAL(opnd2); + while (TclIsVarLink(varPtr)) { + varPtr = varPtr->value.linkPtr; + } + TRACE(("%u %u => ", opnd, opnd2)); + if (TclIsVarDirectReadable(varPtr)) { + dictPtr = varPtr->value.objPtr; + } else { + DECACHE_STACK_INFO(); + dictPtr = TclPtrGetVar(interp, varPtr, NULL,NULL,NULL, 0, opnd2); + CACHE_STACK_INFO(); + } + if (dictPtr == NULL) { + TclNewObj(dictPtr); + allocateDict = 1; + } else { + allocateDict = Tcl_IsShared(dictPtr); + if (allocateDict) { + dictPtr = Tcl_DuplicateObj(dictPtr); + } + } - lResult = (oddExponent) ? - -Exp32Value[base] : Exp32Value[base]; - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, lResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetLongObj(valuePtr, lResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } - } -#endif + switch (*pc) { + case INST_DICT_SET: + cleanup = opnd + 1; + TRESULT = Tcl_DictObjPutKeyList(interp, dictPtr, opnd, + &OBJ_AT_DEPTH(opnd), OBJ_AT_TOS); + break; + case INST_DICT_INCR_IMM: + cleanup = 1; + opnd = TclGetInt4AtPtr(pc+1); + TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &valuePtr); + if (TRESULT != TCL_OK) { + break; } -#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) - if (type1 == TCL_NUMBER_LONG) { - w1 = l1; -#ifndef NO_WIDE_TYPE - } else if (type1 == TCL_NUMBER_WIDE) { - w1 = *((const Tcl_WideInt *) ptr1); -#endif + if (valuePtr == NULL) { + Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS,Tcl_NewIntObj(opnd)); } else { - goto overflow; - } - if (l2 - 2 < (long)MaxBase64Size - && w1 <= MaxBase64[l2 - 2] - && w1 >= -MaxBase64[l2 - 2]) { - /* - * Small powers of integers whose result is wide. - */ - - wResult = w1 * w1; /* b**2 */ - switch (l2) { - case 2: - break; - case 3: - wResult *= l1; /* b**3 */ - break; - case 4: - wResult *= wResult; /* b**4 */ - break; - case 5: - wResult *= wResult; /* b**4 */ - wResult *= w1; /* b**5 */ - break; - case 6: - wResult *= w1; /* b**3 */ - wResult *= wResult; /* b**6 */ - break; - case 7: - wResult *= w1; /* b**3 */ - wResult *= wResult; /* b**6 */ - wResult *= w1; /* b**7 */ - break; - case 8: - wResult *= wResult; /* b**4 */ - wResult *= wResult; /* b**8 */ - break; - case 9: - wResult *= wResult; /* b**4 */ - wResult *= wResult; /* b**8 */ - wResult *= w1; /* b**9 */ - break; - case 10: - wResult *= wResult; /* b**4 */ - wResult *= w1; /* b**5 */ - wResult *= wResult; /* b**10 */ - break; - case 11: - wResult *= wResult; /* b**4 */ - wResult *= w1; /* b**5 */ - wResult *= wResult; /* b**10 */ - wResult *= w1; /* b**11 */ - break; - case 12: - wResult *= w1; /* b**3 */ - wResult *= wResult; /* b**6 */ - wResult *= wResult; /* b**12 */ - break; - case 13: - wResult *= w1; /* b**3 */ - wResult *= wResult; /* b**6 */ - wResult *= wResult; /* b**12 */ - wResult *= w1; /* b**13 */ - break; - case 14: - wResult *= w1; /* b**3 */ - wResult *= wResult; /* b**6 */ - wResult *= w1; /* b**7 */ - wResult *= wResult; /* b**14 */ - break; - case 15: - wResult *= w1; /* b**3 */ - wResult *= wResult; /* b**6 */ - wResult *= w1; /* b**7 */ - wResult *= wResult; /* b**14 */ - wResult *= w1; /* b**15 */ - break; - case 16: - wResult *= wResult; /* b**4 */ - wResult *= wResult; /* b**8 */ - wResult *= wResult; /* b**16 */ - break; + value2Ptr = Tcl_NewIntObj(opnd); + Tcl_IncrRefCount(value2Ptr); + if (Tcl_IsShared(valuePtr)) { + valuePtr = Tcl_DuplicateObj(valuePtr); + Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS, valuePtr); } - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - objResultPtr = Tcl_NewWideIntObj(wResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - - /* - * Handle cases of powers > 16 that still fit in a 64-bit word by - * doing table lookup. - */ - - if (w1 - 3 >= 0 && w1 - 2 < (long)Exp64IndexSize - && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { - base = Exp64Index[w1 - 3] - + (unsigned short) (l2 - 2 - MaxBase64Size); - if (base < Exp64Index[w1 - 2]) { - /* - * 64-bit number raised to intermediate power, done by - * table lookup. - */ - - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(Exp64Value[base]); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetWideIntObj(valuePtr, Exp64Value[base]); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + TRESULT = TclIncrObj(interp, valuePtr, value2Ptr); + if (TRESULT == TCL_OK) { + Tcl_InvalidateStringRep(dictPtr); } + TclDecrRefCount(value2Ptr); } + break; + case INST_DICT_UNSET: + cleanup = opnd; + TRESULT = Tcl_DictObjRemoveKeyList(interp, dictPtr, opnd, + &OBJ_AT_DEPTH(opnd-1)); + break; + default: + cleanup = 0; /* stop compiler warning */ + Tcl_Panic("Should not happen!"); + } - if (-w1 - 3 >= 0 && -w1 - 2 < (long)Exp64IndexSize - && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { - base = Exp64Index[-w1 - 3] - + (unsigned short) (l2 - 2 - MaxBase64Size); - if (base < Exp64Index[-w1 - 2]) { - /* - * 64-bit number raised to intermediate power, done by - * table lookup. - */ - - wResult = (oddExponent) ? - -Exp64Value[base] : Exp64Value[base]; - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(wResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); - } - Tcl_SetWideIntObj(valuePtr, wResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - } + if (TRESULT != TCL_OK) { + if (allocateDict) { + TclDecrRefCount(dictPtr); } -#endif - - goto overflow; + TRACE_WITH_OBJ(("%u %u => ERROR updating dictionary: ", + opnd, opnd2), Tcl_GetObjResult(interp)); + goto checkForCatch; } - if ((*pc != INST_MULT) - && (type1 != TCL_NUMBER_BIG) && (type2 != TCL_NUMBER_BIG)) { - TclGetWideIntFromObj(NULL, valuePtr, &w1); - TclGetWideIntFromObj(NULL, value2Ptr, &w2); - - switch (*pc) { - case INST_ADD: - wResult = w1 + w2; -#ifndef NO_WIDE_TYPE - if ((type1 == TCL_NUMBER_WIDE) || (type2 == TCL_NUMBER_WIDE)) -#endif - { - /* - * Check for overflow. - */ - - if (Overflowing(w1, w2, wResult)) { - goto overflow; - } + if (TclIsVarDirectWritable(varPtr)) { + if (allocateDict) { + value2Ptr = varPtr->value.objPtr; + Tcl_IncrRefCount(dictPtr); + if (value2Ptr != NULL) { + TclDecrRefCount(value2Ptr); } - break; - - case INST_SUB: - wResult = w1 - w2; -#ifndef NO_WIDE_TYPE - if ((type1 == TCL_NUMBER_WIDE) || (type2 == TCL_NUMBER_WIDE)) + varPtr->value.objPtr = dictPtr; + } + objResultPtr = dictPtr; + } else { + Tcl_IncrRefCount(dictPtr); + DECACHE_STACK_INFO(); + objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, + dictPtr, TCL_LEAVE_ERR_MSG, opnd2); + CACHE_STACK_INFO(); + TclDecrRefCount(dictPtr); + if (objResultPtr == NULL) { + TRACE_APPEND(("ERROR: %.30s\n", + O2S(Tcl_GetObjResult(interp)))); + goto gotError; + } + } +#ifndef TCL_COMPILE_DEBUG + if (*(pc+9) == INST_POP) { + NEXT_INST_V(10, cleanup, 0); + } #endif - { - /* - * Must check for overflow. The macro tests for overflows - * in sums by looking at the sign bits. As we have a - * subtraction here, we are adding -w2. As -w2 could in - * turn overflow, we test with ~w2 instead: it has the - * opposite sign bit to w2 so it does the job. Note that - * the only "bad" case (w2==0) is irrelevant for this - * macro, as in that case w1 and wResult have the same - * sign and there is no overflow anyway. - */ - - if (Overflowing(w1, ~w2, wResult)) { - goto overflow; - } - } - break; - - case INST_DIV: - if (w2 == 0) { - TRACE(("%s %s => DIVIDE BY ZERO\n", - O2S(valuePtr), O2S(value2Ptr))); - goto divideByZero; - } - - /* - * Need a bignum to represent (LLONG_MIN / -1) - */ - - if ((w1 == LLONG_MIN) && (w2 == -1)) { - goto overflow; - } - wResult = w1 / w2; - - /* - * Force Tcl's integer division rules. - * TODO: examine for logic simplification - */ - - if (((wResult < 0) || ((wResult == 0) && - ((w1 < 0 && w2 > 0) || (w1 > 0 && w2 < 0)))) && - ((wResult * w2) != w1)) { - wResult -= 1; - } - break; - default: - /* - * Unused, here to silence compiler warning. - */ + TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); + NEXT_INST_V(9, cleanup, 1); - wResult = 0; + case INST_DICT_APPEND: + case INST_DICT_LAPPEND: + opnd = TclGetUInt4AtPtr(pc+1); + varPtr = LOCAL(opnd); + while (TclIsVarLink(varPtr)) { + varPtr = varPtr->value.linkPtr; + } + TRACE(("%u => ", opnd)); + if (TclIsVarDirectReadable(varPtr)) { + dictPtr = varPtr->value.objPtr; + } else { + DECACHE_STACK_INFO(); + dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, 0, opnd); + CACHE_STACK_INFO(); + } + if (dictPtr == NULL) { + TclNewObj(dictPtr); + allocateDict = 1; + } else { + allocateDict = Tcl_IsShared(dictPtr); + if (allocateDict) { + dictPtr = Tcl_DuplicateObj(dictPtr); } + } - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(wResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); + if (Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, + &valuePtr) != TCL_OK) { + if (allocateDict) { + TclDecrRefCount(dictPtr); } - Tcl_SetWideIntObj(valuePtr, wResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); + goto gotError; } - overflow: - TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - mp_init(&bigResult); + /* + * Note that a non-existent key results in a NULL valuePtr, which is a + * case handled separately below. What we *can* say at this point is + * that the write-back will always succeed. + */ + switch (*pc) { - case INST_ADD: - mp_add(&big1, &big2, &bigResult); - break; - case INST_SUB: - mp_sub(&big1, &big2, &bigResult); - break; - case INST_MULT: - mp_mul(&big1, &big2, &bigResult); - break; - case INST_DIV: - if (mp_iszero(&big2)) { - TRACE(("%s %s => DIVIDE BY ZERO\n", O2S(valuePtr), - O2S(value2Ptr))); - mp_clear(&big1); - mp_clear(&big2); - mp_clear(&bigResult); - goto divideByZero; + case INST_DICT_APPEND: + if (valuePtr == NULL) { + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, OBJ_AT_TOS); + } else if (Tcl_IsShared(valuePtr)) { + valuePtr = Tcl_DuplicateObj(valuePtr); + Tcl_AppendObjToObj(valuePtr, OBJ_AT_TOS); + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); + } else { + Tcl_AppendObjToObj(valuePtr, OBJ_AT_TOS); } - mp_init(&bigRemainder); - mp_div(&big1, &big2, &bigResult, &bigRemainder); - /* TODO: internals intrusion */ - if (!mp_iszero(&bigRemainder) - && (bigRemainder.sign != big2.sign)) { - /* - * Convert to Tcl's integer division rules. - */ + break; + case INST_DICT_LAPPEND: + /* + * More complex because list-append can fail. + */ - mp_sub_d(&bigResult, 1, &bigResult); - mp_add(&bigRemainder, &big2, &bigRemainder); + if (valuePtr == NULL) { + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, + Tcl_NewListObj(1, &OBJ_AT_TOS)); + break; + } else if (Tcl_IsShared(valuePtr)) { + valuePtr = Tcl_DuplicateObj(valuePtr); + if (Tcl_ListObjAppendElement(interp, valuePtr, + OBJ_AT_TOS) != TCL_OK) { + TclDecrRefCount(valuePtr); + if (allocateDict) { + TclDecrRefCount(dictPtr); + } + goto gotError; + } + Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); + } else { + if (Tcl_ListObjAppendElement(interp, valuePtr, + OBJ_AT_TOS) != TCL_OK) { + if (allocateDict) { + TclDecrRefCount(dictPtr); + } + goto gotError; + } } - mp_clear(&bigRemainder); break; - case INST_EXPON: - if (big2.used > 1) { - Tcl_SetResult(interp, "exponent too large", TCL_STATIC); - mp_clear(&big1); - mp_clear(&big2); - mp_clear(&bigResult); + default: + Tcl_Panic("Should not happen!"); + } + + if (TclIsVarDirectWritable(varPtr)) { + if (allocateDict) { + value2Ptr = varPtr->value.objPtr; + Tcl_IncrRefCount(dictPtr); + if (value2Ptr != NULL) { + TclDecrRefCount(value2Ptr); + } + varPtr->value.objPtr = dictPtr; + } + objResultPtr = dictPtr; + } else { + Tcl_IncrRefCount(dictPtr); + DECACHE_STACK_INFO(); + objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, + dictPtr, TCL_LEAVE_ERR_MSG, opnd); + CACHE_STACK_INFO(); + TclDecrRefCount(dictPtr); + if (objResultPtr == NULL) { + TRACE_APPEND(("ERROR: %.30s\n", + O2S(Tcl_GetObjResult(interp)))); goto gotError; } - mp_expt_d(&big1, big2.dp[0], &bigResult); - break; } - mp_clear(&big1); - mp_clear(&big2); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&bigResult); - TRACE(("%s\n", O2S(objResultPtr))); - NEXT_INST_F(1, 2, 1); +#ifndef TCL_COMPILE_DEBUG + if (*(pc+5) == INST_POP) { + NEXT_INST_F(6, 2, 0); } - Tcl_SetBignumObj(valuePtr, &bigResult); - TRACE(("%s\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 0); - - case INST_LNOT: { - int b; - - valuePtr = OBJ_AT_TOS; +#endif + TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); + NEXT_INST_F(5, 2, 1); - /* TODO - check claim that taking address of b harms performance */ - /* TODO - consider optimization search for constants */ - if (TclGetBooleanFromObj(NULL, valuePtr, &b) != TCL_OK) { - TRACE(("\"%.20s\" => ILLEGAL TYPE %s\n", O2S(valuePtr), - (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); - IllegalExprOperandType(interp, pc, valuePtr); + case INST_DICT_FIRST: + opnd = TclGetUInt4AtPtr(pc+1); + TRACE(("%u => ", opnd)); + dictPtr = POP_OBJECT(); + searchPtr = (Tcl_DictSearch *) ckalloc(sizeof(Tcl_DictSearch)); + if (Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr, + &valuePtr, &done) != TCL_OK) { + ckfree((char *) searchPtr); goto gotError; } - /* TODO: Consider peephole opt. */ - objResultPtr = TCONST(!b); - NEXT_INST_F(1, 1, 1); - } - - case INST_BITNOT: - valuePtr = OBJ_AT_TOS; - TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((TRESULT != TCL_OK) || (type1 == TCL_NUMBER_NAN) - || (type1 == TCL_NUMBER_DOUBLE)) { + TclNewObj(statePtr); + statePtr->typePtr = &dictIteratorType; + statePtr->internalRep.twoPtrValue.ptr1 = searchPtr; + statePtr->internalRep.twoPtrValue.ptr2 = dictPtr; + varPtr = LOCAL(opnd); + if (varPtr->value.objPtr) { + if (varPtr->value.objPtr->typePtr == &dictIteratorType) { + Tcl_Panic("mis-issued dictFirst!"); + } + TclDecrRefCount(varPtr->value.objPtr); + } + varPtr->value.objPtr = statePtr; + Tcl_IncrRefCount(statePtr); + goto pushDictIteratorResult; + + case INST_DICT_NEXT: + opnd = TclGetUInt4AtPtr(pc+1); + TRACE(("%u => ", opnd)); + statePtr = (*LOCAL(opnd)).value.objPtr; + if (statePtr == NULL || statePtr->typePtr != &dictIteratorType) { + Tcl_Panic("mis-issued dictNext!"); + } + searchPtr = statePtr->internalRep.twoPtrValue.ptr1; + Tcl_DictObjNext(searchPtr, &keyPtr, &valuePtr, &done); + pushDictIteratorResult: + if (done) { + TclNewObj(emptyPtr); + PUSH_OBJECT(emptyPtr); + PUSH_OBJECT(emptyPtr); + } else { + PUSH_OBJECT(valuePtr); + PUSH_OBJECT(keyPtr); + } + TRACE_APPEND(("\"%.30s\" \"%.30s\" %d", + O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), done)); + objResultPtr = TCONST(done); + /* TODO: consider opt like INST_FOREACH_STEP4 */ + NEXT_INST_F(5, 0, 1); + + case INST_DICT_DONE: + opnd = TclGetUInt4AtPtr(pc+1); + TRACE(("%u => ", opnd)); + statePtr = (*LOCAL(opnd)).value.objPtr; + if (statePtr == NULL) { + Tcl_Panic("mis-issued dictDone!"); + } + + if (statePtr->typePtr == &dictIteratorType) { /* - * ... ~$NonInteger => raise an error. + * First kill the search, and then release the reference to the + * dictionary that we were holding. */ - TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), - (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); - IllegalExprOperandType(interp, pc, valuePtr); - goto gotError; + searchPtr = statePtr->internalRep.twoPtrValue.ptr1; + Tcl_DictObjDone(searchPtr); + ckfree((char *) searchPtr); + + dictPtr = statePtr->internalRep.twoPtrValue.ptr2; + TclDecrRefCount(dictPtr); + + /* + * Set the internal variable to an empty object to signify that we + * don't hold an iterator. + */ + + TclDecrRefCount(statePtr); + TclNewObj(emptyPtr); + (*LOCAL(opnd)).value.objPtr = emptyPtr; + Tcl_IncrRefCount(emptyPtr); } - if (type1 == TCL_NUMBER_LONG) { - l1 = *((const long *) ptr1); - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, ~l1); - NEXT_INST_F(1, 1, 1); - } - TclSetLongObj(valuePtr, ~l1); - NEXT_INST_F(1, 0, 0); + NEXT_INST_F(5, 0, 0); + + case INST_DICT_UPDATE_START: + opnd = TclGetUInt4AtPtr(pc+1); + opnd2 = TclGetUInt4AtPtr(pc+5); + varPtr = LOCAL(opnd); + duiPtr = codePtr->auxDataArrayPtr[opnd2].clientData; + while (TclIsVarLink(varPtr)) { + varPtr = varPtr->value.linkPtr; } -#ifndef NO_WIDE_TYPE - if (type1 == TCL_NUMBER_WIDE) { - w1 = *((const Tcl_WideInt *) ptr1); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(~w1); - NEXT_INST_F(1, 1, 1); + TRACE(("%u => ", opnd)); + if (TclIsVarDirectReadable(varPtr)) { + dictPtr = varPtr->value.objPtr; + } else { + DECACHE_STACK_INFO(); + dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, + TCL_LEAVE_ERR_MSG, opnd); + CACHE_STACK_INFO(); + if (dictPtr == NULL) { + goto gotError; } - Tcl_SetWideIntObj(valuePtr, ~w1); - NEXT_INST_F(1, 0, 0); } -#endif - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - /* ~a = - a - 1 */ - mp_neg(&big1, &big1); - mp_sub_d(&big1, 1, &big1); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&big1); - NEXT_INST_F(1, 1, 1); + if (TclListObjGetElements(interp, OBJ_AT_TOS, &length, + &keyPtrPtr) != TCL_OK) { + goto gotError; } - Tcl_SetBignumObj(valuePtr, &big1); - NEXT_INST_F(1, 0, 0); + if (length != duiPtr->length) { + Tcl_Panic("dictUpdateStart argument length mismatch"); + } + for (i=0 ; ivarIndices[i]); + while (TclIsVarLink(varPtr)) { + varPtr = varPtr->value.linkPtr; + } + DECACHE_STACK_INFO(); + if (valuePtr == NULL) { + TclObjUnsetVar2(interp, + localName(iPtr->varFramePtr, duiPtr->varIndices[i]), + NULL, 0); + } else if (TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, + valuePtr, TCL_LEAVE_ERR_MSG, + duiPtr->varIndices[i]) == NULL) { + CACHE_STACK_INFO(); + goto gotError; + } + CACHE_STACK_INFO(); + } + NEXT_INST_F(9, 0, 0); - case INST_UMINUS: - valuePtr = OBJ_AT_TOS; - TRESULT = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); - if ((TRESULT != TCL_OK) || IsErroringNaNType(type1)) { - TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), - (valuePtr->typePtr? valuePtr->typePtr->name : "null"))); - IllegalExprOperandType(interp, pc, valuePtr); + case INST_DICT_UPDATE_END: + opnd = TclGetUInt4AtPtr(pc+1); + opnd2 = TclGetUInt4AtPtr(pc+5); + varPtr = LOCAL(opnd); + duiPtr = codePtr->auxDataArrayPtr[opnd2].clientData; + while (TclIsVarLink(varPtr)) { + varPtr = varPtr->value.linkPtr; + } + TRACE(("%u => ", opnd)); + if (TclIsVarDirectReadable(varPtr)) { + dictPtr = varPtr->value.objPtr; + } else { + DECACHE_STACK_INFO(); + dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, 0, opnd); + CACHE_STACK_INFO(); + } + if (dictPtr == NULL) { + NEXT_INST_F(9, 1, 0); + } + if (Tcl_DictObjSize(interp, dictPtr, &length) != TCL_OK + || TclListObjGetElements(interp, OBJ_AT_TOS, &length, + &keyPtrPtr) != TCL_OK) { goto gotError; } - switch (type1) { - case TCL_NUMBER_DOUBLE: - if (Tcl_IsShared(valuePtr)) { - TclNewDoubleObj(objResultPtr, -(*((const double *) ptr1))); - NEXT_INST_F(1, 1, 1); + allocdict = Tcl_IsShared(dictPtr); + if (allocdict) { + dictPtr = Tcl_DuplicateObj(dictPtr); + } + for (i=0 ; ivarIndices[i]); + + while (TclIsVarLink(var2Ptr)) { + var2Ptr = var2Ptr->value.linkPtr; } - d1 = *((const double *) ptr1); - TclSetDoubleObj(valuePtr, -d1); - NEXT_INST_F(1, 0, 0); - case TCL_NUMBER_LONG: - l1 = *((const long *) ptr1); - if (l1 != LONG_MIN) { - if (Tcl_IsShared(valuePtr)) { - TclNewLongObj(objResultPtr, -l1); - NEXT_INST_F(1, 1, 1); - } - TclSetLongObj(valuePtr, -l1); - NEXT_INST_F(1, 0, 0); + if (TclIsVarDirectReadable(var2Ptr)) { + valuePtr = var2Ptr->value.objPtr; + } else { + DECACHE_STACK_INFO(); + valuePtr = TclPtrGetVar(interp, var2Ptr, NULL, NULL, NULL, 0, + duiPtr->varIndices[i]); + CACHE_STACK_INFO(); } - /* FALLTHROUGH */ -#ifndef NO_WIDE_TYPE - case TCL_NUMBER_WIDE: - if (type1 == TCL_NUMBER_LONG) { - w1 = (Tcl_WideInt)(*((const long *) ptr1)); + if (valuePtr == NULL) { + Tcl_DictObjRemove(interp, dictPtr, keyPtrPtr[i]); + } else if (dictPtr == valuePtr) { + Tcl_DictObjPut(interp, dictPtr, keyPtrPtr[i], + Tcl_DuplicateObj(valuePtr)); } else { - w1 = *((const Tcl_WideInt *) ptr1); + Tcl_DictObjPut(interp, dictPtr, keyPtrPtr[i], valuePtr); } - if (w1 != LLONG_MIN) { - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewWideIntObj(-w1); - NEXT_INST_F(1, 1, 1); + } + if (TclIsVarDirectWritable(varPtr)) { + Tcl_IncrRefCount(dictPtr); + TclDecrRefCount(varPtr->value.objPtr); + varPtr->value.objPtr = dictPtr; + } else { + DECACHE_STACK_INFO(); + objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, + dictPtr, TCL_LEAVE_ERR_MSG, opnd); + CACHE_STACK_INFO(); + if (objResultPtr == NULL) { + if (allocdict) { + TclDecrRefCount(dictPtr); } - Tcl_SetWideIntObj(valuePtr, -w1); - NEXT_INST_F(1, 0, 0); - } - /* FALLTHROUGH */ -#endif - case TCL_NUMBER_BIG: - switch (type1) { -#ifdef NO_WIDE_TYPE - case TCL_NUMBER_LONG: - TclBNInitBignumFromLong(&big1, *(const long *) ptr1); - break; -#else - case TCL_NUMBER_WIDE: - TclBNInitBignumFromWideInt(&big1, *(const Tcl_WideInt *)ptr1); - break; -#endif - case TCL_NUMBER_BIG: - Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - } - mp_neg(&big1, &big1); - if (Tcl_IsShared(valuePtr)) { - objResultPtr = Tcl_NewBignumObj(&big1); - NEXT_INST_F(1, 1, 1); + goto gotError; } - Tcl_SetBignumObj(valuePtr, &big1); - NEXT_INST_F(1, 0, 0); - case TCL_NUMBER_NAN: - /* -NaN => NaN */ - NEXT_INST_F(1, 0, 0); } + NEXT_INST_F(9, 1, 0); + } - case INST_UPLUS: - case INST_TRY_CVT_TO_NUMERIC: - /* - * Try to convert the topmost stack object to numeric object. This is - * done in order to support [expr]'s policy of interpreting operands - * if at all possible as numbers first, then strings. - */ - - valuePtr = OBJ_AT_TOS; + /* + * End of dictionary-related instructions. + * ----------------------------------------------------------------- + */ - if (GetNumberFromObj(NULL, valuePtr, &ptr1, &type1) != TCL_OK) { - if (*pc == INST_UPLUS) { - /* - * ... +$NonNumeric => raise an error. - */ - - TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), - (valuePtr->typePtr? valuePtr->typePtr->name:"null"))); - IllegalExprOperandType(interp, pc, valuePtr); - goto gotError; - } - - /* ... TryConvertToNumeric($NonNumeric) is acceptable */ - TRACE(("\"%.20s\" => not numeric\n", O2S(valuePtr))); - NEXT_INST_F(1, 0, 0); - } - if (IsErroringNaNType(type1)) { - if (*pc == INST_UPLUS) { - /* - * ... +$NonNumeric => raise an error. - */ + default: + Tcl_Panic("TclExecuteByteCode: unrecognized opCode %u", *pc); + } /* end of switch on opCode */ - TRACE(("\"%.20s\" => ILLEGAL TYPE %s \n", O2S(valuePtr), - (valuePtr->typePtr? valuePtr->typePtr->name:"null"))); - IllegalExprOperandType(interp, pc, valuePtr); - } else { - /* - * Numeric conversion of NaN -> error. - */ + /* + * Block for variables needed to process exception returns. + */ - TRACE(("\"%.20s\" => IEEE FLOATING PT ERROR\n", - O2S(objResultPtr))); - TclExprFloatError(interp, *((const double *) ptr1)); - } - goto gotError; - } + { + ExceptionRange *rangePtr; + /* Points to closest loop or catch exception + * range enclosing the pc. Used by various + * instructions and processCatch to process + * break, continue, and errors. */ + const char *bytes; /* - * Ensure that the numeric value has a string rep the same as the - * formatted version of its internal rep. This is used, e.g., to make - * sure that "expr {0001}" yields "1", not "0001". We implement this - * by _discarding_ the string rep since we know it will be - * regenerated, if needed later, by formatting the internal rep's - * value. + * An external evaluation (INST_INVOKE or INST_EVAL) returned + * something different from TCL_OK, or else INST_BREAK or + * INST_CONTINUE were called. */ - if (valuePtr->bytes == NULL) { - TRACE(("\"%.20s\" => numeric, same Tcl_Obj\n", O2S(valuePtr))); - NEXT_INST_F(1, 0, 0); - } - if (Tcl_IsShared(valuePtr)) { + processExceptionReturn: +#if TCL_COMPILE_DEBUG + switch (*pc) { + case INST_INVOKE_STK1: + opnd = TclGetUInt1AtPtr(pc+1); + TRACE(("%u => ... after \"%.20s\": ", opnd, cmdNameBuf)); + break; + case INST_INVOKE_STK4: + opnd = TclGetUInt4AtPtr(pc+1); + TRACE(("%u => ... after \"%.20s\": ", opnd, cmdNameBuf)); + break; + case INST_EVAL_STK: /* - * Here we do some surgery within the Tcl_Obj internals. We want - * to copy the intrep, but not the string, so we temporarily hide - * the string so we do not copy it. + * Note that the object at stacktop has to be used before doing + * the cleanup. */ - char *savedString = valuePtr->bytes; - - valuePtr->bytes = NULL; - objResultPtr = Tcl_DuplicateObj(valuePtr); - valuePtr->bytes = savedString; - TRACE(("\"%.20s\" => numeric, new Tcl_Obj\n", O2S(valuePtr))); - NEXT_INST_F(1, 1, 1); + TRACE(("\"%.30s\" => ", O2S(OBJ_AT_TOS))); + break; + default: + TRACE(("=> ")); } - TclInvalidateStringRep(valuePtr); - TRACE(("\"%.20s\" => numeric, same Tcl_Obj\n", O2S(valuePtr))); - NEXT_INST_F(1, 0, 0); - } - - /* - * End of numeric operator instructions. - * ----------------------------------------------------------------- - */ +#endif + if ((TRESULT == TCL_CONTINUE) || (TRESULT == TCL_BREAK)) { + rangePtr = GetExceptRangeForPc(pc, /*catchOnly*/ 0, codePtr); + if (rangePtr == NULL) { + TRACE_APPEND(("no encl. loop or catch, returning %s\n", + StringForResultCode(TRESULT))); + goto abnormalReturn; + } + if (rangePtr->type == CATCH_EXCEPTION_RANGE) { + TRACE_APPEND(("%s ...\n", StringForResultCode(TRESULT))); + goto processCatch; + } + while (cleanup--) { + valuePtr = POP_OBJECT(); + TclDecrRefCount(valuePtr); + } + if (TRESULT == TCL_BREAK) { + TRESULT = TCL_OK; + pc = (codePtr->codeStart + rangePtr->breakOffset); + TRACE_APPEND(("%s, range at %d, new pc %d\n", + StringForResultCode(TRESULT), + rangePtr->codeOffset, rangePtr->breakOffset)); + NEXT_INST_F(0, 0, 0); + } + if (rangePtr->continueOffset == -1) { + TRACE_APPEND(("%s, loop w/o continue, checking for catch\n", + StringForResultCode(TRESULT))); + goto checkForCatch; + } + TRESULT = TCL_OK; + pc = (codePtr->codeStart + rangePtr->continueOffset); + TRACE_APPEND(("%s, range at %d, new pc %d\n", + StringForResultCode(TRESULT), + rangePtr->codeOffset, rangePtr->continueOffset)); + NEXT_INST_F(0, 0, 0); + } +#if TCL_COMPILE_DEBUG + if (traceInstructions) { + objPtr = Tcl_GetObjResult(interp); + if ((TRESULT != TCL_ERROR) && (TRESULT != TCL_RETURN)) { + TRACE_APPEND(("OTHER RETURN CODE %d, result= \"%s\"\n ", + TRESULT, O2S(objPtr))); + } else { + TRACE_APPEND(("%s, result= \"%s\"\n", + StringForResultCode(TRESULT), O2S(objPtr))); + } + } +#endif + goto checkForCatch; - case INST_BREAK: /* - DECACHE_STACK_INFO(); - Tcl_ResetResult(interp); - CACHE_STACK_INFO(); - */ - TRESULT = TCL_BREAK; - cleanup = 0; - goto processExceptionReturn; + * Division by zero in an expression. Control only reaches this point + * by "goto divideByZero". + */ - case INST_CONTINUE: - /* - DECACHE_STACK_INFO(); - Tcl_ResetResult(interp); - CACHE_STACK_INFO(); - */ - TRESULT = TCL_CONTINUE; - cleanup = 0; - goto processExceptionReturn; + divideByZero: + Tcl_SetResult(interp, "divide by zero", TCL_STATIC); + Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", NULL); + goto gotError; - case INST_FOREACH_START4: { /* - * Initialize the temporary local var that holds the count of the - * number of iterations of the loop body to -1. + * Exponentiation of zero by negative number in an expression. Control + * only reaches this point by "goto exponOfZero". */ - int iterTmpIndex; - ForeachInfo *infoPtr; - Var *iterVarPtr; - Tcl_Obj *oldValuePtr; + exponOfZero: + Tcl_SetResult(interp, "exponentiation of zero by negative power", + TCL_STATIC); + Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", + "exponentiation of zero by negative power", NULL); - opnd = TclGetUInt4AtPtr(pc+1); - infoPtr = codePtr->auxDataArrayPtr[opnd].clientData; - iterTmpIndex = infoPtr->loopCtTemp; - iterVarPtr = LOCAL(iterTmpIndex); - oldValuePtr = iterVarPtr->value.objPtr; + /* + * Almost all error paths feed through here rather than assigning to + * TRESULT themselves (for a small but consistent saving). + */ - if (oldValuePtr == NULL) { - TclNewLongObj(iterVarPtr->value.objPtr, -1); - Tcl_IncrRefCount(iterVarPtr->value.objPtr); - } else { - TclSetLongObj(oldValuePtr, -1); - } - TRACE(("%u => loop iter count temp %d\n", opnd, iterTmpIndex)); + gotError: + TRESULT = TCL_ERROR; -#ifndef TCL_COMPILE_DEBUG /* - * Remark that the compiler ALWAYS sets INST_FOREACH_STEP4 immediately - * after INST_FOREACH_START4 - let us just fall through instead of - * jumping back to the top. + * Execution has generated an "exception" such as TCL_ERROR. If the + * exception is an error, record information about what was being + * executed when the error occurred. Find the closest enclosing catch + * range, if any. If no enclosing catch range is found, stop execution + * and return the "exception" code. */ - pc += 5; - TCL_DTRACE_INST_NEXT(); -#else - NEXT_INST_F(5, 0, 0); -#endif - } + checkForCatch: + if (iPtr->execEnvPtr->rewind) { + goto abnormalReturn; + } + if ((TRESULT == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { + bytes = GetSrcInfoForPc(pc, codePtr, &length); + if (bytes != NULL) { + DECACHE_STACK_INFO(); + Tcl_LogCommandInfo(interp, codePtr->source, bytes, length); + CACHE_STACK_INFO(); + } + } + iPtr->flags &= ~ERR_ALREADY_LOGGED; - case INST_FOREACH_STEP4: { /* - * "Step" a foreach loop (i.e., begin its next iteration) by assigning - * the next value list element to each loop var. + * Clear all expansions that may have started after the last + * INST_BEGIN_CATCH. */ - ForeachInfo *infoPtr; - ForeachVarList *varListPtr; - Tcl_Obj *listPtr, **elements; - Var *iterVarPtr, *listVarPtr; - int numLists, iterNum, listTmpIndex, listLen, numVars; - int varIndex, valIndex, continueLoop, j; - long i; - - opnd = TclGetUInt4AtPtr(pc+1); - infoPtr = codePtr->auxDataArrayPtr[opnd].clientData; - numLists = infoPtr->numLists; + while (auxObjList) { + if ((catchTop != initCatchTop) && (*catchTop > + (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1)) { + break; + } + POP_TAUX_OBJ(); + } /* - * Increment the temp holding the loop iteration number. + * We must not catch if the script in progress has been canceled with + * the TCL_CANCEL_UNWIND flag. Instead, it blows outwards until we + * either hit another interpreter (presumably where the script in + * progress has not been canceled) or we get to the top-level. We do + * NOT modify the interpreter result here because we know it will + * already be set prior to vectoring down to this point in the code. */ - iterVarPtr = LOCAL(infoPtr->loopCtTemp); - valuePtr = iterVarPtr->value.objPtr; - iterNum = (valuePtr->internalRep.longValue + 1); - TclSetLongObj(valuePtr, iterNum); + if (Tcl_Canceled(interp, 0) == TCL_ERROR) { +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " ... cancel with unwind, returning %s\n", + StringForResultCode(TRESULT)); + } +#endif + goto abnormalReturn; + } /* - * Check whether all value lists are exhausted and we should stop the - * loop. + * We must not catch an exceeded limit. Instead, it blows outwards + * until we either hit another interpreter (presumably where the limit + * is not exceeded) or we get to the top-level. */ - continueLoop = 0; - listTmpIndex = infoPtr->firstValueTemp; - for (i = 0; i < numLists; i++) { - varListPtr = infoPtr->varLists[i]; - numVars = varListPtr->numVars; - - listVarPtr = LOCAL(listTmpIndex); - listPtr = listVarPtr->value.objPtr; - - if (TclListObjLength(interp, listPtr, &listLen) != TCL_OK) { - TRACE_WITH_OBJ(("%u => ERROR converting list %ld, \"%s\": ", - opnd, i, O2S(listPtr)), Tcl_GetObjResult(interp)); - goto gotError; + if (TclLimitExceeded(iPtr->limit)) { +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " ... limit exceeded, returning %s\n", + StringForResultCode(TRESULT)); } - - if (listLen > iterNum * numVars) { - continueLoop = 1; +#endif + goto abnormalReturn; + } + if (catchTop == initCatchTop) { +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " ... no enclosing catch, returning %s\n", + StringForResultCode(TRESULT)); } - listTmpIndex++; +#endif + goto abnormalReturn; } + rangePtr = GetExceptRangeForPc(pc, /*catchOnly*/ 1, codePtr); + if (rangePtr == NULL) { + /* + * This is only possible when compiling a [catch] that sends its + * script to INST_EVAL. Cannot correct the compiler without + * breaking compat with previous .tbc compiled scripts. + */ - /* - * If some var in some var list still has a remaining list element - * iterate one more time. Assign to var the next element from its - * value list. We already checked above that each list temp holds a - * valid list object (by calling Tcl_ListObjLength), but cannot rely - * on that check remaining valid: one list could have been shimmered - * as a side effect of setting a traced variable. - */ - - if (continueLoop) { - listTmpIndex = infoPtr->firstValueTemp; - for (i = 0; i < numLists; i++) { - varListPtr = infoPtr->varLists[i]; - numVars = varListPtr->numVars; - - listVarPtr = LOCAL(listTmpIndex); - listPtr = TclListObjCopy(NULL, listVarPtr->value.objPtr); - TclListObjGetElements(interp, listPtr, &listLen, &elements); - - valIndex = (iterNum * numVars); - for (j = 0; j < numVars; j++) { - if (valIndex >= listLen) { - TclNewObj(valuePtr); - } else { - valuePtr = elements[valIndex]; - } - - varIndex = varListPtr->varIndexes[j]; - varPtr = LOCAL(varIndex); - while (TclIsVarLink(varPtr)) { - varPtr = varPtr->value.linkPtr; - } - if (TclIsVarDirectWritable(varPtr)) { - value2Ptr = varPtr->value.objPtr; - if (valuePtr != value2Ptr) { - if (value2Ptr != NULL) { - TclDecrRefCount(value2Ptr); - } - varPtr->value.objPtr = valuePtr; - Tcl_IncrRefCount(valuePtr); - } - } else { - DECACHE_STACK_INFO(); - value2Ptr = TclPtrSetVar(interp, varPtr, NULL, NULL, - NULL, valuePtr, TCL_LEAVE_ERR_MSG, varIndex); - CACHE_STACK_INFO(); - if (value2Ptr == NULL) { - TRACE_WITH_OBJ(( - "%u => ERROR init. index temp %d: ", - opnd,varIndex), Tcl_GetObjResult(interp)); - TclDecrRefCount(listPtr); - goto gotError; - } - } - valIndex++; - } - TclDecrRefCount(listPtr); - listTmpIndex++; +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " ... no enclosing catch, returning %s\n", + StringForResultCode(TRESULT)); } +#endif + goto abnormalReturn; } - TRACE(("%u => %d lists, iter %d, %s loop\n", opnd, numLists, - iterNum, (continueLoop? "continue" : "exit"))); /* - * Run-time peep-hole optimisation: the compiler ALWAYS follows - * INST_FOREACH_STEP4 with an INST_JUMP_FALSE. We just skip that - * instruction and jump direct from here. + * A catch exception range (rangePtr) was found to handle an + * "exception". It was found either by checkForCatch just above or by + * an instruction during break, continue, or error processing. Jump to + * its catchOffset after unwinding the operand stack to the depth it + * had when starting to execute the range's catch command. */ - pc += 5; - if (*pc == INST_JUMP_FALSE1) { - NEXT_INST_F((continueLoop? 2 : TclGetInt1AtPtr(pc+1)), 0, 0); - } else { - NEXT_INST_F((continueLoop? 5 : TclGetInt4AtPtr(pc+1)), 0, 0); + processCatch: + while (CURR_DEPTH > *catchTop) { + valuePtr = POP_OBJECT(); + TclDecrRefCount(valuePtr); } - } +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + fprintf(stdout, " ... found catch at %d, catchTop=%d, " + "unwound to %ld, new pc %u\n", + rangePtr->codeOffset, (int) (catchTop - initCatchTop - 1), + (long) *catchTop, (unsigned) rangePtr->catchOffset); + } +#endif + pc = (codePtr->codeStart + rangePtr->catchOffset); + NEXT_INST_F(0, 0, 0); /* Restart the execution loop at pc. */ - case INST_BEGIN_CATCH4: /* - * Record start of the catch command with exception range index equal - * to the operand. Push the current stack depth onto the special catch - * stack. + * end of infinite loop dispatching on instructions. */ - *(++catchTop) = CURR_DEPTH; - TRACE(("%u => catchTop=%d, stackTop=%d\n", - TclGetUInt4AtPtr(pc+1), (int) (catchTop - initCatchTop - 1), - (int) CURR_DEPTH)); - NEXT_INST_F(5, 0, 0); - - case INST_END_CATCH: - catchTop--; - Tcl_ResetResult(interp); - TRESULT = TCL_OK; - TRACE(("=> catchTop=%d\n", (int) (catchTop - initCatchTop - 1))); - NEXT_INST_F(1, 0, 0); - - case INST_PUSH_RESULT: - objResultPtr = Tcl_GetObjResult(interp); - TRACE_WITH_OBJ(("=> "), objResultPtr); - /* - * See the comments at INST_INVOKE_STK + * Abnormal return code. Restore the stack to state it had when + * starting to execute the ByteCode. Panic if the stack is below the + * initial level. */ - TclNewObj(objPtr); - Tcl_IncrRefCount(objPtr); - iPtr->objResultPtr = objPtr; - NEXT_INST_F(1, 0, -1); + abnormalReturn: + TCL_DTRACE_INST_LAST(); - case INST_PUSH_RETURN_CODE: - TclNewIntObj(objResultPtr, TRESULT); - TRACE(("=> %u\n", TRESULT)); - NEXT_INST_F(1, 0, 1); + /* + * Winding down: insure that all pending cleanups are done before + * dropping out of this bytecode. + */ + if (TOP_CB(interp) != BP->rootPtr) { + TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); - case INST_PUSH_RETURN_OPTIONS: - objResultPtr = Tcl_GetReturnOptions(interp, TRESULT); - TRACE_WITH_OBJ(("=> "), objResultPtr); - NEXT_INST_F(1, 0, 1); + if (TOP_CB(interp) != BP->rootPtr) { + Tcl_Panic("Abnormal return with busy callback stack"); + } + } - case INST_RETURN_CODE_BRANCH: { - int code; + /* + * Clear all expansions and same-level NR calls. + * + * Note that expansion markers have a NULL type; avoid removing other + * markers. + */ - if (TclGetIntFromObj(NULL, OBJ_AT_TOS, &code) != TCL_OK) { - Tcl_Panic("INST_RETURN_CODE_BRANCH: TOS not a return code!"); + while (auxObjList) { + POP_TAUX_OBJ(); } - if (code == TCL_OK) { - Tcl_Panic("INST_RETURN_CODE_BRANCH: TOS is TCL_OK!"); + while (tosPtr > initTosPtr) { + objPtr = POP_OBJECT(); + Tcl_DecrRefCount(objPtr); } - if (code < TCL_ERROR || code > TCL_CONTINUE) { - code = TCL_CONTINUE + 1; + + if (tosPtr < initTosPtr) { + fprintf(stderr, + "\nTclExecuteByteCode: abnormal return at pc %u: " + "stack top %d < entry stack top %d\n", + (unsigned)(pc - codePtr->codeStart), + (unsigned) CURR_DEPTH, (unsigned) 0); + Tcl_Panic("TclExecuteByteCode execution failure: end stack top < start stack top"); } - NEXT_INST_F(2*code -1, 1, 0); + CLANG_ASSERT(bcFramePtr); } /* - * ----------------------------------------------------------------- - * Start of dictionary-related instructions. + * Store the previous bottomPtr for returning to it, then free all + * resources used by this bytecode and process callbacks until you return + * to the previous bytecode (if any). */ - { - int opnd2, allocateDict, done, i, allocdict; - Tcl_Obj *dictPtr, *statePtr, *keyPtr; - Tcl_Obj *emptyPtr, **keyPtrPtr; - Tcl_DictSearch *searchPtr; - DictUpdateInfo *duiPtr; + OBP = BP->prevBottomPtr; + iPtr->cmdFramePtr = bcFramePtr->nextPtr; + TclStackFree(interp, BP); /* free my stack */ - case INST_DICT_GET: - opnd = TclGetUInt4AtPtr(pc+1); - TRACE(("%u => ", opnd)); - dictPtr = OBJ_AT_DEPTH(opnd); - if (opnd > 1) { - dictPtr = TclTraceDictPath(interp, dictPtr, opnd-1, - &OBJ_AT_DEPTH(opnd-1), DICT_PATH_READ); - if (dictPtr == NULL) { - TRACE_WITH_OBJ(( - "%u => ERROR tracing dictionary path into \"%s\": ", - opnd, O2S(OBJ_AT_DEPTH(opnd))), - Tcl_GetObjResult(interp)); - goto gotError; - } - } - TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &objResultPtr); - if ((TRESULT == TCL_OK) && objResultPtr) { - TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); - NEXT_INST_V(5, opnd+1, 1); - } - if (TRESULT != TCL_OK) { - TRACE_WITH_OBJ(( - "%u => ERROR reading leaf dictionary key \"%s\": ", - opnd, O2S(dictPtr)), Tcl_GetObjResult(interp)); - } else { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "key \"", TclGetString(OBJ_AT_TOS), - "\" not known in dictionary", NULL); - TRACE_WITH_OBJ(("%u => ERROR ", opnd), Tcl_GetObjResult(interp)); - } - goto gotError; + if (--codePtr->refCount <= 0) { + TclCleanupByteCode(codePtr); + } - case INST_DICT_SET: - case INST_DICT_UNSET: - case INST_DICT_INCR_IMM: - opnd = TclGetUInt4AtPtr(pc+1); - opnd2 = TclGetUInt4AtPtr(pc+5); + returnToCaller: + if (OBP) { + BP = OBP; /* back to old bc */ + rerunCallbacks: + TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); - varPtr = LOCAL(opnd2); - while (TclIsVarLink(varPtr)) { - varPtr = varPtr->value.linkPtr; - } - TRACE(("%u %u => ", opnd, opnd2)); - if (TclIsVarDirectReadable(varPtr)) { - dictPtr = varPtr->value.objPtr; - } else { - DECACHE_STACK_INFO(); - dictPtr = TclPtrGetVar(interp, varPtr, NULL,NULL,NULL, 0, opnd2); - CACHE_STACK_INFO(); - } - if (dictPtr == NULL) { - TclNewObj(dictPtr); - allocateDict = 1; + NR_DATA_DIG(); + if (TOP_CB(interp) == BP->rootPtr) { + /* + * The bytecode is returning, all callbacks were run: keep + * processing the caller. + */ + + goto nonRecursiveCallReturn; } else { - allocateDict = Tcl_IsShared(dictPtr); - if (allocateDict) { - dictPtr = Tcl_DuplicateObj(dictPtr); + TEOV_callback *callbackPtr = TOP_CB(iPtr); + int type = PTR2INT(callbackPtr->data[0]); + + NRE_ASSERT(TOP_CB(interp)->procPtr == NRCallTEBC); + NRE_ASSERT(TRESULT == TCL_OK); + + switch (type) { + case TCL_NR_BC_TYPE: + /* + * One of the callbacks requested a new execution: a tailcall! + * Start the new bytecode. + */ + + goto nonRecursiveCallSetup; + case TCL_NR_TAILCALL_TYPE: + TOP_CB(iPtr) = callbackPtr->nextPtr; + TCLNR_FREE(interp, callbackPtr); + + Tcl_SetResult(interp, + "tailcall cannot be invoked recursively", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "REENTRY", NULL); + TRESULT = TCL_ERROR; + goto rerunCallbacks; + default: + Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); } } + } - switch (*pc) { - case INST_DICT_SET: - cleanup = opnd + 1; - TRESULT = Tcl_DictObjPutKeyList(interp, dictPtr, opnd, - &OBJ_AT_DEPTH(opnd), OBJ_AT_TOS); - break; - case INST_DICT_INCR_IMM: - cleanup = 1; - opnd = TclGetInt4AtPtr(pc+1); - TRESULT = Tcl_DictObjGet(interp, dictPtr, OBJ_AT_TOS, &valuePtr); - if (TRESULT != TCL_OK) { - break; - } - if (valuePtr == NULL) { - Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS,Tcl_NewIntObj(opnd)); - } else { - value2Ptr = Tcl_NewIntObj(opnd); - Tcl_IncrRefCount(value2Ptr); - if (Tcl_IsShared(valuePtr)) { - valuePtr = Tcl_DuplicateObj(valuePtr); - Tcl_DictObjPut(NULL, dictPtr, OBJ_AT_TOS, valuePtr); - } - TRESULT = TclIncrObj(interp, valuePtr, value2Ptr); - if (TRESULT == TCL_OK) { - Tcl_InvalidateStringRep(dictPtr); - } - TclDecrRefCount(value2Ptr); + iPtr->execEnvPtr->bottomPtr = NULL; + return TRESULT; +} +#undef iPtr +#undef bcFramePtr +#undef initCatchTop +#undef initTosPtr +#undef auxObjList +#undef catchTop +#undef TCONST + +/* + *---------------------------------------------------------------------- + * + * ExecuteExtendedBinaryMathOp, ExecuteExtendedUnaryMathOp -- + * + * These functions do advanced math for binary and unary operators + * respectively, so that the main TEBC code does not bear the cost of + * them. + * + * Results: + * A Tcl_Obj* result, or a NULL (in which case valuePtr is updated to + * hold the result value), or one of the special flag values + * GENERAL_ARITHMETIC_ERROR, EXPONENT_OF_ZERO or DIVIDED_BY_ZERO. The + * latter two signify a zero value raised to a negative power or a value + * divided by zero, respectively. With GENERAL_ARITHMETIC_ERROR, all + * error information will have already been reported in the interpreter + * result. + * + * Side effects: + * May update the Tcl_Obj indicated valuePtr if it is unshared. Will + * return a NULL when that happens. + * + *---------------------------------------------------------------------- + */ + +static Tcl_Obj * +ExecuteExtendedBinaryMathOp( + Tcl_Interp *interp, /* Where to report errors. */ + int opcode, /* What operation to perform. */ + Tcl_Obj **constants, /* The execution environment's constants. */ + Tcl_Obj *valuePtr, /* The first operand on the stack. */ + Tcl_Obj *value2Ptr) /* The second operand on the stack. */ +{ +#define LONG_RESULT(l) \ + if (Tcl_IsShared(valuePtr)) { \ + TclNewLongObj(objResultPtr, l); \ + return objResultPtr; \ + } else { \ + Tcl_SetLongObj(valuePtr, l); \ + return NULL; \ + } +#define WIDE_RESULT(w) \ + if (Tcl_IsShared(valuePtr)) { \ + return Tcl_NewWideIntObj(w); \ + } else { \ + Tcl_SetWideIntObj(valuePtr, w); \ + return NULL; \ + } +#define BIG_RESULT(b) \ + if (Tcl_IsShared(valuePtr)) { \ + return Tcl_NewBignumObj(b); \ + } else { \ + Tcl_SetBignumObj(valuePtr, b); \ + return NULL; \ + } +#define DOUBLE_RESULT(d) \ + if (Tcl_IsShared(valuePtr)) { \ + TclNewDoubleObj(objResultPtr, (d)); \ + return objResultPtr; \ + } else { \ + Tcl_SetDoubleObj(valuePtr, (d)); \ + return NULL; \ + } + + int type1, type2; + ClientData ptr1, ptr2; + double d1, d2, dResult; + long l1, l2, lResult; + Tcl_WideInt w1, w2, wResult, wQuotient, wRemainder; + mp_int big1, big2, bigResult, bigRemainder; + Tcl_Obj *objResultPtr; + int invalid, numPos, zero; + long shift; + + (void) GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); + (void) GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); + + switch (opcode) { + case INST_MOD: + /* TODO: Attempts to re-use unshared operands on stack */ + + l2 = 0; /* silence gcc warning */ + if (type2 == TCL_NUMBER_LONG) { + l2 = *((const long *)ptr2); + if (l2 == 0) { + return DIVIDED_BY_ZERO; } - break; - case INST_DICT_UNSET: - cleanup = opnd; - TRESULT = Tcl_DictObjRemoveKeyList(interp, dictPtr, opnd, - &OBJ_AT_DEPTH(opnd-1)); - break; - default: - cleanup = 0; /* stop compiler warning */ - Tcl_Panic("Should not happen!"); - } + if ((l2 == 1) || (l2 == -1)) { + /* + * Div. by |1| always yields remainder of 0. + */ - if (TRESULT != TCL_OK) { - if (allocateDict) { - TclDecrRefCount(dictPtr); + return constants[0]; } - TRACE_WITH_OBJ(("%u %u => ERROR updating dictionary: ", - opnd, opnd2), Tcl_GetObjResult(interp)); - goto gotError; } +#ifndef NO_WIDE_TYPE + if (type1 == TCL_NUMBER_WIDE) { + w1 = *((const Tcl_WideInt *)ptr1); + if (type2 != TCL_NUMBER_BIG) { + Tcl_GetWideIntFromObj(NULL, value2Ptr, &w2); + wQuotient = w1 / w2; - if (TclIsVarDirectWritable(varPtr)) { - if (allocateDict) { - value2Ptr = varPtr->value.objPtr; - Tcl_IncrRefCount(dictPtr); - if (value2Ptr != NULL) { - TclDecrRefCount(value2Ptr); + /* + * Force Tcl's integer division rules. + * TODO: examine for logic simplification + */ + + if (((wQuotient < (Tcl_WideInt) 0) + || ((wQuotient == (Tcl_WideInt) 0) + && ((w1 < (Tcl_WideInt)0 && w2 > (Tcl_WideInt)0) + || (w1 > (Tcl_WideInt)0 && w2 < (Tcl_WideInt)0)))) + && (wQuotient * w2 != w1)) { + wQuotient -= (Tcl_WideInt) 1; } - varPtr->value.objPtr = dictPtr; - } - objResultPtr = dictPtr; - } else { - Tcl_IncrRefCount(dictPtr); - DECACHE_STACK_INFO(); - objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, - dictPtr, TCL_LEAVE_ERR_MSG, opnd2); - CACHE_STACK_INFO(); - TclDecrRefCount(dictPtr); - if (objResultPtr == NULL) { - TRACE_APPEND(("ERROR: %.30s\n", - O2S(Tcl_GetObjResult(interp)))); - goto gotError; + wRemainder = w1 - w2*wQuotient; + WIDE_RESULT(wRemainder); } - } -#ifndef TCL_COMPILE_DEBUG - if (*(pc+9) == INST_POP) { - NEXT_INST_V(10, cleanup, 0); - } -#endif - TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); - NEXT_INST_V(9, cleanup, 1); - case INST_DICT_APPEND: - case INST_DICT_LAPPEND: - opnd = TclGetUInt4AtPtr(pc+1); + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - varPtr = LOCAL(opnd); - while (TclIsVarLink(varPtr)) { - varPtr = varPtr->value.linkPtr; - } - TRACE(("%u => ", opnd)); - if (TclIsVarDirectReadable(varPtr)) { - dictPtr = varPtr->value.objPtr; - } else { - DECACHE_STACK_INFO(); - dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, 0, opnd); - CACHE_STACK_INFO(); - } - if (dictPtr == NULL) { - TclNewObj(dictPtr); - allocateDict = 1; - } else { - allocateDict = Tcl_IsShared(dictPtr); - if (allocateDict) { - dictPtr = Tcl_DuplicateObj(dictPtr); + /* TODO: internals intrusion */ + if ((w1 > ((Tcl_WideInt) 0)) ^ (big2.sign == MP_ZPOS)) { + /* + * Arguments are opposite sign; remainder is sum. + */ + + TclBNInitBignumFromWideInt(&big1, w1); + mp_add(&big2, &big1, &big2); + mp_clear(&big1); + BIG_RESULT(&big2); } + + /* + * Arguments are same sign; remainder is first operand. + */ + + mp_clear(&big2); + return NULL; } +#endif + Tcl_GetBignumFromObj(NULL, valuePtr, &big1); + Tcl_GetBignumFromObj(NULL, value2Ptr, &big2); + mp_init(&bigResult); + mp_init(&bigRemainder); + mp_div(&big1, &big2, &bigResult, &bigRemainder); + if (!mp_iszero(&bigRemainder) && (bigRemainder.sign != big2.sign)) { + /* + * Convert to Tcl's integer division rules. + */ - if (Tcl_DictObjGet(interp, dictPtr, OBJ_UNDER_TOS, - &valuePtr) != TCL_OK) { - if (allocateDict) { - TclDecrRefCount(dictPtr); - } - goto gotError; + mp_sub_d(&bigResult, 1, &bigResult); + mp_add(&bigRemainder, &big2, &bigRemainder); } + mp_copy(&bigRemainder, &bigResult); + mp_clear(&bigRemainder); + mp_clear(&big1); + mp_clear(&big2); + BIG_RESULT(&bigResult); + case INST_LSHIFT: + case INST_RSHIFT: { /* - * Note that a non-existent key results in a NULL valuePtr, which is a - * case handled separately below. What we *can* say at this point is - * that the write-back will always succeed. + * Reject negative shift argument. */ - switch (*pc) { - case INST_DICT_APPEND: - if (valuePtr == NULL) { - Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, OBJ_AT_TOS); - } else { - if (Tcl_IsShared(valuePtr)) { - valuePtr = Tcl_DuplicateObj(valuePtr); - } - Tcl_AppendObjToObj(valuePtr, OBJ_AT_TOS); - Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); - } + switch (type2) { + case TCL_NUMBER_LONG: + invalid = (*((const long *)ptr2) < 0L); break; - case INST_DICT_LAPPEND: - /* - * More complex because list-append can fail. - */ - - if (valuePtr == NULL) { - valuePtr = Tcl_NewListObj(1, &OBJ_AT_TOS); - Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); - } else if (Tcl_IsShared(valuePtr)) { - valuePtr = Tcl_DuplicateObj(valuePtr); - if (Tcl_ListObjAppendElement(interp, valuePtr, - OBJ_AT_TOS) != TCL_OK) { - TclDecrRefCount(valuePtr); - if (allocateDict) { - TclDecrRefCount(dictPtr); - } - goto gotError; - } - Tcl_DictObjPut(NULL, dictPtr, OBJ_UNDER_TOS, valuePtr); - } else { - if (Tcl_ListObjAppendElement(interp, valuePtr, - OBJ_AT_TOS) != TCL_OK) { - if (allocateDict) { - TclDecrRefCount(dictPtr); - } - goto gotError; - } - } +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: + invalid = (*((const Tcl_WideInt *)ptr2) < (Tcl_WideInt)0); + break; +#endif + case TCL_NUMBER_BIG: + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + invalid = (mp_cmp_d(&big2, 0) == MP_LT); + mp_clear(&big2); break; default: - Tcl_Panic("Should not happen!"); + /* Unused, here to silence compiler warning */ + invalid = 0; + } + if (invalid) { + Tcl_SetResult(interp, "negative shift argument", TCL_STATIC); + return GENERAL_ARITHMETIC_ERROR; } - if (TclIsVarDirectWritable(varPtr)) { - if (allocateDict) { - value2Ptr = varPtr->value.objPtr; - Tcl_IncrRefCount(dictPtr); - if (value2Ptr != NULL) { - TclDecrRefCount(value2Ptr); + /* + * Zero shifted any number of bits is still zero. + */ + + if ((type1==TCL_NUMBER_LONG) && (*((const long *)ptr1) == (long)0)) { + return constants[0]; + } + + if (opcode == INST_LSHIFT) { + /* + * Large left shifts create integer overflow. + * + * BEWARE! Can't use Tcl_GetIntFromObj() here because that + * converts values in the (unsigned) range to their signed int + * counterparts, leading to incorrect results. + */ + + if ((type2 != TCL_NUMBER_LONG) + || (*((const long *)ptr2) > (long) INT_MAX)) { + /* + * Technically, we could hold the value (1 << (INT_MAX+1)) in + * an mp_int, but since we're using mp_mul_2d() to do the + * work, and it takes only an int argument, that's a good + * place to draw the line. + */ + + Tcl_SetResult(interp, "integer value too large to represent", + TCL_STATIC); + return GENERAL_ARITHMETIC_ERROR; + } + shift = (int)(*((const long *)ptr2)); + + /* + * Handle shifts within the native wide range. + */ + + if ((type1 != TCL_NUMBER_BIG) + && ((size_t)shift < CHAR_BIT*sizeof(Tcl_WideInt))) { + TclGetWideIntFromObj(NULL, valuePtr, &w1); + if (!((w1>0 ? w1 : ~w1) + & -(((Tcl_WideInt)1) + << (CHAR_BIT*sizeof(Tcl_WideInt) - 1 - shift)))) { + WIDE_RESULT(w1 << shift); } - varPtr->value.objPtr = dictPtr; } - objResultPtr = dictPtr; } else { - Tcl_IncrRefCount(dictPtr); - DECACHE_STACK_INFO(); - objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, - dictPtr, TCL_LEAVE_ERR_MSG, opnd); - CACHE_STACK_INFO(); - TclDecrRefCount(dictPtr); - if (objResultPtr == NULL) { - TRACE_APPEND(("ERROR: %.30s\n", - O2S(Tcl_GetObjResult(interp)))); - goto gotError; - } - } -#ifndef TCL_COMPILE_DEBUG - if (*(pc+5) == INST_POP) { - NEXT_INST_F(6, 2, 0); - } + /* + * Quickly force large right shifts to 0 or -1. + */ + + if ((type2 != TCL_NUMBER_LONG) + || (*(const long *)ptr2 > INT_MAX)) { + /* + * Again, technically, the value to be shifted could be an + * mp_int so huge that a right shift by (INT_MAX+1) bits could + * not take us to the result of 0 or -1, but since we're using + * mp_div_2d to do the work, and it takes only an int + * argument, we draw the line there. + */ + + switch (type1) { + case TCL_NUMBER_LONG: + zero = (*(const long *)ptr1 > 0L); + break; +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: + zero = (*(const Tcl_WideInt *)ptr1 > (Tcl_WideInt)0); + break; #endif - TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); - NEXT_INST_F(5, 2, 1); + case TCL_NUMBER_BIG: + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); + zero = (mp_cmp_d(&big1, 0) == MP_GT); + mp_clear(&big1); + break; + default: + /* Unused, here to silence compiler warning. */ + zero = 0; + } + if (zero) { + return constants[0]; + } + LONG_RESULT(-1); + } + shift = (int)(*(const long *)ptr2); - case INST_DICT_FIRST: - opnd = TclGetUInt4AtPtr(pc+1); - TRACE(("%u => ", opnd)); - dictPtr = POP_OBJECT(); - searchPtr = (Tcl_DictSearch *) ckalloc(sizeof(Tcl_DictSearch)); - if (Tcl_DictObjFirst(interp, dictPtr, searchPtr, &keyPtr, &valuePtr, - &done) != TCL_OK) { - ckfree((char *) searchPtr); - goto gotError; - } - TclNewObj(statePtr); - statePtr->typePtr = &dictIteratorType; - statePtr->internalRep.twoPtrValue.ptr1 = searchPtr; - statePtr->internalRep.twoPtrValue.ptr2 = dictPtr; - varPtr = LOCAL(opnd); - if (varPtr->value.objPtr) { - if (varPtr->value.objPtr->typePtr == &dictIteratorType) { - Tcl_Panic("mis-issued dictFirst!"); +#ifndef NO_WIDE_TYPE + /* + * Handle shifts within the native wide range. + */ + + if (type1 == TCL_NUMBER_WIDE) { + w1 = *(const Tcl_WideInt *)ptr1; + if ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideInt)) { + if (w1 >= (Tcl_WideInt)0) { + return constants[0]; + } + LONG_RESULT(-1); + } + WIDE_RESULT(w1 >> shift); } - TclDecrRefCount(varPtr->value.objPtr); +#endif } - varPtr->value.objPtr = statePtr; - Tcl_IncrRefCount(statePtr); - goto pushDictIteratorResult; - case INST_DICT_NEXT: - opnd = TclGetUInt4AtPtr(pc+1); - TRACE(("%u => ", opnd)); - statePtr = (*LOCAL(opnd)).value.objPtr; - if (statePtr == NULL || statePtr->typePtr != &dictIteratorType) { - Tcl_Panic("mis-issued dictNext!"); - } - searchPtr = statePtr->internalRep.twoPtrValue.ptr1; - Tcl_DictObjNext(searchPtr, &keyPtr, &valuePtr, &done); - pushDictIteratorResult: - if (done) { - TclNewObj(emptyPtr); - PUSH_OBJECT(emptyPtr); - PUSH_OBJECT(emptyPtr); + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); + + mp_init(&bigResult); + if (opcode == INST_LSHIFT) { + mp_mul_2d(&big1, shift, &bigResult); } else { - PUSH_OBJECT(valuePtr); - PUSH_OBJECT(keyPtr); - } - TRACE_APPEND(("\"%.30s\" \"%.30s\" %d", - O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), done)); - objResultPtr = TCONST(done); - /* TODO: consider opt like INST_FOREACH_STEP4 */ - NEXT_INST_F(5, 0, 1); + mp_init(&bigRemainder); + mp_div_2d(&big1, shift, &bigResult, &bigRemainder); + if (mp_cmp_d(&bigRemainder, 0) == MP_LT) { + /* + * Convert to Tcl's integer division rules. + */ - case INST_DICT_DONE: - opnd = TclGetUInt4AtPtr(pc+1); - TRACE(("%u => ", opnd)); - statePtr = (*LOCAL(opnd)).value.objPtr; - if (statePtr == NULL) { - Tcl_Panic("mis-issued dictDone!"); + mp_sub_d(&bigResult, 1, &bigResult); + } + mp_clear(&bigRemainder); } + mp_clear(&big1); + BIG_RESULT(&bigResult); + } + + case INST_BITOR: + case INST_BITXOR: + case INST_BITAND: + if ((type1 == TCL_NUMBER_BIG) || (type2 == TCL_NUMBER_BIG)) { + mp_int *First, *Second; + + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - if (statePtr->typePtr == &dictIteratorType) { /* - * First kill the search, and then release the reference to the - * dictionary that we were holding. + * Count how many positive arguments we have. If only one of the + * arguments is negative, store it in 'Second'. */ - searchPtr = statePtr->internalRep.twoPtrValue.ptr1; - Tcl_DictObjDone(searchPtr); - ckfree((char *) searchPtr); + if (mp_cmp_d(&big1, 0) != MP_LT) { + numPos = 1 + (mp_cmp_d(&big2, 0) != MP_LT); + First = &big1; + Second = &big2; + } else { + First = &big2; + Second = &big1; + numPos = (mp_cmp_d(First, 0) != MP_LT); + } + mp_init(&bigResult); - dictPtr = statePtr->internalRep.twoPtrValue.ptr2; - TclDecrRefCount(dictPtr); + switch (opcode) { + case INST_BITAND: + switch (numPos) { + case 2: + /* + * Both arguments positive, base case. + */ - /* - * Set the internal variable to an empty object to signify that we - * don't hold an iterator. - */ + mp_and(First, Second, &bigResult); + break; + case 1: + /* + * First is positive; second negative: + * P & N = P & ~~N = P&~(-N-1) = P & (P ^ (-N-1)) + */ - TclDecrRefCount(statePtr); - TclNewObj(emptyPtr); - (*LOCAL(opnd)).value.objPtr = emptyPtr; - Tcl_IncrRefCount(emptyPtr); - } - NEXT_INST_F(5, 0, 0); + mp_neg(Second, Second); + mp_sub_d(Second, 1, Second); + mp_xor(First, Second, &bigResult); + mp_and(First, &bigResult, &bigResult); + break; + case 0: + /* + * Both arguments negative: + * a & b = ~ (~a | ~b) = -(-a-1|-b-1)-1 + */ - case INST_DICT_UPDATE_START: - opnd = TclGetUInt4AtPtr(pc+1); - opnd2 = TclGetUInt4AtPtr(pc+5); - varPtr = LOCAL(opnd); - duiPtr = codePtr->auxDataArrayPtr[opnd2].clientData; - while (TclIsVarLink(varPtr)) { - varPtr = varPtr->value.linkPtr; - } - TRACE(("%u => ", opnd)); - if (TclIsVarDirectReadable(varPtr)) { - dictPtr = varPtr->value.objPtr; - } else { - DECACHE_STACK_INFO(); - dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, - TCL_LEAVE_ERR_MSG, opnd); - CACHE_STACK_INFO(); - if (dictPtr == NULL) { - goto gotError; + mp_neg(First, First); + mp_sub_d(First, 1, First); + mp_neg(Second, Second); + mp_sub_d(Second, 1, Second); + mp_or(First, Second, &bigResult); + mp_neg(&bigResult, &bigResult); + mp_sub_d(&bigResult, 1, &bigResult); + break; + } + break; + + case INST_BITOR: + switch (numPos) { + case 2: + /* + * Both arguments positive, base case. + */ + + mp_or(First, Second, &bigResult); + break; + case 1: + /* + * First is positive; second negative: + * N|P = ~(~N&~P) = ~((-N-1)&~P) = -((-N-1)&((-N-1)^P))-1 + */ + + mp_neg(Second, Second); + mp_sub_d(Second, 1, Second); + mp_xor(First, Second, &bigResult); + mp_and(Second, &bigResult, &bigResult); + mp_neg(&bigResult, &bigResult); + mp_sub_d(&bigResult, 1, &bigResult); + break; + case 0: + /* + * Both arguments negative: + * a | b = ~ (~a & ~b) = -(-a-1&-b-1)-1 + */ + + mp_neg(First, First); + mp_sub_d(First, 1, First); + mp_neg(Second, Second); + mp_sub_d(Second, 1, Second); + mp_and(First, Second, &bigResult); + mp_neg(&bigResult, &bigResult); + mp_sub_d(&bigResult, 1, &bigResult); + break; + } + break; + + case INST_BITXOR: + switch (numPos) { + case 2: + /* + * Both arguments positive, base case. + */ + + mp_xor(First, Second, &bigResult); + break; + case 1: + /* + * First is positive; second negative: + * P^N = ~(P^~N) = -(P^(-N-1))-1 + */ + + mp_neg(Second, Second); + mp_sub_d(Second, 1, Second); + mp_xor(First, Second, &bigResult); + mp_neg(&bigResult, &bigResult); + mp_sub_d(&bigResult, 1, &bigResult); + break; + case 0: + /* + * Both arguments negative: + * a ^ b = (~a ^ ~b) = (-a-1^-b-1) + */ + + mp_neg(First, First); + mp_sub_d(First, 1, First); + mp_neg(Second, Second); + mp_sub_d(Second, 1, Second); + mp_xor(First, Second, &bigResult); + break; + } + break; } + + mp_clear(&big1); + mp_clear(&big2); + BIG_RESULT(&bigResult); } - if (TclListObjGetElements(interp, OBJ_AT_TOS, &length, - &keyPtrPtr) != TCL_OK) { - goto gotError; - } - if (length != duiPtr->length) { - Tcl_Panic("dictUpdateStart argument length mismatch"); - } - for (i=0 ; ivarIndices[i]); - while (TclIsVarLink(varPtr)) { - varPtr = varPtr->value.linkPtr; - } - DECACHE_STACK_INFO(); - if (valuePtr == NULL) { - TclObjUnsetVar2(interp, - localName(iPtr->varFramePtr, duiPtr->varIndices[i]), - NULL, 0); - } else if (TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, - valuePtr, TCL_LEAVE_ERR_MSG, - duiPtr->varIndices[i]) == NULL) { - CACHE_STACK_INFO(); - goto gotError; + +#ifndef NO_WIDE_TYPE + if ((type1 == TCL_NUMBER_WIDE) || (type2 == TCL_NUMBER_WIDE)) { + TclGetWideIntFromObj(NULL, valuePtr, &w1); + TclGetWideIntFromObj(NULL, value2Ptr, &w2); + + switch (opcode) { + case INST_BITAND: + wResult = w1 & w2; + break; + case INST_BITOR: + wResult = w1 | w2; + break; + case INST_BITXOR: + wResult = w1 ^ w2; + break; + default: + /* Unused, here to silence compiler warning. */ + wResult = 0; } - CACHE_STACK_INFO(); + WIDE_RESULT(wResult); } - NEXT_INST_F(9, 0, 0); +#endif + l1 = *((const long *)ptr1); + l2 = *((const long *)ptr2); - case INST_DICT_UPDATE_END: - opnd = TclGetUInt4AtPtr(pc+1); - opnd2 = TclGetUInt4AtPtr(pc+5); - varPtr = LOCAL(opnd); - duiPtr = codePtr->auxDataArrayPtr[opnd2].clientData; - while (TclIsVarLink(varPtr)) { - varPtr = varPtr->value.linkPtr; - } - TRACE(("%u => ", opnd)); - if (TclIsVarDirectReadable(varPtr)) { - dictPtr = varPtr->value.objPtr; - } else { - DECACHE_STACK_INFO(); - dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, 0, opnd); - CACHE_STACK_INFO(); - } - if (dictPtr == NULL) { - NEXT_INST_F(9, 1, 0); - } - if (Tcl_DictObjSize(interp, dictPtr, &length) != TCL_OK - || TclListObjGetElements(interp, OBJ_AT_TOS, &length, - &keyPtrPtr) != TCL_OK) { - goto gotError; - } - allocdict = Tcl_IsShared(dictPtr); - if (allocdict) { - dictPtr = Tcl_DuplicateObj(dictPtr); + switch (opcode) { + case INST_BITAND: + lResult = l1 & l2; + break; + case INST_BITOR: + lResult = l1 | l2; + break; + case INST_BITXOR: + lResult = l1 ^ l2; + break; + default: + /* Unused, here to silence compiler warning. */ + lResult = 0; } - for (i=0 ; ivarIndices[i]); + LONG_RESULT(lResult); - while (TclIsVarLink(var2Ptr)) { - var2Ptr = var2Ptr->value.linkPtr; - } - if (TclIsVarDirectReadable(var2Ptr)) { - valuePtr = var2Ptr->value.objPtr; - } else { - DECACHE_STACK_INFO(); - valuePtr = TclPtrGetVar(interp, var2Ptr, NULL, NULL, NULL, 0, - duiPtr->varIndices[i]); - CACHE_STACK_INFO(); - } - if (valuePtr == NULL) { - Tcl_DictObjRemove(interp, dictPtr, keyPtrPtr[i]); - } else if (dictPtr == valuePtr) { - Tcl_DictObjPut(interp, dictPtr, keyPtrPtr[i], - Tcl_DuplicateObj(valuePtr)); - } else { - Tcl_DictObjPut(interp, dictPtr, keyPtrPtr[i], valuePtr); + case INST_EXPON: { + int oddExponent = 0, negativeExponent = 0; + unsigned short base; + + if ((type1 == TCL_NUMBER_DOUBLE) || (type2 == TCL_NUMBER_DOUBLE)) { + Tcl_GetDoubleFromObj(NULL, valuePtr, &d1); + Tcl_GetDoubleFromObj(NULL, value2Ptr, &d2); + + if (d1==0.0 && d2<0.0) { + return EXPONENT_OF_ZERO; } + dResult = pow(d1, d2); + goto doubleResult; } - if (TclIsVarDirectWritable(varPtr)) { - Tcl_IncrRefCount(dictPtr); - TclDecrRefCount(varPtr->value.objPtr); - varPtr->value.objPtr = dictPtr; - } else { - DECACHE_STACK_INFO(); - objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL, - dictPtr, TCL_LEAVE_ERR_MSG, opnd); - CACHE_STACK_INFO(); - if (objResultPtr == NULL) { - if (allocdict) { - TclDecrRefCount(dictPtr); - } - goto gotError; + l1 = l2 = 0; + if (type2 == TCL_NUMBER_LONG) { + l2 = *((const long *) ptr2); + if (l2 == 0) { + /* + * Anything to the zero power is 1. + */ + + return constants[1]; + } else if (l2 == 1) { + /* + * Anything to the first power is itself + */ + + return NULL; } } - NEXT_INST_F(9, 1, 0); - } - /* - * End of dictionary-related instructions. - * ----------------------------------------------------------------- - */ + switch (type2) { + case TCL_NUMBER_LONG: + negativeExponent = (l2 < 0); + oddExponent = (int) (l2 & 1); + break; +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: + w2 = *((const Tcl_WideInt *)ptr2); + negativeExponent = (w2 < 0); + oddExponent = (int) (w2 & (Tcl_WideInt)1); + break; +#endif + case TCL_NUMBER_BIG: + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + negativeExponent = (mp_cmp_d(&big2, 0) == MP_LT); + mp_mod_2d(&big2, 1, &big2); + oddExponent = !mp_iszero(&big2); + mp_clear(&big2); + break; + } - default: - Tcl_Panic("TclExecuteByteCode: unrecognized opCode %u", *pc); - } /* end of switch on opCode */ + if (type1 == TCL_NUMBER_LONG) { + l1 = *((const long *)ptr1); + } + if (negativeExponent) { + if (type1 == TCL_NUMBER_LONG) { + switch (l1) { + case 0: + /* + * Zero to a negative power is div by zero error. + */ - /* - * Division by zero in an expression. Control only reaches this point by - * "goto divideByZero". - */ + return EXPONENT_OF_ZERO; + case -1: + if (oddExponent) { + LONG_RESULT(-1); + } + /* fallthrough */ + case 1: + /* + * 1 to any power is 1. + */ - divideByZero: - Tcl_SetResult(interp, "divide by zero", TCL_STATIC); - Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", NULL); - goto gotError; + return constants[1]; + } + } - /* - * Exponentiation of zero by negative number in an expression. Control - * only reaches this point by "goto exponOfZero". - */ + /* + * Integers with magnitude greater than 1 raise to a negative + * power yield the answer zero (see TIP 123). + */ - exponOfZero: - Tcl_SetResult(interp, "exponentiation of zero by negative power", - TCL_STATIC); - Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", - "exponentiation of zero by negative power", NULL); - goto gotError; + return constants[0]; + } - /* - * Block for variables needed to process exception returns. - */ + if (type1 == TCL_NUMBER_LONG) { + switch (l1) { + case 0: + /* + * Zero to a positive power is zero. + */ - { - ExceptionRange *rangePtr; - /* Points to closest loop or catch exception - * range enclosing the pc. Used by various - * instructions and processCatch to process - * break, continue, and errors. */ - const char *bytes; + return constants[0]; + case 1: + /* + * 1 to any power is 1. + */ + + return constants[1]; + case -1: + if (!oddExponent) { + return constants[1]; + } + LONG_RESULT(-1); + } + } /* - * An external evaluation (INST_INVOKE or INST_EVAL) returned - * something different from TCL_OK, or else INST_BREAK or - * INST_CONTINUE were called. + * We refuse to accept exponent arguments that exceed one mp_digit + * which means the max exponent value is 2**28-1 = 0x0fffffff = + * 268435455, which fits into a signed 32 bit int which is within the + * range of the long int type. This means any numeric Tcl_Obj value + * not using TCL_NUMBER_LONG type must hold a value larger than we + * accept. */ - processExceptionReturn: -#if TCL_COMPILE_DEBUG - switch (*pc) { - case INST_INVOKE_STK1: - opnd = TclGetUInt1AtPtr(pc+1); - TRACE(("%u => ... after \"%.20s\": ", opnd, cmdNameBuf)); - break; - case INST_INVOKE_STK4: - opnd = TclGetUInt4AtPtr(pc+1); - TRACE(("%u => ... after \"%.20s\": ", opnd, cmdNameBuf)); - break; - case INST_EVAL_STK: - /* - * Note that the object at stacktop has to be used before doing - * the cleanup. - */ - - TRACE(("\"%.30s\" => ", O2S(OBJ_AT_TOS))); - break; - default: - TRACE(("=> ")); + if (type2 != TCL_NUMBER_LONG) { + Tcl_SetResult(interp, "exponent too large", TCL_STATIC); + return GENERAL_ARITHMETIC_ERROR; } + + if (type1 == TCL_NUMBER_LONG) { + if (l1 == 2) { + /* + * Reduce small powers of 2 to shifts. + */ + + if ((unsigned long) l2 < CHAR_BIT * sizeof(long) - 1) { + LONG_RESULT(1L << l2); + } +#if !defined(TCL_WIDE_INT_IS_LONG) + if ((unsigned long)l2 < CHAR_BIT*sizeof(Tcl_WideInt) - 1) { + WIDE_RESULT(((Tcl_WideInt) 1) << l2); + } #endif - if ((TRESULT == TCL_CONTINUE) || (TRESULT == TCL_BREAK)) { - rangePtr = GetExceptRangeForPc(pc, /*catchOnly*/ 0, codePtr); - if (rangePtr == NULL) { - TRACE_APPEND(("no encl. loop or catch, returning %s\n", - StringForResultCode(TRESULT))); - goto abnormalReturn; + goto overflowExpon; } - if (rangePtr->type == CATCH_EXCEPTION_RANGE) { - TRACE_APPEND(("%s ...\n", StringForResultCode(TRESULT))); - goto processCatch; + if (l1 == -2) { + int signum = oddExponent ? -1 : 1; + + /* + * Reduce small powers of 2 to shifts. + */ + + if ((unsigned long) l2 < CHAR_BIT * sizeof(long) - 1) { + LONG_RESULT(signum * (1L << l2)); + } +#if !defined(TCL_WIDE_INT_IS_LONG) + if ((unsigned long)l2 < CHAR_BIT*sizeof(Tcl_WideInt) - 1){ + WIDE_RESULT(signum * (((Tcl_WideInt) 1) << l2)); + } +#endif + goto overflowExpon; } - while (cleanup--) { - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); +#if (LONG_MAX == 0x7fffffff) + if (l2 - 2 < (long)MaxBase32Size + && l1 <= MaxBase32[l2 - 2] + && l1 >= -MaxBase32[l2 - 2]) { + /* + * Small powers of 32-bit integers. + */ + + lResult = l1 * l1; /* b**2 */ + switch (l2) { + case 2: + break; + case 3: + lResult *= l1; /* b**3 */ + break; + case 4: + lResult *= lResult; /* b**4 */ + break; + case 5: + lResult *= lResult; /* b**4 */ + lResult *= l1; /* b**5 */ + break; + case 6: + lResult *= l1; /* b**3 */ + lResult *= lResult; /* b**6 */ + break; + case 7: + lResult *= l1; /* b**3 */ + lResult *= lResult; /* b**6 */ + lResult *= l1; /* b**7 */ + break; + case 8: + lResult *= lResult; /* b**4 */ + lResult *= lResult; /* b**8 */ + break; + } + LONG_RESULT(lResult); } - if (TRESULT == TCL_BREAK) { - TRESULT = TCL_OK; - pc = (codePtr->codeStart + rangePtr->breakOffset); - TRACE_APPEND(("%s, range at %d, new pc %d\n", - StringForResultCode(TRESULT), - rangePtr->codeOffset, rangePtr->breakOffset)); - NEXT_INST_F(0, 0, 0); - } else if (rangePtr->continueOffset == -1) { - TRACE_APPEND(( - "%s, loop w/o continue, checking for catch\n", - StringForResultCode(TRESULT))); - goto checkForCatch; + + if (l1 - 3 >= 0 && l1 -2 < (long)Exp32IndexSize + && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { + base = Exp32Index[l1 - 3] + + (unsigned short) (l2 - 2 - MaxBase32Size); + if (base < Exp32Index[l1 - 2]) { + /* + * 32-bit number raised to intermediate power, done by + * table lookup. + */ + + LONG_RESULT(Exp32Value[base]); + } } + if (-l1 - 3 >= 0 && -l1 - 2 < (long)Exp32IndexSize + && l2 - 2 < (long)(Exp32ValueSize + MaxBase32Size)) { + base = Exp32Index[-l1 - 3] + + (unsigned short) (l2 - 2 - MaxBase32Size); + if (base < Exp32Index[-l1 - 2]) { + /* + * 32-bit number raised to intermediate power, done by + * table lookup. + */ - TRESULT = TCL_OK; - pc = (codePtr->codeStart + rangePtr->continueOffset); - TRACE_APPEND(("%s, range at %d, new pc %d\n", - StringForResultCode(TRESULT), - rangePtr->codeOffset, rangePtr->continueOffset)); - NEXT_INST_F(0, 0, 0); - } -#if TCL_COMPILE_DEBUG - if (traceInstructions) { - objPtr = Tcl_GetObjResult(interp); - if ((TRESULT != TCL_ERROR) && (TRESULT != TCL_RETURN)) { - TRACE_APPEND(("OTHER RETURN CODE %d, result= \"%s\"\n ", - TRESULT, O2S(objPtr))); - } else { - TRACE_APPEND(("%s, result= \"%s\"\n", - StringForResultCode(TRESULT), O2S(objPtr))); + lResult = (oddExponent) ? + -Exp32Value[base] : Exp32Value[base]; + LONG_RESULT(lResult); + } } +#endif } +#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG) + if (type1 == TCL_NUMBER_LONG) { + w1 = l1; +#ifndef NO_WIDE_TYPE + } else if (type1 == TCL_NUMBER_WIDE) { + w1 = *((const Tcl_WideInt *) ptr1); #endif - goto checkForCatch; - - /* - * Execution has generated an "exception" such as TCL_ERROR. If the - * exception is an error, record information about what was being - * executed when the error occurred. Find the closest enclosing catch - * range, if any. If no enclosing catch range is found, stop execution - * and return the "exception" code. - */ - - gotError: - TRESULT = TCL_ERROR; - checkForCatch: - if (iPtr->execEnvPtr->rewind) { - goto abnormalReturn; + } else { + goto overflowExpon; } - if ((TRESULT == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { - bytes = GetSrcInfoForPc(pc, codePtr, &length); - if (bytes != NULL) { - DECACHE_STACK_INFO(); - Tcl_LogCommandInfo(interp, codePtr->source, bytes, length); - CACHE_STACK_INFO(); + if (l2 - 2 < (long)MaxBase64Size + && w1 <= MaxBase64[l2 - 2] + && w1 >= -MaxBase64[l2 - 2]) { + /* + * Small powers of integers whose result is wide. + */ + + wResult = w1 * w1; /* b**2 */ + switch (l2) { + case 2: + break; + case 3: + wResult *= l1; /* b**3 */ + break; + case 4: + wResult *= wResult; /* b**4 */ + break; + case 5: + wResult *= wResult; /* b**4 */ + wResult *= w1; /* b**5 */ + break; + case 6: + wResult *= w1; /* b**3 */ + wResult *= wResult; /* b**6 */ + break; + case 7: + wResult *= w1; /* b**3 */ + wResult *= wResult; /* b**6 */ + wResult *= w1; /* b**7 */ + break; + case 8: + wResult *= wResult; /* b**4 */ + wResult *= wResult; /* b**8 */ + break; + case 9: + wResult *= wResult; /* b**4 */ + wResult *= wResult; /* b**8 */ + wResult *= w1; /* b**9 */ + break; + case 10: + wResult *= wResult; /* b**4 */ + wResult *= w1; /* b**5 */ + wResult *= wResult; /* b**10 */ + break; + case 11: + wResult *= wResult; /* b**4 */ + wResult *= w1; /* b**5 */ + wResult *= wResult; /* b**10 */ + wResult *= w1; /* b**11 */ + break; + case 12: + wResult *= w1; /* b**3 */ + wResult *= wResult; /* b**6 */ + wResult *= wResult; /* b**12 */ + break; + case 13: + wResult *= w1; /* b**3 */ + wResult *= wResult; /* b**6 */ + wResult *= wResult; /* b**12 */ + wResult *= w1; /* b**13 */ + break; + case 14: + wResult *= w1; /* b**3 */ + wResult *= wResult; /* b**6 */ + wResult *= w1; /* b**7 */ + wResult *= wResult; /* b**14 */ + break; + case 15: + wResult *= w1; /* b**3 */ + wResult *= wResult; /* b**6 */ + wResult *= w1; /* b**7 */ + wResult *= wResult; /* b**14 */ + wResult *= w1; /* b**15 */ + break; + case 16: + wResult *= wResult; /* b**4 */ + wResult *= wResult; /* b**8 */ + wResult *= wResult; /* b**16 */ + break; } + WIDE_RESULT(wResult); } - iPtr->flags &= ~ERR_ALREADY_LOGGED; /* - * Clear all expansions that may have started after the last - * INST_BEGIN_CATCH. + * Handle cases of powers > 16 that still fit in a 64-bit word by + * doing table lookup. */ - while (auxObjList) { - if ((catchTop != initCatchTop) && (*catchTop > - (ptrdiff_t) auxObjList->internalRep.twoPtrValue.ptr1)) { - break; + if (w1 - 3 >= 0 && w1 - 2 < (long)Exp64IndexSize + && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { + base = Exp64Index[w1 - 3] + + (unsigned short) (l2 - 2 - MaxBase64Size); + if (base < Exp64Index[w1 - 2]) { + /* + * 64-bit number raised to intermediate power, done by + * table lookup. + */ + + WIDE_RESULT(Exp64Value[base]); } - POP_TAUX_OBJ(); } - /* - * We must not catch if the script in progress has been canceled with - * the TCL_CANCEL_UNWIND flag. Instead, it blows outwards until we - * either hit another interpreter (presumably where the script in - * progress has not been canceled) or we get to the top-level. We do - * NOT modify the interpreter result here because we know it will - * already be set prior to vectoring down to this point in the code. - */ + if (-w1 - 3 >= 0 && -w1 - 2 < (long)Exp64IndexSize + && l2 - 2 < (long)(Exp64ValueSize + MaxBase64Size)) { + base = Exp64Index[-w1 - 3] + + (unsigned short) (l2 - 2 - MaxBase64Size); + if (base < Exp64Index[-w1 - 2]) { + /* + * 64-bit number raised to intermediate power, done by + * table lookup. + */ - if (Tcl_Canceled(interp, 0) == TCL_ERROR) { -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " ... cancel with unwind, returning %s\n", - StringForResultCode(TRESULT)); + wResult = oddExponent ? -Exp64Value[base] : Exp64Value[base]; + WIDE_RESULT(wResult); } + } #endif - goto abnormalReturn; + + overflowExpon: + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + if (big2.used > 1) { + mp_clear(&big2); + Tcl_SetResult(interp, "exponent too large", TCL_STATIC); + return GENERAL_ARITHMETIC_ERROR; } + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); + mp_init(&bigResult); + mp_expt_d(&big1, big2.dp[0], &bigResult); + mp_clear(&big1); + mp_clear(&big2); + BIG_RESULT(&bigResult); + } - /* - * We must not catch an exceeded limit. Instead, it blows outwards - * until we either hit another interpreter (presumably where the limit - * is not exceeded) or we get to the top-level. - */ + case INST_ADD: + case INST_SUB: + case INST_MULT: + case INST_DIV: + if ((type1 == TCL_NUMBER_DOUBLE) || (type2 == TCL_NUMBER_DOUBLE)) { + /* + * At least one of the values is floating-point, so perform + * floating point calculations. + */ - if (TclLimitExceeded(iPtr->limit)) { -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " ... limit exceeded, returning %s\n", - StringForResultCode(TRESULT)); - } + Tcl_GetDoubleFromObj(NULL, valuePtr, &d1); + Tcl_GetDoubleFromObj(NULL, value2Ptr, &d2); + + switch (opcode) { + case INST_ADD: + dResult = d1 + d2; + break; + case INST_SUB: + dResult = d1 - d2; + break; + case INST_MULT: + dResult = d1 * d2; + break; + case INST_DIV: +#ifndef IEEE_FLOATING_POINT + if (d2 == 0.0) { + return DIVIDED_BY_ZERO; + } #endif - goto abnormalReturn; - } - if (catchTop == initCatchTop) { -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " ... no enclosing catch, returning %s\n", - StringForResultCode(TRESULT)); + /* + * We presume that we are running with zero-divide unmasked if + * we're on an IEEE box. Otherwise, this statement might cause + * demons to fly out our noses. + */ + + dResult = d1 / d2; + break; + default: + /* Unused, here to silence compiler warning. */ + dResult = 0; } -#endif - goto abnormalReturn; - } - rangePtr = GetExceptRangeForPc(pc, /*catchOnly*/ 1, codePtr); - if (rangePtr == NULL) { + + doubleResult: +#ifndef ACCEPT_NAN /* - * This is only possible when compiling a [catch] that sends its - * script to INST_EVAL. Cannot correct the compiler without - * breaking compat with previous .tbc compiled scripts. + * Check now for IEEE floating-point error. */ -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " ... no enclosing catch, returning %s\n", - StringForResultCode(TRESULT)); + if (TclIsNaN(dResult)) { + TclExprFloatError(interp, dResult); + return GENERAL_ARITHMETIC_ERROR; } #endif - goto abnormalReturn; + DOUBLE_RESULT(dResult); } + if ((type1 != TCL_NUMBER_BIG) && (type2 != TCL_NUMBER_BIG)) { + TclGetWideIntFromObj(NULL, valuePtr, &w1); + TclGetWideIntFromObj(NULL, value2Ptr, &w2); - /* - * A catch exception range (rangePtr) was found to handle an - * "exception". It was found either by checkForCatch just above or by - * an instruction during break, continue, or error processing. Jump to - * its catchOffset after unwinding the operand stack to the depth it - * had when starting to execute the range's catch command. - */ + switch (opcode) { + case INST_ADD: + wResult = w1 + w2; +#ifndef NO_WIDE_TYPE + if ((type1 == TCL_NUMBER_WIDE) || (type2 == TCL_NUMBER_WIDE)) +#endif + { + /* + * Check for overflow. + */ - processCatch: - while (CURR_DEPTH > *catchTop) { - valuePtr = POP_OBJECT(); - TclDecrRefCount(valuePtr); - } -#ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { - fprintf(stdout, " ... found catch at %d, catchTop=%d, " - "unwound to %ld, new pc %u\n", - rangePtr->codeOffset, (int) (catchTop - initCatchTop - 1), - (long) *catchTop, (unsigned) rangePtr->catchOffset); - } + if (Overflowing(w1, w2, wResult)) { + goto overflowBasic; + } + } + break; + + case INST_SUB: + wResult = w1 - w2; +#ifndef NO_WIDE_TYPE + if ((type1 == TCL_NUMBER_WIDE) || (type2 == TCL_NUMBER_WIDE)) #endif - pc = (codePtr->codeStart + rangePtr->catchOffset); - NEXT_INST_F(0, 0, 0); /* Restart the execution loop at pc. */ + { + /* + * Must check for overflow. The macro tests for overflows + * in sums by looking at the sign bits. As we have a + * subtraction here, we are adding -w2. As -w2 could in + * turn overflow, we test with ~w2 instead: it has the + * opposite sign bit to w2 so it does the job. Note that + * the only "bad" case (w2==0) is irrelevant for this + * macro, as in that case w1 and wResult have the same + * sign and there is no overflow anyway. + */ + + if (Overflowing(w1, ~w2, wResult)) { + goto overflowBasic; + } + } + break; + + case INST_MULT: + if ((type1 != TCL_NUMBER_LONG) || (type2 != TCL_NUMBER_LONG) + || (sizeof(Tcl_WideInt) < 2*sizeof(long))) { + goto overflowBasic; + } + wResult = w1 * w2; + break; + + case INST_DIV: + if (w2 == 0) { + return DIVIDED_BY_ZERO; + } + + /* + * Need a bignum to represent (LLONG_MIN / -1) + */ + + if ((w1 == LLONG_MIN) && (w2 == -1)) { + goto overflowBasic; + } + wResult = w1 / w2; + + /* + * Force Tcl's integer division rules. + * TODO: examine for logic simplification + */ + + if (((wResult < 0) || ((wResult == 0) && + ((w1 < 0 && w2 > 0) || (w1 > 0 && w2 < 0)))) && + (wResult*w2 != w1)) { + wResult -= 1; + } + break; - /* - * end of infinite loop dispatching on instructions. - */ + default: + /* + * Unused, here to silence compiler warning. + */ - /* - * Abnormal return code. Restore the stack to state it had when - * starting to execute the ByteCode. Panic if the stack is below the - * initial level. - */ + wResult = 0; + } - abnormalReturn: - TCL_DTRACE_INST_LAST(); + WIDE_RESULT(wResult); + } - /* - * Winding down: insure that all pending cleanups are done before - * dropping out of this bytecode. - */ - if (TOP_CB(interp) != BP->rootPtr) { - TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); + overflowBasic: + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + mp_init(&bigResult); + switch (opcode) { + case INST_ADD: + mp_add(&big1, &big2, &bigResult); + break; + case INST_SUB: + mp_sub(&big1, &big2, &bigResult); + break; + case INST_MULT: + mp_mul(&big1, &big2, &bigResult); + break; + case INST_DIV: + if (mp_iszero(&big2)) { + mp_clear(&big1); + mp_clear(&big2); + mp_clear(&bigResult); + return DIVIDED_BY_ZERO; + } + mp_init(&bigRemainder); + mp_div(&big1, &big2, &bigResult, &bigRemainder); + /* TODO: internals intrusion */ + if (!mp_iszero(&bigRemainder) + && (bigRemainder.sign != big2.sign)) { + /* + * Convert to Tcl's integer division rules. + */ - if (TOP_CB(interp) != BP->rootPtr) { - Tcl_Panic("Abnormal return with busy callback stack"); + mp_sub_d(&bigResult, 1, &bigResult); + mp_add(&bigRemainder, &big2, &bigRemainder); } + mp_clear(&bigRemainder); + break; } + mp_clear(&big1); + mp_clear(&big2); + BIG_RESULT(&bigResult); + } - /* - * Clear all expansions and same-level NR calls. - * - * Note that expansion markers have a NULL type; avoid removing other - * markers. - */ + Tcl_Panic("unexpected opcode"); + return NULL; +} - while (auxObjList) { - POP_TAUX_OBJ(); - } - while (tosPtr > initTosPtr) { - objPtr = POP_OBJECT(); - Tcl_DecrRefCount(objPtr); - } +static Tcl_Obj * +ExecuteExtendedUnaryMathOp( + int opcode, /* What operation to perform. */ + Tcl_Obj *valuePtr) /* The operand on the stack. */ +{ + ClientData ptr; + int type; + Tcl_WideInt w; + mp_int big; + Tcl_Obj *objResultPtr; - if (tosPtr < initTosPtr) { - fprintf(stderr, - "\nTclExecuteByteCode: abnormal return at pc %u: " - "stack top %d < entry stack top %d\n", - (unsigned)(pc - codePtr->codeStart), - (unsigned) CURR_DEPTH, (unsigned) 0); - Tcl_Panic("TclExecuteByteCode execution failure: end stack top < start stack top"); + (void) GetNumberFromObj(NULL, valuePtr, &ptr, &type); + + switch (opcode) { + case INST_BITNOT: +#ifndef NO_WIDE_TYPE + if (type == TCL_NUMBER_WIDE) { + w = *((const Tcl_WideInt *) ptr); + WIDE_RESULT(~w); } - CLANG_ASSERT(bcFramePtr); +#endif + Tcl_TakeBignumFromObj(NULL, valuePtr, &big); + /* ~a = - a - 1 */ + mp_neg(&big, &big); + mp_sub_d(&big, 1, &big); + BIG_RESULT(&big); + case INST_UMINUS: + switch (type) { + case TCL_NUMBER_DOUBLE: + DOUBLE_RESULT(-(*((const double *) ptr))); + case TCL_NUMBER_LONG: + w = (Tcl_WideInt) (*((const long *) ptr)); + if (w != LLONG_MIN) { + WIDE_RESULT(-w); + } + TclBNInitBignumFromLong(&big, *(const long *) ptr); + break; +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: + w = *((const Tcl_WideInt *) ptr); + if (w != LLONG_MIN) { + WIDE_RESULT(-w); + } + TclBNInitBignumFromWideInt(&big, w); + break; +#endif + default: + Tcl_TakeBignumFromObj(NULL, valuePtr, &big); + } + mp_neg(&big, &big); + BIG_RESULT(&big); } - /* - * Store the previous bottomPtr for returning to it, then free all - * resources used by this bytecode and process callbacks until you return - * to the previous bytecode (if any). - */ + Tcl_Panic("unexpected opcode"); + return NULL; +} +#undef LONG_RESULT +#undef WIDE_RESULT +#undef BIG_RESULT +#undef DOUBLE_RESULT + +/* + *---------------------------------------------------------------------- + * + * CompareTwoNumbers -- + * + * This function compares a pair of numbers in Tcl_Objs. Each argument + * must already be known to be numeric and not NaN. + * + * Results: + * One of MP_LT, MP_EQ or MP_GT, depending on whether valuePtr is less + * than, equal to, or greater than value2Ptr (respectively). + * + * Side effects: + * None, provided both values are numeric. + * + *---------------------------------------------------------------------- + */ - OBP = BP->prevBottomPtr; - iPtr->cmdFramePtr = bcFramePtr->nextPtr; - TclStackFree(interp, BP); /* free my stack */ +int +TclCompareTwoNumbers( + Tcl_Obj *valuePtr, + Tcl_Obj *value2Ptr) +{ + int type1, type2, compare; + ClientData ptr1, ptr2; + mp_int big1, big2; + double d1, d2, tmp; + long l1, l2; + Tcl_WideInt w1, w2; - if (--codePtr->refCount <= 0) { - TclCleanupByteCode(codePtr); - } + (void) GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); + (void) GetNumberFromObj(NULL, value2Ptr, &ptr2, &type2); - returnToCaller: - if (OBP) { - BP = OBP; /* back to old bc */ - rerunCallbacks: - TRESULT = TclNRRunCallbacks(interp, TRESULT, BP->rootPtr, 1); + switch (type1) { + case TCL_NUMBER_LONG: + l1 = *((const long *)ptr1); + switch (type2) { + case TCL_NUMBER_LONG: + l2 = *((const long *)ptr2); + longCompare: + return (l1 < l2) ? MP_LT : ((l1 > l2) ? MP_GT : MP_EQ); +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: + w2 = *((const Tcl_WideInt *)ptr2); + w1 = (Tcl_WideInt)l1; + goto wideCompare; +#endif + case TCL_NUMBER_DOUBLE: + d2 = *((const double *)ptr2); + d1 = (double) l1; - NR_DATA_DIG(); - if (TOP_CB(interp) == BP->rootPtr) { /* - * The bytecode is returning, all callbacks were run: keep - * processing the caller. + * If the double has a fractional part, or if the long can be + * converted to double without loss of precision, then compare as + * doubles. */ - goto nonRecursiveCallReturn; - } else { - TEOV_callback *callbackPtr = TOP_CB(iPtr); - int type = PTR2INT(callbackPtr->data[0]); + if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) || l1 == (long) d1 + || modf(d2, &tmp) != 0.0) { + goto doubleCompare; + } - NRE_ASSERT(TOP_CB(interp)->procPtr == NRCallTEBC); - NRE_ASSERT(TRESULT == TCL_OK); + /* + * Otherwise, to make comparision based on full precision, need to + * convert the double to a suitably sized integer. + * + * Need this to get comparsions like + * expr 20000000000000003 < 20000000000000004.0 + * right. Converting the first argument to double will yield two + * double values that are equivalent within double precision. + * Converting the double to an integer gets done exactly, then + * integer comparison can tell the difference. + */ - switch (type) { - case TCL_NR_BC_TYPE: - /* - * One of the callbacks requested a new execution: a tailcall! - * Start the new bytecode. - */ + if (d2 < (double)LONG_MIN) { + return MP_GT; + } + if (d2 > (double)LONG_MAX) { + return MP_LT; + } + l2 = (long) d2; + goto longCompare; + case TCL_NUMBER_BIG: + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + if (mp_cmp_d(&big2, 0) == MP_LT) { + compare = MP_GT; + } else { + compare = MP_LT; + } + mp_clear(&big2); + return compare; + } - goto nonRecursiveCallSetup; - case TCL_NR_TAILCALL_TYPE: - TOP_CB(iPtr) = callbackPtr->nextPtr; - TCLNR_FREE(interp, callbackPtr); +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: + w1 = *((const Tcl_WideInt *)ptr1); + switch (type2) { + case TCL_NUMBER_WIDE: + w2 = *((const Tcl_WideInt *)ptr2); + wideCompare: + return (w1 < w2) ? MP_LT : ((w1 > w2) ? MP_GT : MP_EQ); + case TCL_NUMBER_LONG: + l2 = *((const long *)ptr2); + w2 = (Tcl_WideInt)l2; + goto wideCompare; + case TCL_NUMBER_DOUBLE: + d2 = *((const double *)ptr2); + d1 = (double) w1; + if (DBL_MANT_DIG > CHAR_BIT*sizeof(Tcl_WideInt) + || w1 == (Tcl_WideInt) d1 || modf(d2, &tmp) != 0.0) { + goto doubleCompare; + } + if (d2 < (double)LLONG_MIN) { + return MP_GT; + } + if (d2 > (double)LLONG_MAX) { + return MP_LT; + } + w2 = (Tcl_WideInt) d2; + goto wideCompare; + case TCL_NUMBER_BIG: + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + if (mp_cmp_d(&big2, 0) == MP_LT) { + compare = MP_GT; + } else { + compare = MP_LT; + } + mp_clear(&big2); + return compare; + } +#endif - Tcl_SetResult(interp, - "tailcall cannot be invoked recursively", TCL_STATIC); - Tcl_SetErrorCode(interp, "TCL", "TAILCALL", "REENTRY", NULL); - TRESULT = TCL_ERROR; - goto rerunCallbacks; - default: - Tcl_Panic("TEBC: TRCB sent us a callback we cannot handle!"); + case TCL_NUMBER_DOUBLE: + d1 = *((const double *)ptr1); + switch (type2) { + case TCL_NUMBER_DOUBLE: + d2 = *((const double *)ptr2); + doubleCompare: + return (d1 < d2) ? MP_LT : ((d1 > d2) ? MP_GT : MP_EQ); + case TCL_NUMBER_LONG: + l2 = *((const long *)ptr2); + d2 = (double) l2; + if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) || l2 == (long) d2 + || modf(d1, &tmp) != 0.0) { + goto doubleCompare; + } + if (d1 < (double)LONG_MIN) { + return MP_LT; + } + if (d1 > (double)LONG_MAX) { + return MP_GT; + } + l1 = (long) d1; + goto longCompare; +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: + w2 = *((const Tcl_WideInt *)ptr2); + d2 = (double) w2; + if (DBL_MANT_DIG > CHAR_BIT*sizeof(Tcl_WideInt) + || w2 == (Tcl_WideInt) d2 || modf(d1, &tmp) != 0.0) { + goto doubleCompare; + } + if (d1 < (double)LLONG_MIN) { + return MP_LT; + } + if (d1 > (double)LLONG_MAX) { + return MP_GT; + } + w1 = (Tcl_WideInt) d1; + goto wideCompare; +#endif + case TCL_NUMBER_BIG: + if (TclIsInfinite(d1)) { + return (d1 > 0.0) ? MP_GT : MP_LT; + } + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + if ((d1 < (double)LONG_MAX) && (d1 > (double)LONG_MIN)) { + if (mp_cmp_d(&big2, 0) == MP_LT) { + compare = MP_GT; + } else { + compare = MP_LT; + } + mp_clear(&big2); + return compare; + } + if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) + && modf(d1, &tmp) != 0.0) { + d2 = TclBignumToDouble(&big2); + mp_clear(&big2); + goto doubleCompare; } + Tcl_InitBignumFromDouble(NULL, d1, &big1); + goto bigCompare; } - } - iPtr->execEnvPtr->bottomPtr = NULL; - return TRESULT; + case TCL_NUMBER_BIG: + Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); + switch (type2) { +#ifndef NO_WIDE_TYPE + case TCL_NUMBER_WIDE: +#endif + case TCL_NUMBER_LONG: + compare = mp_cmp_d(&big1, 0); + mp_clear(&big1); + return compare; + case TCL_NUMBER_DOUBLE: + d2 = *((const double *)ptr2); + if (TclIsInfinite(d2)) { + compare = (d2 > 0.0) ? MP_LT : MP_GT; + mp_clear(&big1); + return compare; + } + if ((d2 < (double)LONG_MAX) && (d2 > (double)LONG_MIN)) { + compare = mp_cmp_d(&big1, 0); + mp_clear(&big1); + return compare; + } + if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) + && modf(d2, &tmp) != 0.0) { + d1 = TclBignumToDouble(&big1); + mp_clear(&big1); + goto doubleCompare; + } + Tcl_InitBignumFromDouble(NULL, d2, &big2); + goto bigCompare; + case TCL_NUMBER_BIG: + Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); + bigCompare: + compare = mp_cmp(&big1, &big2); + mp_clear(&big1); + mp_clear(&big2); + return compare; + } + default: + Tcl_Panic("unexpected number type"); + return TCL_ERROR; + } } -#undef iPtr -#undef bcFramePtr -#undef initCatchTop -#undef initTosPtr -#undef auxObjList -#undef catchTop #ifdef TCL_COMPILE_DEBUG /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 965f69b..55d6f07 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.471 2010/04/25 13:39:25 msofer Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.472 2010/04/28 10:50:37 dkf Exp $ */ #ifndef _TCLINT @@ -890,7 +890,7 @@ typedef struct VarInHash { !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH)) #define TclIsVarDirectUnsettable(varPtr) \ - !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_UNSET|VAR_DEAD_HASH)) + !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_UNSET|VAR_DEAD_HASH)) #define TclIsVarDirectModifyable(varPtr) \ ( !((varPtr)->flags & (VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE)) \ -- cgit v0.12 From dd801c86b1a462d516d4e3b97e459fc41a4be684 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 28 Apr 2010 11:50:53 +0000 Subject: Remove unused @MAN2TCLFLAGS@ Move include from tclInt.h to tclWinPort.h, and eliminate unneeded , and , which are already in tclInt.h Move "tclInt.h" from regcustom.h up to regex.h. tclAlloc.c: Unneeded include tclExecute.c: Fix gcc warning: comparison between signed and unsigned --- ChangeLog | 14 ++++++++++++++ generic/regcustom.h | 10 ++++++---- generic/regex.h | 11 +++++++++++ generic/tclAlloc.c | 3 +-- generic/tclEnv.c | 10 +++++----- generic/tclExecute.c | 4 ++-- generic/tclInt.h | 7 +------ win/Makefile.in | 5 +---- win/tclWinPort.h | 8 ++------ 9 files changed, 43 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4148c5d..4146def 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-04-28 Jan Nijtmans + + * win/Makefile.in Remove unused @MAN2TCLFLAGS@ + * win/tclWinPort.h Move include from + * generic/tclInt.h tclInt.h to tclWinPort.h, and + * generic/tclEnv.c eliminate unneeded , + and , which are already in + tclInt.h + * generic/regcustom.h Move "tclInt.h" from regcustom.h + * generic/regex.h up to regex.h. + * generic/tclAlloc.c Unneeded include + * generic/tclExecute.c Fix gcc warning: comparison between + signed and unsigned + 2010-04-28 Donal K. Fellows * generic/tclInt.h (TclIsVarDirectUnsettable): Corrected flags so that diff --git a/generic/regcustom.h b/generic/regcustom.h index 2f30ffd..bc8c28c 100644 --- a/generic/regcustom.h +++ b/generic/regcustom.h @@ -30,7 +30,7 @@ * Headers if any. */ -#include "tclInt.h" +#include "regex.h" /* * Overrides for regguts.h definitions, if any. @@ -155,7 +155,9 @@ typedef int celt; /* Type to hold chr, or NOCELT */ #endif /* - * And pick up the standard header. + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: */ - -#include "regex.h" diff --git a/generic/regex.h b/generic/regex.h index f6d4eb4..d6d46ce 100644 --- a/generic/regex.h +++ b/generic/regex.h @@ -1,5 +1,8 @@ #ifndef _REGEX_H_ #define _REGEX_H_ /* never again */ + +#include "tclInt.h" + /* * regular expressions * @@ -319,3 +322,11 @@ MODULE_SCOPE size_t regerror(int, __REG_CONST regex_t *, char *, size_t); #endif #endif + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index d1b8409..ebb6898 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAlloc.c,v 1.29 2010/02/24 10:32:17 dkf Exp $ + * RCS: @(#) $Id: tclAlloc.c,v 1.30 2010/04/28 11:50:54 nijtmans Exp $ */ /* @@ -142,7 +142,6 @@ static int allocInit = 0; */ static unsigned int numMallocs[NBUCKETS+1]; -#include #endif #if defined(DEBUG) || defined(RCHECK) diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 87fb3d7..a64d38d 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.42 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.43 2010/04/28 11:50:54 nijtmans Exp $ */ #include "tclInt.h" @@ -755,13 +755,13 @@ TclCygwinPutenv( if (strcmp(name, "Path") == 0) { #ifdef __WIN32__ - SetEnvironmentVariable("PATH", NULL); + SetEnvironmentVariableA("PATH", NULL); #endif unsetenv("PATH"); } #ifdef __WIN32__ - SetEnvironmentVariable(name, value); + SetEnvironmentVariableA(name, value); #endif } else { char *buf; @@ -771,7 +771,7 @@ TclCygwinPutenv( */ #ifdef __WIN32__ - SetEnvironmentVariable("Path", NULL); + SetEnvironmentVariableA("Path", NULL); #endif unsetenv("Path"); @@ -786,7 +786,7 @@ TclCygwinPutenv( } #ifdef __WIN32__ - SetEnvironmentVariable(name, buf); + SetEnvironmentVariableA(name, buf); #endif } } diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 44988ae..04c47f4 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.480 2010/04/28 10:50:34 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.481 2010/04/28 11:50:53 nijtmans Exp $ */ #include "tclInt.h" @@ -5081,7 +5081,7 @@ TclExecuteByteCode( * Quickly force large right shifts to 0 or -1. */ - if (l2 >= CHAR_BIT*sizeof(long)) { + if (l2 >= (long)(CHAR_BIT*sizeof(long))) { /* * We assume that INT_MAX is much larger than the * number of bits in a long. This is a pretty safe diff --git a/generic/tclInt.h b/generic/tclInt.h index 55d6f07..3ca58d7 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.472 2010/04/28 10:50:37 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.473 2010/04/28 11:50:53 nijtmans Exp $ */ #ifndef _TCLINT @@ -42,11 +42,6 @@ #include #include -#ifdef NO_LIMITS_H -# include "../compat/limits.h" -#else -# include -#endif #ifdef NO_STDLIB_H # include "../compat/stdlib.h" #else diff --git a/win/Makefile.in b/win/Makefile.in index 06c1789..ac40e13 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.176 2010/04/14 22:58:37 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.177 2010/04/28 11:50:54 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -90,9 +90,6 @@ COMPILE_DEBUG_FLAGS = #COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG #COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS -# Special compiler flags to use when building man2tcl on Windows. -MAN2TCLFLAGS = @MAN2TCLFLAGS@ - SRC_DIR = @srcdir@ ROOT_DIR = @srcdir@/.. TOP_DIR = $(shell cd @srcdir@/..; pwd) diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 204181f..fa049bf 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.56 2010/04/15 13:58:44 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.57 2010/04/28 11:50:54 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -56,15 +56,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include +#include #ifdef __CYGWIN__ # include @@ -413,8 +411,6 @@ #endif /* __BORLANDC__ */ #ifdef __CYGWIN__ -/* On Cygwin, the environment is imported from the Cygwin DLL. */ -# define putenv TclCygwinPutenv # define timezone _timezone #endif /* __CYGWIN__ */ -- cgit v0.12 From 189dc0720d07929d20d63d408619de129f31c478 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 29 Apr 2010 09:23:57 +0000 Subject: Include "tcl.h", not , like everywhere else, to insure that the version in the Tcl distribution is used, not some version from somewhere else. --- ChangeLog | 8 ++++++++ compat/dirent2.h | 6 ++---- compat/dlfcn.h | 6 ++---- compat/stdlib.h | 5 +---- compat/string.h | 6 +++--- compat/unistd.h | 6 ++---- 6 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4146def..94e159b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-04-29 Jan Nijtmans + + * compat/dirent2.h Include "tcl.h", not , + * compat/dlfcn.h like everywhere else, to insure + * compat/stdlib.h that the version in the Tcl + * compat/string.h distribution is used, not some + * compat/unistd.h version from somewhere else. + 2010-04-28 Jan Nijtmans * win/Makefile.in Remove unused @MAN2TCLFLAGS@ diff --git a/compat/dirent2.h b/compat/dirent2.h index 8deed91..794a6c4 100644 --- a/compat/dirent2.h +++ b/compat/dirent2.h @@ -10,15 +10,13 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: dirent2.h,v 1.3 2008/09/03 05:43:31 dgp Exp $ + * RCS: @(#) $Id: dirent2.h,v 1.4 2010/04/29 09:23:57 nijtmans Exp $ */ #ifndef _DIRENT #define _DIRENT -#ifndef _TCL -#include -#endif +#include "tcl.h" /* * Dirent structure, which holds information about a single diff --git a/compat/dlfcn.h b/compat/dlfcn.h index ef8ff0c..ce04fb2 100644 --- a/compat/dlfcn.h +++ b/compat/dlfcn.h @@ -17,7 +17,7 @@ * for any results of using the software, alterations are clearly marked * as such, and this notice is not modified. * - * RCS: @(#) $Id: dlfcn.h,v 1.4 2008/12/18 06:40:03 nijtmans Exp $ + * RCS: @(#) $Id: dlfcn.h,v 1.5 2010/04/29 09:23:57 nijtmans Exp $ */ /* @@ -29,9 +29,7 @@ #ifndef __dlfcn_h__ #define __dlfcn_h__ -#ifndef _TCL -#include -#endif +#include "tcl.h" #ifdef __cplusplus extern "C" { diff --git a/compat/stdlib.h b/compat/stdlib.h index 1fe0a76..2c19c7f 100644 --- a/compat/stdlib.h +++ b/compat/stdlib.h @@ -13,15 +13,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: stdlib.h,v 1.4 2008/05/02 10:27:04 dkf Exp $ + * RCS: @(#) $Id: stdlib.h,v 1.5 2010/04/29 09:23:57 nijtmans Exp $ */ #ifndef _STDLIB #define _STDLIB -#include -/* TODO: Do we need tcl.h any more? */ - extern void abort(void); extern double atof(const char *string); extern int atoi(const char *string); diff --git a/compat/string.h b/compat/string.h index e452183..0be1ec1 100644 --- a/compat/string.h +++ b/compat/string.h @@ -9,13 +9,13 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: string.h,v 1.8 2008/05/02 10:27:04 dkf Exp $ + * RCS: @(#) $Id: string.h,v 1.9 2010/04/29 09:23:57 nijtmans Exp $ */ #ifndef _STRING #define _STRING -#include +#include "tcl.h" /* * The following #include is needed to define size_t. (This used to include @@ -50,7 +50,7 @@ extern char * strerror(int error); extern size_t strlen(const char *string); extern int strncasecmp(const char *s1, const char *s2, size_t n); extern char * strncat(char *dst, const char *src, size_t numChars); -extern int strncmp(const char *s1, const char *s2,size_t nChars); +extern int strncmp(const char *s1, const char *s2, size_t nChars); extern char * strncpy(char *dst, const char *src, size_t numChars); extern char * strpbrk(const char *string, const char *chars); extern char * strrchr(const char *string, int c); diff --git a/compat/unistd.h b/compat/unistd.h index 838e7ab..44ca64a 100644 --- a/compat/unistd.h +++ b/compat/unistd.h @@ -10,16 +10,14 @@ * no representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * - * RCS: @(#) $Id: unistd.h,v 1.4 2008/05/04 07:28:47 nijtmans Exp $ + * RCS: @(#) $Id: unistd.h,v 1.5 2010/04/29 09:23:57 nijtmans Exp $ */ #ifndef _UNISTD #define _UNISTD +#include "tcl.h" #include -#ifndef _TCL -# include "tcl.h" -#endif #ifndef NULL #define NULL 0 -- cgit v0.12 From 4e1cb8f323af8a2dbf67db4528b5da18cdfbe4ca Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 29 Apr 2010 11:05:56 +0000 Subject: credit Lars_H for [yieldm]'s idea --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94e159b..78b35b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -75,8 +75,8 @@ 2010-04-25 Miguel Sofer - * generic/tclBasic.c: Add unsupported [yieldm] command. - * generic/tclInt.h: + * generic/tclBasic.c: Add unsupported [yieldm] command. Credit + * generic/tclInt.h: Lars Hellstrom for the basic idea. 2010-04-24 Miguel Sofer -- cgit v0.12 From b84b65f49a83dd2409278f59c82fc6c79d466819 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Apr 2010 15:08:03 +0000 Subject: * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 2992970]: Make * generic/tclStringObj.c (Tcl_AppendObjToObj): an append of a byte array to another into an efficent operation. The problem was the (lack of) a proper growth management strategy for the byte array. --- ChangeLog | 61 +++++++++++++++++++++++---------------- generic/tclBinary.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- generic/tclInt.h | 4 ++- generic/tclStringObj.c | 7 ++--- 4 files changed, 118 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78b35b1..74f6a87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,24 +1,30 @@ +2010-04-29 Donal K. Fellows + + * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 2992970]: Make + * generic/tclStringObj.c (Tcl_AppendObjToObj): an append of a byte + array to another into an efficent operation. The problem was the (lack + of) a proper growth management strategy for the byte array. + 2010-04-29 Jan Nijtmans - * compat/dirent2.h Include "tcl.h", not , - * compat/dlfcn.h like everywhere else, to insure - * compat/stdlib.h that the version in the Tcl - * compat/string.h distribution is used, not some - * compat/unistd.h version from somewhere else. + * compat/dirent2.h: Include "tcl.h", not , like everywhere + * compat/dlfcn.h: else, to ensure that the version in the Tcl + * compat/stdlib.h: distribution is used, not some version from + * compat/string.h: somewhere else. + * compat/unistd.h: 2010-04-28 Jan Nijtmans - * win/Makefile.in Remove unused @MAN2TCLFLAGS@ - * win/tclWinPort.h Move include from - * generic/tclInt.h tclInt.h to tclWinPort.h, and - * generic/tclEnv.c eliminate unneeded , - and , which are already in - tclInt.h - * generic/regcustom.h Move "tclInt.h" from regcustom.h - * generic/regex.h up to regex.h. - * generic/tclAlloc.c Unneeded include - * generic/tclExecute.c Fix gcc warning: comparison between - signed and unsigned + * win/Makefile.in: Remove unused @MAN2TCLFLAGS@ + * win/tclWinPort.h: Move include from tclInt.h to + * generic/tclInt.h: tclWinPort.h, and eliminate unneeded + * generic/tclEnv.c: , and , which + are already in tclInt.h + * generic/regcustom.h: Move "tclInt.h" from regcustom.h up to + * generic/regex.h: regex.h. + * generic/tclAlloc.c: Unneeded include. + * generic/tclExecute.c: Fix gcc warning: comparison between signed and + unsigned. 2010-04-28 Donal K. Fellows @@ -45,7 +51,7 @@ tclIOUtil.c assignment type mismatch compiler warning * generic/regguts.h: If tclInt.h or tclPort.h is already * generic/tclBasic.c: included, don't include - * generic/tclExecute.c: again. Follow-up to [Bug 2991415]: + * generic/tclExecute.c: again. Follow-up to [Bug 2991415]: * generic/tclIORChan.c: tclport.h #included before limits.h * generic/tclIORTrans.c: See comments in [Bug 2991415] * generic/tclObj.c: @@ -62,7 +68,7 @@ * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Simplified the logic so that the casts added in Donal Fellows's change for the same bug are no longer necessary. - + 2010-04-26 Donal K. Fellows * unix/tclLoadDl.c (FindSymbol): [Bug 2992295]: Added an explicit cast @@ -75,8 +81,13 @@ 2010-04-25 Miguel Sofer +<<<<<<< ChangeLog + * generic/tclBasic.c: Add unsupported [yieldm] command. + * generic/tclInt.h: +======= * generic/tclBasic.c: Add unsupported [yieldm] command. Credit * generic/tclInt.h: Lars Hellstrom for the basic idea. +>>>>>>> 1.5083 2010-04-24 Miguel Sofer @@ -223,7 +234,7 @@ TIP #357 IMPLEMENTATION TIP #362 IMPLEMENTATION - + * generic/tclStrToD.c: [Bug 2952904]: Defer creation of the smallest floating point number until it is actually used. (This change avoids a bogus syslog message regarding a 'floating point software assist @@ -252,7 +263,7 @@ * unix/tclUnixPipe.c: * win/Makefile.in: * win/tclWinLoad.c: - + 2010-03-31 Donal K. Fellows * doc/registry.n: Added missing documentation of TIP#362 flags. @@ -331,7 +342,7 @@ * unix/tclUnixFCmd.c (TclUnixCopyFile): [Bug 2976504]: Corrected number of arguments to fstatfs() call. - * macosx/tclMacOSXBundle.c, macosx/tclMacOSXFCmd.c: + * macosx/tclMacOSXBundle.c, macosx/tclMacOSXFCmd.c: * macosx/tclMacOSXNotify.c: Reduce the level of ifdeffery in the functions of these files to improve readability. They need to be audited for whether complexity can be removed based on the minimum @@ -949,7 +960,7 @@ * tools/genStubs.tcl: No longer generate a space after "*" and immediately after a function name, so the - format of function definitions in tcl*Decls.h + format of function definitions in tcl*Decls.h match all other tcl*.h header files. * doc/ParseArgs.3: Change Tcl_ArgvFuncProc, Tcl_ArgvGenFuncProc * generic/tcl.h: and GetFrameInfoValueProc to be function @@ -1012,7 +1023,7 @@ 2010-01-21 Miguel Sofer - * generic/tclCompile.h: NRE-enable direct eval on BC spoilage + * generic/tclCompile.h: NRE-enable direct eval on BC spoilage * generic/tclExecute.c: [Bug 2910748] * tests/nre.test: @@ -1124,7 +1135,7 @@ * generic/tclNamesp.c: leak, and also a test for leaks on namespace * tests/coroutine.test: deletion. * tests/namespace.test: - + 2009-12-30 Donal K. Fellows * library/safe.tcl (AliasSource): [Bug 2923613]: Make the safer @@ -1186,7 +1197,7 @@ 2009-12-23 Jan Nijtmans - * unix/tcl.m4: Install libtcl8.6.dll in bin directory + * unix/tcl.m4: Install libtcl8.6.dll in bin directory * unix/Makefile.in: * unix/configure: (regenerated) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 62f8f46..1d46902 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.60 2010/03/05 14:34:03 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.61 2010/04/29 15:08:05 dkf Exp $ */ #include "tclInt.h" @@ -577,6 +577,81 @@ UpdateStringOfByteArray( /* *---------------------------------------------------------------------- * + * TclAppendBytesToByteArray -- + * + * This function appends an array of bytes to a byte array object. Note + * that the object *must* be unshared, and the array of bytes *must not* + * refer to the object being appended to. + * + * Results: + * None. + * + * Side effects: + * Allocates enough memory for an array of bytes of the requested total + * size, or possibly larger. [Bug 2992970] + * + *---------------------------------------------------------------------- + */ + +void +TclAppendBytesToByteArray( + Tcl_Obj *objPtr, + const unsigned char *bytes, + unsigned len) +{ + ByteArray *byteArrayPtr; + + if (Tcl_IsShared(objPtr)) { + Tcl_Panic("%s called with shared object","TclAppendBytesToByteArray"); + } + if (objPtr->typePtr != &tclByteArrayType) { + SetByteArrayFromAny(NULL, objPtr); + } + byteArrayPtr = GET_BYTEARRAY(objPtr); + + /* + * If we need to, resize the allocated space in the byte array. + */ + + if (byteArrayPtr->used+len > byteArrayPtr->allocated) { + unsigned int attempt, used = byteArrayPtr->used; + ByteArray *tmpByteArrayPtr; + + attempt = byteArrayPtr->allocated; + do { + attempt *= 2; + } while (attempt < used+len); + + tmpByteArrayPtr = (ByteArray *) + attemptckrealloc((char *) byteArrayPtr, + BYTEARRAY_SIZE(attempt)); + + if (tmpByteArrayPtr == NULL) { + attempt = used + len; + tmpByteArrayPtr = (ByteArray *) ckrealloc((char *) byteArrayPtr, + BYTEARRAY_SIZE(attempt)); + } + + byteArrayPtr = tmpByteArrayPtr; + byteArrayPtr->allocated = attempt; + byteArrayPtr->used = used; + SET_BYTEARRAY(objPtr, byteArrayPtr); + } + + /* + * Do the append if there's any point. + */ + + if (len > 0) { + memcpy(byteArrayPtr->bytes + byteArrayPtr->used, bytes, len); + byteArrayPtr->used += len; + Tcl_InvalidateStringRep(objPtr); + } +} + +/* + *---------------------------------------------------------------------- + * * TclInitBinaryCmd -- * * This function is called to create the "binary" Tcl command. See the diff --git a/generic/tclInt.h b/generic/tclInt.h index 3ca58d7..9c5ec7f 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.473 2010/04/28 11:50:53 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.474 2010/04/29 15:08:06 dkf Exp $ */ #ifndef _TCLINT @@ -2801,6 +2801,8 @@ struct Tcl_LoadHandle_ { *---------------------------------------------------------------- */ +MODULE_SCOPE void TclAppendBytesToByteArray(Tcl_Obj *objPtr, + const unsigned char *bytes, unsigned len); MODULE_SCOPE int TclNREvalCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index e075d77..e91b8a4 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.135 2010/03/29 21:58:58 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.136 2010/04/29 15:08:07 dkf Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1235,7 +1235,7 @@ Tcl_AppendObjToObj( */ if (TclIsPureByteArray(objPtr) && TclIsPureByteArray(appendObjPtr)) { - unsigned char *bytesDst, *bytesSrc; + unsigned char *bytesSrc; int lengthSrc, lengthTotal; /* @@ -1250,9 +1250,8 @@ Tcl_AppendObjToObj( if (((length > lengthSrc) ? length : lengthSrc) > lengthTotal) { Tcl_Panic("overflow when calculating byte array size"); } - bytesDst = Tcl_SetByteArrayLength(objPtr, lengthTotal); bytesSrc = Tcl_GetByteArrayFromObj(appendObjPtr, NULL); - memcpy(bytesDst + length, bytesSrc, lengthSrc); + TclAppendBytesToByteArray(objPtr, bytesSrc, (unsigned) lengthSrc); return; } -- cgit v0.12 From 2a90da0aa437df7266bd2cb345c248969a8a8f6b Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 29 Apr 2010 15:08:38 +0000 Subject: typo --- ChangeLog | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74f6a87..fff0cff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -81,13 +81,8 @@ 2010-04-25 Miguel Sofer -<<<<<<< ChangeLog - * generic/tclBasic.c: Add unsupported [yieldm] command. - * generic/tclInt.h: -======= * generic/tclBasic.c: Add unsupported [yieldm] command. Credit * generic/tclInt.h: Lars Hellstrom for the basic idea. ->>>>>>> 1.5083 2010-04-24 Miguel Sofer -- cgit v0.12 From dde519dfeca37b7ebebd1bb3ab9f71e5f6e9f19e Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 29 Apr 2010 15:14:33 +0000 Subject: fix MSVC warning C4018: '>' : signed/unsigned mismatch --- generic/tclBinary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 1d46902..7bfa07a 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.61 2010/04/29 15:08:05 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.62 2010/04/29 15:14:33 nijtmans Exp $ */ #include "tclInt.h" @@ -613,7 +613,7 @@ TclAppendBytesToByteArray( * If we need to, resize the allocated space in the byte array. */ - if (byteArrayPtr->used+len > byteArrayPtr->allocated) { + if (byteArrayPtr->used + (int)len > byteArrayPtr->allocated) { unsigned int attempt, used = byteArrayPtr->used; ByteArray *tmpByteArrayPtr; -- cgit v0.12 From c5d929adcd1df608a55410c2dc8c01c5f1dcb967 Mon Sep 17 00:00:00 2001 From: Kevin B Kenny Date: Thu, 29 Apr 2010 15:49:55 +0000 Subject: * library/tzdata/Antarctica/Macquarie: * library/tzdata/Africa/Casablanca: * library/tzdata/Africa/Tunis: * library/tzdata/America/Santiago: * library/tzdata/America/Argentina/San_Luis: * library/tzdata/Antarctica/Casey: * library/tzdata/Antarctica/Davis: * library/tzdata/Asia/Anadyr: * library/tzdata/Asia/Damascus: * library/tzdata/Asia/Dhaka: * library/tzdata/Asia/Gaza: * library/tzdata/Asia/Kamchatka: * library/tzdata/Asia/Karachi: * library/tzdata/Asia/Taipei: * library/tzdata/Europe/Samara: * library/tzdata/Pacific/Apia: * library/tzdata/Pacific/Easter: * library/tzdata/Pacific/Fiji: Olson's tzdata2010i. --- ChangeLog | 21 ++ library/tzdata/Africa/Casablanca | 2 + library/tzdata/Africa/Tunis | 180 --------------- library/tzdata/America/Argentina/San_Luis | 180 --------------- library/tzdata/America/Santiago | 2 +- library/tzdata/Antarctica/Casey | 1 + library/tzdata/Antarctica/Davis | 1 + library/tzdata/Antarctica/Macquarie | 102 +++++++++ library/tzdata/Asia/Anadyr | 361 +++++++++++++++--------------- library/tzdata/Asia/Damascus | 180 +++++++-------- library/tzdata/Asia/Dhaka | 181 +-------------- library/tzdata/Asia/Gaza | 180 +++++++-------- library/tzdata/Asia/Kamchatka | 361 +++++++++++++++--------------- library/tzdata/Asia/Karachi | 180 --------------- library/tzdata/Asia/Taipei | 4 +- library/tzdata/Europe/Samara | 361 +++++++++++++++--------------- library/tzdata/Pacific/Apia | 4 +- library/tzdata/Pacific/Easter | 2 +- library/tzdata/Pacific/Fiji | 4 +- 19 files changed, 860 insertions(+), 1447 deletions(-) create mode 100644 library/tzdata/Antarctica/Macquarie diff --git a/ChangeLog b/ChangeLog index fff0cff..0062b8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2010-04-29 Kevin B. Kenny + + * library/tzdata/Antarctica/Macquarie: + * library/tzdata/Africa/Casablanca: + * library/tzdata/Africa/Tunis: + * library/tzdata/America/Santiago: + * library/tzdata/America/Argentina/San_Luis: + * library/tzdata/Antarctica/Casey: + * library/tzdata/Antarctica/Davis: + * library/tzdata/Asia/Anadyr: + * library/tzdata/Asia/Damascus: + * library/tzdata/Asia/Dhaka: + * library/tzdata/Asia/Gaza: + * library/tzdata/Asia/Kamchatka: + * library/tzdata/Asia/Karachi: + * library/tzdata/Asia/Taipei: + * library/tzdata/Europe/Samara: + * library/tzdata/Pacific/Apia: + * library/tzdata/Pacific/Easter: + * library/tzdata/Pacific/Fiji: Olson's tzdata2010i. + 2010-04-29 Donal K. Fellows * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 2992970]: Make diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca index d976aa5..996dd5d 100644 --- a/library/tzdata/Africa/Casablanca +++ b/library/tzdata/Africa/Casablanca @@ -25,4 +25,6 @@ set TZData(:Africa/Casablanca) { {1220223600 0 0 WET} {1243814400 3600 1 WEST} {1250809200 0 0 WET} + {1272758400 3600 1 WEST} + {1281222000 0 0 WET} } diff --git a/library/tzdata/Africa/Tunis b/library/tzdata/Africa/Tunis index 8a7ec16..0c1db4d 100644 --- a/library/tzdata/Africa/Tunis +++ b/library/tzdata/Africa/Tunis @@ -36,184 +36,4 @@ set TZData(:Africa/Tunis) { {1193533200 3600 0 CET} {1206838800 7200 1 CEST} {1224982800 3600 0 CET} - {1269738000 7200 1 CEST} - {1288486800 3600 0 CET} - {1301187600 7200 1 CEST} - {1319936400 3600 0 CET} - {1332637200 7200 1 CEST} - {1351386000 3600 0 CET} - {1364691600 7200 1 CEST} - {1382835600 3600 0 CET} - {1396141200 7200 1 CEST} - {1414285200 3600 0 CET} - {1427590800 7200 1 CEST} - {1445734800 3600 0 CET} - {1459040400 7200 1 CEST} - {1477789200 3600 0 CET} - {1490490000 7200 1 CEST} - {1509238800 3600 0 CET} - {1521939600 7200 1 CEST} - {1540688400 3600 0 CET} - {1553994000 7200 1 CEST} - {1572138000 3600 0 CET} - {1585443600 7200 1 CEST} - {1603587600 3600 0 CET} - {1616893200 7200 1 CEST} - {1635642000 3600 0 CET} - {1648342800 7200 1 CEST} - {1667091600 3600 0 CET} - {1679792400 7200 1 CEST} - {1698541200 3600 0 CET} - {1711846800 7200 1 CEST} - {1729990800 3600 0 CET} - {1743296400 7200 1 CEST} - {1761440400 3600 0 CET} - {1774746000 7200 1 CEST} - {1792890000 3600 0 CET} - {1806195600 7200 1 CEST} - {1824944400 3600 0 CET} - {1837645200 7200 1 CEST} - {1856394000 3600 0 CET} - {1869094800 7200 1 CEST} - {1887843600 3600 0 CET} - {1901149200 7200 1 CEST} - {1919293200 3600 0 CET} - {1932598800 7200 1 CEST} - {1950742800 3600 0 CET} - {1964048400 7200 1 CEST} - {1982797200 3600 0 CET} - {1995498000 7200 1 CEST} - {2014246800 3600 0 CET} - {2026947600 7200 1 CEST} - {2045696400 3600 0 CET} - {2058397200 7200 1 CEST} - {2077146000 3600 0 CET} - {2090451600 7200 1 CEST} - {2108595600 3600 0 CET} - {2121901200 7200 1 CEST} - {2140045200 3600 0 CET} - {2153350800 7200 1 CEST} - {2172099600 3600 0 CET} - {2184800400 7200 1 CEST} - {2203549200 3600 0 CET} - {2216250000 7200 1 CEST} - {2234998800 3600 0 CET} - {2248304400 7200 1 CEST} - {2266448400 3600 0 CET} - {2279754000 7200 1 CEST} - {2297898000 3600 0 CET} - {2311203600 7200 1 CEST} - {2329347600 3600 0 CET} - {2342653200 7200 1 CEST} - {2361402000 3600 0 CET} - {2374102800 7200 1 CEST} - {2392851600 3600 0 CET} - {2405552400 7200 1 CEST} - {2424301200 3600 0 CET} - {2437606800 7200 1 CEST} - {2455750800 3600 0 CET} - {2469056400 7200 1 CEST} - {2487200400 3600 0 CET} - {2500506000 7200 1 CEST} - {2519254800 3600 0 CET} - {2531955600 7200 1 CEST} - {2550704400 3600 0 CET} - {2563405200 7200 1 CEST} - {2582154000 3600 0 CET} - {2595459600 7200 1 CEST} - {2613603600 3600 0 CET} - {2626909200 7200 1 CEST} - {2645053200 3600 0 CET} - {2658358800 7200 1 CEST} - {2676502800 3600 0 CET} - {2689808400 7200 1 CEST} - {2708557200 3600 0 CET} - {2721258000 7200 1 CEST} - {2740006800 3600 0 CET} - {2752707600 7200 1 CEST} - {2771456400 3600 0 CET} - {2784762000 7200 1 CEST} - {2802906000 3600 0 CET} - {2816211600 7200 1 CEST} - {2834355600 3600 0 CET} - {2847661200 7200 1 CEST} - {2866410000 3600 0 CET} - {2879110800 7200 1 CEST} - {2897859600 3600 0 CET} - {2910560400 7200 1 CEST} - {2929309200 3600 0 CET} - {2942010000 7200 1 CEST} - {2960758800 3600 0 CET} - {2974064400 7200 1 CEST} - {2992208400 3600 0 CET} - {3005514000 7200 1 CEST} - {3023658000 3600 0 CET} - {3036963600 7200 1 CEST} - {3055712400 3600 0 CET} - {3068413200 7200 1 CEST} - {3087162000 3600 0 CET} - {3099862800 7200 1 CEST} - {3118611600 3600 0 CET} - {3131917200 7200 1 CEST} - {3150061200 3600 0 CET} - {3163366800 7200 1 CEST} - {3181510800 3600 0 CET} - {3194816400 7200 1 CEST} - {3212960400 3600 0 CET} - {3226266000 7200 1 CEST} - {3245014800 3600 0 CET} - {3257715600 7200 1 CEST} - {3276464400 3600 0 CET} - {3289165200 7200 1 CEST} - {3307914000 3600 0 CET} - {3321219600 7200 1 CEST} - {3339363600 3600 0 CET} - {3352669200 7200 1 CEST} - {3370813200 3600 0 CET} - {3384118800 7200 1 CEST} - {3402867600 3600 0 CET} - {3415568400 7200 1 CEST} - {3434317200 3600 0 CET} - {3447018000 7200 1 CEST} - {3465766800 3600 0 CET} - {3479072400 7200 1 CEST} - {3497216400 3600 0 CET} - {3510522000 7200 1 CEST} - {3528666000 3600 0 CET} - {3541971600 7200 1 CEST} - {3560115600 3600 0 CET} - {3573421200 7200 1 CEST} - {3592170000 3600 0 CET} - {3604870800 7200 1 CEST} - {3623619600 3600 0 CET} - {3636320400 7200 1 CEST} - {3655069200 3600 0 CET} - {3668374800 7200 1 CEST} - {3686518800 3600 0 CET} - {3699824400 7200 1 CEST} - {3717968400 3600 0 CET} - {3731274000 7200 1 CEST} - {3750022800 3600 0 CET} - {3762723600 7200 1 CEST} - {3781472400 3600 0 CET} - {3794173200 7200 1 CEST} - {3812922000 3600 0 CET} - {3825622800 7200 1 CEST} - {3844371600 3600 0 CET} - {3857677200 7200 1 CEST} - {3875821200 3600 0 CET} - {3889126800 7200 1 CEST} - {3907270800 3600 0 CET} - {3920576400 7200 1 CEST} - {3939325200 3600 0 CET} - {3952026000 7200 1 CEST} - {3970774800 3600 0 CET} - {3983475600 7200 1 CEST} - {4002224400 3600 0 CET} - {4015530000 7200 1 CEST} - {4033674000 3600 0 CET} - {4046979600 7200 1 CEST} - {4065123600 3600 0 CET} - {4078429200 7200 1 CEST} - {4096573200 3600 0 CET} } diff --git a/library/tzdata/America/Argentina/San_Luis b/library/tzdata/America/Argentina/San_Luis index b93f3bf..bec1554 100644 --- a/library/tzdata/America/Argentina/San_Luis +++ b/library/tzdata/America/Argentina/San_Luis @@ -65,184 +65,4 @@ set TZData(:America/Argentina/San_Luis) { {1223784000 -10800 1 WARST} {1236481200 -14400 0 WART} {1255233600 -10800 1 WARST} - {1268535600 -14400 0 WART} - {1286683200 -10800 1 WARST} - {1299985200 -14400 0 WART} - {1318132800 -10800 1 WARST} - {1331434800 -14400 0 WART} - {1350187200 -10800 1 WARST} - {1362884400 -14400 0 WART} - {1381636800 -10800 1 WARST} - {1394334000 -14400 0 WART} - {1413086400 -10800 1 WARST} - {1425783600 -14400 0 WART} - {1444536000 -10800 1 WARST} - {1457838000 -14400 0 WART} - {1475985600 -10800 1 WARST} - {1489287600 -14400 0 WART} - {1507435200 -10800 1 WARST} - {1520737200 -14400 0 WART} - {1539489600 -10800 1 WARST} - {1552186800 -14400 0 WART} - {1570939200 -10800 1 WARST} - {1583636400 -14400 0 WART} - {1602388800 -10800 1 WARST} - {1615690800 -14400 0 WART} - {1633838400 -10800 1 WARST} - {1647140400 -14400 0 WART} - {1665288000 -10800 1 WARST} - {1678590000 -14400 0 WART} - {1696737600 -10800 1 WARST} - {1710039600 -14400 0 WART} - {1728792000 -10800 1 WARST} - {1741489200 -14400 0 WART} - {1760241600 -10800 1 WARST} - {1772938800 -14400 0 WART} - {1791691200 -10800 1 WARST} - {1804993200 -14400 0 WART} - {1823140800 -10800 1 WARST} - {1836442800 -14400 0 WART} - {1854590400 -10800 1 WARST} - {1867892400 -14400 0 WART} - {1886644800 -10800 1 WARST} - {1899342000 -14400 0 WART} - {1918094400 -10800 1 WARST} - {1930791600 -14400 0 WART} - {1949544000 -10800 1 WARST} - {1962846000 -14400 0 WART} - {1980993600 -10800 1 WARST} - {1994295600 -14400 0 WART} - {2012443200 -10800 1 WARST} - {2025745200 -14400 0 WART} - {2043892800 -10800 1 WARST} - {2057194800 -14400 0 WART} - {2075947200 -10800 1 WARST} - {2088644400 -14400 0 WART} - {2107396800 -10800 1 WARST} - {2120094000 -14400 0 WART} - {2138846400 -10800 1 WARST} - {2152148400 -14400 0 WART} - {2170296000 -10800 1 WARST} - {2183598000 -14400 0 WART} - {2201745600 -10800 1 WARST} - {2215047600 -14400 0 WART} - {2233800000 -10800 1 WARST} - {2246497200 -14400 0 WART} - {2265249600 -10800 1 WARST} - {2277946800 -14400 0 WART} - {2296699200 -10800 1 WARST} - {2309396400 -14400 0 WART} - {2328148800 -10800 1 WARST} - {2341450800 -14400 0 WART} - {2359598400 -10800 1 WARST} - {2372900400 -14400 0 WART} - {2391048000 -10800 1 WARST} - {2404350000 -14400 0 WART} - {2423102400 -10800 1 WARST} - {2435799600 -14400 0 WART} - {2454552000 -10800 1 WARST} - {2467249200 -14400 0 WART} - {2486001600 -10800 1 WARST} - {2499303600 -14400 0 WART} - {2517451200 -10800 1 WARST} - {2530753200 -14400 0 WART} - {2548900800 -10800 1 WARST} - {2562202800 -14400 0 WART} - {2580350400 -10800 1 WARST} - {2593652400 -14400 0 WART} - {2612404800 -10800 1 WARST} - {2625102000 -14400 0 WART} - {2643854400 -10800 1 WARST} - {2656551600 -14400 0 WART} - {2675304000 -10800 1 WARST} - {2688606000 -14400 0 WART} - {2706753600 -10800 1 WARST} - {2720055600 -14400 0 WART} - {2738203200 -10800 1 WARST} - {2751505200 -14400 0 WART} - {2770257600 -10800 1 WARST} - {2782954800 -14400 0 WART} - {2801707200 -10800 1 WARST} - {2814404400 -14400 0 WART} - {2833156800 -10800 1 WARST} - {2846458800 -14400 0 WART} - {2864606400 -10800 1 WARST} - {2877908400 -14400 0 WART} - {2896056000 -10800 1 WARST} - {2909358000 -14400 0 WART} - {2927505600 -10800 1 WARST} - {2940807600 -14400 0 WART} - {2959560000 -10800 1 WARST} - {2972257200 -14400 0 WART} - {2991009600 -10800 1 WARST} - {3003706800 -14400 0 WART} - {3022459200 -10800 1 WARST} - {3035761200 -14400 0 WART} - {3053908800 -10800 1 WARST} - {3067210800 -14400 0 WART} - {3085358400 -10800 1 WARST} - {3098660400 -14400 0 WART} - {3117412800 -10800 1 WARST} - {3130110000 -14400 0 WART} - {3148862400 -10800 1 WARST} - {3161559600 -14400 0 WART} - {3180312000 -10800 1 WARST} - {3193009200 -14400 0 WART} - {3211761600 -10800 1 WARST} - {3225063600 -14400 0 WART} - {3243211200 -10800 1 WARST} - {3256513200 -14400 0 WART} - {3274660800 -10800 1 WARST} - {3287962800 -14400 0 WART} - {3306715200 -10800 1 WARST} - {3319412400 -14400 0 WART} - {3338164800 -10800 1 WARST} - {3350862000 -14400 0 WART} - {3369614400 -10800 1 WARST} - {3382916400 -14400 0 WART} - {3401064000 -10800 1 WARST} - {3414366000 -14400 0 WART} - {3432513600 -10800 1 WARST} - {3445815600 -14400 0 WART} - {3463963200 -10800 1 WARST} - {3477265200 -14400 0 WART} - {3496017600 -10800 1 WARST} - {3508714800 -14400 0 WART} - {3527467200 -10800 1 WARST} - {3540164400 -14400 0 WART} - {3558916800 -10800 1 WARST} - {3572218800 -14400 0 WART} - {3590366400 -10800 1 WARST} - {3603668400 -14400 0 WART} - {3621816000 -10800 1 WARST} - {3635118000 -14400 0 WART} - {3653870400 -10800 1 WARST} - {3666567600 -14400 0 WART} - {3685320000 -10800 1 WARST} - {3698017200 -14400 0 WART} - {3716769600 -10800 1 WARST} - {3730071600 -14400 0 WART} - {3748219200 -10800 1 WARST} - {3761521200 -14400 0 WART} - {3779668800 -10800 1 WARST} - {3792970800 -14400 0 WART} - {3811118400 -10800 1 WARST} - {3824420400 -14400 0 WART} - {3843172800 -10800 1 WARST} - {3855870000 -14400 0 WART} - {3874622400 -10800 1 WARST} - {3887319600 -14400 0 WART} - {3906072000 -10800 1 WARST} - {3919374000 -14400 0 WART} - {3937521600 -10800 1 WARST} - {3950823600 -14400 0 WART} - {3968971200 -10800 1 WARST} - {3982273200 -14400 0 WART} - {4001025600 -10800 1 WARST} - {4013722800 -14400 0 WART} - {4032475200 -10800 1 WARST} - {4045172400 -14400 0 WART} - {4063924800 -10800 1 WARST} - {4076622000 -14400 0 WART} - {4095374400 -10800 1 WARST} } diff --git a/library/tzdata/America/Santiago b/library/tzdata/America/Santiago index 9f1d358..a3cd817 100644 --- a/library/tzdata/America/Santiago +++ b/library/tzdata/America/Santiago @@ -108,7 +108,7 @@ set TZData(:America/Santiago) { {1223784000 -10800 1 CLST} {1237086000 -14400 0 CLT} {1255233600 -10800 1 CLST} - {1268535600 -14400 0 CLT} + {1270350000 -14400 0 CLT} {1286683200 -10800 1 CLST} {1299985200 -14400 0 CLT} {1318132800 -10800 1 CLST} diff --git a/library/tzdata/Antarctica/Casey b/library/tzdata/Antarctica/Casey index 053da4c..119d514 100644 --- a/library/tzdata/Antarctica/Casey +++ b/library/tzdata/Antarctica/Casey @@ -4,4 +4,5 @@ set TZData(:Antarctica/Casey) { {-9223372036854775808 0 0 zzz} {-31536000 28800 0 WST} {1255802400 39600 0 CAST} + {1267714800 28800 0 WST} } diff --git a/library/tzdata/Antarctica/Davis b/library/tzdata/Antarctica/Davis index 3c4ab7b..47aece9 100644 --- a/library/tzdata/Antarctica/Davis +++ b/library/tzdata/Antarctica/Davis @@ -6,4 +6,5 @@ set TZData(:Antarctica/Davis) { {-163062000 0 0 zzz} {-28857600 25200 0 DAVT} {1255806000 18000 0 DAVT} + {1268251200 25200 0 DAVT} } diff --git a/library/tzdata/Antarctica/Macquarie b/library/tzdata/Antarctica/Macquarie new file mode 100644 index 0000000..9877ee8 --- /dev/null +++ b/library/tzdata/Antarctica/Macquarie @@ -0,0 +1,102 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:Antarctica/Macquarie) { + {-9223372036854775808 0 0 zzz} + {-1861920000 36000 0 EST} + {-1680508800 39600 1 EST} + {-1669892400 39600 0 EST} + {-1665392400 36000 0 EST} + {-883641600 39600 1 EST} + {-876128400 36000 0 EST} + {-860400000 39600 1 EST} + {-844678800 36000 0 EST} + {-828345600 39600 1 EST} + {-813229200 36000 0 EST} + {-94730400 36000 0 EST} + {-71136000 39600 1 EST} + {-55411200 36000 0 EST} + {-37267200 39600 1 EST} + {-25776000 36000 0 EST} + {-5817600 39600 1 EST} + {5673600 36000 0 EST} + {25632000 39600 1 EST} + {37728000 36000 0 EST} + {57686400 39600 1 EST} + {67968000 36000 0 EST} + {89136000 39600 1 EST} + {100022400 36000 0 EST} + {120585600 39600 1 EST} + {131472000 36000 0 EST} + {152035200 39600 1 EST} + {162921600 36000 0 EST} + {183484800 39600 1 EST} + {194976000 36000 0 EST} + {215539200 39600 1 EST} + {226425600 36000 0 EST} + {246988800 39600 1 EST} + {257875200 36000 0 EST} + {278438400 39600 1 EST} + {289324800 36000 0 EST} + {309888000 39600 1 EST} + {320774400 36000 0 EST} + {341337600 39600 1 EST} + {352224000 36000 0 EST} + {372787200 39600 1 EST} + {386092800 36000 0 EST} + {404841600 39600 1 EST} + {417542400 36000 0 EST} + {436291200 39600 1 EST} + {447177600 36000 0 EST} + {467740800 39600 1 EST} + {478627200 36000 0 EST} + {499190400 39600 1 EST} + {510076800 36000 0 EST} + {530035200 39600 1 EST} + {542736000 36000 0 EST} + {562089600 39600 1 EST} + {574790400 36000 0 EST} + {594144000 39600 1 EST} + {606240000 36000 0 EST} + {625593600 39600 1 EST} + {637689600 36000 0 EST} + {657043200 39600 1 EST} + {670348800 36000 0 EST} + {686678400 39600 1 EST} + {701798400 36000 0 EST} + {718128000 39600 1 EST} + {733248000 36000 0 EST} + {749577600 39600 1 EST} + {764697600 36000 0 EST} + {781027200 39600 1 EST} + {796147200 36000 0 EST} + {812476800 39600 1 EST} + {828201600 36000 0 EST} + {844531200 39600 1 EST} + {859651200 36000 0 EST} + {875980800 39600 1 EST} + {891100800 36000 0 EST} + {907430400 39600 1 EST} + {922550400 36000 0 EST} + {938880000 39600 1 EST} + {954000000 36000 0 EST} + {967305600 39600 1 EST} + {985449600 36000 0 EST} + {1002384000 39600 1 EST} + {1017504000 36000 0 EST} + {1033833600 39600 1 EST} + {1048953600 36000 0 EST} + {1065283200 39600 1 EST} + {1080403200 36000 0 EST} + {1096732800 39600 1 EST} + {1111852800 36000 0 EST} + {1128182400 39600 1 EST} + {1143907200 36000 0 EST} + {1159632000 39600 1 EST} + {1174752000 36000 0 EST} + {1191686400 39600 1 EST} + {1207411200 36000 0 EST} + {1223136000 39600 1 EST} + {1238860800 36000 0 EST} + {1254585600 39600 1 EST} + {1270310400 39600 0 MIST} +} diff --git a/library/tzdata/Asia/Anadyr b/library/tzdata/Asia/Anadyr index c0e98a7..47a1a8c 100644 --- a/library/tzdata/Asia/Anadyr +++ b/library/tzdata/Asia/Anadyr @@ -65,184 +65,185 @@ set TZData(:Asia/Anadyr) { {1224943200 43200 0 ANAT} {1238248800 46800 1 ANAST} {1256392800 43200 0 ANAT} - {1269698400 46800 1 ANAST} - {1288447200 43200 0 ANAT} - {1301148000 46800 1 ANAST} - {1319896800 43200 0 ANAT} - {1332597600 46800 1 ANAST} - {1351346400 43200 0 ANAT} - {1364652000 46800 1 ANAST} - {1382796000 43200 0 ANAT} - {1396101600 46800 1 ANAST} - {1414245600 43200 0 ANAT} - {1427551200 46800 1 ANAST} - {1445695200 43200 0 ANAT} - {1459000800 46800 1 ANAST} - {1477749600 43200 0 ANAT} - {1490450400 46800 1 ANAST} - {1509199200 43200 0 ANAT} - {1521900000 46800 1 ANAST} - {1540648800 43200 0 ANAT} - {1553954400 46800 1 ANAST} - {1572098400 43200 0 ANAT} - {1585404000 46800 1 ANAST} - {1603548000 43200 0 ANAT} - {1616853600 46800 1 ANAST} - {1635602400 43200 0 ANAT} - {1648303200 46800 1 ANAST} - {1667052000 43200 0 ANAT} - {1679752800 46800 1 ANAST} - {1698501600 43200 0 ANAT} - {1711807200 46800 1 ANAST} - {1729951200 43200 0 ANAT} - {1743256800 46800 1 ANAST} - {1761400800 43200 0 ANAT} - {1774706400 46800 1 ANAST} - {1792850400 43200 0 ANAT} - {1806156000 46800 1 ANAST} - {1824904800 43200 0 ANAT} - {1837605600 46800 1 ANAST} - {1856354400 43200 0 ANAT} - {1869055200 46800 1 ANAST} - {1887804000 43200 0 ANAT} - {1901109600 46800 1 ANAST} - {1919253600 43200 0 ANAT} - {1932559200 46800 1 ANAST} - {1950703200 43200 0 ANAT} - {1964008800 46800 1 ANAST} - {1982757600 43200 0 ANAT} - {1995458400 46800 1 ANAST} - {2014207200 43200 0 ANAT} - {2026908000 46800 1 ANAST} - {2045656800 43200 0 ANAT} - {2058357600 46800 1 ANAST} - {2077106400 43200 0 ANAT} - {2090412000 46800 1 ANAST} - {2108556000 43200 0 ANAT} - {2121861600 46800 1 ANAST} - {2140005600 43200 0 ANAT} - {2153311200 46800 1 ANAST} - {2172060000 43200 0 ANAT} - {2184760800 46800 1 ANAST} - {2203509600 43200 0 ANAT} - {2216210400 46800 1 ANAST} - {2234959200 43200 0 ANAT} - {2248264800 46800 1 ANAST} - {2266408800 43200 0 ANAT} - {2279714400 46800 1 ANAST} - {2297858400 43200 0 ANAT} - {2311164000 46800 1 ANAST} - {2329308000 43200 0 ANAT} - {2342613600 46800 1 ANAST} - {2361362400 43200 0 ANAT} - {2374063200 46800 1 ANAST} - {2392812000 43200 0 ANAT} - {2405512800 46800 1 ANAST} - {2424261600 43200 0 ANAT} - {2437567200 46800 1 ANAST} - {2455711200 43200 0 ANAT} - {2469016800 46800 1 ANAST} - {2487160800 43200 0 ANAT} - {2500466400 46800 1 ANAST} - {2519215200 43200 0 ANAT} - {2531916000 46800 1 ANAST} - {2550664800 43200 0 ANAT} - {2563365600 46800 1 ANAST} - {2582114400 43200 0 ANAT} - {2595420000 46800 1 ANAST} - {2613564000 43200 0 ANAT} - {2626869600 46800 1 ANAST} - {2645013600 43200 0 ANAT} - {2658319200 46800 1 ANAST} - {2676463200 43200 0 ANAT} - {2689768800 46800 1 ANAST} - {2708517600 43200 0 ANAT} - {2721218400 46800 1 ANAST} - {2739967200 43200 0 ANAT} - {2752668000 46800 1 ANAST} - {2771416800 43200 0 ANAT} - {2784722400 46800 1 ANAST} - {2802866400 43200 0 ANAT} - {2816172000 46800 1 ANAST} - {2834316000 43200 0 ANAT} - {2847621600 46800 1 ANAST} - {2866370400 43200 0 ANAT} - {2879071200 46800 1 ANAST} - {2897820000 43200 0 ANAT} - {2910520800 46800 1 ANAST} - {2929269600 43200 0 ANAT} - {2941970400 46800 1 ANAST} - {2960719200 43200 0 ANAT} - {2974024800 46800 1 ANAST} - {2992168800 43200 0 ANAT} - {3005474400 46800 1 ANAST} - {3023618400 43200 0 ANAT} - {3036924000 46800 1 ANAST} - {3055672800 43200 0 ANAT} - {3068373600 46800 1 ANAST} - {3087122400 43200 0 ANAT} - {3099823200 46800 1 ANAST} - {3118572000 43200 0 ANAT} - {3131877600 46800 1 ANAST} - {3150021600 43200 0 ANAT} - {3163327200 46800 1 ANAST} - {3181471200 43200 0 ANAT} - {3194776800 46800 1 ANAST} - {3212920800 43200 0 ANAT} - {3226226400 46800 1 ANAST} - {3244975200 43200 0 ANAT} - {3257676000 46800 1 ANAST} - {3276424800 43200 0 ANAT} - {3289125600 46800 1 ANAST} - {3307874400 43200 0 ANAT} - {3321180000 46800 1 ANAST} - {3339324000 43200 0 ANAT} - {3352629600 46800 1 ANAST} - {3370773600 43200 0 ANAT} - {3384079200 46800 1 ANAST} - {3402828000 43200 0 ANAT} - {3415528800 46800 1 ANAST} - {3434277600 43200 0 ANAT} - {3446978400 46800 1 ANAST} - {3465727200 43200 0 ANAT} - {3479032800 46800 1 ANAST} - {3497176800 43200 0 ANAT} - {3510482400 46800 1 ANAST} - {3528626400 43200 0 ANAT} - {3541932000 46800 1 ANAST} - {3560076000 43200 0 ANAT} - {3573381600 46800 1 ANAST} - {3592130400 43200 0 ANAT} - {3604831200 46800 1 ANAST} - {3623580000 43200 0 ANAT} - {3636280800 46800 1 ANAST} - {3655029600 43200 0 ANAT} - {3668335200 46800 1 ANAST} - {3686479200 43200 0 ANAT} - {3699784800 46800 1 ANAST} - {3717928800 43200 0 ANAT} - {3731234400 46800 1 ANAST} - {3749983200 43200 0 ANAT} - {3762684000 46800 1 ANAST} - {3781432800 43200 0 ANAT} - {3794133600 46800 1 ANAST} - {3812882400 43200 0 ANAT} - {3825583200 46800 1 ANAST} - {3844332000 43200 0 ANAT} - {3857637600 46800 1 ANAST} - {3875781600 43200 0 ANAT} - {3889087200 46800 1 ANAST} - {3907231200 43200 0 ANAT} - {3920536800 46800 1 ANAST} - {3939285600 43200 0 ANAT} - {3951986400 46800 1 ANAST} - {3970735200 43200 0 ANAT} - {3983436000 46800 1 ANAST} - {4002184800 43200 0 ANAT} - {4015490400 46800 1 ANAST} - {4033634400 43200 0 ANAT} - {4046940000 46800 1 ANAST} - {4065084000 43200 0 ANAT} - {4078389600 46800 1 ANAST} - {4096533600 43200 0 ANAT} + {1269698400 39600 0 ANAMMTT} + {1269702000 43200 1 ANAST} + {1288450800 39600 0 ANAT} + {1301151600 43200 1 ANAST} + {1319900400 39600 0 ANAT} + {1332601200 43200 1 ANAST} + {1351350000 39600 0 ANAT} + {1364655600 43200 1 ANAST} + {1382799600 39600 0 ANAT} + {1396105200 43200 1 ANAST} + {1414249200 39600 0 ANAT} + {1427554800 43200 1 ANAST} + {1445698800 39600 0 ANAT} + {1459004400 43200 1 ANAST} + {1477753200 39600 0 ANAT} + {1490454000 43200 1 ANAST} + {1509202800 39600 0 ANAT} + {1521903600 43200 1 ANAST} + {1540652400 39600 0 ANAT} + {1553958000 43200 1 ANAST} + {1572102000 39600 0 ANAT} + {1585407600 43200 1 ANAST} + {1603551600 39600 0 ANAT} + {1616857200 43200 1 ANAST} + {1635606000 39600 0 ANAT} + {1648306800 43200 1 ANAST} + {1667055600 39600 0 ANAT} + {1679756400 43200 1 ANAST} + {1698505200 39600 0 ANAT} + {1711810800 43200 1 ANAST} + {1729954800 39600 0 ANAT} + {1743260400 43200 1 ANAST} + {1761404400 39600 0 ANAT} + {1774710000 43200 1 ANAST} + {1792854000 39600 0 ANAT} + {1806159600 43200 1 ANAST} + {1824908400 39600 0 ANAT} + {1837609200 43200 1 ANAST} + {1856358000 39600 0 ANAT} + {1869058800 43200 1 ANAST} + {1887807600 39600 0 ANAT} + {1901113200 43200 1 ANAST} + {1919257200 39600 0 ANAT} + {1932562800 43200 1 ANAST} + {1950706800 39600 0 ANAT} + {1964012400 43200 1 ANAST} + {1982761200 39600 0 ANAT} + {1995462000 43200 1 ANAST} + {2014210800 39600 0 ANAT} + {2026911600 43200 1 ANAST} + {2045660400 39600 0 ANAT} + {2058361200 43200 1 ANAST} + {2077110000 39600 0 ANAT} + {2090415600 43200 1 ANAST} + {2108559600 39600 0 ANAT} + {2121865200 43200 1 ANAST} + {2140009200 39600 0 ANAT} + {2153314800 43200 1 ANAST} + {2172063600 39600 0 ANAT} + {2184764400 43200 1 ANAST} + {2203513200 39600 0 ANAT} + {2216214000 43200 1 ANAST} + {2234962800 39600 0 ANAT} + {2248268400 43200 1 ANAST} + {2266412400 39600 0 ANAT} + {2279718000 43200 1 ANAST} + {2297862000 39600 0 ANAT} + {2311167600 43200 1 ANAST} + {2329311600 39600 0 ANAT} + {2342617200 43200 1 ANAST} + {2361366000 39600 0 ANAT} + {2374066800 43200 1 ANAST} + {2392815600 39600 0 ANAT} + {2405516400 43200 1 ANAST} + {2424265200 39600 0 ANAT} + {2437570800 43200 1 ANAST} + {2455714800 39600 0 ANAT} + {2469020400 43200 1 ANAST} + {2487164400 39600 0 ANAT} + {2500470000 43200 1 ANAST} + {2519218800 39600 0 ANAT} + {2531919600 43200 1 ANAST} + {2550668400 39600 0 ANAT} + {2563369200 43200 1 ANAST} + {2582118000 39600 0 ANAT} + {2595423600 43200 1 ANAST} + {2613567600 39600 0 ANAT} + {2626873200 43200 1 ANAST} + {2645017200 39600 0 ANAT} + {2658322800 43200 1 ANAST} + {2676466800 39600 0 ANAT} + {2689772400 43200 1 ANAST} + {2708521200 39600 0 ANAT} + {2721222000 43200 1 ANAST} + {2739970800 39600 0 ANAT} + {2752671600 43200 1 ANAST} + {2771420400 39600 0 ANAT} + {2784726000 43200 1 ANAST} + {2802870000 39600 0 ANAT} + {2816175600 43200 1 ANAST} + {2834319600 39600 0 ANAT} + {2847625200 43200 1 ANAST} + {2866374000 39600 0 ANAT} + {2879074800 43200 1 ANAST} + {2897823600 39600 0 ANAT} + {2910524400 43200 1 ANAST} + {2929273200 39600 0 ANAT} + {2941974000 43200 1 ANAST} + {2960722800 39600 0 ANAT} + {2974028400 43200 1 ANAST} + {2992172400 39600 0 ANAT} + {3005478000 43200 1 ANAST} + {3023622000 39600 0 ANAT} + {3036927600 43200 1 ANAST} + {3055676400 39600 0 ANAT} + {3068377200 43200 1 ANAST} + {3087126000 39600 0 ANAT} + {3099826800 43200 1 ANAST} + {3118575600 39600 0 ANAT} + {3131881200 43200 1 ANAST} + {3150025200 39600 0 ANAT} + {3163330800 43200 1 ANAST} + {3181474800 39600 0 ANAT} + {3194780400 43200 1 ANAST} + {3212924400 39600 0 ANAT} + {3226230000 43200 1 ANAST} + {3244978800 39600 0 ANAT} + {3257679600 43200 1 ANAST} + {3276428400 39600 0 ANAT} + {3289129200 43200 1 ANAST} + {3307878000 39600 0 ANAT} + {3321183600 43200 1 ANAST} + {3339327600 39600 0 ANAT} + {3352633200 43200 1 ANAST} + {3370777200 39600 0 ANAT} + {3384082800 43200 1 ANAST} + {3402831600 39600 0 ANAT} + {3415532400 43200 1 ANAST} + {3434281200 39600 0 ANAT} + {3446982000 43200 1 ANAST} + {3465730800 39600 0 ANAT} + {3479036400 43200 1 ANAST} + {3497180400 39600 0 ANAT} + {3510486000 43200 1 ANAST} + {3528630000 39600 0 ANAT} + {3541935600 43200 1 ANAST} + {3560079600 39600 0 ANAT} + {3573385200 43200 1 ANAST} + {3592134000 39600 0 ANAT} + {3604834800 43200 1 ANAST} + {3623583600 39600 0 ANAT} + {3636284400 43200 1 ANAST} + {3655033200 39600 0 ANAT} + {3668338800 43200 1 ANAST} + {3686482800 39600 0 ANAT} + {3699788400 43200 1 ANAST} + {3717932400 39600 0 ANAT} + {3731238000 43200 1 ANAST} + {3749986800 39600 0 ANAT} + {3762687600 43200 1 ANAST} + {3781436400 39600 0 ANAT} + {3794137200 43200 1 ANAST} + {3812886000 39600 0 ANAT} + {3825586800 43200 1 ANAST} + {3844335600 39600 0 ANAT} + {3857641200 43200 1 ANAST} + {3875785200 39600 0 ANAT} + {3889090800 43200 1 ANAST} + {3907234800 39600 0 ANAT} + {3920540400 43200 1 ANAST} + {3939289200 39600 0 ANAT} + {3951990000 43200 1 ANAST} + {3970738800 39600 0 ANAT} + {3983439600 43200 1 ANAST} + {4002188400 39600 0 ANAT} + {4015494000 43200 1 ANAST} + {4033638000 39600 0 ANAT} + {4046943600 43200 1 ANAST} + {4065087600 39600 0 ANAT} + {4078393200 43200 1 ANAST} + {4096537200 39600 0 ANAT} } diff --git a/library/tzdata/Asia/Damascus b/library/tzdata/Asia/Damascus index 1a66b1d..2ea1770 100644 --- a/library/tzdata/Asia/Damascus +++ b/library/tzdata/Asia/Damascus @@ -97,184 +97,184 @@ set TZData(:Asia/Damascus) { {1225486800 7200 0 EET} {1238104800 10800 1 EEST} {1256850000 7200 0 EET} - {1269554400 10800 1 EEST} + {1270159200 10800 1 EEST} {1288299600 7200 0 EET} - {1301004000 10800 1 EEST} + {1301608800 10800 1 EEST} {1319749200 7200 0 EET} - {1333058400 10800 1 EEST} + {1333663200 10800 1 EEST} {1351198800 7200 0 EET} - {1364508000 10800 1 EEST} + {1365112800 10800 1 EEST} {1382648400 7200 0 EET} - {1395957600 10800 1 EEST} + {1396562400 10800 1 EEST} {1414702800 7200 0 EET} - {1427407200 10800 1 EEST} + {1428012000 10800 1 EEST} {1446152400 7200 0 EET} - {1458856800 10800 1 EEST} + {1459461600 10800 1 EEST} {1477602000 7200 0 EET} - {1490911200 10800 1 EEST} + {1491516000 10800 1 EEST} {1509051600 7200 0 EET} - {1522360800 10800 1 EEST} + {1522965600 10800 1 EEST} {1540501200 7200 0 EET} - {1553810400 10800 1 EEST} + {1554415200 10800 1 EEST} {1571950800 7200 0 EET} - {1585260000 10800 1 EEST} + {1585864800 10800 1 EEST} {1604005200 7200 0 EET} - {1616709600 10800 1 EEST} + {1617314400 10800 1 EEST} {1635454800 7200 0 EET} - {1648159200 10800 1 EEST} + {1648764000 10800 1 EEST} {1666904400 7200 0 EET} - {1680213600 10800 1 EEST} + {1680818400 10800 1 EEST} {1698354000 7200 0 EET} - {1711663200 10800 1 EEST} + {1712268000 10800 1 EEST} {1729803600 7200 0 EET} - {1743112800 10800 1 EEST} + {1743717600 10800 1 EEST} {1761858000 7200 0 EET} - {1774562400 10800 1 EEST} + {1775167200 10800 1 EEST} {1793307600 7200 0 EET} - {1806012000 10800 1 EEST} + {1806616800 10800 1 EEST} {1824757200 7200 0 EET} - {1838066400 10800 1 EEST} + {1838671200 10800 1 EEST} {1856206800 7200 0 EET} - {1869516000 10800 1 EEST} + {1870120800 10800 1 EEST} {1887656400 7200 0 EET} - {1900965600 10800 1 EEST} + {1901570400 10800 1 EEST} {1919106000 7200 0 EET} - {1932415200 10800 1 EEST} + {1933020000 10800 1 EEST} {1951160400 7200 0 EET} - {1963864800 10800 1 EEST} + {1964469600 10800 1 EEST} {1982610000 7200 0 EET} - {1995314400 10800 1 EEST} + {1995919200 10800 1 EEST} {2014059600 7200 0 EET} - {2027368800 10800 1 EEST} + {2027973600 10800 1 EEST} {2045509200 7200 0 EET} - {2058818400 10800 1 EEST} + {2059423200 10800 1 EEST} {2076958800 7200 0 EET} - {2090268000 10800 1 EEST} + {2090872800 10800 1 EEST} {2109013200 7200 0 EET} - {2121717600 10800 1 EEST} + {2122322400 10800 1 EEST} {2140462800 7200 0 EET} - {2153167200 10800 1 EEST} + {2153772000 10800 1 EEST} {2171912400 7200 0 EET} - {2184616800 10800 1 EEST} + {2185221600 10800 1 EEST} {2203362000 7200 0 EET} - {2216671200 10800 1 EEST} + {2217276000 10800 1 EEST} {2234811600 7200 0 EET} - {2248120800 10800 1 EEST} + {2248725600 10800 1 EEST} {2266261200 7200 0 EET} - {2279570400 10800 1 EEST} + {2280175200 10800 1 EEST} {2298315600 7200 0 EET} - {2311020000 10800 1 EEST} + {2311624800 10800 1 EEST} {2329765200 7200 0 EET} - {2342469600 10800 1 EEST} + {2343074400 10800 1 EEST} {2361214800 7200 0 EET} - {2374524000 10800 1 EEST} + {2375128800 10800 1 EEST} {2392664400 7200 0 EET} - {2405973600 10800 1 EEST} + {2406578400 10800 1 EEST} {2424114000 7200 0 EET} - {2437423200 10800 1 EEST} + {2438028000 10800 1 EEST} {2455563600 7200 0 EET} - {2468872800 10800 1 EEST} + {2469477600 10800 1 EEST} {2487618000 7200 0 EET} - {2500322400 10800 1 EEST} + {2500927200 10800 1 EEST} {2519067600 7200 0 EET} - {2531772000 10800 1 EEST} + {2532376800 10800 1 EEST} {2550517200 7200 0 EET} - {2563826400 10800 1 EEST} + {2564431200 10800 1 EEST} {2581966800 7200 0 EET} - {2595276000 10800 1 EEST} + {2595880800 10800 1 EEST} {2613416400 7200 0 EET} - {2626725600 10800 1 EEST} + {2627330400 10800 1 EEST} {2645470800 7200 0 EET} - {2658175200 10800 1 EEST} + {2658780000 10800 1 EEST} {2676920400 7200 0 EET} - {2689624800 10800 1 EEST} + {2690229600 10800 1 EEST} {2708370000 7200 0 EET} - {2721679200 10800 1 EEST} + {2722284000 10800 1 EEST} {2739819600 7200 0 EET} - {2753128800 10800 1 EEST} + {2753733600 10800 1 EEST} {2771269200 7200 0 EET} - {2784578400 10800 1 EEST} + {2785183200 10800 1 EEST} {2802718800 7200 0 EET} - {2816028000 10800 1 EEST} + {2816632800 10800 1 EEST} {2834773200 7200 0 EET} - {2847477600 10800 1 EEST} + {2848082400 10800 1 EEST} {2866222800 7200 0 EET} - {2878927200 10800 1 EEST} + {2879532000 10800 1 EEST} {2897672400 7200 0 EET} - {2910981600 10800 1 EEST} + {2911586400 10800 1 EEST} {2929122000 7200 0 EET} - {2942431200 10800 1 EEST} + {2943036000 10800 1 EEST} {2960571600 7200 0 EET} - {2973880800 10800 1 EEST} + {2974485600 10800 1 EEST} {2992626000 7200 0 EET} - {3005330400 10800 1 EEST} + {3005935200 10800 1 EEST} {3024075600 7200 0 EET} - {3036780000 10800 1 EEST} + {3037384800 10800 1 EEST} {3055525200 7200 0 EET} - {3068229600 10800 1 EEST} + {3068834400 10800 1 EEST} {3086974800 7200 0 EET} - {3100284000 10800 1 EEST} + {3100888800 10800 1 EEST} {3118424400 7200 0 EET} - {3131733600 10800 1 EEST} + {3132338400 10800 1 EEST} {3149874000 7200 0 EET} - {3163183200 10800 1 EEST} + {3163788000 10800 1 EEST} {3181928400 7200 0 EET} - {3194632800 10800 1 EEST} + {3195237600 10800 1 EEST} {3213378000 7200 0 EET} - {3226082400 10800 1 EEST} + {3226687200 10800 1 EEST} {3244827600 7200 0 EET} - {3258136800 10800 1 EEST} + {3258741600 10800 1 EEST} {3276277200 7200 0 EET} - {3289586400 10800 1 EEST} + {3290191200 10800 1 EEST} {3307726800 7200 0 EET} - {3321036000 10800 1 EEST} + {3321640800 10800 1 EEST} {3339176400 7200 0 EET} - {3352485600 10800 1 EEST} + {3353090400 10800 1 EEST} {3371230800 7200 0 EET} - {3383935200 10800 1 EEST} + {3384540000 10800 1 EEST} {3402680400 7200 0 EET} - {3415384800 10800 1 EEST} + {3415989600 10800 1 EEST} {3434130000 7200 0 EET} - {3447439200 10800 1 EEST} + {3448044000 10800 1 EEST} {3465579600 7200 0 EET} - {3478888800 10800 1 EEST} + {3479493600 10800 1 EEST} {3497029200 7200 0 EET} - {3510338400 10800 1 EEST} + {3510943200 10800 1 EEST} {3529083600 7200 0 EET} - {3541788000 10800 1 EEST} + {3542392800 10800 1 EEST} {3560533200 7200 0 EET} - {3573237600 10800 1 EEST} + {3573842400 10800 1 EEST} {3591982800 7200 0 EET} - {3605292000 10800 1 EEST} + {3605896800 10800 1 EEST} {3623432400 7200 0 EET} - {3636741600 10800 1 EEST} + {3637346400 10800 1 EEST} {3654882000 7200 0 EET} - {3668191200 10800 1 EEST} + {3668796000 10800 1 EEST} {3686331600 7200 0 EET} - {3699640800 10800 1 EEST} + {3700245600 10800 1 EEST} {3718386000 7200 0 EET} - {3731090400 10800 1 EEST} + {3731695200 10800 1 EEST} {3749835600 7200 0 EET} - {3762540000 10800 1 EEST} + {3763144800 10800 1 EEST} {3781285200 7200 0 EET} - {3794594400 10800 1 EEST} + {3795199200 10800 1 EEST} {3812734800 7200 0 EET} - {3826044000 10800 1 EEST} + {3826648800 10800 1 EEST} {3844184400 7200 0 EET} - {3857493600 10800 1 EEST} + {3858098400 10800 1 EEST} {3876238800 7200 0 EET} - {3888943200 10800 1 EEST} + {3889548000 10800 1 EEST} {3907688400 7200 0 EET} - {3920392800 10800 1 EEST} + {3920997600 10800 1 EEST} {3939138000 7200 0 EET} - {3951842400 10800 1 EEST} + {3952447200 10800 1 EEST} {3970587600 7200 0 EET} - {3983896800 10800 1 EEST} + {3984501600 10800 1 EEST} {4002037200 7200 0 EET} - {4015346400 10800 1 EEST} + {4015951200 10800 1 EEST} {4033486800 7200 0 EET} - {4046796000 10800 1 EEST} + {4047400800 10800 1 EEST} {4065541200 7200 0 EET} - {4078245600 10800 1 EEST} + {4078850400 10800 1 EEST} {4096990800 7200 0 EET} } diff --git a/library/tzdata/Asia/Dhaka b/library/tzdata/Asia/Dhaka index ecd94cd..e0c270d 100644 --- a/library/tzdata/Asia/Dhaka +++ b/library/tzdata/Asia/Dhaka @@ -10,184 +10,5 @@ set TZData(:Asia/Dhaka) { {38772000 21600 0 BDT} {1230746400 21600 0 BDT} {1245430800 25200 1 BDST} - {1270054800 25200 1 BDST} - {1288544400 21600 0 BDT} - {1301590800 25200 1 BDST} - {1320080400 21600 0 BDT} - {1333213200 25200 1 BDST} - {1351702800 21600 0 BDT} - {1364749200 25200 1 BDST} - {1383238800 21600 0 BDT} - {1396285200 25200 1 BDST} - {1414774800 21600 0 BDT} - {1427821200 25200 1 BDST} - {1446310800 21600 0 BDT} - {1459443600 25200 1 BDST} - {1477933200 21600 0 BDT} - {1490979600 25200 1 BDST} - {1509469200 21600 0 BDT} - {1522515600 25200 1 BDST} - {1541005200 21600 0 BDT} - {1554051600 25200 1 BDST} - {1572541200 21600 0 BDT} - {1585674000 25200 1 BDST} - {1604163600 21600 0 BDT} - {1617210000 25200 1 BDST} - {1635699600 21600 0 BDT} - {1648746000 25200 1 BDST} - {1667235600 21600 0 BDT} - {1680282000 25200 1 BDST} - {1698771600 21600 0 BDT} - {1711904400 25200 1 BDST} - {1730394000 21600 0 BDT} - {1743440400 25200 1 BDST} - {1761930000 21600 0 BDT} - {1774976400 25200 1 BDST} - {1793466000 21600 0 BDT} - {1806512400 25200 1 BDST} - {1825002000 21600 0 BDT} - {1838134800 25200 1 BDST} - {1856624400 21600 0 BDT} - {1869670800 25200 1 BDST} - {1888160400 21600 0 BDT} - {1901206800 25200 1 BDST} - {1919696400 21600 0 BDT} - {1932742800 25200 1 BDST} - {1951232400 21600 0 BDT} - {1964365200 25200 1 BDST} - {1982854800 21600 0 BDT} - {1995901200 25200 1 BDST} - {2014390800 21600 0 BDT} - {2027437200 25200 1 BDST} - {2045926800 21600 0 BDT} - {2058973200 25200 1 BDST} - {2077462800 21600 0 BDT} - {2090595600 25200 1 BDST} - {2109085200 21600 0 BDT} - {2122131600 25200 1 BDST} - {2140621200 21600 0 BDT} - {2153667600 25200 1 BDST} - {2172157200 21600 0 BDT} - {2185203600 25200 1 BDST} - {2203693200 21600 0 BDT} - {2216826000 25200 1 BDST} - {2235315600 21600 0 BDT} - {2248362000 25200 1 BDST} - {2266851600 21600 0 BDT} - {2279898000 25200 1 BDST} - {2298387600 21600 0 BDT} - {2311434000 25200 1 BDST} - {2329923600 21600 0 BDT} - {2343056400 25200 1 BDST} - {2361546000 21600 0 BDT} - {2374592400 25200 1 BDST} - {2393082000 21600 0 BDT} - {2406128400 25200 1 BDST} - {2424618000 21600 0 BDT} - {2437664400 25200 1 BDST} - {2456154000 21600 0 BDT} - {2469286800 25200 1 BDST} - {2487776400 21600 0 BDT} - {2500822800 25200 1 BDST} - {2519312400 21600 0 BDT} - {2532358800 25200 1 BDST} - {2550848400 21600 0 BDT} - {2563894800 25200 1 BDST} - {2582384400 21600 0 BDT} - {2595517200 25200 1 BDST} - {2614006800 21600 0 BDT} - {2627053200 25200 1 BDST} - {2645542800 21600 0 BDT} - {2658589200 25200 1 BDST} - {2677078800 21600 0 BDT} - {2690125200 25200 1 BDST} - {2708614800 21600 0 BDT} - {2721747600 25200 1 BDST} - {2740237200 21600 0 BDT} - {2753283600 25200 1 BDST} - {2771773200 21600 0 BDT} - {2784819600 25200 1 BDST} - {2803309200 21600 0 BDT} - {2816355600 25200 1 BDST} - {2834845200 21600 0 BDT} - {2847978000 25200 1 BDST} - {2866467600 21600 0 BDT} - {2879514000 25200 1 BDST} - {2898003600 21600 0 BDT} - {2911050000 25200 1 BDST} - {2929539600 21600 0 BDT} - {2942586000 25200 1 BDST} - {2961075600 21600 0 BDT} - {2974208400 25200 1 BDST} - {2992698000 21600 0 BDT} - {3005744400 25200 1 BDST} - {3024234000 21600 0 BDT} - {3037280400 25200 1 BDST} - {3055770000 21600 0 BDT} - {3068816400 25200 1 BDST} - {3087306000 21600 0 BDT} - {3100438800 25200 1 BDST} - {3118928400 21600 0 BDT} - {3131974800 25200 1 BDST} - {3150464400 21600 0 BDT} - {3163510800 25200 1 BDST} - {3182000400 21600 0 BDT} - {3195046800 25200 1 BDST} - {3213536400 21600 0 BDT} - {3226669200 25200 1 BDST} - {3245158800 21600 0 BDT} - {3258205200 25200 1 BDST} - {3276694800 21600 0 BDT} - {3289741200 25200 1 BDST} - {3308230800 21600 0 BDT} - {3321277200 25200 1 BDST} - {3339766800 21600 0 BDT} - {3352899600 25200 1 BDST} - {3371389200 21600 0 BDT} - {3384435600 25200 1 BDST} - {3402925200 21600 0 BDT} - {3415971600 25200 1 BDST} - {3434461200 21600 0 BDT} - {3447507600 25200 1 BDST} - {3465997200 21600 0 BDT} - {3479130000 25200 1 BDST} - {3497619600 21600 0 BDT} - {3510666000 25200 1 BDST} - {3529155600 21600 0 BDT} - {3542202000 25200 1 BDST} - {3560691600 21600 0 BDT} - {3573738000 25200 1 BDST} - {3592227600 21600 0 BDT} - {3605360400 25200 1 BDST} - {3623850000 21600 0 BDT} - {3636896400 25200 1 BDST} - {3655386000 21600 0 BDT} - {3668432400 25200 1 BDST} - {3686922000 21600 0 BDT} - {3699968400 25200 1 BDST} - {3718458000 21600 0 BDT} - {3731590800 25200 1 BDST} - {3750080400 21600 0 BDT} - {3763126800 25200 1 BDST} - {3781616400 21600 0 BDT} - {3794662800 25200 1 BDST} - {3813152400 21600 0 BDT} - {3826198800 25200 1 BDST} - {3844688400 21600 0 BDT} - {3857821200 25200 1 BDST} - {3876310800 21600 0 BDT} - {3889357200 25200 1 BDST} - {3907846800 21600 0 BDT} - {3920893200 25200 1 BDST} - {3939382800 21600 0 BDT} - {3952429200 25200 1 BDST} - {3970918800 21600 0 BDT} - {3984051600 25200 1 BDST} - {4002541200 21600 0 BDT} - {4015587600 25200 1 BDST} - {4034077200 21600 0 BDT} - {4047123600 25200 1 BDST} - {4065613200 21600 0 BDT} - {4078659600 25200 1 BDST} - {4097149200 21600 0 BDT} + {1262278740 21600 0 BDT} } diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index 127855d..d8aaab6 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -92,184 +92,184 @@ set TZData(:Asia/Gaza) { {1219964400 7200 0 EET} {1238104800 10800 1 EEST} {1252018800 7200 0 EET} - {1269554400 10800 1 EEST} + {1269640860 10800 1 EEST} {1283468400 7200 0 EET} - {1301004000 10800 1 EEST} + {1301090460 10800 1 EEST} {1314918000 7200 0 EET} - {1333058400 10800 1 EEST} + {1333144860 10800 1 EEST} {1346972400 7200 0 EET} - {1364508000 10800 1 EEST} + {1364594460 10800 1 EEST} {1378422000 7200 0 EET} - {1395957600 10800 1 EEST} + {1396044060 10800 1 EEST} {1409871600 7200 0 EET} - {1427407200 10800 1 EEST} + {1427493660 10800 1 EEST} {1441321200 7200 0 EET} - {1458856800 10800 1 EEST} + {1458943260 10800 1 EEST} {1472770800 7200 0 EET} - {1490911200 10800 1 EEST} + {1490392860 10800 1 EEST} {1504220400 7200 0 EET} - {1522360800 10800 1 EEST} + {1522447260 10800 1 EEST} {1536274800 7200 0 EET} - {1553810400 10800 1 EEST} + {1553896860 10800 1 EEST} {1567724400 7200 0 EET} - {1585260000 10800 1 EEST} + {1585346460 10800 1 EEST} {1599174000 7200 0 EET} - {1616709600 10800 1 EEST} + {1616796060 10800 1 EEST} {1630623600 7200 0 EET} - {1648159200 10800 1 EEST} + {1648245660 10800 1 EEST} {1662073200 7200 0 EET} - {1680213600 10800 1 EEST} + {1679695260 10800 1 EEST} {1693522800 7200 0 EET} - {1711663200 10800 1 EEST} + {1711749660 10800 1 EEST} {1725577200 7200 0 EET} - {1743112800 10800 1 EEST} + {1743199260 10800 1 EEST} {1757026800 7200 0 EET} - {1774562400 10800 1 EEST} + {1774648860 10800 1 EEST} {1788476400 7200 0 EET} - {1806012000 10800 1 EEST} + {1806098460 10800 1 EEST} {1819926000 7200 0 EET} - {1838066400 10800 1 EEST} + {1837548060 10800 1 EEST} {1851375600 7200 0 EET} - {1869516000 10800 1 EEST} + {1869602460 10800 1 EEST} {1883430000 7200 0 EET} - {1900965600 10800 1 EEST} + {1901052060 10800 1 EEST} {1914879600 7200 0 EET} - {1932415200 10800 1 EEST} + {1932501660 10800 1 EEST} {1946329200 7200 0 EET} - {1963864800 10800 1 EEST} + {1963951260 10800 1 EEST} {1977778800 7200 0 EET} - {1995314400 10800 1 EEST} + {1995400860 10800 1 EEST} {2009228400 7200 0 EET} - {2027368800 10800 1 EEST} + {2026850460 10800 1 EEST} {2040678000 7200 0 EET} - {2058818400 10800 1 EEST} + {2058904860 10800 1 EEST} {2072732400 7200 0 EET} - {2090268000 10800 1 EEST} + {2090354460 10800 1 EEST} {2104182000 7200 0 EET} - {2121717600 10800 1 EEST} + {2121804060 10800 1 EEST} {2135631600 7200 0 EET} - {2153167200 10800 1 EEST} + {2153253660 10800 1 EEST} {2167081200 7200 0 EET} - {2184616800 10800 1 EEST} + {2184703260 10800 1 EEST} {2198530800 7200 0 EET} - {2216671200 10800 1 EEST} + {2216757660 10800 1 EEST} {2230585200 7200 0 EET} - {2248120800 10800 1 EEST} + {2248207260 10800 1 EEST} {2262034800 7200 0 EET} - {2279570400 10800 1 EEST} + {2279656860 10800 1 EEST} {2293484400 7200 0 EET} - {2311020000 10800 1 EEST} + {2311106460 10800 1 EEST} {2324934000 7200 0 EET} - {2342469600 10800 1 EEST} + {2342556060 10800 1 EEST} {2356383600 7200 0 EET} - {2374524000 10800 1 EEST} + {2374005660 10800 1 EEST} {2387833200 7200 0 EET} - {2405973600 10800 1 EEST} + {2406060060 10800 1 EEST} {2419887600 7200 0 EET} - {2437423200 10800 1 EEST} + {2437509660 10800 1 EEST} {2451337200 7200 0 EET} - {2468872800 10800 1 EEST} + {2468959260 10800 1 EEST} {2482786800 7200 0 EET} - {2500322400 10800 1 EEST} + {2500408860 10800 1 EEST} {2514236400 7200 0 EET} - {2531772000 10800 1 EEST} + {2531858460 10800 1 EEST} {2545686000 7200 0 EET} - {2563826400 10800 1 EEST} + {2563308060 10800 1 EEST} {2577135600 7200 0 EET} - {2595276000 10800 1 EEST} + {2595362460 10800 1 EEST} {2609190000 7200 0 EET} - {2626725600 10800 1 EEST} + {2626812060 10800 1 EEST} {2640639600 7200 0 EET} - {2658175200 10800 1 EEST} + {2658261660 10800 1 EEST} {2672089200 7200 0 EET} - {2689624800 10800 1 EEST} + {2689711260 10800 1 EEST} {2703538800 7200 0 EET} - {2721679200 10800 1 EEST} + {2721160860 10800 1 EEST} {2734988400 7200 0 EET} - {2753128800 10800 1 EEST} + {2753215260 10800 1 EEST} {2767042800 7200 0 EET} - {2784578400 10800 1 EEST} + {2784664860 10800 1 EEST} {2798492400 7200 0 EET} - {2816028000 10800 1 EEST} + {2816114460 10800 1 EEST} {2829942000 7200 0 EET} - {2847477600 10800 1 EEST} + {2847564060 10800 1 EEST} {2861391600 7200 0 EET} - {2878927200 10800 1 EEST} + {2879013660 10800 1 EEST} {2892841200 7200 0 EET} - {2910981600 10800 1 EEST} + {2910463260 10800 1 EEST} {2924290800 7200 0 EET} - {2942431200 10800 1 EEST} + {2942517660 10800 1 EEST} {2956345200 7200 0 EET} - {2973880800 10800 1 EEST} + {2973967260 10800 1 EEST} {2987794800 7200 0 EET} - {3005330400 10800 1 EEST} + {3005416860 10800 1 EEST} {3019244400 7200 0 EET} - {3036780000 10800 1 EEST} + {3036866460 10800 1 EEST} {3050694000 7200 0 EET} - {3068229600 10800 1 EEST} + {3068316060 10800 1 EEST} {3082143600 7200 0 EET} - {3100284000 10800 1 EEST} + {3100370460 10800 1 EEST} {3114198000 7200 0 EET} - {3131733600 10800 1 EEST} + {3131820060 10800 1 EEST} {3145647600 7200 0 EET} - {3163183200 10800 1 EEST} + {3163269660 10800 1 EEST} {3177097200 7200 0 EET} - {3194632800 10800 1 EEST} + {3194719260 10800 1 EEST} {3208546800 7200 0 EET} - {3226082400 10800 1 EEST} + {3226168860 10800 1 EEST} {3239996400 7200 0 EET} - {3258136800 10800 1 EEST} + {3257618460 10800 1 EEST} {3271446000 7200 0 EET} - {3289586400 10800 1 EEST} + {3289672860 10800 1 EEST} {3303500400 7200 0 EET} - {3321036000 10800 1 EEST} + {3321122460 10800 1 EEST} {3334950000 7200 0 EET} - {3352485600 10800 1 EEST} + {3352572060 10800 1 EEST} {3366399600 7200 0 EET} - {3383935200 10800 1 EEST} + {3384021660 10800 1 EEST} {3397849200 7200 0 EET} - {3415384800 10800 1 EEST} + {3415471260 10800 1 EEST} {3429298800 7200 0 EET} - {3447439200 10800 1 EEST} + {3446920860 10800 1 EEST} {3460748400 7200 0 EET} - {3478888800 10800 1 EEST} + {3478975260 10800 1 EEST} {3492802800 7200 0 EET} - {3510338400 10800 1 EEST} + {3510424860 10800 1 EEST} {3524252400 7200 0 EET} - {3541788000 10800 1 EEST} + {3541874460 10800 1 EEST} {3555702000 7200 0 EET} - {3573237600 10800 1 EEST} + {3573324060 10800 1 EEST} {3587151600 7200 0 EET} - {3605292000 10800 1 EEST} + {3604773660 10800 1 EEST} {3618601200 7200 0 EET} - {3636741600 10800 1 EEST} + {3636828060 10800 1 EEST} {3650655600 7200 0 EET} - {3668191200 10800 1 EEST} + {3668277660 10800 1 EEST} {3682105200 7200 0 EET} - {3699640800 10800 1 EEST} + {3699727260 10800 1 EEST} {3713554800 7200 0 EET} - {3731090400 10800 1 EEST} + {3731176860 10800 1 EEST} {3745004400 7200 0 EET} - {3762540000 10800 1 EEST} + {3762626460 10800 1 EEST} {3776454000 7200 0 EET} - {3794594400 10800 1 EEST} + {3794076060 10800 1 EEST} {3807903600 7200 0 EET} - {3826044000 10800 1 EEST} + {3826130460 10800 1 EEST} {3839958000 7200 0 EET} - {3857493600 10800 1 EEST} + {3857580060 10800 1 EEST} {3871407600 7200 0 EET} - {3888943200 10800 1 EEST} + {3889029660 10800 1 EEST} {3902857200 7200 0 EET} - {3920392800 10800 1 EEST} + {3920479260 10800 1 EEST} {3934306800 7200 0 EET} - {3951842400 10800 1 EEST} + {3951928860 10800 1 EEST} {3965756400 7200 0 EET} - {3983896800 10800 1 EEST} + {3983983260 10800 1 EEST} {3997810800 7200 0 EET} - {4015346400 10800 1 EEST} + {4015432860 10800 1 EEST} {4029260400 7200 0 EET} - {4046796000 10800 1 EEST} + {4046882460 10800 1 EEST} {4060710000 7200 0 EET} - {4078245600 10800 1 EEST} + {4078332060 10800 1 EEST} {4092159600 7200 0 EET} } diff --git a/library/tzdata/Asia/Kamchatka b/library/tzdata/Asia/Kamchatka index a390701..7a3c908 100644 --- a/library/tzdata/Asia/Kamchatka +++ b/library/tzdata/Asia/Kamchatka @@ -64,184 +64,185 @@ set TZData(:Asia/Kamchatka) { {1224943200 43200 0 PETT} {1238248800 46800 1 PETST} {1256392800 43200 0 PETT} - {1269698400 46800 1 PETST} - {1288447200 43200 0 PETT} - {1301148000 46800 1 PETST} - {1319896800 43200 0 PETT} - {1332597600 46800 1 PETST} - {1351346400 43200 0 PETT} - {1364652000 46800 1 PETST} - {1382796000 43200 0 PETT} - {1396101600 46800 1 PETST} - {1414245600 43200 0 PETT} - {1427551200 46800 1 PETST} - {1445695200 43200 0 PETT} - {1459000800 46800 1 PETST} - {1477749600 43200 0 PETT} - {1490450400 46800 1 PETST} - {1509199200 43200 0 PETT} - {1521900000 46800 1 PETST} - {1540648800 43200 0 PETT} - {1553954400 46800 1 PETST} - {1572098400 43200 0 PETT} - {1585404000 46800 1 PETST} - {1603548000 43200 0 PETT} - {1616853600 46800 1 PETST} - {1635602400 43200 0 PETT} - {1648303200 46800 1 PETST} - {1667052000 43200 0 PETT} - {1679752800 46800 1 PETST} - {1698501600 43200 0 PETT} - {1711807200 46800 1 PETST} - {1729951200 43200 0 PETT} - {1743256800 46800 1 PETST} - {1761400800 43200 0 PETT} - {1774706400 46800 1 PETST} - {1792850400 43200 0 PETT} - {1806156000 46800 1 PETST} - {1824904800 43200 0 PETT} - {1837605600 46800 1 PETST} - {1856354400 43200 0 PETT} - {1869055200 46800 1 PETST} - {1887804000 43200 0 PETT} - {1901109600 46800 1 PETST} - {1919253600 43200 0 PETT} - {1932559200 46800 1 PETST} - {1950703200 43200 0 PETT} - {1964008800 46800 1 PETST} - {1982757600 43200 0 PETT} - {1995458400 46800 1 PETST} - {2014207200 43200 0 PETT} - {2026908000 46800 1 PETST} - {2045656800 43200 0 PETT} - {2058357600 46800 1 PETST} - {2077106400 43200 0 PETT} - {2090412000 46800 1 PETST} - {2108556000 43200 0 PETT} - {2121861600 46800 1 PETST} - {2140005600 43200 0 PETT} - {2153311200 46800 1 PETST} - {2172060000 43200 0 PETT} - {2184760800 46800 1 PETST} - {2203509600 43200 0 PETT} - {2216210400 46800 1 PETST} - {2234959200 43200 0 PETT} - {2248264800 46800 1 PETST} - {2266408800 43200 0 PETT} - {2279714400 46800 1 PETST} - {2297858400 43200 0 PETT} - {2311164000 46800 1 PETST} - {2329308000 43200 0 PETT} - {2342613600 46800 1 PETST} - {2361362400 43200 0 PETT} - {2374063200 46800 1 PETST} - {2392812000 43200 0 PETT} - {2405512800 46800 1 PETST} - {2424261600 43200 0 PETT} - {2437567200 46800 1 PETST} - {2455711200 43200 0 PETT} - {2469016800 46800 1 PETST} - {2487160800 43200 0 PETT} - {2500466400 46800 1 PETST} - {2519215200 43200 0 PETT} - {2531916000 46800 1 PETST} - {2550664800 43200 0 PETT} - {2563365600 46800 1 PETST} - {2582114400 43200 0 PETT} - {2595420000 46800 1 PETST} - {2613564000 43200 0 PETT} - {2626869600 46800 1 PETST} - {2645013600 43200 0 PETT} - {2658319200 46800 1 PETST} - {2676463200 43200 0 PETT} - {2689768800 46800 1 PETST} - {2708517600 43200 0 PETT} - {2721218400 46800 1 PETST} - {2739967200 43200 0 PETT} - {2752668000 46800 1 PETST} - {2771416800 43200 0 PETT} - {2784722400 46800 1 PETST} - {2802866400 43200 0 PETT} - {2816172000 46800 1 PETST} - {2834316000 43200 0 PETT} - {2847621600 46800 1 PETST} - {2866370400 43200 0 PETT} - {2879071200 46800 1 PETST} - {2897820000 43200 0 PETT} - {2910520800 46800 1 PETST} - {2929269600 43200 0 PETT} - {2941970400 46800 1 PETST} - {2960719200 43200 0 PETT} - {2974024800 46800 1 PETST} - {2992168800 43200 0 PETT} - {3005474400 46800 1 PETST} - {3023618400 43200 0 PETT} - {3036924000 46800 1 PETST} - {3055672800 43200 0 PETT} - {3068373600 46800 1 PETST} - {3087122400 43200 0 PETT} - {3099823200 46800 1 PETST} - {3118572000 43200 0 PETT} - {3131877600 46800 1 PETST} - {3150021600 43200 0 PETT} - {3163327200 46800 1 PETST} - {3181471200 43200 0 PETT} - {3194776800 46800 1 PETST} - {3212920800 43200 0 PETT} - {3226226400 46800 1 PETST} - {3244975200 43200 0 PETT} - {3257676000 46800 1 PETST} - {3276424800 43200 0 PETT} - {3289125600 46800 1 PETST} - {3307874400 43200 0 PETT} - {3321180000 46800 1 PETST} - {3339324000 43200 0 PETT} - {3352629600 46800 1 PETST} - {3370773600 43200 0 PETT} - {3384079200 46800 1 PETST} - {3402828000 43200 0 PETT} - {3415528800 46800 1 PETST} - {3434277600 43200 0 PETT} - {3446978400 46800 1 PETST} - {3465727200 43200 0 PETT} - {3479032800 46800 1 PETST} - {3497176800 43200 0 PETT} - {3510482400 46800 1 PETST} - {3528626400 43200 0 PETT} - {3541932000 46800 1 PETST} - {3560076000 43200 0 PETT} - {3573381600 46800 1 PETST} - {3592130400 43200 0 PETT} - {3604831200 46800 1 PETST} - {3623580000 43200 0 PETT} - {3636280800 46800 1 PETST} - {3655029600 43200 0 PETT} - {3668335200 46800 1 PETST} - {3686479200 43200 0 PETT} - {3699784800 46800 1 PETST} - {3717928800 43200 0 PETT} - {3731234400 46800 1 PETST} - {3749983200 43200 0 PETT} - {3762684000 46800 1 PETST} - {3781432800 43200 0 PETT} - {3794133600 46800 1 PETST} - {3812882400 43200 0 PETT} - {3825583200 46800 1 PETST} - {3844332000 43200 0 PETT} - {3857637600 46800 1 PETST} - {3875781600 43200 0 PETT} - {3889087200 46800 1 PETST} - {3907231200 43200 0 PETT} - {3920536800 46800 1 PETST} - {3939285600 43200 0 PETT} - {3951986400 46800 1 PETST} - {3970735200 43200 0 PETT} - {3983436000 46800 1 PETST} - {4002184800 43200 0 PETT} - {4015490400 46800 1 PETST} - {4033634400 43200 0 PETT} - {4046940000 46800 1 PETST} - {4065084000 43200 0 PETT} - {4078389600 46800 1 PETST} - {4096533600 43200 0 PETT} + {1269698400 39600 0 PETMMTT} + {1269702000 43200 1 PETST} + {1288450800 39600 0 PETT} + {1301151600 43200 1 PETST} + {1319900400 39600 0 PETT} + {1332601200 43200 1 PETST} + {1351350000 39600 0 PETT} + {1364655600 43200 1 PETST} + {1382799600 39600 0 PETT} + {1396105200 43200 1 PETST} + {1414249200 39600 0 PETT} + {1427554800 43200 1 PETST} + {1445698800 39600 0 PETT} + {1459004400 43200 1 PETST} + {1477753200 39600 0 PETT} + {1490454000 43200 1 PETST} + {1509202800 39600 0 PETT} + {1521903600 43200 1 PETST} + {1540652400 39600 0 PETT} + {1553958000 43200 1 PETST} + {1572102000 39600 0 PETT} + {1585407600 43200 1 PETST} + {1603551600 39600 0 PETT} + {1616857200 43200 1 PETST} + {1635606000 39600 0 PETT} + {1648306800 43200 1 PETST} + {1667055600 39600 0 PETT} + {1679756400 43200 1 PETST} + {1698505200 39600 0 PETT} + {1711810800 43200 1 PETST} + {1729954800 39600 0 PETT} + {1743260400 43200 1 PETST} + {1761404400 39600 0 PETT} + {1774710000 43200 1 PETST} + {1792854000 39600 0 PETT} + {1806159600 43200 1 PETST} + {1824908400 39600 0 PETT} + {1837609200 43200 1 PETST} + {1856358000 39600 0 PETT} + {1869058800 43200 1 PETST} + {1887807600 39600 0 PETT} + {1901113200 43200 1 PETST} + {1919257200 39600 0 PETT} + {1932562800 43200 1 PETST} + {1950706800 39600 0 PETT} + {1964012400 43200 1 PETST} + {1982761200 39600 0 PETT} + {1995462000 43200 1 PETST} + {2014210800 39600 0 PETT} + {2026911600 43200 1 PETST} + {2045660400 39600 0 PETT} + {2058361200 43200 1 PETST} + {2077110000 39600 0 PETT} + {2090415600 43200 1 PETST} + {2108559600 39600 0 PETT} + {2121865200 43200 1 PETST} + {2140009200 39600 0 PETT} + {2153314800 43200 1 PETST} + {2172063600 39600 0 PETT} + {2184764400 43200 1 PETST} + {2203513200 39600 0 PETT} + {2216214000 43200 1 PETST} + {2234962800 39600 0 PETT} + {2248268400 43200 1 PETST} + {2266412400 39600 0 PETT} + {2279718000 43200 1 PETST} + {2297862000 39600 0 PETT} + {2311167600 43200 1 PETST} + {2329311600 39600 0 PETT} + {2342617200 43200 1 PETST} + {2361366000 39600 0 PETT} + {2374066800 43200 1 PETST} + {2392815600 39600 0 PETT} + {2405516400 43200 1 PETST} + {2424265200 39600 0 PETT} + {2437570800 43200 1 PETST} + {2455714800 39600 0 PETT} + {2469020400 43200 1 PETST} + {2487164400 39600 0 PETT} + {2500470000 43200 1 PETST} + {2519218800 39600 0 PETT} + {2531919600 43200 1 PETST} + {2550668400 39600 0 PETT} + {2563369200 43200 1 PETST} + {2582118000 39600 0 PETT} + {2595423600 43200 1 PETST} + {2613567600 39600 0 PETT} + {2626873200 43200 1 PETST} + {2645017200 39600 0 PETT} + {2658322800 43200 1 PETST} + {2676466800 39600 0 PETT} + {2689772400 43200 1 PETST} + {2708521200 39600 0 PETT} + {2721222000 43200 1 PETST} + {2739970800 39600 0 PETT} + {2752671600 43200 1 PETST} + {2771420400 39600 0 PETT} + {2784726000 43200 1 PETST} + {2802870000 39600 0 PETT} + {2816175600 43200 1 PETST} + {2834319600 39600 0 PETT} + {2847625200 43200 1 PETST} + {2866374000 39600 0 PETT} + {2879074800 43200 1 PETST} + {2897823600 39600 0 PETT} + {2910524400 43200 1 PETST} + {2929273200 39600 0 PETT} + {2941974000 43200 1 PETST} + {2960722800 39600 0 PETT} + {2974028400 43200 1 PETST} + {2992172400 39600 0 PETT} + {3005478000 43200 1 PETST} + {3023622000 39600 0 PETT} + {3036927600 43200 1 PETST} + {3055676400 39600 0 PETT} + {3068377200 43200 1 PETST} + {3087126000 39600 0 PETT} + {3099826800 43200 1 PETST} + {3118575600 39600 0 PETT} + {3131881200 43200 1 PETST} + {3150025200 39600 0 PETT} + {3163330800 43200 1 PETST} + {3181474800 39600 0 PETT} + {3194780400 43200 1 PETST} + {3212924400 39600 0 PETT} + {3226230000 43200 1 PETST} + {3244978800 39600 0 PETT} + {3257679600 43200 1 PETST} + {3276428400 39600 0 PETT} + {3289129200 43200 1 PETST} + {3307878000 39600 0 PETT} + {3321183600 43200 1 PETST} + {3339327600 39600 0 PETT} + {3352633200 43200 1 PETST} + {3370777200 39600 0 PETT} + {3384082800 43200 1 PETST} + {3402831600 39600 0 PETT} + {3415532400 43200 1 PETST} + {3434281200 39600 0 PETT} + {3446982000 43200 1 PETST} + {3465730800 39600 0 PETT} + {3479036400 43200 1 PETST} + {3497180400 39600 0 PETT} + {3510486000 43200 1 PETST} + {3528630000 39600 0 PETT} + {3541935600 43200 1 PETST} + {3560079600 39600 0 PETT} + {3573385200 43200 1 PETST} + {3592134000 39600 0 PETT} + {3604834800 43200 1 PETST} + {3623583600 39600 0 PETT} + {3636284400 43200 1 PETST} + {3655033200 39600 0 PETT} + {3668338800 43200 1 PETST} + {3686482800 39600 0 PETT} + {3699788400 43200 1 PETST} + {3717932400 39600 0 PETT} + {3731238000 43200 1 PETST} + {3749986800 39600 0 PETT} + {3762687600 43200 1 PETST} + {3781436400 39600 0 PETT} + {3794137200 43200 1 PETST} + {3812886000 39600 0 PETT} + {3825586800 43200 1 PETST} + {3844335600 39600 0 PETT} + {3857641200 43200 1 PETST} + {3875785200 39600 0 PETT} + {3889090800 43200 1 PETST} + {3907234800 39600 0 PETT} + {3920540400 43200 1 PETST} + {3939289200 39600 0 PETT} + {3951990000 43200 1 PETST} + {3970738800 39600 0 PETT} + {3983439600 43200 1 PETST} + {4002188400 39600 0 PETT} + {4015494000 43200 1 PETST} + {4033638000 39600 0 PETT} + {4046943600 43200 1 PETST} + {4065087600 39600 0 PETT} + {4078393200 43200 1 PETST} + {4096537200 39600 0 PETT} } diff --git a/library/tzdata/Asia/Karachi b/library/tzdata/Asia/Karachi index acd69f4..3faa31e 100644 --- a/library/tzdata/Asia/Karachi +++ b/library/tzdata/Asia/Karachi @@ -13,184 +13,4 @@ set TZData(:Asia/Karachi) { {1225476000 18000 0 PKT} {1239735600 21600 1 PKST} {1257012000 18000 0 PKT} - {1271271600 21600 1 PKST} - {1288548000 18000 0 PKT} - {1302807600 21600 1 PKST} - {1320084000 18000 0 PKT} - {1334430000 21600 1 PKST} - {1351706400 18000 0 PKT} - {1365966000 21600 1 PKST} - {1383242400 18000 0 PKT} - {1397502000 21600 1 PKST} - {1414778400 18000 0 PKT} - {1429038000 21600 1 PKST} - {1446314400 18000 0 PKT} - {1460660400 21600 1 PKST} - {1477936800 18000 0 PKT} - {1492196400 21600 1 PKST} - {1509472800 18000 0 PKT} - {1523732400 21600 1 PKST} - {1541008800 18000 0 PKT} - {1555268400 21600 1 PKST} - {1572544800 18000 0 PKT} - {1586890800 21600 1 PKST} - {1604167200 18000 0 PKT} - {1618426800 21600 1 PKST} - {1635703200 18000 0 PKT} - {1649962800 21600 1 PKST} - {1667239200 18000 0 PKT} - {1681498800 21600 1 PKST} - {1698775200 18000 0 PKT} - {1713121200 21600 1 PKST} - {1730397600 18000 0 PKT} - {1744657200 21600 1 PKST} - {1761933600 18000 0 PKT} - {1776193200 21600 1 PKST} - {1793469600 18000 0 PKT} - {1807729200 21600 1 PKST} - {1825005600 18000 0 PKT} - {1839351600 21600 1 PKST} - {1856628000 18000 0 PKT} - {1870887600 21600 1 PKST} - {1888164000 18000 0 PKT} - {1902423600 21600 1 PKST} - {1919700000 18000 0 PKT} - {1933959600 21600 1 PKST} - {1951236000 18000 0 PKT} - {1965582000 21600 1 PKST} - {1982858400 18000 0 PKT} - {1997118000 21600 1 PKST} - {2014394400 18000 0 PKT} - {2028654000 21600 1 PKST} - {2045930400 18000 0 PKT} - {2060190000 21600 1 PKST} - {2077466400 18000 0 PKT} - {2091812400 21600 1 PKST} - {2109088800 18000 0 PKT} - {2123348400 21600 1 PKST} - {2140624800 18000 0 PKT} - {2154884400 21600 1 PKST} - {2172160800 18000 0 PKT} - {2186420400 21600 1 PKST} - {2203696800 18000 0 PKT} - {2218042800 21600 1 PKST} - {2235319200 18000 0 PKT} - {2249578800 21600 1 PKST} - {2266855200 18000 0 PKT} - {2281114800 21600 1 PKST} - {2298391200 18000 0 PKT} - {2312650800 21600 1 PKST} - {2329927200 18000 0 PKT} - {2344273200 21600 1 PKST} - {2361549600 18000 0 PKT} - {2375809200 21600 1 PKST} - {2393085600 18000 0 PKT} - {2407345200 21600 1 PKST} - {2424621600 18000 0 PKT} - {2438881200 21600 1 PKST} - {2456157600 18000 0 PKT} - {2470503600 21600 1 PKST} - {2487780000 18000 0 PKT} - {2502039600 21600 1 PKST} - {2519316000 18000 0 PKT} - {2533575600 21600 1 PKST} - {2550852000 18000 0 PKT} - {2565111600 21600 1 PKST} - {2582388000 18000 0 PKT} - {2596734000 21600 1 PKST} - {2614010400 18000 0 PKT} - {2628270000 21600 1 PKST} - {2645546400 18000 0 PKT} - {2659806000 21600 1 PKST} - {2677082400 18000 0 PKT} - {2691342000 21600 1 PKST} - {2708618400 18000 0 PKT} - {2722964400 21600 1 PKST} - {2740240800 18000 0 PKT} - {2754500400 21600 1 PKST} - {2771776800 18000 0 PKT} - {2786036400 21600 1 PKST} - {2803312800 18000 0 PKT} - {2817572400 21600 1 PKST} - {2834848800 18000 0 PKT} - {2849194800 21600 1 PKST} - {2866471200 18000 0 PKT} - {2880730800 21600 1 PKST} - {2898007200 18000 0 PKT} - {2912266800 21600 1 PKST} - {2929543200 18000 0 PKT} - {2943802800 21600 1 PKST} - {2961079200 18000 0 PKT} - {2975425200 21600 1 PKST} - {2992701600 18000 0 PKT} - {3006961200 21600 1 PKST} - {3024237600 18000 0 PKT} - {3038497200 21600 1 PKST} - {3055773600 18000 0 PKT} - {3070033200 21600 1 PKST} - {3087309600 18000 0 PKT} - {3101655600 21600 1 PKST} - {3118932000 18000 0 PKT} - {3133191600 21600 1 PKST} - {3150468000 18000 0 PKT} - {3164727600 21600 1 PKST} - {3182004000 18000 0 PKT} - {3196263600 21600 1 PKST} - {3213540000 18000 0 PKT} - {3227886000 21600 1 PKST} - {3245162400 18000 0 PKT} - {3259422000 21600 1 PKST} - {3276698400 18000 0 PKT} - {3290958000 21600 1 PKST} - {3308234400 18000 0 PKT} - {3322494000 21600 1 PKST} - {3339770400 18000 0 PKT} - {3354116400 21600 1 PKST} - {3371392800 18000 0 PKT} - {3385652400 21600 1 PKST} - {3402928800 18000 0 PKT} - {3417188400 21600 1 PKST} - {3434464800 18000 0 PKT} - {3448724400 21600 1 PKST} - {3466000800 18000 0 PKT} - {3480346800 21600 1 PKST} - {3497623200 18000 0 PKT} - {3511882800 21600 1 PKST} - {3529159200 18000 0 PKT} - {3543418800 21600 1 PKST} - {3560695200 18000 0 PKT} - {3574954800 21600 1 PKST} - {3592231200 18000 0 PKT} - {3606577200 21600 1 PKST} - {3623853600 18000 0 PKT} - {3638113200 21600 1 PKST} - {3655389600 18000 0 PKT} - {3669649200 21600 1 PKST} - {3686925600 18000 0 PKT} - {3701185200 21600 1 PKST} - {3718461600 18000 0 PKT} - {3732807600 21600 1 PKST} - {3750084000 18000 0 PKT} - {3764343600 21600 1 PKST} - {3781620000 18000 0 PKT} - {3795879600 21600 1 PKST} - {3813156000 18000 0 PKT} - {3827415600 21600 1 PKST} - {3844692000 18000 0 PKT} - {3859038000 21600 1 PKST} - {3876314400 18000 0 PKT} - {3890574000 21600 1 PKST} - {3907850400 18000 0 PKT} - {3922110000 21600 1 PKST} - {3939386400 18000 0 PKT} - {3953646000 21600 1 PKST} - {3970922400 18000 0 PKT} - {3985268400 21600 1 PKST} - {4002544800 18000 0 PKT} - {4016804400 21600 1 PKST} - {4034080800 18000 0 PKT} - {4048340400 21600 1 PKST} - {4065616800 18000 0 PKT} - {4079876400 21600 1 PKST} - {4097152800 18000 0 PKT} } diff --git a/library/tzdata/Asia/Taipei b/library/tzdata/Asia/Taipei index 6366b34..a3c7ecf 100644 --- a/library/tzdata/Asia/Taipei +++ b/library/tzdata/Asia/Taipei @@ -41,6 +41,6 @@ set TZData(:Asia/Taipei) { {149785200 28800 0 CST} {165513600 32400 1 CDT} {181321200 28800 0 CST} - {331142400 32400 1 CDT} - {339087600 28800 0 CST} + {299520000 32400 1 CDT} + {307465200 28800 0 CST} } diff --git a/library/tzdata/Europe/Samara b/library/tzdata/Europe/Samara index 47e57e4..80a80f4 100644 --- a/library/tzdata/Europe/Samara +++ b/library/tzdata/Europe/Samara @@ -66,184 +66,185 @@ set TZData(:Europe/Samara) { {1224972000 14400 0 SAMT} {1238277600 18000 1 SAMST} {1256421600 14400 0 SAMT} - {1269727200 18000 1 SAMST} - {1288476000 14400 0 SAMT} - {1301176800 18000 1 SAMST} - {1319925600 14400 0 SAMT} - {1332626400 18000 1 SAMST} - {1351375200 14400 0 SAMT} - {1364680800 18000 1 SAMST} - {1382824800 14400 0 SAMT} - {1396130400 18000 1 SAMST} - {1414274400 14400 0 SAMT} - {1427580000 18000 1 SAMST} - {1445724000 14400 0 SAMT} - {1459029600 18000 1 SAMST} - {1477778400 14400 0 SAMT} - {1490479200 18000 1 SAMST} - {1509228000 14400 0 SAMT} - {1521928800 18000 1 SAMST} - {1540677600 14400 0 SAMT} - {1553983200 18000 1 SAMST} - {1572127200 14400 0 SAMT} - {1585432800 18000 1 SAMST} - {1603576800 14400 0 SAMT} - {1616882400 18000 1 SAMST} - {1635631200 14400 0 SAMT} - {1648332000 18000 1 SAMST} - {1667080800 14400 0 SAMT} - {1679781600 18000 1 SAMST} - {1698530400 14400 0 SAMT} - {1711836000 18000 1 SAMST} - {1729980000 14400 0 SAMT} - {1743285600 18000 1 SAMST} - {1761429600 14400 0 SAMT} - {1774735200 18000 1 SAMST} - {1792879200 14400 0 SAMT} - {1806184800 18000 1 SAMST} - {1824933600 14400 0 SAMT} - {1837634400 18000 1 SAMST} - {1856383200 14400 0 SAMT} - {1869084000 18000 1 SAMST} - {1887832800 14400 0 SAMT} - {1901138400 18000 1 SAMST} - {1919282400 14400 0 SAMT} - {1932588000 18000 1 SAMST} - {1950732000 14400 0 SAMT} - {1964037600 18000 1 SAMST} - {1982786400 14400 0 SAMT} - {1995487200 18000 1 SAMST} - {2014236000 14400 0 SAMT} - {2026936800 18000 1 SAMST} - {2045685600 14400 0 SAMT} - {2058386400 18000 1 SAMST} - {2077135200 14400 0 SAMT} - {2090440800 18000 1 SAMST} - {2108584800 14400 0 SAMT} - {2121890400 18000 1 SAMST} - {2140034400 14400 0 SAMT} - {2153340000 18000 1 SAMST} - {2172088800 14400 0 SAMT} - {2184789600 18000 1 SAMST} - {2203538400 14400 0 SAMT} - {2216239200 18000 1 SAMST} - {2234988000 14400 0 SAMT} - {2248293600 18000 1 SAMST} - {2266437600 14400 0 SAMT} - {2279743200 18000 1 SAMST} - {2297887200 14400 0 SAMT} - {2311192800 18000 1 SAMST} - {2329336800 14400 0 SAMT} - {2342642400 18000 1 SAMST} - {2361391200 14400 0 SAMT} - {2374092000 18000 1 SAMST} - {2392840800 14400 0 SAMT} - {2405541600 18000 1 SAMST} - {2424290400 14400 0 SAMT} - {2437596000 18000 1 SAMST} - {2455740000 14400 0 SAMT} - {2469045600 18000 1 SAMST} - {2487189600 14400 0 SAMT} - {2500495200 18000 1 SAMST} - {2519244000 14400 0 SAMT} - {2531944800 18000 1 SAMST} - {2550693600 14400 0 SAMT} - {2563394400 18000 1 SAMST} - {2582143200 14400 0 SAMT} - {2595448800 18000 1 SAMST} - {2613592800 14400 0 SAMT} - {2626898400 18000 1 SAMST} - {2645042400 14400 0 SAMT} - {2658348000 18000 1 SAMST} - {2676492000 14400 0 SAMT} - {2689797600 18000 1 SAMST} - {2708546400 14400 0 SAMT} - {2721247200 18000 1 SAMST} - {2739996000 14400 0 SAMT} - {2752696800 18000 1 SAMST} - {2771445600 14400 0 SAMT} - {2784751200 18000 1 SAMST} - {2802895200 14400 0 SAMT} - {2816200800 18000 1 SAMST} - {2834344800 14400 0 SAMT} - {2847650400 18000 1 SAMST} - {2866399200 14400 0 SAMT} - {2879100000 18000 1 SAMST} - {2897848800 14400 0 SAMT} - {2910549600 18000 1 SAMST} - {2929298400 14400 0 SAMT} - {2941999200 18000 1 SAMST} - {2960748000 14400 0 SAMT} - {2974053600 18000 1 SAMST} - {2992197600 14400 0 SAMT} - {3005503200 18000 1 SAMST} - {3023647200 14400 0 SAMT} - {3036952800 18000 1 SAMST} - {3055701600 14400 0 SAMT} - {3068402400 18000 1 SAMST} - {3087151200 14400 0 SAMT} - {3099852000 18000 1 SAMST} - {3118600800 14400 0 SAMT} - {3131906400 18000 1 SAMST} - {3150050400 14400 0 SAMT} - {3163356000 18000 1 SAMST} - {3181500000 14400 0 SAMT} - {3194805600 18000 1 SAMST} - {3212949600 14400 0 SAMT} - {3226255200 18000 1 SAMST} - {3245004000 14400 0 SAMT} - {3257704800 18000 1 SAMST} - {3276453600 14400 0 SAMT} - {3289154400 18000 1 SAMST} - {3307903200 14400 0 SAMT} - {3321208800 18000 1 SAMST} - {3339352800 14400 0 SAMT} - {3352658400 18000 1 SAMST} - {3370802400 14400 0 SAMT} - {3384108000 18000 1 SAMST} - {3402856800 14400 0 SAMT} - {3415557600 18000 1 SAMST} - {3434306400 14400 0 SAMT} - {3447007200 18000 1 SAMST} - {3465756000 14400 0 SAMT} - {3479061600 18000 1 SAMST} - {3497205600 14400 0 SAMT} - {3510511200 18000 1 SAMST} - {3528655200 14400 0 SAMT} - {3541960800 18000 1 SAMST} - {3560104800 14400 0 SAMT} - {3573410400 18000 1 SAMST} - {3592159200 14400 0 SAMT} - {3604860000 18000 1 SAMST} - {3623608800 14400 0 SAMT} - {3636309600 18000 1 SAMST} - {3655058400 14400 0 SAMT} - {3668364000 18000 1 SAMST} - {3686508000 14400 0 SAMT} - {3699813600 18000 1 SAMST} - {3717957600 14400 0 SAMT} - {3731263200 18000 1 SAMST} - {3750012000 14400 0 SAMT} - {3762712800 18000 1 SAMST} - {3781461600 14400 0 SAMT} - {3794162400 18000 1 SAMST} - {3812911200 14400 0 SAMT} - {3825612000 18000 1 SAMST} - {3844360800 14400 0 SAMT} - {3857666400 18000 1 SAMST} - {3875810400 14400 0 SAMT} - {3889116000 18000 1 SAMST} - {3907260000 14400 0 SAMT} - {3920565600 18000 1 SAMST} - {3939314400 14400 0 SAMT} - {3952015200 18000 1 SAMST} - {3970764000 14400 0 SAMT} - {3983464800 18000 1 SAMST} - {4002213600 14400 0 SAMT} - {4015519200 18000 1 SAMST} - {4033663200 14400 0 SAMT} - {4046968800 18000 1 SAMST} - {4065112800 14400 0 SAMT} - {4078418400 18000 1 SAMST} - {4096562400 14400 0 SAMT} + {1269727200 10800 0 SAMMMTT} + {1269730800 14400 1 SAMST} + {1288479600 10800 0 SAMT} + {1301180400 14400 1 SAMST} + {1319929200 10800 0 SAMT} + {1332630000 14400 1 SAMST} + {1351378800 10800 0 SAMT} + {1364684400 14400 1 SAMST} + {1382828400 10800 0 SAMT} + {1396134000 14400 1 SAMST} + {1414278000 10800 0 SAMT} + {1427583600 14400 1 SAMST} + {1445727600 10800 0 SAMT} + {1459033200 14400 1 SAMST} + {1477782000 10800 0 SAMT} + {1490482800 14400 1 SAMST} + {1509231600 10800 0 SAMT} + {1521932400 14400 1 SAMST} + {1540681200 10800 0 SAMT} + {1553986800 14400 1 SAMST} + {1572130800 10800 0 SAMT} + {1585436400 14400 1 SAMST} + {1603580400 10800 0 SAMT} + {1616886000 14400 1 SAMST} + {1635634800 10800 0 SAMT} + {1648335600 14400 1 SAMST} + {1667084400 10800 0 SAMT} + {1679785200 14400 1 SAMST} + {1698534000 10800 0 SAMT} + {1711839600 14400 1 SAMST} + {1729983600 10800 0 SAMT} + {1743289200 14400 1 SAMST} + {1761433200 10800 0 SAMT} + {1774738800 14400 1 SAMST} + {1792882800 10800 0 SAMT} + {1806188400 14400 1 SAMST} + {1824937200 10800 0 SAMT} + {1837638000 14400 1 SAMST} + {1856386800 10800 0 SAMT} + {1869087600 14400 1 SAMST} + {1887836400 10800 0 SAMT} + {1901142000 14400 1 SAMST} + {1919286000 10800 0 SAMT} + {1932591600 14400 1 SAMST} + {1950735600 10800 0 SAMT} + {1964041200 14400 1 SAMST} + {1982790000 10800 0 SAMT} + {1995490800 14400 1 SAMST} + {2014239600 10800 0 SAMT} + {2026940400 14400 1 SAMST} + {2045689200 10800 0 SAMT} + {2058390000 14400 1 SAMST} + {2077138800 10800 0 SAMT} + {2090444400 14400 1 SAMST} + {2108588400 10800 0 SAMT} + {2121894000 14400 1 SAMST} + {2140038000 10800 0 SAMT} + {2153343600 14400 1 SAMST} + {2172092400 10800 0 SAMT} + {2184793200 14400 1 SAMST} + {2203542000 10800 0 SAMT} + {2216242800 14400 1 SAMST} + {2234991600 10800 0 SAMT} + {2248297200 14400 1 SAMST} + {2266441200 10800 0 SAMT} + {2279746800 14400 1 SAMST} + {2297890800 10800 0 SAMT} + {2311196400 14400 1 SAMST} + {2329340400 10800 0 SAMT} + {2342646000 14400 1 SAMST} + {2361394800 10800 0 SAMT} + {2374095600 14400 1 SAMST} + {2392844400 10800 0 SAMT} + {2405545200 14400 1 SAMST} + {2424294000 10800 0 SAMT} + {2437599600 14400 1 SAMST} + {2455743600 10800 0 SAMT} + {2469049200 14400 1 SAMST} + {2487193200 10800 0 SAMT} + {2500498800 14400 1 SAMST} + {2519247600 10800 0 SAMT} + {2531948400 14400 1 SAMST} + {2550697200 10800 0 SAMT} + {2563398000 14400 1 SAMST} + {2582146800 10800 0 SAMT} + {2595452400 14400 1 SAMST} + {2613596400 10800 0 SAMT} + {2626902000 14400 1 SAMST} + {2645046000 10800 0 SAMT} + {2658351600 14400 1 SAMST} + {2676495600 10800 0 SAMT} + {2689801200 14400 1 SAMST} + {2708550000 10800 0 SAMT} + {2721250800 14400 1 SAMST} + {2739999600 10800 0 SAMT} + {2752700400 14400 1 SAMST} + {2771449200 10800 0 SAMT} + {2784754800 14400 1 SAMST} + {2802898800 10800 0 SAMT} + {2816204400 14400 1 SAMST} + {2834348400 10800 0 SAMT} + {2847654000 14400 1 SAMST} + {2866402800 10800 0 SAMT} + {2879103600 14400 1 SAMST} + {2897852400 10800 0 SAMT} + {2910553200 14400 1 SAMST} + {2929302000 10800 0 SAMT} + {2942002800 14400 1 SAMST} + {2960751600 10800 0 SAMT} + {2974057200 14400 1 SAMST} + {2992201200 10800 0 SAMT} + {3005506800 14400 1 SAMST} + {3023650800 10800 0 SAMT} + {3036956400 14400 1 SAMST} + {3055705200 10800 0 SAMT} + {3068406000 14400 1 SAMST} + {3087154800 10800 0 SAMT} + {3099855600 14400 1 SAMST} + {3118604400 10800 0 SAMT} + {3131910000 14400 1 SAMST} + {3150054000 10800 0 SAMT} + {3163359600 14400 1 SAMST} + {3181503600 10800 0 SAMT} + {3194809200 14400 1 SAMST} + {3212953200 10800 0 SAMT} + {3226258800 14400 1 SAMST} + {3245007600 10800 0 SAMT} + {3257708400 14400 1 SAMST} + {3276457200 10800 0 SAMT} + {3289158000 14400 1 SAMST} + {3307906800 10800 0 SAMT} + {3321212400 14400 1 SAMST} + {3339356400 10800 0 SAMT} + {3352662000 14400 1 SAMST} + {3370806000 10800 0 SAMT} + {3384111600 14400 1 SAMST} + {3402860400 10800 0 SAMT} + {3415561200 14400 1 SAMST} + {3434310000 10800 0 SAMT} + {3447010800 14400 1 SAMST} + {3465759600 10800 0 SAMT} + {3479065200 14400 1 SAMST} + {3497209200 10800 0 SAMT} + {3510514800 14400 1 SAMST} + {3528658800 10800 0 SAMT} + {3541964400 14400 1 SAMST} + {3560108400 10800 0 SAMT} + {3573414000 14400 1 SAMST} + {3592162800 10800 0 SAMT} + {3604863600 14400 1 SAMST} + {3623612400 10800 0 SAMT} + {3636313200 14400 1 SAMST} + {3655062000 10800 0 SAMT} + {3668367600 14400 1 SAMST} + {3686511600 10800 0 SAMT} + {3699817200 14400 1 SAMST} + {3717961200 10800 0 SAMT} + {3731266800 14400 1 SAMST} + {3750015600 10800 0 SAMT} + {3762716400 14400 1 SAMST} + {3781465200 10800 0 SAMT} + {3794166000 14400 1 SAMST} + {3812914800 10800 0 SAMT} + {3825615600 14400 1 SAMST} + {3844364400 10800 0 SAMT} + {3857670000 14400 1 SAMST} + {3875814000 10800 0 SAMT} + {3889119600 14400 1 SAMST} + {3907263600 10800 0 SAMT} + {3920569200 14400 1 SAMST} + {3939318000 10800 0 SAMT} + {3952018800 14400 1 SAMST} + {3970767600 10800 0 SAMT} + {3983468400 14400 1 SAMST} + {4002217200 10800 0 SAMT} + {4015522800 14400 1 SAMST} + {4033666800 10800 0 SAMT} + {4046972400 14400 1 SAMST} + {4065116400 10800 0 SAMT} + {4078422000 14400 1 SAMST} + {4096566000 10800 0 SAMT} } diff --git a/library/tzdata/Pacific/Apia b/library/tzdata/Pacific/Apia index 60e4b2c..c97a156 100644 --- a/library/tzdata/Pacific/Apia +++ b/library/tzdata/Pacific/Apia @@ -5,6 +5,6 @@ set TZData(:Pacific/Apia) { {-2855737984 -41216 0 LMT} {-1861878784 -41400 0 SAMT} {-631110600 -39600 0 WST} - {1254654000 -36000 1 WSDT} - {1269770400 -39600 0 WST} + {1285498800 -36000 1 WSDT} + {1301824800 -39600 0 WST} } diff --git a/library/tzdata/Pacific/Easter b/library/tzdata/Pacific/Easter index ac00f5e..be661fc 100644 --- a/library/tzdata/Pacific/Easter +++ b/library/tzdata/Pacific/Easter @@ -92,7 +92,7 @@ set TZData(:Pacific/Easter) { {1223784000 -18000 1 EASST} {1237086000 -21600 0 EAST} {1255233600 -18000 1 EASST} - {1268535600 -21600 0 EAST} + {1270350000 -21600 0 EAST} {1286683200 -18000 1 EASST} {1299985200 -21600 0 EAST} {1318132800 -18000 1 EASST} diff --git a/library/tzdata/Pacific/Fiji b/library/tzdata/Pacific/Fiji index 9916d9c..67f84cb 100644 --- a/library/tzdata/Pacific/Fiji +++ b/library/tzdata/Pacific/Fiji @@ -8,5 +8,7 @@ set TZData(:Pacific/Fiji) { {941896800 46800 1 FJST} {951573600 43200 0 FJT} {1259416800 46800 1 FJST} - {1272117600 43200 0 FJT} + {1269698400 43200 0 FJT} + {1287842400 46800 1 FJST} + {1301148000 43200 0 FJT} } -- cgit v0.12 From 0e49426c4049bd6eead59a349cb52adfaa82e5d2 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 29 Apr 2010 21:19:31 +0000 Subject: * library/platform/platform.tcl: Another stab at getting the /lib, * library/platform/pkgIndex.tcl: /lib674 difference right for * unix/Makefile.in: linux. Package updated to version 1.0.7. * win/Makefile.in: --- ChangeLog | 7 +++++++ library/platform/pkgIndex.tcl | 2 +- library/platform/platform.tcl | 33 +++++++++++++++++++++++++-------- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 39 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0062b8f..534960e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-29 Andreas Kupries + + * library/platform/platform.tcl: Another stab at getting the /lib, + * library/platform/pkgIndex.tcl: /lib674 difference right for + * unix/Makefile.in: linux. Package updated to version 1.0.7. + * win/Makefile.in: + 2010-04-29 Kevin B. Kenny * library/tzdata/Antarctica/Macquarie: diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 5678e04..69ca721 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.6 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.7 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index d132c6f..838ceec 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -175,13 +175,30 @@ proc ::platform::identify {} { set v unknown - if {[file exists /lib64] && - [file isdirectory /lib64] && - [llength [glob -nocomplain -directory /lib64 libc*]] - } { - set base /lib64 - } else { - set base /lib + # Determine in which directory to look. /lib, or /lib64. + # For that we use the tcl_platform(wordSize). + # + # We could use the 'cpu' info, per the equivalence below, + # that however would be restricted to intel. And this may + # be a arm, mips, etc. system. The wordsize is more + # fundamental. + # + # ix86 <=> (wordSize == 4) <=> 32 bit ==> /lib + # x86_64 <=> (wordSize == 8) <=> 64 bit ==> /lib64 + # + # Do not look into /lib64 even if present, if the cpu + # doesn't fit. + + switch -exact -- $tcl_platform(wordSize) { + 4 { + set base /lib + } + 8 { + set base /lib64 + } + default { + return -code error "Bad wordSize $tcl_platform(wordSize), expected 4 or 8" + } } set libclist [lsort [glob -nocomplain -directory $base libc*]] @@ -292,7 +309,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.6 +package provide platform 1.0.7 # ### ### ### ######### ######### ######### ## Demo application diff --git a/unix/Makefile.in b/unix/Makefile.in index 40ef07f..d48e076 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.296 2010/04/14 22:58:37 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.297 2010/04/29 21:19:32 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -856,8 +856,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.6 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.6.tm; + @echo "Installing package platform 1.0.7 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.7.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index ac40e13..6f58dc7 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.177 2010/04/28 11:50:54 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.178 2010/04/29 21:19:32 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -675,8 +675,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.3.tm; @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.6 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.6.tm; + @echo "Installing package platform 1.0.7 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.7.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12 From 4afa4db89195f756601d2fd640f605e4eb1896cd Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 29 Apr 2010 21:24:09 +0000 Subject: Typo --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 534960e..0d9d8fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2010-04-29 Andreas Kupries * library/platform/platform.tcl: Another stab at getting the /lib, - * library/platform/pkgIndex.tcl: /lib674 difference right for + * library/platform/pkgIndex.tcl: /lib64 difference right for * unix/Makefile.in: linux. Package updated to version 1.0.7. * win/Makefile.in: -- cgit v0.12 From 86ab7e21814dcb7876a4002e7bb8f582cc5fb606 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 29 Apr 2010 23:39:32 +0000 Subject: * generic/tclCompExpr.c: Slight change in the literal sharing * generic/tclCompile.c: mechanism to avoid shimmering of * generic/tclCompile.h: command names. * generic/tclLiteral.c: --- generic/tclCompExpr.c | 4 ++-- generic/tclCompile.c | 17 ++++------------- generic/tclCompile.h | 10 +++++----- generic/tclLiteral.c | 24 ++++++++++++++---------- 4 files changed, 25 insertions(+), 30 deletions(-) diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 8bfd116..eb72a45 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.104 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.105 2010/04/29 23:39:32 msofer Exp $ */ #include "tclInt.h" @@ -2209,7 +2209,7 @@ CompileExprTree( p = TclGetStringFromObj(*funcObjv, &length); funcObjv++; Tcl_DStringAppend(&cmdName, p, length); - TclEmitPush(TclRegisterNewNSLiteral(envPtr, + TclEmitPush(TclRegisterNewCmdLiteral(envPtr, Tcl_DStringValue(&cmdName), Tcl_DStringLength(&cmdName)), envPtr); Tcl_DStringFree(&cmdName); diff --git a/generic/tclCompile.c b/generic/tclCompile.c index d788d43..c9598bd 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.184 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.185 2010/04/29 23:39:32 msofer Exp $ */ #include "tclInt.h" @@ -1731,26 +1731,17 @@ TclCompileScript( /* * No compile procedure so push the word. If the command * was found, push a CmdName object to reduce runtime - * lookups. Avoid sharing this literal among different - * namespaces to reduce shimmering. + * lookups. Mark this as a command name literal to reduce + * shimmering. */ - objIndex = TclRegisterNewNSLiteral(envPtr, + objIndex = TclRegisterNewCmdLiteral(envPtr, tokenPtr[1].start, tokenPtr[1].size); if (cmdPtr != NULL) { TclSetCmdNameObj(interp, envPtr->literalArrayPtr[objIndex].objPtr, cmdPtr); } - if ((wordIdx == 0) && (parsePtr->numWords == 1)) { - /* - * Single word script: unshare the command name to - * avoid shimmering between bytecode and cmdName - * representations. [Bug 458361] - */ - - TclHideLiteral(interp, envPtr, objIndex); - } } else { /* * Simple argument word of a command. We reach this if and diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 1102833..e73ce73 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.124 2010/02/25 14:49:01 dkf Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.125 2010/04/29 23:39:32 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -990,7 +990,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, */ #define LITERAL_ON_HEAP 0x01 -#define LITERAL_NS_SCOPE 0x02 +#define LITERAL_CMD_NAME 0x02 /* * Form of TclRegisterLiteral with flags == 0. In that case, it is safe to @@ -1004,7 +1004,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, TclRegisterLiteral(envPtr, (char *)(bytes), length, /*flags*/ 0) /* - * Form of TclRegisterLiteral with flags == LITERAL_NS_SCOPE. In that case, it + * Form of TclRegisterLiteral with flags == LITERAL_CMD_NAME. In that case, it * is safe to cast away constness, and it is cleanest to do that here, all in * one place. * @@ -1012,8 +1012,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr, * int length); */ -#define TclRegisterNewNSLiteral(envPtr, bytes, length) \ - TclRegisterLiteral(envPtr, (char *)(bytes), length, LITERAL_NS_SCOPE) +#define TclRegisterNewCmdLiteral(envPtr, bytes, length) \ + TclRegisterLiteral(envPtr, (char *)(bytes), length, LITERAL_CMD_NAME) /* * Macro used to manually adjust the stack requirements; used in cases where diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index a456627..b991ef3 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLiteral.c,v 1.42 2010/02/25 22:20:10 nijtmans Exp $ + * RCS: @(#) $Id: tclLiteral.c,v 1.43 2010/04/29 23:39:32 msofer Exp $ */ #include "tclInt.h" @@ -411,8 +411,8 @@ TclRegisterLiteral( * first null character. */ int flags) /* If LITERAL_ON_HEAP then the caller already * malloc'd bytes and ownership is passed to - * this function. If LITERAL_NS_SCOPE then - * the literal shouldnot be shared accross + * this function. If LITERAL_CMD_NAME then + * the literal should not be shared accross * namespaces. */ { Interp *iPtr = envPtr->iPtr; @@ -453,18 +453,22 @@ TclRegisterLiteral( } /* - * The literal is new to this CompileEnv. Should it be shared accross - * namespaces? If it is a fully qualified name, the namespace - * specification is not needed to avoid sharing. + * The literal is new to this CompileEnv. If it is a command name, avoid + * sharing it accross namespaces, and try not to share it with non-cmd + * literals. Note that FQ command names can be shared, so that we register + * the namespace as the interp's global NS. */ - if ((flags & LITERAL_NS_SCOPE) && iPtr->varFramePtr - && ((length <2) || (bytes[0] != ':') || (bytes[1] != ':'))) { - nsPtr = iPtr->varFramePtr->nsPtr; + if (flags & LITERAL_CMD_NAME) { + if ((length >= 2) && (bytes[0] == ':') && (bytes[1] == ':')) { + nsPtr = iPtr->globalNsPtr; + } else { + nsPtr = iPtr->varFramePtr->nsPtr; + } } else { nsPtr = NULL; } - + /* * Is it in the interpreter's global literal table? If not, create it. */ -- cgit v0.12 From 90a5efe9a2710bc933a9d38f2dd5e5bb94cc6d1d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 29 Apr 2010 23:43:06 +0000 Subject: forgot the Changelog entry --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0d9d8fc..1ccd937 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-29 Miguel Sofer + + * generic/tclCompExpr.c: Slight change in the literal sharing + * generic/tclCompile.c: mechanism to avoid shimmering of + * generic/tclCompile.h: command names. + * generic/tclLiteral.c: + 2010-04-29 Andreas Kupries * library/platform/platform.tcl: Another stab at getting the /lib, -- cgit v0.12 From 35f535f5c0a63c012f271d83934906a3fcc2a69c Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 30 Apr 2010 07:07:06 +0000 Subject: Unnecessary TCL_STORAGE_CLASS re-definition. It was used for an ancient dummy reference to Tcl_LinkVar(), but that's already gone since 2002-05-29. --- ChangeLog | 6 ++++++ generic/tclMain.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ccd937..58829fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-30 Jan Nijtmans + + * generic/tclMain.c. Unnecessary TCL_STORAGE_CLASS re-definition. + It was used for an ancient dummy reference to Tcl_LinkVar(), + but that's already gone since 2002-05-29. + 2010-04-29 Miguel Sofer * generic/tclCompExpr.c: Slight change in the literal sharing diff --git a/generic/tclMain.c b/generic/tclMain.c index 39bacc1..5d4c6f9 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -10,14 +10,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMain.c,v 1.49 2010/02/27 12:07:04 dkf Exp $ + * RCS: @(#) $Id: tclMain.c,v 1.50 2010/04/30 07:07:06 nijtmans Exp $ */ #include "tclInt.h" -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLEXPORT - /* * The default prompt used when the user has not overridden it. */ -- cgit v0.12 From fef563336c6dc5ae1b57a63431daf9ed77de8f27 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Apr 2010 07:56:31 +0000 Subject: * generic/tclBasic.c (TclNRYieldObjCmd, TclNRYieldmObjCmd) (NRInterpCoroutine): Replace magic values for formal argument counts for coroutine command implementations with #defines, for an increase in readability. --- ChangeLog | 25 ++++++++++++++++--------- generic/tclBasic.c | 49 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58829fd..2c4915e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,25 +1,32 @@ +2010-04-30 Donal K. Fellows + + * generic/tclBasic.c (TclNRYieldObjCmd, TclNRYieldmObjCmd) + (NRInterpCoroutine): Replace magic values for formal argument counts + for coroutine command implementations with #defines, for an increase + in readability. + 2010-04-30 Jan Nijtmans - * generic/tclMain.c. Unnecessary TCL_STORAGE_CLASS re-definition. - It was used for an ancient dummy reference to Tcl_LinkVar(), - but that's already gone since 2002-05-29. + * generic/tclMain.c: Unnecessary TCL_STORAGE_CLASS re-definition. It + was used for an ancient dummy reference to Tcl_LinkVar(), but that's + already gone since 2002-05-29. 2010-04-29 Miguel Sofer - * generic/tclCompExpr.c: Slight change in the literal sharing - * generic/tclCompile.c: mechanism to avoid shimmering of + * generic/tclCompExpr.c: Slight change in the literal sharing + * generic/tclCompile.c: mechanism to avoid shimmering of * generic/tclCompile.h: command names. * generic/tclLiteral.c: 2010-04-29 Andreas Kupries * library/platform/platform.tcl: Another stab at getting the /lib, - * library/platform/pkgIndex.tcl: /lib64 difference right for - * unix/Makefile.in: linux. Package updated to version 1.0.7. + * library/platform/pkgIndex.tcl: /lib64 difference right for linux. + * unix/Makefile.in: Package updated to version 1.0.7. * win/Makefile.in: 2010-04-29 Kevin B. Kenny - + * library/tzdata/Antarctica/Macquarie: * library/tzdata/Africa/Casablanca: * library/tzdata/Africa/Tunis: @@ -38,7 +45,7 @@ * library/tzdata/Pacific/Apia: * library/tzdata/Pacific/Easter: * library/tzdata/Pacific/Fiji: Olson's tzdata2010i. - + 2010-04-29 Donal K. Fellows * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 2992970]: Make diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3a37aac..98dd87a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.453 2010/04/27 12:36:21 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.454 2010/04/30 07:56:31 dkf Exp $ */ #include "tclInt.h" @@ -166,6 +166,14 @@ static Tcl_NRPostProc TEOV_RunLeaveTraces; static Tcl_NRPostProc YieldToCallback; MODULE_SCOPE const TclStubs tclStubs; + +/* + * Magical counts for the number of arguments accepted by a coroutine command + * after particular kinds of [yield]. + */ + +#define COROUTINE_ARGUMENTS_SINGLE_OPTIONAL (-1) +#define COROUTINE_ARGUMENTS_ARBITRARY (-2) /* * The following structure define the commands in the Tcl core. @@ -8486,8 +8494,8 @@ TclNRYieldObjCmd( iPtr->numLevels = corPtr->auxNumLevels; corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; - corPtr->nargs = -2; - + corPtr->nargs = COROUTINE_ARGUMENTS_ARBITRARY; + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8504,7 +8512,7 @@ TclNRYieldmObjCmd( int result; result = TclNRYieldObjCmd(clientData, interp, objc, objv); - corPtr->nargs = -1; + corPtr->nargs = COROUTINE_ARGUMENTS_SINGLE_OPTIONAL; return result; } @@ -8728,8 +8736,7 @@ NRInterpCoroutine( { CoroutineData *corPtr = clientData; int nestNumLevels = corPtr->auxNumLevels; - int nargs = corPtr->nargs; - + if (!COR_IS_SUSPENDED(corPtr)) { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "coroutine \"", Tcl_GetString(objv[0]), @@ -8738,22 +8745,33 @@ NRInterpCoroutine( return TCL_ERROR; } - if (nargs == -2) { - if (objc > 2) { + switch (corPtr->nargs) { + case COROUTINE_ARGUMENTS_SINGLE_OPTIONAL: + switch (objc) { + case 1: + Tcl_SetObjResult(interp, objv[1]); + /* fallthrough */ + case 0: + break; + default: Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; - } else if (objc == 2) { - Tcl_SetObjResult(interp, objv[1]); } - } else { - if ((nargs != -1) && (nargs != (objc-1))) { + break; + default: + if (corPtr->nargs != objc-1) { Tcl_SetObjResult(interp, - Tcl_NewStringObj("wrong coro nargs; how did we get here? not implemeted!", -1)); - return TCL_ERROR; + Tcl_NewStringObj("wrong coro nargs; how did we get here? " + "not implemented!", -1)); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + return TCL_ERROR; } + /* fallthrough */ + case COROUTINE_ARGUMENTS_ARBITRARY: if (objc > 1) { Tcl_SetObjResult(interp, Tcl_NewListObj(objc-1, objv+1)); } + break; } /* @@ -8916,7 +8934,6 @@ TclNRCoroutineObjCmd( TclFreeIntRep(cmdObjPtr); cmdObjPtr->typePtr = NULL; - /* * Create the coro's execEnv and switch to it so that any CallFrames or * callbacks refer to the new execEnv's stack. Add the exit callback, then @@ -8931,7 +8948,7 @@ TclNRCoroutineObjCmd( TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL, NULL, NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; - iPtr->lookupNsPtr = iPtr->varFramePtr->nsPtr; + iPtr->lookupNsPtr = iPtr->varFramePtr->nsPtr; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); return TCL_OK; -- cgit v0.12 From 24e16718fb60e1a29dfe2c5c6f0a240de327f172 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Apr 2010 08:29:40 +0000 Subject: * generic/tclExecute.c (TclExecuteByteCode): Add peephole optimization of the fact that INST_DICT_FIRST and INST_DICT_NEXT always have a conditional jump afterwards. --- ChangeLog | 4 ++++ generic/tclExecute.c | 27 ++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2c4915e..de68e01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-04-30 Donal K. Fellows + * generic/tclExecute.c (TclExecuteByteCode): Add peephole optimization + of the fact that INST_DICT_FIRST and INST_DICT_NEXT always have a + conditional jump afterwards. + * generic/tclBasic.c (TclNRYieldObjCmd, TclNRYieldmObjCmd) (NRInterpCoroutine): Replace magic values for formal argument counts for coroutine command implementations with #defines, for an increase diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 04c47f4..d6dd352 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.481 2010/04/28 11:50:53 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.482 2010/04/30 08:29:40 dkf Exp $ */ #include "tclInt.h" @@ -6088,6 +6088,31 @@ TclExecuteByteCode( PUSH_OBJECT(valuePtr); PUSH_OBJECT(keyPtr); } + +#ifndef TCL_COMPILE_DEBUG + /* + * The INST_DICT_FIRST and INST_DICT_NEXT instructsions are always + * followed by a conditional jump, so we can take advantage of this to + * do some peephole optimization (note that we're careful to not close + * out someone doing something else). + */ + + pc += 5; + switch (*pc) { + case INST_JUMP_FALSE1: + NEXT_INST_F((done ? 2 : TclGetInt1AtPtr(pc+1)), 0, 0); + case INST_JUMP_FALSE4: + NEXT_INST_F((done ? 5 : TclGetInt4AtPtr(pc+1)), 0, 0); + case INST_JUMP_TRUE1: + NEXT_INST_F((done ? TclGetInt1AtPtr(pc+1) : 2), 0, 0); + case INST_JUMP_TRUE4: + NEXT_INST_F((done ? TclGetInt4AtPtr(pc+1) : 5), 0, 0); + default: + pc -= 5; + /* fall through to non-debug handling */ + } +#endif + TRACE_APPEND(("\"%.30s\" \"%.30s\" %d", O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), done)); objResultPtr = TCONST(done); -- cgit v0.12 From ddc75a8e93d575235904037587c3e772f8c96400 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Apr 2010 09:23:05 +0000 Subject: * generic/tclCompCmds.c (TclCompileVariableCmd): Slightly tighter issuing of instructions. --- ChangeLog | 3 +++ generic/tclCompCmds.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index de68e01..2cd03e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-04-30 Donal K. Fellows + * generic/tclCompCmds.c (TclCompileVariableCmd): Slightly tighter + issuing of instructions. + * generic/tclExecute.c (TclExecuteByteCode): Add peephole optimization of the fact that INST_DICT_FIRST and INST_DICT_NEXT always have a conditional jump afterwards. diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index e96c196..473dcb4 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.168 2010/03/05 14:34:03 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.169 2010/04/30 09:23:06 dkf Exp $ */ #include "tclInt.h" @@ -1699,6 +1699,7 @@ TclCompileForeachCmd( infoPtr->loopCtTemp = loopCtTemp; for (loopIndex = 0; loopIndex < numLists; loopIndex++) { ForeachVarList *varListPtr; + numVars = varcList[loopIndex]; varListPtr = (ForeachVarList *) ckalloc((unsigned) sizeof(ForeachVarList) + numVars*sizeof(int)); @@ -2162,6 +2163,7 @@ TclCompileIfCmd( Tcl_Obj *boolObj = Tcl_NewStringObj(testTokenPtr[1].start, testTokenPtr[1].size); + Tcl_IncrRefCount(boolObj); code = Tcl_GetBooleanFromObj(NULL, boolObj, &boolVal); TclDecrRefCount(boolObj); @@ -3793,7 +3795,11 @@ TclCompileVariableCmd( */ CompileWord(envPtr, valueTokenPtr, interp, 1); - TclEmitInstInt4(INST_STORE_SCALAR4, localIndex, envPtr); + if (localIndex < 0x100) { + TclEmitInstInt1(INST_STORE_SCALAR1, localIndex, envPtr); + } else { + TclEmitInstInt4(INST_STORE_SCALAR4, localIndex, envPtr); + } TclEmitOpcode(INST_POP, envPtr); } } -- cgit v0.12 From 2233b6f37129e181e04e9513e9ccc31b34672012 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Apr 2010 09:25:01 +0000 Subject: * unix/Makefile.in (gdb-test): Remove quotes so that library paths are constructed correctly. --- unix/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index d48e076..9950896 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.297 2010/04/29 21:19:32 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.298 2010/04/30 09:25:01 dkf Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -694,7 +694,7 @@ test-tcl: ${TCLTEST_EXE} $(SHELL_ENV) ./${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) gdb-test: ${TCLTEST_EXE} - @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run + @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}" > gdb.run @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run @echo "set args $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) -singleproc 1" >> gdb.run $(GDB) ./${TCLTEST_EXE} --command=gdb.run -- cgit v0.12 From 3e01004a237b5bdd39420d316a5be37c2c8215b8 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 30 Apr 2010 12:30:06 +0000 Subject: * tests/coroutine.test: testing coroutine arguments after [yield]: check that only 0/1 allowed --- ChangeLog | 5 +++++ tests/coroutine.test | 27 ++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2cd03e5..5c99f01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-30 Miguel Sofer + + * tests/coroutine.test: testing coroutine arguments after [yield]: + check that only 0/1 allowed + 2010-04-30 Donal K. Fellows * generic/tclCompCmds.c (TclCompileVariableCmd): Slightly tighter diff --git a/tests/coroutine.test b/tests/coroutine.test index caa1d0a..448ce4d 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.11 2010/01/03 20:29:12 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.12 2010/04/30 12:30:07 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -516,6 +516,31 @@ test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ unset res } -result {0 0 0 0} + +test coroutine-6.1 {coroutine nargs} \ +-body { + coroutine a ::apply $lambda + a +} -cleanup { + rename a {} +} -result 0 + +test coroutine-6.2 {coroutine nargs} \ +-body { + coroutine a ::apply $lambda + a a +} -cleanup { + rename a {} +} -result 0 + +test coroutine-6.3 {coroutine nargs} \ +-body { + coroutine a ::apply $lambda + a a a +} -cleanup { + rename a {} +} -returnCodes error + unset lambda # cleanup -- cgit v0.12 From d2d4b3a013a2e128e8f977d132e913770c62db64 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Apr 2010 12:38:46 +0000 Subject: Fix the problems I introduced inadvertently: * generic/tclBasic.c (NRInterpCoroutine): Corrected handling of * tests/coroutine.test (coroutine-6.4): arguments to deal with trickier cases. --- ChangeLog | 9 +++++++++ generic/tclBasic.c | 36 +++++++++++++++++++++++------------- tests/coroutine.test | 37 +++++++++++++++++++++++-------------- 3 files changed, 55 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c99f01..a358a5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-30 Donal K. Fellows + + * generic/tclBasic.c (NRInterpCoroutine): Corrected handling of + * tests/coroutine.test (coroutine-6.4): arguments to deal with + trickier cases. + 2010-04-30 Miguel Sofer * tests/coroutine.test: testing coroutine arguments after [yield]: @@ -5,6 +11,9 @@ 2010-04-30 Donal K. Fellows + * generic/tclBasic.c (NRInterpCoroutine): Corrected handling of + arguments to deal with trickier cases. + * generic/tclCompCmds.c (TclCompileVariableCmd): Slightly tighter issuing of instructions. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 98dd87a..7ded8f7 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.454 2010/04/30 07:56:31 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.455 2010/04/30 12:38:46 dkf Exp $ */ #include "tclInt.h" @@ -8494,7 +8494,7 @@ TclNRYieldObjCmd( iPtr->numLevels = corPtr->auxNumLevels; corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; - corPtr->nargs = COROUTINE_ARGUMENTS_ARBITRARY; + corPtr->nargs = COROUTINE_ARGUMENTS_SINGLE_OPTIONAL; TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); @@ -8511,8 +8511,15 @@ TclNRYieldmObjCmd( CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; int result; + if (!corPtr) { + Tcl_SetResult(interp, "yieldm can only be called in a coroutine", + TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "ILLEGAL_YIELD", NULL); + return TCL_ERROR; + } + result = TclNRYieldObjCmd(clientData, interp, objc, objv); - corPtr->nargs = COROUTINE_ARGUMENTS_SINGLE_OPTIONAL; + corPtr->nargs = COROUTINE_ARGUMENTS_ARBITRARY; return result; } @@ -8524,7 +8531,6 @@ TclNRYieldToObjCmd( Tcl_Obj *const objv[]) { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; - Tcl_Obj *listPtr, *nsObjPtr; Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr; Tcl_Namespace *ns1Ptr; @@ -8558,7 +8564,7 @@ TclNRYieldToObjCmd( Tcl_IncrRefCount(nsObjPtr); /* - * Add the callback in the caller's env, then instruct TEBC to yield + * Add the callback in the caller's env, then instruct TEBC to yield. */ iPtr->execEnvPtr = corPtr->callerEEPtr; @@ -8578,10 +8584,12 @@ YieldToCallback( /* CoroutineData *corPtr = data[0];*/ Tcl_Obj *listPtr = data[1]; ClientData nsPtr = data[2]; - - /* yieldTo: invoke the command using tailcall tech */ TEOV_callback *cbPtr; + /* + * yieldTo: invoke the command using tailcall tech. + */ + TclNRAddCallback(interp, NRTailcallEval, listPtr, nsPtr, NULL, NULL); cbPtr = TOP_CB(interp); TOP_CB(interp) = cbPtr->nextPtr; @@ -8745,15 +8753,17 @@ NRInterpCoroutine( return TCL_ERROR; } + /* + * Parse all the arguments to work out what to feed as the result of the + * [yield]. TRICKY POINT: objc==0 happens here! It occurs when a coroutine + * is deleted! + */ + switch (corPtr->nargs) { case COROUTINE_ARGUMENTS_SINGLE_OPTIONAL: - switch (objc) { - case 1: + if (objc == 2) { Tcl_SetObjResult(interp, objv[1]); - /* fallthrough */ - case 0: - break; - default: + } else if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; } diff --git a/tests/coroutine.test b/tests/coroutine.test index 448ce4d..d563aa4 100644 --- a/tests/coroutine.test +++ b/tests/coroutine.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: coroutine.test,v 1.12 2010/04/30 12:30:07 msofer Exp $ +# RCS: @(#) $Id: coroutine.test,v 1.13 2010/04/30 12:38:46 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -515,35 +515,44 @@ test coroutine-5.2 {right numLevels within coro} -constraints {testnrelevels} \ rename relativeLevel {} unset res } -result {0 0 0 0} - -test coroutine-6.1 {coroutine nargs} \ --body { +test coroutine-6.1 {coroutine nargs} -body { coroutine a ::apply $lambda a } -cleanup { rename a {} } -result 0 - -test coroutine-6.2 {coroutine nargs} \ --body { +test coroutine-6.2 {coroutine nargs} -body { coroutine a ::apply $lambda a a } -cleanup { rename a {} } -result 0 - -test coroutine-6.3 {coroutine nargs} \ --body { +test coroutine-6.3 {coroutine nargs} -body { coroutine a ::apply $lambda a a a } -cleanup { rename a {} -} -returnCodes error - -unset lambda - +} -returnCodes error -result {wrong # args: should be "a ?arg?"} +test coroutine-6.4 {unsupported: multi-argument yield} -body { + proc corobody {} { + set a 1 + while 1 { + set a [yield $a] + set a [::tcl::unsupported::yieldm $a] + lappend a [llength $a] + } + } + coroutine a corobody + coroutine b corobody + list [a x] [a y z] [a \{p] [a \{q r] [a] [a] [rename a {}] \ + [b ok] [rename b {}] +} -cleanup { + rename corobody {} +} -result {x {y z 2} \{p {\{q r 2} {} 0 {} ok {}} + # cleanup +unset lambda ::tcltest::cleanupTests return -- cgit v0.12 From 312f44ead9b03addb227c8fb0ee54ba9310a8032 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 30 Apr 2010 14:06:40 +0000 Subject: * generic/tclBinary.c (TclAppendBytesToByteArray): Add extra armour against buffer overflows. --- ChangeLog | 3 +++ generic/tclBinary.c | 17 +++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a358a5d..9e418d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-04-30 Donal K. Fellows + * generic/tclBinary.c (TclAppendBytesToByteArray): Add extra armour + against buffer overflows. + * generic/tclBasic.c (NRInterpCoroutine): Corrected handling of * tests/coroutine.test (coroutine-6.4): arguments to deal with trickier cases. diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 7bfa07a..b74be98 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.62 2010/04/29 15:14:33 nijtmans Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.63 2010/04/30 14:06:41 dkf Exp $ */ #include "tclInt.h" @@ -615,19 +615,24 @@ TclAppendBytesToByteArray( if (byteArrayPtr->used + (int)len > byteArrayPtr->allocated) { unsigned int attempt, used = byteArrayPtr->used; - ByteArray *tmpByteArrayPtr; + ByteArray *tmpByteArrayPtr = NULL; attempt = byteArrayPtr->allocated; do { attempt *= 2; } while (attempt < used+len); - tmpByteArrayPtr = (ByteArray *) - attemptckrealloc((char *) byteArrayPtr, - BYTEARRAY_SIZE(attempt)); + if (BYTEARRAY_SIZE(attempt) > BYTEARRAY_SIZE(used)) { + tmpByteArrayPtr = (ByteArray *) + attemptckrealloc((char *) byteArrayPtr, + BYTEARRAY_SIZE(attempt)); + } if (tmpByteArrayPtr == NULL) { attempt = used + len; + if (BYTEARRAY_SIZE(attempt) < BYTEARRAY_SIZE(used)) { + Tcl_Panic("attempt to allocate a bigger buffer than we can handle"); + } tmpByteArrayPtr = (ByteArray *) ckrealloc((char *) byteArrayPtr, BYTEARRAY_SIZE(attempt)); } @@ -1118,7 +1123,7 @@ BinaryFormatCmd( * this is safe since we aren't going to modify the array. */ - listv = (Tcl_Obj**)(objv + arg); + listv = (Tcl_Obj **) (objv + arg); listc = 1; count = 1; } else { -- cgit v0.12 From fc29863f3fe1e359b0a7727e0b8a46d7b5cef69e Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 30 Apr 2010 20:52:51 +0000 Subject: * generic/tclBinary.c (TclAppendBytesToByteArray): Add comments * generic/tclInt.h (TclAppendBytesToByteArray): placing overflow protection responsibility on caller. Convert "len" argument to signed int which any value already vetted for overflow issues will fit into. * generic/tclStringObj.c: Update caller; standardize panic msg. * generic/tclBinary.c (UpdateStringOfByteArray): Add panic when the generated string representation would grow beyond Tcl's size limits. [Bug 2994924] --- ChangeLog | 12 ++++++++++++ generic/tclBinary.c | 15 ++++++++++----- generic/tclInt.h | 4 ++-- generic/tclStringObj.c | 6 +++--- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e418d5..8041e6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-04-30 Don Porter + + * generic/tclBinary.c (TclAppendBytesToByteArray): Add comments + * generic/tclInt.h (TclAppendBytesToByteArray): placing overflow + protection responsibility on caller. Convert "len" argument to signed + int which any value already vetted for overflow issues will fit into. + * generic/tclStringObj.c: Update caller; standardize panic msg. + + * generic/tclBinary.c (UpdateStringOfByteArray): Add panic + when the generated string representation would grow beyond Tcl's + size limits. [Bug 2994924] + 2010-04-30 Donal K. Fellows * generic/tclBinary.c (TclAppendBytesToByteArray): Add extra armour diff --git a/generic/tclBinary.c b/generic/tclBinary.c index b74be98..3264a70 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBinary.c,v 1.63 2010/04/30 14:06:41 dkf Exp $ + * RCS: @(#) $Id: tclBinary.c,v 1.64 2010/04/30 20:52:51 dgp Exp $ */ #include "tclInt.h" @@ -553,11 +553,14 @@ UpdateStringOfByteArray( */ size = length; - for (i = 0; i < length; i++) { + for (i = 0; i < length && size >= 0; i++) { if ((src[i] == 0) || (src[i] > 127)) { size++; } } + if (size < 0) { + Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); + } dst = (char *) ckalloc((unsigned) (size + 1)); objPtr->bytes = dst; @@ -581,7 +584,9 @@ UpdateStringOfByteArray( * * This function appends an array of bytes to a byte array object. Note * that the object *must* be unshared, and the array of bytes *must not* - * refer to the object being appended to. + * refer to the object being appended to. Also the caller must have + * already checked that the final length of the bytearray after the + * append operations is complete will not overflow the int range. * * Results: * None. @@ -597,7 +602,7 @@ void TclAppendBytesToByteArray( Tcl_Obj *objPtr, const unsigned char *bytes, - unsigned len) + int len) { ByteArray *byteArrayPtr; @@ -613,7 +618,7 @@ TclAppendBytesToByteArray( * If we need to, resize the allocated space in the byte array. */ - if (byteArrayPtr->used + (int)len > byteArrayPtr->allocated) { + if (byteArrayPtr->used + len > byteArrayPtr->allocated) { unsigned int attempt, used = byteArrayPtr->used; ByteArray *tmpByteArrayPtr = NULL; diff --git a/generic/tclInt.h b/generic/tclInt.h index 9c5ec7f..5e37a56 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.474 2010/04/29 15:08:06 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.475 2010/04/30 20:52:51 dgp Exp $ */ #ifndef _TCLINT @@ -2802,7 +2802,7 @@ struct Tcl_LoadHandle_ { */ MODULE_SCOPE void TclAppendBytesToByteArray(Tcl_Obj *objPtr, - const unsigned char *bytes, unsigned len); + const unsigned char *bytes, int len); MODULE_SCOPE int TclNREvalCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index e91b8a4..9e2e3aa 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.136 2010/04/29 15:08:07 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.137 2010/04/30 20:52:51 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1248,10 +1248,10 @@ Tcl_AppendObjToObj( (void) Tcl_GetByteArrayFromObj(appendObjPtr, &lengthSrc); lengthTotal = length + lengthSrc; if (((length > lengthSrc) ? length : lengthSrc) > lengthTotal) { - Tcl_Panic("overflow when calculating byte array size"); + Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX); } bytesSrc = Tcl_GetByteArrayFromObj(appendObjPtr, NULL); - TclAppendBytesToByteArray(objPtr, bytesSrc, (unsigned) lengthSrc); + TclAppendBytesToByteArray(objPtr, bytesSrc, lengthSrc); return; } -- cgit v0.12 From 6230a4e9d34a3ea0b2dfc9ce47f0ab34e6ed9b81 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 30 Apr 2010 21:15:42 +0000 Subject: * generic/tcl.h: Bump patchlevel to 8.6b1.2 to distinguish * library/init.tcl: CVS snapshots from earlier snapshots as well * unix/configure.in: as the 8.6b1 and 8.6b2 releases. * win/configure.in: * unix/configure: autoconf-2.59 * win/configure: --- ChangeLog | 8 ++++++++ generic/tcl.h | 4 ++-- library/init.tcl | 4 ++-- unix/configure | 2 +- unix/configure.in | 4 ++-- win/configure | 2 +- win/configure.in | 4 ++-- 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8041e6e..8a41218 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-04-30 Don Porter + * generic/tcl.h: Bump patchlevel to 8.6b1.2 to distinguish + * library/init.tcl: CVS snapshots from earlier snapshots as well + * unix/configure.in: as the 8.6b1 and 8.6b2 releases. + * win/configure.in: + + * unix/configure: autoconf-2.59 + * win/configure: + * generic/tclBinary.c (TclAppendBytesToByteArray): Add comments * generic/tclInt.h (TclAppendBytesToByteArray): placing overflow protection responsibility on caller. Convert "len" argument to signed diff --git a/generic/tcl.h b/generic/tcl.h index 8fd5772..9a437dc 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.305 2010/04/22 11:40:31 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.306 2010/04/30 21:15:42 dgp Exp $ */ #ifndef _TCL @@ -63,7 +63,7 @@ extern "C" { #define TCL_RELEASE_SERIAL 1 #define TCL_VERSION "8.6" -#define TCL_PATCH_LEVEL "8.6b1.1" +#define TCL_PATCH_LEVEL "8.6b1.2" /* *---------------------------------------------------------------------------- diff --git a/library/init.tcl b/library/init.tcl index a62f3a0..6c77585 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.122 2009/12/30 13:47:53 msofer Exp $ +# RCS: @(#) $Id: init.tcl,v 1.123 2010/04/30 21:15:42 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -17,7 +17,7 @@ if {[info commands package] == ""} { error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]" } -package require -exact Tcl 8.6b1.1 +package require -exact Tcl 8.6b1.2 # Compute the auto path to use in this interpreter. # The values on the path come from several locations: diff --git a/unix/configure b/unix/configure index 24729b9..3f025a8 100755 --- a/unix/configure +++ b/unix/configure @@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1.1" +TCL_PATCH_LEVEL="b1.2" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/unix/configure.in b/unix/configure.in index 26f9bc0..0ff790f 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.211 2010/02/22 23:31:41 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.212 2010/04/30 21:15:42 dgp Exp $ AC_INIT([tcl],[8.6]) AC_PREREQ(2.59) @@ -27,7 +27,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1.1" +TCL_PATCH_LEVEL="b1.2" VERSION=${TCL_VERSION} #------------------------------------------------------------------------ diff --git a/win/configure b/win/configure index 021688d..58edcfd 100755 --- a/win/configure +++ b/win/configure @@ -1309,7 +1309,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1.1" +TCL_PATCH_LEVEL="b1.2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 diff --git a/win/configure.in b/win/configure.in index 8223a7e..3786b74 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.121 2010/03/30 14:05:53 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.122 2010/04/30 21:15:42 dgp Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -16,7 +16,7 @@ SHELL=/bin/sh TCL_VERSION=8.6 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=6 -TCL_PATCH_LEVEL="b1.1" +TCL_PATCH_LEVEL="b1.2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.3 -- cgit v0.12 From fd1bb5e2a2a81897608067cf5b4cfcddd0d0a923 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 3 May 2010 11:37:32 +0000 Subject: Use "tclIO.h" and "tclTomMathDecls.h" everywhere --- ChangeLog | 8 +++++++ generic/tclIORChan.c | 4 ++-- generic/tclIORTrans.c | 4 ++-- generic/tclTomMath.h | 62 +++++++++++++++++++++++++------------------------ libtommath/tommath.h | 60 +++++++++++++++++++++++------------------------ tools/fix_tommath_h.tcl | 8 +++++-- 6 files changed, 80 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a41218..036414b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-05-03 Jan Nijtmans + + * generic/tclIORChan.c Use "tclIO.h" and "tclTomMathDecls.h" + * generic/tclIORTrans.c everywhere + * generic/tclTomMath.h + * tools/fix_tommath_h.tcl + * libtommath/tommath.h Formatting (# should always be first char on line) + 2010-04-30 Don Porter * generic/tcl.h: Bump patchlevel to 8.6b1.2 to distinguish diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c index 4d9832c..2f4716e 100644 --- a/generic/tclIORChan.c +++ b/generic/tclIORChan.c @@ -15,11 +15,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORChan.c,v 1.48 2010/04/27 12:36:22 nijtmans Exp $ + * RCS: @(#) $Id: tclIORChan.c,v 1.49 2010/05/03 11:37:56 nijtmans Exp $ */ #include "tclInt.h" -#include +#include "tclIO.h" #include #ifndef EINVAL diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 608ff88..ae1ffc0 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,11 +15,11 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.16 2010/04/27 12:36:21 nijtmans Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.17 2010/05/03 11:37:32 nijtmans Exp $ */ #include "tclInt.h" -#include +#include "tclIO.h" #include #ifndef EINVAL diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h index 4e28663..73fd7aa 100644 --- a/generic/tclTomMath.h +++ b/generic/tclTomMath.h @@ -16,17 +16,19 @@ #define BN_H_ #include "tclInt.h" -#include +#include "tclTomMathDecls.h" #ifndef MODULE_SCOPE #define MODULE_SCOPE extern #endif + + #ifndef MIN - #define MIN(x,y) ((x)<(y)?(x):(y)) +# define MIN(x,y) ((x)<(y)?(x):(y)) #endif #ifndef MAX - #define MAX(x,y) ((x)>(y)?(x):(y)) +# define MAX(x,y) ((x)>(y)?(x):(y)) #endif #ifdef __cplusplus @@ -45,9 +47,9 @@ extern "C" { /* detect 64-bit mode if possible */ #if defined(NEVER) /* 128-bit ints fail in too many places */ - #if !(defined(MP_64BIT) && defined(MP_16BIT) && defined(MP_8BIT)) - #define MP_64BIT - #endif +# if !(defined(MP_64BIT) && defined(MP_16BIT) && defined(MP_8BIT)) +# define MP_64BIT +# endif #endif /* some default configurations. @@ -83,19 +85,19 @@ extern "C" { #endif typedef unsigned long mp_word __attribute__ ((mode(TI))); - #define DIGIT_BIT 60 +# define DIGIT_BIT 60 #else /* this is the default case, 28-bit digits */ /* this is to make porting into LibTomCrypt easier :-) */ #ifndef CRYPT - #if defined(_MSC_VER) || defined(__BORLANDC__) +# if defined(_MSC_VER) || defined(__BORLANDC__) typedef unsigned __int64 ulong64; typedef signed __int64 long64; - #else +# else typedef unsigned long long ulong64; typedef signed long long long64; - #endif +# endif #endif #ifndef MP_DIGIT_DECLARED @@ -106,11 +108,11 @@ extern "C" { #ifdef MP_31BIT /* this is an extension that uses 31-bit digits */ - #define DIGIT_BIT 31 +# define DIGIT_BIT 31 #else /* default case is 28-bit digits, defines MP_28BIT as a handy macro to test */ - #define DIGIT_BIT 28 - #define MP_28BIT +# define DIGIT_BIT 28 +# define MP_28BIT #endif #endif @@ -118,25 +120,25 @@ extern "C" { #if 0 /* these are macros in tclTomMathDecls.h */ #ifndef CRYPT /* default to libc stuff */ - #ifndef XMALLOC - #define XMALLOC malloc - #define XFREE free - #define XREALLOC realloc - #define XCALLOC calloc - #else +# ifndef XMALLOC +# define XMALLOC malloc +# define XFREE free +# define XREALLOC realloc +# define XCALLOC calloc +# else /* prototypes for our heap functions */ extern void *XMALLOC(size_t n); extern void *XREALLOC(void *p, size_t n); extern void *XCALLOC(size_t n, size_t s); extern void XFREE(void *p); - #endif +# endif #endif #endif /* otherwise the bits per digit is calculated automatically from the size of a mp_digit */ #ifndef DIGIT_BIT - #define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) /* bits per digit */ +# define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) /* bits per digit */ #endif #define MP_DIGIT_BIT DIGIT_BIT @@ -179,11 +181,11 @@ MODULE_SCOPE int KARATSUBA_MUL_CUTOFF, /* default precision */ #ifndef MP_PREC - #ifndef MP_LOW_MEM - #define MP_PREC 32 /* default digits of precision */ - #else - #define MP_PREC 8 /* default digits of precision */ - #endif +# ifndef MP_LOW_MEM +# define MP_PREC 32 /* default digits of precision */ +# else +# define MP_PREC 8 /* default digits of precision */ +# endif #endif /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ @@ -615,9 +617,9 @@ int mp_exptmod(mp_int *a, mp_int *b, mp_int *c, mp_int *d); /* number of primes */ #ifdef MP_8BIT - #define PRIME_SIZE 31 +# define PRIME_SIZE 31 #else - #define PRIME_SIZE 256 +# define PRIME_SIZE 256 #endif /* table of first PRIME_SIZE primes */ @@ -833,6 +835,6 @@ MODULE_SCOPE const char *mp_s_rmap; /* $Source: /root/tcl/repos-to-convert/tcl/generic/tclTomMath.h,v $ */ /* Based on Tom's version 1.8 */ -/* $Revision: 1.12 $ */ -/* $Date: 2010/04/27 12:36:21 $ */ +/* $Revision: 1.13 $ */ +/* $Date: 2010/05/03 11:38:18 $ */ diff --git a/libtommath/tommath.h b/libtommath/tommath.h index 82d9814..f869262 100644 --- a/libtommath/tommath.h +++ b/libtommath/tommath.h @@ -24,11 +24,11 @@ #include #ifndef MIN - #define MIN(x,y) ((x)<(y)?(x):(y)) +# define MIN(x,y) ((x)<(y)?(x):(y)) #endif #ifndef MAX - #define MAX(x,y) ((x)>(y)?(x):(y)) +# define MAX(x,y) ((x)>(y)?(x):(y)) #endif #ifdef __cplusplus @@ -47,9 +47,9 @@ extern "C" { /* detect 64-bit mode if possible */ #if defined(__x86_64__) - #if !(defined(MP_64BIT) && defined(MP_16BIT) && defined(MP_8BIT)) - #define MP_64BIT - #endif +# if !(defined(MP_64BIT) && defined(MP_16BIT) && defined(MP_8BIT)) +# define MP_64BIT +# endif #endif /* some default configurations. @@ -76,19 +76,19 @@ extern "C" { typedef unsigned long mp_digit; typedef unsigned long mp_word __attribute__ ((mode(TI))); - #define DIGIT_BIT 60 +# define DIGIT_BIT 60 #else /* this is the default case, 28-bit digits */ /* this is to make porting into LibTomCrypt easier :-) */ #ifndef CRYPT - #if defined(_MSC_VER) || defined(__BORLANDC__) +# if defined(_MSC_VER) || defined(__BORLANDC__) typedef unsigned __int64 ulong64; typedef signed __int64 long64; - #else +# else typedef unsigned long long ulong64; typedef signed long long long64; - #endif +# endif #endif typedef unsigned long mp_digit; @@ -96,35 +96,35 @@ extern "C" { #ifdef MP_31BIT /* this is an extension that uses 31-bit digits */ - #define DIGIT_BIT 31 +# define DIGIT_BIT 31 #else /* default case is 28-bit digits, defines MP_28BIT as a handy macro to test */ - #define DIGIT_BIT 28 - #define MP_28BIT +# define DIGIT_BIT 28 +# define MP_28BIT #endif #endif /* define heap macros */ #ifndef CRYPT /* default to libc stuff */ - #ifndef XMALLOC - #define XMALLOC malloc - #define XFREE free - #define XREALLOC realloc - #define XCALLOC calloc - #else +# ifndef XMALLOC +# define XMALLOC malloc +# define XFREE free +# define XREALLOC realloc +# define XCALLOC calloc +# else /* prototypes for our heap functions */ extern void *XMALLOC(size_t n); extern void *XREALLOC(void *p, size_t n); extern void *XCALLOC(size_t n, size_t s); extern void XFREE(void *p); - #endif +# endif #endif /* otherwise the bits per digit is calculated automatically from the size of a mp_digit */ #ifndef DIGIT_BIT - #define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) /* bits per digit */ +# define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) /* bits per digit */ #endif #define MP_DIGIT_BIT DIGIT_BIT @@ -165,11 +165,11 @@ extern int KARATSUBA_MUL_CUTOFF, /* default precision */ #ifndef MP_PREC - #ifndef MP_LOW_MEM - #define MP_PREC 32 /* default digits of precision */ - #else - #define MP_PREC 8 /* default digits of precision */ - #endif +# ifndef MP_LOW_MEM +# define MP_PREC 32 /* default digits of precision */ +# else +# define MP_PREC 8 /* default digits of precision */ +# endif #endif /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ @@ -447,9 +447,9 @@ int mp_exptmod(mp_int *a, mp_int *b, mp_int *c, mp_int *d); /* number of primes */ #ifdef MP_8BIT - #define PRIME_SIZE 31 +# define PRIME_SIZE 31 #else - #define PRIME_SIZE 256 +# define PRIME_SIZE 256 #endif /* table of first PRIME_SIZE primes */ @@ -573,7 +573,7 @@ void bn_reverse(unsigned char *s, int len); extern const char *mp_s_rmap; #ifdef __cplusplus - } +} #endif #endif @@ -581,5 +581,5 @@ extern const char *mp_s_rmap; /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/tommath.h,v $ */ /* Based on Tom's version 1.8 */ -/* $Revision: 1.4 $ */ -/* $Date: 2006/12/01 00:31:32 $ */ +/* $Revision: 1.5 $ */ +/* $Date: 2010/05/03 11:40:12 $ */ diff --git a/tools/fix_tommath_h.tcl b/tools/fix_tommath_h.tcl index 9b2d258..47d6447 100755 --- a/tools/fix_tommath_h.tcl +++ b/tools/fix_tommath_h.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fix_tommath_h.tcl,v 1.6 2007/02/14 17:59:22 kennykb Exp $ +# RCS: @(#) $Id: fix_tommath_h.tcl,v 1.7 2010/05/03 11:40:06 nijtmans Exp $ # #---------------------------------------------------------------------- @@ -25,7 +25,8 @@ foreach line [split $data \n] { {#define BN_H_} { puts $line puts {} - puts "\#include " + puts "\#include \"tclInt.h\"" + puts "\#include \"tclTomMathDecls.h\"" puts "\#ifndef MODULE_SCOPE" puts "\#define MODULE_SCOPE extern" puts "\#endif" @@ -79,6 +80,9 @@ foreach line [split $data \n] { puts "[string map {__x86_64__ NEVER} $line]\ /* 128-bit ints fail in too many places */" } + {#include} { + # remove all includes + } default { puts $line } -- cgit v0.12 From 62e51a9476fa3eb2f231c8c98bdaaa6ee57ee911 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 3 May 2010 13:20:39 +0000 Subject: For MINGW/CYGWIN, use GetCommandLineA explicitely --- ChangeLog | 1 + win/tclAppInit.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 036414b..07ba948 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * generic/tclTomMath.h * tools/fix_tommath_h.tcl * libtommath/tommath.h Formatting (# should always be first char on line) + * win/tclAppInit.c For MINGW/CYGWIN, use GetCommandLineA explicitely 2010-04-30 Don Porter diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 1f90610..a4d38de 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.30 2009/11/27 21:44:01 kennykb Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.31 2010/05/03 13:20:39 nijtmans Exp $ */ #include "tcl.h" @@ -218,7 +218,7 @@ setargv( char **argv; int argc, size, inquote, copy, slashes; - cmdLine = GetCommandLine(); /* INTL: BUG */ + cmdLine = GetCommandLineA(); /* INTL: BUG */ /* * Precompute an overly pessimistic guess at the number of arguments in -- cgit v0.12 From 091c9fee62375b69529473b975e37dc279f0bc83 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 3 May 2010 13:21:38 +0000 Subject: Add pkg, *.dll to the ignore list --- ChangeLog | 1 + unix/.cvsignore | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 07ba948..2d7be2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ * tools/fix_tommath_h.tcl * libtommath/tommath.h Formatting (# should always be first char on line) * win/tclAppInit.c For MINGW/CYGWIN, use GetCommandLineA explicitely + * unix/.cvsignore Add pkg, *.dll 2010-04-30 Don Porter diff --git a/unix/.cvsignore b/unix/.cvsignore index 9e40900..07d97c0 100644 --- a/unix/.cvsignore +++ b/unix/.cvsignore @@ -17,3 +17,5 @@ test1 test2 confdefs.h *.so +pkg +*.dll -- cgit v0.12 From 603632160ce039289adcabac2684febc649c535b Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 3 May 2010 14:36:40 +0000 Subject: CONSTify various useful internal functions (TclBignumToDouble, TclCeil, TclFloor), and related tommath functions. --- ChangeLog | 17 +++++++++++++++++ generic/tclBasic.c | 5 ++--- generic/tclInt.h | 8 ++++---- generic/tclStrToD.c | 12 ++++++------ generic/tclTomMath.decls | 20 ++++++++++---------- generic/tclTomMath.h | 22 +++++++++++----------- generic/tclTomMathDecls.h | 38 +++++++++++++++++++------------------- libtommath/bn_mp_cmp.c | 6 +++--- libtommath/bn_mp_cmp_d.c | 6 +++--- libtommath/bn_mp_cmp_mag.c | 6 +++--- libtommath/bn_mp_copy.c | 6 +++--- libtommath/bn_mp_count_bits.c | 6 +++--- libtommath/bn_mp_div_2d.c | 6 +++--- libtommath/bn_mp_mod_2d.c | 6 +++--- libtommath/bn_mp_mul_2d.c | 6 +++--- libtommath/bn_mp_neg.c | 6 +++--- libtommath/tommath.h | 22 +++++++++++----------- 17 files changed, 107 insertions(+), 91 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d7be2f..3a64eb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,23 @@ * win/tclAppInit.c For MINGW/CYGWIN, use GetCommandLineA explicitely * unix/.cvsignore Add pkg, *.dll + * libtommath/tommath.h CONSTify various useful internal functions + * libtommath/bn_mp_cmp_d.c (TclBignumToDouble, TclCeil, TclFloor), and + * libtommath/bn_mp_cmp_mag.c related tommath functions. + * libtommath/bn_mp_cmp.c + * libtommath/bn_mp_copy.c + * libtommath/bn_mp_count_bits.c + * libtommath/bn_mp_div_2d.c + * libtommath/bn_mp_mod_2d.c + * libtommath/bn_mp_mul_2d.c + * libtommath/bn_mp_neg.c + * generic/tclBasic.c Handle TODO: const correctness ? + * generic/tclInt.h + * generic/tclStrToD.c + * generic/tclTomMath.decls + * generic/tclTomMath.h + * generic/tclTomMathDecls.h + 2010-04-30 Don Porter * generic/tcl.h: Bump patchlevel to 8.6b1.2 to distinguish diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7ded8f7..a7dce89 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.455 2010/04/30 12:38:46 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.456 2010/05/03 14:36:41 nijtmans Exp $ */ #include "tclInt.h" @@ -7501,8 +7501,7 @@ ExprAbsFunc( #endif if (type == TCL_NUMBER_BIG) { - /* TODO: const correctness ? */ - if (mp_cmp_d((mp_int *) ptr, 0) == MP_LT) { + if (mp_cmp_d((const mp_int *) ptr, 0) == MP_LT) { Tcl_GetBignumFromObj(NULL, objv[1], &big); tooLarge: mp_neg(&big, &big); diff --git a/generic/tclInt.h b/generic/tclInt.h index 5e37a56..fa503cc 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.475 2010/04/30 20:52:51 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.476 2010/05/03 14:36:40 nijtmans Exp $ */ #ifndef _TCLINT @@ -2823,11 +2823,11 @@ MODULE_SCOPE void TclArgumentGet(Tcl_Interp *interp, Tcl_Obj *obj, CmdFrame **cfPtrPtr, int *wordPtr); MODULE_SCOPE int TclArraySet(Tcl_Interp *interp, Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj); -MODULE_SCOPE double TclBignumToDouble(mp_int *bignum); +MODULE_SCOPE double TclBignumToDouble(const mp_int *bignum); MODULE_SCOPE int TclByteArrayMatch(const unsigned char *string, int strLen, const unsigned char *pattern, int ptnLen, int flags); -MODULE_SCOPE double TclCeil(mp_int *a); +MODULE_SCOPE double TclCeil(const mp_int *a); MODULE_SCOPE int TclCheckBadOctal(Tcl_Interp *interp, const char *value); MODULE_SCOPE int TclChanCaughtErrorBypass(Tcl_Interp *interp, @@ -2883,7 +2883,7 @@ MODULE_SCOPE void TclFinalizeSynchronization(void); MODULE_SCOPE void TclFinalizeThreadAlloc(void); MODULE_SCOPE void TclFinalizeThreadData(void); MODULE_SCOPE void TclFinalizeThreadObjects(void); -MODULE_SCOPE double TclFloor(mp_int *a); +MODULE_SCOPE double TclFloor(const mp_int *a); MODULE_SCOPE void TclFormatNaN(double value, char *buffer); MODULE_SCOPE int TclFSFileAttrIndex(Tcl_Obj *pathPtr, const char *attributeName, int *indexPtr); diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index fdfdb5e..8094e87 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.43 2010/04/27 12:36:22 nijtmans Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.44 2010/05/03 14:36:41 nijtmans Exp $ * *---------------------------------------------------------------------- */ @@ -137,7 +137,7 @@ static int n770_fp; /* Flag is 1 on Nokia N770 floating point. static double AbsoluteValue(double v, int *signum); static int AccumulateDecimalDigit(unsigned, int, Tcl_WideUInt *, mp_int *, int); -static double BignumToBiasedFrExp(mp_int *big, int *machexp); +static double BignumToBiasedFrExp(const mp_int *big, int *machexp); static int GetIntegerTimesPower(double v, mp_int *r, int *e); static double MakeHighPrecisionDouble(int signum, mp_int *significand, int nSigDigs, int exponent); @@ -2369,7 +2369,7 @@ Tcl_InitBignumFromDouble( double TclBignumToDouble( - mp_int *a) /* Integer to convert. */ + const mp_int *a) /* Integer to convert. */ { mp_int b; int bits, shift, i; @@ -2430,7 +2430,7 @@ TclBignumToDouble( double TclCeil( - mp_int *a) /* Integer to convert. */ + const mp_int *a) /* Integer to convert. */ { double r = 0.0; mp_int b; @@ -2473,7 +2473,7 @@ TclCeil( double TclFloor( - mp_int *a) /* Integer to convert. */ + const mp_int *a) /* Integer to convert. */ { double r = 0.0; mp_int b; @@ -2529,7 +2529,7 @@ TclFloor( static double BignumToBiasedFrExp( - mp_int *a, /* Integer to convert */ + const mp_int *a, /* Integer to convert */ int *machexp) /* Power of two */ { mp_int b; diff --git a/generic/tclTomMath.decls b/generic/tclTomMath.decls index a170de8..2721c1d 100644 --- a/generic/tclTomMath.decls +++ b/generic/tclTomMath.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclTomMath.decls,v 1.6 2010/01/29 16:17:20 nijtmans Exp $ +# RCS: @(#) $Id: tclTomMath.decls,v 1.7 2010/05/03 14:36:40 nijtmans Exp $ library tcl @@ -50,19 +50,19 @@ declare 7 generic { void TclBN_mp_clear_multi(mp_int *a, ...) } declare 8 generic { - int TclBN_mp_cmp(mp_int *a, mp_int *b) + int TclBN_mp_cmp(const mp_int *a, const mp_int *b) } declare 9 generic { - int TclBN_mp_cmp_d(mp_int *a, mp_digit b) + int TclBN_mp_cmp_d(const mp_int *a, mp_digit b) } declare 10 generic { - int TclBN_mp_cmp_mag(mp_int *a, mp_int *b) + int TclBN_mp_cmp_mag(const mp_int *a, const mp_int *b) } declare 11 generic { - int TclBN_mp_copy(mp_int *a, mp_int *b) + int TclBN_mp_copy(const mp_int *a, mp_int *b) } declare 12 generic { - int TclBN_mp_count_bits(mp_int *a) + int TclBN_mp_count_bits(const mp_int *a) } declare 13 generic { int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q, mp_int *r) @@ -74,7 +74,7 @@ declare 15 generic { int TclBN_mp_div_2(mp_int *a, mp_int *q) } declare 16 generic { - int TclBN_mp_div_2d(mp_int *a, int b, mp_int *q, mp_int *r) + int TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q, mp_int *r) } declare 17 generic { int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit *r) @@ -110,7 +110,7 @@ declare 27 generic { int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r) } declare 28 generic { - int TclBN_mp_mod_2d(mp_int *a, int b, mp_int *r) + int TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r) } declare 29 generic { int TclBN_mp_mul(mp_int *a, mp_int *b, mp_int *p) @@ -122,10 +122,10 @@ declare 31 generic { int TclBN_mp_mul_2(mp_int *a, mp_int *p) } declare 32 generic { - int TclBN_mp_mul_2d(mp_int *a, int d, mp_int *p) + int TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p) } declare 33 generic { - int TclBN_mp_neg(mp_int *a, mp_int *b) + int TclBN_mp_neg(const mp_int *a, mp_int *b) } declare 34 generic { int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c) diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h index 73fd7aa..0b2df47 100644 --- a/generic/tclTomMath.h +++ b/generic/tclTomMath.h @@ -290,7 +290,7 @@ int mp_init_set_int (mp_int * a, unsigned long b); /* copy, b = a */ /* -int mp_copy(mp_int *a, mp_int *b); +int mp_copy(const mp_int *a, mp_int *b); */ /* inits and copies, a = b */ @@ -317,7 +317,7 @@ int mp_lshd(mp_int *a, int b); /* c = a / 2**b */ /* -int mp_div_2d(mp_int *a, int b, mp_int *c, mp_int *d); +int mp_div_2d(const mp_int *a, int b, mp_int *c, mp_int *d); */ /* b = a/2 */ @@ -327,7 +327,7 @@ int mp_div_2(mp_int *a, mp_int *b); /* c = a * 2**b */ /* -int mp_mul_2d(mp_int *a, int b, mp_int *c); +int mp_mul_2d(const mp_int *a, int b, mp_int *c); */ /* b = a*2 */ @@ -337,7 +337,7 @@ int mp_mul_2(mp_int *a, mp_int *b); /* c = a mod 2**d */ /* -int mp_mod_2d(mp_int *a, int b, mp_int *c); +int mp_mod_2d(const mp_int *a, int b, mp_int *c); */ /* computes a = 2**b */ @@ -377,7 +377,7 @@ int mp_and(mp_int *a, mp_int *b, mp_int *c); /* b = -a */ /* -int mp_neg(mp_int *a, mp_int *b); +int mp_neg(const mp_int *a, mp_int *b); */ /* b = |a| */ @@ -387,12 +387,12 @@ int mp_abs(mp_int *a, mp_int *b); /* compare a to b */ /* -int mp_cmp(mp_int *a, mp_int *b); +int mp_cmp(const mp_int *a, const mp_int *b); */ /* compare |a| to |b| */ /* -int mp_cmp_mag(mp_int *a, mp_int *b); +int mp_cmp_mag(const mp_int *a, const mp_int *b); */ /* c = a + b */ @@ -429,7 +429,7 @@ int mp_mod(mp_int *a, mp_int *b, mp_int *c); /* compare against a single digit */ /* -int mp_cmp_d(mp_int *a, mp_digit b); +int mp_cmp_d(const mp_int *a, mp_digit b); */ /* c = a + b */ @@ -704,7 +704,7 @@ int mp_prime_random_ex(mp_int *a, int t, int size, int flags, ltm_prime_callback /* ---> radix conversion <--- */ /* -int mp_count_bits(mp_int *a); +int mp_count_bits(const mp_int *a); */ /* @@ -835,6 +835,6 @@ MODULE_SCOPE const char *mp_s_rmap; /* $Source: /root/tcl/repos-to-convert/tcl/generic/tclTomMath.h,v $ */ /* Based on Tom's version 1.8 */ -/* $Revision: 1.13 $ */ -/* $Date: 2010/05/03 11:38:18 $ */ +/* $Revision: 1.14 $ */ +/* $Date: 2010/05/03 14:36:41 $ */ diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index ee57f96..11555e8 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.11 2010/02/05 10:03:23 nijtmans Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.12 2010/05/03 14:36:41 nijtmans Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -180,27 +180,27 @@ EXTERN void TclBN_mp_clear_multi(mp_int *a, ...); #ifndef TclBN_mp_cmp_TCL_DECLARED #define TclBN_mp_cmp_TCL_DECLARED /* 8 */ -EXTERN int TclBN_mp_cmp(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_cmp(const mp_int *a, const mp_int *b); #endif #ifndef TclBN_mp_cmp_d_TCL_DECLARED #define TclBN_mp_cmp_d_TCL_DECLARED /* 9 */ -EXTERN int TclBN_mp_cmp_d(mp_int *a, mp_digit b); +EXTERN int TclBN_mp_cmp_d(const mp_int *a, mp_digit b); #endif #ifndef TclBN_mp_cmp_mag_TCL_DECLARED #define TclBN_mp_cmp_mag_TCL_DECLARED /* 10 */ -EXTERN int TclBN_mp_cmp_mag(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_cmp_mag(const mp_int *a, const mp_int *b); #endif #ifndef TclBN_mp_copy_TCL_DECLARED #define TclBN_mp_copy_TCL_DECLARED /* 11 */ -EXTERN int TclBN_mp_copy(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_copy(const mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_count_bits_TCL_DECLARED #define TclBN_mp_count_bits_TCL_DECLARED /* 12 */ -EXTERN int TclBN_mp_count_bits(mp_int *a); +EXTERN int TclBN_mp_count_bits(const mp_int *a); #endif #ifndef TclBN_mp_div_TCL_DECLARED #define TclBN_mp_div_TCL_DECLARED @@ -222,7 +222,7 @@ EXTERN int TclBN_mp_div_2(mp_int *a, mp_int *q); #ifndef TclBN_mp_div_2d_TCL_DECLARED #define TclBN_mp_div_2d_TCL_DECLARED /* 16 */ -EXTERN int TclBN_mp_div_2d(mp_int *a, int b, mp_int *q, +EXTERN int TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q, mp_int *r); #endif #ifndef TclBN_mp_div_3_TCL_DECLARED @@ -283,7 +283,7 @@ EXTERN int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r); #ifndef TclBN_mp_mod_2d_TCL_DECLARED #define TclBN_mp_mod_2d_TCL_DECLARED /* 28 */ -EXTERN int TclBN_mp_mod_2d(mp_int *a, int b, mp_int *r); +EXTERN int TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r); #endif #ifndef TclBN_mp_mul_TCL_DECLARED #define TclBN_mp_mul_TCL_DECLARED @@ -303,12 +303,12 @@ EXTERN int TclBN_mp_mul_2(mp_int *a, mp_int *p); #ifndef TclBN_mp_mul_2d_TCL_DECLARED #define TclBN_mp_mul_2d_TCL_DECLARED /* 32 */ -EXTERN int TclBN_mp_mul_2d(mp_int *a, int d, mp_int *p); +EXTERN int TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p); #endif #ifndef TclBN_mp_neg_TCL_DECLARED #define TclBN_mp_neg_TCL_DECLARED /* 33 */ -EXTERN int TclBN_mp_neg(mp_int *a, mp_int *b); +EXTERN int TclBN_mp_neg(const mp_int *a, mp_int *b); #endif #ifndef TclBN_mp_or_TCL_DECLARED #define TclBN_mp_or_TCL_DECLARED @@ -464,15 +464,15 @@ typedef struct TclTomMathStubs { void (*tclBN_mp_clamp) (mp_int *a); /* 5 */ void (*tclBN_mp_clear) (mp_int *a); /* 6 */ void (*tclBN_mp_clear_multi) (mp_int *a, ...); /* 7 */ - int (*tclBN_mp_cmp) (mp_int *a, mp_int *b); /* 8 */ - int (*tclBN_mp_cmp_d) (mp_int *a, mp_digit b); /* 9 */ - int (*tclBN_mp_cmp_mag) (mp_int *a, mp_int *b); /* 10 */ - int (*tclBN_mp_copy) (mp_int *a, mp_int *b); /* 11 */ - int (*tclBN_mp_count_bits) (mp_int *a); /* 12 */ + int (*tclBN_mp_cmp) (const mp_int *a, const mp_int *b); /* 8 */ + int (*tclBN_mp_cmp_d) (const mp_int *a, mp_digit b); /* 9 */ + int (*tclBN_mp_cmp_mag) (const mp_int *a, const mp_int *b); /* 10 */ + int (*tclBN_mp_copy) (const mp_int *a, mp_int *b); /* 11 */ + int (*tclBN_mp_count_bits) (const mp_int *a); /* 12 */ int (*tclBN_mp_div) (mp_int *a, mp_int *b, mp_int *q, mp_int *r); /* 13 */ int (*tclBN_mp_div_d) (mp_int *a, mp_digit b, mp_int *q, mp_digit *r); /* 14 */ int (*tclBN_mp_div_2) (mp_int *a, mp_int *q); /* 15 */ - int (*tclBN_mp_div_2d) (mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */ + int (*tclBN_mp_div_2d) (const mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */ int (*tclBN_mp_div_3) (mp_int *a, mp_int *q, mp_digit *r); /* 17 */ void (*tclBN_mp_exch) (mp_int *a, mp_int *b); /* 18 */ int (*tclBN_mp_expt_d) (mp_int *a, mp_digit b, mp_int *c); /* 19 */ @@ -484,12 +484,12 @@ typedef struct TclTomMathStubs { int (*tclBN_mp_init_size) (mp_int *a, int size); /* 25 */ int (*tclBN_mp_lshd) (mp_int *a, int shift); /* 26 */ int (*tclBN_mp_mod) (mp_int *a, mp_int *b, mp_int *r); /* 27 */ - int (*tclBN_mp_mod_2d) (mp_int *a, int b, mp_int *r); /* 28 */ + int (*tclBN_mp_mod_2d) (const mp_int *a, int b, mp_int *r); /* 28 */ int (*tclBN_mp_mul) (mp_int *a, mp_int *b, mp_int *p); /* 29 */ int (*tclBN_mp_mul_d) (mp_int *a, mp_digit b, mp_int *p); /* 30 */ int (*tclBN_mp_mul_2) (mp_int *a, mp_int *p); /* 31 */ - int (*tclBN_mp_mul_2d) (mp_int *a, int d, mp_int *p); /* 32 */ - int (*tclBN_mp_neg) (mp_int *a, mp_int *b); /* 33 */ + int (*tclBN_mp_mul_2d) (const mp_int *a, int d, mp_int *p); /* 32 */ + int (*tclBN_mp_neg) (const mp_int *a, mp_int *b); /* 33 */ int (*tclBN_mp_or) (mp_int *a, mp_int *b, mp_int *c); /* 34 */ int (*tclBN_mp_radix_size) (mp_int *a, int radix, int *size); /* 35 */ int (*tclBN_mp_read_radix) (mp_int *a, const char *str, int radix); /* 36 */ diff --git a/libtommath/bn_mp_cmp.c b/libtommath/bn_mp_cmp.c index 6361730..8029633 100644 --- a/libtommath/bn_mp_cmp.c +++ b/libtommath/bn_mp_cmp.c @@ -17,7 +17,7 @@ /* compare two ints (signed)*/ int -mp_cmp (mp_int * a, mp_int * b) +mp_cmp (const mp_int * a, const mp_int * b) { /* compare based on sign */ if (a->sign != b->sign) { @@ -39,5 +39,5 @@ mp_cmp (mp_int * a, mp_int * b) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_cmp.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_cmp_d.c b/libtommath/bn_mp_cmp_d.c index 92c3567..2dded75 100644 --- a/libtommath/bn_mp_cmp_d.c +++ b/libtommath/bn_mp_cmp_d.c @@ -16,7 +16,7 @@ */ /* compare a digit */ -int mp_cmp_d(mp_int * a, mp_digit b) +int mp_cmp_d(const mp_int * a, mp_digit b) { /* compare based on sign */ if (a->sign == MP_NEG) { @@ -40,5 +40,5 @@ int mp_cmp_d(mp_int * a, mp_digit b) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_cmp_d.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_cmp_mag.c b/libtommath/bn_mp_cmp_mag.c index 31c8221..8c6c169 100644 --- a/libtommath/bn_mp_cmp_mag.c +++ b/libtommath/bn_mp_cmp_mag.c @@ -16,7 +16,7 @@ */ /* compare maginitude of two ints (unsigned) */ -int mp_cmp_mag (mp_int * a, mp_int * b) +int mp_cmp_mag (const mp_int * a, const mp_int * b) { int n; mp_digit *tmpa, *tmpb; @@ -51,5 +51,5 @@ int mp_cmp_mag (mp_int * a, mp_int * b) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_cmp_mag.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_copy.c b/libtommath/bn_mp_copy.c index a5d5e6f..1d6c5cb 100644 --- a/libtommath/bn_mp_copy.c +++ b/libtommath/bn_mp_copy.c @@ -17,7 +17,7 @@ /* copy, b = a */ int -mp_copy (mp_int * a, mp_int * b) +mp_copy (const mp_int * a, mp_int * b) { int res, n; @@ -64,5 +64,5 @@ mp_copy (mp_int * a, mp_int * b) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_copy.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_count_bits.c b/libtommath/bn_mp_count_bits.c index 44c0cff..909c153 100644 --- a/libtommath/bn_mp_count_bits.c +++ b/libtommath/bn_mp_count_bits.c @@ -17,7 +17,7 @@ /* returns the number of bits in an int */ int -mp_count_bits (mp_int * a) +mp_count_bits (const mp_int * a) { int r; mp_digit q; @@ -41,5 +41,5 @@ mp_count_bits (mp_int * a) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_count_bits.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_div_2d.c b/libtommath/bn_mp_div_2d.c index 12a7c99..2bdbdb5 100644 --- a/libtommath/bn_mp_div_2d.c +++ b/libtommath/bn_mp_div_2d.c @@ -16,7 +16,7 @@ */ /* shift right by a certain bit count (store quotient in c, optional remainder in d) */ -int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) +int mp_div_2d (const mp_int * a, int b, mp_int * c, mp_int * d) { mp_digit D, r, rr; int x, res; @@ -93,5 +93,5 @@ int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_div_2d.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_mod_2d.c b/libtommath/bn_mp_mod_2d.c index 2ab7e33..e94a819 100644 --- a/libtommath/bn_mp_mod_2d.c +++ b/libtommath/bn_mp_mod_2d.c @@ -17,7 +17,7 @@ /* calc a value mod 2**b */ int -mp_mod_2d (mp_int * a, int b, mp_int * c) +mp_mod_2d (const mp_int * a, int b, mp_int * c) { int x, res; @@ -51,5 +51,5 @@ mp_mod_2d (mp_int * a, int b, mp_int * c) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_mod_2d.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_mul_2d.c b/libtommath/bn_mp_mul_2d.c index 88fa080..8672ee3 100644 --- a/libtommath/bn_mp_mul_2d.c +++ b/libtommath/bn_mp_mul_2d.c @@ -16,7 +16,7 @@ */ /* shift left by a certain bit count */ -int mp_mul_2d (mp_int * a, int b, mp_int * c) +int mp_mul_2d (const mp_int * a, int b, mp_int * c) { mp_digit d; int res; @@ -81,5 +81,5 @@ int mp_mul_2d (mp_int * a, int b, mp_int * c) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_mul_2d.c,v $ */ -/* $Revision: 1.1.1.3 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/bn_mp_neg.c b/libtommath/bn_mp_neg.c index 17e851a..886db3f 100644 --- a/libtommath/bn_mp_neg.c +++ b/libtommath/bn_mp_neg.c @@ -16,7 +16,7 @@ */ /* b = -a */ -int mp_neg (mp_int * a, mp_int * b) +int mp_neg (const mp_int * a, mp_int * b) { int res; if (a != b) { @@ -36,5 +36,5 @@ int mp_neg (mp_int * a, mp_int * b) #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_neg.c,v $ */ -/* $Revision: 1.1.1.4 $ */ -/* $Date: 2006/12/01 00:08:11 $ */ +/* $Revision: 1.2 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ diff --git a/libtommath/tommath.h b/libtommath/tommath.h index f869262..7cc7d4e 100644 --- a/libtommath/tommath.h +++ b/libtommath/tommath.h @@ -241,7 +241,7 @@ int mp_init_set (mp_int * a, mp_digit b); int mp_init_set_int (mp_int * a, unsigned long b); /* copy, b = a */ -int mp_copy(mp_int *a, mp_int *b); +int mp_copy(const mp_int *a, mp_int *b); /* inits and copies, a = b */ int mp_init_copy(mp_int *a, mp_int *b); @@ -258,19 +258,19 @@ void mp_rshd(mp_int *a, int b); int mp_lshd(mp_int *a, int b); /* c = a / 2**b */ -int mp_div_2d(mp_int *a, int b, mp_int *c, mp_int *d); +int mp_div_2d(const mp_int *a, int b, mp_int *c, mp_int *d); /* b = a/2 */ int mp_div_2(mp_int *a, mp_int *b); /* c = a * 2**b */ -int mp_mul_2d(mp_int *a, int b, mp_int *c); +int mp_mul_2d(const mp_int *a, int b, mp_int *c); /* b = a*2 */ int mp_mul_2(mp_int *a, mp_int *b); /* c = a mod 2**d */ -int mp_mod_2d(mp_int *a, int b, mp_int *c); +int mp_mod_2d(const mp_int *a, int b, mp_int *c); /* computes a = 2**b */ int mp_2expt(mp_int *a, int b); @@ -296,16 +296,16 @@ int mp_and(mp_int *a, mp_int *b, mp_int *c); /* ---> Basic arithmetic <--- */ /* b = -a */ -int mp_neg(mp_int *a, mp_int *b); +int mp_neg(const mp_int *a, mp_int *b); /* b = |a| */ int mp_abs(mp_int *a, mp_int *b); /* compare a to b */ -int mp_cmp(mp_int *a, mp_int *b); +int mp_cmp(const mp_int *a, const mp_int *b); /* compare |a| to |b| */ -int mp_cmp_mag(mp_int *a, mp_int *b); +int mp_cmp_mag(const mp_int *a, const mp_int *b); /* c = a + b */ int mp_add(mp_int *a, mp_int *b, mp_int *c); @@ -328,7 +328,7 @@ int mp_mod(mp_int *a, mp_int *b, mp_int *c); /* ---> single digit functions <--- */ /* compare against a single digit */ -int mp_cmp_d(mp_int *a, mp_digit b); +int mp_cmp_d(const mp_int *a, mp_digit b); /* c = a + b */ int mp_add_d(mp_int *a, mp_digit b, mp_int *c); @@ -517,7 +517,7 @@ int mp_prime_next_prime(mp_int *a, int t, int bbs_style); int mp_prime_random_ex(mp_int *a, int t, int size, int flags, ltm_prime_callback cb, void *dat); /* ---> radix conversion <--- */ -int mp_count_bits(mp_int *a); +int mp_count_bits(const mp_int *a); int mp_unsigned_bin_size(mp_int *a); int mp_read_unsigned_bin(mp_int *a, const unsigned char *b, int c); @@ -581,5 +581,5 @@ extern const char *mp_s_rmap; /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/tommath.h,v $ */ /* Based on Tom's version 1.8 */ -/* $Revision: 1.5 $ */ -/* $Date: 2010/05/03 11:40:12 $ */ +/* $Revision: 1.6 $ */ +/* $Date: 2010/05/03 14:36:40 $ */ -- cgit v0.12 From 12f45b93f54d74dcc7e81bd9b04f9734f832f72f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 4 May 2010 11:05:34 +0000 Subject: TCHAR-related fixes, making those files compile fine when TCHAR != char Please see comments in [Freq 2965056] (2965056-1.patch). --- ChangeLog | 6 ++++++ win/tclWinNotify.c | 11 ++++++----- win/tclWinSock.c | 11 ++++++----- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a64eb7..f24c9e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-04 Jan Nijtmans + + * win/tclWinNotify.c TCHAR-related fixes, making those two + * win/tclWinSock.c files compile fine when TCHAR != char + Please see comments in [Freq 2965056] (2965056-1.patch). + 2010-05-03 Jan Nijtmans * generic/tclIORChan.c Use "tclIO.h" and "tclTomMathDecls.h" diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 9e0db15..352379d 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.26 2009/11/18 21:59:49 nijtmans Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.27 2010/05/04 11:05:34 nijtmans Exp $ */ #include "tclInt.h" @@ -52,6 +52,7 @@ static Tcl_ThreadDataKey dataKey; */ static int notifierCount = 0; +static const TCHAR classname[] = TEXT("TclNotifier"); TCL_DECLARE_MUTEX(notifierMutex) /* @@ -99,12 +100,12 @@ Tcl_InitNotifier(void) class.hInstance = TclWinGetTclInstance(); class.hbrBackground = NULL; class.lpszMenuName = NULL; - class.lpszClassName = "TclNotifier"; + class.lpszClassName = classname; class.lpfnWndProc = NotifierProc; class.hIcon = NULL; class.hCursor = NULL; - if (!RegisterClassA(&class)) { + if (!RegisterClass(&class)) { Tcl_Panic("Unable to register TclNotifier window class"); } } @@ -187,7 +188,7 @@ Tcl_FinalizeNotifier( Tcl_MutexLock(¬ifierMutex); notifierCount--; if (notifierCount == 0) { - UnregisterClassA("TclNotifier", TclWinGetTclInstance()); + UnregisterClass(classname, TclWinGetTclInstance()); } Tcl_MutexUnlock(¬ifierMutex); } @@ -351,7 +352,7 @@ Tcl_ServiceModeHook( */ if (mode == TCL_SERVICE_ALL && !tsdPtr->hwnd) { - tsdPtr->hwnd = CreateWindowA("TclNotifier", "TclNotifier", + tsdPtr->hwnd = CreateWindow(classname, classname, WS_TILED, 0, 0, 0, 0, NULL, NULL, TclWinGetTclInstance(), NULL); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 27f7245..63f5f0c 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.70 2010/03/07 14:39:25 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.71 2010/05/04 11:05:34 nijtmans Exp $ */ #include "tclWinInt.h" @@ -41,6 +41,7 @@ */ static int initialized = 0; +static const TCHAR classname[] = TEXT("TclSocket"); TCL_DECLARE_MUTEX(socketMutex) /* @@ -247,12 +248,12 @@ InitSockets(void) windowClass.hInstance = TclWinGetTclInstance(); windowClass.hbrBackground = NULL; windowClass.lpszMenuName = NULL; - windowClass.lpszClassName = "TclSocket"; + windowClass.lpszClassName = classname; windowClass.lpfnWndProc = SocketProc; windowClass.hIcon = NULL; windowClass.hCursor = NULL; - if (!RegisterClassA(&windowClass)) { + if (!RegisterClass(&windowClass)) { TclWinConvertError(GetLastError()); goto initFailure; } @@ -394,7 +395,7 @@ SocketExitHandler( */ TclpFinalizeSockets(); - UnregisterClass("TclSocket", TclWinGetTclInstance()); + UnregisterClass(classname, TclWinGetTclInstance()); WSACleanup(); initialized = 0; Tcl_MutexUnlock(&socketMutex); @@ -2192,7 +2193,7 @@ SocketThread( * Create a dummy window receiving socket events. */ - tsdPtr->hwnd = CreateWindow("TclSocket", "TclSocket", + tsdPtr->hwnd = CreateWindow(classname, classname, WS_TILED, 0, 0, 0, 0, NULL, NULL, windowClass.hInstance, arg); /* -- cgit v0.12 From 287b160a61d09c34c6e579e96552e2bb361058cc Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 5 May 2010 22:43:46 +0000 Subject: Unnecessary type casts, See Tcl [Patch #2997087] --- ChangeLog | 4 ++++ generic/tclPkg.c | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f24c9e9..e7a0574 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-05-06 Jan Nijtmans + + * generic/tclPkg.c Unnecessary type casts, See Tcl [Patch #2997087] + 2010-05-04 Jan Nijtmans * win/tclWinNotify.c TCHAR-related fixes, making those two diff --git a/generic/tclPkg.c b/generic/tclPkg.c index d26c630..31972af 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPkg.c,v 1.41 2009/12/11 23:10:47 nijtmans Exp $ + * RCS: @(#) $Id: tclPkg.c,v 1.42 2010/05/05 22:43:46 nijtmans Exp $ * * TIP #268. * Heavily rewritten to handle the extend version numbers, and extended @@ -477,14 +477,14 @@ PkgRequireCore( * will still exist when the script completes. */ - const char *versionToProvide = bestPtr->version; + char *versionToProvide = bestPtr->version; script = bestPtr->script; - pkgPtr->clientData = (ClientData) versionToProvide; - Tcl_Preserve((ClientData) script); - Tcl_Preserve((ClientData) versionToProvide); + pkgPtr->clientData = versionToProvide; + Tcl_Preserve(script); + Tcl_Preserve(versionToProvide); code = Tcl_EvalEx(interp, script, -1, TCL_EVAL_GLOBAL); - Tcl_Release((ClientData) script); + Tcl_Release(script); pkgPtr = FindPackage(interp, name); if (code == TCL_OK) { @@ -536,7 +536,7 @@ PkgRequireCore( "\n (\"package ifneeded %s %s\" script)", name, versionToProvide)); } - Tcl_Release((ClientData) versionToProvide); + Tcl_Release(versionToProvide); if (code != TCL_OK) { /* @@ -790,8 +790,8 @@ Tcl_PackageObjCmd( while (pkgPtr->availPtr != NULL) { availPtr = pkgPtr->availPtr; pkgPtr->availPtr = availPtr->nextPtr; - Tcl_EventuallyFree((ClientData)availPtr->version, TCL_DYNAMIC); - Tcl_EventuallyFree((ClientData)availPtr->script, TCL_DYNAMIC); + Tcl_EventuallyFree(availPtr->version, TCL_DYNAMIC); + Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC); ckfree((char *) availPtr); } ckfree((char *) pkgPtr); @@ -840,7 +840,7 @@ Tcl_PackageObjCmd( Tcl_SetResult(interp, availPtr->script, TCL_VOLATILE); return TCL_OK; } - Tcl_EventuallyFree((ClientData)availPtr->script, TCL_DYNAMIC); + Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC); break; } } @@ -1201,8 +1201,8 @@ TclFreePackageInfo( while (pkgPtr->availPtr != NULL) { availPtr = pkgPtr->availPtr; pkgPtr->availPtr = availPtr->nextPtr; - Tcl_EventuallyFree((ClientData)availPtr->version, TCL_DYNAMIC); - Tcl_EventuallyFree((ClientData)availPtr->script, TCL_DYNAMIC); + Tcl_EventuallyFree(availPtr->version, TCL_DYNAMIC); + Tcl_EventuallyFree(availPtr->script, TCL_DYNAMIC); ckfree((char *) availPtr); } ckfree((char *) pkgPtr); -- cgit v0.12 From 4d121f611d686f514965d65ee8fc91fb882824e3 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 7 May 2010 20:16:50 +0000 Subject: * library/platform/platform.tcl: Fix cpu name for Solaris/Intel 64bit. * library/platform/pkgIndex.tcl: Package updated to version 1.0.8. * unix/Makefile.in: * win/Makefile.in: --- ChangeLog | 7 +++++++ library/platform/pkgIndex.tcl | 2 +- library/platform/platform.tcl | 9 +++++++-- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7a0574..e83dd5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-05-07 Andreas Kupries + + * library/platform/platform.tcl: Fix cpu name for Solaris/Intel 64bit. + * library/platform/pkgIndex.tcl: Package updated to version 1.0.8. + * unix/Makefile.in: + * win/Makefile.in: + 2010-05-06 Jan Nijtmans * generic/tclPkg.c Unnecessary type casts, See Tcl [Patch #2997087] diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 69ca721..808f995 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.7 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.8 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 838ceec..370c48a 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -103,7 +103,12 @@ proc ::platform::generic {} { } sunos { set plat solaris - if {![string match "ia64*" $cpu]} { + if {[string match "ix86" $cpu]} { + if {$tcl_platform(wordSize) == 8} { + set cpu x86_64 + } + } elseif {![string match "ia64*" $cpu]} { + # sparc if {$tcl_platform(wordSize) == 8} { append cpu 64 } @@ -309,7 +314,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.7 +package provide platform 1.0.8 # ### ### ### ######### ######### ######### ## Demo application diff --git a/unix/Makefile.in b/unix/Makefile.in index 9950896..cf34a71 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.298 2010/04/30 09:25:01 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.299 2010/05/07 20:16:50 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -856,8 +856,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.7 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.7.tm; + @echo "Installing package platform 1.0.8 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.8.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 6f58dc7..9023bdf 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.178 2010/04/29 21:19:32 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.179 2010/05/07 20:16:50 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -675,8 +675,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.3.tm; @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.7 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.7.tm; + @echo "Installing package platform 1.0.8 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.8.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12 From de40abc6da2cdfe574bf281fbaf84fa03a7f619d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 11 May 2010 14:47:12 +0000 Subject: Unnecessary type casts, See Tcl [Patch #2997087] Don't duplicate CYGWIN timezone #define from tclPort.h in tclWinPort.h --- ChangeLog | 11 +++++++++++ win/tclWinConsole.c | 4 ++-- win/tclWinDde.c | 12 ++++++------ win/tclWinLoad.c | 4 ++-- win/tclWinNotify.c | 6 +++--- win/tclWinPort.h | 7 +------ win/tclWinSerial.c | 4 ++-- win/tclWinSock.c | 14 +++++++------- win/tclWinTime.c | 4 ++-- 9 files changed, 36 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index e83dd5b..dabf2aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-05-06 Jan Nijtmans + + * win/tclWinConsole.c Unnecessary type casts, See Tcl [Patch #2997087] + * win/tclWinDde.c + * win/tclWinLoad.c + * win/tclWinNotify.c + * win/tclWinSerial.c + * win/tclWinSock.c + * win/tclWinTime.c + * win/tclWinPort.h Don't duplicate CYGWIN timezone #define from tclPort.h + 2010-05-07 Andreas Kupries * library/platform/platform.tcl: Fix cpu name for Solaris/Intel 64bit. diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index a47165c..eb24ef6 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinConsole.c,v 1.23 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinConsole.c,v 1.24 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1367,7 +1367,7 @@ TclWinOpenConsoleChannel( wsprintfA(channelName, "file%lx", (int) infoPtr); infoPtr->channel = Tcl_CreateChannel(&consoleChannelType, channelName, - (ClientData) infoPtr, permissions); + infoPtr, permissions); if (permissions & TCL_READABLE) { /* diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 3421510..a0d8145 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.42 2010/03/07 14:39:25 nijtmans Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.43 2010/05/11 14:47:12 nijtmans Exp $ */ #undef STATIC_BUILD @@ -404,7 +404,7 @@ DdeSetServerName( } Tcl_CreateObjCommand(interp, "dde", DdeObjCmd, - (ClientData) riPtr, DeleteProc); + riPtr, DeleteProc); if (Tcl_IsSafe(interp)) { Tcl_HideCommand(interp, "dde", "dde"); } @@ -1522,9 +1522,9 @@ DdeObjCmd( * server. */ - Tcl_Preserve((ClientData) riPtr); + Tcl_Preserve(riPtr); sendInterp = riPtr->interp; - Tcl_Preserve((ClientData) sendInterp); + Tcl_Preserve(sendInterp); /* * Don't exchange objects between interps. The target interp would @@ -1589,8 +1589,8 @@ DdeObjCmd( } Tcl_SetObjResult(interp, Tcl_GetObjResult(sendInterp)); } - Tcl_Release((ClientData) riPtr); - Tcl_Release((ClientData) sendInterp); + Tcl_Release(riPtr); + Tcl_Release(sendInterp); } else { /* * This is a non-local request. Send the script to the server and diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 3eb0134..b5924e6 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.29 2010/04/22 11:40:32 nijtmans Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.30 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -153,7 +153,7 @@ TclpDlopen( handlePtr->clientData = (ClientData) hInstance; handlePtr->findSymbolProcPtr = &FindSymbol; handlePtr->unloadFileProcPtr = &UnloadFile; - *loadHandle = (Tcl_LoadHandle) handlePtr; + *loadHandle = handlePtr; *unloadProcPtr = &UnloadFile; } return TCL_OK; diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 352379d..0245df3 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.27 2010/05/04 11:05:34 nijtmans Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.28 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclInt.h" @@ -122,7 +122,7 @@ Tcl_InitNotifier(void) tsdPtr->event = CreateEvent(NULL, TRUE /* manual */, FALSE /* !signaled */, NULL); - return (ClientData) tsdPtr; + return tsdPtr; } } @@ -363,7 +363,7 @@ Tcl_ServiceModeHook( * if one is needed. */ - Tcl_AlertNotifier((ClientData)tsdPtr); + Tcl_AlertNotifier(tsdPtr); } } } diff --git a/win/tclWinPort.h b/win/tclWinPort.h index fa049bf..d9b6801 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.57 2010/04/28 11:50:54 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.58 2010/05/11 14:47:12 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -410,11 +410,6 @@ # define environ _environ #endif /* __BORLANDC__ */ -#ifdef __CYGWIN__ -# define timezone _timezone -#endif /* __CYGWIN__ */ - - #ifdef __WATCOMC__ /* * OpenWatcom uses a wine derived winsock2.h that is missing the diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index f05207f..34bbf9c 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.42 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.43 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1506,7 +1506,7 @@ TclWinOpenSerialChannel( wsprintfA(channelName, "file%lx", (int) infoPtr); infoPtr->channel = Tcl_CreateChannel(&serialChannelType, channelName, - (ClientData) infoPtr, permissions); + infoPtr, permissions); SetupComm(handle, infoPtr->sysBufRead, infoPtr->sysBufWrite); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 63f5f0c..5734cb5 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.71 2010/05/04 11:05:34 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.72 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclWinInt.h" @@ -233,7 +233,7 @@ InitSockets(void) if (!initialized) { initialized = 1; - TclCreateLateExitHandler(SocketExitHandler, (ClientData) NULL); + TclCreateLateExitHandler(SocketExitHandler, NULL); /* * Create the async notification window with a new class. We must @@ -1296,7 +1296,7 @@ Tcl_OpenTcpClient( wsprintfA(channelName, "sock%d", infoPtr->socket); infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) infoPtr, (TCL_READABLE | TCL_WRITABLE)); + infoPtr, (TCL_READABLE | TCL_WRITABLE)); if (Tcl_SetChannelOption(interp, infoPtr->channel, "-translation", "auto crlf") == TCL_ERROR) { Tcl_Close((Tcl_Interp *) NULL, infoPtr->channel); @@ -1360,7 +1360,7 @@ Tcl_MakeTcpClientChannel( wsprintfA(channelName, "sock%d", infoPtr->socket); infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) infoPtr, (TCL_READABLE | TCL_WRITABLE)); + infoPtr, (TCL_READABLE | TCL_WRITABLE)); Tcl_SetChannelOption(NULL, infoPtr->channel, "-translation", "auto crlf"); return infoPtr->channel; } @@ -1414,7 +1414,7 @@ Tcl_OpenTcpServer( wsprintfA(channelName, "sock%d", infoPtr->socket); infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) infoPtr, 0); + infoPtr, 0); if (Tcl_SetChannelOption(interp, infoPtr->channel, "-eofchar", "") == TCL_ERROR) { Tcl_Close((Tcl_Interp *) NULL, infoPtr->channel); @@ -1509,7 +1509,7 @@ TcpAccept( wsprintfA(channelName, "sock%d", newInfoPtr->socket); newInfoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, - (ClientData) newInfoPtr, (TCL_READABLE | TCL_WRITABLE)); + newInfoPtr, (TCL_READABLE | TCL_WRITABLE)); if (Tcl_SetChannelOption(NULL, newInfoPtr->channel, "-translation", "auto crlf") == TCL_ERROR) { Tcl_Close((Tcl_Interp *) NULL, newInfoPtr->channel); @@ -2162,7 +2162,7 @@ TcpGetHandleProc( { SocketInfo *statePtr = (SocketInfo *) instanceData; - *handlePtr = (ClientData) statePtr->socket; + *handlePtr = INT2PTR(statePtr->socket); return TCL_OK; } diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 9b30247..cf340c7 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.36 2010/01/10 22:58:39 nijtmans Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.37 2010/05/11 14:47:12 nijtmans Exp $ */ #include "tclInt.h" @@ -416,7 +416,7 @@ NativeGetTime( WaitForSingleObject(timeInfo.readyEvent, INFINITE); CloseHandle(timeInfo.readyEvent); - Tcl_CreateExitHandler(StopCalibration, (ClientData) NULL); + Tcl_CreateExitHandler(StopCalibration, NULL); } timeInfo.initialized = TRUE; } -- cgit v0.12 From b4882bf4e1a72a64403f87128db65bb7575c158e Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 11 May 2010 14:49:15 +0000 Subject: Unnecessary type casts, See Tcl [Patch #2997087] Don't duplicate CYGWIN timezone #define from tclPort.h in tclWinPort.h --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dabf2aa..d85a266 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2010-05-06 Jan Nijtmans +2010-05-11 Jan Nijtmans * win/tclWinConsole.c Unnecessary type casts, See Tcl [Patch #2997087] * win/tclWinDde.c -- cgit v0.12 From 6e657539a867a7c2e65602fa2ac84b92698e1efb Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 12 May 2010 13:41:02 +0000 Subject: oops, no unicode characters in ChangeLog ... --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d85a266..d219afd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1037,9 +1037,9 @@ * generic/tclProc.c: indicating that errorProc is a function, * generic/tclOOMethod.c:pointer, and other formatting * generic/tcl*Decls.h: (regenerated) - * generic/tclVar.c: gcc warning(line 3703): ‘pattern’ may be used + * generic/tclVar.c: gcc warning(line 3703): 'pattern' may be used uninitialized in this function - gcc warning(line 3788): ‘matched’ may be used + gcc warning(line 3788): 'matched' may be used uninitialized in this function 2010-02-04 Donal K. Fellows -- cgit v0.12 From a87123e0a5a93624019b6540df8d3ca23f7a4d17 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 14 May 2010 08:22:02 +0000 Subject: Correct some comments (Jos Decoster found...) --- generic/tclCompile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclCompile.c b/generic/tclCompile.c index c9598bd..5078a8d 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.185 2010/04/29 23:39:32 msofer Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.186 2010/05/14 08:22:02 dkf Exp $ */ #include "tclInt.h" @@ -156,11 +156,11 @@ InstructionDesc const tclInstructionTable[] = { {"lt", 1, -1, 0, {OPERAND_NONE}}, /* Less: push (stknext < stktop) */ {"gt", 1, -1, 0, {OPERAND_NONE}}, - /* Greater: push (stknext || stktop) */ + /* Greater: push (stknext > stktop) */ {"le", 1, -1, 0, {OPERAND_NONE}}, - /* Less or equal: push (stknext || stktop) */ + /* Less or equal: push (stknext <= stktop) */ {"ge", 1, -1, 0, {OPERAND_NONE}}, - /* Greater or equal: push (stknext || stktop) */ + /* Greater or equal: push (stknext >= stktop) */ {"lshift", 1, -1, 0, {OPERAND_NONE}}, /* Left shift: push (stknext << stktop) */ {"rshift", 1, -1, 0, {OPERAND_NONE}}, -- cgit v0.12 From 15dd1944c90dfe80aaf981a1075e7a6b707abc52 Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 17 May 2010 09:46:07 +0000 Subject: * generic/tclCmdIL.c (TclInfoFrame): Change this code to use Tcl_GetCommandFullName rather than rolling its own. Discovered during the hunting of [Bug 3001438] but unlikely to be a fix. --- ChangeLog | 85 ++++++++++++++++++++++++++++++------------------------ generic/tclCmdIL.c | 15 ++++------ 2 files changed, 53 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index d219afd..4499fed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,20 @@ +2010-05-17 Donal K. Fellows + + * generic/tclCmdIL.c (TclInfoFrame): Change this code to use + Tcl_GetCommandFullName rather than rolling its own. Discovered during + the hunting of [Bug 3001438] but unlikely to be a fix. + 2010-05-11 Jan Nijtmans - * win/tclWinConsole.c Unnecessary type casts, See Tcl [Patch #2997087] - * win/tclWinDde.c - * win/tclWinLoad.c - * win/tclWinNotify.c - * win/tclWinSerial.c - * win/tclWinSock.c - * win/tclWinTime.c - * win/tclWinPort.h Don't duplicate CYGWIN timezone #define from tclPort.h + * win/tclWinConsole.c: [Patch 2997087]: Unnecessary type casts. + * win/tclWinDde.c: + * win/tclWinLoad.c: + * win/tclWinNotify.c: + * win/tclWinSerial.c: + * win/tclWinSock.c: + * win/tclWinTime.c: + * win/tclWinPort.h: Don't duplicate CYGWIN timezone #define from + tclPort.h 2010-05-07 Andreas Kupries @@ -22,36 +29,38 @@ 2010-05-04 Jan Nijtmans - * win/tclWinNotify.c TCHAR-related fixes, making those two - * win/tclWinSock.c files compile fine when TCHAR != char - Please see comments in [Freq 2965056] (2965056-1.patch). + * win/tclWinNotify.c: TCHAR-related fixes, making those two files + * win/tclWinSock.c: compile fine when TCHAR != char. Please see + comments in [FRQ 2965056] (2965056-1.patch). 2010-05-03 Jan Nijtmans - * generic/tclIORChan.c Use "tclIO.h" and "tclTomMathDecls.h" - * generic/tclIORTrans.c everywhere - * generic/tclTomMath.h - * tools/fix_tommath_h.tcl - * libtommath/tommath.h Formatting (# should always be first char on line) - * win/tclAppInit.c For MINGW/CYGWIN, use GetCommandLineA explicitely - * unix/.cvsignore Add pkg, *.dll - - * libtommath/tommath.h CONSTify various useful internal functions - * libtommath/bn_mp_cmp_d.c (TclBignumToDouble, TclCeil, TclFloor), and - * libtommath/bn_mp_cmp_mag.c related tommath functions. - * libtommath/bn_mp_cmp.c - * libtommath/bn_mp_copy.c - * libtommath/bn_mp_count_bits.c - * libtommath/bn_mp_div_2d.c - * libtommath/bn_mp_mod_2d.c - * libtommath/bn_mp_mul_2d.c - * libtommath/bn_mp_neg.c - * generic/tclBasic.c Handle TODO: const correctness ? - * generic/tclInt.h - * generic/tclStrToD.c - * generic/tclTomMath.decls - * generic/tclTomMath.h - * generic/tclTomMathDecls.h + * generic/tclIORChan.c: Use "tclIO.h" and "tclTomMathDecls.h" + * generic/tclIORTrans.c: everywhere + * generic/tclTomMath.h: + * tools/fix_tommath_h.tcl: + * libtommath/tommath.h: Formatting (# should always be first char on + line) + * win/tclAppInit.c: For MINGW/CYGWIN, use GetCommandLineA + explicitly. + * unix/.cvsignore: Add pkg, *.dll + + * libtommath/tommath.h: CONSTify various useful internal + * libtommath/bn_mp_cmp_d.c: functions (TclBignumToDouble, TclCeil, + * libtommath/bn_mp_cmp_mag.c: TclFloor), and related tommath functions + * libtommath/bn_mp_cmp.c: + * libtommath/bn_mp_copy.c: + * libtommath/bn_mp_count_bits.c: + * libtommath/bn_mp_div_2d.c: + * libtommath/bn_mp_mod_2d.c: + * libtommath/bn_mp_mul_2d.c: + * libtommath/bn_mp_neg.c: + * generic/tclBasic.c: Handle TODO: const correctness ? + * generic/tclInt.h: + * generic/tclStrToD.c: + * generic/tclTomMath.decls: + * generic/tclTomMath.h: + * generic/tclTomMathDecls.h: 2010-04-30 Don Porter @@ -69,9 +78,9 @@ int which any value already vetted for overflow issues will fit into. * generic/tclStringObj.c: Update caller; standardize panic msg. - * generic/tclBinary.c (UpdateStringOfByteArray): Add panic - when the generated string representation would grow beyond Tcl's - size limits. [Bug 2994924] + * generic/tclBinary.c (UpdateStringOfByteArray): [Bug 2994924]: Add + panic when the generated string representation would grow beyond Tcl's + size limits. 2010-04-30 Donal K. Fellows diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index bdc6d2e..3d4bcb2 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.181 2010/04/05 19:44:45 ferrieux Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.182 2010/05/17 09:46:09 dkf Exp $ */ #include "tclInt.h" @@ -1371,19 +1371,16 @@ TclInfoFrame( Tcl_HashEntry *namePtr = procPtr->cmdPtr->hPtr; if (namePtr) { - char *procName = Tcl_GetHashKey(namePtr->tablePtr, namePtr); - char *nsName = procPtr->cmdPtr->nsPtr->fullName; + Tcl_Obj *procNameObj; /* * This is a regular command. */ - ADD_PAIR("proc", Tcl_NewStringObj(nsName, -1)); - - if (strcmp(nsName, "::") != 0) { - Tcl_AppendToObj(lv[lc-1], "::", -1); - } - Tcl_AppendToObj(lv[lc-1], procName, -1); + TclNewObj(procNameObj); + Tcl_GetCommandFullName(interp, (Tcl_Command) procPtr->cmdPtr, + procNameObj); + ADD_PAIR("proc", procNameObj); } else if (procPtr->cmdPtr->clientData) { ExtraFrameInfo *efiPtr = procPtr->cmdPtr->clientData; int i; -- cgit v0.12 From 0f67d4faac5372c251720b6f818d319392f0b868 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 17 May 2010 21:51:21 +0000 Subject: Fix [Bug 2996549]: Failure in expr.test on Win32 --- ChangeLog | 4 ++++ generic/tclStrToD.c | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4499fed..b6f9f34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-05-17 Jan Nijtmans + + * generic/tclStrToD.c: Fix [Bug 2996549]: Failure in expr.test on Win32 + 2010-05-17 Donal K. Fellows * generic/tclCmdIL.c (TclInfoFrame): Change this code to use diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 8094e87..1ee4c74 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.44 2010/05/03 14:36:41 nijtmans Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.45 2010/05/17 21:51:21 nijtmans Exp $ * *---------------------------------------------------------------------- */ @@ -105,6 +105,7 @@ static int log2FLT_RADIX; /* Logarithm of the floating point radix. */ static int mantBits; /* Number of bits in a double's significand */ static mp_int pow5[9]; /* Table of powers of 5**(2**n), up to * 5**256 */ +static double tiny = 0.0; /* The smallest representable double */ static int maxDigits; /* The maximum number of digits to the left of * the decimal point of a double. */ static int minDigits; /* The maximum number of digits to the right @@ -1484,8 +1485,11 @@ MakeHighPrecisionDouble( goto returnValue; } retval = SafeLdExp(retval, machexp); - if (retval <= 0.0) { - retval = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); + if (tiny == 0.0) { + tiny = SafeLdExp(1.0, DBL_MIN_EXP * log2FLT_RADIX - mantBits); + } + if (retval < tiny) { + retval = tiny; } /* -- cgit v0.12 From 2bdf96f5608d4e27a76ad4080398df6885a6209a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 19 May 2010 08:23:09 +0000 Subject: Don't use arrays of length 1, just use a single element then, it makes code more readable. --- ChangeLog | 6 ++++++ generic/regcomp.c | 12 ++++++------ generic/tclFileName.c | 12 ++++++------ generic/tclLoad.c | 8 ++++---- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6f9f34..fab10b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-19 Jan Nijtmans + + * generic/regcomp.c Don't use arrays of length 1, just use a single + * generic/tclFileName.c element then, it makes code more readable. + * generic/tclLoad.c (here it even prevents a type cast) + 2010-05-17 Jan Nijtmans * generic/tclStrToD.c: Fix [Bug 2996549]: Failure in expr.test on Win32 diff --git a/generic/regcomp.c b/generic/regcomp.c index 8ff77ad..9753ca4 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -1458,7 +1458,7 @@ brackpart( celt startc, endc; struct cvec *cv; const chr *startp, *endp; - chr c[1]; + chr c; /* * Parse something, get rid of special cases, take shortcuts. @@ -1470,7 +1470,7 @@ brackpart( return; break; case PLAIN: - c[0] = v->nextvalue; + c = v->nextvalue; NEXT(); /* @@ -1478,10 +1478,10 @@ brackpart( */ if (!SEE(RANGE)) { - onechr(v, c[0], lp, rp); + onechr(v, c, lp, rp); return; } - startc = element(v, c, c+1); + startc = element(v, &c, &c+1); NOERR(); break; case COLLEL: @@ -1525,9 +1525,9 @@ brackpart( switch (v->nexttype) { case PLAIN: case RANGE: - c[0] = v->nextvalue; + c = v->nextvalue; NEXT(); - endc = element(v, c, c+1); + endc = element(v, &c, &c+1); NOERR(); break; case COLLEL: diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 28c0ab8..7c4a360 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.102 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.103 2010/05/19 08:23:09 nijtmans Exp $ */ #include "tclInt.h" @@ -1983,19 +1983,19 @@ TclGlob( for (i = 0; i< objc; i++) { int len; const char *oldStr = Tcl_GetStringFromObj(objv[i], &len); - Tcl_Obj *elems[1]; + Tcl_Obj *elem; if (len == prefixLen) { if ((pattern[0] == '\0') || (strchr(separators, pattern[0]) == NULL)) { - TclNewLiteralStringObj(elems[0], "."); + TclNewLiteralStringObj(elem, "."); } else { - TclNewLiteralStringObj(elems[0], "/"); + TclNewLiteralStringObj(elem, "/"); } } else { - elems[0] = Tcl_NewStringObj(oldStr+prefixLen, len-prefixLen); + elem = Tcl_NewStringObj(oldStr+prefixLen, len-prefixLen); } - Tcl_ListObjReplace(interp, filenamesObj, i, 1, 1, elems); + Tcl_ListObjReplace(interp, filenamesObj, i, 1, 1, &elem); } } diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 8ba90ed..22f1c86 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.25 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.26 2010/05/19 08:23:09 nijtmans Exp $ */ #include "tclInt.h" @@ -129,7 +129,7 @@ Tcl_LoadObjCmd( InterpPackage *ipFirstPtr, *ipPtr; int code, namesMatch, filesMatch, offset; const char *symbols[2]; - void* procPtrs[1]; + Tcl_PackageInitProc *initProc; const char *p, *fullFileName, *packageName; Tcl_LoadHandle loadHandle; Tcl_UniChar ch; @@ -354,7 +354,7 @@ Tcl_LoadObjCmd( symbols[1] = NULL; Tcl_MutexLock(&packageMutex); - code = Tcl_LoadFile(interp, objv[1], symbols, 0, procPtrs, &loadHandle); + code = Tcl_LoadFile(interp, objv[1], symbols, 0, &initProc, &loadHandle); Tcl_MutexUnlock(&packageMutex); if (code != TCL_OK) { goto done; @@ -372,7 +372,7 @@ Tcl_LoadObjCmd( ckalloc((unsigned) (Tcl_DStringLength(&pkgName) + 1)); strcpy(pkgPtr->packageName, Tcl_DStringValue(&pkgName)); pkgPtr->loadHandle = loadHandle; - pkgPtr->initProc = (Tcl_PackageInitProc*) procPtrs[0]; + pkgPtr->initProc = initProc; pkgPtr->safeInitProc = (Tcl_PackageInitProc*) Tcl_FindSymbol(interp, loadHandle, Tcl_DStringValue(&safeInitName)); pkgPtr->unloadProc = (Tcl_PackageUnloadProc*) -- cgit v0.12 From 494eeac4f557e460e9cee22bc01fd39b6a23329e Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 19 May 2010 21:54:55 +0000 Subject: Add missing test for [Bug 3004007], fixed under the radar on 2010-02-24 (dkf): EIAS violation in list-dict conversions. --- ChangeLog | 6 ++++++ tests/dict.test | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fab10b8..0f35ef1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-19 Alexandre Ferrieux + + * tests/dict.test: Add missing test for [Bug 3004007], fixed under + the radar on 2010-02-24 (dkf): EIAS violation in + list-dict conversions. + 2010-05-19 Jan Nijtmans * generic/regcomp.c Don't use arrays of length 1, just use a single diff --git a/tests/dict.test b/tests/dict.test index e6b9ba4..b805dc7 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.35 2010/02/24 14:30:34 dkf Exp $ +# RCS: @(#) $Id: dict.test,v 1.36 2010/05/19 21:54:55 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -122,6 +122,7 @@ test dict-3.15 {compiled dict get error cleanliness - Bug 2431847} -body { dict get $a(z) d }} } -returnCodes error -result {key "d" not known in dictionary} +test dict-3.16 {dict/list shimmering - Bug 3004007} {set l [list p 1 p 2 q 3];dict get $l q;set l} {p 1 p 2 q 3} test dict-4.1 {dict replace command} { dict replace {a b c d} -- cgit v0.12 From 24f9dad514d1496c92732307721f86fcd897e946 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Thu, 20 May 2010 08:37:07 +0000 Subject: Also check the reverse path of dict->list EIAS violation. --- ChangeLog | 2 +- tests/dict.test | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f35ef1..ce29204 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2010-05-19 Alexandre Ferrieux - * tests/dict.test: Add missing test for [Bug 3004007], fixed under + * tests/dict.test: Add missing tests for [Bug 3004007], fixed under the radar on 2010-02-24 (dkf): EIAS violation in list-dict conversions. diff --git a/tests/dict.test b/tests/dict.test index b805dc7..c7d186d 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: dict.test,v 1.36 2010/05/19 21:54:55 ferrieux Exp $ +# RCS: @(#) $Id: dict.test,v 1.37 2010/05/20 08:37:09 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -123,6 +123,7 @@ test dict-3.15 {compiled dict get error cleanliness - Bug 2431847} -body { }} } -returnCodes error -result {key "d" not known in dictionary} test dict-3.16 {dict/list shimmering - Bug 3004007} {set l [list p 1 p 2 q 3];dict get $l q;set l} {p 1 p 2 q 3} +test dict-3.17 {dict/list shimmering - Bug 3004007} {set l [list p 1 p 2 q 3];dict get $l q;llength $l} 6 test dict-4.1 {dict replace command} { dict replace {a b c d} -- cgit v0.12 From 9cb882ffefc858535b31f7da4b6e955d890ad7de Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 21 May 2010 12:11:58 +0000 Subject: Make sure that copyDir only receives normalized paths, otherwise it might result in a crash on CYGWIN. restyle according to the Tcl style guide --- ChangeLog | 6 ++++++ tools/installData.tcl | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce29204..b1c4759 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-21 Jan Nijtmans + + * tools/installData.tcl Make sure that copyDir only receives normalized + paths, otherwise it might result in a crash on CYGWIN. restyle according + to the Tcl style guide (http://www.tcl.tk/doc/styleGuide.pdf) + 2010-05-19 Alexandre Ferrieux * tests/dict.test: Add missing tests for [Bug 3004007], fixed under diff --git a/tools/installData.tcl b/tools/installData.tcl index 5bf0ad1..8f6bc2d 100644 --- a/tools/installData.tcl +++ b/tools/installData.tcl @@ -16,38 +16,38 @@ exec tclsh "$0" ${1+"$@"} # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: installData.tcl,v 1.2 2009/03/25 23:22:38 nijtmans Exp $ +# RCS: @(#) $Id: installData.tcl,v 1.3 2010/05/21 12:11:59 nijtmans Exp $ # #---------------------------------------------------------------------- -proc copyDir { d1 d2 } { +proc copyDir {d1 d2} { - puts [format {%*sCreating %s} [expr { 4 * [info level] }] {} \ + puts [format {%*sCreating %s} [expr {4 * [info level]}] {} \ [file tail $d2]] file delete -force -- $d2 file mkdir $d2 - + foreach ftail [glob -directory $d1 -nocomplain -tails *] { set f [file join $d1 $ftail] - if { [file isdirectory $f] && [string compare CVS $ftail] } { + if {[file isdirectory $f] && [string compare CVS $ftail]} { copyDir $f [file join $d2 $ftail] - } elseif { [file isfile $f] } { + } elseif {[file isfile $f]} { file copy -force $f [file join $d2 $ftail] - if { $::tcl_platform(platform) eq {unix} } { + if {$::tcl_platform(platform) eq {unix}} { file attributes [file join $d2 $ftail] -permissions 0644 } else { file attributes [file join $d2 $ftail] -readonly 1 } } } - - if { $::tcl_platform(platform) eq {unix} } { + + if {$::tcl_platform(platform) eq {unix}} { file attributes $d2 -permissions 0755 } else { file attributes $d2 -readonly 1 } -} - -copyDir [lindex $argv 0] [lindex $argv 1] +} + +copyDir [file normalize [lindex $argv 0]] [file normalize [lindex $argv 1]] -- cgit v0.12 From b6b47d546475f2262d264826edf0f9397c9e08db Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 21 May 2010 12:43:29 +0000 Subject: [Bug #3005233] fix for build on OpenBSD vax --- ChangeLog | 1 + generic/tclStrToD.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1c4759..a50dbab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * tools/installData.tcl Make sure that copyDir only receives normalized paths, otherwise it might result in a crash on CYGWIN. restyle according to the Tcl style guide (http://www.tcl.tk/doc/styleGuide.pdf) + * generic/tclStrToD.c: [Bug #3005233] fix for build on OpenBSD vax 2010-05-19 Alexandre Ferrieux diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 1ee4c74..d0a5345 100755 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStrToD.c,v 1.45 2010/05/17 21:51:21 nijtmans Exp $ + * RCS: @(#) $Id: tclStrToD.c,v 1.46 2010/05/21 12:43:29 nijtmans Exp $ * *---------------------------------------------------------------------- */ @@ -950,13 +950,14 @@ TclParseNumber( case sINFIN: case sINFINI: case sINFINIT: +#ifdef IEEE_FLOATING_POINT case sN: case sNA: case sNANPAREN: case sNANHEX: Tcl_Panic("TclParseNumber: bad acceptState %d parsing '%s'", acceptState, bytes); - +#endif case BINARY: shift = numTrailZeros; if (!significandOverflow && significandWide != 0 && @@ -1137,12 +1138,13 @@ TclParseNumber( objPtr->typePtr = &tclDoubleType; break; +#ifdef IEEE_FLOATING_POINT case sNAN: case sNANFINISH: objPtr->internalRep.doubleValue = MakeNaN(signum, significandWide); objPtr->typePtr = &tclDoubleType; break; - +#endif case INITIAL: /* This case only to silence compiler warning */ Tcl_Panic("TclParseNumber: state INITIAL can't happen here"); -- cgit v0.12 From 11fff51d24f1d24c5fe3950c5a0dfffc10b03d62 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 27 May 2010 08:32:22 +0000 Subject: optParse.tcl: Don't generate spaces at the end of a line. --- ChangeLog | 10 ++++++++-- library/opt/optparse.tcl | 24 ++++++++++++------------ tests/opt.test | 28 ++++++++++++++-------------- tests/safe.test | 24 ++++++++++++------------ 4 files changed, 46 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index a50dbab..349dfaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-27 Jan Nijtmans + + * library/opt/optParse.tcl Don't generate spaces at the end of a line. + * tests/opt.test + * tests/safe.test + 2010-05-21 Jan Nijtmans * tools/installData.tcl Make sure that copyDir only receives normalized @@ -43,7 +49,7 @@ * library/platform/platform.tcl: Fix cpu name for Solaris/Intel 64bit. * library/platform/pkgIndex.tcl: Package updated to version 1.0.8. - * unix/Makefile.in: + * unix/Makefile.in: * win/Makefile.in: 2010-05-06 Jan Nijtmans @@ -99,7 +105,7 @@ * generic/tclInt.h (TclAppendBytesToByteArray): placing overflow protection responsibility on caller. Convert "len" argument to signed int which any value already vetted for overflow issues will fit into. - * generic/tclStringObj.c: Update caller; standardize panic msg. + * generic/tclStringObj.c: Update caller; standardize panic msg. * generic/tclBinary.c (UpdateStringOfByteArray): [Bug 2994924]: Add panic when the generated string representation would grow beyond Tcl's diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 67f3cc1..16e56b0 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -8,7 +8,7 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.11 2009/11/18 21:45:37 nijtmans Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.12 2010/05/27 08:32:23 nijtmans Exp $ package require Tcl 8.2 # When this version number changes, update the pkgIndex.tcl file @@ -892,22 +892,22 @@ proc ::tcl::OptKeyError {prefix descKey {header 0}} { } # output the tree proc OptTree {desc nl tl dl} { - set res ""; + set res "" foreach item $desc { - if {[OptIsCounter $item]} continue; + if {[OptIsCounter $item]} continue if {[OptIsPrg $item]} { - append res [OptTree $item $nl $tl $dl]; + append res [OptTree $item $nl $tl $dl] } else { - set dv [OptTypeArgs $item]; + set dv [OptTypeArgs $item] if {[OptState $item] != "header"} { - set dv "($dv)"; + set dv "($dv)" } - append res [format "\n %-*s %-*s %-*s %s" \ + append res [string trimright [format "\n %-*s %-*s %-*s %s" \ $nl [OptName $item] $tl [OptType $item] \ - $dl $dv [OptHelp $item]] + $dl $dv [OptHelp $item]]] } } - return $res; + return $res } # Give nice usage string @@ -915,9 +915,9 @@ proc ::tcl::OptError {prefix desc {header 0}} { # determine length if {$header} { # add faked instruction - set h [list [OptNewInst header Var/FlagName Type Value Help]]; - lappend h [OptNewInst header ------------ ---- ----- ----]; - lappend h [OptNewInst header {( -help} "" "" {gives this help )}] + set h [list [OptNewInst header Var/FlagName Type Value Help]] + lappend h [OptNewInst header ------------ ---- ----- ----] + lappend h [OptNewInst header {(-help} "" "" {gives this help)}] set desc [concat $h $desc] } OptLengths $desc nl tl dl diff --git a/tests/opt.test b/tests/opt.test index b7e3a55..9f01658 100644 --- a/tests/opt.test +++ b/tests/opt.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: opt.test,v 1.9 2004/05/19 12:48:32 dkf Exp $ +# RCS: @(#) $Id: opt.test,v 1.10 2010/05/27 08:32:23 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -58,7 +58,7 @@ test opt-3.2 {OptParse / temp key is removed even on errors} { test opt-4.1 {OptProc} { ::tcl::OptProc optTest {} {} - optTest ; + optTest ::tcl::OptKeyDelete optTest } {} @@ -74,12 +74,12 @@ test opt-5.1 {OptProcArgGiven} { } {0 1 1 1} test opt-6.1 {OptKeyParse} { - ::tcl::OptKeyRegister {} test; + ::tcl::OptKeyRegister {} test list [catch {::tcl::OptKeyParse test {-help}} msg] $msg } {1 {Usage information: Var/FlagName Type Value Help ------------ ---- ----- ---- - ( -help gives this help )}} + (-help gives this help)}} test opt-7.1 {OptCheckType} { list \ @@ -161,9 +161,9 @@ test opt-10.1 {ambigous flags} { catch {optTest -fL} msg set msg } {ambigous option "-fL", choose from: - -fla boolflag (false) - -flag2xyz boolflag (false) - -flag3xyz boolflag (false) } + -fla boolflag (false) + -flag2xyz boolflag (false) + -flag3xyz boolflag (false)} test opt-10.2 {non ambigous flags} { ::tcl::OptProc optTest {{-flag1xyz} {-other} {-flag2xyz} {-flag3xyz}} { return $flag2xyz @@ -183,8 +183,8 @@ test opt-10.4 {ambigous flags, not exact match} { catch {optTest -fLag1X} msg set msg } {ambigous option "-fLag1X", choose from: - -flag1xy boolflag (false) - -flag1xyz boolflag (false) } + -flag1xy boolflag (false) + -flag1xyz boolflag (false)} # medium size overall test example: (defined once) ::tcl::OptProc optTest { @@ -206,12 +206,12 @@ test opt-10.6 {medium size overall test} { } {1 {Usage information: Var/FlagName Type Value Help ------------ ---- ----- ---- - ( -help gives this help ) + (-help gives this help) cmd choice (print save delete) sub command to choose - -allowBoing boolean (true) + -allowBoing boolean (true) arg2 string () this is help ?arg3? int (7) optional number - -moreflags boolflag (false) }} + -moreflags boolflag (false)}} test opt-10.7 {medium size overall test} { optTest save tst } {save 1 tst 7 0} @@ -232,8 +232,8 @@ test opt-11.1 {too many args test 2} { } {1 {too many arguments (unexpected argument(s): blah), usage: Var/FlagName Type Value Help ------------ ---- ----- ---- - ( -help gives this help ) - -foo boolflag (false) } {}} + (-help gives this help) + -foo boolflag (false)} {}} test opt-11.2 {default value for args} { set args {} set key [::tcl::OptKeyRegister {{args -list {a b c} "args..."}}] diff --git a/tests/safe.test b/tests/safe.test index db8952b..9de3954 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.test,v 1.32 2009/12/30 22:26:43 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.33 2010/05/27 08:32:23 nijtmans Exp $ package require Tcl 8.5 @@ -41,7 +41,7 @@ test safe-1.2 {safe::interpCreate syntax} -returnCodes error -body { } -result {Usage information: Var/FlagName Type Value Help ------------ ---- ----- ---- - ( -help gives this help ) + (-help gives this help) ?slave? name () name of the slave (optional) -accessPath list () access path for the slave -noStatics boolflag (false) prevent loading of statically linked pkgs @@ -183,22 +183,22 @@ test safe-6.3 {test safe interpreters knowledge of the world} { # high level general test test safe-7.1 {tests that everything works at high level} { - set i [safe::interpCreate]; + set i [safe::interpCreate] # no error shall occur: # (because the default access_path shall include 1st level sub dirs # so package require in a slave works like in the master) set v [interp eval $i {package require http 1}] # no error shall occur: - interp eval $i {http_config}; + interp eval $i {http_config} safe::interpDelete $i set v } 1.0 test safe-7.2 {tests specific path and interpFind/AddToAccessPath} -body { - set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]; + set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]] # should not add anything (p0) set token1 [safe::interpAddToAccessPath $i [info library]] # should add as p1 - set token2 [safe::interpAddToAccessPath $i "/dummy/unixlike/test/path"]; + set token2 [safe::interpAddToAccessPath $i "/dummy/unixlike/test/path"] # an error shall occur (http is not anymore in the secure 0-level # provided deep path) list $token1 $token2 \ @@ -248,8 +248,8 @@ test safe-8.4 {safe source control on file} -setup { proc safe-test-log {str} {global log; lappend log $str} set prevlog [safe::setLogCmd] } -body { - safe::interpCreate $i; - safe::setLogCmd safe-test-log; + safe::interpCreate $i + safe::setLogCmd safe-test-log list [catch {$i eval {source /abc/def}} msg] $msg $log } -cleanup { safe::setLogCmd $prevlog @@ -387,16 +387,16 @@ test safe-9.6 {interpConfigure widget like behaviour} -body { list [set i [safe::interpCreate \ -noStatics \ -nestedLoadOk \ - -deleteHook {foo bar}]; - safe::interpConfigure $i -accessPath /foo/bar ; + -deleteHook {foo bar}] + safe::interpConfigure $i -accessPath /foo/bar safe::interpConfigure $i]\ [safe::interpConfigure $i -aCCess]\ [safe::interpConfigure $i -nested]\ [safe::interpConfigure $i -statics]\ [safe::interpConfigure $i -DEL]\ - [safe::interpConfigure $i -accessPath /blah -statics 1; + [safe::interpConfigure $i -accessPath /blah -statics 1 safe::interpConfigure $i]\ - [safe::interpConfigure $i -deleteHook toto -nosta -nested 0; + [safe::interpConfigure $i -deleteHook toto -nosta -nested 0 safe::interpConfigure $i] } -match glob -result {{-accessPath * -statics 0 -nested 1 -deleteHook {foo bar}} {-accessPath *} {-nested 1} {-statics 0} {-deleteHook {foo bar}} {-accessPath * -statics 1 -nested 1 -deleteHook {foo bar}} {-accessPath * -statics 0 -nested 0 -deleteHook toto}} -- cgit v0.12 From 84010405f28bb6a57e0d7c089ade8a2eeca31c8a Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 27 May 2010 08:38:06 +0000 Subject: uniParse.tcl: Don't generate spaces at the end of a line. --- ChangeLog | 2 + generic/tclUniData.c | 1570 +++++++++++++++++++++++++------------------------- tools/uniParse.tcl | 22 +- 3 files changed, 798 insertions(+), 796 deletions(-) diff --git a/ChangeLog b/ChangeLog index 349dfaf..392227b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2010-05-27 Jan Nijtmans * library/opt/optParse.tcl Don't generate spaces at the end of a line. + * tools/uniParse.tcl + * generic/tclUniData.c * tests/opt.test * tests/safe.test diff --git a/generic/tclUniData.c b/generic/tclUniData.c index cf3dbdb..97b809a 100644 --- a/generic/tclUniData.c +++ b/generic/tclUniData.c @@ -8,7 +8,7 @@ * Copyright (c) 1998 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclUniData.c,v 1.4 2001/05/28 04:45:43 hobbs Exp $ + * RCS: @(#) $Id: tclUniData.c,v 1.5 2010/05/27 08:38:07 nijtmans Exp $ */ /* @@ -26,359 +26,359 @@ */ static unsigned char pageMap[] = { - 0, 1, 2, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 7, 15, 16, 17, - 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 7, 32, - 7, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47, - 48, 49, 50, 51, 52, 35, 47, 53, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 58, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 80, 81, - 84, 85, 80, 86, 87, 88, 89, 90, 91, 92, 35, 93, 94, 95, 35, 96, 97, - 98, 99, 100, 101, 102, 35, 47, 103, 104, 35, 35, 105, 106, 107, 47, - 47, 108, 47, 47, 109, 47, 110, 111, 47, 112, 47, 113, 114, 115, 116, - 114, 47, 117, 118, 35, 47, 47, 119, 90, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 120, 121, 47, 47, 122, - 35, 35, 35, 35, 47, 123, 124, 125, 126, 47, 127, 128, 47, 129, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 7, 7, 7, 7, 130, 7, 7, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 156, 156, 156, 156, 156, 156, - 157, 158, 159, 160, 161, 162, 35, 35, 35, 160, 163, 164, 165, 166, - 167, 168, 169, 160, 160, 160, 160, 170, 171, 172, 173, 174, 160, 160, - 175, 35, 35, 35, 35, 176, 177, 178, 179, 180, 181, 35, 35, 160, 160, - 160, 160, 160, 160, 160, 160, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 182, 160, 160, 155, 160, 160, 160, 160, 160, 160, 170, 183, 184, 185, - 90, 47, 186, 90, 47, 187, 188, 189, 47, 47, 190, 128, 35, 35, 191, - 192, 193, 194, 192, 195, 196, 197, 160, 160, 160, 198, 160, 160, 199, - 197, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 200, 35, 35, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 201, 35, 35, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 202, 203, 204, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 205, 35, 35, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 47, 47, 47, 47, 47, 47, 47, 47, 47, 208, 35, 35, 35, 35, - 35, 35, 209, 210, 211, 47, 47, 212, 213, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 214, 215, 47, 216, 47, 217, 218, 35, 219, 220, 221, 47, - 47, 47, 222, 223, 2, 224, 225, 226, 227, 228, 229, 230, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 231, 35, 232, 233, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 208, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 47, 234, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 235, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 236, 207, 207, 207, 207, 207, 207, 207, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 0, 1, 2, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 7, 15, 16, 17, + 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 7, 32, + 7, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47, + 48, 49, 50, 51, 52, 35, 47, 53, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 58, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 80, 81, + 84, 85, 80, 86, 87, 88, 89, 90, 91, 92, 35, 93, 94, 95, 35, 96, 97, + 98, 99, 100, 101, 102, 35, 47, 103, 104, 35, 35, 105, 106, 107, 47, + 47, 108, 47, 47, 109, 47, 110, 111, 47, 112, 47, 113, 114, 115, 116, + 114, 47, 117, 118, 35, 47, 47, 119, 90, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 120, 121, 47, 47, 122, + 35, 35, 35, 35, 47, 123, 124, 125, 126, 47, 127, 128, 47, 129, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 7, 7, 7, 7, 130, 7, 7, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 156, 156, 156, 156, 156, 156, + 157, 158, 159, 160, 161, 162, 35, 35, 35, 160, 163, 164, 165, 166, + 167, 168, 169, 160, 160, 160, 160, 170, 171, 172, 173, 174, 160, 160, + 175, 35, 35, 35, 35, 176, 177, 178, 179, 180, 181, 35, 35, 160, 160, + 160, 160, 160, 160, 160, 160, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 182, 160, 160, 155, 160, 160, 160, 160, 160, 160, 170, 183, 184, 185, + 90, 47, 186, 90, 47, 187, 188, 189, 47, 47, 190, 128, 35, 35, 191, + 192, 193, 194, 192, 195, 196, 197, 160, 160, 160, 198, 160, 160, 199, + 197, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 200, 35, 35, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 201, 35, 35, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 202, 203, 204, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 205, 35, 35, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 47, 47, 47, 47, 47, 47, 47, 47, 47, 208, 35, 35, 35, 35, + 35, 35, 209, 210, 211, 47, 47, 212, 213, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 214, 215, 47, 216, 47, 217, 218, 35, 219, 220, 221, 47, + 47, 47, 222, 223, 2, 224, 225, 226, 227, 228, 229, 230, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 231, 35, 232, 233, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 208, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 47, 234, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 235, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 236, 207, 207, 207, 207, 207, 207, 207, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35 }; @@ -389,419 +389,419 @@ static unsigned char pageMap[] = { */ static unsigned char groupMap[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 3, 3, 3, 5, 6, 3, 7, 3, 8, - 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 7, 7, 7, 3, 3, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 5, 3, 6, 11, 12, 11, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 5, 7, 6, 7, 1, 2, 3, 4, 4, 4, 4, 14, 14, 11, 14, 15, 16, - 7, 8, 14, 11, 14, 7, 17, 17, 11, 18, 14, 3, 11, 17, 15, 19, 17, 17, - 17, 3, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 7, 10, 10, 10, 10, 10, 10, 10, 15, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 7, 13, 13, 13, 13, 13, 13, 13, 20, 21, 22, - 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, - 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 23, 24, 21, 22, 21, - 22, 21, 22, 15, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, - 22, 21, 22, 15, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, - 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 25, - 21, 22, 21, 22, 21, 22, 26, 15, 27, 21, 22, 21, 22, 28, 21, 22, 29, - 29, 21, 22, 15, 30, 31, 32, 21, 22, 29, 33, 34, 35, 36, 21, 22, 15, - 15, 35, 37, 15, 38, 21, 22, 21, 22, 21, 22, 39, 21, 22, 39, 15, 15, - 21, 22, 39, 21, 22, 40, 40, 21, 22, 21, 22, 41, 21, 22, 15, 42, 21, - 22, 15, 43, 42, 42, 42, 42, 44, 45, 46, 44, 45, 46, 44, 45, 46, 21, - 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 47, 21, - 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 15, 44, 45, 46, 21, 22, 48, 49, 21, 22, 21, 22, 21, 22, 21, 22, 0, - 0, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 50, 51, 15, 52, 52, 15, 53, 15, - 54, 15, 15, 15, 15, 52, 15, 15, 55, 15, 15, 15, 15, 56, 57, 15, 15, - 15, 15, 15, 57, 15, 15, 58, 15, 15, 59, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 60, 15, 15, 60, 15, 15, 15, 15, 60, 15, 61, 61, 15, 15, - 15, 15, 15, 15, 62, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 11, 11, 63, 63, 63, 63, 63, 63, 63, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 63, 63, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 63, 63, 63, 63, - 63, 11, 11, 11, 11, 11, 11, 11, 11, 11, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, - 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, - 0, 0, 0, 0, 63, 0, 0, 0, 3, 0, 0, 0, 0, 0, 11, 11, 66, 3, 67, 67, 67, - 0, 68, 0, 69, 69, 15, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 70, 71, - 71, 71, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 72, 13, 13, 13, 13, 13, 13, 13, 13, 13, 73, 74, 74, 0, - 75, 76, 77, 77, 77, 78, 79, 15, 0, 0, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 80, 81, 47, - 15, 82, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 84, 84, 84, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, 84, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 21, 22, 14, 64, 64, 64, 64, 0, 85, 85, 0, 0, 21, 22, - 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, - 22, 77, 21, 22, 21, 22, 0, 0, 21, 22, 0, 0, 21, 22, 0, 0, 0, 21, 22, - 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, - 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 0, 0, 63, 3, 3, 3, 3, 3, 3, 0, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 15, 0, 3, 8, 0, 0, - 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 64, 64, 64, 3, 64, 3, 64, - 64, 3, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 0, 0, 0, 0, 0, 42, 42, 42, 3, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 0, 0, 0, 0, 0, 63, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 0, 0, 64, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 3, 42, 64, - 64, 64, 64, 64, 64, 64, 85, 85, 64, 64, 64, 64, 64, 64, 63, 63, 64, - 64, 14, 64, 64, 64, 64, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 42, 42, - 42, 14, 14, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 88, 42, - 64, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, - 64, 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 0, 0, 64, 42, 89, 89, 89, 64, 64, 64, 64, 64, 64, - 64, 64, 89, 89, 89, 89, 64, 0, 0, 42, 64, 64, 64, 64, 0, 0, 0, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 64, 64, 3, 3, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, - 89, 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, 0, 0, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 0, 42, 0, 0, 0, 42, - 42, 42, 42, 0, 0, 64, 0, 89, 89, 89, 64, 64, 64, 64, 0, 0, 89, 89, - 0, 0, 89, 89, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 42, 42, - 0, 42, 42, 42, 64, 64, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 42, 42, - 4, 4, 17, 17, 17, 17, 17, 17, 14, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 42, - 42, 42, 42, 42, 42, 0, 0, 0, 0, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, - 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 0, 42, 42, 0, 42, 42, 0, 0, - 64, 0, 89, 89, 89, 64, 64, 0, 0, 0, 0, 64, 64, 0, 0, 64, 64, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 0, 42, 0, 0, 0, 0, 0, - 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 64, 64, 42, 42, 42, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 89, 0, 42, 42, 42, 42, 42, 42, 42, - 0, 42, 0, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, - 42, 42, 0, 42, 42, 0, 42, 42, 42, 42, 42, 0, 0, 64, 42, 89, 89, 89, - 64, 64, 64, 64, 64, 0, 64, 64, 89, 0, 89, 89, 64, 0, 0, 42, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 0, 42, - 42, 0, 0, 42, 42, 42, 42, 0, 0, 64, 42, 89, 64, 89, 64, 64, 64, 0, - 0, 0, 89, 89, 0, 0, 89, 89, 64, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 0, - 0, 0, 0, 42, 42, 0, 42, 42, 42, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, - 0, 42, 42, 42, 42, 42, 42, 0, 0, 0, 42, 42, 42, 0, 42, 42, 42, 42, - 0, 0, 0, 42, 42, 0, 42, 0, 42, 42, 0, 0, 0, 42, 42, 0, 0, 0, 42, 42, - 42, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 0, 0, 0, - 0, 89, 89, 64, 89, 89, 0, 0, 0, 89, 89, 89, 0, 89, 89, 89, 64, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 89, 89, 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, - 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 0, 42, 42, 42, 42, 42, 0, 0, 0, 0, 64, 64, 64, 89, 89, - 89, 89, 0, 64, 64, 64, 0, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 64, - 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, - 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 0, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, - 42, 42, 0, 0, 0, 0, 89, 64, 89, 89, 89, 89, 89, 0, 64, 89, 89, 0, 89, - 89, 64, 64, 0, 0, 0, 0, 0, 0, 0, 89, 89, 0, 0, 0, 0, 0, 0, 0, 42, 0, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 89, 89, 89, 64, 64, - 64, 0, 0, 89, 89, 89, 0, 89, 89, 89, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 0, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 0, 0, - 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 64, 0, 0, 0, 0, 89, 89, 89, 64, - 64, 64, 0, 64, 0, 89, 89, 89, 89, 89, 89, 89, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 64, 42, 42, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 4, 42, 42, - 42, 42, 42, 42, 63, 64, 64, 64, 64, 64, 64, 64, 64, 3, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 3, 3, 0, 0, 0, 0, 0, 42, 42, 0, 42, 0, 0, 42, 42, - 0, 42, 0, 0, 42, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 0, 42, 42, 42, 42, - 42, 42, 42, 0, 42, 42, 42, 0, 42, 0, 42, 0, 0, 42, 42, 0, 42, 42, 42, - 42, 64, 42, 42, 64, 64, 64, 64, 64, 64, 0, 64, 64, 42, 0, 0, 42, 42, - 42, 42, 42, 0, 63, 0, 64, 64, 64, 64, 64, 64, 0, 0, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 0, 0, 42, 42, 0, 0, 42, 14, 14, 14, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 14, 14, 14, 14, 14, 64, 64, 14, 14, 14, - 14, 14, 14, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 14, 64, 14, 64, 14, 64, 5, 6, 5, 6, 89, 89, 42, 42, 42, - 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 89, 64, 64, 64, 64, 64, 3, 64, 64, 42, - 42, 42, 42, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 0, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 0, 14, 14, 14, 14, 14, 14, 14, 14, 64, 14, 14, 14, 14, 14, 14, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 0, 42, - 42, 42, 42, 42, 0, 42, 42, 0, 89, 64, 64, 64, 64, 89, 64, 0, 0, 0, - 64, 64, 89, 64, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, - 3, 3, 3, 3, 3, 42, 42, 42, 42, 42, 42, 89, 89, 64, 64, 0, 0, 0, 0, - 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, - 0, 0, 0, 0, 42, 42, 42, 42, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 42, 42, 42, - 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, - 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, 0, 42, - 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, - 42, 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, 0, - 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 3, 3, 42, 42, 42, 42, 42, - 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 5, 6, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 3, 3, 3, 90, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 89, 89, 89, 64, 64, 64, 64, 64, 64, 64, 89, 89, 89, 89, 89, - 89, 89, 89, 64, 89, 89, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 3, 3, 3, 3, 3, 3, 3, 4, 3, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, - 3, 3, 3, 3, 8, 3, 3, 3, 3, 88, 88, 88, 88, 0, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 0, 0, 0, 0, 0, 0, 42, 42, 42, 63, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, - 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 64, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 22, 21, 22, 21, 22, 21, - 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 15, 15, - 15, 15, 15, 91, 0, 0, 0, 0, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 0, - 0, 0, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, - 93, 93, 93, 92, 92, 92, 92, 92, 92, 0, 0, 93, 93, 93, 93, 93, 93, 0, - 0, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, - 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 92, - 92, 92, 92, 92, 92, 0, 0, 93, 93, 93, 93, 93, 93, 0, 0, 15, 92, 15, - 92, 15, 92, 15, 92, 0, 93, 0, 93, 0, 93, 0, 93, 92, 92, 92, 92, 92, - 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 95, 95, 95, 95, - 96, 96, 97, 97, 98, 98, 99, 99, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, - 100, 100, 100, 100, 100, 100, 100, 100, 92, 92, 92, 92, 92, 92, 92, - 92, 100, 100, 100, 100, 100, 100, 100, 100, 92, 92, 92, 92, 92, 92, - 92, 92, 100, 100, 100, 100, 100, 100, 100, 100, 92, 92, 15, 101, 15, - 0, 15, 15, 93, 93, 102, 102, 103, 11, 104, 11, 11, 11, 15, 101, 15, - 0, 15, 15, 105, 105, 105, 105, 103, 11, 11, 11, 92, 92, 15, 15, 0, - 0, 15, 15, 93, 93, 106, 106, 0, 11, 11, 11, 92, 92, 15, 15, 15, 107, - 15, 15, 93, 93, 108, 108, 109, 11, 11, 11, 0, 0, 15, 101, 15, 0, 15, - 15, 110, 110, 111, 111, 103, 11, 11, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 88, 88, 88, 88, 8, 8, 8, 8, 8, 8, 3, 3, 16, 19, 5, 16, 16, - 19, 5, 16, 3, 3, 3, 3, 3, 3, 3, 3, 112, 113, 88, 88, 88, 88, 88, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 16, 19, 3, 3, 3, 3, 12, 12, 3, 3, 3, 7, - 5, 6, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 88, 88, 88, 17, - 0, 0, 0, 17, 17, 17, 17, 17, 17, 7, 7, 7, 5, 6, 15, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 7, 7, 7, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 85, 85, 85, 85, 64, 85, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 77, - 14, 14, 14, 14, 77, 14, 14, 15, 77, 77, 77, 15, 15, 77, 77, 77, 15, - 14, 77, 14, 14, 14, 77, 77, 77, 77, 77, 14, 14, 14, 14, 14, 14, 77, - 14, 114, 14, 77, 14, 115, 116, 77, 77, 14, 15, 77, 77, 14, 77, 15, - 42, 42, 42, 42, 15, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, 118, 118, 118, 118, - 118, 118, 118, 118, 118, 118, 118, 90, 90, 90, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 7, 7, 14, 14, - 14, 14, 7, 14, 14, 7, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 7, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 14, 14, 7, - 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 7, 7, 14, 14, 14, 14, 14, 14, 14, 5, 6, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, - 14, 14, 14, 0, 14, 14, 14, 14, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 0, 14, 0, 14, 14, 14, 14, 0, 0, 0, 14, 0, 14, 14, - 14, 14, 14, 14, 14, 0, 0, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 14, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 0, 0, 0, 2, 3, 3, 3, 14, 63, 42, 90, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, - 14, 14, 5, 6, 5, 6, 5, 6, 5, 6, 8, 5, 6, 6, 14, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 64, 64, 64, 64, 64, 64, 8, 63, 63, 63, 63, 63, 14, - 14, 90, 90, 90, 0, 0, 0, 14, 14, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 64, 64, - 11, 11, 63, 63, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 12, 63, - 63, 63, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 14, 14, 17, 17, 17, - 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 0, 14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, - 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 0, - 0, 0, 0, 0, 42, 64, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 7, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, - 42, 0, 42, 0, 42, 42, 0, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 64, 64, 64, 64, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 8, 8, 12, 12, 5, 6, 5, 6, 5, - 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 0, 0, 0, 0, 3, 3, 3, 3, 12, 12, 12, - 3, 3, 3, 0, 3, 3, 3, 3, 8, 5, 6, 5, 6, 5, 6, 3, 3, 3, 7, 8, 7, 7, 7, - 0, 3, 4, 3, 3, 0, 0, 0, 0, 42, 42, 42, 0, 42, 0, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 0, 0, 88, 0, 3, 3, 3, 4, 3, 3, 3, 5, 6, 3, 7, 3, 8, 3, 3, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 3, 3, 7, 7, 7, 3, 11, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 5, 7, 6, 7, 0, 0, 3, 5, 6, 3, 12, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 63, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 63, - 63, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, - 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, - 42, 42, 42, 42, 0, 0, 42, 42, 42, 0, 0, 0, 4, 4, 7, 11, 14, 4, 4, 0, - 14, 7, 7, 7, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 14, - 14, 42, 17, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 123, 123, - 126, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 89, 64, 14, 14, 14, - 14, 14, 0, 0, 77, 77, 15, 15, 77, 15, 15, 77, 77, 15, 77, 77, 15, 77, - 77, 15, 15, 77, 15, 15, 77, 77, 15, 77, 77, 15, 77, 77, 15, 15, 77, - 15, 15, 77, 77, 15, 77, 77, 15, 77, 77, 15, 15, 77, 77, 15, 15, 77, - 15, 15, 77, 77, 15, 15, 77, 15, 15, 77, 77, 15, 15, 9, 9, 9, 42, 42, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 88, 0, 88, 88, 88, 88, 88, 88, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 3, 3, 3, 5, 6, 3, 7, 3, 8, + 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 7, 7, 7, 3, 3, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 5, 3, 6, 11, 12, 11, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 5, 7, 6, 7, 1, 2, 3, 4, 4, 4, 4, 14, 14, 11, 14, 15, 16, + 7, 8, 14, 11, 14, 7, 17, 17, 11, 18, 14, 3, 11, 17, 15, 19, 17, 17, + 17, 3, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 7, 10, 10, 10, 10, 10, 10, 10, 15, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 7, 13, 13, 13, 13, 13, 13, 13, 20, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 23, 24, 21, 22, 21, + 22, 21, 22, 15, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, + 22, 21, 22, 15, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 25, + 21, 22, 21, 22, 21, 22, 26, 15, 27, 21, 22, 21, 22, 28, 21, 22, 29, + 29, 21, 22, 15, 30, 31, 32, 21, 22, 29, 33, 34, 35, 36, 21, 22, 15, + 15, 35, 37, 15, 38, 21, 22, 21, 22, 21, 22, 39, 21, 22, 39, 15, 15, + 21, 22, 39, 21, 22, 40, 40, 21, 22, 21, 22, 41, 21, 22, 15, 42, 21, + 22, 15, 43, 42, 42, 42, 42, 44, 45, 46, 44, 45, 46, 44, 45, 46, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 47, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 15, 44, 45, 46, 21, 22, 48, 49, 21, 22, 21, 22, 21, 22, 21, 22, 0, + 0, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 50, 51, 15, 52, 52, 15, 53, 15, + 54, 15, 15, 15, 15, 52, 15, 15, 55, 15, 15, 15, 15, 56, 57, 15, 15, + 15, 15, 15, 57, 15, 15, 58, 15, 15, 59, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 60, 15, 15, 60, 15, 15, 15, 15, 60, 15, 61, 61, 15, 15, + 15, 15, 15, 15, 62, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 11, 11, 63, 63, 63, 63, 63, 63, 63, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 63, 63, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 63, 63, 63, 63, + 63, 11, 11, 11, 11, 11, 11, 11, 11, 11, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, + 0, 0, 0, 0, 63, 0, 0, 0, 3, 0, 0, 0, 0, 0, 11, 11, 66, 3, 67, 67, 67, + 0, 68, 0, 69, 69, 15, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 70, 71, + 71, 71, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 72, 13, 13, 13, 13, 13, 13, 13, 13, 13, 73, 74, 74, 0, + 75, 76, 77, 77, 77, 78, 79, 15, 0, 0, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 80, 81, 47, + 15, 82, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 21, 22, 14, 64, 64, 64, 64, 0, 85, 85, 0, 0, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, + 22, 77, 21, 22, 21, 22, 0, 0, 21, 22, 0, 0, 21, 22, 0, 0, 0, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 0, 0, 63, 3, 3, 3, 3, 3, 3, 0, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 15, 0, 3, 8, 0, 0, + 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 64, 64, 64, 3, 64, 3, 64, + 64, 3, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 0, 0, 0, 0, 0, 42, 42, 42, 3, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 0, 0, 0, 0, 0, 63, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 3, 3, 3, 0, 0, 64, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 3, 42, 64, + 64, 64, 64, 64, 64, 64, 85, 85, 64, 64, 64, 64, 64, 64, 63, 63, 64, + 64, 14, 64, 64, 64, 64, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 42, 42, + 42, 14, 14, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 88, 42, + 64, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 64, 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 0, 0, 64, 42, 89, 89, 89, 64, 64, 64, 64, 64, 64, + 64, 64, 89, 89, 89, 89, 64, 0, 0, 42, 64, 64, 64, 64, 0, 0, 0, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 64, 64, 3, 3, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 89, 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, 0, 0, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 0, 42, 0, 0, 0, 42, + 42, 42, 42, 0, 0, 64, 0, 89, 89, 89, 64, 64, 64, 64, 0, 0, 89, 89, + 0, 0, 89, 89, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 42, 42, + 0, 42, 42, 42, 64, 64, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 42, 42, + 4, 4, 17, 17, 17, 17, 17, 17, 14, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 42, + 42, 42, 42, 42, 42, 0, 0, 0, 0, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, + 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 0, 42, 42, 0, 42, 42, 0, 0, + 64, 0, 89, 89, 89, 64, 64, 0, 0, 0, 0, 64, 64, 0, 0, 64, 64, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 0, 42, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 64, 64, 42, 42, 42, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 89, 0, 42, 42, 42, 42, 42, 42, 42, + 0, 42, 0, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, + 42, 42, 0, 42, 42, 0, 42, 42, 42, 42, 42, 0, 0, 64, 42, 89, 89, 89, + 64, 64, 64, 64, 64, 0, 64, 64, 89, 0, 89, 89, 64, 0, 0, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 0, 42, + 42, 0, 0, 42, 42, 42, 42, 0, 0, 64, 42, 89, 64, 89, 64, 64, 64, 0, + 0, 0, 89, 89, 0, 0, 89, 89, 64, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 0, + 0, 0, 0, 42, 42, 0, 42, 42, 42, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, + 0, 42, 42, 42, 42, 42, 42, 0, 0, 0, 42, 42, 42, 0, 42, 42, 42, 42, + 0, 0, 0, 42, 42, 0, 42, 0, 42, 42, 0, 0, 0, 42, 42, 0, 0, 0, 42, 42, + 42, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 0, 0, 0, + 0, 89, 89, 64, 89, 89, 0, 0, 0, 89, 89, 89, 0, 89, 89, 89, 64, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 89, 89, 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, + 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 0, 42, 42, 42, 42, 42, 0, 0, 0, 0, 64, 64, 64, 89, 89, + 89, 89, 0, 64, 64, 64, 0, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 64, + 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, + 89, 0, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 0, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, + 42, 42, 0, 0, 0, 0, 89, 64, 89, 89, 89, 89, 89, 0, 64, 89, 89, 0, 89, + 89, 64, 64, 0, 0, 0, 0, 0, 0, 0, 89, 89, 0, 0, 0, 0, 0, 0, 0, 42, 0, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 89, 89, 89, 64, 64, + 64, 0, 0, 89, 89, 89, 0, 89, 89, 89, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 0, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 0, 0, + 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 64, 0, 0, 0, 0, 89, 89, 89, 64, + 64, 64, 0, 64, 0, 89, 89, 89, 89, 89, 89, 89, 89, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 89, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 64, 42, 42, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 4, 42, 42, + 42, 42, 42, 42, 63, 64, 64, 64, 64, 64, 64, 64, 64, 3, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 3, 3, 0, 0, 0, 0, 0, 42, 42, 0, 42, 0, 0, 42, 42, + 0, 42, 0, 0, 42, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 0, 42, 42, 42, 42, + 42, 42, 42, 0, 42, 42, 42, 0, 42, 0, 42, 0, 0, 42, 42, 0, 42, 42, 42, + 42, 64, 42, 42, 64, 64, 64, 64, 64, 64, 0, 64, 64, 42, 0, 0, 42, 42, + 42, 42, 42, 0, 63, 0, 64, 64, 64, 64, 64, 64, 0, 0, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 0, 0, 42, 42, 0, 0, 42, 14, 14, 14, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 14, 14, 14, 14, 14, 64, 64, 14, 14, 14, + 14, 14, 14, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 14, 64, 14, 64, 14, 64, 5, 6, 5, 6, 89, 89, 42, 42, 42, + 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 89, 64, 64, 64, 64, 64, 3, 64, 64, 42, + 42, 42, 42, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 0, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 0, 14, 14, 14, 14, 14, 14, 14, 14, 64, 14, 14, 14, 14, 14, 14, 0, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 0, 42, + 42, 42, 42, 42, 0, 42, 42, 0, 89, 64, 64, 64, 64, 89, 64, 0, 0, 0, + 64, 64, 89, 64, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, + 3, 3, 3, 3, 3, 42, 42, 42, 42, 42, 42, 89, 89, 64, 64, 0, 0, 0, 0, + 0, 0, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, + 0, 0, 0, 0, 42, 42, 42, 42, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 42, 42, 42, + 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, + 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, 0, 42, + 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, + 42, 0, 42, 0, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 42, 0, + 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, + 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 3, 3, 42, 42, 42, 42, 42, + 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 5, 6, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 3, 3, 3, 90, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 89, 89, 89, 64, 64, 64, 64, 64, 64, 64, 89, 89, 89, 89, 89, + 89, 89, 89, 64, 89, 89, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 3, 3, 3, 3, 3, 3, 3, 4, 3, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, + 3, 3, 3, 3, 8, 3, 3, 3, 3, 88, 88, 88, 88, 0, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 0, 0, 0, 0, 0, 0, 42, 42, 42, 63, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 64, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 22, 21, 22, 21, 22, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 15, 15, + 15, 15, 15, 91, 0, 0, 0, 0, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 0, + 0, 0, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, + 93, 93, 93, 92, 92, 92, 92, 92, 92, 0, 0, 93, 93, 93, 93, 93, 93, 0, + 0, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, + 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 92, + 92, 92, 92, 92, 92, 0, 0, 93, 93, 93, 93, 93, 93, 0, 0, 15, 92, 15, + 92, 15, 92, 15, 92, 0, 93, 0, 93, 0, 93, 0, 93, 92, 92, 92, 92, 92, + 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 95, 95, 95, 95, + 96, 96, 97, 97, 98, 98, 99, 99, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, + 100, 100, 100, 100, 100, 100, 100, 100, 92, 92, 92, 92, 92, 92, 92, + 92, 100, 100, 100, 100, 100, 100, 100, 100, 92, 92, 92, 92, 92, 92, + 92, 92, 100, 100, 100, 100, 100, 100, 100, 100, 92, 92, 15, 101, 15, + 0, 15, 15, 93, 93, 102, 102, 103, 11, 104, 11, 11, 11, 15, 101, 15, + 0, 15, 15, 105, 105, 105, 105, 103, 11, 11, 11, 92, 92, 15, 15, 0, + 0, 15, 15, 93, 93, 106, 106, 0, 11, 11, 11, 92, 92, 15, 15, 15, 107, + 15, 15, 93, 93, 108, 108, 109, 11, 11, 11, 0, 0, 15, 101, 15, 0, 15, + 15, 110, 110, 111, 111, 103, 11, 11, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 88, 88, 88, 88, 8, 8, 8, 8, 8, 8, 3, 3, 16, 19, 5, 16, 16, + 19, 5, 16, 3, 3, 3, 3, 3, 3, 3, 3, 112, 113, 88, 88, 88, 88, 88, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 16, 19, 3, 3, 3, 3, 12, 12, 3, 3, 3, 7, + 5, 6, 0, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 88, 88, 88, 17, + 0, 0, 0, 17, 17, 17, 17, 17, 17, 7, 7, 7, 5, 6, 15, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 7, 7, 7, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 85, 85, 85, 85, 64, 85, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 77, + 14, 14, 14, 14, 77, 14, 14, 15, 77, 77, 77, 15, 15, 77, 77, 77, 15, + 14, 77, 14, 14, 14, 77, 77, 77, 77, 77, 14, 14, 14, 14, 14, 14, 77, + 14, 114, 14, 77, 14, 115, 116, 77, 77, 14, 15, 77, 77, 14, 77, 15, + 42, 42, 42, 42, 15, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 90, 90, 90, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 7, 7, 14, 14, + 14, 14, 7, 14, 14, 7, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 7, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 14, 14, 7, + 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 7, 7, 14, 14, 14, 14, 14, 14, 14, 5, 6, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 14, 14, 14, 0, 14, 14, 14, 14, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 0, 14, 0, 14, 14, 14, 14, 0, 0, 0, 14, 0, 14, 14, + 14, 14, 14, 14, 14, 0, 0, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 14, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 0, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, + 0, 0, 0, 2, 3, 3, 3, 14, 63, 42, 90, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, + 14, 14, 5, 6, 5, 6, 5, 6, 5, 6, 8, 5, 6, 6, 14, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 64, 64, 64, 64, 64, 64, 8, 63, 63, 63, 63, 63, 14, + 14, 90, 90, 90, 0, 0, 0, 14, 14, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 64, 64, + 11, 11, 63, 63, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 12, 63, + 63, 63, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 14, 14, 17, 17, 17, + 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 0, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 14, 14, 14, 0, 14, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, + 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 0, + 0, 0, 0, 0, 42, 64, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 7, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 42, 42, 42, 42, + 42, 0, 42, 0, 42, 42, 0, 42, 42, 0, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 64, 64, 64, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 8, 8, 12, 12, 5, 6, 5, 6, 5, + 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 0, 0, 0, 0, 3, 3, 3, 3, 12, 12, 12, + 3, 3, 3, 0, 3, 3, 3, 3, 8, 5, 6, 5, 6, 5, 6, 3, 3, 3, 7, 8, 7, 7, 7, + 0, 3, 4, 3, 3, 0, 0, 0, 0, 42, 42, 42, 0, 42, 0, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 0, 0, 88, 0, 3, 3, 3, 4, 3, 3, 3, 5, 6, 3, 7, 3, 8, 3, 3, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 3, 3, 7, 7, 7, 3, 11, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 5, 7, 6, 7, 0, 0, 3, 5, 6, 3, 12, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 63, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 63, + 63, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, + 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, 42, 42, 42, 42, 0, 0, 42, 42, + 42, 42, 42, 42, 0, 0, 42, 42, 42, 0, 0, 0, 4, 4, 7, 11, 14, 4, 4, 0, + 14, 7, 7, 7, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 88, 88, 14, + 14, 42, 17, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 123, 123, + 126, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 89, 64, 14, 14, 14, + 14, 14, 0, 0, 77, 77, 15, 15, 77, 15, 15, 77, 77, 15, 77, 77, 15, 77, + 77, 15, 15, 77, 15, 15, 77, 77, 15, 77, 77, 15, 77, 77, 15, 15, 77, + 15, 15, 77, 77, 15, 77, 77, 15, 77, 77, 15, 15, 77, 77, 15, 15, 77, + 15, 15, 77, 77, 15, 15, 77, 15, 15, 77, 77, 15, 15, 9, 9, 9, 42, 42, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 88, 0, 88, 88, 88, 88, 88, 88, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122 }; @@ -814,7 +814,7 @@ static unsigned char groupMap[] = { * Bits 5-7 Case delta type: 000 = identity * 010 = add delta for lower * 011 = add delta for lower, add 1 for title - * 100 = sutract delta for title/upper + * 100 = subtract delta for title/upper * 101 = sub delta for upper, sub 1 for title * 110 = sub delta for upper, add delta for lower * @@ -825,23 +825,23 @@ static unsigned char groupMap[] = { */ static int groups[] = { - 0, 15, 12, 25, 27, 21, 22, 26, 20, 9, 134217793, 28, 19, 134217858, - 29, 2, 23, 11, 1178599554, 24, -507510654, 4194369, 4194434, -834666431, - 973078658, -507510719, 1258291330, 880803905, 864026689, 859832385, - 331350081, 847249473, 851443777, 868220993, -406847358, 884998209, - 876609601, 893386817, 897581121, 914358337, 910164033, 918552641, - 5, -234880894, 8388705, 4194499, 8388770, 331350146, -406847423, - -234880959, 880803970, 864026754, 859832450, 847249538, 851443842, - 868221058, 876609666, 884998274, 893386882, 897581186, 914358402, - 910164098, 918552706, 4, 6, -352321402, 159383617, 155189313, - 268435521, 264241217, 159383682, 155189378, 130023554, 268435586, - 264241282, 260046978, 239075458, 1, 197132418, 226492546, 360710274, - 335544450, -251658175, 402653314, 335544385, 7, 201326657, 201326722, - 16, 8, 10, 247464066, -33554302, -33554367, -310378366, -360710014, - -419430270, -536870782, -469761918, -528482174, -33554365, -37748606, - -310378431, -37748669, 155189378, -360710079, -419430335, -29359998, - -469761983, -29360063, -536870847, -528482239, 13, 14, -1463812031, - -801111999, -293601215, 67108938, 67109002, 109051997, 109052061, + 0, 15, 12, 25, 27, 21, 22, 26, 20, 9, 134217793, 28, 19, 134217858, + 29, 2, 23, 11, 1178599554, 24, -507510654, 4194369, 4194434, -834666431, + 973078658, -507510719, 1258291330, 880803905, 864026689, 859832385, + 331350081, 847249473, 851443777, 868220993, -406847358, 884998209, + 876609601, 893386817, 897581121, 914358337, 910164033, 918552641, + 5, -234880894, 8388705, 4194499, 8388770, 331350146, -406847423, + -234880959, 880803970, 864026754, 859832450, 847249538, 851443842, + 868221058, 876609666, 884998274, 893386882, 897581186, 914358402, + 910164098, 918552706, 4, 6, -352321402, 159383617, 155189313, + 268435521, 264241217, 159383682, 155189378, 130023554, 268435586, + 264241282, 260046978, 239075458, 1, 197132418, 226492546, 360710274, + 335544450, -251658175, 402653314, 335544385, 7, 201326657, 201326722, + 16, 8, 10, 247464066, -33554302, -33554367, -310378366, -360710014, + -419430270, -536870782, -469761918, -528482174, -33554365, -37748606, + -310378431, -37748669, 155189378, -360710079, -419430335, -29359998, + -469761983, -29360063, -536870847, -528482239, 13, 14, -1463812031, + -801111999, -293601215, 67108938, 67109002, 109051997, 109052061, 18, 17, 8388673, 12582977, 8388738, 12583042 }; diff --git a/tools/uniParse.tcl b/tools/uniParse.tcl index 3fe38d2..823a975 100644 --- a/tools/uniParse.tcl +++ b/tools/uniParse.tcl @@ -8,8 +8,8 @@ # # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -# -# RCS: @(#) $Id: uniParse.tcl,v 1.4 2001/05/28 04:37:57 hobbs Exp $ +# +# RCS: @(#) $Id: uniParse.tcl,v 1.5 2010/05/27 08:38:06 nijtmans Exp $ namespace eval uni { @@ -87,7 +87,7 @@ proc uni::getGroup {value} { proc uni::addPage {info} { variable pMap variable pages - + set pIndex [lsearch -exact $pages $info] if {$pIndex == -1} { set pIndex [llength $pages] @@ -96,7 +96,7 @@ proc uni::addPage {info} { lappend pMap $pIndex return } - + proc uni::buildTables {data} { variable shift @@ -104,7 +104,7 @@ proc uni::buildTables {data} { variable pages {} variable groups {{0,,,}} set info {} ;# temporary page info - + set mask [expr {(1 << $shift) - 1}] set next 0 @@ -118,7 +118,7 @@ proc uni::buildTables {data} { scan [lindex $items 0] %4x index set index [format 0x%0.4x $index] - + set gIndex [getGroup [getValue $items $index]] # Since the input table omits unassigned characters, these will @@ -218,7 +218,7 @@ static unsigned char pageMap\[\] = {" append line ", " } if {[string length $line] > 70} { - puts $f $line + puts $f [string trimright $line] set line " " } } @@ -243,7 +243,7 @@ static unsigned char groupMap\[\] = {" append line ", " } if {[string length $line] > 70} { - puts $f $line + puts $f [string trimright $line] set line " " } } @@ -260,7 +260,7 @@ static unsigned char groupMap\[\] = {" * Bits 5-7 Case delta type: 000 = identity * 010 = add delta for lower * 011 = add delta for lower, add 1 for title - * 100 = sutract delta for title/upper + * 100 = subtract delta for title/upper * 101 = sub delta for upper, sub 1 for title * 110 = sub delta for upper, add delta for lower * @@ -275,7 +275,7 @@ static int groups\[\] = {" set last [expr {[llength $groups] - 1}] for {set i 0} {$i <= $last} {incr i} { foreach {type toupper tolower totitle} [split [lindex $groups $i] ,] {} - + # Compute the case conversion type and delta if {$totitle != ""} { @@ -313,7 +313,7 @@ static int groups\[\] = {" append line ", " } if {[string length $line] > 65} { - puts $f $line + puts $f [string trimright $line] set line " " } } -- cgit v0.12 From cccde1f6fa0cd2199b12e1abad815cd4ebf805fc Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 27 May 2010 09:18:11 +0000 Subject: optParse.tcl: eliminate ';' at line end, bump to v0.4.6 --- ChangeLog | 3 +- library/opt/optparse.tcl | 436 +++++++++++++++++++++++------------------------ library/opt/pkgIndex.tcl | 2 +- tests/opt.test | 4 +- 4 files changed, 223 insertions(+), 222 deletions(-) diff --git a/ChangeLog b/ChangeLog index 392227b..ebd47f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2010-05-27 Jan Nijtmans - * library/opt/optParse.tcl Don't generate spaces at the end of a line. + * library/opt/optParse.tcl Don't generate spaces at the end of a line, + * library/opt/pkgIndex.tcl eliminate ';' at line end, bump to v0.4.6 * tools/uniParse.tcl * generic/tclUniData.c * tests/opt.test diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 16e56b0..d6bca2f 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -8,12 +8,12 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.12 2010/05/27 08:32:23 nijtmans Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.13 2010/05/27 09:18:12 nijtmans Exp $ package require Tcl 8.2 # When this version number changes, update the pkgIndex.tcl file # and the install directory in the Makefiles. -package provide opt 0.4.5 +package provide opt 0.4.6 namespace eval ::tcl { @@ -71,10 +71,10 @@ namespace eval ::tcl { ################### No User serviceable part below ! ############### # Array storing the parsed descriptions - variable OptDesc; - array set OptDesc {}; + variable OptDesc + array set OptDesc {} # Next potentially free key id (numeric) - variable OptDescN 0; + variable OptDescN 0 # Inside algorithm/mechanism description: # (not for the faint hearted ;-) @@ -145,54 +145,54 @@ namespace eval ::tcl { # generate a unused keyid if not given # proc ::tcl::OptKeyRegister {desc {key ""}} { - variable OptDesc; - variable OptDescN; + variable OptDesc + variable OptDescN if {[string equal $key ""]} { # in case a key given to us as a parameter was a number while {[info exists OptDesc($OptDescN)]} {incr OptDescN} - set key $OptDescN; - incr OptDescN; + set key $OptDescN + incr OptDescN } # program counter - set program [list [list "P" 1]]; + set program [list [list "P" 1]] # are we processing flags (which makes a single program step) - set inflags 0; + set inflags 0 - set state {}; + set state {} # flag used to detect that we just have a single (flags set) subprogram. - set empty 1; + set empty 1 foreach item $desc { if {$state == "args"} { # more items after 'args'... - return -code error "'args' special argument must be the last one"; + return -code error "'args' special argument must be the last one" } - set res [OptNormalizeOne $item]; - set state [lindex $res 0]; + set res [OptNormalizeOne $item] + set state [lindex $res 0] if {$inflags} { if {$state == "flags"} { # add to 'subprogram' - lappend flagsprg $res; + lappend flagsprg $res } else { # put in the flags # structure for flag programs items is a list of # {subprgcounter {prg flag 1} {prg flag 2} {...}} - lappend program $flagsprg; + lappend program $flagsprg # put the other regular stuff - lappend program $res; - set inflags 0; - set empty 0; + lappend program $res + set inflags 0 + set empty 0 } } else { if {$state == "flags"} { - set inflags 1; + set inflags 1 # sub program counter + first sub program - set flagsprg [list [list "P" 1] $res]; + set flagsprg [list [list "P" 1] $res] } else { - lappend program $res; - set empty 0; + lappend program $res + set empty 0 } } } @@ -200,32 +200,32 @@ proc ::tcl::OptKeyRegister {desc {key ""}} { if {$empty} { # We just have the subprogram, optimize and remove # unneeded level: - set program $flagsprg; + set program $flagsprg } else { - lappend program $flagsprg; + lappend program $flagsprg } } - set OptDesc($key) $program; + set OptDesc($key) $program - return $key; + return $key } # # Free the storage for that given key # proc ::tcl::OptKeyDelete {key} { - variable OptDesc; - unset OptDesc($key); + variable OptDesc + unset OptDesc($key) } # Get the parsed description stored under the given key. proc OptKeyGetDesc {descKey} { - variable OptDesc; + variable OptDesc if {![info exists OptDesc($descKey)]} { - return -code error "Unknown option description key \"$descKey\""; + return -code error "Unknown option description key \"$descKey\"" } - set OptDesc($descKey); + set OptDesc($descKey) } # Parse entry point for ppl who don't want to register with a key, @@ -234,10 +234,10 @@ proc ::tcl::OptKeyDelete {key} { # as it is way faster or simply OptProc which does it all) # Assign a temporary key, call OptKeyParse and then free the storage proc ::tcl::OptParse {desc arglist} { - set tempkey [OptKeyRegister $desc]; - set ret [catch {uplevel 1 [list ::tcl::OptKeyParse $tempkey $arglist]} res]; - OptKeyDelete $tempkey; - return -code $ret $res; + set tempkey [OptKeyRegister $desc] + set ret [catch {uplevel 1 [list ::tcl::OptKeyParse $tempkey $arglist]} res] + OptKeyDelete $tempkey + return -code $ret $res } # Helper function, replacement for proc that both @@ -248,22 +248,22 @@ proc ::tcl::OptParse {desc arglist} { # (the other will be sets to their default value) # into local variable named "Args". proc ::tcl::OptProc {name desc body} { - set namespace [uplevel 1 [list ::namespace current]]; + set namespace [uplevel 1 [list ::namespace current]] if {[string match "::*" $name] || [string equal $namespace "::"]} { # absolute name or global namespace, name is the key - set key $name; + set key $name } else { # we are relative to some non top level namespace: - set key "${namespace}::${name}"; + set key "${namespace}::${name}" } - OptKeyRegister $desc $key; - uplevel 1 [list ::proc $name args "set Args \[::tcl::OptKeyParse $key \$args\]\n$body"]; - return $key; + OptKeyRegister $desc $key + uplevel 1 [list ::proc $name args "set Args \[::tcl::OptKeyParse $key \$args\]\n$body"] + return $key } # Check that a argument has been given # assumes that "OptProc" has been used as it will check in "Args" list proc ::tcl::OptProcArgGiven {argname} { - upvar Args alist; + upvar Args alist expr {[lsearch $alist $argname] >=0} } @@ -272,7 +272,7 @@ proc ::tcl::OptProcArgGiven {argname} { # Return the instruction word/list of a given step/(sub)program proc OptInstr {lst} { - lindex $lst 0; + lindex $lst 0 } # Is a (sub) program or a plain instruction ? proc OptIsPrg {lst} { @@ -288,56 +288,56 @@ proc ::tcl::OptProcArgGiven {argname} { } # Current program counter (2nd word of first word) proc OptSetPrgCounter {lstName newValue} { - upvar $lstName lst; - set lst [lreplace $lst 0 0 [concat "P" $newValue]]; + upvar $lstName lst + set lst [lreplace $lst 0 0 [concat "P" $newValue]] } # returns a list of currently selected items. proc OptSelection {lst} { - set res {}; + set res {} foreach idx [lrange [lindex $lst 0] 1 end] { - lappend res [Lget $lst $idx]; + lappend res [Lget $lst $idx] } - return $res; + return $res } # Advance to next description proc OptNextDesc {descName} { - uplevel 1 [list Lvarincr $descName {0 1}]; + uplevel 1 [list Lvarincr $descName {0 1}] } # Get the current description, eventually descend proc OptCurDesc {descriptions} { - lindex $descriptions [OptGetPrgCounter $descriptions]; + lindex $descriptions [OptGetPrgCounter $descriptions] } # get the current description, eventually descend # through sub programs as needed. proc OptCurDescFinal {descriptions} { - set item [OptCurDesc $descriptions]; + set item [OptCurDesc $descriptions] # Descend untill we get the actual item and not a sub program while {[OptIsPrg $item]} { - set item [OptCurDesc $item]; + set item [OptCurDesc $item] } - return $item; + return $item } # Current final instruction adress proc OptCurAddr {descriptions {start {}}} { - set adress [OptGetPrgCounter $descriptions]; - lappend start $adress; - set item [lindex $descriptions $adress]; + set adress [OptGetPrgCounter $descriptions] + lappend start $adress + set item [lindex $descriptions $adress] if {[OptIsPrg $item]} { - return [OptCurAddr $item $start]; + return [OptCurAddr $item $start] } else { - return $start; + return $start } } # Set the value field of the current instruction proc OptCurSetValue {descriptionsName value} { upvar $descriptionsName descriptions # get the current item full adress - set adress [OptCurAddr $descriptions]; + set adress [OptCurAddr $descriptions] # use the 3th field of the item (see OptValue / OptNewInst) lappend adress 2 - Lvarset descriptions $adress [list 1 $value]; + Lvarset descriptions $adress [list 1 $value] # ^hasBeenSet flag } @@ -348,7 +348,7 @@ proc ::tcl::OptProcArgGiven {argname} { # current state proc OptCurState {descriptions} { - OptState [OptCurDesc $descriptions]; + OptState [OptCurDesc $descriptions] } ####### @@ -356,11 +356,11 @@ proc ::tcl::OptProcArgGiven {argname} { # Returns the argument that has to be processed now proc OptCurrentArg {lst} { - lindex $lst 0; + lindex $lst 0 } # Advance to next argument proc OptNextArg {argsName} { - uplevel 1 [list Lvarpop1 $argsName]; + uplevel 1 [list Lvarpop1 $argsName] } ####### @@ -372,49 +372,49 @@ proc ::tcl::OptProcArgGiven {argname} { # eventually eat all the arguments. proc OptDoAll {descriptionsName argumentsName} { upvar $descriptionsName descriptions - upvar $argumentsName arguments; -# puts "entered DoAll"; + upvar $argumentsName arguments +# puts "entered DoAll" # Nb: the places where "state" can be set are tricky to figure # because DoOne sets the state to flagsValue and return -continue # when needed... - set state [OptCurState $descriptions]; + set state [OptCurState $descriptions] # We'll exit the loop in "OptDoOne" or when state is empty. while 1 { - set curitem [OptCurDesc $descriptions]; + set curitem [OptCurDesc $descriptions] # Do subprograms if needed, call ourselves on the sub branch while {[OptIsPrg $curitem]} { OptDoAll curitem arguments -# puts "done DoAll sub"; - # Insert back the results in current tree; +# puts "done DoAll sub" + # Insert back the results in current tree Lvarset1nc descriptions [OptGetPrgCounter $descriptions]\ - $curitem; - OptNextDesc descriptions; - set curitem [OptCurDesc $descriptions]; - set state [OptCurState $descriptions]; + $curitem + OptNextDesc descriptions + set curitem [OptCurDesc $descriptions] + set state [OptCurState $descriptions] } -# puts "state = \"$state\" - arguments=($arguments)"; +# puts "state = \"$state\" - arguments=($arguments)" if {[Lempty $state]} { # Nothing left to do, we are done in this branch: - break; + break } # The following statement can make us terminate/continue # as it use return -code {break, continue, return and error} # codes - OptDoOne descriptions state arguments; + OptDoOne descriptions state arguments # If we are here, no special return code where issued, # we'll step to next instruction : -# puts "new state = \"$state\""; - OptNextDesc descriptions; - set state [OptCurState $descriptions]; +# puts "new state = \"$state\"" + OptNextDesc descriptions + set state [OptCurState $descriptions] } } # Process one step for the state machine, # eventually consuming the current argument. proc OptDoOne {descriptionsName stateName argumentsName} { - upvar $argumentsName arguments; - upvar $descriptionsName descriptions; - upvar $stateName state; + upvar $argumentsName arguments + upvar $descriptionsName descriptions + upvar $stateName state # the special state/instruction "args" eats all # the remaining args (if any) @@ -422,27 +422,27 @@ proc ::tcl::OptProcArgGiven {argname} { if {![Lempty $arguments]} { # If there is no additional arguments, leave the default value # in. - OptCurSetValue descriptions $arguments; - set arguments {}; + OptCurSetValue descriptions $arguments + set arguments {} } # puts "breaking out ('args' state: consuming every reminding args)" - return -code break; + return -code break } if {[Lempty $arguments]} { if {$state == "flags"} { # no argument and no flags : we're done -# puts "returning to previous (sub)prg (no more args)"; - return -code return; +# puts "returning to previous (sub)prg (no more args)" + return -code return } elseif {$state == "optValue"} { set state next; # not used, for debug only # go to next state - return ; + return } else { - return -code error [OptMissingValue $descriptions]; + return -code error [OptMissingValue $descriptions] } } else { - set arg [OptCurrentArg $arguments]; + set arg [OptCurrentArg $arguments] } switch $state { @@ -452,62 +452,62 @@ proc ::tcl::OptProcArgGiven {argname} { # Still a flag ? if {![OptIsFlag $arg]} { # don't consume the argument, return to previous prg - return -code return; + return -code return } # consume the flag - OptNextArg arguments; + OptNextArg arguments if {[string equal "--" $arg]} { # return from 'flags' state - return -code return; + return -code return } - set hits [OptHits descriptions $arg]; + set hits [OptHits descriptions $arg] if {$hits > 1} { return -code error [OptAmbigous $descriptions $arg] } elseif {$hits == 0} { return -code error [OptFlagUsage $descriptions $arg] } - set item [OptCurDesc $descriptions]; + set item [OptCurDesc $descriptions] if {[OptNeedValue $item]} { # we need a value, next state is - set state flagValue; + set state flagValue } else { - OptCurSetValue descriptions 1; + OptCurSetValue descriptions 1 } # continue - return -code continue; + return -code continue } flagValue - value { - set item [OptCurDesc $descriptions]; + set item [OptCurDesc $descriptions] # Test the values against their required type if {[catch {OptCheckType $arg\ [OptType $item] [OptTypeArgs $item]} val]} { return -code error [OptBadValue $item $arg $val] } # consume the value - OptNextArg arguments; + OptNextArg arguments # set the value - OptCurSetValue descriptions $val; + OptCurSetValue descriptions $val # go to next state if {$state == "flagValue"} { set state flags - return -code continue; + return -code continue } else { set state next; # not used, for debug only return ; # will go on next step } } optValue { - set item [OptCurDesc $descriptions]; + set item [OptCurDesc $descriptions] # Test the values against their required type if {![catch {OptCheckType $arg\ [OptType $item] [OptTypeArgs $item]} val]} { # right type, so : # consume the value - OptNextArg arguments; + OptNextArg arguments # set the value - OptCurSetValue descriptions $val; + OptCurSetValue descriptions $val } # go to next state set state next; # not used, for debug only @@ -518,39 +518,39 @@ proc ::tcl::OptProcArgGiven {argname} { # state as been entered ! return -code error "Bug! unknown state in DoOne \"$state\"\ (prg counter [OptGetPrgCounter $descriptions]:\ - [OptCurDesc $descriptions])"; + [OptCurDesc $descriptions])" } # Parse the options given the key to previously registered description # and arguments list proc ::tcl::OptKeyParse {descKey arglist} { - set desc [OptKeyGetDesc $descKey]; + set desc [OptKeyGetDesc $descKey] # make sure -help always give usage if {[string equal -nocase "-help" $arglist]} { - return -code error [OptError "Usage information:" $desc 1]; + return -code error [OptError "Usage information:" $desc 1] } - OptDoAll desc arglist; + OptDoAll desc arglist if {![Lempty $arglist]} { - return -code error [OptTooManyArgs $desc $arglist]; + return -code error [OptTooManyArgs $desc $arglist] } # Analyse the result # Walk through the tree: - OptTreeVars $desc "#[expr {[info level]-1}]" ; + OptTreeVars $desc "#[expr {[info level]-1}]" } # determine string length for nice tabulated output proc OptTreeVars {desc level {vnamesLst {}}} { foreach item $desc { - if {[OptIsCounter $item]} continue; + if {[OptIsCounter $item]} continue if {[OptIsPrg $item]} { - set vnamesLst [OptTreeVars $item $level $vnamesLst]; + set vnamesLst [OptTreeVars $item $level $vnamesLst] } else { - set vname [OptVarName $item]; + set vname [OptVarName $item] upvar $level $vname var if {[OptHasBeenSet $item]} { # puts "adding $vname" @@ -558,10 +558,10 @@ proc ::tcl::OptKeyParse {descKey arglist} { # it is more usefull, for instance you can check that # no flags at all was given with expr # {![string match "*-*" $Args]} - lappend vnamesLst [OptName $item]; - set var [OptValue $item]; + lappend vnamesLst [OptName $item] + set var [OptValue $item] } else { - set var [OptDefaultValue $item]; + set var [OptDefaultValue $item] } } } @@ -573,7 +573,7 @@ proc ::tcl::OptKeyParse {descKey arglist} { # and emit an error if arg is not of the correct type # otherwise returns the canonical value of that arg (ie 0/1 for booleans) proc ::tcl::OptCheckType {arg type {typeArgs ""}} { -# puts "checking '$arg' against '$type' ($typeArgs)"; +# puts "checking '$arg' against '$type' ($typeArgs)" # only types "any", "choice", and numbers can have leading "-" @@ -582,7 +582,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { if {![string is integer -strict $arg]} { error "not an integer" } - return $arg; + return $arg } float { return [expr {double($arg)}] @@ -593,7 +593,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { if {[llength $arg]==0 && [OptIsFlag $arg]} { error "no values with leading -" } - return $arg; + return $arg } boolean { if {![string is boolean -strict $arg]} { @@ -606,10 +606,10 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { if {[lsearch -exact $typeArgs $arg] < 0} { error "invalid choice" } - return $arg; + return $arg } any { - return $arg; + return $arg } string - default { @@ -619,7 +619,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { return $arg } } - return neverReached; + return neverReached } # internal utilities @@ -627,34 +627,34 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { # returns the number of flags matching the given arg # sets the (local) prg counter to the list of matches proc OptHits {descName arg} { - upvar $descName desc; + upvar $descName desc set hits 0 set hitems {} - set i 1; + set i 1 - set larg [string tolower $arg]; - set len [string length $larg]; - set last [expr {$len-1}]; + set larg [string tolower $arg] + set len [string length $larg] + set last [expr {$len-1}] foreach item [lrange $desc 1 end] { set flag [OptName $item] # lets try to match case insensitively # (string length ought to be cheap) - set lflag [string tolower $flag]; + set lflag [string tolower $flag] if {$len == [string length $lflag]} { if {[string equal $larg $lflag]} { # Exact match case - OptSetPrgCounter desc $i; - return 1; + OptSetPrgCounter desc $i + return 1 } } elseif {[string equal $larg [string range $lflag 0 $last]]} { - lappend hitems $i; - incr hits; + lappend hitems $i + incr hits } - incr i; + incr i } if {$hits} { - OptSetPrgCounter desc $hitems; + OptSetPrgCounter desc $hitems } return $hits } @@ -662,29 +662,29 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { # Extract fields from the list structure: proc OptName {item} { - lindex $item 1; + lindex $item 1 } proc OptHasBeenSet {item} { - Lget $item {2 0}; + Lget $item {2 0} } proc OptValue {item} { - Lget $item {2 1}; + Lget $item {2 1} } proc OptIsFlag {name} { - string match "-*" $name; + string match "-*" $name } proc OptIsOpt {name} { - string match {\?*} $name; + string match {\?*} $name } proc OptVarName {item} { - set name [OptName $item]; + set name [OptName $item] if {[OptIsFlag $name]} { - return [string range $name 1 end]; + return [string range $name 1 end] } elseif {[OptIsOpt $name]} { - return [string trim $name "?"]; + return [string trim $name "?"] } else { - return $name; + return $name } } proc OptType {item} { @@ -721,13 +721,13 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { proc OptOptUsage {item {what ""}} { return -code error "invalid description format$what: $item\n\ should be a list of {varname|-flagname ?-type? ?defaultvalue?\ - ?helpstring?}"; + ?helpstring?}" } # Generate a canonical form single instruction proc OptNewInst {state varname type typeArgs help} { - list $state $varname [list 0 {}] $type $typeArgs $help; + list $state $varname [list 0 {}] $type $typeArgs $help # ^ ^ # | | # hasBeenSet=+ +=currentValue @@ -735,18 +735,18 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { # Translate one item to canonical form proc OptNormalizeOne {item} { - set lg [Lassign $item varname arg1 arg2 arg3]; -# puts "called optnormalizeone '$item' v=($varname), lg=$lg"; - set isflag [OptIsFlag $varname]; - set isopt [OptIsOpt $varname]; + set lg [Lassign $item varname arg1 arg2 arg3] +# puts "called optnormalizeone '$item' v=($varname), lg=$lg" + set isflag [OptIsFlag $varname] + set isopt [OptIsOpt $varname] if {$isflag} { - set state "flags"; + set state "flags" } elseif {$isopt} { - set state "optValue"; + set state "optValue" } elseif {![string equal $varname "args"]} { - set state "value"; + set state "value" } else { - set state "args"; + set state "args" } # apply 'smart' 'fuzzy' logic to try to make @@ -756,9 +756,9 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { switch $lg { 1 { if {$isflag} { - return [OptNewInst $state $varname boolflag false ""]; + return [OptNewInst $state $varname boolflag false ""] } else { - return [OptNewInst $state $varname any "" ""]; + return [OptNewInst $state $varname any "" ""] } } 2 { @@ -778,7 +778,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { set help "" set def $arg1 } - return [OptNewInst $state $varname $type $def $help]; + return [OptNewInst $state $varname $type $def $help] } 3 { # varname type value @@ -789,9 +789,9 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { # on the contrary, for a variable (non optional), # default value is pointless, 'cept for choices : if {$isflag || $isopt || ($type == "choice")} { - return [OptNewInst $state $varname $type $arg2 ""]; + return [OptNewInst $state $varname $type $arg2 ""] } else { - return [OptNewInst $state $varname $type "" $arg2]; + return [OptNewInst $state $varname $type "" $arg2] } } else { return [OptNewInst $state $varname\ @@ -800,13 +800,13 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { } 4 { if {[regexp {^-(.+)$} $arg1 x type]} { - return [OptNewInst $state $varname $type $arg2 $arg3]; + return [OptNewInst $state $varname $type $arg2 $arg3] } else { - return -code error [OptOptUsage $item]; + return -code error [OptOptUsage $item] } } default { - return -code error [OptOptUsage $item]; + return -code error [OptOptUsage $item] } } } @@ -831,7 +831,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { OptError "ambigous option \"$arg\", choose from:" [OptSelection $desc] } proc OptFlagUsage {desc arg} { - OptError "bad flag \"$arg\", must be one of" $desc; + OptError "bad flag \"$arg\", must be one of" $desc } proc OptTooManyArgs {desc arguments} { OptError "too many arguments (unexpected argument(s): $arguments),\ @@ -840,45 +840,45 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { } proc OptParamType {item} { if {[OptIsFlag $item]} { - return "flag"; + return "flag" } else { - return "parameter"; + return "parameter" } } proc OptBadValue {item arg {err {}}} { -# puts "bad val err = \"$err\""; +# puts "bad val err = \"$err\"" OptError "bad value \"$arg\" for [OptParamType $item]"\ [list $item] } proc OptMissingValue {descriptions} { -# set item [OptCurDescFinal $descriptions]; - set item [OptCurDesc $descriptions]; +# set item [OptCurDescFinal $descriptions] + set item [OptCurDesc $descriptions] OptError "no value given for [OptParamType $item] \"[OptName $item]\"\ (use -help for full usage) :"\ [list $item] } proc ::tcl::OptKeyError {prefix descKey {header 0}} { - OptError $prefix [OptKeyGetDesc $descKey] $header; + OptError $prefix [OptKeyGetDesc $descKey] $header } # determine string length for nice tabulated output proc OptLengths {desc nlName tlName dlName} { - upvar $nlName nl; - upvar $tlName tl; - upvar $dlName dl; + upvar $nlName nl + upvar $tlName tl + upvar $dlName dl foreach item $desc { - if {[OptIsCounter $item]} continue; + if {[OptIsCounter $item]} continue if {[OptIsPrg $item]} { OptLengths $item nl tl dl } else { SetMax nl [string length [OptName $item]] SetMax tl [string length [OptType $item]] - set dv [OptTypeArgs $item]; + set dv [OptTypeArgs $item] if {[OptState $item] != "header"} { - set dv "($dv)"; + set dv "($dv)" } - set l [string length $dv]; + set l [string length $dv] # limit the space allocated to potentially big "choices" if {([OptType $item] != "choice") || ($l<=12)} { SetMax dl $l @@ -945,9 +945,9 @@ proc ::tcl::Lempty {list} { # Gets the value of one leaf of a lists tree proc ::tcl::Lget {list indexLst} { if {[llength $indexLst] <= 1} { - return [lindex $list $indexLst]; + return [lindex $list $indexLst] } - Lget [lindex $list [lindex $indexLst 0]] [lrange $indexLst 1 end]; + Lget [lindex $list [lindex $indexLst 0]] [lrange $indexLst 1 end] } # Sets the value of one leaf of a lists tree # (we use the version that does not create the elements because @@ -958,92 +958,92 @@ proc ::tcl::Lget {list indexLst} { # it should be {a} and [listp a] should be 0 while [listp {a b}] would be 1 # and [listp "a b"] maybe 0. listp does not exist either...) proc ::tcl::Lvarset {listName indexLst newValue} { - upvar $listName list; + upvar $listName list if {[llength $indexLst] <= 1} { - Lvarset1nc list $indexLst $newValue; + Lvarset1nc list $indexLst $newValue } else { - set idx [lindex $indexLst 0]; - set targetList [lindex $list $idx]; + set idx [lindex $indexLst 0] + set targetList [lindex $list $idx] # reduce refcount on targetList (not really usefull now, # could be with optimizing compiler) -# Lvarset1 list $idx {}; +# Lvarset1 list $idx {} # recursively replace in targetList - Lvarset targetList [lrange $indexLst 1 end] $newValue; + Lvarset targetList [lrange $indexLst 1 end] $newValue # put updated sub list back in the tree - Lvarset1nc list $idx $targetList; + Lvarset1nc list $idx $targetList } } # Set one cell to a value, eventually create all the needed elements # (on level-1 of lists) variable emptyList {} proc ::tcl::Lvarset1 {listName index newValue} { - upvar $listName list; + upvar $listName list if {$index < 0} {return -code error "invalid negative index"} - set lg [llength $list]; + set lg [llength $list] if {$index >= $lg} { - variable emptyList; + variable emptyList for {set i $lg} {$i<$index} {incr i} { - lappend list $emptyList; + lappend list $emptyList } - lappend list $newValue; + lappend list $newValue } else { - set list [lreplace $list $index $index $newValue]; + set list [lreplace $list $index $index $newValue] } } # same as Lvarset1 but no bound checking / creation proc ::tcl::Lvarset1nc {listName index newValue} { - upvar $listName list; - set list [lreplace $list $index $index $newValue]; + upvar $listName list + set list [lreplace $list $index $index $newValue] } # Increments the value of one leaf of a lists tree # (which must exists) proc ::tcl::Lvarincr {listName indexLst {howMuch 1}} { - upvar $listName list; + upvar $listName list if {[llength $indexLst] <= 1} { - Lvarincr1 list $indexLst $howMuch; + Lvarincr1 list $indexLst $howMuch } else { - set idx [lindex $indexLst 0]; - set targetList [lindex $list $idx]; + set idx [lindex $indexLst 0] + set targetList [lindex $list $idx] # reduce refcount on targetList - Lvarset1nc list $idx {}; + Lvarset1nc list $idx {} # recursively replace in targetList - Lvarincr targetList [lrange $indexLst 1 end] $howMuch; + Lvarincr targetList [lrange $indexLst 1 end] $howMuch # put updated sub list back in the tree - Lvarset1nc list $idx $targetList; + Lvarset1nc list $idx $targetList } } # Increments the value of one cell of a list proc ::tcl::Lvarincr1 {listName index {howMuch 1}} { - upvar $listName list; - set newValue [expr {[lindex $list $index]+$howMuch}]; - set list [lreplace $list $index $index $newValue]; - return $newValue; + upvar $listName list + set newValue [expr {[lindex $list $index]+$howMuch}] + set list [lreplace $list $index $index $newValue] + return $newValue } # Removes the first element of a list # and returns the new list value proc ::tcl::Lvarpop1 {listName} { - upvar $listName list; - set list [lrange $list 1 end]; + upvar $listName list + set list [lrange $list 1 end] } # Same but returns the removed element # (Like the tclX version) proc ::tcl::Lvarpop {listName} { - upvar $listName list; - set el [lindex $list 0]; - set list [lrange $list 1 end]; - return $el; + upvar $listName list + set el [lindex $list 0] + set list [lrange $list 1 end] + return $el } # Assign list elements to variables and return the length of the list proc ::tcl::Lassign {list args} { # faster than direct blown foreach (which does not byte compile) - set i 0; - set lg [llength $list]; + set i 0 + set lg [llength $list] foreach vname $args { if {$i>=$lg} break - uplevel 1 [list ::set $vname [lindex $list $i]]; - incr i; + uplevel 1 [list ::set $vname [lindex $list $i]] + incr i } - return $lg; + return $lg } # Misc utilities diff --git a/library/opt/pkgIndex.tcl b/library/opt/pkgIndex.tcl index c5d3635..107d4c6 100644 --- a/library/opt/pkgIndex.tcl +++ b/library/opt/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded opt 0.4.5 [list source [file join $dir optparse.tcl]] +package ifneeded opt 0.4.6 [list source [file join $dir optparse.tcl]] diff --git a/tests/opt.test b/tests/opt.test index 9f01658..53e6711 100644 --- a/tests/opt.test +++ b/tests/opt.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: opt.test,v 1.10 2010/05/27 08:32:23 nijtmans Exp $ +# RCS: @(#) $Id: opt.test,v 1.11 2010/05/27 09:18:12 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -19,7 +19,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } # the package we are going to test -package require opt 0.4.1 +package require opt 0.4.6 # we are using implementation specifics to test the package -- cgit v0.12 From 38420f3643011c20be92daaaa3957535dc0dfdb2 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 28 May 2010 08:30:48 +0000 Subject: * generic/tclExecute.c (TclExecuteByteCode): Restore correct operation of instruction-level execution tracing (had been broken by NRE). --- ChangeLog | 33 +++++++++++++++++++-------------- generic/tclExecute.c | 36 +++++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebd47f3..a749a87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,18 +1,23 @@ +2010-05-28 Donal K. Fellows + + * generic/tclExecute.c (TclExecuteByteCode): Restore correct operation + of instruction-level execution tracing (had been broken by NRE). + 2010-05-27 Jan Nijtmans - * library/opt/optParse.tcl Don't generate spaces at the end of a line, - * library/opt/pkgIndex.tcl eliminate ';' at line end, bump to v0.4.6 - * tools/uniParse.tcl - * generic/tclUniData.c - * tests/opt.test - * tests/safe.test + * library/opt/optParse.tcl: Don't generate spaces at the end of a + * library/opt/pkgIndex.tcl: line, eliminate ';' at line end, bump to + * tools/uniParse.tcl: v0.4.6 + * generic/tclUniData.c: + * tests/opt.test: + * tests/safe.test: 2010-05-21 Jan Nijtmans - * tools/installData.tcl Make sure that copyDir only receives normalized - paths, otherwise it might result in a crash on CYGWIN. restyle according - to the Tcl style guide (http://www.tcl.tk/doc/styleGuide.pdf) - * generic/tclStrToD.c: [Bug #3005233] fix for build on OpenBSD vax + * tools/installData.tcl: Make sure that copyDir only receives + normalized paths, otherwise it might result in a crash on CYGWIN. + Restyle according to the Tcl style guide. + * generic/tclStrToD.c: [Bug 3005233]: Fix for build on OpenBSD vax 2010-05-19 Alexandre Ferrieux @@ -22,13 +27,13 @@ 2010-05-19 Jan Nijtmans - * generic/regcomp.c Don't use arrays of length 1, just use a single - * generic/tclFileName.c element then, it makes code more readable. - * generic/tclLoad.c (here it even prevents a type cast) + * generic/regcomp.c: Don't use arrays of length 1, just use a + * generic/tclFileName.c: single element then, it makes code more + * generic/tclLoad.c: readable. (Here it even prevents a type cast) 2010-05-17 Jan Nijtmans - * generic/tclStrToD.c: Fix [Bug 2996549]: Failure in expr.test on Win32 + * generic/tclStrToD.c: [Bug 2996549]: Failure in expr.test on Win32 2010-05-17 Donal K. Fellows diff --git a/generic/tclExecute.c b/generic/tclExecute.c index d6dd352..7a69673 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.482 2010/04/30 08:29:40 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.483 2010/05/28 08:30:49 dkf Exp $ */ #include "tclInt.h" @@ -359,7 +359,7 @@ VarHashCreateVar( #ifdef TCL_COMPILE_DEBUG # define TRACE(a) \ - while (traceInstructions) { \ + while (TAUX.traceInstructions) { \ fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ (int) CURR_DEPTH, \ (unsigned) (pc - codePtr->codeStart), \ @@ -368,12 +368,12 @@ VarHashCreateVar( break; \ } # define TRACE_APPEND(a) \ - while (traceInstructions) { \ + while (TAUX.traceInstructions) { \ printf a; \ break; \ } # define TRACE_WITH_OBJ(a, objPtr) \ - while (traceInstructions) { \ + while (TAUX.traceInstructions) { \ fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ (int) CURR_DEPTH, \ (unsigned) (pc - codePtr->codeStart), \ @@ -1930,6 +1930,10 @@ TclExecuteByteCode( * Result variable - needed only when going to * checkForCatch or other error handlers; also * used as local in some opcodes. */ +#ifdef TCL_COMPILE_DEBUG + int traceInstructions; /* Whether we are doing instruction-level + * tracing or not. */ +#endif } TAUX = { NULL, NULL, @@ -1987,7 +1991,6 @@ TclExecuteByteCode( int opnd, objc, length, pcAdjustment; Var *varPtr, *arrayPtr; #ifdef TCL_COMPILE_DEBUG - int traceInstructions = (tclTraceExec == 3); char cmdNameBuf[21]; #endif @@ -2033,6 +2036,9 @@ TclExecuteByteCode( */ nonRecursiveCallStart: +#ifdef TCL_COMPILE_DEBUG + TAUX.traceInstructions = (tclTraceExec == 3); +#endif codePtr->refCount++; BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame) @@ -2177,7 +2183,7 @@ TclExecuteByteCode( ValidatePcAndStackTop(codePtr, pc, CURR_DEPTH, 0, /*checkStack*/ auxObjList == NULL); - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, "%2d: %2d ", iPtr->numLevels, (int) CURR_DEPTH); TclPrintInstruction(codePtr, pc); fflush(stdout); @@ -2287,7 +2293,7 @@ TclExecuteByteCode( #ifdef TCL_COMPILE_DEBUG TRACE_WITH_OBJ(("=> return code=%d, result=", TRESULT), iPtr->objResultPtr); - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, "\n"); } #endif @@ -2773,7 +2779,7 @@ TclExecuteByteCode( if (tclTraceExec >= 2) { int i; - if (traceInstructions) { + if (TAUX.traceInstructions) { strncpy(cmdNameBuf, TclGetString(objv[0]), 20); TRACE(("%u => call ", objc)); } else { @@ -2853,7 +2859,7 @@ TclExecuteByteCode( */ #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, " Tailcall request received\n"); } #endif /* TCL_COMPILE_DEBUG */ @@ -6359,7 +6365,7 @@ TclExecuteByteCode( NEXT_INST_F(0, 0, 0); } #if TCL_COMPILE_DEBUG - if (traceInstructions) { + if (TAUX.traceInstructions) { objPtr = Tcl_GetObjResult(interp); if ((TRESULT != TCL_ERROR) && (TRESULT != TCL_RETURN)) { TRACE_APPEND(("OTHER RETURN CODE %d, result= \"%s\"\n ", @@ -6447,7 +6453,7 @@ TclExecuteByteCode( if (Tcl_Canceled(interp, 0) == TCL_ERROR) { #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, " ... cancel with unwind, returning %s\n", StringForResultCode(TRESULT)); } @@ -6463,7 +6469,7 @@ TclExecuteByteCode( if (TclLimitExceeded(iPtr->limit)) { #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, " ... limit exceeded, returning %s\n", StringForResultCode(TRESULT)); } @@ -6472,7 +6478,7 @@ TclExecuteByteCode( } if (catchTop == initCatchTop) { #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, " ... no enclosing catch, returning %s\n", StringForResultCode(TRESULT)); } @@ -6488,7 +6494,7 @@ TclExecuteByteCode( */ #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, " ... no enclosing catch, returning %s\n", StringForResultCode(TRESULT)); } @@ -6510,7 +6516,7 @@ TclExecuteByteCode( TclDecrRefCount(valuePtr); } #ifdef TCL_COMPILE_DEBUG - if (traceInstructions) { + if (TAUX.traceInstructions) { fprintf(stdout, " ... found catch at %d, catchTop=%d, " "unwound to %ld, new pc %u\n", rangePtr->codeOffset, (int) (catchTop - initCatchTop - 1), -- cgit v0.12 From 90238d516ef330d43c5795cf99c6d7f3cfa514fc Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 28 May 2010 09:11:31 +0000 Subject: * generic/tclCompCmdsSZ.c (IssueTryFinallyInstructions): [3007374]: Corrected error in handling of catch contexts to prevent crash with chained handlers. --- ChangeLog | 4 ++ generic/tclCompCmdsSZ.c | 102 +++++++++++++++++++++++++++--------------------- tests/error.test | 19 ++++++++- 3 files changed, 79 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index a749a87..3bc5462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-05-28 Donal K. Fellows + * generic/tclCompCmdsSZ.c (IssueTryFinallyInstructions): [3007374]: + Corrected error in handling of catch contexts to prevent crash with + chained handlers. + * generic/tclExecute.c (TclExecuteByteCode): Restore correct operation of instruction-level execution tracing (had been broken by NRE). diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 3d45833..8fef58d 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.8 2010/04/08 13:26:24 dkf Exp $ + * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.9 2010/05/28 09:11:31 dkf Exp $ */ #include "tclInt.h" @@ -2419,62 +2419,74 @@ IssueTryFinallyInstructions( STORE( optionVars[i]); OP( POP); } - } - if (!handlerTokens[i]) { + + if (!handlerTokens[i]) { + /* + * No handler. Will not be the last handler (that is a + * condition that is checked by the caller). Chain to the + * next one. + */ + + ExceptionRangeEnds(envPtr, range); + OP( END_CATCH); + forwardsNeedFixing = 1; + JUMP(forwardsToFix[i], JUMP4); + goto finishTrapCatchHandling; + } + } else if (!handlerTokens[i]) { /* * No handler. Will not be the last handler (that condition is * checked by the caller). Chain to the next one. */ - ExceptionRangeEnds(envPtr, range); forwardsNeedFixing = 1; JUMP(forwardsToFix[i], JUMP4); - if (resultVars[i] >= 0) { - goto finishTrapCatchHandling; - } - } else { - /* - * Got a handler. Make sure that any pending patch-up actions - * from previous unprocessed handlers are dealt with now that - * we know where they are to jump to. - */ + goto endOfThisArm; + } - if (forwardsNeedFixing) { - forwardsNeedFixing = 0; - OP1( JUMP1, 7); - for (j=0 ; j Date: Fri, 28 May 2010 13:52:00 +0000 Subject: [tcl-Patches-3008541] order of TIP #348 fields in Interp structure --- ChangeLog | 5 +++++ generic/tclInt.h | 32 ++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3bc5462..f43a19f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-28 Jan Nijtmans + + * generic/tclInt.h: [tcl-Patches-3008541] order of TIP #348 fields + in Interp structure + 2010-05-28 Donal K. Fellows * generic/tclCompCmdsSZ.c (IssueTryFinallyInstructions): [3007374]: diff --git a/generic/tclInt.h b/generic/tclInt.h index fa503cc..a03bfc2 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.476 2010/05/03 14:36:40 nijtmans Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.477 2010/05/28 13:52:00 nijtmans Exp $ */ #ifndef _TCLINT @@ -1982,10 +1982,6 @@ typedef struct Interp { Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable. */ Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj). */ Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable. */ - Tcl_Obj *errorStack; /* [info errorstack] value (as a Tcl_Obj). */ - Tcl_Obj *upLiteral; /* "UP" literal for [info errorstack] */ - Tcl_Obj *callLiteral; /* "CALL" literal for [info errorstack] */ - int resetErrorStack; /* controls cleaning up of ::errorStack */ int returnLevel; /* [return -level] parameter. */ /* @@ -2144,15 +2140,6 @@ typedef struct Interp { * tclOOInt.h and tclOO.c for real definition * and setup. */ -#ifdef TCL_COMPILE_STATS - /* - * Statistical information about the bytecode compiler and interpreter's - * operation. - */ - - ByteCodeStats stats; /* Holds compilation and execution statistics - * for this interpreter. */ -#endif /* TCL_COMPILE_STATS */ struct TEOV_callback *deferredCallbacks; /* Callbacks that are set previous to a call * to some Eval function but that actually @@ -2173,6 +2160,23 @@ typedef struct Interp { * over the default error messages returned by * a script cancellation operation. */ + /* + * TIP #348 IMPLEMENTATION - Substituted error stack + */ + Tcl_Obj *errorStack; /* [info errorstack] value (as a Tcl_Obj). */ + Tcl_Obj *upLiteral; /* "UP" literal for [info errorstack] */ + Tcl_Obj *callLiteral; /* "CALL" literal for [info errorstack] */ + int resetErrorStack; /* controls cleaning up of ::errorStack */ + +#ifdef TCL_COMPILE_STATS + /* + * Statistical information about the bytecode compiler and interpreter's + * operation. This should be the last field of Interp. + */ + + ByteCodeStats stats; /* Holds compilation and execution statistics + * for this interpreter. */ +#endif /* TCL_COMPILE_STATS */ } Interp; /* -- cgit v0.12 From 3de22ff5a384e6d63befbefeb166e2b60bd419b1 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 31 May 2010 08:54:14 +0000 Subject: Eliminate some casts to (Tcl_HashTable *) --- ChangeLog | 5 +++++ generic/tclExecute.c | 4 ++-- generic/tclVar.c | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index f43a19f..5e50076 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-31 Jan Nijtmans + + * generic/tclVar.c Eliminate some casts to (Tcl_HashTable *) + * generic/tclExecute.c + 2010-05-28 Jan Nijtmans * generic/tclInt.h: [tcl-Patches-3008541] order of TIP #348 fields diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 7a69673..aae542a 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.483 2010/05/28 08:30:49 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.484 2010/05/31 08:54:15 nijtmans Exp $ */ #include "tclInt.h" @@ -232,7 +232,7 @@ VarHashCreateVar( Tcl_Obj *key, int *newPtr) { - Tcl_HashEntry *hPtr = Tcl_CreateHashEntry((Tcl_HashTable *) tablePtr, + Tcl_HashEntry *hPtr = Tcl_CreateHashEntry(&tablePtr->table, (char *) key, newPtr); if (!hPtr) { diff --git a/generic/tclVar.c b/generic/tclVar.c index 9b2a11b..c07cc6f 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.198 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.199 2010/05/31 08:54:14 nijtmans Exp $ */ #include "tclInt.h" @@ -54,7 +54,7 @@ VarHashCreateVar( Tcl_Obj *key, int *newPtr) { - Tcl_HashEntry *hPtr = Tcl_CreateHashEntry((Tcl_HashTable *) tablePtr, + Tcl_HashEntry *hPtr = Tcl_CreateHashEntry(&tablePtr->table, (char *) key, newPtr); if (hPtr) { @@ -74,7 +74,7 @@ VarHashCreateVar( Tcl_DeleteHashEntry(&(((VarInHash *) varPtr)->entry)) #define VarHashFirstEntry(tablePtr, searchPtr) \ - Tcl_FirstHashEntry((Tcl_HashTable *) (tablePtr), (searchPtr)) + Tcl_FirstHashEntry(&(tablePtr)->table, (searchPtr)) #define VarHashNextEntry(searchPtr) \ Tcl_NextHashEntry((searchPtr)) @@ -110,7 +110,7 @@ VarHashNextVar( (((VarInHash *)(varPtr))->entry.key.objPtr) #define VarHashDeleteTable(tablePtr) \ - Tcl_DeleteHashTable((Tcl_HashTable *) (tablePtr)) + Tcl_DeleteHashTable(&(tablePtr)->table) /* * The strings below are used to indicate what went wrong when a variable -- cgit v0.12 From 67dc34a79def67d6d61add7f0635c45806fc7a50 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 31 May 2010 09:12:04 +0000 Subject: Fix filesystem-5.1 test failure on CYGWIN --- ChangeLog | 1 + tests/fileSystem.test | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5e50076..455d15c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * generic/tclVar.c Eliminate some casts to (Tcl_HashTable *) * generic/tclExecute.c + * tests/fileSystem.test Fix filesystem-5.1 test failure on CYGWIN 2010-05-28 Jan Nijtmans diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 071b63f..2fe13d7 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -546,7 +546,7 @@ test filesystem-5.1 {cache and ~} -constraints testfilesystem -setup { list $res1 $res2 } -cleanup { set ::env(HOME) $orig -} -match regexp -result {{Parent of ~ \(/foo/bar/blah\) is ([a-zA-Z]:)?(/foo/bar|foo:bar)} {Parent of ~ \(/a/b/c\) is ([a-zA-Z]:)?(/a/b|a:b)}} +} -match regexp -result {{Parent of ~ \(/foo/bar/blah\) is ([a-zA-Z]:)?(/cygwin)?(/foo/bar|foo:bar)} {Parent of ~ \(/a/b/c\) is ([a-zA-Z]:)?(/cygwin)?(/a/b|a:b)}} test filesystem-6.1 {empty file name} -returnCodes error -body { open "" -- cgit v0.12 From 085647e065d5d19e1b3e8124cb42424cdd9821c8 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 31 May 2010 22:58:56 +0000 Subject: Fix computation of [uplevel] offsets in TIP 341. Only depend on callerPtr chaining now. Needed for upcoming coro patch. --- ChangeLog | 6 ++++++ generic/tclNamesp.c | 4 ++-- tests/error.test | 8 ++++---- tests/result.test | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 455d15c..429bc35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-06-101 Alexandre Ferrieux + + * generic/tclNamesp.c: Fix computation of [uplevel] offsets in TIP 341. + * tests/error.test: Only depend on callerPtr chaining now. + * tests/result.test: Needed for upcoming coro patch. + 2010-05-31 Jan Nijtmans * generic/tclVar.c Eliminate some casts to (Tcl_HashTable *) diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 41032d1..bf91bc7 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.205 2010/04/05 19:44:45 ferrieux Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.206 2010/05/31 22:58:56 ferrieux Exp $ */ #include "tclInt.h" @@ -4961,7 +4961,7 @@ Tcl_LogCommandInfo( for (n=0, frame=iPtr->framePtr; (frame && (frame != iPtr->varFramePtr)); - n++, frame=frame->callerVarPtr); + n++, frame=frame->callerPtr); Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->upLiteral); Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewIntObj(n)); } else if (iPtr->framePtr != iPtr->rootFramePtr) { diff --git a/tests/error.test b/tests/error.test index 1aab474..515d064 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.31 2010/05/28 09:11:32 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.32 2010/05/31 22:58:56 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -174,13 +174,13 @@ test error-4.6 {errorstack via info } -body { proc g x {error G:$x} catch {f 12} info errorstack -} -match glob -result {CALL {g 1212} CALL {f 12} UP 1} +} -match glob -result {CALL {g 1212} CALL {f 12} UP 3} test error-4.7 {errorstack via options dict } -body { proc f x {g $x$x} proc g x {error G:$x} catch {f 12} m d dict get $d -errorstack -} -match glob -result {CALL {g 1212} CALL {f 12} UP 1} +} -match glob -result {CALL {g 1212} CALL {f 12} UP 3} # Errors in error command itself @@ -244,7 +244,7 @@ test error-6.10 {catch must reset errorstack} -body { catch {f 13} set e2 [info errorstack] list $e1 $e2 -} -match glob -result {{CALL {g 1212} CALL {f 12} UP 1} {CALL {g 1313} CALL {f 13} UP 1}} +} -match glob -result {{CALL {g 1212} CALL {f 12} UP 3} {CALL {g 1313} CALL {f 13} UP 3}} test error-7.1 {Bug 1397843} -body { variable cmds diff --git a/tests/result.test b/tests/result.test index 8bde7ef..a610343 100644 --- a/tests/result.test +++ b/tests/result.test @@ -138,11 +138,11 @@ test result-6.3 {Bug 2383005} { test result-6.4 {non-list -errorstack} { catch {return -code error -errorstack {{}a} eek} m o list $m [dict get $o -errorcode] [dict get $o -errorstack] -} {{bad -errorstack value: expected a list but got "{}a"} {TCL RESULT NONLIST_ERRORSTACK} {UP 1}} +} {{bad -errorstack value: expected a list but got "{}a"} {TCL RESULT NONLIST_ERRORSTACK} {UP 3}} test result-6.5 {odd-sized-list -errorstack} { catch {return -code error -errorstack a eek} m o list $m [dict get $o -errorcode] [dict get $o -errorstack] -} {{forbidden odd-sized list for -errorstack: "a"} {TCL RESULT ODDSIZEDLIST_ERRORSTACK} {UP 1}} +} {{forbidden odd-sized list for -errorstack: "a"} {TCL RESULT ODDSIZEDLIST_ERRORSTACK} {UP 3}} # cleanup cleanupTests return -- cgit v0.12 From 8a1035cf834be525e07450a0bb1b684c1a4936c8 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 31 May 2010 23:00:45 +0000 Subject: ChangeLog typo --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 429bc35..2d030c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2010-06-101 Alexandre Ferrieux - * generic/tclNamesp.c: Fix computation of [uplevel] offsets in TIP 341. + * generic/tclNamesp.c: Fix computation of [uplevel] offsets in TIP 348. * tests/error.test: Only depend on callerPtr chaining now. * tests/result.test: Needed for upcoming coro patch. -- cgit v0.12 From 112a13277f76d6becc3d78934caae69bf2e63f9f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 2 Jun 2010 08:22:15 +0000 Subject: remove some "BUILD_tcloo" leftovers --- ChangeLog | 8 +++++++- generic/tclOO.h | 9 +-------- win/makefile.bc | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d030c4..6054eca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2010-06-101 Alexandre Ferrieux +2010-05-31 Jan Nijtmans + + * generic/tclOO.h BUILD_tcloo is never defined (leftover) + * win/makefile.bc Don't set BUILD_tcloo (leftover) + See also entry below: 2008-06-01 Joe Mistachkin + +2010-06-01 Alexandre Ferrieux * generic/tclNamesp.c: Fix computation of [uplevel] offsets in TIP 348. * tests/error.test: Only depend on callerPtr chaining now. diff --git a/generic/tclOO.h b/generic/tclOO.h index d97ec47..6dc0feb 100644 --- a/generic/tclOO.h +++ b/generic/tclOO.h @@ -9,20 +9,13 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOO.h,v 1.10 2010/03/05 15:32:16 dkf Exp $ + * RCS: @(#) $Id: tclOO.h,v 1.11 2010/06/02 08:22:15 nijtmans Exp $ */ #ifndef TCLOO_H_INCLUDED #define TCLOO_H_INCLUDED #include "tcl.h" -#if defined(BUILD_tcloo) -# define TCLOOAPI DLLEXPORT -# undef USE_TCLOO_STUBS -#else -# define TCLOOAPI DLLIMPORT -#endif - /* * Be careful when it comes to versioning; need to make sure that the * standalone TclOO version matches. Also make sure that this matches the diff --git a/win/makefile.bc b/win/makefile.bc index e2e8a00..c339527 100644 --- a/win/makefile.bc +++ b/win/makefile.bc @@ -574,7 +574,7 @@ $(GENERICDIR)\regguts.h: $(GENERICDIR)\regcustom.h $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< {$(GENERICDIR)}.c{$(TMPDIR)}.obj: - $(cc32) -DBUILD_tcl -DBUILD_tcloo $(TCL_CFLAGS) -o$@ $< + $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< {$(ROOT)\compat}.c{$(TMPDIR)}.obj: $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< -- cgit v0.12 From 862cbfbc4c58e28e598535335bad2514e5bc835f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 2 Jun 2010 08:22:56 +0000 Subject: remove some "BUILD_tcloo" leftovers --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6054eca..05a67d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2010-05-31 Jan Nijtmans +2010-06-02 Jan Nijtmans * generic/tclOO.h BUILD_tcloo is never defined (leftover) * win/makefile.bc Don't set BUILD_tcloo (leftover) -- cgit v0.12 From 5c5e3f51ea23ae06e71dd6b272376ed8a833aa84 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Wed, 2 Jun 2010 23:36:23 +0000 Subject: Safer (and faster) computation of [uplevel] offsets in TIP 348. Toplevel offsets no longer overestimated. --- ChangeLog | 6 ++++++ generic/tclNamesp.c | 17 +++++++---------- tests/error.test | 8 ++++---- tests/result.test | 4 ++-- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05a67d4..bdf410e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-06-03 Alexandre Ferrieux + + * generic/tclNamesp.c: Safer (and faster) computation of [uplevel] + * tests/error.test: offsets in TIP 348. Toplevel offsets no longer + * tests/result.test: overestimated. + 2010-06-02 Jan Nijtmans * generic/tclOO.h BUILD_tcloo is never defined (leftover) diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index bf91bc7..7422125 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.206 2010/05/31 22:58:56 ferrieux Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.207 2010/06/02 23:36:23 ferrieux Exp $ */ #include "tclInt.h" @@ -4954,22 +4954,19 @@ Tcl_LogCommandInfo( Tcl_ListObjReplace(interp, iPtr->errorStack, 0, len, 0, NULL); } - if (iPtr->varFramePtr != iPtr->framePtr) { + if (!iPtr->framePtr->objc) { + /* special frame, nothing to report */ + } else if (iPtr->varFramePtr != iPtr->framePtr) { /* uplevel case, [lappend errorstack UP $relativelevel] */ - struct CallFrame *frame; - int n; - for (n=0, frame=iPtr->framePtr; - (frame && (frame != iPtr->varFramePtr)); - n++, frame=frame->callerPtr); Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->upLiteral); - Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewIntObj(n)); + Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewIntObj(iPtr->framePtr->level - iPtr->varFramePtr->level)); } else if (iPtr->framePtr != iPtr->rootFramePtr) { /* normal case, [lappend errorstack CALL [info level 0]] */ Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->callLiteral); Tcl_ListObjAppendElement(NULL, iPtr->errorStack, - Tcl_NewListObj(iPtr->varFramePtr->objc, - iPtr->varFramePtr->objv)); + Tcl_NewListObj(iPtr->framePtr->objc, + iPtr->framePtr->objv)); } } diff --git a/tests/error.test b/tests/error.test index 515d064..e30fd50 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.32 2010/05/31 22:58:56 ferrieux Exp $ +# RCS: @(#) $Id: error.test,v 1.33 2010/06/02 23:36:26 ferrieux Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -174,13 +174,13 @@ test error-4.6 {errorstack via info } -body { proc g x {error G:$x} catch {f 12} info errorstack -} -match glob -result {CALL {g 1212} CALL {f 12} UP 3} +} -match glob -result {CALL {g 1212} CALL {f 12} UP 1} test error-4.7 {errorstack via options dict } -body { proc f x {g $x$x} proc g x {error G:$x} catch {f 12} m d dict get $d -errorstack -} -match glob -result {CALL {g 1212} CALL {f 12} UP 3} +} -match glob -result {CALL {g 1212} CALL {f 12} UP 1} # Errors in error command itself @@ -244,7 +244,7 @@ test error-6.10 {catch must reset errorstack} -body { catch {f 13} set e2 [info errorstack] list $e1 $e2 -} -match glob -result {{CALL {g 1212} CALL {f 12} UP 3} {CALL {g 1313} CALL {f 13} UP 3}} +} -match glob -result {{CALL {g 1212} CALL {f 12} UP 1} {CALL {g 1313} CALL {f 13} UP 1}} test error-7.1 {Bug 1397843} -body { variable cmds diff --git a/tests/result.test b/tests/result.test index a610343..8bde7ef 100644 --- a/tests/result.test +++ b/tests/result.test @@ -138,11 +138,11 @@ test result-6.3 {Bug 2383005} { test result-6.4 {non-list -errorstack} { catch {return -code error -errorstack {{}a} eek} m o list $m [dict get $o -errorcode] [dict get $o -errorstack] -} {{bad -errorstack value: expected a list but got "{}a"} {TCL RESULT NONLIST_ERRORSTACK} {UP 3}} +} {{bad -errorstack value: expected a list but got "{}a"} {TCL RESULT NONLIST_ERRORSTACK} {UP 1}} test result-6.5 {odd-sized-list -errorstack} { catch {return -code error -errorstack a eek} m o list $m [dict get $o -errorcode] [dict get $o -errorstack] -} {{forbidden odd-sized list for -errorstack: "a"} {TCL RESULT ODDSIZEDLIST_ERRORSTACK} {UP 3}} +} {{forbidden odd-sized list for -errorstack: "a"} {TCL RESULT ODDSIZEDLIST_ERRORSTACK} {UP 1}} # cleanup cleanupTests return -- cgit v0.12 From 84f4fa52310247fb505be4eed77e19e48be226a0 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 5 Jun 2010 16:24:26 +0000 Subject: * generic/tclBasic.c: Fix for #3008307: make callerPtr chains * generic/tclExecute.c: be traversable accross coro boundaries. Add the special coroutine CallFrame (partially reverting commit of 2009-12-10), as it is needed for coroutines that do not push a CF - eg, those with [eval] as command. Thanks to Colin McCormack (coldstore) and Alexandre Ferrieux for the hard work on this. --- ChangeLog | 10 ++++++++++ generic/tclBasic.c | 37 +++++++++++++++++++++++++++---------- generic/tclExecute.c | 4 +--- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdf410e..abd20da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-06-05 Miguel Sofer + + * generic/tclBasic.c: Fix for #3008307: make callerPtr chains + * generic/tclExecute.c: be traversable accross coro + boundaries. Add the special coroutine CallFrame (partially + reverting commit of 2009-12-10), as it is needed for coroutines + that do not push a CF - eg, those with [eval] as command. Thanks + to Colin McCormack (coldstore) and Alexandre Ferrieux for the + hard work on this. + 2010-06-03 Alexandre Ferrieux * generic/tclNamesp.c: Safer (and faster) computation of [uplevel] diff --git a/generic/tclBasic.c b/generic/tclBasic.c index a7dce89..6f695af 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.456 2010/05/03 14:36:41 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.457 2010/06/05 16:24:26 msofer Exp $ */ #include "tclInt.h" @@ -8710,6 +8710,7 @@ NRCoroutineExitCallback( TclCleanupCommandMacro(cmdPtr); corPtr->eePtr->corPtr = NULL; + TclPopStackFrame(interp); TclDeleteExecEnv(corPtr->eePtr); corPtr->eePtr = NULL; @@ -8790,6 +8791,7 @@ NRInterpCoroutine( */ SAVE_CONTEXT(corPtr->caller); + corPtr->base.framePtr->callerPtr = iPtr->framePtr; RESTORE_CONTEXT(corPtr->running); corPtr->auxNumLevels = iPtr->numLevels; iPtr->numLevels += nestNumLevels; @@ -8819,6 +8821,8 @@ TclNRCoroutineObjCmd( const char *procName; Namespace *nsPtr, *altNsPtr, *cxtNsPtr; Tcl_DString ds; + Tcl_CallFrame *framePtr; + if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "name cmd ?arg ...?"); @@ -8922,11 +8926,31 @@ TclNRCoroutineObjCmd( } /* + * Create the coro's execEnv and switch to it so that any CallFrames or + * callbacks refer to the new execEnv's stack. + */ + + corPtr->eePtr = TclCreateExecEnv(interp, CORO_STACK_INITIAL_SIZE); + corPtr->callerEEPtr = iPtr->execEnvPtr; + corPtr->eePtr->corPtr = corPtr; + iPtr->execEnvPtr = corPtr->eePtr; + + /* push a base call frame; save the current namespace to do a correct + * command lookup. + */ + + nsPtr = iPtr->varFramePtr->nsPtr; + TclPushStackFrame(interp, &framePtr, + (Tcl_Namespace *) iPtr->globalNsPtr, 0); + iPtr->varFramePtr = iPtr->rootFramePtr; + + /* * Save the base context. The base cmdFramePtr is unknown at this time: it * will be allocated in the Tcl stack. So signal TEBC that it has to * initialize the base cmdFramePtr by setting it to NULL. */ + SAVE_CONTEXT(corPtr->base); corPtr->base.cmdFramePtr = NULL; corPtr->running = NULL_CONTEXT; corPtr->stackLevel = NULL; @@ -8944,20 +8968,13 @@ TclNRCoroutineObjCmd( cmdObjPtr->typePtr = NULL; /* - * Create the coro's execEnv and switch to it so that any CallFrames or - * callbacks refer to the new execEnv's stack. Add the exit callback, then - * the callback to eval the coro body. + * Add the exit callback, then the callback to eval the coro body */ - corPtr->eePtr = TclCreateExecEnv(interp, CORO_STACK_INITIAL_SIZE); - corPtr->callerEEPtr = iPtr->execEnvPtr; - corPtr->eePtr->corPtr = corPtr; - iPtr->execEnvPtr = corPtr->eePtr; - TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL, NULL, NULL); iPtr->evalFlags |= TCL_EVAL_REDIRECT; - iPtr->lookupNsPtr = iPtr->varFramePtr->nsPtr; + iPtr->lookupNsPtr = nsPtr; TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0); return TCL_OK; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index aae542a..934a9fb 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.484 2010/05/31 08:54:15 nijtmans Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.485 2010/06/05 16:24:26 msofer Exp $ */ #include "tclInt.h" @@ -2084,13 +2084,11 @@ TclExecuteByteCode( * - base.cmdFramePtr not set * - need to monkey-patch the BP chain * - set the running level for the coroutine - * - insure that the coro runs in #0 */ corPtr->base.cmdFramePtr = bcFramePtr; corPtr->callerBPPtr = &BP->prevBottomPtr; corPtr->stackLevel = &TAUX; - iPtr->varFramePtr = iPtr->rootFramePtr; } if (iPtr->execEnvPtr->rewind) { -- cgit v0.12 From 33b3f713338afde574fa54a15ce8e33f8d628c7c Mon Sep 17 00:00:00 2001 From: ferrieux Date: Mon, 7 Jun 2010 21:24:59 +0000 Subject: Ensure proper reset of [info errorstack] even when compiling constant expr's with errors. --- ChangeLog | 5 +++ generic/tclExecute.c | 10 +++--- generic/tclNamesp.c | 96 +++++++++++++++++++++++++++------------------------- 3 files changed, 58 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index abd20da..ef00f24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-06-07 Alexandre Ferrieux + + * generic/tclExecute.c: Ensure proper reset of [info errorstack] even + * generic/tclNamesp.c: when compiling constant expr's with errors. + 2010-06-05 Miguel Sofer * generic/tclBasic.c: Fix for #3008307: make callerPtr chains diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 934a9fb..a738065 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.485 2010/06/05 16:24:26 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.486 2010/06/07 21:24:59 ferrieux Exp $ */ #include "tclInt.h" @@ -6419,11 +6419,9 @@ TclExecuteByteCode( } if ((TRESULT == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { bytes = GetSrcInfoForPc(pc, codePtr, &length); - if (bytes != NULL) { - DECACHE_STACK_INFO(); - Tcl_LogCommandInfo(interp, codePtr->source, bytes, length); - CACHE_STACK_INFO(); - } + DECACHE_STACK_INFO(); + Tcl_LogCommandInfo(interp, codePtr->source, bytes, bytes ? length : 0); + CACHE_STACK_INFO(); } iPtr->flags &= ~ERR_ALREADY_LOGGED; diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 7422125..e09b52c 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.207 2010/06/02 23:36:23 ferrieux Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.208 2010/06/07 21:25:00 ferrieux Exp $ */ #include "tclInt.h" @@ -4885,52 +4885,54 @@ Tcl_LogCommandInfo( return; } - /* - * Compute the line number where the error occurred. - */ - - iPtr->errorLine = 1; - for (p = script; p != command; p++) { - if (*p == '\n') { - iPtr->errorLine++; - } - } - - if (length < 0) { - length = strlen(command); - } - overflow = (length > limit); - Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n %s\n\"%.*s%s\"", ((iPtr->errorInfo == NULL) - ? "while executing" : "invoked from within"), - (overflow ? limit : length), command, (overflow ? "..." : ""))); - - varPtr = TclObjLookupVarEx(interp, iPtr->eiVar, NULL, TCL_GLOBAL_ONLY, - NULL, 0, 0, &arrayPtr); - if ((varPtr == NULL) || !TclIsVarTraced(varPtr)) { - /* - * Should not happen. - */ - - return; - } else { - Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&iPtr->varTraces, - (char *) varPtr); - VarTrace *tracePtr = Tcl_GetHashValue(hPtr); - - if (tracePtr->traceProc != EstablishErrorInfoTraces) { - /* - * The most recent trace set on ::errorInfo is not the one the - * core itself puts on last. This means some other code is tracing - * the variable, and the additional trace(s) might be write traces - * that expect the timing of writes to ::errorInfo that existed - * Tcl releases before 8.5. To satisfy that compatibility need, we - * write the current -errorinfo value to the ::errorInfo variable. - */ - - Tcl_ObjSetVar2(interp, iPtr->eiVar, NULL, iPtr->errorInfo, - TCL_GLOBAL_ONLY); - } + if (command != NULL) { + /* + * Compute the line number where the error occurred. + */ + + iPtr->errorLine = 1; + for (p = script; p != command; p++) { + if (*p == '\n') { + iPtr->errorLine++; + } + } + + if (length < 0) { + length = strlen(command); + } + overflow = (length > limit); + Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( + "\n %s\n\"%.*s%s\"", ((iPtr->errorInfo == NULL) + ? "while executing" : "invoked from within"), + (overflow ? limit : length), command, (overflow ? "..." : ""))); + + varPtr = TclObjLookupVarEx(interp, iPtr->eiVar, NULL, TCL_GLOBAL_ONLY, + NULL, 0, 0, &arrayPtr); + if ((varPtr == NULL) || !TclIsVarTraced(varPtr)) { + /* + * Should not happen. + */ + + return; + } else { + Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&iPtr->varTraces, + (char *) varPtr); + VarTrace *tracePtr = Tcl_GetHashValue(hPtr); + + if (tracePtr->traceProc != EstablishErrorInfoTraces) { + /* + * The most recent trace set on ::errorInfo is not the one the + * core itself puts on last. This means some other code is tracing + * the variable, and the additional trace(s) might be write traces + * that expect the timing of writes to ::errorInfo that existed + * Tcl releases before 8.5. To satisfy that compatibility need, we + * write the current -errorinfo value to the ::errorInfo variable. + */ + + Tcl_ObjSetVar2(interp, iPtr->eiVar, NULL, iPtr->errorInfo, + TCL_GLOBAL_ONLY); + } + } } /* -- cgit v0.12 From 448358d7c20e186a62a2abcb7f32cc112205d142 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 8 Jun 2010 12:54:38 +0000 Subject: whitespace --- generic/tclNamesp.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index e09b52c..12fb46e 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.208 2010/06/07 21:25:00 ferrieux Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.209 2010/06/08 12:54:38 dgp Exp $ */ #include "tclInt.h" @@ -4902,12 +4902,13 @@ Tcl_LogCommandInfo( } overflow = (length > limit); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( - "\n %s\n\"%.*s%s\"", ((iPtr->errorInfo == NULL) - ? "while executing" : "invoked from within"), - (overflow ? limit : length), command, (overflow ? "..." : ""))); + "\n %s\n\"%.*s%s\"", ((iPtr->errorInfo == NULL) + ? "while executing" : "invoked from within"), + (overflow ? limit : length), command, + (overflow ? "..." : ""))); varPtr = TclObjLookupVarEx(interp, iPtr->eiVar, NULL, TCL_GLOBAL_ONLY, - NULL, 0, 0, &arrayPtr); + NULL, 0, 0, &arrayPtr); if ((varPtr == NULL) || !TclIsVarTraced(varPtr)) { /* * Should not happen. @@ -4915,22 +4916,23 @@ Tcl_LogCommandInfo( return; } else { - Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&iPtr->varTraces, - (char *) varPtr); + Tcl_HashEntry *hPtr + = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr); VarTrace *tracePtr = Tcl_GetHashValue(hPtr); if (tracePtr->traceProc != EstablishErrorInfoTraces) { /* * The most recent trace set on ::errorInfo is not the one the - * core itself puts on last. This means some other code is tracing - * the variable, and the additional trace(s) might be write traces - * that expect the timing of writes to ::errorInfo that existed - * Tcl releases before 8.5. To satisfy that compatibility need, we - * write the current -errorinfo value to the ::errorInfo variable. + * core itself puts on last. This means some other code is + * tracing the variable, and the additional trace(s) might be + * write traces that expect the timing of writes to + * ::errorInfo that existed Tcl releases before 8.5. To + * satisfy that compatibility need, we write the current + * -errorinfo value to the ::errorInfo variable. */ Tcl_ObjSetVar2(interp, iPtr->eiVar, NULL, iPtr->errorInfo, - TCL_GLOBAL_ONLY); + TCL_GLOBAL_ONLY); } } } @@ -4962,13 +4964,13 @@ Tcl_LogCommandInfo( /* uplevel case, [lappend errorstack UP $relativelevel] */ Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->upLiteral); - Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewIntObj(iPtr->framePtr->level - iPtr->varFramePtr->level)); + Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewIntObj( + iPtr->framePtr->level - iPtr->varFramePtr->level)); } else if (iPtr->framePtr != iPtr->rootFramePtr) { /* normal case, [lappend errorstack CALL [info level 0]] */ Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->callLiteral); - Tcl_ListObjAppendElement(NULL, iPtr->errorStack, - Tcl_NewListObj(iPtr->framePtr->objc, - iPtr->framePtr->objv)); + Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewListObj( + iPtr->framePtr->objc, iPtr->framePtr->objv)); } } -- cgit v0.12 From 47d68f982cf946a1cab3f9e7c45be564f63a9471 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 9 Jun 2010 13:51:51 +0000 Subject: tsdPerf.c: Fix export of symbol Tsdperf_Init, when using -fvisibility=hidden. Make two functions static, eliminate some unnecessary type casts. configure(.in)?: Update to Tcl 8.6 --- ChangeLog | 9 + tools/.cvsignore | 7 + tools/configure | 2828 ++++++++++++++++++++++++++++++++-------------------- tools/configure.in | 6 +- tools/tsdPerf.c | 20 +- 5 files changed, 1802 insertions(+), 1068 deletions(-) create mode 100644 tools/.cvsignore diff --git a/ChangeLog b/ChangeLog index ef00f24..456b24d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-06-09 Jan Nijtmans + + * tools/tsdPerf.c: Fix export of symbol Tsdperf_Init, when + using -fvisibility=hidden. Make two functions static, eliminate + some unnecessary type casts. + * tools/configure.in: Update to Tcl 8.6 + * tools/configure: (regenerated) + * tools/.cvsignore new file + 2010-06-07 Alexandre Ferrieux * generic/tclExecute.c: Ensure proper reset of [info errorstack] even diff --git a/tools/.cvsignore b/tools/.cvsignore new file mode 100644 index 0000000..83004c8 --- /dev/null +++ b/tools/.cvsignore @@ -0,0 +1,7 @@ +autom4te.cache +config.status +Makefile +man2tcl +*.hpj +*.rtf +*.cnt diff --git a/tools/configure b/tools/configure index 29b0eb5..3221c85 100755 --- a/tools/configure +++ b/tools/configure @@ -1,81 +1,414 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.65. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' else - as_unset=false + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_unset $as_var + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi -done + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` - -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -83,185 +416,134 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# CDPATH. -$as_unset CDPATH +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= @@ -269,14 +551,70 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="man2tcl.c" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_WIN_VERSION CC TCL_VERSION TCL_PATCH_LEVEL TCL_SRC_DIR TCL_BIN_DIR LIBOBJS LTLIBOBJS' +ac_subst_vars='LTLIBOBJS +LIBOBJS +TCL_BIN_DIR +TCL_SRC_DIR +TCL_PATCH_LEVEL +TCL_VERSION +CC +TCL_WIN_VERSION +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_tcl +' + ac_precious_vars='build_alias +host_alias +target_alias' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -299,34 +637,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -348,33 +700,59 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -401,6 +779,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -425,13 +809,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -496,6 +883,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -546,26 +943,36 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -585,26 +992,25 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -613,31 +1019,36 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -651,7 +1062,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -664,54 +1075,72 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -740,9 +1169,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -757,18 +1183,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -784,87 +1217,93 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl=DIR use Tcl $DEF_VER binaries from DIR +Report bugs to the package provider. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.65 -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -883,7 +1322,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -895,8 +1334,9 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS } >&5 @@ -918,7 +1358,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -929,43 +1368,41 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. + ac_must_keep_next=false # Got value, back to normal. else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -978,20 +1415,35 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1002,22 +1454,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1029,26 +1487,26 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core core.* *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. @@ -1056,112 +1514,128 @@ cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1171,24 +1645,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - -# RCS: @(#) $Id: configure,v 1.4 2003/03/13 10:39:57 mdejong Exp $ +# RCS: @(#) $Id: configure,v 1.5 2010/06/09 13:51:51 nijtmans Exp $ # Recover information that Tcl computed with its configure script. @@ -1197,25 +1654,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # not, assume that its top-level directory is a sibling of ours. #-------------------------------------------------------------------- -DEF_VER=8.5 +DEF_VER=8.6 -# Check whether --with-tcl or --without-tcl was given. -if test "${with_tcl+set}" = set; then - withval="$with_tcl" - TCL_BIN_DIR=$withval +# Check whether --with-tcl was given. +if test "${with_tcl+set}" = set; then : + withval=$with_tcl; TCL_BIN_DIR=$withval else TCL_BIN_DIR=`cd ../../tcl$DEF_VER$TCL_PATCH_LEVEL/unix; pwd` -fi; +fi + if test ! -d $TCL_BIN_DIR; then - { { echo "$as_me:$LINENO: error: Tcl directory $TCL_BIN_DIR doesn't exist" >&5 -echo "$as_me: error: Tcl directory $TCL_BIN_DIR doesn't exist" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Tcl directory $TCL_BIN_DIR doesn't exist" "$LINENO" 5 fi if test ! -f $TCL_BIN_DIR/tclConfig.sh; then - { { echo "$as_me:$LINENO: error: There's no tclConfig.sh in $TCL_BIN_DIR; perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" >&5 -echo "$as_me: error: There's no tclConfig.sh in $TCL_BIN_DIR; perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "There's no tclConfig.sh in $TCL_BIN_DIR; perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" "$LINENO" 5 fi . $TCL_BIN_DIR/tclConfig.sh @@ -1229,7 +1682,8 @@ CC=$TCL_CC - ac_config_files="$ac_config_files Makefile tcl.hpj" +ac_config_files="$ac_config_files Makefile tcl.hpj" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -1248,39 +1702,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -1289,63 +1763,54 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -1354,11 +1819,13 @@ LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -1368,80 +1835,252 @@ cat >$CONFIG_STATUS <<_ACEOF debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' else - as_unset=false + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi -done + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` - -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -1449,180 +2088,145 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else + test -d ./-p && rmdir ./-p as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -1630,125 +2234,110 @@ generated by GNU Autoconf 2.57. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] + --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files -Report bugs to ." -_ACEOF +Report bugs to the package provider." -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.57, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; esac shift @@ -1762,31 +2351,45 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "tcl.hpj" ) CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tcl.hpj") CONFIG_FILES="$CONFIG_FILES tcl.hpj" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -1796,290 +2399,403 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# CONFIG_FILES section. -# +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@TCL_WIN_VERSION@,$TCL_WIN_VERSION,;t t -s,@CC@,$CC,;t t -s,@TCL_VERSION@,$TCL_VERSION,;t t -s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t -s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t -s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + case $ac_mode in + :F) + # + # CONFIG_FILE + # - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -{ (exit 0); exit 0; } + esac + +done # for ac_tag + + +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -2099,6 +2815,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/tools/configure.in b/tools/configure.in index ffae2ba..7585c64 100644 --- a/tools/configure.in +++ b/tools/configure.in @@ -2,8 +2,8 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run to configure the dnl Makefile in this directory. AC_INIT(man2tcl.c) -AC_PREREQ(2.57) -# RCS: @(#) $Id: configure.in,v 1.11 2003/03/13 10:39:57 mdejong Exp $ +AC_PREREQ(2.59) +# RCS: @(#) $Id: configure.in,v 1.12 2010/06/09 13:51:51 nijtmans Exp $ # Recover information that Tcl computed with its configure script. @@ -12,7 +12,7 @@ AC_PREREQ(2.57) # not, assume that its top-level directory is a sibling of ours. #-------------------------------------------------------------------- -DEF_VER=8.5 +DEF_VER=8.6 AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl $DEF_VER binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../tcl$DEF_VER$TCL_PATCH_LEVEL/unix; pwd`) if test ! -d $TCL_BIN_DIR; then diff --git a/tools/tsdPerf.c b/tools/tsdPerf.c index 9399b3b..40004b1 100644 --- a/tools/tsdPerf.c +++ b/tools/tsdPerf.c @@ -1,5 +1,7 @@ #include +extern DLLEXPORT Tcl_PackageInitProc Tsdperf_Init; + static Tcl_ThreadDataKey key; typedef struct { @@ -7,7 +9,7 @@ typedef struct { } TsdPerf; -int +static int tsdPerfSetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf)); int i; @@ -26,7 +28,8 @@ tsdPerfSetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const return TCL_OK; } -int tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { +static int +tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf)); @@ -35,19 +38,14 @@ int tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *co return TCL_OK; } - int -Tsdperf_Init (Tcl_Interp *interp) { - if (NULL == Tcl_InitStubs(interp, TCL_VERSION, 0)) { +Tsdperf_Init(Tcl_Interp *interp) { + if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { return TCL_ERROR; } - - Tcl_CreateObjCommand(interp, "tsdPerfSet", tsdPerfSetObjCmd, (ClientData)NULL, - (Tcl_CmdDeleteProc *)NULL); - Tcl_CreateObjCommand(interp, "tsdPerfGet", tsdPerfGetObjCmd, (ClientData)NULL, - (Tcl_CmdDeleteProc *)NULL); - + Tcl_CreateObjCommand(interp, "tsdPerfSet", tsdPerfSetObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "tsdPerfGet", tsdPerfGetObjCmd, NULL, NULL); return TCL_OK; } -- cgit v0.12 From 287867e4b0d766d1e514f94ed88ff084f3aa8e06 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Wed, 9 Jun 2010 20:11:34 +0000 Subject: * library/platform/platform.tcl: Added OSX Intel 64bit * library/platform/pkgIndex.tcl: Package updated to version 1.0.9. * unix/Makefile.in: * win/Makefile.in: --- ChangeLog | 7 +++++++ library/platform/pkgIndex.tcl | 2 +- library/platform/platform.tcl | 25 ++++++++++++++++++++++--- library/platform/shell.tcl | 7 +++++-- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 6 files changed, 41 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 456b24d..dc812ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-09 Andreas Kupries + + * library/platform/platform.tcl: Added OSX Intel 64bit + * library/platform/pkgIndex.tcl: Package updated to version 1.0.9. + * unix/Makefile.in: + * win/Makefile.in: + 2010-06-09 Jan Nijtmans * tools/tsdPerf.c: Fix export of symbol Tsdperf_Init, when diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 808f995..35da3b7 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.8 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.9 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 370c48a..572a8b4 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -281,6 +281,13 @@ proc ::platform::patterns {id} { macosx*-* { # 10.5+ if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} { + + switch -exact -- $cpu { + ix86 - + x86_64 { set alt i386-x86_64 } + default { set alt {} } + } + if {$v ne ""} { foreach {major minor} [split $v .] break @@ -289,22 +296,34 @@ proc ::platform::patterns {id} { for {set j $minor} {$j >= 5} {incr j -1} { lappend res macosx${major}.${j}-${cpu} lappend res macosx${major}.${j}-universal + if {$alt ne {}} { + lappend res macosx${major}.${j}-$alt + } } # Add unversioned patterns for 10.3/10.4 builds. lappend res macosx-${cpu} lappend res macosx-universal + if {$alt ne {}} { + lappend res macosx-$alt + } } else { lappend res macosx-universal + if {$alt ne {}} { + lappend res macosx-$alt + } } } else { lappend res macosx-universal } } - macosx-powerpc - - macosx-ix86 { + macosx-powerpc { lappend res macosx-universal } + macosx-x86_64 - + macosx-ix86 { + lappend res macosx-universal macosx-i386-x86_64 + } } lappend res tcl ; # Pure tcl packages are always compatible. return $res @@ -314,7 +333,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.8 +package provide platform 1.0.9 # ### ### ### ######### ######### ######### ## Demo application diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl index 407e639..e0a129a 100644 --- a/library/platform/shell.tcl +++ b/library/platform/shell.tcl @@ -1,3 +1,4 @@ + # -*- tcl -*- # ### ### ### ######### ######### ######### ## Overview @@ -104,8 +105,10 @@ proc ::platform::shell::LOCATE {bv ov} { # here. If the found package is wrapped we copy the code somewhere # where the spawned shell will be able to read it. - # Note: This code depends on the form of the 'provide' command - # generated by tm.tcl. Keep them in sync. See Bug 2255235. + # This code is brittle, it needs has to adapt to whatever changes + # are made to the TM code, i.e. the provide statement generated by + # tm.tcl + set pl [package ifneeded platform [package require platform]] set base [lindex $pl end] diff --git a/unix/Makefile.in b/unix/Makefile.in index cf34a71..1360908 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.299 2010/05/07 20:16:50 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.300 2010/06/09 20:11:34 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -856,8 +856,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.8 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.8.tm; + @echo "Installing package platform 1.0.9 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.9.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index 9023bdf..7df3357 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.179 2010/05/07 20:16:50 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.180 2010/06/09 20:11:34 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -675,8 +675,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.3.tm; @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.8 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.8.tm; + @echo "Installing package platform 1.0.9 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.9.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12 From 6c9b8bdd74ad3b776f15340267d4173afb1985af Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 13 Jun 2010 10:24:45 +0000 Subject: * tools/tcltk-man2html.tcl: [Bug 3015327]: Add hack to stop Itcl C docs from interfering with Tcl docs during HTML generation. This is a band-aid since it just prevents the generation of the HTML version of the Itcl C docs (since they're not installed during 'make install') rather than improving the code to not have problems with the clash between two Object.3 files. --- ChangeLog | 44 ++++++++++++++++++++++++++------------------ tools/tcltk-man2html.tcl | 6 +++--- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc812ac..b3866dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-06-13 Donal K. Fellows + + * tools/tcltk-man2html.tcl: [Bug 3015327]: Add hack to stop Itcl C + docs from interfering with Tcl docs during HTML generation. This is a + band-aid since it just prevents the generation of the HTML version of + the Itcl C docs (since they're not installed during 'make install') + rather than improving the code to not have problems with the clash + between two Object.3 files. + 2010-06-09 Andreas Kupries * library/platform/platform.tcl: Added OSX Intel 64bit @@ -7,9 +16,9 @@ 2010-06-09 Jan Nijtmans - * tools/tsdPerf.c: Fix export of symbol Tsdperf_Init, when - using -fvisibility=hidden. Make two functions static, eliminate - some unnecessary type casts. + * tools/tsdPerf.c: Fix export of symbol Tsdperf_Init, when using + -fvisibility=hidden. Make two functions static, eliminate some + unnecessary type casts. * tools/configure.in: Update to Tcl 8.6 * tools/configure: (regenerated) * tools/.cvsignore new file @@ -21,13 +30,12 @@ 2010-06-05 Miguel Sofer - * generic/tclBasic.c: Fix for #3008307: make callerPtr chains - * generic/tclExecute.c: be traversable accross coro - boundaries. Add the special coroutine CallFrame (partially - reverting commit of 2009-12-10), as it is needed for coroutines - that do not push a CF - eg, those with [eval] as command. Thanks - to Colin McCormack (coldstore) and Alexandre Ferrieux for the - hard work on this. + * generic/tclBasic.c: [Bug 3008307]: make callerPtr chains be + * generic/tclExecute.c: traversable accross coro boundaries. Add the + special coroutine CallFrame (partially reverting commit of + 2009-12-10), as it is needed for coroutines that do not push a CF, eg, + those with [eval] as command. Thanks to Colin McCormack (coldstore) + and Alexandre Ferrieux for the hard work on this. 2010-06-03 Alexandre Ferrieux @@ -37,26 +45,26 @@ 2010-06-02 Jan Nijtmans - * generic/tclOO.h BUILD_tcloo is never defined (leftover) - * win/makefile.bc Don't set BUILD_tcloo (leftover) + * generic/tclOO.h: BUILD_tcloo is never defined (leftover) + * win/makefile.bc: Don't set BUILD_tcloo (leftover) See also entry below: 2008-06-01 Joe Mistachkin 2010-06-01 Alexandre Ferrieux - * generic/tclNamesp.c: Fix computation of [uplevel] offsets in TIP 348. + * generic/tclNamesp.c: Fix computation of [uplevel] offsets in TIP 348 * tests/error.test: Only depend on callerPtr chaining now. * tests/result.test: Needed for upcoming coro patch. 2010-05-31 Jan Nijtmans - * generic/tclVar.c Eliminate some casts to (Tcl_HashTable *) - * generic/tclExecute.c - * tests/fileSystem.test Fix filesystem-5.1 test failure on CYGWIN + * generic/tclVar.c: Eliminate some casts to (Tcl_HashTable *) + * generic/tclExecute.c: + * tests/fileSystem.test: Fix filesystem-5.1 test failure on CYGWIN 2010-05-28 Jan Nijtmans - * generic/tclInt.h: [tcl-Patches-3008541] order of TIP #348 fields - in Interp structure + * generic/tclInt.h: [Patch 3008541]: Order of TIP #348 fields in + Interp structure 2010-05-28 Donal K. Fellows diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index fd8a258..b497afb 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,9 +18,9 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.46 2010/02/10 23:17:07 dkf Exp $ +# CVS: $Id: tcltk-man2html.tcl,v 1.47 2010/06/13 10:24:45 dkf Exp $ -regexp {\d+\.\d+} {$Revision: 1.46 $} ::Version +regexp {\d+\.\d+} {$Revision: 1.47 $} ::Version set ::CSSFILE "docs.css" ## @@ -918,7 +918,7 @@ try { "The C functions which a Tcl extended C program may use."] \ [plus-base $build_tk $tkdir/doc/*.3 {Tk Library} TkLib \ "The additional C functions which a Tk extended C program may use."] \ - {*}[plus-pkgs 3 {*}$packageDirNameMap] + {*}[plus-pkgs 3 {*}[dict remove $packageDirNameMap itcl]] } on error {msg opts} { # On failure make sure we show what went wrong. We're not supposed # to get here though; it represents a bug in the script. -- cgit v0.12 From b76b06298684d10212e10d970bb2d5ee1ff29b45 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 13 Jun 2010 22:19:53 +0000 Subject: * tools/tcltk-man2html.tcl (make-man-pages): [Bug 3015327]: Make the title of a manual page be stored relative to its resulting directory name as well as its source filename. This was caused by both Tcl and a contributed package ([incr Tcl]) defining an Object.3. Also corrected the joining of strings in titles to avoid extra braces. Note: This removes the previous hack and fixes things correctly. --- ChangeLog | 11 +++++------ tools/tcltk-man2html.tcl | 15 ++++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3866dd..525d59c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,10 @@ 2010-06-13 Donal K. Fellows - * tools/tcltk-man2html.tcl: [Bug 3015327]: Add hack to stop Itcl C - docs from interfering with Tcl docs during HTML generation. This is a - band-aid since it just prevents the generation of the HTML version of - the Itcl C docs (since they're not installed during 'make install') - rather than improving the code to not have problems with the clash - between two Object.3 files. + * tools/tcltk-man2html.tcl (make-man-pages): [Bug 3015327]: Make the + title of a manual page be stored relative to its resulting directory + name as well as its source filename. This was caused by both Tcl and a + contributed package ([incr Tcl]) defining an Object.3. Also corrected + the joining of strings in titles to avoid extra braces. 2010-06-09 Andreas Kupries diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index b497afb..aa1fabb 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -18,9 +18,9 @@ package require Tcl 8.6 # Copyright (c) 1995-1997 Roger E. Critchlow Jr # Copyright (c) 2004-2010 Donal K. Fellows # -# CVS: $Id: tcltk-man2html.tcl,v 1.47 2010/06/13 10:24:45 dkf Exp $ +# CVS: $Id: tcltk-man2html.tcl,v 1.48 2010/06/13 22:19:54 dkf Exp $ -regexp {\d+\.\d+} {$Revision: 1.47 $} ::Version +regexp {\d+\.\d+} {$Revision: 1.48 $} ::Version set ::CSSFILE "docs.css" ## @@ -541,10 +541,11 @@ proc make-man-pages {html args} { open-text set haserror 0 if {[next-op-is .HS rest]} { - set manual($manual(name)-title) \ - "[lrange $rest 1 end] [lindex $rest 0] manual page" + set manual($manual(wing-file)-$manual(name)-title) \ + "[join [lrange $rest 1 end] { }] [lindex $rest 0] manual page" } elseif {[next-op-is .TH rest]} { - set manual($manual(name)-title) "[lindex $rest 0] manual page - [lrange $rest 4 end]" + set manual($manual(wing-file)-$manual(name)-title) \ + "[lindex $rest 0] manual page - [join [lrange $rest 4 end] { }]" } else { set haserror 1 if {!$verbose} { @@ -712,7 +713,7 @@ proc make-man-pages {html args} { puts -nonewline stderr . } set outfd [open $html/$manual(wing-file)/$manual(name).htm w] - puts $outfd [htmlhead "$manual($manual(name)-title)" \ + puts $outfd [htmlhead "$manual($manual(wing-file)-$manual(name)-title)" \ $manual(name) $manual(wing-file) "[indexfile]" \ $overall_title "../[indexfile]"] if {($ntext > 60) && ($ntoc > 32)} { @@ -918,7 +919,7 @@ try { "The C functions which a Tcl extended C program may use."] \ [plus-base $build_tk $tkdir/doc/*.3 {Tk Library} TkLib \ "The additional C functions which a Tk extended C program may use."] \ - {*}[plus-pkgs 3 {*}[dict remove $packageDirNameMap itcl]] + {*}[plus-pkgs 3 {*}$packageDirNameMap] } on error {msg opts} { # On failure make sure we show what went wrong. We're not supposed # to get here though; it represents a bug in the script. -- cgit v0.12 From ca1cacf50dec50820fccecc8e3dc43820e6f4f63 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 14 Jun 2010 12:58:11 +0000 Subject: Fix compilation of xttest with 8.6 changes tclPipe.c: Fix gcc warning (with -fstrict-aliasing=2) --- ChangeLog | 7 +++++++ generic/tclPipe.c | 19 ++++++++----------- unix/Makefile.in | 15 ++++++++------- unix/tclXtNotify.c | 31 +++++++++++++++++-------------- unix/tclXtTest.c | 16 +++++----------- 5 files changed, 45 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 525d59c..34e0752 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-14 Jan Nijtmans + + * unix/Makefile.in Fix compilation of xttest with 8.6 changes + * unix/tclXtNotify.c + * unix/tclXtTest.c + * generic/tclPipe.c Fix gcc warning (with -fstrict-aliasing=2) + 2010-06-13 Donal K. Fellows * tools/tcltk-man2html.tcl (make-man-pages): [Bug 3015327]: Make the diff --git a/generic/tclPipe.c b/generic/tclPipe.c index 37dd5b1..cbefbc1 100644 --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPipe.c,v 1.23 2010/02/24 10:45:04 dkf Exp $ + * RCS: @(#) $Id: tclPipe.c,v 1.24 2010/06/14 12:58:13 nijtmans Exp $ */ #include "tclInt.h" @@ -275,7 +275,7 @@ TclCleanupChildren( int result = TCL_OK; int i, abnormalExit, anyErrorInfo; Tcl_Pid pid; - WAIT_STATUS_TYPE waitStatus; + int waitStatus; const char *msg; unsigned long resolvedPid; @@ -288,7 +288,7 @@ TclCleanupChildren( */ resolvedPid = TclpGetPid(pidPtr[i]); - pid = Tcl_WaitPid(pidPtr[i], (int *) &waitStatus, 0); + pid = Tcl_WaitPid(pidPtr[i], &waitStatus, 0); if (pid == (Tcl_Pid) -1) { result = TCL_ERROR; if (interp != NULL) { @@ -323,8 +323,7 @@ TclCleanupChildren( sprintf(msg1, "%lu", resolvedPid); if (WIFEXITED(waitStatus)) { if (interp != NULL) { - sprintf(msg2, "%lu", - (unsigned long) WEXITSTATUS(waitStatus)); + sprintf(msg2, "%u", WEXITSTATUS(waitStatus)); Tcl_SetErrorCode(interp, "CHILDSTATUS", msg1, msg2, NULL); } abnormalExit = 1; @@ -332,16 +331,14 @@ TclCleanupChildren( const char *p; if (WIFSIGNALED(waitStatus)) { - p = Tcl_SignalMsg((int) (WTERMSIG(waitStatus))); + p = Tcl_SignalMsg(WTERMSIG(waitStatus)); Tcl_SetErrorCode(interp, "CHILDKILLED", msg1, - Tcl_SignalId((int) (WTERMSIG(waitStatus))), p, - NULL); + Tcl_SignalId(WTERMSIG(waitStatus)), p, NULL); Tcl_AppendResult(interp, "child killed: ", p, "\n", NULL); } else if (WIFSTOPPED(waitStatus)) { - p = Tcl_SignalMsg((int) (WSTOPSIG(waitStatus))); + p = Tcl_SignalMsg(WSTOPSIG(waitStatus)); Tcl_SetErrorCode(interp, "CHILDSUSP", msg1, - Tcl_SignalId((int) (WSTOPSIG(waitStatus))), p, - NULL); + Tcl_SignalId(WSTOPSIG(waitStatus)), p, NULL); Tcl_AppendResult(interp, "child suspended: ", p, "\n", NULL); } else { diff --git a/unix/Makefile.in b/unix/Makefile.in index 1360908..46633b5 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.300 2010/06/09 20:11:34 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.301 2010/06/14 12:58:12 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -625,7 +625,8 @@ tclLibObjs: objs: ${OBJS} ${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} \ + @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o ${TCL_EXE} # Must be empty so it doesn't conflict with rule for ${TCL_EXE} above @@ -677,7 +678,8 @@ ${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLT $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" tcltest-real: - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} \ + @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ ${CC_SEARCH_FLAGS} -o ${TCLTEST_EXE} # Note, in the targets below TCL_LIBRARY needs to be set or else "make test" @@ -1543,10 +1545,9 @@ $(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS) # notifier can modify them to suit their own installation. #-------------------------------------------------------------------------- -xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ - @DL_OBJS@ ${BUILD_DLTEST} - ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ - @DL_OBJS@ @TCL_BUILD_LIB_SPEC@ ${LIBS} \ +xttest: ${XTTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} + ${CC} ${CFLAGS} ${LDFLAGS} ${XTTEST_OBJS} \ + @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -L/usr/openwin/lib -lXt -o xttest tclXtNotify.o: $(UNIX_DIR)/tclXtNotify.c diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index c8c553d..ab82c58 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtNotify.c,v 1.11 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclXtNotify.c,v 1.12 2010/06/14 12:58:12 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -18,6 +18,9 @@ #include #include "tclInt.h" +#ifndef CONST86 +# define CONST86 +#endif /* * This structure is used to keep track of the notifier info for a a * registered file. @@ -79,22 +82,22 @@ static int initialized = 0; */ static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); -static void FileProc(caddr_t clientData, int *source, +static void FileProc(ClientData clientData, int *source, XtInputId *id); -void InitNotifier(void); static void NotifierExitHandler(ClientData clientData); -static void TimerProc(caddr_t clientData, XtIntervalId *id); +static void TimerProc(ClientData clientData, XtIntervalId *id); static void CreateFileHandler(int fd, int mask, Tcl_FileProc * proc, ClientData clientData); static void DeleteFileHandler(int fd); -static void SetTimer(Tcl_Time * timePtr); -static int WaitForEvent(Tcl_Time * timePtr); +static void SetTimer(CONST86 Tcl_Time * timePtr); +static int WaitForEvent(CONST86 Tcl_Time * timePtr); /* * Functions defined in this file for use by users of the Xt Notifier: */ -EXTERN XtAppContext TclSetAppContext(XtAppContext ctx); +MODULE_SCOPE void InitNotifier(void); +MODULE_SCOPE XtAppContext TclSetAppContext(XtAppContext ctx); /* *---------------------------------------------------------------------- @@ -264,7 +267,7 @@ NotifierExitHandler( static void SetTimer( - Tcl_Time *timePtr) /* Timeout value, may be NULL. */ + CONST86 Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { long timeout; @@ -303,7 +306,7 @@ SetTimer( static void TimerProc( - caddr_t data, /* Not used. */ + ClientData clientData, /* Not used. */ XtIntervalId *id) { if (*id != notifier.currentTimeout) { @@ -377,7 +380,7 @@ CreateFileHandler( if (mask & TCL_READABLE) { if (!(filePtr->mask & TCL_READABLE)) { filePtr->read = XtAppAddInput(notifier.appContext, fd, - XtInputReadMask, FileProc, filePtr); + INT2PTR(XtInputReadMask), FileProc, filePtr); } } else { if (filePtr->mask & TCL_READABLE) { @@ -387,7 +390,7 @@ CreateFileHandler( if (mask & TCL_WRITABLE) { if (!(filePtr->mask & TCL_WRITABLE)) { filePtr->write = XtAppAddInput(notifier.appContext, fd, - XtInputWriteMask, FileProc, filePtr); + INT2PTR(XtInputWriteMask), FileProc, filePtr); } } else { if (filePtr->mask & TCL_WRITABLE) { @@ -397,7 +400,7 @@ CreateFileHandler( if (mask & TCL_EXCEPTION) { if (!(filePtr->mask & TCL_EXCEPTION)) { filePtr->except = XtAppAddInput(notifier.appContext, fd, - XtInputExceptMask, FileProc, filePtr); + INT2PTR(XtInputExceptMask), FileProc, filePtr); } } else { if (filePtr->mask & TCL_EXCEPTION) { @@ -490,7 +493,7 @@ DeleteFileHandler( static void FileProc( - caddr_t clientData, + ClientData clientData, int *fd, XtInputId *id) { @@ -628,7 +631,7 @@ FileHandlerEventProc( static int WaitForEvent( - Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + CONST86 Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { int timeout; diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index d4bef9e..54bcbcf 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtTest.c,v 1.10 2010/02/25 22:20:10 nijtmans Exp $ + * RCS: @(#) $Id: tclXtTest.c,v 1.11 2010/06/14 12:58:11 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -19,19 +19,13 @@ static int TesteventloopCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char **argv); -extern void InitNotifier(void); - +extern DLLEXPORT Tcl_PackageInitProc Tclxttest_Init; /* - * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the - * Tcltest_Init declaration is in the source file itself, which is only - * accessed when we are building a library. + * Functions defined in tclXtNotify.c for use by users of the Xt Notifier: */ -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLEXPORT -EXTERN int Tclxttest_Init(Tcl_Interp *interp); - - +extern void InitNotifier(void); +extern XtAppContext TclSetAppContext(XtAppContext ctx); /* *---------------------------------------------------------------------- -- cgit v0.12 From e16e1505cda7b4046f3080614042121bf8ce222f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 14 Jun 2010 13:40:42 +0000 Subject: Fix compilation of xttest with 8.6 changes tclPipe.c: Fix gcc warning (with -fstrict-aliasing=2) --- unix/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 46633b5..a3d8f95 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.301 2010/06/14 12:58:12 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.302 2010/06/14 13:40:42 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -679,7 +679,7 @@ ${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLT tcltest-real: ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} \ - @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ + @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o ${TCLTEST_EXE} # Note, in the targets below TCL_LIBRARY needs to be set or else "make test" -- cgit v0.12 From 0e72c9c6656401b476b0cf11c125d5bff87f8b93 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 14 Jun 2010 13:48:25 +0000 Subject: Spacing and style fixes --- ChangeLog | 6 ++++++ library/auto.tcl | 16 ++++++++++------ library/history.tcl | 8 ++++---- library/init.tcl | 34 ++++++++++++++++++---------------- library/package.tcl | 36 ++++++++++++++++++------------------ library/safe.tcl | 20 ++++++++++++++------ library/tm.tcl | 6 +++--- 7 files changed, 73 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34e0752..f2139ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,12 @@ * unix/tclXtNotify.c * unix/tclXtTest.c * generic/tclPipe.c Fix gcc warning (with -fstrict-aliasing=2) + * library/auto.tcl Spacing and style fixes. + * library/history.tcl + * library/init.tcl + * library/package.tcl + * library/safe.tcl + * library/tm.tcl 2010-06-13 Donal K. Fellows diff --git a/library/auto.tcl b/library/auto.tcl index c69b24d..7b96840 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution of commands # and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.32 2009/11/19 11:59:53 dkf Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.33 2010/06/14 13:48:25 nijtmans Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -25,7 +25,9 @@ proc auto_reset {} { if {[array exists ::auto_index]} { foreach cmdName [array names ::auto_index] { set fqcn [namespace which $cmdName] - if {$fqcn eq ""} {continue} + if {$fqcn eq ""} { + continue + } rename $fqcn {} } } @@ -132,8 +134,10 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { } else { set norm [file normalize $i] } - if {[info exists seen($norm)]} { continue } - set seen($norm) "" + if {[info exists seen($norm)]} { + continue + } + set seen($norm) {} lappend uniqdirs $i } set dirs $uniqdirs @@ -202,7 +206,7 @@ proc auto_mkindex {dir args} { append index "# sets an element in the auto_index array, where the\n" append index "# element name is the name of a command and the value is\n" append index "# a script that loads the command.\n\n" - if {[llength $args] == 0} { + if {![llength $args]} { set args *.tcl } @@ -237,7 +241,7 @@ proc auto_mkindex_old {dir args} { append index "# sets an element in the auto_index array, where the\n" append index "# element name is the name of a command and the value is\n" append index "# a script that loads the command.\n\n" - if {[llength $args] == 0} { + if {![llength $args]} { set args *.tcl } foreach file [glob -- {*}$args] { diff --git a/library/history.tcl b/library/history.tcl index a1e2679..125c766 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -2,7 +2,7 @@ # # Implementation of the history command. # -# RCS: @(#) $Id: history.tcl,v 1.10 2009/11/19 11:59:54 dkf Exp $ +# RCS: @(#) $Id: history.tcl,v 1.11 2010/06/14 13:48:25 nijtmans Exp $ # # Copyright (c) 1997 Sun Microsystems, Inc. # @@ -50,7 +50,7 @@ proc ::history {args} { # ensemble unknown handler, as those don't fire when no subcommand is # given at all. - if {[llength $args] == 0} { + if {![llength $args]} { set args info } @@ -230,10 +230,10 @@ proc ::tcl::HistIndex {event} { for {set i [expr {$history(nextid)-1}]} {[info exists history($i)]} \ {incr i -1} { if {[string match $event* $history($i)]} { - return $i; + return $i } if {[string match $event $history($i)]} { - return $i; + return $i } } return -code error "no event matches \"$event\"" diff --git a/library/init.tcl b/library/init.tcl index 6c77585..bbe2c91 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.123 2010/04/30 21:15:42 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.124 2010/06/14 13:48:25 nijtmans Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -78,7 +78,7 @@ namespace eval tcl { # TIP #255 min and max functions namespace eval mathfunc { proc min {args} { - if {[llength $args] == 0} { + if {![llength $args]} { return -code error \ "too few arguments to math function \"min\"" } @@ -89,12 +89,12 @@ namespace eval tcl { if {[catch {expr {double($arg)}} err]} { return -code error $err } - if {$arg < $val} { set val $arg } + if {$arg < $val} {set val $arg} } return $val } proc max {args} { - if {[llength $args] == 0} { + if {![llength $args]} { return -code error \ "too few arguments to math function \"max\"" } @@ -105,7 +105,7 @@ namespace eval tcl { if {[catch {expr {double($arg)}} err]} { return -code error $err } - if {$arg > $val} { set val $arg } + if {$arg > $val} {set val $arg} } return $val } @@ -252,13 +252,13 @@ proc unknown args { # if {[info exists UnknownPending($name)]} { return -code error "self-referential recursion\ - in \"unknown\" for command \"$name\""; + in \"unknown\" for command \"$name\"" } - set UnknownPending($name) pending; + set UnknownPending($name) pending set ret [catch { auto_load $name [uplevel 1 {::namespace current}] } msg opts] - unset UnknownPending($name); + unset UnknownPending($name) if {$ret != 0} { dict append opts -errorinfo "\n (autoloading \"$name\")" return -options $opts $msg @@ -546,14 +546,14 @@ proc auto_qualify {cmd namespace} { # Before each return case we give an example of which category it is # with the following form : - # ( inputCmd, inputNameSpace) -> output + # (inputCmd, inputNameSpace) -> output if {[string match ::* $cmd]} { if {$n > 1} { - # ( ::foo::bar , * ) -> ::foo::bar + # (::foo::bar , *) -> ::foo::bar return [list $cmd] } else { - # ( ::global , * ) -> global + # (::global , *) -> global return [list [string range $cmd 2 end]] } } @@ -563,17 +563,17 @@ proc auto_qualify {cmd namespace} { if {$n == 0} { if {$namespace eq "::"} { - # ( nocolons , :: ) -> nocolons + # (nocolons , ::) -> nocolons return [list $cmd] } else { - # ( nocolons , ::sub ) -> ::sub::nocolons nocolons + # (nocolons , ::sub) -> ::sub::nocolons nocolons return [list ${namespace}::$cmd $cmd] } } elseif {$namespace eq "::"} { - # ( foo::bar , :: ) -> ::foo::bar + # (foo::bar , ::) -> ::foo::bar return [list ::$cmd] } else { - # ( foo::bar , ::sub ) -> ::sub::foo::bar ::foo::bar + # (foo::bar , ::sub) -> ::sub::foo::bar ::foo::bar return [list ${namespace}::$cmd ::$cmd] } } @@ -693,7 +693,9 @@ proc auto_execok name { foreach dir [split $path {;}] { # Skip already checked directories - if {[info exists checked($dir)] || ($dir eq {})} { continue } + if {[info exists checked($dir)] || ($dir eq {})} { + continue + } set checked($dir) {} foreach ext $execExtensions { set file [file join $dir ${name}${ext}] diff --git a/library/package.tcl b/library/package.tcl index 839f506..b9d9bc5 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl which can be loaded on demand # for package management. # -# RCS: @(#) $Id: package.tcl,v 1.38 2009/11/18 21:23:20 nijtmans Exp $ +# RCS: @(#) $Id: package.tcl,v 1.39 2010/06/14 13:48:25 nijtmans Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -29,7 +29,7 @@ namespace eval tcl::Pkg {} # Results: # Returns 1 if the extension matches, 0 otherwise -proc tcl::Pkg::CompareExtension { fileName {ext {}} } { +proc tcl::Pkg::CompareExtension {fileName {ext {}}} { global tcl_platform if {$ext eq ""} {set ext [info sharedlibextension]} if {$tcl_platform(platform) eq "windows"} { @@ -50,7 +50,7 @@ proc tcl::Pkg::CompareExtension { fileName {ext {}} } { # tcl::Pkg::CompareExtension foo.so.bar .so # which should not match. - if { ![string is integer -strict [string range $currExt 1 end]] } { + if {![string is integer -strict [string range $currExt 1 end]]} { return 0 } set root [file rootname $root] @@ -83,7 +83,7 @@ proc tcl::Pkg::CompareExtension { fileName {ext {}} } { # dir. proc pkg_mkIndex {args} { - set usage {"pkg_mkIndex ?-direct? ?-lazy? ?-load pattern? ?-verbose? ?--? dir ?pattern ...?"}; + set usage {"pkg_mkIndex ?-direct? ?-lazy? ?-load pattern? ?-verbose? ?--? dir ?pattern ...?"} set argCount [llength $args] if {$argCount < 1} { @@ -129,7 +129,7 @@ proc pkg_mkIndex {args} { set dir [lindex $args $idx] set patternList [lrange $args [expr {$idx + 1}] end] - if {[llength $patternList] == 0} { + if {![llength $patternList]} { set patternList [list "*.tcl" "*[info sharedlibextension]"] } @@ -165,7 +165,7 @@ proc pkg_mkIndex {args} { } } foreach pkg [info loaded] { - if {! [string match -nocase $loadPat [lindex $pkg 1]]} { + if {![string match -nocase $loadPat [lindex $pkg 1]]} { continue } if {$doVerbose} { @@ -301,12 +301,12 @@ proc pkg_mkIndex {args} { # load packages, don't bother figuring out the set of commands # created by the new packages. We only need that list for # setting up the autoloading used in the non-direct case. - if { !$::tcl::direct } { + if {!$::tcl::direct} { # See what new namespaces appeared, and import commands # from them. Only exported commands go into the index. foreach ::tcl::x [::tcl::GetAllNamespaces] { - if {! [info exists ::tcl::namespaces($::tcl::x)]} { + if {![info exists ::tcl::namespaces($::tcl::x)]} { namespace import -force ${::tcl::x}::* } @@ -365,7 +365,7 @@ proc pkg_mkIndex {args} { set cmds [lsort [$c eval array names ::tcl::newCmds]] set pkgs [$c eval set ::tcl::newPkgs] if {$doVerbose} { - if { !$direct } { + if {!$direct} { tclLog "commands provided were $cmds" } tclLog "packages provided were $pkgs" @@ -403,7 +403,7 @@ proc pkg_mkIndex {args} { lappend cmd ::tcl::Pkg::Create -name $name -version $version foreach spec $files($pkg) { foreach {file type procs} $spec { - if { $direct } { + if {$direct} { set procs {} } lappend cmd "-$type" [list $file $procs] @@ -678,7 +678,7 @@ proc ::tcl::Pkg::Create {args} { # process arguments set len [llength $args] - if { $len < 6 } { + if {$len < 6} { error $err(wrongNumArgs) } @@ -695,14 +695,14 @@ proc ::tcl::Pkg::Create {args} { switch -glob -- $flag { "-name" - "-version" { - if { $i >= $len } { + if {$i >= $len} { error [format $err(valueMissing) $flag] } set opts($flag) [lindex $args $i] } "-source" - "-load" { - if { $i >= $len } { + if {$i >= $len} { error [format $err(valueMissing) $flag] } lappend opts($flag) [lindex $args $i] @@ -714,14 +714,14 @@ proc ::tcl::Pkg::Create {args} { } # Validate the parameters - if { [llength $opts(-name)] == 0 } { + if {![llength $opts(-name)]} { error [format $err(valueMissing) "-name"] } - if { [llength $opts(-version)] == 0 } { + if {![llength $opts(-version)]} { error [format $err(valueMissing) "-version"] } - if { [llength $opts(-source)] == 0 && [llength $opts(-load)] == 0 } { + if {!([llength $opts(-source)] || [llength $opts(-load)])} { error $err(noLoadOrSource) } @@ -741,7 +741,7 @@ proc ::tcl::Pkg::Create {args} { break } - if { [llength $proclist] == 0 } { + if {![llength $proclist]} { set cmd "\[list $key \[file join \$dir [list $filename]\]\]" lappend cmdList $cmd } else { @@ -750,7 +750,7 @@ proc ::tcl::Pkg::Create {args} { } } - if { [llength $lazyFileList] > 0 } { + if {[llength $lazyFileList]} { lappend cmdList "\[list tclPkgSetup \$dir $opts(-name)\ $opts(-version) [list $lazyFileList]\]" } diff --git a/library/safe.tcl b/library/safe.tcl index 7c81f92..c5fad56 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.37 2009/12/30 22:26:43 dkf Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.38 2010/06/14 13:48:25 nijtmans Exp $ # # The implementation is based on namespaces. These naming conventions are @@ -153,10 +153,18 @@ proc ::safe::interpConfigure {args} { set item [::tcl::OptCurDesc $desc] set name [::tcl::OptName $item] switch -exact -- $name { - -accessPath {return [list -accessPath $state(access_path)]} - -statics {return [list -statics $state(staticsok)]} - -nested {return [list -nested $state(nestedok)]} - -deleteHook {return [list -deleteHook $state(cleanupHook)]} + -accessPath { + return [list -accessPath $state(access_path)] + } + -statics { + return [list -statics $state(staticsok)] + } + -nested { + return [list -nested $state(nestedok)] + } + -deleteHook { + return [list -deleteHook $state(cleanupHook)] + } -noStatics { # it is most probably a set in fact but we would need # then to jump to the set part and it is not *sure* @@ -1011,7 +1019,7 @@ proc ::safe::AliasEncoding {slave option args} { } if {[string equal -length [string length $option] $option "system"]} { - if {[llength $args] == 0} { + if {![llength $args]} { # passed all the tests , lets source it: try { return [::interp invokehidden $slave encoding system] diff --git a/library/tm.tcl b/library/tm.tcl index 907f9cf..ce8a013 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -352,11 +352,11 @@ proc ::tcl::tm::roots {paths} { set p [file join $pa tcl$major] for {set n $minor} {$n >= 0} {incr n -1} { set px [file join $p ${major}.${n}] - if {![interp issafe]} { set px [file normalize $px] } + if {![interp issafe]} {set px [file normalize $px]} path add $px } set px [file join $p site-tcl] - if {![interp issafe]} { set px [file normalize $px] } + if {![interp issafe]} {set px [file normalize $px]} path add $px } return @@ -365,4 +365,4 @@ proc ::tcl::tm::roots {paths} { # Initialization. Set up the default paths, then insert the new handler into # the chain. -if {![interp issafe]} { ::tcl::tm::Defaults } +if {![interp issafe]} {::tcl::tm::Defaults} -- cgit v0.12 From c03bc4fe6cde4ddd576824fde353f5606bcd707f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 14 Jun 2010 14:56:50 +0000 Subject: Spacing and style fixes --- library/init.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/init.tcl b/library/init.tcl index bbe2c91..6bab1d1 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.124 2010/06/14 13:48:25 nijtmans Exp $ +# RCS: @(#) $Id: init.tcl,v 1.125 2010/06/14 14:56:50 nijtmans Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -693,7 +693,7 @@ proc auto_execok name { foreach dir [split $path {;}] { # Skip already checked directories - if {[info exists checked($dir)] || ($dir eq {})} { + if {[info exists checked($dir)] || ($dir eq "")} { continue } set checked($dir) {} -- cgit v0.12 From eb98df8fef94944b7b479387e27232beab5e869d Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 16 Jun 2010 10:31:14 +0000 Subject: [Bug 3016135] traceback using clock format with locale of he_IL --- ChangeLog | 5 +++++ library/msgs/he.msg | 4 ++-- tools/loadICU.tcl | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2139ea..f1e09f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-06-16 Jan Nijtmans + + * tools/loadICU.tcl [Bug 3016135] traceback using clock format with + * library/msgs/he.msg locale of he_IL + 2010-06-14 Jan Nijtmans * unix/Makefile.in Fix compilation of xttest with 8.6 changes diff --git a/library/msgs/he.msg b/library/msgs/he.msg index 52a94e2..4fd921d 100755 --- a/library/msgs/he.msg +++ b/library/msgs/he.msg @@ -44,8 +44,8 @@ namespace eval ::tcl::clock { "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8"\ "\u05d3\u05e6\u05de\u05d1\u05e8"\ ""] - ::msgcat::mcset he BCE "\u05dc\u05e1\u05d4"\u05e0" - ::msgcat::mcset he CE "\u05dc\u05e4\u05e1\u05d4"\u05e0" + ::msgcat::mcset he BCE "\u05dc\u05e1\u05d4\u0022\u05e0" + ::msgcat::mcset he CE "\u05dc\u05e4\u05e1\u05d4\u0022\u05e0" ::msgcat::mcset he DATE_FORMAT "%d/%m/%Y" ::msgcat::mcset he TIME_FORMAT "%H:%M:%S" ::msgcat::mcset he DATE_TIME_FORMAT "%d/%m/%Y %H:%M:%S %z" diff --git a/tools/loadICU.tcl b/tools/loadICU.tcl index da0e134..8bf0d72 100755 --- a/tools/loadICU.tcl +++ b/tools/loadICU.tcl @@ -26,7 +26,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: loadICU.tcl,v 1.3 2007/04/20 02:23:35 kennykb Exp $ +# RCS: @(#) $Id: loadICU.tcl,v 1.4 2010/06/16 10:31:15 nijtmans Exp $ # #---------------------------------------------------------------------- @@ -591,7 +591,7 @@ proc backslashify { string } { set retval {} foreach char [split $string {}] { scan $char %c ccode - if { $ccode >= 0x0020 && $ccode < 0x007f + if { $ccode >= 0x0020 && $ccode < 0x007f && $char ne "\"" && $char ne "\{" && $char ne "\}" && $char ne "\[" && $char ne "\]" && $char ne "\\" && $char ne "\$" } { append retval $char -- cgit v0.12 From 895f05f712393e5e7629384b1690690c6f866974 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Wed, 16 Jun 2010 14:49:50 +0000 Subject: Simplify Tcl_AppInit and *_Init definitions. Change TclpThreadCreate and Tcl_CreateThread signature, making clear that "proc" is a function pointer, as in all other "proc" function parameters. --- ChangeLog | 10 ++++++++++ doc/Class.3 | 6 +++--- doc/Thread.3 | 10 +++++----- generic/tcl.decls | 4 ++-- generic/tcl.h | 18 ++++++------------ generic/tclDecls.h | 6 +++--- generic/tclEvent.c | 8 ++++---- generic/tclInt.h | 16 ++++++++-------- generic/tclTestProcBodyObj.c | 4 +--- unix/.cvsignore | 1 + unix/tclUnixThrd.c | 4 ++-- win/tclWinThrd.c | 4 ++-- 12 files changed, 47 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1e09f3.